@verbb/plugin-kit-web 2.0.15 → 2.0.16
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 +64 -0
- package/custom-elements.json +39571 -0
- package/dist/base/pk-form-associated-element.d.ts +17 -1
- package/dist/base/pk-form-associated-element.d.ts.map +1 -1
- package/dist/chunks/{animate-with-class-ZJeCOKB3.js → animate-with-class-CsDwYnXL.js} +1 -1
- package/dist/chunks/{animate-with-class-ZJeCOKB3.js.map → animate-with-class-CsDwYnXL.js.map} +1 -1
- package/dist/chunks/{autoloader-DPX9YYZs.js → autoloader-dJO3tYOX.js} +2 -2
- package/dist/chunks/{autoloader-DPX9YYZs.js.map → autoloader-dJO3tYOX.js.map} +1 -1
- package/dist/chunks/{component-registry-CNB8PbP_.js → component-registry-D34fm8xW.js} +5 -1
- package/dist/chunks/component-registry-D34fm8xW.js.map +1 -0
- package/dist/chunks/{field-labels-CoU9dnNq.js → field-labels-CmuAW8Cl.js} +1 -1
- package/dist/chunks/{field-labels-CoU9dnNq.js.map → field-labels-CmuAW8Cl.js.map} +1 -1
- package/dist/chunks/option-filter-BQqr8Z21.js +121 -0
- package/dist/chunks/option-filter-BQqr8Z21.js.map +1 -0
- package/dist/chunks/pk-autocomplete-kOT0Zlld.js +992 -0
- package/dist/chunks/pk-autocomplete-kOT0Zlld.js.map +1 -0
- package/dist/chunks/{pk-button-BWGDkuzc.js → pk-button-BrH4u4Qr.js} +8 -4
- package/dist/chunks/{pk-button-BWGDkuzc.js.map → pk-button-BrH4u4Qr.js.map} +1 -1
- package/dist/chunks/{pk-calendar-enTOUCRD.js → pk-calendar-Z7Y0PjeY.js} +1 -1
- package/dist/chunks/{pk-calendar-enTOUCRD.js.map → pk-calendar-Z7Y0PjeY.js.map} +1 -1
- package/dist/chunks/{pk-checkbox-CvZwJZn_.js → pk-checkbox-CfV1uDdC.js} +2 -2
- package/dist/chunks/{pk-checkbox-CvZwJZn_.js.map → pk-checkbox-CfV1uDdC.js.map} +1 -1
- package/dist/chunks/{pk-checkbox-select-DclPoyDM.js → pk-checkbox-select-DeCaI3a0.js} +2 -2
- package/dist/chunks/{pk-checkbox-select-DclPoyDM.js.map → pk-checkbox-select-DeCaI3a0.js.map} +1 -1
- package/dist/chunks/{pk-code-editor-CrKnJUyi.js → pk-code-editor-BG9sG_Fy.js} +2 -2
- package/dist/chunks/{pk-code-editor-CrKnJUyi.js.map → pk-code-editor-BG9sG_Fy.js.map} +1 -1
- package/dist/chunks/{pk-color-input-DXdqNCK7.js → pk-color-input-CncNce1C.js} +2 -2
- package/dist/chunks/{pk-color-input-DXdqNCK7.js.map → pk-color-input-CncNce1C.js.map} +1 -1
- package/dist/chunks/{pk-combobox-BLft8AXy.js → pk-combobox-Dn7UJ_CV.js} +48 -91
- package/dist/chunks/pk-combobox-Dn7UJ_CV.js.map +1 -0
- package/dist/chunks/{pk-connect.styles-DshgIW2n.js → pk-connect.styles-BhW406jt.js} +1 -1
- package/dist/chunks/{pk-connect.styles-DshgIW2n.js.map → pk-connect.styles-BhW406jt.js.map} +1 -1
- package/dist/chunks/{pk-copy-button-asOLQkqk.js → pk-copy-button-BVaOLtYG.js} +46 -5
- package/dist/chunks/pk-copy-button-BVaOLtYG.js.map +1 -0
- package/dist/chunks/{pk-date-picker-Bri3kZ6x.js → pk-date-picker-DfIvmoZ1.js} +5 -5
- package/dist/chunks/{pk-date-picker-Bri3kZ6x.js.map → pk-date-picker-DfIvmoZ1.js.map} +1 -1
- package/dist/chunks/{pk-dialog-BbEfvb0g.js → pk-dialog-VMQqLW1f.js} +2 -2
- package/dist/chunks/{pk-dialog-BbEfvb0g.js.map → pk-dialog-VMQqLW1f.js.map} +1 -1
- package/dist/chunks/{pk-dropdown-item-BoZTGWMU.js → pk-dropdown-item-BZQS87U0.js} +2 -2
- package/dist/chunks/{pk-dropdown-item-BoZTGWMU.js.map → pk-dropdown-item-BZQS87U0.js.map} +1 -1
- package/dist/chunks/{pk-dropdown-label-Da28F917.js → pk-dropdown-label-CRNWMWQd.js} +1 -1
- package/dist/chunks/{pk-dropdown-label-Da28F917.js.map → pk-dropdown-label-CRNWMWQd.js.map} +1 -1
- package/dist/chunks/{pk-dropdown-menu-CfZc7dIz.js → pk-dropdown-menu-D60p2-9X.js} +3 -3
- package/dist/chunks/{pk-dropdown-menu-CfZc7dIz.js.map → pk-dropdown-menu-D60p2-9X.js.map} +1 -1
- package/dist/chunks/{pk-editable-table-Cn4WXqAo.js → pk-editable-table-BQ47MXpu.js} +17 -19
- package/dist/chunks/pk-editable-table-BQ47MXpu.js.map +1 -0
- package/dist/chunks/{pk-field-NL4KdFZC.js → pk-field-UAlMq6mQ.js} +2 -2
- package/dist/chunks/{pk-field-NL4KdFZC.js.map → pk-field-UAlMq6mQ.js.map} +1 -1
- package/dist/chunks/{pk-form-associated-element-9M2NzOE2.js → pk-form-associated-element-CCQALRGB.js} +14 -2
- package/dist/chunks/pk-form-associated-element-CCQALRGB.js.map +1 -0
- package/dist/chunks/pk-image-browser-BXFDfch3.js +1364 -0
- package/dist/chunks/pk-image-browser-BXFDfch3.js.map +1 -0
- package/dist/chunks/{pk-input-DDkIXOkt.js → pk-input-CF_icEtR.js} +76 -30
- package/dist/chunks/pk-input-CF_icEtR.js.map +1 -0
- package/dist/chunks/{pk-input-group-CRPSBFhX.js → pk-input-group-CWdoVhkH.js} +1 -1
- package/dist/chunks/{pk-input-group-CRPSBFhX.js.map → pk-input-group-CWdoVhkH.js.map} +1 -1
- package/dist/chunks/{pk-input-group-addon-B0StOmTJ.js → pk-input-group-addon-ClBkGmAw.js} +1 -1
- package/dist/chunks/{pk-input-group-addon-B0StOmTJ.js.map → pk-input-group-addon-ClBkGmAw.js.map} +1 -1
- package/dist/chunks/{pk-input-group-button-CnKajvsP.js → pk-input-group-button-CHQHsWd4.js} +1 -1
- package/dist/chunks/{pk-input-group-button-CnKajvsP.js.map → pk-input-group-button-CHQHsWd4.js.map} +1 -1
- package/dist/chunks/{pk-input-group-input-mllffsjQ.js → pk-input-group-input-oNnqMBGU.js} +1 -1
- package/dist/chunks/{pk-input-group-input-mllffsjQ.js.map → pk-input-group-input-oNnqMBGU.js.map} +1 -1
- package/dist/chunks/{pk-input-group-text-DvaPJvh2.js → pk-input-group-text-HUxlXROB.js} +1 -1
- package/dist/chunks/{pk-input-group-text-DvaPJvh2.js.map → pk-input-group-text-HUxlXROB.js.map} +1 -1
- package/dist/chunks/{pk-input-group-textarea-CqYv8tUQ.js → pk-input-group-textarea-Cl2FNuw-.js} +1 -1
- package/dist/chunks/{pk-input-group-textarea-CqYv8tUQ.js.map → pk-input-group-textarea-Cl2FNuw-.js.map} +1 -1
- package/dist/chunks/{pk-lightswitch-DI1BeCmA.js → pk-lightswitch-D1qEFRxK.js} +3 -3
- package/dist/chunks/{pk-lightswitch-DI1BeCmA.js.map → pk-lightswitch-D1qEFRxK.js.map} +1 -1
- package/dist/chunks/{pk-option-MGj9SKOK.js → pk-option-DQZHV9jL.js} +3 -2
- package/dist/chunks/pk-option-DQZHV9jL.js.map +1 -0
- package/dist/chunks/{pk-option-group-Cs6N7mlP.js → pk-option-group-CCzJkBFp.js} +1 -1
- package/dist/chunks/{pk-option-group-Cs6N7mlP.js.map → pk-option-group-CCzJkBFp.js.map} +1 -1
- package/dist/chunks/{pk-popover-duyNosk2.js → pk-popover-KSIOYlbs.js} +3 -3
- package/dist/chunks/{pk-popover-duyNosk2.js.map → pk-popover-KSIOYlbs.js.map} +1 -1
- package/dist/chunks/{pk-radio-BK4D2Htu.js → pk-radio-B5XkMHy3.js} +1 -1
- package/dist/chunks/{pk-radio-BK4D2Htu.js.map → pk-radio-B5XkMHy3.js.map} +1 -1
- package/dist/chunks/{pk-radio-group-BRJIjOsR.js → pk-radio-group-ByrxGLdX.js} +3 -3
- package/dist/chunks/{pk-radio-group-BRJIjOsR.js.map → pk-radio-group-ByrxGLdX.js.map} +1 -1
- package/dist/chunks/{pk-scroll-area-BR6ckorh.js → pk-scroll-area-CdfNxYz8.js} +1 -1
- package/dist/chunks/{pk-scroll-area-BR6ckorh.js.map → pk-scroll-area-CdfNxYz8.js.map} +1 -1
- package/dist/chunks/{pk-select-C1s0OJr0.js → pk-select-DQtORz-v.js} +6 -4
- package/dist/chunks/pk-select-DQtORz-v.js.map +1 -0
- package/dist/chunks/{pk-separator-CHij3vEG.js → pk-separator-N-VyjYE6.js} +1 -1
- package/dist/chunks/{pk-separator-CHij3vEG.js.map → pk-separator-N-VyjYE6.js.map} +1 -1
- package/dist/chunks/{pk-status-D1IzTSI2.js → pk-status-BehQARDv.js} +1 -1
- package/dist/chunks/{pk-status-D1IzTSI2.js.map → pk-status-BehQARDv.js.map} +1 -1
- package/dist/chunks/{pk-tab-2MHunhlF.js → pk-tab-CTloD18e.js} +1 -1
- package/dist/chunks/{pk-tab-2MHunhlF.js.map → pk-tab-CTloD18e.js.map} +1 -1
- package/dist/chunks/{pk-tab-heading-BV6m_sT-.js → pk-tab-heading-Cjcgebxn.js} +1 -1
- package/dist/chunks/{pk-tab-heading-BV6m_sT-.js.map → pk-tab-heading-Cjcgebxn.js.map} +1 -1
- package/dist/chunks/{pk-tab-panel-C6FxQw9q.js → pk-tab-panel-CkKU5-Ah.js} +1 -1
- package/dist/chunks/{pk-tab-panel-C6FxQw9q.js.map → pk-tab-panel-CkKU5-Ah.js.map} +1 -1
- package/dist/chunks/{pk-tabs-BTE63uK9.js → pk-tabs-BgEBki1q.js} +1 -1
- package/dist/chunks/{pk-tabs-BTE63uK9.js.map → pk-tabs-BgEBki1q.js.map} +1 -1
- package/dist/chunks/{pk-textarea-BcAyZYC-.js → pk-textarea-CYM2tK88.js} +3 -3
- package/dist/chunks/{pk-textarea-BcAyZYC-.js.map → pk-textarea-CYM2tK88.js.map} +1 -1
- package/dist/chunks/{pk-time-picker-5D4nmig2.js → pk-time-picker-DLUBYLFo.js} +3 -3
- package/dist/chunks/{pk-time-picker-5D4nmig2.js.map → pk-time-picker-DLUBYLFo.js.map} +1 -1
- package/dist/chunks/{pk-tiptap-content-BPd4GO6c.js → pk-tiptap-content-BwkqYVJb.js} +2 -2
- package/dist/chunks/{pk-tiptap-content-BPd4GO6c.js.map → pk-tiptap-content-BwkqYVJb.js.map} +1 -1
- package/dist/chunks/{pk-tiptap-editor-tG67Vegc.js → pk-tiptap-editor-De8UUTis.js} +12 -12
- package/dist/chunks/pk-tiptap-editor-De8UUTis.js.map +1 -0
- package/dist/chunks/{pk-tiptap-input-CtefNnaK.js → pk-tiptap-input-Y9eog9Zn.js} +3 -3
- package/dist/chunks/{pk-tiptap-input-CtefNnaK.js.map → pk-tiptap-input-Y9eog9Zn.js.map} +1 -1
- package/dist/chunks/{pk-toggle-CW-lflrh.js → pk-toggle-BthhH7vl.js} +1 -1
- package/dist/chunks/{pk-toggle-CW-lflrh.js.map → pk-toggle-BthhH7vl.js.map} +1 -1
- package/dist/chunks/{pk-toggle-group-BKymefo3.js → pk-toggle-group-D2Quux8D.js} +1 -1
- package/dist/chunks/{pk-toggle-group-BKymefo3.js.map → pk-toggle-group-D2Quux8D.js.map} +1 -1
- package/dist/chunks/{pk-tooltip-BoDq8YVe.js → pk-tooltip-Cmmc0916.js} +1 -1
- package/dist/chunks/{pk-tooltip-BoDq8YVe.js.map → pk-tooltip-Cmmc0916.js.map} +1 -1
- package/dist/chunks/{popup-content-animation.styles-Dc6d9quJ.js → popup-content-animation.styles-BnNiguJo.js} +1 -1
- package/dist/chunks/{popup-content-animation.styles-Dc6d9quJ.js.map → popup-content-animation.styles-BnNiguJo.js.map} +1 -1
- package/dist/chunks/{popup-pointer-DMnuZDQl.js → popup-pointer-CuLjk1th.js} +1 -1
- package/dist/chunks/{popup-pointer-DMnuZDQl.js.map → popup-pointer-CuLjk1th.js.map} +1 -1
- package/dist/chunks/{register-components-B-qCPFFh.js → register-components-BT9THgdh.js} +1 -1
- package/dist/chunks/{register-components-B-qCPFFh.js.map → register-components-BT9THgdh.js.map} +1 -1
- package/dist/chunks/{register-CQodpTWT.js → register-posLyX3U.js} +45 -45
- package/dist/chunks/{register-CQodpTWT.js.map → register-posLyX3U.js.map} +1 -1
- package/dist/chunks/{tiptap.styles-ChAfyVi9.js → tiptap.styles-CPRows--.js} +4 -3
- package/dist/chunks/tiptap.styles-CPRows--.js.map +1 -0
- package/dist/component-registry.d.ts.map +1 -1
- package/dist/components/autocomplete/index.d.ts +2 -0
- package/dist/components/autocomplete/index.d.ts.map +1 -0
- package/dist/components/autocomplete/pk-autocomplete.d.ts +150 -0
- package/dist/components/autocomplete/pk-autocomplete.d.ts.map +1 -0
- package/dist/components/autocomplete/pk-autocomplete.js +2 -0
- package/dist/components/autocomplete/pk-autocomplete.styles.d.ts +7 -0
- package/dist/components/autocomplete/pk-autocomplete.styles.d.ts.map +1 -0
- package/dist/components/autocomplete.d.ts +2 -0
- package/dist/components/autocomplete.js +2 -0
- package/dist/components/button/pk-button.d.ts +37 -1
- package/dist/components/button/pk-button.d.ts.map +1 -1
- package/dist/components/button/pk-button.js +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/calendar/pk-calendar.js +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/checkbox/pk-checkbox.js +1 -1
- package/dist/components/checkbox-select/pk-checkbox-select.js +1 -1
- package/dist/components/checkbox-select.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/code-editor/pk-code-editor.js +1 -1
- package/dist/components/code-editor.js +1 -1
- package/dist/components/color-input/pk-color-input.js +1 -1
- package/dist/components/color-input.js +1 -1
- package/dist/components/combobox/pk-combobox.d.ts +8 -14
- package/dist/components/combobox/pk-combobox.d.ts.map +1 -1
- package/dist/components/combobox/pk-combobox.js +1 -1
- package/dist/components/combobox/pk-combobox.styles.d.ts.map +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/connect/pk-connect-oauth.js +3 -3
- package/dist/components/connect/pk-connect.js +4 -4
- package/dist/components/copy-button/pk-copy-button.d.ts +3 -0
- package/dist/components/copy-button/pk-copy-button.d.ts.map +1 -1
- package/dist/components/copy-button/pk-copy-button.js +1 -1
- package/dist/components/copy-button/pk-copy-button.styles.d.ts.map +1 -1
- package/dist/components/copy-button.js +1 -1
- package/dist/components/date-picker/pk-date-picker.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/dialog/pk-dialog.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dropdown-menu/pk-dropdown-item.js +1 -1
- package/dist/components/dropdown-menu/pk-dropdown-label.js +1 -1
- package/dist/components/dropdown-menu/pk-dropdown-menu.js +1 -1
- package/dist/components/dropdown-menu.js +3 -3
- package/dist/components/editable-table/editable-table-model.d.ts +4 -1
- package/dist/components/editable-table/editable-table-model.d.ts.map +1 -1
- package/dist/components/editable-table/pk-editable-table.d.ts +1 -1
- package/dist/components/editable-table/pk-editable-table.d.ts.map +1 -1
- package/dist/components/editable-table/pk-editable-table.js +1 -1
- package/dist/components/editable-table.js +1 -1
- package/dist/components/field/pk-field.js +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/icon/pk-icon.d.ts +3 -2
- package/dist/components/icon/pk-icon.d.ts.map +1 -1
- package/dist/components/icon/pk-icon.js.map +1 -1
- package/dist/components/image-browser/index.d.ts +2 -0
- package/dist/components/image-browser/index.d.ts.map +1 -0
- package/dist/components/image-browser/pk-image-browser.d.ts +190 -0
- package/dist/components/image-browser/pk-image-browser.d.ts.map +1 -0
- package/dist/components/image-browser/pk-image-browser.js +2 -0
- package/dist/components/image-browser/pk-image-browser.styles.d.ts +6 -0
- package/dist/components/image-browser/pk-image-browser.styles.d.ts.map +1 -0
- package/dist/components/image-browser.d.ts +2 -0
- package/dist/components/image-browser.js +2 -0
- package/dist/components/input/pk-input.d.ts +2 -1
- package/dist/components/input/pk-input.d.ts.map +1 -1
- package/dist/components/input/pk-input.js +1 -1
- package/dist/components/input/pk-input.styles.d.ts.map +1 -1
- package/dist/components/input-group/pk-input-group-addon.js +1 -1
- package/dist/components/input-group/pk-input-group-button.js +1 -1
- package/dist/components/input-group/pk-input-group-input.js +1 -1
- package/dist/components/input-group/pk-input-group-text.js +1 -1
- package/dist/components/input-group/pk-input-group-textarea.js +1 -1
- package/dist/components/input-group/pk-input-group.js +1 -1
- package/dist/components/input-group.js +6 -6
- package/dist/components/input.js +1 -1
- package/dist/components/lightswitch/pk-lightswitch.js +1 -1
- package/dist/components/lightswitch.js +1 -1
- package/dist/components/popover/pk-popover.js +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/radio-group/pk-radio-group.js +1 -1
- package/dist/components/radio-group/pk-radio.js +1 -1
- package/dist/components/radio-group.js +2 -2
- package/dist/components/scroll-area/pk-scroll-area.js +1 -1
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/select/pk-option-group.d.ts +3 -1
- package/dist/components/select/pk-option-group.d.ts.map +1 -1
- package/dist/components/select/pk-option-group.js +1 -1
- package/dist/components/select/pk-option.d.ts +10 -1
- package/dist/components/select/pk-option.d.ts.map +1 -1
- package/dist/components/select/pk-option.js +1 -1
- package/dist/components/select/pk-select.d.ts +42 -3
- package/dist/components/select/pk-select.d.ts.map +1 -1
- package/dist/components/select/pk-select.js +1 -1
- package/dist/components/select.js +3 -3
- package/dist/components/separator/pk-separator.js +1 -1
- package/dist/components/separator.js +1 -1
- package/dist/components/status/pk-status.js +1 -1
- package/dist/components/status.js +1 -1
- package/dist/components/tabs/pk-tab-heading.js +1 -1
- package/dist/components/tabs/pk-tab-panel.js +1 -1
- package/dist/components/tabs/pk-tab.js +1 -1
- package/dist/components/tabs/pk-tabs.js +1 -1
- package/dist/components/tabs.js +4 -4
- package/dist/components/textarea/pk-textarea.js +1 -1
- package/dist/components/textarea.js +1 -1
- package/dist/components/time-picker/pk-time-picker.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/tiptap/pk-tiptap-content.js +1 -1
- package/dist/components/tiptap/pk-tiptap-editor.js +1 -1
- package/dist/components/tiptap/pk-tiptap-input.js +1 -1
- package/dist/components/tiptap/variable-tag-node-view.d.ts.map +1 -1
- package/dist/components/tiptap-content.js +1 -1
- package/dist/components/tiptap-editor.js +1 -1
- package/dist/components/tiptap-input.js +1 -1
- package/dist/components/toggle/pk-toggle.js +1 -1
- package/dist/components/toggle-group/pk-toggle-group.js +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip/pk-tooltip.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/connect/register-cp-connect.js +3 -3
- package/dist/index.js +49 -49
- package/dist/internal/sync-filtered-options.d.ts +23 -0
- package/dist/internal/sync-filtered-options.d.ts.map +1 -0
- package/dist/plugin-kit.css +2 -0
- package/dist/plugin-kit.js +2 -2
- package/dist/register-components.js +1 -1
- package/dist/register-pk.generated.d.ts +4 -0
- package/dist/register-pk.generated.d.ts.map +1 -1
- package/dist/register.js +47 -47
- package/dist/utilities/fouce.css +2 -0
- package/dist/utils/async-option-fetch.d.ts +38 -0
- package/dist/utils/async-option-fetch.d.ts.map +1 -0
- package/dist/utils/option-filter.d.ts +11 -0
- package/dist/utils/option-filter.d.ts.map +1 -0
- package/dist/utils/popup-content-exit.d.ts +6 -0
- package/dist/utils/popup-content-exit.d.ts.map +1 -0
- package/dist-loader/chunks/option-filter-Z7bomRrK.js +119 -0
- package/dist-loader/chunks/{pk-base-B21zXxSo.js → pk-base-CyzwylQ7.js} +13 -1
- package/dist-loader/chunks/{pk-button-Dh4gjLHw.js → pk-button-dngp-vOd.js} +10 -6
- package/dist-loader/chunks/{pk-calendar-n1bwSO7X.js → pk-calendar-BE4HRfCq.js} +3 -3
- package/dist-loader/chunks/{pk-checkbox-BrZQB816.js → pk-checkbox-B3d4nkBx.js} +1 -1
- package/dist-loader/chunks/{pk-color-input-sS05YOwT.js → pk-color-input-CD-r_sfG.js} +1 -1
- package/dist-loader/chunks/{pk-combobox-B7q6alzE.js → pk-combobox-DMBKXPLB.js} +48 -91
- package/dist-loader/chunks/{pk-date-picker-Dni5ty79.js → pk-date-picker-wntQmeIM.js} +5 -5
- package/dist-loader/chunks/{pk-dialog-BpPRqFMm.js → pk-dialog-B6lzsRur.js} +3 -3
- package/dist-loader/chunks/{pk-dropdown-item-CHkFNlA9.js → pk-dropdown-item-DJ5TeF1r.js} +3 -3
- package/dist-loader/chunks/{pk-dropdown-menu-BHVOMNV1.js → pk-dropdown-menu-B87bsdlI.js} +3 -3
- package/dist-loader/chunks/{pk-field-CJ09ll1S.js → pk-field-D_SNOJpl.js} +4 -4
- package/dist-loader/chunks/{pk-icon-WHUu7wxk.js → pk-icon-B5ob3JdK.js} +2 -2
- package/dist-loader/chunks/{pk-input-CEw3AdYt.js → pk-input-BhU0PiCk.js} +74 -28
- package/dist-loader/chunks/{pk-lightswitch-DJEUScgo.js → pk-lightswitch-DRxY8511.js} +1 -1
- package/dist-loader/chunks/{pk-option-CunPIei0.js → pk-option-Cc6QWw-0.js} +5 -4
- package/dist-loader/chunks/{pk-popup-FDdBxb4k.js → pk-popup-BooGjXgH.js} +1 -1
- package/dist-loader/chunks/{pk-select-CbAaQ7uE.js → pk-select-BG8qPsBd.js} +6 -4
- package/dist-loader/chunks/{pk-spinner-CIbXjDnp.js → pk-spinner-BKU9Rf2R.js} +1 -1
- package/dist-loader/chunks/{pk-status-BRIVW7EH.js → pk-status-D3ArH2ui.js} +1 -1
- package/dist-loader/chunks/{pk-textarea-C_rOUtFS.js → pk-textarea-CC7rA5A7.js} +1 -1
- package/dist-loader/chunks/{pk-time-picker-Dr3uvbvc.js → pk-time-picker-CDVFNhN7.js} +5 -5
- package/dist-loader/chunks/{pk-tooltip-HwZ0zRd2.js → pk-tooltip-BS2dNLOS.js} +2 -2
- package/dist-loader/chunks/{render-Niz5wYRa.js → render-BKfL_WRl.js} +1 -1
- package/dist-loader/chunks/{svg-_Mtb7CHx.js → svg-BiAlXtCn.js} +5 -3
- package/dist-loader/chunks/{tiptap.styles-BIRIMP7I.js → tiptap.styles-BFGP4eTV.js} +3 -2
- package/dist-loader/components/autocomplete/autocomplete.js +984 -0
- package/dist-loader/components/button/button.js +1 -1
- package/dist-loader/components/button-group/button-group-separator.js +1 -1
- package/dist-loader/components/button-group/button-group-text.js +1 -1
- package/dist-loader/components/button-group/button-group.js +1 -1
- package/dist-loader/components/calendar/calendar.js +1 -1
- package/dist-loader/components/checkbox/checkbox.js +1 -1
- package/dist-loader/components/checkbox-select/checkbox-select.js +2 -2
- package/dist-loader/components/code-editor/code-editor.js +1 -1
- package/dist-loader/components/color-input/color-input.js +1 -1
- package/dist-loader/components/combobox/combobox.js +1 -1
- package/dist-loader/components/connect/connect-oauth.js +3 -3
- package/dist-loader/components/connect/connect.js +5 -5
- package/dist-loader/components/copy-button/copy-button.js +48 -7
- package/dist-loader/components/date-picker/date-picker.js +1 -1
- package/dist-loader/components/dialog/dialog.js +1 -1
- package/dist-loader/components/dropdown-menu/dropdown-item.js +1 -1
- package/dist-loader/components/dropdown-menu/dropdown-label.js +1 -1
- package/dist-loader/components/dropdown-menu/dropdown-menu.js +1 -1
- package/dist-loader/components/dropdown-menu/dropdown-separator.js +1 -1
- package/dist-loader/components/editable-table/editable-table.js +18 -20
- package/dist-loader/components/field/field.js +1 -1
- package/dist-loader/components/icon/icon.js +2 -2
- package/dist-loader/components/image-browser/image-browser.js +1356 -0
- package/dist-loader/components/input/input.js +1 -1
- package/dist-loader/components/input-group/input-group-addon.js +1 -1
- package/dist-loader/components/input-group/input-group-button.js +1 -1
- package/dist-loader/components/input-group/input-group-input.js +1 -1
- package/dist-loader/components/input-group/input-group-text.js +1 -1
- package/dist-loader/components/input-group/input-group-textarea.js +1 -1
- package/dist-loader/components/input-group/input-group.js +1 -1
- package/dist-loader/components/lightswitch/lightswitch.js +1 -1
- package/dist-loader/components/popover/popover.js +2 -2
- package/dist-loader/components/popup/popup.js +1 -1
- package/dist-loader/components/radio-group/radio-group.js +1 -1
- package/dist-loader/components/radio-group/radio.js +1 -1
- package/dist-loader/components/scroll-area/scroll-area.js +1 -1
- package/dist-loader/components/select/option-group.js +1 -1
- package/dist-loader/components/select/option.js +1 -1
- package/dist-loader/components/select/select.js +1 -1
- package/dist-loader/components/separator/separator.js +1 -1
- package/dist-loader/components/spinner/spinner.js +1 -1
- package/dist-loader/components/status/status.js +1 -1
- package/dist-loader/components/tabs/tab-heading.js +1 -1
- package/dist-loader/components/tabs/tab-panel.js +1 -1
- package/dist-loader/components/tabs/tab.js +1 -1
- package/dist-loader/components/tabs/tabs.js +1 -1
- package/dist-loader/components/textarea/textarea.js +1 -1
- package/dist-loader/components/time-picker/time-picker.js +1 -1
- package/dist-loader/components/tiptap/tiptap-content.js +2 -2
- package/dist-loader/components/tiptap/tiptap-editor.js +13 -13
- package/dist-loader/components/tiptap/tiptap-input.js +2 -2
- package/dist-loader/components/toggle/toggle.js +1 -1
- package/dist-loader/components/toggle-group/toggle-group.js +1 -1
- package/dist-loader/components/tooltip/tooltip.js +1 -1
- package/dist-loader/plugin-kit.css +2 -0
- package/dist-loader/plugin-kit.loader.js +4 -0
- package/dist-loader/utilities/fouce.css +2 -0
- package/package.json +53 -9
- package/dist/chunks/component-registry-CNB8PbP_.js.map +0 -1
- package/dist/chunks/pk-combobox-BLft8AXy.js.map +0 -1
- package/dist/chunks/pk-copy-button-asOLQkqk.js.map +0 -1
- package/dist/chunks/pk-editable-table-Cn4WXqAo.js.map +0 -1
- package/dist/chunks/pk-form-associated-element-9M2NzOE2.js.map +0 -1
- package/dist/chunks/pk-input-DDkIXOkt.js.map +0 -1
- package/dist/chunks/pk-option-MGj9SKOK.js.map +0 -1
- package/dist/chunks/pk-select-C1s0OJr0.js.map +0 -1
- package/dist/chunks/pk-tiptap-editor-tG67Vegc.js.map +0 -1
- package/dist/chunks/tiptap.styles-ChAfyVi9.js.map +0 -1
|
@@ -0,0 +1,1364 @@
|
|
|
1
|
+
import { t as icons_exports } from "./icons-BR8JcQj2.js";
|
|
2
|
+
import { a as query, i as property, o as state, s as customElement, t as __decorate } from "./decorate-R0X811qp.js";
|
|
3
|
+
import "./pk-spinner-DweuYJ_Z.js";
|
|
4
|
+
import { t as iconStyles } from "./icon.styles-BLTWLqYp.js";
|
|
5
|
+
import { t as PkFormAssociatedElement } from "./pk-form-associated-element-CCQALRGB.js";
|
|
6
|
+
import { t as MirrorValidator } from "./mirror-validator-DCjNYrrx.js";
|
|
7
|
+
import { t as RequiredValidator } from "./required-validator-CEg8dvjS.js";
|
|
8
|
+
import { n as renderIconHtml } from "./render-Dvc3MHQR.js";
|
|
9
|
+
import { i as uniqueId, t as LiveRegion } from "./focus-aa5dlv8k.js";
|
|
10
|
+
import { i as unregisterDismissible, n as isTopDismissible, r as registerDismissible } from "./dismissible-stack-XQUMfKO3.js";
|
|
11
|
+
import { i as scrollIntoView } from "./scroll-lock-Bbh3Sc5g.js";
|
|
12
|
+
import { t as PkClearEvent } from "./pk-clear--mPWZP7H.js";
|
|
13
|
+
import { i as PkShowEvent, n as PkAfterShowEvent, r as PkHideEvent, t as PkAfterHideEvent } from "./overlay-lifecycle-D0pkTQyI.js";
|
|
14
|
+
import "./pk-popup-B9AgBC2V.js";
|
|
15
|
+
import { i as waitForPopupReposition, r as syncPopupPlacementAnimation } from "./popup-placement-animation-WlEXnS85.js";
|
|
16
|
+
import { n as isPointerInsideOverlay } from "./popup-pointer-CuLjk1th.js";
|
|
17
|
+
import { t as popupContentAnimationStyles } from "./popup-content-animation.styles-BnNiguJo.js";
|
|
18
|
+
import "./pk-tooltip-Cmmc0916.js";
|
|
19
|
+
import { css, html, nothing } from "lit";
|
|
20
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
21
|
+
import { unsafeSVG } from "lit/directives/unsafe-svg.js";
|
|
22
|
+
//#region src/components/image-browser/pk-image-browser.styles.ts
|
|
23
|
+
/**
|
|
24
|
+
* Presentational static image / icon browser.
|
|
25
|
+
* Trigger chrome mirrors combobox popup-mode; panel grid mirrors Vizy icon picker.
|
|
26
|
+
*/
|
|
27
|
+
var pkImageBrowserStyles = [popupContentAnimationStyles, css`
|
|
28
|
+
${iconStyles}
|
|
29
|
+
@layer pk-component {
|
|
30
|
+
:host {
|
|
31
|
+
display: inline-block;
|
|
32
|
+
position: relative;
|
|
33
|
+
width: fit-content;
|
|
34
|
+
max-width: 100%;
|
|
35
|
+
vertical-align: top;
|
|
36
|
+
color: var(--pk-color-gray-700);
|
|
37
|
+
font-family: var(--pk-font-family);
|
|
38
|
+
font-size: var(--pk-font-size-base);
|
|
39
|
+
line-height: var(--pk-line-height);
|
|
40
|
+
--pk-image-browser-trigger-min-height: var(--pk-btn-height-default);
|
|
41
|
+
--pk-image-browser-padding-block: 6px;
|
|
42
|
+
--pk-image-browser-padding-inline: 10px;
|
|
43
|
+
--pk-image-browser-font-size: var(--pk-font-size-base);
|
|
44
|
+
--pk-image-browser-line-height: var(--pk-input-control-line-height, 1.25rem);
|
|
45
|
+
--pk-image-browser-glyph-size: 1rem;
|
|
46
|
+
--pk-image-browser-panel-width: 26.25rem;
|
|
47
|
+
/* Hit target larger than the glyph so the select ring has breathing room. */
|
|
48
|
+
--pk-image-browser-cell-min: 2.25rem;
|
|
49
|
+
--pk-image-browser-glyph-tile: 1.375rem;
|
|
50
|
+
--pk-image-browser-fill: var(--pk-color-slate-250);
|
|
51
|
+
--pk-image-browser-fill-hover: var(--pk-color-slate-300);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Caption under each cell — wider tracks; glyph size stays put. */
|
|
55
|
+
:host([label-mode='inline']) {
|
|
56
|
+
--pk-image-browser-cell-min: 3.75rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host([size='xs']) {
|
|
60
|
+
--pk-image-browser-trigger-min-height: var(--pk-btn-height-xs);
|
|
61
|
+
--pk-image-browser-padding-block: 2px;
|
|
62
|
+
--pk-image-browser-padding-inline: 6px;
|
|
63
|
+
--pk-image-browser-font-size: var(--pk-font-size-xs, 0.75rem);
|
|
64
|
+
--pk-image-browser-glyph-size: 0.875rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:host([size='sm']) {
|
|
68
|
+
--pk-image-browser-trigger-min-height: var(--pk-btn-height-sm);
|
|
69
|
+
--pk-image-browser-padding-block: 4px;
|
|
70
|
+
--pk-image-browser-padding-inline: 8px;
|
|
71
|
+
--pk-image-browser-font-size: var(--pk-font-size-sm, 0.8125rem);
|
|
72
|
+
--pk-image-browser-glyph-size: 0.875rem;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:host([size='lg']),
|
|
76
|
+
:host([size='xl']) {
|
|
77
|
+
--pk-image-browser-trigger-min-height: var(--pk-btn-height-lg);
|
|
78
|
+
--pk-image-browser-padding-block: 8px;
|
|
79
|
+
--pk-image-browser-padding-inline: 12px;
|
|
80
|
+
--pk-image-browser-font-size: var(--pk-font-size-lg, 1rem);
|
|
81
|
+
--pk-image-browser-glyph-size: 1.125rem;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Image mode — roomier photo tiles; captions still opt-in via label-mode="inline". */
|
|
85
|
+
:host([mode='image']) {
|
|
86
|
+
--pk-image-browser-panel-width: 34rem;
|
|
87
|
+
--pk-image-browser-cell-min: 7.5rem;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:host([mode='image'][label-mode='inline']) {
|
|
91
|
+
/* Captions reclaim a little width; preview stays the hero. */
|
|
92
|
+
--pk-image-browser-cell-min: 6.5rem;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
:host([width='full']) {
|
|
96
|
+
display: block;
|
|
97
|
+
width: 100%;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:host([width='full']) .control {
|
|
101
|
+
width: 100%;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.value-input {
|
|
105
|
+
position: absolute;
|
|
106
|
+
width: 1px;
|
|
107
|
+
height: 1px;
|
|
108
|
+
margin: -1px;
|
|
109
|
+
padding: 0;
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
clip: rect(0, 0, 0, 0);
|
|
112
|
+
white-space: nowrap;
|
|
113
|
+
border: 0;
|
|
114
|
+
opacity: 0;
|
|
115
|
+
pointer-events: none;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Combobox-style chrome: label + clear + chevron share one filled control.
|
|
119
|
+
* 0.5rem gap keeps ellipsized filenames from kissing the clear glyph. */
|
|
120
|
+
.control {
|
|
121
|
+
display: inline-flex;
|
|
122
|
+
align-items: stretch;
|
|
123
|
+
gap: 0.5rem;
|
|
124
|
+
min-width: 12.5rem;
|
|
125
|
+
max-width: 100%;
|
|
126
|
+
height: var(--pk-image-browser-trigger-min-height);
|
|
127
|
+
min-height: var(--pk-image-browser-trigger-min-height);
|
|
128
|
+
margin: 0;
|
|
129
|
+
padding: 0 0 0 var(--pk-image-browser-padding-inline);
|
|
130
|
+
border: 1px solid transparent;
|
|
131
|
+
border-radius: var(--pk-input-border-radius, var(--pk-radius-lg));
|
|
132
|
+
background: var(--pk-image-browser-fill);
|
|
133
|
+
color: inherit;
|
|
134
|
+
box-sizing: border-box;
|
|
135
|
+
overflow: hidden;
|
|
136
|
+
transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.control:hover:not(.is-disabled) {
|
|
140
|
+
background: var(--pk-image-browser-fill-hover);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.control.is-open:not(.is-disabled) {
|
|
144
|
+
background: var(--pk-image-browser-fill-hover);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.control:focus-within:not(.is-disabled) {
|
|
148
|
+
border-color: var(--pk-color-sky-600);
|
|
149
|
+
box-shadow: var(--pk-input-focus-shadow);
|
|
150
|
+
background: var(--pk-color-white);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
:host([invalid]) .control,
|
|
154
|
+
:host(:state(user-invalid)) .control {
|
|
155
|
+
border-color: var(--pk-color-rose-500, #f43f5e);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.control.is-disabled {
|
|
159
|
+
cursor: not-allowed;
|
|
160
|
+
opacity: 0.5;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.trigger {
|
|
164
|
+
display: inline-flex;
|
|
165
|
+
align-items: center;
|
|
166
|
+
flex: 1 1 auto;
|
|
167
|
+
min-width: 0;
|
|
168
|
+
margin: 0;
|
|
169
|
+
padding: var(--pk-image-browser-padding-block) 0;
|
|
170
|
+
border: 0;
|
|
171
|
+
border-radius: 0;
|
|
172
|
+
background: transparent;
|
|
173
|
+
color: inherit;
|
|
174
|
+
font: inherit;
|
|
175
|
+
font-size: var(--pk-image-browser-font-size);
|
|
176
|
+
font-weight: 400;
|
|
177
|
+
line-height: var(--pk-image-browser-line-height);
|
|
178
|
+
text-align: left;
|
|
179
|
+
white-space: nowrap;
|
|
180
|
+
cursor: pointer;
|
|
181
|
+
outline: none;
|
|
182
|
+
box-sizing: border-box;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.trigger:disabled {
|
|
186
|
+
cursor: not-allowed;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.trigger-main {
|
|
190
|
+
display: inline-flex;
|
|
191
|
+
align-items: center;
|
|
192
|
+
gap: 0.5rem;
|
|
193
|
+
flex: 1 1 auto;
|
|
194
|
+
min-width: 0;
|
|
195
|
+
overflow: hidden;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.trigger-preview {
|
|
199
|
+
display: inline-flex;
|
|
200
|
+
flex-shrink: 0;
|
|
201
|
+
align-items: center;
|
|
202
|
+
justify-content: center;
|
|
203
|
+
width: var(--pk-image-browser-glyph-size);
|
|
204
|
+
height: var(--pk-image-browser-glyph-size);
|
|
205
|
+
overflow: hidden;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.trigger-preview svg,
|
|
209
|
+
.trigger-preview img {
|
|
210
|
+
display: block;
|
|
211
|
+
width: 100%;
|
|
212
|
+
height: 100%;
|
|
213
|
+
object-fit: contain;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.trigger-preview svg {
|
|
217
|
+
fill: currentColor;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.trigger-label {
|
|
221
|
+
flex: 1 1 auto;
|
|
222
|
+
min-width: 0;
|
|
223
|
+
overflow: hidden;
|
|
224
|
+
text-overflow: ellipsis;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.trigger-label.is-placeholder {
|
|
228
|
+
color: var(--pk-color-gray-500);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.clear-button,
|
|
232
|
+
.expand-button {
|
|
233
|
+
display: inline-flex;
|
|
234
|
+
flex-shrink: 0;
|
|
235
|
+
align-items: center;
|
|
236
|
+
justify-content: center;
|
|
237
|
+
align-self: stretch;
|
|
238
|
+
box-sizing: border-box;
|
|
239
|
+
width: calc(0.75rem + 0.5rem);
|
|
240
|
+
margin: 0;
|
|
241
|
+
padding: 0;
|
|
242
|
+
border: 0;
|
|
243
|
+
border-radius: 0;
|
|
244
|
+
background: transparent;
|
|
245
|
+
color: var(--pk-color-gray-600);
|
|
246
|
+
cursor: pointer;
|
|
247
|
+
outline: none;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.expand-button {
|
|
251
|
+
width: calc(0.75rem + 0.5rem + var(--pk-image-browser-padding-inline));
|
|
252
|
+
padding-inline-end: var(--pk-image-browser-padding-inline);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.clear-button:hover:not(:disabled),
|
|
256
|
+
.expand-button:hover:not(:disabled) {
|
|
257
|
+
color: var(--pk-color-gray-800);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.clear-button:disabled,
|
|
261
|
+
.expand-button:disabled {
|
|
262
|
+
cursor: not-allowed;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.clear-button-icon,
|
|
266
|
+
.expand-button-icon {
|
|
267
|
+
display: inline-flex;
|
|
268
|
+
align-items: center;
|
|
269
|
+
justify-content: center;
|
|
270
|
+
line-height: 0;
|
|
271
|
+
pointer-events: none;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.clear-button-icon svg,
|
|
275
|
+
.expand-button-icon svg {
|
|
276
|
+
display: block;
|
|
277
|
+
width: 0.75rem;
|
|
278
|
+
height: 0.75rem;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.panel {
|
|
282
|
+
position: relative;
|
|
283
|
+
box-sizing: border-box;
|
|
284
|
+
display: flex;
|
|
285
|
+
flex-direction: column;
|
|
286
|
+
width: var(--pk-image-browser-panel-width);
|
|
287
|
+
max-width: min(100vw - 1.5rem, var(--pk-image-browser-panel-width));
|
|
288
|
+
max-height: min(28.75rem, 60vh);
|
|
289
|
+
border-radius: var(--pk-radius-lg);
|
|
290
|
+
background: var(--pk-color-white);
|
|
291
|
+
box-shadow:
|
|
292
|
+
0 0 0 1px rgba(31, 41, 51, 0.1),
|
|
293
|
+
0 5px 20px rgba(31, 41, 51, 0.25);
|
|
294
|
+
overflow: hidden;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.panel[hidden] {
|
|
298
|
+
display: none !important;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.panel-search {
|
|
302
|
+
flex: none;
|
|
303
|
+
/* Same inline inset as panel-body so search + grid share one vertical edge. */
|
|
304
|
+
padding: 0.625rem 0.625rem 0.5rem;
|
|
305
|
+
border-bottom: 1px solid var(--pk-color-gray-150, rgba(51, 64, 77, 0.1));
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.panel-input {
|
|
309
|
+
display: block;
|
|
310
|
+
width: 100%;
|
|
311
|
+
box-sizing: border-box;
|
|
312
|
+
margin: 0;
|
|
313
|
+
padding: 0.375rem 0.625rem;
|
|
314
|
+
border: 1px solid var(--pk-color-gray-200, #d4dce4);
|
|
315
|
+
border-radius: var(--pk-input-border-radius, var(--pk-radius-md));
|
|
316
|
+
background: var(--pk-color-white);
|
|
317
|
+
color: var(--pk-color-gray-700);
|
|
318
|
+
font: inherit;
|
|
319
|
+
font-size: var(--pk-font-size-sm, 0.8125rem);
|
|
320
|
+
line-height: 1.25rem;
|
|
321
|
+
outline: none;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.panel-input:focus {
|
|
325
|
+
border-color: var(--pk-color-sky-600);
|
|
326
|
+
box-shadow: var(--pk-input-focus-shadow);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.panel-body {
|
|
330
|
+
flex: 1 1 auto;
|
|
331
|
+
min-height: 0;
|
|
332
|
+
overflow-y: auto;
|
|
333
|
+
/* Match search field inset so the grid lines up with the input. */
|
|
334
|
+
padding: 0.5rem 0.625rem 0.625rem;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
:host([mode='image']) .panel-body {
|
|
338
|
+
padding: 0.5rem 0.625rem 0.625rem;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.group + .group {
|
|
342
|
+
margin-top: 0.875rem;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.group-heading {
|
|
346
|
+
display: flex;
|
|
347
|
+
justify-content: space-between;
|
|
348
|
+
gap: 0.5rem;
|
|
349
|
+
margin: 0 0 0.375rem;
|
|
350
|
+
color: var(--pk-color-gray-500);
|
|
351
|
+
font-size: 0.6875rem;
|
|
352
|
+
font-weight: 600;
|
|
353
|
+
letter-spacing: 0.04em;
|
|
354
|
+
line-height: 1.25;
|
|
355
|
+
text-transform: uppercase;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.group-heading-count {
|
|
359
|
+
font-weight: 400;
|
|
360
|
+
letter-spacing: 0;
|
|
361
|
+
text-transform: none;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/* Fixed column width (not 1fr) so sparse catalogs stay dense instead of stretching. */
|
|
365
|
+
.grid {
|
|
366
|
+
display: grid;
|
|
367
|
+
grid-template-columns: repeat(auto-fill, var(--pk-image-browser-cell-min));
|
|
368
|
+
gap: 0.375rem;
|
|
369
|
+
justify-content: start;
|
|
370
|
+
/* Don’t stretch short single-line cells to match taller wrapped neighbors in the row. */
|
|
371
|
+
align-items: start;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
:host([mode='image']) .grid {
|
|
375
|
+
grid-template-columns: repeat(auto-fill, minmax(var(--pk-image-browser-cell-min), 1fr));
|
|
376
|
+
gap: 0.375rem;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.option {
|
|
380
|
+
box-sizing: border-box;
|
|
381
|
+
display: flex;
|
|
382
|
+
flex-direction: column;
|
|
383
|
+
align-items: center;
|
|
384
|
+
justify-content: center;
|
|
385
|
+
gap: 0;
|
|
386
|
+
width: var(--pk-image-browser-cell-min);
|
|
387
|
+
height: var(--pk-image-browser-cell-min);
|
|
388
|
+
margin: 0;
|
|
389
|
+
/* Square hit target; glyph is smaller so the ring doesn’t clip tips. */
|
|
390
|
+
padding: 0;
|
|
391
|
+
border: 1px solid transparent;
|
|
392
|
+
border-radius: var(--pk-radius-sm);
|
|
393
|
+
background: none;
|
|
394
|
+
color: inherit;
|
|
395
|
+
cursor: pointer;
|
|
396
|
+
outline: none;
|
|
397
|
+
overflow: hidden;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/* With captions, height hugs glyph + label instead of a fixed square. */
|
|
401
|
+
:host([label-mode='inline']) .option {
|
|
402
|
+
justify-content: flex-start;
|
|
403
|
+
gap: 0.125rem;
|
|
404
|
+
height: auto;
|
|
405
|
+
/* Keep glyph + caption inside the inset highlight ring. */
|
|
406
|
+
padding: 0.25rem 0.125rem 0.3125rem;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
:host([mode='image']) .option {
|
|
410
|
+
position: relative;
|
|
411
|
+
width: auto;
|
|
412
|
+
height: auto;
|
|
413
|
+
min-height: 0;
|
|
414
|
+
gap: 0;
|
|
415
|
+
padding: 0;
|
|
416
|
+
overflow: hidden;
|
|
417
|
+
border-radius: var(--pk-radius-md);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
:host([mode='image'][label-mode='inline']) .option {
|
|
421
|
+
gap: 0.375rem;
|
|
422
|
+
padding: 0.375rem 0.375rem 0.5rem;
|
|
423
|
+
overflow: visible;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.option:hover,
|
|
427
|
+
.option:focus-visible,
|
|
428
|
+
.option.is-highlighted {
|
|
429
|
+
background: var(--pk-color-gray-050, #f3f7fc);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/* Selected is the durable chrome; highlight/hover share the same ring for keyboard parity. */
|
|
433
|
+
.option.is-selected,
|
|
434
|
+
.option.is-highlighted,
|
|
435
|
+
.option:hover {
|
|
436
|
+
box-shadow: inset 0 0 0 2px var(--pk-color-sky-600);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/*
|
|
440
|
+
* Flush photo tiles paint over inset box-shadow (descendants sit above it).
|
|
441
|
+
* Overlay the same ring so tooltip/none match inline chrome.
|
|
442
|
+
*/
|
|
443
|
+
:host([mode='image']) .option.is-selected,
|
|
444
|
+
:host([mode='image']) .option.is-highlighted,
|
|
445
|
+
:host([mode='image']) .option:hover {
|
|
446
|
+
box-shadow: none;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
:host([mode='image']) .option.is-selected::after,
|
|
450
|
+
:host([mode='image']) .option.is-highlighted::after,
|
|
451
|
+
:host([mode='image']) .option:hover::after {
|
|
452
|
+
content: '';
|
|
453
|
+
position: absolute;
|
|
454
|
+
inset: 0;
|
|
455
|
+
z-index: 1;
|
|
456
|
+
border-radius: inherit;
|
|
457
|
+
box-shadow: inset 0 0 0 2px var(--pk-color-sky-600);
|
|
458
|
+
pointer-events: none;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.option:focus-visible {
|
|
462
|
+
outline: none;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.option-preview {
|
|
466
|
+
display: flex;
|
|
467
|
+
align-items: center;
|
|
468
|
+
justify-content: center;
|
|
469
|
+
flex: 0 0 auto;
|
|
470
|
+
width: var(--pk-image-browser-glyph-tile);
|
|
471
|
+
height: var(--pk-image-browser-glyph-tile);
|
|
472
|
+
margin: 0;
|
|
473
|
+
overflow: hidden;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
:host([mode='image']) .option-preview {
|
|
477
|
+
width: 100%;
|
|
478
|
+
height: auto;
|
|
479
|
+
aspect-ratio: 4 / 3;
|
|
480
|
+
margin: 0;
|
|
481
|
+
border-radius: inherit;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.option-preview svg,
|
|
485
|
+
.option-preview img {
|
|
486
|
+
display: block;
|
|
487
|
+
width: 100%;
|
|
488
|
+
height: 100%;
|
|
489
|
+
object-fit: contain;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/* Photo tiles crop to fill — previews, not faithful aspect viewers. */
|
|
493
|
+
:host([mode='image']) .option-preview svg,
|
|
494
|
+
:host([mode='image']) .option-preview img {
|
|
495
|
+
object-fit: cover;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.option-preview svg {
|
|
499
|
+
fill: currentColor;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.option-label {
|
|
503
|
+
display: -webkit-box;
|
|
504
|
+
box-sizing: border-box;
|
|
505
|
+
width: 100%;
|
|
506
|
+
max-width: 100%;
|
|
507
|
+
padding-inline: 2px;
|
|
508
|
+
overflow: hidden;
|
|
509
|
+
color: var(--pk-color-gray-700);
|
|
510
|
+
font-size: 0.625rem;
|
|
511
|
+
line-height: 0.75rem;
|
|
512
|
+
text-align: center;
|
|
513
|
+
overflow-wrap: anywhere;
|
|
514
|
+
word-break: break-word;
|
|
515
|
+
-webkit-box-orient: vertical;
|
|
516
|
+
-webkit-line-clamp: 3;
|
|
517
|
+
line-clamp: 3;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
:host([mode='image']) .option-label {
|
|
521
|
+
display: block;
|
|
522
|
+
color: var(--pk-color-gray-600);
|
|
523
|
+
font-size: 0.6875rem;
|
|
524
|
+
line-height: 1.2;
|
|
525
|
+
text-overflow: ellipsis;
|
|
526
|
+
white-space: nowrap;
|
|
527
|
+
overflow-wrap: normal;
|
|
528
|
+
word-break: normal;
|
|
529
|
+
-webkit-line-clamp: unset;
|
|
530
|
+
line-clamp: unset;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.notice {
|
|
534
|
+
margin: 0.375rem 0;
|
|
535
|
+
color: var(--pk-color-gray-500);
|
|
536
|
+
font-size: var(--pk-font-size-sm, 0.8125rem);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.notice.is-error {
|
|
540
|
+
color: var(--pk-color-rose-600, #e11d48);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/* Host-driven catalog warm — spinner only (no loading copy). */
|
|
544
|
+
.loading {
|
|
545
|
+
display: flex;
|
|
546
|
+
align-items: center;
|
|
547
|
+
justify-content: center;
|
|
548
|
+
box-sizing: border-box;
|
|
549
|
+
min-height: 6rem;
|
|
550
|
+
padding: 1.25rem 0.75rem;
|
|
551
|
+
color: var(--pk-color-gray-500);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.panel-input:disabled {
|
|
555
|
+
cursor: not-allowed;
|
|
556
|
+
opacity: 0.6;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
/* Host is inert layout chrome; the floating tip lives in pk-popup. */
|
|
560
|
+
.option-tooltip {
|
|
561
|
+
position: absolute;
|
|
562
|
+
width: 0;
|
|
563
|
+
height: 0;
|
|
564
|
+
margin: 0;
|
|
565
|
+
padding: 0;
|
|
566
|
+
overflow: hidden;
|
|
567
|
+
pointer-events: none;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
`];
|
|
571
|
+
//#endregion
|
|
572
|
+
//#region src/components/image-browser/pk-image-browser.ts
|
|
573
|
+
var CHEVRON_ICON = renderIconHtml(icons_exports.chevronDown);
|
|
574
|
+
var XMARK_ICON = renderIconHtml(icons_exports.xmark);
|
|
575
|
+
/** How many matched items per group are painted before scroll reveals more. */
|
|
576
|
+
var DEFAULT_PAGE_SIZE = 96;
|
|
577
|
+
function isInlineSvg(preview) {
|
|
578
|
+
return /^\s*<svg[\s>]/i.test(preview);
|
|
579
|
+
}
|
|
580
|
+
var PkImageBrowser = class PkImageBrowser extends PkFormAssociatedElement {
|
|
581
|
+
constructor(..._args) {
|
|
582
|
+
super(..._args);
|
|
583
|
+
this.assumeInteractionOn = ["pk-change"];
|
|
584
|
+
this.size = "default";
|
|
585
|
+
this.mode = "icon";
|
|
586
|
+
this.width = "auto";
|
|
587
|
+
this.labelMode = "tooltip";
|
|
588
|
+
this.invalid = false;
|
|
589
|
+
this.readonly = false;
|
|
590
|
+
this.value = "";
|
|
591
|
+
this.defaultValue = "";
|
|
592
|
+
this.placeholder = "Choose…";
|
|
593
|
+
this.searchPlaceholder = "Search…";
|
|
594
|
+
this.emptyMessage = "No items match your query.";
|
|
595
|
+
this.ariaLabel = null;
|
|
596
|
+
this.loading = false;
|
|
597
|
+
this.withClear = true;
|
|
598
|
+
this.items = [];
|
|
599
|
+
this.groups = [];
|
|
600
|
+
this.selectedLabel = "";
|
|
601
|
+
this.selectedPreview = "";
|
|
602
|
+
this.placement = "bottom-start";
|
|
603
|
+
this.sideOffset = 4;
|
|
604
|
+
this.pageSize = DEFAULT_PAGE_SIZE;
|
|
605
|
+
this.open = false;
|
|
606
|
+
this.query = "";
|
|
607
|
+
this.limit = DEFAULT_PAGE_SIZE;
|
|
608
|
+
this.closing = false;
|
|
609
|
+
this.panelAnimated = false;
|
|
610
|
+
this.highlightedIndex = -1;
|
|
611
|
+
this.tooltipFor = "";
|
|
612
|
+
this.tooltipContent = "";
|
|
613
|
+
this.listboxId = uniqueId("pk-image-browser-listbox");
|
|
614
|
+
this.searchId = uniqueId("pk-image-browser-search");
|
|
615
|
+
this.closeTimer = null;
|
|
616
|
+
this.tooltipOpenTimer = null;
|
|
617
|
+
this.liveRegion = null;
|
|
618
|
+
this.handleClear = (event) => {
|
|
619
|
+
event.preventDefault();
|
|
620
|
+
event.stopPropagation();
|
|
621
|
+
if (this.disabled || this.readonly || this.value === "") return;
|
|
622
|
+
this.emitChange("");
|
|
623
|
+
this.dispatchEvent(new PkClearEvent());
|
|
624
|
+
this.triggerElement?.focus({ preventScroll: true });
|
|
625
|
+
};
|
|
626
|
+
this.togglePanel = (event) => {
|
|
627
|
+
event?.preventDefault();
|
|
628
|
+
event?.stopPropagation();
|
|
629
|
+
if (this.disabled || this.readonly) return;
|
|
630
|
+
if (this.open || this.closing) this.closePanel("api");
|
|
631
|
+
else this.openPanel();
|
|
632
|
+
};
|
|
633
|
+
this.handleTriggerKeyDown = (event) => {
|
|
634
|
+
if (this.disabled || this.readonly) return;
|
|
635
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp" || event.key === "Enter" || event.key === " ") {
|
|
636
|
+
event.preventDefault();
|
|
637
|
+
if (!this.open && !this.closing) this.openPanel();
|
|
638
|
+
}
|
|
639
|
+
};
|
|
640
|
+
this.onDocumentPointerDown = (event) => {
|
|
641
|
+
if (!this.open || this.closing || !isTopDismissible(this)) return;
|
|
642
|
+
if (isPointerInsideOverlay(event, {
|
|
643
|
+
host: this,
|
|
644
|
+
anchor: this.controlElement ?? this.triggerElement,
|
|
645
|
+
panel: this.panelElement
|
|
646
|
+
})) return;
|
|
647
|
+
this.closePanel("pointer-dismiss");
|
|
648
|
+
};
|
|
649
|
+
this.onDocumentKeyDown = (event) => {
|
|
650
|
+
if (!this.open || this.closing || !isTopDismissible(this)) return;
|
|
651
|
+
if (event.key === "Escape") {
|
|
652
|
+
event.preventDefault();
|
|
653
|
+
event.stopPropagation();
|
|
654
|
+
this.closePanel("escape");
|
|
655
|
+
}
|
|
656
|
+
};
|
|
657
|
+
this.handleSearchInput = (event) => {
|
|
658
|
+
if (this.loading) return;
|
|
659
|
+
this.query = event.target.value;
|
|
660
|
+
this.limit = this.normalizedPageSize();
|
|
661
|
+
this.resetHighlightForOpenCatalog();
|
|
662
|
+
this.announceResults();
|
|
663
|
+
};
|
|
664
|
+
this.handleSearchKeyDown = (event) => {
|
|
665
|
+
if (!this.open || this.closing || this.loading) return;
|
|
666
|
+
switch (event.key) {
|
|
667
|
+
case "ArrowDown":
|
|
668
|
+
case "ArrowUp":
|
|
669
|
+
case "ArrowLeft":
|
|
670
|
+
case "ArrowRight":
|
|
671
|
+
case "Home":
|
|
672
|
+
case "End":
|
|
673
|
+
event.preventDefault();
|
|
674
|
+
event.stopPropagation();
|
|
675
|
+
this.moveHighlight(event.key);
|
|
676
|
+
return;
|
|
677
|
+
case "Enter": {
|
|
678
|
+
event.preventDefault();
|
|
679
|
+
event.stopPropagation();
|
|
680
|
+
const item = this.flatVisibleItems()[this.highlightedIndex];
|
|
681
|
+
if (item) this.selectValue(item.value);
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
default: break;
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
this.handleResultsScroll = () => {
|
|
688
|
+
this.clearOptionTooltip();
|
|
689
|
+
const results = this.panelBody;
|
|
690
|
+
if (!results || !this.isTruncated()) return;
|
|
691
|
+
if (results.scrollTop + results.clientHeight < results.scrollHeight - 200) return;
|
|
692
|
+
const anchor = results.scrollTop;
|
|
693
|
+
this.limit += this.normalizedPageSize();
|
|
694
|
+
this.updateComplete.then(() => {
|
|
695
|
+
if (this.panelBody) this.panelBody.scrollTop = anchor;
|
|
696
|
+
});
|
|
697
|
+
};
|
|
698
|
+
this.handleOptionPointerLeave = (event) => {
|
|
699
|
+
const next = event.relatedTarget;
|
|
700
|
+
if (next instanceof Node && this.panelBody?.contains(next) && Boolean(next instanceof Element ? next.closest(".option") : next.parentElement?.closest(".option"))) return;
|
|
701
|
+
this.resetHighlightToSelected();
|
|
702
|
+
this.clearOptionTooltip();
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
static {
|
|
706
|
+
this.styles = pkImageBrowserStyles;
|
|
707
|
+
}
|
|
708
|
+
static get validators() {
|
|
709
|
+
return [
|
|
710
|
+
...super.validators,
|
|
711
|
+
MirrorValidator(),
|
|
712
|
+
RequiredValidator()
|
|
713
|
+
];
|
|
714
|
+
}
|
|
715
|
+
connectedCallback() {
|
|
716
|
+
super.connectedCallback();
|
|
717
|
+
this.limit = this.normalizedPageSize();
|
|
718
|
+
}
|
|
719
|
+
disconnectedCallback() {
|
|
720
|
+
this.teardownDismissListeners();
|
|
721
|
+
this.clearCloseTimer();
|
|
722
|
+
this.clearTooltipOpenTimer();
|
|
723
|
+
this.liveRegion?.destroy();
|
|
724
|
+
this.liveRegion = null;
|
|
725
|
+
super.disconnectedCallback();
|
|
726
|
+
}
|
|
727
|
+
willUpdate(changed) {
|
|
728
|
+
if (changed.has("pageSize") && !this.open) this.limit = this.normalizedPageSize();
|
|
729
|
+
super.willUpdate(changed);
|
|
730
|
+
}
|
|
731
|
+
updated(changed) {
|
|
732
|
+
super.updated(changed);
|
|
733
|
+
if (changed.has("open")) {
|
|
734
|
+
if (this.open) this.attachDismissListeners();
|
|
735
|
+
else if (!this.closing) this.teardownDismissListeners();
|
|
736
|
+
}
|
|
737
|
+
if ((changed.has("open") || changed.has("closing")) && (this.open || this.closing)) this.syncPanelPlacement();
|
|
738
|
+
if (this.open && (changed.has("highlightedIndex") || changed.has("query") || changed.has("limit"))) this.scrollHighlightedIntoView();
|
|
739
|
+
if (this.open && changed.has("loading") && !this.loading) this.resetHighlightForOpenCatalog();
|
|
740
|
+
}
|
|
741
|
+
get validationTarget() {
|
|
742
|
+
return this.triggerElement ?? this;
|
|
743
|
+
}
|
|
744
|
+
syncFormValue() {
|
|
745
|
+
this.setFormValue(this.value, this.value);
|
|
746
|
+
}
|
|
747
|
+
resetToDefaultValue() {
|
|
748
|
+
this.value = this.defaultValue;
|
|
749
|
+
}
|
|
750
|
+
restoreFormState(state) {
|
|
751
|
+
if (typeof state === "string") this.value = state;
|
|
752
|
+
}
|
|
753
|
+
async show() {
|
|
754
|
+
if (this.open || this.closing || this.disabled || this.readonly) return;
|
|
755
|
+
await this.openPanel();
|
|
756
|
+
}
|
|
757
|
+
async hide(source = "api") {
|
|
758
|
+
if (!this.open || this.closing) return;
|
|
759
|
+
await this.closePanel(source);
|
|
760
|
+
}
|
|
761
|
+
optionId(index) {
|
|
762
|
+
return `${this.listboxId}-opt-${index}`;
|
|
763
|
+
}
|
|
764
|
+
groupHeadingId(groupIndex) {
|
|
765
|
+
return `${this.listboxId}-group-${groupIndex}`;
|
|
766
|
+
}
|
|
767
|
+
normalizedPageSize() {
|
|
768
|
+
return this.pageSize > 0 ? this.pageSize : DEFAULT_PAGE_SIZE;
|
|
769
|
+
}
|
|
770
|
+
resolveGroups() {
|
|
771
|
+
if (this.groups.length > 0) return this.groups;
|
|
772
|
+
if (this.items.length > 0) return [{
|
|
773
|
+
name: "",
|
|
774
|
+
items: this.items
|
|
775
|
+
}];
|
|
776
|
+
return [];
|
|
777
|
+
}
|
|
778
|
+
findItem(value) {
|
|
779
|
+
if (value === "") return null;
|
|
780
|
+
for (const group of this.resolveGroups()) {
|
|
781
|
+
const found = group.items.find((item) => item.value === value);
|
|
782
|
+
if (found) return found;
|
|
783
|
+
}
|
|
784
|
+
return null;
|
|
785
|
+
}
|
|
786
|
+
selectedItem() {
|
|
787
|
+
return this.findItem(this.value);
|
|
788
|
+
}
|
|
789
|
+
triggerDisplay() {
|
|
790
|
+
const selected = this.selectedItem();
|
|
791
|
+
if (selected) return {
|
|
792
|
+
label: selected.label,
|
|
793
|
+
preview: selected.preview,
|
|
794
|
+
isPlaceholder: false
|
|
795
|
+
};
|
|
796
|
+
if (this.value !== "") return {
|
|
797
|
+
label: this.selectedLabel || this.value,
|
|
798
|
+
preview: this.selectedPreview || void 0,
|
|
799
|
+
isPlaceholder: false
|
|
800
|
+
};
|
|
801
|
+
return {
|
|
802
|
+
label: this.placeholder,
|
|
803
|
+
isPlaceholder: true
|
|
804
|
+
};
|
|
805
|
+
}
|
|
806
|
+
/** Groups matching the query, each truncated to the current render budget. */
|
|
807
|
+
visibleGroups() {
|
|
808
|
+
const query = this.query.trim().toLowerCase();
|
|
809
|
+
return this.resolveGroups().reduce((acc, group) => {
|
|
810
|
+
const matched = query === "" ? group.items : group.items.filter((item) => item.label.toLowerCase().includes(query) || item.value.toLowerCase().includes(query));
|
|
811
|
+
if (matched.length === 0) return acc;
|
|
812
|
+
acc.push({
|
|
813
|
+
name: group.name,
|
|
814
|
+
total: matched.length,
|
|
815
|
+
items: matched.slice(0, this.limit)
|
|
816
|
+
});
|
|
817
|
+
return acc;
|
|
818
|
+
}, []);
|
|
819
|
+
}
|
|
820
|
+
flatVisibleItems() {
|
|
821
|
+
return this.visibleGroups().flatMap((group) => group.items);
|
|
822
|
+
}
|
|
823
|
+
isTruncated() {
|
|
824
|
+
return this.visibleGroups().some((group) => group.items.length < group.total);
|
|
825
|
+
}
|
|
826
|
+
activeDescendantId() {
|
|
827
|
+
if (!this.open || this.highlightedIndex < 0) return null;
|
|
828
|
+
return this.optionId(this.highlightedIndex);
|
|
829
|
+
}
|
|
830
|
+
triggerAccessibleName() {
|
|
831
|
+
if (this.ariaLabel) {
|
|
832
|
+
const display = this.triggerDisplay();
|
|
833
|
+
if (display.isPlaceholder) return this.ariaLabel;
|
|
834
|
+
return `${this.ariaLabel}, ${display.label}`;
|
|
835
|
+
}
|
|
836
|
+
return this.triggerDisplay().label;
|
|
837
|
+
}
|
|
838
|
+
announceResults() {
|
|
839
|
+
if (this.loading) return;
|
|
840
|
+
const items = this.flatVisibleItems();
|
|
841
|
+
if (!this.query.trim()) return;
|
|
842
|
+
if (!this.liveRegion) this.liveRegion = new LiveRegion("polite");
|
|
843
|
+
this.liveRegion.announce(items.length === 0 ? this.emptyMessage : `${items.length} ${items.length === 1 ? "result" : "results"} available`);
|
|
844
|
+
}
|
|
845
|
+
resetHighlightForOpenCatalog() {
|
|
846
|
+
const items = this.flatVisibleItems();
|
|
847
|
+
if (items.length === 0) {
|
|
848
|
+
this.highlightedIndex = -1;
|
|
849
|
+
return;
|
|
850
|
+
}
|
|
851
|
+
const selectedIdx = items.findIndex((item) => item.value === this.value);
|
|
852
|
+
this.highlightedIndex = selectedIdx >= 0 ? selectedIdx : 0;
|
|
853
|
+
}
|
|
854
|
+
setHighlightedIndex(index) {
|
|
855
|
+
const items = this.flatVisibleItems();
|
|
856
|
+
if (items.length === 0) {
|
|
857
|
+
this.highlightedIndex = -1;
|
|
858
|
+
return;
|
|
859
|
+
}
|
|
860
|
+
const next = Math.max(0, Math.min(index, items.length - 1));
|
|
861
|
+
this.highlightedIndex = next;
|
|
862
|
+
if (next >= items.length - 4 && this.isTruncated()) this.limit += this.normalizedPageSize();
|
|
863
|
+
}
|
|
864
|
+
scrollHighlightedIntoView() {
|
|
865
|
+
if (this.highlightedIndex < 0 || !this.panelBody) return;
|
|
866
|
+
const option = this.renderRoot.querySelector(`#${CSS.escape(this.optionId(this.highlightedIndex))}`);
|
|
867
|
+
if (!option) return;
|
|
868
|
+
scrollIntoView(option, this.panelBody, "vertical", "auto");
|
|
869
|
+
}
|
|
870
|
+
/** Column count of the CSS grid that owns the highlighted option (for 2D arrows). */
|
|
871
|
+
columnCountNear(index) {
|
|
872
|
+
const grid = this.renderRoot.querySelector(`#${CSS.escape(this.optionId(index))}`)?.closest(".grid");
|
|
873
|
+
if (!grid) return 1;
|
|
874
|
+
const options = [...grid.querySelectorAll(".option")];
|
|
875
|
+
if (options.length === 0) return 1;
|
|
876
|
+
const firstTop = options[0].offsetTop;
|
|
877
|
+
let cols = 0;
|
|
878
|
+
for (const candidate of options) {
|
|
879
|
+
if (candidate.offsetTop !== firstTop) break;
|
|
880
|
+
cols += 1;
|
|
881
|
+
}
|
|
882
|
+
return Math.max(1, cols);
|
|
883
|
+
}
|
|
884
|
+
moveHighlight(key) {
|
|
885
|
+
const items = this.flatVisibleItems();
|
|
886
|
+
if (items.length === 0) {
|
|
887
|
+
this.highlightedIndex = -1;
|
|
888
|
+
return;
|
|
889
|
+
}
|
|
890
|
+
let next = this.highlightedIndex;
|
|
891
|
+
if (next < 0) {
|
|
892
|
+
next = key === "ArrowUp" || key === "ArrowLeft" || key === "End" ? items.length - 1 : 0;
|
|
893
|
+
this.setHighlightedIndex(next);
|
|
894
|
+
return;
|
|
895
|
+
}
|
|
896
|
+
const cols = this.columnCountNear(next);
|
|
897
|
+
switch (key) {
|
|
898
|
+
case "ArrowRight":
|
|
899
|
+
next = Math.min(next + 1, items.length - 1);
|
|
900
|
+
break;
|
|
901
|
+
case "ArrowLeft":
|
|
902
|
+
next = Math.max(next - 1, 0);
|
|
903
|
+
break;
|
|
904
|
+
case "ArrowDown":
|
|
905
|
+
next = Math.min(next + cols, items.length - 1);
|
|
906
|
+
break;
|
|
907
|
+
case "ArrowUp":
|
|
908
|
+
next = Math.max(next - cols, 0);
|
|
909
|
+
break;
|
|
910
|
+
case "Home":
|
|
911
|
+
next = 0;
|
|
912
|
+
break;
|
|
913
|
+
case "End":
|
|
914
|
+
next = items.length - 1;
|
|
915
|
+
break;
|
|
916
|
+
default: return;
|
|
917
|
+
}
|
|
918
|
+
this.setHighlightedIndex(next);
|
|
919
|
+
}
|
|
920
|
+
emitChange(next) {
|
|
921
|
+
this.value = next;
|
|
922
|
+
this.syncFormValue();
|
|
923
|
+
this.updateValidity();
|
|
924
|
+
this.dispatchEvent(new CustomEvent("pk-change", {
|
|
925
|
+
detail: { value: next },
|
|
926
|
+
bubbles: true,
|
|
927
|
+
composed: true
|
|
928
|
+
}));
|
|
929
|
+
this.dispatchEvent(new Event("input", {
|
|
930
|
+
bubbles: true,
|
|
931
|
+
composed: true
|
|
932
|
+
}));
|
|
933
|
+
this.dispatchEvent(new Event("change", {
|
|
934
|
+
bubbles: true,
|
|
935
|
+
composed: true
|
|
936
|
+
}));
|
|
937
|
+
}
|
|
938
|
+
selectValue(next) {
|
|
939
|
+
if (this.disabled || this.readonly) return;
|
|
940
|
+
const previous = this.value;
|
|
941
|
+
this.closePanel("api");
|
|
942
|
+
this.query = "";
|
|
943
|
+
this.limit = this.normalizedPageSize();
|
|
944
|
+
this.highlightedIndex = -1;
|
|
945
|
+
if (previous === next) {
|
|
946
|
+
if (this.withClear && previous !== "") {
|
|
947
|
+
this.emitChange("");
|
|
948
|
+
this.dispatchEvent(new PkClearEvent());
|
|
949
|
+
}
|
|
950
|
+
return;
|
|
951
|
+
}
|
|
952
|
+
this.emitChange(next);
|
|
953
|
+
}
|
|
954
|
+
async openPanel() {
|
|
955
|
+
if (this.open || this.closing || this.disabled || this.readonly) return;
|
|
956
|
+
this.dispatchEvent(new PkShowEvent());
|
|
957
|
+
this.closing = false;
|
|
958
|
+
this.panelAnimated = false;
|
|
959
|
+
this.query = "";
|
|
960
|
+
this.limit = this.normalizedPageSize();
|
|
961
|
+
this.open = true;
|
|
962
|
+
this.resetHighlightForOpenCatalog();
|
|
963
|
+
await this.updateComplete;
|
|
964
|
+
await this.syncPanelPlacement();
|
|
965
|
+
this.panelAnimated = true;
|
|
966
|
+
this.dispatchEvent(new PkAfterShowEvent());
|
|
967
|
+
await this.focusSearchWhenReady();
|
|
968
|
+
this.scrollHighlightedIntoView();
|
|
969
|
+
}
|
|
970
|
+
async closePanel(source) {
|
|
971
|
+
if (!this.open || this.closing) return;
|
|
972
|
+
const hideEvent = new PkHideEvent(source);
|
|
973
|
+
this.dispatchEvent(hideEvent);
|
|
974
|
+
if (hideEvent.defaultPrevented) return;
|
|
975
|
+
this.closing = true;
|
|
976
|
+
this.open = false;
|
|
977
|
+
this.highlightedIndex = -1;
|
|
978
|
+
this.clearOptionTooltip();
|
|
979
|
+
this.teardownDismissListeners();
|
|
980
|
+
this.triggerElement?.focus({ preventScroll: true });
|
|
981
|
+
this.clearCloseTimer();
|
|
982
|
+
this.closeTimer = window.setTimeout(() => {
|
|
983
|
+
this.closing = false;
|
|
984
|
+
this.panelAnimated = false;
|
|
985
|
+
this.query = "";
|
|
986
|
+
this.limit = this.normalizedPageSize();
|
|
987
|
+
this.closeTimer = null;
|
|
988
|
+
this.dispatchEvent(new PkAfterHideEvent());
|
|
989
|
+
}, 100);
|
|
990
|
+
}
|
|
991
|
+
clearCloseTimer() {
|
|
992
|
+
if (this.closeTimer != null) {
|
|
993
|
+
window.clearTimeout(this.closeTimer);
|
|
994
|
+
this.closeTimer = null;
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
async syncPanelPlacement() {
|
|
998
|
+
if (!this.popupElement || !this.panelElement) return;
|
|
999
|
+
syncPopupPlacementAnimation(this.panelElement, this.placement);
|
|
1000
|
+
const placement = await waitForPopupReposition(this.popupElement, this.placement, 300, { requireEvent: true });
|
|
1001
|
+
syncPopupPlacementAnimation(this.panelElement, placement);
|
|
1002
|
+
}
|
|
1003
|
+
attachDismissListeners() {
|
|
1004
|
+
registerDismissible(this);
|
|
1005
|
+
document.addEventListener("pointerdown", this.onDocumentPointerDown, true);
|
|
1006
|
+
document.addEventListener("keydown", this.onDocumentKeyDown, true);
|
|
1007
|
+
}
|
|
1008
|
+
teardownDismissListeners() {
|
|
1009
|
+
unregisterDismissible(this);
|
|
1010
|
+
document.removeEventListener("pointerdown", this.onDocumentPointerDown, true);
|
|
1011
|
+
document.removeEventListener("keydown", this.onDocumentKeyDown, true);
|
|
1012
|
+
}
|
|
1013
|
+
async focusSearchWhenReady() {
|
|
1014
|
+
const started = performance.now();
|
|
1015
|
+
while (this.open && performance.now() - started < 2e3) {
|
|
1016
|
+
const input = this.searchInput;
|
|
1017
|
+
if (input && getComputedStyle(input).visibility !== "hidden") {
|
|
1018
|
+
input.focus({ preventScroll: true });
|
|
1019
|
+
if (document.activeElement === input) return;
|
|
1020
|
+
}
|
|
1021
|
+
await new Promise((resolve) => requestAnimationFrame(() => resolve()));
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
renderPreview(preview, className) {
|
|
1025
|
+
if (!preview) return nothing;
|
|
1026
|
+
if (isInlineSvg(preview)) return html`<span class=${className} aria-hidden="true">${unsafeSVG(preview)}</span>`;
|
|
1027
|
+
return html`<img class=${className} src=${preview} alt="" />`;
|
|
1028
|
+
}
|
|
1029
|
+
usesInlineLabels() {
|
|
1030
|
+
return this.labelMode === "inline";
|
|
1031
|
+
}
|
|
1032
|
+
usesTooltipLabels() {
|
|
1033
|
+
return this.labelMode === "tooltip";
|
|
1034
|
+
}
|
|
1035
|
+
/** Hover caption via one shared tooltip — avoids N×pk-tooltip in large catalogs. */
|
|
1036
|
+
showOptionTooltip(optionId, label) {
|
|
1037
|
+
if (!this.usesTooltipLabels()) return;
|
|
1038
|
+
const alreadyTracking = this.tooltipFor !== "";
|
|
1039
|
+
this.tooltipFor = optionId;
|
|
1040
|
+
this.tooltipContent = label;
|
|
1041
|
+
this.clearTooltipOpenTimer();
|
|
1042
|
+
const openNow = () => {
|
|
1043
|
+
this.tooltipOpenTimer = null;
|
|
1044
|
+
this.updateComplete.then(() => {
|
|
1045
|
+
this.optionTooltip?.show();
|
|
1046
|
+
});
|
|
1047
|
+
};
|
|
1048
|
+
if (alreadyTracking) {
|
|
1049
|
+
openNow();
|
|
1050
|
+
return;
|
|
1051
|
+
}
|
|
1052
|
+
this.tooltipOpenTimer = window.setTimeout(openNow, 280);
|
|
1053
|
+
}
|
|
1054
|
+
clearOptionTooltip() {
|
|
1055
|
+
this.clearTooltipOpenTimer();
|
|
1056
|
+
this.tooltipFor = "";
|
|
1057
|
+
this.tooltipContent = "";
|
|
1058
|
+
this.optionTooltip?.hide();
|
|
1059
|
+
}
|
|
1060
|
+
clearTooltipOpenTimer() {
|
|
1061
|
+
if (this.tooltipOpenTimer != null) {
|
|
1062
|
+
window.clearTimeout(this.tooltipOpenTimer);
|
|
1063
|
+
this.tooltipOpenTimer = null;
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
handleOptionPointerEnter(index, label) {
|
|
1067
|
+
this.highlightedIndex = index;
|
|
1068
|
+
this.showOptionTooltip(this.optionId(index), label);
|
|
1069
|
+
}
|
|
1070
|
+
resetHighlightToSelected() {
|
|
1071
|
+
const items = this.flatVisibleItems();
|
|
1072
|
+
if (items.length === 0) {
|
|
1073
|
+
this.highlightedIndex = -1;
|
|
1074
|
+
return;
|
|
1075
|
+
}
|
|
1076
|
+
const selectedIdx = items.findIndex((item) => item.value === this.value);
|
|
1077
|
+
this.highlightedIndex = selectedIdx;
|
|
1078
|
+
}
|
|
1079
|
+
renderTriggerContents() {
|
|
1080
|
+
const display = this.triggerDisplay();
|
|
1081
|
+
return html`
|
|
1082
|
+
<span class="trigger-main">
|
|
1083
|
+
${this.renderPreview(display.preview, "trigger-preview")}
|
|
1084
|
+
<span
|
|
1085
|
+
class=${classMap({
|
|
1086
|
+
"trigger-label": true,
|
|
1087
|
+
"is-placeholder": display.isPlaceholder
|
|
1088
|
+
})}
|
|
1089
|
+
aria-hidden="true"
|
|
1090
|
+
>${display.label}</span>
|
|
1091
|
+
</span>
|
|
1092
|
+
`;
|
|
1093
|
+
}
|
|
1094
|
+
renderResults() {
|
|
1095
|
+
if (this.loading) return html`
|
|
1096
|
+
<div
|
|
1097
|
+
id=${this.listboxId}
|
|
1098
|
+
role="listbox"
|
|
1099
|
+
aria-label=${this.ariaLabel || "Options"}
|
|
1100
|
+
aria-busy="true"
|
|
1101
|
+
>
|
|
1102
|
+
<div part="loading" class="loading" role="status" aria-label="Loading">
|
|
1103
|
+
<pk-spinner size="sm" centered></pk-spinner>
|
|
1104
|
+
</div>
|
|
1105
|
+
</div>
|
|
1106
|
+
`;
|
|
1107
|
+
const groups = this.visibleGroups();
|
|
1108
|
+
if (groups.length === 0) return html`
|
|
1109
|
+
<div
|
|
1110
|
+
id=${this.listboxId}
|
|
1111
|
+
role="listbox"
|
|
1112
|
+
aria-label=${this.ariaLabel || "Options"}
|
|
1113
|
+
>
|
|
1114
|
+
<p class="notice" part="empty" role="status">${this.emptyMessage}</p>
|
|
1115
|
+
</div>
|
|
1116
|
+
`;
|
|
1117
|
+
let flatIndex = 0;
|
|
1118
|
+
return html`
|
|
1119
|
+
<div
|
|
1120
|
+
id=${this.listboxId}
|
|
1121
|
+
role="listbox"
|
|
1122
|
+
aria-label=${this.ariaLabel || "Options"}
|
|
1123
|
+
>
|
|
1124
|
+
${groups.map((group, groupIndex) => {
|
|
1125
|
+
const headingId = this.groupHeadingId(groupIndex);
|
|
1126
|
+
const groupStart = flatIndex;
|
|
1127
|
+
const options = group.items.map((item, itemIndex) => {
|
|
1128
|
+
const index = groupStart + itemIndex;
|
|
1129
|
+
flatIndex = index + 1;
|
|
1130
|
+
const selected = item.value === this.value;
|
|
1131
|
+
const highlighted = index === this.highlightedIndex;
|
|
1132
|
+
return html`
|
|
1133
|
+
<button
|
|
1134
|
+
type="button"
|
|
1135
|
+
part="option"
|
|
1136
|
+
id=${this.optionId(index)}
|
|
1137
|
+
class=${classMap({
|
|
1138
|
+
option: true,
|
|
1139
|
+
"is-highlighted": highlighted,
|
|
1140
|
+
"is-selected": selected
|
|
1141
|
+
})}
|
|
1142
|
+
role="option"
|
|
1143
|
+
tabindex="-1"
|
|
1144
|
+
aria-label=${item.label}
|
|
1145
|
+
aria-selected=${selected ? "true" : "false"}
|
|
1146
|
+
@click=${() => this.selectValue(item.value)}
|
|
1147
|
+
@mouseenter=${() => this.handleOptionPointerEnter(index, item.label)}
|
|
1148
|
+
@mouseleave=${this.handleOptionPointerLeave}
|
|
1149
|
+
>
|
|
1150
|
+
${this.renderPreview(item.preview, "option-preview")}
|
|
1151
|
+
${this.usesInlineLabels() ? html`<span class="option-label" aria-hidden="true">${item.label}</span>` : nothing}
|
|
1152
|
+
</button>
|
|
1153
|
+
`;
|
|
1154
|
+
});
|
|
1155
|
+
return html`
|
|
1156
|
+
<div
|
|
1157
|
+
class="group"
|
|
1158
|
+
role=${group.name ? "group" : nothing}
|
|
1159
|
+
aria-labelledby=${group.name ? headingId : nothing}
|
|
1160
|
+
>
|
|
1161
|
+
${group.name ? html`
|
|
1162
|
+
<h6 class="group-heading" id=${headingId}>
|
|
1163
|
+
<span>${group.name}</span>
|
|
1164
|
+
${group.items.length < group.total ? html`
|
|
1165
|
+
<span class="group-heading-count">
|
|
1166
|
+
Showing ${group.items.length} of ${group.total}
|
|
1167
|
+
</span>
|
|
1168
|
+
` : nothing}
|
|
1169
|
+
</h6>
|
|
1170
|
+
` : nothing}
|
|
1171
|
+
<div class="grid">
|
|
1172
|
+
${options}
|
|
1173
|
+
</div>
|
|
1174
|
+
</div>
|
|
1175
|
+
`;
|
|
1176
|
+
})}
|
|
1177
|
+
</div>
|
|
1178
|
+
`;
|
|
1179
|
+
}
|
|
1180
|
+
render() {
|
|
1181
|
+
const showClear = this.withClear && this.value !== "" && !this.disabled && !this.readonly;
|
|
1182
|
+
const panelActive = this.open || this.closing;
|
|
1183
|
+
const activeDescendant = this.activeDescendantId();
|
|
1184
|
+
return html`
|
|
1185
|
+
<input
|
|
1186
|
+
class="value-input"
|
|
1187
|
+
part="value-input"
|
|
1188
|
+
tabindex="-1"
|
|
1189
|
+
aria-hidden="true"
|
|
1190
|
+
.value=${this.value}
|
|
1191
|
+
?required=${this.required}
|
|
1192
|
+
@input=${() => this.updateValidity()}
|
|
1193
|
+
/>
|
|
1194
|
+
<div
|
|
1195
|
+
part="root"
|
|
1196
|
+
class=${classMap({
|
|
1197
|
+
control: true,
|
|
1198
|
+
"is-disabled": this.disabled || this.readonly,
|
|
1199
|
+
"is-open": this.open
|
|
1200
|
+
})}
|
|
1201
|
+
>
|
|
1202
|
+
<button
|
|
1203
|
+
type="button"
|
|
1204
|
+
part="trigger"
|
|
1205
|
+
class="trigger"
|
|
1206
|
+
?disabled=${this.disabled || this.readonly}
|
|
1207
|
+
aria-label=${this.triggerAccessibleName()}
|
|
1208
|
+
aria-haspopup="listbox"
|
|
1209
|
+
aria-expanded=${this.open ? "true" : "false"}
|
|
1210
|
+
aria-controls=${this.listboxId}
|
|
1211
|
+
@click=${this.togglePanel}
|
|
1212
|
+
@keydown=${this.handleTriggerKeyDown}
|
|
1213
|
+
>
|
|
1214
|
+
${this.renderTriggerContents()}
|
|
1215
|
+
</button>
|
|
1216
|
+
${showClear ? html`
|
|
1217
|
+
<button
|
|
1218
|
+
type="button"
|
|
1219
|
+
part="clear-button"
|
|
1220
|
+
class="clear-button"
|
|
1221
|
+
aria-label="Clear selection"
|
|
1222
|
+
?disabled=${this.disabled}
|
|
1223
|
+
@click=${this.handleClear}
|
|
1224
|
+
>
|
|
1225
|
+
<span class="clear-button-icon" aria-hidden="true">${unsafeSVG(XMARK_ICON)}</span>
|
|
1226
|
+
</button>
|
|
1227
|
+
` : nothing}
|
|
1228
|
+
<button
|
|
1229
|
+
type="button"
|
|
1230
|
+
class="expand-button"
|
|
1231
|
+
tabindex="-1"
|
|
1232
|
+
aria-hidden="true"
|
|
1233
|
+
?disabled=${this.disabled || this.readonly}
|
|
1234
|
+
@click=${this.togglePanel}
|
|
1235
|
+
>
|
|
1236
|
+
<span class="expand-button-icon">${unsafeSVG(CHEVRON_ICON)}</span>
|
|
1237
|
+
</button>
|
|
1238
|
+
</div>
|
|
1239
|
+
<pk-popup
|
|
1240
|
+
.active=${panelActive}
|
|
1241
|
+
.anchor=${this.controlElement ?? this.triggerElement ?? ""}
|
|
1242
|
+
.placement=${this.placement}
|
|
1243
|
+
.distance=${this.sideOffset}
|
|
1244
|
+
flip
|
|
1245
|
+
shift
|
|
1246
|
+
>
|
|
1247
|
+
<div
|
|
1248
|
+
part="panel"
|
|
1249
|
+
class=${classMap({
|
|
1250
|
+
panel: true,
|
|
1251
|
+
"pk-popup-content": true,
|
|
1252
|
+
closing: this.closing
|
|
1253
|
+
})}
|
|
1254
|
+
tabindex="-1"
|
|
1255
|
+
?hidden=${!panelActive}
|
|
1256
|
+
data-open=${this.panelAnimated && !this.closing ? "" : nothing}
|
|
1257
|
+
>
|
|
1258
|
+
<div part="panel-search" class="panel-search">
|
|
1259
|
+
<input
|
|
1260
|
+
part="panel-input"
|
|
1261
|
+
class="panel-input"
|
|
1262
|
+
id=${this.searchId}
|
|
1263
|
+
type="text"
|
|
1264
|
+
role="combobox"
|
|
1265
|
+
.value=${this.query}
|
|
1266
|
+
placeholder=${this.searchPlaceholder}
|
|
1267
|
+
aria-label=${this.searchPlaceholder}
|
|
1268
|
+
aria-autocomplete="list"
|
|
1269
|
+
aria-expanded=${this.open ? "true" : "false"}
|
|
1270
|
+
aria-controls=${this.listboxId}
|
|
1271
|
+
aria-activedescendant=${activeDescendant ?? nothing}
|
|
1272
|
+
?disabled=${this.loading}
|
|
1273
|
+
@input=${this.handleSearchInput}
|
|
1274
|
+
@keydown=${this.handleSearchKeyDown}
|
|
1275
|
+
/>
|
|
1276
|
+
</div>
|
|
1277
|
+
<div
|
|
1278
|
+
part="panel-body"
|
|
1279
|
+
class="panel-body"
|
|
1280
|
+
@scroll=${this.handleResultsScroll}
|
|
1281
|
+
>
|
|
1282
|
+
${this.renderResults()}
|
|
1283
|
+
</div>
|
|
1284
|
+
${this.usesTooltipLabels() && panelActive ? html`
|
|
1285
|
+
<pk-tooltip
|
|
1286
|
+
class="option-tooltip"
|
|
1287
|
+
for=${this.tooltipFor}
|
|
1288
|
+
content=${this.tooltipContent}
|
|
1289
|
+
placement="top"
|
|
1290
|
+
trigger="manual"
|
|
1291
|
+
></pk-tooltip>
|
|
1292
|
+
` : nothing}
|
|
1293
|
+
</div>
|
|
1294
|
+
</pk-popup>
|
|
1295
|
+
`;
|
|
1296
|
+
}
|
|
1297
|
+
};
|
|
1298
|
+
__decorate([property({ reflect: true })], PkImageBrowser.prototype, "size", void 0);
|
|
1299
|
+
__decorate([property({ reflect: true })], PkImageBrowser.prototype, "mode", void 0);
|
|
1300
|
+
__decorate([property({ reflect: true })], PkImageBrowser.prototype, "width", void 0);
|
|
1301
|
+
__decorate([property({
|
|
1302
|
+
reflect: true,
|
|
1303
|
+
attribute: "label-mode"
|
|
1304
|
+
})], PkImageBrowser.prototype, "labelMode", void 0);
|
|
1305
|
+
__decorate([property({
|
|
1306
|
+
type: Boolean,
|
|
1307
|
+
reflect: true
|
|
1308
|
+
})], PkImageBrowser.prototype, "invalid", void 0);
|
|
1309
|
+
__decorate([property({
|
|
1310
|
+
type: Boolean,
|
|
1311
|
+
reflect: true
|
|
1312
|
+
})], PkImageBrowser.prototype, "readonly", void 0);
|
|
1313
|
+
__decorate([property()], PkImageBrowser.prototype, "value", void 0);
|
|
1314
|
+
__decorate([property({ attribute: "default-value" })], PkImageBrowser.prototype, "defaultValue", void 0);
|
|
1315
|
+
__decorate([property()], PkImageBrowser.prototype, "placeholder", void 0);
|
|
1316
|
+
__decorate([property({ attribute: "search-placeholder" })], PkImageBrowser.prototype, "searchPlaceholder", void 0);
|
|
1317
|
+
__decorate([property({ attribute: "empty-message" })], PkImageBrowser.prototype, "emptyMessage", void 0);
|
|
1318
|
+
__decorate([property({ attribute: "aria-label" })], PkImageBrowser.prototype, "ariaLabel", void 0);
|
|
1319
|
+
__decorate([property({
|
|
1320
|
+
type: Boolean,
|
|
1321
|
+
reflect: true
|
|
1322
|
+
})], PkImageBrowser.prototype, "loading", void 0);
|
|
1323
|
+
__decorate([property({
|
|
1324
|
+
type: Boolean,
|
|
1325
|
+
reflect: true,
|
|
1326
|
+
attribute: "with-clear"
|
|
1327
|
+
})], PkImageBrowser.prototype, "withClear", void 0);
|
|
1328
|
+
__decorate([property({ attribute: false })], PkImageBrowser.prototype, "items", void 0);
|
|
1329
|
+
__decorate([property({ attribute: false })], PkImageBrowser.prototype, "groups", void 0);
|
|
1330
|
+
__decorate([property({ attribute: "selected-label" })], PkImageBrowser.prototype, "selectedLabel", void 0);
|
|
1331
|
+
__decorate([property({ attribute: "selected-preview" })], PkImageBrowser.prototype, "selectedPreview", void 0);
|
|
1332
|
+
__decorate([property({ reflect: true })], PkImageBrowser.prototype, "placement", void 0);
|
|
1333
|
+
__decorate([property({
|
|
1334
|
+
type: Number,
|
|
1335
|
+
attribute: "side-offset"
|
|
1336
|
+
})], PkImageBrowser.prototype, "sideOffset", void 0);
|
|
1337
|
+
__decorate([property({
|
|
1338
|
+
type: Number,
|
|
1339
|
+
attribute: "page-size"
|
|
1340
|
+
})], PkImageBrowser.prototype, "pageSize", void 0);
|
|
1341
|
+
__decorate([property({
|
|
1342
|
+
type: Boolean,
|
|
1343
|
+
reflect: true
|
|
1344
|
+
})], PkImageBrowser.prototype, "open", void 0);
|
|
1345
|
+
__decorate([state()], PkImageBrowser.prototype, "query", void 0);
|
|
1346
|
+
__decorate([state()], PkImageBrowser.prototype, "limit", void 0);
|
|
1347
|
+
__decorate([state()], PkImageBrowser.prototype, "closing", void 0);
|
|
1348
|
+
__decorate([state()], PkImageBrowser.prototype, "panelAnimated", void 0);
|
|
1349
|
+
__decorate([state()], PkImageBrowser.prototype, "highlightedIndex", void 0);
|
|
1350
|
+
__decorate([state()], PkImageBrowser.prototype, "tooltipFor", void 0);
|
|
1351
|
+
__decorate([state()], PkImageBrowser.prototype, "tooltipContent", void 0);
|
|
1352
|
+
__decorate([query(".value-input")], PkImageBrowser.prototype, "input", void 0);
|
|
1353
|
+
__decorate([query(".trigger")], PkImageBrowser.prototype, "triggerElement", void 0);
|
|
1354
|
+
__decorate([query(".control")], PkImageBrowser.prototype, "controlElement", void 0);
|
|
1355
|
+
__decorate([query("pk-popup")], PkImageBrowser.prototype, "popupElement", void 0);
|
|
1356
|
+
__decorate([query(".panel")], PkImageBrowser.prototype, "panelElement", void 0);
|
|
1357
|
+
__decorate([query(".panel-input")], PkImageBrowser.prototype, "searchInput", void 0);
|
|
1358
|
+
__decorate([query(".panel-body")], PkImageBrowser.prototype, "panelBody", void 0);
|
|
1359
|
+
__decorate([query(".option-tooltip")], PkImageBrowser.prototype, "optionTooltip", void 0);
|
|
1360
|
+
PkImageBrowser = __decorate([customElement("pk-image-browser")], PkImageBrowser);
|
|
1361
|
+
//#endregion
|
|
1362
|
+
export { PkImageBrowser as t };
|
|
1363
|
+
|
|
1364
|
+
//# sourceMappingURL=pk-image-browser-BXFDfch3.js.map
|