@kernel4632/kima 0.12.2 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD_PARTY_NOTICES.txt +100 -1712
- package/dist/components/containment/list-item.ce.vue_vue_type_style_index_0_scoped_fd20973a_lang.css +1 -0
- package/dist/components/containment/snackbar.ce.vue_vue_type_style_index_0_scoped_3c62e4c7_lang.css +1 -0
- package/dist/components/core/badge.ce.vue_vue_type_style_index_0_scoped_9ccfbe76_lang.css +1 -0
- package/dist/components/core/button.ce.vue_vue_type_style_index_0_scoped_1c004601_lang.css +1 -0
- package/dist/components/core/checkbox.ce.vue_vue_type_style_index_0_scoped_cc2716e6_lang.css +1 -0
- package/dist/components/core/combobox.ce.vue_vue_type_style_index_0_scoped_ba7220f2_lang.css +1 -0
- package/dist/components/core/dialog.ce.vue_vue_type_style_index_0_scoped_09f96946_lang.css +1 -0
- package/dist/components/core/divider.ce.vue_vue_type_style_index_0_scoped_a401c826_lang.css +1 -0
- package/dist/components/core/fab-menu.ce.vue_vue_type_style_index_0_scoped_7c25d968_lang.css +1 -0
- package/dist/components/core/fab.ce.vue_vue_type_style_index_0_scoped_4e1de7c1_lang.css +1 -0
- package/dist/components/core/icon.ce.vue_vue_type_style_index_0_scoped_76c47d5b_lang.css +1 -0
- package/dist/components/core/loading-indicator.ce.vue_vue_type_style_index_0_scoped_6c314bb6_lang.css +1 -0
- package/dist/components/core/menu.ce.vue_vue_type_style_index_0_scoped_16ed5f4d_lang.css +1 -0
- package/dist/components/core/morph-field.ce.vue_vue_type_style_index_0_scoped_ac757a01_lang.css +1 -0
- package/dist/components/core/progress.ce.vue_vue_type_style_index_0_scoped_2c836bfd_lang.css +1 -0
- package/dist/components/core/select.ce.vue_vue_type_style_index_0_scoped_bf4d9de4_lang.css +1 -0
- package/dist/components/core/shape.ce.vue_vue_type_style_index_0_scoped_5db1cc46_lang.css +1 -0
- package/dist/components/core/slider.ce.vue_vue_type_style_index_0_scoped_3cadd726_lang.css +1 -0
- package/dist/components/core/split-button.ce.vue_vue_type_style_index_0_scoped_a8ef75a5_lang.css +1 -0
- package/dist/components/core/switch.ce.vue_vue_type_style_index_0_scoped_5b126252_lang.css +1 -0
- package/dist/components/core/tabs.ce.vue_vue_type_style_index_0_scoped_f0ece5c6_lang.css +1 -0
- package/dist/components/core/text-field.ce.vue_vue_type_style_index_0_scoped_89a58b79_lang.css +1 -0
- package/dist/components/core/tooltip.ce.vue_vue_type_style_index_0_scoped_4fd8d52e_lang.css +1 -0
- package/dist/components/core/tree.ce.vue_vue_type_style_index_0_scoped_d1e95486_lang.css +1 -0
- package/dist/components/data/table.ce.vue_vue_type_style_index_0_scoped_de17ceaa_lang.css +1 -0
- package/dist/components/display/image.ce.vue_vue_type_style_index_0_scoped_08ac96f2_lang.css +1 -0
- package/dist/components/display/image.ce.vue_vue_type_style_index_1_lang.css +1 -0
- package/dist/components/display/skeleton.ce.vue_vue_type_style_index_0_scoped_841c5f0b_lang.css +1 -0
- package/dist/components/input/radio-group.ce.vue_vue_type_style_index_0_scoped_554d6257_lang.css +1 -0
- package/dist/components/input/textarea.ce.vue_vue_type_style_index_0_scoped_f6be6515_lang.css +1 -0
- package/dist/components/interaction/popover.ce.vue_vue_type_style_index_0_scoped_4e67e579_lang.css +1 -0
- package/dist/components/navigation/breadcrumb-item.ce.vue_vue_type_style_index_0_scoped_4c179b2f_lang.css +1 -0
- package/dist/components/navigation/breadcrumb-item.ce.vue_vue_type_style_index_1_lang.css +1 -0
- package/dist/components/navigation/breadcrumb.ce.vue_vue_type_style_index_0_scoped_f0e04345_lang.css +1 -0
- package/dist/components/navigation/collapsible.ce.vue_vue_type_style_index_0_scoped_eda74ecc_lang.css +1 -0
- package/dist/components/navigation/nav-item.ce.vue_vue_type_style_index_0_scoped_9f22b45d_lang.css +1 -0
- package/dist/kima-elements-core.js +38352 -33892
- package/dist/kima-elements.js +47432 -116752
- package/dist/kima.js +36 -139
- package/dist/style.css +37 -237
- package/dist/styles/_tokens.css +1 -1
- package/dist/styles/badge.css +1 -1
- package/dist/styles/breadcrumb-item.css +4 -0
- package/dist/styles/breadcrumb.css +1 -2
- package/dist/styles/button.css +1 -1
- package/dist/styles/checkbox.css +2 -2
- package/dist/styles/collapsible.css +2 -2
- package/dist/styles/combobox.css +2 -2
- package/dist/styles/core.css +36 -43
- package/dist/styles/dialog.css +3 -3
- package/dist/styles/divider.css +1 -1
- package/dist/styles/fab-menu.css +3 -0
- package/dist/styles/fab.css +2 -0
- package/dist/styles/icon.css +1 -1
- package/dist/styles/image.css +3 -3
- package/dist/styles/list-item.css +2 -0
- package/dist/styles/loading-indicator.css +2 -0
- package/dist/styles/menu.css +2 -2
- package/dist/styles/morph-field.css +3 -0
- package/dist/styles/nav-item.css +3 -0
- package/dist/styles/popover.css +2 -2
- package/dist/styles/progress.css +1 -1
- package/dist/styles/radio-group.css +2 -2
- package/dist/styles/select.css +2 -2
- package/dist/styles/shape.css +2 -0
- package/dist/styles/skeleton.css +1 -1
- package/dist/styles/slider.css +1 -1
- package/dist/styles/snackbar.css +3 -0
- package/dist/styles/split-button.css +3 -0
- package/dist/styles/switch.css +1 -2
- package/dist/styles/table.css +2 -2
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/text-field.css +2 -2
- package/dist/styles/textarea.css +1 -2
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/tree.css +2 -2
- package/dist/vue/components/containment/list-item.ce.js +73 -0
- package/dist/vue/components/containment/snackbar.ce.js +203 -0
- package/dist/vue/components/core/badge.ce.js +40 -27
- package/dist/vue/components/core/button.ce.js +51 -28
- package/dist/vue/components/core/checkbox.ce.js +65 -50
- package/dist/vue/components/core/combobox.ce.js +287 -227
- package/dist/vue/components/core/dialog.ce.js +52 -41
- package/dist/vue/components/core/divider.ce.js +1 -1
- package/dist/vue/components/core/fab-menu.ce.js +112 -0
- package/dist/vue/components/core/fab.ce.js +63 -0
- package/dist/vue/components/core/icon.ce.js +2 -3
- package/dist/vue/components/core/loading-indicator.ce.js +86 -0
- package/dist/vue/components/core/menu.ce.js +140 -103
- package/dist/vue/components/core/morph-field.ce.js +139 -0
- package/dist/vue/components/core/progress.ce.js +787 -24
- package/dist/vue/components/core/select.ce.js +260 -219
- package/dist/vue/components/core/shape.ce.js +19 -0
- package/dist/vue/components/core/slider.ce.js +389 -77
- package/dist/vue/components/core/split-button.ce.js +156 -0
- package/dist/vue/components/core/switch.ce.js +59 -65
- package/dist/vue/components/core/tabs.ce.js +91 -84
- package/dist/vue/components/core/text-field.ce.js +67 -95
- package/dist/vue/components/core/tooltip.ce.js +95 -96
- package/dist/vue/components/core/tree.ce.js +128 -200
- package/dist/vue/components/data/table.ce.js +249 -227
- package/dist/vue/components/display/image.ce.js +65 -121
- package/dist/vue/components/display/skeleton.ce.js +46 -33
- package/dist/vue/components/input/radio-group.ce.js +119 -53
- package/dist/vue/components/input/textarea.ce.js +124 -109
- package/dist/vue/components/interaction/popover.ce.js +78 -45
- package/dist/vue/components/navigation/breadcrumb-item.ce.js +197 -0
- package/dist/vue/components/navigation/breadcrumb.ce.js +71 -40
- package/dist/vue/components/navigation/collapsible.ce.js +45 -34
- package/dist/vue/components/navigation/nav-item.ce.js +79 -0
- package/dist/vue/internal/menu-items.js +51 -70
- package/dist/vue/utils/content-motion.js +36 -47
- package/dist/vue/utils/interaction.js +19 -68
- package/dist/vue/utils/loading-shapes.js +11 -0
- package/dist/vue/utils/motion.js +36 -40
- package/dist/vue/utils/navigation.js +1 -19
- package/dist/vue/utils/popup-manager.js +52 -0
- package/dist/vue/utils/popup-motion.js +18 -0
- package/dist/vue/utils/radius.js +81 -0
- package/dist/vue/utils/ripple.js +7 -7
- package/dist/vue/utils/shell.js +9 -24
- package/dist/vue/utils/snackbar-stack.js +57 -0
- package/package.json +2 -20
- package/dist/components/advanced-input/calendar.ce.vue_vue_type_style_index_0_scoped_43a5d854_lang.css +0 -1
- package/dist/components/advanced-input/date-range-picker.ce.vue_vue_type_style_index_0_scoped_8bcd6e19_lang.css +0 -1
- package/dist/components/advanced-input/editable.ce.vue_vue_type_style_index_0_scoped_82c96de0_lang.css +0 -1
- package/dist/components/advanced-input/mention.ce.vue_vue_type_style_index_0_scoped_e6d9ff72_lang.css +0 -1
- package/dist/components/advanced-input/range-slider.ce.vue_vue_type_style_index_0_scoped_cceb9717_lang.css +0 -1
- package/dist/components/advanced-input/time-range-picker.ce.vue_vue_type_style_index_0_scoped_52265737_lang.css +0 -1
- package/dist/components/advanced-input/transfer.ce.vue_vue_type_style_index_0_scoped_d1dddadf_lang.css +0 -1
- package/dist/components/content/chart.ce.vue_vue_type_style_index_0_scoped_b8556b1a_lang.css +0 -1
- package/dist/components/content/code-editor.ce.vue_vue_type_style_index_0_scoped_233308e5_lang.css +0 -1
- package/dist/components/content/equation.ce.vue_vue_type_style_index_0_scoped_e8f29ba6_lang.css +0 -1
- package/dist/components/content/heatmap.ce.vue_vue_type_style_index_0_scoped_c69a9531_lang.css +0 -1
- package/dist/components/content/rich-text-editor.ce.vue_vue_type_style_index_0_scoped_82e3193e_lang.css +0 -1
- package/dist/components/core/badge.ce.vue_vue_type_style_index_0_scoped_9dba943c_lang.css +0 -1
- package/dist/components/core/button-group.ce.vue_vue_type_style_index_0_scoped_8a4a723b_lang.css +0 -1
- package/dist/components/core/button.ce.vue_vue_type_style_index_0_scoped_ba403858_lang.css +0 -1
- package/dist/components/core/card.ce.vue_vue_type_style_index_0_scoped_6c915f03_lang.css +0 -1
- package/dist/components/core/cascader.ce.vue_vue_type_style_index_0_scoped_0ed26222_lang.css +0 -1
- package/dist/components/core/checkbox.ce.vue_vue_type_style_index_0_scoped_7c9707de_lang.css +0 -1
- package/dist/components/core/code-block.ce.vue_vue_type_style_index_0_scoped_7e6342e8_lang.css +0 -1
- package/dist/components/core/combobox.ce.vue_vue_type_style_index_0_scoped_6980ff65_lang.css +0 -1
- package/dist/components/core/date-picker.ce.vue_vue_type_style_index_0_scoped_f55122f3_lang.css +0 -1
- package/dist/components/core/dialog.ce.vue_vue_type_style_index_0_scoped_1b9a185c_lang.css +0 -1
- package/dist/components/core/divider.ce.vue_vue_type_style_index_0_scoped_5402a5d3_lang.css +0 -1
- package/dist/components/core/drawer.ce.vue_vue_type_style_index_0_scoped_13f2f783_lang.css +0 -1
- package/dist/components/core/empty-state.ce.vue_vue_type_style_index_0_scoped_6fcab7b8_lang.css +0 -1
- package/dist/components/core/icon-button.ce.vue_vue_type_style_index_0_scoped_a18b4478_lang.css +0 -1
- package/dist/components/core/icon.ce.vue_vue_type_style_index_0_scoped_5c94f2ca_lang.css +0 -1
- package/dist/components/core/layout.ce.vue_vue_type_style_index_0_scoped_c0d57820_lang.css +0 -1
- package/dist/components/core/menu.ce.vue_vue_type_style_index_0_scoped_597751c9_lang.css +0 -1
- package/dist/components/core/notification.ce.vue_vue_type_style_index_0_scoped_2f39bef8_lang.css +0 -1
- package/dist/components/core/pagination.ce.vue_vue_type_style_index_0_scoped_d62e7dea_lang.css +0 -1
- package/dist/components/core/progress.ce.vue_vue_type_style_index_0_scoped_84d44589_lang.css +0 -1
- package/dist/components/core/select.ce.vue_vue_type_style_index_0_scoped_f1632b10_lang.css +0 -1
- package/dist/components/core/slider.ce.vue_vue_type_style_index_0_scoped_746583af_lang.css +0 -1
- package/dist/components/core/switch.ce.vue_vue_type_style_index_0_scoped_2bcc172e_lang.css +0 -1
- package/dist/components/core/tabs.ce.vue_vue_type_style_index_0_scoped_0d322299_lang.css +0 -1
- package/dist/components/core/text-field.ce.vue_vue_type_style_index_0_scoped_f22e5c02_lang.css +0 -1
- package/dist/components/core/time-picker.ce.vue_vue_type_style_index_0_scoped_afd1d777_lang.css +0 -1
- package/dist/components/core/tooltip.ce.vue_vue_type_style_index_0_scoped_2c931a6a_lang.css +0 -1
- package/dist/components/core/tree.ce.vue_vue_type_style_index_0_scoped_5401eef6_lang.css +0 -1
- package/dist/components/core/virtual-scroll.ce.vue_vue_type_style_index_0_scoped_8f7f579b_lang.css +0 -1
- package/dist/components/data/copy-button.ce.vue_vue_type_style_index_0_scoped_701ad4fb_lang.css +0 -1
- package/dist/components/data/image-preview.ce.vue_vue_type_style_index_0_scoped_17e80131_lang.css +0 -1
- package/dist/components/data/infinite-scroll.ce.vue_vue_type_style_index_0_scoped_5f784d27_lang.css +0 -1
- package/dist/components/data/long-text.ce.vue_vue_type_style_index_0_scoped_6bad870b_lang.css +0 -1
- package/dist/components/data/relative-time.ce.vue_vue_type_style_index_0_scoped_903b71ea_lang.css +0 -1
- package/dist/components/data/ring-progress.ce.vue_vue_type_style_index_0_scoped_15220fc3_lang.css +0 -1
- package/dist/components/data/table.ce.vue_vue_type_style_index_0_scoped_6c1cc7d1_lang.css +0 -1
- package/dist/components/data/virtual-table.ce.vue_vue_type_style_index_0_scoped_bc80a44c_lang.css +0 -1
- package/dist/components/data/virtual-tree.ce.vue_vue_type_style_index_0_scoped_5d8790bf_lang.css +0 -1
- package/dist/components/display/alert.ce.vue_vue_type_style_index_0_scoped_d31c4df3_lang.css +0 -1
- package/dist/components/display/avatar-group.ce.vue_vue_type_style_index_0_scoped_9545415b_lang.css +0 -1
- package/dist/components/display/avatar.ce.vue_vue_type_style_index_0_scoped_eb8fc9ea_lang.css +0 -1
- package/dist/components/display/blockquote.ce.vue_vue_type_style_index_0_scoped_e56b05b8_lang.css +0 -1
- package/dist/components/display/countdown.ce.vue_vue_type_style_index_0_scoped_7f10ca60_lang.css +0 -1
- package/dist/components/display/descriptions.ce.vue_vue_type_style_index_0_scoped_501a9489_lang.css +0 -1
- package/dist/components/display/highlight.ce.vue_vue_type_style_index_0_scoped_f876f7db_lang.css +0 -1
- package/dist/components/display/image.ce.vue_vue_type_style_index_0_scoped_d16b864e_lang.css +0 -1
- package/dist/components/display/list.ce.vue_vue_type_style_index_0_scoped_1b1702a6_lang.css +0 -1
- package/dist/components/display/result.ce.vue_vue_type_style_index_0_scoped_f08cf21f_lang.css +0 -1
- package/dist/components/display/skeleton.ce.vue_vue_type_style_index_0_scoped_92807af5_lang.css +0 -1
- package/dist/components/display/spinner.ce.vue_vue_type_style_index_0_scoped_d7ff1dc3_lang.css +0 -1
- package/dist/components/display/statistic.ce.vue_vue_type_style_index_0_scoped_cc8448a6_lang.css +0 -1
- package/dist/components/display/timeline.ce.vue_vue_type_style_index_0_scoped_3cffd2b4_lang.css +0 -1
- package/dist/components/form-completion/angle-slider.ce.vue_vue_type_style_index_0_scoped_924c5f0d_lang.css +0 -1
- package/dist/components/form-completion/color-picker.ce.vue_vue_type_style_index_0_scoped_04812c30_lang.css +0 -1
- package/dist/components/form-completion/date-field.ce.vue_vue_type_style_index_0_scoped_7c8a7c79_lang.css +0 -1
- package/dist/components/form-completion/dynamic-input.ce.vue_vue_type_style_index_0_scoped_6a5bc26a_lang.css +0 -1
- package/dist/components/form-completion/form.ce.vue_vue_type_style_index_0_scoped_f8f70e6f_lang.css +0 -1
- package/dist/components/form-completion/json-input.ce.vue_vue_type_style_index_0_scoped_15a17728_lang.css +0 -1
- package/dist/components/form-completion/masked-input.ce.vue_vue_type_style_index_0_scoped_f96e752a_lang.css +0 -1
- package/dist/components/form-completion/period-picker.ce.vue_vue_type_style_index_0_scoped_28cc9011_lang.css +0 -1
- package/dist/components/form-completion/time-field.ce.vue_vue_type_style_index_0_scoped_b6533524_lang.css +0 -1
- package/dist/components/form-completion/upload-manager.ce.vue_vue_type_style_index_0_scoped_fe810c3a_lang.css +0 -1
- package/dist/components/foundation/banner.ce.vue_vue_type_style_index_0_scoped_57ba332a_lang.css +0 -1
- package/dist/components/foundation/error-state.ce.vue_vue_type_style_index_0_scoped_20c2aa5d_lang.css +0 -1
- package/dist/components/foundation/field-group.ce.vue_vue_type_style_index_0_scoped_144ed12e_lang.css +0 -1
- package/dist/components/foundation/flex.ce.vue_vue_type_style_index_0_scoped_317459cf_lang.css +0 -1
- package/dist/components/foundation/grid.ce.vue_vue_type_style_index_0_scoped_c1ea1f88_lang.css +0 -1
- package/dist/components/foundation/input-group.ce.vue_vue_type_style_index_0_scoped_5729e4c1_lang.css +0 -1
- package/dist/components/foundation/page-header.ce.vue_vue_type_style_index_0_scoped_819de002_lang.css +0 -1
- package/dist/components/foundation/time-display.ce.vue_vue_type_style_index_0_scoped_31f1f739_lang.css +0 -1
- package/dist/components/foundation/typography.ce.vue_vue_type_style_index_0_scoped_d92fa782_lang.css +0 -1
- package/dist/components/input/checkbox-group.ce.vue_vue_type_style_index_0_scoped_f017d36a_lang.css +0 -1
- package/dist/components/input/field.ce.vue_vue_type_style_index_0_scoped_a01eded5_lang.css +0 -1
- package/dist/components/input/file-upload.ce.vue_vue_type_style_index_0_scoped_8fd77a68_lang.css +0 -1
- package/dist/components/input/number-field.ce.vue_vue_type_style_index_0_scoped_9eb508b4_lang.css +0 -1
- package/dist/components/input/pin-input.ce.vue_vue_type_style_index_0_scoped_0d93e989_lang.css +0 -1
- package/dist/components/input/radio-group.ce.vue_vue_type_style_index_0_scoped_fe3edf34_lang.css +0 -1
- package/dist/components/input/rating.ce.vue_vue_type_style_index_0_scoped_23c50b69_lang.css +0 -1
- package/dist/components/input/tags-input.ce.vue_vue_type_style_index_0_scoped_b46618b2_lang.css +0 -1
- package/dist/components/input/textarea.ce.vue_vue_type_style_index_0_scoped_60d0751b_lang.css +0 -1
- package/dist/components/input/toggle.ce.vue_vue_type_style_index_0_scoped_a289ae32_lang.css +0 -1
- package/dist/components/interaction/chip.ce.vue_vue_type_style_index_0_scoped_541c9ed1_lang.css +0 -1
- package/dist/components/interaction/command.ce.vue_vue_type_style_index_0_scoped_11d4f240_lang.css +0 -1
- package/dist/components/interaction/context-menu.ce.vue_vue_type_style_index_0_scoped_35d2336c_lang.css +0 -1
- package/dist/components/interaction/hover-card.ce.vue_vue_type_style_index_0_scoped_0517aad7_lang.css +0 -1
- package/dist/components/interaction/loading-overlay.ce.vue_vue_type_style_index_0_scoped_8dd7d4aa_lang.css +0 -1
- package/dist/components/interaction/menubar.ce.vue_vue_type_style_index_0_scoped_c4c69411_lang.css +0 -1
- package/dist/components/interaction/multi-select.ce.vue_vue_type_style_index_0_scoped_0b8ec686_lang.css +0 -1
- package/dist/components/interaction/popconfirm.ce.vue_vue_type_style_index_0_scoped_fae7c69d_lang.css +0 -1
- package/dist/components/interaction/popover.ce.vue_vue_type_style_index_0_scoped_be7411d6_lang.css +0 -1
- package/dist/components/interaction/tree-select.ce.vue_vue_type_style_index_0_scoped_46d37539_lang.css +0 -1
- package/dist/components/navigation/accordion.ce.vue_vue_type_style_index_0_scoped_19d76e75_lang.css +0 -1
- package/dist/components/navigation/anchor.ce.vue_vue_type_style_index_0_scoped_b3311001_lang.css +0 -1
- package/dist/components/navigation/back-top.ce.vue_vue_type_style_index_0_scoped_231687a3_lang.css +0 -1
- package/dist/components/navigation/breadcrumb.ce.vue_vue_type_style_index_0_scoped_2a2cd6e2_lang.css +0 -1
- package/dist/components/navigation/carousel.ce.vue_vue_type_style_index_0_scoped_f2081ae5_lang.css +0 -1
- package/dist/components/navigation/collapsible.ce.vue_vue_type_style_index_0_scoped_f3cd40e5_lang.css +0 -1
- package/dist/components/navigation/link.ce.vue_vue_type_style_index_0_scoped_24e2c032_lang.css +0 -1
- package/dist/components/navigation/navigation-menu.ce.vue_vue_type_style_index_0_scoped_5a0a5b21_lang.css +0 -1
- package/dist/components/navigation/overflow-list.ce.vue_vue_type_style_index_0_scoped_b6fec7f9_lang.css +0 -1
- package/dist/components/navigation/scroll-area.ce.vue_vue_type_style_index_0_scoped_78178cc3_lang.css +0 -1
- package/dist/components/navigation/splitter.ce.vue_vue_type_style_index_0_scoped_0fbcfa40_lang.css +0 -1
- package/dist/components/navigation/stepper.ce.vue_vue_type_style_index_0_scoped_1c703cd8_lang.css +0 -1
- package/dist/components/navigation/toolbar.ce.vue_vue_type_style_index_0_scoped_327b9928_lang.css +0 -1
- package/dist/components/navigation/visually-hidden.ce.vue_vue_type_style_index_0_scoped_2cc27184_lang.css +0 -1
- package/dist/components/shell/app-shell.ce.vue_vue_type_style_index_0_scoped_37292ba0_lang.css +0 -1
- package/dist/components/shell/config-provider.ce.vue_vue_type_style_index_0_scoped_d9085095_lang.css +0 -1
- package/dist/components/shell/marquee.ce.vue_vue_type_style_index_0_scoped_ac73236c_lang.css +0 -1
- package/dist/components/shell/masonry.ce.vue_vue_type_style_index_0_scoped_2fe32054_lang.css +0 -1
- package/dist/components/shell/sidebar.ce.vue_vue_type_style_index_0_scoped_f50127b6_lang.css +0 -1
- package/dist/components/utility/affix.ce.vue_vue_type_style_index_0_scoped_f21e108b_lang.css +0 -1
- package/dist/components/utility/alert-dialog.ce.vue_vue_type_style_index_0_scoped_6136c7fb_lang.css +0 -1
- package/dist/components/utility/animated-number.ce.vue_vue_type_style_index_0_scoped_23564574_lang.css +0 -1
- package/dist/components/utility/float-button.ce.vue_vue_type_style_index_0_scoped_1edb2eb1_lang.css +0 -1
- package/dist/components/utility/listbox.ce.vue_vue_type_style_index_0_scoped_8eab8b73_lang.css +0 -1
- package/dist/components/utility/loading-bar.ce.vue_vue_type_style_index_0_scoped_4109ea9a_lang.css +0 -1
- package/dist/components/utility/log-viewer.ce.vue_vue_type_style_index_0_scoped_f5be4658_lang.css +0 -1
- package/dist/components/utility/notification-queue.ce.vue_vue_type_style_index_0_scoped_75bf46e7_lang.css +0 -1
- package/dist/components/utility/progress-group.ce.vue_vue_type_style_index_0_scoped_d4453504_lang.css +0 -1
- package/dist/components/utility/qr-code.ce.vue_vue_type_style_index_0_scoped_3ef776fe_lang.css +0 -1
- package/dist/components/utility/tag-group.ce.vue_vue_type_style_index_0_scoped_de9894bd_lang.css +0 -1
- package/dist/components/utility/tour.ce.vue_vue_type_style_index_0_scoped_b5823fc3_lang.css +0 -1
- package/dist/components/utility/virtual-select.ce.vue_vue_type_style_index_0_scoped_d1821f4c_lang.css +0 -1
- package/dist/components/utility/watermark.ce.vue_vue_type_style_index_0_scoped_62e7022f_lang.css +0 -1
- package/dist/kima-theme.js +0 -1589
- package/dist/styles/accordion.css +0 -4
- package/dist/styles/affix.css +0 -2
- package/dist/styles/alert-dialog.css +0 -5
- package/dist/styles/alert.css +0 -4
- package/dist/styles/anchor.css +0 -3
- package/dist/styles/angle-slider.css +0 -2
- package/dist/styles/animated-number.css +0 -2
- package/dist/styles/app-shell.css +0 -6
- package/dist/styles/avatar-group.css +0 -4
- package/dist/styles/avatar.css +0 -3
- package/dist/styles/back-top.css +0 -3
- package/dist/styles/banner.css +0 -4
- package/dist/styles/blockquote.css +0 -3
- package/dist/styles/button-group.css +0 -3
- package/dist/styles/calendar.css +0 -2
- package/dist/styles/card.css +0 -2
- package/dist/styles/carousel.css +0 -5
- package/dist/styles/cascader.css +0 -3
- package/dist/styles/chart.css +0 -3
- package/dist/styles/checkbox-group.css +0 -3
- package/dist/styles/chip.css +0 -5
- package/dist/styles/code-block.css +0 -5
- package/dist/styles/code-editor.css +0 -5
- package/dist/styles/color-picker.css +0 -2
- package/dist/styles/command.css +0 -5
- package/dist/styles/config-provider.css +0 -2
- package/dist/styles/context-menu.css +0 -3
- package/dist/styles/copy-button.css +0 -3
- package/dist/styles/countdown.css +0 -2
- package/dist/styles/date-field.css +0 -2
- package/dist/styles/date-picker.css +0 -3
- package/dist/styles/date-range-picker.css +0 -4
- package/dist/styles/descriptions.css +0 -2
- package/dist/styles/drawer.css +0 -3
- package/dist/styles/dynamic-input.css +0 -6
- package/dist/styles/editable.css +0 -3
- package/dist/styles/empty-state.css +0 -2
- package/dist/styles/equation.css +0 -2
- package/dist/styles/error-state.css +0 -4
- package/dist/styles/field-group.css +0 -2
- package/dist/styles/field.css +0 -2
- package/dist/styles/file-upload.css +0 -5
- package/dist/styles/flex.css +0 -2
- package/dist/styles/float-button.css +0 -4
- package/dist/styles/form.css +0 -2
- package/dist/styles/grid.css +0 -2
- package/dist/styles/heatmap.css +0 -3
- package/dist/styles/highlight.css +0 -2
- package/dist/styles/hover-card.css +0 -3
- package/dist/styles/icon-button.css +0 -3
- package/dist/styles/image-preview.css +0 -6
- package/dist/styles/infinite-scroll.css +0 -4
- package/dist/styles/input-group.css +0 -2
- package/dist/styles/json-input.css +0 -3
- package/dist/styles/layout.css +0 -2
- package/dist/styles/link.css +0 -2
- package/dist/styles/list.css +0 -2
- package/dist/styles/listbox.css +0 -3
- package/dist/styles/loading-bar.css +0 -2
- package/dist/styles/loading-overlay.css +0 -3
- package/dist/styles/log-viewer.css +0 -6
- package/dist/styles/long-text.css +0 -3
- package/dist/styles/marquee.css +0 -3
- package/dist/styles/masked-input.css +0 -2
- package/dist/styles/masonry.css +0 -2
- package/dist/styles/mention.css +0 -2
- package/dist/styles/menubar.css +0 -4
- package/dist/styles/multi-select.css +0 -6
- package/dist/styles/navigation-menu.css +0 -5
- package/dist/styles/notification-queue.css +0 -4
- package/dist/styles/notification.css +0 -3
- package/dist/styles/number-field.css +0 -3
- package/dist/styles/overflow-list.css +0 -3
- package/dist/styles/page-header.css +0 -2
- package/dist/styles/pagination.css +0 -3
- package/dist/styles/period-picker.css +0 -2
- package/dist/styles/pin-input.css +0 -2
- package/dist/styles/popconfirm.css +0 -4
- package/dist/styles/progress-group.css +0 -3
- package/dist/styles/qr-code.css +0 -2
- package/dist/styles/range-slider.css +0 -2
- package/dist/styles/rating.css +0 -4
- package/dist/styles/relative-time.css +0 -2
- package/dist/styles/result.css +0 -3
- package/dist/styles/rich-text-editor.css +0 -6
- package/dist/styles/ring-progress.css +0 -2
- package/dist/styles/scroll-area.css +0 -2
- package/dist/styles/sidebar.css +0 -9
- package/dist/styles/spinner.css +0 -2
- package/dist/styles/splitter.css +0 -2
- package/dist/styles/statistic.css +0 -2
- package/dist/styles/stepper.css +0 -3
- package/dist/styles/tag-group.css +0 -6
- package/dist/styles/tags-input.css +0 -3
- package/dist/styles/time-display.css +0 -2
- package/dist/styles/time-field.css +0 -2
- package/dist/styles/time-picker.css +0 -3
- package/dist/styles/time-range-picker.css +0 -2
- package/dist/styles/timeline.css +0 -3
- package/dist/styles/toggle.css +0 -2
- package/dist/styles/toolbar.css +0 -2
- package/dist/styles/tour.css +0 -3
- package/dist/styles/transfer.css +0 -3
- package/dist/styles/tree-select.css +0 -6
- package/dist/styles/typography.css +0 -2
- package/dist/styles/upload-manager.css +0 -7
- package/dist/styles/virtual-scroll.css +0 -2
- package/dist/styles/virtual-select.css +0 -2
- package/dist/styles/virtual-table.css +0 -4
- package/dist/styles/virtual-tree.css +0 -3
- package/dist/styles/visually-hidden.css +0 -2
- package/dist/styles/watermark.css +0 -2
- package/dist/vue/components/advanced-input/calendar.ce.js +0 -216
- package/dist/vue/components/advanced-input/date-range-picker.ce.js +0 -224
- package/dist/vue/components/advanced-input/editable.ce.js +0 -161
- package/dist/vue/components/advanced-input/mention.ce.js +0 -181
- package/dist/vue/components/advanced-input/range-slider.ce.js +0 -111
- package/dist/vue/components/advanced-input/time-range-picker.ce.js +0 -120
- package/dist/vue/components/advanced-input/transfer.ce.js +0 -192
- package/dist/vue/components/content/chart.ce.js +0 -282
- package/dist/vue/components/content/code-editor.ce.js +0 -314
- package/dist/vue/components/content/equation.ce.js +0 -69
- package/dist/vue/components/content/heatmap.ce.js +0 -148
- package/dist/vue/components/content/rich-text-editor.ce.js +0 -346
- package/dist/vue/components/core/button-group.ce.js +0 -142
- package/dist/vue/components/core/card.ce.js +0 -73
- package/dist/vue/components/core/cascader.ce.js +0 -329
- package/dist/vue/components/core/code-block.ce.js +0 -131
- package/dist/vue/components/core/date-picker.ce.js +0 -433
- package/dist/vue/components/core/drawer.ce.js +0 -234
- package/dist/vue/components/core/empty-state.ce.js +0 -58
- package/dist/vue/components/core/icon-button.ce.js +0 -93
- package/dist/vue/components/core/layout.ce.js +0 -68
- package/dist/vue/components/core/notification.ce.js +0 -189
- package/dist/vue/components/core/pagination.ce.js +0 -158
- package/dist/vue/components/core/time-picker.ce.js +0 -486
- package/dist/vue/components/core/virtual-scroll.ce.js +0 -176
- package/dist/vue/components/data/copy-button.ce.js +0 -75
- package/dist/vue/components/data/image-preview.ce.js +0 -226
- package/dist/vue/components/data/infinite-scroll.ce.js +0 -126
- package/dist/vue/components/data/long-text.ce.js +0 -70
- package/dist/vue/components/data/relative-time.ce.js +0 -77
- package/dist/vue/components/data/ring-progress.ce.js +0 -87
- package/dist/vue/components/data/virtual-table.ce.js +0 -178
- package/dist/vue/components/data/virtual-tree.ce.js +0 -213
- package/dist/vue/components/display/alert.ce.js +0 -101
- package/dist/vue/components/display/avatar-group.ce.js +0 -65
- package/dist/vue/components/display/avatar.ce.js +0 -84
- package/dist/vue/components/display/blockquote.ce.js +0 -44
- package/dist/vue/components/display/countdown.ce.js +0 -77
- package/dist/vue/components/display/descriptions.ce.js +0 -43
- package/dist/vue/components/display/highlight.ce.js +0 -48
- package/dist/vue/components/display/list.ce.js +0 -73
- package/dist/vue/components/display/result.ce.js +0 -57
- package/dist/vue/components/display/spinner.ce.js +0 -42
- package/dist/vue/components/display/statistic.ce.js +0 -71
- package/dist/vue/components/display/timeline.ce.js +0 -60
- package/dist/vue/components/form-completion/angle-slider.ce.js +0 -103
- package/dist/vue/components/form-completion/color-picker.ce.js +0 -286
- package/dist/vue/components/form-completion/date-field.ce.js +0 -131
- package/dist/vue/components/form-completion/dynamic-input.ce.js +0 -171
- package/dist/vue/components/form-completion/form.ce.js +0 -248
- package/dist/vue/components/form-completion/json-input.ce.js +0 -114
- package/dist/vue/components/form-completion/masked-input.ce.js +0 -88
- package/dist/vue/components/form-completion/period-picker.ce.js +0 -147
- package/dist/vue/components/form-completion/time-field.ce.js +0 -120
- package/dist/vue/components/form-completion/upload-manager.ce.js +0 -232
- package/dist/vue/components/foundation/banner.ce.js +0 -106
- package/dist/vue/components/foundation/error-state.ce.js +0 -108
- package/dist/vue/components/foundation/field-group.ce.js +0 -146
- package/dist/vue/components/foundation/flex.ce.js +0 -60
- package/dist/vue/components/foundation/grid.ce.js +0 -52
- package/dist/vue/components/foundation/input-group.ce.js +0 -34
- package/dist/vue/components/foundation/page-header.ce.js +0 -55
- package/dist/vue/components/foundation/time-display.ce.js +0 -129
- package/dist/vue/components/foundation/typography.ce.js +0 -71
- package/dist/vue/components/input/checkbox-group.ce.js +0 -93
- package/dist/vue/components/input/field.ce.js +0 -76
- package/dist/vue/components/input/file-upload.ce.js +0 -154
- package/dist/vue/components/input/number-field.ce.js +0 -103
- package/dist/vue/components/input/pin-input.ce.js +0 -112
- package/dist/vue/components/input/rating.ce.js +0 -115
- package/dist/vue/components/input/tags-input.ce.js +0 -159
- package/dist/vue/components/input/toggle.ce.js +0 -58
- package/dist/vue/components/interaction/chip.ce.js +0 -95
- package/dist/vue/components/interaction/command.ce.js +0 -161
- package/dist/vue/components/interaction/context-menu.ce.js +0 -113
- package/dist/vue/components/interaction/hover-card.ce.js +0 -92
- package/dist/vue/components/interaction/loading-overlay.ce.js +0 -70
- package/dist/vue/components/interaction/menubar.ce.js +0 -134
- package/dist/vue/components/interaction/multi-select.ce.js +0 -271
- package/dist/vue/components/interaction/popconfirm.ce.js +0 -95
- package/dist/vue/components/interaction/tree-select.ce.js +0 -195
- package/dist/vue/components/navigation/accordion.ce.js +0 -114
- package/dist/vue/components/navigation/anchor.ce.js +0 -125
- package/dist/vue/components/navigation/back-top.ce.js +0 -67
- package/dist/vue/components/navigation/carousel.ce.js +0 -128
- package/dist/vue/components/navigation/link.ce.js +0 -62
- package/dist/vue/components/navigation/navigation-menu.ce.js +0 -91
- package/dist/vue/components/navigation/overflow-list.ce.js +0 -67
- package/dist/vue/components/navigation/scroll-area.ce.js +0 -47
- package/dist/vue/components/navigation/splitter.ce.js +0 -131
- package/dist/vue/components/navigation/stepper.ce.js +0 -74
- package/dist/vue/components/navigation/toolbar.ce.js +0 -93
- package/dist/vue/components/navigation/visually-hidden.ce.js +0 -16
- package/dist/vue/components/shell/app-shell.ce.js +0 -98
- package/dist/vue/components/shell/config-provider.ce.js +0 -110
- package/dist/vue/components/shell/marquee.ce.js +0 -92
- package/dist/vue/components/shell/masonry.ce.js +0 -50
- package/dist/vue/components/shell/sidebar.ce.js +0 -136
- package/dist/vue/components/utility/affix.ce.js +0 -64
- package/dist/vue/components/utility/alert-dialog.ce.js +0 -124
- package/dist/vue/components/utility/animated-number.ce.js +0 -66
- package/dist/vue/components/utility/float-button.ce.js +0 -104
- package/dist/vue/components/utility/listbox.ce.js +0 -102
- package/dist/vue/components/utility/loading-bar.ce.js +0 -85
- package/dist/vue/components/utility/log-viewer.ce.js +0 -141
- package/dist/vue/components/utility/notification-queue.ce.js +0 -122
- package/dist/vue/components/utility/progress-group.ce.js +0 -63
- package/dist/vue/components/utility/qr-code.ce.js +0 -62
- package/dist/vue/components/utility/tag-group.ce.js +0 -127
- package/dist/vue/components/utility/tour.ce.js +0 -214
- package/dist/vue/components/utility/virtual-select.ce.js +0 -207
- package/dist/vue/components/utility/watermark.ce.js +0 -44
- package/dist/vue/internal/navigation-items.js +0 -110
- package/dist/vue/utils/code-highlight.js +0 -142
- package/dist/vue/utils/collection.js +0 -15
- package/dist/vue/utils/config.js +0 -47
- package/dist/vue/utils/content.js +0 -83
- package/dist/vue/utils/display-status.js +0 -31
- package/dist/vue/utils/foundation.js +0 -65
- package/dist/vue/utils/local-date.js +0 -48
- package/dist/vue/utils/notifications.js +0 -60
- package/dist/vue/utils/qr.js +0 -20
- package/dist/vue/utils/scoped-slots.js +0 -22
- package/dist/vue/utils/theme.js +0 -56
- package/dist/vue/utils/utility-choice.js +0 -56
|
@@ -1,486 +0,0 @@
|
|
|
1
|
-
import { useRipple as e } from "../../utils/ripple.js";
|
|
2
|
-
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
import n from "./icon.ce.js";
|
|
4
|
-
import { presenceTransition as r } from "../../utils/motion.js";
|
|
5
|
-
/* empty css */
|
|
6
|
-
import { Fragment as i, Transition as ee, computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, getCurrentInstance as te, mergeProps as u, nextTick as d, normalizeClass as f, onBeforeUnmount as ne, onMounted as re, openBlock as p, ref as m, renderList as h, toDisplayString as g, unref as _, useAttrs as ie, useHost as ae, useId as oe, watch as v, withCtx as se, withModifiers as y } from "vue";
|
|
7
|
-
import { ArrowDown01Icon as ce, Cancel01Icon as le } from "@hugeicons/core-free-icons";
|
|
8
|
-
// src/components/core/time-picker.ce.vue
|
|
9
|
-
var ue = ["aria-disabled"], de = [
|
|
10
|
-
"aria-expanded",
|
|
11
|
-
"aria-label",
|
|
12
|
-
"aria-required",
|
|
13
|
-
"disabled"
|
|
14
|
-
], fe = ["disabled"], pe = [
|
|
15
|
-
"name",
|
|
16
|
-
"value",
|
|
17
|
-
"required",
|
|
18
|
-
"disabled"
|
|
19
|
-
], me = ["aria-label"], he = {
|
|
20
|
-
class: "kima-time-picker__summary",
|
|
21
|
-
"aria-live": "polite"
|
|
22
|
-
}, ge = { class: "kima-time-picker__columns" }, _e = { class: "kima-time-picker__column" }, ve = ["aria-activedescendant"], ye = [
|
|
23
|
-
"id",
|
|
24
|
-
"aria-selected",
|
|
25
|
-
"aria-disabled",
|
|
26
|
-
"disabled",
|
|
27
|
-
"tabindex",
|
|
28
|
-
"onClick",
|
|
29
|
-
"onKeydown"
|
|
30
|
-
], be = { class: "kima-time-picker__column" }, xe = ["aria-activedescendant"], Se = [
|
|
31
|
-
"id",
|
|
32
|
-
"aria-selected",
|
|
33
|
-
"aria-disabled",
|
|
34
|
-
"disabled",
|
|
35
|
-
"tabindex",
|
|
36
|
-
"onClick",
|
|
37
|
-
"onKeydown"
|
|
38
|
-
], Ce = {
|
|
39
|
-
key: 0,
|
|
40
|
-
class: "kima-time-picker__column kima-time-picker__column--period"
|
|
41
|
-
}, we = ["aria-activedescendant"], Te = [
|
|
42
|
-
"id",
|
|
43
|
-
"aria-selected",
|
|
44
|
-
"aria-disabled",
|
|
45
|
-
"disabled",
|
|
46
|
-
"tabindex",
|
|
47
|
-
"onClick",
|
|
48
|
-
"onKeydown"
|
|
49
|
-
], Ee = /*#__PURE__*/ t(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
50
|
-
__name: "time-picker.ce",
|
|
51
|
-
props: {
|
|
52
|
-
modelValue: {
|
|
53
|
-
type: String,
|
|
54
|
-
default: null
|
|
55
|
-
},
|
|
56
|
-
min: {
|
|
57
|
-
type: String,
|
|
58
|
-
default: null
|
|
59
|
-
},
|
|
60
|
-
max: {
|
|
61
|
-
type: String,
|
|
62
|
-
default: null
|
|
63
|
-
},
|
|
64
|
-
step: {
|
|
65
|
-
type: Number,
|
|
66
|
-
default: 30
|
|
67
|
-
},
|
|
68
|
-
label: {
|
|
69
|
-
type: String,
|
|
70
|
-
default: ""
|
|
71
|
-
},
|
|
72
|
-
placeholder: {
|
|
73
|
-
type: String,
|
|
74
|
-
default: "Select time"
|
|
75
|
-
},
|
|
76
|
-
open: Boolean,
|
|
77
|
-
required: Boolean,
|
|
78
|
-
name: String,
|
|
79
|
-
disabled: Boolean,
|
|
80
|
-
clearable: Boolean,
|
|
81
|
-
locale: {
|
|
82
|
-
type: String,
|
|
83
|
-
default: "en-GB"
|
|
84
|
-
},
|
|
85
|
-
hour12: {
|
|
86
|
-
type: Boolean,
|
|
87
|
-
default: null
|
|
88
|
-
},
|
|
89
|
-
mode: {
|
|
90
|
-
type: String,
|
|
91
|
-
default: "auto"
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
emits: [
|
|
95
|
-
"update:modelValue",
|
|
96
|
-
"change",
|
|
97
|
-
"update:open"
|
|
98
|
-
],
|
|
99
|
-
setup(t, { emit: Ee }) {
|
|
100
|
-
let b = t, x = Ee, S = ie(), De = te()?.ce ? ae() : null, Oe = a(() => De ? {
|
|
101
|
-
...S,
|
|
102
|
-
id: void 0
|
|
103
|
-
} : S), ke = m(null), C = m(null), Ae = m(null), je = m(null);
|
|
104
|
-
e(je);
|
|
105
|
-
let Me = m({
|
|
106
|
-
hour: [],
|
|
107
|
-
minute: [],
|
|
108
|
-
period: []
|
|
109
|
-
}), w = m(b.modelValue), T = m(!1), E = m(0), D = m(0), O = m("AM"), k = m("hour"), A = m(0), j, M, N, P, F = `kima-time-picker-${oe()}`, Ne = `${F}-trigger`, Pe = `${F}-popup`, Fe = `${F}-hours`, Ie = `${F}-minutes`, Le = `${F}-period`, Re = a(() => {
|
|
110
|
-
let e = Number(b.step);
|
|
111
|
-
return Number.isFinite(e) && e > 0 ? Math.min(60, Math.floor(e)) : 30;
|
|
112
|
-
}), ze = a(() => V(b.min)), Be = a(() => V(b.max)), I = a(() => {
|
|
113
|
-
let e = b.mode.toLowerCase();
|
|
114
|
-
if ([
|
|
115
|
-
"12",
|
|
116
|
-
"12h",
|
|
117
|
-
"12-hour"
|
|
118
|
-
].includes(e)) return !0;
|
|
119
|
-
if ([
|
|
120
|
-
"24",
|
|
121
|
-
"24h",
|
|
122
|
-
"24-hour"
|
|
123
|
-
].includes(e)) return !1;
|
|
124
|
-
if (typeof b.hour12 == "boolean") return b.hour12;
|
|
125
|
-
try {
|
|
126
|
-
let e = new Intl.DateTimeFormat(b.locale || "en-GB", { hour: "numeric" }).resolvedOptions().hourCycle;
|
|
127
|
-
return e === "h11" || e === "h12";
|
|
128
|
-
} catch {
|
|
129
|
-
return !1;
|
|
130
|
-
}
|
|
131
|
-
}), Ve = a(() => {
|
|
132
|
-
let e = [];
|
|
133
|
-
for (let t = 0; t < 60; t += Re.value) e.push(t);
|
|
134
|
-
return e;
|
|
135
|
-
}), L = a(() => {
|
|
136
|
-
let e = [];
|
|
137
|
-
if (I.value) for (let t = 1; t <= 12; t += 1) {
|
|
138
|
-
let n = W(t, O.value);
|
|
139
|
-
e.push({
|
|
140
|
-
value: n,
|
|
141
|
-
label: String(t),
|
|
142
|
-
disabled: !K(n)
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
else for (let t = 0; t < 24; t += 1) e.push({
|
|
146
|
-
value: t,
|
|
147
|
-
label: B(t),
|
|
148
|
-
disabled: !K(t)
|
|
149
|
-
});
|
|
150
|
-
return e;
|
|
151
|
-
}), R = a(() => Ve.value.map((e) => ({
|
|
152
|
-
value: e,
|
|
153
|
-
label: B(e),
|
|
154
|
-
disabled: !G(E.value, e)
|
|
155
|
-
}))), He = a(() => [{
|
|
156
|
-
value: "AM",
|
|
157
|
-
label: "AM",
|
|
158
|
-
disabled: !Ge("AM")
|
|
159
|
-
}, {
|
|
160
|
-
value: "PM",
|
|
161
|
-
label: "PM",
|
|
162
|
-
disabled: !Ge("PM")
|
|
163
|
-
}]), Ue = a(() => {
|
|
164
|
-
let e = V(w.value);
|
|
165
|
-
return e === null ? b.placeholder : We(e);
|
|
166
|
-
}), z = a(() => `${F}-${k.value}-${A.value}`);
|
|
167
|
-
function B(e) {
|
|
168
|
-
return String(e).padStart(2, "0");
|
|
169
|
-
}
|
|
170
|
-
function V(e) {
|
|
171
|
-
if (typeof e != "string" || !/^\d{2}:\d{2}$/.test(e)) return null;
|
|
172
|
-
let [t, n] = e.split(":").map(Number);
|
|
173
|
-
return t > 23 || n > 59 ? null : t * 60 + n;
|
|
174
|
-
}
|
|
175
|
-
function H(e, t) {
|
|
176
|
-
return `${B(e)}:${B(t)}`;
|
|
177
|
-
}
|
|
178
|
-
function We(e) {
|
|
179
|
-
let t = new Date(2e3, 0, 1, Math.floor(e / 60), e % 60);
|
|
180
|
-
try {
|
|
181
|
-
return new Intl.DateTimeFormat(b.locale || "en-GB", {
|
|
182
|
-
hour: "numeric",
|
|
183
|
-
minute: "2-digit",
|
|
184
|
-
hour12: I.value
|
|
185
|
-
}).format(t);
|
|
186
|
-
} catch {
|
|
187
|
-
return H(Math.floor(e / 60), e % 60);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
function U(e) {
|
|
191
|
-
let t = e % 12;
|
|
192
|
-
return t === 0 ? 12 : t;
|
|
193
|
-
}
|
|
194
|
-
function W(e, t) {
|
|
195
|
-
return t === "PM" ? e === 12 ? 12 : e + 12 : e === 12 ? 0 : e;
|
|
196
|
-
}
|
|
197
|
-
function G(e, t) {
|
|
198
|
-
let n = e * 60 + t;
|
|
199
|
-
return !(n % Re.value !== 0 || ze.value !== null && n < ze.value || Be.value !== null && n > Be.value);
|
|
200
|
-
}
|
|
201
|
-
function K(e) {
|
|
202
|
-
return Ve.value.some((t) => G(e, t));
|
|
203
|
-
}
|
|
204
|
-
function Ge(e) {
|
|
205
|
-
return L.value.some((t) => U(t.value) === U(E.value) && O.value === e && !t.disabled) || Array.from({ length: 12 }, (t, n) => W(n + 1, e)).some((e) => K(e));
|
|
206
|
-
}
|
|
207
|
-
function Ke() {
|
|
208
|
-
for (let e = 0; e < 1440; e += 1) if (G(Math.floor(e / 60), e % 60)) return e;
|
|
209
|
-
return 0;
|
|
210
|
-
}
|
|
211
|
-
function qe() {
|
|
212
|
-
let e = V(w.value), t = e !== null && G(Math.floor(e / 60), e % 60) ? e : Ke();
|
|
213
|
-
E.value = Math.floor(t / 60), D.value = t % 60, O.value = E.value >= 12 ? "PM" : "AM", k.value = "hour", A.value = Math.max(0, L.value.findIndex((e) => e.value === E.value));
|
|
214
|
-
}
|
|
215
|
-
function q(e, t, n) {
|
|
216
|
-
n && (Me.value[e][t] = n);
|
|
217
|
-
}
|
|
218
|
-
function J() {
|
|
219
|
-
d(() => Me.value[k.value]?.[A.value]?.focus());
|
|
220
|
-
}
|
|
221
|
-
function Y(e = !0) {
|
|
222
|
-
b.disabled || (qe(), T.value = !0, e && x("update:open", !0), J());
|
|
223
|
-
}
|
|
224
|
-
function X(e = !0, t = !0) {
|
|
225
|
-
T.value && (T.value = !1, e && x("update:open", !1), t && d(() => {
|
|
226
|
-
T.value || C.value?.focus();
|
|
227
|
-
}));
|
|
228
|
-
}
|
|
229
|
-
function Je() {
|
|
230
|
-
T.value ? X(!0, !0) : Y(!0);
|
|
231
|
-
}
|
|
232
|
-
function Ye(e) {
|
|
233
|
-
b.disabled || e === w.value || (w.value = e, x("update:modelValue", e), x("change", e));
|
|
234
|
-
}
|
|
235
|
-
function Xe() {
|
|
236
|
-
G(E.value, D.value) && (Ye(H(E.value, D.value)), X(!0, !0));
|
|
237
|
-
}
|
|
238
|
-
function Ze(e, t) {
|
|
239
|
-
if (e.disabled) return;
|
|
240
|
-
E.value = e.value, k.value = "minute";
|
|
241
|
-
let n = R.value.findIndex((e) => e.value === D.value && !e.disabled);
|
|
242
|
-
A.value = n >= 0 ? n : Math.max(0, R.value.findIndex((e) => !e.disabled)), J();
|
|
243
|
-
}
|
|
244
|
-
function Qe(e, t) {
|
|
245
|
-
e.disabled || (D.value = e.value, k.value = "minute", A.value = t, Xe());
|
|
246
|
-
}
|
|
247
|
-
function Z(e, t) {
|
|
248
|
-
e.disabled || (O.value = e.value, E.value = W(U(E.value), e.value), k.value = "period", A.value = t, J());
|
|
249
|
-
}
|
|
250
|
-
function Q(e) {
|
|
251
|
-
return e === "hour" ? L.value : e === "minute" ? R.value : He.value;
|
|
252
|
-
}
|
|
253
|
-
function $e(e, t, n) {
|
|
254
|
-
let r = Q(e), i = t + n;
|
|
255
|
-
for (; i >= 0 && i < r.length;) {
|
|
256
|
-
if (!r[i].disabled) return i;
|
|
257
|
-
i += n;
|
|
258
|
-
}
|
|
259
|
-
return t;
|
|
260
|
-
}
|
|
261
|
-
function et(e, t, n) {
|
|
262
|
-
if (n.isComposing) return;
|
|
263
|
-
if (n.key === "Escape") {
|
|
264
|
-
n.preventDefault(), X(!0, !0);
|
|
265
|
-
return;
|
|
266
|
-
}
|
|
267
|
-
if ([
|
|
268
|
-
"ArrowUp",
|
|
269
|
-
"ArrowDown",
|
|
270
|
-
"Home",
|
|
271
|
-
"End"
|
|
272
|
-
].includes(n.key)) {
|
|
273
|
-
n.preventDefault();
|
|
274
|
-
let r = Q(e), i = n.key === "Home" ? r.findIndex((e) => !e.disabled) : n.key === "End" ? [...r].findLastIndex((e) => !e.disabled) : $e(e, t, n.key === "ArrowUp" ? -1 : 1);
|
|
275
|
-
i >= 0 && (k.value = e, A.value = i, e === "hour" && (E.value = r[i].value), e === "minute" && (D.value = r[i].value), e === "period" && Z(r[i], i), J());
|
|
276
|
-
return;
|
|
277
|
-
}
|
|
278
|
-
if (n.key === "ArrowLeft" || n.key === "ArrowRight") {
|
|
279
|
-
n.preventDefault();
|
|
280
|
-
let t = I.value ? [
|
|
281
|
-
"hour",
|
|
282
|
-
"minute",
|
|
283
|
-
"period"
|
|
284
|
-
] : ["hour", "minute"], r = t[Math.max(0, Math.min(t.length - 1, t.indexOf(e) + (n.key === "ArrowLeft" ? -1 : 1)))];
|
|
285
|
-
k.value = r;
|
|
286
|
-
let i = Q(r);
|
|
287
|
-
A.value = Math.max(0, i.findIndex((e) => !e.disabled)), J();
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
if (n.key !== "Enter" && n.key !== " ") return;
|
|
291
|
-
n.preventDefault();
|
|
292
|
-
let r = Q(e)[t];
|
|
293
|
-
e === "hour" ? Ze(r, t) : e === "minute" ? Qe(r, t) : Z(r, t);
|
|
294
|
-
}
|
|
295
|
-
function tt(e) {
|
|
296
|
-
b.disabled || (e.key === "Escape" && T.value ? (e.preventDefault(), X(!0, !0)) : [
|
|
297
|
-
"ArrowDown",
|
|
298
|
-
"ArrowUp",
|
|
299
|
-
"Enter",
|
|
300
|
-
" "
|
|
301
|
-
].includes(e.key) && (e.preventDefault(), T.value || Y(!0)));
|
|
302
|
-
}
|
|
303
|
-
function nt(e) {
|
|
304
|
-
e.key === "Escape" && (e.preventDefault(), X(!0, !0));
|
|
305
|
-
}
|
|
306
|
-
function rt() {
|
|
307
|
-
Ye(null), X(!0, !0), d(() => {
|
|
308
|
-
T.value || C.value?.focus();
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
function $(e) {
|
|
312
|
-
T.value && !e.composedPath().includes(ke.value) && X(!1, !1);
|
|
313
|
-
}
|
|
314
|
-
function it(e) {
|
|
315
|
-
clearTimeout(P), P = setTimeout(() => {
|
|
316
|
-
if (e.defaultPrevented) return;
|
|
317
|
-
let t = w.value !== N;
|
|
318
|
-
w.value = N, X(!1, !1), t && (x("update:modelValue", w.value), x("change", w.value));
|
|
319
|
-
}, 0);
|
|
320
|
-
}
|
|
321
|
-
function at(e) {
|
|
322
|
-
e.preventDefault(), d(() => C.value?.focus());
|
|
323
|
-
}
|
|
324
|
-
return v(() => b.modelValue, (e) => {
|
|
325
|
-
w.value = e;
|
|
326
|
-
}), v(() => b.open, (e) => {
|
|
327
|
-
e ? Y(!1) : X(!1, !1);
|
|
328
|
-
}, { immediate: !0 }), v(() => b.disabled, (e) => {
|
|
329
|
-
e && X(!1, !1);
|
|
330
|
-
}), v([I, () => b.locale], () => {
|
|
331
|
-
T.value && qe();
|
|
332
|
-
}), re(() => {
|
|
333
|
-
N = b.modelValue, M = Ae.value?.form, M?.addEventListener("reset", it), j = ke.value.ownerDocument, j.addEventListener("pointerdown", $), j.addEventListener("focusin", $), T.value && J();
|
|
334
|
-
}), ne(() => {
|
|
335
|
-
clearTimeout(P), M?.removeEventListener("reset", it), j?.removeEventListener("pointerdown", $), j?.removeEventListener("focusin", $);
|
|
336
|
-
}), (e, a) => (p(), s("div", u({
|
|
337
|
-
ref_key: "root",
|
|
338
|
-
ref: ke
|
|
339
|
-
}, Oe.value, { class: ["kima-time-picker", {
|
|
340
|
-
"kima-time-picker--open": T.value,
|
|
341
|
-
"kima-time-picker--disabled": t.disabled
|
|
342
|
-
}] }), [
|
|
343
|
-
c("div", {
|
|
344
|
-
ref_key: "control",
|
|
345
|
-
ref: je,
|
|
346
|
-
class: "kima-time-picker__control",
|
|
347
|
-
"aria-disabled": t.disabled || void 0
|
|
348
|
-
}, [c("button", {
|
|
349
|
-
id: Ne,
|
|
350
|
-
ref_key: "trigger",
|
|
351
|
-
ref: C,
|
|
352
|
-
class: "kima-time-picker__trigger",
|
|
353
|
-
type: "button",
|
|
354
|
-
role: "combobox",
|
|
355
|
-
"aria-haspopup": "dialog",
|
|
356
|
-
"aria-expanded": T.value,
|
|
357
|
-
"aria-controls": Pe,
|
|
358
|
-
"aria-label": _(S)["aria-label"] || _(S).ariaLabel || t.label || t.placeholder,
|
|
359
|
-
"aria-required": t.required || void 0,
|
|
360
|
-
disabled: t.disabled,
|
|
361
|
-
onClick: Je,
|
|
362
|
-
onKeydown: tt
|
|
363
|
-
}, [c("span", { class: f(["kima-time-picker__trigger-label", { "kima-time-picker__trigger-label--placeholder": V(w.value) === null }]) }, g(Ue.value), 3), l(n, {
|
|
364
|
-
class: "kima-time-picker__arrow",
|
|
365
|
-
icon: _(ce),
|
|
366
|
-
size: 20,
|
|
367
|
-
"aria-hidden": "true"
|
|
368
|
-
}, null, 8, ["icon"])], 40, de), l(ee, u({ name: "kima-fade" }, _(r)), {
|
|
369
|
-
default: se(() => [t.clearable && w.value ? (p(), s("button", {
|
|
370
|
-
key: 0,
|
|
371
|
-
class: "kima-time-picker__clear",
|
|
372
|
-
type: "button",
|
|
373
|
-
"aria-label": "Clear time",
|
|
374
|
-
title: "Clear time",
|
|
375
|
-
disabled: t.disabled,
|
|
376
|
-
onClick: y(rt, ["stop"])
|
|
377
|
-
}, [l(n, {
|
|
378
|
-
icon: _(le),
|
|
379
|
-
size: 18,
|
|
380
|
-
"aria-hidden": "true"
|
|
381
|
-
}, null, 8, ["icon"])], 8, fe)) : o("", !0)]),
|
|
382
|
-
_: 1
|
|
383
|
-
}, 16)], 8, ue),
|
|
384
|
-
c("input", {
|
|
385
|
-
ref_key: "nativeInput",
|
|
386
|
-
ref: Ae,
|
|
387
|
-
class: "kima-time-picker__native",
|
|
388
|
-
type: "text",
|
|
389
|
-
name: t.name,
|
|
390
|
-
value: w.value || "",
|
|
391
|
-
required: t.required,
|
|
392
|
-
disabled: t.disabled,
|
|
393
|
-
tabindex: "-1",
|
|
394
|
-
"aria-hidden": "true",
|
|
395
|
-
onInput: a[0] ||= y(() => {}, ["stop"]),
|
|
396
|
-
onChange: a[1] ||= y(() => {}, ["stop"]),
|
|
397
|
-
onInvalid: at
|
|
398
|
-
}, null, 40, pe),
|
|
399
|
-
l(ee, u({ name: "kima-popup" }, _(r)), {
|
|
400
|
-
default: se(() => [T.value ? (p(), s("div", {
|
|
401
|
-
key: 0,
|
|
402
|
-
id: Pe,
|
|
403
|
-
class: "kima-time-picker__popup",
|
|
404
|
-
role: "dialog",
|
|
405
|
-
"aria-label": t.label || t.placeholder,
|
|
406
|
-
onKeydown: nt
|
|
407
|
-
}, [c("div", he, g(H(E.value, D.value)), 1), c("div", ge, [
|
|
408
|
-
c("div", _e, [a[2] ||= c("span", { class: "kima-time-picker__column-label" }, "Hour", -1), c("div", {
|
|
409
|
-
id: Fe,
|
|
410
|
-
class: "kima-time-picker__list",
|
|
411
|
-
role: "listbox",
|
|
412
|
-
"aria-label": "Hour",
|
|
413
|
-
"aria-activedescendant": k.value === "hour" ? z.value : void 0
|
|
414
|
-
}, [(p(!0), s(i, null, h(L.value, (e, t) => (p(), s("button", {
|
|
415
|
-
id: `${F}-hour-${t}`,
|
|
416
|
-
key: e.value,
|
|
417
|
-
ref_for: !0,
|
|
418
|
-
ref: (e) => q("hour", t, e),
|
|
419
|
-
class: f(["kima-time-picker__option", {
|
|
420
|
-
"kima-time-picker__option--active": k.value === "hour" && A.value === t,
|
|
421
|
-
"kima-time-picker__option--selected": e.value === E.value
|
|
422
|
-
}]),
|
|
423
|
-
type: "button",
|
|
424
|
-
role: "option",
|
|
425
|
-
"aria-selected": e.value === E.value,
|
|
426
|
-
"aria-disabled": e.disabled || void 0,
|
|
427
|
-
disabled: e.disabled,
|
|
428
|
-
tabindex: k.value === "hour" && A.value === t ? 0 : -1,
|
|
429
|
-
onClick: (n) => Ze(e, t),
|
|
430
|
-
onKeydown: (e) => et("hour", t, e)
|
|
431
|
-
}, g(e.label), 43, ye))), 128))], 8, ve)]),
|
|
432
|
-
c("div", be, [a[3] ||= c("span", { class: "kima-time-picker__column-label" }, "Minute", -1), c("div", {
|
|
433
|
-
id: Ie,
|
|
434
|
-
class: "kima-time-picker__list",
|
|
435
|
-
role: "listbox",
|
|
436
|
-
"aria-label": "Minute",
|
|
437
|
-
"aria-activedescendant": k.value === "minute" ? z.value : void 0
|
|
438
|
-
}, [(p(!0), s(i, null, h(R.value, (e, t) => (p(), s("button", {
|
|
439
|
-
id: `${F}-minute-${t}`,
|
|
440
|
-
key: e.value,
|
|
441
|
-
ref_for: !0,
|
|
442
|
-
ref: (e) => q("minute", t, e),
|
|
443
|
-
class: f(["kima-time-picker__option", {
|
|
444
|
-
"kima-time-picker__option--active": k.value === "minute" && A.value === t,
|
|
445
|
-
"kima-time-picker__option--selected": e.value === D.value
|
|
446
|
-
}]),
|
|
447
|
-
type: "button",
|
|
448
|
-
role: "option",
|
|
449
|
-
"aria-selected": e.value === D.value,
|
|
450
|
-
"aria-disabled": e.disabled || void 0,
|
|
451
|
-
disabled: e.disabled,
|
|
452
|
-
tabindex: k.value === "minute" && A.value === t ? 0 : -1,
|
|
453
|
-
onClick: (n) => Qe(e, t),
|
|
454
|
-
onKeydown: (e) => et("minute", t, e)
|
|
455
|
-
}, g(e.label), 43, Se))), 128))], 8, xe)]),
|
|
456
|
-
I.value ? (p(), s("div", Ce, [a[4] ||= c("span", { class: "kima-time-picker__column-label" }, "Period", -1), c("div", {
|
|
457
|
-
id: Le,
|
|
458
|
-
class: "kima-time-picker__list kima-time-picker__list--period",
|
|
459
|
-
role: "listbox",
|
|
460
|
-
"aria-label": "AM or PM",
|
|
461
|
-
"aria-activedescendant": k.value === "period" ? z.value : void 0
|
|
462
|
-
}, [(p(!0), s(i, null, h(He.value, (e, t) => (p(), s("button", {
|
|
463
|
-
id: `${F}-period-${t}`,
|
|
464
|
-
key: e.value,
|
|
465
|
-
ref_for: !0,
|
|
466
|
-
ref: (e) => q("period", t, e),
|
|
467
|
-
class: f(["kima-time-picker__option", {
|
|
468
|
-
"kima-time-picker__option--active": k.value === "period" && A.value === t,
|
|
469
|
-
"kima-time-picker__option--selected": e.value === O.value
|
|
470
|
-
}]),
|
|
471
|
-
type: "button",
|
|
472
|
-
role: "option",
|
|
473
|
-
"aria-selected": e.value === O.value,
|
|
474
|
-
"aria-disabled": e.disabled || void 0,
|
|
475
|
-
disabled: e.disabled,
|
|
476
|
-
tabindex: k.value === "period" && A.value === t ? 0 : -1,
|
|
477
|
-
onClick: (n) => Z(e, t),
|
|
478
|
-
onKeydown: (e) => et("period", t, e)
|
|
479
|
-
}, g(e.label), 43, Te))), 128))], 8, we)])) : o("", !0)
|
|
480
|
-
])], 40, me)) : o("", !0)]),
|
|
481
|
-
_: 1
|
|
482
|
-
}, 16)
|
|
483
|
-
], 16));
|
|
484
|
-
}
|
|
485
|
-
}), [["__scopeId", "data-v-afd1d777"]]);
|
|
486
|
-
export { Ee as default };
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import { Fragment as t, computed as n, createElementBlock as r, createElementVNode as i, createTextVNode as ee, getCurrentInstance as a, mergeProps as o, normalizeClass as s, normalizeStyle as c, onBeforeUnmount as l, onMounted as u, openBlock as d, ref as f, renderList as p, renderSlot as m, shallowRef as h, toDisplayString as g, useAttrs as _, useHost as v, useId as y, watch as b } from "vue";
|
|
4
|
-
// src/components/core/virtual-scroll.ce.vue
|
|
5
|
-
var x = ["aria-activedescendant"], S = [
|
|
6
|
-
"id",
|
|
7
|
-
"aria-posinset",
|
|
8
|
-
"aria-setsize",
|
|
9
|
-
"aria-selected",
|
|
10
|
-
"onClick"
|
|
11
|
-
], C = /*#__PURE__*/ e(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
12
|
-
__name: "virtual-scroll.ce",
|
|
13
|
-
props: {
|
|
14
|
-
items: {
|
|
15
|
-
type: Array,
|
|
16
|
-
default: () => []
|
|
17
|
-
},
|
|
18
|
-
itemHeight: {
|
|
19
|
-
type: Number,
|
|
20
|
-
default: 40
|
|
21
|
-
},
|
|
22
|
-
height: {
|
|
23
|
-
type: [Number, String],
|
|
24
|
-
default: 320
|
|
25
|
-
},
|
|
26
|
-
overscan: {
|
|
27
|
-
type: Number,
|
|
28
|
-
default: 4
|
|
29
|
-
},
|
|
30
|
-
modelValue: {
|
|
31
|
-
type: [
|
|
32
|
-
String,
|
|
33
|
-
Number,
|
|
34
|
-
Boolean,
|
|
35
|
-
Object,
|
|
36
|
-
Array
|
|
37
|
-
],
|
|
38
|
-
default: void 0
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
emits: ["update:modelValue", "item-click"],
|
|
42
|
-
setup(e, { emit: C }) {
|
|
43
|
-
let w = e, T = C, E = _(), D = a()?.ce ? v() : null, te = n(() => D ? {
|
|
44
|
-
...E,
|
|
45
|
-
id: void 0
|
|
46
|
-
} : E), O = f(null), k = f(0), A = f(0), j = f(-1), M = h(w.modelValue), N, P = `kima-virtual-scroll-${y()}`, F = n(() => {
|
|
47
|
-
let e = Number(w.itemHeight);
|
|
48
|
-
return Number.isFinite(e) && e > 0 ? Math.max(1, Math.floor(e)) : 40;
|
|
49
|
-
}), I = n(() => {
|
|
50
|
-
let e = Number(w.overscan);
|
|
51
|
-
return Number.isFinite(e) && e > 0 ? Math.floor(e) : 0;
|
|
52
|
-
}), L = n(() => typeof w.height == "number" ? `${Math.max(0, w.height)}px` : typeof w.height == "string" && /^\d+(?:\.\d+)?$/.test(w.height.trim()) ? `${w.height}px` : w.height || "320px"), R = n(() => w.items.length * F.value), z = n(() => M.value !== void 0 && M.value !== null), B = n(() => z.value ? w.items.findIndex((e) => Object.is(q(e), M.value)) : -1), V = n(() => {
|
|
53
|
-
if (A.value > 0) return A.value;
|
|
54
|
-
let e = Number.parseFloat(w.height);
|
|
55
|
-
return Number.isFinite(e) && e > 0 ? e : F.value * 8;
|
|
56
|
-
}), H = n(() => {
|
|
57
|
-
if (!w.items.length) return {
|
|
58
|
-
start: 0,
|
|
59
|
-
end: -1
|
|
60
|
-
};
|
|
61
|
-
let e = Math.floor(k.value / F.value) - I.value, t = Math.ceil((k.value + V.value) / F.value) + I.value - 1;
|
|
62
|
-
return {
|
|
63
|
-
start: Math.max(0, e),
|
|
64
|
-
end: Math.min(w.items.length - 1, Math.max(0, t))
|
|
65
|
-
};
|
|
66
|
-
}), U = n(() => {
|
|
67
|
-
let e = [];
|
|
68
|
-
for (let t = H.value.start; t <= H.value.end; t += 1) e.push({
|
|
69
|
-
item: w.items[t],
|
|
70
|
-
index: t,
|
|
71
|
-
key: Y(w.items[t])
|
|
72
|
-
});
|
|
73
|
-
return e;
|
|
74
|
-
}), W = n(() => H.value.start * F.value), G = n(() => Math.max(0, R.value - (H.value.end + 1) * F.value)), K = n(() => {
|
|
75
|
-
let { start: e, end: t } = H.value;
|
|
76
|
-
return j.value >= e && j.value <= t ? X(j.value) : void 0;
|
|
77
|
-
});
|
|
78
|
-
function q(e) {
|
|
79
|
-
return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "value") ? e.value : e;
|
|
80
|
-
}
|
|
81
|
-
function J(e) {
|
|
82
|
-
return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "label") ? e.label : e;
|
|
83
|
-
}
|
|
84
|
-
function Y(e) {
|
|
85
|
-
return e && typeof e == "object" ? e.key ?? e.value ?? e.id ?? e : e;
|
|
86
|
-
}
|
|
87
|
-
function X(e) {
|
|
88
|
-
return `${P}-item-${e}`;
|
|
89
|
-
}
|
|
90
|
-
function Z(e) {
|
|
91
|
-
O.value = e, A.value = e?.clientHeight || 0;
|
|
92
|
-
}
|
|
93
|
-
function ne(e) {
|
|
94
|
-
k.value = e.currentTarget.scrollTop;
|
|
95
|
-
}
|
|
96
|
-
function re(e) {
|
|
97
|
-
if (!O.value) return;
|
|
98
|
-
let t = e * F.value, n = t + F.value, r = O.value.scrollTop;
|
|
99
|
-
t < r ? r = t : n > r + O.value.clientHeight && (r = n - O.value.clientHeight), r !== O.value.scrollTop && (O.value.scrollTop = Math.max(0, r), k.value = O.value.scrollTop);
|
|
100
|
-
}
|
|
101
|
-
function Q(e, t = !1) {
|
|
102
|
-
e < 0 || e >= w.items.length || (j.value = e, t && re(e));
|
|
103
|
-
}
|
|
104
|
-
function $(e, t) {
|
|
105
|
-
Q(t);
|
|
106
|
-
let n = q(e);
|
|
107
|
-
z.value && Object.is(n, M.value) || (M.value = n, T("update:modelValue", n)), T("item-click", e, t);
|
|
108
|
-
}
|
|
109
|
-
function ie(e) {
|
|
110
|
-
if (e.isComposing || e.altKey || e.ctrlKey || e.metaKey || !w.items.length || ![
|
|
111
|
-
"ArrowDown",
|
|
112
|
-
"ArrowUp",
|
|
113
|
-
"Home",
|
|
114
|
-
"End",
|
|
115
|
-
"Enter",
|
|
116
|
-
" "
|
|
117
|
-
].includes(e.key)) return;
|
|
118
|
-
e.preventDefault();
|
|
119
|
-
let t = j.value >= 0 ? j.value : B.value >= 0 ? B.value : 0, n = t;
|
|
120
|
-
e.key === "ArrowDown" ? n = Math.min(w.items.length - 1, t + 1) : e.key === "ArrowUp" ? n = Math.max(0, t - 1) : e.key === "Home" ? n = 0 : e.key === "End" && (n = w.items.length - 1), Q(n, !0), (e.key === "Enter" || e.key === " ") && $(w.items[n], n);
|
|
121
|
-
}
|
|
122
|
-
return b(() => w.modelValue, (e) => {
|
|
123
|
-
M.value = e;
|
|
124
|
-
let t = e == null ? -1 : w.items.findIndex((t) => Object.is(q(t), e));
|
|
125
|
-
t >= 0 && (j.value = t);
|
|
126
|
-
}), b(() => w.items.length, (e) => {
|
|
127
|
-
e ? (j.value >= e && (j.value = e - 1), j.value < 0 && (j.value = B.value >= 0 ? B.value : 0)) : j.value = -1;
|
|
128
|
-
}), b(F, () => {
|
|
129
|
-
O.value && (O.value.scrollTop = Math.min(O.value.scrollTop, Math.max(0, R.value - O.value.clientHeight))), k.value = O.value?.scrollTop || 0;
|
|
130
|
-
}), u(() => {
|
|
131
|
-
A.value = O.value?.clientHeight || 0, typeof ResizeObserver < "u" && O.value && (N = new ResizeObserver((e) => {
|
|
132
|
-
A.value = e[0]?.contentRect.height || O.value.clientHeight;
|
|
133
|
-
}), N.observe(O.value));
|
|
134
|
-
}), l(() => N?.disconnect()), (n, a) => (d(), r("div", o({ ref: Z }, te.value, {
|
|
135
|
-
class: "kima-virtual-scroll",
|
|
136
|
-
style: { height: L.value },
|
|
137
|
-
role: "list",
|
|
138
|
-
tabindex: "0",
|
|
139
|
-
"aria-activedescendant": K.value,
|
|
140
|
-
onScroll: ne,
|
|
141
|
-
onKeydown: ie
|
|
142
|
-
}), [i("div", {
|
|
143
|
-
class: "kima-virtual-scroll__content",
|
|
144
|
-
style: c({ height: `${R.value}px` })
|
|
145
|
-
}, [
|
|
146
|
-
i("div", {
|
|
147
|
-
class: "kima-virtual-scroll__spacer",
|
|
148
|
-
style: c({ height: `${W.value}px` }),
|
|
149
|
-
"aria-hidden": "true"
|
|
150
|
-
}, null, 4),
|
|
151
|
-
(d(!0), r(t, null, p(U.value, (t) => (d(), r("div", {
|
|
152
|
-
id: X(t.index),
|
|
153
|
-
key: t.key,
|
|
154
|
-
class: s(["kima-virtual-scroll__item", {
|
|
155
|
-
"kima-virtual-scroll__item--active": t.index === j.value,
|
|
156
|
-
"kima-virtual-scroll__item--selected": z.value && Object.is(q(t.item), M.value)
|
|
157
|
-
}]),
|
|
158
|
-
role: "listitem",
|
|
159
|
-
"aria-posinset": t.index + 1,
|
|
160
|
-
"aria-setsize": e.items.length,
|
|
161
|
-
"aria-selected": z.value ? Object.is(q(t.item), M.value) : void 0,
|
|
162
|
-
style: c({ height: `${F.value}px` }),
|
|
163
|
-
onClick: (e) => $(t.item, t.index)
|
|
164
|
-
}, [m(n.$slots, "default", {
|
|
165
|
-
item: t.item,
|
|
166
|
-
index: t.index
|
|
167
|
-
}, () => [ee(g(J(t.item)), 1)], !0)], 14, S))), 128)),
|
|
168
|
-
i("div", {
|
|
169
|
-
class: "kima-virtual-scroll__spacer",
|
|
170
|
-
style: c({ height: `${G.value}px` }),
|
|
171
|
-
"aria-hidden": "true"
|
|
172
|
-
}, null, 4)
|
|
173
|
-
], 4)], 16, x));
|
|
174
|
-
}
|
|
175
|
-
}), [["__scopeId", "data-v-8f7f579b"]]);
|
|
176
|
-
export { C as default };
|