/*! For license information please see assetcard-stories-assetcard-stories.cf88927f.iframe.bundle.js.LICENSE.txt */
(globalThis.webpackChunk_spectrum_css_preview=globalThis.webpackChunk_spectrum_css_preview||[]).push([[7414,948,8402],{"../components/assetcard/stories/assetcard.stories.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CheckboxSelection:()=>CheckboxSelection,DropTarget:()=>DropTarget,HighlightSelection:()=>HighlightSelection,Landscape:()=>Landscape,OptionalContent:()=>OptionalContent,OrderedSelection:()=>OrderedSelection,Portrait:()=>Portrait,Square:()=>Square,__namedExportsOrder:()=>__namedExportsOrder,default:()=>assetcard_stories});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"),external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("@storybook/preview-api"),capitalize=__webpack_require__("../node_modules/lodash-es/capitalize.js");const lodash_es_camelCase=(0,__webpack_require__("../node_modules/lodash-es/_createCompounder.js").A)((function(result,word,index){return word=word.toLowerCase(),result+(index?(0,capitalize.A)(word):word)}));var template=__webpack_require__("../components/checkbox/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),assetcard=__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/assetcard/index.css"),assetcard_default=__webpack_require__.n(assetcard),options={attributes:{"data-source":"processed"}};options.insert=insertBySelector_default().bind(null,"head");injectStylesIntoLinkTag_default()(assetcard_default(),options);const Template=({rootClass="spectrum-AssetCard",image,exampleImage,title,headerContent,content=[],selection="checkbox",isSelected=!1,isFocused=!1,isDropTarget=!1,customClasses=[],id,...globals})=>{const[,updateArgs]=(0,external_STORYBOOK_MODULE_PREVIEW_API_.useArgs)(),{express}=globals;try{express?__webpack_require__.e(3473).then(__webpack_require__.bind(__webpack_require__,"../components/assetcard/themes/express.css")):__webpack_require__.e(8904).then(__webpack_require__.bind(__webpack_require__,"../components/assetcard/themes/spectrum.css"))}catch(e){console.warn(e)}return image||exampleImage?(exampleImage&&(exampleImage=`example-card-${exampleImage}.png`),lit.qy`
		<div
			class=${(0,class_map.H)({[rootClass]:!0,[`${rootClass}--${selection}Selection`]:void 0!==selection,"is-selected":isSelected,"is-focused":isFocused,"is-drop-target":isDropTarget,...customClasses.reduce(((a,c)=>({...a,[c]:!0})),{})})}
			id=${(0,if_defined.J)(id)}
			@click=${()=>{updateArgs({isSelected:!isSelected})}}
			tabindex="0"
			role="figure"
		>
			<div class="${rootClass}-assetContainer">
				<img class="${rootClass}-asset" alt="assetcard example image" src="${image??exampleImage}" />
				<div class="${rootClass}-selectionOverlay"></div>
			</div>
			${(0,when.z)(title,(()=>lit.qy`<div class="${rootClass}-header">
					${(0,when.z)(title,(()=>lit.qy`<div class="${rootClass}-title" id=${lodash_es_camelCase(title)}>${title}</div>`))}
					${(0,when.z)(headerContent,(()=>lit.qy`<div class="${rootClass}-headerContent">
								${headerContent}
							</div>`))}
				</div>`))}
			${(0,when.z)(content,(()=>lit.qy`<div class="${rootClass}-content">${content}</div>`))}
			<div class="${rootClass}-selectionIndicator">
				${(0,when.z)("checkbox"===selection,(()=>(0,template.B)({...globals,size:"m",isEmphasized:!0,isChecked:isSelected,ariaLabelledby:lodash_es_camelCase(title),customClasses:[`${rootClass}-checkbox`]})),(()=>lit.qy`<div class="${rootClass}-selectionOrder">1</div>`))}
			</div>
		</div>
	`):(console.warn("AssetCard: image is required"),lit.qy``)};const assetcard_stories={title:"Components/Asset card",description:"The asset card component allows users to select and manage assets and their metadata in a grid.",component:"Assetcard",argTypes:{image:{name:"Image",type:{name:"string"},table:{type:{summary:"string"},category:"Component"},control:{type:"file",accept:".svg,.png,.jpg,.jpeg,.webc"}},exampleImage:{name:"Example images",type:{name:"string"},table:{type:{summary:"string"},category:"Component"},options:["landscape","portrait","square"],control:"select",if:{arg:"image",truthy:!1}},title:{name:"Title",type:{name:"string"},table:{type:{summary:"string"},category:"Content"},control:{type:"text"}},headerContent:{name:"Additional header content",type:{name:"string"},table:{type:{summary:"string"},category:"Content"},control:{type:"text"}},content:{table:{disable:!0}},selection:{name:"Selection styles",type:{name:"string"},table:{type:{summary:"string"},category:"Component",disable:!0},options:["checkbox","highlight","ordered"],control:"select"},isSelected:{name:"Selected",type:{name:"boolean"},table:{type:{summary:"boolean"},category:"State"},control:"boolean"},isFocused:{name:"Focused",type:{name:"boolean"},table:{type:{summary:"boolean"},category:"State"},control:"boolean"},isDropTarget:{name:"Drop target",type:{name:"boolean"},table:{type:{summary:"boolean"},category:"Advanced"},control:"boolean"}},args:{rootClass:"spectrum-AssetCard",exampleImage:"portrait",selection:"checkbox",isSelected:!1,isFocused:!1,isDropTarget:!1},parameters:{actions:{handles:[...__webpack_require__("../components/checkbox/stories/checkbox.stories.js").default.parameters.actions.handles]},status:{type:"migrated"}}},Portrait=Template.bind({});Portrait.args={title:"Portrait asset",content:["Image"]};const Landscape=Template.bind({});Landscape.args={title:"Landscape asset",exampleImage:"landscape"};const Square=Template.bind({});Square.args={title:"Square asset",exampleImage:"square"};const OptionalContent=Template.bind({});OptionalContent.args={title:"MVI_0123.mp4",headerContent:"39:02",exampleImage:"square"};const HighlightSelection=Template.bind({});HighlightSelection.args={title:"Highlight selection",selection:"highlight",isSelected:!0};const CheckboxSelection=Template.bind({});CheckboxSelection.args={title:"Checkbox selection",selection:"checkbox",isSelected:!0};const OrderedSelection=Template.bind({});OrderedSelection.args={title:"Ordered selection",selection:"ordered",isSelected:!0,exampleImage:"landscape"};const DropTarget=Template.bind({});DropTarget.args={title:"Drop target",selection:"highlight",isDropTarget:!0,isSelected:!0};const __namedExportsOrder=["Portrait","Landscape","Square","OptionalContent","HighlightSelection","CheckboxSelection","OrderedSelection","DropTarget"]},"../components/checkbox/stories/checkbox.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"),_template__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../components/checkbox/stories/template.js");const __WEBPACK_DEFAULT_EXPORT__={title:"Components/Checkbox",description:"Checkboxes allow users to select multiple items from a list of individual items, or mark one individual item as selected.",component:"Checkbox",argTypes:{size:{name:"Size",type:{name:"string",required:!0},table:{type:{summary:"string"},category:"Component"},options:["s","m","l","xl"],control:"select"},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:{type:"boolean"}},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"},isChecked:{name:"Checked",type:{name:"boolean"},table:{type:{summary:"boolean"},category:"State"},control:{type:"boolean"}},isIndeterminate:{name:"Checkbox indeterminate",type:{name:"boolean"},table:{type:{summary:"boolean"},category:"State"},control:"boolean"},isReadOnly:{name:"Read only",type:{name:"boolean"},table:{type:{summary:"boolean"},category:"State"},control:"boolean"}},args:{rootClass:"spectrum-Checkbox",size:"m",label:"Checkbox",isChecked:!1,isDisabled:!1,isEmphasized:!1,isIndeterminate:!1,isInvalid:!1,isReadOnly:!1},parameters:{actions:{handles:['click input[type="checkbox"]']},status:{type:"migrated"}}},Default=(({...args})=>lit__WEBPACK_IMPORTED_MODULE_0__.qy`
        <div style="display: flex; flex-direction: column; padding: 1rem">
            ${(0,_template__WEBPACK_IMPORTED_MODULE_1__.B)({...args,iconName:void 0})}
            ${(0,_template__WEBPACK_IMPORTED_MODULE_1__.B)({...args,isChecked:!0})}
            ${(0,_template__WEBPACK_IMPORTED_MODULE_1__.B)({...args,isIndeterminate:!0})}
                ${(0,_template__WEBPACK_IMPORTED_MODULE_1__.B)({...args,isDisabled:!0})}
            ${(0,_template__WEBPACK_IMPORTED_MODULE_1__.B)({...args,label:"Checkbox with wrapping label text",customStyles:{"max-inline-size":"100px"}})}
        </div>
    `).bind({});Default.args={id:"default-checkbox"},Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:'({\n  // customStyles = {},\n  // isChecked = false,\n  ...args\n}) => {\n  return html`\n        <div style="display: flex; flex-direction: column; padding: 1rem">\n            ${Template({\n    ...args,\n    iconName: undefined\n  })}\n            ${Template({\n    ...args,\n    isChecked: true\n  })}\n            ${Template({\n    ...args,\n    isIndeterminate: true\n  })}\n                ${Template({\n    ...args,\n    isDisabled: true\n  })}\n            ${Template({\n    ...args,\n    label: "Checkbox with wrapping label text",\n    customStyles: {\n      "max-inline-size": "100px"\n    }\n  })}\n        </div>\n    `;\n}',...Default.parameters?.docs?.source}}};const __namedExportsOrder=["Default"]},"../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/assetcard/index.css":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=__webpack_require__.p+"assets/css/components/assetcard/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/checkbox/index.css":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=__webpack_require__.p+"assets/css/components/checkbox/index.css"},"../components/checkbox/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"),when=__webpack_require__("../node_modules/lit-html/directives/when.js"),external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("@storybook/preview-api"),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),cjs_ruleSet_1_rules_10_use_2_components_checkbox=__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/checkbox/index.css"),checkbox_default=__webpack_require__.n(cjs_ruleSet_1_rules_10_use_2_components_checkbox),options={attributes:{"data-source":"processed"}};options.insert=insertBySelector_default().bind(null,"head");injectStylesIntoLinkTag_default()(checkbox_default(),options);const Template=({rootClass="spectrum-Checkbox",size="m",label,isChecked=!1,isEmphasized=!1,isIndeterminate=!1,isDisabled=!1,isInvalid=!1,isReadOnly=!1,title,value,id,ariaLabelledby,customStyles={},customClasses=[],...globals})=>{const[,updateArgs]=(0,external_STORYBOOK_MODULE_PREVIEW_API_.useArgs)(),{express}=globals;try{express?__webpack_require__.e(8682).then(__webpack_require__.bind(__webpack_require__,"../components/checkbox/themes/express.css")):__webpack_require__.e(4049).then(__webpack_require__.bind(__webpack_require__,"../components/checkbox/themes/spectrum.css"))}catch(e){console.warn(e)}let iconSize="75";switch(size){case"s":iconSize="50";break;case"l":iconSize="100";break;case"xl":iconSize="200";break;default:iconSize="75"}return lit.qy`
		<label
			class=${(0,class_map.H)({[rootClass]:!0,[`${rootClass}--size${size?.toUpperCase()}`]:void 0!==size,[`${rootClass}--emphasized`]:isEmphasized,"is-indeterminate":isIndeterminate,"is-disabled":isDisabled||isReadOnly,"is-invalid":isInvalid,"is-readOnly":isReadOnly,...customClasses.reduce(((a,c)=>({...a,[c]:!0})),{})})}
			id=${(0,if_defined.J)(id)}
			style=${(0,if_defined.J)((0,style_map.W)(customStyles))}
		>
			<input
				type="checkbox"
				class="${rootClass}-input"
				aria-labelledby=${(0,if_defined.J)(ariaLabelledby)}
				?checked=${isChecked}
				?disabled=${isDisabled||isReadOnly}
				title=${(0,if_defined.J)(title)}
				value=${(0,if_defined.J)(value)}
				@change=${()=>{isDisabled||updateArgs({isChecked:!isChecked})}}
				id=${(0,if_defined.J)(id?`${id}-input`:void 0)}
			/>
			<span class="${rootClass}-box">
				${(0,template.B)({...globals,size,iconName:`Checkmark${iconSize}`,customClasses:[`${rootClass}-checkmark`]})}
				${(0,template.B)({...globals,size,iconName:`Dash${iconSize}`,customClasses:[`${rootClass}-partialCheckmark`]})}
			</span>
			${(0,when.z)(label,(()=>lit.qy`<span class="${rootClass}-label">${label}</span>`))}
		</label>
	`}},"../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=assetcard-stories-assetcard-stories.cf88927f.iframe.bundle.js.map