@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
package/dist/node/steps/steps.js
CHANGED
|
@@ -1,35 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./steps.module.js";
|
|
4
|
-
import { normalizeProgress 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/steps/steps.tsx
|
|
8
|
-
function c({ steps: c, activeStep: l, orientation: u = "horizontal", className: d, ariaLabel: f }) {
|
|
9
|
-
r();
|
|
10
|
-
let p = n(l ?? 0);
|
|
11
|
-
p.value = l ?? p.value;
|
|
12
|
-
let m = f ?? a(i.steps.label);
|
|
13
|
-
return /* @__PURE__ */ o("ol", {
|
|
14
|
-
className: [e.steps, d].filter(Boolean).join(" "),
|
|
15
|
-
"data-orientation": u,
|
|
16
|
-
"aria-label": m,
|
|
17
|
-
children: c.map((n, r) => {
|
|
18
|
-
let i = n.state ? t(n.state) : r < p.value ? "complete" : r === p.value ? "active" : "pending";
|
|
19
|
-
return /* @__PURE__ */ s("li", {
|
|
20
|
-
className: e.step,
|
|
21
|
-
"data-state": i,
|
|
22
|
-
"aria-current": i === "active" ? "step" : void 0,
|
|
23
|
-
children: [/* @__PURE__ */ o("div", {
|
|
24
|
-
className: e.circle,
|
|
25
|
-
children: i === "complete" ? "✓" : i === "error" ? "✕" : r + 1
|
|
26
|
-
}), /* @__PURE__ */ o("span", {
|
|
27
|
-
className: e.label,
|
|
28
|
-
children: n.label
|
|
29
|
-
})]
|
|
30
|
-
}, r);
|
|
31
|
-
})
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
//#endregion
|
|
35
|
-
export { c as Steps };
|
|
1
|
+
"use client";import e from"./steps.module.js";import{normalizeProgress 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";function c({steps:c,items:l,activeStep:u,orientation:d=`horizontal`,className:f,ariaLabel:p,label:m}){r();let h=l??c??[],g=n(u??0);g.value=u??g.value;let _=p??m??a(i.steps.label);return o(`ol`,{className:[e.steps,f].filter(Boolean).join(` `),"data-orientation":d,"aria-label":_,children:h.map((n,r)=>{let i=n.state?t(n.state):r<g.value?`complete`:r===g.value?`active`:`pending`;return s(`li`,{className:e.step,"data-state":i,"aria-current":i===`active`?`step`:void 0,children:[o(`div`,{className:e.circle,children:i===`complete`?`✓`:i===`error`?`✕`:r+1}),o(`span`,{className:e.label,children:n.label})]},n.id??r)})})}export{c as Steps};
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
steps: "_steps_1u41q_2",
|
|
3
|
-
step: "_step_1u41q_2",
|
|
4
|
-
circle: "_circle_1u41q_42",
|
|
5
|
-
label: "_label_1u41q_82"
|
|
6
|
-
};
|
|
7
|
-
//#endregion
|
|
8
|
-
export { e as default };
|
|
1
|
+
var e={steps:`_steps_2penk_2`,step:`_step_2penk_2`,circle:`_circle_2penk_42`,label:`_label_2penk_82`};export{e as default};
|
|
@@ -1,102 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./structured-list.module.js";
|
|
4
|
-
import { useId as t } from "react";
|
|
5
|
-
import { cn as n, useControllableSignal as r, useRovingFocus as i, useSignals as a } from "@cascivo/core";
|
|
6
|
-
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/structured-list/structured-list.tsx
|
|
8
|
-
function c(t) {
|
|
9
|
-
let { items: r, headers: i, selectable: a = !1, className: c, ariaLabel: u, "aria-label": d } = t;
|
|
10
|
-
return a ? /* @__PURE__ */ o(l, { ...t }) : /* @__PURE__ */ s("div", {
|
|
11
|
-
role: "table",
|
|
12
|
-
"aria-label": d ?? u,
|
|
13
|
-
className: n(e.list, c),
|
|
14
|
-
children: [i && /* @__PURE__ */ o("div", {
|
|
15
|
-
role: "row",
|
|
16
|
-
className: e.headerRow,
|
|
17
|
-
children: i.map((t, n) => /* @__PURE__ */ o("div", {
|
|
18
|
-
role: "columnheader",
|
|
19
|
-
className: e.headerCell,
|
|
20
|
-
children: t
|
|
21
|
-
}, n))
|
|
22
|
-
}), /* @__PURE__ */ o("div", {
|
|
23
|
-
role: "rowgroup",
|
|
24
|
-
className: e.body,
|
|
25
|
-
children: r.map((t) => /* @__PURE__ */ o("div", {
|
|
26
|
-
role: "row",
|
|
27
|
-
className: e.row,
|
|
28
|
-
children: t.cells.map((t, n) => /* @__PURE__ */ o("div", {
|
|
29
|
-
role: "cell",
|
|
30
|
-
className: e.cell,
|
|
31
|
-
children: t
|
|
32
|
-
}, n))
|
|
33
|
-
}, t.id))
|
|
34
|
-
})]
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
function l({ items: c, headers: l, value: u, defaultValue: d, onSelect: f, className: p, ariaLabel: m, "aria-label": h }) {
|
|
38
|
-
let g = h ?? m;
|
|
39
|
-
a();
|
|
40
|
-
let _ = t(), [v, y] = r({
|
|
41
|
-
value: u,
|
|
42
|
-
defaultValue: d ?? c.find((e) => e.selected)?.id ?? "",
|
|
43
|
-
onChange: f
|
|
44
|
-
}), b = i({
|
|
45
|
-
orientation: "vertical",
|
|
46
|
-
loop: !1
|
|
47
|
-
}), x = (e) => {
|
|
48
|
-
y(e);
|
|
49
|
-
};
|
|
50
|
-
return /* @__PURE__ */ s("div", {
|
|
51
|
-
role: "radiogroup",
|
|
52
|
-
"aria-label": g,
|
|
53
|
-
className: n(e.list, e.selectable, p),
|
|
54
|
-
children: [l && /* @__PURE__ */ s("div", {
|
|
55
|
-
className: e.headerRow,
|
|
56
|
-
children: [/* @__PURE__ */ o("div", {
|
|
57
|
-
className: e.headerCell,
|
|
58
|
-
"aria-hidden": "true"
|
|
59
|
-
}), l.map((t, n) => /* @__PURE__ */ o("div", {
|
|
60
|
-
className: e.headerCell,
|
|
61
|
-
children: t
|
|
62
|
-
}, n))]
|
|
63
|
-
}), /* @__PURE__ */ o("div", {
|
|
64
|
-
className: e.body,
|
|
65
|
-
children: c.map((t, n) => {
|
|
66
|
-
let r = v.value === t.id, { ref: i, ...a } = b.getItemProps(n);
|
|
67
|
-
return /* @__PURE__ */ s("div", {
|
|
68
|
-
role: "radio",
|
|
69
|
-
"aria-checked": r,
|
|
70
|
-
"aria-labelledby": `${_}-${t.id}-label`,
|
|
71
|
-
"data-selected": r || void 0,
|
|
72
|
-
className: e.row,
|
|
73
|
-
ref: i,
|
|
74
|
-
...a,
|
|
75
|
-
onClick: () => x(t.id),
|
|
76
|
-
onKeyDown: (e) => {
|
|
77
|
-
a.onKeyDown(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), x(t.id));
|
|
78
|
-
},
|
|
79
|
-
children: [
|
|
80
|
-
/* @__PURE__ */ o("div", {
|
|
81
|
-
className: e.cell,
|
|
82
|
-
"aria-hidden": "true",
|
|
83
|
-
children: /* @__PURE__ */ o("span", { className: e.indicator })
|
|
84
|
-
}),
|
|
85
|
-
/* @__PURE__ */ o("div", {
|
|
86
|
-
className: e.cell,
|
|
87
|
-
id: `${_}-${t.id}-label`,
|
|
88
|
-
children: t.cells[0]
|
|
89
|
-
}),
|
|
90
|
-
t.cells.slice(1).map((t, n) => /* @__PURE__ */ o("div", {
|
|
91
|
-
role: "cell",
|
|
92
|
-
className: e.cell,
|
|
93
|
-
children: t
|
|
94
|
-
}, n))
|
|
95
|
-
]
|
|
96
|
-
}, t.id);
|
|
97
|
-
})
|
|
98
|
-
})]
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
//#endregion
|
|
102
|
-
export { c as StructuredList };
|
|
1
|
+
"use client";import e from"./structured-list.module.js";import{useId as t}from"react";import{cn as n,useControllableSignal as r,useRovingFocus as i,useSignals as a}from"@cascivo/core";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c(t){let{items:r,headers:i,selectable:a=!1,className:c,ariaLabel:u,label:d,"aria-label":f}=t;return a?o(l,{...t}):s(`div`,{role:`table`,"aria-label":f??u??d,className:n(e.list,c),children:[i&&o(`div`,{role:`row`,className:e.headerRow,children:i.map((t,n)=>o(`div`,{role:`columnheader`,className:e.headerCell,children:t},n))}),o(`div`,{role:`rowgroup`,className:e.body,children:r.map(t=>o(`div`,{role:`row`,className:e.row,children:t.cells.map((t,n)=>o(`div`,{role:`cell`,className:e.cell,children:t},n))},t.id))})]})}function l({items:c,headers:l,value:u,defaultValue:d,onSelect:f,className:p,ariaLabel:m,"aria-label":h,label:g}){let _=h??m??g;a();let v=t(),[y,b]=r({value:u,defaultValue:d??c.find(e=>e.selected)?.id??``,onChange:f}),x=i({orientation:`vertical`,loop:!1}),S=e=>{b(e)};return s(`div`,{role:`radiogroup`,"aria-label":_,className:n(e.list,e.selectable,p),children:[l&&s(`div`,{className:e.headerRow,children:[o(`div`,{className:e.headerCell,"aria-hidden":`true`}),l.map((t,n)=>o(`div`,{className:e.headerCell,children:t},n))]}),o(`div`,{className:e.body,children:c.map((t,n)=>{let r=y.value===t.id,{ref:i,...a}=x.getItemProps(n);return s(`div`,{role:`radio`,"aria-checked":r,"aria-labelledby":`${v}-${t.id}-label`,"data-selected":r||void 0,className:e.row,ref:i,...a,onClick:()=>S(t.id),onKeyDown:e=>{a.onKeyDown(e),(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),S(t.id))},children:[o(`div`,{className:e.cell,"aria-hidden":`true`,children:o(`span`,{className:e.indicator})}),o(`div`,{className:e.cell,id:`${v}-${t.id}-label`,children:t.cells[0]}),t.cells.slice(1).map((t,n)=>o(`div`,{role:`cell`,className:e.cell,children:t},n))]},t.id)})})]})}export{c as StructuredList};
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
list: "_list_t5qxi_2",
|
|
3
|
-
headerRow: "_headerRow_t5qxi_12",
|
|
4
|
-
headerCell: "_headerCell_t5qxi_19",
|
|
5
|
-
body: "_body_t5qxi_28",
|
|
6
|
-
row: "_row_t5qxi_33",
|
|
7
|
-
cell: "_cell_t5qxi_44",
|
|
8
|
-
selectable: "_selectable_t5qxi_52",
|
|
9
|
-
indicator: "_indicator_t5qxi_77"
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
12
|
-
export { e as default };
|
|
1
|
+
var e={list:`_list_t5qxi_2`,headerRow:`_headerRow_t5qxi_12`,headerCell:`_headerCell_t5qxi_19`,body:`_body_t5qxi_28`,row:`_row_t5qxi_33`,cell:`_cell_t5qxi_44`,selectable:`_selectable_t5qxi_52`,indicator:`_indicator_t5qxi_77`};export{e as default};
|
package/dist/node/swap/swap.js
CHANGED
|
@@ -1,36 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./swap.module.js";
|
|
4
|
-
import { useControllableSignal as t, useSignals as n } from "@cascivo/core";
|
|
5
|
-
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
-
//#region ../components/src/swap/swap.tsx
|
|
7
|
-
function a({ on: a, off: o, checked: s = !1, onValueChange: c, onChange: l, mode: u = "rotate", className: d, ariaLabel: f, ...p }) {
|
|
8
|
-
n();
|
|
9
|
-
let [m] = t({ value: s });
|
|
10
|
-
function h() {
|
|
11
|
-
let e = !m.value;
|
|
12
|
-
(c ?? l)?.(e);
|
|
13
|
-
}
|
|
14
|
-
return /* @__PURE__ */ i("button", {
|
|
15
|
-
type: "button",
|
|
16
|
-
role: "switch",
|
|
17
|
-
"aria-checked": m.value,
|
|
18
|
-
className: [e.swap, d].filter(Boolean).join(" "),
|
|
19
|
-
"data-checked": m.value || void 0,
|
|
20
|
-
"data-mode": u,
|
|
21
|
-
onClick: h,
|
|
22
|
-
...p,
|
|
23
|
-
...f === void 0 ? {} : { "aria-label": f },
|
|
24
|
-
children: [/* @__PURE__ */ r("span", {
|
|
25
|
-
className: e.on,
|
|
26
|
-
"aria-hidden": "true",
|
|
27
|
-
children: a
|
|
28
|
-
}), /* @__PURE__ */ r("span", {
|
|
29
|
-
className: e.off,
|
|
30
|
-
"aria-hidden": "true",
|
|
31
|
-
children: o
|
|
32
|
-
})]
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
//#endregion
|
|
36
|
-
export { a as Swap };
|
|
1
|
+
"use client";import e from"./swap.module.js";import{useControllableSignal as t,useSignals as n}from"@cascivo/core";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a({on:a,off:o,checked:s=!1,onValueChange:c,mode:l=`rotate`,className:u,ariaLabel:d,label:f,...p}){n();let[m]=t({value:s});function h(){let e=!m.value;c?.(e)}return i(`button`,{type:`button`,role:`switch`,"aria-checked":m.value,className:[e.swap,u].filter(Boolean).join(` `),"data-checked":m.value||void 0,"data-mode":l,onClick:h,...p,...(d??f)===void 0?{}:{"aria-label":d??f},children:[r(`span`,{className:e.on,"aria-hidden":`true`,children:a}),r(`span`,{className:e.off,"aria-hidden":`true`,children:o})]})}export{a as Swap};
|
|
@@ -1,62 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./swipe-item.module.js";
|
|
4
|
-
import { cn as t, useDraggable as n, useSignal as r, useSignals as i } from "@cascivo/core";
|
|
5
|
-
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
-
//#region ../components/src/swipe-item/swipe-item.tsx
|
|
7
|
-
var s = 72, c = 100;
|
|
8
|
-
function l({ children: l, leadingActions: u = [], trailingActions: d = [], className: f }) {
|
|
9
|
-
i();
|
|
10
|
-
let p = r(0), m = r("closed"), h = u.length * s, g = d.length * s, { handleRef: _, offset: v, velocity: y, isDragging: b, reset: x } = n({
|
|
11
|
-
axis: "x",
|
|
12
|
-
onDragEnd: (e) => {
|
|
13
|
-
let t = y.value.x, n = p.value + e.x;
|
|
14
|
-
x();
|
|
15
|
-
let r = n + t * c, i = 0;
|
|
16
|
-
h > 0 && r > h / 2 ? i = h : g > 0 && r < -g / 2 && (i = -g), p.value = i, m.value = i > 0 ? "leading" : i < 0 ? "trailing" : "closed";
|
|
17
|
-
}
|
|
18
|
-
}), S = (e) => {
|
|
19
|
-
p.value = e === "leading" ? h : -g, m.value = e;
|
|
20
|
-
}, C = () => {
|
|
21
|
-
p.value = 0, m.value = "closed", x();
|
|
22
|
-
}, w = (e) => {
|
|
23
|
-
e.onSelect(), C();
|
|
24
|
-
}, T = Math.max(-g, Math.min(h, p.value + v.value.x)), E = (n, r) => /* @__PURE__ */ a("div", {
|
|
25
|
-
className: t(e.panel, e[n]),
|
|
26
|
-
children: r.map((t, r) => /* @__PURE__ */ o("button", {
|
|
27
|
-
type: "button",
|
|
28
|
-
"data-destructive": t.destructive ? "" : void 0,
|
|
29
|
-
className: e.action,
|
|
30
|
-
onFocus: () => S(n),
|
|
31
|
-
onClick: () => w(t),
|
|
32
|
-
children: [t.icon && /* @__PURE__ */ a("span", {
|
|
33
|
-
className: e.actionIcon,
|
|
34
|
-
"aria-hidden": "true",
|
|
35
|
-
children: t.icon
|
|
36
|
-
}), /* @__PURE__ */ a("span", {
|
|
37
|
-
className: e.actionLabel,
|
|
38
|
-
children: t.label
|
|
39
|
-
})]
|
|
40
|
-
}, t.id ?? `${r}-${t.label}`))
|
|
41
|
-
});
|
|
42
|
-
return /* @__PURE__ */ o("div", {
|
|
43
|
-
className: t(e.root, f),
|
|
44
|
-
"data-state": m.value,
|
|
45
|
-
onKeyDown: (e) => {
|
|
46
|
-
e.key === "Escape" && m.value !== "closed" && C();
|
|
47
|
-
},
|
|
48
|
-
children: [
|
|
49
|
-
u.length > 0 && E("leading", u),
|
|
50
|
-
d.length > 0 && E("trailing", d),
|
|
51
|
-
/* @__PURE__ */ a("div", {
|
|
52
|
-
ref: _,
|
|
53
|
-
className: e.content,
|
|
54
|
-
"data-dragging": b.value ? "" : void 0,
|
|
55
|
-
style: { transform: `translateX(${T}px)` },
|
|
56
|
-
children: l
|
|
57
|
-
})
|
|
58
|
-
]
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
//#endregion
|
|
62
|
-
export { l as SwipeItem };
|
|
1
|
+
"use client";import e from"./swipe-item.module.js";import{cn as t,useDraggable as n,useSignal as r,useSignals as i}from"@cascivo/core";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=72,c=100;function l({children:l,leadingActions:u=[],trailingActions:d=[],className:f}){i();let p=r(0),m=r(`closed`),h=u.length*s,g=d.length*s,{handleRef:_,offset:v,velocity:y,isDragging:b,reset:x}=n({axis:`x`,onDragEnd:e=>{let t=y.value.x,n=p.value+e.x;x();let r=n+t*c,i=0;h>0&&r>h/2?i=h:g>0&&r<-g/2&&(i=-g),p.value=i,m.value=i>0?`leading`:i<0?`trailing`:`closed`}}),S=e=>{p.value=e===`leading`?h:-g,m.value=e},C=()=>{p.value=0,m.value=`closed`,x()},w=e=>{e.onSelect(),C()},T=Math.max(-g,Math.min(h,p.value+v.value.x)),E=(n,r)=>a(`div`,{className:t(e.panel,e[n]),children:r.map((t,r)=>o(`button`,{type:`button`,"data-destructive":t.destructive?``:void 0,className:e.action,onFocus:()=>S(n),onClick:()=>w(t),children:[t.icon&&a(`span`,{className:e.actionIcon,"aria-hidden":`true`,children:t.icon}),a(`span`,{className:e.actionLabel,children:t.label})]},t.id??`${r}-${t.label}`))});return o(`div`,{className:t(e.root,f),"data-state":m.value,onKeyDown:e=>{e.key===`Escape`&&m.value!==`closed`&&C()},children:[u.length>0&&E(`leading`,u),d.length>0&&E(`trailing`,d),a(`div`,{ref:_,className:e.content,"data-dragging":b.value?``:void 0,style:{transform:`translateX(${T}px)`},children:l})]})}export{l as SwipeItem};
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
root: "_root_3ykmd_2",
|
|
3
|
-
panel: "_panel_3ykmd_8",
|
|
4
|
-
leading: "_leading_3ykmd_14",
|
|
5
|
-
trailing: "_trailing_3ykmd_18",
|
|
6
|
-
content: "_content_3ykmd_22",
|
|
7
|
-
action: "_action_3ykmd_37",
|
|
8
|
-
actionIcon: "_actionIcon_3ykmd_64",
|
|
9
|
-
actionLabel: "_actionLabel_3ykmd_70"
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
12
|
-
export { e as default };
|
|
1
|
+
var e={root:`_root_3ykmd_2`,panel:`_panel_3ykmd_8`,leading:`_leading_3ykmd_14`,trailing:`_trailing_3ykmd_18`,content:`_content_3ykmd_22`,action:`_action_3ykmd_37`,actionIcon:`_actionIcon_3ykmd_64`,actionLabel:`_actionLabel_3ykmd_70`};export{e as default};
|
|
@@ -1,32 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./switcher.module.js";
|
|
4
|
-
import { cn as t, getLinkComponent as n, useSignals as r } from "@cascivo/core";
|
|
5
|
-
import { builtin as i, t as a } from "@cascivo/i18n";
|
|
6
|
-
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/switcher/switcher.tsx
|
|
8
|
-
function c({ items: c, label: l, className: u }) {
|
|
9
|
-
r();
|
|
10
|
-
let d = n();
|
|
11
|
-
return /* @__PURE__ */ o("ul", {
|
|
12
|
-
"aria-label": l ?? a(i.switcher.label),
|
|
13
|
-
className: t(e.switcher, u),
|
|
14
|
-
children: c.map((t, n) => "divider" in t ? /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o("span", {
|
|
15
|
-
role: "separator",
|
|
16
|
-
"aria-orientation": "horizontal",
|
|
17
|
-
className: e.divider
|
|
18
|
-
}) }, `divider-${n}`) : /* @__PURE__ */ o("li", { children: /* @__PURE__ */ s(d, {
|
|
19
|
-
href: t.href,
|
|
20
|
-
"aria-current": t.active ? "page" : void 0,
|
|
21
|
-
"data-state": t.active ? "active" : void 0,
|
|
22
|
-
className: e.item,
|
|
23
|
-
children: [t.icon && /* @__PURE__ */ o("span", {
|
|
24
|
-
className: e.icon,
|
|
25
|
-
"aria-hidden": "true",
|
|
26
|
-
children: t.icon
|
|
27
|
-
}), t.label]
|
|
28
|
-
}) }, t.id ?? t.href))
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
//#endregion
|
|
32
|
-
export { c as Switcher };
|
|
1
|
+
"use client";import e from"./switcher.module.js";import{cn as t,getLinkComponent as n,useSignals as r}from"@cascivo/core";import{builtin as i,t as a}from"@cascivo/i18n";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c({items:c,label:l,ariaLabel:u,className:d}){r();let f=n();return o(`ul`,{"aria-label":u??l??a(i.switcher.label),className:t(e.switcher,d),children:c.map((t,n)=>`divider`in t?o(`li`,{children:o(`span`,{role:`separator`,"aria-orientation":`horizontal`,className:e.divider})},`divider-${n}`):o(`li`,{children:s(f,{href:t.href,"aria-current":t.active?`page`:void 0,"data-state":t.active?`active`:void 0,className:e.item,children:[t.icon&&o(`span`,{className:e.icon,"aria-hidden":`true`,children:t.icon}),t.label]})},t.id??t.href))})}export{c as Switcher};
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
switcher: "_switcher_13sqi_2",
|
|
3
|
-
item: "_item_13sqi_11",
|
|
4
|
-
icon: "_icon_13sqi_43",
|
|
5
|
-
divider: "_divider_13sqi_50"
|
|
6
|
-
};
|
|
7
|
-
//#endregion
|
|
8
|
-
export { e as default };
|
|
1
|
+
var e={switcher:`_switcher_13sqi_2`,item:`_item_13sqi_11`,icon:`_icon_13sqi_43`,divider:`_divider_13sqi_50`};export{e as default};
|
package/dist/node/tabs/tabs.js
CHANGED
|
@@ -1,98 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./tabs.module.js";
|
|
4
|
-
import { createContext as t, forwardRef as n, useId as r, useRef as i } from "react";
|
|
5
|
-
import { Slot as a, cn as o, useControllableSignal as s, useSignals as c } from "@cascivo/core";
|
|
6
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/tabs/tabs.tsx
|
|
8
|
-
var u = t(null);
|
|
9
|
-
function d({ defaultValue: t, value: n, onValueChange: i, className: a, children: c }) {
|
|
10
|
-
let d = r(), [f] = s({
|
|
11
|
-
value: n,
|
|
12
|
-
defaultValue: t ?? ""
|
|
13
|
-
}), p = {
|
|
14
|
-
active: f,
|
|
15
|
-
baseId: d,
|
|
16
|
-
setValue: (e) => {
|
|
17
|
-
n === void 0 && (f.value = e), i?.(e);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
return /* @__PURE__ */ l(u.Provider, {
|
|
21
|
-
value: p,
|
|
22
|
-
children: /* @__PURE__ */ l("div", {
|
|
23
|
-
className: o(e.tabs, a),
|
|
24
|
-
children: c
|
|
25
|
-
})
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
function f({ className: t, children: n, ...r }) {
|
|
29
|
-
let a = i(null);
|
|
30
|
-
return /* @__PURE__ */ l(u.Consumer, { children: (i) => /* @__PURE__ */ l("div", {
|
|
31
|
-
ref: a,
|
|
32
|
-
role: "tablist",
|
|
33
|
-
className: o(e.list, t),
|
|
34
|
-
onKeyDown: (e) => {
|
|
35
|
-
if (!i || ![
|
|
36
|
-
"ArrowRight",
|
|
37
|
-
"ArrowLeft",
|
|
38
|
-
"Home",
|
|
39
|
-
"End"
|
|
40
|
-
].includes(e.key)) return;
|
|
41
|
-
let t = Array.from(a.current?.querySelectorAll("[role=\"tab\"]:not([disabled])") ?? []);
|
|
42
|
-
if (t.length === 0) return;
|
|
43
|
-
e.preventDefault();
|
|
44
|
-
let n = t.findIndex((e) => e.dataset.value === i.active.value), r = n;
|
|
45
|
-
e.key === "ArrowRight" ? r = (n + 1) % t.length : e.key === "ArrowLeft" ? r = (n - 1 + t.length) % t.length : e.key === "Home" ? r = 0 : e.key === "End" && (r = t.length - 1);
|
|
46
|
-
let o = t[r];
|
|
47
|
-
o?.focus(), o?.dataset.value && i.setValue(o.dataset.value);
|
|
48
|
-
},
|
|
49
|
-
...r,
|
|
50
|
-
children: n
|
|
51
|
-
}) });
|
|
52
|
-
}
|
|
53
|
-
var p = n(function(e, t) {
|
|
54
|
-
return /* @__PURE__ */ l(u.Consumer, { children: (n) => n ? /* @__PURE__ */ l(m, {
|
|
55
|
-
store: n,
|
|
56
|
-
buttonRef: t,
|
|
57
|
-
...e
|
|
58
|
-
}) : null });
|
|
59
|
-
});
|
|
60
|
-
function m({ store: t, value: n, className: r, children: i, disabled: s, buttonRef: u, asChild: d = !1, ...f }) {
|
|
61
|
-
c();
|
|
62
|
-
let p = t.active.value === n;
|
|
63
|
-
return /* @__PURE__ */ l(d ? a : "button", {
|
|
64
|
-
type: d ? void 0 : "button",
|
|
65
|
-
role: "tab",
|
|
66
|
-
id: `${t.baseId}-trigger-${n}`,
|
|
67
|
-
"aria-selected": p,
|
|
68
|
-
"aria-controls": `${t.baseId}-content-${n}`,
|
|
69
|
-
tabIndex: p ? 0 : -1,
|
|
70
|
-
"data-state": p ? "active" : "inactive",
|
|
71
|
-
"data-value": n,
|
|
72
|
-
...d ? { "aria-disabled": s || void 0 } : { disabled: s },
|
|
73
|
-
className: o(e.trigger, r),
|
|
74
|
-
onClick: () => t.setValue(n),
|
|
75
|
-
ref: u,
|
|
76
|
-
...f,
|
|
77
|
-
children: i
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
function h(e) {
|
|
81
|
-
return /* @__PURE__ */ l(u.Consumer, { children: (t) => t ? /* @__PURE__ */ l(g, {
|
|
82
|
-
store: t,
|
|
83
|
-
...e
|
|
84
|
-
}) : null });
|
|
85
|
-
}
|
|
86
|
-
function g({ store: t, value: n, className: r, children: i, ...a }) {
|
|
87
|
-
return c(), t.active.value === n ? /* @__PURE__ */ l("div", {
|
|
88
|
-
role: "tabpanel",
|
|
89
|
-
id: `${t.baseId}-content-${n}`,
|
|
90
|
-
"aria-labelledby": `${t.baseId}-trigger-${n}`,
|
|
91
|
-
tabIndex: 0,
|
|
92
|
-
className: o(e.content, r),
|
|
93
|
-
...a,
|
|
94
|
-
children: i
|
|
95
|
-
}) : null;
|
|
96
|
-
}
|
|
97
|
-
//#endregion
|
|
98
|
-
export { d as Tabs, h as TabsContent, f as TabsList, p as TabsTrigger };
|
|
1
|
+
"use client";import e from"./tabs.module.js";import{createContext as t,forwardRef as n,useId as r,useRef as i}from"react";import{Slot as a,cn as o,useControllableSignal as s,useSignals as c}from"@cascivo/core";import{jsx as l}from"react/jsx-runtime";var u=t(null);function d({defaultValue:t,value:n,onValueChange:i,className:a,children:c}){let d=r(),[f]=s({value:n,defaultValue:t??``}),p={active:f,baseId:d,setValue:e=>{n===void 0&&(f.value=e),i?.(e)}};return l(u.Provider,{value:p,children:l(`div`,{className:o(e.tabs,a),children:c})})}function f({className:t,children:n,...r}){let a=i(null);return l(u.Consumer,{children:i=>l(`div`,{ref:a,role:`tablist`,className:o(e.list,t),onKeyDown:e=>{if(!i||![`ArrowRight`,`ArrowLeft`,`Home`,`End`].includes(e.key))return;let t=Array.from(a.current?.querySelectorAll(`[role="tab"]:not([disabled])`)??[]);if(t.length===0)return;e.preventDefault();let n=t.findIndex(e=>e.dataset.value===i.active.value),r=n;e.key===`ArrowRight`?r=(n+1)%t.length:e.key===`ArrowLeft`?r=(n-1+t.length)%t.length:e.key===`Home`?r=0:e.key===`End`&&(r=t.length-1);let o=t[r];o?.focus(),o?.dataset.value&&i.setValue(o.dataset.value)},...r,children:n})})}var p=n(function(e,t){return l(u.Consumer,{children:n=>n?l(m,{store:n,buttonRef:t,...e}):null})});function m({store:t,value:n,className:r,children:i,disabled:s,buttonRef:u,asChild:d=!1,...f}){c();let p=t.active.value===n;return l(d?a:`button`,{type:d?void 0:`button`,role:`tab`,id:`${t.baseId}-trigger-${n}`,"aria-selected":p,"aria-controls":`${t.baseId}-content-${n}`,tabIndex:p?0:-1,"data-state":p?`active`:`inactive`,"data-value":n,...d?{"aria-disabled":s||void 0}:{disabled:s},className:o(e.trigger,r),onClick:()=>t.setValue(n),ref:u,...f,children:i})}function h(e){return l(u.Consumer,{children:t=>t?l(g,{store:t,...e}):null})}function g({store:t,value:n,className:r,children:i,...a}){return c(),t.active.value===n?l(`div`,{role:`tabpanel`,id:`${t.baseId}-content-${n}`,"aria-labelledby":`${t.baseId}-trigger-${n}`,tabIndex:0,className:o(e.content,r),...a,children:i}):null}export{d as Tabs,h as TabsContent,f as TabsList,p as TabsTrigger};
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
tabs: "_tabs_1i48y_2",
|
|
3
|
-
list: "_list_1i48y_8",
|
|
4
|
-
trigger: "_trigger_1i48y_20",
|
|
5
|
-
content: "_content_1i48y_68"
|
|
6
|
-
};
|
|
7
|
-
//#endregion
|
|
8
|
-
export { e as default };
|
|
1
|
+
var e={tabs:`_tabs_1i48y_2`,list:`_list_1i48y_8`,trigger:`_trigger_1i48y_20`,content:`_content_1i48y_68`};export{e as default};
|
package/dist/node/tag/tag.js
CHANGED
|
@@ -1,33 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./tag.module.js";
|
|
4
|
-
import { cn as t, normalizeTone 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/tag/tag.tsx
|
|
8
|
-
var c = {
|
|
9
|
-
neutral: "default",
|
|
10
|
-
info: "info",
|
|
11
|
-
success: "success",
|
|
12
|
-
warning: "warning",
|
|
13
|
-
danger: "error"
|
|
14
|
-
};
|
|
15
|
-
function l({ variant: l = "default", size: u = "md", onDismiss: d, dismissLabel: f, className: p, children: m, ...h }) {
|
|
16
|
-
r();
|
|
17
|
-
let g = f ?? a(i.tag.dismiss);
|
|
18
|
-
return /* @__PURE__ */ s("span", {
|
|
19
|
-
"data-variant": c[n(l)] ?? l,
|
|
20
|
-
"data-size": u,
|
|
21
|
-
className: t(e.tag, p),
|
|
22
|
-
...h,
|
|
23
|
-
children: [m, d && /* @__PURE__ */ o("button", {
|
|
24
|
-
type: "button",
|
|
25
|
-
className: e.dismiss,
|
|
26
|
-
"aria-label": g,
|
|
27
|
-
onClick: d,
|
|
28
|
-
children: "✕"
|
|
29
|
-
})]
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
//#endregion
|
|
33
|
-
export { l as Tag };
|
|
1
|
+
"use client";import e from"./tag.module.js";import{cn as t,normalizeTone 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={neutral:`default`,info:`info`,success:`success`,warning:`warning`,danger:`error`};function l({variant:l=`default`,size:u=`md`,onDismiss:d,dismissLabel:f,className:p,children:m,...h}){r();let g=f??a(i.tag.dismiss);return s(`span`,{"data-variant":c[n(l)]??l,"data-size":u,className:t(e.tag,p),...h,children:[m,d&&o(`button`,{type:`button`,className:e.dismiss,"aria-label":g,onClick:d,children:`✕`})]})}export{l as Tag};
|
|
@@ -1,64 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./tags-input.module.js";
|
|
4
|
-
import { useRef as t } from "react";
|
|
5
|
-
import { cn as n, focusElement as r, useSignal as i, useSignals 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/tags-input/tags-input.tsx
|
|
9
|
-
function u({ value: u, onValueChange: d, placeholder: f, validate: p, max: m, disabled: h = !1, className: g, ..._ }) {
|
|
10
|
-
a();
|
|
11
|
-
let v = i(""), y = t(null);
|
|
12
|
-
function b(e) {
|
|
13
|
-
let t = e.trim();
|
|
14
|
-
t && (m !== void 0 && u.length >= m || u.includes(t) || p && !p(t) || (d([...u, t]), v.value = ""));
|
|
15
|
-
}
|
|
16
|
-
function x(e) {
|
|
17
|
-
d(u.filter((t, n) => n !== e));
|
|
18
|
-
}
|
|
19
|
-
let S = f ?? s(o.tagsInput.placeholder);
|
|
20
|
-
return /* @__PURE__ */ l("div", {
|
|
21
|
-
className: n(e.wrapper, g),
|
|
22
|
-
"data-disabled": h ? "" : void 0,
|
|
23
|
-
onClick: () => r(y.current),
|
|
24
|
-
..._,
|
|
25
|
-
children: [u.map((t, n) => {
|
|
26
|
-
let r = p ? !p(t) : !1;
|
|
27
|
-
return /* @__PURE__ */ l("span", {
|
|
28
|
-
className: e.tag,
|
|
29
|
-
"data-state": r ? "invalid" : void 0,
|
|
30
|
-
children: [t, /* @__PURE__ */ c("button", {
|
|
31
|
-
type: "button",
|
|
32
|
-
className: e.dismiss,
|
|
33
|
-
"aria-label": s(o.tagsInput.remove, { tag: t }),
|
|
34
|
-
disabled: h,
|
|
35
|
-
onClick: (e) => {
|
|
36
|
-
e.stopPropagation(), x(n);
|
|
37
|
-
},
|
|
38
|
-
children: /* @__PURE__ */ c("span", {
|
|
39
|
-
"aria-hidden": "true",
|
|
40
|
-
children: "×"
|
|
41
|
-
})
|
|
42
|
-
})]
|
|
43
|
-
}, n);
|
|
44
|
-
}), /* @__PURE__ */ c("input", {
|
|
45
|
-
ref: y,
|
|
46
|
-
className: e.input,
|
|
47
|
-
value: v.value,
|
|
48
|
-
"aria-label": s(o.tagsInput.label),
|
|
49
|
-
placeholder: u.length === 0 ? S : void 0,
|
|
50
|
-
disabled: h,
|
|
51
|
-
onChange: (e) => {
|
|
52
|
-
v.value = e.currentTarget.value;
|
|
53
|
-
},
|
|
54
|
-
onKeyDown: (e) => {
|
|
55
|
-
e.key === "Enter" || e.key === "," ? (e.preventDefault(), b(v.value)) : e.key === "Backspace" && !v.value && x(u.length - 1);
|
|
56
|
-
},
|
|
57
|
-
onBlur: () => {
|
|
58
|
-
v.value && b(v.value);
|
|
59
|
-
}
|
|
60
|
-
})]
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
//#endregion
|
|
64
|
-
export { u as TagsInput };
|
|
1
|
+
"use client";import e from"./tags-input.module.js";import{useRef as t}from"react";import{cn as n,focusElement as r,useSignal as i,useSignals 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({value:u,onValueChange:d,placeholder:f,validate:p,max:m,disabled:h=!1,className:g,id:_,ariaLabel:v,label:y,"aria-labelledby":b,"aria-describedby":x,"aria-invalid":S,...C}){a();let w=i(``),T=t(null),E=v??y??(b===void 0?s(o.tagsInput.label):void 0);function D(e){let t=e.trim();t&&(m!==void 0&&u.length>=m||u.includes(t)||p&&!p(t)||(d([...u,t]),w.value=``))}function O(e){d(u.filter((t,n)=>n!==e))}let k=f??s(o.tagsInput.placeholder);return l(`div`,{className:n(e.wrapper,g),"data-disabled":h?``:void 0,onClick:()=>r(T.current),...C,children:[u.map((t,n)=>{let r=p?!p(t):!1;return l(`span`,{className:e.tag,"data-state":r?`invalid`:void 0,children:[t,c(`button`,{type:`button`,className:e.dismiss,"aria-label":s(o.tagsInput.remove,{tag:t}),disabled:h,onClick:e=>{e.stopPropagation(),O(n)},children:c(`span`,{"aria-hidden":`true`,children:`×`})})]},n)}),c(`input`,{ref:T,className:e.input,value:w.value,id:_,"aria-labelledby":b,"aria-describedby":x,"aria-invalid":S,"aria-label":E,placeholder:u.length===0?k:void 0,disabled:h,onChange:e=>{w.value=e.currentTarget.value},onKeyDown:e=>{e.key===`Enter`||e.key===`,`?(e.preventDefault(),D(w.value)):e.key===`Backspace`&&!w.value&&O(u.length-1)},onBlur:()=>{w.value&&D(w.value)}})]})}export{u as TagsInput};
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
wrapper: "_wrapper_1w754_2",
|
|
3
|
-
tag: "_tag_1w754_32",
|
|
4
|
-
dismiss: "_dismiss_1w754_59",
|
|
5
|
-
input: "_input_1w754_89"
|
|
6
|
-
};
|
|
7
|
-
//#endregion
|
|
8
|
-
export { e as default };
|
|
1
|
+
var e={wrapper:`_wrapper_1w754_2`,tag:`_tag_1w754_32`,dismiss:`_dismiss_1w754_59`,input:`_input_1w754_89`};export{e as default};
|
package/dist/node/text/text.js
CHANGED
|
@@ -1,16 +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/text/text.tsx
|
|
5
|
-
function r({ as: r = "p", size: i = "md", weight: a = "normal", muted: o = !1, className: s, children: c, ...l }) {
|
|
6
|
-
return /* @__PURE__ */ n(r, {
|
|
7
|
-
"data-size": i,
|
|
8
|
-
"data-weight": a,
|
|
9
|
-
"data-muted": o ? "" : void 0,
|
|
10
|
-
className: t(e.text, s),
|
|
11
|
-
...l,
|
|
12
|
-
children: c
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
export { r as Text };
|
|
1
|
+
import e from"./text.module.js";import{cn as t}from"@cascivo/core/pure";import{jsx as n}from"react/jsx-runtime";function r({as:r=`p`,size:i=`md`,weight:a=`normal`,muted:o=!1,className:s,children:c,...l}){return n(r,{"data-size":i,"data-weight":a,"data-muted":o?``:void 0,className:t(e.text,s),...l,children:c})}export{r as Text};
|