@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
|
@@ -50,13 +50,11 @@ export interface RadioGroupProps extends Omit<
|
|
|
50
50
|
/** Size variant */
|
|
51
51
|
size?: "sm" | "md" | "lg";
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* tucked inside. Useful for high-stakes choices, surveys, plan pickers.
|
|
57
|
-
* @default "default"
|
|
53
|
+
* Chrome. Omit it for the inline radio circle next to a label (form-control
|
|
54
|
+
* style); `outline` renders each item as a full-width bordered surface with
|
|
55
|
+
* the radio circle tucked inside — high-stakes choices, surveys, plan pickers.
|
|
58
56
|
*/
|
|
59
|
-
variant?: "
|
|
57
|
+
variant?: "outline";
|
|
60
58
|
/** Class applied to the outer wrapper (label + group + error) */
|
|
61
59
|
wrapperClassName?: string;
|
|
62
60
|
/** Class applied to the inner radio group container */
|
|
@@ -76,6 +74,12 @@ export interface RadioItemProps {
|
|
|
76
74
|
helperText?: string;
|
|
77
75
|
/** @deprecated Use helperText instead. Description text below the label. */
|
|
78
76
|
description?: string;
|
|
77
|
+
/**
|
|
78
|
+
* A value at the end of the row, on the label's line — a price, a count,
|
|
79
|
+
* a date. Read by the label's accessible name, so keep it short and put
|
|
80
|
+
* the explanation in `helperText`.
|
|
81
|
+
*/
|
|
82
|
+
trailing?: React.ReactNode;
|
|
79
83
|
/** Whether this item is disabled */
|
|
80
84
|
disabled?: boolean;
|
|
81
85
|
/** Accessible name for icon-only mode */
|
|
@@ -97,7 +101,7 @@ export interface RadioItemProps {
|
|
|
97
101
|
// ============================================
|
|
98
102
|
|
|
99
103
|
const RadioSizeContext = React.createContext<ControlSize>("md");
|
|
100
|
-
const RadioVariantContext = React.createContext<"
|
|
104
|
+
const RadioVariantContext = React.createContext<"outline" | undefined>(undefined);
|
|
101
105
|
|
|
102
106
|
// ============================================
|
|
103
107
|
// Radio Item Component
|
|
@@ -108,6 +112,7 @@ function RadioItem({
|
|
|
108
112
|
label,
|
|
109
113
|
helperText,
|
|
110
114
|
description,
|
|
115
|
+
trailing,
|
|
111
116
|
disabled = false,
|
|
112
117
|
"aria-label": ariaLabel,
|
|
113
118
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -122,6 +127,7 @@ function RadioItem({
|
|
|
122
127
|
const id = React.useId();
|
|
123
128
|
const labelId = label ? `radio-label-${id}` : undefined;
|
|
124
129
|
const descriptionId = resolvedHelperText ? `radio-desc-${id}` : undefined;
|
|
130
|
+
const trailingId = trailing != null ? `radio-trailing-${id}` : undefined;
|
|
125
131
|
|
|
126
132
|
const radioClasses = [
|
|
127
133
|
styles.radio,
|
|
@@ -134,7 +140,7 @@ function RadioItem({
|
|
|
134
140
|
|
|
135
141
|
const wrapperClasses = [
|
|
136
142
|
styles.itemWrapper,
|
|
137
|
-
variant === "
|
|
143
|
+
variant === "outline" && styles.itemWrapperOutline,
|
|
138
144
|
className,
|
|
139
145
|
]
|
|
140
146
|
.filter(Boolean)
|
|
@@ -162,13 +168,14 @@ function RadioItem({
|
|
|
162
168
|
className={wrapperClasses}
|
|
163
169
|
data-disabled={disabled || undefined}
|
|
164
170
|
data-has-description={resolvedHelperText ? true : undefined}
|
|
171
|
+
data-has-trailing={trailing != null ? true : undefined}
|
|
165
172
|
data-size={size}
|
|
166
173
|
>
|
|
167
174
|
<BaseRadio.Root
|
|
168
175
|
value={value}
|
|
169
176
|
disabled={disabled}
|
|
170
177
|
aria-label={ariaLabel}
|
|
171
|
-
aria-labelledby={mergeAriaIds(ariaLabelledBy, labelId)}
|
|
178
|
+
aria-labelledby={mergeAriaIds(ariaLabelledBy, labelId, trailingId)}
|
|
172
179
|
aria-describedby={mergeAriaIds(ariaDescribedBy, descriptionId)}
|
|
173
180
|
data-size={size}
|
|
174
181
|
className={radioClasses}
|
|
@@ -185,6 +192,11 @@ function RadioItem({
|
|
|
185
192
|
</span>
|
|
186
193
|
)}
|
|
187
194
|
</div>
|
|
195
|
+
{trailing != null && (
|
|
196
|
+
<span id={trailingId} className={styles.trailing}>
|
|
197
|
+
{trailing}
|
|
198
|
+
</span>
|
|
199
|
+
)}
|
|
188
200
|
</label>
|
|
189
201
|
);
|
|
190
202
|
}
|
|
@@ -210,7 +222,7 @@ const RadioGroupRoot = React.forwardRef<HTMLDivElement, RadioGroupProps>(functio
|
|
|
210
222
|
helperText,
|
|
211
223
|
error,
|
|
212
224
|
size: sizeProp,
|
|
213
|
-
variant
|
|
225
|
+
variant,
|
|
214
226
|
wrapperClassName,
|
|
215
227
|
groupClassName,
|
|
216
228
|
groupId,
|
|
@@ -266,6 +278,7 @@ const RadioGroupRoot = React.forwardRef<HTMLDivElement, RadioGroupProps>(functio
|
|
|
266
278
|
aria-describedby={mergeAriaIds(ariaDescribedBy, errorId, helperId)}
|
|
267
279
|
data-size={size}
|
|
268
280
|
data-invalid={hasError || undefined}
|
|
281
|
+
aria-invalid={hasError || undefined}
|
|
269
282
|
className={groupClasses}
|
|
270
283
|
>
|
|
271
284
|
{children}
|
|
@@ -1,46 +1,43 @@
|
|
|
1
1
|
@use "../../tokens/measurements.generated" as measurements;
|
|
2
2
|
@use "../../tokens/variables" as *;
|
|
3
3
|
|
|
4
|
+
$_track-size: measurements.raw-space(6);
|
|
5
|
+
$_inline-fade: measurements.raw-space(48);
|
|
6
|
+
$_block-fade: measurements.raw-space(32);
|
|
7
|
+
$_mask-none: linear-gradient(black, black);
|
|
8
|
+
|
|
4
9
|
.root {
|
|
5
|
-
--
|
|
6
|
-
--
|
|
7
|
-
--
|
|
8
|
-
--_fui-scrollarea-track-size: var(
|
|
9
|
-
--fui-scrollarea-track-size,
|
|
10
|
-
var(--fui-raw-space-6, #{measurements.raw-space(6)})
|
|
11
|
-
);
|
|
12
|
-
--_fui-scrollarea-inline-fade: var(
|
|
13
|
-
--fui-scrollarea-inline-fade,
|
|
14
|
-
var(--fui-raw-space-48, #{measurements.raw-space(48)})
|
|
15
|
-
);
|
|
16
|
-
--_fui-scrollarea-block-fade: var(
|
|
17
|
-
--fui-scrollarea-block-fade,
|
|
18
|
-
var(--fui-raw-space-32, #{measurements.raw-space(32)})
|
|
19
|
-
);
|
|
10
|
+
--_fui-scrollarea-track-size: var(--fui-raw-space-6, #{$_track-size});
|
|
11
|
+
--_fui-scrollarea-inline-fade: var(--fui-raw-space-48, #{$_inline-fade});
|
|
12
|
+
--_fui-scrollarea-block-fade: var(--fui-raw-space-32, #{$_block-fade});
|
|
20
13
|
|
|
21
14
|
position: relative;
|
|
22
15
|
overflow: hidden;
|
|
23
16
|
}
|
|
24
17
|
|
|
25
18
|
.viewport {
|
|
26
|
-
--_fui-scrollarea-inline-mask:
|
|
27
|
-
--_fui-scrollarea-block-mask:
|
|
19
|
+
--_fui-scrollarea-inline-mask: #{$_mask-none};
|
|
20
|
+
--_fui-scrollarea-block-mask: #{$_mask-none};
|
|
28
21
|
|
|
29
22
|
inline-size: 100%;
|
|
30
23
|
block-size: 100%;
|
|
31
24
|
overflow: hidden;
|
|
32
25
|
scrollbar-width: thin;
|
|
33
26
|
scrollbar-color: transparent transparent;
|
|
34
|
-
mask-image:
|
|
27
|
+
mask-image:
|
|
28
|
+
var(--_fui-scrollarea-inline-mask, #{$_mask-none}),
|
|
29
|
+
var(--_fui-scrollarea-block-mask, #{$_mask-none});
|
|
35
30
|
mask-repeat: no-repeat;
|
|
36
31
|
mask-size: 100% 100%;
|
|
37
32
|
mask-composite: intersect;
|
|
38
|
-
-webkit-mask-image:
|
|
33
|
+
-webkit-mask-image:
|
|
34
|
+
var(--_fui-scrollarea-inline-mask, #{$_mask-none}),
|
|
35
|
+
var(--_fui-scrollarea-block-mask, #{$_mask-none});
|
|
39
36
|
-webkit-mask-composite: source-in;
|
|
40
37
|
|
|
41
38
|
&::-webkit-scrollbar {
|
|
42
|
-
width: var(--_fui-scrollarea-track-size);
|
|
43
|
-
height: var(--_fui-scrollarea-track-size);
|
|
39
|
+
width: var(--_fui-scrollarea-track-size, #{$_track-size});
|
|
40
|
+
height: var(--_fui-scrollarea-track-size, #{$_track-size});
|
|
44
41
|
}
|
|
45
42
|
|
|
46
43
|
&::-webkit-scrollbar-track {
|
|
@@ -84,18 +81,18 @@
|
|
|
84
81
|
|
|
85
82
|
.horizontal:not([data-scroll-x="none"]),
|
|
86
83
|
.both:not([data-scroll-x="none"]) {
|
|
87
|
-
scroll-padding-inline: var(--_fui-scrollarea-inline-fade);
|
|
84
|
+
scroll-padding-inline: var(--_fui-scrollarea-inline-fade, #{$_inline-fade});
|
|
88
85
|
}
|
|
89
86
|
|
|
90
87
|
.vertical:not([data-scroll-y="none"]),
|
|
91
88
|
.both:not([data-scroll-y="none"]) {
|
|
92
|
-
scroll-padding-block: var(--_fui-scrollarea-block-fade);
|
|
89
|
+
scroll-padding-block: var(--_fui-scrollarea-block-fade, #{$_block-fade});
|
|
93
90
|
}
|
|
94
91
|
|
|
95
92
|
.viewport[data-scroll-x="end"] {
|
|
96
93
|
--_fui-scrollarea-inline-mask: linear-gradient(
|
|
97
94
|
to right,
|
|
98
|
-
black calc(100% - var(--_fui-scrollarea-inline-fade)),
|
|
95
|
+
black calc(100% - var(--_fui-scrollarea-inline-fade, #{$_inline-fade})),
|
|
99
96
|
transparent
|
|
100
97
|
);
|
|
101
98
|
}
|
|
@@ -104,7 +101,7 @@
|
|
|
104
101
|
--_fui-scrollarea-inline-mask: linear-gradient(
|
|
105
102
|
to right,
|
|
106
103
|
transparent,
|
|
107
|
-
black var(--_fui-scrollarea-inline-fade)
|
|
104
|
+
black var(--_fui-scrollarea-inline-fade, #{$_inline-fade})
|
|
108
105
|
);
|
|
109
106
|
}
|
|
110
107
|
|
|
@@ -112,8 +109,8 @@
|
|
|
112
109
|
--_fui-scrollarea-inline-mask: linear-gradient(
|
|
113
110
|
to right,
|
|
114
111
|
transparent,
|
|
115
|
-
black var(--_fui-scrollarea-inline-fade),
|
|
116
|
-
black calc(100% - var(--_fui-scrollarea-inline-fade)),
|
|
112
|
+
black var(--_fui-scrollarea-inline-fade, #{$_inline-fade}),
|
|
113
|
+
black calc(100% - var(--_fui-scrollarea-inline-fade, #{$_inline-fade})),
|
|
117
114
|
transparent
|
|
118
115
|
);
|
|
119
116
|
}
|
|
@@ -122,14 +119,14 @@
|
|
|
122
119
|
--_fui-scrollarea-inline-mask: linear-gradient(
|
|
123
120
|
to right,
|
|
124
121
|
transparent,
|
|
125
|
-
black var(--_fui-scrollarea-inline-fade)
|
|
122
|
+
black var(--_fui-scrollarea-inline-fade, #{$_inline-fade})
|
|
126
123
|
);
|
|
127
124
|
}
|
|
128
125
|
|
|
129
126
|
.viewport[data-scroll-x="start"]:dir(rtl) {
|
|
130
127
|
--_fui-scrollarea-inline-mask: linear-gradient(
|
|
131
128
|
to right,
|
|
132
|
-
black calc(100% - var(--_fui-scrollarea-inline-fade)),
|
|
129
|
+
black calc(100% - var(--_fui-scrollarea-inline-fade, #{$_inline-fade})),
|
|
133
130
|
transparent
|
|
134
131
|
);
|
|
135
132
|
}
|
|
@@ -137,7 +134,7 @@
|
|
|
137
134
|
.viewport[data-scroll-y="end"] {
|
|
138
135
|
--_fui-scrollarea-block-mask: linear-gradient(
|
|
139
136
|
to bottom,
|
|
140
|
-
black calc(100% - var(--_fui-scrollarea-block-fade)),
|
|
137
|
+
black calc(100% - var(--_fui-scrollarea-block-fade, #{$_block-fade})),
|
|
141
138
|
transparent
|
|
142
139
|
);
|
|
143
140
|
}
|
|
@@ -146,7 +143,7 @@
|
|
|
146
143
|
--_fui-scrollarea-block-mask: linear-gradient(
|
|
147
144
|
to bottom,
|
|
148
145
|
transparent,
|
|
149
|
-
black var(--_fui-scrollarea-block-fade)
|
|
146
|
+
black var(--_fui-scrollarea-block-fade, #{$_block-fade})
|
|
150
147
|
);
|
|
151
148
|
}
|
|
152
149
|
|
|
@@ -154,8 +151,8 @@
|
|
|
154
151
|
--_fui-scrollarea-block-mask: linear-gradient(
|
|
155
152
|
to bottom,
|
|
156
153
|
transparent,
|
|
157
|
-
black var(--_fui-scrollarea-block-fade),
|
|
158
|
-
black calc(100% - var(--_fui-scrollarea-block-fade)),
|
|
154
|
+
black var(--_fui-scrollarea-block-fade, #{$_block-fade}),
|
|
155
|
+
black calc(100% - var(--_fui-scrollarea-block-fade, #{$_block-fade})),
|
|
159
156
|
transparent
|
|
160
157
|
);
|
|
161
158
|
}
|
|
@@ -37,9 +37,25 @@
|
|
|
37
37
|
min-width: layout.measure("field-minimum");
|
|
38
38
|
text-align: left;
|
|
39
39
|
|
|
40
|
+
&:focus-visible,
|
|
40
41
|
&[data-popup-open] {
|
|
41
|
-
|
|
42
|
+
@include field.focus-state;
|
|
42
43
|
}
|
|
44
|
+
|
|
45
|
+
.wrapper[data-invalid] & {
|
|
46
|
+
@include field.invalid-state;
|
|
47
|
+
|
|
48
|
+
// Focused while invalid keeps the danger edge and takes the danger ring,
|
|
49
|
+
// the same pairing Input and Textarea render. Without it the ring stays
|
|
50
|
+
// accent-coloured and the control reads half-valid at the moment the user
|
|
51
|
+
// is actually in it.
|
|
52
|
+
&:focus-visible,
|
|
53
|
+
&[data-popup-open] {
|
|
54
|
+
@include field.invalid-focus-state;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@include high-contrast-outline;
|
|
43
59
|
}
|
|
44
60
|
|
|
45
61
|
// Trigger size variants
|
|
@@ -94,7 +110,7 @@
|
|
|
94
110
|
&:disabled,
|
|
95
111
|
&[data-disabled] {
|
|
96
112
|
background-color: transparent;
|
|
97
|
-
opacity:
|
|
113
|
+
opacity: var(--fui-opacity-disabled, #{$fui-opacity-disabled});
|
|
98
114
|
}
|
|
99
115
|
}
|
|
100
116
|
|
|
@@ -169,7 +185,7 @@
|
|
|
169
185
|
|
|
170
186
|
// Positioner — z-index must exceed Dialog positioner (51)
|
|
171
187
|
.positioner {
|
|
172
|
-
z-index:
|
|
188
|
+
z-index: var(--fui-overlay-layer-anchored, #{$fui-overlay-layer-anchored});
|
|
173
189
|
outline: none;
|
|
174
190
|
}
|
|
175
191
|
|
|
@@ -253,21 +269,6 @@
|
|
|
253
269
|
@include popup.group-label;
|
|
254
270
|
}
|
|
255
271
|
|
|
256
|
-
// ============================================
|
|
257
|
-
// Accessibility: High Contrast Mode
|
|
258
|
-
// ============================================
|
|
259
|
-
|
|
260
|
-
@media (prefers-contrast: more) {
|
|
261
|
-
.trigger {
|
|
262
|
-
border-width: var(--fui-stroke-default, 2px);
|
|
263
|
-
border-color: var(--fui-text-primary, $fui-text-primary);
|
|
264
|
-
|
|
265
|
-
&[data-popup-open] {
|
|
266
|
-
border-color: var(--fui-color-accent, $fui-color-accent);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
272
|
// ============================================
|
|
272
273
|
// Accessibility: Reduced Motion
|
|
273
274
|
// ============================================
|
|
@@ -4,10 +4,7 @@ import * as React from "react";
|
|
|
4
4
|
import { Select as BaseSelect } from "@base-ui/react/select";
|
|
5
5
|
import { useResolvedControlSize } from "../ComponentDefaults";
|
|
6
6
|
import { mergeAriaIds, useFormFieldIds, type FormFieldProps } from "../../utils/aria";
|
|
7
|
-
import {
|
|
8
|
-
POPUP_OFFSET_PX,
|
|
9
|
-
resolvePopupViewportRows,
|
|
10
|
-
} from "../../recipes/popup";
|
|
7
|
+
import { POPUP_OFFSET_PX, resolvePopupViewportRows } from "../../recipes/popup";
|
|
11
8
|
import styles from "./Select.module.scss";
|
|
12
9
|
|
|
13
10
|
// ============================================
|
|
@@ -16,7 +13,7 @@ import styles from "./Select.module.scss";
|
|
|
16
13
|
|
|
17
14
|
export type SelectValue = string;
|
|
18
15
|
|
|
19
|
-
export type SelectVariant = "
|
|
16
|
+
export type SelectVariant = "outline" | "ghost";
|
|
20
17
|
|
|
21
18
|
export interface SelectOption {
|
|
22
19
|
value: SelectValue;
|
|
@@ -68,10 +65,10 @@ export interface SelectProps extends FormFieldProps {
|
|
|
68
65
|
/** Size variant.
|
|
69
66
|
* @default "md" */
|
|
70
67
|
size?: "sm" | "md" | "lg";
|
|
71
|
-
/**
|
|
72
|
-
* control — for toolbars and dense rows, where a bordered
|
|
73
|
-
* form. Pair with `size="sm"`.
|
|
74
|
-
* @default "
|
|
68
|
+
/** Chrome. `outline` is the bordered field shell; `ghost` drops it for a
|
|
69
|
+
* compact, borderless control — for toolbars and dense rows, where a bordered
|
|
70
|
+
* field reads as a form. Pair with `size="sm"`.
|
|
71
|
+
* @default "outline" */
|
|
75
72
|
variant?: SelectVariant;
|
|
76
73
|
/** Wrapper class name */
|
|
77
74
|
className?: string;
|
|
@@ -163,6 +160,9 @@ interface SelectContextValue {
|
|
|
163
160
|
unregisterItem: (value: SelectValue) => void;
|
|
164
161
|
size: "sm" | "md" | "lg";
|
|
165
162
|
variant: SelectVariant;
|
|
163
|
+
/** Mirrors the wrapper's `data-invalid` onto the trigger as `aria-invalid`,
|
|
164
|
+
* so assistive tech hears the state the danger edge is painting. */
|
|
165
|
+
invalid?: boolean;
|
|
166
166
|
/** Items built from the `options` prop, so a custom composition can put the
|
|
167
167
|
* trigger where it wants without having to re-render the list itself — and
|
|
168
168
|
* without losing whatever the root knows about an option that a bare label
|
|
@@ -175,7 +175,7 @@ const SelectContext = React.createContext<SelectContextValue>({
|
|
|
175
175
|
registerItem: () => {},
|
|
176
176
|
unregisterItem: () => {},
|
|
177
177
|
size: "md",
|
|
178
|
-
variant: "
|
|
178
|
+
variant: "outline",
|
|
179
179
|
optionItems: null,
|
|
180
180
|
});
|
|
181
181
|
|
|
@@ -234,7 +234,7 @@ const SelectRoot = React.forwardRef<HTMLDivElement, SelectProps>(function Select
|
|
|
234
234
|
helperText,
|
|
235
235
|
error,
|
|
236
236
|
size: sizeProp,
|
|
237
|
-
variant = "
|
|
237
|
+
variant = "outline",
|
|
238
238
|
className,
|
|
239
239
|
}: SelectProps,
|
|
240
240
|
ref
|
|
@@ -320,6 +320,12 @@ const SelectRoot = React.forwardRef<HTMLDivElement, SelectProps>(function Select
|
|
|
320
320
|
return merged;
|
|
321
321
|
}, [declaredItems, items]);
|
|
322
322
|
|
|
323
|
+
const { helperId, errorId, hasError, errorMessage } = useFormFieldIds("select", {
|
|
324
|
+
label,
|
|
325
|
+
helperText,
|
|
326
|
+
error,
|
|
327
|
+
});
|
|
328
|
+
|
|
323
329
|
const contextValue = React.useMemo(
|
|
324
330
|
() => ({
|
|
325
331
|
placeholder,
|
|
@@ -330,6 +336,7 @@ const SelectRoot = React.forwardRef<HTMLDivElement, SelectProps>(function Select
|
|
|
330
336
|
size,
|
|
331
337
|
variant,
|
|
332
338
|
optionItems,
|
|
339
|
+
invalid: hasError,
|
|
333
340
|
}),
|
|
334
341
|
[
|
|
335
342
|
placeholder,
|
|
@@ -340,27 +347,18 @@ const SelectRoot = React.forwardRef<HTMLDivElement, SelectProps>(function Select
|
|
|
340
347
|
size,
|
|
341
348
|
variant,
|
|
342
349
|
optionItems,
|
|
350
|
+
hasError,
|
|
343
351
|
]
|
|
344
352
|
);
|
|
345
353
|
|
|
346
|
-
const
|
|
347
|
-
label,
|
|
348
|
-
helperText,
|
|
349
|
-
error,
|
|
350
|
-
});
|
|
351
|
-
|
|
352
|
-
const wrapperClasses = [
|
|
353
|
-
styles.wrapper,
|
|
354
|
-
variant === "ghost" && styles.wrapperGhost,
|
|
355
|
-
className,
|
|
356
|
-
]
|
|
354
|
+
const wrapperClasses = [styles.wrapper, variant === "ghost" && styles.wrapperGhost, className]
|
|
357
355
|
.filter(Boolean)
|
|
358
356
|
.join(" ");
|
|
359
357
|
const helperClasses = [styles.helper, hasError && styles.helperError].filter(Boolean).join(" ");
|
|
360
358
|
|
|
361
359
|
return (
|
|
362
360
|
<SelectContext.Provider value={contextValue}>
|
|
363
|
-
<div ref={ref} className={wrapperClasses}>
|
|
361
|
+
<div ref={ref} className={wrapperClasses} data-invalid={hasError || undefined}>
|
|
364
362
|
<BaseSelect.Root
|
|
365
363
|
value={value !== undefined || readOnly ? selectedValue : undefined}
|
|
366
364
|
defaultValue={value === undefined && !readOnly ? defaultValue : undefined}
|
|
@@ -427,7 +425,11 @@ function SelectTrigger({
|
|
|
427
425
|
(placeholderText ? <span className={styles.placeholder}>{placeholderText}</span> : null);
|
|
428
426
|
|
|
429
427
|
return (
|
|
430
|
-
<BaseSelect.Trigger
|
|
428
|
+
<BaseSelect.Trigger
|
|
429
|
+
{...htmlProps}
|
|
430
|
+
className={classes}
|
|
431
|
+
aria-invalid={context.invalid || undefined}
|
|
432
|
+
>
|
|
431
433
|
{children ?? (
|
|
432
434
|
<>
|
|
433
435
|
{icon && <span className={styles.triggerIcon}>{icon}</span>}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"exportName": "Separator",
|
|
10
10
|
"propsSummary": [
|
|
11
11
|
"orientation: horizontal|vertical (default: horizontal)",
|
|
12
|
-
"
|
|
12
|
+
"gap: none|xs|sm|md|lg|xl (default: none)",
|
|
13
13
|
"soft: boolean (default: false)",
|
|
14
14
|
"label: string",
|
|
15
15
|
"style: object"
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"required": false,
|
|
23
23
|
"values": ["horizontal", "vertical"]
|
|
24
24
|
},
|
|
25
|
-
"
|
|
25
|
+
"gap": {
|
|
26
26
|
"type": "enum",
|
|
27
|
-
"description": "
|
|
27
|
+
"description": "Breathing room around the rule",
|
|
28
28
|
"default": "none",
|
|
29
29
|
"required": false,
|
|
30
|
-
"values": ["none", "sm", "md", "lg"]
|
|
30
|
+
"values": ["none", "xs", "sm", "md", "lg", "xl"]
|
|
31
31
|
},
|
|
32
32
|
"soft": {
|
|
33
33
|
"type": "boolean",
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
{
|
|
73
73
|
"name": "Default",
|
|
74
74
|
"description": "Standard and soft weights, one above the other.",
|
|
75
|
-
"code": "import { Box } from '@/components/Box';\nimport { Separator } from '@/components/Separator';\nimport { Text } from '@/components/Text';\n\n<Box width=\"100%\">\n <Text>Standard weight</Text>\n <Separator
|
|
75
|
+
"code": "import { Box } from '@/components/Box';\nimport { Separator } from '@/components/Separator';\nimport { Text } from '@/components/Text';\n\n<Box width=\"100%\">\n <Text>Standard weight</Text>\n <Separator gap=\"md\" />\n <Text>Soft weight</Text>\n <Separator soft gap=\"md\" />\n <Text>Below</Text>\n</Box>"
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
"name": "With Label",
|
|
79
79
|
"description": "A label sits inside the rule for a major break.",
|
|
80
|
-
"code": "import { Box } from '@/components/Box';\nimport { Separator } from '@/components/Separator';\nimport { Text } from '@/components/Text';\n\n<Box width=\"100%\">\n <Text>First section</Text>\n <Separator label=\"Or\"
|
|
80
|
+
"code": "import { Box } from '@/components/Box';\nimport { Separator } from '@/components/Separator';\nimport { Text } from '@/components/Text';\n\n<Box width=\"100%\">\n <Text>First section</Text>\n <Separator label=\"Or\" gap=\"md\" />\n <Text>Second section</Text>\n</Box>"
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
"name": "Vertical",
|
|
@@ -85,9 +85,9 @@
|
|
|
85
85
|
"code": "import { Box } from '@/components/Box';\nimport { Separator } from '@/components/Separator';\nimport { Stack } from '@/components/Stack';\nimport { Text } from '@/components/Text';\n\n<Stack direction=\"row\" align=\"center\" gap=\"md\" style={{ height: '40px' }}>\n <Text>Item 1</Text>\n <Separator orientation=\"vertical\" />\n <Text>Item 2</Text>\n <Separator orientation=\"vertical\" />\n <Text>Item 3</Text>\n</Stack>"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
|
-
"name": "
|
|
89
|
-
"description": "
|
|
90
|
-
"code": "import { Box } from '@/components/Box';\nimport { Separator } from '@/components/Separator';\nimport { Text } from '@/components/Text';\n\n<Box width=\"100%\">\n <Text>none</Text>\n <Separator
|
|
88
|
+
"name": "Gap Options",
|
|
89
|
+
"description": "gap sets the breathing room around the rule.",
|
|
90
|
+
"code": "import { Box } from '@/components/Box';\nimport { Separator } from '@/components/Separator';\nimport { Text } from '@/components/Text';\n\n<Box width=\"100%\">\n <Text>none</Text>\n <Separator gap=\"none\" />\n <Text>sm</Text>\n <Separator gap=\"sm\" />\n <Text>md</Text>\n <Separator gap=\"md\" />\n <Text>lg</Text>\n <Separator gap=\"lg\" />\n <Text>End</Text>\n</Box>"
|
|
91
91
|
}
|
|
92
92
|
],
|
|
93
93
|
"relations": [
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"contract": {
|
|
101
101
|
"propsSummary": [
|
|
102
102
|
"orientation: horizontal|vertical - direction",
|
|
103
|
-
"
|
|
103
|
+
"gap: none|xs|sm|md|lg|xl - breathing room",
|
|
104
104
|
"soft: boolean - lighter appearance",
|
|
105
105
|
"label: string - centered label text"
|
|
106
106
|
],
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use "../../recipes/layout";
|
|
2
2
|
@use "../../recipes/typography";
|
|
3
3
|
@use "../../tokens/variables" as *;
|
|
4
|
+
@use "../../tokens/measurements.generated" as measurements;
|
|
4
5
|
|
|
5
6
|
.separator {
|
|
6
7
|
flex-shrink: 0;
|
|
@@ -9,25 +10,25 @@
|
|
|
9
10
|
|
|
10
11
|
// Horizontal (default)
|
|
11
12
|
.horizontal {
|
|
12
|
-
|
|
13
|
+
inline-size: 100%;
|
|
13
14
|
|
|
14
15
|
.line {
|
|
15
16
|
display: block;
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
inline-size: 100%;
|
|
18
|
+
block-size: var(--fui-stroke-hairline, #{$fui-stroke-hairline});
|
|
18
19
|
background-color: var(--fui-border, $fui-border);
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
// Vertical
|
|
23
24
|
.vertical {
|
|
24
|
-
|
|
25
|
+
block-size: auto;
|
|
25
26
|
align-self: stretch;
|
|
26
27
|
|
|
27
28
|
.line {
|
|
28
29
|
display: block;
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
inline-size: var(--fui-stroke-hairline, #{$fui-stroke-hairline});
|
|
31
|
+
block-size: 100%;
|
|
31
32
|
background-color: var(--fui-border, $fui-border);
|
|
32
33
|
}
|
|
33
34
|
}
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
&::after {
|
|
44
45
|
content: "";
|
|
45
46
|
flex: 1;
|
|
46
|
-
|
|
47
|
+
block-size: var(--fui-stroke-hairline, #{$fui-stroke-hairline});
|
|
47
48
|
background-color: var(--fui-border, $fui-border);
|
|
48
49
|
}
|
|
49
50
|
}
|
|
@@ -52,51 +53,34 @@
|
|
|
52
53
|
@include typography.role("ui-compact");
|
|
53
54
|
|
|
54
55
|
color: var(--fui-text-tertiary, $fui-text-tertiary);
|
|
55
|
-
text-transform: uppercase;
|
|
56
56
|
white-space: nowrap;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
//
|
|
60
|
-
.
|
|
61
|
-
padding: 0;
|
|
59
|
+
// Gap: breathing room on the cross axis of the rule.
|
|
60
|
+
.gapNone {
|
|
61
|
+
padding: var(--fui-raw-space-0, #{measurements.raw-space(0)});
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
padding-inline: layout.gap("sm");
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.spacingMd {
|
|
75
|
-
&.horizontal {
|
|
76
|
-
padding-block: layout.gap("md");
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&.vertical {
|
|
80
|
-
padding-inline: layout.gap("md");
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.spacingLg {
|
|
85
|
-
&.horizontal {
|
|
86
|
-
padding-block: layout.gap("lg");
|
|
87
|
-
}
|
|
64
|
+
@each $gap, $class in ("xs": "gapXs", "sm": "gapSm", "md": "gapMd", "lg": "gapLg", "xl": "gapXl") {
|
|
65
|
+
.#{$class} {
|
|
66
|
+
&.horizontal,
|
|
67
|
+
&.withLabel {
|
|
68
|
+
padding-block: layout.gap($gap);
|
|
69
|
+
}
|
|
88
70
|
|
|
89
|
-
|
|
90
|
-
|
|
71
|
+
&.vertical {
|
|
72
|
+
padding-inline: layout.gap($gap);
|
|
73
|
+
}
|
|
91
74
|
}
|
|
92
75
|
}
|
|
93
76
|
|
|
94
|
-
// Soft
|
|
77
|
+
// Soft: half-weight rule for quieter breaks. Shares the disabled opacity step
|
|
78
|
+
// (0.5) — there is no dedicated soft-rule token yet.
|
|
95
79
|
.soft {
|
|
96
|
-
opacity:
|
|
80
|
+
opacity: var(--fui-opacity-disabled, #{$fui-opacity-disabled});
|
|
97
81
|
|
|
98
82
|
&.withLabel::before,
|
|
99
83
|
&.withLabel::after {
|
|
100
|
-
opacity:
|
|
84
|
+
opacity: var(--fui-opacity-disabled, #{$fui-opacity-disabled});
|
|
101
85
|
}
|
|
102
86
|
}
|