@cascivo/react 1.0.0 → 1.1.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 +5 -4
- package/dist/accordion/accordion.js +1 -114
- package/dist/accordion/accordion.module.js +1 -10
- package/dist/action-sheet/action-sheet.css +1 -1
- package/dist/action-sheet/action-sheet.js +1 -91
- package/dist/action-sheet/action-sheet.module.js +1 -12
- package/dist/alert/alert.js +1 -55
- package/dist/alert/alert.module.js +1 -11
- package/dist/alert-dialog/alert-dialog.css +1 -1
- package/dist/alert-dialog/alert-dialog.js +1 -66
- package/dist/alert-dialog/alert-dialog.module.js +1 -11
- package/dist/app-shell/app-shell.css +1 -1
- package/dist/app-shell/app-shell.js +1 -85
- package/dist/app-shell/app-shell.module.js +1 -12
- package/dist/aspect-ratio/aspect-ratio.js +1 -20
- package/dist/aspect-ratio/aspect-ratio.module.js +1 -6
- package/dist/avatar/avatar.js +1 -57
- package/dist/avatar/avatar.module.js +1 -8
- package/dist/avatar-group/avatar-group.js +1 -24
- package/dist/avatar-group/avatar-group.module.js +1 -6
- package/dist/badge/badge.js +1 -22
- package/dist/badge/badge.module.js +1 -3
- package/dist/blockquote/blockquote.js +1 -16
- package/dist/blockquote/blockquote.module.js +1 -6
- package/dist/bottom-sheet/bottom-sheet.js +1 -111
- package/dist/bottom-sheet/bottom-sheet.module.js +1 -14
- package/dist/brand/logo/logo.css +1 -0
- package/dist/brand/logo/logo.js +1 -0
- package/dist/brand/logo/logo.module.js +2 -0
- package/dist/breadcrumb/breadcrumb.js +1 -28
- package/dist/breadcrumb/breadcrumb.module.js +1 -3
- package/dist/button/button.css +1 -1
- package/dist/button/button.js +1 -35
- package/dist/button/button.module.js +1 -6
- package/dist/button-group/button-group.js +1 -39
- package/dist/button-group/button-group.module.js +1 -3
- package/dist/calendar/calendar-date.js +1 -0
- package/dist/calendar/calendar.css +1 -1
- package/dist/calendar/calendar.js +1 -199
- package/dist/calendar/calendar.module.js +1 -14
- package/dist/card/card.js +1 -53
- package/dist/card/card.module.js +1 -12
- package/dist/carousel/carousel.css +1 -1
- package/dist/carousel/carousel.js +1 -138
- package/dist/carousel/carousel.module.js +1 -13
- package/dist/chat-bubble/chat-bubble.js +1 -31
- package/dist/chat-bubble/chat-bubble.module.js +1 -11
- package/dist/checkbox/checkbox.js +1 -39
- package/dist/checkbox/checkbox.module.js +1 -8
- package/dist/checkbox-card/checkbox-card.css +1 -1
- package/dist/checkbox-card/checkbox-card.js +1 -50
- package/dist/checkbox-card/checkbox-card.module.js +1 -11
- package/dist/code/code.js +1 -14
- package/dist/code/code.module.js +1 -3
- package/dist/code-snippet/code-snippet.js +2 -121
- package/dist/code-snippet/code-snippet.module.js +1 -17
- package/dist/code-snippet/highlight.js +1 -67
- package/dist/collapsible/collapsible.js +1 -47
- package/dist/collapsible/collapsible.module.js +1 -7
- package/dist/color-picker/color-picker.css +1 -1
- package/dist/color-picker/color-picker.js +1 -272
- package/dist/color-picker/color-picker.module.js +1 -18
- package/dist/color-picker/color.js +1 -0
- package/dist/combobox/combobox.css +1 -1
- package/dist/combobox/combobox.js +1 -170
- package/dist/combobox/combobox.module.js +1 -19
- package/dist/combobox/list-nav.js +1 -0
- package/dist/combobox/option-list.js +1 -0
- package/dist/command-menu/command-menu.js +1 -421
- package/dist/command-menu/command-menu.module.js +1 -34
- package/dist/comparison/comparison.js +1 -69
- package/dist/comparison/comparison.module.js +1 -9
- package/dist/contained-list/contained-list.js +1 -41
- package/dist/contained-list/contained-list.module.js +1 -11
- package/dist/context-menu/context-menu.js +1 -93
- package/dist/context-menu/context-menu.module.js +1 -7
- package/dist/copy-button/copy-button.js +1 -60
- package/dist/copy-button/copy-button.module.js +1 -6
- package/dist/data-list/data-list.js +1 -25
- package/dist/data-list/data-list.module.js +1 -8
- package/dist/data-table/column-filter.js +1 -0
- package/dist/data-table/column-layout.js +1 -0
- package/dist/data-table/data-table.css +1 -1
- package/dist/data-table/data-table.js +1 -398
- package/dist/data-table/data-table.module.js +1 -33
- package/dist/data-table/grid-keys.js +1 -0
- package/dist/data-table/row-group.js +1 -0
- package/dist/data-table/row-search.js +1 -0
- package/dist/data-table/row-sort.js +1 -0
- package/dist/data-table/to-csv.js +3 -0
- package/dist/data-table/virtual-window.js +1 -0
- package/dist/date-picker/date-picker.css +1 -1
- package/dist/date-picker/date-picker.js +1 -224
- package/dist/date-picker/date-picker.module.js +1 -23
- package/dist/date-picker/parse-date.js +1 -0
- package/dist/date-range-picker/date-range-picker.js +1 -196
- package/dist/date-range-picker/date-range-picker.module.js +1 -18
- package/dist/dock/dock.css +1 -1
- package/dist/dock/dock.js +1 -34
- package/dist/dock/dock.module.js +1 -8
- package/dist/drawer/drawer.js +1 -96
- package/dist/drawer/drawer.module.js +1 -13
- package/dist/dropdown/dropdown.css +1 -1
- package/dist/dropdown/dropdown.js +1 -110
- package/dist/dropdown/dropdown.module.js +1 -9
- package/dist/editable/editable.js +1 -76
- package/dist/editable/editable.module.js +1 -11
- package/dist/empty-state/empty-state.js +1 -32
- package/dist/empty-state/empty-state.module.js +1 -9
- package/dist/fab/fab.css +1 -1
- package/dist/fab/fab.js +1 -93
- package/dist/fab/fab.module.js +1 -12
- package/dist/field/field.css +1 -1
- package/dist/field/field.js +1 -53
- package/dist/field/field.module.js +1 -7
- package/dist/file-uploader/file-uploader.css +1 -1
- package/dist/file-uploader/file-uploader.js +1 -123
- package/dist/file-uploader/file-uploader.module.js +1 -18
- package/dist/filter/filter.css +1 -1
- package/dist/filter/filter.js +1 -35
- package/dist/filter/filter.module.js +1 -6
- package/dist/form/form.js +1 -95
- package/dist/form/form.module.js +1 -3
- package/dist/header/header.js +1 -44
- package/dist/header/header.module.js +1 -11
- package/dist/header-panel/header-panel.js +1 -72
- package/dist/header-panel/header-panel.module.js +1 -9
- package/dist/heading/heading.css +1 -1
- package/dist/heading/heading.js +1 -22
- package/dist/heading/heading.module.js +1 -3
- package/dist/hover-card/hover-card.css +1 -1
- package/dist/hover-card/hover-card.js +1 -84
- package/dist/hover-card/hover-card.module.js +1 -6
- package/dist/icon-button/icon-button.js +1 -19
- package/dist/icon-button/icon-button.module.js +1 -3
- package/dist/image/image.css +1 -1
- package/dist/image/image.js +1 -64
- package/dist/image/image.module.js +1 -9
- package/dist/index.d.ts +772 -25
- package/dist/indicator/indicator.js +1 -16
- package/dist/indicator/indicator.module.js +1 -6
- package/dist/infinite-scroll/infinite-scroll.js +1 -49
- package/dist/infinite-scroll/infinite-scroll.module.js +1 -7
- package/dist/inline-loading/inline-loading.js +1 -74
- package/dist/inline-loading/inline-loading.module.js +1 -9
- package/dist/input/input.css +1 -1
- package/dist/input/input.js +1 -56
- package/dist/input/input.module.js +1 -9
- package/dist/input-group/input-group.css +1 -1
- package/dist/input-group/input-group.js +1 -39
- package/dist/input-group/input-group.module.js +1 -9
- package/dist/item/item.js +1 -50
- package/dist/item/item.module.js +1 -10
- package/dist/join/join.js +1 -12
- package/dist/join/join.module.js +1 -3
- package/dist/kbd/kbd.js +1 -14
- package/dist/kbd/kbd.module.js +1 -3
- package/dist/label/label.js +1 -23
- package/dist/label/label.module.js +1 -7
- package/dist/large-title-header/large-title-header.js +1 -38
- package/dist/large-title-header/large-title-header.module.js +1 -12
- package/dist/layouts/src/auto-grid/auto-grid.js +1 -17
- package/dist/layouts/src/auto-grid/auto-grid.module.js +1 -4
- package/dist/layouts/src/center/center.js +1 -16
- package/dist/layouts/src/center/center.module.js +1 -3
- package/dist/layouts/src/columns/columns.js +1 -21
- package/dist/layouts/src/columns/columns.module.js +1 -6
- package/dist/layouts/src/flex/flex.js +1 -20
- package/dist/layouts/src/flex/flex.module.js +1 -3
- package/dist/layouts/src/grid/grid.css +1 -1
- package/dist/layouts/src/grid/grid.js +1 -55
- package/dist/layouts/src/grid/grid.module.js +1 -7
- package/dist/layouts/src/page-header/page-header.js +1 -31
- package/dist/layouts/src/page-header/page-header.module.js +1 -10
- package/dist/layouts/src/spacer/spacer.js +1 -17
- package/dist/layouts/src/spacer/spacer.module.js +1 -3
- package/dist/link/link.css +1 -1
- package/dist/link/link.js +1 -22
- package/dist/link/link.module.js +1 -3
- package/dist/list/list.js +1 -21
- package/dist/list/list.module.js +1 -6
- package/dist/log-viewer/log-viewer.css +1 -1
- package/dist/log-viewer/log-viewer.js +2 -184
- package/dist/log-viewer/log-viewer.module.js +1 -16
- package/dist/menu/menu.js +1 -126
- package/dist/menu/menu.module.js +1 -8
- package/dist/menu-button/menu-button.js +1 -92
- package/dist/menu-button/menu-button.module.js +1 -8
- package/dist/menubar/menubar.js +1 -103
- package/dist/menubar/menubar.module.js +1 -8
- package/dist/modal/modal.css +1 -1
- package/dist/modal/modal.js +1 -76
- package/dist/modal/modal.module.js +1 -12
- package/dist/multi-select/list-nav.js +1 -0
- package/dist/multi-select/multi-select.css +1 -1
- package/dist/multi-select/multi-select.js +1 -106
- package/dist/multi-select/multi-select.module.js +1 -15
- package/dist/multi-select/option-list.js +1 -0
- package/dist/native-select/native-select.css +1 -1
- package/dist/native-select/native-select.js +1 -37
- package/dist/native-select/native-select.module.js +1 -7
- package/dist/navigation-menu/navigation-menu.js +1 -99
- package/dist/navigation-menu/navigation-menu.module.js +1 -10
- package/dist/node/accordion/accordion.js +1 -114
- package/dist/node/accordion/accordion.module.js +1 -10
- package/dist/node/action-sheet/action-sheet.js +1 -91
- package/dist/node/action-sheet/action-sheet.module.js +1 -12
- package/dist/node/alert/alert.js +1 -55
- package/dist/node/alert/alert.module.js +1 -11
- package/dist/node/alert-dialog/alert-dialog.js +1 -66
- package/dist/node/alert-dialog/alert-dialog.module.js +1 -11
- package/dist/node/app-shell/app-shell.js +1 -85
- package/dist/node/app-shell/app-shell.module.js +1 -12
- package/dist/node/aspect-ratio/aspect-ratio.js +1 -20
- package/dist/node/aspect-ratio/aspect-ratio.module.js +1 -6
- package/dist/node/avatar/avatar.js +1 -57
- package/dist/node/avatar/avatar.module.js +1 -8
- package/dist/node/avatar-group/avatar-group.js +1 -24
- package/dist/node/avatar-group/avatar-group.module.js +1 -6
- package/dist/node/badge/badge.js +1 -22
- package/dist/node/badge/badge.module.js +1 -3
- package/dist/node/blockquote/blockquote.js +1 -16
- package/dist/node/blockquote/blockquote.module.js +1 -6
- package/dist/node/bottom-sheet/bottom-sheet.js +1 -111
- package/dist/node/bottom-sheet/bottom-sheet.module.js +1 -14
- package/dist/node/brand/logo/logo.js +1 -0
- package/dist/node/brand/logo/logo.module.js +1 -0
- package/dist/node/breadcrumb/breadcrumb.js +1 -28
- package/dist/node/breadcrumb/breadcrumb.module.js +1 -3
- package/dist/node/button/button.js +1 -35
- package/dist/node/button/button.module.js +1 -6
- package/dist/node/button-group/button-group.js +1 -39
- package/dist/node/button-group/button-group.module.js +1 -3
- package/dist/node/calendar/calendar-date.js +1 -0
- package/dist/node/calendar/calendar.js +1 -199
- package/dist/node/calendar/calendar.module.js +1 -14
- package/dist/node/card/card.js +1 -53
- package/dist/node/card/card.module.js +1 -12
- package/dist/node/carousel/carousel.js +1 -138
- package/dist/node/carousel/carousel.module.js +1 -13
- package/dist/node/chat-bubble/chat-bubble.js +1 -31
- package/dist/node/chat-bubble/chat-bubble.module.js +1 -11
- package/dist/node/checkbox/checkbox.js +1 -39
- package/dist/node/checkbox/checkbox.module.js +1 -8
- package/dist/node/checkbox-card/checkbox-card.js +1 -50
- package/dist/node/checkbox-card/checkbox-card.module.js +1 -11
- package/dist/node/code/code.js +1 -14
- package/dist/node/code/code.module.js +1 -3
- package/dist/node/code-snippet/code-snippet.js +2 -121
- package/dist/node/code-snippet/code-snippet.module.js +1 -17
- package/dist/node/code-snippet/highlight.js +1 -67
- package/dist/node/collapsible/collapsible.js +1 -47
- package/dist/node/collapsible/collapsible.module.js +1 -7
- package/dist/node/color-picker/color-picker.js +1 -272
- package/dist/node/color-picker/color-picker.module.js +1 -18
- package/dist/node/color-picker/color.js +1 -0
- package/dist/node/combobox/combobox.js +1 -170
- package/dist/node/combobox/combobox.module.js +1 -19
- package/dist/node/combobox/list-nav.js +1 -0
- package/dist/node/combobox/option-list.js +1 -0
- package/dist/node/command-menu/command-menu.js +1 -421
- package/dist/node/command-menu/command-menu.module.js +1 -34
- package/dist/node/comparison/comparison.js +1 -69
- package/dist/node/comparison/comparison.module.js +1 -9
- package/dist/node/contained-list/contained-list.js +1 -41
- package/dist/node/contained-list/contained-list.module.js +1 -11
- package/dist/node/context-menu/context-menu.js +1 -93
- package/dist/node/context-menu/context-menu.module.js +1 -7
- package/dist/node/copy-button/copy-button.js +1 -60
- package/dist/node/copy-button/copy-button.module.js +1 -6
- package/dist/node/data-list/data-list.js +1 -25
- package/dist/node/data-list/data-list.module.js +1 -8
- package/dist/node/data-table/column-filter.js +1 -0
- package/dist/node/data-table/column-layout.js +1 -0
- package/dist/node/data-table/data-table.js +1 -398
- package/dist/node/data-table/data-table.module.js +1 -33
- package/dist/node/data-table/grid-keys.js +1 -0
- package/dist/node/data-table/row-group.js +1 -0
- package/dist/node/data-table/row-search.js +1 -0
- package/dist/node/data-table/row-sort.js +1 -0
- package/dist/node/data-table/to-csv.js +3 -0
- package/dist/node/data-table/virtual-window.js +1 -0
- package/dist/node/date-picker/date-picker.js +1 -224
- package/dist/node/date-picker/date-picker.module.js +1 -23
- package/dist/node/date-picker/parse-date.js +1 -0
- package/dist/node/date-range-picker/date-range-picker.js +1 -196
- package/dist/node/date-range-picker/date-range-picker.module.js +1 -18
- package/dist/node/dock/dock.js +1 -34
- package/dist/node/dock/dock.module.js +1 -8
- package/dist/node/drawer/drawer.js +1 -96
- package/dist/node/drawer/drawer.module.js +1 -13
- package/dist/node/dropdown/dropdown.js +1 -110
- package/dist/node/dropdown/dropdown.module.js +1 -9
- package/dist/node/editable/editable.js +1 -76
- package/dist/node/editable/editable.module.js +1 -11
- package/dist/node/empty-state/empty-state.js +1 -32
- package/dist/node/empty-state/empty-state.module.js +1 -9
- package/dist/node/fab/fab.js +1 -93
- package/dist/node/fab/fab.module.js +1 -12
- package/dist/node/field/field.js +1 -53
- package/dist/node/field/field.module.js +1 -7
- package/dist/node/file-uploader/file-uploader.js +1 -123
- package/dist/node/file-uploader/file-uploader.module.js +1 -18
- package/dist/node/filter/filter.js +1 -35
- package/dist/node/filter/filter.module.js +1 -6
- package/dist/node/form/form.js +1 -95
- package/dist/node/form/form.module.js +1 -3
- package/dist/node/header/header.js +1 -44
- package/dist/node/header/header.module.js +1 -11
- package/dist/node/header-panel/header-panel.js +1 -72
- package/dist/node/header-panel/header-panel.module.js +1 -9
- package/dist/node/heading/heading.js +1 -22
- package/dist/node/heading/heading.module.js +1 -3
- package/dist/node/hover-card/hover-card.js +1 -84
- package/dist/node/hover-card/hover-card.module.js +1 -6
- package/dist/node/icon-button/icon-button.js +1 -19
- package/dist/node/icon-button/icon-button.module.js +1 -3
- package/dist/node/image/image.js +1 -64
- package/dist/node/image/image.module.js +1 -9
- package/dist/node/indicator/indicator.js +1 -16
- package/dist/node/indicator/indicator.module.js +1 -6
- package/dist/node/infinite-scroll/infinite-scroll.js +1 -49
- package/dist/node/infinite-scroll/infinite-scroll.module.js +1 -7
- package/dist/node/inline-loading/inline-loading.js +1 -74
- package/dist/node/inline-loading/inline-loading.module.js +1 -9
- package/dist/node/input/input.js +1 -56
- package/dist/node/input/input.module.js +1 -9
- package/dist/node/input-group/input-group.js +1 -39
- package/dist/node/input-group/input-group.module.js +1 -9
- package/dist/node/item/item.js +1 -50
- package/dist/node/item/item.module.js +1 -10
- package/dist/node/join/join.js +1 -12
- package/dist/node/join/join.module.js +1 -3
- package/dist/node/kbd/kbd.js +1 -14
- package/dist/node/kbd/kbd.module.js +1 -3
- package/dist/node/label/label.js +1 -23
- package/dist/node/label/label.module.js +1 -7
- package/dist/node/large-title-header/large-title-header.js +1 -38
- package/dist/node/large-title-header/large-title-header.module.js +1 -12
- package/dist/node/layouts/src/auto-grid/auto-grid.js +1 -17
- package/dist/node/layouts/src/auto-grid/auto-grid.module.js +1 -4
- package/dist/node/layouts/src/center/center.js +1 -16
- package/dist/node/layouts/src/center/center.module.js +1 -3
- package/dist/node/layouts/src/columns/columns.js +1 -21
- package/dist/node/layouts/src/columns/columns.module.js +1 -6
- package/dist/node/layouts/src/flex/flex.js +1 -20
- package/dist/node/layouts/src/flex/flex.module.js +1 -3
- package/dist/node/layouts/src/grid/grid.js +1 -55
- package/dist/node/layouts/src/grid/grid.module.js +1 -7
- package/dist/node/layouts/src/page-header/page-header.js +1 -31
- package/dist/node/layouts/src/page-header/page-header.module.js +1 -10
- package/dist/node/layouts/src/spacer/spacer.js +1 -17
- package/dist/node/layouts/src/spacer/spacer.module.js +1 -3
- package/dist/node/link/link.js +1 -22
- package/dist/node/link/link.module.js +1 -3
- package/dist/node/list/list.js +1 -21
- package/dist/node/list/list.module.js +1 -6
- package/dist/node/log-viewer/log-viewer.js +2 -184
- package/dist/node/log-viewer/log-viewer.module.js +1 -16
- package/dist/node/menu/menu.js +1 -126
- package/dist/node/menu/menu.module.js +1 -8
- package/dist/node/menu-button/menu-button.js +1 -92
- package/dist/node/menu-button/menu-button.module.js +1 -8
- package/dist/node/menubar/menubar.js +1 -103
- package/dist/node/menubar/menubar.module.js +1 -8
- package/dist/node/modal/modal.js +1 -76
- package/dist/node/modal/modal.module.js +1 -12
- package/dist/node/multi-select/list-nav.js +1 -0
- package/dist/node/multi-select/multi-select.js +1 -106
- package/dist/node/multi-select/multi-select.module.js +1 -15
- package/dist/node/multi-select/option-list.js +1 -0
- package/dist/node/native-select/native-select.js +1 -37
- package/dist/node/native-select/native-select.module.js +1 -7
- package/dist/node/navigation-menu/navigation-menu.js +1 -99
- package/dist/node/navigation-menu/navigation-menu.module.js +1 -10
- package/dist/node/notification/notification.js +1 -140
- package/dist/node/notification/notification.module.js +1 -11
- package/dist/node/number-input/number-input.js +1 -148
- package/dist/node/number-input/number-input.module.js +1 -12
- package/dist/node/otp-input/otp-input.js +1 -70
- package/dist/node/otp-input/otp-input.module.js +1 -6
- package/dist/node/overflow-menu/overflow-menu.js +1 -70
- package/dist/node/overflow-menu/overflow-menu.module.js +1 -7
- package/dist/node/pagination/pagination.js +1 -92
- package/dist/node/pagination/pagination.module.js +1 -11
- package/dist/node/password-input/password-input.js +1 -81
- package/dist/node/password-input/password-input.module.js +1 -11
- package/dist/node/popover/popover.js +1 -51
- package/dist/node/popover/popover.module.js +1 -6
- package/dist/node/popover/use-popover.js +1 -55
- package/dist/node/progress/progress.js +1 -16
- package/dist/node/progress/progress.module.js +1 -6
- package/dist/node/progress-bar/progress-bar.js +1 -42
- package/dist/node/progress-bar/progress-bar.module.js +1 -11
- package/dist/node/progress-circle/progress-circle.js +1 -46
- package/dist/node/progress-circle/progress-circle.module.js +1 -9
- package/dist/node/progress-indicator/progress-indicator.js +1 -34
- package/dist/node/progress-indicator/progress-indicator.module.js +1 -10
- package/dist/node/prose/prose.js +1 -13
- package/dist/node/prose/prose.module.js +1 -3
- package/dist/node/pull-to-refresh/pull-to-refresh.js +1 -82
- package/dist/node/pull-to-refresh/pull-to-refresh.module.js +1 -9
- package/dist/node/qr-code/encode.js +1 -583
- package/dist/node/qr-code/qr-code.js +1 -41
- package/dist/node/qr-code/qr-code.module.js +1 -6
- package/dist/node/radial-progress/radial-progress.js +1 -27
- package/dist/node/radial-progress/radial-progress.module.js +1 -6
- package/dist/node/radio/radio.js +1 -49
- package/dist/node/radio/radio.module.js +1 -9
- package/dist/node/radio-card/radio-card.js +1 -64
- package/dist/node/radio-card/radio-card.module.js +1 -11
- package/dist/node/rating-group/rating-group.js +1 -37
- package/dist/node/rating-group/rating-group.module.js +1 -6
- package/dist/node/react/src/index.js +1 -141
- package/dist/node/relative-time/relative-time.js +1 -66
- package/dist/node/relative-time/relative-time.module.js +1 -3
- package/dist/node/reorder-list/reorder-list.js +1 -143
- package/dist/node/reorder-list/reorder-list.module.js +1 -11
- package/dist/node/resizable/resizable.js +1 -80
- package/dist/node/resizable/resizable.module.js +1 -8
- package/dist/node/scroll-area/scroll-area.js +1 -38
- package/dist/node/scroll-area/scroll-area.module.js +1 -3
- package/dist/node/search/search.js +1 -96
- package/dist/node/search/search.module.js +1 -9
- package/dist/node/segmented-control/segmented-control.js +1 -43
- package/dist/node/segmented-control/segmented-control.module.js +1 -6
- package/dist/node/select/select.js +1 -73
- package/dist/node/select/select.module.js +1 -11
- package/dist/node/separator/separator.js +1 -19
- package/dist/node/separator/separator.module.js +1 -3
- package/dist/node/sheet/sheet.js +1 -49
- package/dist/node/sheet/sheet.module.js +1 -9
- package/dist/node/shell-header/shell-header.js +1 -169
- package/dist/node/shell-header/shell-header.module.js +1 -24
- package/dist/node/side-nav/side-nav.js +1 -334
- package/dist/node/side-nav/side-nav.module.js +1 -31
- package/dist/node/skeleton/skeleton.js +1 -23
- package/dist/node/skeleton/skeleton.module.js +1 -7
- package/dist/node/skip-nav/skip-nav.js +1 -28
- package/dist/node/skip-nav/skip-nav.module.js +1 -3
- package/dist/node/slider/slider.js +1 -30
- package/dist/node/slider/slider.module.js +1 -7
- package/dist/node/spinner/spinner.js +1 -18
- package/dist/node/spinner/spinner.module.js +1 -6
- package/dist/node/stack/stack.js +1 -17
- package/dist/node/stack/stack.module.js +1 -6
- package/dist/node/stat/stat.js +1 -41
- package/dist/node/stat/stat.module.js +1 -11
- package/dist/node/status/status.js +1 -25
- package/dist/node/status/status.module.js +1 -7
- package/dist/node/steps/steps.js +1 -35
- package/dist/node/steps/steps.module.js +1 -8
- package/dist/node/structured-list/structured-list.js +1 -102
- package/dist/node/structured-list/structured-list.module.js +1 -12
- package/dist/node/swap/swap.js +1 -36
- package/dist/node/swap/swap.module.js +1 -7
- package/dist/node/swipe-item/swipe-item.js +1 -62
- package/dist/node/swipe-item/swipe-item.module.js +1 -12
- package/dist/node/switcher/switcher.js +1 -32
- package/dist/node/switcher/switcher.module.js +1 -8
- package/dist/node/tabs/tabs.js +1 -98
- package/dist/node/tabs/tabs.module.js +1 -8
- package/dist/node/tag/tag.js +1 -33
- package/dist/node/tag/tag.module.js +1 -6
- package/dist/node/tags-input/tags-input.js +1 -68
- package/dist/node/tags-input/tags-input.module.js +1 -8
- package/dist/node/text/text.js +1 -16
- package/dist/node/text/text.module.js +1 -3
- package/dist/node/textarea/textarea.js +1 -58
- package/dist/node/textarea/textarea.module.js +1 -9
- package/dist/node/tile/tile.js +1 -39
- package/dist/node/tile/tile.module.js +1 -7
- package/dist/node/time-picker/time-picker.js +1 -64
- package/dist/node/time-picker/time-picker.module.js +1 -9
- package/dist/node/timeline/timeline.js +1 -55
- package/dist/node/timeline/timeline.module.js +1 -11
- package/dist/node/toast/toast.js +1 -85
- package/dist/node/toast/toast.module.js +1 -11
- package/dist/node/toc/toc.js +1 -43
- package/dist/node/toc/toc.module.js +1 -3
- package/dist/node/toc/use-toc-from-region.js +1 -18
- package/dist/node/toggle/toggle.js +1 -42
- package/dist/node/toggle/toggle.module.js +1 -8
- package/dist/node/toggle-group/toggle-group.js +1 -55
- package/dist/node/toggle-group/toggle-group.module.js +1 -6
- package/dist/node/toggletip/toggletip.js +1 -49
- package/dist/node/toggletip/toggletip.module.js +1 -7
- package/dist/node/tooltip/tooltip.js +1 -58
- package/dist/node/tooltip/tooltip.module.js +1 -6
- package/dist/node/tree-view/tree-view.js +1 -201
- package/dist/node/tree-view/tree-view.module.js +1 -13
- package/dist/node/user/user.js +1 -35
- package/dist/node/user/user.module.js +1 -9
- package/dist/node/virtual-list/virtual-list.js +1 -40
- package/dist/node/virtual-list/virtual-list.module.js +1 -7
- package/dist/node/visually-hidden/visually-hidden.js +1 -2
- package/dist/node/wheel-picker/wheel-picker.js +1 -84
- package/dist/node/wheel-picker/wheel-picker.module.js +1 -8
- package/dist/notification/notification.js +1 -140
- package/dist/notification/notification.module.js +1 -11
- package/dist/number-input/number-input.js +1 -148
- package/dist/number-input/number-input.module.js +1 -12
- package/dist/otp-input/otp-input.js +1 -70
- package/dist/otp-input/otp-input.module.js +1 -6
- package/dist/overflow-menu/overflow-menu.js +1 -70
- package/dist/overflow-menu/overflow-menu.module.js +1 -7
- package/dist/pagination/pagination.js +1 -92
- package/dist/pagination/pagination.module.js +1 -11
- package/dist/password-input/password-input.js +1 -81
- package/dist/password-input/password-input.module.js +1 -11
- package/dist/popover/popover.js +1 -51
- package/dist/popover/popover.module.js +1 -6
- package/dist/popover/use-popover.js +1 -55
- package/dist/progress/progress.css +1 -1
- package/dist/progress/progress.js +1 -16
- package/dist/progress/progress.module.js +1 -6
- package/dist/progress-bar/progress-bar.css +1 -1
- package/dist/progress-bar/progress-bar.js +1 -42
- package/dist/progress-bar/progress-bar.module.js +1 -11
- package/dist/progress-circle/progress-circle.js +1 -46
- package/dist/progress-circle/progress-circle.module.js +1 -9
- package/dist/progress-indicator/progress-indicator.css +1 -1
- package/dist/progress-indicator/progress-indicator.js +1 -34
- package/dist/progress-indicator/progress-indicator.module.js +1 -10
- package/dist/prose/prose.css +1 -1
- package/dist/prose/prose.js +1 -13
- package/dist/prose/prose.module.js +1 -3
- package/dist/pull-to-refresh/pull-to-refresh.js +1 -82
- package/dist/pull-to-refresh/pull-to-refresh.module.js +1 -9
- package/dist/qr-code/encode.js +1 -583
- package/dist/qr-code/qr-code.js +1 -41
- package/dist/qr-code/qr-code.module.js +1 -6
- package/dist/radial-progress/radial-progress.js +1 -27
- package/dist/radial-progress/radial-progress.module.js +1 -6
- package/dist/radio/radio.js +1 -49
- package/dist/radio/radio.module.js +1 -9
- package/dist/radio-card/radio-card.css +1 -1
- package/dist/radio-card/radio-card.js +1 -64
- package/dist/radio-card/radio-card.module.js +1 -11
- package/dist/rating-group/rating-group.js +1 -37
- package/dist/rating-group/rating-group.module.js +1 -6
- package/dist/react/src/index.js +1 -141
- package/dist/relative-time/relative-time.js +1 -66
- package/dist/relative-time/relative-time.module.js +1 -3
- package/dist/reorder-list/reorder-list.css +1 -1
- package/dist/reorder-list/reorder-list.js +1 -143
- package/dist/reorder-list/reorder-list.module.js +1 -11
- package/dist/resizable/resizable.js +1 -80
- package/dist/resizable/resizable.module.js +1 -8
- package/dist/scroll-area/scroll-area.css +1 -1
- package/dist/scroll-area/scroll-area.js +1 -38
- package/dist/scroll-area/scroll-area.module.js +1 -3
- package/dist/search/search.js +1 -96
- package/dist/search/search.module.js +1 -9
- package/dist/segmented-control/segmented-control.js +1 -43
- package/dist/segmented-control/segmented-control.module.js +1 -6
- package/dist/select/select.js +1 -73
- package/dist/select/select.module.js +1 -11
- package/dist/separator/separator.js +1 -19
- package/dist/separator/separator.module.js +1 -3
- package/dist/sheet/sheet.js +1 -49
- package/dist/sheet/sheet.module.js +1 -9
- package/dist/shell-header/shell-header.css +1 -1
- package/dist/shell-header/shell-header.js +1 -169
- package/dist/shell-header/shell-header.module.js +1 -24
- package/dist/side-nav/side-nav.css +1 -1
- package/dist/side-nav/side-nav.js +1 -334
- package/dist/side-nav/side-nav.module.js +1 -31
- package/dist/skeleton/skeleton.css +1 -1
- package/dist/skeleton/skeleton.js +1 -23
- package/dist/skeleton/skeleton.module.js +1 -7
- package/dist/skip-nav/skip-nav.js +1 -28
- package/dist/skip-nav/skip-nav.module.js +1 -3
- package/dist/slider/slider.js +1 -30
- package/dist/slider/slider.module.js +1 -7
- package/dist/spinner/spinner.css +1 -1
- package/dist/spinner/spinner.js +1 -18
- package/dist/spinner/spinner.module.js +1 -6
- package/dist/stack/stack.js +1 -17
- package/dist/stack/stack.module.js +1 -6
- package/dist/stat/stat.js +1 -41
- package/dist/stat/stat.module.js +1 -11
- package/dist/status/status.css +1 -1
- package/dist/status/status.js +1 -25
- package/dist/status/status.module.js +1 -7
- package/dist/steps/steps.css +1 -1
- package/dist/steps/steps.js +1 -35
- package/dist/steps/steps.module.js +1 -8
- package/dist/structured-list/structured-list.js +1 -102
- package/dist/structured-list/structured-list.module.js +1 -12
- package/dist/styles.css +395 -53
- package/dist/swap/swap.css +1 -1
- package/dist/swap/swap.js +1 -36
- package/dist/swap/swap.module.js +1 -7
- package/dist/swipe-item/swipe-item.js +1 -62
- package/dist/swipe-item/swipe-item.module.js +1 -12
- package/dist/switcher/switcher.js +1 -32
- package/dist/switcher/switcher.module.js +1 -8
- package/dist/tabs/tabs.js +1 -98
- package/dist/tabs/tabs.module.js +1 -8
- package/dist/tag/tag.js +1 -33
- package/dist/tag/tag.module.js +1 -6
- package/dist/tags-input/tags-input.js +1 -68
- package/dist/tags-input/tags-input.module.js +1 -8
- package/dist/text/text.css +1 -1
- package/dist/text/text.js +1 -16
- package/dist/text/text.module.js +1 -3
- package/dist/textarea/textarea.css +1 -1
- package/dist/textarea/textarea.js +1 -58
- package/dist/textarea/textarea.module.js +1 -9
- package/dist/tile/tile.css +1 -1
- package/dist/tile/tile.js +1 -39
- package/dist/tile/tile.module.js +1 -7
- package/dist/time-picker/time-picker.js +1 -64
- package/dist/time-picker/time-picker.module.js +1 -9
- package/dist/timeline/timeline.js +1 -55
- package/dist/timeline/timeline.module.js +1 -11
- package/dist/toast/toast.css +1 -1
- package/dist/toast/toast.js +1 -85
- package/dist/toast/toast.module.js +1 -11
- package/dist/toc/toc.css +1 -1
- package/dist/toc/toc.js +1 -43
- package/dist/toc/toc.module.js +1 -3
- package/dist/toc/use-toc-from-region.js +1 -18
- package/dist/toggle/toggle.js +1 -42
- package/dist/toggle/toggle.module.js +1 -8
- package/dist/toggle-group/toggle-group.js +1 -55
- package/dist/toggle-group/toggle-group.module.js +1 -6
- package/dist/toggletip/toggletip.js +1 -49
- package/dist/toggletip/toggletip.module.js +1 -7
- package/dist/tooltip/tooltip.css +1 -1
- package/dist/tooltip/tooltip.js +1 -58
- package/dist/tooltip/tooltip.module.js +1 -6
- package/dist/tree-view/tree-view.css +1 -1
- package/dist/tree-view/tree-view.js +1 -201
- package/dist/tree-view/tree-view.module.js +1 -13
- package/dist/user/user.js +1 -35
- package/dist/user/user.module.js +1 -9
- package/dist/virtual-list/virtual-list.js +1 -40
- package/dist/virtual-list/virtual-list.module.js +1 -7
- package/dist/visually-hidden/visually-hidden.js +1 -2
- package/dist/wheel-picker/wheel-picker.js +1 -84
- package/dist/wheel-picker/wheel-picker.module.js +1 -8
- package/package.json +3 -3
- package/readme.body.md +3 -2
|
@@ -1,57 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./avatar.module.js";
|
|
4
|
-
import { cn as t, createMachine as n, useMachine as r, useSignals as i } from "@cascivo/core";
|
|
5
|
-
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
-
//#region ../components/src/avatar/avatar.tsx
|
|
7
|
-
var s = n({
|
|
8
|
-
initial: "loading",
|
|
9
|
-
states: {
|
|
10
|
-
loading: { on: {
|
|
11
|
-
LOADED: "loaded",
|
|
12
|
-
ERROR: "error"
|
|
13
|
-
} },
|
|
14
|
-
loaded: {},
|
|
15
|
-
error: {}
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
function c({ src: n, alt: c = "", name: u, fallback: d, size: f = "md", status: p, className: m, ...h }) {
|
|
19
|
-
i();
|
|
20
|
-
let [g, _] = r(s), v = !!n && g.value !== "error", y = d ?? l(u), b = c || u || d;
|
|
21
|
-
return /* @__PURE__ */ o("span", {
|
|
22
|
-
"data-size": f,
|
|
23
|
-
"data-status": p,
|
|
24
|
-
className: t(e.avatar, m),
|
|
25
|
-
role: v || !b ? void 0 : "img",
|
|
26
|
-
"aria-label": v ? void 0 : b || void 0,
|
|
27
|
-
...h,
|
|
28
|
-
children: [v ? /* @__PURE__ */ a("img", {
|
|
29
|
-
className: e.image,
|
|
30
|
-
src: n,
|
|
31
|
-
alt: c || u || "",
|
|
32
|
-
onLoad: () => _("LOADED"),
|
|
33
|
-
onError: () => _("ERROR")
|
|
34
|
-
}) : /* @__PURE__ */ a("span", {
|
|
35
|
-
className: e.fallback,
|
|
36
|
-
"aria-hidden": "true",
|
|
37
|
-
children: y
|
|
38
|
-
}), p && /* @__PURE__ */ a("span", {
|
|
39
|
-
className: e.status,
|
|
40
|
-
"aria-hidden": "true"
|
|
41
|
-
})]
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
function l(e) {
|
|
45
|
-
if (!e) return;
|
|
46
|
-
let t = e.trim().split(/\s+/).filter(Boolean);
|
|
47
|
-
if (t.length !== 0) return (u(t[0]) + (t.length > 1 ? u(t[t.length - 1]) : "")).toLocaleUpperCase() || void 0;
|
|
48
|
-
}
|
|
49
|
-
function u(e) {
|
|
50
|
-
if (typeof Intl < "u" && "Segmenter" in Intl) {
|
|
51
|
-
let t = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
52
|
-
for (let n of t.segment(e)) return n.segment;
|
|
53
|
-
}
|
|
54
|
-
return [...e][0] ?? "";
|
|
55
|
-
}
|
|
56
|
-
//#endregion
|
|
57
|
-
export { c as Avatar };
|
|
1
|
+
"use client";import e from"./avatar.module.js";import{cn as t,createMachine as n,useMachine as r,useSignals as i}from"@cascivo/core";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=n({initial:`loading`,states:{loading:{on:{LOADED:`loaded`,ERROR:`error`}},loaded:{},error:{}}});function c({src:n,alt:c=``,name:u,fallback:d,size:f=`md`,status:p,className:m,...h}){i();let[g,_]=r(s),v=!!n&&g.value!==`error`,y=d??l(u),b=c||u||d;return o(`span`,{"data-size":f,"data-status":p,className:t(e.avatar,m),role:v||!b?void 0:`img`,"aria-label":v?void 0:b||void 0,...h,children:[v?a(`img`,{className:e.image,src:n,alt:c||u||``,onLoad:()=>_(`LOADED`),onError:()=>_(`ERROR`)}):a(`span`,{className:e.fallback,"aria-hidden":`true`,children:y}),p&&a(`span`,{className:e.status,"aria-hidden":`true`})]})}function l(e){if(!e)return;let t=e.trim().split(/\s+/).filter(Boolean);if(t.length!==0)return(u(t[0])+(t.length>1?u(t[t.length-1]):``)).toLocaleUpperCase()||void 0}function u(e){if(typeof Intl<`u`&&`Segmenter`in Intl){let t=new Intl.Segmenter(void 0,{granularity:`grapheme`});for(let n of t.segment(e))return n.segment}return[...e][0]??``}export{c as Avatar};
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
avatar: "_avatar_18xp4_2",
|
|
3
|
-
image: "_image_18xp4_43",
|
|
4
|
-
fallback: "_fallback_18xp4_50",
|
|
5
|
-
status: "_status_18xp4_55"
|
|
6
|
-
};
|
|
7
|
-
//#endregion
|
|
8
|
-
export { e as default };
|
|
1
|
+
var e={avatar:`_avatar_18xp4_2`,image:`_image_18xp4_43`,fallback:`_fallback_18xp4_50`,status:`_status_18xp4_55`};export{e as default};
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import t from "./avatar-group.module.js";
|
|
3
|
-
import { cn as n } from "@cascivo/core/pure";
|
|
4
|
-
import { Children as r } from "react";
|
|
5
|
-
import { builtin as i, t as a } from "@cascivo/i18n";
|
|
6
|
-
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/avatar-group/avatar-group.tsx
|
|
8
|
-
function c({ max: c, total: l, spacing: u = "md", isGrid: d = !1, labels: f, className: p, children: m, ...h }) {
|
|
9
|
-
let g = r.toArray(m), _ = c == null ? g : g.slice(0, c), v = (l ?? g.length) - _.length, y = f?.more?.(v) ?? a(i.avatarGroup.more, { count: v });
|
|
10
|
-
return /* @__PURE__ */ s("div", {
|
|
11
|
-
role: "group",
|
|
12
|
-
"data-spacing": u,
|
|
13
|
-
"data-grid": d || void 0,
|
|
14
|
-
className: n(t.group, p),
|
|
15
|
-
...h,
|
|
16
|
-
children: [_, v > 0 && /* @__PURE__ */ o(e, {
|
|
17
|
-
className: t.overflow,
|
|
18
|
-
fallback: `+${v}`,
|
|
19
|
-
"aria-label": y
|
|
20
|
-
})]
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
24
|
-
export { c as AvatarGroup };
|
|
1
|
+
import{Avatar as e}from"../avatar/avatar.js";import t from"./avatar-group.module.js";import{cn as n}from"@cascivo/core/pure";import{Children as r}from"react";import{builtin as i,t as a}from"@cascivo/i18n";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c({max:c,total:l,spacing:u=`md`,isGrid:d=!1,labels:f,className:p,children:m,...h}){let g=r.toArray(m),_=c==null?g:g.slice(0,c),v=(l??g.length)-_.length,y=f?.more?.(v)??a(i.avatarGroup.more,{count:v});return s(`div`,{role:`group`,"data-spacing":u,"data-grid":d||void 0,className:n(t.group,p),...h,children:[_,v>0&&o(e,{className:t.overflow,fallback:`+${v}`,"aria-label":y})]})}export{c as AvatarGroup};
|
package/dist/node/badge/badge.js
CHANGED
|
@@ -1,22 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import { cn as t, normalizeTone as n } from "@cascivo/core/pure";
|
|
3
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
-
//#region ../components/src/badge/badge.tsx
|
|
5
|
-
var i = {
|
|
6
|
-
neutral: "secondary",
|
|
7
|
-
info: "info",
|
|
8
|
-
success: "success",
|
|
9
|
-
warning: "warning",
|
|
10
|
-
danger: "destructive"
|
|
11
|
-
};
|
|
12
|
-
function a({ variant: a = "default", size: o = "md", className: s, children: c, ...l }) {
|
|
13
|
-
return /* @__PURE__ */ r("span", {
|
|
14
|
-
"data-variant": i[n(a)] ?? a,
|
|
15
|
-
"data-size": o,
|
|
16
|
-
className: t(e.badge, s),
|
|
17
|
-
...l,
|
|
18
|
-
children: c
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
//#endregion
|
|
22
|
-
export { a as Badge };
|
|
1
|
+
import e from"./badge.module.js";import{cn as t,normalizeTone as n}from"@cascivo/core/pure";import{jsx as r}from"react/jsx-runtime";var i={neutral:`secondary`,info:`info`,success:`success`,warning:`warning`,danger:`destructive`};function a({variant:a=`default`,size:o=`md`,className:s,children:c,...l}){return r(`span`,{"data-variant":i[n(a)]??a,"data-size":o,className:t(e.badge,s),...l,children:c})}export{a as Badge};
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import { cn as t } from "@cascivo/core/pure";
|
|
3
|
-
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
-
//#region ../components/src/blockquote/blockquote.tsx
|
|
5
|
-
function i({ cite: i, className: a, children: o, ...s }) {
|
|
6
|
-
return /* @__PURE__ */ r("blockquote", {
|
|
7
|
-
className: t(e.blockquote, a),
|
|
8
|
-
...s,
|
|
9
|
-
children: [o, i ? /* @__PURE__ */ n("footer", {
|
|
10
|
-
className: e.footer,
|
|
11
|
-
children: /* @__PURE__ */ n("cite", { children: i })
|
|
12
|
-
}) : null]
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
export { i as Blockquote };
|
|
1
|
+
import e from"./blockquote.module.js";import{cn as t}from"@cascivo/core/pure";import{jsx as n,jsxs as r}from"react/jsx-runtime";function i({cite:i,className:a,children:o,...s}){return r(`blockquote`,{className:t(e.blockquote,a),...s,children:[o,i?n(`footer`,{className:e.footer,children:n(`cite`,{children:i})}):null]})}export{i as Blockquote};
|
|
@@ -1,111 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./bottom-sheet.module.js";
|
|
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
|
-
import { builtin as d, t as f } from "@cascivo/i18n";
|
|
7
|
-
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
8
|
-
//#region ../components/src/bottom-sheet/bottom-sheet.tsx
|
|
9
|
-
var h = 120, g = .6, _ = .1, v = [.5, .92];
|
|
10
|
-
function y({ open: y, defaultOpen: b, onOpenChange: x, snapPoints: S = v, activeSnap: C, defaultSnap: w = 0, onSnapChange: T, title: E, description: D, children: O, labels: k, className: A }) {
|
|
11
|
-
u();
|
|
12
|
-
let [j, M] = s({
|
|
13
|
-
value: y,
|
|
14
|
-
defaultValue: b ?? !1,
|
|
15
|
-
onChange: x
|
|
16
|
-
}), [N, P] = s({
|
|
17
|
-
value: C,
|
|
18
|
-
defaultValue: w,
|
|
19
|
-
onChange: T
|
|
20
|
-
});
|
|
21
|
-
l(j);
|
|
22
|
-
let F = S, I = F[F.length - 1] ?? 1, L = F[0] ?? 0, R = F[Math.min(N.value, F.length - 1)] ?? I, { handleRef: z, offset: B, velocity: V, isDragging: H, reset: U } = c({
|
|
23
|
-
axis: "y",
|
|
24
|
-
onDragEnd: (e) => {
|
|
25
|
-
let t = typeof window > "u" ? 0 : window.innerHeight, n = V.value.y;
|
|
26
|
-
if (U(), t === 0) return;
|
|
27
|
-
let r = R - e.y / t - n * h / t;
|
|
28
|
-
if (n > g || r < L - _) {
|
|
29
|
-
M(!1);
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
let i = 0;
|
|
33
|
-
for (let e = 1; e < F.length; e++) Math.abs((F[e] ?? 0) - r) < Math.abs((F[i] ?? 0) - r) && (i = e);
|
|
34
|
-
P(i);
|
|
35
|
-
}
|
|
36
|
-
}), W = t(), G = t(), K = k?.close ?? f(d.bottomSheet.close), q = k?.handle ?? f(d.bottomSheet.handle), J = `${(1 - R / I) * 100}%`, Y = {
|
|
37
|
-
"--_sheet-height": `${I * 100}dvh`,
|
|
38
|
-
"--_sheet-y": J,
|
|
39
|
-
"--_sheet-drag": `${B.value.y}px`
|
|
40
|
-
};
|
|
41
|
-
return /* @__PURE__ */ p(i, { children: /* @__PURE__ */ p(a, {
|
|
42
|
-
present: j,
|
|
43
|
-
children: /* @__PURE__ */ p("div", {
|
|
44
|
-
className: e.overlay,
|
|
45
|
-
children: /* @__PURE__ */ p(n, {
|
|
46
|
-
onDismiss: () => M(!1),
|
|
47
|
-
children: /* @__PURE__ */ p(r, {
|
|
48
|
-
trapped: !0,
|
|
49
|
-
restoreFocus: !0,
|
|
50
|
-
autoFocus: !0,
|
|
51
|
-
children: /* @__PURE__ */ m("div", {
|
|
52
|
-
role: "dialog",
|
|
53
|
-
"aria-modal": "true",
|
|
54
|
-
"aria-labelledby": E ? W : void 0,
|
|
55
|
-
"aria-describedby": D ? G : void 0,
|
|
56
|
-
"data-dragging": H.value ? "" : void 0,
|
|
57
|
-
className: o(e.panel, A),
|
|
58
|
-
style: Y,
|
|
59
|
-
children: [/* @__PURE__ */ m("div", {
|
|
60
|
-
className: e.header,
|
|
61
|
-
ref: z,
|
|
62
|
-
children: [
|
|
63
|
-
/* @__PURE__ */ p("div", {
|
|
64
|
-
className: e.handle,
|
|
65
|
-
role: "separator",
|
|
66
|
-
"aria-label": q,
|
|
67
|
-
"aria-orientation": "horizontal"
|
|
68
|
-
}),
|
|
69
|
-
(E || D) && /* @__PURE__ */ m("div", {
|
|
70
|
-
className: e.heading,
|
|
71
|
-
children: [E && /* @__PURE__ */ p("h2", {
|
|
72
|
-
id: W,
|
|
73
|
-
className: e.title,
|
|
74
|
-
children: E
|
|
75
|
-
}), D && /* @__PURE__ */ p("p", {
|
|
76
|
-
id: G,
|
|
77
|
-
className: e.description,
|
|
78
|
-
children: D
|
|
79
|
-
})]
|
|
80
|
-
}),
|
|
81
|
-
/* @__PURE__ */ p("button", {
|
|
82
|
-
type: "button",
|
|
83
|
-
"aria-label": K,
|
|
84
|
-
onClick: () => M(!1),
|
|
85
|
-
className: e.close,
|
|
86
|
-
children: /* @__PURE__ */ p("svg", {
|
|
87
|
-
"aria-hidden": "true",
|
|
88
|
-
viewBox: "0 0 16 16",
|
|
89
|
-
className: e.closeIcon,
|
|
90
|
-
children: /* @__PURE__ */ p("path", {
|
|
91
|
-
d: "M4 4l8 8M12 4l-8 8",
|
|
92
|
-
fill: "none",
|
|
93
|
-
stroke: "currentColor",
|
|
94
|
-
strokeWidth: "1.5",
|
|
95
|
-
strokeLinecap: "round"
|
|
96
|
-
})
|
|
97
|
-
})
|
|
98
|
-
})
|
|
99
|
-
]
|
|
100
|
-
}), /* @__PURE__ */ p("div", {
|
|
101
|
-
className: e.body,
|
|
102
|
-
children: O
|
|
103
|
-
})]
|
|
104
|
-
})
|
|
105
|
-
})
|
|
106
|
-
})
|
|
107
|
-
})
|
|
108
|
-
}) });
|
|
109
|
-
}
|
|
110
|
-
//#endregion
|
|
111
|
-
export { y as BottomSheet };
|
|
1
|
+
"use client";import e from"./bottom-sheet.module.js";import{useId as t}from"react";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";import{builtin as d,t as f}from"@cascivo/i18n";import{jsx as p,jsxs as m}from"react/jsx-runtime";var h=120,g=.6,_=.1,v=[.5,.92];function y({open:y,defaultOpen:b,onOpenChange:x,snapPoints:S=v,activeSnap:C,defaultSnap:w=0,onSnapChange:T,title:E,description:D,children:O,labels:k,className:A}){u();let[j,M]=s({value:y,defaultValue:b??!1,onChange:x}),[N,P]=s({value:C,defaultValue:w,onChange:T});l(j);let F=S,I=F[F.length-1]??1,L=F[0]??0,R=F[Math.min(N.value,F.length-1)]??I,{handleRef:z,offset:B,velocity:V,isDragging:H,reset:U}=c({axis:`y`,onDragEnd:e=>{let t=typeof window>`u`?0:window.innerHeight,n=V.value.y;if(U(),t===0)return;let r=R-e.y/t-n*h/t;if(n>g||r<L-_){M(!1);return}let i=0;for(let e=1;e<F.length;e++)Math.abs((F[e]??0)-r)<Math.abs((F[i]??0)-r)&&(i=e);P(i)}}),W=t(),G=t(),K=k?.close??f(d.bottomSheet.close),q=k?.handle??f(d.bottomSheet.handle),J=`${(1-R/I)*100}%`,Y={"--_sheet-height":`${I*100}dvh`,"--_sheet-y":J,"--_sheet-drag":`${B.value.y}px`};return p(i,{children:p(a,{present:j,children:p(`div`,{className:e.overlay,children:p(n,{onDismiss:()=>M(!1),children:p(r,{trapped:!0,restoreFocus:!0,autoFocus:!0,children:m(`div`,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":E?W:void 0,"aria-describedby":D?G:void 0,"data-dragging":H.value?``:void 0,className:o(e.panel,A),style:Y,children:[m(`div`,{className:e.header,ref:z,children:[p(`div`,{className:e.handle,role:`separator`,"aria-label":q,"aria-orientation":`horizontal`}),(E||D)&&m(`div`,{className:e.heading,children:[E&&p(`h2`,{id:W,className:e.title,children:E}),D&&p(`p`,{id:G,className:e.description,children:D})]}),p(`button`,{type:`button`,"aria-label":K,onClick:()=>M(!1),className:e.close,children:p(`svg`,{"aria-hidden":`true`,viewBox:`0 0 16 16`,className:e.closeIcon,children:p(`path`,{d:`M4 4l8 8M12 4l-8 8`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})})})]}),p(`div`,{className:e.body,children:O})]})})})})})})}export{y as BottomSheet};
|
|
@@ -1,14 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
overlay: "_overlay_k9sg5_2",
|
|
3
|
-
panel: "_panel_k9sg5_25",
|
|
4
|
-
header: "_header_k9sg5_59",
|
|
5
|
-
handle: "_handle_k9sg5_77",
|
|
6
|
-
heading: "_heading_k9sg5_87",
|
|
7
|
-
title: "_title_k9sg5_93",
|
|
8
|
-
description: "_description_k9sg5_100",
|
|
9
|
-
close: "_close_k9sg5_106",
|
|
10
|
-
closeIcon: "_closeIcon_k9sg5_140",
|
|
11
|
-
body: "_body_k9sg5_145"
|
|
12
|
-
};
|
|
13
|
-
//#endregion
|
|
14
|
-
export { e as default };
|
|
1
|
+
var e={overlay:`_overlay_k9sg5_2`,panel:`_panel_k9sg5_25`,header:`_header_k9sg5_59`,handle:`_handle_k9sg5_77`,heading:`_heading_k9sg5_87`,title:`_title_k9sg5_93`,description:`_description_k9sg5_100`,close:`_close_k9sg5_106`,closeIcon:`_closeIcon_k9sg5_140`,body:`_body_k9sg5_145`};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./logo.module.js";import{cn as t}from"@cascivo/core/pure";import{jsx as n,jsxs as r}from"react/jsx-runtime";var i=`M0 0H32V11H11V21H32V32H0Z`,a=16;function o({accent:t,size:a,labelled:o}){return r(`svg`,{viewBox:`0 0 32 32`,width:a,height:a,className:e.mark,...o?{role:`img`}:{"aria-hidden":!0},children:[o&&n(`title`,{children:`cascivo`}),n(`path`,{d:i,fill:`currentColor`}),t&&n(`rect`,{x:`11`,y:`11`,width:`21`,height:`10`,className:e.notch})]})}function s({variant:i=`mark`,size:s,className:c,style:l,...u}){let d=Math.max(s??(i===`nav`?18:32),a),f=i===`horizontal`||i===`stacked`||i===`nav`;return r(`span`,{"data-cascivo-logo":i,className:t(e.logo,c),style:{"--cascivo-logo-size":`${d}px`,...l},...u,children:[n(o,{accent:i!==`mark`&&i!==`nav`,size:d,labelled:!f}),f&&n(`span`,{className:e.wordmark,children:`cascivo`})]})}export{s as Logo};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={logo:`_logo_10h42_2`,mark:`_mark_10h42_25`,notch:`_notch_10h42_30`,wordmark:`_wordmark_10h42_34`};export{e as default};
|
|
@@ -1,28 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./breadcrumb.module.js";
|
|
4
|
-
import { cn as t, getLinkComponent as n, useSignals as r } from "@cascivo/core";
|
|
5
|
-
import { builtin as i, t as a } from "@cascivo/i18n";
|
|
6
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/breadcrumb/breadcrumb.tsx
|
|
8
|
-
function s({ items: s, maxVisible: c, className: l, ariaLabel: u, label: d }) {
|
|
9
|
-
r();
|
|
10
|
-
let f = n(), p = u ?? d ?? a(i.breadcrumb.nav), m = s, h = s[0];
|
|
11
|
-
return h !== void 0 && c !== void 0 && s.length > c && (m = [
|
|
12
|
-
h,
|
|
13
|
-
{ label: "…" },
|
|
14
|
-
...s.slice(s.length - (c - 2))
|
|
15
|
-
]), /* @__PURE__ */ o("nav", {
|
|
16
|
-
"aria-label": p,
|
|
17
|
-
className: t(e.breadcrumb, l),
|
|
18
|
-
children: /* @__PURE__ */ o("ol", { children: m.map((e, t) => /* @__PURE__ */ o("li", { children: t === m.length - 1 ? /* @__PURE__ */ o("span", {
|
|
19
|
-
"aria-current": "page",
|
|
20
|
-
children: e.label
|
|
21
|
-
}) : e.href === void 0 ? /* @__PURE__ */ o("span", { children: e.label }) : /* @__PURE__ */ o(f, {
|
|
22
|
-
href: e.href,
|
|
23
|
-
children: e.label
|
|
24
|
-
}) }, e.id ?? `${t}-${e.label}`)) })
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
export { s as Breadcrumb };
|
|
1
|
+
"use client";import e from"./breadcrumb.module.js";import{cn as t,getLinkComponent as n,useSignals as r}from"@cascivo/core";import{builtin as i,t as a}from"@cascivo/i18n";import{jsx as o}from"react/jsx-runtime";function s({items:s,maxVisible:c,className:l,ariaLabel:u,label:d}){r();let f=n(),p=u??d??a(i.breadcrumb.nav),m=s,h=s[0];return h!==void 0&&c!==void 0&&s.length>c&&(m=[h,{label:`…`},...s.slice(s.length-(c-2))]),o(`nav`,{"aria-label":p,className:t(e.breadcrumb,l),children:o(`ol`,{children:m.map((e,t)=>o(`li`,{children:t===m.length-1?o(`span`,{"aria-current":`page`,children:e.label}):e.href===void 0?o(`span`,{children:e.label}):o(f,{href:e.href,children:e.label})},e.id??`${t}-${e.label}`))})})}export{s as Breadcrumb};
|
|
@@ -1,35 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import t from "./button.module.js";
|
|
3
|
-
import { Slot as n, cn as r } from "@cascivo/core/pure";
|
|
4
|
-
import { forwardRef as i } from "react";
|
|
5
|
-
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
-
//#region ../components/src/button/button.tsx
|
|
7
|
-
var s = i(function({ variant: i = "primary", size: s = "md", loading: c = !1, asChild: l = !1, className: u, disabled: d, children: f, ...p }, m) {
|
|
8
|
-
let h = {
|
|
9
|
-
"data-variant": i,
|
|
10
|
-
"data-size": s,
|
|
11
|
-
"data-state": c ? "loading" : "idle",
|
|
12
|
-
"aria-busy": c || void 0,
|
|
13
|
-
className: r(t.button, u)
|
|
14
|
-
};
|
|
15
|
-
return l ? /* @__PURE__ */ a(n, {
|
|
16
|
-
...h,
|
|
17
|
-
ref: m,
|
|
18
|
-
...p,
|
|
19
|
-
children: f
|
|
20
|
-
}) : /* @__PURE__ */ o("button", {
|
|
21
|
-
...h,
|
|
22
|
-
ref: m,
|
|
23
|
-
disabled: d || c,
|
|
24
|
-
...p,
|
|
25
|
-
children: [c && /* @__PURE__ */ a(e, {
|
|
26
|
-
size: "sm",
|
|
27
|
-
"aria-hidden": "true"
|
|
28
|
-
}), /* @__PURE__ */ a("span", {
|
|
29
|
-
className: t.label,
|
|
30
|
-
children: f
|
|
31
|
-
})]
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
//#endregion
|
|
35
|
-
export { s as Button };
|
|
1
|
+
import{Spinner as e}from"../spinner/spinner.js";import t from"./button.module.js";import{Slot as n,cn as r}from"@cascivo/core/pure";import{forwardRef as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=i(function({variant:i=`primary`,size:s=`md`,loading:c=!1,asChild:l=!1,className:u,disabled:d,children:f,...p},m){let h={"data-variant":i,"data-size":s,"data-state":c?`loading`:`idle`,"aria-busy":c||void 0,className:r(t.button,u)};return l?a(n,{...h,ref:m,...p,children:f}):o(`button`,{...h,ref:m,disabled:d||c,...p,children:[c&&a(e,{size:`sm`,"aria-hidden":`true`}),a(`span`,{className:t.label,children:f})]})});export{s as Button};
|
|
@@ -1,39 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./button-group.module.js";
|
|
4
|
-
import { forwardRef as t } from "react";
|
|
5
|
-
import { cn as n } from "@cascivo/core";
|
|
6
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/button-group/button-group.tsx
|
|
8
|
-
function i(e) {
|
|
9
|
-
return Array.from(e.querySelectorAll("button, a[href], [tabindex]")).filter((e) => !e.hasAttribute("disabled") && e.getAttribute("aria-disabled") !== "true");
|
|
10
|
-
}
|
|
11
|
-
var a = t(function({ orientation: t = "horizontal", size: a = "md", roving: o = !1, loop: s = !1, className: c, onKeyDown: l, children: u, ...d }, f) {
|
|
12
|
-
return /* @__PURE__ */ r("div", {
|
|
13
|
-
role: "group",
|
|
14
|
-
"data-orientation": t,
|
|
15
|
-
"data-size": a,
|
|
16
|
-
className: n(e.buttonGroup, c),
|
|
17
|
-
ref: f,
|
|
18
|
-
onKeyDown: (e) => {
|
|
19
|
-
if (l?.(e), !o) return;
|
|
20
|
-
let n = t === "horizontal", r = n ? "ArrowRight" : "ArrowDown", a = n ? "ArrowLeft" : "ArrowUp";
|
|
21
|
-
if (![
|
|
22
|
-
r,
|
|
23
|
-
a,
|
|
24
|
-
"Home",
|
|
25
|
-
"End"
|
|
26
|
-
].includes(e.key)) return;
|
|
27
|
-
let c = i(e.currentTarget);
|
|
28
|
-
if (c.length === 0) return;
|
|
29
|
-
let u = c.indexOf(document.activeElement);
|
|
30
|
-
if (u === -1) return;
|
|
31
|
-
let d = u;
|
|
32
|
-
e.key === r ? d = u + 1 : e.key === a ? d = u - 1 : e.key === "Home" ? d = 0 : e.key === "End" && (d = c.length - 1), d < 0 && (d = s ? c.length - 1 : 0), d >= c.length && (d = s ? 0 : c.length - 1), e.preventDefault(), c[d]?.focus();
|
|
33
|
-
},
|
|
34
|
-
...d,
|
|
35
|
-
children: u
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
//#endregion
|
|
39
|
-
export { a as ButtonGroup };
|
|
1
|
+
"use client";import e from"./button-group.module.js";import{forwardRef as t}from"react";import{cn as n}from"@cascivo/core";import{jsx as r}from"react/jsx-runtime";function i(e){return Array.from(e.querySelectorAll(`button, a[href], [tabindex]`)).filter(e=>!e.hasAttribute(`disabled`)&&e.getAttribute(`aria-disabled`)!==`true`)}var a=t(function({orientation:t=`horizontal`,size:a=`md`,roving:o=!1,loop:s=!1,className:c,onKeyDown:l,children:u,...d},f){return r(`div`,{role:`group`,"data-orientation":t,"data-size":a,className:n(e.buttonGroup,c),ref:f,onKeyDown:e=>{if(l?.(e),!o)return;let n=t===`horizontal`,r=n?`ArrowRight`:`ArrowDown`,a=n?`ArrowLeft`:`ArrowUp`;if(![r,a,`Home`,`End`].includes(e.key))return;let c=i(e.currentTarget);if(c.length===0)return;let u=c.indexOf(document.activeElement);if(u===-1)return;let d=u;e.key===r?d=u+1:e.key===a?d=u-1:e.key===`Home`?d=0:e.key===`End`&&(d=c.length-1),d<0&&(d=s?c.length-1:0),d>=c.length&&(d=s?0:c.length-1),e.preventDefault(),c[d]?.focus()},...d,children:u})});export{a as ButtonGroup};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))}function t(e=new Date){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))}function n(e){try{let t=new Intl.Locale(e).weekInfo;if(t)return t.firstDay%7}catch{}return 1}function r(e,t,n){let r=new Date(Date.UTC(e,t,1)),i=new Date(Date.UTC(e,t+1,0)),a=(r.getUTCDay()-n+7)%7,o=[];for(let e=0;e<a;e++)o.push(null);for(let n=1;n<=i.getUTCDate();n++)o.push(new Date(Date.UTC(e,t,n)));for(;o.length%7!=0;)o.push(null);let s=[];for(let e=0;e<o.length;e+=7)s.push(o.slice(e,e+7));return s}function i(e){return`${e.getUTCFullYear()}-${e.getUTCMonth()}-${e.getUTCDate()}`}function a(e,t){return!e||!t?!1:i(e)===i(t)}function o(e,t){return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()+t))}function s(e,t){let n=e.getUTCFullYear(),r=e.getUTCMonth()+t,i=new Date(Date.UTC(n,r+1,0)).getUTCDate();return new Date(Date.UTC(n,r,Math.min(e.getUTCDate(),i)))}function c(e,t){return o(e,-((e.getUTCDay()-t+7)%7))}function l(t,n,r){let i=e(t).getTime();return!!(n&&i<e(n).getTime()||r&&i>e(r).getTime())}function u(t){let n=o(e(t),3-(t.getUTCDay()+6)%7),r=new Date(Date.UTC(n.getUTCFullYear(),0,4)),i=n.getTime()-c(r,1).getTime();return 1+Math.floor(i/(10080*60*1e3))}function d(e,t,n){let r=t>0?1:-1,i=o(e,t);for(let e=0;e<366;e++){if(l(i,n.min,n.max))return null;if(!n.isDisabled?.(i))return i;i=o(i,r)}return null}function f(t,n,r){let i=s(t,n);if(l(i,r.min,r.max)){let i=n>0?r.max:r.min;if(!i)return null;let a=e(i),o=e(t).getTime();return(n>0?a.getTime()<=o:a.getTime()>=o)?null:r.isDisabled?.(a)?d(a,n>0?-1:1,r):a}return r.isDisabled?.(i)?d(i,n>0?1:-1,r):i}function p(t,n,r,i,a){let o=new Date(Date.UTC(t,n+r,1));return r<0&&i?new Date(Date.UTC(t,n+r+1,0)).getTime()<e(i).getTime():r>0&&a?o.getTime()>e(a).getTime():!1}export{o as addDays,i as dayKey,r as getMonthGrid,n as getWeekStart,u as isoWeek,t as localToday,d as moveByDays,f as moveByMonths,l as outOfRange,a as sameDay,c as startOfWeek,p as viewStepBlocked};
|
|
@@ -1,199 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./calendar.module.js";
|
|
4
|
-
import { batch as t, cn as n, useControllableSignal as r, useSignal as i, useSignals as a } from "@cascivo/core";
|
|
5
|
-
import { builtin as o, currentLocale as s, t as c } from "@cascivo/i18n";
|
|
6
|
-
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/calendar/calendar.tsx
|
|
8
|
-
function d(e) {
|
|
9
|
-
try {
|
|
10
|
-
let t = new Intl.Locale(e).weekInfo;
|
|
11
|
-
if (t) return t.firstDay % 7;
|
|
12
|
-
} catch {}
|
|
13
|
-
return 1;
|
|
14
|
-
}
|
|
15
|
-
function f(e, t, n) {
|
|
16
|
-
let r = new Date(Date.UTC(e, t, 1)), i = new Date(Date.UTC(e, t + 1, 0)), a = (r.getUTCDay() - n + 7) % 7, o = [];
|
|
17
|
-
for (let e = 0; e < a; e++) o.push(null);
|
|
18
|
-
for (let n = 1; n <= i.getUTCDate(); n++) o.push(new Date(Date.UTC(e, t, n)));
|
|
19
|
-
for (; o.length % 7 != 0;) o.push(null);
|
|
20
|
-
let s = [];
|
|
21
|
-
for (let e = 0; e < o.length; e += 7) s.push(o.slice(e, e + 7));
|
|
22
|
-
return s;
|
|
23
|
-
}
|
|
24
|
-
function p(e) {
|
|
25
|
-
return `${e.getUTCFullYear()}-${e.getUTCMonth()}-${e.getUTCDate()}`;
|
|
26
|
-
}
|
|
27
|
-
function m(e, t) {
|
|
28
|
-
return !e || !t ? !1 : p(e) === p(t);
|
|
29
|
-
}
|
|
30
|
-
function h(e, t) {
|
|
31
|
-
return new Date(Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate() + t));
|
|
32
|
-
}
|
|
33
|
-
function g(e, t) {
|
|
34
|
-
return new Date(Date.UTC(e.getUTCFullYear(), e.getUTCMonth() + t, e.getUTCDate()));
|
|
35
|
-
}
|
|
36
|
-
function _(e, t) {
|
|
37
|
-
return h(e, -((e.getUTCDay() - t + 7) % 7));
|
|
38
|
-
}
|
|
39
|
-
function v(e, t, n) {
|
|
40
|
-
if (t) {
|
|
41
|
-
let n = new Date(Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()));
|
|
42
|
-
if (e.getTime() < n.getTime()) return !0;
|
|
43
|
-
}
|
|
44
|
-
if (n) {
|
|
45
|
-
let t = new Date(Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate()));
|
|
46
|
-
if (e.getTime() > t.getTime()) return !0;
|
|
47
|
-
}
|
|
48
|
-
return !1;
|
|
49
|
-
}
|
|
50
|
-
function y({ value: p, defaultValue: y, onValueChange: b, min: x, max: S, disabled: C, locale: w, size: T = "md", labels: E, className: D, isInRange: O, isRangeStart: k, isRangeEnd: A, onDayHover: j, month: M, year: N, onViewChange: P, hideNav: F = !1 }) {
|
|
51
|
-
a();
|
|
52
|
-
let I = w ?? s(), L = E?.previousMonth ?? c(o.calendar.previousMonth), R = E?.nextMonth ?? c(o.calendar.nextMonth), z = p === void 0 ? y ?? null : p, B = /* @__PURE__ */ new Date(), V = z ?? y ?? B, [H] = r({
|
|
53
|
-
value: N,
|
|
54
|
-
defaultValue: V.getUTCFullYear()
|
|
55
|
-
}), [U] = r({
|
|
56
|
-
value: M,
|
|
57
|
-
defaultValue: V.getUTCMonth()
|
|
58
|
-
}), W = i(V), G = d(I), K = f(H.value, U.value, G), q = new Intl.DateTimeFormat(I, { weekday: "short" }), J = Array.from({ length: 7 }, (e, t) => {
|
|
59
|
-
let n = new Date(Date.UTC(2024, 0, 7 + G + t));
|
|
60
|
-
return q.format(n);
|
|
61
|
-
}), ee = new Intl.DateTimeFormat(I, {
|
|
62
|
-
weekday: "long",
|
|
63
|
-
year: "numeric",
|
|
64
|
-
month: "long",
|
|
65
|
-
day: "numeric"
|
|
66
|
-
}), Y = new Intl.DateTimeFormat(I, {
|
|
67
|
-
month: "long",
|
|
68
|
-
year: "numeric"
|
|
69
|
-
}).format(new Date(Date.UTC(H.value, U.value, 1))), X = (e) => v(e, x, S) || (C ? C(e) : !1), Z = M !== void 0 || N !== void 0, te = (e) => {
|
|
70
|
-
Z ? W.value = e : t(() => {
|
|
71
|
-
H.value = e.getUTCFullYear(), U.value = e.getUTCMonth(), W.value = e;
|
|
72
|
-
}), P?.({
|
|
73
|
-
month: e.getUTCMonth(),
|
|
74
|
-
year: e.getUTCFullYear()
|
|
75
|
-
});
|
|
76
|
-
}, Q = (e) => {
|
|
77
|
-
X(e) || b?.(e);
|
|
78
|
-
}, $ = (e) => {
|
|
79
|
-
let n = g(new Date(Date.UTC(H.value, U.value, 1)), e), r = n.getUTCMonth(), i = n.getUTCFullYear();
|
|
80
|
-
Z || t(() => {
|
|
81
|
-
U.value = r, H.value = i;
|
|
82
|
-
}), P?.({
|
|
83
|
-
month: r,
|
|
84
|
-
year: i
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
return /* @__PURE__ */ u("div", {
|
|
88
|
-
className: n(e.calendar, D),
|
|
89
|
-
"data-size": T,
|
|
90
|
-
onMouseLeave: () => j?.(null),
|
|
91
|
-
children: [/* @__PURE__ */ u("div", {
|
|
92
|
-
className: e.header,
|
|
93
|
-
children: [
|
|
94
|
-
F ? /* @__PURE__ */ l("span", { className: e.navSpacer }) : /* @__PURE__ */ l("button", {
|
|
95
|
-
type: "button",
|
|
96
|
-
className: e.navButton,
|
|
97
|
-
"aria-label": L,
|
|
98
|
-
onClick: () => $(-1),
|
|
99
|
-
children: "‹"
|
|
100
|
-
}),
|
|
101
|
-
/* @__PURE__ */ l("span", {
|
|
102
|
-
className: e.monthLabel,
|
|
103
|
-
"aria-live": "polite",
|
|
104
|
-
children: Y
|
|
105
|
-
}),
|
|
106
|
-
F ? /* @__PURE__ */ l("span", { className: e.navSpacer }) : /* @__PURE__ */ l("button", {
|
|
107
|
-
type: "button",
|
|
108
|
-
className: e.navButton,
|
|
109
|
-
"aria-label": R,
|
|
110
|
-
onClick: () => $(1),
|
|
111
|
-
children: "›"
|
|
112
|
-
})
|
|
113
|
-
]
|
|
114
|
-
}), /* @__PURE__ */ u("table", {
|
|
115
|
-
role: "grid",
|
|
116
|
-
"aria-label": Y,
|
|
117
|
-
className: e.grid,
|
|
118
|
-
onKeyDown: (e) => {
|
|
119
|
-
let t = W.value, n;
|
|
120
|
-
switch (e.key) {
|
|
121
|
-
case "ArrowRight":
|
|
122
|
-
n = h(t, 1);
|
|
123
|
-
break;
|
|
124
|
-
case "ArrowLeft":
|
|
125
|
-
n = h(t, -1);
|
|
126
|
-
break;
|
|
127
|
-
case "ArrowDown":
|
|
128
|
-
n = h(t, 7);
|
|
129
|
-
break;
|
|
130
|
-
case "ArrowUp":
|
|
131
|
-
n = h(t, -7);
|
|
132
|
-
break;
|
|
133
|
-
case "Home":
|
|
134
|
-
n = _(t, G);
|
|
135
|
-
break;
|
|
136
|
-
case "End":
|
|
137
|
-
n = h(_(t, G), 6);
|
|
138
|
-
break;
|
|
139
|
-
case "PageUp":
|
|
140
|
-
n = g(t, e.shiftKey ? -12 : -1);
|
|
141
|
-
break;
|
|
142
|
-
case "PageDown":
|
|
143
|
-
n = g(t, e.shiftKey ? 12 : 1);
|
|
144
|
-
break;
|
|
145
|
-
case "Enter":
|
|
146
|
-
case " ":
|
|
147
|
-
e.preventDefault(), Q(t);
|
|
148
|
-
return;
|
|
149
|
-
default: return;
|
|
150
|
-
}
|
|
151
|
-
e.preventDefault(), te(n), j?.(n);
|
|
152
|
-
},
|
|
153
|
-
children: [/* @__PURE__ */ l("thead", { children: /* @__PURE__ */ l("tr", {
|
|
154
|
-
role: "row",
|
|
155
|
-
children: J.map((t) => /* @__PURE__ */ l("th", {
|
|
156
|
-
className: e.weekday,
|
|
157
|
-
abbr: t,
|
|
158
|
-
scope: "col",
|
|
159
|
-
children: t
|
|
160
|
-
}, t))
|
|
161
|
-
}) }), /* @__PURE__ */ l("tbody", { children: K.map((t, n) => /* @__PURE__ */ l("tr", {
|
|
162
|
-
role: "row",
|
|
163
|
-
children: t.map((t, n) => {
|
|
164
|
-
if (!t) return /* @__PURE__ */ l("td", {
|
|
165
|
-
role: "gridcell",
|
|
166
|
-
className: e.empty
|
|
167
|
-
}, n);
|
|
168
|
-
let r = m(t, z), i = m(t, B), a = m(t, W.value), o = X(t), s = O ? O(t) : !1, c = k ? k(t) : !1, u = A ? A(t) : !1;
|
|
169
|
-
return /* @__PURE__ */ l("td", {
|
|
170
|
-
role: "gridcell",
|
|
171
|
-
className: e.cell,
|
|
172
|
-
"aria-selected": r,
|
|
173
|
-
children: /* @__PURE__ */ l("button", {
|
|
174
|
-
type: "button",
|
|
175
|
-
className: e.day,
|
|
176
|
-
tabIndex: a ? 0 : -1,
|
|
177
|
-
"aria-label": ee.format(t),
|
|
178
|
-
"aria-current": i ? "date" : void 0,
|
|
179
|
-
"aria-disabled": o || void 0,
|
|
180
|
-
"data-selected": r || void 0,
|
|
181
|
-
"data-today": i || void 0,
|
|
182
|
-
"data-in-range": s || void 0,
|
|
183
|
-
"data-range-start": c || void 0,
|
|
184
|
-
"data-range-end": u || void 0,
|
|
185
|
-
onClick: () => Q(t),
|
|
186
|
-
onFocus: () => {
|
|
187
|
-
W.value = t;
|
|
188
|
-
},
|
|
189
|
-
onMouseEnter: () => j?.(t),
|
|
190
|
-
children: t.getUTCDate()
|
|
191
|
-
})
|
|
192
|
-
}, n);
|
|
193
|
-
})
|
|
194
|
-
}, n)) })]
|
|
195
|
-
})]
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
//#endregion
|
|
199
|
-
export { y as Calendar };
|
|
1
|
+
"use client";import{addDays as e,dayKey as t,getMonthGrid as n,getWeekStart as r,isoWeek as i,localToday as a,moveByDays as o,moveByMonths as s,outOfRange as ee,sameDay as c,startOfWeek as l,viewStepBlocked as u}from"./calendar-date.js";import d from"./calendar.module.js";import{useRef as f}from"react";import{batch as p,cn as te,focusElement as ne,useSignal as m,useSignalEffect as re,useSignals as ie}from"@cascivo/core";import{builtin as h,currentLocale as ae,t as g}from"@cascivo/i18n";import{jsx as _,jsxs as v}from"react/jsx-runtime";function y({value:y,defaultValue:b,onValueChange:x,min:S,max:C,disabled:w,locale:oe,size:se=`md`,labels:T,className:ce,ariaLabel:le,label:ue,isInRange:de,isRangeStart:E,isRangeEnd:fe,onDayHover:D,month:O,year:k,onViewChange:A,hideNav:j=!1,showToday:pe=!1,showWeekNumbers:M=!1}){ie();let N=oe??ae(),P=f(null),me=T?.previousMonth??g(h.calendar.previousMonth),he=T?.nextMonth??g(h.calendar.nextMonth),F=T?.today??g(h.calendar.today),I=T?.weekNumber??g(h.calendar.weekNumber),L=y===void 0?b??null:y,R=a(),z=L??b??R,B=m(z.getUTCFullYear()),V=m(z.getUTCMonth()),H=m(z),U=m(null),W=O!==void 0||k!==void 0;k!==void 0&&B.peek()!==k&&(B.value=k),O!==void 0&&V.peek()!==O&&(V.value=O);let G=f(L?t(L):null),K=L?t(L):null;K!==G.current&&(G.current=K,L&&!W&&p(()=>{B.value=L.getUTCFullYear(),V.value=L.getUTCMonth(),H.value=L}));let q=r(N),ge=n(B.value,V.value,q),_e=new Intl.DateTimeFormat(N,{weekday:`short`}),ve=Array.from({length:7},(e,t)=>{let n=new Date(Date.UTC(2024,0,7+q+t));return _e.format(n)}),ye=new Intl.DateTimeFormat(N,{weekday:`long`,year:`numeric`,month:`long`,day:`numeric`}),J=new Intl.DateTimeFormat(N,{month:`long`,year:`numeric`}).format(new Date(Date.UTC(B.value,V.value,1))),Y=e=>ee(e,S,C)||(w?w(e):!1),X={min:S,max:C,isDisabled:w},Z=e=>{let n=e.getUTCMonth()!==V.peek()||e.getUTCFullYear()!==B.peek();W?H.value=e:p(()=>{B.value=e.getUTCFullYear(),V.value=e.getUTCMonth(),H.value=e}),U.value=t(e),n&&A?.({month:e.getUTCMonth(),year:e.getUTCFullYear()})};re(()=>{let e=U.value;if(!e)return;let t=setTimeout(()=>{U.value=null,ne(P.current?.querySelector(`[data-day="${e}"]`)??null)},0);return()=>clearTimeout(t)});let Q=e=>{Y(e)||(H.value=e,x?.(e))},$=e=>{let t=B.peek(),n=V.peek();if(u(t,n,e,S,C))return;let r=((n+e)%12+12)%12,i=t+Math.floor((n+e)/12);W||p(()=>{V.value=r,B.value=i}),A?.({month:r,year:i})},be=()=>{Y(R)||Z(R)},xe=t=>{let n=H.value,r;switch(t.key){case`ArrowRight`:r=o(n,1,X);break;case`ArrowLeft`:r=o(n,-1,X);break;case`ArrowDown`:r=o(n,7,X);break;case`ArrowUp`:r=o(n,-7,X);break;case`Home`:{let e=l(n,q);r=Y(e)?o(e,1,X):e;break}case`End`:{let t=e(l(n,q),6);r=Y(t)?o(t,-1,X):t;break}case`PageUp`:r=s(n,t.shiftKey?-12:-1,X);break;case`PageDown`:r=s(n,t.shiftKey?12:1,X);break;case`Enter`:case` `:t.preventDefault(),Q(n);return;default:return}t.preventDefault(),r&&(Z(r),D?.(r))},Se=u(B.value,V.value,-1,S,C),Ce=u(B.value,V.value,1,S,C);return v(`div`,{className:te(d.calendar,ce),"data-size":se,onMouseLeave:()=>D?.(null),children:[v(`div`,{className:d.header,children:[j?_(`span`,{className:d.navSpacer}):_(`button`,{type:`button`,className:d.navButton,"aria-label":me,disabled:Se,onClick:()=>$(-1),children:_(`span`,{"aria-hidden":`true`,children:`‹`})}),_(`span`,{className:d.monthLabel,children:J}),j?_(`span`,{className:d.navSpacer}):_(`button`,{type:`button`,className:d.navButton,"aria-label":he,disabled:Ce,onClick:()=>$(1),children:_(`span`,{"aria-hidden":`true`,children:`›`})})]}),v(`table`,{ref:P,role:`grid`,"aria-label":le??ue??J,className:d.grid,onKeyDown:xe,children:[_(`thead`,{children:v(`tr`,{role:`row`,children:[M&&_(`th`,{className:d.weekday,scope:`col`,children:_(`span`,{className:d.srOnly,children:I})}),ve.map(e=>_(`th`,{className:d.weekday,abbr:e,scope:`col`,children:e},e))]})}),_(`tbody`,{children:ge.map((e,n)=>{let r=e.find(Boolean);return v(`tr`,{role:`row`,children:[M&&_(`th`,{scope:`row`,className:d.weekNumber,children:r?i(r):``}),e.map((e,n)=>{if(!e)return _(`td`,{role:`gridcell`,className:d.empty},n);let r=c(e,L),i=c(e,R),a=c(e,H.value),o=Y(e);return _(`td`,{role:`gridcell`,className:d.cell,children:_(`button`,{type:`button`,className:d.day,"data-day":t(e),tabIndex:a?0:-1,"aria-label":ye.format(e),"aria-selected":r||void 0,"aria-current":i?`date`:void 0,"aria-disabled":o||void 0,"data-selected":r||void 0,"data-today":i||void 0,"data-in-range":(de?.(e)??!1)||void 0,"data-range-start":(E?.(e)??!1)||void 0,"data-range-end":(fe?.(e)??!1)||void 0,onClick:()=>Q(e),onFocus:()=>{H.value=e},onMouseEnter:()=>D?.(e),children:e.getUTCDate()})},n)})]},n)})})]}),pe&&_(`div`,{className:d.footer,children:_(`button`,{type:`button`,className:d.todayButton,disabled:Y(R),onClick:be,children:F})}),_(`span`,{className:d.srOnly,role:`status`,"aria-live":`polite`,children:J})]})}export{y as Calendar};
|