@cascivo/react 0.18.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 +9 -7
- 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 -38
- 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 -268
- 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 -165
- 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 -371
- 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 -219
- 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 -107
- package/dist/dropdown/dropdown.module.js +1 -9
- package/dist/editable/editable.js +1 -67
- 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 -46
- 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 -122
- 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 +2084 -120
- 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 -55
- 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 -38
- 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 -268
- 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 -165
- 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 -371
- 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 -219
- 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 -107
- package/dist/node/dropdown/dropdown.module.js +1 -9
- package/dist/node/editable/editable.js +1 -67
- 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 -46
- package/dist/node/field/field.module.js +1 -7
- package/dist/node/file-uploader/file-uploader.js +1 -122
- 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 -55
- 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 -147
- 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 -48
- 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 -92
- 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 -72
- 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 -29
- 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 -64
- 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 -57
- 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 -63
- 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 -41
- 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 -147
- 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 -48
- 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 -92
- 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 -72
- 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 -29
- 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 -64
- 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 -57
- 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 -63
- 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 -41
- 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 +4 -4
- package/readme.body.md +7 -5
|
@@ -1,12 +1,2 @@
|
|
|
1
1
|
import './reorder-list.css';
|
|
2
|
-
var e
|
|
3
|
-
root: "_root_1tie9_4",
|
|
4
|
-
list: "_list_1tie9_8",
|
|
5
|
-
row: "_row_1tie9_16",
|
|
6
|
-
handle: "_handle_1tie9_34",
|
|
7
|
-
grip: "_grip_1tie9_69",
|
|
8
|
-
label: "_label_1tie9_74",
|
|
9
|
-
srOnly: "_srOnly_1tie9_79"
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
12
|
-
export { e as default };
|
|
2
|
+
var e={root:`_root_1vypz_4`,list:`_list_1vypz_8`,row:`_row_1vypz_16`,handle:`_handle_1vypz_34`,grip:`_grip_1vypz_69`,label:`_label_1vypz_74`,srOnly:`_srOnly_1vypz_79`};export{e as default};
|
|
@@ -1,80 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./resizable.module.js";
|
|
4
|
-
import { Children as t, useRef as n } from "react";
|
|
5
|
-
import { cn as r, useControllableSignal as i, useSignal as a, useSignalEffect as o, useSignals as s } from "@cascivo/core";
|
|
6
|
-
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/resizable/resizable.tsx
|
|
9
|
-
function f(e, t, n) {
|
|
10
|
-
return Math.min(n, Math.max(t, e));
|
|
11
|
-
}
|
|
12
|
-
function p({ children: p, orientation: m = "horizontal", defaultRatio: h = .5, ratio: g, minRatio: _ = .1, maxRatio: v = .9, onRatioChange: y, className: b, label: x }) {
|
|
13
|
-
s();
|
|
14
|
-
let [S, C] = t.toArray(p), [w, T] = i({
|
|
15
|
-
value: g,
|
|
16
|
-
defaultValue: h,
|
|
17
|
-
onChange: y
|
|
18
|
-
}), E = n(null), D = a(!1), O = (e) => {
|
|
19
|
-
T(f(e, _, v));
|
|
20
|
-
}, k = (e, t) => {
|
|
21
|
-
let n = E.current;
|
|
22
|
-
if (!n) return w.value;
|
|
23
|
-
let r = n.getBoundingClientRect();
|
|
24
|
-
return m === "horizontal" ? (e - r.left) / r.width : (t - r.top) / r.height;
|
|
25
|
-
};
|
|
26
|
-
o(() => {
|
|
27
|
-
if (!D.value) return;
|
|
28
|
-
let e = (e) => O(k(e.clientX, e.clientY)), t = () => {
|
|
29
|
-
D.value = !1;
|
|
30
|
-
};
|
|
31
|
-
return window.addEventListener("pointermove", e), window.addEventListener("pointerup", t), () => {
|
|
32
|
-
window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", t);
|
|
33
|
-
};
|
|
34
|
-
});
|
|
35
|
-
let A = (e) => {
|
|
36
|
-
let t = e.shiftKey ? .1 : .02, n = m === "horizontal" ? "ArrowLeft" : "ArrowUp", r = m === "horizontal" ? "ArrowRight" : "ArrowDown";
|
|
37
|
-
if (e.key === n) O(w.value - t);
|
|
38
|
-
else if (e.key === r) O(w.value + t);
|
|
39
|
-
else if (e.key === "Home") O(_);
|
|
40
|
-
else if (e.key === "End") O(v);
|
|
41
|
-
else return;
|
|
42
|
-
e.preventDefault();
|
|
43
|
-
}, j = x ?? l(c.resizable.handle), M = Math.round(w.value * 100);
|
|
44
|
-
return /* @__PURE__ */ d("div", {
|
|
45
|
-
ref: E,
|
|
46
|
-
className: r(e.resizable, b),
|
|
47
|
-
"data-orientation": m,
|
|
48
|
-
style: { "--cascivo-resizable-ratio": w.value },
|
|
49
|
-
children: [
|
|
50
|
-
/* @__PURE__ */ u("div", {
|
|
51
|
-
className: e.pane,
|
|
52
|
-
children: S
|
|
53
|
-
}),
|
|
54
|
-
/* @__PURE__ */ u("div", {
|
|
55
|
-
className: e.handle,
|
|
56
|
-
role: "separator",
|
|
57
|
-
"aria-orientation": m,
|
|
58
|
-
"aria-label": j,
|
|
59
|
-
"aria-valuenow": M,
|
|
60
|
-
"aria-valuemin": Math.round(_ * 100),
|
|
61
|
-
"aria-valuemax": Math.round(v * 100),
|
|
62
|
-
tabIndex: 0,
|
|
63
|
-
onKeyDown: A,
|
|
64
|
-
onPointerDown: (e) => {
|
|
65
|
-
e.preventDefault(), D.value = !0;
|
|
66
|
-
},
|
|
67
|
-
children: /* @__PURE__ */ u("span", {
|
|
68
|
-
className: e.grip,
|
|
69
|
-
"aria-hidden": "true"
|
|
70
|
-
})
|
|
71
|
-
}),
|
|
72
|
-
/* @__PURE__ */ u("div", {
|
|
73
|
-
className: e.pane,
|
|
74
|
-
children: C
|
|
75
|
-
})
|
|
76
|
-
]
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
//#endregion
|
|
80
|
-
export { p as Resizable };
|
|
1
|
+
"use client";import e from"./resizable.module.js";import{Children as t,useRef as n}from"react";import{cn as r,useControllableSignal as i,useSignal as a,useSignalEffect as o,useSignals as s}from"@cascivo/core";import{builtin as c,t as l}from"@cascivo/i18n";import{jsx as u,jsxs as d}from"react/jsx-runtime";function f(e,t,n){return Math.min(n,Math.max(t,e))}function p({children:p,orientation:m=`horizontal`,defaultRatio:h=.5,ratio:g,minRatio:_=.1,maxRatio:v=.9,onRatioChange:y,className:b,label:x,ariaLabel:S}){s();let[C,w]=t.toArray(p),[T,E]=i({value:g,defaultValue:h,onChange:y}),D=n(null),O=a(!1),k=e=>{E(f(e,_,v))},A=(e,t)=>{let n=D.current;if(!n)return T.value;let r=n.getBoundingClientRect();return m===`horizontal`?(e-r.left)/r.width:(t-r.top)/r.height};o(()=>{if(!O.value)return;let e=e=>k(A(e.clientX,e.clientY)),t=()=>{O.value=!1};return window.addEventListener(`pointermove`,e),window.addEventListener(`pointerup`,t),()=>{window.removeEventListener(`pointermove`,e),window.removeEventListener(`pointerup`,t)}});let j=e=>{let t=e.shiftKey?.1:.02,n=m===`horizontal`?`ArrowLeft`:`ArrowUp`,r=m===`horizontal`?`ArrowRight`:`ArrowDown`;if(e.key===n)k(T.value-t);else if(e.key===r)k(T.value+t);else if(e.key===`Home`)k(_);else if(e.key===`End`)k(v);else return;e.preventDefault()},M=S??x??l(c.resizable.handle),N=Math.round(T.value*100);return d(`div`,{ref:D,className:r(e.resizable,b),"data-orientation":m,style:{"--cascivo-resizable-ratio":T.value},children:[u(`div`,{className:e.pane,children:C}),u(`div`,{className:e.handle,role:`separator`,"aria-orientation":m,"aria-label":M,"aria-valuenow":N,"aria-valuemin":Math.round(_*100),"aria-valuemax":Math.round(v*100),tabIndex:0,onKeyDown:j,onPointerDown:e=>{e.preventDefault(),O.value=!0},children:u(`span`,{className:e.grip,"aria-hidden":`true`})}),u(`div`,{className:e.pane,children:w})]})}export{p as Resizable};
|
|
@@ -1,9 +1,2 @@
|
|
|
1
1
|
import './resizable.css';
|
|
2
|
-
var e
|
|
3
|
-
resizable: "_resizable_1agxs_2",
|
|
4
|
-
pane: "_pane_1agxs_17",
|
|
5
|
-
handle: "_handle_1agxs_31",
|
|
6
|
-
grip: "_grip_1agxs_50"
|
|
7
|
-
};
|
|
8
|
-
//#endregion
|
|
9
|
-
export { e as default };
|
|
2
|
+
var e={resizable:`_resizable_1agxs_2`,pane:`_pane_1agxs_17`,handle:`_handle_1agxs_31`,grip:`_grip_1agxs_50`};export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cascivo.component{.
|
|
1
|
+
@layer cascivo.component{._root_1d40j_2{max-block-size:var(--cascivo-scroll-area-height,none);max-inline-size:var(--cascivo-scroll-area-width,none);scrollbar-width:thin;scrollbar-color:var(--cascivo-color-border) transparent}._root_1d40j_2[data-orientation=vertical]{overflow:hidden auto}._root_1d40j_2[data-orientation=horizontal]{overflow:auto hidden}._root_1d40j_2[data-orientation=both]{overflow:auto}._root_1d40j_2::-webkit-scrollbar{block-size:.5rem;inline-size:.5rem}._root_1d40j_2::-webkit-scrollbar-track{background:0 0}._root_1d40j_2::-webkit-scrollbar-thumb{background-color:var(--cascivo-color-border);border-radius:var(--cascivo-radius-control)}._root_1d40j_2::-webkit-scrollbar-thumb:hover{background-color:var(--cascivo-color-text-subtle)}._root_1d40j_2{background:linear-gradient(var(--cascivo-color-surface) 30%, transparent) center top / 100% 1.5rem no-repeat, linear-gradient(transparent, var(--cascivo-color-surface) 70%) center bottom / 100% 1.5rem no-repeat;background-attachment:local,local}._root_1d40j_2[data-scroll-top]:not([data-edges=none]){box-shadow:inset 0 .5rem .4rem -.4rem color-mix(in srgb, var(--cascivo-color-text) 12%, transparent)}._root_1d40j_2[data-scroll-bottom]:not([data-edges=none]){box-shadow:inset 0 -.5rem .4rem -.4rem color-mix(in srgb, var(--cascivo-color-text) 12%, transparent)}._root_1d40j_2[data-scroll-top][data-scroll-bottom]:not([data-edges=none]){box-shadow:inset 0 .5rem .4rem -.4rem color-mix(in srgb, var(--cascivo-color-text) 12%, transparent), inset 0 -.5rem .4rem -.4rem color-mix(in srgb, var(--cascivo-color-text) 12%, transparent)}._root_1d40j_2[data-edges=mask][data-scroll-top]{-webkit-mask-image:linear-gradient(#0000,#000 1.5rem);mask-image:linear-gradient(#0000,#000 1.5rem)}._root_1d40j_2[data-edges=mask][data-scroll-bottom]{-webkit-mask-image:linear-gradient(0deg,#0000,#000 1.5rem);mask-image:linear-gradient(0deg,#0000,#000 1.5rem)}._root_1d40j_2[data-edges=mask][data-scroll-top][data-scroll-bottom]{-webkit-mask-image:linear-gradient(#0000,#000 1.5rem calc(100% - 1.5rem),#0000);mask-image:linear-gradient(#0000,#000 1.5rem calc(100% - 1.5rem),#0000)}@supports (container-type:scroll-state){._root_1d40j_2[data-edges=shadow]{container-type:scroll-state}._root_1d40j_2[data-edges=shadow]:before,._root_1d40j_2[data-edges=shadow]:after{content:"";z-index:1;opacity:0;pointer-events:none;block-size:0;transition:opacity var(--cascivo-duration-150) var(--cascivo-ease-out);display:block;position:sticky}._root_1d40j_2[data-edges=shadow]:before{box-shadow:0 .5rem .4rem -.4rem color-mix(in srgb, var(--cascivo-color-text) 12%, transparent);inset-block-start:0}._root_1d40j_2[data-edges=shadow]:after{box-shadow:0 -.5rem .4rem -.4rem color-mix(in srgb, var(--cascivo-color-text) 12%, transparent);inset-block-end:0}@container scroll-state(scrollable:top){._root_1d40j_2[data-edges=shadow]:before{opacity:1}}@container scroll-state(scrollable:bottom){._root_1d40j_2[data-edges=shadow]:after{opacity:1}}}}
|
|
@@ -1,38 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./scroll-area.module.js";
|
|
4
|
-
import { useRef as t } from "react";
|
|
5
|
-
import { cn as n, useSignalEffect as r, useSignals as i } from "@cascivo/core";
|
|
6
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/scroll-area/scroll-area.tsx
|
|
8
|
-
function o({ height: o, width: s, orientation: c = "vertical", edges: l = "shadow", className: u, style: d, children: f, ...p }) {
|
|
9
|
-
i();
|
|
10
|
-
let m = t(null);
|
|
11
|
-
r(() => {
|
|
12
|
-
let e = m.current;
|
|
13
|
-
if (!e) return;
|
|
14
|
-
let t = () => {
|
|
15
|
-
let t = e.scrollTop <= 0, n = e.scrollTop + e.clientHeight >= e.scrollHeight - 1, r = e.scrollLeft <= 0, i = e.scrollLeft + e.clientWidth >= e.scrollWidth - 1;
|
|
16
|
-
e.toggleAttribute("data-scroll-top", !t), e.toggleAttribute("data-scroll-bottom", !n), e.toggleAttribute("data-scroll-start", !r), e.toggleAttribute("data-scroll-end", !i);
|
|
17
|
-
};
|
|
18
|
-
return t(), e.addEventListener("scroll", t, { passive: !0 }), () => {
|
|
19
|
-
e.removeEventListener("scroll", t);
|
|
20
|
-
};
|
|
21
|
-
});
|
|
22
|
-
let h = {
|
|
23
|
-
...o === void 0 ? {} : { "--cascivo-scroll-area-height": o },
|
|
24
|
-
...s === void 0 ? {} : { "--cascivo-scroll-area-width": s },
|
|
25
|
-
...d
|
|
26
|
-
};
|
|
27
|
-
return /* @__PURE__ */ a("div", {
|
|
28
|
-
ref: m,
|
|
29
|
-
"data-orientation": c,
|
|
30
|
-
"data-edges": l,
|
|
31
|
-
className: n(e.root, u),
|
|
32
|
-
style: h,
|
|
33
|
-
...p,
|
|
34
|
-
children: f
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
//#endregion
|
|
38
|
-
export { o as ScrollArea };
|
|
1
|
+
"use client";import e from"./scroll-area.module.js";import{useRef as t}from"react";import{cn as n,useSignalEffect as r,useSignals as i}from"@cascivo/core";import{jsx as a}from"react/jsx-runtime";function o(){return typeof CSS<`u`&&typeof CSS.supports==`function`&&CSS.supports(`container-type`,`scroll-state`)}function s({height:s,width:c,orientation:l=`vertical`,edges:u=`shadow`,className:d,style:f,children:p,...m}){i();let h=t(null);r(()=>{if(u===`shadow`&&o())return;let e=h.current;if(!e)return;let t=()=>{let t=e.scrollTop<=0,n=e.scrollTop+e.clientHeight>=e.scrollHeight-1,r=e.scrollLeft<=0,i=e.scrollLeft+e.clientWidth>=e.scrollWidth-1;e.toggleAttribute(`data-scroll-top`,!t),e.toggleAttribute(`data-scroll-bottom`,!n),e.toggleAttribute(`data-scroll-start`,!r),e.toggleAttribute(`data-scroll-end`,!i)};return t(),e.addEventListener(`scroll`,t,{passive:!0}),()=>{e.removeEventListener(`scroll`,t)}});let g={...s===void 0?{}:{"--cascivo-scroll-area-height":s},...c===void 0?{}:{"--cascivo-scroll-area-width":c},...f};return a(`div`,{ref:h,"data-orientation":l,"data-edges":u,className:n(e.root,d),style:g,...m,children:p})}export{s as ScrollArea};
|
package/dist/search/search.js
CHANGED
|
@@ -1,92 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./search.module.js";
|
|
4
|
-
import { useRef as t } from "react";
|
|
5
|
-
import { cn as n, focusElement as r, useControllableSignal as i, useId 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/search/search.tsx
|
|
9
|
-
function f() {
|
|
10
|
-
return /* @__PURE__ */ d("svg", {
|
|
11
|
-
viewBox: "0 0 16 16",
|
|
12
|
-
width: "16",
|
|
13
|
-
height: "16",
|
|
14
|
-
fill: "none",
|
|
15
|
-
stroke: "currentColor",
|
|
16
|
-
strokeWidth: "1.5",
|
|
17
|
-
strokeLinecap: "round",
|
|
18
|
-
"aria-hidden": "true",
|
|
19
|
-
children: [/* @__PURE__ */ u("circle", {
|
|
20
|
-
cx: "7",
|
|
21
|
-
cy: "7",
|
|
22
|
-
r: "4.5"
|
|
23
|
-
}), /* @__PURE__ */ u("line", {
|
|
24
|
-
x1: "10.5",
|
|
25
|
-
y1: "10.5",
|
|
26
|
-
x2: "14",
|
|
27
|
-
y2: "14"
|
|
28
|
-
})]
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
function p({ value: p, defaultValue: m = "", onValueChange: h, onChange: g, onSearch: _, debounceMs: v = 300, placeholder: y, size: b = "md", label: x, disabled: S = !1, clearLabel: C, id: w, className: T }) {
|
|
32
|
-
s();
|
|
33
|
-
let E = y ?? l(c.search.placeholder), D = x ?? l(c.search.label), O = C ?? l(c.search.clear), k = t(null), A = a("cascade-search"), j = w ?? A, M = p !== void 0, [N] = i({
|
|
34
|
-
value: p,
|
|
35
|
-
defaultValue: m
|
|
36
|
-
}), P = t(_);
|
|
37
|
-
P.current = _;
|
|
38
|
-
let F = t(null), I = () => {
|
|
39
|
-
F.current !== null && (clearTimeout(F.current), F.current = null);
|
|
40
|
-
};
|
|
41
|
-
o(() => I);
|
|
42
|
-
let L = (e) => {
|
|
43
|
-
let t = e.target.value;
|
|
44
|
-
M || (N.value = t), (h ?? g)?.(t), I(), F.current = setTimeout(() => {
|
|
45
|
-
F.current = null, P.current?.(t);
|
|
46
|
-
}, v);
|
|
47
|
-
}, R = (e) => {
|
|
48
|
-
e.key === "Enter" && (I(), _?.(N.value));
|
|
49
|
-
}, z = () => {
|
|
50
|
-
I(), M || (N.value = ""), (h ?? g)?.(""), _?.(""), r(k.current);
|
|
51
|
-
}, B = N.value !== "";
|
|
52
|
-
return /* @__PURE__ */ d("div", {
|
|
53
|
-
className: n(e.root, T),
|
|
54
|
-
"data-size": b,
|
|
55
|
-
"data-state": B ? "filled" : "empty",
|
|
56
|
-
children: [
|
|
57
|
-
/* @__PURE__ */ u("label", {
|
|
58
|
-
className: e.label,
|
|
59
|
-
htmlFor: j,
|
|
60
|
-
children: D
|
|
61
|
-
}),
|
|
62
|
-
/* @__PURE__ */ u("span", {
|
|
63
|
-
className: e.icon,
|
|
64
|
-
children: /* @__PURE__ */ u(f, {})
|
|
65
|
-
}),
|
|
66
|
-
/* @__PURE__ */ u("input", {
|
|
67
|
-
ref: k,
|
|
68
|
-
id: j,
|
|
69
|
-
type: "search",
|
|
70
|
-
className: e.input,
|
|
71
|
-
value: N.value,
|
|
72
|
-
placeholder: E,
|
|
73
|
-
disabled: S,
|
|
74
|
-
onChange: L,
|
|
75
|
-
onKeyDown: R
|
|
76
|
-
}),
|
|
77
|
-
B && /* @__PURE__ */ u("button", {
|
|
78
|
-
type: "button",
|
|
79
|
-
className: e.clear,
|
|
80
|
-
"aria-label": O,
|
|
81
|
-
disabled: S,
|
|
82
|
-
onClick: z,
|
|
83
|
-
children: /* @__PURE__ */ u("span", {
|
|
84
|
-
"aria-hidden": "true",
|
|
85
|
-
children: "✕"
|
|
86
|
-
})
|
|
87
|
-
})
|
|
88
|
-
]
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
//#endregion
|
|
92
|
-
export { p as Search };
|
|
1
|
+
"use client";import e from"./search.module.js";import{useRef as t}from"react";import{cn as n,focusElement as r,useControllableSignal as i,useId as a,useSignalEffect as o,useSignals as s}from"@cascivo/core";import{builtin as c,t as l}from"@cascivo/i18n";import{jsx as u,jsxs as d}from"react/jsx-runtime";function f(){return d(`svg`,{viewBox:`0 0 16 16`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,"aria-hidden":`true`,children:[u(`circle`,{cx:`7`,cy:`7`,r:`4.5`}),u(`line`,{x1:`10.5`,y1:`10.5`,x2:`14`,y2:`14`})]})}function p({value:p,defaultValue:m=``,onValueChange:h,onSearch:g,debounceMs:_=300,placeholder:v,size:y=`md`,label:b,ariaLabel:x,disabled:S=!1,clearLabel:C,id:w,"aria-labelledby":T,"aria-describedby":E,"aria-invalid":D,className:O}){s();let k=v??l(c.search.placeholder),A=b??(T===void 0?l(c.search.label):void 0),j=C??l(c.search.clear),M=t(null),N=a(`cascade-search`),P=w??N,F=p!==void 0,[I]=i({value:p,defaultValue:m}),L=t(g);L.current=g;let R=t(null),z=()=>{R.current!==null&&(clearTimeout(R.current),R.current=null)};o(()=>z);let B=e=>{let t=e.target.value;F||(I.value=t),h?.(t),z(),R.current=setTimeout(()=>{R.current=null,L.current?.(t)},_)},V=e=>{e.key===`Enter`&&(z(),g?.(I.value))},H=()=>{z(),F||(I.value=``),h?.(``),g?.(``),r(M.current)},U=I.value!==``;return d(`div`,{className:n(e.root,O),"data-size":y,"data-state":U?`filled`:`empty`,children:[A!==void 0&&u(`label`,{className:e.label,htmlFor:P,children:A}),u(`span`,{className:e.icon,children:u(f,{})}),u(`input`,{ref:M,id:P,type:`search`,"aria-labelledby":T,"aria-label":x,"aria-describedby":E,"aria-invalid":D,className:e.input,value:I.value,placeholder:k,disabled:S,onChange:B,onKeyDown:V}),U&&u(`button`,{type:`button`,className:e.clear,"aria-label":j,disabled:S,onClick:H,children:u(`span`,{"aria-hidden":`true`,children:`✕`})})]})}export{p as Search};
|
|
@@ -1,10 +1,2 @@
|
|
|
1
1
|
import './search.css';
|
|
2
|
-
var e
|
|
3
|
-
root: "_root_1ppci_2",
|
|
4
|
-
label: "_label_1ppci_35",
|
|
5
|
-
icon: "_icon_1ppci_48",
|
|
6
|
-
input: "_input_1ppci_57",
|
|
7
|
-
clear: "_clear_1ppci_103"
|
|
8
|
-
};
|
|
9
|
-
//#endregion
|
|
10
|
-
export { e as default };
|
|
2
|
+
var e={root:`_root_1ppci_2`,label:`_label_1ppci_35`,icon:`_icon_1ppci_48`,input:`_input_1ppci_57`,clear:`_clear_1ppci_103`};export{e as default};
|
|
@@ -1,43 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./segmented-control.module.js";
|
|
4
|
-
import { cn as t } from "@cascivo/core";
|
|
5
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
-
//#region ../components/src/segmented-control/segmented-control.tsx
|
|
7
|
-
function r({ options: r, value: i, onValueChange: a, size: o = "md", disabled: s = !1, className: c, ...l }) {
|
|
8
|
-
function u(e, t) {
|
|
9
|
-
let n = r.filter((e) => !e.disabled), i = n.findIndex((e) => e.value === r[t]?.value);
|
|
10
|
-
if (e.key === "ArrowRight") {
|
|
11
|
-
e.preventDefault();
|
|
12
|
-
let t = n[(i + 1) % n.length];
|
|
13
|
-
t && a(t.value);
|
|
14
|
-
} else if (e.key === "ArrowLeft") {
|
|
15
|
-
e.preventDefault();
|
|
16
|
-
let t = n[(i - 1 + n.length) % n.length];
|
|
17
|
-
t && a(t.value);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return /* @__PURE__ */ n("div", {
|
|
21
|
-
role: "group",
|
|
22
|
-
className: t(e.wrapper, c),
|
|
23
|
-
"data-size": o,
|
|
24
|
-
"data-disabled": s ? "" : void 0,
|
|
25
|
-
...l,
|
|
26
|
-
children: r.map((t, r) => /* @__PURE__ */ n("button", {
|
|
27
|
-
type: "button",
|
|
28
|
-
role: "radio",
|
|
29
|
-
"aria-checked": t.value === i,
|
|
30
|
-
"data-selected": t.value === i ? "" : void 0,
|
|
31
|
-
"data-size": o,
|
|
32
|
-
className: e.segment,
|
|
33
|
-
disabled: s || t.disabled,
|
|
34
|
-
onClick: () => {
|
|
35
|
-
t.disabled || a(t.value);
|
|
36
|
-
},
|
|
37
|
-
onKeyDown: (e) => u(e, r),
|
|
38
|
-
children: t.label
|
|
39
|
-
}, t.value))
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
//#endregion
|
|
43
|
-
export { r as SegmentedControl };
|
|
1
|
+
"use client";import e from"./segmented-control.module.js";import{cn as t}from"@cascivo/core";import{jsx as n}from"react/jsx-runtime";function r({options:r,value:i,onValueChange:a,size:o=`md`,disabled:s=!1,className:c,...l}){function u(e,t){let n=r.filter(e=>!e.disabled),i=n.findIndex(e=>e.value===r[t]?.value);if(e.key===`ArrowRight`){e.preventDefault();let t=n[(i+1)%n.length];t&&a(t.value)}else if(e.key===`ArrowLeft`){e.preventDefault();let t=n[(i-1+n.length)%n.length];t&&a(t.value)}}return n(`div`,{role:`group`,className:t(e.wrapper,c),"data-size":o,"data-disabled":s?``:void 0,...l,children:r.map((t,r)=>n(`button`,{type:`button`,role:`radio`,"aria-checked":t.value===i,"data-selected":t.value===i?``:void 0,"data-size":o,className:e.segment,disabled:s||t.disabled,onClick:()=>{t.disabled||a(t.value)},onKeyDown:e=>u(e,r),children:t.label},t.value))})}export{r as SegmentedControl};
|
package/dist/select/select.js
CHANGED
|
@@ -1,72 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./select.module.js";
|
|
4
|
-
import { forwardRef as t } from "react";
|
|
5
|
-
import { cn as n, createMachine as r, useMachine as i } from "@cascivo/core";
|
|
6
|
-
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/select/select.tsx
|
|
8
|
-
var s = r({
|
|
9
|
-
initial: "idle",
|
|
10
|
-
states: {
|
|
11
|
-
idle: { on: { FOCUS: "focused" } },
|
|
12
|
-
focused: { on: { BLUR: "idle" } }
|
|
13
|
-
}
|
|
14
|
-
}), c = t(function({ label: t, hint: r, error: c, placeholder: l, options: u, size: d = "md", className: f, id: p, defaultValue: m, value: h, onFocus: g, onBlur: _, ...v }, y) {
|
|
15
|
-
let [b, x] = i(s), S = p ?? (t ? `cascade-select-${t.toLowerCase().replace(/\s+/g, "-")}` : void 0), C = h !== void 0, w = l !== void 0;
|
|
16
|
-
return /* @__PURE__ */ o("div", {
|
|
17
|
-
className: n(e.wrapper, f),
|
|
18
|
-
"data-state": c ? "error" : b.value,
|
|
19
|
-
"data-size": d,
|
|
20
|
-
children: [
|
|
21
|
-
t && /* @__PURE__ */ a("label", {
|
|
22
|
-
className: e.label,
|
|
23
|
-
htmlFor: S,
|
|
24
|
-
children: t
|
|
25
|
-
}),
|
|
26
|
-
/* @__PURE__ */ o("div", {
|
|
27
|
-
className: e.field,
|
|
28
|
-
children: [/* @__PURE__ */ o("select", {
|
|
29
|
-
id: S,
|
|
30
|
-
className: e.select,
|
|
31
|
-
"aria-invalid": c ? !0 : void 0,
|
|
32
|
-
"aria-describedby": c ? `${S}-error` : r ? `${S}-hint` : void 0,
|
|
33
|
-
value: h,
|
|
34
|
-
defaultValue: !C && w ? m ?? "" : m,
|
|
35
|
-
onFocus: (e) => {
|
|
36
|
-
x("FOCUS"), g?.(e);
|
|
37
|
-
},
|
|
38
|
-
onBlur: (e) => {
|
|
39
|
-
x("BLUR"), _?.(e);
|
|
40
|
-
},
|
|
41
|
-
ref: y,
|
|
42
|
-
...v,
|
|
43
|
-
children: [w && /* @__PURE__ */ a("option", {
|
|
44
|
-
value: "",
|
|
45
|
-
disabled: !0,
|
|
46
|
-
children: l
|
|
47
|
-
}), u.map((e) => /* @__PURE__ */ a("option", {
|
|
48
|
-
value: e.value,
|
|
49
|
-
disabled: e.disabled,
|
|
50
|
-
children: e.label
|
|
51
|
-
}, e.value))]
|
|
52
|
-
}), /* @__PURE__ */ a("span", {
|
|
53
|
-
className: e.chevron,
|
|
54
|
-
"aria-hidden": "true"
|
|
55
|
-
})]
|
|
56
|
-
}),
|
|
57
|
-
c && /* @__PURE__ */ a("span", {
|
|
58
|
-
id: `${S}-error`,
|
|
59
|
-
className: e.error,
|
|
60
|
-
role: "alert",
|
|
61
|
-
children: c
|
|
62
|
-
}),
|
|
63
|
-
!c && r && /* @__PURE__ */ a("span", {
|
|
64
|
-
id: `${S}-hint`,
|
|
65
|
-
className: e.hint,
|
|
66
|
-
children: r
|
|
67
|
-
})
|
|
68
|
-
]
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
//#endregion
|
|
72
|
-
export { c as Select };
|
|
1
|
+
"use client";import e from"./select.module.js";import{forwardRef as t}from"react";import{cn as n,createMachine as r,useMachine as i}from"@cascivo/core";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=r({initial:`idle`,states:{idle:{on:{FOCUS:`focused`}},focused:{on:{BLUR:`idle`}}}}),c=t(function({label:t,hint:r,error:c,placeholder:l,options:u,size:d=`md`,className:f,id:p,defaultValue:m,value:h,onFocus:g,onBlur:_,ariaLabel:v,...y},b){let[x,S]=i(s),C=p??(t?`cascade-select-${t.toLowerCase().replace(/\s+/g,`-`)}`:void 0),w=h!==void 0,T=l!==void 0;return o(`div`,{className:n(e.wrapper,f),"data-state":c?`error`:x.value,"data-size":d,children:[t&&a(`label`,{className:e.label,htmlFor:C,children:t}),o(`div`,{className:e.field,children:[o(`select`,{id:C,className:e.select,"aria-invalid":c?!0:void 0,"aria-describedby":c?`${C}-error`:r?`${C}-hint`:void 0,value:h,defaultValue:!w&&T?m??``:m,onFocus:e=>{S(`FOCUS`),g?.(e)},onBlur:e=>{S(`BLUR`),_?.(e)},ref:b,...y,"aria-label":y[`aria-label`]??v,children:[T&&a(`option`,{value:``,disabled:!0,children:l}),u.map(e=>a(`option`,{value:e.value,disabled:e.disabled,children:e.label},e.value))]}),a(`span`,{className:e.chevron,"aria-hidden":`true`})]}),c&&a(`span`,{id:`${C}-error`,className:e.error,role:`alert`,children:c}),!c&&r&&a(`span`,{id:`${C}-hint`,className:e.hint,children:r})]})});export{c as Select};
|
|
@@ -1,12 +1,2 @@
|
|
|
1
1
|
import './select.css';
|
|
2
|
-
var e
|
|
3
|
-
wrapper: "_wrapper_1b5d9_2",
|
|
4
|
-
label: "_label_1b5d9_24",
|
|
5
|
-
field: "_field_1b5d9_32",
|
|
6
|
-
select: "_select_1b5d9_37",
|
|
7
|
-
chevron: "_chevron_1b5d9_79",
|
|
8
|
-
error: "_error_1b5d9_92",
|
|
9
|
-
hint: "_hint_1b5d9_99"
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
12
|
-
export { e as default };
|
|
2
|
+
var e={wrapper:`_wrapper_1b5d9_2`,label:`_label_1b5d9_24`,field:`_field_1b5d9_32`,select:`_select_1b5d9_37`,chevron:`_chevron_1b5d9_79`,error:`_error_1b5d9_92`,hint:`_hint_1b5d9_99`};export{e as default};
|
|
@@ -1,19 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import { cn as t } from "@cascivo/core/pure";
|
|
3
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
-
//#region ../components/src/separator/separator.tsx
|
|
5
|
-
function r({ orientation: r = "horizontal", decorative: i = !1, className: a, ...o }) {
|
|
6
|
-
return r === "horizontal" && !i ? /* @__PURE__ */ n("hr", {
|
|
7
|
-
"data-orientation": "horizontal",
|
|
8
|
-
className: t(e.separator, a),
|
|
9
|
-
...o
|
|
10
|
-
}) : /* @__PURE__ */ n("div", {
|
|
11
|
-
role: i ? "none" : "separator",
|
|
12
|
-
"aria-orientation": i ? void 0 : r,
|
|
13
|
-
"data-orientation": r,
|
|
14
|
-
className: t(e.separator, a),
|
|
15
|
-
...o
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
export { r as Separator };
|
|
1
|
+
import e from"./separator.module.js";import{cn as t}from"@cascivo/core/pure";import{jsx as n}from"react/jsx-runtime";function r({orientation:r=`horizontal`,decorative:i=!1,className:a,...o}){return r===`horizontal`&&!i?n(`hr`,{"data-orientation":`horizontal`,className:t(e.separator,a),...o}):n(`div`,{role:i?`none`:`separator`,"aria-orientation":i?void 0:r,"data-orientation":r,className:t(e.separator,a),...o})}export{r as Separator};
|
package/dist/sheet/sheet.js
CHANGED
|
@@ -1,49 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./sheet.module.js";
|
|
4
|
-
import { useId as t, useRef as n } from "react";
|
|
5
|
-
import { useEffectPropSignal as r, useSignalEffect as i } from "@cascivo/core";
|
|
6
|
-
import { builtin as a, t as o } from "@cascivo/i18n";
|
|
7
|
-
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
-
//#region ../components/src/sheet/sheet.tsx
|
|
9
|
-
function l({ open: l, onClose: u, title: d, children: f, side: p = "end" }) {
|
|
10
|
-
let m = n(null), h = t(), g = r(l), _ = n(u);
|
|
11
|
-
return _.current = u, i(() => {
|
|
12
|
-
let e = m.current;
|
|
13
|
-
if (e) if (g.value) try {
|
|
14
|
-
e.showPopover();
|
|
15
|
-
} catch {}
|
|
16
|
-
else try {
|
|
17
|
-
e.hidePopover();
|
|
18
|
-
} catch {}
|
|
19
|
-
}), /* @__PURE__ */ c("div", {
|
|
20
|
-
ref: m,
|
|
21
|
-
popover: "manual",
|
|
22
|
-
role: "dialog",
|
|
23
|
-
"aria-modal": "true",
|
|
24
|
-
"aria-labelledby": d == null ? void 0 : h,
|
|
25
|
-
"data-state": l ? "open" : "closed",
|
|
26
|
-
"data-side": p,
|
|
27
|
-
className: e.sheet,
|
|
28
|
-
children: [/* @__PURE__ */ c("div", {
|
|
29
|
-
className: e.header,
|
|
30
|
-
children: [d != null && /* @__PURE__ */ s("span", {
|
|
31
|
-
id: h,
|
|
32
|
-
className: e.title,
|
|
33
|
-
children: d
|
|
34
|
-
}), /* @__PURE__ */ s("button", {
|
|
35
|
-
type: "button",
|
|
36
|
-
"aria-label": o(a.sheet.close),
|
|
37
|
-
onClick: () => _.current(),
|
|
38
|
-
className: e.close,
|
|
39
|
-
children: "✕"
|
|
40
|
-
})]
|
|
41
|
-
}), /* @__PURE__ */ s("div", {
|
|
42
|
-
className: e.body,
|
|
43
|
-
"data-cascivo-sheet-body": "",
|
|
44
|
-
children: f
|
|
45
|
-
})]
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
//#endregion
|
|
49
|
-
export { l as Sheet };
|
|
1
|
+
"use client";import e from"./sheet.module.js";import{useId as t,useRef as n}from"react";import{useEffectPropSignal as r,useSignalEffect as i}from"@cascivo/core";import{builtin as a,t as o}from"@cascivo/i18n";import{jsx as s,jsxs as c}from"react/jsx-runtime";function l({open:l,onClose:u,title:d,children:f,side:p=`end`}){let m=n(null),h=t(),g=r(l),_=n(u);return _.current=u,i(()=>{let e=m.current;if(e)if(g.value)try{e.showPopover()}catch{}else try{e.hidePopover()}catch{}}),c(`div`,{ref:m,popover:`manual`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":d==null?void 0:h,"data-state":l?`open`:`closed`,"data-side":p,className:e.sheet,children:[c(`div`,{className:e.header,children:[d!=null&&s(`span`,{id:h,className:e.title,children:d}),s(`button`,{type:`button`,"aria-label":o(a.sheet.close),onClick:()=>_.current(),className:e.close,children:`✕`})]}),s(`div`,{className:e.body,"data-cascivo-sheet-body":``,children:f})]})}export{l as Sheet};
|
|
@@ -1,10 +1,2 @@
|
|
|
1
1
|
import './sheet.css';
|
|
2
|
-
var e
|
|
3
|
-
sheet: "_sheet_gx7nz_2",
|
|
4
|
-
header: "_header_gx7nz_141",
|
|
5
|
-
title: "_title_gx7nz_150",
|
|
6
|
-
close: "_close_gx7nz_156",
|
|
7
|
-
body: "_body_gx7nz_184"
|
|
8
|
-
};
|
|
9
|
-
//#endregion
|
|
10
|
-
export { e as default };
|
|
2
|
+
var e={sheet:`_sheet_gx7nz_2`,header:`_header_gx7nz_141`,title:`_title_gx7nz_150`,close:`_close_gx7nz_156`,body:`_body_gx7nz_184`};export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cascivo.component{.
|
|
1
|
+
@layer cascivo.component{._header_awr9h_2{align-items:center;gap:var(--cascivo-space-2);block-size:var(--cascivo-shell-header-block-size);padding-inline:var(--cascivo-space-3);background:var(--cascivo-color-surface);border-block-end:1px solid var(--cascivo-color-border);font-family:var(--cascivo-font-sans);display:flex;position:relative}._skipLink_awr9h_14{z-index:100;padding:var(--cascivo-space-2) var(--cascivo-space-3);background:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-control);color:var(--cascivo-color-text);font-size:var(--cascivo-text-sm);clip-path:inset(50%);text-decoration:none;position:absolute;inset-block-start:var(--cascivo-space-2);inset-inline-start:var(--cascivo-space-2)}._skipLink_awr9h_14:focus-visible{clip-path:none;box-shadow:var(--cascivo-focus-ring);outline:none}._menuButton_awr9h_36{border-radius:var(--cascivo-radius-control);block-size:2.5rem;inline-size:2.5rem;color:var(--cascivo-color-text);cursor:pointer;background:0 0;border:none;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}._menuButton_awr9h_36:hover{background:var(--cascivo-color-bg-subtle)}._menuButton_awr9h_36:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._brand_awr9h_59{align-items:baseline;gap:var(--cascivo-space-1);color:var(--cascivo-color-text);white-space:nowrap;font-size:var(--cascivo-text-sm);text-decoration:none;display:inline-flex}._brandPrefix_awr9h_69{font-weight:var(--cascivo-font-normal)}._brandName_awr9h_73{font-weight:var(--cascivo-font-semibold)}._nav_awr9h_77{min-inline-size:0}._navList_awr9h_81{align-items:center;gap:var(--cascivo-space-1);margin:0;padding:0;list-style:none;display:flex}._navLink_awr9h_90{padding-inline:var(--cascivo-space-3);padding-block:var(--cascivo-space-2);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-subtle);white-space:nowrap;border-radius:var(--cascivo-radius-control);transition:color var(--cascivo-duration-150) var(--cascivo-ease-out);align-items:center;text-decoration:none;display:inline-flex}._navLink_awr9h_90:hover{color:var(--cascivo-color-text);background:var(--cascivo-color-bg-subtle)}._navLink_awr9h_90:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._navLink_awr9h_90[data-state=active]{color:var(--cascivo-color-text);font-weight:var(--cascivo-font-semibold);background:var(--cascivo-color-bg-subtle)}._navMenuWrapper_awr9h_119{list-style:none;position:relative}._navMenuTrigger_awr9h_124{align-items:center;gap:var(--cascivo-space-1);padding-inline:var(--cascivo-space-3);padding-block:var(--cascivo-space-2);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-subtle);border-radius:var(--cascivo-radius-control);cursor:pointer;white-space:nowrap;transition:color var(--cascivo-duration-150) var(--cascivo-ease-out);background:0 0;border:none;display:inline-flex}._navMenuTrigger_awr9h_124:hover{color:var(--cascivo-color-text);background:var(--cascivo-color-bg-subtle)}._navMenuTrigger_awr9h_124:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._navMenuTrigger_awr9h_124[data-state=active]{color:var(--cascivo-color-text);font-weight:var(--cascivo-font-semibold);background:var(--cascivo-color-bg-subtle)}._chevron_awr9h_156{transition:rotate var(--cascivo-duration-150) var(--cascivo-ease-out)}[aria-expanded=true] ._chevron_awr9h_156{rotate:180deg}._navMenuPanel_awr9h_164{position-anchor:var(--cascivo-popover-anchor,inherit);margin:var(--cascivo-space-1) 0 0;padding:var(--cascivo-space-1);background:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-control);min-inline-size:12rem;box-shadow:var(--cascivo-shadow-md);transition:translate var(--cascivo-motion-enter), display var(--cascivo-motion-enter) allow-discrete, overlay var(--cascivo-motion-enter) allow-discrete;list-style:none;position:fixed;inset-block-start:anchor(end);inset-inline-start:anchor(start);translate:0}@starting-style{._navMenuPanel_awr9h_164{translate:0 -.5rem}}._navMenuPanel_awr9h_164[data-state=closed]{transition:translate var(--cascivo-motion-exit), display var(--cascivo-motion-exit) allow-discrete, overlay var(--cascivo-motion-exit) allow-discrete;translate:0 -.5rem}._navMenuItem_awr9h_197{padding-inline:var(--cascivo-space-3);padding-block:var(--cascivo-space-2);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);border-radius:var(--cascivo-radius-item);white-space:nowrap;text-decoration:none;display:block}._navMenuItem_awr9h_197:hover,._navMenuItem_awr9h_197:focus-visible{background:var(--cascivo-color-bg-subtle);outline:none}._navMenuItem_awr9h_197[data-state=active]{background:var(--cascivo-color-active-bg);font-weight:var(--cascivo-font-medium)}._spacer_awr9h_219{flex:1}._center_awr9h_226{min-inline-size:0;padding-inline:var(--cascivo-space-2);flex:1;justify-content:center;align-items:center;display:flex}._actions_awr9h_235{align-items:center;gap:var(--cascivo-space-1);display:flex}._action_awr9h_235{border:none;block-size:2.5rem;inline-size:2.5rem;color:var(--cascivo-color-text);cursor:pointer;border-radius:var(--cascivo-radius-control);background:0 0;border-block-end:2px solid #0000;justify-content:center;align-items:center;display:inline-flex}._action_awr9h_235:hover{background:var(--cascivo-color-bg-subtle)}._action_awr9h_235:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._action_awr9h_235[data-state=active]{border-block-end-color:var(--cascivo-color-accent);background:var(--cascivo-color-bg-subtle)}._actionIcon_awr9h_269{justify-content:center;align-items:center;block-size:1.25rem;inline-size:1.25rem;display:inline-flex}._end_awr9h_277{align-items:center;gap:var(--cascivo-space-2);padding-inline-start:var(--cascivo-space-2);display:flex}}
|