@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
package/dist/datepicker.cjs
CHANGED
|
@@ -30,6 +30,7 @@ const aria = require("./utils/aria.cjs");
|
|
|
30
30
|
const popup = require("./recipes/popup.cjs");
|
|
31
31
|
const index = require("./components/ComponentDefaults/index.cjs");
|
|
32
32
|
const DatePicker_module = require("./components/DatePicker/DatePicker.module.scss.cjs");
|
|
33
|
+
const env = require("./utils/env.cjs");
|
|
33
34
|
function _interopNamespaceDefault(e) {
|
|
34
35
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
35
36
|
if (e) {
|
|
@@ -156,7 +157,7 @@ function loadDayPickerDeps() {
|
|
|
156
157
|
_DayFlag = rdp.DayFlag;
|
|
157
158
|
} catch {
|
|
158
159
|
_rdpFailed = true;
|
|
159
|
-
if (
|
|
160
|
+
if (env.isDevelopmentBuild()) {
|
|
160
161
|
console.warn(
|
|
161
162
|
"[@usefragments/ui] DatePicker: react-day-picker is not installed. Install it with: npm install react-day-picker"
|
|
162
163
|
);
|
|
@@ -291,6 +292,11 @@ const DatePickerRoot = React__namespace.forwardRef(function DatePickerRoot2({
|
|
|
291
292
|
[selectedRangeProp, onRangeSelect]
|
|
292
293
|
);
|
|
293
294
|
const defaultPlaceholder = mode === "range" ? "Select date range" : "Pick a date";
|
|
295
|
+
const { labelId, helperId, errorId, hasError, errorMessage } = aria.useFormFieldIds("datepicker", {
|
|
296
|
+
label,
|
|
297
|
+
helperText,
|
|
298
|
+
error
|
|
299
|
+
});
|
|
294
300
|
const contextValue = React__namespace.useMemo(
|
|
295
301
|
() => ({
|
|
296
302
|
mode,
|
|
@@ -310,7 +316,8 @@ const DatePickerRoot = React__namespace.forwardRef(function DatePickerRoot2({
|
|
|
310
316
|
setIsOpen: handleOpenChange,
|
|
311
317
|
isControlledOpen,
|
|
312
318
|
size,
|
|
313
|
-
name
|
|
319
|
+
name,
|
|
320
|
+
invalid: hasError
|
|
314
321
|
}),
|
|
315
322
|
[
|
|
316
323
|
mode,
|
|
@@ -333,18 +340,14 @@ const DatePickerRoot = React__namespace.forwardRef(function DatePickerRoot2({
|
|
|
333
340
|
handleOpenChange,
|
|
334
341
|
isControlledOpen,
|
|
335
342
|
size,
|
|
336
|
-
name
|
|
343
|
+
name,
|
|
344
|
+
hasError
|
|
337
345
|
]
|
|
338
346
|
);
|
|
339
|
-
const { labelId, helperId, errorId, hasError, errorMessage } = aria.useFormFieldIds("datepicker", {
|
|
340
|
-
label,
|
|
341
|
-
helperText,
|
|
342
|
-
error
|
|
343
|
-
});
|
|
344
347
|
const wrapperClasses = [DatePicker_module.default.wrapper, className].filter(Boolean).join(" ");
|
|
345
348
|
const helperClasses = [DatePicker_module.default.helper, hasError && DatePicker_module.default.helperError].filter(Boolean).join(" ");
|
|
346
349
|
return /* @__PURE__ */ jsxRuntime.jsxs(DatePickerContext.Provider, { value: contextValue, children: [
|
|
347
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: wrapperClasses, children: [
|
|
350
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: wrapperClasses, "data-invalid": hasError || void 0, children: [
|
|
348
351
|
label && /* @__PURE__ */ jsxRuntime.jsx("span", { id: labelId, className: DatePicker_module.default.label, children: label }),
|
|
349
352
|
/* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Root, { open: isOpen, onOpenChange: handleOpenChange, children }),
|
|
350
353
|
helperText && /* @__PURE__ */ jsxRuntime.jsx("span", { id: helperId, className: helperClasses, children: helperText }),
|
|
@@ -382,10 +385,20 @@ function DatePickerTrigger({
|
|
|
382
385
|
} else if (ctx.mode === "range" && ((_a = ctx.selectedRange) == null ? void 0 : _a.from)) {
|
|
383
386
|
displayText = ctx.formatRange(ctx.selectedRange);
|
|
384
387
|
}
|
|
385
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
388
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
389
|
+
popover.Popover.Trigger,
|
|
390
|
+
{
|
|
391
|
+
...htmlProps,
|
|
392
|
+
type,
|
|
393
|
+
className: classes,
|
|
394
|
+
disabled: ctx.disabled,
|
|
395
|
+
"aria-invalid": ctx.invalid || void 0,
|
|
396
|
+
children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
397
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: DatePicker_module.default.triggerIcon, children: /* @__PURE__ */ jsxRuntime.jsx(CalendarIcon, {}) }),
|
|
398
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: displayText ? DatePicker_module.default.triggerValue : DatePicker_module.default.triggerPlaceholder, children: displayText ?? placeholderText })
|
|
399
|
+
] })
|
|
400
|
+
}
|
|
401
|
+
);
|
|
389
402
|
}
|
|
390
403
|
function DatePickerContent({
|
|
391
404
|
children,
|
package/dist/datepicker.js
CHANGED
|
@@ -6,6 +6,7 @@ import { useFormFieldIds } from "./utils/aria.js";
|
|
|
6
6
|
import { POPUP_OFFSET_PX } from "./recipes/popup.js";
|
|
7
7
|
import { useResolvedControlSize } from "./components/ComponentDefaults/index.js";
|
|
8
8
|
import styles from "./components/DatePicker/DatePicker.module.scss.js";
|
|
9
|
+
import { isDevelopmentBuild } from "./utils/env.js";
|
|
9
10
|
function CalendarIcon() {
|
|
10
11
|
return /* @__PURE__ */ jsxs(
|
|
11
12
|
"svg",
|
|
@@ -115,7 +116,7 @@ function loadDayPickerDeps() {
|
|
|
115
116
|
_DayFlag = rdp.DayFlag;
|
|
116
117
|
} catch {
|
|
117
118
|
_rdpFailed = true;
|
|
118
|
-
if (
|
|
119
|
+
if (isDevelopmentBuild()) {
|
|
119
120
|
console.warn(
|
|
120
121
|
"[@usefragments/ui] DatePicker: react-day-picker is not installed. Install it with: npm install react-day-picker"
|
|
121
122
|
);
|
|
@@ -250,6 +251,11 @@ const DatePickerRoot = React.forwardRef(function DatePickerRoot2({
|
|
|
250
251
|
[selectedRangeProp, onRangeSelect]
|
|
251
252
|
);
|
|
252
253
|
const defaultPlaceholder = mode === "range" ? "Select date range" : "Pick a date";
|
|
254
|
+
const { labelId, helperId, errorId, hasError, errorMessage } = useFormFieldIds("datepicker", {
|
|
255
|
+
label,
|
|
256
|
+
helperText,
|
|
257
|
+
error
|
|
258
|
+
});
|
|
253
259
|
const contextValue = React.useMemo(
|
|
254
260
|
() => ({
|
|
255
261
|
mode,
|
|
@@ -269,7 +275,8 @@ const DatePickerRoot = React.forwardRef(function DatePickerRoot2({
|
|
|
269
275
|
setIsOpen: handleOpenChange,
|
|
270
276
|
isControlledOpen,
|
|
271
277
|
size,
|
|
272
|
-
name
|
|
278
|
+
name,
|
|
279
|
+
invalid: hasError
|
|
273
280
|
}),
|
|
274
281
|
[
|
|
275
282
|
mode,
|
|
@@ -292,18 +299,14 @@ const DatePickerRoot = React.forwardRef(function DatePickerRoot2({
|
|
|
292
299
|
handleOpenChange,
|
|
293
300
|
isControlledOpen,
|
|
294
301
|
size,
|
|
295
|
-
name
|
|
302
|
+
name,
|
|
303
|
+
hasError
|
|
296
304
|
]
|
|
297
305
|
);
|
|
298
|
-
const { labelId, helperId, errorId, hasError, errorMessage } = useFormFieldIds("datepicker", {
|
|
299
|
-
label,
|
|
300
|
-
helperText,
|
|
301
|
-
error
|
|
302
|
-
});
|
|
303
306
|
const wrapperClasses = [styles.wrapper, className].filter(Boolean).join(" ");
|
|
304
307
|
const helperClasses = [styles.helper, hasError && styles.helperError].filter(Boolean).join(" ");
|
|
305
308
|
return /* @__PURE__ */ jsxs(DatePickerContext.Provider, { value: contextValue, children: [
|
|
306
|
-
/* @__PURE__ */ jsxs("div", { ref, className: wrapperClasses, children: [
|
|
309
|
+
/* @__PURE__ */ jsxs("div", { ref, className: wrapperClasses, "data-invalid": hasError || void 0, children: [
|
|
307
310
|
label && /* @__PURE__ */ jsx("span", { id: labelId, className: styles.label, children: label }),
|
|
308
311
|
/* @__PURE__ */ jsx(Popover.Root, { open: isOpen, onOpenChange: handleOpenChange, children }),
|
|
309
312
|
helperText && /* @__PURE__ */ jsx("span", { id: helperId, className: helperClasses, children: helperText }),
|
|
@@ -341,10 +344,20 @@ function DatePickerTrigger({
|
|
|
341
344
|
} else if (ctx.mode === "range" && ((_a = ctx.selectedRange) == null ? void 0 : _a.from)) {
|
|
342
345
|
displayText = ctx.formatRange(ctx.selectedRange);
|
|
343
346
|
}
|
|
344
|
-
return /* @__PURE__ */ jsx(
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
347
|
+
return /* @__PURE__ */ jsx(
|
|
348
|
+
Popover.Trigger,
|
|
349
|
+
{
|
|
350
|
+
...htmlProps,
|
|
351
|
+
type,
|
|
352
|
+
className: classes,
|
|
353
|
+
disabled: ctx.disabled,
|
|
354
|
+
"aria-invalid": ctx.invalid || void 0,
|
|
355
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
356
|
+
/* @__PURE__ */ jsx("span", { className: styles.triggerIcon, children: /* @__PURE__ */ jsx(CalendarIcon, {}) }),
|
|
357
|
+
/* @__PURE__ */ jsx("span", { className: displayText ? styles.triggerValue : styles.triggerPlaceholder, children: displayText ?? placeholderText })
|
|
358
|
+
] })
|
|
359
|
+
}
|
|
360
|
+
);
|
|
348
361
|
}
|
|
349
362
|
function DatePickerContent({
|
|
350
363
|
children,
|
package/dist/editor.cjs
CHANGED
|
@@ -28,6 +28,7 @@ const React = require("react");
|
|
|
28
28
|
const Editor_module = require("./components/Editor/Editor.module.scss.cjs");
|
|
29
29
|
const react = require("@phosphor-icons/react");
|
|
30
30
|
const keyboardShortcuts = require("./utils/keyboard-shortcuts.cjs");
|
|
31
|
+
const env = require("./utils/env.cjs");
|
|
31
32
|
function _interopNamespaceDefault(e) {
|
|
32
33
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
33
34
|
if (e) {
|
|
@@ -66,7 +67,7 @@ function loadTipTapDeps() {
|
|
|
66
67
|
_LinkExtension = linkExt.default ?? linkExt.Link ?? linkExt;
|
|
67
68
|
} catch {
|
|
68
69
|
_tiptapFailed = true;
|
|
69
|
-
if (
|
|
70
|
+
if (env.isDevelopmentBuild()) {
|
|
70
71
|
console.warn(
|
|
71
72
|
"[@usefragments/ui] Editor: TipTap is not installed; falling back to markdown mode. Install it with: npm install @tiptap/react @tiptap/starter-kit @tiptap/extension-link"
|
|
72
73
|
);
|
|
@@ -93,19 +94,58 @@ function useTipTapDeps() {
|
|
|
93
94
|
const FORMAT_META = {
|
|
94
95
|
bold: { icon: react.TextB, label: "Bold", shortcut: keyboardShortcuts.KEYBOARD_SHORTCUTS.EDITOR_BOLD.label },
|
|
95
96
|
italic: { icon: react.TextItalic, label: "Italic", shortcut: keyboardShortcuts.KEYBOARD_SHORTCUTS.EDITOR_ITALIC.label },
|
|
96
|
-
strikethrough: {
|
|
97
|
+
strikethrough: {
|
|
98
|
+
icon: react.TextStrikethrough,
|
|
99
|
+
label: "Strikethrough",
|
|
100
|
+
shortcut: keyboardShortcuts.KEYBOARD_SHORTCUTS.EDITOR_STRIKETHROUGH.label
|
|
101
|
+
},
|
|
97
102
|
link: { icon: react.LinkSimple, label: "Link", shortcut: keyboardShortcuts.KEYBOARD_SHORTCUTS.EDITOR_LINK.label },
|
|
98
103
|
code: { icon: react.Code, label: "Code", shortcut: keyboardShortcuts.KEYBOARD_SHORTCUTS.EDITOR_CODE.label },
|
|
99
|
-
bulletList: {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
bulletList: {
|
|
105
|
+
icon: react.ListBullets,
|
|
106
|
+
label: "Bullet list",
|
|
107
|
+
shortcut: keyboardShortcuts.KEYBOARD_SHORTCUTS.EDITOR_BULLET_LIST.label
|
|
108
|
+
},
|
|
109
|
+
orderedList: {
|
|
110
|
+
icon: react.ListNumbers,
|
|
111
|
+
label: "Ordered list",
|
|
112
|
+
shortcut: keyboardShortcuts.KEYBOARD_SHORTCUTS.EDITOR_ORDERED_LIST.label
|
|
113
|
+
},
|
|
114
|
+
heading1: {
|
|
115
|
+
icon: react.TextHOne,
|
|
116
|
+
label: "Heading 1",
|
|
117
|
+
shortcut: keyboardShortcuts.KEYBOARD_SHORTCUTS.EDITOR_HEADING1.label
|
|
118
|
+
},
|
|
119
|
+
heading2: {
|
|
120
|
+
icon: react.TextHTwo,
|
|
121
|
+
label: "Heading 2",
|
|
122
|
+
shortcut: keyboardShortcuts.KEYBOARD_SHORTCUTS.EDITOR_HEADING2.label
|
|
123
|
+
},
|
|
124
|
+
heading3: {
|
|
125
|
+
icon: react.TextHThree,
|
|
126
|
+
label: "Heading 3",
|
|
127
|
+
shortcut: keyboardShortcuts.KEYBOARD_SHORTCUTS.EDITOR_HEADING3.label
|
|
128
|
+
},
|
|
129
|
+
blockquote: {
|
|
130
|
+
icon: react.Quotes,
|
|
131
|
+
label: "Blockquote",
|
|
132
|
+
shortcut: keyboardShortcuts.KEYBOARD_SHORTCUTS.EDITOR_BLOCKQUOTE.label
|
|
133
|
+
},
|
|
134
|
+
undo: {
|
|
135
|
+
icon: react.ArrowCounterClockwise,
|
|
136
|
+
label: "Undo",
|
|
137
|
+
shortcut: keyboardShortcuts.KEYBOARD_SHORTCUTS.EDITOR_UNDO.label
|
|
138
|
+
},
|
|
106
139
|
redo: { icon: react.ArrowClockwise, label: "Redo", shortcut: keyboardShortcuts.KEYBOARD_SHORTCUTS.EDITOR_REDO.label }
|
|
107
140
|
};
|
|
108
|
-
const DEFAULT_FORMATS = [
|
|
141
|
+
const DEFAULT_FORMATS = [
|
|
142
|
+
"bold",
|
|
143
|
+
"italic",
|
|
144
|
+
"strikethrough",
|
|
145
|
+
"link",
|
|
146
|
+
"code",
|
|
147
|
+
"bulletList"
|
|
148
|
+
];
|
|
109
149
|
const ACTION_FORMATS = /* @__PURE__ */ new Set(["undo", "redo"]);
|
|
110
150
|
const DEFAULT_STATUS_LABELS = {
|
|
111
151
|
idle: "",
|
|
@@ -256,11 +296,7 @@ function EditorImpl({
|
|
|
256
296
|
...htmlProps
|
|
257
297
|
}) {
|
|
258
298
|
const contentRef = React__namespace.useRef(null);
|
|
259
|
-
const [value, setValue] = useControllableState(
|
|
260
|
-
controlledValue,
|
|
261
|
-
defaultValue,
|
|
262
|
-
onValueChange
|
|
263
|
-
);
|
|
299
|
+
const [value, setValue] = useControllableState(controlledValue, defaultValue, onValueChange);
|
|
264
300
|
const [saveStatus, setSaveStatus] = React__namespace.useState("idle");
|
|
265
301
|
const mode = hasTipTap ? "rich" : "markdown";
|
|
266
302
|
const tiptapEditor = hasTipTap ? (
|
|
@@ -492,7 +528,11 @@ function EditorToolbar({ children, className }) {
|
|
|
492
528
|
const classes = [Editor_module.default.toolbar, className].filter(Boolean).join(" ");
|
|
493
529
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, role: "toolbar", "aria-label": "Editor formatting", children });
|
|
494
530
|
}
|
|
495
|
-
function EditorToolbarGroup({
|
|
531
|
+
function EditorToolbarGroup({
|
|
532
|
+
children,
|
|
533
|
+
"aria-label": ariaLabel,
|
|
534
|
+
className
|
|
535
|
+
}) {
|
|
496
536
|
const classes = [Editor_module.default.toolbarGroup, className].filter(Boolean).join(" ");
|
|
497
537
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, role: "group", "aria-label": ariaLabel, children });
|
|
498
538
|
}
|
|
@@ -520,11 +560,7 @@ function EditorToolbarButton({ format, className }) {
|
|
|
520
560
|
};
|
|
521
561
|
const iconOverride = toolbarIcons == null ? void 0 : toolbarIcons[format];
|
|
522
562
|
const renderedOverride = typeof iconOverride === "function" ? iconOverride(iconState) : iconOverride;
|
|
523
|
-
const classes = [
|
|
524
|
-
Editor_module.default.toolbarButton,
|
|
525
|
-
active && Editor_module.default.toolbarButtonActive,
|
|
526
|
-
className
|
|
527
|
-
].filter(Boolean).join(" ");
|
|
563
|
+
const classes = [Editor_module.default.toolbarButton, active && Editor_module.default.toolbarButtonActive, className].filter(Boolean).join(" ");
|
|
528
564
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
529
565
|
"button",
|
|
530
566
|
{
|
|
@@ -543,17 +579,17 @@ function EditorSeparator({ className }) {
|
|
|
543
579
|
const classes = [Editor_module.default.separator, className].filter(Boolean).join(" ");
|
|
544
580
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, role: "separator", "aria-orientation": "vertical" });
|
|
545
581
|
}
|
|
546
|
-
function EditorStatusIndicator({
|
|
582
|
+
function EditorStatusIndicator({
|
|
583
|
+
status: statusOverride,
|
|
584
|
+
labels,
|
|
585
|
+
className
|
|
586
|
+
}) {
|
|
547
587
|
const { saveStatus } = useEditorContext();
|
|
548
588
|
const status = statusOverride ?? saveStatus;
|
|
549
589
|
const mergedLabels = { ...DEFAULT_STATUS_LABELS, ...labels };
|
|
550
590
|
const label = mergedLabels[status];
|
|
551
591
|
if (!label) return null;
|
|
552
|
-
const classes = [
|
|
553
|
-
Editor_module.default.statusIndicator,
|
|
554
|
-
status === "error" && Editor_module.default.statusError,
|
|
555
|
-
className
|
|
556
|
-
].filter(Boolean).join(" ");
|
|
592
|
+
const classes = [Editor_module.default.statusIndicator, status === "error" && Editor_module.default.statusError, className].filter(Boolean).join(" ");
|
|
557
593
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: classes, "aria-live": "polite", role: "status", children: label });
|
|
558
594
|
}
|
|
559
595
|
function EditorContentArea({ className }) {
|
|
@@ -578,7 +614,11 @@ function EditorContentArea({ className }) {
|
|
|
578
614
|
}
|
|
579
615
|
) });
|
|
580
616
|
}
|
|
581
|
-
function EditorStatusBar({
|
|
617
|
+
function EditorStatusBar({
|
|
618
|
+
showWordCount = true,
|
|
619
|
+
showCharCount = true,
|
|
620
|
+
className
|
|
621
|
+
}) {
|
|
582
622
|
const { wordCount, charCount, maxLength } = useEditorContext();
|
|
583
623
|
const classes = [Editor_module.default.statusBar, className].filter(Boolean).join(" ");
|
|
584
624
|
const isOverLimit = maxLength !== void 0 && charCount > maxLength;
|
package/dist/editor.js
CHANGED
|
@@ -4,6 +4,7 @@ import * as React from "react";
|
|
|
4
4
|
import styles from "./components/Editor/Editor.module.scss.js";
|
|
5
5
|
import { ArrowClockwise, ArrowCounterClockwise, Quotes, TextHThree, TextHTwo, TextHOne, ListNumbers, ListBullets, Code, LinkSimple, TextStrikethrough, TextItalic, TextB } from "@phosphor-icons/react";
|
|
6
6
|
import { KEYBOARD_SHORTCUTS } from "./utils/keyboard-shortcuts.js";
|
|
7
|
+
import { isDevelopmentBuild } from "./utils/env.js";
|
|
7
8
|
let _useEditor = null;
|
|
8
9
|
let _EditorContent = null;
|
|
9
10
|
let _StarterKit = null;
|
|
@@ -25,7 +26,7 @@ function loadTipTapDeps() {
|
|
|
25
26
|
_LinkExtension = linkExt.default ?? linkExt.Link ?? linkExt;
|
|
26
27
|
} catch {
|
|
27
28
|
_tiptapFailed = true;
|
|
28
|
-
if (
|
|
29
|
+
if (isDevelopmentBuild()) {
|
|
29
30
|
console.warn(
|
|
30
31
|
"[@usefragments/ui] Editor: TipTap is not installed; falling back to markdown mode. Install it with: npm install @tiptap/react @tiptap/starter-kit @tiptap/extension-link"
|
|
31
32
|
);
|
|
@@ -52,19 +53,58 @@ function useTipTapDeps() {
|
|
|
52
53
|
const FORMAT_META = {
|
|
53
54
|
bold: { icon: TextB, label: "Bold", shortcut: KEYBOARD_SHORTCUTS.EDITOR_BOLD.label },
|
|
54
55
|
italic: { icon: TextItalic, label: "Italic", shortcut: KEYBOARD_SHORTCUTS.EDITOR_ITALIC.label },
|
|
55
|
-
strikethrough: {
|
|
56
|
+
strikethrough: {
|
|
57
|
+
icon: TextStrikethrough,
|
|
58
|
+
label: "Strikethrough",
|
|
59
|
+
shortcut: KEYBOARD_SHORTCUTS.EDITOR_STRIKETHROUGH.label
|
|
60
|
+
},
|
|
56
61
|
link: { icon: LinkSimple, label: "Link", shortcut: KEYBOARD_SHORTCUTS.EDITOR_LINK.label },
|
|
57
62
|
code: { icon: Code, label: "Code", shortcut: KEYBOARD_SHORTCUTS.EDITOR_CODE.label },
|
|
58
|
-
bulletList: {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
bulletList: {
|
|
64
|
+
icon: ListBullets,
|
|
65
|
+
label: "Bullet list",
|
|
66
|
+
shortcut: KEYBOARD_SHORTCUTS.EDITOR_BULLET_LIST.label
|
|
67
|
+
},
|
|
68
|
+
orderedList: {
|
|
69
|
+
icon: ListNumbers,
|
|
70
|
+
label: "Ordered list",
|
|
71
|
+
shortcut: KEYBOARD_SHORTCUTS.EDITOR_ORDERED_LIST.label
|
|
72
|
+
},
|
|
73
|
+
heading1: {
|
|
74
|
+
icon: TextHOne,
|
|
75
|
+
label: "Heading 1",
|
|
76
|
+
shortcut: KEYBOARD_SHORTCUTS.EDITOR_HEADING1.label
|
|
77
|
+
},
|
|
78
|
+
heading2: {
|
|
79
|
+
icon: TextHTwo,
|
|
80
|
+
label: "Heading 2",
|
|
81
|
+
shortcut: KEYBOARD_SHORTCUTS.EDITOR_HEADING2.label
|
|
82
|
+
},
|
|
83
|
+
heading3: {
|
|
84
|
+
icon: TextHThree,
|
|
85
|
+
label: "Heading 3",
|
|
86
|
+
shortcut: KEYBOARD_SHORTCUTS.EDITOR_HEADING3.label
|
|
87
|
+
},
|
|
88
|
+
blockquote: {
|
|
89
|
+
icon: Quotes,
|
|
90
|
+
label: "Blockquote",
|
|
91
|
+
shortcut: KEYBOARD_SHORTCUTS.EDITOR_BLOCKQUOTE.label
|
|
92
|
+
},
|
|
93
|
+
undo: {
|
|
94
|
+
icon: ArrowCounterClockwise,
|
|
95
|
+
label: "Undo",
|
|
96
|
+
shortcut: KEYBOARD_SHORTCUTS.EDITOR_UNDO.label
|
|
97
|
+
},
|
|
65
98
|
redo: { icon: ArrowClockwise, label: "Redo", shortcut: KEYBOARD_SHORTCUTS.EDITOR_REDO.label }
|
|
66
99
|
};
|
|
67
|
-
const DEFAULT_FORMATS = [
|
|
100
|
+
const DEFAULT_FORMATS = [
|
|
101
|
+
"bold",
|
|
102
|
+
"italic",
|
|
103
|
+
"strikethrough",
|
|
104
|
+
"link",
|
|
105
|
+
"code",
|
|
106
|
+
"bulletList"
|
|
107
|
+
];
|
|
68
108
|
const ACTION_FORMATS = /* @__PURE__ */ new Set(["undo", "redo"]);
|
|
69
109
|
const DEFAULT_STATUS_LABELS = {
|
|
70
110
|
idle: "",
|
|
@@ -215,11 +255,7 @@ function EditorImpl({
|
|
|
215
255
|
...htmlProps
|
|
216
256
|
}) {
|
|
217
257
|
const contentRef = React.useRef(null);
|
|
218
|
-
const [value, setValue] = useControllableState(
|
|
219
|
-
controlledValue,
|
|
220
|
-
defaultValue,
|
|
221
|
-
onValueChange
|
|
222
|
-
);
|
|
258
|
+
const [value, setValue] = useControllableState(controlledValue, defaultValue, onValueChange);
|
|
223
259
|
const [saveStatus, setSaveStatus] = React.useState("idle");
|
|
224
260
|
const mode = hasTipTap ? "rich" : "markdown";
|
|
225
261
|
const tiptapEditor = hasTipTap ? (
|
|
@@ -451,7 +487,11 @@ function EditorToolbar({ children, className }) {
|
|
|
451
487
|
const classes = [styles.toolbar, className].filter(Boolean).join(" ");
|
|
452
488
|
return /* @__PURE__ */ jsx("div", { className: classes, role: "toolbar", "aria-label": "Editor formatting", children });
|
|
453
489
|
}
|
|
454
|
-
function EditorToolbarGroup({
|
|
490
|
+
function EditorToolbarGroup({
|
|
491
|
+
children,
|
|
492
|
+
"aria-label": ariaLabel,
|
|
493
|
+
className
|
|
494
|
+
}) {
|
|
455
495
|
const classes = [styles.toolbarGroup, className].filter(Boolean).join(" ");
|
|
456
496
|
return /* @__PURE__ */ jsx("div", { className: classes, role: "group", "aria-label": ariaLabel, children });
|
|
457
497
|
}
|
|
@@ -479,11 +519,7 @@ function EditorToolbarButton({ format, className }) {
|
|
|
479
519
|
};
|
|
480
520
|
const iconOverride = toolbarIcons == null ? void 0 : toolbarIcons[format];
|
|
481
521
|
const renderedOverride = typeof iconOverride === "function" ? iconOverride(iconState) : iconOverride;
|
|
482
|
-
const classes = [
|
|
483
|
-
styles.toolbarButton,
|
|
484
|
-
active && styles.toolbarButtonActive,
|
|
485
|
-
className
|
|
486
|
-
].filter(Boolean).join(" ");
|
|
522
|
+
const classes = [styles.toolbarButton, active && styles.toolbarButtonActive, className].filter(Boolean).join(" ");
|
|
487
523
|
return /* @__PURE__ */ jsx(
|
|
488
524
|
"button",
|
|
489
525
|
{
|
|
@@ -502,17 +538,17 @@ function EditorSeparator({ className }) {
|
|
|
502
538
|
const classes = [styles.separator, className].filter(Boolean).join(" ");
|
|
503
539
|
return /* @__PURE__ */ jsx("div", { className: classes, role: "separator", "aria-orientation": "vertical" });
|
|
504
540
|
}
|
|
505
|
-
function EditorStatusIndicator({
|
|
541
|
+
function EditorStatusIndicator({
|
|
542
|
+
status: statusOverride,
|
|
543
|
+
labels,
|
|
544
|
+
className
|
|
545
|
+
}) {
|
|
506
546
|
const { saveStatus } = useEditorContext();
|
|
507
547
|
const status = statusOverride ?? saveStatus;
|
|
508
548
|
const mergedLabels = { ...DEFAULT_STATUS_LABELS, ...labels };
|
|
509
549
|
const label = mergedLabels[status];
|
|
510
550
|
if (!label) return null;
|
|
511
|
-
const classes = [
|
|
512
|
-
styles.statusIndicator,
|
|
513
|
-
status === "error" && styles.statusError,
|
|
514
|
-
className
|
|
515
|
-
].filter(Boolean).join(" ");
|
|
551
|
+
const classes = [styles.statusIndicator, status === "error" && styles.statusError, className].filter(Boolean).join(" ");
|
|
516
552
|
return /* @__PURE__ */ jsx("span", { className: classes, "aria-live": "polite", role: "status", children: label });
|
|
517
553
|
}
|
|
518
554
|
function EditorContentArea({ className }) {
|
|
@@ -537,7 +573,11 @@ function EditorContentArea({ className }) {
|
|
|
537
573
|
}
|
|
538
574
|
) });
|
|
539
575
|
}
|
|
540
|
-
function EditorStatusBar({
|
|
576
|
+
function EditorStatusBar({
|
|
577
|
+
showWordCount = true,
|
|
578
|
+
showCharCount = true,
|
|
579
|
+
className
|
|
580
|
+
}) {
|
|
541
581
|
const { wordCount, charCount, maxLength } = useEditorContext();
|
|
542
582
|
const classes = [styles.statusBar, className].filter(Boolean).join(" ");
|
|
543
583
|
const isOverLimit = maxLength !== void 0 && charCount > maxLength;
|
package/dist/index.cjs
CHANGED
|
@@ -67,6 +67,7 @@ const index$V = require("./components/ThinkingIndicator/index.cjs");
|
|
|
67
67
|
const chart = require("./chart.cjs");
|
|
68
68
|
const fragmentsLogo = require("./assets/fragments-logo.cjs");
|
|
69
69
|
const fragmentsWordmark = require("./assets/fragments-wordmark.cjs");
|
|
70
|
+
const navGlyph = require("./assets/nav-glyph.cjs");
|
|
70
71
|
const index$W = require("./components/NavigationMenu/index.cjs");
|
|
71
72
|
const index$X = require("./components/Drawer/index.cjs");
|
|
72
73
|
const index$Y = require("./components/Pagination/index.cjs");
|
|
@@ -77,6 +78,7 @@ const keyboardShortcuts = require("./utils/keyboard-shortcuts.cjs");
|
|
|
77
78
|
const seedDerivation = require("./utils/seed-derivation.cjs");
|
|
78
79
|
const themePresets = require("./utils/theme-presets.cjs");
|
|
79
80
|
const index$y = require("./components/ThemeToggle/index.cjs");
|
|
81
|
+
const ThemeButton = require("./components/ThemeToggle/ThemeButton.cjs");
|
|
80
82
|
const context = require("./components/Theme/context.cjs");
|
|
81
83
|
if (typeof window !== "undefined") {
|
|
82
84
|
cssWarning.checkCssLoaded();
|
|
@@ -92,7 +94,6 @@ exports.CardHeader = index$3.CardHeader;
|
|
|
92
94
|
exports.CardRoot = index$3.CardRoot;
|
|
93
95
|
exports.CardTitle = index$3.CardTitle;
|
|
94
96
|
exports.Switch = index$4.Switch;
|
|
95
|
-
exports.Toggle = index$4.Switch;
|
|
96
97
|
exports.Alert = index$5.Alert;
|
|
97
98
|
exports.AlertAction = index$5.AlertAction;
|
|
98
99
|
exports.AlertActions = index$5.AlertActions;
|
|
@@ -228,6 +229,8 @@ exports.useChartConfig = chart.useChartConfig;
|
|
|
228
229
|
exports.FragmentsLogo = fragmentsLogo.FragmentsLogo;
|
|
229
230
|
exports.fragmentsLogoSvg = fragmentsLogo.fragmentsLogoSvg;
|
|
230
231
|
exports.FragmentsWordmark = fragmentsWordmark.FragmentsWordmark;
|
|
232
|
+
exports.NAV_GLYPH_NAMES = navGlyph.NAV_GLYPH_NAMES;
|
|
233
|
+
exports.NavGlyph = navGlyph.NavGlyph;
|
|
231
234
|
exports.NavigationMenu = index$W.NavigationMenu;
|
|
232
235
|
exports.NavigationMenuContent = index$W.NavigationMenuContent;
|
|
233
236
|
exports.NavigationMenuIndicator = index$W.NavigationMenuIndicator;
|
|
@@ -252,7 +255,7 @@ exports.EditorToolbar = editor.EditorToolbar;
|
|
|
252
255
|
exports.EditorToolbarButton = editor.EditorToolbarButton;
|
|
253
256
|
exports.EditorToolbarGroup = editor.EditorToolbarGroup;
|
|
254
257
|
exports.useEditorContext = editor.useEditorContext;
|
|
255
|
-
exports.A11yVisuallyHidden = a11y.
|
|
258
|
+
exports.A11yVisuallyHidden = a11y.A11yVisuallyHidden;
|
|
256
259
|
exports.handleArrowNavigation = a11y.handleArrowNavigation;
|
|
257
260
|
exports.useAnnounce = a11y.useAnnounce;
|
|
258
261
|
exports.useFocusTrap = a11y.useFocusTrap;
|
|
@@ -289,4 +292,5 @@ exports.PRESET_DEFINITIONS = themePresets.PRESET_DEFINITIONS;
|
|
|
289
292
|
exports.generatePreset = themePresets.generatePreset;
|
|
290
293
|
exports.seedsToTheme = themePresets.seedsToTheme;
|
|
291
294
|
exports.ThemeToggle = index$y.ThemeToggle;
|
|
295
|
+
exports.ThemeButton = ThemeButton.ThemeButton;
|
|
292
296
|
exports.useTheme = context.useTheme;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ export { Input, type InputProps } from "./components/Input";
|
|
|
3
3
|
export { Textarea, type TextareaProps } from "./components/Textarea";
|
|
4
4
|
export { Card, CardRoot, CardHeader, CardTitle, CardDescription, CardBody, CardFooter, type CardProps, type CardHeaderProps, type CardTitleProps, type CardDescriptionProps, type CardBodyProps, type CardFooterProps, } from "./components/Card";
|
|
5
5
|
export { Switch, type SwitchProps } from "./components/Switch";
|
|
6
|
-
export { Alert, AlertRoot, AlertIcon, AlertBody, AlertTitle, AlertContent, AlertActions, AlertAction, AlertClose, type AlertProps, type
|
|
7
|
-
export { Badge, type BadgeProps } from "./components/Badge";
|
|
6
|
+
export { Alert, AlertRoot, AlertIcon, AlertBody, AlertTitle, AlertContent, AlertActions, AlertAction, AlertClose, type AlertProps, type AlertTone, type AlertIconProps, type AlertBodyProps, type AlertTitleProps, type AlertContentProps, type AlertActionsProps, type AlertActionProps, type AlertCloseProps, } from "./components/Alert";
|
|
7
|
+
export { Badge, type BadgeProps, type BadgeTone, type BadgeVariant } from "./components/Badge";
|
|
8
8
|
export { IconButton, type IconButtonProps } from "./components/IconButton";
|
|
9
9
|
export { ComponentDefaultsProvider, useComponentDefaults, useResolvedControlSize, type ComponentDefaults, type ComponentDefaultsProviderProps, type ControlSize, } from "./components/ComponentDefaults";
|
|
10
10
|
export { Avatar, type AvatarProps, type AvatarGroupProps, type AvatarSize, } from "./components/Avatar";
|
|
@@ -23,18 +23,18 @@ export { RadioGroup, type RadioGroupProps, type RadioItemProps } from "./compone
|
|
|
23
23
|
export { Grid, type GridProps, type GridItemProps, type ResponsiveColumns, } from "./components/Grid";
|
|
24
24
|
export { BentoGrid, type BentoGridProps, type BentoGridItemProps, type ResponsiveSpan, } from "./components/BentoGrid";
|
|
25
25
|
export { Separator, type SeparatorProps } from "./components/Separator";
|
|
26
|
-
export { Skeleton, type SkeletonProps, type SkeletonTextProps, type
|
|
27
|
-
export { Loading, LoadingRoot, LoadingInline, LoadingScreen, type LoadingProps, type LoadingSize, type
|
|
26
|
+
export { Skeleton, type SkeletonProps, type SkeletonTextProps, type SkeletonShape, type SkeletonSize, } from "./components/Skeleton";
|
|
27
|
+
export { Loading, LoadingRoot, LoadingInline, LoadingScreen, type LoadingProps, type LoadingSize, type LoadingKind, type LoadingInlineProps, type LoadingScreenProps, } from "./components/Loading";
|
|
28
28
|
export { Table, type TableProps, type TableRowProps, type TableCellProps, type TableHeaderCellProps, type TableCaptionProps, } from "./components/Table";
|
|
29
29
|
export { DataTable, createColumns, type DataTableProps, type DataTableColumn, type ColumnDef, type ColumnAlign, type DataTableDensity, type SortingState, type RowSelectionState, type ExpandedState, } from "./components/DataTable";
|
|
30
30
|
export { EmptyState, EmptyStateRoot, EmptyStateIcon, EmptyStateTitle, EmptyStateDescription, EmptyStateActions, type EmptyStateProps, type EmptyStateIconProps, type EmptyStateTitleProps, type EmptyStateDescriptionProps, type EmptyStateActionsProps, } from "./components/EmptyState";
|
|
31
|
-
export { Toast, ToastProvider, useToast, type ToastProps, type ToastProviderProps, type ToastData, type
|
|
31
|
+
export { Toast, ToastProvider, useToast, type ToastProps, type ToastProviderProps, type ToastData, type ToastTone, type ToastPosition, } from "./components/Toast";
|
|
32
32
|
export { Field, type FieldProps, type FieldLabelProps, type FieldControlProps, type FieldDescriptionProps, type FieldErrorProps, type FieldValidityProps, type FieldRequiredProps, } from "./components/Field";
|
|
33
33
|
export { Fieldset, type FieldsetProps, type FieldsetLegendProps, type FieldsetDescriptionProps, } from "./components/Fieldset";
|
|
34
34
|
export { Form, type FormActionsProps, type FormProps } from "./components/Form";
|
|
35
35
|
export { Sidebar, SidebarProvider, useSidebar, useSidebarContext, // deprecated, use useSidebar instead
|
|
36
36
|
type SidebarProviderProps, type SidebarProps, type SidebarHeaderProps, type SidebarNavProps, type SidebarSectionProps, type SidebarSectionActionProps, type SidebarItemProps, type SidebarSubItemProps, type SidebarFooterProps, type SidebarTriggerProps, type SidebarOverlayProps, type SidebarCollapseToggleProps, type SidebarRailProps, type SidebarMenuSkeletonProps, type SidebarCollapsible, } from "./components/Sidebar";
|
|
37
|
-
export { Theme, ThemeProvider, ThemeToggle, useTheme, configureTheme, type ThemeProviderProps, type ThemeToggleProps, type ThemeMode, type UseThemeReturn, type ConfigureThemeOptions, type NeutralPalette, type
|
|
37
|
+
export { Theme, ThemeProvider, ThemeToggle, ThemeButton, useTheme, configureTheme, type ThemeProviderProps, type ThemeToggleProps, type ThemeButtonProps, type ThemeMode, type UseThemeReturn, type ConfigureThemeOptions, type NeutralPalette, type RadiusStyle, } from "./components/Theme";
|
|
38
38
|
export { Header, type HeaderProps, type HeaderBrandProps, type HeaderNavProps, type HeaderNavItemProps, type HeaderSearchProps, type HeaderActionsProps, type HeaderTriggerProps, type HeaderMobileNavProps, } from "./components/Header";
|
|
39
39
|
export { AppShell, type AppShellProps, type AppShellLayout, type AppShellSlotVariant, type AppShellHeaderProps, type AppShellSidebarProps, type AppShellMainProps, type AppShellAsideProps, } from "./components/AppShell";
|
|
40
40
|
export { Stack, type StackProps, type ResponsiveDirection, type ResponsiveGap, } from "./components/Stack";
|
|
@@ -61,18 +61,18 @@ export { VisuallyHidden, type VisuallyHiddenProps } from "./components/VisuallyH
|
|
|
61
61
|
export { Markdown, type MarkdownProps } from "./components/Markdown";
|
|
62
62
|
export { Message, MessageRoot, MessageContent, MessageActions, MessageTimestamp, MessageAvatar, useMessageContext, type MessageProps, type MessageRole, type MessageStatus, type MessageContentProps, type MessageActionsProps, type MessageTimestampProps, type MessageAvatarProps, } from "./components/Message";
|
|
63
63
|
export { ConversationList, ConversationListRoot, DateSeparator, TypingIndicator, useConversationList, type ConversationListProps, type AutoScrollBehavior, type DateSeparatorProps, type TypingIndicatorProps, } from "./components/ConversationList";
|
|
64
|
-
export { ThinkingIndicator, ThinkingIndicatorRoot, ThinkingSteps, ThinkingStep, useThinkingIndicatorContext, type ThinkingIndicatorProps, type
|
|
64
|
+
export { ThinkingIndicator, ThinkingIndicatorRoot, ThinkingSteps, ThinkingStep, useThinkingIndicatorContext, type ThinkingIndicatorProps, type ThinkingKind, type ThinkingStep as ThinkingStepType, type StepStatus, type ThinkingStepsProps, type ThinkingStepProps, } from "./components/ThinkingIndicator";
|
|
65
65
|
export { Chart, ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, useChartConfig, type ChartConfig, type ChartContainerProps, type ChartTooltipContentProps, type ChartLegendContentProps, } from "./components/Chart";
|
|
66
66
|
export { FragmentsLogo, fragmentsLogoSvg, type FragmentsLogoProps } from "./assets/fragments-logo";
|
|
67
67
|
export { FragmentsWordmark, type FragmentsWordmarkProps } from "./assets/fragments-wordmark";
|
|
68
|
+
export { NavGlyph, NAV_GLYPH_NAMES, type NavGlyphName, type NavGlyphProps, } from "./assets/nav-glyph";
|
|
68
69
|
export { NavigationMenu, NavigationMenuRoot, NavigationMenuList, NavigationMenuItem, NavigationMenuTrigger, NavigationMenuContent, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, NavigationMenuMobileContent, NavigationMenuMobileSection, type NavigationMenuProps, type NavigationMenuListProps, type NavigationMenuItemProps, type NavigationMenuTriggerProps, type NavigationMenuContentProps, type NavigationMenuLinkProps, type NavigationMenuIndicatorProps, type NavigationMenuViewportProps, type NavigationMenuMobileContentProps, type NavigationMenuMobileSectionProps, } from "./components/NavigationMenu";
|
|
69
70
|
export { Drawer, type DrawerProps, type DrawerContentProps, type DrawerTriggerProps, type DrawerHeaderProps, type DrawerTitleProps, type DrawerDescriptionProps, type DrawerBodyProps, type DrawerFooterProps, type DrawerCloseProps, type DrawerSwipeAreaProps, } from "./components/Drawer";
|
|
70
71
|
export { Pagination, type PaginationProps, type PaginationItemProps, } from "./components/Pagination";
|
|
71
72
|
export { Command, type CommandProps, type CommandInputProps, type CommandListProps, type CommandItemProps, type CommandGroupProps, type CommandEmptyProps, type CommandSeparatorProps, } from "./components/Command";
|
|
72
73
|
export { Editor, EditorRoot, EditorToolbar, EditorToolbarGroup, EditorToolbarButton, EditorSeparator, EditorStatusIndicator, EditorContentArea, EditorStatusBar, useEditorContext, type EditorProps, type EditorFormat, type EditorSaveStatus, type EditorMode, type EditorSize, type EditorToolbarProps, type EditorToolbarGroupProps, type EditorToolbarButtonProps, type EditorSeparatorProps, type EditorStatusIndicatorProps, type EditorContentProps, type EditorStatusBarProps, } from "./components/Editor";
|
|
73
|
-
export { useId, useAnnounce, usePrefersReducedMotion, usePrefersContrast, useFocusTrap, handleArrowNavigation,
|
|
74
|
+
export { useId, useAnnounce, usePrefersReducedMotion, usePrefersContrast, useFocusTrap, handleArrowNavigation, A11yVisuallyHidden, type A11yVisuallyHiddenProps, } from "./utils/a11y";
|
|
74
75
|
export { KEYBOARD_SHORTCUTS, matchesShortcut, getShortcutLabel, findConflicts, getShortcuts, isEditableElement, configureShortcuts, getResolvedShortcut, resetShortcutOverrides, useKeyboardShortcut, type KeyboardShortcut, type ShortcutName, type UseKeyboardShortcutOptions, } from "./utils/keyboard-shortcuts";
|
|
75
76
|
export { type SeedConfig, PALETTES, RADIUS_STYLES, PALETTE_SEMANTIC_COLORS, DEFAULT_SEEDS, getSemanticColors, deriveText, deriveSurfaces, deriveBorders, deriveShadows, deriveAccentHover, deriveAccentActive, deriveDarkAccent, deriveSemanticText, deriveSemanticBg, deriveSemanticHover, } from "./utils/seed-derivation";
|
|
76
77
|
export { PRESETS, PRESET_DEFINITIONS, generatePreset, seedsToTheme, type ThemeConfig, type PresetDefinition, } from "./utils/theme-presets";
|
|
77
|
-
export { Switch as Toggle, type SwitchProps as ToggleProps } from "./components/Switch";
|
|
78
78
|
//# sourceMappingURL=index.d.ts.map
|