@trendyol/baklava 2.0.0-beta.80 → 2.0.0-beta.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/baklava-react.d.ts +5 -3
- package/dist/baklava-react.d.ts.map +1 -1
- package/dist/baklava-react.js +1 -1
- package/dist/baklava-react.js.map +2 -2
- package/dist/baklava.js +1 -1
- package/dist/{chunk-TTMNJLGU.js → chunk-2FBI46AY.js} +2 -2
- package/dist/chunk-2FBI46AY.js.map +7 -0
- package/dist/chunk-3B64VOWB.js +2 -0
- package/dist/{chunk-AEVRCHAZ.js.map → chunk-3B64VOWB.js.map} +4 -4
- package/dist/chunk-AYSPIQ23.js +26 -0
- package/dist/chunk-AYSPIQ23.js.map +7 -0
- package/dist/{chunk-2E7PEDV6.js → chunk-BD5KXTYS.js} +2 -2
- package/dist/chunk-DJOD4BTL.js +2 -0
- package/dist/chunk-DJOD4BTL.js.map +7 -0
- package/dist/{chunk-F3CGCLRX.js → chunk-DSM6T5MC.js} +2 -2
- package/dist/{chunk-IBKG5DOR.js → chunk-J774WKKH.js} +3 -4
- package/dist/{chunk-IBKG5DOR.js.map → chunk-J774WKKH.js.map} +2 -2
- package/dist/{chunk-MWMCAJBW.js → chunk-KUOLIJCN.js} +2 -2
- package/dist/chunk-MCWRM3WC.js +19 -0
- package/dist/chunk-MCWRM3WC.js.map +7 -0
- package/dist/chunk-RST5NVHY.js +2 -0
- package/dist/chunk-RST5NVHY.js.map +7 -0
- package/dist/chunk-THIPCHAK.js +13 -0
- package/dist/chunk-THIPCHAK.js.map +7 -0
- package/dist/chunk-VAF7XRXM.js +42 -0
- package/dist/chunk-VAF7XRXM.js.map +7 -0
- package/dist/components/button/bl-button.js +1 -1
- package/dist/components/checkbox-group/bl-checkbox-group.js +1 -1
- package/dist/components/checkbox-group/checkbox/bl-checkbox.js +1 -1
- package/dist/components/dialog/bl-dialog.js +1 -1
- package/dist/components/drawer/bl-drawer.js +1 -1
- package/dist/components/dropdown/bl-dropdown.js +1 -1
- package/dist/components/dropdown/item/bl-dropdown-item.js +1 -1
- package/dist/components/input/bl-input.js +1 -1
- package/dist/components/pagination/bl-pagination.d.ts.map +1 -1
- package/dist/components/pagination/bl-pagination.js +1 -1
- package/dist/components/radio-group/bl-radio-group.js +1 -1
- package/dist/components/radio-group/radio/bl-radio.js +1 -1
- package/dist/components/select/bl-select.d.ts +48 -18
- package/dist/components/select/bl-select.d.ts.map +1 -1
- package/dist/components/select/bl-select.js +1 -1
- package/dist/components/select/option/bl-select-option.d.ts +24 -3
- package/dist/components/select/option/bl-select-option.d.ts.map +1 -1
- package/dist/components/select/option/bl-select-option.js +1 -1
- package/dist/components/textarea/bl-textarea.js +1 -1
- package/dist/custom-elements.json +61 -3
- package/package.json +3 -3
- package/dist/chunk-4WJJQP4L.js +0 -13
- package/dist/chunk-4WJJQP4L.js.map +0 -7
- package/dist/chunk-7K5FMQLQ.js +0 -2
- package/dist/chunk-7K5FMQLQ.js.map +0 -7
- package/dist/chunk-7R56R3UM.js +0 -35
- package/dist/chunk-7R56R3UM.js.map +0 -7
- package/dist/chunk-AEVRCHAZ.js +0 -2
- package/dist/chunk-TAU2CM6U.js +0 -26
- package/dist/chunk-TAU2CM6U.js.map +0 -7
- package/dist/chunk-TTMNJLGU.js.map +0 -7
- package/dist/chunk-ZAU7BBDB.js +0 -19
- package/dist/chunk-ZAU7BBDB.js.map +0 -7
- /package/dist/{chunk-2E7PEDV6.js.map → chunk-BD5KXTYS.js.map} +0 -0
- /package/dist/{chunk-F3CGCLRX.js.map → chunk-DSM6T5MC.js.map} +0 -0
- /package/dist/{chunk-MWMCAJBW.js.map → chunk-KUOLIJCN.js.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/select/bl-select.css", "../src/components/select/bl-select.ts"],
|
|
4
|
+
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{width:200px;display:inline-block}.select-wrapper{width:100%;position:relative;display:flex;flex-direction:column;gap:var(--bl-size-3xs);--padding-vertical:var(--bl-size-2xs);--padding-horizontal:var(--bl-size-xs);--background-color:var(--bl-color-primary-background);--border-color:var(--bl-color-border);--border-focus-color:var(--bl-color-primary-hover);--icon-color:var(--bl-color-content-tertiary);--text-color:var(--bl-color-content-primary);--label-color:var(--bl-color-content-secondary);--placeholder-color:var(--bl-color-content-tertiary);--height:var(--bl-size-2xl);--menu-padding:0 var(--bl-size-m);--menu-margin-top:var(--bl-size-2xs);--font-size:var(--bl-font-size-m);--disabled-color:var(--bl-color-tertiary);--z-index:100;--menu-height:250px;--popover-position:var(--bl-popover-position,fixed)}:host([size='large']) .select-wrapper{--height:var(--bl-size-3xl);--padding-vertical:var(--bl-size-xs);--padding-horizontal:var(--bl-size-m)}:host([size='small']) .select-wrapper{--height:var(--bl-size-xl);--padding-vertical:var(--bl-size-3xs);--padding-horizontal:var(--bl-size-xs);--font-size:var(--bl-font-size-s)}:host([disabled]) .select-wrapper{--placeholder-color:var(--bl-color-content-passive)}.dirty.invalid{--border-color:var(--bl-color-danger);--border-focus-color:var(--bl-color-danger-hover);--label-color:var(--bl-color-danger)}.select-input{display:flex;align-items:center;justify-content:space-between;cursor:pointer;box-sizing:border-box;height:var(--height);border:solid 1px var(--border-color);font:var(--bl-font-title-3-regular);padding:0 var(--padding-horizontal);border-radius:var(--bl-border-radius-s);color:var(--text-color);-webkit-user-select:none;user-select:none}.placeholder{color:var(--placeholder-color);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}.select-wrapper.selected .placeholder,:host([label]:not([label-fixed])) .select-wrapper:not(.select-open) .placeholder{display:none}.remove-all{display:none}.remove-all::after{content:'';position:absolute;left:1.5rem;bottom:4px;height:1rem;border-left:1px solid var(--bl-color-border)}.selected .remove-all{display:block}:host([disabled]) .remove-all,:host([disabled]) .remove-all::after{display:none}.dropdown-icon{font-size:var(--bl-font-size-m)}.dropdown-icon.open{display:none}.select-open .dropdown-icon.open{display:inline-block}.select-open .dropdown-icon.closed{display:none}.selected .dropdown-icon{--icon-color:var(--bl-color-secondary)}:host([disabled]) .dropdown-icon{--icon-color:var(--bl-color-content-passive)}.select-open .select-input,.select-input:focus-visible{border:solid 1px var(--border-focus-color);outline:0}:host([disabled]){cursor:not-allowed}:host([disabled]) .select-input{pointer-events:none;background-color:var(--disabled-color)}.select-input .selected-options{flex:1;padding:0;margin:0;list-style:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.selected-options li{display:inline;font-size:var(--font-size);color:var(--text-color)}.selected-options li:not(:last-child)::after{content:', '}.select-input:not(.has-overflowed-options) .additional-selection-count{display:none}:host([disabled]) .selected-options li{color:var(--bl-color-content-passive)}.select-input .actions{display:flex;align-items:center;justify-content:center;gap:var(--bl-size-2xs);margin-left:var(--bl-size-2xs)}.popover{--left:0;--top:0;position:var(--popover-position);border:solid 1px var(--border-color);background-color:var(--background-color);font:var(--bl-font-title-3-regular);border-radius:var(--bl-border-radius-s);padding:var(--menu-padding);outline:0;box-sizing:border-box;max-height:var(--menu-height);overflow-y:auto;display:none;flex-direction:column;z-index:var(--z-index);width:100%;top:var(--top);left:var(--left)}.select-open .popover{display:flex;border:solid 1px var(--border-focus-color)}bl-icon{color:var(--icon-color)}label{position:absolute;display:block;top:var(--padding-vertical);left:var(--padding-horizontal);right:calc(var(--bl-size-2xs) + var(--bl-size-m) + var(--bl-size-2xs));max-width:max-content;transition:all ease-in .2s;pointer-events:none;font:var(--bl-font-title-3-regular);font-size:var(--font-size);color:var(--placeholder-color);padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:where(.select-open,.selected) label{top:0;left:var(--bl-size-2xs);transform:translateY(-50%);font:var(--bl-font-caption);color:var(--label-color);padding:0 var(--bl-size-3xs);background-color:var(--bl-color-primary-background);pointer-events:initial;right:var(--padding-horizontal)}:host([label-fixed]) label{position:static;padding:0;transition:none;transform:none;pointer-events:initial;font:var(--bl-font-caption);color:var(--label-color)}.hint{display:none;font:var(--bl-font-body-text-3)}.hint p{padding:0;margin:0}.error-icon,.invalid-text{display:none}.dirty.invalid label,.invalid-text,.error-icon{color:var(--bl-color-danger)}.help-text{color:var(--bl-color-content-secondary)}.select-open .help-text,.select-open .invalid-text{visibility:hidden}:host([help-text]) .hint,.dirty.invalid .hint{display:block}.dirty.invalid .invalid-text{display:block}.dirty.invalid .help-text{display:none}`;\nexport default styles;\n", "import { autoUpdate, computePosition, flip, MiddlewareArguments, offset, size } from '@floating-ui/dom';\nimport { FormControlMixin, requiredValidator } from '@open-wc/form-control';\nimport { FormValue } from '@open-wc/form-helpers';\nimport 'element-internals-polyfill';\nimport { CSSResultGroup, html, LitElement, PropertyValues } from 'lit';\nimport { customElement, property, query, queryAll, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { event, EventDispatcher } from '../../utilities/event';\nimport '../icon/bl-icon';\nimport style from '../select/bl-select.css';\nimport '../select/option/bl-select-option';\nimport type BlSelectOption from './option/bl-select-option';\n\nexport interface ISelectOption<T> {\n value: T;\n text: string;\n selected: boolean;\n}\n\nexport type SelectSize = 'medium' | 'large' | 'small';\n\nexport type CleanUpFunction = () => void;\n\n\n/**\n * @tag bl-select\n * @summary Baklava Select component\n *\n * @cssproperty --bl-popover-position - Sets the positioning strategy of select popover. You can set it as `absolute` if you need to show popover relative to its trigger element. Default value is `fixed`\n */\n@customElement('bl-select')\nexport default class BlSelect<ValueType extends FormValue = string> extends FormControlMixin(LitElement) {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n static formControlValidators = [requiredValidator];\n\n /**\n * Sets name of the select field\n */\n @property()\n name: string;\n\n private _value: ValueType | ValueType[] | null;\n\n private _initialValue: ValueType | ValueType[] | null;\n\n /**\n * Sets the value of the select\n */\n @property()\n get value(): ValueType | ValueType[] | null {\n return this._value;\n }\n\n set value(val: ValueType | ValueType[] | null) {\n this._value = val;\n\n if (Array.isArray(val)) {\n const formData = new FormData();\n val.forEach((option) => formData.append(this.name, `${option}`));\n this.setValue(formData);\n } else {\n this.setValue(val);\n }\n\n this.setOptionsSelected();\n }\n\n shouldFormValueUpdate(): boolean {\n return this.value !== null && this.value !== '';\n }\n\n /* Declare reactive properties */\n /**\n * Sets the label value\n */\n @property({ reflect: true })\n label?: string;\n\n /**\n * Sets the placeholder value. If left blank, the label value (if specified) is set as placeholder.\n */\n @property({})\n placeholder?: string;\n\n /**\n * Sets the size value. Select component's height value will be changed accordingly\n */\n @property({ type: String, reflect: true })\n size: SelectSize = 'medium';\n\n /**\n * When option is not selected, shows component in error state\n */\n @property({ type: Boolean, reflect: true })\n required = false;\n\n /**\n * Shows the component in disabled state.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Allows multiple options to be selected\n */\n @property({ type: Boolean })\n multiple = false;\n\n /**\n * Makes label as fixed positioned\n */\n @property({ type: Boolean, attribute: 'label-fixed', reflect: true })\n labelFixed = false;\n\n /**\n * Adds help text\n */\n @property({ type: String, attribute: 'help-text' })\n helpText?: string;\n\n /**\n * Set custom error message\n */\n @property({ type: String, attribute: 'invalid-text' })\n customInvalidText?: string;\n\n /* Declare internal reactive properties */\n @state()\n private _isPopoverOpen = false;\n\n\n @state()\n private _additionalSelectedOptionCount = 0;\n\n @query('.selected-options')\n private selectedOptionsContainer!: HTMLElement;\n\n @queryAll('.selected-options li')\n private selectedOptionsItems!: NodeListOf<HTMLElement>;\n\n @query('.popover')\n private _popover: HTMLElement;\n\n @query('.select-input')\n private _selectInput: HTMLElement;\n\n /**\n * Fires when selection changes\n */\n @event('bl-select') private _onBlSelect: EventDispatcher<ISelectOption<ValueType>[]>;\n\n private _connectedOptions: BlSelectOption<ValueType>[] = [];\n\n private _cleanUpPopover: CleanUpFunction | null = null;\n\n private setOptionsSelected() {\n this._connectedOptions\n .forEach(\n (option) => option.selected = (\n this.value === option.value ||\n (Array.isArray(this.value) && this.value.includes(option.value))\n )\n );\n\n this._selectedOptions = [...this.options\n .filter(option => option.selected)\n ];\n }\n\n get options() {\n return this._connectedOptions;\n }\n\n get opened() {\n return this._isPopoverOpen;\n }\n\n @state()\n private _selectedOptions: BlSelectOption<ValueType>[] = [];\n\n @state()\n private dirty = false;\n\n get selectedOptions(): BlSelectOption<ValueType>[] {\n return this._selectedOptions;\n }\n\n get additionalSelectedOptionCount() {\n return this._additionalSelectedOptionCount;\n }\n\n validityCallback(): string | void {\n if (this.customInvalidText) {\n return this.customInvalidText;\n }\n const select = document.createElement('select');\n select.required = this.required;\n\n return select.validationMessage;\n }\n\n reportValidity() {\n this.dirty = true;\n return this.checkValidity();\n }\n\n resetFormControl(): void {\n this.value = this._initialValue;\n }\n\n @query('.select-input')\n validationTarget: HTMLElement;\n\n open() {\n this._isPopoverOpen = true;\n this._setupPopover();\n document.addEventListener('click', this._interactOutsideHandler, true);\n document.addEventListener('focus', this._interactOutsideHandler, true);\n }\n\n close() {\n this._isPopoverOpen = false;\n this.focusedOptionIndex = -1;\n this._cleanUpPopover && this._cleanUpPopover();\n document.removeEventListener('click', this._interactOutsideHandler, true);\n document.removeEventListener('focus', this._interactOutsideHandler, true);\n }\n\n private _interactOutsideHandler = (event: MouseEvent | FocusEvent) => {\n const eventPath = event.composedPath() as HTMLElement[];\n\n if (!eventPath?.find(el => el.tagName === 'BL-SELECT')?.contains(this)) {\n this.close();\n }\n };\n\n private _setupPopover() {\n this._cleanUpPopover = autoUpdate(this._selectInput, this._popover, () => {\n computePosition(this._selectInput, this._popover, {\n placement: 'bottom',\n strategy: 'fixed',\n middleware: [\n flip(),\n offset(8),\n size({\n apply(args: MiddlewareArguments) {\n Object.assign(args.elements.floating.style, {\n width: `${args.elements.reference.getBoundingClientRect().width}px`,\n });\n },\n }),\n ],\n }).then(({ x, y }) => {\n this._popover.style.setProperty('--left', `${x}px`);\n this._popover.style.setProperty('--top', `${y}px`);\n });\n });\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n\n this.form?.addEventListener('submit', (e: SubmitEvent) => {\n if (!this.reportValidity()) {\n e.preventDefault();\n }\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this._cleanUpPopover && this._cleanUpPopover();\n }\n\n private inputTemplate() {\n const inputSelectedOptions = html`<ul class=\"selected-options\">\n ${this._selectedOptions.map(item => html`<li>${item.textContent}</li>`)}\n </ul>`;\n const removeButton = html`<bl-button\n class=\"remove-all\"\n size=\"small\"\n variant=\"tertiary\"\n kind=\"neutral\"\n icon=\"close\"\n @click=${this._onClickRemove}></bl-button>`;\n\n return html`<div\n class=${classMap({\n 'select-input': true,\n 'has-overflowed-options': this._additionalSelectedOptionCount > 0\n })}\n tabindex=\"${this.disabled ? '-1' : 0}\"\n @click=${this.togglePopover}\n >\n <span class=\"placeholder\">${this.placeholder}</span>\n ${inputSelectedOptions}\n <span class=\"additional-selection-count\">+${this._additionalSelectedOptionCount}</span>\n <div class=\"actions\">\n ${this.multiple ? removeButton : null}\n <bl-icon\n class=\"dropdown-icon open\"\n name=\"arrow_up\"\n ></bl-icon>\n\n <bl-icon\n class=\"dropdown-icon closed\"\n name=\"arrow_down\"\n ></bl-icon>\n </div>\n </div>`;\n }\n\n render() {\n const invalidMessage = !this.checkValidity()\n ? html`<p id=\"errorMessage\" aria-live=\"polite\" class=\"invalid-text\">\n ${this.validationMessage}\n </p>`: '';\n\n const helpMessage = this.helpText && !invalidMessage\n ? html`<p class=\"help-text\">${this.helpText}</p>` : '';\n\n const label = this.label\n ? html`<label>${this.label}</label>` : '';\n\n return html`<div\n class=${classMap({\n 'select-wrapper': true,\n 'select-open': this.opened,\n 'selected': this._selectedOptions.length > 0,\n 'invalid': !this.validity.valid,\n 'dirty': this.dirty\n })}\n @keydown=${this.handleKeydown}\n >\n ${label}\n ${this.inputTemplate()}\n <div class=\"popover\" tabindex=\"${ifDefined(this._isPopoverOpen ? undefined : '-1')}\" @bl-select-option=${this._handleSelectOptionEvent}>\n <slot></slot>\n </div>\n <div class=\"hint\">${invalidMessage} ${helpMessage}</div>\n </div> `;\n }\n\n private focusedOptionIndex = -1;\n\n private handleKeydown(event: KeyboardEvent) {\n if (this.focusedOptionIndex === -1 && ['Enter', 'Space'].includes(event.code)) {\n this.togglePopover();\n event.preventDefault();\n } else if (this._isPopoverOpen === false && ['ArrowDown', 'ArrowUp'].includes(event.code)) {\n this.open();\n event.preventDefault();\n } else if (event.code === 'Escape') {\n this.close();\n event.preventDefault();\n } else if (this._isPopoverOpen && ['ArrowDown', 'ArrowUp'].includes(event.code)) {\n event.code === 'ArrowDown' && this.focusedOptionIndex++;\n event.code === 'ArrowUp' && this.focusedOptionIndex--;\n\n // Don't exceed array indexes\n this.focusedOptionIndex = Math.max(\n 0,\n Math.min(this.focusedOptionIndex, this.options.length - 1)\n );\n\n this.options[this.focusedOptionIndex].focus();\n\n event.preventDefault();\n }\n\n }\n\n private togglePopover() {\n this._isPopoverOpen ? this.close() : this.open();\n }\n\n private _handleSelectEvent() {\n this._onBlSelect(this._selectedOptions.map(option => ({\n value: option.value,\n selected: option.selected,\n text: option.textContent\n } as ISelectOption<ValueType>)));\n }\n\n private _handleSingleSelect(optionItem: BlSelectOption<ValueType>) {\n this.value = optionItem.value;\n\n this._handleSelectEvent();\n this._isPopoverOpen = false;\n }\n\n private _handleMultipleSelect() {\n this.value = this._connectedOptions.filter((option) => option.selected).map(option => option.value);\n\n this._handleSelectEvent();\n }\n\n private _handleSelectOptionEvent(e: CustomEvent) {\n const optionItem = e.target as BlSelectOption<ValueType>;\n this.dirty = true;\n\n if (this.multiple) {\n this._handleMultipleSelect();\n } else {\n this._handleSingleSelect(optionItem);\n }\n }\n\n private _onClickRemove(e: MouseEvent) {\n e.stopPropagation();\n\n this._connectedOptions\n .filter(option => option.selected)\n .forEach(option => {\n option.selected = false;\n });\n\n this.value = null;\n this._additionalSelectedOptionCount = 0;\n this._handleSelectEvent();\n }\n\n private _checkAdditionalItemCount() {\n if (!this.multiple || !this.selectedOptionsItems || this.selectedOptionsItems.length < 2) return;\n\n const firstNonVisibleItemIndex = [...this.selectedOptionsItems]\n .findIndex((item) => item.offsetLeft > this.selectedOptionsContainer.offsetWidth);\n\n if (firstNonVisibleItemIndex > -1) {\n this._additionalSelectedOptionCount = this.selectedOptionsItems.length - firstNonVisibleItemIndex;\n } else {\n this._additionalSelectedOptionCount = 0;\n }\n }\n\n protected firstUpdated(): void {\n if (this.value === undefined) {\n this.value = '' as ValueType;\n }\n\n this._initialValue = this._value;\n }\n\n protected updated(_changedProperties: PropertyValues) {\n if (\n _changedProperties.has('multiple') &&\n typeof _changedProperties.get('multiple') === 'boolean'\n ) {\n this.value = null;\n }\n\n this._checkAdditionalItemCount();\n }\n\n /**\n * This method is used by `bl-select-option` component to register itself to bl-select.\n * @param option BlSelectOption reference to be registered\n */\n registerOption(option: BlSelectOption<ValueType>) {\n this._connectedOptions.push(option);\n\n if (option.selected) {\n if (this.multiple) {\n if (!Array.isArray(this.value)) {\n this.value = [];\n }\n this.value = [...this.value, option.value];\n } else {\n this.value = option.value;\n }\n }\n\n this.setOptionsSelected();\n this.requestUpdate();\n }\n\n /**\n * This method is used by `bl-select-option` component to unregister itself from bl-select.\n * @param option BlSelectOption reference to be unregistered\n */\n unregisterOption(option: BlSelectOption<ValueType>) {\n this._connectedOptions.splice(this._connectedOptions.indexOf(option), 1);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-select': BlSelect;\n }\n}\n"],
|
|
5
|
+
"mappings": "6YACO,IAAMA,EAASC,kkKACfC,EAAQF,EC8Bf,IAAqBG,EAArB,cAA4EC,EAAiBC,CAAU,CAAE,CAAzG,kCA4DE,UAAmB,SAMnB,cAAW,GAMX,cAAW,GAMX,cAAW,GAMX,gBAAa,GAgBb,KAAQ,eAAiB,GAIzB,KAAQ,+BAAiC,EAmBzC,KAAQ,kBAAiD,CAAC,EAE1D,KAAQ,gBAA0C,KAyBlD,KAAQ,iBAAgD,CAAC,EAGzD,KAAQ,MAAQ,GA+ChB,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S,CAAE,KAAM,OAAQ,CAAC,GA7ERpB,EA8EnB,wBAMAiC,EAAA,CADCb,EAAS,CAAE,KAAM,QAAS,UAAW,cAAe,QAAS,EAAK,CAAC,GAnFjDpB,EAoFnB,0BAMAiC,EAAA,CADCb,EAAS,CAAE,KAAM,OAAQ,UAAW,WAAY,CAAC,GAzF/BpB,EA0FnB,wBAMAiC,EAAA,CADCb,EAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,CAAC,GA/FlCpB,EAgGnB,iCAIQiC,EAAA,CADPC,EAAM,GAnGYlC,EAoGX,8BAIAiC,EAAA,CADPC,EAAM,GAvGYlC,EAwGX,8CAGAiC,EAAA,CADPE,EAAM,mBAAmB,GA1GPnC,EA2GX,wCAGAiC,EAAA,CADPb,EAAS,sBAAsB,GA7GbpB,EA8GX,oCAGAiC,EAAA,CADPE,EAAM,UAAU,GAhHEnC,EAiHX,wBAGAiC,EAAA,CADPE,EAAM,eAAe,GAnHHnC,EAoHX,4BAKoBiC,EAAA,CAA3B9B,EAAM,WAAW,GAzHCH,EAyHS,2BA6BpBiC,EAAA,CADPC,EAAM,GArJYlC,EAsJX,gCAGAiC,EAAA,CADPC,EAAM,GAxJYlC,EAyJX,qBA8BRiC,EAAA,CADCE,EAAM,eAAe,GAtLHnC,EAuLnB,gCAvLmBA,EAArBiC,EAAA,CADCb,EAAc,WAAW,GACLpB",
|
|
6
|
+
"names": ["styles", "i", "bl_select_default", "BlSelect", "FormControlMixin", "s", "event", "_a", "eventPath", "el", "bl_select_default", "val", "formData", "option", "select", "N", "z", "b", "T", "k", "args", "x", "y", "e", "inputSelectedOptions", "item", "removeButton", "o", "invalidMessage", "helpMessage", "label", "l", "optionItem", "firstNonVisibleItemIndex", "_changedProperties", "requiredValidator", "__decorateClass", "t", "i"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as a}from"../../chunk-
|
|
1
|
+
import{b as a}from"../../chunk-MCWRM3WC.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-button.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as a,d as b,e as c}from"../../chunk-
|
|
1
|
+
import{c as a,d as b,e as c}from"../../chunk-DSM6T5MC.js";import"../../chunk-EPJ347EQ.js";import"../../chunk-DJOD4BTL.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{b as blChangeEventName,a as blCheckboxGroupTag,c as default};
|
|
2
2
|
//# sourceMappingURL=bl-checkbox-group.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../../chunk-
|
|
1
|
+
import{a,b}from"../../../chunk-DSM6T5MC.js";import"../../../chunk-EPJ347EQ.js";import"../../../chunk-DJOD4BTL.js";import"../../../chunk-KPAWUBRO.js";import"../../../chunk-F3ZH5IV7.js";import"../../../chunk-RLMJN536.js";import"../../../chunk-23UFIOHV.js";import"../../../chunk-57PTZNIL.js";import"../../../chunk-NZ3RGSR6.js";export{a as blCheckboxTag,b as default};
|
|
2
2
|
//# sourceMappingURL=bl-checkbox.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-Y2EBT6QM.js";import"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-Y2EBT6QM.js";import"../../chunk-MCWRM3WC.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-dialog.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-AYSPIQ23.js";import"../../chunk-MCWRM3WC.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-drawer.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as a,d as b}from"../../chunk-WUDM5U5Z.js";import"../../chunk-KQBXYF3J.js";import"../../chunk-5ODNFE7B.js";import"../../chunk-
|
|
1
|
+
import{c as a,d as b}from"../../chunk-WUDM5U5Z.js";import"../../chunk-KQBXYF3J.js";import"../../chunk-5ODNFE7B.js";import"../../chunk-MCWRM3WC.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as blDropdownTag,b as default};
|
|
2
2
|
//# sourceMappingURL=bl-dropdown.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../../chunk-WUDM5U5Z.js";import"../../../chunk-KQBXYF3J.js";import"../../../chunk-5ODNFE7B.js";import"../../../chunk-
|
|
1
|
+
import{a,b}from"../../../chunk-WUDM5U5Z.js";import"../../../chunk-KQBXYF3J.js";import"../../../chunk-5ODNFE7B.js";import"../../../chunk-MCWRM3WC.js";import"../../../chunk-OLPYXE2P.js";import"../../../chunk-KPAWUBRO.js";import"../../../chunk-F3ZH5IV7.js";import"../../../chunk-RLMJN536.js";import"../../../chunk-23UFIOHV.js";import"../../../chunk-57PTZNIL.js";import"../../../chunk-NZ3RGSR6.js";export{a as blDropdownItemTag,b as default};
|
|
2
2
|
//# sourceMappingURL=bl-dropdown-item.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-2FBI46AY.js";import"../../chunk-RST5NVHY.js";import"../../chunk-3B64VOWB.js";import"../../chunk-EPJ347EQ.js";import"../../chunk-DJOD4BTL.js";import"../../chunk-MCWRM3WC.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bl-pagination.d.ts","sourceRoot":"","sources":["../../../src/components/pagination/bl-pagination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAIvF,OAAO,qBAAqB,CAAC;AAC7B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,qBAAqB,CAAC;AAI7B;;;GAGG;AAGH,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,UAAU;IAClD,MAAM,KAAK,MAAM,IAAI,cAAc,CAElC;IAED;;OAEG;IAEH,WAAW,SAAK;IAEhB;;OAEG;IAEH,UAAU,SAAK;IAEf;;OAEG;IAEH,YAAY,SAAM;IAElB;;OAEG;IAEH,SAAS,UAAS;IAElB;;OAEG;IAEH,WAAW,SAAW;IAEtB;;OAEG;IAEH,SAAS,UAAS;IAElB;;OAEG;IAEH,WAAW,SAAU;IAErB;;;OAGG;IAEH,mBAAmB;;;QAiBjB;IAEO,OAAO,CAAC,KAAK,CAA8B;IAEpD;;OAEG;IACiB,OAAO,CAAC,QAAQ,CAIjC;IAEH,iBAAiB;IAQjB,oBAAoB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AC,YAAY;IAIpB,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,WAAW;IA8BnB,MAAM,IAAI,cAAc;CAiCzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAC;KAC/B;CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-J774WKKH.js";import"../../chunk-2FBI46AY.js";import"../../chunk-RST5NVHY.js";import"../../chunk-VAF7XRXM.js";import"../../chunk-THIPCHAK.js";import"../../chunk-5ODNFE7B.js";import"../../chunk-3B64VOWB.js";import"../../chunk-EPJ347EQ.js";import"../../chunk-DJOD4BTL.js";import"../../chunk-MCWRM3WC.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-pagination.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as a,e as b,f as c}from"../../chunk-
|
|
1
|
+
import{d as a,e as b,f as c}from"../../chunk-BD5KXTYS.js";import"../../chunk-DJOD4BTL.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{b as blChangeEventName,a as blRadioGroupTag,c as default};
|
|
2
2
|
//# sourceMappingURL=bl-radio-group.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../../../chunk-
|
|
1
|
+
import{a,b,c}from"../../../chunk-BD5KXTYS.js";import"../../../chunk-DJOD4BTL.js";import"../../../chunk-OLPYXE2P.js";import"../../../chunk-RLMJN536.js";import"../../../chunk-23UFIOHV.js";import"../../../chunk-57PTZNIL.js";import"../../../chunk-NZ3RGSR6.js";export{b as blCheckedEventName,a as blRadioTag,c as default};
|
|
2
2
|
//# sourceMappingURL=bl-radio.js.map
|
|
@@ -1,16 +1,38 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormValue } from '@open-wc/form-helpers';
|
|
2
|
+
import 'element-internals-polyfill';
|
|
3
|
+
import { CSSResultGroup, LitElement, PropertyValues } from 'lit';
|
|
2
4
|
import '../icon/bl-icon';
|
|
3
5
|
import '../select/option/bl-select-option';
|
|
4
6
|
import type BlSelectOption from './option/bl-select-option';
|
|
5
|
-
export interface ISelectOption {
|
|
6
|
-
value:
|
|
7
|
+
export interface ISelectOption<T> {
|
|
8
|
+
value: T;
|
|
7
9
|
text: string;
|
|
8
10
|
selected: boolean;
|
|
9
11
|
}
|
|
10
12
|
export declare type SelectSize = 'medium' | 'large' | 'small';
|
|
11
13
|
export declare type CleanUpFunction = () => void;
|
|
12
|
-
|
|
14
|
+
declare const BlSelect_base: import("@open-wc/form-control").Constructor<import("@open-wc/form-control").FormControlInterface> & typeof LitElement;
|
|
15
|
+
/**
|
|
16
|
+
* @tag bl-select
|
|
17
|
+
* @summary Baklava Select component
|
|
18
|
+
*
|
|
19
|
+
* @cssproperty --bl-popover-position - Sets the positioning strategy of select popover. You can set it as `absolute` if you need to show popover relative to its trigger element. Default value is `fixed`
|
|
20
|
+
*/
|
|
21
|
+
export default class BlSelect<ValueType extends FormValue = string> extends BlSelect_base {
|
|
13
22
|
static get styles(): CSSResultGroup;
|
|
23
|
+
static formControlValidators: import("@open-wc/form-control").Validator[];
|
|
24
|
+
/**
|
|
25
|
+
* Sets name of the select field
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
private _value;
|
|
29
|
+
private _initialValue;
|
|
30
|
+
/**
|
|
31
|
+
* Sets the value of the select
|
|
32
|
+
*/
|
|
33
|
+
get value(): ValueType | ValueType[] | null;
|
|
34
|
+
set value(val: ValueType | ValueType[] | null);
|
|
35
|
+
shouldFormValueUpdate(): boolean;
|
|
14
36
|
/**
|
|
15
37
|
* Sets the label value
|
|
16
38
|
*/
|
|
@@ -48,54 +70,62 @@ export default class BlSelect extends LitElement {
|
|
|
48
70
|
*/
|
|
49
71
|
customInvalidText?: string;
|
|
50
72
|
private _isPopoverOpen;
|
|
51
|
-
private _selectedOptions;
|
|
52
73
|
private _additionalSelectedOptionCount;
|
|
53
|
-
private
|
|
54
|
-
private
|
|
55
|
-
private _selectedOptionsItems;
|
|
74
|
+
private selectedOptionsContainer;
|
|
75
|
+
private selectedOptionsItems;
|
|
56
76
|
private _popover;
|
|
57
77
|
private _selectInput;
|
|
78
|
+
/**
|
|
79
|
+
* Fires when selection changes
|
|
80
|
+
*/
|
|
58
81
|
private _onBlSelect;
|
|
59
82
|
private _connectedOptions;
|
|
60
83
|
private _cleanUpPopover;
|
|
61
|
-
|
|
84
|
+
private setOptionsSelected;
|
|
85
|
+
get options(): BlSelectOption<ValueType>[];
|
|
62
86
|
get opened(): boolean;
|
|
63
|
-
|
|
87
|
+
private _selectedOptions;
|
|
88
|
+
private dirty;
|
|
89
|
+
get selectedOptions(): BlSelectOption<ValueType>[];
|
|
64
90
|
get additionalSelectedOptionCount(): number;
|
|
65
|
-
|
|
91
|
+
validityCallback(): string | void;
|
|
92
|
+
reportValidity(): boolean;
|
|
93
|
+
resetFormControl(): void;
|
|
94
|
+
validationTarget: HTMLElement;
|
|
66
95
|
open(): void;
|
|
67
96
|
close(): void;
|
|
68
|
-
private
|
|
97
|
+
private _interactOutsideHandler;
|
|
69
98
|
private _setupPopover;
|
|
70
99
|
connectedCallback(): void;
|
|
71
100
|
disconnectedCallback(): void;
|
|
72
101
|
private inputTemplate;
|
|
73
|
-
private menuTemplate;
|
|
74
102
|
render(): import("lit-html").TemplateResult<1>;
|
|
75
|
-
private
|
|
76
|
-
private
|
|
103
|
+
private focusedOptionIndex;
|
|
104
|
+
private handleKeydown;
|
|
105
|
+
private togglePopover;
|
|
77
106
|
private _handleSelectEvent;
|
|
78
107
|
private _handleSingleSelect;
|
|
79
108
|
private _handleMultipleSelect;
|
|
80
109
|
private _handleSelectOptionEvent;
|
|
81
110
|
private _onClickRemove;
|
|
82
111
|
private _checkAdditionalItemCount;
|
|
83
|
-
|
|
112
|
+
protected firstUpdated(): void;
|
|
84
113
|
protected updated(_changedProperties: PropertyValues): void;
|
|
85
114
|
/**
|
|
86
115
|
* This method is used by `bl-select-option` component to register itself to bl-select.
|
|
87
116
|
* @param option BlSelectOption reference to be registered
|
|
88
117
|
*/
|
|
89
|
-
registerOption(option: BlSelectOption): void;
|
|
118
|
+
registerOption(option: BlSelectOption<ValueType>): void;
|
|
90
119
|
/**
|
|
91
120
|
* This method is used by `bl-select-option` component to unregister itself from bl-select.
|
|
92
121
|
* @param option BlSelectOption reference to be unregistered
|
|
93
122
|
*/
|
|
94
|
-
unregisterOption(option: BlSelectOption): void;
|
|
123
|
+
unregisterOption(option: BlSelectOption<ValueType>): void;
|
|
95
124
|
}
|
|
96
125
|
declare global {
|
|
97
126
|
interface HTMLElementTagNameMap {
|
|
98
127
|
'bl-select': BlSelect;
|
|
99
128
|
}
|
|
100
129
|
}
|
|
130
|
+
export {};
|
|
101
131
|
//# sourceMappingURL=bl-select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bl-select.d.ts","sourceRoot":"","sources":["../../../src/components/select/bl-select.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bl-select.d.ts","sourceRoot":"","sources":["../../../src/components/select/bl-select.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAKvE,OAAO,iBAAiB,CAAC;AAEzB,OAAO,mCAAmC,CAAC;AAC3C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CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-VAF7XRXM.js";import"../../chunk-THIPCHAK.js";import"../../chunk-5ODNFE7B.js";import"../../chunk-3B64VOWB.js";import"../../chunk-DJOD4BTL.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-F3ZH5IV7.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-select.js.map
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { FormValue } from '@open-wc/form-helpers';
|
|
2
|
+
import { CSSResultGroup, LitElement } from 'lit';
|
|
3
|
+
export default class BlSelectOption<ValueType extends FormValue = string> extends LitElement {
|
|
3
4
|
static get styles(): CSSResultGroup;
|
|
5
|
+
private _value;
|
|
4
6
|
/**
|
|
5
7
|
* Sets the value for the option
|
|
6
8
|
*/
|
|
7
|
-
value:
|
|
9
|
+
get value(): ValueType;
|
|
10
|
+
set value(val: ValueType);
|
|
8
11
|
/**
|
|
9
12
|
* Sets option as disabled
|
|
10
13
|
*/
|
|
@@ -18,10 +21,28 @@ export default class BlSelectOption extends LitElement {
|
|
|
18
21
|
* Fires when clicked on the option
|
|
19
22
|
*/
|
|
20
23
|
private _onSelect;
|
|
24
|
+
/**
|
|
25
|
+
* Fires when checkbox is focused
|
|
26
|
+
*/
|
|
27
|
+
private onFocus;
|
|
28
|
+
/**
|
|
29
|
+
* Fires when checkbox is blurred
|
|
30
|
+
*/
|
|
31
|
+
private onBlur;
|
|
32
|
+
private focusTarget;
|
|
33
|
+
/**
|
|
34
|
+
* Focuses this option
|
|
35
|
+
*/
|
|
36
|
+
focus(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Blurs from this option
|
|
39
|
+
*/
|
|
40
|
+
blur(): void;
|
|
21
41
|
private blSelect;
|
|
22
42
|
private singleOptionTemplate;
|
|
23
43
|
private checkboxOptionTemplate;
|
|
24
44
|
render(): import("lit-html").TemplateResult<1>;
|
|
45
|
+
private handleKeydown;
|
|
25
46
|
private _handleEvent;
|
|
26
47
|
private _onClickOption;
|
|
27
48
|
private _onCheckboxChange;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bl-select-option.d.ts","sourceRoot":"","sources":["../../../../src/components/select/option/bl-select-option.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"bl-select-option.d.ts","sourceRoot":"","sources":["../../../../src/components/select/option/bl-select-option.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAOvD,MAAM,CAAC,OAAO,OAAO,cAAc,CAAC,SAAS,SAAS,SAAS,GAAG,MAAM,CAAE,SAAQ,UAAU;IAC1F,MAAM,KAAK,MAAM,IAAI,cAAc,CAElC;IAED,OAAO,CAAC,MAAM,CAAY;IAG1B;;OAEG;IACH,IACI,KAAK,IAAI,SAAS,CAErB;IAED,IAAI,KAAK,CAAC,GAAG,EAAE,SAAS,EAEvB;IAGD;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,QAAQ,UAAS;IAGjB,QAAQ,UAAS;IAEjB;;OAEG;IACwB,OAAO,CAAC,SAAS,CAA6C;IAEzF;;OAEG;IACgB,OAAO,CAAC,OAAO,CAA6C;IAE/E;;OAEG;IACe,OAAO,CAAC,MAAM,CAA6C;IAErD,OAAO,CAAC,WAAW,CAAc;IAEzD;;OAEG;IACH,KAAK;IAQL;;OAEG;IACH,IAAI;IAKJ,OAAO,CAAC,QAAQ,CAA6B;IAE7C,OAAO,CAAC,oBAAoB;IAM5B,OAAO,CAAC,sBAAsB;IAW9B,MAAM;IAON,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,iBAAiB;IAKzB,iBAAiB;IAYjB,oBAAoB;CAIrB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../../chunk-
|
|
1
|
+
import{a}from"../../../chunk-THIPCHAK.js";import"../../../chunk-23UFIOHV.js";import"../../../chunk-57PTZNIL.js";import"../../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-select-option.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-KUOLIJCN.js";import"../../chunk-RST5NVHY.js";import"../../chunk-3B64VOWB.js";import"../../chunk-EPJ347EQ.js";import"../../chunk-DJOD4BTL.js";import"../../chunk-OLPYXE2P.js";import"../../chunk-KPAWUBRO.js";import"../../chunk-RLMJN536.js";import"../../chunk-23UFIOHV.js";import"../../chunk-57PTZNIL.js";import"../../chunk-NZ3RGSR6.js";export{a as default};
|
|
2
2
|
//# sourceMappingURL=bl-textarea.js.map
|
|
@@ -1301,15 +1301,38 @@
|
|
|
1301
1301
|
"kind": "class",
|
|
1302
1302
|
"description": "",
|
|
1303
1303
|
"name": "BlSelect",
|
|
1304
|
+
"cssProperties": [
|
|
1305
|
+
{
|
|
1306
|
+
"description": "Sets the positioning strategy of select popover. You can set it as `absolute` if you need to show popover relative to its trigger element. Default value is `fixed`",
|
|
1307
|
+
"name": "--bl-popover-position"
|
|
1308
|
+
}
|
|
1309
|
+
],
|
|
1304
1310
|
"events": [
|
|
1305
1311
|
{
|
|
1306
1312
|
"type": {
|
|
1307
|
-
"text": "CustomEvent<ISelectOption[]>"
|
|
1313
|
+
"text": "CustomEvent<ISelectOption<ValueType>[]>"
|
|
1308
1314
|
},
|
|
1315
|
+
"description": "Fires when selection changes",
|
|
1309
1316
|
"name": "bl-select"
|
|
1310
1317
|
}
|
|
1311
1318
|
],
|
|
1312
1319
|
"attributes": [
|
|
1320
|
+
{
|
|
1321
|
+
"name": "name",
|
|
1322
|
+
"type": {
|
|
1323
|
+
"text": "string"
|
|
1324
|
+
},
|
|
1325
|
+
"description": "Sets name of the select field",
|
|
1326
|
+
"fieldName": "name"
|
|
1327
|
+
},
|
|
1328
|
+
{
|
|
1329
|
+
"name": "value",
|
|
1330
|
+
"type": {
|
|
1331
|
+
"text": "ValueType | ValueType[] | null"
|
|
1332
|
+
},
|
|
1333
|
+
"description": "Sets the value of the select",
|
|
1334
|
+
"fieldName": "value"
|
|
1335
|
+
},
|
|
1313
1336
|
{
|
|
1314
1337
|
"name": "label",
|
|
1315
1338
|
"type": {
|
|
@@ -1388,11 +1411,25 @@
|
|
|
1388
1411
|
"fieldName": "customInvalidText"
|
|
1389
1412
|
}
|
|
1390
1413
|
],
|
|
1414
|
+
"mixins": [
|
|
1415
|
+
{
|
|
1416
|
+
"name": "FormControlMixin",
|
|
1417
|
+
"package": "@open-wc/form-control"
|
|
1418
|
+
}
|
|
1419
|
+
],
|
|
1391
1420
|
"superclass": {
|
|
1392
1421
|
"name": "LitElement",
|
|
1393
1422
|
"package": "lit"
|
|
1394
1423
|
},
|
|
1395
1424
|
"tagName": "bl-select",
|
|
1425
|
+
"summary": "Baklava Select component",
|
|
1426
|
+
"typeParameters": [
|
|
1427
|
+
{
|
|
1428
|
+
"name": "ValueType",
|
|
1429
|
+
"extends": "FormValue",
|
|
1430
|
+
"default": "string"
|
|
1431
|
+
}
|
|
1432
|
+
],
|
|
1396
1433
|
"customElement": true
|
|
1397
1434
|
}
|
|
1398
1435
|
],
|
|
@@ -2177,17 +2214,31 @@
|
|
|
2177
2214
|
"events": [
|
|
2178
2215
|
{
|
|
2179
2216
|
"type": {
|
|
2180
|
-
"text": "CustomEvent<
|
|
2217
|
+
"text": "CustomEvent<ValueType | string | null>"
|
|
2181
2218
|
},
|
|
2182
2219
|
"description": "Fires when clicked on the option",
|
|
2183
2220
|
"name": "bl-select-option"
|
|
2221
|
+
},
|
|
2222
|
+
{
|
|
2223
|
+
"type": {
|
|
2224
|
+
"text": "CustomEvent<ValueType | string | null>"
|
|
2225
|
+
},
|
|
2226
|
+
"description": "Fires when checkbox is focused",
|
|
2227
|
+
"name": "bl-focus"
|
|
2228
|
+
},
|
|
2229
|
+
{
|
|
2230
|
+
"type": {
|
|
2231
|
+
"text": "CustomEvent<ValueType | string | null>"
|
|
2232
|
+
},
|
|
2233
|
+
"description": "Fires when checkbox is blurred",
|
|
2234
|
+
"name": "bl-blur"
|
|
2184
2235
|
}
|
|
2185
2236
|
],
|
|
2186
2237
|
"attributes": [
|
|
2187
2238
|
{
|
|
2188
2239
|
"name": "value",
|
|
2189
2240
|
"type": {
|
|
2190
|
-
"text": "
|
|
2241
|
+
"text": "ValueType"
|
|
2191
2242
|
},
|
|
2192
2243
|
"description": "Sets the value for the option",
|
|
2193
2244
|
"fieldName": "value"
|
|
@@ -2215,6 +2266,13 @@
|
|
|
2215
2266
|
"name": "LitElement",
|
|
2216
2267
|
"package": "lit"
|
|
2217
2268
|
},
|
|
2269
|
+
"typeParameters": [
|
|
2270
|
+
{
|
|
2271
|
+
"name": "ValueType",
|
|
2272
|
+
"extends": "FormValue",
|
|
2273
|
+
"default": "string"
|
|
2274
|
+
}
|
|
2275
|
+
],
|
|
2218
2276
|
"tagName": "bl-select-option",
|
|
2219
2277
|
"customElement": true
|
|
2220
2278
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trendyol/baklava",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.81",
|
|
4
4
|
"description": "Trendyol Baklava Design System",
|
|
5
5
|
"main": "dist/baklava.js",
|
|
6
6
|
"module": "dist/baklava.js",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"@floating-ui/dom": "^0.5.4",
|
|
60
60
|
"@fontsource/rubik": "^4.5.9",
|
|
61
61
|
"@lit-labs/react": "^1.1.1",
|
|
62
|
-
"@open-wc/form-control": "^0.
|
|
63
|
-
"@open-wc/form-helpers": "^0.2.
|
|
62
|
+
"@open-wc/form-control": "^0.7.0",
|
|
63
|
+
"@open-wc/form-helpers": "^0.2.2",
|
|
64
64
|
"element-internals-polyfill": "^1.2.3",
|
|
65
65
|
"lit": "^2.6.1"
|
|
66
66
|
},
|
package/dist/chunk-4WJJQP4L.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{a as p}from"./chunk-23UFIOHV.js";import{a as s,b as l,f as r,g as a,h as i,i as c}from"./chunk-57PTZNIL.js";import{a as o}from"./chunk-NZ3RGSR6.js";var h=s`:host{position:relative}.option-container{--option-font:var(--bl-font-title-3-regular);--option-padding:var(--bl-size-xs) 0;--option-selected-color:var(--bl-color-primary);--option-hover-color:var(--bl-color-primary-hover);--option-color:var(--bl-color-secondary);--option-disabled-color:var(--bl-color-content-passive);--option-seperator:1px solid var(--bl-color-border);--option-gap:var(--bl-size-2xs);--option-transition:color 120ms ease-out}.option-container::after{position:absolute;content:'';width:100%;bottom:0;border-bottom:var(--option-seperator)}:host(:last-of-type) .option-container::after{border-bottom:0}.single-option{width:100%;display:block;cursor:pointer;color:var(--option-color);padding:var(--option-padding);transition:var(--option-transition);font:var(--option-font);user-select:none}:host(:hover) .single-option,:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .single-option{color:var(--option-hover-color)}:host([selected]) .single-option{color:var(--option-selected-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .single-option{color:var(--option-disabled-color);cursor:not-allowed;pointer-events:none}.checkbox-option{width:100%;display:block;color:var(--option-color);padding:var(--option-padding)}`,d=h;var e=class extends r{constructor(){super(...arguments);this.disabled=!1;this.selected=!1;this.multiple=!1}static get styles(){return[d]}singleOptionTemplate(){return l`<div class="single-option" @click="${this._onClickOption}">
|
|
2
|
-
<slot></slot>
|
|
3
|
-
</div>`}checkboxOptionTemplate(){return l`<bl-checkbox
|
|
4
|
-
class="checkbox-option"
|
|
5
|
-
.checked="${this.selected}"
|
|
6
|
-
.disabled="${this.disabled}"
|
|
7
|
-
@bl-checkbox-change="${this._onCheckboxChange}"
|
|
8
|
-
>
|
|
9
|
-
<slot></slot>
|
|
10
|
-
</bl-checkbox>`}render(){return l`<div class="option-container">
|
|
11
|
-
${this.multiple?this.checkboxOptionTemplate():this.singleOptionTemplate()}
|
|
12
|
-
</div>`}_handleEvent(){this._onSelect({value:this.value,text:this.textContent,selected:this.selected})}_onClickOption(){this.selected=!this.selected,this._handleEvent()}_onCheckboxChange(t){this.selected=t.detail,this._handleEvent()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{var t,n;this.blSelect=this.closest("bl-select"),this.multiple=((t=this.blSelect)==null?void 0:t.multiple)||!1,(n=this.blSelect)==null||n.registerOption(this)})}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.blSelect)==null||t.unregisterOption(this)}};o([i({})],e.prototype,"value",2),o([i({type:Boolean,reflect:!0})],e.prototype,"disabled",2),o([i({type:Boolean,reflect:!0})],e.prototype,"selected",2),o([c()],e.prototype,"multiple",2),o([p("bl-select-option")],e.prototype,"_onSelect",2),e=o([a("bl-select-option")],e);export{e as a};
|
|
13
|
-
//# sourceMappingURL=chunk-4WJJQP4L.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/components/select/option/bl-select-option.css", "../src/components/select/option/bl-select-option.ts"],
|
|
4
|
-
"sourcesContent": ["import {css} from 'lit';\nexport const styles = css`:host{position:relative}.option-container{--option-font:var(--bl-font-title-3-regular);--option-padding:var(--bl-size-xs) 0;--option-selected-color:var(--bl-color-primary);--option-hover-color:var(--bl-color-primary-hover);--option-color:var(--bl-color-secondary);--option-disabled-color:var(--bl-color-content-passive);--option-seperator:1px solid var(--bl-color-border);--option-gap:var(--bl-size-2xs);--option-transition:color 120ms ease-out}.option-container::after{position:absolute;content:'';width:100%;bottom:0;border-bottom:var(--option-seperator)}:host(:last-of-type) .option-container::after{border-bottom:0}.single-option{width:100%;display:block;cursor:pointer;color:var(--option-color);padding:var(--option-padding);transition:var(--option-transition);font:var(--option-font);user-select:none}:host(:hover) .single-option,:host(.__ONLY_FOR_STORYBOOK_DEMONSTRATION_HOVER__) .single-option{color:var(--option-hover-color)}:host([selected]) .single-option{color:var(--option-selected-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .single-option{color:var(--option-disabled-color);cursor:not-allowed;pointer-events:none}.checkbox-option{width:100%;display:block;color:var(--option-color);padding:var(--option-padding)}`;\nexport default styles;\n", "import { LitElement, html, CSSResultGroup } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { event, EventDispatcher } from '../../../utilities/event';\nimport BlSelect, { ISelectOption } from '../bl-select';\nimport style from './bl-select-option.css';\n\n@customElement('bl-select-option')\nexport default class BlSelectOption extends LitElement {\n static get styles(): CSSResultGroup {\n return [style];\n }\n\n /* Declare reactive properties */\n /**\n * Sets the value for the option\n */\n @property({})\n value: string;\n\n /**\n * Sets option as disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Sets option as selected state\n */\n @property({ type: Boolean, reflect: true })\n selected = false;\n\n @state()\n multiple = false;\n\n /**\n * Fires when clicked on the option\n */\n @event('bl-select-option') private _onSelect: EventDispatcher<ISelectOption>;\n\n private blSelect: BlSelect | null;\n\n private singleOptionTemplate() {\n return html`<div class=\"single-option\" @click=\"${this._onClickOption}\">\n <slot></slot>\n </div>`;\n }\n\n private checkboxOptionTemplate() {\n return html`<bl-checkbox\n class=\"checkbox-option\"\n .checked=\"${this.selected}\"\n .disabled=\"${this.disabled}\"\n @bl-checkbox-change=\"${this._onCheckboxChange}\"\n >\n <slot></slot>\n </bl-checkbox>`;\n }\n\n render() {\n return html`<div class=\"option-container\">\n ${this.multiple ? this.checkboxOptionTemplate() : this.singleOptionTemplate()}\n </div>`;\n }\n\n private _handleEvent() {\n this._onSelect({\n value: this.value,\n text: this.textContent,\n selected: this.selected,\n } as ISelectOption);\n }\n\n private _onClickOption() {\n this.selected = !this.selected;\n this._handleEvent();\n }\n\n private _onCheckboxChange(event: CustomEvent) {\n this.selected = event.detail;\n this._handleEvent();\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n this.updateComplete.then(() => {\n this.blSelect = this.closest<BlSelect>('bl-select');\n // FIXME: We should warn when parent is not bl-select\n\n this.multiple = this.blSelect?.multiple || false;\n this.blSelect?.registerOption(this);\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.blSelect?.unregisterOption(this);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'bl-select-option': BlSelectOption;\n }\n}\n"],
|
|
5
|
-
"mappings": "2JACO,IAAMA,EAASC,guCACfC,EAAQF,ECKf,IAAqBG,EAArB,cAA4CC,CAAW,CAAvD,kCAgBE,cAAW,GAMX,cAAW,GAGX,cAAW,GAxBX,WAAW,QAAyB,CAClC,MAAO,CAACC,CAAK,CACf,CA+BQ,sBAAuB,CAC7B,OAAOC,uCAA0C,KAAK;AAAA;AAAA,WAGxD,CAEQ,wBAAyB,CAC/B,OAAOA;AAAA;AAAA,kBAEO,KAAK;AAAA,mBACJ,KAAK;AAAA,6BACK,KAAK;AAAA;AAAA;AAAA,mBAIhC,CAEA,QAAS,CACP,OAAOA;AAAA,QACH,KAAK,SAAW,KAAK,uBAAuB,EAAI,KAAK,qBAAqB;AAAA,WAEhF,CAEQ,cAAe,CACrB,KAAK,UAAU,CACb,MAAO,KAAK,MACZ,KAAM,KAAK,YACX,SAAU,KAAK,QACjB,CAAkB,CACpB,CAEQ,gBAAiB,CACvB,KAAK,SAAW,CAAC,KAAK,SACtB,KAAK,aAAa,CACpB,CAEQ,kBAAkBC,EAAoB,CAC5C,KAAK,SAAWA,EAAM,OACtB,KAAK,aAAa,CACpB,CAEA,mBAAoB,CAClB,MAAM,kBAAkB,EAExB,KAAK,eAAe,KAAK,IAAM,CArFnC,IAAAC,EAAAC,EAsFM,KAAK,SAAW,KAAK,QAAkB,WAAW,EAGlD,KAAK,WAAWD,EAAA,KAAK,WAAL,YAAAA,EAAe,WAAY,IAC3CC,EAAA,KAAK,WAAL,MAAAA,EAAe,eAAe,KAChC,CAAC,CACH,CAEA,sBAAuB,CA9FzB,IAAAD,EA+FI,MAAM,qBAAqB,GAC3BA,EAAA,KAAK,WAAL,MAAAA,EAAe,iBAAiB,KAClC,CACF,EAjFEE,EAAA,CADCC,EAAS,CAAC,CAAC,GATOR,EAUnB,qBAMAO,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAfvBR,EAgBnB,wBAMAO,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GArBvBR,EAsBnB,wBAGAO,EAAA,CADCE,EAAM,GAxBYT,EAyBnB,wBAKmCO,EAAA,CAAlCH,EAAM,kBAAkB,GA9BNJ,EA8BgB,yBA9BhBA,EAArBO,EAAA,CADCC,EAAc,kBAAkB,GACZR",
|
|
6
|
-
"names": ["styles", "i", "bl_select_option_default", "BlSelectOption", "s", "bl_select_option_default", "y", "event", "_a", "_b", "__decorateClass", "e", "t"]
|
|
7
|
-
}
|
package/dist/chunk-7K5FMQLQ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var d=function(u,c,f,n){if(f==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof c=="function"?u!==c||!n:!c.has(u))throw new TypeError("Cannot read private member from an object whose class did not declare it");return f==="m"?n:f==="a"?n.call(u):n?n.value:c.get(u)},E=function(u,c,f,n,y){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!y)throw new TypeError("Private accessor was defined without a setter");if(typeof c=="function"?u!==c||!y:!c.has(u))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?y.call(u,f):y?y.value=f:c.set(u,f),f};function pt(u){var c,f,n,y,V,W,F,P,A,D,$,O,T,k,C,q,U,z;class J extends u{constructor(...s){super(...s),c.add(this),this.internals=this.attachInternals(),f.set(this,!1),n.set(this,!1),y.set(this,!1),V.set(this,void 0),W.set(this,void 0),P.set(this,""),A.set(this,()=>{E(this,y,!0,"f"),E(this,f,!0,"f"),d(this,c,"m",C).call(this)}),D.set(this,()=>{E(this,f,!1,"f"),d(this,c,"m",q).call(this,this.shouldFormValueUpdate()?d(this,P,"f"):""),!this.validity.valid&&d(this,y,"f")&&E(this,n,!0,"f");let r=d(this,c,"m",C).call(this);this.validationMessageCallback&&this.validationMessageCallback(r?this.internals.validationMessage:"")}),$.set(this,()=>{var r;E(this,n,!0,"f"),d(this,c,"m",C).call(this),(r=this===null||this===void 0?void 0:this.validationMessageCallback)===null||r===void 0||r.call(this,this.showError?this.internals.validationMessage:"")}),O.set(this,void 0),T.set(this,!1),k.set(this,Promise.resolve()),this.addEventListener("focus",d(this,A,"f")),this.addEventListener("blur",d(this,D,"f")),this.addEventListener("invalid",d(this,$,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let s=this.validators.map(g=>g.attribute).flat(),r=super.observedAttributes||[];return[...new Set([...r,...s])]}static getValidator(s){return this.validators.find(r=>r.attribute===s)||null}static getValidators(s){return this.validators.filter(r=>{var p;if(r.attribute===s||!((p=r.attribute)===null||p===void 0)&&p.includes(s))return!0})}get form(){return this.internals.form}get showError(){return d(this,c,"m",C).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(s,r,p){var g;(g=super.attributeChangedCallback)===null||g===void 0||g.call(this,s,r,p);let S=this.constructor.getValidators(s);S!=null&&S.length&&this.validationTarget&&this.setValue(d(this,P,"f"))}setValue(s){var r;E(this,n,!1,"f"),(r=this.validationMessageCallback)===null||r===void 0||r.call(this,""),E(this,P,s,"f");let g=this.shouldFormValueUpdate()?s:null;this.internals.setFormValue(g),d(this,c,"m",q).call(this,g),this.valueChangedCallback&&this.valueChangedCallback(g),d(this,c,"m",C).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(s=>s(d(this,k,"f")))}formResetCallback(){var s,r;E(this,y,!1,"f"),E(this,n,!1,"f"),d(this,c,"m",C).call(this),(s=this.resetFormControl)===null||s===void 0||s.call(this),(r=this.validationMessageCallback)===null||r===void 0||r.call(this,d(this,c,"m",C).call(this)?this.validationMessage:"")}}return f=new WeakMap,n=new WeakMap,y=new WeakMap,V=new WeakMap,W=new WeakMap,P=new WeakMap,A=new WeakMap,D=new WeakMap,$=new WeakMap,O=new WeakMap,T=new WeakMap,k=new WeakMap,c=new WeakSet,F=function(){let s=this.getRootNode(),r=`${this.localName}[name="${this.getAttribute("name")}"]`;return s.querySelectorAll(r)},C=function(){if(this.hasAttribute("disabled"))return!1;let s=d(this,n,"f")||d(this,y,"f")&&!this.validity.valid&&!d(this,f,"f");return s&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),s},q=function(s){let r=this.constructor,p={},g=r.validators,R=[],S=g.some(b=>b.isValid instanceof Promise);d(this,T,"f")||(E(this,k,new Promise(b=>{E(this,O,b,"f")}),"f"),E(this,T,!0,"f")),d(this,V,"f")&&(d(this,V,"f").abort(),E(this,W,d(this,V,"f"),"f"));let x=new AbortController;E(this,V,x,"f");let H,B=!1;g.length&&(g.forEach(b=>{let G=b.key||"customError",L=b.isValid(this,s,x.signal);L instanceof Promise?(R.push(L),L.then(K=>{K!=null&&(p[G]=!K,H=d(this,c,"m",z).call(this,b,s),d(this,c,"m",U).call(this,p,H))})):(p[G]=!L,this.validity[G]!==!L&&(B=!0),!L&&!H&&(H=d(this,c,"m",z).call(this,b,s)))}),Promise.allSettled(R).then(()=>{var b;x!=null&&x.signal.aborted||(E(this,T,!1,"f"),(b=d(this,O,"f"))===null||b===void 0||b.call(this))}),(B||!S)&&d(this,c,"m",U).call(this,p,H))},U=function(s,r){if(this.validationTarget)this.internals.setValidity(s,r,this.validationTarget);else{if(this.internals.setValidity(s,r),this.internals.validity.valid)return;let p=0,g=setInterval(()=>{p>=100||this.validity.valid?clearInterval(g):this.validationTarget&&(this.internals.setValidity(this.validity,r,this.validationTarget),clearInterval(g)),p+=1},0)}},z=function(s,r){if(this.validityCallback){let p=this.validityCallback(s.key||"customError");if(p)return p}return s.message instanceof Function?s.message(this,r):s.message},J}(function(){"use strict";let u=new WeakMap,c=new WeakMap,f=new WeakMap,n=new WeakMap,y=new WeakMap,V=new WeakMap,W=new WeakMap,F=new WeakMap,P=new WeakMap,A=new WeakMap,D=new WeakMap,$=new WeakMap,O=new WeakMap,T=new WeakMap,k=new WeakMap,C={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"},q=(e,t)=>{for(let a in C){t[a]=null;let i=null,o=C[a];Object.defineProperty(t,a,{get(){return i},set(h){i=h,e.isConnected?e.setAttribute(o,h):A.set(e,t)}})}};function U(e){let t=n.get(e),{form:a}=t;et(e,a,t),B(e,t.labels)}let z=(e,t=!1)=>{let a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(h){return n.has(h)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),i=a.nextNode(),o=!t||e.disabled;for(;i;)i.formDisabledCallback&&o&&R(i,e.disabled),i=a.nextNode()},J={attributes:!0,attributeFilter:["disabled"]},I=new MutationObserver(e=>{for(let t of e){let a=t.target;a.constructor.formAssociated?R(a,a.hasAttribute("disabled")):a.localName==="fieldset"&&z(a)}});function s(e){e.forEach(t=>{let{addedNodes:a,removedNodes:i}=t,o=Array.from(a),h=Array.from(i);o.forEach(l=>{if(n.has(l)&&l.constructor.formAssociated&&U(l),A.has(l)){let v=A.get(l);Object.keys(C).filter(m=>v[m]!==null).forEach(m=>{l.setAttribute(C[m],v[m])}),A.delete(l)}if(k.has(l)){let v=k.get(l);l.setAttribute("internals-valid",v.validity.valid.toString()),l.setAttribute("internals-invalid",(!v.validity.valid).toString()),l.setAttribute("aria-invalid",(!v.validity.valid).toString()),k.delete(l)}if(l.localName==="form"){let v=F.get(l),M=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode(w){return n.has(w)&&!(v&&v.has(w))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),m=M.nextNode();for(;m;)U(m),m=M.nextNode()}l.localName==="fieldset"&&(I.observe(l,J),z(l,!0))}),h.forEach(l=>{let v=n.get(l);v&&f.get(v)&&S(v),W.has(l)&&W.get(l).disconnect()})})}function r(e){e.forEach(t=>{let{removedNodes:a}=t;a.forEach(i=>{let o=O.get(t.target);n.has(i)&&it(i),o.disconnect()})})}let p=e=>{let t=new MutationObserver(r);t.observe(e,{childList:!0}),O.set(e,t)};new MutationObserver(s);let g={childList:!0,subtree:!0},R=(e,t)=>{e.toggleAttribute("internals-disabled",t),t?e.setAttribute("aria-disabled","true"):e.removeAttribute("aria-disabled"),e.formDisabledCallback&&e.formDisabledCallback.apply(e,[t])},S=e=>{f.get(e).forEach(a=>{a.remove()}),f.set(e,[])},x=(e,t)=>{let a=document.createElement("input");return a.type="hidden",a.name=e.getAttribute("name"),e.after(a),f.get(t).push(a),a},H=(e,t)=>{f.set(t,[]),I.observe(e,J)},B=(e,t)=>{if(t.length){Array.from(t).forEach(i=>i.addEventListener("click",e.click.bind(e)));let a=t[0].id;t[0].id||(a=`${t[0].htmlFor}_Label`,t[0].id=a),e.setAttribute("aria-labelledby",a)}},b=e=>{let t=Array.from(e.elements).filter(h=>!h.tagName.includes("-")&&h.validity).map(h=>h.validity.valid),a=F.get(e)||[],i=Array.from(a).filter(h=>h.isConnected).map(h=>n.get(h).validity.valid),o=[...t,...i].includes(!1);e.toggleAttribute("internals-invalid",o),e.toggleAttribute("internals-valid",!o)},G=e=>{b(Q(e.target))},L=e=>{b(Q(e.target))},tt=e=>{let t=":is(:is(button, input)[type=submit], button:not([type])):not([disabled])",a=`${t}:not([form])`;e.id&&(a+=`,${t}[form='${e.id}']`),e.addEventListener("click",i=>{if(i.target.closest(a)){let h=F.get(e);if(e.noValidate)return;h.size&&Array.from(h).reverse().map(M=>n.get(M).reportValidity()).includes(!1)&&i.preventDefault()}})},K=e=>{let t=F.get(e.target);t&&t.size&&t.forEach(a=>{a.constructor.formAssociated&&a.formResetCallback&&a.formResetCallback.apply(a)})},et=(e,t,a)=>{if(t){let i=F.get(t);if(i)i.add(e);else{let o=new Set;o.add(e),F.set(t,o),tt(t),t.addEventListener("reset",K),t.addEventListener("input",G),t.addEventListener("change",L)}V.set(t,{ref:e,internals:a}),e.constructor.formAssociated&&e.formAssociatedCallback&&setTimeout(()=>{e.formAssociatedCallback.apply(e,[t])},0),b(t)}},Q=e=>{let t=e.parentNode;return t&&t.tagName!=="FORM"&&(t=Q(t)),t},_=(e,t,a=DOMException)=>{if(!e.constructor.formAssociated)throw new a(t)},at=(e,t,a)=>{let i=F.get(e);return i&&i.size&&i.forEach(o=>{n.get(o)[a]()||(t=!1)}),t},it=e=>{if(e.constructor.formAssociated){let t=n.get(e),{labels:a,form:i}=t;B(e,a),et(e,i,t)}};class nt{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}}let lt=e=>(e.badInput=!1,e.customError=!1,e.patternMismatch=!1,e.rangeOverflow=!1,e.rangeUnderflow=!1,e.stepMismatch=!1,e.tooLong=!1,e.tooShort=!1,e.typeMismatch=!1,e.valid=!0,e.valueMissing=!1,e),ct=(e,t,a)=>(e.valid=dt(t),Object.keys(t).forEach(i=>e[i]=t[i]),a&&b(a),e),dt=e=>{let t=!0;for(let a in e)a!=="valid"&&e[a]!==!1&&(t=!1);return t},Z=new WeakMap;class X extends Set{static get isPolyfilled(){return!0}constructor(t){if(super(),!t||!t.tagName||t.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");Z.set(this,t)}add(t){if(!/^--/.test(t)||typeof t!="string")throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${t} must start with '--'.`);let a=super.add(t),i=Z.get(this);return i.toggleAttribute(`state${t}`,!0),i.part&&i.part.add(`state${t}`),a}clear(){for(let[t]of this.entries())this.delete(t);super.clear()}delete(t){let a=super.delete(t),i=Z.get(this);return i.toggleAttribute(`state${t}`,!1),i.part&&i.part.remove(`state${t}`),a}}function st(e,t,a,i){if(a==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?i:a==="a"?i.call(e):i?i.value:t.get(e)}function ht(e,t,a,i,o){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?o.call(e,a):o?o.value=a:t.set(e,a),a}var j;class ut{constructor(t){j.set(this,void 0),ht(this,j,t,"f");for(let a=0;a<t.length;a++){let i=t[a];this[a]=i,i.hasAttribute("name")&&(this[i.getAttribute("name")]=i)}Object.freeze(this)}get length(){return st(this,j,"f").length}[(j=new WeakMap,Symbol.iterator)](){return st(this,j,"f")[Symbol.iterator]()}item(t){return this[t]==null?null:this[t]}namedItem(t){return this[t]==null?null:this[t]}}class rt{static get isPolyfilled(){return!0}constructor(t){if(!t||!t.tagName||t.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");let a=t.getRootNode(),i=new nt;this.states=new X(t),u.set(this,t),c.set(this,i),n.set(t,this),q(t,this),H(t,this),Object.seal(this),it(t),a instanceof DocumentFragment&&p(a)}checkValidity(){let t=u.get(this);if(_(t,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;let a=c.get(this);if(!a.valid){let i=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});t.dispatchEvent(i)}return a.valid}get form(){let t=u.get(this);_(t,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.");let a;return t.constructor.formAssociated===!0&&(a=Q(t)),a}get labels(){let t=u.get(this);_(t,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");let a=t.getAttribute("id"),i=t.getRootNode();return i&&a?i.querySelectorAll(`[for="${a}"]`):[]}reportValidity(){let t=u.get(this);if(_(t,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;let a=this.checkValidity(),i=$.get(this);if(i&&!t.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!a&&i&&(t.focus(),i.focus()),a}setFormValue(t){let a=u.get(this);if(_(a,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),S(this),t!=null&&!(t instanceof FormData)){if(a.getAttribute("name")){let i=x(a,this);i.value=t}}else t!=null&&t instanceof FormData&&Array.from(t).reverse().forEach(([i,o])=>{if(typeof o=="string"){let h=x(a,this);h.name=i,h.value=o}});P.set(a,t)}setValidity(t,a,i){let o=u.get(this);if(_(o,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!t)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");$.set(this,i);let h=c.get(this),l={};for(let m in t)l[m]=t[m];Object.keys(l).length===0&<(h);let v={...h,...l};delete v.valid;let{valid:M}=ct(h,v,this.form);if(!M&&!a)throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");y.set(this,M?"":a),o.isConnected?(o.toggleAttribute("internals-invalid",!M),o.toggleAttribute("internals-valid",M),o.setAttribute("aria-invalid",`${!M}`)):k.set(o,this)}get shadowRoot(){let t=u.get(this),a=D.get(t);return a||null}get validationMessage(){let t=u.get(this);return _(t,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),y.get(this)}get validity(){let t=u.get(this);return _(t,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."),c.get(this)}get willValidate(){let t=u.get(this);return _(t,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(t.disabled||t.hasAttribute("disabled")||t.hasAttribute("readonly"))}}function mt(){if(!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class e extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}let t=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,"")}`;customElements.define(t,e);let a=new e;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every(i=>i in a.internals)}if(mt()){if(!window.CustomStateSet){window.CustomStateSet=X;let e=HTMLElement.prototype.attachInternals;HTMLElement.prototype.attachInternals=function(...t){let a=e.call(this,t);return a.states=new X(this),a}}}else{let t=function(...m){let w=o.apply(this,m),N=new MutationObserver(s);return D.set(this,w),window.ShadyDOM?N.observe(this,g):N.observe(w,g),W.set(this,N),w},a=function(...m){let w=l.apply(this,m);return at(this,w,"checkValidity")},i=function(...m){let w=v.apply(this,m);return at(this,w,"reportValidity")};window.ElementInternals=rt;let e=customElements.define;customElements.define=function(m,w,N){if(w.formAssociated){let Y=w.prototype.connectedCallback;w.prototype.connectedCallback=function(){T.has(this)||(T.set(this,!0),this.hasAttribute("disabled")&&R(this,!0)),Y!=null&&Y.apply(this)}}e.apply(customElements,[m,w,N])},HTMLElement.prototype.attachInternals=function(){if(this.tagName){if(this.tagName.indexOf("-")===-1)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.")}else return{};if(n.has(this))throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new rt(this)};let o=Element.prototype.attachShadow;Element.prototype.attachShadow=t,new MutationObserver(s).observe(document.documentElement,g);let l=HTMLFormElement.prototype.checkValidity;HTMLFormElement.prototype.checkValidity=a;let v=HTMLFormElement.prototype.reportValidity;HTMLFormElement.prototype.reportValidity=i;let{get:M}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get(...m){let w=M.call(this,...m),N=Array.from(F.get(this)||[]);if(N.length===0)return w;let Y=Array.from(w).concat(N).sort((ot,ft)=>ot.compareDocumentPosition?ot.compareDocumentPosition(ft)&2?1:-1:0);return new ut(Y)}}),window.CustomStateSet||(window.CustomStateSet=X)}})();export{pt as a};
|
|
2
|
-
//# sourceMappingURL=chunk-7K5FMQLQ.js.map
|