@descope/web-components-ui 3.27.3 → 3.27.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/cjs/index.cjs.js +7 -2
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +11 -4
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/9439.js +1 -1
  6. package/dist/umd/9439.js.map +1 -1
  7. package/dist/umd/DescopeDev.js +1 -1
  8. package/dist/umd/DescopeDev.js.map +1 -1
  9. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
  10. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -1
  11. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
  12. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -1
  13. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -1
  14. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -1
  15. package/dist/umd/descope-button.js +1 -1
  16. package/dist/umd/descope-button.js.map +1 -1
  17. package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
  18. package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
  19. package/dist/umd/descope-multi-line-mappings.js +1 -1
  20. package/dist/umd/descope-multi-line-mappings.js.map +1 -1
  21. package/dist/umd/descope-multi-sso.js +1 -1
  22. package/dist/umd/descope-multi-sso.js.map +1 -1
  23. package/dist/umd/descope-outbound-app-button.js +1 -1
  24. package/dist/umd/descope-outbound-app-button.js.map +1 -1
  25. package/dist/umd/descope-outbound-apps.js +1 -1
  26. package/dist/umd/descope-outbound-apps.js.map +1 -1
  27. package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +1 -1
  28. package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js.map +1 -1
  29. package/dist/umd/descope-passcode-index-js.js +1 -1
  30. package/dist/umd/descope-passcode-index-js.js.map +1 -1
  31. package/dist/umd/descope-recovery-codes.js +1 -1
  32. package/dist/umd/descope-recovery-codes.js.map +1 -1
  33. package/dist/umd/descope-timer-button.js +1 -1
  34. package/dist/umd/descope-timer-button.js.map +1 -1
  35. package/dist/umd/descope-tooltip.js +1 -1
  36. package/dist/umd/descope-tooltip.js.map +1 -1
  37. package/dist/umd/descope-upload-file-index-js.js +1 -1
  38. package/dist/umd/descope-upload-file-index-js.js.map +1 -1
  39. package/dist/umd/descope-user-attribute-index-js.js +1 -1
  40. package/dist/umd/descope-user-attribute-index-js.js.map +1 -1
  41. package/dist/umd/descope-user-auth-method-index-js.js +1 -1
  42. package/dist/umd/descope-user-auth-method-index-js.js.map +1 -1
  43. package/dist/umd/descope-user-passkeys.js +1 -1
  44. package/dist/umd/descope-user-passkeys.js.map +1 -1
  45. package/dist/umd/index.js +1 -1
  46. package/dist/umd/index.js.map +1 -1
  47. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
  48. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
  49. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
  50. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
  51. package/package.json +46 -46
  52. package/src/components/descope-passcode/PasscodeClass.js +1 -0
  53. package/src/components/descope-passcode/descope-passcode-internal/PasscodeInternal.js +4 -2
  54. package/src/components/descope-upload-file/UploadFileClass.js +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"descope-timer-button.js","mappings":"mIAAAA,EAAAC,QAAA,o/BCYO,MAAAC,GAAsB,EAAAC,EAAAC,IAAgB,WAsC7CC,KAAQA,EAAAC,MAAAA,EAAAC,YAAAA,GAA2B,CACnCF,KAAA,CAAUG,SAAA,aACVF,MAAA,CAAWE,SAAA,iBACXD,YAAA,CAAiBC,SAAA,gCAGjB,IAAAC,EAEO,MAAAC,GAAoB,EAAAC,EAAAC,K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AAAR,EAAAQ,IAAA,GAAAR,EAAAU,GAAAV,EAAAzB,IAEAoC,KAAA,kHCXA7L,eAAAC,OAAsB6L,EAAA3L,EAAe2L,EAAAhI","sources":["webpack://@descope/web-components-ui/../components/descope-timer/src/component/clock.svg","webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-timer-button/src/component/TimerButtonClass.js","webpack://@descope/web-components-ui/../components/descope-timer-button/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/TimerClass.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/index.js"],"sourcesContent":["module.exports = \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMWVtIiBoZWlnaHQ9IjFlbSIgdmlld0JveD0iMCAwIDEwNCAxMDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+IDxwYXRoIGQ9Ik01MC4zMzM0IDAuMzMzMjUyQzIyLjgzMzQgMC4zMzMyNTIgMC4zMzMzNzQgMjIuODMzMyAwLjMzMzM3NCA1MC4zMzMzQzAuMzMzMzc0IDc3LjgzMzMgMjIuODMzNCAxMDAuMzMzIDUwLjMzMzQgMTAwLjMzM0M3Ny44MzM0IDEwMC4zMzMgMTAwLjMzMyA3Ny44MzMzIDEwMC4zMzMgNTAuMzMzM0MxMDAuMzMzIDIyLjgzMzMgNzcuODMzNCAwLjMzMzI1MiA1MC4zMzM0IDAuMzMzMjUyWk01MC4zMzM0IDg3LjgzMzNDMjkuNzA4NCA4Ny44MzMzIDEyLjgzMzQgNzAuOTU4MyAxMi44MzM0IDUwLjMzMzNDMTIuODMzNCAyOS43MDgzIDI5LjcwODQgMTIuODMzMyA1MC4zMzM0IDEyLjgzMzNDNzAuOTU4NCAxMi44MzMzIDg3LjgzMzQgMjkuNzA4MyA4Ny44MzM0IDUwLjMzMzNDODcuODMzNCA3MC45NTgzIDcwLjk1ODQgODcuODMzMyA1MC4zMzM0IDg3LjgzMzNaIiBmaWxsPSIjMTgxQTFDIi8+IDxwYXRoIGQ9Ik01MC4zMzI4IDE5LjA4MzNINDQuMDgyOFY1Ni41ODMySDc1LjMzMjhWNTAuMzMzMkg1MC4zMzI4VjE5LjA4MzNaIiBmaWxsPSIjMTgxQTFDIi8+IDwvc3ZnPiA=\"","import { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { clickableMixin } from './clickableMixin';\n\nexport const componentName = getComponentName('button');\n\nconst resetStyles = `\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n`;\n\nconst iconStyles = `\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n`;\n\nconst editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;\n\nconst { host, label, slottedIcon } = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n slottedIcon: { selector: () => '::slotted(descope-icon)' },\n};\n\nlet loadingIndicatorStyles;\n\nexport const ButtonClass = compose(\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostMaxWidth: { ...host, property: 'max-width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n\n cursor: {},\n backgroundColor: {},\n\n outlineOffset: {},\n outlineColor: {},\n outlineStyle: {},\n outlineWidth: {},\n\n borderRadius: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n\n verticalPadding: [\n { property: 'padding-top' },\n { property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { property: 'padding-right', fallback: '0.875em' },\n { property: 'padding-left', fallback: '0.875em' },\n ],\n\n labelTextColor: { property: 'color' },\n iconColor: {\n selector: () => `::slotted(*)`,\n property: IconClass.cssVarList.fill,\n },\n labelTextDecoration: { ...label, property: 'text-decoration' },\n labelSpacing: { ...label, property: 'gap' },\n textAlign: { ...label, property: 'justify-content', fallback: 'center' },\n\n iconSize: [\n { ...slottedIcon, property: 'width' },\n { ...slottedIcon, property: 'height' },\n ],\n },\n }),\n clickableMixin,\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: ['', 'prefix', 'label', 'suffix'],\n wrappedEleName: 'vaadin-button',\n style: () => `\n\t\t\t${resetStyles}\n\t\t\t${iconStyles}\n\t\t\t${loadingIndicatorStyles}\n\t\t\t${editorOverrides}\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${ButtonClass.cssVarList.outlineWidth}) + var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width=\"true\"]) {\n width: var(${ButtonClass.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${ButtonClass.cssVarList.hostHeight}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square=\"true\"]:not([full-width=\"true\"]) {\n\t\t\t\twidth: calc(var(${ButtonClass.cssVarList.hostWidth}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['tabindex', 'class', 'style'],\n componentName,\n }),\n);\n\nconst { color, fontSize } = ButtonClass.cssVarList;\nloadingIndicatorStyles = `\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading=\"true\"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${color});\n\t\ttop: calc(50% - (var(${fontSize}) / 2));\n\t\tleft: calc(50% - (var(${fontSize}) / 2));\n\t\tborder-width: calc(var(${fontSize}) / 10);\n\t\twidth: var(${fontSize});\n\t\theight: var(${fontSize});\n\t}\n\t:host([disabled=\"true\"]),\n\t:host([loading=\"true\"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading=\"true\"]) ::part(prefix),\n\t:host([loading=\"true\"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`;\n","export const clickableMixin = (superclass) =>\n class ClickableMixinClass extends superclass {\n get isLoading() {\n return this.getAttribute('loading') === 'true';\n }\n\n click() {\n this.isLoading || super.click();\n }\n };\n","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","import {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { ImageClass } from '@descope-ui/descope-image/class';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('icon');\n\nexport const IconClass = compose(\n createStyleMixin({\n mappings: {\n fill: [{}, { property: ImageClass.cssVarList.fill }],\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class', 'style', 'st-height', 'st-width'],\n componentName,\n }),\n);\n","import '@descope-ui/descope-image';\n\nimport { componentName, IconClass } from './IconClass';\n\ncustomElements.define(componentName, IconClass);\n\nexport { IconClass, componentName };\n"," \nimport {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { createImage } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('image');\n\nconst srcAttrs = ['src', 'src-dark'];\n\nclass RawImage extends createBaseClass({\n componentName,\n baseSelector: 'slot',\n}) {\n static get observedAttributes() {\n return srcAttrs;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<slot></slot>\n\t`;\n\n injectStyle(\n `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n `,\n this,\n );\n }\n\n init() {\n super.init?.();\n this.toggleVisibility(this.getSrc);\n }\n\n onThemeChange() {\n this.renderImage();\n }\n\n toggleVisibility(isVisible) {\n if (isVisible) {\n this.classList.remove('hidden');\n } else {\n this.classList.add('hidden');\n }\n }\n\n get altText() {\n return this.getAttribute('alt') || '';\n }\n\n get legacySrc() {\n return this.getAttribute('src');\n }\n\n get themeSrc() {\n return this.getAttribute(`src-${this.currentThemeName}`);\n }\n\n get getSrc() {\n return this.themeSrc || this.legacySrc;\n }\n\n // in order to fill an SVG with `currentColor` override all of its `fill` and `path` nodes\n // with the value from the `st-fill` attribute\n \n updateFillColor(node) {\n // set fill to root node and all its relevant selectors\n const elementsToReplace = [node, ...node.querySelectorAll('*[fill]')];\n\n elementsToReplace.forEach((ele) => {\n ele.setAttribute(\n 'fill',\n `var(${ImageClass.cssVarList.fill}, ${ele.getAttribute('fill') || \"''\"})`,\n );\n });\n }\n\n renderImage() {\n this.toggleVisibility(this.getSrc);\n\n createImage(this.getSrc, this.altText).then((res) => {\n this.innerHTML = '';\n if (res) {\n this.updateFillColor(res);\n this.appendChild(res);\n }\n });\n }\n\n // render only when src attribute matches current theme\n shouldRender(src) {\n const srcVal = this.getAttribute(src);\n return this.getSrc === srcVal;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue === newValue) return;\n\n if (this.shouldRender(attrName)) {\n this.renderImage();\n }\n }\n}\n\nexport const ImageClass = compose(\n createStyleMixin({\n mappings: {\n fill: {},\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawImage);\n","import DOMPurify from 'dompurify';\n\nconst getFileExtension = (path) => {\n const match = path.match(/\\.([0-9a-z]+)(?:[\\\\?#]|$)/i);\n return match ? match[1] : null;\n};\n\nconst base64Prefix = 'data:image/svg+xml;base64,';\n\nconst isBase64Svg = (src) => src.startsWith(base64Prefix);\n\nconst createImgEle = (src, altText) => {\n const ele = document.createElement('img');\n ele.setAttribute('src', src);\n ele.setAttribute('alt', altText);\n return ele;\n};\n\nconst createSvgEle = (text) => {\n // we want to purify the SVG to avoid XSS attacks\n const clean = DOMPurify.sanitize(text, {\n USE_PROFILES: { svg: true, svgFilters: true },\n // allow image to render\n ADD_TAGS: ['image'],\n // forbid interactiviy via `use` tags (which are sanitized by default)\n FORBID_TAGS: ['defs']\n });\n\n const parser = new DOMParser();\n const ele = parser\n .parseFromString(clean, 'image/svg+xml')\n .querySelector('svg');\n return ele;\n};\n\nexport const createImage = async (src, altText) => {\n try {\n let ele;\n if (isBase64Svg(src)) {\n // handle base64 source\n const svgXml = atob(src.slice(base64Prefix.length));\n ele = createSvgEle(svgXml);\n } else if (getFileExtension(src) === 'svg') {\n // handle urls\n const fetchedSrc = await fetch(src);\n const text = await fetchedSrc.text();\n ele = createSvgEle(text);\n } else {\n // handle binary\n ele = createImgEle(src, altText);\n }\n\n ele.style.setProperty('max-width', '100%');\n ele.style.setProperty('max-height', '100%');\n\n return ele;\n } catch {\n return null;\n }\n};\n","import { componentName, ImageClass } from './ImageClass';\n\ncustomElements.define(componentName, ImageClass);\n\nexport { ImageClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} 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';\nimport { TimerClass } from '@descope-ui/descope-timer/class';\nimport { ButtonClass } from '@descope-ui/descope-button/class';\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 align-items: center;\n width: 100%;\n }\n /* allow timer to grow along the main axis in the wrapper flex container */\n :host(:not([timer-inside=\"true\"])) .timer {\n flex: 1;\n }\n :host([timer-inside=\"true\"]) .timer {\n flex: 0 0 auto;\n }\n `,\n this,\n );\n\n this.wrapper = this.shadowRoot.querySelector('.wrapper');\n this.timer = this.shadowRoot.querySelector('.timer');\n this.button = this.shadowRoot.querySelector('.button');\n this.forwardingSlot = this.shadowRoot.querySelector('.button slot');\n\n this.timer.addEventListener('timer-started', () => this.onTimerStarted());\n this.timer.addEventListener('timer-ended', () => this.onTimerEnded());\n\n this.syncTimerPlacement();\n\n this.button.addEventListener('click', this.onClick.bind(this));\n }\n\n static get observedAttributes() {\n return [\n ...(super.observedAttributes || []),\n 'timer-inside',\n 'timer-position',\n ];\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback?.(name, oldValue, newValue);\n if (name === 'timer-inside' || name === 'timer-position') {\n this.syncTimerPlacement();\n }\n }\n\n get #isTimerInside() {\n return this.getAttribute('timer-inside') === 'true';\n }\n\n get #isReversed() {\n return this.getAttribute('timer-position') === 'end';\n }\n\n syncTimerPlacement() {\n if (this.#isTimerInside) {\n this.#placeTimerInsideButton(this.#isReversed);\n } else {\n this.#placeTimerOutsideButton();\n }\n }\n\n #placeTimerInsideButton(reversed) {\n if (reversed) {\n // timer after label text (right)\n if (this.timer.previousSibling !== this.forwardingSlot) {\n this.button.appendChild(this.timer);\n }\n } else {\n // timer before label text (left) — matches default outside position (above/before button)\n if (this.timer.nextSibling !== this.forwardingSlot) {\n this.button.insertBefore(this.timer, this.forwardingSlot);\n }\n }\n }\n\n #placeTimerOutsideButton() {\n // move timer back as a wrapper sibling, before the button so flex-column puts it above\n if (this.timer.parentElement !== this.wrapper) {\n this.wrapper.insertBefore(this.timer, this.button);\n }\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 {\n host,\n nestedTimer,\n nestedButton,\n timerInsideNotReversed,\n timerInsideReversed,\n} = {\n host: { selector: () => ':host' },\n nestedTimer: { selector: () => ':host([timer-inside=\"true\"]) .timer' },\n nestedButton: {\n selector: () => ':host([timer-inside=\"true\"]) .button',\n },\n timerInsideNotReversed: {\n selector: () =>\n ':host([timer-inside=\"true\"]:not([timer-position=\"end\"])) .timer',\n },\n timerInsideReversed: {\n selector: () => ':host([timer-inside=\"true\"][timer-position=\"end\"]) .timer',\n },\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 timerTextColor: {\n ...nestedTimer,\n property: TimerClass.cssVarList.textColor,\n },\n timerIconColor: {\n ...nestedTimer,\n property: TimerClass.cssVarList.iconColor,\n },\n timerHostWidth: {\n ...nestedTimer,\n property: TimerClass.cssVarList.hostWidth,\n },\n buttonLabelSpacing: {\n ...nestedButton,\n property: ButtonClass.cssVarList.labelSpacing,\n },\n timerInsideGapEnd: {\n ...timerInsideNotReversed,\n property: 'margin-inline-end',\n },\n timerInsideGapStart: {\n ...timerInsideReversed,\n property: 'margin-inline-start',\n },\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","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","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 { componentName, TimerClass } from './TimerClass';\nimport '@descope-ui/descope-icon';\n\ncustomElements.define(componentName, TimerClass);\n\nexport { TimerClass, componentName };\n"],"names":["module","exports","componentName","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_1__","xE","host","label","slottedIcon","selector","loadingIndicatorStyles","ButtonClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_0__","Zz","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_2__","DM","triggers","attr","value","RF","mappings","hostWidth","property","hostMaxWidth","hostHeight","hostDirection","fontSize","fontFamily","fontWeight","cursor","backgroundColor","outlineOffset","outlineColor","outlineStyle","outlineWidth","borderRadius","borderColor","borderStyle","borderWidth","verticalPadding","horizontalPadding","fallback","labelTextColor","iconColor","_descope_ui_descope_icon_class__WEBPACK_IMPORTED_MODULE_3__","S","cssVarList","fill","labelTextDecoration","labelSpacing","textAlign","iconSize","_clickableMixin__WEBPACK_IMPORTED_MODULE_4__","G","VO","tQ","tz","slots","wrappedEleName","style","excludeAttrsSync","color","clickableMixin","superclass","isLoading","this","getAttribute","click","super","customElements","define","_ButtonClass__WEBPACK_IMPORTED_MODULE_0__","T","J","IconClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_3__","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","_descope_ui_descope_image_class__WEBPACK_IMPORTED_MODULE_2__","q","height","width","_IconClass__WEBPACK_IMPORTED_MODULE_1__","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_3__","srcAttrs","RawImage","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_1__","qu","baseSelector","observedAttributes","constructor","attachShadow","mode","innerHTML","fz","init","toggleVisibility","getSrc","onThemeChange","renderImage","isVisible","classList","remove","add","altText","legacySrc","themeSrc","currentThemeName","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","ImageClass","_helpers__WEBPACK_IMPORTED_MODULE_4__","m","then","res","appendChild","shouldRender","src","srcVal","attributeChangedCallback","attrName","oldValue","newValue","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_2__","createSvgEle","text","clean","dompurify__WEBPACK_IMPORTED_MODULE_0__","A","sanitize","USE_PROFILES","svg","svgFilters","ADD_TAGS","FORBID_TAGS","DOMParser","parseFromString","querySelector","createImage","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","document","createElement","createImgEle","setProperty","_ImageClass__WEBPACK_IMPORTED_MODULE_0__","componentsHelpers","buttonAttrs","mapButtonAttrs","timerAttrs","mapTimerAttrs","BaseClass","baseClasses","nestedTimer","nestedButton","timerInsideNotReversed","timerInsideReversed","TimerButtonClass","utils","componentsMixins","gap","flexDirection","timerTextColor","TimerClass","textColor","timerIconColor","timerHostWidth","buttonLabelSpacing","timerInsideGapEnd","timerInsideGapStart","wrapper","shadowRoot","timer","button","forwardingSlot","addEventListener","onTimerStarted","onTimerEnded","syncTimerPlacement","onClick","bind","name","isTimerInside","isReversed","placeTimerInsideButton","placeTimerOutsideButton","reversed","previousSibling","nextSibling","insertBefore","parentElement","onclick","val","EA","includeAttrs","mapAttrs","toggleButtonDisable","reset","isDisabled","setTimeout","removeAttribute","icon","minHeight","lineHeight","_descope_ui_descope_icon_class__WEBPACK_IMPORTED_MODULE_5__","timeRemains","intervalId","concat","_clock_svg__WEBPACK_IMPORTED_MODULE_4___default","seconds","secs","parseInt","Math","max","isPaused","startInterval","setInterval","decreaseInterval","stop","updateDisplay","stopInterval","clearInterval","dispatchEvent","CustomEvent","bubbles","pause","resume","textContent","_helpers__WEBPACK_IMPORTED_MODULE_6__","f","toggleIcon","toggle","handlePause","paused","fmt","pad","String","padStart","formatTime","ms","totalSeconds","floor","hours","secondsInMinute","minutes","join","_TimerClass__WEBPACK_IMPORTED_MODULE_0__"],"sourceRoot":""}
