/*! For license information please see accordion-stories-accordion-stories.f5557aa9.iframe.bundle.js.LICENSE.txt */
(globalThis.webpackChunk_spectrum_css_preview=globalThis.webpackChunk_spectrum_css_preview||[]).push([[686],{"../components/accordion/stories/accordion.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:()=>accordion_stories});var lit=__webpack_require__("../node_modules/lit/index.js"),style_map=__webpack_require__("../node_modules/lit/directives/style-map.js"),template=__webpack_require__("../components/link/stories/template.js"),stories_template=__webpack_require__("../components/typography/stories/template.js"),class_map=__webpack_require__("../node_modules/lit/directives/class-map.js"),if_defined=__webpack_require__("../node_modules/lit/directives/if-defined.js"),repeat=__webpack_require__("../node_modules/lit/directives/repeat.js"),external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("@storybook/preview-api"),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),accordion=__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/accordion/index.css"),accordion_default=__webpack_require__.n(accordion),options={attributes:{"data-source":"processed"}};options.insert=insertBySelector_default().bind(null,"head");injectStylesIntoLinkTag_default()(accordion_default(),options);const Template=({rootClass="spectrum-Accordion",size="m",density="regular",items,id,disableAll=!1,customClasses=[],customStyles={},...globals})=>{const[,updateArgs]=(0,external_STORYBOOK_MODULE_PREVIEW_API_.useArgs)();return items&&items.size?lit.qy`
		<div
			class="${(0,class_map.H)({[rootClass]:!0,[`${rootClass}--size${size?.toUpperCase()}`]:void 0!==size,[`${rootClass}--${density}`]:void 0!==density&&"regular"!==density,...customClasses.reduce(((a,c)=>({...a,[c]:!0})),{})})}"
			id=${(0,if_defined.J)(id)}
			role="region"
			style=${(0,if_defined.J)((0,style_map.W)(customStyles))}
		>
			${(0,repeat.u)(Array.from(items.keys()),((heading,idx)=>{const item=items.get(heading);return(({heading,content,rootClass="spectrum-Accordion-item",id,idx=0,isDisabled=!1,isOpen=!1,iconSize="m",customStyles={},customClasses=[],onclick,...globals})=>lit.qy`
		<div
			class=${(0,class_map.H)({[rootClass]:!0,"is-open":isOpen&&!isDisabled,"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))}
			role="presentation"
			@click=${onclick}
		>
			<!-- WAI-ARIA 1.1: Item header is a <button> wrapped within a <h3> element, rather than a <div> element with role="tab" -->
			<h3 class="${rootClass}Heading">
				<!-- WAI-ARIA 1.1: Item header <button> uses aria-expanded attribute to indicate expanded state. -->
				<button
					class="${rootClass}Header"
					type="button"
					?disabled=${isDisabled}
					id="spectrum-accordion-item-${idx}-header"
					aria-controls="spectrum-accordion-item-${idx}-content"
					aria-expanded="${open?"true":"false"}"
				>
					${heading}
				</button>
				<span class="${rootClass}IconContainer">
					${(0,icon_stories_template.B)({iconName:isOpen?"ChevronDown":"ChevronRight",setName:"ui",size:iconSize,customClasses:[`${rootClass}Indicator`],...globals})}
				</span>
			</h3>
			<!-- WAI-ARIA 1.1: Item content role changed from "tabpanel" to "region" -->
			<div
				class="${rootClass}Content"
				role="region"
				id="spectrum-accordion-item-${idx}-content"
				aria-labelledby="spectrum-accordion-item-${idx}-header"
			>
				${content}
			</div>
		</div>
	`)({...globals,rootClass:`${rootClass}-item`,heading,idx,iconSize:`${size}`,isDisabled:item.isDisabled||disableAll,...item,onclick:()=>{if(item.isDisabled)return;const newItems=new Map(items);newItems.set(heading,{...item,isOpen:!item.isOpen}),updateArgs({items:newItems})}})}))}
		</div>
	`:lit.qy``},accordion_stories={title:"Components/Accordion",component:"Accordion",argTypes:{items:{table:{disable:!0}},size:{name:"Size",type:{name:"string",required:!0},table:{type:{summary:"string"},category:"Component"},options:["s","m","l","xl"],control:"select"},disableAll:{name:"Disable all items",type:{name:"boolean"},table:{type:{summary:"boolean"},category:"State"},control:"boolean"},density:{name:"Density",type:{name:"string",required:!0},table:{type:{summary:"string"},category:"Component"},options:["compact","regular","spacious"],control:"select"}},args:{rootClass:"spectrum-Accordion",size:"m",density:"regular",disableAll:!1,items:new Map([["Are any Adobe products free?",{content:"Yes, Adobe offers free products like Acrobat Reader, Aero, Fill & Sign, Photoshop Express, and Adobe Scan. You can also use Creative Cloud Express, Fresco, and Lightroom Mobile for free, with the option of making in-app purchases.",isDisabled:!0}],["Are Adobe products worth it?",{content:(0,stories_template.B)({semantics:"body",content:["Adobe makes some of the most widely used software applications in the world, many of which are industry standard. Get started with free apps like Adobe Acrobat Reader, Aero, Fill & Sign, Photoshop Express, and Adobe Scan. Or consider Creative Cloud, with plans starting at just US$9.99/mo. Every Adobe Creative Cloud plan includes perks like free stock images and fonts, collaboration tools, and cloud storage as well as regular feature updates to deliver the latest technology.",(0,template.B)({url:"https://www.adobe.com/creativecloud/plans.html",text:"Learn more about Adobe Creative Cloud plans and pricing."})]}),isOpen:!0}],["Which Adobe product is best for editing PDFs?",{content:(0,stories_template.B)({semantics:"body",content:["You can edit PDFs with Adobe Acrobat, which is available in two editions: Standard and Pro. Acrobat Standard provides basic tools to create, edit, and sign PDFs on Windows devices. Acrobat Pro is the complete PDF solution with tools to edit, convert, and sign PDFs across web, mobile, and tablet, as well as on Windows and macOS computers. If you'd like to try before you buy, you can get a free 7-day trial of Acrobat Pro.",(0,template.B)({url:"https://www.adobe.com/acrobat.html",text:"Learn more about Acrobat."})]})}],["How many products does Adobe have?",{content:"Adobe offers nearly 100 products. Get creative with industry-standard apps like Adobe Photoshop, Illustrator InDesign, and Lightroom. Create, edit, and sign PDFs with Adobe Acrobat and Acrobat Sign. And deliver exceptional customer experiences with our marketing and commerce apps such as Adobe Experience Manager, Campaign, and Target.",isOpen:!0}],["How much do Adobe products cost?",{content:(0,stories_template.B)({semantics:"body",content:["Creative Cloud plans start at US$9.99/mo. You can subscribe to specific Single App plans or get 20+ creative apps and services in the Creative Cloud All Apps plan.",(0,template.B)({url:"https://www.adobe.com/creativecloud/plans.html",text:"Explore Creative Cloud plans."})]})}],["What are the most popular Adobe products?",{content:"Adobe makes some of the most widely used software in the world, including popular apps like Acrobat Pro, Photoshop, Illustrator, InDesign, Lightroom, and Premiere Pro."}],["How can I get a student discount on Adobe products?",{content:(0,stories_template.B)({semantics:"body",content:[`Students who provide a valid school-issued email address at purchase are eligible to save over 60% on Creative Cloud All Apps, which includes 20+ apps such as Photoshop, Illustrator, InDesign, Acrobat Pro, and more. ${(0,template.B)({url:"https://www.adobe.com/creativecloud/buy/students.html",text:"Learn more about Creative Cloud for students."})}`]})}]])},parameters:{actions:{handles:["click .spectrum-Accordion-item"]},status:{type:"migrated"},docs:{description:{component:"The accordion element contains a list of items that can be expanded or collapsed to reveal additional content or information associated with each item. There can be zero expanded items, exactly one expanded item, or more than one item expanded at a time, depending on the configuration. This list of items is defined by child accordion item elements."}}}},Default=(args=>lit.qy`
    ${window.isChromatic()?lit.qy`
        <div style=${(0,style_map.W)({display:"flex",flexWrap:"wrap",gap:"2em"})}>
            ${Template(args)}
            ${Template({...args,customStyles:{maxInlineSize:"300px"}})}
            ${Template({...args,disableAll:!0})}
        </div>
    `:Template(args)}
`).bind({});Default.args={},Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:'args => html`\n    ${window.isChromatic() ? html`\n        <div style=${styleMap({\n  display: "flex",\n  flexWrap: "wrap",\n  gap: "2em"\n})}>\n            ${Template(args)}\n            ${Template({\n  ...args,\n  customStyles: {\n    maxInlineSize: "300px"\n  }\n})}\n            ${Template({\n  ...args,\n  disableAll: true\n})}\n        </div>\n    ` : Template(args)}\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/accordion/index.css":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=__webpack_require__.p+"assets/css/components/accordion/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/link/index.css":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=__webpack_require__.p+"assets/css/components/link/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/typography/index.css":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=__webpack_require__.p+"assets/css/components/typography/index.css"},"../components/link/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"),capitalize=__webpack_require__("../node_modules/lodash-es/capitalize.js"),lowerCase=__webpack_require__("../node_modules/lodash-es/lowerCase.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_link=__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/link/index.css"),link_default=__webpack_require__.n(cjs_ruleSet_1_rules_10_use_2_components_link),options={attributes:{"data-source":"processed"}};options.insert=insertBySelector_default().bind(null,"head");injectStylesIntoLinkTag_default()(link_default(),options);const Template=({rootClass="spectrum-Link",url="#",text,variant,staticColor,isQuiet=!1,id,customClasses=[]})=>lit.qy`
		<a
			class=${(0,class_map.H)({[rootClass]:!0,[`${rootClass}--quiet`]:isQuiet,[`${rootClass}--${variant}`]:void 0!==variant,[`${rootClass}--static${(0,capitalize.A)((0,lowerCase.A)(staticColor))}`]:void 0!==staticColor,...customClasses.reduce(((a,c)=>({...a,[c]:!0})),{})})}
			id=${(0,if_defined.J)(id)}
			href=${(0,if_defined.J)(url)}
		>
			${text}
		</a>
	`},"../components/typography/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"),capitalize=__webpack_require__("../node_modules/lodash-es/capitalize.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),typography=__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/typography/index.css"),typography_default=__webpack_require__.n(typography),options={attributes:{"data-source":"processed"}};options.insert=insertBySelector_default().bind(null,"head");injectStylesIntoLinkTag_default()(typography_default(),options);const Template=({rootClass="spectrum-Typography",semantics="body",size="m",variant,weight,glyph="sans-serif",id,content=[],customClasses=[],customStyles={}})=>{Array.isArray(content)||(content=[content]);const contentLength=content.length,processedContent=lit.qy`
		${content.map((c=>{if("string"!=typeof c&&"object"==typeof c&&!c._$litType$)return Template({rootClass,semantics,size,variant,weight,glyph,id,customClasses,...c});if(void 0===semantics)return lit.qy`<div
					class=${(0,class_map.H)({"spectrum-Typography":!0,...customClasses.reduce(((a,c)=>({...a,[c]:!0})),{})})}
					id=${(0,if_defined.J)(id)}
				>
					${c}
				</div>`;rootClass=`spectrum-${(0,capitalize.A)(semantics)}`;const classes={[rootClass]:!0,[`${rootClass}--${glyph}`]:void 0!==semantics&&void 0!==glyph&&"sans-serif"!==glyph,[`${rootClass}--size${size?.toUpperCase()}`]:void 0!==semantics&&void 0!==size,[`${rootClass}--${weight}`]:void 0!==semantics&&void 0!==weight,...customClasses.reduce(((a,c)=>({...a,[c]:!0})),{})};return variant&&Array.isArray(variant)&&(["strong","emphasized"].every((i=>variant.includes(i)))?c=lit.qy`<span
						class=${(0,class_map.H)({[`${rootClass}-strong`]:!0,[`${rootClass}-emphasized`]:!0})}
						>${c}</span
					>`:variant.includes("strong")?c=lit.qy`<strong
						class=${(0,class_map.H)({[`${rootClass}-strong`]:!0})}
						>${c}</strong
					>`:variant.includes("emphasized")&&(c=lit.qy`<em
						class=${(0,class_map.H)({[`${rootClass}-emphasized`]:!0})}
						>${c}</em
					>`)),"heading"===semantics?lit.qy`
					<h2 class=${(0,class_map.H)(classes)} style=${(0,style_map.W)(customStyles)} id=${(0,if_defined.J)(id)}>${c}</h2>
				`:"body"===semantics?lit.qy`
					<p class=${(0,class_map.H)(classes)} style=${(0,style_map.W)(customStyles)} id=${(0,if_defined.J)(id)}>${c}</p>
				`:"code"===semantics?lit.qy`
					<code class=${(0,class_map.H)(classes)} style=${(0,style_map.W)(customStyles)} id=${(0,if_defined.J)(id)}>${c}</code>
				`:lit.qy`
				<span class=${(0,class_map.H)(classes)} style=${(0,style_map.W)(customStyles)} id=${(0,if_defined.J)(id)}>${c}</span>
			`}))}
	`;return lit.qy`${contentLength>1?lit.qy`<div class="spectrum-Typography" id=${(0,if_defined.J)(id)}>${processedContent}</div>`:processedContent}`}},"../node_modules/lit/directives/repeat.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{u:()=>c});var lit_html=__webpack_require__("../node_modules/lit-html/lit-html.js"),directive=__webpack_require__("../node_modules/lit-html/directive.js"),directive_helpers=__webpack_require__("../node_modules/lit-html/directive-helpers.js");const u=(e,s,t)=>{const r=new Map;for(let l=s;l<=t;l++)r.set(e[l],l);return r},c=(0,directive.u$)(class extends directive.WL{constructor(e){if(super(e),e.type!==directive.OA.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,s,t){let r;void 0===t?t=s:void 0!==s&&(r=s);const l=[],o=[];let i=0;for(const s of e)l[i]=r?r(s,i):i,o[i]=t(s,i),i++;return{values:o,keys:l}}render(e,s,t){return this.dt(e,s,t).values}update(s,[t,r,c]){const d=(0,directive_helpers.cN)(s),{values:p,keys:a}=this.dt(t,r,c);if(!Array.isArray(d))return this.ut=a,p;const h=this.ut??=[],v=[];let m,y,x=0,j=d.length-1,k=0,w=p.length-1;for(;x<=j&&k<=w;)if(null===d[x])x++;else if(null===d[j])j--;else if(h[x]===a[k])v[k]=(0,directive_helpers.lx)(d[x],p[k]),x++,k++;else if(h[j]===a[w])v[w]=(0,directive_helpers.lx)(d[j],p[w]),j--,w--;else if(h[x]===a[w])v[w]=(0,directive_helpers.lx)(d[x],p[w]),(0,directive_helpers.Dx)(s,v[w+1],d[x]),x++,w--;else if(h[j]===a[k])v[k]=(0,directive_helpers.lx)(d[j],p[k]),(0,directive_helpers.Dx)(s,d[x],d[j]),j--,k++;else if(void 0===m&&(m=u(a,k,w),y=u(h,x,j)),m.has(h[x]))if(m.has(h[j])){const e=y.get(a[k]),t=void 0!==e?d[e]:null;if(null===t){const e=(0,directive_helpers.Dx)(s,d[x]);(0,directive_helpers.lx)(e,p[k]),v[k]=e}else v[k]=(0,directive_helpers.lx)(t,p[k]),(0,directive_helpers.Dx)(s,d[x],t),d[e]=null;k++}else(0,directive_helpers.KO)(d[j]),j--;else(0,directive_helpers.KO)(d[x]),x++;for(;k<=w;){const e=(0,directive_helpers.Dx)(s,v[w+1]);(0,directive_helpers.lx)(e,p[k]),v[k++]=e}for(;x<=j;){const e=d[x++];null!==e&&(0,directive_helpers.KO)(e)}return this.ut=a,(0,directive_helpers.mY)(s,v),lit_html.c0}})},"../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}})},"../node_modules/lodash-es/lowerCase.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=(0,__webpack_require__("../node_modules/lodash-es/_createCompounder.js").A)((function(result,word,index){return result+(index?" ":"")+word.toLowerCase()}))}}]);
//# sourceMappingURL=accordion-stories-accordion-stories.f5557aa9.iframe.bundle.js.map