@descope/web-components-ui 2.1.18 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/cjs/index.cjs.js +273 -249
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +8072 -8025
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/1899.js +1 -1
  6. package/dist/umd/1899.js.map +1 -1
  7. package/dist/umd/4623.js +1 -1
  8. package/dist/umd/4623.js.map +1 -1
  9. package/dist/umd/4914.js +1 -1
  10. package/dist/umd/4914.js.map +1 -1
  11. package/dist/umd/5648.js +1 -1
  12. package/dist/umd/5648.js.map +1 -1
  13. package/dist/umd/9582.js +2 -0
  14. package/dist/umd/9582.js.map +1 -0
  15. package/dist/umd/DescopeDev.js +1 -1
  16. package/dist/umd/DescopeDev.js.map +1 -1
  17. package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js +1 -1
  18. package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js.map +1 -1
  19. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
  20. package/dist/umd/boolean-fields-descope-checkbox-index-js.js.map +1 -1
  21. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
  22. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js.map +1 -1
  23. package/dist/umd/descope-alert-index-js.js +1 -1
  24. package/dist/umd/descope-alert-index-js.js.map +1 -1
  25. package/dist/umd/descope-email-field-index-js.js +1 -1
  26. package/dist/umd/descope-email-field-index-js.js.map +1 -1
  27. package/dist/umd/descope-enriched-text.js +1 -1
  28. package/dist/umd/descope-enriched-text.js.map +1 -1
  29. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
  30. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.map +1 -1
  31. package/dist/umd/descope-grid-index-js.js +1 -1
  32. package/dist/umd/descope-grid-index-js.js.map +1 -1
  33. package/dist/umd/descope-passcode-index-js.js +1 -1
  34. package/dist/umd/descope-passcode-index-js.js.map +1 -1
  35. package/dist/umd/descope-scopes-list-index-js.js +1 -1
  36. package/dist/umd/descope-scopes-list-index-js.js.map +1 -1
  37. package/dist/umd/descope-security-questions-verify-index-js.js +1 -1
  38. package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -1
  39. package/dist/umd/descope-text-field-index-js.js +1 -1
  40. package/dist/umd/descope-text-field-index-js.js.map +1 -1
  41. package/dist/umd/index.js +1 -1
  42. package/dist/umd/index.js.map +1 -1
  43. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +1 -1
  44. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.map +1 -1
  45. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
  46. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -1
  47. package/package.json +28 -28
  48. package/src/components/boolean-fields/commonStyles.js +11 -1
  49. package/src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js +32 -4
  50. package/src/components/boolean-fields/descope-checkbox/CheckboxClass.js +15 -2
  51. package/src/components/boolean-fields/descope-checkbox/index.js +1 -0
  52. package/src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js +5 -2
  53. package/src/components/boolean-fields/descope-switch-toggle/index.js +1 -0
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[7362],{3274:(e,t,s)=>{s.r(t);var i=s(41813);customElements.define(i.T,i.A)},3393:(e,t,s)=>{s.d(t,{y:()=>a});var i=s(9696),c=s(79365),n=s(81365);const a=(...e)=>(0,i.Zz)(c.XX,c._$,c.yF,c.jd)((0,n.q)(...e))},41813:(e,t,s)=>{s.d(t,{A:()=>r,T:()=>n});var i=s(3393),c=s(97810);const n=(0,c.xE)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],h=(0,i.y)({componentName:n,baseSelector:"div"}),r=class extends h{static get observedAttributes(){return["readonly"]}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper">\n\t\t\t\t<vaadin-checkbox></vaadin-checkbox>\n\t\t\t</div>\n\t\t',this.wrapperEle=this.querySelector("div"),this.checkbox=this.querySelector("vaadin-checkbox")}get value(){return this.checkbox?.checked}set value(e){this.checkbox.checked=e}get checked(){return this.value}set checked(e){this.value=e}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.checkbox.focus()}),super.init?.(),(0,c.EA)(this,this.checkbox,{includeAttrs:a}),(0,c.Gh)(this,this.checkbox,{includeAttrs:["checked"]}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(e,t,s){super.attributeChangedCallback?.(e,t,s),"readonly"===e&&this.onReadOnlyChange(null!==s)}onReadOnlyChange(e){this.baseElement.setAttribute("inert",e)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[7362],{3274:(e,t,s)=>{s.r(t);var n=s(41813);customElements.define(n.T,n.A)},3393:(e,t,s)=>{s.d(t,{y:()=>a});var n=s(9696),i=s(79365),c=s(81365);const a=(...e)=>(0,n.Zz)(i.XX,i._$,i.yF,i.jd)((0,c.q)(...e))},41813:(e,t,s)=>{s.d(t,{A:()=>h,T:()=>c});var n=s(3393),i=s(97810);const c=(0,i.xE)("boolean-field-internal"),a=["disabled","invalid","readonly"],l=(0,n.y)({componentName:c,baseSelector:"div"}),h=class extends l{static get observedAttributes(){return["readonly","label"]}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper">\n\t\t\t\t<vaadin-checkbox>\n\t\t\t\t\t<descope-enriched-text class="label-content" slot="label"></descope-enriched-text>\n\t\t\t\t</vaadin-checkbox>\n\t\t\t</div>\n\t\t',this.wrapperEle=this.querySelector("div"),this.checkbox=this.querySelector("vaadin-checkbox"),this.labelContent=this.querySelector(".label-content")}get value(){return this.checkbox?.checked}set value(e){this.checkbox.checked=e}get checked(){return this.value}set checked(e){this.value=e}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.checkbox.focus()}),super.init?.(),(0,i.EA)(this,this.checkbox,{includeAttrs:a}),(0,i.Gh)(this,this.checkbox,{includeAttrs:["checked"]}),this.labelContent.addEventListener("click",e=>{this.hasAttribute("disabled")||this.hasAttribute("readonly")||this.checkbox.click()}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(e,t,s){super.attributeChangedCallback?.(e,t,s),"readonly"===e&&this.onReadOnlyChange(null!==s),"label"===e&&this.onLabelChange()}onLabelChange(){const e=this.getAttribute("label");this.labelContent.textContent=e||""}onReadOnlyChange(e){this.baseElement.setAttribute("inert",e)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}}}]);
2
2
  //# sourceMappingURL=boolean-fields-descope-boolean-field-internal-index-js.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"boolean-fields-descope-boolean-field-internal-index-js.js","mappings":"8JAEAA,eAAeC,OAAO,IAAe,I,sECO9B,MAAMC,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,G,oECZhB,MAAMC,GAAgB,QAAiB,0BAExCC,EAAoB,CAAC,WAAY,QAAS,UAAW,YAErDC,GAAiB,OAAqB,CAAEF,gBAAeG,aAAc,QAqE3E,EAnEA,cAAmCD,EACjC,6BAAWE,GACT,MAAO,CAAC,WACV,CAEA,WAAAC,GACEC,QACAC,KAAKC,UAAY,iGAKjBD,KAAKE,WAAaF,KAAKG,cAAc,OACrCH,KAAKI,SAAWJ,KAAKG,cAAc,kBACrC,CAEA,SAAIE,GACF,OAAOL,KAAKI,UAAUE,OACxB,CAEA,SAAID,CAAME,GACRP,KAAKI,SAASE,QAAUC,CAC1B,CAEA,WAAID,GACF,OAAON,KAAKK,KACd,CAEA,WAAIC,CAAQC,GACVP,KAAKK,MAAQE,CACf,CAEA,IAAAC,GACER,KAAKS,iBAAiB,QAAUC,IAC1BA,EAAEC,WACJX,KAAKI,SAASQ,UAGlBb,MAAMS,UAEN,QAAaR,KAAMA,KAAKI,SAAU,CAAES,aAAcnB,KAClD,QAAUM,KAAMA,KAAKI,SAAU,CAAES,aAAc,CAAC,aAGhDb,KAAKc,6BAA6B,CAACd,KAAKI,UAC1C,CAEA,wBAAAW,CAAyBC,EAAUC,EAAUC,GAC3CnB,MAAMgB,2BAA2BC,EAAUC,EAAUC,GAEpC,aAAbF,GACFhB,KAAKmB,iBAA8B,OAAbD,EAE1B,CAEA,gBAAAC,CAAiBZ,GACfP,KAAKoB,YAAYC,aAAa,QAASd,EACzC,CAEA,WAAAe,GACE,OAAItB,KAAKuB,aAAevB,KAAKK,MACpB,CAAEmB,cAAc,GAElB,CAAC,CACV,E","sources":["webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/index.js","webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js"],"sourcesContent":["import BooleanFieldInternal, { componentName } from './BooleanFieldInternal';\n\ncustomElements.define(componentName, BooleanFieldInternal);\n","import { compose } from '../helpers';\nimport {\n changeMixin,\n inputEventsDispatchingMixin,\n inputValidationMixin,\n normalizeBooleanAttributesMixin,\n} from '../mixins';\nimport { createBaseClass } from './createBaseClass';\n\nexport const createBaseInputClass = (...args) =>\n compose(\n inputValidationMixin,\n changeMixin,\n normalizeBooleanAttributesMixin,\n inputEventsDispatchingMixin\n )(createBaseClass(...args));\n","import { createBaseInputClass } from '../../../baseClasses/createBaseInputClass';\nimport { forwardAttrs, getComponentName, syncAttrs } from '../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('boolean-field-internal');\n\nconst forwardAttributes = ['disabled', 'label', 'invalid', 'readonly'];\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass BooleanInputInternal extends BaseInputClass {\n static get observedAttributes() {\n return ['readonly'];\n }\n\n constructor() {\n super();\n this.innerHTML = `\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<vaadin-checkbox></vaadin-checkbox>\n\t\t\t</div>\n\t\t`;\n this.wrapperEle = this.querySelector('div');\n this.checkbox = this.querySelector('vaadin-checkbox');\n }\n\n get value() {\n return this.checkbox?.checked;\n }\n\n set value(val) {\n this.checkbox.checked = val;\n }\n\n get checked() {\n return this.value;\n }\n\n set checked(val) {\n this.value = val;\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n if (e.isTrusted) {\n this.checkbox.focus();\n }\n });\n super.init?.();\n\n forwardAttrs(this, this.checkbox, { includeAttrs: forwardAttributes });\n syncAttrs(this, this.checkbox, { includeAttrs: ['checked'] });\n\n // we need it in order to set the focus ring and trigger validation on descope-checkbox\n this.handleFocusEventsDispatching([this.checkbox]);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue !== null);\n }\n }\n\n onReadOnlyChange(val) {\n this.baseElement.setAttribute('inert', val);\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n return {};\n }\n}\n\nexport default BooleanInputInternal;\n"],"names":["customElements","define","createBaseInputClass","args","componentName","forwardAttributes","BaseInputClass","baseSelector","observedAttributes","constructor","super","this","innerHTML","wrapperEle","querySelector","checkbox","value","checked","val","init","addEventListener","e","isTrusted","focus","includeAttrs","handleFocusEventsDispatching","attributeChangedCallback","attrName","oldValue","newValue","onReadOnlyChange","baseElement","setAttribute","getValidity","isRequired","valueMissing"],"sourceRoot":""}
1
+ {"version":3,"file":"boolean-fields-descope-boolean-field-internal-index-js.js","mappings":"8JAEAA,eAAeC,OAAO,IAAe,I,sECO9B,MAAMC,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,G,oECPhB,MA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GAElB,CAAC,CACV,E","sources":["webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/index.js","webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js"],"sourcesContent":["import BooleanFieldInternal, { componentName } from './BooleanFieldInternal';\n\ncustomElements.define(componentName, BooleanFieldInternal);\n","import { compose } from '../helpers';\nimport {\n changeMixin,\n inputEventsDispatchingMixin,\n inputValidationMixin,\n normalizeBooleanAttributesMixin,\n} from '../mixins';\nimport { createBaseClass } from './createBaseClass';\n\nexport const createBaseInputClass = (...args) =>\n compose(\n inputValidationMixin,\n changeMixin,\n normalizeBooleanAttributesMixin,\n inputEventsDispatchingMixin\n )(createBaseClass(...args));\n","import { createBaseInputClass } from '../../../baseClasses/createBaseInputClass';\nimport {\n forwardAttrs,\n observeAttributes,\n getComponentName,\n syncAttrs,\n} from '../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('boolean-field-internal');\n\nconst forwardAttributes = ['disabled', 'invalid', 'readonly'];\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass BooleanInputInternal extends BaseInputClass {\n static get observedAttributes() {\n return ['readonly', 'label'];\n }\n\n constructor() {\n super();\n this.innerHTML = `\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<vaadin-checkbox>\n\t\t\t\t\t<descope-enriched-text class=\"label-content\" slot=\"label\"></descope-enriched-text>\n\t\t\t\t</vaadin-checkbox>\n\t\t\t</div>\n\t\t`;\n this.wrapperEle = this.querySelector('div');\n this.checkbox = this.querySelector('vaadin-checkbox');\n this.labelContent = this.querySelector('.label-content');\n }\n\n get value() {\n return this.checkbox?.checked;\n }\n\n set value(val) {\n this.checkbox.checked = val;\n }\n\n get checked() {\n return this.value;\n }\n\n set checked(val) {\n this.value = val;\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n if (e.isTrusted) {\n this.checkbox.focus();\n }\n });\n super.init?.();\n\n forwardAttrs(this, this.checkbox, { includeAttrs: forwardAttributes });\n syncAttrs(this, this.checkbox, { includeAttrs: ['checked'] });\n\n // Handle label click to toggle checkbox\n this.labelContent.addEventListener('click', (e) => {\n if (!this.hasAttribute('disabled') && !this.hasAttribute('readonly')) {\n this.checkbox.click();\n }\n });\n\n // we need it in order to set the focus ring and trigger validation on descope-checkbox\n this.handleFocusEventsDispatching([this.checkbox]);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue !== null);\n }\n\n if (attrName === 'label') {\n this.onLabelChange();\n }\n }\n\n onLabelChange() {\n const labelValue = this.getAttribute('label');\n if (labelValue) {\n this.labelContent.textContent = labelValue;\n } else {\n this.labelContent.textContent = '';\n }\n }\n\n onReadOnlyChange(val) {\n this.baseElement.setAttribute('inert', val);\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n return {};\n }\n}\n\nexport default BooleanInputInternal;\n"],"names":["customElements","define","createBaseInputClass","args","componentName","forwardAttributes","BaseInputClass","baseSelector","observedAttributes","constructor","super","this","innerHTML","wrapperEle","querySelector","checkbox","labelContent","value","checked","val","init","addEventListener","e","isTrusted","focus","includeAttrs","hasAttribute","click","handleFocusEventsDispatching","attributeChangedCallback","attrName","oldValue","newValue","onReadOnlyChange","onLabelChange","labelValue","getAttribute","textContent","baseElement","setAttribute","getValidity","isRequired","valueMissing"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see boolean-fields-descope-checkbox-index-js.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4838,7362],{3274:(e,t,n)=>{n.r(t);var i=n(41813);customElements.define(i.T,i.A)},3393:(e,t,n)=>{n.d(t,{y:()=>a});var i=n(9696),r=n(79365),o=n(81365);const a=(...e)=>(0,i.Zz)(r.XX,r._$,r.yF,r.jd)((0,o.q)(...e))},18330:(e,t,n)=>{n.d(t,{f:()=>r});var i=n(44099);class r extends i.r{constructor(e,t){super(e,"input","input",{initializer:(e,n)=>{n.value&&(e.value=n.value),n.type&&e.setAttribute("type",n.type),e.id=this.defaultId,"function"==typeof t&&t(e)},useUniqueId:!0})}}},19847:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(97810),r=n(41813);const o=e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${r.T}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${r.T}>\n\t\t\t`,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(r.T),this.checkbox=this.inputElement.querySelector("vaadin-checkbox"),(0,i.EA)(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),(0,i.q)(this.inputElement,this,["checked"]),(0,i.Gh)(this,this.inputElement,{includeAttrs:["checked"]})}}},41813:(e,t,n)=>{n.d(t,{A:()=>s,T:()=>o});var i=n(3393),r=n(97810);const o=(0,r.xE)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],l=(0,i.y)({componentName:o,baseSelector:"div"}),s=class extends l{static get observedAttributes(){return["readonly"]}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper">\n\t\t\t\t<vaadin-checkbox></vaadin-checkbox>\n\t\t\t</div>\n\t\t',this.wrapperEle=this.querySelector("div"),this.checkbox=this.querySelector("vaadin-checkbox")}get value(){return this.checkbox?.checked}set value(e){this.checkbox.checked=e}get checked(){return this.value}set checked(e){this.value=e}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.checkbox.focus()}),super.init?.(),(0,r.EA)(this,this.checkbox,{includeAttrs:a}),(0,r.Gh)(this,this.checkbox,{includeAttrs:["checked"]}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(e,t,n){super.attributeChangedCallback?.(e,t,n),"readonly"===e&&this.onReadOnlyChange(null!==n)}onReadOnlyChange(e){this.baseElement.setAttribute("inert",e)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}},47507:(e,t,n)=>{n.d(t,{A:()=>i});const i=`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,n(73551).X6)()}\n\n.wrapper {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n}\nvaadin-text-field {\n\tposition: relative;\n\tpadding: 0;\n\tdisplay: inline-flex;\n\talign-items: flex-start;\n}\nvaadin-text-field::before {\n content: unset;\n}\nvaadin-text-field::part(label) {\n position: absolute;\n top: 0;\n}\nvaadin-text-field::part(input-field) {\n\tpadding: 0;\n\tbackground: none;\n\tmin-height: 0;\n}\nvaadin-text-field::part(input-field)::after {\n background: none;\n}\nvaadin-text-field[focus-ring]::part(input-field) {\n\tbox-shadow: none;\n}\n\nvaadin-checkbox [slot="label"] {\n align-self: flex-start;\n padding: 0;\n}\n[required] vaadin-checkbox [slot="label"]:not(:empty) {\n\tpadding-inline-end: 1em;\n}\ndescope-boolean-field-internal {\n -webkit-mask-image: none;\n min-height: initial;\n}\n`},49582:(e,t,n)=>{n.r(t),n.d(t,{CheckboxClass:()=>i.q,componentName:()=>i.T});var i=n(64321);n(67468),n(11284),n(3274),customElements.define(i.T,i.q)},64321:(e,t,n)=>{n.d(t,{T:()=>c,q:()=>k});var i=n(97810),r=n(9696),o=n(79365),a=n(19847),l=n(47507),s=n(73551);const c=(0,i.xE)("checkbox"),{host:d,component:p,checkboxElement:h,checkboxSurface:u,checkboxLabel:b,requiredIndicator:x,helperText:y,errorMessage:f}={host:{selector:()=>":host"},requiredIndicator:{selector:'[required] vaadin-checkbox [slot="label"]:not(:empty)::after'},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxLabel:{selector:'vaadin-checkbox [slot="label"]:not(:empty)'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},k=(0,r.Zz)((0,o.RF)({mappings:{hostWidth:{...d,property:"width"},hostDirection:{...d,property:"direction"},fontSize:[d,h,b],fontFamily:[b,y,f],labelTextColor:{...b,property:"color"},labelSpacing:{...b,property:"padding-inline-start"},labelLineHeight:{...b,property:"line-height"},labelFontWeight:{...b,property:"font-weight"},labelRequiredIndicator:{...x,property:"content"},errorMessageTextColor:{...f,property:"color"},errorMessageIcon:{...f,property:"background-image"},errorMessageIconSize:{...f,property:"background-size"},errorMessageIconPadding:{...f,property:"padding-inline-start"},errorMessageIconRepeat:{...f,property:"background-repeat"},errorMessageIconPosition:{...f,property:"background-position"},errorMessageFontSize:{...f,property:"font-size"},inputValueTextColor:{...u,property:"color"},inputBackgroundColor:{...h,property:"background-color"},inputBorderRadius:{...h,property:"border-radius"},inputBorderWidth:{...h,property:"border-width"},inputBorderOffset:{...h,property:"border-offset"},inputBorderColor:{...h,property:"border-color"},inputBorderStyle:{...h,property:"border-style"},inputOutlineWidth:{...h,property:"outline-width"},inputOutlineOffset:{...h,property:"outline-offset"},inputOutlineColor:{...h,property:"outline-color"},inputOutlineStyle:{...h,property:"outline-style"},inputSize:[{...h,property:"width"},{...h,property:"height"},{...u,property:"font-size"},{...p,property:"font-size"}]}}),o.VO,(0,o.OZ)({proxyProps:["value","selectionStart"]}),o.tQ,a.A)((0,o.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${l.A}\n ${(0,s.cy)(k.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n margin: 1px;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n height: 100%;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox)::after {\n top: 0;\n left: 0;\n -webkit-text-fill-color: initial;\n }\n\n vaadin-checkbox label {\n -webkit-text-fill-color: initial;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n `,excludeAttrsSync:["label","tabindex","style"],componentName:c}))}}]);
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4838],{18330:(e,t,u)=>{u.d(t,{f:()=>i});var s=u(44099);class i extends s.r{constructor(e,t){super(e,"input","input",{initializer:(e,u)=>{u.value&&(e.value=u.value),u.type&&e.setAttribute("type",u.type),e.id=this.defaultId,"function"==typeof t&&t(e)},useUniqueId:!0})}}}}]);
3
3
  //# sourceMappingURL=boolean-fields-descope-checkbox-index-js.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"boolean-fields-descope-checkbox-index-js.js","mappings":";mKAEAA,eAAeC,OAAO,IAAe,I,sECO9B,MAAMC,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,G,kDCLhB,MAAMC,UAAwB,IACnC,WAAAC,CAAYC,EAAMC,GAChBC,MAAMF,EAAM,QAAS,QAAS,CAC5BG,YAAa,CAACC,EAAMJ,KACdA,EAAKK,QACPD,EAAKC,MAAQL,EAAKK,OAEhBL,EAAKM,MACPF,EAAKG,aAAa,OAAQP,EAAKM,MAIjCF,EAAKI,GAAKC,KAAKC,UAES,mBAAbT,GACTA,EAASG,IAGbO,aAAa,GAEjB,E,6DC3BK,MAAMC,EAAqBC,GAChC,cAAqCA,EACnC,IAAAC,GACEZ,MAAMY,SAEN,MAAMC,EAAWC,SAASC,cAAc,YACxCF,EAASG,UAAY,cACpB,oEAGE,eAGHT,KAAKU,YAAYC,YAAYL,EAASM,QAAQC,WAAU,IACxDb,KAAKc,aAAed,KAAKe,WAAWC,cAAc,KAClDhB,KAAKiB,SAAWjB,KAAKc,aAAaE,cAAc,oBAEhD,QAAahB,KAAMA,KAAKc,aAAc,CACpCI,aAAc,CACZ,WACA,aACA,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,iBAAkB,IAAK/B,EAAiBU,SAAU,gBAClDsB,iBAAkB,IAAKhC,EAAiBU,SAAU,gBAElDuB,kBAAmB,IAAKjC,EAAiBU,SAAU,iBACnDwB,mBAAoB,IAAKlC,EAAiBU,SAAU,kBACpDyB,kBAAmB,IAAKnC,EAAiBU,SAAU,iBACnD0B,kBAAmB,IAAKpC,EAAiBU,SAAU,iBAEnD2B,UAAW,CACT,IAAKrC,EAAiBU,SAAU,SAChC,IAAKV,EAAiBU,SAAU,UAChC,IAAKT,EAAiBS,SAAU,aAChC,IAAKX,EAAWW,SAAU,iBAIhC,MACA,QAAgB,CAAE4B,WAAY,CAAC,QAAS,oBACxC,KACA,IAhD2B,EAkD3B,QAAY,CACVC,MAAO,GACPC,eAAgB,oBAChBC,MAAO,IAAM,WACZ,eACG,QAAuBlC,EAAcmC,svBAwCzCC,iBAAkB,CAAC,QAAS,WAAY,SACxCjE,kB","sources":["webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/index.js","webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/booleanFieldMixin.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/commonStyles.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-checkbox/index.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-checkbox/CheckboxClass.js"],"sourcesContent":["import BooleanFieldInternal, { componentName } from './BooleanFieldInternal';\n\ncustomElements.define(componentName, BooleanFieldInternal);\n","import { compose } from '../helpers';\nimport {\n changeMixin,\n inputEventsDispatchingMixin,\n inputValidationMixin,\n normalizeBooleanAttributesMixin,\n} from '../mixins';\nimport { createBaseClass } from './createBaseClass';\n\nexport const createBaseInputClass = (...args) =>\n compose(\n inputValidationMixin,\n changeMixin,\n normalizeBooleanAttributesMixin,\n inputEventsDispatchingMixin\n )(createBaseClass(...args));\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","import { forwardAttrs, forwardProps, syncAttrs } from '../../helpers/componentHelpers';\nimport { componentName as descopeInternalComponentName } from './descope-boolean-field-internal/BooleanFieldInternal';\n\nexport const booleanFieldMixin = (superclass) =>\n class BooleanFieldMixinClass extends superclass {\n init() {\n super.init?.();\n\n const template = document.createElement('template');\n template.innerHTML = `\n\t\t\t\t<${descopeInternalComponentName}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\tslot=\"input\"\n\t\t\t\t></${descopeInternalComponentName}>\n\t\t\t`;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n this.checkbox = this.inputElement.querySelector('vaadin-checkbox');\n\n forwardAttrs(this, this.inputElement, {\n includeAttrs: [\n 'required',\n 'full-width',\n 'size',\n 'label',\n 'invalid',\n 'disabled',\n 'readonly',\n ],\n });\n\n forwardProps(this.inputElement, this, ['checked']);\n syncAttrs(this, this.inputElement, { includeAttrs: ['checked'] });\n }\n };\n","import { createBaseInputClass } from '../../../baseClasses/createBaseInputClass';\nimport { forwardAttrs, getComponentName, syncAttrs } from '../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('boolean-field-internal');\n\nconst forwardAttributes = ['disabled', 'label', 'invalid', 'readonly'];\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass BooleanInputInternal extends BaseInputClass {\n static get observedAttributes() {\n return ['readonly'];\n }\n\n constructor() {\n super();\n this.innerHTML = `\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<vaadin-checkbox></vaadin-checkbox>\n\t\t\t</div>\n\t\t`;\n this.wrapperEle = this.querySelector('div');\n this.checkbox = this.querySelector('vaadin-checkbox');\n }\n\n get value() {\n return this.checkbox?.checked;\n }\n\n set value(val) {\n this.checkbox.checked = val;\n }\n\n get checked() {\n return this.value;\n }\n\n set checked(val) {\n this.value = val;\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n if (e.isTrusted) {\n this.checkbox.focus();\n }\n });\n super.init?.();\n\n forwardAttrs(this, this.checkbox, { includeAttrs: forwardAttributes });\n syncAttrs(this, this.checkbox, { includeAttrs: ['checked'] });\n\n // we need it in order to set the focus ring and trigger validation on descope-checkbox\n this.handleFocusEventsDispatching([this.checkbox]);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue !== null);\n }\n }\n\n onReadOnlyChange(val) {\n this.baseElement.setAttribute('inert', val);\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n return {};\n }\n}\n\nexport default BooleanInputInternal;\n","import { resetInputFieldDefaultWidth } from '../../helpers/themeHelpers/resetHelpers';\n\nexport default `\n:host {\n\tdisplay: inline-flex;\n}\n\n${resetInputFieldDefaultWidth()}\n\n.wrapper {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n}\nvaadin-text-field {\n\tposition: relative;\n\tpadding: 0;\n\tdisplay: inline-flex;\n\talign-items: flex-start;\n}\nvaadin-text-field::before {\n content: unset;\n}\nvaadin-text-field::part(label) {\n position: absolute;\n top: 0;\n}\nvaadin-text-field::part(input-field) {\n\tpadding: 0;\n\tbackground: none;\n\tmin-height: 0;\n}\nvaadin-text-field::part(input-field)::after {\n background: none;\n}\nvaadin-text-field[focus-ring]::part(input-field) {\n\tbox-shadow: none;\n}\n\nvaadin-checkbox [slot=\"label\"] {\n align-self: flex-start;\n padding: 0;\n}\n[required] vaadin-checkbox [slot=\"label\"]:not(:empty) {\n\tpadding-inline-end: 1em;\n}\ndescope-boolean-field-internal {\n -webkit-mask-image: none;\n min-height: initial;\n}\n`;\n","import { componentName, CheckboxClass } from './CheckboxClass';\nimport '@vaadin/checkbox';\nimport '@vaadin/text-field';\nimport '../descope-boolean-field-internal';\n\ncustomElements.define(componentName, CheckboxClass);\n\nexport { CheckboxClass, componentName };\n","import { getComponentName } from '../../../helpers/componentHelpers';\nimport { compose } from '../../../helpers';\nimport {\n createStyleMixin,\n proxyInputMixin,\n draggableMixin,\n componentNameValidationMixin,\n createProxy,\n} from '../../../mixins';\nimport { booleanFieldMixin } from '../booleanFieldMixin';\nimport commonStyles from '../commonStyles';\nimport { useHostExternalPadding } from '../../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('checkbox');\n\nconst {\n host,\n component,\n checkboxElement,\n checkboxSurface,\n checkboxLabel,\n requiredIndicator,\n helperText,\n errorMessage,\n} = {\n host: { selector: () => ':host' },\n requiredIndicator: { selector: '[required] vaadin-checkbox [slot=\"label\"]:not(:empty)::after' },\n component: { selector: 'vaadin-checkbox' },\n checkboxElement: { selector: 'vaadin-checkbox::part(checkbox)' },\n checkboxSurface: { selector: 'vaadin-checkbox::part(checkbox)::after' },\n checkboxLabel: { selector: 'vaadin-checkbox [slot=\"label\"]:not(:empty)' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const CheckboxClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n\n fontSize: [host, checkboxElement, checkboxLabel],\n fontFamily: [checkboxLabel, helperText, errorMessage],\n\n labelTextColor: { ...checkboxLabel, property: 'color' },\n labelSpacing: { ...checkboxLabel, property: 'padding-inline-start' },\n labelLineHeight: { ...checkboxLabel, property: 'line-height' },\n labelFontWeight: { ...checkboxLabel, property: 'font-weight' },\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n inputValueTextColor: { ...checkboxSurface, property: 'color' },\n inputBackgroundColor: { ...checkboxElement, property: 'background-color' },\n\n inputBorderRadius: { ...checkboxElement, property: 'border-radius' },\n inputBorderWidth: { ...checkboxElement, property: 'border-width' },\n inputBorderOffset: { ...checkboxElement, property: 'border-offset' },\n inputBorderColor: { ...checkboxElement, property: 'border-color' },\n inputBorderStyle: { ...checkboxElement, property: 'border-style' },\n\n inputOutlineWidth: { ...checkboxElement, property: 'outline-width' },\n inputOutlineOffset: { ...checkboxElement, property: 'outline-offset' },\n inputOutlineColor: { ...checkboxElement, property: 'outline-color' },\n inputOutlineStyle: { ...checkboxElement, property: 'outline-style' },\n\n inputSize: [\n { ...checkboxElement, property: 'width' },\n { ...checkboxElement, property: 'height' },\n { ...checkboxSurface, property: 'font-size' },\n { ...component, property: 'font-size' },\n ],\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n componentNameValidationMixin,\n booleanFieldMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t${commonStyles}\n ${useHostExternalPadding(CheckboxClass.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n margin: 1px;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n height: 100%;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox)::after {\n top: 0;\n left: 0;\n -webkit-text-fill-color: initial;\n }\n\n vaadin-checkbox label {\n -webkit-text-fill-color: initial;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n `,\n excludeAttrsSync: ['label', 'tabindex', 'style'],\n componentName,\n })\n);\n"],"names":["customElements","define","createBaseInputClass","args","InputController","constructor","host","callback","super","initializer","node","value","type","setAttribute","id","this","defaultId","useUniqueId","booleanFieldMixin","superclass","init","template","document","createElement","innerHTML","baseElement","appendChild","content","cloneNode","inputElement","shadowRoot","querySelector","checkbox","includeAttrs","componentName","forwardAttributes","BaseInputClass","baseSelector","observedAttributes","wrapperEle","checked","val","addEventListener","e","isTrusted","focus","handleFocusEventsDispatching","attributeChangedCallback","attrName","oldValue","newValue","onReadOnlyChange","getValidity","isRequired","valueMissing","component","checkboxElement","checkboxSurface","checkboxLabel","requiredIndicator","helperText","errorMessage","selector","CheckboxClass","mappings","hostWidth","property","hostDirection","fontSize","fontFamily","labelTextColor","labelSpacing","labelLineHeight","labelFontWeight","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","inputValueTextColor","inputBackgroundColor","inputBorderRadius","inputBorderWidth","inputBorderOffset","inputBorderColor","inputBorderStyle","inputOutlineWidth","inputOutlineOffset","inputOutlineColor","inputOutlineStyle","inputSize","proxyProps","slots","wrappedEleName","style","cssVarList","excludeAttrsSync"],"sourceRoot":""}