1
+ {"version":3,"file":"descope-timer-button.js","mappings":"mIAAAA,EAAAC,QAAA,o/BCYO,MAAAC,GAAsB,EAAAC,EAAAC,IAAgB,WAsC7CC,KAAQA,EAAAC,MAAAA,EAAAC,YAAAA,GAA2B,CACnCF,KAAA,CAAUG,SAAA,aACVF,MAAA,CAAWE,SAAA,iBACXD,YAAA,CAAiBC,SAAA,gCAGjB,IAAAC,EAEO,MAAAC,GAAoB,EAAAC,EAAAC,KACzB,EAAAC,EAAAC,IAAY,CAAGC,SAAA,EAAaC,KAAA,aAAAC,MAAA,Y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HCXA7L,eAAAC,OAAsB6L,EAAA3L,EAAe2L,EAAAhI","sources":["webpack://@descope/web-components-ui/../components/descope-timer/src/component/clock.svg","webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-timer-button/src/component/TimerButtonClass.js","webpack://@descope/web-components-ui/../components/descope-timer-button/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/TimerClass.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/index.js"],"sourcesContent":["module.exports = \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMWVtIiBoZWlnaHQ9IjFlbSIgdmlld0JveD0iMCAwIDEwNCAxMDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+IDxwYXRoIGQ9Ik01MC4zMzM0IDAuMzMzMjUyQzIyLjgzMzQgMC4zMzMyNTIgMC4zMzMzNzQgMjIuODMzMyAwLjMzMzM3NCA1MC4zMzMzQzAuMzMzMzc0IDc3LjgzMzMgMjIuODMzNCAxMDAuMzMzIDUwLjMzMzQgMTAwLjMzM0M3Ny44MzM0IDEwMC4zMzMgMTAwLjMzMyA3Ny44MzMzIDEwMC4zMzMgNTAuMzMzM0MxMDAuMzMzIDIyLjgzMzMgNzcuODMzNCAwLjMzMzI1MiA1MC4zMzM0IDAuMzMzMjUyWk01MC4zMzM0IDg3LjgzMzNDMjkuNzA4NCA4Ny44MzMzIDEyLjgzMzQgNzAuOTU4MyAxMi44MzM0IDUwLjMzMzNDMTIuODMzNCAyOS43MDgzIDI5LjcwODQgMTIuODMzMyA1MC4zMzM0IDEyLjgzMzNDNzAuOTU4NCAxMi44MzMzIDg3LjgzMzQgMjkuNzA4MyA4Ny44MzM0IDUwLjMzMzNDODcuODMzNCA3MC45NTgzIDcwLjk1ODQgODcuODMzMyA1MC4zMzM0IDg3LjgzMzNaIiBmaWxsPSIjMTgxQTFDIi8+IDxwYXRoIGQ9Ik01MC4zMzI4IDE5LjA4MzNINDQuMDgyOFY1Ni41ODMySDc1LjMzMjhWNTAuMzMzMkg1MC4zMzI4VjE5LjA4MzNaIiBmaWxsPSIjMTgxQTFDIi8+IDwvc3ZnPiA=\"","import { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { clickableMixin } from './clickableMixin';\n\nexport const componentName = getComponentName('button');\n\nconst resetStyles = `\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n`;\n\nconst iconStyles = `\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n`;\n\nconst editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;\n\nconst { host, label, slottedIcon } = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n slottedIcon: { selector: () => '::slotted(descope-icon)' },\n};\n\nlet loadingIndicatorStyles;\n\nexport const ButtonClass = compose(\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostMaxWidth: { ...host, property: 'max-width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n\n cursor: {},\n backgroundColor: {},\n\n outlineOffset: {},\n outlineColor: {},\n outlineStyle: {},\n outlineWidth: {},\n\n borderRadius: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n\n verticalPadding: [\n { property: 'padding-top' },\n { property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { property: 'padding-right', fallback: '0.875em' },\n { property: 'padding-left', fallback: '0.875em' },\n ],\n\n labelTextColor: { property: 'color' },\n iconColor: {\n selector: () => `::slotted(*)`,\n property: IconClass.cssVarList.fill,\n },\n labelTextDecoration: { ...label, property: 'text-decoration' },\n labelSpacing: { ...label, property: 'gap' },\n textAlign: { ...label, property: 'justify-content', fallback: 'center' },\n\n iconSize: [\n { ...slottedIcon, property: 'width' },\n { ...slottedIcon, property: 'height' },\n ],\n },\n }),\n clickableMixin,\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: ['', 'prefix', 'label', 'suffix'],\n wrappedEleName: 'vaadin-button',\n style: () => `\n\t\t\t${resetStyles}\n\t\t\t${iconStyles}\n\t\t\t${loadingIndicatorStyles}\n\t\t\t${editorOverrides}\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${ButtonClass.cssVarList.outlineWidth}) + var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width=\"true\"]) {\n width: var(${ButtonClass.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${ButtonClass.cssVarList.hostHeight}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square=\"true\"]:not([full-width=\"true\"]) {\n\t\t\t\twidth: calc(var(${ButtonClass.cssVarList.hostWidth}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['tabindex', 'class', 'style', 'role'],\n componentName,\n }),\n);\n\nconst { color, fontSize } = ButtonClass.cssVarList;\nloadingIndicatorStyles = `\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading=\"true\"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${color});\n\t\ttop: calc(50% - (var(${fontSize}) / 2));\n\t\tleft: calc(50% - (var(${fontSize}) / 2));\n\t\tborder-width: calc(var(${fontSize}) / 10);\n\t\twidth: var(${fontSize});\n\t\theight: var(${fontSize});\n\t}\n\t:host([disabled=\"true\"]),\n\t:host([loading=\"true\"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading=\"true\"]) ::part(prefix),\n\t:host([loading=\"true\"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`;\n","export const clickableMixin = (superclass) =>\n class ClickableMixinClass extends superclass {\n get isLoading() {\n return this.getAttribute('loading') === 'true';\n }\n\n click() {\n this.isLoading || super.click();\n }\n };\n","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","import {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { ImageClass } from '@descope-ui/descope-image/class';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('icon');\n\nexport const IconClass = compose(\n createStyleMixin({\n mappings: {\n fill: [{}, { property: ImageClass.cssVarList.fill }],\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class', 'style', 'st-height', 'st-width'],\n componentName,\n }),\n);\n","import '@descope-ui/descope-image';\n\nimport { componentName, IconClass } from './IconClass';\n\ncustomElements.define(componentName, IconClass);\n\nexport { IconClass, componentName };\n"," \nimport {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { createImage } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('image');\n\nconst srcAttrs = ['src', 'src-dark'];\n\nclass RawImage extends createBaseClass({\n componentName,\n baseSelector: 'slot',\n}) {\n static get observedAttributes() {\n return srcAttrs;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<slot></slot>\n\t`;\n\n injectStyle(\n `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n `,\n this,\n );\n }\n\n init() {\n super.init?.();\n this.toggleVisibility(this.getSrc);\n }\n\n onThemeChange() {\n this.renderImage();\n }\n\n toggleVisibility(isVisible) {\n if (isVisible) {\n this.classList.remove('hidden');\n } else {\n this.classList.add('hidden');\n }\n }\n\n get altText() {\n return this.getAttribute('alt') || '';\n }\n\n get legacySrc() {\n return this.getAttribute('src');\n }\n\n get themeSrc() {\n return this.getAttribute(`src-${this.currentThemeName}`);\n }\n\n get getSrc() {\n return this.themeSrc || this.legacySrc;\n }\n\n // in order to fill an SVG with `currentColor` override all of its `fill` and `path` nodes\n // with the value from the `st-fill` attribute\n \n updateFillColor(node) {\n // set fill to root node and all its relevant selectors\n const elementsToReplace = [node, ...node.querySelectorAll('*[fill]')];\n\n elementsToReplace.forEach((ele) => {\n ele.setAttribute(\n 'fill',\n `var(${ImageClass.cssVarList.fill}, ${ele.getAttribute('fill') || \"''\"})`,\n );\n });\n }\n\n renderImage() {\n this.toggleVisibility(this.getSrc);\n\n createImage(this.getSrc, this.altText).then((res) => {\n this.innerHTML = '';\n if (res) {\n this.updateFillColor(res);\n this.appendChild(res);\n }\n });\n }\n\n // render only when src attribute matches current theme\n shouldRender(src) {\n const srcVal = this.getAttribute(src);\n return this.getSrc === srcVal;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue === newValue) return;\n\n if (this.shouldRender(attrName)) {\n this.renderImage();\n }\n }\n}\n\nexport const ImageClass = compose(\n createStyleMixin({\n mappings: {\n fill: {},\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawImage);\n","import DOMPurify from 'dompurify';\n\nconst getFileExtension = (path) => {\n const match = path.match(/\\.([0-9a-z]+)(?:[\\\\?#]|$)/i);\n return match ? match[1] : null;\n};\n\nconst base64Prefix = 'data:image/svg+xml;base64,';\n\nconst isBase64Svg = (src) => src.startsWith(base64Prefix);\n\nconst createImgEle = (src, altText) => {\n const ele = document.createElement('img');\n ele.setAttribute('src', src);\n ele.setAttribute('alt', altText);\n return ele;\n};\n\nconst createSvgEle = (text) => {\n // we want to purify the SVG to avoid XSS attacks\n const clean = DOMPurify.sanitize(text, {\n USE_PROFILES: { svg: true, svgFilters: true },\n // allow image to render\n ADD_TAGS: ['image'],\n // forbid interactiviy via `use` tags (which are sanitized by default)\n FORBID_TAGS: ['defs']\n });\n\n const parser = new DOMParser();\n const ele = parser\n .parseFromString(clean, 'image/svg+xml')\n .querySelector('svg');\n return ele;\n};\n\nexport const createImage = async (src, altText) => {\n try {\n let ele;\n if (isBase64Svg(src)) {\n // handle base64 source\n const svgXml = atob(src.slice(base64Prefix.length));\n ele = createSvgEle(svgXml);\n } else if (getFileExtension(src) === 'svg') {\n // handle urls\n const fetchedSrc = await fetch(src);\n const text = await fetchedSrc.text();\n ele = createSvgEle(text);\n } else {\n // handle binary\n ele = createImgEle(src, altText);\n }\n\n ele.style.setProperty('max-width', '100%');\n ele.style.setProperty('max-height', '100%');\n\n return ele;\n } catch {\n return null;\n }\n};\n","import { componentName, ImageClass } from './ImageClass';\n\ncustomElements.define(componentName, ImageClass);\n\nexport { ImageClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} 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';\nimport { TimerClass } from '@descope-ui/descope-timer/class';\nimport { ButtonClass } from '@descope-ui/descope-button/class';\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 align-items: center;\n width: 100%;\n }\n /* allow timer to grow along the main axis in the wrapper flex container */\n :host(:not([timer-inside=\"true\"])) .timer {\n flex: 1;\n }\n :host([timer-inside=\"true\"]) .timer {\n flex: 0 0 auto;\n }\n `,\n this,\n );\n\n this.wrapper = this.shadowRoot.querySelector('.wrapper');\n this.timer = this.shadowRoot.querySelector('.timer');\n this.button = this.shadowRoot.querySelector('.button');\n this.forwardingSlot = this.shadowRoot.querySelector('.button slot');\n\n this.timer.addEventListener('timer-started', () => this.onTimerStarted());\n this.timer.addEventListener('timer-ended', () => this.onTimerEnded());\n\n this.syncTimerPlacement();\n\n this.button.addEventListener('click', this.onClick.bind(this));\n }\n\n static get observedAttributes() {\n return [\n ...(super.observedAttributes || []),\n 'timer-inside',\n 'timer-position',\n ];\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback?.(name, oldValue, newValue);\n if (name === 'timer-inside' || name === 'timer-position') {\n this.syncTimerPlacement();\n }\n }\n\n get #isTimerInside() {\n return this.getAttribute('timer-inside') === 'true';\n }\n\n get #isReversed() {\n return this.getAttribute('timer-position') === 'end';\n }\n\n syncTimerPlacement() {\n if (this.#isTimerInside) {\n this.#placeTimerInsideButton(this.#isReversed);\n } else {\n this.#placeTimerOutsideButton();\n }\n }\n\n #placeTimerInsideButton(reversed) {\n if (reversed) {\n // timer after label text (right)\n if (this.timer.previousSibling !== this.forwardingSlot) {\n this.button.appendChild(this.timer);\n }\n } else {\n // timer before label text (left) — matches default outside position (above/before button)\n if (this.timer.nextSibling !== this.forwardingSlot) {\n this.button.insertBefore(this.timer, this.forwardingSlot);\n }\n }\n }\n\n #placeTimerOutsideButton() {\n // move timer back as a wrapper sibling, before the button so flex-column puts it above\n if (this.timer.parentElement !== this.wrapper) {\n this.wrapper.insertBefore(this.timer, this.button);\n }\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 {\n host,\n nestedTimer,\n nestedButton,\n timerInsideNotReversed,\n timerInsideReversed,\n} = {\n host: { selector: () => ':host' },\n nestedTimer: { selector: () => ':host([timer-inside=\"true\"]) .timer' },\n nestedButton: {\n selector: () => ':host([timer-inside=\"true\"]) .button',\n },\n timerInsideNotReversed: {\n selector: () =>\n ':host([timer-inside=\"true\"]:not([timer-position=\"end\"])) .timer',\n },\n timerInsideReversed: {\n selector: () => ':host([timer-inside=\"true\"][timer-position=\"end\"]) .timer',\n },\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 timerTextColor: {\n ...nestedTimer,\n property: TimerClass.cssVarList.textColor,\n },\n timerIconColor: {\n ...nestedTimer,\n property: TimerClass.cssVarList.iconColor,\n },\n timerHostWidth: {\n ...nestedTimer,\n property: TimerClass.cssVarList.hostWidth,\n },\n buttonLabelSpacing: {\n ...nestedButton,\n property: ButtonClass.cssVarList.labelSpacing,\n },\n timerInsideGapEnd: {\n ...timerInsideNotReversed,\n property: 'margin-inline-end',\n },\n timerInsideGapStart: {\n ...timerInsideReversed,\n property: 'margin-inline-start',\n },\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","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","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 { componentName, TimerClass } from './TimerClass';\nimport '@descope-ui/descope-icon';\n\ncustomElements.define(componentName, TimerClass);\n\nexport { TimerClass, componentName };\n"],"names":["module","exports","componentName","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_1__","xE","host","label","slottedIcon","selector","loadingIndicatorStyles","ButtonClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_0__","Zz","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_2__","DM","triggers","attr","value","RF","mappings","hostWidth","property","hostMaxWidth","hostHeight","hostDirection","fontSize","fontFamily","fontWeight","cursor","backgroundColor","outlineOffset","outlineColor","outlineStyle","outlineWidth","borderRadius","borderColor","borderStyle","borderWidth","verticalPadding","horizontalPadding","fallback","labelTextColor","iconColor","_descope_ui_descope_icon_class__WEBPACK_IMPORTED_MODULE_3__","S","cssVarList","fill","labelTextDecoration","labelSpacing","textAlign","iconSize","_clickableMixin__WEBPACK_IMPORTED_MODULE_4__","G","VO","tQ","tz","slots","wrappedEleName","style","excludeAttrsSync","color","clickableMixin","superclass","isLoading","this","getAttribute","click","super","customElements","define","_ButtonClass__WEBPACK_IMPORTED_MODULE_0__","T","J","IconClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_3__","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","_descope_ui_descope_image_class__WEBPACK_IMPORTED_MODULE_2__","q","height","width","_IconClass__WEBPACK_IMPORTED_MODULE_1__","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_3__","srcAttrs","RawImage","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_1__","qu","baseSelector","observedAttributes","constructor","attachShadow","mode","innerHTML","fz","init","toggleVisibility","getSrc","onThemeChange","renderImage","isVisible","classList","remove","add","altText","legacySrc","themeSrc","currentThemeName","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","ImageClass","_helpers__WEBPACK_IMPORTED_MODULE_4__","m","then","res","appendChild","shouldRender","src","srcVal","attributeChangedCallback","attrName","oldValue","newValue","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_2__","createSvgEle","text","clean","dompurify__WEBPACK_IMPORTED_MODULE_0__","A","sanitize","USE_PROFILES","svg","svgFilters","ADD_TAGS","FORBID_TAGS","DOMParser","parseFromString","querySelector","createImage","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","document","createElement","createImgEle","setProperty","_ImageClass__WEBPACK_IMPORTED_MODULE_0__","componentsHelpers","buttonAttrs","mapButtonAttrs","timerAttrs","mapTimerAttrs","BaseClass","baseClasses","nestedTimer","nestedButton","timerInsideNotReversed","timerInsideReversed","TimerButtonClass","utils","componentsMixins","gap","flexDirection","timerTextColor","TimerClass","textColor","timerIconColor","timerHostWidth","buttonLabelSpacing","timerInsideGapEnd","timerInsideGapStart","wrapper","shadowRoot","timer","button","forwardingSlot","addEventListener","onTimerStarted","onTimerEnded","syncTimerPlacement","onClick","bind","name","isTimerInside","isReversed","placeTimerInsideButton","placeTimerOutsideButton","reversed","previousSibling","nextSibling","insertBefore","parentElement","onclick","val","EA","includeAttrs","mapAttrs","toggleButtonDisable","reset","isDisabled","setTimeout","removeAttribute","icon","minHeight","lineHeight","_descope_ui_descope_icon_class__WEBPACK_IMPORTED_MODULE_5__","timeRemains","intervalId","concat","_clock_svg__WEBPACK_IMPORTED_MODULE_4___default","seconds","secs","parseInt","Math","max","isPaused","startInterval","setInterval","decreaseInterval","stop","updateDisplay","stopInterval","clearInterval","dispatchEvent","CustomEvent","bubbles","pause","resume","textContent","_helpers__WEBPACK_IMPORTED_MODULE_6__","f","toggleIcon","toggle","handlePause","paused","fmt","pad","String","padStart","formatTime","ms","totalSeconds","floor","hours","secondsInMinute","minutes","join","_TimerClass__WEBPACK_IMPORTED_MODULE_0__"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[628,2294,3267,4159,9261],{13094(t,e,o){o.r(e),o.d(e,{AnchoredClass:()=>h,componentName:()=>a});var n=o(88961),r=o(72270),s=o(25964),i=o(63200);const a=(0,s.xE)("anchored");class l extends((0,r.qu)({componentName:a,baseSelector:".anchored-root"})){#t=null;#e=null;#o=null;#n=null;get#r(){return this.defaultSlot.assignedElements({flatten:!0})[0]}get#s(){return this.shadowRoot.querySelector('slot[name="anchored"]')?.assignedElements()[0]}get#i(){return this.getRootNode().host}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="anchored-root" part="root">\n <slot></slot>\n <div class="anchored-host" part="anchored">\n <slot name="anchored"></slot>\n </div>\n </div>\n ',this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])")}init(){super.init?.(),(0,s.fz)("\n :host {\n display: inline-flex;\n position: relative;\n box-sizing: border-box;\n }\n\n :host(:not([has-anchor])) {\n display: none;\n }\n\n .anchored-root {\n position: relative;\n display: flex;\n width: 100%;\n min-width: 0;\n }\n\n /* Make anchor fill the flex row and allow it to shrink. */\n ::slotted(*:not([slot])) {\n flex-grow: 1; /* fill the flex row */\n flex-shrink: 1; /* compress when constrained */\n flex-basis: auto; /* start from the anchor's natural size */\n min-width: 0; /* flex items won't shrink below content size without this */\n }\n\n /* Anchored container covers the anchor but is invisible to pointer events. */\n .anchored-host {\n position: absolute;\n inset: 0;\n pointer-events: none;\n }\n\n /* Restore interactivity for actual anchored content. */\n ::slotted([slot=\"anchored\"]) {\n pointer-events: auto;\n }\n ",this),this.#a(),this.defaultSlot.addEventListener("slotchange",()=>this.#l()),this.#l()}#h(){const t=this.#r?.classList?.contains("hidden");this.classList.toggle("hidden",t)}#l(){this.#c(),this.#t=this.#d(this.#t,this.#i,"stretch"),this.#e=this.#d(this.#e,this.#s,"st-host-direction"),this.#p()}#p(){this.#n?.disconnect(),this.#r&&(this.#n=(0,s.mx)(this.#r,()=>this.#h(),{includeAttrs:["class"]}))}connectedCallback(){super.connectedCallback?.(),this.#p(),this.#h()}#a(){const t="\n descope-anchored {\n width: 100%; /* fill the outer host so the anchored element spans the full anchor width */\n }\n :host([stretch]) {\n display: inline-flex; /* switch from inline-block so internal children are flex items */\n width: 100%; /* fill non-flex parents */\n flex-grow: 1; /* absorb extra space in flex parents */\n flex-shrink: 0; /* hold full width — shrink:1 would let siblings squeeze it below 100% */\n flex-basis: auto; /* defer to width:100% on the main axis; avoids forcing 100% height in column-flex parents */\n min-width: 0; /* prevent overflow when the outer host is itself inside a constrained flex row */\n }\n ";this.#o?this.#o.replaceSync(t):this.#i&&(this.#o=(0,s.fz)(t,this.#i))}#d(t,e,o){return t?.disconnect(),e?.removeAttribute(o),this.#r&&e?(0,s.EA)(this.#r,e,{includeAttrs:[o]}):null}disconnectedCallback(){super.disconnectedCallback?.(),this.#t?.disconnect(),this.#e?.disconnect(),this.#n?.disconnect()}#c(){this.toggleAttribute("has-anchor",!!this.#r),this.#h()}}const h=(0,i.Zz)(n.tQ)(l);customElements.define(a,h)},76231(t,e,o){o.d(e,{T:()=>c,m:()=>p});var n=o(92540),r=o(88961),s=o(63200),i=o(36976),a=o(72270),l=o(54847),h=o(25964);const c=(0,h.xE)("enriched-text");class d extends((0,a.qu)({componentName:c,baseSelector:":host > div"})){#u;#m;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.#y(),(0,h.Ge)(this,this.#b.bind(this)),this.contentNode?.addEventListener("click",t=>{t.target instanceof HTMLAnchorElement&&t.stopPropagation()}),this.contentNode?.addEventListener("keydown",t=>{"Enter"===t.key&&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.#y())}customUnderlineRenderer(){this.processor.renderer.rules.em_open=(t,e,o,n,r)=>("_"===t[e].markup&&(t[e].tag="u"),this.#m(t,e,o,n,r)),this.processor.renderer.rules.em_close=(t,e,o,n,r)=>("_"===t[e].markup&&(t[e].tag="u"),this.#m(t,e,o,n,r))}#v(){this.linkTargetBlank?this.processor.renderer.rules.link_open=(t,e,o,n,r)=>(t[e].attrSet("target","_blank"),this.#u(t,e,o,n,r)):this.processor.renderer.rules.link_open=this.#u}#g(){this.processor&&this.processor.disable(i.M)}#f(){this.#g()}#x(){this.#u=this.processor.renderer.rules.link_open||((t,e,o,n,r)=>r.renderToken(t,e,o)),this.#m=this.processor.renderer.rules.em_open||((t,e,o,n,r)=>r.renderToken(t,e,o))}#y(){this.processor=new n.A("commonmark",{html:!0}),this.#x(),this.#f(),this.#v(),this.customUnderlineRenderer()}get linkTargetBlank(){return"true"===this.getAttribute("link-target-blank")}get contentNode(){return this.shadowRoot.querySelector(".content")}#b(){if(!this.processor)return;let t=(0,l.G)(this.innerHTML);!t?.trim()&&this.isConnected?this.setAttribute("empty","true"):this.removeAttribute("empty");try{const e=this.processor.parse(t,{references:void 0});t=this.processor.renderer.render(e,{html:!0,breaks:!0})}catch{console.warn("Not parsing invalid markdown token")}this.contentNode.innerHTML=t,this.contentNode.firstChild?.setAttribute("part","content")}onReadOnlyChange(t){t?this.contentNode.setAttribute("inert",t):this.contentNode.removeAttribute("inert")}}const p=(0,s.Zz)((0,r.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDisplay:{selector:()=>":host",property:"display",fallback:"inline-block"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},fontWeightBold:[{selector:()=>":host strong",property:"font-weight"},{selector:()=>":host b",property:"font-weight"}],textColor:{property:"color"},textLineHeight:{property:"line-height"},textAlign:{},linkColor:{selector:"a",property:"color"},linkTextDecoration:{selector:"a",property:"text-decoration"},linkHoverTextDecoration:{selector:"a:hover",property:"text-decoration"},minHeight:{},minWidth:{}}}),(0,r.RF)({componentNameOverride:(0,h.xE)("link")}),(0,r.RF)({componentNameOverride:(0,h.xE)("text")}),(0,r.DM)({triggers:[{attr:"full-width",value:"true"}]}),r.VO,r.tQ)(d)},36976(t,e,o){o.d(e,{M:()=>n});const n=["blockquote","list","image","table","code","hr","backticks","fence","reference","heading","lheading","html_block"]},54847(t,e,o){o.d(e,{G:()=>n});const n=t=>{const e=document.createElement("textarea");return e.innerHTML=t,e.value}},55838(t,e,o){o.r(e),o.d(e,{EnrichedTextClass:()=>n.m,componentName:()=>n.T}),o(90512);var n=o(76231);customElements.define(n.T,n.m)},75464(t,e,o){o.d(e,{J:()=>v,T:()=>l});var n=o(88961),r=o(63200),s=o(25964),i=o(72270),a=o(66434);const l=(0,s.xE)("link"),h=["href","readonly"];class c extends((0,i.qu)({componentName:l,baseSelector:":host a"})){static get observedAttributes(){return h.concat(super.observedAttributes||[])}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t<div>\n\t\t\t<descope-text part="wrapper">\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t',(0,s.fz)('\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n\n :host([ellipsis="true"]) descope-text {\n display: inline-flex;\n }\n :host([ellipsis="true"]) descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ',this),this.anchor=this.shadowRoot.querySelector("a"),(0,s.EA)(this,this.anchor,{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),(0,s.EA)(this,this.shadowRoot.querySelector("descope-text"),{includeAttrs:["mode","variant"]}),this.anchor.addEventListener("click",t=>{this.readOnly&&t.preventDefault()})}get readOnly(){return"true"===this.getAttribute("readonly")}}const d={host:{selector:()=>":host"},link:{selector:()=>":host a"},anchor:{},wrapper:{selector:()=>":host > div"},text:{selector:()=>a.s.componentName}},{anchor:p,text:u,host:m,wrapper:y,link:b}=d,v=(0,r.Zz)((0,n.RF)({mappings:{hostWidth:{...m,property:"width"},hostDirection:{...u,property:"direction"},textAlign:y,textDecoration:{...b,property:"text-decoration",fallback:"none"},textColor:[{...p,property:"color"},{...u,property:a.s.cssVarList.textColor}],cursor:p}}),(0,n.DM)({triggers:[{attr:"full-width",value:"true"}]}),n.VO,n.tQ)(c)},90512(t,e,o){o.r(e),o.d(e,{LinkClass:()=>n.J,componentName:()=>n.T});var n=o(75464);o(63595),customElements.define(n.T,n.J)},66434(t,e,o){o.d(e,{T:()=>a,s:()=>c});var n=o(88961),r=o(63200),s=o(25964),i=o(72270);const a=(0,s.xE)("text");class l extends((0,i.qu)({componentName:a,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,s.fz)("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,s.Ge)(this,()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""})}}const{host:h}={host:{selector:()=>":host"}},c=(0,r.Zz)((0,n.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:{}}}),(0,n.DM)({triggers:[{attr:"full-width",value:"true"}]}),n.VO,n.tQ)(l)},63595(t,e,o){o.r(e),o.d(e,{TextClass:()=>n.s,componentName:()=>n.T});var n=o(66434);customElements.define(n.T,n.s)},54240(t,e,o){o.r(e),o.d(e,{TooltipClass:()=>u,componentName:()=>l}),o(13094),o(55838),o(57760);var n=o(88961),r=o(63200),s=o(25964),i=o(72270),a=o(76231);const l=(0,s.xE)("tooltip"),h=["text","position","hide-delay","hover-delay","opened"];class c extends((0,i.qu)({componentName:l,baseSelector:"vaadin-tooltip"})){#k=null;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <descope-anchored>\n <slot></slot>\n <vaadin-tooltip slot="anchored"></vaadin-tooltip>\n </descope-anchored>\n ',this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.tooltip=this.shadowRoot.querySelector("vaadin-tooltip"),this.anchored=this.shadowRoot.querySelector("descope-anchored")}#h(){const t=this.anchored?.classList?.contains("hidden");this.classList.toggle("hidden",t)}static get observedAttributes(){return h.concat(super.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()||""}get isStaticDisplay(){return"true"===this.getAttribute("static-display")}get srLabel(){return this.tooltip?.querySelector('[slot="sr-label"]')}#C(){this.isStaticDisplay?(this.#w(),this.setAttribute("inert","true")):this.removeAttribute("inert")}#w(){this.overlay&&(this.overlay.style.display="block",this.overlay.style.position="static")}init(){super.init?.(),(0,s.fz)('\n :host {\n display: inline-block;\n }\n vaadin-tooltip {\n display: block;\n position: absolute;\n width: 0;\n height: 0;\n overflow: hidden;\n }\n /* Stack anchor above the anchored element so the tooltip flows below it inline. */\n :host([static-display="true"]) descope-anchored::part(root) {\n flex-direction: column;\n }\n :host([static-display="true"]) descope-anchored::part(anchored) {\n position: static;\n inset: unset;\n }\n :host([static-display="true"]) vaadin-tooltip {\n position: static;\n width: auto;\n height: auto;\n overflow: visible;\n }\n :host([static-display="true"]) vaadin-tooltip [slot="sr-label"] {\n display: none;\n }\n',this),this.defaultSlot.addEventListener("slotchange",()=>this.#S()),this.#S(),setTimeout(()=>this.#A())}#T(){this.#k?.disconnect(),this.anchored&&(this.#k=(0,s.mx)(this.anchored,()=>this.#h(),{includeAttrs:["class"]}))}connectedCallback(){super.connectedCallback?.(),this.#h(),this.#T()}disconnectedCallback(){super.disconnectedCallback?.(),this.#k?.disconnect()}#S(){const t=this.defaultSlot?.assignedElements()?.[0];t&&(this.tooltip.target=t)}#A(){this.#O(),this.#L(),(0,s.EA)(this,this.tooltip,{includeAttrs:["position","opened"]}),this.#R()}#E(){this.overlayContentNode.innerHTML=""}#N(){const t=document.createElement("descope-enriched-text");return t.setAttribute("link-target-blank","true"),t.textContent=this.tooltipText,t}#O(){this.overlayContentNode&&setTimeout(()=>{this.#E(),this.textComponent=this.#N(),this.overlayContentNode.appendChild(this.textComponent),this.srLabel&&!this.tooltipText&&this.srLabel.setAttribute("aria-hidden","true"),(0,s.EA)(this,this.textComponent,{includeAttrs:["readonly"]})})}#L(){if(!this.overlay)return;const t=this.overlay._attachOverlay?.bind(this.overlay);this.overlay._detachOverlay=()=>{},this.overlay._attachOverlay=()=>{t?.(),setTimeout(()=>{this.tooltip.shadowRoot.appendChild(this.overlay),this.overlay._updatePosition?.()})},this.isOpened&&setTimeout(()=>{this.tooltip.shadowRoot.appendChild(this.overlay),this.#C(),this.overlay._updatePosition?.()})}#R(){this.tooltip?.toggleAttribute("manual",this.isOpened)}#_(t){if(!this.textComponent)return;const e=(t??"").trim();this.textComponent.textContent=e,this.srLabel&&(e?this.srLabel.removeAttribute("aria-hidden"):this.srLabel.setAttribute("aria-hidden","true"))}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),e!==o&&("text"===t&&this.#_(o),"opened"===t&&this.#R())}}const{overlay:d,content:p}={overlay:{selector:()=>"vaadin-tooltip-overlay::part(overlay)"},content:{selector:()=>"vaadin-tooltip-overlay::part(content)"}},u=(0,r.Zz)(n.tQ,(0,n.mA)({selector:"",mappings:{fontFamily:{...p,property:a.m.cssVarList.fontFamilyOverride},fontSize:{...p,property:a.m.cssVarList.fontSizeOverride},fontWeight:{...p,property:a.m.cssVarList.fontWeightOverride},textColor:{...p,property:a.m.cssVarList.textColorOverride},hostDirection:{...p,property:a.m.cssVarList.hostDirectionOverride},backgroundColor:[{...d},{...p}],borderColor:{...d},borderStyle:{...d},borderWidth:{...d},borderRadius:{...d},boxShadow:{...d},horizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"}],verticalPadding:[{...p,property:"padding-top"},{...p,property:"padding-bottom"}]},forward:{attributes:["style"],include:!1}}))(c);customElements.define(l,u)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[628,2294,3267,4159,9261],{13094(t,e,o){o.r(e),o.d(e,{AnchoredClass:()=>h,componentName:()=>a});var n=o(88961),r=o(72270),s=o(25964),i=o(63200);const a=(0,s.xE)("anchored");class l extends((0,r.qu)({componentName:a,baseSelector:".anchored-root"})){#t=null;#e=null;#o=null;#n=null;get#r(){return this.defaultSlot.assignedElements({flatten:!0})[0]}get#s(){return this.shadowRoot.querySelector('slot[name="anchored"]')?.assignedElements()[0]}get#i(){return this.getRootNode().host}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="anchored-root" part="root">\n <slot></slot>\n <div class="anchored-host" part="anchored">\n <slot name="anchored"></slot>\n </div>\n </div>\n ',this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])")}init(){super.init?.(),(0,s.fz)("\n :host {\n display: inline-flex;\n position: relative;\n box-sizing: border-box;\n }\n\n :host(:not([has-anchor])) {\n display: none;\n }\n\n .anchored-root {\n position: relative;\n display: flex;\n width: 100%;\n min-width: 0;\n }\n\n /* Make anchor fill the flex row and allow it to shrink. */\n ::slotted(*:not([slot])) {\n flex-grow: 1; /* fill the flex row */\n flex-shrink: 1; /* compress when constrained */\n flex-basis: auto; /* start from the anchor's natural size */\n min-width: 0; /* flex items won't shrink below content size without this */\n }\n\n /* Anchored container covers the anchor but is invisible to pointer events. */\n .anchored-host {\n position: absolute;\n inset: 0;\n pointer-events: none;\n }\n\n /* Restore interactivity for actual anchored content. */\n ::slotted([slot=\"anchored\"]) {\n pointer-events: auto;\n }\n ",this),this.#a(),this.defaultSlot.addEventListener("slotchange",()=>this.#l()),this.#l()}#h(){const t=this.#r?.classList?.contains("hidden");this.classList.toggle("hidden",t)}#l(){this.#c(),this.#t=this.#d(this.#t,this.#i,"stretch"),this.#e=this.#d(this.#e,this.#s,"st-host-direction"),this.#p()}#p(){this.#n?.disconnect(),this.#r&&(this.#n=(0,s.mx)(this.#r,()=>this.#h(),{includeAttrs:["class"]}))}connectedCallback(){super.connectedCallback?.(),this.#p(),this.#h()}#a(){const t="\n descope-anchored {\n width: 100%; /* fill the outer host so the anchored element spans the full anchor width */\n }\n :host([stretch]) {\n display: inline-flex; /* switch from inline-block so internal children are flex items */\n width: 100%; /* fill non-flex parents */\n flex-grow: 1; /* absorb extra space in flex parents */\n flex-shrink: 0; /* hold full width — shrink:1 would let siblings squeeze it below 100% */\n flex-basis: auto; /* defer to width:100% on the main axis; avoids forcing 100% height in column-flex parents */\n min-width: 0; /* prevent overflow when the outer host is itself inside a constrained flex row */\n }\n ";this.#o?this.#o.replaceSync(t):this.#i&&(this.#o=(0,s.fz)(t,this.#i))}#d(t,e,o){return t?.disconnect(),e?.removeAttribute(o),this.#r&&e?(0,s.EA)(this.#r,e,{includeAttrs:[o]}):null}disconnectedCallback(){super.disconnectedCallback?.(),this.#t?.disconnect(),this.#e?.disconnect(),this.#n?.disconnect()}#c(){this.toggleAttribute("has-anchor",!!this.#r),this.#h()}}const h=(0,i.Zz)(n.tQ)(l);customElements.define(a,h)},76231(t,e,o){o.d(e,{T:()=>c,m:()=>p});var n=o(92540),r=o(88961),s=o(63200),i=o(36976),a=o(72270),l=o(54847),h=o(25964);const c=(0,h.xE)("enriched-text");class d extends((0,a.qu)({componentName:c,baseSelector:":host > div"})){#u;#m;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.#y(),(0,h.Ge)(this,this.#b.bind(this)),this.contentNode?.addEventListener("click",t=>{t.target instanceof HTMLAnchorElement&&t.stopPropagation()}),this.contentNode?.addEventListener("keydown",t=>{"Enter"===t.key&&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.#y())}customUnderlineRenderer(){this.processor.renderer.rules.em_open=(t,e,o,n,r)=>("_"===t[e].markup&&(t[e].tag="u"),this.#m(t,e,o,n,r)),this.processor.renderer.rules.em_close=(t,e,o,n,r)=>("_"===t[e].markup&&(t[e].tag="u"),this.#m(t,e,o,n,r))}#v(){this.linkTargetBlank?this.processor.renderer.rules.link_open=(t,e,o,n,r)=>(t[e].attrSet("target","_blank"),this.#u(t,e,o,n,r)):this.processor.renderer.rules.link_open=this.#u}#g(){this.processor&&this.processor.disable(i.M)}#f(){this.#g()}#x(){this.#u=this.processor.renderer.rules.link_open||((t,e,o,n,r)=>r.renderToken(t,e,o)),this.#m=this.processor.renderer.rules.em_open||((t,e,o,n,r)=>r.renderToken(t,e,o))}#y(){this.processor=new n.A("commonmark",{html:!0}),this.#x(),this.#f(),this.#v(),this.customUnderlineRenderer()}get linkTargetBlank(){return"true"===this.getAttribute("link-target-blank")}get contentNode(){return this.shadowRoot.querySelector(".content")}#b(){if(!this.processor)return;let t=(0,l.G)(this.innerHTML);!t?.trim()&&this.isConnected?this.setAttribute("empty","true"):this.removeAttribute("empty");try{const e=this.processor.parse(t,{references:void 0});t=this.processor.renderer.render(e,{html:!0,breaks:!0})}catch{console.warn("Not parsing invalid markdown token")}this.contentNode.innerHTML=t,this.contentNode.firstChild?.setAttribute("part","content")}onReadOnlyChange(t){t?this.contentNode.setAttribute("inert",t):this.contentNode.removeAttribute("inert")}}const p=(0,s.Zz)((0,r.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDisplay:{selector:()=>":host",property:"display",fallback:"inline-block"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},fontWeightBold:[{selector:()=>":host strong",property:"font-weight"},{selector:()=>":host b",property:"font-weight"}],textColor:{property:"color"},textLineHeight:{property:"line-height"},textAlign:{},linkColor:{selector:"a",property:"color"},linkTextDecoration:{selector:"a",property:"text-decoration"},linkHoverTextDecoration:{selector:"a:hover",property:"text-decoration"},minHeight:{},minWidth:{}}}),(0,r.RF)({componentNameOverride:(0,h.xE)("link")}),(0,r.RF)({componentNameOverride:(0,h.xE)("text")}),(0,r.DM)({triggers:[{attr:"full-width",value:"true"}]}),r.VO,r.tQ)(d)},36976(t,e,o){o.d(e,{M:()=>n});const n=["blockquote","list","image","table","code","hr","backticks","fence","reference","heading","lheading","html_block"]},54847(t,e,o){o.d(e,{G:()=>n});const n=t=>{const e=document.createElement("textarea");return e.innerHTML=t,e.value}},55838(t,e,o){o.r(e),o.d(e,{EnrichedTextClass:()=>n.m,componentName:()=>n.T}),o(90512);var n=o(76231);customElements.define(n.T,n.m)},75464(t,e,o){o.d(e,{J:()=>v,T:()=>l});var n=o(88961),r=o(63200),s=o(25964),i=o(72270),a=o(66434);const l=(0,s.xE)("link"),h=["href","readonly"];class c extends((0,i.qu)({componentName:l,baseSelector:":host a"})){static get observedAttributes(){return h.concat(super.observedAttributes||[])}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t<div>\n\t\t\t<descope-text part="wrapper">\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t',(0,s.fz)('\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n\n :host([ellipsis="true"]) descope-text {\n display: inline-flex;\n }\n :host([ellipsis="true"]) descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ',this),this.anchor=this.shadowRoot.querySelector("a"),(0,s.EA)(this,this.anchor,{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),(0,s.EA)(this,this.shadowRoot.querySelector("descope-text"),{includeAttrs:["mode","variant"]}),this.anchor.addEventListener("click",t=>{this.readOnly&&t.preventDefault()})}get readOnly(){return"true"===this.getAttribute("readonly")}}const d={host:{selector:()=>":host"},link:{selector:()=>":host a"},anchor:{},wrapper:{selector:()=>":host > div"},text:{selector:()=>a.s.componentName}},{anchor:p,text:u,host:m,wrapper:y,link:b}=d,v=(0,r.Zz)((0,n.RF)({mappings:{hostWidth:{...m,property:"width"},hostDirection:{...u,property:"direction"},textAlign:y,textDecoration:{...b,property:"text-decoration",fallback:"none"},textColor:[{...p,property:"color"},{...u,property:a.s.cssVarList.textColor}],cursor:p}}),(0,n.DM)({triggers:[{attr:"full-width",value:"true"}]}),n.VO,n.tQ)(c)},90512(t,e,o){o.r(e),o.d(e,{LinkClass:()=>n.J,componentName:()=>n.T});var n=o(75464);o(63595),customElements.define(n.T,n.J)},66434(t,e,o){o.d(e,{T:()=>a,s:()=>c});var n=o(88961),r=o(63200),s=o(25964),i=o(72270);const a=(0,s.xE)("text");class l extends((0,i.qu)({componentName:a,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,s.fz)("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,s.Ge)(this,()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""})}}const{host:h}={host:{selector:()=>":host"}},c=(0,r.Zz)((0,n.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:{}}}),(0,n.DM)({triggers:[{attr:"full-width",value:"true"}]}),n.VO,n.tQ)(l)},63595(t,e,o){o.r(e),o.d(e,{TextClass:()=>n.s,componentName:()=>n.T});var n=o(66434);customElements.define(n.T,n.s)},54240(t,e,o){o.r(e),o.d(e,{TooltipClass:()=>u,componentName:()=>l}),o(13094),o(55838),o(57760);var n=o(88961),r=o(63200),s=o(25964),i=o(72270),a=o(76231);const l=(0,s.xE)("tooltip"),h=["text","position","hide-delay","hover-delay","opened"];class c extends((0,i.qu)({componentName:l,baseSelector:"vaadin-tooltip"})){#k=null;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <descope-anchored>\n <slot></slot>\n <vaadin-tooltip slot="anchored"></vaadin-tooltip>\n </descope-anchored>\n ',this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.tooltip=this.shadowRoot.querySelector("vaadin-tooltip"),this.anchored=this.shadowRoot.querySelector("descope-anchored")}#h(){const t=this.anchored?.classList?.contains("hidden");this.classList.toggle("hidden",t)}static get observedAttributes(){return h.concat(super.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()||""}get isStaticDisplay(){return"true"===this.getAttribute("static-display")}get srLabel(){return this.tooltip?.querySelector('[slot="sr-label"]')}#C(){this.isStaticDisplay?(this.#w(),this.setAttribute("inert","true")):this.removeAttribute("inert")}#w(){this.overlay&&(this.overlay.style.display="block",this.overlay.style.position="static")}init(){super.init?.(),(0,s.fz)('\n :host {\n display: inline-block;\n }\n vaadin-tooltip {\n display: block;\n position: absolute;\n width: 0;\n height: 0;\n overflow: hidden;\n }\n /* Stack anchor above the anchored element so the tooltip flows below it inline. */\n :host([static-display="true"]) descope-anchored::part(root) {\n flex-direction: column;\n }\n :host([static-display="true"]) descope-anchored::part(anchored) {\n position: static;\n inset: unset;\n }\n :host([static-display="true"]) vaadin-tooltip {\n position: static;\n width: auto;\n height: auto;\n overflow: visible;\n }\n :host([static-display="true"]) vaadin-tooltip [slot="sr-label"] {\n display: none;\n }\n',this),this.tooltip.ariaTarget=this.anchored,this.defaultSlot.addEventListener("slotchange",()=>this.#S()),this.#S(),setTimeout(()=>this.#A())}#T(){this.#k?.disconnect(),this.anchored&&(this.#k=(0,s.mx)(this.anchored,()=>this.#h(),{includeAttrs:["class"]}))}connectedCallback(){super.connectedCallback?.(),this.#h(),this.#T()}disconnectedCallback(){super.disconnectedCallback?.(),this.#k?.disconnect()}#S(){const t=this.defaultSlot?.assignedElements()?.[0];t&&(this.tooltip.target=t)}#A(){this.#O(),this.#L(),(0,s.EA)(this,this.tooltip,{includeAttrs:["position","opened"]}),this.#R()}#E(){this.overlayContentNode.innerHTML=""}#N(){const t=document.createElement("descope-enriched-text");return t.setAttribute("link-target-blank","true"),t.textContent=this.tooltipText,t}#O(){this.overlayContentNode&&setTimeout(()=>{this.#E(),this.textComponent=this.#N(),this.overlayContentNode.appendChild(this.textComponent),this.srLabel&&!this.tooltipText&&this.srLabel.setAttribute("aria-hidden","true"),(0,s.EA)(this,this.textComponent,{includeAttrs:["readonly"]})})}#L(){if(!this.overlay)return;const t=this.overlay._attachOverlay?.bind(this.overlay);this.overlay._detachOverlay=()=>{},this.overlay._attachOverlay=()=>{t?.(),setTimeout(()=>{this.tooltip.shadowRoot.appendChild(this.overlay),this.overlay._updatePosition?.()})},this.isOpened&&setTimeout(()=>{this.tooltip.shadowRoot.appendChild(this.overlay),this.#C(),this.overlay._updatePosition?.()})}#R(){this.tooltip?.toggleAttribute("manual",this.isOpened)}#_(t){if(!this.textComponent)return;const e=(t??"").trim();this.textComponent.textContent=e,this.srLabel&&(e?this.srLabel.removeAttribute("aria-hidden"):this.srLabel.setAttribute("aria-hidden","true"))}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),e!==o&&("text"===t&&this.#_(o),"opened"===t&&this.#R())}}const{overlay:d,content:p}={overlay:{selector:()=>"vaadin-tooltip-overlay::part(overlay)"},content:{selector:()=>"vaadin-tooltip-overlay::part(content)"}},u=(0,r.Zz)(n.tQ,(0,n.mA)({selector:"",mappings:{fontFamily:{...p,property:a.m.cssVarList.fontFamilyOverride},fontSize:{...p,property:a.m.cssVarList.fontSizeOverride},fontWeight:{...p,property:a.m.cssVarList.fontWeightOverride},textColor:{...p,property:a.m.cssVarList.textColorOverride},hostDirection:{...p,property:a.m.cssVarList.hostDirectionOverride},backgroundColor:[{...d},{...p}],borderColor:{...d},borderStyle:{...d},borderWidth:{...d},borderRadius:{...d},boxShadow:{...d},horizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"}],verticalPadding:[{...p,property:"padding-top"},{...p,property:"padding-bottom"}]},forward:{attributes:["style"],include:!1}}))(c);customElements.define(l,u)}}]);
2
2
  //# sourceMappingURL=descope-tooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"descope-tooltip.js","mappings":"iQAUO,MAAAA,GAAsB,EAAAC,EAAAC,IAAgB,YAE7C,MAAAC,WAA0B,EAAAC,EAAAC,IAAe,CACzCL,gBACAM,aAAA,oBAEAC,GAAA,KAEAC,GAAA,KAEAC,GAAA,KAKAC,GAAA,KAEA,KAAAC,GACA,OAAAC,KAAAC,YAAAC,iBAAA,CAA+CC,SAAA,IAAe,EAC9D,CAEA,KAAAC,GACA,OAAAJ,KAAAK,WACAC,cAAA,0BACAJ,mBAAA,EACA,CAEA,KAAAK,GACA,OAAAP,KAAAQ,cAAAC,IACA,CAEA,WAAAC,GACAC,QAEAX,KAAAY,aAAA,CAAwBC,KAAA,SAAcC,UAAA,2MAStCd,KAAAC,YAAAD,KAAAK,WAAAC,cAAA,mBACA,CAEA,IAAAS,GACAJ,MA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H,QAAA,CACAC,WAAA,UACAC,SAAA,KA1C4B,CA6C5B9C,GCjVA7I,eAAAC,OAAsB3D,EAAeuO","sources":["webpack://@descope/web-components-ui/../components/descope-anchored/src/component/AnchoredClass.js","webpack://@descope/web-components-ui/../components/descope-anchored/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/EnrichedTextClass.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/consts.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/LinkClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-tooltip/src/component/TooltipClass.js","webpack://@descope/web-components-ui/../components/descope-tooltip/src/component/index.js"],"sourcesContent":["import { componentNameValidationMixin } from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport {\n forwardAttrs,\n getComponentName,\n injectStyle,\n observeAttributes,\n} from '@descope-ui/common/components-helpers';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('anchored');\n\nclass RawAnchored extends createBaseClass({\n componentName,\n baseSelector: '.anchored-root',\n}) {\n #stretchObserver = null;\n\n #directionObserver = null;\n\n #hostStretchSheet = null;\n\n // Observes the anchor's `class` attribute so runtime updates by the SDK\n // (e.g. real-time conditional components toggling `.hidden`) propagate to\n // this element. Without this, only the initial slotchange would sync.\n #anchorClassObserver = null;\n\n get #anchor() {\n return this.defaultSlot.assignedElements({ flatten: true })[0];\n }\n\n get #anchored() {\n return this.shadowRoot\n .querySelector('slot[name=\"anchored\"]')\n ?.assignedElements()[0];\n }\n\n get #outerHost() {\n return this.getRootNode().host;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"anchored-root\" part=\"root\">\n <slot></slot>\n <div class=\"anchored-host\" part=\"anchored\">\n <slot name=\"anchored\"></slot>\n </div>\n </div>\n `;\n\n this.defaultSlot = this.shadowRoot.querySelector('slot:not([name])');\n }\n\n init() {\n super.init?.();\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n position: relative;\n box-sizing: border-box;\n }\n\n :host(:not([has-anchor])) {\n display: none;\n }\n\n .anchored-root {\n position: relative;\n display: flex;\n width: 100%;\n min-width: 0;\n }\n\n /* Make anchor fill the flex row and allow it to shrink. */\n ::slotted(*:not([slot])) {\n flex-grow: 1; /* fill the flex row */\n flex-shrink: 1; /* compress when constrained */\n flex-basis: auto; /* start from the anchor's natural size */\n min-width: 0; /* flex items won't shrink below content size without this */\n }\n\n /* Anchored container covers the anchor but is invisible to pointer events. */\n .anchored-host {\n position: absolute;\n inset: 0;\n pointer-events: none;\n }\n\n /* Restore interactivity for actual anchored content. */\n ::slotted([slot=\"anchored\"]) {\n pointer-events: auto;\n }\n `,\n this,\n );\n\n this.#syncStretchCSS();\n\n this.defaultSlot.addEventListener('slotchange', () => this.#syncAnchor());\n\n this.#syncAnchor();\n }\n\n // To support conditional components in flow, we need to sync the 'hidden' className to the root of the component.\n // Ideally, this would happen in the SDK, but we resolved to this patch to fix the issue without forcing users to update SDKs.\n #syncComponentState() {\n const hasHidden = this.#anchor?.classList?.contains('hidden');\n this.classList.toggle('hidden', hasHidden);\n }\n\n #syncAnchor() {\n this.#onAnchorChanged();\n\n this.#stretchObserver = this.#forwardAttr(\n this.#stretchObserver,\n this.#outerHost,\n 'stretch',\n );\n\n this.#directionObserver = this.#forwardAttr(\n this.#directionObserver,\n this.#anchored,\n 'st-host-direction',\n );\n\n this.#observeAnchorClass();\n }\n\n #observeAnchorClass() {\n this.#anchorClassObserver?.disconnect();\n if (this.#anchor) {\n this.#anchorClassObserver = observeAttributes(\n this.#anchor,\n () => this.#syncComponentState(),\n { includeAttrs: ['class'] },\n );\n }\n }\n\n // createBaseClass gates init() to first-connect (#isInit). Without\n // re-observing here, runtime `.hidden` toggles stop syncing after a\n // detach/reattach cycle.\n connectedCallback() {\n super.connectedCallback?.();\n this.#observeAnchorClass();\n this.#syncComponentState();\n }\n\n // Injects [stretch] layout rules into the containing component's shadow root (e.g. descope-attachment)\n // so it stretches when the anchor has [stretch]. Replaces the existing rules on subsequent calls.\n #syncStretchCSS() {\n const css = `\n descope-anchored {\n width: 100%; /* fill the outer host so the anchored element spans the full anchor width */\n }\n :host([stretch]) {\n display: inline-flex; /* switch from inline-block so internal children are flex items */\n width: 100%; /* fill non-flex parents */\n flex-grow: 1; /* absorb extra space in flex parents */\n flex-shrink: 0; /* hold full width — shrink:1 would let siblings squeeze it below 100% */\n flex-basis: auto; /* defer to width:100% on the main axis; avoids forcing 100% height in column-flex parents */\n min-width: 0; /* prevent overflow when the outer host is itself inside a constrained flex row */\n }\n `;\n\n if (this.#hostStretchSheet) {\n this.#hostStretchSheet.replaceSync(css);\n } else if (this.#outerHost) {\n this.#hostStretchSheet = injectStyle(css, this.#outerHost);\n }\n }\n\n // Reconnects forwarding to the current anchor. Disconnects the old observer and\n // removes the stale attr from target first — forwardAttrs only sets attrs present\n // on the source, so absent attrs won't be removed automatically.\n #forwardAttr(observer, target, attr) {\n observer?.disconnect();\n target?.removeAttribute(attr);\n if (!this.#anchor || !target) return null;\n return forwardAttrs(this.#anchor, target, { includeAttrs: [attr] });\n }\n\n // Prevent stale callbacks from firing on a detached anchor after removal.\n disconnectedCallback() {\n super.disconnectedCallback?.();\n this.#stretchObserver?.disconnect();\n this.#directionObserver?.disconnect();\n this.#anchorClassObserver?.disconnect();\n }\n\n // Track whether anything is slotted, so the host display rule can hide an\n // empty host rather than reserving its layout box.\n #onAnchorChanged() {\n this.toggleAttribute('has-anchor', !!this.#anchor);\n this.#syncComponentState();\n }\n}\n\nexport const AnchoredClass = compose(componentNameValidationMixin)(RawAnchored);\n","import { componentName, AnchoredClass } from './AnchoredClass';\n\ncustomElements.define(componentName, AnchoredClass);\n\nexport { AnchoredClass, componentName };\n","import MarkdownIt from 'markdown-it';\nimport {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n stretchMixin,\n} 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 {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('enriched-text');\n\nclass EnrichedText extends createBaseClass({\n componentName,\n baseSelector: ':host > div',\n}) {\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 // The SDK submits the form (and prevents link activation) on any Enter that reaches the flow root\n this.contentNode?.addEventListener('keydown', (e) => {\n if (e.key === 'Enter' && 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 = (\n tokens,\n idx,\n options,\n env,\n self,\n ) => {\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 = (\n tokens,\n idx,\n options,\n env,\n self,\n ) => {\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 = (\n tokens,\n idx,\n options,\n env,\n self,\n ) => {\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 =\n this.processor.renderer.rules.link_open || defaultLinkRenderer;\n\n const defaultStrongRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origEmRenderer =\n 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, {\n html: true,\n breaks: true,\n });\n } catch {\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: {\n selector: () => ':host',\n property: 'display',\n fallback: 'inline-block',\n },\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: {\n selector: 'a:hover',\n property: 'text-decoration',\n },\n minHeight: {},\n minWidth: {},\n },\n }),\n createStyleMixin({ componentNameOverride: getComponentName('link') }),\n createStyleMixin({ componentNameOverride: getComponentName('text') }),\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n draggableMixin,\n componentNameValidationMixin,\n)(EnrichedText);\n","export const disableRules = [\n 'blockquote',\n 'list',\n 'image',\n 'table',\n 'code',\n 'hr',\n 'backticks',\n 'fence',\n 'reference',\n 'heading',\n 'lheading',\n 'html_block',\n];\n","export const decodeHTML = (html) => {\n const textArea = document.createElement('textarea');\n textArea.innerHTML = html;\n return textArea.value;\n};\n","import '@descope-ui/descope-link';\n\nimport { componentName, EnrichedTextClass } from './EnrichedTextClass';\n\ncustomElements.define(componentName, EnrichedTextClass);\n\nexport { EnrichedTextClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n 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\nconst observedAttrs = ['href', 'readonly'];\n\nclass RawLink extends createBaseClass({\n componentName,\n baseSelector: ':host a',\n}) {\n static get observedAttributes() {\n return observedAttrs.concat(super.observedAttributes || []);\n }\n\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 this.anchor = this.shadowRoot.querySelector('a');\n\n forwardAttrs(this, this.anchor, {\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 this.anchor.addEventListener('click', (e) => {\n if (this.readOnly) {\n e.preventDefault();\n }\n });\n }\n\n get readOnly() {\n return this.getAttribute('readonly') === 'true';\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: {\n ...link,\n property: 'text-decoration',\n fallback: 'none',\n },\n textColor: [\n { ...anchor, property: 'color' },\n { ...text, property: TextClass.cssVarList.textColor },\n ],\n cursor: anchor,\n },\n }),\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\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","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(\n `\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `,\n this,\n );\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' },\n};\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n textColor: [{ property: 'color' }],\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n","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 injectStyle,\n observeAttributes,\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\nclass RawTooltip extends createBaseClass({\n componentName,\n baseSelector: 'vaadin-tooltip',\n}) {\n // Observes the inner descope-anchored's `class` attribute so runtime updates\n // (e.g. real-time conditional components toggling `.hidden`) keep this\n // tooltip's class in sync. Set up in connectedCallback so reconnects work.\n #anchoredClassObserver = null;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <descope-anchored>\n <slot></slot>\n <vaadin-tooltip slot=\"anchored\"></vaadin-tooltip>\n </descope-anchored>\n `;\n\n this.defaultSlot = this.shadowRoot.querySelector('slot:not([name])');\n this.tooltip = this.shadowRoot.querySelector('vaadin-tooltip');\n\n this.anchored = this.shadowRoot.querySelector('descope-anchored');\n }\n\n // To support conditional components in flow, we need to sync the 'hidden' className to the root of the component.\n // Ideally, this would happen in the SDK, but we resolved to this patch to fix the issue without forcing users to update SDKs.\n #syncComponentState() {\n const hasHidden = this.anchored?.classList?.contains('hidden');\n this.classList.toggle('hidden', hasHidden);\n }\n\n static get observedAttributes() {\n return tooltipAttrs.concat(super.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 get isStaticDisplay() {\n return this.getAttribute('static-display') === 'true';\n }\n\n get srLabel() {\n return this.tooltip?.querySelector('[slot=\"sr-label\"]');\n }\n\n // We use `static-display` for presentation purposes, to show the tooltip content.\n // This should be used only when `opened` is `true`. Once `static-display` is set,\n // the overlay flows in-line and has layout in the presenting page. Mainly aimed\n // to solve the presentation problem on our Styles Page in the Console.\n #handleStaticDisplay() {\n if (this.isStaticDisplay) {\n this.#revealOverlay();\n this.setAttribute('inert', 'true');\n } else {\n this.removeAttribute('inert');\n }\n }\n\n #revealOverlay() {\n if (!this.overlay) return;\n // Keep the overlay in vaadin-tooltip.shadowRoot so adopted stylesheets from\n // portalMixin continue to apply (they are scoped to that shadow root).\n // Layout is handled via CSS: anchored-root becomes a column, vaadin-tooltip\n // becomes a visible block below the anchor, and the sr-label is hidden.\n this.overlay.style.display = 'block';\n this.overlay.style.position = 'static';\n }\n\n init() {\n super.init?.();\n\n injectStyle(\n `\n :host {\n display: inline-block;\n }\n vaadin-tooltip {\n display: block;\n position: absolute;\n width: 0;\n height: 0;\n overflow: hidden;\n }\n /* Stack anchor above the anchored element so the tooltip flows below it inline. */\n :host([static-display=\"true\"]) descope-anchored::part(root) {\n flex-direction: column;\n }\n :host([static-display=\"true\"]) descope-anchored::part(anchored) {\n position: static;\n inset: unset;\n }\n :host([static-display=\"true\"]) vaadin-tooltip {\n position: static;\n width: auto;\n height: auto;\n overflow: visible;\n }\n :host([static-display=\"true\"]) vaadin-tooltip [slot=\"sr-label\"] {\n display: none;\n }\n`,\n this,\n );\n\n this.defaultSlot.addEventListener('slotchange', () =>\n this.#setTooltipTarget(),\n );\n this.#setTooltipTarget();\n\n setTimeout(() => this.#onOverlayReady());\n }\n\n #observeAnchored() {\n this.#anchoredClassObserver?.disconnect();\n if (this.anchored) {\n this.#anchoredClassObserver = observeAttributes(\n this.anchored,\n () => this.#syncComponentState(),\n { includeAttrs: ['class'] },\n );\n }\n }\n\n // createBaseClass gates init() to first-connect, so observing here is\n // required for the detach/reattach cycle to keep working.\n connectedCallback() {\n super.connectedCallback?.();\n this.#syncComponentState();\n this.#observeAnchored();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback?.();\n this.#anchoredClassObserver?.disconnect();\n }\n\n #setTooltipTarget() {\n const target = this.defaultSlot?.assignedElements()?.[0];\n if (!target) return;\n this.tooltip.target = target;\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 #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 // An empty sr-label with role=\"tooltip\" fails accessibility checks.\n // Hide it when there's no tooltip text; vaadin handles populating it when text is present.\n if (this.srLabel && !this.tooltipText) {\n this.srLabel.setAttribute('aria-hidden', 'true');\n }\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 // which makes it hard to style. We move the overlay into our shadow root instead.\n // Critical: vaadin computes position against the overlay's offsetParent — moving\n // it changes that context, so we must call `_updatePosition()` afterwards.\n // That's vaadin's own position-recompute method (the same one its resize/scroll\n // listeners use internally), so we get the right reposition without dispatching\n // global events.\n #overrideAttachOverlay() {\n if (!this.overlay) return;\n\n const originalAttach = this.overlay._attachOverlay?.bind(this.overlay);\n\n this.overlay._detachOverlay = () => {};\n this.overlay._attachOverlay = () => {\n originalAttach?.();\n setTimeout(() => {\n this.tooltip.shadowRoot.appendChild(this.overlay);\n this.overlay._updatePosition?.();\n });\n };\n\n if (this.isOpened) {\n // When `opened` attr is set at init, vaadin renders the overlay at the top\n // level without calling `_attachOverlay`. Move it back into our shadow root.\n setTimeout(() => {\n this.tooltip.shadowRoot.appendChild(this.overlay);\n this.#handleStaticDisplay();\n this.overlay._updatePosition?.();\n });\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 const trimmedValue = (value ?? '').trim();\n this.textComponent.textContent = trimmedValue;\n if (this.srLabel) {\n if (trimmedValue) {\n this.srLabel.removeAttribute('aria-hidden');\n } else {\n this.srLabel.setAttribute('aria-hidden', 'true');\n }\n }\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();\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\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-anchored';\nimport '@descope-ui/descope-enriched-text';\nimport '@vaadin/tooltip';\nimport { componentName, TooltipClass } from './TooltipClass';\n\ncustomElements.define(componentName, TooltipClass);\n\nexport { TooltipClass, componentName };\n"],"names":["componentName","componentsHelpers","xE","RawAnchored","baseClasses","qu","baseSelector","stretchObserver","directionObserver","hostStretchSheet","anchorClassObserver","anchor","this","defaultSlot","assignedElements","flatten","anchored","shadowRoot","querySelector","outerHost","getRootNode","host","constructor","super","attachShadow","mode","innerHTML","init","fz","syncStretchCSS","addEventListener","syncAnchor","syncComponentState","hasHidden","classList","contains","toggle","onAnchorChanged","forwardAttr","observeAnchorClass","disconnect","mx","includeAttrs","connectedCallback","css","replaceSync","observer","target","attr","removeAttribute","EA","disconnectedCallback","toggleAttribute","AnchoredClass","utils","Zz","componentsMixins","tQ","customElements","define","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_6__","EnrichedText","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_4__","origLinkRenderer","origEmRenderer","initProcessor","Ge","parseChildren","bind","contentNode","e","HTMLAnchorElement","stopPropagation","key","observedAttributes","attributeChangedCallback","attrName","oldValue","newValue","onReadOnlyChange","customUnderlineRenderer","processor","renderer","rules","em_open","tokens","idx","options","env","self","markup","tag","em_close","customizeLinkRenderer","linkTargetBlank","link_open","attrSet","disableCustomRules","disable","_consts__WEBPACK_IMPORTED_MODULE_3__","M","updateProcessorRules","storeOrigRenderers","_","renderToken","markdown_it__WEBPACK_IMPORTED_MODULE_0__","A","html","getAttribute","_helpers__WEBPACK_IMPORTED_MODULE_5__","G","trim","isConnected","setAttribute","parse","references","undefined","render","breaks","console","warn","firstChild","isReadOnly","EnrichedTextClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_2__","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_1__","RF","mappings","hostWidth","selector","property","hostDisplay","fallback","hostDirection","fontSize","fontFamily","fontWeight","fontWeightBold","textColor","textLineHeight","textAlign","linkColor","linkTextDecoration","linkHoverTextDecoration","minHeight","minWidth","componentNameOverride","DM","triggers","value","VO","disableRules","decodeHTML","textArea","document","createElement","_EnrichedTextClass__WEBPACK_IMPORTED_MODULE_1__","T","m","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_2__","observedAttrs","RawLink","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_3__","concat","mapAttrs","tooltip","readOnly","preventDefault","selectors","link","wrapper","text","_descope_ui_descope_text_class__WEBPACK_IMPORTED_MODULE_4__","s","LinkClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_1__","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","textDecoration","cssVarList","cursor","_LinkClass__WEBPACK_IMPORTED_MODULE_0__","J","RawText","hideWhenEmpty","hasChildren","childNodes","length","style","display","TextClass","textLetterSpacing","textShadow","textTransform","fontStyle","borderWidth","borderStyle","borderColor","_TextClass__WEBPACK_IMPORTED_MODULE_0__","tooltipAttrs","RawTooltip","anchoredClassObserver","isOpened","overlay","_overlayElement","overlayContentNode","tooltipText","isStaticDisplay","srLabel","handleStaticDisplay","revealOverlay","position","setTooltipTarget","setTimeout","onOverlayReady","observeAnchored","initTooltipTextComponent","overrideAttachOverlay","handleTooltipVisibility","clearOverlayContentNode","createEnrichedTextComponent","enrichedText","textContent","textComponent","appendChild","originalAttach","_attachOverlay","_detachOverlay","_updatePosition","updateText","trimmedValue","content","TooltipClass","mA","fontFamilyOverride","fontSizeOverride","fontWeightOverride","textColorOverride","hostDirectionOverride","backgroundColor","borderRadius","boxShadow","horizontalPadding","verticalPadding","forward","attributes","include"],"sourceRoot":""}
1
+ {"version":3,"file":"descope-tooltip.js","mappings":"iQAUO,MAAAA,GAAsB,EAAAC,EAAAC,IAAgB,YAE7C,MAAAC,WAA0B,EAAAC,EAAAC,IAAe,CACzCL,gBACAM,aAAA,oBAEAC,GAAA,KAEAC,GAAA,KAEAC,GAAA,KAKAC,GAAA,KAEA,KAAAC,GACA,OAAAC,KAAAC,YAAAC,iBAAA,CAA+CC,SAAA,IAAe,EAC9D,CAEA,KAAAC,GACA,OAAAJ,KAAAK,WACAC,cAAA,0BACAJ,mBAAA,EACA,CAEA,KAAAK,GACA,OAAAP,KAAAQ,cAAAC,IACA,CAEA,WAAAC,GACAC,QAEAX,KAAAY,aAAA,CAAwBC,KAAA,SAAcC,UAAA,2MAStCd,KAAAC,YAAAD,KAAAK,WAAAC,cAAA,mBACA,CAEA,IAAAS,GACAJ,MAAAI,UAEI,EAAA1B,EAAA2B,IACJ,0iCAsCAhB,MAGAA,MAAAiB,IAEAjB,KAAAC,YAAAiB,iBAAA,iBAAAlB,MAAAmB,KAEAnB,MAAAmB,GACA,CAIA,EAAAC,GACA,MAAAC,EAAArB,MAAAD,GAAAuB,WAAAC,SAAA,UACAvB,KAAAsB,UAAAE,OAAA,SAAAH,EACA,CAEA,EAAAF,GACAnB,MAAAyB,IAEAzB,MAAAL,EAAAK,MAAA0B,EACA1B,MAAAL,EACAK,MAAAO,EACA,WAGAP,MAAAJ,EAAAI,MAAA0B,EACA1B,MAAAJ,EACAI,MAAAI,EACA,qBAGAJ,MAAA2B,GACA,CAEA,EAAAA,GACA3B,MAAAF,GAAA8B,a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,MAAAhB,QAAQA,EAAA6B,QAAAA,GAAmB,CAC3B7B,QAAA,CAAazE,SAAA,6CACbsG,QAAA,CAAatG,SAAA,8CAGNuG,GAAqB,EAAAlL,EAAAC,IAC1BC,EAAAC,IACA,EAAAD,EAAAiL,IAAW,CACbxG,SAAA,GACAF,SAAA,CACAQ,WAAA,IACAgG,EACArG,SAAkBP,EAAAmC,EAAiBoB,WAAAwD,oBAEnCpG,SAAA,IACAiG,EACArG,SAAkBP,EAAAmC,EAAiBoB,WAAAyD,kBAEnCnG,WAAA,IACA+F,EACArG,SAAkBP,EAAAmC,EAAiBoB,WAAA0D,oBAEnClG,UAAA,IACA6F,EACArG,SAAkBP,EAAAmC,EAAiBoB,WAAA2D,mBAEnCxG,cAAA,IACAkG,EACArG,SAAkBP,EAAAmC,EAAiBoB,WAAA4D,uBAEnCC,gBAAA,KAA0BrC,GAAY,IAAI6B,IAC1CnC,YAAA,IAAqBM,GACrBP,YAAA,IAAqBO,GACrBR,YAAA,IAAqBQ,GACrBsC,aAAA,IAAsBtC,GACtBuC,UAAA,IAAmBvC,GACnBwC,kBAAA,CACA,IAAUX,EAAArG,SAAA,gBACV,IAAUqG,EAAArG,SAAA,kBAEViH,gBAAA,CACA,IAAUZ,EAAArG,SAAA,eACV,IAAUqG,EAAArG,SAAA,oBAGVkH,QAAA,CACAC,WAAA,UACAC,SAAA,KA1C4B,CA6C5B/C,GCrVA7I,eAAAC,OAAsB3D,EAAewO","sources":["webpack://@descope/web-components-ui/../components/descope-anchored/src/component/AnchoredClass.js","webpack://@descope/web-components-ui/../components/descope-anchored/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/EnrichedTextClass.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/consts.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-enriched-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/LinkClass.js","webpack://@descope/web-components-ui/../components/descope-link/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-tooltip/src/component/TooltipClass.js","webpack://@descope/web-components-ui/../components/descope-tooltip/src/component/index.js"],"sourcesContent":["import { componentNameValidationMixin } from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport {\n forwardAttrs,\n getComponentName,\n injectStyle,\n observeAttributes,\n} from '@descope-ui/common/components-helpers';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('anchored');\n\nclass RawAnchored extends createBaseClass({\n componentName,\n baseSelector: '.anchored-root',\n}) {\n #stretchObserver = null;\n\n #directionObserver = null;\n\n #hostStretchSheet = null;\n\n // Observes the anchor's `class` attribute so runtime updates by the SDK\n // (e.g. real-time conditional components toggling `.hidden`) propagate to\n // this element. Without this, only the initial slotchange would sync.\n #anchorClassObserver = null;\n\n get #anchor() {\n return this.defaultSlot.assignedElements({ flatten: true })[0];\n }\n\n get #anchored() {\n return this.shadowRoot\n .querySelector('slot[name=\"anchored\"]')\n ?.assignedElements()[0];\n }\n\n get #outerHost() {\n return this.getRootNode().host;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"anchored-root\" part=\"root\">\n <slot></slot>\n <div class=\"anchored-host\" part=\"anchored\">\n <slot name=\"anchored\"></slot>\n </div>\n </div>\n `;\n\n this.defaultSlot = this.shadowRoot.querySelector('slot:not([name])');\n }\n\n init() {\n super.init?.();\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n position: relative;\n box-sizing: border-box;\n }\n\n :host(:not([has-anchor])) {\n display: none;\n }\n\n .anchored-root {\n position: relative;\n display: flex;\n width: 100%;\n min-width: 0;\n }\n\n /* Make anchor fill the flex row and allow it to shrink. */\n ::slotted(*:not([slot])) {\n flex-grow: 1; /* fill the flex row */\n flex-shrink: 1; /* compress when constrained */\n flex-basis: auto; /* start from the anchor's natural size */\n min-width: 0; /* flex items won't shrink below content size without this */\n }\n\n /* Anchored container covers the anchor but is invisible to pointer events. */\n .anchored-host {\n position: absolute;\n inset: 0;\n pointer-events: none;\n }\n\n /* Restore interactivity for actual anchored content. */\n ::slotted([slot=\"anchored\"]) {\n pointer-events: auto;\n }\n `,\n this,\n );\n\n this.#syncStretchCSS();\n\n this.defaultSlot.addEventListener('slotchange', () => this.#syncAnchor());\n\n this.#syncAnchor();\n }\n\n // To support conditional components in flow, we need to sync the 'hidden' className to the root of the component.\n // Ideally, this would happen in the SDK, but we resolved to this patch to fix the issue without forcing users to update SDKs.\n #syncComponentState() {\n const hasHidden = this.#anchor?.classList?.contains('hidden');\n this.classList.toggle('hidden', hasHidden);\n }\n\n #syncAnchor() {\n this.#onAnchorChanged();\n\n this.#stretchObserver = this.#forwardAttr(\n this.#stretchObserver,\n this.#outerHost,\n 'stretch',\n );\n\n this.#directionObserver = this.#forwardAttr(\n this.#directionObserver,\n this.#anchored,\n 'st-host-direction',\n );\n\n this.#observeAnchorClass();\n }\n\n #observeAnchorClass() {\n this.#anchorClassObserver?.disconnect();\n if (this.#anchor) {\n this.#anchorClassObserver = observeAttributes(\n this.#anchor,\n () => this.#syncComponentState(),\n { includeAttrs: ['class'] },\n );\n }\n }\n\n // createBaseClass gates init() to first-connect (#isInit). Without\n // re-observing here, runtime `.hidden` toggles stop syncing after a\n // detach/reattach cycle.\n connectedCallback() {\n super.connectedCallback?.();\n this.#observeAnchorClass();\n this.#syncComponentState();\n }\n\n // Injects [stretch] layout rules into the containing component's shadow root (e.g. descope-attachment)\n // so it stretches when the anchor has [stretch]. Replaces the existing rules on subsequent calls.\n #syncStretchCSS() {\n const css = `\n descope-anchored {\n width: 100%; /* fill the outer host so the anchored element spans the full anchor width */\n }\n :host([stretch]) {\n display: inline-flex; /* switch from inline-block so internal children are flex items */\n width: 100%; /* fill non-flex parents */\n flex-grow: 1; /* absorb extra space in flex parents */\n flex-shrink: 0; /* hold full width — shrink:1 would let siblings squeeze it below 100% */\n flex-basis: auto; /* defer to width:100% on the main axis; avoids forcing 100% height in column-flex parents */\n min-width: 0; /* prevent overflow when the outer host is itself inside a constrained flex row */\n }\n `;\n\n if (this.#hostStretchSheet) {\n this.#hostStretchSheet.replaceSync(css);\n } else if (this.#outerHost) {\n this.#hostStretchSheet = injectStyle(css, this.#outerHost);\n }\n }\n\n // Reconnects forwarding to the current anchor. Disconnects the old observer and\n // removes the stale attr from target first — forwardAttrs only sets attrs present\n // on the source, so absent attrs won't be removed automatically.\n #forwardAttr(observer, target, attr) {\n observer?.disconnect();\n target?.removeAttribute(attr);\n if (!this.#anchor || !target) return null;\n return forwardAttrs(this.#anchor, target, { includeAttrs: [attr] });\n }\n\n // Prevent stale callbacks from firing on a detached anchor after removal.\n disconnectedCallback() {\n super.disconnectedCallback?.();\n this.#stretchObserver?.disconnect();\n this.#directionObserver?.disconnect();\n this.#anchorClassObserver?.disconnect();\n }\n\n // Track whether anything is slotted, so the host display rule can hide an\n // empty host rather than reserving its layout box.\n #onAnchorChanged() {\n this.toggleAttribute('has-anchor', !!this.#anchor);\n this.#syncComponentState();\n }\n}\n\nexport const AnchoredClass = compose(componentNameValidationMixin)(RawAnchored);\n","import { componentName, AnchoredClass } from './AnchoredClass';\n\ncustomElements.define(componentName, AnchoredClass);\n\nexport { AnchoredClass, componentName };\n","import MarkdownIt from 'markdown-it';\nimport {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n stretchMixin,\n} 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 {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('enriched-text');\n\nclass EnrichedText extends createBaseClass({\n componentName,\n baseSelector: ':host > div',\n}) {\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 // The SDK submits the form (and prevents link activation) on any Enter that reaches the flow root\n this.contentNode?.addEventListener('keydown', (e) => {\n if (e.key === 'Enter' && 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 = (\n tokens,\n idx,\n options,\n env,\n self,\n ) => {\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 = (\n tokens,\n idx,\n options,\n env,\n self,\n ) => {\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 = (\n tokens,\n idx,\n options,\n env,\n self,\n ) => {\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 =\n this.processor.renderer.rules.link_open || defaultLinkRenderer;\n\n const defaultStrongRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origEmRenderer =\n 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, {\n html: true,\n breaks: true,\n });\n } catch {\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: {\n selector: () => ':host',\n property: 'display',\n fallback: 'inline-block',\n },\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: {\n selector: 'a:hover',\n property: 'text-decoration',\n },\n minHeight: {},\n minWidth: {},\n },\n }),\n createStyleMixin({ componentNameOverride: getComponentName('link') }),\n createStyleMixin({ componentNameOverride: getComponentName('text') }),\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n draggableMixin,\n componentNameValidationMixin,\n)(EnrichedText);\n","export const disableRules = [\n 'blockquote',\n 'list',\n 'image',\n 'table',\n 'code',\n 'hr',\n 'backticks',\n 'fence',\n 'reference',\n 'heading',\n 'lheading',\n 'html_block',\n];\n","export const decodeHTML = (html) => {\n const textArea = document.createElement('textarea');\n textArea.innerHTML = html;\n return textArea.value;\n};\n","import '@descope-ui/descope-link';\n\nimport { componentName, EnrichedTextClass } from './EnrichedTextClass';\n\ncustomElements.define(componentName, EnrichedTextClass);\n\nexport { EnrichedTextClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n 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\nconst observedAttrs = ['href', 'readonly'];\n\nclass RawLink extends createBaseClass({\n componentName,\n baseSelector: ':host a',\n}) {\n static get observedAttributes() {\n return observedAttrs.concat(super.observedAttributes || []);\n }\n\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 this.anchor = this.shadowRoot.querySelector('a');\n\n forwardAttrs(this, this.anchor, {\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 this.anchor.addEventListener('click', (e) => {\n if (this.readOnly) {\n e.preventDefault();\n }\n });\n }\n\n get readOnly() {\n return this.getAttribute('readonly') === 'true';\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: {\n ...link,\n property: 'text-decoration',\n fallback: 'none',\n },\n textColor: [\n { ...anchor, property: 'color' },\n { ...text, property: TextClass.cssVarList.textColor },\n ],\n cursor: anchor,\n },\n }),\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\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","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(\n `\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `,\n this,\n );\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' },\n};\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n textColor: [{ property: 'color' }],\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n","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 injectStyle,\n observeAttributes,\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\nclass RawTooltip extends createBaseClass({\n componentName,\n baseSelector: 'vaadin-tooltip',\n}) {\n // Observes the inner descope-anchored's `class` attribute so runtime updates\n // (e.g. real-time conditional components toggling `.hidden`) keep this\n // tooltip's class in sync. Set up in connectedCallback so reconnects work.\n #anchoredClassObserver = null;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <descope-anchored>\n <slot></slot>\n <vaadin-tooltip slot=\"anchored\"></vaadin-tooltip>\n </descope-anchored>\n `;\n\n this.defaultSlot = this.shadowRoot.querySelector('slot:not([name])');\n this.tooltip = this.shadowRoot.querySelector('vaadin-tooltip');\n\n this.anchored = this.shadowRoot.querySelector('descope-anchored');\n }\n\n // To support conditional components in flow, we need to sync the 'hidden' className to the root of the component.\n // Ideally, this would happen in the SDK, but we resolved to this patch to fix the issue without forcing users to update SDKs.\n #syncComponentState() {\n const hasHidden = this.anchored?.classList?.contains('hidden');\n this.classList.toggle('hidden', hasHidden);\n }\n\n static get observedAttributes() {\n return tooltipAttrs.concat(super.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 get isStaticDisplay() {\n return this.getAttribute('static-display') === 'true';\n }\n\n get srLabel() {\n return this.tooltip?.querySelector('[slot=\"sr-label\"]');\n }\n\n // We use `static-display` for presentation purposes, to show the tooltip content.\n // This should be used only when `opened` is `true`. Once `static-display` is set,\n // the overlay flows in-line and has layout in the presenting page. Mainly aimed\n // to solve the presentation problem on our Styles Page in the Console.\n #handleStaticDisplay() {\n if (this.isStaticDisplay) {\n this.#revealOverlay();\n this.setAttribute('inert', 'true');\n } else {\n this.removeAttribute('inert');\n }\n }\n\n #revealOverlay() {\n if (!this.overlay) return;\n // Keep the overlay in vaadin-tooltip.shadowRoot so adopted stylesheets from\n // portalMixin continue to apply (they are scoped to that shadow root).\n // Layout is handled via CSS: anchored-root becomes a column, vaadin-tooltip\n // becomes a visible block below the anchor, and the sr-label is hidden.\n this.overlay.style.display = 'block';\n this.overlay.style.position = 'static';\n }\n\n init() {\n super.init?.();\n\n injectStyle(\n `\n :host {\n display: inline-block;\n }\n vaadin-tooltip {\n display: block;\n position: absolute;\n width: 0;\n height: 0;\n overflow: hidden;\n }\n /* Stack anchor above the anchored element so the tooltip flows below it inline. */\n :host([static-display=\"true\"]) descope-anchored::part(root) {\n flex-direction: column;\n }\n :host([static-display=\"true\"]) descope-anchored::part(anchored) {\n position: static;\n inset: unset;\n }\n :host([static-display=\"true\"]) vaadin-tooltip {\n position: static;\n width: auto;\n height: auto;\n overflow: visible;\n }\n :host([static-display=\"true\"]) vaadin-tooltip [slot=\"sr-label\"] {\n display: none;\n }\n`,\n this,\n );\n\n // vaadin links the target via aria-describedby to its sr-label, which lives in our shadow root,\n // so a slotted target would reference an ID from another DOM tree.\n this.tooltip.ariaTarget = this.anchored;\n\n this.defaultSlot.addEventListener('slotchange', () =>\n this.#setTooltipTarget(),\n );\n this.#setTooltipTarget();\n\n setTimeout(() => this.#onOverlayReady());\n }\n\n #observeAnchored() {\n this.#anchoredClassObserver?.disconnect();\n if (this.anchored) {\n this.#anchoredClassObserver = observeAttributes(\n this.anchored,\n () => this.#syncComponentState(),\n { includeAttrs: ['class'] },\n );\n }\n }\n\n // createBaseClass gates init() to first-connect, so observing here is\n // required for the detach/reattach cycle to keep working.\n connectedCallback() {\n super.connectedCallback?.();\n this.#syncComponentState();\n this.#observeAnchored();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback?.();\n this.#anchoredClassObserver?.disconnect();\n }\n\n #setTooltipTarget() {\n const target = this.defaultSlot?.assignedElements()?.[0];\n if (!target) return;\n this.tooltip.target = target;\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 #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 // An empty sr-label with role=\"tooltip\" fails accessibility checks.\n // Hide it when there's no tooltip text; vaadin handles populating it when text is present.\n if (this.srLabel && !this.tooltipText) {\n this.srLabel.setAttribute('aria-hidden', 'true');\n }\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 // which makes it hard to style. We move the overlay into our shadow root instead.\n // Critical: vaadin computes position against the overlay's offsetParent — moving\n // it changes that context, so we must call `_updatePosition()` afterwards.\n // That's vaadin's own position-recompute method (the same one its resize/scroll\n // listeners use internally), so we get the right reposition without dispatching\n // global events.\n #overrideAttachOverlay() {\n if (!this.overlay) return;\n\n const originalAttach = this.overlay._attachOverlay?.bind(this.overlay);\n\n this.overlay._detachOverlay = () => {};\n this.overlay._attachOverlay = () => {\n originalAttach?.();\n setTimeout(() => {\n this.tooltip.shadowRoot.appendChild(this.overlay);\n this.overlay._updatePosition?.();\n });\n };\n\n if (this.isOpened) {\n // When `opened` attr is set at init, vaadin renders the overlay at the top\n // level without calling `_attachOverlay`. Move it back into our shadow root.\n setTimeout(() => {\n this.tooltip.shadowRoot.appendChild(this.overlay);\n this.#handleStaticDisplay();\n this.overlay._updatePosition?.();\n });\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 const trimmedValue = (value ?? '').trim();\n this.textComponent.textContent = trimmedValue;\n if (this.srLabel) {\n if (trimmedValue) {\n this.srLabel.removeAttribute('aria-hidden');\n } else {\n this.srLabel.setAttribute('aria-hidden', 'true');\n }\n }\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();\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\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-anchored';\nimport '@descope-ui/descope-enriched-text';\nimport '@vaadin/tooltip';\nimport { componentName, TooltipClass } from './TooltipClass';\n\ncustomElements.define(componentName, TooltipClass);\n\nexport { TooltipClass, componentName };\n"],"names":["componentName","componentsHelpers","xE","RawAnchored","baseClasses","qu","baseSelector","stretchObserver","directionObserver","hostStretchSheet","anchorClassObserver","anchor","this","defaultSlot","assignedElements","flatten","anchored","shadowRoot","querySelector","outerHost","getRootNode","host","constructor","super","attachShadow","mode","innerHTML","init","fz","syncStretchCSS","addEventListener","syncAnchor","syncComponentState","hasHidden","classList","contains","toggle","onAnchorChanged","forwardAttr","observeAnchorClass","disconnect","mx","includeAttrs","connectedCallback","css","replaceSync","observer","target","attr","removeAttribute","EA","disconnectedCallback","toggleAttribute","AnchoredClass","utils","Zz","componentsMixins","tQ","customElements","define","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_6__","EnrichedText","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_4__","origLinkRenderer","origEmRenderer","initProcessor","Ge","parseChildren","bind","contentNode","e","HTMLAnchorElement","stopPropagation","key","observedAttributes","attributeChangedCallback","attrName","oldValue","newValue","onReadOnlyChange","customUnderlineRenderer","processor","renderer","rules","em_open","tokens","idx","options","env","self","markup","tag","em_close","customizeLinkRenderer","linkTargetBlank","link_open","attrSet","disableCustomRules","disable","_consts__WEBPACK_IMPORTED_MODULE_3__","M","updateProcessorRules","storeOrigRenderers","_","renderToken","markdown_it__WEBPACK_IMPORTED_MODULE_0__","A","html","getAttribute","_helpers__WEBPACK_IMPORTED_MODULE_5__","G","trim","isConnected","setAttribute","parse","references","undefined","render","breaks","console","warn","firstChild","isReadOnly","EnrichedTextClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_2__","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_1__","RF","mappings","hostWidth","selector","property","hostDisplay","fallback","hostDirection","fontSize","fontFamily","fontWeight","fontWeightBold","textColor","textLineHeight","textAlign","linkColor","linkTextDecoration","linkHoverTextDecoration","minHeight","minWidth","componentNameOverride","DM","triggers","value","VO","disableRules","decodeHTML","textArea","document","createElement","_EnrichedTextClass__WEBPACK_IMPORTED_MODULE_1__","T","m","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_2__","observedAttrs","RawLink","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_3__","concat","mapAttrs","tooltip","readOnly","preventDefault","selectors","link","wrapper","text","_descope_ui_descope_text_class__WEBPACK_IMPORTED_MODULE_4__","s","LinkClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_1__","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","textDecoration","cssVarList","cursor","_LinkClass__WEBPACK_IMPORTED_MODULE_0__","J","RawText","hideWhenEmpty","hasChildren","childNodes","length","style","display","TextClass","textLetterSpacing","textShadow","textTransform","fontStyle","borderWidth","borderStyle","borderColor","_TextClass__WEBPACK_IMPORTED_MODULE_0__","tooltipAttrs","RawTooltip","anchoredClassObserver","isOpened","overlay","_overlayElement","overlayContentNode","tooltipText","isStaticDisplay","srLabel","handleStaticDisplay","revealOverlay","position","ariaTarget","setTooltipTarget","setTimeout","onOverlayReady","observeAnchored","initTooltipTextComponent","overrideAttachOverlay","handleTooltipVisibility","clearOverlayContentNode","createEnrichedTextComponent","enrichedText","textContent","textComponent","appendChild","originalAttach","_attachOverlay","_detachOverlay","_updatePosition","updateText","trimmedValue","content","TooltipClass","mA","fontFamilyOverride","fontSizeOverride","fontWeightOverride","textColorOverride","hostDirectionOverride","backgroundColor","borderRadius","boxShadow","horizontalPadding","verticalPadding","forward","attributes","include"],"sourceRoot":""}