@cognite/aura 0.3.4 → 1.0.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/CHANGELOG.md +274 -0
- package/DESIGN.md +664 -281
- package/LICENSE +21 -0
- package/README.md +48 -13
- package/dist/colors-deprecated.css +618 -0
- package/dist/colors.css +803 -830
- package/dist/components/index.d.ts +63 -57
- package/dist/components/index.js +62 -59
- package/dist/components/index.js.map +1 -0
- package/dist/components/ui/core/accordion/accordion.d.ts +19 -18
- package/dist/components/ui/core/accordion/accordion.js +99 -78
- package/dist/components/ui/core/accordion/accordion.js.map +1 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar-motion.d.ts +8 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar-motion.js +132 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar-motion.js.map +1 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar.d.ts +31 -31
- package/dist/components/ui/core/action-toolbar/action-toolbar.js +156 -106
- package/dist/components/ui/core/action-toolbar/action-toolbar.js.map +1 -0
- package/dist/components/ui/core/alert/alert.d.ts +25 -25
- package/dist/components/ui/core/alert/alert.gallery.d.ts +2 -0
- package/dist/components/ui/core/alert/alert.gallery.js +54 -0
- package/dist/components/ui/core/alert/alert.gallery.js.map +1 -0
- package/dist/components/ui/core/alert/alert.js +181 -152
- package/dist/components/ui/core/alert/alert.js.map +1 -0
- package/dist/components/ui/core/avatar/avatar.d.ts +10 -9
- package/dist/components/ui/core/avatar/avatar.gallery.d.ts +2 -0
- package/dist/components/ui/core/avatar/avatar.gallery.js +67 -0
- package/dist/components/ui/core/avatar/avatar.gallery.js.map +1 -0
- package/dist/components/ui/core/avatar/avatar.js +75 -65
- package/dist/components/ui/core/avatar/avatar.js.map +1 -0
- package/dist/components/ui/core/badge/badge.d.ts +13 -12
- package/dist/components/ui/core/badge/badge.gallery.d.ts +2 -0
- package/dist/components/ui/core/badge/badge.gallery.js +64 -0
- package/dist/components/ui/core/badge/badge.gallery.js.map +1 -0
- package/dist/components/ui/core/badge/badge.js +88 -72
- package/dist/components/ui/core/badge/badge.js.map +1 -0
- package/dist/components/ui/core/banner/banner.d.ts +18 -18
- package/dist/components/ui/core/banner/banner.gallery.d.ts +2 -0
- package/dist/components/ui/core/banner/banner.gallery.js +56 -0
- package/dist/components/ui/core/banner/banner.gallery.js.map +1 -0
- package/dist/components/ui/core/banner/banner.js +179 -142
- package/dist/components/ui/core/banner/banner.js.map +1 -0
- package/dist/components/ui/core/breadcrumb/breadcrumb.d.ts +12 -12
- package/dist/components/ui/core/breadcrumb/breadcrumb.gallery.d.ts +2 -0
- package/dist/components/ui/core/breadcrumb/breadcrumb.gallery.js +31 -0
- package/dist/components/ui/core/breadcrumb/breadcrumb.gallery.js.map +1 -0
- package/dist/components/ui/core/breadcrumb/breadcrumb.js +139 -104
- package/dist/components/ui/core/breadcrumb/breadcrumb.js.map +1 -0
- package/dist/components/ui/core/button/button.d.ts +7 -7
- package/dist/components/ui/core/button/button.gallery.d.ts +2 -0
- package/dist/components/ui/core/button/button.gallery.js +76 -0
- package/dist/components/ui/core/button/button.gallery.js.map +1 -0
- package/dist/components/ui/core/button/button.js +57 -47
- package/dist/components/ui/core/button/button.js.map +1 -0
- package/dist/components/ui/core/button-group/button-group.d.ts +9 -9
- package/dist/components/ui/core/button-group/button-group.gallery.d.ts +2 -0
- package/dist/components/ui/core/button-group/button-group.gallery.js +62 -0
- package/dist/components/ui/core/button-group/button-group.gallery.js.map +1 -0
- package/dist/components/ui/core/button-group/button-group.js +50 -40
- package/dist/components/ui/core/button-group/button-group.js.map +1 -0
- package/dist/components/ui/core/calendar/calendar-header.d.ts +7 -7
- package/dist/components/ui/core/calendar/calendar-header.js +102 -63
- package/dist/components/ui/core/calendar/calendar-header.js.map +1 -0
- package/dist/components/ui/core/calendar/calendar-utils.d.ts +30 -30
- package/dist/components/ui/core/calendar/calendar-utils.js +116 -39
- package/dist/components/ui/core/calendar/calendar-utils.js.map +1 -0
- package/dist/components/ui/core/calendar/calendar.d.ts +10 -10
- package/dist/components/ui/core/calendar/calendar.js +95 -66
- package/dist/components/ui/core/calendar/calendar.js.map +1 -0
- package/dist/components/ui/core/calendar/constants.js +3 -0
- package/dist/components/ui/core/calendar/constants.js.map +1 -0
- package/dist/components/ui/core/card/card.d.ts +20 -20
- package/dist/components/ui/core/card/card.js +133 -104
- package/dist/components/ui/core/card/card.js.map +1 -0
- package/dist/components/ui/core/chart/chart.d.ts +55 -53
- package/dist/components/ui/core/chart/chart.js +196 -116
- package/dist/components/ui/core/chart/chart.js.map +1 -0
- package/dist/components/ui/core/chart/index.d.ts +2 -2
- package/dist/components/ui/core/chart/index.js +3 -2
- package/dist/components/ui/core/chart/index.js.map +1 -0
- package/dist/components/ui/core/checkbox/checkbox.d.ts +9 -9
- package/dist/components/ui/core/checkbox/checkbox.gallery.d.ts +2 -0
- package/dist/components/ui/core/checkbox/checkbox.gallery.js +36 -0
- package/dist/components/ui/core/checkbox/checkbox.gallery.js.map +1 -0
- package/dist/components/ui/core/checkbox/checkbox.js +88 -68
- package/dist/components/ui/core/checkbox/checkbox.js.map +1 -0
- package/dist/components/ui/core/checkbox/checkbox.metadata.d.ts +1 -1
- package/dist/components/ui/core/checkbox/checkbox.metadata.js +6 -7
- package/dist/components/ui/core/checkbox/checkbox.metadata.js.map +1 -0
- package/dist/components/ui/core/code-block/code-block.d.ts +19 -19
- package/dist/components/ui/core/code-block/code-block.js +260 -175
- package/dist/components/ui/core/code-block/code-block.js.map +1 -0
- package/dist/components/ui/core/collapsible/collapsible.d.ts +5 -5
- package/dist/components/ui/core/collapsible/collapsible.gallery.d.ts +2 -0
- package/dist/components/ui/core/collapsible/collapsible.gallery.js +39 -0
- package/dist/components/ui/core/collapsible/collapsible.gallery.js.map +1 -0
- package/dist/components/ui/core/collapsible/collapsible.js +36 -30
- package/dist/components/ui/core/collapsible/collapsible.js.map +1 -0
- package/dist/components/ui/core/combobox/combobox.d.ts +13 -13
- package/dist/components/ui/core/combobox/combobox.js +89 -40
- package/dist/components/ui/core/combobox/combobox.js.map +1 -0
- package/dist/components/ui/core/command/command.d.ts +20 -18
- package/dist/components/ui/core/command/command.js +137 -85
- package/dist/components/ui/core/command/command.js.map +1 -0
- package/dist/components/ui/core/conversation/conversation.d.ts +14 -0
- package/dist/components/ui/core/conversation/conversation.js +51 -0
- package/dist/components/ui/core/conversation/conversation.js.map +1 -0
- package/dist/components/ui/core/count/count.d.ts +8 -6
- package/dist/components/ui/core/count/count.gallery.d.ts +2 -0
- package/dist/components/ui/core/count/count.gallery.js +55 -0
- package/dist/components/ui/core/count/count.gallery.js.map +1 -0
- package/dist/components/ui/core/count/count.js +51 -21
- package/dist/components/ui/core/count/count.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-cell.d.ts +5 -7
- package/dist/components/ui/core/data-grid/data-grid-cell.js +19 -0
- package/dist/components/ui/core/data-grid/data-grid-cell.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-column-filter.d.ts +4 -0
- package/dist/components/ui/core/data-grid/data-grid-column-filter.js +13 -0
- package/dist/components/ui/core/data-grid/data-grid-column-filter.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-column-resizer.d.ts +8 -0
- package/dist/components/ui/core/data-grid/data-grid-column-resizer.js +25 -0
- package/dist/components/ui/core/data-grid/data-grid-column-resizer.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-clauses.d.ts +14 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-clauses.js +36 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-clauses.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-panel.d.ts +43 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-panel.js +287 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-panel.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-footer.d.ts +6 -0
- package/dist/components/ui/core/data-grid/data-grid-footer.js +34 -0
- package/dist/components/ui/core/data-grid/data-grid-footer.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-header-row.d.ts +10 -10
- package/dist/components/ui/core/data-grid/data-grid-header-row.js +86 -0
- package/dist/components/ui/core/data-grid/data-grid-header-row.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-header.d.ts +11 -0
- package/dist/components/ui/core/data-grid/data-grid-header.js +67 -0
- package/dist/components/ui/core/data-grid/data-grid-header.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-row.d.ts +13 -15
- package/dist/components/ui/core/data-grid/data-grid-row.js +118 -0
- package/dist/components/ui/core/data-grid/data-grid-row.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-selection-state.d.ts +15 -0
- package/dist/components/ui/core/data-grid/data-grid-selection-state.js +32 -0
- package/dist/components/ui/core/data-grid/data-grid-selection-state.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-selection-toolbar.d.ts +11 -0
- package/dist/components/ui/core/data-grid/data-grid-selection-toolbar.js +129 -0
- package/dist/components/ui/core/data-grid/data-grid-selection-toolbar.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-selection.types.d.ts +24 -0
- package/dist/components/ui/core/data-grid/data-grid-selection.types.js +3 -0
- package/dist/components/ui/core/data-grid/data-grid-selection.types.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid.d.ts +125 -35
- package/dist/components/ui/core/data-grid/data-grid.fixtures.d.ts +7 -7
- package/dist/components/ui/core/data-grid/data-grid.fixtures.js +139 -0
- package/dist/components/ui/core/data-grid/data-grid.fixtures.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid.js +542 -0
- package/dist/components/ui/core/data-grid/data-grid.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid.utils.d.ts +3 -4
- package/dist/components/ui/core/data-grid/data-grid.utils.js +53 -0
- package/dist/components/ui/core/data-grid/data-grid.utils.js.map +1 -0
- package/dist/components/ui/core/data-grid/index.d.ts +6 -0
- package/dist/components/ui/core/data-grid/index.js +6 -0
- package/dist/components/ui/core/data-grid/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.d.ts +11 -13
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +85 -61
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/types.d.ts +14 -14
- package/dist/components/ui/core/date-time-pickers/date-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +51 -36
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.d.ts +11 -13
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +89 -64
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-range-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.d.ts +20 -20
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.d.ts +4 -4
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +95 -60
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/date-time-picker.d.ts +15 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/date-time-picker.js +120 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/date-time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/index.d.ts +3 -1
- package/dist/components/ui/core/date-time-pickers/date-time-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/types.d.ts +25 -32
- package/dist/components/ui/core/date-time-pickers/date-time-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.js +78 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.d.ts +13 -15
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +165 -119
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.d.ts +37 -37
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +163 -104
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/index.d.ts +17 -12
- package/dist/components/ui/core/date-time-pickers/index.js +10 -6
- package/dist/components/ui/core/date-time-pickers/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +52 -42
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/constants.d.ts +6 -1
- package/dist/components/ui/core/date-time-pickers/shared/constants.js +23 -0
- package/dist/components/ui/core/date-time-pickers/shared/constants.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.d.ts +16 -15
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +87 -64
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.d.ts +10 -9
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +89 -38
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +34 -23
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.d.ts +23 -23
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +95 -52
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +22 -18
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.d.ts +19 -19
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +41 -24
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.d.ts +13 -13
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +33 -24
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +9 -4
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.d.ts +13 -9
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +22 -17
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.d.ts +13 -13
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.js +49 -40
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.d.ts +7 -7
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js +41 -34
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/time-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.d.ts +12 -14
- package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.js +99 -79
- package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/types.d.ts +20 -20
- package/dist/components/ui/core/date-time-pickers/time-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js +63 -41
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/index.d.ts +3 -1
- package/dist/components/ui/core/date-time-pickers/time-range-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/time-range-picker.d.ts +14 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/time-range-picker.js +115 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/types.d.ts +30 -36
- package/dist/components/ui/core/date-time-pickers/time-range-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.js +145 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-input.d.ts +56 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-input.js +67 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-input.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.d.ts +18 -18
- package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.js +42 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.d.ts +31 -29
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.js +56 -0
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/segment-utils.d.ts +21 -21
- package/dist/components/ui/core/date-time-pickers/utils/segment-utils.js +170 -0
- package/dist/components/ui/core/date-time-pickers/utils/segment-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.d.ts +28 -28
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +88 -7
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-validation.d.ts +17 -17
- package/dist/components/ui/core/date-time-pickers/utils/time-validation.js +43 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-validation.js.map +1 -0
- package/dist/components/ui/core/dialog/dialog.d.ts +12 -9
- package/dist/components/ui/core/dialog/dialog.js +90 -82
- package/dist/components/ui/core/dialog/dialog.js.map +1 -0
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +22 -19
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +204 -149
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js.map +1 -0
- package/dist/components/ui/core/empty-state/empty-state.context.d.ts +4 -4
- package/dist/components/ui/core/empty-state/empty-state.context.js +8 -5
- package/dist/components/ui/core/empty-state/empty-state.context.js.map +1 -0
- package/dist/components/ui/core/empty-state/empty-state.d.ts +14 -14
- package/dist/components/ui/core/empty-state/empty-state.js +96 -82
- package/dist/components/ui/core/empty-state/empty-state.js.map +1 -0
- package/dist/components/ui/core/helper-text/helper-text.d.ts +7 -7
- package/dist/components/ui/core/helper-text/helper-text.js +55 -36
- package/dist/components/ui/core/helper-text/helper-text.js.map +1 -0
- package/dist/components/ui/core/hover-card/hover-card.d.ts +7 -6
- package/dist/components/ui/core/hover-card/hover-card.js +56 -52
- package/dist/components/ui/core/hover-card/hover-card.js.map +1 -0
- package/dist/components/ui/core/inline-citation/inline-citation.d.ts +26 -25
- package/dist/components/ui/core/inline-citation/inline-citation.js +121 -97
- package/dist/components/ui/core/inline-citation/inline-citation.js.map +1 -0
- package/dist/components/ui/core/input/input.d.ts +2 -2
- package/dist/components/ui/core/input/input.gallery.d.ts +2 -0
- package/dist/components/ui/core/input/input.gallery.js +89 -0
- package/dist/components/ui/core/input/input.gallery.js.map +1 -0
- package/dist/components/ui/core/input/input.js +15 -13
- package/dist/components/ui/core/input/input.js.map +1 -0
- package/dist/components/ui/core/input-group/input-group.d.ts +25 -14
- package/dist/components/ui/core/input-group/input-group.js +149 -76
- package/dist/components/ui/core/input-group/input-group.js.map +1 -0
- package/dist/components/ui/core/item/item.d.ts +20 -0
- package/dist/components/ui/core/item/item.js +93 -0
- package/dist/components/ui/core/item/item.js.map +1 -0
- package/dist/components/ui/core/kbd/kbd.d.ts +3 -3
- package/dist/components/ui/core/kbd/kbd.js +24 -20
- package/dist/components/ui/core/kbd/kbd.js.map +1 -0
- package/dist/components/ui/core/label/label.d.ts +3 -3
- package/dist/components/ui/core/label/label.gallery.d.ts +2 -0
- package/dist/components/ui/core/label/label.gallery.js +57 -0
- package/dist/components/ui/core/label/label.gallery.js.map +1 -0
- package/dist/components/ui/core/label/label.js +33 -26
- package/dist/components/ui/core/label/label.js.map +1 -0
- package/dist/components/ui/core/loader/loader.d.ts +6 -6
- package/dist/components/ui/core/loader/loader.js +97 -80
- package/dist/components/ui/core/loader/loader.js.map +1 -0
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.d.ts +8 -9
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.js +18 -12
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.js.map +1 -0
- package/dist/components/ui/core/message/message-response-math-plugin.d.ts +3 -0
- package/dist/components/ui/core/message/message-response-math-plugin.js +6 -0
- package/dist/components/ui/core/message/message-response-math-plugin.js.map +1 -0
- package/dist/components/ui/core/message/message.d.ts +27 -23
- package/dist/components/ui/core/message/message.js +458 -316
- package/dist/components/ui/core/message/message.js.map +1 -0
- package/dist/components/ui/core/overflow-list/overflow-list.d.ts +21 -0
- package/dist/components/ui/core/overflow-list/overflow-list.js +197 -0
- package/dist/components/ui/core/overflow-list/overflow-list.js.map +1 -0
- package/dist/components/ui/core/overflow-list/overflow-list.utils.d.ts +37 -35
- package/dist/components/ui/core/overflow-list/overflow-list.utils.js +206 -0
- package/dist/components/ui/core/overflow-list/overflow-list.utils.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination-size-context.d.ts +2 -2
- package/dist/components/ui/core/pagination/pagination-size-context.js +6 -5
- package/dist/components/ui/core/pagination/pagination-size-context.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination-teleport.d.ts +9 -9
- package/dist/components/ui/core/pagination/pagination-teleport.js +127 -84
- package/dist/components/ui/core/pagination/pagination-teleport.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination-teleport.utils.js +6 -6
- package/dist/components/ui/core/pagination/pagination-teleport.utils.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination.d.ts +39 -39
- package/dist/components/ui/core/pagination/pagination.js +294 -234
- package/dist/components/ui/core/pagination/pagination.js.map +1 -0
- package/dist/components/ui/core/popover/popover.d.ts +12 -11
- package/dist/components/ui/core/popover/popover.js +104 -89
- package/dist/components/ui/core/popover/popover.js.map +1 -0
- package/dist/components/ui/core/progress/progress.d.ts +9 -8
- package/dist/components/ui/core/progress/progress.js +50 -35
- package/dist/components/ui/core/progress/progress.js.map +1 -0
- package/dist/components/ui/core/prompt-input/prompt-input.d.ts +27 -27
- package/dist/components/ui/core/prompt-input/prompt-input.js +342 -271
- package/dist/components/ui/core/prompt-input/prompt-input.js.map +1 -0
- package/dist/components/ui/core/radio-group/radio-group.d.ts +12 -12
- package/dist/components/ui/core/radio-group/radio-group.gallery.d.ts +2 -0
- package/dist/components/ui/core/radio-group/radio-group.gallery.js +44 -0
- package/dist/components/ui/core/radio-group/radio-group.gallery.js.map +1 -0
- package/dist/components/ui/core/radio-group/radio-group.js +88 -58
- package/dist/components/ui/core/radio-group/radio-group.js.map +1 -0
- package/dist/components/ui/core/reasoning/reasoning.d.ts +7 -7
- package/dist/components/ui/core/reasoning/reasoning.js +68 -56
- package/dist/components/ui/core/reasoning/reasoning.js.map +1 -0
- package/dist/components/ui/core/scroll-area/scroll-area.d.ts +4 -4
- package/dist/components/ui/core/scroll-area/scroll-area.js +50 -40
- package/dist/components/ui/core/scroll-area/scroll-area.js.map +1 -0
- package/dist/components/ui/core/search/search.d.ts +8 -8
- package/dist/components/ui/core/search/search.js +122 -76
- package/dist/components/ui/core/search/search.js.map +1 -0
- package/dist/components/ui/core/segmented-control/segmented-control.d.ts +17 -11
- package/dist/components/ui/core/segmented-control/segmented-control.js +204 -108
- package/dist/components/ui/core/segmented-control/segmented-control.js.map +1 -0
- package/dist/components/ui/core/select/select.d.ts +33 -26
- package/dist/components/ui/core/select/select.js +262 -168
- package/dist/components/ui/core/select/select.js.map +1 -0
- package/dist/components/ui/core/separator/separator.d.ts +2 -2
- package/dist/components/ui/core/separator/separator.gallery.d.ts +2 -0
- package/dist/components/ui/core/separator/separator.gallery.js +63 -0
- package/dist/components/ui/core/separator/separator.gallery.js.map +1 -0
- package/dist/components/ui/core/separator/separator.js +13 -13
- package/dist/components/ui/core/separator/separator.js.map +1 -0
- package/dist/components/ui/core/shimmer/shimmer.d.ts +8 -8
- package/dist/components/ui/core/shimmer/shimmer.js +64 -40
- package/dist/components/ui/core/shimmer/shimmer.js.map +1 -0
- package/dist/components/ui/core/skeleton/skeleton.d.ts +2 -2
- package/dist/components/ui/core/skeleton/skeleton.gallery.d.ts +2 -0
- package/dist/components/ui/core/skeleton/skeleton.gallery.js +22 -0
- package/dist/components/ui/core/skeleton/skeleton.gallery.js.map +1 -0
- package/dist/components/ui/core/skeleton/skeleton.js +13 -13
- package/dist/components/ui/core/skeleton/skeleton.js.map +1 -0
- package/dist/components/ui/core/slider/slider.d.ts +7 -7
- package/dist/components/ui/core/slider/slider.gallery.d.ts +2 -0
- package/dist/components/ui/core/slider/slider.gallery.js +62 -0
- package/dist/components/ui/core/slider/slider.gallery.js.map +1 -0
- package/dist/components/ui/core/slider/slider.js +51 -39
- package/dist/components/ui/core/slider/slider.js.map +1 -0
- package/dist/components/ui/core/sonner-toast/sonner-toast.d.ts +2 -2
- package/dist/components/ui/core/sonner-toast/sonner-toast.js +67 -54
- package/dist/components/ui/core/sonner-toast/sonner-toast.js.map +1 -0
- package/dist/components/ui/core/sources/sources.d.ts +12 -12
- package/dist/components/ui/core/sources/sources.js +87 -58
- package/dist/components/ui/core/sources/sources.js.map +1 -0
- package/dist/components/ui/core/status-text/status-text.d.ts +4 -0
- package/dist/components/ui/core/status-text/status-text.js +14 -0
- package/dist/components/ui/core/status-text/status-text.js.map +1 -0
- package/dist/components/ui/core/switch/switch.d.ts +9 -9
- package/dist/components/ui/core/switch/switch.gallery.d.ts +2 -0
- package/dist/components/ui/core/switch/switch.gallery.js +67 -0
- package/dist/components/ui/core/switch/switch.gallery.js.map +1 -0
- package/dist/components/ui/core/switch/switch.js +83 -61
- package/dist/components/ui/core/switch/switch.js.map +1 -0
- package/dist/components/ui/core/switch/switch.metadata.d.ts +1 -1
- package/dist/components/ui/core/switch/switch.metadata.js +8 -0
- package/dist/components/ui/core/switch/switch.metadata.js.map +1 -0
- package/dist/components/ui/core/tabs/tabs.d.ts +20 -18
- package/dist/components/ui/core/tabs/tabs.js +176 -147
- package/dist/components/ui/core/tabs/tabs.js.map +1 -0
- package/dist/components/ui/core/tabs/tabs.utils.d.ts +1 -1
- package/dist/components/ui/core/tabs/tabs.utils.js +10 -6
- package/dist/components/ui/core/tabs/tabs.utils.js.map +1 -0
- package/dist/components/ui/core/textarea/textarea.d.ts +2 -2
- package/dist/components/ui/core/textarea/textarea.gallery.d.ts +2 -0
- package/dist/components/ui/core/textarea/textarea.gallery.js +51 -0
- package/dist/components/ui/core/textarea/textarea.gallery.js.map +1 -0
- package/dist/components/ui/core/textarea/textarea.js +13 -13
- package/dist/components/ui/core/textarea/textarea.js.map +1 -0
- package/dist/components/ui/core/toggle/toggle.d.ts +9 -9
- package/dist/components/ui/core/toggle/toggle.gallery.d.ts +2 -0
- package/dist/components/ui/core/toggle/toggle.gallery.js +32 -0
- package/dist/components/ui/core/toggle/toggle.gallery.js.map +1 -0
- package/dist/components/ui/core/toggle/toggle.js +60 -54
- package/dist/components/ui/core/toggle/toggle.js.map +1 -0
- package/dist/components/ui/core/tool/tool.d.ts +18 -18
- package/dist/components/ui/core/tool/tool.js +167 -126
- package/dist/components/ui/core/tool/tool.js.map +1 -0
- package/dist/components/ui/core/toolbar/toolbar.d.ts +37 -0
- package/dist/components/ui/core/toolbar/toolbar.js +171 -0
- package/dist/components/ui/core/toolbar/toolbar.js.map +1 -0
- package/dist/components/ui/core/tooltip/tooltip.d.ts +8 -7
- package/dist/components/ui/core/tooltip/tooltip.gallery.d.ts +2 -0
- package/dist/components/ui/core/tooltip/tooltip.gallery.js +52 -0
- package/dist/components/ui/core/tooltip/tooltip.gallery.js.map +1 -0
- package/dist/components/ui/core/tooltip/tooltip.js +53 -46
- package/dist/components/ui/core/tooltip/tooltip.js.map +1 -0
- package/dist/components/ui/core/topbar/topbar.d.ts +26 -26
- package/dist/components/ui/core/topbar/topbar.js +160 -105
- package/dist/components/ui/core/topbar/topbar.js.map +1 -0
- package/dist/components/ui/core/tree/tree.d.ts +20 -0
- package/dist/components/ui/core/tree/tree.js +100 -0
- package/dist/components/ui/core/tree/tree.js.map +1 -0
- package/dist/eslint/index.d.ts +5 -5
- package/dist/eslint/index.js +9 -5
- package/dist/eslint/index.js.map +1 -0
- package/dist/eslint/no-overriding-styles.d.ts +1 -1
- package/dist/eslint/no-overriding-styles.js +341 -201
- package/dist/eslint/no-overriding-styles.js.map +1 -0
- package/dist/icons/index.d.ts +1 -1
- package/dist/icons/index.js +2 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/ai/types.d.ts +43 -43
- package/dist/lib/ai/types.js +3 -0
- package/dist/lib/ai/types.js.map +1 -0
- package/dist/lib/decorative-variant-classes.d.ts +53 -0
- package/dist/lib/decorative-variant-classes.js +58 -0
- package/dist/lib/decorative-variant-classes.js.map +1 -0
- package/dist/lib/highlight-code.d.ts +11 -8
- package/dist/lib/highlight-code.js +58 -40
- package/dist/lib/highlight-code.js.map +1 -0
- package/dist/lib/portal-container-context.d.ts +1 -1
- package/dist/lib/portal-container-context.js +8 -8
- package/dist/lib/portal-container-context.js.map +1 -0
- package/dist/lib/shared-theme-from-url.d.ts +13 -0
- package/dist/lib/shared-theme-from-url.js +61 -0
- package/dist/lib/shared-theme-from-url.js.map +1 -0
- package/dist/lib/style-scope.d.ts +2 -2
- package/dist/lib/style-scope.js +6 -6
- package/dist/lib/style-scope.js.map +1 -0
- package/dist/lib/theme-share-url.d.ts +31 -0
- package/dist/lib/theme-share-url.js +116 -0
- package/dist/lib/theme-share-url.js.map +1 -0
- package/dist/lib/types.d.ts +39 -39
- package/dist/lib/types.js +3 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/use-controllable-state.d.ts +4 -7
- package/dist/lib/use-controllable-state.js +34 -21
- package/dist/lib/use-controllable-state.js.map +1 -0
- package/dist/lib/utils.d.ts +63 -34
- package/dist/lib/utils.js +134 -32
- package/dist/lib/utils.js.map +1 -0
- package/dist/styles.css +2 -1
- package/dist/styles.source.css +46 -16
- package/dist/utils/assign-ref.d.ts +3 -0
- package/dist/utils/assign-ref.js +13 -0
- package/dist/utils/assign-ref.js.map +1 -0
- package/package.json +53 -14
- package/src/components/ui/core/alert/alert.md +46 -0
- package/src/components/ui/core/avatar/avatar.md +30 -0
- package/src/components/ui/core/badge/badge.md +32 -0
- package/src/components/ui/core/banner/banner.md +51 -0
- package/src/components/ui/core/breadcrumb/breadcrumb.md +45 -0
- package/src/components/ui/core/button/button.md +93 -0
- package/src/components/ui/core/button-group/button-group.md +38 -0
- package/src/components/ui/core/checkbox/checkbox.md +37 -0
- package/src/components/ui/core/collapsible/collapsible.md +42 -0
- package/src/components/ui/core/count/count.md +33 -0
- package/src/components/ui/core/input/input.md +48 -0
- package/src/components/ui/core/label/label.md +35 -0
- package/src/components/ui/core/radio-group/radio-group.md +38 -0
- package/src/components/ui/core/separator/separator.md +32 -0
- package/src/components/ui/core/skeleton/skeleton.md +33 -0
- package/src/components/ui/core/slider/slider.md +41 -0
- package/src/components/ui/core/switch/switch.md +26 -0
- package/src/components/ui/core/textarea/textarea.md +42 -0
- package/src/components/ui/core/toggle/toggle.md +39 -0
- package/src/components/ui/core/tooltip/tooltip.md +41 -0
|
@@ -1,179 +1,273 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, forwardRef, useContext, useId, useMemo } from "react";
|
|
3
|
+
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
4
|
+
import { IconCheck, IconChevronDown, IconChevronUp, IconCircleXFilled, IconExclamationCircle } from "@tabler/icons-react";
|
|
5
|
+
import { usePortalContainer } from "../../../../lib/portal-container-context.js";
|
|
6
|
+
import { useControllableState } from "../../../../lib/use-controllable-state.js";
|
|
7
|
+
import { cn, formFieldOpenState, formFieldTriggerClasses, menuContainerPadding, menuItemPadding, menuSectionLabelClasses, menuSectionSeparatorClasses } from "../../../../lib/utils.js";
|
|
8
|
+
import { Button } from "../button/button.js";
|
|
9
|
+
const SelectContext = /*#__PURE__*/ createContext(null);
|
|
10
|
+
const useSelect = ()=>{
|
|
11
|
+
const context = useContext(SelectContext);
|
|
12
|
+
if (!context) {
|
|
13
|
+
throw new Error('Select components must be used within Select');
|
|
14
|
+
}
|
|
15
|
+
return context;
|
|
13
16
|
};
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
17
|
+
function Select(props) {
|
|
18
|
+
const [isOpen, setIsOpen] = useControllableState({
|
|
19
|
+
prop: props.open,
|
|
20
|
+
defaultProp: props.defaultOpen ?? false,
|
|
21
|
+
onChange: props.onOpenChange
|
|
22
|
+
});
|
|
23
|
+
const [value, setValue] = useControllableState({
|
|
24
|
+
prop: props.value,
|
|
25
|
+
defaultProp: props.defaultValue ?? (props.multiple ? [] : ''),
|
|
26
|
+
onChange: (nextValue)=>{
|
|
27
|
+
if (props.multiple) {
|
|
28
|
+
props.onValueChange?.(Array.isArray(nextValue) ? nextValue : []);
|
|
29
|
+
} else {
|
|
30
|
+
props.onValueChange?.(typeof nextValue === 'string' ? nextValue : '');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const hasValue = value.length > 0;
|
|
35
|
+
const canClear = props.clearable === true && hasValue && !props.required && !props.disabled && !props.readOnly;
|
|
36
|
+
const isMultiple = props.multiple === true;
|
|
37
|
+
const selectContext = useMemo(()=>({
|
|
38
|
+
isOpen: isOpen ?? false,
|
|
39
|
+
canClear,
|
|
40
|
+
clear: ()=>setValue(isMultiple ? [] : '')
|
|
41
|
+
}), [
|
|
42
|
+
isOpen,
|
|
43
|
+
canClear,
|
|
44
|
+
isMultiple,
|
|
45
|
+
setValue
|
|
46
|
+
]);
|
|
47
|
+
if (props.multiple) {
|
|
48
|
+
const { multiple: _multiple, value: _value, defaultValue: _defaultValue, onValueChange: _onValueChange, clearable: _clearable, ...rest } = props;
|
|
49
|
+
return /*#__PURE__*/ _jsx(SelectContext.Provider, {
|
|
50
|
+
value: selectContext,
|
|
51
|
+
children: /*#__PURE__*/ _jsx(SelectPrimitive.Root, {
|
|
52
|
+
"data-slot": "select",
|
|
53
|
+
open: isOpen,
|
|
54
|
+
onOpenChange: (nextOpen)=>setIsOpen(nextOpen),
|
|
55
|
+
value: Array.isArray(value) ? value : [],
|
|
56
|
+
onValueChange: (nextValue, _details)=>{
|
|
57
|
+
setValue(nextValue ?? []);
|
|
58
|
+
},
|
|
59
|
+
multiple: true,
|
|
60
|
+
...rest
|
|
61
|
+
})
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
const { value: _value, defaultValue: _defaultValue, onValueChange: _onValueChange, clearable: _clearable, ...rest } = props;
|
|
65
|
+
return /*#__PURE__*/ _jsx(SelectContext.Provider, {
|
|
66
|
+
value: selectContext,
|
|
67
|
+
children: /*#__PURE__*/ _jsx(SelectPrimitive.Root, {
|
|
68
|
+
"data-slot": "select",
|
|
69
|
+
open: isOpen,
|
|
70
|
+
onOpenChange: (nextOpen)=>setIsOpen(nextOpen),
|
|
71
|
+
value: typeof value === 'string' && value !== '' ? value : null,
|
|
72
|
+
onValueChange: (nextValue, _details)=>{
|
|
73
|
+
setValue(typeof nextValue === 'string' ? nextValue : '');
|
|
74
|
+
},
|
|
75
|
+
...rest
|
|
76
|
+
})
|
|
77
|
+
});
|
|
53
78
|
}
|
|
54
|
-
function
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
79
|
+
function SelectGroup({ className, ...props }) {
|
|
80
|
+
return /*#__PURE__*/ _jsx(SelectPrimitive.Group, {
|
|
81
|
+
"data-slot": "select-group",
|
|
82
|
+
className: cn('scroll-my-1 p-1', className),
|
|
83
|
+
...props
|
|
84
|
+
});
|
|
60
85
|
}
|
|
61
|
-
function
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
86
|
+
function SelectValue({ icon, ...props }) {
|
|
87
|
+
if (icon) {
|
|
88
|
+
return /*#__PURE__*/ _jsxs("span", {
|
|
89
|
+
className: "flex flex-1 items-center gap-2 min-w-0 overflow-hidden",
|
|
90
|
+
children: [
|
|
91
|
+
icon,
|
|
92
|
+
/*#__PURE__*/ _jsx(SelectPrimitive.Value, {
|
|
93
|
+
"data-slot": "select-value",
|
|
94
|
+
className: "flex-1 truncate min-w-0 text-base-foreground data-placeholder:text-muted-foreground data-disabled:text-base-foreground-disabled data-readonly:text-muted-foreground",
|
|
95
|
+
...props
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
return /*#__PURE__*/ _jsx(SelectPrimitive.Value, {
|
|
101
|
+
"data-slot": "select-value",
|
|
102
|
+
className: "flex-1 truncate min-w-0 text-base-foreground data-placeholder:text-muted-foreground data-disabled:text-base-foreground-disabled data-readonly:text-muted-foreground",
|
|
103
|
+
...props
|
|
104
|
+
});
|
|
74
105
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
106
|
+
const stopTriggerEvent = (event)=>{
|
|
107
|
+
event.stopPropagation();
|
|
108
|
+
};
|
|
109
|
+
function SelectClearButton({ label }) {
|
|
110
|
+
const { clear } = useSelect();
|
|
111
|
+
return /*#__PURE__*/ _jsx(Button, {
|
|
112
|
+
"data-slot": "select-clear",
|
|
113
|
+
variant: "ghost",
|
|
114
|
+
size: "icon-sm",
|
|
115
|
+
render: /*#__PURE__*/ _jsx("span", {}),
|
|
116
|
+
"aria-label": label,
|
|
117
|
+
className: "rounded-md",
|
|
118
|
+
onPointerDown: stopTriggerEvent,
|
|
119
|
+
onMouseDown: stopTriggerEvent,
|
|
120
|
+
onKeyDown: stopTriggerEvent,
|
|
121
|
+
onKeyUp: stopTriggerEvent,
|
|
122
|
+
onClick: (event)=>{
|
|
123
|
+
event.stopPropagation();
|
|
124
|
+
event.preventDefault();
|
|
125
|
+
const trigger = event.currentTarget.closest('[data-slot="select-trigger"]');
|
|
126
|
+
clear();
|
|
127
|
+
trigger?.focus();
|
|
128
|
+
},
|
|
129
|
+
children: /*#__PURE__*/ _jsx(IconCircleXFilled, {
|
|
130
|
+
className: "size-4 text-medium-foreground",
|
|
131
|
+
"aria-hidden": true
|
|
132
|
+
})
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
const SelectTrigger = /*#__PURE__*/ forwardRef(({ className, size = 'default', children, errorMessage, clearLabel = 'Clear selection', ...props }, ref)=>{
|
|
136
|
+
const { isOpen, canClear } = useSelect();
|
|
137
|
+
const isInvalid = !!errorMessage;
|
|
138
|
+
const errorId = useId();
|
|
139
|
+
const showClear = canClear && !isOpen && !props.disabled;
|
|
140
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
141
|
+
children: [
|
|
142
|
+
/*#__PURE__*/ _jsxs(SelectPrimitive.Trigger, {
|
|
143
|
+
ref: ref,
|
|
144
|
+
"data-slot": "select-trigger",
|
|
145
|
+
"data-size": size,
|
|
146
|
+
"aria-invalid": isInvalid ? true : undefined,
|
|
147
|
+
"aria-describedby": isInvalid ? errorId : undefined,
|
|
148
|
+
className: cn('min-w-50 max-w-[min(100%,420px)]', formFieldTriggerClasses, isOpen && formFieldOpenState, className),
|
|
149
|
+
...props,
|
|
150
|
+
children: [
|
|
151
|
+
children,
|
|
152
|
+
showClear && /*#__PURE__*/ _jsx(SelectClearButton, {
|
|
153
|
+
label: clearLabel
|
|
154
|
+
}),
|
|
155
|
+
/*#__PURE__*/ _jsx(SelectPrimitive.Icon, {
|
|
156
|
+
render: /*#__PURE__*/ _jsx(IconChevronDown, {
|
|
157
|
+
className: cn('size-4 opacity-50 transition-transform', isOpen ? 'rotate-180' : 'rotate-0')
|
|
158
|
+
})
|
|
159
|
+
})
|
|
160
|
+
]
|
|
161
|
+
}),
|
|
162
|
+
errorMessage && /*#__PURE__*/ _jsxs("div", {
|
|
163
|
+
id: errorId,
|
|
164
|
+
className: "flex flex-row gap-1 justify-start items-center p-1",
|
|
165
|
+
children: [
|
|
166
|
+
/*#__PURE__*/ _jsx(IconExclamationCircle, {
|
|
167
|
+
className: "text-destructive-foreground text-sm size-4"
|
|
168
|
+
}),
|
|
169
|
+
/*#__PURE__*/ _jsx("span", {
|
|
170
|
+
className: "text-destructive-foreground text-sm",
|
|
171
|
+
children: errorMessage
|
|
172
|
+
})
|
|
173
|
+
]
|
|
174
|
+
})
|
|
175
|
+
]
|
|
176
|
+
});
|
|
94
177
|
});
|
|
95
|
-
|
|
96
|
-
function
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
178
|
+
SelectTrigger.displayName = 'SelectTrigger';
|
|
179
|
+
function SelectContent({ className, children, position: _position = 'popper', align = 'start', alignOffset = 0, side = 'bottom', sideOffset = 4, ...props }) {
|
|
180
|
+
const container = usePortalContainer();
|
|
181
|
+
return /*#__PURE__*/ _jsx(SelectPrimitive.Portal, {
|
|
182
|
+
container: container,
|
|
183
|
+
children: /*#__PURE__*/ _jsx(SelectPrimitive.Positioner, {
|
|
184
|
+
alignItemWithTrigger: false,
|
|
185
|
+
align: align,
|
|
186
|
+
alignOffset: alignOffset,
|
|
187
|
+
side: side,
|
|
188
|
+
sideOffset: sideOffset,
|
|
189
|
+
collisionPadding: 10,
|
|
190
|
+
className: "isolate z-50",
|
|
191
|
+
children: /*#__PURE__*/ _jsxs(SelectPrimitive.Popup, {
|
|
192
|
+
"data-slot": "select-content",
|
|
193
|
+
className: cn('bg-popover-background text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--available-height) max-w-[min(100%,420px)] min-w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-default shadow-md outline-none', menuContainerPadding, _position === 'popper' && 'data-[side=bottom]:translate-y-1', className),
|
|
194
|
+
...props,
|
|
195
|
+
children: [
|
|
196
|
+
/*#__PURE__*/ _jsx(SelectScrollUpButton, {}),
|
|
197
|
+
/*#__PURE__*/ _jsx(SelectPrimitive.List, {
|
|
198
|
+
children: children
|
|
199
|
+
}),
|
|
200
|
+
/*#__PURE__*/ _jsx(SelectScrollDownButton, {})
|
|
201
|
+
]
|
|
202
|
+
})
|
|
203
|
+
})
|
|
204
|
+
});
|
|
120
205
|
}
|
|
121
|
-
function
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
206
|
+
function SelectLabel({ className, ...props }) {
|
|
207
|
+
return /*#__PURE__*/ _jsx(SelectPrimitive.GroupLabel, {
|
|
208
|
+
"data-slot": "select-label",
|
|
209
|
+
className: cn(menuSectionLabelClasses, className),
|
|
210
|
+
...props
|
|
211
|
+
});
|
|
127
212
|
}
|
|
128
|
-
function
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
213
|
+
function SelectItem({ className, children, icon, suffix, ...props }) {
|
|
214
|
+
const title = typeof children === 'string' ? children : undefined;
|
|
215
|
+
return /*#__PURE__*/ _jsxs(SelectPrimitive.Item, {
|
|
216
|
+
"data-slot": "select-item",
|
|
217
|
+
className: cn("relative flex w-full min-h-9 cursor-default items-center gap-2 rounded-lg pr-8 text-sm leading-4.5 font-medium outline-hidden select-none focus:bg-popover-background-hover focus:text-popover-foreground data-[disabled]:pointer-events-none data-[disabled]:text-base-foreground-disabled data-[disabled]:opacity-100 data-[disabled]:[&_svg]:text-base-foreground-disabled [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", menuItemPadding, className),
|
|
218
|
+
...props,
|
|
219
|
+
children: [
|
|
220
|
+
/*#__PURE__*/ _jsx(SelectPrimitive.ItemIndicator, {
|
|
221
|
+
render: /*#__PURE__*/ _jsx("span", {
|
|
222
|
+
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
223
|
+
children: /*#__PURE__*/ _jsx(IconCheck, {
|
|
224
|
+
className: "size-4 text-popover-foreground"
|
|
225
|
+
})
|
|
226
|
+
})
|
|
227
|
+
}),
|
|
228
|
+
icon && /*#__PURE__*/ _jsx("span", {
|
|
229
|
+
className: "flex items-center gap-2 mr-1",
|
|
230
|
+
children: icon
|
|
231
|
+
}),
|
|
232
|
+
/*#__PURE__*/ _jsx(SelectPrimitive.ItemText, {
|
|
233
|
+
className: "flex-1 truncate min-w-0",
|
|
234
|
+
title: title,
|
|
235
|
+
children: children
|
|
236
|
+
}),
|
|
237
|
+
suffix && /*#__PURE__*/ _jsx("span", {
|
|
238
|
+
className: "shrink-0 ml-auto",
|
|
239
|
+
children: suffix
|
|
240
|
+
})
|
|
241
|
+
]
|
|
242
|
+
});
|
|
154
243
|
}
|
|
155
|
-
function
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
244
|
+
function SelectSeparator({ className, ...props }) {
|
|
245
|
+
return /*#__PURE__*/ _jsx(SelectPrimitive.Separator, {
|
|
246
|
+
"data-slot": "select-separator",
|
|
247
|
+
className: cn(menuSectionSeparatorClasses, 'pointer-events-none', className),
|
|
248
|
+
...props
|
|
249
|
+
});
|
|
161
250
|
}
|
|
162
|
-
function
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
251
|
+
function SelectScrollUpButton({ className, ...props }) {
|
|
252
|
+
return /*#__PURE__*/ _jsx(SelectPrimitive.ScrollUpArrow, {
|
|
253
|
+
"data-slot": "select-scroll-up-button",
|
|
254
|
+
className: cn('bg-popover-background z-10 flex cursor-default items-center justify-center py-1 top-0 w-full', className),
|
|
255
|
+
...props,
|
|
256
|
+
children: /*#__PURE__*/ _jsx(IconChevronUp, {
|
|
257
|
+
className: "size-4"
|
|
258
|
+
})
|
|
259
|
+
});
|
|
169
260
|
}
|
|
170
|
-
function
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
261
|
+
function SelectScrollDownButton({ className, ...props }) {
|
|
262
|
+
return /*#__PURE__*/ _jsx(SelectPrimitive.ScrollDownArrow, {
|
|
263
|
+
"data-slot": "select-scroll-down-button",
|
|
264
|
+
className: cn('bg-popover-background z-10 flex cursor-default items-center justify-center py-1 bottom-0 w-full', className),
|
|
265
|
+
...props,
|
|
266
|
+
children: /*#__PURE__*/ _jsx(IconChevronDown, {
|
|
267
|
+
className: "size-4"
|
|
268
|
+
})
|
|
269
|
+
});
|
|
177
270
|
}
|
|
178
|
-
|
|
179
|
-
|
|
271
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
272
|
+
|
|
273
|
+
//# sourceMappingURL=select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/select/select.tsx"],"sourcesContent":["import {\n type ForwardRefExoticComponent,\n type RefAttributes,\n type ComponentRef,\n type ReactNode,\n type SyntheticEvent,\n createContext,\n forwardRef,\n useContext,\n useId,\n useMemo,\n} from 'react';\n\nimport type { SelectTriggerProps } from '@base-ui/react/select';\nimport { Select as SelectPrimitive } from '@base-ui/react/select';\nimport {\n IconCheck,\n IconChevronDown,\n IconChevronUp,\n IconCircleXFilled,\n IconExclamationCircle,\n} from '@tabler/icons-react';\n\nimport { usePortalContainer } from '../../../../lib/portal-container-context';\nimport { useControllableState } from '../../../../lib/use-controllable-state';\nimport {\n cn,\n formFieldOpenState,\n formFieldTriggerClasses,\n menuContainerPadding,\n menuItemPadding,\n menuSectionLabelClasses,\n menuSectionSeparatorClasses,\n} from '../../../../lib/utils';\nimport { Button } from '../button/button';\n\ntype SelectContextValue = {\n isOpen: boolean;\n canClear: boolean;\n clear: () => void;\n};\n\nconst SelectContext = createContext<SelectContextValue | null>(null);\n\nconst useSelect = () => {\n const context = useContext(SelectContext);\n if (!context) {\n throw new Error('Select components must be used within Select');\n }\n return context;\n};\n\ntype SelectPropsBase = Omit<\n SelectPrimitive.Root.Props<string>,\n | 'open'\n | 'defaultOpen'\n | 'onOpenChange'\n | 'value'\n | 'defaultValue'\n | 'onValueChange'\n | 'multiple'\n> & {\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n /**\n * Shows a clear button in the trigger while the select has a value.\n * Ignored when the select is required, disabled or read-only.\n */\n clearable?: boolean;\n};\n\ntype SelectPropsSingle = SelectPropsBase & {\n multiple?: false;\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n};\n\ntype SelectPropsMultiple = SelectPropsBase & {\n multiple: true;\n value?: string[];\n defaultValue?: string[];\n onValueChange?: (value: string[]) => void;\n};\n\ntype SelectProps = SelectPropsSingle | SelectPropsMultiple;\n\nfunction Select(props: SelectPropsSingle): ReactNode;\nfunction Select(props: SelectPropsMultiple): ReactNode;\nfunction Select(props: SelectProps) {\n const [isOpen, setIsOpen] = useControllableState({\n prop: props.open,\n defaultProp: props.defaultOpen ?? false,\n onChange: props.onOpenChange,\n });\n\n const [value, setValue] = useControllableState<string | string[]>({\n prop: props.value,\n defaultProp: props.defaultValue ?? (props.multiple ? [] : ''),\n onChange: (nextValue) => {\n if (props.multiple) {\n props.onValueChange?.(Array.isArray(nextValue) ? nextValue : []);\n } else {\n props.onValueChange?.(typeof nextValue === 'string' ? nextValue : '');\n }\n },\n });\n\n const hasValue = value.length > 0;\n const canClear =\n props.clearable === true &&\n hasValue &&\n !props.required &&\n !props.disabled &&\n !props.readOnly;\n const isMultiple = props.multiple === true;\n\n const selectContext = useMemo(\n () => ({\n isOpen: isOpen ?? false,\n canClear,\n clear: () => setValue(isMultiple ? [] : ''),\n }),\n [isOpen, canClear, isMultiple, setValue]\n );\n\n if (props.multiple) {\n const {\n multiple: _multiple,\n value: _value,\n defaultValue: _defaultValue,\n onValueChange: _onValueChange,\n clearable: _clearable,\n ...rest\n } = props;\n\n return (\n <SelectContext.Provider value={selectContext}>\n <SelectPrimitive.Root\n data-slot=\"select\"\n open={isOpen}\n onOpenChange={(nextOpen) => setIsOpen(nextOpen)}\n value={Array.isArray(value) ? value : []}\n onValueChange={(nextValue, _details) => {\n setValue(nextValue ?? []);\n }}\n multiple\n {...rest}\n />\n </SelectContext.Provider>\n );\n }\n\n const {\n value: _value,\n defaultValue: _defaultValue,\n onValueChange: _onValueChange,\n clearable: _clearable,\n ...rest\n } = props;\n\n return (\n <SelectContext.Provider value={selectContext}>\n <SelectPrimitive.Root\n data-slot=\"select\"\n open={isOpen}\n onOpenChange={(nextOpen) => setIsOpen(nextOpen)}\n value={typeof value === 'string' && value !== '' ? value : null}\n onValueChange={(nextValue, _details) => {\n setValue(typeof nextValue === 'string' ? nextValue : '');\n }}\n {...rest}\n />\n </SelectContext.Provider>\n );\n}\n\nfunction SelectGroup({\n className,\n ...props\n}: SelectPrimitive.Group.Props): ReactNode {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={cn('scroll-my-1 p-1', className)}\n {...props}\n />\n );\n}\n\nfunction SelectValue({\n icon,\n ...props\n}: SelectPrimitive.Value.Props & {\n icon?: ReactNode;\n}): ReactNode {\n if (icon) {\n return (\n <span className=\"flex flex-1 items-center gap-2 min-w-0 overflow-hidden\">\n {icon}\n <SelectPrimitive.Value\n data-slot=\"select-value\"\n className=\"flex-1 truncate min-w-0 text-base-foreground data-placeholder:text-muted-foreground data-disabled:text-base-foreground-disabled data-readonly:text-muted-foreground\"\n {...props}\n />\n </span>\n );\n }\n return (\n <SelectPrimitive.Value\n data-slot=\"select-value\"\n className=\"flex-1 truncate min-w-0 text-base-foreground data-placeholder:text-muted-foreground data-disabled:text-base-foreground-disabled data-readonly:text-muted-foreground\"\n {...props}\n />\n );\n}\n\nconst stopTriggerEvent = (event: SyntheticEvent) => {\n event.stopPropagation();\n};\n\nfunction SelectClearButton({ label }: { label: string }): ReactNode {\n const { clear } = useSelect();\n\n return (\n <Button\n data-slot=\"select-clear\"\n variant=\"ghost\"\n size=\"icon-sm\"\n render={<span />}\n aria-label={label}\n className=\"rounded-md\"\n onPointerDown={stopTriggerEvent}\n onMouseDown={stopTriggerEvent}\n onKeyDown={stopTriggerEvent}\n onKeyUp={stopTriggerEvent}\n onClick={(event) => {\n event.stopPropagation();\n event.preventDefault();\n const trigger = event.currentTarget.closest<HTMLElement>(\n '[data-slot=\"select-trigger\"]'\n );\n clear();\n trigger?.focus();\n }}\n >\n <IconCircleXFilled\n className=\"size-4 text-medium-foreground\"\n aria-hidden\n />\n </Button>\n );\n}\n\nconst SelectTrigger: ForwardRefExoticComponent<\n Omit<\n SelectTriggerProps & {\n size?: 'sm' | 'default';\n errorMessage?: string;\n clearLabel?: string;\n },\n 'ref'\n > &\n RefAttributes<HTMLButtonElement>\n> = forwardRef<\n ComponentRef<typeof SelectPrimitive.Trigger>,\n SelectPrimitive.Trigger.Props & {\n size?: 'sm' | 'default';\n errorMessage?: string;\n clearLabel?: string;\n }\n>(\n (\n {\n className,\n size = 'default',\n children,\n errorMessage,\n clearLabel = 'Clear selection',\n ...props\n },\n ref\n ) => {\n const { isOpen, canClear } = useSelect();\n const isInvalid = !!errorMessage;\n const errorId = useId();\n const showClear = canClear && !isOpen && !props.disabled;\n\n return (\n <>\n <SelectPrimitive.Trigger\n ref={ref}\n data-slot=\"select-trigger\"\n data-size={size}\n aria-invalid={isInvalid ? true : undefined}\n aria-describedby={isInvalid ? errorId : undefined}\n className={cn(\n 'min-w-50 max-w-[min(100%,420px)]',\n formFieldTriggerClasses,\n isOpen && formFieldOpenState,\n className\n )}\n {...props}\n >\n {children}\n {showClear && <SelectClearButton label={clearLabel} />}\n <SelectPrimitive.Icon\n render={\n <IconChevronDown\n className={cn(\n 'size-4 opacity-50 transition-transform',\n isOpen ? 'rotate-180' : 'rotate-0'\n )}\n />\n }\n />\n </SelectPrimitive.Trigger>\n {errorMessage && (\n <div\n id={errorId}\n className=\"flex flex-row gap-1 justify-start items-center p-1\"\n >\n <IconExclamationCircle className=\"text-destructive-foreground text-sm size-4\" />\n <span className=\"text-destructive-foreground text-sm\">\n {errorMessage}\n </span>\n </div>\n )}\n </>\n );\n }\n);\n\nSelectTrigger.displayName = 'SelectTrigger';\n\nfunction SelectContent({\n className,\n children,\n position: _position = 'popper',\n align = 'start',\n alignOffset = 0,\n side = 'bottom',\n sideOffset = 4,\n ...props\n}: SelectPrimitive.Popup.Props & {\n position?: 'popper' | 'item-aligned';\n align?: SelectPrimitive.Positioner.Props['align'];\n alignOffset?: SelectPrimitive.Positioner.Props['alignOffset'];\n side?: SelectPrimitive.Positioner.Props['side'];\n sideOffset?: SelectPrimitive.Positioner.Props['sideOffset'];\n}): ReactNode {\n const container = usePortalContainer();\n return (\n <SelectPrimitive.Portal container={container}>\n <SelectPrimitive.Positioner\n alignItemWithTrigger={false}\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n collisionPadding={10}\n className=\"isolate z-50\"\n >\n <SelectPrimitive.Popup\n data-slot=\"select-content\"\n className={cn(\n 'bg-popover-background text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--available-height) max-w-[min(100%,420px)] min-w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-default shadow-md outline-none',\n menuContainerPadding,\n _position === 'popper' && 'data-[side=bottom]:translate-y-1',\n className\n )}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.List>{children}</SelectPrimitive.List>\n <SelectScrollDownButton />\n </SelectPrimitive.Popup>\n </SelectPrimitive.Positioner>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: SelectPrimitive.GroupLabel.Props): ReactNode {\n return (\n <SelectPrimitive.GroupLabel\n data-slot=\"select-label\"\n className={cn(menuSectionLabelClasses, className)}\n {...props}\n />\n );\n}\n\nfunction SelectItem({\n className,\n children,\n icon,\n suffix,\n ...props\n}: SelectPrimitive.Item.Props & {\n icon?: ReactNode;\n suffix?: ReactNode;\n}): ReactNode {\n const title = typeof children === 'string' ? children : undefined;\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"relative flex w-full min-h-9 cursor-default items-center gap-2 rounded-lg pr-8 text-sm leading-4.5 font-medium outline-hidden select-none focus:bg-popover-background-hover focus:text-popover-foreground data-[disabled]:pointer-events-none data-[disabled]:text-base-foreground-disabled data-[disabled]:opacity-100 data-[disabled]:[&_svg]:text-base-foreground-disabled [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\n menuItemPadding,\n className\n )}\n {...props}\n >\n <SelectPrimitive.ItemIndicator\n render={\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <IconCheck className=\"size-4 text-popover-foreground\" />\n </span>\n }\n />\n {icon && <span className=\"flex items-center gap-2 mr-1\">{icon}</span>}\n <SelectPrimitive.ItemText\n className=\"flex-1 truncate min-w-0\"\n title={title}\n >\n {children}\n </SelectPrimitive.ItemText>\n {suffix && <span className=\"shrink-0 ml-auto\">{suffix}</span>}\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: SelectPrimitive.Separator.Props): ReactNode {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\n menuSectionSeparatorClasses,\n 'pointer-events-none',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: SelectPrimitive.ScrollUpArrow.Props): ReactNode {\n return (\n <SelectPrimitive.ScrollUpArrow\n data-slot=\"select-scroll-up-button\"\n className={cn(\n 'bg-popover-background z-10 flex cursor-default items-center justify-center py-1 top-0 w-full',\n className\n )}\n {...props}\n >\n <IconChevronUp className=\"size-4\" />\n </SelectPrimitive.ScrollUpArrow>\n );\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: SelectPrimitive.ScrollDownArrow.Props): ReactNode {\n return (\n <SelectPrimitive.ScrollDownArrow\n data-slot=\"select-scroll-down-button\"\n className={cn(\n 'bg-popover-background z-10 flex cursor-default items-center justify-center py-1 bottom-0 w-full',\n className\n )}\n {...props}\n >\n <IconChevronDown className=\"size-4\" />\n </SelectPrimitive.ScrollDownArrow>\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"names":["createContext","forwardRef","useContext","useId","useMemo","Select","SelectPrimitive","IconCheck","IconChevronDown","IconChevronUp","IconCircleXFilled","IconExclamationCircle","usePortalContainer","useControllableState","cn","formFieldOpenState","formFieldTriggerClasses","menuContainerPadding","menuItemPadding","menuSectionLabelClasses","menuSectionSeparatorClasses","Button","SelectContext","useSelect","context","Error","props","isOpen","setIsOpen","prop","open","defaultProp","defaultOpen","onChange","onOpenChange","value","setValue","defaultValue","multiple","nextValue","onValueChange","Array","isArray","hasValue","length","canClear","clearable","required","disabled","readOnly","isMultiple","selectContext","clear","_multiple","_value","_defaultValue","_onValueChange","_clearable","rest","Provider","Root","data-slot","nextOpen","_details","SelectGroup","className","Group","SelectValue","icon","span","Value","stopTriggerEvent","event","stopPropagation","SelectClearButton","label","variant","size","render","aria-label","onPointerDown","onMouseDown","onKeyDown","onKeyUp","onClick","preventDefault","trigger","currentTarget","closest","focus","aria-hidden","SelectTrigger","children","errorMessage","clearLabel","ref","isInvalid","errorId","showClear","Trigger","data-size","aria-invalid","undefined","aria-describedby","Icon","div","id","displayName","SelectContent","position","_position","align","alignOffset","side","sideOffset","container","Portal","Positioner","alignItemWithTrigger","collisionPadding","Popup","SelectScrollUpButton","List","SelectScrollDownButton","SelectLabel","GroupLabel","SelectItem","suffix","title","Item","ItemIndicator","ItemText","SelectSeparator","Separator","ScrollUpArrow","ScrollDownArrow"],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import { Separator as SeparatorPrimitive } from
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
3
3
|
declare function Separator({ className, orientation, ...props }: SeparatorPrimitive.Props): ReactNode;
|
|
4
4
|
export { Separator };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Separator } from "./separator.js";
|
|
3
|
+
export function SeparatorGallery() {
|
|
4
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
5
|
+
className: "space-y-8",
|
|
6
|
+
children: [
|
|
7
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
8
|
+
children: [
|
|
9
|
+
/*#__PURE__*/ _jsx("h3", {
|
|
10
|
+
className: "text-sm font-medium mb-4",
|
|
11
|
+
children: "Horizontal"
|
|
12
|
+
}),
|
|
13
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
14
|
+
className: "w-75 space-y-4",
|
|
15
|
+
children: [
|
|
16
|
+
/*#__PURE__*/ _jsx("p", {
|
|
17
|
+
className: "text-sm",
|
|
18
|
+
children: "Content above"
|
|
19
|
+
}),
|
|
20
|
+
/*#__PURE__*/ _jsx(Separator, {
|
|
21
|
+
orientation: "horizontal"
|
|
22
|
+
}),
|
|
23
|
+
/*#__PURE__*/ _jsx("p", {
|
|
24
|
+
className: "text-sm",
|
|
25
|
+
children: "Content below"
|
|
26
|
+
})
|
|
27
|
+
]
|
|
28
|
+
})
|
|
29
|
+
]
|
|
30
|
+
}),
|
|
31
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
32
|
+
children: [
|
|
33
|
+
/*#__PURE__*/ _jsx("h3", {
|
|
34
|
+
className: "text-sm font-medium mb-4",
|
|
35
|
+
children: "Vertical"
|
|
36
|
+
}),
|
|
37
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
38
|
+
className: "flex h-5 items-center space-x-4 text-sm",
|
|
39
|
+
children: [
|
|
40
|
+
/*#__PURE__*/ _jsx("span", {
|
|
41
|
+
children: "Item 1"
|
|
42
|
+
}),
|
|
43
|
+
/*#__PURE__*/ _jsx(Separator, {
|
|
44
|
+
orientation: "vertical"
|
|
45
|
+
}),
|
|
46
|
+
/*#__PURE__*/ _jsx("span", {
|
|
47
|
+
children: "Item 2"
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ _jsx(Separator, {
|
|
50
|
+
orientation: "vertical"
|
|
51
|
+
}),
|
|
52
|
+
/*#__PURE__*/ _jsx("span", {
|
|
53
|
+
children: "Item 3"
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
})
|
|
57
|
+
]
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
//# sourceMappingURL=separator.gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/separator/separator.gallery.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { Separator } from './separator';\n\nexport function SeparatorGallery(): ReactElement {\n return (\n <div className=\"space-y-8\">\n <div>\n <h3 className=\"text-sm font-medium mb-4\">Horizontal</h3>\n <div className=\"w-75 space-y-4\">\n <p className=\"text-sm\">Content above</p>\n <Separator orientation=\"horizontal\" />\n <p className=\"text-sm\">Content below</p>\n </div>\n </div>\n <div>\n <h3 className=\"text-sm font-medium mb-4\">Vertical</h3>\n <div className=\"flex h-5 items-center space-x-4 text-sm\">\n <span>Item 1</span>\n <Separator orientation=\"vertical\" />\n <span>Item 2</span>\n <Separator orientation=\"vertical\" />\n <span>Item 3</span>\n </div>\n </div>\n </div>\n );\n}\n"],"names":["Separator","SeparatorGallery","div","className","h3","p","orientation","span"],"mappings":";AAEA,SAASA,SAAS,QAAQ,iBAAc;AAExC,OAAO,SAASC;IACd,qBACE,MAACC;QAAIC,WAAU;;0BACb,MAACD;;kCACC,KAACE;wBAAGD,WAAU;kCAA2B;;kCACzC,MAACD;wBAAIC,WAAU;;0CACb,KAACE;gCAAEF,WAAU;0CAAU;;0CACvB,KAACH;gCAAUM,aAAY;;0CACvB,KAACD;gCAAEF,WAAU;0CAAU;;;;;;0BAG3B,MAACD;;kCACC,KAACE;wBAAGD,WAAU;kCAA2B;;kCACzC,MAACD;wBAAIC,WAAU;;0CACb,KAACI;0CAAK;;0CACN,KAACP;gCAAUM,aAAY;;0CACvB,KAACC;0CAAK;;0CACN,KAACP;gCAAUM,aAAY;;0CACvB,KAACC;0CAAK;;;;;;;;AAKhB"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
});
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
3
|
+
import { cn } from "../../../../lib/utils.js";
|
|
4
|
+
function Separator({ className, orientation = 'horizontal', ...props }) {
|
|
5
|
+
return /*#__PURE__*/ _jsx(SeparatorPrimitive, {
|
|
6
|
+
"data-slot": "separator",
|
|
7
|
+
orientation: orientation,
|
|
8
|
+
className: cn('bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px', className),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
12
11
|
}
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
export { Separator };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=separator.js.map
|