1
+ {"version":3,"file":"boolean-fields-descope-checkbox-index-js.js","mappings":";yKAUO,MAAMA,UAAwB,IACnC,WAAAC,CAAYC,EAAMC,GAChBC,MAAMF,EAAM,QAAS,QAAS,CAC5BG,YAAa,CAACC,EAAMJ,KACdA,EAAKK,QACPD,EAAKC,MAAQL,EAAKK,OAEhBL,EAAKM,MACPF,EAAKG,aAAa,OAAQP,EAAKM,MAIjCF,EAAKI,GAAKC,KAAKC,UAES,mBAAbT,GACTA,EAASG,IAGbO,aAAa,GAEjB,E","sources":["webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js"],"sourcesContent":["/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n"],"names":["InputController","constructor","host","callback","super","initializer","node","value","type","setAttribute","id","this","defaultId","useUniqueId"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see boolean-fields-descope-switch-toggle-index-js.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1448,7362],{3274:(e,t,n)=>{n.r(t);var r=n(41813);customElements.define(r.T,r.A)},3393:(e,t,n)=>{n.d(t,{y:()=>a});var r=n(9696),o=n(79365),i=n(81365);const a=(...e)=>(0,r.Zz)(o.XX,o._$,o.yF,o.jd)((0,i.q)(...e))},18330:(e,t,n)=>{n.d(t,{f:()=>o});var r=n(44099);class o extends r.r{constructor(e,t){super(e,"input","input",{initializer:(e,n)=>{n.value&&(e.value=n.value),n.type&&e.setAttribute("type",n.type),e.id=this.defaultId,"function"==typeof t&&t(e)},useUniqueId:!0})}}},19847:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(97810),o=n(41813);const i=e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${o.T}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${o.T}>\n\t\t\t`,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.T),this.checkbox=this.inputElement.querySelector("vaadin-checkbox"),(0,r.EA)(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),(0,r.q)(this.inputElement,this,["checked"]),(0,r.Gh)(this,this.inputElement,{includeAttrs:["checked"]})}}},21934:(e,t,n)=>{n.r(t),n.d(t,{SwitchToggleClass:()=>r.H,componentName:()=>r.T});var r=n(83150);n(67468),n(11284),n(3274),customElements.define(r.T,r.H)},41813:(e,t,n)=>{n.d(t,{A:()=>s,T:()=>i});var r=n(3393),o=n(97810);const i=(0,o.xE)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],c=(0,r.y)({componentName:i,baseSelector:"div"}),s=class extends c{static get observedAttributes(){return["readonly"]}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper">\n\t\t\t\t<vaadin-checkbox></vaadin-checkbox>\n\t\t\t</div>\n\t\t',this.wrapperEle=this.querySelector("div"),this.checkbox=this.querySelector("vaadin-checkbox")}get value(){return this.checkbox?.checked}set value(e){this.checkbox.checked=e}get checked(){return this.value}set checked(e){this.value=e}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.checkbox.focus()}),super.init?.(),(0,o.EA)(this,this.checkbox,{includeAttrs:a}),(0,o.Gh)(this,this.checkbox,{includeAttrs:["checked"]}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(e,t,n){super.attributeChangedCallback?.(e,t,n),"readonly"===e&&this.onReadOnlyChange(null!==n)}onReadOnlyChange(e){this.baseElement.setAttribute("inert",e)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}},47507:(e,t,n)=>{n.d(t,{A:()=>r});const r=`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,n(73551).X6)()}\n\n.wrapper {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n}\nvaadin-text-field {\n\tposition: relative;\n\tpadding: 0;\n\tdisplay: inline-flex;\n\talign-items: flex-start;\n}\nvaadin-text-field::before {\n content: unset;\n}\nvaadin-text-field::part(label) {\n position: absolute;\n top: 0;\n}\nvaadin-text-field::part(input-field) {\n\tpadding: 0;\n\tbackground: none;\n\tmin-height: 0;\n}\nvaadin-text-field::part(input-field)::after {\n background: none;\n}\nvaadin-text-field[focus-ring]::part(input-field) {\n\tbox-shadow: none;\n}\n\nvaadin-checkbox [slot="label"] {\n align-self: flex-start;\n padding: 0;\n}\n[required] vaadin-checkbox [slot="label"]:not(:empty) {\n\tpadding-inline-end: 1em;\n}\ndescope-boolean-field-internal {\n -webkit-mask-image: none;\n min-height: initial;\n}\n`},83150:(e,t,n)=>{n.d(t,{H:()=>f,T:()=>l});var r=n(97810),o=n(9696),i=n(79365),a=n(19847),c=n(47507),s=n(73551);const l=(0,r.xE)("switch-toggle"),{host:d,component:p,checkboxElement:h,checkboxSurface:u,checkboxLabel:b,requiredIndicator:k,helperText:x,errorMessage:y}={host:{selector:()=>":host"},requiredIndicator:{selector:'[required] vaadin-checkbox [slot="label"]:not(:empty)::after'},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxLabel:{selector:'vaadin-checkbox [slot="label"]:not(:empty)'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},f=(0,o.Zz)((0,i.RF)({mappings:{hostWidth:{...d,property:"width"},hostDirection:{...d,property:"direction"},fontSize:[p,b,b],fontFamily:[b,x,y],labelTextColor:[{...b,property:"color"},{...b,property:"-webkit-text-fill-color"}],labelSpacing:{...b,property:"padding-inline-start"},labelLineHeight:{...b,property:"line-height"},labelFontWeight:{...b,property:"font-weight"},labelRequiredIndicator:{...k,property:"content"},errorMessageTextColor:{...y,property:"color"},errorMessageIcon:{...y,property:"background-image"},errorMessageIconSize:{...y,property:"background-size"},errorMessageIconPadding:{...y,property:"padding-inline-start"},errorMessageIconRepeat:{...y,property:"background-repeat"},errorMessageIconPosition:{...y,property:"background-position"},errorMessageFontSize:{...y,property:"font-size"},trackBorderWidth:{...h,property:"border-width"},trackBorderStyle:{...h,property:"border-style"},trackBorderColor:{...h,property:"border-color"},trackBackgroundColor:{...h,property:"background-color"},trackBorderRadius:{...h,property:"border-radius"},trackWidth:[{...h,property:"width"}],trackHeight:[{...u,property:"font-size"},{...h,property:"height"}],knobSize:[{...u,property:"width"},{...u,property:"height"}],knobTextColor:{...u,property:"color"},knobRadius:{...u,property:"border-radius"},knobTransitionDuration:{...u,property:"transition"},knobColor:{...u,property:"background-color"},knobTopOffset:{...u,property:"top"},knobLeftOffset:{...u,property:"left"},inputOutlineWidth:{...h,property:"outline-width"},inputOutlineOffset:{...h,property:"outline-offset"},inputOutlineColor:{...h,property:"outline-color"},inputOutlineStyle:{...h,property:"outline-style"}}}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"]}),i.tQ,a.A)((0,i.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${c.A}\n\t\t\t${(0,s.cy)(f.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n width: 100%;\n }\n\n vaadin-text-field::part(input-field) {\n cursor: pointer;\n }\n\n vaadin-checkbox {\n cursor: pointer;\n }\n\n vaadin-checkbox [slot="label"]:not(:empty) {\n cursor: pointer;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::before {\n content: '';\n\t\t\t}\n\n vaadin-checkbox[active]::part(checkbox) {\n\t\t\t\ttransform: none;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::after {\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 1;\n\t\t\t\tcontent: '';\n\t\t\t}\n\t\t`,excludeAttrsSync:["label","tabindex","style"],componentName:l}))}}]);
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1448,2294,4159,4838,7362,9261],{3274:(t,e,n)=>{n.r(e);var r=n(41813);customElements.define(r.T,r.A)},3393:(t,e,n)=>{n.d(e,{y:()=>s});var r=n(9696),o=n(79365),i=n(81365);const s=(...t)=>(0,r.Zz)(o.XX,o._$,o.yF,o.jd)((0,i.q)(...t))},18330:(t,e,n)=>{n.d(e,{f:()=>o});var r=n(44099);class o extends r.r{constructor(t,e){super(t,"input","input",{initializer:(t,n)=>{n.value&&(t.value=n.value),n.type&&t.setAttribute("type",n.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},19847:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(97810),o=n(41813);const i=t=>class extends t{init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t\t<${o.T}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${o.T}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.T),this.checkbox=this.inputElement.querySelector("vaadin-checkbox"),(0,r.EA)(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),(0,r.q)(this.inputElement,this,["checked"]),(0,r.Gh)(this,this.inputElement,{includeAttrs:["checked"]})}}},21934:(t,e,n)=>{n.r(e),n.d(e,{SwitchToggleClass:()=>r.H,componentName:()=>r.T});var r=n(83150);n(67468),n(11284),n(55838),n(3274),customElements.define(r.T,r.H)},36976:(t,e,n)=>{n.d(e,{M:()=>r});const r=["blockquote","list","image","table","code","hr","backticks","fence","reference","heading","lheading","html_block"]},41813:(t,e,n)=>{n.d(e,{A:()=>l,T:()=>i});var r=n(3393),o=n(97810);const i=(0,o.xE)("boolean-field-internal"),s=["disabled","invalid","readonly"],a=(0,r.y)({componentName:i,baseSelector:"div"}),l=class extends a{static get observedAttributes(){return["readonly","label"]}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper">\n\t\t\t\t<vaadin-checkbox>\n\t\t\t\t\t<descope-enriched-text class="label-content" slot="label"></descope-enriched-text>\n\t\t\t\t</vaadin-checkbox>\n\t\t\t</div>\n\t\t',this.wrapperEle=this.querySelector("div"),this.checkbox=this.querySelector("vaadin-checkbox"),this.labelContent=this.querySelector(".label-content")}get value(){return this.checkbox?.checked}set value(t){this.checkbox.checked=t}get checked(){return this.value}set checked(t){this.value=t}init(){this.addEventListener("focus",t=>{t.isTrusted&&this.checkbox.focus()}),super.init?.(),(0,o.EA)(this,this.checkbox,{includeAttrs:s}),(0,o.Gh)(this,this.checkbox,{includeAttrs:["checked"]}),this.labelContent.addEventListener("click",t=>{this.hasAttribute("disabled")||this.hasAttribute("readonly")||this.checkbox.click()}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),"readonly"===t&&this.onReadOnlyChange(null!==n),"label"===t&&this.onLabelChange()}onLabelChange(){const t=this.getAttribute("label");this.labelContent.textContent=t||""}onReadOnlyChange(t){this.baseElement.setAttribute("inert",t)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}},47507:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(76231),o=n(73551);const i=t=>`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,o.X6)()}\n\n.wrapper {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n}\nvaadin-text-field {\n\tposition: relative;\n\tpadding: 0;\n\tdisplay: inline-flex;\n\talign-items: flex-start;\n}\nvaadin-text-field::before {\n content: unset;\n}\nvaadin-text-field::part(label) {\n position: absolute;\n top: 0;\n}\nvaadin-text-field::part(input-field) {\n\tpadding: 0;\n\tbackground: none;\n\tmin-height: 0;\n}\nvaadin-text-field::part(input-field)::after {\n background: none;\n}\nvaadin-text-field[focus-ring]::part(input-field) {\n\tbox-shadow: none;\n}\n\nvaadin-checkbox [slot="label"] {\n align-self: flex-start;\n padding: 0;\n}\n[required] vaadin-checkbox [slot="label"]:not(:empty) {\n\tpadding-inline-end: 1em;\n}\ndescope-boolean-field-internal {\n -webkit-mask-image: none;\n min-height: initial;\n}\n\ndescope-enriched-text[empty] {\n\t${r.m.cssVarList.hostDisplay}: none;\n}\n\ndescope-enriched-text {\n\t${r.m.cssVarList.hostDirection}: var(${t.hostDirection});\n}\n\n`},54847:(t,e,n)=>{n.d(e,{G:()=>r});const r=t=>{const e=document.createElement("textarea");return e.innerHTML=t,e.value}},55838:(t,e,n)=>{n.r(e),n.d(e,{EnrichedTextClass:()=>r.m,componentName:()=>r.T}),n(74778);var r=n(76231);customElements.define(r.T,r.m)},63595:(t,e,n)=>{n.r(e),n.d(e,{TextClass:()=>r.s,componentName:()=>r.T});var r=n(66434);customElements.define(r.T,r.s)},66434:(t,e,n)=>{n.d(e,{T:()=>a,s:()=>d});var r=n(88961),o=n(63200),i=n(25964),s=n(72270);const a=(0,i.xE)("text");class l extends((0,s.qu)({componentName:a,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,i.fz)("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,i.Ge)(this,()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""})}}const{host:c}={host:{selector:()=>":host"}},d=(0,o.Zz)((0,r.RF)({mappings:{hostWidth:{...c,property:"width"},hostDirection:{...c,property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),r.VO,r.tQ)(l)},74778:(t,e,n)=>{n.r(e),n.d(e,{LinkClass:()=>m,componentName:()=>l});var r=n(88961),o=n(63200),i=n(25964),s=n(72270),a=n(66434);const l=(0,i.xE)("link");class c extends((0,s.qu)({componentName:l,baseSelector:":host a"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t<div>\n\t\t\t<descope-text part="wrapper">\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t',(0,i.fz)('\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n\n :host([ellipsis="true"]) descope-text {\n display: inline-flex;\n }\n :host([ellipsis="true"]) descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ',this),(0,i.EA)(this,this.shadowRoot.querySelector("a"),{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),(0,i.EA)(this,this.shadowRoot.querySelector("descope-text"),{includeAttrs:["mode","variant"]})}}const d={host:{selector:()=>":host"},link:{selector:()=>":host a"},anchor:{},wrapper:{selector:()=>":host > div"},text:{selector:()=>a.s.componentName}},{anchor:p,text:h,host:u,wrapper:b,link:k}=d,m=(0,o.Zz)((0,r.RF)({mappings:{hostWidth:{...u,property:"width"},hostDirection:{...h,property:"direction"},textAlign:b,textDecoration:{...k,property:"text-decoration",fallback:"none"},textColor:[{...p,property:"color"},{...h,property:a.s.cssVarList.textColor}],cursor:p}}),r.VO,r.tQ)(c);n(63595),customElements.define(l,m)},76231:(t,e,n)=>{n.d(e,{T:()=>d,m:()=>h});var r=n(92540),o=n(88961),i=n(63200),s=n(36976),a=n(72270),l=n(54847),c=n(25964);const d=(0,c.xE)("enriched-text");class p extends((0,a.qu)({componentName:d,baseSelector:":host > div"})){#t;#e;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="content"></div>\n ',(0,c.fz)("\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n ",this),this.#n(),(0,c.Ge)(this,this.#r.bind(this))}static get observedAttributes(){return["readonly","link-target-blank"]}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),n!==e&&("readonly"===t&&this.onReadOnlyChange("true"===n),"link-target-blank"===t&&this.#n())}customUnderlineRenderer(){this.processor.renderer.rules.em_open=(t,e,n,r,o)=>("_"===t[e].markup&&(t[e].tag="u"),this.#e(t,e,n,r,o)),this.processor.renderer.rules.em_close=(t,e,n,r,o)=>("_"===t[e].markup&&(t[e].tag="u"),this.#e(t,e,n,r,o))}#o(){this.linkTargetBlank?this.processor.renderer.rules.link_open=(t,e,n,r,o)=>(t[e].attrSet("target","_blank"),this.#t(t,e,n,r,o)):this.processor.renderer.rules.link_open=this.#t}#i(){this.processor&&this.processor.disable(s.M)}#s(){this.#i()}#a(){this.#t=this.processor.renderer.rules.link_open||((t,e,n,r,o)=>o.renderToken(t,e,n)),this.#e=this.processor.renderer.rules.em_open||((t,e,n,r,o)=>o.renderToken(t,e,n))}#n(){this.processor=new r.A("commonmark",{html:!0}),this.#a(),this.#s(),this.#o(),this.customUnderlineRenderer()}get linkTargetBlank(){return"true"===this.getAttribute("link-target-blank")}get contentNode(){return this.shadowRoot.querySelector(".content")}#r(){if(!this.processor)return;let t=(0,l.G)(this.innerHTML);!t?.trim()&&this.isConnected?this.setAttribute("empty","true"):this.removeAttribute("empty");try{const e=this.processor.parse(t,{references:void 0});t=this.processor.renderer.render(e,{html:!0,breaks:!0})}catch(t){console.warn("Not parsing invalid markdown token")}this.contentNode.innerHTML=t,this.contentNode.firstChild?.setAttribute("part","content")}onReadOnlyChange(t){t?this.contentNode.setAttribute("inert",t):this.contentNode.removeAttribute("inert")}}const h=(0,i.Zz)((0,o.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDisplay:{selector:()=>":host",property:"display",fallback:"inline-block"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},fontWeightBold:[{selector:()=>":host strong",property:"font-weight"},{selector:()=>":host b",property:"font-weight"}],textColor:{property:"color"},textLineHeight:{property:"line-height"},textAlign:{},linkColor:{selector:"a",property:"color"},linkTextDecoration:{selector:"a",property:"text-decoration"},linkHoverTextDecoration:{selector:"a:hover",property:"text-decoration"},minHeight:{},minWidth:{}}}),(0,o.RF)({componentNameOverride:(0,c.xE)("link")}),(0,o.RF)({componentNameOverride:(0,c.xE)("text")}),o.VO,o.tQ)(p)},83150:(t,e,n)=>{n.d(e,{H:()=>y,T:()=>c}),n(76231);var r=n(97810),o=n(9696),i=n(79365),s=n(19847),a=n(47507),l=n(73551);const c=(0,r.xE)("switch-toggle"),{host:d,component:p,checkboxElement:h,checkboxSurface:u,checkboxLabel:b,requiredIndicator:k,helperText:m,errorMessage:x}={host:{selector:()=>":host"},requiredIndicator:{selector:'[required] vaadin-checkbox [slot="label"]:not(:empty)::part(content)::after'},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxLabel:{selector:'vaadin-checkbox [slot="label"]:not(:empty)'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},y=(0,o.Zz)((0,i.RF)({mappings:{hostWidth:{...d,property:"width"},hostDirection:{...d,property:"direction"},fontSize:[p,b,b],fontFamily:[b,m,x],labelTextColor:[{...b,property:"color"},{...b,property:"-webkit-text-fill-color"}],labelSpacing:{...b,property:"padding-inline-start"},labelLineHeight:{...b,property:"line-height"},labelFontWeight:{...b,property:"font-weight"},labelRequiredIndicator:{...k,property:"content"},errorMessageTextColor:{...x,property:"color"},errorMessageIcon:{...x,property:"background-image"},errorMessageIconSize:{...x,property:"background-size"},errorMessageIconPadding:{...x,property:"padding-inline-start"},errorMessageIconRepeat:{...x,property:"background-repeat"},errorMessageIconPosition:{...x,property:"background-position"},errorMessageFontSize:{...x,property:"font-size"},trackBorderWidth:{...h,property:"border-width"},trackBorderStyle:{...h,property:"border-style"},trackBorderColor:{...h,property:"border-color"},trackBackgroundColor:{...h,property:"background-color"},trackBorderRadius:{...h,property:"border-radius"},trackWidth:[{...h,property:"width"}],trackHeight:[{...u,property:"font-size"},{...h,property:"height"}],knobSize:[{...u,property:"width"},{...u,property:"height"}],knobTextColor:{...u,property:"color"},knobRadius:{...u,property:"border-radius"},knobTransitionDuration:{...u,property:"transition"},knobColor:{...u,property:"background-color"},knobTopOffset:{...u,property:"top"},knobLeftOffset:{...u,property:"left"},inputOutlineWidth:{...h,property:"outline-width"},inputOutlineOffset:{...h,property:"outline-offset"},inputOutlineColor:{...h,property:"outline-color"},inputOutlineStyle:{...h,property:"outline-style"}}}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"]}),i.tQ,s.A)((0,i.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${(0,a.A)(y.cssVarList)}\n\t\t\t${(0,l.cy)(y.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n width: 100%;\n }\n\n vaadin-text-field::part(input-field) {\n cursor: pointer;\n }\n\n vaadin-checkbox {\n cursor: pointer;\n }\n\n vaadin-checkbox [slot="label"]:not(:empty) {\n cursor: pointer;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::before {\n content: '';\n\t\t\t}\n\n vaadin-checkbox[active]::part(checkbox) {\n\t\t\t\ttransform: none;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::after {\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 1;\n\t\t\t\tcontent: '';\n\t\t\t}\n\t\t`,excludeAttrsSync:["label","tabindex","style"],componentName:c}))}}]);
3
3
  //# sourceMappingURL=boolean-fields-descope-switch-toggle-index-js.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"boolean-fields-descope-switch-toggle-index-js.js","mappings":";mKAEAA,eAAeC,OAAO,IAAe,I,sECO9B,MAAMC,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,G,kDCLhB,MAAMC,UAAwB,IACnC,WAAAC,CAAYC,EAAMC,GAChBC,MAAMF,EAAM,QAAS,QAAS,CAC5BG,YAAa,CAACC,EAAMJ,KACdA,EAAKK,QACPD,EAAKC,MAAQL,EAAKK,OAEhBL,EAAKM,MACPF,EAAKG,aAAa,OAAQP,EAAKM,MAIjCF,EAAKI,GAAKC,KAAKC,UAES,mBAAbT,GACTA,EAASG,IAGbO,aAAa,GAEjB,E,6DC3BK,MAAMC,EAAqBC,GAChC,cAAqCA,EACnC,IAAAC,GACEZ,MAAMY,SAEN,MAAMC,EAAWC,SAASC,cAAc,YACxCF,EAASG,UAAY,cACpB,oEAGE,eAGHT,KAAKU,YAAYC,YAAYL,EAASM,QAAQC,WAAU,IACxDb,KAAKc,aAAed,KAAKe,WAAWC,cAAc,KAClDhB,KAAKiB,SAAWjB,KAAKc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B,IAAK7B,EAAOW,SAAU,gBACxCmB,qBAAsB,IAAK9B,EAAOW,SAAU,oBAC5CoB,kBAAmB,IAAK/B,EAAOW,SAAU,iBACzCqB,WAAY,CAAC,IAAKhC,EAAOW,SAAU,UACnCsB,YAAa,CACX,IAAK/B,EAAMS,SAAU,aACrB,IAAKX,EAAOW,SAAU,WAGxBuB,SAAU,CACR,IAAKhC,EAAMS,SAAU,SACrB,IAAKT,EAAMS,SAAU,WAEvBwB,cAAe,IAAKjC,EAAMS,SAAU,SACpCyB,WAAY,IAAKlC,EAAMS,SAAU,iBACjC0B,uBAAwB,IAAKnC,EAAMS,SAAU,cAC7C2B,UAAW,IAAKpC,EAAMS,SAAU,oBAChC4B,cAAe,IAAKrC,EAAMS,SAAU,OACpC6B,eAAgB,IAAKtC,EAAMS,SAAU,QAErC8B,kBAAmB,IAAKzC,EAAOW,SAAU,iBACzC+B,mBAAoB,IAAK1C,EAAOW,SAAU,kBAC1CgC,kBAAmB,IAAK3C,EAAOW,SAAU,iBACzCiC,kBAAmB,IAAK5C,EAAOW,SAAU,oBAG7C,MACA,QAAgB,CAAEkC,WAAY,CAAC,QAAS,oBACxC,KACA,IA1D+B,EA4D/B,QAAY,CACVC,MAAO,GACPC,eAAgB,oBAChBC,MAAO,IAAM,WACZ,eACA,QAAuBxC,EAAkByC,+/BAsD1CC,iBAAkB,CAAC,QAAS,WAAY,SACxCzE,kB","sources":["webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/index.js","webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/booleanFieldMixin.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-switch-toggle/index.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/commonStyles.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js"],"sourcesContent":["import BooleanFieldInternal, { componentName } from './BooleanFieldInternal';\n\ncustomElements.define(componentName, BooleanFieldInternal);\n","import { compose } from '../helpers';\nimport {\n changeMixin,\n inputEventsDispatchingMixin,\n inputValidationMixin,\n normalizeBooleanAttributesMixin,\n} from '../mixins';\nimport { createBaseClass } from './createBaseClass';\n\nexport const createBaseInputClass = (...args) =>\n compose(\n inputValidationMixin,\n changeMixin,\n normalizeBooleanAttributesMixin,\n inputEventsDispatchingMixin\n )(createBaseClass(...args));\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","import { forwardAttrs, forwardProps, syncAttrs } from '../../helpers/componentHelpers';\nimport { componentName as descopeInternalComponentName } from './descope-boolean-field-internal/BooleanFieldInternal';\n\nexport const booleanFieldMixin = (superclass) =>\n class BooleanFieldMixinClass extends superclass {\n init() {\n super.init?.();\n\n const template = document.createElement('template');\n template.innerHTML = `\n\t\t\t\t<${descopeInternalComponentName}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\tslot=\"input\"\n\t\t\t\t></${descopeInternalComponentName}>\n\t\t\t`;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n this.checkbox = this.inputElement.querySelector('vaadin-checkbox');\n\n forwardAttrs(this, this.inputElement, {\n includeAttrs: [\n 'required',\n 'full-width',\n 'size',\n 'label',\n 'invalid',\n 'disabled',\n 'readonly',\n ],\n });\n\n forwardProps(this.inputElement, this, ['checked']);\n syncAttrs(this, this.inputElement, { includeAttrs: ['checked'] });\n }\n };\n","import { componentName, SwitchToggleClass } from './SwitchToggleClass';\nimport '@vaadin/checkbox';\nimport '@vaadin/text-field';\nimport '../descope-boolean-field-internal';\n\ncustomElements.define(componentName, SwitchToggleClass);\n\nexport { SwitchToggleClass, componentName };\n","import { createBaseInputClass } from '../../../baseClasses/createBaseInputClass';\nimport { forwardAttrs, getComponentName, syncAttrs } from '../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('boolean-field-internal');\n\nconst forwardAttributes = ['disabled', 'label', 'invalid', 'readonly'];\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass BooleanInputInternal extends BaseInputClass {\n static get observedAttributes() {\n return ['readonly'];\n }\n\n constructor() {\n super();\n this.innerHTML = `\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<vaadin-checkbox></vaadin-checkbox>\n\t\t\t</div>\n\t\t`;\n this.wrapperEle = this.querySelector('div');\n this.checkbox = this.querySelector('vaadin-checkbox');\n }\n\n get value() {\n return this.checkbox?.checked;\n }\n\n set value(val) {\n this.checkbox.checked = val;\n }\n\n get checked() {\n return this.value;\n }\n\n set checked(val) {\n this.value = val;\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n if (e.isTrusted) {\n this.checkbox.focus();\n }\n });\n super.init?.();\n\n forwardAttrs(this, this.checkbox, { includeAttrs: forwardAttributes });\n syncAttrs(this, this.checkbox, { includeAttrs: ['checked'] });\n\n // we need it in order to set the focus ring and trigger validation on descope-checkbox\n this.handleFocusEventsDispatching([this.checkbox]);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue !== null);\n }\n }\n\n onReadOnlyChange(val) {\n this.baseElement.setAttribute('inert', val);\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n return {};\n }\n}\n\nexport default BooleanInputInternal;\n","import { resetInputFieldDefaultWidth } from '../../helpers/themeHelpers/resetHelpers';\n\nexport default `\n:host {\n\tdisplay: inline-flex;\n}\n\n${resetInputFieldDefaultWidth()}\n\n.wrapper {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n}\nvaadin-text-field {\n\tposition: relative;\n\tpadding: 0;\n\tdisplay: inline-flex;\n\talign-items: flex-start;\n}\nvaadin-text-field::before {\n content: unset;\n}\nvaadin-text-field::part(label) {\n position: absolute;\n top: 0;\n}\nvaadin-text-field::part(input-field) {\n\tpadding: 0;\n\tbackground: none;\n\tmin-height: 0;\n}\nvaadin-text-field::part(input-field)::after {\n background: none;\n}\nvaadin-text-field[focus-ring]::part(input-field) {\n\tbox-shadow: none;\n}\n\nvaadin-checkbox [slot=\"label\"] {\n align-self: flex-start;\n padding: 0;\n}\n[required] vaadin-checkbox [slot=\"label\"]:not(:empty) {\n\tpadding-inline-end: 1em;\n}\ndescope-boolean-field-internal {\n -webkit-mask-image: none;\n min-height: initial;\n}\n`;\n","import { getComponentName } from '../../../helpers/componentHelpers';\nimport { compose } from '../../../helpers';\nimport {\n createStyleMixin,\n proxyInputMixin,\n draggableMixin,\n componentNameValidationMixin,\n createProxy,\n} from '../../../mixins';\nimport { booleanFieldMixin } from '../booleanFieldMixin';\nimport commonStyles from '../commonStyles';\nimport { useHostExternalPadding } from '../../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('switch-toggle');\n\nconst {\n host,\n component,\n checkboxElement: track,\n checkboxSurface: knob,\n checkboxLabel,\n requiredIndicator,\n helperText,\n errorMessage,\n} = {\n host: { selector: () => ':host' },\n requiredIndicator: { selector: '[required] vaadin-checkbox [slot=\"label\"]:not(:empty)::after' },\n component: { selector: 'vaadin-checkbox' },\n checkboxElement: { selector: 'vaadin-checkbox::part(checkbox)' },\n checkboxSurface: { selector: 'vaadin-checkbox::part(checkbox)::after' },\n checkboxLabel: { selector: 'vaadin-checkbox [slot=\"label\"]:not(:empty)' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const SwitchToggleClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n\n fontSize: [component, checkboxLabel, checkboxLabel],\n fontFamily: [checkboxLabel, helperText, errorMessage],\n\n labelTextColor: [\n { ...checkboxLabel, property: 'color' },\n { ...checkboxLabel, property: '-webkit-text-fill-color' },\n ],\n labelSpacing: { ...checkboxLabel, property: 'padding-inline-start' },\n labelLineHeight: { ...checkboxLabel, property: 'line-height' },\n labelFontWeight: { ...checkboxLabel, property: 'font-weight' },\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n trackBorderWidth: { ...track, property: 'border-width' },\n trackBorderStyle: { ...track, property: 'border-style' },\n trackBorderColor: { ...track, property: 'border-color' },\n trackBackgroundColor: { ...track, property: 'background-color' },\n trackBorderRadius: { ...track, property: 'border-radius' },\n trackWidth: [{ ...track, property: 'width' }],\n trackHeight: [\n { ...knob, property: 'font-size' },\n { ...track, property: 'height' },\n ],\n\n knobSize: [\n { ...knob, property: 'width' },\n { ...knob, property: 'height' },\n ],\n knobTextColor: { ...knob, property: 'color' },\n knobRadius: { ...knob, property: 'border-radius' },\n knobTransitionDuration: { ...knob, property: 'transition' },\n knobColor: { ...knob, property: 'background-color' },\n knobTopOffset: { ...knob, property: 'top' },\n knobLeftOffset: { ...knob, property: 'left' },\n\n inputOutlineWidth: { ...track, property: 'outline-width' },\n inputOutlineOffset: { ...track, property: 'outline-offset' },\n inputOutlineColor: { ...track, property: 'outline-color' },\n inputOutlineStyle: { ...track, property: 'outline-style' },\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n componentNameValidationMixin,\n booleanFieldMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t${commonStyles}\n\t\t\t${useHostExternalPadding(SwitchToggleClass.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n width: 100%;\n }\n\n vaadin-text-field::part(input-field) {\n cursor: pointer;\n }\n\n vaadin-checkbox {\n cursor: pointer;\n }\n\n vaadin-checkbox [slot=\"label\"]:not(:empty) {\n cursor: pointer;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::before {\n content: '';\n\t\t\t}\n\n vaadin-checkbox[active]::part(checkbox) {\n\t\t\t\ttransform: none;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::after {\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 1;\n\t\t\t\tcontent: '';\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['label', 'tabindex', 'style'],\n componentName,\n })\n);\n"],"names":["customElements","define","createBaseInputClass","args","InputController","constructor","host","callback","super","initializer","node","value","type","setAttribute","id","this","defaultId","useUniqueId","booleanFieldMixin","superclass","init","template","document","createElement","innerHTML","baseElement","appendChild","content","cloneNode","inputElement","shadowRoot","querySelector","checkbox","includeAttrs","componentName","forwardAttributes","BaseInputClass","baseSelector","observedAttributes","wrapperEle","checked","val","addEventListener","e","isTrusted","focus","handleFocusEventsDispatching","attributeChangedCallback","attrName","oldValue","newValue","onReadOnlyChange","getValidity","isRequired","valueMissing","component","checkboxElement","track","checkboxSurface","knob","checkboxLabel","requiredIndicator","helperText","errorMessage","selector","SwitchToggleClass","mappings","hostWidth","property","hostDirection","fontSize","fontFamily","labelTextColor","labelSpacing","labelLineHeight","labelFontWeight","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","trackBorderWidth","trackBorderStyle","trackBorderColor","trackBackgroundColor","trackBorderRadius","trackWidth","trackHeight","knobSize","knobTextColor","knobRadius","knobTransitionDuration","knobColor","knobTopOffset","knobLeftOffset","inputOutlineWidth","inputOutlineOffset","inputOutlineColor","inputOutlineStyle","proxyProps","slots","wrappedEleName","style","cssVarList","excludeAttrsSync"],"sourceRoot":""}
1
+ {"version":3,"file":"boolean-fields-descope-switch-toggle-index-js.js","mappings":";uLAEAA,eAAeC,OAAO,IAAe,I,sECO9B,MAAMC,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,G,kDCLhB,MAAMC,UAAwB,IACnC,WAAAC,CAAYC,EAAMC,GAChBC,MAAMF,EAAM,QAAS,QAAS,CAC5BG,YAAa,CAACC,EAAMJ,KACdA,EAAKK,QACPD,EAAKC,MAAQL,EAAKK,OAEhBL,EAAKM,MACPF,EAAKG,aAAa,OAAQP,EAAKM,MAIjCF,EAAKI,GAAKC,KAAKC,UAES,mBAAbT,GACTA,EAASG,IAGbO,aAAa,GAEjB,E,6DC3BK,MAAMC,EAAqBC,GAChC,cAAqCA,EACnC,IAAAC,GACEZ,MAAMY,SAEN,MAAMC,EAAWC,SAASC,cAAc,YACxCF,EAASG,UAAY,cACpB,oEAGE,eAGHT,KAAKU,YAAYC,YAAYL,EAASM,QAAQC,WAAU,IACxDb,KAAK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,EAAOtE,SAAU,oBAG7C,MACA,QAAgB,CAAE4G,WAAY,CAAC,QAAS,oBACxC,KACA,IA1D+B,EA4D/B,QAAY,CACVC,MAAO,GACPC,eAAgB,oBAChBpH,MAAO,IAAM,YACZ,OAAamF,EAAkBhG,uBAC/B,QAAuBgG,EAAkBhG,+/BAsD1CkI,iBAAkB,CAAC,QAAS,WAAY,SACxC9J,kB","sources":["webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/index.js","webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/booleanFieldMixin.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-switch-toggle/index.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/consts.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/commonStyles.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/LinkClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/EnrichedTextClass.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js"],"sourcesContent":["import BooleanFieldInternal, { componentName } from './BooleanFieldInternal';\n\ncustomElements.define(componentName, BooleanFieldInternal);\n","import { compose } from '../helpers';\nimport {\n changeMixin,\n inputEventsDispatchingMixin,\n inputValidationMixin,\n normalizeBooleanAttributesMixin,\n} from '../mixins';\nimport { createBaseClass } from './createBaseClass';\n\nexport const createBaseInputClass = (...args) =>\n compose(\n inputValidationMixin,\n changeMixin,\n normalizeBooleanAttributesMixin,\n inputEventsDispatchingMixin\n )(createBaseClass(...args));\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","import { forwardAttrs, forwardProps, syncAttrs } from '../../helpers/componentHelpers';\nimport { componentName as descopeInternalComponentName } from './descope-boolean-field-internal/BooleanFieldInternal';\n\nexport const booleanFieldMixin = (superclass) =>\n class BooleanFieldMixinClass extends superclass {\n init() {\n super.init?.();\n\n const template = document.createElement('template');\n template.innerHTML = `\n\t\t\t\t<${descopeInternalComponentName}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\tslot=\"input\"\n\t\t\t\t></${descopeInternalComponentName}>\n\t\t\t`;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n this.checkbox = this.inputElement.querySelector('vaadin-checkbox');\n\n forwardAttrs(this, this.inputElement, {\n includeAttrs: [\n 'required',\n 'full-width',\n 'size',\n 'label',\n 'invalid',\n 'disabled',\n 'readonly',\n ],\n });\n\n forwardProps(this.inputElement, this, ['checked']);\n syncAttrs(this, this.inputElement, { includeAttrs: ['checked'] });\n }\n };\n","import { componentName, SwitchToggleClass } from './SwitchToggleClass';\nimport '@vaadin/checkbox';\nimport '@vaadin/text-field';\nimport '@descope-ui/descope-enriched-text';\nimport '../descope-boolean-field-internal';\n\ncustomElements.define(componentName, SwitchToggleClass);\n\nexport { SwitchToggleClass, componentName };\n","export const disableRules = [\n 'blockquote',\n 'list',\n 'image',\n 'table',\n 'code',\n 'hr',\n 'backticks',\n 'fence',\n 'reference',\n 'heading',\n 'lheading',\n 'html_block',\n];\n","import { createBaseInputClass } from '../../../baseClasses/createBaseInputClass';\nimport {\n forwardAttrs,\n observeAttributes,\n getComponentName,\n syncAttrs,\n} from '../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('boolean-field-internal');\n\nconst forwardAttributes = ['disabled', 'invalid', 'readonly'];\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass BooleanInputInternal extends BaseInputClass {\n static get observedAttributes() {\n return ['readonly', 'label'];\n }\n\n constructor() {\n super();\n this.innerHTML = `\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<vaadin-checkbox>\n\t\t\t\t\t<descope-enriched-text class=\"label-content\" slot=\"label\"></descope-enriched-text>\n\t\t\t\t</vaadin-checkbox>\n\t\t\t</div>\n\t\t`;\n this.wrapperEle = this.querySelector('div');\n this.checkbox = this.querySelector('vaadin-checkbox');\n this.labelContent = this.querySelector('.label-content');\n }\n\n get value() {\n return this.checkbox?.checked;\n }\n\n set value(val) {\n this.checkbox.checked = val;\n }\n\n get checked() {\n return this.value;\n }\n\n set checked(val) {\n this.value = val;\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n if (e.isTrusted) {\n this.checkbox.focus();\n }\n });\n super.init?.();\n\n forwardAttrs(this, this.checkbox, { includeAttrs: forwardAttributes });\n syncAttrs(this, this.checkbox, { includeAttrs: ['checked'] });\n\n // Handle label click to toggle checkbox\n this.labelContent.addEventListener('click', (e) => {\n if (!this.hasAttribute('disabled') && !this.hasAttribute('readonly')) {\n this.checkbox.click();\n }\n });\n\n // we need it in order to set the focus ring and trigger validation on descope-checkbox\n this.handleFocusEventsDispatching([this.checkbox]);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue !== null);\n }\n\n if (attrName === 'label') {\n this.onLabelChange();\n }\n }\n\n onLabelChange() {\n const labelValue = this.getAttribute('label');\n if (labelValue) {\n this.labelContent.textContent = labelValue;\n } else {\n this.labelContent.textContent = '';\n }\n }\n\n onReadOnlyChange(val) {\n this.baseElement.setAttribute('inert', val);\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n return {};\n }\n}\n\nexport default BooleanInputInternal;\n","import { EnrichedTextClass } from '@descope-ui/descope-enriched-text/class';\nimport { resetInputFieldDefaultWidth } from '../../helpers/themeHelpers/resetHelpers';\n\nexport default (cssVarList) => `\n:host {\n\tdisplay: inline-flex;\n}\n\n${resetInputFieldDefaultWidth()}\n\n.wrapper {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n}\nvaadin-text-field {\n\tposition: relative;\n\tpadding: 0;\n\tdisplay: inline-flex;\n\talign-items: flex-start;\n}\nvaadin-text-field::before {\n content: unset;\n}\nvaadin-text-field::part(label) {\n position: absolute;\n top: 0;\n}\nvaadin-text-field::part(input-field) {\n\tpadding: 0;\n\tbackground: none;\n\tmin-height: 0;\n}\nvaadin-text-field::part(input-field)::after {\n background: none;\n}\nvaadin-text-field[focus-ring]::part(input-field) {\n\tbox-shadow: none;\n}\n\nvaadin-checkbox [slot=\"label\"] {\n align-self: flex-start;\n padding: 0;\n}\n[required] vaadin-checkbox [slot=\"label\"]:not(:empty) {\n\tpadding-inline-end: 1em;\n}\ndescope-boolean-field-internal {\n -webkit-mask-image: none;\n min-height: initial;\n}\n\ndescope-enriched-text[empty] {\n\t${EnrichedTextClass.cssVarList.hostDisplay}: none;\n}\n\ndescope-enriched-text {\n\t${EnrichedTextClass.cssVarList.hostDirection}: var(${cssVarList.hostDirection});\n}\n\n`;\n","export const decodeHTML = (html) => {\n const textArea = document.createElement('textarea');\n textArea.innerHTML = html;\n return textArea.value;\n};\n","import '@descope-ui/descope-link';\n\nimport { componentName, EnrichedTextClass } from './EnrichedTextClass';\n\ncustomElements.define(componentName, EnrichedTextClass);\n\nexport { EnrichedTextClass, componentName };\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(`\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `, this);\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' }\n}\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n textColor: [\n { property: 'color' }\n ],\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n forwardAttrs,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { TextClass } from '@descope-ui/descope-text/class';\n\nexport const componentName = getComponentName('link');\n\nclass RawLink extends createBaseClass({ componentName, baseSelector: ':host a' }) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<div>\n\t\t\t<descope-text part=\"wrapper\">\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n\n :host([ellipsis=\"true\"]) descope-text {\n display: inline-flex;\n }\n :host([ellipsis=\"true\"]) descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n `,\n this\n );\n\n forwardAttrs(this, this.shadowRoot.querySelector('a'), {\n includeAttrs: ['href', 'target', 'tooltip'],\n mapAttrs: {\n tooltip: 'title',\n },\n });\n\n forwardAttrs(this, this.shadowRoot.querySelector('descope-text'), {\n includeAttrs: ['mode', 'variant'],\n });\n }\n}\n\nconst selectors = {\n host: { selector: () => ':host' },\n link: { selector: () => ':host a' },\n anchor: {},\n wrapper: { selector: () => ':host > div' },\n text: { selector: () => TextClass.componentName },\n};\n\nconst { anchor, text, host, wrapper, link } = selectors;\n\nexport const LinkClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...text, property: 'direction' },\n textAlign: wrapper,\n textDecoration: { ...link, property: 'text-decoration', fallback: 'none' },\n textColor: [\n { ...anchor, property: 'color' },\n { ...text, property: TextClass.cssVarList.textColor },\n ],\n cursor: anchor,\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawLink);\n","import { componentName, LinkClass } from './LinkClass';\nimport '@descope-ui/descope-text';\n\ncustomElements.define(componentName, LinkClass);\n\nexport { LinkClass, componentName };\n","/* eslint-disable no-param-reassign */\n\nimport MarkdownIt from 'markdown-it';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport { disableRules } from './consts';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { decodeHTML } from './helpers';\nimport { getComponentName, injectStyle, observeChildren } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('enriched-text');\n\nclass EnrichedText extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n #origLinkRenderer;\n\n #origEmRenderer;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"content\"></div>\n `;\n\n injectStyle(\n `\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n `,\n this\n );\n\n this.#initProcessor();\n\n observeChildren(this, this.#parseChildren.bind(this));\n }\n\n static get observedAttributes() {\n return ['readonly', 'link-target-blank'];\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue !== oldValue) {\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue === 'true');\n }\n\n if (attrName === 'link-target-blank') {\n this.#initProcessor();\n }\n }\n }\n\n // We're overriding the rule for em with single underscore to perform as underline. (_underline_)\n customUnderlineRenderer() {\n this.processor.renderer.rules.em_open = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n this.processor.renderer.rules.em_close = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n }\n\n #customizeLinkRenderer() {\n if (this.linkTargetBlank) {\n this.processor.renderer.rules.link_open = (tokens, idx, options, env, self) => {\n // Add a new `target` attribute, or replace the value of the existing one.\n tokens[idx].attrSet('target', '_blank');\n // Pass the token to the default renderer.\n return this.#origLinkRenderer(tokens, idx, options, env, self);\n };\n } else {\n this.processor.renderer.rules.link_open = this.#origLinkRenderer;\n }\n }\n\n #disableCustomRules() {\n if (!this.processor) {\n return;\n }\n this.processor.disable(disableRules);\n }\n\n #updateProcessorRules() {\n this.#disableCustomRules();\n }\n\n #storeOrigRenderers() {\n const defaultLinkRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origLinkRenderer = this.processor.renderer.rules.link_open || defaultLinkRenderer;\n\n const defaultStrongRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origEmRenderer = this.processor.renderer.rules.em_open || defaultStrongRenderer;\n }\n\n #initProcessor() {\n this.processor = new MarkdownIt('commonmark', { html: true });\n this.#storeOrigRenderers();\n this.#updateProcessorRules();\n this.#customizeLinkRenderer();\n this.customUnderlineRenderer();\n }\n\n get linkTargetBlank() {\n return this.getAttribute('link-target-blank') === 'true';\n }\n\n get contentNode() {\n return this.shadowRoot.querySelector('.content');\n }\n\n #parseChildren() {\n if (!this.processor) {\n return;\n }\n\n let html = decodeHTML(this.innerHTML);\n\n if (!html?.trim() && this.isConnected) {\n this.setAttribute('empty', 'true');\n } else {\n this.removeAttribute('empty');\n }\n\n try {\n const tokens = this.processor.parse(html, { references: undefined });\n html = this.processor.renderer.render(tokens, { html: true, breaks: true });\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('Not parsing invalid markdown token');\n }\n\n this.contentNode.innerHTML = html;\n this.contentNode.firstChild?.setAttribute('part', 'content');\n }\n\n onReadOnlyChange(isReadOnly) {\n if (isReadOnly) {\n this.contentNode.setAttribute('inert', isReadOnly);\n } else {\n this.contentNode.removeAttribute('inert');\n }\n }\n}\n\nexport const EnrichedTextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDisplay: { selector: () => ':host', property: 'display', fallback: 'inline-block' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n fontWeightBold: [\n { selector: () => ':host strong', property: 'font-weight' },\n { selector: () => ':host b', property: 'font-weight' },\n ],\n textColor: { property: 'color' },\n textLineHeight: { property: 'line-height' },\n textAlign: {},\n linkColor: { selector: 'a', property: 'color' },\n linkTextDecoration: { selector: 'a', property: 'text-decoration' },\n linkHoverTextDecoration: { selector: 'a:hover', property: 'text-decoration' },\n minHeight: {},\n minWidth: {},\n },\n }),\n createStyleMixin({ componentNameOverride: getComponentName('link') }),\n createStyleMixin({ componentNameOverride: getComponentName('text') }),\n draggableMixin,\n componentNameValidationMixin\n)(EnrichedText);\n","import { EnrichedTextClass } from '@descope-ui/descope-enriched-text/class';\nimport { getComponentName } from '../../../helpers/componentHelpers';\nimport { compose } from '../../../helpers';\nimport {\n createStyleMixin,\n proxyInputMixin,\n draggableMixin,\n componentNameValidationMixin,\n createProxy,\n} from '../../../mixins';\nimport { booleanFieldMixin } from '../booleanFieldMixin';\nimport commonStyles from '../commonStyles';\nimport { useHostExternalPadding } from '../../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('switch-toggle');\n\nconst {\n host,\n component,\n checkboxElement: track,\n checkboxSurface: knob,\n checkboxLabel,\n requiredIndicator,\n helperText,\n errorMessage,\n} = {\n host: { selector: () => ':host' },\n requiredIndicator: {\n selector: '[required] vaadin-checkbox [slot=\"label\"]:not(:empty)::part(content)::after',\n },\n component: { selector: 'vaadin-checkbox' },\n checkboxElement: { selector: 'vaadin-checkbox::part(checkbox)' },\n checkboxSurface: { selector: 'vaadin-checkbox::part(checkbox)::after' },\n checkboxLabel: { selector: 'vaadin-checkbox [slot=\"label\"]:not(:empty)' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const SwitchToggleClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n\n fontSize: [component, checkboxLabel, checkboxLabel],\n fontFamily: [checkboxLabel, helperText, errorMessage],\n\n labelTextColor: [\n { ...checkboxLabel, property: 'color' },\n { ...checkboxLabel, property: '-webkit-text-fill-color' },\n ],\n labelSpacing: { ...checkboxLabel, property: 'padding-inline-start' },\n labelLineHeight: { ...checkboxLabel, property: 'line-height' },\n labelFontWeight: { ...checkboxLabel, property: 'font-weight' },\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n trackBorderWidth: { ...track, property: 'border-width' },\n trackBorderStyle: { ...track, property: 'border-style' },\n trackBorderColor: { ...track, property: 'border-color' },\n trackBackgroundColor: { ...track, property: 'background-color' },\n trackBorderRadius: { ...track, property: 'border-radius' },\n trackWidth: [{ ...track, property: 'width' }],\n trackHeight: [\n { ...knob, property: 'font-size' },\n { ...track, property: 'height' },\n ],\n\n knobSize: [\n { ...knob, property: 'width' },\n { ...knob, property: 'height' },\n ],\n knobTextColor: { ...knob, property: 'color' },\n knobRadius: { ...knob, property: 'border-radius' },\n knobTransitionDuration: { ...knob, property: 'transition' },\n knobColor: { ...knob, property: 'background-color' },\n knobTopOffset: { ...knob, property: 'top' },\n knobLeftOffset: { ...knob, property: 'left' },\n\n inputOutlineWidth: { ...track, property: 'outline-width' },\n inputOutlineOffset: { ...track, property: 'outline-offset' },\n inputOutlineColor: { ...track, property: 'outline-color' },\n inputOutlineStyle: { ...track, property: 'outline-style' },\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n componentNameValidationMixin,\n booleanFieldMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t${commonStyles(SwitchToggleClass.cssVarList)}\n\t\t\t${useHostExternalPadding(SwitchToggleClass.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n width: 100%;\n }\n\n vaadin-text-field::part(input-field) {\n cursor: pointer;\n }\n\n vaadin-checkbox {\n cursor: pointer;\n }\n\n vaadin-checkbox [slot=\"label\"]:not(:empty) {\n cursor: pointer;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::before {\n content: '';\n\t\t\t}\n\n vaadin-checkbox[active]::part(checkbox) {\n\t\t\t\ttransform: none;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::after {\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 1;\n\t\t\t\tcontent: '';\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['label', 'tabindex', 'style'],\n componentName,\n })\n);\n"],"names":["customElements","define","createBaseInputClass","args","InputController","constructor","host","callback","super","initializer","node","value","type","setAttribute","id","this","defaultId","useUniqueId","booleanFieldMixin","superclass","init","template","document","createElement","innerHTML","baseElement","appendChild","content","cloneNode","inputElement","shadowRoot","querySelector","checkbox","includeAttrs","disableRules","componentName","forwardAttributes","BaseInputClass","baseSelector","observedAttributes","wrapperEle","labelContent","checked","val","addEventListener","e","isTrusted","focus","hasAttribute","click","handleFocusEventsDispatching","attributeChangedCallback","attrName","oldValue","newValue","onReadOnlyChange","onLabelChange","labelValue","getAttribute","textContent","getValidity","isRequired","valueMissing","cssVarList","hostDisplay","hostDirection","decodeHTML","html","textArea","RawText","attachShadow","mode","hideWhenEmpty","hasChildren","childNodes","length","style","display","selector","TextClass","mappings","hostWidth","property","fontSize","textColor","textLineHeight","textLetterSpacing","textShadow","textAlign","textTransform","fontFamily","fontStyle","fontWeight","borderWidth","borderStyle","borderColor","RawLink","mapAttrs","tooltip","selectors","link","anchor","wrapper","text","LinkClass","textDecoration","fallback","cursor","EnrichedText","bind","customUnderlineRenderer","processor","renderer","rules","em_open","tokens","idx","options","env","self","markup","tag","em_close","linkTargetBlank","link_open","attrSet","disable","_","renderToken","contentNode","trim","isConnected","removeAttribute","parse","references","undefined","render","breaks","console","warn","firstChild","isReadOnly","EnrichedTextClass","fontWeightBold","linkColor","linkTextDecoration","linkHoverTextDecoration","minHeight","minWidth","componentNameOverride","component","checkboxElement","track","checkboxSurface","knob","checkboxLabel","requiredIndicator","helperText","errorMessage","SwitchToggleClass","labelTextColor","labelSpacing","labelLineHeight","labelFontWeight","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","trackBorderWidth","trackBorderStyle","trackBorderColor","trackBackgroundColor","trackBorderRadius","trackWidth","trackHeight","knobSize","knobTextColor","knobRadius","knobTransitionDuration","knobColor","knobTopOffset","knobLeftOffset","inputOutlineWidth","inputOutlineOffset","inputOutlineColor","inputOutlineStyle","proxyProps","slots","wrappedEleName","excludeAttrsSync"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1456,2294,4159,9261],{11339:(e,t,n)=>{n.r(t),n.d(t,{AlertClass:()=>p,componentName:()=>a}),n(55838);var o=n(79365),r=n(9696),s=n(97810),i=n(81365),l=n(76231),h=n(25964);const a=(0,s.xE)("alert");class c extends((0,i.q)({componentName:a,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <div class="icon"></div>\n <div class="content">\n <descope-enriched-text>\n <slot></slot>\n </descope-enriched-text>\n </div>\n </div>\n ',(0,h.fz)('\n :host {\n display: inline-flex;\n }\n :host > div {\n display: flex;\n width: 100%;\n }\n :host([empty="true"]) {\n display: none;\n }\n .icon {\n flex-shrink: 0;\n }\n .content {\n display: flex;\n flex-wrap: wrap;\n white-space: normal;\n overflow-wrap: break-word;\n }\n ',this)}init(){super.init?.(),this.slotEle=this.shadowRoot.querySelector("slot"),this.textComp=this.shadowRoot.querySelector("descope-enriched-text"),this.slotEle.addEventListener("slotchange",this.handleSlotChange.bind(this)),(0,h.Gh)(this.textComp,this,{includeAttrs:["empty"]}),(0,h.Ge)(this,this.handleChildrenChange.bind(this)),(0,s.EA)(this,this.textComp,{includeAttrs:["variant","full-width","link-target-blank"]})}handleChildrenChange(){this.textComp.textContent=this.textContent}handleSlotChange(){const e=this.slotEle.assignedNodes({flatten:!0});e.length&&(this.textComp.textContent=e[0]?.textContent||"")}}const{icon:d}={icon:{selector:()=>".icon"}},p=(0,r.Zz)((0,o.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},textColor:{selector:l.m.componentName,property:l.m.cssVarList.textColor},backgroundColor:{},borderColor:{},borderWidth:{},borderStyle:{},borderRadius:{},fontSize:[{},{selector:l.m.componentName,property:l.m.cssVarList.fontSize}],gap:{},horizontalPadding:[{property:"padding-top"},{property:"padding-bottom"}],verticalPadding:[{property:"padding-right"},{property:"padding-left"}],alignItems:{},justifyContent:[{},{selector:l.m.componentName,property:l.m.cssVarList.textAlign}],icon:[{...d,property:"content"},{...d,property:"display",fallback:"none"}],iconSize:[{...d,property:"width"},{...d,property:"height"}]}}),(0,o.RF)({componentNameOverride:(0,s.xE)("enriched-text")}),(0,o.RF)({componentNameOverride:(0,s.xE)("text")}),o.VO,o.tQ)(c);customElements.define(a,p)},36976:(e,t,n)=>{n.d(t,{M:()=>o});const o=["blockquote","list","image","table","code","hr","backticks","fence","reference","heading","lheading","html_block"]},54847:(e,t,n)=>{n.d(t,{G:()=>o});const o=e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value}},55838:(e,t,n)=>{n.r(t),n.d(t,{EnrichedTextClass:()=>o.m,componentName:()=>o.T}),n(74778);var o=n(76231);customElements.define(o.T,o.m)},63595:(e,t,n)=>{n.r(t),n.d(t,{TextClass:()=>o.s,componentName:()=>o.T});var o=n(66434);customElements.define(o.T,o.s)},66434:(e,t,n)=>{n.d(t,{T:()=>l,s:()=>c});var o=n(88961),r=n(63200),s=n(25964),i=n(72270);const l=(0,s.xE)("text");class h extends((0,i.qu)({componentName:l,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,s.fz)("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,s.Ge)(this,()=>{const e=!!this.childNodes.length;this.style.display=!e&&this.hideWhenEmpty?"none":""})}}const{host:a}={host:{selector:()=>":host"}},c=(0,r.Zz)((0,o.RF)({mappings:{hostWidth:{...a,property:"width"},hostDirection:{...a,property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),o.VO,o.tQ)(h)},74778:(e,t,n)=>{n.r(t),n.d(t,{LinkClass:()=>y,componentName:()=>h});var o=n(88961),r=n(63200),s=n(25964),i=n(72270),l=n(66434);const h=(0,s.xE)("link");class a extends((0,i.qu)({componentName:h,baseSelector:":host a"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t<div>\n\t\t\t<descope-text part="wrapper">\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t',(0,s.fz)('\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n\n :host([ellipsis="true"]) descope-text {\n display: inline-flex;\n }\n :host([ellipsis="true"]) descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ',this),(0,s.EA)(this,this.shadowRoot.querySelector("a"),{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),(0,s.EA)(this,this.shadowRoot.querySelector("descope-text"),{includeAttrs:["mode","variant"]})}}const c={host:{selector:()=>":host"},link:{selector:()=>":host a"},anchor:{},wrapper:{selector:()=>":host > div"},text:{selector:()=>l.s.componentName}},{anchor:d,text:p,host:m,wrapper:u,link:g}=c,y=(0,r.Zz)((0,o.RF)({mappings:{hostWidth:{...m,property:"width"},hostDirection:{...p,property:"direction"},textAlign:u,textDecoration:{...g,property:"text-decoration",fallback:"none"},textColor:[{...d,property:"color"},{...p,property:l.s.cssVarList.textColor}],cursor:d}}),o.VO,o.tQ)(a);n(63595),customElements.define(h,y)},76231:(e,t,n)=>{n.d(t,{T:()=>c,m:()=>p});var o=n(92540),r=n(88961),s=n(63200),i=n(36976),l=n(72270),h=n(54847),a=n(25964);const c=(0,a.xE)("enriched-text");class d extends((0,l.qu)({componentName:c,baseSelector:":host > div"})){#e;#t;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="content"></div>\n ',(0,a.fz)("\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n ",this),this.#n(),(0,a.Ge)(this,this.#o.bind(this))}static get observedAttributes(){return["readonly","link-target-blank"]}attributeChangedCallback(e,t,n){super.attributeChangedCallback?.(e,t,n),n!==t&&("readonly"===e&&this.onReadOnlyChange("true"===n),"link-target-blank"===e&&this.#n())}customUnderlineRenderer(){this.processor.renderer.rules.em_open=(e,t,n,o,r)=>("_"===e[t].markup&&(e[t].tag="u"),this.#t(e,t,n,o,r)),this.processor.renderer.rules.em_close=(e,t,n,o,r)=>("_"===e[t].markup&&(e[t].tag="u"),this.#t(e,t,n,o,r))}#r(){this.linkTargetBlank?this.processor.renderer.rules.link_open=(e,t,n,o,r)=>(e[t].attrSet("target","_blank"),this.#e(e,t,n,o,r)):this.processor.renderer.rules.link_open=this.#e}#s(){this.processor&&this.processor.disable(i.M)}#i(){this.#s()}#l(){this.#e=this.processor.renderer.rules.link_open||((e,t,n,o,r)=>r.renderToken(e,t,n)),this.#t=this.processor.renderer.rules.em_open||((e,t,n,o,r)=>r.renderToken(e,t,n))}#n(){this.processor=new o.A("commonmark",{html:!0}),this.#l(),this.#i(),this.#r(),this.customUnderlineRenderer()}get linkTargetBlank(){return"true"===this.getAttribute("link-target-blank")}get contentNode(){return this.shadowRoot.querySelector(".content")}#o(){if(!this.processor)return;let e=(0,h.G)(this.innerHTML);!e?.trim()&&this.isConnected?this.setAttribute("empty","true"):this.removeAttribute("empty");try{const t=this.processor.parse(e,{references:void 0});e=this.processor.renderer.render(t,{html:!0,breaks:!0})}catch(e){console.warn("Not parsing invalid markdown token")}this.contentNode.innerHTML=e}onReadOnlyChange(e){e?this.contentNode.setAttribute("inert",e):this.contentNode.removeAttribute("inert")}}const p=(0,s.Zz)((0,r.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDisplay:{selector:()=>":host",property:"display",fallback:"inline-block"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},fontWeightBold:[{selector:()=>":host strong",property:"font-weight"},{selector:()=>":host b",property:"font-weight"}],textColor:{property:"color"},textLineHeight:{property:"line-height"},textAlign:{},linkColor:{selector:"a",property:"color"},linkTextDecoration:{selector:"a",property:"text-decoration"},linkHoverTextDecoration:{selector:"a:hover",property:"text-decoration"},minHeight:{},minWidth:{}}}),(0,r.RF)({componentNameOverride:(0,a.xE)("link")}),(0,r.RF)({componentNameOverride:(0,a.xE)("text")}),r.VO,r.tQ)(d)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1456,2294,4159,9261],{11339:(t,e,n)=>{n.r(e),n.d(e,{AlertClass:()=>p,componentName:()=>a}),n(55838);var o=n(79365),r=n(9696),s=n(97810),i=n(81365),l=n(76231),h=n(25964);const a=(0,s.xE)("alert");class c extends((0,i.q)({componentName:a,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <div class="icon"></div>\n <div class="content">\n <descope-enriched-text>\n <slot></slot>\n </descope-enriched-text>\n </div>\n </div>\n ',(0,h.fz)('\n :host {\n display: inline-flex;\n }\n :host > div {\n display: flex;\n width: 100%;\n }\n :host([empty="true"]) {\n display: none;\n }\n .icon {\n flex-shrink: 0;\n }\n .content {\n display: flex;\n flex-wrap: wrap;\n white-space: normal;\n overflow-wrap: break-word;\n }\n ',this)}init(){super.init?.(),this.slotEle=this.shadowRoot.querySelector("slot"),this.textComp=this.shadowRoot.querySelector("descope-enriched-text"),this.slotEle.addEventListener("slotchange",this.handleSlotChange.bind(this)),(0,h.Gh)(this.textComp,this,{includeAttrs:["empty"]}),(0,h.Ge)(this,this.handleChildrenChange.bind(this)),(0,s.EA)(this,this.textComp,{includeAttrs:["variant","full-width","link-target-blank"]})}handleChildrenChange(){this.textComp.textContent=this.textContent}handleSlotChange(){const t=this.slotEle.assignedNodes({flatten:!0});t.length&&(this.textComp.textContent=t[0]?.textContent||"")}}const{icon:d}={icon:{selector:()=>".icon"}},p=(0,r.Zz)((0,o.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},textColor:{selector:l.m.componentName,property:l.m.cssVarList.textColor},backgroundColor:{},borderColor:{},borderWidth:{},borderStyle:{},borderRadius:{},fontSize:[{},{selector:l.m.componentName,property:l.m.cssVarList.fontSize}],gap:{},horizontalPadding:[{property:"padding-top"},{property:"padding-bottom"}],verticalPadding:[{property:"padding-right"},{property:"padding-left"}],alignItems:{},justifyContent:[{},{selector:l.m.componentName,property:l.m.cssVarList.textAlign}],icon:[{...d,property:"content"},{...d,property:"display",fallback:"none"}],iconSize:[{...d,property:"width"},{...d,property:"height"}]}}),(0,o.RF)({componentNameOverride:(0,s.xE)("enriched-text")}),(0,o.RF)({componentNameOverride:(0,s.xE)("text")}),o.VO,o.tQ)(c);customElements.define(a,p)},36976:(t,e,n)=>{n.d(e,{M:()=>o});const o=["blockquote","list","image","table","code","hr","backticks","fence","reference","heading","lheading","html_block"]},54847:(t,e,n)=>{n.d(e,{G:()=>o});const o=t=>{const e=document.createElement("textarea");return e.innerHTML=t,e.value}},55838:(t,e,n)=>{n.r(e),n.d(e,{EnrichedTextClass:()=>o.m,componentName:()=>o.T}),n(74778);var o=n(76231);customElements.define(o.T,o.m)},63595:(t,e,n)=>{n.r(e),n.d(e,{TextClass:()=>o.s,componentName:()=>o.T});var o=n(66434);customElements.define(o.T,o.s)},66434:(t,e,n)=>{n.d(e,{T:()=>l,s:()=>c});var o=n(88961),r=n(63200),s=n(25964),i=n(72270);const l=(0,s.xE)("text");class h extends((0,i.qu)({componentName:l,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,s.fz)("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,s.Ge)(this,()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""})}}const{host:a}={host:{selector:()=>":host"}},c=(0,r.Zz)((0,o.RF)({mappings:{hostWidth:{...a,property:"width"},hostDirection:{...a,property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),o.VO,o.tQ)(h)},74778:(t,e,n)=>{n.r(e),n.d(e,{LinkClass:()=>y,componentName:()=>h});var o=n(88961),r=n(63200),s=n(25964),i=n(72270),l=n(66434);const h=(0,s.xE)("link");class a extends((0,i.qu)({componentName:h,baseSelector:":host a"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t<div>\n\t\t\t<descope-text part="wrapper">\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t',(0,s.fz)('\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n\n :host([ellipsis="true"]) descope-text {\n display: inline-flex;\n }\n :host([ellipsis="true"]) descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ',this),(0,s.EA)(this,this.shadowRoot.querySelector("a"),{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),(0,s.EA)(this,this.shadowRoot.querySelector("descope-text"),{includeAttrs:["mode","variant"]})}}const c={host:{selector:()=>":host"},link:{selector:()=>":host a"},anchor:{},wrapper:{selector:()=>":host > div"},text:{selector:()=>l.s.componentName}},{anchor:d,text:p,host:m,wrapper:u,link:g}=c,y=(0,r.Zz)((0,o.RF)({mappings:{hostWidth:{...m,property:"width"},hostDirection:{...p,property:"direction"},textAlign:u,textDecoration:{...g,property:"text-decoration",fallback:"none"},textColor:[{...d,property:"color"},{...p,property:l.s.cssVarList.textColor}],cursor:d}}),o.VO,o.tQ)(a);n(63595),customElements.define(h,y)},76231:(t,e,n)=>{n.d(e,{T:()=>c,m:()=>p});var o=n(92540),r=n(88961),s=n(63200),i=n(36976),l=n(72270),h=n(54847),a=n(25964);const c=(0,a.xE)("enriched-text");class d extends((0,l.qu)({componentName:c,baseSelector:":host > div"})){#t;#e;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="content"></div>\n ',(0,a.fz)("\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n ",this),this.#n(),(0,a.Ge)(this,this.#o.bind(this))}static get observedAttributes(){return["readonly","link-target-blank"]}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),n!==e&&("readonly"===t&&this.onReadOnlyChange("true"===n),"link-target-blank"===t&&this.#n())}customUnderlineRenderer(){this.processor.renderer.rules.em_open=(t,e,n,o,r)=>("_"===t[e].markup&&(t[e].tag="u"),this.#e(t,e,n,o,r)),this.processor.renderer.rules.em_close=(t,e,n,o,r)=>("_"===t[e].markup&&(t[e].tag="u"),this.#e(t,e,n,o,r))}#r(){this.linkTargetBlank?this.processor.renderer.rules.link_open=(t,e,n,o,r)=>(t[e].attrSet("target","_blank"),this.#t(t,e,n,o,r)):this.processor.renderer.rules.link_open=this.#t}#s(){this.processor&&this.processor.disable(i.M)}#i(){this.#s()}#l(){this.#t=this.processor.renderer.rules.link_open||((t,e,n,o,r)=>r.renderToken(t,e,n)),this.#e=this.processor.renderer.rules.em_open||((t,e,n,o,r)=>r.renderToken(t,e,n))}#n(){this.processor=new o.A("commonmark",{html:!0}),this.#l(),this.#i(),this.#r(),this.customUnderlineRenderer()}get linkTargetBlank(){return"true"===this.getAttribute("link-target-blank")}get contentNode(){return this.shadowRoot.querySelector(".content")}#o(){if(!this.processor)return;let t=(0,h.G)(this.innerHTML);!t?.trim()&&this.isConnected?this.setAttribute("empty","true"):this.removeAttribute("empty");try{const e=this.processor.parse(t,{references:void 0});t=this.processor.renderer.render(e,{html:!0,breaks:!0})}catch(t){console.warn("Not parsing invalid markdown token")}this.contentNode.innerHTML=t,this.contentNode.firstChild?.setAttribute("part","content")}onReadOnlyChange(t){t?this.contentNode.setAttribute("inert",t):this.contentNode.removeAttribute("inert")}}const p=(0,s.Zz)((0,r.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDisplay:{selector:()=>":host",property:"display",fallback:"inline-block"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},fontWeightBold:[{selector:()=>":host strong",property:"font-weight"},{selector:()=>":host b",property:"font-weight"}],textColor:{property:"color"},textLineHeight:{property:"line-height"},textAlign:{},linkColor:{selector:"a",property:"color"},linkTextDecoration:{selector:"a",property:"text-decoration"},linkHoverTextDecoration:{selector:"a:hover",property:"text-decoration"},minHeight:{},minWidth:{}}}),(0,r.RF)({componentNameOverride:(0,a.xE)("link")}),(0,r.RF)({componentNameOverride:(0,a.xE)("text")}),r.VO,r.tQ)(d)}}]);
2
2
  //# sourceMappingURL=descope-alert-index-js.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"descope-alert-index-js.js","mappings":"2RAOO,MAAMA,GAAgB,QAAiB,SAE9C,MAAMC,WAAiB,EAAAC,EAAA,GAAgB,CAAEF,gBAAeG,aAAc,iBACpE,WAAAC,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,wMAWhD,QACE,8YAqBAH,KAEJ,CA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,UAAWI,SAAU,gBAEzCE,UAAW,CAAEF,SAAU,SACvBsC,eAAgB,CAAEtC,SAAU,eAC5BgB,UAAW,CAAC,EACZkF,UAAW,CAAEtG,SAAU,IAAKI,SAAU,SACtCmG,mBAAoB,CAAEvG,SAAU,IAAKI,SAAU,mBAC/CoG,wBAAyB,CAAExG,SAAU,UAAWI,SAAU,mBAC1DqG,UAAW,CAAC,EACZC,SAAU,CAAC,MAGf,QAAiB,CAAEnF,uBAAuB,QAAiB,WAC3D,QAAiB,CAAEA,uBAAuB,QAAiB,UAC3D,KACA,KA1B+B,CA2B/BqC,E","sources":["webpack://@descope/web-components-ui/./src/components/descope-alert/AlertClass.js","webpack://@descope/web-components-ui/./src/components/descope-alert/index.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/consts.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/LinkClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/EnrichedTextClass.js"],"sourcesContent":["import { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { compose } from '../../helpers';\nimport { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { EnrichedTextClass } from '@descope-ui/descope-enriched-text/class';\nimport { injectStyle, observeChildren, syncAttrs } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('alert');\n\nclass RawAlert extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div>\n <div class=\"icon\"></div>\n <div class=\"content\">\n <descope-enriched-text>\n <slot></slot>\n </descope-enriched-text>\n </div>\n </div>\n `;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n }\n :host > div {\n display: flex;\n width: 100%;\n }\n :host([empty=\"true\"]) {\n display: none;\n }\n .icon {\n flex-shrink: 0;\n }\n .content {\n display: flex;\n flex-wrap: wrap;\n white-space: normal;\n overflow-wrap: break-word;\n }\n `,\n this\n );\n }\n\n init() {\n super.init?.();\n\n this.slotEle = this.shadowRoot.querySelector('slot');\n this.textComp = this.shadowRoot.querySelector('descope-enriched-text');\n\n this.slotEle.addEventListener('slotchange', this.handleSlotChange.bind(this));\n\n syncAttrs(this.textComp, this, { includeAttrs: ['empty'] });\n\n observeChildren(this, this.handleChildrenChange.bind(this));\n\n forwardAttrs(this, this.textComp, {\n includeAttrs: ['variant', 'full-width', 'link-target-blank'],\n });\n }\n\n handleChildrenChange() {\n this.textComp.textContent = this.textContent;\n }\n\n handleSlotChange() {\n const assignedNodes = this.slotEle.assignedNodes({ flatten: true });\n if (!assignedNodes.length) return;\n this.textComp.textContent = assignedNodes[0]?.textContent || '';\n }\n}\n\nconst { icon } = {\n icon: { selector: () => '.icon' },\n};\n\nexport const AlertClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n textColor: {\n selector: EnrichedTextClass.componentName,\n property: EnrichedTextClass.cssVarList.textColor,\n },\n backgroundColor: {},\n borderColor: {},\n borderWidth: {},\n borderStyle: {},\n borderRadius: {},\n fontSize: [\n {},\n {\n selector: EnrichedTextClass.componentName,\n property: EnrichedTextClass.cssVarList.fontSize,\n },\n ],\n gap: {},\n horizontalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],\n verticalPadding: [{ property: 'padding-right' }, { property: 'padding-left' }],\n alignItems: {},\n justifyContent: [\n {},\n {\n selector: EnrichedTextClass.componentName,\n property: EnrichedTextClass.cssVarList.textAlign,\n },\n ],\n icon: [\n { ...icon, property: 'content' },\n { ...icon, property: 'display', fallback: 'none' },\n ],\n iconSize: [\n { ...icon, property: 'width' },\n { ...icon, property: 'height' },\n ],\n },\n }),\n createStyleMixin({ componentNameOverride: getComponentName('enriched-text') }),\n createStyleMixin({ componentNameOverride: getComponentName('text') }),\n draggableMixin,\n componentNameValidationMixin\n)(RawAlert);\n","import '@descope-ui/descope-enriched-text';\nimport { componentName, AlertClass } from './AlertClass';\n\ncustomElements.define(componentName, AlertClass);\n\nexport { AlertClass, componentName };\n","export const disableRules = [\n 'blockquote',\n 'list',\n 'image',\n 'table',\n 'code',\n 'hr',\n 'backticks',\n 'fence',\n 'reference',\n 'heading',\n 'lheading',\n 'html_block',\n];\n","export const decodeHTML = (html) => {\n const textArea = document.createElement('textarea');\n textArea.innerHTML = html;\n return textArea.value;\n};\n","import '@descope-ui/descope-link';\n\nimport { componentName, EnrichedTextClass } from './EnrichedTextClass';\n\ncustomElements.define(componentName, EnrichedTextClass);\n\nexport { EnrichedTextClass, componentName };\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(`\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `, this);\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' }\n}\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n textColor: [\n { property: 'color' }\n ],\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n forwardAttrs,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { TextClass } from '@descope-ui/descope-text/class';\n\nexport const componentName = getComponentName('link');\n\nclass RawLink extends createBaseClass({ componentName, baseSelector: ':host a' }) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<div>\n\t\t\t<descope-text part=\"wrapper\">\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n\n :host([ellipsis=\"true\"]) descope-text {\n display: inline-flex;\n }\n :host([ellipsis=\"true\"]) descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n `,\n this\n );\n\n forwardAttrs(this, this.shadowRoot.querySelector('a'), {\n includeAttrs: ['href', 'target', 'tooltip'],\n mapAttrs: {\n tooltip: 'title',\n },\n });\n\n forwardAttrs(this, this.shadowRoot.querySelector('descope-text'), {\n includeAttrs: ['mode', 'variant'],\n });\n }\n}\n\nconst selectors = {\n host: { selector: () => ':host' },\n link: { selector: () => ':host a' },\n anchor: {},\n wrapper: { selector: () => ':host > div' },\n text: { selector: () => TextClass.componentName },\n};\n\nconst { anchor, text, host, wrapper, link } = selectors;\n\nexport const LinkClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...text, property: 'direction' },\n textAlign: wrapper,\n textDecoration: { ...link, property: 'text-decoration', fallback: 'none' },\n textColor: [\n { ...anchor, property: 'color' },\n { ...text, property: TextClass.cssVarList.textColor },\n ],\n cursor: anchor,\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawLink);\n","import { componentName, LinkClass } from './LinkClass';\nimport '@descope-ui/descope-text';\n\ncustomElements.define(componentName, LinkClass);\n\nexport { LinkClass, componentName };\n","/* eslint-disable no-param-reassign */\n\nimport MarkdownIt from 'markdown-it';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport { disableRules } from './consts';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { decodeHTML } from './helpers';\nimport { getComponentName, injectStyle, observeChildren } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('enriched-text');\n\nclass EnrichedText extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n #origLinkRenderer;\n\n #origEmRenderer;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"content\"></div>\n `;\n\n injectStyle(\n `\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n `,\n this\n );\n\n this.#initProcessor();\n\n observeChildren(this, this.#parseChildren.bind(this));\n }\n\n static get observedAttributes() {\n return ['readonly', 'link-target-blank'];\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue !== oldValue) {\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue === 'true');\n }\n\n if (attrName === 'link-target-blank') {\n this.#initProcessor();\n }\n }\n }\n\n // We're overriding the rule for em with single underscore to perform as underline. (_underline_)\n customUnderlineRenderer() {\n this.processor.renderer.rules.em_open = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n this.processor.renderer.rules.em_close = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n }\n\n #customizeLinkRenderer() {\n if (this.linkTargetBlank) {\n this.processor.renderer.rules.link_open = (tokens, idx, options, env, self) => {\n // Add a new `target` attribute, or replace the value of the existing one.\n tokens[idx].attrSet('target', '_blank');\n // Pass the token to the default renderer.\n return this.#origLinkRenderer(tokens, idx, options, env, self);\n };\n } else {\n this.processor.renderer.rules.link_open = this.#origLinkRenderer;\n }\n }\n\n #disableCustomRules() {\n if (!this.processor) {\n return;\n }\n this.processor.disable(disableRules);\n }\n\n #updateProcessorRules() {\n this.#disableCustomRules();\n }\n\n #storeOrigRenderers() {\n const defaultLinkRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origLinkRenderer = this.processor.renderer.rules.link_open || defaultLinkRenderer;\n\n const defaultStrongRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origEmRenderer = this.processor.renderer.rules.em_open || defaultStrongRenderer;\n }\n\n #initProcessor() {\n this.processor = new MarkdownIt('commonmark', { html: true });\n this.#storeOrigRenderers();\n this.#updateProcessorRules();\n this.#customizeLinkRenderer();\n this.customUnderlineRenderer();\n }\n\n get linkTargetBlank() {\n return this.getAttribute('link-target-blank') === 'true';\n }\n\n get contentNode() {\n return this.shadowRoot.querySelector('.content');\n }\n\n #parseChildren() {\n if (!this.processor) {\n return;\n }\n\n let html = decodeHTML(this.innerHTML);\n\n if (!html?.trim() && this.isConnected) {\n this.setAttribute('empty', 'true');\n } else {\n this.removeAttribute('empty');\n }\n\n try {\n const tokens = this.processor.parse(html, { references: undefined });\n html = this.processor.renderer.render(tokens, { html: true, breaks: true });\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('Not parsing invalid markdown token');\n }\n\n this.contentNode.innerHTML = html;\n }\n\n onReadOnlyChange(isReadOnly) {\n if (isReadOnly) {\n this.contentNode.setAttribute('inert', isReadOnly);\n } else {\n this.contentNode.removeAttribute('inert');\n }\n }\n}\n\nexport const EnrichedTextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDisplay: { selector: () => ':host', property: 'display', fallback: 'inline-block' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n fontWeightBold: [\n { selector: () => ':host strong', property: 'font-weight' },\n { selector: () => ':host b', property: 'font-weight' },\n ],\n textColor: { property: 'color' },\n textLineHeight: { property: 'line-height' },\n textAlign: {},\n linkColor: { selector: 'a', property: 'color' },\n linkTextDecoration: { selector: 'a', property: 'text-decoration' },\n linkHoverTextDecoration: { selector: 'a:hover', property: 'text-decoration' },\n minHeight: {},\n minWidth: {},\n },\n }),\n createStyleMixin({ componentNameOverride: getComponentName('link') }),\n createStyleMixin({ componentNameOverride: getComponentName('text') }),\n draggableMixin,\n componentNameValidationMixin\n)(EnrichedText);\n"],"names":["componentName","RawAlert","createBaseClass","baseSelector","constructor","super","this","attachShadow","mode","innerHTML","init","slotEle","shadowRoot","querySelector","textComp","addEventListener","handleSlotChange","bind","includeAttrs","handleChildrenChange","textContent","assignedNodes","flatten","length","icon","selector","AlertClass","mappings","hostWidth","property","hostDirection","textColor","EnrichedTextClass","cssVarList","backgroundColor","borderColor","borderWidth","borderStyle","borderRadius","fontSize","gap","horizontalPadding","verticalPadding","alignItems","justifyContent","textAlign","fallback","iconSize","componentNameOverride","customElements","define","disableRules","decodeHTML","html","textArea","document","createElement","value","RawText","hideWhenEmpty","getAttribute","hasChildren","childNodes","style","display","host","TextClass","textLineHeight","textLetterSpacing","textShadow","textTransform","fontFamily","fontStyle","fontWeight","RawLink","mapAttrs","tooltip","selectors","link","anchor","wrapper","text","LinkClass","textDecoration","cursor","EnrichedText","observedAttributes","attributeChangedCallback","attrName","oldValue","newValue","onReadOnlyChange","customUnderlineRenderer","processor","renderer","rules","em_open","tokens","idx","options","env","self","markup","tag","em_close","linkTargetBlank","link_open","attrSet","disable","_","renderToken","contentNode","trim","isConnected","setAttribute","removeAttribute","parse","references","undefined","render","breaks","e","console","warn","isReadOnly","hostDisplay","fontWeightBold","linkColor","linkTextDecoration","linkHoverTextDecoration","minHeight","minWidth"],"sourceRoot":""}
1
+ {"version":3,"file":"descope-alert-index-js.js","mappings":"2RAOO,MAAMA,GAAgB,QAAiB,SAE9C,MAAMC,WAAiB,EAAAC,EAAA,GAAgB,CAAEF,gBAAeG,aAAc,iBACpE,WAAAC,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,wMAWhD,QACE,8YAqBAH,KAEJ,CAEA,IAAAI,GACEL,MAAMK,SAENJ,KAAKK,QAAUL,KAAKM,WAAWC,cAAc,QAC7CP,KAAKQ,SAAWR,KAAKM,WAAWC,cAAc,yBAE9CP,KAAKK,QAAQI,iBAAiB,aAAcT,KAAKU,iBAAiBC,KAAKX,QAEvE,QAAUA,KAAKQ,SAAUR,KAAM,CAAEY,aAAc,CAAC,YAEhD,QAAgBZ,KAAMA,KAAKa,qBAAqBF,KAAKX,QAErD,QAAaA,KAAMA,KAAKQ,SAAU,CAChCI,aAAc,CAAC,UAAW,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uB,QAAiB,WAC3D,QAAiB,CAAEA,uBAAuB,QAAiB,UAC3D,KACA,KA1B+B,CA2B/BqC,E","sources":["webpack://@descope/web-components-ui/./src/components/descope-alert/AlertClass.js","webpack://@descope/web-components-ui/./src/components/descope-alert/index.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/consts.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/LinkClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/EnrichedTextClass.js"],"sourcesContent":["import { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { compose } from '../../helpers';\nimport { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { EnrichedTextClass } from '@descope-ui/descope-enriched-text/class';\nimport { injectStyle, observeChildren, syncAttrs } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('alert');\n\nclass RawAlert extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div>\n <div class=\"icon\"></div>\n <div class=\"content\">\n <descope-enriched-text>\n <slot></slot>\n </descope-enriched-text>\n </div>\n </div>\n `;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n }\n :host > div {\n display: flex;\n width: 100%;\n }\n :host([empty=\"true\"]) {\n display: none;\n }\n .icon {\n flex-shrink: 0;\n }\n .content {\n display: flex;\n flex-wrap: wrap;\n white-space: normal;\n overflow-wrap: break-word;\n }\n `,\n this\n );\n }\n\n init() {\n super.init?.();\n\n this.slotEle = this.shadowRoot.querySelector('slot');\n this.textComp = this.shadowRoot.querySelector('descope-enriched-text');\n\n this.slotEle.addEventListener('slotchange', this.handleSlotChange.bind(this));\n\n syncAttrs(this.textComp, this, { includeAttrs: ['empty'] });\n\n observeChildren(this, this.handleChildrenChange.bind(this));\n\n forwardAttrs(this, this.textComp, {\n includeAttrs: ['variant', 'full-width', 'link-target-blank'],\n });\n }\n\n handleChildrenChange() {\n this.textComp.textContent = this.textContent;\n }\n\n handleSlotChange() {\n const assignedNodes = this.slotEle.assignedNodes({ flatten: true });\n if (!assignedNodes.length) return;\n this.textComp.textContent = assignedNodes[0]?.textContent || '';\n }\n}\n\nconst { icon } = {\n icon: { selector: () => '.icon' },\n};\n\nexport const AlertClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n textColor: {\n selector: EnrichedTextClass.componentName,\n property: EnrichedTextClass.cssVarList.textColor,\n },\n backgroundColor: {},\n borderColor: {},\n borderWidth: {},\n borderStyle: {},\n borderRadius: {},\n fontSize: [\n {},\n {\n selector: EnrichedTextClass.componentName,\n property: EnrichedTextClass.cssVarList.fontSize,\n },\n ],\n gap: {},\n horizontalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],\n verticalPadding: [{ property: 'padding-right' }, { property: 'padding-left' }],\n alignItems: {},\n justifyContent: [\n {},\n {\n selector: EnrichedTextClass.componentName,\n property: EnrichedTextClass.cssVarList.textAlign,\n },\n ],\n icon: [\n { ...icon, property: 'content' },\n { ...icon, property: 'display', fallback: 'none' },\n ],\n iconSize: [\n { ...icon, property: 'width' },\n { ...icon, property: 'height' },\n ],\n },\n }),\n createStyleMixin({ componentNameOverride: getComponentName('enriched-text') }),\n createStyleMixin({ componentNameOverride: getComponentName('text') }),\n draggableMixin,\n componentNameValidationMixin\n)(RawAlert);\n","import '@descope-ui/descope-enriched-text';\nimport { componentName, AlertClass } from './AlertClass';\n\ncustomElements.define(componentName, AlertClass);\n\nexport { AlertClass, componentName };\n","export const disableRules = [\n 'blockquote',\n 'list',\n 'image',\n 'table',\n 'code',\n 'hr',\n 'backticks',\n 'fence',\n 'reference',\n 'heading',\n 'lheading',\n 'html_block',\n];\n","export const decodeHTML = (html) => {\n const textArea = document.createElement('textarea');\n textArea.innerHTML = html;\n return textArea.value;\n};\n","import '@descope-ui/descope-link';\n\nimport { componentName, EnrichedTextClass } from './EnrichedTextClass';\n\ncustomElements.define(componentName, EnrichedTextClass);\n\nexport { EnrichedTextClass, componentName };\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(`\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `, this);\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' }\n}\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n textColor: [\n { property: 'color' }\n ],\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n forwardAttrs,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { TextClass } from '@descope-ui/descope-text/class';\n\nexport const componentName = getComponentName('link');\n\nclass RawLink extends createBaseClass({ componentName, baseSelector: ':host a' }) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<div>\n\t\t\t<descope-text part=\"wrapper\">\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n\n :host([ellipsis=\"true\"]) descope-text {\n display: inline-flex;\n }\n :host([ellipsis=\"true\"]) descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n `,\n this\n );\n\n forwardAttrs(this, this.shadowRoot.querySelector('a'), {\n includeAttrs: ['href', 'target', 'tooltip'],\n mapAttrs: {\n tooltip: 'title',\n },\n });\n\n forwardAttrs(this, this.shadowRoot.querySelector('descope-text'), {\n includeAttrs: ['mode', 'variant'],\n });\n }\n}\n\nconst selectors = {\n host: { selector: () => ':host' },\n link: { selector: () => ':host a' },\n anchor: {},\n wrapper: { selector: () => ':host > div' },\n text: { selector: () => TextClass.componentName },\n};\n\nconst { anchor, text, host, wrapper, link } = selectors;\n\nexport const LinkClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...text, property: 'direction' },\n textAlign: wrapper,\n textDecoration: { ...link, property: 'text-decoration', fallback: 'none' },\n textColor: [\n { ...anchor, property: 'color' },\n { ...text, property: TextClass.cssVarList.textColor },\n ],\n cursor: anchor,\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawLink);\n","import { componentName, LinkClass } from './LinkClass';\nimport '@descope-ui/descope-text';\n\ncustomElements.define(componentName, LinkClass);\n\nexport { LinkClass, componentName };\n","/* eslint-disable no-param-reassign */\n\nimport MarkdownIt from 'markdown-it';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport { disableRules } from './consts';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { decodeHTML } from './helpers';\nimport { getComponentName, injectStyle, observeChildren } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('enriched-text');\n\nclass EnrichedText extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n #origLinkRenderer;\n\n #origEmRenderer;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"content\"></div>\n `;\n\n injectStyle(\n `\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n `,\n this\n );\n\n this.#initProcessor();\n\n observeChildren(this, this.#parseChildren.bind(this));\n }\n\n static get observedAttributes() {\n return ['readonly', 'link-target-blank'];\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue !== oldValue) {\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue === 'true');\n }\n\n if (attrName === 'link-target-blank') {\n this.#initProcessor();\n }\n }\n }\n\n // We're overriding the rule for em with single underscore to perform as underline. (_underline_)\n customUnderlineRenderer() {\n this.processor.renderer.rules.em_open = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n this.processor.renderer.rules.em_close = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n }\n\n #customizeLinkRenderer() {\n if (this.linkTargetBlank) {\n this.processor.renderer.rules.link_open = (tokens, idx, options, env, self) => {\n // Add a new `target` attribute, or replace the value of the existing one.\n tokens[idx].attrSet('target', '_blank');\n // Pass the token to the default renderer.\n return this.#origLinkRenderer(tokens, idx, options, env, self);\n };\n } else {\n this.processor.renderer.rules.link_open = this.#origLinkRenderer;\n }\n }\n\n #disableCustomRules() {\n if (!this.processor) {\n return;\n }\n this.processor.disable(disableRules);\n }\n\n #updateProcessorRules() {\n this.#disableCustomRules();\n }\n\n #storeOrigRenderers() {\n const defaultLinkRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origLinkRenderer = this.processor.renderer.rules.link_open || defaultLinkRenderer;\n\n const defaultStrongRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origEmRenderer = this.processor.renderer.rules.em_open || defaultStrongRenderer;\n }\n\n #initProcessor() {\n this.processor = new MarkdownIt('commonmark', { html: true });\n this.#storeOrigRenderers();\n this.#updateProcessorRules();\n this.#customizeLinkRenderer();\n this.customUnderlineRenderer();\n }\n\n get linkTargetBlank() {\n return this.getAttribute('link-target-blank') === 'true';\n }\n\n get contentNode() {\n return this.shadowRoot.querySelector('.content');\n }\n\n #parseChildren() {\n if (!this.processor) {\n return;\n }\n\n let html = decodeHTML(this.innerHTML);\n\n if (!html?.trim() && this.isConnected) {\n this.setAttribute('empty', 'true');\n } else {\n this.removeAttribute('empty');\n }\n\n try {\n const tokens = this.processor.parse(html, { references: undefined });\n html = this.processor.renderer.render(tokens, { html: true, breaks: true });\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('Not parsing invalid markdown token');\n }\n\n this.contentNode.innerHTML = html;\n this.contentNode.firstChild?.setAttribute('part', 'content');\n }\n\n onReadOnlyChange(isReadOnly) {\n if (isReadOnly) {\n this.contentNode.setAttribute('inert', isReadOnly);\n } else {\n this.contentNode.removeAttribute('inert');\n }\n }\n}\n\nexport const EnrichedTextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDisplay: { selector: () => ':host', property: 'display', fallback: 'inline-block' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n fontWeightBold: [\n { selector: () => ':host strong', property: 'font-weight' },\n { selector: () => ':host b', property: 'font-weight' },\n ],\n textColor: { property: 'color' },\n textLineHeight: { property: 'line-height' },\n textAlign: {},\n linkColor: { selector: 'a', property: 'color' },\n linkTextDecoration: { selector: 'a', property: 'text-decoration' },\n linkHoverTextDecoration: { selector: 'a:hover', property: 'text-decoration' },\n minHeight: {},\n minWidth: {},\n },\n }),\n createStyleMixin({ componentNameOverride: getComponentName('link') }),\n createStyleMixin({ componentNameOverride: getComponentName('text') }),\n draggableMixin,\n componentNameValidationMixin\n)(EnrichedText);\n"],"names":["componentName","RawAlert","createBaseClass","baseSelector","constructor","super","this","attachShadow","mode","innerHTML","init","slotEle","shadowRoot","querySelector","textComp","addEventListener","handleSlotChange","bind","includeAttrs","handleChildrenChange","textContent","assignedNodes","flatten","length","icon","selector","AlertClass","mappings","hostWidth","property","hostDirection","textColor","EnrichedTextClass","cssVarList","backgroundColor","borderColor","borderWidth","borderStyle","borderRadius","fontSize","gap","horizontalPadding","verticalPadding","alignItems","justifyContent","textAlign","fallback","iconSize","componentNameOverride","customElements","define","disableRules","decodeHTML","html","textArea","document","createElement","value","RawText","hideWhenEmpty","getAttribute","hasChildren","childNodes","style","display","host","TextClass","textLineHeight","textLetterSpacing","textShadow","textTransform","fontFamily","fontStyle","fontWeight","RawLink","mapAttrs","tooltip","selectors","link","anchor","wrapper","text","LinkClass","textDecoration","cursor","EnrichedText","observedAttributes","attributeChangedCallback","attrName","oldValue","newValue","onReadOnlyChange","customUnderlineRenderer","processor","renderer","rules","em_open","tokens","idx","options","env","self","markup","tag","em_close","linkTargetBlank","link_open","attrSet","disable","_","renderToken","contentNode","trim","isConnected","setAttribute","removeAttribute","parse","references","undefined","render","breaks","e","console","warn","firstChild","isReadOnly","hostDisplay","fontWeightBold","linkColor","linkTextDecoration","linkHoverTextDecoration","minHeight","minWidth"],"sourceRoot":""}
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see descope-email-field-index-js.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5695],{6424:(t,e,r)=>{r.d(e,{A:()=>x});const{host:i,label:o,placeholder:l,requiredIndicator:n,inputField:a,input:p,inputMask:s,helperText:d,errorMessage:u,disabledPlaceholder:c,inputDisabled:h,inputIcon:y,externalInput:m,externalInputDisabled:g,externalPlaceholder:f,externalDisabledPlaceholder:b}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},x={fontSize:[{},i],fontFamily:[o,a,d,u],labelFontSize:{...o,property:"font-size"},labelFontWeight:{...o,property:"font-weight"},labelTextColor:[{...o,property:"color"},{...n,property:"color"},{...o,property:"-webkit-text-fill-color"},{...n,property:"-webkit-text-fill-color"}],hostWidth:{...i,property:"width"},hostMinWidth:{...i,property:"min-width"},hostDirection:{...i,property:"direction"},inputDirection:{...p,property:"direction"},inputBackgroundColor:[{...a,property:"background-color"},{...s,property:"background-color"}],errorMessageTextColor:{...u,property:"color"},errorMessageIcon:{...u,property:"background-image"},errorMessageIconSize:{...u,property:"background-size"},errorMessageIconPadding:{...u,property:"padding-inline-start"},errorMessageIconRepeat:{...u,property:"background-repeat"},errorMessageIconPosition:{...u,property:"background-position"},errorMessageFontSize:{...u,property:"font-size"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...h,property:"-webkit-text-fill-color"},{...g,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"caret-color"},{...m,property:"caret-color"}],labelRequiredIndicator:{...n,property:"content"},inputBorderColor:{...a,property:"border-color"},inputBorderWidth:{...a,property:"border-width"},inputBorderStyle:{...a,property:"border-style"},inputBorderRadius:{...a,property:"border-radius"},inputHeight:{...a,property:"height"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"},{...m,property:"padding-left"},{...m,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},textAlign:{},inputTextAlign:[{...p,property:"text-align"},{...m,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...f,property:"color"},{...l,property:"color"},{...c,property:"-webkit-text-fill-color"},{...b,property:"-webkit-text-fill-color"}],labelPosition:{...o,property:"position"},labelTopPosition:{...o,property:"top"},labelHorizontalPosition:[{...o,property:"left"},{...o,property:"right"}],inputTransformY:{...o,property:"transform"},inputTransition:{...o,property:"transition"},marginInlineStart:{...o,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...f,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...m,property:"align-items"}],valueInputHeight:[{...p,property:"height"},{...m,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"},{...m,property:"margin-bottom"}],inputIconOffset:[{...y,property:"margin-right"},{...y,property:"margin-left"}],inputIconSize:{...y,property:"font-size"},inputIconColor:{...y,property:"color"}}},18330:(t,e,r)=>{r.d(e,{f:()=>o});var i=r(44099);class o extends i.r{constructor(t,e){super(t,"input","input",{initializer:(t,r)=>{r.value&&(t.value=r.value),r.type&&t.setAttribute("type",r.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},27136:(t,e,r)=>{r.d(e,{A:()=>h}),r(86689);var i=r(13256),o=r(82901),l=r(90676),n=r(81488),a=r(86314),p=r(87550),s=r(18330),d=r(37436),u=r(37720);const c=t=>class extends((0,d.a)(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new s.f(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t})),this.addController(new u.q(this.inputElement,this._labelController))}};(0,p.SF)("vaadin-text-field",a.k,{moduleId:"vaadin-text-field-styles"});class h extends(c((0,p.cp)((0,l.q)(i.Pu)))){static get is(){return"vaadin-text-field"}static get template(){return i.qy`
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4838,5695],{6424:(t,e,r)=>{r.d(e,{A:()=>x});const{host:i,label:o,placeholder:l,requiredIndicator:n,inputField:a,input:p,inputMask:s,helperText:d,errorMessage:u,disabledPlaceholder:c,inputDisabled:h,inputIcon:y,externalInput:m,externalInputDisabled:g,externalPlaceholder:f,externalDisabledPlaceholder:b}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},x={fontSize:[{},i],fontFamily:[o,a,d,u],labelFontSize:{...o,property:"font-size"},labelFontWeight:{...o,property:"font-weight"},labelTextColor:[{...o,property:"color"},{...n,property:"color"},{...o,property:"-webkit-text-fill-color"},{...n,property:"-webkit-text-fill-color"}],hostWidth:{...i,property:"width"},hostMinWidth:{...i,property:"min-width"},hostDirection:{...i,property:"direction"},inputDirection:{...p,property:"direction"},inputBackgroundColor:[{...a,property:"background-color"},{...s,property:"background-color"}],errorMessageTextColor:{...u,property:"color"},errorMessageIcon:{...u,property:"background-image"},errorMessageIconSize:{...u,property:"background-size"},errorMessageIconPadding:{...u,property:"padding-inline-start"},errorMessageIconRepeat:{...u,property:"background-repeat"},errorMessageIconPosition:{...u,property:"background-position"},errorMessageFontSize:{...u,property:"font-size"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...h,property:"-webkit-text-fill-color"},{...g,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"caret-color"},{...m,property:"caret-color"}],labelRequiredIndicator:{...n,property:"content"},inputBorderColor:{...a,property:"border-color"},inputBorderWidth:{...a,property:"border-width"},inputBorderStyle:{...a,property:"border-style"},inputBorderRadius:{...a,property:"border-radius"},inputHeight:{...a,property:"height"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"},{...m,property:"padding-left"},{...m,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},textAlign:{},inputTextAlign:[{...p,property:"text-align"},{...m,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...f,property:"color"},{...l,property:"color"},{...c,property:"-webkit-text-fill-color"},{...b,property:"-webkit-text-fill-color"}],labelPosition:{...o,property:"position"},labelTopPosition:{...o,property:"top"},labelHorizontalPosition:[{...o,property:"left"},{...o,property:"right"}],inputTransformY:{...o,property:"transform"},inputTransition:{...o,property:"transition"},marginInlineStart:{...o,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...f,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...m,property:"align-items"}],valueInputHeight:[{...p,property:"height"},{...m,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"},{...m,property:"margin-bottom"}],inputIconOffset:[{...y,property:"margin-right"},{...y,property:"margin-left"}],inputIconSize:{...y,property:"font-size"},inputIconColor:{...y,property:"color"}}},18330:(t,e,r)=>{r.d(e,{f:()=>o});var i=r(44099);class o extends i.r{constructor(t,e){super(t,"input","input",{initializer:(t,r)=>{r.value&&(t.value=r.value),r.type&&t.setAttribute("type",r.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},27136:(t,e,r)=>{r.d(e,{A:()=>h}),r(86689);var i=r(13256),o=r(82901),l=r(90676),n=r(81488),a=r(86314),p=r(87550),s=r(18330),d=r(37436),u=r(37720);const c=t=>class extends((0,d.a)(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new s.f(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t})),this.addController(new u.q(this.inputElement,this._labelController))}};(0,p.SF)("vaadin-text-field",a.k,{moduleId:"vaadin-text-field-styles"});class h extends(c((0,p.cp)((0,l.q)(i.Pu)))){static get is(){return"vaadin-text-field"}static get template(){return i.qy`
3
3
  <style>
4
4
  [part='input-field'] {
5
5
  flex-grow: 0;