@cascivo/react 0.13.1 → 0.16.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/README.md +2 -2
- package/dist/accordion/accordion.css +1 -1
- package/dist/accordion/accordion.js +81 -65
- package/dist/accordion/accordion.module.js +6 -9
- package/dist/action-sheet/action-sheet.js +11 -11
- package/dist/action-sheet/action-sheet.module.js +0 -2
- package/dist/alert/alert.module.js +0 -2
- package/dist/alert-dialog/alert-dialog.css +1 -1
- package/dist/alert-dialog/alert-dialog.js +6 -6
- package/dist/alert-dialog/alert-dialog.module.js +7 -9
- package/dist/app-shell/app-shell.js +10 -10
- package/dist/app-shell/app-shell.module.js +0 -2
- package/dist/aspect-ratio/aspect-ratio.js +1 -3
- package/dist/aspect-ratio/aspect-ratio.module.js +0 -2
- package/dist/avatar/avatar.module.js +0 -2
- package/dist/avatar-group/avatar-group.js +1 -3
- package/dist/avatar-group/avatar-group.module.js +0 -2
- package/dist/badge/badge.js +1 -3
- package/dist/badge/badge.module.js +0 -2
- package/dist/blockquote/blockquote.js +1 -3
- package/dist/blockquote/blockquote.module.js +0 -2
- package/dist/bottom-sheet/bottom-sheet.js +12 -12
- package/dist/bottom-sheet/bottom-sheet.module.js +0 -2
- package/dist/breadcrumb/breadcrumb.module.js +0 -2
- package/dist/button/button.js +1 -3
- package/dist/button/button.module.js +0 -2
- package/dist/button-group/button-group.js +6 -6
- package/dist/button-group/button-group.module.js +0 -2
- package/dist/calendar/calendar.module.js +0 -2
- package/dist/card/card.js +1 -3
- package/dist/card/card.module.js +0 -2
- package/dist/carousel/carousel.js +9 -9
- package/dist/carousel/carousel.module.js +0 -2
- package/dist/chat-bubble/chat-bubble.js +0 -2
- package/dist/chat-bubble/chat-bubble.module.js +0 -2
- package/dist/checkbox/checkbox.js +10 -10
- package/dist/checkbox/checkbox.module.js +0 -2
- package/dist/checkbox-card/checkbox-card.js +5 -5
- package/dist/checkbox-card/checkbox-card.module.js +0 -2
- package/dist/code/code.js +1 -3
- package/dist/code/code.module.js +0 -2
- package/dist/code-snippet/code-snippet.module.js +0 -2
- package/dist/code-snippet/highlight.js +0 -2
- package/dist/collapsible/collapsible.css +1 -1
- package/dist/collapsible/collapsible.js +36 -31
- package/dist/collapsible/collapsible.module.js +3 -6
- package/dist/color-picker/color-picker.js +7 -7
- package/dist/color-picker/color-picker.module.js +0 -2
- package/dist/combobox/combobox.css +1 -1
- package/dist/combobox/combobox.js +11 -11
- package/dist/combobox/combobox.module.js +15 -17
- package/dist/command-menu/command-menu.js +113 -113
- package/dist/command-menu/command-menu.module.js +0 -2
- package/dist/comparison/comparison.js +5 -5
- package/dist/comparison/comparison.module.js +0 -2
- package/dist/contained-list/contained-list.module.js +0 -2
- package/dist/context-menu/context-menu.js +6 -6
- package/dist/context-menu/context-menu.module.js +0 -2
- package/dist/copy-button/copy-button.js +7 -7
- package/dist/copy-button/copy-button.module.js +0 -2
- package/dist/data-list/data-list.js +1 -3
- package/dist/data-list/data-list.module.js +0 -2
- package/dist/data-table/data-table.css +1 -1
- package/dist/data-table/data-table.js +164 -164
- package/dist/data-table/data-table.module.js +29 -31
- package/dist/date-picker/date-picker.css +1 -1
- package/dist/date-picker/date-picker.js +24 -24
- package/dist/date-picker/date-picker.module.js +19 -21
- package/dist/date-range-picker/date-range-picker.js +30 -30
- package/dist/date-range-picker/date-range-picker.module.js +0 -2
- package/dist/dock/dock.module.js +0 -2
- package/dist/drawer/drawer.js +11 -11
- package/dist/drawer/drawer.module.js +0 -2
- package/dist/dropdown/dropdown.js +14 -14
- package/dist/dropdown/dropdown.module.js +0 -2
- package/dist/editable/editable.css +1 -1
- package/dist/editable/editable.js +8 -8
- package/dist/editable/editable.module.js +7 -9
- package/dist/empty-state/empty-state.js +1 -3
- package/dist/empty-state/empty-state.module.js +0 -2
- package/dist/fab/fab.js +12 -12
- package/dist/fab/fab.module.js +0 -2
- package/dist/field/field.js +1 -3
- package/dist/field/field.module.js +0 -2
- package/dist/file-uploader/file-uploader.css +1 -1
- package/dist/file-uploader/file-uploader.js +5 -5
- package/dist/file-uploader/file-uploader.module.js +14 -16
- package/dist/filter/filter.module.js +0 -2
- package/dist/form/form.module.js +0 -2
- package/dist/header/header.module.js +0 -2
- package/dist/header-panel/header-panel.js +8 -8
- package/dist/header-panel/header-panel.module.js +0 -2
- package/dist/heading/heading.js +1 -3
- package/dist/heading/heading.module.js +0 -2
- package/dist/hover-card/hover-card.js +18 -18
- package/dist/hover-card/hover-card.module.js +0 -2
- package/dist/icon-button/icon-button.js +1 -3
- package/dist/icon-button/icon-button.module.js +0 -2
- package/dist/image/image.module.js +0 -2
- package/dist/index.d.ts +151 -24
- package/dist/index.js +0 -1
- package/dist/indicator/indicator.js +0 -2
- package/dist/indicator/indicator.module.js +0 -2
- package/dist/inline-loading/inline-loading.js +1 -3
- package/dist/inline-loading/inline-loading.module.js +0 -2
- package/dist/input/input.js +11 -11
- package/dist/input/input.module.js +0 -2
- package/dist/input-group/input-group.js +1 -3
- package/dist/input-group/input-group.module.js +0 -2
- package/dist/item/item.js +1 -3
- package/dist/item/item.module.js +0 -2
- package/dist/join/join.js +0 -2
- package/dist/join/join.module.js +0 -2
- package/dist/kbd/kbd.js +1 -3
- package/dist/kbd/kbd.module.js +0 -2
- package/dist/label/label.js +1 -3
- package/dist/label/label.module.js +0 -2
- package/dist/layouts/src/auto-grid/auto-grid.js +1 -3
- package/dist/layouts/src/auto-grid/auto-grid.module.js +0 -2
- package/dist/layouts/src/center/center.js +1 -3
- package/dist/layouts/src/center/center.module.js +0 -2
- package/dist/layouts/src/columns/columns.js +1 -3
- package/dist/layouts/src/columns/columns.module.js +0 -2
- package/dist/layouts/src/flex/flex.js +1 -3
- package/dist/layouts/src/flex/flex.module.js +0 -2
- package/dist/layouts/src/grid/grid.js +1 -3
- package/dist/layouts/src/grid/grid.module.js +0 -2
- package/dist/layouts/src/page-header/page-header.css +1 -1
- package/dist/layouts/src/page-header/page-header.js +1 -3
- package/dist/layouts/src/page-header/page-header.module.js +6 -8
- package/dist/layouts/src/spacer/spacer.js +1 -3
- package/dist/layouts/src/spacer/spacer.module.js +0 -2
- package/dist/link/link.js +1 -3
- package/dist/link/link.module.js +0 -2
- package/dist/list/list.js +1 -3
- package/dist/list/list.module.js +0 -2
- package/dist/log-viewer/log-viewer.js +15 -15
- package/dist/log-viewer/log-viewer.module.js +0 -2
- package/dist/menu/menu.js +22 -21
- package/dist/menu/menu.module.js +0 -2
- package/dist/menu-button/menu-button.js +8 -8
- package/dist/menu-button/menu-button.module.js +0 -2
- package/dist/menubar/menubar.js +24 -24
- package/dist/menubar/menubar.module.js +0 -2
- package/dist/modal/modal.js +9 -9
- package/dist/modal/modal.module.js +0 -2
- package/dist/multi-select/multi-select.css +1 -1
- package/dist/multi-select/multi-select.js +8 -8
- package/dist/multi-select/multi-select.module.js +11 -13
- package/dist/native-select/native-select.js +1 -3
- package/dist/native-select/native-select.module.js +0 -2
- package/dist/navigation-menu/navigation-menu.js +26 -26
- package/dist/navigation-menu/navigation-menu.module.js +0 -2
- package/dist/node/accordion/accordion.js +81 -65
- package/dist/node/accordion/accordion.module.js +6 -9
- package/dist/node/action-sheet/action-sheet.js +11 -11
- package/dist/node/action-sheet/action-sheet.module.js +0 -2
- package/dist/node/alert/alert.module.js +0 -2
- package/dist/node/alert-dialog/alert-dialog.js +6 -6
- package/dist/node/alert-dialog/alert-dialog.module.js +7 -9
- package/dist/node/app-shell/app-shell.js +10 -10
- package/dist/node/app-shell/app-shell.module.js +0 -2
- package/dist/node/aspect-ratio/aspect-ratio.js +1 -3
- package/dist/node/aspect-ratio/aspect-ratio.module.js +0 -2
- package/dist/node/avatar/avatar.module.js +0 -2
- package/dist/node/avatar-group/avatar-group.js +1 -3
- package/dist/node/avatar-group/avatar-group.module.js +0 -2
- package/dist/node/badge/badge.js +1 -3
- package/dist/node/badge/badge.module.js +0 -2
- package/dist/node/blockquote/blockquote.js +1 -3
- package/dist/node/blockquote/blockquote.module.js +0 -2
- package/dist/node/bottom-sheet/bottom-sheet.js +12 -12
- package/dist/node/bottom-sheet/bottom-sheet.module.js +0 -2
- package/dist/node/breadcrumb/breadcrumb.module.js +0 -2
- package/dist/node/button/button.js +1 -3
- package/dist/node/button/button.module.js +0 -2
- package/dist/node/button-group/button-group.js +6 -6
- package/dist/node/button-group/button-group.module.js +0 -2
- package/dist/node/calendar/calendar.module.js +0 -2
- package/dist/node/card/card.js +1 -3
- package/dist/node/card/card.module.js +0 -2
- package/dist/node/carousel/carousel.js +9 -9
- package/dist/node/carousel/carousel.module.js +0 -2
- package/dist/node/chat-bubble/chat-bubble.js +0 -2
- package/dist/node/chat-bubble/chat-bubble.module.js +0 -2
- package/dist/node/checkbox/checkbox.js +10 -10
- package/dist/node/checkbox/checkbox.module.js +0 -2
- package/dist/node/checkbox-card/checkbox-card.js +5 -5
- package/dist/node/checkbox-card/checkbox-card.module.js +0 -2
- package/dist/node/code/code.js +1 -3
- package/dist/node/code/code.module.js +0 -2
- package/dist/node/code-snippet/code-snippet.module.js +0 -2
- package/dist/node/code-snippet/highlight.js +0 -2
- package/dist/node/collapsible/collapsible.js +36 -31
- package/dist/node/collapsible/collapsible.module.js +3 -6
- package/dist/node/color-picker/color-picker.js +7 -7
- package/dist/node/color-picker/color-picker.module.js +0 -2
- package/dist/node/combobox/combobox.js +11 -11
- package/dist/node/combobox/combobox.module.js +15 -17
- package/dist/node/command-menu/command-menu.js +113 -113
- package/dist/node/command-menu/command-menu.module.js +0 -2
- package/dist/node/comparison/comparison.js +5 -5
- package/dist/node/comparison/comparison.module.js +0 -2
- package/dist/node/contained-list/contained-list.module.js +0 -2
- package/dist/node/context-menu/context-menu.js +6 -6
- package/dist/node/context-menu/context-menu.module.js +0 -2
- package/dist/node/copy-button/copy-button.js +7 -7
- package/dist/node/copy-button/copy-button.module.js +0 -2
- package/dist/node/data-list/data-list.js +1 -3
- package/dist/node/data-list/data-list.module.js +0 -2
- package/dist/node/data-table/data-table.js +164 -164
- package/dist/node/data-table/data-table.module.js +29 -31
- package/dist/node/date-picker/date-picker.js +24 -24
- package/dist/node/date-picker/date-picker.module.js +19 -21
- package/dist/node/date-range-picker/date-range-picker.js +30 -30
- package/dist/node/date-range-picker/date-range-picker.module.js +0 -2
- package/dist/node/dock/dock.module.js +0 -2
- package/dist/node/drawer/drawer.js +11 -11
- package/dist/node/drawer/drawer.module.js +0 -2
- package/dist/node/dropdown/dropdown.js +14 -14
- package/dist/node/dropdown/dropdown.module.js +0 -2
- package/dist/node/editable/editable.js +8 -8
- package/dist/node/editable/editable.module.js +7 -9
- package/dist/node/empty-state/empty-state.js +1 -3
- package/dist/node/empty-state/empty-state.module.js +0 -2
- package/dist/node/fab/fab.js +12 -12
- package/dist/node/fab/fab.module.js +0 -2
- package/dist/node/field/field.js +1 -3
- package/dist/node/field/field.module.js +0 -2
- package/dist/node/file-uploader/file-uploader.js +5 -5
- package/dist/node/file-uploader/file-uploader.module.js +14 -16
- package/dist/node/filter/filter.module.js +0 -2
- package/dist/node/form/form.module.js +0 -2
- package/dist/node/header/header.module.js +0 -2
- package/dist/node/header-panel/header-panel.js +8 -8
- package/dist/node/header-panel/header-panel.module.js +0 -2
- package/dist/node/heading/heading.js +1 -3
- package/dist/node/heading/heading.module.js +0 -2
- package/dist/node/hover-card/hover-card.js +18 -18
- package/dist/node/hover-card/hover-card.module.js +0 -2
- package/dist/node/icon-button/icon-button.js +1 -3
- package/dist/node/icon-button/icon-button.module.js +0 -2
- package/dist/node/image/image.module.js +0 -2
- package/dist/node/index.js +0 -1
- package/dist/node/indicator/indicator.js +0 -2
- package/dist/node/indicator/indicator.module.js +0 -2
- package/dist/node/inline-loading/inline-loading.js +1 -3
- package/dist/node/inline-loading/inline-loading.module.js +0 -2
- package/dist/node/input/input.js +11 -11
- package/dist/node/input/input.module.js +0 -2
- package/dist/node/input-group/input-group.js +1 -3
- package/dist/node/input-group/input-group.module.js +0 -2
- package/dist/node/item/item.js +1 -3
- package/dist/node/item/item.module.js +0 -2
- package/dist/node/join/join.js +0 -2
- package/dist/node/join/join.module.js +0 -2
- package/dist/node/kbd/kbd.js +1 -3
- package/dist/node/kbd/kbd.module.js +0 -2
- package/dist/node/label/label.js +1 -3
- package/dist/node/label/label.module.js +0 -2
- package/dist/node/layouts/src/auto-grid/auto-grid.js +1 -3
- package/dist/node/layouts/src/auto-grid/auto-grid.module.js +0 -2
- package/dist/node/layouts/src/center/center.js +1 -3
- package/dist/node/layouts/src/center/center.module.js +0 -2
- package/dist/node/layouts/src/columns/columns.js +1 -3
- package/dist/node/layouts/src/columns/columns.module.js +0 -2
- package/dist/node/layouts/src/flex/flex.js +1 -3
- package/dist/node/layouts/src/flex/flex.module.js +0 -2
- package/dist/node/layouts/src/grid/grid.js +1 -3
- package/dist/node/layouts/src/grid/grid.module.js +0 -2
- package/dist/node/layouts/src/page-header/page-header.js +1 -3
- package/dist/node/layouts/src/page-header/page-header.module.js +6 -8
- package/dist/node/layouts/src/spacer/spacer.js +1 -3
- package/dist/node/layouts/src/spacer/spacer.module.js +0 -2
- package/dist/node/link/link.js +1 -3
- package/dist/node/link/link.module.js +0 -2
- package/dist/node/list/list.js +1 -3
- package/dist/node/list/list.module.js +0 -2
- package/dist/node/log-viewer/log-viewer.js +15 -15
- package/dist/node/log-viewer/log-viewer.module.js +0 -2
- package/dist/node/menu/menu.js +22 -21
- package/dist/node/menu/menu.module.js +0 -2
- package/dist/node/menu-button/menu-button.js +8 -8
- package/dist/node/menu-button/menu-button.module.js +0 -2
- package/dist/node/menubar/menubar.js +24 -24
- package/dist/node/menubar/menubar.module.js +0 -2
- package/dist/node/modal/modal.js +9 -9
- package/dist/node/modal/modal.module.js +0 -2
- package/dist/node/multi-select/multi-select.js +8 -8
- package/dist/node/multi-select/multi-select.module.js +11 -13
- package/dist/node/native-select/native-select.js +1 -3
- package/dist/node/native-select/native-select.module.js +0 -2
- package/dist/node/navigation-menu/navigation-menu.js +26 -26
- package/dist/node/navigation-menu/navigation-menu.module.js +0 -2
- package/dist/node/notification/notification.js +6 -6
- package/dist/node/notification/notification.module.js +0 -2
- package/dist/node/number-input/number-input.js +7 -7
- package/dist/node/number-input/number-input.module.js +0 -2
- package/dist/node/otp-input/otp-input.js +5 -5
- package/dist/node/otp-input/otp-input.module.js +0 -2
- package/dist/node/overflow-menu/overflow-menu.module.js +0 -2
- package/dist/node/pagination/pagination.module.js +0 -2
- package/dist/node/password-input/password-input.js +8 -8
- package/dist/node/password-input/password-input.module.js +0 -2
- package/dist/node/popover/popover.js +12 -12
- package/dist/node/popover/popover.module.js +0 -2
- package/dist/node/popover/use-popover.js +8 -10
- package/dist/node/progress/progress.js +0 -2
- package/dist/node/progress/progress.module.js +0 -2
- package/dist/node/progress-bar/progress-bar.js +1 -3
- package/dist/node/progress-bar/progress-bar.module.js +0 -2
- package/dist/node/progress-circle/progress-circle.js +1 -3
- package/dist/node/progress-circle/progress-circle.module.js +0 -2
- package/dist/node/progress-indicator/progress-indicator.js +1 -3
- package/dist/node/progress-indicator/progress-indicator.module.js +0 -2
- package/dist/node/prose/prose.js +1 -3
- package/dist/node/prose/prose.module.js +0 -2
- package/dist/node/pull-to-refresh/pull-to-refresh.js +8 -8
- package/dist/node/pull-to-refresh/pull-to-refresh.module.js +0 -2
- package/dist/node/qr-code/encode.js +0 -2
- package/dist/node/qr-code/qr-code.module.js +0 -2
- package/dist/node/radial-progress/radial-progress.js +9 -10
- package/dist/node/radial-progress/radial-progress.module.js +0 -2
- package/dist/node/radio/radio.js +1 -3
- package/dist/node/radio/radio.module.js +0 -2
- package/dist/node/radio-card/radio-card.js +8 -8
- package/dist/node/radio-card/radio-card.module.js +0 -2
- package/dist/node/rating-group/rating-group.module.js +0 -2
- package/dist/node/react/src/index.js +0 -2
- package/dist/node/react/src/theme.js +10 -10
- package/dist/node/relative-time/relative-time.module.js +0 -2
- package/dist/node/resizable/resizable.js +7 -7
- package/dist/node/resizable/resizable.module.js +0 -2
- package/dist/node/scroll-area/scroll-area.js +6 -6
- package/dist/node/scroll-area/scroll-area.module.js +0 -2
- package/dist/node/search/search.js +9 -9
- package/dist/node/search/search.module.js +0 -2
- package/dist/node/segmented-control/segmented-control.module.js +0 -2
- package/dist/node/select/select.js +11 -11
- package/dist/node/select/select.module.js +0 -2
- package/dist/node/separator/separator.js +1 -3
- package/dist/node/separator/separator.module.js +0 -2
- package/dist/node/sheet/sheet.js +4 -4
- package/dist/node/sheet/sheet.module.js +0 -2
- package/dist/node/shell-header/shell-header.js +21 -18
- package/dist/node/shell-header/shell-header.module.js +20 -21
- package/dist/node/side-nav/side-nav.js +37 -37
- package/dist/node/side-nav/side-nav.module.js +0 -2
- package/dist/node/skeleton/skeleton.js +1 -3
- package/dist/node/skeleton/skeleton.module.js +0 -2
- package/dist/node/skip-nav/skip-nav.js +6 -6
- package/dist/node/skip-nav/skip-nav.module.js +0 -2
- package/dist/node/slider/slider.js +1 -3
- package/dist/node/slider/slider.module.js +0 -2
- package/dist/node/spinner/spinner.module.js +0 -2
- package/dist/node/stack/stack.js +0 -2
- package/dist/node/stack/stack.module.js +0 -2
- package/dist/node/stat/stat.js +22 -23
- package/dist/node/stat/stat.module.js +7 -9
- package/dist/node/status/status.js +1 -3
- package/dist/node/status/status.module.js +0 -2
- package/dist/node/steps/steps.module.js +0 -2
- package/dist/node/storage/src/drivers.js +0 -2
- package/dist/node/storage/src/persisted-signal.js +0 -2
- package/dist/node/structured-list/structured-list.js +10 -10
- package/dist/node/structured-list/structured-list.module.js +0 -2
- package/dist/node/swap/swap.js +10 -11
- package/dist/node/swap/swap.module.js +0 -2
- package/dist/node/swipe-item/swipe-item.module.js +0 -2
- package/dist/node/switcher/switcher.module.js +0 -2
- package/dist/node/tabs/tabs.js +38 -38
- package/dist/node/tabs/tabs.module.js +0 -2
- package/dist/node/tag/tag.module.js +0 -2
- package/dist/node/tags-input/tags-input.js +6 -6
- package/dist/node/tags-input/tags-input.module.js +4 -6
- package/dist/node/text/text.js +1 -3
- package/dist/node/text/text.module.js +0 -2
- package/dist/node/textarea/textarea.js +11 -11
- package/dist/node/textarea/textarea.module.js +0 -2
- package/dist/node/tile/tile.module.js +0 -2
- package/dist/node/time-picker/time-picker.js +9 -9
- package/dist/node/time-picker/time-picker.module.js +5 -7
- package/dist/node/timeline/timeline.js +46 -38
- package/dist/node/timeline/timeline.module.js +7 -9
- package/dist/node/toast/toast.js +15 -15
- package/dist/node/toast/toast.module.js +0 -2
- package/dist/node/toc/toc.js +7 -7
- package/dist/node/toc/toc.module.js +0 -2
- package/dist/node/toggle/toggle.js +7 -7
- package/dist/node/toggle/toggle.module.js +0 -2
- package/dist/node/toggle-group/toggle-group.js +25 -25
- package/dist/node/toggle-group/toggle-group.module.js +0 -2
- package/dist/node/toggletip/toggletip.js +7 -7
- package/dist/node/toggletip/toggletip.module.js +0 -2
- package/dist/node/tooltip/tooltip.js +9 -9
- package/dist/node/tooltip/tooltip.module.js +0 -2
- package/dist/node/tree-view/tree-view.js +47 -47
- package/dist/node/tree-view/tree-view.module.js +0 -2
- package/dist/node/user/user.js +1 -3
- package/dist/node/user/user.module.js +0 -2
- package/dist/node/visually-hidden/visually-hidden.js +1 -3
- package/dist/notification/notification.js +6 -6
- package/dist/notification/notification.module.js +0 -2
- package/dist/number-input/number-input.js +7 -7
- package/dist/number-input/number-input.module.js +0 -2
- package/dist/otp-input/otp-input.js +5 -5
- package/dist/otp-input/otp-input.module.js +0 -2
- package/dist/overflow-menu/overflow-menu.module.js +0 -2
- package/dist/pagination/pagination.module.js +0 -2
- package/dist/password-input/password-input.js +8 -8
- package/dist/password-input/password-input.module.js +0 -2
- package/dist/popover/popover.js +12 -12
- package/dist/popover/popover.module.js +0 -2
- package/dist/popover/use-popover.js +8 -10
- package/dist/progress/progress.js +0 -2
- package/dist/progress/progress.module.js +0 -2
- package/dist/progress-bar/progress-bar.js +1 -3
- package/dist/progress-bar/progress-bar.module.js +0 -2
- package/dist/progress-circle/progress-circle.js +1 -3
- package/dist/progress-circle/progress-circle.module.js +0 -2
- package/dist/progress-indicator/progress-indicator.js +1 -3
- package/dist/progress-indicator/progress-indicator.module.js +0 -2
- package/dist/prose/prose.js +1 -3
- package/dist/prose/prose.module.js +0 -2
- package/dist/pull-to-refresh/pull-to-refresh.js +8 -8
- package/dist/pull-to-refresh/pull-to-refresh.module.js +0 -2
- package/dist/qr-code/encode.js +0 -2
- package/dist/qr-code/qr-code.module.js +0 -2
- package/dist/radial-progress/radial-progress.js +9 -10
- package/dist/radial-progress/radial-progress.module.js +0 -2
- package/dist/radio/radio.js +1 -3
- package/dist/radio/radio.module.js +0 -2
- package/dist/radio-card/radio-card.js +8 -8
- package/dist/radio-card/radio-card.module.js +0 -2
- package/dist/rating-group/rating-group.module.js +0 -2
- package/dist/react/src/index.js +0 -2
- package/dist/react/src/theme.js +10 -10
- package/dist/relative-time/relative-time.module.js +0 -2
- package/dist/resizable/resizable.js +7 -7
- package/dist/resizable/resizable.module.js +0 -2
- package/dist/scroll-area/scroll-area.js +6 -6
- package/dist/scroll-area/scroll-area.module.js +0 -2
- package/dist/search/search.js +9 -9
- package/dist/search/search.module.js +0 -2
- package/dist/segmented-control/segmented-control.module.js +0 -2
- package/dist/select/select.js +11 -11
- package/dist/select/select.module.js +0 -2
- package/dist/separator/separator.js +1 -3
- package/dist/separator/separator.module.js +0 -2
- package/dist/sheet/sheet.js +4 -4
- package/dist/sheet/sheet.module.js +0 -2
- package/dist/shell-header/shell-header.css +1 -1
- package/dist/shell-header/shell-header.js +21 -18
- package/dist/shell-header/shell-header.module.js +20 -21
- package/dist/side-nav/side-nav.js +37 -37
- package/dist/side-nav/side-nav.module.js +0 -2
- package/dist/skeleton/skeleton.js +1 -3
- package/dist/skeleton/skeleton.module.js +0 -2
- package/dist/skip-nav/skip-nav.js +6 -6
- package/dist/skip-nav/skip-nav.module.js +0 -2
- package/dist/slider/slider.js +1 -3
- package/dist/slider/slider.module.js +0 -2
- package/dist/spinner/spinner.module.js +0 -2
- package/dist/stack/stack.js +0 -2
- package/dist/stack/stack.module.js +0 -2
- package/dist/stat/stat.css +1 -1
- package/dist/stat/stat.js +22 -23
- package/dist/stat/stat.module.js +7 -9
- package/dist/status/status.js +1 -3
- package/dist/status/status.module.js +0 -2
- package/dist/steps/steps.module.js +0 -2
- package/dist/storage/src/drivers.js +0 -2
- package/dist/storage/src/persisted-signal.js +0 -2
- package/dist/structured-list/structured-list.js +10 -10
- package/dist/structured-list/structured-list.module.js +0 -2
- package/dist/styles.css +15 -15
- package/dist/swap/swap.js +10 -11
- package/dist/swap/swap.module.js +0 -2
- package/dist/swipe-item/swipe-item.module.js +0 -2
- package/dist/switcher/switcher.module.js +0 -2
- package/dist/tabs/tabs.js +38 -38
- package/dist/tabs/tabs.module.js +0 -2
- package/dist/tag/tag.module.js +0 -2
- package/dist/tags-input/tags-input.css +1 -1
- package/dist/tags-input/tags-input.js +6 -6
- package/dist/tags-input/tags-input.module.js +4 -6
- package/dist/text/text.js +1 -3
- package/dist/text/text.module.js +0 -2
- package/dist/textarea/textarea.js +11 -11
- package/dist/textarea/textarea.module.js +0 -2
- package/dist/tile/tile.module.js +0 -2
- package/dist/time-picker/time-picker.css +1 -1
- package/dist/time-picker/time-picker.js +9 -9
- package/dist/time-picker/time-picker.module.js +5 -7
- package/dist/timeline/timeline.css +1 -1
- package/dist/timeline/timeline.js +46 -38
- package/dist/timeline/timeline.module.js +7 -9
- package/dist/toast/toast.js +15 -15
- package/dist/toast/toast.module.js +0 -2
- package/dist/toc/toc.js +7 -7
- package/dist/toc/toc.module.js +0 -2
- package/dist/toggle/toggle.js +7 -7
- package/dist/toggle/toggle.module.js +0 -2
- package/dist/toggle-group/toggle-group.js +25 -25
- package/dist/toggle-group/toggle-group.module.js +0 -2
- package/dist/toggletip/toggletip.js +7 -7
- package/dist/toggletip/toggletip.module.js +0 -2
- package/dist/tooltip/tooltip.js +9 -9
- package/dist/tooltip/tooltip.module.js +0 -2
- package/dist/tree-view/tree-view.js +47 -47
- package/dist/tree-view/tree-view.module.js +0 -2
- package/dist/user/user.js +1 -3
- package/dist/user/user.module.js +0 -2
- package/dist/visually-hidden/visually-hidden.js +1 -3
- package/package.json +4 -4
- package/readme.body.md +2 -2
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
import { Spinner as e } from "../spinner/spinner.js";
|
|
4
4
|
import { Kbd as t } from "../kbd/kbd.js";
|
|
5
5
|
import n from "./command-menu.module.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { builtin as
|
|
9
|
-
import { jsx as
|
|
6
|
+
import { useId as r, useRef as i } from "react";
|
|
7
|
+
import { batch as a, cn as o, focusElement as s, useEffectPropSignal as c, useSignal as l, useSignalEffect as u, useSignals as ee } from "@cascivo/core";
|
|
8
|
+
import { builtin as d, t as f } from "@cascivo/i18n";
|
|
9
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
10
10
|
//#region ../components/src/command-menu/command-menu.tsx
|
|
11
|
-
function
|
|
11
|
+
function h(e, t) {
|
|
12
12
|
if (e.length === 0) return {
|
|
13
13
|
score: 1,
|
|
14
14
|
indices: []
|
|
@@ -25,21 +25,21 @@ function m(e, t) {
|
|
|
25
25
|
indices: s
|
|
26
26
|
} : null;
|
|
27
27
|
}
|
|
28
|
-
function h(e, t) {
|
|
29
|
-
return m(e, t)?.score ?? 0;
|
|
30
|
-
}
|
|
31
28
|
function g(e, t) {
|
|
32
|
-
|
|
29
|
+
return h(e, t)?.score ?? 0;
|
|
30
|
+
}
|
|
31
|
+
function _(e, t) {
|
|
32
|
+
let n = g(e, t.label);
|
|
33
33
|
for (let r of t.keywords ?? []) {
|
|
34
|
-
let t =
|
|
34
|
+
let t = g(e, r);
|
|
35
35
|
t > n && (n = t);
|
|
36
36
|
}
|
|
37
37
|
return n;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function v(e, t) {
|
|
40
40
|
if (t.length === 0) return e;
|
|
41
41
|
let r = new Set(t), i = [], a = "", o = r.has(0), s = (e) => {
|
|
42
|
-
a !== "" && (i.push(o ? /* @__PURE__ */
|
|
42
|
+
a !== "" && (i.push(o ? /* @__PURE__ */ p("mark", {
|
|
43
43
|
className: n.match,
|
|
44
44
|
children: a
|
|
45
45
|
}, e) : a), a = "");
|
|
@@ -50,7 +50,7 @@ function _(e, t) {
|
|
|
50
50
|
}
|
|
51
51
|
return s(e.length), i;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function y(e, t) {
|
|
54
54
|
for (let n of t) {
|
|
55
55
|
let t = n.prefix;
|
|
56
56
|
if (t) {
|
|
@@ -66,41 +66,41 @@ function v(e, t) {
|
|
|
66
66
|
}
|
|
67
67
|
return null;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function b({ open: g, onOpenChange: b, groups: te, placeholder: ne, emptyLabel: re, hotkey: x = !0, label: S, loading: C = !1, onQueryChange: w, scopes: T = [], className: ie }) {
|
|
70
70
|
ee();
|
|
71
|
-
let
|
|
72
|
-
M.current =
|
|
73
|
-
let N =
|
|
74
|
-
N.current =
|
|
75
|
-
let P =
|
|
71
|
+
let E = S ?? f(d.commandMenu.label), ae = re ?? f(d.commandMenu.empty), D = r(), O = `${D}-listbox`, k = i(null), A = i(null), j = i([]), M = i(b);
|
|
72
|
+
M.current = b;
|
|
73
|
+
let N = i(w);
|
|
74
|
+
N.current = w;
|
|
75
|
+
let P = c(g), F = c(x), I = l(""), L = l(0), R = l([]), z = l(null), B = R.value.at(-1)?.groups ?? te, oe = ne ?? R.value.at(-1)?.placeholder ?? f(d.commandMenu.placeholder), V = T.find((e) => e.id === z.value) ?? null, H = B.filter((e) => !z.value || !e.scope || e.scope === z.value).map((e) => ({
|
|
76
76
|
heading: e.heading,
|
|
77
77
|
items: e.items.map((e) => ({
|
|
78
78
|
item: e,
|
|
79
|
-
score:
|
|
79
|
+
score: _(I.value, e)
|
|
80
80
|
})).filter(({ score: e }) => e > 0).sort((e, t) => t.score - e.score).map(({ item: e }) => ({
|
|
81
81
|
item: e,
|
|
82
|
-
indices:
|
|
82
|
+
indices: h(I.value, e.label)?.indices ?? []
|
|
83
83
|
}))
|
|
84
|
-
})).filter((e) => e.items.length > 0), U = H.flatMap((e) => e.items.map((e) => e.item)), W = U.flatMap((e, t) => e.disabled ? [] : [t]), G = W.includes(
|
|
85
|
-
|
|
84
|
+
})).filter((e) => e.items.length > 0), U = H.flatMap((e) => e.items.map((e) => e.item)), W = U.flatMap((e, t) => e.disabled ? [] : [t]), G = W.includes(L.value) ? L.value : W[0] ?? -1, K = (e) => `${D}-option-${e}`;
|
|
85
|
+
u(() => {
|
|
86
86
|
let e = k.current;
|
|
87
|
-
e && (P.value ? e.open || (
|
|
88
|
-
|
|
89
|
-
}), typeof e.showModal == "function" && e.showModal(),
|
|
90
|
-
}),
|
|
87
|
+
e && (P.value ? e.open || (a(() => {
|
|
88
|
+
I.value = "", L.value = 0, R.value = [], z.value = null;
|
|
89
|
+
}), typeof e.showModal == "function" && e.showModal(), s(A.current)) : e.open && (R.value = [], e.close()));
|
|
90
|
+
}), u(() => {
|
|
91
91
|
let e = k.current;
|
|
92
92
|
if (!e) return;
|
|
93
93
|
let t = () => M.current(!1);
|
|
94
94
|
return e.addEventListener("close", t), () => e.removeEventListener("close", t);
|
|
95
|
-
}),
|
|
96
|
-
if (!
|
|
95
|
+
}), u(() => {
|
|
96
|
+
if (!F.value) return;
|
|
97
97
|
let e = (e) => {
|
|
98
98
|
(e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k" && (e.preventDefault(), M.current(!P.value));
|
|
99
99
|
};
|
|
100
100
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
101
101
|
});
|
|
102
102
|
let q = (e) => {
|
|
103
|
-
|
|
103
|
+
L.value = e;
|
|
104
104
|
let t = j.current[e];
|
|
105
105
|
t && typeof t.scrollIntoView == "function" && t.scrollIntoView({ block: "nearest" });
|
|
106
106
|
}, J = (e) => {
|
|
@@ -108,13 +108,13 @@ function y({ open: h, onOpenChange: y, groups: ne, placeholder: re, emptyLabel:
|
|
|
108
108
|
let t = W[(W.indexOf(G) + e + W.length) % W.length];
|
|
109
109
|
t !== void 0 && q(t);
|
|
110
110
|
}, Y = (e) => {
|
|
111
|
-
e.onSelect(),
|
|
111
|
+
e.onSelect(), b(!1);
|
|
112
112
|
}, X = (e, t) => {
|
|
113
113
|
if (!(!e || e.disabled)) {
|
|
114
114
|
if (e.page) {
|
|
115
115
|
if (t === "secondary") return;
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
a(() => {
|
|
117
|
+
R.value = [...R.value, e.page], I.value = "", L.value = 0;
|
|
118
118
|
});
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
@@ -123,21 +123,21 @@ function y({ open: h, onOpenChange: y, groups: ne, placeholder: re, emptyLabel:
|
|
|
123
123
|
n && Y(n);
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
|
-
t !== "secondary" && (e.onSelect?.(),
|
|
126
|
+
t !== "secondary" && (e.onSelect?.(), b(!1));
|
|
127
127
|
}
|
|
128
128
|
}, se = (e) => {
|
|
129
|
-
if (
|
|
130
|
-
let t = [null, ...
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
if (T.length === 0) return;
|
|
130
|
+
let t = [null, ...T.map((e) => e.id)], n = t[(t.indexOf(z.value) + e + t.length) % t.length];
|
|
131
|
+
a(() => {
|
|
132
|
+
z.value = n ?? null, L.value = 0;
|
|
133
133
|
});
|
|
134
134
|
}, Z = () => {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}),
|
|
135
|
+
a(() => {
|
|
136
|
+
z.value = null, L.value = 0;
|
|
137
|
+
}), s(A.current);
|
|
138
138
|
}, Q = () => {
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
a(() => {
|
|
140
|
+
R.value = R.value.slice(0, -1), I.value = "", L.value = 0;
|
|
141
141
|
});
|
|
142
142
|
}, ce = (e) => {
|
|
143
143
|
switch (e.key) {
|
|
@@ -148,7 +148,7 @@ function y({ open: h, onOpenChange: y, groups: ne, placeholder: re, emptyLabel:
|
|
|
148
148
|
e.preventDefault(), J(-1);
|
|
149
149
|
break;
|
|
150
150
|
case "Tab":
|
|
151
|
-
|
|
151
|
+
T.length > 0 && (e.preventDefault(), se(e.shiftKey ? -1 : 1));
|
|
152
152
|
break;
|
|
153
153
|
case "Home":
|
|
154
154
|
e.preventDefault(), W[0] !== void 0 && q(W[0]);
|
|
@@ -163,27 +163,27 @@ function y({ open: h, onOpenChange: y, groups: ne, placeholder: re, emptyLabel:
|
|
|
163
163
|
e.preventDefault(), G >= 0 && X(U[G], e.metaKey || e.ctrlKey ? "secondary" : "primary");
|
|
164
164
|
break;
|
|
165
165
|
case "Backspace":
|
|
166
|
-
|
|
166
|
+
I.value === "" && (R.value.length > 0 ? (e.preventDefault(), Q()) : z.value && (e.preventDefault(), Z()));
|
|
167
167
|
break;
|
|
168
168
|
}
|
|
169
169
|
}, le = (e) => {
|
|
170
|
-
e.key === "Escape" && (e.preventDefault(),
|
|
170
|
+
e.key === "Escape" && (e.preventDefault(), R.value.length > 0 ? Q() : k.current?.close());
|
|
171
171
|
}, ue = (e) => {
|
|
172
172
|
e.target === k.current && k.current?.close();
|
|
173
173
|
}, $ = -1;
|
|
174
|
-
return /* @__PURE__ */
|
|
174
|
+
return /* @__PURE__ */ p("dialog", {
|
|
175
175
|
ref: k,
|
|
176
|
-
"aria-label":
|
|
177
|
-
className:
|
|
176
|
+
"aria-label": E,
|
|
177
|
+
className: o(n.dialog, ie),
|
|
178
178
|
onClick: ue,
|
|
179
179
|
onKeyDown: le,
|
|
180
|
-
children: /* @__PURE__ */
|
|
180
|
+
children: /* @__PURE__ */ m("div", {
|
|
181
181
|
className: n.panel,
|
|
182
182
|
children: [
|
|
183
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ m("div", {
|
|
184
184
|
className: n.search,
|
|
185
185
|
children: [
|
|
186
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ m("svg", {
|
|
187
187
|
className: n.searchIcon,
|
|
188
188
|
"aria-hidden": "true",
|
|
189
189
|
viewBox: "0 0 16 16",
|
|
@@ -193,30 +193,30 @@ function y({ open: h, onOpenChange: y, groups: ne, placeholder: re, emptyLabel:
|
|
|
193
193
|
stroke: "currentColor",
|
|
194
194
|
strokeWidth: "1.5",
|
|
195
195
|
strokeLinecap: "round",
|
|
196
|
-
children: [/* @__PURE__ */
|
|
196
|
+
children: [/* @__PURE__ */ p("circle", {
|
|
197
197
|
cx: "7",
|
|
198
198
|
cy: "7",
|
|
199
199
|
r: "4.5"
|
|
200
|
-
}), /* @__PURE__ */
|
|
200
|
+
}), /* @__PURE__ */ p("line", {
|
|
201
201
|
x1: "10.5",
|
|
202
202
|
y1: "10.5",
|
|
203
203
|
x2: "14",
|
|
204
204
|
y2: "14"
|
|
205
205
|
})]
|
|
206
206
|
}),
|
|
207
|
-
V && /* @__PURE__ */
|
|
207
|
+
V && /* @__PURE__ */ m("span", {
|
|
208
208
|
className: n.scopeChip,
|
|
209
|
-
children: [V.label, /* @__PURE__ */
|
|
209
|
+
children: [V.label, /* @__PURE__ */ p("button", {
|
|
210
210
|
type: "button",
|
|
211
211
|
className: n.scopeClear,
|
|
212
|
-
"aria-label": d
|
|
212
|
+
"aria-label": f(d.commandMenu.clearScope),
|
|
213
213
|
onClick: Z,
|
|
214
|
-
children: /* @__PURE__ */
|
|
214
|
+
children: /* @__PURE__ */ p("svg", {
|
|
215
215
|
viewBox: "0 0 16 16",
|
|
216
216
|
width: "12",
|
|
217
217
|
height: "12",
|
|
218
218
|
"aria-hidden": "true",
|
|
219
|
-
children: /* @__PURE__ */
|
|
219
|
+
children: /* @__PURE__ */ p("path", {
|
|
220
220
|
d: "M4 4l8 8M12 4l-8 8",
|
|
221
221
|
fill: "none",
|
|
222
222
|
stroke: "currentColor",
|
|
@@ -226,7 +226,7 @@ function y({ open: h, onOpenChange: y, groups: ne, placeholder: re, emptyLabel:
|
|
|
226
226
|
})
|
|
227
227
|
})]
|
|
228
228
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ p("input", {
|
|
230
230
|
ref: A,
|
|
231
231
|
type: "text",
|
|
232
232
|
role: "combobox",
|
|
@@ -234,67 +234,67 @@ function y({ open: h, onOpenChange: y, groups: ne, placeholder: re, emptyLabel:
|
|
|
234
234
|
"aria-controls": O,
|
|
235
235
|
"aria-activedescendant": G >= 0 ? K(G) : void 0,
|
|
236
236
|
"aria-autocomplete": "list",
|
|
237
|
-
"aria-label":
|
|
237
|
+
"aria-label": E,
|
|
238
238
|
autoComplete: "off",
|
|
239
239
|
spellCheck: !1,
|
|
240
240
|
className: n.input,
|
|
241
|
-
placeholder:
|
|
242
|
-
value:
|
|
241
|
+
placeholder: oe,
|
|
242
|
+
value: I.value,
|
|
243
243
|
onChange: (e) => {
|
|
244
244
|
let t = e.target.value;
|
|
245
|
-
if (!
|
|
246
|
-
let e =
|
|
247
|
-
e && (
|
|
245
|
+
if (!z.value && T.length > 0) {
|
|
246
|
+
let e = y(t, T);
|
|
247
|
+
e && (z.value = e.scope.id, t = e.rest);
|
|
248
248
|
}
|
|
249
|
-
|
|
249
|
+
I.value = t, L.value = 0, N.current?.(t);
|
|
250
250
|
},
|
|
251
251
|
onKeyDown: ce
|
|
252
252
|
})
|
|
253
253
|
]
|
|
254
254
|
}),
|
|
255
|
-
|
|
255
|
+
T.length > 0 && /* @__PURE__ */ m("div", {
|
|
256
256
|
className: n.scopes,
|
|
257
|
-
children: [/* @__PURE__ */
|
|
257
|
+
children: [/* @__PURE__ */ p("span", {
|
|
258
258
|
className: n.scopesLabel,
|
|
259
|
-
children: d
|
|
260
|
-
}),
|
|
259
|
+
children: f(d.commandMenu.scopeLabel)
|
|
260
|
+
}), T.map((e) => /* @__PURE__ */ m("button", {
|
|
261
261
|
type: "button",
|
|
262
262
|
className: n.scopePill,
|
|
263
|
-
"data-active": e.id ===
|
|
263
|
+
"data-active": e.id === z.value || void 0,
|
|
264
264
|
onClick: () => {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
}),
|
|
265
|
+
a(() => {
|
|
266
|
+
z.value = z.value === e.id ? null : e.id, L.value = 0;
|
|
267
|
+
}), s(A.current);
|
|
268
268
|
},
|
|
269
|
-
children: [e.prefix && /* @__PURE__ */
|
|
269
|
+
children: [e.prefix && /* @__PURE__ */ p("span", {
|
|
270
270
|
className: n.scopePrefix,
|
|
271
271
|
children: e.prefix
|
|
272
272
|
}), e.label]
|
|
273
273
|
}, e.id))]
|
|
274
274
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ m("div", {
|
|
276
276
|
className: n.list,
|
|
277
|
-
children: [/* @__PURE__ */
|
|
277
|
+
children: [/* @__PURE__ */ p("div", {
|
|
278
278
|
role: "listbox",
|
|
279
279
|
id: O,
|
|
280
|
-
"aria-label":
|
|
280
|
+
"aria-label": S,
|
|
281
281
|
tabIndex: 0,
|
|
282
|
-
children: H.map((e, r) => /* @__PURE__ */
|
|
282
|
+
children: H.map((e, r) => /* @__PURE__ */ m("div", {
|
|
283
283
|
role: "group",
|
|
284
284
|
"aria-label": e.heading,
|
|
285
285
|
className: n.group,
|
|
286
|
-
children: [e.heading && /* @__PURE__ */
|
|
286
|
+
children: [e.heading && /* @__PURE__ */ m("div", {
|
|
287
287
|
className: n.heading,
|
|
288
288
|
"aria-hidden": "true",
|
|
289
|
-
children: [/* @__PURE__ */
|
|
289
|
+
children: [/* @__PURE__ */ p("span", { children: e.heading }), I.value !== "" && /* @__PURE__ */ p("span", {
|
|
290
290
|
className: n.count,
|
|
291
|
-
children: d
|
|
291
|
+
children: f(d.commandMenu.matches, { count: e.items.length })
|
|
292
292
|
})]
|
|
293
293
|
}), e.items.map((e) => {
|
|
294
294
|
let { item: r, indices: i } = e;
|
|
295
295
|
$++;
|
|
296
296
|
let a = $;
|
|
297
|
-
return /* @__PURE__ */
|
|
297
|
+
return /* @__PURE__ */ m("div", {
|
|
298
298
|
ref: (e) => {
|
|
299
299
|
j.current[a] = e;
|
|
300
300
|
},
|
|
@@ -306,54 +306,54 @@ function y({ open: h, onOpenChange: y, groups: ne, placeholder: re, emptyLabel:
|
|
|
306
306
|
"data-disabled": r.disabled || void 0,
|
|
307
307
|
className: n.option,
|
|
308
308
|
onMouseEnter: () => {
|
|
309
|
-
r.disabled || (
|
|
309
|
+
r.disabled || (L.value = a);
|
|
310
310
|
},
|
|
311
311
|
onClick: () => X(r, "primary"),
|
|
312
312
|
children: [
|
|
313
|
-
r.icon && /* @__PURE__ */
|
|
313
|
+
r.icon && /* @__PURE__ */ p("span", {
|
|
314
314
|
className: n.icon,
|
|
315
315
|
"aria-hidden": "true",
|
|
316
316
|
children: r.icon
|
|
317
317
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ m("span", {
|
|
319
319
|
className: n.text,
|
|
320
|
-
children: [/* @__PURE__ */
|
|
320
|
+
children: [/* @__PURE__ */ p("span", {
|
|
321
321
|
className: n.label,
|
|
322
|
-
children:
|
|
323
|
-
}), r.description && /* @__PURE__ */
|
|
322
|
+
children: v(r.label, i)
|
|
323
|
+
}), r.description && /* @__PURE__ */ p("span", {
|
|
324
324
|
className: n.description,
|
|
325
325
|
children: r.description
|
|
326
326
|
})]
|
|
327
327
|
}),
|
|
328
|
-
r.status && /* @__PURE__ */
|
|
328
|
+
r.status && /* @__PURE__ */ m("span", {
|
|
329
329
|
className: n.status,
|
|
330
330
|
"data-tone": r.status.tone ?? "neutral",
|
|
331
|
-
children: [/* @__PURE__ */
|
|
331
|
+
children: [/* @__PURE__ */ p("span", {
|
|
332
332
|
className: n.statusDot,
|
|
333
333
|
"aria-hidden": "true"
|
|
334
334
|
}), r.status.label]
|
|
335
335
|
}),
|
|
336
|
-
r.actions && r.actions.length > 0 && /* @__PURE__ */
|
|
336
|
+
r.actions && r.actions.length > 0 && /* @__PURE__ */ p("span", {
|
|
337
337
|
className: n.actions,
|
|
338
|
-
children: r.actions.map((e) => /* @__PURE__ */
|
|
338
|
+
children: r.actions.map((e) => /* @__PURE__ */ m("span", {
|
|
339
339
|
className: n.action,
|
|
340
340
|
onClick: (t) => {
|
|
341
341
|
t.stopPropagation(), Y(e);
|
|
342
342
|
},
|
|
343
|
-
children: [e.label, e.shortcut && /* @__PURE__ */
|
|
343
|
+
children: [e.label, e.shortcut && /* @__PURE__ */ p("span", {
|
|
344
344
|
className: n.actionKeys,
|
|
345
345
|
"aria-hidden": "true",
|
|
346
|
-
children: e.shortcut.map((e, n) => /* @__PURE__ */
|
|
346
|
+
children: e.shortcut.map((e, n) => /* @__PURE__ */ p(t, {
|
|
347
347
|
size: "sm",
|
|
348
348
|
children: e
|
|
349
349
|
}, n))
|
|
350
350
|
})]
|
|
351
351
|
}, e.id))
|
|
352
352
|
}),
|
|
353
|
-
r.shortcut && /* @__PURE__ */
|
|
353
|
+
r.shortcut && /* @__PURE__ */ p("span", {
|
|
354
354
|
className: n.shortcut,
|
|
355
355
|
"aria-hidden": "true",
|
|
356
|
-
children: r.shortcut.map((e, n) => /* @__PURE__ */
|
|
356
|
+
children: r.shortcut.map((e, n) => /* @__PURE__ */ p(t, {
|
|
357
357
|
size: "sm",
|
|
358
358
|
children: e
|
|
359
359
|
}, n))
|
|
@@ -362,51 +362,51 @@ function y({ open: h, onOpenChange: y, groups: ne, placeholder: re, emptyLabel:
|
|
|
362
362
|
}, r.id);
|
|
363
363
|
})]
|
|
364
364
|
}, e.heading ?? `group-${r}`))
|
|
365
|
-
}), U.length === 0 && (
|
|
365
|
+
}), U.length === 0 && (C ? /* @__PURE__ */ m("div", {
|
|
366
366
|
role: "status",
|
|
367
367
|
className: n.empty,
|
|
368
|
-
children: [/* @__PURE__ */
|
|
369
|
-
}) : /* @__PURE__ */
|
|
368
|
+
children: [/* @__PURE__ */ p(e, { size: "sm" }), f(d.commandMenu.loading)]
|
|
369
|
+
}) : /* @__PURE__ */ p("div", {
|
|
370
370
|
role: "status",
|
|
371
371
|
className: n.empty,
|
|
372
|
-
children:
|
|
372
|
+
children: ae
|
|
373
373
|
}))]
|
|
374
374
|
}),
|
|
375
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ m("div", {
|
|
376
376
|
className: n.footer,
|
|
377
377
|
"aria-hidden": "true",
|
|
378
378
|
children: [
|
|
379
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ m("span", {
|
|
380
380
|
className: n.hint,
|
|
381
381
|
children: [
|
|
382
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ p(t, {
|
|
383
383
|
size: "sm",
|
|
384
384
|
children: "↑"
|
|
385
385
|
}),
|
|
386
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ p(t, {
|
|
387
387
|
size: "sm",
|
|
388
388
|
children: "↓"
|
|
389
389
|
}),
|
|
390
390
|
" navigate"
|
|
391
391
|
]
|
|
392
392
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ m("span", {
|
|
394
394
|
className: n.hint,
|
|
395
|
-
children: [/* @__PURE__ */
|
|
395
|
+
children: [/* @__PURE__ */ p(t, {
|
|
396
396
|
size: "sm",
|
|
397
397
|
children: "↵"
|
|
398
398
|
}), " open"]
|
|
399
399
|
}),
|
|
400
|
-
|
|
400
|
+
T.length > 0 && /* @__PURE__ */ m("span", {
|
|
401
401
|
className: n.hint,
|
|
402
|
-
children: [/* @__PURE__ */
|
|
402
|
+
children: [/* @__PURE__ */ p(t, {
|
|
403
403
|
size: "sm",
|
|
404
404
|
children: "Tab"
|
|
405
405
|
}), " scope"]
|
|
406
406
|
}),
|
|
407
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ m("span", {
|
|
408
408
|
className: n.hint,
|
|
409
|
-
children: [/* @__PURE__ */
|
|
409
|
+
children: [/* @__PURE__ */ p(t, {
|
|
410
410
|
size: "sm",
|
|
411
411
|
children: "esc"
|
|
412
412
|
}), " close"]
|
|
@@ -418,4 +418,4 @@ function y({ open: h, onOpenChange: y, groups: ne, placeholder: re, emptyLabel:
|
|
|
418
418
|
});
|
|
419
419
|
}
|
|
420
420
|
//#endregion
|
|
421
|
-
export {
|
|
421
|
+
export { b as CommandMenu, h as fuzzyMatch, g as fuzzyScore };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./comparison.module.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useRef as t } from "react";
|
|
5
|
+
import { cn as n, useControllableSignal as r, useSignal as i, useSignals as a } from "@cascivo/core";
|
|
6
6
|
import { builtin as o, t as s } from "@cascivo/i18n";
|
|
7
7
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
8
|
//#region ../components/src/comparison/comparison.tsx
|
|
9
9
|
var u = (e) => Math.min(100, Math.max(0, e));
|
|
10
10
|
function d({ after: d, before: f, position: p, defaultPosition: m = 50, onPositionChange: h, orientation: g = "horizontal", keyboardStep: _ = 5, label: v, className: y, ...b }) {
|
|
11
|
-
|
|
12
|
-
let x =
|
|
11
|
+
a();
|
|
12
|
+
let x = t(null), S = i(!1), [C, w] = r({
|
|
13
13
|
value: p,
|
|
14
14
|
defaultValue: m,
|
|
15
15
|
onChange: h
|
|
@@ -26,7 +26,7 @@ function d({ after: d, before: f, position: p, defaultPosition: m = 50, onPositi
|
|
|
26
26
|
ref: x,
|
|
27
27
|
"data-orientation": g,
|
|
28
28
|
"data-dragging": S.value || void 0,
|
|
29
|
-
className:
|
|
29
|
+
className: n(e.comparison, y),
|
|
30
30
|
style: { "--position": `${T}%` },
|
|
31
31
|
onPointerDown: (e) => {
|
|
32
32
|
S.value = !0, e.currentTarget.setPointerCapture?.(e.pointerId), E(e);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./context-menu.module.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useRef as t } from "react";
|
|
5
|
+
import { useSignal as n, useSignalEffect as r, useSignals as i } from "@cascivo/core";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
//#region ../components/src/context-menu/context-menu.tsx
|
|
8
8
|
function s({ children: s }) {
|
|
9
|
-
|
|
10
|
-
let c =
|
|
9
|
+
i();
|
|
10
|
+
let c = t(null), l = t(null), u = n(!1), d = () => {
|
|
11
11
|
let e = c.current;
|
|
12
12
|
return e ? Array.from(e.querySelectorAll("[role=\"menuitem\"]:not([aria-disabled=\"true\"])")) : [];
|
|
13
13
|
}, f = (e) => {
|
|
@@ -29,7 +29,7 @@ function s({ children: s }) {
|
|
|
29
29
|
break;
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
|
|
32
|
+
r(() => {
|
|
33
33
|
let e = c.current;
|
|
34
34
|
if (e) if (u.value) {
|
|
35
35
|
try {
|
|
@@ -39,7 +39,7 @@ function s({ children: s }) {
|
|
|
39
39
|
} else try {
|
|
40
40
|
e.hidePopover();
|
|
41
41
|
} catch {}
|
|
42
|
-
}),
|
|
42
|
+
}), r(() => {
|
|
43
43
|
let e = c.current;
|
|
44
44
|
if (!e) return;
|
|
45
45
|
let t = (e) => {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./copy-button.module.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { forwardRef as t } from "react";
|
|
5
|
+
import { cn as n, useSignal as r, useSignals as i } from "@cascivo/core";
|
|
6
6
|
import { builtin as a, t as o } from "@cascivo/i18n";
|
|
7
7
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
8
|
//#region ../components/src/copy-button/copy-button.tsx
|
|
9
|
-
var l =
|
|
10
|
-
|
|
11
|
-
let m =
|
|
9
|
+
var l = t(function({ value: t, size: l = "md", labels: u, className: d, ...f }, p) {
|
|
10
|
+
i();
|
|
11
|
+
let m = r(!1), h = u?.copy ?? o(a.copyButton.copy), g = u?.copied ?? o(a.copyButton.copied);
|
|
12
12
|
return /* @__PURE__ */ s("button", {
|
|
13
13
|
type: "button",
|
|
14
14
|
"aria-label": m.value ? g : h,
|
|
15
15
|
"data-state": m.value ? "copied" : "idle",
|
|
16
16
|
"data-size": l,
|
|
17
|
-
className:
|
|
17
|
+
className: n(e.copyButton, d),
|
|
18
18
|
onClick: () => {
|
|
19
|
-
navigator.clipboard.writeText(
|
|
19
|
+
navigator.clipboard.writeText(t), m.value = !0, setTimeout(() => {
|
|
20
20
|
m.value = !1;
|
|
21
21
|
}, 2e3);
|
|
22
22
|
},
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
1
|
import e from "./data-list.module.js";
|
|
4
|
-
import { cn as t } from "@cascivo/core";
|
|
2
|
+
import { cn as t } from "@cascivo/core/pure";
|
|
5
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
6
4
|
//#region ../components/src/data-list/data-list.tsx
|
|
7
5
|
function i({ items: i, orientation: a = "horizontal", dividers: o = !1, size: s = "md", className: c, ...l }) {
|