@usefragments/ui 1.7.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/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 +4975 -4959
- package/dist/blocks/components/StatsCard.d.ts +1 -1
- package/dist/blocks/components/StatsCard.d.ts.map +1 -1
- package/dist/codeblock.cjs +23 -16
- package/dist/codeblock.js +16 -9
- package/dist/colorpicker.cjs +1 -0
- package/dist/colorpicker.js +1 -0
- 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 +21 -21
- package/dist/components/Alert/Alert.module.scss.js +21 -21
- package/dist/components/Alert/index.cjs +14 -8
- package/dist/components/Alert/index.d.ts +9 -9
- package/dist/components/Alert/index.d.ts.map +1 -1
- package/dist/components/Alert/index.js +14 -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/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 +27 -34
- package/dist/components/Card/Card.module.scss.js +27 -34
- package/dist/components/Card/index.cjs +13 -8
- package/dist/components/Card/index.d.ts +23 -25
- package/dist/components/Card/index.d.ts.map +1 -1
- package/dist/components/Card/index.js +13 -8
- package/dist/components/Chart/Chart.module.scss.cjs +15 -15
- package/dist/components/Chart/Chart.module.scss.js +15 -15
- 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 +2 -2
- 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 +2 -2
- 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 +1 -2
- 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 +1 -2
- package/dist/components/CodeBlock/CodeBlock.module.scss.cjs +22 -22
- package/dist/components/CodeBlock/CodeBlock.module.scss.js +22 -22
- package/dist/components/CodeBlock/index.d.ts +3 -2
- 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 +9 -5
- package/dist/components/Combobox/index.d.ts.map +1 -1
- package/dist/components/Combobox/index.js +9 -5
- 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 +2 -1
- package/dist/components/Command/index.d.ts +6 -1
- package/dist/components/Command/index.d.ts.map +1 -1
- package/dist/components/Command/index.js +2 -1
- 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.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/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 +2 -2
- package/dist/components/Dialog/index.d.ts +5 -4
- package/dist/components/Dialog/index.d.ts.map +1 -1
- package/dist/components/Dialog/index.js +2 -2
- 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/EmptyState/EmptyState.module.scss.cjs +11 -11
- package/dist/components/EmptyState/EmptyState.module.scss.js +11 -11
- package/dist/components/EmptyState/index.cjs +9 -4
- package/dist/components/EmptyState/index.d.ts +8 -5
- package/dist/components/EmptyState/index.d.ts.map +1 -1
- package/dist/components/EmptyState/index.js +9 -4
- package/dist/components/Field/Field.module.scss.cjs +5 -5
- package/dist/components/Field/Field.module.scss.js +5 -5
- 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/Header/Header.module.scss.cjs +33 -33
- package/dist/components/Header/Header.module.scss.js +33 -33
- 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.d.ts +4 -4
- package/dist/components/IconButton/index.d.ts.map +1 -1
- 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 +24 -16
- package/dist/components/Link/Link.module.scss.js +24 -16
- package/dist/components/Link/index.cjs +13 -2
- package/dist/components/Link/index.d.ts +10 -3
- 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 +30 -30
- package/dist/components/Loading/Loading.module.scss.js +30 -30
- 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/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 +29 -29
- package/dist/components/NavigationMenu/NavigationMenu.module.scss.js +29 -29
- 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/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 +3 -3
- package/dist/components/Sidebar/index.js +3 -3
- package/dist/components/Skeleton/Skeleton.module.scss.cjs +46 -46
- package/dist/components/Skeleton/Skeleton.module.scss.js +46 -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/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 +15 -15
- package/dist/components/Table/Table.module.scss.js +15 -15
- 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 +1 -1
- package/dist/components/TableOfContents/index.js +1 -1
- 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 +5 -6
- 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 +5 -6
- package/dist/components/Text/Text.module.scss.cjs +105 -105
- package/dist/components/Text/Text.module.scss.js +105 -105
- package/dist/components/Text/index.cjs +5 -9
- package/dist/components/Text/index.d.ts +15 -11
- package/dist/components/Text/index.d.ts.map +1 -1
- package/dist/components/Text/index.js +5 -9
- 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 +20 -4
- 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 +20 -4
- 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 -9
- package/dist/components/ThemeToggle/ThemeToggle.module.scss.js +6 -9
- 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 +5 -74
- package/dist/components/ThemeToggle/index.d.ts +5 -8
- package/dist/components/ThemeToggle/index.d.ts.map +1 -1
- package/dist/components/ThemeToggle/index.js +3 -72
- 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/VisuallyHidden/VisuallyHidden.module.scss.cjs +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.module.scss.js +1 -1
- package/dist/data-table-virtual.cjs +3 -2
- package/dist/data-table-virtual.js +3 -2
- package/dist/data-table.cjs +1 -1
- package/dist/data-table.js +1 -1
- package/dist/datepicker.cjs +23 -11
- package/dist/datepicker.js +23 -11
- package/dist/index.cjs +5 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/measurements/generated.cjs +37 -93
- package/dist/measurements/generated.d.ts +37 -92
- package/dist/measurements/generated.d.ts.map +1 -1
- package/dist/measurements/generated.js +37 -93
- package/dist/measurements/index.d.ts +1 -1
- package/dist/measurements/index.d.ts.map +1 -1
- package/dist/utils/seed-derivation.cjs +0 -1
- 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 +0 -1
- 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 +5 -8
- package/src/assets/nav-glyph.module.scss +166 -0
- package/src/assets/nav-glyph.tsx +188 -0
- package/src/components/Accordion/Accordion.module.scss +5 -3
- package/src/components/Alert/Alert.contract.json +18 -18
- package/src/components/Alert/Alert.module.scss +50 -64
- package/src/components/Alert/index.tsx +24 -17
- package/src/components/AppShell/AppShell.contract.json +7 -7
- package/src/components/AppShell/AppShell.module.scss +49 -17
- package/src/components/AppShell/index.tsx +2 -2
- package/src/components/Avatar/Avatar.module.scss +0 -1
- package/src/components/Badge/Badge.contract.json +58 -22
- package/src/components/Badge/Badge.module.scss +72 -47
- package/src/components/Badge/index.tsx +34 -17
- package/src/components/BentoGrid/BentoGrid.module.scss +4 -8
- package/src/components/Box/Box.module.scss +7 -6
- package/src/components/Breadcrumbs/Breadcrumbs.module.scss +15 -5
- package/src/components/Breadcrumbs/index.tsx +5 -1
- package/src/components/Button/Button.module.scss +261 -186
- package/src/components/Button/index.tsx +41 -28
- package/src/components/ButtonGroup/ButtonGroup.contract.json +5 -5
- 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 +73 -133
- package/src/components/Card/index.tsx +41 -36
- package/src/components/Chart/Chart.module.scss +6 -5
- package/src/components/Checkbox/Checkbox.contract.json +4 -3
- package/src/components/Checkbox/Checkbox.module.scss +16 -32
- package/src/components/Checkbox/index.tsx +6 -8
- package/src/components/Chip/Chip.contract.json +10 -10
- package/src/components/Chip/Chip.module.scss +23 -22
- package/src/components/Chip/index.tsx +10 -6
- package/src/components/CodeBlock/CodeBlock.module.scss +47 -70
- package/src/components/CodeBlock/index.tsx +23 -16
- package/src/components/Collapsible/Collapsible.module.scss +1 -7
- package/src/components/ColorPicker/ColorPicker.module.scss +20 -13
- package/src/components/ColorPicker/index.tsx +1 -0
- package/src/components/Combobox/Combobox.module.scss +16 -19
- package/src/components/Combobox/index.tsx +10 -1
- package/src/components/Command/Command.contract.json +7 -1
- package/src/components/Command/Command.module.scss +19 -21
- package/src/components/Command/index.tsx +7 -1
- package/src/components/ComponentDefaults/ComponentDefaults.contract.json +91 -0
- package/src/components/ConversationList/ConversationList.module.scss +2 -3
- package/src/components/ConversationList/index.tsx +2 -2
- package/src/components/DataTable/DataTable.module.scss +12 -9
- package/src/components/DataTable/DataTable.virtual.tsx +3 -2
- package/src/components/DataTable/index.tsx +1 -1
- package/src/components/DatePicker/DatePicker.module.scss +32 -42
- package/src/components/DatePicker/index.tsx +18 -7
- package/src/components/Dialog/Dialog.module.scss +23 -29
- package/src/components/Dialog/index.tsx +7 -5
- package/src/components/Drawer/Drawer.contract.json +6 -6
- package/src/components/Drawer/Drawer.module.scss +123 -64
- package/src/components/Drawer/index.tsx +7 -5
- package/src/components/Editor/Editor.contract.json +1 -1
- package/src/components/Editor/Editor.module.scss +26 -13
- package/src/components/EmptyState/EmptyState.contract.json +6 -6
- package/src/components/EmptyState/EmptyState.module.scss +31 -23
- package/src/components/EmptyState/index.tsx +17 -9
- package/src/components/Field/Field.module.scss +2 -1
- package/src/components/Fieldset/Fieldset.module.scss +5 -4
- package/src/components/Form/Form.contract.json +4 -4
- package/src/components/Grid/Grid.module.scss +2 -2
- package/src/components/Header/Header.contract.json +2 -2
- package/src/components/Header/Header.module.scss +24 -36
- package/src/components/Icon/Icon.contract.json +19 -23
- package/src/components/Icon/Icon.module.scss +13 -12
- package/src/components/Icon/index.tsx +31 -31
- package/src/components/IconButton/IconButton.contract.json +8 -8
- package/src/components/IconButton/IconButton.module.scss +13 -4
- package/src/components/IconButton/index.tsx +4 -4
- package/src/components/Input/Input.contract.json +0 -13
- package/src/components/Input/Input.module.scss +4 -54
- package/src/components/Input/index.tsx +2 -18
- package/src/components/Link/Link.contract.json +19 -11
- package/src/components/Link/Link.module.scss +24 -10
- package/src/components/Link/index.tsx +26 -5
- package/src/components/List/List.contract.json +11 -11
- package/src/components/List/List.module.scss +10 -5
- package/src/components/List/index.tsx +17 -13
- package/src/components/Listbox/Listbox.module.scss +14 -20
- package/src/components/Loading/Loading.contract.json +6 -6
- package/src/components/Loading/Loading.module.scss +29 -26
- package/src/components/Loading/index.tsx +13 -12
- package/src/components/Markdown/Markdown.module.scss +2 -1
- package/src/components/Menu/Menu.contract.json +5 -5
- package/src/components/Menu/Menu.module.scss +11 -10
- package/src/components/Message/Message.contract.json +5 -5
- package/src/components/Message/Message.module.scss +8 -6
- package/src/components/Message/index.tsx +2 -2
- package/src/components/NavigationMenu/NavigationMenu.module.scss +22 -67
- package/src/components/Pagination/Pagination.module.scss +7 -14
- package/src/components/Popover/Popover.contract.json +4 -4
- package/src/components/Popover/Popover.module.scss +24 -23
- package/src/components/Progress/Progress.contract.json +11 -11
- package/src/components/Progress/Progress.module.scss +13 -8
- package/src/components/Progress/index.tsx +34 -16
- package/src/components/Prompt/Prompt.contract.json +12 -12
- package/src/components/Prompt/Prompt.module.scss +40 -47
- package/src/components/Prompt/index.tsx +17 -15
- package/src/components/RadioGroup/RadioGroup.contract.json +6 -4
- package/src/components/RadioGroup/RadioGroup.module.scss +38 -32
- package/src/components/RadioGroup/index.tsx +23 -10
- package/src/components/ScrollArea/ScrollArea.module.scss +30 -33
- package/src/components/Select/Select.module.scss +19 -18
- package/src/components/Select/index.tsx +26 -24
- package/src/components/Separator/Separator.contract.json +10 -10
- package/src/components/Separator/Separator.module.scss +24 -40
- package/src/components/Separator/index.tsx +16 -11
- package/src/components/Sidebar/Sidebar.contract.json +1 -1
- package/src/components/Sidebar/Sidebar.module.scss +92 -95
- package/src/components/Sidebar/index.tsx +3 -3
- package/src/components/Skeleton/Skeleton.contract.json +9 -9
- package/src/components/Skeleton/Skeleton.module.scss +23 -16
- package/src/components/Skeleton/index.tsx +16 -15
- package/src/components/Slider/Slider.module.scss +6 -19
- package/src/components/Stack/Stack.contract.json +1 -1
- package/src/components/Stack/Stack.module.scss +13 -12
- package/src/components/Switch/Switch.module.scss +44 -35
- package/src/components/Table/Table.module.scss +9 -13
- package/src/components/TableOfContents/TableOfContents.module.scss +12 -18
- package/src/components/TableOfContents/index.tsx +1 -1
- package/src/components/Tabs/Tabs.contract.json +14 -14
- package/src/components/Tabs/Tabs.module.scss +27 -31
- package/src/components/Tabs/index.tsx +15 -12
- package/src/components/Text/Text.contract.json +36 -14
- package/src/components/Text/Text.module.scss +19 -20
- package/src/components/Text/index.tsx +23 -21
- package/src/components/Textarea/Textarea.contract.json +0 -13
- package/src/components/Textarea/Textarea.module.scss +24 -52
- package/src/components/Textarea/index.tsx +3 -14
- package/src/components/Theme/Theme.contract.json +9 -8
- package/src/components/Theme/index.tsx +39 -12
- package/src/components/ThemeToggle/ThemeButton.tsx +49 -0
- package/src/components/ThemeToggle/ThemeToggle.module.scss +21 -44
- package/src/components/ThemeToggle/icons.tsx +46 -0
- package/src/components/ThemeToggle/index.tsx +8 -90
- package/src/components/ThinkingIndicator/ThinkingIndicator.contract.json +11 -10
- package/src/components/ThinkingIndicator/ThinkingIndicator.module.scss +9 -7
- package/src/components/ThinkingIndicator/index.tsx +12 -14
- package/src/components/Toast/Toast.contract.json +29 -13
- package/src/components/Toast/Toast.module.scss +49 -104
- package/src/components/Toast/index.tsx +39 -34
- package/src/components/ToggleGroup/ToggleGroup.contract.json +13 -13
- package/src/components/ToggleGroup/ToggleGroup.module.scss +16 -46
- package/src/components/ToggleGroup/index.tsx +11 -11
- package/src/components/Tooltip/Tooltip.contract.json +3 -3
- package/src/components/Tooltip/Tooltip.module.scss +16 -10
- package/src/components/VisuallyHidden/VisuallyHidden.module.scss +4 -14
- package/src/index.ts +14 -10
- package/src/measurements/MeasurementTargets.module.scss +6 -7
- package/src/measurements/generated.ts +38 -96
- package/src/measurements/index.ts +0 -1
- package/src/measurements/measurements.json +37 -116
- package/src/recipes/_action.scss +4 -4
- package/src/recipes/_boolean-range.scss +9 -5
- package/src/recipes/_feedback.scss +17 -16
- package/src/recipes/_field.scss +28 -20
- package/src/recipes/_navigation.scss +84 -29
- package/src/recipes/_overlay.scss +143 -43
- package/src/recipes/_popup.scss +46 -36
- package/src/recipes/_prose.scss +35 -23
- package/src/recipes/_representation.scss +10 -9
- package/src/recipes/_segmented.scss +1 -1
- package/src/recipes/_table-chrome.scss +27 -16
- package/src/recipes/_target.scss +2 -4
- package/src/recipes/_typography.scss +10 -0
- package/src/styles/globals.scss +14 -9
- package/src/tokens/_component-properties.scss +19 -1
- package/src/tokens/_computed.scss +27 -33
- package/src/tokens/_measurements.catalog.generated.css +58 -45
- package/src/tokens/_measurements.generated.scss +107 -250
- package/src/tokens/_mixins.scss +42 -40
- package/src/tokens/_palettes.scss +1 -1
- package/src/tokens/_property-registrations.scss +9 -0
- package/src/tokens/_seeds.scss +1 -12
- package/src/tokens/_variables.scss +71 -59
- package/src/utils/seed-derivation.ts +1 -8
- 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/Toggle/index.ts +0 -7
- package/src/tokens/_density.scss +0 -85
|
@@ -1,27 +1,35 @@
|
|
|
1
1
|
@use "../../tokens/variables" as *;
|
|
2
2
|
@use "../../tokens/mixins" as *;
|
|
3
|
+
@use "../../tokens/measurements.generated" as measurements;
|
|
3
4
|
@use "../../recipes/action";
|
|
4
5
|
|
|
6
|
+
// Two axes, one recipe. `tone` publishes the colour channels (fill, ink, wash,
|
|
7
|
+
// line); `variant` decides which channel paints which slot. Every channel and
|
|
8
|
+
// every slot carries a neutral fallback so a bare `.button` still renders.
|
|
9
|
+
|
|
5
10
|
.button {
|
|
6
11
|
@include button-reset;
|
|
7
12
|
@include interactive-base;
|
|
8
13
|
@include action.base;
|
|
14
|
+
@include high-contrast-outline;
|
|
9
15
|
|
|
16
|
+
// Slots the variant paints.
|
|
10
17
|
--_button-bg: transparent;
|
|
11
18
|
--_button-bg-hover: var(--fui-bg-hover, #{$fui-bg-hover});
|
|
12
19
|
--_button-bg-active: var(--fui-bg-active, #{$fui-bg-active});
|
|
13
20
|
--_button-border: transparent;
|
|
14
|
-
--_button-border-hover: var(--_button-border);
|
|
21
|
+
--_button-border-hover: var(--_button-border, transparent);
|
|
15
22
|
--_button-color: var(--fui-text-primary, #{$fui-text-primary});
|
|
16
23
|
--_button-shadow: none;
|
|
17
|
-
--_button-shadow-hover: var(--_button-shadow);
|
|
18
|
-
--_button-shadow-active: var(--_button-shadow);
|
|
24
|
+
--_button-shadow-hover: var(--_button-shadow, none);
|
|
25
|
+
--_button-shadow-active: var(--_button-shadow, none);
|
|
19
26
|
|
|
20
|
-
border: var(--fui-stroke-hairline,
|
|
27
|
+
border: var(--fui-stroke-hairline, #{$fui-stroke-hairline}) solid
|
|
28
|
+
var(--_button-border, transparent);
|
|
21
29
|
border-radius: var(--fui-button-radius, var(--fui-radius-lg, #{$fui-radius-lg}));
|
|
22
|
-
background: var(--_button-bg);
|
|
23
|
-
box-shadow: var(--_button-shadow);
|
|
24
|
-
color: var(--_button-color);
|
|
30
|
+
background: var(--_button-bg, transparent);
|
|
31
|
+
box-shadow: var(--_button-shadow, none);
|
|
32
|
+
color: var(--_button-color, var(--fui-text-primary, #{$fui-text-primary}));
|
|
25
33
|
font-weight: var(--fui-font-weight-medium, $fui-font-weight-medium);
|
|
26
34
|
white-space: nowrap;
|
|
27
35
|
|
|
@@ -34,25 +42,37 @@
|
|
|
34
42
|
}
|
|
35
43
|
|
|
36
44
|
&:hover:not(:disabled):not([data-disabled]) {
|
|
37
|
-
border-color: var(--_button-border-hover);
|
|
38
|
-
background: var(--_button-bg-hover);
|
|
39
|
-
box-shadow: var(--_button-shadow-hover);
|
|
45
|
+
border-color: var(--_button-border-hover, transparent);
|
|
46
|
+
background: var(--_button-bg-hover, var(--fui-bg-hover, #{$fui-bg-hover}));
|
|
47
|
+
box-shadow: var(--_button-shadow-hover, none);
|
|
40
48
|
}
|
|
41
49
|
|
|
42
50
|
&:active:not(:disabled):not([data-disabled]),
|
|
43
51
|
&[data-pressed] {
|
|
44
|
-
border-color: var(--_button-border-hover);
|
|
45
|
-
background: var(--_button-bg-active);
|
|
46
|
-
box-shadow: var(--_button-shadow-active);
|
|
52
|
+
border-color: var(--_button-border-hover, transparent);
|
|
53
|
+
background: var(--_button-bg-active, var(--fui-bg-active, #{$fui-bg-active}));
|
|
54
|
+
box-shadow: var(--_button-shadow-active, none);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Tactile press. 0.96 exactly: lower reads as exaggerated. Rides the
|
|
58
|
+
// interactive-base transition, so a release mid-press eases back.
|
|
59
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
60
|
+
&:active:not(:disabled):not([data-disabled]):not(.link) {
|
|
61
|
+
scale: 0.96;
|
|
62
|
+
}
|
|
47
63
|
}
|
|
48
64
|
|
|
49
65
|
&:focus-visible {
|
|
50
66
|
box-shadow:
|
|
51
|
-
0 0 0
|
|
67
|
+
0 0 0 var(--fui-stroke-hairline, #{$fui-stroke-hairline})
|
|
52
68
|
color-mix(in srgb, var(--fui-focus-ring-color, #{$fui-focus-ring-color}) 34%, transparent),
|
|
53
|
-
0 0 0
|
|
69
|
+
0 0 0
|
|
70
|
+
calc(
|
|
71
|
+
var(--fui-focus-ring-width, #{$fui-focus-ring-width}) +
|
|
72
|
+
var(--fui-stroke-hairline, #{$fui-stroke-hairline})
|
|
73
|
+
)
|
|
54
74
|
color-mix(in srgb, var(--fui-focus-ring-color, #{$fui-focus-ring-color}) 14%, transparent),
|
|
55
|
-
var(--_button-shadow);
|
|
75
|
+
var(--_button-shadow, none);
|
|
56
76
|
}
|
|
57
77
|
|
|
58
78
|
&:disabled,
|
|
@@ -61,13 +81,9 @@
|
|
|
61
81
|
}
|
|
62
82
|
}
|
|
63
83
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
> svg {
|
|
68
|
-
@include action.glyph("micro");
|
|
69
|
-
}
|
|
70
|
-
}
|
|
84
|
+
// ============================================
|
|
85
|
+
// Sizes
|
|
86
|
+
// ============================================
|
|
71
87
|
|
|
72
88
|
.sm {
|
|
73
89
|
@include action.size("sm");
|
|
@@ -93,19 +109,9 @@
|
|
|
93
109
|
}
|
|
94
110
|
}
|
|
95
111
|
|
|
96
|
-
//
|
|
97
|
-
//
|
|
98
|
-
//
|
|
99
|
-
// Icons (SVGs) have built-in whitespace that makes symmetric padding look
|
|
100
|
-
// uneven. When an icon leads or trails text, reduce padding on the icon
|
|
101
|
-
// side so the content appears optically centered.
|
|
102
|
-
//
|
|
103
|
-
.xs:not(.icon):has(> svg:first-child:not(:last-child)) {
|
|
104
|
-
padding-inline-start: action.icon-side-inset("micro");
|
|
105
|
-
}
|
|
106
|
-
.xs:not(.icon):has(> svg:last-child:not(:first-child)) {
|
|
107
|
-
padding-inline-end: action.icon-side-inset("micro");
|
|
108
|
-
}
|
|
112
|
+
// Optical alignment: icons (SVGs) carry built-in whitespace that makes
|
|
113
|
+
// symmetric padding look uneven. When an icon leads or trails text, reduce
|
|
114
|
+
// padding on the icon side so the content appears optically centered.
|
|
109
115
|
.sm:not(.icon):has(> svg:first-child:not(:last-child)) {
|
|
110
116
|
padding-inline-start: action.icon-side-inset("sm");
|
|
111
117
|
}
|
|
@@ -125,152 +131,257 @@
|
|
|
125
131
|
padding-inline-end: action.icon-side-inset("lg");
|
|
126
132
|
}
|
|
127
133
|
|
|
128
|
-
//
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
// ============================================
|
|
135
|
+
// Tones — colour channels
|
|
136
|
+
// ============================================
|
|
137
|
+
// fill / on-fill / fill-line → the solid variant
|
|
138
|
+
// ink → foreground of soft, outline, ghost, link
|
|
139
|
+
// soft → the tinted fill of the soft variant
|
|
140
|
+
// wash → hover/active fill of outline, ghost, link
|
|
141
|
+
// line → the outline border
|
|
142
|
+
|
|
143
|
+
.toneNeutral {
|
|
144
|
+
--_tone-fill: var(--fui-bg-inverse, #{$fui-bg-inverse});
|
|
145
|
+
--_tone-fill-hover: color-mix(
|
|
146
|
+
in srgb,
|
|
147
|
+
var(--fui-bg-inverse, #{$fui-bg-inverse}) 88%,
|
|
148
|
+
var(--fui-text-inverse, #{$fui-text-inverse})
|
|
149
|
+
);
|
|
150
|
+
--_tone-fill-active: color-mix(
|
|
151
|
+
in srgb,
|
|
152
|
+
var(--fui-bg-inverse, #{$fui-bg-inverse}) 80%,
|
|
153
|
+
var(--fui-text-inverse, #{$fui-text-inverse})
|
|
154
|
+
);
|
|
155
|
+
--_tone-fill-line: var(--_tone-fill, var(--fui-bg-inverse, #{$fui-bg-inverse}));
|
|
156
|
+
--_tone-fill-line-hover: var(--_tone-fill-hover, var(--fui-bg-inverse, #{$fui-bg-inverse}));
|
|
157
|
+
--_tone-on-fill: var(--fui-text-inverse, #{$fui-text-inverse});
|
|
158
|
+
--_tone-ink: var(--fui-button-neutral-color, var(--fui-text-primary, #{$fui-text-primary}));
|
|
159
|
+
--_tone-soft: var(--fui-button-neutral-bg, var(--fui-bg-tertiary, #{$fui-bg-tertiary}));
|
|
160
|
+
--_tone-soft-hover: var(--fui-button-neutral-bg-hover, var(--fui-bg-hover, #{$fui-bg-hover}));
|
|
161
|
+
--_tone-soft-active: var(--fui-button-neutral-bg-active, var(--fui-bg-active, #{$fui-bg-active}));
|
|
162
|
+
--_tone-wash: var(--fui-bg-hover, #{$fui-bg-hover});
|
|
163
|
+
--_tone-wash-active: var(--fui-bg-active, #{$fui-bg-active});
|
|
164
|
+
--_tone-line: var(--fui-button-neutral-border, var(--fui-border-strong, #{$fui-border-strong}));
|
|
165
|
+
--_tone-line-hover: var(
|
|
166
|
+
--fui-button-neutral-border-hover,
|
|
167
|
+
var(--fui-border-strong, #{$fui-border-strong})
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// Accent solid reads the primary-chrome tokens so the ink-first default and a
|
|
172
|
+
// consumer brand seed both paint the primary action (see `_variables.scss`).
|
|
173
|
+
.toneAccent {
|
|
174
|
+
--_tone-fill: var(--fui-button-primary-bg, var(--fui-color-accent, #{$fui-color-accent}));
|
|
175
|
+
--_tone-fill-hover: var(
|
|
176
|
+
--fui-button-primary-bg-hover,
|
|
177
|
+
var(--fui-color-accent-hover, #{$fui-color-accent-hover})
|
|
178
|
+
);
|
|
179
|
+
--_tone-fill-active: var(
|
|
180
|
+
--fui-button-primary-bg-active,
|
|
181
|
+
var(--fui-color-accent-active, #{$fui-color-accent-active})
|
|
182
|
+
);
|
|
183
|
+
--_tone-fill-line: var(
|
|
184
|
+
--fui-button-primary-border,
|
|
185
|
+
var(--fui-color-accent, #{$fui-color-accent})
|
|
186
|
+
);
|
|
187
|
+
--_tone-fill-line-hover: var(
|
|
188
|
+
--fui-button-primary-border-hover,
|
|
189
|
+
var(--fui-color-accent-hover, #{$fui-color-accent-hover})
|
|
190
|
+
);
|
|
191
|
+
--_tone-on-fill: var(
|
|
136
192
|
--fui-button-primary-color,
|
|
137
193
|
var(--fui-color-on-accent, #{$fui-color-on-accent})
|
|
138
194
|
);
|
|
139
|
-
--
|
|
140
|
-
--
|
|
141
|
-
--
|
|
195
|
+
--_tone-ink: var(--fui-color-accent, #{$fui-color-accent});
|
|
196
|
+
--_tone-soft: color-mix(in srgb, var(--fui-color-accent, #{$fui-color-accent}) 12%, transparent);
|
|
197
|
+
--_tone-soft-hover: color-mix(
|
|
198
|
+
in srgb,
|
|
199
|
+
var(--fui-color-accent, #{$fui-color-accent}) 18%,
|
|
200
|
+
transparent
|
|
201
|
+
);
|
|
202
|
+
--_tone-soft-active: color-mix(
|
|
203
|
+
in srgb,
|
|
204
|
+
var(--fui-color-accent, #{$fui-color-accent}) 24%,
|
|
205
|
+
transparent
|
|
206
|
+
);
|
|
207
|
+
--_tone-wash: color-mix(in srgb, var(--fui-color-accent, #{$fui-color-accent}) 10%, transparent);
|
|
208
|
+
--_tone-wash-active: color-mix(
|
|
209
|
+
in srgb,
|
|
210
|
+
var(--fui-color-accent, #{$fui-color-accent}) 18%,
|
|
211
|
+
transparent
|
|
212
|
+
);
|
|
213
|
+
--_tone-line: color-mix(in srgb, var(--fui-color-accent, #{$fui-color-accent}) 48%, transparent);
|
|
214
|
+
--_tone-line-hover: var(--fui-color-accent, #{$fui-color-accent});
|
|
142
215
|
}
|
|
143
216
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
--
|
|
155
|
-
|
|
217
|
+
// Semantic tones share one derivation: the fill is the seed, hover and active
|
|
218
|
+
// lean toward the tone's ink (darker on paper, lighter on charcoal), the
|
|
219
|
+
// tinted surfaces come from the `-bg` / `-text` / `-border` ramp.
|
|
220
|
+
@mixin _semantic-tone($tone, $seed, $bg, $text, $border) {
|
|
221
|
+
--_tone-fill: var(--fui-color-#{$tone}, #{$seed});
|
|
222
|
+
--_tone-fill-hover: color-mix(
|
|
223
|
+
in srgb,
|
|
224
|
+
var(--fui-color-#{$tone}, #{$seed}) 88%,
|
|
225
|
+
var(--fui-color-#{$tone}-text, #{$text})
|
|
226
|
+
);
|
|
227
|
+
--_tone-fill-active: color-mix(
|
|
228
|
+
in srgb,
|
|
229
|
+
var(--fui-color-#{$tone}, #{$seed}) 80%,
|
|
230
|
+
var(--fui-color-#{$tone}-text, #{$text})
|
|
231
|
+
);
|
|
232
|
+
--_tone-fill-line: color-mix(
|
|
233
|
+
in srgb,
|
|
234
|
+
var(--fui-color-#{$tone}, #{$seed}) 76%,
|
|
235
|
+
var(--fui-color-#{$tone}-text, #{$text})
|
|
236
|
+
);
|
|
237
|
+
--_tone-fill-line-hover: color-mix(
|
|
238
|
+
in srgb,
|
|
239
|
+
var(--fui-color-#{$tone}, #{$seed}) 62%,
|
|
240
|
+
var(--fui-color-#{$tone}-text, #{$text})
|
|
241
|
+
);
|
|
242
|
+
--_tone-on-fill: color-mix(in srgb, var(--fui-color-#{$tone}, #{$seed}) 8%, white);
|
|
243
|
+
--_tone-ink: var(--fui-color-#{$tone}-text, #{$text});
|
|
244
|
+
--_tone-soft: var(--fui-color-#{$tone}-bg, #{$bg});
|
|
245
|
+
--_tone-soft-hover: color-mix(
|
|
246
|
+
in srgb,
|
|
247
|
+
var(--fui-color-#{$tone}-bg, #{$bg}) 90%,
|
|
248
|
+
var(--fui-color-#{$tone}-text, #{$text})
|
|
249
|
+
);
|
|
250
|
+
--_tone-soft-active: color-mix(
|
|
251
|
+
in srgb,
|
|
252
|
+
var(--fui-color-#{$tone}-bg, #{$bg}) 80%,
|
|
253
|
+
var(--fui-color-#{$tone}-text, #{$text})
|
|
254
|
+
);
|
|
255
|
+
--_tone-wash: var(--fui-color-#{$tone}-bg, #{$bg});
|
|
256
|
+
--_tone-wash-active: color-mix(
|
|
257
|
+
in srgb,
|
|
258
|
+
var(--fui-color-#{$tone}-bg, #{$bg}) 85%,
|
|
259
|
+
var(--fui-color-#{$tone}-text, #{$text})
|
|
260
|
+
);
|
|
261
|
+
--_tone-line: var(--fui-color-#{$tone}-border, #{$border});
|
|
262
|
+
--_tone-line-hover: var(--fui-color-#{$tone}-text, #{$text});
|
|
156
263
|
}
|
|
157
264
|
|
|
158
|
-
.
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
265
|
+
.toneInfo {
|
|
266
|
+
@include _semantic-tone(
|
|
267
|
+
"info",
|
|
268
|
+
$fui-color-info,
|
|
269
|
+
$fui-color-info-bg,
|
|
270
|
+
$fui-color-info-text,
|
|
271
|
+
$fui-color-info-border
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.toneSuccess {
|
|
276
|
+
@include _semantic-tone(
|
|
277
|
+
"success",
|
|
278
|
+
$fui-color-success,
|
|
279
|
+
$fui-color-success-bg,
|
|
280
|
+
$fui-color-success-text,
|
|
281
|
+
$fui-color-success-border
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.toneWarning {
|
|
286
|
+
@include _semantic-tone(
|
|
287
|
+
"warning",
|
|
288
|
+
$fui-color-warning,
|
|
289
|
+
$fui-color-warning-bg,
|
|
290
|
+
$fui-color-warning-text,
|
|
291
|
+
$fui-color-warning-border
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.toneDanger {
|
|
296
|
+
@include _semantic-tone(
|
|
297
|
+
"danger",
|
|
298
|
+
$fui-color-danger,
|
|
299
|
+
$fui-color-danger-bg,
|
|
300
|
+
$fui-color-danger-text,
|
|
301
|
+
$fui-color-danger-border
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// ============================================
|
|
306
|
+
// Variants — which channel paints which slot
|
|
307
|
+
// ============================================
|
|
308
|
+
|
|
309
|
+
.solid {
|
|
310
|
+
--_button-bg: var(--_tone-fill, var(--fui-bg-inverse, #{$fui-bg-inverse}));
|
|
311
|
+
--_button-bg-hover: var(--_tone-fill-hover, var(--fui-bg-inverse, #{$fui-bg-inverse}));
|
|
312
|
+
--_button-bg-active: var(--_tone-fill-active, var(--fui-bg-inverse, #{$fui-bg-inverse}));
|
|
313
|
+
--_button-border: var(--_tone-fill-line, var(--fui-bg-inverse, #{$fui-bg-inverse}));
|
|
314
|
+
--_button-border-hover: var(--_tone-fill-line-hover, var(--fui-bg-inverse, #{$fui-bg-inverse}));
|
|
315
|
+
--_button-color: var(--_tone-on-fill, var(--fui-text-inverse, #{$fui-text-inverse}));
|
|
316
|
+
--_button-shadow: var(--fui-button-primary-shadow, none);
|
|
317
|
+
--_button-shadow-hover: var(--fui-button-primary-shadow, none);
|
|
318
|
+
--_button-shadow-active: var(--fui-button-primary-shadow-active, none);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// Soft hierarchy comes from its fill. The transparent border preserves
|
|
322
|
+
// control geometry while leaving visible borders to `.outline`.
|
|
323
|
+
.soft {
|
|
324
|
+
--_button-bg: var(--_tone-soft, var(--fui-bg-tertiary, #{$fui-bg-tertiary}));
|
|
325
|
+
--_button-bg-hover: var(--_tone-soft-hover, var(--fui-bg-hover, #{$fui-bg-hover}));
|
|
326
|
+
--_button-bg-active: var(--_tone-soft-active, var(--fui-bg-active, #{$fui-bg-active}));
|
|
162
327
|
--_button-border: transparent;
|
|
163
328
|
--_button-border-hover: transparent;
|
|
164
|
-
--_button-color: var(--fui-text-primary, #{$fui-text-primary});
|
|
165
|
-
--_button-shadow: none;
|
|
166
|
-
--_button-shadow-hover: none;
|
|
167
|
-
--_button-shadow-active: none;
|
|
329
|
+
--_button-color: var(--_tone-ink, var(--fui-text-primary, #{$fui-text-primary}));
|
|
330
|
+
--_button-shadow: var(--fui-button-neutral-shadow, none);
|
|
331
|
+
--_button-shadow-hover: var(--fui-button-neutral-shadow, none);
|
|
332
|
+
--_button-shadow-active: var(--fui-button-neutral-shadow-active, none);
|
|
168
333
|
}
|
|
169
334
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
335
|
+
.outline {
|
|
336
|
+
--_button-bg: color-mix(in srgb, var(--fui-bg-elevated, #{$fui-bg-elevated}) 42%, transparent);
|
|
337
|
+
--_button-bg-hover: var(--_tone-wash, var(--fui-bg-hover, #{$fui-bg-hover}));
|
|
338
|
+
--_button-bg-active: var(--_tone-wash-active, var(--fui-bg-active, #{$fui-bg-active}));
|
|
339
|
+
--_button-border: var(--_tone-line, var(--fui-border-strong, #{$fui-border-strong}));
|
|
340
|
+
--_button-border-hover: var(--_tone-line-hover, var(--fui-border-strong, #{$fui-border-strong}));
|
|
341
|
+
--_button-color: var(--_tone-ink, var(--fui-text-primary, #{$fui-text-primary}));
|
|
342
|
+
--_button-shadow: var(--fui-button-outlined-shadow, #{$fui-button-outlined-shadow});
|
|
343
|
+
--_button-shadow-hover: var(--fui-button-neutral-shadow, none);
|
|
344
|
+
--_button-shadow-active: var(--fui-button-neutral-shadow-active, none);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.ghost {
|
|
174
348
|
--_button-bg: transparent;
|
|
175
|
-
--_button-bg-hover:
|
|
176
|
-
|
|
177
|
-
var(--fui-color-accent, #{$fui-color-accent}) 10%,
|
|
178
|
-
transparent
|
|
179
|
-
);
|
|
180
|
-
--_button-bg-active: color-mix(
|
|
181
|
-
in srgb,
|
|
182
|
-
var(--fui-color-accent, #{$fui-color-accent}) 18%,
|
|
183
|
-
transparent
|
|
184
|
-
);
|
|
349
|
+
--_button-bg-hover: var(--_tone-wash, var(--fui-bg-hover, #{$fui-bg-hover}));
|
|
350
|
+
--_button-bg-active: var(--_tone-wash-active, var(--fui-bg-active, #{$fui-bg-active}));
|
|
185
351
|
--_button-border: transparent;
|
|
186
352
|
--_button-border-hover: transparent;
|
|
187
|
-
--_button-color: var(--fui-
|
|
353
|
+
--_button-color: var(--_tone-ink, var(--fui-text-primary, #{$fui-text-primary}));
|
|
188
354
|
--_button-shadow: none;
|
|
189
355
|
--_button-shadow-hover: none;
|
|
190
356
|
--_button-shadow-active: none;
|
|
191
357
|
}
|
|
192
358
|
|
|
193
|
-
//
|
|
194
|
-
// but
|
|
195
|
-
//
|
|
196
|
-
|
|
197
|
-
// floor: there is no box to hold open, so it sits on the line it is in and
|
|
198
|
-
// takes its hit target from the text and the row's own padding. That makes it
|
|
199
|
-
// the wrong choice for a standalone action — reach for `ghost` there.
|
|
200
|
-
.quiet {
|
|
201
|
-
@include action.inline;
|
|
202
|
-
|
|
359
|
+
// Link: reads like a link, behaves like an action. Same open chrome as ghost,
|
|
360
|
+
// but it defaults to the accent tone and underlines on hover so a tertiary
|
|
361
|
+
// CTA ("View all →") is never mistaken for a toolbar ghost.
|
|
362
|
+
.link {
|
|
203
363
|
--_button-bg: transparent;
|
|
204
|
-
--_button-bg-hover:
|
|
205
|
-
--_button-bg-active:
|
|
364
|
+
--_button-bg-hover: var(--_tone-wash, var(--fui-bg-hover, #{$fui-bg-hover}));
|
|
365
|
+
--_button-bg-active: var(--_tone-wash-active, var(--fui-bg-active, #{$fui-bg-active}));
|
|
206
366
|
--_button-border: transparent;
|
|
207
367
|
--_button-border-hover: transparent;
|
|
208
|
-
--_button-color: var(--fui-
|
|
368
|
+
--_button-color: var(--_tone-ink, var(--fui-color-accent, #{$fui-color-accent}));
|
|
209
369
|
--_button-shadow: none;
|
|
210
370
|
--_button-shadow-hover: none;
|
|
211
371
|
--_button-shadow-active: none;
|
|
212
372
|
|
|
213
|
-
font-weight: var(--fui-font-weight-normal, $fui-font-weight-normal);
|
|
214
|
-
|
|
215
|
-
// Only the custom property is restated: `color` reads it on .button, so the
|
|
216
|
-
// foreground follows without a second `color` declaration to keep in step.
|
|
217
373
|
&:hover:not(:disabled):not([data-disabled]) {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
&:active:not(:disabled):not([data-disabled]),
|
|
222
|
-
&[data-pressed] {
|
|
223
|
-
--_button-color: var(--fui-text-primary, #{$fui-text-primary});
|
|
374
|
+
text-decoration: underline;
|
|
375
|
+
text-underline-offset: var(--fui-raw-space-2, #{measurements.raw-space(2)});
|
|
224
376
|
}
|
|
225
377
|
}
|
|
226
378
|
|
|
227
|
-
.danger {
|
|
228
|
-
// Flat danger fill — no gradient. Hover/active darken the solid colour.
|
|
229
|
-
--_button-bg: var(--fui-color-danger, #{$fui-color-danger});
|
|
230
|
-
--_button-bg-hover: color-mix(
|
|
231
|
-
in srgb,
|
|
232
|
-
var(--fui-color-danger, #{$fui-color-danger}) 88%,
|
|
233
|
-
black 12%
|
|
234
|
-
);
|
|
235
|
-
--_button-bg-active: color-mix(
|
|
236
|
-
in srgb,
|
|
237
|
-
var(--fui-color-danger, #{$fui-color-danger}) 80%,
|
|
238
|
-
black 20%
|
|
239
|
-
);
|
|
240
|
-
--_button-border: color-mix(
|
|
241
|
-
in srgb,
|
|
242
|
-
var(--fui-color-danger, #{$fui-color-danger}) 76%,
|
|
243
|
-
black 24%
|
|
244
|
-
);
|
|
245
|
-
--_button-border-hover: color-mix(
|
|
246
|
-
in srgb,
|
|
247
|
-
var(--fui-color-danger, #{$fui-color-danger}) 62%,
|
|
248
|
-
black 38%
|
|
249
|
-
);
|
|
250
|
-
--_button-color: color-mix(in srgb, var(--fui-color-danger, #{$fui-color-danger}) 8%, white);
|
|
251
|
-
--_button-shadow: var(--fui-button-primary-shadow);
|
|
252
|
-
--_button-shadow-hover: var(--fui-button-primary-shadow);
|
|
253
|
-
--_button-shadow-active: var(--fui-button-primary-shadow-active);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.outlined {
|
|
257
|
-
--_button-bg: color-mix(in srgb, var(--fui-bg-elevated, #{$fui-bg-elevated}) 42%, transparent);
|
|
258
|
-
--_button-bg-hover: var(--fui-button-neutral-bg-hover);
|
|
259
|
-
--_button-bg-active: var(--fui-button-neutral-bg-active);
|
|
260
|
-
--_button-border: var(--fui-button-neutral-border);
|
|
261
|
-
--_button-border-hover: var(--fui-button-neutral-border-hover);
|
|
262
|
-
--_button-color: var(--fui-button-neutral-color, var(--fui-text-primary, #{$fui-text-primary}));
|
|
263
|
-
--_button-shadow: var(--fui-button-outlined-shadow, #{$fui-button-outlined-shadow});
|
|
264
|
-
--_button-shadow-hover: var(--fui-button-neutral-shadow);
|
|
265
|
-
--_button-shadow-active: var(--fui-button-neutral-shadow-active);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
379
|
// Icon-only button (square aspect ratio)
|
|
269
380
|
.icon {
|
|
270
|
-
inline-size: var(--_fui-action-track);
|
|
271
|
-
block-size: var(--_fui-action-track);
|
|
272
|
-
min-block-size: var(--_fui-action-track);
|
|
273
|
-
padding-inline: 0;
|
|
381
|
+
inline-size: var(--_fui-action-track, #{action.track("md")});
|
|
382
|
+
block-size: var(--_fui-action-track, #{action.track("md")});
|
|
383
|
+
min-block-size: var(--_fui-action-track, #{action.track("md")});
|
|
384
|
+
padding-inline: var(--fui-raw-space-0, #{measurements.raw-space(0)});
|
|
274
385
|
}
|
|
275
386
|
|
|
276
387
|
// Full width
|
|
@@ -278,10 +389,6 @@
|
|
|
278
389
|
width: 100%;
|
|
279
390
|
}
|
|
280
391
|
|
|
281
|
-
// ============================================
|
|
282
|
-
// Accessibility: High Contrast Mode
|
|
283
|
-
// ============================================
|
|
284
|
-
|
|
285
392
|
// ============================================
|
|
286
393
|
// Accessibility: Reduced Motion
|
|
287
394
|
// ============================================
|
|
@@ -291,35 +398,3 @@
|
|
|
291
398
|
transition: none;
|
|
292
399
|
}
|
|
293
400
|
}
|
|
294
|
-
|
|
295
|
-
// ============================================
|
|
296
|
-
// Accessibility: High Contrast Mode
|
|
297
|
-
// ============================================
|
|
298
|
-
|
|
299
|
-
@media (prefers-contrast: more) {
|
|
300
|
-
.secondary {
|
|
301
|
-
border-width: var(--fui-stroke-default, 2px);
|
|
302
|
-
border-color: var(--fui-text-primary, $fui-text-primary);
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.outlined {
|
|
306
|
-
border-width: var(--fui-stroke-default, 2px);
|
|
307
|
-
border-color: var(--fui-text-primary, $fui-text-primary);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.ghost {
|
|
311
|
-
border-width: var(--fui-stroke-default, 2px);
|
|
312
|
-
|
|
313
|
-
&:hover:not(:disabled) {
|
|
314
|
-
border-color: var(--fui-text-primary, $fui-text-primary);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
.link {
|
|
319
|
-
border-width: var(--fui-stroke-default, 2px);
|
|
320
|
-
|
|
321
|
-
&:hover:not(:disabled) {
|
|
322
|
-
border-color: var(--fui-color-accent, $fui-color-accent);
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
}
|
|
@@ -22,31 +22,31 @@ function composeEventHandlers<T extends (...args: any[]) => void>(
|
|
|
22
22
|
* Button props.
|
|
23
23
|
* @see https://usefragments.com/components/button
|
|
24
24
|
*/
|
|
25
|
+
export type ButtonVariant = "solid" | "soft" | "outline" | "ghost" | "link";
|
|
26
|
+
export type ButtonTone = "neutral" | "accent" | "info" | "success" | "warning" | "danger";
|
|
27
|
+
export type ButtonSize = "sm" | "md" | "lg";
|
|
28
|
+
|
|
25
29
|
type ButtonBaseProps = {
|
|
26
30
|
children: React.ReactNode;
|
|
27
|
-
/**
|
|
28
|
-
* @default "
|
|
31
|
+
/** Chrome family.
|
|
32
|
+
* @default "solid"
|
|
29
33
|
* @see https://usefragments.com/components/button#variants
|
|
30
34
|
* @remarks
|
|
31
|
-
* - `"
|
|
32
|
-
* - `"
|
|
33
|
-
* - `"
|
|
34
|
-
* - `"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
| "outlined"
|
|
43
|
-
| "outline"
|
|
44
|
-
| "icon";
|
|
45
|
-
/** Button size. `"xs"` is for inline row-action controls (accept/dismiss, table-row icons) where `"sm"` is too tall.
|
|
35
|
+
* - `"solid"` — filled; the one action you want taken here
|
|
36
|
+
* - `"soft"` — tinted fill, no border; supporting actions
|
|
37
|
+
* - `"outline"` — hairline border on a transparent surface
|
|
38
|
+
* - `"ghost"` — no fill, no border; dense toolbars and repeated rows
|
|
39
|
+
* - `"link"` — reads like a link, behaves like an action; tertiary CTAs */
|
|
40
|
+
variant?: ButtonVariant;
|
|
41
|
+
/** Colour. Defaults to `"accent"` on `solid` and `link`, `"neutral"` on
|
|
42
|
+
* `soft`, `outline` and `ghost`.
|
|
43
|
+
* @see https://usefragments.com/components/button#tones */
|
|
44
|
+
tone?: ButtonTone;
|
|
45
|
+
/** Control height.
|
|
46
46
|
* @default "md"
|
|
47
47
|
* @see https://usefragments.com/components/button#sizes */
|
|
48
|
-
size?:
|
|
49
|
-
/** Render as icon-only button (square aspect ratio).
|
|
48
|
+
size?: ButtonSize;
|
|
49
|
+
/** Render as icon-only button (square aspect ratio). Always pass `aria-label`. */
|
|
50
50
|
icon?: boolean;
|
|
51
51
|
/** Make button full width of container */
|
|
52
52
|
fullWidth?: boolean;
|
|
@@ -55,6 +55,23 @@ type ButtonBaseProps = {
|
|
|
55
55
|
asChild?: boolean;
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
+
const DEFAULT_TONE: Record<ButtonVariant, ButtonTone> = {
|
|
59
|
+
solid: "accent",
|
|
60
|
+
link: "accent",
|
|
61
|
+
soft: "neutral",
|
|
62
|
+
outline: "neutral",
|
|
63
|
+
ghost: "neutral",
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const TONE_CLASS: Record<ButtonTone, string> = {
|
|
67
|
+
neutral: styles.toneNeutral,
|
|
68
|
+
accent: styles.toneAccent,
|
|
69
|
+
info: styles.toneInfo,
|
|
70
|
+
success: styles.toneSuccess,
|
|
71
|
+
warning: styles.toneWarning,
|
|
72
|
+
danger: styles.toneDanger,
|
|
73
|
+
};
|
|
74
|
+
|
|
58
75
|
// Button as native button element
|
|
59
76
|
export interface ButtonAsButtonProps
|
|
60
77
|
extends ButtonBaseProps, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
@@ -73,7 +90,8 @@ const ButtonRoot = React.forwardRef<HTMLButtonElement | HTMLAnchorElement, Butto
|
|
|
73
90
|
function Button(props, ref) {
|
|
74
91
|
const {
|
|
75
92
|
children,
|
|
76
|
-
variant
|
|
93
|
+
variant = "solid",
|
|
94
|
+
tone: toneProp,
|
|
77
95
|
size: sizeProp,
|
|
78
96
|
icon = false,
|
|
79
97
|
fullWidth = false,
|
|
@@ -83,20 +101,15 @@ const ButtonRoot = React.forwardRef<HTMLButtonElement | HTMLAnchorElement, Butto
|
|
|
83
101
|
} = props;
|
|
84
102
|
|
|
85
103
|
const size = useResolvedControlSize(sizeProp);
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
// Resolve aliases:
|
|
89
|
-
// "outline" → "outlined"
|
|
90
|
-
// "icon" → visual "outlined" + icon-only sizing
|
|
91
|
-
const variant =
|
|
92
|
-
variantProp === "outline" ? "outlined" : variantProp === "icon" ? "outlined" : variantProp;
|
|
104
|
+
const tone = toneProp ?? DEFAULT_TONE[variant];
|
|
93
105
|
const canonicalStamp = fragmentsCanonicalStampProps("Button");
|
|
94
106
|
|
|
95
107
|
const classNames = [
|
|
96
108
|
styles.button,
|
|
97
109
|
styles[size],
|
|
98
110
|
styles[variant],
|
|
99
|
-
|
|
111
|
+
TONE_CLASS[tone],
|
|
112
|
+
icon && styles.icon,
|
|
100
113
|
fullWidth && styles.fullWidth,
|
|
101
114
|
className,
|
|
102
115
|
]
|