@politiet/sheriff-web-components 2.7.2 → 2.9.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/custom-elements.json +422 -9
- package/dist/mixins/sds-dialog-target-mixin.d.ts.map +1 -1
- package/dist/mixins/sds-dialog-target-mixin.js +4 -2
- package/dist/mixins/sds-dialog-target-mixin.js.map +1 -1
- package/dist/mixins/sds-event-dispatcher-mixin.js +1 -1
- package/dist/mixins/sds-event-dispatcher-mixin.js.map +1 -1
- package/dist/mixins/sds-form-control-mixin.d.ts +1 -0
- package/dist/mixins/sds-form-control-mixin.d.ts.map +1 -1
- package/dist/mixins/sds-form-control-mixin.js +7 -0
- package/dist/mixins/sds-form-control-mixin.js.map +1 -1
- package/dist/react-wrappers/SDSDialogWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSDialogWrapper.js +1 -1
- package/dist/react-wrappers/SDSDialogWrapper.js.map +1 -1
- package/dist/sds-button/sds-button.component.d.ts +7 -0
- package/dist/sds-button/sds-button.component.d.ts.map +1 -1
- package/dist/sds-button/sds-button.component.js +52 -50
- package/dist/sds-button/sds-button.component.js.map +1 -1
- package/dist/sds-button/sds-button.styles.d.ts.map +1 -1
- package/dist/sds-button/sds-button.styles.js +87 -3
- package/dist/sds-button/sds-button.styles.js.map +1 -1
- package/dist/sds-card/sds-card.d.ts +1 -0
- package/dist/sds-card/sds-card.d.ts.map +1 -1
- package/dist/sds-card/sds-card.js +11 -3
- package/dist/sds-card/sds-card.js.map +1 -1
- package/dist/sds-card/sds-card.styles.d.ts.map +1 -1
- package/dist/sds-card/sds-card.styles.js +14 -3
- package/dist/sds-card/sds-card.styles.js.map +1 -1
- package/dist/sds-checkbox/sds-checkbox.d.ts +3 -1
- package/dist/sds-checkbox/sds-checkbox.d.ts.map +1 -1
- package/dist/sds-checkbox/sds-checkbox.js +13 -3
- package/dist/sds-checkbox/sds-checkbox.js.map +1 -1
- package/dist/sds-checkbox/sds-checkbox.styles.d.ts.map +1 -1
- package/dist/sds-checkbox/sds-checkbox.styles.js +4 -2
- package/dist/sds-checkbox/sds-checkbox.styles.js.map +1 -1
- package/dist/sds-chip/sds-chip.d.ts +1 -0
- package/dist/sds-chip/sds-chip.d.ts.map +1 -1
- package/dist/sds-chip/sds-chip.js +3 -0
- package/dist/sds-chip/sds-chip.js.map +1 -1
- package/dist/sds-details/sds-details.styles.js +6 -6
- package/dist/sds-details/sds-details.styles.js.map +1 -1
- package/dist/sds-dialog/sds-dialog.component.d.ts +1 -0
- package/dist/sds-dialog/sds-dialog.component.d.ts.map +1 -1
- package/dist/sds-dialog/sds-dialog.component.js +10 -0
- package/dist/sds-dialog/sds-dialog.component.js.map +1 -1
- package/dist/sds-dialog/sds-dialog.d.ts +1 -0
- package/dist/sds-dialog/sds-dialog.d.ts.map +1 -1
- package/dist/sds-dialog/sds-dialog.js.map +1 -1
- package/dist/sds-dialog/sds-dialog.styles.d.ts.map +1 -1
- package/dist/sds-dialog/sds-dialog.styles.js +8 -2
- package/dist/sds-dialog/sds-dialog.styles.js.map +1 -1
- package/dist/sds-popover/assets/popover-styles.d.ts.map +1 -1
- package/dist/sds-popover/assets/popover-styles.js +1 -1
- package/dist/sds-popover/assets/popover-styles.js.map +1 -1
- package/dist/sds-radio/sds-radio.d.ts +3 -1
- package/dist/sds-radio/sds-radio.d.ts.map +1 -1
- package/dist/sds-radio/sds-radio.js +13 -3
- package/dist/sds-radio/sds-radio.js.map +1 -1
- package/dist/sds-radio/sds-radio.styles.d.ts.map +1 -1
- package/dist/sds-radio/sds-radio.styles.js +10 -3
- package/dist/sds-radio/sds-radio.styles.js.map +1 -1
- package/dist/sds-select/sds-select.component.d.ts +3 -1
- package/dist/sds-select/sds-select.component.d.ts.map +1 -1
- package/dist/sds-select/sds-select.component.js +14 -5
- package/dist/sds-select/sds-select.component.js.map +1 -1
- package/dist/sds-select/sds-select.styles.d.ts.map +1 -1
- package/dist/sds-select/sds-select.styles.js +3 -2
- package/dist/sds-select/sds-select.styles.js.map +1 -1
- package/dist/sds-stepper-step/sds-stepper-step.styles.d.ts.map +1 -1
- package/dist/sds-stepper-step/sds-stepper-step.styles.js +4 -3
- package/dist/sds-stepper-step/sds-stepper-step.styles.js.map +1 -1
- package/dist/sds-switch/sds-switch.d.ts +4 -0
- package/dist/sds-switch/sds-switch.d.ts.map +1 -1
- package/dist/sds-switch/sds-switch.js +16 -2
- package/dist/sds-switch/sds-switch.js.map +1 -1
- package/dist/sds-switch/sds-switch.styles.js +6 -6
- package/dist/sds-switch/sds-switch.styles.js.map +1 -1
- package/dist/sds-text/sds-text.styles.d.ts.map +1 -1
- package/dist/sds-text/sds-text.styles.js +2 -1
- package/dist/sds-text/sds-text.styles.js.map +1 -1
- package/dist/sds-textarea/sds-textarea.d.ts +4 -1
- package/dist/sds-textarea/sds-textarea.d.ts.map +1 -1
- package/dist/sds-textarea/sds-textarea.js +22 -8
- package/dist/sds-textarea/sds-textarea.js.map +1 -1
- package/dist/sds-textarea/sds-textarea.styles.d.ts.map +1 -1
- package/dist/sds-textarea/sds-textarea.styles.js +12 -3
- package/dist/sds-textarea/sds-textarea.styles.js.map +1 -1
- package/dist/sds-textfield/sds-textfield.d.ts +8 -1
- package/dist/sds-textfield/sds-textfield.d.ts.map +1 -1
- package/dist/sds-textfield/sds-textfield.js +40 -13
- package/dist/sds-textfield/sds-textfield.js.map +1 -1
- package/dist/sds-textfield/sds-textfield.styles.d.ts.map +1 -1
- package/dist/sds-textfield/sds-textfield.styles.js +4 -3
- package/dist/sds-textfield/sds-textfield.styles.js.map +1 -1
- package/dist/sds-tooltip/assets/tooltip-styles.d.ts.map +1 -1
- package/dist/sds-tooltip/assets/tooltip-styles.js +1 -1
- package/dist/sds-tooltip/assets/tooltip-styles.js.map +1 -1
- package/dist/shared/assets/positioning.js +1 -1
- package/dist/sheriff-web-components.js +409 -269
- package/dist/skill/references/components.md +1 -1
- package/dist/skill/references/react-wrappers.md +1 -1
- package/package.json +2 -2
-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AA2C;AACtC;IAAtE,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDAAmD;AAC9E;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDAAkD;AAChD;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAiD;AACjD;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CAAwC;AACvC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAA4C;AAC3C;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAA4C;AAC3C;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAwC;AAGjE;IAAhB,KAAK,EAAE;6CAAyB;AAER;IAAxB,KAAK,CAAC,gBAAgB,CAAC;6CAA4B;AApBxC,YAAY;IADxB,oBAAoB,CAAC,eAAe,CAAC;GACzB,YAAY,CA0MxB","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { guardedCustomElement } from '../utils/guarded-custom-element';\nimport { SDSEventDispatcherMixin, SDSDelegateInteractionMixin, SDSFormControlMixin } from '../mixins';\nimport type { SDSFormControlAttributes } from '../mixins/sds-form-control-mixin';\nimport { styles } from './sds-textfield.styles';\n\nimport '../sds-alert/sds-alert';\nimport '../sds-icon/sds-icon';\nimport { SDS_SIZES } from '../types';\n\ntype InputType =\n\t| 'hidden'\n\t| 'text'\n\t| 'search'\n\t| 'tel'\n\t| 'url'\n\t| 'email'\n\t| 'password'\n\t| 'datetime'\n\t| 'date'\n\t| 'month'\n\t| 'week'\n\t| 'time'\n\t| 'datetime-local'\n\t| 'number'\n\t| 'range'\n\t| 'color'\n\t| 'checkbox'\n\t| 'radio'\n\t| 'file'\n\t| 'submit'\n\t| 'image'\n\t| 'reset'\n\t| 'button';\n\ntype InputSize = Extract<SDS_SIZES, 'lg' | 'md' | 'sm'>;\nexport type AutocompleteTypes =\n\t| 'off'\n\t| 'on'\n\t| 'name'\n\t| 'honorific-prefix'\n\t| 'given-name'\n\t| 'additional-name'\n\t| 'family-name'\n\t| 'honorific-suffix'\n\t| 'nickname'\n\t| 'email'\n\t| 'username'\n\t| 'new-password'\n\t| 'current-password'\n\t| 'one-time-code'\n\t| 'organization-title'\n\t| 'organization'\n\t| 'street-address'\n\t| 'address-line1'\n\t| 'address-line2'\n\t| 'address-line3'\n\t| 'address-level4'\n\t| 'address-level3'\n\t| 'address-level2'\n\t| 'address-level1'\n\t| 'country'\n\t| 'country-name'\n\t| 'postal-code'\n\t| 'cc-name'\n\t| 'cc-given-name'\n\t| 'cc-additional-name'\n\t| 'cc-family-name'\n\t| 'cc-number'\n\t| 'cc-exp'\n\t| 'cc-exp-month'\n\t| 'cc-exp-year'\n\t| 'cc-csc'\n\t| 'cc-type'\n\t| 'transaction-currency'\n\t| 'transaction-amount'\n\t| 'language'\n\t| 'bday'\n\t| 'bday-day'\n\t| 'bday-month'\n\t| 'bday-year'\n\t| 'sex'\n\t| 'tel'\n\t| 'tel-country-code'\n\t| 'tel-national'\n\t| 'tel-area-code'\n\t| 'tel-local'\n\t| 'tel-extension'\n\t| 'impp'\n\t| 'url'\n\t| 'photo';\n\nexport interface SDSTextFieldProps extends SDSFormControlAttributes {\n\tautocomplete?: AutocompleteTypes;\n\t'error-message'?: string;\n\t'help-text'?: string;\n\tlabel?: string;\n\tmaxlength?: number;\n\tminlength?: number;\n\tpattern?: string;\n\tplaceholder?: string;\n\trequired?: boolean;\n\tsize?: InputSize;\n\ttype?: InputType;\n\tvalue?: string;\n}\n\n@guardedCustomElement('sds-textfield')\nexport class SDSTextField extends SDSDelegateInteractionMixin(SDSEventDispatcherMixin(SDSFormControlMixin(LitElement))) {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t@property({ type: String, reflect: true }) type: SDSTextFieldProps['type'] = 'text';\n\t@property({ type: String }) value?: SDSTextFieldProps['value'];\n\t@property({ type: String, reflect: true }) label?: SDSTextFieldProps['label'];\n\t@property({ type: String, reflect: true }) placeholder?: SDSTextFieldProps['placeholder'];\n\t@property({ type: String, attribute: 'help-text', reflect: true }) helpText?: SDSTextFieldProps['help-text'];\n\t@property({ type: String, attribute: 'error-message', reflect: true }) errorMessage?: SDSTextFieldProps['error-message'];\n\t@property({ type: String, reflect: true }) autocomplete?: SDSTextFieldProps['autocomplete'];\n\t@property({ type: Boolean, reflect: true }) required: SDSTextFieldProps['required'] = false;\n\t@property({ type: String, reflect: true }) pattern?: SDSTextFieldProps['pattern'];\n\t@property({ type: Number, reflect: true }) minlength?: SDSTextFieldProps['minlength'];\n\t@property({ type: Number, reflect: true }) maxlength?: SDSTextFieldProps['maxlength'];\n\t@property({ type: String, reflect: true }) size: SDSTextFieldProps['size'] = 'md';\n\n\t// State\n\t@state() private hasIcon = false;\n\n\t@query('#sds-textfield') control!: HTMLInputElement;\n\n\tprivate _defaultValue: string | null = null;\n\n\toverride connectedCallback() {\n\t\tsuper.connectedCallback();\n\t\tthis._defaultValue = this.value ?? null;\n\t\tthis.internals.setFormValue(this._defaultValue);\n\t}\n\n\toverride updated(changedProperties: Map<string | number | symbol, unknown>) {\n\t\tsuper.updated(changedProperties);\n\n\t\tif (changedProperties.has('value')) {\n\t\t\tthis.internals.setFormValue(this.value ?? '');\n\n\t\t\tif (this.control) {\n\t\t\t\tthis.control.value = this.value ?? '';\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate readonly handleSlotChange = (e: Event) => {\n\t\tconst slot = e.target as HTMLSlotElement;\n\t\tthis.hasIcon = slot.assignedNodes({ flatten: true }).length > 0;\n\t};\n\n\tprivate updateValidity() {\n\t\tif (this.control.checkValidity()) {\n\t\t\tthis.internals.setValidity({});\n\t\t} else {\n\t\t\tthis.internals.setValidity({ customError: true }, this.control.validationMessage, this.control);\n\t\t}\n\t}\n\n\tprivate readonly _handleInputChange = (event: InputEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tif (this.disabled || !(event.target instanceof HTMLInputElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.value = event.target.value;\n\t\tthis.internals.setFormValue(this.value === '' ? null : this.value);\n\t\tthis.updateValidity();\n\t\tthis.dispatchSheriffEvent(event.type);\n\t};\n\n\tprivate readonly _handleSelect = (event: Event) => {\n\t\tevent.stopImmediatePropagation();\n\t\tif (!this.disabled) {\n\t\t\tthis.dispatchSheriffEvent('select');\n\t\t}\n\t};\n\n\tprivate readonly _handleFocus = (event: FocusEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tthis.dispatchSheriffEvent('focus');\n\t};\n\n\tprivate readonly _handleBlur = (event: FocusEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tthis.updateValidity();\n\t\tthis.dispatchSheriffEvent('blur');\n\t};\n\n\tprivate readonly _handleKeyDown = (event: KeyboardEvent) => {\n\t\tevent.stopImmediatePropagation();\n\n\t\tconst shouldContinue = this.dispatchKeyboardEvent('keydown', event);\n\n\t\tif (!shouldContinue) return;\n\n\t\tif (event.key === 'Enter') {\n\t\t\tconst form = this.form;\n\n\t\t\tif (form?.requestSubmit) {\n\t\t\t\t// Try to use requestSubmit as this will run form validation before submitting\n\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/requestSubmit#usage_notes\n\t\t\t\tform.requestSubmit();\n\t\t\t} else {\n\t\t\t\tform?.submit();\n\t\t\t}\n\t\t}\n\t};\n\n\tformResetCallback() {\n\t\tthis.internals.setFormValue(this._defaultValue);\n\n\t\tconst newValue = this._defaultValue ?? '';\n\t\tthis.control.value = newValue;\n\t\tthis.value = newValue;\n\t\tthis.updateValidity();\n\t}\n\n\tselect(): void {\n\t\tif (!this.disabled) this.control.select();\n\t}\n\n\tget selectionStart(): number | null {\n\t\treturn this.control ? this.control.selectionStart : null;\n\t}\n\n\tset selectionStart(value: number | null) {\n\t\tif (this.control && value !== null) {\n\t\t\tthis.control.selectionStart = value;\n\t\t}\n\t}\n\n\tget selectionEnd(): number | null {\n\t\treturn this.control ? this.control.selectionEnd : null;\n\t}\n\tset selectionEnd(value: number | null) {\n\t\tif (this.control && value !== null) {\n\t\t\tthis.control.selectionEnd = value;\n\t\t}\n\t}\n\n\tsetSelectionRange(start: number, end: number, direction?: 'forward' | 'backward' | 'none'): void {\n\t\tif (this.control) {\n\t\t\tthis.control.setSelectionRange(start, end, direction);\n\t\t}\n\t}\n\n\tcheckValidity(): boolean {\n\t\treturn this.control.checkValidity();\n\t}\n\n\treportValidity(): boolean {\n\t\treturn this.control.reportValidity();\n\t}\n\n\tsetCustomValidity(message: string): void {\n\t\tthis.control.setCustomValidity(message);\n\t\tthis.updateValidity();\n\t}\n\n\toverride render() {\n\t\tconst textfieldClasses = {\n\t\t\t'sds-textfield': true,\n\t\t\t'sds-textfield--error': Boolean(this.errorMessage),\n\t\t\t'sds-textfield--has-icon': this.hasIcon,\n\t\t};\n\n\t\tconst describedBy = [this.errorMessage ? 'error-message' : null, this.helpText ? 'help-text' : null].filter(Boolean).join(' ') || undefined;\n\n\t\treturn html`\n\t\t\t<div class=\"${classMap(textfieldClasses)}\">\n\t\t\t\t${this.label\n\t\t\t\t\t? html`<label for=\"sds-textfield\" class=\"sds-textfield__label\">${this.readOnly ? html`<sds-icon name=\"lock-material-filled\" size=\"m\"></sds-icon>` : nothing}</sds-icon>${this.label}</label>`\n\t\t\t\t\t: nothing}\n\t\t\t\t${this.helpText ? html`<p id=\"help-text\" class=\"sds-textfield__help-text\">${this.helpText}</p>` : nothing}\n\t\t\t\t<div class=\"sds-textfield__input-container\">\n\t\t\t\t\t<input\n\t\t\t\t\t\tpart=\"input\"\n\t\t\t\t\t\tclass=\"sds-textfield__input\"\n\t\t\t\t\t\ttype=\"${ifDefined(this.type)}\"\n\t\t\t\t\t\tid=\"sds-textfield\"\n\t\t\t\t\t\t?disabled=\"${this.disabled}\"\n\t\t\t\t\t\t?readonly=\"${this.readOnly}\"\n\t\t\t\t\t\tplaceholder=\"${ifDefined(this.placeholder)}\"\n\t\t\t\t\t\t.value=\"${this.value ?? ''}\"\n\t\t\t\t\t\tname=\"${ifDefined(this.name)}\"\n\t\t\t\t\t\tautocomplete=\"${ifDefined(this.autocomplete as any)}\"\n\t\t\t\t\t\t?required=\"${this.required}\"\n\t\t\t\t\t\tpattern=\"${ifDefined(this.pattern)}\"\n\t\t\t\t\t\tminlength=\"${ifDefined(this.minlength)}\"\n\t\t\t\t\t\tmaxlength=\"${ifDefined(this.maxlength)}\"\n\t\t\t\t\t\taria-describedby=\"${ifDefined(describedBy)}\"\n\t\t\t\t\t\taria-invalid=\"${this.errorMessage ? 'true' : 'false'}\"\n\t\t\t\t\t\t@input=\"${this._handleInputChange}\"\n\t\t\t\t\t\t@change=\"${this._handleInputChange}\"\n\t\t\t\t\t\t@select=\"${this._handleSelect}\"\n\t\t\t\t\t\t@focus=\"${this._handleFocus}\"\n\t\t\t\t\t\t@blur=\"${this._handleBlur}\"\n\t\t\t\t\t\t@keydown=\"${this._handleKeyDown}\"\n\t\t\t\t\t/>\n\t\t\t\t\t<slot name=\"after\" @slotchange=\"${this.handleSlotChange}\" aria-hidden=\"true\"></slot>\n\t\t\t\t</div>\n\t\t\t\t${this.errorMessage ? html`<sds-alert id=\"error-message\" variant=\"secondary\" data-palette=\"danger\"><p slot=\"message\">${this.errorMessage}</p></sds-alert>` : nothing}\n\t\t\t</div>\n\t\t`;\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-textfield': SDSTextField;\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AAE,IAAI,EAAE,CAAC;+CAA4C;AAC3C;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAgC;AAC/B;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAgC;AAC/B;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAwC;AAGjE;IAAhB,KAAK,EAAE;6CAAyB;AAEhB;IAAhB,KAAK,EAAE;sDAAkC;AAEjB;IAAxB,KAAK,CAAC,gBAAgB,CAAC;6CAA4B;AAxBxC,YAAY;IADxB,oBAAoB,CAAC,eAAe,CAAC;GACzB,YAAY,CAqOxB","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { guardedCustomElement } from '../utils/guarded-custom-element';\nimport { SDSEventDispatcherMixin, SDSDelegateInteractionMixin, SDSFormControlMixin } from '../mixins';\nimport type { SDSFormControlAttributes } from '../mixins/sds-form-control-mixin';\nimport { styles } from './sds-textfield.styles';\n\nimport '../sds-alert/sds-alert';\nimport '../sds-icon/sds-icon';\nimport { SDS_SIZES } from '../types';\n\ntype InputType =\n\t| 'hidden'\n\t| 'text'\n\t| 'search'\n\t| 'tel'\n\t| 'url'\n\t| 'email'\n\t| 'password'\n\t| 'datetime'\n\t| 'date'\n\t| 'month'\n\t| 'week'\n\t| 'time'\n\t| 'datetime-local'\n\t| 'number'\n\t| 'range'\n\t| 'color'\n\t| 'checkbox'\n\t| 'radio'\n\t| 'file'\n\t| 'submit'\n\t| 'image'\n\t| 'reset'\n\t| 'button';\n\ntype InputSize = Extract<SDS_SIZES, 'lg' | 'md' | 'sm'>;\nexport type AutocompleteTypes =\n\t| 'off'\n\t| 'on'\n\t| 'name'\n\t| 'honorific-prefix'\n\t| 'given-name'\n\t| 'additional-name'\n\t| 'family-name'\n\t| 'honorific-suffix'\n\t| 'nickname'\n\t| 'email'\n\t| 'username'\n\t| 'new-password'\n\t| 'current-password'\n\t| 'one-time-code'\n\t| 'organization-title'\n\t| 'organization'\n\t| 'street-address'\n\t| 'address-line1'\n\t| 'address-line2'\n\t| 'address-line3'\n\t| 'address-level4'\n\t| 'address-level3'\n\t| 'address-level2'\n\t| 'address-level1'\n\t| 'country'\n\t| 'country-name'\n\t| 'postal-code'\n\t| 'cc-name'\n\t| 'cc-given-name'\n\t| 'cc-additional-name'\n\t| 'cc-family-name'\n\t| 'cc-number'\n\t| 'cc-exp'\n\t| 'cc-exp-month'\n\t| 'cc-exp-year'\n\t| 'cc-csc'\n\t| 'cc-type'\n\t| 'transaction-currency'\n\t| 'transaction-amount'\n\t| 'language'\n\t| 'bday'\n\t| 'bday-day'\n\t| 'bday-month'\n\t| 'bday-year'\n\t| 'sex'\n\t| 'tel'\n\t| 'tel-country-code'\n\t| 'tel-national'\n\t| 'tel-area-code'\n\t| 'tel-local'\n\t| 'tel-extension'\n\t| 'impp'\n\t| 'url'\n\t| 'photo';\n\nexport interface SDSTextFieldProps extends SDSFormControlAttributes {\n\tautocomplete?: AutocompleteTypes;\n\t'error-message'?: string;\n\t'help-text'?: string;\n\tlabel?: string;\n\tmaxlength?: number;\n\tminlength?: number;\n\tmin?: number | string;\n\tmax?: number | string;\n\tpattern?: string;\n\tplaceholder?: string;\n\trequired?: boolean;\n\tsize?: InputSize;\n\ttype?: InputType;\n\tvalue?: string;\n}\n\n@guardedCustomElement('sds-textfield')\nexport class SDSTextField extends SDSDelegateInteractionMixin(SDSEventDispatcherMixin(SDSFormControlMixin(LitElement))) {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t@property({ type: String, reflect: true }) type: SDSTextFieldProps['type'] = 'text';\n\t@property({ type: String }) value?: SDSTextFieldProps['value'];\n\t@property({ type: String, reflect: true }) label?: SDSTextFieldProps['label'];\n\t@property({ type: String, reflect: true }) placeholder?: SDSTextFieldProps['placeholder'];\n\t@property({ type: String, attribute: 'help-text', reflect: true }) helpText?: SDSTextFieldProps['help-text'];\n\t@property({ type: String, attribute: 'error-message', reflect: true }) errorMessage?: SDSTextFieldProps['error-message'];\n\t@property({ type: String, reflect: true }) autocomplete?: SDSTextFieldProps['autocomplete'];\n\t@property({ type: Boolean, reflect: true }) required: SDSTextFieldProps['required'] = false;\n\t@property({ type: String, reflect: true }) pattern?: SDSTextFieldProps['pattern'];\n\t@property({ type: Number, reflect: true }) minlength?: SDSTextFieldProps['minlength'];\n\t@property({ type: Number, reflect: true }) maxlength?: SDSTextFieldProps['maxlength'];\n\t@property({ type: String, reflect: true }) min?: SDSTextFieldProps['min'];\n\t@property({ type: String, reflect: true }) max?: SDSTextFieldProps['max'];\n\t@property({ type: String, reflect: true }) size: SDSTextFieldProps['size'] = 'md';\n\n\t// State\n\t@state() private hasIcon = false;\n\t/** Tracks whether the `label` slot has assigned content. */\n\t@state() private _hasSlottedLabel = false;\n\n\t@query('#sds-textfield') control!: HTMLInputElement;\n\n\tprivate _defaultValue: string | null = null;\n\n\toverride connectedCallback() {\n\t\tsuper.connectedCallback();\n\t\tthis._defaultValue = this.value ?? null;\n\t\tthis.internals.setFormValue(this._defaultValue);\n\t}\n\n\toverride updated(changedProperties: Map<string | number | symbol, unknown>) {\n\t\tsuper.updated(changedProperties);\n\n\t\tif (changedProperties.has('value')) {\n\t\t\tthis.internals.setFormValue(this.value ?? '');\n\n\t\t\tif (this.control) {\n\t\t\t\tthis.control.value = this.value ?? '';\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate readonly handleSlotChange = (e: Event) => {\n\t\tconst slot = e.target as HTMLSlotElement;\n\t\tthis.hasIcon = slot.assignedNodes({ flatten: true }).length > 0;\n\t};\n\n\tprivate readonly _handleLabelSlotChange = (e: Event) => {\n\t\tthis._hasSlottedLabel = (e.target as HTMLSlotElement).assignedNodes().length > 0;\n\t};\n\n\toverride updateValidity() {\n\t\tif (!this.control) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.control.checkValidity()) {\n\t\t\tthis.internals.setValidity({});\n\t\t} else {\n\t\t\tthis.internals.setValidity({ customError: true }, this.control.validationMessage, this.control);\n\t\t}\n\t}\n\n\tprivate readonly _handleInputChange = (event: InputEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tif (this.disabled || !(event.target instanceof HTMLInputElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.value = event.target.value;\n\t\tthis.internals.setFormValue(this.value === '' ? null : this.value);\n\t\tthis.updateValidity();\n\t\tthis.dispatchSheriffEvent(event.type);\n\t};\n\n\tprivate readonly _handleSelect = (event: Event) => {\n\t\tevent.stopImmediatePropagation();\n\t\tif (!this.disabled) {\n\t\t\tthis.dispatchSheriffEvent('select');\n\t\t}\n\t};\n\n\tprivate readonly _handleFocus = (event: FocusEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tthis.dispatchSheriffEvent('focus');\n\t};\n\n\tprivate readonly _handleBlur = (event: FocusEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tthis.updateValidity();\n\t\tthis.dispatchSheriffEvent('blur');\n\t};\n\n\tprivate readonly _handleKeyDown = (event: KeyboardEvent) => {\n\t\tevent.stopImmediatePropagation();\n\n\t\tconst shouldContinue = this.dispatchKeyboardEvent('keydown', event);\n\t\tif (!shouldContinue) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (event.key !== 'Enter') {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const element of Array.from(this.form?.elements ?? [])) {\n\t\t\tif (element instanceof HTMLButtonElement || element instanceof HTMLInputElement) {\n\t\t\t\tif (element.type !== 'submit') {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (element.disabled) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\telement.click();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tthis.form?.requestSubmit();\n\t};\n\n\tformResetCallback() {\n\t\tthis.internals.setFormValue(this._defaultValue);\n\n\t\tconst newValue = this._defaultValue ?? '';\n\t\tthis.control.value = newValue;\n\t\tthis.value = newValue;\n\t\tthis.updateValidity();\n\t}\n\n\tselect(): void {\n\t\tif (!this.disabled) this.control.select();\n\t}\n\n\tget selectionStart(): number | null {\n\t\treturn this.control ? this.control.selectionStart : null;\n\t}\n\n\tset selectionStart(value: number | null) {\n\t\tif (this.control && value !== null) {\n\t\t\tthis.control.selectionStart = value;\n\t\t}\n\t}\n\n\tget selectionEnd(): number | null {\n\t\treturn this.control ? this.control.selectionEnd : null;\n\t}\n\tset selectionEnd(value: number | null) {\n\t\tif (this.control && value !== null) {\n\t\t\tthis.control.selectionEnd = value;\n\t\t}\n\t}\n\n\tsetSelectionRange(start: number, end: number, direction?: 'forward' | 'backward' | 'none'): void {\n\t\tif (this.control) {\n\t\t\tthis.control.setSelectionRange(start, end, direction);\n\t\t}\n\t}\n\n\tcheckValidity(): boolean {\n\t\treturn this.control.checkValidity();\n\t}\n\n\treportValidity(): boolean {\n\t\treturn this.control.reportValidity();\n\t}\n\n\tsetCustomValidity(message: string): void {\n\t\tthis.control.setCustomValidity(message);\n\t\tthis.updateValidity();\n\t}\n\n\toverride render() {\n\t\tconst textfieldClasses = {\n\t\t\t'sds-textfield': true,\n\t\t\t'sds-textfield--error': Boolean(this.errorMessage),\n\t\t\t'sds-textfield--has-icon': this.hasIcon,\n\t\t};\n\n\t\tconst describedBy = [this.errorMessage ? 'error-message' : null, this.helpText ? 'help-text' : null].filter(Boolean).join(' ') || undefined;\n\n\t\tconst showLabel = this._hasSlottedLabel || Boolean(this.label);\n\n\t\treturn html`\n\t\t\t<div class=\"${classMap(textfieldClasses)}\">\n\t\t\t\t<label for=\"sds-textfield\" class=\"sds-textfield__label\" ?hidden=\"${!showLabel}\">\n\t\t\t\t\t${this.readOnly ? html`<sds-icon name=\"lock-material-filled\" size=\"m\"></sds-icon>` : nothing}\n\t\t\t\t\t<slot name=\"label\" @slotchange=\"${this._handleLabelSlotChange}\">${this.label}</slot>\n\t\t\t\t</label>\n\t\t\t\t${this.helpText ? html`<p id=\"help-text\" class=\"sds-textfield__help-text\">${this.helpText}</p>` : nothing}\n\t\t\t\t<div class=\"sds-textfield__input-container\">\n\t\t\t\t\t<input\n\t\t\t\t\t\tpart=\"input\"\n\t\t\t\t\t\tclass=\"sds-textfield__input\"\n\t\t\t\t\t\ttype=\"${ifDefined(this.type)}\"\n\t\t\t\t\t\tid=\"sds-textfield\"\n\t\t\t\t\t\t?disabled=\"${this.disabled}\"\n\t\t\t\t\t\t?readonly=\"${this.readOnly}\"\n\t\t\t\t\t\tplaceholder=\"${ifDefined(this.placeholder)}\"\n\t\t\t\t\t\t.value=\"${this.value ?? ''}\"\n\t\t\t\t\t\tname=\"${ifDefined(this.name)}\"\n\t\t\t\t\t\tautocomplete=\"${ifDefined(this.autocomplete as any)}\"\n\t\t\t\t\t\t?required=\"${this.required}\"\n\t\t\t\t\t\tpattern=\"${ifDefined(this.pattern)}\"\n\t\t\t\t\t\tmin=\"${ifDefined(this.min)}\"\n\t\t\t\t\t\tminlength=\"${ifDefined(this.minlength)}\"\n\t\t\t\t\t\tmax=\"${ifDefined(this.max)}\"\n\t\t\t\t\t\tmaxlength=\"${ifDefined(this.maxlength)}\"\n\t\t\t\t\t\taria-describedby=\"${ifDefined(describedBy)}\"\n\t\t\t\t\t\taria-invalid=\"${this.errorMessage ? 'true' : 'false'}\"\n\t\t\t\t\t\t@input=\"${this._handleInputChange}\"\n\t\t\t\t\t\t@change=\"${this._handleInputChange}\"\n\t\t\t\t\t\t@select=\"${this._handleSelect}\"\n\t\t\t\t\t\t@focus=\"${this._handleFocus}\"\n\t\t\t\t\t\t@blur=\"${this._handleBlur}\"\n\t\t\t\t\t\t@keydown=\"${this._handleKeyDown}\"\n\t\t\t\t\t/>\n\t\t\t\t\t<slot name=\"after\" @slotchange=\"${this.handleSlotChange}\" aria-hidden=\"true\"></slot>\n\t\t\t\t</div>\n\t\t\t\t${this.errorMessage ? html`<sds-alert id=\"error-message\" variant=\"secondary\" data-palette=\"danger\"><p slot=\"message\">${this.errorMessage}</p></sds-alert>` : nothing}\n\t\t\t</div>\n\t\t`;\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-textfield': SDSTextField;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-textfield.styles.d.ts","sourceRoot":"","sources":["../../src/sds-textfield/sds-textfield.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"sds-textfield.styles.d.ts","sourceRoot":"","sources":["../../src/sds-textfield/sds-textfield.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBA4KlB,CAAC"}
|
|
@@ -34,6 +34,7 @@ export const styles = css `
|
|
|
34
34
|
--_sds-textfield-focus-color: var(--sds-textfield-focus-color, var(--sds-color-states-focus-outer));
|
|
35
35
|
--_sds-textfield-focus-inner-color: var(--sds-textfield-focus-inner-color, var(--sds-color-states-focus-inner));
|
|
36
36
|
--_sds-textfield-focus-spacing: var(--sds-textfield-focus-spacing, var(--sds-color-states-focus-spacing));
|
|
37
|
+
--_sds-textfield-focus-outline-size: var(--sds-textfield-focus-outline-size, var(--sds-color-states-focus-outline-size));
|
|
37
38
|
|
|
38
39
|
--_sds-textfield-cursor: var(--sds-textfield-cursor, auto);
|
|
39
40
|
|
|
@@ -77,9 +78,9 @@ export const styles = css `
|
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
&:focus-visible {
|
|
80
|
-
box-shadow: 0 0 0 var(--
|
|
81
|
-
outline:
|
|
82
|
-
outline-offset:
|
|
81
|
+
box-shadow: 0 0 0 var(--_sds-textfield-focus-spacing) var(--_sds-textfield-focus-inner-color);
|
|
82
|
+
outline: var(--_sds-textfield-focus-outline-size) solid var(--_sds-textfield-focus-color);
|
|
83
|
+
outline-offset: var(--_sds-textfield-focus-spacing);
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-textfield.styles.js","sourceRoot":"","sources":["../../src/sds-textfield/sds-textfield.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"sds-textfield.styles.js","sourceRoot":"","sources":["../../src/sds-textfield/sds-textfield.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4KxB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`\n\t:host {\n\t\t--_sds-textfield-background-color: var(--sds-textfield-background-color, var(--sds-color-background-default, var(--sds-color-neutral-background-default)));\n\t\t--_sds-textfield-text-color: var(--sds-textfield-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));\n\n\t\t--_sds-textfield-border-color: var(--sds-textfield-border-color, var(--sds-color-border-default, var(--sds-color-neutral-border-default)));\n\t\t--_sds-textfield-border-width: var(--sds-textfield-border-width, var(--sds-border-sm));\n\t\t--_sds-textfield-border-radius: var(--sds-textfield-border-radius, var(--sds-radius-sm));\n\n\t\t--_sds-textfield-font-family: var(--sds-textfield-font-family, var(--sds-typography-font-family-roboto));\n\t\t--_sds-textfield-font-size: var(--sds-textfield-font-size, var(--sds-components-font-size-content-md));\n\t\t--_sds-textfield-font-weight: var(--sds-textfield-font-weight, var(--sds-typography-font-weight-regular));\n\t\t--_sds-textfield-line-height: var(--sds-textfield-line-height, var(--sds-components-line-height-squeezed-md));\n\t\t--_sds-textfield-min-height: var(--sds-textfield-height, var(--sds-components-button-md));\n\n\t\t--_sds-textfield-gap: var(--sds-textfield-gap, var(--sds-spacing-3xs));\n\t\t--_sds-textfield-padding-block: var(--sds-textfield-padding-block, 0);\n\t\t--_sds-textfield-padding-inline: var(--sds-textfield-padding-inline, var(--sds-spacing-xs));\n\t\t--_sds-textfield-padding-icon: var(--sds-textfield-padding-icon, calc(var(--sds-spacing-xs) + var(--sds-components-icon-md)));\n\t\t--_sds-textfield-disabled-opacity: var(--sds-textfield-disabled-opacity, var(--sds-color-states-disabled-opacity));\n\t\t--_sds-textfield-max-width: var(--sds-textfield-input-max-width, var(--sds-typography-max-line-width, 60ch));\n\n\t\t--_sds-textfield-label-text-color: var(--sds-textfield-label-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));\n\t\t--_sds-textfield-label-font-size: var(--sds-textfield-label-font-size, var(--sds-components-font-size-content-md));\n\t\t--_sds-textfield-label-font-weight: var(--sds-textfield-label-font-weight, var(--sds-typography-font-weight-medium));\n\t\t--_sds-textfield-label-line-height: var(--sds-textfield-label-line-height, var(--sds-components-line-height-squeezed-md));\n\n\t\t--_sds-textfield-helptext-text-color: var(--sds-textfield-helptext-text-color, var(--sds-color-text-subtle, var(--sds-color-neutral-text-subtle)));\n\t\t--_sds-textfield-helptext-font-size: var(--sds-textfield-helptext-font-size, var(--sds-components-font-size-content-md));\n\t\t--_sds-textfield-helptext-font-weight: var(--sds-textfield-helptext-font-weight, var(--sds-typography-font-weight-regular));\n\t\t--_sds-textfield-helptext-line-height: var(--sds-textfield-helptext-line-height, var(--sds-components-line-height-squeezed-md));\n\n\t\t--_sds-textfield-focus-color: var(--sds-textfield-focus-color, var(--sds-color-states-focus-outer));\n\t\t--_sds-textfield-focus-inner-color: var(--sds-textfield-focus-inner-color, var(--sds-color-states-focus-inner));\n\t\t--_sds-textfield-focus-spacing: var(--sds-textfield-focus-spacing, var(--sds-color-states-focus-spacing));\n\t\t--_sds-textfield-focus-outline-size: var(--sds-textfield-focus-outline-size, var(--sds-color-states-focus-outline-size));\n\n\t\t--_sds-textfield-cursor: var(--sds-textfield-cursor, auto);\n\n\t\t--_sds-textfield-icon-right: var(--sds-textfield-icon-right, var(--sds-spacing-xs));\n\t\t--_sds-textfield-icon-top: var(--sds-textfield-icon-top, var(--sds-spacing-3xs));\n\n\t\tall: unset;\n\t\tdisplay: block;\n\t\ttext-align: start;\n\t}\n\n\t.sds-textfield {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: var(--_sds-textfield-gap);\n\t\tfont-family: var(--_sds-textfield-font-family);\n\n\t\t.sds-textfield__input-container {\n\t\t\tposition: relative;\n\t\t\tfont-size: var(--_sds-textfield-font-size);\n\t\t\tmax-width: var(--_sds-textfield-max-width);\n\t\t}\n\n\t\t.sds-textfield__input {\n\t\t\tbox-sizing: border-box;\n\t\t\tcolor: var(--_sds-textfield-text-color);\n\t\t\tpadding: var(--_sds-textfield-padding-block) var(--_sds-textfield-padding-inline);\n\t\t\tline-height: var(--_sds-textfield-line-height);\n\t\t\tfont-size: var(--_sds-textfield-font-size);\n\t\t\tfont-weight: var(--_sds-textfield-font-weight);\n\t\t\tfont-family: var(--_sds-textfield-font-family);\n\t\t\tmin-height: var(--_sds-textfield-min-height);\n\t\t\tborder-radius: var(--_sds-textfield-border-radius);\n\t\t\tborder: var(--_sds-textfield-border-width) solid var(--_sds-textfield-border-color);\n\t\t\tbackground: var(--_sds-textfield-background-color);\n\t\t\tcursor: var(--_sds-textfield-cursor);\n\t\t\twidth: 100%;\n\n\t\t\t&:hover {\n\t\t\t\t--_sds-textfield-border-color: var(--sds-textfield-border-color, var(--sds-color-border-strong, var(--sds-color-neutral-border-strong)));\n\t\t\t}\n\n\t\t\t&:focus-visible {\n\t\t\t\tbox-shadow: 0 0 0 var(--_sds-textfield-focus-spacing) var(--_sds-textfield-focus-inner-color);\n\t\t\t\toutline: var(--_sds-textfield-focus-outline-size) solid var(--_sds-textfield-focus-color);\n\t\t\t\toutline-offset: var(--_sds-textfield-focus-spacing);\n\t\t\t}\n\t\t}\n\n\t\t.sds-textfield__label {\n\t\t\tcolor: var(--_sds-textfield-text-color);\n\t\t\tfont-size: var(--_sds-textfield-label-font-size);\n\t\t\tfont-weight: var(--_sds-textfield-label-font-weight);\n\t\t\tline-height: var(--_sds-textfield-label-line-height);\n\t\t}\n\n\t\t.sds-textfield__label:has(sds-icon) {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\t\t\talign-items: center;\n\t\t\tgap: var(--_sds-textfield-gap);\n\t\t}\n\n\t\t.sds-textfield__help-text {\n\t\t\tdisplay: block;\n\t\t\tcolor: var(--_sds-textfield-helptext-text-color);\n\t\t\tfont-size: var(--_sds-textfield-helptext-font-size);\n\t\t\tfont-weight: var(--_sds-textfield-helptext-font-weight);\n\t\t\tline-height: var(--_sds-textfield-helptext-line-height);\n\t\t\tmargin: 0;\n\t\t}\n\t}\n\n\t.sds-textfield--error {\n\t\t--_sds-textfield-border-color: var(--sds-textfield-border-color, var(--sds-color-alert-danger-border-default));\n\n\t\t& .sds-textfield__input:hover,\n\t\t& .sds-textfield__input:hover {\n\t\t\t--_sds-textfield-border-color: var(--sds-textfield-border-color, var(--sds-color-alert-danger-border-default));\n\t\t}\n\t}\n\n\t:host([readonly]) {\n\t\t--_sds-textfield-background-color: var(--sds-textfield-background-color, var(--sds-color-surface-tinted, var(--sds-color-neutral-surface-tinted)));\n\t\t--_sds-textfield-cursor: var(--sds-textfield-cursor, default);\n\t}\n\n\t:host(:disabled) {\n\t\topacity: var(--_sds-textfield-disabled-opacity);\n\t\tpointer-events: none;\n\t}\n\n\t.sds-textfield--has-icon {\n\t\t.sds-textfield__input {\n\t\t\tpadding-right: var(--_sds-textfield-padding-icon);\n\t\t}\n\t}\n\n\t::slotted([slot='after']) {\n\t\tposition: absolute;\n\t\ttop: var(--_sds-textfield-icon-top);\n\t\tright: var(--_sds-textfield-icon-right);\n\t\tpointer-events: none;\n\t}\n\n\t:host([size='sm']) {\n\t\t--_sds-textfield-min-height: var(--sds-textfield-height, var(--sds-components-button-sm));\n\t\t--_sds-textfield-font-size: var(--sds-textfield-font-size, var(--sds-components-font-size-content-sm));\n\t\t--_sds-textfield-line-height: var(--sds-textfield-line-height, var(--sds-components-line-height-squeezed-sm));\n\t\t--_sds-textfield-label-font-size: var(--sds-textfield-label-font-size, var(--sds-components-font-size-content-sm));\n\t\t--_sds-textfield-label-line-height: var(--sds-textfield-label-line-height, var(--sds-components-line-height-squeezed-sm));\n\t\t--_sds-textfield-helptext-font-size: var(--sds-textfield-helptext-font-size, var(--sds-components-font-size-content-sm));\n\t\t--_sds-textfield-helptext-line-height: var(--sds-textfield-helptext-line-height, var(--sds-components-line-height-squeezed-sm));\n\t\t--_sds-textfield-icon-top: var(--sds-textfield-icon-top, calc((var(--_sds-textfield-min-height) - var(--sds-components-icon-sm)) / 2));\n\t\t--_sds-textfield-padding-icon: var(--sds-textfield-padding-icon, calc(var(--sds-spacing-xs) + var(--sds-components-icon-sm)));\n\n\t\t&:has(sds-icon:not([size])) {\n\t\t\t--sds-icon-size: var(--sds-textfield-icon-size, var(--sds-components-icon-sm));\n\t\t}\n\t}\n\n\t:host([size='lg']) {\n\t\t--_sds-textfield-min-height: var(--sds-textfield-height, var(--sds-components-button-lg));\n\t\t--_sds-textfield-font-size: var(--sds-textfield-font-size, var(--sds-components-font-size-content-lg));\n\t\t--_sds-textfield-line-height: var(--sds-textfield-line-height, var(--sds-components-line-height-squeezed-lg));\n\t\t--_sds-textfield-label-font-size: var(--sds-textfield-label-font-size, var(--sds-components-font-size-content-lg));\n\t\t--_sds-textfield-label-line-height: var(--sds-textfield-label-line-height, var(--sds-components-line-height-squeezed-lg));\n\t\t--_sds-textfield-helptext-font-size: var(--sds-textfield-helptext-font-size, var(--sds-components-font-size-content-lg));\n\t\t--_sds-textfield-helptext-line-height: var(--sds-textfield-helptext-line-height, var(--sds-components-line-height-squeezed-lg));\n\t\t--_sds-textfield-icon-top: var(--sds-textfield-icon-top, var(--sds-spacing-3xs));\n\t\t--_sds-textfield-padding-icon: var(--sds-textfield-padding-icon, calc(var(--sds-spacing-xs) + var(--sds-components-icon-lg)));\n\n\t\t&:has(sds-icon:not([size])) {\n\t\t\t--sds-icon-size: var(--sds-textfield-icon-size, var(--sds-components-icon-lg));\n\t\t}\n\t}\n`;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-styles.d.ts","sourceRoot":"","sources":["../../../src/sds-tooltip/assets/tooltip-styles.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"tooltip-styles.d.ts","sourceRoot":"","sources":["../../../src/sds-tooltip/assets/tooltip-styles.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,CAAC,QAAy8E,CAAC;AAAA,OAAM,EAAC,CAAC,IAAI,OAAO,EAAC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var t = '[data-tooltip]{--ds-tooltip:"";--_ds-data-tooltip:var(--ds-tooltip)}:host{--_ds-floating:top;--_ds-floating-arrow-size:0;--_ds-floating-arrow-visibility:inherit;animation:ds-fade-in .15s ease-in-out forwards;inset:0 auto auto 0;margin:0;overflow:visible;position:absolute}:host:before{background:inherit;border:inherit;border-left-color:transparent;border-top-color:transparent;box-sizing:border-box;content:"";height:var(--_ds-floating-arrow-size);left:var(--_ds-floating-arrow-x,50%);position:absolute;rotate:45deg;top:var(--_ds-floating-arrow-y,100%);translate:-50% -50%;visibility:var(--_ds-floating-arrow-visibility);width:var(--_ds-floating-arrow-size)}:host[data-overscroll=contain]{--_ds-floating-overscroll:contain;
|
|
1
|
+
var t = '[data-tooltip]{--ds-tooltip:"";--_ds-data-tooltip:var(--ds-tooltip)}:host{--_ds-floating:top;--_ds-floating-arrow-size:0;--_ds-floating-arrow-visibility:inherit;animation:ds-fade-in .15s ease-in-out forwards;inset:0 auto auto 0;margin:0;overflow:visible;position:absolute}:host:before{background:inherit;border:inherit;border-left-color:transparent;border-top-color:transparent;box-sizing:border-box;content:"";height:var(--_ds-floating-arrow-size);left:var(--_ds-floating-arrow-x,50%);position:absolute;rotate:45deg;top:var(--_ds-floating-arrow-y,100%);translate:-50% -50%;visibility:var(--_ds-floating-arrow-visibility);width:var(--_ds-floating-arrow-size)}:host[data-overscroll=contain]{--_ds-floating-overscroll:contain;overscroll-behavior:contain;overflow:auto}:host{&[data-floating|=top]:before{top:100%;rotate:45deg}&[data-floating|=right]:before{left:0;rotate:135deg}&[data-floating|=bottom]:before{top:0;rotate:-135deg}&[data-floating|=left]:before{left:100%;rotate:-45deg}--_ds-floating:var(--dsc-tooltip-placement);--_ds-floating-arrow-size:var(--dsc-tooltip-arrow-size);--dsc-tooltip-background:var(--ds-color-neutral-text-default);--dsc-tooltip-color:var(--ds-color-neutral-background-default);--dsc-tooltip-border-radius:var(--ds-border-radius-default);--dsc-tooltip-padding:var(--ds-size-1) var(--ds-size-2);--dsc-tooltip-arrow-size:var(--ds-size-2);--dsc-tooltip-transition-duration:0.2s;--dsc-tooltip-transition-delay:150ms;--dsc-tooltip-placement:top;background:var(--dsc-tooltip-background);border-radius:var(--dsc-tooltip-border-radius);border:0;box-sizing:border-box;color:var(--dsc-tooltip-color);line-height:var(--ds-line-height-sm);padding:var(--dsc-tooltip-padding);view-transition-name:ds-tooltip}:host:after{content:"";box-sizing:border-box;height:var(--_dsc-tooltip-safearea-height,0);width:var(--_dsc-tooltip-safearea-width,0);translate:var(--_dsc-tooltip-safearea-translate);position:absolute;left:var(--_ds-floating-arrow-x,50%);top:var(--_ds-floating-arrow-y,100%)}:host[data-floating=bottom]:after,:host[data-floating=top]:after{top:100%;left:0;width:100%;height:var(--dsc-tooltip-arrow-size)}:host[data-floating=left]:after,:host[data-floating=right]:after{top:0;left:100%;width:var(--dsc-tooltip-arrow-size);height:100%}:host[data-floating=bottom]:after{top:calc(var(--dsc-tooltip-arrow-size)*-1)}:host[data-floating=right]:after{left:calc(var(--dsc-tooltip-arrow-size)*-1)}:host:not([popover]){display:none}@media (forced-colors:active){:host{background:CanvasText}}';
|
|
2
2
|
export { t as default };
|
|
3
3
|
//# sourceMappingURL=tooltip-styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-styles.js","sourceRoot":"","sources":["../../../src/sds-tooltip/assets/tooltip-styles.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAC,
|
|
1
|
+
{"version":3,"file":"tooltip-styles.js","sourceRoot":"","sources":["../../../src/sds-tooltip/assets/tooltip-styles.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAC,w8EAAw8E,CAAC;AAAA,OAAM,EAAC,CAAC,IAAI,OAAO,EAAC,CAAC","sourcesContent":["var t='[data-tooltip]{--ds-tooltip:\"\";--_ds-data-tooltip:var(--ds-tooltip)}:host{--_ds-floating:top;--_ds-floating-arrow-size:0;--_ds-floating-arrow-visibility:inherit;animation:ds-fade-in .15s ease-in-out forwards;inset:0 auto auto 0;margin:0;overflow:visible;position:absolute}:host:before{background:inherit;border:inherit;border-left-color:transparent;border-top-color:transparent;box-sizing:border-box;content:\"\";height:var(--_ds-floating-arrow-size);left:var(--_ds-floating-arrow-x,50%);position:absolute;rotate:45deg;top:var(--_ds-floating-arrow-y,100%);translate:-50% -50%;visibility:var(--_ds-floating-arrow-visibility);width:var(--_ds-floating-arrow-size)}:host[data-overscroll=contain]{--_ds-floating-overscroll:contain;overscroll-behavior:contain;overflow:auto}:host{&[data-floating|=top]:before{top:100%;rotate:45deg}&[data-floating|=right]:before{left:0;rotate:135deg}&[data-floating|=bottom]:before{top:0;rotate:-135deg}&[data-floating|=left]:before{left:100%;rotate:-45deg}--_ds-floating:var(--dsc-tooltip-placement);--_ds-floating-arrow-size:var(--dsc-tooltip-arrow-size);--dsc-tooltip-background:var(--ds-color-neutral-text-default);--dsc-tooltip-color:var(--ds-color-neutral-background-default);--dsc-tooltip-border-radius:var(--ds-border-radius-default);--dsc-tooltip-padding:var(--ds-size-1) var(--ds-size-2);--dsc-tooltip-arrow-size:var(--ds-size-2);--dsc-tooltip-transition-duration:0.2s;--dsc-tooltip-transition-delay:150ms;--dsc-tooltip-placement:top;background:var(--dsc-tooltip-background);border-radius:var(--dsc-tooltip-border-radius);border:0;box-sizing:border-box;color:var(--dsc-tooltip-color);line-height:var(--ds-line-height-sm);padding:var(--dsc-tooltip-padding);view-transition-name:ds-tooltip}:host:after{content:\"\";box-sizing:border-box;height:var(--_dsc-tooltip-safearea-height,0);width:var(--_dsc-tooltip-safearea-width,0);translate:var(--_dsc-tooltip-safearea-translate);position:absolute;left:var(--_ds-floating-arrow-x,50%);top:var(--_ds-floating-arrow-y,100%)}:host[data-floating=bottom]:after,:host[data-floating=top]:after{top:100%;left:0;width:100%;height:var(--dsc-tooltip-arrow-size)}:host[data-floating=left]:after,:host[data-floating=right]:after{top:0;left:100%;width:var(--dsc-tooltip-arrow-size);height:100%}:host[data-floating=bottom]:after{top:calc(var(--dsc-tooltip-arrow-size)*-1)}:host[data-floating=right]:after{left:calc(var(--dsc-tooltip-arrow-size)*-1)}:host:not([popover]){display:none}@media (forced-colors:active){:host{background:CanvasText}}';export{t as default};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t={passive:!0,capture:!0},e=(t,e,n)=>void 0===n?t.getAttribute(e)??null:(null===n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),n=(t,e)=>getComputedStyle(t).getPropertyValue(e).trim(),o=(t,...e)=>{let[n,...o]=e;for(let e of n.split(" "))t.addEventListener(e,...o);return()=>i(t,...e)},i=(t,...e)=>{let[n,...o]=e;for(let e of n.split(" "))t.removeEventListener(e,...o)},r=(t,e)=>{typeof window<"u"&&typeof document<"u"&&(window._dsHotReloadCleanup||(window._dsHotReloadCleanup=new Map),window._dsHotReloadCleanup?.get(t)?.map(t=>t()),window._dsHotReloadCleanup?.set(t,e()))};let l;const s=()=>{"complete"===document.readyState&&(l||(l=((t,n)=>{let o=document.createElement(t);if(n)for(let[t,i]of Object.entries(n))e(o,t,i);return o})("div",{"aria-live":"assertive"}),l.style.overflow="hidden",l.style.position="fixed",l.style.whiteSpace="nowrap",l.style.width="1px"),l.isConnected||document.body.appendChild(l))};r("announce",()=>[o(document,"focus mouseover",s,t)]);const c=Math.min,a=Math.max,f=Math.round,u=Math.floor,d=t=>({x:t,y:t}),h={left:"right",right:"left",bottom:"top",top:"bottom"};function p(t,e,n){return a(t,c(e,n))}function m(t,e){return"function"==typeof t?t(e):t}function g(t){return t.split("-")[0]}function y(t){return t.split("-")[1]}function w(t){return"x"===t?"y":"x"}function x(t){return"y"===t?"height":"width"}function v(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function b(t){return w(v(t))}function R(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const A=["left","right"],L=["right","left"],T=["top","bottom"],C=["bottom","top"];function E(t,e,n,o){const i=y(t);let r=function(t,e,n){switch(t){case"top":case"bottom":return n?e?L:A:e?A:L;case"left":case"right":return e?T:C;default:return[]}}(g(t),"start"===n,o);return i&&(r=r.map(t=>t+"-"+i),e&&(r=r.concat(r.map(R)))),r}function S(t){const e=g(t);return h[e]+t.slice(e.length)}function D(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function O(t,e,n){let{reference:o,floating:i}=t;const r=v(e),l=b(e),s=x(l),c=g(e),a="y"===r,f=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,d=o[s]/2-i[s]/2;let h;switch(c){case"top":h={x:f,y:o.y-i.height};break;case"bottom":h={x:f,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:u};break;case"left":h={x:o.x-i.width,y:u};break;default:h={x:o.x,y:o.y}}switch(y(e)){case"start":h[l]-=d*(n&&a?-1:1);break;case"end":h[l]+=d*(n&&a?-1:1)}return h}async function P(t,e){var n;void 0===e&&(e={});const{x:o,y:i,platform:r,rects:l,elements:s,strategy:c}=t,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:d=!1,padding:h=0}=m(e,t),p=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(h),g=s[d?"floating"===u?"reference":"floating":u],y=D(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(g)))||n?g:g.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(s.floating)),boundary:a,rootBoundary:f,strategy:c})),w="floating"===u?{x:o,y:i,width:l.floating.width,height:l.floating.height}:l.reference,x=await(null==r.getOffsetParent?void 0:r.getOffsetParent(s.floating)),v=await(null==r.isElement?void 0:r.isElement(x))&&await(null==r.getScale?void 0:r.getScale(x))||{x:1,y:1},b=D(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:x,strategy:c}):w);return{top:(y.top-b.top+p.top)/v.y,bottom:(b.bottom-y.bottom+p.bottom)/v.y,left:(y.left-b.left+p.left)/v.x,right:(b.right-y.right+p.right)/v.x}}const H=new Set(["left","top"]);function F(){return"undefined"!=typeof window}function M(t){return k(t)?(t.nodeName||"").toLowerCase():"#document"}function W(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function $(t){var e;return null==(e=(k(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function k(t){return!!F()&&(t instanceof Node||t instanceof W(t).Node)}function B(t){return!!F()&&(t instanceof Element||t instanceof W(t).Element)}function V(t){return!!F()&&(t instanceof HTMLElement||t instanceof W(t).HTMLElement)}function _(t){return!(!F()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof W(t).ShadowRoot)}function z(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=Q(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==i&&"contents"!==i}function N(t){return/^(table|td|th)$/.test(M(t))}function j(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const q=/transform|translate|scale|rotate|perspective|filter/,I=/paint|layout|strict|content/,X=t=>!!t&&"none"!==t;let Y;function G(t){const e=B(t)?Q(t):t;return X(e.transform)||X(e.translate)||X(e.scale)||X(e.rotate)||X(e.perspective)||!J()&&(X(e.backdropFilter)||X(e.filter))||q.test(e.willChange||"")||I.test(e.contain||"")}function J(){return null==Y&&(Y="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Y}function K(t){return/^(html|body|#document)$/.test(M(t))}function Q(t){return W(t).getComputedStyle(t)}function U(t){return B(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Z(t){if("html"===M(t))return t;const e=t.assignedSlot||t.parentNode||_(t)&&t.host||$(t);return _(e)?e.host:e}function tt(t){const e=Z(t);return K(e)?t.ownerDocument?t.ownerDocument.body:t.body:V(e)&&z(e)?e:tt(e)}function et(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=tt(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),l=W(i);if(r){const t=nt(l);return e.concat(l,l.visualViewport||[],z(i)?i:[],t&&n?et(t):[])}return e.concat(i,et(i,[],n))}function nt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ot(t){const e=Q(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=V(t),r=i?t.offsetWidth:n,l=i?t.offsetHeight:o,s=f(n)!==r||f(o)!==l;return s&&(n=r,o=l),{width:n,height:o,$:s}}function it(t){return B(t)?t:t.contextElement}function rt(t){const e=it(t);if(!V(e))return d(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=ot(e);let l=(r?f(n.width):n.width)/o,s=(r?f(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}const lt=d(0);function st(t){const e=W(t);return J()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:lt}function ct(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),r=it(t);let l=d(1);e&&(o?B(o)&&(l=rt(o)):l=rt(t));const s=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==W(t))&&e}(r,n,o)?st(r):d(0);let c=(i.left+s.x)/l.x,a=(i.top+s.y)/l.y,f=i.width/l.x,u=i.height/l.y;if(r){const t=W(r),e=o&&B(o)?W(o):o;let n=t,i=nt(n);for(;i&&o&&e!==n;){const t=rt(i),e=i.getBoundingClientRect(),o=Q(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,l=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;c*=t.x,a*=t.y,f*=t.x,u*=t.y,c+=r,a+=l,n=W(i),i=nt(n)}}return D({width:f,height:u,x:c,y:a})}function at(t,e){const n=U(t).scrollLeft;return e?e.left+n:ct($(t)).left+n}function ft(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-at(t,n),y:n.top+e.scrollTop}}function ut(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=W(t),o=$(t),i=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,s=0,c=0;if(i){r=i.width,l=i.height;const t=J();(!t||t&&"fixed"===e)&&(s=i.offsetLeft,c=i.offsetTop)}const a=at(o);if(a<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(o.clientWidth-e.clientWidth-i);l<=25&&(r-=l)}else a<=25&&(r+=a);return{width:r,height:l,x:s,y:c}}(t,n);else if("document"===e)o=function(t){const e=$(t),n=U(t),o=t.ownerDocument.body,i=a(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=a(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+at(t);const s=-n.scrollTop;return"rtl"===Q(o).direction&&(l+=a(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:l,y:s}}($(t));else if(B(e))o=function(t,e){const n=ct(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=V(t)?rt(t):d(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:i*r.x,y:o*r.y}}(e,n);else{const n=st(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return D(o)}function dt(t,e){const n=Z(t);return!(n===e||!B(n)||K(n))&&("fixed"===Q(n).position||dt(n,e))}function ht(t,e,n){const o=V(e),i=$(e),r="fixed"===n,l=ct(t,!0,r,e);let s={scrollLeft:0,scrollTop:0};const c=d(0);function a(){c.x=at(i)}if(o||!o&&!r)if(("body"!==M(e)||z(i))&&(s=U(e)),o){const t=ct(e,!0,r,e);c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}else i&&a();r&&!o&&i&&a();const f=!i||o||r?d(0):ft(i,s);return{x:l.left+s.scrollLeft-c.x-f.x,y:l.top+s.scrollTop-c.y-f.y,width:l.width,height:l.height}}function pt(t){return"static"===Q(t).position}function mt(t,e){if(!V(t)||"fixed"===Q(t).position)return null;if(e)return e(t);let n=t.offsetParent;return $(t)===n&&(n=n.ownerDocument.body),n}function gt(t,e){const n=W(t);if(j(t))return n;if(!V(t)){let e=Z(t);for(;e&&!K(e);){if(B(e)&&!pt(e))return e;e=Z(e)}return n}let o=mt(t,e);for(;o&&N(o)&&pt(o);)o=mt(o,e);return o&&K(o)&&pt(o)&&!G(o)?n:o||function(t){let e=Z(t);for(;V(e)&&!K(e);){if(G(e))return e;if(j(e))return null;e=Z(e)}return null}(t)||n}const yt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r="fixed"===i,l=$(o),s=!!e&&j(e.floating);if(o===l||s&&r)return n;let c={scrollLeft:0,scrollTop:0},a=d(1);const f=d(0),u=V(o);if((u||!u&&!r)&&(("body"!==M(o)||z(l))&&(c=U(o)),u)){const t=ct(o);a=rt(o),f.x=t.x+o.clientLeft,f.y=t.y+o.clientTop}const h=!l||u||r?d(0):ft(l,c);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-c.scrollLeft*a.x+f.x+h.x,y:n.y*a.y-c.scrollTop*a.y+f.y+h.y}},getDocumentElement:$,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[..."clippingAncestors"===n?j(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=et(t,[],!1).filter(t=>B(t)&&"body"!==M(t)),i=null;const r="fixed"===Q(t).position;let l=r?Z(t):t;for(;B(l)&&!K(l);){const e=Q(l),n=G(l);n||"fixed"!==e.position||(i=null),(r?!n&&!i:!n&&"static"===e.position&&i&&("absolute"===i.position||"fixed"===i.position)||z(l)&&!n&&dt(t,l))?o=o.filter(t=>t!==l):i=e,l=Z(l)}return e.set(t,o),o}(e,this._c):[].concat(n),o],l=ut(e,r[0],i);let s=l.top,f=l.right,u=l.bottom,d=l.left;for(let t=1;t<r.length;t++){const n=ut(e,r[t],i);s=a(n.top,s),f=c(n.right,f),u=c(n.bottom,u),d=a(n.left,d)}return{width:f-d,height:u-s,x:d,y:s}},getOffsetParent:gt,getElementRects:async function(t){const e=this.getOffsetParent||gt,n=this.getDimensions,o=await n(t.floating);return{reference:ht(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=ot(t);return{width:e,height:n}},getScale:rt,isElement:B,isRTL:function(t){return"rtl"===Q(t).direction}};function wt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function xt(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:f=!1}=o,d=it(t),h=i||r?[...d?et(d):[],...e?et(e):[]]:[];h.forEach(t=>{i&&t.addEventListener("scroll",n,{passive:!0}),r&&t.addEventListener("resize",n)});const p=d&&s?function(t,e){let n,o=null;const i=$(t);function r(){var t;clearTimeout(n),null==(t=o)||t.disconnect(),o=null}return function l(s,f){void 0===s&&(s=!1),void 0===f&&(f=1),r();const d=t.getBoundingClientRect(),{left:h,top:p,width:m,height:g}=d;if(s||e(),!m||!g)return;const y={rootMargin:-u(p)+"px "+-u(i.clientWidth-(h+m))+"px "+-u(i.clientHeight-(p+g))+"px "+-u(h)+"px",threshold:a(0,c(1,f))||1};let w=!0;function x(e){const o=e[0].intersectionRatio;if(o!==f){if(!w)return l();o?l(!1,o):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==o||wt(d,t.getBoundingClientRect())||l(),w=!1}try{o=new IntersectionObserver(x,{...y,root:i.ownerDocument})}catch(t){o=new IntersectionObserver(x,y)}o.observe(t)}(!0),r}(d,n):null;let m,g=-1,y=null;l&&(y=new ResizeObserver(t=>{let[o]=t;o&&o.target===d&&y&&e&&(y.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var t;null==(t=y)||t.observe(e)})),n()}),d&&!f&&y.observe(d),e&&y.observe(e));let w=f?ct(t):null;return f&&function e(){const o=ct(t);w&&!wt(w,o)&&n();w=o,m=requestAnimationFrame(e)}(),n(),()=>{var t;h.forEach(t=>{i&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)}),null==p||p(),null==(t=y)||t.disconnect(),y=null,f&&cancelAnimationFrame(m)}}const vt=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:l,middlewareData:s}=e,c=await async function(t,e){const{placement:n,platform:o,elements:i}=t,r=await(null==o.isRTL?void 0:o.isRTL(i.floating)),l=g(n),s=y(n),c="y"===v(n),a=H.has(l)?-1:1,f=r&&c?-1:1,u=m(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&"number"==typeof p&&(h="end"===s?-1*p:p),c?{x:h*f,y:d*a}:{x:d*a,y:h*f}}(e,t);return l===(null==(n=s.offset)?void 0:n.placement)&&null!=(o=s.arrow)&&o.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:l}}}}},bt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:r}=e,{mainAxis:l=!0,crossAxis:s=!1,limiter:c={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...a}=m(t,e),f={x:n,y:o},u=await r.detectOverflow(e,a),d=v(g(i)),h=w(d);let y=f[h],x=f[d];if(l){const t="y"===h?"bottom":"right";y=p(y+u["y"===h?"top":"left"],y,y-u[t])}if(s){const t="y"===d?"bottom":"right";x=p(x+u["y"===d?"top":"left"],x,x-u[t])}const b=c.fn({...e,[h]:y,[d]:x});return{...b,data:{x:b.x-n,y:b.y-o,enabled:{[h]:l,[d]:s}}}}}},Rt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:l,initialPlacement:s,platform:c,elements:a}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:w=!0,...A}=m(t,e);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const L=g(i),T=v(s),C=g(s)===s,D=await(null==c.isRTL?void 0:c.isRTL(a.floating)),O=d||(C||!w?[S(s)]:function(t){const e=S(t);return[R(t),e,R(e)]}(s)),P="none"!==p;!d&&P&&O.push(...E(s,w,p,D));const H=[s,...O],F=await c.detectOverflow(e,A),M=[];let W=(null==(o=r.flip)?void 0:o.overflows)||[];if(f&&M.push(F[L]),u){const t=function(t,e,n){void 0===n&&(n=!1);const o=y(t),i=b(t),r=x(i);let l="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(l=S(l)),[l,S(l)]}(i,l,D);M.push(F[t[0]],F[t[1]])}if(W=[...W,{placement:i,overflows:M}],!M.every(t=>t<=0)){var $,k;const t=((null==($=r.flip)?void 0:$.index)||0)+1,e=H[t];if(e){if(!("alignment"===u&&T!==v(e))||W.every(t=>v(t.placement)!==T||t.overflows[0]>0))return{data:{index:t,overflows:W},reset:{placement:e}}}let n=null==(k=W.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:k.placement;if(!n)switch(h){case"bestFit":{var B;const t=null==(B=W.filter(t=>{if(P){const e=v(t.placement);return e===T||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:B[0];t&&(n=t);break}case"initialPlacement":n=s}if(i!==n)return{reset:{placement:n}}}return{}}}},At=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:l,elements:s}=e,{apply:f=()=>{},...u}=m(t,e),d=await l.detectOverflow(e,u),h=g(i),p=y(i),w="y"===v(i),{width:x,height:b}=r.floating;let R,A;"top"===h||"bottom"===h?(R=h,A=p===(await(null==l.isRTL?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(A=h,R="end"===p?"top":"bottom");const L=b-d.top-d.bottom,T=x-d.left-d.right,C=c(b-d[R],L),E=c(x-d[A],T),S=!e.middlewareData.shift;let D=C,O=E;if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(O=T),null!=(o=e.middlewareData.shift)&&o.enabled.y&&(D=L),S&&!p){const t=a(d.left,0),e=a(d.right,0),n=a(d.top,0),o=a(d.bottom,0);w?O=x-2*(0!==t||0!==e?t+e:a(d.left,d.right)):D=b-2*(0!==n||0!==o?n+o:a(d.top,d.bottom))}await f({...e,availableWidth:O,availableHeight:D});const P=await l.getDimensions(s.floating);return x!==P.width||b!==P.height?{reset:{rects:!0}}:{}}}},Lt=function(t){return void 0===t&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:r,middlewareData:l}=e,{offset:s=0,mainAxis:c=!0,crossAxis:a=!0}=m(t,e),f={x:n,y:o},u=v(i),d=w(u);let h=f[d],p=f[u];const y=m(s,e),x="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const t="y"===d?"height":"width",e=r.reference[d]-r.floating[t]+x.mainAxis,n=r.reference[d]+r.reference[t]-x.mainAxis;h<e?h=e:h>n&&(h=n)}if(a){var b,R;const t="y"===d?"width":"height",e=H.has(g(i)),n=r.reference[u]-r.floating[t]+(e&&(null==(b=l.offset)?void 0:b[u])||0)+(e?0:x.crossAxis),o=r.reference[u]+r.reference[t]+(e?0:(null==(R=l.offset)?void 0:R[u])||0)-(e?x.crossAxis:0);p<n?p=n:p>o&&(p=o)}return{[d]:h,[u]:p}}}},Tt=(t,e,n)=>{const o=new Map,i={platform:yt,...n},r={...i.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:l}=n,s=l.detectOverflow?l:{...l,detectOverflow:P},c=await(null==l.isRTL?void 0:l.isRTL(e));let a=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=O(a,o,c),d=o,h=0;const p={};for(let n=0;n<r.length;n++){const m=r[n];if(!m)continue;const{name:g,fn:y}=m,{x:w,y:x,data:v,reset:b}=await y({x:f,y:u,initialPlacement:o,placement:d,strategy:i,middlewareData:p,rects:a,platform:s,elements:{reference:t,floating:e}});f=null!=w?w:f,u=null!=x?x:u,p[g]={...p[g],...v},b&&h<50&&(h++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(a=!0===b.rects?await l.getElementRects({reference:t,floating:e,strategy:i}):b.rects),({x:f,y:u}=O(a,d,c))),n=-1)}return{x:f,y:u,placement:d,strategy:i,middlewareData:p}})(t,e,{...i,platform:r})},Ct="data-placement",Et="data-autoplacement",St=new Map;function Dt(t){let{newState:o,oldState:i,target:r,source:l=t.detail}=t,s=r instanceof HTMLElement&&null!==e(r,"popover")&&n(r,"--_ds-floating");if(!s)return;if("closed"===o)return St.get(r)?.();if(!l){let t=r.getRootNode(),e=`[popovertarget="${r.id}"],[commandfor="${r.id}"]`;l=r.id&&t?.querySelector?.(e)||void 0}if(!l||l===r||i&&i===o)return;let c=n(r,"--_ds-floating-overscroll"),a=e(r,Ct)||e(l,Ct)||s,f=e(r,Et)||e(l,Et),u=parseFloat(getComputedStyle(r,"::before").height)||0,d=a.match(/left|right/gi)?"Height":"Width",h=l[`offset${d}`]/2+u;if("none"===a)return;let p={strategy:"absolute",placement:a,middleware:[vt(u||0),bt({padding:10,limiter:Lt({offset:{mainAxis:h}})}),Ht(),..."false"===f?[]:[Rt({padding:10,crossAxis:!1})],...c?[At({apply({availableHeight:t}){"fit"===c&&(r.style.width=`${l.clientWidth}px`),r.style.maxHeight=`${Math.max(50,t-20)}px`}})]:[]]},m=xt(l,r,async()=>{if(!l?.isConnected)return St.get(r)?.();let{x:t,y:e}=await Tt(l,r,p);r.style.translate=`${t}px ${e}px`});St.set(r,()=>St.delete(r)&&m())}let Ot;const Pt=({type:t})=>{if("mousedown"===t&&(Ot=!1),"scroll"===t&&!1===Ot&&(Ot=!0),"mouseup"===t&&Ot)for(let[t]of St)t.showPopover()};r("popover",()=>[o(document,"mousedown scroll mouseup",Pt,!0),o(document,"toggle ds-toggle-source",Dt,t)]);const Ht=()=>({name:"arrowPseudo",fn(t){let n=t.elements.floating,o=t.rects.reference,i=`${Math.round(o.width/2+o.x-t.x)}px`,r=`${Math.round(o.height/2+o.y-t.y)}px`;return n.style.setProperty("--_ds-floating-arrow-x",i),n.style.setProperty("--_ds-floating-arrow-y",r),e(n,"data-floating",t.placement),t}});
|
|
1
|
+
const e={passive:!0,capture:!0},t=()=>typeof window<"u"&&typeof document<"u",n=(e,t,n)=>void 0===n?e.getAttribute(t)??null:(null===n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n),null),o=(e,t)=>getComputedStyle(e).getPropertyValue(t).trim(),r=(e,...t)=>{let[n,...o]=t;for(let t of n.split(" "))e.addEventListener(t,...o);return()=>i(e,...t)},i=(e,...t)=>{let[n,...o]=t;for(let t of n.split(" "))e.removeEventListener(t,...o)},l=(e,n)=>{t()&&(window._dsHotReloadCleanup||(window._dsHotReloadCleanup=new Map),window._dsHotReloadCleanup?.get(e)?.map(e=>e()),window._dsHotReloadCleanup?.set(e,n()))};let a;const s=()=>{"complete"===document.readyState&&(a||(a=((e,t)=>{let o=document.createElement(e);if(t)for(let[e,r]of Object.entries(t))n(o,e,r);return o})("div",{"aria-live":"assertive"}),a.style.overflow="hidden",a.style.position="fixed",a.style.whiteSpace="nowrap",a.style.width="1px"),a.isConnected||document.body.appendChild(a))};l("announce",()=>[r(document,"focus mouseover",s,e)]);var c=class extends Event{oldState;newState;constructor(e,{oldState:t="",newState:n="",...o}={}){super(e,o),this.oldState=String(t||""),this.newState=String(n||"")}},u=new WeakMap;function f(e,t,n){u.set(e,setTimeout(()=>{u.has(e)&&e.dispatchEvent(new c("toggle",{cancelable:!1,oldState:t,newState:n}))},0))}var p=globalThis.ShadowRoot||function(){},d=globalThis.HTMLDialogElement||function(){},h=new WeakMap,m=new WeakMap,g=new WeakMap,w=new WeakMap;function y(e){return w.get(e)||"hidden"}var v=new WeakMap;function b(e){return[...e].pop()}function x(e,t){return!("auto"!==e.popover&&"manual"!==e.popover&&"hint"!==e.popover||!e.isConnected||t&&"showing"!==y(e)||!t&&"hidden"!==y(e)||e instanceof d&&e.hasAttribute("open")||document.fullscreenElement===e)}function E(e){if(!e)return 0;let t=m.get(document)||new Set,n=g.get(document)||new Set;return n.has(e)?[...n].indexOf(e)+t.size+1:t.has(e)?[...t].indexOf(e)+1:0}function S(e){let t=R(e),n=function(e){for(;e;){let t=e.popoverTargetElement;if(t instanceof HTMLElement)return t;if((e=e.parentElement||A(e))instanceof p&&(e=e.host),e instanceof Document)return}}(e);return E(t)>E(n)?t:n}function T(e){let t,n=g.get(e)||new Set,o=m.get(e)||new Set,r=n.size>0?n:o.size>0?o:null;return r?(t=b(r),t.isConnected?t:(r.delete(t),T(e))):null}function L(e){for(let t of e||[]){if(t.isConnected)return t;e.delete(t)}return null}function A(e){return"function"==typeof e.getRootNode?e.getRootNode():e.parentNode?A(e.parentNode):e}function R(e){for(;e;){if(e instanceof HTMLElement&&"auto"===e.popover&&"showing"===w.get(e))return e;if((e=e instanceof Element&&e.assignedSlot||e.parentElement||A(e))instanceof p&&(e=e.host),e instanceof Document)return}}function M(e,t){let n=new Map,o=0;for(let e of t||[])n.set(e,o),o+=1;n.set(e,o),o+=1;let r=null;return function(t){if(!t)return;let o=!1,i=null,l=null;for(;!o;){if(i=R(t)||null,null===i||!n.has(i))return;("hint"===e.popover||"auto"===i.popover)&&(o=!0),o||(t=i.parentElement)}l=n.get(i),(null===r||n.get(r)<l)&&(r=i)}(e.parentElement||A(e)),r}function H(e){return!(e.hidden||e instanceof p||(e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLOptGroupElement||e instanceof HTMLOptionElement||e instanceof HTMLFieldSetElement)&&e.disabled||e instanceof HTMLInputElement&&"hidden"===e.type||e instanceof HTMLAnchorElement&&""===e.href)&&("number"==typeof e.tabIndex&&-1!==e.tabIndex)}function D(e){var t;null==(t=function(e){if(e.shadowRoot&&!0!==e.shadowRoot.delegatesFocus)return null;let t=e;t.shadowRoot&&(t=t.shadowRoot);let n=t.querySelector("[autofocus]");if(n)return n;{let e=t.querySelectorAll("slot");for(let t of e){let e=t.assignedElements({flatten:!0});for(let t of e){if(t.hasAttribute("autofocus"))return t;if(n=t.querySelector("[autofocus]"),n)return n}}}let o=e.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_ELEMENT),r=o.currentNode;for(;r;){if(H(r))return r;r=o.nextNode()}}(e))||t.focus()}var C=new WeakMap;function k(e){if(!x(e,!1))return;let t=e.ownerDocument;if(!e.dispatchEvent(new c("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!x(e,!1))return;let n=!1,o=e.popover,r=null,i=M(e,m.get(t)||new Set),l=M(e,g.get(t)||new Set);if("auto"===o&&(P(g.get(t)||new Set,n,!0),F(i||t,n,!0),r="auto"),"hint"===o&&(l?(F(l,n,!0),r="hint"):(P(g.get(t)||new Set,n,!0),i?(F(i,n,!0),r="auto"):r="hint")),"auto"===o||"hint"===o){if(o!==e.popover||!x(e,!1))return;T(t)||(n=!0),"auto"===r?(m.has(t)||m.set(t,new Set),m.get(t).add(e)):"hint"===r&&(g.has(t)||g.set(t,new Set),g.get(t).add(e))}C.delete(e);let a=t.activeElement;e.classList.add(":popover-open"),w.set(e,"showing"),h.has(t)||h.set(t,new Set),h.get(t).add(e),B(v.get(e),!0),D(e),n&&a&&"auto"===e.popover&&C.set(e,a),f(e,"closed","open")}function O(e,t=!1,n=!1){var o,r;if(!x(e,!0))return;let i=e.ownerDocument;if(["auto","hint"].includes(e.popover)&&(F(e,t,n),!x(e,!0)))return;let l=m.get(i)||new Set,a=l.has(e)&&b(l)===e;if(B(v.get(e),!1),v.delete(e),n&&(e.dispatchEvent(new c("beforetoggle",{oldState:"open",newState:"closed"})),a&&b(l)!==e&&F(e,t,n),!x(e,!0)))return;null==(o=h.get(i))||o.delete(e),l.delete(e),null==(r=g.get(i))||r.delete(e),e.classList.remove(":popover-open"),w.set(e,"hidden"),n&&f(e,"open","closed");let s=C.get(e);s&&(C.delete(e),t&&s.focus())}function P(e,t=!1,n=!1){let o=L(e);for(;o;)O(o,t,n),o=L(e)}function W(e,t,n,o){let r=!1,i=!1;for(;r||!i;){i=!0;let l=null,a=!1;for(let n of t)if(n===e)a=!0;else if(a){l=n;break}if(!l)return;for(;"showing"===y(l)&&t.size;)O(b(t),n,o);t.has(e)&&b(t)!==e&&(r=!0),r&&(o=!1)}}function F(e,t,n){let o=e.ownerDocument||e;if(e instanceof Document)return function(e,t=!1,n=!1){let o=T(e);for(;o;)O(o,t,n),o=T(e)}(o,t,n);g.get(o)?.has(e)?W(e,g.get(o),t,n):(P(g.get(o)||new Set,t,n),m.get(o)?.has(e)&&W(e,m.get(o),t,n))}var N=new WeakMap;function z(e){if(!e.isTrusted)return;let t=e.composedPath()[0];if(!t)return;let n=t.ownerDocument;if(!T(n))return;let o=S(t);if(o&&"pointerdown"===e.type)N.set(n,o);else if("pointerup"===e.type){let e=N.get(n)===o;N.delete(n),e&&F(o||n,!1,!0)}}var $=new WeakMap;function B(e,t=!1){if(!e)return;$.has(e)||$.set(e,e.getAttribute("aria-expanded"));let n=e.popoverTargetElement;if(n instanceof HTMLElement&&"auto"===n.popover)e.setAttribute("aria-expanded",String(t));else{let t=$.get(e);t?e.setAttribute("aria-expanded",t):e.removeAttribute("aria-expanded")}}var _=globalThis.ShadowRoot||function(){};function q(e,t,n){let o=e[t];Object.defineProperty(e,t,{value(e){return o.call(this,n(e))}})}var I=/(^|[^\\]):popover-open\b/g;function V(){let e="function"==typeof globalThis.CSSLayerBlockRule;return`\n${e?"@layer popover-polyfill {":""}\n :where([popover]) {\n position: fixed;\n z-index: 2147483647;\n inset: 0;\n padding: 0.25em;\n width: fit-content;\n height: fit-content;\n border-width: initial;\n border-color: initial;\n border-image: initial;\n border-style: solid;\n background-color: canvas;\n color: canvastext;\n overflow: auto;\n margin: auto;\n }\n\n :where([popover]:not(.\\:popover-open)) {\n display: none;\n }\n\n :where(dialog[popover].\\:popover-open) {\n display: block;\n }\n\n :where(dialog[popover][open]) {\n display: revert;\n }\n\n :where([anchor].\\:popover-open) {\n inset: auto;\n }\n\n :where([anchor]:popover-open) {\n inset: auto;\n }\n\n @supports not (background-color: canvas) {\n :where([popover]) {\n background-color: white;\n color: black;\n }\n }\n\n @supports (width: -moz-fit-content) {\n :where([popover]) {\n width: -moz-fit-content;\n height: -moz-fit-content;\n }\n }\n\n @supports not (inset: 0) {\n :where([popover]) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n }\n${e?"}":""}\n`}var j=null;function X(e){let t=V();if(null===j)try{(j=new CSSStyleSheet).replaceSync(t)}catch{j=!1}if(!1===j){let n=document.createElement("style");n.textContent=t,e instanceof Document?e.head.prepend(n):e.prepend(n)}else e.adoptedStyleSheets=[j,...e.adoptedStyleSheets]}const Y=Math.min,G=Math.max,J=Math.round,K=Math.floor,Q=e=>({x:e,y:e}),U={left:"right",right:"left",bottom:"top",top:"bottom"};function Z(e,t,n){return G(e,Y(t,n))}function ee(e,t){return"function"==typeof e?e(t):e}function te(e){return e.split("-")[0]}function ne(e){return e.split("-")[1]}function oe(e){return"x"===e?"y":"x"}function re(e){return"y"===e?"height":"width"}function ie(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function le(e){return oe(ie(e))}function ae(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const se=["left","right"],ce=["right","left"],ue=["top","bottom"],fe=["bottom","top"];function pe(e,t,n,o){const r=ne(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?ce:se:t?se:ce;case"left":case"right":return t?ue:fe;default:return[]}}(te(e),"start"===n,o);return r&&(i=i.map(e=>e+"-"+r),t&&(i=i.concat(i.map(ae)))),i}function de(e){const t=te(e);return U[t]+e.slice(t.length)}function he(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function me(e,t,n){let{reference:o,floating:r}=e;const i=ie(t),l=le(t),a=re(l),s=te(t),c="y"===i,u=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let d;switch(s){case"top":d={x:u,y:o.y-r.height};break;case"bottom":d={x:u,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:f};break;case"left":d={x:o.x-r.width,y:f};break;default:d={x:o.x,y:o.y}}switch(ne(t)){case"start":d[l]-=p*(n&&c?-1:1);break;case"end":d[l]+=p*(n&&c?-1:1)}return d}async function ge(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=ee(t,e),h=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(d),m=a[p?"floating"===f?"reference":"floating":f],g=he(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),w="floating"===f?{x:o,y:r,width:l.floating.width,height:l.floating.height}:l.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),v=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=he(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:y,strategy:s}):w);return{top:(g.top-b.top+h.top)/v.y,bottom:(b.bottom-g.bottom+h.bottom)/v.y,left:(g.left-b.left+h.left)/v.x,right:(b.right-g.right+h.right)/v.x}}const we=new Set(["left","top"]);function ye(){return"undefined"!=typeof window}function ve(e){return Ee(e)?(e.nodeName||"").toLowerCase():"#document"}function be(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function xe(e){var t;return null==(t=(Ee(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ee(e){return!!ye()&&(e instanceof Node||e instanceof be(e).Node)}function Se(e){return!!ye()&&(e instanceof Element||e instanceof be(e).Element)}function Te(e){return!!ye()&&(e instanceof HTMLElement||e instanceof be(e).HTMLElement)}function Le(e){return!(!ye()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof be(e).ShadowRoot)}function Ae(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Fe(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&"inline"!==r&&"contents"!==r}function Re(e){return/^(table|td|th)$/.test(ve(e))}function Me(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const He=/transform|translate|scale|rotate|perspective|filter/,De=/paint|layout|strict|content/,Ce=e=>!!e&&"none"!==e;let ke;function Oe(e){const t=Se(e)?Fe(e):e;return Ce(t.transform)||Ce(t.translate)||Ce(t.scale)||Ce(t.rotate)||Ce(t.perspective)||!Pe()&&(Ce(t.backdropFilter)||Ce(t.filter))||He.test(t.willChange||"")||De.test(t.contain||"")}function Pe(){return null==ke&&(ke="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ke}function We(e){return/^(html|body|#document)$/.test(ve(e))}function Fe(e){return be(e).getComputedStyle(e)}function Ne(e){return Se(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ze(e){if("html"===ve(e))return e;const t=e.assignedSlot||e.parentNode||Le(e)&&e.host||xe(e);return Le(t)?t.host:t}function $e(e){const t=ze(e);return We(t)?e.ownerDocument?e.ownerDocument.body:e.body:Te(t)&&Ae(t)?t:$e(t)}function Be(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=$e(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),l=be(r);if(i){const e=_e(l);return t.concat(l,l.visualViewport||[],Ae(r)?r:[],e&&n?Be(e):[])}return t.concat(r,Be(r,[],n))}function _e(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function qe(e){const t=Fe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Te(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=J(n)!==i||J(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function Ie(e){return Se(e)?e:e.contextElement}function Ve(e){const t=Ie(e);if(!Te(t))return Q(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=qe(t);let l=(i?J(n.width):n.width)/o,a=(i?J(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const je=Q(0);function Xe(e){const t=be(e);return Pe()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:je}function Ye(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=Ie(e);let l=Q(1);t&&(o?Se(o)&&(l=Ve(o)):l=Ve(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==be(e))&&t}(i,n,o)?Xe(i):Q(0);let s=(r.left+a.x)/l.x,c=(r.top+a.y)/l.y,u=r.width/l.x,f=r.height/l.y;if(i){const e=be(i),t=o&&Se(o)?be(o):o;let n=e,r=_e(n);for(;r&&o&&t!==n;){const e=Ve(r),t=r.getBoundingClientRect(),o=Fe(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,l=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,f*=e.y,s+=i,c+=l,n=be(r),r=_e(n)}}return he({width:u,height:f,x:s,y:c})}function Ge(e,t){const n=Ne(e).scrollLeft;return t?t.left+n:Ye(xe(e)).left+n}function Je(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ge(e,n),y:n.top+t.scrollTop}}function Ke(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=be(e),o=xe(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,s=0;if(r){i=r.width,l=r.height;const e=Pe();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,s=r.offsetTop)}const c=Ge(o);if(c<=0){const e=o.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(o.clientWidth-t.clientWidth-r);l<=25&&(i-=l)}else c<=25&&(i+=c);return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)o=function(e){const t=xe(e),n=Ne(e),o=e.ownerDocument.body,r=G(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=G(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+Ge(e);const a=-n.scrollTop;return"rtl"===Fe(o).direction&&(l+=G(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}(xe(e));else if(Se(t))o=function(e,t){const n=Ye(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=Te(e)?Ve(e):Q(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=Xe(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return he(o)}function Qe(e,t){const n=ze(e);return!(n===t||!Se(n)||We(n))&&("fixed"===Fe(n).position||Qe(n,t))}function Ue(e,t,n){const o=Te(t),r=xe(t),i="fixed"===n,l=Ye(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=Q(0);function c(){s.x=Ge(r)}if(o||!o&&!i)if(("body"!==ve(t)||Ae(r))&&(a=Ne(t)),o){const e=Ye(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else r&&c();i&&!o&&r&&c();const u=!r||o||i?Q(0):Je(r,a);return{x:l.left+a.scrollLeft-s.x-u.x,y:l.top+a.scrollTop-s.y-u.y,width:l.width,height:l.height}}function Ze(e){return"static"===Fe(e).position}function et(e,t){if(!Te(e)||"fixed"===Fe(e).position)return null;if(t)return t(e);let n=e.offsetParent;return xe(e)===n&&(n=n.ownerDocument.body),n}function tt(e,t){const n=be(e);if(Me(e))return n;if(!Te(e)){let t=ze(e);for(;t&&!We(t);){if(Se(t)&&!Ze(t))return t;t=ze(t)}return n}let o=et(e,t);for(;o&&Re(o)&&Ze(o);)o=et(o,t);return o&&We(o)&&Ze(o)&&!Oe(o)?n:o||function(e){let t=ze(e);for(;Te(t)&&!We(t);){if(Oe(t))return t;if(Me(t))return null;t=ze(t)}return null}(e)||n}const nt={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,l=xe(o),a=!!t&&Me(t.floating);if(o===l||a&&i)return n;let s={scrollLeft:0,scrollTop:0},c=Q(1);const u=Q(0),f=Te(o);if((f||!f&&!i)&&(("body"!==ve(o)||Ae(l))&&(s=Ne(o)),f)){const e=Ye(o);c=Ve(o),u.x=e.x+o.clientLeft,u.y=e.y+o.clientTop}const p=!l||f||i?Q(0):Je(l,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-s.scrollTop*c.y+u.y+p.y}},getDocumentElement:xe,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?Me(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=Be(e,[],!1).filter(e=>Se(e)&&"body"!==ve(e)),r=null;const i="fixed"===Fe(e).position;let l=i?ze(e):e;for(;Se(l)&&!We(l);){const t=Fe(l),n=Oe(l);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&("absolute"===r.position||"fixed"===r.position)||Ae(l)&&!n&&Qe(e,l))?o=o.filter(e=>e!==l):r=t,l=ze(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],l=Ke(t,i[0],r);let a=l.top,s=l.right,c=l.bottom,u=l.left;for(let e=1;e<i.length;e++){const n=Ke(t,i[e],r);a=G(n.top,a),s=Y(n.right,s),c=Y(n.bottom,c),u=G(n.left,u)}return{width:s-u,height:c-a,x:u,y:a}},getOffsetParent:tt,getElementRects:async function(e){const t=this.getOffsetParent||tt,n=this.getDimensions,o=await n(e.floating);return{reference:Ue(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=qe(e);return{width:t,height:n}},getScale:Ve,isElement:Se,isRTL:function(e){return"rtl"===Fe(e).direction}};function ot(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function rt(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=o,c=Ie(e),u=r||i?[...c?Be(c):[],...t?Be(t):[]]:[];u.forEach(e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const f=c&&a?function(e,t){let n,o=null;const r=xe(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function l(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),i();const c=e.getBoundingClientRect(),{left:u,top:f,width:p,height:d}=c;if(a||t(),!p||!d)return;const h={rootMargin:-K(f)+"px "+-K(r.clientWidth-(u+p))+"px "+-K(r.clientHeight-(f+d))+"px "+-K(u)+"px",threshold:G(0,Y(1,s))||1};let m=!0;function g(t){const o=t[0].intersectionRatio;if(o!==s){if(!m)return l();o?l(!1,o):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==o||ot(c,e.getBoundingClientRect())||l(),m=!1}try{o=new IntersectionObserver(g,{...h,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,h)}o.observe(e)}(!0),i}(c,n):null;let p,d=-1,h=null;l&&(h=new ResizeObserver(e=>{let[o]=e;o&&o.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),c&&!s&&h.observe(c),t&&h.observe(t));let m=s?Ye(e):null;return s&&function t(){const o=Ye(e);m&&!ot(m,o)&&n();m=o,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=h)||e.disconnect(),h=null,s&&cancelAnimationFrame(p)}}const it=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:l,middlewareData:a}=t,s=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=te(n),a=ne(n),s="y"===ie(n),c=we.has(l)?-1:1,u=i&&s?-1:1,f=ee(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:h}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&"number"==typeof h&&(d="end"===a?-1*h:h),s?{x:d*u,y:p*c}:{x:p*c,y:d*u}}(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:l}}}}},lt=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:i}=t,{mainAxis:l=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=ee(e,t),u={x:n,y:o},f=await i.detectOverflow(t,c),p=ie(te(r)),d=oe(p);let h=u[d],m=u[p];if(l){const e="y"===d?"bottom":"right";h=Z(h+f["y"===d?"top":"left"],h,h-f[e])}if(a){const e="y"===p?"bottom":"right";m=Z(m+f["y"===p?"top":"left"],m,m-f[e])}const g=s.fn({...t,[d]:h,[p]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[d]:l,[p]:a}}}}}},at=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=ee(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const w=te(r),y=ie(a),v=te(a)===a,b=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=p||(v||!m?[de(a)]:function(e){const t=de(e);return[ae(e),t,ae(t)]}(a)),E="none"!==h;!p&&E&&x.push(...pe(a,m,h,b));const S=[a,...x],T=await s.detectOverflow(t,g),L=[];let A=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&L.push(T[w]),f){const e=function(e,t,n){void 0===n&&(n=!1);const o=ne(e),r=le(e),i=re(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=de(l)),[l,de(l)]}(r,l,b);L.push(T[e[0]],T[e[1]])}if(A=[...A,{placement:r,overflows:L}],!L.every(e=>e<=0)){var R,M;const e=((null==(R=i.flip)?void 0:R.index)||0)+1,t=S[e];if(t){if(!("alignment"===f&&y!==ie(t))||A.every(e=>ie(e.placement)!==y||e.overflows[0]>0))return{data:{index:e,overflows:A},reset:{placement:t}}}let n=null==(M=A.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:M.placement;if(!n)switch(d){case"bestFit":{var H;const e=null==(H=A.filter(e=>{if(E){const t=ie(e.placement);return t===y||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:H[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},st=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:i,platform:l,elements:a}=t,{apply:s=()=>{},...c}=ee(e,t),u=await l.detectOverflow(t,c),f=te(r),p=ne(r),d="y"===ie(r),{width:h,height:m}=i.floating;let g,w;"top"===f||"bottom"===f?(g=f,w=p===(await(null==l.isRTL?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(w=f,g="end"===p?"top":"bottom");const y=m-u.top-u.bottom,v=h-u.left-u.right,b=Y(m-u[g],y),x=Y(h-u[w],v),E=!t.middlewareData.shift;let S=b,T=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(T=v),null!=(o=t.middlewareData.shift)&&o.enabled.y&&(S=y),E&&!p){const e=G(u.left,0),t=G(u.right,0),n=G(u.top,0),o=G(u.bottom,0);d?T=h-2*(0!==e||0!==t?e+t:G(u.left,u.right)):S=m-2*(0!==n||0!==o?n+o:G(u.top,u.bottom))}await s({...t,availableWidth:T,availableHeight:S});const L=await l.getDimensions(a.floating);return h!==L.width||m!==L.height?{reset:{rects:!0}}:{}}}},ct=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:l}=t,{offset:a=0,mainAxis:s=!0,crossAxis:c=!0}=ee(e,t),u={x:n,y:o},f=ie(r),p=oe(f);let d=u[p],h=u[f];const m=ee(a,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){const e="y"===p?"height":"width",t=i.reference[p]-i.floating[e]+g.mainAxis,n=i.reference[p]+i.reference[e]-g.mainAxis;d<t?d=t:d>n&&(d=n)}if(c){var w,y;const e="y"===p?"width":"height",t=we.has(te(r)),n=i.reference[f]-i.floating[e]+(t&&(null==(w=l.offset)?void 0:w[f])||0)+(t?0:g.crossAxis),o=i.reference[f]+i.reference[e]+(t?0:(null==(y=l.offset)?void 0:y[f])||0)-(t?g.crossAxis:0);h<n?h=n:h>o&&(h=o)}return{[p]:d,[f]:h}}}},ut=(e,t,n)=>{const o=new Map,r={platform:nt,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=l.detectOverflow?l:{...l,detectOverflow:ge},s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:f}=me(c,o,s),p=o,d=0;const h={};for(let n=0;n<i.length;n++){const m=i[n];if(!m)continue;const{name:g,fn:w}=m,{x:y,y:v,data:b,reset:x}=await w({x:u,y:f,initialPlacement:o,placement:p,strategy:r,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=y?y:u,f=null!=v?v:f,h[g]={...h[g],...b},x&&d<50&&(d++,"object"==typeof x&&(x.placement&&(p=x.placement),x.rects&&(c=!0===x.rects?await l.getElementRects({reference:e,floating:t,strategy:r}):x.rects),({x:u,y:f}=me(c,p,s))),n=-1)}return{x:u,y:f,placement:p,strategy:r,middlewareData:h}})(e,t,{...r,platform:i})};t()&&!(typeof HTMLElement<"u"&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype)&&function(){if(typeof window>"u")return;function e(e){return e?.includes(":popover-open")&&(e=e.replace(I,"$1.\\:popover-open")),e}window.ToggleEvent=window.ToggleEvent||c,q(Document.prototype,"querySelector",e),q(Document.prototype,"querySelectorAll",e),q(Element.prototype,"querySelector",e),q(Element.prototype,"querySelectorAll",e),q(Element.prototype,"matches",e),q(Element.prototype,"closest",e),q(DocumentFragment.prototype,"querySelectorAll",e),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;let e=(this.getAttribute("popover")||"").toLowerCase();return""===e||"auto"==e?"auto":"hint"==e?"hint":"manual"},set(e){null===e?this.removeAttribute("popover"):this.setAttribute("popover",e)}},showPopover:{enumerable:!0,configurable:!0,value(e={}){k(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){O(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(e={}){return"boolean"==typeof e&&(e={force:e}),"showing"===w.get(this)&&void 0===e.force||!1===e.force?O(this,!0,!0):(void 0===e.force||!0===e.force)&&k(this),"showing"===w.get(this)}}});let t=Element.prototype.attachShadow;t&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(e){let n=t.call(this,e);return X(n),n}}});let n=HTMLElement.prototype.attachInternals;n&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){let e=n.call(this);return e.shadowRoot&&X(e.shadowRoot),e}}});let o=new WeakMap;function r(e){Object.defineProperties(e.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(e){if(null===e)this.removeAttribute("popovertarget"),o.delete(this);else{if(!(e instanceof Element))throw TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),o.set(this,e)}},get(){if("button"!==this.localName&&"input"!==this.localName||"input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type||this.disabled||this.form&&"submit"===this.type)return null;let e=o.get(this);if(e&&e.isConnected)return e;if(e&&!e.isConnected)return o.delete(this),null;let t=A(this),n=this.getAttribute("popovertarget");return(t instanceof Document||t instanceof _)&&n&&t.getElementById(n)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){let e=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===e||"hide"===e?e:"toggle"},set(e){this.setAttribute("popovertargetaction",e)}}})}r(HTMLButtonElement),r(HTMLInputElement);let i=e=>{if(e.defaultPrevented)return;let t=e.composedPath(),n=t[0];if(!(n instanceof Element)||n?.shadowRoot)return;let o=A(n);if(!(o instanceof _||o instanceof Document))return;let r=t.find(e=>e.matches?.call(e,"[popovertargetaction],[popovertarget]"));return r?(function(e){let t=e.popoverTargetElement;if(!(t instanceof HTMLElement))return;let n=y(t);"show"===e.popoverTargetAction&&"showing"===n||"hide"===e.popoverTargetAction&&"hidden"===n||("showing"===n?O(t,!0,!0):x(t,!1)&&(v.set(t,e),k(t)))}(r),void e.preventDefault()):void 0},l=e=>{let t=e.key,n=e.target;!e.defaultPrevented&&n&&("Escape"===t||"Esc"===t)&&F(n.ownerDocument,!0,!0)};(e=>{e.addEventListener("click",i),e.addEventListener("keydown",l),e.addEventListener("pointerdown",z),e.addEventListener("pointerup",z)})(document),X(document)}();const ft="data-placement",pt="data-autoplacement",dt=new Map;function ht(e){let{newState:t,oldState:r,target:i,source:l=e.detail}=e,a=i instanceof HTMLElement&&null!==n(i,"popover")&&o(i,"--_ds-floating");if(!a)return;if("closed"===t)return dt.get(i)?.();if(!l){let e=i.getRootNode(),t=`[popovertarget="${i.id}"],[commandfor="${i.id}"]`;l=i.id&&e?.querySelector?.(t)||void 0}if(!l||l===i||r&&r===t)return;i.style.scrollMarginBottom="var(--_ds-floating-arrow-size)";let s=o(i,"--_ds-floating-overscroll"),c=n(i,ft)||n(l,ft)||a,u=n(i,pt)||n(l,pt),f=parseFloat(o(i,"scroll-margin-bottom"))||0,p=c.match(/left|right/gi)?"Height":"Width",d=l[`offset${p}`]/2+f;if("none"===c)return;let h={strategy:"absolute",placement:c,middleware:[it(f),lt({padding:10,limiter:ct({offset:{mainAxis:d}})}),wt(),..."false"===u?[]:[at({padding:10,crossAxis:!1})],...s?[st({apply({availableHeight:e}){"fit"===s&&(i.style.width=`${l.offsetWidth}px`),i.style.maxHeight=`${Math.max(50,e-20)}px`}})]:[]]},m=rt(l,i,async()=>{if(!l?.isConnected)return dt.get(i)?.();let{x:e,y:t}=await ut(l,i,h);i.style.translate=`${e}px ${t}px`});dt.set(i,()=>dt.delete(i)&&m())}let mt;const gt=({type:e})=>{if("mousedown"===e&&(mt=!1),"scroll"===e&&!1===mt&&(mt=!0),"mouseup"===e&&mt)for(let[e]of dt)e.showPopover()};l("popover",()=>[r(document,"mousedown scroll mouseup",gt,!0),r(document,"toggle ds-toggle-source",ht,e)]);const wt=()=>({name:"arrowPseudo",fn(e){let t=e.elements.floating,o=e.rects.reference,r=`${Math.round(o.width/2+o.x-e.x)}px`,i=`${Math.round(o.height/2+o.y-e.y)}px`;return t.style.setProperty("--_ds-floating-arrow-x",r),t.style.setProperty("--_ds-floating-arrow-y",i),n(t,"data-floating",e.placement),e}});
|