@descope/web-components-ui 2.2.11 → 2.2.13
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 +2043 -1752
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2000 -1707
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/6419.js +82 -0
- package/dist/umd/6419.js.LICENSE.txt +23 -0
- package/dist/umd/6419.js.map +1 -0
- package/dist/umd/8961.js +1 -1
- package/dist/umd/8961.js.map +1 -1
- package/dist/umd/9365.js +1 -1
- package/dist/umd/9365.js.map +1 -1
- package/dist/umd/9582.js +1 -1
- package/dist/umd/9582.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -1
- package/dist/umd/descope-alert-index-js.js +1 -1
- package/dist/umd/descope-alert-index-js.js.map +1 -1
- package/dist/umd/descope-button.js +1 -1
- package/dist/umd/descope-button.js.map +1 -1
- package/dist/umd/descope-collapsible-container.js +1 -1
- package/dist/umd/descope-collapsible-container.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-enriched-text.js +1 -1
- package/dist/umd/descope-enriched-text.js.map +1 -1
- package/dist/umd/descope-icon.js +1 -1
- package/dist/umd/descope-icon.js.map +1 -1
- package/dist/umd/descope-image.js +1 -1
- package/dist/umd/descope-image.js.map +1 -1
- package/dist/umd/descope-outbound-app-button.js +1 -1
- package/dist/umd/descope-outbound-app-button.js.map +1 -1
- package/dist/umd/descope-outbound-apps.js +1 -1
- package/dist/umd/descope-outbound-apps.js.map +1 -1
- package/dist/umd/descope-third-party-app-logo-index-js.js +1 -1
- package/dist/umd/descope-third-party-app-logo-index-js.js.map +1 -1
- package/dist/umd/descope-timer-button.js +1 -1
- package/dist/umd/descope-timer-button.js.map +1 -1
- package/dist/umd/descope-timer.js +1 -1
- package/dist/umd/descope-timer.js.map +1 -1
- package/dist/umd/descope-tooltip.js +2 -0
- package/dist/umd/descope-tooltip.js.map +1 -0
- package/dist/umd/descope-trusted-devices.js +1 -1
- package/dist/umd/descope-trusted-devices.js.map +1 -1
- package/dist/umd/descope-upload-file-index-js.js +1 -1
- package/dist/umd/descope-upload-file-index-js.js.map +1 -1
- package/dist/umd/descope-user-attribute-index-js.js +3 -3
- package/dist/umd/descope-user-attribute-index-js.js.map +1 -1
- package/dist/umd/descope-user-auth-method-index-js.js +1 -1
- package/dist/umd/descope-user-auth-method-index-js.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
- package/package.json +29 -28
- package/src/helpers/componentHelpers.js +3 -0
- package/src/mixins/createStyleMixin/index.js +1 -1
- package/src/mixins/hoverableMixin.js +1 -1
- package/src/mixins/portalMixin.js +15 -7
- package/src/theme/components/index.js +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descope-timer-button.js","mappings":";+OAYO,MAAMA,GAAgB,QAAiB,SAExCC,EAAW,CAAC,MAAO,YAEzB,MAAMC,WAAiB,QAAgB,CACrCF,gBACAG,aAAc,UAEd,6BAAWC,GACT,OAAOH,CACT,CAEA,WAAAI,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,2BAIhD,QACE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AAc,CAAEqB,SAAU,yBAqC1D,MAAMC,UAAerB,GAAY,QAAa,SAAc,OAAgB,UAC1E,aAAWsB,GACT,MAAO,eACT,CAEA,mBAAWC,GACT,OAAsB,IFYkB;;;;;;;;;;;;;CEX1C,CAGA,KAAAd,GACE3L,MAAM2L,QAEN1L,KAAKyM,mBAAqB,IAAI,IAAkBzM,MAChDA,KAAK0M,cAAc1M,KAAKyM,mBAC1B,GAGF,OAAoBH,E,0GC9DpB,MAAMjC,EAAS,IAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyQlB,QAAe,gBAAiBA,EAAQ,CAAEgC,SAAU,e,uGCtQ7C,MAAM5M,GAAgB,QAAiB,QAEjC0E,GAAY,SACvB,QAAiB,CACf/B,SAAU,CACRV,KAAM,CAAC,CAAC,EAAG,CAAE8B,SAAU,IAAW/B,WAAWC,UAGjD,KACA,KAPuB,EASvB,QAAY,CACV+H,MAAO,GACPC,eAAgB,gBAChBxB,MAAO,IAAM,kEAKbyB,iBAAkB,CAAC,WAAY,QAAS,SACxClK,kB","sources":["webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/TimerClass.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/clock.svg","webpack://@descope/web-components-ui/../components/descope-image/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-timer-button/src/component/TimerButtonClass.js","webpack://@descope/web-components-ui/../components/descope-timer-button/src/component/index.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button-base.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/theme/lumo/vaadin-button-styles.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js"],"sourcesContent":["/* eslint-disable no-use-before-define */\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.src);\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 src() {\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 // eslint-disable-next-line class-methods-use-this\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.src);\n\n createImage(this.src, 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.src === 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","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","const fmt = (val, pad = 2) => String(val).padStart(pad, '0');\n\nexport const formatTime = (ms = 0) => {\n const totalSeconds = Math.floor(ms / 1000);\n\n const secondsInMinute = 60;\n const secondsInHour = secondsInMinute * 60;\n\n const hours = Math.floor(totalSeconds / secondsInHour);\n const minutes = Math.floor((totalSeconds % secondsInHour) / secondsInMinute);\n const seconds = totalSeconds % secondsInMinute;\n\n const timeParts = [...(hours ? [fmt(hours)] : []), fmt(minutes), fmt(seconds)];\n\n return timeParts.join(':');\n};\n","import {\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 {\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport clockIcon from './clock.svg';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { formatTime } from './helpers';\n\nexport const componentName = getComponentName('timer');\n\nconst observedAttributes = ['seconds', 'hide-icon', 'paused'];\n\nconst BaseClass = createBaseClass({\n componentName,\n baseSelector: ':host > .wrapper',\n});\n\nconst DEFAULT_INTERVAL = 1000;\n\nclass RawTimer extends BaseClass {\n #timeRemains = 0;\n\n #intervalId;\n\n static get observedAttributes() {\n return observedAttributes.concat(BaseClass.observedAttributes || []);\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <descope-icon src=\"${clockIcon}\" class=\"icon\"></descope-icon>\n <div class=\"timer\"></div>\n </div>\n\t\t`;\n\n injectStyle(\n `\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 `,\n this,\n );\n\n this.icon = this.shadowRoot.querySelector('.icon');\n this.timer = this.shadowRoot.querySelector('.timer');\n }\n\n get seconds() {\n const val = this.getAttribute('seconds');\n const secs = parseInt(val || 0, 10) * 1000;\n return Math.max(0, secs);\n }\n\n // we use `pause` attribute for allowing preview mode by executing `pause`\n get isPaused() {\n return this.getAttribute('paused') === 'true';\n }\n\n init() {\n super.init?.();\n\n this.#timeRemains = this.seconds;\n }\n\n startInterval() {\n const intervalCycle = () => {\n this.#decreaseInterval();\n if (!this.#timeRemains) this.stop();\n this.#updateDisplay(this.#timeRemains);\n };\n\n if (this.#timeRemains) {\n this.#intervalId = setInterval(intervalCycle, DEFAULT_INTERVAL);\n } else {\n this.stop();\n }\n }\n\n stopInterval() {\n clearInterval(this.#intervalId);\n }\n\n #decreaseInterval() {\n this.#timeRemains = this.#timeRemains - DEFAULT_INTERVAL;\n }\n\n reset() {\n this.#timeRemains = this.seconds;\n this.#updateDisplay(this.#timeRemains);\n\n if (this.isPaused) return;\n\n this.dispatchEvent(new CustomEvent('timer-started', { bubbles: true }));\n this.startInterval();\n }\n\n stop() {\n this.stopInterval();\n this.#timeRemains = 0;\n this.#updateDisplay(this.#timeRemains);\n this.dispatchEvent(new CustomEvent('timer-ended', { bubbles: true }));\n }\n\n pause() {\n this.setAttribute('paused', 'true');\n this.stopInterval();\n }\n\n resume() {\n this.removeAttribute('paused');\n this.startInterval();\n }\n\n #updateDisplay(val) {\n this.timer.textContent = formatTime(val);\n }\n\n #toggleIcon(val) {\n this.icon.classList.toggle('hidden', val);\n }\n\n #handlePause(paused) {\n setTimeout(() => {\n if (paused) {\n this.pause();\n } else {\n // we want to prevent a another interval from starting in case previous interval was not yet cleared\n if (!this.#intervalId) {\n this.resume();\n }\n }\n });\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue !== oldValue) {\n if (attrName === 'seconds') {\n this.reset();\n }\n if (attrName === 'hide-icon') {\n this.#toggleIcon(newValue === 'true');\n }\n if (attrName === 'paused') {\n this.#handlePause(newValue === 'true');\n }\n }\n }\n}\n\nconst { host, icon, timer } = {\n host: { selector: () => ':host' },\n icon: { selector: () => '.icon' },\n timer: { selector: () => '.timer' },\n};\n\nexport const TimerClass = compose(\n createStyleMixin({\n mappings: {\n fontSize: {},\n iconSize: [\n { ...icon, property: 'width' },\n { ...icon, property: 'height' },\n ],\n fontFamily: {},\n minHeight: {},\n fontWeight: { ...timer },\n lineHeight: { ...timer },\n textColor: { ...timer, property: 'color' },\n gap: {},\n textAlign: { property: 'justify-content' },\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n iconColor: { ...icon, property: IconClass.cssVarList.fill },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawTimer);\n","import { componentName, TimerClass } from './TimerClass';\nimport '@descope-ui/descope-icon';\n\ncustomElements.define(componentName, TimerClass);\n\nexport { TimerClass, componentName };\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 { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\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 createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\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: [{ property: 'padding-top' }, { property: 'padding-bottom' }],\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\t\tselector: () => `::slotted(*)`,\n\t\tproperty: IconClass.cssVarList.fill\n\t },\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","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","module.exports = \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMWVtIiBoZWlnaHQ9IjFlbSIgdmlld0JveD0iMCAwIDEwNCAxMDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+IDxwYXRoIGQ9Ik01MC4zMzM0IDAuMzMzMjUyQzIyLjgzMzQgMC4zMzMyNTIgMC4zMzMzNzQgMjIuODMzMyAwLjMzMzM3NCA1MC4zMzMzQzAuMzMzMzc0IDc3LjgzMzMgMjIuODMzNCAxMDAuMzMzIDUwLjMzMzQgMTAwLjMzM0M3Ny44MzM0IDEwMC4zMzMgMTAwLjMzMyA3Ny44MzMzIDEwMC4zMzMgNTAuMzMzM0MxMDAuMzMzIDIyLjgzMzMgNzcuODMzNCAwLjMzMzI1MiA1MC4zMzM0IDAuMzMzMjUyWk01MC4zMzM0IDg3LjgzMzNDMjkuNzA4NCA4Ny44MzMzIDEyLjgzMzQgNzAuOTU4MyAxMi44MzM0IDUwLjMzMzNDMTIuODMzNCAyOS43MDgzIDI5LjcwODQgMTIuODMzMyA1MC4zMzM0IDEyLjgzMzNDNzAuOTU4NCAxMi44MzMzIDg3LjgzMzQgMjkuNzA4MyA4Ny44MzM0IDUwLjMzMzNDODcuODMzNCA3MC45NTgzIDcwLjk1ODQgODcuODMzMyA1MC4zMzM0IDg3LjgzMzNaIiBmaWxsPSIjMTgxQTFDIi8+IDxwYXRoIGQ9Ik01MC4zMzI4IDE5LjA4MzNINDQuMDgyOFY1Ni41ODMySDc1LjMzMjhWNTAuMzMzMkg1MC4zMzI4VjE5LjA4MzNaIiBmaWxsPSIjMTgxQTFDIi8+IDwvc3ZnPiA=\"","import { componentName, ImageClass } from './ImageClass';\n\ncustomElements.define(componentName, ImageClass);\n\nexport { ImageClass, componentName };\n","import '@descope-ui/descope-image';\n\nimport { componentName, IconClass } from './IconClass';\n\ncustomElements.define(componentName, IconClass);\n\nexport { IconClass, componentName };\n","import {\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 {\n forwardAttrs,\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('timer-button');\n\nconst buttonAttrs = [\n 'button-variant',\n 'button-mode',\n 'size',\n 'text-align',\n 'full-width',\n];\n\nconst mapButtonAttrs = {\n 'button-variant': 'variant',\n 'button-mode': 'mode',\n};\n\nconst timerAttrs = [\n 'timer-seconds',\n 'timer-hide-icon',\n 'timer-paused',\n 'size',\n 'text-align',\n 'full-width',\n];\n\nconst mapTimerAttrs = {\n 'timer-seconds': 'seconds',\n 'timer-hide-icon': 'hide-icon',\n 'timer-paused': 'paused',\n};\n\nconst BaseClass = createBaseClass({\n componentName,\n baseSelector: ':host > div',\n});\n\nclass RawTimerButton extends BaseClass {\n constructor() {\n super();\n\n 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`;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n }\n .wrapper {\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n align-items: center;\n width: 100%;\n }\n .timer {\n flex: 1;\n }\n `,\n this,\n );\n\n this.timer = this.shadowRoot.querySelector('.timer');\n this.button = this.shadowRoot.querySelector('.button');\n\n this.timer.addEventListener('timer-started', () => this.onTimerStarted());\n this.timer.addEventListener('timer-ended', () => this.onTimerEnded());\n\n this.button.addEventListener('click', this.onClick.bind(this));\n }\n\n set onclick(val) {\n this.button.onclick = val;\n }\n\n init() {\n super.init?.();\n\n forwardAttrs(this, this.button, {\n includeAttrs: buttonAttrs,\n mapAttrs: mapButtonAttrs,\n });\n\n forwardAttrs(this, this.timer, {\n includeAttrs: timerAttrs,\n mapAttrs: mapTimerAttrs,\n });\n\n // When we sync attributes, the `disabled` attribute is being compared to the attribute\n // on Vaadin component; since the Vaadin component has no `disabled` attribute, we sync\n // that back to our component.\n // This is pending a more generic fix in the way we sync attibutes.\n this.button.shadowRoot\n .querySelector('vaadin-button')\n .setAttribute('disabled', 'true');\n }\n\n onTimerStarted() {\n this.toggleButtonDisable(true);\n }\n\n onTimerEnded() {\n this.toggleButtonDisable(false);\n }\n\n onClick() {\n this.timer.reset();\n }\n\n toggleButtonDisable(isDisabled) {\n setTimeout(() => {\n isDisabled\n ? this.button.setAttribute('disabled', 'true')\n : this.button.removeAttribute('disabled');\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' },\n icon: { selector: '.icon' },\n timer: { selector: '.timer' },\n};\n\nexport const TimerButtonClass = compose(\n createStyleMixin({\n mappings: {\n gap: {},\n flexDirection: {},\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawTimerButton);\n","import { componentName, TimerButtonClass } from './TimerButtonClass';\nimport '@descope-ui/descope-button';\nimport '@descope-ui/descope-timer';\n\ncustomElements.define(componentName, TimerButtonClass);\n\nexport { TimerButtonClass, componentName };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const buttonStyles = css`\n :host {\n display: inline-block;\n position: relative;\n outline: none;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Aligns the button with form fields when placed on the same line.\n Note, to make it work, the form fields should have the same \"::before\" pseudo-element. */\n .vaadin-button-container::before {\n content: '\\\\2003';\n display: inline-block;\n width: 0;\n max-height: 100%;\n }\n\n .vaadin-button-container {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n width: 100%;\n height: 100%;\n min-height: inherit;\n text-shadow: inherit;\n }\n\n [part='prefix'],\n [part='suffix'] {\n flex: none;\n }\n\n [part='label'] {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n @media (forced-colors: active) {\n :host {\n outline: 1px solid;\n outline-offset: -1px;\n }\n\n :host([focused]) {\n outline-width: 2px;\n }\n\n :host([disabled]) {\n outline-color: GrayText;\n }\n }\n`;\n\nexport const buttonTemplate = (html) => html`\n <div class=\"vaadin-button-container\">\n <span part=\"prefix\" aria-hidden=\"true\">\n <slot name=\"prefix\"></slot>\n </span>\n <span part=\"label\">\n <slot></slot>\n </span>\n <span part=\"suffix\" aria-hidden=\"true\">\n <slot name=\"suffix\"></slot>\n </span>\n </div>\n <slot name=\"tooltip\"></slot>\n`;\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\nimport { TabindexMixin } from '@vaadin/a11y-base/src/tabindex-mixin.js';\n\n/**\n * A mixin providing common button functionality.\n *\n * @polymerMixin\n * @mixes ActiveMixin\n * @mixes FocusMixin\n * @mixes TabindexMixin\n */\nexport const ButtonMixin = (superClass) =>\n class ButtonMixinClass extends ActiveMixin(TabindexMixin(FocusMixin(superClass))) {\n static get properties() {\n return {\n /**\n * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.\n *\n * @override\n * @protected\n */\n tabindex: {\n type: Number,\n value: 0,\n reflectToAttribute: true,\n },\n };\n }\n\n /**\n * By default, `Space` is the only possible activation key for a focusable HTML element.\n * Nonetheless, the button is an exception as it can be also activated by pressing `Enter`.\n * See the \"Keyboard Support\" section in https://www.w3.org/TR/wai-aria-practices/examples/button/button.html.\n *\n * @protected\n * @override\n */\n get _activeKeys() {\n return ['Enter', ' '];\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n // By default, if the user hasn't provided a custom role,\n // the role attribute is set to \"button\".\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n }\n\n /**\n * Since the button component is designed on the base of the `[role=button]` attribute,\n * and doesn't have a native <button> inside, in order to be fully accessible from the keyboard,\n * it should manually fire the `click` event once an activation key is pressed,\n * as it follows from the WAI-ARIA specifications:\n * https://www.w3.org/TR/wai-aria-practices-1.1/#button\n *\n * According to the UI Events specifications,\n * the `click` event should be fired exactly on `keydown`:\n * https://www.w3.org/TR/uievents/#event-type-keydown\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {\n return;\n }\n\n if (this._activeKeys.includes(event.key)) {\n event.preventDefault();\n\n // `DisabledMixin` overrides the standard `click()` method\n // so that it doesn't fire the `click` event when the element is disabled.\n this.click();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { buttonStyles, buttonTemplate } from './vaadin-button-base.js';\nimport { ButtonMixin } from './vaadin-button-mixin.js';\n\nregisterStyles('vaadin-button', buttonStyles, { moduleId: 'vaadin-button-styles' });\n\n/**\n * `<vaadin-button>` is an accessible and customizable button that allows users to perform actions.\n *\n * ```html\n * <vaadin-button>Press me</vaadin-button>\n * ```\n *\n * ### Styling\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ----------|-------------\n * `label` | The label (text) inside the button.\n * `prefix` | A slot for content before the label (e.g. an icon).\n * `suffix` | A slot for content after the label (e.g. an icon).\n *\n * The following attributes are available for styling:\n *\n * Attribute | Description\n * -------------|-------------\n * `active` | Set when the button is pressed down, either with mouse, touch or the keyboard.\n * `disabled` | Set when the button is disabled.\n * `focus-ring` | Set when the button is focused using the keyboard.\n * `focused` | Set when the button is focused.\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ButtonMixin\n * @mixes ControllerMixin\n * @mixes ElementMixin\n * @mixes ThemableMixin\n */\nclass Button extends ButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement)))) {\n static get is() {\n return 'vaadin-button';\n }\n\n static get template() {\n return buttonTemplate(html);\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(Button);\n\nexport { Button };\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/spacing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport '@vaadin/vaadin-lumo-styles/typography.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst button = css`\n :host {\n /* Sizing */\n --lumo-button-size: var(--lumo-size-m);\n min-width: var(--vaadin-button-min-width, calc(var(--_button-size) * 2));\n height: var(--_button-size);\n padding: var(--vaadin-button-padding, 0 calc(var(--_button-size) / 3 + var(--lumo-border-radius-m) / 2));\n margin: var(--vaadin-button-margin, var(--lumo-space-xs) 0);\n box-sizing: border-box;\n /* Style */\n font-family: var(--lumo-font-family);\n font-size: var(--vaadin-button-font-size, var(--lumo-font-size-m));\n font-weight: var(--vaadin-button-font-weight, 500);\n color: var(--_lumo-button-text-color);\n background: var(--_lumo-button-background);\n border: var(--vaadin-button-border, none);\n border-radius: var(--vaadin-button-border-radius, var(--lumo-border-radius-m));\n cursor: var(--lumo-clickable-cursor);\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n flex-shrink: 0;\n --_button-size: var(--vaadin-button-height, var(--lumo-button-size));\n --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));\n --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);\n /* Used by notification */\n --_lumo-button-background: var(--vaadin-button-background, var(--lumo-contrast-5pct));\n --_lumo-button-text-color: var(--vaadin-button-text-color, var(--lumo-primary-text-color));\n --_lumo-button-primary-background: var(--vaadin-button-primary-background, var(--lumo-primary-color));\n --_lumo-button-primary-text-color: var(--vaadin-button-primary-text-color, var(--lumo-primary-contrast-color));\n }\n\n /* Set only for the internal parts so we don't affect the host vertical alignment */\n [part='label'],\n [part='prefix'],\n [part='suffix'] {\n line-height: var(--lumo-line-height-xs);\n }\n\n [part='label'] {\n padding: calc(var(--lumo-button-size) / 6) 0;\n }\n\n :host([theme~='small']) {\n font-size: var(--lumo-font-size-s);\n --lumo-button-size: var(--lumo-size-s);\n }\n\n :host([theme~='large']) {\n font-size: var(--lumo-font-size-l);\n --lumo-button-size: var(--lumo-size-l);\n }\n\n /* For interaction states */\n :host::before,\n :host::after {\n content: '';\n /* We rely on the host always being relative */\n position: absolute;\n z-index: 1;\n inset: 0;\n background-color: currentColor;\n border-radius: inherit;\n opacity: 0;\n pointer-events: none;\n }\n\n /* Hover */\n\n @media (any-hover: hover) {\n :host(:hover)::before {\n opacity: 0.02;\n }\n }\n\n /* Active */\n\n :host::after {\n transition: opacity 1.4s, transform 0.1s;\n filter: blur(8px);\n }\n\n :host([active])::before {\n opacity: 0.05;\n transition-duration: 0s;\n }\n\n :host([active])::after {\n opacity: 0.1;\n transition-duration: 0s, 0s;\n transform: scale(0);\n }\n\n /* Keyboard focus */\n\n :host([focus-ring]) {\n box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);\n }\n\n :host([theme~='primary'][focus-ring]) {\n box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);\n }\n\n /* Types (primary, tertiary, tertiary-inline */\n\n :host([theme~='tertiary']),\n :host([theme~='tertiary-inline']) {\n --_background: transparent !important;\n background: var(--vaadin-button-tertiary-background, var(--_background));\n min-width: 0;\n }\n\n :host([theme~='tertiary']) {\n border: var(--vaadin-button-tertiary-border, none);\n color: var(--vaadin-button-tertiary-text-color, var(--lumo-primary-text-color));\n font-weight: var(--vaadin-button-tertiary-font-weight, 500);\n padding: var(--vaadin-button-tertiary-padding, 0 calc(var(--_button-size) / 6));\n }\n\n :host([theme~='tertiary-inline'])::before {\n display: none;\n }\n\n :host([theme~='tertiary-inline']) {\n margin: 0;\n height: auto;\n padding: 0;\n line-height: inherit;\n font-size: inherit;\n }\n\n :host([theme~='tertiary-inline']) [part='label'] {\n padding: 0;\n overflow: visible;\n line-height: inherit;\n }\n\n :host([theme~='primary']) {\n background: var(--_lumo-button-primary-background);\n border: var(--vaadin-button-primary-border, none);\n color: var(--_lumo-button-primary-text-color);\n font-weight: var(--vaadin-button-primary-font-weight, 600);\n min-width: calc(var(--lumo-button-size) * 2.5);\n }\n\n :host([theme~='primary'])::before {\n background-color: black;\n }\n\n @media (any-hover: hover) {\n :host([theme~='primary']:hover)::before {\n opacity: 0.05;\n }\n }\n\n :host([theme~='primary'][active])::before {\n opacity: 0.1;\n }\n\n :host([theme~='primary'][active])::after {\n opacity: 0.2;\n }\n\n /* Colors (success, error, contrast) */\n\n :host([theme~='success']) {\n color: var(--lumo-success-text-color);\n }\n\n :host([theme~='success'][theme~='primary']) {\n background-color: var(--lumo-success-color);\n color: var(--lumo-success-contrast-color);\n }\n\n :host([theme~='error']) {\n color: var(--lumo-error-text-color);\n }\n\n :host([theme~='error'][theme~='primary']) {\n background-color: var(--lumo-error-color);\n color: var(--lumo-error-contrast-color);\n }\n\n :host([theme~='contrast']) {\n color: var(--lumo-contrast);\n }\n\n :host([theme~='contrast'][theme~='primary']) {\n background-color: var(--lumo-contrast);\n color: var(--lumo-base-color);\n }\n\n /* Disabled state. Keep selectors after other color variants. */\n\n :host([disabled]) {\n pointer-events: none;\n color: var(--lumo-disabled-text-color);\n }\n\n :host([theme~='primary'][disabled]) {\n background-color: var(--lumo-contrast-30pct);\n color: var(--lumo-base-color);\n }\n\n :host([theme~='primary'][disabled]) [part] {\n opacity: 0.7;\n }\n\n /* Icons */\n\n [part] ::slotted(vaadin-icon) {\n display: inline-block;\n width: var(--lumo-icon-size-m);\n height: var(--lumo-icon-size-m);\n }\n\n /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */\n [part] ::slotted(vaadin-icon[icon^='vaadin:']) {\n padding: 0.25em;\n box-sizing: border-box !important;\n }\n\n [part='prefix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n [part='suffix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n /* Icon-only */\n\n :host([theme~='icon']:not([theme~='tertiary-inline'])) {\n min-width: var(--lumo-button-size);\n padding-left: calc(var(--lumo-button-size) / 4);\n padding-right: calc(var(--lumo-button-size) / 4);\n }\n\n :host([theme~='icon']) [part='prefix'],\n :host([theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* RTL specific styles */\n\n :host([dir='rtl']) [part='prefix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n :host([dir='rtl']) [part='suffix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n :host([dir='rtl'][theme~='icon']) [part='prefix'],\n :host([dir='rtl'][theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n`;\n\nregisterStyles('vaadin-button', button, { moduleId: 'lumo-button' });\n\nexport { button };\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 },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class', 'style'],\n componentName,\n }),\n);\n"],"names":["componentName","srcAttrs","RawImage","baseSelector","observedAttributes","constructor","super","this","attachShadow","mode","innerHTML","init","toggleVisibility","src","onThemeChange","renderImage","isVisible","classList","remove","add","altText","getAttribute","legacySrc","themeSrc","currentThemeName","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","ImageClass","cssVarList","fill","then","res","appendChild","shouldRender","srcVal","attributeChangedCallback","attrName","oldValue","newValue","mappings","height","selector","width","clickableMixin","superclass","isLoading","click","fmt","val","pad","String","padStart","BaseClass","host","icon","timer","TimerClass","fontSize","iconSize","property","fontFamily","minHeight","fontWeight","lineHeight","textColor","gap","textAlign","hostWidth","hostDirection","iconColor","IconClass","concat","shadowRoot","querySelector","seconds","secs","parseInt","Math","max","isPaused","startInterval","setInterval","stop","stopInterval","clearInterval","reset","dispatchEvent","CustomEvent","bubbles","pause","resume","removeAttribute","textContent","ms","totalSeconds","floor","hours","secondsInMinute","minutes","join","formatTime","toggle","paused","setTimeout","customElements","define","createSvgEle","text","clean","sanitize","USE_PROFILES","svg","svgFilters","ADD_TAGS","FORBID_TAGS","DOMParser","parseFromString","createImage","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","document","createElement","createImgEle","style","setProperty","label","slottedIcon","loadingIndicatorStyles","ButtonClass","hostHeight","cursor","backgroundColor","outlineOffset","outlineColor","outlineStyle","outlineWidth","borderRadius","borderColor","borderStyle","borderWidth","verticalPadding","horizontalPadding","fallback","labelTextColor","labelTextDecoration","labelSpacing","slots","wrappedEleName","excludeAttrsSync","color","module","exports","buttonAttrs","mapButtonAttrs","timerAttrs","mapTimerAttrs","TimerButtonClass","flexDirection","button","addEventListener","onTimerStarted","onTimerEnded","onClick","bind","onclick","includeAttrs","mapAttrs","toggleButtonDisable","isDisabled","buttonStyles","ButtonMixin","superClass","properties","tabindex","type","Number","value","reflectToAttribute","_activeKeys","ready","hasAttribute","_onKeyDown","event","altKey","shiftKey","ctrlKey","metaKey","includes","key","preventDefault","moduleId","Button","is","template","_tooltipController","addController"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"descope-timer-button.js","mappings":";+OAYO,MAAMA,GAAgB,QAAiB,SAExCC,EAAW,CAAC,MAAO,YAEzB,MAAMC,WAAiB,QAAgB,CACrCF,gBACAG,aAAc,UAEd,6BAAWC,GACT,OAAOH,CACT,CAEA,WAAAI,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,2BAIhD,QACE,6UAoBAH,KAEJ,CAEA,IAAAI,GACEL,MAAMK,SACNJ,KAAKK,iBAAiBL,KAAKM,OAC7B,CAEA,aAAAC,GACEP,KAAKQ,aACP,CAEA,gBAAAH,CAAiBI,GACXA,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;CEX1C,CAGA,KAAAd,GACE5L,MAAM4L,QAEN3L,KAAK0M,mBAAqB,IAAI,IAAkB1M,MAChDA,KAAK2M,cAAc3M,KAAK0M,mBAC1B,GAGF,OAAoBH,E,0GC9DpB,MAAMjC,EAAS,IAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyQlB,QAAe,gBAAiBA,EAAQ,CAAEgC,SAAU,e,uGCtQ7C,MAAM7M,GAAgB,QAAiB,QAEjC2E,GAAY,SACvB,QAAiB,CACf/B,SAAU,CACRX,KAAM,CAAC,CAAC,EAAG,CAAE+B,SAAU,IAAWhC,WAAWC,UAGjD,KACA,KAPuB,EASvB,QAAY,CACVgI,MAAO,GACPC,eAAgB,gBAChBxB,MAAO,IAAM,kEAKbyB,iBAAkB,CAAC,WAAY,QAAS,SACxCnK,kB","sources":["webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/TimerClass.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/clock.svg","webpack://@descope/web-components-ui/../components/descope-image/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-timer-button/src/component/TimerButtonClass.js","webpack://@descope/web-components-ui/../components/descope-timer-button/src/component/index.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button-base.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/theme/lumo/vaadin-button-styles.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js"],"sourcesContent":["/* eslint-disable no-use-before-define */\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 // eslint-disable-next-line class-methods-use-this\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","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","const fmt = (val, pad = 2) => String(val).padStart(pad, '0');\n\nexport const formatTime = (ms = 0) => {\n const totalSeconds = Math.floor(ms / 1000);\n\n const secondsInMinute = 60;\n const secondsInHour = secondsInMinute * 60;\n\n const hours = Math.floor(totalSeconds / secondsInHour);\n const minutes = Math.floor((totalSeconds % secondsInHour) / secondsInMinute);\n const seconds = totalSeconds % secondsInMinute;\n\n const timeParts = [...(hours ? [fmt(hours)] : []), fmt(minutes), fmt(seconds)];\n\n return timeParts.join(':');\n};\n","import {\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 {\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport clockIcon from './clock.svg';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { formatTime } from './helpers';\n\nexport const componentName = getComponentName('timer');\n\nconst observedAttributes = ['seconds', 'hide-icon', 'paused'];\n\nconst BaseClass = createBaseClass({\n componentName,\n baseSelector: ':host > .wrapper',\n});\n\nconst DEFAULT_INTERVAL = 1000;\n\nclass RawTimer extends BaseClass {\n #timeRemains = 0;\n\n #intervalId;\n\n static get observedAttributes() {\n return observedAttributes.concat(BaseClass.observedAttributes || []);\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <descope-icon src=\"${clockIcon}\" class=\"icon\"></descope-icon>\n <div class=\"timer\"></div>\n </div>\n\t\t`;\n\n injectStyle(\n `\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 `,\n this,\n );\n\n this.icon = this.shadowRoot.querySelector('.icon');\n this.timer = this.shadowRoot.querySelector('.timer');\n }\n\n get seconds() {\n const val = this.getAttribute('seconds');\n const secs = parseInt(val || 0, 10) * 1000;\n return Math.max(0, secs);\n }\n\n // we use `pause` attribute for allowing preview mode by executing `pause`\n get isPaused() {\n return this.getAttribute('paused') === 'true';\n }\n\n init() {\n super.init?.();\n\n this.#timeRemains = this.seconds;\n }\n\n startInterval() {\n const intervalCycle = () => {\n this.#decreaseInterval();\n if (!this.#timeRemains) this.stop();\n this.#updateDisplay(this.#timeRemains);\n };\n\n if (this.#timeRemains) {\n this.#intervalId = setInterval(intervalCycle, DEFAULT_INTERVAL);\n } else {\n this.stop();\n }\n }\n\n stopInterval() {\n clearInterval(this.#intervalId);\n }\n\n #decreaseInterval() {\n this.#timeRemains = this.#timeRemains - DEFAULT_INTERVAL;\n }\n\n reset() {\n this.#timeRemains = this.seconds;\n this.#updateDisplay(this.#timeRemains);\n\n if (this.isPaused) return;\n\n this.dispatchEvent(new CustomEvent('timer-started', { bubbles: true }));\n this.startInterval();\n }\n\n stop() {\n this.stopInterval();\n this.#timeRemains = 0;\n this.#updateDisplay(this.#timeRemains);\n this.dispatchEvent(new CustomEvent('timer-ended', { bubbles: true }));\n }\n\n pause() {\n this.setAttribute('paused', 'true');\n this.stopInterval();\n }\n\n resume() {\n this.removeAttribute('paused');\n this.startInterval();\n }\n\n #updateDisplay(val) {\n this.timer.textContent = formatTime(val);\n }\n\n #toggleIcon(val) {\n this.icon.classList.toggle('hidden', val);\n }\n\n #handlePause(paused) {\n setTimeout(() => {\n if (paused) {\n this.pause();\n } else {\n // we want to prevent a another interval from starting in case previous interval was not yet cleared\n if (!this.#intervalId) {\n this.resume();\n }\n }\n });\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue !== oldValue) {\n if (attrName === 'seconds') {\n this.reset();\n }\n if (attrName === 'hide-icon') {\n this.#toggleIcon(newValue === 'true');\n }\n if (attrName === 'paused') {\n this.#handlePause(newValue === 'true');\n }\n }\n }\n}\n\nconst { host, icon, timer } = {\n host: { selector: () => ':host' },\n icon: { selector: () => '.icon' },\n timer: { selector: () => '.timer' },\n};\n\nexport const TimerClass = compose(\n createStyleMixin({\n mappings: {\n fontSize: {},\n iconSize: [\n { ...icon, property: 'width' },\n { ...icon, property: 'height' },\n ],\n fontFamily: {},\n minHeight: {},\n fontWeight: { ...timer },\n lineHeight: { ...timer },\n textColor: { ...timer, property: 'color' },\n gap: {},\n textAlign: { property: 'justify-content' },\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n iconColor: { ...icon, property: IconClass.cssVarList.fill },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawTimer);\n","import { componentName, TimerClass } from './TimerClass';\nimport '@descope-ui/descope-icon';\n\ncustomElements.define(componentName, TimerClass);\n\nexport { TimerClass, componentName };\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 { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\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 createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\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: [{ property: 'padding-top' }, { property: 'padding-bottom' }],\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\t\tselector: () => `::slotted(*)`,\n\t\tproperty: IconClass.cssVarList.fill\n\t },\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","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","module.exports = \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMWVtIiBoZWlnaHQ9IjFlbSIgdmlld0JveD0iMCAwIDEwNCAxMDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+IDxwYXRoIGQ9Ik01MC4zMzM0IDAuMzMzMjUyQzIyLjgzMzQgMC4zMzMyNTIgMC4zMzMzNzQgMjIuODMzMyAwLjMzMzM3NCA1MC4zMzMzQzAuMzMzMzc0IDc3LjgzMzMgMjIuODMzNCAxMDAuMzMzIDUwLjMzMzQgMTAwLjMzM0M3Ny44MzM0IDEwMC4zMzMgMTAwLjMzMyA3Ny44MzMzIDEwMC4zMzMgNTAuMzMzM0MxMDAuMzMzIDIyLjgzMzMgNzcuODMzNCAwLjMzMzI1MiA1MC4zMzM0IDAuMzMzMjUyWk01MC4zMzM0IDg3LjgzMzNDMjkuNzA4NCA4Ny44MzMzIDEyLjgzMzQgNzAuOTU4MyAxMi44MzM0IDUwLjMzMzNDMTIuODMzNCAyOS43MDgzIDI5LjcwODQgMTIuODMzMyA1MC4zMzM0IDEyLjgzMzNDNzAuOTU4NCAxMi44MzMzIDg3LjgzMzQgMjkuNzA4MyA4Ny44MzM0IDUwLjMzMzNDODcuODMzNCA3MC45NTgzIDcwLjk1ODQgODcuODMzMyA1MC4zMzM0IDg3LjgzMzNaIiBmaWxsPSIjMTgxQTFDIi8+IDxwYXRoIGQ9Ik01MC4zMzI4IDE5LjA4MzNINDQuMDgyOFY1Ni41ODMySDc1LjMzMjhWNTAuMzMzMkg1MC4zMzI4VjE5LjA4MzNaIiBmaWxsPSIjMTgxQTFDIi8+IDwvc3ZnPiA=\"","import { componentName, ImageClass } from './ImageClass';\n\ncustomElements.define(componentName, ImageClass);\n\nexport { ImageClass, componentName };\n","import '@descope-ui/descope-image';\n\nimport { componentName, IconClass } from './IconClass';\n\ncustomElements.define(componentName, IconClass);\n\nexport { IconClass, componentName };\n","import {\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 {\n forwardAttrs,\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('timer-button');\n\nconst buttonAttrs = [\n 'button-variant',\n 'button-mode',\n 'size',\n 'text-align',\n 'full-width',\n];\n\nconst mapButtonAttrs = {\n 'button-variant': 'variant',\n 'button-mode': 'mode',\n};\n\nconst timerAttrs = [\n 'timer-seconds',\n 'timer-hide-icon',\n 'timer-paused',\n 'size',\n 'text-align',\n 'full-width',\n];\n\nconst mapTimerAttrs = {\n 'timer-seconds': 'seconds',\n 'timer-hide-icon': 'hide-icon',\n 'timer-paused': 'paused',\n};\n\nconst BaseClass = createBaseClass({\n componentName,\n baseSelector: ':host > div',\n});\n\nclass RawTimerButton extends BaseClass {\n constructor() {\n super();\n\n 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`;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n }\n .wrapper {\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n align-items: center;\n width: 100%;\n }\n .timer {\n flex: 1;\n }\n `,\n this,\n );\n\n this.timer = this.shadowRoot.querySelector('.timer');\n this.button = this.shadowRoot.querySelector('.button');\n\n this.timer.addEventListener('timer-started', () => this.onTimerStarted());\n this.timer.addEventListener('timer-ended', () => this.onTimerEnded());\n\n this.button.addEventListener('click', this.onClick.bind(this));\n }\n\n set onclick(val) {\n this.button.onclick = val;\n }\n\n init() {\n super.init?.();\n\n forwardAttrs(this, this.button, {\n includeAttrs: buttonAttrs,\n mapAttrs: mapButtonAttrs,\n });\n\n forwardAttrs(this, this.timer, {\n includeAttrs: timerAttrs,\n mapAttrs: mapTimerAttrs,\n });\n\n // When we sync attributes, the `disabled` attribute is being compared to the attribute\n // on Vaadin component; since the Vaadin component has no `disabled` attribute, we sync\n // that back to our component.\n // This is pending a more generic fix in the way we sync attibutes.\n this.button.shadowRoot\n .querySelector('vaadin-button')\n .setAttribute('disabled', 'true');\n }\n\n onTimerStarted() {\n this.toggleButtonDisable(true);\n }\n\n onTimerEnded() {\n this.toggleButtonDisable(false);\n }\n\n onClick() {\n this.timer.reset();\n }\n\n toggleButtonDisable(isDisabled) {\n setTimeout(() => {\n isDisabled\n ? this.button.setAttribute('disabled', 'true')\n : this.button.removeAttribute('disabled');\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' },\n icon: { selector: '.icon' },\n timer: { selector: '.timer' },\n};\n\nexport const TimerButtonClass = compose(\n createStyleMixin({\n mappings: {\n gap: {},\n flexDirection: {},\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawTimerButton);\n","import { componentName, TimerButtonClass } from './TimerButtonClass';\nimport '@descope-ui/descope-button';\nimport '@descope-ui/descope-timer';\n\ncustomElements.define(componentName, TimerButtonClass);\n\nexport { TimerButtonClass, componentName };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const buttonStyles = css`\n :host {\n display: inline-block;\n position: relative;\n outline: none;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Aligns the button with form fields when placed on the same line.\n Note, to make it work, the form fields should have the same \"::before\" pseudo-element. */\n .vaadin-button-container::before {\n content: '\\\\2003';\n display: inline-block;\n width: 0;\n max-height: 100%;\n }\n\n .vaadin-button-container {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n width: 100%;\n height: 100%;\n min-height: inherit;\n text-shadow: inherit;\n }\n\n [part='prefix'],\n [part='suffix'] {\n flex: none;\n }\n\n [part='label'] {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n @media (forced-colors: active) {\n :host {\n outline: 1px solid;\n outline-offset: -1px;\n }\n\n :host([focused]) {\n outline-width: 2px;\n }\n\n :host([disabled]) {\n outline-color: GrayText;\n }\n }\n`;\n\nexport const buttonTemplate = (html) => html`\n <div class=\"vaadin-button-container\">\n <span part=\"prefix\" aria-hidden=\"true\">\n <slot name=\"prefix\"></slot>\n </span>\n <span part=\"label\">\n <slot></slot>\n </span>\n <span part=\"suffix\" aria-hidden=\"true\">\n <slot name=\"suffix\"></slot>\n </span>\n </div>\n <slot name=\"tooltip\"></slot>\n`;\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\nimport { TabindexMixin } from '@vaadin/a11y-base/src/tabindex-mixin.js';\n\n/**\n * A mixin providing common button functionality.\n *\n * @polymerMixin\n * @mixes ActiveMixin\n * @mixes FocusMixin\n * @mixes TabindexMixin\n */\nexport const ButtonMixin = (superClass) =>\n class ButtonMixinClass extends ActiveMixin(TabindexMixin(FocusMixin(superClass))) {\n static get properties() {\n return {\n /**\n * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.\n *\n * @override\n * @protected\n */\n tabindex: {\n type: Number,\n value: 0,\n reflectToAttribute: true,\n },\n };\n }\n\n /**\n * By default, `Space` is the only possible activation key for a focusable HTML element.\n * Nonetheless, the button is an exception as it can be also activated by pressing `Enter`.\n * See the \"Keyboard Support\" section in https://www.w3.org/TR/wai-aria-practices/examples/button/button.html.\n *\n * @protected\n * @override\n */\n get _activeKeys() {\n return ['Enter', ' '];\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n // By default, if the user hasn't provided a custom role,\n // the role attribute is set to \"button\".\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n }\n\n /**\n * Since the button component is designed on the base of the `[role=button]` attribute,\n * and doesn't have a native <button> inside, in order to be fully accessible from the keyboard,\n * it should manually fire the `click` event once an activation key is pressed,\n * as it follows from the WAI-ARIA specifications:\n * https://www.w3.org/TR/wai-aria-practices-1.1/#button\n *\n * According to the UI Events specifications,\n * the `click` event should be fired exactly on `keydown`:\n * https://www.w3.org/TR/uievents/#event-type-keydown\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {\n return;\n }\n\n if (this._activeKeys.includes(event.key)) {\n event.preventDefault();\n\n // `DisabledMixin` overrides the standard `click()` method\n // so that it doesn't fire the `click` event when the element is disabled.\n this.click();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { buttonStyles, buttonTemplate } from './vaadin-button-base.js';\nimport { ButtonMixin } from './vaadin-button-mixin.js';\n\nregisterStyles('vaadin-button', buttonStyles, { moduleId: 'vaadin-button-styles' });\n\n/**\n * `<vaadin-button>` is an accessible and customizable button that allows users to perform actions.\n *\n * ```html\n * <vaadin-button>Press me</vaadin-button>\n * ```\n *\n * ### Styling\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ----------|-------------\n * `label` | The label (text) inside the button.\n * `prefix` | A slot for content before the label (e.g. an icon).\n * `suffix` | A slot for content after the label (e.g. an icon).\n *\n * The following attributes are available for styling:\n *\n * Attribute | Description\n * -------------|-------------\n * `active` | Set when the button is pressed down, either with mouse, touch or the keyboard.\n * `disabled` | Set when the button is disabled.\n * `focus-ring` | Set when the button is focused using the keyboard.\n * `focused` | Set when the button is focused.\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ButtonMixin\n * @mixes ControllerMixin\n * @mixes ElementMixin\n * @mixes ThemableMixin\n */\nclass Button extends ButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement)))) {\n static get is() {\n return 'vaadin-button';\n }\n\n static get template() {\n return buttonTemplate(html);\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(Button);\n\nexport { Button };\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/spacing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport '@vaadin/vaadin-lumo-styles/typography.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst button = css`\n :host {\n /* Sizing */\n --lumo-button-size: var(--lumo-size-m);\n min-width: var(--vaadin-button-min-width, calc(var(--_button-size) * 2));\n height: var(--_button-size);\n padding: var(--vaadin-button-padding, 0 calc(var(--_button-size) / 3 + var(--lumo-border-radius-m) / 2));\n margin: var(--vaadin-button-margin, var(--lumo-space-xs) 0);\n box-sizing: border-box;\n /* Style */\n font-family: var(--lumo-font-family);\n font-size: var(--vaadin-button-font-size, var(--lumo-font-size-m));\n font-weight: var(--vaadin-button-font-weight, 500);\n color: var(--_lumo-button-text-color);\n background: var(--_lumo-button-background);\n border: var(--vaadin-button-border, none);\n border-radius: var(--vaadin-button-border-radius, var(--lumo-border-radius-m));\n cursor: var(--lumo-clickable-cursor);\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n flex-shrink: 0;\n --_button-size: var(--vaadin-button-height, var(--lumo-button-size));\n --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));\n --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);\n /* Used by notification */\n --_lumo-button-background: var(--vaadin-button-background, var(--lumo-contrast-5pct));\n --_lumo-button-text-color: var(--vaadin-button-text-color, var(--lumo-primary-text-color));\n --_lumo-button-primary-background: var(--vaadin-button-primary-background, var(--lumo-primary-color));\n --_lumo-button-primary-text-color: var(--vaadin-button-primary-text-color, var(--lumo-primary-contrast-color));\n }\n\n /* Set only for the internal parts so we don't affect the host vertical alignment */\n [part='label'],\n [part='prefix'],\n [part='suffix'] {\n line-height: var(--lumo-line-height-xs);\n }\n\n [part='label'] {\n padding: calc(var(--lumo-button-size) / 6) 0;\n }\n\n :host([theme~='small']) {\n font-size: var(--lumo-font-size-s);\n --lumo-button-size: var(--lumo-size-s);\n }\n\n :host([theme~='large']) {\n font-size: var(--lumo-font-size-l);\n --lumo-button-size: var(--lumo-size-l);\n }\n\n /* For interaction states */\n :host::before,\n :host::after {\n content: '';\n /* We rely on the host always being relative */\n position: absolute;\n z-index: 1;\n inset: 0;\n background-color: currentColor;\n border-radius: inherit;\n opacity: 0;\n pointer-events: none;\n }\n\n /* Hover */\n\n @media (any-hover: hover) {\n :host(:hover)::before {\n opacity: 0.02;\n }\n }\n\n /* Active */\n\n :host::after {\n transition: opacity 1.4s, transform 0.1s;\n filter: blur(8px);\n }\n\n :host([active])::before {\n opacity: 0.05;\n transition-duration: 0s;\n }\n\n :host([active])::after {\n opacity: 0.1;\n transition-duration: 0s, 0s;\n transform: scale(0);\n }\n\n /* Keyboard focus */\n\n :host([focus-ring]) {\n box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);\n }\n\n :host([theme~='primary'][focus-ring]) {\n box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);\n }\n\n /* Types (primary, tertiary, tertiary-inline */\n\n :host([theme~='tertiary']),\n :host([theme~='tertiary-inline']) {\n --_background: transparent !important;\n background: var(--vaadin-button-tertiary-background, var(--_background));\n min-width: 0;\n }\n\n :host([theme~='tertiary']) {\n border: var(--vaadin-button-tertiary-border, none);\n color: var(--vaadin-button-tertiary-text-color, var(--lumo-primary-text-color));\n font-weight: var(--vaadin-button-tertiary-font-weight, 500);\n padding: var(--vaadin-button-tertiary-padding, 0 calc(var(--_button-size) / 6));\n }\n\n :host([theme~='tertiary-inline'])::before {\n display: none;\n }\n\n :host([theme~='tertiary-inline']) {\n margin: 0;\n height: auto;\n padding: 0;\n line-height: inherit;\n font-size: inherit;\n }\n\n :host([theme~='tertiary-inline']) [part='label'] {\n padding: 0;\n overflow: visible;\n line-height: inherit;\n }\n\n :host([theme~='primary']) {\n background: var(--_lumo-button-primary-background);\n border: var(--vaadin-button-primary-border, none);\n color: var(--_lumo-button-primary-text-color);\n font-weight: var(--vaadin-button-primary-font-weight, 600);\n min-width: calc(var(--lumo-button-size) * 2.5);\n }\n\n :host([theme~='primary'])::before {\n background-color: black;\n }\n\n @media (any-hover: hover) {\n :host([theme~='primary']:hover)::before {\n opacity: 0.05;\n }\n }\n\n :host([theme~='primary'][active])::before {\n opacity: 0.1;\n }\n\n :host([theme~='primary'][active])::after {\n opacity: 0.2;\n }\n\n /* Colors (success, error, contrast) */\n\n :host([theme~='success']) {\n color: var(--lumo-success-text-color);\n }\n\n :host([theme~='success'][theme~='primary']) {\n background-color: var(--lumo-success-color);\n color: var(--lumo-success-contrast-color);\n }\n\n :host([theme~='error']) {\n color: var(--lumo-error-text-color);\n }\n\n :host([theme~='error'][theme~='primary']) {\n background-color: var(--lumo-error-color);\n color: var(--lumo-error-contrast-color);\n }\n\n :host([theme~='contrast']) {\n color: var(--lumo-contrast);\n }\n\n :host([theme~='contrast'][theme~='primary']) {\n background-color: var(--lumo-contrast);\n color: var(--lumo-base-color);\n }\n\n /* Disabled state. Keep selectors after other color variants. */\n\n :host([disabled]) {\n pointer-events: none;\n color: var(--lumo-disabled-text-color);\n }\n\n :host([theme~='primary'][disabled]) {\n background-color: var(--lumo-contrast-30pct);\n color: var(--lumo-base-color);\n }\n\n :host([theme~='primary'][disabled]) [part] {\n opacity: 0.7;\n }\n\n /* Icons */\n\n [part] ::slotted(vaadin-icon) {\n display: inline-block;\n width: var(--lumo-icon-size-m);\n height: var(--lumo-icon-size-m);\n }\n\n /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */\n [part] ::slotted(vaadin-icon[icon^='vaadin:']) {\n padding: 0.25em;\n box-sizing: border-box !important;\n }\n\n [part='prefix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n [part='suffix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n /* Icon-only */\n\n :host([theme~='icon']:not([theme~='tertiary-inline'])) {\n min-width: var(--lumo-button-size);\n padding-left: calc(var(--lumo-button-size) / 4);\n padding-right: calc(var(--lumo-button-size) / 4);\n }\n\n :host([theme~='icon']) [part='prefix'],\n :host([theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* RTL specific styles */\n\n :host([dir='rtl']) [part='prefix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n :host([dir='rtl']) [part='suffix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n :host([dir='rtl'][theme~='icon']) [part='prefix'],\n :host([dir='rtl'][theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n`;\n\nregisterStyles('vaadin-button', button, { moduleId: 'lumo-button' });\n\nexport { button };\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 },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class', 'style'],\n componentName,\n }),\n);\n"],"names":["componentName","srcAttrs","RawImage","baseSelector","observedAttributes","constructor","super","this","attachShadow","mode","innerHTML","init","toggleVisibility","getSrc","onThemeChange","renderImage","isVisible","classList","remove","add","altText","getAttribute","legacySrc","themeSrc","currentThemeName","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","ImageClass","cssVarList","fill","then","res","appendChild","shouldRender","src","srcVal","attributeChangedCallback","attrName","oldValue","newValue","mappings","height","selector","width","clickableMixin","superclass","isLoading","click","fmt","val","pad","String","padStart","BaseClass","host","icon","timer","TimerClass","fontSize","iconSize","property","fontFamily","minHeight","fontWeight","lineHeight","textColor","gap","textAlign","hostWidth","hostDirection","iconColor","IconClass","concat","shadowRoot","querySelector","seconds","secs","parseInt","Math","max","isPaused","startInterval","setInterval","stop","stopInterval","clearInterval","reset","dispatchEvent","CustomEvent","bubbles","pause","resume","removeAttribute","textContent","ms","totalSeconds","floor","hours","secondsInMinute","minutes","join","formatTime","toggle","paused","setTimeout","customElements","define","createSvgEle","text","clean","sanitize","USE_PROFILES","svg","svgFilters","ADD_TAGS","FORBID_TAGS","DOMParser","parseFromString","createImage","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","document","createElement","createImgEle","style","setProperty","label","slottedIcon","loadingIndicatorStyles","ButtonClass","hostHeight","cursor","backgroundColor","outlineOffset","outlineColor","outlineStyle","outlineWidth","borderRadius","borderColor","borderStyle","borderWidth","verticalPadding","horizontalPadding","fallback","labelTextColor","labelTextDecoration","labelSpacing","slots","wrappedEleName","excludeAttrsSync","color","module","exports","buttonAttrs","mapButtonAttrs","timerAttrs","mapTimerAttrs","TimerButtonClass","flexDirection","button","addEventListener","onTimerStarted","onTimerEnded","onClick","bind","onclick","includeAttrs","mapAttrs","toggleButtonDisable","isDisabled","buttonStyles","ButtonMixin","superClass","properties","tabindex","type","Number","value","reflectToAttribute","_activeKeys","ready","hasAttribute","_onKeyDown","event","altKey","shiftKey","ctrlKey","metaKey","includes","key","preventDefault","moduleId","Button","is","template","_tooltipController","addController"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1202,2250,6724],{8512:(t,e,s)=>{"use strict";s.d(e,{T:()=>l,q:()=>M});var i=s(88961),n=s(72270),r=s(63200),a=s(25964),o=s(18782);const l=(0,a.xE)("image"),c=["src","src-dark"];class h extends((0,n.qu)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return c}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,a.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.
|
|
1
|
+
(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1202,2250,6724],{8512:(t,e,s)=>{"use strict";s.d(e,{T:()=>l,q:()=>M});var i=s(88961),n=s(72270),r=s(63200),a=s(25964),o=s(18782);const l=(0,a.xE)("image"),c=["src","src-dark"];class h extends((0,n.qu)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return c}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,a.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(${M.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)})}renderImage(){this.toggleVisibility(this.getSrc),(0,o.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,s){super.attributeChangedCallback?.(t,e,s),e!==s&&this.shouldRender(t)&&this.renderImage()}}const M=(0,r.Zz)((0,i.RF)({mappings:{fill:{},height:{selector:()=>":host"},width:{selector:()=>":host"}}}),i.VO,i.tQ)(h)},15887:(t,e,s)=>{"use strict";s.r(e),s.d(e,{TimerClass:()=>p,componentName:()=>M});var i=s(88961),n=s(72270),r=s(63200),a=s(25964),o=s(44006),l=s.n(o),c=s(98538);const h=(t,e=2)=>String(t).padStart(e,"0"),M=(0,a.xE)("timer"),d=["seconds","hide-icon","paused"],u=(0,n.qu)({componentName:M,baseSelector:":host > .wrapper"}),{host:z,icon:g,timer:m}={host:{selector:()=>":host"},icon:{selector:()=>".icon"},timer:{selector:()=>".timer"}},p=(0,r.Zz)((0,i.RF)({mappings:{fontSize:{},iconSize:[{...g,property:"width"},{...g,property:"height"}],fontFamily:{},minHeight:{},fontWeight:{...m},lineHeight:{...m},textColor:{...m,property:"color"},gap:{},textAlign:{property:"justify-content"},hostWidth:{...z,property:"width"},hostDirection:{...z,property:"direction"},iconColor:{...g,property:c.S.cssVarList.fill}}}),i.VO,i.tQ)(class extends u{#t=0;#e;static get observedAttributes(){return d.concat(u.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,a.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.#t=this.seconds}startInterval(){this.#t?this.#e=setInterval(()=>{this.#s(),this.#t||this.stop(),this.#i(this.#t)},1e3):this.stop()}stopInterval(){clearInterval(this.#e)}#s(){this.#t=this.#t-1e3}reset(){this.#t=this.seconds,this.#i(this.#t),this.isPaused||(this.dispatchEvent(new CustomEvent("timer-started",{bubbles:!0})),this.startInterval())}stop(){this.stopInterval(),this.#t=0,this.#i(this.#t),this.dispatchEvent(new CustomEvent("timer-ended",{bubbles:!0}))}pause(){this.setAttribute("paused","true"),this.stopInterval()}resume(){this.removeAttribute("paused"),this.startInterval()}#i(t){this.timer.textContent=((t=0)=>{const e=Math.floor(t/1e3),s=Math.floor(e/3600),i=Math.floor(e%3600/60),n=e%60;return[...s?[h(s)]:[],h(i),h(n)].join(":")})(t)}#n(t){this.icon.classList.toggle("hidden",t)}#r(t){setTimeout(()=>{t?this.pause():this.#e||this.resume()})}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),s!==e&&("seconds"===t&&this.reset(),"hide-icon"===t&&this.#n("true"===s),"paused"===t&&this.#r("true"===s))}});s(56737),customElements.define(M,p)},18782:(t,e,s)=>{"use strict";s.d(e,{m:()=>r});var i=s(25414);const n=t=>{const e=i.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 s;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const e=atob(t.slice(26));s=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),i=await e.text();s=n(i)}else s=((t,e)=>{const s=document.createElement("img");return s.setAttribute("src",t),s.setAttribute("alt",e),s})(t,e);return s.style.setProperty("max-width","100%"),s.style.setProperty("max-height","100%"),s}catch{return null}}},44006:t=>{t.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMWVtIiBoZWlnaHQ9IjFlbSIgdmlld0JveD0iMCAwIDEwNCAxMDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+IDxwYXRoIGQ9Ik01MC4zMzM0IDAuMzMzMjUyQzIyLjgzMzQgMC4zMzMyNTIgMC4zMzMzNzQgMjIuODMzMyAwLjMzMzM3NCA1MC4zMzMzQzAuMzMzMzc0IDc3LjgzMzMgMjIuODMzNCAxMDAuMzMzIDUwLjMzMzQgMTAwLjMzM0M3Ny44MzM0IDEwMC4zMzMgMTAwLjMzMyA3Ny44MzMzIDEwMC4zMzMgNTAuMzMzM0MxMDAuMzMzIDIyLjgzMzMgNzcuODMzNCAwLjMzMzI1MiA1MC4zMzM0IDAuMzMzMjUyWk01MC4zMzM0IDg3LjgzMzNDMjkuNzA4NCA4Ny44MzMzIDEyLjgzMzQgNzAuOTU4MyAxMi44MzM0IDUwLjMzMzNDMTIuODMzNCAyOS43MDgzIDI5LjcwODQgMTIuODMzMyA1MC4zMzM0IDEyLjgzMzNDNzAuOTU4NCAxMi44MzMzIDg3LjgzMzQgMjkuNzA4MyA4Ny44MzM0IDUwLjMzMzNDODcuODMzNCA3MC45NTgzIDcwLjk1ODQgODcuODMzMyA1MC4zMzM0IDg3LjgzMzNaIiBmaWxsPSIjMTgxQTFDIi8+IDxwYXRoIGQ9Ik01MC4zMzI4IDE5LjA4MzNINDQuMDgyOFY1Ni41ODMySDc1LjMzMjhWNTAuMzMzMkg1MC4zMzI4VjE5LjA4MzNaIiBmaWxsPSIjMTgxQTFDIi8+IDwvc3ZnPiA="},53455:(t,e,s)=>{"use strict";s.r(e),s.d(e,{ImageClass:()=>i.q,componentName:()=>i.T});var i=s(8512);customElements.define(i.T,i.q)},56737:(t,e,s)=>{"use strict";s.r(e),s.d(e,{IconClass:()=>i.S,componentName:()=>i.T}),s(53455);var i=s(98538);customElements.define(i.T,i.S)},98538:(t,e,s)=>{"use strict";s.d(e,{S:()=>l,T:()=>o});var i=s(88961),n=s(25964),r=s(8512),a=s(63200);const o=(0,n.xE)("icon"),l=(0,a.Zz)((0,i.RF)({mappings:{fill:[{},{property:r.q.cssVarList.fill}]}}),i.VO,i.tQ)((0,i.tz)({slots:[],wrappedEleName:"descope-image",style:()=>"\n :host {\n display: inline-flex;\n }\n ",excludeAttrsSync:["tabindex","class","style"],componentName:o}))}}]);
|
|
2
2
|
//# sourceMappingURL=descope-timer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descope-timer.js","mappings":"sOAYO,MAAMA,GAAgB,QAAiB,SAExCC,EAAW,CAAC,MAAO,YAEzB,MAAMC,WAAiB,QAAgB,CACrCF,gBACAG,aAAc,UAEd,6BAAWC,GACT,OAAOH,CACT,CAEA,WAAAI,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,2BAIhD,QACE,6UAoBAH,KAEJ,CAEA,IAAAI,GACEL,MAAMK,SACNJ,KAAKK,iBAAiBL,KAAKM,IAC7B,CAEA,aAAAC,GACEP,KAAKQ,aACP,CAEA,gBAAAH,CAAiBI,GACXA,EACFT,KAAKU,UAAUC,OAAO,UAEtBX,KAAKU,UAAUE,IAAI,SAEvB,CAEA,WAAIC,GACF,OAAOb,KAAKc,aAAa,QAAU,EACrC,CAEA,aAAIC,GACF,OAAOf,KAAKc,aAAa,MAC3B,CAEA,YAAIE,GACF,OAAOhB,KAAKc,aAAa,OAAOd,KAAKiB,mBACvC,CAEA,OAAIX,GACF,OAAON,KAAKgB,UAAYhB,KAAKe,SAC/B,CAKA,eAAAG,CAAgBC,GAEY,CAACA,KAASA,EAAKC,iBAAiB,YAExCC,QAASC,IACzBA,EAAIC,aACF,OACA,OAAOC,EAAWC,WAAWC,SAASJ,EAAIR,aAAa,SAAW,UAGxE,CAEA,WAAAN,GACER,KAAKK,iBAAiBL,KAAKM,MAE3B,OAAYN,KAAKM,IAAKN,KAAKa,SAASc,KAAMC,IACxC5B,KAAKG,UAAY,GACbyB,IACF5B,KAAKkB,gBAAgBU,GACrB5B,KAAK6B,YAAYD,KAGvB,CAGA,YAAAE,CAAaxB,GACX,MAAMyB,EAAS/B,KAAKc,aAAaR,GACjC,OAAON,KAAKM,MAAQyB,CACtB,CAEA,wBAAAC,CAAyBC,EAAUC,EAAUC,GAC3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GACjBS,GAkCGuG,CAAavH,EAAKO,GAM1B,OAHAS,EAAIwG,MAAMC,YAAY,YAAa,QACnCzG,EAAIwG,MAAMC,YAAY,aAAc,QAE7BzG,CACT,CAAE,MACA,OAAO,IACT,E,YC1DF0G,EAAOC,QAAU,o4B,sGCEjBhC,eAAeC,OAAO,IAAe,I,+GCErCD,eAAeC,OAAO,IAAe,I,uGCM9B,MAAMzG,GAAgB,QAAiB,QAEjCsE,GAAY,SACvB,QAAiB,CACf3B,SAAU,CACRV,KAAM,CAAC,CAAC,EAAG,CAAE0B,SAAU,IAAW3B,WAAWC,UAGjD,KACA,KAPuB,EASvB,QAAY,CACVwG,MAAO,GACPC,eAAgB,gBAChBL,MAAO,IAAM,kEAKbM,iBAAkB,CAAC,WAAY,QAAS,SACxC3I,kB","sources":["webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/TimerClass.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/clock.svg","webpack://@descope/web-components-ui/../components/descope-image/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js"],"sourcesContent":["/* eslint-disable no-use-before-define */\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.src);\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 src() {\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 // eslint-disable-next-line class-methods-use-this\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.src);\n\n createImage(this.src, 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.src === 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","const fmt = (val, pad = 2) => String(val).padStart(pad, '0');\n\nexport const formatTime = (ms = 0) => {\n const totalSeconds = Math.floor(ms / 1000);\n\n const secondsInMinute = 60;\n const secondsInHour = secondsInMinute * 60;\n\n const hours = Math.floor(totalSeconds / secondsInHour);\n const minutes = Math.floor((totalSeconds % secondsInHour) / secondsInMinute);\n const seconds = totalSeconds % secondsInMinute;\n\n const timeParts = [...(hours ? [fmt(hours)] : []), fmt(minutes), fmt(seconds)];\n\n return timeParts.join(':');\n};\n","import {\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 {\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport clockIcon from './clock.svg';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { formatTime } from './helpers';\n\nexport const componentName = getComponentName('timer');\n\nconst observedAttributes = ['seconds', 'hide-icon', 'paused'];\n\nconst BaseClass = createBaseClass({\n componentName,\n baseSelector: ':host > .wrapper',\n});\n\nconst DEFAULT_INTERVAL = 1000;\n\nclass RawTimer extends BaseClass {\n #timeRemains = 0;\n\n #intervalId;\n\n static get observedAttributes() {\n return observedAttributes.concat(BaseClass.observedAttributes || []);\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <descope-icon src=\"${clockIcon}\" class=\"icon\"></descope-icon>\n <div class=\"timer\"></div>\n </div>\n\t\t`;\n\n injectStyle(\n `\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 `,\n this,\n );\n\n this.icon = this.shadowRoot.querySelector('.icon');\n this.timer = this.shadowRoot.querySelector('.timer');\n }\n\n get seconds() {\n const val = this.getAttribute('seconds');\n const secs = parseInt(val || 0, 10) * 1000;\n return Math.max(0, secs);\n }\n\n // we use `pause` attribute for allowing preview mode by executing `pause`\n get isPaused() {\n return this.getAttribute('paused') === 'true';\n }\n\n init() {\n super.init?.();\n\n this.#timeRemains = this.seconds;\n }\n\n startInterval() {\n const intervalCycle = () => {\n this.#decreaseInterval();\n if (!this.#timeRemains) this.stop();\n this.#updateDisplay(this.#timeRemains);\n };\n\n if (this.#timeRemains) {\n this.#intervalId = setInterval(intervalCycle, DEFAULT_INTERVAL);\n } else {\n this.stop();\n }\n }\n\n stopInterval() {\n clearInterval(this.#intervalId);\n }\n\n #decreaseInterval() {\n this.#timeRemains = this.#timeRemains - DEFAULT_INTERVAL;\n }\n\n reset() {\n this.#timeRemains = this.seconds;\n this.#updateDisplay(this.#timeRemains);\n\n if (this.isPaused) return;\n\n this.dispatchEvent(new CustomEvent('timer-started', { bubbles: true }));\n this.startInterval();\n }\n\n stop() {\n this.stopInterval();\n this.#timeRemains = 0;\n this.#updateDisplay(this.#timeRemains);\n this.dispatchEvent(new CustomEvent('timer-ended', { bubbles: true }));\n }\n\n pause() {\n this.setAttribute('paused', 'true');\n this.stopInterval();\n }\n\n resume() {\n this.removeAttribute('paused');\n this.startInterval();\n }\n\n #updateDisplay(val) {\n this.timer.textContent = formatTime(val);\n }\n\n #toggleIcon(val) {\n this.icon.classList.toggle('hidden', val);\n }\n\n #handlePause(paused) {\n setTimeout(() => {\n if (paused) {\n this.pause();\n } else {\n // we want to prevent a another interval from starting in case previous interval was not yet cleared\n if (!this.#intervalId) {\n this.resume();\n }\n }\n });\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue !== oldValue) {\n if (attrName === 'seconds') {\n this.reset();\n }\n if (attrName === 'hide-icon') {\n this.#toggleIcon(newValue === 'true');\n }\n if (attrName === 'paused') {\n this.#handlePause(newValue === 'true');\n }\n }\n }\n}\n\nconst { host, icon, timer } = {\n host: { selector: () => ':host' },\n icon: { selector: () => '.icon' },\n timer: { selector: () => '.timer' },\n};\n\nexport const TimerClass = compose(\n createStyleMixin({\n mappings: {\n fontSize: {},\n iconSize: [\n { ...icon, property: 'width' },\n { ...icon, property: 'height' },\n ],\n fontFamily: {},\n minHeight: {},\n fontWeight: { ...timer },\n lineHeight: { ...timer },\n textColor: { ...timer, property: 'color' },\n gap: {},\n textAlign: { property: 'justify-content' },\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n iconColor: { ...icon, property: IconClass.cssVarList.fill },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawTimer);\n","import { componentName, TimerClass } from './TimerClass';\nimport '@descope-ui/descope-icon';\n\ncustomElements.define(componentName, TimerClass);\n\nexport { TimerClass, componentName };\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","module.exports = \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMWVtIiBoZWlnaHQ9IjFlbSIgdmlld0JveD0iMCAwIDEwNCAxMDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+IDxwYXRoIGQ9Ik01MC4zMzM0IDAuMzMzMjUyQzIyLjgzMzQgMC4zMzMyNTIgMC4zMzMzNzQgMjIuODMzMyAwLjMzMzM3NCA1MC4zMzMzQzAuMzMzMzc0IDc3LjgzMzMgMjIuODMzNCAxMDAuMzMzIDUwLjMzMzQgMTAwLjMzM0M3Ny44MzM0IDEwMC4zMzMgMTAwLjMzMyA3Ny44MzMzIDEwMC4zMzMgNTAuMzMzM0MxMDAuMzMzIDIyLjgzMzMgNzcuODMzNCAwLjMzMzI1MiA1MC4zMzM0IDAuMzMzMjUyWk01MC4zMzM0IDg3LjgzMzNDMjkuNzA4NCA4Ny44MzMzIDEyLjgzMzQgNzAuOTU4MyAxMi44MzM0IDUwLjMzMzNDMTIuODMzNCAyOS43MDgzIDI5LjcwODQgMTIuODMzMyA1MC4zMzM0IDEyLjgzMzNDNzAuOTU4NCAxMi44MzMzIDg3LjgzMzQgMjkuNzA4MyA4Ny44MzM0IDUwLjMzMzNDODcuODMzNCA3MC45NTgzIDcwLjk1ODQgODcuODMzMyA1MC4zMzM0IDg3LjgzMzNaIiBmaWxsPSIjMTgxQTFDIi8+IDxwYXRoIGQ9Ik01MC4zMzI4IDE5LjA4MzNINDQuMDgyOFY1Ni41ODMySDc1LjMzMjhWNTAuMzMzMkg1MC4zMzI4VjE5LjA4MzNaIiBmaWxsPSIjMTgxQTFDIi8+IDwvc3ZnPiA=\"","import { componentName, ImageClass } from './ImageClass';\n\ncustomElements.define(componentName, ImageClass);\n\nexport { ImageClass, componentName };\n","import '@descope-ui/descope-image';\n\nimport { componentName, IconClass } from './IconClass';\n\ncustomElements.define(componentName, IconClass);\n\nexport { IconClass, 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 },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class', 'style'],\n componentName,\n }),\n);\n"],"names":["componentName","srcAttrs","RawImage","baseSelector","observedAttributes","constructor","super","this","attachShadow","mode","innerHTML","init","toggleVisibility","src","onThemeChange","renderImage","isVisible","classList","remove","add","altText","getAttribute","legacySrc","themeSrc","currentThemeName","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","ImageClass","cssVarList","fill","then","res","appendChild","shouldRender","srcVal","attributeChangedCallback","attrName","oldValue","newValue","mappings","height","selector","width","fmt","val","pad","String","padStart","BaseClass","host","icon","timer","TimerClass","fontSize","iconSize","property","fontFamily","minHeight","fontWeight","lineHeight","textColor","gap","textAlign","hostWidth","hostDirection","iconColor","IconClass","concat","shadowRoot","querySelector","seconds","secs","parseInt","Math","max","isPaused","startInterval","setInterval","stop","stopInterval","clearInterval","reset","dispatchEvent","CustomEvent","bubbles","pause","resume","removeAttribute","textContent","ms","totalSeconds","floor","hours","secondsInMinute","minutes","join","formatTime","toggle","paused","setTimeout","customElements","define","createSvgEle","text","clean","sanitize","USE_PROFILES","svg","svgFilters","ADD_TAGS","FORBID_TAGS","DOMParser","parseFromString","createImage","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","document","createElement","createImgEle","style","setProperty","module","exports","slots","wrappedEleName","excludeAttrsSync"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"descope-timer.js","mappings":"sOAYO,MAAMA,GAAgB,QAAiB,SAExCC,EAAW,CAAC,MAAO,YAEzB,MAAMC,WAAiB,QAAgB,CACrCF,gBACAG,aAAc,UAEd,6BAAWC,GACT,OAAOH,CACT,CAEA,WAAAI,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,2BAIhD,QACE,6UAoBAH,KAEJ,CAEA,IAAAI,GACEL,MAAMK,SACNJ,KAAKK,iBAAiBL,KAAKM,OAC7B,CAEA,aAAAC,GACEP,KAAKQ,aACP,CAEA,gBAAAH,CAAiBI,GACXA,EACFT,KAAKU,UAAUC,OAAO,UAEtBX,KAAKU,UAAUE,IAAI,SAEvB,CAEA,WAAIC,GACF,OAAOb,KAAKc,aAAa,QAAU,EACrC,CAEA,aAAIC,GACF,OAAOf,KAAKc,aAAa,MAC3B,CAEA,YAAIE,GACF,OAAOhB,KAAKc,aAAa,OAAOd,KAAKiB,mBACvC,CAEA,UAAIX,GACF,OAAON,KAAKgB,UAAYhB,KAAKe,SAC/B,CAKA,eAAAG,CAAgBC,GAEY,CAACA,KAASA,EAAKC,iBAAiB,YAExCC,QAASC,IACzBA,EAAIC,aACF,OACA,OAAOC,EAAWC,WAAWC,SAASJ,EAAIR,aAAa,SAAW,UAGxE,CAEA,WAAAN,GACER,KAAKK,iBAAiBL,KAAKM,SAE3B,OAAYN,KAAKM,OAAQN,KAAKa,SAASc,KAAMC,IAC3C5B,KAAKG,UAAY,GACbyB,IACF5B,KAAKkB,gBAAgBU,GACrB5B,KAAK6B,YAAY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EAAaC,EACrB,MAEE/E,EAtCe,EAACS,EAAKlB,KACzB,MAAMS,EAAMsG,SAASC,cAAc,OAGnC,OAFAvG,EAAIC,aAAa,MAAOQ,GACxBT,EAAIC,aAAa,MAAOV,GACjBS,GAkCGwG,CAAa/F,EAAKlB,GAM1B,OAHAS,EAAIyG,MAAMC,YAAY,YAAa,QACnC1G,EAAIyG,MAAMC,YAAY,aAAc,QAE7B1G,CACT,CAAE,MACA,OAAO,IACT,E,YC1DF2G,EAAOC,QAAU,o4B,sGCEjBhC,eAAeC,OAAO,IAAe,I,+GCErCD,eAAeC,OAAO,IAAe,I,uGCM9B,MAAM1G,GAAgB,QAAiB,QAEjCuE,GAAY,SACvB,QAAiB,CACf3B,SAAU,CACRX,KAAM,CAAC,CAAC,EAAG,CAAE2B,SAAU,IAAW5B,WAAWC,UAGjD,KACA,KAPuB,EASvB,QAAY,CACVyG,MAAO,GACPC,eAAgB,gBAChBL,MAAO,IAAM,kEAKbM,iBAAkB,CAAC,WAAY,QAAS,SACxC5I,kB","sources":["webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/TimerClass.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/clock.svg","webpack://@descope/web-components-ui/../components/descope-image/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js"],"sourcesContent":["/* eslint-disable no-use-before-define */\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 // eslint-disable-next-line class-methods-use-this\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","const fmt = (val, pad = 2) => String(val).padStart(pad, '0');\n\nexport const formatTime = (ms = 0) => {\n const totalSeconds = Math.floor(ms / 1000);\n\n const secondsInMinute = 60;\n const secondsInHour = secondsInMinute * 60;\n\n const hours = Math.floor(totalSeconds / secondsInHour);\n const minutes = Math.floor((totalSeconds % secondsInHour) / secondsInMinute);\n const seconds = totalSeconds % secondsInMinute;\n\n const timeParts = [...(hours ? [fmt(hours)] : []), fmt(minutes), fmt(seconds)];\n\n return timeParts.join(':');\n};\n","import {\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 {\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport clockIcon from './clock.svg';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { formatTime } from './helpers';\n\nexport const componentName = getComponentName('timer');\n\nconst observedAttributes = ['seconds', 'hide-icon', 'paused'];\n\nconst BaseClass = createBaseClass({\n componentName,\n baseSelector: ':host > .wrapper',\n});\n\nconst DEFAULT_INTERVAL = 1000;\n\nclass RawTimer extends BaseClass {\n #timeRemains = 0;\n\n #intervalId;\n\n static get observedAttributes() {\n return observedAttributes.concat(BaseClass.observedAttributes || []);\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <descope-icon src=\"${clockIcon}\" class=\"icon\"></descope-icon>\n <div class=\"timer\"></div>\n </div>\n\t\t`;\n\n injectStyle(\n `\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 `,\n this,\n );\n\n this.icon = this.shadowRoot.querySelector('.icon');\n this.timer = this.shadowRoot.querySelector('.timer');\n }\n\n get seconds() {\n const val = this.getAttribute('seconds');\n const secs = parseInt(val || 0, 10) * 1000;\n return Math.max(0, secs);\n }\n\n // we use `pause` attribute for allowing preview mode by executing `pause`\n get isPaused() {\n return this.getAttribute('paused') === 'true';\n }\n\n init() {\n super.init?.();\n\n this.#timeRemains = this.seconds;\n }\n\n startInterval() {\n const intervalCycle = () => {\n this.#decreaseInterval();\n if (!this.#timeRemains) this.stop();\n this.#updateDisplay(this.#timeRemains);\n };\n\n if (this.#timeRemains) {\n this.#intervalId = setInterval(intervalCycle, DEFAULT_INTERVAL);\n } else {\n this.stop();\n }\n }\n\n stopInterval() {\n clearInterval(this.#intervalId);\n }\n\n #decreaseInterval() {\n this.#timeRemains = this.#timeRemains - DEFAULT_INTERVAL;\n }\n\n reset() {\n this.#timeRemains = this.seconds;\n this.#updateDisplay(this.#timeRemains);\n\n if (this.isPaused) return;\n\n this.dispatchEvent(new CustomEvent('timer-started', { bubbles: true }));\n this.startInterval();\n }\n\n stop() {\n this.stopInterval();\n this.#timeRemains = 0;\n this.#updateDisplay(this.#timeRemains);\n this.dispatchEvent(new CustomEvent('timer-ended', { bubbles: true }));\n }\n\n pause() {\n this.setAttribute('paused', 'true');\n this.stopInterval();\n }\n\n resume() {\n this.removeAttribute('paused');\n this.startInterval();\n }\n\n #updateDisplay(val) {\n this.timer.textContent = formatTime(val);\n }\n\n #toggleIcon(val) {\n this.icon.classList.toggle('hidden', val);\n }\n\n #handlePause(paused) {\n setTimeout(() => {\n if (paused) {\n this.pause();\n } else {\n // we want to prevent a another interval from starting in case previous interval was not yet cleared\n if (!this.#intervalId) {\n this.resume();\n }\n }\n });\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue !== oldValue) {\n if (attrName === 'seconds') {\n this.reset();\n }\n if (attrName === 'hide-icon') {\n this.#toggleIcon(newValue === 'true');\n }\n if (attrName === 'paused') {\n this.#handlePause(newValue === 'true');\n }\n }\n }\n}\n\nconst { host, icon, timer } = {\n host: { selector: () => ':host' },\n icon: { selector: () => '.icon' },\n timer: { selector: () => '.timer' },\n};\n\nexport const TimerClass = compose(\n createStyleMixin({\n mappings: {\n fontSize: {},\n iconSize: [\n { ...icon, property: 'width' },\n { ...icon, property: 'height' },\n ],\n fontFamily: {},\n minHeight: {},\n fontWeight: { ...timer },\n lineHeight: { ...timer },\n textColor: { ...timer, property: 'color' },\n gap: {},\n textAlign: { property: 'justify-content' },\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n iconColor: { ...icon, property: IconClass.cssVarList.fill },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawTimer);\n","import { componentName, TimerClass } from './TimerClass';\nimport '@descope-ui/descope-icon';\n\ncustomElements.define(componentName, TimerClass);\n\nexport { TimerClass, componentName };\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","module.exports = \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMWVtIiBoZWlnaHQ9IjFlbSIgdmlld0JveD0iMCAwIDEwNCAxMDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+IDxwYXRoIGQ9Ik01MC4zMzM0IDAuMzMzMjUyQzIyLjgzMzQgMC4zMzMyNTIgMC4zMzMzNzQgMjIuODMzMyAwLjMzMzM3NCA1MC4zMzMzQzAuMzMzMzc0IDc3LjgzMzMgMjIuODMzNCAxMDAuMzMzIDUwLjMzMzQgMTAwLjMzM0M3Ny44MzM0IDEwMC4zMzMgMTAwLjMzMyA3Ny44MzMzIDEwMC4zMzMgNTAuMzMzM0MxMDAuMzMzIDIyLjgzMzMgNzcuODMzNCAwLjMzMzI1MiA1MC4zMzM0IDAuMzMzMjUyWk01MC4zMzM0IDg3LjgzMzNDMjkuNzA4NCA4Ny44MzMzIDEyLjgzMzQgNzAuOTU4MyAxMi44MzM0IDUwLjMzMzNDMTIuODMzNCAyOS43MDgzIDI5LjcwODQgMTIuODMzMyA1MC4zMzM0IDEyLjgzMzNDNzAuOTU4NCAxMi44MzMzIDg3LjgzMzQgMjkuNzA4MyA4Ny44MzM0IDUwLjMzMzNDODcuODMzNCA3MC45NTgzIDcwLjk1ODQgODcuODMzMyA1MC4zMzM0IDg3LjgzMzNaIiBmaWxsPSIjMTgxQTFDIi8+IDxwYXRoIGQ9Ik01MC4zMzI4IDE5LjA4MzNINDQuMDgyOFY1Ni41ODMySDc1LjMzMjhWNTAuMzMzMkg1MC4zMzI4VjE5LjA4MzNaIiBmaWxsPSIjMTgxQTFDIi8+IDwvc3ZnPiA=\"","import { componentName, ImageClass } from './ImageClass';\n\ncustomElements.define(componentName, ImageClass);\n\nexport { ImageClass, componentName };\n","import '@descope-ui/descope-image';\n\nimport { componentName, IconClass } from './IconClass';\n\ncustomElements.define(componentName, IconClass);\n\nexport { IconClass, 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 },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class', 'style'],\n componentName,\n }),\n);\n"],"names":["componentName","srcAttrs","RawImage","baseSelector","observedAttributes","constructor","super","this","attachShadow","mode","innerHTML","init","toggleVisibility","getSrc","onThemeChange","renderImage","isVisible","classList","remove","add","altText","getAttribute","legacySrc","themeSrc","currentThemeName","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","ImageClass","cssVarList","fill","then","res","appendChild","shouldRender","src","srcVal","attributeChangedCallback","attrName","oldValue","newValue","mappings","height","selector","width","fmt","val","pad","String","padStart","BaseClass","host","icon","timer","TimerClass","fontSize","iconSize","property","fontFamily","minHeight","fontWeight","lineHeight","textColor","gap","textAlign","hostWidth","hostDirection","iconColor","IconClass","concat","shadowRoot","querySelector","seconds","secs","parseInt","Math","max","isPaused","startInterval","setInterval","stop","stopInterval","clearInterval","reset","dispatchEvent","CustomEvent","bubbles","pause","resume","removeAttribute","textContent","ms","totalSeconds","floor","hours","secondsInMinute","minutes","join","formatTime","toggle","paused","setTimeout","customElements","define","createSvgEle","text","clean","sanitize","USE_PROFILES","svg","svgFilters","ADD_TAGS","FORBID_TAGS","DOMParser","parseFromString","createImage","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","document","createElement","createImgEle","style","setProperty","module","exports","slots","wrappedEleName","excludeAttrsSync"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[628,2294,4159,9261],{36976:(t,e,o)=>{o.d(e,{M:()=>r});const r=["blockquote","list","image","table","code","hr","backticks","fence","reference","heading","lheading","html_block"]},54240:(t,e,o)=>{o.r(e),o.d(e,{TooltipClass:()=>m,componentName:()=>a}),o(55838),o(71916);var r=o(88961),n=o(63200),i=o(25964),s=o(72270),l=o(76231);const a=(0,i.xE)("tooltip"),h=["text","position","hide-delay","hover-delay","opened"],d=(0,s.qu)({componentName:a,baseSelector:"vaadin-tooltip"}),{overlay:p,content:c}={overlay:{selector:()=>"vaadin-tooltip-overlay::part(overlay)"},content:{selector:()=>"vaadin-tooltip-overlay::part(content)"}},m=(0,n.Zz)(r.tQ,(0,r.mA)({selector:"",mappings:{fontFamily:{...c,property:l.m.cssVarList.fontFamilyOverride},fontSize:{...c,property:l.m.cssVarList.fontSizeOverride},fontWeight:{...c,property:l.m.cssVarList.fontWeightOverride},textColor:{...c,property:l.m.cssVarList.textColorOverride},hostDirection:{...c,property:l.m.cssVarList.hostDirectionOverride},backgroundColor:[{...p},{...c}],borderColor:{...p},borderStyle:{...p},borderWidth:{...p},borderRadius:{...p},boxShadow:{...p},horizontalPadding:[{...c,property:"padding-left"},{...c,property:"padding-right"}],verticalPadding:[{...c,property:"padding-top"},{...c,property:"padding-bottom"}]},forward:{attributes:["style"],include:!1}}))(class extends d{static get observedAttributes(){return h.concat(d.observedAttributes||[])}get isOpened(){return"true"===this.getAttribute("opened")}get overlay(){return this.tooltip?._overlayElement}get overlayContentNode(){return this.overlay?.shadowRoot.querySelector('[part="content"]')}get tooltipText(){return this.getAttribute("text")?.trim()||""}init(){super.init(),this.style.display="contents",this.insertAdjacentHTML("beforeend","<vaadin-tooltip></vaadin-tooltip>"),this.tooltip=this.querySelector("vaadin-tooltip"),this.tooltip.style.width="0",this.tooltip.style.height="0",this.tooltip.style.display="block",this.tooltip.style.overflow="hidden",this.tooltip.style.position="absolute",this.#t(),setTimeout(()=>this.#e())}#e(){this.#o(),this.#r(),(0,i.EA)(this,this.tooltip,{includeAttrs:["position","opened"]}),this.#n()}#t(){if(!this.children?.length)return;let t=Array.from(this.children).find(t=>t!==this.tooltip);t&&(this.tooltip.target=t)}#i(){this.overlayContentNode.innerHTML=""}#s(){const t=document.createElement("descope-enriched-text");return t.setAttribute("link-target-blank","true"),t.textContent=this.tooltipText,t}#o(){this.overlayContentNode&&setTimeout(()=>{this.#i(),this.textComponent=this.#s(),this.overlayContentNode.appendChild(this.textComponent),(0,i.EA)(this,this.textComponent,{includeAttrs:["readonly"]})})}#r(){this.overlay&&(this.isOpened?setTimeout(()=>this.tooltip.shadowRoot.appendChild(this.overlay)):(this.overlay._detachOverlay=()=>{},this.overlay._attachOverlay=()=>this.tooltip.shadowRoot.appendChild(this.overlay)))}#n(){this.tooltip?.toggleAttribute("manual",this.isOpened)}#l(t){this.textComponent&&(this.textComponent.textContent=t?.trim())}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),e!==o&&("text"===t&&this.#l(o),"opened"===t&&this.#n(t,o))}});customElements.define(a,m)},54847:(t,e,o)=>{o.d(e,{G:()=>r});const r=t=>{const e=document.createElement("textarea");return e.innerHTML=t,e.value}},55838:(t,e,o)=>{o.r(e),o.d(e,{EnrichedTextClass:()=>r.m,componentName:()=>r.T}),o(74778);var r=o(76231);customElements.define(r.T,r.m)},63595:(t,e,o)=>{o.r(e),o.d(e,{TextClass:()=>r.s,componentName:()=>r.T});var r=o(66434);customElements.define(r.T,r.s)},66434:(t,e,o)=>{o.d(e,{T:()=>l,s:()=>d});var r=o(88961),n=o(63200),i=o(25964),s=o(72270);const l=(0,i.xE)("text");class a extends((0,s.qu)({componentName:l,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,i.fz)("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,i.Ge)(this,()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""})}}const{host:h}={host:{selector:()=>":host"}},d=(0,n.Zz)((0,r.RF)({mappings:{hostWidth:{...h,property:"width"},hostDirection:{...h,property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),r.VO,r.tQ)(a)},74778:(t,e,o)=>{o.r(e),o.d(e,{LinkClass:()=>g,componentName:()=>a});var r=o(88961),n=o(63200),i=o(25964),s=o(72270),l=o(66434);const a=(0,i.xE)("link");class h extends((0,s.qu)({componentName:a,baseSelector:":host a"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t<div>\n\t\t\t<descope-text part="wrapper">\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t',(0,i.fz)('\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n\n :host([ellipsis="true"]) descope-text {\n display: inline-flex;\n }\n :host([ellipsis="true"]) descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ',this),(0,i.EA)(this,this.shadowRoot.querySelector("a"),{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),(0,i.EA)(this,this.shadowRoot.querySelector("descope-text"),{includeAttrs:["mode","variant"]})}}const d={host:{selector:()=>":host"},link:{selector:()=>":host a"},anchor:{},wrapper:{selector:()=>":host > div"},text:{selector:()=>l.s.componentName}},{anchor:p,text:c,host:m,wrapper:u,link:y}=d,g=(0,n.Zz)((0,r.RF)({mappings:{hostWidth:{...m,property:"width"},hostDirection:{...c,property:"direction"},textAlign:u,textDecoration:{...y,property:"text-decoration",fallback:"none"},textColor:[{...p,property:"color"},{...c,property:l.s.cssVarList.textColor}],cursor:p}}),r.VO,r.tQ)(h);o(63595),customElements.define(a,g)},76231:(t,e,o)=>{o.d(e,{T:()=>d,m:()=>c});var r=o(92540),n=o(88961),i=o(63200),s=o(36976),l=o(72270),a=o(54847),h=o(25964);const d=(0,h.xE)("enriched-text");class p extends((0,l.qu)({componentName:d,baseSelector:":host > div"})){#a;#h;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="content"></div>\n ',(0,h.fz)("\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n ",this),this.#d(),(0,h.Ge)(this,this.#p.bind(this)),this.contentNode?.addEventListener("click",t=>{t.target instanceof HTMLAnchorElement&&t.stopPropagation()})}static get observedAttributes(){return["readonly","link-target-blank"]}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),o!==e&&("readonly"===t&&this.onReadOnlyChange("true"===o),"link-target-blank"===t&&this.#d())}customUnderlineRenderer(){this.processor.renderer.rules.em_open=(t,e,o,r,n)=>("_"===t[e].markup&&(t[e].tag="u"),this.#h(t,e,o,r,n)),this.processor.renderer.rules.em_close=(t,e,o,r,n)=>("_"===t[e].markup&&(t[e].tag="u"),this.#h(t,e,o,r,n))}#c(){this.linkTargetBlank?this.processor.renderer.rules.link_open=(t,e,o,r,n)=>(t[e].attrSet("target","_blank"),this.#a(t,e,o,r,n)):this.processor.renderer.rules.link_open=this.#a}#m(){this.processor&&this.processor.disable(s.M)}#u(){this.#m()}#y(){this.#a=this.processor.renderer.rules.link_open||((t,e,o,r,n)=>n.renderToken(t,e,o)),this.#h=this.processor.renderer.rules.em_open||((t,e,o,r,n)=>n.renderToken(t,e,o))}#d(){this.processor=new r.A("commonmark",{html:!0}),this.#y(),this.#u(),this.#c(),this.customUnderlineRenderer()}get linkTargetBlank(){return"true"===this.getAttribute("link-target-blank")}get contentNode(){return this.shadowRoot.querySelector(".content")}#p(){if(!this.processor)return;let t=(0,a.G)(this.innerHTML);!t?.trim()&&this.isConnected?this.setAttribute("empty","true"):this.removeAttribute("empty");try{const e=this.processor.parse(t,{references:void 0});t=this.processor.renderer.render(e,{html:!0,breaks:!0})}catch(t){console.warn("Not parsing invalid markdown token")}this.contentNode.innerHTML=t,this.contentNode.firstChild?.setAttribute("part","content")}onReadOnlyChange(t){t?this.contentNode.setAttribute("inert",t):this.contentNode.removeAttribute("inert")}}const c=(0,i.Zz)((0,n.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDisplay:{selector:()=>":host",property:"display",fallback:"inline-block"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},fontWeightBold:[{selector:()=>":host strong",property:"font-weight"},{selector:()=>":host b",property:"font-weight"}],textColor:{property:"color"},textLineHeight:{property:"line-height"},textAlign:{},linkColor:{selector:"a",property:"color"},linkTextDecoration:{selector:"a",property:"text-decoration"},linkHoverTextDecoration:{selector:"a:hover",property:"text-decoration"},minHeight:{},minWidth:{}}}),(0,n.RF)({componentNameOverride:(0,h.xE)("link")}),(0,n.RF)({componentNameOverride:(0,h.xE)("text")}),n.VO,n.tQ)(p)}}]);
|
|
2
|
+
//# sourceMappingURL=descope-tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descope-tooltip.js","mappings":"wKAAO,MAAMA,EAAe,CAC1B,aACA,OACA,QACA,QACA,OACA,KACA,YACA,QACA,YACA,UACA,WACA,a,sJCAK,MAAMC,GAAgB,QAAiB,WAExCC,EAAe,CACnB,OACA,WACA,aACA,cACA,UAGIC,GAAY,QAAgB,CAChCF,gBACAG,aAAc,oBA2IV,QAAEC,EAAO,QAAEC,GAAY,CAC3BD,QAAS,CAAEE,SAAU,IAAM,yCAC3BD,QAAS,CAAEC,SAAU,IAAM,0CAQhBC,GAAe,QAC1B,MACA,QAAY,CACVD,SAAU,GACVE,SAAU,CACRC,WAAY,IACPJ,EACHK,SAAUC,EAAA,EAAkBC,WAAWC,oBAEzCC,SAAU,IACLT,EACHK,SAAUC,EAAA,EAAkBC,WAAWG,kBAEzCC,WAAY,IACPX,EACHK,SAAUC,EAAA,EAAkBC,WAAWK,oBAEzCC,UAAW,IACNb,EACHK,SAAUC,EAAA,EAAkBC,WAAWO,mBAEzCC,cAAe,IACVf,EACHK,SAAUC,EAAA,EAAkBC,WAAWS,uBAEzCC,gBAAiB,CAAC,IAAKlB,GAAW,IAAKC,IACvCkB,YAAa,IAAKnB,GAClBoB,YAAa,IAAKpB,GAClBqB,YAAa,IAAKrB,GAClBsB,aAAc,IAAKtB,GACnBuB,UAAW,IAAKvB,GAChBwB,kBAAmB,CACjB,IAAKvB,EAASK,SAAU,gBACxB,IAAKL,EAASK,SAAU,kBAE1BmB,gBAAiB,CACf,IAAKxB,EAASK,SAAU,eACxB,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a,OAAQ,UACpD,CAEA,gBAAAmD,CAAiB8B,GACXA,EACFjH,KAAK8E,YAAY9C,aAAa,QAASiF,GAEvCjH,KAAK8E,YAAY0B,gBAAgB,QAErC,EAGK,MAAMjI,GAAoB,SAC/B,QAAiB,CACfH,SAAU,CACRsF,UAAW,CAAExF,SAAU,IAAM,QAASI,SAAU,SAChD4I,YAAa,CAAEhJ,SAAU,IAAM,QAASI,SAAU,UAAWoG,SAAU,gBACvE1F,cAAe,CAAEd,SAAU,IAAM,QAASI,SAAU,aACpDI,SAAU,CAAC,EACXL,WAAY,CAAC,EACbO,WAAY,CAAC,EACbuI,eAAgB,CACd,CAAEjJ,SAAU,IAAM,eAAgBI,SAAU,eAC5C,CAAEJ,SAAU,IAAM,UAAWI,SAAU,gBAEzCQ,UAAW,CAAER,SAAU,SACvBqF,eAAgB,CAAErF,SAAU,eAC5BwF,UAAW,CAAC,EACZsD,UAAW,CAAElJ,SAAU,IAAKI,SAAU,SACtC+I,mBAAoB,CAAEnJ,SAAU,IAAKI,SAAU,mBAC/CgJ,wBAAyB,CAAEpJ,SAAU,UAAWI,SAAU,mBAC1DiJ,UAAW,CAAC,EACZC,SAAU,CAAC,MAGf,QAAiB,CAAEC,uBAAuB,QAAiB,WAC3D,QAAiB,CAAEA,uBAAuB,QAAiB,UAC3D,KACA,KA1B+B,CA2B/B7C,E","sources":["webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/consts.js","webpack://@descope/web-components-ui/../components/descope-tooltip/src/component/TooltipClass.js","webpack://@descope/web-components-ui/../components/descope-tooltip/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/LinkClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/EnrichedTextClass.js"],"sourcesContent":["export const disableRules = [\n 'blockquote',\n 'list',\n 'image',\n 'table',\n 'code',\n 'hr',\n 'backticks',\n 'fence',\n 'reference',\n 'heading',\n 'lheading',\n 'html_block',\n];\n","import {\n componentNameValidationMixin,\n portalMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n forwardAttrs,\n getComponentName,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { EnrichedTextClass } from '@descope-ui/descope-enriched-text/class';\n\nexport const componentName = getComponentName('tooltip');\n\nconst tooltipAttrs = [\n 'text',\n 'position',\n 'hide-delay',\n 'hover-delay',\n 'opened',\n];\n\nconst BaseClass = createBaseClass({\n componentName,\n baseSelector: 'vaadin-tooltip',\n});\n\nclass RawTooltip extends BaseClass {\n static get observedAttributes() {\n return tooltipAttrs.concat(BaseClass.observedAttributes || []);\n }\n\n get isOpened() {\n return this.getAttribute('opened') === 'true';\n }\n\n get overlay() {\n return this.tooltip?._overlayElement;\n }\n\n get overlayContentNode() {\n return this.overlay?.shadowRoot.querySelector('[part=\"content\"]');\n }\n\n get tooltipText() {\n return this.getAttribute('text')?.trim() || '';\n }\n\n init() {\n super.init();\n\n // Create the vaadin-tooltip here instead of constructor (for React compatibility)\n this.style.display = 'contents';\n this.insertAdjacentHTML('beforeend', '<vaadin-tooltip></vaadin-tooltip>');\n this.tooltip = this.querySelector('vaadin-tooltip');\n\n this.tooltip.style.width = '0';\n this.tooltip.style.height = '0';\n this.tooltip.style.display = 'block';\n this.tooltip.style.overflow = 'hidden';\n this.tooltip.style.position = 'absolute';\n\n this.#setTooltipTarget();\n\n setTimeout(() => this.#onOverlayReady());\n }\n\n #onOverlayReady() {\n this.#initTooltipTextComponent();\n this.#overrideAttachOverlay();\n\n forwardAttrs(this, this.tooltip, {\n includeAttrs: ['position', 'opened'],\n });\n\n this.#handleTooltipVisibility();\n }\n\n #setTooltipTarget() {\n if (!this.children?.length) return;\n\n let ele = Array.from(this.children).find(\n (child) => child !== this.tooltip,\n );\n\n if (!ele) return;\n\n this.tooltip.target = ele;\n }\n\n #clearOverlayContentNode() {\n this.overlayContentNode.innerHTML = '';\n }\n\n #createEnrichedTextComponent() {\n const enrichedText = document.createElement('descope-enriched-text');\n\n enrichedText.setAttribute('link-target-blank', 'true');\n enrichedText.textContent = this.tooltipText;\n\n return enrichedText;\n }\n\n #initTooltipTextComponent() {\n if (!this.overlayContentNode) return;\n\n setTimeout(() => {\n this.#clearOverlayContentNode();\n\n this.textComponent = this.#createEnrichedTextComponent();\n\n this.overlayContentNode.appendChild(this.textComponent);\n\n forwardAttrs(this, this.textComponent, {\n includeAttrs: ['readonly'],\n });\n });\n }\n\n // the default vaadin behavior is to attach the overlay to the body when opened\n // we do not want that because it's difficult to style the overlay in this way\n // so we override it to open inside the shadow DOM\n #overrideAttachOverlay() {\n if (!this.overlay) return;\n\n if (this.isOpened) {\n // When `opened` attr is used, vaadin doesn't execute `_attachOverlay`,\n // and the overlay element is rendered outside the component, on the top\n // level. We need to move it back to the local component's DOM.\n setTimeout(() => this.tooltip.shadowRoot.appendChild(this.overlay));\n } else {\n this.overlay._detachOverlay = () => {};\n\n this.overlay._attachOverlay = () =>\n this.tooltip.shadowRoot.appendChild(this.overlay);\n }\n }\n\n #handleTooltipVisibility() {\n // This is Vaadin's API for manual control of tooltip visibility\n this.tooltip?.toggleAttribute('manual', this.isOpened);\n }\n\n #updateText(value) {\n if (!this.textComponent) return;\n this.textComponent.textContent = value?.trim();\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue !== newValue) {\n if (attrName === 'text') {\n this.#updateText(newValue);\n }\n\n if (attrName === 'opened') {\n this.#handleTooltipVisibility(attrName, newValue)\n }\n }\n }\n}\n\nconst { overlay, content } = {\n overlay: { selector: () => 'vaadin-tooltip-overlay::part(overlay)' },\n content: { selector: () => 'vaadin-tooltip-overlay::part(content)' },\n};\n\n/**\n * This component has no Shadow DOM of its own, so we can't add styles to it\n * (otherwise it would affect the rest of the DOM).\n * Note that all styles are within PortalMixin.\n */\nexport const TooltipClass = compose(\n componentNameValidationMixin,\n portalMixin({\n selector: '',\n mappings: {\n fontFamily: {\n ...content,\n property: EnrichedTextClass.cssVarList.fontFamilyOverride,\n },\n fontSize: {\n ...content,\n property: EnrichedTextClass.cssVarList.fontSizeOverride,\n },\n fontWeight: {\n ...content,\n property: EnrichedTextClass.cssVarList.fontWeightOverride,\n },\n textColor: {\n ...content,\n property: EnrichedTextClass.cssVarList.textColorOverride,\n },\n hostDirection: {\n ...content,\n property: EnrichedTextClass.cssVarList.hostDirectionOverride,\n },\n backgroundColor: [{ ...overlay }, { ...content }],\n borderColor: { ...overlay },\n borderStyle: { ...overlay },\n borderWidth: { ...overlay },\n borderRadius: { ...overlay },\n boxShadow: { ...overlay },\n horizontalPadding: [\n { ...content, property: 'padding-left' },\n { ...content, property: 'padding-right' },\n ],\n verticalPadding: [\n { ...content, property: 'padding-top' },\n { ...content, property: 'padding-bottom' },\n ],\n },\n forward: {\n attributes: ['style'],\n include: false,\n },\n }),\n)(RawTooltip);\n","import '@descope-ui/descope-enriched-text';\nimport '@vaadin/tooltip';\nimport { componentName, TooltipClass } from './TooltipClass';\n\ncustomElements.define(componentName, TooltipClass);\n\nexport { TooltipClass, componentName };\n","export const decodeHTML = (html) => {\n const textArea = document.createElement('textarea');\n textArea.innerHTML = html;\n return textArea.value;\n};\n","import '@descope-ui/descope-link';\n\nimport { componentName, EnrichedTextClass } from './EnrichedTextClass';\n\ncustomElements.define(componentName, EnrichedTextClass);\n\nexport { EnrichedTextClass, componentName };\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(`\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `, this);\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' }\n}\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n textColor: [\n { property: 'color' }\n ],\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n forwardAttrs,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { TextClass } from '@descope-ui/descope-text/class';\n\nexport const componentName = getComponentName('link');\n\nclass RawLink extends createBaseClass({ componentName, baseSelector: ':host a' }) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<div>\n\t\t\t<descope-text part=\"wrapper\">\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n\n :host([ellipsis=\"true\"]) descope-text {\n display: inline-flex;\n }\n :host([ellipsis=\"true\"]) descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n `,\n this\n );\n\n forwardAttrs(this, this.shadowRoot.querySelector('a'), {\n includeAttrs: ['href', 'target', 'tooltip'],\n mapAttrs: {\n tooltip: 'title',\n },\n });\n\n forwardAttrs(this, this.shadowRoot.querySelector('descope-text'), {\n includeAttrs: ['mode', 'variant'],\n });\n }\n}\n\nconst selectors = {\n host: { selector: () => ':host' },\n link: { selector: () => ':host a' },\n anchor: {},\n wrapper: { selector: () => ':host > div' },\n text: { selector: () => TextClass.componentName },\n};\n\nconst { anchor, text, host, wrapper, link } = selectors;\n\nexport const LinkClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...text, property: 'direction' },\n textAlign: wrapper,\n textDecoration: { ...link, property: 'text-decoration', fallback: 'none' },\n textColor: [\n { ...anchor, property: 'color' },\n { ...text, property: TextClass.cssVarList.textColor },\n ],\n cursor: anchor,\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawLink);\n","import { componentName, LinkClass } from './LinkClass';\nimport '@descope-ui/descope-text';\n\ncustomElements.define(componentName, LinkClass);\n\nexport { LinkClass, componentName };\n","/* eslint-disable no-param-reassign */\n\nimport MarkdownIt from 'markdown-it';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport { disableRules } from './consts';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { decodeHTML } from './helpers';\nimport { getComponentName, injectStyle, observeChildren } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('enriched-text');\n\nclass EnrichedText extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n #origLinkRenderer;\n\n #origEmRenderer;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"content\"></div>\n `;\n\n injectStyle(\n `\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n `,\n this\n );\n\n this.#initProcessor();\n\n observeChildren(this, this.#parseChildren.bind(this));\n\n // Stop propagation on link clicks to prevent parent handlers from firing\n this.contentNode?.addEventListener('click', (e) => {\n if (e.target instanceof HTMLAnchorElement) {\n e.stopPropagation();\n }\n });\n }\n\n static get observedAttributes() {\n return ['readonly', 'link-target-blank'];\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue !== oldValue) {\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue === 'true');\n }\n\n if (attrName === 'link-target-blank') {\n this.#initProcessor();\n }\n }\n }\n\n // We're overriding the rule for em with single underscore to perform as underline. (_underline_)\n customUnderlineRenderer() {\n this.processor.renderer.rules.em_open = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n this.processor.renderer.rules.em_close = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n }\n\n #customizeLinkRenderer() {\n if (this.linkTargetBlank) {\n this.processor.renderer.rules.link_open = (tokens, idx, options, env, self) => {\n // Add a new `target` attribute, or replace the value of the existing one.\n tokens[idx].attrSet('target', '_blank');\n // Pass the token to the default renderer.\n return this.#origLinkRenderer(tokens, idx, options, env, self);\n };\n } else {\n this.processor.renderer.rules.link_open = this.#origLinkRenderer;\n }\n }\n\n #disableCustomRules() {\n if (!this.processor) {\n return;\n }\n this.processor.disable(disableRules);\n }\n\n #updateProcessorRules() {\n this.#disableCustomRules();\n }\n\n #storeOrigRenderers() {\n const defaultLinkRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origLinkRenderer = this.processor.renderer.rules.link_open || defaultLinkRenderer;\n\n const defaultStrongRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origEmRenderer = this.processor.renderer.rules.em_open || defaultStrongRenderer;\n }\n\n #initProcessor() {\n this.processor = new MarkdownIt('commonmark', { html: true });\n this.#storeOrigRenderers();\n this.#updateProcessorRules();\n this.#customizeLinkRenderer();\n this.customUnderlineRenderer();\n }\n\n get linkTargetBlank() {\n return this.getAttribute('link-target-blank') === 'true';\n }\n\n get contentNode() {\n return this.shadowRoot.querySelector('.content');\n }\n\n #parseChildren() {\n if (!this.processor) {\n return;\n }\n\n let html = decodeHTML(this.innerHTML);\n\n if (!html?.trim() && this.isConnected) {\n this.setAttribute('empty', 'true');\n } else {\n this.removeAttribute('empty');\n }\n\n try {\n const tokens = this.processor.parse(html, { references: undefined });\n html = this.processor.renderer.render(tokens, { html: true, breaks: true });\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('Not parsing invalid markdown token');\n }\n\n this.contentNode.innerHTML = html;\n this.contentNode.firstChild?.setAttribute('part', 'content');\n }\n\n onReadOnlyChange(isReadOnly) {\n if (isReadOnly) {\n this.contentNode.setAttribute('inert', isReadOnly);\n } else {\n this.contentNode.removeAttribute('inert');\n }\n }\n}\n\nexport const EnrichedTextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDisplay: { selector: () => ':host', property: 'display', fallback: 'inline-block' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n fontWeightBold: [\n { selector: () => ':host strong', property: 'font-weight' },\n { selector: () => ':host b', property: 'font-weight' },\n ],\n textColor: { property: 'color' },\n textLineHeight: { property: 'line-height' },\n textAlign: {},\n linkColor: { selector: 'a', property: 'color' },\n linkTextDecoration: { selector: 'a', property: 'text-decoration' },\n linkHoverTextDecoration: { selector: 'a:hover', property: 'text-decoration' },\n minHeight: {},\n minWidth: {},\n },\n }),\n createStyleMixin({ componentNameOverride: getComponentName('link') }),\n createStyleMixin({ componentNameOverride: getComponentName('text') }),\n draggableMixin,\n componentNameValidationMixin\n)(EnrichedText);\n"],"names":["disableRules","componentName","tooltipAttrs","BaseClass","baseSelector","overlay","content","selector","TooltipClass","mappings","fontFamily","property","EnrichedTextClass","cssVarList","fontFamilyOverride","fontSize","fontSizeOverride","fontWeight","fontWeightOverride","textColor","textColorOverride","hostDirection","hostDirectionOverride","backgroundColor","borderColor","borderStyle","borderWidth","borderRadius","boxShadow","horizontalPadding","verticalPadding","forward","attributes","include","observedAttributes","concat","isOpened","this","getAttribute","tooltip","_overlayElement","overlayContentNode","shadowRoot","querySelector","tooltipText","trim","init","super","style","display","insertAdjacentHTML","width","height","overflow","position","setTimeout","includeAttrs","children","length","ele","Array","from","find","child","target","innerHTML","enrichedText","document","createElement","setAttribute","textContent","textComponent","appendChild","_detachOverlay","_attachOverlay","toggleAttribute","value","attributeChangedCallback","attrName","oldValue","newValue","customElements","define","decodeHTML","html","textArea","RawText","constructor","attachShadow","mode","hideWhenEmpty","hasChildren","childNodes","host","TextClass","hostWidth","textLineHeight","textLetterSpacing","textShadow","textAlign","textTransform","fontStyle","RawLink","mapAttrs","selectors","link","anchor","wrapper","text","LinkClass","textDecoration","fallback","cursor","EnrichedText","bind","contentNode","addEventListener","e","HTMLAnchorElement","stopPropagation","onReadOnlyChange","customUnderlineRenderer","processor","renderer","rules","em_open","tokens","idx","options","env","self","markup","tag","em_close","linkTargetBlank","link_open","attrSet","disable","_","renderToken","isConnected","removeAttribute","parse","references","undefined","render","breaks","console","warn","firstChild","isReadOnly","hostDisplay","fontWeightBold","linkColor","linkTextDecoration","linkHoverTextDecoration","minHeight","minWidth","componentNameOverride"],"sourceRoot":""}
|