@cognite/aura 0.3.5 → 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 +21 -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 +18 -22
- 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 +85 -55
- 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 +117 -76
- 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 +540 -132
- 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 +46 -33
- 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 -1
- package/dist/components/ui/core/data-grid/index.js +6 -2
- 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 +10 -10
- package/dist/components/ui/core/segmented-control/segmented-control.js +203 -149
- 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 +49 -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
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
Use a Collapsible to show or hide one optional block of content inline.
|
|
2
|
+
It is designed for a single independent section, not for several stacked sections.
|
|
3
|
+
|
|
4
|
+
## When to use
|
|
5
|
+
|
|
6
|
+
- Showing one optional or secondary block of content, such as AI reasoning, advanced settings, or a preview.
|
|
7
|
+
- The content is useful but not essential to the primary task.
|
|
8
|
+
|
|
9
|
+
## When to use something else
|
|
10
|
+
|
|
11
|
+
- Use an [Accordion](?path=/docs/primitives-accordion--docs) when there are several expandable sections.
|
|
12
|
+
- Show the content by default when it is essential.
|
|
13
|
+
- Use [Tabs](?path=/docs/primitives-tabs--docs) or filter controls when users are navigating or filtering.
|
|
14
|
+
|
|
15
|
+
## Content
|
|
16
|
+
|
|
17
|
+
- Put the always-visible trigger in `CollapsibleTrigger` and the hidden content in `CollapsibleContent`.
|
|
18
|
+
- Render the trigger as a ghost [Button](?path=/docs/primitives-button--docs) through the `render` prop, with an `IconSelector` at the end that rotates when open.
|
|
19
|
+
- Write a descriptive trigger label that says what is inside, such as "Advanced settings" rather than "More".
|
|
20
|
+
|
|
21
|
+
## State
|
|
22
|
+
|
|
23
|
+
- Collapsibles start collapsed; set `defaultOpen` to start open.
|
|
24
|
+
- Use `open` with `onOpenChange` when the state lives elsewhere.
|
|
25
|
+
- Set `disabled` to stop the section from opening or closing.
|
|
26
|
+
|
|
27
|
+
## Dos and don'ts
|
|
28
|
+
|
|
29
|
+
- **Do** default to collapsed unless the content is the main purpose of the view.
|
|
30
|
+
- **Don't** nest Collapsibles; use an [Accordion](?path=/docs/primitives-accordion--docs) for layered disclosure.
|
|
31
|
+
- **Don't** hide errors or required information inside a Collapsible.
|
|
32
|
+
|
|
33
|
+
## Behavior
|
|
34
|
+
|
|
35
|
+
- One trigger controls one content region.
|
|
36
|
+
- Clicking the trigger, or pressing Space or Enter while it has focus, toggles the content.
|
|
37
|
+
- The trigger exposes the open state to assistive technology through `aria-expanded`.
|
|
38
|
+
- The content stays mounted while closed, so form fields inside keep their values.
|
|
39
|
+
|
|
40
|
+
## Often used with
|
|
41
|
+
|
|
42
|
+
[Button](?path=/docs/primitives-button--docs) as the trigger, [Badge](?path=/docs/primitives-badge--docs) for counts in the trigger, and [Separator](?path=/docs/primitives-separator--docs) between stacked Collapsibles.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Use a Count to surface a quantity inline, such as a reading, a total, or a number of selected items.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- Showing a quantity associated with a label, tab, list item, or [Card](?path=/docs/primitives-card--docs) header.
|
|
6
|
+
- Surfacing unread counts or selection totals without taking primary focus.
|
|
7
|
+
|
|
8
|
+
## When to use something else
|
|
9
|
+
|
|
10
|
+
- Use a [Badge](?path=/docs/primitives-badge--docs) when the value represents a status or category rather than a quantity.
|
|
11
|
+
- Use the `count` prop on a [Toggle](?path=/docs/primitives-toggle--docs) or a Badge in a [Tab](?path=/docs/primitives-tabs--docs) for small counts inside a control.
|
|
12
|
+
|
|
13
|
+
## Content
|
|
14
|
+
|
|
15
|
+
- Put the number in `CountValue`.
|
|
16
|
+
- Add a `CountUnit` below the value for units of measure such as °C or %.
|
|
17
|
+
- Keep values short; abbreviate large numbers, such as 1.2k.
|
|
18
|
+
|
|
19
|
+
## Variants
|
|
20
|
+
|
|
21
|
+
- `default` for neutral quantities.
|
|
22
|
+
- `success`, `warning`, and `critical` when the value is within, near, or outside an expected range.
|
|
23
|
+
- Pair a status variant with nearby text that explains it, so meaning does not rely on color alone.
|
|
24
|
+
|
|
25
|
+
## Dos and don'ts
|
|
26
|
+
|
|
27
|
+
- **Do** keep the same variant for the same meaning across a view.
|
|
28
|
+
- **Don't** use status variants for decoration.
|
|
29
|
+
- **Don't** put actions inside a Count.
|
|
30
|
+
|
|
31
|
+
## Often used with
|
|
32
|
+
|
|
33
|
+
[Card](?path=/docs/primitives-card--docs), [Tabs](?path=/docs/primitives-tabs--docs), [Badge](?path=/docs/primitives-badge--docs), [Label](?path=/docs/primitives-label--docs), and list items.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
Use an Input to capture short, single-line text in forms and toolbars.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- Collecting specific text data, such as names, credentials, or asset identifiers.
|
|
6
|
+
- A form field needs free text that does not fit a structured picker.
|
|
7
|
+
|
|
8
|
+
## When to use something else
|
|
9
|
+
|
|
10
|
+
- Use a [Select](?path=/docs/primitives-select--docs), [Combobox](?path=/docs/primitives-combobox--docs), [Checkbox](?path=/docs/primitives-checkbox--docs), or [Radio](?path=/docs/primitives-radio-group--docs) when choosing from predefined options.
|
|
11
|
+
- Use a [Combobox](?path=/docs/primitives-combobox--docs) when suggestions should appear as the user types.
|
|
12
|
+
- Use a [Date Picker](?path=/docs/primitives-datepicker--docs) or [Time Picker](?path=/docs/primitives-timepicker--docs) for dates and times.
|
|
13
|
+
- Use a [Textarea](?path=/docs/primitives-textarea--docs) when multi-line text is expected.
|
|
14
|
+
- Use [Search](?path=/docs/primitives-search--docs) for filtering or searching content.
|
|
15
|
+
|
|
16
|
+
## Content
|
|
17
|
+
|
|
18
|
+
- Give every Input a visible [Label](?path=/docs/primitives-label--docs).
|
|
19
|
+
- Use placeholder text only for a short example of the expected format.
|
|
20
|
+
- Set `type` to match the data, such as `email`, `number`, `tel`, or `url`, so browsers offer the right keyboard and autofill.
|
|
21
|
+
|
|
22
|
+
## States
|
|
23
|
+
|
|
24
|
+
| State | How to set it |
|
|
25
|
+
| :-------- | :----------------------------------------------------------- |
|
|
26
|
+
| Default | No extra props |
|
|
27
|
+
| Filled | `value` or `defaultValue` |
|
|
28
|
+
| Disabled | `disabled`, with `data-disabled="true"` on the field wrapper |
|
|
29
|
+
| Read-only | `readOnly` for values users can see and copy but not edit |
|
|
30
|
+
| Error | `aria-invalid`, with error helper text below the Input |
|
|
31
|
+
|
|
32
|
+
## Dos and don'ts
|
|
33
|
+
|
|
34
|
+
- **Do** show validation messages below the Input with helper text.
|
|
35
|
+
- **Do** prefer `readOnly` over `disabled` when users still need to read or copy the value.
|
|
36
|
+
- **Don't** use long placeholder text that duplicates the label.
|
|
37
|
+
- **Don't** mimic pre-filled content with placeholder text.
|
|
38
|
+
- **Don't** wrap text inside an Input; truncate it or switch to a Textarea.
|
|
39
|
+
|
|
40
|
+
## Behavior
|
|
41
|
+
|
|
42
|
+
- Inputs are single-line and update as the user types.
|
|
43
|
+
- Associate validation messages with the field so assistive technology announces them.
|
|
44
|
+
- Use an [Input Group](?path=/docs/primitives-input-group--docs) for leading or trailing slots such as icons, prefixes, suffixes, or buttons.
|
|
45
|
+
|
|
46
|
+
## Often used with
|
|
47
|
+
|
|
48
|
+
[Label](?path=/docs/primitives-label--docs), [Helper Text](?path=/docs/primitives-helper-text--docs), [Button](?path=/docs/primitives-button--docs), and [Tooltip](?path=/docs/primitives-tooltip--docs).
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Use a Label to identify a form field and associate it programmatically with that field.
|
|
2
|
+
Labels are not intended as general-purpose text.
|
|
3
|
+
|
|
4
|
+
## When to use
|
|
5
|
+
|
|
6
|
+
- Every [Input](?path=/docs/primitives-input--docs), [Select](?path=/docs/primitives-select--docs), [Combobox](?path=/docs/primitives-combobox--docs), [Textarea](?path=/docs/primitives-textarea--docs), [Slider](?path=/docs/primitives-slider--docs), or [Date Picker](?path=/docs/primitives-datepicker--docs) needs one.
|
|
7
|
+
- Groups of [Checkboxes](?path=/docs/primitives-checkbox--docs), [Radios](?path=/docs/primitives-radio-group--docs), or [Switches](?path=/docs/primitives-switch--docs) need one to name the group.
|
|
8
|
+
|
|
9
|
+
## When to use something else
|
|
10
|
+
|
|
11
|
+
- Use a heading for section titles.
|
|
12
|
+
- Use [Helper Text](?path=/docs/primitives-helper-text--docs) for descriptive text below a field.
|
|
13
|
+
- Use plain text or a [Badge](?path=/docs/primitives-badge--docs) for non-interactive elements such as status indicators.
|
|
14
|
+
|
|
15
|
+
## Required fields
|
|
16
|
+
|
|
17
|
+
- Set `required` on the Label to show the required asterisk.
|
|
18
|
+
- `Label.required` is visual only, so also set `required` on the form control for native validation and assistive technology.
|
|
19
|
+
- Mark required fields consistently across a form.
|
|
20
|
+
|
|
21
|
+
## Dos and don'ts
|
|
22
|
+
|
|
23
|
+
- **Do** associate every Label with its field through `htmlFor` and `id`.
|
|
24
|
+
- **Do** keep Labels short and descriptive.
|
|
25
|
+
- **Don't** replace Labels with placeholder text; placeholders disappear and are not reliably announced.
|
|
26
|
+
- **Don't** hide Labels for visual cleanliness; use a [Tooltip](?path=/docs/primitives-tooltip--docs) to supplement shortened Labels.
|
|
27
|
+
|
|
28
|
+
## Behavior
|
|
29
|
+
|
|
30
|
+
- Clicking a Label focuses or toggles its associated field.
|
|
31
|
+
- Wrapping the Label and field in an element with the `group` class and `data-disabled="true"` applies the disabled style to the Label.
|
|
32
|
+
|
|
33
|
+
## Often used with
|
|
34
|
+
|
|
35
|
+
[Input](?path=/docs/primitives-input--docs), [Select](?path=/docs/primitives-select--docs), [Combobox](?path=/docs/primitives-combobox--docs), [Checkbox](?path=/docs/primitives-checkbox--docs), [Radio](?path=/docs/primitives-radio-group--docs), [Switch](?path=/docs/primitives-switch--docs), [Slider](?path=/docs/primitives-slider--docs), [Textarea](?path=/docs/primitives-textarea--docs), and [Date Picker](?path=/docs/primitives-datepicker--docs).
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
Use a Radio Group to let users select exactly one option from a small set of mutually exclusive choices.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- A single selection from a small, visible set of predefined options.
|
|
6
|
+
- All options should be visible side by side for comparison.
|
|
7
|
+
|
|
8
|
+
## When to use something else
|
|
9
|
+
|
|
10
|
+
- Use a [Checkbox](?path=/docs/primitives-checkbox--docs) when multiple selections are allowed.
|
|
11
|
+
- Use a [Select](?path=/docs/primitives-select--docs) or [Combobox](?path=/docs/primitives-combobox--docs) when there are more than about five options or space is limited.
|
|
12
|
+
- Use a [Switch](?path=/docs/primitives-switch--docs) when the choice is binary and takes immediate effect.
|
|
13
|
+
- Use a [Segmented Control](?path=/docs/primitives-segmented-control--docs) to switch between views rather than set a value.
|
|
14
|
+
|
|
15
|
+
## Layout
|
|
16
|
+
|
|
17
|
+
- Groups stack vertically by default; set `orientation="horizontal"` to lay options out in a row.
|
|
18
|
+
- Use `variant="card"` on `RadioGroupItem` for options that need descriptions, such as plan or template choices.
|
|
19
|
+
- Add `RadioGroupItemDescription` under the label when an option needs a short explanation.
|
|
20
|
+
|
|
21
|
+
## Dos and don'ts
|
|
22
|
+
|
|
23
|
+
- **Do** give every option a descriptive label.
|
|
24
|
+
- **Do** pre-select a sensible default when one exists.
|
|
25
|
+
- **Don't** group unrelated options.
|
|
26
|
+
- **Don't** use more than five options.
|
|
27
|
+
- **Don't** use card variants for long option lists.
|
|
28
|
+
|
|
29
|
+
## Behavior
|
|
30
|
+
|
|
31
|
+
- Clicking or pressing Space selects the focused option and deselects the others in the group.
|
|
32
|
+
- Arrow keys move focus and selection between options.
|
|
33
|
+
- Set `disabled` on the `RadioGroup` to disable every option, or on a `RadioGroupItemControl` to disable a single option.
|
|
34
|
+
- Set `name` and `required` on the `RadioGroup` for native form submission.
|
|
35
|
+
|
|
36
|
+
## Often used with
|
|
37
|
+
|
|
38
|
+
[Label](?path=/docs/primitives-label--docs) to name the group, [Helper Text](?path=/docs/primitives-helper-text--docs), and the card variant for options that need descriptions.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Use a Separator to draw a subtle 1px divider between distinct sections of content.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- Creating visual relief between related groups of content.
|
|
6
|
+
- Dividing sections within toolbars, menus, cards, or forms.
|
|
7
|
+
|
|
8
|
+
## When to use something else
|
|
9
|
+
|
|
10
|
+
- Use whitespace alone when the layout is sparse.
|
|
11
|
+
- Use headings, a [Card](?path=/docs/primitives-card--docs), or background regions when sections need semantic grouping.
|
|
12
|
+
|
|
13
|
+
## Orientation
|
|
14
|
+
|
|
15
|
+
- Separators are horizontal by default and fill the width of their container.
|
|
16
|
+
- Set `orientation="vertical"` to divide items in a row, such as [Buttons](?path=/docs/primitives-button--docs) in a [Toolbar](?path=/docs/primitives-toolbar--docs).
|
|
17
|
+
- A vertical Separator fills the height of its container, so give the row a height, such as 16px between buttons or form elements.
|
|
18
|
+
|
|
19
|
+
## Dos and don'ts
|
|
20
|
+
|
|
21
|
+
- **Do** use 16px vertical Separators between buttons or horizontal form elements.
|
|
22
|
+
- **Don't** place Separators between every element.
|
|
23
|
+
- **Don't** use bold or colorful Separators; keep them subtle.
|
|
24
|
+
- **Don't** replace semantic headings or landmarks with Separators.
|
|
25
|
+
|
|
26
|
+
## Behavior
|
|
27
|
+
|
|
28
|
+
- A Separator has the `separator` role and exposes its orientation to assistive technology.
|
|
29
|
+
|
|
30
|
+
## Often used with
|
|
31
|
+
|
|
32
|
+
[Toolbar](?path=/docs/primitives-toolbar--docs), [Card](?path=/docs/primitives-card--docs) headers and footers, [Accordion](?path=/docs/primitives-accordion--docs), menus, and dense form sections.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Use a Skeleton as a loading placeholder that mimics the shape of incoming content.
|
|
2
|
+
Skeletons reduce perceived wait time and prevent layout shift when the content arrives.
|
|
3
|
+
|
|
4
|
+
## When to use
|
|
5
|
+
|
|
6
|
+
- Content is loading and the shape of the result is predictable, such as cards, lists, or table rows.
|
|
7
|
+
- Reducing layout shift while data fetches in the background.
|
|
8
|
+
|
|
9
|
+
## When to use something else
|
|
10
|
+
|
|
11
|
+
- Show nothing when loading is very short, under about 300ms.
|
|
12
|
+
- Use a [Loader](?path=/docs/primitives-loader--docs) or [Progress](?path=/docs/primitives-progress--docs) when the shape of the content is unpredictable.
|
|
13
|
+
|
|
14
|
+
## Shapes
|
|
15
|
+
|
|
16
|
+
- Size and shape each Skeleton with `className` to match the content it stands in for.
|
|
17
|
+
- Use short, full-width bars for lines of text, `rounded-full` for avatars, and larger blocks for images or cards.
|
|
18
|
+
- Compose several Skeletons to outline a whole card, list item, or table row.
|
|
19
|
+
|
|
20
|
+
## Dos and don'ts
|
|
21
|
+
|
|
22
|
+
- **Do** match Skeleton shapes to the actual content layout.
|
|
23
|
+
- **Do** replace the whole placeholder at once when the content loads.
|
|
24
|
+
- **Don't** add extra animation; the built-in subtle pulse is sufficient.
|
|
25
|
+
|
|
26
|
+
## Accessibility
|
|
27
|
+
|
|
28
|
+
- Skeletons have no role by default, so they are not announced.
|
|
29
|
+
- Set `role="status"` and an `aria-label` such as "Loading" on the loading region so screen reader users know content is on its way.
|
|
30
|
+
|
|
31
|
+
## Often used with
|
|
32
|
+
|
|
33
|
+
[Card](?path=/docs/primitives-card--docs), [Data Grid](?path=/docs/primitives-datagrid--docs), [Item](?path=/docs/primitives-item--docs) lists, and pagination.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
Use a Slider to select a single value or a range from a continuous scale.
|
|
2
|
+
Sliders give quick visual feedback and suit approximate rather than precise values.
|
|
3
|
+
|
|
4
|
+
## When to use
|
|
5
|
+
|
|
6
|
+
- Adjusting continuous values where precision is less important than visual feedback, such as volume, brightness, or a price filter.
|
|
7
|
+
- Providing immediate visual feedback, such as media scrubbing or live previews.
|
|
8
|
+
- Selecting a minimum and maximum range.
|
|
9
|
+
|
|
10
|
+
## When to use something else
|
|
11
|
+
|
|
12
|
+
- Use an [Input](?path=/docs/primitives-input--docs) or [Select](?path=/docs/primitives-select--docs) when precise numeric entry is required.
|
|
13
|
+
- Use a [Radio Group](?path=/docs/primitives-radio-group--docs) or [Select](?path=/docs/primitives-select--docs) when the choice is categorical rather than continuous.
|
|
14
|
+
|
|
15
|
+
## Values
|
|
16
|
+
|
|
17
|
+
- Pass one value, such as `defaultValue={[50]}`, for a single thumb.
|
|
18
|
+
- Pass two values, such as `defaultValue={[20, 80]}`, for a range with two thumbs.
|
|
19
|
+
- Set `min`, `max`, and `step` to match the scale; the defaults are 0, 100, and 1.
|
|
20
|
+
- Add an adjacent [Input](?path=/docs/primitives-input--docs) when users may also need to type an exact value.
|
|
21
|
+
|
|
22
|
+
## Feedback
|
|
23
|
+
|
|
24
|
+
- Apply changes as the user drags when the result is cheap to show, such as a live preview.
|
|
25
|
+
- Apply changes on submit when each change would reload the screen or cause visual disruption, and say so in [Helper Text](?path=/docs/primitives-helper-text--docs).
|
|
26
|
+
|
|
27
|
+
## Dos and don'ts
|
|
28
|
+
|
|
29
|
+
- **Do** give every Slider a visible [Label](?path=/docs/primitives-label--docs).
|
|
30
|
+
- **Do** show the current value next to the Slider when it matters.
|
|
31
|
+
- **Don't** use a Slider for small sets of discrete options.
|
|
32
|
+
|
|
33
|
+
## Behavior
|
|
34
|
+
|
|
35
|
+
- Arrow keys move the focused thumb by one `step`, and Page Up and Page Down move it in larger increments.
|
|
36
|
+
- Set `orientation="vertical"` for a vertical Slider.
|
|
37
|
+
- `disabled` blocks all interaction and dims the track and thumbs.
|
|
38
|
+
|
|
39
|
+
## Often used with
|
|
40
|
+
|
|
41
|
+
[Label](?path=/docs/primitives-label--docs), [Helper Text](?path=/docs/primitives-helper-text--docs), and an adjacent [Input](?path=/docs/primitives-input--docs) for precise numeric entry.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Use a Switch to turn a setting on or off, with the change taking effect immediately.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- Toggling a setting that takes immediate effect, such as dark mode or notifications.
|
|
6
|
+
|
|
7
|
+
## When to use something else
|
|
8
|
+
|
|
9
|
+
- Use a [Checkbox](?path=/docs/primitives-checkbox--docs) or [Button](?path=/docs/primitives-button--docs) when the change depends on a form and is applied later.
|
|
10
|
+
- Use a [Button](?path=/docs/primitives-button--docs) for one-time or destructive actions.
|
|
11
|
+
- Use a Toggle Group, [Checkbox](?path=/docs/primitives-checkbox--docs), or [Select](?path=/docs/primitives-select--docs) when multiple related toggles need grouping.
|
|
12
|
+
|
|
13
|
+
## Dos and don'ts
|
|
14
|
+
|
|
15
|
+
- **Do** give every Switch a clear, descriptive label that explains what it controls.
|
|
16
|
+
- **Don't** embed Switches inside a [Menu](?path=/docs/primitives-dropdown-menu--docs); use menu checkmarks instead.
|
|
17
|
+
- **Don't** use a Switch for destructive actions.
|
|
18
|
+
|
|
19
|
+
## Behavior
|
|
20
|
+
|
|
21
|
+
- A Switch responds instantly, without a separate form submission.
|
|
22
|
+
- Connect the label to the Switch with `htmlFor` and `id`, or give the Switch an `aria-label` when there is no visible label.
|
|
23
|
+
|
|
24
|
+
## Often used with
|
|
25
|
+
|
|
26
|
+
[Label](?path=/docs/primitives-label--docs) and helper text.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
Use a Textarea for extended, free-form, multi-line input such as comments, feedback, messages, descriptions, or notes.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- Multi-line text is expected, such as comments, notes, bios, or explanations.
|
|
6
|
+
- Editing large chunks of existing text.
|
|
7
|
+
|
|
8
|
+
## When to use something else
|
|
9
|
+
|
|
10
|
+
- Use an [Input](?path=/docs/primitives-input--docs) when a single line of text is enough.
|
|
11
|
+
- Use an [Input](?path=/docs/primitives-input--docs), [Date Picker](?path=/docs/primitives-datepicker--docs), [Select](?path=/docs/primitives-select--docs), or [Combobox](?path=/docs/primitives-combobox--docs) when structured data is expected.
|
|
12
|
+
- Use a rich-text editor when formatting is needed.
|
|
13
|
+
- Use [Prompt Input](?path=/docs/ai-prompt-input--docs) for messages sent to an AI assistant.
|
|
14
|
+
|
|
15
|
+
## Content
|
|
16
|
+
|
|
17
|
+
- Give every Textarea a visible [Label](?path=/docs/primitives-label--docs).
|
|
18
|
+
- Keep placeholder text concise and use it for an example, not instructions the user needs later.
|
|
19
|
+
- Show a character count in helper text when there is a length limit.
|
|
20
|
+
|
|
21
|
+
## Sizing
|
|
22
|
+
|
|
23
|
+
- A Textarea starts at a minimum height and grows with its content.
|
|
24
|
+
- Resizing by the user is disabled by default.
|
|
25
|
+
- Set a maximum height with `className` when the Textarea sits in a constrained layout, so long content scrolls instead of pushing the layout.
|
|
26
|
+
|
|
27
|
+
## Dos and don'ts
|
|
28
|
+
|
|
29
|
+
- **Do** use concise labels and placeholder text.
|
|
30
|
+
- **Do** let content scroll when it exceeds the maximum height.
|
|
31
|
+
- **Don't** set a small fixed height when lengthy input is expected.
|
|
32
|
+
- **Don't** pre-fill the Textarea with default text users might overlook.
|
|
33
|
+
|
|
34
|
+
## States
|
|
35
|
+
|
|
36
|
+
- Set `aria-invalid` and show error helper text below the Textarea when the value is invalid.
|
|
37
|
+
- Set `disabled`, with `data-disabled="true"` on the field wrapper, when the field is unavailable.
|
|
38
|
+
- Set `readOnly` when users need to read or copy the text but not change it.
|
|
39
|
+
|
|
40
|
+
## Often used with
|
|
41
|
+
|
|
42
|
+
[Label](?path=/docs/primitives-label--docs) and [Helper Text](?path=/docs/primitives-helper-text--docs), optionally with a character count.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
Use a Toggle for a single pressable button that turns one option or formatting command on or off.
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
- A single binary option needs a visible pressed or unpressed state, such as bold text or mute.
|
|
6
|
+
- A filter in a [Toolbar](?path=/docs/primitives-toolbar--docs) can be switched on or off and benefits from a count of matching items.
|
|
7
|
+
|
|
8
|
+
## When to use something else
|
|
9
|
+
|
|
10
|
+
- Use a Toggle Group when two to four related Toggles belong together.
|
|
11
|
+
- Use a [Switch](?path=/docs/primitives-switch--docs) when the change takes immediate app-level effect.
|
|
12
|
+
- Use a [Button](?path=/docs/primitives-button--docs) for a one-time command.
|
|
13
|
+
|
|
14
|
+
## Content
|
|
15
|
+
|
|
16
|
+
- Pass an icon as children for an icon-only Toggle, and give it an `aria-label`.
|
|
17
|
+
- Use the `icon`, `label`, and `count` props for a composed Toggle with text and an optional count.
|
|
18
|
+
- Keep labels to one or two words.
|
|
19
|
+
|
|
20
|
+
## Sizes
|
|
21
|
+
|
|
22
|
+
- `sm` is 28px tall, `lg` is 32px, and `default` is 36px.
|
|
23
|
+
- Match the size of neighbouring controls in the same toolbar.
|
|
24
|
+
|
|
25
|
+
## Dos and don'ts
|
|
26
|
+
|
|
27
|
+
- **Do** pair icon-only Toggles with a [Tooltip](?path=/docs/primitives-tooltip--docs).
|
|
28
|
+
- **Do** use `defaultPressed` for uncontrolled usage, or `pressed` with `onPressedChange` when the state lives elsewhere.
|
|
29
|
+
- **Don't** change a Toggle's label when it is pressed; the pressed style already shows the state.
|
|
30
|
+
|
|
31
|
+
## Behavior
|
|
32
|
+
|
|
33
|
+
- Clicking or pressing Space or Enter flips the pressed state.
|
|
34
|
+
- The pressed state is exposed to assistive technology through `aria-pressed`.
|
|
35
|
+
- `disabled` blocks all pointer and keyboard interaction.
|
|
36
|
+
|
|
37
|
+
## Often used with
|
|
38
|
+
|
|
39
|
+
[Toolbar](?path=/docs/primitives-toolbar--docs), [Tooltip](?path=/docs/primitives-tooltip--docs) for icon-only Toggles, and Toggle Group.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
Use a Tooltip to show a short hint when a user hovers over or focuses an element.
|
|
2
|
+
Tooltips hold no interactive content.
|
|
3
|
+
|
|
4
|
+
## When to use
|
|
5
|
+
|
|
6
|
+
- Clarifying a control or icon in one line or sentence.
|
|
7
|
+
- Naming an icon-only [Button](?path=/docs/primitives-button--docs) or [Toggle](?path=/docs/primitives-toggle--docs).
|
|
8
|
+
- Showing the full text of a truncated label, for example in a [Breadcrumb](?path=/docs/primitives-breadcrumb--docs).
|
|
9
|
+
|
|
10
|
+
## When to use something else
|
|
11
|
+
|
|
12
|
+
- Show content that is essential to the task inline, or in a [Dialog](?path=/docs/primitives-dialog--docs).
|
|
13
|
+
- Use a [Popover](?path=/docs/primitives-popover--docs) when users need to interact with the content.
|
|
14
|
+
- Use a [Hover Card](?path=/docs/primitives-hover-card--docs) for a richer preview of a linked item.
|
|
15
|
+
- Use [Helper Text](?path=/docs/primitives-helper-text--docs) to explain a form field.
|
|
16
|
+
|
|
17
|
+
## Content
|
|
18
|
+
|
|
19
|
+
- Keep Tooltip text to a single short sentence.
|
|
20
|
+
- Don't repeat the trigger's visible label.
|
|
21
|
+
|
|
22
|
+
## Placement
|
|
23
|
+
|
|
24
|
+
- Tooltips appear above the trigger by default.
|
|
25
|
+
- Set `side` on `TooltipContent` to `right`, `bottom`, or `left` when the top would cover important content or the screen edge.
|
|
26
|
+
|
|
27
|
+
## Dos and don'ts
|
|
28
|
+
|
|
29
|
+
- **Do** wrap the app or view in a single `TooltipProvider` so Tooltips share an open delay.
|
|
30
|
+
- **Do** attach Tooltips to focusable triggers, so keyboard users can reach them.
|
|
31
|
+
- **Don't** put links, buttons, or form controls inside a Tooltip.
|
|
32
|
+
- **Don't** put a Tooltip on a disabled control; explain why it is disabled inline instead.
|
|
33
|
+
|
|
34
|
+
## Behavior
|
|
35
|
+
|
|
36
|
+
- Inside a `TooltipProvider`, a Tooltip opens after a 300ms hover delay, which `delayDuration` changes, or immediately on keyboard focus.
|
|
37
|
+
- It closes when the pointer leaves the trigger, the trigger loses focus, or the user presses Escape.
|
|
38
|
+
|
|
39
|
+
## Often used with
|
|
40
|
+
|
|
41
|
+
Icon-only [Buttons](?path=/docs/primitives-button--docs), [Toggle](?path=/docs/primitives-toggle--docs), [Breadcrumb](?path=/docs/primitives-breadcrumb--docs), and [Label](?path=/docs/primitives-label--docs).
|