@descope/web-components-ui 3.20.3 → 3.21.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.
- package/dist/cjs/index.cjs.js +414 -27
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +414 -27
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/1411.js +339 -0
- package/dist/umd/1411.js.map +1 -0
- package/dist/umd/189.js +171 -0
- package/dist/umd/189.js.map +1 -0
- package/dist/umd/2894.js +339 -0
- package/dist/umd/2894.js.map +1 -0
- package/dist/umd/3792.js +339 -0
- package/dist/umd/3792.js.map +1 -0
- package/dist/umd/{9117.js → 384.js} +121 -9
- package/dist/umd/{descope-tooltip.js.LICENSE.txt → 384.js.LICENSE.txt} +2 -2
- package/dist/umd/384.js.map +1 -0
- package/dist/umd/4268.js +339 -0
- package/dist/umd/4268.js.LICENSE.txt +11 -0
- package/dist/umd/4268.js.map +1 -0
- package/dist/umd/513.js +339 -0
- package/dist/umd/513.js.LICENSE.txt +11 -0
- package/dist/umd/513.js.map +1 -0
- package/dist/umd/6227.js +320 -0
- package/dist/umd/6227.js.map +1 -0
- package/dist/umd/6535.js +115 -0
- package/dist/umd/{9275.js.LICENSE.txt → 6535.js.LICENSE.txt} +0 -6
- package/dist/umd/6535.js.map +1 -0
- package/dist/umd/6649.js +339 -0
- package/dist/umd/6649.js.LICENSE.txt +11 -0
- package/dist/umd/6649.js.map +1 -0
- package/dist/umd/7125.js +339 -0
- package/dist/umd/7125.js.LICENSE.txt +11 -0
- package/dist/umd/7125.js.map +1 -0
- package/dist/umd/{5263.js → 8264.js} +5 -5
- package/dist/umd/8264.js.map +1 -0
- package/dist/umd/8983.js +7 -324
- package/dist/umd/8983.js.map +1 -1
- package/dist/umd/9030.js +339 -0
- package/dist/umd/9030.js.LICENSE.txt +11 -0
- package/dist/umd/9030.js.map +1 -0
- package/dist/umd/9380.js +130 -0
- package/dist/umd/9380.js.map +1 -0
- package/dist/umd/9506.js +339 -0
- package/dist/umd/9506.js.LICENSE.txt +11 -0
- package/dist/umd/9506.js.map +1 -0
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -338
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -1
- package/dist/umd/descope-apps-list.js +161 -1
- package/dist/umd/descope-apps-list.js.LICENSE.txt +17 -0
- package/dist/umd/descope-apps-list.js.map +1 -1
- package/dist/umd/descope-avatar.js +5 -20
- package/dist/umd/descope-avatar.js.LICENSE.txt +0 -12
- package/dist/umd/descope-avatar.js.map +1 -1
- package/dist/umd/descope-button.js +3 -3
- package/dist/umd/descope-button.js.LICENSE.txt +6 -0
- package/dist/umd/descope-button.js.map +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
- package/dist/umd/descope-email-field-index-js.js +4 -4
- package/dist/umd/descope-email-field-index-js.js.map +1 -1
- package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +4 -321
- package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js.LICENSE.txt +0 -6
- package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js.map +1 -1
- package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js +5 -322
- package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js.map +1 -1
- package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +4 -321
- package/dist/umd/descope-grid-descope-grid-text-column-index-js.js.LICENSE.txt +0 -6
- package/dist/umd/descope-grid-descope-grid-text-column-index-js.js.map +1 -1
- package/dist/umd/descope-hybrid-field-index-js.js +2 -2
- package/dist/umd/descope-hybrid-field-index-js.js.map +1 -1
- package/dist/umd/descope-multi-line-mappings.js +1 -1
- package/dist/umd/descope-multi-line-mappings.js.map +1 -1
- package/dist/umd/descope-multi-sso.js +1 -338
- package/dist/umd/descope-multi-sso.js.map +1 -1
- package/dist/umd/descope-outbound-app-button.js +1 -338
- package/dist/umd/descope-outbound-app-button.js.map +1 -1
- package/dist/umd/descope-recovery-codes.js +1 -1
- package/dist/umd/descope-recovery-codes.js.map +1 -1
- package/dist/umd/descope-timer-button.js +1 -338
- package/dist/umd/descope-timer-button.js.map +1 -1
- package/dist/umd/descope-tooltip.js +1 -2
- package/dist/umd/descope-tooltip.js.map +1 -1
- package/dist/umd/descope-upload-file-index-js.js +1 -338
- package/dist/umd/descope-upload-file-index-js.js.map +1 -1
- package/dist/umd/descope-user-attribute-index-js.js +1 -338
- package/dist/umd/descope-user-attribute-index-js.js.map +1 -1
- package/dist/umd/descope-user-auth-method-index-js.js +1 -338
- package/dist/umd/descope-user-auth-method-index-js.js.map +1 -1
- package/dist/umd/descope-user-passkeys.js +1 -338
- package/dist/umd/descope-user-passkeys.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +42 -42
- package/src/components/descope-email-field/EmailFieldClass.js +50 -2
- package/src/components/descope-email-field/emailPattern.js +7 -0
- package/stories/descope-email-field.stories.js +8 -0
- package/dist/umd/1453.js +0 -177
- package/dist/umd/1453.js.LICENSE.txt +0 -29
- package/dist/umd/1453.js.map +0 -1
- package/dist/umd/5263.js.map +0 -1
- package/dist/umd/6063.js +0 -18
- package/dist/umd/6063.js.map +0 -1
- package/dist/umd/6818.js +0 -3
- package/dist/umd/6818.js.map +0 -1
- package/dist/umd/8248.js +0 -171
- package/dist/umd/8248.js.map +0 -1
- package/dist/umd/8968.js +0 -432
- package/dist/umd/8968.js.map +0 -1
- package/dist/umd/9117.js.map +0 -1
- package/dist/umd/9275.js +0 -18
- package/dist/umd/9275.js.map +0 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.LICENSE.txt +0 -5
- package/dist/umd/descope-multi-sso.js.LICENSE.txt +0 -5
- package/dist/umd/descope-outbound-app-button.js.LICENSE.txt +0 -5
- package/dist/umd/descope-timer-button.js.LICENSE.txt +0 -5
- package/dist/umd/descope-upload-file-index-js.js.LICENSE.txt +0 -5
- package/dist/umd/descope-user-attribute-index-js.js.LICENSE.txt +0 -5
- package/dist/umd/descope-user-passkeys.js.LICENSE.txt +0 -5
- /package/dist/umd/{8968.js.LICENSE.txt → 1411.js.LICENSE.txt} +0 -0
- /package/dist/umd/{6063.js.LICENSE.txt → 189.js.LICENSE.txt} +0 -0
- /package/dist/umd/{9117.js.LICENSE.txt → 2894.js.LICENSE.txt} +0 -0
- /package/dist/umd/{descope-user-auth-method-index-js.js.LICENSE.txt → 3792.js.LICENSE.txt} +0 -0
- /package/dist/umd/{6818.js.LICENSE.txt → 6227.js.LICENSE.txt} +0 -0
- /package/dist/umd/{5263.js.LICENSE.txt → 8264.js.LICENSE.txt} +0 -0
- /package/dist/umd/{8248.js.LICENSE.txt → 9380.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descope-recovery-codes.js","mappings":"8RAeO,MAAAA,GAAsB,EAAAC,EAAAC,IAAgB,kBAU7C,MAAAC,WAA+B,EAAAC,EAAAC,IAAe,CAC9CL,gBACAM,aAAA,iBAEA,6BAAAC,GACA,kBACA,CAEA,WAAAC,GACAC,QAEAC,KAAAC,aAAA,CAAwBC,KAAA,SAAcC,UAAA,kPAStCH,KAAAI,KAAAJ,KAAAK,WAAAC,cAAA,SACAN,KAAAO,KAAAP,KAAAK,WAAAC,cAAA,SACAN,KAAAQ,YAAAR,KAAAK,WAAAC,cAAA,kBAEI,EAAAf,EAAAkB,IACJ,8vBAoCAT,KAEA,CA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BI,wFCjFAH,eAAAC,OAAsB6B,EAAAC,EAAeD,EAAA7C","sources":["webpack://@descope/web-components-ui/../components/descope-recovery-codes/src/component/RecoveryCodesClass.js","webpack://@descope/web-components-ui/../components/descope-recovery-codes/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js"],"sourcesContent":["import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n createDynamicDataMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n forwardAttrs,\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { TextClass } from '@descope-ui/descope-text/class';\n\nexport const componentName = getComponentName('recovery-codes');\n\nconst itemRenderer = ({ value }, _, ref) => {\n return `\n <descope-text variant=\"${ref.variant}\" mode=\"${ref.mode}\">\n <span>${value}</span>\n </descope-text>\n `;\n};\n\nclass RawRecoveryCodes extends createBaseClass({\n componentName,\n baseSelector: ':host > div',\n}) {\n static get observedAttributes() {\n return ['readonly'];\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <div class=\"list\"></div>\n <descope-text class=\"icon-wrapper\">\n <vaadin-icon class=\"icon\" icon=\"vaadin:copy-o\" title=\"Copy\"></vaadin-icon>\n </descope-text>\n </div>\n `;\n\n this.list = this.shadowRoot.querySelector('.list');\n this.icon = this.shadowRoot.querySelector('.icon');\n this.iconWrapper = this.shadowRoot.querySelector('.icon-wrapper');\n\n injectStyle(\n `\n :host {\n display: inline-block;\n position: relative;\n }\n .wrapper {\n display: flex;\n justify-content: space-between;\n }\n .list {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n }\n descope-text span {\n display: inline-flex;\n align-items: center;\n width: fit-content;\n }\n descope-text span::before {\n content: '\\\\02022';\n transform: translateY(-0.06em);\n }\n .icon-wrapper {\n align-self: flex-start;\n }\n .icon {\n cursor: pointer;\n }\n .icon.copied {\n cursor: initial;\n }\n .icon.readonly {\n pointer-events: none;\n }\n `,\n this,\n );\n }\n\n get variant() {\n return this.getAttribute('variant');\n }\n\n get mode() {\n return this.getAttribute('mode');\n }\n\n init() {\n super.init();\n\n this.icon.addEventListener('click', this.onCopy.bind(this));\n\n forwardAttrs(this, this.iconWrapper, { includeAttrs: ['variant', 'mode'] });\n }\n\n onCopy() {\n navigator.clipboard.writeText(\n String(this.data.map((rc) => rc.value).join('\\n')),\n );\n\n this.icon.setAttribute('icon', 'vaadin:check-circle-o');\n this.icon.setAttribute('title', 'Copied');\n this.icon.classList.add('copied');\n\n setTimeout(() => {\n this.icon.setAttribute('icon', 'vaadin:copy-o');\n this.icon.setAttribute('title', 'Copy');\n this.icon.classList.remove('copied');\n }, 5000);\n }\n\n onReadOnly(isReadOnly) {\n this.icon.classList.toggle('readonly', isReadOnly);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue !== oldValue) {\n if (attrName === 'readonly') {\n this.onReadOnly(newValue === 'true');\n }\n }\n }\n}\n\nexport const RecoveryCodesClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostMinWidth: { selector: () => ':host', property: 'min-width' },\n hostDirection: [\n { selector: () => ':host', property: 'direction' },\n {\n selector: () => TextClass.componentName,\n property: TextClass.cssVarList.hostDirection,\n },\n ],\n textAlign: { selector: () => '.list', property: 'align-items' },\n iconColor: { selector: () => 'vaadin-icon', property: 'color' },\n iconSize: { selector: () => 'vaadin-icon', property: 'font-size' },\n iconGap: { selector: () => '.wrapper', property: 'gap' },\n bulletGap: { selector: () => 'descope-text span', property: 'gap' },\n },\n }),\n createDynamicDataMixin({\n itemRenderer,\n rerenderAttrsList: ['variant', 'mode'],\n targetSelector: '.list',\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawRecoveryCodes);\n","import '@descope-ui/descope-text';\nimport '@vaadin/icons';\nimport '@vaadin/icon';\n\nimport { componentName, RecoveryCodesClass } from './RecoveryCodesClass';\n\ncustomElements.define(componentName, RecoveryCodesClass);\n\nexport { RecoveryCodesClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(\n `\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `,\n this,\n );\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' },\n};\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n textColor: [{ property: 'color' }],\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n"],"names":["componentName","componentsHelpers","xE","RawRecoveryCodes","baseClasses","qu","baseSelector","observedAttributes","constructor","super","this","attachShadow","mode","innerHTML","list","shadowRoot","querySelector","icon","iconWrapper","fz","variant","getAttribute","init","addEventListener","onCopy","bind","EA","includeAttrs","navigator","clipboard","writeText","String","data","map","rc","value","join","setAttribute","classList","add","setTimeout","remove","onReadOnly","isReadOnly","toggle","attributeChangedCallback","attrName","oldValue","newValue","RecoveryCodesClass","utils","Zz","componentsMixins","RF","mappings","hostWidth","selector","property","hostMinWidth","hostDirection","TextClass","s","cssVarList","textAlign","iconColor","iconSize","iconGap","bulletGap","t$","itemRenderer","_","ref","rerenderAttrsList","targetSelector","VO","tQ","customElements","define","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_2__","RawText","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_3__","hideWhenEmpty","Ge","hasChildren","childNodes","length","style","display","host","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_1__","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","fontSize","textColor","textLineHeight","textLetterSpacing","textShadow","textTransform","fontFamily","fontStyle","fontWeight","borderWidth","borderStyle","borderColor","DM","triggers","attr","_TextClass__WEBPACK_IMPORTED_MODULE_0__","T"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"descope-recovery-codes.js","mappings":"yOAYO,MAAAA,GAAsB,EAAAC,EAAAC,IAAgB,WAsC7CC,KAAQA,EAAAC,MAAAA,EAAAC,YAAAA,GAA2B,CACnCF,KAAA,CAAUG,SAAA,aACVF,MAAA,CAAWE,SAAA,iBACXD,YAAA,CAAiBC,SAAA,gCAGjB,IAAAC,EAEO,MAAAC,GAAoB,EAAAC,EAAAC,KACzB,EAAAC,EAAAC,IAAY,CAAGC,SAAA,EAAaC,KAAA,aAAAC,MAAA,YAC5B,EAAAJ,EAAAK,IAAgB,CAClBC,SAAA,CACAC,UAAA,CAAmBC,SAAA,SACnBC,aAAA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,aAAA,CAAwBC,KAAA,SAAcC,UAAA,iDAIlC,EAAAkL,EAAAjL,IACJ,iLAUA5B,KAEA,CAEA,iBAAAgN,GACA,eAAAhN,KAAAC,aAAA,kBACA,CAEA,IAAA4B,GACA1B,MAAA0B,QAEI,EAAAgL,EAAAI,IAAejN,KAAA,KACnB,MAAAkN,IAAAlN,KAAAmN,WAAAC,OACApN,KAAAN,MAAA2N,SAAAH,GAAAlN,KAAAgN,cAAA,WAEA,EAGA,MAAA3Q,KAAQA,GAAO,CACfA,KAAA,CAAUG,SAAA,cAGH+O,GAAkB,EAAA+B,EAAA1Q,KACvB,EAAA+D,EAAAzD,IAAgB,CAClBC,SAAA,CACAC,UAAA,IAAmBf,EAAAgB,SAAA,SACnBG,cAAA,IAAuBnB,EAAAgB,SAAA,aACvBI,SAAA,GACA8P,UAAA,EAAoBlQ,SAAA,UACpBmQ,eAAA,CAAwBnQ,SAAA,eACxBoQ,kBAAA,CAA2BpQ,SAAA,kBAC3BqQ,WAAA,GACAzO,UAAA,GACA0O,cAAA,GACAjQ,WAAA,GACAkQ,UAAA,GACAjQ,WAAA,GACAU,YAAA,GACAD,YAAA,GACAD,YAAA,OAGE,EAAAwC,EAAA7D,IAAY,CAAGC,SAAA,EAAaC,KAAA,aAAAC,MAAA,WAC5B0D,EAAAtB,GACAsB,EAAArB,GAtBuB,CAuBzBwN,wFCjFA1M,eAAAC,OAAsBwN,EAAAtN,EAAesN,EAAArC","sources":["webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-recovery-codes/src/component/RecoveryCodesClass.js","webpack://@descope/web-components-ui/../components/descope-recovery-codes/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js"],"sourcesContent":["import { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { clickableMixin } from './clickableMixin';\n\nexport const componentName = getComponentName('button');\n\nconst resetStyles = `\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\nconst iconStyles = `\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n`;\n\nconst editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;\n\nconst { host, label, slottedIcon } = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n slottedIcon: { selector: () => '::slotted(descope-icon)' },\n};\n\nlet loadingIndicatorStyles;\n\nexport const ButtonClass = compose(\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostMaxWidth: { ...host, property: 'max-width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n\n cursor: {},\n backgroundColor: {},\n\n outlineOffset: {},\n outlineColor: {},\n outlineStyle: {},\n outlineWidth: {},\n\n borderRadius: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n\n verticalPadding: [\n { property: 'padding-top' },\n { property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { property: 'padding-right', fallback: '0.875em' },\n { property: 'padding-left', fallback: '0.875em' },\n ],\n\n labelTextColor: { property: 'color' },\n iconColor: {\n selector: () => `::slotted(*)`,\n property: IconClass.cssVarList.fill,\n },\n labelTextDecoration: { ...label, property: 'text-decoration' },\n labelSpacing: { ...label, property: 'gap' },\n textAlign: { ...label, property: 'justify-content', fallback: 'center' },\n\n iconSize: [\n { ...slottedIcon, property: 'width' },\n { ...slottedIcon, property: 'height' },\n ],\n },\n }),\n clickableMixin,\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: ['', 'prefix', 'label', 'suffix'],\n wrappedEleName: 'vaadin-button',\n style: () => `\n\t\t\t${resetStyles}\n\t\t\t${iconStyles}\n\t\t\t${loadingIndicatorStyles}\n\t\t\t${editorOverrides}\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${ButtonClass.cssVarList.outlineWidth}) + var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width=\"true\"]) {\n width: var(${ButtonClass.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${ButtonClass.cssVarList.hostHeight}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square=\"true\"]:not([full-width=\"true\"]) {\n\t\t\t\twidth: calc(var(${ButtonClass.cssVarList.hostWidth}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['tabindex', 'class', 'style'],\n componentName,\n }),\n);\n\nconst { color, fontSize } = ButtonClass.cssVarList;\nloadingIndicatorStyles = `\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(${color});\n\t\ttop: calc(50% - (var(${fontSize}) / 2));\n\t\tleft: calc(50% - (var(${fontSize}) / 2));\n\t\tborder-width: calc(var(${fontSize}) / 10);\n\t\twidth: var(${fontSize});\n\t\theight: var(${fontSize});\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`;\n","export const clickableMixin = (superclass) =>\n class ClickableMixinClass extends superclass {\n get isLoading() {\n return this.getAttribute('loading') === 'true';\n }\n\n click() {\n this.isLoading || super.click();\n }\n };\n","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","import {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { ImageClass } from '@descope-ui/descope-image/class';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('icon');\n\nexport const IconClass = compose(\n createStyleMixin({\n mappings: {\n fill: [{}, { property: ImageClass.cssVarList.fill }],\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class', 'style', 'st-height', 'st-width'],\n componentName,\n }),\n);\n","import '@descope-ui/descope-image';\n\nimport { componentName, IconClass } from './IconClass';\n\ncustomElements.define(componentName, IconClass);\n\nexport { IconClass, componentName };\n"," \nimport {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { createImage } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('image');\n\nconst srcAttrs = ['src', 'src-dark'];\n\nclass RawImage extends createBaseClass({\n componentName,\n baseSelector: 'slot',\n}) {\n static get observedAttributes() {\n return srcAttrs;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<slot></slot>\n\t`;\n\n injectStyle(\n `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n `,\n this,\n );\n }\n\n init() {\n super.init?.();\n this.toggleVisibility(this.getSrc);\n }\n\n onThemeChange() {\n this.renderImage();\n }\n\n toggleVisibility(isVisible) {\n if (isVisible) {\n this.classList.remove('hidden');\n } else {\n this.classList.add('hidden');\n }\n }\n\n get altText() {\n return this.getAttribute('alt') || '';\n }\n\n get legacySrc() {\n return this.getAttribute('src');\n }\n\n get themeSrc() {\n return this.getAttribute(`src-${this.currentThemeName}`);\n }\n\n get getSrc() {\n return this.themeSrc || this.legacySrc;\n }\n\n // in order to fill an SVG with `currentColor` override all of its `fill` and `path` nodes\n // with the value from the `st-fill` attribute\n \n updateFillColor(node) {\n // set fill to root node and all its relevant selectors\n const elementsToReplace = [node, ...node.querySelectorAll('*[fill]')];\n\n elementsToReplace.forEach((ele) => {\n ele.setAttribute(\n 'fill',\n `var(${ImageClass.cssVarList.fill}, ${ele.getAttribute('fill') || \"''\"})`,\n );\n });\n }\n\n renderImage() {\n this.toggleVisibility(this.getSrc);\n\n createImage(this.getSrc, this.altText).then((res) => {\n this.innerHTML = '';\n if (res) {\n this.updateFillColor(res);\n this.appendChild(res);\n }\n });\n }\n\n // render only when src attribute matches current theme\n shouldRender(src) {\n const srcVal = this.getAttribute(src);\n return this.getSrc === srcVal;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue === newValue) return;\n\n if (this.shouldRender(attrName)) {\n this.renderImage();\n }\n }\n}\n\nexport const ImageClass = compose(\n createStyleMixin({\n mappings: {\n fill: {},\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawImage);\n","import DOMPurify from 'dompurify';\n\nconst getFileExtension = (path) => {\n const match = path.match(/\\.([0-9a-z]+)(?:[\\\\?#]|$)/i);\n return match ? match[1] : null;\n};\n\nconst base64Prefix = 'data:image/svg+xml;base64,';\n\nconst isBase64Svg = (src) => src.startsWith(base64Prefix);\n\nconst createImgEle = (src, altText) => {\n const ele = document.createElement('img');\n ele.setAttribute('src', src);\n ele.setAttribute('alt', altText);\n return ele;\n};\n\nconst createSvgEle = (text) => {\n // we want to purify the SVG to avoid XSS attacks\n const clean = DOMPurify.sanitize(text, {\n USE_PROFILES: { svg: true, svgFilters: true },\n // allow image to render\n ADD_TAGS: ['image'],\n // forbid interactiviy via `use` tags (which are sanitized by default)\n FORBID_TAGS: ['defs']\n });\n\n const parser = new DOMParser();\n const ele = parser\n .parseFromString(clean, 'image/svg+xml')\n .querySelector('svg');\n return ele;\n};\n\nexport const createImage = async (src, altText) => {\n try {\n let ele;\n if (isBase64Svg(src)) {\n // handle base64 source\n const svgXml = atob(src.slice(base64Prefix.length));\n ele = createSvgEle(svgXml);\n } else if (getFileExtension(src) === 'svg') {\n // handle urls\n const fetchedSrc = await fetch(src);\n const text = await fetchedSrc.text();\n ele = createSvgEle(text);\n } else {\n // handle binary\n ele = createImgEle(src, altText);\n }\n\n ele.style.setProperty('max-width', '100%');\n ele.style.setProperty('max-height', '100%');\n\n return ele;\n } catch {\n return null;\n }\n};\n","import { componentName, ImageClass } from './ImageClass';\n\ncustomElements.define(componentName, ImageClass);\n\nexport { ImageClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n createDynamicDataMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n forwardAttrs,\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { TextClass } from '@descope-ui/descope-text/class';\n\nexport const componentName = getComponentName('recovery-codes');\n\nconst NO_ACTION = 'none';\nconst DEFAULT_ERROR_MESSAGE = 'Please save your recovery codes to continue';\n\n// default button label per action (buttons variant). the icons variant uses the vaadin\n// glyphs hardcoded in the shadow-DOM template below; the buttons variant uses image srcs.\nconst ACTIONS = {\n copy: { defaultText: 'Copy' },\n download: { defaultText: 'Download' },\n};\n\n// per-button config suffixes; the full attribute is `${action}-${suffix}`.\n// `icon`/`icon-dark` are image srcs (the seeded glyph or a custom upload), matching\n// the standard button's start-icon (light/dark), not a boolean.\nconst BUTTON_SUFFIXES = [\n 'text',\n 'variant',\n 'color',\n 'size',\n 'icon',\n 'icon-dark',\n];\n\n// changing any of these rebuilds the buttons (so the editor preview stays live)\nconst BUTTON_ATTRS = [\n 'show-download',\n ...Object.keys(ACTIONS).flatMap((action) =>\n BUTTON_SUFFIXES.map((suffix) => `${action}-${suffix}`),\n ),\n];\n\nconst itemRenderer = ({ value }, _, ref) => {\n return `\n <descope-text variant=\"${ref.variant}\" mode=\"${ref.mode}\">\n <span>${value}</span>\n </descope-text>\n `;\n};\n\nclass RawRecoveryCodes extends createBaseClass({\n componentName,\n baseSelector: ':host > div',\n}) {\n static get observedAttributes() {\n return ['readonly', 'required', ...BUTTON_ATTRS];\n }\n\n // 'none' | 'copied' | 'downloaded' - the last action the user took on the codes\n #action = NO_ACTION;\n\n // the error is shown only after a submit attempt (reportValidity), like inputs\n #showError = false;\n\n // init() builds the buttons once with all seeded attrs; guards against rebuilding\n // on every per-attribute change fired during element upgrade (before init runs)\n #initialized = false;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <div class=\"codes-box\">\n <div class=\"list\"></div>\n <descope-text class=\"icon-wrapper\">\n <div class=\"icons\">\n <vaadin-icon class=\"icon copy-icon\" icon=\"vaadin:copy-o\" title=\"Copy\"></vaadin-icon>\n <vaadin-icon class=\"icon download-icon\" icon=\"vaadin:download-alt\" title=\"Download\"></vaadin-icon>\n </div>\n </descope-text>\n </div>\n <div class=\"error-message\"></div>\n <div class=\"buttons-row\"></div>\n </div>\n `;\n\n this.list = this.shadowRoot.querySelector('.list');\n this.copyIcon = this.shadowRoot.querySelector('.copy-icon');\n this.downloadIcon = this.shadowRoot.querySelector('.download-icon');\n this.iconWrapper = this.shadowRoot.querySelector('.icon-wrapper');\n this.errorMessageEle = this.shadowRoot.querySelector('.error-message');\n this.buttonsRow = this.shadowRoot.querySelector('.buttons-row');\n\n injectStyle(\n `\n :host {\n display: inline-block;\n position: relative;\n }\n .wrapper {\n display: flex;\n flex-direction: column;\n }\n .codes-box {\n display: flex;\n justify-content: space-between;\n box-sizing: border-box;\n /* border shows the error ring inside the box; style/width/color/radius come from theme */\n }\n .list {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n }\n descope-text span {\n display: inline-flex;\n align-items: center;\n width: fit-content;\n }\n descope-text span::before {\n content: '\\\\02022';\n transform: translateY(-0.06em);\n }\n .icon-wrapper {\n align-self: flex-start;\n }\n .icons {\n display: flex;\n flex-direction: column;\n }\n .icon {\n cursor: pointer;\n }\n .icon.copied {\n cursor: initial;\n /* block re-clicks while the checkmark shows, so rapid clicks cannot repeat the action */\n pointer-events: none;\n }\n /* readonly is a host attribute, so disable pointer events from one place */\n :host([readonly=\"true\"]) .icon,\n :host([readonly=\"true\"]) .buttons-row {\n pointer-events: none;\n }\n .download-icon {\n display: none;\n }\n :host([show-download=\"true\"]) .download-icon {\n display: inline-flex;\n }\n .error-message {\n display: none;\n /* width:0 + min-width:100% lets the message wrap to the component width without\n its text expanding the (shrink-to-fit) component; full-width still fills the parent */\n width: 0;\n min-width: 100%;\n box-sizing: border-box;\n line-height: 1.2;\n overflow-wrap: break-word;\n }\n :host([invalid]) .error-message {\n display: block;\n }\n .buttons-row {\n display: none;\n }\n :host([display-variant=\"buttons\"]) .icon-wrapper {\n display: none;\n }\n :host([display-variant=\"buttons\"]) .buttons-row {\n display: flex;\n flex-wrap: wrap;\n }\n /* grow to fill equally; don't shrink below content, so they wrap to a new line\n when they don't fit (like a container with auto-fit items) */\n .buttons-row > descope-button {\n flex: 1 0 auto;\n }\n `,\n this,\n );\n }\n\n get variant() {\n return this.getAttribute('variant');\n }\n\n get mode() {\n return this.getAttribute('mode');\n }\n\n // the form value read by the flow SDK (#getFormData reads `.value`)\n get value() {\n return this.#action;\n }\n\n // a boolean attribute is \"on\" when present and not explicitly \"false\"\n #boolAttr(name) {\n return this.hasAttribute(name) && this.getAttribute(name) !== 'false';\n }\n\n get isRequired() {\n return this.#boolAttr('required');\n }\n\n get isReadOnly() {\n return this.#boolAttr('readonly');\n }\n\n get errorMessage() {\n return (\n this.getAttribute('data-errormessage-value-missing') ||\n DEFAULT_ERROR_MESSAGE\n );\n }\n\n get codesText() {\n return String((this.data || []).map((rc) => rc.value).join('\\n'));\n }\n\n init() {\n super.init();\n\n this.copyIcon.addEventListener('click', this.onCopy.bind(this));\n this.downloadIcon.addEventListener('click', this.onDownload.bind(this));\n\n forwardAttrs(this, this.iconWrapper, { includeAttrs: ['variant', 'mode'] });\n\n this.renderButtons();\n this.#initialized = true;\n }\n\n get isDownloadEnabled() {\n return this.getAttribute('show-download') === 'true';\n }\n\n // buttons variant: copy (+ download when enabled) as descope-buttons, each independently\n // configurable. rendered even in the icons variant (CSS hides the row) so a variant switch is instant.\n renderButtons() {\n if (!this.buttonsRow) return;\n\n const buttons = [this.buildButton('copy')];\n if (this.isDownloadEnabled) {\n buttons.push(this.buildButton('download'));\n }\n this.buttonsRow.replaceChildren(...buttons);\n }\n\n buildButton(action) {\n const { defaultText } = ACTIONS[action];\n const attr = (name, fallback) =>\n this.getAttribute(`${action}-${name}`) || fallback;\n\n const button = document.createElement('descope-button');\n button.setAttribute('data-action', action);\n button.setAttribute('variant', attr('variant', 'outline'));\n button.setAttribute('mode', attr('color', 'primary'));\n button.setAttribute('size', attr('size', 'md'));\n\n // icon is an image src - the seeded glyph or a custom upload (light/dark),\n // same as the standard button's start icon. rendered via descope-icon in the\n // default slot (not slot=\"prefix\") so it centers with the label when the\n // button grows. descope-icon inlines SVGs, so the glyph (authored with\n // fill=\"currentColor\") tracks the button text color while an uploaded image\n // keeps its own colors.\n const iconSrc = this.getAttribute(`${action}-icon`);\n if (iconSrc) {\n const icon = document.createElement('descope-icon');\n icon.setAttribute('src', iconSrc);\n const iconDark = this.getAttribute(`${action}-icon-dark`);\n if (iconDark) icon.setAttribute('src-dark', iconDark);\n button.appendChild(icon);\n }\n\n button.appendChild(document.createTextNode(attr('text', defaultText)));\n button.addEventListener('click', () =>\n action === 'copy' ? this.onCopy() : this.onDownload(),\n );\n return button;\n }\n\n onCopy() {\n if (this.isReadOnly) return;\n navigator.clipboard.writeText(this.codesText);\n this.showActionFeedback(this.copyIcon, 'Copied');\n this.recordAction('copied');\n }\n\n onDownload() {\n if (this.isReadOnly) return;\n const blob = new Blob([this.codesText], { type: 'text/plain' });\n const url = URL.createObjectURL(blob);\n const anchor = document.createElement('a');\n anchor.href = url;\n anchor.download = 'recovery-codes.txt';\n anchor.click();\n URL.revokeObjectURL(url);\n\n this.showActionFeedback(this.downloadIcon, 'Downloaded');\n this.recordAction('downloaded');\n }\n\n // copy/download share this - only the visual feedback differs by variant\n recordAction(action) {\n this.#action = action;\n // let the flow re-evaluate real-time conditions and pick up the new value\n this.dispatchEvent(new Event('change', { bubbles: true }));\n // acting clears the mandatory error\n if (this.checkValidity()) {\n this.#showError = false;\n }\n this.syncValidityUI();\n }\n\n // icons variant: swap the icon to a checkmark for 5s (buttons variant is static)\n showActionFeedback(iconEle, doneTitle) {\n // on a rapid re-click the checkmark is already showing, so cancel the pending restore\n // and keep the glyph/title we saved the first time (never capture the checkmark itself)\n if (iconEle.feedbackTimer) {\n clearTimeout(iconEle.feedbackTimer);\n } else {\n iconEle.originalIcon = iconEle.getAttribute('icon');\n iconEle.originalTitle = iconEle.getAttribute('title');\n }\n\n iconEle.setAttribute('icon', 'vaadin:check-circle-o');\n iconEle.setAttribute('title', doneTitle);\n iconEle.classList.add('copied');\n\n iconEle.feedbackTimer = setTimeout(() => {\n iconEle.setAttribute('icon', iconEle.originalIcon);\n iconEle.setAttribute('title', iconEle.originalTitle);\n iconEle.classList.remove('copied');\n iconEle.feedbackTimer = null;\n }, 5000);\n }\n\n // the flow SDK's #validateInputs calls checkValidity/reportValidity on every *[name]\n checkValidity() {\n return this.isReadOnly || !this.isRequired || this.value !== NO_ACTION;\n }\n\n reportValidity() {\n const valid = this.checkValidity();\n this.#showError = !valid;\n this.syncValidityUI();\n return valid;\n }\n\n // single source of truth for the error UI - reflects `invalid` (theme `_invalid`\n // draws the outline) and fills the message. never toggled anywhere else.\n syncValidityUI() {\n this.toggleAttribute('invalid', this.#showError);\n if (this.errorMessageEle) {\n this.errorMessageEle.textContent = this.#showError\n ? this.errorMessage\n : '';\n }\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue === oldValue) return;\n\n // if it stops being required, drop any error already shown\n if (attrName === 'required' && !this.isRequired) {\n this.#showError = false;\n this.syncValidityUI();\n }\n\n // only rebuild for live edits after init (init already built once with all attrs);\n // avoids rebuilding once per attribute during the initial element upgrade\n if (this.#initialized && BUTTON_ATTRS.includes(attrName)) {\n this.renderButtons();\n }\n }\n}\n\nexport const RecoveryCodesClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostMinWidth: { selector: () => ':host', property: 'min-width' },\n hostDirection: [\n { selector: () => ':host', property: 'direction' },\n {\n selector: () => TextClass.componentName,\n property: TextClass.cssVarList.hostDirection,\n },\n ],\n textAlign: { selector: () => '.list', property: 'align-items' },\n iconColor: { selector: () => 'vaadin-icon', property: 'color' },\n iconSize: { selector: () => 'vaadin-icon', property: 'font-size' },\n iconGap: { selector: () => '.codes-box', property: 'gap' },\n iconStackGap: { selector: () => '.icons', property: 'gap' },\n buttonsGap: { selector: () => '.buttons-row', property: 'gap' },\n sectionsGap: { selector: () => '.wrapper', property: 'gap' },\n bulletGap: { selector: () => 'descope-text span', property: 'gap' },\n // top + bottom padding sit inside the border (below the codes) in both variants; in the\n // buttons variant the bottom padding also repeats below the buttons (the buttons-row entry\n // is inert in the icons variant, where the row is display:none).\n verticalPadding: [\n { selector: () => '.codes-box', property: 'padding-top' },\n { selector: () => '.codes-box', property: 'padding-bottom' },\n { selector: () => '.buttons-row', property: 'padding-bottom' },\n ],\n // horizontal padding insets the codes (inside the border) and the buttons, but NOT the\n // error message, which stays aligned to the component edge (like the input error).\n horizontalPadding: [\n { selector: () => '.codes-box', property: 'padding-left' },\n { selector: () => '.codes-box', property: 'padding-right' },\n { selector: () => '.buttons-row', property: 'padding-left' },\n { selector: () => '.buttons-row', property: 'padding-right' },\n ],\n errorBorderColor: {\n selector: () => '.codes-box',\n property: 'border-color',\n },\n errorMessageColor: {\n selector: () => '.error-message',\n property: 'color',\n },\n errorMessageFontSize: {\n selector: () => '.error-message',\n property: 'font-size',\n },\n errorMessageFontWeight: {\n selector: () => '.error-message',\n property: 'font-weight',\n },\n errorMessageFontFamily: {\n selector: () => '.error-message',\n property: 'font-family',\n },\n boxBorderRadius: {\n selector: () => '.codes-box',\n property: 'border-radius',\n },\n errorBorderWidth: {\n selector: () => '.codes-box',\n property: 'border-width',\n },\n boxBorderStyle: {\n selector: () => '.codes-box',\n property: 'border-style',\n },\n },\n }),\n // also inject the shared input-wrapper theme onto our host (like the input components do),\n // so the error message + border track the console \"customize inputs\" tokens\n createStyleMixin({\n componentNameOverride: getComponentName('input-wrapper'),\n }),\n createDynamicDataMixin({\n itemRenderer,\n rerenderAttrsList: ['variant', 'mode'],\n targetSelector: '.list',\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawRecoveryCodes);\n","import '@descope-ui/descope-text';\nimport '@descope-ui/descope-button';\nimport '@descope-ui/descope-icon';\nimport '@vaadin/icons';\nimport '@vaadin/icon';\n\nimport { componentName, RecoveryCodesClass } from './RecoveryCodesClass';\n\ncustomElements.define(componentName, RecoveryCodesClass);\n\nexport { RecoveryCodesClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(\n `\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `,\n this,\n );\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' },\n};\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n textColor: [{ property: 'color' }],\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n"],"names":["componentName","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_1__","xE","host","label","slottedIcon","selector","loadingIndicatorStyles","ButtonClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_0__","Zz","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_2__","DM","triggers","attr","value","RF","mappings","hostWidth","property","hostMaxWidth","hostHeight","hostDirection","fontSize","fontFamily","fontWeight","cursor","backgroundColor","outlineOffset","outlineColor","outlineStyle","outlineWidth","borderRadius","borderColor","borderStyle","borderWidth","verticalPadding","horizontalPadding","fallback","labelTextColor","iconColor","_descope_ui_descope_icon_class__WEBPACK_IMPORTED_MODULE_3__","S","cssVarList","fill","labelTextDecoration","labelSpacing","textAlign","iconSize","_clickableMixin__WEBPACK_IMPORTED_MODULE_4__","G","VO","tQ","tz","slots","wrappedEleName","style","excludeAttrsSync","color","clickableMixin","superclass","isLoading","this","getAttribute","click","super","customElements","define","_ButtonClass__WEBPACK_IMPORTED_MODULE_0__","T","J","IconClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_3__","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","_descope_ui_descope_image_class__WEBPACK_IMPORTED_MODULE_2__","q","height","width","_IconClass__WEBPACK_IMPORTED_MODULE_1__","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_3__","srcAttrs","RawImage","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_1__","qu","baseSelector","observedAttributes","constructor","attachShadow","mode","innerHTML","fz","init","toggleVisibility","getSrc","onThemeChange","renderImage","isVisible","classList","remove","add","altText","legacySrc","themeSrc","currentThemeName","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","ImageClass","_helpers__WEBPACK_IMPORTED_MODULE_4__","m","then","res","appendChild","shouldRender","src","srcVal","attributeChangedCallback","attrName","oldValue","newValue","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_2__","createSvgEle","text","clean","dompurify__WEBPACK_IMPORTED_MODULE_0__","A","sanitize","USE_PROFILES","svg","svgFilters","ADD_TAGS","FORBID_TAGS","DOMParser","parseFromString","querySelector","createImage","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","document","createElement","createImgEle","setProperty","_ImageClass__WEBPACK_IMPORTED_MODULE_0__","componentsHelpers","NO_ACTION","ACTIONS","copy","defaultText","download","BUTTON_SUFFIXES","BUTTON_ATTRS","Object","keys","flatMap","action","map","suffix","RawRecoveryCodes","baseClasses","showError","initialized","list","shadowRoot","copyIcon","downloadIcon","iconWrapper","errorMessageEle","buttonsRow","variant","boolAttr","name","hasAttribute","isRequired","isReadOnly","errorMessage","codesText","String","data","rc","join","addEventListener","onCopy","bind","onDownload","EA","includeAttrs","renderButtons","isDownloadEnabled","buttons","buildButton","push","replaceChildren","button","iconSrc","icon","iconDark","createTextNode","navigator","clipboard","writeText","showActionFeedback","recordAction","blob","Blob","type","url","URL","createObjectURL","anchor","href","revokeObjectURL","dispatchEvent","Event","bubbles","checkValidity","syncValidityUI","iconEle","doneTitle","feedbackTimer","clearTimeout","originalIcon","originalTitle","setTimeout","reportValidity","valid","toggleAttribute","textContent","includes","RecoveryCodesClass","utils","componentsMixins","hostMinWidth","TextClass","s","iconGap","iconStackGap","buttonsGap","sectionsGap","bulletGap","errorBorderColor","errorMessageColor","errorMessageFontSize","errorMessageFontWeight","errorMessageFontFamily","boxBorderRadius","errorBorderWidth","boxBorderStyle","componentNameOverride","t$","itemRenderer","_","ref","rerenderAttrsList","targetSelector","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_2__","RawText","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_3__","hideWhenEmpty","Ge","hasChildren","childNodes","length","display","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_1__","textColor","textLineHeight","textLetterSpacing","textShadow","textTransform","fontStyle","_TextClass__WEBPACK_IMPORTED_MODULE_0__"],"sourceRoot":""}
|
|
@@ -1,339 +1,2 @@
|
|
|
1
|
-
/*! For license information please see descope-timer-button.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[743,1202,2250,5087,6724],{44006(t){t.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMWVtIiBoZWlnaHQ9IjFlbSIgdmlld0JveD0iMCAwIDEwNCAxMDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+IDxwYXRoIGQ9Ik01MC4zMzM0IDAuMzMzMjUyQzIyLjgzMzQgMC4zMzMyNTIgMC4zMzMzNzQgMjIuODMzMyAwLjMzMzM3NCA1MC4zMzMzQzAuMzMzMzc0IDc3LjgzMzMgMjIuODMzNCAxMDAuMzMzIDUwLjMzMzQgMTAwLjMzM0M3Ny44MzM0IDEwMC4zMzMgMTAwLjMzMyA3Ny44MzMzIDEwMC4zMzMgNTAuMzMzM0MxMDAuMzMzIDIyLjgzMzMgNzcuODMzNCAwLjMzMzI1MiA1MC4zMzM0IDAuMzMzMjUyWk01MC4zMzM0IDg3LjgzMzNDMjkuNzA4NCA4Ny44MzMzIDEyLjgzMzQgNzAuOTU4MyAxMi44MzM0IDUwLjMzMzNDMTIuODMzNCAyOS43MDgzIDI5LjcwODQgMTIuODMzMyA1MC4zMzM0IDEyLjgzMzNDNzAuOTU4NCAxMi44MzMzIDg3LjgzMzQgMjkuNzA4MyA4Ny44MzM0IDUwLjMzMzNDODcuODMzNCA3MC45NTgzIDcwLjk1ODQgODcuODMzMyA1MC4zMzM0IDg3LjgzMzNaIiBmaWxsPSIjMTgxQTFDIi8+IDxwYXRoIGQ9Ik01MC4zMzI4IDE5LjA4MzNINDQuMDgyOFY1Ni41ODMySDc1LjMzMjhWNTAuMzMzMkg1MC4zMzI4VjE5LjA4MzNaIiBmaWxsPSIjMTgxQTFDIi8+IDwvc3ZnPiA="},19624(t,e,i){"use strict";i.d(e,{J:()=>m,T:()=>l});var r=i(63200),o=i(25964),n=i(88961),s=i(98538),a=i(10767);const l=(0,o.xE)("button"),{host:d,label:c,slottedIcon:h}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let u;const m=(0,r.Zz)((0,n.DM)({triggers:[{attr:"full-width",value:"true"}]}),(0,n.RF)({mappings:{hostWidth:{property:"width"},hostMaxWidth:{...d,property:"max-width"},hostHeight:{property:"height"},hostDirection:{...d,property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},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:[{...h,property:"width"},{...h,property:"height"}]}}),a.G,n.VO,n.tQ)((0,n.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(${m.cssVarList.outlineWidth}) + var(${m.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${m.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${m.cssVarList.hostHeight}) - var(${m.cssVarList.outlineWidth}) - var(${m.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${m.cssVarList.hostWidth}) - var(${m.cssVarList.outlineWidth}) - var(${m.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex","class","style"],componentName:l})),{color:p,fontSize:b}=m.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(${p});\n\t\ttop: calc(50% - (var(${b}) / 2));\n\t\tleft: calc(50% - (var(${b}) / 2));\n\t\tborder-width: calc(var(${b}) / 10);\n\t\twidth: var(${b});\n\t\theight: var(${b});\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`},10767(t,e,i){"use strict";i.d(e,{G:()=>r});const r=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},30576(t,e,i){"use strict";i.r(e),i.d(e,{ButtonClass:()=>r.J,componentName:()=>r.T});var r=i(19624);i(83799),customElements.define(r.T,r.J)},98538(t,e,i){"use strict";i.d(e,{S:()=>l,T:()=>a});var r=i(88961),o=i(25964),n=i(8512),s=i(63200);const a=(0,o.xE)("icon"),l=(0,s.Zz)((0,r.RF)({mappings:{fill:[{},{property:n.q.cssVarList.fill}],height:{selector:()=>":host"},width:{selector:()=>":host"}}}),r.VO,r.tQ)((0,r.tz)({slots:[],wrappedEleName:"descope-image",style:()=>"\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n ",excludeAttrsSync:["tabindex","class","style","st-height","st-width"],componentName:a}))},56737(t,e,i){"use strict";i.r(e),i.d(e,{IconClass:()=>r.S,componentName:()=>r.T}),i(53455);var r=i(98538);customElements.define(r.T,r.S)},8512(t,e,i){"use strict";i.d(e,{T:()=>l,q:()=>h});var r=i(88961),o=i(72270),n=i(63200),s=i(25964),a=i(18782);const l=(0,s.xE)("image"),d=["src","src-dark"];class c extends((0,o.qu)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return d}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,s.fz)("\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n ",this)}init(){super.init?.(),this.toggleVisibility(this.getSrc)}onThemeChange(){this.renderImage()}toggleVisibility(t){t?this.classList.remove("hidden"):this.classList.add("hidden")}get altText(){return this.getAttribute("alt")||""}get legacySrc(){return this.getAttribute("src")}get themeSrc(){return this.getAttribute(`src-${this.currentThemeName}`)}get getSrc(){return this.themeSrc||this.legacySrc}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach(t=>{t.setAttribute("fill",`var(${h.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)})}renderImage(){this.toggleVisibility(this.getSrc),(0,a.m)(this.getSrc,this.altText).then(t=>{this.innerHTML="",t&&(this.updateFillColor(t),this.appendChild(t))})}shouldRender(t){const e=this.getAttribute(t);return this.getSrc===e}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),e!==i&&this.shouldRender(t)&&this.renderImage()}}const h=(0,n.Zz)((0,r.RF)({mappings:{fill:{},height:{selector:()=>":host"},width:{selector:()=>":host"}}}),r.VO,r.tQ)(c)},18782(t,e,i){"use strict";i.d(e,{m:()=>n});var r=i(25414);const o=t=>{const e=r.A.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:["image"],FORBID_TAGS:["defs"]});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},n=async(t,e)=>{try{let i;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const e=atob(t.slice(26));i=o(e)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const e=await fetch(t),r=await e.text();i=o(r)}else i=((t,e)=>{const i=document.createElement("img");return i.setAttribute("src",t),i.setAttribute("alt",e),i})(t,e);return i.style.setProperty("max-width","100%"),i.style.setProperty("max-height","100%"),i}catch{return null}}},53455(t,e,i){"use strict";i.r(e),i.d(e,{ImageClass:()=>r.q,componentName:()=>r.T});var r=i(8512);customElements.define(r.T,r.q)},60096(t,e,i){"use strict";i.r(e),i.d(e,{TimerButtonClass:()=>z,componentName:()=>d});var r=i(88961),o=i(72270),n=i(63200),s=i(25964),a=i(64388),l=i(19624);const d=(0,s.xE)("timer-button"),c=["button-variant","button-mode","size","text-align","full-width"],h={"button-variant":"variant","button-mode":"mode"},u=["timer-seconds","timer-hide-icon","timer-paused","size","text-align","full-width"],m={"timer-seconds":"seconds","timer-hide-icon":"hide-icon","timer-paused":"paused"},p=(0,o.qu)({componentName:d,baseSelector:":host > div"}),{host:b,nestedTimer:g,nestedButton:v,timerInsideNotReversed:y,timerInsideReversed:f}={host:{selector:()=>":host"},nestedTimer:{selector:()=>':host([timer-inside="true"]) .timer'},nestedButton:{selector:()=>':host([timer-inside="true"]) .button'},timerInsideNotReversed:{selector:()=>':host([timer-inside="true"]:not([timer-position="end"])) .timer'},timerInsideReversed:{selector:()=>':host([timer-inside="true"][timer-position="end"]) .timer'}},z=(0,n.Zz)((0,r.RF)({mappings:{gap:{},flexDirection:{},hostWidth:{...b,property:"width"},hostDirection:{...b,property:"direction"},timerTextColor:{...g,property:a.A.cssVarList.textColor},timerIconColor:{...g,property:a.A.cssVarList.iconColor},timerHostWidth:{...g,property:a.A.cssVarList.hostWidth},buttonLabelSpacing:{...v,property:l.J.cssVarList.labelSpacing},timerInsideGapEnd:{...y,property:"margin-inline-end"},timerInsideGapStart:{...f,property:"margin-inline-start"}}}),r.VO,r.tQ)(class extends p{constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <descope-timer class="timer"></descope-timer>\n <descope-button class="button" disabled="true">\n <slot></slot>\n </descope-button>\n </div>\n\t\t',(0,s.fz)('\n :host {\n display: inline-flex;\n }\n .wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n }\n /* allow timer to grow along the main axis in the wrapper flex container */\n :host(:not([timer-inside="true"])) .timer {\n flex: 1;\n }\n :host([timer-inside="true"]) .timer {\n flex: 0 0 auto;\n }\n ',this),this.wrapper=this.shadowRoot.querySelector(".wrapper"),this.timer=this.shadowRoot.querySelector(".timer"),this.button=this.shadowRoot.querySelector(".button"),this.forwardingSlot=this.shadowRoot.querySelector(".button slot"),this.timer.addEventListener("timer-started",()=>this.onTimerStarted()),this.timer.addEventListener("timer-ended",()=>this.onTimerEnded()),this.syncTimerPlacement(),this.button.addEventListener("click",this.onClick.bind(this))}static get observedAttributes(){return[...super.observedAttributes||[],"timer-inside","timer-position"]}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),"timer-inside"!==t&&"timer-position"!==t||this.syncTimerPlacement()}get#t(){return"true"===this.getAttribute("timer-inside")}get#e(){return"end"===this.getAttribute("timer-position")}syncTimerPlacement(){this.#t?this.#i(this.#e):this.#r()}#i(t){t?this.timer.previousSibling!==this.forwardingSlot&&this.button.appendChild(this.timer):this.timer.nextSibling!==this.forwardingSlot&&this.button.insertBefore(this.timer,this.forwardingSlot)}#r(){this.timer.parentElement!==this.wrapper&&this.wrapper.insertBefore(this.timer,this.button)}set onclick(t){this.button.onclick=t}init(){super.init?.(),(0,s.EA)(this,this.button,{includeAttrs:c,mapAttrs:h}),(0,s.EA)(this,this.timer,{includeAttrs:u,mapAttrs:m}),this.button.shadowRoot.querySelector("vaadin-button").setAttribute("disabled","true")}onTimerStarted(){this.toggleButtonDisable(!0)}onTimerEnded(){this.toggleButtonDisable(!1)}onClick(){this.timer.reset()}toggleButtonDisable(t){setTimeout(()=>{t?this.button.setAttribute("disabled","true"):this.button.removeAttribute("disabled")})}});i(30576),i(61479),customElements.define(d,z)},64388(t,e,i){"use strict";i.d(e,{A:()=>v,T:()=>h});var r=i(88961),o=i(72270),n=i(63200),s=i(25964),a=i(44006),l=i.n(a),d=i(98538),c=i(62054);const h=(0,s.xE)("timer"),u=["seconds","hide-icon","paused"],m=(0,o.qu)({componentName:h,baseSelector:":host > .wrapper"}),{host:p,icon:b,timer:g}={host:{selector:()=>":host"},icon:{selector:()=>".icon"},timer:{selector:()=>".timer"}},v=(0,n.Zz)((0,r.RF)({mappings:{fontSize:{},iconSize:[{...b,property:"width"},{...b,property:"height"}],fontFamily:{},minHeight:{},fontWeight:{...g},lineHeight:{...g},textColor:{...g,property:"color"},gap:{},textAlign:{property:"justify-content"},hostWidth:{...p,property:"width"},hostDirection:{...p,property:"direction"},iconColor:{...b,property:d.S.cssVarList.fill}}}),r.VO,r.tQ)(class extends m{#o=0;#n;static get observedAttributes(){return u.concat(m.observedAttributes||[])}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <div class="wrapper">\n <descope-icon src="${l()}" class="icon"></descope-icon>\n <div class="timer"></div>\n </div>\n\t\t`,(0,s.fz)("\n :host {\n display: inline-flex;\n user-select: none;\n -webkit-user-select: none;\n }\n .wrapper {\n display: flex;\n align-items: center;\n flex-direction: row;\n width: 100%;\n }\n .hidden {\n display: none;\n }\n ",this),this.icon=this.shadowRoot.querySelector(".icon"),this.timer=this.shadowRoot.querySelector(".timer")}get seconds(){const t=this.getAttribute("seconds"),e=1e3*parseInt(t||0,10);return Math.max(0,e)}get isPaused(){return"true"===this.getAttribute("paused")}init(){super.init?.(),this.#o=this.seconds}startInterval(){this.#o?this.#n=setInterval(()=>{this.#s(),this.#o||this.stop(),this.#a(this.#o)},1e3):this.stop()}stopInterval(){clearInterval(this.#n)}#s(){this.#o=this.#o-1e3}reset(){this.#o=this.seconds,this.#a(this.#o),this.isPaused||(this.dispatchEvent(new CustomEvent("timer-started",{bubbles:!0})),this.startInterval())}stop(){this.stopInterval(),this.#o=0,this.#a(this.#o),this.dispatchEvent(new CustomEvent("timer-ended",{bubbles:!0}))}pause(){this.setAttribute("paused","true"),this.stopInterval()}resume(){this.removeAttribute("paused"),this.startInterval()}#a(t){this.timer.textContent=(0,c.f)(t)}#l(t){this.icon.classList.toggle("hidden",t)}#d(t){setTimeout(()=>{t?this.pause():this.#n||this.resume()})}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),i!==e&&("seconds"===t&&this.reset(),"hide-icon"===t&&this.#l("true"===i),"paused"===t&&this.#d("true"===i))}})},62054(t,e,i){"use strict";i.d(e,{f:()=>o});const r=(t,e=2)=>String(t).padStart(e,"0"),o=(t=0)=>{const e=Math.floor(t/1e3),i=Math.floor(e/3600),o=Math.floor(e%3600/60),n=e%60;return[...i?[r(i)]:[],r(o),r(n)].join(":")}},61479(t,e,i){"use strict";i.r(e),i.d(e,{TimerClass:()=>r.A,componentName:()=>r.T});var r=i(64388);i(56737),customElements.define(r.T,r.A)},89389(t,e,i){"use strict";i.d(e,{$:()=>p});var r=i(13256),o=i(55774),n=i(82901),s=i(72562),a=i(81488),l=i(87550);const d=i(51450).AH`
|
|
3
|
-
:host {
|
|
4
|
-
display: inline-block;
|
|
5
|
-
position: relative;
|
|
6
|
-
outline: none;
|
|
7
|
-
white-space: nowrap;
|
|
8
|
-
-webkit-user-select: none;
|
|
9
|
-
-moz-user-select: none;
|
|
10
|
-
user-select: none;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:host([hidden]) {
|
|
14
|
-
display: none !important;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/* Aligns the button with form fields when placed on the same line.
|
|
18
|
-
Note, to make it work, the form fields should have the same "::before" pseudo-element. */
|
|
19
|
-
.vaadin-button-container::before {
|
|
20
|
-
content: '\\2003';
|
|
21
|
-
display: inline-block;
|
|
22
|
-
width: 0;
|
|
23
|
-
max-height: 100%;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.vaadin-button-container {
|
|
27
|
-
display: inline-flex;
|
|
28
|
-
align-items: center;
|
|
29
|
-
justify-content: center;
|
|
30
|
-
text-align: center;
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: 100%;
|
|
33
|
-
min-height: inherit;
|
|
34
|
-
text-shadow: inherit;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
[part='prefix'],
|
|
38
|
-
[part='suffix'] {
|
|
39
|
-
flex: none;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
[part='label'] {
|
|
43
|
-
white-space: nowrap;
|
|
44
|
-
overflow: hidden;
|
|
45
|
-
text-overflow: ellipsis;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
@media (forced-colors: active) {
|
|
49
|
-
:host {
|
|
50
|
-
outline: 1px solid;
|
|
51
|
-
outline-offset: -1px;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
:host([focused]) {
|
|
55
|
-
outline-width: 2px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
:host([disabled]) {
|
|
59
|
-
outline-color: GrayText;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
`;var c=i(84467),h=i(53149),u=i(36176);const m=t=>class extends((0,c.e)((0,u.l)((0,h.y)(t)))){static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}};(0,l.SF)("vaadin-button",d,{moduleId:"vaadin-button-styles"});class p extends(m((0,s.q)((0,l.cp)((0,o.w)(r.Pu))))){static get is(){return"vaadin-button"}static get template(){return r.qy`
|
|
63
|
-
<div class="vaadin-button-container">
|
|
64
|
-
<span part="prefix" aria-hidden="true">
|
|
65
|
-
<slot name="prefix"></slot>
|
|
66
|
-
</span>
|
|
67
|
-
<span part="label">
|
|
68
|
-
<slot></slot>
|
|
69
|
-
</span>
|
|
70
|
-
<span part="suffix" aria-hidden="true">
|
|
71
|
-
<slot name="suffix"></slot>
|
|
72
|
-
</span>
|
|
73
|
-
</div>
|
|
74
|
-
<slot name="tooltip"></slot>
|
|
75
|
-
`}ready(){super.ready(),this._tooltipController=new a.I(this),this.addController(this._tooltipController)}}(0,n.X)(p)},93555(t,e,i){"use strict";i.d(e,{x:()=>o}),i(64511),i(42068),i(9433),i(3241),i(83315);var r=i(87550);const o=r.AH`
|
|
76
|
-
:host {
|
|
77
|
-
/* Sizing */
|
|
78
|
-
--lumo-button-size: var(--lumo-size-m);
|
|
79
|
-
min-width: var(--vaadin-button-min-width, calc(var(--_button-size) * 2));
|
|
80
|
-
height: var(--_button-size);
|
|
81
|
-
padding: var(--vaadin-button-padding, 0 calc(var(--_button-size) / 3 + var(--lumo-border-radius-m) / 2));
|
|
82
|
-
margin: var(--vaadin-button-margin, var(--lumo-space-xs) 0);
|
|
83
|
-
box-sizing: border-box;
|
|
84
|
-
/* Style */
|
|
85
|
-
font-family: var(--lumo-font-family);
|
|
86
|
-
font-size: var(--vaadin-button-font-size, var(--lumo-font-size-m));
|
|
87
|
-
font-weight: var(--vaadin-button-font-weight, 500);
|
|
88
|
-
color: var(--_lumo-button-text-color);
|
|
89
|
-
background: var(--_lumo-button-background);
|
|
90
|
-
border: var(--vaadin-button-border, none);
|
|
91
|
-
border-radius: var(--vaadin-button-border-radius, var(--lumo-border-radius-m));
|
|
92
|
-
cursor: var(--lumo-clickable-cursor);
|
|
93
|
-
-webkit-tap-highlight-color: transparent;
|
|
94
|
-
-webkit-font-smoothing: antialiased;
|
|
95
|
-
-moz-osx-font-smoothing: grayscale;
|
|
96
|
-
flex-shrink: 0;
|
|
97
|
-
--_button-size: var(--vaadin-button-height, var(--lumo-button-size));
|
|
98
|
-
--_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
|
|
99
|
-
--_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
|
|
100
|
-
/* Used by notification */
|
|
101
|
-
--_lumo-button-background: var(--vaadin-button-background, var(--lumo-contrast-5pct));
|
|
102
|
-
--_lumo-button-text-color: var(--vaadin-button-text-color, var(--lumo-primary-text-color));
|
|
103
|
-
--_lumo-button-primary-background: var(--vaadin-button-primary-background, var(--lumo-primary-color));
|
|
104
|
-
--_lumo-button-primary-text-color: var(--vaadin-button-primary-text-color, var(--lumo-primary-contrast-color));
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/* Set only for the internal parts so we don't affect the host vertical alignment */
|
|
108
|
-
[part='label'],
|
|
109
|
-
[part='prefix'],
|
|
110
|
-
[part='suffix'] {
|
|
111
|
-
line-height: var(--lumo-line-height-xs);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
[part='label'] {
|
|
115
|
-
padding: calc(var(--lumo-button-size) / 6) 0;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
:host([theme~='small']) {
|
|
119
|
-
font-size: var(--lumo-font-size-s);
|
|
120
|
-
--lumo-button-size: var(--lumo-size-s);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
:host([theme~='large']) {
|
|
124
|
-
font-size: var(--lumo-font-size-l);
|
|
125
|
-
--lumo-button-size: var(--lumo-size-l);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/* For interaction states */
|
|
129
|
-
:host::before,
|
|
130
|
-
:host::after {
|
|
131
|
-
content: '';
|
|
132
|
-
/* We rely on the host always being relative */
|
|
133
|
-
position: absolute;
|
|
134
|
-
z-index: 1;
|
|
135
|
-
inset: 0;
|
|
136
|
-
background-color: currentColor;
|
|
137
|
-
border-radius: inherit;
|
|
138
|
-
opacity: 0;
|
|
139
|
-
pointer-events: none;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/* Hover */
|
|
143
|
-
|
|
144
|
-
@media (any-hover: hover) {
|
|
145
|
-
:host(:hover)::before {
|
|
146
|
-
opacity: 0.02;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/* Active */
|
|
151
|
-
|
|
152
|
-
:host::after {
|
|
153
|
-
transition: opacity 1.4s, transform 0.1s;
|
|
154
|
-
filter: blur(8px);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
:host([active])::before {
|
|
158
|
-
opacity: 0.05;
|
|
159
|
-
transition-duration: 0s;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
:host([active])::after {
|
|
163
|
-
opacity: 0.1;
|
|
164
|
-
transition-duration: 0s, 0s;
|
|
165
|
-
transform: scale(0);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/* Keyboard focus */
|
|
169
|
-
|
|
170
|
-
:host([focus-ring]) {
|
|
171
|
-
box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
:host([theme~='primary'][focus-ring]) {
|
|
175
|
-
box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
/* Types (primary, tertiary, tertiary-inline */
|
|
179
|
-
|
|
180
|
-
:host([theme~='tertiary']),
|
|
181
|
-
:host([theme~='tertiary-inline']) {
|
|
182
|
-
--_background: transparent !important;
|
|
183
|
-
background: var(--vaadin-button-tertiary-background, var(--_background));
|
|
184
|
-
min-width: 0;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
:host([theme~='tertiary']) {
|
|
188
|
-
border: var(--vaadin-button-tertiary-border, none);
|
|
189
|
-
color: var(--vaadin-button-tertiary-text-color, var(--lumo-primary-text-color));
|
|
190
|
-
font-weight: var(--vaadin-button-tertiary-font-weight, 500);
|
|
191
|
-
padding: var(--vaadin-button-tertiary-padding, 0 calc(var(--_button-size) / 6));
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
:host([theme~='tertiary-inline'])::before {
|
|
195
|
-
display: none;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
:host([theme~='tertiary-inline']) {
|
|
199
|
-
margin: 0;
|
|
200
|
-
height: auto;
|
|
201
|
-
padding: 0;
|
|
202
|
-
line-height: inherit;
|
|
203
|
-
font-size: inherit;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
:host([theme~='tertiary-inline']) [part='label'] {
|
|
207
|
-
padding: 0;
|
|
208
|
-
overflow: visible;
|
|
209
|
-
line-height: inherit;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
:host([theme~='primary']) {
|
|
213
|
-
background: var(--_lumo-button-primary-background);
|
|
214
|
-
border: var(--vaadin-button-primary-border, none);
|
|
215
|
-
color: var(--_lumo-button-primary-text-color);
|
|
216
|
-
font-weight: var(--vaadin-button-primary-font-weight, 600);
|
|
217
|
-
min-width: calc(var(--lumo-button-size) * 2.5);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
:host([theme~='primary'])::before {
|
|
221
|
-
background-color: black;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
@media (any-hover: hover) {
|
|
225
|
-
:host([theme~='primary']:hover)::before {
|
|
226
|
-
opacity: 0.05;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
:host([theme~='primary'][active])::before {
|
|
231
|
-
opacity: 0.1;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
:host([theme~='primary'][active])::after {
|
|
235
|
-
opacity: 0.2;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
/* Colors (success, error, contrast) */
|
|
239
|
-
|
|
240
|
-
:host([theme~='success']) {
|
|
241
|
-
color: var(--lumo-success-text-color);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
:host([theme~='success'][theme~='primary']) {
|
|
245
|
-
background-color: var(--lumo-success-color);
|
|
246
|
-
color: var(--lumo-success-contrast-color);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
:host([theme~='error']) {
|
|
250
|
-
color: var(--lumo-error-text-color);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
:host([theme~='error'][theme~='primary']) {
|
|
254
|
-
background-color: var(--lumo-error-color);
|
|
255
|
-
color: var(--lumo-error-contrast-color);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
:host([theme~='contrast']) {
|
|
259
|
-
color: var(--lumo-contrast);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
:host([theme~='contrast'][theme~='primary']) {
|
|
263
|
-
background-color: var(--lumo-contrast);
|
|
264
|
-
color: var(--lumo-base-color);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
/* Disabled state. Keep selectors after other color variants. */
|
|
268
|
-
|
|
269
|
-
:host([disabled]) {
|
|
270
|
-
pointer-events: none;
|
|
271
|
-
color: var(--lumo-disabled-text-color);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
:host([theme~='primary'][disabled]) {
|
|
275
|
-
background-color: var(--lumo-contrast-30pct);
|
|
276
|
-
color: var(--lumo-base-color);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
:host([theme~='primary'][disabled]) [part] {
|
|
280
|
-
opacity: 0.7;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
/* Icons */
|
|
284
|
-
|
|
285
|
-
[part] ::slotted(vaadin-icon) {
|
|
286
|
-
display: inline-block;
|
|
287
|
-
width: var(--lumo-icon-size-m);
|
|
288
|
-
height: var(--lumo-icon-size-m);
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
|
292
|
-
[part] ::slotted(vaadin-icon[icon^='vaadin:']) {
|
|
293
|
-
padding: 0.25em;
|
|
294
|
-
box-sizing: border-box !important;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
[part='prefix'] {
|
|
298
|
-
margin-left: -0.25em;
|
|
299
|
-
margin-right: 0.25em;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
[part='suffix'] {
|
|
303
|
-
margin-left: 0.25em;
|
|
304
|
-
margin-right: -0.25em;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
/* Icon-only */
|
|
308
|
-
|
|
309
|
-
:host([theme~='icon']:not([theme~='tertiary-inline'])) {
|
|
310
|
-
min-width: var(--lumo-button-size);
|
|
311
|
-
padding-left: calc(var(--lumo-button-size) / 4);
|
|
312
|
-
padding-right: calc(var(--lumo-button-size) / 4);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
:host([theme~='icon']) [part='prefix'],
|
|
316
|
-
:host([theme~='icon']) [part='suffix'] {
|
|
317
|
-
margin-left: 0;
|
|
318
|
-
margin-right: 0;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
/* RTL specific styles */
|
|
322
|
-
|
|
323
|
-
:host([dir='rtl']) [part='prefix'] {
|
|
324
|
-
margin-left: 0.25em;
|
|
325
|
-
margin-right: -0.25em;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
:host([dir='rtl']) [part='suffix'] {
|
|
329
|
-
margin-left: -0.25em;
|
|
330
|
-
margin-right: 0.25em;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
:host([dir='rtl'][theme~='icon']) [part='prefix'],
|
|
334
|
-
:host([dir='rtl'][theme~='icon']) [part='suffix'] {
|
|
335
|
-
margin-left: 0;
|
|
336
|
-
margin-right: 0;
|
|
337
|
-
}
|
|
338
|
-
`;(0,r.SF)("vaadin-button",o,{moduleId:"lumo-button"})},83799(t,e,i){"use strict";i(93555),i(89389)}}]);
|
|
1
|
+
(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[743,1202,2250,6724],{44006(t){t.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMWVtIiBoZWlnaHQ9IjFlbSIgdmlld0JveD0iMCAwIDEwNCAxMDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+IDxwYXRoIGQ9Ik01MC4zMzM0IDAuMzMzMjUyQzIyLjgzMzQgMC4zMzMyNTIgMC4zMzMzNzQgMjIuODMzMyAwLjMzMzM3NCA1MC4zMzMzQzAuMzMzMzc0IDc3LjgzMzMgMjIuODMzNCAxMDAuMzMzIDUwLjMzMzQgMTAwLjMzM0M3Ny44MzM0IDEwMC4zMzMgMTAwLjMzMyA3Ny44MzMzIDEwMC4zMzMgNTAuMzMzM0MxMDAuMzMzIDIyLjgzMzMgNzcuODMzNCAwLjMzMzI1MiA1MC4zMzM0IDAuMzMzMjUyWk01MC4zMzM0IDg3LjgzMzNDMjkuNzA4NCA4Ny44MzMzIDEyLjgzMzQgNzAuOTU4MyAxMi44MzM0IDUwLjMzMzNDMTIuODMzNCAyOS43MDgzIDI5LjcwODQgMTIuODMzMyA1MC4zMzM0IDEyLjgzMzNDNzAuOTU4NCAxMi44MzMzIDg3LjgzMzQgMjkuNzA4MyA4Ny44MzM0IDUwLjMzMzNDODcuODMzNCA3MC45NTgzIDcwLjk1ODQgODcuODMzMyA1MC4zMzM0IDg3LjgzMzNaIiBmaWxsPSIjMTgxQTFDIi8+IDxwYXRoIGQ9Ik01MC4zMzI4IDE5LjA4MzNINDQuMDgyOFY1Ni41ODMySDc1LjMzMjhWNTAuMzMzMkg1MC4zMzI4VjE5LjA4MzNaIiBmaWxsPSIjMTgxQTFDIi8+IDwvc3ZnPiA="},19624(t,e,i){"use strict";i.d(e,{J:()=>p,T:()=>l});var s=i(63200),n=i(25964),r=i(88961),o=i(98538),a=i(10767);const l=(0,n.xE)("button"),{host:d,label:h,slottedIcon:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let u;const p=(0,s.Zz)((0,r.DM)({triggers:[{attr:"full-width",value:"true"}]}),(0,r.RF)({mappings:{hostWidth:{property:"width"},hostMaxWidth:{...d,property:"max-width"},hostHeight:{property:"height"},hostDirection:{...d,property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},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:o.S.cssVarList.fill},labelTextDecoration:{...h,property:"text-decoration"},labelSpacing:{...h,property:"gap"},textAlign:{...h,property:"justify-content",fallback:"center"},iconSize:[{...c,property:"width"},{...c,property:"height"}]}}),a.G,r.VO,r.tQ)((0,r.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(${p.cssVarList.outlineWidth}) + var(${p.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${p.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${p.cssVarList.hostHeight}) - var(${p.cssVarList.outlineWidth}) - var(${p.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${p.cssVarList.hostWidth}) - var(${p.cssVarList.outlineWidth}) - var(${p.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex","class","style"],componentName:l})),{color:m,fontSize:g}=p.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(${m});\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`},10767(t,e,i){"use strict";i.d(e,{G:()=>s});const s=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},30576(t,e,i){"use strict";i.r(e),i.d(e,{ButtonClass:()=>s.J,componentName:()=>s.T});var s=i(19624);i(83799),customElements.define(s.T,s.J)},98538(t,e,i){"use strict";i.d(e,{S:()=>l,T:()=>a});var s=i(88961),n=i(25964),r=i(8512),o=i(63200);const a=(0,n.xE)("icon"),l=(0,o.Zz)((0,s.RF)({mappings:{fill:[{},{property:r.q.cssVarList.fill}],height:{selector:()=>":host"},width:{selector:()=>":host"}}}),s.VO,s.tQ)((0,s.tz)({slots:[],wrappedEleName:"descope-image",style:()=>"\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n ",excludeAttrsSync:["tabindex","class","style","st-height","st-width"],componentName:a}))},56737(t,e,i){"use strict";i.r(e),i.d(e,{IconClass:()=>s.S,componentName:()=>s.T}),i(53455);var s=i(98538);customElements.define(s.T,s.S)},8512(t,e,i){"use strict";i.d(e,{T:()=>l,q:()=>c});var s=i(88961),n=i(72270),r=i(63200),o=i(25964),a=i(18782);const l=(0,o.xE)("image"),d=["src","src-dark"];class h extends((0,n.qu)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return d}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,o.fz)("\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n ",this)}init(){super.init?.(),this.toggleVisibility(this.getSrc)}onThemeChange(){this.renderImage()}toggleVisibility(t){t?this.classList.remove("hidden"):this.classList.add("hidden")}get altText(){return this.getAttribute("alt")||""}get legacySrc(){return this.getAttribute("src")}get themeSrc(){return this.getAttribute(`src-${this.currentThemeName}`)}get getSrc(){return this.themeSrc||this.legacySrc}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach(t=>{t.setAttribute("fill",`var(${c.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)})}renderImage(){this.toggleVisibility(this.getSrc),(0,a.m)(this.getSrc,this.altText).then(t=>{this.innerHTML="",t&&(this.updateFillColor(t),this.appendChild(t))})}shouldRender(t){const e=this.getAttribute(t);return this.getSrc===e}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),e!==i&&this.shouldRender(t)&&this.renderImage()}}const c=(0,r.Zz)((0,s.RF)({mappings:{fill:{},height:{selector:()=>":host"},width:{selector:()=>":host"}}}),s.VO,s.tQ)(h)},18782(t,e,i){"use strict";i.d(e,{m:()=>r});var s=i(25414);const n=t=>{const e=s.A.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:["image"],FORBID_TAGS:["defs"]});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},r=async(t,e)=>{try{let i;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const e=atob(t.slice(26));i=n(e)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const e=await fetch(t),s=await e.text();i=n(s)}else i=((t,e)=>{const i=document.createElement("img");return i.setAttribute("src",t),i.setAttribute("alt",e),i})(t,e);return i.style.setProperty("max-width","100%"),i.style.setProperty("max-height","100%"),i}catch{return null}}},53455(t,e,i){"use strict";i.r(e),i.d(e,{ImageClass:()=>s.q,componentName:()=>s.T});var s=i(8512);customElements.define(s.T,s.q)},60096(t,e,i){"use strict";i.r(e),i.d(e,{TimerButtonClass:()=>v,componentName:()=>d});var s=i(88961),n=i(72270),r=i(63200),o=i(25964),a=i(64388),l=i(19624);const d=(0,o.xE)("timer-button"),h=["button-variant","button-mode","size","text-align","full-width"],c={"button-variant":"variant","button-mode":"mode"},u=["timer-seconds","timer-hide-icon","timer-paused","size","text-align","full-width"],p={"timer-seconds":"seconds","timer-hide-icon":"hide-icon","timer-paused":"paused"},m=(0,n.qu)({componentName:d,baseSelector:":host > div"}),{host:g,nestedTimer:b,nestedButton:M,timerInsideNotReversed:z,timerInsideReversed:y}={host:{selector:()=>":host"},nestedTimer:{selector:()=>':host([timer-inside="true"]) .timer'},nestedButton:{selector:()=>':host([timer-inside="true"]) .button'},timerInsideNotReversed:{selector:()=>':host([timer-inside="true"]:not([timer-position="end"])) .timer'},timerInsideReversed:{selector:()=>':host([timer-inside="true"][timer-position="end"]) .timer'}},v=(0,r.Zz)((0,s.RF)({mappings:{gap:{},flexDirection:{},hostWidth:{...g,property:"width"},hostDirection:{...g,property:"direction"},timerTextColor:{...b,property:a.A.cssVarList.textColor},timerIconColor:{...b,property:a.A.cssVarList.iconColor},timerHostWidth:{...b,property:a.A.cssVarList.hostWidth},buttonLabelSpacing:{...M,property:l.J.cssVarList.labelSpacing},timerInsideGapEnd:{...z,property:"margin-inline-end"},timerInsideGapStart:{...y,property:"margin-inline-start"}}}),s.VO,s.tQ)(class extends m{constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="wrapper">\n <descope-timer class="timer"></descope-timer>\n <descope-button class="button" disabled="true">\n <slot></slot>\n </descope-button>\n </div>\n\t\t',(0,o.fz)('\n :host {\n display: inline-flex;\n }\n .wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n }\n /* allow timer to grow along the main axis in the wrapper flex container */\n :host(:not([timer-inside="true"])) .timer {\n flex: 1;\n }\n :host([timer-inside="true"]) .timer {\n flex: 0 0 auto;\n }\n ',this),this.wrapper=this.shadowRoot.querySelector(".wrapper"),this.timer=this.shadowRoot.querySelector(".timer"),this.button=this.shadowRoot.querySelector(".button"),this.forwardingSlot=this.shadowRoot.querySelector(".button slot"),this.timer.addEventListener("timer-started",()=>this.onTimerStarted()),this.timer.addEventListener("timer-ended",()=>this.onTimerEnded()),this.syncTimerPlacement(),this.button.addEventListener("click",this.onClick.bind(this))}static get observedAttributes(){return[...super.observedAttributes||[],"timer-inside","timer-position"]}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),"timer-inside"!==t&&"timer-position"!==t||this.syncTimerPlacement()}get#t(){return"true"===this.getAttribute("timer-inside")}get#e(){return"end"===this.getAttribute("timer-position")}syncTimerPlacement(){this.#t?this.#i(this.#e):this.#s()}#i(t){t?this.timer.previousSibling!==this.forwardingSlot&&this.button.appendChild(this.timer):this.timer.nextSibling!==this.forwardingSlot&&this.button.insertBefore(this.timer,this.forwardingSlot)}#s(){this.timer.parentElement!==this.wrapper&&this.wrapper.insertBefore(this.timer,this.button)}set onclick(t){this.button.onclick=t}init(){super.init?.(),(0,o.EA)(this,this.button,{includeAttrs:h,mapAttrs:c}),(0,o.EA)(this,this.timer,{includeAttrs:u,mapAttrs:p}),this.button.shadowRoot.querySelector("vaadin-button").setAttribute("disabled","true")}onTimerStarted(){this.toggleButtonDisable(!0)}onTimerEnded(){this.toggleButtonDisable(!1)}onClick(){this.timer.reset()}toggleButtonDisable(t){setTimeout(()=>{t?this.button.setAttribute("disabled","true"):this.button.removeAttribute("disabled")})}});i(30576),i(61479),customElements.define(d,v)},64388(t,e,i){"use strict";i.d(e,{A:()=>M,T:()=>c});var s=i(88961),n=i(72270),r=i(63200),o=i(25964),a=i(44006),l=i.n(a),d=i(98538),h=i(62054);const c=(0,o.xE)("timer"),u=["seconds","hide-icon","paused"],p=(0,n.qu)({componentName:c,baseSelector:":host > .wrapper"}),{host:m,icon:g,timer:b}={host:{selector:()=>":host"},icon:{selector:()=>".icon"},timer:{selector:()=>".timer"}},M=(0,r.Zz)((0,s.RF)({mappings:{fontSize:{},iconSize:[{...g,property:"width"},{...g,property:"height"}],fontFamily:{},minHeight:{},fontWeight:{...b},lineHeight:{...b},textColor:{...b,property:"color"},gap:{},textAlign:{property:"justify-content"},hostWidth:{...m,property:"width"},hostDirection:{...m,property:"direction"},iconColor:{...g,property:d.S.cssVarList.fill}}}),s.VO,s.tQ)(class extends p{#n=0;#r;static get observedAttributes(){return u.concat(p.observedAttributes||[])}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <div class="wrapper">\n <descope-icon src="${l()}" class="icon"></descope-icon>\n <div class="timer"></div>\n </div>\n\t\t`,(0,o.fz)("\n :host {\n display: inline-flex;\n user-select: none;\n -webkit-user-select: none;\n }\n .wrapper {\n display: flex;\n align-items: center;\n flex-direction: row;\n width: 100%;\n }\n .hidden {\n display: none;\n }\n ",this),this.icon=this.shadowRoot.querySelector(".icon"),this.timer=this.shadowRoot.querySelector(".timer")}get seconds(){const t=this.getAttribute("seconds"),e=1e3*parseInt(t||0,10);return Math.max(0,e)}get isPaused(){return"true"===this.getAttribute("paused")}init(){super.init?.(),this.#n=this.seconds}startInterval(){this.#n?this.#r=setInterval(()=>{this.#o(),this.#n||this.stop(),this.#a(this.#n)},1e3):this.stop()}stopInterval(){clearInterval(this.#r)}#o(){this.#n=this.#n-1e3}reset(){this.#n=this.seconds,this.#a(this.#n),this.isPaused||(this.dispatchEvent(new CustomEvent("timer-started",{bubbles:!0})),this.startInterval())}stop(){this.stopInterval(),this.#n=0,this.#a(this.#n),this.dispatchEvent(new CustomEvent("timer-ended",{bubbles:!0}))}pause(){this.setAttribute("paused","true"),this.stopInterval()}resume(){this.removeAttribute("paused"),this.startInterval()}#a(t){this.timer.textContent=(0,h.f)(t)}#l(t){this.icon.classList.toggle("hidden",t)}#d(t){setTimeout(()=>{t?this.pause():this.#r||this.resume()})}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),i!==e&&("seconds"===t&&this.reset(),"hide-icon"===t&&this.#l("true"===i),"paused"===t&&this.#d("true"===i))}})},62054(t,e,i){"use strict";i.d(e,{f:()=>n});const s=(t,e=2)=>String(t).padStart(e,"0"),n=(t=0)=>{const e=Math.floor(t/1e3),i=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return[...i?[s(i)]:[],s(n),s(r)].join(":")}},61479(t,e,i){"use strict";i.r(e),i.d(e,{TimerClass:()=>s.A,componentName:()=>s.T});var s=i(64388);i(56737),customElements.define(s.T,s.A)}}]);
|
|
339
2
|
//# sourceMappingURL=descope-timer-button.js.map
|