@primecoderin/fast-ui-react 0.0.0-stage → 1.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/CHANGELOG.md +106 -0
- package/LICENSE +21 -0
- package/README.md +180 -3
- package/dist/_virtual/_rolldown/runtime.js +12 -0
- package/dist/charts.d.ts +7 -0
- package/dist/charts.js +7 -0
- package/dist/components/Avatar/Avatar.d.ts +12 -0
- package/dist/components/Avatar/Avatar.js +92 -0
- package/dist/components/Button/Button.d.ts +44 -0
- package/dist/components/Button/Button.js +221 -0
- package/dist/components/Checkbox/CheckboxBox.d.ts +33 -0
- package/dist/components/Checkbox/CheckboxBox.js +148 -0
- package/dist/components/CodeSnippet/CodeSnippet.d.ts +26 -0
- package/dist/components/CodeSnippet/CodeSnippet.js +153 -0
- package/dist/components/Collapsible/Collapsible.d.ts +20 -0
- package/dist/components/Collapsible/Collapsible.js +97 -0
- package/dist/components/Container/Container.d.ts +301 -0
- package/dist/components/Container/Container.js +20 -0
- package/dist/components/FloatingActionButton/FloatingActionButton.d.ts +22 -0
- package/dist/components/FloatingActionButton/FloatingActionButton.js +141 -0
- package/dist/components/Grid/Grid.d.ts +311 -0
- package/dist/components/Grid/Grid.js +30 -0
- package/dist/components/IconTile/IconTile.d.ts +12 -0
- package/dist/components/IconTile/IconTile.js +70 -0
- package/dist/components/InlineError/InlineError.d.ts +9 -0
- package/dist/components/InlineError/InlineError.js +62 -0
- package/dist/components/Kbd/Kbd.d.ts +11 -0
- package/dist/components/Kbd/Kbd.js +31 -0
- package/dist/components/Link/Link.d.ts +18 -0
- package/dist/components/Link/Link.js +68 -0
- package/dist/components/Menu/ContextMenu.d.ts +18 -0
- package/dist/components/Menu/ContextMenu.js +68 -0
- package/dist/components/Menu/Menu.d.ts +86 -0
- package/dist/components/Menu/Menu.js +394 -0
- package/dist/components/OtpInput/OtpInput.d.ts +32 -0
- package/dist/components/OtpInput/OtpInput.js +177 -0
- package/dist/components/Popover/HoverPopover.d.ts +22 -0
- package/dist/components/Popover/HoverPopover.js +74 -0
- package/dist/components/Popover/Popover.d.ts +21 -0
- package/dist/components/Popover/Popover.js +64 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +17 -0
- package/dist/components/ProgressBar/ProgressBar.js +44 -0
- package/dist/components/Rating/Rating.d.ts +49 -0
- package/dist/components/Rating/Rating.js +241 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +23 -0
- package/dist/components/ScrollArea/ScrollArea.js +90 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +29 -0
- package/dist/components/SegmentedControl/SegmentedControl.js +99 -0
- package/dist/components/Separator/Separator.d.ts +9 -0
- package/dist/components/Separator/Separator.js +34 -0
- package/dist/components/Skeleton/Skeleton.d.ts +31 -0
- package/dist/components/Skeleton/Skeleton.js +152 -0
- package/dist/components/Slider/Slider.d.ts +54 -0
- package/dist/components/Slider/Slider.js +178 -0
- package/dist/components/Spinner/Spinner.d.ts +17 -0
- package/dist/components/Spinner/Spinner.js +118 -0
- package/dist/components/Stack/Stack.d.ts +302 -0
- package/dist/components/Stack/Stack.js +14 -0
- package/dist/components/StateIcon/StateIcon.d.ts +11 -0
- package/dist/components/StateIcon/StateIcon.js +65 -0
- package/dist/components/StatusBadge/StatusBadge.d.ts +19 -0
- package/dist/components/StatusBadge/StatusBadge.js +82 -0
- package/dist/components/Tabs/Tabs.d.ts +28 -0
- package/dist/components/Tabs/Tabs.js +109 -0
- package/dist/components/Tag/Tag.d.ts +11 -0
- package/dist/components/Tag/Tag.js +66 -0
- package/dist/components/Toast/AppToaster.d.ts +8 -0
- package/dist/components/Toast/AppToaster.js +135 -0
- package/dist/components/Toast/toast-manager.d.ts +28 -0
- package/dist/components/Toast/toast-manager.js +47 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +26 -0
- package/dist/components/ToggleButton/ToggleButton.js +106 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +32 -0
- package/dist/components/ToggleGroup/ToggleGroup.js +79 -0
- package/dist/components/Tooltip/Tooltip.d.ts +16 -0
- package/dist/components/Tooltip/Tooltip.js +58 -0
- package/dist/components/Tooltip/TooltipGroup.d.ts +22 -0
- package/dist/components/Tooltip/TooltipGroup.js +65 -0
- package/dist/components/Typography/Typography.d.ts +17 -0
- package/dist/components/Typography/Typography.js +100 -0
- package/dist/editor-forms.d.ts +1 -0
- package/dist/editor-forms.js +1 -0
- package/dist/editor.d.ts +1 -0
- package/dist/editor.js +1 -0
- package/dist/fonts/LICENSE +93 -0
- package/dist/fonts/inter-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-greek-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-wght-normal.woff2 +0 -0
- package/dist/fonts.css +69 -0
- package/dist/forms.d.ts +22 -0
- package/dist/forms.js +23 -0
- package/dist/foundation.css +23 -0
- package/dist/global.css +116 -0
- package/dist/hooks/useAppToast.d.ts +12 -0
- package/dist/hooks/useAppToast.js +29 -0
- package/dist/icons/icons.d.ts +43 -0
- package/dist/icons/icons.js +44 -0
- package/dist/index.d.ts +106 -0
- package/dist/index.js +101 -0
- package/dist/patterns/Accordion/Accordion.d.ts +35 -0
- package/dist/patterns/Accordion/Accordion.js +139 -0
- package/dist/patterns/Alert/Alert.d.ts +38 -0
- package/dist/patterns/Alert/Alert.js +151 -0
- package/dist/patterns/AppShell/AppShell.d.ts +39 -0
- package/dist/patterns/AppShell/AppShell.js +218 -0
- package/dist/patterns/Breadcrumbs/Breadcrumbs.d.ts +21 -0
- package/dist/patterns/Breadcrumbs/Breadcrumbs.js +73 -0
- package/dist/patterns/Calendar/Calendar.d.ts +59 -0
- package/dist/patterns/Calendar/Calendar.js +283 -0
- package/dist/patterns/Calendar/DateRangePicker.d.ts +53 -0
- package/dist/patterns/Calendar/DateRangePicker.js +266 -0
- package/dist/patterns/Calendar/FormDateRangeField.d.ts +24 -0
- package/dist/patterns/Calendar/FormDateRangeField.js +138 -0
- package/dist/patterns/Card/Card.d.ts +26 -0
- package/dist/patterns/Card/Card.js +125 -0
- package/dist/patterns/Carousel/Carousel.d.ts +33 -0
- package/dist/patterns/Carousel/Carousel.js +127 -0
- package/dist/patterns/Cascader/Cascader.d.ts +53 -0
- package/dist/patterns/Cascader/Cascader.js +371 -0
- package/dist/patterns/Cascader/FormCascaderField.d.ts +21 -0
- package/dist/patterns/Cascader/FormCascaderField.js +130 -0
- package/dist/patterns/Charts/AreaChart.d.ts +13 -0
- package/dist/patterns/Charts/AreaChart.js +220 -0
- package/dist/patterns/Charts/BarChart.d.ts +11 -0
- package/dist/patterns/Charts/BarChart.js +220 -0
- package/dist/patterns/Charts/DonutChart.d.ts +37 -0
- package/dist/patterns/Charts/DonutChart.js +215 -0
- package/dist/patterns/Charts/GaugeChart.d.ts +44 -0
- package/dist/patterns/Charts/GaugeChart.js +210 -0
- package/dist/patterns/Charts/LineChart.d.ts +14 -0
- package/dist/patterns/Charts/LineChart.js +222 -0
- package/dist/patterns/Charts/Sparkline.d.ts +24 -0
- package/dist/patterns/Charts/Sparkline.js +81 -0
- package/dist/patterns/Charts/chart-parts.d.ts +139 -0
- package/dist/patterns/Charts/chart-parts.js +385 -0
- package/dist/patterns/Charts/gauge-math.d.ts +20 -0
- package/dist/patterns/Charts/gauge-math.js +21 -0
- package/dist/patterns/Charts/sparkline-path.d.ts +11 -0
- package/dist/patterns/Charts/sparkline-path.js +24 -0
- package/dist/patterns/ColorPicker/ColorPicker.d.ts +50 -0
- package/dist/patterns/ColorPicker/ColorPicker.js +590 -0
- package/dist/patterns/ColorPicker/FormColorField.d.ts +21 -0
- package/dist/patterns/ColorPicker/FormColorField.js +130 -0
- package/dist/patterns/ColorPicker/color-value.d.ts +19 -0
- package/dist/patterns/ColorPicker/color-value.js +72 -0
- package/dist/patterns/Combobox/Autocomplete.d.ts +48 -0
- package/dist/patterns/Combobox/Autocomplete.js +158 -0
- package/dist/patterns/Combobox/Combobox.d.ts +52 -0
- package/dist/patterns/Combobox/Combobox.js +195 -0
- package/dist/patterns/Combobox/ComboboxPopup.d.ts +24 -0
- package/dist/patterns/Combobox/ComboboxPopup.js +107 -0
- package/dist/patterns/Combobox/FormAutocompleteField.d.ts +17 -0
- package/dist/patterns/Combobox/FormAutocompleteField.js +119 -0
- package/dist/patterns/Combobox/FormComboboxField.d.ts +18 -0
- package/dist/patterns/Combobox/FormComboboxField.js +119 -0
- package/dist/patterns/Combobox/FormMultiSelectField.d.ts +18 -0
- package/dist/patterns/Combobox/FormMultiSelectField.js +119 -0
- package/dist/patterns/Combobox/MultiSelect.d.ts +54 -0
- package/dist/patterns/Combobox/MultiSelect.js +175 -0
- package/dist/patterns/CommandPalette/CommandPalette.d.ts +50 -0
- package/dist/patterns/CommandPalette/CommandPalette.js +193 -0
- package/dist/patterns/DataTable/DataTable.d.ts +107 -0
- package/dist/patterns/DataTable/DataTable.js +364 -0
- package/dist/patterns/DateTimePicker/DateTimePanel.d.ts +28 -0
- package/dist/patterns/DateTimePicker/DateTimePanel.js +444 -0
- package/dist/patterns/DateTimePicker/DateTimePicker.d.ts +75 -0
- package/dist/patterns/DateTimePicker/DateTimePicker.js +271 -0
- package/dist/patterns/DateTimePicker/FormDateTimeField.d.ts +32 -0
- package/dist/patterns/DateTimePicker/FormDateTimeField.js +148 -0
- package/dist/patterns/DateTimePicker/TimeSliders.d.ts +14 -0
- package/dist/patterns/DateTimePicker/TimeSliders.js +206 -0
- package/dist/patterns/DateTimePicker/picker-labels.d.ts +30 -0
- package/dist/patterns/DateTimePicker/picker-labels.js +23 -0
- package/dist/patterns/DateTimePicker/picker-values.d.ts +98 -0
- package/dist/patterns/DateTimePicker/picker-values.js +194 -0
- package/dist/patterns/DescriptionList/DescriptionList.d.ts +20 -0
- package/dist/patterns/DescriptionList/DescriptionList.js +57 -0
- package/dist/patterns/Dialog/Dialog.d.ts +26 -0
- package/dist/patterns/Dialog/Dialog.js +212 -0
- package/dist/patterns/Drawer/Drawer.d.ts +33 -0
- package/dist/patterns/Drawer/Drawer.js +153 -0
- package/dist/patterns/EmptyState/EmptyState.d.ts +35 -0
- package/dist/patterns/EmptyState/EmptyState.js +44 -0
- package/dist/patterns/FileUpload/FileUpload.d.ts +87 -0
- package/dist/patterns/FileUpload/FileUpload.js +417 -0
- package/dist/patterns/FileUpload/FormFileUploadField.d.ts +19 -0
- package/dist/patterns/FileUpload/FormFileUploadField.js +117 -0
- package/dist/patterns/FileUpload/add-files.d.ts +26 -0
- package/dist/patterns/FileUpload/add-files.js +35 -0
- package/dist/patterns/FileUpload/file-size.d.ts +14 -0
- package/dist/patterns/FileUpload/file-size.js +44 -0
- package/dist/patterns/FormField/CheckboxField.d.ts +26 -0
- package/dist/patterns/FormField/CheckboxField.js +97 -0
- package/dist/patterns/FormField/FieldFrame.d.ts +85 -0
- package/dist/patterns/FormField/FieldFrame.js +257 -0
- package/dist/patterns/FormField/FormCheckboxField.d.ts +17 -0
- package/dist/patterns/FormField/FormCheckboxField.js +92 -0
- package/dist/patterns/FormField/FormRadioGroupField.d.ts +16 -0
- package/dist/patterns/FormField/FormRadioGroupField.js +97 -0
- package/dist/patterns/FormField/FormRatingField.d.ts +19 -0
- package/dist/patterns/FormField/FormRatingField.js +119 -0
- package/dist/patterns/FormField/FormSelectField.d.ts +16 -0
- package/dist/patterns/FormField/FormSelectField.js +91 -0
- package/dist/patterns/FormField/FormSliderField.d.ts +22 -0
- package/dist/patterns/FormField/FormSliderField.js +128 -0
- package/dist/patterns/FormField/FormSwitchField.d.ts +19 -0
- package/dist/patterns/FormField/FormSwitchField.js +88 -0
- package/dist/patterns/FormField/FormTextAreaField.d.ts +12 -0
- package/dist/patterns/FormField/FormTextAreaField.js +91 -0
- package/dist/patterns/FormField/FormTextField.d.ts +23 -0
- package/dist/patterns/FormField/FormTextField.js +103 -0
- package/dist/patterns/FormField/RadioGroupField.d.ts +38 -0
- package/dist/patterns/FormField/RadioGroupField.js +201 -0
- package/dist/patterns/FormField/SelectField.d.ts +43 -0
- package/dist/patterns/FormField/SelectField.js +211 -0
- package/dist/patterns/FormField/SwitchField.d.ts +27 -0
- package/dist/patterns/FormField/SwitchField.js +105 -0
- package/dist/patterns/FormField/TextAreaField.d.ts +37 -0
- package/dist/patterns/FormField/TextAreaField.js +134 -0
- package/dist/patterns/FormField/TextField.d.ts +51 -0
- package/dist/patterns/FormField/TextField.js +256 -0
- package/dist/patterns/FormField/error-message.d.ts +6 -0
- package/dist/patterns/FormField/error-message.js +8 -0
- package/dist/patterns/FormField/field-styles.d.ts +44 -0
- package/dist/patterns/FormField/field-styles.js +89 -0
- package/dist/patterns/FormField/field-types.d.ts +4 -0
- package/dist/patterns/FormField/use-field-ids.d.ts +18 -0
- package/dist/patterns/FormField/use-field-ids.js +53 -0
- package/dist/patterns/List/List.d.ts +38 -0
- package/dist/patterns/List/List.js +174 -0
- package/dist/patterns/MentionsInput/FormMentionsField.d.ts +18 -0
- package/dist/patterns/MentionsInput/FormMentionsField.js +124 -0
- package/dist/patterns/MentionsInput/MentionsInput.d.ts +57 -0
- package/dist/patterns/MentionsInput/MentionsInput.js +133 -0
- package/dist/patterns/MentionsInput/mention-text.d.ts +24 -0
- package/dist/patterns/MentionsInput/mention-text.js +31 -0
- package/dist/patterns/Menubar/Menubar.d.ts +22 -0
- package/dist/patterns/Menubar/Menubar.js +79 -0
- package/dist/patterns/NavigationMenu/NavigationMenu.d.ts +27 -0
- package/dist/patterns/NavigationMenu/NavigationMenu.js +104 -0
- package/dist/patterns/NumberField/FormNumberField.d.ts +18 -0
- package/dist/patterns/NumberField/FormNumberField.js +119 -0
- package/dist/patterns/NumberField/NumberField.d.ts +57 -0
- package/dist/patterns/NumberField/NumberField.js +242 -0
- package/dist/patterns/Pagination/Pagination.d.ts +31 -0
- package/dist/patterns/Pagination/Pagination.js +275 -0
- package/dist/patterns/Pagination/page-items.d.ts +18 -0
- package/dist/patterns/Pagination/page-items.js +40 -0
- package/dist/patterns/PhoneField/FormPhoneField.d.ts +22 -0
- package/dist/patterns/PhoneField/FormPhoneField.js +97 -0
- package/dist/patterns/PhoneField/PhoneField.d.ts +60 -0
- package/dist/patterns/PhoneField/PhoneField.js +448 -0
- package/dist/patterns/PhoneField/phone-value.d.ts +26 -0
- package/dist/patterns/PhoneField/phone-value.js +38 -0
- package/dist/patterns/QRCode/QRCode.d.ts +37 -0
- package/dist/patterns/QRCode/QRCode.js +120 -0
- package/dist/patterns/QRCode/qr-path.d.ts +7 -0
- package/dist/patterns/QRCode/qr-path.js +25 -0
- package/dist/patterns/ResizablePanels/ResizablePanels.d.ts +34 -0
- package/dist/patterns/ResizablePanels/ResizablePanels.js +175 -0
- package/dist/patterns/ResizablePanels/panel-sizes.d.ts +31 -0
- package/dist/patterns/ResizablePanels/panel-sizes.js +54 -0
- package/dist/patterns/RichTextEditor/FormRichTextField.d.ts +18 -0
- package/dist/patterns/RichTextEditor/FormRichTextField.js +118 -0
- package/dist/patterns/RichTextEditor/RichTextEditor.d.ts +71 -0
- package/dist/patterns/RichTextEditor/RichTextEditor.js +453 -0
- package/dist/patterns/SearchInput/SearchInput.d.ts +26 -0
- package/dist/patterns/SearchInput/SearchInput.js +98 -0
- package/dist/patterns/SideNav/SideNav.d.ts +50 -0
- package/dist/patterns/SideNav/SideNav.js +269 -0
- package/dist/patterns/Stat/Stat.d.ts +51 -0
- package/dist/patterns/Stat/Stat.js +292 -0
- package/dist/patterns/Stepper/Stepper.d.ts +35 -0
- package/dist/patterns/Stepper/Stepper.js +110 -0
- package/dist/patterns/TagGroup/TagGroup.d.ts +44 -0
- package/dist/patterns/TagGroup/TagGroup.js +151 -0
- package/dist/patterns/TagsInput/FormTagsInputField.d.ts +18 -0
- package/dist/patterns/TagsInput/FormTagsInputField.js +124 -0
- package/dist/patterns/TagsInput/TagsInput.d.ts +51 -0
- package/dist/patterns/TagsInput/TagsInput.js +97 -0
- package/dist/patterns/Timeline/Timeline.d.ts +29 -0
- package/dist/patterns/Timeline/Timeline.js +85 -0
- package/dist/patterns/Toolbar/Toolbar.d.ts +31 -0
- package/dist/patterns/Toolbar/Toolbar.js +105 -0
- package/dist/patterns/Tour/Tour.d.ts +38 -0
- package/dist/patterns/Tour/Tour.js +333 -0
- package/dist/patterns/TransferList/FormTransferListField.d.ts +19 -0
- package/dist/patterns/TransferList/FormTransferListField.js +117 -0
- package/dist/patterns/TransferList/TransferList.d.ts +53 -0
- package/dist/patterns/TransferList/TransferList.js +441 -0
- package/dist/patterns/TreeSelect/FormTreeSelectField.d.ts +28 -0
- package/dist/patterns/TreeSelect/FormTreeSelectField.js +88 -0
- package/dist/patterns/TreeSelect/TreeSelect.d.ts +49 -0
- package/dist/patterns/TreeSelect/TreeSelect.js +375 -0
- package/dist/patterns/TreeView/TreeView.d.ts +40 -0
- package/dist/patterns/TreeView/TreeView.js +296 -0
- package/dist/provider/DesignSystemProvider.d.ts +54 -0
- package/dist/provider/DesignSystemProvider.js +270 -0
- package/dist/provider/nonce.d.ts +7 -0
- package/dist/provider/nonce.js +13 -0
- package/dist/styles.css +2 -0
- package/dist/theme/chart-palette.d.ts +51 -0
- package/dist/theme/chart-palette.js +112 -0
- package/dist/theme/create-theme.d.ts +52 -0
- package/dist/theme/create-theme.js +75 -0
- package/dist/theme/style-element.d.ts +28 -0
- package/dist/theme/style-element.js +79 -0
- package/dist/theme/tenant-branding.d.ts +48 -0
- package/dist/theme/tenant-branding.js +65 -0
- package/dist/theme/theme-switch.d.ts +25 -0
- package/dist/theme/theme-switch.js +90 -0
- package/dist/theme/token-names.d.ts +3 -0
- package/dist/theme/token-names.js +166 -0
- package/dist/theme.css +241 -0
- package/dist/tokens.css +383 -0
- package/dist/types/direction.d.ts +4 -0
- package/dist/types/tone.d.ts +7 -0
- package/dist/utils/cn.d.ts +7 -0
- package/dist/utils/cn.js +50 -0
- package/dist/utils/first-field.d.ts +8 -0
- package/dist/utils/first-field.js +10 -0
- package/dist/utils/layout.d.ts +33 -0
- package/dist/utils/layout.js +30 -0
- package/dist/utils/popup.d.ts +12 -0
- package/dist/utils/popup.js +27 -0
- package/docs/accessibility.md +61 -0
- package/docs/advanced-components.md +38 -0
- package/docs/ai-assistants.md +44 -0
- package/docs/architecture.md +65 -0
- package/docs/browser-support.md +30 -0
- package/docs/charts.md +56 -0
- package/docs/components.md +2928 -0
- package/docs/conventions.md +19 -0
- package/docs/customization.md +79 -0
- package/docs/dates-files-data.md +48 -0
- package/docs/design-principles.md +50 -0
- package/docs/faq.md +68 -0
- package/docs/forms.md +114 -0
- package/docs/getting-started.md +64 -0
- package/docs/icons.md +48 -0
- package/docs/internationalization.md +64 -0
- package/docs/layout-and-navigation.md +51 -0
- package/docs/nextjs.md +69 -0
- package/docs/releasing.md +40 -0
- package/docs/testing.md +242 -0
- package/docs/theming.md +118 -0
- package/docs/typescript.md +62 -0
- package/llms-full.txt +4573 -0
- package/llms.txt +52 -0
- package/package.json +193 -6
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@primecoderin/fast-ui-react` are written here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the package follows
|
|
5
|
+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html). Breaking changes are marked **Breaking** with what to do
|
|
6
|
+
instead.
|
|
7
|
+
|
|
8
|
+
## Unreleased
|
|
9
|
+
|
|
10
|
+
## 1.0.0 - 2026-11-28
|
|
11
|
+
|
|
12
|
+
First stable release of `@primecoderin/fast-ui-react` and `@primecoderin/fast-ui-react-mcp`.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- Expanded npm package metadata (`author`, keyword-rich descriptions, and search keywords) for both
|
|
17
|
+
`@primecoderin/fast-ui-react` and `@primecoderin/fast-ui-react-mcp`.
|
|
18
|
+
- SEO metadata, Open Graph / Twitter cards, JSON-LD structured data, `robots.txt`, and `sitemap.xml` for the hosted
|
|
19
|
+
Storybook documentation site.
|
|
20
|
+
- Live npm version and Storybook badges in `README.md`.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- Graduated both packages from `0.1.0` to stable `1.0.0` with strict semantic versioning.
|
|
25
|
+
|
|
26
|
+
## 0.1.0 - 2026-11-27
|
|
27
|
+
|
|
28
|
+
Initial public release of `@primecoderin/fast-ui-react` and `@primecoderin/fast-ui-react-mcp`, covering the design tokens
|
|
29
|
+
(colour, type, radius, shadows, dark theme, right to left, tenant branding), 128 components and patterns across
|
|
30
|
+
phases 0 to 6 of the [roadmap](ROADMAP.md), the Storybook documentation with light/dark/RTL accessibility and
|
|
31
|
+
SSR/hydration tests, and the MCP server for coding assistants.
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- **The guides in Storybook.** Every guide in `docs/` is a page in Storybook (under **Guides**; testing and design
|
|
36
|
+
principles are the **Testing** and **Introduction** pages they are generated from), rendered from
|
|
37
|
+
the same Markdown (links between guides work; links to other files open them on GitHub).
|
|
38
|
+
- **Form fields without react-hook-form.** `TextField`, `TextAreaField`, `SelectField`, `CheckboxField`,
|
|
39
|
+
`SwitchField`, `RadioGroupField` and `PhoneField` in the main entry; the `Form*` twins stay in
|
|
40
|
+
`@primecoderin/fast-ui-react/forms`.
|
|
41
|
+
- **Inputs:** `Combobox`, `Autocomplete`, `MultiSelect`, `TagsInput`, `Slider`, `NumberField`, `ToggleButton`,
|
|
42
|
+
`ToggleGroup`, `Rating`, `ColorPicker` (bare controls, each with a `Form*Field` where it is a form value).
|
|
43
|
+
- **Layout and navigation:** `Stack`, `Grid`, `Container`, `Separator`, `Link`, `Breadcrumbs`, `Accordion`,
|
|
44
|
+
`Collapsible`, `ScrollArea`, `Toolbar`, `ContextMenu`, `Menubar`, `NavigationMenu`, `SideNav`, `AppShell`,
|
|
45
|
+
`Stepper`; `Menu` gains submenus, checkbox items and radio groups.
|
|
46
|
+
- **Dates, files and data display:** `Calendar`, `DateRangePicker`, `FileUpload`, `Carousel`, `TreeView`,
|
|
47
|
+
`TreeSelect`, `Kbd`, `CodeSnippet`, `DescriptionList`, `Timeline`.
|
|
48
|
+
- **Charts**, a new entry `@primecoderin/fast-ui-react/charts` on `recharts` (an optional peer dependency): `LineChart`,
|
|
49
|
+
`AreaChart`, `BarChart`, `DonutChart`, `GaugeChart` and `Sparkline`. New tokens `chart-1` to `chart-5`,
|
|
50
|
+
`chart-grid` and `chart-axis`. The line, area, bar and donut charts give their data as a
|
|
51
|
+
table for screen readers; the gauge is a `meter` and the sparkline an image with a name.
|
|
52
|
+
- **Advanced components:** `CommandPalette`, `ResizablePanels`, `TransferList`, `Cascader`, `MentionsInput`, `Tour`,
|
|
53
|
+
`FloatingActionButton`, `QRCode` (on `uqr`), and `RichTextEditor` in a new entry `@primecoderin/fast-ui-react/editor`
|
|
54
|
+
(TipTap packages as optional peer dependencies), with `FormRichTextField` in `@primecoderin/fast-ui-react/editor-forms`.
|
|
55
|
+
- **Documentation:** 21 guides in `docs/` (including styling and customization, TypeScript, icons, testing,
|
|
56
|
+
accessibility and internationalization), a generated component reference (`docs/components.md`), `llms.txt` and
|
|
57
|
+
`llms-full.txt` for AI assistants, `AGENTS.md`, `CONTRIBUTING.md`, `SUPPORT.md`, this changelog, an MIT licence, and
|
|
58
|
+
issue and pull request templates.
|
|
59
|
+
- Package metadata (`license`, `repository`, `bugs`, `homepage`, `keywords`).
|
|
60
|
+
|
|
61
|
+
### Changed
|
|
62
|
+
|
|
63
|
+
- **Inter ships inside the package** (`dist/fonts/`, variable WOFF2 per character set, with its licence), and
|
|
64
|
+
`styles.css` and `foundation.css` carry the `@font-face` rules. An app no longer adds a font link or allows a
|
|
65
|
+
font host in its Content-Security-Policy.
|
|
66
|
+
- `@base-ui/react` is a dependency, not a peer dependency: an app installs one package plus React.
|
|
67
|
+
- `engines` is replaced by `devEngines`: Node 24 is needed to develop the package, not to use it.
|
|
68
|
+
- The guides moved from one README to `docs/`, and the README is an overview.
|
|
69
|
+
|
|
70
|
+
### Fixed
|
|
71
|
+
|
|
72
|
+
- **Review pass (accessibility, correctness, security, theming, right to left).** About 120 fixes across the
|
|
73
|
+
components, found by reading every component against its documentation and by running every story on a server and
|
|
74
|
+
hydrating it in a browser. Highlights, with what an app may notice:
|
|
75
|
+
- **Breaking.** `DataTableExpansion` requires `onExpandedChange` and `toggleLabel` and renders a disclosure button in
|
|
76
|
+
each row; `AppShell`'s `labels.closeNavigation` is required and the narrow-screen drawer has a close button.
|
|
77
|
+
- **Security.** A theme value with an unclosed quote or bracket, or `image()`, is dropped (it could swallow the
|
|
78
|
+
declarations after it); the rich text editor's own `<style>` carries the provider's CSP nonce; the editor keeps only
|
|
79
|
+
what its toolbar makes, and a link keeps only its address.
|
|
80
|
+
- **Correctness.** `Calendar` no longer throws on an unreadable date and no longer mismatches on hydration;
|
|
81
|
+
`FileUpload`'s `name` submits its files in a native form; `MultiSelect` keeps the order chosen; the rich text
|
|
82
|
+
editor's link field no longer submits the surrounding form; `MentionsInput` closes its list on blur;
|
|
83
|
+
`ResizablePanels` ends a drag on cancel; `PhoneField` keeps its country when cleared and reads a pasted `+44…`
|
|
84
|
+
number; `TagsInput` ignores Enter during IME composition; read-only `OtpInput` ignores Backspace; `SideNav` groups
|
|
85
|
+
open when the page moves into them; `Tour` no longer scrolls again on every render.
|
|
86
|
+
- **Accessibility.** Focus is kept after removing a tag or file, after choosing a month, and on a Carousel or
|
|
87
|
+
Pagination end button (which are now `aria-disabled`: tests using `toBeDisabled()` on them check
|
|
88
|
+
`aria-disabled`); `aria-current` on the current step (even with an error), today, and a collapsed nav group; live
|
|
89
|
+
status for confirmations and file errors; Rating stars and Carousel dots are at least 24 px; icon buttons have 4.9:1
|
|
90
|
+
contrast; the gauge's `aria-valuenow` stays in range; a Slider's description and invalid state reach the range
|
|
91
|
+
input; a `ContextMenu` area is a named tab stop; the Tour moves focus to each step's title.
|
|
92
|
+
- **Theming.** Selected rows, row hover and the info card follow the brand; light `getChartPalette().series[0]` is
|
|
93
|
+
`#00977A`; charts re-measure when the font changes; the provider restores `dir` and `data-theme` on unmount; the
|
|
94
|
+
style ids are exported (`THEME_STYLE_ID`, `BRANDING_STYLE_ID`) so a server can render the theme before hydration.
|
|
95
|
+
Body text is now 14 px and follows the `text-body` token (it was 15 px).
|
|
96
|
+
- **Right to left.** The `ColorPicker` hue slider, the `Cascader` divider, the toast swipe direction, the number
|
|
97
|
+
field and the chart tooltip and gauge text follow the page direction correctly; weeks start on the locale's first day.
|
|
98
|
+
- **New.** `valueText` on `ProgressBar`; `emptyFocusRef` on `TagGroup`; `required` on `Rating`; `resultsLabel` on
|
|
99
|
+
`Combobox`, `Autocomplete` and `TreeSelect` (`labels.results` on `MultiSelect`); `rules` on every react-hook-form
|
|
100
|
+
field; the `text-figure` token; type-ahead in `TreeView`; Ctrl/Cmd+K in the editor; line and area series after the
|
|
101
|
+
first are dashed; `readInternationalPhone`; props types for every component are exported.
|
|
102
|
+
- **Checks.** Every story is also rendered on a server and hydrated in a browser (`npm run test:ssr`); a unit test
|
|
103
|
+
checks every optional property is declared `| undefined`; a CI workflow runs all of it.
|
|
104
|
+
- The date and time picker's day buttons are named with their weekday and number ("Saturday 24 October 2026")
|
|
105
|
+
instead of only the number, which failed WCAG's label-in-name check.
|
|
106
|
+
- The README's advice on setting a font no longer claims that Hebrew keeps Arial when `font-family` is set.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 The @primecoderin/fast-ui-react authors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,180 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# @primecoderin/fast-ui-react
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@primecoderin/fast-ui-react)
|
|
4
|
+
[](https://primecoderin.github.io/fast-ui-react/)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
A React design system: the tokens (colour, type, radius, shadows, dark theme, right to left, tenant branding), 128
|
|
11
|
+
components and patterns, and form fields for react-hook-form. **Base UI** provides the accessible behaviour,
|
|
12
|
+
**Tailwind CSS 4** the styling, **CVA** the variants and **lucide** the icons.
|
|
13
|
+
|
|
14
|
+
- **Accessible by construction.** Every story, which is every component state, is tested with axe in the light theme,
|
|
15
|
+
the dark theme and right to left, and the keyboard behaviour is tested with real key presses.
|
|
16
|
+
- **Brandable.** One call, `createTheme`, sets the primary colour, the font and any other token, per app or per
|
|
17
|
+
tenant, with no rebuild.
|
|
18
|
+
- **Right to left and translatable.** Components hold no text of their own: every string arrives through props, so
|
|
19
|
+
the app translates it with any i18n library.
|
|
20
|
+
- **No CSS-in-JS.** Static CSS from one stylesheet; no runtime style engine and no Tailwind needed in the app.
|
|
21
|
+
- **One package to install.** One package plus React. Form, chart and editor features are separate entries that need their
|
|
22
|
+
own optional packages only if you import them.
|
|
23
|
+
- **Server Components friendly.** Works in the Next.js App Router and Pages Router.
|
|
24
|
+
- **Made for assistants too.** An [MCP server](mcp/README.md) and [`llms.txt`](llms.txt) let coding assistants use it
|
|
25
|
+
correctly.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install @primecoderin/fast-ui-react
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
It needs React 19 (`react` and `react-dom`) and nothing else.
|
|
34
|
+
|
|
35
|
+
## Quick start
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
// 1. Import the stylesheet once, at the app's entry. It carries the font, the tokens and every class.
|
|
39
|
+
import "@primecoderin/fast-ui-react/styles.css";
|
|
40
|
+
|
|
41
|
+
// 2. Wrap the app in the provider: theme, direction, branding, toasts.
|
|
42
|
+
import { Button, DesignSystemProvider, TextField } from "@primecoderin/fast-ui-react";
|
|
43
|
+
import { useState } from "react";
|
|
44
|
+
|
|
45
|
+
export const App = () => {
|
|
46
|
+
const [name, setName] = useState("");
|
|
47
|
+
return (
|
|
48
|
+
<DesignSystemProvider themeMode="light" direction="ltr">
|
|
49
|
+
{/* 3. Use the components. Every text is a prop. */}
|
|
50
|
+
<TextField label="Name" value={name} onValueChange={setName} />
|
|
51
|
+
<Button variant="primary">Save</Button>
|
|
52
|
+
</DesignSystemProvider>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
More in [Getting started](docs/getting-started.md): the font, the entries, Next.js, theming.
|
|
58
|
+
|
|
59
|
+
## Entries
|
|
60
|
+
|
|
61
|
+
| Import | Content | Also install |
|
|
62
|
+
| --- | --- | --- |
|
|
63
|
+
| `@primecoderin/fast-ui-react` | Components, patterns, plain form fields, theming | nothing |
|
|
64
|
+
| `@primecoderin/fast-ui-react/forms` | Form fields bound to [react-hook-form](https://react-hook-form.com) | `react-hook-form` |
|
|
65
|
+
| `@primecoderin/fast-ui-react/charts` | Line, area, bar, donut, gauge charts and sparklines | `recharts` |
|
|
66
|
+
| `@primecoderin/fast-ui-react/editor` | Rich text editor | `@tiptap/core @tiptap/pm @tiptap/react @tiptap/starter-kit` |
|
|
67
|
+
| `@primecoderin/fast-ui-react/editor-forms` | The editor as a react-hook-form field | the TipTap packages and `react-hook-form` |
|
|
68
|
+
| `@primecoderin/fast-ui-react/styles.css` | The ready-made stylesheet | nothing |
|
|
69
|
+
| `@primecoderin/fast-ui-react/foundation.css` | Tokens and base rules, for an app that runs its own Tailwind 4 | nothing |
|
|
70
|
+
|
|
71
|
+
## What is in it
|
|
72
|
+
|
|
73
|
+
| Area | Examples |
|
|
74
|
+
| --- | --- |
|
|
75
|
+
| Forms | `TextField`, `TextAreaField`, `SelectField`, `CheckboxField`, `SwitchField`, `RadioGroupField`, `PhoneField`, `NumberField`, `Combobox`, `Autocomplete`, `MultiSelect`, `TagsInput`, `Slider`, `Rating`, `ColorPicker`, `OtpInput`, `FileUpload`, `MentionsInput`, and a `Form*Field` for react-hook-form |
|
|
76
|
+
| Dates | `Calendar`, `DateRangePicker`, `DateTimePicker` |
|
|
77
|
+
| Overlays | `Dialog`, `Drawer`, `Popover`, `Tooltip`, `Menu`, `ContextMenu`, `CommandPalette`, toasts (`useAppToast`), `Tour` |
|
|
78
|
+
| Layout | `Stack`, `Grid`, `Container`, `AppShell`, `ResizablePanels`, `ScrollArea`, `Separator` |
|
|
79
|
+
| Navigation | `Tabs`, `SideNav`, `NavigationMenu`, `Menubar`, `Breadcrumbs`, `Pagination`, `Stepper`, `Link` |
|
|
80
|
+
| Data display | `DataTable`, `List`, `Card`, `Stat`, `Timeline`, `TreeView`, `DescriptionList`, `Avatar`, `StatusBadge`, `SkeletonText` and the other skeletons, `Carousel`, `QRCode` |
|
|
81
|
+
| Feedback | `Alert`, `EmptyState`, `Spinner`, `ProgressBar`, toasts (`useAppToast`) |
|
|
82
|
+
| Charts | `LineChart`, `AreaChart`, `BarChart`, `DonutChart`, `GaugeChart`, `Sparkline` |
|
|
83
|
+
| Rich content | `RichTextEditor`, `CodeSnippet`, `Kbd` |
|
|
84
|
+
|
|
85
|
+
The complete list, with the import and the props of each, is the [component reference](docs/components.md). The
|
|
86
|
+
[live Storybook](https://primecoderin.github.io/fast-ui-react/) (or locally via [Develop](#develop)) shows each one
|
|
87
|
+
running, with its variants, states and keyboard behaviour.
|
|
88
|
+
|
|
89
|
+
## Who is it for
|
|
90
|
+
|
|
91
|
+
A good fit for:
|
|
92
|
+
|
|
93
|
+
- **Business applications** (admin panels, dashboards, back offices) with forms, tables, pickers, dialogs and charts.
|
|
94
|
+
- **Branded or multi-tenant apps**: one `createTheme` call changes the brand, per tenant, at run time.
|
|
95
|
+
- **Translated and right-to-left apps**: no text is built in, and every component is tested mirrored.
|
|
96
|
+
- **Teams that use Tailwind, or none**: the ready-made stylesheet needs no Tailwind in the app; an app that runs
|
|
97
|
+
Tailwind 4 imports the foundation CSS instead.
|
|
98
|
+
|
|
99
|
+
Not a fit for: Vue, Svelte or Angular (it is React only); Material Design or another prescribed look; an app that wants
|
|
100
|
+
the component source copied into its own repository (see shadcn/ui below); or one that needs a data grid or scheduler
|
|
101
|
+
today (planned, not built: see the [roadmap](ROADMAP.md)).
|
|
102
|
+
|
|
103
|
+
## Compared to
|
|
104
|
+
|
|
105
|
+
| Library | How fast-ui differs |
|
|
106
|
+
| --- | --- |
|
|
107
|
+
| **shadcn/ui** | shadcn/ui copies component source into your app, which you then own and edit. fast-ui is a versioned package you upgrade, with one theme for every component. |
|
|
108
|
+
| **MUI, Chakra UI** | These style through Emotion, a CSS-in-JS runtime, by default. fast-ui ships static CSS and has no style runtime. |
|
|
109
|
+
| **Mantine** | The closest in scope (components, dates, charts, forms, an editor). Mantine has more components, hooks, a hosted documentation site and a far larger community; fast-ui is built on Tailwind 4 and Base UI, and tests every component in dark and right to left. |
|
|
110
|
+
| **HeroUI, Radix Themes** | Also Tailwind-era libraries. HeroUI uses React Aria and Radix Themes uses Radix primitives; fast-ui uses Base UI. |
|
|
111
|
+
|
|
112
|
+
Where fast-ui is behind today: it is new, it has fewer components than the largest libraries, and it is still growing
|
|
113
|
+
its community. The [roadmap](ROADMAP.md) tracks what is planned.
|
|
114
|
+
|
|
115
|
+
## Browser support
|
|
116
|
+
|
|
117
|
+
Current Chrome, Edge, Firefox and Safari: the floor is Tailwind CSS 4's (Chrome 111, Safari 16.4, Firefox 128). The
|
|
118
|
+
tests run in Chromium. Details in [Browser support](docs/browser-support.md).
|
|
119
|
+
|
|
120
|
+
## Documentation
|
|
121
|
+
|
|
122
|
+
These guides are Markdown in [docs/](docs/), and the same pages are in the
|
|
123
|
+
[hosted Storybook](https://primecoderin.github.io/fast-ui-react/) (and locally with `npm run storybook`, see
|
|
124
|
+
[Develop](#develop)): under **Guides**, except Testing and Design principles, which are the **Testing** and
|
|
125
|
+
**Introduction** pages.
|
|
126
|
+
|
|
127
|
+
| | |
|
|
128
|
+
| --- | --- |
|
|
129
|
+
| [Getting started](docs/getting-started.md) | Install, stylesheet, font, provider |
|
|
130
|
+
| [Next.js](docs/nextjs.md) | App Router, Pages Router, Server Components |
|
|
131
|
+
| [Theme, branding and tokens](docs/theming.md) | Brand colours, fonts, dark mode, white-label, CSP nonce, own Tailwind |
|
|
132
|
+
| [Prop conventions](docs/conventions.md) | The names every component follows |
|
|
133
|
+
| [Styling and customization](docs/customization.md) | Theme, tokens, classes, variants, composing |
|
|
134
|
+
| [TypeScript](docs/typescript.md) | Props types, generic form fields, module settings |
|
|
135
|
+
| [Forms](docs/forms.md) | Plain fields and react-hook-form fields |
|
|
136
|
+
| [Dates, files and data](docs/dates-files-data.md) | Calendars, pickers, upload, trees |
|
|
137
|
+
| [Charts](docs/charts.md) | The charts entry |
|
|
138
|
+
| [Advanced components](docs/advanced-components.md) | Command palette, panels, editor, tour |
|
|
139
|
+
| [Layout and navigation](docs/layout-and-navigation.md) | App shell, navigation, menus |
|
|
140
|
+
| [Icons](docs/icons.md) | lucide, the `icon` prop, `FAST_ICONS` |
|
|
141
|
+
| [Design principles](docs/design-principles.md) | Tokens, variants, state, presentation only |
|
|
142
|
+
| [Internationalization](docs/internationalization.md) | Translation, right to left, locales |
|
|
143
|
+
| [Testing](docs/testing.md) | Finding components in Playwright tests |
|
|
144
|
+
| [Accessibility](docs/accessibility.md) | What is built in, how it is tested, the limits |
|
|
145
|
+
| [Browser support](docs/browser-support.md) | Supported browsers |
|
|
146
|
+
| [Components](docs/components.md) | Every component and its props |
|
|
147
|
+
| [Troubleshooting and FAQ](docs/faq.md) | Common problems |
|
|
148
|
+
| [Architecture](docs/architecture.md) | How the package is built |
|
|
149
|
+
| [AI coding assistants](docs/ai-assistants.md) | The MCP server and `llms.txt` |
|
|
150
|
+
| [Changelog](CHANGELOG.md) · [Roadmap](ROADMAP.md) | What changed, what is planned |
|
|
151
|
+
|
|
152
|
+
## Getting help
|
|
153
|
+
|
|
154
|
+
Start with [Troubleshooting and FAQ](docs/faq.md); then open an issue (bug report and feature request templates are
|
|
155
|
+
provided). See [SUPPORT.md](SUPPORT.md). A coding assistant can use [llms.txt](llms.txt) or the
|
|
156
|
+
[MCP server](mcp/README.md).
|
|
157
|
+
|
|
158
|
+
## Develop
|
|
159
|
+
|
|
160
|
+
Storybook is the interactive documentation: every component running with its props, variants, states and
|
|
161
|
+
keyboard behaviour, and the guides below under **Guides**. It needs Node 24 or later, which developing the package
|
|
162
|
+
needs and using it does not.
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
npm install
|
|
166
|
+
npm run storybook # http://localhost:6006
|
|
167
|
+
npm test # every test: unit, then every story light, dark and right to left
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
[CONTRIBUTING.md](CONTRIBUTING.md) has the commands, the definition of done for a component and how to submit a
|
|
171
|
+
change. Maintainers: [Releasing](docs/releasing.md).
|
|
172
|
+
|
|
173
|
+
## Status and versioning
|
|
174
|
+
|
|
175
|
+
The package follows [semantic versioning](https://semver.org): breaking changes ship only in a major version and are
|
|
176
|
+
marked in [the changelog](CHANGELOG.md). The [roadmap](ROADMAP.md) lists what is planned.
|
|
177
|
+
|
|
178
|
+
## Licence
|
|
179
|
+
|
|
180
|
+
[MIT](LICENSE). The bundled Inter font is under the SIL Open Font License; its licence ships next to the font files.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, flags) => {
|
|
4
|
+
let target = Object.setPrototypeOf({}, null);
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
if (!(flags & 1)) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
+
return flags & 2 ? target : Object.preventExtensions(target);
|
|
11
|
+
};
|
|
12
|
+
export { __exportAll };
|
package/dist/charts.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type { CartesianChartProps, ChartDatum, ChartSeries } from "./patterns/Charts/chart-parts.js";
|
|
2
|
+
export { LineChart, type LineChartProps } from "./patterns/Charts/LineChart.js";
|
|
3
|
+
export { AreaChart, type AreaChartProps } from "./patterns/Charts/AreaChart.js";
|
|
4
|
+
export { BarChart, type BarChartProps } from "./patterns/Charts/BarChart.js";
|
|
5
|
+
export { DonutChart, type DonutChartProps, type DonutSlice } from "./patterns/Charts/DonutChart.js";
|
|
6
|
+
export { Sparkline, type SparklineProps } from "./patterns/Charts/Sparkline.js";
|
|
7
|
+
export { GaugeChart, type GaugeBand, type GaugeChartProps } from "./patterns/Charts/GaugeChart.js";
|
package/dist/charts.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LineChart } from "./patterns/Charts/LineChart.js";
|
|
2
|
+
import { AreaChart } from "./patterns/Charts/AreaChart.js";
|
|
3
|
+
import { BarChart } from "./patterns/Charts/BarChart.js";
|
|
4
|
+
import { DonutChart } from "./patterns/Charts/DonutChart.js";
|
|
5
|
+
import { Sparkline } from "./patterns/Charts/Sparkline.js";
|
|
6
|
+
import { GaugeChart } from "./patterns/Charts/GaugeChart.js";
|
|
7
|
+
export { AreaChart, BarChart, DonutChart, GaugeChart, LineChart, Sparkline };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type AvatarSize = 24 | 30 | 32 | 38 | 40;
|
|
2
|
+
export interface AvatarProps {
|
|
3
|
+
/** The person's name; the initials of its first and last word are shown. */
|
|
4
|
+
name?: string | undefined;
|
|
5
|
+
size?: AvatarSize | undefined;
|
|
6
|
+
tone?: "solid" | "soft" | undefined;
|
|
7
|
+
className?: string | undefined;
|
|
8
|
+
}
|
|
9
|
+
/** The initials of a name's first and last words, e.g. "Jane Ann Doe" → "JD". */
|
|
10
|
+
export declare const getInitials: (name: string) => string;
|
|
11
|
+
/** A round badge with a person's initials, or a generic person when there is no name. Decorative. */
|
|
12
|
+
export declare const Avatar: ({ name, size, tone, className }: AvatarProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
|
|
4
|
+
import { UserRound } from "lucide-react";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
import { cn } from "../../utils/cn.js";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
// src/components/Avatar/Avatar.tsx
|
|
9
|
+
/**
|
|
10
|
+
* A disc with a person's initials. "solid" is the teal disc with dark initials
|
|
11
|
+
* (the dark-on-teal pairing, never white); "soft" is Figma's list avatar, the
|
|
12
|
+
* light teal with teal initials. Sizes 24, 30, 32, 38 and 40px.
|
|
13
|
+
*/
|
|
14
|
+
var avatarVariants = cva("inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full leading-none font-semibold select-none", {
|
|
15
|
+
variants: {
|
|
16
|
+
tone: {
|
|
17
|
+
solid: "bg-primary text-on-primary",
|
|
18
|
+
soft: "bg-primary-light text-primary-text"
|
|
19
|
+
},
|
|
20
|
+
size: {
|
|
21
|
+
24: "size-6 text-micro",
|
|
22
|
+
30: "size-7.5 text-caption",
|
|
23
|
+
32: "size-8 text-caption",
|
|
24
|
+
38: "size-9.5 text-caption",
|
|
25
|
+
40: "size-10 text-body"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
tone: "solid",
|
|
30
|
+
size: 32
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
/** The initials of a name's first and last words, e.g. "Jane Ann Doe" → "JD". */
|
|
34
|
+
var getInitials = (name) => {
|
|
35
|
+
const words = name.trim().split(/\s+/).filter(Boolean);
|
|
36
|
+
const initialOf = (word) => word ? Array.from(word)[0] ?? "" : "";
|
|
37
|
+
return (initialOf(words[0]) + (words.length > 1 ? initialOf(words[words.length - 1]) : "")).toUpperCase();
|
|
38
|
+
};
|
|
39
|
+
/** A round badge with a person's initials, or a generic person when there is no name. Decorative. */
|
|
40
|
+
var Avatar = (t0) => {
|
|
41
|
+
const $ = c(13);
|
|
42
|
+
const { name: t1, size: t2, tone: t3, className } = t0;
|
|
43
|
+
const name = t1 === void 0 ? "" : t1;
|
|
44
|
+
const size = t2 === void 0 ? 32 : t2;
|
|
45
|
+
const tone = t3 === void 0 ? "solid" : t3;
|
|
46
|
+
let t4;
|
|
47
|
+
if ($[0] !== name) {
|
|
48
|
+
t4 = getInitials(name);
|
|
49
|
+
$[0] = name;
|
|
50
|
+
$[1] = t4;
|
|
51
|
+
} else t4 = $[1];
|
|
52
|
+
const initials = t4;
|
|
53
|
+
let t5;
|
|
54
|
+
if ($[2] !== className || $[3] !== size || $[4] !== tone) {
|
|
55
|
+
t5 = cn(avatarVariants({
|
|
56
|
+
size,
|
|
57
|
+
tone
|
|
58
|
+
}), className);
|
|
59
|
+
$[2] = className;
|
|
60
|
+
$[3] = size;
|
|
61
|
+
$[4] = tone;
|
|
62
|
+
$[5] = t5;
|
|
63
|
+
} else t5 = $[5];
|
|
64
|
+
let t6;
|
|
65
|
+
if ($[6] !== initials) {
|
|
66
|
+
t6 = initials || /* @__PURE__ */ jsx(UserRound, {});
|
|
67
|
+
$[6] = initials;
|
|
68
|
+
$[7] = t6;
|
|
69
|
+
} else t6 = $[7];
|
|
70
|
+
let t7;
|
|
71
|
+
if ($[8] !== t6) {
|
|
72
|
+
t7 = /* @__PURE__ */ jsx(Avatar$1.Fallback, {
|
|
73
|
+
className: "inline-flex size-full items-center justify-center [&>svg]:size-[1.25em]",
|
|
74
|
+
children: t6
|
|
75
|
+
});
|
|
76
|
+
$[8] = t6;
|
|
77
|
+
$[9] = t7;
|
|
78
|
+
} else t7 = $[9];
|
|
79
|
+
let t8;
|
|
80
|
+
if ($[10] !== t5 || $[11] !== t7) {
|
|
81
|
+
t8 = /* @__PURE__ */ jsx(Avatar$1.Root, {
|
|
82
|
+
className: t5,
|
|
83
|
+
"aria-hidden": "true",
|
|
84
|
+
children: t7
|
|
85
|
+
});
|
|
86
|
+
$[10] = t5;
|
|
87
|
+
$[11] = t7;
|
|
88
|
+
$[12] = t8;
|
|
89
|
+
} else t8 = $[12];
|
|
90
|
+
return t8;
|
|
91
|
+
};
|
|
92
|
+
export { Avatar, getInitials };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
/**
|
|
4
|
+
* The variants, as the Figma file names its buttons (`.button-*`):
|
|
5
|
+
* primary button-primary the teal fill with a soft teal glow; once per view, for the main action
|
|
6
|
+
* secondary button-secondary white with a grey border, teal on hover: Cancel, Filters, and the default
|
|
7
|
+
* subtle button-ghost no chrome until hovered: quiet actions in a toolbar
|
|
8
|
+
* destructive button-danger red fill
|
|
9
|
+
* icon the row-menu dots, a dialog's close: a glyph that tints teal on hover (give it no children)
|
|
10
|
+
* and two more, which Figma's button set does not name:
|
|
11
|
+
* outline teal outline and teal text
|
|
12
|
+
* tertiary teal text, underlined on hover
|
|
13
|
+
*
|
|
14
|
+
* Sizes: medium is Figma's 42px button (`padding: 0 16px`, 13px semibold, 17px
|
|
15
|
+
* icons, 8px apart); small is 30px, large 48px. An icon-only button is a square
|
|
16
|
+
* of the same height (the 42px back button, the 30px row-menu dots). Every
|
|
17
|
+
* variant dims to 48% when disabled, as in the file.
|
|
18
|
+
*/
|
|
19
|
+
declare const buttonVariants: (props?: ({
|
|
20
|
+
variant?: "primary" | "secondary" | "outline" | "tertiary" | "subtle" | "destructive" | "icon" | null | undefined;
|
|
21
|
+
size?: "small" | "medium" | "large" | null | undefined;
|
|
22
|
+
iconOnly?: boolean | null | undefined;
|
|
23
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
24
|
+
export type ButtonVariant = NonNullable<VariantProps<typeof buttonVariants>["variant"]>;
|
|
25
|
+
/**
|
|
26
|
+
* A button-only contract: native button attributes plus the few props this app
|
|
27
|
+
* uses. Links are built with a router Link, not by turning this into an anchor.
|
|
28
|
+
*/
|
|
29
|
+
export interface ButtonProps extends Omit<ComponentPropsWithoutRef<"button">, "color">, Pick<VariantProps<typeof buttonVariants>, "variant" | "size"> {
|
|
30
|
+
/** An icon sized by the button's size. Decorative: give an icon-only button an `aria-label`. */
|
|
31
|
+
icon?: ReactNode | undefined;
|
|
32
|
+
iconPosition?: "before" | "after" | undefined;
|
|
33
|
+
/** Looks disabled and ignores clicks, but stays in the tab order. */
|
|
34
|
+
disabledFocusable?: boolean | undefined;
|
|
35
|
+
/** Shows a spinner and blocks clicks while keeping the button focusable. */
|
|
36
|
+
isLoading?: boolean | undefined;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A native button in one of the variants: primary for the one main action of a view, secondary (the
|
|
40
|
+
* default) for the rest, subtle in a toolbar, destructive to delete, icon for a lone glyph. Its type is
|
|
41
|
+
* "button" unless another is given, so it never submits a form by accident.
|
|
42
|
+
*/
|
|
43
|
+
export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
44
|
+
export {};
|