@cascivo/react 0.14.0 → 0.16.1
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 +8 -3
- 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 +2 -4
- 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 +42 -38
- 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 +353 -163
- package/dist/index.js +0 -1
- package/dist/indicator/indicator.js +0 -2
- package/dist/indicator/indicator.module.js +0 -2
- package/dist/infinite-scroll/infinite-scroll.css +1 -0
- package/dist/infinite-scroll/infinite-scroll.js +49 -0
- package/dist/infinite-scroll/infinite-scroll.module.js +8 -0
- 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/large-title-header/large-title-header.css +1 -0
- package/dist/large-title-header/large-title-header.js +38 -0
- package/dist/large-title-header/large-title-header.module.js +13 -0
- 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.css +1 -1
- package/dist/link/link.js +1 -3
- package/dist/link/link.module.js +1 -3
- 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 +52 -47
- 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 +2 -4
- 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 +42 -38
- 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/infinite-scroll/infinite-scroll.js +49 -0
- package/dist/node/infinite-scroll/infinite-scroll.module.js +7 -0
- 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/large-title-header/large-title-header.js +38 -0
- package/dist/node/large-title-header/large-title-header.module.js +12 -0
- 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 +1 -3
- 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 +52 -47
- 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 +27 -25
- package/dist/node/relative-time/relative-time.module.js +0 -2
- package/dist/node/reorder-list/reorder-list.js +143 -0
- package/dist/node/reorder-list/reorder-list.module.js +11 -0
- 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.module.js +0 -2
- 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 +7 -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/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 +51 -51
- package/dist/node/tabs/tabs.module.js +0 -2
- package/dist/node/tag/tag.module.js +2 -4
- 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 +32 -31
- 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/virtual-list/virtual-list.js +40 -0
- package/dist/node/virtual-list/virtual-list.module.js +7 -0
- package/dist/node/visually-hidden/visually-hidden.js +1 -3
- package/dist/node/wheel-picker/wheel-picker.js +84 -0
- package/dist/node/wheel-picker/wheel-picker.module.js +8 -0
- 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 +27 -25
- package/dist/relative-time/relative-time.module.js +0 -2
- package/dist/reorder-list/reorder-list.css +1 -0
- package/dist/reorder-list/reorder-list.js +143 -0
- package/dist/reorder-list/reorder-list.module.js +12 -0
- 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.module.js +0 -2
- 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 +7 -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/structured-list/structured-list.js +10 -10
- package/dist/structured-list/structured-list.module.js +0 -2
- package/dist/styles.css +55 -18
- 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 +51 -51
- package/dist/tabs/tabs.module.js +0 -2
- package/dist/tag/tag.css +1 -1
- package/dist/tag/tag.module.js +2 -4
- 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 +32 -31
- 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/virtual-list/virtual-list.css +1 -0
- package/dist/virtual-list/virtual-list.js +40 -0
- package/dist/virtual-list/virtual-list.module.js +8 -0
- package/dist/visually-hidden/visually-hidden.js +1 -3
- package/dist/wheel-picker/wheel-picker.css +1 -0
- package/dist/wheel-picker/wheel-picker.js +84 -0
- package/dist/wheel-picker/wheel-picker.module.js +9 -0
- package/package.json +4 -4
- package/readme.body.md +8 -3
- package/dist/node/react/src/theme.js +0 -78
- package/dist/node/storage/src/drivers.js +0 -36
- package/dist/node/storage/src/persisted-signal.js +0 -43
- package/dist/react/src/theme.js +0 -78
- package/dist/storage/src/drivers.js +0 -36
- package/dist/storage/src/persisted-signal.js +0 -43
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
1
|
import e from "./page-header.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 ../layouts/src/page-header/page-header.tsx
|
|
7
5
|
function i({ title: i, description: a, breadcrumb: o, actions: s, className: c }) {
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
1
|
var e = {
|
|
4
|
-
header: "
|
|
5
|
-
breadcrumb: "
|
|
6
|
-
row: "
|
|
7
|
-
title: "
|
|
8
|
-
actions: "
|
|
9
|
-
description: "
|
|
2
|
+
header: "_header_18phh_2",
|
|
3
|
+
breadcrumb: "_breadcrumb_18phh_8",
|
|
4
|
+
row: "_row_18phh_12",
|
|
5
|
+
title: "_title_18phh_20",
|
|
6
|
+
actions: "_actions_18phh_28",
|
|
7
|
+
description: "_description_18phh_35"
|
|
10
8
|
};
|
|
11
9
|
//#endregion
|
|
12
10
|
export { e as default };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
1
|
import e from "./spacer.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 } from "react/jsx-runtime";
|
|
6
4
|
//#region ../layouts/src/spacer/spacer.tsx
|
|
7
5
|
function r({ size: r = 4, className: i, style: a, ...o }) {
|
package/dist/node/link/link.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
1
|
import e from "./link.module.js";
|
|
4
|
-
import { Slot as t, cn as n } from "@cascivo/core";
|
|
2
|
+
import { Slot as t, cn as n } from "@cascivo/core/pure";
|
|
5
3
|
import { forwardRef as r } from "react";
|
|
6
4
|
import { jsx as i } from "react/jsx-runtime";
|
|
7
5
|
//#region ../components/src/link/link.tsx
|
package/dist/node/list/list.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
1
|
import e from "./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 } from "react/jsx-runtime";
|
|
6
4
|
//#region ../components/src/list/list.tsx
|
|
7
5
|
function r({ as: r = "ul", marker: i, className: a, children: o, ...s }) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./log-viewer.module.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Fragment as t } from "react";
|
|
5
|
+
import { VisuallyHidden as n, cn as r, useClipboard as i, useComputed as a, useControllableSignal as o, useResizeObserver as s, useSignal as c, useSignalEffect as l, useSignals as u } from "@cascivo/core";
|
|
6
6
|
import { builtin as d, t as f } from "@cascivo/i18n";
|
|
7
7
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
8
8
|
//#region ../components/src/log-viewer/log-viewer.tsx
|
|
@@ -64,7 +64,7 @@ function v(t, n, r) {
|
|
|
64
64
|
}, i));
|
|
65
65
|
}
|
|
66
66
|
function y({ lines: h, rowHeight: g = 20, overscan: _ = 8, follow: y, onFollowChange: b, ansi: x = !1, search: S, maxHeight: C = "24rem", labels: w, className: T, ...E }) {
|
|
67
|
-
|
|
67
|
+
u();
|
|
68
68
|
let D = {
|
|
69
69
|
searchPlaceholder: w?.searchPlaceholder ?? f(d.logViewer.search),
|
|
70
70
|
follow: w?.follow ?? f(d.logViewer.follow),
|
|
@@ -73,13 +73,13 @@ function y({ lines: h, rowHeight: g = 20, overscan: _ = 8, follow: y, onFollowCh
|
|
|
73
73
|
copied: w?.copied ?? f(d.logViewer.copied),
|
|
74
74
|
empty: w?.empty ?? f(d.logViewer.empty),
|
|
75
75
|
label: f(d.logViewer.label)
|
|
76
|
-
}, O =
|
|
76
|
+
}, O = c(Array.isArray(h) ? h : []);
|
|
77
77
|
Array.isArray(h) && (O.value = h);
|
|
78
|
-
let k = Array.isArray(h) ? O : h, { ref: A, size: j } =
|
|
78
|
+
let k = Array.isArray(h) ? O : h, { ref: A, size: j } = s(), M = c(0), [N, P] = o({
|
|
79
79
|
value: y,
|
|
80
80
|
defaultValue: !0,
|
|
81
81
|
onChange: b
|
|
82
|
-
}), F =
|
|
82
|
+
}), F = c(S ?? ""), { copied: I, copy: L } = i(), R = a(() => {
|
|
83
83
|
let e = k.value, t = e.length, n = j.value?.height ?? 320, r = Math.max(0, t * g - n), i = N.value ? r : M.value, a = Math.floor(i / g), o = Math.ceil(n / g) + _ * 2, s = Math.max(0, a - _), c = Math.min(t, s + o);
|
|
84
84
|
return {
|
|
85
85
|
total: t,
|
|
@@ -87,14 +87,14 @@ function y({ lines: h, rowHeight: g = 20, overscan: _ = 8, follow: y, onFollowCh
|
|
|
87
87
|
end: c,
|
|
88
88
|
rows: e.slice(s, c)
|
|
89
89
|
};
|
|
90
|
-
}), z =
|
|
90
|
+
}), z = a(() => {
|
|
91
91
|
let e = F.value.trim().toLowerCase();
|
|
92
92
|
if (!e) return 0;
|
|
93
93
|
let t = 0;
|
|
94
94
|
for (let n of k.value) n.text.toLowerCase().includes(e) && t++;
|
|
95
95
|
return t;
|
|
96
96
|
});
|
|
97
|
-
|
|
97
|
+
l(() => {
|
|
98
98
|
if (k.value, !N.value) return;
|
|
99
99
|
let e = A.current;
|
|
100
100
|
e && (e.scrollTop = e.scrollHeight);
|
|
@@ -104,7 +104,7 @@ function y({ lines: h, rowHeight: g = 20, overscan: _ = 8, follow: y, onFollowCh
|
|
|
104
104
|
M.value = t.scrollTop, P(t.scrollHeight - t.clientHeight - t.scrollTop <= g);
|
|
105
105
|
}, V = R.value, H = F.value.trim();
|
|
106
106
|
return /* @__PURE__ */ m("div", {
|
|
107
|
-
className:
|
|
107
|
+
className: r(e.root, T),
|
|
108
108
|
...E,
|
|
109
109
|
children: [
|
|
110
110
|
/* @__PURE__ */ m("div", {
|
|
@@ -162,18 +162,18 @@ function y({ lines: h, rowHeight: g = 20, overscan: _ = 8, follow: y, onFollowCh
|
|
|
162
162
|
}) : /* @__PURE__ */ p("div", {
|
|
163
163
|
className: e.sizer,
|
|
164
164
|
style: { blockSize: V.total * g },
|
|
165
|
-
children: V.rows.map((
|
|
165
|
+
children: V.rows.map((n, r) => /* @__PURE__ */ p(t, { children: /* @__PURE__ */ p("div", {
|
|
166
166
|
className: e.line,
|
|
167
|
-
"data-level":
|
|
167
|
+
"data-level": n.level,
|
|
168
168
|
style: {
|
|
169
|
-
insetBlockStart: (V.start +
|
|
169
|
+
insetBlockStart: (V.start + r) * g,
|
|
170
170
|
blockSize: g
|
|
171
171
|
},
|
|
172
|
-
children: v(
|
|
173
|
-
}) },
|
|
172
|
+
children: v(n, x, H)
|
|
173
|
+
}) }, n.id))
|
|
174
174
|
})
|
|
175
175
|
}),
|
|
176
|
-
/* @__PURE__ */ p(
|
|
176
|
+
/* @__PURE__ */ p(n, {
|
|
177
177
|
"aria-live": "polite",
|
|
178
178
|
children: f(d.logViewer.lines, { count: V.total })
|
|
179
179
|
})
|
package/dist/node/menu/menu.js
CHANGED
|
@@ -2,32 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
import { usePopover as e } from "../popover/use-popover.js";
|
|
4
4
|
import t from "./menu.module.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { jsx as
|
|
5
|
+
import { Children as n, createContext as r, isValidElement as i } from "react";
|
|
6
|
+
import { useSignalEffect as a, useSignals as o, useTypeahead as s } from "@cascivo/core";
|
|
7
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
8
|
//#region ../components/src/menu/menu.tsx
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
let { popoverRef:
|
|
13
|
-
let e =
|
|
9
|
+
var u = r(null);
|
|
10
|
+
function d({ ctx: e, children: n }) {
|
|
11
|
+
o();
|
|
12
|
+
let { popoverRef: r, anchorName: i, isOpen: l } = e, u = () => {
|
|
13
|
+
let e = r.current;
|
|
14
14
|
return e ? Array.from(e.querySelectorAll("[role=\"menuitem\"]:not([aria-disabled=\"true\"])")) : [];
|
|
15
15
|
}, d = (e) => {
|
|
16
16
|
let t = u();
|
|
17
17
|
t.length !== 0 && t[e(t, t.indexOf(document.activeElement))]?.focus();
|
|
18
|
-
}, f =
|
|
18
|
+
}, f = s({ onMatch: (e) => {
|
|
19
19
|
u().find((t) => (t.textContent ?? "").trim().toLowerCase().startsWith(e))?.focus();
|
|
20
20
|
} });
|
|
21
|
-
return
|
|
21
|
+
return a(() => {
|
|
22
22
|
if (!l.value) return;
|
|
23
|
-
let e =
|
|
23
|
+
let e = r.current;
|
|
24
24
|
e && e.querySelector("[role=\"menuitem\"]:not([aria-disabled=\"true\"])")?.focus();
|
|
25
|
-
}), /* @__PURE__ */
|
|
26
|
-
ref:
|
|
25
|
+
}), /* @__PURE__ */ c("div", {
|
|
26
|
+
ref: r,
|
|
27
27
|
popover: "auto",
|
|
28
28
|
role: "menu",
|
|
29
29
|
"data-state": l.value ? "open" : "closed",
|
|
30
|
-
style: { positionAnchor:
|
|
30
|
+
style: { positionAnchor: i },
|
|
31
31
|
className: t.panel,
|
|
32
32
|
onKeyDown: (e) => {
|
|
33
33
|
switch (e.key) {
|
|
@@ -46,76 +46,81 @@ function l({ ctx: e, children: a }) {
|
|
|
46
46
|
default: f.onKeyDown(e);
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
children:
|
|
49
|
+
children: n
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
return /* @__PURE__ */
|
|
52
|
+
function f({ children: e }) {
|
|
53
|
+
return /* @__PURE__ */ c(u.Consumer, { children: (t) => {
|
|
54
54
|
if (!t) throw Error("MenuPanel must be inside <Menu>");
|
|
55
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ c(d, {
|
|
56
56
|
ctx: t,
|
|
57
57
|
children: e
|
|
58
58
|
});
|
|
59
59
|
} });
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
function p() {
|
|
62
|
+
return globalThis.process?.env?.NODE_ENV !== "production";
|
|
63
|
+
}
|
|
64
|
+
function m({ children: t }) {
|
|
65
|
+
let r = e(), a = n.toArray(t), o = a.find((e) => i(e) && e.type === g), s = a.filter((e) => e !== o);
|
|
66
|
+
if (o === void 0 && p()) throw Error("<Menu> requires a <MenuTrigger> child. It is matched by component identity, so it may appear in any order — but it must be a direct child, not wrapped in a fragment or another component.");
|
|
67
|
+
return /* @__PURE__ */ l(u.Provider, {
|
|
68
|
+
value: r,
|
|
69
|
+
children: [o, /* @__PURE__ */ c(f, { children: s })]
|
|
66
70
|
});
|
|
67
71
|
}
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
-
let { triggerRef: a, toggle: s, anchorName:
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
+
function h({ ctx: e, children: n, ariaLabel: r, "aria-label": i }) {
|
|
73
|
+
o();
|
|
74
|
+
let { triggerRef: a, toggle: s, anchorName: l, isOpen: u } = e;
|
|
75
|
+
return /* @__PURE__ */ c("button", {
|
|
72
76
|
ref: a,
|
|
73
77
|
type: "button",
|
|
74
78
|
"aria-haspopup": "menu",
|
|
75
|
-
"aria-expanded":
|
|
76
|
-
"aria-label": i,
|
|
77
|
-
style: { anchorName:
|
|
79
|
+
"aria-expanded": u.value,
|
|
80
|
+
"aria-label": r ?? i,
|
|
81
|
+
style: { anchorName: l },
|
|
78
82
|
onClick: s,
|
|
79
83
|
className: t.trigger,
|
|
80
84
|
children: n
|
|
81
85
|
});
|
|
82
86
|
}
|
|
83
|
-
function
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
function g({ children: e, ariaLabel: t, "aria-label": n }) {
|
|
88
|
+
let r = t ?? n;
|
|
89
|
+
return /* @__PURE__ */ c(u.Consumer, { children: (t) => {
|
|
90
|
+
if (!t) throw Error("MenuTrigger must be inside <Menu>");
|
|
91
|
+
return /* @__PURE__ */ c(h, {
|
|
92
|
+
ctx: t,
|
|
93
|
+
...r !== void 0 && { ariaLabel: r },
|
|
89
94
|
children: e
|
|
90
95
|
});
|
|
91
96
|
} });
|
|
92
97
|
}
|
|
93
|
-
function
|
|
94
|
-
return /* @__PURE__ */
|
|
98
|
+
function _({ children: e, onSelect: n, disabled: r }) {
|
|
99
|
+
return /* @__PURE__ */ c(u.Consumer, { children: (i) => {
|
|
95
100
|
if (!i) throw Error("MenuItem must be inside <Menu>");
|
|
96
101
|
let { close: a } = i;
|
|
97
|
-
function
|
|
102
|
+
function o() {
|
|
98
103
|
r || (n(), a());
|
|
99
104
|
}
|
|
100
|
-
function
|
|
101
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(),
|
|
105
|
+
function s(e) {
|
|
106
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), o());
|
|
102
107
|
}
|
|
103
|
-
return /* @__PURE__ */
|
|
108
|
+
return /* @__PURE__ */ c("div", {
|
|
104
109
|
role: "menuitem",
|
|
105
110
|
tabIndex: r ? -1 : 0,
|
|
106
111
|
"aria-disabled": r,
|
|
107
|
-
onClick:
|
|
108
|
-
onKeyDown:
|
|
112
|
+
onClick: o,
|
|
113
|
+
onKeyDown: s,
|
|
109
114
|
className: t.item,
|
|
110
115
|
children: e
|
|
111
116
|
});
|
|
112
117
|
} });
|
|
113
118
|
}
|
|
114
|
-
function
|
|
115
|
-
return /* @__PURE__ */
|
|
119
|
+
function v() {
|
|
120
|
+
return /* @__PURE__ */ c("div", {
|
|
116
121
|
role: "separator",
|
|
117
122
|
className: t.separator
|
|
118
123
|
});
|
|
119
124
|
}
|
|
120
125
|
//#endregion
|
|
121
|
-
export {
|
|
126
|
+
export { m as Menu, _ as MenuItem, v as MenuSeparator, g as MenuTrigger };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./menu-button.module.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useId as t, useRef as n } from "react";
|
|
5
|
+
import { DismissableLayer as r, cn as i, focusElement as a, useAnchorPosition as o, useSignal as s, useSignalEffect as c, useSignals as l } from "@cascivo/core";
|
|
6
6
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
7
7
|
//#region ../components/src/menu-button/menu-button.tsx
|
|
8
8
|
function f(e, t) {
|
|
@@ -11,21 +11,21 @@ function f(e, t) {
|
|
|
11
11
|
n[t < 0 ? n.length - 1 : t % n.length]?.focus();
|
|
12
12
|
}
|
|
13
13
|
function p({ label: p, items: m, variant: h = "secondary", size: g = "md", disabled: _ = !1, align: v = "start", labels: y, className: b }) {
|
|
14
|
-
|
|
15
|
-
let x =
|
|
14
|
+
l();
|
|
15
|
+
let x = s(!1), S = n(null), C = n(null), w = t(), { anchorStyle: T, floatingStyle: E } = o({
|
|
16
16
|
anchorRef: S,
|
|
17
17
|
floatingRef: C,
|
|
18
18
|
placement: v === "end" ? "bottom-end" : "bottom-start",
|
|
19
19
|
enabled: x
|
|
20
20
|
});
|
|
21
|
-
|
|
21
|
+
c(() => {
|
|
22
22
|
x.value && f(C.current, 0);
|
|
23
23
|
});
|
|
24
24
|
function D(e) {
|
|
25
25
|
_ || (x.value = !0, queueMicrotask(() => f(C.current, e)));
|
|
26
26
|
}
|
|
27
27
|
function O(e) {
|
|
28
|
-
x.value = !1, e &&
|
|
28
|
+
x.value = !1, e && a(S.current);
|
|
29
29
|
}
|
|
30
30
|
function k(e) {
|
|
31
31
|
e.key === "ArrowDown" || e.key === "Enter" || e.key === " " ? (e.preventDefault(), D(0)) : e.key === "ArrowUp" && (e.preventDefault(), D(-1));
|
|
@@ -45,7 +45,7 @@ function p({ label: p, items: m, variant: h = "secondary", size: g = "md", disab
|
|
|
45
45
|
e.disabled || (e.onSelect?.(), O(!0));
|
|
46
46
|
}
|
|
47
47
|
return /* @__PURE__ */ d("div", {
|
|
48
|
-
className:
|
|
48
|
+
className: i(e.root, b),
|
|
49
49
|
children: [/* @__PURE__ */ u("button", {
|
|
50
50
|
ref: S,
|
|
51
51
|
type: "button",
|
|
@@ -63,7 +63,7 @@ function p({ label: p, items: m, variant: h = "secondary", size: g = "md", disab
|
|
|
63
63
|
},
|
|
64
64
|
onKeyDown: k,
|
|
65
65
|
children: p
|
|
66
|
-
}), x.value ? /* @__PURE__ */ u(
|
|
66
|
+
}), x.value ? /* @__PURE__ */ u(r, {
|
|
67
67
|
onDismiss: () => O(!0),
|
|
68
68
|
children: /* @__PURE__ */ u("div", {
|
|
69
69
|
ref: C,
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./menubar.module.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useId as t, useRef as n } from "react";
|
|
5
|
+
import { DismissableLayer as r, Presence as i, cn as a, focusElement as o, useAnchorPosition as s, useRovingFocus as c, useSignal as l, useSignals as u } from "@cascivo/core";
|
|
6
6
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
7
|
//#region ../components/src/menubar/menubar.tsx
|
|
8
|
-
function m({ menus:
|
|
9
|
-
|
|
10
|
-
let
|
|
8
|
+
function m({ menus: n, ariaLabel: r, "aria-label": i, className: o }) {
|
|
9
|
+
u();
|
|
10
|
+
let s = t(), d = l(null), p = c({
|
|
11
11
|
orientation: "horizontal",
|
|
12
12
|
loop: !0
|
|
13
13
|
});
|
|
14
14
|
return /* @__PURE__ */ f("div", {
|
|
15
15
|
role: "menubar",
|
|
16
|
-
"aria-label":
|
|
17
|
-
className:
|
|
18
|
-
children:
|
|
16
|
+
"aria-label": r ?? i,
|
|
17
|
+
className: a(e.menubar, o),
|
|
18
|
+
children: n.map((e, t) => /* @__PURE__ */ f(h, {
|
|
19
19
|
menu: e,
|
|
20
20
|
index: t,
|
|
21
|
-
baseId:
|
|
22
|
-
openId:
|
|
23
|
-
itemProps:
|
|
21
|
+
baseId: s,
|
|
22
|
+
openId: d,
|
|
23
|
+
itemProps: p.getItemProps(t)
|
|
24
24
|
}, e.id))
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
function h({ menu: t, baseId: r, openId:
|
|
28
|
-
|
|
29
|
-
let l =
|
|
27
|
+
function h({ menu: t, baseId: r, openId: a, itemProps: c }) {
|
|
28
|
+
u();
|
|
29
|
+
let l = n(null), m = n(null), h = a.value === t.id, _ = `${r}-menu-${t.id}`, { anchorStyle: v, floatingStyle: y } = s({
|
|
30
30
|
anchorRef: l,
|
|
31
31
|
floatingRef: m,
|
|
32
32
|
placement: "bottom-start",
|
|
@@ -34,8 +34,8 @@ function h({ menu: t, baseId: r, openId: o, itemProps: s }) {
|
|
|
34
34
|
}), b = () => {
|
|
35
35
|
(m.current?.querySelector("[role=\"menuitem\"]:not([aria-disabled=\"true\"])"))?.focus();
|
|
36
36
|
}, x = (e) => {
|
|
37
|
-
|
|
38
|
-
}, { ref: S, onKeyDown: C, ...w } =
|
|
37
|
+
c.onKeyDown(e), !e.defaultPrevented && (e.key === "ArrowDown" || e.key === "Enter" || e.key === " " ? (e.preventDefault(), a.value = t.id, requestAnimationFrame(b)) : e.key === "Escape" && (a.value = null));
|
|
38
|
+
}, { ref: S, onKeyDown: C, ...w } = c;
|
|
39
39
|
return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("button", {
|
|
40
40
|
ref: (e) => {
|
|
41
41
|
l.current = e, S(e);
|
|
@@ -49,12 +49,12 @@ function h({ menu: t, baseId: r, openId: o, itemProps: s }) {
|
|
|
49
49
|
className: e.trigger,
|
|
50
50
|
style: v,
|
|
51
51
|
onClick: () => {
|
|
52
|
-
|
|
52
|
+
a.value = h ? null : t.id;
|
|
53
53
|
},
|
|
54
54
|
onKeyDown: x,
|
|
55
55
|
...w,
|
|
56
56
|
children: t.label
|
|
57
|
-
}), /* @__PURE__ */ f(
|
|
57
|
+
}), /* @__PURE__ */ f(i, {
|
|
58
58
|
present: h,
|
|
59
59
|
children: /* @__PURE__ */ f(g, {
|
|
60
60
|
menu: t,
|
|
@@ -62,28 +62,28 @@ function h({ menu: t, baseId: r, openId: o, itemProps: s }) {
|
|
|
62
62
|
floatingRef: m,
|
|
63
63
|
floatingStyle: y,
|
|
64
64
|
onClose: () => {
|
|
65
|
-
|
|
65
|
+
a.value = null, o(l.current);
|
|
66
66
|
}
|
|
67
67
|
})
|
|
68
68
|
})] });
|
|
69
69
|
}
|
|
70
|
-
function g({ menu:
|
|
70
|
+
function g({ menu: t, menuId: n, floatingRef: i, floatingStyle: a, onClose: o }) {
|
|
71
71
|
let s = (e) => {
|
|
72
72
|
let t = Array.from(i.current?.querySelectorAll("[role=\"menuitem\"]:not([aria-disabled=\"true\"])") ?? []);
|
|
73
73
|
if (t.length === 0) return;
|
|
74
74
|
let n = t.indexOf(e.currentTarget);
|
|
75
75
|
e.key === "ArrowDown" ? (e.preventDefault(), t[(n + 1) % t.length]?.focus()) : e.key === "ArrowUp" ? (e.preventDefault(), t[(n - 1 + t.length) % t.length]?.focus()) : e.key === "Home" ? (e.preventDefault(), t[0]?.focus()) : e.key === "End" && (e.preventDefault(), t[t.length - 1]?.focus());
|
|
76
76
|
};
|
|
77
|
-
return /* @__PURE__ */ f(
|
|
77
|
+
return /* @__PURE__ */ f(r, {
|
|
78
78
|
onDismiss: o,
|
|
79
79
|
children: /* @__PURE__ */ f("div", {
|
|
80
80
|
ref: i,
|
|
81
|
-
id:
|
|
81
|
+
id: n,
|
|
82
82
|
role: "menu",
|
|
83
|
-
"aria-label": typeof
|
|
83
|
+
"aria-label": typeof t.label == "string" ? t.label : void 0,
|
|
84
84
|
className: e.panel,
|
|
85
85
|
style: a,
|
|
86
|
-
children:
|
|
86
|
+
children: t.items.map((t) => /* @__PURE__ */ f("div", {
|
|
87
87
|
role: "menuitem",
|
|
88
88
|
tabIndex: -1,
|
|
89
89
|
"aria-disabled": t.disabled,
|
package/dist/node/modal/modal.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./modal.module.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useRef as t } from "react";
|
|
5
|
+
import { cn as n, useDraggable as r, useEffectPropSignal as i, useId as a, useSignalEffect as o, useSignals as s } from "@cascivo/core";
|
|
6
6
|
import { builtin as c, t as l } from "@cascivo/i18n";
|
|
7
7
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
8
8
|
//#region ../components/src/modal/modal.tsx
|
|
9
9
|
function f({ open: f = !1, onClose: p, title: m, description: h, children: g, footer: _, className: v, size: y = "md", draggable: b = !1 }) {
|
|
10
|
-
|
|
11
|
-
let x =
|
|
10
|
+
s();
|
|
11
|
+
let x = t(null), S = t(p);
|
|
12
12
|
S.current = p;
|
|
13
|
-
let C =
|
|
13
|
+
let C = a("cascivo-modal-title"), w = a("cascivo-modal-desc"), { handleRef: T, offset: E } = r({ isDisabled: !b }), D = b ? {
|
|
14
14
|
"--modal-x": `${E.value.x}px`,
|
|
15
15
|
"--modal-y": `${E.value.y}px`
|
|
16
|
-
} : void 0, O =
|
|
17
|
-
return
|
|
16
|
+
} : void 0, O = i(f);
|
|
17
|
+
return o(() => {
|
|
18
18
|
let e = x.current;
|
|
19
19
|
e && (O.value ? e.open || e.showModal() : e.open && e.close());
|
|
20
|
-
}),
|
|
20
|
+
}), o(() => {
|
|
21
21
|
let e = x.current;
|
|
22
22
|
if (!e) return;
|
|
23
23
|
let t = () => S.current?.();
|
|
@@ -26,7 +26,7 @@ function f({ open: f = !1, onClose: p, title: m, description: h, children: g, fo
|
|
|
26
26
|
ref: x,
|
|
27
27
|
"data-size": y,
|
|
28
28
|
"data-draggable": b || void 0,
|
|
29
|
-
className:
|
|
29
|
+
className: n(e.dialog, v),
|
|
30
30
|
style: D,
|
|
31
31
|
onClick: (e) => {
|
|
32
32
|
e.target === x.current && x.current?.close();
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
import { usePopover as e } from "../popover/use-popover.js";
|
|
4
4
|
import t from "./multi-select.module.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useRef as n } from "react";
|
|
6
|
+
import { cn as r, focusElement as i, useComputed as a, useSignal as o, useSignalEffect as s, useSignals as c } from "@cascivo/core";
|
|
7
7
|
import { builtin as l, t as u } from "@cascivo/i18n";
|
|
8
8
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
9
9
|
//#region ../components/src/multi-select/multi-select.tsx
|
|
10
10
|
function p({ options: p, value: m, onValueChange: h, placeholder: g, disabled: _ = !1, labels: v, className: y, ...b }) {
|
|
11
|
-
|
|
12
|
-
let x = e({ placement: "bottom" }), S =
|
|
11
|
+
c();
|
|
12
|
+
let x = e({ placement: "bottom" }), S = o(""), C = o(-1), w = n(null), T = n(null), E = a(() => {
|
|
13
13
|
let e = S.value.toLowerCase();
|
|
14
14
|
return e ? p.filter((t) => t.label.toLowerCase().includes(e)) : p;
|
|
15
15
|
});
|
|
16
|
-
|
|
17
|
-
x.isOpen.value ? (C.value = -1, setTimeout(() =>
|
|
18
|
-
}),
|
|
16
|
+
s(() => {
|
|
17
|
+
x.isOpen.value ? (C.value = -1, setTimeout(() => i(T.current), 0)) : S.value = "";
|
|
18
|
+
}), s(() => {
|
|
19
19
|
let e = w.current;
|
|
20
20
|
if (!e || !x.isOpen.value) return;
|
|
21
21
|
let t = (e) => {
|
|
@@ -34,7 +34,7 @@ function p({ options: p, value: m, onValueChange: h, placeholder: g, disabled: _
|
|
|
34
34
|
}
|
|
35
35
|
let O = m.length === 0 ? g ?? v?.placeholder ?? u(l.multiSelect.placeholder) : v?.selected ? v.selected(m.length) : u(l.multiSelect.selected, { count: String(m.length) }), k = v?.search ?? u(l.multiSelect.search), A = v?.noResults ?? u(l.multiSelect.noResults);
|
|
36
36
|
return /* @__PURE__ */ f("div", {
|
|
37
|
-
className:
|
|
37
|
+
className: r(t.wrapper, y),
|
|
38
38
|
...b,
|
|
39
39
|
children: [/* @__PURE__ */ f("button", {
|
|
40
40
|
ref: x.triggerRef,
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
1
|
var e = {
|
|
4
|
-
wrapper: "
|
|
5
|
-
trigger: "
|
|
6
|
-
"trigger-label": "_trigger-
|
|
7
|
-
chevron: "
|
|
8
|
-
panel: "
|
|
9
|
-
"search-row": "_search-
|
|
10
|
-
search: "
|
|
11
|
-
options: "
|
|
12
|
-
option: "
|
|
13
|
-
checkbox: "
|
|
14
|
-
"no-results": "_no-
|
|
2
|
+
wrapper: "_wrapper_o9vhb_2",
|
|
3
|
+
trigger: "_trigger_o9vhb_12",
|
|
4
|
+
"trigger-label": "_trigger-label_o9vhb_51",
|
|
5
|
+
chevron: "_chevron_o9vhb_63",
|
|
6
|
+
panel: "_panel_o9vhb_83",
|
|
7
|
+
"search-row": "_search-row_o9vhb_128",
|
|
8
|
+
search: "_search_o9vhb_128",
|
|
9
|
+
options: "_options_o9vhb_149",
|
|
10
|
+
option: "_option_o9vhb_149",
|
|
11
|
+
checkbox: "_checkbox_o9vhb_177",
|
|
12
|
+
"no-results": "_no-results_o9vhb_192"
|
|
15
13
|
};
|
|
16
14
|
//#endregion
|
|
17
15
|
export { e as default };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
1
|
import e from "./native-select.module.js";
|
|
4
|
-
import { cn as t } from "@cascivo/core";
|
|
2
|
+
import { cn as t } from "@cascivo/core/pure";
|
|
5
3
|
import { forwardRef as n } from "react";
|
|
6
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
7
5
|
//#region ../components/src/native-select/native-select.tsx
|