@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,5 +1,3 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
1
|
import { Spinner as e } from "../../spinner/spinner.js";
|
|
4
2
|
import { Button as t } from "../../button/button.js";
|
|
5
3
|
import { Input as n } from "../../input/input.js";
|
|
@@ -114,26 +112,30 @@ import { ColorPicker as Lt } from "../../color-picker/color-picker.js";
|
|
|
114
112
|
import { Carousel as Rt } from "../../carousel/carousel.js";
|
|
115
113
|
import { Resizable as zt } from "../../resizable/resizable.js";
|
|
116
114
|
import { Dock as Bt } from "../../dock/dock.js";
|
|
117
|
-
import {
|
|
118
|
-
import {
|
|
119
|
-
import {
|
|
120
|
-
import {
|
|
121
|
-
import {
|
|
122
|
-
import {
|
|
123
|
-
import {
|
|
124
|
-
import {
|
|
125
|
-
import {
|
|
126
|
-
import {
|
|
127
|
-
import {
|
|
128
|
-
import {
|
|
129
|
-
import {
|
|
130
|
-
import {
|
|
131
|
-
import {
|
|
132
|
-
import {
|
|
133
|
-
import {
|
|
134
|
-
import {
|
|
135
|
-
import {
|
|
136
|
-
import {
|
|
137
|
-
import {
|
|
138
|
-
import {
|
|
139
|
-
|
|
115
|
+
import { LargeTitleHeader as Vt } from "../../large-title-header/large-title-header.js";
|
|
116
|
+
import { InfiniteScroll as Ht } from "../../infinite-scroll/infinite-scroll.js";
|
|
117
|
+
import { ReorderList as Ut } from "../../reorder-list/reorder-list.js";
|
|
118
|
+
import { VirtualList as Wt } from "../../virtual-list/virtual-list.js";
|
|
119
|
+
import { WheelPicker as Gt } from "../../wheel-picker/wheel-picker.js";
|
|
120
|
+
import { Drawer as Kt } from "../../drawer/drawer.js";
|
|
121
|
+
import { NativeSelect as qt } from "../../native-select/native-select.js";
|
|
122
|
+
import { CodeSnippet as Jt } from "../../code-snippet/code-snippet.js";
|
|
123
|
+
import { Steps as Yt } from "../../steps/steps.js";
|
|
124
|
+
import { Tile as Xt } from "../../tile/tile.js";
|
|
125
|
+
import { Indicator as Zt } from "../../indicator/indicator.js";
|
|
126
|
+
import { Join as Qt } from "../../join/join.js";
|
|
127
|
+
import { Stack as $t } from "../../stack/stack.js";
|
|
128
|
+
import { AppShell as en } from "../../app-shell/app-shell.js";
|
|
129
|
+
import { ChatBubble as tn } from "../../chat-bubble/chat-bubble.js";
|
|
130
|
+
import { RadialProgress as nn } from "../../radial-progress/radial-progress.js";
|
|
131
|
+
import { Swap as rn } from "../../swap/swap.js";
|
|
132
|
+
import { SwipeItem as an } from "../../swipe-item/swipe-item.js";
|
|
133
|
+
import { Grid as on, GridItem as sn } from "../../layouts/src/grid/grid.js";
|
|
134
|
+
import { Flex as cn } from "../../layouts/src/flex/flex.js";
|
|
135
|
+
import { Columns as ln } from "../../layouts/src/columns/columns.js";
|
|
136
|
+
import { Center as un } from "../../layouts/src/center/center.js";
|
|
137
|
+
import { Spacer as dn } from "../../layouts/src/spacer/spacer.js";
|
|
138
|
+
import { AutoGrid as fn } from "../../layouts/src/auto-grid/auto-grid.js";
|
|
139
|
+
import { PageHeader as pn } from "../../layouts/src/page-header/page-header.js";
|
|
140
|
+
import { DismissableLayer as mn, ErrorBoundary as hn, FocusScope as gn, Portal as _n, Presence as vn, Slot as yn, SuspenseBoundary as bn, ThemeProvider as xn, VisuallyHidden as Sn, applyTheme as Cn, batch as wn, cn as Tn, composeRefs as En, computePosition as Dn, computed as On, createMachine as kn, createScope as An, createStreamBuffer as jn, effect as Mn, getLinkComponent as Nn, mergeProps as Pn, setLinkComponent as Fn, setTheme as In, signal as Ln, themePreloadScript as Rn, themeSignal as zn, useAnchorPosition as Bn, useClipboard as Vn, useComputed as Hn, useControllableSignal as Un, useDisclosure as Wn, useEffectPropSignal as Gn, useId as Kn, useMachine as qn, useMediaQuery as Jn, useRovingFocus as Yn, useScope as Xn, useScrollLock as Zn, useSignal as Qn, useSignalEffect as $n, useSignals as er, useStreamBuffer as tr, useTheme as nr, useTypeahead as rr } from "@cascivo/core";
|
|
141
|
+
export { M as Accordion, N as AccordionContent, P as AccordionItem, F as AccordionTrigger, I as ActionSheet, d as Alert, ye as AlertDialog, en as AppShell, _t as AspectRatio, fn as AutoGrid, f as Avatar, p as AvatarGroup, c as Badge, $e as Blockquote, xe as BottomSheet, z as Breadcrumb, t as Button, dt as ButtonGroup, Ft as Calendar, r as Card, i as CardContent, a as CardFooter, o as CardHeader, s as CardTitle, Rt as Carousel, un as Center, tn as ChatBubble, v as Checkbox, He as CheckboxCard, Qe as Code, Jt as CodeSnippet, gt as Collapsible, Lt as ColorPicker, ln as Columns, ce as Combobox, ne as CommandMenu, we as Comparison, Tt as ContainedList, Et as ContainedListItem, Se as ContextMenu, Ce as ContextMenuItem, Ue as CopyButton, Dt as DataList, te as DataTable, le as DatePicker, It as DateRangePicker, mn as DismissableLayer, Bt as Dock, Kt as Drawer, w as Dropdown, Ie as Editable, X as EmptyState, hn as ErrorBoundary, Z as Fab, ct as Field, ue as FileUploader, lt as Filter, cn as Flex, gn as FocusScope, ae as Form, on as Grid, sn as GridItem, H as Header, Be as HeaderPanel, Xe as Heading, Te as HoverCard, Ee as HoverCardContent, De as HoverCardTrigger, ut as IconButton, h as Image, Zt as Indicator, Ht as InfiniteScroll, pt as InlineLoading, n as Input, Ne as InputGroup, Pe as InputGroupAddon, kt as Item, At as ItemActions, jt as ItemContent, Mt as ItemDescription, Nt as ItemMedia, Pt as ItemTitle, Qt as Join, L as Kbd, st as Label, Vt as LargeTitleHeader, R as Link, et as List, tt as ListItem, nt as LogViewer, he as Menu, vt as MenuButton, ge as MenuItem, _e as MenuSeparator, ve as MenuTrigger, bt as Menubar, l as Modal, ke as MultiSelect, qt as NativeSelect, xt as NavigationMenu, mt as Notification, ee as NumberInput, je as OtpInput, Q as OverflowMenu, pn as PageHeader, G as Pagination, Oe as PasswordInput, fe as Popover, pe as PopoverContent, me as PopoverTrigger, _n as Portal, vn as Presence, Je as Progress, Y as ProgressBar, Ye as ProgressCircle, K as ProgressIndicator, rt as Prose, it as PullToRefresh, at as QrCode, nn as RadialProgress, y as Radio, Le as RadioCard, Re as RadioCardGroup, b as RadioGroup, Fe as RatingGroup, ot as RelativeTime, Ut as ReorderList, zt as Resizable, ht as ScrollArea, $ as Search, Me as SegmentedControl, _ as Select, u as Separator, be as Sheet, ze as ShellHeader, W as SideNav, J as Skeleton, Ke as SkipNavLink, qe as SkipNavTarget, S as Slider, yn as Slot, dn as Spacer, e as Spinner, $t as Stack, We as Stat, Ge as Status, Yt as Steps, wt as StructuredList, bn as SuspenseBoundary, rn as Swap, an as SwipeItem, Ve as Switcher, O as Tabs, k as TabsContent, A as TabsList, j as TabsTrigger, q as Tag, Ae as TagsInput, Ze as Text, g as Textarea, xn as ThemeProvider, Xt as Tile, de as TimePicker, Ot as Timeline, T as ToastProvider, B as Toc, x as Toggle, ft as ToggleGroup, yt as Toggletip, C as Tooltip, St as TreeView, m as User, Wt as VirtualList, Sn as VisuallyHidden, Gt as WheelPicker, Cn as applyTheme, wn as batch, Tn as cn, En as composeRefs, Dn as computePosition, On as computed, oe as createForm, kn as createMachine, An as createScope, jn as createStreamBuffer, E as dismissAllToasts, Mn as effect, re as fuzzyMatch, ie as fuzzyScore, Nn as getLinkComponent, Pn as mergeProps, Fn as setLinkComponent, In as setTheme, Ln as signal, Rn as themePreloadScript, zn as themeSignal, Ct as treeViewMessages, Bn as useAnchorPosition, Vn as useClipboard, Hn as useComputed, Un as useControllableSignal, Wn as useDisclosure, Gn as useEffectPropSignal, se as useForm, Kn as useId, qn as useMachine, Jn as useMediaQuery, U as usePopover, Yn as useRovingFocus, Xn as useScope, Zn as useScrollLock, Qn as useSignal, $n as useSignalEffect, er as useSignals, tr as useStreamBuffer, nr as useTheme, D as useToast, V as useTocFromRegion, rr as useTypeahead };
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./reorder-list.module.js";
|
|
4
|
+
import { useRef as t } from "react";
|
|
5
|
+
import { cn as n, useSignal as r, useSignalEffect as i, useSignals as a } from "@cascivo/core";
|
|
6
|
+
import { builtin as o, t as s } from "@cascivo/i18n";
|
|
7
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
+
//#region ../components/src/reorder-list/reorder-list.tsx
|
|
9
|
+
function u(e) {
|
|
10
|
+
return e.name ?? (typeof e.label == "string" ? e.label : e.id);
|
|
11
|
+
}
|
|
12
|
+
function d(e, t, n) {
|
|
13
|
+
let r = e.slice(), [i] = r.splice(t, 1);
|
|
14
|
+
return i && r.splice(n, 0, i), r;
|
|
15
|
+
}
|
|
16
|
+
function f({ value: f, onValueChange: p, disabled: m = !1, labels: h, className: g }) {
|
|
17
|
+
a();
|
|
18
|
+
let _ = t(null), v = r(null), y = r(""), b = t(f);
|
|
19
|
+
b.current = f;
|
|
20
|
+
let x = t(p);
|
|
21
|
+
x.current = p;
|
|
22
|
+
let S = t(m);
|
|
23
|
+
S.current = m;
|
|
24
|
+
let C = t(null), w = (e, t, n) => {
|
|
25
|
+
y.value = e ? e.replace("{name}", n.name).replace("{position}", String(n.position)).replace("{total}", String(n.total)) : t;
|
|
26
|
+
}, T = (e, t) => {
|
|
27
|
+
let n = b.current, r = Math.max(0, Math.min(n.length - 1, t));
|
|
28
|
+
if (r === e) return;
|
|
29
|
+
let i = n[e];
|
|
30
|
+
if (!i) return;
|
|
31
|
+
x.current(d(n, e, r)), v.value = r;
|
|
32
|
+
let a = {
|
|
33
|
+
name: u(i),
|
|
34
|
+
position: r + 1,
|
|
35
|
+
total: n.length
|
|
36
|
+
};
|
|
37
|
+
w(h?.moved, s(o.reorderList.moved, a), a);
|
|
38
|
+
}, E = (e) => {
|
|
39
|
+
let t = b.current, n = t[e];
|
|
40
|
+
if (!n) return;
|
|
41
|
+
C.current = t, v.value = e;
|
|
42
|
+
let r = {
|
|
43
|
+
name: u(n),
|
|
44
|
+
position: e + 1,
|
|
45
|
+
total: t.length
|
|
46
|
+
};
|
|
47
|
+
w(h?.grabbed, s(o.reorderList.grabbed, r), r);
|
|
48
|
+
}, D = () => {
|
|
49
|
+
let e = v.value;
|
|
50
|
+
if (e === null) return;
|
|
51
|
+
let t = b.current, n = t[e];
|
|
52
|
+
if (C.current = null, v.value = null, !n) return;
|
|
53
|
+
let r = {
|
|
54
|
+
name: u(n),
|
|
55
|
+
position: e + 1,
|
|
56
|
+
total: t.length
|
|
57
|
+
};
|
|
58
|
+
w(h?.dropped, s(o.reorderList.dropped, r), r);
|
|
59
|
+
}, O = () => {
|
|
60
|
+
let e = C.current, t = v.value;
|
|
61
|
+
if (C.current = null, v.value = null, !e) return;
|
|
62
|
+
x.current(e);
|
|
63
|
+
let n = t === null ? void 0 : e[t], r = {
|
|
64
|
+
name: n ? u(n) : "",
|
|
65
|
+
position: (t ?? 0) + 1,
|
|
66
|
+
total: e.length
|
|
67
|
+
};
|
|
68
|
+
w(h?.cancelled, s(o.reorderList.cancelled, r), r);
|
|
69
|
+
}, k = (e, t) => {
|
|
70
|
+
if (m) return;
|
|
71
|
+
let n = v.value;
|
|
72
|
+
if (e.key === " " || e.key === "Enter") {
|
|
73
|
+
e.preventDefault(), n === t ? D() : E(t);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (e.key === "Escape" && n !== null) {
|
|
77
|
+
e.preventDefault(), O();
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
n === t && (e.key === "ArrowUp" ? (e.preventDefault(), T(t, t - 1)) : e.key === "ArrowDown" && (e.preventDefault(), T(t, t + 1)));
|
|
81
|
+
};
|
|
82
|
+
return i(() => {
|
|
83
|
+
let e = _.current;
|
|
84
|
+
if (!e || typeof window > "u") return;
|
|
85
|
+
let t = (t) => {
|
|
86
|
+
let n = v.value;
|
|
87
|
+
if (n === null || S.current) return;
|
|
88
|
+
let r = [...e.querySelectorAll("[data-reorder-row]")].findIndex((e) => {
|
|
89
|
+
let n = e.getBoundingClientRect();
|
|
90
|
+
return t.clientY >= n.top && t.clientY <= n.bottom;
|
|
91
|
+
});
|
|
92
|
+
r !== -1 && r !== n && T(n, r);
|
|
93
|
+
}, n = () => {
|
|
94
|
+
v.value !== null && C.current && D();
|
|
95
|
+
};
|
|
96
|
+
return window.addEventListener("pointermove", t), window.addEventListener("pointerup", n), window.addEventListener("pointercancel", n), () => {
|
|
97
|
+
window.removeEventListener("pointermove", t), window.removeEventListener("pointerup", n), window.removeEventListener("pointercancel", n);
|
|
98
|
+
};
|
|
99
|
+
}), /* @__PURE__ */ l("div", {
|
|
100
|
+
className: n(e.root, g),
|
|
101
|
+
children: [/* @__PURE__ */ c("ul", {
|
|
102
|
+
ref: _,
|
|
103
|
+
className: e.list,
|
|
104
|
+
children: f.map((t, n) => /* @__PURE__ */ l("li", {
|
|
105
|
+
"data-reorder-row": "",
|
|
106
|
+
"data-active": v.value === n ? "" : void 0,
|
|
107
|
+
className: e.row,
|
|
108
|
+
children: [/* @__PURE__ */ c("button", {
|
|
109
|
+
type: "button",
|
|
110
|
+
disabled: m,
|
|
111
|
+
"aria-label": h?.handle ? h.handle.replace("{name}", u(t)) : s(o.reorderList.handle, { name: u(t) }),
|
|
112
|
+
"aria-pressed": v.value === n,
|
|
113
|
+
className: e.handle,
|
|
114
|
+
onKeyDown: (e) => k(e, n),
|
|
115
|
+
onPointerDown: () => {
|
|
116
|
+
m || E(n);
|
|
117
|
+
},
|
|
118
|
+
children: /* @__PURE__ */ c("svg", {
|
|
119
|
+
"aria-hidden": "true",
|
|
120
|
+
viewBox: "0 0 16 16",
|
|
121
|
+
className: e.grip,
|
|
122
|
+
children: /* @__PURE__ */ c("path", {
|
|
123
|
+
d: "M6 4h.01M10 4h.01M6 8h.01M10 8h.01M6 12h.01M10 12h.01",
|
|
124
|
+
stroke: "currentColor",
|
|
125
|
+
strokeWidth: "2",
|
|
126
|
+
strokeLinecap: "round"
|
|
127
|
+
})
|
|
128
|
+
})
|
|
129
|
+
}), /* @__PURE__ */ c("span", {
|
|
130
|
+
className: e.label,
|
|
131
|
+
children: t.label
|
|
132
|
+
})]
|
|
133
|
+
}, t.id))
|
|
134
|
+
}), /* @__PURE__ */ c("span", {
|
|
135
|
+
role: "status",
|
|
136
|
+
"aria-live": "polite",
|
|
137
|
+
className: e.srOnly,
|
|
138
|
+
children: y.value
|
|
139
|
+
})]
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
//#endregion
|
|
143
|
+
export { f as ReorderList };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./resizable.module.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Children as t, useRef as n } from "react";
|
|
5
|
+
import { cn as r, useControllableSignal as i, useSignal 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/resizable/resizable.tsx
|
|
@@ -10,12 +10,12 @@ function f(e, t, n) {
|
|
|
10
10
|
return Math.min(n, Math.max(t, e));
|
|
11
11
|
}
|
|
12
12
|
function p({ children: p, orientation: m = "horizontal", defaultRatio: h = .5, ratio: g, minRatio: _ = .1, maxRatio: v = .9, onRatioChange: y, className: b, label: x }) {
|
|
13
|
-
|
|
14
|
-
let [S, C] =
|
|
13
|
+
s();
|
|
14
|
+
let [S, C] = t.toArray(p), [w, T] = i({
|
|
15
15
|
value: g,
|
|
16
16
|
defaultValue: h,
|
|
17
17
|
onChange: y
|
|
18
|
-
}), E =
|
|
18
|
+
}), E = n(null), D = a(!1), O = (e) => {
|
|
19
19
|
T(f(e, _, v));
|
|
20
20
|
}, k = (e, t) => {
|
|
21
21
|
let n = E.current;
|
|
@@ -23,7 +23,7 @@ function p({ children: p, orientation: m = "horizontal", defaultRatio: h = .5, r
|
|
|
23
23
|
let r = n.getBoundingClientRect();
|
|
24
24
|
return m === "horizontal" ? (e - r.left) / r.width : (t - r.top) / r.height;
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
o(() => {
|
|
27
27
|
if (!D.value) return;
|
|
28
28
|
let e = (e) => O(k(e.clientX, e.clientY)), t = () => {
|
|
29
29
|
D.value = !1;
|
|
@@ -43,7 +43,7 @@ function p({ children: p, orientation: m = "horizontal", defaultRatio: h = .5, r
|
|
|
43
43
|
}, j = x ?? l(c.resizable.handle), M = Math.round(w.value * 100);
|
|
44
44
|
return /* @__PURE__ */ d("div", {
|
|
45
45
|
ref: E,
|
|
46
|
-
className:
|
|
46
|
+
className: r(e.resizable, b),
|
|
47
47
|
"data-orientation": m,
|
|
48
48
|
style: { "--cascivo-resizable-ratio": w.value },
|
|
49
49
|
children: [
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./scroll-area.module.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useRef as t } from "react";
|
|
5
|
+
import { cn as n, useSignalEffect as r, useSignals as i } from "@cascivo/core";
|
|
6
6
|
import { jsx as a } from "react/jsx-runtime";
|
|
7
7
|
//#region ../components/src/scroll-area/scroll-area.tsx
|
|
8
8
|
function o({ height: o, width: s, orientation: c = "vertical", edges: l = "shadow", className: u, style: d, children: f, ...p }) {
|
|
9
|
-
|
|
10
|
-
let m =
|
|
11
|
-
|
|
9
|
+
i();
|
|
10
|
+
let m = t(null);
|
|
11
|
+
r(() => {
|
|
12
12
|
let e = m.current;
|
|
13
13
|
if (!e) return;
|
|
14
14
|
let t = () => {
|
|
@@ -28,7 +28,7 @@ function o({ height: o, width: s, orientation: c = "vertical", edges: l = "shado
|
|
|
28
28
|
ref: m,
|
|
29
29
|
"data-orientation": c,
|
|
30
30
|
"data-edges": l,
|
|
31
|
-
className:
|
|
31
|
+
className: n(e.root, u),
|
|
32
32
|
style: h,
|
|
33
33
|
...p,
|
|
34
34
|
children: f
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./search.module.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useRef as t } from "react";
|
|
5
|
+
import { cn as n, focusElement as r, useId as i, useSignal 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/search/search.tsx
|
|
@@ -29,15 +29,15 @@ function f() {
|
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
function p({ value: p, defaultValue: m = "", onValueChange: h, onChange: g, onSearch: _, debounceMs: v = 300, placeholder: y, size: b = "md", label: x, disabled: S = !1, clearLabel: C, id: w, className: T }) {
|
|
32
|
-
|
|
33
|
-
let E = y ?? l(c.search.placeholder), D = x ?? l(c.search.label), O = C ?? l(c.search.clear), k =
|
|
32
|
+
s();
|
|
33
|
+
let E = y ?? l(c.search.placeholder), D = x ?? l(c.search.label), O = C ?? l(c.search.clear), k = t(null), A = i("cascade-search"), j = w ?? A, M = p !== void 0, N = a(M ? p : m);
|
|
34
34
|
M && (N.value = p);
|
|
35
|
-
let P =
|
|
35
|
+
let P = t(_);
|
|
36
36
|
P.current = _;
|
|
37
|
-
let F =
|
|
37
|
+
let F = t(null), I = () => {
|
|
38
38
|
F.current !== null && (clearTimeout(F.current), F.current = null);
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
o(() => I);
|
|
41
41
|
let L = (e) => {
|
|
42
42
|
let t = e.target.value;
|
|
43
43
|
M || (N.value = t), (h ?? g)?.(t), I(), F.current = setTimeout(() => {
|
|
@@ -46,10 +46,10 @@ function p({ value: p, defaultValue: m = "", onValueChange: h, onChange: g, onSe
|
|
|
46
46
|
}, R = (e) => {
|
|
47
47
|
e.key === "Enter" && (I(), _?.(N.value));
|
|
48
48
|
}, z = () => {
|
|
49
|
-
I(), M || (N.value = ""), (h ?? g)?.(""), _?.(""),
|
|
49
|
+
I(), M || (N.value = ""), (h ?? g)?.(""), _?.(""), r(k.current);
|
|
50
50
|
}, B = N.value !== "";
|
|
51
51
|
return /* @__PURE__ */ d("div", {
|
|
52
|
-
className:
|
|
52
|
+
className: n(e.root, T),
|
|
53
53
|
"data-size": b,
|
|
54
54
|
"data-state": B ? "filled" : "empty",
|
|
55
55
|
children: [
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./select.module.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { forwardRef as t } from "react";
|
|
5
|
+
import { cn as n, createMachine as r, useMachine as i } from "@cascivo/core";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
//#region ../components/src/select/select.tsx
|
|
8
|
-
var s =
|
|
8
|
+
var s = r({
|
|
9
9
|
initial: "idle",
|
|
10
10
|
states: {
|
|
11
11
|
idle: { on: { FOCUS: "focused" } },
|
|
12
12
|
focused: { on: { BLUR: "idle" } }
|
|
13
13
|
}
|
|
14
|
-
}), c =
|
|
15
|
-
let [b, x] =
|
|
14
|
+
}), c = t(function({ label: t, hint: r, error: c, placeholder: l, options: u, size: d = "md", className: f, id: p, defaultValue: m, value: h, onFocus: g, onBlur: _, ...v }, y) {
|
|
15
|
+
let [b, x] = i(s), S = p ?? (t ? `cascade-select-${t.toLowerCase().replace(/\s+/g, "-")}` : void 0), C = h !== void 0, w = l !== void 0;
|
|
16
16
|
return /* @__PURE__ */ o("div", {
|
|
17
|
-
className:
|
|
17
|
+
className: n(e.wrapper, f),
|
|
18
18
|
"data-state": c ? "error" : b.value,
|
|
19
19
|
"data-size": d,
|
|
20
20
|
children: [
|
|
21
|
-
|
|
21
|
+
t && /* @__PURE__ */ a("label", {
|
|
22
22
|
className: e.label,
|
|
23
23
|
htmlFor: S,
|
|
24
|
-
children:
|
|
24
|
+
children: t
|
|
25
25
|
}),
|
|
26
26
|
/* @__PURE__ */ o("div", {
|
|
27
27
|
className: e.field,
|
|
@@ -29,7 +29,7 @@ var s = n({
|
|
|
29
29
|
id: S,
|
|
30
30
|
className: e.select,
|
|
31
31
|
"aria-invalid": c ? !0 : void 0,
|
|
32
|
-
"aria-describedby": c ? `${S}-error` :
|
|
32
|
+
"aria-describedby": c ? `${S}-error` : r ? `${S}-hint` : void 0,
|
|
33
33
|
value: h,
|
|
34
34
|
defaultValue: !C && w ? m ?? "" : m,
|
|
35
35
|
onFocus: (e) => {
|
|
@@ -60,10 +60,10 @@ var s = n({
|
|
|
60
60
|
role: "alert",
|
|
61
61
|
children: c
|
|
62
62
|
}),
|
|
63
|
-
!c &&
|
|
63
|
+
!c && r && /* @__PURE__ */ a("span", {
|
|
64
64
|
id: `${S}-hint`,
|
|
65
65
|
className: e.hint,
|
|
66
|
-
children:
|
|
66
|
+
children: r
|
|
67
67
|
})
|
|
68
68
|
]
|
|
69
69
|
});
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
1
|
import e from "./separator.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/separator/separator.tsx
|
|
7
5
|
function r({ orientation: r = "horizontal", decorative: i = !1, className: a, ...o }) {
|
package/dist/node/sheet/sheet.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./sheet.module.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useId as t, useRef as n } from "react";
|
|
5
|
+
import { useEffectPropSignal as r, useSignalEffect 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/sheet/sheet.tsx
|
|
9
9
|
function l({ open: l, onClose: u, title: d, children: f, side: p = "end" }) {
|
|
10
|
-
let m =
|
|
11
|
-
return _.current = u,
|
|
10
|
+
let m = n(null), h = t(), g = r(l), _ = n(u);
|
|
11
|
+
return _.current = u, i(() => {
|
|
12
12
|
let e = m.current;
|
|
13
13
|
if (e) if (g.value) try {
|
|
14
14
|
e.showPopover();
|