@verbb/plugin-kit-web 2.0.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/CHANGELOG.md +16 -0
- package/LICENSE.md +21 -0
- package/README.md +149 -0
- package/dist/a11y/active-elements.d.ts +6 -0
- package/dist/a11y/active-elements.d.ts.map +1 -0
- package/dist/a11y/dismissible-stack.d.ts +6 -0
- package/dist/a11y/dismissible-stack.d.ts.map +1 -0
- package/dist/a11y/focus.d.ts +20 -0
- package/dist/a11y/focus.d.ts.map +1 -0
- package/dist/a11y/index.d.ts +7 -0
- package/dist/a11y/index.d.ts.map +1 -0
- package/dist/a11y/offset.d.ts +9 -0
- package/dist/a11y/offset.d.ts.map +1 -0
- package/dist/a11y/scroll-lock.d.ts +23 -0
- package/dist/a11y/scroll-lock.d.ts.map +1 -0
- package/dist/base/checkbox-control.styles.d.ts +3 -0
- package/dist/base/checkbox-control.styles.d.ts.map +1 -0
- package/dist/base/component-id.d.ts +2 -0
- package/dist/base/component-id.d.ts.map +1 -0
- package/dist/base/form-control.styles.d.ts +3 -0
- package/dist/base/form-control.styles.d.ts.map +1 -0
- package/dist/base/icon.styles.d.ts +3 -0
- package/dist/base/icon.styles.d.ts.map +1 -0
- package/dist/base/markdown.styles.d.ts +3 -0
- package/dist/base/markdown.styles.d.ts.map +1 -0
- package/dist/base/pk-element.d.ts +28 -0
- package/dist/base/pk-element.d.ts.map +1 -0
- package/dist/base/pk-form-associated-element.d.ts +63 -0
- package/dist/base/pk-form-associated-element.d.ts.map +1 -0
- package/dist/base/shadow-reset.styles.d.ts +6 -0
- package/dist/base/shadow-reset.styles.d.ts.map +1 -0
- package/dist/base/styles.d.ts +9 -0
- package/dist/base/styles.d.ts.map +1 -0
- package/dist/chunks/active-elements-BwpXu8Lb.js +16 -0
- package/dist/chunks/active-elements-BwpXu8Lb.js.map +1 -0
- package/dist/chunks/animate-with-class-CsDwYnXL.js +42 -0
- package/dist/chunks/animate-with-class-CsDwYnXL.js.map +1 -0
- package/dist/chunks/autoloader-DzOTQqe6.js +177 -0
- package/dist/chunks/autoloader-DzOTQqe6.js.map +1 -0
- package/dist/chunks/button-group-item.styles-DYmBR28a.js +147 -0
- package/dist/chunks/button-group-item.styles-DYmBR28a.js.map +1 -0
- package/dist/chunks/component-registry-CpZiIDh4.js +130 -0
- package/dist/chunks/component-registry-CpZiIDh4.js.map +1 -0
- package/dist/chunks/control-aria-B2QMq4ji.js +69 -0
- package/dist/chunks/control-aria-B2QMq4ji.js.map +1 -0
- package/dist/chunks/decorate-W02hmVTt.js +149 -0
- package/dist/chunks/decorate-W02hmVTt.js.map +1 -0
- package/dist/chunks/dismissible-stack-XQUMfKO3.js +32 -0
- package/dist/chunks/dismissible-stack-XQUMfKO3.js.map +1 -0
- package/dist/chunks/field-labels-CoU9dnNq.js +14 -0
- package/dist/chunks/field-labels-CoU9dnNq.js.map +1 -0
- package/dist/chunks/focus-aa5dlv8k.js +122 -0
- package/dist/chunks/focus-aa5dlv8k.js.map +1 -0
- package/dist/chunks/form-control.styles-BQdimE5o.js +108 -0
- package/dist/chunks/form-control.styles-BQdimE5o.js.map +1 -0
- package/dist/chunks/has-slot-8BvCt_qo.js +74 -0
- package/dist/chunks/has-slot-8BvCt_qo.js.map +1 -0
- package/dist/chunks/icon.styles-BLTWLqYp.js +21 -0
- package/dist/chunks/icon.styles-BLTWLqYp.js.map +1 -0
- package/dist/chunks/icons-BR8JcQj2.js +52 -0
- package/dist/chunks/icons-BR8JcQj2.js.map +1 -0
- package/dist/chunks/mirror-validator-DCjNYrrx.js +32 -0
- package/dist/chunks/mirror-validator-DCjNYrrx.js.map +1 -0
- package/dist/chunks/overlay-lifecycle-D0pkTQyI.js +44 -0
- package/dist/chunks/overlay-lifecycle-D0pkTQyI.js.map +1 -0
- package/dist/chunks/pk-button-Cilu5WAT.js +840 -0
- package/dist/chunks/pk-button-Cilu5WAT.js.map +1 -0
- package/dist/chunks/pk-button-group-D9hqSfb_.js +422 -0
- package/dist/chunks/pk-button-group-D9hqSfb_.js.map +1 -0
- package/dist/chunks/pk-button-group-separator-DG0CYaqc.js +61 -0
- package/dist/chunks/pk-button-group-separator-DG0CYaqc.js.map +1 -0
- package/dist/chunks/pk-button-group-text-C5z4P7ur.js +49 -0
- package/dist/chunks/pk-button-group-text-C5z4P7ur.js.map +1 -0
- package/dist/chunks/pk-calendar-CcV-La-9.js +1410 -0
- package/dist/chunks/pk-calendar-CcV-La-9.js.map +1 -0
- package/dist/chunks/pk-checkbox-Bavq3-9C.js +360 -0
- package/dist/chunks/pk-checkbox-Bavq3-9C.js.map +1 -0
- package/dist/chunks/pk-checkbox-select-ZEJ6WIQn.js +221 -0
- package/dist/chunks/pk-checkbox-select-ZEJ6WIQn.js.map +1 -0
- package/dist/chunks/pk-clear--mPWZP7H.js +15 -0
- package/dist/chunks/pk-clear--mPWZP7H.js.map +1 -0
- package/dist/chunks/pk-code-editor-DSG6AwLV.js +213 -0
- package/dist/chunks/pk-code-editor-DSG6AwLV.js.map +1 -0
- package/dist/chunks/pk-color-input-D4L0DE5S.js +398 -0
- package/dist/chunks/pk-color-input-D4L0DE5S.js.map +1 -0
- package/dist/chunks/pk-combobox-Dd1ik0Ko.js +2015 -0
- package/dist/chunks/pk-combobox-Dd1ik0Ko.js.map +1 -0
- package/dist/chunks/pk-copy-button-DPh5TOF9.js +139 -0
- package/dist/chunks/pk-copy-button-DPh5TOF9.js.map +1 -0
- package/dist/chunks/pk-date-picker-CkwU4DzD.js +717 -0
- package/dist/chunks/pk-date-picker-CkwU4DzD.js.map +1 -0
- package/dist/chunks/pk-dialog-DZZd1Tzb.js +636 -0
- package/dist/chunks/pk-dialog-DZZd1Tzb.js.map +1 -0
- package/dist/chunks/pk-dropdown-item-BFyjtsL5.js +547 -0
- package/dist/chunks/pk-dropdown-item-BFyjtsL5.js.map +1 -0
- package/dist/chunks/pk-dropdown-label-DfACId-K.js +48 -0
- package/dist/chunks/pk-dropdown-label-DfACId-K.js.map +1 -0
- package/dist/chunks/pk-dropdown-menu-DWlxkDIs.js +735 -0
- package/dist/chunks/pk-dropdown-menu-DWlxkDIs.js.map +1 -0
- package/dist/chunks/pk-editable-table-pBkD6izs.js +1528 -0
- package/dist/chunks/pk-editable-table-pBkD6izs.js.map +1 -0
- package/dist/chunks/pk-field-Buy_AtYF.js +485 -0
- package/dist/chunks/pk-field-Buy_AtYF.js.map +1 -0
- package/dist/chunks/pk-form-associated-element-DmZKgNPL.js +260 -0
- package/dist/chunks/pk-form-associated-element-DmZKgNPL.js.map +1 -0
- package/dist/chunks/pk-input-group-CGHQKrt8.js +238 -0
- package/dist/chunks/pk-input-group-CGHQKrt8.js.map +1 -0
- package/dist/chunks/pk-input-group-addon-DXbNbsfY.js +101 -0
- package/dist/chunks/pk-input-group-addon-DXbNbsfY.js.map +1 -0
- package/dist/chunks/pk-input-group-button-XOfVLqGO.js +55 -0
- package/dist/chunks/pk-input-group-button-XOfVLqGO.js.map +1 -0
- package/dist/chunks/pk-input-group-input-CSmR5vdY.js +136 -0
- package/dist/chunks/pk-input-group-input-CSmR5vdY.js.map +1 -0
- package/dist/chunks/pk-input-group-text-C6ekhtff.js +40 -0
- package/dist/chunks/pk-input-group-text-C6ekhtff.js.map +1 -0
- package/dist/chunks/pk-input-group-textarea-DALr3pdU.js +113 -0
- package/dist/chunks/pk-input-group-textarea-DALr3pdU.js.map +1 -0
- package/dist/chunks/pk-input-naIRPWGC.js +723 -0
- package/dist/chunks/pk-input-naIRPWGC.js.map +1 -0
- package/dist/chunks/pk-lightswitch-B-rLflNq.js +432 -0
- package/dist/chunks/pk-lightswitch-B-rLflNq.js.map +1 -0
- package/dist/chunks/pk-option-C3Zqmu3z.js +312 -0
- package/dist/chunks/pk-option-C3Zqmu3z.js.map +1 -0
- package/dist/chunks/pk-option-group-CbI56A3T.js +72 -0
- package/dist/chunks/pk-option-group-CbI56A3T.js.map +1 -0
- package/dist/chunks/pk-popover-XZZdJ4WI.js +377 -0
- package/dist/chunks/pk-popover-XZZdJ4WI.js.map +1 -0
- package/dist/chunks/pk-popup-CgiXok-U.js +538 -0
- package/dist/chunks/pk-popup-CgiXok-U.js.map +1 -0
- package/dist/chunks/pk-radio-Bg02ckzC.js +233 -0
- package/dist/chunks/pk-radio-Bg02ckzC.js.map +1 -0
- package/dist/chunks/pk-radio-group-B5rps9G4.js +253 -0
- package/dist/chunks/pk-radio-group-B5rps9G4.js.map +1 -0
- package/dist/chunks/pk-scroll-area-B0V4Dr2j.js +402 -0
- package/dist/chunks/pk-scroll-area-B0V4Dr2j.js.map +1 -0
- package/dist/chunks/pk-select-B17rV6BR.js +1129 -0
- package/dist/chunks/pk-select-B17rV6BR.js.map +1 -0
- package/dist/chunks/pk-separator-CLb9n0FK.js +89 -0
- package/dist/chunks/pk-separator-CLb9n0FK.js.map +1 -0
- package/dist/chunks/pk-spinner-Blxd3SIH.js +148 -0
- package/dist/chunks/pk-spinner-Blxd3SIH.js.map +1 -0
- package/dist/chunks/pk-status-7_5dEuw-.js +92 -0
- package/dist/chunks/pk-status-7_5dEuw-.js.map +1 -0
- package/dist/chunks/pk-tab-CzV7pOdp.js +259 -0
- package/dist/chunks/pk-tab-CzV7pOdp.js.map +1 -0
- package/dist/chunks/pk-tab-heading-BWAB85ua.js +50 -0
- package/dist/chunks/pk-tab-heading-BWAB85ua.js.map +1 -0
- package/dist/chunks/pk-tab-panel-Q3Pqyq-f.js +86 -0
- package/dist/chunks/pk-tab-panel-Q3Pqyq-f.js.map +1 -0
- package/dist/chunks/pk-tabs-Cip4nbb7.js +622 -0
- package/dist/chunks/pk-tabs-Cip4nbb7.js.map +1 -0
- package/dist/chunks/pk-textarea-BEapC8Rk.js +342 -0
- package/dist/chunks/pk-textarea-BEapC8Rk.js.map +1 -0
- package/dist/chunks/pk-time-picker-DbW_hMs2.js +228 -0
- package/dist/chunks/pk-time-picker-DbW_hMs2.js.map +1 -0
- package/dist/chunks/pk-tiptap-content-DAtNbJYC.js +76 -0
- package/dist/chunks/pk-tiptap-content-DAtNbJYC.js.map +1 -0
- package/dist/chunks/pk-tiptap-editor-umIuEaXh.js +1084 -0
- package/dist/chunks/pk-tiptap-editor-umIuEaXh.js.map +1 -0
- package/dist/chunks/pk-tiptap-input-CXcYXbRa.js +250 -0
- package/dist/chunks/pk-tiptap-input-CXcYXbRa.js.map +1 -0
- package/dist/chunks/pk-toggle-5-GKVLye.js +256 -0
- package/dist/chunks/pk-toggle-5-GKVLye.js.map +1 -0
- package/dist/chunks/pk-toggle-group-CWDwYlgR.js +175 -0
- package/dist/chunks/pk-toggle-group-CWDwYlgR.js.map +1 -0
- package/dist/chunks/pk-tooltip-fcUbVGli.js +469 -0
- package/dist/chunks/pk-tooltip-fcUbVGli.js.map +1 -0
- package/dist/chunks/popup-content-animation.styles-Dc6d9quJ.js +117 -0
- package/dist/chunks/popup-content-animation.styles-Dc6d9quJ.js.map +1 -0
- package/dist/chunks/popup-placement-animation-WlEXnS85.js +60 -0
- package/dist/chunks/popup-placement-animation-WlEXnS85.js.map +1 -0
- package/dist/chunks/popup-pointer-C8lypj8V.js +21 -0
- package/dist/chunks/popup-pointer-C8lypj8V.js.map +1 -0
- package/dist/chunks/register-components-DNw6EYNo.js +15 -0
- package/dist/chunks/register-components-DNw6EYNo.js.map +1 -0
- package/dist/chunks/render-Dvc3MHQR.js +16 -0
- package/dist/chunks/render-Dvc3MHQR.js.map +1 -0
- package/dist/chunks/required-validator-CEg8dvjS.js +29 -0
- package/dist/chunks/required-validator-CEg8dvjS.js.map +1 -0
- package/dist/chunks/scroll-lock-B4o9vdzJ.js +193 -0
- package/dist/chunks/scroll-lock-B4o9vdzJ.js.map +1 -0
- package/dist/chunks/spinner-utils-CDfHypTv.js +15 -0
- package/dist/chunks/spinner-utils-CDfHypTv.js.map +1 -0
- package/dist/chunks/supports-popover-CUBsbHpS.js +7 -0
- package/dist/chunks/supports-popover-CUBsbHpS.js.map +1 -0
- package/dist/chunks/sync-listbox-separators-B1-V0oJi.js +149 -0
- package/dist/chunks/sync-listbox-separators-B1-V0oJi.js.map +1 -0
- package/dist/chunks/tiptap.styles-BytOpP0H.js +463 -0
- package/dist/chunks/tiptap.styles-BytOpP0H.js.map +1 -0
- package/dist/component-registry.d.ts +28 -0
- package/dist/component-registry.d.ts.map +1 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/button/pk-button.d.ts +91 -0
- package/dist/components/button/pk-button.d.ts.map +1 -0
- package/dist/components/button/pk-button.js +2 -0
- package/dist/components/button/pk-button.styles.d.ts +2 -0
- package/dist/components/button/pk-button.styles.d.ts.map +1 -0
- package/dist/components/button-group/button-group-item.styles.d.ts +13 -0
- package/dist/components/button-group/button-group-item.styles.d.ts.map +1 -0
- package/dist/components/button-group/index.d.ts +4 -0
- package/dist/components/button-group/index.d.ts.map +1 -0
- package/dist/components/button-group/pk-button-group-separator.d.ts +18 -0
- package/dist/components/button-group/pk-button-group-separator.d.ts.map +1 -0
- package/dist/components/button-group/pk-button-group-separator.js +2 -0
- package/dist/components/button-group/pk-button-group-separator.styles.d.ts +2 -0
- package/dist/components/button-group/pk-button-group-separator.styles.d.ts.map +1 -0
- package/dist/components/button-group/pk-button-group-text.d.ts +18 -0
- package/dist/components/button-group/pk-button-group-text.d.ts.map +1 -0
- package/dist/components/button-group/pk-button-group-text.js +2 -0
- package/dist/components/button-group/pk-button-group-text.styles.d.ts +2 -0
- package/dist/components/button-group/pk-button-group-text.styles.d.ts.map +1 -0
- package/dist/components/button-group/pk-button-group.d.ts +40 -0
- package/dist/components/button-group/pk-button-group.d.ts.map +1 -0
- package/dist/components/button-group/pk-button-group.js +2 -0
- package/dist/components/button-group/pk-button-group.styles.d.ts +2 -0
- package/dist/components/button-group/pk-button-group.styles.d.ts.map +1 -0
- package/dist/components/button-group.d.ts +2 -0
- package/dist/components/button-group.js +4 -0
- package/dist/components/button.d.ts +2 -0
- package/dist/components/button.js +2 -0
- package/dist/components/calendar/index.d.ts +3 -0
- package/dist/components/calendar/index.d.ts.map +1 -0
- package/dist/components/calendar/pk-calendar.d.ts +117 -0
- package/dist/components/calendar/pk-calendar.d.ts.map +1 -0
- package/dist/components/calendar/pk-calendar.js +2 -0
- package/dist/components/calendar/pk-calendar.styles.d.ts +2 -0
- package/dist/components/calendar/pk-calendar.styles.d.ts.map +1 -0
- package/dist/components/calendar.d.ts +2 -0
- package/dist/components/calendar.js +2 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/index.d.ts.map +1 -0
- package/dist/components/checkbox/pk-checkbox.d.ts +50 -0
- package/dist/components/checkbox/pk-checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/pk-checkbox.js +2 -0
- package/dist/components/checkbox/pk-checkbox.styles.d.ts +2 -0
- package/dist/components/checkbox/pk-checkbox.styles.d.ts.map +1 -0
- package/dist/components/checkbox-select/index.d.ts +2 -0
- package/dist/components/checkbox-select/index.d.ts.map +1 -0
- package/dist/components/checkbox-select/pk-checkbox-select.d.ts +48 -0
- package/dist/components/checkbox-select/pk-checkbox-select.d.ts.map +1 -0
- package/dist/components/checkbox-select/pk-checkbox-select.js +2 -0
- package/dist/components/checkbox-select/pk-checkbox-select.styles.d.ts +2 -0
- package/dist/components/checkbox-select/pk-checkbox-select.styles.d.ts.map +1 -0
- package/dist/components/checkbox-select.d.ts +2 -0
- package/dist/components/checkbox-select.js +2 -0
- package/dist/components/checkbox.d.ts +2 -0
- package/dist/components/checkbox.js +2 -0
- package/dist/components/code-editor/index.d.ts +2 -0
- package/dist/components/code-editor/index.d.ts.map +1 -0
- package/dist/components/code-editor/pk-code-editor.d.ts +40 -0
- package/dist/components/code-editor/pk-code-editor.d.ts.map +1 -0
- package/dist/components/code-editor/pk-code-editor.js +2 -0
- package/dist/components/code-editor/pk-code-editor.styles.d.ts +2 -0
- package/dist/components/code-editor/pk-code-editor.styles.d.ts.map +1 -0
- package/dist/components/code-editor.d.ts +2 -0
- package/dist/components/code-editor.js +2 -0
- package/dist/components/color-input/index.d.ts +2 -0
- package/dist/components/color-input/index.d.ts.map +1 -0
- package/dist/components/color-input/pk-color-input.d.ts +41 -0
- package/dist/components/color-input/pk-color-input.d.ts.map +1 -0
- package/dist/components/color-input/pk-color-input.js +2 -0
- package/dist/components/color-input/pk-color-input.styles.d.ts +7 -0
- package/dist/components/color-input/pk-color-input.styles.d.ts.map +1 -0
- package/dist/components/color-input.d.ts +2 -0
- package/dist/components/color-input.js +2 -0
- package/dist/components/combobox/index.d.ts +2 -0
- package/dist/components/combobox/index.d.ts.map +1 -0
- package/dist/components/combobox/pk-combobox.d.ts +219 -0
- package/dist/components/combobox/pk-combobox.d.ts.map +1 -0
- package/dist/components/combobox/pk-combobox.js +2 -0
- package/dist/components/combobox/pk-combobox.styles.d.ts +2 -0
- package/dist/components/combobox/pk-combobox.styles.d.ts.map +1 -0
- package/dist/components/combobox.d.ts +2 -0
- package/dist/components/combobox.js +2 -0
- package/dist/components/copy-button/index.d.ts +2 -0
- package/dist/components/copy-button/index.d.ts.map +1 -0
- package/dist/components/copy-button/pk-copy-button.d.ts +37 -0
- package/dist/components/copy-button/pk-copy-button.d.ts.map +1 -0
- package/dist/components/copy-button/pk-copy-button.js +2 -0
- package/dist/components/copy-button/pk-copy-button.styles.d.ts +2 -0
- package/dist/components/copy-button/pk-copy-button.styles.d.ts.map +1 -0
- package/dist/components/copy-button.d.ts +2 -0
- package/dist/components/copy-button.js +2 -0
- package/dist/components/date-picker/index.d.ts +3 -0
- package/dist/components/date-picker/index.d.ts.map +1 -0
- package/dist/components/date-picker/pk-date-picker.d.ts +107 -0
- package/dist/components/date-picker/pk-date-picker.d.ts.map +1 -0
- package/dist/components/date-picker/pk-date-picker.js +2 -0
- package/dist/components/date-picker/pk-date-picker.styles.d.ts +2 -0
- package/dist/components/date-picker/pk-date-picker.styles.d.ts.map +1 -0
- package/dist/components/date-picker.d.ts +2 -0
- package/dist/components/date-picker.js +2 -0
- package/dist/components/dialog/index.d.ts +2 -0
- package/dist/components/dialog/index.d.ts.map +1 -0
- package/dist/components/dialog/pk-dialog.d.ts +87 -0
- package/dist/components/dialog/pk-dialog.d.ts.map +1 -0
- package/dist/components/dialog/pk-dialog.js +2 -0
- package/dist/components/dialog/pk-dialog.styles.d.ts +2 -0
- package/dist/components/dialog/pk-dialog.styles.d.ts.map +1 -0
- package/dist/components/dialog.d.ts +2 -0
- package/dist/components/dialog.js +2 -0
- package/dist/components/dropdown-menu/dropdown-menu-size.styles.d.ts +11 -0
- package/dist/components/dropdown-menu/dropdown-menu-size.styles.d.ts.map +1 -0
- package/dist/components/dropdown-menu/index.d.ts +5 -0
- package/dist/components/dropdown-menu/index.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-item.d.ts +67 -0
- package/dist/components/dropdown-menu/pk-dropdown-item.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-item.js +2 -0
- package/dist/components/dropdown-menu/pk-dropdown-item.styles.d.ts +2 -0
- package/dist/components/dropdown-menu/pk-dropdown-item.styles.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-label.d.ts +13 -0
- package/dist/components/dropdown-menu/pk-dropdown-label.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-label.js +2 -0
- package/dist/components/dropdown-menu/pk-dropdown-label.styles.d.ts +2 -0
- package/dist/components/dropdown-menu/pk-dropdown-label.styles.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-menu.d.ts +130 -0
- package/dist/components/dropdown-menu/pk-dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-menu.js +2 -0
- package/dist/components/dropdown-menu/pk-dropdown-menu.styles.d.ts +6 -0
- package/dist/components/dropdown-menu/pk-dropdown-menu.styles.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-separator.d.ts +13 -0
- package/dist/components/dropdown-menu/pk-dropdown-separator.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-separator.js +36 -0
- package/dist/components/dropdown-menu/pk-dropdown-separator.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +2 -0
- package/dist/components/dropdown-menu.js +5 -0
- package/dist/components/editable-table/editable-table-dnd.d.ts +64 -0
- package/dist/components/editable-table/editable-table-dnd.d.ts.map +1 -0
- package/dist/components/editable-table/editable-table-model.d.ts +93 -0
- package/dist/components/editable-table/editable-table-model.d.ts.map +1 -0
- package/dist/components/editable-table/index.d.ts +3 -0
- package/dist/components/editable-table/index.d.ts.map +1 -0
- package/dist/components/editable-table/pk-editable-table.d.ts +122 -0
- package/dist/components/editable-table/pk-editable-table.d.ts.map +1 -0
- package/dist/components/editable-table/pk-editable-table.js +2 -0
- package/dist/components/editable-table/pk-editable-table.styles.d.ts +2 -0
- package/dist/components/editable-table/pk-editable-table.styles.d.ts.map +1 -0
- package/dist/components/editable-table.d.ts +2 -0
- package/dist/components/editable-table.js +2 -0
- package/dist/components/field/index.d.ts +2 -0
- package/dist/components/field/index.d.ts.map +1 -0
- package/dist/components/field/pk-field.d.ts +69 -0
- package/dist/components/field/pk-field.d.ts.map +1 -0
- package/dist/components/field/pk-field.js +2 -0
- package/dist/components/field/pk-field.styles.d.ts +2 -0
- package/dist/components/field/pk-field.styles.d.ts.map +1 -0
- package/dist/components/field.d.ts +2 -0
- package/dist/components/field.js +2 -0
- package/dist/components/icon/index.d.ts +2 -0
- package/dist/components/icon/index.d.ts.map +1 -0
- package/dist/components/icon/pk-icon-loader.d.ts +1 -0
- package/dist/components/icon/pk-icon-loader.d.ts.map +1 -0
- package/dist/components/icon/pk-icon.d.ts +46 -0
- package/dist/components/icon/pk-icon.d.ts.map +1 -0
- package/dist/components/icon/pk-icon.js +47 -0
- package/dist/components/icon/pk-icon.js.map +1 -0
- package/dist/components/icon.d.ts +2 -0
- package/dist/components/icon.js +2 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/input/pk-input.d.ts +83 -0
- package/dist/components/input/pk-input.d.ts.map +1 -0
- package/dist/components/input/pk-input.js +2 -0
- package/dist/components/input/pk-input.styles.d.ts +2 -0
- package/dist/components/input/pk-input.styles.d.ts.map +1 -0
- package/dist/components/input-group/index.d.ts +10 -0
- package/dist/components/input-group/index.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-addon.d.ts +23 -0
- package/dist/components/input-group/pk-input-group-addon.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-addon.js +2 -0
- package/dist/components/input-group/pk-input-group-addon.styles.d.ts +2 -0
- package/dist/components/input-group/pk-input-group-addon.styles.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-button.d.ts +22 -0
- package/dist/components/input-group/pk-input-group-button.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-button.js +2 -0
- package/dist/components/input-group/pk-input-group-button.styles.d.ts +2 -0
- package/dist/components/input-group/pk-input-group-button.styles.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-input.d.ts +28 -0
- package/dist/components/input-group/pk-input-group-input.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-input.js +2 -0
- package/dist/components/input-group/pk-input-group-input.styles.d.ts +2 -0
- package/dist/components/input-group/pk-input-group-input.styles.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-text.d.ts +18 -0
- package/dist/components/input-group/pk-input-group-text.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-text.js +2 -0
- package/dist/components/input-group/pk-input-group-text.styles.d.ts +2 -0
- package/dist/components/input-group/pk-input-group-text.styles.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-textarea.d.ts +25 -0
- package/dist/components/input-group/pk-input-group-textarea.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-textarea.js +2 -0
- package/dist/components/input-group/pk-input-group-textarea.styles.d.ts +2 -0
- package/dist/components/input-group/pk-input-group-textarea.styles.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group.d.ts +39 -0
- package/dist/components/input-group/pk-input-group.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group.js +2 -0
- package/dist/components/input-group/pk-input-group.styles.d.ts +2 -0
- package/dist/components/input-group/pk-input-group.styles.d.ts.map +1 -0
- package/dist/components/input-group.d.ts +2 -0
- package/dist/components/input-group.js +7 -0
- package/dist/components/input.d.ts +2 -0
- package/dist/components/input.js +2 -0
- package/dist/components/lightswitch/index.d.ts +2 -0
- package/dist/components/lightswitch/index.d.ts.map +1 -0
- package/dist/components/lightswitch/pk-lightswitch.d.ts +54 -0
- package/dist/components/lightswitch/pk-lightswitch.d.ts.map +1 -0
- package/dist/components/lightswitch/pk-lightswitch.js +2 -0
- package/dist/components/lightswitch/pk-lightswitch.styles.d.ts +2 -0
- package/dist/components/lightswitch/pk-lightswitch.styles.d.ts.map +1 -0
- package/dist/components/lightswitch.d.ts +2 -0
- package/dist/components/lightswitch.js +2 -0
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/index.d.ts.map +1 -0
- package/dist/components/popover/pk-popover.d.ts +90 -0
- package/dist/components/popover/pk-popover.d.ts.map +1 -0
- package/dist/components/popover/pk-popover.js +2 -0
- package/dist/components/popover/pk-popover.styles.d.ts +2 -0
- package/dist/components/popover/pk-popover.styles.d.ts.map +1 -0
- package/dist/components/popover.d.ts +2 -0
- package/dist/components/popover.js +2 -0
- package/dist/components/popup/index.d.ts +2 -0
- package/dist/components/popup/index.d.ts.map +1 -0
- package/dist/components/popup/pk-popup.d.ts +96 -0
- package/dist/components/popup/pk-popup.d.ts.map +1 -0
- package/dist/components/popup/pk-popup.js +2 -0
- package/dist/components/popup/pk-popup.styles.d.ts +2 -0
- package/dist/components/popup/pk-popup.styles.d.ts.map +1 -0
- package/dist/components/popup.d.ts +2 -0
- package/dist/components/popup.js +2 -0
- package/dist/components/radio-group/index.d.ts +3 -0
- package/dist/components/radio-group/index.d.ts.map +1 -0
- package/dist/components/radio-group/pk-radio-group.d.ts +58 -0
- package/dist/components/radio-group/pk-radio-group.d.ts.map +1 -0
- package/dist/components/radio-group/pk-radio-group.js +2 -0
- package/dist/components/radio-group/pk-radio-group.styles.d.ts +2 -0
- package/dist/components/radio-group/pk-radio-group.styles.d.ts.map +1 -0
- package/dist/components/radio-group/pk-radio.d.ts +37 -0
- package/dist/components/radio-group/pk-radio.d.ts.map +1 -0
- package/dist/components/radio-group/pk-radio.js +2 -0
- package/dist/components/radio-group/pk-radio.styles.d.ts +2 -0
- package/dist/components/radio-group/pk-radio.styles.d.ts.map +1 -0
- package/dist/components/radio-group.d.ts +2 -0
- package/dist/components/radio-group.js +3 -0
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/index.d.ts.map +1 -0
- package/dist/components/scroll-area/pk-scroll-area.d.ts +53 -0
- package/dist/components/scroll-area/pk-scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area/pk-scroll-area.js +2 -0
- package/dist/components/scroll-area/pk-scroll-area.styles.d.ts +2 -0
- package/dist/components/scroll-area/pk-scroll-area.styles.d.ts.map +1 -0
- package/dist/components/scroll-area.d.ts +2 -0
- package/dist/components/scroll-area.js +2 -0
- package/dist/components/select/index.d.ts +4 -0
- package/dist/components/select/index.d.ts.map +1 -0
- package/dist/components/select/pk-option-group.d.ts +22 -0
- package/dist/components/select/pk-option-group.d.ts.map +1 -0
- package/dist/components/select/pk-option-group.js +2 -0
- package/dist/components/select/pk-option-group.styles.d.ts +2 -0
- package/dist/components/select/pk-option-group.styles.d.ts.map +1 -0
- package/dist/components/select/pk-option.d.ts +55 -0
- package/dist/components/select/pk-option.d.ts.map +1 -0
- package/dist/components/select/pk-option.js +2 -0
- package/dist/components/select/pk-option.styles.d.ts +2 -0
- package/dist/components/select/pk-option.styles.d.ts.map +1 -0
- package/dist/components/select/pk-select.d.ts +132 -0
- package/dist/components/select/pk-select.d.ts.map +1 -0
- package/dist/components/select/pk-select.js +2 -0
- package/dist/components/select/pk-select.styles.d.ts +2 -0
- package/dist/components/select/pk-select.styles.d.ts.map +1 -0
- package/dist/components/select.d.ts +2 -0
- package/dist/components/select.js +4 -0
- package/dist/components/separator/index.d.ts +2 -0
- package/dist/components/separator/index.d.ts.map +1 -0
- package/dist/components/separator/pk-separator.d.ts +25 -0
- package/dist/components/separator/pk-separator.d.ts.map +1 -0
- package/dist/components/separator/pk-separator.js +2 -0
- package/dist/components/separator/pk-separator.styles.d.ts +9 -0
- package/dist/components/separator/pk-separator.styles.d.ts.map +1 -0
- package/dist/components/separator.d.ts +2 -0
- package/dist/components/separator.js +2 -0
- package/dist/components/spinner/index.d.ts +3 -0
- package/dist/components/spinner/index.d.ts.map +1 -0
- package/dist/components/spinner/pk-spinner.d.ts +23 -0
- package/dist/components/spinner/pk-spinner.d.ts.map +1 -0
- package/dist/components/spinner/pk-spinner.js +2 -0
- package/dist/components/spinner/pk-spinner.styles.d.ts +2 -0
- package/dist/components/spinner/pk-spinner.styles.d.ts.map +1 -0
- package/dist/components/spinner/spinner-utils.d.ts +7 -0
- package/dist/components/spinner/spinner-utils.d.ts.map +1 -0
- package/dist/components/spinner.d.ts +2 -0
- package/dist/components/spinner.js +3 -0
- package/dist/components/status/index.d.ts +2 -0
- package/dist/components/status/index.d.ts.map +1 -0
- package/dist/components/status/pk-status.d.ts +19 -0
- package/dist/components/status/pk-status.d.ts.map +1 -0
- package/dist/components/status/pk-status.js +2 -0
- package/dist/components/status/pk-status.styles.d.ts +2 -0
- package/dist/components/status/pk-status.styles.d.ts.map +1 -0
- package/dist/components/status.d.ts +2 -0
- package/dist/components/status.js +2 -0
- package/dist/components/tabs/index.d.ts +5 -0
- package/dist/components/tabs/index.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab-base.d.ts +14 -0
- package/dist/components/tabs/pk-tab-base.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab-heading.d.ts +20 -0
- package/dist/components/tabs/pk-tab-heading.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab-heading.js +2 -0
- package/dist/components/tabs/pk-tab-heading.styles.d.ts +2 -0
- package/dist/components/tabs/pk-tab-heading.styles.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab-panel-base.d.ts +9 -0
- package/dist/components/tabs/pk-tab-panel-base.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab-panel.d.ts +18 -0
- package/dist/components/tabs/pk-tab-panel.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab-panel.js +2 -0
- package/dist/components/tabs/pk-tab-panel.styles.d.ts +2 -0
- package/dist/components/tabs/pk-tab-panel.styles.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab.d.ts +23 -0
- package/dist/components/tabs/pk-tab.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab.js +2 -0
- package/dist/components/tabs/pk-tab.styles.d.ts +2 -0
- package/dist/components/tabs/pk-tab.styles.d.ts.map +1 -0
- package/dist/components/tabs/pk-tabs.d.ts +67 -0
- package/dist/components/tabs/pk-tabs.d.ts.map +1 -0
- package/dist/components/tabs/pk-tabs.js +2 -0
- package/dist/components/tabs/pk-tabs.styles.d.ts +6 -0
- package/dist/components/tabs/pk-tabs.styles.d.ts.map +1 -0
- package/dist/components/tabs.d.ts +2 -0
- package/dist/components/tabs.js +5 -0
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/textarea/index.d.ts.map +1 -0
- package/dist/components/textarea/pk-textarea.d.ts +60 -0
- package/dist/components/textarea/pk-textarea.d.ts.map +1 -0
- package/dist/components/textarea/pk-textarea.js +2 -0
- package/dist/components/textarea/pk-textarea.styles.d.ts +2 -0
- package/dist/components/textarea/pk-textarea.styles.d.ts.map +1 -0
- package/dist/components/textarea.d.ts +2 -0
- package/dist/components/textarea.js +2 -0
- package/dist/components/time-picker/index.d.ts +2 -0
- package/dist/components/time-picker/index.d.ts.map +1 -0
- package/dist/components/time-picker/pk-time-picker.d.ts +25 -0
- package/dist/components/time-picker/pk-time-picker.d.ts.map +1 -0
- package/dist/components/time-picker/pk-time-picker.js +2 -0
- package/dist/components/time-picker/pk-time-picker.styles.d.ts +2 -0
- package/dist/components/time-picker/pk-time-picker.styles.d.ts.map +1 -0
- package/dist/components/time-picker.d.ts +2 -0
- package/dist/components/time-picker.js +2 -0
- package/dist/components/tiptap/index.d.ts +4 -0
- package/dist/components/tiptap/index.d.ts.map +1 -0
- package/dist/components/tiptap/pk-tiptap-content.d.ts +25 -0
- package/dist/components/tiptap/pk-tiptap-content.d.ts.map +1 -0
- package/dist/components/tiptap/pk-tiptap-content.js +2 -0
- package/dist/components/tiptap/pk-tiptap-content.styles.d.ts +2 -0
- package/dist/components/tiptap/pk-tiptap-content.styles.d.ts.map +1 -0
- package/dist/components/tiptap/pk-tiptap-editor.d.ts +123 -0
- package/dist/components/tiptap/pk-tiptap-editor.d.ts.map +1 -0
- package/dist/components/tiptap/pk-tiptap-editor.js +2 -0
- package/dist/components/tiptap/pk-tiptap-editor.styles.d.ts +2 -0
- package/dist/components/tiptap/pk-tiptap-editor.styles.d.ts.map +1 -0
- package/dist/components/tiptap/pk-tiptap-input.d.ts +54 -0
- package/dist/components/tiptap/pk-tiptap-input.d.ts.map +1 -0
- package/dist/components/tiptap/pk-tiptap-input.js +2 -0
- package/dist/components/tiptap/pk-tiptap-input.styles.d.ts +2 -0
- package/dist/components/tiptap/pk-tiptap-input.styles.d.ts.map +1 -0
- package/dist/components/tiptap/tiptap-editor-host.d.ts +28 -0
- package/dist/components/tiptap/tiptap-editor-host.d.ts.map +1 -0
- package/dist/components/tiptap/tiptap-toolbar.d.ts +7 -0
- package/dist/components/tiptap/tiptap-toolbar.d.ts.map +1 -0
- package/dist/components/tiptap/tiptap-utils.d.ts +13 -0
- package/dist/components/tiptap/tiptap-utils.d.ts.map +1 -0
- package/dist/components/tiptap/tiptap.styles.d.ts +12 -0
- package/dist/components/tiptap/tiptap.styles.d.ts.map +1 -0
- package/dist/components/tiptap/variable-tag-node-view.d.ts +17 -0
- package/dist/components/tiptap/variable-tag-node-view.d.ts.map +1 -0
- package/dist/components/tiptap-content.d.ts +2 -0
- package/dist/components/tiptap-content.js +2 -0
- package/dist/components/tiptap-editor.d.ts +2 -0
- package/dist/components/tiptap-editor.js +2 -0
- package/dist/components/tiptap-input.d.ts +2 -0
- package/dist/components/tiptap-input.js +2 -0
- package/dist/components/toggle/index.d.ts +2 -0
- package/dist/components/toggle/index.d.ts.map +1 -0
- package/dist/components/toggle/pk-toggle.d.ts +28 -0
- package/dist/components/toggle/pk-toggle.d.ts.map +1 -0
- package/dist/components/toggle/pk-toggle.js +2 -0
- package/dist/components/toggle/pk-toggle.styles.d.ts +2 -0
- package/dist/components/toggle/pk-toggle.styles.d.ts.map +1 -0
- package/dist/components/toggle-group/index.d.ts +2 -0
- package/dist/components/toggle-group/index.d.ts.map +1 -0
- package/dist/components/toggle-group/pk-toggle-group.d.ts +43 -0
- package/dist/components/toggle-group/pk-toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group/pk-toggle-group.js +2 -0
- package/dist/components/toggle-group/pk-toggle-group.styles.d.ts +2 -0
- package/dist/components/toggle-group/pk-toggle-group.styles.d.ts.map +1 -0
- package/dist/components/toggle-group.d.ts +2 -0
- package/dist/components/toggle-group.js +2 -0
- package/dist/components/toggle.d.ts +2 -0
- package/dist/components/toggle.js +2 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/index.d.ts.map +1 -0
- package/dist/components/tooltip/pk-tooltip.d.ts +73 -0
- package/dist/components/tooltip/pk-tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/pk-tooltip.js +2 -0
- package/dist/components/tooltip/pk-tooltip.styles.d.ts +2 -0
- package/dist/components/tooltip/pk-tooltip.styles.d.ts.map +1 -0
- package/dist/components/tooltip.d.ts +2 -0
- package/dist/components/tooltip.js +2 -0
- package/dist/create-register-components.d.ts +7 -0
- package/dist/create-register-components.d.ts.map +1 -0
- package/dist/events/overlay-lifecycle.d.ts +27 -0
- package/dist/events/overlay-lifecycle.d.ts.map +1 -0
- package/dist/events/pk-clear.d.ts +10 -0
- package/dist/events/pk-clear.d.ts.map +1 -0
- package/dist/events/pk-copy.d.ts +18 -0
- package/dist/events/pk-copy.d.ts.map +1 -0
- package/dist/events/pk-create.d.ts +11 -0
- package/dist/events/pk-create.d.ts.map +1 -0
- package/dist/events/pk-invalid.d.ts +10 -0
- package/dist/events/pk-invalid.d.ts.map +1 -0
- package/dist/events/pk-reposition.d.ts +10 -0
- package/dist/events/pk-reposition.d.ts.map +1 -0
- package/dist/icons/checkbox-indicators.d.ts +6 -0
- package/dist/icons/checkbox-indicators.d.ts.map +1 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +4 -0
- package/dist/icons/render.d.ts +7 -0
- package/dist/icons/render.d.ts.map +1 -0
- package/dist/icons/translation-icon.d.ts +2 -0
- package/dist/icons/translation-icon.d.ts.map +1 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +218 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/control-aria.d.ts +31 -0
- package/dist/internal/control-aria.d.ts.map +1 -0
- package/dist/internal/field-aria.d.ts +19 -0
- package/dist/internal/field-aria.d.ts.map +1 -0
- package/dist/internal/field-labels.d.ts +5 -0
- package/dist/internal/field-labels.d.ts.map +1 -0
- package/dist/internal/has-slot.d.ts +30 -0
- package/dist/internal/has-slot.d.ts.map +1 -0
- package/dist/internal/implicit-form-submit.d.ts +15 -0
- package/dist/internal/implicit-form-submit.d.ts.map +1 -0
- package/dist/internal/resolve-element-by-id.d.ts +3 -0
- package/dist/internal/resolve-element-by-id.d.ts.map +1 -0
- package/dist/internal/sync-listbox-separators.d.ts +3 -0
- package/dist/internal/sync-listbox-separators.d.ts.map +1 -0
- package/dist/plugin-kit.css +583 -0
- package/dist/plugin-kit.d.ts +9 -0
- package/dist/plugin-kit.d.ts.map +1 -0
- package/dist/plugin-kit.js +267 -0
- package/dist/plugin-kit.js.map +1 -0
- package/dist/plugin-kit.loader.d.ts +2 -0
- package/dist/plugin-kit.loader.d.ts.map +1 -0
- package/dist/register-components.d.ts +3 -0
- package/dist/register-components.d.ts.map +1 -0
- package/dist/register-components.js +2 -0
- package/dist/register-pk.generated.d.ts +103 -0
- package/dist/register-pk.generated.d.ts.map +1 -0
- package/dist/register.d.ts +85 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.js +146 -0
- package/dist/register.js.map +1 -0
- package/dist/styles/overlay-content.css +64 -0
- package/dist/styles/popup-content-animation.styles.d.ts +9 -0
- package/dist/styles/popup-content-animation.styles.d.ts.map +1 -0
- package/dist/tokens.css +408 -0
- package/dist/utilities/autoloader.d.ts +8 -0
- package/dist/utilities/autoloader.d.ts.map +1 -0
- package/dist/utilities/base-path.d.ts +3 -0
- package/dist/utilities/base-path.d.ts.map +1 -0
- package/dist/utilities/defined.d.ts +17 -0
- package/dist/utilities/defined.d.ts.map +1 -0
- package/dist/utilities/fouce-strategy.d.ts +43 -0
- package/dist/utilities/fouce-strategy.d.ts.map +1 -0
- package/dist/utilities/fouce.css +108 -0
- package/dist/utils/animate-with-class.d.ts +7 -0
- package/dist/utils/animate-with-class.d.ts.map +1 -0
- package/dist/utils/config.d.ts +15 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/copy-to-clipboard.d.ts +5 -0
- package/dist/utils/copy-to-clipboard.d.ts.map +1 -0
- package/dist/utils/craft-host-modal.d.ts +19 -0
- package/dist/utils/craft-host-modal.d.ts.map +1 -0
- package/dist/utils/date-matchers.d.ts +29 -0
- package/dist/utils/date-matchers.d.ts.map +1 -0
- package/dist/utils/date.d.ts +23 -0
- package/dist/utils/date.d.ts.map +1 -0
- package/dist/utils/documentScrollStability.d.ts +11 -0
- package/dist/utils/documentScrollStability.d.ts.map +1 -0
- package/dist/utils/floating-ui.d.ts +14 -0
- package/dist/utils/floating-ui.d.ts.map +1 -0
- package/dist/utils/highlight-text.d.ts +7 -0
- package/dist/utils/highlight-text.d.ts.map +1 -0
- package/dist/utils/host-date.d.ts +8 -0
- package/dist/utils/host-date.d.ts.map +1 -0
- package/dist/utils/inline-markdown.d.ts +6 -0
- package/dist/utils/inline-markdown.d.ts.map +1 -0
- package/dist/utils/listbox-keyboard.d.ts +25 -0
- package/dist/utils/listbox-keyboard.d.ts.map +1 -0
- package/dist/utils/menu-keyboard.d.ts +15 -0
- package/dist/utils/menu-keyboard.d.ts.map +1 -0
- package/dist/utils/mount-shadow-app.d.ts +31 -0
- package/dist/utils/mount-shadow-app.d.ts.map +1 -0
- package/dist/utils/overlay-recovery.d.ts +39 -0
- package/dist/utils/overlay-recovery.d.ts.map +1 -0
- package/dist/utils/popup-placement-animation.d.ts +26 -0
- package/dist/utils/popup-placement-animation.d.ts.map +1 -0
- package/dist/utils/popup-pointer.d.ts +15 -0
- package/dist/utils/popup-pointer.d.ts.map +1 -0
- package/dist/utils/portal.d.ts +16 -0
- package/dist/utils/portal.d.ts.map +1 -0
- package/dist/utils/supports-popover.d.ts +3 -0
- package/dist/utils/supports-popover.d.ts.map +1 -0
- package/dist/utils/time-options.d.ts +16 -0
- package/dist/utils/time-options.d.ts.map +1 -0
- package/dist/utils/top-layer.d.ts +34 -0
- package/dist/utils/top-layer.d.ts.map +1 -0
- package/dist/utils/week-info.d.ts +14 -0
- package/dist/utils/week-info.d.ts.map +1 -0
- package/dist/validators/custom-error-validator.d.ts +3 -0
- package/dist/validators/custom-error-validator.d.ts.map +1 -0
- package/dist/validators/index.d.ts +6 -0
- package/dist/validators/index.d.ts.map +1 -0
- package/dist/validators/mirror-validator.d.ts +4 -0
- package/dist/validators/mirror-validator.d.ts.map +1 -0
- package/dist/validators/required-validator.d.ts +7 -0
- package/dist/validators/required-validator.d.ts.map +1 -0
- package/dist/validators/types.d.ts +12 -0
- package/dist/validators/types.d.ts.map +1 -0
- package/dist-loader/chunks/animate-with-class-DT0jwaR_.js +40 -0
- package/dist-loader/chunks/button-group-item.styles-Dwakbyx5.js +145 -0
- package/dist-loader/chunks/codemirror-CSgOT0QM.js +23675 -0
- package/dist-loader/chunks/field-labels-D3lKQ2nq.js +12 -0
- package/dist-loader/chunks/floating-ui-87vslRWW.js +1220 -0
- package/dist-loader/chunks/has-slot-BGJeJdHr.js +72 -0
- package/dist-loader/chunks/icons-B1i-oRoD.js +429 -0
- package/dist-loader/chunks/lit-Dnn7gEi2.js +891 -0
- package/dist-loader/chunks/mirror-validator-C5XrXPaq.js +30 -0
- package/dist-loader/chunks/overlay-lifecycle-C3tSQ3UR.js +42 -0
- package/dist-loader/chunks/pk-a11y-Cx5RZvhu.js +274 -0
- package/dist-loader/chunks/pk-base-BlxAYXJD.js +705 -0
- package/dist-loader/chunks/pk-button-BlSs4e6V.js +846 -0
- package/dist-loader/chunks/pk-calendar-RXCDDhLI.js +1403 -0
- package/dist-loader/chunks/pk-checkbox-hJCj8In8.js +273 -0
- package/dist-loader/chunks/pk-clear-BMZUzwDt.js +13 -0
- package/dist-loader/chunks/pk-color-input-BfNtLznP.js +393 -0
- package/dist-loader/chunks/pk-combobox-1PJBcIrV.js +2006 -0
- package/dist-loader/chunks/pk-date-picker-D4vCtbw-.js +708 -0
- package/dist-loader/chunks/pk-dialog-D1RZjwQN.js +630 -0
- package/dist-loader/chunks/pk-dropdown-item-BJIhQ0Mw.js +543 -0
- package/dist-loader/chunks/pk-dropdown-menu-I1s3TBiA.js +731 -0
- package/dist-loader/chunks/pk-field-BnKPT_Kk.js +5842 -0
- package/dist-loader/chunks/pk-input-Oarjv7Vc.js +715 -0
- package/dist-loader/chunks/pk-lightswitch-D-UrNM3y.js +427 -0
- package/dist-loader/chunks/pk-option-CCZebfif.js +308 -0
- package/dist-loader/chunks/pk-popup-BNRyCsVX.js +553 -0
- package/dist-loader/chunks/pk-select-BcbtjIoP.js +1120 -0
- package/dist-loader/chunks/pk-spinner-Di9O69-m.js +145 -0
- package/dist-loader/chunks/pk-textarea-CC6WXpIu.js +334 -0
- package/dist-loader/chunks/pk-time-picker-BtGXo-KJ.js +225 -0
- package/dist-loader/chunks/pk-tooltip-JJRxVXYD.js +465 -0
- package/dist-loader/chunks/popup-content-animation.styles-S6CK-zPp.js +115 -0
- package/dist-loader/chunks/popup-placement-animation-WlEXnS85.js +58 -0
- package/dist-loader/chunks/popup-pointer-BC4n_sNb.js +19 -0
- package/dist-loader/chunks/registry-CmL0rH9r.js +55 -0
- package/dist-loader/chunks/render-DApFfV9S.js +14 -0
- package/dist-loader/chunks/required-validator-0XwZtX9k.js +27 -0
- package/dist-loader/chunks/rolldown-runtime-CzwdidQP.js +13 -0
- package/dist-loader/chunks/supports-popover-COjbi2RP.js +5 -0
- package/dist-loader/chunks/svg-Boar0Kf1.js +34 -0
- package/dist-loader/chunks/sync-listbox-separators-Bcja51HC.js +147 -0
- package/dist-loader/chunks/tiptap-Db7MTUH1.js +22888 -0
- package/dist-loader/chunks/tiptap.styles-DAH_90Fi.js +1628 -0
- package/dist-loader/components/button/button.js +2 -0
- package/dist-loader/components/button-group/button-group-separator.js +58 -0
- package/dist-loader/components/button-group/button-group-text.js +46 -0
- package/dist-loader/components/button-group/button-group.js +419 -0
- package/dist-loader/components/calendar/calendar.js +2 -0
- package/dist-loader/components/checkbox/checkbox.js +2 -0
- package/dist-loader/components/checkbox-select/checkbox-select.js +217 -0
- package/dist-loader/components/code-editor/code-editor.js +376 -0
- package/dist-loader/components/color-input/color-input.js +2 -0
- package/dist-loader/components/combobox/combobox.js +2 -0
- package/dist-loader/components/copy-button/copy-button.js +135 -0
- package/dist-loader/components/date-picker/date-picker.js +2 -0
- package/dist-loader/components/dialog/dialog.js +2 -0
- package/dist-loader/components/dropdown-menu/dropdown-item.js +2 -0
- package/dist-loader/components/dropdown-menu/dropdown-label.js +45 -0
- package/dist-loader/components/dropdown-menu/dropdown-menu.js +2 -0
- package/dist-loader/components/dropdown-menu/dropdown-separator.js +33 -0
- package/dist-loader/components/editable-table/editable-table.js +1522 -0
- package/dist-loader/components/field/field.js +2 -0
- package/dist-loader/components/icon/icon.js +17 -0
- package/dist-loader/components/input/input.js +2 -0
- package/dist-loader/components/input-group/input-group-addon.js +98 -0
- package/dist-loader/components/input-group/input-group-button.js +52 -0
- package/dist-loader/components/input-group/input-group-input.js +132 -0
- package/dist-loader/components/input-group/input-group-text.js +37 -0
- package/dist-loader/components/input-group/input-group-textarea.js +110 -0
- package/dist-loader/components/input-group/input-group.js +234 -0
- package/dist-loader/components/lightswitch/lightswitch.js +2 -0
- package/dist-loader/components/popover/popover.js +372 -0
- package/dist-loader/components/popup/popup.js +2 -0
- package/dist-loader/components/radio-group/radio-group.js +247 -0
- package/dist-loader/components/radio-group/radio.js +229 -0
- package/dist-loader/components/scroll-area/scroll-area.js +398 -0
- package/dist-loader/components/select/option-group.js +69 -0
- package/dist-loader/components/select/option.js +2 -0
- package/dist-loader/components/select/select.js +2 -0
- package/dist-loader/components/separator/separator.js +86 -0
- package/dist-loader/components/spinner/spinner.js +2 -0
- package/dist-loader/components/status/status.js +89 -0
- package/dist-loader/components/tabs/tab-heading.js +47 -0
- package/dist-loader/components/tabs/tab-panel.js +83 -0
- package/dist-loader/components/tabs/tab.js +256 -0
- package/dist-loader/components/tabs/tabs.js +619 -0
- package/dist-loader/components/textarea/textarea.js +2 -0
- package/dist-loader/components/time-picker/time-picker.js +2 -0
- package/dist-loader/components/tiptap/tiptap-content.js +72 -0
- package/dist-loader/components/tiptap/tiptap-editor.js +1078 -0
- package/dist-loader/components/tiptap/tiptap-input.js +244 -0
- package/dist-loader/components/toggle/toggle.js +253 -0
- package/dist-loader/components/toggle-group/toggle-group.js +172 -0
- package/dist-loader/components/tooltip/tooltip.js +2 -0
- package/dist-loader/plugin-kit.css +583 -0
- package/dist-loader/plugin-kit.d.ts +9 -0
- package/dist-loader/plugin-kit.d.ts.map +1 -0
- package/dist-loader/plugin-kit.loader.d.ts +2 -0
- package/dist-loader/plugin-kit.loader.d.ts.map +1 -0
- package/dist-loader/plugin-kit.loader.js +527 -0
- package/dist-loader/styles/overlay-content.css +64 -0
- package/dist-loader/tokens.css +408 -0
- package/dist-loader/utilities/autoloader.d.ts +8 -0
- package/dist-loader/utilities/autoloader.d.ts.map +1 -0
- package/dist-loader/utilities/base-path.d.ts +3 -0
- package/dist-loader/utilities/base-path.d.ts.map +1 -0
- package/dist-loader/utilities/defined.d.ts +17 -0
- package/dist-loader/utilities/defined.d.ts.map +1 -0
- package/dist-loader/utilities/fouce-strategy.d.ts +43 -0
- package/dist-loader/utilities/fouce-strategy.d.ts.map +1 -0
- package/dist-loader/utilities/fouce.css +108 -0
- package/package.json +961 -0
|
@@ -0,0 +1,2015 @@
|
|
|
1
|
+
import { t as icons_exports } from "./icons-BR8JcQj2.js";
|
|
2
|
+
import { t as __decorate } from "./decorate-W02hmVTt.js";
|
|
3
|
+
import { t as iconStyles } from "./icon.styles-BLTWLqYp.js";
|
|
4
|
+
import { t as PkFormAssociatedElement } from "./pk-form-associated-element-DmZKgNPL.js";
|
|
5
|
+
import { t as MirrorValidator } from "./mirror-validator-DCjNYrrx.js";
|
|
6
|
+
import { t as HasSlotController } from "./has-slot-8BvCt_qo.js";
|
|
7
|
+
import { n as renderIconHtml } from "./render-Dvc3MHQR.js";
|
|
8
|
+
import { i as uniqueId, t as LiveRegion } from "./focus-aa5dlv8k.js";
|
|
9
|
+
import { i as unregisterDismissible, n as isTopDismissible, r as registerDismissible } from "./dismissible-stack-XQUMfKO3.js";
|
|
10
|
+
import { i as scrollIntoView } from "./scroll-lock-B4o9vdzJ.js";
|
|
11
|
+
import { t as PkClearEvent } from "./pk-clear--mPWZP7H.js";
|
|
12
|
+
import { i as PkShowEvent, n as PkAfterShowEvent, r as PkHideEvent, t as PkAfterHideEvent } from "./overlay-lifecycle-D0pkTQyI.js";
|
|
13
|
+
import { i as waitForPopupReposition, r as syncPopupPlacementAnimation } from "./popup-placement-animation-WlEXnS85.js";
|
|
14
|
+
import { a as isListboxTypeToSelectKey, i as handleListboxKeyDown, n as LISTBOX_NAVIGATION_KEYS, t as syncListboxSeparators } from "./sync-listbox-separators-B1-V0oJi.js";
|
|
15
|
+
import { n as isPointerInsideOverlay, t as isEventInsideOverlay } from "./popup-pointer-C8lypj8V.js";
|
|
16
|
+
import { t as popupContentAnimationStyles } from "./popup-content-animation.styles-Dc6d9quJ.js";
|
|
17
|
+
import { css, html, nothing } from "lit";
|
|
18
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
19
|
+
import { customElement, property, query, state } from "lit/decorators.js";
|
|
20
|
+
import { unsafeSVG } from "lit/directives/unsafe-svg.js";
|
|
21
|
+
//#region src/events/pk-create.ts
|
|
22
|
+
/** Fired before a combobox creates a new option — mirrors `pk-create`. */
|
|
23
|
+
var PkCreateEvent = class extends Event {
|
|
24
|
+
constructor(inputValue) {
|
|
25
|
+
super("pk-create", {
|
|
26
|
+
bubbles: true,
|
|
27
|
+
cancelable: true,
|
|
28
|
+
composed: true
|
|
29
|
+
});
|
|
30
|
+
this.inputValue = inputValue;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/components/combobox/pk-combobox.styles.ts
|
|
35
|
+
var pkComboboxStyles = [popupContentAnimationStyles, css`
|
|
36
|
+
${iconStyles}
|
|
37
|
+
@layer pk-component {
|
|
38
|
+
:host {
|
|
39
|
+
display: inline-block;
|
|
40
|
+
position: relative;
|
|
41
|
+
width: fit-content;
|
|
42
|
+
max-width: 100%;
|
|
43
|
+
align-self: flex-start;
|
|
44
|
+
flex: none;
|
|
45
|
+
color: var(--pk-color-gray-700);
|
|
46
|
+
font-family: var(--pk-font-family);
|
|
47
|
+
font-size: var(--pk-font-size-base);
|
|
48
|
+
line-height: var(--pk-line-height);
|
|
49
|
+
--pk-combobox-min-height: 0;
|
|
50
|
+
--pk-combobox-trigger-min-height: var(--pk-btn-height-default);
|
|
51
|
+
--pk-combobox-padding-block: 6px;
|
|
52
|
+
--pk-combobox-padding-inline: 10px;
|
|
53
|
+
--pk-combobox-font-size: var(--pk-font-size-base);
|
|
54
|
+
--pk-combobox-line-height: var(--pk-input-control-line-height, 1.25rem);
|
|
55
|
+
--pk-combobox-decoration-size: 0.875rem;
|
|
56
|
+
--pk-select-item-min-height: 0;
|
|
57
|
+
--pk-select-item-padding-block: 6px;
|
|
58
|
+
--pk-select-item-padding-inline: 10px;
|
|
59
|
+
--pk-select-item-padding-inline-end: 2rem;
|
|
60
|
+
--pk-select-item-font-size: 14px;
|
|
61
|
+
--pk-select-item-line-height: 1.4;
|
|
62
|
+
--pk-select-item-indicator-size: 0.75rem;
|
|
63
|
+
--pk-select-item-indicator-inset: 0.5rem;
|
|
64
|
+
/* v1 ComboboxLabel default: text-xs → 12px (was 11px). */
|
|
65
|
+
--pk-select-group-label-font-size: 12px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host([width='full']) {
|
|
69
|
+
display: block;
|
|
70
|
+
width: 100%;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:host([width='full']) .control {
|
|
74
|
+
width: 100%;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.control {
|
|
78
|
+
display: inline-flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
--pk-combobox-control-gap: 0.5rem;
|
|
81
|
+
gap: var(--pk-combobox-control-gap);
|
|
82
|
+
/* Fill the host — consumers set min-width/width on :host; fit-content here
|
|
83
|
+
left a dead hit strip beside the painted field (same class of bug as dropdown). */
|
|
84
|
+
width: 100%;
|
|
85
|
+
max-width: 100%;
|
|
86
|
+
min-width: 0;
|
|
87
|
+
min-height: var(--pk-combobox-min-height);
|
|
88
|
+
margin: 0;
|
|
89
|
+
padding: var(--pk-combobox-padding-block) var(--pk-combobox-padding-inline);
|
|
90
|
+
border: 1px solid transparent;
|
|
91
|
+
border-radius: var(--pk-radius-lg);
|
|
92
|
+
--pk-combobox-fill: var(--pk-color-slate-250);
|
|
93
|
+
--pk-combobox-fill-hover: var(--pk-color-slate-300);
|
|
94
|
+
background: var(--pk-combobox-fill);
|
|
95
|
+
color: var(--pk-color-gray-700);
|
|
96
|
+
font: inherit;
|
|
97
|
+
font-size: var(--pk-combobox-font-size);
|
|
98
|
+
line-height: var(--pk-input-control-line-height, 1.25rem);
|
|
99
|
+
white-space: nowrap;
|
|
100
|
+
cursor: text;
|
|
101
|
+
outline: none;
|
|
102
|
+
box-sizing: border-box;
|
|
103
|
+
transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.control[data-popup-open] {
|
|
107
|
+
border-color: var(--pk-color-sky-600);
|
|
108
|
+
box-shadow: var(--pk-input-focus-shadow);
|
|
109
|
+
background: var(--pk-color-white);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
:host(:not([disabled])) .control:hover:not(.is-disabled) {
|
|
113
|
+
background: var(--pk-combobox-fill-hover);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:host(:not([disabled])) .control[data-popup-open]:hover:not(.is-disabled),
|
|
117
|
+
:host(:not([disabled])) .control[data-popup-open]:focus-within:not(.is-disabled) {
|
|
118
|
+
border-color: var(--pk-color-sky-600);
|
|
119
|
+
box-shadow: var(--pk-input-focus-shadow);
|
|
120
|
+
background: var(--pk-color-white);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:host(:not([invalid]):not(:state(user-invalid))) .control:focus-within,
|
|
124
|
+
:host(:not([invalid]):not(:state(user-invalid))[data-state='focus-visible']) .control {
|
|
125
|
+
border-color: var(--pk-color-sky-600);
|
|
126
|
+
box-shadow: var(--pk-input-focus-shadow);
|
|
127
|
+
background: var(--pk-color-white);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.control.is-disabled {
|
|
131
|
+
cursor: not-allowed;
|
|
132
|
+
opacity: 0.5;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.control-start,
|
|
136
|
+
.control-end {
|
|
137
|
+
display: inline-flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
flex-shrink: 0;
|
|
140
|
+
line-height: 0;
|
|
141
|
+
color: var(--pk-color-gray-600);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
slot[name='start']::slotted(svg),
|
|
145
|
+
slot[name='end']::slotted(svg) {
|
|
146
|
+
width: var(--pk-combobox-decoration-size);
|
|
147
|
+
height: var(--pk-combobox-decoration-size);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.combobox-input {
|
|
151
|
+
flex: 1 1 auto;
|
|
152
|
+
width: 100%;
|
|
153
|
+
min-width: 0;
|
|
154
|
+
margin: 0;
|
|
155
|
+
padding: 0;
|
|
156
|
+
border: 0;
|
|
157
|
+
background: transparent;
|
|
158
|
+
color: inherit;
|
|
159
|
+
font: inherit;
|
|
160
|
+
line-height: var(--pk-input-control-line-height, 1.25rem);
|
|
161
|
+
outline: none;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.combobox-input::placeholder {
|
|
165
|
+
color: currentColor;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
:host([data-has-value]) .combobox-input::placeholder,
|
|
169
|
+
.control[data-popup-open] .combobox-input::placeholder,
|
|
170
|
+
.control:focus-within .combobox-input::placeholder {
|
|
171
|
+
color: var(--pk-color-gray-400);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* Expand/clear: the button box IS the hit target. Negative margins cancel the
|
|
175
|
+
control padding / half-gap in layout, while matching extra width/height keeps
|
|
176
|
+
the painted (and clickable) box flush to the field edge — so flex centering
|
|
177
|
+
places the glyph in the middle of the real hit area. */
|
|
178
|
+
.icon-button,
|
|
179
|
+
.clear-button {
|
|
180
|
+
display: inline-flex;
|
|
181
|
+
align-items: center;
|
|
182
|
+
justify-content: center;
|
|
183
|
+
flex-shrink: 0;
|
|
184
|
+
align-self: stretch;
|
|
185
|
+
box-sizing: border-box;
|
|
186
|
+
width: calc(var(--pk-combobox-decoration-size) + var(--pk-combobox-control-gap));
|
|
187
|
+
height: auto;
|
|
188
|
+
min-height: var(--pk-combobox-decoration-size);
|
|
189
|
+
margin-block: calc(-1 * var(--pk-combobox-padding-block));
|
|
190
|
+
margin-inline: calc(-0.5 * var(--pk-combobox-control-gap));
|
|
191
|
+
padding: 0;
|
|
192
|
+
border: 0;
|
|
193
|
+
border-radius: 0;
|
|
194
|
+
background: transparent;
|
|
195
|
+
color: var(--pk-color-gray-600);
|
|
196
|
+
cursor: pointer;
|
|
197
|
+
outline: none;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* Trailing control absorbs the control's inline-end padding into its hit box. */
|
|
201
|
+
.control > .expand-button,
|
|
202
|
+
.control > .clear-button:last-child {
|
|
203
|
+
width: calc(
|
|
204
|
+
var(--pk-combobox-decoration-size) + (0.5 * var(--pk-combobox-control-gap)) +
|
|
205
|
+
var(--pk-combobox-padding-inline)
|
|
206
|
+
);
|
|
207
|
+
margin-inline-start: calc(-0.5 * var(--pk-combobox-control-gap));
|
|
208
|
+
margin-inline-end: calc(-1 * var(--pk-combobox-padding-inline));
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.icon-button:disabled,
|
|
212
|
+
.clear-button:disabled {
|
|
213
|
+
cursor: not-allowed;
|
|
214
|
+
opacity: 0.5;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.icon {
|
|
218
|
+
display: inline-flex;
|
|
219
|
+
align-items: center;
|
|
220
|
+
justify-content: center;
|
|
221
|
+
flex-shrink: 0;
|
|
222
|
+
line-height: 0;
|
|
223
|
+
pointer-events: none;
|
|
224
|
+
color: var(--pk-color-gray-600);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.icon svg {
|
|
228
|
+
display: block;
|
|
229
|
+
width: 0.75rem;
|
|
230
|
+
height: 0.75rem;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.clear-button-icon {
|
|
234
|
+
display: inline-flex;
|
|
235
|
+
align-items: center;
|
|
236
|
+
justify-content: center;
|
|
237
|
+
line-height: 0;
|
|
238
|
+
pointer-events: none;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.clear-button-icon svg {
|
|
242
|
+
display: block;
|
|
243
|
+
width: 0.75rem;
|
|
244
|
+
height: 0.75rem;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.control--multiple {
|
|
248
|
+
--pk-combobox-control-gap: 0.25rem;
|
|
249
|
+
flex-wrap: wrap;
|
|
250
|
+
align-items: center;
|
|
251
|
+
align-content: center;
|
|
252
|
+
width: 100%;
|
|
253
|
+
max-width: 100%;
|
|
254
|
+
height: auto;
|
|
255
|
+
min-height: 0;
|
|
256
|
+
padding: var(--pk-combobox-padding-block) var(--pk-combobox-padding-inline);
|
|
257
|
+
gap: var(--pk-combobox-control-gap);
|
|
258
|
+
border: var(--pk-input-border);
|
|
259
|
+
border-radius: var(--pk-input-border-radius);
|
|
260
|
+
background: var(--pk-input-bg);
|
|
261
|
+
cursor: text;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
:host([multiple][width='full']) .control--multiple {
|
|
265
|
+
width: 100%;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
:host([multiple]) .control:hover:not(.is-disabled) {
|
|
269
|
+
background: var(--pk-input-bg);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
:host([multiple]:not([invalid]):not(:state(user-invalid))) .control[data-popup-open],
|
|
273
|
+
:host([multiple]:not([invalid]):not(:state(user-invalid))) .control:focus-within,
|
|
274
|
+
:host([multiple]:not([invalid]):not(:state(user-invalid))[data-state='focus-visible']) .control {
|
|
275
|
+
border-color: var(--pk-color-sky-600);
|
|
276
|
+
box-shadow: var(--pk-input-focus-shadow);
|
|
277
|
+
background: var(--pk-input-bg);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.chips {
|
|
281
|
+
display: flex;
|
|
282
|
+
flex: 0 1 auto;
|
|
283
|
+
flex-wrap: wrap;
|
|
284
|
+
gap: 0.25rem;
|
|
285
|
+
align-items: center;
|
|
286
|
+
min-width: 0;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.tag {
|
|
290
|
+
/* v1 ComboboxChip: text-xs + py-[2px] → 20px; face color gray-700. */
|
|
291
|
+
--pk-combobox-tag-height: 20px;
|
|
292
|
+
--pk-combobox-tag-padding-inline-start: 6px;
|
|
293
|
+
--pk-combobox-tag-remove-width: 1.25rem;
|
|
294
|
+
display: inline-flex;
|
|
295
|
+
box-sizing: border-box;
|
|
296
|
+
align-items: center;
|
|
297
|
+
justify-content: center;
|
|
298
|
+
gap: 0.125rem;
|
|
299
|
+
max-width: 100%;
|
|
300
|
+
height: var(--pk-combobox-tag-height);
|
|
301
|
+
padding-block: 0;
|
|
302
|
+
padding-inline: var(--pk-combobox-tag-padding-inline-start) 0;
|
|
303
|
+
border-radius: var(--pk-radius-sm);
|
|
304
|
+
background: var(--pk-color-slate-200);
|
|
305
|
+
color: var(--pk-color-gray-700);
|
|
306
|
+
font-size: 12px;
|
|
307
|
+
font-weight: 500;
|
|
308
|
+
line-height: 1rem;
|
|
309
|
+
white-space: nowrap;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.tag-label {
|
|
313
|
+
overflow: hidden;
|
|
314
|
+
text-overflow: ellipsis;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/* Chip remove: fill the chip end so the glyph centers in the real target. */
|
|
318
|
+
.tag-remove {
|
|
319
|
+
display: inline-flex;
|
|
320
|
+
align-items: center;
|
|
321
|
+
justify-content: center;
|
|
322
|
+
flex-shrink: 0;
|
|
323
|
+
align-self: stretch;
|
|
324
|
+
box-sizing: border-box;
|
|
325
|
+
width: var(--pk-combobox-tag-remove-width);
|
|
326
|
+
height: auto;
|
|
327
|
+
min-height: 0;
|
|
328
|
+
margin: 0;
|
|
329
|
+
padding: 0;
|
|
330
|
+
border: 0;
|
|
331
|
+
border-radius: 0;
|
|
332
|
+
background: transparent;
|
|
333
|
+
color: inherit;
|
|
334
|
+
cursor: pointer;
|
|
335
|
+
opacity: 0.5;
|
|
336
|
+
outline: none;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.tag-remove:hover {
|
|
340
|
+
opacity: 1;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.tag-remove-icon {
|
|
344
|
+
display: inline-flex;
|
|
345
|
+
align-items: center;
|
|
346
|
+
justify-content: center;
|
|
347
|
+
line-height: 0;
|
|
348
|
+
pointer-events: none;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.tag-remove-icon svg {
|
|
352
|
+
display: block;
|
|
353
|
+
width: 0.625rem;
|
|
354
|
+
height: 0.625rem;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.combobox-input--inline {
|
|
358
|
+
flex: 1 1 4rem;
|
|
359
|
+
width: auto;
|
|
360
|
+
min-width: 4rem;
|
|
361
|
+
padding: 0;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
:host([multiple]) .control:not([data-popup-open]):not(:focus-within) {
|
|
365
|
+
background: var(--pk-input-bg);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
:host([multiple]) .combobox-input::placeholder {
|
|
369
|
+
color: var(--pk-color-gray-400);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.create-option {
|
|
373
|
+
display: flex;
|
|
374
|
+
align-items: center;
|
|
375
|
+
width: 100%;
|
|
376
|
+
margin: 0;
|
|
377
|
+
min-height: var(--pk-select-item-min-height);
|
|
378
|
+
padding-block: var(--pk-select-item-padding-block);
|
|
379
|
+
padding-inline: var(--pk-select-item-padding-inline);
|
|
380
|
+
border: 0;
|
|
381
|
+
background: transparent;
|
|
382
|
+
color: var(--pk-color-gray-700);
|
|
383
|
+
font: inherit;
|
|
384
|
+
font-size: var(--pk-select-item-font-size);
|
|
385
|
+
line-height: var(--pk-select-item-line-height);
|
|
386
|
+
text-align: left;
|
|
387
|
+
cursor: pointer;
|
|
388
|
+
outline: none;
|
|
389
|
+
box-sizing: border-box;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.create-option:hover,
|
|
393
|
+
.create-option.is-highlighted {
|
|
394
|
+
background: var(--pk-color-slate-100);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.value-input {
|
|
398
|
+
position: absolute;
|
|
399
|
+
width: 1px;
|
|
400
|
+
height: 1px;
|
|
401
|
+
padding: 0;
|
|
402
|
+
margin: -1px;
|
|
403
|
+
overflow: hidden;
|
|
404
|
+
clip: rect(0, 0, 0, 0);
|
|
405
|
+
white-space: nowrap;
|
|
406
|
+
border: 0;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.panel ::slotted(pk-separator) {
|
|
410
|
+
margin: 4px 0;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.panel {
|
|
414
|
+
width: max-content;
|
|
415
|
+
min-width: var(--pk-combobox-anchor-width, 8rem);
|
|
416
|
+
padding: 0;
|
|
417
|
+
border: 0;
|
|
418
|
+
border-radius: var(--pk-radius-md);
|
|
419
|
+
background: var(--pk-color-white);
|
|
420
|
+
box-shadow: var(--pk-shadow-popup);
|
|
421
|
+
color: var(--pk-color-gray-700);
|
|
422
|
+
outline: none;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.panel-body {
|
|
426
|
+
max-height: 16rem;
|
|
427
|
+
overflow: auto;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.panel--popup {
|
|
431
|
+
display: flex;
|
|
432
|
+
flex-direction: column;
|
|
433
|
+
overflow: hidden;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.panel--popup .panel-body {
|
|
437
|
+
flex: 1 1 auto;
|
|
438
|
+
min-height: 0;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
:host([popup-mode]) .control--popup {
|
|
442
|
+
display: inline-flex;
|
|
443
|
+
width: 100%;
|
|
444
|
+
max-width: 100%;
|
|
445
|
+
min-height: 0;
|
|
446
|
+
padding: 0;
|
|
447
|
+
border: 0;
|
|
448
|
+
border-radius: 0;
|
|
449
|
+
background: transparent;
|
|
450
|
+
gap: 0;
|
|
451
|
+
cursor: default;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
:host([popup-mode]) .control--popup:hover:not(.is-disabled) {
|
|
455
|
+
background: transparent;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/* Popup mode paints chrome on the trigger / panel input — do not keep the
|
|
459
|
+
shared .control[data-popup-open] focus ring around the closed-state button. */
|
|
460
|
+
:host([popup-mode]) .control--popup[data-popup-open],
|
|
461
|
+
:host([popup-mode]) .control--popup[data-popup-open]:hover:not(.is-disabled),
|
|
462
|
+
:host([popup-mode]) .control--popup[data-popup-open]:focus-within:not(.is-disabled),
|
|
463
|
+
:host([popup-mode]:not([invalid]):not(:state(user-invalid))) .control--popup:focus-within,
|
|
464
|
+
:host([popup-mode]:not([invalid]):not(:state(user-invalid))[data-state='focus-visible']) .control--popup {
|
|
465
|
+
border: 0;
|
|
466
|
+
box-shadow: none;
|
|
467
|
+
background: transparent;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.popup-trigger {
|
|
471
|
+
display: inline-flex;
|
|
472
|
+
align-items: center;
|
|
473
|
+
justify-content: space-between;
|
|
474
|
+
gap: 0.75rem;
|
|
475
|
+
width: 100%;
|
|
476
|
+
min-width: 12rem;
|
|
477
|
+
max-width: 100%;
|
|
478
|
+
min-height: var(--pk-combobox-trigger-min-height);
|
|
479
|
+
margin: 0;
|
|
480
|
+
padding: var(--pk-combobox-padding-block) var(--pk-combobox-padding-inline);
|
|
481
|
+
border: 1px solid transparent;
|
|
482
|
+
border-radius: var(--pk-input-border-radius);
|
|
483
|
+
/* Match input-mode fill / v1 default Button — not a white outlined field. */
|
|
484
|
+
background: var(--pk-combobox-fill, var(--pk-color-slate-250));
|
|
485
|
+
color: var(--pk-color-gray-700);
|
|
486
|
+
font: inherit;
|
|
487
|
+
font-size: var(--pk-combobox-font-size);
|
|
488
|
+
font-weight: 400;
|
|
489
|
+
line-height: var(--pk-combobox-line-height);
|
|
490
|
+
text-align: left;
|
|
491
|
+
white-space: nowrap;
|
|
492
|
+
cursor: pointer;
|
|
493
|
+
outline: none;
|
|
494
|
+
box-sizing: border-box;
|
|
495
|
+
transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.popup-trigger:hover:not(:disabled) {
|
|
499
|
+
background: var(--pk-combobox-fill-hover, var(--pk-color-slate-300));
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.popup-trigger:active:not(:disabled),
|
|
503
|
+
.control--popup[data-popup-open] .popup-trigger:not(:disabled) {
|
|
504
|
+
background: var(--pk-combobox-fill-hover, var(--pk-color-slate-300));
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.control--popup[data-popup-open] .popup-trigger:not(:disabled) {
|
|
508
|
+
border-color: transparent;
|
|
509
|
+
box-shadow: none;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.control--popup:not([data-popup-open]) .popup-trigger:focus-visible,
|
|
513
|
+
:host([data-state='focus-visible']) .control--popup:not([data-popup-open]) .popup-trigger {
|
|
514
|
+
border-color: var(--pk-color-sky-600);
|
|
515
|
+
box-shadow: var(--pk-input-focus-shadow);
|
|
516
|
+
background: var(--pk-color-white);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.popup-trigger:disabled {
|
|
520
|
+
cursor: not-allowed;
|
|
521
|
+
opacity: 0.5;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.popup-trigger-value {
|
|
525
|
+
flex: 1 1 auto;
|
|
526
|
+
min-width: 0;
|
|
527
|
+
overflow: hidden;
|
|
528
|
+
text-overflow: ellipsis;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.popup-trigger-value.is-placeholder {
|
|
532
|
+
/* Trigger label is button text, not an input placeholder — keep it readable. */
|
|
533
|
+
color: var(--pk-color-gray-700);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.popup-trigger-icon {
|
|
537
|
+
flex-shrink: 0;
|
|
538
|
+
display: inline-flex;
|
|
539
|
+
align-items: center;
|
|
540
|
+
line-height: 0;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.popup-trigger-icon svg {
|
|
544
|
+
display: block;
|
|
545
|
+
width: 0.75rem;
|
|
546
|
+
height: 0.75rem;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.panel-search {
|
|
550
|
+
flex: none;
|
|
551
|
+
padding: 0.25rem;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.panel-input {
|
|
555
|
+
display: block;
|
|
556
|
+
width: 100%;
|
|
557
|
+
min-width: 0;
|
|
558
|
+
margin: 0;
|
|
559
|
+
padding: 6px 8px;
|
|
560
|
+
border: var(--pk-input-border);
|
|
561
|
+
border-radius: var(--pk-input-border-radius);
|
|
562
|
+
background: color-mix(in srgb, var(--pk-input-bg) 30%, transparent);
|
|
563
|
+
color: var(--pk-color-gray-700);
|
|
564
|
+
font: inherit;
|
|
565
|
+
font-size: var(--pk-combobox-font-size);
|
|
566
|
+
line-height: 1.4;
|
|
567
|
+
outline: none;
|
|
568
|
+
box-sizing: border-box;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
.panel-input::placeholder {
|
|
572
|
+
color: var(--pk-color-gray-400);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
.panel-input:focus {
|
|
576
|
+
border-color: var(--pk-color-sky-600);
|
|
577
|
+
box-shadow: var(--pk-input-focus-shadow);
|
|
578
|
+
background: var(--pk-color-white);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
:host([popup-mode][size='xs']) .popup-trigger-icon svg {
|
|
582
|
+
width: 0.625rem;
|
|
583
|
+
height: 0.625rem;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
:host([popup-mode][size='xs']) .panel-input {
|
|
587
|
+
padding: 4px 8px;
|
|
588
|
+
font-size: 11px;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
:host([popup-mode][size='sm']) .panel-input {
|
|
592
|
+
font-size: 12px;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
:host([popup-mode][size='lg']) .panel-input {
|
|
596
|
+
padding-block: 8px;
|
|
597
|
+
padding-inline: 12px;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
:host([popup-mode][width='full']) .popup-trigger {
|
|
601
|
+
width: 100%;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.panel:not([data-open]):not(.closing) {
|
|
605
|
+
opacity: 0;
|
|
606
|
+
pointer-events: none;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
.panel[data-open]:not(.closing) {
|
|
610
|
+
opacity: 1;
|
|
611
|
+
pointer-events: auto;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.panel[hidden] {
|
|
615
|
+
display: none !important;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
.empty {
|
|
619
|
+
display: flex;
|
|
620
|
+
align-items: center;
|
|
621
|
+
margin: 0;
|
|
622
|
+
min-height: var(--pk-select-item-min-height, var(--pk-input-height));
|
|
623
|
+
padding-block: var(--pk-select-item-padding-block);
|
|
624
|
+
padding-inline: var(--pk-select-item-padding-inline);
|
|
625
|
+
border: var(--pk-select-trigger-border-width, 1px) solid transparent;
|
|
626
|
+
box-sizing: border-box;
|
|
627
|
+
color: var(--pk-color-gray-500);
|
|
628
|
+
font-size: var(--pk-select-item-font-size);
|
|
629
|
+
line-height: var(--pk-select-item-line-height);
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
.async-status {
|
|
633
|
+
display: flex;
|
|
634
|
+
align-items: center;
|
|
635
|
+
margin: 0;
|
|
636
|
+
min-height: var(--pk-select-item-min-height, var(--pk-input-height));
|
|
637
|
+
padding-block: var(--pk-select-item-padding-block);
|
|
638
|
+
padding-inline: var(--pk-select-item-padding-inline);
|
|
639
|
+
border: var(--pk-select-trigger-border-width, 1px) solid transparent;
|
|
640
|
+
box-sizing: border-box;
|
|
641
|
+
color: var(--pk-color-gray-500);
|
|
642
|
+
font-size: var(--pk-select-item-font-size);
|
|
643
|
+
line-height: var(--pk-select-item-line-height);
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
:host([invalid]) .control,
|
|
647
|
+
:host(:state(user-invalid)) .control {
|
|
648
|
+
border-color: var(--pk-color-rose-600);
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
:host([multiple][invalid]) .control,
|
|
652
|
+
:host([multiple]:state(user-invalid)) .control {
|
|
653
|
+
border-color: var(--pk-color-rose-600);
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
:host([invalid]) .control:focus-within,
|
|
657
|
+
:host([invalid][data-state='focus-visible']) .control,
|
|
658
|
+
:host(:state(user-invalid)) .control:focus-within,
|
|
659
|
+
:host(:state(user-invalid)[data-state='focus-visible']) .control {
|
|
660
|
+
border-color: var(--pk-color-rose-600);
|
|
661
|
+
box-shadow: var(--pk-input-invalid-focus-shadow);
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
:host([size='xs']) {
|
|
665
|
+
--pk-combobox-min-height: 0;
|
|
666
|
+
--pk-combobox-trigger-min-height: var(--pk-btn-height-xs);
|
|
667
|
+
--pk-combobox-padding-block: 4px;
|
|
668
|
+
--pk-combobox-padding-inline: 8px;
|
|
669
|
+
--pk-combobox-font-size: 11px;
|
|
670
|
+
--pk-combobox-decoration-size: 0.625rem;
|
|
671
|
+
--pk-select-item-min-height: 0;
|
|
672
|
+
--pk-select-item-padding-block: 4px;
|
|
673
|
+
--pk-select-item-padding-inline: 8px;
|
|
674
|
+
--pk-select-item-padding-inline-end: 1.75rem;
|
|
675
|
+
--pk-select-item-font-size: 11px;
|
|
676
|
+
--pk-select-item-indicator-size: 0.75rem;
|
|
677
|
+
--pk-select-item-indicator-inset: 0.5rem;
|
|
678
|
+
/* v1 ComboboxLabel xs: text-[11px] */
|
|
679
|
+
--pk-select-group-label-font-size: 11px;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
:host([size='xs']) .control {
|
|
683
|
+
border-radius: var(--pk-radius-sm);
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
:host([size='xs']) .icon svg,
|
|
687
|
+
:host([size='xs']) .clear-button-icon svg {
|
|
688
|
+
width: 0.625rem;
|
|
689
|
+
height: 0.625rem;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
:host([size='sm']) {
|
|
693
|
+
--pk-combobox-min-height: 0;
|
|
694
|
+
--pk-combobox-trigger-min-height: var(--pk-btn-height-sm);
|
|
695
|
+
--pk-combobox-padding-block: 6px;
|
|
696
|
+
--pk-combobox-padding-inline: 10px;
|
|
697
|
+
--pk-combobox-font-size: 12px;
|
|
698
|
+
--pk-combobox-decoration-size: 0.6875rem;
|
|
699
|
+
--pk-select-item-min-height: 0;
|
|
700
|
+
--pk-select-item-padding-block: 6px;
|
|
701
|
+
--pk-select-item-padding-inline: 10px;
|
|
702
|
+
--pk-select-item-padding-inline-end: 1.75rem;
|
|
703
|
+
--pk-select-item-font-size: 12px;
|
|
704
|
+
--pk-select-item-indicator-inset: 0.625rem;
|
|
705
|
+
/* v1 ComboboxLabel sm: text-[12px] — empty dropzone field picker uses sm. */
|
|
706
|
+
--pk-select-group-label-font-size: 12px;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
:host([size='sm']) .control {
|
|
710
|
+
border-radius: var(--pk-radius-md);
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
:host([size='sm']) .popup-trigger {
|
|
714
|
+
border-radius: var(--pk-radius-md);
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
:host([size='sm']) .icon svg,
|
|
718
|
+
:host([size='sm']) .clear-button-icon svg {
|
|
719
|
+
width: 0.6875rem;
|
|
720
|
+
height: 0.6875rem;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
:host([size='lg']) {
|
|
724
|
+
--pk-combobox-trigger-min-height: var(--pk-btn-height-lg);
|
|
725
|
+
--pk-combobox-padding-block: 8px;
|
|
726
|
+
--pk-combobox-padding-inline: 12px;
|
|
727
|
+
--pk-combobox-font-size: var(--pk-font-size-base);
|
|
728
|
+
--pk-combobox-decoration-size: 1rem;
|
|
729
|
+
--pk-select-item-padding-block: 8px;
|
|
730
|
+
--pk-select-item-padding-inline: 12px;
|
|
731
|
+
--pk-select-item-font-size: 14px;
|
|
732
|
+
--pk-select-item-indicator-inset: 0.75rem;
|
|
733
|
+
/* v1 ComboboxLabel lg: text-sm → 14px */
|
|
734
|
+
--pk-select-group-label-font-size: 14px;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
:host([size='xl']) {
|
|
738
|
+
--pk-combobox-trigger-min-height: var(--pk-btn-height-xl);
|
|
739
|
+
--pk-combobox-padding-block: 10px;
|
|
740
|
+
--pk-combobox-padding-inline: 14px;
|
|
741
|
+
--pk-combobox-font-size: var(--pk-font-size-base);
|
|
742
|
+
--pk-combobox-decoration-size: 1.125rem;
|
|
743
|
+
--pk-select-item-padding-block: 10px;
|
|
744
|
+
--pk-select-item-padding-inline: 14px;
|
|
745
|
+
--pk-select-item-padding-inline-end: 2.25rem;
|
|
746
|
+
--pk-select-item-font-size: 14px;
|
|
747
|
+
--pk-select-item-indicator-inset: 0.875rem;
|
|
748
|
+
/* v1 ComboboxLabel xl: text-base → 16px */
|
|
749
|
+
--pk-select-group-label-font-size: 16px;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
:host([size='xl']) .icon svg,
|
|
753
|
+
:host([size='xl']) .clear-button-icon svg {
|
|
754
|
+
width: 0.875rem;
|
|
755
|
+
height: 0.875rem;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
`];
|
|
759
|
+
//#endregion
|
|
760
|
+
//#region src/components/combobox/pk-combobox.ts
|
|
761
|
+
var CHEVRON_ICON = renderIconHtml(icons_exports.chevronDown);
|
|
762
|
+
var XMARK_ICON = renderIconHtml(icons_exports.xmark);
|
|
763
|
+
var PkCombobox = class PkCombobox extends PkFormAssociatedElement {
|
|
764
|
+
constructor(..._args) {
|
|
765
|
+
super(..._args);
|
|
766
|
+
this.assumeInteractionOn = ["blur", "input"];
|
|
767
|
+
this.open = false;
|
|
768
|
+
this.multiple = false;
|
|
769
|
+
this.placement = "bottom-start";
|
|
770
|
+
this.sideOffset = 6;
|
|
771
|
+
this.clearable = false;
|
|
772
|
+
this.withClear = false;
|
|
773
|
+
this.allowCreate = false;
|
|
774
|
+
this.allowCustomValue = false;
|
|
775
|
+
this.autoHighlight = false;
|
|
776
|
+
this.popupMode = false;
|
|
777
|
+
this.searchPlaceholder = "Search";
|
|
778
|
+
this.invalid = false;
|
|
779
|
+
this.size = "default";
|
|
780
|
+
this.placeholder = "";
|
|
781
|
+
this.emptyMessage = "No options found.";
|
|
782
|
+
this.value = "";
|
|
783
|
+
this.defaultValue = "";
|
|
784
|
+
this.values = [];
|
|
785
|
+
this.defaultValues = [];
|
|
786
|
+
this.label = "";
|
|
787
|
+
this.instructions = "";
|
|
788
|
+
this.ariaLabel = null;
|
|
789
|
+
this.loopFocus = true;
|
|
790
|
+
this.filter = null;
|
|
791
|
+
this.async = false;
|
|
792
|
+
this.loadingMessage = "Searching…";
|
|
793
|
+
this.startTypingMessage = "Start typing to search…";
|
|
794
|
+
this.fetchOptions = null;
|
|
795
|
+
this.hasSlotController = new HasSlotController(this, "start", "end");
|
|
796
|
+
this.listboxId = uniqueId("pk-combobox-listbox");
|
|
797
|
+
this.inputId = uniqueId("pk-combobox-input");
|
|
798
|
+
this.createOptionId = uniqueId("pk-combobox-create");
|
|
799
|
+
this.options = [];
|
|
800
|
+
this.inputValue = "";
|
|
801
|
+
this.hasInputSinceOpening = false;
|
|
802
|
+
this.highlightedIndex = -1;
|
|
803
|
+
this.createOptionHighlighted = false;
|
|
804
|
+
this.closing = false;
|
|
805
|
+
this.panelAnimated = false;
|
|
806
|
+
this.dismissRegistered = false;
|
|
807
|
+
this.panelEventTarget = null;
|
|
808
|
+
this.asyncFetchRequestId = 0;
|
|
809
|
+
this.selectedOptionMeta = null;
|
|
810
|
+
this.asyncLoading = false;
|
|
811
|
+
this.asyncError = null;
|
|
812
|
+
this.handleOptionsMutation = (options = {}) => {
|
|
813
|
+
const next = this.getOptionElements();
|
|
814
|
+
const changed = next.length !== this.options.length || next.some((option, index) => option !== this.options[index]);
|
|
815
|
+
this.options = next;
|
|
816
|
+
this.applySelection();
|
|
817
|
+
if (options.render !== false && changed) this.requestUpdate();
|
|
818
|
+
};
|
|
819
|
+
this.syncOptions = () => {
|
|
820
|
+
this.handleOptionsMutation({ render: true });
|
|
821
|
+
};
|
|
822
|
+
this.togglePanel = (event) => {
|
|
823
|
+
event?.preventDefault();
|
|
824
|
+
event?.stopPropagation();
|
|
825
|
+
if (this.disabled) return;
|
|
826
|
+
if (this.open || this.closing) this.closePanel("api");
|
|
827
|
+
else this.openPanel();
|
|
828
|
+
};
|
|
829
|
+
this.onDocumentPointerDown = (event) => {
|
|
830
|
+
if (this.isPointerInside(event)) return;
|
|
831
|
+
this.closePanel("light-dismiss");
|
|
832
|
+
};
|
|
833
|
+
this.onDocumentKeyDown = (event) => {
|
|
834
|
+
if (!this.open) return;
|
|
835
|
+
if (event.key === "Escape") {
|
|
836
|
+
if (!isTopDismissible(this)) return;
|
|
837
|
+
event.preventDefault();
|
|
838
|
+
event.stopPropagation();
|
|
839
|
+
this.closePanel("escape");
|
|
840
|
+
return;
|
|
841
|
+
}
|
|
842
|
+
const panelInput = this.panelInput;
|
|
843
|
+
if (panelInput && event.composedPath().includes(panelInput)) return;
|
|
844
|
+
if (!(LISTBOX_NAVIGATION_KEYS.has(event.key) || isListboxTypeToSelectKey(event))) return;
|
|
845
|
+
const panel = this.panelElement;
|
|
846
|
+
const path = event.composedPath();
|
|
847
|
+
if (!Boolean(panel && path.includes(panel))) return;
|
|
848
|
+
if (!isEventInsideOverlay(event, {
|
|
849
|
+
anchor: this.controlElement,
|
|
850
|
+
panel
|
|
851
|
+
})) return;
|
|
852
|
+
event.preventDefault();
|
|
853
|
+
event.stopPropagation();
|
|
854
|
+
this.onListboxKeyDown(event);
|
|
855
|
+
};
|
|
856
|
+
this.handleOptionSelect = (event) => {
|
|
857
|
+
const { value } = event.detail;
|
|
858
|
+
if (this.multiple) {
|
|
859
|
+
this.values = this.values.includes(value) ? this.values.filter((item) => item !== value) : [...this.values, value];
|
|
860
|
+
this.inputValue = "";
|
|
861
|
+
this.applySelection();
|
|
862
|
+
this.emitValueChange();
|
|
863
|
+
this.activeInput?.focus({ preventScroll: true });
|
|
864
|
+
return;
|
|
865
|
+
}
|
|
866
|
+
this.value = value;
|
|
867
|
+
this.syncSelectedOptionMeta();
|
|
868
|
+
this.applySelection();
|
|
869
|
+
this.closePanel("api");
|
|
870
|
+
this.emitValueChange();
|
|
871
|
+
};
|
|
872
|
+
this.handleOptionHighlight = (event) => {
|
|
873
|
+
if (!this.open) return;
|
|
874
|
+
const index = this.getEnabledVisibleOptions().findIndex((option) => option.value === event.detail.value);
|
|
875
|
+
if (index === -1 || index === this.highlightedIndex) return;
|
|
876
|
+
this.highlightedIndex = index;
|
|
877
|
+
this.syncHighlight();
|
|
878
|
+
};
|
|
879
|
+
this.handleControlMouseDown = (event) => {
|
|
880
|
+
if (this.disabled || this.usesPopupMode) return;
|
|
881
|
+
if (event.composedPath().some((node) => {
|
|
882
|
+
if (!(node instanceof HTMLElement)) return false;
|
|
883
|
+
return node.classList.contains("icon-button") || node.classList.contains("clear-button") || node.classList.contains("tag-remove");
|
|
884
|
+
})) return;
|
|
885
|
+
const isInput = event.target === this.activeInput;
|
|
886
|
+
if (!this.open && !this.closing) {
|
|
887
|
+
if (!isInput) event.preventDefault();
|
|
888
|
+
this.activeInput?.focus({ preventScroll: true });
|
|
889
|
+
this.openPanel();
|
|
890
|
+
return;
|
|
891
|
+
}
|
|
892
|
+
if (!isInput) {
|
|
893
|
+
event.preventDefault();
|
|
894
|
+
this.activeInput?.focus({ preventScroll: true });
|
|
895
|
+
}
|
|
896
|
+
};
|
|
897
|
+
this.handleTriggerKeyDown = (event) => {
|
|
898
|
+
if (this.disabled) return;
|
|
899
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
900
|
+
event.preventDefault();
|
|
901
|
+
this.togglePanel(event);
|
|
902
|
+
return;
|
|
903
|
+
}
|
|
904
|
+
if (event.key === "ArrowDown" && !this.open) {
|
|
905
|
+
event.preventDefault();
|
|
906
|
+
this.openPanel();
|
|
907
|
+
}
|
|
908
|
+
};
|
|
909
|
+
this.handleListboxKeyDownEvent = (event) => {
|
|
910
|
+
if (!this.open) return;
|
|
911
|
+
this.onListboxKeyDown(event.detail.keyboardEvent);
|
|
912
|
+
};
|
|
913
|
+
this.handleCreateMouseEnter = () => {
|
|
914
|
+
if (!this.open) return;
|
|
915
|
+
const enabled = this.getEnabledVisibleOptions();
|
|
916
|
+
this.highlightedIndex = enabled.length;
|
|
917
|
+
this.syncHighlight();
|
|
918
|
+
};
|
|
919
|
+
this.handleCreateKeyDown = (event) => {
|
|
920
|
+
event.preventDefault();
|
|
921
|
+
event.stopPropagation();
|
|
922
|
+
this.onListboxKeyDown(event);
|
|
923
|
+
};
|
|
924
|
+
}
|
|
925
|
+
static {
|
|
926
|
+
this.styles = pkComboboxStyles;
|
|
927
|
+
}
|
|
928
|
+
static get validators() {
|
|
929
|
+
return [
|
|
930
|
+
...super.validators,
|
|
931
|
+
MirrorValidator(),
|
|
932
|
+
{
|
|
933
|
+
observedAttributes: ["required"],
|
|
934
|
+
checkValidity: (element) => {
|
|
935
|
+
const combobox = element;
|
|
936
|
+
const result = {
|
|
937
|
+
message: "Please select an item in the list.",
|
|
938
|
+
isValid: true,
|
|
939
|
+
invalidKeys: []
|
|
940
|
+
};
|
|
941
|
+
if (!combobox.required) return result;
|
|
942
|
+
if (!(combobox.multiple ? combobox.values.length === 0 : !combobox.value)) return result;
|
|
943
|
+
result.isValid = false;
|
|
944
|
+
result.invalidKeys.push("valueMissing");
|
|
945
|
+
return result;
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
];
|
|
949
|
+
}
|
|
950
|
+
get panelElement() {
|
|
951
|
+
return this.popupElement?.getContentElement() ?? null;
|
|
952
|
+
}
|
|
953
|
+
get panelInput() {
|
|
954
|
+
return this.panelElement?.querySelector(".panel-input");
|
|
955
|
+
}
|
|
956
|
+
get panelBodyElement() {
|
|
957
|
+
return this.panelElement?.querySelector(".panel-body");
|
|
958
|
+
}
|
|
959
|
+
get usesPopupMode() {
|
|
960
|
+
return this.popupMode && !this.multiple;
|
|
961
|
+
}
|
|
962
|
+
get activeInput() {
|
|
963
|
+
return this.usesPopupMode ? this.panelInput : this.controlInput;
|
|
964
|
+
}
|
|
965
|
+
/** Combobox keeps focus on the text field and uses `aria-activedescendant` for highlight. */
|
|
966
|
+
keepsFocusOnInput() {
|
|
967
|
+
return Boolean(this.activeInput);
|
|
968
|
+
}
|
|
969
|
+
maintainInputFocus() {
|
|
970
|
+
this.activeInput?.focus({ preventScroll: true });
|
|
971
|
+
}
|
|
972
|
+
get listScrollContainer() {
|
|
973
|
+
return this.panelBodyElement ?? this.panelElement ?? this;
|
|
974
|
+
}
|
|
975
|
+
connectedCallback() {
|
|
976
|
+
this.instructions = this.getAttribute("hint") ?? this.instructions;
|
|
977
|
+
this.refreshOptions();
|
|
978
|
+
super.connectedCallback();
|
|
979
|
+
this.syncHasValueAttribute();
|
|
980
|
+
this.addEventListener("pk-listbox-keydown", this.handleListboxKeyDownEvent);
|
|
981
|
+
this.optionsObserver = new MutationObserver(() => {
|
|
982
|
+
this.handleOptionsMutation({ render: true });
|
|
983
|
+
});
|
|
984
|
+
this.optionsObserver.observe(this, {
|
|
985
|
+
childList: true,
|
|
986
|
+
subtree: true
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
disconnectedCallback() {
|
|
990
|
+
this.unbindPanelEvents();
|
|
991
|
+
this.removeEventListener("pk-listbox-keydown", this.handleListboxKeyDownEvent);
|
|
992
|
+
this.optionsObserver?.disconnect();
|
|
993
|
+
this.liveRegion?.destroy();
|
|
994
|
+
this.liveRegion = void 0;
|
|
995
|
+
window.clearTimeout(this.asyncFetchTimer);
|
|
996
|
+
this.fetchAbortController?.abort();
|
|
997
|
+
this.closePanel("api");
|
|
998
|
+
super.disconnectedCallback();
|
|
999
|
+
}
|
|
1000
|
+
updated(changed) {
|
|
1001
|
+
if (changed.has("value") || changed.has("values") || changed.has("multiple")) {
|
|
1002
|
+
this.syncHasValueAttribute();
|
|
1003
|
+
this.syncSelectedOptionMeta();
|
|
1004
|
+
this.applySelection();
|
|
1005
|
+
}
|
|
1006
|
+
super.updated(changed);
|
|
1007
|
+
}
|
|
1008
|
+
get validationTarget() {
|
|
1009
|
+
return this.activeInput ?? this.popupTrigger ?? this.controlElement;
|
|
1010
|
+
}
|
|
1011
|
+
getAriaMirrorTarget() {
|
|
1012
|
+
return this.activeInput ?? this.popupTrigger ?? this.controlElement ?? null;
|
|
1013
|
+
}
|
|
1014
|
+
syncFormValue() {
|
|
1015
|
+
if (!this.name) {
|
|
1016
|
+
this.setFormValue(null);
|
|
1017
|
+
return;
|
|
1018
|
+
}
|
|
1019
|
+
if (this.multiple) {
|
|
1020
|
+
const formData = new FormData();
|
|
1021
|
+
for (const item of this.values) formData.append(this.name, item);
|
|
1022
|
+
this.setFormValue(formData);
|
|
1023
|
+
return;
|
|
1024
|
+
}
|
|
1025
|
+
this.setFormValue(this.value || "");
|
|
1026
|
+
}
|
|
1027
|
+
resetToDefaultValue() {
|
|
1028
|
+
if (this.multiple) this.values = [...this.defaultValues];
|
|
1029
|
+
else this.value = this.defaultValue;
|
|
1030
|
+
this.inputValue = "";
|
|
1031
|
+
this.applySelection();
|
|
1032
|
+
}
|
|
1033
|
+
restoreFormState(state) {
|
|
1034
|
+
if (state instanceof FormData && this.name) {
|
|
1035
|
+
this.values = state.getAll(this.name).map(String);
|
|
1036
|
+
return;
|
|
1037
|
+
}
|
|
1038
|
+
if (typeof state === "string") this.value = state;
|
|
1039
|
+
}
|
|
1040
|
+
syncHasValueAttribute() {
|
|
1041
|
+
this.toggleAttribute("data-has-value", this.hasSelection());
|
|
1042
|
+
}
|
|
1043
|
+
getOptionElements() {
|
|
1044
|
+
const portaled = this.popupElement?.getContentElement()?.querySelectorAll("pk-option");
|
|
1045
|
+
if (portaled && portaled.length > 0) return [...portaled];
|
|
1046
|
+
return [...this.querySelectorAll("pk-option")];
|
|
1047
|
+
}
|
|
1048
|
+
refreshOptions() {
|
|
1049
|
+
this.handleOptionsMutation({ render: false });
|
|
1050
|
+
}
|
|
1051
|
+
/** Portaled listbox options are outside the host tree — listen on the panel instead. */
|
|
1052
|
+
bindPanelEvents() {
|
|
1053
|
+
const panel = this.panelElement;
|
|
1054
|
+
if (!panel || panel === this.panelEventTarget) return;
|
|
1055
|
+
this.unbindPanelEvents();
|
|
1056
|
+
this.panelEventTarget = panel;
|
|
1057
|
+
panel.addEventListener("pk-option-select", this.handleOptionSelect);
|
|
1058
|
+
panel.addEventListener("pk-option-highlight", this.handleOptionHighlight);
|
|
1059
|
+
panel.addEventListener("pk-listbox-keydown", this.handleListboxKeyDownEvent);
|
|
1060
|
+
}
|
|
1061
|
+
unbindPanelEvents() {
|
|
1062
|
+
if (!this.panelEventTarget) return;
|
|
1063
|
+
this.panelEventTarget.removeEventListener("pk-option-select", this.handleOptionSelect);
|
|
1064
|
+
this.panelEventTarget.removeEventListener("pk-option-highlight", this.handleOptionHighlight);
|
|
1065
|
+
this.panelEventTarget.removeEventListener("pk-listbox-keydown", this.handleListboxKeyDownEvent);
|
|
1066
|
+
this.panelEventTarget = null;
|
|
1067
|
+
}
|
|
1068
|
+
isOptionInHiddenGroup(option) {
|
|
1069
|
+
const group = option.closest("pk-option-group");
|
|
1070
|
+
return Boolean(group?.hidden);
|
|
1071
|
+
}
|
|
1072
|
+
defaultFilter(option, query) {
|
|
1073
|
+
const label = option.getLabel().toLowerCase();
|
|
1074
|
+
const value = option.value.toLowerCase();
|
|
1075
|
+
const searchText = (option.getSearchText?.() ?? label).toLowerCase();
|
|
1076
|
+
return label.includes(query) || value.includes(query) || searchText.includes(query);
|
|
1077
|
+
}
|
|
1078
|
+
matchesFilter(option, query) {
|
|
1079
|
+
if (this.filter) return this.filter(option, query);
|
|
1080
|
+
return this.defaultFilter(option, query);
|
|
1081
|
+
}
|
|
1082
|
+
getFilterQuery() {
|
|
1083
|
+
if (!this.open) return "";
|
|
1084
|
+
if (!this.multiple && !this.hasInputSinceOpening && !this.usesPopupMode) return "";
|
|
1085
|
+
return this.inputValue.trim().toLowerCase();
|
|
1086
|
+
}
|
|
1087
|
+
getVisibleOptions() {
|
|
1088
|
+
if (this.usesAsyncSearch) return this.options.filter((option) => !this.isOptionInHiddenGroup(option));
|
|
1089
|
+
const filter = this.getFilterQuery();
|
|
1090
|
+
return this.options.filter((option) => {
|
|
1091
|
+
if (this.isOptionInHiddenGroup(option)) return false;
|
|
1092
|
+
if (!filter) return true;
|
|
1093
|
+
return this.matchesFilter(option, filter);
|
|
1094
|
+
});
|
|
1095
|
+
}
|
|
1096
|
+
getEnabledVisibleOptions() {
|
|
1097
|
+
return this.getVisibleOptions().filter((option) => !option.disabled);
|
|
1098
|
+
}
|
|
1099
|
+
getSelectedOptions() {
|
|
1100
|
+
if (this.multiple) {
|
|
1101
|
+
const optionsByValue = new Map(this.options.map((option) => [option.value, option]));
|
|
1102
|
+
return this.values.map((value) => optionsByValue.get(value)).filter((option) => option !== void 0);
|
|
1103
|
+
}
|
|
1104
|
+
const selected = this.options.find((option) => option.value === this.value);
|
|
1105
|
+
return selected ? [selected] : [];
|
|
1106
|
+
}
|
|
1107
|
+
getSelectedOption() {
|
|
1108
|
+
return this.options.find((option) => option.value === this.value);
|
|
1109
|
+
}
|
|
1110
|
+
get usesAsyncSearch() {
|
|
1111
|
+
return this.async && Boolean(this.fetchOptions) && !this.multiple && !this.usesPopupMode;
|
|
1112
|
+
}
|
|
1113
|
+
getSelectedLabel() {
|
|
1114
|
+
return this.getSelectedOption()?.getLabel() ?? this.selectedOptionMeta?.label ?? this.value;
|
|
1115
|
+
}
|
|
1116
|
+
clearAsyncOptionNodes() {
|
|
1117
|
+
this.querySelectorAll(":scope > pk-option, :scope > pk-option-group, :scope > pk-separator").forEach((node) => node.remove());
|
|
1118
|
+
}
|
|
1119
|
+
renderAsyncOptionNodes(items) {
|
|
1120
|
+
const merged = this.mergeAsyncItems(items);
|
|
1121
|
+
this.clearAsyncOptionNodes();
|
|
1122
|
+
for (const item of merged) {
|
|
1123
|
+
const option = document.createElement("pk-option");
|
|
1124
|
+
option.value = item.value;
|
|
1125
|
+
option.textContent = item.label;
|
|
1126
|
+
this.append(option);
|
|
1127
|
+
}
|
|
1128
|
+
this.handleOptionsMutation({ render: true });
|
|
1129
|
+
}
|
|
1130
|
+
mergeAsyncItems(items) {
|
|
1131
|
+
if (!this.value) return items;
|
|
1132
|
+
const selected = this.selectedOptionMeta ?? {
|
|
1133
|
+
value: this.value,
|
|
1134
|
+
label: this.getSelectedOption()?.getLabel() ?? this.value
|
|
1135
|
+
};
|
|
1136
|
+
if (items.some((item) => item.value === selected.value)) return items;
|
|
1137
|
+
return [...items, selected];
|
|
1138
|
+
}
|
|
1139
|
+
syncSelectedOptionMeta() {
|
|
1140
|
+
if (!this.value) {
|
|
1141
|
+
this.selectedOptionMeta = null;
|
|
1142
|
+
return;
|
|
1143
|
+
}
|
|
1144
|
+
const selected = this.getSelectedOption();
|
|
1145
|
+
if (selected) this.selectedOptionMeta = {
|
|
1146
|
+
value: selected.value,
|
|
1147
|
+
label: selected.getLabel()
|
|
1148
|
+
};
|
|
1149
|
+
}
|
|
1150
|
+
scheduleAsyncFetch(query) {
|
|
1151
|
+
window.clearTimeout(this.asyncFetchTimer);
|
|
1152
|
+
this.asyncFetchTimer = window.setTimeout(() => {
|
|
1153
|
+
this.runAsyncFetch(query);
|
|
1154
|
+
}, 200);
|
|
1155
|
+
}
|
|
1156
|
+
async runAsyncFetch(query) {
|
|
1157
|
+
if (!this.fetchOptions) return;
|
|
1158
|
+
const requestId = ++this.asyncFetchRequestId;
|
|
1159
|
+
this.fetchAbortController?.abort();
|
|
1160
|
+
this.fetchAbortController = new AbortController();
|
|
1161
|
+
if (!query) {
|
|
1162
|
+
this.asyncLoading = false;
|
|
1163
|
+
this.asyncError = null;
|
|
1164
|
+
this.renderAsyncOptionNodes(this.value && this.selectedOptionMeta ? [this.selectedOptionMeta] : []);
|
|
1165
|
+
return;
|
|
1166
|
+
}
|
|
1167
|
+
this.asyncLoading = true;
|
|
1168
|
+
this.asyncError = null;
|
|
1169
|
+
try {
|
|
1170
|
+
const results = await this.fetchOptions(query, this.fetchAbortController.signal);
|
|
1171
|
+
if (requestId !== this.asyncFetchRequestId) return;
|
|
1172
|
+
this.renderAsyncOptionNodes(results);
|
|
1173
|
+
} catch (error) {
|
|
1174
|
+
if (this.fetchAbortController?.signal.aborted || requestId !== this.asyncFetchRequestId) return;
|
|
1175
|
+
if (error instanceof DOMException && error.name === "AbortError") return;
|
|
1176
|
+
console.error("Failed to load combobox options:", error);
|
|
1177
|
+
this.asyncError = "Failed to load options. Please try again.";
|
|
1178
|
+
this.renderAsyncOptionNodes([]);
|
|
1179
|
+
} finally {
|
|
1180
|
+
if (requestId === this.asyncFetchRequestId) this.asyncLoading = false;
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
getAsyncStatusMessage() {
|
|
1184
|
+
if (!this.usesAsyncSearch || !this.open) return null;
|
|
1185
|
+
if (this.asyncLoading) return this.loadingMessage;
|
|
1186
|
+
if (this.asyncError) return this.asyncError;
|
|
1187
|
+
const query = this.inputValue.trim();
|
|
1188
|
+
if (!query) return this.value ? null : this.startTypingMessage;
|
|
1189
|
+
if (this.getEnabledVisibleOptions().length === 0 && !this.shouldShowCreateOption()) return `No matches for "${query}".`;
|
|
1190
|
+
return null;
|
|
1191
|
+
}
|
|
1192
|
+
shouldShowAsyncEmpty() {
|
|
1193
|
+
if (!this.usesAsyncSearch || !this.open) return false;
|
|
1194
|
+
if (!this.inputValue.trim() || this.asyncLoading || this.asyncError) return false;
|
|
1195
|
+
return this.getEnabledVisibleOptions().length === 0 && !this.shouldShowCreateOption();
|
|
1196
|
+
}
|
|
1197
|
+
isSelected(value) {
|
|
1198
|
+
if (this.multiple) return this.values.includes(value);
|
|
1199
|
+
return this.value === value;
|
|
1200
|
+
}
|
|
1201
|
+
getDisplayInputValue() {
|
|
1202
|
+
if (this.usesPopupMode || this.multiple || this.open) return this.inputValue;
|
|
1203
|
+
return this.hasSelection() ? this.getSelectedLabel() : "";
|
|
1204
|
+
}
|
|
1205
|
+
getTriggerDisplayValue() {
|
|
1206
|
+
return this.hasSelection() ? this.getSelectedLabel() : this.placeholder;
|
|
1207
|
+
}
|
|
1208
|
+
isTriggerPlaceholder() {
|
|
1209
|
+
return !this.hasSelection();
|
|
1210
|
+
}
|
|
1211
|
+
hasSelection() {
|
|
1212
|
+
if (this.multiple) return this.values.length > 0;
|
|
1213
|
+
return Boolean(this.getSelectedOption() || this.selectedOptionMeta || this.value);
|
|
1214
|
+
}
|
|
1215
|
+
shouldShowCreateOption() {
|
|
1216
|
+
if (!this.allowCreate || !this.open) return false;
|
|
1217
|
+
if (!this.multiple && !this.hasInputSinceOpening) return false;
|
|
1218
|
+
const query = this.inputValue.trim();
|
|
1219
|
+
if (!query) return false;
|
|
1220
|
+
const normalized = query.toLowerCase();
|
|
1221
|
+
return !this.options.some((option) => {
|
|
1222
|
+
return option.getLabel().toLowerCase() === normalized || option.value.toLowerCase() === normalized;
|
|
1223
|
+
});
|
|
1224
|
+
}
|
|
1225
|
+
getListboxNavItems() {
|
|
1226
|
+
const enabled = this.getEnabledVisibleOptions();
|
|
1227
|
+
if (this.shouldShowCreateOption() && this.createOptionElement) return [...enabled, this.createOptionElement];
|
|
1228
|
+
return enabled;
|
|
1229
|
+
}
|
|
1230
|
+
applySelection() {
|
|
1231
|
+
const visible = this.getVisibleOptions();
|
|
1232
|
+
const filterQuery = this.open ? this.getFilterQuery() : "";
|
|
1233
|
+
for (const option of this.options) {
|
|
1234
|
+
option.selected = this.isSelected(option.value);
|
|
1235
|
+
option.hidden = !visible.includes(option);
|
|
1236
|
+
option.optionId = `${this.listboxId}-option-${option.value}`;
|
|
1237
|
+
option.matchQuery = filterQuery;
|
|
1238
|
+
}
|
|
1239
|
+
for (const group of this.querySelectorAll("pk-option-group")) {
|
|
1240
|
+
const groupOptions = [...group.querySelectorAll("pk-option")];
|
|
1241
|
+
const filterEmpty = groupOptions.length > 0 && groupOptions.every((option) => option.hidden);
|
|
1242
|
+
group.toggleAttribute("data-pk-filter-empty", filterEmpty);
|
|
1243
|
+
}
|
|
1244
|
+
syncListboxSeparators(this);
|
|
1245
|
+
this.syncValueInput();
|
|
1246
|
+
if (this.open) {
|
|
1247
|
+
this.syncHighlight();
|
|
1248
|
+
this.announceFilterResults();
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
syncValueInput() {
|
|
1252
|
+
if (!this.input) return;
|
|
1253
|
+
this.input.value = this.multiple ? this.values.join(",") : this.value;
|
|
1254
|
+
this.input.required = this.required;
|
|
1255
|
+
}
|
|
1256
|
+
syncHighlightedIndexToSelection() {
|
|
1257
|
+
if (this.multiple) return;
|
|
1258
|
+
const enabled = this.getEnabledVisibleOptions();
|
|
1259
|
+
if (!this.value || enabled.length === 0) return;
|
|
1260
|
+
const selectedIndex = enabled.findIndex((option) => option.value === this.value);
|
|
1261
|
+
if (selectedIndex >= 0) this.highlightedIndex = selectedIndex;
|
|
1262
|
+
}
|
|
1263
|
+
resetHighlightedIndexOnOpen() {
|
|
1264
|
+
if (this.autoHighlight) {
|
|
1265
|
+
if (this.value) {
|
|
1266
|
+
this.syncHighlightedIndexToSelection();
|
|
1267
|
+
return;
|
|
1268
|
+
}
|
|
1269
|
+
this.highlightedIndex = 0;
|
|
1270
|
+
return;
|
|
1271
|
+
}
|
|
1272
|
+
this.highlightedIndex = -1;
|
|
1273
|
+
}
|
|
1274
|
+
syncHighlight() {
|
|
1275
|
+
const enabled = this.getEnabledVisibleOptions();
|
|
1276
|
+
const showCreate = this.shouldShowCreateOption();
|
|
1277
|
+
const totalItems = enabled.length + (showCreate ? 1 : 0);
|
|
1278
|
+
for (const option of this.options) {
|
|
1279
|
+
option.highlighted = false;
|
|
1280
|
+
option.focusIndex = -1;
|
|
1281
|
+
}
|
|
1282
|
+
this.createOptionHighlighted = false;
|
|
1283
|
+
if (totalItems === 0 || this.highlightedIndex < 0) return;
|
|
1284
|
+
if (this.highlightedIndex >= totalItems) this.highlightedIndex = totalItems - 1;
|
|
1285
|
+
if (showCreate && this.highlightedIndex === enabled.length) {
|
|
1286
|
+
this.createOptionHighlighted = true;
|
|
1287
|
+
if (!this.keepsFocusOnInput()) this.createOptionElement?.focus({ preventScroll: true });
|
|
1288
|
+
scrollIntoView(this.createOptionElement, this.listScrollContainer, "vertical", "auto");
|
|
1289
|
+
if (this.keepsFocusOnInput()) this.maintainInputFocus();
|
|
1290
|
+
return;
|
|
1291
|
+
}
|
|
1292
|
+
const highlighted = enabled[this.highlightedIndex];
|
|
1293
|
+
if (highlighted) {
|
|
1294
|
+
highlighted.highlighted = true;
|
|
1295
|
+
highlighted.focusIndex = this.keepsFocusOnInput() ? -1 : 0;
|
|
1296
|
+
scrollIntoView(highlighted, this.listScrollContainer, "vertical", "auto");
|
|
1297
|
+
if (this.keepsFocusOnInput()) this.maintainInputFocus();
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
getActiveDescendantId() {
|
|
1301
|
+
const enabled = this.getEnabledVisibleOptions();
|
|
1302
|
+
if (this.shouldShowCreateOption() && this.highlightedIndex === enabled.length) return this.createOptionId;
|
|
1303
|
+
return enabled[this.highlightedIndex]?.optionId || null;
|
|
1304
|
+
}
|
|
1305
|
+
announceFilterResults() {
|
|
1306
|
+
if (!this.liveRegion) this.liveRegion = new LiveRegion("polite");
|
|
1307
|
+
const count = this.getEnabledVisibleOptions().length;
|
|
1308
|
+
const filter = this.getFilterQuery();
|
|
1309
|
+
if (!filter) return;
|
|
1310
|
+
if (this.shouldShowCreateOption()) {
|
|
1311
|
+
this.liveRegion.announce(`Create ${filter}`);
|
|
1312
|
+
return;
|
|
1313
|
+
}
|
|
1314
|
+
this.liveRegion.announce(count === 0 ? `${this.emptyMessage}` : `${count} ${count === 1 ? "result" : "results"} available`);
|
|
1315
|
+
}
|
|
1316
|
+
async show() {
|
|
1317
|
+
if (this.open || this.closing || this.disabled) return;
|
|
1318
|
+
await this.openPanel();
|
|
1319
|
+
}
|
|
1320
|
+
async hide(source = "api") {
|
|
1321
|
+
if (!this.open || this.closing) return;
|
|
1322
|
+
await this.closePanel(source);
|
|
1323
|
+
}
|
|
1324
|
+
openPanel() {
|
|
1325
|
+
const anchor = this.controlElement;
|
|
1326
|
+
if (!anchor) return Promise.resolve();
|
|
1327
|
+
if (this.open) {
|
|
1328
|
+
this.activeInput?.focus({ preventScroll: true });
|
|
1329
|
+
return Promise.resolve();
|
|
1330
|
+
}
|
|
1331
|
+
if (this.closing) return Promise.resolve();
|
|
1332
|
+
this.dispatchEvent(new PkShowEvent());
|
|
1333
|
+
this.closing = false;
|
|
1334
|
+
this.panelAnimated = false;
|
|
1335
|
+
this.open = true;
|
|
1336
|
+
this.hasInputSinceOpening = false;
|
|
1337
|
+
this.inputValue = this.usesPopupMode ? "" : !this.multiple && this.hasSelection() ? this.getSelectedLabel() : "";
|
|
1338
|
+
this.applySelection();
|
|
1339
|
+
this.resetHighlightedIndexOnOpen();
|
|
1340
|
+
if (this.usesAsyncSearch) {
|
|
1341
|
+
this.syncSelectedOptionMeta();
|
|
1342
|
+
this.asyncError = null;
|
|
1343
|
+
this.asyncLoading = false;
|
|
1344
|
+
this.renderAsyncOptionNodes(this.selectedOptionMeta ? [this.selectedOptionMeta] : []);
|
|
1345
|
+
}
|
|
1346
|
+
const anchorWidth = anchor.getBoundingClientRect().width;
|
|
1347
|
+
this.style.setProperty("--pk-combobox-anchor-width", `${anchorWidth}px`);
|
|
1348
|
+
this.popupElement.active = true;
|
|
1349
|
+
if (this.panelElement) {
|
|
1350
|
+
this.panelElement.hidden = false;
|
|
1351
|
+
syncPopupPlacementAnimation(this.panelElement, this.placement);
|
|
1352
|
+
}
|
|
1353
|
+
this.registerDismissHandlers();
|
|
1354
|
+
this.syncHighlight();
|
|
1355
|
+
if (this.usesPopupMode) this.popupTrigger?.blur();
|
|
1356
|
+
else this.activeInput?.focus({ preventScroll: true });
|
|
1357
|
+
return this.updateComplete.then(async () => {
|
|
1358
|
+
const placement = await waitForPopupReposition(this.popupElement, this.placement, 300, { requireEvent: true });
|
|
1359
|
+
if (this.panelElement) syncPopupPlacementAnimation(this.panelElement, placement);
|
|
1360
|
+
this.panelAnimated = true;
|
|
1361
|
+
this.bindPanelEvents();
|
|
1362
|
+
this.refreshOptions();
|
|
1363
|
+
this.activeInput?.focus({ preventScroll: true });
|
|
1364
|
+
if (this.highlightedIndex >= 0 && !this.keepsFocusOnInput()) {
|
|
1365
|
+
const enabled = this.getEnabledVisibleOptions();
|
|
1366
|
+
const index = this.highlightedIndex;
|
|
1367
|
+
if (this.shouldShowCreateOption() && index === enabled.length) this.createOptionElement?.focus({ preventScroll: true });
|
|
1368
|
+
else enabled[index]?.focusControl();
|
|
1369
|
+
}
|
|
1370
|
+
this.dispatchEvent(new PkAfterShowEvent());
|
|
1371
|
+
this.dispatchEvent(new CustomEvent("pk-open-change", {
|
|
1372
|
+
detail: { open: true },
|
|
1373
|
+
bubbles: true,
|
|
1374
|
+
composed: true
|
|
1375
|
+
}));
|
|
1376
|
+
});
|
|
1377
|
+
}
|
|
1378
|
+
commitCustomValueIfAllowed() {
|
|
1379
|
+
if (this.multiple || !this.allowCustomValue) return false;
|
|
1380
|
+
const query = this.inputValue.trim();
|
|
1381
|
+
if (!query) return false;
|
|
1382
|
+
const nextValue = this.options.find((option) => {
|
|
1383
|
+
return option.getLabel().toLowerCase() === query.toLowerCase() || option.value.toLowerCase() === query.toLowerCase();
|
|
1384
|
+
})?.value ?? query;
|
|
1385
|
+
if (this.value === nextValue) return false;
|
|
1386
|
+
this.value = nextValue;
|
|
1387
|
+
return true;
|
|
1388
|
+
}
|
|
1389
|
+
commitInputOnClose(source) {
|
|
1390
|
+
if (this.multiple || this.usesPopupMode) return false;
|
|
1391
|
+
if (!this.hasInputSinceOpening) {
|
|
1392
|
+
if (this.shouldCommitCustomValueOnClose(source)) return this.commitCustomValueIfAllowed();
|
|
1393
|
+
return false;
|
|
1394
|
+
}
|
|
1395
|
+
if (!this.inputValue.trim()) {
|
|
1396
|
+
if (!this.value) return false;
|
|
1397
|
+
this.value = "";
|
|
1398
|
+
return true;
|
|
1399
|
+
}
|
|
1400
|
+
if (this.shouldCommitCustomValueOnClose(source)) return this.commitCustomValueIfAllowed();
|
|
1401
|
+
return false;
|
|
1402
|
+
}
|
|
1403
|
+
shouldCommitCustomValueOnClose(source) {
|
|
1404
|
+
return source === "light-dismiss" || source === "pointer-dismiss";
|
|
1405
|
+
}
|
|
1406
|
+
async closePanel(source = "unknown") {
|
|
1407
|
+
if (!this.open || this.closing) return;
|
|
1408
|
+
const hideEvent = new PkHideEvent(source);
|
|
1409
|
+
if (!this.dispatchEvent(hideEvent)) return;
|
|
1410
|
+
const valueChanged = this.commitInputOnClose(source);
|
|
1411
|
+
this.unbindPanelEvents();
|
|
1412
|
+
this.closing = true;
|
|
1413
|
+
this.panelAnimated = false;
|
|
1414
|
+
await this.waitForExitAnimation();
|
|
1415
|
+
this.open = false;
|
|
1416
|
+
this.closing = false;
|
|
1417
|
+
this.panelAnimated = false;
|
|
1418
|
+
this.hasInputSinceOpening = false;
|
|
1419
|
+
this.inputValue = "";
|
|
1420
|
+
if (this.panelElement) {
|
|
1421
|
+
this.panelElement.hidden = true;
|
|
1422
|
+
this.panelElement.removeAttribute("data-side");
|
|
1423
|
+
}
|
|
1424
|
+
this.popupElement.active = false;
|
|
1425
|
+
this.unregisterDismissHandlers();
|
|
1426
|
+
this.applySelection();
|
|
1427
|
+
if (this.usesAsyncSearch) {
|
|
1428
|
+
window.clearTimeout(this.asyncFetchTimer);
|
|
1429
|
+
this.fetchAbortController?.abort();
|
|
1430
|
+
this.asyncLoading = false;
|
|
1431
|
+
this.asyncError = null;
|
|
1432
|
+
this.renderAsyncOptionNodes(this.selectedOptionMeta ? [this.selectedOptionMeta] : []);
|
|
1433
|
+
}
|
|
1434
|
+
if (valueChanged) {
|
|
1435
|
+
this.syncHasValueAttribute();
|
|
1436
|
+
this.emitValueChange();
|
|
1437
|
+
}
|
|
1438
|
+
if (this.shouldReturnFocusToInput(source)) if (this.usesPopupMode) this.popupTrigger?.focus({ preventScroll: true });
|
|
1439
|
+
else this.activeInput?.focus({ preventScroll: true });
|
|
1440
|
+
else {
|
|
1441
|
+
this.activeInput?.blur();
|
|
1442
|
+
this.popupTrigger?.blur();
|
|
1443
|
+
}
|
|
1444
|
+
this.dispatchEvent(new PkAfterHideEvent());
|
|
1445
|
+
this.dispatchEvent(new CustomEvent("pk-open-change", {
|
|
1446
|
+
detail: { open: false },
|
|
1447
|
+
bubbles: true,
|
|
1448
|
+
composed: true
|
|
1449
|
+
}));
|
|
1450
|
+
}
|
|
1451
|
+
waitForExitAnimation() {
|
|
1452
|
+
const panel = this.panelElement;
|
|
1453
|
+
if (!panel) return Promise.resolve();
|
|
1454
|
+
return new Promise((resolve) => {
|
|
1455
|
+
let settled = false;
|
|
1456
|
+
const finish = () => {
|
|
1457
|
+
if (settled) return;
|
|
1458
|
+
settled = true;
|
|
1459
|
+
panel.removeEventListener("animationend", onAnimationEnd);
|
|
1460
|
+
window.clearTimeout(fallback);
|
|
1461
|
+
panel.classList.remove("closing");
|
|
1462
|
+
resolve();
|
|
1463
|
+
};
|
|
1464
|
+
const onAnimationEnd = (event) => {
|
|
1465
|
+
if (event.target === panel && event.animationName.startsWith("pk-popup-content-out")) finish();
|
|
1466
|
+
};
|
|
1467
|
+
panel.classList.add("closing");
|
|
1468
|
+
panel.addEventListener("animationend", onAnimationEnd);
|
|
1469
|
+
const fallback = window.setTimeout(finish, 150);
|
|
1470
|
+
});
|
|
1471
|
+
}
|
|
1472
|
+
shouldReturnFocusToInput(source) {
|
|
1473
|
+
return source !== "light-dismiss" && source !== "pointer-dismiss";
|
|
1474
|
+
}
|
|
1475
|
+
registerDismissHandlers() {
|
|
1476
|
+
registerDismissible(this);
|
|
1477
|
+
this.dismissRegistered = true;
|
|
1478
|
+
document.addEventListener("pointerdown", this.onDocumentPointerDown, true);
|
|
1479
|
+
document.addEventListener("keydown", this.onDocumentKeyDown, true);
|
|
1480
|
+
}
|
|
1481
|
+
unregisterDismissHandlers() {
|
|
1482
|
+
if (this.dismissRegistered) {
|
|
1483
|
+
unregisterDismissible(this);
|
|
1484
|
+
this.dismissRegistered = false;
|
|
1485
|
+
}
|
|
1486
|
+
document.removeEventListener("pointerdown", this.onDocumentPointerDown, true);
|
|
1487
|
+
document.removeEventListener("keydown", this.onDocumentKeyDown, true);
|
|
1488
|
+
}
|
|
1489
|
+
isPointerInside(event) {
|
|
1490
|
+
return isPointerInsideOverlay(event, {
|
|
1491
|
+
anchor: this.controlElement,
|
|
1492
|
+
panel: this.panelElement
|
|
1493
|
+
});
|
|
1494
|
+
}
|
|
1495
|
+
handleCreateOption() {
|
|
1496
|
+
const query = this.inputValue.trim();
|
|
1497
|
+
if (!query) return;
|
|
1498
|
+
const createEvent = new PkCreateEvent(query);
|
|
1499
|
+
if (!this.dispatchEvent(createEvent)) return;
|
|
1500
|
+
const option = document.createElement("pk-option");
|
|
1501
|
+
option.value = query;
|
|
1502
|
+
option.textContent = query;
|
|
1503
|
+
this.append(option);
|
|
1504
|
+
if (this.multiple) {
|
|
1505
|
+
if (!this.values.includes(query)) this.values = [...this.values, query];
|
|
1506
|
+
this.inputValue = "";
|
|
1507
|
+
this.applySelection();
|
|
1508
|
+
this.emitValueChange();
|
|
1509
|
+
this.activeInput?.focus({ preventScroll: true });
|
|
1510
|
+
return;
|
|
1511
|
+
}
|
|
1512
|
+
this.value = query;
|
|
1513
|
+
this.applySelection();
|
|
1514
|
+
this.closePanel("api");
|
|
1515
|
+
this.emitValueChange();
|
|
1516
|
+
}
|
|
1517
|
+
removeTag(value, event) {
|
|
1518
|
+
event.preventDefault();
|
|
1519
|
+
event.stopPropagation();
|
|
1520
|
+
this.values = this.values.filter((item) => item !== value);
|
|
1521
|
+
this.applySelection();
|
|
1522
|
+
this.emitValueChange();
|
|
1523
|
+
this.activeInput?.focus({ preventScroll: true });
|
|
1524
|
+
}
|
|
1525
|
+
handleClear(event) {
|
|
1526
|
+
event.preventDefault();
|
|
1527
|
+
event.stopPropagation();
|
|
1528
|
+
if (this.multiple) this.values = [];
|
|
1529
|
+
else this.value = "";
|
|
1530
|
+
this.inputValue = "";
|
|
1531
|
+
this.selectedOptionMeta = null;
|
|
1532
|
+
if (this.usesAsyncSearch) this.renderAsyncOptionNodes([]);
|
|
1533
|
+
this.applySelection();
|
|
1534
|
+
this.dispatchEvent(new PkClearEvent());
|
|
1535
|
+
this.emitValueChange();
|
|
1536
|
+
this.activeInput?.focus();
|
|
1537
|
+
}
|
|
1538
|
+
emitValueChange() {
|
|
1539
|
+
this.dispatchEvent(new CustomEvent("pk-change", {
|
|
1540
|
+
detail: { value: this.multiple ? [...this.values] : this.value },
|
|
1541
|
+
bubbles: true,
|
|
1542
|
+
composed: true
|
|
1543
|
+
}));
|
|
1544
|
+
this.dispatchEvent(new Event("input", {
|
|
1545
|
+
bubbles: true,
|
|
1546
|
+
composed: true
|
|
1547
|
+
}));
|
|
1548
|
+
this.dispatchEvent(new Event("change", {
|
|
1549
|
+
bubbles: true,
|
|
1550
|
+
composed: true
|
|
1551
|
+
}));
|
|
1552
|
+
}
|
|
1553
|
+
handleInput(event) {
|
|
1554
|
+
this.hasInputSinceOpening = true;
|
|
1555
|
+
this.inputValue = event.target.value;
|
|
1556
|
+
this.highlightedIndex = this.autoHighlight ? 0 : -1;
|
|
1557
|
+
this.applySelection();
|
|
1558
|
+
if (this.usesAsyncSearch) {
|
|
1559
|
+
this.asyncError = null;
|
|
1560
|
+
this.scheduleAsyncFetch(this.inputValue.trim());
|
|
1561
|
+
}
|
|
1562
|
+
if (!this.open) this.openPanel();
|
|
1563
|
+
}
|
|
1564
|
+
handleInputKeyDown(event) {
|
|
1565
|
+
if (event.key === "Backspace" && this.multiple && !this.inputValue && this.values.length > 0) {
|
|
1566
|
+
event.preventDefault();
|
|
1567
|
+
this.values = this.values.slice(0, -1);
|
|
1568
|
+
this.applySelection();
|
|
1569
|
+
this.emitValueChange();
|
|
1570
|
+
return;
|
|
1571
|
+
}
|
|
1572
|
+
if (event.key === "Escape" && this.open) {
|
|
1573
|
+
event.preventDefault();
|
|
1574
|
+
if (this.hasInputSinceOpening && this.inputValue) {
|
|
1575
|
+
this.hasInputSinceOpening = false;
|
|
1576
|
+
this.inputValue = this.usesPopupMode ? "" : !this.multiple && this.hasSelection() ? this.getSelectedLabel() : "";
|
|
1577
|
+
this.highlightedIndex = this.autoHighlight ? 0 : -1;
|
|
1578
|
+
this.applySelection();
|
|
1579
|
+
return;
|
|
1580
|
+
}
|
|
1581
|
+
this.closePanel("escape");
|
|
1582
|
+
return;
|
|
1583
|
+
}
|
|
1584
|
+
if (event.key === "ArrowDown" && !this.open) {
|
|
1585
|
+
event.preventDefault();
|
|
1586
|
+
this.openPanel();
|
|
1587
|
+
return;
|
|
1588
|
+
}
|
|
1589
|
+
if (event.key === "Tab" && this.open) {
|
|
1590
|
+
let committed = false;
|
|
1591
|
+
if (!this.multiple) committed = this.commitCustomValueIfAllowed();
|
|
1592
|
+
this.closePanel("api");
|
|
1593
|
+
if (committed) {
|
|
1594
|
+
this.syncHasValueAttribute();
|
|
1595
|
+
this.emitValueChange();
|
|
1596
|
+
}
|
|
1597
|
+
return;
|
|
1598
|
+
}
|
|
1599
|
+
if (this.open && event.key === "Enter" && !this.multiple) {
|
|
1600
|
+
if (this.getEnabledVisibleOptions().length === 0 && this.allowCustomValue && this.inputValue.trim() && !this.shouldShowCreateOption()) {
|
|
1601
|
+
event.preventDefault();
|
|
1602
|
+
const committed = this.commitCustomValueIfAllowed();
|
|
1603
|
+
this.closePanel("api");
|
|
1604
|
+
if (committed) {
|
|
1605
|
+
this.syncHasValueAttribute();
|
|
1606
|
+
this.emitValueChange();
|
|
1607
|
+
}
|
|
1608
|
+
return;
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
if (!this.open) return;
|
|
1612
|
+
this.onListboxKeyDown(event);
|
|
1613
|
+
}
|
|
1614
|
+
onListboxKeyDown(event) {
|
|
1615
|
+
const navItems = this.getListboxNavItems();
|
|
1616
|
+
const enabled = this.getEnabledVisibleOptions();
|
|
1617
|
+
if (this.highlightedIndex < 0) {
|
|
1618
|
+
if (event.key === "ArrowDown" || event.key === "ArrowRight") {
|
|
1619
|
+
if (enabled.length > 0 || this.shouldShowCreateOption()) {
|
|
1620
|
+
event.preventDefault();
|
|
1621
|
+
this.highlightedIndex = 0;
|
|
1622
|
+
this.syncHighlight();
|
|
1623
|
+
}
|
|
1624
|
+
return;
|
|
1625
|
+
}
|
|
1626
|
+
if (event.key === "ArrowUp" || event.key === "ArrowLeft") {
|
|
1627
|
+
if (enabled.length > 0 || this.shouldShowCreateOption()) {
|
|
1628
|
+
event.preventDefault();
|
|
1629
|
+
this.highlightedIndex = this.shouldShowCreateOption() ? enabled.length : Math.max(enabled.length - 1, 0);
|
|
1630
|
+
this.syncHighlight();
|
|
1631
|
+
}
|
|
1632
|
+
return;
|
|
1633
|
+
}
|
|
1634
|
+
if (event.key === "Enter" || event.key === " ") return;
|
|
1635
|
+
}
|
|
1636
|
+
if (event.key === "Enter" && this.shouldShowCreateOption() && this.highlightedIndex === enabled.length) {
|
|
1637
|
+
event.preventDefault();
|
|
1638
|
+
this.handleCreateOption();
|
|
1639
|
+
return;
|
|
1640
|
+
}
|
|
1641
|
+
if (this.multiple && (event.key === "Enter" || event.key === " ")) {
|
|
1642
|
+
const option = enabled[this.highlightedIndex];
|
|
1643
|
+
if (option) {
|
|
1644
|
+
event.preventDefault();
|
|
1645
|
+
option.dispatchEvent(new CustomEvent("pk-option-select", {
|
|
1646
|
+
detail: { value: option.value },
|
|
1647
|
+
bubbles: true,
|
|
1648
|
+
composed: true
|
|
1649
|
+
}));
|
|
1650
|
+
}
|
|
1651
|
+
return;
|
|
1652
|
+
}
|
|
1653
|
+
this.highlightedIndex = handleListboxKeyDown(event, {
|
|
1654
|
+
items: navItems,
|
|
1655
|
+
currentIndex: this.highlightedIndex,
|
|
1656
|
+
multiselect: this.multiple,
|
|
1657
|
+
loop: this.loopFocus,
|
|
1658
|
+
onSelect: (index) => {
|
|
1659
|
+
this.highlightedIndex = index;
|
|
1660
|
+
this.syncHighlight();
|
|
1661
|
+
},
|
|
1662
|
+
focusItem: (index) => {
|
|
1663
|
+
if (this.keepsFocusOnInput()) return;
|
|
1664
|
+
if (this.shouldShowCreateOption() && index === enabled.length) {
|
|
1665
|
+
this.createOptionElement?.focus({ preventScroll: true });
|
|
1666
|
+
return;
|
|
1667
|
+
}
|
|
1668
|
+
enabled[index]?.focusControl();
|
|
1669
|
+
},
|
|
1670
|
+
onClose: () => {
|
|
1671
|
+
this.closePanel("escape");
|
|
1672
|
+
}
|
|
1673
|
+
});
|
|
1674
|
+
}
|
|
1675
|
+
renderHostDecorationSlot(name) {
|
|
1676
|
+
if (!this.hasSlotController.test(name)) return html`<slot name=${name} hidden></slot>`;
|
|
1677
|
+
return html`
|
|
1678
|
+
<span part=${name} class=${name === "start" ? "control-start" : "control-end"}>
|
|
1679
|
+
<slot name=${name}></slot>
|
|
1680
|
+
</span>
|
|
1681
|
+
`;
|
|
1682
|
+
}
|
|
1683
|
+
renderChevronButton() {
|
|
1684
|
+
return html`
|
|
1685
|
+
<button
|
|
1686
|
+
type="button"
|
|
1687
|
+
class="icon-button expand-button"
|
|
1688
|
+
part="expand-button"
|
|
1689
|
+
aria-label="Toggle options"
|
|
1690
|
+
?disabled=${this.disabled}
|
|
1691
|
+
@click=${this.togglePanel}
|
|
1692
|
+
>
|
|
1693
|
+
<span class="icon" aria-hidden="true">${unsafeSVG(CHEVRON_ICON)}</span>
|
|
1694
|
+
</button>
|
|
1695
|
+
`;
|
|
1696
|
+
}
|
|
1697
|
+
renderTags() {
|
|
1698
|
+
return this.getSelectedOptions().map((option) => html`
|
|
1699
|
+
<span class="tag" part="tag">
|
|
1700
|
+
<span class="tag-label">${option.getLabel()}</span>
|
|
1701
|
+
<button
|
|
1702
|
+
type="button"
|
|
1703
|
+
class="tag-remove"
|
|
1704
|
+
part="tag-remove"
|
|
1705
|
+
aria-label=${`Remove ${option.getLabel()}`}
|
|
1706
|
+
?disabled=${this.disabled}
|
|
1707
|
+
@click=${(event) => this.removeTag(option.value, event)}
|
|
1708
|
+
>
|
|
1709
|
+
<span class="tag-remove-icon" aria-hidden="true">${unsafeSVG(XMARK_ICON)}</span>
|
|
1710
|
+
</button>
|
|
1711
|
+
</span>
|
|
1712
|
+
`);
|
|
1713
|
+
}
|
|
1714
|
+
shouldShowPlaceholder() {
|
|
1715
|
+
if (this.inputValue.trim()) return false;
|
|
1716
|
+
return !this.hasSelection();
|
|
1717
|
+
}
|
|
1718
|
+
renderInput() {
|
|
1719
|
+
const activeDescendant = this.open ? this.getActiveDescendantId() : null;
|
|
1720
|
+
const showPlaceholder = this.shouldShowPlaceholder();
|
|
1721
|
+
return html`
|
|
1722
|
+
<input
|
|
1723
|
+
part="input"
|
|
1724
|
+
class=${classMap({
|
|
1725
|
+
"combobox-input": true,
|
|
1726
|
+
"control-input": true,
|
|
1727
|
+
"combobox-input--inline": this.multiple
|
|
1728
|
+
})}
|
|
1729
|
+
type="text"
|
|
1730
|
+
role="combobox"
|
|
1731
|
+
id=${this.inputId}
|
|
1732
|
+
.value=${this.getDisplayInputValue()}
|
|
1733
|
+
placeholder=${showPlaceholder ? this.placeholder : nothing}
|
|
1734
|
+
?disabled=${this.disabled}
|
|
1735
|
+
aria-label=${this.ariaLabel ?? nothing}
|
|
1736
|
+
aria-expanded=${this.open ? "true" : "false"}
|
|
1737
|
+
aria-controls=${this.listboxId}
|
|
1738
|
+
aria-autocomplete="list"
|
|
1739
|
+
aria-activedescendant=${activeDescendant ?? nothing}
|
|
1740
|
+
@input=${this.handleInput}
|
|
1741
|
+
@keydown=${this.handleInputKeyDown}
|
|
1742
|
+
/>
|
|
1743
|
+
`;
|
|
1744
|
+
}
|
|
1745
|
+
renderPanelInput() {
|
|
1746
|
+
const activeDescendant = this.open ? this.getActiveDescendantId() : null;
|
|
1747
|
+
return html`
|
|
1748
|
+
<div part="panel-search" class="panel-search">
|
|
1749
|
+
<input
|
|
1750
|
+
part="panel-input"
|
|
1751
|
+
class="combobox-input panel-input"
|
|
1752
|
+
type="text"
|
|
1753
|
+
role="combobox"
|
|
1754
|
+
id=${this.inputId}
|
|
1755
|
+
.value=${this.inputValue}
|
|
1756
|
+
placeholder=${this.searchPlaceholder}
|
|
1757
|
+
?disabled=${this.disabled}
|
|
1758
|
+
aria-label=${this.ariaLabel ?? this.searchPlaceholder}
|
|
1759
|
+
aria-expanded="true"
|
|
1760
|
+
aria-controls=${this.listboxId}
|
|
1761
|
+
aria-autocomplete="list"
|
|
1762
|
+
aria-activedescendant=${activeDescendant ?? nothing}
|
|
1763
|
+
@input=${this.handleInput}
|
|
1764
|
+
@keydown=${this.handleInputKeyDown}
|
|
1765
|
+
/>
|
|
1766
|
+
</div>
|
|
1767
|
+
`;
|
|
1768
|
+
}
|
|
1769
|
+
renderPopupTrigger() {
|
|
1770
|
+
return html`
|
|
1771
|
+
<button
|
|
1772
|
+
type="button"
|
|
1773
|
+
part="trigger"
|
|
1774
|
+
class="popup-trigger"
|
|
1775
|
+
?disabled=${this.disabled}
|
|
1776
|
+
aria-label=${this.ariaLabel ?? nothing}
|
|
1777
|
+
aria-haspopup="listbox"
|
|
1778
|
+
aria-expanded=${this.open ? "true" : "false"}
|
|
1779
|
+
aria-controls=${this.listboxId}
|
|
1780
|
+
@click=${this.togglePanel}
|
|
1781
|
+
@keydown=${this.handleTriggerKeyDown}
|
|
1782
|
+
>
|
|
1783
|
+
<span
|
|
1784
|
+
class=${classMap({
|
|
1785
|
+
"popup-trigger-value": true,
|
|
1786
|
+
"is-placeholder": this.isTriggerPlaceholder()
|
|
1787
|
+
})}
|
|
1788
|
+
>
|
|
1789
|
+
${this.getTriggerDisplayValue()}
|
|
1790
|
+
</span>
|
|
1791
|
+
<span class="icon popup-trigger-icon" aria-hidden="true">${unsafeSVG(CHEVRON_ICON)}</span>
|
|
1792
|
+
</button>
|
|
1793
|
+
`;
|
|
1794
|
+
}
|
|
1795
|
+
renderControlContent() {
|
|
1796
|
+
if (this.usesPopupMode) return this.renderPopupTrigger();
|
|
1797
|
+
const showClear = (this.clearable || this.withClear) && this.hasSelection() && !this.disabled;
|
|
1798
|
+
if (this.multiple) return html`
|
|
1799
|
+
${this.renderHostDecorationSlot("start")}
|
|
1800
|
+
<div class="chips" part="tags">
|
|
1801
|
+
${this.renderTags()}
|
|
1802
|
+
${this.renderInput()}
|
|
1803
|
+
</div>
|
|
1804
|
+
${this.renderHostDecorationSlot("end")}
|
|
1805
|
+
${showClear ? html`
|
|
1806
|
+
<button
|
|
1807
|
+
type="button"
|
|
1808
|
+
class="clear-button"
|
|
1809
|
+
part="clear-button"
|
|
1810
|
+
aria-label="Clear selection"
|
|
1811
|
+
?disabled=${this.disabled}
|
|
1812
|
+
@click=${this.handleClear}
|
|
1813
|
+
>
|
|
1814
|
+
<span class="clear-button-icon" aria-hidden="true">${unsafeSVG(XMARK_ICON)}</span>
|
|
1815
|
+
</button>
|
|
1816
|
+
` : nothing}
|
|
1817
|
+
`;
|
|
1818
|
+
return html`
|
|
1819
|
+
${this.renderHostDecorationSlot("start")}
|
|
1820
|
+
${this.renderInput()}
|
|
1821
|
+
${this.renderHostDecorationSlot("end")}
|
|
1822
|
+
${showClear ? html`
|
|
1823
|
+
<button
|
|
1824
|
+
type="button"
|
|
1825
|
+
class="clear-button"
|
|
1826
|
+
part="clear-button"
|
|
1827
|
+
aria-label="Clear selection"
|
|
1828
|
+
?disabled=${this.disabled}
|
|
1829
|
+
@click=${this.handleClear}
|
|
1830
|
+
>
|
|
1831
|
+
<span class="clear-button-icon" aria-hidden="true">${unsafeSVG(XMARK_ICON)}</span>
|
|
1832
|
+
</button>
|
|
1833
|
+
` : nothing}
|
|
1834
|
+
${this.renderChevronButton()}
|
|
1835
|
+
`;
|
|
1836
|
+
}
|
|
1837
|
+
render() {
|
|
1838
|
+
const visibleOptions = this.getEnabledVisibleOptions();
|
|
1839
|
+
const showCreate = this.shouldShowCreateOption();
|
|
1840
|
+
const showEmpty = this.open && (this.usesAsyncSearch ? this.shouldShowAsyncEmpty() : visibleOptions.length === 0 && !showCreate);
|
|
1841
|
+
const asyncStatus = this.getAsyncStatusMessage();
|
|
1842
|
+
const createQuery = this.inputValue.trim();
|
|
1843
|
+
return html`
|
|
1844
|
+
<input
|
|
1845
|
+
class="value-input"
|
|
1846
|
+
part="value-input"
|
|
1847
|
+
tabindex="-1"
|
|
1848
|
+
aria-hidden="true"
|
|
1849
|
+
.value=${this.multiple ? this.values.join(",") : this.value}
|
|
1850
|
+
?required=${this.required}
|
|
1851
|
+
@input=${() => this.updateValidity()}
|
|
1852
|
+
/>
|
|
1853
|
+
<div
|
|
1854
|
+
part="control"
|
|
1855
|
+
class=${classMap({
|
|
1856
|
+
control: true,
|
|
1857
|
+
"is-disabled": this.disabled,
|
|
1858
|
+
"control--multiple": this.multiple,
|
|
1859
|
+
"control--popup": this.usesPopupMode
|
|
1860
|
+
})}
|
|
1861
|
+
data-popup-open=${this.open ? "" : nothing}
|
|
1862
|
+
@mousedown=${this.handleControlMouseDown}
|
|
1863
|
+
>
|
|
1864
|
+
${this.renderControlContent()}
|
|
1865
|
+
</div>
|
|
1866
|
+
<pk-popup
|
|
1867
|
+
.active=${this.open || this.closing}
|
|
1868
|
+
.anchor=${this.controlElement ?? ""}
|
|
1869
|
+
.placement=${this.placement}
|
|
1870
|
+
.distance=${this.sideOffset}
|
|
1871
|
+
.sync=${"width"}
|
|
1872
|
+
flip
|
|
1873
|
+
shift
|
|
1874
|
+
>
|
|
1875
|
+
<div
|
|
1876
|
+
part="panel"
|
|
1877
|
+
class=${classMap({
|
|
1878
|
+
panel: true,
|
|
1879
|
+
"pk-popup-content": true,
|
|
1880
|
+
closing: this.closing,
|
|
1881
|
+
"panel--popup": this.usesPopupMode
|
|
1882
|
+
})}
|
|
1883
|
+
tabindex="-1"
|
|
1884
|
+
?hidden=${!this.open && !this.closing}
|
|
1885
|
+
data-open=${this.panelAnimated && !this.closing ? "" : nothing}
|
|
1886
|
+
>
|
|
1887
|
+
${this.usesPopupMode ? this.renderPanelInput() : nothing}
|
|
1888
|
+
<div
|
|
1889
|
+
part="panel-body"
|
|
1890
|
+
class="panel-body"
|
|
1891
|
+
id=${this.listboxId}
|
|
1892
|
+
role="listbox"
|
|
1893
|
+
aria-multiselectable=${this.multiple ? "true" : "false"}
|
|
1894
|
+
aria-busy=${this.usesAsyncSearch && this.asyncLoading ? "true" : nothing}
|
|
1895
|
+
@slotchange=${this.syncOptions}
|
|
1896
|
+
>
|
|
1897
|
+
<slot></slot>
|
|
1898
|
+
${asyncStatus ? html`
|
|
1899
|
+
<div part="async-status" class="async-status" role="status">${asyncStatus}</div>
|
|
1900
|
+
` : nothing}
|
|
1901
|
+
${showCreate ? html`
|
|
1902
|
+
<button
|
|
1903
|
+
type="button"
|
|
1904
|
+
part="create-option"
|
|
1905
|
+
class=${classMap({
|
|
1906
|
+
"create-option": true,
|
|
1907
|
+
"is-highlighted": this.createOptionHighlighted
|
|
1908
|
+
})}
|
|
1909
|
+
id=${this.createOptionId}
|
|
1910
|
+
role="option"
|
|
1911
|
+
aria-selected="false"
|
|
1912
|
+
tabindex="-1"
|
|
1913
|
+
@click=${this.handleCreateOption}
|
|
1914
|
+
@mouseenter=${this.handleCreateMouseEnter}
|
|
1915
|
+
@keydown=${this.handleCreateKeyDown}
|
|
1916
|
+
>
|
|
1917
|
+
Create "${createQuery}"
|
|
1918
|
+
</button>
|
|
1919
|
+
` : nothing}
|
|
1920
|
+
${showEmpty ? html`
|
|
1921
|
+
<div part="empty" class="empty">${this.emptyMessage}</div>
|
|
1922
|
+
` : nothing}
|
|
1923
|
+
</div>
|
|
1924
|
+
</div>
|
|
1925
|
+
</pk-popup>
|
|
1926
|
+
`;
|
|
1927
|
+
}
|
|
1928
|
+
};
|
|
1929
|
+
__decorate([property({
|
|
1930
|
+
type: Boolean,
|
|
1931
|
+
reflect: true
|
|
1932
|
+
})], PkCombobox.prototype, "open", void 0);
|
|
1933
|
+
__decorate([property({
|
|
1934
|
+
type: Boolean,
|
|
1935
|
+
reflect: true
|
|
1936
|
+
})], PkCombobox.prototype, "multiple", void 0);
|
|
1937
|
+
__decorate([property({ reflect: true })], PkCombobox.prototype, "placement", void 0);
|
|
1938
|
+
__decorate([property({
|
|
1939
|
+
attribute: "side-offset",
|
|
1940
|
+
type: Number
|
|
1941
|
+
})], PkCombobox.prototype, "sideOffset", void 0);
|
|
1942
|
+
__decorate([property({
|
|
1943
|
+
type: Boolean,
|
|
1944
|
+
reflect: true
|
|
1945
|
+
})], PkCombobox.prototype, "clearable", void 0);
|
|
1946
|
+
__decorate([property({
|
|
1947
|
+
attribute: "with-clear",
|
|
1948
|
+
type: Boolean
|
|
1949
|
+
})], PkCombobox.prototype, "withClear", void 0);
|
|
1950
|
+
__decorate([property({
|
|
1951
|
+
attribute: "allow-create",
|
|
1952
|
+
type: Boolean
|
|
1953
|
+
})], PkCombobox.prototype, "allowCreate", void 0);
|
|
1954
|
+
__decorate([property({
|
|
1955
|
+
attribute: "allow-custom-value",
|
|
1956
|
+
type: Boolean
|
|
1957
|
+
})], PkCombobox.prototype, "allowCustomValue", void 0);
|
|
1958
|
+
__decorate([property({
|
|
1959
|
+
attribute: "auto-highlight",
|
|
1960
|
+
type: Boolean
|
|
1961
|
+
})], PkCombobox.prototype, "autoHighlight", void 0);
|
|
1962
|
+
__decorate([property({
|
|
1963
|
+
attribute: "popup-mode",
|
|
1964
|
+
type: Boolean,
|
|
1965
|
+
reflect: true
|
|
1966
|
+
})], PkCombobox.prototype, "popupMode", void 0);
|
|
1967
|
+
__decorate([property({ attribute: "search-placeholder" })], PkCombobox.prototype, "searchPlaceholder", void 0);
|
|
1968
|
+
__decorate([property({
|
|
1969
|
+
type: Boolean,
|
|
1970
|
+
reflect: true
|
|
1971
|
+
})], PkCombobox.prototype, "invalid", void 0);
|
|
1972
|
+
__decorate([property({ reflect: true })], PkCombobox.prototype, "size", void 0);
|
|
1973
|
+
__decorate([property({ reflect: true })], PkCombobox.prototype, "width", void 0);
|
|
1974
|
+
__decorate([property()], PkCombobox.prototype, "placeholder", void 0);
|
|
1975
|
+
__decorate([property({ attribute: "empty-message" })], PkCombobox.prototype, "emptyMessage", void 0);
|
|
1976
|
+
__decorate([property()], PkCombobox.prototype, "value", void 0);
|
|
1977
|
+
__decorate([property({ attribute: "default-value" })], PkCombobox.prototype, "defaultValue", void 0);
|
|
1978
|
+
__decorate([property({
|
|
1979
|
+
type: Array,
|
|
1980
|
+
attribute: false
|
|
1981
|
+
})], PkCombobox.prototype, "values", void 0);
|
|
1982
|
+
__decorate([property({ attribute: false })], PkCombobox.prototype, "defaultValues", void 0);
|
|
1983
|
+
__decorate([property()], PkCombobox.prototype, "label", void 0);
|
|
1984
|
+
__decorate([property()], PkCombobox.prototype, "instructions", void 0);
|
|
1985
|
+
__decorate([property({ attribute: "aria-label" })], PkCombobox.prototype, "ariaLabel", void 0);
|
|
1986
|
+
__decorate([property({
|
|
1987
|
+
attribute: "loop-focus",
|
|
1988
|
+
type: Boolean
|
|
1989
|
+
})], PkCombobox.prototype, "loopFocus", void 0);
|
|
1990
|
+
__decorate([property({ attribute: false })], PkCombobox.prototype, "filter", void 0);
|
|
1991
|
+
__decorate([property({
|
|
1992
|
+
type: Boolean,
|
|
1993
|
+
reflect: true
|
|
1994
|
+
})], PkCombobox.prototype, "async", void 0);
|
|
1995
|
+
__decorate([property({ attribute: "loading-message" })], PkCombobox.prototype, "loadingMessage", void 0);
|
|
1996
|
+
__decorate([property({ attribute: "start-typing-message" })], PkCombobox.prototype, "startTypingMessage", void 0);
|
|
1997
|
+
__decorate([property({ attribute: false })], PkCombobox.prototype, "fetchOptions", void 0);
|
|
1998
|
+
__decorate([query("pk-popup")], PkCombobox.prototype, "popupElement", void 0);
|
|
1999
|
+
__decorate([query(".control")], PkCombobox.prototype, "controlElement", void 0);
|
|
2000
|
+
__decorate([query(".control-input")], PkCombobox.prototype, "controlInput", void 0);
|
|
2001
|
+
__decorate([query(".popup-trigger")], PkCombobox.prototype, "popupTrigger", void 0);
|
|
2002
|
+
__decorate([query(".create-option")], PkCombobox.prototype, "createOptionElement", void 0);
|
|
2003
|
+
__decorate([query(".value-input")], PkCombobox.prototype, "input", void 0);
|
|
2004
|
+
__decorate([state()], PkCombobox.prototype, "inputValue", void 0);
|
|
2005
|
+
__decorate([state()], PkCombobox.prototype, "highlightedIndex", void 0);
|
|
2006
|
+
__decorate([state()], PkCombobox.prototype, "createOptionHighlighted", void 0);
|
|
2007
|
+
__decorate([state()], PkCombobox.prototype, "closing", void 0);
|
|
2008
|
+
__decorate([state()], PkCombobox.prototype, "panelAnimated", void 0);
|
|
2009
|
+
__decorate([state()], PkCombobox.prototype, "asyncLoading", void 0);
|
|
2010
|
+
__decorate([state()], PkCombobox.prototype, "asyncError", void 0);
|
|
2011
|
+
PkCombobox = __decorate([customElement("pk-combobox")], PkCombobox);
|
|
2012
|
+
//#endregion
|
|
2013
|
+
export { PkCreateEvent as n, PkCombobox as t };
|
|
2014
|
+
|
|
2015
|
+
//# sourceMappingURL=pk-combobox-Dd1ik0Ko.js.map
|