@cascivo/react 0.18.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -7
- package/dist/accordion/accordion.js +1 -114
- package/dist/accordion/accordion.module.js +1 -10
- package/dist/action-sheet/action-sheet.css +1 -1
- package/dist/action-sheet/action-sheet.js +1 -91
- package/dist/action-sheet/action-sheet.module.js +1 -12
- package/dist/alert/alert.js +1 -55
- package/dist/alert/alert.module.js +1 -11
- package/dist/alert-dialog/alert-dialog.css +1 -1
- package/dist/alert-dialog/alert-dialog.js +1 -66
- package/dist/alert-dialog/alert-dialog.module.js +1 -11
- package/dist/app-shell/app-shell.css +1 -1
- package/dist/app-shell/app-shell.js +1 -85
- package/dist/app-shell/app-shell.module.js +1 -12
- package/dist/aspect-ratio/aspect-ratio.js +1 -20
- package/dist/aspect-ratio/aspect-ratio.module.js +1 -6
- package/dist/avatar/avatar.js +1 -57
- package/dist/avatar/avatar.module.js +1 -8
- package/dist/avatar-group/avatar-group.js +1 -24
- package/dist/avatar-group/avatar-group.module.js +1 -6
- package/dist/badge/badge.js +1 -22
- package/dist/badge/badge.module.js +1 -3
- package/dist/blockquote/blockquote.js +1 -16
- package/dist/blockquote/blockquote.module.js +1 -6
- package/dist/bottom-sheet/bottom-sheet.js +1 -111
- package/dist/bottom-sheet/bottom-sheet.module.js +1 -14
- package/dist/brand/logo/logo.css +1 -0
- package/dist/brand/logo/logo.js +1 -0
- package/dist/brand/logo/logo.module.js +2 -0
- package/dist/breadcrumb/breadcrumb.js +1 -28
- package/dist/breadcrumb/breadcrumb.module.js +1 -3
- package/dist/button/button.css +1 -1
- package/dist/button/button.js +1 -35
- package/dist/button/button.module.js +1 -6
- package/dist/button-group/button-group.js +1 -39
- package/dist/button-group/button-group.module.js +1 -3
- package/dist/calendar/calendar-date.js +1 -0
- package/dist/calendar/calendar.css +1 -1
- package/dist/calendar/calendar.js +1 -199
- package/dist/calendar/calendar.module.js +1 -14
- package/dist/card/card.js +1 -53
- package/dist/card/card.module.js +1 -12
- package/dist/carousel/carousel.css +1 -1
- package/dist/carousel/carousel.js +1 -138
- package/dist/carousel/carousel.module.js +1 -13
- package/dist/chat-bubble/chat-bubble.js +1 -31
- package/dist/chat-bubble/chat-bubble.module.js +1 -11
- package/dist/checkbox/checkbox.js +1 -38
- package/dist/checkbox/checkbox.module.js +1 -8
- package/dist/checkbox-card/checkbox-card.css +1 -1
- package/dist/checkbox-card/checkbox-card.js +1 -50
- package/dist/checkbox-card/checkbox-card.module.js +1 -11
- package/dist/code/code.js +1 -14
- package/dist/code/code.module.js +1 -3
- package/dist/code-snippet/code-snippet.js +2 -121
- package/dist/code-snippet/code-snippet.module.js +1 -17
- package/dist/code-snippet/highlight.js +1 -67
- package/dist/collapsible/collapsible.js +1 -47
- package/dist/collapsible/collapsible.module.js +1 -7
- package/dist/color-picker/color-picker.css +1 -1
- package/dist/color-picker/color-picker.js +1 -268
- package/dist/color-picker/color-picker.module.js +1 -18
- package/dist/color-picker/color.js +1 -0
- package/dist/combobox/combobox.css +1 -1
- package/dist/combobox/combobox.js +1 -165
- package/dist/combobox/combobox.module.js +1 -19
- package/dist/combobox/list-nav.js +1 -0
- package/dist/combobox/option-list.js +1 -0
- package/dist/command-menu/command-menu.js +1 -421
- package/dist/command-menu/command-menu.module.js +1 -34
- package/dist/comparison/comparison.js +1 -69
- package/dist/comparison/comparison.module.js +1 -9
- package/dist/contained-list/contained-list.js +1 -41
- package/dist/contained-list/contained-list.module.js +1 -11
- package/dist/context-menu/context-menu.js +1 -93
- package/dist/context-menu/context-menu.module.js +1 -7
- package/dist/copy-button/copy-button.js +1 -60
- package/dist/copy-button/copy-button.module.js +1 -6
- package/dist/data-list/data-list.js +1 -25
- package/dist/data-list/data-list.module.js +1 -8
- package/dist/data-table/column-filter.js +1 -0
- package/dist/data-table/column-layout.js +1 -0
- package/dist/data-table/data-table.css +1 -1
- package/dist/data-table/data-table.js +1 -371
- package/dist/data-table/data-table.module.js +1 -33
- package/dist/data-table/grid-keys.js +1 -0
- package/dist/data-table/row-group.js +1 -0
- package/dist/data-table/row-search.js +1 -0
- package/dist/data-table/row-sort.js +1 -0
- package/dist/data-table/to-csv.js +3 -0
- package/dist/data-table/virtual-window.js +1 -0
- package/dist/date-picker/date-picker.css +1 -1
- package/dist/date-picker/date-picker.js +1 -219
- package/dist/date-picker/date-picker.module.js +1 -23
- package/dist/date-picker/parse-date.js +1 -0
- package/dist/date-range-picker/date-range-picker.js +1 -196
- package/dist/date-range-picker/date-range-picker.module.js +1 -18
- package/dist/dock/dock.css +1 -1
- package/dist/dock/dock.js +1 -34
- package/dist/dock/dock.module.js +1 -8
- package/dist/drawer/drawer.js +1 -96
- package/dist/drawer/drawer.module.js +1 -13
- package/dist/dropdown/dropdown.css +1 -1
- package/dist/dropdown/dropdown.js +1 -107
- package/dist/dropdown/dropdown.module.js +1 -9
- package/dist/editable/editable.js +1 -67
- package/dist/editable/editable.module.js +1 -11
- package/dist/empty-state/empty-state.js +1 -32
- package/dist/empty-state/empty-state.module.js +1 -9
- package/dist/fab/fab.css +1 -1
- package/dist/fab/fab.js +1 -93
- package/dist/fab/fab.module.js +1 -12
- package/dist/field/field.css +1 -1
- package/dist/field/field.js +1 -46
- package/dist/field/field.module.js +1 -7
- package/dist/file-uploader/file-uploader.css +1 -1
- package/dist/file-uploader/file-uploader.js +1 -122
- package/dist/file-uploader/file-uploader.module.js +1 -18
- package/dist/filter/filter.css +1 -1
- package/dist/filter/filter.js +1 -35
- package/dist/filter/filter.module.js +1 -6
- package/dist/form/form.js +1 -95
- package/dist/form/form.module.js +1 -3
- package/dist/header/header.js +1 -44
- package/dist/header/header.module.js +1 -11
- package/dist/header-panel/header-panel.js +1 -72
- package/dist/header-panel/header-panel.module.js +1 -9
- package/dist/heading/heading.css +1 -1
- package/dist/heading/heading.js +1 -22
- package/dist/heading/heading.module.js +1 -3
- package/dist/hover-card/hover-card.css +1 -1
- package/dist/hover-card/hover-card.js +1 -84
- package/dist/hover-card/hover-card.module.js +1 -6
- package/dist/icon-button/icon-button.js +1 -19
- package/dist/icon-button/icon-button.module.js +1 -3
- package/dist/image/image.css +1 -1
- package/dist/image/image.js +1 -64
- package/dist/image/image.module.js +1 -9
- package/dist/index.d.ts +2084 -120
- package/dist/indicator/indicator.js +1 -16
- package/dist/indicator/indicator.module.js +1 -6
- package/dist/infinite-scroll/infinite-scroll.js +1 -49
- package/dist/infinite-scroll/infinite-scroll.module.js +1 -7
- package/dist/inline-loading/inline-loading.js +1 -74
- package/dist/inline-loading/inline-loading.module.js +1 -9
- package/dist/input/input.css +1 -1
- package/dist/input/input.js +1 -55
- package/dist/input/input.module.js +1 -9
- package/dist/input-group/input-group.css +1 -1
- package/dist/input-group/input-group.js +1 -39
- package/dist/input-group/input-group.module.js +1 -9
- package/dist/item/item.js +1 -50
- package/dist/item/item.module.js +1 -10
- package/dist/join/join.js +1 -12
- package/dist/join/join.module.js +1 -3
- package/dist/kbd/kbd.js +1 -14
- package/dist/kbd/kbd.module.js +1 -3
- package/dist/label/label.js +1 -23
- package/dist/label/label.module.js +1 -7
- package/dist/large-title-header/large-title-header.js +1 -38
- package/dist/large-title-header/large-title-header.module.js +1 -12
- package/dist/layouts/src/auto-grid/auto-grid.js +1 -17
- package/dist/layouts/src/auto-grid/auto-grid.module.js +1 -4
- package/dist/layouts/src/center/center.js +1 -16
- package/dist/layouts/src/center/center.module.js +1 -3
- package/dist/layouts/src/columns/columns.js +1 -21
- package/dist/layouts/src/columns/columns.module.js +1 -6
- package/dist/layouts/src/flex/flex.js +1 -20
- package/dist/layouts/src/flex/flex.module.js +1 -3
- package/dist/layouts/src/grid/grid.css +1 -1
- package/dist/layouts/src/grid/grid.js +1 -55
- package/dist/layouts/src/grid/grid.module.js +1 -7
- package/dist/layouts/src/page-header/page-header.js +1 -31
- package/dist/layouts/src/page-header/page-header.module.js +1 -10
- package/dist/layouts/src/spacer/spacer.js +1 -17
- package/dist/layouts/src/spacer/spacer.module.js +1 -3
- package/dist/link/link.css +1 -1
- package/dist/link/link.js +1 -22
- package/dist/link/link.module.js +1 -3
- package/dist/list/list.js +1 -21
- package/dist/list/list.module.js +1 -6
- package/dist/log-viewer/log-viewer.css +1 -1
- package/dist/log-viewer/log-viewer.js +2 -184
- package/dist/log-viewer/log-viewer.module.js +1 -16
- package/dist/menu/menu.js +1 -126
- package/dist/menu/menu.module.js +1 -8
- package/dist/menu-button/menu-button.js +1 -92
- package/dist/menu-button/menu-button.module.js +1 -8
- package/dist/menubar/menubar.js +1 -103
- package/dist/menubar/menubar.module.js +1 -8
- package/dist/modal/modal.css +1 -1
- package/dist/modal/modal.js +1 -76
- package/dist/modal/modal.module.js +1 -12
- package/dist/multi-select/list-nav.js +1 -0
- package/dist/multi-select/multi-select.css +1 -1
- package/dist/multi-select/multi-select.js +1 -106
- package/dist/multi-select/multi-select.module.js +1 -15
- package/dist/multi-select/option-list.js +1 -0
- package/dist/native-select/native-select.css +1 -1
- package/dist/native-select/native-select.js +1 -37
- package/dist/native-select/native-select.module.js +1 -7
- package/dist/navigation-menu/navigation-menu.js +1 -99
- package/dist/navigation-menu/navigation-menu.module.js +1 -10
- package/dist/node/accordion/accordion.js +1 -114
- package/dist/node/accordion/accordion.module.js +1 -10
- package/dist/node/action-sheet/action-sheet.js +1 -91
- package/dist/node/action-sheet/action-sheet.module.js +1 -12
- package/dist/node/alert/alert.js +1 -55
- package/dist/node/alert/alert.module.js +1 -11
- package/dist/node/alert-dialog/alert-dialog.js +1 -66
- package/dist/node/alert-dialog/alert-dialog.module.js +1 -11
- package/dist/node/app-shell/app-shell.js +1 -85
- package/dist/node/app-shell/app-shell.module.js +1 -12
- package/dist/node/aspect-ratio/aspect-ratio.js +1 -20
- package/dist/node/aspect-ratio/aspect-ratio.module.js +1 -6
- package/dist/node/avatar/avatar.js +1 -57
- package/dist/node/avatar/avatar.module.js +1 -8
- package/dist/node/avatar-group/avatar-group.js +1 -24
- package/dist/node/avatar-group/avatar-group.module.js +1 -6
- package/dist/node/badge/badge.js +1 -22
- package/dist/node/badge/badge.module.js +1 -3
- package/dist/node/blockquote/blockquote.js +1 -16
- package/dist/node/blockquote/blockquote.module.js +1 -6
- package/dist/node/bottom-sheet/bottom-sheet.js +1 -111
- package/dist/node/bottom-sheet/bottom-sheet.module.js +1 -14
- package/dist/node/brand/logo/logo.js +1 -0
- package/dist/node/brand/logo/logo.module.js +1 -0
- package/dist/node/breadcrumb/breadcrumb.js +1 -28
- package/dist/node/breadcrumb/breadcrumb.module.js +1 -3
- package/dist/node/button/button.js +1 -35
- package/dist/node/button/button.module.js +1 -6
- package/dist/node/button-group/button-group.js +1 -39
- package/dist/node/button-group/button-group.module.js +1 -3
- package/dist/node/calendar/calendar-date.js +1 -0
- package/dist/node/calendar/calendar.js +1 -199
- package/dist/node/calendar/calendar.module.js +1 -14
- package/dist/node/card/card.js +1 -53
- package/dist/node/card/card.module.js +1 -12
- package/dist/node/carousel/carousel.js +1 -138
- package/dist/node/carousel/carousel.module.js +1 -13
- package/dist/node/chat-bubble/chat-bubble.js +1 -31
- package/dist/node/chat-bubble/chat-bubble.module.js +1 -11
- package/dist/node/checkbox/checkbox.js +1 -38
- package/dist/node/checkbox/checkbox.module.js +1 -8
- package/dist/node/checkbox-card/checkbox-card.js +1 -50
- package/dist/node/checkbox-card/checkbox-card.module.js +1 -11
- package/dist/node/code/code.js +1 -14
- package/dist/node/code/code.module.js +1 -3
- package/dist/node/code-snippet/code-snippet.js +2 -121
- package/dist/node/code-snippet/code-snippet.module.js +1 -17
- package/dist/node/code-snippet/highlight.js +1 -67
- package/dist/node/collapsible/collapsible.js +1 -47
- package/dist/node/collapsible/collapsible.module.js +1 -7
- package/dist/node/color-picker/color-picker.js +1 -268
- package/dist/node/color-picker/color-picker.module.js +1 -18
- package/dist/node/color-picker/color.js +1 -0
- package/dist/node/combobox/combobox.js +1 -165
- package/dist/node/combobox/combobox.module.js +1 -19
- package/dist/node/combobox/list-nav.js +1 -0
- package/dist/node/combobox/option-list.js +1 -0
- package/dist/node/command-menu/command-menu.js +1 -421
- package/dist/node/command-menu/command-menu.module.js +1 -34
- package/dist/node/comparison/comparison.js +1 -69
- package/dist/node/comparison/comparison.module.js +1 -9
- package/dist/node/contained-list/contained-list.js +1 -41
- package/dist/node/contained-list/contained-list.module.js +1 -11
- package/dist/node/context-menu/context-menu.js +1 -93
- package/dist/node/context-menu/context-menu.module.js +1 -7
- package/dist/node/copy-button/copy-button.js +1 -60
- package/dist/node/copy-button/copy-button.module.js +1 -6
- package/dist/node/data-list/data-list.js +1 -25
- package/dist/node/data-list/data-list.module.js +1 -8
- package/dist/node/data-table/column-filter.js +1 -0
- package/dist/node/data-table/column-layout.js +1 -0
- package/dist/node/data-table/data-table.js +1 -371
- package/dist/node/data-table/data-table.module.js +1 -33
- package/dist/node/data-table/grid-keys.js +1 -0
- package/dist/node/data-table/row-group.js +1 -0
- package/dist/node/data-table/row-search.js +1 -0
- package/dist/node/data-table/row-sort.js +1 -0
- package/dist/node/data-table/to-csv.js +3 -0
- package/dist/node/data-table/virtual-window.js +1 -0
- package/dist/node/date-picker/date-picker.js +1 -219
- package/dist/node/date-picker/date-picker.module.js +1 -23
- package/dist/node/date-picker/parse-date.js +1 -0
- package/dist/node/date-range-picker/date-range-picker.js +1 -196
- package/dist/node/date-range-picker/date-range-picker.module.js +1 -18
- package/dist/node/dock/dock.js +1 -34
- package/dist/node/dock/dock.module.js +1 -8
- package/dist/node/drawer/drawer.js +1 -96
- package/dist/node/drawer/drawer.module.js +1 -13
- package/dist/node/dropdown/dropdown.js +1 -107
- package/dist/node/dropdown/dropdown.module.js +1 -9
- package/dist/node/editable/editable.js +1 -67
- package/dist/node/editable/editable.module.js +1 -11
- package/dist/node/empty-state/empty-state.js +1 -32
- package/dist/node/empty-state/empty-state.module.js +1 -9
- package/dist/node/fab/fab.js +1 -93
- package/dist/node/fab/fab.module.js +1 -12
- package/dist/node/field/field.js +1 -46
- package/dist/node/field/field.module.js +1 -7
- package/dist/node/file-uploader/file-uploader.js +1 -122
- package/dist/node/file-uploader/file-uploader.module.js +1 -18
- package/dist/node/filter/filter.js +1 -35
- package/dist/node/filter/filter.module.js +1 -6
- package/dist/node/form/form.js +1 -95
- package/dist/node/form/form.module.js +1 -3
- package/dist/node/header/header.js +1 -44
- package/dist/node/header/header.module.js +1 -11
- package/dist/node/header-panel/header-panel.js +1 -72
- package/dist/node/header-panel/header-panel.module.js +1 -9
- package/dist/node/heading/heading.js +1 -22
- package/dist/node/heading/heading.module.js +1 -3
- package/dist/node/hover-card/hover-card.js +1 -84
- package/dist/node/hover-card/hover-card.module.js +1 -6
- package/dist/node/icon-button/icon-button.js +1 -19
- package/dist/node/icon-button/icon-button.module.js +1 -3
- package/dist/node/image/image.js +1 -64
- package/dist/node/image/image.module.js +1 -9
- package/dist/node/indicator/indicator.js +1 -16
- package/dist/node/indicator/indicator.module.js +1 -6
- package/dist/node/infinite-scroll/infinite-scroll.js +1 -49
- package/dist/node/infinite-scroll/infinite-scroll.module.js +1 -7
- package/dist/node/inline-loading/inline-loading.js +1 -74
- package/dist/node/inline-loading/inline-loading.module.js +1 -9
- package/dist/node/input/input.js +1 -55
- package/dist/node/input/input.module.js +1 -9
- package/dist/node/input-group/input-group.js +1 -39
- package/dist/node/input-group/input-group.module.js +1 -9
- package/dist/node/item/item.js +1 -50
- package/dist/node/item/item.module.js +1 -10
- package/dist/node/join/join.js +1 -12
- package/dist/node/join/join.module.js +1 -3
- package/dist/node/kbd/kbd.js +1 -14
- package/dist/node/kbd/kbd.module.js +1 -3
- package/dist/node/label/label.js +1 -23
- package/dist/node/label/label.module.js +1 -7
- package/dist/node/large-title-header/large-title-header.js +1 -38
- package/dist/node/large-title-header/large-title-header.module.js +1 -12
- package/dist/node/layouts/src/auto-grid/auto-grid.js +1 -17
- package/dist/node/layouts/src/auto-grid/auto-grid.module.js +1 -4
- package/dist/node/layouts/src/center/center.js +1 -16
- package/dist/node/layouts/src/center/center.module.js +1 -3
- package/dist/node/layouts/src/columns/columns.js +1 -21
- package/dist/node/layouts/src/columns/columns.module.js +1 -6
- package/dist/node/layouts/src/flex/flex.js +1 -20
- package/dist/node/layouts/src/flex/flex.module.js +1 -3
- package/dist/node/layouts/src/grid/grid.js +1 -55
- package/dist/node/layouts/src/grid/grid.module.js +1 -7
- package/dist/node/layouts/src/page-header/page-header.js +1 -31
- package/dist/node/layouts/src/page-header/page-header.module.js +1 -10
- package/dist/node/layouts/src/spacer/spacer.js +1 -17
- package/dist/node/layouts/src/spacer/spacer.module.js +1 -3
- package/dist/node/link/link.js +1 -22
- package/dist/node/link/link.module.js +1 -3
- package/dist/node/list/list.js +1 -21
- package/dist/node/list/list.module.js +1 -6
- package/dist/node/log-viewer/log-viewer.js +2 -184
- package/dist/node/log-viewer/log-viewer.module.js +1 -16
- package/dist/node/menu/menu.js +1 -126
- package/dist/node/menu/menu.module.js +1 -8
- package/dist/node/menu-button/menu-button.js +1 -92
- package/dist/node/menu-button/menu-button.module.js +1 -8
- package/dist/node/menubar/menubar.js +1 -103
- package/dist/node/menubar/menubar.module.js +1 -8
- package/dist/node/modal/modal.js +1 -76
- package/dist/node/modal/modal.module.js +1 -12
- package/dist/node/multi-select/list-nav.js +1 -0
- package/dist/node/multi-select/multi-select.js +1 -106
- package/dist/node/multi-select/multi-select.module.js +1 -15
- package/dist/node/multi-select/option-list.js +1 -0
- package/dist/node/native-select/native-select.js +1 -37
- package/dist/node/native-select/native-select.module.js +1 -7
- package/dist/node/navigation-menu/navigation-menu.js +1 -99
- package/dist/node/navigation-menu/navigation-menu.module.js +1 -10
- package/dist/node/notification/notification.js +1 -140
- package/dist/node/notification/notification.module.js +1 -11
- package/dist/node/number-input/number-input.js +1 -147
- package/dist/node/number-input/number-input.module.js +1 -12
- package/dist/node/otp-input/otp-input.js +1 -70
- package/dist/node/otp-input/otp-input.module.js +1 -6
- package/dist/node/overflow-menu/overflow-menu.js +1 -70
- package/dist/node/overflow-menu/overflow-menu.module.js +1 -7
- package/dist/node/pagination/pagination.js +1 -92
- package/dist/node/pagination/pagination.module.js +1 -11
- package/dist/node/password-input/password-input.js +1 -81
- package/dist/node/password-input/password-input.module.js +1 -11
- package/dist/node/popover/popover.js +1 -51
- package/dist/node/popover/popover.module.js +1 -6
- package/dist/node/popover/use-popover.js +1 -55
- package/dist/node/progress/progress.js +1 -16
- package/dist/node/progress/progress.module.js +1 -6
- package/dist/node/progress-bar/progress-bar.js +1 -42
- package/dist/node/progress-bar/progress-bar.module.js +1 -11
- package/dist/node/progress-circle/progress-circle.js +1 -46
- package/dist/node/progress-circle/progress-circle.module.js +1 -9
- package/dist/node/progress-indicator/progress-indicator.js +1 -34
- package/dist/node/progress-indicator/progress-indicator.module.js +1 -10
- package/dist/node/prose/prose.js +1 -13
- package/dist/node/prose/prose.module.js +1 -3
- package/dist/node/pull-to-refresh/pull-to-refresh.js +1 -82
- package/dist/node/pull-to-refresh/pull-to-refresh.module.js +1 -9
- package/dist/node/qr-code/encode.js +1 -583
- package/dist/node/qr-code/qr-code.js +1 -41
- package/dist/node/qr-code/qr-code.module.js +1 -6
- package/dist/node/radial-progress/radial-progress.js +1 -27
- package/dist/node/radial-progress/radial-progress.module.js +1 -6
- package/dist/node/radio/radio.js +1 -48
- package/dist/node/radio/radio.module.js +1 -9
- package/dist/node/radio-card/radio-card.js +1 -64
- package/dist/node/radio-card/radio-card.module.js +1 -11
- package/dist/node/rating-group/rating-group.js +1 -37
- package/dist/node/rating-group/rating-group.module.js +1 -6
- package/dist/node/react/src/index.js +1 -141
- package/dist/node/relative-time/relative-time.js +1 -66
- package/dist/node/relative-time/relative-time.module.js +1 -3
- package/dist/node/reorder-list/reorder-list.js +1 -143
- package/dist/node/reorder-list/reorder-list.module.js +1 -11
- package/dist/node/resizable/resizable.js +1 -80
- package/dist/node/resizable/resizable.module.js +1 -8
- package/dist/node/scroll-area/scroll-area.js +1 -38
- package/dist/node/scroll-area/scroll-area.module.js +1 -3
- package/dist/node/search/search.js +1 -92
- package/dist/node/search/search.module.js +1 -9
- package/dist/node/segmented-control/segmented-control.js +1 -43
- package/dist/node/segmented-control/segmented-control.module.js +1 -6
- package/dist/node/select/select.js +1 -72
- package/dist/node/select/select.module.js +1 -11
- package/dist/node/separator/separator.js +1 -19
- package/dist/node/separator/separator.module.js +1 -3
- package/dist/node/sheet/sheet.js +1 -49
- package/dist/node/sheet/sheet.module.js +1 -9
- package/dist/node/shell-header/shell-header.js +1 -169
- package/dist/node/shell-header/shell-header.module.js +1 -24
- package/dist/node/side-nav/side-nav.js +1 -334
- package/dist/node/side-nav/side-nav.module.js +1 -31
- package/dist/node/skeleton/skeleton.js +1 -23
- package/dist/node/skeleton/skeleton.module.js +1 -7
- package/dist/node/skip-nav/skip-nav.js +1 -28
- package/dist/node/skip-nav/skip-nav.module.js +1 -3
- package/dist/node/slider/slider.js +1 -29
- package/dist/node/slider/slider.module.js +1 -7
- package/dist/node/spinner/spinner.js +1 -18
- package/dist/node/spinner/spinner.module.js +1 -6
- package/dist/node/stack/stack.js +1 -17
- package/dist/node/stack/stack.module.js +1 -6
- package/dist/node/stat/stat.js +1 -41
- package/dist/node/stat/stat.module.js +1 -11
- package/dist/node/status/status.js +1 -25
- package/dist/node/status/status.module.js +1 -7
- package/dist/node/steps/steps.js +1 -35
- package/dist/node/steps/steps.module.js +1 -8
- package/dist/node/structured-list/structured-list.js +1 -102
- package/dist/node/structured-list/structured-list.module.js +1 -12
- package/dist/node/swap/swap.js +1 -36
- package/dist/node/swap/swap.module.js +1 -7
- package/dist/node/swipe-item/swipe-item.js +1 -62
- package/dist/node/swipe-item/swipe-item.module.js +1 -12
- package/dist/node/switcher/switcher.js +1 -32
- package/dist/node/switcher/switcher.module.js +1 -8
- package/dist/node/tabs/tabs.js +1 -98
- package/dist/node/tabs/tabs.module.js +1 -8
- package/dist/node/tag/tag.js +1 -33
- package/dist/node/tag/tag.module.js +1 -6
- package/dist/node/tags-input/tags-input.js +1 -64
- package/dist/node/tags-input/tags-input.module.js +1 -8
- package/dist/node/text/text.js +1 -16
- package/dist/node/text/text.module.js +1 -3
- package/dist/node/textarea/textarea.js +1 -57
- package/dist/node/textarea/textarea.module.js +1 -9
- package/dist/node/tile/tile.js +1 -39
- package/dist/node/tile/tile.module.js +1 -7
- package/dist/node/time-picker/time-picker.js +1 -63
- package/dist/node/time-picker/time-picker.module.js +1 -9
- package/dist/node/timeline/timeline.js +1 -55
- package/dist/node/timeline/timeline.module.js +1 -11
- package/dist/node/toast/toast.js +1 -85
- package/dist/node/toast/toast.module.js +1 -11
- package/dist/node/toc/toc.js +1 -43
- package/dist/node/toc/toc.module.js +1 -3
- package/dist/node/toc/use-toc-from-region.js +1 -18
- package/dist/node/toggle/toggle.js +1 -41
- package/dist/node/toggle/toggle.module.js +1 -8
- package/dist/node/toggle-group/toggle-group.js +1 -55
- package/dist/node/toggle-group/toggle-group.module.js +1 -6
- package/dist/node/toggletip/toggletip.js +1 -49
- package/dist/node/toggletip/toggletip.module.js +1 -7
- package/dist/node/tooltip/tooltip.js +1 -58
- package/dist/node/tooltip/tooltip.module.js +1 -6
- package/dist/node/tree-view/tree-view.js +1 -201
- package/dist/node/tree-view/tree-view.module.js +1 -13
- package/dist/node/user/user.js +1 -35
- package/dist/node/user/user.module.js +1 -9
- package/dist/node/virtual-list/virtual-list.js +1 -40
- package/dist/node/virtual-list/virtual-list.module.js +1 -7
- package/dist/node/visually-hidden/visually-hidden.js +1 -2
- package/dist/node/wheel-picker/wheel-picker.js +1 -84
- package/dist/node/wheel-picker/wheel-picker.module.js +1 -8
- package/dist/notification/notification.js +1 -140
- package/dist/notification/notification.module.js +1 -11
- package/dist/number-input/number-input.js +1 -147
- package/dist/number-input/number-input.module.js +1 -12
- package/dist/otp-input/otp-input.js +1 -70
- package/dist/otp-input/otp-input.module.js +1 -6
- package/dist/overflow-menu/overflow-menu.js +1 -70
- package/dist/overflow-menu/overflow-menu.module.js +1 -7
- package/dist/pagination/pagination.js +1 -92
- package/dist/pagination/pagination.module.js +1 -11
- package/dist/password-input/password-input.js +1 -81
- package/dist/password-input/password-input.module.js +1 -11
- package/dist/popover/popover.js +1 -51
- package/dist/popover/popover.module.js +1 -6
- package/dist/popover/use-popover.js +1 -55
- package/dist/progress/progress.css +1 -1
- package/dist/progress/progress.js +1 -16
- package/dist/progress/progress.module.js +1 -6
- package/dist/progress-bar/progress-bar.css +1 -1
- package/dist/progress-bar/progress-bar.js +1 -42
- package/dist/progress-bar/progress-bar.module.js +1 -11
- package/dist/progress-circle/progress-circle.js +1 -46
- package/dist/progress-circle/progress-circle.module.js +1 -9
- package/dist/progress-indicator/progress-indicator.css +1 -1
- package/dist/progress-indicator/progress-indicator.js +1 -34
- package/dist/progress-indicator/progress-indicator.module.js +1 -10
- package/dist/prose/prose.css +1 -1
- package/dist/prose/prose.js +1 -13
- package/dist/prose/prose.module.js +1 -3
- package/dist/pull-to-refresh/pull-to-refresh.js +1 -82
- package/dist/pull-to-refresh/pull-to-refresh.module.js +1 -9
- package/dist/qr-code/encode.js +1 -583
- package/dist/qr-code/qr-code.js +1 -41
- package/dist/qr-code/qr-code.module.js +1 -6
- package/dist/radial-progress/radial-progress.js +1 -27
- package/dist/radial-progress/radial-progress.module.js +1 -6
- package/dist/radio/radio.js +1 -48
- package/dist/radio/radio.module.js +1 -9
- package/dist/radio-card/radio-card.css +1 -1
- package/dist/radio-card/radio-card.js +1 -64
- package/dist/radio-card/radio-card.module.js +1 -11
- package/dist/rating-group/rating-group.js +1 -37
- package/dist/rating-group/rating-group.module.js +1 -6
- package/dist/react/src/index.js +1 -141
- package/dist/relative-time/relative-time.js +1 -66
- package/dist/relative-time/relative-time.module.js +1 -3
- package/dist/reorder-list/reorder-list.css +1 -1
- package/dist/reorder-list/reorder-list.js +1 -143
- package/dist/reorder-list/reorder-list.module.js +1 -11
- package/dist/resizable/resizable.js +1 -80
- package/dist/resizable/resizable.module.js +1 -8
- package/dist/scroll-area/scroll-area.css +1 -1
- package/dist/scroll-area/scroll-area.js +1 -38
- package/dist/scroll-area/scroll-area.module.js +1 -3
- package/dist/search/search.js +1 -92
- package/dist/search/search.module.js +1 -9
- package/dist/segmented-control/segmented-control.js +1 -43
- package/dist/segmented-control/segmented-control.module.js +1 -6
- package/dist/select/select.js +1 -72
- package/dist/select/select.module.js +1 -11
- package/dist/separator/separator.js +1 -19
- package/dist/separator/separator.module.js +1 -3
- package/dist/sheet/sheet.js +1 -49
- package/dist/sheet/sheet.module.js +1 -9
- package/dist/shell-header/shell-header.css +1 -1
- package/dist/shell-header/shell-header.js +1 -169
- package/dist/shell-header/shell-header.module.js +1 -24
- package/dist/side-nav/side-nav.css +1 -1
- package/dist/side-nav/side-nav.js +1 -334
- package/dist/side-nav/side-nav.module.js +1 -31
- package/dist/skeleton/skeleton.css +1 -1
- package/dist/skeleton/skeleton.js +1 -23
- package/dist/skeleton/skeleton.module.js +1 -7
- package/dist/skip-nav/skip-nav.js +1 -28
- package/dist/skip-nav/skip-nav.module.js +1 -3
- package/dist/slider/slider.js +1 -29
- package/dist/slider/slider.module.js +1 -7
- package/dist/spinner/spinner.css +1 -1
- package/dist/spinner/spinner.js +1 -18
- package/dist/spinner/spinner.module.js +1 -6
- package/dist/stack/stack.js +1 -17
- package/dist/stack/stack.module.js +1 -6
- package/dist/stat/stat.js +1 -41
- package/dist/stat/stat.module.js +1 -11
- package/dist/status/status.css +1 -1
- package/dist/status/status.js +1 -25
- package/dist/status/status.module.js +1 -7
- package/dist/steps/steps.css +1 -1
- package/dist/steps/steps.js +1 -35
- package/dist/steps/steps.module.js +1 -8
- package/dist/structured-list/structured-list.js +1 -102
- package/dist/structured-list/structured-list.module.js +1 -12
- package/dist/styles.css +395 -53
- package/dist/swap/swap.css +1 -1
- package/dist/swap/swap.js +1 -36
- package/dist/swap/swap.module.js +1 -7
- package/dist/swipe-item/swipe-item.js +1 -62
- package/dist/swipe-item/swipe-item.module.js +1 -12
- package/dist/switcher/switcher.js +1 -32
- package/dist/switcher/switcher.module.js +1 -8
- package/dist/tabs/tabs.js +1 -98
- package/dist/tabs/tabs.module.js +1 -8
- package/dist/tag/tag.js +1 -33
- package/dist/tag/tag.module.js +1 -6
- package/dist/tags-input/tags-input.js +1 -64
- package/dist/tags-input/tags-input.module.js +1 -8
- package/dist/text/text.css +1 -1
- package/dist/text/text.js +1 -16
- package/dist/text/text.module.js +1 -3
- package/dist/textarea/textarea.css +1 -1
- package/dist/textarea/textarea.js +1 -57
- package/dist/textarea/textarea.module.js +1 -9
- package/dist/tile/tile.css +1 -1
- package/dist/tile/tile.js +1 -39
- package/dist/tile/tile.module.js +1 -7
- package/dist/time-picker/time-picker.js +1 -63
- package/dist/time-picker/time-picker.module.js +1 -9
- package/dist/timeline/timeline.js +1 -55
- package/dist/timeline/timeline.module.js +1 -11
- package/dist/toast/toast.css +1 -1
- package/dist/toast/toast.js +1 -85
- package/dist/toast/toast.module.js +1 -11
- package/dist/toc/toc.css +1 -1
- package/dist/toc/toc.js +1 -43
- package/dist/toc/toc.module.js +1 -3
- package/dist/toc/use-toc-from-region.js +1 -18
- package/dist/toggle/toggle.js +1 -41
- package/dist/toggle/toggle.module.js +1 -8
- package/dist/toggle-group/toggle-group.js +1 -55
- package/dist/toggle-group/toggle-group.module.js +1 -6
- package/dist/toggletip/toggletip.js +1 -49
- package/dist/toggletip/toggletip.module.js +1 -7
- package/dist/tooltip/tooltip.css +1 -1
- package/dist/tooltip/tooltip.js +1 -58
- package/dist/tooltip/tooltip.module.js +1 -6
- package/dist/tree-view/tree-view.css +1 -1
- package/dist/tree-view/tree-view.js +1 -201
- package/dist/tree-view/tree-view.module.js +1 -13
- package/dist/user/user.js +1 -35
- package/dist/user/user.module.js +1 -9
- package/dist/virtual-list/virtual-list.js +1 -40
- package/dist/virtual-list/virtual-list.module.js +1 -7
- package/dist/visually-hidden/visually-hidden.js +1 -2
- package/dist/wheel-picker/wheel-picker.js +1 -84
- package/dist/wheel-picker/wheel-picker.module.js +1 -8
- package/package.json +4 -4
- package/readme.body.md +7 -5
|
@@ -1,14 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
calendar: "_calendar_7pqxh_2",
|
|
3
|
-
header: "_header_7pqxh_33",
|
|
4
|
-
monthLabel: "_monthLabel_7pqxh_40",
|
|
5
|
-
navButton: "_navButton_7pqxh_46",
|
|
6
|
-
navSpacer: "_navSpacer_7pqxh_69",
|
|
7
|
-
grid: "_grid_7pqxh_74",
|
|
8
|
-
weekday: "_weekday_7pqxh_79",
|
|
9
|
-
cell: "_cell_7pqxh_88",
|
|
10
|
-
empty: "_empty_7pqxh_99",
|
|
11
|
-
day: "_day_7pqxh_104"
|
|
12
|
-
};
|
|
13
|
-
//#endregion
|
|
14
|
-
export { e as default };
|
|
1
|
+
var e={calendar:`_calendar_7zg07_2`,header:`_header_7zg07_33`,monthLabel:`_monthLabel_7zg07_40`,navButton:`_navButton_7zg07_46`,navSpacer:`_navSpacer_7zg07_69`,grid:`_grid_7zg07_74`,weekday:`_weekday_7zg07_79`,cell:`_cell_7zg07_88`,empty:`_empty_7zg07_99`,day:`_day_7zg07_104`,srOnly:`_srOnly_7zg07_143`,weekNumber:`_weekNumber_7zg07_155`,footer:`_footer_7zg07_163`,todayButton:`_todayButton_7zg07_170`};export{e as default};
|
package/dist/node/card/card.js
CHANGED
|
@@ -1,53 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import { cn as t } from "@cascivo/core/pure";
|
|
3
|
-
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
-
//#region ../components/src/card/card.tsx
|
|
5
|
-
function i({ variant: r = "default", padding: i = "md", className: a, children: o, ...s }) {
|
|
6
|
-
return /* @__PURE__ */ n("div", {
|
|
7
|
-
"data-variant": r,
|
|
8
|
-
"data-padding": i,
|
|
9
|
-
className: t(e.card, a),
|
|
10
|
-
...s,
|
|
11
|
-
children: o
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
function a({ actions: i, className: a, children: o, ...s }) {
|
|
15
|
-
return i === void 0 ? /* @__PURE__ */ n("div", {
|
|
16
|
-
className: t(e.header, a),
|
|
17
|
-
...s,
|
|
18
|
-
children: o
|
|
19
|
-
}) : /* @__PURE__ */ r("div", {
|
|
20
|
-
className: t(e.header, e.headerRow, a),
|
|
21
|
-
...s,
|
|
22
|
-
children: [/* @__PURE__ */ n("div", {
|
|
23
|
-
className: e.headerMain,
|
|
24
|
-
children: o
|
|
25
|
-
}), /* @__PURE__ */ n("div", {
|
|
26
|
-
className: e.headerActions,
|
|
27
|
-
children: i
|
|
28
|
-
})]
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
function o({ className: r, children: i, ...a }) {
|
|
32
|
-
return /* @__PURE__ */ n("h3", {
|
|
33
|
-
className: t(e.title, r),
|
|
34
|
-
...a,
|
|
35
|
-
children: i
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
function s({ className: r, children: i, ...a }) {
|
|
39
|
-
return /* @__PURE__ */ n("div", {
|
|
40
|
-
className: t(e.content, r),
|
|
41
|
-
...a,
|
|
42
|
-
children: i
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
function c({ className: r, children: i, ...a }) {
|
|
46
|
-
return /* @__PURE__ */ n("div", {
|
|
47
|
-
className: t(e.footer, r),
|
|
48
|
-
...a,
|
|
49
|
-
children: i
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
//#endregion
|
|
53
|
-
export { i as Card, s as CardContent, c as CardFooter, a as CardHeader, o as CardTitle };
|
|
1
|
+
import e from"./card.module.js";import{cn as t}from"@cascivo/core/pure";import{jsx as n,jsxs as r}from"react/jsx-runtime";function i({variant:r=`default`,padding:i=`md`,className:a,children:o,...s}){return n(`div`,{"data-cascivo-card":``,"data-variant":r,"data-padding":i,className:t(e.card,a),...s,children:o})}function a({actions:i,className:a,children:o,...s}){return i===void 0?n(`div`,{className:t(e.header,a),...s,children:o}):r(`div`,{className:t(e.header,e.headerRow,a),...s,children:[n(`div`,{className:e.headerMain,children:o}),n(`div`,{className:e.headerActions,children:i})]})}function o({className:r,children:i,...a}){return n(`h3`,{className:t(e.title,r),...a,children:i})}function s({className:r,children:i,...a}){return n(`div`,{className:t(e.content,r),...a,children:i})}function c({className:r,children:i,...a}){return n(`div`,{className:t(e.footer,r),...a,children:i})}export{i as Card,s as CardContent,c as CardFooter,a as CardHeader,o as CardTitle};
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
card: "_card_ipz9f_2",
|
|
3
|
-
header: "_header_ipz9f_19",
|
|
4
|
-
content: "_content_ipz9f_19",
|
|
5
|
-
footer: "_footer_ipz9f_19",
|
|
6
|
-
headerRow: "_headerRow_ipz9f_74",
|
|
7
|
-
headerMain: "_headerMain_ipz9f_82",
|
|
8
|
-
headerActions: "_headerActions_ipz9f_89",
|
|
9
|
-
title: "_title_ipz9f_97"
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
12
|
-
export { e as default };
|
|
1
|
+
var e={card:`_card_ipz9f_2`,header:`_header_ipz9f_19`,content:`_content_ipz9f_19`,footer:`_footer_ipz9f_19`,headerRow:`_headerRow_ipz9f_74`,headerMain:`_headerMain_ipz9f_82`,headerActions:`_headerActions_ipz9f_89`,title:`_title_ipz9f_97`};export{e as default};
|
|
@@ -1,138 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./carousel.module.js";
|
|
4
|
-
import { useId as t, useRef as n } from "react";
|
|
5
|
-
import { cn as r, useControllableSignal as i, useRovingFocus as a, useSignalEffect as o, useSignals as s } from "@cascivo/core";
|
|
6
|
-
import { builtin as c, t as l } from "@cascivo/i18n";
|
|
7
|
-
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
8
|
-
//#region ../components/src/carousel/carousel.tsx
|
|
9
|
-
function f(e, t) {
|
|
10
|
-
return t || (e == null ? [] : Array.isArray(e) ? e : [e]);
|
|
11
|
-
}
|
|
12
|
-
function p({ children: p, slides: m, index: h, defaultIndex: g, onIndexChange: _, loop: v = !1, className: y, labels: b }) {
|
|
13
|
-
s();
|
|
14
|
-
let x = t(), S = f(p, m), C = S.length, [w, T] = i({
|
|
15
|
-
value: h,
|
|
16
|
-
defaultValue: g ?? 0,
|
|
17
|
-
onChange: _
|
|
18
|
-
}), E = n(null), D = n([]), O = n(!1), { getItemProps: k, setActiveIndex: A } = a({
|
|
19
|
-
orientation: "horizontal",
|
|
20
|
-
loop: v
|
|
21
|
-
});
|
|
22
|
-
o(() => {
|
|
23
|
-
let e = E.current;
|
|
24
|
-
if (!e) return;
|
|
25
|
-
let t = () => {
|
|
26
|
-
if (O.current) return;
|
|
27
|
-
let t = Math.round(e.scrollLeft / e.clientWidth);
|
|
28
|
-
t !== w.value && T(t);
|
|
29
|
-
};
|
|
30
|
-
return e.addEventListener("scroll", t, { passive: !0 }), () => e.removeEventListener("scroll", t);
|
|
31
|
-
});
|
|
32
|
-
let j = (e) => {
|
|
33
|
-
if (C === 0) return;
|
|
34
|
-
let t = e;
|
|
35
|
-
t < 0 && (t = v ? C - 1 : 0), t >= C && (t = v ? 0 : C - 1);
|
|
36
|
-
let n = E.current;
|
|
37
|
-
n && typeof n.scrollTo == "function" && (O.current = !0, n.scrollTo({
|
|
38
|
-
left: t * n.clientWidth,
|
|
39
|
-
behavior: "smooth"
|
|
40
|
-
}), window.setTimeout(() => {
|
|
41
|
-
O.current = !1;
|
|
42
|
-
}, 400)), T(t), A(t);
|
|
43
|
-
}, M = b?.region ?? l(c.carousel.region), N = b?.previous ?? l(c.carousel.previous), P = b?.next ?? l(c.carousel.next);
|
|
44
|
-
return /* @__PURE__ */ d("section", {
|
|
45
|
-
className: r(e.carousel, y),
|
|
46
|
-
"aria-roledescription": "carousel",
|
|
47
|
-
"aria-label": M,
|
|
48
|
-
children: [/* @__PURE__ */ d("div", {
|
|
49
|
-
className: e.viewport,
|
|
50
|
-
children: [
|
|
51
|
-
/* @__PURE__ */ u("button", {
|
|
52
|
-
type: "button",
|
|
53
|
-
className: r(e.nav, e.prev),
|
|
54
|
-
"aria-label": N,
|
|
55
|
-
"aria-controls": `${x}-track`,
|
|
56
|
-
disabled: !v && w.value <= 0,
|
|
57
|
-
onClick: () => j(w.value - 1),
|
|
58
|
-
children: /* @__PURE__ */ u("svg", {
|
|
59
|
-
width: "20",
|
|
60
|
-
height: "20",
|
|
61
|
-
viewBox: "0 0 24 24",
|
|
62
|
-
fill: "none",
|
|
63
|
-
"aria-hidden": "true",
|
|
64
|
-
children: /* @__PURE__ */ u("path", {
|
|
65
|
-
d: "m15 18-6-6 6-6",
|
|
66
|
-
stroke: "currentColor",
|
|
67
|
-
strokeWidth: "2",
|
|
68
|
-
strokeLinecap: "round",
|
|
69
|
-
strokeLinejoin: "round"
|
|
70
|
-
})
|
|
71
|
-
})
|
|
72
|
-
}),
|
|
73
|
-
/* @__PURE__ */ u("div", {
|
|
74
|
-
ref: E,
|
|
75
|
-
id: `${x}-track`,
|
|
76
|
-
className: e.track,
|
|
77
|
-
children: S.map((t, n) => /* @__PURE__ */ u("div", {
|
|
78
|
-
ref: (e) => {
|
|
79
|
-
D.current[n] = e;
|
|
80
|
-
},
|
|
81
|
-
className: e.slide,
|
|
82
|
-
role: "group",
|
|
83
|
-
"aria-roledescription": "slide",
|
|
84
|
-
"aria-label": l(c.carousel.slide, {
|
|
85
|
-
n: n + 1,
|
|
86
|
-
total: C
|
|
87
|
-
}),
|
|
88
|
-
"aria-hidden": n !== w.value || void 0,
|
|
89
|
-
children: t
|
|
90
|
-
}, n))
|
|
91
|
-
}),
|
|
92
|
-
/* @__PURE__ */ u("button", {
|
|
93
|
-
type: "button",
|
|
94
|
-
className: r(e.nav, e.next),
|
|
95
|
-
"aria-label": P,
|
|
96
|
-
"aria-controls": `${x}-track`,
|
|
97
|
-
disabled: !v && w.value >= C - 1,
|
|
98
|
-
onClick: () => j(w.value + 1),
|
|
99
|
-
children: /* @__PURE__ */ u("svg", {
|
|
100
|
-
width: "20",
|
|
101
|
-
height: "20",
|
|
102
|
-
viewBox: "0 0 24 24",
|
|
103
|
-
fill: "none",
|
|
104
|
-
"aria-hidden": "true",
|
|
105
|
-
children: /* @__PURE__ */ u("path", {
|
|
106
|
-
d: "m9 18 6-6-6-6",
|
|
107
|
-
stroke: "currentColor",
|
|
108
|
-
strokeWidth: "2",
|
|
109
|
-
strokeLinecap: "round",
|
|
110
|
-
strokeLinejoin: "round"
|
|
111
|
-
})
|
|
112
|
-
})
|
|
113
|
-
})
|
|
114
|
-
]
|
|
115
|
-
}), /* @__PURE__ */ u("div", {
|
|
116
|
-
className: e.dots,
|
|
117
|
-
role: "group",
|
|
118
|
-
"aria-label": M,
|
|
119
|
-
children: S.map((t, n) => {
|
|
120
|
-
let r = k(n);
|
|
121
|
-
return /* @__PURE__ */ u("button", {
|
|
122
|
-
ref: r.ref,
|
|
123
|
-
type: "button",
|
|
124
|
-
className: e.dot,
|
|
125
|
-
"aria-label": l(c.carousel.goTo, { n: n + 1 }),
|
|
126
|
-
"aria-current": n === w.value || void 0,
|
|
127
|
-
"data-active": n === w.value || void 0,
|
|
128
|
-
tabIndex: r.tabIndex,
|
|
129
|
-
onKeyDown: r.onKeyDown,
|
|
130
|
-
onFocus: r.onFocus,
|
|
131
|
-
onClick: () => j(n)
|
|
132
|
-
}, n);
|
|
133
|
-
})
|
|
134
|
-
})]
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
//#endregion
|
|
138
|
-
export { p as Carousel };
|
|
1
|
+
"use client";import e from"./carousel.module.js";import{Children as t,useId as n,useRef as r}from"react";import{cn as i,useControllableSignal as a,useMediaQuery as o,useRovingFocus as s,useSignal as c,useSignalEffect as l,useSignals as u}from"@cascivo/core";import{builtin as d,t as f}from"@cascivo/i18n";import{jsx as p,jsxs as m}from"react/jsx-runtime";function h(e,n){return n||t.toArray(e)}function g({children:t,slides:g,index:_,defaultIndex:v,onIndexChange:y,loop:b=!1,autoplay:x,className:S,labels:C}){u();let w=n(),T=h(t,g),E=T.length,[D,O]=a({value:_,defaultValue:v??0,onChange:y}),k=r(null),A=r(!1),j=o(`(prefers-reduced-motion: reduce)`),{getItemProps:M,setActiveIndex:N}=s({orientation:`horizontal`,loop:b});l(()=>{let e=k.current;if(!e)return;let t=()=>{if(A.current||e.clientWidth===0)return;let t=Math.round(e.scrollLeft/e.clientWidth);t!==D.value&&O(t)};return e.addEventListener(`scroll`,t,{passive:!0}),()=>e.removeEventListener(`scroll`,t)});let P=e=>{if(E===0)return;let t=e;t<0&&(t=b?E-1:0),t>=E&&(t=b?0:E-1);let n=k.current;n&&typeof n.scrollTo==`function`&&n.clientWidth>0&&(A.current=!0,n.scrollTo({left:t*n.clientWidth,behavior:j.value?`auto`:`smooth`}),window.setTimeout(()=>{A.current=!1},400)),O(t),N(t)};l(()=>{N(D.value)});let F=c(x!==void 0&&x>0),I=c(!1);l(()=>{if(!x||x<=0||!F.value||I.value||j.value)return;let e=window.setInterval(()=>{let e=D.peek()+1;P(e>=E?0:e)},x);return()=>window.clearInterval(e)}),l(()=>{if(typeof document>`u`)return;let e=()=>{I.value=document.hidden};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)});let L=C?.region??f(d.carousel.region),R=C?.previous??f(d.carousel.previous),z=C?.next??f(d.carousel.next),B=C?.play??f(d.carousel.play),V=C?.pause??f(d.carousel.pause),H=!!(x&&x>0);return m(`section`,{className:i(e.carousel,S),"aria-roledescription":`carousel`,"aria-label":L,onMouseEnter:()=>{H&&(I.value=!0)},onMouseLeave:()=>{H&&(I.value=!1)},onFocusCapture:()=>{H&&(I.value=!0)},onBlurCapture:e=>{H&&!e.currentTarget.contains(e.relatedTarget)&&(I.value=!1)},children:[m(`div`,{className:e.viewport,children:[p(`button`,{type:`button`,className:i(e.nav,e.prev),"aria-label":R,"aria-controls":`${w}-track`,disabled:!b&&D.value<=0,onClick:()=>P(D.value-1),children:p(`span`,{className:i(e.chevron,e.chevronPrev),"aria-hidden":`true`})}),p(`div`,{ref:k,id:`${w}-track`,className:e.track,"aria-live":H&&F.value&&!I.value?`off`:`polite`,children:T.map((t,n)=>p(`div`,{className:e.slide,role:`group`,"aria-roledescription":`slide`,"aria-label":f(d.carousel.slide,{n:n+1,total:E}),inert:n===D.value?void 0:!0,children:t},n))}),p(`button`,{type:`button`,className:i(e.nav,e.next),"aria-label":z,"aria-controls":`${w}-track`,disabled:!b&&D.value>=E-1,onClick:()=>P(D.value+1),children:p(`span`,{className:i(e.chevron,e.chevronNext),"aria-hidden":`true`})})]}),m(`div`,{className:e.controls,children:[H&&p(`button`,{type:`button`,className:e.playPause,"aria-label":F.value?V:B,onClick:()=>{F.value=!F.value},children:p(`span`,{className:F.value?e.pauseGlyph:e.playGlyph,"aria-hidden":`true`})}),p(`div`,{className:e.dots,role:`group`,"aria-label":f(d.carousel.choose),children:T.map((t,n)=>{let r=M(n);return p(`button`,{ref:r.ref,type:`button`,className:e.dot,"aria-label":f(d.carousel.goTo,{n:n+1}),"aria-current":n===D.value||void 0,"data-active":n===D.value||void 0,tabIndex:r.tabIndex,onKeyDown:r.onKeyDown,onFocus:()=>{r.onFocus?.(),n!==D.value&&P(n)},onClick:()=>P(n)},n)})})]})]})}export{g as Carousel};
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
carousel: "_carousel_1dvrl_2",
|
|
3
|
-
viewport: "_viewport_1dvrl_9",
|
|
4
|
-
track: "_track_1dvrl_15",
|
|
5
|
-
slide: "_slide_1dvrl_28",
|
|
6
|
-
nav: "_nav_1dvrl_35",
|
|
7
|
-
prev: "_prev_1dvrl_65",
|
|
8
|
-
next: "_next_1dvrl_69",
|
|
9
|
-
dots: "_dots_1dvrl_73",
|
|
10
|
-
dot: "_dot_1dvrl_73"
|
|
11
|
-
};
|
|
12
|
-
//#endregion
|
|
13
|
-
export { e as default };
|
|
1
|
+
var e={carousel:`_carousel_1j5w5_2`,viewport:`_viewport_1j5w5_9`,track:`_track_1j5w5_15`,slide:`_slide_1j5w5_28`,nav:`_nav_1j5w5_35`,prev:`_prev_1j5w5_65`,next:`_next_1j5w5_69`,controls:`_controls_1j5w5_73`,dots:`_dots_1j5w5_80`,chevron:`_chevron_1j5w5_87`,chevronPrev:`_chevronPrev_1j5w5_94`,chevronNext:`_chevronNext_1j5w5_99`,playPause:`_playPause_1j5w5_104`,playGlyph:`_playGlyph_1j5w5_123`,pauseGlyph:`_pauseGlyph_1j5w5_124`,dot:`_dot_1j5w5_80`};export{e as default};
|
|
@@ -1,31 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
//#region ../components/src/chat-bubble/chat-bubble.tsx
|
|
4
|
-
function r({ children: r, side: i = "start", avatar: a, name: o, time: s, className: c }) {
|
|
5
|
-
return /* @__PURE__ */ n("div", {
|
|
6
|
-
className: [e.bubble, c].filter(Boolean).join(" "),
|
|
7
|
-
"data-side": i,
|
|
8
|
-
children: [a && /* @__PURE__ */ t("div", {
|
|
9
|
-
className: e.avatar,
|
|
10
|
-
"aria-hidden": "true",
|
|
11
|
-
children: a
|
|
12
|
-
}), /* @__PURE__ */ n("div", {
|
|
13
|
-
className: e.content,
|
|
14
|
-
children: [(o || s) && /* @__PURE__ */ n("div", {
|
|
15
|
-
className: e.meta,
|
|
16
|
-
children: [o && /* @__PURE__ */ t("span", {
|
|
17
|
-
className: e.name,
|
|
18
|
-
children: o
|
|
19
|
-
}), s && /* @__PURE__ */ t("time", {
|
|
20
|
-
className: e.time,
|
|
21
|
-
children: s
|
|
22
|
-
})]
|
|
23
|
-
}), /* @__PURE__ */ t("div", {
|
|
24
|
-
className: e.body,
|
|
25
|
-
children: r
|
|
26
|
-
})]
|
|
27
|
-
})]
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
//#endregion
|
|
31
|
-
export { r as ChatBubble };
|
|
1
|
+
import e from"./chat-bubble.module.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";function r({children:r,side:i=`start`,avatar:a,name:o,time:s,className:c}){return n(`div`,{className:[e.bubble,c].filter(Boolean).join(` `),"data-side":i,children:[a&&t(`div`,{className:e.avatar,"aria-hidden":`true`,children:a}),n(`div`,{className:e.content,children:[(o||s)&&n(`div`,{className:e.meta,children:[o&&t(`span`,{className:e.name,children:o}),s&&t(`time`,{className:e.time,children:s})]}),t(`div`,{className:e.body,children:r})]})]})}export{r as ChatBubble};
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
bubble: "_bubble_ykkyv_2",
|
|
3
|
-
avatar: "_avatar_ykkyv_18",
|
|
4
|
-
content: "_content_ykkyv_23",
|
|
5
|
-
meta: "_meta_ykkyv_32",
|
|
6
|
-
name: "_name_ykkyv_40",
|
|
7
|
-
time: "_time_ykkyv_44",
|
|
8
|
-
body: "_body_ykkyv_48"
|
|
9
|
-
};
|
|
10
|
-
//#endregion
|
|
11
|
-
export { e as default };
|
|
1
|
+
var e={bubble:`_bubble_ykkyv_2`,avatar:`_avatar_ykkyv_18`,content:`_content_ykkyv_23`,meta:`_meta_ykkyv_32`,name:`_name_ykkyv_40`,time:`_time_ykkyv_44`,body:`_body_ykkyv_48`};export{e as default};
|
|
@@ -1,38 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./checkbox.module.js";
|
|
4
|
-
import { forwardRef as t, useRef as n } from "react";
|
|
5
|
-
import { cn as r, composeRefs as i, useEffectPropSignal as a, useSignalEffect as o } from "@cascivo/core";
|
|
6
|
-
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/checkbox/checkbox.tsx
|
|
8
|
-
var l = t(function({ label: t, indeterminate: l = !1, className: u, id: d, disabled: f, ...p }, m) {
|
|
9
|
-
let h = n(null), g = a(l);
|
|
10
|
-
o(() => {
|
|
11
|
-
h.current && (h.current.indeterminate = g.value);
|
|
12
|
-
});
|
|
13
|
-
let _ = d ?? (t ? `cascade-checkbox-${t.toLowerCase().replace(/\s+/g, "-")}` : void 0);
|
|
14
|
-
return /* @__PURE__ */ c("label", {
|
|
15
|
-
className: r(e.wrapper, u),
|
|
16
|
-
"data-disabled": f || void 0,
|
|
17
|
-
children: [
|
|
18
|
-
/* @__PURE__ */ s("input", {
|
|
19
|
-
ref: i(m, h),
|
|
20
|
-
id: _,
|
|
21
|
-
type: "checkbox",
|
|
22
|
-
className: e.input,
|
|
23
|
-
disabled: f,
|
|
24
|
-
...p
|
|
25
|
-
}),
|
|
26
|
-
/* @__PURE__ */ s("span", {
|
|
27
|
-
className: e.control,
|
|
28
|
-
"aria-hidden": "true"
|
|
29
|
-
}),
|
|
30
|
-
t && /* @__PURE__ */ s("span", {
|
|
31
|
-
className: e.label,
|
|
32
|
-
children: t
|
|
33
|
-
})
|
|
34
|
-
]
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
//#endregion
|
|
38
|
-
export { l as Checkbox };
|
|
1
|
+
"use client";import e from"./checkbox.module.js";import{forwardRef as t,useRef as n}from"react";import{cn as r,composeRefs as i,useEffectPropSignal as a,useSignalEffect as o}from"@cascivo/core";import{jsx as s,jsxs as c}from"react/jsx-runtime";var l=t(function({label:t,indeterminate:l=!1,ariaLabel:u,className:d,id:f,disabled:p,...m},h){let g=n(null),_=a(l);o(()=>{g.current&&(g.current.indeterminate=_.value)});let v=f??(t?`cascade-checkbox-${t.toLowerCase().replace(/\s+/g,`-`)}`:void 0);return c(`label`,{className:r(e.wrapper,d),"data-disabled":p||void 0,children:[s(`input`,{ref:i(h,g),id:v,type:`checkbox`,className:e.input,disabled:p,...m,"aria-label":m[`aria-label`]??u}),s(`span`,{className:e.control,"aria-hidden":`true`}),t&&s(`span`,{className:e.label,children:t})]})});export{l as Checkbox};
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
wrapper: "_wrapper_4zlmw_2",
|
|
3
|
-
input: "_input_4zlmw_15",
|
|
4
|
-
control: "_control_4zlmw_28",
|
|
5
|
-
label: "_label_4zlmw_78"
|
|
6
|
-
};
|
|
7
|
-
//#endregion
|
|
8
|
-
export { e as default };
|
|
1
|
+
var e={wrapper:`_wrapper_4zlmw_2`,input:`_input_4zlmw_15`,control:`_control_4zlmw_28`,label:`_label_4zlmw_78`};export{e as default};
|
|
@@ -1,50 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./checkbox-card.module.js";
|
|
4
|
-
import { forwardRef as t } from "react";
|
|
5
|
-
import { cn as n } from "@cascivo/core";
|
|
6
|
-
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
7
|
-
//#region ../components/src/checkbox-card/checkbox-card.tsx
|
|
8
|
-
var a = t(function({ title: t, description: a, checked: o, defaultChecked: s, disabled: c, onCheckedChange: l, className: u, ...d }, f) {
|
|
9
|
-
return /* @__PURE__ */ i("label", {
|
|
10
|
-
className: n(e.card, u),
|
|
11
|
-
"data-disabled": c || void 0,
|
|
12
|
-
children: [
|
|
13
|
-
/* @__PURE__ */ r("input", {
|
|
14
|
-
type: "checkbox",
|
|
15
|
-
className: e.input,
|
|
16
|
-
disabled: c,
|
|
17
|
-
...o === void 0 ? { defaultChecked: s } : { checked: o },
|
|
18
|
-
onChange: (e) => l?.(e.currentTarget.checked),
|
|
19
|
-
ref: f,
|
|
20
|
-
...d
|
|
21
|
-
}),
|
|
22
|
-
/* @__PURE__ */ r("span", {
|
|
23
|
-
className: e.glyph,
|
|
24
|
-
"aria-hidden": "true",
|
|
25
|
-
children: /* @__PURE__ */ r("svg", {
|
|
26
|
-
viewBox: "0 0 12 12",
|
|
27
|
-
className: e.check,
|
|
28
|
-
children: /* @__PURE__ */ r("path", {
|
|
29
|
-
d: "M2.5 6.5 5 9l4.5-5.5",
|
|
30
|
-
fill: "none",
|
|
31
|
-
stroke: "currentColor",
|
|
32
|
-
strokeWidth: "1.5"
|
|
33
|
-
})
|
|
34
|
-
})
|
|
35
|
-
}),
|
|
36
|
-
/* @__PURE__ */ i("span", {
|
|
37
|
-
className: e.body,
|
|
38
|
-
children: [/* @__PURE__ */ r("span", {
|
|
39
|
-
className: e.title,
|
|
40
|
-
children: t
|
|
41
|
-
}), a && /* @__PURE__ */ r("span", {
|
|
42
|
-
className: e.description,
|
|
43
|
-
children: a
|
|
44
|
-
})]
|
|
45
|
-
})
|
|
46
|
-
]
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
//#endregion
|
|
50
|
-
export { a as CheckboxCard };
|
|
1
|
+
"use client";import e from"./checkbox-card.module.js";import{forwardRef as t}from"react";import{cn as n}from"@cascivo/core";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a=t(function({title:t,description:a,checked:o,defaultChecked:s,disabled:c,onCheckedChange:l,className:u,...d},f){return i(`label`,{className:n(e.card,u),"data-disabled":c||void 0,children:[r(`input`,{type:`checkbox`,className:e.input,disabled:c,...o===void 0?{defaultChecked:s}:{checked:o},onChange:e=>l?.(e.currentTarget.checked),ref:f,...d}),r(`span`,{className:e.glyph,"aria-hidden":`true`,children:r(`svg`,{viewBox:`0 0 12 12`,className:e.check,children:r(`path`,{d:`M2.5 6.5 5 9l4.5-5.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`})})}),i(`span`,{className:e.body,children:[r(`span`,{className:e.title,children:t}),a&&r(`span`,{className:e.description,children:a})]})]})});export{a as CheckboxCard};
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
card: "_card_102u6_2",
|
|
3
|
-
input: "_input_102u6_34",
|
|
4
|
-
glyph: "_glyph_102u6_43",
|
|
5
|
-
check: "_check_102u6_62",
|
|
6
|
-
body: "_body_102u6_67",
|
|
7
|
-
title: "_title_102u6_73",
|
|
8
|
-
description: "_description_102u6_79"
|
|
9
|
-
};
|
|
10
|
-
//#endregion
|
|
11
|
-
export { e as default };
|
|
1
|
+
var e={card:`_card_x2x8f_2`,input:`_input_x2x8f_34`,glyph:`_glyph_x2x8f_43`,check:`_check_x2x8f_62`,body:`_body_x2x8f_67`,title:`_title_x2x8f_73`,description:`_description_x2x8f_79`};export{e as default};
|
package/dist/node/code/code.js
CHANGED
|
@@ -1,14 +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/code/code.tsx
|
|
5
|
-
function r({ size: r = "md", className: i, children: a, ...o }) {
|
|
6
|
-
return /* @__PURE__ */ n("code", {
|
|
7
|
-
"data-size": r,
|
|
8
|
-
className: t(e.code, i),
|
|
9
|
-
...o,
|
|
10
|
-
children: a
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
export { r as Code };
|
|
1
|
+
import e from"./code.module.js";import{cn as t}from"@cascivo/core/pure";import{jsx as n}from"react/jsx-runtime";function r({size:r=`md`,className:i,children:a,...o}){return n(`code`,{"data-size":r,className:t(e.code,i),...o,children:a})}export{r as Code};
|
|
@@ -1,121 +1,2 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { tokenize as e } from "./highlight.js";
|
|
4
|
-
import t from "./code-snippet.module.js";
|
|
5
|
-
import { cn as n, useClipboard as r, useSignals as i } from "@cascivo/core";
|
|
6
|
-
import { builtin as a, t as o } from "@cascivo/i18n";
|
|
7
|
-
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
-
//#region ../components/src/code-snippet/code-snippet.tsx
|
|
9
|
-
function l() {
|
|
10
|
-
return globalThis.process?.env?.NODE_ENV !== "production";
|
|
11
|
-
}
|
|
12
|
-
function u({ code: n, language: r }) {
|
|
13
|
-
return /* @__PURE__ */ s("code", {
|
|
14
|
-
className: t.code,
|
|
15
|
-
children: e(n, r).map((e, t) => e.type === "text" ? /* @__PURE__ */ s("span", { children: e.value }, t) : /* @__PURE__ */ s("span", {
|
|
16
|
-
"data-tok": e.type,
|
|
17
|
-
children: e.value
|
|
18
|
-
}, t))
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
function d({ code: e, children: d, variant: f = "single", language: p, terminal: m = !1, title: h, showLineNumbers: g, showCopyButton: _, labels: v, className: y }) {
|
|
22
|
-
i();
|
|
23
|
-
let b = e ?? d ?? "";
|
|
24
|
-
l() && e === void 0 && d === void 0 && console.error("CodeSnippet: pass the code either as the `code` prop or as a plain-string child. Rendering nothing.");
|
|
25
|
-
let { copied: x, copy: S } = r(), C = v?.copy ?? o(a.codeSnippet.copy), w = v?.copied ?? o(a.codeSnippet.copied), T = _ ?? f !== "inline" ? /* @__PURE__ */ s("button", {
|
|
26
|
-
type: "button",
|
|
27
|
-
"aria-label": x.value ? w : C,
|
|
28
|
-
"data-state": x.value ? "copied" : "idle",
|
|
29
|
-
className: t.copy,
|
|
30
|
-
onClick: () => void S(b),
|
|
31
|
-
children: x.value ? /* @__PURE__ */ s("svg", {
|
|
32
|
-
"aria-hidden": "true",
|
|
33
|
-
viewBox: "0 0 16 16",
|
|
34
|
-
className: t.icon,
|
|
35
|
-
children: /* @__PURE__ */ s("path", {
|
|
36
|
-
d: "M13.5 4.5 6 12 2.5 8.5",
|
|
37
|
-
fill: "none",
|
|
38
|
-
stroke: "currentColor",
|
|
39
|
-
strokeWidth: "1.5",
|
|
40
|
-
strokeLinecap: "round",
|
|
41
|
-
strokeLinejoin: "round"
|
|
42
|
-
})
|
|
43
|
-
}) : /* @__PURE__ */ c("svg", {
|
|
44
|
-
"aria-hidden": "true",
|
|
45
|
-
viewBox: "0 0 16 16",
|
|
46
|
-
className: t.icon,
|
|
47
|
-
children: [/* @__PURE__ */ s("rect", {
|
|
48
|
-
x: "5.5",
|
|
49
|
-
y: "5.5",
|
|
50
|
-
width: "8",
|
|
51
|
-
height: "8",
|
|
52
|
-
rx: "1.5",
|
|
53
|
-
fill: "none",
|
|
54
|
-
stroke: "currentColor",
|
|
55
|
-
strokeWidth: "1.5"
|
|
56
|
-
}), /* @__PURE__ */ s("path", {
|
|
57
|
-
d: "M3.5 10.5h-1a1 1 0 0 1-1-1v-7a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v1",
|
|
58
|
-
fill: "none",
|
|
59
|
-
stroke: "currentColor",
|
|
60
|
-
strokeWidth: "1.5"
|
|
61
|
-
})]
|
|
62
|
-
})
|
|
63
|
-
}) : null;
|
|
64
|
-
if (f === "inline") return /* @__PURE__ */ c("span", {
|
|
65
|
-
className: n(t.root, y),
|
|
66
|
-
"data-variant": "inline",
|
|
67
|
-
children: [/* @__PURE__ */ s("code", {
|
|
68
|
-
className: t.inlineCode,
|
|
69
|
-
children: b
|
|
70
|
-
}), T]
|
|
71
|
-
});
|
|
72
|
-
let E = b.split("\n"), D = f === "multi" && g && !p;
|
|
73
|
-
return /* @__PURE__ */ c("div", {
|
|
74
|
-
className: n(t.root, y),
|
|
75
|
-
"data-variant": f,
|
|
76
|
-
"data-terminal": m ? "" : void 0,
|
|
77
|
-
children: [
|
|
78
|
-
m && /* @__PURE__ */ c("div", {
|
|
79
|
-
className: t.bar,
|
|
80
|
-
"aria-hidden": "true",
|
|
81
|
-
children: [/* @__PURE__ */ c("span", {
|
|
82
|
-
className: t.dots,
|
|
83
|
-
children: [
|
|
84
|
-
/* @__PURE__ */ s("span", { className: t.dot }),
|
|
85
|
-
/* @__PURE__ */ s("span", { className: t.dot }),
|
|
86
|
-
/* @__PURE__ */ s("span", { className: t.dot })
|
|
87
|
-
]
|
|
88
|
-
}), h && /* @__PURE__ */ s("span", {
|
|
89
|
-
className: t.title,
|
|
90
|
-
children: h
|
|
91
|
-
})]
|
|
92
|
-
}),
|
|
93
|
-
/* @__PURE__ */ s("pre", {
|
|
94
|
-
className: t.pre,
|
|
95
|
-
children: D ? /* @__PURE__ */ s("code", {
|
|
96
|
-
className: t.code,
|
|
97
|
-
children: E.map((e, n) => /* @__PURE__ */ c("span", {
|
|
98
|
-
className: t.line,
|
|
99
|
-
children: [/* @__PURE__ */ s("span", {
|
|
100
|
-
"aria-hidden": "true",
|
|
101
|
-
className: t.lineNumber,
|
|
102
|
-
children: n + 1
|
|
103
|
-
}), /* @__PURE__ */ s("span", {
|
|
104
|
-
className: t.lineText,
|
|
105
|
-
children: e
|
|
106
|
-
})]
|
|
107
|
-
}, n))
|
|
108
|
-
}) : p ? /* @__PURE__ */ s(u, {
|
|
109
|
-
code: b,
|
|
110
|
-
language: p
|
|
111
|
-
}) : /* @__PURE__ */ s("code", {
|
|
112
|
-
className: t.code,
|
|
113
|
-
children: b
|
|
114
|
-
})
|
|
115
|
-
}),
|
|
116
|
-
T
|
|
117
|
-
]
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
//#endregion
|
|
121
|
-
export { d as CodeSnippet };
|
|
1
|
+
"use client";import{tokenize as e}from"./highlight.js";import t from"./code-snippet.module.js";import{cn as n,useClipboard as r,useSignals as i}from"@cascivo/core";import{builtin as a,t as o}from"@cascivo/i18n";import{jsx as s,jsxs as c}from"react/jsx-runtime";function l(){return globalThis.process?.env?.NODE_ENV!==`production`}function u({code:n,language:r}){return s(`code`,{className:t.code,children:e(n,r).map((e,t)=>e.type===`text`?s(`span`,{children:e.value},t):s(`span`,{"data-tok":e.type,children:e.value},t))})}function d({code:e,children:d,variant:f=`single`,language:p,terminal:m=!1,title:h,showLineNumbers:g,showCopyButton:_,labels:v,className:y}){i();let b=e??d??``;l()&&e===void 0&&d===void 0&&console.error("CodeSnippet: pass the code either as the `code` prop or as a plain-string child. Rendering nothing.");let{copied:x,copy:S}=r(),C=v?.copy??o(a.codeSnippet.copy),w=v?.copied??o(a.codeSnippet.copied),T=_??f!==`inline`?s(`button`,{type:`button`,"aria-label":x.value?w:C,"data-state":x.value?`copied`:`idle`,className:t.copy,onClick:()=>void S(b),children:x.value?s(`svg`,{"aria-hidden":`true`,viewBox:`0 0 16 16`,className:t.icon,children:s(`path`,{d:`M13.5 4.5 6 12 2.5 8.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})}):c(`svg`,{"aria-hidden":`true`,viewBox:`0 0 16 16`,className:t.icon,children:[s(`rect`,{x:`5.5`,y:`5.5`,width:`8`,height:`8`,rx:`1.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),s(`path`,{d:`M3.5 10.5h-1a1 1 0 0 1-1-1v-7a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v1`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`})]})}):null;if(f===`inline`)return c(`span`,{className:n(t.root,y),"data-variant":`inline`,children:[s(`code`,{className:t.inlineCode,children:b}),T]});let E=b.split(`
|
|
2
|
+
`),D=f===`multi`&&g&&!p;return c(`div`,{className:n(t.root,y),"data-variant":f,"data-terminal":m?``:void 0,children:[m&&c(`div`,{className:t.bar,"aria-hidden":`true`,children:[c(`span`,{className:t.dots,children:[s(`span`,{className:t.dot}),s(`span`,{className:t.dot}),s(`span`,{className:t.dot})]}),h&&s(`span`,{className:t.title,children:h})]}),s(`pre`,{className:t.pre,children:D?s(`code`,{className:t.code,children:E.map((e,n)=>c(`span`,{className:t.line,children:[s(`span`,{"aria-hidden":`true`,className:t.lineNumber,children:n+1}),s(`span`,{className:t.lineText,children:e})]},n))}):p?s(u,{code:b,language:p}):s(`code`,{className:t.code,children:b})}),T]})}export{d as CodeSnippet};
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
var e
|
|
2
|
-
root: "_root_4lyzf_2",
|
|
3
|
-
inlineCode: "_inlineCode_4lyzf_12",
|
|
4
|
-
pre: "_pre_4lyzf_23",
|
|
5
|
-
code: "_code_4lyzf_44",
|
|
6
|
-
line: "_line_4lyzf_49",
|
|
7
|
-
lineNumber: "_lineNumber_4lyzf_54",
|
|
8
|
-
lineText: "_lineText_4lyzf_62",
|
|
9
|
-
copy: "_copy_4lyzf_66",
|
|
10
|
-
icon: "_icon_4lyzf_106",
|
|
11
|
-
bar: "_bar_4lyzf_153",
|
|
12
|
-
dots: "_dots_4lyzf_163",
|
|
13
|
-
dot: "_dot_4lyzf_163",
|
|
14
|
-
title: "_title_4lyzf_187"
|
|
15
|
-
};
|
|
16
|
-
//#endregion
|
|
17
|
-
export { e as default };
|
|
1
|
+
var e={root:`_root_4lyzf_2`,inlineCode:`_inlineCode_4lyzf_12`,pre:`_pre_4lyzf_23`,code:`_code_4lyzf_44`,line:`_line_4lyzf_49`,lineNumber:`_lineNumber_4lyzf_54`,lineText:`_lineText_4lyzf_62`,copy:`_copy_4lyzf_66`,icon:`_icon_4lyzf_106`,bar:`_bar_4lyzf_153`,dots:`_dots_4lyzf_163`,dot:`_dot_4lyzf_163`,title:`_title_4lyzf_187`};export{e as default};
|
|
@@ -1,67 +1 @@
|
|
|
1
|
-
|
|
2
|
-
function e(e) {
|
|
3
|
-
return e.map(([e, t]) => ({
|
|
4
|
-
type: e,
|
|
5
|
-
re: RegExp(`^(?:${t})`)
|
|
6
|
-
}));
|
|
7
|
-
}
|
|
8
|
-
var t = "\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*'", n = "`(?:[^`\\\\]|\\\\.)*`", r = "const|let|var|function|return|if|else|for|while|do|switch|case|break|continue|new|class|extends|super|import|export|from|default|async|await|yield|typeof|instanceof|in|of|void|delete|this|null|true|false|undefined", i = `${r}|interface|type|as|readonly|enum|implements|public|private|protected|abstract|namespace|declare|satisfies|keyof|infer|is|string|number|boolean|unknown|never|any`, a = {
|
|
9
|
-
bash: e([
|
|
10
|
-
["comment", "#[^\\n]*"],
|
|
11
|
-
["string", t],
|
|
12
|
-
["prompt", "\\$(?= )"],
|
|
13
|
-
["keyword", "\\b(?:npx|npm|pnpm|yarn|bun|deno|node|git|cd|ls|cat|echo|export|sudo|mkdir|rm|cp|mv|curl|wget|chmod|source)\\b"],
|
|
14
|
-
["variable", "--?[A-Za-z][\\w-]*"],
|
|
15
|
-
["number", "\\b\\d+(?:\\.\\d+)?\\b"]
|
|
16
|
-
]),
|
|
17
|
-
css: e([
|
|
18
|
-
["comment", "/\\*[\\s\\S]*?\\*/"],
|
|
19
|
-
["string", t],
|
|
20
|
-
["keyword", "@[\\w-]+"],
|
|
21
|
-
["variable", "--[\\w-]+"],
|
|
22
|
-
["fn", "[\\w-]+(?=\\()"],
|
|
23
|
-
["number", "#[0-9a-fA-F]{3,8}\\b|-?\\d*\\.?\\d+(?:[a-z%]+)?"],
|
|
24
|
-
["punct", "[{}();:,]"]
|
|
25
|
-
]),
|
|
26
|
-
js: e([
|
|
27
|
-
["comment", "//[^\\n]*|/\\*[\\s\\S]*?\\*/"],
|
|
28
|
-
["string", `${t}|${n}`],
|
|
29
|
-
["keyword", `\\b(?:${r})\\b`],
|
|
30
|
-
["fn", "[A-Za-z_$][\\w$]*(?=\\()"],
|
|
31
|
-
["number", "-?\\d*\\.?\\d+"],
|
|
32
|
-
["punct", "[{}()\\[\\];:,.]|=>"]
|
|
33
|
-
]),
|
|
34
|
-
ts: e([
|
|
35
|
-
["comment", "//[^\\n]*|/\\*[\\s\\S]*?\\*/"],
|
|
36
|
-
["string", `${t}|${n}`],
|
|
37
|
-
["keyword", `\\b(?:${i})\\b`],
|
|
38
|
-
["fn", "[A-Za-z_$][\\w$]*(?=\\()"],
|
|
39
|
-
["number", "-?\\d*\\.?\\d+"],
|
|
40
|
-
["punct", "[{}()\\[\\];:,.]|=>"]
|
|
41
|
-
])
|
|
42
|
-
};
|
|
43
|
-
function o(e, t) {
|
|
44
|
-
let n = a[t], r = [], i = e, o = "", s = () => {
|
|
45
|
-
o &&= (r.push({
|
|
46
|
-
type: "text",
|
|
47
|
-
value: o
|
|
48
|
-
}), "");
|
|
49
|
-
};
|
|
50
|
-
for (; i.length > 0;) {
|
|
51
|
-
let e = !1;
|
|
52
|
-
for (let { type: t, re: a } of n) {
|
|
53
|
-
let n = a.exec(i);
|
|
54
|
-
if (n && n[0].length > 0) {
|
|
55
|
-
s(), r.push({
|
|
56
|
-
type: t,
|
|
57
|
-
value: n[0]
|
|
58
|
-
}), i = i.slice(n[0].length), e = !0;
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
e || (o += i[0], i = i.slice(1));
|
|
63
|
-
}
|
|
64
|
-
return s(), r;
|
|
65
|
-
}
|
|
66
|
-
//#endregion
|
|
67
|
-
export { o as tokenize };
|
|
1
|
+
function e(e){return e.map(([e,t])=>({type:e,re:RegExp(`^(?:${t})`)}))}var t=`"(?:[^"\\\\]|\\\\.)*"|'(?:[^'\\\\]|\\\\.)*'`,n="`(?:[^`\\\\]|\\\\.)*`",r=`const|let|var|function|return|if|else|for|while|do|switch|case|break|continue|new|class|extends|super|import|export|from|default|async|await|yield|typeof|instanceof|in|of|void|delete|this|null|true|false|undefined`,i=`${r}|interface|type|as|readonly|enum|implements|public|private|protected|abstract|namespace|declare|satisfies|keyof|infer|is|string|number|boolean|unknown|never|any`,a={bash:e([[`comment`,`#[^\\n]*`],[`string`,t],[`prompt`,`\\$(?= )`],[`keyword`,`\\b(?:npx|npm|pnpm|yarn|bun|deno|node|git|cd|ls|cat|echo|export|sudo|mkdir|rm|cp|mv|curl|wget|chmod|source)\\b`],[`variable`,`--?[A-Za-z][\\w-]*`],[`number`,`\\b\\d+(?:\\.\\d+)?\\b`]]),css:e([[`comment`,`/\\*[\\s\\S]*?\\*/`],[`string`,t],[`keyword`,`@[\\w-]+`],[`variable`,`--[\\w-]+`],[`fn`,`[\\w-]+(?=\\()`],[`number`,`#[0-9a-fA-F]{3,8}\\b|-?\\d*\\.?\\d+(?:[a-z%]+)?`],[`punct`,`[{}();:,]`]]),js:e([[`comment`,`//[^\\n]*|/\\*[\\s\\S]*?\\*/`],[`string`,`${t}|${n}`],[`keyword`,`\\b(?:${r})\\b`],[`fn`,`[A-Za-z_$][\\w$]*(?=\\()`],[`number`,`-?\\d*\\.?\\d+`],[`punct`,`[{}()\\[\\];:,.]|=>`]]),ts:e([[`comment`,`//[^\\n]*|/\\*[\\s\\S]*?\\*/`],[`string`,`${t}|${n}`],[`keyword`,`\\b(?:${i})\\b`],[`fn`,`[A-Za-z_$][\\w$]*(?=\\()`],[`number`,`-?\\d*\\.?\\d+`],[`punct`,`[{}()\\[\\];:,.]|=>`]])};function o(e,t){let n=a[t],r=[],i=e,o=``,s=()=>{o&&=(r.push({type:`text`,value:o}),``)};for(;i.length>0;){let e=!1;for(let{type:t,re:a}of n){let n=a.exec(i);if(n&&n[0].length>0){s(),r.push({type:t,value:n[0]}),i=i.slice(n[0].length),e=!0;break}}e||(o+=i[0],i=i.slice(1))}return s(),r}export{o as tokenize};
|