@descope/web-components-ui 1.77.0 → 1.78.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 (92) hide show
  1. package/dist/cjs/index.cjs.js +49 -2
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +49 -2
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/2739.js +1 -1
  6. package/dist/umd/2739.js.map +1 -1
  7. package/dist/umd/7092.js +1 -1
  8. package/dist/umd/7092.js.map +1 -1
  9. package/dist/umd/DescopeDev.js +1 -1
  10. package/dist/umd/DescopeDev.js.map +1 -1
  11. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
  12. package/dist/umd/boolean-fields-descope-checkbox-index-js.js.map +1 -1
  13. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
  14. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js.map +1 -1
  15. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
  16. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -1
  17. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
  18. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -1
  19. package/dist/umd/descope-date-field-index-js.js +1 -1
  20. package/dist/umd/descope-date-field-index-js.js.map +1 -1
  21. package/dist/umd/descope-email-field-index-js.js +1 -1
  22. package/dist/umd/descope-email-field-index-js.js.map +1 -1
  23. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
  24. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.map +1 -1
  25. package/dist/umd/descope-grid-index-js.js +1 -1
  26. package/dist/umd/descope-grid-index-js.js.map +1 -1
  27. package/dist/umd/descope-hybrid-field-index-js.js +2 -2
  28. package/dist/umd/descope-hybrid-field-index-js.js.map +1 -1
  29. package/dist/umd/descope-multi-select-combo-box-index-js.js +1 -1
  30. package/dist/umd/descope-multi-select-combo-box-index-js.js.map +1 -1
  31. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
  32. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js.map +1 -1
  33. package/dist/umd/descope-new-password-index-js.js +1 -1
  34. package/dist/umd/descope-new-password-index-js.js.map +1 -1
  35. package/dist/umd/descope-number-field-index-js.js +1 -1
  36. package/dist/umd/descope-number-field-index-js.js.map +1 -1
  37. package/dist/umd/descope-passcode-index-js.js +2 -2
  38. package/dist/umd/descope-passcode-index-js.js.map +1 -1
  39. package/dist/umd/descope-password-index-js.js +1 -1
  40. package/dist/umd/descope-password-index-js.js.map +1 -1
  41. package/dist/umd/descope-radio-group-index-js.js +1 -1
  42. package/dist/umd/descope-radio-group-index-js.js.map +1 -1
  43. package/dist/umd/descope-scopes-list-index-js.js +1 -1
  44. package/dist/umd/descope-scopes-list-index-js.js.map +1 -1
  45. package/dist/umd/descope-security-questions-setup-index-js.js +1 -1
  46. package/dist/umd/descope-security-questions-setup-index-js.js.map +1 -1
  47. package/dist/umd/descope-security-questions-verify-index-js.js +2 -2
  48. package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -1
  49. package/dist/umd/descope-text-area-index-js.js +1 -1
  50. package/dist/umd/descope-text-area-index-js.js.map +1 -1
  51. package/dist/umd/descope-text-field-index-js.js +2 -2
  52. package/dist/umd/descope-text-field-index-js.js.map +1 -1
  53. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
  54. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
  55. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
  56. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
  57. package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
  58. package/dist/umd/phone-fields-descope-phone-field-index-js.js.map +1 -1
  59. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
  60. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -1
  61. package/package.json +6 -6
  62. package/src/components/boolean-fields/descope-checkbox/CheckboxClass.js +1 -0
  63. package/src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js +1 -0
  64. package/src/components/button-selection-group-fields/baseButtonSelectionGroup.js +1 -0
  65. package/src/components/descope-hybrid-field/HybridFieldClass.js +10 -0
  66. package/src/components/descope-multi-select-combo-box/MultiSelectComboBoxClass.js +1 -0
  67. package/src/components/descope-new-password/NewPasswordClass.js +1 -0
  68. package/src/components/descope-passcode/PasscodeClass.js +1 -0
  69. package/src/components/descope-password/PasswordClass.js +2 -1
  70. package/src/components/descope-security-questions-verify/SecurityQuestionsVerifyClass.js +4 -0
  71. package/src/components/descope-text-area/TextAreaClass.js +1 -0
  72. package/src/components/descope-text-field/textFieldMappings.js +1 -0
  73. package/src/components/mapping-fields/descope-saml-group-mappings/SamlGroupMappingsClass.js +1 -0
  74. package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +2 -1
  75. package/src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js +1 -0
  76. package/src/theme/components/buttonSelectionGroup/baseButtonSelectionGroup.js +1 -0
  77. package/src/theme/components/checkbox.js +1 -0
  78. package/src/theme/components/emailField.js +1 -0
  79. package/src/theme/components/hybridField.js +1 -0
  80. package/src/theme/components/inputWrapper.js +1 -0
  81. package/src/theme/components/multiSelectComboBox.js +1 -0
  82. package/src/theme/components/newPassword.js +1 -0
  83. package/src/theme/components/numberField.js +1 -0
  84. package/src/theme/components/passcode.js +1 -0
  85. package/src/theme/components/password.js +1 -0
  86. package/src/theme/components/phoneField.js +1 -0
  87. package/src/theme/components/phoneInputBoxField.js +1 -0
  88. package/src/theme/components/radioGroup/radioGroup.js +1 -0
  89. package/src/theme/components/samlGroupMappings.js +1 -0
  90. package/src/theme/components/switchToggle.js +1 -0
  91. package/src/theme/components/textArea.js +1 -0
  92. package/src/theme/components/textField.js +1 -0
