@usefragments/ui 1.6.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/fragments-wordmark.cjs +2 -2
- package/dist/assets/fragments-wordmark.d.ts.map +1 -1
- package/dist/assets/fragments-wordmark.js +2 -2
- 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 +6885 -6308
- package/dist/blocks/components/StatsCard.d.ts +1 -1
- package/dist/blocks/components/StatsCard.d.ts.map +1 -1
- package/dist/chart.cjs +24 -6
- package/dist/chart.js +24 -6
- package/dist/codeblock.cjs +76 -43
- package/dist/codeblock.js +71 -38
- package/dist/colorpicker.cjs +4 -1
- package/dist/colorpicker.js +4 -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 +23 -20
- package/dist/components/Alert/Alert.module.scss.js +23 -20
- package/dist/components/Alert/index.cjs +20 -8
- package/dist/components/Alert/index.d.ts +17 -11
- package/dist/components/Alert/index.d.ts.map +1 -1
- package/dist/components/Alert/index.js +20 -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/Box/index.cjs +64 -75
- package/dist/components/Box/index.d.ts +16 -16
- package/dist/components/Box/index.d.ts.map +1 -1
- package/dist/components/Box/index.js +64 -75
- 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 +31 -26
- package/dist/components/Card/Card.module.scss.js +32 -27
- package/dist/components/Card/index.cjs +16 -3
- package/dist/components/Card/index.d.ts +23 -15
- package/dist/components/Card/index.d.ts.map +1 -1
- package/dist/components/Card/index.js +16 -3
- 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.map +1 -1
- 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 +4 -4
- 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 +4 -4
- 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 +3 -3
- 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 +3 -3
- package/dist/components/CodeBlock/CodeBlock.module.scss.cjs +26 -23
- package/dist/components/CodeBlock/CodeBlock.module.scss.js +26 -23
- package/dist/components/CodeBlock/css-variables-theme.cjs +98 -0
- package/dist/components/CodeBlock/css-variables-theme.d.ts +27 -0
- package/dist/components/CodeBlock/css-variables-theme.d.ts.map +1 -0
- package/dist/components/CodeBlock/css-variables-theme.js +98 -0
- package/dist/components/CodeBlock/index.d.ts +20 -5
- 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 +26 -6
- package/dist/components/Combobox/index.d.ts.map +1 -1
- package/dist/components/Combobox/index.js +26 -6
- 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 +28 -16
- package/dist/components/Command/index.d.ts +8 -3
- package/dist/components/Command/index.d.ts.map +1 -1
- package/dist/components/Command/index.js +28 -16
- 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.icons.cjs +6 -33
- package/dist/components/DataTable/DataTable.icons.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.icons.js +6 -33
- 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/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/Dialog/index.cjs +13 -16
- package/dist/components/Dialog/index.d.ts +11 -10
- package/dist/components/Dialog/index.d.ts.map +1 -1
- package/dist/components/Dialog/index.js +13 -16
- 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/Editor/index.d.ts +10 -10
- package/dist/components/Editor/index.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.module.scss.cjs +11 -8
- package/dist/components/EmptyState/EmptyState.module.scss.js +11 -8
- package/dist/components/EmptyState/index.cjs +13 -6
- package/dist/components/EmptyState/index.d.ts +13 -5
- package/dist/components/EmptyState/index.d.ts.map +1 -1
- package/dist/components/EmptyState/index.js +13 -6
- package/dist/components/Field/Field.module.scss.cjs +5 -5
- package/dist/components/Field/Field.module.scss.js +5 -5
- package/dist/components/Field/index.cjs +9 -1
- package/dist/components/Field/index.d.ts.map +1 -1
- package/dist/components/Field/index.js +9 -1
- 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/Grid/index.cjs +1 -1
- package/dist/components/Grid/index.js +1 -1
- 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 +17 -38
- package/dist/components/Header/index.d.ts +15 -11
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +17 -38
- 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.cjs +2 -1
- package/dist/components/IconButton/index.d.ts +4 -4
- package/dist/components/IconButton/index.d.ts.map +1 -1
- package/dist/components/IconButton/index.js +2 -1
- package/dist/components/Image/Image.module.scss.cjs +27 -27
- package/dist/components/Image/Image.module.scss.js +27 -27
- 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 +26 -14
- package/dist/components/Link/Link.module.scss.js +26 -14
- package/dist/components/Link/index.cjs +13 -2
- package/dist/components/Link/index.d.ts +11 -4
- 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 +34 -34
- package/dist/components/Loading/Loading.module.scss.js +34 -34
- 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/Markdown/index.d.ts +2 -2
- package/dist/components/Markdown/index.d.ts.map +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 +34 -31
- package/dist/components/NavigationMenu/NavigationMenu.module.scss.js +34 -31
- package/dist/components/NavigationMenu/index.cjs +32 -15
- package/dist/components/NavigationMenu/index.d.ts +12 -6
- package/dist/components/NavigationMenu/index.d.ts.map +1 -1
- package/dist/components/NavigationMenu/index.js +32 -15
- 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/ScrollArea/index.d.ts +4 -4
- package/dist/components/ScrollArea/index.d.ts.map +1 -1
- package/dist/components/ScrollArea/scroll-state.d.ts +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 +15 -38
- package/dist/components/Sidebar/index.d.ts +19 -19
- package/dist/components/Sidebar/index.d.ts.map +1 -1
- package/dist/components/Sidebar/index.js +15 -38
- package/dist/components/Skeleton/Skeleton.module.scss.cjs +50 -46
- package/dist/components/Skeleton/Skeleton.module.scss.js +50 -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/Stack/Stack.module.scss.cjs +25 -25
- package/dist/components/Stack/Stack.module.scss.js +25 -25
- package/dist/components/Stack/index.cjs +1 -1
- package/dist/components/Stack/index.js +1 -1
- 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 +19 -19
- package/dist/components/Table/Table.module.scss.js +19 -19
- 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 +14 -10
- package/dist/components/TableOfContents/index.d.ts +5 -3
- package/dist/components/TableOfContents/index.d.ts.map +1 -1
- package/dist/components/TableOfContents/index.js +14 -10
- 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 +30 -11
- 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 +30 -11
- package/dist/components/Text/Text.module.scss.cjs +109 -97
- package/dist/components/Text/Text.module.scss.js +109 -97
- package/dist/components/Text/index.cjs +45 -41
- package/dist/components/Text/index.d.ts +24 -19
- package/dist/components/Text/index.d.ts.map +1 -1
- package/dist/components/Text/index.js +45 -41
- 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 +22 -5
- 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 +22 -5
- 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 -6
- package/dist/components/ThemeToggle/ThemeToggle.module.scss.js +6 -6
- 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 +6 -50
- package/dist/components/ThemeToggle/index.d.ts +5 -3
- package/dist/components/ThemeToggle/index.d.ts.map +1 -1
- package/dist/components/ThemeToggle/index.js +3 -47
- 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/Tooltip/index.cjs +24 -40
- package/dist/components/Tooltip/index.d.ts +4 -4
- package/dist/components/Tooltip/index.d.ts.map +1 -1
- package/dist/components/Tooltip/index.js +24 -40
- package/dist/components/VisuallyHidden/VisuallyHidden.module.scss.cjs +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.module.scss.js +1 -1
- package/dist/components/VisuallyHidden/index.d.ts +2 -2
- package/dist/data-table-virtual.cjs +3 -2
- package/dist/data-table-virtual.js +3 -2
- package/dist/data-table.cjs +3 -2
- package/dist/data-table.js +3 -2
- package/dist/datepicker.cjs +26 -13
- package/dist/datepicker.js +26 -13
- package/dist/editor.cjs +68 -28
- package/dist/editor.js +68 -28
- package/dist/index.cjs +6 -2
- package/dist/index.d.ts +9 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -4
- package/dist/markdown.cjs +21 -29
- package/dist/markdown.js +21 -29
- package/dist/measurements/generated.cjs +46 -94
- package/dist/measurements/generated.d.ts +44 -92
- package/dist/measurements/generated.d.ts.map +1 -1
- package/dist/measurements/generated.js +46 -94
- package/dist/measurements/index.d.ts +1 -1
- package/dist/measurements/index.d.ts.map +1 -1
- package/dist/utils/a11y.cjs +5 -2
- package/dist/utils/a11y.d.ts +5 -5
- package/dist/utils/a11y.d.ts.map +1 -1
- package/dist/utils/a11y.js +5 -2
- package/dist/utils/canonical-stamp.cjs +2 -8
- package/dist/utils/canonical-stamp.d.ts.map +1 -1
- package/dist/utils/canonical-stamp.js +1 -7
- package/dist/utils/css-warning.cjs +1 -1
- package/dist/utils/css-warning.js +1 -1
- package/dist/utils/env.cjs +17 -0
- package/dist/utils/env.d.ts +3 -0
- package/dist/utils/env.d.ts.map +1 -0
- package/dist/utils/env.js +17 -0
- package/dist/utils/keyboard-shortcuts.cjs +3 -10
- package/dist/utils/keyboard-shortcuts.d.ts +4 -4
- package/dist/utils/keyboard-shortcuts.d.ts.map +1 -1
- package/dist/utils/keyboard-shortcuts.js +3 -10
- package/dist/utils/seed-derivation.cjs +10 -7
- 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 +10 -7
- 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 +9 -10
- package/src/assets/fragments-logo.tsx +2 -2
- package/src/assets/fragments-wordmark.tsx +4 -2
- package/src/assets/nav-glyph.module.scss +166 -0
- package/src/assets/nav-glyph.tsx +188 -0
- package/src/components/Accordion/Accordion.contract.json +24 -48
- package/src/components/Accordion/Accordion.module.scss +5 -3
- package/src/components/Alert/Alert.contract.json +49 -65
- package/src/components/Alert/Alert.module.scss +57 -47
- package/src/components/Alert/index.tsx +72 -39
- package/src/components/AppShell/AppShell.contract.json +34 -51
- package/src/components/AppShell/AppShell.module.scss +99 -54
- package/src/components/AppShell/index.tsx +2 -2
- package/src/components/Avatar/Avatar.contract.json +31 -48
- package/src/components/Avatar/Avatar.module.scss +4 -2
- package/src/components/Badge/Badge.contract.json +86 -55
- package/src/components/Badge/Badge.module.scss +80 -48
- package/src/components/Badge/index.tsx +34 -17
- package/src/components/BentoGrid/BentoGrid.contract.json +21 -45
- package/src/components/BentoGrid/BentoGrid.module.scss +4 -8
- package/src/components/Box/Box.contract.json +40 -148
- package/src/components/Box/Box.module.scss +7 -6
- package/src/components/Box/index.tsx +92 -99
- package/src/components/Breadcrumbs/Breadcrumbs.contract.json +21 -34
- package/src/components/Breadcrumbs/Breadcrumbs.module.scss +27 -12
- package/src/components/Breadcrumbs/index.tsx +5 -1
- package/src/components/Button/Button.module.scss +261 -185
- package/src/components/Button/index.tsx +41 -28
- package/src/components/ButtonGroup/ButtonGroup.contract.json +34 -49
- 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 +97 -76
- package/src/components/Card/index.tsx +44 -20
- package/src/components/Chart/Chart.contract.json +21 -29
- package/src/components/Chart/Chart.module.scss +6 -5
- package/src/components/Chart/index.tsx +36 -6
- package/src/components/Checkbox/Checkbox.contract.json +28 -27
- package/src/components/Checkbox/Checkbox.module.scss +47 -54
- package/src/components/Checkbox/index.tsx +10 -10
- package/src/components/Chip/Chip.contract.json +38 -45
- package/src/components/Chip/Chip.module.scss +24 -23
- package/src/components/Chip/index.tsx +12 -7
- package/src/components/CodeBlock/CodeBlock.contract.json +46 -76
- package/src/components/CodeBlock/CodeBlock.module.scss +75 -73
- package/src/components/CodeBlock/css-variables-theme.ts +102 -0
- package/src/components/CodeBlock/index.tsx +114 -51
- package/src/components/Collapsible/Collapsible.contract.json +21 -36
- package/src/components/Collapsible/Collapsible.module.scss +1 -7
- package/src/components/ColorPicker/ColorPicker.contract.json +29 -48
- package/src/components/ColorPicker/ColorPicker.module.scss +34 -24
- package/src/components/ColorPicker/index.tsx +6 -1
- package/src/components/Combobox/Combobox.contract.json +36 -37
- package/src/components/Combobox/Combobox.module.scss +16 -19
- package/src/components/Combobox/index.tsx +41 -6
- package/src/components/Command/Command.contract.json +28 -44
- package/src/components/Command/Command.module.scss +19 -21
- package/src/components/Command/index.tsx +64 -47
- package/src/components/ComponentDefaults/ComponentDefaults.contract.json +91 -0
- package/src/components/ConversationList/ConversationList.contract.json +27 -32
- package/src/components/ConversationList/ConversationList.module.scss +2 -3
- package/src/components/ConversationList/index.tsx +2 -2
- package/src/components/DataTable/DataTable.icons.tsx +4 -21
- package/src/components/DataTable/DataTable.module.scss +24 -17
- package/src/components/DataTable/DataTable.virtual.tsx +3 -2
- package/src/components/DataTable/index.tsx +9 -8
- package/src/components/DatePicker/DatePicker.contract.json +27 -28
- package/src/components/DatePicker/DatePicker.module.scss +41 -44
- package/src/components/DatePicker/index.tsx +23 -9
- package/src/components/Dialog/Dialog.module.scss +26 -32
- package/src/components/Dialog/index.tsx +51 -39
- package/src/components/Drawer/Drawer.contract.json +28 -42
- package/src/components/Drawer/Drawer.module.scss +123 -64
- package/src/components/Drawer/index.tsx +7 -5
- package/src/components/Editor/Editor.contract.json +32 -49
- package/src/components/Editor/Editor.module.scss +60 -25
- package/src/components/Editor/index.tsx +240 -179
- package/src/components/EmptyState/EmptyState.contract.json +33 -45
- package/src/components/EmptyState/EmptyState.module.scss +37 -21
- package/src/components/EmptyState/index.tsx +56 -23
- package/src/components/Field/Field.contract.json +28 -46
- package/src/components/Field/Field.module.scss +2 -1
- package/src/components/Field/index.tsx +5 -1
- package/src/components/Fieldset/Fieldset.contract.json +21 -38
- package/src/components/Fieldset/Fieldset.module.scss +15 -7
- package/src/components/Form/Form.contract.json +23 -23
- package/src/components/Grid/Grid.contract.json +28 -64
- package/src/components/Grid/Grid.module.scss +2 -2
- package/src/components/Grid/index.tsx +10 -10
- package/src/components/Header/Header.contract.json +31 -67
- package/src/components/Header/Header.module.scss +57 -54
- package/src/components/Header/index.tsx +134 -122
- package/src/components/Icon/Icon.contract.json +37 -81
- package/src/components/Icon/Icon.module.scss +13 -12
- package/src/components/Icon/index.tsx +31 -31
- package/src/components/IconButton/IconButton.contract.json +37 -21
- package/src/components/IconButton/IconButton.module.scss +19 -11
- package/src/components/IconButton/index.tsx +6 -5
- package/src/components/Image/Image.contract.json +23 -56
- package/src/components/Input/Input.contract.json +25 -44
- package/src/components/Input/Input.module.scss +6 -55
- package/src/components/Input/index.tsx +2 -18
- package/src/components/Link/Link.contract.json +46 -58
- package/src/components/Link/Link.module.scss +41 -10
- package/src/components/Link/index.tsx +27 -6
- package/src/components/List/List.contract.json +33 -62
- package/src/components/List/List.module.scss +10 -5
- package/src/components/List/index.tsx +17 -13
- package/src/components/Listbox/Listbox.contract.json +21 -37
- package/src/components/Listbox/Listbox.module.scss +14 -20
- package/src/components/Loading/Loading.contract.json +41 -65
- package/src/components/Loading/Loading.module.scss +37 -31
- package/src/components/Loading/index.tsx +15 -14
- package/src/components/Main/Main.contract.json +17 -9
- package/src/components/Markdown/Markdown.contract.json +22 -43
- package/src/components/Markdown/Markdown.module.scss +45 -6
- package/src/components/Markdown/index.tsx +48 -49
- package/src/components/Menu/Menu.contract.json +30 -46
- package/src/components/Menu/Menu.module.scss +32 -16
- package/src/components/Message/Message.contract.json +31 -54
- package/src/components/Message/Message.module.scss +18 -9
- package/src/components/Message/index.tsx +2 -2
- package/src/components/NavigationMenu/NavigationMenu.contract.json +36 -45
- package/src/components/NavigationMenu/NavigationMenu.module.scss +66 -66
- package/src/components/NavigationMenu/index.tsx +105 -81
- package/src/components/Pagination/Pagination.contract.json +22 -40
- package/src/components/Pagination/Pagination.module.scss +9 -16
- package/src/components/Popover/Popover.contract.json +28 -50
- package/src/components/Popover/Popover.module.scss +30 -28
- package/src/components/Progress/Progress.contract.json +39 -35
- package/src/components/Progress/Progress.module.scss +16 -10
- package/src/components/Progress/index.tsx +34 -16
- package/src/components/Prompt/Prompt.contract.json +40 -56
- package/src/components/Prompt/Prompt.module.scss +49 -48
- package/src/components/Prompt/index.tsx +17 -15
- package/src/components/RadioGroup/RadioGroup.contract.json +29 -28
- package/src/components/RadioGroup/RadioGroup.module.scss +50 -45
- package/src/components/RadioGroup/index.tsx +23 -10
- package/src/components/ScrollArea/ScrollArea.contract.json +18 -19
- package/src/components/ScrollArea/ScrollArea.module.scss +45 -48
- package/src/components/ScrollArea/index.tsx +16 -16
- package/src/components/ScrollArea/scroll-state.ts +24 -24
- package/src/components/Select/Select.module.scss +20 -19
- package/src/components/Select/index.tsx +26 -24
- package/src/components/Separator/Separator.contract.json +29 -53
- package/src/components/Separator/Separator.module.scss +24 -40
- package/src/components/Separator/index.tsx +16 -11
- package/src/components/Sidebar/Sidebar.contract.json +35 -67
- package/src/components/Sidebar/Sidebar.module.scss +94 -88
- package/src/components/Sidebar/index.tsx +167 -167
- package/src/components/Skeleton/Skeleton.contract.json +34 -60
- package/src/components/Skeleton/Skeleton.module.scss +50 -26
- package/src/components/Skeleton/index.tsx +16 -15
- package/src/components/Slider/Slider.contract.json +27 -39
- package/src/components/Slider/Slider.module.scss +9 -22
- package/src/components/Stack/Stack.contract.json +30 -57
- package/src/components/Stack/Stack.module.scss +26 -24
- package/src/components/Stack/index.tsx +3 -3
- package/src/components/Switch/Switch.contract.json +33 -46
- package/src/components/Switch/Switch.module.scss +106 -59
- package/src/components/Table/Table.contract.json +28 -46
- package/src/components/Table/Table.module.scss +24 -16
- package/src/components/TableOfContents/TableOfContents.contract.json +34 -21
- package/src/components/TableOfContents/TableOfContents.module.scss +17 -13
- package/src/components/TableOfContents/index.tsx +27 -10
- package/src/components/Tabs/Tabs.contract.json +35 -56
- package/src/components/Tabs/Tabs.module.scss +27 -31
- package/src/components/Tabs/index.tsx +30 -15
- package/src/components/Text/Text.contract.json +52 -72
- package/src/components/Text/Text.module.scss +34 -18
- package/src/components/Text/index.tsx +123 -83
- package/src/components/Textarea/Textarea.contract.json +24 -55
- package/src/components/Textarea/Textarea.module.scss +22 -52
- package/src/components/Textarea/index.tsx +3 -14
- package/src/components/Theme/Theme.contract.json +35 -53
- package/src/components/Theme/index.tsx +41 -13
- package/src/components/ThemeToggle/ThemeButton.tsx +49 -0
- package/src/components/ThemeToggle/ThemeToggle.module.scss +20 -27
- package/src/components/ThemeToggle/icons.tsx +46 -0
- package/src/components/ThemeToggle/index.tsx +9 -55
- package/src/components/ThinkingIndicator/ThinkingIndicator.contract.json +34 -50
- package/src/components/ThinkingIndicator/ThinkingIndicator.module.scss +9 -7
- package/src/components/ThinkingIndicator/index.tsx +12 -14
- package/src/components/Toast/Toast.contract.json +55 -49
- package/src/components/Toast/Toast.module.scss +50 -105
- package/src/components/Toast/index.tsx +39 -34
- package/src/components/ToggleGroup/ToggleGroup.contract.json +39 -40
- package/src/components/ToggleGroup/ToggleGroup.module.scss +30 -27
- package/src/components/ToggleGroup/index.tsx +11 -11
- package/src/components/Tooltip/Tooltip.contract.json +31 -52
- package/src/components/Tooltip/Tooltip.module.scss +16 -10
- package/src/components/Tooltip/index.tsx +19 -24
- package/src/components/VisuallyHidden/VisuallyHidden.contract.json +22 -44
- package/src/components/VisuallyHidden/VisuallyHidden.module.scss +4 -14
- package/src/components/VisuallyHidden/index.tsx +5 -5
- package/src/index.ts +16 -12
- package/src/measurements/MeasurementTargets.module.scss +6 -7
- package/src/measurements/generated.ts +46 -97
- package/src/measurements/index.ts +0 -1
- package/src/measurements/measurements.json +44 -116
- package/src/recipes/_action.scss +4 -4
- package/src/recipes/_boolean-range.scss +12 -16
- package/src/recipes/_feedback.scss +17 -16
- package/src/recipes/_field.scss +28 -16
- package/src/recipes/_layout.scss +14 -7
- package/src/recipes/_navigation.scss +84 -29
- package/src/recipes/_overlay.scss +143 -43
- package/src/recipes/_popup.scss +54 -34
- package/src/recipes/_prose.scss +48 -28
- package/src/recipes/_representation.scss +10 -9
- package/src/recipes/_segmented.scss +1 -1
- package/src/recipes/_table-chrome.scss +42 -17
- package/src/recipes/_target.scss +2 -4
- package/src/recipes/_typography.scss +10 -0
- package/src/scss.d.ts +1 -1
- package/src/styles/globals.scss +31 -25
- package/src/tokens/_component-properties.scss +19 -1
- package/src/tokens/_computed.scss +32 -49
- package/src/tokens/_derive.scss +112 -210
- package/src/tokens/_measurements.catalog.generated.css +62 -44
- package/src/tokens/_measurements.generated.scss +119 -249
- package/src/tokens/_mixins.scss +49 -48
- package/src/tokens/_palettes.scss +39 -167
- package/src/tokens/_property-registrations.scss +9 -0
- package/src/tokens/_seeds.scss +20 -31
- package/src/tokens/_variables.scss +251 -94
- package/src/utils/a11y.tsx +69 -69
- package/src/utils/aria.ts +3 -3
- package/src/utils/canonical-stamp.ts +2 -12
- package/src/utils/css-warning.ts +7 -7
- package/src/utils/env.ts +25 -0
- package/src/utils/keyboard-shortcuts.ts +131 -126
- package/src/utils/seed-derivation.ts +11 -14
- 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/Button/Button.contract.json +0 -218
- package/src/components/Card/Card.contract.json +0 -175
- package/src/components/DataTable/DataTable.contract.json +0 -302
- package/src/components/Dialog/Dialog.contract.json +0 -159
- package/src/components/Select/Select.contract.json +0 -259
- package/src/components/Toggle/index.ts +0 -7
- package/src/tokens/_density.scss +0 -85
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const chip = "
|
|
4
|
-
const withRemove = "
|
|
5
|
-
const xs = "
|
|
6
|
-
const sm = "
|
|
7
|
-
const md = "
|
|
8
|
-
const lg = "
|
|
9
|
-
const
|
|
10
|
-
const selected = "
|
|
11
|
-
const
|
|
12
|
-
const soft = "
|
|
13
|
-
const avatar = "
|
|
14
|
-
const icon = "
|
|
15
|
-
const removableChip = "
|
|
16
|
-
const remove = "
|
|
17
|
-
const group = "
|
|
3
|
+
const chip = "_chip_giwee_1";
|
|
4
|
+
const withRemove = "_withRemove_giwee_45";
|
|
5
|
+
const xs = "_xs_giwee_50";
|
|
6
|
+
const sm = "_sm_giwee_62";
|
|
7
|
+
const md = "_md_giwee_74";
|
|
8
|
+
const lg = "_lg_giwee_86";
|
|
9
|
+
const solid = "_solid_giwee_98";
|
|
10
|
+
const selected = "_selected_giwee_108";
|
|
11
|
+
const outline = "_outline_giwee_120";
|
|
12
|
+
const soft = "_soft_giwee_147";
|
|
13
|
+
const avatar = "_avatar_giwee_169";
|
|
14
|
+
const icon = "_icon_giwee_188";
|
|
15
|
+
const removableChip = "_removableChip_giwee_193";
|
|
16
|
+
const remove = "_remove_giwee_198";
|
|
17
|
+
const group = "_group_giwee_357";
|
|
18
18
|
const styles = {
|
|
19
19
|
chip,
|
|
20
20
|
withRemove,
|
|
@@ -22,9 +22,9 @@ const styles = {
|
|
|
22
22
|
sm,
|
|
23
23
|
md,
|
|
24
24
|
lg,
|
|
25
|
-
|
|
25
|
+
solid,
|
|
26
26
|
selected,
|
|
27
|
-
|
|
27
|
+
outline,
|
|
28
28
|
soft,
|
|
29
29
|
avatar,
|
|
30
30
|
icon,
|
|
@@ -35,16 +35,16 @@ const styles = {
|
|
|
35
35
|
exports.avatar = avatar;
|
|
36
36
|
exports.chip = chip;
|
|
37
37
|
exports.default = styles;
|
|
38
|
-
exports.filled = filled;
|
|
39
38
|
exports.group = group;
|
|
40
39
|
exports.icon = icon;
|
|
41
40
|
exports.lg = lg;
|
|
42
41
|
exports.md = md;
|
|
43
|
-
exports.
|
|
42
|
+
exports.outline = outline;
|
|
44
43
|
exports.removableChip = removableChip;
|
|
45
44
|
exports.remove = remove;
|
|
46
45
|
exports.selected = selected;
|
|
47
46
|
exports.sm = sm;
|
|
48
47
|
exports.soft = soft;
|
|
48
|
+
exports.solid = solid;
|
|
49
49
|
exports.withRemove = withRemove;
|
|
50
50
|
exports.xs = xs;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
const chip = "
|
|
2
|
-
const withRemove = "
|
|
3
|
-
const xs = "
|
|
4
|
-
const sm = "
|
|
5
|
-
const md = "
|
|
6
|
-
const lg = "
|
|
7
|
-
const
|
|
8
|
-
const selected = "
|
|
9
|
-
const
|
|
10
|
-
const soft = "
|
|
11
|
-
const avatar = "
|
|
12
|
-
const icon = "
|
|
13
|
-
const removableChip = "
|
|
14
|
-
const remove = "
|
|
15
|
-
const group = "
|
|
1
|
+
const chip = "_chip_giwee_1";
|
|
2
|
+
const withRemove = "_withRemove_giwee_45";
|
|
3
|
+
const xs = "_xs_giwee_50";
|
|
4
|
+
const sm = "_sm_giwee_62";
|
|
5
|
+
const md = "_md_giwee_74";
|
|
6
|
+
const lg = "_lg_giwee_86";
|
|
7
|
+
const solid = "_solid_giwee_98";
|
|
8
|
+
const selected = "_selected_giwee_108";
|
|
9
|
+
const outline = "_outline_giwee_120";
|
|
10
|
+
const soft = "_soft_giwee_147";
|
|
11
|
+
const avatar = "_avatar_giwee_169";
|
|
12
|
+
const icon = "_icon_giwee_188";
|
|
13
|
+
const removableChip = "_removableChip_giwee_193";
|
|
14
|
+
const remove = "_remove_giwee_198";
|
|
15
|
+
const group = "_group_giwee_357";
|
|
16
16
|
const styles = {
|
|
17
17
|
chip,
|
|
18
18
|
withRemove,
|
|
@@ -20,9 +20,9 @@ const styles = {
|
|
|
20
20
|
sm,
|
|
21
21
|
md,
|
|
22
22
|
lg,
|
|
23
|
-
|
|
23
|
+
solid,
|
|
24
24
|
selected,
|
|
25
|
-
|
|
25
|
+
outline,
|
|
26
26
|
soft,
|
|
27
27
|
avatar,
|
|
28
28
|
icon,
|
|
@@ -34,17 +34,17 @@ export {
|
|
|
34
34
|
avatar,
|
|
35
35
|
chip,
|
|
36
36
|
styles as default,
|
|
37
|
-
filled,
|
|
38
37
|
group,
|
|
39
38
|
icon,
|
|
40
39
|
lg,
|
|
41
40
|
md,
|
|
42
|
-
|
|
41
|
+
outline,
|
|
43
42
|
removableChip,
|
|
44
43
|
remove,
|
|
45
44
|
selected,
|
|
46
45
|
sm,
|
|
47
46
|
soft,
|
|
47
|
+
solid,
|
|
48
48
|
withRemove,
|
|
49
49
|
xs
|
|
50
50
|
};
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
4
4
|
const jsxRuntime = require("react/jsx-runtime");
|
|
5
5
|
const React = require("react");
|
|
6
6
|
const Chip_module = require("./Chip.module.scss.cjs");
|
|
7
|
+
const env = require("../../utils/env.cjs");
|
|
7
8
|
function _interopNamespaceDefault(e) {
|
|
8
9
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
9
10
|
if (e) {
|
|
@@ -23,7 +24,7 @@ function _interopNamespaceDefault(e) {
|
|
|
23
24
|
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
24
25
|
const ChipBase = React__namespace.forwardRef(function Chip2({
|
|
25
26
|
children,
|
|
26
|
-
variant
|
|
27
|
+
variant = "solid",
|
|
27
28
|
size: sizeProp,
|
|
28
29
|
selected = false,
|
|
29
30
|
disabled = false,
|
|
@@ -36,7 +37,6 @@ const ChipBase = React__namespace.forwardRef(function Chip2({
|
|
|
36
37
|
...htmlProps
|
|
37
38
|
}, ref) {
|
|
38
39
|
const size = sizeProp ?? "xs";
|
|
39
|
-
const variant = variantProp === "outline" ? "outlined" : variantProp;
|
|
40
40
|
const classes = [
|
|
41
41
|
Chip_module.default.chip,
|
|
42
42
|
Chip_module.default[size],
|
|
@@ -114,7 +114,7 @@ function ChipGroupInner({
|
|
|
114
114
|
if (child.props.value != null) return child.props.value;
|
|
115
115
|
if (typeof child.props.children === "string") return child.props.children;
|
|
116
116
|
if (child.key != null) return String(child.key);
|
|
117
|
-
if (
|
|
117
|
+
if (!env.isProductionBuild()) {
|
|
118
118
|
console.warn(
|
|
119
119
|
"Chip.Group: Chips with non-string children should provide a `value` prop."
|
|
120
120
|
);
|
|
@@ -3,12 +3,17 @@ import * as React from "react";
|
|
|
3
3
|
* Chip for selections, filters, and tags. Use with Chip.Group for multi-select.
|
|
4
4
|
* @see https://usefragments.com/components/chip
|
|
5
5
|
*/
|
|
6
|
+
export type ChipVariant = "solid" | "outline" | "soft";
|
|
6
7
|
export interface ChipProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
7
8
|
children: React.ReactNode;
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
9
|
+
/** Chrome family.
|
|
10
|
+
*
|
|
11
|
+
* - `solid` (default): tinted pill for filters and tags.
|
|
12
|
+
* - `outline`: hairline-bordered, transparent.
|
|
13
|
+
* - `soft`: info-tinted, for a chip that carries a suggestion.
|
|
14
|
+
* @default "solid"
|
|
10
15
|
* @see https://usefragments.com/components/chip#variants */
|
|
11
|
-
variant?:
|
|
16
|
+
variant?: ChipVariant;
|
|
12
17
|
/** Chip size.
|
|
13
18
|
* @default "xs" */
|
|
14
19
|
size?: "xs" | "sm" | "md" | "lg";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEvD,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAChG,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;;;gEAM4D;IAC5D,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;uBACmB;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EACpC,UAAU,GAAG,UAAU,CACxB;IACC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACtC;AAqJD,eAAO,MAAM,IAAI;;CAAgD,CAAC"}
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import styles from "./Chip.module.scss.js";
|
|
5
|
+
import { isProductionBuild } from "../../utils/env.js";
|
|
5
6
|
const ChipBase = React.forwardRef(function Chip2({
|
|
6
7
|
children,
|
|
7
|
-
variant
|
|
8
|
+
variant = "solid",
|
|
8
9
|
size: sizeProp,
|
|
9
10
|
selected = false,
|
|
10
11
|
disabled = false,
|
|
@@ -17,7 +18,6 @@ const ChipBase = React.forwardRef(function Chip2({
|
|
|
17
18
|
...htmlProps
|
|
18
19
|
}, ref) {
|
|
19
20
|
const size = sizeProp ?? "xs";
|
|
20
|
-
const variant = variantProp === "outline" ? "outlined" : variantProp;
|
|
21
21
|
const classes = [
|
|
22
22
|
styles.chip,
|
|
23
23
|
styles[size],
|
|
@@ -95,7 +95,7 @@ function ChipGroupInner({
|
|
|
95
95
|
if (child.props.value != null) return child.props.value;
|
|
96
96
|
if (typeof child.props.children === "string") return child.props.children;
|
|
97
97
|
if (child.key != null) return String(child.key);
|
|
98
|
-
if (
|
|
98
|
+
if (!isProductionBuild()) {
|
|
99
99
|
console.warn(
|
|
100
100
|
"Chip.Group: Chips with non-string children should provide a `value` prop."
|
|
101
101
|
);
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const container = "
|
|
4
|
-
const title = "
|
|
5
|
-
const caption = "
|
|
6
|
-
const wrapper = "
|
|
7
|
-
const header = "
|
|
8
|
-
const filename = "
|
|
9
|
-
const copyButton = "
|
|
10
|
-
const copied = "
|
|
11
|
-
const copyOverlay = "
|
|
12
|
-
const withCopyOverlay = "
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const withLineNumbers = "
|
|
19
|
-
const withDiff = "
|
|
20
|
-
const compact = "
|
|
21
|
-
const wordWrap = "
|
|
22
|
-
const collapseButton = "
|
|
23
|
-
const
|
|
3
|
+
const container = "_container_19hjz_1";
|
|
4
|
+
const title = "_title_19hjz_6";
|
|
5
|
+
const caption = "_caption_19hjz_7";
|
|
6
|
+
const wrapper = "_wrapper_19hjz_20";
|
|
7
|
+
const header = "_header_19hjz_40";
|
|
8
|
+
const filename = "_filename_19hjz_49";
|
|
9
|
+
const copyButton = "_copyButton_19hjz_58";
|
|
10
|
+
const copied = "_copied_19hjz_61";
|
|
11
|
+
const copyOverlay = "_copyOverlay_19hjz_66";
|
|
12
|
+
const withCopyOverlay = "_withCopyOverlay_19hjz_75";
|
|
13
|
+
const icon = "_icon_19hjz_81";
|
|
14
|
+
const persistentCopy = "_persistentCopy_19hjz_87";
|
|
15
|
+
const persistentCopyWrapper = "_persistentCopyWrapper_19hjz_93";
|
|
16
|
+
const codeContainer = "_codeContainer_19hjz_97";
|
|
17
|
+
const loading = "_loading_19hjz_98";
|
|
18
|
+
const withLineNumbers = "_withLineNumbers_19hjz_170";
|
|
19
|
+
const withDiff = "_withDiff_19hjz_174";
|
|
20
|
+
const compact = "_compact_19hjz_199";
|
|
21
|
+
const wordWrap = "_wordWrap_19hjz_220";
|
|
22
|
+
const collapseButton = "_collapseButton_19hjz_230";
|
|
23
|
+
const collapseExpand = "_collapseExpand_19hjz_244";
|
|
24
|
+
const tabbedPanel = "_tabbedPanel_19hjz_248";
|
|
24
25
|
const styles = {
|
|
25
26
|
container,
|
|
26
27
|
title,
|
|
@@ -32,21 +33,23 @@ const styles = {
|
|
|
32
33
|
copied,
|
|
33
34
|
copyOverlay,
|
|
34
35
|
withCopyOverlay,
|
|
35
|
-
codeContainer,
|
|
36
|
-
loading,
|
|
37
36
|
icon,
|
|
38
37
|
persistentCopy,
|
|
39
38
|
persistentCopyWrapper,
|
|
39
|
+
codeContainer,
|
|
40
|
+
loading,
|
|
40
41
|
withLineNumbers,
|
|
41
42
|
withDiff,
|
|
42
43
|
compact,
|
|
43
44
|
wordWrap,
|
|
44
45
|
collapseButton,
|
|
46
|
+
collapseExpand,
|
|
45
47
|
tabbedPanel
|
|
46
48
|
};
|
|
47
49
|
exports.caption = caption;
|
|
48
50
|
exports.codeContainer = codeContainer;
|
|
49
51
|
exports.collapseButton = collapseButton;
|
|
52
|
+
exports.collapseExpand = collapseExpand;
|
|
50
53
|
exports.compact = compact;
|
|
51
54
|
exports.container = container;
|
|
52
55
|
exports.copied = copied;
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
const container = "
|
|
2
|
-
const title = "
|
|
3
|
-
const caption = "
|
|
4
|
-
const wrapper = "
|
|
5
|
-
const header = "
|
|
6
|
-
const filename = "
|
|
7
|
-
const copyButton = "
|
|
8
|
-
const copied = "
|
|
9
|
-
const copyOverlay = "
|
|
10
|
-
const withCopyOverlay = "
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const withLineNumbers = "
|
|
17
|
-
const withDiff = "
|
|
18
|
-
const compact = "
|
|
19
|
-
const wordWrap = "
|
|
20
|
-
const collapseButton = "
|
|
21
|
-
const
|
|
1
|
+
const container = "_container_19hjz_1";
|
|
2
|
+
const title = "_title_19hjz_6";
|
|
3
|
+
const caption = "_caption_19hjz_7";
|
|
4
|
+
const wrapper = "_wrapper_19hjz_20";
|
|
5
|
+
const header = "_header_19hjz_40";
|
|
6
|
+
const filename = "_filename_19hjz_49";
|
|
7
|
+
const copyButton = "_copyButton_19hjz_58";
|
|
8
|
+
const copied = "_copied_19hjz_61";
|
|
9
|
+
const copyOverlay = "_copyOverlay_19hjz_66";
|
|
10
|
+
const withCopyOverlay = "_withCopyOverlay_19hjz_75";
|
|
11
|
+
const icon = "_icon_19hjz_81";
|
|
12
|
+
const persistentCopy = "_persistentCopy_19hjz_87";
|
|
13
|
+
const persistentCopyWrapper = "_persistentCopyWrapper_19hjz_93";
|
|
14
|
+
const codeContainer = "_codeContainer_19hjz_97";
|
|
15
|
+
const loading = "_loading_19hjz_98";
|
|
16
|
+
const withLineNumbers = "_withLineNumbers_19hjz_170";
|
|
17
|
+
const withDiff = "_withDiff_19hjz_174";
|
|
18
|
+
const compact = "_compact_19hjz_199";
|
|
19
|
+
const wordWrap = "_wordWrap_19hjz_220";
|
|
20
|
+
const collapseButton = "_collapseButton_19hjz_230";
|
|
21
|
+
const collapseExpand = "_collapseExpand_19hjz_244";
|
|
22
|
+
const tabbedPanel = "_tabbedPanel_19hjz_248";
|
|
22
23
|
const styles = {
|
|
23
24
|
container,
|
|
24
25
|
title,
|
|
@@ -30,22 +31,24 @@ const styles = {
|
|
|
30
31
|
copied,
|
|
31
32
|
copyOverlay,
|
|
32
33
|
withCopyOverlay,
|
|
33
|
-
codeContainer,
|
|
34
|
-
loading,
|
|
35
34
|
icon,
|
|
36
35
|
persistentCopy,
|
|
37
36
|
persistentCopyWrapper,
|
|
37
|
+
codeContainer,
|
|
38
|
+
loading,
|
|
38
39
|
withLineNumbers,
|
|
39
40
|
withDiff,
|
|
40
41
|
compact,
|
|
41
42
|
wordWrap,
|
|
42
43
|
collapseButton,
|
|
44
|
+
collapseExpand,
|
|
43
45
|
tabbedPanel
|
|
44
46
|
};
|
|
45
47
|
export {
|
|
46
48
|
caption,
|
|
47
49
|
codeContainer,
|
|
48
50
|
collapseButton,
|
|
51
|
+
collapseExpand,
|
|
49
52
|
compact,
|
|
50
53
|
container,
|
|
51
54
|
copied,
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const FUI_CSS_VARIABLES_THEME = {
|
|
4
|
+
name: "css-variables",
|
|
5
|
+
type: "dark",
|
|
6
|
+
colors: {
|
|
7
|
+
"editor.foreground": "var(--fui-code-text)",
|
|
8
|
+
"editor.background": "var(--fui-code-bg)"
|
|
9
|
+
},
|
|
10
|
+
tokenColors: [
|
|
11
|
+
{ settings: { foreground: "var(--fui-code-text)" } },
|
|
12
|
+
{
|
|
13
|
+
scope: [
|
|
14
|
+
"comment",
|
|
15
|
+
"punctuation.definition.comment",
|
|
16
|
+
"string.comment",
|
|
17
|
+
"string.quoted.docstring.multi"
|
|
18
|
+
],
|
|
19
|
+
settings: { foreground: "var(--fui-code-token-comment)" }
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
scope: [
|
|
23
|
+
"keyword",
|
|
24
|
+
"keyword.control",
|
|
25
|
+
"keyword.other",
|
|
26
|
+
"storage",
|
|
27
|
+
"storage.type",
|
|
28
|
+
"storage.modifier",
|
|
29
|
+
"storage.control.clojure"
|
|
30
|
+
],
|
|
31
|
+
settings: { foreground: "var(--fui-code-token-keyword)" }
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
scope: [
|
|
35
|
+
"string",
|
|
36
|
+
"string.quoted",
|
|
37
|
+
"string.template",
|
|
38
|
+
"string.interpolated",
|
|
39
|
+
"string.regexp",
|
|
40
|
+
"string.unquoted.plain.out.yaml",
|
|
41
|
+
"markup.inline"
|
|
42
|
+
],
|
|
43
|
+
settings: { foreground: "var(--fui-code-token-string)" }
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
scope: [
|
|
47
|
+
"constant.numeric",
|
|
48
|
+
"constant.language",
|
|
49
|
+
"constant.other",
|
|
50
|
+
"constant.character.format.placeholder",
|
|
51
|
+
"constant.other.placeholder"
|
|
52
|
+
],
|
|
53
|
+
settings: { foreground: "var(--fui-code-token-number)" }
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
scope: [
|
|
57
|
+
"entity.name.function",
|
|
58
|
+
"support.function",
|
|
59
|
+
"meta.function-call",
|
|
60
|
+
"meta.instance.constructor",
|
|
61
|
+
"entity.other.attribute-name",
|
|
62
|
+
"entity.name.tag",
|
|
63
|
+
"support.class.component",
|
|
64
|
+
"meta.tag"
|
|
65
|
+
],
|
|
66
|
+
settings: { foreground: "var(--fui-code-token-function)" }
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
scope: [
|
|
70
|
+
"punctuation",
|
|
71
|
+
"punctuation.separator",
|
|
72
|
+
"punctuation.definition.arguments",
|
|
73
|
+
"punctuation.definition.dict",
|
|
74
|
+
"punctuation.definition.string",
|
|
75
|
+
"punctuation.definition.template-expression",
|
|
76
|
+
"meta.brace",
|
|
77
|
+
"keyword.operator",
|
|
78
|
+
"keyword.operator.accessor"
|
|
79
|
+
],
|
|
80
|
+
settings: { foreground: "var(--fui-code-token-punctuation)" }
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
scope: [
|
|
84
|
+
"variable",
|
|
85
|
+
"variable.other",
|
|
86
|
+
"variable.parameter",
|
|
87
|
+
"variable.language",
|
|
88
|
+
"entity.name",
|
|
89
|
+
"support.variable",
|
|
90
|
+
"support.type",
|
|
91
|
+
"meta.property-name",
|
|
92
|
+
"meta.property-value"
|
|
93
|
+
],
|
|
94
|
+
settings: { foreground: "var(--fui-code-token-variable)" }
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
};
|
|
98
|
+
exports.FUI_CSS_VARIABLES_THEME = FUI_CSS_VARIABLES_THEME;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shiki theme whose token colors are CSS variables from the kit palette.
|
|
3
|
+
*
|
|
4
|
+
* Bundled shiki themes (including the old `css-variables` theme) were removed
|
|
5
|
+
* from shiki 3; this object is the replacement. `codeToHtml` accepts it as the
|
|
6
|
+
* `theme` option and writes `color: var(--fui-code-token-*)` onto spans.
|
|
7
|
+
*/
|
|
8
|
+
export declare const FUI_CSS_VARIABLES_THEME: {
|
|
9
|
+
name: string;
|
|
10
|
+
type: "dark";
|
|
11
|
+
colors: {
|
|
12
|
+
"editor.foreground": string;
|
|
13
|
+
"editor.background": string;
|
|
14
|
+
};
|
|
15
|
+
tokenColors: ({
|
|
16
|
+
settings: {
|
|
17
|
+
foreground: string;
|
|
18
|
+
};
|
|
19
|
+
scope?: undefined;
|
|
20
|
+
} | {
|
|
21
|
+
scope: string[];
|
|
22
|
+
settings: {
|
|
23
|
+
foreground: string;
|
|
24
|
+
};
|
|
25
|
+
})[];
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=css-variables-theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css-variables-theme.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlock/css-variables-theme.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;CA8FnC,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
const FUI_CSS_VARIABLES_THEME = {
|
|
2
|
+
name: "css-variables",
|
|
3
|
+
type: "dark",
|
|
4
|
+
colors: {
|
|
5
|
+
"editor.foreground": "var(--fui-code-text)",
|
|
6
|
+
"editor.background": "var(--fui-code-bg)"
|
|
7
|
+
},
|
|
8
|
+
tokenColors: [
|
|
9
|
+
{ settings: { foreground: "var(--fui-code-text)" } },
|
|
10
|
+
{
|
|
11
|
+
scope: [
|
|
12
|
+
"comment",
|
|
13
|
+
"punctuation.definition.comment",
|
|
14
|
+
"string.comment",
|
|
15
|
+
"string.quoted.docstring.multi"
|
|
16
|
+
],
|
|
17
|
+
settings: { foreground: "var(--fui-code-token-comment)" }
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
scope: [
|
|
21
|
+
"keyword",
|
|
22
|
+
"keyword.control",
|
|
23
|
+
"keyword.other",
|
|
24
|
+
"storage",
|
|
25
|
+
"storage.type",
|
|
26
|
+
"storage.modifier",
|
|
27
|
+
"storage.control.clojure"
|
|
28
|
+
],
|
|
29
|
+
settings: { foreground: "var(--fui-code-token-keyword)" }
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
scope: [
|
|
33
|
+
"string",
|
|
34
|
+
"string.quoted",
|
|
35
|
+
"string.template",
|
|
36
|
+
"string.interpolated",
|
|
37
|
+
"string.regexp",
|
|
38
|
+
"string.unquoted.plain.out.yaml",
|
|
39
|
+
"markup.inline"
|
|
40
|
+
],
|
|
41
|
+
settings: { foreground: "var(--fui-code-token-string)" }
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
scope: [
|
|
45
|
+
"constant.numeric",
|
|
46
|
+
"constant.language",
|
|
47
|
+
"constant.other",
|
|
48
|
+
"constant.character.format.placeholder",
|
|
49
|
+
"constant.other.placeholder"
|
|
50
|
+
],
|
|
51
|
+
settings: { foreground: "var(--fui-code-token-number)" }
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
scope: [
|
|
55
|
+
"entity.name.function",
|
|
56
|
+
"support.function",
|
|
57
|
+
"meta.function-call",
|
|
58
|
+
"meta.instance.constructor",
|
|
59
|
+
"entity.other.attribute-name",
|
|
60
|
+
"entity.name.tag",
|
|
61
|
+
"support.class.component",
|
|
62
|
+
"meta.tag"
|
|
63
|
+
],
|
|
64
|
+
settings: { foreground: "var(--fui-code-token-function)" }
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
scope: [
|
|
68
|
+
"punctuation",
|
|
69
|
+
"punctuation.separator",
|
|
70
|
+
"punctuation.definition.arguments",
|
|
71
|
+
"punctuation.definition.dict",
|
|
72
|
+
"punctuation.definition.string",
|
|
73
|
+
"punctuation.definition.template-expression",
|
|
74
|
+
"meta.brace",
|
|
75
|
+
"keyword.operator",
|
|
76
|
+
"keyword.operator.accessor"
|
|
77
|
+
],
|
|
78
|
+
settings: { foreground: "var(--fui-code-token-punctuation)" }
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
scope: [
|
|
82
|
+
"variable",
|
|
83
|
+
"variable.other",
|
|
84
|
+
"variable.parameter",
|
|
85
|
+
"variable.language",
|
|
86
|
+
"entity.name",
|
|
87
|
+
"support.variable",
|
|
88
|
+
"support.type",
|
|
89
|
+
"meta.property-name",
|
|
90
|
+
"meta.property-value"
|
|
91
|
+
],
|
|
92
|
+
settings: { foreground: "var(--fui-code-token-variable)" }
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
};
|
|
96
|
+
export {
|
|
97
|
+
FUI_CSS_VARIABLES_THEME
|
|
98
|
+
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { type TabsVariant } from "../Tabs";
|
|
2
3
|
export type CodeBlockLanguage = "tsx" | "typescript" | "ts" | "javascript" | "js" | "jsx" | "bash" | "shell" | "css" | "scss" | "sass" | "json" | "html" | "xml" | "markdown" | "md" | "yaml" | "yml" | "python" | "py" | "ruby" | "go" | "rust" | "java" | "kotlin" | "swift" | "c" | "cpp" | "csharp" | "php" | "sql" | "graphql" | "diff" | "plaintext" | "text";
|
|
3
4
|
/** Available syntax highlighting themes */
|
|
4
|
-
export type CodeBlockTheme = "synthwave-84" | "github-dark" | "github-light" | "one-dark-pro" | "dracula" | "nord" | "monokai" | "vitesse-dark" | "vitesse-light" | "min-dark" | "min-light";
|
|
5
|
+
export type CodeBlockTheme = "css-variables" | "synthwave-84" | "github-dark" | "github-light" | "one-dark-pro" | "dracula" | "nord" | "monokai" | "vitesse-dark" | "vitesse-light" | "min-dark" | "min-light";
|
|
5
6
|
export type CodeBlockCopyPlacement = "auto" | "header" | "overlay";
|
|
6
7
|
export interface CodeBlockProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
8
|
/** Code string to display */
|
|
8
9
|
code: string;
|
|
9
10
|
/** Programming language for syntax highlighting */
|
|
10
11
|
language?: CodeBlockLanguage;
|
|
11
|
-
/** Syntax highlighting theme */
|
|
12
|
+
/** Syntax highlighting theme. Default follows `--fui-code-token-*` via shiki css-variables. */
|
|
12
13
|
theme?: CodeBlockTheme;
|
|
13
14
|
/** Show copy button */
|
|
14
15
|
showCopy?: boolean;
|
|
@@ -38,6 +39,12 @@ export interface CodeBlockProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
38
39
|
defaultCollapsed?: boolean;
|
|
39
40
|
/** Number of lines to show when collapsed */
|
|
40
41
|
collapsedLines?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Collapse control copy. `lines` keeps “Show N more lines” / “Show less”
|
|
44
|
+
* (docs prose). `expand` is one right-aligned Expand / Collapse control
|
|
45
|
+
* for preview+code capsules.
|
|
46
|
+
*/
|
|
47
|
+
collapseAction?: "lines" | "expand";
|
|
41
48
|
/** Compact mode with reduced padding */
|
|
42
49
|
compact?: boolean;
|
|
43
50
|
/** Show a persistent copy button (always visible, uses Button component) */
|
|
@@ -76,18 +83,26 @@ export interface TabbedCodeBlockProps {
|
|
|
76
83
|
showLineNumbers?: boolean;
|
|
77
84
|
/** Syntax highlighting theme (applies to all tabs) */
|
|
78
85
|
theme?: CodeBlockTheme;
|
|
79
|
-
/** Tab list
|
|
80
|
-
tabsVariant?:
|
|
86
|
+
/** Tab list chrome: `soft` (default) is the filled rail, `ghost` the underline strip. */
|
|
87
|
+
tabsVariant?: TabsVariant;
|
|
81
88
|
/** Enable word wrapping for long lines */
|
|
82
89
|
wordWrap?: boolean;
|
|
83
90
|
/** Maximum height in pixels (enables scrolling) */
|
|
84
91
|
maxHeight?: number;
|
|
92
|
+
/** Allow collapsing/expanding each tab's code (forwarded to every panel) */
|
|
93
|
+
collapsible?: boolean;
|
|
94
|
+
/** Initial collapsed state (only applies when collapsible is true) */
|
|
95
|
+
defaultCollapsed?: boolean;
|
|
96
|
+
/** Number of lines to show when collapsed */
|
|
97
|
+
collapsedLines?: number;
|
|
98
|
+
/** Forwarded to every panel (see CodeBlock `collapseAction`) */
|
|
99
|
+
collapseAction?: "lines" | "expand";
|
|
85
100
|
/** Additional class name */
|
|
86
101
|
className?: string;
|
|
87
102
|
/** Callback fired when a tab's copy button is clicked. Receives the tab label. */
|
|
88
103
|
onCopy?: (tabLabel: string) => void;
|
|
89
104
|
}
|
|
90
|
-
declare function TabbedCodeBlock({ tabs, defaultTab, value, onValueChange, showCopy, copyPlacement, showLineNumbers, theme, tabsVariant, wordWrap, maxHeight, className, onCopy, }: TabbedCodeBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
105
|
+
declare function TabbedCodeBlock({ tabs, defaultTab, value, onValueChange, showCopy, copyPlacement, showLineNumbers, theme, tabsVariant, wordWrap, maxHeight, collapsible, defaultCollapsed, collapsedLines, collapseAction, className, onCopy, }: TabbedCodeBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
91
106
|
export declare const CodeBlock: React.ForwardRefExoticComponent<CodeBlockProps & React.RefAttributes<HTMLDivElement>> & {
|
|
92
107
|
Tabbed: typeof TabbedCodeBlock;
|
|
93
108
|
};
|