@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,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};
|
|
@@ -1,15 +1,2 @@
|
|
|
1
1
|
import './calendar.css';
|
|
2
|
-
var e
|
|
3
|
-
calendar: "_calendar_7pqxh_2",
|
|
4
|
-
header: "_header_7pqxh_33",
|
|
5
|
-
monthLabel: "_monthLabel_7pqxh_40",
|
|
6
|
-
navButton: "_navButton_7pqxh_46",
|
|
7
|
-
navSpacer: "_navSpacer_7pqxh_69",
|
|
8
|
-
grid: "_grid_7pqxh_74",
|
|
9
|
-
weekday: "_weekday_7pqxh_79",
|
|
10
|
-
cell: "_cell_7pqxh_88",
|
|
11
|
-
empty: "_empty_7pqxh_99",
|
|
12
|
-
day: "_day_7pqxh_104"
|
|
13
|
-
};
|
|
14
|
-
//#endregion
|
|
15
|
-
export { e as default };
|
|
2
|
+
var e={calendar:`_calendar_7zg07_2`,header:`_header_7zg07_33`,monthLabel:`_monthLabel_7zg07_40`,navButton:`_navButton_7zg07_46`,navSpacer:`_navSpacer_7zg07_69`,grid:`_grid_7zg07_74`,weekday:`_weekday_7zg07_79`,cell:`_cell_7zg07_88`,empty:`_empty_7zg07_99`,day:`_day_7zg07_104`,srOnly:`_srOnly_7zg07_143`,weekNumber:`_weekNumber_7zg07_155`,footer:`_footer_7zg07_163`,todayButton:`_todayButton_7zg07_170`};export{e as default};
|
package/dist/card/card.js
CHANGED
|
@@ -1,53 +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/card/card.tsx
|
|
5
|
-
function i({ variant: r = "default", padding: i = "md", className: a, children: o, ...s }) {
|
|
6
|
-
return /* @__PURE__ */ n("div", {
|
|
7
|
-
"data-variant": r,
|
|
8
|
-
"data-padding": i,
|
|
9
|
-
className: t(e.card, a),
|
|
10
|
-
...s,
|
|
11
|
-
children: o
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
function a({ actions: i, className: a, children: o, ...s }) {
|
|
15
|
-
return i === void 0 ? /* @__PURE__ */ n("div", {
|
|
16
|
-
className: t(e.header, a),
|
|
17
|
-
...s,
|
|
18
|
-
children: o
|
|
19
|
-
}) : /* @__PURE__ */ r("div", {
|
|
20
|
-
className: t(e.header, e.headerRow, a),
|
|
21
|
-
...s,
|
|
22
|
-
children: [/* @__PURE__ */ n("div", {
|
|
23
|
-
className: e.headerMain,
|
|
24
|
-
children: o
|
|
25
|
-
}), /* @__PURE__ */ n("div", {
|
|
26
|
-
className: e.headerActions,
|
|
27
|
-
children: i
|
|
28
|
-
})]
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
function o({ className: r, children: i, ...a }) {
|
|
32
|
-
return /* @__PURE__ */ n("h3", {
|
|
33
|
-
className: t(e.title, r),
|
|
34
|
-
...a,
|
|
35
|
-
children: i
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
function s({ className: r, children: i, ...a }) {
|
|
39
|
-
return /* @__PURE__ */ n("div", {
|
|
40
|
-
className: t(e.content, r),
|
|
41
|
-
...a,
|
|
42
|
-
children: i
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
function c({ className: r, children: i, ...a }) {
|
|
46
|
-
return /* @__PURE__ */ n("div", {
|
|
47
|
-
className: t(e.footer, r),
|
|
48
|
-
...a,
|
|
49
|
-
children: i
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
//#endregion
|
|
53
|
-
export { i as Card, s as CardContent, c as CardFooter, a as CardHeader, o as CardTitle };
|
|
1
|
+
import e from"./card.module.js";import{cn as t}from"@cascivo/core/pure";import{jsx as n,jsxs as r}from"react/jsx-runtime";function i({variant:r=`default`,padding:i=`md`,className:a,children:o,...s}){return n(`div`,{"data-cascivo-card":``,"data-variant":r,"data-padding":i,className:t(e.card,a),...s,children:o})}function a({actions:i,className:a,children:o,...s}){return i===void 0?n(`div`,{className:t(e.header,a),...s,children:o}):r(`div`,{className:t(e.header,e.headerRow,a),...s,children:[n(`div`,{className:e.headerMain,children:o}),n(`div`,{className:e.headerActions,children:i})]})}function o({className:r,children:i,...a}){return n(`h3`,{className:t(e.title,r),...a,children:i})}function s({className:r,children:i,...a}){return n(`div`,{className:t(e.content,r),...a,children:i})}function c({className:r,children:i,...a}){return n(`div`,{className:t(e.footer,r),...a,children:i})}export{i as Card,s as CardContent,c as CardFooter,a as CardHeader,o as CardTitle};
|
package/dist/card/card.module.js
CHANGED
|
@@ -1,13 +1,2 @@
|
|
|
1
1
|
import './card.css';
|
|
2
|
-
var e
|
|
3
|
-
card: "_card_ipz9f_2",
|
|
4
|
-
header: "_header_ipz9f_19",
|
|
5
|
-
content: "_content_ipz9f_19",
|
|
6
|
-
footer: "_footer_ipz9f_19",
|
|
7
|
-
headerRow: "_headerRow_ipz9f_74",
|
|
8
|
-
headerMain: "_headerMain_ipz9f_82",
|
|
9
|
-
headerActions: "_headerActions_ipz9f_89",
|
|
10
|
-
title: "_title_ipz9f_97"
|
|
11
|
-
};
|
|
12
|
-
//#endregion
|
|
13
|
-
export { e as default };
|
|
2
|
+
var e={card:`_card_ipz9f_2`,header:`_header_ipz9f_19`,content:`_content_ipz9f_19`,footer:`_footer_ipz9f_19`,headerRow:`_headerRow_ipz9f_74`,headerMain:`_headerMain_ipz9f_82`,headerActions:`_headerActions_ipz9f_89`,title:`_title_ipz9f_97`};export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cascivo.component{.
|
|
1
|
+
@layer cascivo.component{._carousel_1j5w5_2{gap:var(--cascivo-space-3);flex-direction:column;inline-size:100%;display:flex}._viewport_1j5w5_9{align-items:center;display:flex;position:relative}._track_1j5w5_15{scroll-snap-type:x mandatory;scrollbar-width:none;border-radius:var(--cascivo-radius-md);inline-size:100%;display:flex;overflow-x:auto}._track_1j5w5_15::-webkit-scrollbar{display:none}._slide_1j5w5_28{scroll-snap-align:center;scroll-snap-stop:always;flex:0 0 100%;inline-size:100%}._nav_1j5w5_35{z-index:1;block-size:2.25rem;inline-size:2.25rem;color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-full);box-shadow:var(--cascivo-shadow-sm);cursor:pointer;justify-content:center;align-items:center;display:inline-flex;position:absolute}._nav_1j5w5_35:hover:not(:disabled){background-color:var(--cascivo-color-bg-subtle)}._nav_1j5w5_35:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._nav_1j5w5_35:disabled{opacity:.4;cursor:not-allowed}._prev_1j5w5_65{inset-inline-start:var(--cascivo-space-2)}._next_1j5w5_69{inset-inline-end:var(--cascivo-space-2)}._controls_1j5w5_73{justify-content:center;align-items:center;gap:var(--cascivo-space-3);display:flex}._dots_1j5w5_80{justify-content:center;align-items:center;gap:var(--cascivo-space-2);display:flex}._chevron_1j5w5_87{border-block-end:2px solid;border-inline-end:2px solid;block-size:.5rem;inline-size:.5rem}._chevronPrev_1j5w5_94{translate:.1rem;rotate:135deg}._chevronNext_1j5w5_99{translate:-.1rem;rotate:-45deg}._playPause_1j5w5_104{min-block-size:1.75rem;min-inline-size:1.75rem;color:var(--cascivo-color-text);border-radius:var(--cascivo-radius-full);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;display:inline-flex}._playPause_1j5w5_104:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._playGlyph_1j5w5_123,._pauseGlyph_1j5w5_124{background-color:currentColor;block-size:.75rem;inline-size:.75rem;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}._playGlyph_1j5w5_123{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E")}._pauseGlyph_1j5w5_124{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 5h4v14H6zM14 5h4v14h-4z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 5h4v14H6zM14 5h4v14h-4z'/%3E%3C/svg%3E")}._dot_1j5w5_80{border-radius:var(--cascivo-radius-full);background-color:var(--cascivo-color-border-strong);cursor:pointer;block-size:.625rem;inline-size:.625rem;transition:background-color var(--cascivo-duration-150) var(--cascivo-ease-out);border:none;padding:0}._dot_1j5w5_80[data-active]{background-color:var(--cascivo-color-accent)}._dot_1j5w5_80:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._dot_1j5w5_80:after{content:"";inline-size:var(--cascivo-target-min,1.5rem);block-size:var(--cascivo-target-min,1.5rem);position:absolute;inset:50% auto auto 50%;translate:-50% -50%}._dot_1j5w5_80{position:relative}@media (pointer:coarse){._nav_1j5w5_35,._playPause_1j5w5_104{min-inline-size:var(--cascivo-target-min-coarse,2.75rem);min-block-size:var(--cascivo-target-min-coarse,2.75rem)}._dot_1j5w5_80:after{inline-size:var(--cascivo-target-min-coarse,2.75rem);block-size:var(--cascivo-target-min-coarse,2.75rem)}}}@media (prefers-reduced-motion:reduce){._track_1j5w5_15{scroll-behavior:auto}}@media (forced-colors:active){._nav_1j5w5_35:focus-visible,._dot_1j5w5_80:focus-visible{outline-offset:2px;outline:2px solid highlight}._dot_1j5w5_80[data-active]{background-color:highlight}}
|
|
@@ -1,138 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./carousel.module.js";
|
|
4
|
-
import { useId as t, useRef as n } from "react";
|
|
5
|
-
import { cn as r, useControllableSignal as i, useRovingFocus as a, useSignalEffect as o, useSignals as s } from "@cascivo/core";
|
|
6
|
-
import { builtin as c, t as l } from "@cascivo/i18n";
|
|
7
|
-
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
8
|
-
//#region ../components/src/carousel/carousel.tsx
|
|
9
|
-
function f(e, t) {
|
|
10
|
-
return t || (e == null ? [] : Array.isArray(e) ? e : [e]);
|
|
11
|
-
}
|
|
12
|
-
function p({ children: p, slides: m, index: h, defaultIndex: g, onIndexChange: _, loop: v = !1, className: y, labels: b }) {
|
|
13
|
-
s();
|
|
14
|
-
let x = t(), S = f(p, m), C = S.length, [w, T] = i({
|
|
15
|
-
value: h,
|
|
16
|
-
defaultValue: g ?? 0,
|
|
17
|
-
onChange: _
|
|
18
|
-
}), E = n(null), D = n([]), O = n(!1), { getItemProps: k, setActiveIndex: A } = a({
|
|
19
|
-
orientation: "horizontal",
|
|
20
|
-
loop: v
|
|
21
|
-
});
|
|
22
|
-
o(() => {
|
|
23
|
-
let e = E.current;
|
|
24
|
-
if (!e) return;
|
|
25
|
-
let t = () => {
|
|
26
|
-
if (O.current) return;
|
|
27
|
-
let t = Math.round(e.scrollLeft / e.clientWidth);
|
|
28
|
-
t !== w.value && T(t);
|
|
29
|
-
};
|
|
30
|
-
return e.addEventListener("scroll", t, { passive: !0 }), () => e.removeEventListener("scroll", t);
|
|
31
|
-
});
|
|
32
|
-
let j = (e) => {
|
|
33
|
-
if (C === 0) return;
|
|
34
|
-
let t = e;
|
|
35
|
-
t < 0 && (t = v ? C - 1 : 0), t >= C && (t = v ? 0 : C - 1);
|
|
36
|
-
let n = E.current;
|
|
37
|
-
n && typeof n.scrollTo == "function" && (O.current = !0, n.scrollTo({
|
|
38
|
-
left: t * n.clientWidth,
|
|
39
|
-
behavior: "smooth"
|
|
40
|
-
}), window.setTimeout(() => {
|
|
41
|
-
O.current = !1;
|
|
42
|
-
}, 400)), T(t), A(t);
|
|
43
|
-
}, M = b?.region ?? l(c.carousel.region), N = b?.previous ?? l(c.carousel.previous), P = b?.next ?? l(c.carousel.next);
|
|
44
|
-
return /* @__PURE__ */ d("section", {
|
|
45
|
-
className: r(e.carousel, y),
|
|
46
|
-
"aria-roledescription": "carousel",
|
|
47
|
-
"aria-label": M,
|
|
48
|
-
children: [/* @__PURE__ */ d("div", {
|
|
49
|
-
className: e.viewport,
|
|
50
|
-
children: [
|
|
51
|
-
/* @__PURE__ */ u("button", {
|
|
52
|
-
type: "button",
|
|
53
|
-
className: r(e.nav, e.prev),
|
|
54
|
-
"aria-label": N,
|
|
55
|
-
"aria-controls": `${x}-track`,
|
|
56
|
-
disabled: !v && w.value <= 0,
|
|
57
|
-
onClick: () => j(w.value - 1),
|
|
58
|
-
children: /* @__PURE__ */ u("svg", {
|
|
59
|
-
width: "20",
|
|
60
|
-
height: "20",
|
|
61
|
-
viewBox: "0 0 24 24",
|
|
62
|
-
fill: "none",
|
|
63
|
-
"aria-hidden": "true",
|
|
64
|
-
children: /* @__PURE__ */ u("path", {
|
|
65
|
-
d: "m15 18-6-6 6-6",
|
|
66
|
-
stroke: "currentColor",
|
|
67
|
-
strokeWidth: "2",
|
|
68
|
-
strokeLinecap: "round",
|
|
69
|
-
strokeLinejoin: "round"
|
|
70
|
-
})
|
|
71
|
-
})
|
|
72
|
-
}),
|
|
73
|
-
/* @__PURE__ */ u("div", {
|
|
74
|
-
ref: E,
|
|
75
|
-
id: `${x}-track`,
|
|
76
|
-
className: e.track,
|
|
77
|
-
children: S.map((t, n) => /* @__PURE__ */ u("div", {
|
|
78
|
-
ref: (e) => {
|
|
79
|
-
D.current[n] = e;
|
|
80
|
-
},
|
|
81
|
-
className: e.slide,
|
|
82
|
-
role: "group",
|
|
83
|
-
"aria-roledescription": "slide",
|
|
84
|
-
"aria-label": l(c.carousel.slide, {
|
|
85
|
-
n: n + 1,
|
|
86
|
-
total: C
|
|
87
|
-
}),
|
|
88
|
-
"aria-hidden": n !== w.value || void 0,
|
|
89
|
-
children: t
|
|
90
|
-
}, n))
|
|
91
|
-
}),
|
|
92
|
-
/* @__PURE__ */ u("button", {
|
|
93
|
-
type: "button",
|
|
94
|
-
className: r(e.nav, e.next),
|
|
95
|
-
"aria-label": P,
|
|
96
|
-
"aria-controls": `${x}-track`,
|
|
97
|
-
disabled: !v && w.value >= C - 1,
|
|
98
|
-
onClick: () => j(w.value + 1),
|
|
99
|
-
children: /* @__PURE__ */ u("svg", {
|
|
100
|
-
width: "20",
|
|
101
|
-
height: "20",
|
|
102
|
-
viewBox: "0 0 24 24",
|
|
103
|
-
fill: "none",
|
|
104
|
-
"aria-hidden": "true",
|
|
105
|
-
children: /* @__PURE__ */ u("path", {
|
|
106
|
-
d: "m9 18 6-6-6-6",
|
|
107
|
-
stroke: "currentColor",
|
|
108
|
-
strokeWidth: "2",
|
|
109
|
-
strokeLinecap: "round",
|
|
110
|
-
strokeLinejoin: "round"
|
|
111
|
-
})
|
|
112
|
-
})
|
|
113
|
-
})
|
|
114
|
-
]
|
|
115
|
-
}), /* @__PURE__ */ u("div", {
|
|
116
|
-
className: e.dots,
|
|
117
|
-
role: "group",
|
|
118
|
-
"aria-label": M,
|
|
119
|
-
children: S.map((t, n) => {
|
|
120
|
-
let r = k(n);
|
|
121
|
-
return /* @__PURE__ */ u("button", {
|
|
122
|
-
ref: r.ref,
|
|
123
|
-
type: "button",
|
|
124
|
-
className: e.dot,
|
|
125
|
-
"aria-label": l(c.carousel.goTo, { n: n + 1 }),
|
|
126
|
-
"aria-current": n === w.value || void 0,
|
|
127
|
-
"data-active": n === w.value || void 0,
|
|
128
|
-
tabIndex: r.tabIndex,
|
|
129
|
-
onKeyDown: r.onKeyDown,
|
|
130
|
-
onFocus: r.onFocus,
|
|
131
|
-
onClick: () => j(n)
|
|
132
|
-
}, n);
|
|
133
|
-
})
|
|
134
|
-
})]
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
//#endregion
|
|
138
|
-
export { p as Carousel };
|
|
1
|
+
"use client";import e from"./carousel.module.js";import{Children as t,useId as n,useRef as r}from"react";import{cn as i,useControllableSignal as a,useMediaQuery as o,useRovingFocus as s,useSignal as c,useSignalEffect 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";function h(e,n){return n||t.toArray(e)}function g({children:t,slides:g,index:_,defaultIndex:v,onIndexChange:y,loop:b=!1,autoplay:x,className:S,labels:C}){u();let w=n(),T=h(t,g),E=T.length,[D,O]=a({value:_,defaultValue:v??0,onChange:y}),k=r(null),A=r(!1),j=o(`(prefers-reduced-motion: reduce)`),{getItemProps:M,setActiveIndex:N}=s({orientation:`horizontal`,loop:b});l(()=>{let e=k.current;if(!e)return;let t=()=>{if(A.current||e.clientWidth===0)return;let t=Math.round(e.scrollLeft/e.clientWidth);t!==D.value&&O(t)};return e.addEventListener(`scroll`,t,{passive:!0}),()=>e.removeEventListener(`scroll`,t)});let P=e=>{if(E===0)return;let t=e;t<0&&(t=b?E-1:0),t>=E&&(t=b?0:E-1);let n=k.current;n&&typeof n.scrollTo==`function`&&n.clientWidth>0&&(A.current=!0,n.scrollTo({left:t*n.clientWidth,behavior:j.value?`auto`:`smooth`}),window.setTimeout(()=>{A.current=!1},400)),O(t),N(t)};l(()=>{N(D.value)});let F=c(x!==void 0&&x>0),I=c(!1);l(()=>{if(!x||x<=0||!F.value||I.value||j.value)return;let e=window.setInterval(()=>{let e=D.peek()+1;P(e>=E?0:e)},x);return()=>window.clearInterval(e)}),l(()=>{if(typeof document>`u`)return;let e=()=>{I.value=document.hidden};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)});let L=C?.region??f(d.carousel.region),R=C?.previous??f(d.carousel.previous),z=C?.next??f(d.carousel.next),B=C?.play??f(d.carousel.play),V=C?.pause??f(d.carousel.pause),H=!!(x&&x>0);return m(`section`,{className:i(e.carousel,S),"aria-roledescription":`carousel`,"aria-label":L,onMouseEnter:()=>{H&&(I.value=!0)},onMouseLeave:()=>{H&&(I.value=!1)},onFocusCapture:()=>{H&&(I.value=!0)},onBlurCapture:e=>{H&&!e.currentTarget.contains(e.relatedTarget)&&(I.value=!1)},children:[m(`div`,{className:e.viewport,children:[p(`button`,{type:`button`,className:i(e.nav,e.prev),"aria-label":R,"aria-controls":`${w}-track`,disabled:!b&&D.value<=0,onClick:()=>P(D.value-1),children:p(`span`,{className:i(e.chevron,e.chevronPrev),"aria-hidden":`true`})}),p(`div`,{ref:k,id:`${w}-track`,className:e.track,"aria-live":H&&F.value&&!I.value?`off`:`polite`,children:T.map((t,n)=>p(`div`,{className:e.slide,role:`group`,"aria-roledescription":`slide`,"aria-label":f(d.carousel.slide,{n:n+1,total:E}),inert:n===D.value?void 0:!0,children:t},n))}),p(`button`,{type:`button`,className:i(e.nav,e.next),"aria-label":z,"aria-controls":`${w}-track`,disabled:!b&&D.value>=E-1,onClick:()=>P(D.value+1),children:p(`span`,{className:i(e.chevron,e.chevronNext),"aria-hidden":`true`})})]}),m(`div`,{className:e.controls,children:[H&&p(`button`,{type:`button`,className:e.playPause,"aria-label":F.value?V:B,onClick:()=>{F.value=!F.value},children:p(`span`,{className:F.value?e.pauseGlyph:e.playGlyph,"aria-hidden":`true`})}),p(`div`,{className:e.dots,role:`group`,"aria-label":f(d.carousel.choose),children:T.map((t,n)=>{let r=M(n);return p(`button`,{ref:r.ref,type:`button`,className:e.dot,"aria-label":f(d.carousel.goTo,{n:n+1}),"aria-current":n===D.value||void 0,"data-active":n===D.value||void 0,tabIndex:r.tabIndex,onKeyDown:r.onKeyDown,onFocus:()=>{r.onFocus?.(),n!==D.value&&P(n)},onClick:()=>P(n)},n)})})]})]})}export{g as Carousel};
|
|
@@ -1,14 +1,2 @@
|
|
|
1
1
|
import './carousel.css';
|
|
2
|
-
var e
|
|
3
|
-
carousel: "_carousel_1dvrl_2",
|
|
4
|
-
viewport: "_viewport_1dvrl_9",
|
|
5
|
-
track: "_track_1dvrl_15",
|
|
6
|
-
slide: "_slide_1dvrl_28",
|
|
7
|
-
nav: "_nav_1dvrl_35",
|
|
8
|
-
prev: "_prev_1dvrl_65",
|
|
9
|
-
next: "_next_1dvrl_69",
|
|
10
|
-
dots: "_dots_1dvrl_73",
|
|
11
|
-
dot: "_dot_1dvrl_73"
|
|
12
|
-
};
|
|
13
|
-
//#endregion
|
|
14
|
-
export { e as default };
|
|
2
|
+
var e={carousel:`_carousel_1j5w5_2`,viewport:`_viewport_1j5w5_9`,track:`_track_1j5w5_15`,slide:`_slide_1j5w5_28`,nav:`_nav_1j5w5_35`,prev:`_prev_1j5w5_65`,next:`_next_1j5w5_69`,controls:`_controls_1j5w5_73`,dots:`_dots_1j5w5_80`,chevron:`_chevron_1j5w5_87`,chevronPrev:`_chevronPrev_1j5w5_94`,chevronNext:`_chevronNext_1j5w5_99`,playPause:`_playPause_1j5w5_104`,playGlyph:`_playGlyph_1j5w5_123`,pauseGlyph:`_pauseGlyph_1j5w5_124`,dot:`_dot_1j5w5_80`};export{e as default};
|
|
@@ -1,31 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
//#region ../components/src/chat-bubble/chat-bubble.tsx
|
|
4
|
-
function r({ children: r, side: i = "start", avatar: a, name: o, time: s, className: c }) {
|
|
5
|
-
return /* @__PURE__ */ n("div", {
|
|
6
|
-
className: [e.bubble, c].filter(Boolean).join(" "),
|
|
7
|
-
"data-side": i,
|
|
8
|
-
children: [a && /* @__PURE__ */ t("div", {
|
|
9
|
-
className: e.avatar,
|
|
10
|
-
"aria-hidden": "true",
|
|
11
|
-
children: a
|
|
12
|
-
}), /* @__PURE__ */ n("div", {
|
|
13
|
-
className: e.content,
|
|
14
|
-
children: [(o || s) && /* @__PURE__ */ n("div", {
|
|
15
|
-
className: e.meta,
|
|
16
|
-
children: [o && /* @__PURE__ */ t("span", {
|
|
17
|
-
className: e.name,
|
|
18
|
-
children: o
|
|
19
|
-
}), s && /* @__PURE__ */ t("time", {
|
|
20
|
-
className: e.time,
|
|
21
|
-
children: s
|
|
22
|
-
})]
|
|
23
|
-
}), /* @__PURE__ */ t("div", {
|
|
24
|
-
className: e.body,
|
|
25
|
-
children: r
|
|
26
|
-
})]
|
|
27
|
-
})]
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
//#endregion
|
|
31
|
-
export { r as ChatBubble };
|
|
1
|
+
import e from"./chat-bubble.module.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";function r({children:r,side:i=`start`,avatar:a,name:o,time:s,className:c}){return n(`div`,{className:[e.bubble,c].filter(Boolean).join(` `),"data-side":i,children:[a&&t(`div`,{className:e.avatar,"aria-hidden":`true`,children:a}),n(`div`,{className:e.content,children:[(o||s)&&n(`div`,{className:e.meta,children:[o&&t(`span`,{className:e.name,children:o}),s&&t(`time`,{className:e.time,children:s})]}),t(`div`,{className:e.body,children:r})]})]})}export{r as ChatBubble};
|
|
@@ -1,12 +1,2 @@
|
|
|
1
1
|
import './chat-bubble.css';
|
|
2
|
-
var e
|
|
3
|
-
bubble: "_bubble_ykkyv_2",
|
|
4
|
-
avatar: "_avatar_ykkyv_18",
|
|
5
|
-
content: "_content_ykkyv_23",
|
|
6
|
-
meta: "_meta_ykkyv_32",
|
|
7
|
-
name: "_name_ykkyv_40",
|
|
8
|
-
time: "_time_ykkyv_44",
|
|
9
|
-
body: "_body_ykkyv_48"
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
12
|
-
export { e as default };
|
|
2
|
+
var e={bubble:`_bubble_ykkyv_2`,avatar:`_avatar_ykkyv_18`,content:`_content_ykkyv_23`,meta:`_meta_ykkyv_32`,name:`_name_ykkyv_40`,time:`_time_ykkyv_44`,body:`_body_ykkyv_48`};export{e as default};
|
|
@@ -1,39 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./checkbox.module.js";
|
|
4
|
-
import { forwardRef as t, useRef as n } from "react";
|
|
5
|
-
import { cn as r, composeRefs as i, useEffectPropSignal as a, useSignalEffect as o } from "@cascivo/core";
|
|
6
|
-
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/checkbox/checkbox.tsx
|
|
8
|
-
var l = t(function({ label: t, indeterminate: l = !1, ariaLabel: u, className: d, id: f, disabled: p, ...m }, h) {
|
|
9
|
-
let g = n(null), _ = a(l);
|
|
10
|
-
o(() => {
|
|
11
|
-
g.current && (g.current.indeterminate = _.value);
|
|
12
|
-
});
|
|
13
|
-
let v = f ?? (t ? `cascade-checkbox-${t.toLowerCase().replace(/\s+/g, "-")}` : void 0);
|
|
14
|
-
return /* @__PURE__ */ c("label", {
|
|
15
|
-
className: r(e.wrapper, d),
|
|
16
|
-
"data-disabled": p || void 0,
|
|
17
|
-
children: [
|
|
18
|
-
/* @__PURE__ */ s("input", {
|
|
19
|
-
ref: i(h, g),
|
|
20
|
-
id: v,
|
|
21
|
-
type: "checkbox",
|
|
22
|
-
className: e.input,
|
|
23
|
-
disabled: p,
|
|
24
|
-
...m,
|
|
25
|
-
"aria-label": m["aria-label"] ?? u
|
|
26
|
-
}),
|
|
27
|
-
/* @__PURE__ */ s("span", {
|
|
28
|
-
className: e.control,
|
|
29
|
-
"aria-hidden": "true"
|
|
30
|
-
}),
|
|
31
|
-
t && /* @__PURE__ */ s("span", {
|
|
32
|
-
className: e.label,
|
|
33
|
-
children: t
|
|
34
|
-
})
|
|
35
|
-
]
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
//#endregion
|
|
39
|
-
export { l as Checkbox };
|
|
1
|
+
"use client";import e from"./checkbox.module.js";import{forwardRef as t,useRef as n}from"react";import{cn as r,composeRefs as i,useEffectPropSignal as a,useSignalEffect as o}from"@cascivo/core";import{jsx as s,jsxs as c}from"react/jsx-runtime";var l=t(function({label:t,indeterminate:l=!1,ariaLabel:u,className:d,id:f,disabled:p,...m},h){let g=n(null),_=a(l);o(()=>{g.current&&(g.current.indeterminate=_.value)});let v=f??(t?`cascade-checkbox-${t.toLowerCase().replace(/\s+/g,`-`)}`:void 0);return c(`label`,{className:r(e.wrapper,d),"data-disabled":p||void 0,children:[s(`input`,{ref:i(h,g),id:v,type:`checkbox`,className:e.input,disabled:p,...m,"aria-label":m[`aria-label`]??u}),s(`span`,{className:e.control,"aria-hidden":`true`}),t&&s(`span`,{className:e.label,children:t})]})});export{l as Checkbox};
|
|
@@ -1,9 +1,2 @@
|
|
|
1
1
|
import './checkbox.css';
|
|
2
|
-
var e
|
|
3
|
-
wrapper: "_wrapper_4zlmw_2",
|
|
4
|
-
input: "_input_4zlmw_15",
|
|
5
|
-
control: "_control_4zlmw_28",
|
|
6
|
-
label: "_label_4zlmw_78"
|
|
7
|
-
};
|
|
8
|
-
//#endregion
|
|
9
|
-
export { e as default };
|
|
2
|
+
var e={wrapper:`_wrapper_4zlmw_2`,input:`_input_4zlmw_15`,control:`_control_4zlmw_28`,label:`_label_4zlmw_78`};export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cascivo.component{.
|
|
1
|
+
@layer cascivo.component{._card_x2x8f_2{gap:var(--cascivo-space-3);padding:var(--cascivo-space-4);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-surface);background:var(--cascivo-color-bg);cursor:pointer;transition:border-color var(--cascivo-duration-100) ease, background-color var(--cascivo-duration-100) ease;align-items:flex-start;display:flex}._card_x2x8f_2:hover:not([data-disabled]){border-color:var(--cascivo-color-border-strong)}._card_x2x8f_2:has(input:checked){border-color:var(--cascivo-color-accent);background:color-mix(in oklch, var(--cascivo-color-accent) 4%, var(--cascivo-color-bg))}._card_x2x8f_2:has(input:focus-visible){box-shadow:var(--cascivo-focus-ring)}._card_x2x8f_2[data-disabled]{opacity:.5;cursor:not-allowed}._input_x2x8f_34{clip-path:inset(50%);white-space:nowrap;block-size:1px;inline-size:1px;position:absolute;overflow:hidden}._glyph_x2x8f_43{border:1px solid var(--cascivo-color-border-strong);border-radius:var(--cascivo-radius-indicator);color:#0000;block-size:1rem;inline-size:1rem;transition:all var(--cascivo-duration-100) ease;flex:none;place-items:center;margin-block-start:2px;display:grid}._card_x2x8f_2:has(input:checked) ._glyph_x2x8f_43{border-color:var(--cascivo-color-accent);background:var(--cascivo-color-accent);color:var(--cascivo-color-accent-foreground,oklch(100% 0 0))}._check_x2x8f_62{block-size:.75rem;inline-size:.75rem}._body_x2x8f_67{gap:var(--cascivo-space-1);flex-direction:column;display:flex}._title_x2x8f_73{font-size:var(--cascivo-text-sm);font-weight:var(--cascivo-font-medium);color:var(--cascivo-color-text)}._description_x2x8f_79{font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-subtle)}}
|
|
@@ -1,50 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./checkbox-card.module.js";
|
|
4
|
-
import { forwardRef as t } from "react";
|
|
5
|
-
import { cn as n } from "@cascivo/core";
|
|
6
|
-
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/checkbox-card/checkbox-card.tsx
|
|
8
|
-
var a = t(function({ title: t, description: a, checked: o, defaultChecked: s, disabled: c, onCheckedChange: l, className: u, ...d }, f) {
|
|
9
|
-
return /* @__PURE__ */ i("label", {
|
|
10
|
-
className: n(e.card, u),
|
|
11
|
-
"data-disabled": c || void 0,
|
|
12
|
-
children: [
|
|
13
|
-
/* @__PURE__ */ r("input", {
|
|
14
|
-
type: "checkbox",
|
|
15
|
-
className: e.input,
|
|
16
|
-
disabled: c,
|
|
17
|
-
...o === void 0 ? { defaultChecked: s } : { checked: o },
|
|
18
|
-
onChange: (e) => l?.(e.currentTarget.checked),
|
|
19
|
-
ref: f,
|
|
20
|
-
...d
|
|
21
|
-
}),
|
|
22
|
-
/* @__PURE__ */ r("span", {
|
|
23
|
-
className: e.glyph,
|
|
24
|
-
"aria-hidden": "true",
|
|
25
|
-
children: /* @__PURE__ */ r("svg", {
|
|
26
|
-
viewBox: "0 0 12 12",
|
|
27
|
-
className: e.check,
|
|
28
|
-
children: /* @__PURE__ */ r("path", {
|
|
29
|
-
d: "M2.5 6.5 5 9l4.5-5.5",
|
|
30
|
-
fill: "none",
|
|
31
|
-
stroke: "currentColor",
|
|
32
|
-
strokeWidth: "1.5"
|
|
33
|
-
})
|
|
34
|
-
})
|
|
35
|
-
}),
|
|
36
|
-
/* @__PURE__ */ i("span", {
|
|
37
|
-
className: e.body,
|
|
38
|
-
children: [/* @__PURE__ */ r("span", {
|
|
39
|
-
className: e.title,
|
|
40
|
-
children: t
|
|
41
|
-
}), a && /* @__PURE__ */ r("span", {
|
|
42
|
-
className: e.description,
|
|
43
|
-
children: a
|
|
44
|
-
})]
|
|
45
|
-
})
|
|
46
|
-
]
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
//#endregion
|
|
50
|
-
export { a as CheckboxCard };
|
|
1
|
+
"use client";import e from"./checkbox-card.module.js";import{forwardRef as t}from"react";import{cn as n}from"@cascivo/core";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a=t(function({title:t,description:a,checked:o,defaultChecked:s,disabled:c,onCheckedChange:l,className:u,...d},f){return i(`label`,{className:n(e.card,u),"data-disabled":c||void 0,children:[r(`input`,{type:`checkbox`,className:e.input,disabled:c,...o===void 0?{defaultChecked:s}:{checked:o},onChange:e=>l?.(e.currentTarget.checked),ref:f,...d}),r(`span`,{className:e.glyph,"aria-hidden":`true`,children:r(`svg`,{viewBox:`0 0 12 12`,className:e.check,children:r(`path`,{d:`M2.5 6.5 5 9l4.5-5.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`})})}),i(`span`,{className:e.body,children:[r(`span`,{className:e.title,children:t}),a&&r(`span`,{className:e.description,children:a})]})]})});export{a as CheckboxCard};
|
|
@@ -1,12 +1,2 @@
|
|
|
1
1
|
import './checkbox-card.css';
|
|
2
|
-
var e
|
|
3
|
-
card: "_card_102u6_2",
|
|
4
|
-
input: "_input_102u6_34",
|
|
5
|
-
glyph: "_glyph_102u6_43",
|
|
6
|
-
check: "_check_102u6_62",
|
|
7
|
-
body: "_body_102u6_67",
|
|
8
|
-
title: "_title_102u6_73",
|
|
9
|
-
description: "_description_102u6_79"
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
12
|
-
export { e as default };
|
|
2
|
+
var e={card:`_card_x2x8f_2`,input:`_input_x2x8f_34`,glyph:`_glyph_x2x8f_43`,check:`_check_x2x8f_62`,body:`_body_x2x8f_67`,title:`_title_x2x8f_73`,description:`_description_x2x8f_79`};export{e as default};
|