/*! For license information please see icon-stories-icon-stories.635c04f2.iframe.bundle.js.LICENSE.txt */
"use strict";(globalThis.webpackChunk_spectrum_css_preview=globalThis.webpackChunk_spectrum_css_preview||[]).push([[8970,948],{"../components/icon/stories/icon.stories.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__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"]},"../node_modules/lit-html/directives/when.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{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__)=>{__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=icon-stories-icon-stories.635c04f2.iframe.bundle.js.map