@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
package/dist/styles.source.css
CHANGED
|
@@ -9,12 +9,38 @@
|
|
|
9
9
|
@source 'streamdown/dist';
|
|
10
10
|
@source '@streamdown/mermaid/dist';
|
|
11
11
|
@import 'streamdown/styles.css';
|
|
12
|
+
@import 'katex/dist/katex.min.css';
|
|
13
|
+
|
|
14
|
+
/*
|
|
15
|
+
* Assistant chat math: show full equation height; only scroll horizontally when wider
|
|
16
|
+
* than the bubble. overflow-x on inner .katex creates a spurious vertical scrollport.
|
|
17
|
+
*/
|
|
18
|
+
[data-slot='message-response'] .katex-display {
|
|
19
|
+
max-width: 100%;
|
|
20
|
+
overflow-x: auto;
|
|
21
|
+
overflow-y: hidden;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[data-slot='message-response'] .katex-display > .katex {
|
|
25
|
+
overflow: visible;
|
|
26
|
+
max-width: none;
|
|
27
|
+
}
|
|
12
28
|
|
|
13
|
-
|
|
29
|
+
/*
|
|
30
|
+
* Streamdown's Mermaid fullscreen overlay uses `bg-background/95`, which is not generated
|
|
31
|
+
* in Aura's stylesheet, so the overlay would otherwise be see-through.
|
|
32
|
+
*/
|
|
33
|
+
@layer components {
|
|
34
|
+
[data-streamdown='mermaid-fullscreen'] {
|
|
35
|
+
background-color: color-mix(
|
|
36
|
+
in oklab,
|
|
37
|
+
var(--base-background) 95%,
|
|
38
|
+
transparent
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
14
42
|
|
|
15
|
-
|
|
16
|
-
@variant dark (@media (prefers-color-scheme: dark));
|
|
17
|
-
@variant dark (.dark &);
|
|
43
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
18
44
|
|
|
19
45
|
@theme inline {
|
|
20
46
|
/* Container query breakpoint overrides for layout system */
|
|
@@ -78,10 +104,11 @@
|
|
|
78
104
|
0 20px 25px -5px var(--effect-shadow-xl),
|
|
79
105
|
0 10px 10px -5px var(--effect-shadow-lg);
|
|
80
106
|
/* modals; dialogs with backdrop overlay */
|
|
81
|
-
--shadow-focus-ring:
|
|
107
|
+
--shadow-focus-ring:
|
|
108
|
+
0 0 0 1px var(--ring-default), 0 0 0 3px var(--ring-muted);
|
|
82
109
|
/* default focus ring: inner border (1px dark) + outer glow (3px light, 2px visible beyond inner) */
|
|
83
110
|
--shadow-focus-ring-destructive:
|
|
84
|
-
0 0 0 1px var(--ring-
|
|
111
|
+
0 0 0 1px var(--ring-critical), 0 0 0 3px var(--ring-critical-muted);
|
|
85
112
|
--shadow-pinned-column:
|
|
86
113
|
4px 0 8px 0 var(--effect-shadow-md), 3px 0 2px 0 var(--effect-shadow-md);
|
|
87
114
|
/* horizontal edge shadow for the last pinned column in data grids */
|
|
@@ -169,10 +196,19 @@
|
|
|
169
196
|
);
|
|
170
197
|
--gradient-fall: linear-gradient(
|
|
171
198
|
-100deg,
|
|
172
|
-
var(--fjord-
|
|
173
|
-
var(--dusk-
|
|
199
|
+
var(--fjord-500) 0%,
|
|
200
|
+
var(--dusk-500) 50%,
|
|
174
201
|
var(--dusk-300) 100%
|
|
175
202
|
);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/*
|
|
206
|
+
* Re-declared on .dark so var(--color-muted-foreground) in the gradient resolves on the subtree theme root.
|
|
207
|
+
* Without this, PAIA-style `.dark` wrappers keep the light shimmer base from `:root` only.
|
|
208
|
+
*/
|
|
209
|
+
:root,
|
|
210
|
+
.dark {
|
|
211
|
+
/* Not from Figma Reflect sync — used by Shimmer variant="active". */
|
|
176
212
|
--gradient-active: linear-gradient(
|
|
177
213
|
90deg,
|
|
178
214
|
var(--color-muted-foreground) 0%,
|
|
@@ -241,17 +277,11 @@
|
|
|
241
277
|
|
|
242
278
|
@layer base {
|
|
243
279
|
* {
|
|
244
|
-
@apply border-
|
|
280
|
+
@apply border-default outline-ring-default/50;
|
|
245
281
|
}
|
|
246
282
|
|
|
247
283
|
body {
|
|
248
|
-
@apply bg-background text-foreground;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
:where(svg.tabler-icon) {
|
|
252
|
-
width: 1rem;
|
|
253
|
-
height: 1rem;
|
|
254
|
-
stroke-width: 1.5;
|
|
284
|
+
@apply bg-base-background text-base-foreground;
|
|
255
285
|
}
|
|
256
286
|
}
|
|
257
287
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function isMutableRef(ref) {
|
|
2
|
+
return typeof ref === 'object' && ref !== null && 'current' in ref;
|
|
3
|
+
}
|
|
4
|
+
function assignRef(ref, value) {
|
|
5
|
+
if (typeof ref === 'function') {
|
|
6
|
+
ref(value);
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
if (isMutableRef(ref)) ref.current = value;
|
|
10
|
+
}
|
|
11
|
+
export { assignRef };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=assign-ref.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/assign-ref.ts"],"sourcesContent":["import type { MutableRefObject, Ref } from 'react';\n\nfunction isMutableRef<T>(ref: Ref<T>): ref is MutableRefObject<T | null> {\n return typeof ref === 'object' && ref !== null && 'current' in ref;\n}\n\nfunction assignRef<T>(ref: Ref<T>, value: T | null): void {\n if (typeof ref === 'function') {\n ref(value);\n return;\n }\n if (isMutableRef(ref)) ref.current = value;\n}\n\nexport { assignRef };\n"],"names":["isMutableRef","ref","assignRef","value","current"],"mappings":"AAEA,SAASA,aAAgBC,GAAW;IAClC,OAAO,OAAOA,QAAQ,YAAYA,QAAQ,QAAQ,aAAaA;AACjE;AAEA,SAASC,UAAaD,GAAW,EAAEE,KAAe;IAChD,IAAI,OAAOF,QAAQ,YAAY;QAC7BA,IAAIE;QACJ;IACF;IACA,IAAIH,aAAaC,MAAMA,IAAIG,OAAO,GAAGD;AACvC;AAEA,SAASD,SAAS,GAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognite/aura",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"license": "MIT",
|
|
4
5
|
"type": "module",
|
|
5
6
|
"sideEffects": [
|
|
6
7
|
"**/*.scss",
|
|
@@ -75,6 +76,10 @@
|
|
|
75
76
|
"import": "./dist/components/ui/core/command/command.js",
|
|
76
77
|
"types": "./dist/components/ui/core/command/command.d.ts"
|
|
77
78
|
},
|
|
79
|
+
"./components/conversation": {
|
|
80
|
+
"import": "./dist/components/ui/core/conversation/conversation.js",
|
|
81
|
+
"types": "./dist/components/ui/core/conversation/conversation.d.ts"
|
|
82
|
+
},
|
|
78
83
|
"./components/count": {
|
|
79
84
|
"import": "./dist/components/ui/core/count/count.js",
|
|
80
85
|
"types": "./dist/components/ui/core/count/count.d.ts"
|
|
@@ -115,6 +120,14 @@
|
|
|
115
120
|
"import": "./dist/components/ui/core/input-group/input-group.js",
|
|
116
121
|
"types": "./dist/components/ui/core/input-group/input-group.d.ts"
|
|
117
122
|
},
|
|
123
|
+
"./components/item": {
|
|
124
|
+
"import": "./dist/components/ui/core/item/item.js",
|
|
125
|
+
"types": "./dist/components/ui/core/item/item.d.ts"
|
|
126
|
+
},
|
|
127
|
+
"./components/tree": {
|
|
128
|
+
"import": "./dist/components/ui/core/tree/tree.js",
|
|
129
|
+
"types": "./dist/components/ui/core/tree/tree.d.ts"
|
|
130
|
+
},
|
|
118
131
|
"./components/kbd": {
|
|
119
132
|
"import": "./dist/components/ui/core/kbd/kbd.js",
|
|
120
133
|
"types": "./dist/components/ui/core/kbd/kbd.d.ts"
|
|
@@ -215,6 +228,10 @@
|
|
|
215
228
|
"import": "./dist/components/ui/core/tool/tool.js",
|
|
216
229
|
"types": "./dist/components/ui/core/tool/tool.d.ts"
|
|
217
230
|
},
|
|
231
|
+
"./components/toolbar": {
|
|
232
|
+
"import": "./dist/components/ui/core/toolbar/toolbar.js",
|
|
233
|
+
"types": "./dist/components/ui/core/toolbar/toolbar.d.ts"
|
|
234
|
+
},
|
|
218
235
|
"./components/tooltip": {
|
|
219
236
|
"import": "./dist/components/ui/core/tooltip/tooltip.js",
|
|
220
237
|
"types": "./dist/components/ui/core/tooltip/tooltip.d.ts"
|
|
@@ -227,6 +244,10 @@
|
|
|
227
244
|
"import": "./dist/components/ui/core/chart/index.js",
|
|
228
245
|
"types": "./dist/components/ui/core/chart/index.d.ts"
|
|
229
246
|
},
|
|
247
|
+
"./data-grid": {
|
|
248
|
+
"import": "./dist/components/ui/core/data-grid/index.js",
|
|
249
|
+
"types": "./dist/components/ui/core/data-grid/index.d.ts"
|
|
250
|
+
},
|
|
230
251
|
"./highlight-code": {
|
|
231
252
|
"import": "./dist/lib/highlight-code.js",
|
|
232
253
|
"types": "./dist/lib/highlight-code.d.ts"
|
|
@@ -252,14 +273,27 @@
|
|
|
252
273
|
"./colors.css": {
|
|
253
274
|
"default": "./dist/colors.css"
|
|
254
275
|
},
|
|
255
|
-
"./
|
|
276
|
+
"./colors-deprecated.css": {
|
|
277
|
+
"default": "./dist/colors-deprecated.css"
|
|
278
|
+
},
|
|
279
|
+
"./DESIGN.md": "./DESIGN.md",
|
|
280
|
+
"./docs/*": "./src/components/ui/core/*/*.md",
|
|
281
|
+
"./examples/*": {
|
|
282
|
+
"import": "./dist/components/ui/core/*/*.gallery.js",
|
|
283
|
+
"types": "./dist/components/ui/core/*/*.gallery.d.ts"
|
|
284
|
+
}
|
|
256
285
|
},
|
|
257
286
|
"files": [
|
|
258
287
|
"dist",
|
|
259
|
-
"
|
|
288
|
+
"CHANGELOG.md",
|
|
289
|
+
"DESIGN.md",
|
|
290
|
+
"src/components/**/*.md"
|
|
260
291
|
],
|
|
261
292
|
"dependencies": {
|
|
262
293
|
"@base-ui/react": "^1.6.0",
|
|
294
|
+
"@headless-tree/core": "^1.7.0",
|
|
295
|
+
"@headless-tree/react": "^1.7.0",
|
|
296
|
+
"@streamdown/math": "^1.0.2",
|
|
263
297
|
"@streamdown/mermaid": "^1.0.2",
|
|
264
298
|
"@tabler/icons-react": "^3.35.0",
|
|
265
299
|
"class-variance-authority": "^0.7.1",
|
|
@@ -267,18 +301,18 @@
|
|
|
267
301
|
"cmdk": "^1.1.1",
|
|
268
302
|
"dayjs": "^1.11.13",
|
|
269
303
|
"framer-motion": "^11.0.3",
|
|
304
|
+
"katex": "0.18.2",
|
|
270
305
|
"shiki": "^3.19.0",
|
|
271
306
|
"sonner": "^2.0.7",
|
|
272
|
-
"streamdown": "^2.
|
|
307
|
+
"streamdown": "^2.7.0",
|
|
273
308
|
"tailwind-merge": "^3.4.0",
|
|
274
|
-
"tw-animate-css": "^1.4.0"
|
|
309
|
+
"tw-animate-css": "^1.4.0",
|
|
310
|
+
"use-stick-to-bottom": "^1.1.1"
|
|
275
311
|
},
|
|
276
312
|
"devDependencies": {
|
|
277
313
|
"@chromatic-com/storybook": "^5.1.2",
|
|
278
|
-
"@nx/vite": "22.6.1",
|
|
279
|
-
"@storybook/addon-coverage": "^3.0.1",
|
|
280
314
|
"@storybook/addon-docs": "10.3.5",
|
|
281
|
-
"@storybook/addon-vitest": "10.
|
|
315
|
+
"@storybook/addon-vitest": "10.6.2",
|
|
282
316
|
"@storybook/react-vite": "10.3.5",
|
|
283
317
|
"@swc-node/register": "1.11.1",
|
|
284
318
|
"@tailwindcss/vite": "^4.3.1",
|
|
@@ -297,22 +331,22 @@
|
|
|
297
331
|
"react": "^18.3.1",
|
|
298
332
|
"react-dom": "^18.3.1",
|
|
299
333
|
"recharts": "^3.7.0",
|
|
300
|
-
"
|
|
301
|
-
"storybook": "10.
|
|
334
|
+
"rolldown": "^1.1.4",
|
|
335
|
+
"storybook": "10.6.2",
|
|
302
336
|
"tailwindcss": "^4.3.1",
|
|
303
|
-
"typescript": "
|
|
337
|
+
"typescript": "6.0.3",
|
|
304
338
|
"typescript-eslint": "^8.57.1",
|
|
305
|
-
"vite": "
|
|
339
|
+
"vite": "8.2.4",
|
|
306
340
|
"vite-plugin-dts": "^4.5.4",
|
|
307
341
|
"vitest": "^4.1.10"
|
|
308
342
|
},
|
|
309
343
|
"peerDependencies": {
|
|
310
344
|
"@tanstack/react-table": "^8.7.4",
|
|
311
345
|
"@tanstack/react-virtual": "^3.10.8",
|
|
312
|
-
"eslint": "
|
|
346
|
+
"eslint": "9.39.4",
|
|
313
347
|
"react": "^18.3.1",
|
|
314
348
|
"recharts": "^3.7.0",
|
|
315
|
-
"tailwindcss": "^4.1
|
|
349
|
+
"tailwindcss": "^4.3.1"
|
|
316
350
|
},
|
|
317
351
|
"peerDependenciesMeta": {
|
|
318
352
|
"@tanstack/react-table": {
|
|
@@ -330,5 +364,10 @@
|
|
|
330
364
|
},
|
|
331
365
|
"publishConfig": {
|
|
332
366
|
"access": "public"
|
|
367
|
+
},
|
|
368
|
+
"repository": {
|
|
369
|
+
"type": "git",
|
|
370
|
+
"url": "https://github.com/cognitedata/infrastructure.git",
|
|
371
|
+
"directory": "lib/ts/aura"
|
|
333
372
|
}
|
|
334
373
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Use an Alert to communicate contextual, medium-emphasis information inside the current page or task flow.
|
|
2
|
+
Alerts are inline and never block the user the way a modal does.
|
|
3
|
+
|
|
4
|
+
## When to use
|
|
5
|
+
|
|
6
|
+
- Providing inline guidance or recommendations in the current task.
|
|
7
|
+
- Calling attention to warnings or issues that need awareness but are not blocking.
|
|
8
|
+
- Offering direct actions that resolve the issue in context.
|
|
9
|
+
|
|
10
|
+
## When to use something else
|
|
11
|
+
|
|
12
|
+
- Use field-level validation when the message relates to a single input.
|
|
13
|
+
- Use a [Banner](?path=/docs/primitives-banner--docs) for page-wide state that should stay visible while users continue.
|
|
14
|
+
- Use a [Sonner Toast](?path=/docs/primitives-sonner-toast--docs) for brief confirmation after an action.
|
|
15
|
+
- Use an Alert Dialog when the user must make a choice before continuing.
|
|
16
|
+
|
|
17
|
+
## Placement
|
|
18
|
+
|
|
19
|
+
- Align Alerts with surrounding content and do not pin them flush against dividers.
|
|
20
|
+
- Use the `card` style for wrapped content in constrained areas.
|
|
21
|
+
- Use the `strip` style for short messages in wider areas.
|
|
22
|
+
|
|
23
|
+
## Variants
|
|
24
|
+
|
|
25
|
+
| Variant | Use |
|
|
26
|
+
| :-------- | :------------------------------------------------------ |
|
|
27
|
+
| `default` | Neutral guidance or information |
|
|
28
|
+
| `info` | Helpful context the user should notice |
|
|
29
|
+
| `warning` | Issues that need attention but do not block the task |
|
|
30
|
+
| `error` | Failures the user needs to resolve to continue the task |
|
|
31
|
+
|
|
32
|
+
## Dos and don'ts
|
|
33
|
+
|
|
34
|
+
- **Do** include action buttons only when they directly resolve or dismiss the Alert.
|
|
35
|
+
- **Do** evaluate simpler feedback methods first, such as field-level validation.
|
|
36
|
+
- **Don't** attach unrelated actions.
|
|
37
|
+
|
|
38
|
+
## Behavior
|
|
39
|
+
|
|
40
|
+
- Alerts sit inline with the page flow.
|
|
41
|
+
- Dismissal removes or hides the Alert, depending on the variant.
|
|
42
|
+
- Keep the action path clear and minimal.
|
|
43
|
+
|
|
44
|
+
## Often used with
|
|
45
|
+
|
|
46
|
+
[Button](?path=/docs/primitives-button--docs) for direct resolution actions.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Use an Avatar to visually represent a user, team, or concept and help recognition in collaborative UI.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- Showing people in comments, chat, sharing, or collaborator lists.
|
|
6
|
+
- Representing accounts, teams, or organizations.
|
|
7
|
+
- Displaying AI or agent identities in conversational interfaces.
|
|
8
|
+
|
|
9
|
+
## Content
|
|
10
|
+
|
|
11
|
+
- Use an image when one is available, with initials as the fallback if it fails to load.
|
|
12
|
+
- Use initials when no image exists.
|
|
13
|
+
- Use an icon for system users, bots, or special entities.
|
|
14
|
+
|
|
15
|
+
## Colorways and sizes
|
|
16
|
+
|
|
17
|
+
- Decorative colorways (`decorative-1` to `decorative-7`) carry no semantic meaning.
|
|
18
|
+
- Use the `overflow` colorway for "+N" avatars that summarize hidden members.
|
|
19
|
+
- Choose the size based on context density: `default` for most layouts, `xsm` and `xxsm` for dense lists and tables.
|
|
20
|
+
|
|
21
|
+
## Behavior
|
|
22
|
+
|
|
23
|
+
- Avatars are not interactive by default, but can be made interactive when the context needs it.
|
|
24
|
+
- Use overflow patterns in constrained spaces, such as a "+N" Avatar that opens a [Menu](?path=/docs/primitives-dropdown-menu--docs).
|
|
25
|
+
- Avatars can include status badges or dots.
|
|
26
|
+
- Give every Avatar an accessible name with `aria-label`.
|
|
27
|
+
|
|
28
|
+
## Often used with
|
|
29
|
+
|
|
30
|
+
[Badge](?path=/docs/primitives-badge--docs), [Tooltip](?path=/docs/primitives-tooltip--docs) for full names, and [Menu](?path=/docs/primitives-dropdown-menu--docs) for overflow.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Use a Badge as a compact label for status, category, or metadata.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- Surfacing state at a glance, such as active, draft, or error.
|
|
6
|
+
- Tagging items without taking primary focus from the page.
|
|
7
|
+
|
|
8
|
+
## When to use something else
|
|
9
|
+
|
|
10
|
+
- Use an [Alert](?path=/docs/primitives-alert--docs) or inline text when the message needs explanation or recovery steps.
|
|
11
|
+
- Use a [Button](?path=/docs/primitives-button--docs) for a primary action.
|
|
12
|
+
|
|
13
|
+
## Variants
|
|
14
|
+
|
|
15
|
+
| Variant | Use |
|
|
16
|
+
| :------------------------------- | :-------------------------------------------------------- |
|
|
17
|
+
| `decorative-1` to `decorative-7` | Categories and tags with no semantic meaning; filled only |
|
|
18
|
+
| `inProgress` | Neutral, ongoing status |
|
|
19
|
+
| `success`, `warning`, `error` | Status that carries meaning |
|
|
20
|
+
| `archived` | Items that are no longer active |
|
|
21
|
+
| `secondary` | Counts and low-emphasis metadata |
|
|
22
|
+
| `closable` | Tags the user can remove |
|
|
23
|
+
|
|
24
|
+
## Dos and don'ts
|
|
25
|
+
|
|
26
|
+
- **Do** use semantic variants when the Badge communicates status.
|
|
27
|
+
- **Don't** use decorative variants to communicate status, since they carry no semantic meaning.
|
|
28
|
+
- **Don't** outline decorative variants; they are filled only.
|
|
29
|
+
|
|
30
|
+
## Often used with
|
|
31
|
+
|
|
32
|
+
[Avatar](?path=/docs/primitives-avatar--docs), tables and lists, and filter chips.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Use a Banner for a persistent or dismissible message scoped to a page or section.
|
|
2
|
+
Banners are stronger than inline helper text and stay visible while the user continues working.
|
|
3
|
+
|
|
4
|
+
## When to use
|
|
5
|
+
|
|
6
|
+
- Announcing environment or product state, such as maintenance, a trial period, or a feature preview.
|
|
7
|
+
- Page-wide outcomes that should stay visible while the user continues.
|
|
8
|
+
- Explaining why a page is read-only and offering the action that unlocks it.
|
|
9
|
+
|
|
10
|
+
## When to use something else
|
|
11
|
+
|
|
12
|
+
- Use an [Alert](?path=/docs/primitives-alert--docs) for task-specific guidance inside a flow.
|
|
13
|
+
- Use a [Sonner Toast](?path=/docs/primitives-sonner-toast--docs) for brief confirmation after an action.
|
|
14
|
+
- Use a [Dialog](?path=/docs/primitives-dialog--docs) when the user must respond before continuing.
|
|
15
|
+
|
|
16
|
+
## Placement
|
|
17
|
+
|
|
18
|
+
- Place Banners at the top of the page or section they describe.
|
|
19
|
+
- Banners span the full width of their container by default.
|
|
20
|
+
- Set `inset` to round the corners when the Banner sits inside padded content rather than edge to edge.
|
|
21
|
+
|
|
22
|
+
## Variants
|
|
23
|
+
|
|
24
|
+
| Variant | Use |
|
|
25
|
+
| :------------ | :--------------------------------------------------- |
|
|
26
|
+
| `default` | Neutral state, such as read-only or preview mode |
|
|
27
|
+
| `info` | Helpful updates, such as new data being available |
|
|
28
|
+
| `warning` | Upcoming issues, such as an expiring trial |
|
|
29
|
+
| `destructive` | Failures that affect the page, such as a failed save |
|
|
30
|
+
|
|
31
|
+
## Content
|
|
32
|
+
|
|
33
|
+
- Keep the title to one short sentence; Banners are a single line high.
|
|
34
|
+
- Start with a `BannerIcon` that matches the variant.
|
|
35
|
+
- Put actions in `BannerActions`, using `BannerAction` for actions and `BannerClose` for dismissal.
|
|
36
|
+
|
|
37
|
+
## Dos and don'ts
|
|
38
|
+
|
|
39
|
+
- **Do** limit actions to ones that resolve or explain the message.
|
|
40
|
+
- **Do** make Banners dismissible unless the state they describe is still active.
|
|
41
|
+
- **Don't** stack several Banners on one page; combine or prioritize the messages instead.
|
|
42
|
+
- **Don't** use a Banner for field-level validation.
|
|
43
|
+
|
|
44
|
+
## Behavior
|
|
45
|
+
|
|
46
|
+
- `BannerClose` hides the Banner and calls `onClose`.
|
|
47
|
+
- Use `visible` and `onClose` to control visibility, or `defaultVisible` to leave it uncontrolled.
|
|
48
|
+
|
|
49
|
+
## Often used with
|
|
50
|
+
|
|
51
|
+
[Button](?path=/docs/primitives-button--docs) through `BannerAction`, and [Topbar](?path=/docs/primitives-topbar--docs) above page-level Banners.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
Use a Breadcrumb to show users where the current page sits in the product hierarchy and let them return to its ancestors.
|
|
2
|
+
Breadcrumbs are location-based, not path-based: they reflect the structure of the product, not the user's browsing history.
|
|
3
|
+
|
|
4
|
+
## When to use
|
|
5
|
+
|
|
6
|
+
- Users need to return to a parent page.
|
|
7
|
+
- Users need clarity on their current position in the product hierarchy.
|
|
8
|
+
- Quick access to ancestor pages is useful.
|
|
9
|
+
|
|
10
|
+
## When to use something else
|
|
11
|
+
|
|
12
|
+
- Leave out the Breadcrumb when the page structure is flat and there is no hierarchy to show.
|
|
13
|
+
- Use [Tabs](?path=/docs/primitives-tabs--docs) or a [Segmented Control](?path=/docs/primitives-segmented-control--docs) when users switch between pages at the same level.
|
|
14
|
+
|
|
15
|
+
## Content
|
|
16
|
+
|
|
17
|
+
- Wrap a `BreadcrumbList` in `Breadcrumb`, and put each step in a `BreadcrumbItem` with a `BreadcrumbSeparator` between items.
|
|
18
|
+
- Use `BreadcrumbLink` for ancestor pages and `BreadcrumbPage` for the current page.
|
|
19
|
+
- Use `BreadcrumbPageButton` instead of `BreadcrumbPage` when the current page opens a [Dropdown Menu](?path=/docs/primitives-dropdown-menu--docs) of page actions, such as rename or delete.
|
|
20
|
+
- Keep labels short and match them to the titles of the pages they link to.
|
|
21
|
+
|
|
22
|
+
## Overflow
|
|
23
|
+
|
|
24
|
+
- When space is limited, condense the middle items into a `BreadcrumbEllipsis`, keeping the first item and the last two visible.
|
|
25
|
+
- Wrap the ellipsis in a [Dropdown Menu](?path=/docs/primitives-dropdown-menu--docs) trigger so users can still reach the hidden pages.
|
|
26
|
+
- The current page always stays visible.
|
|
27
|
+
|
|
28
|
+
## Dos and don'ts
|
|
29
|
+
|
|
30
|
+
- **Do** truncate long labels and show the full text in a [Tooltip](?path=/docs/primitives-tooltip--docs).
|
|
31
|
+
- **Don't** make the current page a link.
|
|
32
|
+
- **Don't** pair a Breadcrumb with a back button.
|
|
33
|
+
- **Don't** wrap labels onto multiple lines.
|
|
34
|
+
- **Don't** show more than one Breadcrumb trail on a page.
|
|
35
|
+
|
|
36
|
+
## Behavior
|
|
37
|
+
|
|
38
|
+
- The Breadcrumb renders as a `nav` landmark labelled "breadcrumb".
|
|
39
|
+
- Every link except the current page is reachable with Tab and Shift+Tab and activates with Enter.
|
|
40
|
+
- The current page has `aria-current="page"` and is not focusable.
|
|
41
|
+
- Separators are hidden from assistive technology.
|
|
42
|
+
|
|
43
|
+
## Often used with
|
|
44
|
+
|
|
45
|
+
[Topbar](?path=/docs/primitives-topbar--docs), [Tooltip](?path=/docs/primitives-tooltip--docs) for truncated labels, and [Dropdown Menu](?path=/docs/primitives-dropdown-menu--docs) for overflow items and page actions.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Use a Button to communicate actions users can take and to allow users to interact with the page.
|
|
2
|
+
Each page should have only one primary Button, and any remaining calls to action should be represented as lower-emphasis Buttons.
|
|
3
|
+
|
|
4
|
+
## Placement
|
|
5
|
+
|
|
6
|
+
Buttons should be placed contextually near the objects they affect for easy discoverability.
|
|
7
|
+
|
|
8
|
+
## Right side
|
|
9
|
+
|
|
10
|
+
Buttons should always be placed furthest right in the following contexts:
|
|
11
|
+
|
|
12
|
+
- Full page: If the action affects the entire content on the page, Buttons should be placed either in the page header area on the right or within the Page toolbar with the Primary Button being furthest right.
|
|
13
|
+
- In side panels: Buttons can be placed in the header or footer area, with the Primary Button being furthest right.
|
|
14
|
+
- In Dialogs, steppers or wizards: Buttons always appear in the footer, with the Primary Button being furthest right.
|
|
15
|
+
|
|
16
|
+
## Left side
|
|
17
|
+
|
|
18
|
+
Buttons may make more sense to place on the left side in the following contexts:
|
|
19
|
+
|
|
20
|
+
- Cards: Card content is always left aligned and Buttons placed on the left to align with content makes for better readability.
|
|
21
|
+
- Lists: In dense lists when content is left aligned, it may make more sense to place relevant Buttons on the left to align with content.
|
|
22
|
+
|
|
23
|
+
## When to use a full width Button
|
|
24
|
+
|
|
25
|
+
Buttons by default have fixed paddings.
|
|
26
|
+
The width of the Button adjusts to accommodate the label keeping the correct padding on all sides.
|
|
27
|
+
|
|
28
|
+
However, Buttons can span the full width of their parent container.
|
|
29
|
+
Full width buttons help visually distinguish actions from other screen elements so they are easier to detect.
|
|
30
|
+
The content of the Button always stays centered.
|
|
31
|
+
Examples of when you might want to use a full width Button are in narrow side panels or small containers such as Popovers and Menus.
|
|
32
|
+
|
|
33
|
+
## Grouping
|
|
34
|
+
|
|
35
|
+
- Small groups (2-3): Use secondary and/or ghost buttons (plus one primary if needed) with 8px spacing between buttons.
|
|
36
|
+
- Large groups (3+, e.g., toolbars): Use mainly ghost buttons to reduce visual clutter with 8px spacing between buttons.
|
|
37
|
+
|
|
38
|
+
## Variants and when to use them
|
|
39
|
+
|
|
40
|
+
- Consider Button hierarchy: We use different Button types to establish a visual hierarchy.
|
|
41
|
+
You don't always need to use the secondary Button as the second Button in your layout.
|
|
42
|
+
The most important thing is to establish a visual hierarchy between the buttons in your UI, which is why only one primary Button should be used on a page.
|
|
43
|
+
- Type indicates importance: The Button type should be chosen based on the importance of the action.
|
|
44
|
+
More important, more emphasis.
|
|
45
|
+
- Verb + noun format: Reference action label guidelines in the design.md file to use the appropriate verb.
|
|
46
|
+
It's always best to use a label with your Button unless the icon is highly recognizable, such as the save (floppy disk) or delete (trash bin) icons, or space is limited.
|
|
47
|
+
Alternatively, use an icon button with a [Tooltip](?path=/docs/primitives-tooltip--docs).
|
|
48
|
+
- Avoid disabled Buttons: Disabled Buttons can be confusing and frustrating for many users and can be difficult to spot for those with low vision or users relying on keyboard interactions, since disabled Buttons won't take keyboard focus.
|
|
49
|
+
To make things easier, enable the Button so users can click it, and provide an error message or inline validation if information is incorrect or missing.
|
|
50
|
+
Or try using alternative methods to activate a Button control such as selections that trigger an [Action toolbar](?path=/docs/primitives-actiontoolbar--docs).
|
|
51
|
+
If you must use a disabled Button, include clarifying text or a tooltip to explain why.
|
|
52
|
+
|
|
53
|
+
| Variant | Use | When NOT to use | Max number per context |
|
|
54
|
+
| :------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------- | :--------------------- |
|
|
55
|
+
| `default` (primary) | The single most important action on a screen | Don't use more than once per view. Never for navigation. | 1 |
|
|
56
|
+
| `secondary` | Supporting actions that aren't the primary CTA | Don't use as a substitute for a primary button | A few |
|
|
57
|
+
| `outline` | Low-emphasis actions in dense UI or to create contrast with background colors | Don't use as the primary action | A few |
|
|
58
|
+
| `ghost` | Tertiary actions, icon buttons in toolbars | Don't use as a primary or secondary action | As many as needed |
|
|
59
|
+
| `destructive` | Irreversible, high-consequence actions (delete, remove), most commonly in [Dialog](?path=/docs/primitives-dialog--docs)s or [Action toolbar](?path=/docs/primitives-actiontoolbar--docs)s | Don't use for general negative actions — only for truly destructive commits | 1 |
|
|
60
|
+
| `loading` | Actions that are in progress | Don't use for general page loading states | 1 at a time |
|
|
61
|
+
|
|
62
|
+
## Dos and don'ts
|
|
63
|
+
|
|
64
|
+
- **Do** use only one `default` (primary) button per view, if needed.
|
|
65
|
+
- **Do** use size="sm" for buttons in the Topbar action slot. Match this in your designs.
|
|
66
|
+
- **Don't** use a button where a link should be.
|
|
67
|
+
Buttons change state or trigger actions.
|
|
68
|
+
Links navigate.
|
|
69
|
+
- **Don't** use `destructive` buttons inline as the first interaction.
|
|
70
|
+
Use a `ghost` or other Button type then use the `destructive` Button when the user confirms the action.
|
|
71
|
+
|
|
72
|
+
## Behavior
|
|
73
|
+
|
|
74
|
+
- Primary action submits or commits the labeled operation; support keyboard activation (Enter / Space) when the control is focusable.
|
|
75
|
+
- Loading state should prevent duplicate submissions where the action is not idempotent.
|
|
76
|
+
- Icon-only buttons must have an accessible name (visible label, [`aria-label`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-label), or [Tooltip](?path=/docs/primitives-tooltip--docs) that is exposed to assistive tech per implementation).
|
|
77
|
+
|
|
78
|
+
## Toggle vs Button
|
|
79
|
+
|
|
80
|
+
A standard Button triggers a one time action and returns to its resting state immediately after, whereas a Toggle maintains an on/off state until clicked again.
|
|
81
|
+
Toggled Buttons have different visual identities than Buttons and should be used to indicate the following interactions:
|
|
82
|
+
|
|
83
|
+
- A selected element such as in a Toolbar.
|
|
84
|
+
- An applied filter such as in Page toolbar.
|
|
85
|
+
|
|
86
|
+
## Often used with
|
|
87
|
+
|
|
88
|
+
[Tooltip](?path=/docs/primitives-tooltip--docs) on icon-only triggers; [Menu](?path=/docs/primitives-dropdown-menu--docs) (dropdown / split); [KBD](?path=/docs/primitives-kbd--docs) hints in labels; pairs with [Dialog](?path=/docs/primitives-dialog--docs), [Popover](?path=/docs/primitives-popover--docs), or [Action toolbar](?path=/docs/primitives-actiontoolbar--docs) as trigger.
|
|
89
|
+
|
|
90
|
+
## Accessibility
|
|
91
|
+
|
|
92
|
+
- Icon-only buttons: Always provide an explicit `aria-label` or an internal screen-reader-only text element (`<span className="sr-only">`) when no visual text label exists.
|
|
93
|
+
- Disabled states: Use `aria-disabled="true"` rather than native HTML `disabled` attributes if you need the button to retain keyboard focusability (e.g., to trigger an explanatory disabled-state tooltip).
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
Use a Button Group to join related buttons into one connected row, showing that the actions belong to the same context.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- Two or more actions are closely related and act on the same target, such as text alignment or a split button.
|
|
6
|
+
- Saving horizontal space compared with spacing individual [Buttons](?path=/docs/primitives-button--docs) apart.
|
|
7
|
+
|
|
8
|
+
## When to use something else
|
|
9
|
+
|
|
10
|
+
- Use separate [Buttons](?path=/docs/primitives-button--docs) when the actions are unrelated.
|
|
11
|
+
- Use a [Toolbar](?path=/docs/primitives-toolbar--docs) or a [Dropdown Menu](?path=/docs/primitives-dropdown-menu--docs) when there are more than a handful of actions.
|
|
12
|
+
- Use a [Segmented Control](?path=/docs/primitives-segmented-control--docs) when the buttons switch between views rather than run commands.
|
|
13
|
+
|
|
14
|
+
## Content
|
|
15
|
+
|
|
16
|
+
- Put `Button`s directly inside the group so their borders and corners join.
|
|
17
|
+
- Add `ButtonGroupText` for a short, non-interactive label at the start of the group.
|
|
18
|
+
- Add `ButtonGroupSeparator` to split sub-groups of actions within one group.
|
|
19
|
+
|
|
20
|
+
## Orientation
|
|
21
|
+
|
|
22
|
+
- Groups are horizontal by default.
|
|
23
|
+
- Set `orientation="vertical"` to stack buttons, for example in a narrow side panel.
|
|
24
|
+
|
|
25
|
+
## Dos and don'ts
|
|
26
|
+
|
|
27
|
+
- **Do** use the same `variant` and `size` for every button in a group.
|
|
28
|
+
- **Do** give icon-only buttons an `aria-label` and pair them with a [Tooltip](?path=/docs/primitives-tooltip--docs).
|
|
29
|
+
- **Don't** group more than a small set of actions.
|
|
30
|
+
|
|
31
|
+
## Behavior
|
|
32
|
+
|
|
33
|
+
- The group has the `group` role, so assistive technology announces its buttons together.
|
|
34
|
+
- Each button stays a separate Tab stop.
|
|
35
|
+
|
|
36
|
+
## Often used with
|
|
37
|
+
|
|
38
|
+
[Button](?path=/docs/primitives-button--docs), [Tooltip](?path=/docs/primitives-tooltip--docs) for icon-only buttons, and [Dropdown Menu](?path=/docs/primitives-dropdown-menu--docs) for split buttons.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Use a Checkbox to let users independently select one or more options.
|
|
2
|
+
Checkboxes can appear standalone or within menus, tree views, tables, or cards.
|
|
3
|
+
|
|
4
|
+
## When to use
|
|
5
|
+
|
|
6
|
+
- Multiple independent selections are required, such as column visibility in a table.
|
|
7
|
+
- Enabling or disabling settings where changes do not take immediate effect.
|
|
8
|
+
- Confirming agreement before an action, such as delete verification.
|
|
9
|
+
|
|
10
|
+
## When to use something else
|
|
11
|
+
|
|
12
|
+
- Use a [Radio](?path=/docs/primitives-radio-group--docs) when only one option can be selected at a time.
|
|
13
|
+
- Use a [Select](?path=/docs/primitives-select--docs) when options are not displayed simultaneously.
|
|
14
|
+
- Use a [Switch](?path=/docs/primitives-switch--docs) for an immediate on/off toggle.
|
|
15
|
+
|
|
16
|
+
## Layout
|
|
17
|
+
|
|
18
|
+
- Groups stack vertically by default; set `orientation="horizontal"` to lay options out in a row.
|
|
19
|
+
- Use the card layout for options that need descriptions.
|
|
20
|
+
|
|
21
|
+
## Dos and don'ts
|
|
22
|
+
|
|
23
|
+
- **Do** provide a label for every Checkbox.
|
|
24
|
+
- **Do** use the indeterminate state for partial group selection.
|
|
25
|
+
- **Don't** pre-select Checkboxes automatically.
|
|
26
|
+
- **Don't** use a single Checkbox unless it confirms agreement.
|
|
27
|
+
- **Don't** use card variants for long option lists.
|
|
28
|
+
|
|
29
|
+
## Behavior
|
|
30
|
+
|
|
31
|
+
- The Space key toggles the focused Checkbox.
|
|
32
|
+
- The indeterminate state is set programmatically, not by user interaction.
|
|
33
|
+
- Parent and child Checkboxes follow selection cascading rules.
|
|
34
|
+
|
|
35
|
+
## Often used with
|
|
36
|
+
|
|
37
|
+
[Label](?path=/docs/primitives-label--docs), helper text for groups, and the card variant for options that need descriptions.
|