@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/dist/tokens.css
ADDED
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The design foundation as CSS custom properties: colour, font and layout
|
|
3
|
+
* measurements, taken from the design file's `:root`
|
|
4
|
+
* tokens (--primary, --ink, --muted, --soft, --line) and the values its
|
|
5
|
+
* components use.
|
|
6
|
+
*
|
|
7
|
+
* These are plain variables, not Tailwind theme values, so that they can change
|
|
8
|
+
* at runtime: `[data-theme="dark"]` swaps the colours, `dir="rtl"` swaps the
|
|
9
|
+
* font, and `applyTenantBranding()` rewrites the primary ramp for a tenant.
|
|
10
|
+
* `theme.css` exposes them to Tailwind (`bg-primary`, `text-fg-secondary`, ...);
|
|
11
|
+
* components use those utilities and never a hex value.
|
|
12
|
+
*
|
|
13
|
+
* Where the Figma file pairs a colour with a text role it fails WCAG AA (white
|
|
14
|
+
* on the teal, the light teal as text, the grey placeholder), the hue and tint
|
|
15
|
+
* stay as designed and the text gets a darker shade: the `*-text` tokens and
|
|
16
|
+
* `fg-tertiary`. The fills (`--fast-primary`, `*-solid`) are Figma's values.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
:root {
|
|
20
|
+
color-scheme: light;
|
|
21
|
+
|
|
22
|
+
/* ---------- Primary: teal ---------- */
|
|
23
|
+
/* --primary. Fills and rings only; on white it is 2.2:1, too pale for text. */
|
|
24
|
+
--fast-primary: #00c5c1;
|
|
25
|
+
--fast-primary-hover: #00afa9;
|
|
26
|
+
/* --primary-active: pressed fills, checked boxes, icons in tiles (3.7:1 on white). */
|
|
27
|
+
--fast-primary-active: #00977a;
|
|
28
|
+
/* --primary-light: tiles, chips, the active nav item. Pale: row hover, gradients. */
|
|
29
|
+
--fast-primary-light: #e9fbfa;
|
|
30
|
+
--fast-primary-pale: #f7ffff;
|
|
31
|
+
/* Teal for text and links on white, the light teal or the soft grey (4.6:1 or better). */
|
|
32
|
+
--fast-primary-text: #007d79;
|
|
33
|
+
--fast-primary-text-hover: #006b68;
|
|
34
|
+
--fast-primary-text-pressed: #00524f;
|
|
35
|
+
/* Large type only (24px, or 19px bold, and up), where 3:1 is enough: the summary figures. */
|
|
36
|
+
--fast-primary-large: #00977a;
|
|
37
|
+
/* The teal is bright, so text on it is dark, never white (2.2:1). */
|
|
38
|
+
--fast-on-primary: #111827;
|
|
39
|
+
|
|
40
|
+
/* ---------- Accent: yellow ---------- */
|
|
41
|
+
--fast-accent: #ffd400;
|
|
42
|
+
--fast-accent-light: #fff9cc;
|
|
43
|
+
/* The yellow of an icon on the light accent; the accent itself vanishes on it. */
|
|
44
|
+
--fast-accent-strong: #d4aa00;
|
|
45
|
+
--fast-on-accent: #111827;
|
|
46
|
+
|
|
47
|
+
/* ---------- Text ---------- */
|
|
48
|
+
/* --ink: headings, labels, values. */
|
|
49
|
+
--fast-fg: #111827;
|
|
50
|
+
/* Table cells, menu items, names in a list. */
|
|
51
|
+
--fast-fg-body: #344054;
|
|
52
|
+
/* --muted: descriptions, section labels, nav items. */
|
|
53
|
+
--fast-fg-secondary: #475569;
|
|
54
|
+
/* Captions, counts, placeholders (Figma's #9ca3af placeholder is 2.5:1). */
|
|
55
|
+
--fast-fg-tertiary: #667085;
|
|
56
|
+
/* Disabled text and quiet glyphs (dismiss, row menu dots). */
|
|
57
|
+
--fast-fg-disabled: #9ca3af;
|
|
58
|
+
--fast-fg-inverted: #ffffff;
|
|
59
|
+
|
|
60
|
+
/* ---------- Surfaces and borders ---------- */
|
|
61
|
+
--fast-bg: #ffffff;
|
|
62
|
+
--fast-surface: #ffffff;
|
|
63
|
+
/* Row hover: a breath of the primary on the surface, so it follows a branding (#f7fdfd with the teal). */
|
|
64
|
+
--fast-surface-hover: color-mix(in srgb, var(--fast-primary) 3%, var(--fast-surface));
|
|
65
|
+
/* --soft: the page, read-only fields, quiet panels inside a card. */
|
|
66
|
+
--fast-bg-subtle: #f3f6f8;
|
|
67
|
+
/* Table headers and progress tracks. */
|
|
68
|
+
--fast-bg-muted: #edf2f4;
|
|
69
|
+
/* Dialog footers and nested panels: a step off white. */
|
|
70
|
+
--fast-bg-faint: #f9fbfc;
|
|
71
|
+
--fast-pressed: #e5e9ec;
|
|
72
|
+
/* The page area behind the cards. */
|
|
73
|
+
--fast-canvas: #f3f6f8;
|
|
74
|
+
/* --line: card, input and table borders. Strong: dialogs and select boxes. Subtle: rows. */
|
|
75
|
+
--fast-line: #d9e0e5;
|
|
76
|
+
--fast-line-strong: #cfd8df;
|
|
77
|
+
--fast-line-subtle: #e5e9ec;
|
|
78
|
+
/* A selected row: the light primary, so it follows a branding. */
|
|
79
|
+
--fast-selected: var(--fast-primary-light);
|
|
80
|
+
--fast-overlay: rgba(17, 24, 39, 0.62);
|
|
81
|
+
/* The light veil behind a drawer. */
|
|
82
|
+
--fast-scrim: rgba(17, 24, 39, 0.12);
|
|
83
|
+
|
|
84
|
+
/* ---------- Destructive ---------- */
|
|
85
|
+
/* White text on the fill is 4.8:1 (Figma's #ef4444 gives 3.8:1). */
|
|
86
|
+
--fast-destructive: #dc2626;
|
|
87
|
+
--fast-destructive-hover: #b91c1c;
|
|
88
|
+
--fast-destructive-active: #991b1b;
|
|
89
|
+
--fast-destructive-disabled: #fca5a5;
|
|
90
|
+
/* Text and icons on a destructive or error-solid fill. */
|
|
91
|
+
--fast-on-destructive: #ffffff;
|
|
92
|
+
|
|
93
|
+
/* ---------- Focus ---------- */
|
|
94
|
+
/* The keyboard ring; 3.7:1 on white. */
|
|
95
|
+
--fast-focus: #00977a;
|
|
96
|
+
|
|
97
|
+
/* ---------- Semantic tones: solid / tint / wash / border / text ---------- */
|
|
98
|
+
/*
|
|
99
|
+
* solid icons, dots and chart marks
|
|
100
|
+
* tint behind a badge
|
|
101
|
+
* wash behind an alert or a notice
|
|
102
|
+
* border around an alert or a notification
|
|
103
|
+
* text copy on the tint, the wash or the surface
|
|
104
|
+
*/
|
|
105
|
+
--fast-tone-success-solid: #16a34a;
|
|
106
|
+
--fast-tone-success-tint: #dcfce7;
|
|
107
|
+
--fast-tone-success-wash: #ecfdf3;
|
|
108
|
+
--fast-tone-success-border: #bbf7d0;
|
|
109
|
+
--fast-tone-success-text: #15803d;
|
|
110
|
+
|
|
111
|
+
--fast-tone-warning-solid: #f59e0b;
|
|
112
|
+
--fast-tone-warning-tint: #fef3c7;
|
|
113
|
+
--fast-tone-warning-wash: #fffbeb;
|
|
114
|
+
--fast-tone-warning-border: #fde68a;
|
|
115
|
+
--fast-tone-warning-text: #b45309;
|
|
116
|
+
|
|
117
|
+
--fast-tone-error-solid: #ef4444;
|
|
118
|
+
--fast-tone-error-tint: #fee2e2;
|
|
119
|
+
--fast-tone-error-wash: #fef2f2;
|
|
120
|
+
--fast-tone-error-border: #fecaca;
|
|
121
|
+
--fast-tone-error-text: #b91c1c;
|
|
122
|
+
|
|
123
|
+
/* Like the other tones, info stays fixed when a branding changes the primary, so a red or green brand never
|
|
124
|
+
makes information look like an error or a success. What is drawn in the brand's colour uses `primary-*`. */
|
|
125
|
+
/* Info is the default teal: the "Update" notification, the Active status. */
|
|
126
|
+
--fast-tone-info-solid: #00c5c1;
|
|
127
|
+
--fast-tone-info-tint: #e9fbfa;
|
|
128
|
+
--fast-tone-info-wash: #f6ffff;
|
|
129
|
+
--fast-tone-info-border: #b8e9e7;
|
|
130
|
+
--fast-tone-info-text: #007d79;
|
|
131
|
+
/* The disc behind the info state icon. */
|
|
132
|
+
--fast-tone-info-soft: #e9fbfa;
|
|
133
|
+
|
|
134
|
+
/* Inactive, muted: present but not attention-worthy. */
|
|
135
|
+
--fast-tone-neutral-solid: #94a3b8;
|
|
136
|
+
--fast-tone-neutral-tint: #f1f5f9;
|
|
137
|
+
--fast-tone-neutral-wash: #f9fbfc;
|
|
138
|
+
--fast-tone-neutral-border: #e5e9ec;
|
|
139
|
+
--fast-tone-neutral-text: #475569;
|
|
140
|
+
|
|
141
|
+
/* Pending: the yellow accent. */
|
|
142
|
+
--fast-tone-pending-solid: #ffd400;
|
|
143
|
+
--fast-tone-pending-tint: #fff9cc;
|
|
144
|
+
--fast-tone-pending-wash: #fffde6;
|
|
145
|
+
--fast-tone-pending-border: #fff383;
|
|
146
|
+
--fast-tone-pending-text: #92400e;
|
|
147
|
+
|
|
148
|
+
--fast-tone-reserved-solid: #7c3aed;
|
|
149
|
+
--fast-tone-reserved-tint: #ede9fe;
|
|
150
|
+
--fast-tone-reserved-wash: #f5f3ff;
|
|
151
|
+
--fast-tone-reserved-border: #ddd6fe;
|
|
152
|
+
--fast-tone-reserved-text: #6d28d9;
|
|
153
|
+
|
|
154
|
+
/* ---------- Charts ---------- */
|
|
155
|
+
/* The colours of a chart's series, in order of use (five is the most to tell apart), and its grid and axis. The
|
|
156
|
+
charts read them as CSS variables, so they follow the theme; the first is the teal that holds 3:1 against the
|
|
157
|
+
surface (`primary-large`), so a tenant's branding reaches the charts. Same values as `getChartPalette`. */
|
|
158
|
+
--fast-chart-1: var(--fast-primary-large);
|
|
159
|
+
--fast-chart-2: #f59e0b;
|
|
160
|
+
--fast-chart-3: #7c3aed;
|
|
161
|
+
--fast-chart-4: #16a34a;
|
|
162
|
+
--fast-chart-5: #9ca3af;
|
|
163
|
+
--fast-chart-grid: #f3f4f6;
|
|
164
|
+
--fast-chart-axis: #6b7280;
|
|
165
|
+
|
|
166
|
+
/* ---------- Decorative ---------- */
|
|
167
|
+
/* A sky blue for a category beside the teal (a legend dot, a module tile). */
|
|
168
|
+
--fast-sky: #38bdf8;
|
|
169
|
+
--fast-sky-tint: #e0f2fe;
|
|
170
|
+
--fast-sky-text: #0369a1;
|
|
171
|
+
/* The dark hero card of a details dialog: night to teal. */
|
|
172
|
+
--fast-hero-from: #101d27;
|
|
173
|
+
--fast-hero-via: #123f45;
|
|
174
|
+
--fast-hero-to: #087f7b;
|
|
175
|
+
|
|
176
|
+
/* ---------- Type ---------- */
|
|
177
|
+
--fast-font-family: Inter, Arial, sans-serif;
|
|
178
|
+
/* Code and keys: the system's own monospace, so nothing is downloaded. Kbd and CodeSnippet use it. */
|
|
179
|
+
--fast-font-family-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
|
|
180
|
+
|
|
181
|
+
/* ---------- Layout ---------- */
|
|
182
|
+
/* AppShell and SideNav: the header's height, the side navigation's width (collapsed to icons: the second), and
|
|
183
|
+
Container's widest width. `z-sticky` is the layer of what stays in view while the page scrolls (the header);
|
|
184
|
+
popups and dialogs sit above it. */
|
|
185
|
+
--fast-size-header: 56px;
|
|
186
|
+
--fast-size-sidenav: 256px;
|
|
187
|
+
--fast-size-sidenav-collapsed: 64px;
|
|
188
|
+
--fast-container-max: 1200px;
|
|
189
|
+
--fast-z-sticky: 100;
|
|
190
|
+
|
|
191
|
+
/* ---------- Radius ---------- */
|
|
192
|
+
/* Buttons and inputs 8, nav items, menus, tiles and dialog inputs 10, cards 12,
|
|
193
|
+
dialogs and drawers 16, pills, checkboxes 4. `rounded-*` reads these. */
|
|
194
|
+
--fast-radius-check: 4px;
|
|
195
|
+
--fast-radius-sm: 6px;
|
|
196
|
+
--fast-radius-md: 8px;
|
|
197
|
+
--fast-radius-tile: 10px;
|
|
198
|
+
--fast-radius-lg: 12px;
|
|
199
|
+
--fast-radius-xl: 16px;
|
|
200
|
+
--fast-radius-pill: 999px;
|
|
201
|
+
|
|
202
|
+
/* ---------- Elevation ---------- */
|
|
203
|
+
/* `shadow-*` reads these. */
|
|
204
|
+
--fast-shadow-sm: 0 1px 3px rgba(17, 24, 39, 0.06);
|
|
205
|
+
/* A card or table resting on the page. */
|
|
206
|
+
--fast-shadow-card: 0 2px 4px rgba(17, 24, 39, 0.02);
|
|
207
|
+
/* Menus, selects, popovers. */
|
|
208
|
+
--fast-shadow-md: 0 16px 42px rgba(17, 24, 39, 0.18);
|
|
209
|
+
/* Notifications and drawers. */
|
|
210
|
+
--fast-shadow-lg: 0 20px 48px rgba(17, 24, 39, 0.2);
|
|
211
|
+
--fast-shadow-modal: 0 36px 100px rgba(17, 24, 39, 0.4);
|
|
212
|
+
/* A bar pinned to the bottom of the page, casting upward. */
|
|
213
|
+
--fast-shadow-up: 0 -10px 30px rgba(17, 24, 39, 0.05);
|
|
214
|
+
/* Glows mixed from the primary, so a tenant's colour carries through: the
|
|
215
|
+
primary button, an icon tile that floats, the active nav icon. */
|
|
216
|
+
--fast-shadow-primary: 0 5px 14px color-mix(in srgb, var(--fast-primary) 20%, transparent);
|
|
217
|
+
--fast-shadow-tile: 0 5px 14px color-mix(in srgb, var(--fast-primary-active) 10%, transparent);
|
|
218
|
+
--fast-shadow-nav: 0 2px 6px color-mix(in srgb, var(--fast-primary-active) 8%, transparent);
|
|
219
|
+
--fast-shadow-action: 0 6px 20px color-mix(in srgb, var(--fast-primary) 30%, transparent);
|
|
220
|
+
|
|
221
|
+
/* ---------- Type scale ---------- */
|
|
222
|
+
/* Figma: Display 48/900/110% · H1 36/700/120% · H2 28/700/130% · H3 22/700/130% ·
|
|
223
|
+
H4 18/600/150% · Body Large 16 · Body 14 · Body Small 13 · Caption 12/500 ·
|
|
224
|
+
Button 14/600/100% · Label 12/600/140%. Micro and tiny are the 10 and 11px
|
|
225
|
+
the file uses for table headers, badges and helper text. `text-<style>` reads
|
|
226
|
+
`--fast-text-<style>` (the size) and its `-line-height`, `-font-weight` and
|
|
227
|
+
`-letter-spacing`. */
|
|
228
|
+
--fast-text-display: 48px;
|
|
229
|
+
--fast-text-display-line-height: 110%;
|
|
230
|
+
--fast-text-display-font-weight: 900;
|
|
231
|
+
--fast-text-h1: 36px;
|
|
232
|
+
--fast-text-h1-line-height: 120%;
|
|
233
|
+
--fast-text-h1-font-weight: 700;
|
|
234
|
+
--fast-text-h2: 28px;
|
|
235
|
+
--fast-text-h2-line-height: 130%;
|
|
236
|
+
--fast-text-h2-font-weight: 700;
|
|
237
|
+
--fast-text-h3: 22px;
|
|
238
|
+
--fast-text-h3-line-height: 130%;
|
|
239
|
+
--fast-text-h3-font-weight: 700;
|
|
240
|
+
--fast-text-h4: 18px;
|
|
241
|
+
--fast-text-h4-line-height: 150%;
|
|
242
|
+
--fast-text-h4-font-weight: 600;
|
|
243
|
+
--fast-text-body-lg: 16px;
|
|
244
|
+
--fast-text-body-lg-line-height: 150%;
|
|
245
|
+
/* The page's own text too (global.css). Its line height is a ratio, not a percentage, so an element inside with
|
|
246
|
+
another font size and no line height of its own scales it instead of inheriting a fixed 21px. */
|
|
247
|
+
--fast-text-body: 14px;
|
|
248
|
+
--fast-text-body-line-height: 1.5;
|
|
249
|
+
--fast-text-body-sm: 13px;
|
|
250
|
+
--fast-text-body-sm-line-height: 150%;
|
|
251
|
+
--fast-text-caption: 12px;
|
|
252
|
+
--fast-text-caption-line-height: 150%;
|
|
253
|
+
--fast-text-caption-font-weight: 500;
|
|
254
|
+
--fast-text-tiny: 11px;
|
|
255
|
+
--fast-text-tiny-line-height: 150%;
|
|
256
|
+
--fast-text-micro: 10px;
|
|
257
|
+
--fast-text-micro-line-height: 150%;
|
|
258
|
+
--fast-text-button: 14px;
|
|
259
|
+
--fast-text-button-line-height: 100%;
|
|
260
|
+
--fast-text-button-font-weight: 600;
|
|
261
|
+
--fast-text-label: 12px;
|
|
262
|
+
--fast-text-label-line-height: 140%;
|
|
263
|
+
--fast-text-label-font-weight: 600;
|
|
264
|
+
/* The page, dialog and section-card headings. */
|
|
265
|
+
--fast-text-title: 28px;
|
|
266
|
+
--fast-text-title-line-height: 1.2;
|
|
267
|
+
--fast-text-title-font-weight: 700;
|
|
268
|
+
--fast-text-title-letter-spacing: -0.04em;
|
|
269
|
+
--fast-text-dialog-title: 23px;
|
|
270
|
+
--fast-text-dialog-title-line-height: 1.5;
|
|
271
|
+
--fast-text-dialog-title-font-weight: 700;
|
|
272
|
+
--fast-text-dialog-title-letter-spacing: -0.025em;
|
|
273
|
+
--fast-text-section: 18px;
|
|
274
|
+
--fast-text-section-line-height: 1.5;
|
|
275
|
+
--fast-text-section-font-weight: 700;
|
|
276
|
+
/* A summary figure (Stat): large type, so the `primary-large` shade holds 3:1. */
|
|
277
|
+
--fast-text-figure: 24px;
|
|
278
|
+
--fast-text-figure-line-height: 1.5;
|
|
279
|
+
--fast-text-figure-font-weight: 700;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/* Inter has no Hebrew glyphs; Hebrew uses Arial. */
|
|
283
|
+
:root[dir="rtl"] {
|
|
284
|
+
--fast-font-family: Arial, sans-serif;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/*
|
|
288
|
+
* Dark mode. Figma defines none: these keep each hue on a dark surface, with
|
|
289
|
+
* `-text` clearing 4.5:1 on its tint.
|
|
290
|
+
*/
|
|
291
|
+
:root[data-theme="dark"] {
|
|
292
|
+
color-scheme: dark;
|
|
293
|
+
|
|
294
|
+
--fast-primary-hover: #1ad0cc;
|
|
295
|
+
--fast-primary-active: #00afa9;
|
|
296
|
+
--fast-primary-light: #0b3a3f;
|
|
297
|
+
--fast-primary-pale: #0d2f33;
|
|
298
|
+
--fast-primary-text: #33deda;
|
|
299
|
+
--fast-primary-text-hover: #75e9e6;
|
|
300
|
+
--fast-primary-text-pressed: #9eefee;
|
|
301
|
+
--fast-primary-large: #33deda;
|
|
302
|
+
|
|
303
|
+
--fast-chart-2: #fbbf24;
|
|
304
|
+
--fast-chart-3: #a78bfa;
|
|
305
|
+
--fast-chart-4: #22c55e;
|
|
306
|
+
--fast-chart-grid: #2a2f3a;
|
|
307
|
+
--fast-chart-axis: #9ca3af;
|
|
308
|
+
|
|
309
|
+
--fast-accent-light: #3b3410;
|
|
310
|
+
--fast-accent-strong: #ffd400;
|
|
311
|
+
|
|
312
|
+
--fast-fg: #f3f4f6;
|
|
313
|
+
--fast-fg-body: #d6dae2;
|
|
314
|
+
--fast-fg-secondary: #b6bcc8;
|
|
315
|
+
--fast-fg-tertiary: #9aa2b1;
|
|
316
|
+
--fast-fg-disabled: #6b7280;
|
|
317
|
+
--fast-fg-inverted: #111827;
|
|
318
|
+
|
|
319
|
+
--fast-bg: #1a1d24;
|
|
320
|
+
--fast-surface: #1a1d24;
|
|
321
|
+
/* A little more of the primary than in the light theme, so the hover shows on the dark surface. */
|
|
322
|
+
--fast-surface-hover: color-mix(in srgb, var(--fast-primary) 7%, var(--fast-surface));
|
|
323
|
+
--fast-bg-subtle: #262b35;
|
|
324
|
+
--fast-bg-muted: #2a303b;
|
|
325
|
+
--fast-bg-faint: #1e222a;
|
|
326
|
+
--fast-pressed: #333a47;
|
|
327
|
+
--fast-canvas: #14171c;
|
|
328
|
+
--fast-line: #2f3542;
|
|
329
|
+
--fast-line-strong: #424959;
|
|
330
|
+
--fast-line-subtle: #2a303b;
|
|
331
|
+
/* A selected row: the pale primary (#0d2f33 with the teal), so it follows a branding. */
|
|
332
|
+
--fast-selected: var(--fast-primary-pale);
|
|
333
|
+
--fast-overlay: rgba(0, 0, 0, 0.6);
|
|
334
|
+
--fast-scrim: rgba(0, 0, 0, 0.35);
|
|
335
|
+
|
|
336
|
+
--fast-focus: #33deda;
|
|
337
|
+
|
|
338
|
+
--fast-tone-success-solid: #22c55e;
|
|
339
|
+
--fast-tone-success-tint: #14391f;
|
|
340
|
+
--fast-tone-success-wash: #0f2a1a;
|
|
341
|
+
--fast-tone-success-border: #166534;
|
|
342
|
+
--fast-tone-success-text: #86efac;
|
|
343
|
+
|
|
344
|
+
--fast-tone-warning-solid: #fbbf24;
|
|
345
|
+
--fast-tone-warning-tint: #3f2f0b;
|
|
346
|
+
--fast-tone-warning-wash: #2e2308;
|
|
347
|
+
--fast-tone-warning-border: #78571a;
|
|
348
|
+
--fast-tone-warning-text: #fcd34d;
|
|
349
|
+
|
|
350
|
+
--fast-tone-error-solid: #f87171;
|
|
351
|
+
--fast-tone-error-tint: #471b1b;
|
|
352
|
+
--fast-tone-error-wash: #331414;
|
|
353
|
+
--fast-tone-error-border: #7f2a2a;
|
|
354
|
+
--fast-tone-error-text: #fca5a5;
|
|
355
|
+
|
|
356
|
+
--fast-tone-info-solid: #22d3ee;
|
|
357
|
+
--fast-tone-info-tint: #0b3a3f;
|
|
358
|
+
--fast-tone-info-wash: #082e32;
|
|
359
|
+
--fast-tone-info-border: #155e67;
|
|
360
|
+
--fast-tone-info-text: #67e8f9;
|
|
361
|
+
--fast-tone-info-soft: #0b3a3f;
|
|
362
|
+
|
|
363
|
+
--fast-tone-neutral-solid: #9ca3af;
|
|
364
|
+
--fast-tone-neutral-tint: #2a2f3a;
|
|
365
|
+
--fast-tone-neutral-wash: #222731;
|
|
366
|
+
--fast-tone-neutral-border: #3b4252;
|
|
367
|
+
--fast-tone-neutral-text: #d1d5db;
|
|
368
|
+
|
|
369
|
+
--fast-tone-pending-solid: #ffd400;
|
|
370
|
+
--fast-tone-pending-tint: #3b3410;
|
|
371
|
+
--fast-tone-pending-wash: #2b260b;
|
|
372
|
+
--fast-tone-pending-border: #6b5d14;
|
|
373
|
+
--fast-tone-pending-text: #fde68a;
|
|
374
|
+
|
|
375
|
+
--fast-tone-reserved-solid: #a78bfa;
|
|
376
|
+
--fast-tone-reserved-tint: #2e1f5e;
|
|
377
|
+
--fast-tone-reserved-wash: #231847;
|
|
378
|
+
--fast-tone-reserved-border: #4c3a8c;
|
|
379
|
+
--fast-tone-reserved-text: #c4b5fd;
|
|
380
|
+
|
|
381
|
+
--fast-sky-tint: #0c3346;
|
|
382
|
+
--fast-sky-text: #7dd3fc;
|
|
383
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The semantic tones of the foundation. Each is a set of five colours (solid,
|
|
3
|
+
* tint, wash, border, text) defined in `styles/tokens.css` and used as
|
|
4
|
+
* utilities such as `bg-success-tint` and `text-success-text`; a component maps
|
|
5
|
+
* its `tone` prop to them with a CVA variant.
|
|
6
|
+
*/
|
|
7
|
+
export type ToneName = "success" | "warning" | "error" | "info" | "neutral" | "pending" | "reserved";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ClassValue } from "clsx";
|
|
2
|
+
/**
|
|
3
|
+
* Joins class names and resolves Tailwind conflicts, the later one winning:
|
|
4
|
+
* `cn("px-4 py-2", isCompact && "px-2", className)`. Every component passes its
|
|
5
|
+
* `className` last, so a caller can override a default.
|
|
6
|
+
*/
|
|
7
|
+
export declare const cn: (...inputs: ClassValue[]) => string;
|
package/dist/utils/cn.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import { extendTailwindMerge } from "tailwind-merge";
|
|
3
|
+
// src/utils/cn.ts
|
|
4
|
+
/**
|
|
5
|
+
* Tailwind Merge has to know the design foundation's own utility names (the
|
|
6
|
+
* ones `styles/theme.css` defines), or it treats `text-body-sm` (a font size)
|
|
7
|
+
* and `text-fg-secondary` (a colour) as one group and drops one of them.
|
|
8
|
+
*/
|
|
9
|
+
var twMerge = extendTailwindMerge({ extend: { theme: {
|
|
10
|
+
text: [
|
|
11
|
+
"display",
|
|
12
|
+
"h1",
|
|
13
|
+
"h2",
|
|
14
|
+
"h3",
|
|
15
|
+
"h4",
|
|
16
|
+
"body-lg",
|
|
17
|
+
"body",
|
|
18
|
+
"body-sm",
|
|
19
|
+
"caption",
|
|
20
|
+
"tiny",
|
|
21
|
+
"micro",
|
|
22
|
+
"button",
|
|
23
|
+
"label",
|
|
24
|
+
"title",
|
|
25
|
+
"dialog-title",
|
|
26
|
+
"section",
|
|
27
|
+
"figure"
|
|
28
|
+
],
|
|
29
|
+
radius: [
|
|
30
|
+
"pill",
|
|
31
|
+
"check",
|
|
32
|
+
"tile"
|
|
33
|
+
],
|
|
34
|
+
shadow: [
|
|
35
|
+
"card",
|
|
36
|
+
"modal",
|
|
37
|
+
"up",
|
|
38
|
+
"primary",
|
|
39
|
+
"tile",
|
|
40
|
+
"nav",
|
|
41
|
+
"action"
|
|
42
|
+
]
|
|
43
|
+
} } });
|
|
44
|
+
/**
|
|
45
|
+
* Joins class names and resolves Tailwind conflicts, the later one winning:
|
|
46
|
+
* `cn("px-4 py-2", isCompact && "px-2", className)`. Every component passes its
|
|
47
|
+
* `className` last, so a caller can override a default.
|
|
48
|
+
*/
|
|
49
|
+
var cn = (...inputs) => twMerge(clsx(inputs));
|
|
50
|
+
export { cn };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The first field a person would type into or pick from inside `container`: a
|
|
3
|
+
* text box, a text area or a select/combobox trigger. Skips the hidden inputs
|
|
4
|
+
* Base UI pairs with its checkboxes, radios and selects (they carry
|
|
5
|
+
* tabindex="-1"). Dialogs and drawers open with the cursor here, as Figma's
|
|
6
|
+
* do; with no field the caller falls back to the default focus.
|
|
7
|
+
*/
|
|
8
|
+
export declare const findFirstField: (container: HTMLElement | null) => HTMLElement | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/utils/first-field.ts
|
|
2
|
+
/**
|
|
3
|
+
* The first field a person would type into or pick from inside `container`: a
|
|
4
|
+
* text box, a text area or a select/combobox trigger. Skips the hidden inputs
|
|
5
|
+
* Base UI pairs with its checkboxes, radios and selects (they carry
|
|
6
|
+
* tabindex="-1"). Dialogs and drawers open with the cursor here, as Figma's
|
|
7
|
+
* do; with no field the caller falls back to the default focus.
|
|
8
|
+
*/
|
|
9
|
+
var findFirstField = (container) => container?.querySelector("input:not([type=\"hidden\"]):not([tabindex=\"-1\"]):not(:disabled), textarea:not(:disabled), [role=\"combobox\"]:not([data-disabled])") ?? null;
|
|
10
|
+
export { findFirstField };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** The gap between children: a step of the 4px scale, so 4 is 16px. */
|
|
2
|
+
export declare const GAP: {
|
|
3
|
+
readonly 0: "gap-0";
|
|
4
|
+
readonly 1: "gap-1";
|
|
5
|
+
readonly 2: "gap-2";
|
|
6
|
+
readonly 3: "gap-3";
|
|
7
|
+
readonly 4: "gap-4";
|
|
8
|
+
readonly 5: "gap-5";
|
|
9
|
+
readonly 6: "gap-6";
|
|
10
|
+
readonly 8: "gap-8";
|
|
11
|
+
readonly 10: "gap-10";
|
|
12
|
+
readonly 12: "gap-12";
|
|
13
|
+
};
|
|
14
|
+
export type LayoutGap = keyof typeof GAP;
|
|
15
|
+
/** Where children sit across the main direction. */
|
|
16
|
+
export declare const ALIGN: {
|
|
17
|
+
readonly start: "items-start";
|
|
18
|
+
readonly center: "items-center";
|
|
19
|
+
readonly end: "items-end";
|
|
20
|
+
readonly stretch: "items-stretch";
|
|
21
|
+
readonly baseline: "items-baseline";
|
|
22
|
+
};
|
|
23
|
+
export type LayoutAlign = keyof typeof ALIGN;
|
|
24
|
+
/** Where children sit along the main direction. */
|
|
25
|
+
export declare const JUSTIFY: {
|
|
26
|
+
readonly start: "justify-start";
|
|
27
|
+
readonly center: "justify-center";
|
|
28
|
+
readonly end: "justify-end";
|
|
29
|
+
readonly between: "justify-between";
|
|
30
|
+
};
|
|
31
|
+
export type LayoutJustify = keyof typeof JUSTIFY;
|
|
32
|
+
/** The elements a layout component may be. A landmark or a list where it is one, `div` otherwise. */
|
|
33
|
+
export type LayoutElement = "div" | "section" | "article" | "aside" | "header" | "footer" | "main" | "nav" | "ul" | "ol";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// src/utils/layout.ts
|
|
2
|
+
/** The gap between children: a step of the 4px scale, so 4 is 16px. */
|
|
3
|
+
var GAP = {
|
|
4
|
+
0: "gap-0",
|
|
5
|
+
1: "gap-1",
|
|
6
|
+
2: "gap-2",
|
|
7
|
+
3: "gap-3",
|
|
8
|
+
4: "gap-4",
|
|
9
|
+
5: "gap-5",
|
|
10
|
+
6: "gap-6",
|
|
11
|
+
8: "gap-8",
|
|
12
|
+
10: "gap-10",
|
|
13
|
+
12: "gap-12"
|
|
14
|
+
};
|
|
15
|
+
/** Where children sit across the main direction. */
|
|
16
|
+
var ALIGN = {
|
|
17
|
+
start: "items-start",
|
|
18
|
+
center: "items-center",
|
|
19
|
+
end: "items-end",
|
|
20
|
+
stretch: "items-stretch",
|
|
21
|
+
baseline: "items-baseline"
|
|
22
|
+
};
|
|
23
|
+
/** Where children sit along the main direction. */
|
|
24
|
+
var JUSTIFY = {
|
|
25
|
+
start: "justify-start",
|
|
26
|
+
center: "justify-center",
|
|
27
|
+
end: "justify-end",
|
|
28
|
+
between: "justify-between"
|
|
29
|
+
};
|
|
30
|
+
export { ALIGN, GAP, JUSTIFY };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** The positioning layer. Popups, menus and tooltips share one z-index above dialogs. */
|
|
2
|
+
export declare const positioner = "z-1200 outline-none";
|
|
3
|
+
/** The panel: Figma's context menu (10px radius, 6px padding, a deep soft shadow), fading in. */
|
|
4
|
+
export declare const popup: string;
|
|
5
|
+
/**
|
|
6
|
+
* A row in a list of choices: select option, menu item, combobox option. Teal while highlighted. Figma draws a 7px
|
|
7
|
+
* corner; the theme's small radius stands in for it, so a theme's radii reach the rows.
|
|
8
|
+
*/
|
|
9
|
+
export declare const item: string;
|
|
10
|
+
/** The slot that holds a check mark: empty and fixed-width when the item is not selected. */
|
|
11
|
+
export declare const indicator = "inline-flex w-4 shrink-0 items-center justify-center text-primary-text [&_svg]:size-4";
|
|
12
|
+
export declare const separator = "my-1 h-px bg-line";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
// src/utils/popup.ts
|
|
3
|
+
var popup_exports = /* @__PURE__ */ __exportAll({
|
|
4
|
+
indicator: () => indicator,
|
|
5
|
+
item: () => item,
|
|
6
|
+
popup: () => popup,
|
|
7
|
+
positioner: () => positioner,
|
|
8
|
+
separator: () => separator
|
|
9
|
+
});
|
|
10
|
+
/** The positioning layer. Popups, menus and tooltips share one z-index above dialogs. */
|
|
11
|
+
var positioner = "z-1200 outline-none";
|
|
12
|
+
/** The panel: Figma's context menu (10px radius, 6px padding, a deep soft shadow), fading in. */
|
|
13
|
+
var popup = [
|
|
14
|
+
"box-border max-h-(--available-height) overflow-y-auto rounded-tile border border-line bg-surface p-1.5 text-fg-body shadow-md outline-none",
|
|
15
|
+
"origin-(--transform-origin) transition-[opacity,scale] duration-150 ease-standard",
|
|
16
|
+
"data-starting-style:scale-98 data-starting-style:opacity-0",
|
|
17
|
+
"data-ending-style:scale-98 data-ending-style:opacity-0"
|
|
18
|
+
].join(" ");
|
|
19
|
+
/**
|
|
20
|
+
* A row in a list of choices: select option, menu item, combobox option. Teal while highlighted. Figma draws a 7px
|
|
21
|
+
* corner; the theme's small radius stands in for it, so a theme's radii reach the rows.
|
|
22
|
+
*/
|
|
23
|
+
var item = ["box-border flex min-h-9.5 cursor-default select-none items-center gap-2.25 rounded-sm px-2.5 py-1.5 text-body-sm text-fg-body outline-none", "data-highlighted:bg-primary-light data-highlighted:text-primary-text data-disabled:text-fg-disabled"].join(" ");
|
|
24
|
+
/** The slot that holds a check mark: empty and fixed-width when the item is not selected. */
|
|
25
|
+
var indicator = "inline-flex w-4 shrink-0 items-center justify-center text-primary-text [&_svg]:size-4";
|
|
26
|
+
var separator = "my-1 h-px bg-line";
|
|
27
|
+
export { indicator, item, popup, popup_exports, positioner, separator };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Accessibility
|
|
2
|
+
|
|
3
|
+
The package aims at WCAG 2.2 level AA. This page says what is built in, how it is checked and what it cannot
|
|
4
|
+
promise, so an app can plan its own testing.
|
|
5
|
+
|
|
6
|
+
## What the components do
|
|
7
|
+
|
|
8
|
+
- **Behaviour from Base UI.** Menus, selects, dialogs, tabs, tooltips, sliders and the other composite widgets
|
|
9
|
+
take their roles, states and keyboard handling from [Base UI](https://base-ui.com/react/overview/accessibility),
|
|
10
|
+
which follows the WAI-ARIA Authoring Practices.
|
|
11
|
+
- **Keyboard.** Every control works without a mouse: Tab and Shift+Tab move between controls, Enter or Space
|
|
12
|
+
activates, the arrow keys move inside menus, lists, tabs, radio groups, calendars and trees, and Escape closes
|
|
13
|
+
a popup and returns the focus to what opened it. Dialogs and panels keep the focus inside while open. The
|
|
14
|
+
keys of right-to-left layouts are mirrored.
|
|
15
|
+
- **Focus.** A visible focus ring (`ring-focus`) shows for keyboard focus only.
|
|
16
|
+
- **Contrast.** Text meets 4.5:1 (large text 3:1) in the light and dark themes. Where the brand colour is too pale
|
|
17
|
+
for text, its darker `-text` shade is used. A tenant's own primary colour is not checked: an app
|
|
18
|
+
that lets tenants pick one (see [Theme, branding and tokens](theming.md)) is responsible for its contrast.
|
|
19
|
+
- **Names and messages.** A form field's label, hint and error message are tied to its control, and an error is
|
|
20
|
+
announced when it appears. A control with no visible text takes an `aria-label`, and decorative icons are hidden
|
|
21
|
+
from assistive technology.
|
|
22
|
+
- **Motion.** Animation stops for a visitor who asks for reduced motion (`prefers-reduced-motion`): a global rule
|
|
23
|
+
in the stylesheet, and the carousel's and the tour's smooth scrolling becomes an instant jump. Nothing moves by
|
|
24
|
+
itself: the carousel has no autoplay.
|
|
25
|
+
- **Layout.** Layouts reflow at narrow widths (the `sm` breakpoint, 640px; the app shell's navigation at `md`,
|
|
26
|
+
768px), and the stylesheet does not lock the page's zoom.
|
|
27
|
+
|
|
28
|
+
## How it is checked
|
|
29
|
+
|
|
30
|
+
Every story, which is every component state, is rendered three times: light, dark and right to left. Each run
|
|
31
|
+
fails on an axe violation (`@storybook/addon-a11y` with `test: "error"`). Keyboard stories press the real keys,
|
|
32
|
+
and each component's `Interactions` story exercises its behaviour. The checks run in Chromium; see
|
|
33
|
+
[Browser support](browser-support.md).
|
|
34
|
+
|
|
35
|
+
## What it does not promise
|
|
36
|
+
|
|
37
|
+
- **Automated checks find only part of the problems.** axe finds roughly a third to a half of WCAG issues. The
|
|
38
|
+
suite does not replace a screen reader pass, and no manual assistive-technology audit is recorded for this
|
|
39
|
+
version. Test the pages an app composes, as a component's accessibility does not make a page accessible.
|
|
40
|
+
- **Bar series differ only by colour.** Lines and areas are dashed too; bars are not.
|
|
41
|
+
- **Some names need an attribute.** A `MentionsInput` named only by `id` and a `<label htmlFor>` leaves its suggestion
|
|
42
|
+
list unnamed: give it `aria-label` or `aria-labelledby`. A `DataTable` row with `onRowActivate` is announced as a
|
|
43
|
+
row, not a control: put a real link or button in a cell.
|
|
44
|
+
- **Dragging has no single-pointer alternative.** `ResizablePanels` dividers move by dragging or with the keyboard (arrow
|
|
45
|
+
keys, Home, End); WCAG 2.5.7 (dragging movements) is therefore not met. Offer preset sizes or a toggle in the app if
|
|
46
|
+
it is needed.
|
|
47
|
+
- **Reduced motion and status text.** A ProgressBar stays still under reduced motion (a full bar at half opacity);
|
|
48
|
+
a Spinner's label arrives just after it does, so a screen reader announces it.
|
|
49
|
+
- **One story is checked only as "todo".** The Toast `Interactions` story runs axe as `todo`: Base UI keeps an error
|
|
50
|
+
toast `aria-hidden` while it can still take focus, and announces it through a separate alert instead.
|
|
51
|
+
- **The app supplies the words.** Labels, error messages, alt text and page structure (headings, landmarks) are
|
|
52
|
+
the app's; the package has no text of its own to get wrong. See [Internationalization](internationalization.md).
|
|
53
|
+
- **Charts are visual.** The line, area, bar and donut charts have an accessible name and a visually hidden data
|
|
54
|
+
table that a screen reader reads instead of the drawing, so the data you pass is the data announced. A gauge is a
|
|
55
|
+
`meter` with its value; a sparkline is an image named by its `aria-label`, with no table. See [Charts](charts.md).
|
|
56
|
+
- **Windows high contrast** (`forced-colors`) is not tested yet.
|
|
57
|
+
|
|
58
|
+
## Reporting a problem
|
|
59
|
+
|
|
60
|
+
Open an issue with the component, what an assistive technology said or did, and the browser and screen reader.
|
|
61
|
+
An accessibility defect in a component is treated as a bug.
|