@usefragments/ui 1.5.4 → 1.6.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 +1 -1
- package/dist/assets/ui.css +8808 -5810
- package/dist/chart.cjs +7 -20
- package/dist/chart.js +7 -20
- package/dist/colorpicker.cjs +2 -1
- package/dist/colorpicker.js +2 -1
- package/dist/components/Accordion/Accordion.module.scss.cjs +8 -8
- package/dist/components/Accordion/Accordion.module.scss.js +8 -8
- package/dist/components/Alert/Alert.module.scss.cjs +12 -12
- package/dist/components/Alert/Alert.module.scss.js +12 -12
- 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 +5 -3
- package/dist/components/AppShell/index.d.ts +4 -2
- package/dist/components/AppShell/index.d.ts.map +1 -1
- package/dist/components/AppShell/index.js +5 -3
- package/dist/components/Avatar/Avatar.module.scss.cjs +17 -14
- package/dist/components/Avatar/Avatar.module.scss.js +17 -14
- package/dist/components/Avatar/index.cjs +100 -118
- package/dist/components/Avatar/index.d.ts +7 -5
- package/dist/components/Avatar/index.d.ts.map +1 -1
- package/dist/components/Avatar/index.js +100 -118
- package/dist/components/Badge/Badge.module.scss.cjs +19 -19
- package/dist/components/Badge/Badge.module.scss.js +19 -19
- 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 +8 -8
- package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.js +8 -8
- package/dist/components/Button/Button.module.scss.cjs +14 -14
- package/dist/components/Button/Button.module.scss.js +14 -14
- 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 +18 -18
- package/dist/components/Card/Card.module.scss.js +18 -18
- package/dist/components/Chart/Chart.module.scss.cjs +15 -15
- package/dist/components/Chart/Chart.module.scss.js +15 -15
- package/dist/components/Chart/index.d.ts +7 -7
- package/dist/components/Chart/index.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.module.scss.cjs +9 -15
- package/dist/components/Checkbox/Checkbox.module.scss.js +9 -15
- package/dist/components/Checkbox/index.cjs +4 -6
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.js +4 -6
- package/dist/components/Chip/Chip.module.scss.cjs +15 -15
- package/dist/components/Chip/Chip.module.scss.js +15 -15
- package/dist/components/Chip/index.cjs +4 -5
- package/dist/components/Chip/index.d.ts +1 -1
- package/dist/components/Chip/index.d.ts.map +1 -1
- package/dist/components/Chip/index.js +2 -3
- package/dist/components/CodeBlock/CodeBlock.module.scss.cjs +22 -22
- package/dist/components/CodeBlock/CodeBlock.module.scss.js +22 -22
- package/dist/components/Collapsible/Collapsible.module.scss.cjs +9 -12
- package/dist/components/Collapsible/Collapsible.module.scss.js +9 -12
- package/dist/components/Collapsible/index.cjs +3 -2
- package/dist/components/Collapsible/index.d.ts +3 -3
- package/dist/components/Collapsible/index.d.ts.map +1 -1
- package/dist/components/Collapsible/index.js +3 -2
- package/dist/components/ColorPicker/ColorPicker.module.scss.cjs +16 -16
- package/dist/components/ColorPicker/ColorPicker.module.scss.js +16 -16
- package/dist/components/ColorPicker/index.d.ts.map +1 -1
- package/dist/components/Combobox/Combobox.module.scss.cjs +21 -27
- package/dist/components/Combobox/Combobox.module.scss.js +21 -27
- package/dist/components/Combobox/index.cjs +4 -4
- package/dist/components/Combobox/index.d.ts.map +1 -1
- package/dist/components/Combobox/index.js +4 -4
- package/dist/components/Command/Command.module.scss.cjs +11 -11
- package/dist/components/Command/Command.module.scss.js +11 -11
- package/dist/components/ConversationList/ConversationList.module.scss.cjs +11 -14
- package/dist/components/ConversationList/ConversationList.module.scss.js +11 -14
- package/dist/components/ConversationList/index.cjs +40 -44
- package/dist/components/ConversationList/index.d.ts +3 -3
- package/dist/components/ConversationList/index.d.ts.map +1 -1
- package/dist/components/ConversationList/index.js +40 -44
- package/dist/components/DataTable/DataTable.module.scss.cjs +32 -56
- package/dist/components/DataTable/DataTable.module.scss.js +32 -56
- package/dist/components/DataTable/index.d.ts +5 -4
- package/dist/components/DataTable/index.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.module.scss.cjs +33 -33
- package/dist/components/DatePicker/DatePicker.module.scss.js +33 -33
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.module.scss.cjs +14 -14
- package/dist/components/Dialog/Dialog.module.scss.js +14 -14
- package/dist/components/Drawer/Drawer.module.scss.cjs +31 -28
- package/dist/components/Drawer/Drawer.module.scss.js +31 -28
- package/dist/components/Drawer/index.cjs +1 -1
- package/dist/components/Drawer/index.js +1 -1
- package/dist/components/Editor/Editor.module.scss.cjs +23 -23
- package/dist/components/Editor/Editor.module.scss.js +23 -23
- package/dist/components/EmptyState/EmptyState.module.scss.cjs +12 -12
- package/dist/components/EmptyState/EmptyState.module.scss.js +12 -12
- package/dist/components/Field/Field.module.scss.cjs +8 -5
- package/dist/components/Field/Field.module.scss.js +8 -5
- package/dist/components/Field/index.cjs +10 -1
- package/dist/components/Field/index.d.ts +9 -2
- package/dist/components/Field/index.d.ts.map +1 -1
- package/dist/components/Field/index.js +10 -1
- package/dist/components/Fieldset/Fieldset.module.scss.cjs +3 -3
- package/dist/components/Fieldset/Fieldset.module.scss.js +3 -3
- package/dist/components/Form/Form.module.scss.cjs +5 -2
- package/dist/components/Form/Form.module.scss.js +5 -2
- package/dist/components/Form/index.cjs +6 -1
- package/dist/components/Form/index.d.ts +8 -3
- package/dist/components/Form/index.d.ts.map +1 -1
- package/dist/components/Form/index.js +6 -1
- package/dist/components/Grid/Grid.module.scss.cjs +54 -72
- package/dist/components/Grid/Grid.module.scss.js +54 -72
- package/dist/components/Grid/index.cjs +57 -77
- package/dist/components/Grid/index.d.ts +11 -11
- package/dist/components/Grid/index.d.ts.map +1 -1
- package/dist/components/Grid/index.js +57 -77
- package/dist/components/Header/Header.module.scss.cjs +33 -33
- package/dist/components/Header/Header.module.scss.js +33 -33
- package/dist/components/Header/index.cjs +2 -1
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +2 -1
- package/dist/components/Icon/Icon.module.scss.cjs +29 -8
- package/dist/components/Icon/Icon.module.scss.js +30 -9
- package/dist/components/Icon/index.cjs +30 -48
- package/dist/components/Icon/index.d.ts +6 -6
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/Icon/index.js +30 -48
- package/dist/components/IconButton/IconButton.module.scss.cjs +8 -8
- package/dist/components/IconButton/IconButton.module.scss.js +8 -8
- package/dist/components/Input/Input.module.scss.cjs +19 -25
- package/dist/components/Input/Input.module.scss.js +19 -25
- package/dist/components/Input/index.cjs +1 -2
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Input/index.js +1 -2
- package/dist/components/Link/Link.module.scss.cjs +10 -10
- package/dist/components/Link/Link.module.scss.js +10 -10
- package/dist/components/List/List.module.scss.cjs +19 -19
- package/dist/components/List/List.module.scss.js +19 -19
- package/dist/components/List/index.cjs +4 -7
- package/dist/components/List/index.d.ts.map +1 -1
- package/dist/components/List/index.js +4 -7
- package/dist/components/Listbox/Listbox.module.scss.cjs +9 -9
- package/dist/components/Listbox/Listbox.module.scss.js +9 -9
- 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 +39 -67
- package/dist/components/Loading/index.d.ts +6 -6
- package/dist/components/Loading/index.d.ts.map +1 -1
- package/dist/components/Loading/index.js +39 -67
- package/dist/components/Main/Main.module.scss.cjs +7 -7
- package/dist/components/Main/Main.module.scss.js +7 -7
- 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 +16 -16
- package/dist/components/Menu/Menu.module.scss.js +16 -16
- package/dist/components/Menu/index.cjs +19 -61
- package/dist/components/Menu/index.d.ts +10 -10
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Menu/index.js +19 -61
- package/dist/components/Message/Message.module.scss.cjs +18 -21
- package/dist/components/Message/Message.module.scss.js +18 -21
- package/dist/components/Message/index.cjs +15 -2
- package/dist/components/Message/index.d.ts.map +1 -1
- package/dist/components/Message/index.js +15 -2
- package/dist/components/NavigationMenu/NavigationMenu.module.scss.cjs +28 -28
- package/dist/components/NavigationMenu/NavigationMenu.module.scss.js +28 -28
- package/dist/components/Pagination/Pagination.module.scss.cjs +18 -9
- package/dist/components/Pagination/Pagination.module.scss.js +19 -10
- package/dist/components/Pagination/index.cjs +5 -2
- package/dist/components/Pagination/index.d.ts +3 -1
- package/dist/components/Pagination/index.d.ts.map +1 -1
- package/dist/components/Pagination/index.js +5 -2
- 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 +29 -32
- package/dist/components/Progress/Progress.module.scss.js +29 -32
- package/dist/components/Progress/geometry.cjs +30 -0
- package/dist/components/Progress/geometry.d.ts +8 -0
- package/dist/components/Progress/geometry.d.ts.map +1 -0
- package/dist/components/Progress/geometry.js +30 -0
- package/dist/components/Progress/index.cjs +40 -29
- package/dist/components/Progress/index.d.ts +4 -3
- package/dist/components/Progress/index.d.ts.map +1 -1
- package/dist/components/Progress/index.js +40 -29
- package/dist/components/Prompt/Prompt.module.scss.cjs +29 -29
- package/dist/components/Prompt/Prompt.module.scss.js +29 -29
- package/dist/components/Prompt/index.cjs +5 -4
- package/dist/components/Prompt/index.d.ts.map +1 -1
- package/dist/components/Prompt/index.js +5 -4
- package/dist/components/RadioGroup/RadioGroup.module.scss.cjs +15 -21
- package/dist/components/RadioGroup/RadioGroup.module.scss.js +15 -21
- package/dist/components/RadioGroup/index.cjs +7 -6
- package/dist/components/RadioGroup/index.d.ts.map +1 -1
- package/dist/components/RadioGroup/index.js +7 -6
- package/dist/components/ScrollArea/ScrollArea.module.scss.cjs +7 -22
- package/dist/components/ScrollArea/ScrollArea.module.scss.js +7 -22
- package/dist/components/ScrollArea/index.cjs +66 -42
- package/dist/components/ScrollArea/index.d.ts +3 -2
- package/dist/components/ScrollArea/index.d.ts.map +1 -1
- package/dist/components/ScrollArea/index.js +66 -42
- package/dist/components/ScrollArea/scroll-state.cjs +58 -0
- package/dist/components/ScrollArea/scroll-state.d.ts +16 -0
- package/dist/components/ScrollArea/scroll-state.d.ts.map +1 -0
- package/dist/components/ScrollArea/scroll-state.js +58 -0
- 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 +3 -2
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +3 -2
- package/dist/components/Separator/Separator.module.scss.cjs +13 -10
- package/dist/components/Separator/Separator.module.scss.js +13 -10
- package/dist/components/Separator/index.cjs +37 -38
- package/dist/components/Separator/index.d.ts +4 -4
- package/dist/components/Separator/index.d.ts.map +1 -1
- package/dist/components/Separator/index.js +37 -38
- 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 +5 -3
- package/dist/components/Sidebar/index.d.ts +6 -1
- package/dist/components/Sidebar/index.d.ts.map +1 -1
- package/dist/components/Sidebar/index.js +5 -3
- package/dist/components/Skeleton/Skeleton.module.scss.cjs +50 -38
- package/dist/components/Skeleton/Skeleton.module.scss.js +50 -38
- package/dist/components/Skeleton/index.cjs +41 -55
- package/dist/components/Skeleton/index.d.ts +7 -7
- package/dist/components/Skeleton/index.d.ts.map +1 -1
- package/dist/components/Skeleton/index.js +41 -55
- package/dist/components/Slider/Slider.module.scss.cjs +12 -12
- package/dist/components/Slider/Slider.module.scss.js +12 -12
- package/dist/components/Stack/Stack.module.scss.cjs +25 -45
- package/dist/components/Stack/Stack.module.scss.js +25 -45
- package/dist/components/Stack/index.cjs +106 -101
- package/dist/components/Stack/index.d.ts +7 -7
- package/dist/components/Stack/index.d.ts.map +1 -1
- package/dist/components/Stack/index.js +106 -101
- package/dist/components/Switch/Switch.module.scss.cjs +32 -0
- package/dist/components/Switch/Switch.module.scss.js +32 -0
- package/dist/components/{Toggle → Switch}/index.cjs +9 -14
- package/dist/components/Switch/index.d.ts +37 -1
- package/dist/components/Switch/index.d.ts.map +1 -1
- package/dist/components/{Toggle → Switch}/index.js +5 -10
- package/dist/components/Table/Table.module.scss.cjs +18 -27
- package/dist/components/Table/Table.module.scss.js +18 -27
- package/dist/components/Table/index.d.ts +6 -5
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/TableOfContents/TableOfContents.module.scss.cjs +15 -15
- package/dist/components/TableOfContents/TableOfContents.module.scss.js +15 -15
- package/dist/components/Tabs/Tabs.module.scss.cjs +12 -12
- package/dist/components/Tabs/Tabs.module.scss.js +12 -12
- package/dist/components/Tabs/index.cjs +2 -2
- package/dist/components/Tabs/index.js +2 -2
- package/dist/components/Text/Text.module.scss.cjs +93 -57
- package/dist/components/Text/Text.module.scss.js +93 -57
- package/dist/components/Text/index.cjs +14 -6
- package/dist/components/Text/index.d.ts +25 -15
- package/dist/components/Text/index.d.ts.map +1 -1
- package/dist/components/Text/index.js +14 -6
- package/dist/components/Textarea/Textarea.module.scss.cjs +26 -23
- package/dist/components/Textarea/Textarea.module.scss.js +26 -23
- package/dist/components/Textarea/index.cjs +5 -10
- package/dist/components/Textarea/index.d.ts.map +1 -1
- package/dist/components/Textarea/index.js +5 -10
- package/dist/components/Theme/context.cjs +39 -0
- package/dist/components/Theme/context.d.ts +21 -0
- package/dist/components/Theme/context.d.ts.map +1 -0
- package/dist/components/Theme/context.js +22 -0
- package/dist/components/Theme/index.cjs +14 -209
- package/dist/components/Theme/index.d.ts +4 -37
- package/dist/components/Theme/index.d.ts.map +1 -1
- package/dist/components/Theme/index.js +9 -204
- package/dist/components/{Theme → ThemeToggle}/ThemeToggle.module.scss.cjs +6 -6
- package/dist/components/ThemeToggle/ThemeToggle.module.scss.js +23 -0
- package/dist/components/ThemeToggle/index.cjs +115 -0
- package/dist/components/ThemeToggle/index.d.ts +21 -0
- package/dist/components/ThemeToggle/index.d.ts.map +1 -0
- package/dist/components/ThemeToggle/index.js +115 -0
- package/dist/components/ThinkingIndicator/ThinkingIndicator.module.scss.cjs +13 -13
- package/dist/components/ThinkingIndicator/ThinkingIndicator.module.scss.js +13 -13
- package/dist/components/ThinkingIndicator/index.cjs +34 -41
- package/dist/components/ThinkingIndicator/index.d.ts +4 -4
- package/dist/components/ThinkingIndicator/index.d.ts.map +1 -1
- package/dist/components/ThinkingIndicator/index.js +34 -41
- package/dist/components/Toast/Toast.module.scss.cjs +20 -20
- package/dist/components/Toast/Toast.module.scss.js +20 -20
- package/dist/components/Toggle/index.d.ts +2 -42
- package/dist/components/Toggle/index.d.ts.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.module.scss.cjs +20 -20
- package/dist/components/ToggleGroup/ToggleGroup.module.scss.js +20 -20
- package/dist/components/ToggleGroup/index.cjs +3 -2
- package/dist/components/ToggleGroup/index.d.ts +2 -1
- package/dist/components/ToggleGroup/index.d.ts.map +1 -1
- package/dist/components/ToggleGroup/index.js +3 -2
- 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.cjs +12 -9
- package/dist/data-table.js +12 -9
- package/dist/datepicker.cjs +2 -1
- package/dist/datepicker.js +2 -1
- package/dist/index.cjs +100 -98
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/markdown.cjs +1 -1
- package/dist/markdown.js +2 -2
- package/dist/measurements/generated.cjs +296 -0
- package/dist/measurements/generated.d.ts +261 -0
- package/dist/measurements/generated.d.ts.map +1 -0
- package/dist/measurements/generated.js +296 -0
- package/dist/measurements/index.d.ts +2 -0
- package/dist/measurements/index.d.ts.map +1 -0
- package/dist/measurements.cjs +6 -0
- package/dist/measurements.js +6 -0
- package/dist/recipes/popup.cjs +14 -0
- package/dist/recipes/popup.d.ts +4 -0
- package/dist/recipes/popup.d.ts.map +1 -0
- package/dist/recipes/popup.js +14 -0
- package/dist/recipes/table-chrome.cjs +18 -0
- package/dist/recipes/table-chrome.d.ts +10 -0
- package/dist/recipes/table-chrome.d.ts.map +1 -0
- package/dist/recipes/table-chrome.js +18 -0
- package/dist/table.cjs +5 -2
- package/dist/table.js +5 -2
- package/dist/utils/layout-spacing.cjs +27 -0
- package/dist/utils/layout-spacing.d.ts +5 -0
- package/dist/utils/layout-spacing.d.ts.map +1 -0
- package/dist/utils/layout-spacing.js +27 -0
- package/dist/utils/seed-derivation.cjs +4 -42
- package/dist/utils/seed-derivation.d.ts +4 -3
- package/dist/utils/seed-derivation.d.ts.map +1 -1
- package/dist/utils/seed-derivation.js +4 -42
- package/dist/utils/theme-presets.cjs +1 -0
- package/dist/utils/theme-presets.d.ts +3 -2
- package/dist/utils/theme-presets.d.ts.map +1 -1
- package/dist/utils/theme-presets.js +1 -0
- package/fragments.json +1 -1
- package/package.json +23 -4
- package/src/components/Accordion/Accordion.module.scss +31 -52
- package/src/components/Alert/Alert.module.scss +28 -44
- package/src/components/AppShell/AppShell.module.scss +6 -3
- package/src/components/AppShell/index.tsx +8 -4
- package/src/components/Avatar/Avatar.module.scss +22 -60
- package/src/components/Avatar/index.tsx +152 -146
- package/src/components/Badge/Badge.module.scss +51 -46
- package/src/components/BentoGrid/BentoGrid.module.scss +11 -32
- package/src/components/Box/Box.module.scss +253 -81
- package/src/components/Breadcrumbs/Breadcrumbs.module.scss +10 -11
- package/src/components/Button/Button.module.scss +52 -57
- package/src/components/ButtonGroup/ButtonGroup.module.scss +5 -5
- package/src/components/Card/Card.consumer-fixture.module.scss +8 -0
- package/src/components/Card/Card.module.scss +211 -175
- package/src/components/Chart/Chart.module.scss +28 -29
- package/src/components/Chart/index.tsx +40 -53
- package/src/components/Checkbox/Checkbox.module.scss +43 -64
- package/src/components/Checkbox/index.tsx +4 -9
- package/src/components/Chip/Chip.contract.json +4 -3
- package/src/components/Chip/Chip.module.scss +23 -34
- package/src/components/Chip/index.tsx +3 -4
- package/src/components/CodeBlock/CodeBlock.module.scss +102 -215
- package/src/components/Collapsible/Collapsible.module.scss +29 -63
- package/src/components/Collapsible/index.tsx +22 -26
- package/src/components/ColorPicker/ColorPicker.module.scss +42 -24
- package/src/components/ColorPicker/index.tsx +2 -1
- package/src/components/Combobox/Combobox.module.scss +60 -73
- package/src/components/Combobox/index.tsx +7 -5
- package/src/components/Command/Command.module.scss +47 -77
- package/src/components/ConversationList/ConversationList.module.scss +20 -78
- package/src/components/ConversationList/index.tsx +55 -59
- package/src/components/DataTable/DataTable.module.scss +76 -216
- package/src/components/DataTable/index.tsx +20 -25
- package/src/components/DatePicker/DatePicker.module.scss +54 -33
- package/src/components/DatePicker/index.tsx +2 -1
- package/src/components/Dialog/Dialog.module.scss +42 -66
- package/src/components/Drawer/Drawer.module.scss +93 -99
- package/src/components/Drawer/index.tsx +1 -1
- package/src/components/Editor/Editor.module.scss +115 -220
- package/src/components/EmptyState/EmptyState.module.scss +38 -85
- package/src/components/Field/Field.contract.json +2 -1
- package/src/components/Field/Field.module.scss +9 -11
- package/src/components/Field/index.tsx +27 -1
- package/src/components/Fieldset/Fieldset.module.scss +14 -6
- package/src/components/Form/Form.contract.json +10 -23
- package/src/components/Form/Form.module.scss +9 -4
- package/src/components/Form/index.tsx +22 -7
- package/src/components/Grid/Grid.module.scss +159 -63
- package/src/components/Grid/index.tsx +107 -126
- package/src/components/Header/Header.module.scss +25 -32
- package/src/components/Header/index.tsx +2 -1
- package/src/components/Icon/Icon.module.scss +16 -0
- package/src/components/Icon/index.tsx +74 -86
- package/src/components/IconButton/IconButton.module.scss +11 -21
- package/src/components/Input/Input.module.scss +67 -55
- package/src/components/Input/index.tsx +1 -2
- package/src/components/Link/Link.module.scss +8 -9
- package/src/components/List/List.module.scss +16 -21
- package/src/components/List/index.tsx +4 -10
- package/src/components/Listbox/Listbox.module.scss +26 -54
- package/src/components/Loading/Loading.module.scss +23 -33
- package/src/components/Loading/index.tsx +68 -97
- package/src/components/Main/Main.module.scss +3 -5
- package/src/components/Markdown/Markdown.module.scss +36 -184
- package/src/components/Markdown/index.tsx +2 -2
- package/src/components/Menu/Menu.module.scss +48 -133
- package/src/components/Menu/index.tsx +57 -89
- package/src/components/Message/Message.module.scss +52 -142
- package/src/components/Message/index.tsx +16 -6
- package/src/components/NavigationMenu/NavigationMenu.module.scss +59 -52
- package/src/components/Pagination/Pagination.module.scss +32 -25
- package/src/components/Pagination/index.tsx +7 -2
- package/src/components/Popover/Popover.module.scss +37 -73
- package/src/components/Progress/Progress.module.scss +61 -41
- package/src/components/Progress/geometry.ts +41 -0
- package/src/components/Progress/index.tsx +44 -30
- package/src/components/Prompt/Prompt.module.scss +45 -82
- package/src/components/Prompt/index.tsx +6 -5
- package/src/components/RadioGroup/RadioGroup.module.scss +50 -69
- package/src/components/RadioGroup/index.tsx +7 -9
- package/src/components/ScrollArea/ScrollArea.contract.json +8 -24
- package/src/components/ScrollArea/ScrollArea.module.scss +122 -96
- package/src/components/ScrollArea/index.tsx +78 -60
- package/src/components/ScrollArea/scroll-state.ts +87 -0
- package/src/components/Select/Select.module.scss +53 -41
- package/src/components/Select/index.tsx +6 -2
- package/src/components/Separator/Separator.module.scss +29 -19
- package/src/components/Separator/index.tsx +55 -51
- package/src/components/Sidebar/Sidebar.contract.json +12 -0
- package/src/components/Sidebar/Sidebar.module.scss +101 -99
- package/src/components/Sidebar/index.tsx +10 -3
- package/src/components/Skeleton/Skeleton.module.scss +26 -26
- package/src/components/Skeleton/index.tsx +65 -72
- package/src/components/Slider/Slider.module.scss +31 -25
- package/src/components/Stack/Stack.module.scss +101 -30
- package/src/components/Stack/index.tsx +157 -127
- package/src/components/{Toggle/Toggle.contract.json → Switch/Switch.contract.json} +1 -1
- package/src/components/{Toggle/Toggle.module.scss → Switch/Switch.module.scss} +55 -82
- package/src/components/{Toggle → Switch}/index.tsx +5 -21
- package/src/components/Table/Table.module.scss +38 -129
- package/src/components/Table/index.tsx +13 -6
- package/src/components/TableOfContents/TableOfContents.module.scss +20 -177
- package/src/components/Tabs/Tabs.module.scss +27 -22
- package/src/components/Tabs/index.tsx +2 -2
- package/src/components/Text/Text.module.scss +22 -3
- package/src/components/Text/index.tsx +56 -21
- package/src/components/Textarea/Textarea.module.scss +59 -39
- package/src/components/Textarea/index.tsx +5 -12
- package/src/components/Theme/context.ts +42 -0
- package/src/components/Theme/index.tsx +14 -309
- package/src/components/ThemeToggle/ThemeToggle.module.scss +73 -0
- package/src/components/ThemeToggle/index.tsx +144 -0
- package/src/components/ThinkingIndicator/ThinkingIndicator.module.scss +24 -19
- package/src/components/ThinkingIndicator/index.tsx +44 -54
- package/src/components/Toast/Toast.contract.json +5 -21
- package/src/components/Toast/Toast.module.scss +61 -138
- package/src/components/Toggle/index.ts +7 -0
- package/src/components/ToggleGroup/ToggleGroup.contract.json +12 -39
- package/src/components/ToggleGroup/ToggleGroup.module.scss +132 -88
- package/src/components/ToggleGroup/index.tsx +5 -3
- package/src/components/Tooltip/Tooltip.module.scss +23 -39
- package/src/components/VisuallyHidden/VisuallyHidden.module.scss +3 -0
- package/src/index.ts +2 -1
- package/src/measurements/MeasurementTargets.module.scss +229 -0
- package/src/measurements/generated.ts +317 -0
- package/src/measurements/index.ts +8 -0
- package/src/measurements/measurements.json +361 -0
- package/src/recipes/_action.scss +138 -0
- package/src/recipes/_boolean-range.scss +124 -0
- package/src/recipes/_feedback.scss +171 -0
- package/src/recipes/_field.scss +98 -0
- package/src/recipes/_layout.scss +67 -0
- package/src/recipes/_navigation.scss +110 -0
- package/src/recipes/_overlay.scss +191 -0
- package/src/recipes/_popup.scss +92 -0
- package/src/recipes/_prose.scss +174 -0
- package/src/recipes/_representation.scss +193 -0
- package/src/recipes/_segmented.scss +26 -0
- package/src/recipes/_surface.scss +13 -0
- package/src/recipes/_table-chrome.scss +105 -0
- package/src/recipes/_target.scss +31 -0
- package/src/recipes/_typography.scss +38 -0
- package/src/recipes/popup.ts +12 -0
- package/src/recipes/table-chrome.ts +30 -0
- package/src/styles/globals.scss +2 -2
- package/src/tokens/_component-properties.scss +2 -2
- package/src/tokens/_computed.scss +9 -9
- package/src/tokens/_density.scss +41 -132
- package/src/tokens/_measurements.catalog.generated.css +91 -0
- package/src/tokens/_measurements.generated.scss +604 -0
- package/src/tokens/_mixins.scss +0 -276
- package/src/tokens/_property-registrations.scss +96 -92
- package/src/tokens/_radius.scss +16 -70
- package/src/tokens/_seeds.scss +8 -7
- package/src/tokens/_variables.scss +163 -148
- package/src/utils/layout-spacing.ts +31 -0
- package/src/utils/seed-derivation.ts +134 -172
- package/src/utils/theme-presets.ts +58 -30
- package/dist/components/Theme/ThemeToggle.module.scss.js +0 -23
- package/dist/components/Toggle/Toggle.module.scss.cjs +0 -44
- package/dist/components/Toggle/Toggle.module.scss.js +0 -44
- package/src/components/Switch/index.ts +0 -3
- package/src/components/Theme/ThemeToggle.module.scss +0 -91
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
@use
|
|
2
|
-
@use
|
|
1
|
+
@use "../../tokens/variables" as *;
|
|
2
|
+
@use "../../tokens/mixins" as *;
|
|
3
|
+
@use "../../recipes/action" as action;
|
|
4
|
+
@use "../../recipes/navigation" as navigation;
|
|
5
|
+
@use "../../recipes/popup" as popup;
|
|
6
|
+
@use "../../recipes/typography" as typography;
|
|
3
7
|
|
|
4
8
|
// ============================================
|
|
5
9
|
// Root
|
|
6
10
|
// ============================================
|
|
7
11
|
|
|
8
12
|
.root {
|
|
13
|
+
@include navigation.properties;
|
|
9
14
|
// Container query context: children respond to nav menu width, not viewport
|
|
10
15
|
@include container(fui-navmenu);
|
|
11
16
|
|
|
@@ -51,16 +56,14 @@
|
|
|
51
56
|
.trigger {
|
|
52
57
|
@include button-reset;
|
|
53
58
|
@include interactive-base;
|
|
54
|
-
@include
|
|
59
|
+
@include action.base;
|
|
60
|
+
@include action.size("md");
|
|
55
61
|
|
|
56
62
|
display: flex;
|
|
57
63
|
align-items: center;
|
|
58
|
-
gap: var(--fui-space-1, $fui-space-1);
|
|
59
|
-
padding: var(--fui-space-1, $fui-space-1) var(--fui-space-2, $fui-space-2);
|
|
60
64
|
border-radius: var(--fui-radius-md, $fui-radius-md);
|
|
61
65
|
color: var(--fui-text-secondary, $fui-text-secondary);
|
|
62
66
|
white-space: nowrap;
|
|
63
|
-
min-height: var(--fui-button-height-md, $fui-button-height-md);
|
|
64
67
|
cursor: pointer;
|
|
65
68
|
|
|
66
69
|
&:hover {
|
|
@@ -72,7 +75,7 @@
|
|
|
72
75
|
background-color: var(--fui-bg-active, $fui-bg-active);
|
|
73
76
|
}
|
|
74
77
|
|
|
75
|
-
&[data-state=
|
|
78
|
+
&[data-state="open"] {
|
|
76
79
|
color: var(--fui-text-primary, $fui-text-primary);
|
|
77
80
|
}
|
|
78
81
|
}
|
|
@@ -81,7 +84,7 @@
|
|
|
81
84
|
transition: transform var(--fui-transition-fast, $fui-transition-fast);
|
|
82
85
|
flex-shrink: 0;
|
|
83
86
|
|
|
84
|
-
[data-state=
|
|
87
|
+
[data-state="open"] > & {
|
|
85
88
|
transform: rotate(180deg);
|
|
86
89
|
}
|
|
87
90
|
}
|
|
@@ -93,7 +96,7 @@
|
|
|
93
96
|
.content {
|
|
94
97
|
display: flex;
|
|
95
98
|
flex-direction: column;
|
|
96
|
-
gap: 1px;
|
|
99
|
+
gap: var(--fui-stroke-hairline, 1px);
|
|
97
100
|
position: absolute;
|
|
98
101
|
left: 0;
|
|
99
102
|
top: 0;
|
|
@@ -101,16 +104,16 @@
|
|
|
101
104
|
min-width: 180px;
|
|
102
105
|
|
|
103
106
|
// Motion direction for directional slide
|
|
104
|
-
&[data-motion=
|
|
107
|
+
&[data-motion="from-start"] {
|
|
105
108
|
animation: slideFromStart var(--fui-transition-normal, $fui-transition-normal) ease forwards;
|
|
106
109
|
}
|
|
107
|
-
&[data-motion=
|
|
110
|
+
&[data-motion="from-end"] {
|
|
108
111
|
animation: slideFromEnd var(--fui-transition-normal, $fui-transition-normal) ease forwards;
|
|
109
112
|
}
|
|
110
|
-
&[data-motion=
|
|
113
|
+
&[data-motion="to-start"] {
|
|
111
114
|
animation: slideToStart var(--fui-transition-normal, $fui-transition-normal) ease forwards;
|
|
112
115
|
}
|
|
113
|
-
&[data-motion=
|
|
116
|
+
&[data-motion="to-end"] {
|
|
114
117
|
animation: slideToEnd var(--fui-transition-normal, $fui-transition-normal) ease forwards;
|
|
115
118
|
}
|
|
116
119
|
}
|
|
@@ -164,13 +167,13 @@
|
|
|
164
167
|
// ============================================
|
|
165
168
|
|
|
166
169
|
.link {
|
|
167
|
-
@include popup
|
|
170
|
+
@include popup.row;
|
|
168
171
|
|
|
169
172
|
text-decoration: none;
|
|
170
173
|
white-space: nowrap;
|
|
171
174
|
|
|
172
175
|
&:hover {
|
|
173
|
-
@include popup-
|
|
176
|
+
@include popup.highlight-state;
|
|
174
177
|
}
|
|
175
178
|
|
|
176
179
|
// Links are real tab stops, so keep the focus ring on top of the highlight.
|
|
@@ -197,7 +200,7 @@
|
|
|
197
200
|
min-height: auto;
|
|
198
201
|
|
|
199
202
|
&:hover {
|
|
200
|
-
@include popup-
|
|
203
|
+
@include popup.highlight-state;
|
|
201
204
|
}
|
|
202
205
|
}
|
|
203
206
|
|
|
@@ -220,24 +223,23 @@
|
|
|
220
223
|
}
|
|
221
224
|
|
|
222
225
|
.linkTitle {
|
|
223
|
-
|
|
226
|
+
@include typography.role("ui-standard");
|
|
227
|
+
|
|
224
228
|
color: var(--fui-text-primary, $fui-text-primary);
|
|
225
|
-
font-size: var(--fui-font-size-sm, $fui-font-size-sm);
|
|
226
|
-
line-height: var(--fui-line-height-tight, $fui-line-height-tight);
|
|
227
229
|
}
|
|
228
230
|
|
|
229
231
|
.linkDescription {
|
|
230
|
-
|
|
232
|
+
@include typography.role("caption");
|
|
233
|
+
|
|
231
234
|
color: var(--fui-text-secondary, $fui-text-secondary);
|
|
232
|
-
line-height: var(--fui-line-height-normal, $fui-line-height-normal);
|
|
233
235
|
}
|
|
234
236
|
|
|
235
237
|
.linkFeatured {
|
|
236
238
|
background-color: var(--fui-bg-secondary, $fui-bg-secondary);
|
|
237
|
-
border: 1px solid var(--fui-border, $fui-border);
|
|
239
|
+
border: var(--fui-stroke-hairline, 1px) solid var(--fui-border, $fui-border);
|
|
238
240
|
|
|
239
241
|
&:hover {
|
|
240
|
-
@include popup-
|
|
242
|
+
@include popup.highlight-state;
|
|
241
243
|
border-color: var(--fui-border-strong, $fui-border-strong);
|
|
242
244
|
}
|
|
243
245
|
}
|
|
@@ -249,7 +251,7 @@
|
|
|
249
251
|
.indicator {
|
|
250
252
|
position: absolute;
|
|
251
253
|
bottom: 0;
|
|
252
|
-
height: 2px;
|
|
254
|
+
height: var(--fui-stroke-default, 2px);
|
|
253
255
|
background-color: var(--fui-color-accent, $fui-color-accent);
|
|
254
256
|
border-radius: var(--fui-radius-full, $fui-radius-full);
|
|
255
257
|
transition:
|
|
@@ -263,24 +265,22 @@
|
|
|
263
265
|
// ============================================
|
|
264
266
|
|
|
265
267
|
.viewport {
|
|
266
|
-
@include
|
|
268
|
+
@include popup.container;
|
|
267
269
|
|
|
268
270
|
position: absolute;
|
|
269
271
|
top: calc(100% + var(--fui-space-1, #{$fui-space-1}));
|
|
270
272
|
left: var(--fui-navmenu-viewport-left, 0);
|
|
271
273
|
overflow: hidden;
|
|
272
|
-
padding: var(--fui-space-1, $fui-space-1);
|
|
273
274
|
border-color: var(--fui-border-strong, $fui-border-strong);
|
|
274
275
|
box-shadow: var(--fui-shadow-md, $fui-shadow-md);
|
|
275
276
|
z-index: calc(var(--fui-header-z-index, $fui-header-z-index) + 1);
|
|
276
277
|
|
|
277
278
|
width: var(--fui-navmenu-viewport-width);
|
|
278
279
|
height: var(--fui-navmenu-viewport-height);
|
|
279
|
-
transition:
|
|
280
|
-
opacity var(--fui-transition-fast, $fui-transition-fast);
|
|
280
|
+
transition: opacity var(--fui-transition-fast, $fui-transition-fast);
|
|
281
281
|
|
|
282
282
|
// Hidden when no item is open
|
|
283
|
-
&[data-state=
|
|
283
|
+
&[data-state="closed"] {
|
|
284
284
|
opacity: 0;
|
|
285
285
|
pointer-events: none;
|
|
286
286
|
// Collapse to avoid layout space
|
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
overflow: hidden;
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
&[data-state=
|
|
292
|
+
&[data-state="open"] {
|
|
293
293
|
opacity: 1;
|
|
294
294
|
}
|
|
295
295
|
|
|
@@ -306,12 +306,12 @@
|
|
|
306
306
|
.hamburger {
|
|
307
307
|
@include button-reset;
|
|
308
308
|
@include interactive-base;
|
|
309
|
+
@include action.base;
|
|
310
|
+
@include action.icon-only("lg");
|
|
309
311
|
|
|
310
312
|
display: none;
|
|
311
313
|
align-items: center;
|
|
312
314
|
justify-content: center;
|
|
313
|
-
width: var(--fui-touch-lg, $fui-touch-lg);
|
|
314
|
-
height: var(--fui-touch-lg, $fui-touch-lg);
|
|
315
315
|
border-radius: var(--fui-radius-md, $fui-radius-md);
|
|
316
316
|
color: var(--fui-text-primary, $fui-text-primary);
|
|
317
317
|
flex-shrink: 0;
|
|
@@ -321,8 +321,7 @@
|
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
svg {
|
|
324
|
-
|
|
325
|
-
height: var(--fui-icon-xl, $fui-icon-xl);
|
|
324
|
+
@include action.glyph("lg");
|
|
326
325
|
}
|
|
327
326
|
|
|
328
327
|
// Keep viewport visibility in sync with JS mobile mode.
|
|
@@ -373,19 +372,19 @@
|
|
|
373
372
|
align-items: center;
|
|
374
373
|
justify-content: space-between;
|
|
375
374
|
padding: 0 var(--fui-space-4, $fui-space-4);
|
|
376
|
-
border-bottom: 1px solid var(--fui-border, $fui-border);
|
|
375
|
+
border-bottom: var(--fui-stroke-hairline, 1px) solid var(--fui-border, $fui-border);
|
|
377
376
|
min-height: var(--fui-appshell-header-height, $fui-appshell-header-height);
|
|
378
377
|
}
|
|
379
378
|
|
|
380
379
|
.drawerClose {
|
|
381
380
|
@include button-reset;
|
|
382
381
|
@include interactive-base;
|
|
382
|
+
@include action.base;
|
|
383
|
+
@include action.icon-only("md");
|
|
383
384
|
|
|
384
385
|
display: flex;
|
|
385
386
|
align-items: center;
|
|
386
387
|
justify-content: center;
|
|
387
|
-
width: var(--fui-touch-md, $fui-touch-md);
|
|
388
|
-
height: var(--fui-touch-md, $fui-touch-md);
|
|
389
388
|
border-radius: var(--fui-radius-md, $fui-radius-md);
|
|
390
389
|
color: var(--fui-text-secondary, $fui-text-secondary);
|
|
391
390
|
|
|
@@ -408,24 +407,22 @@
|
|
|
408
407
|
|
|
409
408
|
.drawerLink {
|
|
410
409
|
@include button-reset;
|
|
411
|
-
@include
|
|
410
|
+
@include navigation.row;
|
|
412
411
|
|
|
413
412
|
display: flex;
|
|
414
413
|
align-items: center;
|
|
415
414
|
width: 100%;
|
|
416
|
-
padding: var(--fui-space-2, $fui-space-2) var(--fui-space-4, $fui-space-4);
|
|
417
415
|
color: var(--fui-text-secondary, $fui-text-secondary);
|
|
418
416
|
text-decoration: none;
|
|
419
|
-
min-height: var(--fui-sidebar-item-height, $fui-sidebar-item-height);
|
|
420
417
|
transition: background-color var(--fui-transition-fast, $fui-transition-fast);
|
|
421
418
|
|
|
422
419
|
&:hover {
|
|
423
|
-
@include popup-
|
|
420
|
+
@include popup.highlight-state;
|
|
424
421
|
}
|
|
425
422
|
}
|
|
426
423
|
|
|
427
424
|
.drawerSectionLabel {
|
|
428
|
-
@include section-
|
|
425
|
+
@include navigation.section-row;
|
|
429
426
|
|
|
430
427
|
padding: var(--fui-space-2, $fui-space-2) var(--fui-space-4, $fui-space-4)
|
|
431
428
|
var(--fui-space-1, $fui-space-1);
|
|
@@ -433,16 +430,14 @@
|
|
|
433
430
|
|
|
434
431
|
.drawerCollapsibleTrigger {
|
|
435
432
|
@include button-reset;
|
|
436
|
-
@include
|
|
433
|
+
@include navigation.row;
|
|
437
434
|
|
|
438
435
|
display: flex;
|
|
439
436
|
align-items: center;
|
|
440
437
|
justify-content: space-between;
|
|
441
438
|
width: 100%;
|
|
442
|
-
padding: var(--fui-space-2, $fui-space-2) var(--fui-space-4, $fui-space-4);
|
|
443
439
|
color: var(--fui-text-primary, $fui-text-primary);
|
|
444
440
|
font-weight: var(--fui-font-weight-medium, $fui-font-weight-medium);
|
|
445
|
-
min-height: var(--fui-sidebar-item-height, $fui-sidebar-item-height);
|
|
446
441
|
transition: background-color var(--fui-transition-fast, $fui-transition-fast);
|
|
447
442
|
|
|
448
443
|
&:hover {
|
|
@@ -455,7 +450,7 @@
|
|
|
455
450
|
color: var(--fui-text-secondary, $fui-text-secondary);
|
|
456
451
|
flex-shrink: 0;
|
|
457
452
|
|
|
458
|
-
&[data-open=
|
|
453
|
+
&[data-open="true"] {
|
|
459
454
|
transform: rotate(90deg);
|
|
460
455
|
}
|
|
461
456
|
}
|
|
@@ -469,18 +464,30 @@
|
|
|
469
464
|
// ============================================
|
|
470
465
|
|
|
471
466
|
@keyframes fadeIn {
|
|
472
|
-
from {
|
|
473
|
-
|
|
467
|
+
from {
|
|
468
|
+
opacity: 0;
|
|
469
|
+
}
|
|
470
|
+
to {
|
|
471
|
+
opacity: 1;
|
|
472
|
+
}
|
|
474
473
|
}
|
|
475
474
|
|
|
476
475
|
@keyframes slideInLeft {
|
|
477
|
-
from {
|
|
478
|
-
|
|
476
|
+
from {
|
|
477
|
+
transform: translateX(-100%);
|
|
478
|
+
}
|
|
479
|
+
to {
|
|
480
|
+
transform: translateX(0);
|
|
481
|
+
}
|
|
479
482
|
}
|
|
480
483
|
|
|
481
484
|
@keyframes slideInRight {
|
|
482
|
-
from {
|
|
483
|
-
|
|
485
|
+
from {
|
|
486
|
+
transform: translateX(100%);
|
|
487
|
+
}
|
|
488
|
+
to {
|
|
489
|
+
transform: translateX(0);
|
|
490
|
+
}
|
|
484
491
|
}
|
|
485
492
|
|
|
486
493
|
// ============================================
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
@use '../../tokens/variables' as *;
|
|
2
2
|
@use '../../tokens/mixins' as *;
|
|
3
|
+
@use '../../recipes/action';
|
|
4
|
+
@use '../../recipes/layout';
|
|
3
5
|
|
|
4
6
|
// ============================================
|
|
5
7
|
// Navigation wrapper
|
|
@@ -18,7 +20,7 @@
|
|
|
18
20
|
.list {
|
|
19
21
|
display: flex;
|
|
20
22
|
align-items: center;
|
|
21
|
-
gap:
|
|
23
|
+
gap: layout.gap("xs");
|
|
22
24
|
list-style: none;
|
|
23
25
|
margin: 0;
|
|
24
26
|
padding: 0;
|
|
@@ -30,17 +32,9 @@
|
|
|
30
32
|
|
|
31
33
|
.item {
|
|
32
34
|
@include button-reset;
|
|
33
|
-
@include
|
|
35
|
+
@include action.base;
|
|
34
36
|
|
|
35
|
-
display: inline-flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
justify-content: center;
|
|
38
|
-
min-width: var(--fui-touch-md, $fui-touch-md);
|
|
39
|
-
height: var(--fui-touch-md, $fui-touch-md);
|
|
40
|
-
padding: 0 var(--fui-space-2, $fui-space-2);
|
|
41
37
|
border-radius: var(--fui-radius-md, $fui-radius-md);
|
|
42
|
-
font-size: var(--fui-font-size-sm, $fui-font-size-sm);
|
|
43
|
-
font-weight: var(--fui-font-weight-medium, $fui-font-weight-medium);
|
|
44
38
|
color: var(--fui-text-primary, $fui-text-primary);
|
|
45
39
|
cursor: pointer;
|
|
46
40
|
transition:
|
|
@@ -78,35 +72,48 @@
|
|
|
78
72
|
// Nav buttons (Previous/Next)
|
|
79
73
|
// ============================================
|
|
80
74
|
|
|
81
|
-
.navButton {
|
|
82
|
-
svg {
|
|
83
|
-
width: var(--fui-icon-sm, $fui-icon-sm);
|
|
84
|
-
height: var(--fui-icon-sm, $fui-icon-sm);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
75
|
// ============================================
|
|
89
76
|
// Ellipsis
|
|
90
77
|
// ============================================
|
|
91
78
|
|
|
92
79
|
.ellipsis {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
justify-content: center;
|
|
96
|
-
min-width: var(--fui-touch-md, $fui-touch-md);
|
|
97
|
-
height: var(--fui-touch-md, $fui-touch-md);
|
|
98
|
-
font-size: var(--fui-font-size-sm, $fui-font-size-sm);
|
|
80
|
+
@include action.base;
|
|
81
|
+
|
|
99
82
|
color: var(--fui-text-secondary, $fui-text-secondary);
|
|
100
83
|
user-select: none;
|
|
101
84
|
}
|
|
102
85
|
|
|
86
|
+
.sm :is(.item, .ellipsis) {
|
|
87
|
+
@include action.icon-only("sm");
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.md :is(.item, .ellipsis) {
|
|
91
|
+
@include action.icon-only("md");
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.lg :is(.item, .ellipsis) {
|
|
95
|
+
@include action.icon-only("lg");
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.sm .navButton svg {
|
|
99
|
+
@include action.glyph("sm");
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.md .navButton svg {
|
|
103
|
+
@include action.glyph("md");
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.lg .navButton svg {
|
|
107
|
+
@include action.glyph("lg");
|
|
108
|
+
}
|
|
109
|
+
|
|
103
110
|
// ============================================
|
|
104
111
|
// Accessibility: High Contrast Mode
|
|
105
112
|
// ============================================
|
|
106
113
|
|
|
107
114
|
@media (prefers-contrast: more) {
|
|
108
115
|
.itemActive {
|
|
109
|
-
outline: 2px solid var(--fui-text-primary, $fui-text-primary);
|
|
110
|
-
outline-offset: -2px;
|
|
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));
|
|
111
118
|
}
|
|
112
119
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
+
import { useResolvedControlSize } from '../ComponentDefaults';
|
|
4
5
|
import styles from './Pagination.module.scss';
|
|
5
6
|
|
|
6
7
|
// ============================================
|
|
@@ -21,6 +22,8 @@ export interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>,
|
|
|
21
22
|
edgeCount?: number;
|
|
22
23
|
/** Number of pages shown around current: default 1 */
|
|
23
24
|
siblingCount?: number;
|
|
25
|
+
/** Visible action size. Resolves through ComponentDefaults when omitted. */
|
|
26
|
+
size?: 'sm' | 'md' | 'lg';
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
export interface PaginationItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
@@ -191,10 +194,12 @@ function PaginationRoot({
|
|
|
191
194
|
onPageChange,
|
|
192
195
|
edgeCount = 1,
|
|
193
196
|
siblingCount = 1,
|
|
197
|
+
size: sizeProp,
|
|
194
198
|
className,
|
|
195
199
|
'aria-label': ariaLabel,
|
|
196
200
|
...htmlProps
|
|
197
201
|
}: PaginationProps) {
|
|
202
|
+
const size = useResolvedControlSize(sizeProp);
|
|
198
203
|
const totalPages = Math.max(0, Math.floor(rawTotalPages));
|
|
199
204
|
const [uncontrolledPage, setUncontrolledPage] = React.useState(() =>
|
|
200
205
|
totalPages > 0 ? clamp(defaultPage, 1, totalPages) : 1
|
|
@@ -228,7 +233,7 @@ function PaginationRoot({
|
|
|
228
233
|
<nav
|
|
229
234
|
{...htmlProps}
|
|
230
235
|
aria-label={ariaLabel ?? 'Pagination'}
|
|
231
|
-
className={[styles.pagination, className].filter(Boolean).join(' ')}
|
|
236
|
+
className={[styles.pagination, styles[size], className].filter(Boolean).join(' ')}
|
|
232
237
|
/>
|
|
233
238
|
);
|
|
234
239
|
}
|
|
@@ -238,7 +243,7 @@ function PaginationRoot({
|
|
|
238
243
|
<nav
|
|
239
244
|
{...htmlProps}
|
|
240
245
|
aria-label={ariaLabel ?? 'Pagination'}
|
|
241
|
-
className={[styles.pagination, className].filter(Boolean).join(' ')}
|
|
246
|
+
className={[styles.pagination, styles[size], className].filter(Boolean).join(' ')}
|
|
242
247
|
>
|
|
243
248
|
<ul className={styles.list}>
|
|
244
249
|
{children}
|
|
@@ -1,26 +1,17 @@
|
|
|
1
1
|
@use "../../tokens/variables" as *;
|
|
2
2
|
@use "../../tokens/mixins" as *;
|
|
3
|
+
@use "../../recipes/action" as action;
|
|
4
|
+
@use "../../recipes/overlay" as overlay;
|
|
3
5
|
|
|
4
|
-
// Local component tokens
|
|
5
|
-
$fui-arrow-size: 10px !default;
|
|
6
|
-
|
|
7
|
-
// Positioner — z-index must exceed Dialog positioner (51)
|
|
8
6
|
.positioner {
|
|
9
|
-
z-index: 52;
|
|
7
|
+
z-index: var(--fui-overlay-layer-anchored, 52);
|
|
10
8
|
outline: none;
|
|
11
9
|
}
|
|
12
10
|
|
|
13
|
-
// Popup container
|
|
14
11
|
.popup {
|
|
15
|
-
@include surface
|
|
16
|
-
@include text-base;
|
|
17
|
-
|
|
18
|
-
min-width: 12rem;
|
|
19
|
-
max-width: 24rem;
|
|
20
|
-
padding: var(--fui-space-2, $fui-space-2);
|
|
21
|
-
box-shadow: var(--fui-shadow-md, $fui-shadow-md);
|
|
12
|
+
@include overlay.anchored-surface("md");
|
|
22
13
|
|
|
23
|
-
|
|
14
|
+
position: relative;
|
|
24
15
|
opacity: 0;
|
|
25
16
|
transform: scale(0.95) translateY(-$fui-anim-offset-sm);
|
|
26
17
|
transform-origin: var(--transform-origin);
|
|
@@ -43,7 +34,6 @@ $fui-arrow-size: 10px !default;
|
|
|
43
34
|
transform: scale(0.95) translateY($fui-anim-offset-sm);
|
|
44
35
|
}
|
|
45
36
|
|
|
46
|
-
// Adjust animation direction based on side
|
|
47
37
|
&[data-side="top"] {
|
|
48
38
|
&[data-starting-style] {
|
|
49
39
|
transform: scale(0.95) translateY($fui-anim-offset-sm);
|
|
@@ -63,49 +53,33 @@ $fui-arrow-size: 10px !default;
|
|
|
63
53
|
}
|
|
64
54
|
}
|
|
65
55
|
|
|
66
|
-
// Size variants
|
|
67
56
|
.sm {
|
|
68
|
-
|
|
69
|
-
max-width: 16rem;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.md {
|
|
73
|
-
// Default styles
|
|
57
|
+
@include overlay.anchored-size("sm");
|
|
74
58
|
}
|
|
75
59
|
|
|
76
60
|
.lg {
|
|
77
|
-
|
|
78
|
-
max-width: 32rem;
|
|
61
|
+
@include overlay.anchored-size("lg");
|
|
79
62
|
}
|
|
80
63
|
|
|
81
|
-
// Title
|
|
82
64
|
.title {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
65
|
+
@include overlay.anchored-title;
|
|
66
|
+
|
|
67
|
+
margin: 0 0 var(--fui-feedback-text-gap, var(--fui-raw-space-4, 4px));
|
|
86
68
|
color: var(--fui-text-primary, $fui-text-primary);
|
|
87
|
-
line-height: var(--fui-line-height-tight, $fui-line-height-tight);
|
|
88
69
|
}
|
|
89
70
|
|
|
90
|
-
// Description
|
|
91
71
|
.description {
|
|
72
|
+
@include overlay.description;
|
|
73
|
+
|
|
92
74
|
margin: 0;
|
|
93
|
-
font-size: var(--fui-font-size-sm, $fui-font-size-sm);
|
|
94
75
|
color: var(--fui-text-secondary, $fui-text-secondary);
|
|
95
|
-
line-height: var(--fui-line-height-normal, $fui-line-height-normal);
|
|
96
76
|
}
|
|
97
77
|
|
|
98
|
-
// Close button
|
|
99
78
|
.close {
|
|
100
79
|
@include button-reset;
|
|
101
80
|
@include interactive-base;
|
|
102
|
-
@include
|
|
81
|
+
@include overlay.close;
|
|
103
82
|
|
|
104
|
-
position: absolute;
|
|
105
|
-
top: var(--fui-space-2, $fui-space-2);
|
|
106
|
-
right: var(--fui-space-2, $fui-space-2);
|
|
107
|
-
width: 1.5rem;
|
|
108
|
-
height: 1.5rem;
|
|
109
83
|
border-radius: var(--fui-radius-sm, $fui-radius-sm);
|
|
110
84
|
color: var(--fui-text-tertiary, $fui-text-tertiary);
|
|
111
85
|
|
|
@@ -115,18 +89,22 @@ $fui-arrow-size: 10px !default;
|
|
|
115
89
|
}
|
|
116
90
|
|
|
117
91
|
svg {
|
|
118
|
-
|
|
119
|
-
|
|
92
|
+
inline-size: action.icon-size("sm");
|
|
93
|
+
block-size: action.icon-size("sm");
|
|
120
94
|
}
|
|
121
95
|
}
|
|
122
96
|
|
|
123
|
-
|
|
97
|
+
.popup:has(.close) .title {
|
|
98
|
+
padding-inline-end: calc(
|
|
99
|
+
#{action.track("sm")} + var(--fui-overlay-section-gap, var(--fui-raw-space-8, 8px))
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
124
103
|
.arrow {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
transform: rotate(45deg);
|
|
104
|
+
@include overlay.arrow-box;
|
|
105
|
+
|
|
128
106
|
background-color: var(--fui-bg-elevated, $fui-bg-elevated);
|
|
129
|
-
border: 1px solid var(--fui-border, $fui-border);
|
|
107
|
+
border: var(--fui-stroke-hairline, 1px) solid var(--fui-border, $fui-border);
|
|
130
108
|
|
|
131
109
|
&[data-side="top"] {
|
|
132
110
|
border-top: none;
|
|
@@ -134,56 +112,42 @@ $fui-arrow-size: 10px !default;
|
|
|
134
112
|
}
|
|
135
113
|
|
|
136
114
|
&[data-side="bottom"] {
|
|
137
|
-
border-bottom: none;
|
|
138
115
|
border-right: none;
|
|
116
|
+
border-bottom: none;
|
|
139
117
|
}
|
|
140
118
|
|
|
141
119
|
&[data-side="left"] {
|
|
142
|
-
border-left: none;
|
|
143
120
|
border-bottom: none;
|
|
121
|
+
border-left: none;
|
|
144
122
|
}
|
|
145
123
|
|
|
146
124
|
&[data-side="right"] {
|
|
147
|
-
border-right: none;
|
|
148
125
|
border-top: none;
|
|
126
|
+
border-right: none;
|
|
149
127
|
}
|
|
150
128
|
}
|
|
151
129
|
|
|
152
|
-
// Body content area
|
|
153
130
|
.body {
|
|
154
|
-
margin-
|
|
131
|
+
margin-block-start: var(--fui-overlay-section-gap, var(--fui-raw-space-8, 8px));
|
|
155
132
|
}
|
|
156
133
|
|
|
157
|
-
// Footer for actions
|
|
158
134
|
.footer {
|
|
159
135
|
display: flex;
|
|
160
136
|
align-items: center;
|
|
161
137
|
justify-content: flex-end;
|
|
162
|
-
gap: var(--fui-
|
|
163
|
-
margin-
|
|
164
|
-
padding-
|
|
165
|
-
border-top: 1px solid var(--fui-border, $fui-border);
|
|
138
|
+
gap: var(--fui-overlay-section-gap, var(--fui-raw-space-8, 8px));
|
|
139
|
+
margin-block-start: var(--fui-overlay-section-gap, var(--fui-raw-space-8, 8px));
|
|
140
|
+
padding-block-start: var(--fui-overlay-section-gap, var(--fui-raw-space-8, 8px));
|
|
141
|
+
border-top: var(--fui-stroke-hairline, 1px) solid var(--fui-border, $fui-border);
|
|
166
142
|
}
|
|
167
143
|
|
|
168
|
-
// ============================================
|
|
169
|
-
// Accessibility: Reduced Motion
|
|
170
|
-
// ============================================
|
|
171
|
-
|
|
172
144
|
@media (prefers-reduced-motion: reduce) {
|
|
173
|
-
.popup
|
|
145
|
+
.popup,
|
|
146
|
+
.popup[data-starting-style],
|
|
147
|
+
.popup[data-ending-style],
|
|
148
|
+
.popup[data-side="top"][data-starting-style],
|
|
149
|
+
.popup[data-side="top"][data-ending-style] {
|
|
174
150
|
transition: none;
|
|
175
151
|
transform: none;
|
|
176
|
-
|
|
177
|
-
&[data-starting-style],
|
|
178
|
-
&[data-ending-style] {
|
|
179
|
-
transform: none;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
&[data-side="top"] {
|
|
183
|
-
&[data-starting-style],
|
|
184
|
-
&[data-ending-style] {
|
|
185
|
-
transform: none;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
152
|
}
|
|
189
153
|
}
|