@usefragments/ui 1.6.0 → 2.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/README.md +54 -66
- package/dist/assets/fragments-wordmark.cjs +2 -2
- package/dist/assets/fragments-wordmark.d.ts.map +1 -1
- package/dist/assets/fragments-wordmark.js +2 -2
- package/dist/assets/nav-glyph.cjs +139 -0
- package/dist/assets/nav-glyph.d.ts +28 -0
- package/dist/assets/nav-glyph.d.ts.map +1 -0
- package/dist/assets/nav-glyph.js +139 -0
- package/dist/assets/nav-glyph.module.scss.cjs +71 -0
- package/dist/assets/nav-glyph.module.scss.js +71 -0
- package/dist/assets/ui.css +6885 -6308
- package/dist/blocks/components/StatsCard.d.ts +1 -1
- package/dist/blocks/components/StatsCard.d.ts.map +1 -1
- package/dist/chart.cjs +24 -6
- package/dist/chart.js +24 -6
- package/dist/codeblock.cjs +76 -43
- package/dist/codeblock.js +71 -38
- package/dist/colorpicker.cjs +4 -1
- package/dist/colorpicker.js +4 -1
- package/dist/components/Accordion/Accordion.module.scss.cjs +8 -8
- package/dist/components/Accordion/Accordion.module.scss.js +8 -8
- package/dist/components/Alert/Alert.module.scss.cjs +23 -20
- package/dist/components/Alert/Alert.module.scss.js +23 -20
- package/dist/components/Alert/index.cjs +20 -8
- package/dist/components/Alert/index.d.ts +17 -11
- package/dist/components/Alert/index.d.ts.map +1 -1
- package/dist/components/Alert/index.js +20 -8
- package/dist/components/AppShell/AppShell.module.scss.cjs +14 -14
- package/dist/components/AppShell/AppShell.module.scss.js +14 -14
- package/dist/components/AppShell/index.cjs +2 -2
- package/dist/components/AppShell/index.js +2 -2
- package/dist/components/Avatar/Avatar.module.scss.cjs +14 -14
- package/dist/components/Avatar/Avatar.module.scss.js +14 -14
- package/dist/components/Badge/Badge.module.scss.cjs +33 -31
- package/dist/components/Badge/Badge.module.scss.js +33 -31
- package/dist/components/Badge/index.cjs +13 -3
- package/dist/components/Badge/index.d.ts +18 -13
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Badge/index.js +13 -3
- package/dist/components/BentoGrid/BentoGrid.module.scss.cjs +14 -14
- package/dist/components/BentoGrid/BentoGrid.module.scss.js +14 -14
- package/dist/components/Box/Box.module.scss.cjs +152 -152
- package/dist/components/Box/Box.module.scss.js +152 -152
- package/dist/components/Box/index.cjs +64 -75
- package/dist/components/Box/index.d.ts +16 -16
- package/dist/components/Box/index.d.ts.map +1 -1
- package/dist/components/Box/index.js +64 -75
- package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.cjs +11 -8
- package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.js +11 -8
- package/dist/components/Breadcrumbs/index.cjs +1 -1
- package/dist/components/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/index.js +1 -1
- package/dist/components/Button/Button.module.scss.cjs +36 -27
- package/dist/components/Button/Button.module.scss.js +36 -27
- package/dist/components/Button/index.cjs +20 -4
- package/dist/components/Button/index.d.ts +18 -10
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +20 -4
- package/dist/components/ButtonGroup/ButtonGroup.module.scss.cjs +15 -15
- package/dist/components/ButtonGroup/ButtonGroup.module.scss.js +15 -15
- package/dist/components/Card/Card.module.scss.cjs +31 -26
- package/dist/components/Card/Card.module.scss.js +32 -27
- package/dist/components/Card/index.cjs +16 -3
- package/dist/components/Card/index.d.ts +23 -15
- package/dist/components/Card/index.d.ts.map +1 -1
- package/dist/components/Card/index.js +16 -3
- package/dist/components/Chart/Chart.module.scss.cjs +15 -15
- package/dist/components/Chart/Chart.module.scss.js +15 -15
- package/dist/components/Chart/index.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.module.scss.cjs +11 -11
- package/dist/components/Checkbox/Checkbox.module.scss.js +11 -11
- package/dist/components/Checkbox/index.cjs +4 -4
- package/dist/components/Checkbox/index.d.ts +4 -6
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.js +4 -4
- package/dist/components/Chip/Chip.module.scss.cjs +19 -19
- package/dist/components/Chip/Chip.module.scss.js +19 -19
- package/dist/components/Chip/index.cjs +3 -3
- package/dist/components/Chip/index.d.ts +8 -3
- package/dist/components/Chip/index.d.ts.map +1 -1
- package/dist/components/Chip/index.js +3 -3
- package/dist/components/CodeBlock/CodeBlock.module.scss.cjs +26 -23
- package/dist/components/CodeBlock/CodeBlock.module.scss.js +26 -23
- package/dist/components/CodeBlock/css-variables-theme.cjs +98 -0
- package/dist/components/CodeBlock/css-variables-theme.d.ts +27 -0
- package/dist/components/CodeBlock/css-variables-theme.d.ts.map +1 -0
- package/dist/components/CodeBlock/css-variables-theme.js +98 -0
- package/dist/components/CodeBlock/index.d.ts +20 -5
- package/dist/components/CodeBlock/index.d.ts.map +1 -1
- package/dist/components/Collapsible/Collapsible.module.scss.cjs +9 -9
- package/dist/components/Collapsible/Collapsible.module.scss.js +9 -9
- package/dist/components/ColorPicker/ColorPicker.module.scss.cjs +14 -14
- package/dist/components/ColorPicker/ColorPicker.module.scss.js +14 -14
- package/dist/components/ColorPicker/index.d.ts.map +1 -1
- package/dist/components/Combobox/Combobox.module.scss.cjs +21 -21
- package/dist/components/Combobox/Combobox.module.scss.js +21 -21
- package/dist/components/Combobox/index.cjs +26 -6
- package/dist/components/Combobox/index.d.ts.map +1 -1
- package/dist/components/Combobox/index.js +26 -6
- package/dist/components/Command/Command.module.scss.cjs +14 -11
- package/dist/components/Command/Command.module.scss.js +14 -11
- package/dist/components/Command/index.cjs +28 -16
- package/dist/components/Command/index.d.ts +8 -3
- package/dist/components/Command/index.d.ts.map +1 -1
- package/dist/components/Command/index.js +28 -16
- package/dist/components/ConversationList/ConversationList.module.scss.cjs +10 -10
- package/dist/components/ConversationList/ConversationList.module.scss.js +10 -10
- package/dist/components/ConversationList/index.cjs +2 -2
- package/dist/components/ConversationList/index.js +2 -2
- package/dist/components/DataTable/DataTable.icons.cjs +6 -33
- package/dist/components/DataTable/DataTable.icons.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.icons.js +6 -33
- package/dist/components/DataTable/DataTable.module.scss.cjs +31 -28
- package/dist/components/DataTable/DataTable.module.scss.js +31 -28
- package/dist/components/DataTable/DataTable.virtual.d.ts.map +1 -1
- package/dist/components/DataTable/index.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.module.scss.cjs +33 -33
- package/dist/components/DatePicker/DatePicker.module.scss.js +33 -33
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.module.scss.cjs +14 -14
- package/dist/components/Dialog/Dialog.module.scss.js +14 -14
- package/dist/components/Dialog/index.cjs +13 -16
- package/dist/components/Dialog/index.d.ts +11 -10
- package/dist/components/Dialog/index.d.ts.map +1 -1
- package/dist/components/Dialog/index.js +13 -16
- package/dist/components/Drawer/Drawer.module.scss.cjs +39 -39
- package/dist/components/Drawer/Drawer.module.scss.js +40 -40
- package/dist/components/Drawer/index.cjs +2 -2
- package/dist/components/Drawer/index.d.ts +5 -4
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.js +2 -2
- package/dist/components/Editor/Editor.module.scss.cjs +17 -17
- package/dist/components/Editor/Editor.module.scss.js +17 -17
- package/dist/components/Editor/index.d.ts +10 -10
- package/dist/components/Editor/index.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.module.scss.cjs +11 -8
- package/dist/components/EmptyState/EmptyState.module.scss.js +11 -8
- package/dist/components/EmptyState/index.cjs +13 -6
- package/dist/components/EmptyState/index.d.ts +13 -5
- package/dist/components/EmptyState/index.d.ts.map +1 -1
- package/dist/components/EmptyState/index.js +13 -6
- package/dist/components/Field/Field.module.scss.cjs +5 -5
- package/dist/components/Field/Field.module.scss.js +5 -5
- package/dist/components/Field/index.cjs +9 -1
- package/dist/components/Field/index.d.ts.map +1 -1
- package/dist/components/Field/index.js +9 -1
- package/dist/components/Fieldset/Fieldset.module.scss.cjs +3 -3
- package/dist/components/Fieldset/Fieldset.module.scss.js +3 -3
- package/dist/components/Grid/Grid.module.scss.cjs +54 -54
- package/dist/components/Grid/Grid.module.scss.js +54 -54
- package/dist/components/Grid/index.cjs +1 -1
- package/dist/components/Grid/index.js +1 -1
- package/dist/components/Header/Header.module.scss.cjs +33 -33
- package/dist/components/Header/Header.module.scss.js +33 -33
- package/dist/components/Header/index.cjs +17 -38
- package/dist/components/Header/index.d.ts +15 -11
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +17 -38
- package/dist/components/Icon/Icon.module.scss.cjs +30 -33
- package/dist/components/Icon/Icon.module.scss.js +30 -33
- package/dist/components/Icon/index.cjs +15 -14
- package/dist/components/Icon/index.d.ts +23 -12
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/Icon/index.js +15 -14
- package/dist/components/IconButton/IconButton.module.scss.cjs +12 -12
- package/dist/components/IconButton/IconButton.module.scss.js +12 -12
- package/dist/components/IconButton/index.cjs +2 -1
- package/dist/components/IconButton/index.d.ts +4 -4
- package/dist/components/IconButton/index.d.ts.map +1 -1
- package/dist/components/IconButton/index.js +2 -1
- package/dist/components/Image/Image.module.scss.cjs +27 -27
- package/dist/components/Image/Image.module.scss.js +27 -27
- package/dist/components/Input/Input.module.scss.cjs +15 -21
- package/dist/components/Input/Input.module.scss.js +15 -21
- package/dist/components/Input/index.cjs +2 -14
- package/dist/components/Input/index.d.ts +0 -2
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Input/index.js +2 -14
- package/dist/components/Link/Link.module.scss.cjs +26 -14
- package/dist/components/Link/Link.module.scss.js +26 -14
- package/dist/components/Link/index.cjs +13 -2
- package/dist/components/Link/index.d.ts +11 -4
- package/dist/components/Link/index.d.ts.map +1 -1
- package/dist/components/Link/index.js +13 -2
- package/dist/components/List/List.module.scss.cjs +23 -19
- package/dist/components/List/List.module.scss.js +23 -19
- package/dist/components/List/index.cjs +7 -7
- package/dist/components/List/index.d.ts +10 -7
- package/dist/components/List/index.d.ts.map +1 -1
- package/dist/components/List/index.js +7 -7
- package/dist/components/Listbox/Listbox.module.scss.cjs +8 -8
- package/dist/components/Listbox/Listbox.module.scss.js +8 -8
- package/dist/components/Loading/Loading.module.scss.cjs +34 -34
- package/dist/components/Loading/Loading.module.scss.js +34 -34
- package/dist/components/Loading/index.cjs +5 -5
- package/dist/components/Loading/index.d.ts +8 -7
- package/dist/components/Loading/index.d.ts.map +1 -1
- package/dist/components/Loading/index.js +5 -5
- package/dist/components/Markdown/Markdown.module.scss.cjs +1 -1
- package/dist/components/Markdown/Markdown.module.scss.js +1 -1
- package/dist/components/Markdown/index.d.ts +2 -2
- package/dist/components/Markdown/index.d.ts.map +1 -1
- package/dist/components/Menu/Menu.module.scss.cjs +14 -14
- package/dist/components/Menu/Menu.module.scss.js +14 -14
- package/dist/components/Message/Message.module.scss.cjs +20 -20
- package/dist/components/Message/Message.module.scss.js +20 -20
- package/dist/components/Message/index.cjs +1 -1
- package/dist/components/Message/index.d.ts +1 -1
- package/dist/components/Message/index.js +1 -1
- package/dist/components/NavigationMenu/NavigationMenu.module.scss.cjs +34 -31
- package/dist/components/NavigationMenu/NavigationMenu.module.scss.js +34 -31
- package/dist/components/NavigationMenu/index.cjs +32 -15
- package/dist/components/NavigationMenu/index.d.ts +12 -6
- package/dist/components/NavigationMenu/index.d.ts.map +1 -1
- package/dist/components/NavigationMenu/index.js +32 -15
- package/dist/components/Pagination/Pagination.module.scss.cjs +10 -10
- package/dist/components/Pagination/Pagination.module.scss.js +10 -10
- package/dist/components/Popover/Popover.module.scss.cjs +10 -10
- package/dist/components/Popover/Popover.module.scss.js +10 -10
- package/dist/components/Progress/Progress.module.scss.cjs +28 -25
- package/dist/components/Progress/Progress.module.scss.js +28 -25
- package/dist/components/Progress/index.cjs +21 -12
- package/dist/components/Progress/index.d.ts +10 -6
- package/dist/components/Progress/index.d.ts.map +1 -1
- package/dist/components/Progress/index.js +21 -12
- package/dist/components/Prompt/Prompt.module.scss.cjs +30 -30
- package/dist/components/Prompt/Prompt.module.scss.js +30 -30
- package/dist/components/Prompt/index.cjs +7 -7
- package/dist/components/Prompt/index.d.ts +11 -9
- package/dist/components/Prompt/index.d.ts.map +1 -1
- package/dist/components/Prompt/index.js +7 -7
- package/dist/components/RadioGroup/RadioGroup.module.scss.cjs +20 -17
- package/dist/components/RadioGroup/RadioGroup.module.scss.js +20 -17
- package/dist/components/RadioGroup/index.cjs +10 -5
- package/dist/components/RadioGroup/index.d.ts +11 -7
- package/dist/components/RadioGroup/index.d.ts.map +1 -1
- package/dist/components/RadioGroup/index.js +10 -5
- package/dist/components/ScrollArea/ScrollArea.module.scss.cjs +5 -5
- package/dist/components/ScrollArea/ScrollArea.module.scss.js +5 -5
- package/dist/components/ScrollArea/index.d.ts +4 -4
- package/dist/components/ScrollArea/index.d.ts.map +1 -1
- package/dist/components/ScrollArea/scroll-state.d.ts +5 -5
- package/dist/components/Select/Select.module.scss.cjs +21 -21
- package/dist/components/Select/Select.module.scss.js +21 -21
- package/dist/components/Select/index.cjs +26 -20
- package/dist/components/Select/index.d.ts +5 -5
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +26 -20
- package/dist/components/Separator/Separator.module.scss.cjs +25 -19
- package/dist/components/Separator/Separator.module.scss.js +25 -19
- package/dist/components/Separator/index.cjs +10 -8
- package/dist/components/Separator/index.d.ts +4 -2
- package/dist/components/Separator/index.d.ts.map +1 -1
- package/dist/components/Separator/index.js +10 -8
- package/dist/components/Sidebar/Sidebar.module.scss.cjs +43 -43
- package/dist/components/Sidebar/Sidebar.module.scss.js +43 -43
- package/dist/components/Sidebar/index.cjs +15 -38
- package/dist/components/Sidebar/index.d.ts +19 -19
- package/dist/components/Sidebar/index.d.ts.map +1 -1
- package/dist/components/Sidebar/index.js +15 -38
- package/dist/components/Skeleton/Skeleton.module.scss.cjs +50 -46
- package/dist/components/Skeleton/Skeleton.module.scss.js +50 -46
- package/dist/components/Skeleton/index.cjs +7 -7
- package/dist/components/Skeleton/index.d.ts +8 -7
- package/dist/components/Skeleton/index.d.ts.map +1 -1
- package/dist/components/Skeleton/index.js +7 -7
- package/dist/components/Slider/Slider.module.scss.cjs +12 -12
- package/dist/components/Slider/Slider.module.scss.js +12 -12
- package/dist/components/Stack/Stack.module.scss.cjs +25 -25
- package/dist/components/Stack/Stack.module.scss.js +25 -25
- package/dist/components/Stack/index.cjs +1 -1
- package/dist/components/Stack/index.js +1 -1
- package/dist/components/Switch/Switch.module.scss.cjs +9 -9
- package/dist/components/Switch/Switch.module.scss.js +9 -9
- package/dist/components/Table/Table.module.scss.cjs +19 -19
- package/dist/components/Table/Table.module.scss.js +19 -19
- package/dist/components/TableOfContents/TableOfContents.module.scss.cjs +15 -15
- package/dist/components/TableOfContents/TableOfContents.module.scss.js +15 -15
- package/dist/components/TableOfContents/index.cjs +14 -10
- package/dist/components/TableOfContents/index.d.ts +5 -3
- package/dist/components/TableOfContents/index.d.ts.map +1 -1
- package/dist/components/TableOfContents/index.js +14 -10
- package/dist/components/Tabs/Tabs.module.scss.cjs +18 -18
- package/dist/components/Tabs/Tabs.module.scss.js +18 -18
- package/dist/components/Tabs/index.cjs +30 -11
- package/dist/components/Tabs/index.d.ts +8 -6
- package/dist/components/Tabs/index.d.ts.map +1 -1
- package/dist/components/Tabs/index.js +30 -11
- package/dist/components/Text/Text.module.scss.cjs +109 -97
- package/dist/components/Text/Text.module.scss.js +109 -97
- package/dist/components/Text/index.cjs +45 -41
- package/dist/components/Text/index.d.ts +24 -19
- package/dist/components/Text/index.d.ts.map +1 -1
- package/dist/components/Text/index.js +45 -41
- package/dist/components/Textarea/Textarea.module.scss.cjs +22 -28
- package/dist/components/Textarea/Textarea.module.scss.js +22 -28
- package/dist/components/Textarea/index.cjs +3 -10
- package/dist/components/Textarea/index.d.ts +0 -2
- package/dist/components/Textarea/index.d.ts.map +1 -1
- package/dist/components/Textarea/index.js +3 -10
- package/dist/components/Theme/index.cjs +22 -5
- package/dist/components/Theme/index.d.ts +6 -12
- package/dist/components/Theme/index.d.ts.map +1 -1
- package/dist/components/Theme/index.js +22 -5
- package/dist/components/ThemeToggle/ThemeButton.cjs +51 -0
- package/dist/components/ThemeToggle/ThemeButton.d.ts +16 -0
- package/dist/components/ThemeToggle/ThemeButton.d.ts.map +1 -0
- package/dist/components/ThemeToggle/ThemeButton.js +34 -0
- package/dist/components/ThemeToggle/ThemeToggle.module.scss.cjs +6 -6
- package/dist/components/ThemeToggle/ThemeToggle.module.scss.js +6 -6
- package/dist/components/ThemeToggle/icons.cjs +48 -0
- package/dist/components/ThemeToggle/icons.d.ts +10 -0
- package/dist/components/ThemeToggle/icons.d.ts.map +1 -0
- package/dist/components/ThemeToggle/icons.js +48 -0
- package/dist/components/ThemeToggle/index.cjs +6 -50
- package/dist/components/ThemeToggle/index.d.ts +5 -3
- package/dist/components/ThemeToggle/index.d.ts.map +1 -1
- package/dist/components/ThemeToggle/index.js +3 -47
- package/dist/components/ThinkingIndicator/ThinkingIndicator.module.scss.cjs +18 -15
- package/dist/components/ThinkingIndicator/ThinkingIndicator.module.scss.js +18 -15
- package/dist/components/ThinkingIndicator/index.cjs +7 -8
- package/dist/components/ThinkingIndicator/index.d.ts +6 -5
- package/dist/components/ThinkingIndicator/index.d.ts.map +1 -1
- package/dist/components/ThinkingIndicator/index.js +7 -8
- package/dist/components/Toast/Toast.module.scss.cjs +28 -29
- package/dist/components/Toast/Toast.module.scss.js +29 -30
- package/dist/components/Toast/index.cjs +28 -30
- package/dist/components/Toast/index.d.ts +9 -8
- package/dist/components/Toast/index.d.ts.map +1 -1
- package/dist/components/Toast/index.js +28 -30
- package/dist/components/ToggleGroup/ToggleGroup.module.scss.cjs +21 -19
- package/dist/components/ToggleGroup/ToggleGroup.module.scss.js +22 -20
- package/dist/components/ToggleGroup/index.cjs +4 -5
- package/dist/components/ToggleGroup/index.d.ts +7 -6
- package/dist/components/ToggleGroup/index.d.ts.map +1 -1
- package/dist/components/ToggleGroup/index.js +4 -5
- package/dist/components/Tooltip/Tooltip.module.scss.cjs +3 -3
- package/dist/components/Tooltip/Tooltip.module.scss.js +3 -3
- package/dist/components/Tooltip/index.cjs +24 -40
- package/dist/components/Tooltip/index.d.ts +4 -4
- package/dist/components/Tooltip/index.d.ts.map +1 -1
- package/dist/components/Tooltip/index.js +24 -40
- package/dist/components/VisuallyHidden/VisuallyHidden.module.scss.cjs +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.module.scss.js +1 -1
- package/dist/components/VisuallyHidden/index.d.ts +2 -2
- package/dist/data-table-virtual.cjs +3 -2
- package/dist/data-table-virtual.js +3 -2
- package/dist/data-table.cjs +3 -2
- package/dist/data-table.js +3 -2
- package/dist/datepicker.cjs +26 -13
- package/dist/datepicker.js +26 -13
- package/dist/editor.cjs +68 -28
- package/dist/editor.js +68 -28
- package/dist/index.cjs +6 -2
- package/dist/index.d.ts +9 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -4
- package/dist/markdown.cjs +21 -29
- package/dist/markdown.js +21 -29
- package/dist/measurements/generated.cjs +46 -94
- package/dist/measurements/generated.d.ts +44 -92
- package/dist/measurements/generated.d.ts.map +1 -1
- package/dist/measurements/generated.js +46 -94
- package/dist/measurements/index.d.ts +1 -1
- package/dist/measurements/index.d.ts.map +1 -1
- package/dist/utils/a11y.cjs +5 -2
- package/dist/utils/a11y.d.ts +5 -5
- package/dist/utils/a11y.d.ts.map +1 -1
- package/dist/utils/a11y.js +5 -2
- package/dist/utils/canonical-stamp.cjs +2 -8
- package/dist/utils/canonical-stamp.d.ts.map +1 -1
- package/dist/utils/canonical-stamp.js +1 -7
- package/dist/utils/css-warning.cjs +1 -1
- package/dist/utils/css-warning.js +1 -1
- package/dist/utils/env.cjs +17 -0
- package/dist/utils/env.d.ts +3 -0
- package/dist/utils/env.d.ts.map +1 -0
- package/dist/utils/env.js +17 -0
- package/dist/utils/keyboard-shortcuts.cjs +3 -10
- package/dist/utils/keyboard-shortcuts.d.ts +4 -4
- package/dist/utils/keyboard-shortcuts.d.ts.map +1 -1
- package/dist/utils/keyboard-shortcuts.js +3 -10
- package/dist/utils/seed-derivation.cjs +10 -7
- package/dist/utils/seed-derivation.d.ts +1 -3
- package/dist/utils/seed-derivation.d.ts.map +1 -1
- package/dist/utils/seed-derivation.js +10 -7
- package/dist/utils/theme-presets.cjs +5 -10
- package/dist/utils/theme-presets.d.ts +1 -2
- package/dist/utils/theme-presets.d.ts.map +1 -1
- package/dist/utils/theme-presets.js +5 -10
- package/fragments.json +1 -1
- package/package.json +9 -10
- package/src/assets/fragments-logo.tsx +2 -2
- package/src/assets/fragments-wordmark.tsx +4 -2
- package/src/assets/nav-glyph.module.scss +166 -0
- package/src/assets/nav-glyph.tsx +188 -0
- package/src/components/Accordion/Accordion.contract.json +24 -48
- package/src/components/Accordion/Accordion.module.scss +5 -3
- package/src/components/Alert/Alert.contract.json +49 -65
- package/src/components/Alert/Alert.module.scss +57 -47
- package/src/components/Alert/index.tsx +72 -39
- package/src/components/AppShell/AppShell.contract.json +34 -51
- package/src/components/AppShell/AppShell.module.scss +99 -54
- package/src/components/AppShell/index.tsx +2 -2
- package/src/components/Avatar/Avatar.contract.json +31 -48
- package/src/components/Avatar/Avatar.module.scss +4 -2
- package/src/components/Badge/Badge.contract.json +86 -55
- package/src/components/Badge/Badge.module.scss +80 -48
- package/src/components/Badge/index.tsx +34 -17
- package/src/components/BentoGrid/BentoGrid.contract.json +21 -45
- package/src/components/BentoGrid/BentoGrid.module.scss +4 -8
- package/src/components/Box/Box.contract.json +40 -148
- package/src/components/Box/Box.module.scss +7 -6
- package/src/components/Box/index.tsx +92 -99
- package/src/components/Breadcrumbs/Breadcrumbs.contract.json +21 -34
- package/src/components/Breadcrumbs/Breadcrumbs.module.scss +27 -12
- package/src/components/Breadcrumbs/index.tsx +5 -1
- package/src/components/Button/Button.module.scss +261 -185
- package/src/components/Button/index.tsx +41 -28
- package/src/components/ButtonGroup/ButtonGroup.contract.json +34 -49
- package/src/components/ButtonGroup/ButtonGroup.module.scss +8 -6
- package/src/components/Card/Card.consumer-fixture.module.scss +5 -2
- package/src/components/Card/Card.module.scss +97 -76
- package/src/components/Card/index.tsx +44 -20
- package/src/components/Chart/Chart.contract.json +21 -29
- package/src/components/Chart/Chart.module.scss +6 -5
- package/src/components/Chart/index.tsx +36 -6
- package/src/components/Checkbox/Checkbox.contract.json +28 -27
- package/src/components/Checkbox/Checkbox.module.scss +47 -54
- package/src/components/Checkbox/index.tsx +10 -10
- package/src/components/Chip/Chip.contract.json +38 -45
- package/src/components/Chip/Chip.module.scss +24 -23
- package/src/components/Chip/index.tsx +12 -7
- package/src/components/CodeBlock/CodeBlock.contract.json +46 -76
- package/src/components/CodeBlock/CodeBlock.module.scss +75 -73
- package/src/components/CodeBlock/css-variables-theme.ts +102 -0
- package/src/components/CodeBlock/index.tsx +114 -51
- package/src/components/Collapsible/Collapsible.contract.json +21 -36
- package/src/components/Collapsible/Collapsible.module.scss +1 -7
- package/src/components/ColorPicker/ColorPicker.contract.json +29 -48
- package/src/components/ColorPicker/ColorPicker.module.scss +34 -24
- package/src/components/ColorPicker/index.tsx +6 -1
- package/src/components/Combobox/Combobox.contract.json +36 -37
- package/src/components/Combobox/Combobox.module.scss +16 -19
- package/src/components/Combobox/index.tsx +41 -6
- package/src/components/Command/Command.contract.json +28 -44
- package/src/components/Command/Command.module.scss +19 -21
- package/src/components/Command/index.tsx +64 -47
- package/src/components/ComponentDefaults/ComponentDefaults.contract.json +91 -0
- package/src/components/ConversationList/ConversationList.contract.json +27 -32
- package/src/components/ConversationList/ConversationList.module.scss +2 -3
- package/src/components/ConversationList/index.tsx +2 -2
- package/src/components/DataTable/DataTable.icons.tsx +4 -21
- package/src/components/DataTable/DataTable.module.scss +24 -17
- package/src/components/DataTable/DataTable.virtual.tsx +3 -2
- package/src/components/DataTable/index.tsx +9 -8
- package/src/components/DatePicker/DatePicker.contract.json +27 -28
- package/src/components/DatePicker/DatePicker.module.scss +41 -44
- package/src/components/DatePicker/index.tsx +23 -9
- package/src/components/Dialog/Dialog.module.scss +26 -32
- package/src/components/Dialog/index.tsx +51 -39
- package/src/components/Drawer/Drawer.contract.json +28 -42
- package/src/components/Drawer/Drawer.module.scss +123 -64
- package/src/components/Drawer/index.tsx +7 -5
- package/src/components/Editor/Editor.contract.json +32 -49
- package/src/components/Editor/Editor.module.scss +60 -25
- package/src/components/Editor/index.tsx +240 -179
- package/src/components/EmptyState/EmptyState.contract.json +33 -45
- package/src/components/EmptyState/EmptyState.module.scss +37 -21
- package/src/components/EmptyState/index.tsx +56 -23
- package/src/components/Field/Field.contract.json +28 -46
- package/src/components/Field/Field.module.scss +2 -1
- package/src/components/Field/index.tsx +5 -1
- package/src/components/Fieldset/Fieldset.contract.json +21 -38
- package/src/components/Fieldset/Fieldset.module.scss +15 -7
- package/src/components/Form/Form.contract.json +23 -23
- package/src/components/Grid/Grid.contract.json +28 -64
- package/src/components/Grid/Grid.module.scss +2 -2
- package/src/components/Grid/index.tsx +10 -10
- package/src/components/Header/Header.contract.json +31 -67
- package/src/components/Header/Header.module.scss +57 -54
- package/src/components/Header/index.tsx +134 -122
- package/src/components/Icon/Icon.contract.json +37 -81
- package/src/components/Icon/Icon.module.scss +13 -12
- package/src/components/Icon/index.tsx +31 -31
- package/src/components/IconButton/IconButton.contract.json +37 -21
- package/src/components/IconButton/IconButton.module.scss +19 -11
- package/src/components/IconButton/index.tsx +6 -5
- package/src/components/Image/Image.contract.json +23 -56
- package/src/components/Input/Input.contract.json +25 -44
- package/src/components/Input/Input.module.scss +6 -55
- package/src/components/Input/index.tsx +2 -18
- package/src/components/Link/Link.contract.json +46 -58
- package/src/components/Link/Link.module.scss +41 -10
- package/src/components/Link/index.tsx +27 -6
- package/src/components/List/List.contract.json +33 -62
- package/src/components/List/List.module.scss +10 -5
- package/src/components/List/index.tsx +17 -13
- package/src/components/Listbox/Listbox.contract.json +21 -37
- package/src/components/Listbox/Listbox.module.scss +14 -20
- package/src/components/Loading/Loading.contract.json +41 -65
- package/src/components/Loading/Loading.module.scss +37 -31
- package/src/components/Loading/index.tsx +15 -14
- package/src/components/Main/Main.contract.json +17 -9
- package/src/components/Markdown/Markdown.contract.json +22 -43
- package/src/components/Markdown/Markdown.module.scss +45 -6
- package/src/components/Markdown/index.tsx +48 -49
- package/src/components/Menu/Menu.contract.json +30 -46
- package/src/components/Menu/Menu.module.scss +32 -16
- package/src/components/Message/Message.contract.json +31 -54
- package/src/components/Message/Message.module.scss +18 -9
- package/src/components/Message/index.tsx +2 -2
- package/src/components/NavigationMenu/NavigationMenu.contract.json +36 -45
- package/src/components/NavigationMenu/NavigationMenu.module.scss +66 -66
- package/src/components/NavigationMenu/index.tsx +105 -81
- package/src/components/Pagination/Pagination.contract.json +22 -40
- package/src/components/Pagination/Pagination.module.scss +9 -16
- package/src/components/Popover/Popover.contract.json +28 -50
- package/src/components/Popover/Popover.module.scss +30 -28
- package/src/components/Progress/Progress.contract.json +39 -35
- package/src/components/Progress/Progress.module.scss +16 -10
- package/src/components/Progress/index.tsx +34 -16
- package/src/components/Prompt/Prompt.contract.json +40 -56
- package/src/components/Prompt/Prompt.module.scss +49 -48
- package/src/components/Prompt/index.tsx +17 -15
- package/src/components/RadioGroup/RadioGroup.contract.json +29 -28
- package/src/components/RadioGroup/RadioGroup.module.scss +50 -45
- package/src/components/RadioGroup/index.tsx +23 -10
- package/src/components/ScrollArea/ScrollArea.contract.json +18 -19
- package/src/components/ScrollArea/ScrollArea.module.scss +45 -48
- package/src/components/ScrollArea/index.tsx +16 -16
- package/src/components/ScrollArea/scroll-state.ts +24 -24
- package/src/components/Select/Select.module.scss +20 -19
- package/src/components/Select/index.tsx +26 -24
- package/src/components/Separator/Separator.contract.json +29 -53
- package/src/components/Separator/Separator.module.scss +24 -40
- package/src/components/Separator/index.tsx +16 -11
- package/src/components/Sidebar/Sidebar.contract.json +35 -67
- package/src/components/Sidebar/Sidebar.module.scss +94 -88
- package/src/components/Sidebar/index.tsx +167 -167
- package/src/components/Skeleton/Skeleton.contract.json +34 -60
- package/src/components/Skeleton/Skeleton.module.scss +50 -26
- package/src/components/Skeleton/index.tsx +16 -15
- package/src/components/Slider/Slider.contract.json +27 -39
- package/src/components/Slider/Slider.module.scss +9 -22
- package/src/components/Stack/Stack.contract.json +30 -57
- package/src/components/Stack/Stack.module.scss +26 -24
- package/src/components/Stack/index.tsx +3 -3
- package/src/components/Switch/Switch.contract.json +33 -46
- package/src/components/Switch/Switch.module.scss +106 -59
- package/src/components/Table/Table.contract.json +28 -46
- package/src/components/Table/Table.module.scss +24 -16
- package/src/components/TableOfContents/TableOfContents.contract.json +34 -21
- package/src/components/TableOfContents/TableOfContents.module.scss +17 -13
- package/src/components/TableOfContents/index.tsx +27 -10
- package/src/components/Tabs/Tabs.contract.json +35 -56
- package/src/components/Tabs/Tabs.module.scss +27 -31
- package/src/components/Tabs/index.tsx +30 -15
- package/src/components/Text/Text.contract.json +52 -72
- package/src/components/Text/Text.module.scss +34 -18
- package/src/components/Text/index.tsx +123 -83
- package/src/components/Textarea/Textarea.contract.json +24 -55
- package/src/components/Textarea/Textarea.module.scss +22 -52
- package/src/components/Textarea/index.tsx +3 -14
- package/src/components/Theme/Theme.contract.json +35 -53
- package/src/components/Theme/index.tsx +41 -13
- package/src/components/ThemeToggle/ThemeButton.tsx +49 -0
- package/src/components/ThemeToggle/ThemeToggle.module.scss +20 -27
- package/src/components/ThemeToggle/icons.tsx +46 -0
- package/src/components/ThemeToggle/index.tsx +9 -55
- package/src/components/ThinkingIndicator/ThinkingIndicator.contract.json +34 -50
- package/src/components/ThinkingIndicator/ThinkingIndicator.module.scss +9 -7
- package/src/components/ThinkingIndicator/index.tsx +12 -14
- package/src/components/Toast/Toast.contract.json +55 -49
- package/src/components/Toast/Toast.module.scss +50 -105
- package/src/components/Toast/index.tsx +39 -34
- package/src/components/ToggleGroup/ToggleGroup.contract.json +39 -40
- package/src/components/ToggleGroup/ToggleGroup.module.scss +30 -27
- package/src/components/ToggleGroup/index.tsx +11 -11
- package/src/components/Tooltip/Tooltip.contract.json +31 -52
- package/src/components/Tooltip/Tooltip.module.scss +16 -10
- package/src/components/Tooltip/index.tsx +19 -24
- package/src/components/VisuallyHidden/VisuallyHidden.contract.json +22 -44
- package/src/components/VisuallyHidden/VisuallyHidden.module.scss +4 -14
- package/src/components/VisuallyHidden/index.tsx +5 -5
- package/src/index.ts +16 -12
- package/src/measurements/MeasurementTargets.module.scss +6 -7
- package/src/measurements/generated.ts +46 -97
- package/src/measurements/index.ts +0 -1
- package/src/measurements/measurements.json +44 -116
- package/src/recipes/_action.scss +4 -4
- package/src/recipes/_boolean-range.scss +12 -16
- package/src/recipes/_feedback.scss +17 -16
- package/src/recipes/_field.scss +28 -16
- package/src/recipes/_layout.scss +14 -7
- package/src/recipes/_navigation.scss +84 -29
- package/src/recipes/_overlay.scss +143 -43
- package/src/recipes/_popup.scss +54 -34
- package/src/recipes/_prose.scss +48 -28
- package/src/recipes/_representation.scss +10 -9
- package/src/recipes/_segmented.scss +1 -1
- package/src/recipes/_table-chrome.scss +42 -17
- package/src/recipes/_target.scss +2 -4
- package/src/recipes/_typography.scss +10 -0
- package/src/scss.d.ts +1 -1
- package/src/styles/globals.scss +31 -25
- package/src/tokens/_component-properties.scss +19 -1
- package/src/tokens/_computed.scss +32 -49
- package/src/tokens/_derive.scss +112 -210
- package/src/tokens/_measurements.catalog.generated.css +62 -44
- package/src/tokens/_measurements.generated.scss +119 -249
- package/src/tokens/_mixins.scss +49 -48
- package/src/tokens/_palettes.scss +39 -167
- package/src/tokens/_property-registrations.scss +9 -0
- package/src/tokens/_seeds.scss +20 -31
- package/src/tokens/_variables.scss +251 -94
- package/src/utils/a11y.tsx +69 -69
- package/src/utils/aria.ts +3 -3
- package/src/utils/canonical-stamp.ts +2 -12
- package/src/utils/css-warning.ts +7 -7
- package/src/utils/env.ts +25 -0
- package/src/utils/keyboard-shortcuts.ts +131 -126
- package/src/utils/seed-derivation.ts +11 -14
- package/src/utils/theme-presets.ts +5 -12
- package/dist/blocks/AccountSettings.block.d.ts +0 -3
- package/dist/blocks/AccountSettings.block.d.ts.map +0 -1
- package/dist/blocks/ActivityFeedSkeleton.block.d.ts +0 -3
- package/dist/blocks/ActivityFeedSkeleton.block.d.ts.map +0 -1
- package/dist/blocks/BlogEditor.block.d.ts +0 -3
- package/dist/blocks/BlogEditor.block.d.ts.map +0 -1
- package/dist/blocks/ChatInterface.block.d.ts +0 -3
- package/dist/blocks/ChatInterface.block.d.ts.map +0 -1
- package/dist/blocks/ChatMessages.block.d.ts +0 -3
- package/dist/blocks/ChatMessages.block.d.ts.map +0 -1
- package/dist/blocks/CheckoutForm.block.d.ts +0 -3
- package/dist/blocks/CheckoutForm.block.d.ts.map +0 -1
- package/dist/blocks/CommandPalette.block.d.ts +0 -3
- package/dist/blocks/CommandPalette.block.d.ts.map +0 -1
- package/dist/blocks/ContactForm.block.d.ts +0 -3
- package/dist/blocks/ContactForm.block.d.ts.map +0 -1
- package/dist/blocks/DashboardPage.block.d.ts +0 -3
- package/dist/blocks/DashboardPage.block.d.ts.map +0 -1
- package/dist/blocks/DashboardSkeleton.block.d.ts +0 -3
- package/dist/blocks/DashboardSkeleton.block.d.ts.map +0 -1
- package/dist/blocks/DataTable.block.d.ts +0 -3
- package/dist/blocks/DataTable.block.d.ts.map +0 -1
- package/dist/blocks/EmptyState.block.d.ts +0 -3
- package/dist/blocks/EmptyState.block.d.ts.map +0 -1
- package/dist/blocks/FAQSection.block.d.ts +0 -3
- package/dist/blocks/FAQSection.block.d.ts.map +0 -1
- package/dist/blocks/FeatureGrid.block.d.ts +0 -3
- package/dist/blocks/FeatureGrid.block.d.ts.map +0 -1
- package/dist/blocks/HeroSection.block.d.ts +0 -3
- package/dist/blocks/HeroSection.block.d.ts.map +0 -1
- package/dist/blocks/NavigationHeader.block.d.ts +0 -3
- package/dist/blocks/NavigationHeader.block.d.ts.map +0 -1
- package/dist/blocks/PaginatedTable.block.d.ts +0 -3
- package/dist/blocks/PaginatedTable.block.d.ts.map +0 -1
- package/dist/blocks/PricingComparison.block.d.ts +0 -3
- package/dist/blocks/PricingComparison.block.d.ts.map +0 -1
- package/dist/blocks/ProductCard.block.d.ts +0 -3
- package/dist/blocks/ProductCard.block.d.ts.map +0 -1
- package/dist/blocks/RegistrationForm.block.d.ts +0 -3
- package/dist/blocks/RegistrationForm.block.d.ts.map +0 -1
- package/dist/blocks/SettingsDrawer.block.d.ts +0 -3
- package/dist/blocks/SettingsDrawer.block.d.ts.map +0 -1
- package/dist/blocks/SettingsPanel.block.d.ts +0 -3
- package/dist/blocks/SettingsPanel.block.d.ts.map +0 -1
- package/dist/blocks/ShoppingCart.block.d.ts +0 -3
- package/dist/blocks/ShoppingCart.block.d.ts.map +0 -1
- package/dist/blocks/StatsCardSkeleton.block.d.ts +0 -3
- package/dist/blocks/StatsCardSkeleton.block.d.ts.map +0 -1
- package/dist/blocks/TableSkeleton.block.d.ts +0 -3
- package/dist/blocks/TableSkeleton.block.d.ts.map +0 -1
- package/dist/blocks/ThinkingStates.block.d.ts +0 -3
- package/dist/blocks/ThinkingStates.block.d.ts.map +0 -1
- package/dist/components/Toggle/index.d.ts +0 -3
- package/dist/components/Toggle/index.d.ts.map +0 -1
- package/src/components/Button/Button.contract.json +0 -218
- package/src/components/Card/Card.contract.json +0 -175
- package/src/components/DataTable/DataTable.contract.json +0 -302
- package/src/components/Dialog/Dialog.contract.json +0 -159
- package/src/components/Select/Select.contract.json +0 -259
- package/src/components/Toggle/index.ts +0 -7
- package/src/tokens/_density.scss +0 -85
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://usefragments.com/schemas/contract.v1.json",
|
|
3
3
|
"name": "Icon",
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "Sizes and colours any icon so it lines up with the text beside it.",
|
|
5
5
|
"category": "display",
|
|
6
|
-
"tags": [
|
|
7
|
-
"icon",
|
|
8
|
-
"visual",
|
|
9
|
-
"symbol",
|
|
10
|
-
"graphic"
|
|
11
|
-
],
|
|
6
|
+
"tags": ["icon", "visual", "symbol", "graphic"],
|
|
12
7
|
"status": "stable",
|
|
13
8
|
"sourcePath": "src/components/Icon/index.tsx",
|
|
14
9
|
"exportName": "Icon",
|
|
@@ -17,8 +12,8 @@
|
|
|
17
12
|
"icon: union (required)",
|
|
18
13
|
"size: xs|sm|md|lg|xl (default: md)",
|
|
19
14
|
"weight: string (default: regular)",
|
|
20
|
-
"
|
|
21
|
-
"color: primary|secondary|tertiary
|
|
15
|
+
"tone: accent|info|success|warning|danger",
|
|
16
|
+
"color: primary|secondary|tertiary",
|
|
22
17
|
"iconProps: object"
|
|
23
18
|
],
|
|
24
19
|
"props": {
|
|
@@ -37,57 +32,26 @@
|
|
|
37
32
|
"description": "Icon size",
|
|
38
33
|
"default": "md",
|
|
39
34
|
"required": false,
|
|
40
|
-
"values": [
|
|
41
|
-
"xs",
|
|
42
|
-
"sm",
|
|
43
|
-
"md",
|
|
44
|
-
"lg",
|
|
45
|
-
"xl"
|
|
46
|
-
]
|
|
35
|
+
"values": ["xs", "sm", "md", "lg", "xl"]
|
|
47
36
|
},
|
|
48
37
|
"weight": {
|
|
49
38
|
"type": "string",
|
|
50
39
|
"description": "Optional icon style/weight hint (forwarded when supported by the icon component)",
|
|
51
40
|
"default": "regular",
|
|
52
41
|
"required": false,
|
|
53
|
-
"values": [
|
|
54
|
-
"thin",
|
|
55
|
-
"light",
|
|
56
|
-
"regular",
|
|
57
|
-
"bold",
|
|
58
|
-
"fill",
|
|
59
|
-
"duotone"
|
|
60
|
-
]
|
|
42
|
+
"values": ["thin", "light", "regular", "bold", "fill", "duotone"]
|
|
61
43
|
},
|
|
62
|
-
"
|
|
44
|
+
"tone": {
|
|
63
45
|
"type": "enum",
|
|
64
|
-
"description": "Semantic
|
|
65
|
-
"default": "default",
|
|
46
|
+
"description": "Semantic colour. Reserve success, warning and danger for real state; omit to inherit currentColor",
|
|
66
47
|
"required": false,
|
|
67
|
-
"values": [
|
|
68
|
-
"default",
|
|
69
|
-
"primary",
|
|
70
|
-
"secondary",
|
|
71
|
-
"tertiary",
|
|
72
|
-
"accent",
|
|
73
|
-
"success",
|
|
74
|
-
"warning",
|
|
75
|
-
"error"
|
|
76
|
-
]
|
|
48
|
+
"values": ["accent", "info", "success", "warning", "danger"]
|
|
77
49
|
},
|
|
78
50
|
"color": {
|
|
79
51
|
"type": "enum",
|
|
80
|
-
"description": "
|
|
52
|
+
"description": "Text-hierarchy colour, the same axis as Text color. tone wins when both are set",
|
|
81
53
|
"required": false,
|
|
82
|
-
"values": [
|
|
83
|
-
"primary",
|
|
84
|
-
"secondary",
|
|
85
|
-
"tertiary",
|
|
86
|
-
"accent",
|
|
87
|
-
"success",
|
|
88
|
-
"warning",
|
|
89
|
-
"error"
|
|
90
|
-
]
|
|
54
|
+
"values": ["primary", "secondary", "tertiary"]
|
|
91
55
|
},
|
|
92
56
|
"iconProps": {
|
|
93
57
|
"type": "object",
|
|
@@ -97,55 +61,51 @@
|
|
|
97
61
|
},
|
|
98
62
|
"usage": {
|
|
99
63
|
"when": [
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"Adding visual hierarchy to feature lists",
|
|
103
|
-
"Decorating cards or stats with relevant symbols"
|
|
104
|
-
],
|
|
105
|
-
"whenNot": [
|
|
106
|
-
"Large decorative illustrations (use Image or custom SVG)",
|
|
107
|
-
"Logo display (use dedicated Logo component)",
|
|
108
|
-
"Complex graphics with multiple colors",
|
|
109
|
-
"Animated icons (use custom implementation)"
|
|
64
|
+
"A symbol sits beside text, inside a button, or leads a list item",
|
|
65
|
+
"State needs a glanceable marker"
|
|
110
66
|
],
|
|
67
|
+
"whenNot": ["Artwork or illustration (use Image)", "Multi-color or animated graphics"],
|
|
111
68
|
"guidelines": [
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"Match
|
|
115
|
-
"
|
|
116
|
-
"Use iconProps for package-specific icon options not exposed directly on the wrapper"
|
|
69
|
+
"Reserve the success, warning, and danger tones for real state",
|
|
70
|
+
"Hold one size per context",
|
|
71
|
+
"Match weight to the text weight beside it",
|
|
72
|
+
"iconProps reaches options the wrapper does not expose"
|
|
117
73
|
],
|
|
118
74
|
"accessibility": [
|
|
119
|
-
"Icons are
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"Consider using VisuallyHidden for icon-only buttons"
|
|
75
|
+
"Icons ship aria-hidden — they are decoration until you label them",
|
|
76
|
+
"An icon-only button needs VisuallyHidden text",
|
|
77
|
+
"Color alone never carries the message"
|
|
123
78
|
]
|
|
124
79
|
},
|
|
125
80
|
"examples": [
|
|
126
81
|
{
|
|
127
82
|
"name": "Default",
|
|
128
|
-
"description": "
|
|
83
|
+
"description": "Inherits the size and color of its surroundings.",
|
|
129
84
|
"code": "<Icon icon={Heart} />"
|
|
130
85
|
},
|
|
131
86
|
{
|
|
132
87
|
"name": "Sizes",
|
|
133
|
-
"description": "
|
|
88
|
+
"description": "Steps tuned to the type scale, so icons never float off the baseline.",
|
|
134
89
|
"code": "<div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>\n <Icon icon={Star} size=\"xs\" />\n <Icon icon={Star} size=\"sm\" />\n <Icon icon={Star} size=\"md\" />\n <Icon icon={Star} size=\"lg\" />\n <Icon icon={Star} size=\"xl\" />\n</div>"
|
|
135
90
|
},
|
|
136
91
|
{
|
|
137
|
-
"name": "
|
|
138
|
-
"description": "
|
|
139
|
-
"code": "<div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>\n <Icon icon={Check}
|
|
92
|
+
"name": "Tones",
|
|
93
|
+
"description": "Tone states carry meaning — never use them for decoration.",
|
|
94
|
+
"code": "<div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>\n <Icon icon={Check} tone=\"success\" />\n <Icon icon={Warning} tone=\"warning\" />\n <Icon icon={Warning} tone=\"danger\" />\n <Icon icon={Info} tone=\"accent\" />\n</div>"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "Hierarchy",
|
|
98
|
+
"description": "The text colour ladder, for glyphs that sit beside secondary or tertiary copy.",
|
|
99
|
+
"code": "<div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>\n <Icon icon={Heart} color=\"primary\" />\n <Icon icon={Heart} color=\"secondary\" />\n <Icon icon={Heart} color=\"tertiary\" />\n</div>"
|
|
140
100
|
},
|
|
141
101
|
{
|
|
142
102
|
"name": "Weights",
|
|
143
|
-
"description": "
|
|
103
|
+
"description": "Match the stroke to the text weight next to it.",
|
|
144
104
|
"code": "<div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>\n <Icon icon={Heart} weight=\"thin\" />\n <Icon icon={Heart} weight=\"light\" />\n <Icon icon={Heart} weight=\"regular\" />\n <Icon icon={Heart} weight=\"bold\" />\n <Icon icon={Heart} weight=\"fill\" />\n <Icon icon={Heart} weight=\"duotone\" />\n</div>"
|
|
145
105
|
},
|
|
146
106
|
{
|
|
147
107
|
"name": "Advanced Icon Props",
|
|
148
|
-
"description": "
|
|
108
|
+
"description": "iconProps passes anything the underlying icon package supports.",
|
|
149
109
|
"code": "<Icon icon={Heart} iconProps={{ mirrored: true }} />"
|
|
150
110
|
}
|
|
151
111
|
],
|
|
@@ -171,19 +131,15 @@
|
|
|
171
131
|
"icon: React component - icon component (required)",
|
|
172
132
|
"size: xs|sm|md|lg|xl - icon size",
|
|
173
133
|
"weight: string - optional style/weight hint for icons that support it",
|
|
174
|
-
"
|
|
134
|
+
"tone: accent|info|success|warning|danger - semantic colour",
|
|
135
|
+
"color: primary|secondary|tertiary - text-hierarchy colour",
|
|
175
136
|
"iconProps: typed from the passed icon component - advanced icon-specific props"
|
|
176
137
|
],
|
|
177
|
-
"a11yRules": [
|
|
178
|
-
"A11Y_ICON_LABEL",
|
|
179
|
-
"A11Y_COLOR_CONTRAST"
|
|
180
|
-
]
|
|
138
|
+
"a11yRules": ["A11Y_ICON_LABEL", "A11Y_COLOR_CONTRAST"]
|
|
181
139
|
},
|
|
182
140
|
"ai": {
|
|
183
141
|
"compositionPattern": "compound",
|
|
184
|
-
"subComponents": [
|
|
185
|
-
"Root"
|
|
186
|
-
]
|
|
142
|
+
"subComponents": ["Root"]
|
|
187
143
|
},
|
|
188
144
|
"provenance": {
|
|
189
145
|
"source": "migrated",
|
|
@@ -20,35 +20,36 @@
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// Color variants (matching Badge/Alert pattern)
|
|
28
|
-
.primary {
|
|
23
|
+
// Text-hierarchy colour (Text's `color` axis). Absence inherits currentColor.
|
|
24
|
+
.colorPrimary {
|
|
29
25
|
color: var(--fui-text-primary, $fui-text-primary);
|
|
30
26
|
}
|
|
31
27
|
|
|
32
|
-
.
|
|
28
|
+
.colorSecondary {
|
|
33
29
|
color: var(--fui-text-secondary, $fui-text-secondary);
|
|
34
30
|
}
|
|
35
31
|
|
|
36
|
-
.
|
|
32
|
+
.colorTertiary {
|
|
37
33
|
color: var(--fui-text-tertiary, $fui-text-tertiary);
|
|
38
34
|
}
|
|
39
35
|
|
|
40
|
-
.
|
|
36
|
+
// Tone paints the shared status ramp (same `*-text` stops as Badge and Text).
|
|
37
|
+
.toneAccent {
|
|
41
38
|
color: var(--fui-color-accent, $fui-color-accent);
|
|
42
39
|
}
|
|
43
40
|
|
|
44
|
-
.
|
|
41
|
+
.toneInfo {
|
|
42
|
+
color: var(--fui-color-info-text, $fui-color-info-text);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.toneSuccess {
|
|
45
46
|
color: var(--fui-color-success-text, $fui-color-success-text);
|
|
46
47
|
}
|
|
47
48
|
|
|
48
|
-
.
|
|
49
|
+
.toneWarning {
|
|
49
50
|
color: var(--fui-color-warning-text, $fui-color-warning-text);
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
.
|
|
53
|
+
.toneDanger {
|
|
53
54
|
color: var(--fui-color-danger-text, $fui-color-danger-text);
|
|
54
55
|
}
|
|
@@ -7,56 +7,56 @@ import styles from "./Icon.module.scss";
|
|
|
7
7
|
type AnyIconComponent = React.ComponentType<any>;
|
|
8
8
|
type IconComponentProps<TIcon extends AnyIconComponent> = React.ComponentPropsWithoutRef<TIcon>;
|
|
9
9
|
|
|
10
|
+
export type IconSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
11
|
+
export type IconTone = "accent" | "info" | "success" | "warning" | "danger";
|
|
12
|
+
export type IconColor = "primary" | "secondary" | "tertiary";
|
|
13
|
+
|
|
10
14
|
export type IconProps<TIcon extends AnyIconComponent = AnyIconComponent> = Omit<
|
|
11
15
|
React.HTMLAttributes<HTMLSpanElement>,
|
|
12
16
|
"color"
|
|
13
17
|
> & {
|
|
14
18
|
/** The icon component to render */
|
|
15
19
|
icon: TIcon;
|
|
16
|
-
/** Size of the icon
|
|
17
|
-
|
|
20
|
+
/** Size of the icon. `xl` is the largest step (24px); the glyph inherits
|
|
21
|
+
* `currentColor` and the surrounding line height.
|
|
22
|
+
* @default "md" */
|
|
23
|
+
size?: IconSize;
|
|
18
24
|
/** Optional style/weight hint forwarded when the icon component supports a `weight` prop */
|
|
19
25
|
weight?: string;
|
|
20
|
-
/** Semantic
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
| "accent"
|
|
27
|
-
| "success"
|
|
28
|
-
| "warning"
|
|
29
|
-
| "error";
|
|
30
|
-
/** @deprecated Use variant instead */
|
|
31
|
-
color?: "primary" | "secondary" | "tertiary" | "accent" | "success" | "warning" | "error";
|
|
26
|
+
/** Semantic colour. Reserve `success`, `warning` and `danger` for real
|
|
27
|
+
* state; `accent` is the brand spend. Omit to inherit `currentColor`. */
|
|
28
|
+
tone?: IconTone;
|
|
29
|
+
/** Text-hierarchy colour, the same axis as Text's `color`. `tone` wins when
|
|
30
|
+
* both are set. Omit to inherit `currentColor`. */
|
|
31
|
+
color?: IconColor;
|
|
32
32
|
/** Additional props forwarded to the underlying icon component (typed from `icon`) */
|
|
33
33
|
iconProps?: Partial<IconComponentProps<TIcon>>;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
const iconTargets = MEASUREMENT_PROFILES.targets.icon;
|
|
37
|
-
|
|
37
|
+
|
|
38
|
+
const TONE_CLASS: Record<IconTone, string> = {
|
|
39
|
+
accent: styles.toneAccent,
|
|
40
|
+
info: styles.toneInfo,
|
|
41
|
+
success: styles.toneSuccess,
|
|
42
|
+
warning: styles.toneWarning,
|
|
43
|
+
danger: styles.toneDanger,
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const COLOR_CLASS: Record<IconColor, string> = {
|
|
47
|
+
primary: styles.colorPrimary,
|
|
48
|
+
secondary: styles.colorSecondary,
|
|
49
|
+
tertiary: styles.colorTertiary,
|
|
50
|
+
};
|
|
38
51
|
|
|
39
52
|
const IconRoot = React.forwardRef<HTMLSpanElement, IconProps>(function Icon(
|
|
40
|
-
{
|
|
41
|
-
icon: IconComponent,
|
|
42
|
-
size = "md",
|
|
43
|
-
weight = "regular",
|
|
44
|
-
variant,
|
|
45
|
-
color,
|
|
46
|
-
iconProps,
|
|
47
|
-
className,
|
|
48
|
-
style,
|
|
49
|
-
...htmlProps
|
|
50
|
-
},
|
|
53
|
+
{ icon: IconComponent, size = "md", weight = "regular", tone, color, iconProps, className, style, ...htmlProps },
|
|
51
54
|
ref
|
|
52
55
|
) {
|
|
53
|
-
// Support deprecated color prop (variant takes precedence)
|
|
54
|
-
const colorVariant = variant || color;
|
|
55
|
-
|
|
56
56
|
const classes = [
|
|
57
57
|
styles.icon,
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
styles[size],
|
|
59
|
+
tone ? TONE_CLASS[tone] : color ? COLOR_CLASS[color] : undefined,
|
|
60
60
|
className,
|
|
61
61
|
]
|
|
62
62
|
.filter(Boolean)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://usefragments.com/schemas/contract.v1.json",
|
|
3
3
|
"name": "IconButton",
|
|
4
|
-
"description": "
|
|
5
|
-
"category": "
|
|
4
|
+
"description": "Runs an action from an icon alone, for toolbars and table rows.",
|
|
5
|
+
"category": "actions",
|
|
6
6
|
"tags": ["action", "button", "icon", "toolbar", "interactive"],
|
|
7
7
|
"status": "stable",
|
|
8
8
|
"sourcePath": "src/components/IconButton/index.tsx",
|
|
9
9
|
"exportName": "IconButton",
|
|
10
10
|
"propsSummary": [
|
|
11
11
|
"children: node (required)",
|
|
12
|
-
"variant: ghost|
|
|
12
|
+
"variant: ghost|soft|outline (default: ghost)",
|
|
13
13
|
"size: sm|md|lg (default: md)",
|
|
14
14
|
"pressed: boolean",
|
|
15
15
|
"aria-label: string",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"description": "Visual treatment for the icon-only action",
|
|
27
27
|
"default": "ghost",
|
|
28
28
|
"required": false,
|
|
29
|
-
"values": ["ghost", "
|
|
29
|
+
"values": ["ghost", "soft", "outline"]
|
|
30
30
|
},
|
|
31
31
|
"size": {
|
|
32
32
|
"type": "enum",
|
|
@@ -53,36 +53,52 @@
|
|
|
53
53
|
},
|
|
54
54
|
"usage": {
|
|
55
55
|
"when": [
|
|
56
|
-
"
|
|
57
|
-
"Row actions
|
|
58
|
-
"Toggle
|
|
56
|
+
"Toolbars and top bars where text buttons crowd",
|
|
57
|
+
"Row actions too narrow for a label",
|
|
58
|
+
"Toggle actions that show a pressed state"
|
|
59
59
|
],
|
|
60
60
|
"whenNot": [
|
|
61
|
-
"The action needs a visible
|
|
62
|
-
"
|
|
63
|
-
"The icon is decorative
|
|
61
|
+
"The action needs a visible label — use Button",
|
|
62
|
+
"It flips a persistent setting — use Switch",
|
|
63
|
+
"The icon is decorative — use Icon"
|
|
64
64
|
],
|
|
65
65
|
"guidelines": [
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
66
|
+
"aria-label or aria-labelledby is required, every time",
|
|
67
|
+
"ghost for ordinary toolbar actions; outline when it needs separation",
|
|
68
|
+
"pressed only for real toggle state, not selection",
|
|
69
|
+
"Keep icon meaning obvious, or pair it with a Tooltip"
|
|
69
70
|
],
|
|
70
71
|
"accessibility": [
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
72
|
+
"Name the action, not the icon: \"Delete row\", not \"Trash\"",
|
|
73
|
+
"Pressed state is exposed via aria-pressed",
|
|
74
|
+
"Hit target stays at least 24px even at size=\"sm\""
|
|
74
75
|
]
|
|
75
76
|
},
|
|
76
77
|
"examples": [
|
|
77
78
|
{
|
|
78
79
|
"name": "Toolbar action",
|
|
79
|
-
"description": "
|
|
80
|
-
"code": "<IconButton aria-label=\"Add item\">\n <PlusIcon aria-hidden />\n</IconButton>"
|
|
80
|
+
"description": "Icon carries the action; the label lives in aria-label.",
|
|
81
|
+
"code": "import { Plus as PlusIcon } from '@phosphor-icons/react';\n\n<IconButton aria-label=\"Add item\">\n <PlusIcon aria-hidden />\n</IconButton>"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "Variants",
|
|
85
|
+
"description": "Rising chrome: transparent, tinted, then bordered.",
|
|
86
|
+
"code": "import { Plus as PlusIcon } from '@phosphor-icons/react';\nimport { Stack } from '@/components/Stack';\n\n<Stack direction=\"row\" gap=\"sm\" align=\"center\">\n <IconButton aria-label=\"Add item\" variant=\"ghost\">\n <PlusIcon aria-hidden />\n </IconButton>\n <IconButton aria-label=\"Add item\" variant=\"soft\">\n <PlusIcon aria-hidden />\n </IconButton>\n <IconButton aria-label=\"Add item\" variant=\"outline\">\n <PlusIcon aria-hidden />\n </IconButton>\n</Stack>"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "Sizes",
|
|
90
|
+
"description": "sm for table rows, lg for primary chrome.",
|
|
91
|
+
"code": "import { Plus as PlusIcon } from '@phosphor-icons/react';\nimport { Stack } from '@/components/Stack';\n\n<Stack direction=\"row\" gap=\"sm\" align=\"center\">\n <IconButton aria-label=\"Add item\" variant=\"outline\" size=\"sm\">\n <PlusIcon aria-hidden />\n </IconButton>\n <IconButton aria-label=\"Add item\" variant=\"outline\" size=\"md\">\n <PlusIcon aria-hidden />\n </IconButton>\n <IconButton aria-label=\"Add item\" variant=\"outline\" size=\"lg\">\n <PlusIcon aria-hidden />\n </IconButton>\n</Stack>"
|
|
81
92
|
},
|
|
82
93
|
{
|
|
83
94
|
"name": "Pressed state",
|
|
84
|
-
"description": "
|
|
85
|
-
"code": "import { PushPin as PinIcon } from '@phosphor-icons/react';\n\n<IconButton aria-label=\"Pin item\"
|
|
95
|
+
"description": "Toggle that stays on, reported through aria-pressed.",
|
|
96
|
+
"code": "import { PushPin as PinIcon } from '@phosphor-icons/react';\nimport { Stack } from '@/components/Stack';\n\n<Stack direction=\"row\" gap=\"sm\" align=\"center\">\n <IconButton aria-label=\"Pin item\" variant=\"outline\">\n <PinIcon aria-hidden />\n </IconButton>\n <IconButton aria-label=\"Unpin item\" variant=\"outline\" pressed>\n <PinIcon aria-hidden />\n </IconButton>\n</Stack>"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "Disabled",
|
|
100
|
+
"description": "Unavailable action, out of the tab order.",
|
|
101
|
+
"code": "import { Trash as TrashIcon } from '@phosphor-icons/react';\n\n<IconButton aria-label=\"Delete row\" variant=\"outline\" disabled>\n <TrashIcon aria-hidden />\n</IconButton>"
|
|
86
102
|
}
|
|
87
103
|
],
|
|
88
104
|
"relations": [
|
|
@@ -100,7 +116,7 @@
|
|
|
100
116
|
"contract": {
|
|
101
117
|
"propsSummary": [
|
|
102
118
|
"children: ReactNode - icon element (required)",
|
|
103
|
-
"variant: ghost|
|
|
119
|
+
"variant: ghost|soft|outline - visual treatment",
|
|
104
120
|
"size: sm|md|lg - square control size",
|
|
105
121
|
"pressed: boolean - toggle state exposed with aria-pressed",
|
|
106
122
|
"aria-label or aria-labelledby - required accessible name"
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
@use
|
|
2
|
-
@use
|
|
3
|
-
@use
|
|
4
|
-
@use
|
|
1
|
+
@use "../../tokens/variables" as *;
|
|
2
|
+
@use "../../tokens/mixins" as *;
|
|
3
|
+
@use "../../recipes/action";
|
|
4
|
+
@use "../../recipes/target";
|
|
5
5
|
|
|
6
6
|
.iconButton {
|
|
7
7
|
@include button-reset;
|
|
8
8
|
@include interactive-base;
|
|
9
9
|
@include action.base;
|
|
10
|
+
@include high-contrast-outline;
|
|
10
11
|
|
|
11
|
-
border-radius: var(--fui-radius-
|
|
12
|
+
border-radius: var(--fui-radius-l2, $fui-radius-l2);
|
|
12
13
|
color: var(--fui-text-secondary, $fui-text-secondary);
|
|
13
|
-
border: var(--fui-stroke-hairline,
|
|
14
|
+
border: var(--fui-stroke-hairline, #{$fui-stroke-hairline}) solid transparent;
|
|
14
15
|
background-color: transparent;
|
|
15
16
|
flex-shrink: 0;
|
|
16
17
|
|
|
@@ -18,6 +19,14 @@
|
|
|
18
19
|
color: var(--fui-text-primary, $fui-text-primary);
|
|
19
20
|
}
|
|
20
21
|
|
|
22
|
+
// Tactile press. 0.96 exactly: lower reads as exaggerated. Rides the
|
|
23
|
+
// interactive-base transition, so a release mid-press eases back.
|
|
24
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
25
|
+
&:active:not(:disabled):not([data-disabled]) {
|
|
26
|
+
scale: 0.96;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
21
30
|
svg {
|
|
22
31
|
display: block;
|
|
23
32
|
}
|
|
@@ -59,7 +68,7 @@
|
|
|
59
68
|
}
|
|
60
69
|
}
|
|
61
70
|
|
|
62
|
-
.
|
|
71
|
+
.soft {
|
|
63
72
|
background-color: var(--fui-bg-tertiary, $fui-bg-tertiary);
|
|
64
73
|
|
|
65
74
|
&:hover:not(:disabled):not([data-disabled]) {
|
|
@@ -71,7 +80,7 @@
|
|
|
71
80
|
}
|
|
72
81
|
}
|
|
73
82
|
|
|
74
|
-
.
|
|
83
|
+
.outline {
|
|
75
84
|
border-color: var(--fui-border, $fui-border);
|
|
76
85
|
|
|
77
86
|
&:hover:not(:disabled):not([data-disabled]) {
|
|
@@ -84,9 +93,8 @@
|
|
|
84
93
|
}
|
|
85
94
|
}
|
|
86
95
|
|
|
87
|
-
// Pressed
|
|
88
|
-
// while idle so the "on" state reads clearly.
|
|
96
|
+
// Pressed is a persistent toggle selection, not the pointer-down state.
|
|
89
97
|
.pressed {
|
|
90
|
-
background-color: var(--fui-bg
|
|
98
|
+
background-color: var(--fui-control-selected-bg, $fui-bg-active);
|
|
91
99
|
color: var(--fui-text-primary, $fui-text-primary);
|
|
92
100
|
}
|
|
@@ -4,6 +4,7 @@ import * as React from "react";
|
|
|
4
4
|
import { Button as BaseButton } from "@base-ui/react/button";
|
|
5
5
|
import { useResolvedControlSize } from "../ComponentDefaults";
|
|
6
6
|
import styles from "./IconButton.module.scss";
|
|
7
|
+
import { isProductionBuild } from "../../utils/env";
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Compact square button for icon-only affordances — topbar actions, row
|
|
@@ -27,12 +28,12 @@ export interface IconButtonProps extends Omit<
|
|
|
27
28
|
*
|
|
28
29
|
* - `ghost` (default): transparent at rest, subtle hover. Fits inside
|
|
29
30
|
* dense topbars and row affordances.
|
|
30
|
-
* - `
|
|
31
|
+
* - `soft`: painted with the tertiary surface; use when the affordance
|
|
31
32
|
* sits on a matching surface and needs a touch more weight.
|
|
32
|
-
* - `
|
|
33
|
-
*
|
|
33
|
+
* - `outline`: hairline border; use as a secondary control alongside a
|
|
34
|
+
* solid `Button`.
|
|
34
35
|
* @default "ghost" */
|
|
35
|
-
variant?: "ghost" | "
|
|
36
|
+
variant?: "ghost" | "soft" | "outline";
|
|
36
37
|
/** Button size. Uses the same height ladder as Button so icon-only
|
|
37
38
|
* affordances align with toolbar actions and adjacent fields.
|
|
38
39
|
* @default "md" */
|
|
@@ -56,7 +57,7 @@ const IconButtonRoot = React.forwardRef<HTMLButtonElement, IconButtonProps>(func
|
|
|
56
57
|
},
|
|
57
58
|
ref
|
|
58
59
|
) {
|
|
59
|
-
if (
|
|
60
|
+
if (!isProductionBuild() && !ariaLabel && !ariaLabelledBy) {
|
|
60
61
|
console.warn(
|
|
61
62
|
"[IconButton] Icon-only buttons need an accessible name. Provide `aria-label` or `aria-labelledby`."
|
|
62
63
|
);
|