@descope/web-components-ui 3.12.0 → 3.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs.js +4121 -2426
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3165 -1468
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/6618.js +591 -0
- package/dist/umd/{7387.js.LICENSE.txt → 6618.js.LICENSE.txt} +6 -0
- package/dist/umd/6618.js.map +1 -0
- package/dist/umd/8350.js +2 -0
- package/dist/umd/8350.js.map +1 -0
- package/dist/umd/9265.js +2 -0
- package/dist/umd/9265.js.map +1 -0
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js +449 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
- package/dist/umd/descope-date-field-index-js.js +1 -1
- package/dist/umd/descope-date-field-index-js.js.map +1 -1
- package/dist/umd/descope-email-field-index-js.js +2 -2
- package/dist/umd/descope-email-field-index-js.js.map +1 -1
- package/dist/umd/descope-hybrid-field-index-js.js +1 -1
- package/dist/umd/descope-hybrid-field-index-js.js.map +1 -1
- package/dist/umd/descope-month-day-field-picker.js +114 -0
- package/dist/umd/descope-month-day-field-picker.js.LICENSE.txt +11 -0
- package/dist/umd/descope-month-day-field-picker.js.map +1 -0
- package/dist/umd/descope-month-day-field.js +2 -0
- package/dist/umd/descope-month-day-field.js.map +1 -0
- package/dist/umd/descope-new-password-index-js.js +1 -1
- package/dist/umd/descope-new-password-index-js.js.map +1 -1
- package/dist/umd/descope-number-field-index-js.js +1 -1
- package/dist/umd/descope-number-field-index-js.js.map +1 -1
- package/dist/umd/descope-passcode-index-js.js +1 -1
- package/dist/umd/descope-passcode-index-js.js.map +1 -1
- package/dist/umd/descope-radio-group-index-js.js +1 -1
- package/dist/umd/descope-radio-group-index-js.js.map +1 -1
- package/dist/umd/descope-security-questions-setup-index-js.js +1 -1
- package/dist/umd/descope-security-questions-setup-index-js.js.map +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -1
- package/dist/umd/descope-text-field.js +38 -0
- package/dist/umd/descope-text-field.js.map +1 -0
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -1
- package/package.json +39 -36
- package/src/components/descope-date-field/DateFieldClass.js +1 -1
- package/src/components/descope-date-field/index.js +1 -1
- package/src/components/descope-email-field/EmailFieldClass.js +1 -1
- package/src/components/descope-new-password/index.js +1 -1
- package/src/components/descope-number-field/NumberFieldClass.js +1 -1
- package/src/components/descope-passcode/PasscodeClass.js +1 -1
- package/src/components/descope-passcode/index.js +1 -1
- package/src/components/descope-radio-group/RadioGroupClass.js +1 -1
- package/src/components/descope-security-questions-setup/SecurityQuestionsSetupClass.js +1 -1
- package/src/components/descope-security-questions-setup/index.js +1 -1
- package/src/components/descope-security-questions-verify/SecurityQuestionsVerifyClass.js +1 -1
- package/src/components/descope-security-questions-verify/index.js +1 -1
- package/src/components/mapping-fields/descope-mappings-field/index.js +1 -1
- package/src/components/mapping-fields/descope-saml-group-mappings/index.js +1 -1
- package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +1 -1
- package/src/components/phone-fields/descope-phone-field/descope-phone-field-internal/index.js +1 -1
- package/src/components/phone-fields/descope-phone-field/index.js +1 -1
- package/src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js +1 -1
- package/src/components/phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js +1 -1
- package/src/components/phone-fields/descope-phone-input-box-field/index.js +1 -1
- package/src/index.cjs.js +2 -2
- package/src/index.js +0 -1
- package/src/theme/components/index.js +5 -1
- package/stories/descope-text-field.stories.js +1 -1
- package/dist/umd/3685.js +0 -2
- package/dist/umd/3685.js.map +0 -1
- package/dist/umd/4518.js +0 -450
- package/dist/umd/4518.js.map +0 -1
- package/dist/umd/7387.js +0 -144
- package/dist/umd/7387.js.map +0 -1
- package/dist/umd/descope-text-field-index-js.js +0 -38
- package/dist/umd/descope-text-field-index-js.js.map +0 -1
- package/src/components/descope-text-field/TextFieldClass.js +0 -142
- package/src/components/descope-text-field/index.js +0 -9
- package/src/components/descope-text-field/textFieldMappings.js +0 -169
- package/src/theme/components/textField.js +0 -71
- /package/dist/umd/{4518.js.LICENSE.txt → descope-date-field-descope-calendar-index-js.js.LICENSE.txt} +0 -0
- /package/dist/umd/{descope-text-field-index-js.js.LICENSE.txt → descope-text-field.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"6618.js","mappings":";sPAOO,MAAMA,E,SAAe,EAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCCUxB,MAAMC,EAAeC,GAC1B,eAA+B,QAAY,QAAc,OAAWA,MAClE,qBAAWC,GACT,MAAO,CAOLC,SAAU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BrC,KAAKwC,YAAcH,EACnBrC,KAAKyC,WAAaJ,KAGtBrC,KAAKkB,cAAc,IAAI,IAAwBlB,KAAK0C,aAAc1C,KAAK2C,kBACzE,IC5DJ,QAAe,oBAAqB,IAAkB,CAAE9B,SAAU,6BAuE3D,MAAMiV,UAAkBJ,GAAe,SAAc,OAAa,SACvE,aAAW3U,GACT,MAAO,mBACT,CAEA,mBAAWC,GACT,OAAO,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoCb,CAEA,qBAAWzB,GACT,MAAO,CAILoW,UAAW,CACTlW,KAAMC,QAMRkW,UAAW,CACTnW,KAAMC,QAGZ,CAGA,KAAAI,GACEC,MAAMD,QAENE,KAAKiB,mBAAqB,IAAI,IAAkBjB,MAChDA,KAAKiB,mBAAmB2B,YAAY,OACpC5C,KAAKiB,mBAAmB4B,cAAc7C,KAAK0C,cAC3C1C,KAAKkB,cAAclB,KAAKiB,mBAC1B,GAGF,OAAoB6U,E,wCCrJpB,E,SAAA,IAAe,oBAAqB,IAAkB,CACpDjV,SAAU,2B","sources":["webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button-base.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/src/vaadin-button.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/button/theme/lumo/vaadin-button-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/combo-box/theme/lumo/vaadin-combo-box-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/combo-box/src/vaadin-combo-box-item.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/combo-box/src/vaadin-combo-box-overlay.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/combo-box/src/vaadin-combo-box-scroller.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/pattern-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/combo-box/src/vaadin-combo-box.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@open-wc/dedupe-mixin/src/dedupeMixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/polylit-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/popover/src/vaadin-popover-overlay-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/popover/src/vaadin-popover-overlay.js","webpack://@descope/web-components-ui/../../../node_modules/lit-html/directives/if-defined.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/popover/src/vaadin-popover-target-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/popover/src/vaadin-popover.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/popover/src/vaadin-popover-position-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/theme/lumo/vaadin-text-field-styles.js"],"sourcesContent":["/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const buttonStyles = css`\n :host {\n display: inline-block;\n position: relative;\n outline: none;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Aligns the button with form fields when placed on the same line.\n Note, to make it work, the form fields should have the same \"::before\" pseudo-element. */\n .vaadin-button-container::before {\n content: '\\\\2003';\n display: inline-block;\n width: 0;\n max-height: 100%;\n }\n\n .vaadin-button-container {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n width: 100%;\n height: 100%;\n min-height: inherit;\n text-shadow: inherit;\n }\n\n [part='prefix'],\n [part='suffix'] {\n flex: none;\n }\n\n [part='label'] {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n @media (forced-colors: active) {\n :host {\n outline: 1px solid;\n outline-offset: -1px;\n }\n\n :host([focused]) {\n outline-width: 2px;\n }\n\n :host([disabled]) {\n outline-color: GrayText;\n }\n }\n`;\n\nexport const buttonTemplate = (html) => html`\n <div class=\"vaadin-button-container\">\n <span part=\"prefix\" aria-hidden=\"true\">\n <slot name=\"prefix\"></slot>\n </span>\n <span part=\"label\">\n <slot></slot>\n </span>\n <span part=\"suffix\" aria-hidden=\"true\">\n <slot name=\"suffix\"></slot>\n </span>\n </div>\n <slot name=\"tooltip\"></slot>\n`;\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\nimport { TabindexMixin } from '@vaadin/a11y-base/src/tabindex-mixin.js';\n\n/**\n * A mixin providing common button functionality.\n *\n * @polymerMixin\n * @mixes ActiveMixin\n * @mixes FocusMixin\n * @mixes TabindexMixin\n */\nexport const ButtonMixin = (superClass) =>\n class ButtonMixinClass extends ActiveMixin(TabindexMixin(FocusMixin(superClass))) {\n static get properties() {\n return {\n /**\n * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.\n *\n * @override\n * @protected\n */\n tabindex: {\n type: Number,\n value: 0,\n reflectToAttribute: true,\n },\n };\n }\n\n /**\n * By default, `Space` is the only possible activation key for a focusable HTML element.\n * Nonetheless, the button is an exception as it can be also activated by pressing `Enter`.\n * See the \"Keyboard Support\" section in https://www.w3.org/TR/wai-aria-practices/examples/button/button.html.\n *\n * @protected\n * @override\n */\n get _activeKeys() {\n return ['Enter', ' '];\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n // By default, if the user hasn't provided a custom role,\n // the role attribute is set to \"button\".\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n }\n\n /**\n * Since the button component is designed on the base of the `[role=button]` attribute,\n * and doesn't have a native <button> inside, in order to be fully accessible from the keyboard,\n * it should manually fire the `click` event once an activation key is pressed,\n * as it follows from the WAI-ARIA specifications:\n * https://www.w3.org/TR/wai-aria-practices-1.1/#button\n *\n * According to the UI Events specifications,\n * the `click` event should be fired exactly on `keydown`:\n * https://www.w3.org/TR/uievents/#event-type-keydown\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {\n return;\n }\n\n if (this._activeKeys.includes(event.key)) {\n event.preventDefault();\n\n // `DisabledMixin` overrides the standard `click()` method\n // so that it doesn't fire the `click` event when the element is disabled.\n this.click();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { buttonStyles, buttonTemplate } from './vaadin-button-base.js';\nimport { ButtonMixin } from './vaadin-button-mixin.js';\n\nregisterStyles('vaadin-button', buttonStyles, { moduleId: 'vaadin-button-styles' });\n\n/**\n * `<vaadin-button>` is an accessible and customizable button that allows users to perform actions.\n *\n * ```html\n * <vaadin-button>Press me</vaadin-button>\n * ```\n *\n * ### Styling\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ----------|-------------\n * `label` | The label (text) inside the button.\n * `prefix` | A slot for content before the label (e.g. an icon).\n * `suffix` | A slot for content after the label (e.g. an icon).\n *\n * The following attributes are available for styling:\n *\n * Attribute | Description\n * -------------|-------------\n * `active` | Set when the button is pressed down, either with mouse, touch or the keyboard.\n * `disabled` | Set when the button is disabled.\n * `focus-ring` | Set when the button is focused using the keyboard.\n * `focused` | Set when the button is focused.\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ButtonMixin\n * @mixes ControllerMixin\n * @mixes ElementMixin\n * @mixes ThemableMixin\n */\nclass Button extends ButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement)))) {\n static get is() {\n return 'vaadin-button';\n }\n\n static get template() {\n return buttonTemplate(html);\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(Button);\n\nexport { Button };\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/spacing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport '@vaadin/vaadin-lumo-styles/typography.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst button = css`\n :host {\n /* Sizing */\n --lumo-button-size: var(--lumo-size-m);\n min-width: var(--vaadin-button-min-width, calc(var(--_button-size) * 2));\n height: var(--_button-size);\n padding: var(--vaadin-button-padding, 0 calc(var(--_button-size) / 3 + var(--lumo-border-radius-m) / 2));\n margin: var(--vaadin-button-margin, var(--lumo-space-xs) 0);\n box-sizing: border-box;\n /* Style */\n font-family: var(--lumo-font-family);\n font-size: var(--vaadin-button-font-size, var(--lumo-font-size-m));\n font-weight: var(--vaadin-button-font-weight, 500);\n color: var(--_lumo-button-text-color);\n background: var(--_lumo-button-background);\n border: var(--vaadin-button-border, none);\n border-radius: var(--vaadin-button-border-radius, var(--lumo-border-radius-m));\n cursor: var(--lumo-clickable-cursor);\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n flex-shrink: 0;\n --_button-size: var(--vaadin-button-height, var(--lumo-button-size));\n --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));\n --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);\n /* Used by notification */\n --_lumo-button-background: var(--vaadin-button-background, var(--lumo-contrast-5pct));\n --_lumo-button-text-color: var(--vaadin-button-text-color, var(--lumo-primary-text-color));\n --_lumo-button-primary-background: var(--vaadin-button-primary-background, var(--lumo-primary-color));\n --_lumo-button-primary-text-color: var(--vaadin-button-primary-text-color, var(--lumo-primary-contrast-color));\n }\n\n /* Set only for the internal parts so we don't affect the host vertical alignment */\n [part='label'],\n [part='prefix'],\n [part='suffix'] {\n line-height: var(--lumo-line-height-xs);\n }\n\n [part='label'] {\n padding: calc(var(--lumo-button-size) / 6) 0;\n }\n\n :host([theme~='small']) {\n font-size: var(--lumo-font-size-s);\n --lumo-button-size: var(--lumo-size-s);\n }\n\n :host([theme~='large']) {\n font-size: var(--lumo-font-size-l);\n --lumo-button-size: var(--lumo-size-l);\n }\n\n /* For interaction states */\n :host::before,\n :host::after {\n content: '';\n /* We rely on the host always being relative */\n position: absolute;\n z-index: 1;\n inset: 0;\n background-color: currentColor;\n border-radius: inherit;\n opacity: 0;\n pointer-events: none;\n }\n\n /* Hover */\n\n @media (any-hover: hover) {\n :host(:hover)::before {\n opacity: 0.02;\n }\n }\n\n /* Active */\n\n :host::after {\n transition: opacity 1.4s, transform 0.1s;\n filter: blur(8px);\n }\n\n :host([active])::before {\n opacity: 0.05;\n transition-duration: 0s;\n }\n\n :host([active])::after {\n opacity: 0.1;\n transition-duration: 0s, 0s;\n transform: scale(0);\n }\n\n /* Keyboard focus */\n\n :host([focus-ring]) {\n box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);\n }\n\n :host([theme~='primary'][focus-ring]) {\n box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);\n }\n\n /* Types (primary, tertiary, tertiary-inline */\n\n :host([theme~='tertiary']),\n :host([theme~='tertiary-inline']) {\n --_background: transparent !important;\n background: var(--vaadin-button-tertiary-background, var(--_background));\n min-width: 0;\n }\n\n :host([theme~='tertiary']) {\n border: var(--vaadin-button-tertiary-border, none);\n color: var(--vaadin-button-tertiary-text-color, var(--lumo-primary-text-color));\n font-weight: var(--vaadin-button-tertiary-font-weight, 500);\n padding: var(--vaadin-button-tertiary-padding, 0 calc(var(--_button-size) / 6));\n }\n\n :host([theme~='tertiary-inline'])::before {\n display: none;\n }\n\n :host([theme~='tertiary-inline']) {\n margin: 0;\n height: auto;\n padding: 0;\n line-height: inherit;\n font-size: inherit;\n }\n\n :host([theme~='tertiary-inline']) [part='label'] {\n padding: 0;\n overflow: visible;\n line-height: inherit;\n }\n\n :host([theme~='primary']) {\n background: var(--_lumo-button-primary-background);\n border: var(--vaadin-button-primary-border, none);\n color: var(--_lumo-button-primary-text-color);\n font-weight: var(--vaadin-button-primary-font-weight, 600);\n min-width: calc(var(--lumo-button-size) * 2.5);\n }\n\n :host([theme~='primary'])::before {\n background-color: black;\n }\n\n @media (any-hover: hover) {\n :host([theme~='primary']:hover)::before {\n opacity: 0.05;\n }\n }\n\n :host([theme~='primary'][active])::before {\n opacity: 0.1;\n }\n\n :host([theme~='primary'][active])::after {\n opacity: 0.2;\n }\n\n /* Colors (success, error, contrast) */\n\n :host([theme~='success']) {\n color: var(--lumo-success-text-color);\n }\n\n :host([theme~='success'][theme~='primary']) {\n background-color: var(--lumo-success-color);\n color: var(--lumo-success-contrast-color);\n }\n\n :host([theme~='error']) {\n color: var(--lumo-error-text-color);\n }\n\n :host([theme~='error'][theme~='primary']) {\n background-color: var(--lumo-error-color);\n color: var(--lumo-error-contrast-color);\n }\n\n :host([theme~='contrast']) {\n color: var(--lumo-contrast);\n }\n\n :host([theme~='contrast'][theme~='primary']) {\n background-color: var(--lumo-contrast);\n color: var(--lumo-base-color);\n }\n\n /* Disabled state. Keep selectors after other color variants. */\n\n :host([disabled]) {\n pointer-events: none;\n color: var(--lumo-disabled-text-color);\n }\n\n :host([theme~='primary'][disabled]) {\n background-color: var(--lumo-contrast-30pct);\n color: var(--lumo-base-color);\n }\n\n :host([theme~='primary'][disabled]) [part] {\n opacity: 0.7;\n }\n\n /* Icons */\n\n [part] ::slotted(vaadin-icon) {\n display: inline-block;\n width: var(--lumo-icon-size-m);\n height: var(--lumo-icon-size-m);\n }\n\n /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */\n [part] ::slotted(vaadin-icon[icon^='vaadin:']) {\n padding: 0.25em;\n box-sizing: border-box !important;\n }\n\n [part='prefix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n [part='suffix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n /* Icon-only */\n\n :host([theme~='icon']:not([theme~='tertiary-inline'])) {\n min-width: var(--lumo-button-size);\n padding-left: calc(var(--lumo-button-size) / 4);\n padding-right: calc(var(--lumo-button-size) / 4);\n }\n\n :host([theme~='icon']) [part='prefix'],\n :host([theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* RTL specific styles */\n\n :host([dir='rtl']) [part='prefix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n :host([dir='rtl']) [part='suffix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n :host([dir='rtl'][theme~='icon']) [part='prefix'],\n :host([dir='rtl'][theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n`;\n\nregisterStyles('vaadin-button', button, { moduleId: 'lumo-button' });\n\nexport { button };\n","import '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';\nimport '@vaadin/vaadin-lumo-styles/font-icons.js';\nimport { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst comboBox = css`\n :host {\n outline: none;\n }\n\n [part='toggle-button']::before {\n content: var(--lumo-icons-dropdown);\n }\n`;\n\nregisterStyles('vaadin-combo-box', [inputFieldShared, comboBox], { moduleId: 'lumo-combo-box' });\n","/**\n * @license\n * Copyright (c) 2015 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';\nimport { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { ComboBoxItemMixin } from './vaadin-combo-box-item-mixin.js';\n\n/**\n * An item element used by the `<vaadin-combo-box>` dropdown.\n *\n * ### Styling\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ------------|--------------\n * `checkmark` | The graphical checkmark shown for a selected item\n * `content` | The element that wraps the item content\n *\n * The following state attributes are exposed for styling:\n *\n * Attribute | Description\n * -------------|-------------\n * `selected` | Set when the item is selected\n * `focused` | Set when the item is focused\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @customElement\n * @mixes ComboBoxItemMixin\n * @mixes ThemableMixin\n * @mixes DirMixin\n * @private\n */\nexport class ComboBoxItem extends ComboBoxItemMixin(ThemableMixin(DirMixin(PolymerElement))) {\n static get template() {\n return html`\n <style>\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none;\n }\n </style>\n <span part=\"checkmark\" aria-hidden=\"true\"></span>\n <div part=\"content\">\n <slot></slot>\n </div>\n `;\n }\n\n static get is() {\n return 'vaadin-combo-box-item';\n }\n}\n\ndefineCustomElement(ComboBoxItem);\n","/**\n * @license\n * Copyright (c) 2015 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';\nimport { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';\nimport { overlayStyles } from '@vaadin/overlay/src/vaadin-overlay-styles.js';\nimport { css, registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { ComboBoxOverlayMixin } from './vaadin-combo-box-overlay-mixin.js';\n\nconst comboBoxOverlayStyles = css`\n #overlay {\n width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));\n }\n\n [part='content'] {\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n`;\n\nregisterStyles('vaadin-combo-box-overlay', [overlayStyles, comboBoxOverlayStyles], {\n moduleId: 'vaadin-combo-box-overlay-styles',\n});\n\n/**\n * An element used internally by `<vaadin-combo-box>`. Not intended to be used separately.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ComboBoxOverlayMixin\n * @mixes DirMixin\n * @mixes OverlayMixin\n * @mixes ThemableMixin\n * @private\n */\nexport class ComboBoxOverlay extends ComboBoxOverlayMixin(OverlayMixin(DirMixin(ThemableMixin(PolymerElement)))) {\n static get is() {\n return 'vaadin-combo-box-overlay';\n }\n\n static get template() {\n return html`\n <div id=\"backdrop\" part=\"backdrop\" hidden></div>\n <div part=\"overlay\" id=\"overlay\">\n <div part=\"loader\"></div>\n <div part=\"content\" id=\"content\"><slot></slot></div>\n </div>\n `;\n }\n}\n\ndefineCustomElement(ComboBoxOverlay);\n","/**\n * @license\n * Copyright (c) 2015 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ComboBoxScrollerMixin } from './vaadin-combo-box-scroller-mixin.js';\n\n/**\n * An element used internally by `<vaadin-combo-box>`. Not intended to be used separately.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ComboBoxScrollerMixin\n * @private\n */\nexport class ComboBoxScroller extends ComboBoxScrollerMixin(PolymerElement) {\n static get is() {\n return 'vaadin-combo-box-scroller';\n }\n\n static get template() {\n return html`\n <style>\n :host {\n display: block;\n min-height: 1px;\n overflow: auto;\n\n /* Fixes item background from getting on top of scrollbars on Safari */\n transform: translate3d(0, 0, 0);\n\n /* Enable momentum scrolling on iOS */\n -webkit-overflow-scrolling: touch;\n\n /* Fixes scrollbar disappearing when 'Show scroll bars: Always' enabled in Safari */\n box-shadow: 0 0 0 white;\n }\n\n #selector {\n border-width: var(--_vaadin-combo-box-items-container-border-width);\n border-style: var(--_vaadin-combo-box-items-container-border-style);\n border-color: var(--_vaadin-combo-box-items-container-border-color, transparent);\n position: relative;\n }\n </style>\n <div id=\"selector\">\n <slot></slot>\n </div>\n `;\n }\n}\n\ndefineCustomElement(ComboBoxScroller);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputConstraintsMixin } from './input-constraints-mixin.js';\n\n/**\n * A mixin to provide `pattern` property.\n *\n * @polymerMixin\n * @mixes InputConstraintsMixin\n */\nexport const PatternMixin = (superclass) =>\n class PatternMixinClass extends InputConstraintsMixin(superclass) {\n static get properties() {\n return {\n /**\n * A regular expression that the value is checked against.\n * The pattern must match the entire value, not just some subset.\n */\n pattern: {\n type: String,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'pattern'];\n }\n\n static get constraints() {\n return [...super.constraints, 'pattern'];\n }\n };\n","/**\n * @license\n * Copyright (c) 2015 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/src/vaadin-input-container.js';\nimport './vaadin-combo-box-item.js';\nimport './vaadin-combo-box-overlay.js';\nimport './vaadin-combo-box-scroller.js';\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { InputControlMixin } from '@vaadin/field-base/src/input-control-mixin.js';\nimport { InputController } from '@vaadin/field-base/src/input-controller.js';\nimport { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';\nimport { PatternMixin } from '@vaadin/field-base/src/pattern-mixin.js';\nimport { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { ComboBoxDataProviderMixin } from './vaadin-combo-box-data-provider-mixin.js';\nimport { ComboBoxMixin } from './vaadin-combo-box-mixin.js';\n\nregisterStyles('vaadin-combo-box', inputFieldShared, { moduleId: 'vaadin-combo-box-styles' });\n\n/**\n * `<vaadin-combo-box>` is a web component for choosing a value from a filterable list of options\n * presented in a dropdown overlay. The options can be provided as a list of strings or objects\n * by setting [`items`](#/elements/vaadin-combo-box#property-items) property on the element.\n *\n * ```html\n * <vaadin-combo-box id=\"combo-box\"></vaadin-combo-box>\n * ```\n *\n * ```js\n * document.querySelector('#combo-box').items = ['apple', 'orange', 'banana'];\n * ```\n *\n * When the selected `value` is changed, a `value-changed` event is triggered.\n *\n * ### Item rendering\n *\n * To customize the content of the `<vaadin-combo-box-item>` elements placed in the dropdown, use\n * [`renderer`](#/elements/vaadin-combo-box#property-renderer) property which accepts a function.\n * The renderer function is called with `root`, `comboBox`, and `model` as arguments.\n *\n * Generate DOM content by using `model` object properties if needed, and append it to the `root`\n * element. The `comboBox` reference is provided to access the combo-box element state. Do not\n * set combo-box properties in a `renderer` function.\n *\n * ```js\n * const comboBox = document.querySelector('#combo-box');\n * comboBox.items = [{'label': 'Hydrogen', 'value': 'H'}];\n * comboBox.renderer = (root, comboBox, model) => {\n * const item = model.item;\n * root.innerHTML = `${model.index}: ${item.label} <b>${item.value}</b>`;\n * };\n * ```\n *\n * Renderer is called on the opening of the combo-box and each time the related model is updated.\n * Before creating new content, it is recommended to check if there is already an existing DOM\n * element in `root` from a previous renderer call for reusing it. Even though combo-box uses\n * infinite scrolling, reducing DOM operations might improve performance.\n *\n * The following properties are available in the `model` argument:\n *\n * Property | Type | Description\n * -----------|------------------|-------------\n * `index` | Number | Index of the item in the `items` array\n * `item` | String or Object | The item reference\n * `selected` | Boolean | True when item is selected\n * `focused` | Boolean | True when item is focused\n *\n * ### Lazy Loading with Function Data Provider\n *\n * In addition to assigning an array to the items property, you can alternatively use the\n * [`dataProvider`](#/elements/vaadin-combo-box#property-dataProvider) function property.\n * The `<vaadin-combo-box>` calls this function lazily, only when it needs more data\n * to be displayed.\n *\n * __Note that when using function data providers, the total number of items\n * needs to be set manually. The total number of items can be returned\n * in the second argument of the data provider callback:__\n *\n * ```js\n * comboBox.dataProvider = async (params, callback) => {\n * const API = 'https://demo.vaadin.com/demo-data/1.0/filtered-countries';\n * const { filter, page, pageSize } = params;\n * const index = page * pageSize;\n *\n * const res = await fetch(`${API}?index=${index}&count=${pageSize}&filter=${filter}`);\n * if (res.ok) {\n * const { result, size } = await res.json();\n * callback(result, size);\n * }\n * };\n * ```\n *\n * ### Styling\n *\n * The following custom properties are available for styling:\n *\n * Custom property | Description | Default\n * ----------------------------------------|----------------------------|---------\n * `--vaadin-field-default-width` | Default width of the field | `12em`\n * `--vaadin-combo-box-overlay-width` | Width of the overlay | `auto`\n * `--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n *\n * `<vaadin-combo-box>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\n * See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation.\n *\n * In addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n *\n * Part name | Description\n * ----------------|----------------\n * `toggle-button` | The toggle button\n *\n * In addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n *\n * Attribute | Description | Part name\n * ----------|-------------|------------\n * `opened` | Set when the combo box dropdown is open | :host\n * `loading` | Set when new items are expected | :host\n *\n * If you want to replace the default `<input>` and its container with a custom implementation to get full control\n * over the input field, consider using the [`<vaadin-combo-box-light>`](#/elements/vaadin-combo-box-light) element.\n *\n * ### Internal components\n *\n * In addition to `<vaadin-combo-box>` itself, the following internal\n * components are themable:\n *\n * - `<vaadin-combo-box-overlay>` - has the same API as [`<vaadin-overlay>`](#/elements/vaadin-overlay).\n * - `<vaadin-combo-box-item>` - has the same API as [`<vaadin-item>`](#/elements/vaadin-item).\n * - [`<vaadin-input-container>`](#/elements/vaadin-input-container) - an internal element wrapping the input.\n *\n * Note: the `theme` attribute value set on `<vaadin-combo-box>` is\n * propagated to the internal components listed above.\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {Event} change - Fired when the user commits a value change.\n * @fires {CustomEvent} custom-value-set - Fired when the user sets a custom value.\n * @fires {CustomEvent} filter-changed - Fired when the `filter` property changes.\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.\n * @fires {CustomEvent} selected-item-changed - Fired when the `selectedItem` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ElementMixin\n * @mixes ThemableMixin\n * @mixes InputControlMixin\n * @mixes PatternMixin\n * @mixes ComboBoxDataProviderMixin\n * @mixes ComboBoxMixin\n */\nclass ComboBox extends ComboBoxDataProviderMixin(\n ComboBoxMixin(PatternMixin(InputControlMixin(ThemableMixin(ElementMixin(PolymerElement))))),\n) {\n static get is() {\n return 'vaadin-combo-box';\n }\n\n static get template() {\n return html`\n <style>\n :host([opened]) {\n pointer-events: auto;\n }\n </style>\n\n <div class=\"vaadin-combo-box-container\">\n <div part=\"label\">\n <slot name=\"label\"></slot>\n <span part=\"required-indicator\" aria-hidden=\"true\" on-click=\"focus\"></span>\n </div>\n\n <vaadin-input-container\n part=\"input-field\"\n readonly=\"[[readonly]]\"\n disabled=\"[[disabled]]\"\n invalid=\"[[invalid]]\"\n theme$=\"[[_theme]]\"\n >\n <slot name=\"prefix\" slot=\"prefix\"></slot>\n <slot name=\"input\"></slot>\n <div id=\"clearButton\" part=\"clear-button\" slot=\"suffix\" aria-hidden=\"true\"></div>\n <div id=\"toggleButton\" part=\"toggle-button\" slot=\"suffix\" aria-hidden=\"true\"></div>\n </vaadin-input-container>\n\n <div part=\"helper-text\">\n <slot name=\"helper\"></slot>\n </div>\n\n <div part=\"error-message\">\n <slot name=\"error-message\"></slot>\n </div>\n </div>\n\n <vaadin-combo-box-overlay\n id=\"overlay\"\n opened=\"[[_overlayOpened]]\"\n loading$=\"[[loading]]\"\n theme$=\"[[_theme]]\"\n position-target=\"[[_positionTarget]]\"\n no-vertical-overlap\n restore-focus-node=\"[[inputElement]]\"\n ></vaadin-combo-box-overlay>\n\n <slot name=\"tooltip\"></slot>\n `;\n }\n\n static get properties() {\n return {\n /**\n * @protected\n */\n _positionTarget: {\n type: Object,\n },\n };\n }\n\n /**\n * Used by `InputControlMixin` as a reference to the clear button element.\n * @protected\n * @return {!HTMLElement}\n */\n get clearElement() {\n return this.$.clearButton;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(\n new InputController(this, (input) => {\n this._setInputElement(input);\n this._setFocusElement(input);\n this.stateTarget = input;\n this.ariaTarget = input;\n }),\n );\n this.addController(new LabelledInputController(this.inputElement, this._labelController));\n\n this._tooltipController = new TooltipController(this);\n this.addController(this._tooltipController);\n this._tooltipController.setPosition('top');\n this._tooltipController.setAriaTarget(this.inputElement);\n this._tooltipController.setShouldShow((target) => !target.opened);\n\n this._positionTarget = this.shadowRoot.querySelector('[part=\"input-field\"]');\n this._toggleElement = this.$.toggleButton;\n }\n\n /**\n * Override the method from `InputControlMixin`\n * to stop event propagation to prevent `ComboBoxMixin`\n * from handling this click event also on its own.\n *\n * @param {Event} event\n * @protected\n * @override\n */\n _onClearButtonClick(event) {\n event.stopPropagation();\n super._onClearButtonClick(event);\n }\n\n /**\n * @param {Event} event\n * @protected\n */\n _onHostClick(event) {\n const path = event.composedPath();\n\n // Open dropdown only when clicking on the label or input field\n if (path.includes(this._labelNode) || path.includes(this._positionTarget)) {\n super._onHostClick(event);\n }\n }\n}\n\ndefineCustomElement(ComboBox);\n\nexport { ComboBox };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputControlMixin } from './input-control-mixin.js';\n\n/**\n * A mixin to provide logic for vaadin-text-field and related components.\n *\n * @polymerMixin\n * @mixes InputControlMixin\n */\nexport const InputFieldMixin = (superclass) =>\n class InputFieldMixinClass extends InputControlMixin(superclass) {\n static get properties() {\n return {\n /**\n * Whether the value of the control can be automatically completed by the browser.\n * List of available options at:\n * https://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-autocomplete\n */\n autocomplete: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari that is used to control whether\n * autocorrection should be enabled when the user is entering/editing the text.\n * Possible values are:\n * on: Enable autocorrection.\n * off: Disable autocorrection.\n */\n autocorrect: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari and Chrome that is used to control whether\n * autocapitalization should be enabled when the user is entering/editing the text.\n * Possible values are:\n * characters: Characters capitalization.\n * words: Words capitalization.\n * sentences: Sentences capitalization.\n * none: No capitalization.\n */\n autocapitalize: {\n type: String,\n reflectToAttribute: true,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'autocapitalize', 'autocomplete', 'autocorrect'];\n }\n\n // Workaround for https://github.com/Polymer/polymer/issues/5259\n get __data() {\n return this.__dataValue || {};\n }\n\n set __data(value) {\n this.__dataValue = value;\n }\n\n /**\n * @param {HTMLElement} input\n * @protected\n * @override\n */\n _inputElementChanged(input) {\n super._inputElementChanged(input);\n\n if (input) {\n // Discard value set on the custom slotted input.\n if (input.value && input.value !== this.value) {\n console.warn(`Please define value on the <${this.localName}> component!`);\n input.value = '';\n }\n\n if (this.value) {\n input.value = this.value;\n }\n }\n }\n\n /**\n * Override an event listener from `FocusMixin`.\n * @param {boolean} focused\n * @protected\n * @override\n */\n _setFocused(focused) {\n super._setFocused(focused);\n\n // Do not validate when focusout is caused by document\n // losing focus, which happens on browser tab switch.\n if (!focused && document.hasFocus()) {\n this.validate();\n }\n }\n\n /**\n * Override an event listener from `InputMixin`\n * to mark as valid after user started typing.\n * @param {Event} event\n * @protected\n * @override\n */\n _onInput(event) {\n super._onInput(event);\n\n if (this.invalid) {\n this.validate();\n }\n }\n\n /**\n * Override an observer from `InputMixin` to validate the field\n * when a new value is set programmatically.\n *\n * @param {string | undefined} newValue\n * @param {string | undefined} oldValue\n * @protected\n * @override\n */\n _valueChanged(newValue, oldValue) {\n super._valueChanged(newValue, oldValue);\n\n if (oldValue === undefined) {\n return;\n }\n\n if (this.invalid) {\n this.validate();\n }\n }\n };\n","const appliedClassMixins = new WeakMap();\n\n/** Vefify if the Mixin was previously applyed\n * @private\n * @param {function} mixin Mixin being applyed\n * @param {object} superClass Class receiving the new mixin\n * @returns {boolean}\n */\nfunction wasMixinPreviouslyApplied(mixin, superClass) {\n let klass = superClass;\n while (klass) {\n if (appliedClassMixins.get(klass) === mixin) {\n return true;\n }\n klass = Object.getPrototypeOf(klass);\n }\n return false;\n}\n\n/** Apply each mixin in the chain to make sure they are not applied more than once to the final class.\n * @export\n * @param {function} mixin Mixin to be applyed\n * @returns {object} Mixed class with mixin applied\n */\nexport function dedupeMixin(mixin) {\n return superClass => {\n if (wasMixinPreviouslyApplied(mixin, superClass)) {\n return superClass;\n }\n const mixedClass = mixin(superClass);\n appliedClassMixins.set(mixedClass, mixin);\n return mixedClass;\n };\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupeMixin } from '@open-wc/dedupe-mixin';\nimport { get, set } from './path-utils.js';\n\nconst caseMap = {};\n\nconst CAMEL_TO_DASH = /([A-Z])/gu;\n\nfunction camelToDash(camel) {\n if (!caseMap[camel]) {\n caseMap[camel] = camel.replace(CAMEL_TO_DASH, '-$1').toLowerCase();\n }\n return caseMap[camel];\n}\n\nfunction upper(name) {\n return name[0].toUpperCase() + name.substring(1);\n}\n\nfunction parseObserver(observerString) {\n const [method, rest] = observerString.split('(');\n const observerProps = rest\n .replace(')', '')\n .split(',')\n .map((prop) => prop.trim());\n\n return {\n method,\n observerProps,\n };\n}\n\nfunction getOrCreateMap(obj, name) {\n if (!Object.prototype.hasOwnProperty.call(obj, name)) {\n // Clone any existing entries (superclasses)\n obj[name] = new Map(obj[name]);\n }\n return obj[name];\n}\n\nconst PolylitMixinImplementation = (superclass) => {\n class PolylitMixinClass extends superclass {\n static createProperty(name, options) {\n if ([String, Boolean, Number, Array].includes(options)) {\n options = {\n type: options,\n };\n }\n\n if (options.reflectToAttribute) {\n options.reflect = true;\n }\n\n super.createProperty(name, options);\n }\n\n static getOrCreateMap(name) {\n return getOrCreateMap(this, name);\n }\n\n /**\n * @protected\n * @override\n */\n static finalize() {\n super.finalize();\n\n if (Array.isArray(this.observers)) {\n const complexObservers = this.getOrCreateMap('__complexObservers');\n\n this.observers.forEach((observer) => {\n const { method, observerProps } = parseObserver(observer);\n complexObservers.set(method, observerProps);\n });\n }\n }\n\n static addCheckedInitializer(initializer) {\n super.addInitializer((instance) => {\n // Prevent initializer from affecting superclass\n if (instance instanceof this) {\n initializer(instance);\n }\n });\n }\n\n static getPropertyDescriptor(name, key, options) {\n const defaultDescriptor = super.getPropertyDescriptor(name, key, options);\n\n let result = defaultDescriptor;\n\n if (options.sync) {\n result = {\n get: defaultDescriptor.get,\n set(value) {\n const oldValue = this[name];\n this[key] = value;\n this.requestUpdate(name, oldValue, options);\n\n // Enforce synchronous update\n if (this.hasUpdated) {\n this.performUpdate();\n }\n },\n configurable: true,\n enumerable: true,\n };\n }\n\n if (options.readOnly) {\n const setter = defaultDescriptor.set;\n\n this.addCheckedInitializer((instance) => {\n // This is run during construction of the element\n instance[`_set${upper(name)}`] = function (value) {\n setter.call(instance, value);\n\n if (options.sync) {\n this.performUpdate();\n }\n };\n });\n\n result = {\n get: defaultDescriptor.get,\n set() {\n // Do nothing, property is read-only.\n },\n configurable: true,\n enumerable: true,\n };\n }\n\n if ('value' in options) {\n // Set the default value\n this.addCheckedInitializer((instance) => {\n const value = typeof options.value === 'function' ? options.value.call(instance) : options.value;\n\n if (options.readOnly) {\n instance[`_set${upper(name)}`](value);\n } else {\n instance[name] = value;\n }\n });\n }\n\n if (options.observer) {\n const method = options.observer;\n\n // Set this method\n this.getOrCreateMap('__observers').set(name, method);\n\n this.addCheckedInitializer((instance) => {\n if (!instance[method]) {\n console.warn(`observer method ${method} not defined`);\n }\n });\n }\n\n if (options.notify) {\n if (!this.__notifyProps) {\n this.__notifyProps = new Set();\n // eslint-disable-next-line no-prototype-builtins\n } else if (!this.hasOwnProperty('__notifyProps')) {\n // Clone any existing observers (superclasses)\n const notifyProps = this.__notifyProps;\n this.__notifyProps = new Set(notifyProps);\n }\n\n // Set this method\n this.__notifyProps.add(name);\n }\n\n if (options.computed) {\n const assignComputedMethod = `__assignComputed${name}`;\n const observer = parseObserver(options.computed);\n this.prototype[assignComputedMethod] = function (...props) {\n this[name] = this[observer.method](...props);\n };\n\n this.getOrCreateMap('__complexObservers').set(assignComputedMethod, observer.observerProps);\n }\n\n if (!options.attribute) {\n options.attribute = camelToDash(name);\n }\n\n return result;\n }\n\n /** @protected */\n firstUpdated() {\n super.firstUpdated();\n\n if (!this.$) {\n this.$ = {};\n }\n\n this.renderRoot.querySelectorAll('[id]').forEach((node) => {\n this.$[node.id] = node;\n });\n }\n\n /** @protected */\n ready() {}\n\n /** @protected */\n updated(props) {\n if (this.constructor.__observers) {\n this.__runObservers(props, this.constructor.__observers);\n }\n\n if (this.constructor.__complexObservers) {\n this.__runComplexObservers(props, this.constructor.__complexObservers);\n }\n\n if (this.__dynamicObservers) {\n this.__runComplexObservers(props, this.__dynamicObservers);\n }\n\n if (this.constructor.__notifyProps) {\n this.__runNotifyProps(props, this.constructor.__notifyProps);\n }\n\n if (!this.__isReadyInvoked) {\n this.__isReadyInvoked = true;\n this.ready();\n }\n }\n\n /** @protected */\n _createMethodObserver(observer) {\n const dynamicObservers = getOrCreateMap(this, '__dynamicObservers');\n const { method, observerProps } = parseObserver(observer);\n dynamicObservers.set(method, observerProps);\n }\n\n /** @private */\n __runComplexObservers(props, observers) {\n observers.forEach((observerProps, method) => {\n if (observerProps.some((prop) => props.has(prop))) {\n if (!this[method]) {\n console.warn(`observer method ${method} not defined`);\n } else {\n this[method](...observerProps.map((prop) => this[prop]));\n }\n }\n });\n }\n\n /** @private */\n __runObservers(props, observers) {\n props.forEach((v, k) => {\n const observer = observers.get(k);\n if (observer !== undefined && this[observer]) {\n this[observer](this[k], v);\n }\n });\n }\n\n /** @private */\n __runNotifyProps(props, notifyProps) {\n props.forEach((_, k) => {\n if (notifyProps.has(k)) {\n this.dispatchEvent(\n new CustomEvent(`${camelToDash(k)}-changed`, {\n detail: {\n value: this[k],\n },\n }),\n );\n }\n });\n }\n\n /** @protected */\n _get(path, object) {\n return get(path, object);\n }\n\n /** @protected */\n _set(path, value, object) {\n set(path, value, object);\n }\n }\n\n return PolylitMixinClass;\n};\n\nexport const PolylitMixin = dedupeMixin(PolylitMixinImplementation);\n","/**\n * @license\n * Copyright (c) 2022 - 2024 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';\nimport { PositionMixin } from '@vaadin/overlay/src/vaadin-overlay-position-mixin.js';\n\n/**\n * A mixin providing common popover overlay functionality.\n *\n * @polymerMixin\n * @mixes PositionMixin\n * @mixes OverlayMixin\n */\nexport const PopoverOverlayMixin = (superClass) =>\n class PopoverOverlayMixinClass extends PositionMixin(OverlayMixin(superClass)) {\n static get properties() {\n return {\n position: {\n type: String,\n reflectToAttribute: true,\n },\n };\n }\n\n /**\n * Tag name prefix used by custom properties.\n * @protected\n * @return {string}\n */\n get _tagNamePrefix() {\n return 'vaadin-popover';\n }\n\n requestContentUpdate() {\n super.requestContentUpdate();\n\n // Copy custom properties from the owner\n if (this.positionTarget && this.owner) {\n const style = getComputedStyle(this.owner);\n ['top', 'bottom', 'start', 'end'].forEach((prop) => {\n this.style.setProperty(\n `--${this._tagNamePrefix}-offset-${prop}`,\n style.getPropertyValue(`--${this._tagNamePrefix}-offset-${prop}`),\n );\n });\n }\n }\n\n /**\n * @protected\n * @override\n */\n _updatePosition() {\n super._updatePosition();\n\n if (!this.positionTarget || !this.opened) {\n return;\n }\n\n this.removeAttribute('arrow-centered');\n\n // Center the overlay horizontally\n if (this.position === 'bottom' || this.position === 'top') {\n const targetRect = this.positionTarget.getBoundingClientRect();\n const overlayRect = this.$.overlay.getBoundingClientRect();\n\n const offset = targetRect.width / 2 - overlayRect.width / 2;\n\n if (this.style.left) {\n const left = overlayRect.left + offset;\n if (left > 0) {\n this.style.left = `${left}px`;\n // Center the pointer arrow horizontally\n this.setAttribute('arrow-centered', '');\n }\n }\n\n if (this.style.right) {\n const right = parseFloat(this.style.right) + offset;\n if (right > 0) {\n this.style.right = `${right}px`;\n // Center the pointer arrow horizontally\n this.setAttribute('arrow-centered', '');\n }\n }\n }\n\n // Center the overlay vertically\n if (this.position === 'start' || this.position === 'end') {\n const targetRect = this.positionTarget.getBoundingClientRect();\n const overlayRect = this.$.overlay.getBoundingClientRect();\n\n const offset = targetRect.height / 2 - overlayRect.height / 2;\n this.style.top = `${overlayRect.top + offset}px`;\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2024 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css, html, LitElement } from 'lit';\nimport { isElementFocused } from '@vaadin/a11y-base/src/focus-utils.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';\nimport { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';\nimport { overlayStyles } from '@vaadin/overlay/src/vaadin-overlay-styles.js';\nimport { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { PopoverOverlayMixin } from './vaadin-popover-overlay-mixin.js';\n\n/**\n * An element used internally by `<vaadin-popover>`. Not intended to be used separately.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes DirMixin\n * @mixes PopoverOverlayMixin\n * @mixes ThemableMixin\n * @private\n */\nclass PopoverOverlay extends PopoverOverlayMixin(DirMixin(ThemableMixin(PolylitMixin(LitElement)))) {\n static get is() {\n return 'vaadin-popover-overlay';\n }\n\n static get styles() {\n return [\n overlayStyles,\n css`\n :host {\n --_vaadin-popover-content-width: auto;\n --_vaadin-popover-content-height: auto;\n }\n\n :host([modeless][with-backdrop]) [part='backdrop'] {\n pointer-events: none;\n }\n\n :host([position^='top'][top-aligned]) [part='overlay'],\n :host([position^='bottom'][top-aligned]) [part='overlay'] {\n margin-top: var(--vaadin-popover-offset-top, 0);\n }\n\n [part='overlay'] {\n position: relative;\n overflow: visible;\n max-height: 100%;\n }\n\n [part='content'] {\n overflow: auto;\n box-sizing: border-box;\n max-height: 100%;\n width: var(--_vaadin-popover-content-width);\n height: var(--_vaadin-popover-content-height);\n }\n\n /* Increase the area of the popover so the pointer can go from the target directly to it. */\n [part='overlay']::before {\n position: absolute;\n content: '';\n inset-block: calc(var(--vaadin-popover-offset-top, 0) * -1) calc(var(--vaadin-popover-offset-bottom, 0) * -1);\n inset-inline: calc(var(--vaadin-popover-offset-start, 0) * -1) calc(var(--vaadin-popover-offset-end, 0) * -1);\n z-index: -1;\n pointer-events: auto;\n }\n\n :host([position^='top'][bottom-aligned]) [part='overlay'],\n :host([position^='bottom'][bottom-aligned]) [part='overlay'] {\n margin-bottom: var(--vaadin-popover-offset-bottom, 0);\n }\n\n :host([position^='start'][start-aligned]) [part='overlay'],\n :host([position^='end'][start-aligned]) [part='overlay'] {\n margin-inline-start: var(--vaadin-popover-offset-start, 0);\n }\n\n :host([position^='start'][end-aligned]) [part='overlay'],\n :host([position^='end'][end-aligned]) [part='overlay'] {\n margin-inline-end: var(--vaadin-popover-offset-end, 0);\n }\n\n [part='arrow'] {\n display: none;\n position: absolute;\n height: 0;\n width: 0;\n }\n\n :host([theme~='arrow']) [part='arrow'] {\n display: block;\n }\n `,\n ];\n }\n\n /** @protected */\n render() {\n return html`\n <div id=\"backdrop\" part=\"backdrop\" hidden ?hidden=\"${!this.withBackdrop}\"></div>\n <div part=\"overlay\" id=\"overlay\" tabindex=\"0\">\n <div part=\"arrow\"></div>\n <div part=\"content\" id=\"content\"><slot></slot></div>\n </div>\n `;\n }\n\n /**\n * Override method inherited from `OverlayMixin` to not close\n * modal popover on outside click when opening on focus.\n *\n * @param {Event} event\n * @return {boolean}\n * @protected\n */\n _shouldCloseOnOutsideClick(event) {\n // When opening a modal popover on mouse focusin, the focus moves to the overlay\n // and then outside click listener is fired. Detect this case and prevent closing.\n if (this.owner.__hasTrigger('focus') && isElementFocused(this)) {\n return false;\n }\n\n return super._shouldCloseOnOutsideClick(event);\n }\n}\n\ndefineCustomElement(PopoverOverlay);\n","import{nothing as t}from\"../lit-html.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o=o=>o??t;export{o as ifDefined};\n//# sourceMappingURL=if-defined.js.map\n","/**\n * @license\n * Copyright (c) 2024 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { microTask } from '@vaadin/component-base/src/async.js';\nimport { Debouncer } from '@vaadin/component-base/src/debounce.js';\n\n/**\n * A mixin providing popover target functionality.\n *\n * @polymerMixin\n */\nexport const PopoverTargetMixin = (superClass) =>\n class PopoverTargetMixinClass extends superClass {\n static get properties() {\n return {\n /**\n * The id of the element to be used as `target` value.\n * The element should be in the DOM by the time when\n * the attribute is set, otherwise a warning is shown.\n */\n for: {\n type: String,\n observer: '__forChanged',\n },\n\n /**\n * Reference to the DOM element used both to trigger the overlay\n * by user interaction and to visually position it on the screen.\n *\n * Defaults to an element referenced with `for` attribute, in\n * which case it must be located in the same shadow scope.\n */\n target: {\n type: Object,\n observer: '__targetChanged',\n },\n };\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n if (this.target) {\n this._addTargetListeners(this.target);\n }\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n if (this.target) {\n this._removeTargetListeners(this.target);\n }\n }\n\n /** @private */\n __forChanged(forId) {\n if (forId) {\n this.__setTargetByIdDebouncer = Debouncer.debounce(this.__setTargetByIdDebouncer, microTask, () =>\n this.__setTargetById(forId),\n );\n }\n }\n\n /** @private */\n __setTargetById(targetId) {\n if (!this.isConnected) {\n return;\n }\n\n const target = this.getRootNode().getElementById(targetId);\n\n if (target) {\n this.target = target;\n } else {\n console.warn(`No element with id=\"${targetId}\" set via \"for\" property found on the page.`);\n }\n }\n\n /** @private */\n __targetChanged(target, oldTarget) {\n if (oldTarget) {\n this._removeTargetListeners(oldTarget);\n }\n\n if (target) {\n this._addTargetListeners(target);\n }\n }\n\n /**\n * @param {HTMLElement} _target\n * @protected\n */\n _addTargetListeners(_target) {\n // To be implemented.\n }\n\n /**\n * @param {HTMLElement} _target\n * @protected\n */\n _removeTargetListeners(_target) {\n // To be implemented.\n }\n };\n","/**\n * @license\n * Copyright (c) 2024 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './vaadin-popover-overlay.js';\nimport { css, html, LitElement } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport {\n getDeepActiveElement,\n getFocusableElements,\n isElementFocused,\n isKeyboardActive,\n} from '@vaadin/a11y-base/src/focus-utils.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { OverlayClassMixin } from '@vaadin/component-base/src/overlay-class-mixin.js';\nimport { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';\nimport { generateUniqueId } from '@vaadin/component-base/src/unique-id-utils.js';\nimport { isLastOverlay } from '@vaadin/overlay/src/vaadin-overlay-stack-mixin.js';\nimport { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';\nimport { PopoverPositionMixin } from './vaadin-popover-position-mixin.js';\nimport { PopoverTargetMixin } from './vaadin-popover-target-mixin.js';\n\nconst DEFAULT_DELAY = 500;\n\nlet defaultFocusDelay = DEFAULT_DELAY;\nlet defaultHoverDelay = DEFAULT_DELAY;\nlet defaultHideDelay = DEFAULT_DELAY;\n\n/**\n * Controller for handling popover opened state.\n */\nclass PopoverOpenedStateController {\n constructor(host) {\n this.host = host;\n }\n\n /**\n * Whether closing is currently in progress.\n * @return {boolean}\n */\n get isClosing() {\n return this.__closeTimeout != null;\n }\n\n /** @private */\n get __focusDelay() {\n const popover = this.host;\n return popover.focusDelay != null && popover.focusDelay >= 0 ? popover.focusDelay : defaultFocusDelay;\n }\n\n /** @private */\n get __hoverDelay() {\n const popover = this.host;\n return popover.hoverDelay != null && popover.hoverDelay >= 0 ? popover.hoverDelay : defaultHoverDelay;\n }\n\n /** @private */\n get __hideDelay() {\n const popover = this.host;\n return popover.hideDelay != null && popover.hideDelay >= 0 ? popover.hideDelay : defaultHideDelay;\n }\n\n /**\n * Schedule opening the popover.\n * @param {Object} options\n */\n open(options = { immediate: false }) {\n const { immediate, trigger } = options;\n const shouldDelayHover = trigger === 'hover' && this.__hoverDelay > 0;\n const shouldDelayFocus = trigger === 'focus' && this.__focusDelay > 0;\n\n if (!immediate && (shouldDelayHover || shouldDelayFocus) && !this.__closeTimeout) {\n this.__scheduleOpen(trigger);\n } else {\n this.__showPopover();\n }\n }\n\n /**\n * Schedule closing the popover.\n * @param {boolean} immediate\n */\n close(immediate) {\n if (!immediate && this.__hideDelay > 0) {\n this.__scheduleClose();\n } else {\n this.__abortClose();\n this.__setOpened(false);\n }\n\n this.__abortOpen();\n }\n\n /** @private */\n __setOpened(opened) {\n this.host.opened = opened;\n }\n\n /** @private */\n __showPopover() {\n this.__abortClose();\n this.__setOpened(true);\n }\n\n /** @private */\n __abortClose() {\n if (this.__closeTimeout) {\n clearTimeout(this.__closeTimeout);\n this.__closeTimeout = null;\n }\n }\n\n /** @private */\n __abortOpen() {\n if (this.__openTimeout) {\n clearTimeout(this.__openTimeout);\n this.__openTimeout = null;\n }\n }\n\n /** @private */\n __scheduleClose() {\n this.__closeTimeout = setTimeout(() => {\n this.__closeTimeout = null;\n this.__setOpened(false);\n }, this.__hideDelay);\n }\n\n /** @private */\n __scheduleOpen(trigger) {\n this.__abortOpen();\n\n const delay = trigger === 'focus' ? this.__focusDelay : this.__hoverDelay;\n this.__openTimeout = setTimeout(() => {\n this.__openTimeout = null;\n this.__showPopover();\n }, delay);\n }\n}\n\n/**\n * `<vaadin-popover>` is a Web Component for creating overlays\n * that are positioned next to specified DOM element (target).\n *\n * Unlike `<vaadin-tooltip>`, the popover supports rich content\n * that can be provided by using `renderer` function.\n *\n * ### Styling\n *\n * `<vaadin-popover>` uses `<vaadin-popover-overlay>` internal\n * themable component as the actual visible overlay.\n *\n * See [`<vaadin-overlay>`](#/elements/vaadin-overlay) documentation\n * for `<vaadin-popover-overlay>` parts.\n *\n * In addition to `<vaadin-overlay>` parts, the following parts are available for styling:\n *\n * Part name | Description\n * -----------------|-------------------------------------------\n * `arrow` | Optional arrow pointing to the target when using `theme=\"arrow\"`\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description\n * -----------------|----------------------------------------\n * `position` | Reflects the `position` property value.\n *\n * Note: the `theme` attribute value set on `<vaadin-popover>` is\n * propagated to the internal `<vaadin-popover-overlay>` component.\n *\n * ### Custom CSS Properties\n *\n * The following custom CSS properties are available on the `<vaadin-popover>` element:\n *\n * Custom CSS property | Description\n * ---------------------------------|-------------\n * `--vaadin-popover-offset-top` | Used as an offset when the popover is aligned vertically below the target\n * `--vaadin-popover-offset-bottom` | Used as an offset when the popover is aligned vertically above the target\n * `--vaadin-popover-offset-start` | Used as an offset when the popover is aligned horizontally after the target\n * `--vaadin-popover-offset-end` | Used as an offset when the popover is aligned horizontally before the target\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.\n * @fires {CustomEvent} closed - Fired when the popover is closed.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ElementMixin\n * @mixes OverlayClassMixin\n * @mixes PopoverPositionMixin\n * @mixes PopoverTargetMixin\n * @mixes ThemePropertyMixin\n */\nclass Popover extends PopoverPositionMixin(\n PopoverTargetMixin(OverlayClassMixin(ThemePropertyMixin(ElementMixin(PolylitMixin(LitElement))))),\n) {\n static get is() {\n return 'vaadin-popover';\n }\n\n static get styles() {\n return css`\n :host {\n display: none !important;\n }\n `;\n }\n\n static get properties() {\n return {\n /**\n * String used to label the overlay to screen reader users.\n *\n * @attr {string} accessible-name\n */\n accessibleName: {\n type: String,\n },\n\n /**\n * Id of the element used as label of the overlay to screen reader users.\n *\n * @attr {string} accessible-name-ref\n */\n accessibleNameRef: {\n type: String,\n },\n\n /**\n * When true, the popover content automatically receives focus after\n * it is opened. Modal popovers use this behavior by default.\n */\n autofocus: {\n type: Boolean,\n },\n\n /**\n * Height to be set on the overlay content.\n *\n * @attr {string} content-height\n */\n contentHeight: {\n type: String,\n },\n\n /**\n * Width to be set on the overlay content.\n *\n * @attr {string} content-width\n */\n contentWidth: {\n type: String,\n },\n\n /**\n * The delay in milliseconds before the popover is opened\n * on focus when the corresponding trigger is used.\n *\n * When not specified, the global default (500ms) is used.\n *\n * @attr {number} focus-delay\n */\n focusDelay: {\n type: Number,\n },\n\n /**\n * The delay in milliseconds before the popover is closed\n * on losing hover, when the corresponding trigger is used.\n * On blur, the popover is closed immediately.\n *\n * When not specified, the global default (500ms) is used.\n *\n * @attr {number} hide-delay\n */\n hideDelay: {\n type: Number,\n },\n\n /**\n * The delay in milliseconds before the popover is opened\n * on hover when the corresponding trigger is used.\n *\n * When not specified, the global default (500ms) is used.\n *\n * @attr {number} hover-delay\n */\n hoverDelay: {\n type: Number,\n },\n\n /**\n * True if the popover overlay is opened, false otherwise.\n */\n opened: {\n type: Boolean,\n value: false,\n notify: true,\n observer: '__openedChanged',\n },\n\n /**\n * The `role` attribute value to be set on the overlay.\n *\n * @attr {string} overlay-role\n */\n overlayRole: {\n type: String,\n value: 'dialog',\n },\n\n /**\n * Custom function for rendering the content of the overlay.\n * Receives two arguments:\n *\n * - `root` The root container DOM element. Append your content to it.\n * - `popover` The reference to the `vaadin-popover` element (overlay host).\n */\n renderer: {\n type: Object,\n },\n\n /**\n * When true, the popover prevents interacting with background elements\n * by setting `pointer-events` style on the document body to `none`.\n * This also enables trapping focus inside the overlay.\n */\n modal: {\n type: Boolean,\n value: false,\n },\n\n /**\n * Set to true to disable closing popover overlay on outside click.\n *\n * @attr {boolean} no-close-on-outside-click\n */\n noCloseOnOutsideClick: {\n type: Boolean,\n value: false,\n },\n\n /**\n * Set to true to disable closing popover overlay on Escape press.\n * When the popover is modal, pressing Escape anywhere in the\n * document closes the overlay. Otherwise, only Escape press\n * from the popover itself or its target closes the overlay.\n *\n * @attr {boolean} no-close-on-esc\n */\n noCloseOnEsc: {\n type: Boolean,\n value: false,\n },\n\n /**\n * Popover trigger mode, used to configure how the overlay is opened or closed.\n * Could be set to multiple by providing an array, e.g. `trigger = ['hover', 'focus']`.\n *\n * Supported values:\n * - `click` (default) - opens and closes on target click.\n * - `hover` - opens on target mouseenter, closes on target mouseleave. Moving mouse\n * to the popover overlay content keeps the overlay opened.\n * - `focus` - opens on target focus, closes on target blur. Moving focus to the\n * popover overlay content keeps the overlay opened.\n *\n * In addition to the behavior specified by `trigger`, the popover can be closed by:\n * - pressing Escape key (unless `noCloseOnEsc` property is true)\n * - outside click (unless `noCloseOnOutsideClick` property is true)\n *\n * When setting `trigger` property to `null`, `undefined` or empty array, the popover\n * can be only opened or closed programmatically by changing `opened` property.\n */\n trigger: {\n type: Array,\n value: () => ['click'],\n },\n\n /**\n * When true, the overlay has a backdrop (modality curtain) on top of the\n * underlying page content, covering the whole viewport.\n *\n * @attr {boolean} with-backdrop\n */\n withBackdrop: {\n type: Boolean,\n value: false,\n },\n\n /** @private */\n __shouldRestoreFocus: {\n type: Boolean,\n value: false,\n sync: true,\n },\n\n /** @private */\n __overlayId: {\n type: String,\n },\n };\n }\n\n static get observers() {\n return [\n '__updateContentHeight(contentHeight, _overlayElement)',\n '__updateContentWidth(contentWidth, _overlayElement)',\n '__openedOrTargetChanged(opened, target)',\n '__overlayRoleOrTargetChanged(overlayRole, target)',\n ];\n }\n\n /**\n * Sets the default focus delay to be used by all popover instances,\n * except for those that have focus delay configured using property.\n *\n * @param {number} focusDelay\n */\n static setDefaultFocusDelay(focusDelay) {\n defaultFocusDelay = focusDelay != null && focusDelay >= 0 ? focusDelay : DEFAULT_DELAY;\n }\n\n /**\n * Sets the default hide delay to be used by all popover instances,\n * except for those that have hide delay configured using property.\n *\n * @param {number} hideDelay\n */\n static setDefaultHideDelay(hideDelay) {\n defaultHideDelay = hideDelay != null && hideDelay >= 0 ? hideDelay : DEFAULT_DELAY;\n }\n\n /**\n * Sets the default hover delay to be used by all popover instances,\n * except for those that have hover delay configured using property.\n *\n * @param {number} hoverDelay\n */\n static setDefaultHoverDelay(hoverDelay) {\n defaultHoverDelay = hoverDelay != null && hoverDelay >= 0 ? hoverDelay : DEFAULT_DELAY;\n }\n\n constructor() {\n super();\n\n this.__overlayId = `vaadin-popover-${generateUniqueId()}`;\n\n this.__onGlobalClick = this.__onGlobalClick.bind(this);\n this.__onGlobalKeyDown = this.__onGlobalKeyDown.bind(this);\n this.__onTargetClick = this.__onTargetClick.bind(this);\n this.__onTargetFocusIn = this.__onTargetFocusIn.bind(this);\n this.__onTargetFocusOut = this.__onTargetFocusOut.bind(this);\n this.__onTargetMouseEnter = this.__onTargetMouseEnter.bind(this);\n this.__onTargetMouseLeave = this.__onTargetMouseLeave.bind(this);\n\n this._openedStateController = new PopoverOpenedStateController(this);\n }\n\n /** @protected */\n render() {\n const effectivePosition = this.__effectivePosition;\n\n return html`\n <vaadin-popover-overlay\n id=\"${this.__overlayId}\"\n role=\"${this.overlayRole}\"\n aria-label=\"${ifDefined(this.accessibleName)}\"\n aria-labelledby=\"${ifDefined(this.accessibleNameRef)}\"\n .renderer=\"${this.renderer}\"\n .owner=\"${this}\"\n theme=\"${ifDefined(this._theme)}\"\n .positionTarget=\"${this.target}\"\n .position=\"${effectivePosition}\"\n .opened=\"${this.opened}\"\n .modeless=\"${!this.modal}\"\n .focusTrap=\"${this.modal}\"\n .withBackdrop=\"${this.withBackdrop}\"\n ?no-horizontal-overlap=\"${this.__computeNoHorizontalOverlap(effectivePosition)}\"\n ?no-vertical-overlap=\"${this.__computeNoVerticalOverlap(effectivePosition)}\"\n .horizontalAlign=\"${this.__computeHorizontalAlign(effectivePosition)}\"\n .verticalAlign=\"${this.__computeVerticalAlign(effectivePosition)}\"\n @mousedown=\"${this.__onOverlayMouseDown}\"\n @mouseenter=\"${this.__onOverlayMouseEnter}\"\n @mouseleave=\"${this.__onOverlayMouseLeave}\"\n @focusin=\"${this.__onOverlayFocusIn}\"\n @focusout=\"${this.__onOverlayFocusOut}\"\n @opened-changed=\"${this.__onOpenedChanged}\"\n .restoreFocusOnClose=\"${this.__shouldRestoreFocus}\"\n .restoreFocusNode=\"${this.target}\"\n @vaadin-overlay-escape-press=\"${this.__onEscapePress}\"\n @vaadin-overlay-outside-click=\"${this.__onOutsideClick}\"\n @vaadin-overlay-open=\"${this.__onOverlayOpened}\"\n @vaadin-overlay-closed=\"${this.__onOverlayClosed}\"\n ></vaadin-popover-overlay>\n `;\n }\n\n /**\n * Requests an update for the content of the popover.\n * While performing the update, it invokes the renderer passed in the `renderer` property.\n *\n * It is not guaranteed that the update happens immediately (synchronously) after it is requested.\n */\n requestContentUpdate() {\n if (!this.renderer || !this._overlayElement) {\n return;\n }\n\n this._overlayElement.requestContentUpdate();\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._overlayElement = this.shadowRoot.querySelector('vaadin-popover-overlay');\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n document.documentElement.addEventListener('click', this.__onGlobalClick, true);\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n document.documentElement.removeEventListener('click', this.__onGlobalClick, true);\n\n this._openedStateController.close(true);\n }\n\n /**\n * @param {HTMLElement} target\n * @protected\n * @override\n */\n _addTargetListeners(target) {\n target.addEventListener('click', this.__onTargetClick);\n target.addEventListener('mouseenter', this.__onTargetMouseEnter);\n target.addEventListener('mouseleave', this.__onTargetMouseLeave);\n target.addEventListener('focusin', this.__onTargetFocusIn);\n target.addEventListener('focusout', this.__onTargetFocusOut);\n }\n\n /**\n * @param {HTMLElement} target\n * @protected\n * @override\n */\n _removeTargetListeners(target) {\n target.removeEventListener('click', this.__onTargetClick);\n target.removeEventListener('mouseenter', this.__onTargetMouseEnter);\n target.removeEventListener('mouseleave', this.__onTargetMouseLeave);\n target.removeEventListener('focusin', this.__onTargetFocusIn);\n target.removeEventListener('focusout', this.__onTargetFocusOut);\n }\n\n /** @private */\n __openedChanged(opened, oldOpened) {\n if (opened) {\n document.addEventListener('keydown', this.__onGlobalKeyDown, true);\n } else if (oldOpened) {\n document.removeEventListener('keydown', this.__onGlobalKeyDown, true);\n }\n }\n\n /** @private */\n __openedOrTargetChanged(opened, target) {\n if (target) {\n target.setAttribute('aria-expanded', opened ? 'true' : 'false');\n\n if (opened) {\n target.setAttribute('aria-controls', this.__overlayId);\n } else {\n target.removeAttribute('aria-controls');\n }\n }\n }\n\n /** @private */\n __overlayRoleOrTargetChanged(overlayRole, target) {\n if (this.__oldTarget) {\n this.__oldTarget.removeAttribute('aria-haspopup');\n }\n\n if (target) {\n const isDialog = overlayRole === 'dialog' || overlayRole === 'alertdialog';\n target.setAttribute('aria-haspopup', isDialog ? 'dialog' : 'true');\n\n this.__oldTarget = target;\n }\n }\n\n /**\n * Overlay's global outside click listener doesn't work when\n * the overlay is modeless, so we use a separate listener.\n * @private\n */\n __onGlobalClick(event) {\n if (\n this.opened &&\n !this.__isManual &&\n !this.modal &&\n !event.composedPath().some((el) => el === this._overlayElement || el === this.target) &&\n !this.noCloseOnOutsideClick &&\n isLastOverlay(this._overlayElement)\n ) {\n this._openedStateController.close(true);\n }\n }\n\n /** @private */\n __onTargetClick() {\n if (this.__hasTrigger('click')) {\n if (!this.opened) {\n this.__shouldRestoreFocus = true;\n }\n if (this.opened) {\n this._openedStateController.close(true);\n } else {\n this._openedStateController.open({ immediate: true });\n }\n }\n }\n\n /**\n * Overlay's global Escape press listener doesn't work when\n * the overlay is modeless, so we use a separate listener.\n * @private\n */\n __onGlobalKeyDown(event) {\n // Modal popover uses overlay logic for Esc key and focus trap.\n if (this.modal) {\n return;\n }\n\n if (\n event.key === 'Escape' &&\n !this.noCloseOnEsc &&\n this.opened &&\n !this.__isManual &&\n isLastOverlay(this._overlayElement)\n ) {\n // Prevent closing parent overlay (e.g. dialog)\n event.stopPropagation();\n this._openedStateController.close(true);\n }\n\n // Include popover content in the Tab order after the target.\n if (event.key === 'Tab') {\n if (event.shiftKey) {\n this.__onGlobalShiftTab(event);\n } else {\n this.__onGlobalTab(event);\n }\n }\n }\n\n /** @private */\n __onGlobalTab(event) {\n const overlayPart = this._overlayElement.$.overlay;\n\n // Move focus to the popover content on target element Tab\n if (this.target && isElementFocused(this.target)) {\n event.preventDefault();\n overlayPart.focus();\n return;\n }\n\n // Move focus to the next element after target on content Tab\n const lastFocusable = this.__getLastFocusable(overlayPart);\n if (lastFocusable && isElementFocused(lastFocusable)) {\n const focusable = this.__getNextBodyFocusable(this.target);\n if (focusable && focusable !== overlayPart) {\n event.preventDefault();\n focusable.focus();\n return;\n }\n }\n\n // Prevent focusing the popover content on previous element Tab\n const activeElement = getDeepActiveElement();\n const nextFocusable = this.__getNextBodyFocusable(activeElement);\n if (nextFocusable === overlayPart && lastFocusable) {\n // Move focus to the last overlay focusable and do NOT prevent keydown\n // to move focus outside the popover content (e.g. to the URL bar).\n lastFocusable.focus();\n }\n }\n\n /** @private */\n __onGlobalShiftTab(event) {\n const overlayPart = this._overlayElement.$.overlay;\n\n // Prevent restoring focus after target blur on Shift + Tab\n if (this.target && isElementFocused(this.target) && this.__shouldRestoreFocus) {\n this.__shouldRestoreFocus = false;\n return;\n }\n\n // Move focus back to the target on overlay content Shift + Tab\n if (this.target && isElementFocused(overlayPart)) {\n event.preventDefault();\n this.target.focus();\n return;\n }\n\n // Move focus back to the popover on next element Shift + Tab\n const nextFocusable = this.__getNextBodyFocusable(this.target);\n if (nextFocusable && isElementFocused(nextFocusable)) {\n const lastFocusable = this.__getLastFocusable(overlayPart);\n if (lastFocusable) {\n event.preventDefault();\n lastFocusable.focus();\n }\n }\n }\n\n /** @private */\n __getNextBodyFocusable(target) {\n const focusables = getFocusableElements(document.body);\n const idx = focusables.findIndex((el) => el === target);\n return focusables[idx + 1];\n }\n\n /** @private */\n __getLastFocusable(container) {\n const focusables = getFocusableElements(container);\n return focusables.pop();\n }\n\n /** @private */\n __onTargetFocusIn() {\n this.__focusInside = true;\n\n if (this.__hasTrigger('focus')) {\n // When trigger is set to both focus and click, only open on\n // keyboard focus, to prevent issue when immediately closing\n // on click which occurs after the focus caused by mousedown.\n if (this.__hasTrigger('click') && !isKeyboardActive()) {\n return;\n }\n\n // Prevent overlay re-opening when restoring focus on close.\n if (!this.__shouldRestoreFocus) {\n this.__shouldRestoreFocus = true;\n this._openedStateController.open({ trigger: 'focus' });\n }\n }\n }\n\n /** @private */\n __onTargetFocusOut(event) {\n // Do not close the popover on overlay focusout if it's not the last one.\n // This covers the case when focus moves to the nested popover opened\n // without focusing parent popover overlay (e.g. using hover trigger).\n if (!isLastOverlay(this._overlayElement)) {\n return;\n }\n\n if ((this.__hasTrigger('focus') && this.__mouseDownInside) || this._overlayElement.contains(event.relatedTarget)) {\n return;\n }\n\n this.__handleFocusout();\n }\n\n /** @private */\n __onTargetMouseEnter() {\n this.__hoverInside = true;\n\n if (this.__hasTrigger('hover') && !this.opened) {\n // Prevent closing due to `pointer-events: none` set on body.\n if (this.modal) {\n this.target.style.pointerEvents = 'auto';\n }\n this._openedStateController.open({ trigger: 'hover' });\n }\n }\n\n /** @private */\n __onTargetMouseLeave(event) {\n // Do not close the popover on target focusout if the overlay is not the last one.\n // This happens e.g. when opening the nested popover that uses non-modal overlay.\n if (this._overlayElement.opened && !isLastOverlay(this._overlayElement)) {\n return;\n }\n\n if (this._overlayElement.contains(event.relatedTarget)) {\n return;\n }\n\n this.__handleMouseLeave();\n }\n\n /** @private */\n __onOverlayFocusIn() {\n this.__focusInside = true;\n\n // When using Tab to move focus, restoring focus is reset. However, if pressing Tab\n // causes focus to be moved inside the overlay, we should restore focus on close.\n if (this.__hasTrigger('focus') || this.__hasTrigger('click')) {\n this.__shouldRestoreFocus = true;\n }\n }\n\n /** @private */\n __onOverlayFocusOut(event) {\n // Do not close the popover on overlay focusout if it's not the last one.\n // This covers the following cases of nested overlay based components:\n // 1. Moving focus to the nested overlay (e.g. vaadin-select, vaadin-menu-bar)\n // 2. Closing not focused nested overlay on outside (e.g. vaadin-combo-box)\n if (!isLastOverlay(this._overlayElement)) {\n return;\n }\n\n if (\n (this.__hasTrigger('focus') && this.__mouseDownInside) ||\n event.relatedTarget === this.target ||\n this._overlayElement.contains(event.relatedTarget)\n ) {\n return;\n }\n\n this.__handleFocusout();\n }\n\n /** @private */\n __onOverlayMouseDown() {\n if (this.__hasTrigger('focus')) {\n this.__mouseDownInside = true;\n\n document.addEventListener(\n 'mouseup',\n () => {\n this.__mouseDownInside = false;\n },\n { once: true },\n );\n }\n }\n\n /** @private */\n __onOverlayMouseEnter() {\n this.__hoverInside = true;\n\n // Prevent closing if cursor moves to the overlay during hide delay.\n if (this.__hasTrigger('hover') && this._openedStateController.isClosing) {\n this._openedStateController.open({ immediate: true });\n }\n }\n\n /** @private */\n __onOverlayMouseLeave(event) {\n // Do not close the popover on overlay focusout if it's not the last one.\n // This happens when opening the nested component that uses \"modal\" overlay\n // setting `pointer-events: none` on the body (combo-box, date-picker etc).\n if (!isLastOverlay(this._overlayElement)) {\n return;\n }\n\n if (event.relatedTarget === this.target) {\n return;\n }\n\n this.__handleMouseLeave();\n }\n\n /** @private */\n __handleFocusout() {\n this.__focusInside = false;\n\n if (this.__hasTrigger('hover') && this.__hoverInside) {\n return;\n }\n\n if (this.__hasTrigger('focus')) {\n this._openedStateController.close(true);\n }\n }\n\n /** @private */\n __handleMouseLeave() {\n this.__hoverInside = false;\n\n if (this.__hasTrigger('focus') && this.__focusInside) {\n return;\n }\n\n if (this.__hasTrigger('hover')) {\n this._openedStateController.close();\n }\n }\n\n /** @private */\n __onOpenedChanged(event) {\n this.opened = event.detail.value;\n }\n\n /** @private */\n __onOverlayOpened() {\n if (this.autofocus && !this.modal) {\n this._overlayElement.$.overlay.focus();\n }\n }\n\n /** @private */\n __onOverlayClosed() {\n // Reset restoring focus state after a timeout to make sure focus was restored\n // and then allow re-opening overlay on re-focusing target with focus trigger.\n if (this.__shouldRestoreFocus) {\n setTimeout(() => {\n this.__shouldRestoreFocus = false;\n });\n }\n\n // Restore pointer-events set when opening on hover.\n if (this.modal && this.target.style.pointerEvents) {\n this.target.style.pointerEvents = '';\n }\n\n this.dispatchEvent(new CustomEvent('closed'));\n }\n\n /**\n * Close the popover if `noCloseOnEsc` isn't set to true.\n * @private\n */\n __onEscapePress(e) {\n if (this.noCloseOnEsc || this.__isManual) {\n e.preventDefault();\n }\n }\n\n /**\n * Close the popover if `noCloseOnOutsideClick` isn't set to true.\n * @private\n */\n __onOutsideClick(e) {\n if (this.noCloseOnOutsideClick || this.__isManual) {\n e.preventDefault();\n }\n }\n\n /** @private */\n __hasTrigger(trigger) {\n return Array.isArray(this.trigger) && this.trigger.includes(trigger);\n }\n\n /** @private */\n get __isManual() {\n return this.trigger == null || (Array.isArray(this.trigger) && this.trigger.length === 0);\n }\n\n /** @private */\n __updateDimension(overlay, dimension, value) {\n const prop = `--_vaadin-popover-content-${dimension}`;\n\n if (value) {\n overlay.style.setProperty(prop, value);\n } else {\n overlay.style.removeProperty(prop);\n }\n }\n\n /** @private */\n __updateContentHeight(height, overlay) {\n if (overlay) {\n this.__updateDimension(overlay, 'height', height);\n }\n }\n\n /** @private */\n __updateContentWidth(width, overlay) {\n if (overlay) {\n this.__updateDimension(overlay, 'width', width);\n }\n }\n\n /**\n * Fired when the popover is closed.\n *\n * @event closed\n */\n}\n\ndefineCustomElement(Popover);\n\nexport { Popover };\n","/**\n * @license\n * Copyright (c) 2024 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * A mixin providing popover position functionality.\n *\n * @polymerMixin\n */\nexport const PopoverPositionMixin = (superClass) =>\n class PopoverPositionMixinClass extends superClass {\n static get properties() {\n return {\n /**\n * Position of the overlay with respect to the target.\n * Supported values: `top-start`, `top`, `top-end`,\n * `bottom-start`, `bottom`, `bottom-end`, `start-top`,\n * `start`, `start-bottom`, `end-top`, `end`, `end-bottom`.\n */\n position: {\n type: String,\n },\n\n /**\n * Default value used when `position` property is not set.\n * @protected\n */\n _position: {\n type: String,\n value: 'bottom',\n },\n\n /** @private */\n __effectivePosition: {\n type: String,\n computed: '__computePosition(position, _position)',\n },\n };\n }\n\n /** @protected */\n __computeHorizontalAlign(position) {\n return ['top-end', 'bottom-end', 'start-top', 'start', 'start-bottom'].includes(position) ? 'end' : 'start';\n }\n\n /** @protected */\n __computeNoHorizontalOverlap(position) {\n return ['start-top', 'start', 'start-bottom', 'end-top', 'end', 'end-bottom'].includes(position);\n }\n\n /** @protected */\n __computeNoVerticalOverlap(position) {\n return ['top-start', 'top-end', 'top', 'bottom-start', 'bottom', 'bottom-end'].includes(position);\n }\n\n /** @protected */\n __computeVerticalAlign(position) {\n return ['top-start', 'top-end', 'top', 'start-bottom', 'end-bottom'].includes(position) ? 'bottom' : 'top';\n }\n\n /** @private */\n __computePosition(position, defaultPosition) {\n return position || defaultPosition;\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputController } from '@vaadin/field-base/src/input-controller.js';\nimport { InputFieldMixin } from '@vaadin/field-base/src/input-field-mixin.js';\nimport { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';\n\n/**\n * A mixin providing common text field functionality.\n *\n * @polymerMixin\n * @mixes InputFieldMixin\n */\nexport const TextFieldMixin = (superClass) =>\n class TextFieldMixinClass extends InputFieldMixin(superClass) {\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n\n /**\n * A regular expression that the value is checked against.\n * The pattern must match the entire value, not just some subset.\n */\n pattern: {\n type: String,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'maxlength', 'minlength', 'pattern'];\n }\n\n static get constraints() {\n return [...super.constraints, 'maxlength', 'minlength', 'pattern'];\n }\n\n constructor() {\n super();\n this._setType('text');\n }\n\n /** @protected */\n get clearElement() {\n return this.$.clearButton;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(\n new InputController(this, (input) => {\n this._setInputElement(input);\n this._setFocusElement(input);\n this.stateTarget = input;\n this.ariaTarget = input;\n }),\n );\n this.addController(new LabelledInputController(this.inputElement, this._labelController));\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/src/vaadin-input-container.js';\nimport { html, PolymerElement } from '@polymer/polymer';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { TextFieldMixin } from './vaadin-text-field-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, { moduleId: 'vaadin-text-field-styles' });\n\n/**\n * `<vaadin-text-field>` is a web component that allows the user to input and edit text.\n *\n * ```html\n * <vaadin-text-field label=\"First Name\"></vaadin-text-field>\n * ```\n *\n * ### Prefixes and suffixes\n *\n * These are child elements of a `<vaadin-text-field>` that are displayed\n * inline with the input, before or after.\n * In order for an element to be considered as a prefix, it must have the slot\n * attribute set to `prefix` (and similarly for `suffix`).\n *\n * ```html\n * <vaadin-text-field label=\"Email address\">\n * <div slot=\"prefix\">Sent to:</div>\n * <div slot=\"suffix\">@vaadin.com</div>\n * </vaadin-text-field>\n * ```\n *\n * ### Styling\n *\n * The following custom properties are available for styling:\n *\n * Custom property | Description | Default\n * -------------------------------|----------------------------|---------\n * `--vaadin-field-default-width` | Default width of the field | `12em`\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ---------------------|----------------\n * `label` | The label element\n * `input-field` | The element that wraps prefix, value and suffix\n * `clear-button` | The clear button\n * `error-message` | The error message element\n * `helper-text` | The helper text element wrapper\n * `required-indicator` | The `required` state indicator element\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description | Part name\n * --------------------|-------------|------------\n * `disabled` | Set to a disabled text field | :host\n * `has-value` | Set when the element has a value | :host\n * `has-label` | Set when the element has a label | :host\n * `has-helper` | Set when the element has helper text or slot | :host\n * `has-error-message` | Set when the element has an error message | :host\n * `invalid` | Set when the element is invalid | :host\n * `input-prevented` | Temporarily set when invalid input is prevented | :host\n * `focused` | Set when the element is focused | :host\n * `focus-ring` | Set when the element is keyboard focused | :host\n * `readonly` | Set to a readonly text field | :host\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.\n * @fires {Event} change - Fired when the user commits a value change.\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ElementMixin\n * @mixes ThemableMixin\n * @mixes TextFieldMixin\n */\nexport class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(PolymerElement))) {\n static get is() {\n return 'vaadin-text-field';\n }\n\n static get template() {\n return html`\n <style>\n [part='input-field'] {\n flex-grow: 0;\n }\n </style>\n\n <div class=\"vaadin-field-container\">\n <div part=\"label\">\n <slot name=\"label\"></slot>\n <span part=\"required-indicator\" aria-hidden=\"true\" on-click=\"focus\"></span>\n </div>\n\n <vaadin-input-container\n part=\"input-field\"\n readonly=\"[[readonly]]\"\n disabled=\"[[disabled]]\"\n invalid=\"[[invalid]]\"\n theme$=\"[[_theme]]\"\n >\n <slot name=\"prefix\" slot=\"prefix\"></slot>\n <slot name=\"input\"></slot>\n <slot name=\"suffix\" slot=\"suffix\"></slot>\n <div id=\"clearButton\" part=\"clear-button\" slot=\"suffix\" aria-hidden=\"true\"></div>\n </vaadin-input-container>\n\n <div part=\"helper-text\">\n <slot name=\"helper\"></slot>\n </div>\n\n <div part=\"error-message\">\n <slot name=\"error-message\"></slot>\n </div>\n </div>\n <slot name=\"tooltip\"></slot>\n `;\n }\n\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n };\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this._tooltipController.setPosition('top');\n this._tooltipController.setAriaTarget(this.inputElement);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(TextField);\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';\nimport { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, {\n moduleId: 'lumo-text-field-styles',\n});\n"],"names":["buttonStyles","ButtonMixin","superClass","properties","tabindex","type","Number","value","reflectToAttribute","_activeKeys","ready","super","this","hasAttribute","setAttribute","_onKeyDown","event","altKey","shiftKey","ctrlKey","metaKey","includes","key","preventDefault","click","moduleId","Button","is","template","_tooltipController","addController","button","comboBox","ComboBoxItem","comboBoxOverlayStyles","ComboBoxOverlay","ComboBoxScroller","PatternMixin","superclass","pattern","String","delegateAttrs","constraints","ComboBox","_positionTarget","Object","clearElement","$","clearButton","input","_setInputElement","_setFocusElement","stateTarget","ariaTarget","inputElement","_labelController","setPosition","setAriaTarget","setShouldShow","target","opened","shadowRoot","querySelector","_toggleElement","toggleButton","_onClearButtonClick","stopPropagation","_onHostClick","path","composedPath","_labelNode","InputFieldMixin","autocomplete","autocorrect","autocapitalize","__data","__dataValue","_inputElementChanged","console","warn","localName","_setFocused","focused","document","hasFocus","validate","_onInput","invalid","_valueChanged","newValue","oldValue","undefined","appliedClassMixins","WeakMap","caseMap","CAMEL_TO_DASH","camelToDash","camel","replace","toLowerCase","upper","name","toUpperCase","substring","parseObserver","observerString","method","rest","split","observerProps","map","prop","trim","getOrCreateMap","obj","prototype","hasOwnProperty","call","Map","PolylitMixin","mixin","createProperty","options","Boolean","Array","reflect","finalize","isArray","observers","complexObservers","forEach","observer","set","addCheckedInitializer","initializer","addInitializer","instance","getPropertyDescriptor","defaultDescriptor","result","sync","get","requestUpdate","hasUpdated","performUpdate","configurable","enumerable","readOnly","setter","notify","__notifyProps","notifyProps","Set","add","computed","assignComputedMethod","props","attribute","firstUpdated","renderRoot","querySelectorAll","node","id","updated","constructor","__observers","__runObservers","__complexObservers","__runComplexObservers","__dynamicObservers","__runNotifyProps","__isReadyInvoked","_createMethodObserver","dynamicObservers","some","has","v","k","_","dispatchEvent","CustomEvent","detail","_get","object","_set","klass","getPrototypeOf","wasMixinPreviouslyApplied","mixedClass","PopoverOverlayMixin","position","_tagNamePrefix","requestContentUpdate","positionTarget","owner","style","getComputedStyle","setProperty","getPropertyValue","_updatePosition","removeAttribute","targetRect","getBoundingClientRect","overlayRect","overlay","offset","width","left","right","parseFloat","height","top","PopoverOverlay","styles","render","withBackdrop","_shouldCloseOnOutsideClick","__hasTrigger","o","PopoverTargetMixin","for","connectedCallback","_addTargetListeners","disconnectedCallback","_removeTargetListeners","__forChanged","forId","__setTargetByIdDebouncer","debounce","__setTargetById","targetId","isConnected","getRootNode","getElementById","__targetChanged","oldTarget","_target","DEFAULT_DELAY","defaultFocusDelay","defaultHoverDelay","defaultHideDelay","PopoverOpenedStateController","host","isClosing","__closeTimeout","__focusDelay","popover","focusDelay","__hoverDelay","hoverDelay","__hideDelay","hideDelay","open","immediate","trigger","shouldDelayHover","shouldDelayFocus","__showPopover","__scheduleOpen","close","__scheduleClose","__abortClose","__setOpened","__abortOpen","clearTimeout","__openTimeout","setTimeout","delay","Popover","_position","__effectivePosition","__computeHorizontalAlign","__computeNoHorizontalOverlap","__computeNoVerticalOverlap","__computeVerticalAlign","__computePosition","defaultPosition","PopoverPositionMixin","accessibleName","accessibleNameRef","autofocus","contentHeight","contentWidth","overlayRole","renderer","modal","noCloseOnOutsideClick","noCloseOnEsc","__shouldRestoreFocus","__overlayId","setDefaultFocusDelay","setDefaultHideDelay","setDefaultHoverDelay","__onGlobalClick","bind","__onGlobalKeyDown","__onTargetClick","__onTargetFocusIn","__onTargetFocusOut","__onTargetMouseEnter","__onTargetMouseLeave","_openedStateController","effectivePosition","_theme","__onOverlayMouseDown","__onOverlayMouseEnter","__onOverlayMouseLeave","__onOverlayFocusIn","__onOverlayFocusOut","__onOpenedChanged","__onEscapePress","__onOutsideClick","__onOverlayOpened","__onOverlayClosed","_overlayElement","documentElement","addEventListener","removeEventListener","__openedChanged","oldOpened","__openedOrTargetChanged","__overlayRoleOrTargetChanged","__oldTarget","isDialog","__isManual","el","__onGlobalShiftTab","__onGlobalTab","overlayPart","focus","lastFocusable","__getLastFocusable","focusable","__getNextBodyFocusable","activeElement","nextFocusable","focusables","body","idx","findIndex","container","pop","__focusInside","__mouseDownInside","contains","relatedTarget","__handleFocusout","__hoverInside","pointerEvents","__handleMouseLeave","once","e","length","__updateDimension","dimension","removeProperty","__updateContentHeight","__updateContentWidth","TextFieldMixin","maxlength","minlength","_setType","TextField"],"sourceRoot":""}
|
package/dist/umd/8350.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8350],{19624(t,e,n){n.d(e,{J:()=>u,T:()=>l});var r=n(63200),a=n(25964),i=n(88961),o=n(98538),s=n(10767);const l=(0,a.xE)("button"),{host:d,label:h,slottedIcon:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"},slottedIcon:{selector:()=>"::slotted(descope-icon)"}};let p;const u=(0,r.Zz)((0,i.DM)({triggers:[{attr:"full-width",value:"true"}]}),(0,i.RF)({mappings:{hostWidth:{property:"width"},hostHeight:{property:"height"},hostDirection:{...d,property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},cursor:{},backgroundColor:{},outlineOffset:{},outlineColor:{},outlineStyle:{},outlineWidth:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-right",fallback:"0.875em"},{property:"padding-left",fallback:"0.875em"}],labelTextColor:{property:"color"},iconColor:{selector:()=>"::slotted(*)",property:o.S.cssVarList.fill},labelTextDecoration:{...h,property:"text-decoration"},labelSpacing:{...h,property:"gap"},textAlign:{...h,property:"justify-content",fallback:"center"},iconSize:[{...c,property:"width"},{...c,property:"height"}]}}),s.G,i.VO,i.tQ)((0,i.tz)({slots:["","prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\t\t\t\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n\n\t\t\t\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t\t${p}\n\t\t\tvaadin-button::part(label) { pointer-events: none; }\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${u.cssVarList.outlineWidth}) + var(${u.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width="true"]) {\n width: var(${u.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${u.cssVarList.hostHeight}) - var(${u.cssVarList.outlineWidth}) - var(${u.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square="true"]:not([full-width="true"]) {\n\t\t\t\twidth: calc(var(${u.cssVarList.hostWidth}) - var(${u.cssVarList.outlineWidth}) - var(${u.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex","class","style"],componentName:l})),{color:y,fontSize:g}=u.cssVarList;p=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading="true"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${y});\n\t\ttop: calc(50% - (var(${g}) / 2));\n\t\tleft: calc(50% - (var(${g}) / 2));\n\t\tborder-width: calc(var(${g}) / 10);\n\t\twidth: var(${g});\n\t\theight: var(${g});\n\t}\n\t:host([disabled="true"]),\n\t:host([loading="true"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading="true"]) ::part(prefix),\n\t:host([loading="true"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`},10767(t,e,n){n.d(e,{G:()=>r});const r=t=>class extends t{get isLoading(){return"true"===this.getAttribute("loading")}click(){this.isLoading||super.click()}}},30576(t,e,n){n.r(e),n.d(e,{ButtonClass:()=>r.J,componentName:()=>r.T});var r=n(19624);n(83799),customElements.define(r.T,r.J)},98538(t,e,n){n.d(e,{S:()=>l,T:()=>s});var r=n(88961),a=n(25964),i=n(8512),o=n(63200);const s=(0,a.xE)("icon"),l=(0,o.Zz)((0,r.RF)({mappings:{fill:[{},{property:i.q.cssVarList.fill}],height:{selector:()=>":host"},width:{selector:()=>":host"}}}),r.VO,r.tQ)((0,r.tz)({slots:[],wrappedEleName:"descope-image",style:()=>"\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n ",excludeAttrsSync:["tabindex","class","style","st-height","st-width"],componentName:s}))},8512(t,e,n){n.d(e,{T:()=>l,q:()=>c});var r=n(88961),a=n(72270),i=n(63200),o=n(25964),s=n(18782);const l=(0,o.xE)("image"),d=["src","src-dark"];class h extends((0,a.qu)({componentName:l,baseSelector:"slot"})){static get observedAttributes(){return d}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<slot></slot>\n\t",(0,o.fz)("\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n ",this)}init(){super.init?.(),this.toggleVisibility(this.getSrc)}onThemeChange(){this.renderImage()}toggleVisibility(t){t?this.classList.remove("hidden"):this.classList.add("hidden")}get altText(){return this.getAttribute("alt")||""}get legacySrc(){return this.getAttribute("src")}get themeSrc(){return this.getAttribute(`src-${this.currentThemeName}`)}get getSrc(){return this.themeSrc||this.legacySrc}updateFillColor(t){[t,...t.querySelectorAll("*[fill]")].forEach(t=>{t.setAttribute("fill",`var(${c.cssVarList.fill}, ${t.getAttribute("fill")||"''"})`)})}renderImage(){this.toggleVisibility(this.getSrc),(0,s.m)(this.getSrc,this.altText).then(t=>{this.innerHTML="",t&&(this.updateFillColor(t),this.appendChild(t))})}shouldRender(t){const e=this.getAttribute(t);return this.getSrc===e}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&this.shouldRender(t)&&this.renderImage()}}const c=(0,i.Zz)((0,r.RF)({mappings:{fill:{},height:{selector:()=>":host"},width:{selector:()=>":host"}}}),r.VO,r.tQ)(h)},18782(t,e,n){n.d(e,{m:()=>i});var r=n(25414);const a=t=>{const e=r.A.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:["image"],FORBID_TAGS:["defs"]});return(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("svg")},i=async(t,e)=>{try{let n;if((t=>t.startsWith("data:image/svg+xml;base64,"))(t)){const e=atob(t.slice(26));n=a(e)}else if("svg"===(t=>{const e=t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);return e?e[1]:null})(t)){const e=await fetch(t),r=await e.text();n=a(r)}else n=((t,e)=>{const n=document.createElement("img");return n.setAttribute("src",t),n.setAttribute("alt",e),n})(t,e);return n.style.setProperty("max-width","100%"),n.style.setProperty("max-height","100%"),n}catch{return null}}},3393(t,e,n){n.d(e,{y:()=>o});var r=n(9696),a=n(79365),i=n(81365);const o=(...t)=>(0,r.Zz)(a.XX,a._$,a.yF,a.jd)((0,i.q)(...t))},64101(t,e,n){n.d(e,{QF:()=>y,SP:()=>r,SZ:()=>g,Tv:()=>p,US:()=>l,V$:()=>o,eT:()=>s,lv:()=>u,mx:()=>d,nr:()=>c,rR:()=>h,ui:()=>a,wJ:()=>i});const r=["MM/DD/YYYY","DD/MM/YYYY","YYYY/MM/DD"],a=r[0],i="YYYY-MM-DD",o=100,s="/",l=["January","February","March","April","May","June","July","August","September","October","November","December"],d=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h={MONTH:{id:"month",min:1,max:12,placeholder:"MM"},DAY:{id:"day",min:1,max:31,placeholder:"DD"},YEAR:{id:"year",min:0,max:9999,placeholder:"YYYY"}},c={year:{min:1900,max:2099}},p="Done",u="Cancel",y="Today",g=150},15177(t,e,n){n.d(e,{N:()=>r});const r=(t,e)=>{if("number"==typeof t)return new Date(t);if("string"==typeof t){const n=new Date(t.replace(/-/g,"/"));return e?new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())):new Date(n)}return new Date}},88350(t,e,n){n.r(e),n.d(e,{CalendarClass:()=>z,componentName:()=>C}),n(27092),n(30576);var r=n(19624),a=n(25964),i=n(3393),o=n(9696),s=n(97810),l=n(73551),d=n(79365),h=n(49224),c=n(80071),p=n(64101),u=n(15177);const y=(t,e)=>Array.isArray(t)&&t.length===e&&t.filter(Boolean).length===e,g=({label:t,dataId:e,dataName:n})=>`\n\t<div class="combo-box-item"\n\t\tdata-id="${e}"\n\t\tdata-name="${n}"\n\t>\n\t\t\t${t}\n\t</div>\n`,b=(t=p.US)=>t.map((t,e)=>g({label:t,dataId:e+1,dataName:t})).join(""),v=(t,e)=>{const[n,r]=(0,h._G)(e),[a,i]=(0,h._G)(t);return a===n&&i===r},m=(t,e,n)=>(t.addEventListener("input",e),t.addEventListener("focusout",n),t),C=(0,s.xE)("calendar"),w=["initial-value","initial-year","initial-month","years-range","calendar-months","calendar-weekdays","calendar-label-today","st-host-direction","disabled","full-width"],f=["calendar-label-submit","calendar-label-cancel"],S=(0,i.y)({componentName:C,baseSelector:"div"}),{calendar:x,day:M,dayEntry:V,currentDay:D,selectedDay:N,disabledDay:H,weekday:E,topNav:T,topNavSelectors:Y,bottomNav:L,navPrev:A,navNext:k,navPrevRTL:B,navNextRTL:I,yearInput:$,monthInput:R}={calendar:{selector:()=>".calendar"},topNav:{selector:()=>".nav.top-nav"},topNavSelectors:{selector:()=>".nav.top-nav .selectors > span"},bottomNav:{selector:()=>".nav.bottom-nav"},day:{selector:()=>".day"},dayEntry:{selector:()=>".day-entry"},currentDay:{selector:()=>".day-entry[data-current-day] .day"},selectedDay:{selector:()=>".day-entry[data-selected] .day"},disabledDay:{selector:()=>'.day-entry[data-disabled="true"] .day'},weekday:{selector:()=>".weekday"},navPrev:{selector:()=>".nav-prev"},navNext:{selector:()=>".nav-next"},navPrevRTL:{selector:()=>':host([st-host-direction="rtl"]) .nav-prev'},navNextRTL:{selector:()=>':host([st-host-direction="rtl"]) .nav-next'},yearInput:{selector:()=>".year-input"},monthInput:{selector:()=>".month-input"}},z=(0,o.Zz)((0,d.RF)({componentNameOverride:(0,s.xE)("input-wrapper")}),(0,d.RF)({mappings:{fontSize:{},fontFamily:{},hostWidth:[{selector:()=>":host",property:"width"},{selector:"table",property:"width"}],hostDirection:{property:"direction"},topNavVerticalPadding:[{...T,property:"padding-top"},{...T,property:"padding-bottom"}],topNavHorizointalPadding:[{...T,property:"padding-right"},{...T,property:"padding-left"}],topNavAlignment:{...T,property:"justify-content"},topNavGap:{...T,property:"gap"},topNavSelectorsGap:{...Y,property:"gap"},bottomNavVerticalPadding:[{...L,property:"padding-top"},{...L,property:"padding-bottom"}],bottomNavHorizontalPadding:[{...L,property:"padding-right"},{...L,property:"padding-left"}],bottomNavAlignment:{...L,property:"justify-content"},bottomNavGap:{...L,property:"gap"},navMarginBottom:{...T,property:"margin-bottom"},calendarPadding:[{...x,property:"padding-bottom"},{...x,property:"padding-right"},{...x,property:"padding-left"}],navBorderBottomWidth:{...T,property:"border-bottom-width"},navBorderBottomColor:{...T,property:"border-bottom-color"},navBorderBottomStyle:{...T,property:"border-bottom-style"},weekdayFontSize:{...E,property:"font-size"},weekdayFontWeight:{...E,property:"font-weight"},currentDayBorderColor:{...D,property:"border-color"},currentDayBorderWidth:{...D,property:"border-width"},currentDayBorderStyle:{...D,property:"border-style"},dayHeight:{...V,property:"height"},daySize:[{...M,property:"height"},{...M,property:"width"}],dayPadding:{...M,property:"padding"},dayRadius:{...M,property:"border-radius"},dayTextAlign:{...M,property:"text-align"},dayBlockAlign:{...M,property:"margin"},dayTextColor:{...M,property:"color"},dayFontWeight:{...M,property:"font-weight"},dayBackgroundColor:{...M,property:"background-color"},dayCursor:{...M,property:"cursor"},dayFontSize:{...M,property:"font-size"},dayBackgroundColorHover:{selector:()=>".day:hover",property:"background-color"},daySelectedTextdColor:{...N,property:"color"},daySelectedBackgroundColor:{...N,property:"background-color"},dayDisabledTextdColor:{...H,property:"color"},yearInputWidth:{...$,property:"width"},monthInputWidth:{...R,property:"width"},navButtonSize:[{...A,property:"width"},{...A,property:"height"},{...k,property:"width"},{...k,property:"height"}],navButtonCursor:[{...A,property:"cursor"},{...k,property:"cursor"}],navButtonRotation:[{...B,property:"transform"},{...I,property:"transform"}],navButtonOpacity:[{...A,property:"opacity"},{...k,property:"opacity"}]}}),d.VO,d.tQ)(class extends S{static get observedAttributes(){return[].concat(S.observedAttributes||[],w,f)}preview;epoch;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <nav class="nav top-nav">\n <div class="nav-prev">\n </div>\n <div class="selectors"></div>\n <div class="nav-next">\n </div>\n </nav>\n <div class="calendar"></div>\n <nav class="nav bottom-nav">\n <descope-button class="cancel-button" variant="link" mode="primary">Cancel</descope-button>\n <descope-button class="submit-button" variant="link" mode="primary" disabled="true">Done</descope-button>\n </nav>\n </div>\n ',(0,a.fz)(`\n :host {\n display: inline-block;\n box-sizing: border-box;\n max-width: 100%;\n user-select: none;\n -webkit-user-select: none;\n }\n\n :host ::slotted {\n padding: 0;\n }\n\n [data-toggle-calendar] {\n cursor: pointer;\n display: flex;\n align-self: center;\n z-index: 1;\n }\n\n [data-disabled="true"] {\n pointer-events: none;\n }\n\n .calendar .day {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .nav {\n display: flex;\n align-items: center;\n box-sizing: border-box;\n }\n\n .selectors,\n .selectors span {\n display: flex;\n justify-content: center;\n }\n\n descope-button {\n padding: 0;\n ${r.J.cssVarList.horizontalPadding}: 0;\n ${r.J.cssVarList.verticalPadding}: 0;\n ${r.J.cssVarList.outlineWidth}: 0;\n }\n\n .combo-box-item {\n display:flex;\n flex-direction: column;\n }\n\n ${(0,l.Kl)()}\n `,this)}set value(t){if(!t)return;const e=(0,u.N)(t).getTime();(0,h.mZ)(e)&&e!==this.epoch&&(this.epoch=e,this.renderCalendar())}get value(){return this.epoch?(0,h.jO)(this.epoch,p.wJ):""}get isSelectedView(){return v(this.preview,this.epoch)}get isTodayView(){return v((0,h.Ln)(),this.preview)}get monthNames(){return(t=>{const e=t?.split(",");return y(e,12)?e:p.US})(this.getAttribute("calendar-months"))}get weekdayNames(){return(t=>{const e=t?.split?.(",");return y(e,7)?e:p.mx})(this.getAttribute("calendar-weekdays"))}get hasYearValue(){return!!this.yearInput.value}get hasMonthValue(){return!!this.monthInput.value}get yearsRange(){const t=this.getAttribute("years-range")?.split("-");if(2===t?.length){const[e,n]=t.map(Number);if(e<=n)return[e,n]}const e=(0,u.N)().getFullYear();return[e,e+p.V$]}init(){super.init?.(),this.initCalendar(),this.renderCalendar()}initCalendar(){this.calendar=this.shadowRoot.querySelector(".calendar"),this.navPrevEle=this.shadowRoot.querySelector(".nav-prev"),this.navNextEle=this.shadowRoot.querySelector(".nav-next"),this.submitButton=this.shadowRoot.querySelector(".submit-button"),this.cancelButton=this.shadowRoot.querySelector(".cancel-button"),this.initInputs(),this.initNav(),this.addEventListener("day-changed",()=>this.submitButton.removeAttribute("disabled")),this.submitButton.shadowRoot.querySelector("vaadin-button").setAttribute("disabled","true")}initInputs(){const t=(()=>{const t=document.createElement("span");return t.innerHTML=`\n <descope-combo-box\n label-type="static"\n bordered="true"\n item-label-path="data-name"\n item-value-path="data-id"\n class="month-input"\n >\n ${b()}\n </descope-combo-box>\n <descope-combo-box\n allow-custom-value="true"\n label-type="static"\n bordered="true"\n item-label-path="data-name"\n item-value-path="data-id"\n class="year-input"\n no-empty-value="true"\n >\n </descope-combo-box>\n `,t})(this.monthNames,this.yearsRange);this.shadowRoot.querySelector(".selectors").appendChild(t),this.monthInput=m(this.shadowRoot.querySelector(".month-input"),this.onMonthChange.bind(this),this.onMonthInputBlur.bind(this)),this.yearInput=m(this.shadowRoot.querySelector(".year-input"),this.onYearChange.bind(this),this.onYearInputBlur.bind(this)),[this.monthInput,this.yearInput].forEach(t=>(0,s.EA)(this,t,{includeAttrs:["disabled","size","st-host-direction"]}))}initNav(){this.navPrevEle.addEventListener("click",this.navPrevMonth.bind(this)),this.navNextEle.addEventListener("click",this.navNextMonth.bind(this)),this.cancelButton.addEventListener("click",this.onCancel.bind(this)),this.submitButton.addEventListener("click",this.onSubmit.bind(this)),[this.navPrevEle,this.navNextEle].forEach(t=>(0,s.EA)(this,t,{includeAttrs:["size"]})),this.shadowRoot.querySelector(".nav-next").innerHTML=c.ZM,this.shadowRoot.querySelector(".nav-prev").innerHTML=c.i1}onSubmit(){this.isDisabled||this.value&&this.dispatchEvent(new CustomEvent("date-submit",{detail:(0,u.N)(this.preview)}))}onCancel(){this.isDisabled||(this.dispatchEvent(new CustomEvent("cancel")),this.dispatchEvent(new CustomEvent("date-cancel")),this.clearSelectedDay())}clearSelectedDay(){this.getSelectedDayEle()?.removeAttribute("data-selected"),this.submitButton.setAttribute("disabled","true"),this.epoch=""}updateInputs(){if(this.yearInput&&this.monthInput){const t=this.preview||(0,h.Ln)(),e=(0,h.Bl)(t),n=(0,h.tj)(t);this.monthInput.value=n,setTimeout(()=>{this.yearInput.baseElement.value=e})}}renderCalendar(){const t=(0,u.N)(this.preview||(0,h.Ln)()).getTime(),[e,n]=(0,h._G)(t);this.calendar&&(this.calendar.innerHTML=((t,e,n)=>{const r=((t,e)=>new Date(t,e,0).getDate())(t,e),a=new Date(t,e-1,1).getDay();let i="<table>";i+=`<thead><tr>${n.reduce((t,e)=>`${t}<th><span class="weekday">${e}</span></th>`,"")}</tr></thead>`,i+="<tbody>",i+="<tr>";for(let t=0;t<a;t++)i+="<td></td>";let o=a;for(let t=1;t<=r;t++)7===o&&(o=0,i+="</tr><tr>"),i+=`\n <td\n data-date-day="${t}"\n class="day-entry">\n <span class="day" data-date-day=${t}>\n ${t}\n </span>\n </td>\n `,o++;for(;o<7;)i+="<td></td>",o++;return i+="</tr></tbody></table>",i})(e,n,this.weekdayNames.map(t=>t.substring(0,3)))),Array.from(this.calendar?.querySelectorAll(".day-entry .day")||[]).forEach(t=>t.addEventListener("click",this.onDayChange.bind(this))),this.updateInputs(),this.setSelectedDay(),this.setCurrentDay()}onDayChange(t){if(this.isDisabled)return;const e=(0,u.N)(this.preview);e.setDate(Number(t.target.getAttribute("data-date-day"))),this.value=(0,h.jO)(e.getTime(),p.wJ),this.dispatchEvent(new CustomEvent("day-changed",{detail:e}))}onYearChange(t){if(!t.target.value)return;const e=(0,u.N)(this.preview);e.setFullYear(Number(t.target.value.trim())),this.preview=e.getTime(),this.renderCalendar(),this.dispatchEvent(new CustomEvent("year-changed",{detail:e}))}onMonthChange(t){if(!t.target.value)return;const e=(0,u.N)(this.preview);e.setMonth(Number(t.target.value)-1),this.preview=e.getTime(),this.renderCalendar(),this.dispatchEvent(new CustomEvent("month-changed",{detail:e}))}onYearInputBlur(t){this.yearInput.baseElement.value=t.target.value||(0,h.Bl)(this.preview)}onMonthInputBlur(t){this.monthInput.baseElement.value=t.target.value||(0,h.tj)(this.preview)}getSelectedDayEle(){const t=(0,u.N)(this.epoch).getDate();return this.calendar?.querySelector(`[data-date-day="${t}"]`)}getCurrentDayEle(){return this.calendar?.querySelector(`[data-date-day="${(0,h._B)()}"]`)}clearSelectedDays(){const t=this.calendar?.querySelectorAll("[data-selected]");t&&t.forEach(t=>t.removeAttribute("data-selected"))}setSelectedDay(){this.clearSelectedDays(),this.value&&this.isSelectedView&&this.getSelectedDayEle().setAttribute("data-selected","true")}setCurrentDay(){if(this.isTodayView){const t=this.getCurrentDayEle(),e=this.getAttribute("calendar-label-today")||p.QF;t?.setAttribute("data-current-day","true"),t?.setAttribute("title",e)}}navPrevMonth(){if(this.isDisabled)return;const t=(t=>{const e=(0,u.N)(t),n=e.getMonth();if(0===n){const t=e.getFullYear();e.setFullYear(t-1),e.setMonth(11)}else e.setMonth(n-1);return e})(this.preview);this.preview=t.getTime(),this.renderCalendar()}navNextMonth(){if(this.isDisabled)return;const t=(t=>{const e=(0,u.N)(t),n=e.getMonth();if(11===n){const t=e.getFullYear();e.setFullYear(t+1),e.setMonth(0)}else e.setMonth(n+1);return e})(this.preview);this.preview=t.getTime(),this.renderCalendar()}clearValue(){this.epoch="",this.value="",this.removeAttribute("preview"),this.submitButton.setAttribute("disabled","true")}onInitialValueChange(t){if(this.value)return;const e=(0,u.N)(t).getTime();(0,h.mZ)(e)?(this.epoch=e,this.preview=e):this.clearValue()}onYearsRangeChange(){setTimeout(()=>{this.yearInput&&(this.yearInput.innerHTML=(t=>{const[e,n]=t,r=[];for(let t=e;t<=n;t++)r.push(t);return r})(this.yearsRange).map(t=>g({label:t,dataId:t,dataName:t})).join(""))})}onMonthNamesChange(){setTimeout(()=>{this.monthInput&&(this.monthInput.innerHTML=b(this.monthNames))})}onSubmitLabelChange(t){this.submitButton&&(this.submitButton.textContent=t||p.Tv)}onCancelLabelChange(t){this.cancelButton&&(this.cancelButton.textContent=t||p.lv)}onInitialMonthChange(t){const e=(0,h.Bl)(this.preview);this.preview=(0,u.N)(`${e}/${t}/1`).getTime()}onInitialYearChange(t){const e=(0,h.tj)(this.preview);this.preview=(0,u.N)(`${t}/${e}/1`).getTime()}attributeChangedCallback(t,e,n){super.attributeChangedCallback(t,e,n),e!==n&&(f.includes(t)?("calendar-label-submit"===t&&this.onSubmitLabelChange(n),"calendar-label-cancel"===t&&this.onCancelLabelChange(n)):(n&&"initial-value"===t&&this.onInitialValueChange(n),n&&"initial-month"===t&&this.onInitialMonthChange(n),n&&"initial-year"===t&&this.onInitialYearChange(n),"years-range"===t&&this.onYearsRangeChange(Number(n)),"calendar-months"===t&&this.onMonthNamesChange(),"calendar-label-today"===t&&this.setCurrentDay(n),"disabled"===t&&setTimeout(()=>{this.cancelButton?.setAttribute("disabled","true"===n)}),this.renderCalendar()))}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}});customElements.define(C,z)},77421(t,e,n){n.d(e,{F:()=>s});var r=n(64101),a=n(15177);const i={MM:"(0?[1-9]|1[0-2])",DD:"(0?[1-9]|[12][0-9]|3[01])",YYYY:"([0-9]{4})"},o=t=>{const e=(t=>`^${t.split(r.eT).map(t=>i[t]).join("\\D")}$`)(t),n=(t=>{const e=t.split(r.eT);return t=>{const n={};return e.forEach((e,r)=>{n[e]=t[r+1]}),[n.YYYY,n.MM,n.DD]}})(t),o=new RegExp(e);return{pattern:e,validate:t=>o.test(t),getDate:t=>((t,e,n)=>{const i=e.exec(t);if(!i)return null;const[o,s,l]=n(i);return(0,a.N)([o,s,l].join(r.eT))})(t,o,n)}},s=Object.fromEntries(r.SP.map(t=>[t,o(t)]))},49224(t,e,n){n.d(e,{Bl:()=>h,Et:()=>o,Ln:()=>d,Rm:()=>y,Xs:()=>u,_B:()=>p,_G:()=>s,jO:()=>l,mZ:()=>i,tj:()=>c,xq:()=>g});var r=n(77421),a=n(15177);const i=t=>!Number.isNaN(Number(t)),o=t=>!!String(t||"").trim()&&!Number.isNaN(Number(t)),s=t=>{const e=(0,a.N)(t);return[e.getFullYear(),e.getMonth()+1,e.getDate()]},l=(t,e)=>{const[n,r,a]=s(t),i={DD:String(a).padStart(2,"0"),MM:String(r).padStart(2,"0"),YYYY:String(n)};return e.replace(/DD|MM|YYYY/g,t=>i[t])},d=()=>(0,a.N)().getTime(),h=t=>(0,a.N)(t).getFullYear().toString(),c=t=>((0,a.N)(t).getMonth()+1).toString(),p=()=>(0,a.N)().getDate(),u=t=>{const e=new CSSStyleSheet;e.insertRule(":host{display:block!important;}"),t?.shadowRoot?.adoptedStyleSheets?.push(e)},y=(t,e)=>{const n=t.trim?.();return n?r.F[e].getDate(n):null},g=(t,e)=>"number"==typeof t?t:e?Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()):t.getTime()},80071(t,e,n){n.d(e,{ZM:()=>a,i1:()=>i,ki:()=>r});const r='\n<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9 5H15V4.50468C15 4.21404 15.226 4 15.5047 4H16.4953C16.786 4 17 4.22595 17 4.50468V5H18.7568C19.3028 5 19.75 5.44725 19.75 5.99896V7.00104C19.75 7.55734 19.3053 8 18.7568 8H5.24317C4.69717 8 4.25 7.55275 4.25 7.00104V5.99896C4.25 5.44266 4.69466 5 5.24317 5H7V4.50468C7 4.21404 7.22596 4 7.50468 4H8.49532C8.78596 4 9 4.22595 9 4.50468V5ZM5.50468 9H6.49532C6.78596 9 7 9.22596 7 9.50468V10.4953C7 10.786 6.77404 11 6.49532 11H5.50468C5.21404 11 5 10.774 5 10.4953V9.50468C5 9.21404 5.22595 9 5.50468 9ZM8.50468 9H9.49532C9.78596 9 10 9.22596 10 9.50468V10.4953C10 10.786 9.77404 11 9.49532 11H8.50468C8.21404 11 8 10.774 8 10.4953V9.50468C8 9.21404 8.22596 9 8.50468 9ZM11.5047 9H12.4953C12.786 9 13 9.22596 13 9.50468V10.4953C13 10.786 12.774 11 12.4953 11H11.5047C11.214 11 11 10.774 11 10.4953V9.50468C11 9.21404 11.226 9 11.5047 9ZM5.50468 12H6.49532C6.78596 12 7 12.226 7 12.5047V13.4953C7 13.786 6.77404 14 6.49532 14H5.50468C5.21404 14 5 13.774 5 13.4953V12.5047C5 12.214 5.22595 12 5.50468 12ZM8.50468 12H9.49532C9.78596 12 10 12.226 10 12.5047V13.4953C10 13.786 9.77404 14 9.49532 14H8.50468C8.21404 14 8 13.774 8 13.4953V12.5047C8 12.214 8.22596 12 8.50468 12ZM11.5047 12H12.4953C12.786 12 13 12.226 13 12.5047V13.4953C13 13.786 12.774 14 12.4953 14H11.5047C11.214 14 11 13.774 11 13.4953V12.5047C11 12.214 11.226 12 11.5047 12ZM5.50468 15H6.49532C6.78596 15 7 15.226 7 15.5047V16.4953C7 16.786 6.77404 17 6.49532 17H5.50468C5.21404 17 5 16.774 5 16.4953V15.5047C5 15.214 5.22595 15 5.50468 15ZM8.50468 15H9.49532C9.78596 15 10 15.226 10 15.5047V16.4953C10 16.786 9.77404 17 9.49532 17H8.50468C8.21404 17 8 16.774 8 16.4953V15.5047C8 15.214 8.22596 15 8.50468 15ZM11.5047 15H12.4953C12.786 15 13 15.226 13 15.5047V16.4953C13 16.786 12.774 17 12.4953 17H11.5047C11.214 17 11 16.774 11 16.4953V15.5047C11 15.214 11.226 15 11.5047 15ZM14.5047 9H15.4953C15.786 9 16 9.22596 16 9.50468V10.4953C16 10.786 15.774 11 15.4953 11H14.5047C14.214 11 14 10.774 14 10.4953V9.50468C14 9.21404 14.226 9 14.5047 9ZM14.5047 12H15.4953C15.786 12 16 12.226 16 12.5047V13.4953C16 13.786 15.774 14 15.4953 14H14.5047C14.214 14 14 13.774 14 13.4953V12.5047C14 12.214 14.226 12 14.5047 12ZM14.5047 15H15.4953C15.786 15 16 15.226 16 15.5047V16.4953C16 16.786 15.774 17 15.4953 17H14.5047C14.214 17 14 16.774 14 16.4953V15.5047C14 15.214 14.226 15 14.5047 15ZM17.5047 15H18.4953C18.786 15 19 15.226 19 15.5047V16.4953C19 16.786 18.774 17 18.4953 17H17.5047C17.214 17 17 16.774 17 16.4953V15.5047C17 15.214 17.226 15 17.5047 15ZM5.50468 18H6.49532C6.78596 18 7 18.226 7 18.5047V19.4953C7 19.786 6.77404 20 6.49532 20H5.50468C5.21404 20 5 19.774 5 19.4953V18.5047C5 18.214 5.22595 18 5.50468 18ZM8.50468 18H9.49532C9.78596 18 10 18.226 10 18.5047V19.4953C10 19.786 9.77404 20 9.49532 20H8.50468C8.21404 20 8 19.774 8 19.4953V18.5047C8 18.214 8.22596 18 8.50468 18ZM11.5047 18H12.4953C12.786 18 13 18.226 13 18.5047V19.4953C13 19.786 12.774 20 12.4953 20H11.5047C11.214 20 11 19.774 11 19.4953V18.5047C11 18.214 11.226 18 11.5047 18ZM14.5047 18H15.4953C15.786 18 16 18.226 16 18.5047V19.4953C16 19.786 15.774 20 15.4953 20H14.5047C14.214 20 14 19.774 14 19.4953V18.5047C14 18.214 14.226 18 14.5047 18ZM17.5047 18H18.4953C18.786 18 19 18.226 19 18.5047V19.4953C19 19.786 18.774 20 18.4953 20H17.5047C17.214 20 17 19.774 17 19.4953V18.5047C17 18.214 17.226 18 17.5047 18ZM17.5047 12H18.4953C18.786 12 19 12.226 19 12.5047V13.4953C19 13.786 18.774 14 18.4953 14H17.5047C17.214 14 17 13.774 17 13.4953V12.5047C17 12.214 17.226 12 17.5047 12ZM17.5047 9H18.4953C18.786 9 19 9.22596 19 9.50468V10.4953C19 10.786 18.774 11 18.4953 11H17.5047C17.214 11 17 10.774 17 10.4953V9.50468C17 9.21404 17.226 9 17.5047 9Z" fill="#808080"/>\n</svg>\n',a='\n<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.27283 6.78069C8.87912 6.34164 8.91587 5.66655 9.35492 5.27283C9.79397 4.87912 10.4691 4.91587 10.8628 5.35492C10.8628 5.35492 16.0022 10.9543 16.366 11.36C16.7298 11.7657 16.7298 12.2392 16.366 12.6448L10.8628 18.6451C10.4691 19.0841 9.79397 19.1209 9.35492 18.7272C8.91587 18.3334 8.87912 17.6584 9.27283 17.2193L14.1368 12L9.27283 6.78069Z" fill="#808080"/>\n</svg>',i='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M14.7272 17.2193C15.1209 17.6584 15.0841 18.3334 14.6451 18.7272C14.206 19.1209 13.5309 19.0841 13.1372 18.6451C13.1372 18.6451 7.99776 13.0457 7.63399 12.64C7.27023 12.2343 7.27023 11.7608 7.63399 11.3552L13.1372 5.35492C13.5309 4.91587 14.206 4.87912 14.6451 5.27283C15.0841 5.66655 15.1209 6.34164 14.7272 6.78069L9.86322 12L14.7272 17.2193Z" fill="#808080"/>\n</svg>'}}]);
|
|
2
|
+
//# sourceMappingURL=8350.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"8350.js","mappings":"0NAYO,MAAMA,GAAgB,QAAiB,WAsCxC,KAAEC,EAAI,MAAEC,EAAK,YAAEC,GAAgB,CACnCF,KAAM,CAAEG,SAAU,IAAM,SACxBF,MAAO,CAAEE,SAAU,iBACnBD,YAAa,CAAEC,SAAU,IAAM,4BAGjC,IAAIC,EAEG,MAAMC,GAAc,SACzB,QAAa,CAAEC,SAAU,CAAC,CAAEC,KAAM,aAAcC,MAAO,YACvD,QAAiB,CACfC,SAAU,CACRC,UAAW,CAAEC,SAAU,SACvBC,WAAY,CAAED,SAAU,UACxBE,cAAe,IAAKb,EAAMW,SAAU,aACpCG,SAAU,CAAC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G,MAAMxG,OAAOnB,IAE7C4H,EAAY5H,KAAU6H,OAAO7H,GAAO,IAAIwE,SAAWrD,OAAOwG,MAAMxG,OAAOnB,IAEvE8H,EAAqB/H,IAChC,MAAMzG,GAAO,OAAQyG,GAIrB,MAAO,CAHMzG,EAAKM,cACJN,EAAKO,WAAa,EACpBP,EAAKQ,YAINiO,EAAc,CAAChI,EAAOyG,KACjC,MAAOxN,EAAMiK,EAAO7G,GAAO0L,EAAkB/H,GAEvCiI,EAAQ,CACZ3B,GAAIwB,OAAOzL,GAAK6L,SAAS,EAAG,KAC5B7B,GAAIyB,OAAO5E,GAAOgF,SAAS,EAAG,KAC9B3B,KAAMuB,OAAO7O,IAGf,OAAOwN,EAAO9M,QAAQ,cAAgBpC,GAAU0Q,EAAM1Q,KAG3C4Q,EAAiB,KAAM,SAAUjI,UACjCrG,EAAemG,IAAU,OAAQA,GAAOnG,cAAcuO,WACtDtO,EAAYkG,KAAW,OAAQA,GAAOlG,WAAa,GAAGsO,WACtDC,EAAgB,KAAM,SAAUtO,UAMhCuO,EAAiCjT,IAC5C,MAAMkT,EAAK,IAAIC,cACfD,EAAGE,WAAW,mCACdpT,GAAKkM,YAAYmH,oBAAoBpD,KAAKiD,IAG/BI,EAAkB,CAAC1I,EAAKwG,KACnC,MAAMmC,EAAU3I,EAAIwE,SACpB,OAAKmE,EACE,IAAQnC,GAAQ1M,QAAQ6O,GADV,MAIVC,EAAc,CAACtP,EAAMuP,IAEZ,iBAATvP,EACFA,EAGLuP,EACKrP,KAAKG,IAAIL,EAAKM,cAAeN,EAAKO,WAAYP,EAAKQ,WAIrDR,EAAK2G,S,mDC3DP,MAAM6I,EAAe,yxHAMfC,EAAiB,ieAKjBC,EAAgB,8d","sources":["webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/./src/components/descope-date-field/consts.js","webpack://@descope/web-components-ui/./src/components/descope-date-field/date-utils.js","webpack://@descope/web-components-ui/./src/components/descope-date-field/descope-calendar/helpers.js","webpack://@descope/web-components-ui/./src/components/descope-date-field/descope-calendar/CalendarClass.js","webpack://@descope/web-components-ui/./src/components/descope-date-field/descope-calendar/index.js","webpack://@descope/web-components-ui/./src/components/descope-date-field/formats.js","webpack://@descope/web-components-ui/./src/components/descope-date-field/helpers.js","webpack://@descope/web-components-ui/./src/components/descope-date-field/icons.js"],"sourcesContent":["import { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { clickableMixin } from './clickableMixin';\n\nexport const componentName = getComponentName('button');\n\nconst resetStyles = `\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n`;\n\nconst iconStyles = `\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n`;\n\nconst editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;\n\nconst { host, label, slottedIcon } = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n slottedIcon: { selector: () => '::slotted(descope-icon)' },\n};\n\nlet loadingIndicatorStyles;\n\nexport const ButtonClass = compose(\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n 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"," \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 { compose } from '../helpers';\nimport {\n changeMixin,\n inputEventsDispatchingMixin,\n inputValidationMixin,\n normalizeBooleanAttributesMixin,\n} from '../mixins';\nimport { createBaseClass } from './createBaseClass';\n\nexport const createBaseInputClass = (...args) =>\n compose(\n inputValidationMixin,\n changeMixin,\n normalizeBooleanAttributesMixin,\n inputEventsDispatchingMixin\n )(createBaseClass(...args));\n","export const SUPPORTED_FORMATS = ['MM/DD/YYYY', 'DD/MM/YYYY', 'YYYY/MM/DD'];\n\nexport const DEFAULT_FORMAT = SUPPORTED_FORMATS[0];\n\nexport const NATIVE_FORMAT = 'YYYY-MM-DD';\n\nexport const YEARS_RANGE = 100;\n\nexport const DIVIDER = '/';\n\nexport const months = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n];\n\nexport const weekdays = [\n 'Sunday',\n 'Monday',\n 'Tuesday',\n 'Wednesday',\n 'Thursday',\n 'Friday',\n 'Saturday',\n];\n\nexport const counterConfig = {\n MONTH: { id: 'month', min: 1, max: 12, placeholder: 'MM' },\n DAY: { id: 'day', min: 1, max: 31, placeholder: 'DD' },\n YEAR: { id: 'year', min: 0, max: 9999, placeholder: 'YYYY' },\n};\n\nexport const valRange = {\n year: { min: 1900, max: 2099 },\n};\n\nexport const BUTTON_LABEL_DONE = 'Done';\nexport const BUTTON_LABEL_CANCEL = 'Cancel';\nexport const CALENDAR_LABEL_TODAY = 'Today';\n\nexport const MOBILE_DEVICE_INTERACTION_TIMEOUT_MS = 150;\n","// polyfill for safari Date API (which doesn't accept \"YYYY-MM-DD\" string as value)\nexport const newDate = (date, isUtcTime) => {\n if (typeof date === 'number') {\n return new Date(date);\n }\n if (typeof date === 'string') {\n const d = new Date(date.replace(/-/g, '/'));\n if (isUtcTime) {\n return new Date(\n Date.UTC(\n d.getFullYear(),\n d.getMonth(),\n d.getDate(),\n d.getHours(),\n d.getMinutes(),\n d.getSeconds(),\n d.getMilliseconds()\n )\n );\n }\n return new Date(d);\n }\n return new Date();\n};\n","import { months, weekdays } from '../consts';\nimport { getPartsFromEpoch } from '../helpers';\nimport { newDate } from '../date-utils';\n\nconst isValidAttrArr = (arr, count) =>\n Array.isArray(arr) && arr.length === count && arr.filter(Boolean).length === count;\n\nconst generateYearList = (range) => {\n const [start, end] = range;\n const years = [];\n\n for (let year = start; year <= end; year++) {\n years.push(year);\n }\n\n return years;\n};\n\nconst getMaxDaysInMonth = (year, month) => new Date(year, month, 0).getDate();\n\nconst comboBoxItemTpl = ({ label, dataId, dataName }) => `\n\t<div class=\"combo-box-item\"\n\t\tdata-id=\"${dataId}\"\n\t\tdata-name=\"${dataName}\"\n\t>\n\t\t\t${label}\n\t</div>\n`;\n\nexport const createMonthView = (year, month, shortWeekdays) => {\n const daysInMonth = getMaxDaysInMonth(year, month);\n\n // Get day of the week (0 = Sunday, 1 = Monday, etc.)\n const firstDayOfMonth = new Date(year, month - 1, 1).getDay();\n\n let monthView = '<table>';\n\n // Add the table headers (days of the week)\n monthView += `<thead><tr>${shortWeekdays.reduce(\n (acc, d) => `${acc}<th><span class=\"weekday\">${d}</span></th>`,\n ''\n )}</tr></thead>`;\n\n monthView += '<tbody>';\n\n // Add empty cells for the days before the start of the month\n monthView += '<tr>';\n for (let i = 0; i < firstDayOfMonth; i++) {\n monthView += '<td></td>';\n }\n\n // Add days of the month\n let dayOfWeek = firstDayOfMonth;\n for (let i = 1; i <= daysInMonth; i++) {\n if (dayOfWeek === 7) {\n dayOfWeek = 0;\n monthView += '</tr><tr>';\n }\n\n monthView += `\n <td\n data-date-day=\"${i}\"\n class=\"day-entry\">\n <span class=\"day\" data-date-day=${i}>\n ${i}\n </span>\n </td>\n `;\n dayOfWeek++;\n }\n\n // Add empty cells for the days after the end of the month\n while (dayOfWeek < 7) {\n monthView += '<td></td>';\n dayOfWeek++;\n }\n\n monthView += '</tr></tbody></table>';\n\n return monthView;\n};\n\nexport const getYearOptions = (range) =>\n generateYearList(range)\n .map((item) => comboBoxItemTpl({ label: item, dataId: item, dataName: item }))\n .join('');\n\nexport const getMonthsOptions = (customMonths = months) =>\n customMonths\n .map((item, index) => comboBoxItemTpl({ label: item, dataId: index + 1, dataName: item }))\n .join('');\n\nexport const isViewVisible = (selectionEpoch, previewEpoch) => {\n const [previewYear, previewMonth] = getPartsFromEpoch(previewEpoch);\n const [selectedYear, selectedMonth] = getPartsFromEpoch(selectionEpoch);\n return selectedYear === previewYear && selectedMonth === previewMonth;\n};\n\nexport const createInputs = () => {\n const ele = document.createElement('span');\n\n ele.innerHTML = `\n <descope-combo-box\n label-type=\"static\"\n bordered=\"true\"\n item-label-path=\"data-name\"\n item-value-path=\"data-id\"\n class=\"month-input\"\n >\n ${getMonthsOptions()}\n </descope-combo-box>\n <descope-combo-box\n allow-custom-value=\"true\"\n label-type=\"static\"\n bordered=\"true\"\n item-label-path=\"data-name\"\n item-value-path=\"data-id\"\n class=\"year-input\"\n no-empty-value=\"true\"\n >\n </descope-combo-box>\n `;\n\n return ele;\n};\n\nexport const initComboBox = (input, onChange, onBlur) => {\n input.addEventListener('input', onChange);\n input.addEventListener('focusout', onBlur);\n return input;\n};\n\nexport const ensureMonthNamesArr = (attrVal) => {\n const monthArr = attrVal?.split(',');\n return isValidAttrArr(monthArr, 12) ? monthArr : months;\n};\n\nexport const ensureWeekdayNamesArr = (attrVal) => {\n const customWeekdayArr = attrVal?.split?.(',');\n const isCustomValid = isValidAttrArr(customWeekdayArr, 7);\n return isCustomValid ? customWeekdayArr : weekdays;\n};\n\nexport const ensureShortWeekdayNamesArr = (attrVal) => {\n const customShortWeekdays = attrVal;\n\n if (!attrVal || !isValidAttrArr(customShortWeekdays, 7)) {\n return weekdays.map((d) => d.substring(0, 3));\n }\n\n return customShortWeekdays.map((d) => d.substring(0, 3));\n};\n\nexport const truncateWeekdays = (arr) => arr.map((d) => d.substring(0, 3));\n\nexport const prevMonth = (epoch) => {\n const date = newDate(epoch);\n const month = date.getMonth();\n\n if (month === 0) {\n const year = date.getFullYear();\n date.setFullYear(year - 1);\n date.setMonth(11);\n } else {\n date.setMonth(month - 1);\n }\n\n return date;\n};\n\nexport const nextMonth = (epoch) => {\n const date = newDate(epoch);\n const month = date.getMonth();\n\n if (month === 11) {\n const year = date.getFullYear();\n date.setFullYear(year + 1);\n date.setMonth(0);\n } else {\n date.setMonth(month + 1);\n }\n\n return date;\n};\n","import { ButtonClass } from '@descope-ui/descope-button/class';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createBaseInputClass } from '../../../baseClasses/createBaseInputClass';\nimport { compose } from '../../../helpers';\nimport { forwardAttrs, getComponentName } from '../../../helpers/componentHelpers';\nimport { inputFloatingLabelStyle } from '../../../helpers/themeHelpers/resetHelpers';\nimport { componentNameValidationMixin, createStyleMixin, draggableMixin } from '../../../mixins';\nimport {\n getCurrentDay,\n getPartsFromEpoch,\n isValidEpoch,\n formatEpoch,\n getCurrentTime,\n getFullYear,\n getMonth,\n} from '../helpers';\nimport { arrowLeftIcon, arrowRightIcon } from '../icons';\nimport {\n BUTTON_LABEL_CANCEL,\n BUTTON_LABEL_DONE,\n CALENDAR_LABEL_TODAY,\n NATIVE_FORMAT,\n YEARS_RANGE,\n} from '../consts';\nimport {\n createMonthView,\n createInputs,\n getMonthsOptions,\n getYearOptions,\n initComboBox,\n ensureMonthNamesArr,\n isViewVisible,\n ensureWeekdayNamesArr,\n truncateWeekdays,\n prevMonth,\n nextMonth,\n} from './helpers';\nimport { newDate } from '../date-utils';\n\nexport const componentName = getComponentName('calendar');\n\nconst observedAttrs = [\n 'initial-value',\n 'initial-year',\n 'initial-month',\n 'years-range',\n 'calendar-months',\n 'calendar-weekdays',\n 'calendar-label-today',\n 'st-host-direction',\n 'disabled',\n 'full-width',\n];\n\nconst calendarUiAttrs = ['calendar-label-submit', 'calendar-label-cancel'];\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass RawCalendar extends BaseInputClass {\n static get observedAttributes() {\n return [].concat(BaseInputClass.observedAttributes || [], observedAttrs, calendarUiAttrs);\n }\n\n // preview state epoch\n preview;\n\n // value epoch\n epoch;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div>\n <nav class=\"nav top-nav\">\n <div class=\"nav-prev\">\n </div>\n <div class=\"selectors\"></div>\n <div class=\"nav-next\">\n </div>\n </nav>\n <div class=\"calendar\"></div>\n <nav class=\"nav bottom-nav\">\n <descope-button class=\"cancel-button\" variant=\"link\" mode=\"primary\">Cancel</descope-button>\n <descope-button class=\"submit-button\" variant=\"link\" mode=\"primary\" disabled=\"true\">Done</descope-button>\n </nav>\n </div>\n `;\n\n injectStyle(\n `\n :host {\n display: inline-block;\n box-sizing: border-box;\n max-width: 100%;\n user-select: none;\n -webkit-user-select: none;\n }\n\n :host ::slotted {\n padding: 0;\n }\n\n [data-toggle-calendar] {\n cursor: pointer;\n display: flex;\n align-self: center;\n z-index: 1;\n }\n\n [data-disabled=\"true\"] {\n pointer-events: none;\n }\n\n .calendar .day {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .nav {\n display: flex;\n align-items: center;\n box-sizing: border-box;\n }\n\n .selectors,\n .selectors span {\n display: flex;\n justify-content: center;\n }\n\n descope-button {\n padding: 0;\n ${ButtonClass.cssVarList.horizontalPadding}: 0;\n ${ButtonClass.cssVarList.verticalPadding}: 0;\n ${ButtonClass.cssVarList.outlineWidth}: 0;\n }\n\n .combo-box-item {\n display:flex;\n flex-direction: column;\n }\n\n ${inputFloatingLabelStyle()}\n `,\n this\n );\n }\n\n set value(val) {\n if (!val) return;\n\n const epoch = newDate(val).getTime();\n\n if (!isValidEpoch(epoch) || epoch === this.epoch) {\n return;\n }\n\n this.epoch = epoch;\n\n this.renderCalendar();\n }\n\n get value() {\n return this.epoch ? formatEpoch(this.epoch, NATIVE_FORMAT) : '';\n }\n\n get isSelectedView() {\n return isViewVisible(this.preview, this.epoch);\n }\n\n get isTodayView() {\n return isViewVisible(getCurrentTime(), this.preview);\n }\n\n get monthNames() {\n return ensureMonthNamesArr(this.getAttribute('calendar-months'));\n }\n\n get weekdayNames() {\n return ensureWeekdayNamesArr(this.getAttribute('calendar-weekdays'));\n }\n\n get hasYearValue() {\n return !!this.yearInput.value;\n }\n\n get hasMonthValue() {\n return !!this.monthInput.value;\n }\n\n get yearsRange() {\n const range = this.getAttribute('years-range')?.split('-');\n\n if (range?.length === 2) {\n const [start, end] = range.map(Number);\n if (start <= end) return [start, end];\n }\n\n const currentYear = newDate().getFullYear();\n\n return [currentYear, currentYear + YEARS_RANGE];\n }\n\n init() {\n super.init?.();\n this.initCalendar();\n this.renderCalendar();\n }\n\n initCalendar() {\n this.calendar = this.shadowRoot.querySelector('.calendar');\n\n this.navPrevEle = this.shadowRoot.querySelector('.nav-prev');\n this.navNextEle = this.shadowRoot.querySelector('.nav-next');\n this.submitButton = this.shadowRoot.querySelector('.submit-button');\n this.cancelButton = this.shadowRoot.querySelector('.cancel-button');\n\n this.initInputs();\n this.initNav();\n\n this.addEventListener('day-changed', () => this.submitButton.removeAttribute('disabled'));\n // This is a workaround for descope-components inside Vaadin's Popover component.\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. This happens when using Popover, and for specific attributes,\n // namely `disabled`. This is pending a more generic fix in the way we sync attibutes.\n this.submitButton.shadowRoot.querySelector('vaadin-button').setAttribute('disabled', 'true');\n }\n\n initInputs() {\n const ele = createInputs(this.monthNames, this.yearsRange);\n this.shadowRoot.querySelector('.selectors').appendChild(ele);\n\n this.monthInput = initComboBox(\n this.shadowRoot.querySelector('.month-input'),\n this.onMonthChange.bind(this),\n this.onMonthInputBlur.bind(this)\n );\n\n this.yearInput = initComboBox(\n this.shadowRoot.querySelector('.year-input'),\n this.onYearChange.bind(this),\n this.onYearInputBlur.bind(this)\n );\n\n [this.monthInput, this.yearInput].forEach((selector) =>\n forwardAttrs(this, selector, {\n includeAttrs: ['disabled', 'size', 'st-host-direction'],\n })\n );\n }\n\n initNav() {\n this.navPrevEle.addEventListener('click', this.navPrevMonth.bind(this));\n this.navNextEle.addEventListener('click', this.navNextMonth.bind(this));\n this.cancelButton.addEventListener('click', this.onCancel.bind(this));\n this.submitButton.addEventListener('click', this.onSubmit.bind(this));\n\n [this.navPrevEle, this.navNextEle].forEach((btn) =>\n forwardAttrs(this, btn, {\n includeAttrs: ['size'],\n })\n );\n\n this.shadowRoot.querySelector('.nav-next').innerHTML = arrowRightIcon;\n this.shadowRoot.querySelector('.nav-prev').innerHTML = arrowLeftIcon;\n }\n\n onSubmit() {\n if (this.isDisabled) return;\n if (!this.value) return;\n this.dispatchEvent(new CustomEvent('date-submit', { detail: newDate(this.preview) }));\n }\n\n onCancel() {\n if (this.isDisabled) return;\n this.dispatchEvent(new CustomEvent('cancel'));\n this.dispatchEvent(new CustomEvent('date-cancel'));\n this.clearSelectedDay();\n }\n\n clearSelectedDay() {\n this.getSelectedDayEle()?.removeAttribute('data-selected');\n this.submitButton.setAttribute('disabled', 'true');\n this.epoch = '';\n }\n\n updateInputs() {\n if (this.yearInput && this.monthInput) {\n const epoch = this.preview || getCurrentTime();\n const year = getFullYear(epoch);\n const month = getMonth(epoch);\n this.monthInput.value = month;\n // For the yearInput we update the base element directly to properly trigger the change event\n // since this can be a custom value\n setTimeout(() => {\n this.yearInput.baseElement.value = year;\n });\n }\n }\n\n renderCalendar() {\n const date = newDate(this.preview || getCurrentTime());\n const epoch = date.getTime();\n\n const [year, month] = getPartsFromEpoch(epoch);\n\n if (this.calendar) {\n this.calendar.innerHTML = createMonthView(year, month, truncateWeekdays(this.weekdayNames));\n }\n\n Array.from(this.calendar?.querySelectorAll('.day-entry .day') || []).forEach((ele) =>\n ele.addEventListener('click', this.onDayChange.bind(this))\n );\n\n this.updateInputs();\n this.setSelectedDay();\n this.setCurrentDay();\n }\n\n onDayChange(e) {\n if (this.isDisabled) return;\n const date = newDate(this.preview);\n date.setDate(Number(e.target.getAttribute('data-date-day')));\n this.value = formatEpoch(date.getTime(), NATIVE_FORMAT);\n this.dispatchEvent(new CustomEvent('day-changed', { detail: date }));\n }\n\n onYearChange(e) {\n if (!e.target.value) return;\n const date = newDate(this.preview);\n date.setFullYear(Number(e.target.value.trim()));\n this.preview = date.getTime();\n this.renderCalendar();\n this.dispatchEvent(new CustomEvent('year-changed', { detail: date }));\n }\n\n onMonthChange(e) {\n if (!e.target.value) return;\n const date = newDate(this.preview);\n date.setMonth(Number(e.target.value) - 1);\n this.preview = date.getTime();\n this.renderCalendar();\n this.dispatchEvent(new CustomEvent('month-changed', { detail: date }));\n }\n\n onYearInputBlur(e) {\n this.yearInput.baseElement.value = e.target.value || getFullYear(this.preview);\n }\n\n onMonthInputBlur(e) {\n this.monthInput.baseElement.value = e.target.value || getMonth(this.preview);\n }\n\n getSelectedDayEle() {\n const day = newDate(this.epoch).getDate();\n return this.calendar?.querySelector(`[data-date-day=\"${day}\"]`);\n }\n\n getCurrentDayEle() {\n return this.calendar?.querySelector(`[data-date-day=\"${getCurrentDay()}\"]`);\n }\n\n clearSelectedDays() {\n const cells = this.calendar?.querySelectorAll(`[data-selected]`);\n if (!cells) return;\n cells.forEach((c) => c.removeAttribute('data-selected'));\n }\n\n setSelectedDay() {\n this.clearSelectedDays();\n if (this.value && this.isSelectedView) {\n this.getSelectedDayEle().setAttribute('data-selected', 'true');\n }\n }\n\n setCurrentDay() {\n if (this.isTodayView) {\n const ele = this.getCurrentDayEle();\n const title = this.getAttribute('calendar-label-today') || CALENDAR_LABEL_TODAY;\n ele?.setAttribute('data-current-day', 'true');\n ele?.setAttribute('title', title);\n }\n }\n\n navPrevMonth() {\n if (this.isDisabled) {\n return;\n }\n const date = prevMonth(this.preview);\n this.preview = date.getTime();\n this.renderCalendar();\n }\n\n navNextMonth() {\n if (this.isDisabled) {\n return;\n }\n const date = nextMonth(this.preview);\n this.preview = date.getTime();\n this.renderCalendar();\n }\n\n clearValue() {\n this.epoch = '';\n this.value = '';\n this.removeAttribute('preview');\n this.submitButton.setAttribute('disabled', 'true');\n }\n\n onInitialValueChange(newValue) {\n // if component already has a value don't re-set value\n if (this.value) {\n return;\n }\n\n const date = newDate(newValue);\n const epoch = date.getTime();\n\n if (isValidEpoch(epoch)) {\n this.epoch = epoch;\n this.preview = epoch;\n } else {\n this.clearValue();\n }\n }\n\n onYearsRangeChange() {\n setTimeout(() => {\n if (this.yearInput) {\n this.yearInput.innerHTML = getYearOptions(this.yearsRange);\n }\n });\n }\n\n onMonthNamesChange() {\n setTimeout(() => {\n if (this.monthInput) {\n this.monthInput.innerHTML = getMonthsOptions(this.monthNames);\n }\n });\n }\n\n onSubmitLabelChange(newValue) {\n if (this.submitButton) {\n this.submitButton.textContent = newValue || BUTTON_LABEL_DONE;\n }\n }\n\n onCancelLabelChange(newValue) {\n if (this.cancelButton) {\n this.cancelButton.textContent = newValue || BUTTON_LABEL_CANCEL;\n }\n }\n\n onInitialMonthChange(val) {\n const currYear = getFullYear(this.preview);\n this.preview = newDate(`${currYear}/${val}/1`).getTime();\n }\n\n onInitialYearChange(val) {\n const currMonth = getMonth(this.preview);\n this.preview = newDate(`${val}/${currMonth}/1`).getTime();\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback(attrName, oldValue, newValue);\n if (oldValue !== newValue) {\n // attrs for which affect static ui parts doesn't require calendar re-render\n if (calendarUiAttrs.includes(attrName)) {\n if (attrName === 'calendar-label-submit') {\n this.onSubmitLabelChange(newValue);\n }\n if (attrName === 'calendar-label-cancel') {\n this.onCancelLabelChange(newValue);\n }\n } else {\n // we want to render the calendar for each of these attr change\n\n if (newValue && attrName === 'initial-value') {\n this.onInitialValueChange(newValue);\n }\n if (newValue && attrName === 'initial-month') {\n this.onInitialMonthChange(newValue);\n }\n if (newValue && attrName === 'initial-year') {\n this.onInitialYearChange(newValue);\n }\n if (attrName === 'years-range') {\n this.onYearsRangeChange(Number(newValue));\n }\n if (attrName === 'calendar-months') {\n this.onMonthNamesChange();\n }\n if (attrName === 'calendar-label-today') {\n this.setCurrentDay(newValue);\n }\n if (attrName === 'disabled') {\n setTimeout(() => {\n this.cancelButton?.setAttribute('disabled', newValue === 'true');\n });\n }\n\n this.renderCalendar();\n }\n }\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n return {};\n }\n}\n\nconst {\n calendar,\n day,\n dayEntry,\n currentDay,\n selectedDay,\n disabledDay,\n weekday,\n topNav,\n topNavSelectors,\n bottomNav,\n navPrev,\n navNext,\n navPrevRTL,\n navNextRTL,\n yearInput,\n monthInput,\n} = {\n calendar: { selector: () => '.calendar' },\n topNav: { selector: () => '.nav.top-nav' },\n topNavSelectors: { selector: () => '.nav.top-nav .selectors > span' },\n bottomNav: { selector: () => '.nav.bottom-nav' },\n day: { selector: () => '.day' },\n dayEntry: { selector: () => '.day-entry' },\n currentDay: { selector: () => '.day-entry[data-current-day] .day' },\n selectedDay: { selector: () => '.day-entry[data-selected] .day' },\n disabledDay: { selector: () => '.day-entry[data-disabled=\"true\"] .day' },\n weekday: { selector: () => '.weekday' },\n navPrev: { selector: () => '.nav-prev' },\n navNext: { selector: () => '.nav-next' },\n navPrevRTL: { selector: () => ':host([st-host-direction=\"rtl\"]) .nav-prev' },\n navNextRTL: { selector: () => ':host([st-host-direction=\"rtl\"]) .nav-next' },\n yearInput: { selector: () => '.year-input' },\n monthInput: { selector: () => '.month-input' },\n};\n\nexport const CalendarClass = compose(\n createStyleMixin({ componentNameOverride: getComponentName('input-wrapper') }),\n createStyleMixin({\n mappings: {\n fontSize: {},\n fontFamily: {},\n hostWidth: [\n { selector: () => ':host', property: 'width' },\n { selector: 'table', property: 'width' },\n ],\n hostDirection: { property: 'direction' },\n\n topNavVerticalPadding: [\n { ...topNav, property: 'padding-top' },\n { ...topNav, property: 'padding-bottom' },\n ],\n topNavHorizointalPadding: [\n { ...topNav, property: 'padding-right' },\n { ...topNav, property: 'padding-left' },\n ],\n topNavAlignment: { ...topNav, property: 'justify-content' },\n topNavGap: { ...topNav, property: 'gap' },\n topNavSelectorsGap: { ...topNavSelectors, property: 'gap' },\n\n bottomNavVerticalPadding: [\n { ...bottomNav, property: 'padding-top' },\n { ...bottomNav, property: 'padding-bottom' },\n ],\n bottomNavHorizontalPadding: [\n { ...bottomNav, property: 'padding-right' },\n { ...bottomNav, property: 'padding-left' },\n ],\n bottomNavAlignment: { ...bottomNav, property: 'justify-content' },\n bottomNavGap: { ...bottomNav, property: 'gap' },\n\n navMarginBottom: { ...topNav, property: 'margin-bottom' },\n\n calendarPadding: [\n { ...calendar, property: 'padding-bottom' },\n { ...calendar, property: 'padding-right' },\n { ...calendar, property: 'padding-left' },\n ],\n\n navBorderBottomWidth: { ...topNav, property: 'border-bottom-width' },\n navBorderBottomColor: { ...topNav, property: 'border-bottom-color' },\n navBorderBottomStyle: { ...topNav, property: 'border-bottom-style' },\n\n weekdayFontSize: { ...weekday, property: 'font-size' },\n weekdayFontWeight: { ...weekday, property: 'font-weight' },\n\n currentDayBorderColor: {\n ...currentDay,\n property: 'border-color',\n },\n currentDayBorderWidth: {\n ...currentDay,\n property: 'border-width',\n },\n currentDayBorderStyle: {\n ...currentDay,\n property: 'border-style',\n },\n\n dayHeight: { ...dayEntry, property: 'height' },\n daySize: [\n { ...day, property: 'height' },\n { ...day, property: 'width' },\n ],\n dayPadding: { ...day, property: 'padding' },\n dayRadius: { ...day, property: 'border-radius' },\n dayTextAlign: { ...day, property: 'text-align' },\n dayBlockAlign: { ...day, property: 'margin' },\n dayTextColor: { ...day, property: 'color' },\n dayFontWeight: { ...day, property: 'font-weight' },\n dayBackgroundColor: { ...day, property: 'background-color' },\n dayCursor: { ...day, property: 'cursor' },\n dayFontSize: { ...day, property: 'font-size' },\n\n dayBackgroundColorHover: {\n selector: () => '.day:hover',\n property: 'background-color',\n },\n\n daySelectedTextdColor: {\n ...selectedDay,\n property: 'color',\n },\n daySelectedBackgroundColor: {\n ...selectedDay,\n property: 'background-color',\n },\n dayDisabledTextdColor: {\n ...disabledDay,\n property: 'color',\n },\n\n yearInputWidth: { ...yearInput, property: 'width' },\n monthInputWidth: { ...monthInput, property: 'width' },\n\n navButtonSize: [\n { ...navPrev, property: 'width' },\n { ...navPrev, property: 'height' },\n { ...navNext, property: 'width' },\n { ...navNext, property: 'height' },\n ],\n navButtonCursor: [\n { ...navPrev, property: 'cursor' },\n { ...navNext, property: 'cursor' },\n ],\n navButtonRotation: [\n { ...navPrevRTL, property: 'transform' },\n { ...navNextRTL, property: 'transform' },\n ],\n navButtonOpacity: [\n { ...navPrev, property: 'opacity' },\n { ...navNext, property: 'opacity' },\n ],\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawCalendar);\n","import '@descope-ui/descope-combo-box';\nimport '@descope-ui/descope-button';\n\nimport { componentName, CalendarClass } from './CalendarClass';\n\ncustomElements.define(componentName, CalendarClass);\n\nexport { CalendarClass, componentName };\n","import { DIVIDER, SUPPORTED_FORMATS } from './consts';\nimport { newDate } from './date-utils';\n\nconst patterns = {\n MM: '(0?[1-9]|1[0-2])',\n DD: '(0?[1-9]|[12][0-9]|3[01])',\n YYYY: '([0-9]{4})',\n};\n\nconst createPattern = (format) => {\n const pattern = format\n .split(DIVIDER)\n .map((part) => patterns[part])\n .join('\\\\D');\n\n return `^${pattern}$`;\n};\n\nconst createToValuesFn = (format) => {\n const order = format.split(DIVIDER);\n return (match) => {\n const values = {};\n order.forEach((part, index) => {\n values[part] = match[index + 1];\n });\n return [values.YYYY, values.MM, values.DD];\n };\n};\n\nconst createDate = (val, regexp, toValuesFn) => {\n const match = regexp.exec(val);\n if (!match) return null;\n const [year, month, day] = toValuesFn(match);\n return newDate([year, month, day].join(DIVIDER));\n};\n\nconst createFormat = (format) => {\n const pattern = createPattern(format);\n const toValuesFn = createToValuesFn(format);\n const regexp = new RegExp(pattern);\n\n return {\n pattern,\n validate: (val) => regexp.test(val),\n getDate: (val) => createDate(val, regexp, toValuesFn),\n };\n};\n\nexport const formats = Object.fromEntries(SUPPORTED_FORMATS.map((f) => [f, createFormat(f)]));\n","import { formats } from './formats';\nimport { newDate } from './date-utils';\n\nexport const isValidEpoch = (val) => !Number.isNaN(Number(val));\n\nexport const isNumber = (val) => !!String(val || '').trim() && !Number.isNaN(Number(val));\n\nexport const getPartsFromEpoch = (epoch) => {\n const date = newDate(epoch);\n const year = date.getFullYear();\n const month = date.getMonth() + 1;\n const day = date.getDate();\n return [year, month, day];\n};\n\nexport const formatEpoch = (epoch, format) => {\n const [year, month, day] = getPartsFromEpoch(epoch);\n\n const parts = {\n DD: String(day).padStart(2, '0'),\n MM: String(month).padStart(2, '0'),\n YYYY: String(year),\n };\n\n return format.replace(/DD|MM|YYYY/g, (match) => parts[match]);\n};\n\nexport const getCurrentTime = () => newDate().getTime();\nexport const getFullYear = (epoch) => newDate(epoch).getFullYear().toString();\nexport const getMonth = (epoch) => (newDate(epoch).getMonth() + 1).toString();\nexport const getCurrentDay = () => newDate().getDate();\nexport const getCurrentYear = () => newDate().getFullYear().toString();\n\n// Vaadin uses \"constructed stylesheet\" to hide the host in dialog components.\n// To override it, we need to push an overriding constructed stylesheet to the shadow DOM\n// opened issue in vaadin: https://github.com/vaadin/web-components/issues/7979\nexport const overrideConstructedStylesheet = (ele) => {\n const cs = new CSSStyleSheet();\n cs.insertRule(':host{display:block!important;}');\n ele?.shadowRoot?.adoptedStyleSheets?.push(cs);\n};\n\nexport const parseDateString = (val, format) => {\n const trimmed = val.trim?.();\n if (!trimmed) return null;\n return formats[format].getDate(trimmed);\n};\n\nexport const dateToEpoch = (date, isUtc) => {\n // If it's already a number (epoch), return it directly - no conversion needed\n if (typeof date === 'number') {\n return date;\n }\n\n if (isUtc) {\n return Date.UTC(date.getFullYear(), date.getMonth(), date.getDate());\n }\n\n // Default: return epoch in local timezone\n return date.getTime();\n};\n","export const calendarIcon = `\n<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M9 5H15V4.50468C15 4.21404 15.226 4 15.5047 4H16.4953C16.786 4 17 4.22595 17 4.50468V5H18.7568C19.3028 5 19.75 5.44725 19.75 5.99896V7.00104C19.75 7.55734 19.3053 8 18.7568 8H5.24317C4.69717 8 4.25 7.55275 4.25 7.00104V5.99896C4.25 5.44266 4.69466 5 5.24317 5H7V4.50468C7 4.21404 7.22596 4 7.50468 4H8.49532C8.78596 4 9 4.22595 9 4.50468V5ZM5.50468 9H6.49532C6.78596 9 7 9.22596 7 9.50468V10.4953C7 10.786 6.77404 11 6.49532 11H5.50468C5.21404 11 5 10.774 5 10.4953V9.50468C5 9.21404 5.22595 9 5.50468 9ZM8.50468 9H9.49532C9.78596 9 10 9.22596 10 9.50468V10.4953C10 10.786 9.77404 11 9.49532 11H8.50468C8.21404 11 8 10.774 8 10.4953V9.50468C8 9.21404 8.22596 9 8.50468 9ZM11.5047 9H12.4953C12.786 9 13 9.22596 13 9.50468V10.4953C13 10.786 12.774 11 12.4953 11H11.5047C11.214 11 11 10.774 11 10.4953V9.50468C11 9.21404 11.226 9 11.5047 9ZM5.50468 12H6.49532C6.78596 12 7 12.226 7 12.5047V13.4953C7 13.786 6.77404 14 6.49532 14H5.50468C5.21404 14 5 13.774 5 13.4953V12.5047C5 12.214 5.22595 12 5.50468 12ZM8.50468 12H9.49532C9.78596 12 10 12.226 10 12.5047V13.4953C10 13.786 9.77404 14 9.49532 14H8.50468C8.21404 14 8 13.774 8 13.4953V12.5047C8 12.214 8.22596 12 8.50468 12ZM11.5047 12H12.4953C12.786 12 13 12.226 13 12.5047V13.4953C13 13.786 12.774 14 12.4953 14H11.5047C11.214 14 11 13.774 11 13.4953V12.5047C11 12.214 11.226 12 11.5047 12ZM5.50468 15H6.49532C6.78596 15 7 15.226 7 15.5047V16.4953C7 16.786 6.77404 17 6.49532 17H5.50468C5.21404 17 5 16.774 5 16.4953V15.5047C5 15.214 5.22595 15 5.50468 15ZM8.50468 15H9.49532C9.78596 15 10 15.226 10 15.5047V16.4953C10 16.786 9.77404 17 9.49532 17H8.50468C8.21404 17 8 16.774 8 16.4953V15.5047C8 15.214 8.22596 15 8.50468 15ZM11.5047 15H12.4953C12.786 15 13 15.226 13 15.5047V16.4953C13 16.786 12.774 17 12.4953 17H11.5047C11.214 17 11 16.774 11 16.4953V15.5047C11 15.214 11.226 15 11.5047 15ZM14.5047 9H15.4953C15.786 9 16 9.22596 16 9.50468V10.4953C16 10.786 15.774 11 15.4953 11H14.5047C14.214 11 14 10.774 14 10.4953V9.50468C14 9.21404 14.226 9 14.5047 9ZM14.5047 12H15.4953C15.786 12 16 12.226 16 12.5047V13.4953C16 13.786 15.774 14 15.4953 14H14.5047C14.214 14 14 13.774 14 13.4953V12.5047C14 12.214 14.226 12 14.5047 12ZM14.5047 15H15.4953C15.786 15 16 15.226 16 15.5047V16.4953C16 16.786 15.774 17 15.4953 17H14.5047C14.214 17 14 16.774 14 16.4953V15.5047C14 15.214 14.226 15 14.5047 15ZM17.5047 15H18.4953C18.786 15 19 15.226 19 15.5047V16.4953C19 16.786 18.774 17 18.4953 17H17.5047C17.214 17 17 16.774 17 16.4953V15.5047C17 15.214 17.226 15 17.5047 15ZM5.50468 18H6.49532C6.78596 18 7 18.226 7 18.5047V19.4953C7 19.786 6.77404 20 6.49532 20H5.50468C5.21404 20 5 19.774 5 19.4953V18.5047C5 18.214 5.22595 18 5.50468 18ZM8.50468 18H9.49532C9.78596 18 10 18.226 10 18.5047V19.4953C10 19.786 9.77404 20 9.49532 20H8.50468C8.21404 20 8 19.774 8 19.4953V18.5047C8 18.214 8.22596 18 8.50468 18ZM11.5047 18H12.4953C12.786 18 13 18.226 13 18.5047V19.4953C13 19.786 12.774 20 12.4953 20H11.5047C11.214 20 11 19.774 11 19.4953V18.5047C11 18.214 11.226 18 11.5047 18ZM14.5047 18H15.4953C15.786 18 16 18.226 16 18.5047V19.4953C16 19.786 15.774 20 15.4953 20H14.5047C14.214 20 14 19.774 14 19.4953V18.5047C14 18.214 14.226 18 14.5047 18ZM17.5047 18H18.4953C18.786 18 19 18.226 19 18.5047V19.4953C19 19.786 18.774 20 18.4953 20H17.5047C17.214 20 17 19.774 17 19.4953V18.5047C17 18.214 17.226 18 17.5047 18ZM17.5047 12H18.4953C18.786 12 19 12.226 19 12.5047V13.4953C19 13.786 18.774 14 18.4953 14H17.5047C17.214 14 17 13.774 17 13.4953V12.5047C17 12.214 17.226 12 17.5047 12ZM17.5047 9H18.4953C18.786 9 19 9.22596 19 9.50468V10.4953C19 10.786 18.774 11 18.4953 11H17.5047C17.214 11 17 10.774 17 10.4953V9.50468C17 9.21404 17.226 9 17.5047 9Z\" fill=\"#808080\"/>\n</svg>\n`;\n\nexport const arrowRightIcon = `\n<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M9.27283 6.78069C8.87912 6.34164 8.91587 5.66655 9.35492 5.27283C9.79397 4.87912 10.4691 4.91587 10.8628 5.35492C10.8628 5.35492 16.0022 10.9543 16.366 11.36C16.7298 11.7657 16.7298 12.2392 16.366 12.6448L10.8628 18.6451C10.4691 19.0841 9.79397 19.1209 9.35492 18.7272C8.91587 18.3334 8.87912 17.6584 9.27283 17.2193L14.1368 12L9.27283 6.78069Z\" fill=\"#808080\"/>\n</svg>`;\n\nexport const arrowLeftIcon = `<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M14.7272 17.2193C15.1209 17.6584 15.0841 18.3334 14.6451 18.7272C14.206 19.1209 13.5309 19.0841 13.1372 18.6451C13.1372 18.6451 7.99776 13.0457 7.63399 12.64C7.27023 12.2343 7.27023 11.7608 7.63399 11.3552L13.1372 5.35492C13.5309 4.91587 14.206 4.87912 14.6451 5.27283C15.0841 5.66655 15.1209 6.34164 14.7272 6.78069L9.86322 12L14.7272 17.2193Z\" fill=\"#808080\"/>\n</svg>`;\n"],"names":["componentName","host","label","slottedIcon","selector","loadingIndicatorStyles","ButtonClass","triggers","attr","value","mappings","hostWidth","property","hostHeight","hostDirection","fontSize","fontFamily","fontWeight","cursor","backgroundColor","outlineOffset","outlineColor","outlineStyle","outlineWidth","borderRadius","borderColor","borderStyle","borderWidth","verticalPadding","horizontalPadding","fallback","labelTextColor","iconColor","cssVarList","fill","labelTextDecoration","labelSpacing","textAlign","iconSize","slots","wrappedEleName","style","excludeAttrsSync","color","clickableMixin","superclass","isLoading","this","getAttribute","click","super","customElements","define","IconClass","height","width","srcAttrs","RawImage","baseSelector","observedAttributes","constructor","attachShadow","mode","innerHTML","init","toggleVisibility","getSrc","onThemeChange","renderImage","isVisible","classList","remove","add","altText","legacySrc","themeSrc","currentThemeName","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","ImageClass","then","res","appendChild","shouldRender","src","srcVal","attributeChangedCallback","attrName","oldValue","newValue","createSvgEle","text","clean","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","createBaseInputClass","args","SUPPORTED_FORMATS","DEFAULT_FORMAT","NATIVE_FORMAT","YEARS_RANGE","DIVIDER","months","weekdays","counterConfig","MONTH","id","min","max","placeholder","DAY","YEAR","valRange","year","BUTTON_LABEL_DONE","BUTTON_LABEL_CANCEL","CALENDAR_LABEL_TODAY","MOBILE_DEVICE_INTERACTION_TIMEOUT_MS","newDate","date","isUtcTime","Date","d","replace","UTC","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","isValidAttrArr","arr","count","Array","isArray","length","filter","Boolean","comboBoxItemTpl","dataId","dataName","getMonthsOptions","customMonths","map","item","index","join","isViewVisible","selectionEpoch","previewEpoch","previewYear","previewMonth","selectedYear","selectedMonth","initComboBox","input","onChange","onBlur","addEventListener","observedAttrs","calendarUiAttrs","BaseInputClass","calendar","day","dayEntry","currentDay","selectedDay","disabledDay","weekday","topNav","topNavSelectors","bottomNav","navPrev","navNext","navPrevRTL","navNextRTL","yearInput","monthInput","CalendarClass","componentNameOverride","topNavVerticalPadding","topNavHorizointalPadding","topNavAlignment","topNavGap","topNavSelectorsGap","bottomNavVerticalPadding","bottomNavHorizontalPadding","bottomNavAlignment","bottomNavGap","navMarginBottom","calendarPadding","navBorderBottomWidth","navBorderBottomColor","navBorderBottomStyle","weekdayFontSize","weekdayFontWeight","currentDayBorderColor","currentDayBorderWidth","currentDayBorderStyle","dayHeight","daySize","dayPadding","dayRadius","dayTextAlign","dayBlockAlign","dayTextColor","dayFontWeight","dayBackgroundColor","dayCursor","dayFontSize","dayBackgroundColorHover","daySelectedTextdColor","daySelectedBackgroundColor","dayDisabledTextdColor","yearInputWidth","monthInputWidth","navButtonSize","navButtonCursor","navButtonRotation","navButtonOpacity","concat","preview","epoch","val","getTime","renderCalendar","isSelectedView","isTodayView","monthNames","attrVal","monthArr","split","ensureMonthNamesArr","weekdayNames","customWeekdayArr","ensureWeekdayNamesArr","hasYearValue","hasMonthValue","yearsRange","range","start","end","Number","currentYear","initCalendar","shadowRoot","navPrevEle","navNextEle","submitButton","cancelButton","initInputs","initNav","removeAttribute","createInputs","onMonthChange","bind","onMonthInputBlur","onYearChange","onYearInputBlur","includeAttrs","navPrevMonth","navNextMonth","onCancel","onSubmit","btn","isDisabled","dispatchEvent","CustomEvent","detail","clearSelectedDay","getSelectedDayEle","updateInputs","month","setTimeout","baseElement","shortWeekdays","daysInMonth","getMaxDaysInMonth","firstDayOfMonth","getDay","monthView","reduce","acc","i","dayOfWeek","createMonthView","substring","from","onDayChange","setSelectedDay","setCurrentDay","e","setDate","target","setFullYear","trim","setMonth","getCurrentDayEle","clearSelectedDays","cells","c","title","prevMonth","nextMonth","clearValue","onInitialValueChange","onYearsRangeChange","years","push","generateYearList","onMonthNamesChange","onSubmitLabelChange","textContent","onCancelLabelChange","onInitialMonthChange","currYear","onInitialYearChange","currMonth","includes","getValidity","isRequired","valueMissing","patterns","MM","DD","YYYY","createFormat","format","pattern","part","createPattern","toValuesFn","order","values","createToValuesFn","regexp","RegExp","validate","test","exec","createDate","formats","Object","fromEntries","f","isValidEpoch","isNaN","isNumber","String","getPartsFromEpoch","formatEpoch","parts","padStart","getCurrentTime","toString","getCurrentDay","overrideConstructedStylesheet","cs","CSSStyleSheet","insertRule","adoptedStyleSheets","parseDateString","trimmed","dateToEpoch","isUtc","calendarIcon","arrowRightIcon","arrowLeftIcon"],"sourceRoot":""}
|