@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 +1 @@
|
|
|
1
|
-
@layer cascivo.component{.
|
|
1
|
+
@layer cascivo.component{div:has(>._wrapper_2bu0b_3){display:contents}._wrapper_2bu0b_3{gap:var(--cascivo-space-1);min-inline-size:0;font-family:var(--cascivo-font-sans);flex-direction:column;display:flex;position:relative}._label_2bu0b_23{font-size:var(--cascivo-text-sm);font-weight:var(--cascivo-font-medium);color:var(--cascivo-color-text)}._field_2bu0b_29{align-items:center;display:flex;position:relative}._trigger_2bu0b_35{inline-size:100%;padding-inline:var(--cascivo-space-3);font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-field);cursor:pointer;text-align:start;transition:border-color var(--cascivo-duration-150) var(--cascivo-ease-out), box-shadow var(--cascivo-duration-150) var(--cascivo-ease-out);outline:none;justify-content:space-between;align-items:center;padding-inline-end:var(--cascivo-space-8);display:flex}._trigger_2bu0b_35::placeholder{color:var(--cascivo-color-text-subtle)}._trigger_2bu0b_35:hover:not(:disabled){border-color:var(--cascivo-color-border-strong)}._trigger_2bu0b_35:focus-visible{border-color:var(--cascivo-color-accent);box-shadow:0 0 0 3px color-mix(in srgb, var(--cascivo-color-accent) 20%, transparent)}._trigger_2bu0b_35:disabled{opacity:.5;cursor:not-allowed}._wrapper_2bu0b_3[data-size=sm] ._trigger_2bu0b_35{min-block-size:2rem}._wrapper_2bu0b_3[data-size=md] ._trigger_2bu0b_35{min-block-size:2.5rem}._wrapper_2bu0b_3[data-size=lg] ._trigger_2bu0b_35{min-block-size:3rem}._wrapper_2bu0b_3[data-state=error] ._trigger_2bu0b_35{border-color:var(--cascivo-color-destructive)}._value_2bu0b_90{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._placeholder_2bu0b_96{color:var(--cascivo-color-text-subtle)}._chevron_2bu0b_100{border-inline-end:2px solid var(--cascivo-color-text-muted);border-block-end:2px solid var(--cascivo-color-text-muted);pointer-events:none;block-size:.5rem;inline-size:.5rem;transition:rotate var(--cascivo-duration-150) var(--cascivo-ease-out);flex-shrink:0;display:inline-block;position:absolute;inset-inline-end:var(--cascivo-space-3);translate:0 -.15rem;rotate:45deg}._wrapper_2bu0b_3[data-state=open] ._chevron_2bu0b_100{translate:0 .1rem;rotate:-135deg}._clear_2bu0b_120{cursor:pointer;min-block-size:1.5rem;min-inline-size:1.5rem;padding:var(--cascivo-space-1);border-radius:var(--cascivo-radius-control);background:0 0;border:none;outline:none;justify-content:center;align-items:center;display:inline-flex;position:absolute;inset-inline-end:var(--cascivo-space-8)}._clear_2bu0b_120:focus-visible{box-shadow:0 0 0 2px var(--cascivo-color-accent)}._clearGlyph_2bu0b_140{background-color:var(--cascivo-color-text-muted);block-size:.75rem;inline-size:.75rem;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}._clear_2bu0b_120:hover ._clearGlyph_2bu0b_140{background-color:var(--cascivo-color-text)}._popup_2bu0b_158{inline-size:100%;z-index:var(--cascivo-z-dropdown);background-color:var(--cascivo-color-surface-overlay);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-overlay);max-block-size:16rem;box-shadow:var(--cascivo-shadow-overlay);opacity:0;visibility:hidden;transition:opacity var(--cascivo-motion-enter), translate var(--cascivo-motion-enter), visibility var(--cascivo-motion-enter);position:absolute;inset-block-start:calc(100% + var(--cascivo-space-1));inset-inline-start:0;overflow-y:auto;translate:0 -.25rem}._popup_2bu0b_158[data-state=open]{opacity:1;visibility:visible;translate:0}@starting-style{._popup_2bu0b_158[data-state=open]{opacity:0;translate:0 -.25rem}}._listbox_2bu0b_192,._group_2bu0b_196{display:block}._groupLabel_2bu0b_200{padding-inline:var(--cascivo-space-3);padding-block:var(--cascivo-space-1);font-size:var(--cascivo-text-xs);font-weight:var(--cascivo-font-medium);color:var(--cascivo-color-text-muted);text-transform:uppercase;letter-spacing:.04em;display:block}._option_2bu0b_211{justify-content:space-between;align-items:center;gap:var(--cascivo-space-2);padding-inline:var(--cascivo-space-3);padding-block:var(--cascivo-space-2);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);cursor:pointer;border-radius:var(--cascivo-radius-item);display:flex}._option_2bu0b_211[data-state=active]{background-color:var(--cascivo-color-bg-subtle);outline:1px solid var(--cascivo-color-border-strong);outline-offset:-1px}._option_2bu0b_211[aria-selected=true]{background-color:color-mix(in srgb, var(--cascivo-color-accent) 12%, transparent);color:var(--cascivo-color-accent-text)}._option_2bu0b_211[data-disabled]{opacity:.4;cursor:not-allowed}._optionLabel_2bu0b_241{text-overflow:ellipsis;white-space:nowrap;min-inline-size:0;overflow:hidden}._match_2bu0b_248{color:inherit;font-weight:var(--cascivo-font-bold);background:0 0;text-decoration:underline}._check_2bu0b_257{opacity:0;background-color:var(--cascivo-color-accent);flex-shrink:0;block-size:.875rem;inline-size:.875rem;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E");-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}._option_2bu0b_211[aria-selected=true] ._check_2bu0b_257{opacity:1}._create_2bu0b_275{color:var(--cascivo-color-accent);font-weight:var(--cascivo-font-medium)}._empty_2bu0b_280{padding:var(--cascivo-space-4);text-align:center;font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-muted)}._error_2bu0b_287{font-size:var(--cascivo-text-xs);color:var(--cascivo-color-destructive)}._hint_2bu0b_292{font-size:var(--cascivo-text-xs);color:var(--cascivo-color-text-muted)}._srOnly_2bu0b_297{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@media (pointer:coarse){._wrapper_2bu0b_3[data-size=sm] ._trigger_2bu0b_35,._wrapper_2bu0b_3[data-size=md] ._trigger_2bu0b_35,._wrapper_2bu0b_3[data-size=lg] ._trigger_2bu0b_35{min-block-size:var(--cascivo-target-min-coarse,2.75rem)}._clear_2bu0b_120{min-inline-size:var(--cascivo-target-min-coarse,2.75rem);min-block-size:var(--cascivo-target-min-coarse,2.75rem)}._option_2bu0b_211{min-block-size:var(--cascivo-target-min-coarse,2.75rem)}}}@media (forced-colors:active){._option_2bu0b_211[aria-selected=true]{color:highlighttext;forced-color-adjust:none;background-color:highlight}._option_2bu0b_211[data-state=active]{outline-offset:-2px;outline:2px solid highlight}._option_2bu0b_211[data-disabled]{color:graytext}._trigger_2bu0b_35:focus-visible,._clear_2bu0b_120:focus-visible{outline-offset:1px;outline:2px solid highlight}._popup_2bu0b_158{border:1px solid canvastext}}@media (prefers-reduced-motion:reduce){._popup_2bu0b_158,._chevron_2bu0b_100,._trigger_2bu0b_35{transition-duration:1ms}}
|
|
@@ -1,165 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import e from "./combobox.module.js";
|
|
4
|
-
import { useId as t, useRef as n } from "react";
|
|
5
|
-
import { cn as r, createMachine as i, focusElement as a, useControllableSignal as o, useMachine as s, useSignal as c, useSignalEffect as l, useSignals as u } from "@cascivo/core";
|
|
6
|
-
import { builtin as d, t as f } from "@cascivo/i18n";
|
|
7
|
-
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
8
|
-
//#region ../components/src/combobox/combobox.tsx
|
|
9
|
-
var h = i({
|
|
10
|
-
initial: "closed",
|
|
11
|
-
states: {
|
|
12
|
-
closed: { on: { OPEN: "open" } },
|
|
13
|
-
open: { on: { CLOSE: "closed" } }
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
function g({ options: i, value: g, defaultValue: _, onValueChange: v, onChange: y, clearable: b = !1, searchable: x = !0, label: S, hint: C, error: w, size: T = "md", disabled: E = !1, labels: D, className: O, id: k }) {
|
|
17
|
-
u();
|
|
18
|
-
let [A, j] = s(h), M = t(), N = k ?? `cascade-combobox-${M}`, P = `${M}-listbox`, F = n(null), ee = D?.placeholder ?? f(d.combobox.placeholder), I = D?.empty ?? f(d.combobox.empty), L = D?.clear ?? f(d.combobox.clear), R = D?.search ?? f(d.combobox.search), [z] = o({
|
|
19
|
-
value: g,
|
|
20
|
-
defaultValue: _
|
|
21
|
-
}), B = c(""), V = c(0), H = A.value === "open", U = i.filter((e) => !x || !B.value ? !0 : e.label.toLowerCase().includes(B.value.toLowerCase())), W = i.find((e) => e.value === z.value);
|
|
22
|
-
l(() => {
|
|
23
|
-
if (!H) return;
|
|
24
|
-
let e = (e) => {
|
|
25
|
-
let t = document.getElementById(`${M}-root`);
|
|
26
|
-
t && !t.contains(e.target) && j("CLOSE");
|
|
27
|
-
};
|
|
28
|
-
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
29
|
-
});
|
|
30
|
-
let G = () => {
|
|
31
|
-
E || (B.value = "", V.value = 0, j("OPEN"), setTimeout(() => a(F.current), 0));
|
|
32
|
-
}, K = () => {
|
|
33
|
-
j("CLOSE"), B.value = "";
|
|
34
|
-
}, q = v ?? y, J = (e) => {
|
|
35
|
-
g === void 0 && (z.value = e), q?.(e), K();
|
|
36
|
-
}, Y = () => {
|
|
37
|
-
g === void 0 && (z.value = void 0), q?.(void 0);
|
|
38
|
-
}, X = U.flatMap((e, t) => e.disabled ? [] : [t]), Z = (e) => {
|
|
39
|
-
if (X.length === 0) return;
|
|
40
|
-
let t = X[(X.indexOf(V.value) + e + X.length) % X.length];
|
|
41
|
-
t !== void 0 && (V.value = t);
|
|
42
|
-
}, Q = (e) => {
|
|
43
|
-
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), G());
|
|
44
|
-
}, te = (e) => {
|
|
45
|
-
switch (e.key) {
|
|
46
|
-
case "ArrowDown":
|
|
47
|
-
e.preventDefault(), Z(1);
|
|
48
|
-
break;
|
|
49
|
-
case "ArrowUp":
|
|
50
|
-
e.preventDefault(), Z(-1);
|
|
51
|
-
break;
|
|
52
|
-
case "Enter": {
|
|
53
|
-
e.preventDefault();
|
|
54
|
-
let t = U[V.value];
|
|
55
|
-
t && !t.disabled && J(t.value);
|
|
56
|
-
break;
|
|
57
|
-
}
|
|
58
|
-
case "Escape":
|
|
59
|
-
e.preventDefault(), K();
|
|
60
|
-
break;
|
|
61
|
-
case "Tab":
|
|
62
|
-
K();
|
|
63
|
-
break;
|
|
64
|
-
}
|
|
65
|
-
}, $ = (e) => `${M}-option-${e}`;
|
|
66
|
-
return /* @__PURE__ */ m("div", {
|
|
67
|
-
id: `${M}-root`,
|
|
68
|
-
className: r(e.wrapper, O),
|
|
69
|
-
"data-state": w ? "error" : A.value,
|
|
70
|
-
"data-size": T,
|
|
71
|
-
children: [
|
|
72
|
-
S && /* @__PURE__ */ p("label", {
|
|
73
|
-
className: e.label,
|
|
74
|
-
htmlFor: N,
|
|
75
|
-
children: S
|
|
76
|
-
}),
|
|
77
|
-
/* @__PURE__ */ m("div", {
|
|
78
|
-
className: e.field,
|
|
79
|
-
children: [/* @__PURE__ */ m("button", {
|
|
80
|
-
id: N,
|
|
81
|
-
type: "button",
|
|
82
|
-
role: "combobox",
|
|
83
|
-
"aria-expanded": H,
|
|
84
|
-
"aria-controls": P,
|
|
85
|
-
"aria-haspopup": "listbox",
|
|
86
|
-
"aria-activedescendant": H && V.value >= 0 ? $(V.value) : void 0,
|
|
87
|
-
"aria-invalid": w ? !0 : void 0,
|
|
88
|
-
"aria-describedby": w ? `${M}-error` : C ? `${M}-hint` : void 0,
|
|
89
|
-
className: e.trigger,
|
|
90
|
-
disabled: E,
|
|
91
|
-
onKeyDown: Q,
|
|
92
|
-
onClick: H ? K : G,
|
|
93
|
-
children: [/* @__PURE__ */ p("span", {
|
|
94
|
-
className: r(e.value, W ? void 0 : e.placeholder),
|
|
95
|
-
children: W?.label ?? ee
|
|
96
|
-
}), /* @__PURE__ */ p("span", {
|
|
97
|
-
className: e.chevron,
|
|
98
|
-
"aria-hidden": "true"
|
|
99
|
-
})]
|
|
100
|
-
}), b && z.value !== void 0 && /* @__PURE__ */ p("button", {
|
|
101
|
-
type: "button",
|
|
102
|
-
className: e.clear,
|
|
103
|
-
"aria-label": L,
|
|
104
|
-
onClick: (e) => {
|
|
105
|
-
e.stopPropagation(), Y();
|
|
106
|
-
},
|
|
107
|
-
children: "✕"
|
|
108
|
-
})]
|
|
109
|
-
}),
|
|
110
|
-
/* @__PURE__ */ m("div", {
|
|
111
|
-
role: "listbox",
|
|
112
|
-
id: P,
|
|
113
|
-
className: e.listbox,
|
|
114
|
-
"data-state": H ? "open" : "closed",
|
|
115
|
-
"aria-label": S,
|
|
116
|
-
children: [x && H && /* @__PURE__ */ p("div", {
|
|
117
|
-
className: e.searchWrapper,
|
|
118
|
-
children: /* @__PURE__ */ p("input", {
|
|
119
|
-
ref: F,
|
|
120
|
-
type: "text",
|
|
121
|
-
className: e.search,
|
|
122
|
-
value: B.value,
|
|
123
|
-
onChange: (e) => {
|
|
124
|
-
B.value = e.target.value, V.value = 0;
|
|
125
|
-
},
|
|
126
|
-
onKeyDown: te,
|
|
127
|
-
"aria-label": R,
|
|
128
|
-
autoComplete: "off"
|
|
129
|
-
})
|
|
130
|
-
}), U.length === 0 ? /* @__PURE__ */ p("div", {
|
|
131
|
-
className: e.empty,
|
|
132
|
-
children: I
|
|
133
|
-
}) : U.map((t, n) => /* @__PURE__ */ p("div", {
|
|
134
|
-
id: $(n),
|
|
135
|
-
role: "option",
|
|
136
|
-
"aria-selected": t.value === z.value,
|
|
137
|
-
"aria-disabled": t.disabled || void 0,
|
|
138
|
-
"data-state": n === V.value ? "active" : void 0,
|
|
139
|
-
"data-disabled": t.disabled || void 0,
|
|
140
|
-
className: e.option,
|
|
141
|
-
onMouseEnter: () => {
|
|
142
|
-
t.disabled || (V.value = n);
|
|
143
|
-
},
|
|
144
|
-
onClick: () => {
|
|
145
|
-
t.disabled || J(t.value);
|
|
146
|
-
},
|
|
147
|
-
children: t.label
|
|
148
|
-
}, t.value))]
|
|
149
|
-
}),
|
|
150
|
-
w && /* @__PURE__ */ p("span", {
|
|
151
|
-
id: `${M}-error`,
|
|
152
|
-
className: e.error,
|
|
153
|
-
role: "alert",
|
|
154
|
-
children: w
|
|
155
|
-
}),
|
|
156
|
-
!w && C && /* @__PURE__ */ p("span", {
|
|
157
|
-
id: `${M}-hint`,
|
|
158
|
-
className: e.hint,
|
|
159
|
-
children: C
|
|
160
|
-
})
|
|
161
|
-
]
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
//#endregion
|
|
165
|
-
export { g as Combobox };
|
|
1
|
+
"use client";import{activeForValue as e,firstActive as t,lastActive as n,moveActive as r,pageActive as i}from"./list-nav.js";import{filterOptions as a,groupOptions as ee,highlightSegments as te,isNewLabel as o,orderByGroup as s,typeaheadIndex as ne}from"./option-list.js";import c from"./combobox.module.js";import{useId as re,useRef as l}from"react";import{DismissableLayer as ie,cn as u,focusElement as d,useControllableSignal as f,useSignal as p,useSignalEffect as ae,useSignals as oe,useTypeahead as se}from"@cascivo/core";import{builtin as m,t as h}from"@cascivo/i18n";import{jsx as g,jsxs as _}from"react/jsx-runtime";function ce(...e){return e.filter(Boolean).join(` `)||void 0}function v({options:v,value:le,defaultValue:ue,onValueChange:de,clearable:fe=!1,searchable:y=!0,label:b,ariaLabel:x,hint:S,error:C,size:pe=`md`,disabled:w=!1,loading:T=!1,onSearchChange:E,filter:D,creatable:O=!1,onCreate:me,name:k,required:he,open:ge,defaultOpen:_e,onOpenChange:ve,labels:A,className:ye,id:be,"aria-labelledby":xe,"aria-describedby":Se,"aria-invalid":Ce}){oe();let j=re(),M=be??`cascade-combobox-${j}`,N=`${j}-listbox`,we=`${j}-status`,P=e=>`${j}-option-${e}`,F=l(null),I=l(null),[Te,L]=f({value:le,defaultValue:ue,onChange:de}),[R,z]=f({value:ge,defaultValue:_e??!1,onChange:ve}),B=p(``),V=p(-1),H=R.value,U=Te.value,W=B.value,G=s(a(v,y?W:``,D)),K=O&&W.trim()!==``&&o(v,W.trim()),q=K?G.length:-1,Ee=ee(G),J=v.find(e=>e.value===U),Y=A?.placeholder??h(m.combobox.placeholder),De=A?.empty??h(m.combobox.empty),Oe=A?.clear??h(m.combobox.clear),ke=A?.loading??h(m.combobox.loading),Ae=e=>A?.create?A.create.replaceAll(`{label}`,e):h(m.combobox.create,{label:e}),je=ce(C?`${j}-error`:S?`${j}-hint`:void 0,Se);function X(t=`value`){w||(V.value=t===`value`?e(G,U):-1,z(!0))}function Z(e=!0){z(!1),B.value=``,V.value=-1,e&&d(F.current)}function Q(e){L(e),Z()}function Me(){L(void 0),B.value=``,E?.(``),d(F.current)}function $(e){if(e===q&&K){me?.(W.trim()),Z();return}let t=G[e];t&&!t.disabled&&Q(t.value)}let Ne=se({onMatch:e=>{let t=H?G:v,n=ne(t,e,H?V.value:-1);if(n!==-1)if(H)V.value=n;else{let e=t[n];e&&L(e.value)}}});ae(()=>{let e=V.value;if(!R.value||e<0)return;let t=I.current?.querySelector(`#${CSS.escape(P(e))}`);t&&typeof t.scrollIntoView==`function`&&t.scrollIntoView({block:`nearest`})});function Pe(e){if(w)return;let a=K?[...G,{value:``,label:W}]:G;if(e.altKey&&e.key===`ArrowDown`){e.preventDefault(),H||X(`none`);return}if(e.altKey&&e.key===`ArrowUp`){e.preventDefault(),H&&Z();return}switch(e.key){case`ArrowDown`:e.preventDefault(),H?V.value=r(V.value,1,a):X();break;case`ArrowUp`:e.preventDefault(),H?V.value=r(V.value,-1,a):X();break;case`Home`:if(y||!H)break;e.preventDefault(),V.value=t(a);break;case`End`:if(y||!H)break;e.preventDefault(),V.value=n(a);break;case`PageDown`:if(!H)break;e.preventDefault(),V.value=i(V.value,1,a);break;case`PageUp`:if(!H)break;e.preventDefault(),V.value=i(V.value,-1,a);break;case`Enter`:if(!H)break;e.preventDefault(),V.value>=0&&$(V.value);break;case` `:if(y)break;e.preventDefault(),H&&V.value>=0?$(V.value):X();break;case`Escape`:if(!H)break;e.preventDefault(),e.stopPropagation(),Z();break;case`Tab`:H&&Z(!1);break}!y&&e.key!==` `&&Ne.onKeyDown(e)}function Fe(e,t){let n=e.value===U;return _(`div`,{id:P(t),role:`option`,"aria-selected":n,"aria-disabled":e.disabled||void 0,"data-state":t===V.value?`active`:void 0,"data-disabled":e.disabled||void 0,className:c.option,onMouseDown:e=>e.preventDefault(),onClick:()=>{e.disabled||Q(e.value)},onMouseEnter:()=>{e.disabled||(V.value=t)},children:[g(`span`,{className:c.optionLabel,children:te(e.label,y?W:``).map((e,t)=>e.match?g(`mark`,{className:c.match,children:e.text},t):g(`span`,{children:e.text},t))}),g(`span`,{className:c.check,"aria-hidden":`true`})]},e.value)}let Ie={id:M,role:`combobox`,"aria-expanded":H,"aria-controls":N,"aria-haspopup":`listbox`,"aria-activedescendant":H&&V.value>=0?P(V.value):void 0,"aria-labelledby":xe,"aria-label":x,"aria-invalid":C?!0:Ce,"aria-describedby":je,"aria-required":he||void 0,disabled:w,onKeyDown:Pe};return g(ie,{onDismiss:()=>H&&Z(!1),children:_(`div`,{className:u(c.wrapper,ye),"data-state":C?`error`:H?`open`:`closed`,"data-size":pe,children:[b&&g(`label`,{className:c.label,htmlFor:M,children:b}),_(`div`,{className:c.field,children:[y?g(`input`,{...Ie,ref:F,type:`text`,className:c.trigger,autoComplete:`off`,"aria-autocomplete":`list`,placeholder:Y,value:H?W:J?.label??``,onChange:e=>{let n=e.currentTarget.value;B.value=n,E?.(n),H||z(!0);let r=s(a(v,n,D)),i=t(r);V.value=i===-1&&O&&n.trim()!==``&&o(v,n.trim())?r.length:i},onClick:()=>{H||X()}}):g(`button`,{...Ie,ref:F,type:`button`,className:c.trigger,onClick:()=>H?Z():X(),children:g(`span`,{className:u(c.value,J?void 0:c.placeholder),children:J?.label??Y})}),fe&&U!==void 0&&!w&&g(`button`,{type:`button`,className:c.clear,"aria-label":Oe,onClick:e=>{e.stopPropagation(),Me()},children:g(`span`,{className:c.clearGlyph,"aria-hidden":`true`})}),g(`span`,{className:c.chevron,"aria-hidden":`true`})]}),k!==void 0&&g(`input`,{type:`hidden`,name:k,value:U??``}),_(`div`,{className:c.popup,"data-state":H?`open`:`closed`,children:[_(`div`,{ref:I,role:`listbox`,id:N,className:c.listbox,"aria-label":x??b??Y,"aria-busy":T||void 0,children:[Ee.map(e=>e.label===void 0?e.entries.map(({option:e,index:t})=>Fe(e,t)):_(`div`,{role:`group`,"aria-label":e.label,className:c.group,children:[g(`span`,{className:c.groupLabel,"aria-hidden":`true`,children:e.label}),e.entries.map(({option:e,index:t})=>Fe(e,t))]},e.label)),K&&g(`div`,{id:P(q),role:`option`,"aria-selected":!1,"data-state":q===V.value?`active`:void 0,className:u(c.option,c.create),onMouseDown:e=>e.preventDefault(),onClick:()=>$(q),onMouseEnter:()=>{V.value=q},children:Ae(W.trim())})]}),T?g(`div`,{className:c.empty,role:`status`,children:ke}):G.length===0&&!K?g(`div`,{className:c.empty,role:`status`,children:De}):null]}),g(`span`,{id:we,className:c.srOnly,role:`status`,"aria-live":`polite`,children:H&&!T?h(m.combobox.resultCount,{count:String(G.length)}):``}),C&&g(`span`,{id:`${j}-error`,className:c.error,role:`alert`,children:C}),!C&&S&&g(`span`,{id:`${j}-hint`,className:c.hint,children:S})]})})}export{v as Combobox};
|
|
@@ -1,20 +1,2 @@
|
|
|
1
1
|
import './combobox.css';
|
|
2
|
-
var e
|
|
3
|
-
wrapper: "_wrapper_bu0jy_2",
|
|
4
|
-
label: "_label_bu0jy_14",
|
|
5
|
-
field: "_field_bu0jy_20",
|
|
6
|
-
trigger: "_trigger_bu0jy_26",
|
|
7
|
-
value: "_value_bu0jy_74",
|
|
8
|
-
placeholder: "_placeholder_bu0jy_80",
|
|
9
|
-
chevron: "_chevron_bu0jy_84",
|
|
10
|
-
clear: "_clear_bu0jy_100",
|
|
11
|
-
listbox: "_listbox_bu0jy_126",
|
|
12
|
-
searchWrapper: "_searchWrapper_bu0jy_160",
|
|
13
|
-
search: "_search_bu0jy_160",
|
|
14
|
-
option: "_option_bu0jy_182",
|
|
15
|
-
empty: "_empty_bu0jy_205",
|
|
16
|
-
error: "_error_bu0jy_212",
|
|
17
|
-
hint: "_hint_bu0jy_217"
|
|
18
|
-
};
|
|
19
|
-
//#endregion
|
|
20
|
-
export { e as default };
|
|
2
|
+
var e={wrapper:`_wrapper_2bu0b_3`,label:`_label_2bu0b_23`,field:`_field_2bu0b_29`,trigger:`_trigger_2bu0b_35`,value:`_value_2bu0b_90`,placeholder:`_placeholder_2bu0b_96`,chevron:`_chevron_2bu0b_100`,clear:`_clear_2bu0b_120`,clearGlyph:`_clearGlyph_2bu0b_140`,popup:`_popup_2bu0b_158`,listbox:`_listbox_2bu0b_192`,group:`_group_2bu0b_196`,groupLabel:`_groupLabel_2bu0b_200`,option:`_option_2bu0b_211`,optionLabel:`_optionLabel_2bu0b_241`,match:`_match_2bu0b_248`,check:`_check_2bu0b_257`,create:`_create_2bu0b_275`,empty:`_empty_2bu0b_280`,error:`_error_2bu0b_287`,hint:`_hint_2bu0b_292`,srOnly:`_srOnly_2bu0b_297`};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){let t=[];return e.forEach((e,n)=>{e.disabled||t.push(n)}),t}function t(t,n,r){let i=e(r);if(i.length===0)return-1;let a=i.indexOf(t);return a===-1?n>0?i[0]:i[i.length-1]:i[(a+n+i.length)%i.length]}function n(t){return e(t)[0]??-1}function r(t){let n=e(t);return n[n.length-1]??-1}function i(t,n,r){let i=e(r);if(i.length===0)return-1;let a=i.indexOf(t),o=a===-1?n>0?-1:i.length:a;return i[Math.min(Math.max(o+n*10,0),i.length-1)]}function a(e,t){if(t!==void 0){let n=e.findIndex(e=>e.value===t&&!e.disabled);if(n!==-1)return n}return n(e)}export{a as activeForValue,n as firstActive,r as lastActive,t as moveActive,i as pageActive};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return(e.normalize(`NFD`)[0]??e).toLowerCase()}function t(t){return Array.from(t,e)}function n(e,n){let r=t(n).join(``);return r===``?!0:t(e.label).join(``).includes(r)||t(e.value).join(``).includes(r)}function r(e,t,r){let i=r??n;return t===``&&!r?e:e.filter(e=>i(e,t))}function i(e,n){let r=t(n).join(``);if(r===``)return[{text:e,match:!1}];let i=Array.from(e),a=t(e).join(``).indexOf(r);if(a===-1)return[{text:e,match:!1}];let o=Array.from(n).length,s=[],c=i.slice(0,a).join(``),l=i.slice(a,a+o).join(``),u=i.slice(a+o).join(``);return c!==``&&s.push({text:c,match:!1}),s.push({text:l,match:!0}),u!==``&&s.push({text:u,match:!1}),s}function a(e){let t=[],n=new Map;return e.forEach((e,r)=>{let i=e.group,a=n.get(i);a||(a={label:i,entries:[]},n.set(i,a),t.push(a)),a.entries.push({option:e,index:r})}),t.sort((e,t)=>Number(e.label!==void 0)-Number(t.label!==void 0))}function o(e){return a(e).flatMap(e=>e.entries.map(e=>e.option))}function s(e,n){let r=t(n).join(``);return r===``?!1:!e.some(e=>t(e.label).join(``)===r)}function c(e,n,r){let i=t(n).join(``);if(i===``||e.length===0)return-1;let a=e.map((t,n)=>(r+1+n)%e.length),o=a.find(n=>{let r=e[n];return r&&!r.disabled&&t(r.label).join(``).startsWith(i)});return o===void 0?a.find(n=>{let r=e[n];return r&&!r.disabled&&t(r.label).join(``).includes(i)})??-1:o}export{r as filterOptions,a as groupOptions,i as highlightSegments,s as isNewLabel,o as orderByGroup,c as typeaheadIndex};
|