@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,149 +1,186 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "../../../../lib/utils.js";
|
|
5
|
+
import { Badge } from "../badge/badge.js";
|
|
6
|
+
import { Button } from "../button/button.js";
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
8
|
+
const noop = (_show)=>{};
|
|
9
|
+
const BannerContext = /*#__PURE__*/ createContext({
|
|
10
|
+
show: true,
|
|
11
|
+
setShow: noop,
|
|
12
|
+
variant: 'default'
|
|
11
13
|
});
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
+
function isUpdater(next) {
|
|
15
|
+
return typeof next === 'function';
|
|
14
16
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
function useBannerVisibility({ visible, defaultVisible, onClose }) {
|
|
18
|
+
const [uncontrolledVisible, setUncontrolledVisible] = useState(defaultVisible);
|
|
19
|
+
const isControlled = visible !== undefined;
|
|
20
|
+
const currentValue = isControlled ? visible : uncontrolledVisible;
|
|
21
|
+
const onCloseRef = useRef(onClose);
|
|
22
|
+
useEffect(()=>{
|
|
23
|
+
onCloseRef.current = onClose;
|
|
24
|
+
}, [
|
|
25
|
+
onClose
|
|
26
|
+
]);
|
|
27
|
+
const setValue = useCallback((next)=>{
|
|
28
|
+
if (isControlled) {
|
|
29
|
+
const resolved = isUpdater(next) ? next(visible) : next;
|
|
30
|
+
if (!resolved) {
|
|
31
|
+
onCloseRef.current?.();
|
|
32
|
+
}
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
setUncontrolledVisible((prev)=>{
|
|
36
|
+
const resolved = isUpdater(next) ? next(prev) : next;
|
|
37
|
+
if (!resolved) {
|
|
38
|
+
onCloseRef.current?.();
|
|
39
|
+
}
|
|
40
|
+
return resolved;
|
|
41
|
+
});
|
|
42
|
+
}, [
|
|
43
|
+
isControlled,
|
|
44
|
+
visible
|
|
45
|
+
]);
|
|
46
|
+
return [
|
|
47
|
+
currentValue,
|
|
48
|
+
setValue
|
|
49
|
+
];
|
|
29
50
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}), _ = i(({ children: t, visible: n, defaultVisible: r = !0, onClose: i, className: a, inset: o = !1, variant: s = "default", ...l }, u) => {
|
|
48
|
-
let f = s ?? "default", [m, _] = h({
|
|
49
|
-
defaultVisible: r,
|
|
50
|
-
visible: n,
|
|
51
|
-
onClose: i
|
|
52
|
-
}), v = c(() => ({
|
|
53
|
-
show: m ?? !0,
|
|
54
|
-
setShow: _,
|
|
55
|
-
variant: f
|
|
56
|
-
}), [
|
|
57
|
-
m,
|
|
58
|
-
_,
|
|
59
|
-
f
|
|
60
|
-
]);
|
|
61
|
-
return m ? /* @__PURE__ */ d(p.Provider, {
|
|
62
|
-
value: v,
|
|
63
|
-
children: /* @__PURE__ */ d("div", {
|
|
64
|
-
ref: u,
|
|
65
|
-
"data-slot": "banner",
|
|
66
|
-
className: e(g({
|
|
67
|
-
variant: f,
|
|
68
|
-
inset: o
|
|
69
|
-
}), a),
|
|
70
|
-
...l,
|
|
71
|
-
children: /* @__PURE__ */ d("div", {
|
|
72
|
-
"data-slot": "banner-content",
|
|
73
|
-
className: "flex h-7 w-full items-center self-stretch gap-2",
|
|
74
|
-
children: t
|
|
75
|
-
})
|
|
76
|
-
})
|
|
77
|
-
}) : null;
|
|
51
|
+
const bannerVariants = cva('flex w-full h-11 flex-col items-start justify-center px-3 py-0', {
|
|
52
|
+
variants: {
|
|
53
|
+
variant: {
|
|
54
|
+
default: 'bg-neutral-background text-foreground-fixed-dark',
|
|
55
|
+
info: 'bg-info-background text-foreground-fixed-dark',
|
|
56
|
+
warning: 'bg-warning-background text-foreground-fixed-dark',
|
|
57
|
+
destructive: 'bg-destructive-background text-foreground-fixed-dark'
|
|
58
|
+
},
|
|
59
|
+
inset: {
|
|
60
|
+
true: 'rounded-lg',
|
|
61
|
+
false: ''
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
defaultVariants: {
|
|
65
|
+
variant: 'default',
|
|
66
|
+
inset: false
|
|
67
|
+
}
|
|
78
68
|
});
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
69
|
+
const Banner = /*#__PURE__*/ forwardRef(({ children, visible, defaultVisible = true, onClose, className, inset = false, variant = 'default', ...props }, ref)=>{
|
|
70
|
+
const resolvedVariant = variant ?? 'default';
|
|
71
|
+
const [show, setShow] = useBannerVisibility({
|
|
72
|
+
defaultVisible,
|
|
73
|
+
visible,
|
|
74
|
+
onClose
|
|
75
|
+
});
|
|
76
|
+
const contextValue = useMemo(()=>({
|
|
77
|
+
show: show ?? true,
|
|
78
|
+
setShow,
|
|
79
|
+
variant: resolvedVariant
|
|
80
|
+
}), [
|
|
81
|
+
show,
|
|
82
|
+
setShow,
|
|
83
|
+
resolvedVariant
|
|
84
|
+
]);
|
|
85
|
+
if (!show) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
return /*#__PURE__*/ _jsx(BannerContext.Provider, {
|
|
89
|
+
value: contextValue,
|
|
90
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
91
|
+
ref: ref,
|
|
92
|
+
"data-slot": "banner",
|
|
93
|
+
className: cn(bannerVariants({
|
|
94
|
+
variant: resolvedVariant,
|
|
95
|
+
inset
|
|
96
|
+
}), className),
|
|
97
|
+
...props,
|
|
98
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
99
|
+
"data-slot": "banner-content",
|
|
100
|
+
className: "flex h-7 w-full items-center self-stretch gap-2",
|
|
101
|
+
children: children
|
|
102
|
+
})
|
|
103
|
+
})
|
|
104
|
+
});
|
|
94
105
|
});
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
warning: "warning"
|
|
114
|
-
}[c],
|
|
115
|
-
className: e("shrink-0", i),
|
|
116
|
-
...a
|
|
117
|
-
});
|
|
106
|
+
Banner.displayName = 'Banner';
|
|
107
|
+
const ICON_COLOR_CLASSES = {
|
|
108
|
+
default: 'text-neutral-foreground-on-neutral',
|
|
109
|
+
info: 'text-info-foreground-on-info',
|
|
110
|
+
warning: 'text-warning-foreground-on-warning',
|
|
111
|
+
destructive: 'text-destructive-foreground-on-critical'
|
|
112
|
+
};
|
|
113
|
+
const BannerIcon = /*#__PURE__*/ forwardRef(({ icon: Icon, className, ...props }, ref)=>{
|
|
114
|
+
const { variant } = useContext(BannerContext);
|
|
115
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
116
|
+
ref: ref,
|
|
117
|
+
"data-slot": "banner-icon",
|
|
118
|
+
className: cn('flex h-4 w-4 shrink-0 items-center justify-center', ICON_COLOR_CLASSES[variant], className),
|
|
119
|
+
...props,
|
|
120
|
+
children: /*#__PURE__*/ _jsx(Icon, {
|
|
121
|
+
size: 16
|
|
122
|
+
})
|
|
123
|
+
});
|
|
118
124
|
});
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}));
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
...t
|
|
145
|
-
});
|
|
125
|
+
BannerIcon.displayName = 'BannerIcon';
|
|
126
|
+
const BannerTitle = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx("p", {
|
|
127
|
+
ref: ref,
|
|
128
|
+
"data-slot": "banner-title",
|
|
129
|
+
className: cn('flex min-w-0 flex-1 items-center text-base font-medium leading-5 tracking-tighter text-foreground-fixed-dark', className),
|
|
130
|
+
...props
|
|
131
|
+
}));
|
|
132
|
+
BannerTitle.displayName = 'BannerTitle';
|
|
133
|
+
const BannerStatus = /*#__PURE__*/ forwardRef(({ outline = true, variant, className, ...props }, ref)=>{
|
|
134
|
+
const { variant: bannerVariant } = useContext(BannerContext);
|
|
135
|
+
const variantMap = {
|
|
136
|
+
default: 'secondary',
|
|
137
|
+
info: 'inProgress',
|
|
138
|
+
destructive: 'error',
|
|
139
|
+
warning: 'warning'
|
|
140
|
+
};
|
|
141
|
+
const badgeVariant = variant ?? variantMap[bannerVariant];
|
|
142
|
+
return /*#__PURE__*/ _jsx(Badge, {
|
|
143
|
+
ref: ref,
|
|
144
|
+
"data-slot": "banner-status",
|
|
145
|
+
outline: outline,
|
|
146
|
+
variant: badgeVariant,
|
|
147
|
+
className: cn('shrink-0', className),
|
|
148
|
+
...props
|
|
149
|
+
});
|
|
146
150
|
});
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
151
|
+
BannerStatus.displayName = 'BannerStatus';
|
|
152
|
+
const BannerActions = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx("div", {
|
|
153
|
+
ref: ref,
|
|
154
|
+
"data-slot": "banner-actions",
|
|
155
|
+
className: cn('ml-auto flex h-7 shrink-0 items-center gap-2', className),
|
|
156
|
+
...props
|
|
157
|
+
}));
|
|
158
|
+
BannerActions.displayName = 'BannerActions';
|
|
159
|
+
const BannerAction = /*#__PURE__*/ forwardRef(({ variant = 'ghost', size = 'sm', className, ...props }, ref)=>{
|
|
160
|
+
return /*#__PURE__*/ _jsx(Button, {
|
|
161
|
+
ref: ref,
|
|
162
|
+
"data-slot": "banner-action",
|
|
163
|
+
className: cn('h-7 min-w-16 shrink-0 rounded px-2 text-sm font-medium leading-4.5 text-medium-foreground hover:bg-transparent dark:hover:bg-transparent hover:text-medium-foreground disabled:bg-transparent dark:disabled:bg-transparent disabled:text-base-foreground-disabled', className),
|
|
164
|
+
size: size,
|
|
165
|
+
variant: variant,
|
|
166
|
+
...props
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
BannerAction.displayName = 'BannerAction';
|
|
170
|
+
const BannerClose = /*#__PURE__*/ forwardRef(({ onClick, ...props }, ref)=>{
|
|
171
|
+
const { setShow } = useContext(BannerContext);
|
|
172
|
+
const handleClick = (e)=>{
|
|
173
|
+
setShow(false);
|
|
174
|
+
onClick?.(e);
|
|
175
|
+
};
|
|
176
|
+
return /*#__PURE__*/ _jsx(BannerAction, {
|
|
177
|
+
ref: ref,
|
|
178
|
+
"data-slot": "banner-close",
|
|
179
|
+
onClick: handleClick,
|
|
180
|
+
...props
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
BannerClose.displayName = 'BannerClose';
|
|
184
|
+
export { Banner, BannerIcon, BannerTitle, BannerStatus, BannerActions, BannerAction, BannerClose };
|
|
185
|
+
|
|
186
|
+
//# sourceMappingURL=banner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/banner/banner.tsx"],"sourcesContent":["import {\n type ForwardRefExoticComponent,\n type RefAttributes,\n type ComponentProps,\n type ComponentRef,\n type ComponentType,\n type HTMLAttributes,\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport type { IconProps } from '@tabler/icons-react';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport type { ClassProp } from 'class-variance-authority/types';\n\nimport { cn } from '../../../../lib/utils';\nimport { Badge } from '../badge/badge';\nimport { Button } from '../button/button';\n\ntype BannerVariant = 'default' | 'info' | 'destructive' | 'warning';\ntype SetStateAction<T> = T | ((prev: T) => T);\n\ntype BannerContextProps = {\n show: boolean;\n setShow: (show: boolean) => void;\n variant: BannerVariant;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = (_show: boolean) => {};\n\nconst BannerContext = createContext<BannerContextProps>({\n show: true,\n setShow: noop,\n variant: 'default',\n});\n\nfunction isUpdater<T>(next: SetStateAction<T>): next is (prev: T) => T {\n return typeof next === 'function';\n}\n\nfunction useBannerVisibility({\n visible,\n defaultVisible,\n onClose,\n}: {\n visible?: boolean;\n defaultVisible: boolean;\n onClose?: () => void;\n}): readonly [boolean, (next: SetStateAction<boolean>) => void] {\n const [uncontrolledVisible, setUncontrolledVisible] =\n useState(defaultVisible);\n const isControlled = visible !== undefined;\n const currentValue = isControlled ? visible : uncontrolledVisible;\n\n const onCloseRef = useRef(onClose);\n useEffect(() => {\n onCloseRef.current = onClose;\n }, [onClose]);\n\n const setValue = useCallback(\n (next: SetStateAction<boolean>) => {\n if (isControlled) {\n const resolved = isUpdater(next) ? next(visible) : next;\n\n if (!resolved) {\n onCloseRef.current?.();\n }\n\n return;\n }\n\n setUncontrolledVisible((prev) => {\n const resolved = isUpdater(next) ? next(prev) : next;\n\n if (!resolved) {\n onCloseRef.current?.();\n }\n\n return resolved;\n });\n },\n [isControlled, visible]\n );\n\n return [currentValue, setValue];\n}\n\ninterface BannerVariantProps {\n variant?: 'default' | 'info' | 'destructive' | 'warning' | null;\n inset?: boolean | null;\n}\n\nconst bannerVariants: (\n props?: (BannerVariantProps & ClassProp) | undefined\n) => string = cva(\n 'flex w-full h-11 flex-col items-start justify-center px-3 py-0',\n {\n variants: {\n variant: {\n default: 'bg-neutral-background text-foreground-fixed-dark',\n info: 'bg-info-background text-foreground-fixed-dark',\n warning: 'bg-warning-background text-foreground-fixed-dark',\n destructive: 'bg-destructive-background text-foreground-fixed-dark',\n },\n inset: {\n true: 'rounded-lg',\n false: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n inset: false,\n },\n }\n);\n\ntype BannerProps = HTMLAttributes<HTMLDivElement> &\n VariantProps<typeof bannerVariants> & {\n visible?: boolean;\n defaultVisible?: boolean;\n onClose?: () => void;\n };\n\nconst Banner: ForwardRefExoticComponent<\n Omit<BannerProps, 'ref'> & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, BannerProps>(\n (\n {\n children,\n visible,\n defaultVisible = true,\n onClose,\n className,\n inset = false,\n variant = 'default',\n ...props\n },\n ref\n ) => {\n const resolvedVariant: BannerVariant = variant ?? 'default';\n const [show, setShow] = useBannerVisibility({\n defaultVisible,\n visible,\n onClose,\n });\n\n const contextValue = useMemo(\n () => ({ show: show ?? true, setShow, variant: resolvedVariant }),\n [show, setShow, resolvedVariant]\n );\n\n if (!show) {\n return null;\n }\n\n return (\n <BannerContext.Provider value={contextValue}>\n <div\n ref={ref}\n data-slot=\"banner\"\n className={cn(\n bannerVariants({ variant: resolvedVariant, inset }),\n className\n )}\n {...props}\n >\n <div\n data-slot=\"banner-content\"\n className=\"flex h-7 w-full items-center self-stretch gap-2\"\n >\n {children}\n </div>\n </div>\n </BannerContext.Provider>\n );\n }\n);\nBanner.displayName = 'Banner';\n\ntype TablerIconComponent = ComponentType<IconProps>;\n\ntype BannerIconProps = HTMLAttributes<HTMLDivElement> & {\n icon: TablerIconComponent;\n};\n\nconst ICON_COLOR_CLASSES: Record<BannerVariant, string> = {\n default: 'text-neutral-foreground-on-neutral',\n info: 'text-info-foreground-on-info',\n warning: 'text-warning-foreground-on-warning',\n destructive: 'text-destructive-foreground-on-critical',\n};\n\nconst BannerIcon: ForwardRefExoticComponent<\n HTMLAttributes<HTMLDivElement> & {\n icon: TablerIconComponent;\n } & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, BannerIconProps>(\n ({ icon: Icon, className, ...props }, ref) => {\n const { variant } = useContext(BannerContext);\n\n return (\n <div\n ref={ref}\n data-slot=\"banner-icon\"\n className={cn(\n 'flex h-4 w-4 shrink-0 items-center justify-center',\n ICON_COLOR_CLASSES[variant],\n className\n )}\n {...props}\n >\n <Icon size={16} />\n </div>\n );\n }\n);\nBannerIcon.displayName = 'BannerIcon';\n\ntype BannerTitleProps = HTMLAttributes<HTMLParagraphElement>;\n\nconst BannerTitle: ForwardRefExoticComponent<\n BannerTitleProps & RefAttributes<HTMLParagraphElement>\n> = forwardRef<ComponentRef<'p'>, BannerTitleProps>(\n ({ className, ...props }, ref) => (\n <p\n ref={ref}\n data-slot=\"banner-title\"\n className={cn(\n 'flex min-w-0 flex-1 items-center text-base font-medium leading-5 tracking-tighter text-foreground-fixed-dark',\n className\n )}\n {...props}\n />\n )\n);\nBannerTitle.displayName = 'BannerTitle';\n\ntype BannerStatusProps = ComponentProps<typeof Badge>;\n\nconst BannerStatus: ForwardRefExoticComponent<\n Omit<ComponentProps<typeof Badge>, 'ref'> & RefAttributes<HTMLSpanElement>\n> = forwardRef<ComponentRef<typeof Badge>, BannerStatusProps>(\n ({ outline = true, variant, className, ...props }, ref) => {\n const { variant: bannerVariant } = useContext(BannerContext);\n\n const variantMap: Record<\n BannerVariant,\n 'secondary' | 'warning' | 'error' | 'inProgress'\n > = {\n default: 'secondary',\n info: 'inProgress',\n destructive: 'error',\n warning: 'warning',\n };\n\n const badgeVariant = variant ?? variantMap[bannerVariant];\n\n return (\n <Badge\n ref={ref}\n data-slot=\"banner-status\"\n outline={outline}\n variant={badgeVariant}\n className={cn('shrink-0', className)}\n {...props}\n />\n );\n }\n);\nBannerStatus.displayName = 'BannerStatus';\n\ntype BannerActionsProps = HTMLAttributes<HTMLDivElement>;\n\nconst BannerActions: ForwardRefExoticComponent<\n BannerActionsProps & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, BannerActionsProps>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"banner-actions\"\n className={cn('ml-auto flex h-7 shrink-0 items-center gap-2', className)}\n {...props}\n />\n )\n);\nBannerActions.displayName = 'BannerActions';\n\ntype BannerActionProps = ComponentProps<typeof Button>;\n\nconst BannerAction: ForwardRefExoticComponent<\n Omit<ComponentProps<typeof Button>, 'ref'> & RefAttributes<HTMLElement>\n> = forwardRef<ComponentRef<typeof Button>, BannerActionProps>(\n ({ variant = 'ghost', size = 'sm', className, ...props }, ref) => {\n return (\n <Button\n ref={ref}\n data-slot=\"banner-action\"\n className={cn(\n 'h-7 min-w-16 shrink-0 rounded px-2 text-sm font-medium leading-4.5 text-medium-foreground hover:bg-transparent dark:hover:bg-transparent hover:text-medium-foreground disabled:bg-transparent dark:disabled:bg-transparent disabled:text-base-foreground-disabled',\n className\n )}\n size={size}\n variant={variant}\n {...props}\n />\n );\n }\n);\nBannerAction.displayName = 'BannerAction';\n\ntype BannerCloseProps = Omit<ComponentProps<typeof Button>, 'size'>;\n\nconst BannerClose: ForwardRefExoticComponent<\n Omit<BannerCloseProps, 'ref'> & RefAttributes<HTMLElement>\n> = forwardRef<ComponentRef<typeof Button>, BannerCloseProps>(\n ({ onClick, ...props }, ref) => {\n const { setShow } = useContext(BannerContext);\n\n type ButtonClickHandler = NonNullable<\n ComponentProps<typeof Button>['onClick']\n >;\n const handleClick = (e: Parameters<ButtonClickHandler>[0]) => {\n setShow(false);\n onClick?.(e);\n };\n\n return (\n <BannerAction\n ref={ref}\n data-slot=\"banner-close\"\n onClick={handleClick}\n {...props}\n />\n );\n }\n);\nBannerClose.displayName = 'BannerClose';\n\nexport {\n Banner,\n BannerIcon,\n BannerTitle,\n BannerStatus,\n BannerActions,\n BannerAction,\n BannerClose,\n};\n"],"names":["createContext","forwardRef","useCallback","useContext","useEffect","useMemo","useRef","useState","cva","cn","Badge","Button","noop","_show","BannerContext","show","setShow","variant","isUpdater","next","useBannerVisibility","visible","defaultVisible","onClose","uncontrolledVisible","setUncontrolledVisible","isControlled","undefined","currentValue","onCloseRef","current","setValue","resolved","prev","bannerVariants","variants","default","info","warning","destructive","inset","true","false","defaultVariants","Banner","children","className","props","ref","resolvedVariant","contextValue","Provider","value","div","data-slot","displayName","ICON_COLOR_CLASSES","BannerIcon","icon","Icon","size","BannerTitle","p","BannerStatus","outline","bannerVariant","variantMap","badgeVariant","BannerActions","BannerAction","BannerClose","onClick","handleClick","e"],"mappings":"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"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, RefAttributes, ComponentProps } from
|
|
2
|
-
import { useRender } from
|
|
3
|
-
declare const Breadcrumb: ForwardRefExoticComponent<ComponentProps<
|
|
4
|
-
declare const BreadcrumbList: ForwardRefExoticComponent<ComponentProps<
|
|
5
|
-
declare const BreadcrumbItem: ForwardRefExoticComponent<ComponentProps<
|
|
6
|
-
declare const BreadcrumbLink: ForwardRefExoticComponent<Omit<useRender.ComponentProps<
|
|
7
|
-
declare const BreadcrumbPage: ForwardRefExoticComponent<ComponentProps<
|
|
8
|
-
declare const BreadcrumbPageButton: ForwardRefExoticComponent<ComponentProps<
|
|
9
|
-
declare const BreadcrumbEllipsisButton: ForwardRefExoticComponent<ComponentProps<
|
|
10
|
-
declare const BreadcrumbSeparator: ForwardRefExoticComponent<ComponentProps<
|
|
11
|
-
declare const BreadcrumbEllipsis: ForwardRefExoticComponent<ComponentProps<
|
|
12
|
-
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbPageButton, BreadcrumbEllipsisButton, BreadcrumbSeparator, BreadcrumbEllipsis
|
|
1
|
+
import { type ForwardRefExoticComponent, type RefAttributes, type ComponentProps } from "react";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
declare const Breadcrumb: ForwardRefExoticComponent<ComponentProps<"nav"> & RefAttributes<HTMLElement>>;
|
|
4
|
+
declare const BreadcrumbList: ForwardRefExoticComponent<ComponentProps<"ol"> & RefAttributes<HTMLOListElement>>;
|
|
5
|
+
declare const BreadcrumbItem: ForwardRefExoticComponent<ComponentProps<"li"> & RefAttributes<HTMLLIElement>>;
|
|
6
|
+
declare const BreadcrumbLink: ForwardRefExoticComponent<Omit<useRender.ComponentProps<"a">, "ref"> & RefAttributes<HTMLAnchorElement>>;
|
|
7
|
+
declare const BreadcrumbPage: ForwardRefExoticComponent<ComponentProps<"span"> & RefAttributes<HTMLSpanElement>>;
|
|
8
|
+
declare const BreadcrumbPageButton: ForwardRefExoticComponent<ComponentProps<"button"> & RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const BreadcrumbEllipsisButton: ForwardRefExoticComponent<ComponentProps<"button"> & RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
declare const BreadcrumbSeparator: ForwardRefExoticComponent<ComponentProps<"li"> & RefAttributes<HTMLLIElement>>;
|
|
11
|
+
declare const BreadcrumbEllipsis: ForwardRefExoticComponent<ComponentProps<"li"> & RefAttributes<HTMLLIElement>>;
|
|
12
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbPageButton, BreadcrumbEllipsisButton, BreadcrumbSeparator, BreadcrumbEllipsis };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./breadcrumb.js";
|
|
3
|
+
export function BreadcrumbGallery() {
|
|
4
|
+
return /*#__PURE__*/ _jsx(Breadcrumb, {
|
|
5
|
+
children: /*#__PURE__*/ _jsxs(BreadcrumbList, {
|
|
6
|
+
children: [
|
|
7
|
+
/*#__PURE__*/ _jsx(BreadcrumbItem, {
|
|
8
|
+
children: /*#__PURE__*/ _jsx(BreadcrumbLink, {
|
|
9
|
+
href: "/",
|
|
10
|
+
children: "Home"
|
|
11
|
+
})
|
|
12
|
+
}),
|
|
13
|
+
/*#__PURE__*/ _jsx(BreadcrumbSeparator, {}),
|
|
14
|
+
/*#__PURE__*/ _jsx(BreadcrumbItem, {
|
|
15
|
+
children: /*#__PURE__*/ _jsx(BreadcrumbLink, {
|
|
16
|
+
href: "/projects",
|
|
17
|
+
children: "Projects"
|
|
18
|
+
})
|
|
19
|
+
}),
|
|
20
|
+
/*#__PURE__*/ _jsx(BreadcrumbSeparator, {}),
|
|
21
|
+
/*#__PURE__*/ _jsx(BreadcrumbItem, {
|
|
22
|
+
children: /*#__PURE__*/ _jsx(BreadcrumbPage, {
|
|
23
|
+
children: "Project Alpha"
|
|
24
|
+
})
|
|
25
|
+
})
|
|
26
|
+
]
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=breadcrumb.gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/breadcrumb/breadcrumb.gallery.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport {\n Breadcrumb,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbList,\n BreadcrumbPage,\n BreadcrumbSeparator,\n} from './breadcrumb';\n\nexport function BreadcrumbGallery(): ReactElement {\n return (\n <Breadcrumb>\n <BreadcrumbList>\n <BreadcrumbItem>\n <BreadcrumbLink href=\"/\">Home</BreadcrumbLink>\n </BreadcrumbItem>\n <BreadcrumbSeparator />\n <BreadcrumbItem>\n <BreadcrumbLink href=\"/projects\">Projects</BreadcrumbLink>\n </BreadcrumbItem>\n <BreadcrumbSeparator />\n <BreadcrumbItem>\n <BreadcrumbPage>Project Alpha</BreadcrumbPage>\n </BreadcrumbItem>\n </BreadcrumbList>\n </Breadcrumb>\n );\n}\n"],"names":["Breadcrumb","BreadcrumbItem","BreadcrumbLink","BreadcrumbList","BreadcrumbPage","BreadcrumbSeparator","BreadcrumbGallery","href"],"mappings":";AAEA,SACEA,UAAU,EACVC,cAAc,EACdC,cAAc,EACdC,cAAc,EACdC,cAAc,EACdC,mBAAmB,QACd,kBAAe;AAEtB,OAAO,SAASC;IACd,qBACE,KAACN;kBACC,cAAA,MAACG;;8BACC,KAACF;8BACC,cAAA,KAACC;wBAAeK,MAAK;kCAAI;;;8BAE3B,KAACF;8BACD,KAACJ;8BACC,cAAA,KAACC;wBAAeK,MAAK;kCAAY;;;8BAEnC,KAACF;8BACD,KAACJ;8BACC,cAAA,KAACG;kCAAe;;;;;;AAK1B"}
|