@cascivo/react 0.14.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/accordion/accordion.css +1 -1
- package/dist/accordion/accordion.js +81 -65
- package/dist/accordion/accordion.module.js +6 -9
- package/dist/action-sheet/action-sheet.js +11 -11
- package/dist/action-sheet/action-sheet.module.js +0 -2
- package/dist/alert/alert.module.js +0 -2
- package/dist/alert-dialog/alert-dialog.css +1 -1
- package/dist/alert-dialog/alert-dialog.js +6 -6
- package/dist/alert-dialog/alert-dialog.module.js +7 -9
- package/dist/app-shell/app-shell.js +10 -10
- package/dist/app-shell/app-shell.module.js +0 -2
- package/dist/aspect-ratio/aspect-ratio.js +1 -3
- package/dist/aspect-ratio/aspect-ratio.module.js +0 -2
- package/dist/avatar/avatar.module.js +0 -2
- package/dist/avatar-group/avatar-group.js +1 -3
- package/dist/avatar-group/avatar-group.module.js +0 -2
- package/dist/badge/badge.js +1 -3
- package/dist/badge/badge.module.js +0 -2
- package/dist/blockquote/blockquote.js +1 -3
- package/dist/blockquote/blockquote.module.js +0 -2
- package/dist/bottom-sheet/bottom-sheet.js +12 -12
- package/dist/bottom-sheet/bottom-sheet.module.js +0 -2
- package/dist/breadcrumb/breadcrumb.module.js +0 -2
- package/dist/button/button.js +1 -3
- package/dist/button/button.module.js +0 -2
- package/dist/button-group/button-group.js +6 -6
- package/dist/button-group/button-group.module.js +0 -2
- package/dist/calendar/calendar.module.js +0 -2
- package/dist/card/card.js +1 -3
- package/dist/card/card.module.js +0 -2
- package/dist/carousel/carousel.js +9 -9
- package/dist/carousel/carousel.module.js +0 -2
- package/dist/chat-bubble/chat-bubble.js +0 -2
- package/dist/chat-bubble/chat-bubble.module.js +0 -2
- package/dist/checkbox/checkbox.js +10 -10
- package/dist/checkbox/checkbox.module.js +0 -2
- package/dist/checkbox-card/checkbox-card.js +5 -5
- package/dist/checkbox-card/checkbox-card.module.js +0 -2
- package/dist/code/code.js +1 -3
- package/dist/code/code.module.js +0 -2
- package/dist/code-snippet/code-snippet.module.js +0 -2
- package/dist/code-snippet/highlight.js +0 -2
- package/dist/collapsible/collapsible.css +1 -1
- package/dist/collapsible/collapsible.js +36 -31
- package/dist/collapsible/collapsible.module.js +3 -6
- package/dist/color-picker/color-picker.js +7 -7
- package/dist/color-picker/color-picker.module.js +0 -2
- package/dist/combobox/combobox.css +1 -1
- package/dist/combobox/combobox.js +11 -11
- package/dist/combobox/combobox.module.js +15 -17
- package/dist/command-menu/command-menu.js +113 -113
- package/dist/command-menu/command-menu.module.js +0 -2
- package/dist/comparison/comparison.js +5 -5
- package/dist/comparison/comparison.module.js +0 -2
- package/dist/contained-list/contained-list.module.js +0 -2
- package/dist/context-menu/context-menu.js +6 -6
- package/dist/context-menu/context-menu.module.js +0 -2
- package/dist/copy-button/copy-button.js +7 -7
- package/dist/copy-button/copy-button.module.js +0 -2
- package/dist/data-list/data-list.js +1 -3
- package/dist/data-list/data-list.module.js +0 -2
- package/dist/data-table/data-table.css +1 -1
- package/dist/data-table/data-table.js +164 -164
- package/dist/data-table/data-table.module.js +29 -31
- package/dist/date-picker/date-picker.css +1 -1
- package/dist/date-picker/date-picker.js +24 -24
- package/dist/date-picker/date-picker.module.js +19 -21
- package/dist/date-range-picker/date-range-picker.js +30 -30
- package/dist/date-range-picker/date-range-picker.module.js +0 -2
- package/dist/dock/dock.module.js +0 -2
- package/dist/drawer/drawer.js +11 -11
- package/dist/drawer/drawer.module.js +0 -2
- package/dist/dropdown/dropdown.js +14 -14
- package/dist/dropdown/dropdown.module.js +0 -2
- package/dist/editable/editable.css +1 -1
- package/dist/editable/editable.js +8 -8
- package/dist/editable/editable.module.js +7 -9
- package/dist/empty-state/empty-state.js +1 -3
- package/dist/empty-state/empty-state.module.js +0 -2
- package/dist/fab/fab.js +12 -12
- package/dist/fab/fab.module.js +0 -2
- package/dist/field/field.js +1 -3
- package/dist/field/field.module.js +0 -2
- package/dist/file-uploader/file-uploader.css +1 -1
- package/dist/file-uploader/file-uploader.js +5 -5
- package/dist/file-uploader/file-uploader.module.js +14 -16
- package/dist/filter/filter.module.js +0 -2
- package/dist/form/form.module.js +0 -2
- package/dist/header/header.module.js +0 -2
- package/dist/header-panel/header-panel.js +8 -8
- package/dist/header-panel/header-panel.module.js +0 -2
- package/dist/heading/heading.js +1 -3
- package/dist/heading/heading.module.js +0 -2
- package/dist/hover-card/hover-card.js +18 -18
- package/dist/hover-card/hover-card.module.js +0 -2
- package/dist/icon-button/icon-button.js +1 -3
- package/dist/icon-button/icon-button.module.js +0 -2
- package/dist/image/image.module.js +0 -2
- package/dist/index.d.ts +120 -24
- package/dist/index.js +0 -1
- package/dist/indicator/indicator.js +0 -2
- package/dist/indicator/indicator.module.js +0 -2
- package/dist/inline-loading/inline-loading.js +1 -3
- package/dist/inline-loading/inline-loading.module.js +0 -2
- package/dist/input/input.js +11 -11
- package/dist/input/input.module.js +0 -2
- package/dist/input-group/input-group.js +1 -3
- package/dist/input-group/input-group.module.js +0 -2
- package/dist/item/item.js +1 -3
- package/dist/item/item.module.js +0 -2
- package/dist/join/join.js +0 -2
- package/dist/join/join.module.js +0 -2
- package/dist/kbd/kbd.js +1 -3
- package/dist/kbd/kbd.module.js +0 -2
- package/dist/label/label.js +1 -3
- package/dist/label/label.module.js +0 -2
- package/dist/layouts/src/auto-grid/auto-grid.js +1 -3
- package/dist/layouts/src/auto-grid/auto-grid.module.js +0 -2
- package/dist/layouts/src/center/center.js +1 -3
- package/dist/layouts/src/center/center.module.js +0 -2
- package/dist/layouts/src/columns/columns.js +1 -3
- package/dist/layouts/src/columns/columns.module.js +0 -2
- package/dist/layouts/src/flex/flex.js +1 -3
- package/dist/layouts/src/flex/flex.module.js +0 -2
- package/dist/layouts/src/grid/grid.js +1 -3
- package/dist/layouts/src/grid/grid.module.js +0 -2
- package/dist/layouts/src/page-header/page-header.css +1 -1
- package/dist/layouts/src/page-header/page-header.js +1 -3
- package/dist/layouts/src/page-header/page-header.module.js +6 -8
- package/dist/layouts/src/spacer/spacer.js +1 -3
- package/dist/layouts/src/spacer/spacer.module.js +0 -2
- package/dist/link/link.js +1 -3
- package/dist/link/link.module.js +0 -2
- package/dist/list/list.js +1 -3
- package/dist/list/list.module.js +0 -2
- package/dist/log-viewer/log-viewer.js +15 -15
- package/dist/log-viewer/log-viewer.module.js +0 -2
- package/dist/menu/menu.js +22 -21
- package/dist/menu/menu.module.js +0 -2
- package/dist/menu-button/menu-button.js +8 -8
- package/dist/menu-button/menu-button.module.js +0 -2
- package/dist/menubar/menubar.js +24 -24
- package/dist/menubar/menubar.module.js +0 -2
- package/dist/modal/modal.js +9 -9
- package/dist/modal/modal.module.js +0 -2
- package/dist/multi-select/multi-select.css +1 -1
- package/dist/multi-select/multi-select.js +8 -8
- package/dist/multi-select/multi-select.module.js +11 -13
- package/dist/native-select/native-select.js +1 -3
- package/dist/native-select/native-select.module.js +0 -2
- package/dist/navigation-menu/navigation-menu.js +26 -26
- package/dist/navigation-menu/navigation-menu.module.js +0 -2
- package/dist/node/accordion/accordion.js +81 -65
- package/dist/node/accordion/accordion.module.js +6 -9
- package/dist/node/action-sheet/action-sheet.js +11 -11
- package/dist/node/action-sheet/action-sheet.module.js +0 -2
- package/dist/node/alert/alert.module.js +0 -2
- package/dist/node/alert-dialog/alert-dialog.js +6 -6
- package/dist/node/alert-dialog/alert-dialog.module.js +7 -9
- package/dist/node/app-shell/app-shell.js +10 -10
- package/dist/node/app-shell/app-shell.module.js +0 -2
- package/dist/node/aspect-ratio/aspect-ratio.js +1 -3
- package/dist/node/aspect-ratio/aspect-ratio.module.js +0 -2
- package/dist/node/avatar/avatar.module.js +0 -2
- package/dist/node/avatar-group/avatar-group.js +1 -3
- package/dist/node/avatar-group/avatar-group.module.js +0 -2
- package/dist/node/badge/badge.js +1 -3
- package/dist/node/badge/badge.module.js +0 -2
- package/dist/node/blockquote/blockquote.js +1 -3
- package/dist/node/blockquote/blockquote.module.js +0 -2
- package/dist/node/bottom-sheet/bottom-sheet.js +12 -12
- package/dist/node/bottom-sheet/bottom-sheet.module.js +0 -2
- package/dist/node/breadcrumb/breadcrumb.module.js +0 -2
- package/dist/node/button/button.js +1 -3
- package/dist/node/button/button.module.js +0 -2
- package/dist/node/button-group/button-group.js +6 -6
- package/dist/node/button-group/button-group.module.js +0 -2
- package/dist/node/calendar/calendar.module.js +0 -2
- package/dist/node/card/card.js +1 -3
- package/dist/node/card/card.module.js +0 -2
- package/dist/node/carousel/carousel.js +9 -9
- package/dist/node/carousel/carousel.module.js +0 -2
- package/dist/node/chat-bubble/chat-bubble.js +0 -2
- package/dist/node/chat-bubble/chat-bubble.module.js +0 -2
- package/dist/node/checkbox/checkbox.js +10 -10
- package/dist/node/checkbox/checkbox.module.js +0 -2
- package/dist/node/checkbox-card/checkbox-card.js +5 -5
- package/dist/node/checkbox-card/checkbox-card.module.js +0 -2
- package/dist/node/code/code.js +1 -3
- package/dist/node/code/code.module.js +0 -2
- package/dist/node/code-snippet/code-snippet.module.js +0 -2
- package/dist/node/code-snippet/highlight.js +0 -2
- package/dist/node/collapsible/collapsible.js +36 -31
- package/dist/node/collapsible/collapsible.module.js +3 -6
- package/dist/node/color-picker/color-picker.js +7 -7
- package/dist/node/color-picker/color-picker.module.js +0 -2
- package/dist/node/combobox/combobox.js +11 -11
- package/dist/node/combobox/combobox.module.js +15 -17
- package/dist/node/command-menu/command-menu.js +113 -113
- package/dist/node/command-menu/command-menu.module.js +0 -2
- package/dist/node/comparison/comparison.js +5 -5
- package/dist/node/comparison/comparison.module.js +0 -2
- package/dist/node/contained-list/contained-list.module.js +0 -2
- package/dist/node/context-menu/context-menu.js +6 -6
- package/dist/node/context-menu/context-menu.module.js +0 -2
- package/dist/node/copy-button/copy-button.js +7 -7
- package/dist/node/copy-button/copy-button.module.js +0 -2
- package/dist/node/data-list/data-list.js +1 -3
- package/dist/node/data-list/data-list.module.js +0 -2
- package/dist/node/data-table/data-table.js +164 -164
- package/dist/node/data-table/data-table.module.js +29 -31
- package/dist/node/date-picker/date-picker.js +24 -24
- package/dist/node/date-picker/date-picker.module.js +19 -21
- package/dist/node/date-range-picker/date-range-picker.js +30 -30
- package/dist/node/date-range-picker/date-range-picker.module.js +0 -2
- package/dist/node/dock/dock.module.js +0 -2
- package/dist/node/drawer/drawer.js +11 -11
- package/dist/node/drawer/drawer.module.js +0 -2
- package/dist/node/dropdown/dropdown.js +14 -14
- package/dist/node/dropdown/dropdown.module.js +0 -2
- package/dist/node/editable/editable.js +8 -8
- package/dist/node/editable/editable.module.js +7 -9
- package/dist/node/empty-state/empty-state.js +1 -3
- package/dist/node/empty-state/empty-state.module.js +0 -2
- package/dist/node/fab/fab.js +12 -12
- package/dist/node/fab/fab.module.js +0 -2
- package/dist/node/field/field.js +1 -3
- package/dist/node/field/field.module.js +0 -2
- package/dist/node/file-uploader/file-uploader.js +5 -5
- package/dist/node/file-uploader/file-uploader.module.js +14 -16
- package/dist/node/filter/filter.module.js +0 -2
- package/dist/node/form/form.module.js +0 -2
- package/dist/node/header/header.module.js +0 -2
- package/dist/node/header-panel/header-panel.js +8 -8
- package/dist/node/header-panel/header-panel.module.js +0 -2
- package/dist/node/heading/heading.js +1 -3
- package/dist/node/heading/heading.module.js +0 -2
- package/dist/node/hover-card/hover-card.js +18 -18
- package/dist/node/hover-card/hover-card.module.js +0 -2
- package/dist/node/icon-button/icon-button.js +1 -3
- package/dist/node/icon-button/icon-button.module.js +0 -2
- package/dist/node/image/image.module.js +0 -2
- package/dist/node/index.js +0 -1
- package/dist/node/indicator/indicator.js +0 -2
- package/dist/node/indicator/indicator.module.js +0 -2
- package/dist/node/inline-loading/inline-loading.js +1 -3
- package/dist/node/inline-loading/inline-loading.module.js +0 -2
- package/dist/node/input/input.js +11 -11
- package/dist/node/input/input.module.js +0 -2
- package/dist/node/input-group/input-group.js +1 -3
- package/dist/node/input-group/input-group.module.js +0 -2
- package/dist/node/item/item.js +1 -3
- package/dist/node/item/item.module.js +0 -2
- package/dist/node/join/join.js +0 -2
- package/dist/node/join/join.module.js +0 -2
- package/dist/node/kbd/kbd.js +1 -3
- package/dist/node/kbd/kbd.module.js +0 -2
- package/dist/node/label/label.js +1 -3
- package/dist/node/label/label.module.js +0 -2
- package/dist/node/layouts/src/auto-grid/auto-grid.js +1 -3
- package/dist/node/layouts/src/auto-grid/auto-grid.module.js +0 -2
- package/dist/node/layouts/src/center/center.js +1 -3
- package/dist/node/layouts/src/center/center.module.js +0 -2
- package/dist/node/layouts/src/columns/columns.js +1 -3
- package/dist/node/layouts/src/columns/columns.module.js +0 -2
- package/dist/node/layouts/src/flex/flex.js +1 -3
- package/dist/node/layouts/src/flex/flex.module.js +0 -2
- package/dist/node/layouts/src/grid/grid.js +1 -3
- package/dist/node/layouts/src/grid/grid.module.js +0 -2
- package/dist/node/layouts/src/page-header/page-header.js +1 -3
- package/dist/node/layouts/src/page-header/page-header.module.js +6 -8
- package/dist/node/layouts/src/spacer/spacer.js +1 -3
- package/dist/node/layouts/src/spacer/spacer.module.js +0 -2
- package/dist/node/link/link.js +1 -3
- package/dist/node/link/link.module.js +0 -2
- package/dist/node/list/list.js +1 -3
- package/dist/node/list/list.module.js +0 -2
- package/dist/node/log-viewer/log-viewer.js +15 -15
- package/dist/node/log-viewer/log-viewer.module.js +0 -2
- package/dist/node/menu/menu.js +22 -21
- package/dist/node/menu/menu.module.js +0 -2
- package/dist/node/menu-button/menu-button.js +8 -8
- package/dist/node/menu-button/menu-button.module.js +0 -2
- package/dist/node/menubar/menubar.js +24 -24
- package/dist/node/menubar/menubar.module.js +0 -2
- package/dist/node/modal/modal.js +9 -9
- package/dist/node/modal/modal.module.js +0 -2
- package/dist/node/multi-select/multi-select.js +8 -8
- package/dist/node/multi-select/multi-select.module.js +11 -13
- package/dist/node/native-select/native-select.js +1 -3
- package/dist/node/native-select/native-select.module.js +0 -2
- package/dist/node/navigation-menu/navigation-menu.js +26 -26
- package/dist/node/navigation-menu/navigation-menu.module.js +0 -2
- package/dist/node/notification/notification.js +6 -6
- package/dist/node/notification/notification.module.js +0 -2
- package/dist/node/number-input/number-input.js +7 -7
- package/dist/node/number-input/number-input.module.js +0 -2
- package/dist/node/otp-input/otp-input.js +5 -5
- package/dist/node/otp-input/otp-input.module.js +0 -2
- package/dist/node/overflow-menu/overflow-menu.module.js +0 -2
- package/dist/node/pagination/pagination.module.js +0 -2
- package/dist/node/password-input/password-input.js +8 -8
- package/dist/node/password-input/password-input.module.js +0 -2
- package/dist/node/popover/popover.js +12 -12
- package/dist/node/popover/popover.module.js +0 -2
- package/dist/node/popover/use-popover.js +8 -10
- package/dist/node/progress/progress.js +0 -2
- package/dist/node/progress/progress.module.js +0 -2
- package/dist/node/progress-bar/progress-bar.js +1 -3
- package/dist/node/progress-bar/progress-bar.module.js +0 -2
- package/dist/node/progress-circle/progress-circle.js +1 -3
- package/dist/node/progress-circle/progress-circle.module.js +0 -2
- package/dist/node/progress-indicator/progress-indicator.js +1 -3
- package/dist/node/progress-indicator/progress-indicator.module.js +0 -2
- package/dist/node/prose/prose.js +1 -3
- package/dist/node/prose/prose.module.js +0 -2
- package/dist/node/pull-to-refresh/pull-to-refresh.js +8 -8
- package/dist/node/pull-to-refresh/pull-to-refresh.module.js +0 -2
- package/dist/node/qr-code/encode.js +0 -2
- package/dist/node/qr-code/qr-code.module.js +0 -2
- package/dist/node/radial-progress/radial-progress.js +9 -10
- package/dist/node/radial-progress/radial-progress.module.js +0 -2
- package/dist/node/radio/radio.js +1 -3
- package/dist/node/radio/radio.module.js +0 -2
- package/dist/node/radio-card/radio-card.js +8 -8
- package/dist/node/radio-card/radio-card.module.js +0 -2
- package/dist/node/rating-group/rating-group.module.js +0 -2
- package/dist/node/react/src/index.js +0 -2
- package/dist/node/react/src/theme.js +10 -10
- package/dist/node/relative-time/relative-time.module.js +0 -2
- package/dist/node/resizable/resizable.js +7 -7
- package/dist/node/resizable/resizable.module.js +0 -2
- package/dist/node/scroll-area/scroll-area.js +6 -6
- package/dist/node/scroll-area/scroll-area.module.js +0 -2
- package/dist/node/search/search.js +9 -9
- package/dist/node/search/search.module.js +0 -2
- package/dist/node/segmented-control/segmented-control.module.js +0 -2
- package/dist/node/select/select.js +11 -11
- package/dist/node/select/select.module.js +0 -2
- package/dist/node/separator/separator.js +1 -3
- package/dist/node/separator/separator.module.js +0 -2
- package/dist/node/sheet/sheet.js +4 -4
- package/dist/node/sheet/sheet.module.js +0 -2
- package/dist/node/shell-header/shell-header.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 +6 -6
- package/dist/node/skip-nav/skip-nav.module.js +0 -2
- package/dist/node/slider/slider.js +1 -3
- package/dist/node/slider/slider.module.js +0 -2
- package/dist/node/spinner/spinner.module.js +0 -2
- package/dist/node/stack/stack.js +0 -2
- package/dist/node/stack/stack.module.js +0 -2
- package/dist/node/stat/stat.js +22 -23
- package/dist/node/stat/stat.module.js +7 -9
- package/dist/node/status/status.js +1 -3
- package/dist/node/status/status.module.js +0 -2
- package/dist/node/steps/steps.module.js +0 -2
- package/dist/node/storage/src/drivers.js +0 -2
- package/dist/node/storage/src/persisted-signal.js +0 -2
- package/dist/node/structured-list/structured-list.js +10 -10
- package/dist/node/structured-list/structured-list.module.js +0 -2
- package/dist/node/swap/swap.js +10 -11
- package/dist/node/swap/swap.module.js +0 -2
- package/dist/node/swipe-item/swipe-item.module.js +0 -2
- package/dist/node/switcher/switcher.module.js +0 -2
- package/dist/node/tabs/tabs.js +38 -38
- package/dist/node/tabs/tabs.module.js +0 -2
- package/dist/node/tag/tag.module.js +0 -2
- package/dist/node/tags-input/tags-input.js +6 -6
- package/dist/node/tags-input/tags-input.module.js +4 -6
- package/dist/node/text/text.js +1 -3
- package/dist/node/text/text.module.js +0 -2
- package/dist/node/textarea/textarea.js +11 -11
- package/dist/node/textarea/textarea.module.js +0 -2
- package/dist/node/tile/tile.module.js +0 -2
- package/dist/node/time-picker/time-picker.js +9 -9
- package/dist/node/time-picker/time-picker.module.js +5 -7
- package/dist/node/timeline/timeline.js +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/visually-hidden/visually-hidden.js +1 -3
- package/dist/notification/notification.js +6 -6
- package/dist/notification/notification.module.js +0 -2
- package/dist/number-input/number-input.js +7 -7
- package/dist/number-input/number-input.module.js +0 -2
- package/dist/otp-input/otp-input.js +5 -5
- package/dist/otp-input/otp-input.module.js +0 -2
- package/dist/overflow-menu/overflow-menu.module.js +0 -2
- package/dist/pagination/pagination.module.js +0 -2
- package/dist/password-input/password-input.js +8 -8
- package/dist/password-input/password-input.module.js +0 -2
- package/dist/popover/popover.js +12 -12
- package/dist/popover/popover.module.js +0 -2
- package/dist/popover/use-popover.js +8 -10
- package/dist/progress/progress.js +0 -2
- package/dist/progress/progress.module.js +0 -2
- package/dist/progress-bar/progress-bar.js +1 -3
- package/dist/progress-bar/progress-bar.module.js +0 -2
- package/dist/progress-circle/progress-circle.js +1 -3
- package/dist/progress-circle/progress-circle.module.js +0 -2
- package/dist/progress-indicator/progress-indicator.js +1 -3
- package/dist/progress-indicator/progress-indicator.module.js +0 -2
- package/dist/prose/prose.js +1 -3
- package/dist/prose/prose.module.js +0 -2
- package/dist/pull-to-refresh/pull-to-refresh.js +8 -8
- package/dist/pull-to-refresh/pull-to-refresh.module.js +0 -2
- package/dist/qr-code/encode.js +0 -2
- package/dist/qr-code/qr-code.module.js +0 -2
- package/dist/radial-progress/radial-progress.js +9 -10
- package/dist/radial-progress/radial-progress.module.js +0 -2
- package/dist/radio/radio.js +1 -3
- package/dist/radio/radio.module.js +0 -2
- package/dist/radio-card/radio-card.js +8 -8
- package/dist/radio-card/radio-card.module.js +0 -2
- package/dist/rating-group/rating-group.module.js +0 -2
- package/dist/react/src/index.js +0 -2
- package/dist/react/src/theme.js +10 -10
- package/dist/relative-time/relative-time.module.js +0 -2
- package/dist/resizable/resizable.js +7 -7
- package/dist/resizable/resizable.module.js +0 -2
- package/dist/scroll-area/scroll-area.js +6 -6
- package/dist/scroll-area/scroll-area.module.js +0 -2
- package/dist/search/search.js +9 -9
- package/dist/search/search.module.js +0 -2
- package/dist/segmented-control/segmented-control.module.js +0 -2
- package/dist/select/select.js +11 -11
- package/dist/select/select.module.js +0 -2
- package/dist/separator/separator.js +1 -3
- package/dist/separator/separator.module.js +0 -2
- package/dist/sheet/sheet.js +4 -4
- package/dist/sheet/sheet.module.js +0 -2
- package/dist/shell-header/shell-header.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 +6 -6
- package/dist/skip-nav/skip-nav.module.js +0 -2
- package/dist/slider/slider.js +1 -3
- package/dist/slider/slider.module.js +0 -2
- package/dist/spinner/spinner.module.js +0 -2
- package/dist/stack/stack.js +0 -2
- package/dist/stack/stack.module.js +0 -2
- package/dist/stat/stat.css +1 -1
- package/dist/stat/stat.js +22 -23
- package/dist/stat/stat.module.js +7 -9
- package/dist/status/status.js +1 -3
- package/dist/status/status.module.js +0 -2
- package/dist/steps/steps.module.js +0 -2
- package/dist/storage/src/drivers.js +0 -2
- package/dist/storage/src/persisted-signal.js +0 -2
- package/dist/structured-list/structured-list.js +10 -10
- package/dist/structured-list/structured-list.module.js +0 -2
- package/dist/styles.css +14 -14
- package/dist/swap/swap.js +10 -11
- package/dist/swap/swap.module.js +0 -2
- package/dist/swipe-item/swipe-item.module.js +0 -2
- package/dist/switcher/switcher.module.js +0 -2
- package/dist/tabs/tabs.js +38 -38
- package/dist/tabs/tabs.module.js +0 -2
- package/dist/tag/tag.module.js +0 -2
- package/dist/tags-input/tags-input.css +1 -1
- package/dist/tags-input/tags-input.js +6 -6
- package/dist/tags-input/tags-input.module.js +4 -6
- package/dist/text/text.js +1 -3
- package/dist/text/text.module.js +0 -2
- package/dist/textarea/textarea.js +11 -11
- package/dist/textarea/textarea.module.js +0 -2
- package/dist/tile/tile.module.js +0 -2
- package/dist/time-picker/time-picker.css +1 -1
- package/dist/time-picker/time-picker.js +9 -9
- package/dist/time-picker/time-picker.module.js +5 -7
- package/dist/timeline/timeline.css +1 -1
- package/dist/timeline/timeline.js +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/visually-hidden/visually-hidden.js +1 -3
- package/package.json +4 -4
- package/readme.body.md +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cascivo.component{.
|
|
1
|
+
@layer cascivo.component{._wrapper_g43fz_2{gap:var(--cascivo-space-1);min-inline-size:0;font-family:var(--cascivo-font-sans);flex-direction:column;display:inline-flex;position:relative}._wrapper_g43fz_2[data-size=sm]{--_height:2rem;--_font:var(--cascivo-text-sm);--_px:var(--cascivo-space-3)}._wrapper_g43fz_2[data-size=md]{--_height:2.5rem;--_font:var(--cascivo-text-sm);--_px:var(--cascivo-space-4)}._wrapper_g43fz_2[data-size=lg]{--_height:3rem;--_font:var(--cascivo-text-base);--_px:var(--cascivo-space-4)}._label_g43fz_31{font-size:var(--cascivo-text-sm);font-weight:var(--cascivo-font-medium);color:var(--cascivo-color-text);line-height:var(--cascivo-leading-snug)}._field_g43fz_38{align-items:center;display:flex;position:relative}._trigger_g43fz_44{justify-content:space-between;align-items:center;gap:var(--cascivo-space-2);block-size:var(--_height,2.5rem);min-inline-size:12rem;padding-inline:var(--_px,var(--cascivo-space-4));font-family:var(--cascivo-font-sans);font-size:var(--_font,var(--cascivo-text-sm));color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-field);cursor:pointer;text-align:start;transition:border-color var(--cascivo-duration-150) var(--cascivo-ease-out), box-shadow var(--cascivo-duration-150) var(--cascivo-ease-out);outline:none;display:flex}._trigger_g43fz_44:hover:not(:disabled){border-color:var(--cascivo-color-border-strong)}._trigger_g43fz_44:focus-visible{border-color:var(--cascivo-color-accent);box-shadow:0 0 0 3px color-mix(in srgb, var(--cascivo-color-accent) 20%, transparent)}._trigger_g43fz_44:disabled{opacity:.5;cursor:not-allowed}._wrapper_g43fz_2[data-state=error] ._trigger_g43fz_44{border-color:var(--cascivo-color-destructive)}._value_g43fz_82{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}._placeholder_g43fz_88{color:var(--cascivo-color-text-subtle)}._icon_g43fz_91{color:var(--cascivo-color-text-muted);font-style:normal}._clear_g43fz_96{cursor:pointer;min-block-size:1.5rem;min-inline-size:1.5rem;color:var(--cascivo-color-text-muted);font-size:var(--cascivo-text-xs);padding:var(--cascivo-space-1);border-radius:var(--cascivo-radius-control);background:0 0;border:none;outline:none;justify-content:center;align-items:center;display:inline-flex;position:absolute;inset-inline-end:var(--cascivo-space-8)}._clear_g43fz_96:hover{color:var(--cascivo-color-text)}._clear_g43fz_96:focus-visible{box-shadow:0 0 0 2px var(--cascivo-color-accent)}._calendar_g43fz_121{z-index:var(--cascivo-z-dropdown);padding:var(--cascivo-space-3);background-color:var(--cascivo-color-surface-overlay);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-overlay);box-shadow:var(--cascivo-shadow-overlay);opacity:0;visibility:hidden;transition:opacity var(--cascivo-motion-enter), translate var(--cascivo-motion-enter), visibility var(--cascivo-motion-enter);position:absolute;inset-block-start:calc(100% + var(--cascivo-space-1));inset-inline-start:0;translate:0 -.25rem}._calendar_g43fz_121[data-state=open]{opacity:1;visibility:visible;translate:0}@starting-style{._calendar_g43fz_121[data-state=open]{opacity:0;translate:0 -.25rem}}._header_g43fz_153{justify-content:space-between;align-items:center;margin-block-end:var(--cascivo-space-2);display:flex}._monthLabel_g43fz_160{font-size:var(--cascivo-text-sm);font-weight:var(--cascivo-font-semibold);color:var(--cascivo-color-text)}._navButton_g43fz_166{border-radius:var(--cascivo-radius-control);cursor:pointer;block-size:2rem;inline-size:2rem;color:var(--cascivo-color-text-muted);font-size:var(--cascivo-text-base);background:0 0;border:1px solid #0000;outline:none;justify-content:center;align-items:center;display:inline-flex}._navButton_g43fz_166:hover{background-color:var(--cascivo-color-bg-subtle);color:var(--cascivo-color-text)}._navButton_g43fz_166:focus-visible{border-color:var(--cascivo-color-accent)}._grid_g43fz_188{border-collapse:collapse;inline-size:100%}._weekday_g43fz_193{padding-block:var(--cascivo-space-1);font-size:var(--cascivo-text-xs);font-weight:var(--cascivo-font-medium);color:var(--cascivo-color-text-muted);text-align:center;inline-size:2.25rem}._cell_g43fz_202{text-align:center;padding:2px}._empty_g43fz_206{inline-size:2.25rem}._day_g43fz_210{block-size:2.25rem;inline-size:2.25rem;font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);border-radius:var(--cascivo-radius-control);cursor:pointer;background:0 0;border:none;outline:none;justify-content:center;align-items:center;display:flex}._day_g43fz_210:hover:not([aria-disabled]){background-color:var(--cascivo-color-bg-subtle)}._day_g43fz_210:focus-visible{box-shadow:0 0 0 2px var(--cascivo-color-accent)}._day_g43fz_210[data-today]{font-weight:var(--cascivo-font-semibold);color:var(--cascivo-color-accent)}._day_g43fz_210[data-selected]{background-color:var(--cascivo-color-accent);color:var(--cascivo-color-accent-foreground,var(--cascivo-color-text-on-accent))}._day_g43fz_210[aria-disabled]{opacity:.35;cursor:not-allowed}._error_g43fz_245{font-size:var(--cascivo-text-xs);color:var(--cascivo-color-destructive)}._hint_g43fz_249{font-size:var(--cascivo-text-xs);color:var(--cascivo-color-text-muted)}}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./date-picker.module.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useId as t, useRef as n } from "react";
|
|
5
|
+
import { batch as r, cn as i, createMachine as a, useMachine as o, useSignal as s, useSignalEffect as c, useSignals as ee } from "@cascivo/core";
|
|
6
6
|
import { builtin as l, currentLocale as te, t as u } from "@cascivo/i18n";
|
|
7
7
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
8
|
//#region ../components/src/date-picker/date-picker.tsx
|
|
9
|
-
var p =
|
|
9
|
+
var p = a({
|
|
10
10
|
initial: "closed",
|
|
11
11
|
states: {
|
|
12
12
|
closed: { on: { OPEN: "open" } },
|
|
@@ -39,12 +39,12 @@ function _(e) {
|
|
|
39
39
|
let [t, n, r] = e.split("-").map(Number);
|
|
40
40
|
return new Date(Date.UTC(t, n - 1, r));
|
|
41
41
|
}
|
|
42
|
-
function v({ value:
|
|
43
|
-
|
|
44
|
-
let [j, M] =
|
|
45
|
-
|
|
46
|
-
let H =
|
|
47
|
-
|
|
42
|
+
function v({ value: a, defaultValue: v, onValueChange: y, onChange: b, min: x, max: S, clearable: C = !1, label: w, hint: T, error: E, size: D = "md", disabled: O = !1, labels: k, className: re, id: A }) {
|
|
43
|
+
ee();
|
|
44
|
+
let [j, M] = o(p), N = t(), P = A ?? `cascade-date-picker-${N}`, F = `${N}-grid`, I = te(), ie = k?.placeholder ?? u(l.datePicker.placeholder), ae = k?.previousMonth ?? u(l.datePicker.previousMonth), L = k?.nextMonth ?? u(l.datePicker.nextMonth), R = k?.clear ?? u(l.datePicker.clear), z = /* @__PURE__ */ new Date(), B = g(z), V = s(a ?? v);
|
|
45
|
+
a !== void 0 && (V.value = a);
|
|
46
|
+
let H = s(V.value ? _(V.value).getUTCFullYear() : z.getUTCFullYear()), U = s(V.value ? _(V.value).getUTCMonth() : z.getUTCMonth()), W = s(V.value), G = n(null);
|
|
47
|
+
c(() => {
|
|
48
48
|
if (j.value !== "open") return;
|
|
49
49
|
let e = (e) => {
|
|
50
50
|
G.current && !G.current.contains(e.target) && M("CLOSE");
|
|
@@ -54,15 +54,15 @@ function v({ value: r, defaultValue: v, onValueChange: y, onChange: b, min: x, m
|
|
|
54
54
|
let K = () => {
|
|
55
55
|
O || M("OPEN");
|
|
56
56
|
}, q = () => M("CLOSE"), J = y ?? b, Y = (e) => {
|
|
57
|
-
x && e < x || S && e > S || (
|
|
57
|
+
x && e < x || S && e > S || (a === void 0 && (V.value = e), J?.(e), q());
|
|
58
58
|
}, oe = (e) => {
|
|
59
|
-
e.stopPropagation(),
|
|
59
|
+
e.stopPropagation(), a === void 0 && (V.value = void 0), J?.(void 0);
|
|
60
60
|
}, se = () => {
|
|
61
|
-
U.value === 0 ?
|
|
61
|
+
U.value === 0 ? r(() => {
|
|
62
62
|
H.value--, U.value = 11;
|
|
63
63
|
}) : U.value--;
|
|
64
64
|
}, ce = () => {
|
|
65
|
-
U.value === 11 ?
|
|
65
|
+
U.value === 11 ? r(() => {
|
|
66
66
|
H.value++, U.value = 0;
|
|
67
67
|
}) : U.value++;
|
|
68
68
|
}, X = ne(I), Z = m(H.value, U.value, X), le = new Intl.DateTimeFormat(I, { weekday: "short" }), ue = Array.from({ length: 7 }, (e, t) => {
|
|
@@ -72,15 +72,15 @@ function v({ value: r, defaultValue: v, onValueChange: y, onChange: b, min: x, m
|
|
|
72
72
|
month: "long",
|
|
73
73
|
year: "numeric"
|
|
74
74
|
}).format(new Date(Date.UTC(H.value, U.value, 1))), de = (e) => {
|
|
75
|
-
let
|
|
76
|
-
if (!
|
|
77
|
-
let
|
|
78
|
-
if (e.key === "ArrowRight") i = new Date(Date.UTC(
|
|
79
|
-
else if (e.key === "ArrowLeft") i = new Date(Date.UTC(
|
|
80
|
-
else if (e.key === "ArrowDown") i = new Date(Date.UTC(
|
|
81
|
-
else if (e.key === "ArrowUp") i = new Date(Date.UTC(
|
|
75
|
+
let t = W.value;
|
|
76
|
+
if (!t) return;
|
|
77
|
+
let n = _(t), i;
|
|
78
|
+
if (e.key === "ArrowRight") i = new Date(Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate() + 1));
|
|
79
|
+
else if (e.key === "ArrowLeft") i = new Date(Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate() - 1));
|
|
80
|
+
else if (e.key === "ArrowDown") i = new Date(Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate() + 7));
|
|
81
|
+
else if (e.key === "ArrowUp") i = new Date(Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate() - 7));
|
|
82
82
|
else if (e.key === "Enter" || e.key === " ") {
|
|
83
|
-
e.preventDefault(), Y(
|
|
83
|
+
e.preventDefault(), Y(t);
|
|
84
84
|
return;
|
|
85
85
|
} else if (e.key === "Escape") {
|
|
86
86
|
q();
|
|
@@ -89,14 +89,14 @@ function v({ value: r, defaultValue: v, onValueChange: y, onChange: b, min: x, m
|
|
|
89
89
|
if (e.preventDefault(), i) {
|
|
90
90
|
let e = g(i);
|
|
91
91
|
if (x && e < x || S && e > S) return;
|
|
92
|
-
W.value = e,
|
|
92
|
+
W.value = e, r(() => {
|
|
93
93
|
H.value = i.getUTCFullYear(), U.value = i.getUTCMonth();
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
}, $ = V.value ? h(_(V.value), I) : "";
|
|
97
97
|
return /* @__PURE__ */ f("div", {
|
|
98
98
|
ref: G,
|
|
99
|
-
className:
|
|
99
|
+
className: i(e.wrapper, re),
|
|
100
100
|
"data-state": E ? "error" : j.value,
|
|
101
101
|
"data-size": D,
|
|
102
102
|
children: [
|
|
@@ -120,7 +120,7 @@ function v({ value: r, defaultValue: v, onValueChange: y, onChange: b, min: x, m
|
|
|
120
120
|
disabled: O,
|
|
121
121
|
onClick: j.value === "open" ? q : K,
|
|
122
122
|
children: [/* @__PURE__ */ d("span", {
|
|
123
|
-
className:
|
|
123
|
+
className: i(e.value, $ ? void 0 : e.placeholder),
|
|
124
124
|
children: $ || ie
|
|
125
125
|
}), /* @__PURE__ */ d("span", {
|
|
126
126
|
className: e.icon,
|
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
1
|
import './date-picker.css';
|
|
4
2
|
var e = {
|
|
5
|
-
wrapper: "
|
|
6
|
-
label: "
|
|
7
|
-
field: "
|
|
8
|
-
trigger: "
|
|
9
|
-
value: "
|
|
10
|
-
placeholder: "
|
|
11
|
-
icon: "
|
|
12
|
-
clear: "
|
|
13
|
-
calendar: "
|
|
14
|
-
header: "
|
|
15
|
-
monthLabel: "
|
|
16
|
-
navButton: "
|
|
17
|
-
grid: "
|
|
18
|
-
weekday: "
|
|
19
|
-
cell: "
|
|
20
|
-
empty: "
|
|
21
|
-
day: "
|
|
22
|
-
error: "
|
|
23
|
-
hint: "
|
|
3
|
+
wrapper: "_wrapper_g43fz_2",
|
|
4
|
+
label: "_label_g43fz_31",
|
|
5
|
+
field: "_field_g43fz_38",
|
|
6
|
+
trigger: "_trigger_g43fz_44",
|
|
7
|
+
value: "_value_g43fz_82",
|
|
8
|
+
placeholder: "_placeholder_g43fz_88",
|
|
9
|
+
icon: "_icon_g43fz_91",
|
|
10
|
+
clear: "_clear_g43fz_96",
|
|
11
|
+
calendar: "_calendar_g43fz_121",
|
|
12
|
+
header: "_header_g43fz_153",
|
|
13
|
+
monthLabel: "_monthLabel_g43fz_160",
|
|
14
|
+
navButton: "_navButton_g43fz_166",
|
|
15
|
+
grid: "_grid_g43fz_188",
|
|
16
|
+
weekday: "_weekday_g43fz_193",
|
|
17
|
+
cell: "_cell_g43fz_202",
|
|
18
|
+
empty: "_empty_g43fz_206",
|
|
19
|
+
day: "_day_g43fz_210",
|
|
20
|
+
error: "_error_g43fz_245",
|
|
21
|
+
hint: "_hint_g43fz_249"
|
|
24
22
|
};
|
|
25
23
|
//#endregion
|
|
26
24
|
export { e as default };
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { Calendar as e } from "../calendar/calendar.js";
|
|
4
4
|
import t from "./date-range-picker.module.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useRef as n } from "react";
|
|
6
|
+
import { batch as r, cn as i, useControllableSignal as a, useSignal as o, useSignalEffect as s, useSignals as ee } from "@cascivo/core";
|
|
7
7
|
import { builtin as c, currentLocale 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/date-range-picker/date-range-picker.tsx
|
|
@@ -20,16 +20,16 @@ function h(e, t, n) {
|
|
|
20
20
|
month: r.getUTCMonth()
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
function g({ value: g, defaultValue: _, onValueChange:
|
|
24
|
-
|
|
25
|
-
let
|
|
23
|
+
function g({ value: g, defaultValue: _, onValueChange: v, min: y, max: b, disabled: x, presets: S, locale: C, placeholder: w, size: T = "md", labels: E, className: D }) {
|
|
24
|
+
ee();
|
|
25
|
+
let O = C ?? l(), te = w ?? u(c.dateRangePicker.placeholder), ne = E?.apply ?? u(c.dateRangePicker.apply), re = E?.clear ?? u(c.dateRangePicker.clear), k = E?.previousMonth ?? u(c.calendar.previousMonth), A = E?.nextMonth ?? u(c.calendar.nextMonth), [j, M] = a({
|
|
26
26
|
value: g === void 0 ? void 0 : g,
|
|
27
27
|
defaultValue: _ ?? null,
|
|
28
28
|
onChange: (e) => {
|
|
29
|
-
e &&
|
|
29
|
+
e && v?.(e);
|
|
30
30
|
}
|
|
31
|
-
}), N =
|
|
32
|
-
|
|
31
|
+
}), N = o(!1), P = o(null), F = o(null), I = j.value?.start ?? _?.start ?? /* @__PURE__ */ new Date(), L = o(I.getUTCFullYear()), R = o(I.getUTCMonth()), z = n(null);
|
|
32
|
+
s(() => {
|
|
33
33
|
if (!N.value) return;
|
|
34
34
|
let e = (e) => {
|
|
35
35
|
z.current && !z.current.contains(e.target) && (N.value = !1);
|
|
@@ -42,7 +42,7 @@ function g({ value: g, defaultValue: _, onValueChange: te, min: v, max: y, disab
|
|
|
42
42
|
N.value = !1;
|
|
43
43
|
}, H = (e) => {
|
|
44
44
|
let t = h(L.value, R.value, e);
|
|
45
|
-
|
|
45
|
+
r(() => {
|
|
46
46
|
L.value = t.year, R.value = t.month;
|
|
47
47
|
});
|
|
48
48
|
}, U = (e) => {
|
|
@@ -52,43 +52,43 @@ function g({ value: g, defaultValue: _, onValueChange: te, min: v, max: y, disab
|
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
54
|
if (m(t, e)) {
|
|
55
|
-
|
|
55
|
+
r(() => {
|
|
56
56
|
P.value = null, F.value = null;
|
|
57
57
|
}), M(null);
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
|
-
let
|
|
60
|
+
let n = p(t) <= p(e) ? {
|
|
61
61
|
start: t,
|
|
62
62
|
end: e
|
|
63
63
|
} : {
|
|
64
64
|
start: e,
|
|
65
65
|
end: t
|
|
66
66
|
};
|
|
67
|
-
|
|
67
|
+
r(() => {
|
|
68
68
|
P.value = null, F.value = null;
|
|
69
|
-
}), M(
|
|
69
|
+
}), M(n);
|
|
70
70
|
}, W = (e) => {
|
|
71
|
-
|
|
71
|
+
r(() => {
|
|
72
72
|
P.value = null, F.value = null, L.value = e.range.start.getUTCFullYear(), R.value = e.range.start.getUTCMonth();
|
|
73
73
|
}), M(e.range);
|
|
74
74
|
}, G = () => {
|
|
75
|
-
|
|
75
|
+
r(() => {
|
|
76
76
|
P.value = null, F.value = null;
|
|
77
77
|
}), M(null);
|
|
78
78
|
}, K = P.value ?? j.value?.start ?? null, q = P.value ? F.value ?? null : j.value?.end ?? null, J = K && q ? Math.min(p(K), p(q)) : null, Y = K && q ? Math.max(p(K), p(q)) : null, ie = (e) => {
|
|
79
79
|
if (J === null || Y === null) return !1;
|
|
80
80
|
let t = p(e);
|
|
81
81
|
return t > J && t < Y;
|
|
82
|
-
}, ae = (e) => m(e, K) || J !== null && p(e) === J, oe = (e) => m(e, q) || Y !== null && p(e) === Y, X = new Intl.DateTimeFormat(
|
|
82
|
+
}, ae = (e) => m(e, K) || J !== null && p(e) === J, oe = (e) => m(e, q) || Y !== null && p(e) === Y, X = new Intl.DateTimeFormat(O, {
|
|
83
83
|
year: "numeric",
|
|
84
84
|
month: "short",
|
|
85
85
|
day: "numeric"
|
|
86
86
|
}), Z = j.value ? `${X.format(j.value.start)} → ${X.format(j.value.end)}` : "", Q = h(L.value, R.value, 1), $ = {
|
|
87
|
-
locale:
|
|
88
|
-
size:
|
|
89
|
-
...
|
|
90
|
-
...
|
|
91
|
-
...
|
|
87
|
+
locale: O,
|
|
88
|
+
size: T,
|
|
89
|
+
...y === void 0 ? {} : { min: y },
|
|
90
|
+
...b === void 0 ? {} : { max: b },
|
|
91
|
+
...x === void 0 ? {} : { disabled: x },
|
|
92
92
|
hideNav: !0,
|
|
93
93
|
isInRange: ie,
|
|
94
94
|
isRangeStart: ae,
|
|
@@ -104,8 +104,8 @@ function g({ value: g, defaultValue: _, onValueChange: te, min: v, max: y, disab
|
|
|
104
104
|
};
|
|
105
105
|
return /* @__PURE__ */ f("div", {
|
|
106
106
|
ref: z,
|
|
107
|
-
className:
|
|
108
|
-
"data-size":
|
|
107
|
+
className: i(t.wrapper, D),
|
|
108
|
+
"data-size": T,
|
|
109
109
|
onKeyDown: (e) => {
|
|
110
110
|
e.key === "Escape" && N.value && (e.stopPropagation(), V());
|
|
111
111
|
},
|
|
@@ -114,12 +114,12 @@ function g({ value: g, defaultValue: _, onValueChange: te, min: v, max: y, disab
|
|
|
114
114
|
role: "combobox",
|
|
115
115
|
"aria-expanded": N.value,
|
|
116
116
|
"aria-haspopup": "dialog",
|
|
117
|
-
"aria-label":
|
|
117
|
+
"aria-label": E?.label ?? u(c.dateRangePicker.label),
|
|
118
118
|
className: t.trigger,
|
|
119
119
|
onClick: N.value ? V : B,
|
|
120
120
|
children: [/* @__PURE__ */ d("span", {
|
|
121
|
-
className:
|
|
122
|
-
children: Z ||
|
|
121
|
+
className: i(t.value, Z ? void 0 : t.placeholder),
|
|
122
|
+
children: Z || te
|
|
123
123
|
}), /* @__PURE__ */ d("span", {
|
|
124
124
|
className: t.icon,
|
|
125
125
|
"aria-hidden": "true",
|
|
@@ -130,9 +130,9 @@ function g({ value: g, defaultValue: _, onValueChange: te, min: v, max: y, disab
|
|
|
130
130
|
className: t.panel,
|
|
131
131
|
"data-state": N.value ? "open" : "closed",
|
|
132
132
|
children: [
|
|
133
|
-
|
|
133
|
+
S && S.length > 0 && /* @__PURE__ */ d("div", {
|
|
134
134
|
className: t.presets,
|
|
135
|
-
children:
|
|
135
|
+
children: S.map((e) => /* @__PURE__ */ d("button", {
|
|
136
136
|
type: "button",
|
|
137
137
|
className: t.preset,
|
|
138
138
|
onClick: () => W(e),
|
|
@@ -180,12 +180,12 @@ function g({ value: g, defaultValue: _, onValueChange: te, min: v, max: y, disab
|
|
|
180
180
|
type: "button",
|
|
181
181
|
className: t.clearBtn,
|
|
182
182
|
onClick: G,
|
|
183
|
-
children:
|
|
183
|
+
children: re
|
|
184
184
|
}), /* @__PURE__ */ d("button", {
|
|
185
185
|
type: "button",
|
|
186
186
|
className: t.applyBtn,
|
|
187
187
|
onClick: V,
|
|
188
|
-
children:
|
|
188
|
+
children: ne
|
|
189
189
|
})]
|
|
190
190
|
})
|
|
191
191
|
]
|
package/dist/dock/dock.module.js
CHANGED
package/dist/drawer/drawer.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./drawer.module.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useId as t } from "react";
|
|
5
|
+
import { DismissableLayer as n, FocusScope as r, Portal as i, Presence as a, cn as o, useControllableSignal as s, useDraggable as c, useScrollLock 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/drawer/drawer.tsx
|
|
9
9
|
var h = 80;
|
|
10
10
|
function g({ open: g, defaultOpen: _, onOpenChange: v, side: y = "end", size: b, title: x, description: S, children: C, labels: w, className: T, swipeToDismiss: E = !1 }) {
|
|
11
|
-
|
|
12
|
-
let [D, O] =
|
|
11
|
+
u();
|
|
12
|
+
let [D, O] = s({
|
|
13
13
|
value: g,
|
|
14
14
|
defaultValue: _ ?? !1,
|
|
15
15
|
onChange: v
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
let k = y === "top" || y === "bottom" ? "y" : "x", { handleRef: A, offset: j, isDragging: M, reset: N } =
|
|
17
|
+
l(D);
|
|
18
|
+
let k = y === "top" || y === "bottom" ? "y" : "x", { handleRef: A, offset: j, isDragging: M, reset: N } = c({
|
|
19
19
|
isDisabled: !E,
|
|
20
20
|
axis: k,
|
|
21
21
|
onDragEnd: (e) => {
|
|
22
22
|
let t = k === "y" ? e.y : e.x, n = y === "end" && t > h || y === "start" && t < -80 || y === "bottom" && t > h || y === "top" && t < -80;
|
|
23
23
|
N(), n && O(!1);
|
|
24
24
|
}
|
|
25
|
-
}), P =
|
|
25
|
+
}), P = t(), F = t(), I = w?.close ?? f(d.drawer.close), L = {
|
|
26
26
|
...b ? { "--_drawer-size": b } : {},
|
|
27
27
|
...E ? {
|
|
28
28
|
"--_drawer-drag-x": `${j.value.x}px`,
|
|
29
29
|
"--_drawer-drag-y": `${j.value.y}px`
|
|
30
30
|
} : {}
|
|
31
31
|
};
|
|
32
|
-
return /* @__PURE__ */ p(
|
|
32
|
+
return /* @__PURE__ */ p(i, { children: /* @__PURE__ */ p(a, {
|
|
33
33
|
present: D,
|
|
34
34
|
children: /* @__PURE__ */ p("div", {
|
|
35
35
|
className: e.overlay,
|
|
36
36
|
"data-side": y,
|
|
37
|
-
children: /* @__PURE__ */ p(
|
|
37
|
+
children: /* @__PURE__ */ p(n, {
|
|
38
38
|
onDismiss: () => O(!1),
|
|
39
|
-
children: /* @__PURE__ */ p(
|
|
39
|
+
children: /* @__PURE__ */ p(r, {
|
|
40
40
|
trapped: !0,
|
|
41
41
|
restoreFocus: !0,
|
|
42
42
|
autoFocus: !0,
|
|
@@ -47,7 +47,7 @@ function g({ open: g, defaultOpen: _, onOpenChange: v, side: y = "end", size: b,
|
|
|
47
47
|
"aria-describedby": S ? F : void 0,
|
|
48
48
|
"data-side": y,
|
|
49
49
|
"data-dragging": E && M.value ? "" : void 0,
|
|
50
|
-
className:
|
|
50
|
+
className: o(e.panel, T),
|
|
51
51
|
style: L,
|
|
52
52
|
children: [(x || S) && /* @__PURE__ */ m("div", {
|
|
53
53
|
className: e.header,
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./dropdown.module.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { cloneElement as t, useRef as n } from "react";
|
|
5
|
+
import { composeRefs as r, createMachine as i, focusElement as a, useEffectPropSignal as o, useMachine as s, useSignal as c, useSignalEffect as l, useSignals as u } from "@cascivo/core";
|
|
6
6
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
7
7
|
//#region ../components/src/dropdown/dropdown.tsx
|
|
8
|
-
var p =
|
|
8
|
+
var p = i({
|
|
9
9
|
initial: "closed",
|
|
10
10
|
states: {
|
|
11
11
|
closed: { on: { OPEN: "open" } },
|
|
12
12
|
open: { on: { CLOSE: "closed" } }
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
|
-
function m({ trigger:
|
|
16
|
-
|
|
17
|
-
let [y, b] =
|
|
15
|
+
function m({ trigger: i, items: m, onSelect: h, placement: g = "bottom-start", open: _, onOpenChange: v }) {
|
|
16
|
+
u();
|
|
17
|
+
let [y, b] = s(p), x = n(null), S = n(null), C = n(null), w = n([]), T = c(-1), E = _ !== void 0, D = E ? _ : y.value === "open", O = o(D), k = m.map((e, t) => ({
|
|
18
18
|
item: e,
|
|
19
19
|
index: t
|
|
20
20
|
})).filter(({ item: e }) => !e.separator && !e.disabled).map(({ index: e }) => e), A = (e) => {
|
|
21
21
|
E || b(e ? "OPEN" : "CLOSE"), v?.(e);
|
|
22
22
|
};
|
|
23
|
-
|
|
23
|
+
l(() => {
|
|
24
24
|
let e = T.value;
|
|
25
25
|
O.value && e >= 0 && w.current[e]?.focus();
|
|
26
|
-
}),
|
|
26
|
+
}), l(() => {
|
|
27
27
|
O.value ? T.value = k[0] ?? -1 : T.value = -1;
|
|
28
|
-
}),
|
|
28
|
+
}), l(() => {
|
|
29
29
|
O.value ? C.current?.showPopover() : C.current?.hidePopover();
|
|
30
|
-
}),
|
|
30
|
+
}), l(() => {
|
|
31
31
|
let e = C.current;
|
|
32
32
|
if (!e) return;
|
|
33
33
|
let t = (e) => {
|
|
@@ -37,7 +37,7 @@ function m({ trigger: n, items: m, onSelect: h, placement: g = "bottom-start", o
|
|
|
37
37
|
});
|
|
38
38
|
let j = (e) => {
|
|
39
39
|
let t = m[e];
|
|
40
|
-
!t || t.separator || t.disabled || (h?.(t.value), A(!1),
|
|
40
|
+
!t || t.separator || t.disabled || (h?.(t.value), A(!1), a(S.current));
|
|
41
41
|
}, M = (e) => {
|
|
42
42
|
k.length !== 0 && (T.value = k[(k.indexOf(T.value) + e + k.length) % k.length] ?? -1);
|
|
43
43
|
}, N = (e) => {
|
|
@@ -55,15 +55,15 @@ function m({ trigger: n, items: m, onSelect: h, placement: g = "bottom-start", o
|
|
|
55
55
|
e.preventDefault(), T.value = k[k.length - 1] ?? -1;
|
|
56
56
|
break;
|
|
57
57
|
case "Escape":
|
|
58
|
-
e.preventDefault(), A(!1),
|
|
58
|
+
e.preventDefault(), A(!1), a(S.current);
|
|
59
59
|
break;
|
|
60
60
|
case "Enter":
|
|
61
61
|
case " ":
|
|
62
62
|
e.preventDefault(), j(T.value);
|
|
63
63
|
break;
|
|
64
64
|
}
|
|
65
|
-
}, P =
|
|
66
|
-
ref:
|
|
65
|
+
}, P = i, F = t(P, {
|
|
66
|
+
ref: r(S, P.props.ref),
|
|
67
67
|
onClick: (e) => {
|
|
68
68
|
P.props.onClick?.(e), A(!D);
|
|
69
69
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cascivo.component{.
|
|
1
|
+
@layer cascivo.component{._wrapper_17cwn_2{align-items:center;min-width:4rem;display:inline-flex}._preview_17cwn_8{align-items:center;gap:var(--cascivo-space-2);padding-block:var(--cascivo-space-1);padding-inline:var(--cascivo-space-1);border-radius:var(--cascivo-radius-control);font-family:var(--cascivo-font-sans);font-size:inherit;color:var(--cascivo-color-text);cursor:pointer;text-align:start;transition:border-color var(--cascivo-duration-150) var(--cascivo-ease-out), background-color var(--cascivo-duration-150) var(--cascivo-ease-out);background:0 0;border:1px solid #0000;display:inline-flex}._preview_17cwn_8:hover:not(:disabled){border-color:var(--cascivo-color-border);background-color:var(--cascivo-color-bg-subtle)}._preview_17cwn_8:focus-visible{outline:2px solid var(--cascivo-color-accent);outline-offset:1px}._preview_17cwn_8:disabled{cursor:not-allowed;opacity:.5}._preview-text_17cwn_42{min-width:1ch}._placeholder_17cwn_46{color:var(--cascivo-color-text-muted)}._edit-icon_17cwn_50{background-color:var(--cascivo-color-text-muted);opacity:0;width:.875rem;height:.875rem;transition:opacity var(--cascivo-duration-100) var(--cascivo-ease-out);display:block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/%3E%3C/svg%3E");-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}._preview_17cwn_8:hover ._edit-icon_17cwn_50{opacity:1}._editing_17cwn_69 ._input_17cwn_70{width:100%;min-width:4rem;padding-block:var(--cascivo-space-1);padding-inline:var(--cascivo-space-1);font-family:var(--cascivo-font-sans);font-size:inherit;color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-accent);border-radius:var(--cascivo-radius-control);box-shadow:var(--cascivo-focus-ring);outline:none}}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./editable.module.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
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
6
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
7
|
//#region ../components/src/editable/editable.tsx
|
|
8
8
|
function c({ value: c, onValueChange: l, placeholder: u, disabled: d = !1, submitOnBlur: f = !0, onCancel: p, className: m, ...h }) {
|
|
9
|
-
|
|
10
|
-
let g =
|
|
9
|
+
a();
|
|
10
|
+
let g = r(!1), _ = r(c), v = t(null), y = t(p);
|
|
11
11
|
y.current = p;
|
|
12
|
-
let b =
|
|
13
|
-
b.current = l, g.value || (_.value = c),
|
|
12
|
+
let b = t(l);
|
|
13
|
+
b.current = l, g.value || (_.value = c), i(() => {
|
|
14
14
|
if (g.value) {
|
|
15
15
|
let e = v.current;
|
|
16
16
|
e && (e.focus(), e.select());
|
|
@@ -23,7 +23,7 @@ function c({ value: c, onValueChange: l, placeholder: u, disabled: d = !1, submi
|
|
|
23
23
|
_.value = c, g.value = !1, y.current?.();
|
|
24
24
|
}
|
|
25
25
|
return g.value ? /* @__PURE__ */ o("div", {
|
|
26
|
-
className:
|
|
26
|
+
className: n(e.wrapper, e.editing, m),
|
|
27
27
|
...h,
|
|
28
28
|
children: /* @__PURE__ */ o("input", {
|
|
29
29
|
ref: v,
|
|
@@ -40,7 +40,7 @@ function c({ value: c, onValueChange: l, placeholder: u, disabled: d = !1, submi
|
|
|
40
40
|
}
|
|
41
41
|
})
|
|
42
42
|
}) : /* @__PURE__ */ o("div", {
|
|
43
|
-
className:
|
|
43
|
+
className: n(e.wrapper, m),
|
|
44
44
|
"data-disabled": d ? "" : void 0,
|
|
45
45
|
...h,
|
|
46
46
|
children: /* @__PURE__ */ s("button", {
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
1
|
import './editable.css';
|
|
4
2
|
var e = {
|
|
5
|
-
wrapper: "
|
|
6
|
-
preview: "
|
|
7
|
-
"preview-text": "_preview-
|
|
8
|
-
placeholder: "
|
|
9
|
-
"edit-icon": "_edit-
|
|
10
|
-
editing: "
|
|
11
|
-
input: "
|
|
3
|
+
wrapper: "_wrapper_17cwn_2",
|
|
4
|
+
preview: "_preview_17cwn_8",
|
|
5
|
+
"preview-text": "_preview-text_17cwn_42",
|
|
6
|
+
placeholder: "_placeholder_17cwn_46",
|
|
7
|
+
"edit-icon": "_edit-icon_17cwn_50",
|
|
8
|
+
editing: "_editing_17cwn_69",
|
|
9
|
+
input: "_input_17cwn_70"
|
|
12
10
|
};
|
|
13
11
|
//#endregion
|
|
14
12
|
export { e as default };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
1
|
import e from "./empty-state.module.js";
|
|
4
|
-
import { cn as t } from "@cascivo/core";
|
|
2
|
+
import { cn as t } from "@cascivo/core/pure";
|
|
5
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
6
4
|
//#region ../components/src/empty-state/empty-state.tsx
|
|
7
5
|
function i({ icon: i, title: a, description: o, action: s, size: c = "md", className: l, ...u }) {
|