@primecoderin/fast-ui-react 0.0.0-stage → 0.1.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 +90 -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 +41 -0
- package/docs/testing.md +242 -0
- package/docs/theming.md +118 -0
- package/docs/typescript.md +62 -0
- package/llms-full.txt +4574 -0
- package/llms.txt +52 -0
- package/package.json +166 -6
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Advanced components
|
|
2
|
+
|
|
3
|
+
| For | Use |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| A search over commands, opened from a shortcut | `CommandPalette` (the app opens it, usually on Ctrl or Cmd and K) |
|
|
6
|
+
| Panels with draggable, keyboard-operable dividers | `ResizablePanels` |
|
|
7
|
+
| Moving items between two lists | `TransferList` |
|
|
8
|
+
| Choosing through levels (country, region, city) | `Cascader` |
|
|
9
|
+
| A text area that suggests people after "@" | `MentionsInput` |
|
|
10
|
+
| A guided walk through the page | `Tour` (a ring and a card for each step) |
|
|
11
|
+
| The page's main action in a corner | `FloatingActionButton` (with `actions`, it opens a menu) |
|
|
12
|
+
| A QR code for a link | `QRCode` (SVG, black on white whatever the theme) |
|
|
13
|
+
| Formatted text | `RichTextEditor`, from [its own entry](#rich-text) |
|
|
14
|
+
|
|
15
|
+
`QRCode` always draws dark on light, because a code with its colours inverted is not read by every scanner. It is an
|
|
16
|
+
image to a screen reader, named by `aria-label`: put the address in text beside it.
|
|
17
|
+
|
|
18
|
+
## Rich text
|
|
19
|
+
|
|
20
|
+
The editor is built on [TipTap](https://tiptap.dev), which an app installs only if it uses the editor:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install @tiptap/core @tiptap/pm @tiptap/react @tiptap/starter-kit
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
import { RichTextEditor } from "@primecoderin/fast-ui-react/editor";
|
|
28
|
+
import { FormRichTextField } from "@primecoderin/fast-ui-react/editor-forms"; // with react-hook-form
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The two are separate entries so that using the editor alone does not need `react-hook-form`, and using the forms
|
|
32
|
+
without the editor does not need TipTap. The value is HTML, with paragraphs, two heading levels, bulleted and
|
|
33
|
+
numbered lists, bold, italic, links and line breaks (Shift+Enter): only what the toolbar makes. Other elements,
|
|
34
|
+
pasted or typed through a shortcut, are dropped, and a link keeps only its address (no `class`, `target`, `rel`
|
|
35
|
+
or `title`). Ctrl or Cmd+K opens the link field; an address that is not allowed (`javascript:`) keeps it open,
|
|
36
|
+
marked invalid. **Clean the HTML on your server before showing text that another person wrote**: the editor's
|
|
37
|
+
schema limits what it writes, but a client can send anything. The editor's own `<style>` carries the provider's
|
|
38
|
+
nonce. Every text (the toolbar's names, the link field's buttons) comes through `labels`.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# AI coding assistants
|
|
2
|
+
|
|
3
|
+
Two things help an assistant (Claude Code, Cursor, Copilot, Windsurf and others) use the package correctly: the
|
|
4
|
+
`llms.txt` files, which need no setup, and an MCP server, which answers questions on demand. Both are generated from
|
|
5
|
+
the source, so they match the version installed.
|
|
6
|
+
|
|
7
|
+
## llms.txt and llms-full.txt
|
|
8
|
+
|
|
9
|
+
The package ships two plain Markdown files, following the [llms.txt](https://llmstxt.org) convention:
|
|
10
|
+
|
|
11
|
+
- **`llms.txt`** is a short index: the rules to know before writing code (what to import, no built-in text, tokens
|
|
12
|
+
instead of colour values) and a link with one line to each guide.
|
|
13
|
+
- **`llms-full.txt`** is the guides, the design tokens and the reference of every component with its props, in one
|
|
14
|
+
file, for loading whole into a context window.
|
|
15
|
+
|
|
16
|
+
They are in the installed package, so a project can point its assistant at them without a network:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
node_modules/@primecoderin/fast-ui-react/llms.txt
|
|
20
|
+
node_modules/@primecoderin/fast-ui-react/llms-full.txt
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For example, in a `CLAUDE.md` or `AGENTS.md`: "UI components come from `@primecoderin/fast-ui-react`; read
|
|
24
|
+
`node_modules/@primecoderin/fast-ui-react/llms.txt` before using them." Or give the files to a tool that takes documentation
|
|
25
|
+
as a file or a URL. In this repository, `npm run docs` regenerates them.
|
|
26
|
+
|
|
27
|
+
## The MCP server
|
|
28
|
+
|
|
29
|
+
`@primecoderin/fast-ui-react-mcp` gives Claude Code, Cursor, VS Code and other assistants the library's exact API: every
|
|
30
|
+
component's props with types and defaults, the tokens, these guides and tested examples. Add it once:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
claude mcp add fast-ui -- npx -y @primecoderin/fast-ui-react-mcp
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Other clients, and what it offers: [the MCP server's README](https://github.com/primecoderIN/fast-ui-react/blob/master/mcp/README.md).
|
|
37
|
+
|
|
38
|
+
## Which one
|
|
39
|
+
|
|
40
|
+
| | llms.txt | MCP server |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| Setup | none: a file in `node_modules` | one command, and `npx` at run time |
|
|
43
|
+
| Cost | the file's tokens whenever it is loaded (`llms-full.txt` is large) | only the answer to each question |
|
|
44
|
+
| Best for | a rule in the project's instructions; tools without MCP | looking up one component's props or an example while coding |
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
How the package is put together: what is in the repository, how it is built and what an app receives.
|
|
4
|
+
|
|
5
|
+
## The repository
|
|
6
|
+
|
|
7
|
+
| Folder | Content |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| `src/components/` | Single controls and marks: `Button`, `Menu`, `Tooltip`, `Tabs` and the like |
|
|
10
|
+
| `src/patterns/` | Compositions of components: form fields, pickers, dialogs, tables, charts, the editor |
|
|
11
|
+
| `src/provider/` | `DesignSystemProvider` |
|
|
12
|
+
| `src/theme/` | `createTheme`, tenant branding, theme switching, the generated token names |
|
|
13
|
+
| `src/styles/` | The CSS: `tokens.css` (the `--fast-*` variables), `theme.css` (Tailwind's mappings), `global.css`, `fonts.css` and the generated font files |
|
|
14
|
+
| `src/hooks/`, `src/utils/`, `src/types/`, `src/icons/` | Hooks, `cn()`, shared types, the icon set |
|
|
15
|
+
| `src/index.ts`, `forms.ts`, `charts.ts`, `editor.ts`, `editor-forms.ts` | The five entries. The package exports only what these export |
|
|
16
|
+
| `stories/` | The Storybook documentation (the components, and `guides/`, which renders `docs/`), and the tests that run on it |
|
|
17
|
+
| `tests/unit/` | Pure logic, tested in Node |
|
|
18
|
+
| `mcp/` | The MCP server for coding assistants (`@primecoderin/fast-ui-react-mcp`) |
|
|
19
|
+
| `scripts/` | Generators: token names, fonts, the MCP catalogue, the component reference, `llms.txt` |
|
|
20
|
+
| `docs/` | These guides |
|
|
21
|
+
|
|
22
|
+
## The layers
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Base UI behaviour: roles, keyboard, focus, positioning (unstyled)
|
|
26
|
+
Tailwind CSS 4 every style, from the --fast-* tokens (no Tailwind palette)
|
|
27
|
+
CVA + cn() variants, and class merging with the caller's className
|
|
28
|
+
Components one concern each, no text of their own
|
|
29
|
+
Patterns compositions: the form fields, pickers, dialogs ...
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
A component imports only from this package's `src/` and its dependencies; one that needs the app's translations,
|
|
33
|
+
routing or data does not belong here. See [Prop conventions](conventions.md) for how the props are named.
|
|
34
|
+
|
|
35
|
+
## Entries and optional dependencies
|
|
36
|
+
|
|
37
|
+
The main entry never reaches an optional package. `react-hook-form`, `recharts` and TipTap each sit behind an
|
|
38
|
+
entry of their own (`/forms`, `/charts`, `/editor`, `/editor-forms`), declared as optional peer dependencies, so an
|
|
39
|
+
app that does not use them installs and bundles none of them. A unit test (`tests/unit/entries.test.ts`) fails if
|
|
40
|
+
the main entry starts importing one.
|
|
41
|
+
|
|
42
|
+
## What the build produces
|
|
43
|
+
|
|
44
|
+
| File | Made by | Content |
|
|
45
|
+
| --- | --- | --- |
|
|
46
|
+
| `dist/index.js`, `dist/**/*.js` | Vite (library mode) | one ES module per source file, `index.js` re-exporting them, so an app's bundler keeps only what it imports. Dependencies stay imports. Component modules start with `"use client"`; the pure helpers (`createTheme`, `cn`, the token names) do not, so a Server Component can call them. The React Compiler runs on it, so it imports `react/compiler-runtime` (React 19) |
|
|
47
|
+
| `dist/**/*.d.ts` | `tsc` | the type declarations |
|
|
48
|
+
| `dist/styles.css` | Tailwind CLI | the ready-made, minified stylesheet, with the font's `@font-face` rules |
|
|
49
|
+
| `dist/foundation.css`, `fonts.css`, `tokens.css`, `theme.css`, `global.css` | copied | the unprocessed foundation for apps with their own Tailwind (see [Theme, branding and tokens](theming.md)) |
|
|
50
|
+
| `dist/fonts/` | copied | Inter's variable WOFF2 files, one per character set, and the font's licence; both stylesheets point to them |
|
|
51
|
+
|
|
52
|
+
The package also ships `CHANGELOG.md`, `LICENSE`, `llms.txt` and `llms-full.txt` (see [AI coding assistants](ai-assistants.md)).
|
|
53
|
+
|
|
54
|
+
## Generated files
|
|
55
|
+
|
|
56
|
+
Do not edit these by hand; the command regenerates them.
|
|
57
|
+
|
|
58
|
+
| File | Command | From |
|
|
59
|
+
| --- | --- | --- |
|
|
60
|
+
| `src/theme/token-names.ts` | `npm run tokens` (the build runs it) | `src/styles/tokens.css` |
|
|
61
|
+
| `src/styles/fonts.css`, `src/styles/fonts/` | `npm run fonts` (the build runs it) | the `@fontsource-variable/inter` devDependency |
|
|
62
|
+
| `mcp/catalog.json` | `npm run mcp:build` (the tests run it) | the source, the stories and `docs/` |
|
|
63
|
+
| `docs/components.md`, `docs/testing.md`, `docs/design-principles.md`, `llms.txt`, `llms-full.txt` | `npm run docs` | the catalogue, the doc comments, `docs/`, `stories/testing.mdx` and `stories/introduction.mdx` |
|
|
64
|
+
|
|
65
|
+
A unit test fails while a generated file differs from what its command produces.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Browser support
|
|
2
|
+
|
|
3
|
+
The package targets current evergreen browsers. The floor comes from **Tailwind CSS 4**, whose stylesheet uses
|
|
4
|
+
`@property`, `color-mix()` and cascade layers:
|
|
5
|
+
|
|
6
|
+
| Browser | Minimum |
|
|
7
|
+
| --- | --- |
|
|
8
|
+
| Chrome and Edge | 111 |
|
|
9
|
+
| Safari and iOS Safari | 16.4 |
|
|
10
|
+
| Firefox | 128 |
|
|
11
|
+
|
|
12
|
+
These are the minimums Tailwind 4 documents, not a list this project has verified one by one.
|
|
13
|
+
|
|
14
|
+
## What is tested
|
|
15
|
+
|
|
16
|
+
The test suite runs every story in **Chromium** (through Playwright), light, dark and right to left. Safari and
|
|
17
|
+
Firefox are not part of the automated tests, so a rendering difference there is found by users, not by the build.
|
|
18
|
+
If you meet one, please report it with the browser version.
|
|
19
|
+
|
|
20
|
+
## Not supported
|
|
21
|
+
|
|
22
|
+
- Internet Explorer and the legacy (pre-Chromium) Edge.
|
|
23
|
+
- Browsers without CSS cascade layers or `color-mix()`.
|
|
24
|
+
|
|
25
|
+
Server-side rendering is supported: see [Next.js](nextjs.md).
|
|
26
|
+
|
|
27
|
+
## JavaScript
|
|
28
|
+
|
|
29
|
+
The package is ESM only and ships modern syntax (it needs `react/compiler-runtime`, so React 19). An app's bundler
|
|
30
|
+
decides what to transpile for its own targets. The types are generated by TypeScript 6; use a recent TypeScript in the app.
|
package/docs/charts.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Charts
|
|
2
|
+
|
|
3
|
+
The charts come from their own entry, `@primecoderin/fast-ui-react/charts`, so an app that draws none never loads
|
|
4
|
+
`recharts` (an optional peer, like `react-hook-form`):
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
npm install recharts
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
```tsx
|
|
11
|
+
import { BarChart, DonutChart, GaugeChart, LineChart, Sparkline } from "@primecoderin/fast-ui-react/charts";
|
|
12
|
+
|
|
13
|
+
const data = [
|
|
14
|
+
{ month: "Jan", orders: 120, returns: 12 },
|
|
15
|
+
{ month: "Feb", orders: 150, returns: 18 },
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
<LineChart
|
|
19
|
+
aria-label="Orders and returns per month"
|
|
20
|
+
data={data}
|
|
21
|
+
xKey="month"
|
|
22
|
+
xLabel="Month"
|
|
23
|
+
series={[
|
|
24
|
+
{ key: "orders", label: "Orders" },
|
|
25
|
+
{ key: "returns", label: "Returns" },
|
|
26
|
+
]}
|
|
27
|
+
/>;
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
| Chart | For |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| `LineChart` | a trend over time, a few measures side by side |
|
|
33
|
+
| `AreaChart` | a volume over time; `stacked` for how a total divides into parts |
|
|
34
|
+
| `BarChart` | a comparison between categories; `stacked` for parts of each total |
|
|
35
|
+
| `DonutChart` | how a whole splits into five parts or fewer |
|
|
36
|
+
| `GaugeChart` | one value in a range (load, quota used, a score); `bands` turn it green, amber, red as it climbs (a plain SVG, `role="meter"`) |
|
|
37
|
+
| `Sparkline` | a tiny trend, with no axes, in a card or a table row (a plain SVG, not Recharts) |
|
|
38
|
+
|
|
39
|
+
- **SVG, themed.** The charts draw SVG, so they read CSS variables: the series take the `--fast-chart-1` to
|
|
40
|
+
`--fast-chart-5` tokens in order (the first follows the primary colour, so a tenant's branding reaches the
|
|
41
|
+
charts), and the grid and axis take `--fast-chart-grid` and `--fast-chart-axis`. Each series may set its own
|
|
42
|
+
`color`, any CSS colour or variable. `getChartPalette` stays for libraries that draw to a canvas.
|
|
43
|
+
- **A table for a screen reader.** The drawing is hidden from assistive technology and the same numbers are given
|
|
44
|
+
as a table named by `aria-label`. `series[].label`, `xLabel` and the number formats come from the app, so the
|
|
45
|
+
charts hold no text of their own. A `Sparkline` is an image named by its `aria-label`; say the trend in words.
|
|
46
|
+
- **Always left to right.** The plot reads left to right on a right-to-left page too, as an axis of numbers or
|
|
47
|
+
dates does; the legend and the page around it follow the page's direction.
|
|
48
|
+
- **Series that differ by more than colour.** Line and area series after the first are dashed or dotted, and the
|
|
49
|
+
legend shows the same; bars differ by colour and position only.
|
|
50
|
+
- **Gauge value.** `aria-valuenow` stays within the gauge's min and max; `aria-valuetext` says the value as written.
|
|
51
|
+
- **Fonts.** The charts measure their axes again when the font changes (a theme, the right-to-left font, a web font
|
|
52
|
+
that finishes loading).
|
|
53
|
+
- **Motion.** The charts grow in over 400 ms, and draw at once for a visitor who asks for less motion.
|
|
54
|
+
- **Numbers.** `formatValue` and `formatX` write the axis, the tooltip and the table: `` (n) => `${n} kr` ``.
|
|
55
|
+
- **Size.** The chart fills the width of its container, and `height` (default 240) sets the plot's height; give
|
|
56
|
+
the container a width.
|