@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,99 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./navigation-menu.module.js";
|
|
4
|
-
import { useId as t, useRef as n } from "react";
|
|
5
|
-
import { DismissableLayer as r, Presence as i, cn as a, focusElement as o, getLinkComponent as s, useAnchorPosition as c, useRovingFocus as l, useSignal as u, useSignals as d } from "@cascivo/core";
|
|
6
|
-
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/navigation-menu/navigation-menu.tsx
|
|
8
|
-
function m({ items: n, "aria-label": r, ariaLabel: i, orientation: o = "horizontal", className: s }) {
|
|
9
|
-
d();
|
|
10
|
-
let c = t(), p = u(null), m = l({
|
|
11
|
-
orientation: o,
|
|
12
|
-
loop: !0
|
|
13
|
-
});
|
|
14
|
-
return /* @__PURE__ */ f("nav", {
|
|
15
|
-
"aria-label": i ?? r,
|
|
16
|
-
className: a(e.nav, s),
|
|
17
|
-
"data-orientation": o,
|
|
18
|
-
children: /* @__PURE__ */ f("ul", {
|
|
19
|
-
role: "list",
|
|
20
|
-
className: e.list,
|
|
21
|
-
children: n.map((e, t) => /* @__PURE__ */ f(h, {
|
|
22
|
-
item: e,
|
|
23
|
-
baseId: c,
|
|
24
|
-
openId: p,
|
|
25
|
-
itemProps: m.getItemProps(t)
|
|
26
|
-
}, e.id))
|
|
27
|
-
})
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
function h({ item: t, baseId: r, openId: a, itemProps: l }) {
|
|
31
|
-
d();
|
|
32
|
-
let u = n(null), m = n(null), h = t.content != null, _ = a.value === t.id, v = `${r}-panel-${t.id}`, { anchorStyle: y, floatingStyle: b } = c({
|
|
33
|
-
anchorRef: u,
|
|
34
|
-
floatingRef: m,
|
|
35
|
-
placement: "bottom-start",
|
|
36
|
-
enabled: _
|
|
37
|
-
}), { ref: x, onKeyDown: S, ...C } = l;
|
|
38
|
-
if (!h) {
|
|
39
|
-
let n = s();
|
|
40
|
-
return /* @__PURE__ */ f("li", {
|
|
41
|
-
className: e.item,
|
|
42
|
-
children: /* @__PURE__ */ f(n, {
|
|
43
|
-
ref: (e) => x(e),
|
|
44
|
-
href: t.href,
|
|
45
|
-
className: e.link,
|
|
46
|
-
onKeyDown: S,
|
|
47
|
-
...C,
|
|
48
|
-
children: t.label
|
|
49
|
-
})
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
return /* @__PURE__ */ p("li", {
|
|
53
|
-
className: e.item,
|
|
54
|
-
children: [/* @__PURE__ */ f("button", {
|
|
55
|
-
ref: (e) => {
|
|
56
|
-
u.current = e, x(e);
|
|
57
|
-
},
|
|
58
|
-
type: "button",
|
|
59
|
-
"aria-expanded": _,
|
|
60
|
-
"aria-controls": v,
|
|
61
|
-
"data-state": _ ? "open" : "closed",
|
|
62
|
-
className: e.trigger,
|
|
63
|
-
style: y,
|
|
64
|
-
onClick: () => {
|
|
65
|
-
a.value = _ ? null : t.id;
|
|
66
|
-
},
|
|
67
|
-
onKeyDown: (e) => {
|
|
68
|
-
S(e), !e.defaultPrevented && e.key === "Escape" && (a.value = null);
|
|
69
|
-
},
|
|
70
|
-
...C,
|
|
71
|
-
children: t.label
|
|
72
|
-
}), /* @__PURE__ */ f(i, {
|
|
73
|
-
present: _,
|
|
74
|
-
children: /* @__PURE__ */ f(g, {
|
|
75
|
-
panelId: v,
|
|
76
|
-
floatingRef: m,
|
|
77
|
-
floatingStyle: b,
|
|
78
|
-
onClose: () => {
|
|
79
|
-
a.value = null, o(u.current);
|
|
80
|
-
},
|
|
81
|
-
children: t.content
|
|
82
|
-
})
|
|
83
|
-
})]
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
function g({ panelId: t, floatingRef: n, floatingStyle: i, onClose: a, children: o }) {
|
|
87
|
-
return /* @__PURE__ */ f(r, {
|
|
88
|
-
onDismiss: a,
|
|
89
|
-
children: /* @__PURE__ */ f("div", {
|
|
90
|
-
ref: n,
|
|
91
|
-
id: t,
|
|
92
|
-
className: e.panel,
|
|
93
|
-
style: i,
|
|
94
|
-
children: o
|
|
95
|
-
})
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
//#endregion
|
|
99
|
-
export { m as NavigationMenu };
|
|
1
|
+
"use client";import e from"./navigation-menu.module.js";import{useId as t,useRef as n}from"react";import{DismissableLayer as r,Presence as i,cn as a,focusElement as o,getLinkComponent as s,useAnchorPosition as c,useRovingFocus as l,useSignal as u,useSignals as d}from"@cascivo/core";import{jsx as f,jsxs as p}from"react/jsx-runtime";function m({items:n,"aria-label":r,ariaLabel:i,label:o,orientation:s=`horizontal`,className:c}){d();let p=t(),m=u(null),g=l({orientation:s,loop:!0});return f(`nav`,{"aria-label":i??r??o,className:a(e.nav,c),"data-orientation":s,children:f(`ul`,{role:`list`,className:e.list,children:n.map((e,t)=>f(h,{item:e,baseId:p,openId:m,itemProps:g.getItemProps(t)},e.id))})})}function h({item:t,baseId:r,openId:a,itemProps:l}){d();let u=n(null),m=n(null),h=t.content!=null,_=a.value===t.id,v=`${r}-panel-${t.id}`,{anchorStyle:y,floatingStyle:b}=c({anchorRef:u,floatingRef:m,placement:`bottom-start`,enabled:_}),{ref:x,onKeyDown:S,...C}=l;if(!h){let n=s();return f(`li`,{className:e.item,children:f(n,{ref:e=>x(e),href:t.href,className:e.link,onKeyDown:S,...C,children:t.label})})}return p(`li`,{className:e.item,children:[f(`button`,{ref:e=>{u.current=e,x(e)},type:`button`,"aria-expanded":_,"aria-controls":v,"data-state":_?`open`:`closed`,className:e.trigger,style:y,onClick:()=>{a.value=_?null:t.id},onKeyDown:e=>{S(e),!e.defaultPrevented&&e.key===`Escape`&&(a.value=null)},...C,children:t.label}),f(i,{present:_,children:f(g,{panelId:v,floatingRef:m,floatingStyle:b,onClose:()=>{a.value=null,o(u.current)},children:t.content})})]})}function g({panelId:t,floatingRef:n,floatingStyle:i,onClose:a,children:o}){return f(r,{onDismiss:a,children:f(`div`,{ref:n,id:t,className:e.panel,style:i,children:o})})}export{m as NavigationMenu};
|
|
@@ -1,11 +1,2 @@
|
|
|
1
1
|
import './navigation-menu.css';
|
|
2
|
-
var e
|
|
3
|
-
nav: "_nav_1k4lc_2",
|
|
4
|
-
list: "_list_1k4lc_6",
|
|
5
|
-
item: "_item_1k4lc_20",
|
|
6
|
-
link: "_link_1k4lc_24",
|
|
7
|
-
trigger: "_trigger_1k4lc_25",
|
|
8
|
-
panel: "_panel_1k4lc_50"
|
|
9
|
-
};
|
|
10
|
-
//#endregion
|
|
11
|
-
export { e as default };
|
|
2
|
+
var e={nav:`_nav_1k4lc_2`,list:`_list_1k4lc_6`,item:`_item_1k4lc_20`,link:`_link_1k4lc_24`,trigger:`_trigger_1k4lc_25`,panel:`_panel_1k4lc_50`};export{e as default};
|
|
@@ -1,114 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./accordion.module.js";
|
|
4
|
-
import { createContext as t, forwardRef as n, useId as r, useRef as i } from "react";
|
|
5
|
-
import { cn as a, useControllableSignal as o, useSignalEffect as s, useSignals as c } from "@cascivo/core";
|
|
6
|
-
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/accordion/accordion.tsx
|
|
8
|
-
var d = t(null), f = t(null);
|
|
9
|
-
function p(e) {
|
|
10
|
-
return e === void 0 ? [] : Array.isArray(e) ? e : [e];
|
|
11
|
-
}
|
|
12
|
-
function m({ type: t = "single", defaultValue: n, value: i, onValueChange: s, className: c, children: u }) {
|
|
13
|
-
let f = r(), [m] = o({
|
|
14
|
-
value: i === void 0 ? void 0 : p(i),
|
|
15
|
-
defaultValue: p(n)
|
|
16
|
-
}), h = {
|
|
17
|
-
open: m,
|
|
18
|
-
baseId: f,
|
|
19
|
-
type: t,
|
|
20
|
-
toggle: (e, n) => {
|
|
21
|
-
let r = m.value, a;
|
|
22
|
-
a = t === "multiple" ? n ? [...new Set([...r, e])] : r.filter((t) => t !== e) : n ? [e] : [], i === void 0 && (m.value = a), s?.(t === "multiple" ? a : a[0] ?? "");
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
return /* @__PURE__ */ l(d.Provider, {
|
|
26
|
-
value: h,
|
|
27
|
-
children: /* @__PURE__ */ l("div", {
|
|
28
|
-
"data-type": t,
|
|
29
|
-
className: a(e.accordion, c),
|
|
30
|
-
children: u
|
|
31
|
-
})
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
function h({ value: e, className: t, children: n, ...r }) {
|
|
35
|
-
return /* @__PURE__ */ l(f.Provider, {
|
|
36
|
-
value: { value: e },
|
|
37
|
-
children: /* @__PURE__ */ l(d.Consumer, { children: (i) => i ? /* @__PURE__ */ l(g, {
|
|
38
|
-
store: i,
|
|
39
|
-
value: e,
|
|
40
|
-
className: t,
|
|
41
|
-
...r,
|
|
42
|
-
children: n
|
|
43
|
-
}) : null })
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
function g({ store: t, value: n, className: r, children: o, ...u }) {
|
|
47
|
-
c();
|
|
48
|
-
let d = i(null), f = t.open.value.includes(n);
|
|
49
|
-
return s(() => {
|
|
50
|
-
let e = d.current, r = t.open.value.includes(n);
|
|
51
|
-
e && e.open !== r && (e.open = r);
|
|
52
|
-
}), /* @__PURE__ */ l("details", {
|
|
53
|
-
ref: d,
|
|
54
|
-
open: f,
|
|
55
|
-
...t.type === "single" ? { name: t.baseId } : {},
|
|
56
|
-
"data-value": n,
|
|
57
|
-
"data-state": f ? "open" : "closed",
|
|
58
|
-
className: a(e.item, r),
|
|
59
|
-
onToggle: (e) => {
|
|
60
|
-
let r = e.currentTarget;
|
|
61
|
-
r.open !== t.open.value.includes(n) && t.toggle(n, r.open);
|
|
62
|
-
let i = t.open.value.includes(n);
|
|
63
|
-
r.open !== i && (r.open = i);
|
|
64
|
-
},
|
|
65
|
-
...u,
|
|
66
|
-
children: o
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
var _ = n(function(e, t) {
|
|
70
|
-
return /* @__PURE__ */ l(d.Consumer, { children: (n) => /* @__PURE__ */ l(f.Consumer, { children: (r) => n && r ? /* @__PURE__ */ l(v, {
|
|
71
|
-
store: n,
|
|
72
|
-
item: r,
|
|
73
|
-
summaryRef: t,
|
|
74
|
-
...e
|
|
75
|
-
}) : null }) });
|
|
76
|
-
});
|
|
77
|
-
function v({ store: t, item: n, className: r, children: i, summaryRef: o, ...s }) {
|
|
78
|
-
c();
|
|
79
|
-
let d = t.open.value.includes(n.value);
|
|
80
|
-
return /* @__PURE__ */ u("summary", {
|
|
81
|
-
id: `${t.baseId}-trigger-${n.value}`,
|
|
82
|
-
"aria-controls": `${t.baseId}-content-${n.value}`,
|
|
83
|
-
"data-state": d ? "open" : "closed",
|
|
84
|
-
className: a(e.trigger, r),
|
|
85
|
-
ref: o,
|
|
86
|
-
...s,
|
|
87
|
-
children: [/* @__PURE__ */ l("h3", {
|
|
88
|
-
className: e.heading,
|
|
89
|
-
children: i
|
|
90
|
-
}), /* @__PURE__ */ l("span", {
|
|
91
|
-
className: e.indicator,
|
|
92
|
-
"aria-hidden": "true"
|
|
93
|
-
})]
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
function y(e) {
|
|
97
|
-
return /* @__PURE__ */ l(d.Consumer, { children: (t) => /* @__PURE__ */ l(f.Consumer, { children: (n) => t && n ? /* @__PURE__ */ l(b, {
|
|
98
|
-
store: t,
|
|
99
|
-
item: n,
|
|
100
|
-
...e
|
|
101
|
-
}) : null }) });
|
|
102
|
-
}
|
|
103
|
-
function b({ store: t, item: n, className: r, children: i, ...o }) {
|
|
104
|
-
return /* @__PURE__ */ l("div", {
|
|
105
|
-
role: "region",
|
|
106
|
-
id: `${t.baseId}-content-${n.value}`,
|
|
107
|
-
"aria-labelledby": `${t.baseId}-trigger-${n.value}`,
|
|
108
|
-
className: a(e.content, r),
|
|
109
|
-
...o,
|
|
110
|
-
children: i
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
//#endregion
|
|
114
|
-
export { m as Accordion, y as AccordionContent, h as AccordionItem, _ as AccordionTrigger };
|
|
1
|
+
"use client";import e from"./accordion.module.js";import{createContext as t,forwardRef as n,useId as r,useRef as i}from"react";import{cn as a,useControllableSignal as o,useSignalEffect as s,useSignals as c}from"@cascivo/core";import{jsx as l,jsxs as u}from"react/jsx-runtime";var d=t(null),f=t(null);function p(e){return e===void 0?[]:Array.isArray(e)?e:[e]}function m({type:t=`single`,defaultValue:n,value:i,onValueChange:s,className:c,children:u}){let f=r(),[m]=o({value:i===void 0?void 0:p(i),defaultValue:p(n)}),h={open:m,baseId:f,type:t,toggle:(e,n)=>{let r=m.value,a;a=t===`multiple`?n?[...new Set([...r,e])]:r.filter(t=>t!==e):n?[e]:[],i===void 0&&(m.value=a),s?.(t===`multiple`?a:a[0]??``)}};return l(d.Provider,{value:h,children:l(`div`,{"data-type":t,className:a(e.accordion,c),children:u})})}function h({value:e,className:t,children:n,...r}){return l(f.Provider,{value:{value:e},children:l(d.Consumer,{children:i=>i?l(g,{store:i,value:e,className:t,...r,children:n}):null})})}function g({store:t,value:n,className:r,children:o,...u}){c();let d=i(null),f=t.open.value.includes(n);return s(()=>{let e=d.current,r=t.open.value.includes(n);e&&e.open!==r&&(e.open=r)}),l(`details`,{ref:d,open:f,...t.type===`single`?{name:t.baseId}:{},"data-value":n,"data-state":f?`open`:`closed`,className:a(e.item,r),onToggle:e=>{let r=e.currentTarget;r.open!==t.open.value.includes(n)&&t.toggle(n,r.open);let i=t.open.value.includes(n);r.open!==i&&(r.open=i)},...u,children:o})}var _=n(function(e,t){return l(d.Consumer,{children:n=>l(f.Consumer,{children:r=>n&&r?l(v,{store:n,item:r,summaryRef:t,...e}):null})})});function v({store:t,item:n,className:r,children:i,summaryRef:o,...s}){c();let d=t.open.value.includes(n.value);return u(`summary`,{id:`${t.baseId}-trigger-${n.value}`,"aria-controls":`${t.baseId}-content-${n.value}`,"data-state":d?`open`:`closed`,className:a(e.trigger,r),ref:o,...s,children:[l(`h3`,{className:e.heading,children:i}),l(`span`,{className:e.indicator,"aria-hidden":`true`})]})}function y(e){return l(d.Consumer,{children:t=>l(f.Consumer,{children:n=>t&&n?l(b,{store:t,item:n,...e}):null})})}function b({store:t,item:n,className:r,children:i,...o}){return l(`div`,{role:`region`,id:`${t.baseId}-content-${n.value}`,"aria-labelledby":`${t.baseId}-trigger-${n.value}`,className:a(e.content,r),...o,children:i})}export{m as Accordion,y as AccordionContent,h as AccordionItem,_ as AccordionTrigger};
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
accordion: "_accordion_1t08g_2",
|
|
3
|
-
item: "_item_1t08g_10",
|
|
4
|
-
heading: "_heading_1t08g_16",
|
|
5
|
-
trigger: "_trigger_1t08g_22",
|
|
6
|
-
indicator: "_indicator_1t08g_54",
|
|
7
|
-
content: "_content_1t08g_92"
|
|
8
|
-
};
|
|
9
|
-
//#endregion
|
|
10
|
-
export { e as default };
|
|
1
|
+
var e={accordion:`_accordion_1t08g_2`,item:`_item_1t08g_10`,heading:`_heading_1t08g_16`,trigger:`_trigger_1t08g_22`,indicator:`_indicator_1t08g_54`,content:`_content_1t08g_92`};export{e as default};
|
|
@@ -1,91 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./action-sheet.module.js";
|
|
4
|
-
import { useId as t } from "react";
|
|
5
|
-
import { DismissableLayer as n, FocusScope as r, Portal as i, Presence as a, cn as o, useControllableSignal as s, useRovingFocus as c, useSignals as l } from "@cascivo/core";
|
|
6
|
-
import { builtin as u, t as d } from "@cascivo/i18n";
|
|
7
|
-
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
8
|
-
//#region ../components/src/action-sheet/action-sheet.tsx
|
|
9
|
-
function m({ open: m, defaultOpen: h, onOpenChange: g, actions: _, title: v, description: y, showCancel: b = !0, labels: x, className: S }) {
|
|
10
|
-
l();
|
|
11
|
-
let [C, w] = s({
|
|
12
|
-
value: m,
|
|
13
|
-
defaultValue: h ?? !1,
|
|
14
|
-
onChange: g
|
|
15
|
-
}), T = c({
|
|
16
|
-
orientation: "vertical",
|
|
17
|
-
loop: !0
|
|
18
|
-
}), E = t(), D = t(), O = x?.cancel ?? d(u.actionSheet.cancel), k = x?.label ?? d(u.actionSheet.label), A = (e) => {
|
|
19
|
-
e.disabled || (e.onSelect(), w(!1));
|
|
20
|
-
}, j = _.length;
|
|
21
|
-
return /* @__PURE__ */ f(i, { children: /* @__PURE__ */ f(a, {
|
|
22
|
-
present: C,
|
|
23
|
-
children: /* @__PURE__ */ f("div", {
|
|
24
|
-
className: e.overlay,
|
|
25
|
-
children: /* @__PURE__ */ f(n, {
|
|
26
|
-
onDismiss: () => w(!1),
|
|
27
|
-
children: /* @__PURE__ */ f(r, {
|
|
28
|
-
trapped: !0,
|
|
29
|
-
restoreFocus: !0,
|
|
30
|
-
autoFocus: !0,
|
|
31
|
-
children: /* @__PURE__ */ p("div", {
|
|
32
|
-
role: "menu",
|
|
33
|
-
"aria-label": v ? void 0 : k,
|
|
34
|
-
"aria-labelledby": v ? E : void 0,
|
|
35
|
-
"aria-describedby": y ? D : void 0,
|
|
36
|
-
className: o(e.sheet, S),
|
|
37
|
-
children: [/* @__PURE__ */ p("div", {
|
|
38
|
-
className: e.group,
|
|
39
|
-
children: [(v || y) && /* @__PURE__ */ p("div", {
|
|
40
|
-
className: e.heading,
|
|
41
|
-
role: "presentation",
|
|
42
|
-
children: [v && /* @__PURE__ */ f("p", {
|
|
43
|
-
id: E,
|
|
44
|
-
className: e.title,
|
|
45
|
-
children: v
|
|
46
|
-
}), y && /* @__PURE__ */ f("p", {
|
|
47
|
-
id: D,
|
|
48
|
-
className: e.description,
|
|
49
|
-
children: y
|
|
50
|
-
})]
|
|
51
|
-
}), _.map((t, n) => {
|
|
52
|
-
let r = T.getItemProps(n);
|
|
53
|
-
return /* @__PURE__ */ f("button", {
|
|
54
|
-
ref: r.ref,
|
|
55
|
-
type: "button",
|
|
56
|
-
role: "menuitem",
|
|
57
|
-
tabIndex: r.tabIndex,
|
|
58
|
-
"aria-disabled": t.disabled || void 0,
|
|
59
|
-
"data-destructive": t.destructive ? "" : void 0,
|
|
60
|
-
className: e.item,
|
|
61
|
-
onKeyDown: r.onKeyDown,
|
|
62
|
-
onFocus: r.onFocus,
|
|
63
|
-
onClick: () => A(t),
|
|
64
|
-
children: t.label
|
|
65
|
-
}, n);
|
|
66
|
-
})]
|
|
67
|
-
}), b && /* @__PURE__ */ f("div", {
|
|
68
|
-
className: e.group,
|
|
69
|
-
children: (() => {
|
|
70
|
-
let t = T.getItemProps(j);
|
|
71
|
-
return /* @__PURE__ */ f("button", {
|
|
72
|
-
ref: t.ref,
|
|
73
|
-
type: "button",
|
|
74
|
-
role: "menuitem",
|
|
75
|
-
tabIndex: t.tabIndex,
|
|
76
|
-
className: o(e.item, e.cancel),
|
|
77
|
-
onKeyDown: t.onKeyDown,
|
|
78
|
-
onFocus: t.onFocus,
|
|
79
|
-
onClick: () => w(!1),
|
|
80
|
-
children: O
|
|
81
|
-
});
|
|
82
|
-
})()
|
|
83
|
-
})]
|
|
84
|
-
})
|
|
85
|
-
})
|
|
86
|
-
})
|
|
87
|
-
})
|
|
88
|
-
}) });
|
|
89
|
-
}
|
|
90
|
-
//#endregion
|
|
91
|
-
export { m as ActionSheet };
|
|
1
|
+
"use client";import e from"./action-sheet.module.js";import{useId as t}from"react";import{DismissableLayer as n,FocusScope as r,Portal as i,Presence as a,cn as o,useControllableSignal as s,useRovingFocus as c,useSignals as l}from"@cascivo/core";import{builtin as u,t as d}from"@cascivo/i18n";import{jsx as f,jsxs as p}from"react/jsx-runtime";function m({open:m,defaultOpen:h,onOpenChange:g,actions:_,title:v,description:y,showCancel:b=!0,labels:x,className:S}){l();let[C,w]=s({value:m,defaultValue:h??!1,onChange:g}),T=c({orientation:`vertical`,loop:!0}),E=t(),D=t(),O=x?.cancel??d(u.actionSheet.cancel),k=x?.label??d(u.actionSheet.label),A=e=>{e.disabled||(e.onSelect(),w(!1))},j=_.length;return f(i,{children:f(a,{present:C,children:f(`div`,{className:e.overlay,children:f(n,{onDismiss:()=>w(!1),children:f(r,{trapped:!0,restoreFocus:!0,autoFocus:!0,children:p(`div`,{role:`menu`,"aria-label":v?void 0:k,"aria-labelledby":v?E:void 0,"aria-describedby":y?D:void 0,className:o(e.sheet,S),children:[p(`div`,{className:e.group,children:[(v||y)&&p(`div`,{className:e.heading,role:`presentation`,children:[v&&f(`p`,{id:E,className:e.title,children:v}),y&&f(`p`,{id:D,className:e.description,children:y})]}),_.map((t,n)=>{let r=T.getItemProps(n);return f(`button`,{ref:r.ref,type:`button`,role:`menuitem`,tabIndex:r.tabIndex,"aria-disabled":t.disabled||void 0,"data-destructive":t.destructive?``:void 0,className:e.item,onKeyDown:r.onKeyDown,onFocus:r.onFocus,onClick:()=>A(t),children:t.label},t.id??n)})]}),b&&f(`div`,{className:e.group,children:(()=>{let t=T.getItemProps(j);return f(`button`,{ref:t.ref,type:`button`,role:`menuitem`,tabIndex:t.tabIndex,className:o(e.item,e.cancel),onKeyDown:t.onKeyDown,onFocus:t.onFocus,onClick:()=>w(!1),children:O})})()})]})})})})})})}export{m as ActionSheet};
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
overlay: "_overlay_17irl_2",
|
|
3
|
-
sheet: "_sheet_17irl_28",
|
|
4
|
-
group: "_group_17irl_50",
|
|
5
|
-
heading: "_heading_17irl_60",
|
|
6
|
-
title: "_title_17irl_66",
|
|
7
|
-
description: "_description_17irl_73",
|
|
8
|
-
item: "_item_17irl_79",
|
|
9
|
-
cancel: "_cancel_17irl_119"
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
12
|
-
export { e as default };
|
|
1
|
+
var e={overlay:`_overlay_zjdn9_2`,sheet:`_sheet_zjdn9_28`,group:`_group_zjdn9_50`,heading:`_heading_zjdn9_60`,title:`_title_zjdn9_66`,description:`_description_zjdn9_73`,item:`_item_zjdn9_79`,cancel:`_cancel_zjdn9_119`};export{e as default};
|
package/dist/node/alert/alert.js
CHANGED
|
@@ -1,55 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./alert.module.js";
|
|
4
|
-
import { cn as t, useSignal as n, useSignals as r } from "@cascivo/core";
|
|
5
|
-
import { builtin as i, t as a } from "@cascivo/i18n";
|
|
6
|
-
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/alert/alert.tsx
|
|
8
|
-
var c = new Set(["warning", "destructive"]);
|
|
9
|
-
function l({ variant: l = "default", title: u, icon: d, dismissible: f = !1, onDismiss: p, action: m, className: h, children: g, ..._ }) {
|
|
10
|
-
r();
|
|
11
|
-
let v = n(!1);
|
|
12
|
-
return v.value ? null : /* @__PURE__ */ s("div", {
|
|
13
|
-
role: c.has(l) ? "alert" : "status",
|
|
14
|
-
"data-variant": l,
|
|
15
|
-
className: t(e.alert, h),
|
|
16
|
-
..._,
|
|
17
|
-
children: [
|
|
18
|
-
d && /* @__PURE__ */ o("span", {
|
|
19
|
-
className: e.icon,
|
|
20
|
-
"aria-hidden": "true",
|
|
21
|
-
children: d
|
|
22
|
-
}),
|
|
23
|
-
/* @__PURE__ */ s("div", {
|
|
24
|
-
className: e.body,
|
|
25
|
-
children: [
|
|
26
|
-
u && /* @__PURE__ */ o("div", {
|
|
27
|
-
className: e.title,
|
|
28
|
-
children: u
|
|
29
|
-
}),
|
|
30
|
-
g && /* @__PURE__ */ o("div", {
|
|
31
|
-
className: e.content,
|
|
32
|
-
children: g
|
|
33
|
-
}),
|
|
34
|
-
m && /* @__PURE__ */ o("button", {
|
|
35
|
-
type: "button",
|
|
36
|
-
className: e.action,
|
|
37
|
-
onClick: m.onClick,
|
|
38
|
-
children: m.label
|
|
39
|
-
})
|
|
40
|
-
]
|
|
41
|
-
}),
|
|
42
|
-
f && /* @__PURE__ */ o("button", {
|
|
43
|
-
type: "button",
|
|
44
|
-
className: e.dismiss,
|
|
45
|
-
"aria-label": a(i.alert.dismiss),
|
|
46
|
-
onClick: () => {
|
|
47
|
-
v.value = !0, p?.();
|
|
48
|
-
},
|
|
49
|
-
children: "✕"
|
|
50
|
-
})
|
|
51
|
-
]
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
//#endregion
|
|
55
|
-
export { l as Alert };
|
|
1
|
+
"use client";import e from"./alert.module.js";import{cn as t,useSignal as n,useSignals as r}from"@cascivo/core";import{builtin as i,t as a}from"@cascivo/i18n";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=new Set([`warning`,`destructive`]);function l({variant:l=`default`,title:u,icon:d,dismissible:f=!1,onDismiss:p,action:m,className:h,children:g,..._}){r();let v=n(!1);return v.value?null:s(`div`,{role:c.has(l)?`alert`:`status`,"data-variant":l,className:t(e.alert,h),..._,children:[d&&o(`span`,{className:e.icon,"aria-hidden":`true`,children:d}),s(`div`,{className:e.body,children:[u&&o(`div`,{className:e.title,children:u}),g&&o(`div`,{className:e.content,children:g}),m&&o(`button`,{type:`button`,className:e.action,onClick:m.onClick,children:m.label})]}),f&&o(`button`,{type:`button`,className:e.dismiss,"aria-label":a(i.alert.dismiss),onClick:()=>{v.value=!0,p?.()},children:`✕`})]})}export{l as Alert};
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
alert: "_alert_a2dn2_2",
|
|
3
|
-
icon: "_icon_a2dn2_18",
|
|
4
|
-
title: "_title_a2dn2_19",
|
|
5
|
-
body: "_body_a2dn2_90",
|
|
6
|
-
content: "_content_a2dn2_104",
|
|
7
|
-
action: "_action_a2dn2_110",
|
|
8
|
-
dismiss: "_dismiss_a2dn2_149"
|
|
9
|
-
};
|
|
10
|
-
//#endregion
|
|
11
|
-
export { e as default };
|
|
1
|
+
var e={alert:`_alert_a2dn2_2`,icon:`_icon_a2dn2_18`,title:`_title_a2dn2_19`,body:`_body_a2dn2_90`,content:`_content_a2dn2_104`,action:`_action_a2dn2_110`,dismiss:`_dismiss_a2dn2_149`};export{e as default};
|
|
@@ -1,66 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./alert-dialog.module.js";
|
|
4
|
-
import { useRef as t } from "react";
|
|
5
|
-
import { focusElement as n, useEffectPropSignal as r, useId as i, useSignalEffect as a } from "@cascivo/core";
|
|
6
|
-
import { builtin as o, t as s } from "@cascivo/i18n";
|
|
7
|
-
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
-
//#region ../components/src/alert-dialog/alert-dialog.tsx
|
|
9
|
-
function u({ open: u, title: d, description: f, onConfirm: p, onCancel: m, labels: h, variant: g = "default" }) {
|
|
10
|
-
let _ = t(null), v = i("cascivo-alert-dialog-title"), y = i("cascivo-alert-dialog-desc"), b = r(u), x = t(null), S = t(m);
|
|
11
|
-
S.current = m;
|
|
12
|
-
let C = t(p);
|
|
13
|
-
return C.current = p, a(() => {
|
|
14
|
-
let e = _.current;
|
|
15
|
-
if (e) if (b.value) {
|
|
16
|
-
try {
|
|
17
|
-
e.showPopover();
|
|
18
|
-
} catch {}
|
|
19
|
-
requestAnimationFrame(() => n(x.current));
|
|
20
|
-
} else try {
|
|
21
|
-
e.hidePopover();
|
|
22
|
-
} catch {}
|
|
23
|
-
}), /* @__PURE__ */ c("div", {
|
|
24
|
-
ref: _,
|
|
25
|
-
popover: "manual",
|
|
26
|
-
role: "alertdialog",
|
|
27
|
-
"aria-modal": "true",
|
|
28
|
-
"aria-labelledby": v,
|
|
29
|
-
"aria-describedby": y,
|
|
30
|
-
"data-state": u ? "open" : "closed",
|
|
31
|
-
"data-variant": g,
|
|
32
|
-
className: e.dialog,
|
|
33
|
-
children: /* @__PURE__ */ l("div", {
|
|
34
|
-
className: e.content,
|
|
35
|
-
children: [
|
|
36
|
-
/* @__PURE__ */ c("p", {
|
|
37
|
-
id: v,
|
|
38
|
-
className: e.title,
|
|
39
|
-
children: d
|
|
40
|
-
}),
|
|
41
|
-
/* @__PURE__ */ c("p", {
|
|
42
|
-
id: y,
|
|
43
|
-
className: e.description,
|
|
44
|
-
children: f
|
|
45
|
-
}),
|
|
46
|
-
/* @__PURE__ */ l("div", {
|
|
47
|
-
className: e.actions,
|
|
48
|
-
children: [/* @__PURE__ */ c("button", {
|
|
49
|
-
ref: x,
|
|
50
|
-
type: "button",
|
|
51
|
-
className: e.cancel,
|
|
52
|
-
onClick: () => S.current(),
|
|
53
|
-
children: h?.cancel ?? s(o.alertDialog.cancel)
|
|
54
|
-
}), /* @__PURE__ */ c("button", {
|
|
55
|
-
type: "button",
|
|
56
|
-
className: e.confirm,
|
|
57
|
-
onClick: () => C.current(),
|
|
58
|
-
children: h?.confirm ?? s(o.alertDialog.confirm)
|
|
59
|
-
})]
|
|
60
|
-
})
|
|
61
|
-
]
|
|
62
|
-
})
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
//#endregion
|
|
66
|
-
export { u as AlertDialog };
|
|
1
|
+
"use client";import e from"./alert-dialog.module.js";import{useRef as t}from"react";import{focusElement as n,useEffectPropSignal as r,useId as i,useSignalEffect as a}from"@cascivo/core";import{builtin as o,t as s}from"@cascivo/i18n";import{jsx as c,jsxs as l}from"react/jsx-runtime";function u({open:u,title:d,description:f,onConfirm:p,onCancel:m,labels:h,variant:g=`default`}){let _=t(null),v=i(`cascivo-alert-dialog-title`),y=i(`cascivo-alert-dialog-desc`),b=r(u),x=t(null),S=t(m);S.current=m;let C=t(p);return C.current=p,a(()=>{let e=_.current;if(e)if(b.value){try{e.showPopover()}catch{}requestAnimationFrame(()=>n(x.current))}else try{e.hidePopover()}catch{}}),c(`div`,{ref:_,popover:`manual`,role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":v,"aria-describedby":y,"data-state":u?`open`:`closed`,"data-variant":g,className:e.dialog,children:l(`div`,{className:e.content,children:[c(`p`,{id:v,className:e.title,children:d}),c(`p`,{id:y,className:e.description,children:f}),l(`div`,{className:e.actions,children:[c(`button`,{ref:x,type:`button`,className:e.cancel,onClick:()=>S.current(),children:h?.cancel??s(o.alertDialog.cancel)}),c(`button`,{type:`button`,className:e.confirm,onClick:()=>C.current(),children:h?.confirm??s(o.alertDialog.confirm)})]})]})})}export{u as AlertDialog};
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
dialog: "_dialog_zou3k_2",
|
|
3
|
-
content: "_content_zou3k_58",
|
|
4
|
-
title: "_title_zou3k_71",
|
|
5
|
-
description: "_description_zou3k_78",
|
|
6
|
-
actions: "_actions_zou3k_84",
|
|
7
|
-
cancel: "_cancel_zou3k_123",
|
|
8
|
-
confirm: "_confirm_zou3k_124"
|
|
9
|
-
};
|
|
10
|
-
//#endregion
|
|
11
|
-
export { e as default };
|
|
1
|
+
var e={dialog:`_dialog_9e1wf_2`,content:`_content_9e1wf_58`,title:`_title_9e1wf_71`,description:`_description_9e1wf_78`,actions:`_actions_9e1wf_84`,cancel:`_cancel_9e1wf_126`,confirm:`_confirm_9e1wf_127`};export{e as default};
|
|
@@ -1,85 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./app-shell.module.js";
|
|
4
|
-
import { cloneElement as t, isValidElement as n, useRef as r } from "react";
|
|
5
|
-
import { cn as i, useControllableSignal as a, useSignalEffect as o, useSignals as s } from "@cascivo/core";
|
|
6
|
-
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/app-shell/app-shell.tsx
|
|
8
|
-
function d({ header: d, nav: f, children: p, footer: m, open: h, defaultOpen: g, onOpenChange: _, padding: v = 6, className: y, ...b }) {
|
|
9
|
-
s();
|
|
10
|
-
let x = h !== void 0, [S] = a({
|
|
11
|
-
value: h,
|
|
12
|
-
defaultValue: g ?? !0
|
|
13
|
-
}), C = r(null), w = r(null);
|
|
14
|
-
function T(e) {
|
|
15
|
-
x || (S.value = e), _?.(e);
|
|
16
|
-
}
|
|
17
|
-
function E() {
|
|
18
|
-
typeof document < "u" && (w.current = document.activeElement), T(!S.value);
|
|
19
|
-
}
|
|
20
|
-
o(() => {
|
|
21
|
-
x || g !== void 0 || typeof window > "u" || typeof window.matchMedia != "function" || window.matchMedia("(max-width: 63.999rem)").matches && (S.value = !1);
|
|
22
|
-
}), o(() => {
|
|
23
|
-
if (!S.value || typeof document > "u") return;
|
|
24
|
-
let e = (e) => {
|
|
25
|
-
e.key === "Escape" && T(!1);
|
|
26
|
-
};
|
|
27
|
-
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
28
|
-
}), o(() => {
|
|
29
|
-
let e = C.current;
|
|
30
|
-
if (e) if (S.value) e.removeAttribute("inert");
|
|
31
|
-
else {
|
|
32
|
-
e.setAttribute("inert", "");
|
|
33
|
-
let t = w.current;
|
|
34
|
-
t && e.contains(document.activeElement) && t.focus();
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
let D = n(d) && f ? t(d, {
|
|
38
|
-
onMenuClick: E,
|
|
39
|
-
menuExpanded: S.value
|
|
40
|
-
}) : d;
|
|
41
|
-
return /* @__PURE__ */ u("div", {
|
|
42
|
-
className: i(e.shell, y),
|
|
43
|
-
"data-open": S.value,
|
|
44
|
-
...b,
|
|
45
|
-
children: [
|
|
46
|
-
/* @__PURE__ */ l("div", {
|
|
47
|
-
className: e.header,
|
|
48
|
-
children: D
|
|
49
|
-
}),
|
|
50
|
-
/* @__PURE__ */ u("div", {
|
|
51
|
-
className: e.body,
|
|
52
|
-
children: [f && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("div", {
|
|
53
|
-
ref: C,
|
|
54
|
-
className: e.navWrapper,
|
|
55
|
-
"data-open": S.value,
|
|
56
|
-
"data-testid": "app-shell-nav",
|
|
57
|
-
"data-cascivo-appshell-nav": "",
|
|
58
|
-
children: /* @__PURE__ */ l("div", {
|
|
59
|
-
className: e.navInner,
|
|
60
|
-
children: f
|
|
61
|
-
})
|
|
62
|
-
}), /* @__PURE__ */ l("div", {
|
|
63
|
-
className: e.scrim,
|
|
64
|
-
"data-open": S.value,
|
|
65
|
-
"data-testid": "app-shell-scrim",
|
|
66
|
-
"aria-hidden": "true",
|
|
67
|
-
onClick: () => T(!1)
|
|
68
|
-
})] }), /* @__PURE__ */ l("main", {
|
|
69
|
-
id: "cascade-main",
|
|
70
|
-
tabIndex: -1,
|
|
71
|
-
className: e.main,
|
|
72
|
-
"data-cascivo-appshell-main": "",
|
|
73
|
-
"data-padding": v === "none" ? "none" : String(v),
|
|
74
|
-
children: p
|
|
75
|
-
})]
|
|
76
|
-
}),
|
|
77
|
-
m && /* @__PURE__ */ l("div", {
|
|
78
|
-
className: e.footer,
|
|
79
|
-
children: m
|
|
80
|
-
})
|
|
81
|
-
]
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
//#endregion
|
|
85
|
-
export { d as AppShell };
|
|
1
|
+
"use client";import e from"./app-shell.module.js";import{cloneElement as t,isValidElement as n,useRef as r}from"react";import{cn as i,useControllableSignal as a,useSignalEffect as o,useSignals as s}from"@cascivo/core";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";function d({header:d,nav:f,children:p,footer:m,open:h,defaultOpen:g,onOpenChange:_,padding:v=6,className:y,...b}){s();let x=h!==void 0,[S]=a({value:h,defaultValue:g??!0}),C=r(null),w=r(null);function T(e){x||(S.value=e),_?.(e)}function E(){typeof document<`u`&&(w.current=document.activeElement),T(!S.value)}o(()=>{x||g!==void 0||typeof window>`u`||typeof window.matchMedia!=`function`||window.matchMedia(`(max-width: 63.999rem)`).matches&&(S.value=!1)}),o(()=>{if(!S.value||typeof document>`u`)return;let e=e=>{e.key===`Escape`&&T(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)}),o(()=>{let e=C.current;if(e)if(S.value)e.removeAttribute(`inert`);else{e.setAttribute(`inert`,``);let t=w.current;t&&e.contains(document.activeElement)&&t.focus()}});let D=n(d)&&f?t(d,{onMenuClick:E,menuExpanded:S.value}):d;return u(`div`,{className:i(e.shell,y),"data-open":S.value,...b,children:[l(`div`,{className:e.header,children:D}),u(`div`,{className:e.body,children:[f&&u(c,{children:[l(`div`,{ref:C,className:e.navWrapper,"data-open":S.value,"data-testid":`app-shell-nav`,"data-cascivo-appshell-nav":``,children:l(`div`,{className:e.navInner,children:f})}),l(`div`,{className:e.scrim,"data-open":S.value,"data-testid":`app-shell-scrim`,"aria-hidden":`true`,onClick:()=>T(!1)})]}),l(`main`,{id:`cascade-main`,tabIndex:-1,className:e.main,"data-cascivo-appshell-main":``,"data-padding":v===`none`?`none`:String(v),children:p})]}),m&&l(`div`,{className:e.footer,children:m})]})}export{d as AppShell};
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
shell: "_shell_pf33o_4",
|
|
3
|
-
header: "_header_pf33o_16",
|
|
4
|
-
body: "_body_pf33o_21",
|
|
5
|
-
navWrapper: "_navWrapper_pf33o_32",
|
|
6
|
-
navInner: "_navInner_pf33o_58",
|
|
7
|
-
scrim: "_scrim_pf33o_70",
|
|
8
|
-
main: "_main_pf33o_87",
|
|
9
|
-
footer: "_footer_pf33o_128"
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
12
|
-
export { e as default };
|
|
1
|
+
var e={shell:`_shell_3dxhz_4`,header:`_header_3dxhz_16`,body:`_body_3dxhz_21`,navWrapper:`_navWrapper_3dxhz_32`,navInner:`_navInner_3dxhz_58`,scrim:`_scrim_3dxhz_70`,main:`_main_3dxhz_87`,footer:`_footer_3dxhz_128`};export{e as default};
|
|
@@ -1,20 +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/aspect-ratio/aspect-ratio.tsx
|
|
5
|
-
function r({ ratio: r = 16 / 9, className: i, style: a, children: o, ...s }) {
|
|
6
|
-
return /* @__PURE__ */ n("div", {
|
|
7
|
-
className: t(e.root, i),
|
|
8
|
-
style: {
|
|
9
|
-
"--cascivo-aspect-ratio": r,
|
|
10
|
-
...a
|
|
11
|
-
},
|
|
12
|
-
...s,
|
|
13
|
-
children: /* @__PURE__ */ n("div", {
|
|
14
|
-
className: e.inner,
|
|
15
|
-
children: o
|
|
16
|
-
})
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
|
-
export { r as AspectRatio };
|
|
1
|
+
import e from"./aspect-ratio.module.js";import{cn as t}from"@cascivo/core/pure";import{jsx as n}from"react/jsx-runtime";function r({ratio:r=16/9,className:i,style:a,children:o,...s}){return n(`div`,{className:t(e.root,i),style:{"--cascivo-aspect-ratio":r,...a},...s,children:n(`div`,{className:e.inner,children:o})})}export{r as AspectRatio};
|