/*! For license information please see helptext-stories-helptext-stories.bbd08487.iframe.bundle.js.LICENSE.txt */
(globalThis.webpackChunk_spectrum_css_preview=globalThis.webpackChunk_spectrum_css_preview||[]).push([[6764],{"../components/helptext/stories/helptext.stories.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Negative:()=>Negative,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _template__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../components/helptext/stories/template.js");const __WEBPACK_DEFAULT_EXPORT__={title:"Components/Help text",description:"Help text provides either an informative description or an error message that gives more context about what a user needs to input. It’s commonly used in forms.",component:"HelpText",argTypes:{reducedMotion:{table:{disable:!0}},text:{name:"Text",type:{name:"string",required:!0},table:{type:{summary:"string"},disable:!1,category:"Component"},control:{type:"text"}},variant:{name:"Variant",type:{name:"string"},table:{type:{summary:"string"},category:"Component"},options:["neutral","negative"],control:"inline-radio"},size:{name:"Size",type:{name:"string",required:!0},table:{type:{summary:"string"},category:"Component"},options:["s","m","l","xl"],control:"select"},hideIcon:{name:"Hide icon",type:{name:"boolean"},description:"Help text using the negative variant can have an optional icon.",table:{type:{summary:"boolean"},disable:!1,category:"Component"},control:"boolean",if:{arg:"variant",eq:"negative"}},isDisabled:{name:"Disabled",type:{name:"boolean"},table:{type:{summary:"boolean"},category:"State"},control:"boolean"},customStyles:{name:"Custom styles",description:"Storybook only styles for testing the story, applied to the parent element.",table:{type:{summary:"object"},category:"Advanced"},if:{arg:"customStyles"}}},args:{rootClass:"spectrum-HelpText",text:"Create a password with at least 8 characters.",variant:"neutral",hideIcon:!1,isDisabled:!1,size:"m"},parameters:{actions:{handles:[]},status:{type:"migrated"}}},Default=_template__WEBPACK_IMPORTED_MODULE_0__.B.bind({});Default.storyName="Neutral",Default.args={};const Negative=_template__WEBPACK_IMPORTED_MODULE_0__.B.bind({});Negative.storyName="Negative",Negative.args={variant:"negative",text:"This is an example with wrapping text. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",customStyles:{"max-width":"350px"}};const __namedExportsOrder=["Default","Negative"]},"../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/helptext/index.css":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=__webpack_require__.p+"assets/css/components/helptext/index.css"},"../components/helptext/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),helptext=__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/helptext/index.css"),helptext_default=__webpack_require__.n(helptext),options={attributes:{"data-source":"processed"}};options.insert=insertBySelector_default().bind(null,"head");injectStylesIntoLinkTag_default()(helptext_default(),options);const Template=({rootClass="spectrum-HelpText",size="m",isDisabled=!1,hideIcon=!1,text,variant,id,customClasses=[],customStyles={}})=>lit.qy`
		<div
			class=${(0,class_map.H)({[rootClass]:!0,"is-disabled":isDisabled,[`${rootClass}--size${size?.toUpperCase()}`]:void 0!==size,[`${rootClass}--${variant}`]:void 0!==variant,...customClasses.reduce(((a,c)=>({...a,[c]:!0})),{})})}
			style=${(0,style_map.W)(customStyles)}
			id=${(0,if_defined.J)(id)}
		>
			${hideIcon||"negative"!=variant?"":(0,template.B)({iconName:"Alert",size,customClasses:[`${rootClass}-validationIcon`]})}
			<div class=${`${rootClass}-text`}>${text}</div>
		</div>
	`},"../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=helptext-stories-helptext-stories.bbd08487.iframe.bundle.js.map