@@ -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),o=n(79365),r=n(81365);const a=(...e)=>(0,i.Zz)(o.XX,o._$,o.yF,o.jd)((0,r.q)(...e))},18330:(e,t,n)=>{n.d(t,{f:()=>o});var i=n(44099);class o 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:()=>r});var i=n(97810),o=n(41813);const r=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,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:()=>d,T:()=>r});var i=n(3393),o=n(97810);const r=(0,o.xE)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],l=(0,i.y)({componentName:r,baseSelector:"div"}),d=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,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:()=>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:()=>s,q:()=>y});var i=n(97810),o=n(9696),r=n(79365),a=n(19847),l=n(47507),d=n(73551);const s=(0,i.xE)("checkbox"),{host:p,component:c,checkboxElement:h,checkboxSurface:u,checkboxLabel:b,requiredIndicator:f,helperText:x,errorMessage:g}={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)"}},y=(0,o.Zz)((0,r.RF)({mappings:{hostWidth:{...p,property:"width"},hostDirection:{...p,property:"direction"},fontSize:[p,h,b],fontFamily:[b,x,g],labelTextColor:{...b,property:"color"},labelSpacing:{...b,property:"padding-inline-start"},labelLineHeight:{...b,property:"line-height"},labelFontWeight:{...b,property:"font-weight"},labelRequiredIndicator:{...f,property:"content"},errorMessageTextColor:{...g,property:"color"},errorMessageIcon:{...g,property:"background-image"},errorMessageIconSize:{...g,property:"background-size"},errorMessageIconPadding:{...g,property:"padding-inline-start"},errorMessageIconRepeat:{...g,property:"background-repeat"},errorMessageIconPosition:{...g,property:"background-position"},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"},{...c,property:"font-size"}]}}),r.VO,(0,r.OZ)({proxyProps:["value","selectionStart"]}),r.tQ,a.A)((0,r.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${l.A}\n ${(0,d.cy)(y.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"],componentName:s}))},73551:(e,t,n)=>{n.d(t,{$J:()=>h,I4:()=>a,Kl:()=>u,LJ:()=>c,Qv:()=>r,X6:()=>d,cy:()=>i,fu:()=>s,kG:()=>p,lS:()=>l,zm:()=>o});const i=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,o=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,r=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,l=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,d=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",s=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,p=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,c=(e,t)=>`\n ${o(e)}\n ${a(e)}\n ${l(e)}\n ${r(e)}\n ${((e,t)=>`\n ${e} input:-webkit-autofill,\n ${e} input:-webkit-autofill::first-line,\n ${e} input:-webkit-autofill:hover,\n ${e} input:-webkit-autofill:active,\n ${e} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${t.inputValueTextColor});\n box-shadow: 0 0 0 var(${t.inputHeight}) var(${t.inputBackgroundColor}) inset;\n }\n`)(e,t)}\n ${p(e)}\n ${(e=>`\n ${e}::before {\n\t\theight: unset;\n\t}\n`)(e)}\n ${(e=>`\n ${e} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(e)}\n ${(e=>`\n ${e}::part(input-field)::after {\n border: none;\n }\n`)(e)}\n`,h=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,u=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '}}]);
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),o=n(79365),r=n(81365);const a=(...e)=>(0,i.Zz)(o.XX,o._$,o.yF,o.jd)((0,r.q)(...e))},18330:(e,t,n)=>{n.d(t,{f:()=>o});var i=n(44099);class o 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:()=>r});var i=n(97810),o=n(41813);const r=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,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:()=>d,T:()=>r});var i=n(3393),o=n(97810);const r=(0,o.xE)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],l=(0,i.y)({componentName:r,baseSelector:"div"}),d=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,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:()=>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:()=>s,q:()=>y});var i=n(97810),o=n(9696),r=n(79365),a=n(19847),l=n(47507),d=n(73551);const s=(0,i.xE)("checkbox"),{host:p,component:c,checkboxElement:h,checkboxSurface:u,checkboxLabel:b,requiredIndicator:f,helperText:x,errorMessage:g}={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)"}},y=(0,o.Zz)((0,r.RF)({mappings:{hostWidth:{...p,property:"width"},hostDirection:{...p,property:"direction"},fontSize:[p,h,b],fontFamily:[b,x,g],labelTextColor:{...b,property:"color"},labelSpacing:{...b,property:"padding-inline-start"},labelLineHeight:{...b,property:"line-height"},labelFontWeight:{...b,property:"font-weight"},labelRequiredIndicator:{...f,property:"content"},errorMessageTextColor:{...g,property:"color"},errorMessageIcon:{...g,property:"background-image"},errorMessageIconSize:{...g,property:"background-size"},errorMessageIconPadding:{...g,property:"padding-inline-start"},errorMessageIconRepeat:{...g,property:"background-repeat"},errorMessageIconPosition:{...g,property:"background-position"},errorMessageFontSize:{...g,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"},{...c,property:"font-size"}]}}),r.VO,(0,r.OZ)({proxyProps:["value","selectionStart"]}),r.tQ,a.A)((0,r.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${l.A}\n ${(0,d.cy)(y.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"],componentName:s}))},73551:(e,t,n)=>{n.d(t,{$J:()=>h,I4:()=>a,Kl:()=>u,LJ:()=>c,Qv:()=>r,X6:()=>d,cy:()=>i,fu:()=>s,kG:()=>p,lS:()=>l,zm:()=>o});const i=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,o=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,r=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,l=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,d=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",s=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,p=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,c=(e,t)=>`\n ${o(e)}\n ${a(e)}\n ${l(e)}\n ${r(e)}\n ${((e,t)=>`\n ${e} input:-webkit-autofill,\n ${e} input:-webkit-autofill::first-line,\n ${e} input:-webkit-autofill:hover,\n ${e} input:-webkit-autofill:active,\n ${e} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${t.inputValueTextColor});\n box-shadow: 0 0 0 var(${t.inputHeight}) var(${t.inputBackgroundColor}) inset;\n }\n`)(e,t)}\n ${p(e)}\n ${(e=>`\n ${e}::before {\n\t\theight: unset;\n\t}\n`)(e)}\n ${(e=>`\n ${e} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(e)}\n ${(e=>`\n ${e}::part(input-field)::after {\n border: none;\n }\n`)(e)}\n`,h=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,u=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '}}]);
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,0ECO9B,MAAMC,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,qDCLhB,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,EACX,EAEFO,aAAa,GAEjB,+DC3BK,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,OACA,QACA,UACA,WACA,eAIJ,OAAalB,KAAKc,aAAcd,KAAM,CAAC,aACvC,QAAUA,KAAMA,KAAKc,aAAc,CAAEI,aAAc,CAAC,YACtD,sEC/BG,MAAMC,GAAgB,QAAiB,0BAExCC,EAAoB,CAAC,WAAY,QAAS,UAAW,YAErDC,G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W,CACT,IAAKpC,EAAiBU,SAAU,SAChC,IAAKV,EAAiBU,SAAU,UAChC,IAAKT,EAAiBS,SAAU,aAChC,IAAKX,EAAWW,SAAU,iBAIhC,MACA,QAAgB,CAAE2B,WAAY,CAAC,QAAS,oBACxC,KACA,IA/C2B,EAiD3B,QAAY,CACVC,MAAO,GACPC,eAAgB,oBAChBC,MAAO,IAAM,WACZ,eACG,QAAuBjC,EAAckC,svBAwCzCC,iBAAkB,CAAC,QAAS,YAC5BhE,gJClIG,MAAMiE,EAA0BF,GAAe,4CAE1BA,EAAWT,4BAA4BS,EAAWR,gCAwBjEW,EAAuBC,GAAS,SACvCA,sIASOC,EAAmBD,GAAS,SACnCA,6GAOOE,EAAoBF,GAAS,SACpCA,mBACAA,wBACAA,mEAKOG,EAAwB,CAACH,EAAMI,EAAM,UAAY,SACxDJ,iBAAoBI,2BACvBJ,iBAAoBI,gDAgBVC,EAA8B,IAAM,uGAOpCC,EAA2BN,GAAS,SAC3CA,8DAKOO,EAAyCP,GAAS,SACzDA,oEAKOQ,EAAsB,CAACR,EAAMJ,IAAe,SACnDG,EAAoBC,WACpBE,EAAiBF,WACjBG,EAAsBH,WACtBC,EAAgBD,WAlCY,EAACA,EAAMJ,IAAe,SAClDI,kCACAA,8CACAA,wCACAA,yCACAA,0EACiCJ,EAAWhB,wDAClBgB,EAAWa,oBAAoBb,EAAWf,wCA4BpE6B,CAAmBV,EAAMJ,WACzBW,EAAsCP,WAnFV,CAACA,GAAS,SACtCA,yCAmFAW,CAAmBX,WA9EQ,CAACA,GAAS,SACrCA,mHA8EAY,CAAkBZ,WA3FwB,CAACA,GAAS,SACpDA,gEA2FAa,CAAiCb,OAM1Bc,EAA2Bd,GAAS,4ZAiB3CA,yJAQOe,EAA0B,IAC9B","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","webpack://@descope/web-components-ui/./src/helpers/themeHelpers/resetHelpers.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\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'],\n componentName,\n })\n);\n","export const useHostExternalPadding = (cssVarList) => `\n :host {\n padding: calc(var(${cssVarList.inputOutlineWidth}) + var(${cssVarList.inputOutlineOffset}))\n }\n`;\n\nexport const resetInputFieldUnderlayingBorder = (name) => `\n ${name}::part(input-field)::after {\n border: none;\n }\n`;\n\nexport const resetInitialHeight = (name) => `\n ${name}::before {\n\t\theight: unset;\n\t}\n`;\n\nexport const resetInputElement = (name) => `\n ${name} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputContainer = (name) => `\n ${name} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputField = (name) => `\n ${name}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`;\n\nexport const resetInputCursor = (name) => `\n ${name} > label,\n ${name}::part(label),\n ${name}::part(required-indicator) {\n cursor: pointer;\n }\n`;\n\nexport const resetInputPlaceholder = (name, ele = 'input') => `\n ${name}[disabled] > ${ele}:placeholder-shown,\n\t${name}[readonly] > ${ele}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`;\n\nexport const resetInputAutoFill = (name, cssVarList) => `\n ${name} input:-webkit-autofill,\n ${name} input:-webkit-autofill::first-line,\n ${name} input:-webkit-autofill:hover,\n ${name} input:-webkit-autofill:active,\n ${name} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${cssVarList.inputValueTextColor});\n box-shadow: 0 0 0 var(${cssVarList.inputHeight}) var(${cssVarList.inputBackgroundColor}) inset;\n }\n`;\n\nexport const resetInputFieldDefaultWidth = () => `\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputReadonlyStyle = (name) => `\n ${name}::part(input-field)::after {\n opacity: 0;\n }\n`;\n\nexport const resetInputFieldInvalidBackgroundColor = (name) => `\n ${name}::part(input-field)::after {\n background: none;\n }\n`;\n\nexport const resetInputOverrides = (name, cssVarList) => `\n ${resetInputContainer(name)}\n ${resetInputCursor(name)}\n ${resetInputPlaceholder(name)}\n ${resetInputField(name)}\n ${resetInputAutoFill(name, cssVarList)}\n ${resetInputFieldInvalidBackgroundColor(name)}\n ${resetInitialHeight(name)}\n ${resetInputElement(name)}\n ${resetInputFieldUnderlayingBorder(name)}\n`;\n\n// This function is used to support RTL correctly for input components.\n// It also fixes the error message to be displayed LTR since we currently\n// don't support RTL for error messages.\nexport const resetInputLabelPosition = (name) => `\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${name} [slot=\"label\"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`;\n\nexport const inputFloatingLabelStyle = () => {\n return `\n :host([label-type=\"floating\"]) {\n position: relative;\n }\n :host([label-type=\"floating\"][has-label]) [slot=\"label\"] {\n padding: 0;\n }\n :host([label-type=\"floating\"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\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","inputValueTextColor","inputBackgroundColor","inputBorderRadius","inputBorderWidth","inputBorderOffset","inputBorderColor","inputBorderStyle","inputOutlineWidth","inputOutlineOffset","inputOutlineColor","inputOutlineStyle","inputSize","proxyProps","slots","wrappedEleName","style","cssVarList","excludeAttrsSync","useHostExternalPadding","resetInputContainer","name","resetInputField","resetInputCursor","resetInputPlaceholder","ele","resetInputFieldDefaultWidth","resetInputReadonlyStyle","resetInputFieldInvalidBackgroundColor","resetInputOverrides","inputHeight","resetInputAutoFill","resetInitialHeight","resetInputElement","resetInputFieldUnderlayingBorder","resetInputLabelPosition","inputFloatingLabelStyle"],"sourceRoot":""}
1
+ {"version":3,"file":"boolean-fields-descope-checkbox-index-js.js","mappings":";mKAEAA,eAAeC,OAAO,IAAe,0ECO9B,MAAMC,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,qDCLhB,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,EACX,EAEFO,aAAa,GAEjB,+DC3BK,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,OACA,QACA,UACA,WACA,eAIJ,OAAalB,KAAKc,aAAcd,KAAM,CAAC,aACvC,QAAUA,KAAMA,KAAKc,aAAc,CAAEI,aAAc,CAAC,YACtD,sEC/BG,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,WAAAjC,GACEG,QACAO,KAA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AChC,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,YAC5BjE,gJCnIG,MAAMkE,EAA0BF,GAAe,4CAE1BA,EAAWT,4BAA4BS,EAAWR,gCAwBjEW,EAAuBC,GAAS,SACvCA,sIASOC,EAAmBD,GAAS,SACnCA,6GAOOE,EAAoBF,GAAS,SACpCA,mBACAA,wBACAA,mEAKOG,EAAwB,CAACH,EAAMI,EAAM,UAAY,SACxDJ,iBAAoBI,2BACvBJ,iBAAoBI,gDAgBVC,EAA8B,IAAM,uGAOpCC,EAA2BN,GAAS,SAC3CA,8DAKOO,EAAyCP,GAAS,SACzDA,oEAKOQ,EAAsB,CAACR,EAAMJ,IAAe,SACnDG,EAAoBC,WACpBE,EAAiBF,WACjBG,EAAsBH,WACtBC,EAAgBD,WAlCY,EAACA,EAAMJ,IAAe,SAClDI,kCACAA,8CACAA,wCACAA,yCACAA,0EACiCJ,EAAWhB,wDAClBgB,EAAWa,oBAAoBb,EAAWf,wCA4BpE6B,CAAmBV,EAAMJ,WACzBW,EAAsCP,WAnFV,CAACA,GAAS,SACtCA,yCAmFAW,CAAmBX,WA9EQ,CAACA,GAAS,SACrCA,mHA8EAY,CAAkBZ,WA3FwB,CAACA,GAAS,SACpDA,gEA2FAa,CAAiCb,OAM1Bc,EAA2Bd,GAAS,4ZAiB3CA,yJAQOe,EAA0B,IAC9B","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","webpack://@descope/web-components-ui/./src/helpers/themeHelpers/resetHelpers.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'],\n componentName,\n })\n);\n","export const useHostExternalPadding = (cssVarList) => `\n :host {\n padding: calc(var(${cssVarList.inputOutlineWidth}) + var(${cssVarList.inputOutlineOffset}))\n }\n`;\n\nexport const resetInputFieldUnderlayingBorder = (name) => `\n ${name}::part(input-field)::after {\n border: none;\n }\n`;\n\nexport const resetInitialHeight = (name) => `\n ${name}::before {\n\t\theight: unset;\n\t}\n`;\n\nexport const resetInputElement = (name) => `\n ${name} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputContainer = (name) => `\n ${name} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputField = (name) => `\n ${name}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`;\n\nexport const resetInputCursor = (name) => `\n ${name} > label,\n ${name}::part(label),\n ${name}::part(required-indicator) {\n cursor: pointer;\n }\n`;\n\nexport const resetInputPlaceholder = (name, ele = 'input') => `\n ${name}[disabled] > ${ele}:placeholder-shown,\n\t${name}[readonly] > ${ele}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`;\n\nexport const resetInputAutoFill = (name, cssVarList) => `\n ${name} input:-webkit-autofill,\n ${name} input:-webkit-autofill::first-line,\n ${name} input:-webkit-autofill:hover,\n ${name} input:-webkit-autofill:active,\n ${name} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${cssVarList.inputValueTextColor});\n box-shadow: 0 0 0 var(${cssVarList.inputHeight}) var(${cssVarList.inputBackgroundColor}) inset;\n }\n`;\n\nexport const resetInputFieldDefaultWidth = () => `\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputReadonlyStyle = (name) => `\n ${name}::part(input-field)::after {\n opacity: 0;\n }\n`;\n\nexport const resetInputFieldInvalidBackgroundColor = (name) => `\n ${name}::part(input-field)::after {\n background: none;\n }\n`;\n\nexport const resetInputOverrides = (name, cssVarList) => `\n ${resetInputContainer(name)}\n ${resetInputCursor(name)}\n ${resetInputPlaceholder(name)}\n ${resetInputField(name)}\n ${resetInputAutoFill(name, cssVarList)}\n ${resetInputFieldInvalidBackgroundColor(name)}\n ${resetInitialHeight(name)}\n ${resetInputElement(name)}\n ${resetInputFieldUnderlayingBorder(name)}\n`;\n\n// This function is used to support RTL correctly for input components.\n// It also fixes the error message to be displayed LTR since we currently\n// don't support RTL for error messages.\nexport const resetInputLabelPosition = (name) => `\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${name} [slot=\"label\"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`;\n\nexport const inputFloatingLabelStyle = () => {\n return `\n :host([label-type=\"floating\"]) {\n position: relative;\n }\n :host([label-type=\"floating\"][has-label]) [slot=\"label\"] {\n padding: 0;\n }\n :host([label-type=\"floating\"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\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","useHostExternalPadding","resetInputContainer","name","resetInputField","resetInputCursor","resetInputPlaceholder","ele","resetInputFieldDefaultWidth","resetInputReadonlyStyle","resetInputFieldInvalidBackgroundColor","resetInputOverrides","inputHeight","resetInputAutoFill","resetInitialHeight","resetInputElement","resetInputFieldUnderlayingBorder","resetInputLabelPosition","inputFloatingLabelStyle"],"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:(t,e,n)=>{n.r(e);var i=n(41813);customElements.define(i.T,i.A)},3393:(t,e,n)=>{n.d(e,{y:()=>a});var i=n(9696),o=n(79365),r=n(81365);const a=(...t)=>(0,i.Zz)(o.XX,o._$,o.yF,o.jd)((0,r.q)(...t))},18330:(t,e,n)=>{n.d(e,{f:()=>o});var i=n(44099);class o extends i.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:()=>r});var i=n(97810),o=n(41813);const r=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,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"]})}}},21934:(t,e,n)=>{n.r(e),n.d(e,{SwitchToggleClass:()=>i.H,componentName:()=>i.T});var i=n(83150);n(67468),n(11284),n(3274),customElements.define(i.T,i.H)},41813:(t,e,n)=>{n.d(e,{A:()=>d,T:()=>r});var i=n(3393),o=n(97810);const r=(0,o.xE)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],l=(0,i.y)({componentName:r,baseSelector:"div"}),d=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(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:a}),(0,o.Gh)(this,this.checkbox,{includeAttrs:["checked"]}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),"readonly"===t&&this.onReadOnlyChange(null!==n)}onReadOnlyChange(t){this.baseElement.setAttribute("inert",t)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}},47507:(t,e,n)=>{n.d(e,{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`},73551:(t,e,n)=>{n.d(e,{$J:()=>h,I4:()=>a,Kl:()=>u,LJ:()=>p,Qv:()=>r,X6:()=>d,cy:()=>i,fu:()=>s,kG:()=>c,lS:()=>l,zm:()=>o});const i=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,o=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,r=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,l=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,d=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",s=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,c=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,p=(t,e)=>`\n ${o(t)}\n ${a(t)}\n ${l(t)}\n ${r(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${c(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,h=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,u=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},83150:(t,e,n)=>{n.d(e,{H:()=>g,T:()=>s});var i=n(97810),o=n(9696),r=n(79365),a=n(19847),l=n(47507),d=n(73551);const s=(0,i.xE)("switch-toggle"),{host:c,component:p,checkboxElement:h,checkboxSurface:u,checkboxLabel:b,requiredIndicator:f,helperText:x,errorMessage:k}={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)"}},g=(0,o.Zz)((0,r.RF)({mappings:{hostWidth:{...c,property:"width"},hostDirection:{...c,property:"direction"},fontSize:[p,b,b],fontFamily:[b,x,k],labelTextColor:{...b,property:"color"},labelSpacing:{...b,property:"padding-inline-start"},labelLineHeight:{...b,property:"line-height"},labelFontWeight:{...b,property:"font-weight"},labelRequiredIndicator:{...f,property:"content"},errorMessageTextColor:{...k,property:"color"},errorMessageIcon:{...k,property:"background-image"},errorMessageIconSize:{...k,property:"background-size"},errorMessageIconPadding:{...k,property:"padding-inline-start"},errorMessageIconRepeat:{...k,property:"background-repeat"},errorMessageIconPosition:{...k,property:"background-position"},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"}}}),r.VO,(0,r.OZ)({proxyProps:["value","selectionStart"]}),r.tQ,a.A)((0,r.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${l.A}\n\t\t\t${(0,d.cy)(g.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"],componentName:s}))}}]);
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1448,7362],{3274:(t,e,n)=>{n.r(e);var i=n(41813);customElements.define(i.T,i.A)},3393:(t,e,n)=>{n.d(e,{y:()=>a});var i=n(9696),o=n(79365),r=n(81365);const a=(...t)=>(0,i.Zz)(o.XX,o._$,o.yF,o.jd)((0,r.q)(...t))},18330:(t,e,n)=>{n.d(e,{f:()=>o});var i=n(44099);class o extends i.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:()=>r});var i=n(97810),o=n(41813);const r=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,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"]})}}},21934:(t,e,n)=>{n.r(e),n.d(e,{SwitchToggleClass:()=>i.H,componentName:()=>i.T});var i=n(83150);n(67468),n(11284),n(3274),customElements.define(i.T,i.H)},41813:(t,e,n)=>{n.d(e,{A:()=>d,T:()=>r});var i=n(3393),o=n(97810);const r=(0,o.xE)("boolean-field-internal"),a=["disabled","label","invalid","readonly"],l=(0,i.y)({componentName:r,baseSelector:"div"}),d=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(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:a}),(0,o.Gh)(this,this.checkbox,{includeAttrs:["checked"]}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),"readonly"===t&&this.onReadOnlyChange(null!==n)}onReadOnlyChange(t){this.baseElement.setAttribute("inert",t)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}},47507:(t,e,n)=>{n.d(e,{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`},73551:(t,e,n)=>{n.d(e,{$J:()=>h,I4:()=>a,Kl:()=>u,LJ:()=>p,Qv:()=>r,X6:()=>d,cy:()=>i,fu:()=>s,kG:()=>c,lS:()=>l,zm:()=>o});const i=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,o=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,r=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,l=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,d=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",s=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,c=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,p=(t,e)=>`\n ${o(t)}\n ${a(t)}\n ${l(t)}\n ${r(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${c(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,h=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,u=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},83150:(t,e,n)=>{n.d(e,{H:()=>g,T:()=>s});var i=n(97810),o=n(9696),r=n(79365),a=n(19847),l=n(47507),d=n(73551);const s=(0,i.xE)("switch-toggle"),{host:c,component:p,checkboxElement:h,checkboxSurface:u,checkboxLabel:b,requiredIndicator:f,helperText:x,errorMessage:k}={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)"}},g=(0,o.Zz)((0,r.RF)({mappings:{hostWidth:{...c,property:"width"},hostDirection:{...c,property:"direction"},fontSize:[p,b,b],fontFamily:[b,x,k],labelTextColor:{...b,property:"color"},labelSpacing:{...b,property:"padding-inline-start"},labelLineHeight:{...b,property:"line-height"},labelFontWeight:{...b,property:"font-weight"},labelRequiredIndicator:{...f,property:"content"},errorMessageTextColor:{...k,property:"color"},errorMessageIcon:{...k,property:"background-image"},errorMessageIconSize:{...k,property:"background-size"},errorMessageIconPadding:{...k,property:"padding-inline-start"},errorMessageIconRepeat:{...k,property:"background-repeat"},errorMessageIconPosition:{...k,property:"background-position"},errorMessageFontSize:{...k,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"}}}),r.VO,(0,r.OZ)({proxyProps:["value","selectionStart"]}),r.tQ,a.A)((0,r.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${l.A}\n\t\t\t${(0,d.cy)(g.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"],componentName:s}))}}]);
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,0ECO9B,MAAMC,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,qDCLhB,MAAMC,UAAwB,IACnC,WAAAC,CAAYC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B,IAAK7B,EAAOW,SAAU,oBAC5CmB,kBAAmB,IAAK9B,EAAOW,SAAU,iBACzCoB,WAAY,CAAC,IAAK/B,EAAOW,SAAU,UACnCqB,YAAa,CACX,IAAK9B,EAAMS,SAAU,aACrB,IAAKX,EAAOW,SAAU,WAGxBsB,SAAU,CACR,IAAK/B,EAAMS,SAAU,SACrB,IAAKT,EAAMS,SAAU,WAEvBuB,cAAe,IAAKhC,EAAMS,SAAU,SACpCwB,WAAY,IAAKjC,EAAMS,SAAU,iBACjCyB,uBAAwB,IAAKlC,EAAMS,SAAU,cAC7C0B,UAAW,IAAKnC,EAAMS,SAAU,oBAChC2B,cAAe,IAAKpC,EAAMS,SAAU,OACpC4B,eAAgB,IAAKrC,EAAMS,SAAU,QAErClC,kBAAmB,IAAKuB,EAAOW,SAAU,iBACzCjC,mBAAoB,IAAKsB,EAAOW,SAAU,kBAC1C6B,kBAAmB,IAAKxC,EAAOW,SAAU,iBACzC8B,kBAAmB,IAAKzC,EAAOW,SAAU,oBAG7C,MACA,QAAgB,CAAE+B,WAAY,CAAC,QAAS,oBACxC,KACA,IAtD+B,EAwD/B,QAAY,CACVC,MAAO,GACPC,eAAgB,oBAChBC,MAAO,IAAM,WACZ,eACA,QAAuBrC,EAAkBhC,+/BAsD1CsE,iBAAkB,CAAC,QAAS,YAC5B5F","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/helpers/themeHelpers/resetHelpers.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","export const useHostExternalPadding = (cssVarList) => `\n :host {\n padding: calc(var(${cssVarList.inputOutlineWidth}) + var(${cssVarList.inputOutlineOffset}))\n }\n`;\n\nexport const resetInputFieldUnderlayingBorder = (name) => `\n ${name}::part(input-field)::after {\n border: none;\n }\n`;\n\nexport const resetInitialHeight = (name) => `\n ${name}::before {\n\t\theight: unset;\n\t}\n`;\n\nexport const resetInputElement = (name) => `\n ${name} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputContainer = (name) => `\n ${name} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputField = (name) => `\n ${name}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`;\n\nexport const resetInputCursor = (name) => `\n ${name} > label,\n ${name}::part(label),\n ${name}::part(required-indicator) {\n cursor: pointer;\n }\n`;\n\nexport const resetInputPlaceholder = (name, ele = 'input') => `\n ${name}[disabled] > ${ele}:placeholder-shown,\n\t${name}[readonly] > ${ele}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`;\n\nexport const resetInputAutoFill = (name, cssVarList) => `\n ${name} input:-webkit-autofill,\n ${name} input:-webkit-autofill::first-line,\n ${name} input:-webkit-autofill:hover,\n ${name} input:-webkit-autofill:active,\n ${name} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${cssVarList.inputValueTextColor});\n box-shadow: 0 0 0 var(${cssVarList.inputHeight}) var(${cssVarList.inputBackgroundColor}) inset;\n }\n`;\n\nexport const resetInputFieldDefaultWidth = () => `\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputReadonlyStyle = (name) => `\n ${name}::part(input-field)::after {\n opacity: 0;\n }\n`;\n\nexport const resetInputFieldInvalidBackgroundColor = (name) => `\n ${name}::part(input-field)::after {\n background: none;\n }\n`;\n\nexport const resetInputOverrides = (name, cssVarList) => `\n ${resetInputContainer(name)}\n ${resetInputCursor(name)}\n ${resetInputPlaceholder(name)}\n ${resetInputField(name)}\n ${resetInputAutoFill(name, cssVarList)}\n ${resetInputFieldInvalidBackgroundColor(name)}\n ${resetInitialHeight(name)}\n ${resetInputElement(name)}\n ${resetInputFieldUnderlayingBorder(name)}\n`;\n\n// This function is used to support RTL correctly for input components.\n// It also fixes the error message to be displayed LTR since we currently\n// don't support RTL for error messages.\nexport const resetInputLabelPosition = (name) => `\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${name} [slot=\"label\"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`;\n\nexport const inputFloatingLabelStyle = () => {\n return `\n :host([label-type=\"floating\"]) {\n position: relative;\n }\n :host([label-type=\"floating\"][has-label]) [slot=\"label\"] {\n padding: 0;\n }\n :host([label-type=\"floating\"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\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: { ...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\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\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'],\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","useHostExternalPadding","cssVarList","inputOutlineWidth","inputOutlineOffset","resetInputContainer","name","resetInputField","resetInputCursor","resetInputPlaceholder","ele","resetInputFieldDefaultWidth","resetInputReadonlyStyle","resetInputFieldInvalidBackgroundColor","resetInputOverrides","inputValueTextColor","inputHeight","inputBackgroundColor","resetInputAutoFill","resetInitialHeight","resetInputElement","resetInputFieldUnderlayingBorder","resetInputLabelPosition","inputFloatingLabelStyle","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","trackBorderWidth","trackBorderStyle","trackBorderColor","trackBackgroundColor","trackBorderRadius","trackWidth","trackHeight","knobSize","knobTextColor","knobRadius","knobTransitionDuration","knobColor","knobTopOffset","knobLeftOffset","inputOutlineColor","inputOutlineStyle","proxyProps","slots","wrappedEleName","style","excludeAttrsSync"],"sourceRoot":""}
1
+ {"version":3,"file":"boolean-fields-descope-switch-toggle-index-js.js","mappings":";mKAEAA,eAAeC,OAAO,IAAe,0ECO9B,MAAMC,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,qDCLhB,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,EACX,EAEFO,aAAa,GAEjB,+DC3BK,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,OACA,QACA,UACA,WACA,eAIJ,OAAalB,KAAKc,aAAcd,KAAM,CAAC,aACvC,QAAUA,KAAMA,KAAKc,aAAc,CAAEI,aAAc,CAAC,YACtD,6HC7BJjC,eAAeC,OAAO,IAAe,wECF9B,MAAMiC,GAAgB,QAAiB,0BAExCC,EAAoB,CAAC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,oBAChBC,MAAO,IAAM,WACZ,eACA,QAAuBtC,EAAkBhC,+/BAsD1CuE,iBAAkB,CAAC,QAAS,YAC5B7F","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/helpers/themeHelpers/resetHelpers.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","export const useHostExternalPadding = (cssVarList) => `\n :host {\n padding: calc(var(${cssVarList.inputOutlineWidth}) + var(${cssVarList.inputOutlineOffset}))\n }\n`;\n\nexport const resetInputFieldUnderlayingBorder = (name) => `\n ${name}::part(input-field)::after {\n border: none;\n }\n`;\n\nexport const resetInitialHeight = (name) => `\n ${name}::before {\n\t\theight: unset;\n\t}\n`;\n\nexport const resetInputElement = (name) => `\n ${name} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputContainer = (name) => `\n ${name} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputField = (name) => `\n ${name}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`;\n\nexport const resetInputCursor = (name) => `\n ${name} > label,\n ${name}::part(label),\n ${name}::part(required-indicator) {\n cursor: pointer;\n }\n`;\n\nexport const resetInputPlaceholder = (name, ele = 'input') => `\n ${name}[disabled] > ${ele}:placeholder-shown,\n\t${name}[readonly] > ${ele}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`;\n\nexport const resetInputAutoFill = (name, cssVarList) => `\n ${name} input:-webkit-autofill,\n ${name} input:-webkit-autofill::first-line,\n ${name} input:-webkit-autofill:hover,\n ${name} input:-webkit-autofill:active,\n ${name} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${cssVarList.inputValueTextColor});\n box-shadow: 0 0 0 var(${cssVarList.inputHeight}) var(${cssVarList.inputBackgroundColor}) inset;\n }\n`;\n\nexport const resetInputFieldDefaultWidth = () => `\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputReadonlyStyle = (name) => `\n ${name}::part(input-field)::after {\n opacity: 0;\n }\n`;\n\nexport const resetInputFieldInvalidBackgroundColor = (name) => `\n ${name}::part(input-field)::after {\n background: none;\n }\n`;\n\nexport const resetInputOverrides = (name, cssVarList) => `\n ${resetInputContainer(name)}\n ${resetInputCursor(name)}\n ${resetInputPlaceholder(name)}\n ${resetInputField(name)}\n ${resetInputAutoFill(name, cssVarList)}\n ${resetInputFieldInvalidBackgroundColor(name)}\n ${resetInitialHeight(name)}\n ${resetInputElement(name)}\n ${resetInputFieldUnderlayingBorder(name)}\n`;\n\n// This function is used to support RTL correctly for input components.\n// It also fixes the error message to be displayed LTR since we currently\n// don't support RTL for error messages.\nexport const resetInputLabelPosition = (name) => `\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${name} [slot=\"label\"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`;\n\nexport const inputFloatingLabelStyle = () => {\n return `\n :host([label-type=\"floating\"]) {\n position: relative;\n }\n :host([label-type=\"floating\"][has-label]) [slot=\"label\"] {\n padding: 0;\n }\n :host([label-type=\"floating\"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\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: { ...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\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'],\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","useHostExternalPadding","cssVarList","inputOutlineWidth","inputOutlineOffset","resetInputContainer","name","resetInputField","resetInputCursor","resetInputPlaceholder","ele","resetInputFieldDefaultWidth","resetInputReadonlyStyle","resetInputFieldInvalidBackgroundColor","resetInputOverrides","inputValueTextColor","inputHeight","inputBackgroundColor","resetInputAutoFill","resetInitialHeight","resetInputElement","resetInputFieldUnderlayingBorder","resetInputLabelPosition","inputFloatingLabelStyle","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","inputOutlineColor","inputOutlineStyle","proxyProps","slots","wrappedEleName","style","excludeAttrsSync"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1837,3829,8399],{3393:(t,e,n)=>{n.d(e,{y:()=>s});var i=n(9696),r=n(79365),o=n(81365);const s=(...t)=>(0,i.Zz)(r.XX,r._$,r.yF,r.jd)((0,o.q)(...t))},5364:(t,e,n)=>{n.d(e,{T:()=>o,o:()=>s});var i=n(97810),r=n(51298);const o=(0,i.xE)("button-multi-selection-group-internal");class s extends((0,r.m)(o)){#t(){return this.items.filter((t=>t.hasAttribute("selected")))}onClick(t){t.target!==t.currentTarget&&(this.#t().includes(t.target)?t.target.removeAttribute("selected"):t.target.setAttribute("selected","true"),this.dispatchChange())}get value(){return this.#t().map((t=>t.value))}set value(t){this.items.forEach((e=>{t.includes(e.value)?e.setAttribute("selected","true"):e.removeAttribute("selected")}))}get minItemsSelection(){return parseInt(this.getAttribute("min-items-selection"),10)||0}get maxItemsSelection(){return parseInt(this.getAttribute("max-items-selection"),10)||0}#e(t){const e=Array.isArray(t);return e||console.error("default-values must be an array, received:",t),e}get defaultValues(){const t=this.getAttribute("default-values");if(t)try{const e=JSON.parse(t);if(this.#e(e))return e}catch(t){console.error('could not parse data string from attribute "default-values" -',t.message)}return[]}setDefaultValues(){setTimeout((()=>{this.defaultValues&&(this.value=this.defaultValues,this.setCustomValidity())}))}getValidity(){return this.isRequired&&!this.value.length?{valueMissing:!0}:this.isRequired&&this.minItemsSelection&&this.value.length<this.minItemsSelection?{rangeUnderflow:!0}:this.maxItemsSelection&&this.value.length>this.maxItemsSelection?{rangeOverflow:!0}:{}}init(){super.init(),this.setDefaultValues(),this.querySelector("slot").addEventListener("click",this.onClick.bind(this))}}},10767:(t,e,n)=>{n.d(e,{G:()=>i});const i=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},15450:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupItemClass:()=>u});var i=n(79365),r=n(81365),o=n(9696),s=n(97810),a=n(19624),l=n(25964);const d=(0,s.xE)("button-selection-group-item");class c extends((0,r.q)({componentName:d,baseSelector:":host > descope-button"})){get size(){return this.getAttribute("size")||"md"}get variant(){return this.getAttribute("variant")||"contained"}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <descope-button variant="${this.variant}" size="${this.size}" mode="primary">\n <slot></slot>\n </descope-button>\n\t`,(0,l.fz)("\n descope-button {\n max-width: 100%;\n }\n\t\t\tdescope-button > slot {\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow: hidden;\n text-overflow: ellipsis;\n display: inline-block;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n max-width: 100%\n\t\t\t}\n ",this),(0,s.EA)(this,this.baseElement,{includeAttrs:["size","variant"]}),(0,s.EA)(this.baseElement,this,{includeAttrs:["focused","active"]})}handleFocus(){this.shadowRoot.querySelector("descope-button")?.focus()}focus(){this.handleFocus()}init(){super.init(),this.addEventListener("focus",(t=>{t.isTrusted&&this.handleFocus()}))}}const u=(0,o.Zz)((0,i.RF)({mappings:{hostDirection:{selector:()=>a.J.componentName,property:a.J.cssVarList.hostDirection},backgroundColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.backgroundColor},labelTextColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.labelTextColor},borderColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderColor},borderWidth:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderWidth},borderStyle:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderStyle},borderRadius:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderRadius},outlineColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.outlineColor}}}),i.VO,i.tQ)(c);n(30576),customElements.define(d,u)},19624:(t,e,n)=>{n.d(e,{J:()=>h,T:()=>l});var i=n(63200),r=n(25964),o=n(88961),s=n(98538),a=n(10767);const l=(0,r.xE)("button"),{host:d,label:c,slottedIcon:u}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let p;const h=(0,i.Zz)((0,o.RF)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...d,property:"direction"},fontSize:{},fontFamily:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-right",fallback:"0.875em"},{property:"padding-left",fallback:"0.875em"}],labelTextColor:{property:"color"},iconColor:{selector:()=>"::slotted(*)",property:s.S.cssVarList.fill},labelTextDecoration:{...c,property:"text-decoration"},labelSpacing:{...c,property:"gap"},textAlign:{...c,property:"justify-content",fallback:"center"},iconSize:[{...u,property:"width"},{...u,property:"height"}]}}),a.G,o.VO,o.tQ)((0,o.tz)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${p}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${h.cssVarList.outlineWidth}) + var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${h.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${h.cssVarList.hostHeight}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${h.cssVarList.hostWidth}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l})),{color:b,fontSize:g}=h.cssVarList;p=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${b});\n\t\ttop: calc(50% - (var(${g}) / 2));\n\t\tleft: calc(50% - (var(${g}) / 2));\n\t\tborder-width: calc(var(${g}) / 10);\n\t\twidth: var(${g});\n\t\theight: var(${g});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"]) ::part(prefix),\n\t:host([loading="true"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},30576:(t,e,n)=>{n.r(e),n.d(e,{ButtonClass:()=>i.J,componentName:()=>i.T});var i=n(19624);n(83799),customElements.define(i.T,i.J)},31004:(t,e,n)=>{n.d(e,{w:()=>o});var i=n(25414);const r=t=>{const e=i.A.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0}});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},o=async t=>{try{let e;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const n=atob(t.slice(26));e=r(n)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const n=await fetch(t),i=await n.text();e=r(i)}else e=(t=>{const e=document.createElement("img");return e.setAttribute("src",t),e})(t);return e.style.setProperty("max-width","100%"),e.style.setProperty("max-height","100%"),e}catch{return null}}},51298:(t,e,n)=>{n.d(e,{m:()=>s}),n(25964);var i=n(3393),r=n(97810),o=n(13011);const s=t=>{class e extends((0,i.y)({componentName:t,baseSelector:"slot"})){constructor(){super(),this.innerHTML='\n <slot part="wrapper"></slot>\n '}dispatchChange=o.r.bind(this,"change");get items(){return this.querySelector("slot").assignedElements()}get isReadonly(){return"true"===this.getAttribute("readonly")}get size(){return this.getAttribute("size")||"md"}get value(){console.warn("get value","is not implemented")}set value(t){console.warn("set value","is not implemented")}onSizeChange(){this.items.forEach((t=>{t.setAttribute("size",this.size)}))}onReadOnlyChange(){this.querySelector("slot").toggleAttribute("inert",this.isReadonly)}getValidity(){console.warn("getValidity","is not implemented")}onObservedAttributeChange(t){t.forEach((t=>{switch(t){case"size":this.onSizeChange();break;case"readonly":this.onReadOnlyChange()}}))}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.items[0]?.focus()})),super.init?.(),(0,r.mx)(this,this.onObservedAttributeChange.bind(this),{includeAttrs:["size","readonly"]})}}return e}},55162:(t,e,n)=>{n.r(e),n.d(e,{ButtonMultiSelectionGroupClass:()=>d,componentName:()=>l});var i=n(79365),r=n(5364),o=n(9696),s=n(97810),a=n(80001);const l=(0,s.xE)("button-multi-selection-group"),d=(0,o.Zz)((0,i.RF)({mappings:{...a.$W}}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"]}),i.tQ,a._Z,(t=>class extends t{init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n <${r.T}\n \tname="button-selection-group"\n \tslot="input"\n tabindex="-1"\n part="internal-component"\n >\n <slot></slot>\n </${r.T}>\n `,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(r.T),(0,s.EA)(this,this.inputElement,{includeAttrs:["size","default-values","min-items-selection","max-items-selection"]})}}))((0,i.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>a.S$,excludeAttrsSync:["tabindex"],componentName:l}));n(91831),n(15450),customElements.define(l,d)},73551:(t,e,n)=>{n.d(e,{$J:()=>p,I4:()=>s,Kl:()=>h,LJ:()=>u,Qv:()=>o,X6:()=>l,cy:()=>i,fu:()=>d,kG:()=>c,lS:()=>a,zm:()=>r});const i=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,s=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,c=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${r(t)}\n ${s(t)}\n ${a(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${c(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,p=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},80001:(t,e,n)=>{n.d(e,{$W:()=>u,S$:()=>p,_Z:()=>o});var i=n(97810),r=n(73551);const o=t=>class extends t{#n=({value:t,label:e})=>`<descope-button-selection-group-item value="${t}">${e}</descope-button-selection-group-item>`;#i;get renderItem(){return this.#n}set renderItem(t){this.#n=t,this.renderItems()}get size(){return this.inputElement?.size}get data(){if(this.#i)return this.#i;const t=this.getAttribute("data");if(t)try{const e=JSON.parse(t);if(this.isValidDataType(e))return e}catch(t){console.error('could not parse data string from attribute "data" - ',t.message)}return[]}set data(t){this.isValidDataType(t)&&(this.#i=t,this.renderItems())}isValidDataType(t){const e=Array.isArray(t);return e||console.error("data must be an array, received:",t),e}getItemsTemplate(){return this.data?.reduce?.(((t,e)=>t+(this.renderItem?.(e||{})||"")),"")}renderItems(){const t=this.getItemsTemplate();t&&(this.innerHTML=t)}init(){super.init?.(),this.renderItems(),(0,i.mx)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,i.Ge)(this,(({addedNodes:t})=>{t.forEach((t=>{t.setAttribute("size",this.size)}))}))}},{host:s,label:a,requiredIndicator:l,internalWrapper:d,errorMessage:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:()=>':host [part="internal-component"] slot'},errorMessage:{selector:"::part(error-message)"}},u={hostWidth:{...s,property:"width"},hostDirection:{...s,property:"direction"},fontFamily:s,labelTextColor:[{...a,property:"color"},{...l,property:"color"}],labelRequiredIndicator:{...l,property:"content"},errorMessageTextColor:{...c,property:"color"},errorMessageIcon:{...c,property:"background-image"},errorMessageIconSize:{...c,property:"background-size"},errorMessageIconPadding:{...c,property:"padding-inline-start"},errorMessageIconRepeat:{...c,property:"background-repeat"},errorMessageIconPosition:{...c,property:"background-position"},itemsSpacing:{...d,property:"gap"}},p=`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t\t${(0,r.X6)()}\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n [part="internal-component"] {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n display: inline-block;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n [part="internal-component"] slot {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n ${(0,r.$J)("vaadin-text-field")}\n\t\t\t${(0,r.I4)("vaadin-text-field")}\n `},91831:(t,e,n)=>{n.r(e),n.d(e,{ButtonMultiSelectionGroupInternalClass:()=>i.o});var i=n(5364);customElements.define(i.T,i.o)},98538:(t,e,n)=>{n.d(e,{S:()=>c,T:()=>l});var i=n(88961),r=n(72270),o=n(63200),s=n(25964),a=n(31004);const l=(0,s.xE)("icon");class d extends((0,r.qu)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return["src"]}#r;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,s.fz)("\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n ",this)}init(){super.init?.(),this.toggleVisibility(this.src)}toggleVisibility(t){this.style.display=t?"":"none"}get src(){return this.getAttribute("src")}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach((t=>{t.setAttribute("fill",`var(${c.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)}))}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&"src"===t&&(this.toggleVisibility(n),(0,a.w)(this.src).then((t=>{if(this.innerHTML="",t){const e=t.cloneNode(!0);this.updateFillColor(e),this.appendChild(e)}})))}}const c=(0,o.Zz)((0,i.RF)({mappings:{fill:{},alignItems:{}}}),i.VO,i.tQ)(d)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1837,3829,8399],{3393:(t,e,n)=>{n.d(e,{y:()=>s});var i=n(9696),r=n(79365),o=n(81365);const s=(...t)=>(0,i.Zz)(r.XX,r._$,r.yF,r.jd)((0,o.q)(...t))},5364:(t,e,n)=>{n.d(e,{T:()=>o,o:()=>s});var i=n(97810),r=n(51298);const o=(0,i.xE)("button-multi-selection-group-internal");class s extends((0,r.m)(o)){#t(){return this.items.filter((t=>t.hasAttribute("selected")))}onClick(t){t.target!==t.currentTarget&&(this.#t().includes(t.target)?t.target.removeAttribute("selected"):t.target.setAttribute("selected","true"),this.dispatchChange())}get value(){return this.#t().map((t=>t.value))}set value(t){this.items.forEach((e=>{t.includes(e.value)?e.setAttribute("selected","true"):e.removeAttribute("selected")}))}get minItemsSelection(){return parseInt(this.getAttribute("min-items-selection"),10)||0}get maxItemsSelection(){return parseInt(this.getAttribute("max-items-selection"),10)||0}#e(t){const e=Array.isArray(t);return e||console.error("default-values must be an array, received:",t),e}get defaultValues(){const t=this.getAttribute("default-values");if(t)try{const e=JSON.parse(t);if(this.#e(e))return e}catch(t){console.error('could not parse data string from attribute "default-values" -',t.message)}return[]}setDefaultValues(){setTimeout((()=>{this.defaultValues&&(this.value=this.defaultValues,this.setCustomValidity())}))}getValidity(){return this.isRequired&&!this.value.length?{valueMissing:!0}:this.isRequired&&this.minItemsSelection&&this.value.length<this.minItemsSelection?{rangeUnderflow:!0}:this.maxItemsSelection&&this.value.length>this.maxItemsSelection?{rangeOverflow:!0}:{}}init(){super.init(),this.setDefaultValues(),this.querySelector("slot").addEventListener("click",this.onClick.bind(this))}}},10767:(t,e,n)=>{n.d(e,{G:()=>i});const i=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},15450:(t,e,n)=>{n.r(e),n.d(e,{ButtonSelectionGroupItemClass:()=>p});var i=n(79365),r=n(81365),o=n(9696),s=n(97810),a=n(19624),l=n(25964);const d=(0,s.xE)("button-selection-group-item");class c extends((0,r.q)({componentName:d,baseSelector:":host > descope-button"})){get size(){return this.getAttribute("size")||"md"}get variant(){return this.getAttribute("variant")||"contained"}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <descope-button variant="${this.variant}" size="${this.size}" mode="primary">\n <slot></slot>\n </descope-button>\n\t`,(0,l.fz)("\n descope-button {\n max-width: 100%;\n }\n\t\t\tdescope-button > slot {\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow: hidden;\n text-overflow: ellipsis;\n display: inline-block;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n max-width: 100%\n\t\t\t}\n ",this),(0,s.EA)(this,this.baseElement,{includeAttrs:["size","variant"]}),(0,s.EA)(this.baseElement,this,{includeAttrs:["focused","active"]})}handleFocus(){this.shadowRoot.querySelector("descope-button")?.focus()}focus(){this.handleFocus()}init(){super.init(),this.addEventListener("focus",(t=>{t.isTrusted&&this.handleFocus()}))}}const p=(0,o.Zz)((0,i.RF)({mappings:{hostDirection:{selector:()=>a.J.componentName,property:a.J.cssVarList.hostDirection},backgroundColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.backgroundColor},labelTextColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.labelTextColor},borderColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderColor},borderWidth:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderWidth},borderStyle:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderStyle},borderRadius:{selector:()=>a.J.componentName,property:a.J.cssVarList.borderRadius},outlineColor:{selector:()=>a.J.componentName,property:a.J.cssVarList.outlineColor}}}),i.VO,i.tQ)(c);n(30576),customElements.define(d,p)},19624:(t,e,n)=>{n.d(e,{J:()=>h,T:()=>l});var i=n(63200),r=n(25964),o=n(88961),s=n(98538),a=n(10767);const l=(0,r.xE)("button"),{host:d,label:c,slottedIcon:p}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let u;const h=(0,i.Zz)((0,o.RF)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...d,property:"direction"},fontSize:{},fontFamily:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-right",fallback:"0.875em"},{property:"padding-left",fallback:"0.875em"}],labelTextColor:{property:"color"},iconColor:{selector:()=>"::slotted(*)",property:s.S.cssVarList.fill},labelTextDecoration:{...c,property:"text-decoration"},labelSpacing:{...c,property:"gap"},textAlign:{...c,property:"justify-content",fallback:"center"},iconSize:[{...p,property:"width"},{...p,property:"height"}]}}),a.G,o.VO,o.tQ)((0,o.tz)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${u}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${h.cssVarList.outlineWidth}) + var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${h.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${h.cssVarList.hostHeight}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${h.cssVarList.hostWidth}) - var(${h.cssVarList.outlineWidth}) - var(${h.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l})),{color:b,fontSize:g}=h.cssVarList;u=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${b});\n\t\ttop: calc(50% - (var(${g}) / 2));\n\t\tleft: calc(50% - (var(${g}) / 2));\n\t\tborder-width: calc(var(${g}) / 10);\n\t\twidth: var(${g});\n\t\theight: var(${g});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"]) ::part(prefix),\n\t:host([loading="true"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},30576:(t,e,n)=>{n.r(e),n.d(e,{ButtonClass:()=>i.J,componentName:()=>i.T});var i=n(19624);n(83799),customElements.define(i.T,i.J)},31004:(t,e,n)=>{n.d(e,{w:()=>o});var i=n(25414);const r=t=>{const e=i.A.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0}});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},o=async t=>{try{let e;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const n=atob(t.slice(26));e=r(n)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const n=await fetch(t),i=await n.text();e=r(i)}else e=(t=>{const e=document.createElement("img");return e.setAttribute("src",t),e})(t);return e.style.setProperty("max-width","100%"),e.style.setProperty("max-height","100%"),e}catch{return null}}},51298:(t,e,n)=>{n.d(e,{m:()=>s}),n(25964);var i=n(3393),r=n(97810),o=n(13011);const s=t=>{class e extends((0,i.y)({componentName:t,baseSelector:"slot"})){constructor(){super(),this.innerHTML='\n <slot part="wrapper"></slot>\n '}dispatchChange=o.r.bind(this,"change");get items(){return this.querySelector("slot").assignedElements()}get isReadonly(){return"true"===this.getAttribute("readonly")}get size(){return this.getAttribute("size")||"md"}get value(){console.warn("get value","is not implemented")}set value(t){console.warn("set value","is not implemented")}onSizeChange(){this.items.forEach((t=>{t.setAttribute("size",this.size)}))}onReadOnlyChange(){this.querySelector("slot").toggleAttribute("inert",this.isReadonly)}getValidity(){console.warn("getValidity","is not implemented")}onObservedAttributeChange(t){t.forEach((t=>{switch(t){case"size":this.onSizeChange();break;case"readonly":this.onReadOnlyChange()}}))}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.items[0]?.focus()})),super.init?.(),(0,r.mx)(this,this.onObservedAttributeChange.bind(this),{includeAttrs:["size","readonly"]})}}return e}},55162:(t,e,n)=>{n.r(e),n.d(e,{ButtonMultiSelectionGroupClass:()=>d,componentName:()=>l});var i=n(79365),r=n(5364),o=n(9696),s=n(97810),a=n(80001);const l=(0,s.xE)("button-multi-selection-group"),d=(0,o.Zz)((0,i.RF)({mappings:{...a.$W}}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"]}),i.tQ,a._Z,(t=>class extends t{init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n <${r.T}\n \tname="button-selection-group"\n \tslot="input"\n tabindex="-1"\n part="internal-component"\n >\n <slot></slot>\n </${r.T}>\n `,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(r.T),(0,s.EA)(this,this.inputElement,{includeAttrs:["size","default-values","min-items-selection","max-items-selection"]})}}))((0,i.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>a.S$,excludeAttrsSync:["tabindex"],componentName:l}));n(91831),n(15450),customElements.define(l,d)},73551:(t,e,n)=>{n.d(e,{$J:()=>u,I4:()=>s,Kl:()=>h,LJ:()=>p,Qv:()=>o,X6:()=>l,cy:()=>i,fu:()=>d,kG:()=>c,lS:()=>a,zm:()=>r});const i=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,s=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,c=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,p=(t,e)=>`\n ${r(t)}\n ${s(t)}\n ${a(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${c(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,u=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},80001:(t,e,n)=>{n.d(e,{$W:()=>p,S$:()=>u,_Z:()=>o});var i=n(97810),r=n(73551);const o=t=>class extends t{#n=({value:t,label:e})=>`<descope-button-selection-group-item value="${t}">${e}</descope-button-selection-group-item>`;#i;get renderItem(){return this.#n}set renderItem(t){this.#n=t,this.renderItems()}get size(){return this.inputElement?.size}get data(){if(this.#i)return this.#i;const t=this.getAttribute("data");if(t)try{const e=JSON.parse(t);if(this.isValidDataType(e))return e}catch(t){console.error('could not parse data string from attribute "data" - ',t.message)}return[]}set data(t){this.isValidDataType(t)&&(this.#i=t,this.renderItems())}isValidDataType(t){const e=Array.isArray(t);return e||console.error("data must be an array, received:",t),e}getItemsTemplate(){return this.data?.reduce?.(((t,e)=>t+(this.renderItem?.(e||{})||"")),"")}renderItems(){const t=this.getItemsTemplate();t&&(this.innerHTML=t)}init(){super.init?.(),this.renderItems(),(0,i.mx)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,i.Ge)(this,(({addedNodes:t})=>{t.forEach((t=>{t.setAttribute("size",this.size)}))}))}},{host:s,label:a,requiredIndicator:l,internalWrapper:d,errorMessage:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:()=>':host [part="internal-component"] slot'},errorMessage:{selector:"::part(error-message)"}},p={hostWidth:{...s,property:"width"},hostDirection:{...s,property:"direction"},fontFamily:s,labelTextColor:[{...a,property:"color"},{...l,property:"color"}],labelRequiredIndicator:{...l,property:"content"},errorMessageTextColor:{...c,property:"color"},errorMessageIcon:{...c,property:"background-image"},errorMessageIconSize:{...c,property:"background-size"},errorMessageIconPadding:{...c,property:"padding-inline-start"},errorMessageIconRepeat:{...c,property:"background-repeat"},errorMessageIconPosition:{...c,property:"background-position"},errorMessageFontSize:{...c,property:"font-size"},itemsSpacing:{...d,property:"gap"}},u=`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t\t${(0,r.X6)()}\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n [part="internal-component"] {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n display: inline-block;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n [part="internal-component"] slot {\n box-sizing: border-box;\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n ${(0,r.$J)("vaadin-text-field")}\n\t\t\t${(0,r.I4)("vaadin-text-field")}\n `},91831:(t,e,n)=>{n.r(e),n.d(e,{ButtonMultiSelectionGroupInternalClass:()=>i.o});var i=n(5364);customElements.define(i.T,i.o)},98538:(t,e,n)=>{n.d(e,{S:()=>c,T:()=>l});var i=n(88961),r=n(72270),o=n(63200),s=n(25964),a=n(31004);const l=(0,s.xE)("icon");class d extends((0,r.qu)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return["src"]}#r;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,s.fz)("\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n ",this)}init(){super.init?.(),this.toggleVisibility(this.src)}toggleVisibility(t){this.style.display=t?"":"none"}get src(){return this.getAttribute("src")}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach((t=>{t.setAttribute("fill",`var(${c.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)}))}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&"src"===t&&(this.toggleVisibility(n),(0,a.w)(this.src).then((t=>{if(this.innerHTML="",t){const e=t.cloneNode(!0);this.updateFillColor(e),this.appendChild(e)}})))}}const c=(0,o.Zz)((0,i.RF)({mappings:{fill:{},alignItems:{}}}),i.VO,i.tQ)(d)}}]);
2
2
  //# sourceMappingURL=button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map