@usefragments/ui 1.7.0 → 2.0.1
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
|
@@ -29,7 +29,9 @@ async function loadShikiDeps() {
|
|
|
29
29
|
}
|
|
30
30
|
await _shikiLoadPromise;
|
|
31
31
|
}
|
|
32
|
-
import {
|
|
32
|
+
import { Button } from "../Button";
|
|
33
|
+
import { IconButton } from "../IconButton";
|
|
34
|
+
import { TabsRoot, TabsList, Tab, TabsPanel, type TabsVariant } from "../Tabs";
|
|
33
35
|
import { FUI_CSS_VARIABLES_THEME } from "./css-variables-theme";
|
|
34
36
|
import styles from "./CodeBlock.module.scss";
|
|
35
37
|
import { isDevelopmentBuild, isProductionBuild } from "../../utils/env";
|
|
@@ -750,8 +752,9 @@ const CodeBlockBase = React.forwardRef<HTMLDivElement, CodeBlockProps>(function
|
|
|
750
752
|
<div className={styles.header}>
|
|
751
753
|
<span className={styles.filename}>{filename ?? ""}</span>
|
|
752
754
|
{shouldShowHeaderCopy && (
|
|
753
|
-
<
|
|
754
|
-
|
|
755
|
+
<IconButton
|
|
756
|
+
variant="ghost"
|
|
757
|
+
size="sm"
|
|
755
758
|
onClick={handleCopy}
|
|
756
759
|
className={`${styles.copyButton} ${copied ? styles.copied : ""}`}
|
|
757
760
|
aria-label={copied ? "Copied!" : "Copy code"}
|
|
@@ -761,19 +764,20 @@ const CodeBlockBase = React.forwardRef<HTMLDivElement, CodeBlockProps>(function
|
|
|
761
764
|
) : (
|
|
762
765
|
<CopyIcon className={styles.icon} />
|
|
763
766
|
)}
|
|
764
|
-
</
|
|
767
|
+
</IconButton>
|
|
765
768
|
)}
|
|
766
769
|
</div>
|
|
767
770
|
)}
|
|
768
771
|
{shouldShowOverlayCopy && (
|
|
769
|
-
<
|
|
770
|
-
|
|
772
|
+
<IconButton
|
|
773
|
+
variant="ghost"
|
|
774
|
+
size="sm"
|
|
771
775
|
onClick={handleCopy}
|
|
772
776
|
className={`${styles.copyButton} ${styles.copyOverlay} ${copied ? styles.copied : ""}`}
|
|
773
777
|
aria-label={copied ? "Copied!" : "Copy code"}
|
|
774
778
|
>
|
|
775
779
|
{copied ? <CheckIcon className={styles.icon} /> : <CopyIcon className={styles.icon} />}
|
|
776
|
-
</
|
|
780
|
+
</IconButton>
|
|
777
781
|
)}
|
|
778
782
|
{highlight.loading ? (
|
|
779
783
|
<div className={styles.loading} style={codeContainerStyle}>
|
|
@@ -789,18 +793,21 @@ const CodeBlockBase = React.forwardRef<HTMLDivElement, CodeBlockProps>(function
|
|
|
789
793
|
/>
|
|
790
794
|
)}
|
|
791
795
|
{persistentCopy && (
|
|
792
|
-
<
|
|
793
|
-
|
|
796
|
+
<IconButton
|
|
797
|
+
variant="ghost"
|
|
798
|
+
size="sm"
|
|
794
799
|
onClick={handleCopy}
|
|
795
800
|
className={`${styles.persistentCopy} ${styles.copyButton} ${styles.copyOverlay} ${copied ? styles.copied : ""}`}
|
|
796
801
|
aria-label={copied ? "Copied!" : "Copy code"}
|
|
797
802
|
>
|
|
798
803
|
{copied ? <CheckIcon className={styles.icon} /> : <CopyIcon className={styles.icon} />}
|
|
799
|
-
</
|
|
804
|
+
</IconButton>
|
|
800
805
|
)}
|
|
801
806
|
{shouldShowCollapse && (
|
|
802
|
-
<
|
|
803
|
-
|
|
807
|
+
<Button
|
|
808
|
+
variant="ghost"
|
|
809
|
+
size="sm"
|
|
810
|
+
fullWidth
|
|
804
811
|
onClick={toggleCollapsed}
|
|
805
812
|
className={
|
|
806
813
|
collapseAction === "expand"
|
|
@@ -823,7 +830,7 @@ const CodeBlockBase = React.forwardRef<HTMLDivElement, CodeBlockProps>(function
|
|
|
823
830
|
<span>Show less</span>
|
|
824
831
|
</>
|
|
825
832
|
)}
|
|
826
|
-
</
|
|
833
|
+
</Button>
|
|
827
834
|
)}
|
|
828
835
|
</div>
|
|
829
836
|
{caption && <div className={styles.caption}>{caption}</div>}
|
|
@@ -863,8 +870,8 @@ export interface TabbedCodeBlockProps {
|
|
|
863
870
|
showLineNumbers?: boolean;
|
|
864
871
|
/** Syntax highlighting theme (applies to all tabs) */
|
|
865
872
|
theme?: CodeBlockTheme;
|
|
866
|
-
/** Tab list
|
|
867
|
-
tabsVariant?:
|
|
873
|
+
/** Tab list chrome: `soft` (default) is the filled rail, `ghost` the underline strip. */
|
|
874
|
+
tabsVariant?: TabsVariant;
|
|
868
875
|
/** Enable word wrapping for long lines */
|
|
869
876
|
wordWrap?: boolean;
|
|
870
877
|
/** Maximum height in pixels (enables scrolling) */
|
|
@@ -892,7 +899,7 @@ function TabbedCodeBlock({
|
|
|
892
899
|
copyPlacement = "auto",
|
|
893
900
|
showLineNumbers = false,
|
|
894
901
|
theme,
|
|
895
|
-
tabsVariant = "
|
|
902
|
+
tabsVariant = "soft",
|
|
896
903
|
wordWrap,
|
|
897
904
|
maxHeight,
|
|
898
905
|
collapsible,
|
|
@@ -25,11 +25,6 @@
|
|
|
25
25
|
&:focus-visible {
|
|
26
26
|
@include focus-ring;
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
&:disabled {
|
|
30
|
-
opacity: 0.5;
|
|
31
|
-
cursor: not-allowed;
|
|
32
|
-
}
|
|
33
28
|
}
|
|
34
29
|
|
|
35
30
|
.triggerContent {
|
|
@@ -72,8 +67,7 @@
|
|
|
72
67
|
}
|
|
73
68
|
|
|
74
69
|
.disabled .trigger {
|
|
75
|
-
|
|
76
|
-
cursor: not-allowed;
|
|
70
|
+
@include disabled-state;
|
|
77
71
|
}
|
|
78
72
|
|
|
79
73
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -92,7 +92,27 @@ $fui-colorpicker-pointer-size: $fui-target-size-min !default;
|
|
|
92
92
|
@include field.shell;
|
|
93
93
|
|
|
94
94
|
flex-shrink: 0;
|
|
95
|
+
|
|
96
|
+
&:focus-visible,
|
|
97
|
+
&[data-popup-open] {
|
|
98
|
+
@include field.focus-state;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.wrapper[data-invalid] & {
|
|
102
|
+
@include field.invalid-state;
|
|
103
|
+
|
|
104
|
+
// Focused while invalid keeps the danger edge and takes the danger ring,
|
|
105
|
+
// the same pairing Input and Textarea render. Without it the ring stays
|
|
106
|
+
// accent-coloured and the control reads half-valid at the moment the user
|
|
107
|
+
// is actually in it.
|
|
108
|
+
&:focus-visible,
|
|
109
|
+
&[data-popup-open] {
|
|
110
|
+
@include field.invalid-focus-state;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
95
114
|
// Disabled state (opacity + pointer-events) comes from @include interactive-base.
|
|
115
|
+
@include high-contrast-outline;
|
|
96
116
|
}
|
|
97
117
|
|
|
98
118
|
// Hex input wrapper (using Input component)
|
|
@@ -115,8 +135,6 @@ $fui-colorpicker-pointer-size: $fui-target-size-min !default;
|
|
|
115
135
|
.popup {
|
|
116
136
|
@include popup.container;
|
|
117
137
|
|
|
118
|
-
border-radius: var(--fui-radius-lg, $fui-radius-lg);
|
|
119
|
-
|
|
120
138
|
// react-colorful styling overrides
|
|
121
139
|
:global(.react-colorful) {
|
|
122
140
|
width: var(--fui-colorpicker-size, #{$fui-colorpicker-size});
|
|
@@ -141,17 +159,6 @@ $fui-colorpicker-pointer-size: $fui-target-size-min !default;
|
|
|
141
159
|
}
|
|
142
160
|
}
|
|
143
161
|
|
|
144
|
-
// ============================================
|
|
145
|
-
// Accessibility: High Contrast Mode
|
|
146
|
-
// ============================================
|
|
147
|
-
|
|
148
|
-
@media (prefers-contrast: more) {
|
|
149
|
-
.swatch {
|
|
150
|
-
border-width: var(--fui-stroke-default, 2px);
|
|
151
|
-
border-color: var(--fui-text-primary, $fui-text-primary);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
162
|
// ============================================
|
|
156
163
|
// Accessibility: Reduced Motion
|
|
157
164
|
// ============================================
|
|
@@ -167,6 +167,7 @@ const ColorPickerRoot = React.forwardRef<HTMLDivElement, ColorPickerProps>(funct
|
|
|
167
167
|
className={styles.swatch}
|
|
168
168
|
style={{ backgroundColor: displayValue }}
|
|
169
169
|
disabled={disabled}
|
|
170
|
+
aria-invalid={error || undefined}
|
|
170
171
|
aria-label={label ? `Edit ${label} color` : "Edit color"}
|
|
171
172
|
/>
|
|
172
173
|
<BasePopover.Portal>
|
|
@@ -1,5 +1,6 @@
|
|
|
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
|
@use "../../recipes/field";
|
|
5
6
|
@use "../../recipes/layout";
|
|
@@ -44,9 +45,20 @@
|
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
&:has([data-disabled]) {
|
|
47
|
-
|
|
48
|
-
color: var(--fui-text-tertiary, $fui-text-tertiary);
|
|
48
|
+
@include field.disabled-state;
|
|
49
49
|
}
|
|
50
|
+
|
|
51
|
+
.wrapper[data-invalid] & {
|
|
52
|
+
@include field.invalid-state;
|
|
53
|
+
|
|
54
|
+
// Focused while invalid keeps the danger edge and takes the danger ring,
|
|
55
|
+
// the same pairing Input and Textarea render.
|
|
56
|
+
&:focus-within {
|
|
57
|
+
@include field.invalid-focus-state;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@include high-contrast-outline;
|
|
50
62
|
}
|
|
51
63
|
|
|
52
64
|
// Size variants for input wrapper — override --_field-h.
|
|
@@ -67,7 +79,7 @@
|
|
|
67
79
|
flex: 1;
|
|
68
80
|
min-width: layout.measure("inline-floor");
|
|
69
81
|
min-block-size: 0;
|
|
70
|
-
padding: 0;
|
|
82
|
+
padding: var(--fui-raw-space-0, #{measurements.raw-space(0)});
|
|
71
83
|
background: transparent;
|
|
72
84
|
border: none;
|
|
73
85
|
border-radius: var(--fui-radius-sm, $fui-radius-sm);
|
|
@@ -183,7 +195,7 @@
|
|
|
183
195
|
|
|
184
196
|
// Positioner — z-index must exceed Dialog positioner (51)
|
|
185
197
|
.positioner {
|
|
186
|
-
z-index:
|
|
198
|
+
z-index: var(--fui-overlay-layer-anchored, #{$fui-overlay-layer-anchored});
|
|
187
199
|
outline: none;
|
|
188
200
|
}
|
|
189
201
|
|
|
@@ -279,21 +291,6 @@
|
|
|
279
291
|
@include popup.group-label;
|
|
280
292
|
}
|
|
281
293
|
|
|
282
|
-
// ============================================
|
|
283
|
-
// Accessibility: High Contrast Mode
|
|
284
|
-
// ============================================
|
|
285
|
-
|
|
286
|
-
@media (prefers-contrast: more) {
|
|
287
|
-
.inputWrapper {
|
|
288
|
-
border-width: var(--fui-stroke-default, 2px);
|
|
289
|
-
border-color: var(--fui-text-primary, $fui-text-primary);
|
|
290
|
-
|
|
291
|
-
&:focus-within {
|
|
292
|
-
border-color: var(--fui-color-accent, $fui-color-accent);
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
294
|
// ============================================
|
|
298
295
|
// Accessibility: Reduced Motion
|
|
299
296
|
// ============================================
|
|
@@ -178,6 +178,9 @@ interface ComboboxContextValue {
|
|
|
178
178
|
size: "sm" | "md" | "lg";
|
|
179
179
|
// Id applied to Combobox.Input so a native <label htmlFor> can target it.
|
|
180
180
|
inputId?: string;
|
|
181
|
+
/** Mirrors the wrapper's `data-invalid` onto the input as `aria-invalid`, so
|
|
182
|
+
* assistive tech hears the state the danger edge is painting. */
|
|
183
|
+
invalid?: boolean;
|
|
181
184
|
}
|
|
182
185
|
|
|
183
186
|
const EMPTY_STATIC_LABELS = new Map<string, string>();
|
|
@@ -422,6 +425,7 @@ const ComboboxRoot = React.forwardRef<HTMLDivElement, ComboboxProps>(function Co
|
|
|
422
425
|
registerTrigger,
|
|
423
426
|
size,
|
|
424
427
|
inputId,
|
|
428
|
+
invalid: hasError,
|
|
425
429
|
}),
|
|
426
430
|
[
|
|
427
431
|
placeholder,
|
|
@@ -434,14 +438,17 @@ const ComboboxRoot = React.forwardRef<HTMLDivElement, ComboboxProps>(function Co
|
|
|
434
438
|
registerTrigger,
|
|
435
439
|
size,
|
|
436
440
|
inputId,
|
|
441
|
+
hasError,
|
|
437
442
|
]
|
|
438
443
|
);
|
|
439
444
|
|
|
440
445
|
const wrapperClasses = [styles.wrapper, className].filter(Boolean).join(" ");
|
|
441
446
|
const helperClasses = [styles.helper, hasError && styles.helperError].filter(Boolean).join(" ");
|
|
442
447
|
|
|
448
|
+
// data-invalid lets the shell pick up the error border, the same hook Select,
|
|
449
|
+
// DatePicker and RadioGroup use; without it `error` renders only the message.
|
|
443
450
|
const wrapperContent = (inner: React.ReactNode) => (
|
|
444
|
-
<div ref={ref} className={wrapperClasses}>
|
|
451
|
+
<div ref={ref} className={wrapperClasses} data-invalid={hasError || undefined}>
|
|
445
452
|
{inner}
|
|
446
453
|
{helperText && (
|
|
447
454
|
<span id={helperId} className={helperClasses}>
|
|
@@ -590,6 +597,7 @@ function ComboboxInput({
|
|
|
590
597
|
placeholder={context.selectedValues.length === 0 ? inputPlaceholder : undefined}
|
|
591
598
|
id={inputId}
|
|
592
599
|
className={classes}
|
|
600
|
+
aria-invalid={context.invalid || undefined}
|
|
593
601
|
/>
|
|
594
602
|
{renderTrigger && (
|
|
595
603
|
<BaseCombobox.Trigger className={styles.trigger}>
|
|
@@ -607,6 +615,7 @@ function ComboboxInput({
|
|
|
607
615
|
placeholder={inputPlaceholder}
|
|
608
616
|
id={inputId}
|
|
609
617
|
className={classes}
|
|
618
|
+
aria-invalid={context.invalid || undefined}
|
|
610
619
|
/>
|
|
611
620
|
{renderTrigger && (
|
|
612
621
|
<BaseCombobox.Trigger className={styles.trigger}>
|
|
@@ -47,6 +47,12 @@
|
|
|
47
47
|
"description": "Whether to loop keyboard navigation",
|
|
48
48
|
"default": "true",
|
|
49
49
|
"required": false
|
|
50
|
+
},
|
|
51
|
+
"hosted": {
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"description": "The Command sits inside another surface (a Popover, a Dialog) that draws the frame, so it draws none of its own",
|
|
54
|
+
"default": "false",
|
|
55
|
+
"required": false
|
|
50
56
|
}
|
|
51
57
|
},
|
|
52
58
|
"usage": {
|
|
@@ -84,7 +90,7 @@
|
|
|
84
90
|
{
|
|
85
91
|
"name": "Dialog Command Palette",
|
|
86
92
|
"description": "The same list summoned over the page.",
|
|
87
|
-
"code": "<Dialog>\n <Dialog.Trigger asChild>\n <Button variant=\"
|
|
93
|
+
"code": "<Dialog>\n <Dialog.Trigger asChild>\n <Button variant=\"soft\">Open Command Palette</Button>\n </Dialog.Trigger>\n <Dialog.Content width=\"sm\">\n <Command>\n <Command.Input placeholder=\"Search commands...\" />\n <Command.List>\n <Command.Group heading=\"Actions\">\n <Command.Item onItemSelect={() => {}}>New File</Command.Item>\n <Command.Item onItemSelect={() => {}}>Open Recent</Command.Item>\n </Command.Group>\n <Command.Separator />\n <Command.Group heading=\"Settings\">\n <Command.Item onItemSelect={() => {}}>Preferences</Command.Item>\n <Command.Item onItemSelect={() => {}}>Keyboard Shortcuts</Command.Item>\n </Command.Group>\n <Command.Empty>No results found.</Command.Empty>\n </Command.List>\n </Command>\n </Dialog.Content>\n</Dialog>"
|
|
88
94
|
},
|
|
89
95
|
{
|
|
90
96
|
"name": "With Groups",
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
@use "../../tokens/variables" as *;
|
|
2
|
+
@use "../../tokens/mixins" as *;
|
|
3
|
+
@use "../../tokens/measurements.generated" as measurements;
|
|
2
4
|
@use "../../recipes/action" as action;
|
|
3
5
|
@use "../../recipes/field" as field;
|
|
4
6
|
@use "../../recipes/popup" as popup;
|
|
@@ -10,6 +12,16 @@
|
|
|
10
12
|
display: flex;
|
|
11
13
|
flex-direction: column;
|
|
12
14
|
overflow: hidden;
|
|
15
|
+
@include high-contrast-outline;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Hosted: the surrounding surface is the frame; the pick list keeps only its
|
|
19
|
+
// own inset.
|
|
20
|
+
.hosted {
|
|
21
|
+
background: transparent;
|
|
22
|
+
border: 0;
|
|
23
|
+
border-radius: var(--fui-raw-space-0, #{measurements.raw-space(0)});
|
|
24
|
+
box-shadow: none;
|
|
13
25
|
}
|
|
14
26
|
|
|
15
27
|
.inputWrapper {
|
|
@@ -18,8 +30,8 @@
|
|
|
18
30
|
|
|
19
31
|
display: flex;
|
|
20
32
|
align-items: center;
|
|
21
|
-
gap: var(--fui-popup-row-content-gap);
|
|
22
|
-
margin-block-end: var(--fui-popup-container-inset);
|
|
33
|
+
gap: var(--fui-popup-row-content-gap, var(--fui-raw-space-8, #{measurements.raw-space(8)}));
|
|
34
|
+
margin-block-end: var(--fui-popup-container-inset, var(--fui-raw-space-4, #{measurements.raw-space(4)}));
|
|
23
35
|
|
|
24
36
|
&:focus-within {
|
|
25
37
|
@include field.focus-state;
|
|
@@ -36,7 +48,7 @@
|
|
|
36
48
|
.input {
|
|
37
49
|
flex: 1;
|
|
38
50
|
min-inline-size: 0;
|
|
39
|
-
padding: 0;
|
|
51
|
+
padding: var(--fui-raw-space-0, #{measurements.raw-space(0)});
|
|
40
52
|
border: none;
|
|
41
53
|
outline: none;
|
|
42
54
|
color: var(--fui-text-primary, $fui-text-primary);
|
|
@@ -69,8 +81,8 @@
|
|
|
69
81
|
}
|
|
70
82
|
|
|
71
83
|
> svg {
|
|
72
|
-
inline-size: var(--fui-popup-indicator-box);
|
|
73
|
-
block-size: var(--fui-popup-indicator-box);
|
|
84
|
+
inline-size: var(--fui-popup-indicator-box, var(--fui-raw-space-16, #{measurements.raw-space(16)}));
|
|
85
|
+
block-size: var(--fui-popup-indicator-box, var(--fui-raw-space-16, #{measurements.raw-space(16)}));
|
|
74
86
|
flex: 0 0 auto;
|
|
75
87
|
}
|
|
76
88
|
}
|
|
@@ -97,8 +109,8 @@
|
|
|
97
109
|
.empty {
|
|
98
110
|
@include typography.role("body-compact");
|
|
99
111
|
|
|
100
|
-
padding-block: var(--fui-popup-row-block-inset);
|
|
101
|
-
padding-inline: var(--fui-popup-row-inline-inset);
|
|
112
|
+
padding-block: var(--fui-popup-row-block-inset, var(--fui-raw-space-8, #{measurements.raw-space(8)}));
|
|
113
|
+
padding-inline: var(--fui-popup-row-inline-inset, var(--fui-raw-space-8, #{measurements.raw-space(8)}));
|
|
102
114
|
color: var(--fui-text-secondary, $fui-text-secondary);
|
|
103
115
|
text-align: center;
|
|
104
116
|
}
|
|
@@ -106,17 +118,3 @@
|
|
|
106
118
|
.separator {
|
|
107
119
|
@include popup.group-separator;
|
|
108
120
|
}
|
|
109
|
-
|
|
110
|
-
@media (prefers-contrast: more) {
|
|
111
|
-
.command {
|
|
112
|
-
border-color: var(--fui-text-primary, $fui-text-primary);
|
|
113
|
-
outline: var(--fui-stroke-hairline, 1px) solid var(--fui-text-primary, $fui-text-primary);
|
|
114
|
-
outline-offset: calc(-1 * var(--fui-stroke-default, 2px));
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.itemActive {
|
|
118
|
-
outline: var(--fui-focus-ring-width, $fui-focus-ring-width) solid
|
|
119
|
-
var(--fui-color-accent, $fui-color-accent);
|
|
120
|
-
outline-offset: calc(-1 * var(--fui-focus-ring-width, $fui-focus-ring-width));
|
|
121
|
-
}
|
|
122
|
-
}
|
|
@@ -20,6 +20,11 @@ export interface CommandProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
20
20
|
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
21
21
|
/** Whether to loop keyboard navigation. Default: true */
|
|
22
22
|
loop?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The Command sits inside another surface (a Popover, a Dialog) that draws
|
|
25
|
+
* the frame, so it draws none of its own.
|
|
26
|
+
*/
|
|
27
|
+
hosted?: boolean;
|
|
23
28
|
}
|
|
24
29
|
|
|
25
30
|
export interface CommandInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
@@ -154,6 +159,7 @@ function CommandRoot({
|
|
|
154
159
|
onSearchChange,
|
|
155
160
|
filter = defaultFilter,
|
|
156
161
|
loop = true,
|
|
162
|
+
hosted = false,
|
|
157
163
|
className,
|
|
158
164
|
...htmlProps
|
|
159
165
|
}: CommandProps) {
|
|
@@ -249,7 +255,7 @@ function CommandRoot({
|
|
|
249
255
|
<CommandContext.Provider value={contextValue}>
|
|
250
256
|
<div
|
|
251
257
|
{...htmlProps}
|
|
252
|
-
className={[styles.command, className].filter(Boolean).join(" ")}
|
|
258
|
+
className={[styles.command, hosted && styles.hosted, className].filter(Boolean).join(" ")}
|
|
253
259
|
role="search"
|
|
254
260
|
>
|
|
255
261
|
{children}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://usefragments.com/schemas/contract.v1.json",
|
|
3
|
+
"name": "ComponentDefaults",
|
|
4
|
+
"description": "Utility provider that sets the default control size for every control below it.",
|
|
5
|
+
"category": "utilities",
|
|
6
|
+
"tags": ["provider", "defaults", "size", "utility"],
|
|
7
|
+
"status": "stable",
|
|
8
|
+
"sourcePath": "src/components/ComponentDefaults/index.tsx",
|
|
9
|
+
"exportName": "ComponentDefaultsProvider",
|
|
10
|
+
"propsSummary": [
|
|
11
|
+
"children: node (required)",
|
|
12
|
+
"controlSize: sm|md|lg",
|
|
13
|
+
"value: { controlSize?: sm|md|lg }"
|
|
14
|
+
],
|
|
15
|
+
"props": {
|
|
16
|
+
"children": {
|
|
17
|
+
"type": "node",
|
|
18
|
+
"description": "Subtree that inherits the defaults",
|
|
19
|
+
"required": true
|
|
20
|
+
},
|
|
21
|
+
"controlSize": {
|
|
22
|
+
"type": "enum",
|
|
23
|
+
"description": "Default size for controls that do not pass their own size prop",
|
|
24
|
+
"required": false,
|
|
25
|
+
"values": ["sm", "md", "lg"]
|
|
26
|
+
},
|
|
27
|
+
"value": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"description": "Full defaults object; explicit controlSize wins over value.controlSize",
|
|
30
|
+
"required": false
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"usage": {
|
|
34
|
+
"when": [
|
|
35
|
+
"A region needs every control at one size (dense table toolbars, compact sidebars)",
|
|
36
|
+
"A ThemeProvider subtree should default to sm or lg controls"
|
|
37
|
+
],
|
|
38
|
+
"whenNot": [
|
|
39
|
+
"Sizing a single control (pass its size prop)",
|
|
40
|
+
"Changing spacing or typography (use tokens, not control size)"
|
|
41
|
+
],
|
|
42
|
+
"guidelines": [
|
|
43
|
+
"Renders no chrome: it only supplies context read through useResolvedControlSize",
|
|
44
|
+
"Nest providers to override the size for a smaller region",
|
|
45
|
+
"An explicit size prop on a control always wins over the provider default",
|
|
46
|
+
"ThemeProvider componentDefaults wires this provider for you at the root"
|
|
47
|
+
],
|
|
48
|
+
"accessibility": [
|
|
49
|
+
"sm controls still meet the kit's minimum target size through the action recipe"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"examples": [
|
|
53
|
+
{
|
|
54
|
+
"name": "Dense Toolbar",
|
|
55
|
+
"description": "Every control in the toolbar defaults to sm without repeating the prop.",
|
|
56
|
+
"code": "<ComponentDefaultsProvider controlSize=\"sm\">\n <div style={{ display: 'flex', gap: '8px' }}>\n <Button variant=\"soft\">Filter</Button>\n <Button variant=\"ghost\">Export</Button>\n </div>\n</ComponentDefaultsProvider>"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "Nested Override",
|
|
60
|
+
"description": "A nested provider narrows the default for one region.",
|
|
61
|
+
"code": "<ComponentDefaultsProvider controlSize=\"lg\">\n <Button>Large by default</Button>\n <ComponentDefaultsProvider controlSize=\"sm\">\n <Button>Small in this region</Button>\n </ComponentDefaultsProvider>\n</ComponentDefaultsProvider>"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"relations": [
|
|
65
|
+
{
|
|
66
|
+
"component": "Theme",
|
|
67
|
+
"relationship": "parent",
|
|
68
|
+
"note": "ThemeProvider accepts componentDefaults and mounts this provider"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"component": "Button",
|
|
72
|
+
"relationship": "child",
|
|
73
|
+
"note": "Controls resolve their size through useResolvedControlSize"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"contract": {
|
|
77
|
+
"propsSummary": [
|
|
78
|
+
"controlSize: sm|md|lg - default size for controls below the provider",
|
|
79
|
+
"value: { controlSize } - defaults object, explicit controlSize wins",
|
|
80
|
+
"useComponentDefaults() - read the merged defaults",
|
|
81
|
+
"useResolvedControlSize(explicit, fallback) - explicit > provider > fallback (md)"
|
|
82
|
+
],
|
|
83
|
+
"a11yRules": []
|
|
84
|
+
},
|
|
85
|
+
"provenance": {
|
|
86
|
+
"source": "manual",
|
|
87
|
+
"verified": false,
|
|
88
|
+
"frameworkSupport": "native",
|
|
89
|
+
"extractedAt": "2026-09-03T00:00:00.000Z"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use "../../tokens/variables" as *;
|
|
2
|
+
@use "../../tokens/measurements.generated" as measurements;
|
|
2
3
|
@use "../../recipes/layout" as layout;
|
|
3
4
|
@use "../../recipes/representation" as representation;
|
|
4
5
|
@use "../../recipes/typography" as typography;
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
|
|
65
66
|
.dateSeparatorLine {
|
|
66
67
|
flex: 1;
|
|
67
|
-
height: var(--fui-stroke-hairline,
|
|
68
|
+
height: var(--fui-stroke-hairline, #{$fui-stroke-hairline});
|
|
68
69
|
background-color: var(--fui-border, $fui-border);
|
|
69
70
|
}
|
|
70
71
|
|
|
@@ -73,8 +74,6 @@
|
|
|
73
74
|
|
|
74
75
|
color: var(--fui-text-secondary, $fui-text-secondary);
|
|
75
76
|
white-space: nowrap;
|
|
76
|
-
text-transform: uppercase;
|
|
77
|
-
letter-spacing: var(--fui-letter-spacing-wide, $fui-letter-spacing-wide);
|
|
78
77
|
}
|
|
79
78
|
|
|
80
79
|
// ============================================
|
|
@@ -130,7 +130,7 @@ function TypingIndicator({
|
|
|
130
130
|
<div className={styles.typingContent}>
|
|
131
131
|
<Loading
|
|
132
132
|
size="sm"
|
|
133
|
-
|
|
133
|
+
kind="dots"
|
|
134
134
|
color="muted"
|
|
135
135
|
label=""
|
|
136
136
|
role="presentation"
|
|
@@ -242,7 +242,7 @@ function ConversationListRoot({
|
|
|
242
242
|
<div {...htmlProps} ref={containerRef} className={classes} onScroll={handleScroll}>
|
|
243
243
|
{loadingHistory && (
|
|
244
244
|
<div className={styles.loadingHistory}>
|
|
245
|
-
<Loading size="md"
|
|
245
|
+
<Loading size="md" kind="spinner" color="muted" label="Loading history" />
|
|
246
246
|
<span>Loading history...</span>
|
|
247
247
|
</div>
|
|
248
248
|
)}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use "../../tokens/variables" as *;
|
|
2
2
|
@use "../../tokens/mixins" as *;
|
|
3
|
+
@use "../../tokens/measurements.generated" as measurements;
|
|
3
4
|
@use "../../recipes/action" as action;
|
|
4
5
|
@use "../../recipes/table-chrome" as table-chrome;
|
|
5
6
|
@use "../../recipes/target" as target;
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
.headerRow,
|
|
46
47
|
.row {
|
|
47
48
|
@include table-chrome.row;
|
|
49
|
+
@include high-contrast-outline;
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
.headerRow {
|
|
@@ -75,7 +77,7 @@
|
|
|
75
77
|
|
|
76
78
|
justify-content: space-between;
|
|
77
79
|
inline-size: 100%;
|
|
78
|
-
padding: 0;
|
|
80
|
+
padding: var(--fui-raw-space-0, #{measurements.raw-space(0)});
|
|
79
81
|
color: inherit;
|
|
80
82
|
text-align: start;
|
|
81
83
|
transition: color var(--fui-transition-fast, $fui-transition-fast);
|
|
@@ -148,12 +150,13 @@
|
|
|
148
150
|
);
|
|
149
151
|
|
|
150
152
|
.td:first-child {
|
|
151
|
-
box-shadow: inset var(--fui-table-divider-size
|
|
152
|
-
var(--fui-table-row-selected-border, var(--fui-border-strong, #{$fui-border-strong}));
|
|
153
|
+
box-shadow: inset var(--fui-table-divider-size, var(--fui-stroke-hairline, #{$fui-stroke-hairline}))
|
|
154
|
+
0 0 var(--fui-table-row-selected-border, var(--fui-border-strong, #{$fui-border-strong}));
|
|
153
155
|
}
|
|
154
156
|
|
|
155
157
|
&:dir(rtl) .td:first-child {
|
|
156
|
-
box-shadow: inset
|
|
158
|
+
box-shadow: inset
|
|
159
|
+
calc(-1 * var(--fui-table-divider-size, var(--fui-stroke-hairline, #{$fui-stroke-hairline}))) 0 0
|
|
157
160
|
var(--fui-table-row-selected-border, var(--fui-border-strong, #{$fui-border-strong}));
|
|
158
161
|
}
|
|
159
162
|
}
|
|
@@ -300,11 +303,11 @@
|
|
|
300
303
|
color: var(--fui-text-tertiary, $fui-text-tertiary);
|
|
301
304
|
}
|
|
302
305
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
306
|
+
// Virtualizer spacer rows: height is measured state set inline; the chrome
|
|
307
|
+
// reset lives here so the spacer never paints a cell.
|
|
308
|
+
.virtualSpacer {
|
|
309
|
+
padding: var(--fui-raw-space-0, #{measurements.raw-space(0)});
|
|
310
|
+
border: 0;
|
|
308
311
|
}
|
|
309
312
|
|
|
310
313
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { useVirtualizer, type Virtualizer } from "@tanstack/react-virtual";
|
|
5
5
|
import { Table, type TableProps } from "../Table";
|
|
6
|
+
import styles from "./DataTable.module.scss";
|
|
6
7
|
|
|
7
8
|
// ============================================
|
|
8
9
|
// Dependency (@tanstack/react-virtual)
|
|
@@ -86,13 +87,13 @@ function DataTableVirtualRoot<TItem>({
|
|
|
86
87
|
<Table.Body>
|
|
87
88
|
{paddingTop > 0 ? (
|
|
88
89
|
<tr aria-hidden="true">
|
|
89
|
-
<td colSpan={colSpan} style={{ height: paddingTop
|
|
90
|
+
<td colSpan={colSpan} className={styles.virtualSpacer} style={{ height: paddingTop }} />
|
|
90
91
|
</tr>
|
|
91
92
|
) : null}
|
|
92
93
|
{virtualRows.map((row) => renderRow(row))}
|
|
93
94
|
{paddingBottom > 0 ? (
|
|
94
95
|
<tr aria-hidden="true">
|
|
95
|
-
<td colSpan={colSpan} style={{ height: paddingBottom
|
|
96
|
+
<td colSpan={colSpan} className={styles.virtualSpacer} style={{ height: paddingBottom }} />
|
|
96
97
|
</tr>
|
|
97
98
|
) : null}
|
|
98
99
|
</Table.Body>
|
|
@@ -547,7 +547,7 @@ function DataTableLive<T>({
|
|
|
547
547
|
style={{
|
|
548
548
|
...getColumnSizeStyle(cell.column),
|
|
549
549
|
...(isFirstDataCell
|
|
550
|
-
? ({ "--
|
|
550
|
+
? ({ "--fui-table-tree-depth": depth } as React.CSSProperties)
|
|
551
551
|
: undefined),
|
|
552
552
|
}}
|
|
553
553
|
>
|