@cascivo/react 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/dist/accordion/accordion.js +1 -114
- package/dist/accordion/accordion.module.js +1 -10
- package/dist/action-sheet/action-sheet.css +1 -1
- package/dist/action-sheet/action-sheet.js +1 -91
- package/dist/action-sheet/action-sheet.module.js +1 -12
- package/dist/alert/alert.js +1 -55
- package/dist/alert/alert.module.js +1 -11
- package/dist/alert-dialog/alert-dialog.css +1 -1
- package/dist/alert-dialog/alert-dialog.js +1 -66
- package/dist/alert-dialog/alert-dialog.module.js +1 -11
- package/dist/app-shell/app-shell.css +1 -1
- package/dist/app-shell/app-shell.js +1 -85
- package/dist/app-shell/app-shell.module.js +1 -12
- package/dist/aspect-ratio/aspect-ratio.js +1 -20
- package/dist/aspect-ratio/aspect-ratio.module.js +1 -6
- package/dist/avatar/avatar.js +1 -57
- package/dist/avatar/avatar.module.js +1 -8
- package/dist/avatar-group/avatar-group.js +1 -24
- package/dist/avatar-group/avatar-group.module.js +1 -6
- package/dist/badge/badge.js +1 -22
- package/dist/badge/badge.module.js +1 -3
- package/dist/blockquote/blockquote.js +1 -16
- package/dist/blockquote/blockquote.module.js +1 -6
- package/dist/bottom-sheet/bottom-sheet.js +1 -111
- package/dist/bottom-sheet/bottom-sheet.module.js +1 -14
- package/dist/brand/logo/logo.css +1 -0
- package/dist/brand/logo/logo.js +1 -0
- package/dist/brand/logo/logo.module.js +2 -0
- package/dist/breadcrumb/breadcrumb.js +1 -28
- package/dist/breadcrumb/breadcrumb.module.js +1 -3
- package/dist/button/button.css +1 -1
- package/dist/button/button.js +1 -35
- package/dist/button/button.module.js +1 -6
- package/dist/button-group/button-group.js +1 -39
- package/dist/button-group/button-group.module.js +1 -3
- package/dist/calendar/calendar-date.js +1 -0
- package/dist/calendar/calendar.css +1 -1
- package/dist/calendar/calendar.js +1 -199
- package/dist/calendar/calendar.module.js +1 -14
- package/dist/card/card.js +1 -53
- package/dist/card/card.module.js +1 -12
- package/dist/carousel/carousel.css +1 -1
- package/dist/carousel/carousel.js +1 -138
- package/dist/carousel/carousel.module.js +1 -13
- package/dist/chat-bubble/chat-bubble.js +1 -31
- package/dist/chat-bubble/chat-bubble.module.js +1 -11
- package/dist/checkbox/checkbox.js +1 -39
- package/dist/checkbox/checkbox.module.js +1 -8
- package/dist/checkbox-card/checkbox-card.css +1 -1
- package/dist/checkbox-card/checkbox-card.js +1 -50
- package/dist/checkbox-card/checkbox-card.module.js +1 -11
- package/dist/code/code.js +1 -14
- package/dist/code/code.module.js +1 -3
- package/dist/code-snippet/code-snippet.js +2 -121
- package/dist/code-snippet/code-snippet.module.js +1 -17
- package/dist/code-snippet/highlight.js +1 -67
- package/dist/collapsible/collapsible.js +1 -47
- package/dist/collapsible/collapsible.module.js +1 -7
- package/dist/color-picker/color-picker.css +1 -1
- package/dist/color-picker/color-picker.js +1 -272
- package/dist/color-picker/color-picker.module.js +1 -18
- package/dist/color-picker/color.js +1 -0
- package/dist/combobox/combobox.css +1 -1
- package/dist/combobox/combobox.js +1 -170
- package/dist/combobox/combobox.module.js +1 -19
- package/dist/combobox/list-nav.js +1 -0
- package/dist/combobox/option-list.js +1 -0
- package/dist/command-menu/command-menu.js +1 -421
- package/dist/command-menu/command-menu.module.js +1 -34
- package/dist/comparison/comparison.js +1 -69
- package/dist/comparison/comparison.module.js +1 -9
- package/dist/contained-list/contained-list.js +1 -41
- package/dist/contained-list/contained-list.module.js +1 -11
- package/dist/context-menu/context-menu.js +1 -93
- package/dist/context-menu/context-menu.module.js +1 -7
- package/dist/copy-button/copy-button.js +1 -60
- package/dist/copy-button/copy-button.module.js +1 -6
- package/dist/data-list/data-list.js +1 -25
- package/dist/data-list/data-list.module.js +1 -8
- package/dist/data-table/column-filter.js +1 -0
- package/dist/data-table/column-layout.js +1 -0
- package/dist/data-table/data-table.css +1 -1
- package/dist/data-table/data-table.js +1 -398
- package/dist/data-table/data-table.module.js +1 -33
- package/dist/data-table/grid-keys.js +1 -0
- package/dist/data-table/row-group.js +1 -0
- package/dist/data-table/row-search.js +1 -0
- package/dist/data-table/row-sort.js +1 -0
- package/dist/data-table/to-csv.js +3 -0
- package/dist/data-table/virtual-window.js +1 -0
- package/dist/date-picker/date-picker.css +1 -1
- package/dist/date-picker/date-picker.js +1 -224
- package/dist/date-picker/date-picker.module.js +1 -23
- package/dist/date-picker/parse-date.js +1 -0
- package/dist/date-range-picker/date-range-picker.js +1 -196
- package/dist/date-range-picker/date-range-picker.module.js +1 -18
- package/dist/dock/dock.css +1 -1
- package/dist/dock/dock.js +1 -34
- package/dist/dock/dock.module.js +1 -8
- package/dist/drawer/drawer.js +1 -96
- package/dist/drawer/drawer.module.js +1 -13
- package/dist/dropdown/dropdown.css +1 -1
- package/dist/dropdown/dropdown.js +1 -110
- package/dist/dropdown/dropdown.module.js +1 -9
- package/dist/editable/editable.js +1 -76
- package/dist/editable/editable.module.js +1 -11
- package/dist/empty-state/empty-state.js +1 -32
- package/dist/empty-state/empty-state.module.js +1 -9
- package/dist/fab/fab.css +1 -1
- package/dist/fab/fab.js +1 -93
- package/dist/fab/fab.module.js +1 -12
- package/dist/field/field.css +1 -1
- package/dist/field/field.js +1 -53
- package/dist/field/field.module.js +1 -7
- package/dist/file-uploader/file-uploader.css +1 -1
- package/dist/file-uploader/file-uploader.js +1 -123
- package/dist/file-uploader/file-uploader.module.js +1 -18
- package/dist/filter/filter.css +1 -1
- package/dist/filter/filter.js +1 -35
- package/dist/filter/filter.module.js +1 -6
- package/dist/form/form.js +1 -95
- package/dist/form/form.module.js +1 -3
- package/dist/header/header.js +1 -44
- package/dist/header/header.module.js +1 -11
- package/dist/header-panel/header-panel.js +1 -72
- package/dist/header-panel/header-panel.module.js +1 -9
- package/dist/heading/heading.css +1 -1
- package/dist/heading/heading.js +1 -22
- package/dist/heading/heading.module.js +1 -3
- package/dist/hover-card/hover-card.css +1 -1
- package/dist/hover-card/hover-card.js +1 -84
- package/dist/hover-card/hover-card.module.js +1 -6
- package/dist/icon-button/icon-button.js +1 -19
- package/dist/icon-button/icon-button.module.js +1 -3
- package/dist/image/image.css +1 -1
- package/dist/image/image.js +1 -64
- package/dist/image/image.module.js +1 -9
- package/dist/index.d.ts +772 -25
- package/dist/indicator/indicator.js +1 -16
- package/dist/indicator/indicator.module.js +1 -6
- package/dist/infinite-scroll/infinite-scroll.js +1 -49
- package/dist/infinite-scroll/infinite-scroll.module.js +1 -7
- package/dist/inline-loading/inline-loading.js +1 -74
- package/dist/inline-loading/inline-loading.module.js +1 -9
- package/dist/input/input.css +1 -1
- package/dist/input/input.js +1 -56
- package/dist/input/input.module.js +1 -9
- package/dist/input-group/input-group.css +1 -1
- package/dist/input-group/input-group.js +1 -39
- package/dist/input-group/input-group.module.js +1 -9
- package/dist/item/item.js +1 -50
- package/dist/item/item.module.js +1 -10
- package/dist/join/join.js +1 -12
- package/dist/join/join.module.js +1 -3
- package/dist/kbd/kbd.js +1 -14
- package/dist/kbd/kbd.module.js +1 -3
- package/dist/label/label.js +1 -23
- package/dist/label/label.module.js +1 -7
- package/dist/large-title-header/large-title-header.js +1 -38
- package/dist/large-title-header/large-title-header.module.js +1 -12
- package/dist/layouts/src/auto-grid/auto-grid.js +1 -17
- package/dist/layouts/src/auto-grid/auto-grid.module.js +1 -4
- package/dist/layouts/src/center/center.js +1 -16
- package/dist/layouts/src/center/center.module.js +1 -3
- package/dist/layouts/src/columns/columns.js +1 -21
- package/dist/layouts/src/columns/columns.module.js +1 -6
- package/dist/layouts/src/flex/flex.js +1 -20
- package/dist/layouts/src/flex/flex.module.js +1 -3
- package/dist/layouts/src/grid/grid.css +1 -1
- package/dist/layouts/src/grid/grid.js +1 -55
- package/dist/layouts/src/grid/grid.module.js +1 -7
- package/dist/layouts/src/page-header/page-header.js +1 -31
- package/dist/layouts/src/page-header/page-header.module.js +1 -10
- package/dist/layouts/src/spacer/spacer.js +1 -17
- package/dist/layouts/src/spacer/spacer.module.js +1 -3
- package/dist/link/link.css +1 -1
- package/dist/link/link.js +1 -22
- package/dist/link/link.module.js +1 -3
- package/dist/list/list.js +1 -21
- package/dist/list/list.module.js +1 -6
- package/dist/log-viewer/log-viewer.css +1 -1
- package/dist/log-viewer/log-viewer.js +2 -184
- package/dist/log-viewer/log-viewer.module.js +1 -16
- package/dist/menu/menu.js +1 -126
- package/dist/menu/menu.module.js +1 -8
- package/dist/menu-button/menu-button.js +1 -92
- package/dist/menu-button/menu-button.module.js +1 -8
- package/dist/menubar/menubar.js +1 -103
- package/dist/menubar/menubar.module.js +1 -8
- package/dist/modal/modal.css +1 -1
- package/dist/modal/modal.js +1 -76
- package/dist/modal/modal.module.js +1 -12
- package/dist/multi-select/list-nav.js +1 -0
- package/dist/multi-select/multi-select.css +1 -1
- package/dist/multi-select/multi-select.js +1 -106
- package/dist/multi-select/multi-select.module.js +1 -15
- package/dist/multi-select/option-list.js +1 -0
- package/dist/native-select/native-select.css +1 -1
- package/dist/native-select/native-select.js +1 -37
- package/dist/native-select/native-select.module.js +1 -7
- package/dist/navigation-menu/navigation-menu.js +1 -99
- package/dist/navigation-menu/navigation-menu.module.js +1 -10
- package/dist/node/accordion/accordion.js +1 -114
- package/dist/node/accordion/accordion.module.js +1 -10
- package/dist/node/action-sheet/action-sheet.js +1 -91
- package/dist/node/action-sheet/action-sheet.module.js +1 -12
- package/dist/node/alert/alert.js +1 -55
- package/dist/node/alert/alert.module.js +1 -11
- package/dist/node/alert-dialog/alert-dialog.js +1 -66
- package/dist/node/alert-dialog/alert-dialog.module.js +1 -11
- package/dist/node/app-shell/app-shell.js +1 -85
- package/dist/node/app-shell/app-shell.module.js +1 -12
- package/dist/node/aspect-ratio/aspect-ratio.js +1 -20
- package/dist/node/aspect-ratio/aspect-ratio.module.js +1 -6
- package/dist/node/avatar/avatar.js +1 -57
- package/dist/node/avatar/avatar.module.js +1 -8
- package/dist/node/avatar-group/avatar-group.js +1 -24
- package/dist/node/avatar-group/avatar-group.module.js +1 -6
- package/dist/node/badge/badge.js +1 -22
- package/dist/node/badge/badge.module.js +1 -3
- package/dist/node/blockquote/blockquote.js +1 -16
- package/dist/node/blockquote/blockquote.module.js +1 -6
- package/dist/node/bottom-sheet/bottom-sheet.js +1 -111
- package/dist/node/bottom-sheet/bottom-sheet.module.js +1 -14
- package/dist/node/brand/logo/logo.js +1 -0
- package/dist/node/brand/logo/logo.module.js +1 -0
- package/dist/node/breadcrumb/breadcrumb.js +1 -28
- package/dist/node/breadcrumb/breadcrumb.module.js +1 -3
- package/dist/node/button/button.js +1 -35
- package/dist/node/button/button.module.js +1 -6
- package/dist/node/button-group/button-group.js +1 -39
- package/dist/node/button-group/button-group.module.js +1 -3
- package/dist/node/calendar/calendar-date.js +1 -0
- package/dist/node/calendar/calendar.js +1 -199
- package/dist/node/calendar/calendar.module.js +1 -14
- package/dist/node/card/card.js +1 -53
- package/dist/node/card/card.module.js +1 -12
- package/dist/node/carousel/carousel.js +1 -138
- package/dist/node/carousel/carousel.module.js +1 -13
- package/dist/node/chat-bubble/chat-bubble.js +1 -31
- package/dist/node/chat-bubble/chat-bubble.module.js +1 -11
- package/dist/node/checkbox/checkbox.js +1 -39
- package/dist/node/checkbox/checkbox.module.js +1 -8
- package/dist/node/checkbox-card/checkbox-card.js +1 -50
- package/dist/node/checkbox-card/checkbox-card.module.js +1 -11
- package/dist/node/code/code.js +1 -14
- package/dist/node/code/code.module.js +1 -3
- package/dist/node/code-snippet/code-snippet.js +2 -121
- package/dist/node/code-snippet/code-snippet.module.js +1 -17
- package/dist/node/code-snippet/highlight.js +1 -67
- package/dist/node/collapsible/collapsible.js +1 -47
- package/dist/node/collapsible/collapsible.module.js +1 -7
- package/dist/node/color-picker/color-picker.js +1 -272
- package/dist/node/color-picker/color-picker.module.js +1 -18
- package/dist/node/color-picker/color.js +1 -0
- package/dist/node/combobox/combobox.js +1 -170
- package/dist/node/combobox/combobox.module.js +1 -19
- package/dist/node/combobox/list-nav.js +1 -0
- package/dist/node/combobox/option-list.js +1 -0
- package/dist/node/command-menu/command-menu.js +1 -421
- package/dist/node/command-menu/command-menu.module.js +1 -34
- package/dist/node/comparison/comparison.js +1 -69
- package/dist/node/comparison/comparison.module.js +1 -9
- package/dist/node/contained-list/contained-list.js +1 -41
- package/dist/node/contained-list/contained-list.module.js +1 -11
- package/dist/node/context-menu/context-menu.js +1 -93
- package/dist/node/context-menu/context-menu.module.js +1 -7
- package/dist/node/copy-button/copy-button.js +1 -60
- package/dist/node/copy-button/copy-button.module.js +1 -6
- package/dist/node/data-list/data-list.js +1 -25
- package/dist/node/data-list/data-list.module.js +1 -8
- package/dist/node/data-table/column-filter.js +1 -0
- package/dist/node/data-table/column-layout.js +1 -0
- package/dist/node/data-table/data-table.js +1 -398
- package/dist/node/data-table/data-table.module.js +1 -33
- package/dist/node/data-table/grid-keys.js +1 -0
- package/dist/node/data-table/row-group.js +1 -0
- package/dist/node/data-table/row-search.js +1 -0
- package/dist/node/data-table/row-sort.js +1 -0
- package/dist/node/data-table/to-csv.js +3 -0
- package/dist/node/data-table/virtual-window.js +1 -0
- package/dist/node/date-picker/date-picker.js +1 -224
- package/dist/node/date-picker/date-picker.module.js +1 -23
- package/dist/node/date-picker/parse-date.js +1 -0
- package/dist/node/date-range-picker/date-range-picker.js +1 -196
- package/dist/node/date-range-picker/date-range-picker.module.js +1 -18
- package/dist/node/dock/dock.js +1 -34
- package/dist/node/dock/dock.module.js +1 -8
- package/dist/node/drawer/drawer.js +1 -96
- package/dist/node/drawer/drawer.module.js +1 -13
- package/dist/node/dropdown/dropdown.js +1 -110
- package/dist/node/dropdown/dropdown.module.js +1 -9
- package/dist/node/editable/editable.js +1 -76
- package/dist/node/editable/editable.module.js +1 -11
- package/dist/node/empty-state/empty-state.js +1 -32
- package/dist/node/empty-state/empty-state.module.js +1 -9
- package/dist/node/fab/fab.js +1 -93
- package/dist/node/fab/fab.module.js +1 -12
- package/dist/node/field/field.js +1 -53
- package/dist/node/field/field.module.js +1 -7
- package/dist/node/file-uploader/file-uploader.js +1 -123
- package/dist/node/file-uploader/file-uploader.module.js +1 -18
- package/dist/node/filter/filter.js +1 -35
- package/dist/node/filter/filter.module.js +1 -6
- package/dist/node/form/form.js +1 -95
- package/dist/node/form/form.module.js +1 -3
- package/dist/node/header/header.js +1 -44
- package/dist/node/header/header.module.js +1 -11
- package/dist/node/header-panel/header-panel.js +1 -72
- package/dist/node/header-panel/header-panel.module.js +1 -9
- package/dist/node/heading/heading.js +1 -22
- package/dist/node/heading/heading.module.js +1 -3
- package/dist/node/hover-card/hover-card.js +1 -84
- package/dist/node/hover-card/hover-card.module.js +1 -6
- package/dist/node/icon-button/icon-button.js +1 -19
- package/dist/node/icon-button/icon-button.module.js +1 -3
- package/dist/node/image/image.js +1 -64
- package/dist/node/image/image.module.js +1 -9
- package/dist/node/indicator/indicator.js +1 -16
- package/dist/node/indicator/indicator.module.js +1 -6
- package/dist/node/infinite-scroll/infinite-scroll.js +1 -49
- package/dist/node/infinite-scroll/infinite-scroll.module.js +1 -7
- package/dist/node/inline-loading/inline-loading.js +1 -74
- package/dist/node/inline-loading/inline-loading.module.js +1 -9
- package/dist/node/input/input.js +1 -56
- package/dist/node/input/input.module.js +1 -9
- package/dist/node/input-group/input-group.js +1 -39
- package/dist/node/input-group/input-group.module.js +1 -9
- package/dist/node/item/item.js +1 -50
- package/dist/node/item/item.module.js +1 -10
- package/dist/node/join/join.js +1 -12
- package/dist/node/join/join.module.js +1 -3
- package/dist/node/kbd/kbd.js +1 -14
- package/dist/node/kbd/kbd.module.js +1 -3
- package/dist/node/label/label.js +1 -23
- package/dist/node/label/label.module.js +1 -7
- package/dist/node/large-title-header/large-title-header.js +1 -38
- package/dist/node/large-title-header/large-title-header.module.js +1 -12
- package/dist/node/layouts/src/auto-grid/auto-grid.js +1 -17
- package/dist/node/layouts/src/auto-grid/auto-grid.module.js +1 -4
- package/dist/node/layouts/src/center/center.js +1 -16
- package/dist/node/layouts/src/center/center.module.js +1 -3
- package/dist/node/layouts/src/columns/columns.js +1 -21
- package/dist/node/layouts/src/columns/columns.module.js +1 -6
- package/dist/node/layouts/src/flex/flex.js +1 -20
- package/dist/node/layouts/src/flex/flex.module.js +1 -3
- package/dist/node/layouts/src/grid/grid.js +1 -55
- package/dist/node/layouts/src/grid/grid.module.js +1 -7
- package/dist/node/layouts/src/page-header/page-header.js +1 -31
- package/dist/node/layouts/src/page-header/page-header.module.js +1 -10
- package/dist/node/layouts/src/spacer/spacer.js +1 -17
- package/dist/node/layouts/src/spacer/spacer.module.js +1 -3
- package/dist/node/link/link.js +1 -22
- package/dist/node/link/link.module.js +1 -3
- package/dist/node/list/list.js +1 -21
- package/dist/node/list/list.module.js +1 -6
- package/dist/node/log-viewer/log-viewer.js +2 -184
- package/dist/node/log-viewer/log-viewer.module.js +1 -16
- package/dist/node/menu/menu.js +1 -126
- package/dist/node/menu/menu.module.js +1 -8
- package/dist/node/menu-button/menu-button.js +1 -92
- package/dist/node/menu-button/menu-button.module.js +1 -8
- package/dist/node/menubar/menubar.js +1 -103
- package/dist/node/menubar/menubar.module.js +1 -8
- package/dist/node/modal/modal.js +1 -76
- package/dist/node/modal/modal.module.js +1 -12
- package/dist/node/multi-select/list-nav.js +1 -0
- package/dist/node/multi-select/multi-select.js +1 -106
- package/dist/node/multi-select/multi-select.module.js +1 -15
- package/dist/node/multi-select/option-list.js +1 -0
- package/dist/node/native-select/native-select.js +1 -37
- package/dist/node/native-select/native-select.module.js +1 -7
- package/dist/node/navigation-menu/navigation-menu.js +1 -99
- package/dist/node/navigation-menu/navigation-menu.module.js +1 -10
- package/dist/node/notification/notification.js +1 -140
- package/dist/node/notification/notification.module.js +1 -11
- package/dist/node/number-input/number-input.js +1 -148
- package/dist/node/number-input/number-input.module.js +1 -12
- package/dist/node/otp-input/otp-input.js +1 -70
- package/dist/node/otp-input/otp-input.module.js +1 -6
- package/dist/node/overflow-menu/overflow-menu.js +1 -70
- package/dist/node/overflow-menu/overflow-menu.module.js +1 -7
- package/dist/node/pagination/pagination.js +1 -92
- package/dist/node/pagination/pagination.module.js +1 -11
- package/dist/node/password-input/password-input.js +1 -81
- package/dist/node/password-input/password-input.module.js +1 -11
- package/dist/node/popover/popover.js +1 -51
- package/dist/node/popover/popover.module.js +1 -6
- package/dist/node/popover/use-popover.js +1 -55
- package/dist/node/progress/progress.js +1 -16
- package/dist/node/progress/progress.module.js +1 -6
- package/dist/node/progress-bar/progress-bar.js +1 -42
- package/dist/node/progress-bar/progress-bar.module.js +1 -11
- package/dist/node/progress-circle/progress-circle.js +1 -46
- package/dist/node/progress-circle/progress-circle.module.js +1 -9
- package/dist/node/progress-indicator/progress-indicator.js +1 -34
- package/dist/node/progress-indicator/progress-indicator.module.js +1 -10
- package/dist/node/prose/prose.js +1 -13
- package/dist/node/prose/prose.module.js +1 -3
- package/dist/node/pull-to-refresh/pull-to-refresh.js +1 -82
- package/dist/node/pull-to-refresh/pull-to-refresh.module.js +1 -9
- package/dist/node/qr-code/encode.js +1 -583
- package/dist/node/qr-code/qr-code.js +1 -41
- package/dist/node/qr-code/qr-code.module.js +1 -6
- package/dist/node/radial-progress/radial-progress.js +1 -27
- package/dist/node/radial-progress/radial-progress.module.js +1 -6
- package/dist/node/radio/radio.js +1 -49
- package/dist/node/radio/radio.module.js +1 -9
- package/dist/node/radio-card/radio-card.js +1 -64
- package/dist/node/radio-card/radio-card.module.js +1 -11
- package/dist/node/rating-group/rating-group.js +1 -37
- package/dist/node/rating-group/rating-group.module.js +1 -6
- package/dist/node/react/src/index.js +1 -141
- package/dist/node/relative-time/relative-time.js +1 -66
- package/dist/node/relative-time/relative-time.module.js +1 -3
- package/dist/node/reorder-list/reorder-list.js +1 -143
- package/dist/node/reorder-list/reorder-list.module.js +1 -11
- package/dist/node/resizable/resizable.js +1 -80
- package/dist/node/resizable/resizable.module.js +1 -8
- package/dist/node/scroll-area/scroll-area.js +1 -38
- package/dist/node/scroll-area/scroll-area.module.js +1 -3
- package/dist/node/search/search.js +1 -96
- package/dist/node/search/search.module.js +1 -9
- package/dist/node/segmented-control/segmented-control.js +1 -43
- package/dist/node/segmented-control/segmented-control.module.js +1 -6
- package/dist/node/select/select.js +1 -73
- package/dist/node/select/select.module.js +1 -11
- package/dist/node/separator/separator.js +1 -19
- package/dist/node/separator/separator.module.js +1 -3
- package/dist/node/sheet/sheet.js +1 -49
- package/dist/node/sheet/sheet.module.js +1 -9
- package/dist/node/shell-header/shell-header.js +1 -169
- package/dist/node/shell-header/shell-header.module.js +1 -24
- package/dist/node/side-nav/side-nav.js +1 -334
- package/dist/node/side-nav/side-nav.module.js +1 -31
- package/dist/node/skeleton/skeleton.js +1 -23
- package/dist/node/skeleton/skeleton.module.js +1 -7
- package/dist/node/skip-nav/skip-nav.js +1 -28
- package/dist/node/skip-nav/skip-nav.module.js +1 -3
- package/dist/node/slider/slider.js +1 -30
- package/dist/node/slider/slider.module.js +1 -7
- package/dist/node/spinner/spinner.js +1 -18
- package/dist/node/spinner/spinner.module.js +1 -6
- package/dist/node/stack/stack.js +1 -17
- package/dist/node/stack/stack.module.js +1 -6
- package/dist/node/stat/stat.js +1 -41
- package/dist/node/stat/stat.module.js +1 -11
- package/dist/node/status/status.js +1 -25
- package/dist/node/status/status.module.js +1 -7
- package/dist/node/steps/steps.js +1 -35
- package/dist/node/steps/steps.module.js +1 -8
- package/dist/node/structured-list/structured-list.js +1 -102
- package/dist/node/structured-list/structured-list.module.js +1 -12
- package/dist/node/swap/swap.js +1 -36
- package/dist/node/swap/swap.module.js +1 -7
- package/dist/node/swipe-item/swipe-item.js +1 -62
- package/dist/node/swipe-item/swipe-item.module.js +1 -12
- package/dist/node/switcher/switcher.js +1 -32
- package/dist/node/switcher/switcher.module.js +1 -8
- package/dist/node/tabs/tabs.js +1 -98
- package/dist/node/tabs/tabs.module.js +1 -8
- package/dist/node/tag/tag.js +1 -33
- package/dist/node/tag/tag.module.js +1 -6
- package/dist/node/tags-input/tags-input.js +1 -68
- package/dist/node/tags-input/tags-input.module.js +1 -8
- package/dist/node/text/text.js +1 -16
- package/dist/node/text/text.module.js +1 -3
- package/dist/node/textarea/textarea.js +1 -58
- package/dist/node/textarea/textarea.module.js +1 -9
- package/dist/node/tile/tile.js +1 -39
- package/dist/node/tile/tile.module.js +1 -7
- package/dist/node/time-picker/time-picker.js +1 -64
- package/dist/node/time-picker/time-picker.module.js +1 -9
- package/dist/node/timeline/timeline.js +1 -55
- package/dist/node/timeline/timeline.module.js +1 -11
- package/dist/node/toast/toast.js +1 -85
- package/dist/node/toast/toast.module.js +1 -11
- package/dist/node/toc/toc.js +1 -43
- package/dist/node/toc/toc.module.js +1 -3
- package/dist/node/toc/use-toc-from-region.js +1 -18
- package/dist/node/toggle/toggle.js +1 -42
- package/dist/node/toggle/toggle.module.js +1 -8
- package/dist/node/toggle-group/toggle-group.js +1 -55
- package/dist/node/toggle-group/toggle-group.module.js +1 -6
- package/dist/node/toggletip/toggletip.js +1 -49
- package/dist/node/toggletip/toggletip.module.js +1 -7
- package/dist/node/tooltip/tooltip.js +1 -58
- package/dist/node/tooltip/tooltip.module.js +1 -6
- package/dist/node/tree-view/tree-view.js +1 -201
- package/dist/node/tree-view/tree-view.module.js +1 -13
- package/dist/node/user/user.js +1 -35
- package/dist/node/user/user.module.js +1 -9
- package/dist/node/virtual-list/virtual-list.js +1 -40
- package/dist/node/virtual-list/virtual-list.module.js +1 -7
- package/dist/node/visually-hidden/visually-hidden.js +1 -2
- package/dist/node/wheel-picker/wheel-picker.js +1 -84
- package/dist/node/wheel-picker/wheel-picker.module.js +1 -8
- package/dist/notification/notification.js +1 -140
- package/dist/notification/notification.module.js +1 -11
- package/dist/number-input/number-input.js +1 -148
- package/dist/number-input/number-input.module.js +1 -12
- package/dist/otp-input/otp-input.js +1 -70
- package/dist/otp-input/otp-input.module.js +1 -6
- package/dist/overflow-menu/overflow-menu.js +1 -70
- package/dist/overflow-menu/overflow-menu.module.js +1 -7
- package/dist/pagination/pagination.js +1 -92
- package/dist/pagination/pagination.module.js +1 -11
- package/dist/password-input/password-input.js +1 -81
- package/dist/password-input/password-input.module.js +1 -11
- package/dist/popover/popover.js +1 -51
- package/dist/popover/popover.module.js +1 -6
- package/dist/popover/use-popover.js +1 -55
- package/dist/progress/progress.css +1 -1
- package/dist/progress/progress.js +1 -16
- package/dist/progress/progress.module.js +1 -6
- package/dist/progress-bar/progress-bar.css +1 -1
- package/dist/progress-bar/progress-bar.js +1 -42
- package/dist/progress-bar/progress-bar.module.js +1 -11
- package/dist/progress-circle/progress-circle.js +1 -46
- package/dist/progress-circle/progress-circle.module.js +1 -9
- package/dist/progress-indicator/progress-indicator.css +1 -1
- package/dist/progress-indicator/progress-indicator.js +1 -34
- package/dist/progress-indicator/progress-indicator.module.js +1 -10
- package/dist/prose/prose.css +1 -1
- package/dist/prose/prose.js +1 -13
- package/dist/prose/prose.module.js +1 -3
- package/dist/pull-to-refresh/pull-to-refresh.js +1 -82
- package/dist/pull-to-refresh/pull-to-refresh.module.js +1 -9
- package/dist/qr-code/encode.js +1 -583
- package/dist/qr-code/qr-code.js +1 -41
- package/dist/qr-code/qr-code.module.js +1 -6
- package/dist/radial-progress/radial-progress.js +1 -27
- package/dist/radial-progress/radial-progress.module.js +1 -6
- package/dist/radio/radio.js +1 -49
- package/dist/radio/radio.module.js +1 -9
- package/dist/radio-card/radio-card.css +1 -1
- package/dist/radio-card/radio-card.js +1 -64
- package/dist/radio-card/radio-card.module.js +1 -11
- package/dist/rating-group/rating-group.js +1 -37
- package/dist/rating-group/rating-group.module.js +1 -6
- package/dist/react/src/index.js +1 -141
- package/dist/relative-time/relative-time.js +1 -66
- package/dist/relative-time/relative-time.module.js +1 -3
- package/dist/reorder-list/reorder-list.css +1 -1
- package/dist/reorder-list/reorder-list.js +1 -143
- package/dist/reorder-list/reorder-list.module.js +1 -11
- package/dist/resizable/resizable.js +1 -80
- package/dist/resizable/resizable.module.js +1 -8
- package/dist/scroll-area/scroll-area.css +1 -1
- package/dist/scroll-area/scroll-area.js +1 -38
- package/dist/scroll-area/scroll-area.module.js +1 -3
- package/dist/search/search.js +1 -96
- package/dist/search/search.module.js +1 -9
- package/dist/segmented-control/segmented-control.js +1 -43
- package/dist/segmented-control/segmented-control.module.js +1 -6
- package/dist/select/select.js +1 -73
- package/dist/select/select.module.js +1 -11
- package/dist/separator/separator.js +1 -19
- package/dist/separator/separator.module.js +1 -3
- package/dist/sheet/sheet.js +1 -49
- package/dist/sheet/sheet.module.js +1 -9
- package/dist/shell-header/shell-header.css +1 -1
- package/dist/shell-header/shell-header.js +1 -169
- package/dist/shell-header/shell-header.module.js +1 -24
- package/dist/side-nav/side-nav.css +1 -1
- package/dist/side-nav/side-nav.js +1 -334
- package/dist/side-nav/side-nav.module.js +1 -31
- package/dist/skeleton/skeleton.css +1 -1
- package/dist/skeleton/skeleton.js +1 -23
- package/dist/skeleton/skeleton.module.js +1 -7
- package/dist/skip-nav/skip-nav.js +1 -28
- package/dist/skip-nav/skip-nav.module.js +1 -3
- package/dist/slider/slider.js +1 -30
- package/dist/slider/slider.module.js +1 -7
- package/dist/spinner/spinner.css +1 -1
- package/dist/spinner/spinner.js +1 -18
- package/dist/spinner/spinner.module.js +1 -6
- package/dist/stack/stack.js +1 -17
- package/dist/stack/stack.module.js +1 -6
- package/dist/stat/stat.js +1 -41
- package/dist/stat/stat.module.js +1 -11
- package/dist/status/status.css +1 -1
- package/dist/status/status.js +1 -25
- package/dist/status/status.module.js +1 -7
- package/dist/steps/steps.css +1 -1
- package/dist/steps/steps.js +1 -35
- package/dist/steps/steps.module.js +1 -8
- package/dist/structured-list/structured-list.js +1 -102
- package/dist/structured-list/structured-list.module.js +1 -12
- package/dist/styles.css +395 -53
- package/dist/swap/swap.css +1 -1
- package/dist/swap/swap.js +1 -36
- package/dist/swap/swap.module.js +1 -7
- package/dist/swipe-item/swipe-item.js +1 -62
- package/dist/swipe-item/swipe-item.module.js +1 -12
- package/dist/switcher/switcher.js +1 -32
- package/dist/switcher/switcher.module.js +1 -8
- package/dist/tabs/tabs.js +1 -98
- package/dist/tabs/tabs.module.js +1 -8
- package/dist/tag/tag.js +1 -33
- package/dist/tag/tag.module.js +1 -6
- package/dist/tags-input/tags-input.js +1 -68
- package/dist/tags-input/tags-input.module.js +1 -8
- package/dist/text/text.css +1 -1
- package/dist/text/text.js +1 -16
- package/dist/text/text.module.js +1 -3
- package/dist/textarea/textarea.css +1 -1
- package/dist/textarea/textarea.js +1 -58
- package/dist/textarea/textarea.module.js +1 -9
- package/dist/tile/tile.css +1 -1
- package/dist/tile/tile.js +1 -39
- package/dist/tile/tile.module.js +1 -7
- package/dist/time-picker/time-picker.js +1 -64
- package/dist/time-picker/time-picker.module.js +1 -9
- package/dist/timeline/timeline.js +1 -55
- package/dist/timeline/timeline.module.js +1 -11
- package/dist/toast/toast.css +1 -1
- package/dist/toast/toast.js +1 -85
- package/dist/toast/toast.module.js +1 -11
- package/dist/toc/toc.css +1 -1
- package/dist/toc/toc.js +1 -43
- package/dist/toc/toc.module.js +1 -3
- package/dist/toc/use-toc-from-region.js +1 -18
- package/dist/toggle/toggle.js +1 -42
- package/dist/toggle/toggle.module.js +1 -8
- package/dist/toggle-group/toggle-group.js +1 -55
- package/dist/toggle-group/toggle-group.module.js +1 -6
- package/dist/toggletip/toggletip.js +1 -49
- package/dist/toggletip/toggletip.module.js +1 -7
- package/dist/tooltip/tooltip.css +1 -1
- package/dist/tooltip/tooltip.js +1 -58
- package/dist/tooltip/tooltip.module.js +1 -6
- package/dist/tree-view/tree-view.css +1 -1
- package/dist/tree-view/tree-view.js +1 -201
- package/dist/tree-view/tree-view.module.js +1 -13
- package/dist/user/user.js +1 -35
- package/dist/user/user.module.js +1 -9
- package/dist/virtual-list/virtual-list.js +1 -40
- package/dist/virtual-list/virtual-list.module.js +1 -7
- package/dist/visually-hidden/visually-hidden.js +1 -2
- package/dist/wheel-picker/wheel-picker.js +1 -84
- package/dist/wheel-picker/wheel-picker.module.js +1 -8
- package/package.json +3 -3
- package/readme.body.md +3 -2
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,68 +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, id: _, ariaLabel: v, label: y, "aria-labelledby": b, "aria-describedby": x, "aria-invalid": S, ...C }) {
|
|
10
|
-
a();
|
|
11
|
-
let w = i(""), T = t(null), E = v ?? y ?? (b === void 0 ? s(o.tagsInput.label) : void 0);
|
|
12
|
-
function D(e) {
|
|
13
|
-
let t = e.trim();
|
|
14
|
-
t && (m !== void 0 && u.length >= m || u.includes(t) || p && !p(t) || (d([...u, t]), w.value = ""));
|
|
15
|
-
}
|
|
16
|
-
function O(e) {
|
|
17
|
-
d(u.filter((t, n) => n !== e));
|
|
18
|
-
}
|
|
19
|
-
let k = 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(T.current),
|
|
24
|
-
...C,
|
|
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(), O(n);
|
|
37
|
-
},
|
|
38
|
-
children: /* @__PURE__ */ c("span", {
|
|
39
|
-
"aria-hidden": "true",
|
|
40
|
-
children: "×"
|
|
41
|
-
})
|
|
42
|
-
})]
|
|
43
|
-
}, n);
|
|
44
|
-
}), /* @__PURE__ */ c("input", {
|
|
45
|
-
ref: T,
|
|
46
|
-
className: e.input,
|
|
47
|
-
value: w.value,
|
|
48
|
-
id: _,
|
|
49
|
-
"aria-labelledby": b,
|
|
50
|
-
"aria-describedby": x,
|
|
51
|
-
"aria-invalid": S,
|
|
52
|
-
"aria-label": E,
|
|
53
|
-
placeholder: u.length === 0 ? k : void 0,
|
|
54
|
-
disabled: h,
|
|
55
|
-
onChange: (e) => {
|
|
56
|
-
w.value = e.currentTarget.value;
|
|
57
|
-
},
|
|
58
|
-
onKeyDown: (e) => {
|
|
59
|
-
e.key === "Enter" || e.key === "," ? (e.preventDefault(), D(w.value)) : e.key === "Backspace" && !w.value && O(u.length - 1);
|
|
60
|
-
},
|
|
61
|
-
onBlur: () => {
|
|
62
|
-
w.value && D(w.value);
|
|
63
|
-
}
|
|
64
|
-
})]
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
//#endregion
|
|
68
|
-
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};
|
|
@@ -1,58 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./textarea.module.js";
|
|
4
|
-
import { forwardRef as t } from "react";
|
|
5
|
-
import { cn as n, createMachine as r, useMachine as i } from "@cascivo/core";
|
|
6
|
-
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/textarea/textarea.tsx
|
|
8
|
-
var s = r({
|
|
9
|
-
initial: "idle",
|
|
10
|
-
states: {
|
|
11
|
-
idle: { on: { FOCUS: "focused" } },
|
|
12
|
-
focused: { on: { BLUR: "idle" } }
|
|
13
|
-
}
|
|
14
|
-
}), c = t(function({ label: t, hint: r, error: c, resize: l = "vertical", rows: u = 4, ariaLabel: d, className: f, id: p, onFocus: m, onBlur: h, ...g }, _) {
|
|
15
|
-
let [v, y] = i(s), b = p ?? (t ? `cascade-textarea-${t.toLowerCase().replace(/\s+/g, "-")}` : void 0);
|
|
16
|
-
return /* @__PURE__ */ o("div", {
|
|
17
|
-
className: n(e.wrapper, f),
|
|
18
|
-
"data-state": c ? "error" : v.value,
|
|
19
|
-
"data-resize": l,
|
|
20
|
-
children: [
|
|
21
|
-
t && /* @__PURE__ */ a("label", {
|
|
22
|
-
className: e.label,
|
|
23
|
-
htmlFor: b,
|
|
24
|
-
children: t
|
|
25
|
-
}),
|
|
26
|
-
/* @__PURE__ */ a("textarea", {
|
|
27
|
-
ref: _,
|
|
28
|
-
id: b,
|
|
29
|
-
rows: u,
|
|
30
|
-
"aria-multiline": "true",
|
|
31
|
-
className: e.textarea,
|
|
32
|
-
"aria-invalid": c ? !0 : void 0,
|
|
33
|
-
"aria-describedby": c ? `${b}-error` : r ? `${b}-hint` : void 0,
|
|
34
|
-
onFocus: (e) => {
|
|
35
|
-
y("FOCUS"), m?.(e);
|
|
36
|
-
},
|
|
37
|
-
onBlur: (e) => {
|
|
38
|
-
y("BLUR"), h?.(e);
|
|
39
|
-
},
|
|
40
|
-
...g,
|
|
41
|
-
"aria-label": g["aria-label"] ?? d
|
|
42
|
-
}),
|
|
43
|
-
c && /* @__PURE__ */ a("span", {
|
|
44
|
-
id: `${b}-error`,
|
|
45
|
-
className: e.error,
|
|
46
|
-
role: "alert",
|
|
47
|
-
children: c
|
|
48
|
-
}),
|
|
49
|
-
!c && r && /* @__PURE__ */ a("span", {
|
|
50
|
-
id: `${b}-hint`,
|
|
51
|
-
className: e.hint,
|
|
52
|
-
children: r
|
|
53
|
-
})
|
|
54
|
-
]
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
//#endregion
|
|
58
|
-
export { c as Textarea };
|
|
1
|
+
"use client";import e from"./textarea.module.js";import{forwardRef as t}from"react";import{cn as n,createMachine as r,useMachine as i}from"@cascivo/core";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=r({initial:`idle`,states:{idle:{on:{FOCUS:`focused`}},focused:{on:{BLUR:`idle`}}}}),c=t(function({label:t,hint:r,error:c,resize:l=`vertical`,autosize:u=!1,rows:d=4,ariaLabel:f,className:p,id:m,onFocus:h,onBlur:g,..._},v){let[y,b]=i(s),x=m??(t?`cascade-textarea-${t.toLowerCase().replace(/\s+/g,`-`)}`:void 0);return o(`div`,{className:n(e.wrapper,p),"data-state":c?`error`:y.value,"data-resize":l,"data-autosize":u?``:void 0,style:u?{"--_rows":String(d)}:void 0,children:[t&&a(`label`,{className:e.label,htmlFor:x,children:t}),a(`textarea`,{ref:v,id:x,rows:d,"aria-multiline":`true`,className:e.textarea,"aria-invalid":c?!0:void 0,"aria-describedby":c?`${x}-error`:r?`${x}-hint`:void 0,onFocus:e=>{b(`FOCUS`),h?.(e)},onBlur:e=>{b(`BLUR`),g?.(e)},..._,"aria-label":_[`aria-label`]??f}),c&&a(`span`,{id:`${x}-error`,className:e.error,role:`alert`,children:c}),!c&&r&&a(`span`,{id:`${x}-hint`,className:e.hint,children:r})]})});export{c as Textarea};
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
wrapper: "_wrapper_xbrwe_2",
|
|
3
|
-
textarea: "_textarea_xbrwe_7",
|
|
4
|
-
label: "_label_xbrwe_18",
|
|
5
|
-
error: "_error_xbrwe_71",
|
|
6
|
-
hint: "_hint_xbrwe_78"
|
|
7
|
-
};
|
|
8
|
-
//#endregion
|
|
9
|
-
export { e as default };
|
|
1
|
+
var e={wrapper:`_wrapper_1lzlk_2`,textarea:`_textarea_1lzlk_7`,label:`_label_1lzlk_47`,error:`_error_1lzlk_100`,hint:`_hint_1lzlk_107`};export{e as default};
|
package/dist/node/tile/tile.js
CHANGED
|
@@ -1,39 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./tile.module.js";
|
|
4
|
-
import { Slot as t, cn as n, useControllableSignal as r, useSignals as i } from "@cascivo/core";
|
|
5
|
-
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
-
//#region ../components/src/tile/tile.tsx
|
|
7
|
-
function s({ value: s, selected: c, defaultSelected: l, onSelect: u, selectable: d = "single", disabled: f, icon: p, asChild: m, children: h, className: g }) {
|
|
8
|
-
i();
|
|
9
|
-
let [_, v] = r({
|
|
10
|
-
value: c,
|
|
11
|
-
defaultValue: l ?? !1,
|
|
12
|
-
onChange: () => u?.(s)
|
|
13
|
-
}), y = () => {
|
|
14
|
-
f || v(d === "multi" ? !_.value : !0);
|
|
15
|
-
};
|
|
16
|
-
return /* @__PURE__ */ o(m ? t : "div", {
|
|
17
|
-
role: d === "multi" ? "checkbox" : "radio",
|
|
18
|
-
"aria-checked": _.value,
|
|
19
|
-
"aria-disabled": f || void 0,
|
|
20
|
-
tabIndex: f ? -1 : 0,
|
|
21
|
-
"data-selected": _.value || void 0,
|
|
22
|
-
"data-disabled": f || void 0,
|
|
23
|
-
className: n(e.tile, g),
|
|
24
|
-
onClick: y,
|
|
25
|
-
onKeyDown: (e) => {
|
|
26
|
-
(e.key === " " || e.key === "Enter") && (e.preventDefault(), y());
|
|
27
|
-
},
|
|
28
|
-
children: [p && /* @__PURE__ */ a("span", {
|
|
29
|
-
className: e.icon,
|
|
30
|
-
"aria-hidden": "true",
|
|
31
|
-
children: p
|
|
32
|
-
}), /* @__PURE__ */ a("span", {
|
|
33
|
-
className: e.body,
|
|
34
|
-
children: h
|
|
35
|
-
})]
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
//#endregion
|
|
39
|
-
export { s as Tile };
|
|
1
|
+
"use client";import e from"./tile.module.js";import{Slot as t,cn as n,useControllableSignal as r,useSignals as i}from"@cascivo/core";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s({value:s,selected:c,defaultSelected:l,onSelect:u,selectable:d=`single`,disabled:f,icon:p,asChild:m,children:h,className:g}){i();let[_,v]=r({value:c,defaultValue:l??!1,onChange:()=>u?.(s)}),y=()=>{f||v(d===`multi`?!_.value:!0)};return o(m?t:`div`,{role:d===`multi`?`checkbox`:`radio`,"aria-checked":_.value,"aria-disabled":f||void 0,tabIndex:f?-1:0,"data-selected":_.value||void 0,"data-disabled":f||void 0,className:n(e.tile,g),onClick:y,onKeyDown:e=>{(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),y())},children:[p&&a(`span`,{className:e.icon,"aria-hidden":`true`,children:p}),a(`span`,{className:e.body,children:h})]})}export{s as Tile};
|
|
@@ -1,64 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./time-picker.module.js";
|
|
4
|
-
import { forwardRef as t } from "react";
|
|
5
|
-
import { cn as n, createMachine as r, useMachine as i, useSignals as a } from "@cascivo/core";
|
|
6
|
-
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/time-picker/time-picker.tsx
|
|
8
|
-
var c = r({
|
|
9
|
-
initial: "idle",
|
|
10
|
-
states: {
|
|
11
|
-
idle: { on: { FOCUS: "focused" } },
|
|
12
|
-
focused: { on: { BLUR: "idle" } }
|
|
13
|
-
}
|
|
14
|
-
}), l = t(function({ value: t, defaultValue: r, onValueChange: l, min: u, max: d, step: f, label: p, hint: m, error: h, size: g = "md", className: _, id: v, onFocus: y, onBlur: b, ariaLabel: x, ...S }, C) {
|
|
15
|
-
a();
|
|
16
|
-
let [w, T] = i(c), E = v ?? (p ? `cascade-time-picker-${p.toLowerCase().replace(/\s+/g, "-")}` : void 0);
|
|
17
|
-
return /* @__PURE__ */ s("div", {
|
|
18
|
-
className: n(e.wrapper, _),
|
|
19
|
-
"data-state": h ? "error" : w.value,
|
|
20
|
-
"data-size": g,
|
|
21
|
-
children: [
|
|
22
|
-
p && /* @__PURE__ */ o("label", {
|
|
23
|
-
className: e.label,
|
|
24
|
-
htmlFor: E,
|
|
25
|
-
children: p
|
|
26
|
-
}),
|
|
27
|
-
/* @__PURE__ */ o("input", {
|
|
28
|
-
id: E,
|
|
29
|
-
type: "time",
|
|
30
|
-
className: e.input,
|
|
31
|
-
value: t,
|
|
32
|
-
defaultValue: r,
|
|
33
|
-
min: u,
|
|
34
|
-
max: d,
|
|
35
|
-
step: f,
|
|
36
|
-
"aria-invalid": h ? !0 : void 0,
|
|
37
|
-
"aria-describedby": h ? `${E}-error` : m ? `${E}-hint` : void 0,
|
|
38
|
-
onChange: (e) => l?.(e.target.value),
|
|
39
|
-
onFocus: (e) => {
|
|
40
|
-
T("FOCUS"), y?.(e);
|
|
41
|
-
},
|
|
42
|
-
onBlur: (e) => {
|
|
43
|
-
T("BLUR"), b?.(e);
|
|
44
|
-
},
|
|
45
|
-
ref: C,
|
|
46
|
-
...S,
|
|
47
|
-
"aria-label": S["aria-label"] ?? x
|
|
48
|
-
}),
|
|
49
|
-
h && /* @__PURE__ */ o("span", {
|
|
50
|
-
id: `${E}-error`,
|
|
51
|
-
className: e.error,
|
|
52
|
-
role: "alert",
|
|
53
|
-
children: h
|
|
54
|
-
}),
|
|
55
|
-
!h && m && /* @__PURE__ */ o("span", {
|
|
56
|
-
id: `${E}-hint`,
|
|
57
|
-
className: e.hint,
|
|
58
|
-
children: m
|
|
59
|
-
})
|
|
60
|
-
]
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
//#endregion
|
|
64
|
-
export { l as TimePicker };
|
|
1
|
+
"use client";import e from"./time-picker.module.js";import{forwardRef as t}from"react";import{cn as n,createMachine as r,useMachine as i,useSignals as a}from"@cascivo/core";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=r({initial:`idle`,states:{idle:{on:{FOCUS:`focused`}},focused:{on:{BLUR:`idle`}}}}),l=t(function({value:t,defaultValue:r,onValueChange:l,min:u,max:d,step:f,label:p,hint:m,error:h,size:g=`md`,className:_,id:v,onFocus:y,onBlur:b,ariaLabel:x,...S},C){a();let[w,T]=i(c),E=v??(p?`cascade-time-picker-${p.toLowerCase().replace(/\s+/g,`-`)}`:void 0);return s(`div`,{className:n(e.wrapper,_),"data-state":h?`error`:w.value,"data-size":g,children:[p&&o(`label`,{className:e.label,htmlFor:E,children:p}),o(`input`,{id:E,type:`time`,className:e.input,value:t,defaultValue:r,min:u,max:d,step:f,"aria-invalid":h?!0:void 0,"aria-describedby":h?`${E}-error`:m?`${E}-hint`:void 0,onChange:e=>l?.(e.target.value),onFocus:e=>{T(`FOCUS`),y?.(e)},onBlur:e=>{T(`BLUR`),b?.(e)},ref:C,...S,"aria-label":S[`aria-label`]??x}),h&&o(`span`,{id:`${E}-error`,className:e.error,role:`alert`,children:h}),!h&&m&&o(`span`,{id:`${E}-hint`,className:e.hint,children:m})]})});export{l as TimePicker};
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
wrapper: "_wrapper_gwf19_2",
|
|
3
|
-
label: "_label_gwf19_29",
|
|
4
|
-
input: "_input_gwf19_36",
|
|
5
|
-
error: "_error_gwf19_70",
|
|
6
|
-
hint: "_hint_gwf19_75"
|
|
7
|
-
};
|
|
8
|
-
//#endregion
|
|
9
|
-
export { e as default };
|
|
1
|
+
var e={wrapper:`_wrapper_gwf19_2`,label:`_label_gwf19_29`,input:`_input_gwf19_36`,error:`_error_gwf19_70`,hint:`_hint_gwf19_75`};export{e as default};
|
|
@@ -1,55 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import { cn as t, normalizeProgress as n, normalizeTone as r } from "@cascivo/core/pure";
|
|
3
|
-
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
|
-
//#region ../components/src/timeline/timeline.tsx
|
|
5
|
-
var o = {
|
|
6
|
-
pending: "upcoming",
|
|
7
|
-
active: "current",
|
|
8
|
-
complete: "complete",
|
|
9
|
-
error: "error"
|
|
10
|
-
}, s = {
|
|
11
|
-
neutral: "neutral",
|
|
12
|
-
info: "info",
|
|
13
|
-
success: "success",
|
|
14
|
-
warning: "warning",
|
|
15
|
-
danger: "danger"
|
|
16
|
-
};
|
|
17
|
-
function c({ items: c, orientation: l = "vertical", className: u, ...d }) {
|
|
18
|
-
return /* @__PURE__ */ i("ol", {
|
|
19
|
-
"data-orientation": l,
|
|
20
|
-
className: t(e.list, u),
|
|
21
|
-
...d,
|
|
22
|
-
children: c.map((t) => {
|
|
23
|
-
let c = n(t.status ?? "pending");
|
|
24
|
-
return /* @__PURE__ */ a("li", {
|
|
25
|
-
"data-status": o[c] ?? "upcoming",
|
|
26
|
-
"data-tone": t.tone ? s[r(t.tone)] ?? t.tone : void 0,
|
|
27
|
-
"aria-current": c === "active" ? "step" : void 0,
|
|
28
|
-
className: e.item,
|
|
29
|
-
children: [/* @__PURE__ */ i("span", {
|
|
30
|
-
className: e.marker,
|
|
31
|
-
"aria-hidden": "true",
|
|
32
|
-
children: t.icon ?? (c === "error" ? "✕" : null)
|
|
33
|
-
}), /* @__PURE__ */ a("div", {
|
|
34
|
-
className: e.content,
|
|
35
|
-
children: [
|
|
36
|
-
/* @__PURE__ */ i("div", {
|
|
37
|
-
className: e.title,
|
|
38
|
-
children: t.title
|
|
39
|
-
}),
|
|
40
|
-
t.time ? /* @__PURE__ */ i("time", {
|
|
41
|
-
className: e.time,
|
|
42
|
-
children: t.time
|
|
43
|
-
}) : null,
|
|
44
|
-
t.description ? /* @__PURE__ */ i("div", {
|
|
45
|
-
className: e.description,
|
|
46
|
-
children: t.description
|
|
47
|
-
}) : null
|
|
48
|
-
]
|
|
49
|
-
})]
|
|
50
|
-
}, t.id);
|
|
51
|
-
})
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
//#endregion
|
|
55
|
-
export { c as Timeline };
|
|
1
|
+
import e from"./timeline.module.js";import{cn as t,normalizeProgress as n,normalizeTone as r}from"@cascivo/core/pure";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o={pending:`upcoming`,active:`current`,complete:`complete`,error:`error`},s={neutral:`neutral`,info:`info`,success:`success`,warning:`warning`,danger:`danger`};function c({items:c,orientation:l=`vertical`,className:u,...d}){return i(`ol`,{"data-orientation":l,className:t(e.list,u),...d,children:c.map(t=>{let c=n(t.status??`pending`);return a(`li`,{"data-status":o[c]??`upcoming`,"data-tone":t.tone?s[r(t.tone)]??t.tone:void 0,"aria-current":c===`active`?`step`:void 0,className:e.item,children:[i(`span`,{className:e.marker,"aria-hidden":`true`,children:t.icon??(c===`error`?`✕`:null)}),a(`div`,{className:e.content,children:[i(`div`,{className:e.title,children:t.title}),t.time?i(`time`,{className:e.time,children:t.time}):null,t.description?i(`div`,{className:e.description,children:t.description}):null]})]},t.id)})})}export{c as Timeline};
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
list: "_list_4utvf_2",
|
|
3
|
-
item: "_item_4utvf_21",
|
|
4
|
-
marker: "_marker_4utvf_63",
|
|
5
|
-
content: "_content_4utvf_137",
|
|
6
|
-
title: "_title_4utvf_144",
|
|
7
|
-
time: "_time_4utvf_151",
|
|
8
|
-
description: "_description_4utvf_156"
|
|
9
|
-
};
|
|
10
|
-
//#endregion
|
|
11
|
-
export { e as default };
|
|
1
|
+
var e={list:`_list_4utvf_2`,item:`_item_4utvf_21`,marker:`_marker_4utvf_63`,content:`_content_4utvf_137`,title:`_title_4utvf_144`,time:`_time_4utvf_151`,description:`_description_4utvf_156`};export{e as default};
|
package/dist/node/toast/toast.js
CHANGED
|
@@ -1,85 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./toast.module.js";
|
|
4
|
-
import { useRef as t } from "react";
|
|
5
|
-
import { createMachine as n, signal as r, useMachine as i, useSignalEffect as a, useSignals as o } from "@cascivo/core";
|
|
6
|
-
import { builtin as s, t as c } from "@cascivo/i18n";
|
|
7
|
-
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
8
|
-
//#region ../components/src/toast/toast.tsx
|
|
9
|
-
var f = 5e3, p = 160, m = 0, h = r([]);
|
|
10
|
-
function g(e) {
|
|
11
|
-
h.value = [...h.value, {
|
|
12
|
-
id: m++,
|
|
13
|
-
...e
|
|
14
|
-
}];
|
|
15
|
-
}
|
|
16
|
-
function _(e) {
|
|
17
|
-
h.value = h.value.filter((t) => t.id !== e);
|
|
18
|
-
}
|
|
19
|
-
function v({ children: t }) {
|
|
20
|
-
o();
|
|
21
|
-
let n = h.value.slice(-3);
|
|
22
|
-
return /* @__PURE__ */ d(l, { children: [t, /* @__PURE__ */ u("div", {
|
|
23
|
-
className: e.viewport,
|
|
24
|
-
role: "region",
|
|
25
|
-
"aria-label": c(s.toast.region),
|
|
26
|
-
children: n.map((e) => /* @__PURE__ */ u(b, {
|
|
27
|
-
toast: e,
|
|
28
|
-
onDismiss: () => _(e.id)
|
|
29
|
-
}, e.id))
|
|
30
|
-
})] });
|
|
31
|
-
}
|
|
32
|
-
var y = n({
|
|
33
|
-
initial: "visible",
|
|
34
|
-
states: {
|
|
35
|
-
visible: { on: { DISMISS: "dismissing" } },
|
|
36
|
-
dismissing: { on: { END: "gone" } }
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
function b({ toast: n, onDismiss: r }) {
|
|
40
|
-
o();
|
|
41
|
-
let [l, m] = i(y), h = t(r);
|
|
42
|
-
h.current = r;
|
|
43
|
-
let g = n.duration ?? f, _ = n.variant === "destructive";
|
|
44
|
-
return a(() => {
|
|
45
|
-
let e = l.value;
|
|
46
|
-
if (e === "visible") {
|
|
47
|
-
let e = setTimeout(() => m("DISMISS"), g);
|
|
48
|
-
return () => clearTimeout(e);
|
|
49
|
-
}
|
|
50
|
-
if (e === "dismissing") {
|
|
51
|
-
let e = setTimeout(() => h.current(), p);
|
|
52
|
-
return () => clearTimeout(e);
|
|
53
|
-
}
|
|
54
|
-
}), /* @__PURE__ */ d("div", {
|
|
55
|
-
role: _ ? "alert" : "status",
|
|
56
|
-
"aria-live": _ ? "assertive" : "polite",
|
|
57
|
-
"data-variant": n.variant ?? "default",
|
|
58
|
-
"data-state": l.value,
|
|
59
|
-
className: e.toast,
|
|
60
|
-
children: [/* @__PURE__ */ d("div", {
|
|
61
|
-
className: e.body,
|
|
62
|
-
children: [/* @__PURE__ */ u("div", {
|
|
63
|
-
className: e.title,
|
|
64
|
-
children: n.title
|
|
65
|
-
}), n.description && /* @__PURE__ */ u("div", {
|
|
66
|
-
className: e.description,
|
|
67
|
-
children: n.description
|
|
68
|
-
})]
|
|
69
|
-
}), /* @__PURE__ */ u("button", {
|
|
70
|
-
type: "button",
|
|
71
|
-
className: e.close,
|
|
72
|
-
"aria-label": c(s.toast.dismiss),
|
|
73
|
-
onClick: () => m("DISMISS"),
|
|
74
|
-
children: "✕"
|
|
75
|
-
})]
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
function x() {
|
|
79
|
-
return { toast: g };
|
|
80
|
-
}
|
|
81
|
-
function S() {
|
|
82
|
-
h.value = [];
|
|
83
|
-
}
|
|
84
|
-
//#endregion
|
|
85
|
-
export { v as ToastProvider, S as dismissAllToasts, x as useToast };
|
|
1
|
+
"use client";import e from"./toast.module.js";import{useRef as t}from"react";import{createMachine as n,signal as r,useMachine as i,useSignalEffect as a,useSignals as o}from"@cascivo/core";import{builtin as s,t as c}from"@cascivo/i18n";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";var f=5e3,p=160,m=0,h=r([]);function g(e){h.value=[...h.value,{id:m++,...e}]}function _(e){h.value=h.value.filter(t=>t.id!==e)}function v({children:t}){o();let n=h.value.slice(-3);return d(l,{children:[t,u(`div`,{className:e.viewport,role:`region`,"aria-label":c(s.toast.region),children:n.map(e=>u(b,{toast:e,onDismiss:()=>_(e.id)},e.id))})]})}var y=n({initial:`visible`,states:{visible:{on:{DISMISS:`dismissing`}},dismissing:{on:{END:`gone`}}}});function b({toast:n,onDismiss:r}){o();let[l,m]=i(y),h=t(r);h.current=r;let g=n.duration??f,_=n.variant===`destructive`;return a(()=>{let e=l.value;if(e===`visible`){let e=setTimeout(()=>m(`DISMISS`),g);return()=>clearTimeout(e)}if(e===`dismissing`){let e=setTimeout(()=>h.current(),p);return()=>clearTimeout(e)}}),d(`div`,{role:_?`alert`:`status`,"aria-live":_?`assertive`:`polite`,"data-variant":n.variant??`default`,"data-state":l.value,className:e.toast,children:[d(`div`,{className:e.body,children:[u(`div`,{className:e.title,children:n.title}),n.description&&u(`div`,{className:e.description,children:n.description})]}),u(`button`,{type:`button`,className:e.close,"aria-label":c(s.toast.dismiss),onClick:()=>m(`DISMISS`),children:`✕`})]})}function x(){return{toast:g}}function S(){h.value=[]}export{v as ToastProvider,S as dismissAllToasts,x as useToast};
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
viewport: "_viewport_cshyp_2",
|
|
3
|
-
toast: "_toast_cshyp_23",
|
|
4
|
-
icon: "_icon_cshyp_62",
|
|
5
|
-
title: "_title_cshyp_63",
|
|
6
|
-
body: "_body_cshyp_92",
|
|
7
|
-
description: "_description_cshyp_108",
|
|
8
|
-
close: "_close_cshyp_115"
|
|
9
|
-
};
|
|
10
|
-
//#endregion
|
|
11
|
-
export { e as default };
|
|
1
|
+
var e={viewport:`_viewport_1gnpp_2`,toast:`_toast_1gnpp_24`,icon:`_icon_1gnpp_63`,title:`_title_1gnpp_64`,body:`_body_1gnpp_93`,description:`_description_1gnpp_109`,close:`_close_1gnpp_116`};export{e as default};
|
package/dist/node/toc/toc.js
CHANGED
|
@@ -1,43 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./toc.module.js";
|
|
4
|
-
import { useRef as t } from "react";
|
|
5
|
-
import { cn as n, useControllableSignal as r, useSignalEffect as i, useSignals as a } from "@cascivo/core";
|
|
6
|
-
import { builtin as o, t as s } from "@cascivo/i18n";
|
|
7
|
-
import { jsx as c } from "react/jsx-runtime";
|
|
8
|
-
//#region ../components/src/toc/toc.tsx
|
|
9
|
-
function l({ items: l, activeId: u, onActiveChange: d, labels: f, className: p }) {
|
|
10
|
-
a();
|
|
11
|
-
let m = u !== void 0, [h] = r({
|
|
12
|
-
value: u,
|
|
13
|
-
defaultValue: l[0]?.id ?? ""
|
|
14
|
-
}), g = t(d);
|
|
15
|
-
return g.current = d, i(() => {
|
|
16
|
-
if (m || typeof document > "u" || typeof IntersectionObserver > "u") return;
|
|
17
|
-
let e = l.map((e) => document.getElementById(e.id)).filter((e) => e !== null);
|
|
18
|
-
if (e.length === 0) return;
|
|
19
|
-
let t = /* @__PURE__ */ new Set(), n = new IntersectionObserver((e) => {
|
|
20
|
-
for (let n of e) n.isIntersecting ? t.add(n.target.id) : t.delete(n.target.id);
|
|
21
|
-
let n = l.find((e) => t.has(e.id));
|
|
22
|
-
n && n.id !== h.value && (h.value = n.id, g.current?.(n.id));
|
|
23
|
-
}, {
|
|
24
|
-
rootMargin: "0px 0px -70% 0px",
|
|
25
|
-
threshold: 0
|
|
26
|
-
});
|
|
27
|
-
for (let t of e) n.observe(t);
|
|
28
|
-
return () => n.disconnect();
|
|
29
|
-
}), /* @__PURE__ */ c("nav", {
|
|
30
|
-
"aria-label": f?.nav ?? s(o.toc.nav),
|
|
31
|
-
className: n(e.toc, p),
|
|
32
|
-
children: /* @__PURE__ */ c("ol", { children: l.map((e) => /* @__PURE__ */ c("li", {
|
|
33
|
-
style: { "--toc-level": e.level ?? 2 },
|
|
34
|
-
children: /* @__PURE__ */ c("a", {
|
|
35
|
-
href: `#${e.id}`,
|
|
36
|
-
"aria-current": e.id === h.value ? "location" : void 0,
|
|
37
|
-
children: e.label
|
|
38
|
-
})
|
|
39
|
-
}, e.id)) })
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
//#endregion
|
|
43
|
-
export { l as Toc };
|
|
1
|
+
"use client";import e from"./toc.module.js";import{useRef as t}from"react";import{cn as n,useControllableSignal as r,useSignalEffect as i,useSignals as a}from"@cascivo/core";import{builtin as o,t as s}from"@cascivo/i18n";import{jsx as c}from"react/jsx-runtime";function l({items:l,activeId:u,onActiveChange:d,labels:f,className:p}){a();let m=u!==void 0,[h]=r({value:u,defaultValue:l[0]?.id??``}),g=t(d);return g.current=d,i(()=>{if(m||typeof document>`u`||typeof IntersectionObserver>`u`)return;let e=l.map(e=>document.getElementById(e.id)).filter(e=>e!==null);if(e.length===0)return;let t=new Set,n=new IntersectionObserver(e=>{for(let n of e)n.isIntersecting?t.add(n.target.id):t.delete(n.target.id);let n=l.find(e=>t.has(e.id));n&&n.id!==h.value&&(h.value=n.id,g.current?.(n.id))},{rootMargin:`0px 0px -70% 0px`,threshold:0});for(let t of e)n.observe(t);return()=>n.disconnect()}),c(`nav`,{"aria-label":f?.nav??s(o.toc.nav),className:n(e.toc,p),children:c(`ol`,{children:l.map(e=>c(`li`,{style:{"--toc-level":e.level??2},children:c(`a`,{href:`#${e.id}`,"aria-current":e.id===h.value?`location`:void 0,children:e.label})},e.id))})})}export{l as Toc};
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useSignal as e, useSignalEffect as t, useSignals as n } from "@cascivo/core";
|
|
4
|
-
//#region ../components/src/toc/use-toc-from-region.ts
|
|
5
|
-
function r(r, i = {}) {
|
|
6
|
-
n();
|
|
7
|
-
let a = i.selector ?? "h2, h3, h4", o = e([]);
|
|
8
|
-
return t(() => {
|
|
9
|
-
let e = r.current;
|
|
10
|
-
e && (o.value = Array.from(e.querySelectorAll(a)).filter((e) => e.id !== "").map((e) => ({
|
|
11
|
-
id: e.id,
|
|
12
|
-
label: e.textContent?.trim() ?? "",
|
|
13
|
-
level: Number(e.tagName.slice(1)) || 2
|
|
14
|
-
})));
|
|
15
|
-
}), o;
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
export { r as useTocFromRegion };
|
|
1
|
+
"use client";import{useSignal as e,useSignalEffect as t,useSignals as n}from"@cascivo/core";function r(r,i={}){n();let a=i.selector??`h2, h3, h4`,o=e([]);return t(()=>{let e=r.current;e&&(o.value=Array.from(e.querySelectorAll(a)).filter(e=>e.id!==``).map(e=>({id:e.id,label:e.textContent?.trim()??``,level:Number(e.tagName.slice(1))||2})))}),o}export{r as useTocFromRegion};
|
|
@@ -1,42 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./toggle.module.js";
|
|
4
|
-
import { forwardRef as t } from "react";
|
|
5
|
-
import { cn as n, createMachine as r, useMachine as i, useSignals as a } from "@cascivo/core";
|
|
6
|
-
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/toggle/toggle.tsx
|
|
8
|
-
var c = t(function({ checked: t, defaultChecked: c = !1, onValueChange: l, label: u, size: d = "md", className: f, disabled: p, ariaLabel: m, ...h }, g) {
|
|
9
|
-
a();
|
|
10
|
-
let [_, v] = i(r({
|
|
11
|
-
initial: c ? "on" : "off",
|
|
12
|
-
states: {
|
|
13
|
-
off: { on: { TOGGLE: "on" } },
|
|
14
|
-
on: { on: { TOGGLE: "off" } }
|
|
15
|
-
}
|
|
16
|
-
})), y = t !== void 0, b = y ? t : _.value === "on";
|
|
17
|
-
return /* @__PURE__ */ s("button", {
|
|
18
|
-
type: "button",
|
|
19
|
-
role: "switch",
|
|
20
|
-
"aria-checked": b,
|
|
21
|
-
"data-state": b ? "on" : "off",
|
|
22
|
-
"data-size": d,
|
|
23
|
-
disabled: p,
|
|
24
|
-
className: n(e.toggle, f),
|
|
25
|
-
onClick: () => {
|
|
26
|
-
y || v("TOGGLE"), l?.(!b);
|
|
27
|
-
},
|
|
28
|
-
ref: g,
|
|
29
|
-
...h,
|
|
30
|
-
"aria-label": h["aria-label"] ?? m,
|
|
31
|
-
children: [/* @__PURE__ */ o("span", {
|
|
32
|
-
className: e.track,
|
|
33
|
-
"aria-hidden": "true",
|
|
34
|
-
children: /* @__PURE__ */ o("span", { className: e.thumb })
|
|
35
|
-
}), u && /* @__PURE__ */ o("span", {
|
|
36
|
-
className: e.label,
|
|
37
|
-
children: u
|
|
38
|
-
})]
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
//#endregion
|
|
42
|
-
export { c as Toggle };
|
|
1
|
+
"use client";import e from"./toggle.module.js";import{forwardRef as t}from"react";import{cn as n,createMachine as r,useMachine as i,useSignals as a}from"@cascivo/core";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=t(function({checked:t,defaultChecked:c=!1,onValueChange:l,label:u,size:d=`md`,className:f,disabled:p,ariaLabel:m,...h},g){a();let[_,v]=i(r({initial:c?`on`:`off`,states:{off:{on:{TOGGLE:`on`}},on:{on:{TOGGLE:`off`}}}})),y=t!==void 0,b=y?t:_.value===`on`;return s(`button`,{type:`button`,role:`switch`,"aria-checked":b,"data-state":b?`on`:`off`,"data-size":d,disabled:p,className:n(e.toggle,f),onClick:()=>{y||v(`TOGGLE`),l?.(!b)},ref:g,...h,"aria-label":h[`aria-label`]??m,children:[o(`span`,{className:e.track,"aria-hidden":`true`,children:o(`span`,{className:e.thumb})}),u&&o(`span`,{className:e.label,children:u})]})});export{c as Toggle};
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
toggle: "_toggle_1vvuo_2",
|
|
3
|
-
track: "_track_1vvuo_33",
|
|
4
|
-
thumb: "_thumb_1vvuo_53",
|
|
5
|
-
label: "_label_1vvuo_66"
|
|
6
|
-
};
|
|
7
|
-
//#endregion
|
|
8
|
-
export { e as default };
|
|
1
|
+
var e={toggle:`_toggle_1vvuo_2`,track:`_track_1vvuo_33`,thumb:`_thumb_1vvuo_53`,label:`_label_1vvuo_66`};export{e as default};
|