@usefragments/ui 1.7.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -66
- package/dist/assets/nav-glyph.cjs +139 -0
- package/dist/assets/nav-glyph.d.ts +28 -0
- package/dist/assets/nav-glyph.d.ts.map +1 -0
- package/dist/assets/nav-glyph.js +139 -0
- package/dist/assets/nav-glyph.module.scss.cjs +71 -0
- package/dist/assets/nav-glyph.module.scss.js +71 -0
- package/dist/assets/ui.css +4975 -4959
- package/dist/blocks/components/StatsCard.d.ts +1 -1
- package/dist/blocks/components/StatsCard.d.ts.map +1 -1
- package/dist/codeblock.cjs +23 -16
- package/dist/codeblock.js +16 -9
- package/dist/colorpicker.cjs +1 -0
- package/dist/colorpicker.js +1 -0
- package/dist/components/Accordion/Accordion.module.scss.cjs +8 -8
- package/dist/components/Accordion/Accordion.module.scss.js +8 -8
- package/dist/components/Alert/Alert.module.scss.cjs +21 -21
- package/dist/components/Alert/Alert.module.scss.js +21 -21
- package/dist/components/Alert/index.cjs +14 -8
- package/dist/components/Alert/index.d.ts +9 -9
- package/dist/components/Alert/index.d.ts.map +1 -1
- package/dist/components/Alert/index.js +14 -8
- package/dist/components/AppShell/AppShell.module.scss.cjs +14 -14
- package/dist/components/AppShell/AppShell.module.scss.js +14 -14
- package/dist/components/AppShell/index.cjs +2 -2
- package/dist/components/AppShell/index.js +2 -2
- package/dist/components/Avatar/Avatar.module.scss.cjs +14 -14
- package/dist/components/Avatar/Avatar.module.scss.js +14 -14
- package/dist/components/Badge/Badge.module.scss.cjs +33 -31
- package/dist/components/Badge/Badge.module.scss.js +33 -31
- package/dist/components/Badge/index.cjs +13 -3
- package/dist/components/Badge/index.d.ts +18 -13
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Badge/index.js +13 -3
- package/dist/components/BentoGrid/BentoGrid.module.scss.cjs +14 -14
- package/dist/components/BentoGrid/BentoGrid.module.scss.js +14 -14
- package/dist/components/Box/Box.module.scss.cjs +152 -152
- package/dist/components/Box/Box.module.scss.js +152 -152
- package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.cjs +11 -8
- package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.js +11 -8
- package/dist/components/Breadcrumbs/index.cjs +1 -1
- package/dist/components/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/index.js +1 -1
- package/dist/components/Button/Button.module.scss.cjs +36 -27
- package/dist/components/Button/Button.module.scss.js +36 -27
- package/dist/components/Button/index.cjs +20 -4
- package/dist/components/Button/index.d.ts +18 -10
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +20 -4
- package/dist/components/ButtonGroup/ButtonGroup.module.scss.cjs +15 -15
- package/dist/components/ButtonGroup/ButtonGroup.module.scss.js +15 -15
- package/dist/components/Card/Card.module.scss.cjs +27 -34
- package/dist/components/Card/Card.module.scss.js +27 -34
- package/dist/components/Card/index.cjs +13 -8
- package/dist/components/Card/index.d.ts +23 -25
- package/dist/components/Card/index.d.ts.map +1 -1
- package/dist/components/Card/index.js +13 -8
- package/dist/components/Chart/Chart.module.scss.cjs +15 -15
- package/dist/components/Chart/Chart.module.scss.js +15 -15
- package/dist/components/Checkbox/Checkbox.module.scss.cjs +11 -11
- package/dist/components/Checkbox/Checkbox.module.scss.js +11 -11
- package/dist/components/Checkbox/index.cjs +2 -2
- package/dist/components/Checkbox/index.d.ts +4 -6
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.js +2 -2
- package/dist/components/Chip/Chip.module.scss.cjs +19 -19
- package/dist/components/Chip/Chip.module.scss.js +19 -19
- package/dist/components/Chip/index.cjs +1 -2
- package/dist/components/Chip/index.d.ts +8 -3
- package/dist/components/Chip/index.d.ts.map +1 -1
- package/dist/components/Chip/index.js +1 -2
- package/dist/components/CodeBlock/CodeBlock.module.scss.cjs +22 -22
- package/dist/components/CodeBlock/CodeBlock.module.scss.js +22 -22
- package/dist/components/CodeBlock/index.d.ts +3 -2
- package/dist/components/CodeBlock/index.d.ts.map +1 -1
- package/dist/components/Collapsible/Collapsible.module.scss.cjs +9 -9
- package/dist/components/Collapsible/Collapsible.module.scss.js +9 -9
- package/dist/components/ColorPicker/ColorPicker.module.scss.cjs +14 -14
- package/dist/components/ColorPicker/ColorPicker.module.scss.js +14 -14
- package/dist/components/ColorPicker/index.d.ts.map +1 -1
- package/dist/components/Combobox/Combobox.module.scss.cjs +21 -21
- package/dist/components/Combobox/Combobox.module.scss.js +21 -21
- package/dist/components/Combobox/index.cjs +9 -5
- package/dist/components/Combobox/index.d.ts.map +1 -1
- package/dist/components/Combobox/index.js +9 -5
- package/dist/components/Command/Command.module.scss.cjs +14 -11
- package/dist/components/Command/Command.module.scss.js +14 -11
- package/dist/components/Command/index.cjs +2 -1
- package/dist/components/Command/index.d.ts +6 -1
- package/dist/components/Command/index.d.ts.map +1 -1
- package/dist/components/Command/index.js +2 -1
- package/dist/components/ConversationList/ConversationList.module.scss.cjs +10 -10
- package/dist/components/ConversationList/ConversationList.module.scss.js +10 -10
- package/dist/components/ConversationList/index.cjs +2 -2
- package/dist/components/ConversationList/index.js +2 -2
- package/dist/components/DataTable/DataTable.module.scss.cjs +31 -28
- package/dist/components/DataTable/DataTable.module.scss.js +31 -28
- package/dist/components/DataTable/DataTable.virtual.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.module.scss.cjs +33 -33
- package/dist/components/DatePicker/DatePicker.module.scss.js +33 -33
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.module.scss.cjs +14 -14
- package/dist/components/Dialog/Dialog.module.scss.js +14 -14
- package/dist/components/Dialog/index.cjs +2 -2
- package/dist/components/Dialog/index.d.ts +5 -4
- package/dist/components/Dialog/index.d.ts.map +1 -1
- package/dist/components/Dialog/index.js +2 -2
- package/dist/components/Drawer/Drawer.module.scss.cjs +39 -39
- package/dist/components/Drawer/Drawer.module.scss.js +40 -40
- package/dist/components/Drawer/index.cjs +2 -2
- package/dist/components/Drawer/index.d.ts +5 -4
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.js +2 -2
- package/dist/components/Editor/Editor.module.scss.cjs +17 -17
- package/dist/components/Editor/Editor.module.scss.js +17 -17
- package/dist/components/EmptyState/EmptyState.module.scss.cjs +11 -11
- package/dist/components/EmptyState/EmptyState.module.scss.js +11 -11
- package/dist/components/EmptyState/index.cjs +9 -4
- package/dist/components/EmptyState/index.d.ts +8 -5
- package/dist/components/EmptyState/index.d.ts.map +1 -1
- package/dist/components/EmptyState/index.js +9 -4
- package/dist/components/Field/Field.module.scss.cjs +5 -5
- package/dist/components/Field/Field.module.scss.js +5 -5
- package/dist/components/Fieldset/Fieldset.module.scss.cjs +3 -3
- package/dist/components/Fieldset/Fieldset.module.scss.js +3 -3
- package/dist/components/Grid/Grid.module.scss.cjs +54 -54
- package/dist/components/Grid/Grid.module.scss.js +54 -54
- package/dist/components/Header/Header.module.scss.cjs +33 -33
- package/dist/components/Header/Header.module.scss.js +33 -33
- package/dist/components/Icon/Icon.module.scss.cjs +30 -33
- package/dist/components/Icon/Icon.module.scss.js +30 -33
- package/dist/components/Icon/index.cjs +15 -14
- package/dist/components/Icon/index.d.ts +23 -12
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/Icon/index.js +15 -14
- package/dist/components/IconButton/IconButton.module.scss.cjs +12 -12
- package/dist/components/IconButton/IconButton.module.scss.js +12 -12
- package/dist/components/IconButton/index.d.ts +4 -4
- package/dist/components/IconButton/index.d.ts.map +1 -1
- package/dist/components/Input/Input.module.scss.cjs +15 -21
- package/dist/components/Input/Input.module.scss.js +15 -21
- package/dist/components/Input/index.cjs +2 -14
- package/dist/components/Input/index.d.ts +0 -2
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Input/index.js +2 -14
- package/dist/components/Link/Link.module.scss.cjs +24 -16
- package/dist/components/Link/Link.module.scss.js +24 -16
- package/dist/components/Link/index.cjs +13 -2
- package/dist/components/Link/index.d.ts +10 -3
- package/dist/components/Link/index.d.ts.map +1 -1
- package/dist/components/Link/index.js +13 -2
- package/dist/components/List/List.module.scss.cjs +23 -19
- package/dist/components/List/List.module.scss.js +23 -19
- package/dist/components/List/index.cjs +7 -7
- package/dist/components/List/index.d.ts +10 -7
- package/dist/components/List/index.d.ts.map +1 -1
- package/dist/components/List/index.js +7 -7
- package/dist/components/Listbox/Listbox.module.scss.cjs +8 -8
- package/dist/components/Listbox/Listbox.module.scss.js +8 -8
- package/dist/components/Loading/Loading.module.scss.cjs +30 -30
- package/dist/components/Loading/Loading.module.scss.js +30 -30
- package/dist/components/Loading/index.cjs +5 -5
- package/dist/components/Loading/index.d.ts +8 -7
- package/dist/components/Loading/index.d.ts.map +1 -1
- package/dist/components/Loading/index.js +5 -5
- package/dist/components/Markdown/Markdown.module.scss.cjs +1 -1
- package/dist/components/Markdown/Markdown.module.scss.js +1 -1
- package/dist/components/Menu/Menu.module.scss.cjs +14 -14
- package/dist/components/Menu/Menu.module.scss.js +14 -14
- package/dist/components/Message/Message.module.scss.cjs +20 -20
- package/dist/components/Message/Message.module.scss.js +20 -20
- package/dist/components/Message/index.cjs +1 -1
- package/dist/components/Message/index.d.ts +1 -1
- package/dist/components/Message/index.js +1 -1
- package/dist/components/NavigationMenu/NavigationMenu.module.scss.cjs +29 -29
- package/dist/components/NavigationMenu/NavigationMenu.module.scss.js +29 -29
- package/dist/components/Pagination/Pagination.module.scss.cjs +10 -10
- package/dist/components/Pagination/Pagination.module.scss.js +10 -10
- package/dist/components/Popover/Popover.module.scss.cjs +10 -10
- package/dist/components/Popover/Popover.module.scss.js +10 -10
- package/dist/components/Progress/Progress.module.scss.cjs +28 -25
- package/dist/components/Progress/Progress.module.scss.js +28 -25
- package/dist/components/Progress/index.cjs +21 -12
- package/dist/components/Progress/index.d.ts +10 -6
- package/dist/components/Progress/index.d.ts.map +1 -1
- package/dist/components/Progress/index.js +21 -12
- package/dist/components/Prompt/Prompt.module.scss.cjs +30 -30
- package/dist/components/Prompt/Prompt.module.scss.js +30 -30
- package/dist/components/Prompt/index.cjs +7 -7
- package/dist/components/Prompt/index.d.ts +11 -9
- package/dist/components/Prompt/index.d.ts.map +1 -1
- package/dist/components/Prompt/index.js +7 -7
- package/dist/components/RadioGroup/RadioGroup.module.scss.cjs +20 -17
- package/dist/components/RadioGroup/RadioGroup.module.scss.js +20 -17
- package/dist/components/RadioGroup/index.cjs +10 -5
- package/dist/components/RadioGroup/index.d.ts +11 -7
- package/dist/components/RadioGroup/index.d.ts.map +1 -1
- package/dist/components/RadioGroup/index.js +10 -5
- package/dist/components/ScrollArea/ScrollArea.module.scss.cjs +5 -5
- package/dist/components/ScrollArea/ScrollArea.module.scss.js +5 -5
- package/dist/components/Select/Select.module.scss.cjs +21 -21
- package/dist/components/Select/Select.module.scss.js +21 -21
- package/dist/components/Select/index.cjs +26 -20
- package/dist/components/Select/index.d.ts +5 -5
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +26 -20
- package/dist/components/Separator/Separator.module.scss.cjs +25 -19
- package/dist/components/Separator/Separator.module.scss.js +25 -19
- package/dist/components/Separator/index.cjs +10 -8
- package/dist/components/Separator/index.d.ts +4 -2
- package/dist/components/Separator/index.d.ts.map +1 -1
- package/dist/components/Separator/index.js +10 -8
- package/dist/components/Sidebar/Sidebar.module.scss.cjs +43 -43
- package/dist/components/Sidebar/Sidebar.module.scss.js +43 -43
- package/dist/components/Sidebar/index.cjs +3 -3
- package/dist/components/Sidebar/index.js +3 -3
- package/dist/components/Skeleton/Skeleton.module.scss.cjs +46 -46
- package/dist/components/Skeleton/Skeleton.module.scss.js +46 -46
- package/dist/components/Skeleton/index.cjs +7 -7
- package/dist/components/Skeleton/index.d.ts +8 -7
- package/dist/components/Skeleton/index.d.ts.map +1 -1
- package/dist/components/Skeleton/index.js +7 -7
- package/dist/components/Slider/Slider.module.scss.cjs +12 -12
- package/dist/components/Slider/Slider.module.scss.js +12 -12
- package/dist/components/Switch/Switch.module.scss.cjs +9 -9
- package/dist/components/Switch/Switch.module.scss.js +9 -9
- package/dist/components/Table/Table.module.scss.cjs +15 -15
- package/dist/components/Table/Table.module.scss.js +15 -15
- package/dist/components/TableOfContents/TableOfContents.module.scss.cjs +15 -15
- package/dist/components/TableOfContents/TableOfContents.module.scss.js +15 -15
- package/dist/components/TableOfContents/index.cjs +1 -1
- package/dist/components/TableOfContents/index.js +1 -1
- package/dist/components/Tabs/Tabs.module.scss.cjs +18 -18
- package/dist/components/Tabs/Tabs.module.scss.js +18 -18
- package/dist/components/Tabs/index.cjs +5 -6
- package/dist/components/Tabs/index.d.ts +8 -6
- package/dist/components/Tabs/index.d.ts.map +1 -1
- package/dist/components/Tabs/index.js +5 -6
- package/dist/components/Text/Text.module.scss.cjs +105 -105
- package/dist/components/Text/Text.module.scss.js +105 -105
- package/dist/components/Text/index.cjs +5 -9
- package/dist/components/Text/index.d.ts +15 -11
- package/dist/components/Text/index.d.ts.map +1 -1
- package/dist/components/Text/index.js +5 -9
- package/dist/components/Textarea/Textarea.module.scss.cjs +22 -28
- package/dist/components/Textarea/Textarea.module.scss.js +22 -28
- package/dist/components/Textarea/index.cjs +3 -10
- package/dist/components/Textarea/index.d.ts +0 -2
- package/dist/components/Textarea/index.d.ts.map +1 -1
- package/dist/components/Textarea/index.js +3 -10
- package/dist/components/Theme/index.cjs +20 -4
- package/dist/components/Theme/index.d.ts +6 -12
- package/dist/components/Theme/index.d.ts.map +1 -1
- package/dist/components/Theme/index.js +20 -4
- package/dist/components/ThemeToggle/ThemeButton.cjs +51 -0
- package/dist/components/ThemeToggle/ThemeButton.d.ts +16 -0
- package/dist/components/ThemeToggle/ThemeButton.d.ts.map +1 -0
- package/dist/components/ThemeToggle/ThemeButton.js +34 -0
- package/dist/components/ThemeToggle/ThemeToggle.module.scss.cjs +6 -9
- package/dist/components/ThemeToggle/ThemeToggle.module.scss.js +6 -9
- package/dist/components/ThemeToggle/icons.cjs +48 -0
- package/dist/components/ThemeToggle/icons.d.ts +10 -0
- package/dist/components/ThemeToggle/icons.d.ts.map +1 -0
- package/dist/components/ThemeToggle/icons.js +48 -0
- package/dist/components/ThemeToggle/index.cjs +5 -74
- package/dist/components/ThemeToggle/index.d.ts +5 -8
- package/dist/components/ThemeToggle/index.d.ts.map +1 -1
- package/dist/components/ThemeToggle/index.js +3 -72
- package/dist/components/ThinkingIndicator/ThinkingIndicator.module.scss.cjs +18 -15
- package/dist/components/ThinkingIndicator/ThinkingIndicator.module.scss.js +18 -15
- package/dist/components/ThinkingIndicator/index.cjs +7 -8
- package/dist/components/ThinkingIndicator/index.d.ts +6 -5
- package/dist/components/ThinkingIndicator/index.d.ts.map +1 -1
- package/dist/components/ThinkingIndicator/index.js +7 -8
- package/dist/components/Toast/Toast.module.scss.cjs +28 -29
- package/dist/components/Toast/Toast.module.scss.js +29 -30
- package/dist/components/Toast/index.cjs +28 -30
- package/dist/components/Toast/index.d.ts +9 -8
- package/dist/components/Toast/index.d.ts.map +1 -1
- package/dist/components/Toast/index.js +28 -30
- package/dist/components/ToggleGroup/ToggleGroup.module.scss.cjs +21 -19
- package/dist/components/ToggleGroup/ToggleGroup.module.scss.js +22 -20
- package/dist/components/ToggleGroup/index.cjs +4 -5
- package/dist/components/ToggleGroup/index.d.ts +7 -6
- package/dist/components/ToggleGroup/index.d.ts.map +1 -1
- package/dist/components/ToggleGroup/index.js +4 -5
- package/dist/components/Tooltip/Tooltip.module.scss.cjs +3 -3
- package/dist/components/Tooltip/Tooltip.module.scss.js +3 -3
- package/dist/components/VisuallyHidden/VisuallyHidden.module.scss.cjs +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.module.scss.js +1 -1
- package/dist/data-table-virtual.cjs +3 -2
- package/dist/data-table-virtual.js +3 -2
- package/dist/data-table.cjs +1 -1
- package/dist/data-table.js +1 -1
- package/dist/datepicker.cjs +23 -11
- package/dist/datepicker.js +23 -11
- package/dist/index.cjs +5 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/measurements/generated.cjs +37 -93
- package/dist/measurements/generated.d.ts +37 -92
- package/dist/measurements/generated.d.ts.map +1 -1
- package/dist/measurements/generated.js +37 -93
- package/dist/measurements/index.d.ts +1 -1
- package/dist/measurements/index.d.ts.map +1 -1
- package/dist/utils/seed-derivation.cjs +0 -1
- package/dist/utils/seed-derivation.d.ts +1 -3
- package/dist/utils/seed-derivation.d.ts.map +1 -1
- package/dist/utils/seed-derivation.js +0 -1
- package/dist/utils/theme-presets.cjs +5 -10
- package/dist/utils/theme-presets.d.ts +1 -2
- package/dist/utils/theme-presets.d.ts.map +1 -1
- package/dist/utils/theme-presets.js +5 -10
- package/fragments.json +1 -1
- package/package.json +5 -8
- package/src/assets/nav-glyph.module.scss +166 -0
- package/src/assets/nav-glyph.tsx +188 -0
- package/src/components/Accordion/Accordion.module.scss +5 -3
- package/src/components/Alert/Alert.contract.json +18 -18
- package/src/components/Alert/Alert.module.scss +50 -64
- package/src/components/Alert/index.tsx +24 -17
- package/src/components/AppShell/AppShell.contract.json +7 -7
- package/src/components/AppShell/AppShell.module.scss +49 -17
- package/src/components/AppShell/index.tsx +2 -2
- package/src/components/Avatar/Avatar.module.scss +0 -1
- package/src/components/Badge/Badge.contract.json +58 -22
- package/src/components/Badge/Badge.module.scss +72 -47
- package/src/components/Badge/index.tsx +34 -17
- package/src/components/BentoGrid/BentoGrid.module.scss +4 -8
- package/src/components/Box/Box.module.scss +7 -6
- package/src/components/Breadcrumbs/Breadcrumbs.module.scss +15 -5
- package/src/components/Breadcrumbs/index.tsx +5 -1
- package/src/components/Button/Button.module.scss +261 -186
- package/src/components/Button/index.tsx +41 -28
- package/src/components/ButtonGroup/ButtonGroup.contract.json +5 -5
- package/src/components/ButtonGroup/ButtonGroup.module.scss +8 -6
- package/src/components/Card/Card.consumer-fixture.module.scss +5 -2
- package/src/components/Card/Card.module.scss +73 -133
- package/src/components/Card/index.tsx +41 -36
- package/src/components/Chart/Chart.module.scss +6 -5
- package/src/components/Checkbox/Checkbox.contract.json +4 -3
- package/src/components/Checkbox/Checkbox.module.scss +16 -32
- package/src/components/Checkbox/index.tsx +6 -8
- package/src/components/Chip/Chip.contract.json +10 -10
- package/src/components/Chip/Chip.module.scss +23 -22
- package/src/components/Chip/index.tsx +10 -6
- package/src/components/CodeBlock/CodeBlock.module.scss +47 -70
- package/src/components/CodeBlock/index.tsx +23 -16
- package/src/components/Collapsible/Collapsible.module.scss +1 -7
- package/src/components/ColorPicker/ColorPicker.module.scss +20 -13
- package/src/components/ColorPicker/index.tsx +1 -0
- package/src/components/Combobox/Combobox.module.scss +16 -19
- package/src/components/Combobox/index.tsx +10 -1
- package/src/components/Command/Command.contract.json +7 -1
- package/src/components/Command/Command.module.scss +19 -21
- package/src/components/Command/index.tsx +7 -1
- package/src/components/ComponentDefaults/ComponentDefaults.contract.json +91 -0
- package/src/components/ConversationList/ConversationList.module.scss +2 -3
- package/src/components/ConversationList/index.tsx +2 -2
- package/src/components/DataTable/DataTable.module.scss +12 -9
- package/src/components/DataTable/DataTable.virtual.tsx +3 -2
- package/src/components/DataTable/index.tsx +1 -1
- package/src/components/DatePicker/DatePicker.module.scss +32 -42
- package/src/components/DatePicker/index.tsx +18 -7
- package/src/components/Dialog/Dialog.module.scss +23 -29
- package/src/components/Dialog/index.tsx +7 -5
- package/src/components/Drawer/Drawer.contract.json +6 -6
- package/src/components/Drawer/Drawer.module.scss +123 -64
- package/src/components/Drawer/index.tsx +7 -5
- package/src/components/Editor/Editor.contract.json +1 -1
- package/src/components/Editor/Editor.module.scss +26 -13
- package/src/components/EmptyState/EmptyState.contract.json +6 -6
- package/src/components/EmptyState/EmptyState.module.scss +31 -23
- package/src/components/EmptyState/index.tsx +17 -9
- package/src/components/Field/Field.module.scss +2 -1
- package/src/components/Fieldset/Fieldset.module.scss +5 -4
- package/src/components/Form/Form.contract.json +4 -4
- package/src/components/Grid/Grid.module.scss +2 -2
- package/src/components/Header/Header.contract.json +2 -2
- package/src/components/Header/Header.module.scss +24 -36
- package/src/components/Icon/Icon.contract.json +19 -23
- package/src/components/Icon/Icon.module.scss +13 -12
- package/src/components/Icon/index.tsx +31 -31
- package/src/components/IconButton/IconButton.contract.json +8 -8
- package/src/components/IconButton/IconButton.module.scss +13 -4
- package/src/components/IconButton/index.tsx +4 -4
- package/src/components/Input/Input.contract.json +0 -13
- package/src/components/Input/Input.module.scss +4 -54
- package/src/components/Input/index.tsx +2 -18
- package/src/components/Link/Link.contract.json +19 -11
- package/src/components/Link/Link.module.scss +24 -10
- package/src/components/Link/index.tsx +26 -5
- package/src/components/List/List.contract.json +11 -11
- package/src/components/List/List.module.scss +10 -5
- package/src/components/List/index.tsx +17 -13
- package/src/components/Listbox/Listbox.module.scss +14 -20
- package/src/components/Loading/Loading.contract.json +6 -6
- package/src/components/Loading/Loading.module.scss +29 -26
- package/src/components/Loading/index.tsx +13 -12
- package/src/components/Markdown/Markdown.module.scss +2 -1
- package/src/components/Menu/Menu.contract.json +5 -5
- package/src/components/Menu/Menu.module.scss +11 -10
- package/src/components/Message/Message.contract.json +5 -5
- package/src/components/Message/Message.module.scss +8 -6
- package/src/components/Message/index.tsx +2 -2
- package/src/components/NavigationMenu/NavigationMenu.module.scss +22 -67
- package/src/components/Pagination/Pagination.module.scss +7 -14
- package/src/components/Popover/Popover.contract.json +4 -4
- package/src/components/Popover/Popover.module.scss +24 -23
- package/src/components/Progress/Progress.contract.json +11 -11
- package/src/components/Progress/Progress.module.scss +13 -8
- package/src/components/Progress/index.tsx +34 -16
- package/src/components/Prompt/Prompt.contract.json +12 -12
- package/src/components/Prompt/Prompt.module.scss +40 -47
- package/src/components/Prompt/index.tsx +17 -15
- package/src/components/RadioGroup/RadioGroup.contract.json +6 -4
- package/src/components/RadioGroup/RadioGroup.module.scss +38 -32
- package/src/components/RadioGroup/index.tsx +23 -10
- package/src/components/ScrollArea/ScrollArea.module.scss +30 -33
- package/src/components/Select/Select.module.scss +19 -18
- package/src/components/Select/index.tsx +26 -24
- package/src/components/Separator/Separator.contract.json +10 -10
- package/src/components/Separator/Separator.module.scss +24 -40
- package/src/components/Separator/index.tsx +16 -11
- package/src/components/Sidebar/Sidebar.contract.json +1 -1
- package/src/components/Sidebar/Sidebar.module.scss +92 -95
- package/src/components/Sidebar/index.tsx +3 -3
- package/src/components/Skeleton/Skeleton.contract.json +9 -9
- package/src/components/Skeleton/Skeleton.module.scss +23 -16
- package/src/components/Skeleton/index.tsx +16 -15
- package/src/components/Slider/Slider.module.scss +6 -19
- package/src/components/Stack/Stack.contract.json +1 -1
- package/src/components/Stack/Stack.module.scss +13 -12
- package/src/components/Switch/Switch.module.scss +44 -35
- package/src/components/Table/Table.module.scss +9 -13
- package/src/components/TableOfContents/TableOfContents.module.scss +12 -18
- package/src/components/TableOfContents/index.tsx +1 -1
- package/src/components/Tabs/Tabs.contract.json +14 -14
- package/src/components/Tabs/Tabs.module.scss +27 -31
- package/src/components/Tabs/index.tsx +15 -12
- package/src/components/Text/Text.contract.json +36 -14
- package/src/components/Text/Text.module.scss +19 -20
- package/src/components/Text/index.tsx +23 -21
- package/src/components/Textarea/Textarea.contract.json +0 -13
- package/src/components/Textarea/Textarea.module.scss +24 -52
- package/src/components/Textarea/index.tsx +3 -14
- package/src/components/Theme/Theme.contract.json +9 -8
- package/src/components/Theme/index.tsx +39 -12
- package/src/components/ThemeToggle/ThemeButton.tsx +49 -0
- package/src/components/ThemeToggle/ThemeToggle.module.scss +21 -44
- package/src/components/ThemeToggle/icons.tsx +46 -0
- package/src/components/ThemeToggle/index.tsx +8 -90
- package/src/components/ThinkingIndicator/ThinkingIndicator.contract.json +11 -10
- package/src/components/ThinkingIndicator/ThinkingIndicator.module.scss +9 -7
- package/src/components/ThinkingIndicator/index.tsx +12 -14
- package/src/components/Toast/Toast.contract.json +29 -13
- package/src/components/Toast/Toast.module.scss +49 -104
- package/src/components/Toast/index.tsx +39 -34
- package/src/components/ToggleGroup/ToggleGroup.contract.json +13 -13
- package/src/components/ToggleGroup/ToggleGroup.module.scss +16 -46
- package/src/components/ToggleGroup/index.tsx +11 -11
- package/src/components/Tooltip/Tooltip.contract.json +3 -3
- package/src/components/Tooltip/Tooltip.module.scss +16 -10
- package/src/components/VisuallyHidden/VisuallyHidden.module.scss +4 -14
- package/src/index.ts +14 -10
- package/src/measurements/MeasurementTargets.module.scss +6 -7
- package/src/measurements/generated.ts +38 -96
- package/src/measurements/index.ts +0 -1
- package/src/measurements/measurements.json +37 -116
- package/src/recipes/_action.scss +4 -4
- package/src/recipes/_boolean-range.scss +9 -5
- package/src/recipes/_feedback.scss +17 -16
- package/src/recipes/_field.scss +28 -20
- package/src/recipes/_navigation.scss +84 -29
- package/src/recipes/_overlay.scss +143 -43
- package/src/recipes/_popup.scss +46 -36
- package/src/recipes/_prose.scss +35 -23
- package/src/recipes/_representation.scss +10 -9
- package/src/recipes/_segmented.scss +1 -1
- package/src/recipes/_table-chrome.scss +27 -16
- package/src/recipes/_target.scss +2 -4
- package/src/recipes/_typography.scss +10 -0
- package/src/styles/globals.scss +14 -9
- package/src/tokens/_component-properties.scss +19 -1
- package/src/tokens/_computed.scss +27 -33
- package/src/tokens/_measurements.catalog.generated.css +58 -45
- package/src/tokens/_measurements.generated.scss +107 -250
- package/src/tokens/_mixins.scss +42 -40
- package/src/tokens/_palettes.scss +1 -1
- package/src/tokens/_property-registrations.scss +9 -0
- package/src/tokens/_seeds.scss +1 -12
- package/src/tokens/_variables.scss +71 -59
- package/src/utils/seed-derivation.ts +1 -8
- package/src/utils/theme-presets.ts +5 -12
- package/dist/blocks/AccountSettings.block.d.ts +0 -3
- package/dist/blocks/AccountSettings.block.d.ts.map +0 -1
- package/dist/blocks/ActivityFeedSkeleton.block.d.ts +0 -3
- package/dist/blocks/ActivityFeedSkeleton.block.d.ts.map +0 -1
- package/dist/blocks/BlogEditor.block.d.ts +0 -3
- package/dist/blocks/BlogEditor.block.d.ts.map +0 -1
- package/dist/blocks/ChatInterface.block.d.ts +0 -3
- package/dist/blocks/ChatInterface.block.d.ts.map +0 -1
- package/dist/blocks/ChatMessages.block.d.ts +0 -3
- package/dist/blocks/ChatMessages.block.d.ts.map +0 -1
- package/dist/blocks/CheckoutForm.block.d.ts +0 -3
- package/dist/blocks/CheckoutForm.block.d.ts.map +0 -1
- package/dist/blocks/CommandPalette.block.d.ts +0 -3
- package/dist/blocks/CommandPalette.block.d.ts.map +0 -1
- package/dist/blocks/ContactForm.block.d.ts +0 -3
- package/dist/blocks/ContactForm.block.d.ts.map +0 -1
- package/dist/blocks/DashboardPage.block.d.ts +0 -3
- package/dist/blocks/DashboardPage.block.d.ts.map +0 -1
- package/dist/blocks/DashboardSkeleton.block.d.ts +0 -3
- package/dist/blocks/DashboardSkeleton.block.d.ts.map +0 -1
- package/dist/blocks/DataTable.block.d.ts +0 -3
- package/dist/blocks/DataTable.block.d.ts.map +0 -1
- package/dist/blocks/EmptyState.block.d.ts +0 -3
- package/dist/blocks/EmptyState.block.d.ts.map +0 -1
- package/dist/blocks/FAQSection.block.d.ts +0 -3
- package/dist/blocks/FAQSection.block.d.ts.map +0 -1
- package/dist/blocks/FeatureGrid.block.d.ts +0 -3
- package/dist/blocks/FeatureGrid.block.d.ts.map +0 -1
- package/dist/blocks/HeroSection.block.d.ts +0 -3
- package/dist/blocks/HeroSection.block.d.ts.map +0 -1
- package/dist/blocks/NavigationHeader.block.d.ts +0 -3
- package/dist/blocks/NavigationHeader.block.d.ts.map +0 -1
- package/dist/blocks/PaginatedTable.block.d.ts +0 -3
- package/dist/blocks/PaginatedTable.block.d.ts.map +0 -1
- package/dist/blocks/PricingComparison.block.d.ts +0 -3
- package/dist/blocks/PricingComparison.block.d.ts.map +0 -1
- package/dist/blocks/ProductCard.block.d.ts +0 -3
- package/dist/blocks/ProductCard.block.d.ts.map +0 -1
- package/dist/blocks/RegistrationForm.block.d.ts +0 -3
- package/dist/blocks/RegistrationForm.block.d.ts.map +0 -1
- package/dist/blocks/SettingsDrawer.block.d.ts +0 -3
- package/dist/blocks/SettingsDrawer.block.d.ts.map +0 -1
- package/dist/blocks/SettingsPanel.block.d.ts +0 -3
- package/dist/blocks/SettingsPanel.block.d.ts.map +0 -1
- package/dist/blocks/ShoppingCart.block.d.ts +0 -3
- package/dist/blocks/ShoppingCart.block.d.ts.map +0 -1
- package/dist/blocks/StatsCardSkeleton.block.d.ts +0 -3
- package/dist/blocks/StatsCardSkeleton.block.d.ts.map +0 -1
- package/dist/blocks/TableSkeleton.block.d.ts +0 -3
- package/dist/blocks/TableSkeleton.block.d.ts.map +0 -1
- package/dist/blocks/ThinkingStates.block.d.ts +0 -3
- package/dist/blocks/ThinkingStates.block.d.ts.map +0 -1
- package/dist/components/Toggle/index.d.ts +0 -3
- package/dist/components/Toggle/index.d.ts.map +0 -1
- package/src/components/Toggle/index.ts +0 -7
- package/src/tokens/_density.scss +0 -85
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
@use "../../tokens/measurements.generated" as measurements;
|
|
1
2
|
@use "../../tokens/variables" as *;
|
|
2
3
|
@use "../../tokens/mixins" as *;
|
|
3
4
|
@use "../../recipes/action" as action;
|
|
4
5
|
@use "../../recipes/layout" as layout;
|
|
5
6
|
@use "../../recipes/navigation" as navigation;
|
|
7
|
+
@use "../../recipes/overlay" as overlay;
|
|
6
8
|
@use "../../recipes/popup" as popup;
|
|
7
9
|
@use "../../recipes/typography" as typography;
|
|
8
10
|
|
|
@@ -51,8 +53,8 @@
|
|
|
51
53
|
align-items: center;
|
|
52
54
|
gap: var(--fui-space-1, $fui-space-1);
|
|
53
55
|
list-style: none;
|
|
54
|
-
margin: 0;
|
|
55
|
-
padding: 0;
|
|
56
|
+
margin: var(--fui-raw-space-0, #{measurements.raw-space(0)});
|
|
57
|
+
padding: var(--fui-raw-space-0, #{measurements.raw-space(0)});
|
|
56
58
|
|
|
57
59
|
// Use viewport breakpoint (matches useIsMobile in NavigationMenu.tsx).
|
|
58
60
|
// Self container queries on a shrink-to-content nav root can incorrectly hide
|
|
@@ -114,7 +116,7 @@
|
|
|
114
116
|
.content {
|
|
115
117
|
display: flex;
|
|
116
118
|
flex-direction: column;
|
|
117
|
-
gap: var(--fui-stroke-hairline,
|
|
119
|
+
gap: var(--fui-stroke-hairline, #{$fui-stroke-hairline});
|
|
118
120
|
position: absolute;
|
|
119
121
|
left: 0;
|
|
120
122
|
top: 0;
|
|
@@ -254,7 +256,7 @@
|
|
|
254
256
|
|
|
255
257
|
.linkFeatured {
|
|
256
258
|
background-color: var(--fui-bg-secondary, $fui-bg-secondary);
|
|
257
|
-
border: var(--fui-stroke-hairline,
|
|
259
|
+
border: var(--fui-stroke-hairline, #{$fui-stroke-hairline}) solid var(--fui-border, $fui-border);
|
|
258
260
|
|
|
259
261
|
&:hover {
|
|
260
262
|
@include popup.highlight-state;
|
|
@@ -269,7 +271,7 @@
|
|
|
269
271
|
.indicator {
|
|
270
272
|
position: absolute;
|
|
271
273
|
bottom: 0;
|
|
272
|
-
height: var(--fui-stroke-default,
|
|
274
|
+
height: var(--fui-stroke-default, #{$fui-stroke-default});
|
|
273
275
|
background-color: var(--fui-color-accent, $fui-color-accent);
|
|
274
276
|
border-radius: var(--fui-radius-full, $fui-radius-full);
|
|
275
277
|
transition:
|
|
@@ -291,10 +293,10 @@
|
|
|
291
293
|
overflow: hidden;
|
|
292
294
|
border-color: var(--fui-border-strong, $fui-border-strong);
|
|
293
295
|
box-shadow: var(--fui-shadow-md, $fui-shadow-md);
|
|
294
|
-
z-index:
|
|
296
|
+
z-index: var(--fui-overlay-layer-anchored, #{$fui-overlay-layer-anchored});
|
|
295
297
|
|
|
296
|
-
width: var(--fui-navmenu-viewport-width);
|
|
297
|
-
height: var(--fui-navmenu-viewport-height);
|
|
298
|
+
width: var(--fui-navmenu-viewport-width, #{measurements.raw-space(0)});
|
|
299
|
+
height: var(--fui-navmenu-viewport-height, #{measurements.raw-space(0)});
|
|
298
300
|
transition: opacity var(--fui-transition-fast, $fui-transition-fast);
|
|
299
301
|
|
|
300
302
|
// Hidden when no item is open
|
|
@@ -333,8 +335,6 @@
|
|
|
333
335
|
border-radius: var(--fui-radius-md, $fui-radius-md);
|
|
334
336
|
color: var(--fui-text-primary, $fui-text-primary);
|
|
335
337
|
flex-shrink: 0;
|
|
336
|
-
width: var(--fui-navigation-mobile-target, var(--_fui-action-track));
|
|
337
|
-
height: var(--fui-navigation-mobile-target, var(--_fui-action-track));
|
|
338
338
|
|
|
339
339
|
&:hover {
|
|
340
340
|
background-color: var(--fui-bg-hover, $fui-bg-hover);
|
|
@@ -355,37 +355,17 @@
|
|
|
355
355
|
// ============================================
|
|
356
356
|
|
|
357
357
|
.drawerBackdrop {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
background: var(--fui-backdrop, $fui-backdrop);
|
|
361
|
-
z-index: calc(var(--fui-header-z-index, $fui-header-z-index) + 10);
|
|
358
|
+
@include overlay.backdrop;
|
|
359
|
+
|
|
362
360
|
animation: fadeIn var(--fui-transition-normal, $fui-transition-normal);
|
|
363
361
|
}
|
|
364
362
|
|
|
363
|
+
// The mobile menu is the Drawer surface: same frame, width, layer and chrome.
|
|
364
|
+
// The header stays pinned; ScrollArea in .drawerBody owns vertical scroll.
|
|
365
365
|
.drawer {
|
|
366
|
-
|
|
367
|
-
top: 0;
|
|
368
|
-
bottom: 0;
|
|
369
|
-
left: 0;
|
|
370
|
-
width: min(320px, 85vw);
|
|
371
|
-
max-width: 380px;
|
|
372
|
-
background-color: var(--fui-bg-primary, $fui-bg-primary);
|
|
373
|
-
z-index: calc(var(--fui-header-z-index, $fui-header-z-index) + 11);
|
|
374
|
-
display: flex;
|
|
375
|
-
flex-direction: column;
|
|
376
|
-
// Keep the header pinned; ScrollArea in .drawerBody owns vertical scroll.
|
|
377
|
-
overflow: hidden;
|
|
378
|
-
animation: slideInLeft var(--fui-transition-normal, $fui-transition-normal);
|
|
366
|
+
@include overlay.side-panel("start");
|
|
379
367
|
|
|
380
|
-
|
|
381
|
-
width: min(380px, 85vw);
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
.drawerRight {
|
|
386
|
-
left: auto;
|
|
387
|
-
right: 0;
|
|
388
|
-
animation: slideInRight var(--fui-transition-normal, $fui-transition-normal);
|
|
368
|
+
animation: slideInLeft var(--fui-transition-normal, $fui-transition-normal);
|
|
389
369
|
}
|
|
390
370
|
|
|
391
371
|
.drawerHeader {
|
|
@@ -393,7 +373,8 @@
|
|
|
393
373
|
align-items: center;
|
|
394
374
|
justify-content: space-between;
|
|
395
375
|
padding: 0 var(--fui-space-4, $fui-space-4);
|
|
396
|
-
border-bottom: var(--fui-stroke-hairline,
|
|
376
|
+
border-bottom: var(--fui-stroke-hairline, #{$fui-stroke-hairline}) solid
|
|
377
|
+
var(--fui-border, $fui-border);
|
|
397
378
|
min-height: var(--fui-appshell-header-height, $fui-appshell-header-height);
|
|
398
379
|
}
|
|
399
380
|
|
|
@@ -408,8 +389,6 @@
|
|
|
408
389
|
justify-content: center;
|
|
409
390
|
border-radius: var(--fui-radius-md, $fui-radius-md);
|
|
410
391
|
color: var(--fui-text-secondary, $fui-text-secondary);
|
|
411
|
-
width: var(--fui-navigation-mobile-target, var(--_fui-action-track));
|
|
412
|
-
height: var(--fui-navigation-mobile-target, var(--_fui-action-track));
|
|
413
392
|
|
|
414
393
|
&:hover {
|
|
415
394
|
background-color: var(--fui-bg-hover, $fui-bg-hover);
|
|
@@ -425,7 +404,7 @@
|
|
|
425
404
|
// blocks ScrollArea from receiving a bounded height and scrolling.
|
|
426
405
|
min-height: 0;
|
|
427
406
|
// Match Sidebar.nav: outer gutter + row inset so links aren't flush to the edge.
|
|
428
|
-
padding: var(--fui-space-2, $fui-space-2) var(--fui-navigation-gutter);
|
|
407
|
+
padding: var(--fui-space-2, $fui-space-2) var(--fui-navigation-gutter, #{navigation.gutter()});
|
|
429
408
|
}
|
|
430
409
|
|
|
431
410
|
.drawerNav {
|
|
@@ -436,29 +415,15 @@
|
|
|
436
415
|
.drawerLink {
|
|
437
416
|
@include button-reset;
|
|
438
417
|
@include navigation.row;
|
|
418
|
+
@include navigation.link-states;
|
|
439
419
|
|
|
440
420
|
display: flex;
|
|
441
421
|
align-items: center;
|
|
442
|
-
min-block-size: var(--fui-navigation-mobile-row-track, var(--fui-navigation-row-track));
|
|
443
422
|
width: 100%;
|
|
444
|
-
color: var(--fui-text-secondary, $fui-text-secondary);
|
|
445
|
-
text-decoration: none;
|
|
446
|
-
transition: background-color var(--fui-transition-fast, $fui-transition-fast);
|
|
447
|
-
|
|
448
|
-
&:hover {
|
|
449
|
-
@include popup.highlight-state;
|
|
450
|
-
}
|
|
451
423
|
}
|
|
452
424
|
|
|
453
425
|
.drawerLinkActive {
|
|
454
|
-
|
|
455
|
-
font-weight: var(--fui-font-weight-medium, $fui-font-weight-medium);
|
|
456
|
-
background-color: var(--fui-control-selected-bg, $fui-bg-active);
|
|
457
|
-
|
|
458
|
-
&:hover {
|
|
459
|
-
background-color: var(--fui-control-selected-bg, $fui-bg-active);
|
|
460
|
-
color: var(--fui-text-primary, $fui-text-primary);
|
|
461
|
-
}
|
|
426
|
+
@include navigation.link-active;
|
|
462
427
|
}
|
|
463
428
|
|
|
464
429
|
.drawerSectionLabel {
|
|
@@ -478,7 +443,6 @@
|
|
|
478
443
|
|
|
479
444
|
display: flex;
|
|
480
445
|
align-items: center;
|
|
481
|
-
min-block-size: var(--fui-navigation-mobile-row-track, var(--fui-navigation-row-track));
|
|
482
446
|
justify-content: space-between;
|
|
483
447
|
width: 100%;
|
|
484
448
|
color: var(--fui-text-primary, $fui-text-primary);
|
|
@@ -519,16 +483,7 @@
|
|
|
519
483
|
|
|
520
484
|
@keyframes slideInLeft {
|
|
521
485
|
from {
|
|
522
|
-
transform: translateX(-
|
|
523
|
-
}
|
|
524
|
-
to {
|
|
525
|
-
transform: translateX(0);
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
@keyframes slideInRight {
|
|
530
|
-
from {
|
|
531
|
-
transform: translateX(100%);
|
|
486
|
+
transform: translateX(overlay.side-panel-offscreen("start"));
|
|
532
487
|
}
|
|
533
488
|
to {
|
|
534
489
|
transform: translateX(0);
|
|
@@ -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/layout';
|
|
5
6
|
|
|
@@ -22,8 +23,8 @@
|
|
|
22
23
|
align-items: center;
|
|
23
24
|
gap: layout.gap("xs");
|
|
24
25
|
list-style: none;
|
|
25
|
-
margin: 0;
|
|
26
|
-
padding: 0;
|
|
26
|
+
margin: var(--fui-raw-space-0, #{measurements.raw-space(0)});
|
|
27
|
+
padding: var(--fui-raw-space-0, #{measurements.raw-space(0)});
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
// ============================================
|
|
@@ -59,12 +60,14 @@
|
|
|
59
60
|
&:hover:not(:disabled) {
|
|
60
61
|
background-color: var(--fui-control-selected-bg, $fui-bg-active);
|
|
61
62
|
}
|
|
63
|
+
|
|
64
|
+
@include high-contrast-outline;
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
// Disabled state (prev/next at boundaries)
|
|
65
68
|
.itemDisabled {
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
@include disabled-state;
|
|
70
|
+
|
|
68
71
|
pointer-events: none;
|
|
69
72
|
}
|
|
70
73
|
|
|
@@ -107,13 +110,3 @@
|
|
|
107
110
|
@include action.glyph("lg");
|
|
108
111
|
}
|
|
109
112
|
|
|
110
|
-
// ============================================
|
|
111
|
-
// Accessibility: High Contrast Mode
|
|
112
|
-
// ============================================
|
|
113
|
-
|
|
114
|
-
@media (prefers-contrast: more) {
|
|
115
|
-
.itemActive {
|
|
116
|
-
outline: var(--fui-stroke-default, 2px) solid var(--fui-text-primary, $fui-text-primary);
|
|
117
|
-
outline-offset: calc(-1 * var(--fui-stroke-default, 2px));
|
|
118
|
-
}
|
|
119
|
-
}
|
|
@@ -73,22 +73,22 @@
|
|
|
73
73
|
{
|
|
74
74
|
"name": "Default",
|
|
75
75
|
"description": "Title, body, and a close control.",
|
|
76
|
-
"code": "<Popover>\n <Popover.Trigger asChild>\n <Button variant=\"
|
|
76
|
+
"code": "<Popover>\n <Popover.Trigger asChild>\n <Button variant=\"soft\">Open Popover</Button>\n </Popover.Trigger>\n <Popover.Content>\n <Popover.Close />\n <Popover.Title>Popover Title</Popover.Title>\n <Popover.Description>\n This is a popover with some content. It can contain text, forms, or other elements.\n </Popover.Description>\n </Popover.Content>\n</Popover>"
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
"name": "With Form",
|
|
80
80
|
"description": "Enough room to edit a value in place.",
|
|
81
|
-
"code": "<Popover>\n <Popover.Trigger asChild>\n <Button variant=\"
|
|
81
|
+
"code": "<Popover>\n <Popover.Trigger asChild>\n <Button variant=\"soft\">Edit Name</Button>\n </Popover.Trigger>\n <Popover.Content size=\"sm\">\n <Popover.Close />\n <Popover.Title>Edit Name</Popover.Title>\n <Popover.Body>\n <Input label=\"Display Name\" placeholder=\"Enter name\" />\n </Popover.Body>\n <Popover.Footer>\n <Popover.Close asChild>\n <Button variant=\"soft\" size=\"sm\">Cancel</Button>\n </Popover.Close>\n <Button variant=\"solid\" size=\"sm\">Save</Button>\n </Popover.Footer>\n </Popover.Content>\n</Popover>"
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
"name": "With Arrow",
|
|
85
85
|
"description": "The arrow ties the panel back to its trigger.",
|
|
86
|
-
"code": "<Popover>\n <Popover.Trigger asChild>\n <Button variant=\"
|
|
86
|
+
"code": "<Popover>\n <Popover.Trigger asChild>\n <Button variant=\"soft\">Info</Button>\n </Popover.Trigger>\n <Popover.Content arrow>\n <Popover.Title>Quick Tip</Popover.Title>\n <Popover.Description>\n This popover has an arrow pointing to its trigger element.\n </Popover.Description>\n </Popover.Content>\n</Popover>"
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
"name": "Positions",
|
|
90
90
|
"description": "Flips to the opposite side when space runs out.",
|
|
91
|
-
"code": "<div style={{ display: 'flex', gap: '16px', padding: '60px' }}>\n <Popover>\n <Popover.Trigger asChild>\n <Button variant=\"
|
|
91
|
+
"code": "<div style={{ display: 'flex', gap: '16px', padding: '60px' }}>\n <Popover>\n <Popover.Trigger asChild>\n <Button variant=\"soft\">Top</Button>\n </Popover.Trigger>\n <Popover.Content side=\"top\" size=\"sm\">\n <Popover.Description>Popover on top</Popover.Description>\n </Popover.Content>\n </Popover>\n <Popover>\n <Popover.Trigger asChild>\n <Button variant=\"soft\">Bottom</Button>\n </Popover.Trigger>\n <Popover.Content side=\"bottom\" size=\"sm\">\n <Popover.Description>Popover on bottom</Popover.Description>\n </Popover.Content>\n </Popover>\n</div>"
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
"name": "Link Trigger",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
@use "../../tokens/variables" as *;
|
|
2
|
+
@use "../../tokens/measurements.generated" as measurements;
|
|
2
3
|
@use "../../tokens/mixins" as *;
|
|
3
4
|
@use "../../recipes/action" as action;
|
|
4
5
|
@use "../../recipes/overlay" as overlay;
|
|
5
6
|
|
|
6
7
|
.positioner {
|
|
7
|
-
z-index: var(--fui-overlay-layer-anchored,
|
|
8
|
+
z-index: var(--fui-overlay-layer-anchored, #{$fui-overlay-layer-anchored});
|
|
8
9
|
outline: none;
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -65,14 +66,16 @@
|
|
|
65
66
|
.title {
|
|
66
67
|
@include overlay.anchored-title;
|
|
67
68
|
|
|
68
|
-
margin:
|
|
69
|
+
margin: var(--fui-raw-space-0, #{measurements.raw-space(0)})
|
|
70
|
+
var(--fui-raw-space-0, #{measurements.raw-space(0)})
|
|
71
|
+
var(--fui-feedback-text-gap, var(--fui-raw-space-4, #{measurements.raw-space(4)}));
|
|
69
72
|
color: var(--fui-text-primary, $fui-text-primary);
|
|
70
73
|
}
|
|
71
74
|
|
|
72
75
|
.description {
|
|
73
76
|
@include overlay.description;
|
|
74
77
|
|
|
75
|
-
margin: 0;
|
|
78
|
+
margin: var(--fui-raw-space-0, #{measurements.raw-space(0)});
|
|
76
79
|
color: var(--fui-text-secondary, $fui-text-secondary);
|
|
77
80
|
}
|
|
78
81
|
|
|
@@ -80,24 +83,12 @@
|
|
|
80
83
|
@include button-reset;
|
|
81
84
|
@include interactive-base;
|
|
82
85
|
@include overlay.close;
|
|
83
|
-
|
|
84
|
-
border-radius: var(--fui-radius-sm, $fui-radius-sm);
|
|
85
|
-
color: var(--fui-text-tertiary, $fui-text-tertiary);
|
|
86
|
-
|
|
87
|
-
&:hover {
|
|
88
|
-
background-color: var(--fui-bg-hover, $fui-bg-hover);
|
|
89
|
-
color: var(--fui-text-primary, $fui-text-primary);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
svg {
|
|
93
|
-
inline-size: action.icon-size("sm");
|
|
94
|
-
block-size: action.icon-size("sm");
|
|
95
|
-
}
|
|
96
86
|
}
|
|
97
87
|
|
|
98
88
|
.popup:has(.close) .title {
|
|
99
89
|
padding-inline-end: calc(
|
|
100
|
-
#{action.track("sm")} +
|
|
90
|
+
#{action.track("sm")} +
|
|
91
|
+
var(--fui-overlay-section-gap, var(--fui-raw-space-8, #{measurements.raw-space(8)}))
|
|
101
92
|
);
|
|
102
93
|
}
|
|
103
94
|
|
|
@@ -105,7 +96,7 @@
|
|
|
105
96
|
@include overlay.arrow-box;
|
|
106
97
|
|
|
107
98
|
background-color: var(--fui-bg-elevated, $fui-bg-elevated);
|
|
108
|
-
border: var(--fui-stroke-hairline,
|
|
99
|
+
border: var(--fui-stroke-hairline, #{$fui-stroke-hairline}) solid var(--fui-border, $fui-border);
|
|
109
100
|
|
|
110
101
|
&[data-side="top"] {
|
|
111
102
|
border-top: none;
|
|
@@ -129,17 +120,27 @@
|
|
|
129
120
|
}
|
|
130
121
|
|
|
131
122
|
.body {
|
|
132
|
-
margin-block-start: var(
|
|
123
|
+
margin-block-start: var(
|
|
124
|
+
--fui-overlay-section-gap,
|
|
125
|
+
var(--fui-raw-space-8, #{measurements.raw-space(8)})
|
|
126
|
+
);
|
|
133
127
|
}
|
|
134
128
|
|
|
135
129
|
.footer {
|
|
136
130
|
display: flex;
|
|
137
131
|
align-items: center;
|
|
138
132
|
justify-content: flex-end;
|
|
139
|
-
gap: var(--fui-overlay-section-gap, var(--fui-raw-space-8,
|
|
140
|
-
margin-block-start: var(
|
|
141
|
-
|
|
142
|
-
|
|
133
|
+
gap: var(--fui-overlay-section-gap, var(--fui-raw-space-8, #{measurements.raw-space(8)}));
|
|
134
|
+
margin-block-start: var(
|
|
135
|
+
--fui-overlay-section-gap,
|
|
136
|
+
var(--fui-raw-space-8, #{measurements.raw-space(8)})
|
|
137
|
+
);
|
|
138
|
+
padding-block-start: var(
|
|
139
|
+
--fui-overlay-section-gap,
|
|
140
|
+
var(--fui-raw-space-8, #{measurements.raw-space(8)})
|
|
141
|
+
);
|
|
142
|
+
border-top: var(--fui-stroke-hairline, #{$fui-stroke-hairline}) solid
|
|
143
|
+
var(--fui-border, $fui-border);
|
|
143
144
|
}
|
|
144
145
|
|
|
145
146
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"min: number (default: 0)",
|
|
13
13
|
"max: number (default: 100)",
|
|
14
14
|
"size: sm|md|lg (default: md)",
|
|
15
|
-
"
|
|
15
|
+
"tone: accent|neutral|success|warning|danger (default: accent)",
|
|
16
16
|
"role: progressbar|meter (default: progressbar)",
|
|
17
17
|
"label: string",
|
|
18
18
|
"showValue: boolean (default: false)",
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"required": false,
|
|
45
45
|
"values": ["sm", "md", "lg"]
|
|
46
46
|
},
|
|
47
|
-
"
|
|
47
|
+
"tone": {
|
|
48
48
|
"type": "enum",
|
|
49
|
-
"description": "
|
|
50
|
-
"default": "
|
|
49
|
+
"description": "Colour. accent is the plain bar; neutral reads as a meter whose maximum is not a success; success, warning and danger carry state.",
|
|
50
|
+
"default": "accent",
|
|
51
51
|
"required": false,
|
|
52
|
-
"values": ["
|
|
52
|
+
"values": ["accent", "neutral", "success", "warning", "danger"]
|
|
53
53
|
},
|
|
54
54
|
"label": {
|
|
55
55
|
"type": "string",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"Pass a value when you know the percentage; pass null when you do not",
|
|
85
85
|
"Add a label whenever the bar alone leaves the purpose unclear",
|
|
86
86
|
"success, warning, and danger carry state, not decoration",
|
|
87
|
-
"
|
|
87
|
+
"tone=\"neutral\" with role=\"meter\" for a magnitude where full is not success",
|
|
88
88
|
"Values outside min and max are clamped before display"
|
|
89
89
|
],
|
|
90
90
|
"accessibility": [
|
|
@@ -101,14 +101,14 @@
|
|
|
101
101
|
"code": "<Progress value={60} label=\"Uploading…\" showValue />"
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
|
-
"name": "
|
|
104
|
+
"name": "Tones",
|
|
105
105
|
"description": "Colour carries state: normal, done, tight, critical.",
|
|
106
|
-
"code": "import { Stack } from '@/components/Stack';\n\n<Stack direction=\"column\" gap=\"md\">\n <Progress value={75}
|
|
106
|
+
"code": "import { Stack } from '@/components/Stack';\n\n<Stack direction=\"column\" gap=\"md\">\n <Progress value={75} tone=\"accent\" label=\"Processing\" showValue />\n <Progress value={100} tone=\"success\" label=\"Complete\" showValue />\n <Progress value={80} tone=\"warning\" label=\"Almost full\" showValue />\n <Progress value={95} tone=\"danger\" label=\"Storage critical\" showValue />\n</Stack>"
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
"name": "Meter",
|
|
110
110
|
"description": "A reading where hitting the top is not a win.",
|
|
111
|
-
"code": "<Progress\n value={42}\n
|
|
111
|
+
"code": "<Progress\n value={42}\n tone=\"neutral\"\n role=\"meter\"\n label=\"Seats used\"\n showValue\n/>"
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
"name": "Sizes",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
{
|
|
124
124
|
"name": "Circular",
|
|
125
125
|
"description": "Same value in a ring, for tiles and compact chrome.",
|
|
126
|
-
"code": "import { CircularProgress } from '@/components/Progress';\nimport { Stack } from '@/components/Stack';\n\n<Stack direction=\"row\" gap=\"lg\" align=\"center\">\n <CircularProgress value={25} size=\"sm\" />\n <CircularProgress value={50} size=\"md\" showValue />\n <CircularProgress value={75} size=\"lg\" showValue
|
|
126
|
+
"code": "import { CircularProgress } from '@/components/Progress';\nimport { Stack } from '@/components/Stack';\n\n<Stack direction=\"row\" gap=\"lg\" align=\"center\">\n <CircularProgress value={25} size=\"sm\" />\n <CircularProgress value={50} size=\"md\" showValue />\n <CircularProgress value={75} size=\"lg\" showValue tone=\"success\" />\n <CircularProgress value={null} size=\"md\" />\n</Stack>"
|
|
127
127
|
}
|
|
128
128
|
],
|
|
129
129
|
"relations": [
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"propsSummary": [
|
|
143
143
|
"value: number|null - progress percentage (null for indeterminate)",
|
|
144
144
|
"size: sm|md|lg - bar thickness",
|
|
145
|
-
"
|
|
145
|
+
"tone: accent|neutral|success|warning|danger - colour",
|
|
146
146
|
"label: string - descriptive label",
|
|
147
147
|
"showValue: boolean - display percentage",
|
|
148
148
|
"Determinate display values are clamped (and invalid min/max ranges render as 0%)"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
.track {
|
|
36
36
|
position: relative;
|
|
37
37
|
inline-size: 100%;
|
|
38
|
-
block-size: var(--_progress-track-size);
|
|
38
|
+
block-size: var(--_progress-track-size, var(--fui-raw-space-6, #{measurements.raw-space(6)}));
|
|
39
39
|
overflow: hidden;
|
|
40
40
|
background-color: var(--fui-bg-tertiary, $fui-bg-tertiary);
|
|
41
41
|
border-radius: var(--fui-radius-full, $fui-radius-full);
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
transition: inline-size var(--fui-transition-normal, $fui-transition-normal);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
//
|
|
73
|
+
// Tones (accent is the absence of a tone class)
|
|
74
74
|
.indicatorNeutral {
|
|
75
75
|
background-color: var(--fui-text-tertiary, $fui-text-tertiary);
|
|
76
76
|
}
|
|
@@ -105,14 +105,15 @@
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
// Circular progress
|
|
108
|
+
// Circular progress. The ring geometry (`--fui-progress-diameter`, `--fui-progress-dash-*`)
|
|
109
|
+
// is authored on the instance from geometry.ts; the md ring is the fallback.
|
|
109
110
|
.circular {
|
|
110
111
|
position: relative;
|
|
111
112
|
display: inline-flex;
|
|
112
113
|
align-items: center;
|
|
113
114
|
justify-content: center;
|
|
114
|
-
inline-size: var(--
|
|
115
|
-
block-size: var(--
|
|
115
|
+
inline-size: var(--fui-progress-diameter, var(--fui-raw-space-48, #{measurements.raw-space(48)}));
|
|
116
|
+
block-size: var(--fui-progress-diameter, var(--fui-raw-space-48, #{measurements.raw-space(48)}));
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
.circularSvg {
|
|
@@ -134,6 +135,10 @@
|
|
|
134
135
|
transition: stroke-dashoffset var(--fui-transition-normal, $fui-transition-normal);
|
|
135
136
|
}
|
|
136
137
|
|
|
138
|
+
.circularIndicatorNeutral {
|
|
139
|
+
stroke: var(--fui-text-tertiary, $fui-text-tertiary);
|
|
140
|
+
}
|
|
141
|
+
|
|
137
142
|
.circularIndicatorSuccess {
|
|
138
143
|
stroke: var(--fui-color-success-text, $fui-color-success-text);
|
|
139
144
|
}
|
|
@@ -153,14 +158,14 @@
|
|
|
153
158
|
|
|
154
159
|
@keyframes circularIndeterminate {
|
|
155
160
|
0% {
|
|
156
|
-
stroke-dashoffset: var(--
|
|
161
|
+
stroke-dashoffset: var(--fui-progress-dash-full, var(--fui-raw-space-0, #{measurements.raw-space(0)}));
|
|
157
162
|
transform: rotate(0deg);
|
|
158
163
|
}
|
|
159
164
|
50% {
|
|
160
|
-
stroke-dashoffset: var(--
|
|
165
|
+
stroke-dashoffset: var(--fui-progress-dash-quarter, var(--fui-raw-space-0, #{measurements.raw-space(0)}));
|
|
161
166
|
}
|
|
162
167
|
100% {
|
|
163
|
-
stroke-dashoffset: var(--
|
|
168
|
+
stroke-dashoffset: var(--fui-progress-dash-full, var(--fui-raw-space-0, #{measurements.raw-space(0)}));
|
|
164
169
|
transform: rotate(360deg);
|
|
165
170
|
}
|
|
166
171
|
}
|
|
@@ -13,6 +13,8 @@ import styles from "./Progress.module.scss";
|
|
|
13
13
|
// Types
|
|
14
14
|
// ============================================
|
|
15
15
|
|
|
16
|
+
export type ProgressTone = "accent" | "neutral" | "success" | "warning" | "danger";
|
|
17
|
+
|
|
16
18
|
export interface ProgressProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "defaultValue"> {
|
|
17
19
|
/** Current progress value (0-100). Null for indeterminate. */
|
|
18
20
|
value?: number | null;
|
|
@@ -22,8 +24,10 @@ export interface ProgressProps extends Omit<React.HTMLAttributes<HTMLDivElement>
|
|
|
22
24
|
max?: number;
|
|
23
25
|
/** Size of the progress bar */
|
|
24
26
|
size?: ProgressSize;
|
|
25
|
-
/**
|
|
26
|
-
|
|
27
|
+
/** Colour. `accent` is the plain bar; `neutral` reads as a meter whose
|
|
28
|
+
* maximum is not a success; the semantic tones carry state.
|
|
29
|
+
* @default "accent" */
|
|
30
|
+
tone?: ProgressTone;
|
|
27
31
|
/** Label text */
|
|
28
32
|
label?: string;
|
|
29
33
|
/** Show percentage value */
|
|
@@ -37,14 +41,31 @@ export interface CircularProgressProps extends React.HTMLAttributes<HTMLDivEleme
|
|
|
37
41
|
value?: number | null;
|
|
38
42
|
/** Size of the circular progress */
|
|
39
43
|
size?: ProgressSize;
|
|
40
|
-
/**
|
|
41
|
-
|
|
44
|
+
/** Colour, same axis as the bar.
|
|
45
|
+
* @default "accent" */
|
|
46
|
+
tone?: ProgressTone;
|
|
42
47
|
/** Show percentage in center */
|
|
43
48
|
showValue?: boolean;
|
|
44
49
|
/** Stroke width */
|
|
45
50
|
strokeWidth?: number;
|
|
46
51
|
}
|
|
47
52
|
|
|
53
|
+
const INDICATOR_TONE_CLASS: Record<ProgressTone, string | undefined> = {
|
|
54
|
+
accent: undefined,
|
|
55
|
+
neutral: styles.indicatorNeutral,
|
|
56
|
+
success: styles.indicatorSuccess,
|
|
57
|
+
warning: styles.indicatorWarning,
|
|
58
|
+
danger: styles.indicatorDanger,
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const CIRCULAR_TONE_CLASS: Record<ProgressTone, string | undefined> = {
|
|
62
|
+
accent: undefined,
|
|
63
|
+
neutral: styles.circularIndicatorNeutral,
|
|
64
|
+
success: styles.circularIndicatorSuccess,
|
|
65
|
+
warning: styles.circularIndicatorWarning,
|
|
66
|
+
danger: styles.circularIndicatorDanger,
|
|
67
|
+
};
|
|
68
|
+
|
|
48
69
|
// ============================================
|
|
49
70
|
// Horizontal progress bar
|
|
50
71
|
// ============================================
|
|
@@ -54,7 +75,7 @@ function ProgressRoot({
|
|
|
54
75
|
min = 0,
|
|
55
76
|
max = 100,
|
|
56
77
|
size = "md",
|
|
57
|
-
|
|
78
|
+
tone = "accent",
|
|
58
79
|
label,
|
|
59
80
|
showValue = false,
|
|
60
81
|
formatValue,
|
|
@@ -88,10 +109,7 @@ function ProgressRoot({
|
|
|
88
109
|
|
|
89
110
|
const indicatorClasses = [
|
|
90
111
|
styles.indicator,
|
|
91
|
-
|
|
92
|
-
variant === "success" && styles.indicatorSuccess,
|
|
93
|
-
variant === "warning" && styles.indicatorWarning,
|
|
94
|
-
variant === "danger" && styles.indicatorDanger,
|
|
112
|
+
INDICATOR_TONE_CLASS[tone],
|
|
95
113
|
isIndeterminate && styles.indicatorIndeterminate,
|
|
96
114
|
]
|
|
97
115
|
.filter(Boolean)
|
|
@@ -140,7 +158,7 @@ function ProgressRoot({
|
|
|
140
158
|
function CircularProgressRoot({
|
|
141
159
|
value = null,
|
|
142
160
|
size = "md",
|
|
143
|
-
|
|
161
|
+
tone = "accent",
|
|
144
162
|
showValue = false,
|
|
145
163
|
strokeWidth: customStrokeWidth,
|
|
146
164
|
className,
|
|
@@ -163,9 +181,7 @@ function CircularProgressRoot({
|
|
|
163
181
|
|
|
164
182
|
const indicatorClasses = [
|
|
165
183
|
styles.circularIndicator,
|
|
166
|
-
|
|
167
|
-
variant === "warning" && styles.circularIndicatorWarning,
|
|
168
|
-
variant === "danger" && styles.circularIndicatorDanger,
|
|
184
|
+
CIRCULAR_TONE_CLASS[tone],
|
|
169
185
|
isIndeterminate && styles.circularIndicatorIndeterminate,
|
|
170
186
|
]
|
|
171
187
|
.filter(Boolean)
|
|
@@ -176,10 +192,12 @@ function CircularProgressRoot({
|
|
|
176
192
|
// Default value text for screen readers
|
|
177
193
|
const effectiveValueText =
|
|
178
194
|
ariaValueText || (isIndeterminate ? "Loading" : `${Math.round(percentage)} percent`);
|
|
195
|
+
// The ring geometry is authored on the instance through the public
|
|
196
|
+
// `--fui-progress-*` properties (declared in tokens/_component-properties.scss).
|
|
179
197
|
const circularStyle = {
|
|
180
|
-
"--
|
|
181
|
-
"--
|
|
182
|
-
"--
|
|
198
|
+
"--fui-progress-diameter": `${geometry.diameter}px`,
|
|
199
|
+
"--fui-progress-dash-full": circumference,
|
|
200
|
+
"--fui-progress-dash-quarter": circumference / 4,
|
|
183
201
|
...styleProp,
|
|
184
202
|
} as React.CSSProperties;
|
|
185
203
|
|