/*! For license information please see tag-stories-tag-stories.0c7adf69.iframe.bundle.js.LICENSE.txt */
(globalThis.webpackChunk_spectrum_css_preview=globalThis.webpackChunk_spectrum_css_preview||[]).push([[5250,948,8970],{"../components/icon/stories/icon.stories.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var lit__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../node_modules/lit/index.js"),lit_directives_style_map_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../node_modules/lit/directives/style-map.js"),lit_directives_when_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../node_modules/lit-html/directives/when.js"),_template__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../components/icon/stories/template.js"),_utilities_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../components/icon/stories/utilities.js");const uiIconNameOptions=_utilities_js__WEBPACK_IMPORTED_MODULE_3__.T3.map((iconName=>{const baseIconName=iconName.replace(/(Left|Right|Up|Down)$/,"");return 0==_utilities_js__WEBPACK_IMPORTED_MODULE_3__.kP[baseIconName]?.length?[baseIconName]:_utilities_js__WEBPACK_IMPORTED_MODULE_3__.kP[baseIconName]?.map((sizeNum=>iconName+sizeNum))??[]})).flat(),__WEBPACK_DEFAULT_EXPORT__={title:"Components/Icon",description:"The icons component contains all UI icons used for components as well as the CSS for UI and workflow icons.",component:"Icon",argTypes:{express:{table:{disable:!0}},reducedMotion:{table:{disable:!0}},size:{name:"Workflow Icon Size",type:{name:"string",required:!0},table:{type:{summary:"string"},category:"Component"},options:["xs","s","m","l","xl","xxl"],control:"select",if:{arg:"setName",eq:"workflow"}},setName:{name:"Icon set",type:{name:"string",required:!0},table:{type:{summary:"string"},category:"Content"},options:["ui","workflow"],control:"inline-radio"},iconName:{name:"Workflow icons",type:{name:"string"},table:{type:{summary:"string"},category:"Content"},options:_utilities_js__WEBPACK_IMPORTED_MODULE_3__.Im,control:"select",if:{arg:"setName",eq:"workflow"}},uiIconName:{name:"UI icons",type:{name:"string"},table:{type:{summary:"string"},category:"Content"},options:[...uiIconNameOptions],control:"select",if:{arg:"setName",eq:"ui"}},fill:{name:"Fill color",type:{name:"string"},table:{type:{summary:"string"},category:"Advanced"},control:"color"},useRef:{table:{disable:!0}}},args:{rootClass:"spectrum-Icon",setName:"workflow",iconName:"ABC",size:"xl"},parameters:{status:{type:"migrated"}}},Default=args=>window.isChromatic()?TestTemplate({...args}):(0,_template__WEBPACK_IMPORTED_MODULE_2__.B)({...args,iconName:args.iconName??args.uiIconName,setName:args.setName??(args.uiIconName?"ui":"workflow")});Default.args={};const TestTemplate=({...args})=>lit__WEBPACK_IMPORTED_MODULE_0__.qy`
        ${[{setName:"workflow",iconName:"Alert",fill:"var(--spectrum-negative-content-color-default)"},{setName:"workflow",iconName:"Hand"},{setName:"workflow",iconName:"Help"},{setName:"workflow",iconName:"ArrowLeft"},{setName:"workflow",iconName:"ArrowRight"},{setName:"workflow",iconName:"ChevronDown"}].map((row_args=>lit__WEBPACK_IMPORTED_MODULE_0__.qy`
            <div
                style=${(0,lit_directives_style_map_js__WEBPACK_IMPORTED_MODULE_1__.W)({display:"flex",gap:"16px",marginBottom:"16px"})}
            >
                ${["xs","s","m","l","xl","xxl"].map((size=>(0,_template__WEBPACK_IMPORTED_MODULE_2__.B)({...args,...row_args,size})))}
            </div>`))}
        <div style="margin-top:32px;">
            ${_utilities_js__WEBPACK_IMPORTED_MODULE_3__.T3.map((iconName=>lit__WEBPACK_IMPORTED_MODULE_0__.qy`
                <div
                    style=${(0,lit_directives_style_map_js__WEBPACK_IMPORTED_MODULE_1__.W)({display:"flex",gap:"16px"})}
                >
                    ${_utilities_js__WEBPACK_IMPORTED_MODULE_3__.kP[iconName.replace(/(Left|Right|Up|Down)$/,"")]?.map((iconSize=>(0,_template__WEBPACK_IMPORTED_MODULE_2__.B)({...args,setName:"ui",iconName:iconName+iconSize})))}
                    ${(0,lit_directives_when_js__WEBPACK_IMPORTED_MODULE_4__.z)(0==_utilities_js__WEBPACK_IMPORTED_MODULE_3__.kP[iconName]?.length,(()=>(0,_template__WEBPACK_IMPORTED_MODULE_2__.B)({...args,setName:"ui",iconName})))}
                </div>`))}
        </div>
    `;Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:'args => {\n  if (window.isChromatic()) {\n    return TestTemplate({\n      ...args\n    });\n  } else {\n    return Template({\n      ...args,\n      iconName: args.iconName ?? args.uiIconName,\n      setName: args.setName ?? (args.uiIconName ? "ui" : "workflow")\n    });\n  }\n}',...Default.parameters?.docs?.source}}};const __namedExportsOrder=["Default"]},"../components/tag/stories/tag.stories.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Avatar:()=>Avatar,Default:()=>Default,Icon:()=>Icon,Removable:()=>Removable,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _template__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../components/tag/stories/template.js"),_spectrum_css_icon_stories_icon_stories_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../components/icon/stories/icon.stories.js");const __WEBPACK_DEFAULT_EXPORT__={title:"Components/Tag",description:"A tag categorizes content. They can represent keywords or people, and are grouped to describe an item or a search request.",component:"Tag",argTypes:{size:{name:"Size",table:{type:{summary:"string"},category:"Component"},options:["s","m","l"],control:"select"},hasIcon:{name:"Has icon",type:{name:"boolean"},table:{type:{summary:"boolean"},category:"Component"},control:"boolean",if:{arg:"hasAvatar",truthy:!1}},iconName:{..._spectrum_css_icon_stories_icon_stories_js__WEBPACK_IMPORTED_MODULE_1__.default?.argTypes?.iconName??{},if:{arg:"hasIcon",truthy:!0}},hasAvatar:{name:"Has avatar",type:{name:"boolean"},table:{type:{summary:"boolean"},category:"Component"},control:"boolean",if:{arg:"hasIcon",truthy:!1}},avatarUrl:{name:"Avatar image",type:{name:"string"},table:{type:{summary:"string"},category:"Content"},control:{type:"file",accept:".svg,.png,.jpg,.jpeg,.webc"},if:{arg:"hasAvatar",truthy:!0}},label:{name:"Label",type:{name:"string"},table:{type:{summary:"string"},category:"Content"},control:{type:"text"}},isEmphasized:{name:"Emphasized styling",type:{name:"boolean"},table:{type:{summary:"boolean"},category:"Component"},control:"boolean",if:{arg:"isInvalid",truthy:!1}},isInvalid:{name:"Invalid",type:{name:"boolean"},table:{type:{summary:"boolean"},category:"State"},control:"boolean"},isDisabled:{name:"Disabled",type:{name:"boolean"},table:{type:{summary:"boolean"},category:"State"},control:"boolean"},isSelected:{name:"Selected",type:{name:"boolean"},table:{type:{summary:"boolean"},category:"State"},control:"boolean"},hasClearButton:{name:"Clear button",description:"True if a button is present to clear the tag.",type:{name:"boolean"},table:{type:{summary:"boolean"},category:"Component"},control:"boolean"}},args:{rootClass:"spectrum-Tag",size:"m",label:"Tag label",hasIcon:!1,iconName:"Info",avatarUrl:"example-ava.png",hasAvatar:!1,isSelected:!1,isDisabled:!1,isInvalid:!1,isEmphasized:!1,hasClearButton:!1},parameters:{actions:{handles:[]},status:{type:"migrated"}}},Default=_template__WEBPACK_IMPORTED_MODULE_0__.B.bind({});Default.args={};const Icon=_template__WEBPACK_IMPORTED_MODULE_0__.B.bind({});Icon.args={hasIcon:!0,iconName:"Info",label:"Tag label that truncates when it gets too long",customStyles:{"max-inline-size":"200px"}};const Avatar=_template__WEBPACK_IMPORTED_MODULE_0__.B.bind({});Avatar.args={hasAvatar:!0,avatarUrl:"example-ava.png"};const Removable=_template__WEBPACK_IMPORTED_MODULE_0__.B.bind({});Removable.args={hasClearButton:!0};const __namedExportsOrder=["Default","Icon","Avatar","Removable"]},"../node_modules/file-loader/dist/cjs.js??ruleSet[1].rules[10].use[1]!../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[10].use[2]!../components/avatar/index.css":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=__webpack_require__.p+"assets/css/components/avatar/index.css"},"../node_modules/file-loader/dist/cjs.js??ruleSet[1].rules[10].use[1]!../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[10].use[2]!../components/clearbutton/index.css":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=__webpack_require__.p+"assets/css/components/clearbutton/index.css"},"../node_modules/file-loader/dist/cjs.js??ruleSet[1].rules[10].use[1]!../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[10].use[2]!../components/tag/index.css":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=__webpack_require__.p+"assets/css/components/tag/index.css"},"../components/avatar/stories/template.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>Template});var lit=__webpack_require__("../node_modules/lit/index.js"),class_map=__webpack_require__("../node_modules/lit/directives/class-map.js"),if_defined=__webpack_require__("../node_modules/lit/directives/if-defined.js"),when=__webpack_require__("../node_modules/lit-html/directives/when.js"),injectStylesIntoLinkTag=__webpack_require__("../node_modules/style-loader/dist/runtime/injectStylesIntoLinkTag.js"),injectStylesIntoLinkTag_default=__webpack_require__.n(injectStylesIntoLinkTag),insertBySelector=__webpack_require__("../node_modules/style-loader/dist/runtime/insertBySelector.js"),insertBySelector_default=__webpack_require__.n(insertBySelector),avatar=__webpack_require__("../node_modules/file-loader/dist/cjs.js??ruleSet[1].rules[10].use[1]!../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[10].use[2]!../components/avatar/index.css"),avatar_default=__webpack_require__.n(avatar),options={attributes:{"data-source":"processed"}};options.insert=insertBySelector_default().bind(null,"head");injectStylesIntoLinkTag_default()(avatar_default(),options);const Template=({rootClass="spectrum-Avatar",image="example-ava.png",altText,isDisabled=!1,size="700",hasLink,id,customClasses=[]})=>lit.qy`
		<div
			class=${(0,class_map.H)({[rootClass]:!0,[`${rootClass}--size${size}`]:!0,"is-disabled":isDisabled,...customClasses.reduce(((a,c)=>({...a,[c]:!0})),{})})}
			id=${(0,if_defined.J)(id)}
		>
			${(0,when.z)(hasLink,(()=>lit.qy`
					<a class="spectrum-Avatar-link" href="#">
						<img class="${rootClass}-image" src=${image} alt=${(0,if_defined.J)(altText)} />
					</a>
					`))}
			${(0,when.z)(!hasLink,(()=>lit.qy`
					<img class="${rootClass}-image" src=${image} alt=${(0,if_defined.J)(altText)} />
				`))}
		</div>
	`},"../components/clearbutton/stories/template.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>Template});var lit=__webpack_require__("../node_modules/lit/index.js"),class_map=__webpack_require__("../node_modules/lit/directives/class-map.js"),if_defined=__webpack_require__("../node_modules/lit/directives/if-defined.js"),style_map=__webpack_require__("../node_modules/lit/directives/style-map.js"),template=__webpack_require__("../components/icon/stories/template.js"),injectStylesIntoLinkTag=__webpack_require__("../node_modules/style-loader/dist/runtime/injectStylesIntoLinkTag.js"),injectStylesIntoLinkTag_default=__webpack_require__.n(injectStylesIntoLinkTag),insertBySelector=__webpack_require__("../node_modules/style-loader/dist/runtime/insertBySelector.js"),insertBySelector_default=__webpack_require__.n(insertBySelector),clearbutton=__webpack_require__("../node_modules/file-loader/dist/cjs.js??ruleSet[1].rules[10].use[1]!../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[10].use[2]!../components/clearbutton/index.css"),clearbutton_default=__webpack_require__.n(clearbutton),options={attributes:{"data-source":"processed"}};options.insert=insertBySelector_default().bind(null,"head");injectStylesIntoLinkTag_default()(clearbutton_default(),options);const Template=({rootClass="spectrum-ClearButton",isDisabled=!1,size="m",variant,id,customClasses=[],customStyles={},...globals})=>{const{express}=globals;try{express?__webpack_require__.e(3330).then(__webpack_require__.bind(__webpack_require__,"../components/clearbutton/themes/express.css")):__webpack_require__.e(3353).then(__webpack_require__.bind(__webpack_require__,"../components/clearbutton/themes/spectrum.css"))}catch(e){console.warn(e)}return lit.qy`
		<button
			type="reset"
			class=${(0,class_map.H)({[rootClass]:!0,[`${rootClass}--size${size?.toUpperCase()}`]:void 0!==size,[`${rootClass}--${variant}`]:void 0!==variant,"is-disabled":isDisabled,...customClasses.reduce(((a,c)=>({...a,[c]:!0})),{})})}
			id=${(0,if_defined.J)(id)}
			style=${(0,if_defined.J)((0,style_map.W)(customStyles))}
			?disabled=${isDisabled}
		>
			<div class="${rootClass}-fill">
				${(0,template.B)({...globals,size,iconName:"Cross",customClasses:[`${rootClass}-icon`]})}
			</div>
		</button>
	`}},"../components/tag/stories/template.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>Template});var lit=__webpack_require__("../node_modules/lit/index.js"),class_map=__webpack_require__("../node_modules/lit/directives/class-map.js"),if_defined=__webpack_require__("../node_modules/lit/directives/if-defined.js"),style_map=__webpack_require__("../node_modules/lit/directives/style-map.js"),template=__webpack_require__("../components/avatar/stories/template.js"),stories_template=__webpack_require__("../components/clearbutton/stories/template.js"),icon_stories_template=__webpack_require__("../components/icon/stories/template.js"),injectStylesIntoLinkTag=__webpack_require__("../node_modules/style-loader/dist/runtime/injectStylesIntoLinkTag.js"),injectStylesIntoLinkTag_default=__webpack_require__.n(injectStylesIntoLinkTag),insertBySelector=__webpack_require__("../node_modules/style-loader/dist/runtime/insertBySelector.js"),insertBySelector_default=__webpack_require__.n(insertBySelector),tag=__webpack_require__("../node_modules/file-loader/dist/cjs.js??ruleSet[1].rules[10].use[1]!../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[10].use[2]!../components/tag/index.css"),tag_default=__webpack_require__.n(tag),options={attributes:{"data-source":"processed"}};options.insert=insertBySelector_default().bind(null,"head");injectStylesIntoLinkTag_default()(tag_default(),options);const Template=({rootClass="spectrum-Tag",size="m",iconName,avatarUrl,label,isSelected=!1,isEmphasized=!1,isDisabled=!1,isInvalid=!1,hasClearButton=!1,id,customClasses=[],customStyles={},...globals})=>{const{express}=globals;try{express?__webpack_require__.e(7195).then(__webpack_require__.bind(__webpack_require__,"../components/tag/themes/express.css")):__webpack_require__.e(681).then(__webpack_require__.bind(__webpack_require__,"../components/tag/themes/spectrum.css"))}catch(e){console.warn(e)}return isInvalid&&(iconName="Alert"),lit.qy`
		<div
			class=${(0,class_map.H)({[rootClass]:!0,[`${rootClass}--size${size?.toUpperCase()}`]:void 0!==size,"is-emphasized":isEmphasized,"is-disabled":isDisabled,"is-invalid":isInvalid,"is-selected":isSelected,...customClasses.reduce(((a,c)=>({...a,[c]:!0})),{})})}
			id=${(0,if_defined.J)(id)}
			tabindex=${isDisabled?"-1":"0"}
			style=${(0,if_defined.J)((0,style_map.W)(customStyles))}
		>
			${avatarUrl&&!isInvalid?(0,template.B)({...globals,image:avatarUrl,size:"50"}):""}
			${iconName||isInvalid?(0,icon_stories_template.B)({...globals,size,iconName,customClasses:[`${rootClass}-itemIcon`]}):""}
			<span class="${rootClass}-itemLabel">${label}</span>
			${hasClearButton?(0,stories_template.B)({...globals,size,customClasses:[`${rootClass}-clearButton`],onclick:evt=>{const el=evt.target;if(!el)return;const wrapper=el.closest(rootClass);wrapper.parentNode.removeChild(wrapper)}}):""}
		</div>
	`}},"../node_modules/lit-html/directives/when.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function n(n,r,t){return n?r(n):t?.(n)}__webpack_require__.d(__webpack_exports__,{z:()=>n})},"../node_modules/lit/directives/style-map.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{W:()=>o});var lit_html=__webpack_require__("../node_modules/lit-html/lit-html.js"),directive=__webpack_require__("../node_modules/lit-html/directive.js");const n="important",i=" !"+n,o=(0,directive.u$)(class extends directive.WL{constructor(t){if(super(t),t.type!==directive.OA.ATTRIBUTE||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(r)),this.render(r);for(const t of this.ft)null==r[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in r){const e=r[t];if(null!=e){this.ft.add(t);const r="string"==typeof e&&e.endsWith(i);t.includes("-")||r?s.setProperty(t,r?e.slice(0,-11):e,r?n:""):s[t]=e}}return lit_html.c0}})}}]);
//# sourceMappingURL=tag-stories-tag-stories.0c7adf69.iframe.bundle.js.map