@facto-to/design-system 0.1.0-beta.2 → 0.1.0-beta.4
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/AI.md +2 -0
- package/README.md +11 -5
- package/dist/ai/references/api.d.ts +14 -4
- package/dist/ai/references/catalog.json +20 -1
- package/dist/ai/references/components.md +3 -3
- package/dist/ai/references/design.md +47 -30
- package/dist/ai/references/integration.md +1 -1
- package/dist/ai/references/tokens.css +77 -62
- package/dist/ai/references/version.json +3 -3
- package/dist/index.d.ts +14 -4
- package/dist/index.js +266 -236
- package/dist/styles.css +1 -1
- package/dist/tokens.css +77 -62
- package/package.json +1 -1
package/AI.md
CHANGED
|
@@ -13,6 +13,8 @@ All paths below are relative to this installed package directory:
|
|
|
13
13
|
5. For fonts/themes, read [integration.md](dist/ai/references/integration.md), [design.md](dist/ai/references/design.md) and only the relevant properties in [tokens.css](dist/tokens.css).
|
|
14
14
|
6. For composed workflows, read [composition.md](dist/ai/references/composition.md) for state ownership, async guards, layered overlays, focus and Undo behavior. Adapt the [mock recipe](dist/ai/assets/AdoptionDemo.tsx) and [scoped CSS](dist/ai/assets/adoption.css) where useful. Never replace live business data/handlers with mock example state.
|
|
15
15
|
|
|
16
|
+
Visual baseline: Facto UI Standard rules v1.2, document revision v1.2.5. Read the bundled design.md for the updated button, focus, modal, switch and responsive recipes; old Dashboard snapshots do not override them.
|
|
17
|
+
|
|
16
18
|
Quick constraints: React/React DOM 19; styles.css includes tokens; fonts.css registers Inter and must be imported to load it. Legacy HTML is not automatically restyled. SearchField uses native onChange; EnhancedSearchField and Select use onValueChange; Button defaults to type="button"; Toast is composed of provider/root/viewport, not toast.success(). There is no exported data table, chart, date picker or router.
|
|
17
19
|
|
|
18
20
|
## Optional skill installation
|
package/README.md
CHANGED
|
@@ -10,6 +10,12 @@ Repository access is controlled separately from the public npm package; installi
|
|
|
10
10
|
|
|
11
11
|
Coding assistants: start with [AI.md](./AI.md). This package includes the version-matched [Facto UI Skill](./dist/ai/SKILL.md), component catalog, declarations, tokens and tested mock recipe. Use it to create UI or migrate components/styles across existing frontend repositories while preserving business behavior. No MCP, GitHub access or separately downloaded documentation is required after npm installation. The skill can also be installed into Codex or Claude Code; see AI.md.
|
|
12
12
|
|
|
13
|
+
## Visual revision: 0.1.0-beta.4
|
|
14
|
+
|
|
15
|
+
Adopts Facto UI Standard rules v1.2 / document revision v1.2.5. This is a visual migration: existing callbacks, controlled/uncontrolled state, validation and Radix overlay behavior are retained. The payment/connection SDK is unaffected.
|
|
16
|
+
|
|
17
|
+
Defaults now use pill buttons, dark single-layer field focus, 44px targets, quieter 16px cards, semantic feedback colors and 20px modal padding. DialogContent now defaults to `size="sm"` (maximum 400px); explicit `size="md"` is the 580px wide legacy variant. Review consumers that override dimensions or depend on the old visual defaults. Use shared `Icon`, `ModalHeader` and `ModalFooter` for consistent overlay composition. See the bundled [visual contract](./dist/ai/references/design.md) for exact recipes and acceptance guidance.
|
|
18
|
+
|
|
13
19
|
## Requirements
|
|
14
20
|
|
|
15
21
|
- React and React DOM 19.
|
|
@@ -21,13 +27,13 @@ Coding assistants: start with [AI.md](./AI.md). This package includes the versio
|
|
|
21
27
|
Install the beta (requires React 19):
|
|
22
28
|
|
|
23
29
|
```sh
|
|
24
|
-
npm install @facto-to/design-system@0.1.0-beta.
|
|
30
|
+
npm install @facto-to/design-system@0.1.0-beta.4 react@^19 react-dom@^19
|
|
25
31
|
```
|
|
26
32
|
|
|
27
33
|
For local development, you can also install a generated archive:
|
|
28
34
|
|
|
29
35
|
```sh
|
|
30
|
-
npm install /path/to/facto-to-design-system-0.1.0-beta.
|
|
36
|
+
npm install /path/to/facto-to-design-system-0.1.0-beta.4.tgz
|
|
31
37
|
```
|
|
32
38
|
|
|
33
39
|
## Usage
|
|
@@ -130,7 +136,7 @@ Toasts use a provider and a single viewport per notification group. Manage notif
|
|
|
130
136
|
|
|
131
137
|
Both examples assume the named components are imported from `@facto-to/design-system`. Tooltip content and the toast viewport are portalled to the document body; theme overrides remain scoped through `FactoTheme`. Toasts support Radix's keyboard, hover/focus pause, and swipe interactions. Toast surfaces retain Radix's default `touch-action: none` while handling swipe gestures. Tooltip and toast colors may be overridden with `--facto-tooltip-background`, `--facto-tooltip-foreground`, `--facto-toast-background`, and `--facto-toast-foreground`; they otherwise use the documented source defaults. Layer tokens are `--facto-layer-tooltip` and `--facto-layer-toast`.
|
|
132
138
|
|
|
133
|
-
`SearchField` follows the Dashboard list filter: a
|
|
139
|
+
`SearchField` follows the Dashboard list filter: a neutral filled native search input, without an added icon or clear button. It supports native `value`/`onChange`, uncontrolled `defaultValue`, and form reset. Provide an accessible name via `label` or `aria-label`.
|
|
134
140
|
|
|
135
141
|
```tsx
|
|
136
142
|
<SearchField aria-label="Search pipelines" value={query} onChange={event => setQuery(event.target.value)} />
|
|
@@ -140,10 +146,10 @@ Both examples assume the named components are imported from `@facto-to/design-sy
|
|
|
140
146
|
|
|
141
147
|
## Source fidelity and library extensions
|
|
142
148
|
|
|
143
|
-
- Toast
|
|
149
|
+
- Toast uses the v1.2 feedback recipe: semantic status colors, 12px radius, 12px × 16px padding and 14/20 copy. Existing 2600ms duration and bottom-center placement remain unchanged; desktop offset is 24px, mobile 16px.
|
|
144
150
|
- The source notification API displays one entry at a time. This library retains composable Radix roots instead of exporting the source's global `toast.success()` store. Optional close/action buttons, multiple notifications, swipe, and pause behavior are extensions. Use `ToastAction` for a dedicated accessible action; the default toast surface is not a click target.
|
|
145
151
|
- Tooltip defaults follow the shared compact dark tooltip, without an arrow. `variant="content"` follows the white merchant-detail tooltip override. Provider delay defaults to 300ms. The source's utility-based entrance/exit animations are not reproduced.
|
|
146
|
-
- SearchField
|
|
152
|
+
- SearchField uses the shared 44px minimum-height neutral input recipe and native events. EnhancedSearchField is an optional richer control, not a source-exact Dashboard widget.
|
|
147
153
|
- Overlay layer values are adapted to this library's shared stacking order. They are configurable and intentionally differ from the source application's z-index values.
|
|
148
154
|
- Visual baseline checks cover named properties and states; they do not certify every component, interaction, or browser as pixel-identical to the original application.
|
|
149
155
|
|
|
@@ -4,7 +4,7 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
|
4
4
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
5
5
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
6
6
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
7
|
-
import type { AnchorHTMLAttributes, ButtonHTMLAttributes, ComponentPropsWithoutRef, ComponentPropsWithRef, CSSProperties, HTMLAttributes, InputHTMLAttributes, ReactNode, TextareaHTMLAttributes } from 'react';
|
|
7
|
+
import type { AnchorHTMLAttributes, ButtonHTMLAttributes, ComponentPropsWithoutRef, ComponentPropsWithRef, CSSProperties, HTMLAttributes, InputHTMLAttributes, ReactNode, TextareaHTMLAttributes, SVGProps } from 'react';
|
|
8
8
|
import './styles.css';
|
|
9
9
|
export type FactoThemeTokens = Partial<Record<`--facto-${string}`, string | number>>;
|
|
10
10
|
type ThemeTokens = FactoThemeTokens;
|
|
@@ -16,6 +16,16 @@ export interface FactoThemeProps extends Omit<HTMLAttributes<HTMLDivElement>, 's
|
|
|
16
16
|
}
|
|
17
17
|
/** Scoped token container. Inline `--facto-*` values are forwarded to portalled overlays. */
|
|
18
18
|
export declare function FactoTheme({ className, tokens, style, ...props }: FactoThemeProps): import("react").JSX.Element;
|
|
19
|
+
/** Shared decorative symbols; name the containing control, not the glyph. */
|
|
20
|
+
export type IconName = 'close' | 'arrowLeft' | 'check' | 'chevronDown' | 'info' | 'warning';
|
|
21
|
+
export interface IconProps extends SVGProps<SVGSVGElement> {
|
|
22
|
+
name: IconName;
|
|
23
|
+
size?: number;
|
|
24
|
+
}
|
|
25
|
+
export declare function Icon({ name, size, ...props }: IconProps): import("react").JSX.Element;
|
|
26
|
+
/** Layout only: use existing Dialog/Sheet title and close primitives inside. */
|
|
27
|
+
export declare function ModalHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
28
|
+
export declare function ModalFooter({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
19
29
|
/** Button hierarchy based on the final Facto user application controls. */
|
|
20
30
|
export type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'text';
|
|
21
31
|
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
@@ -33,7 +43,7 @@ export interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonEle
|
|
|
33
43
|
size?: ButtonSize;
|
|
34
44
|
}
|
|
35
45
|
export declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
36
|
-
/**
|
|
46
|
+
/** Neutral content container with a quiet border and no elevation. */
|
|
37
47
|
export interface SurfaceProps extends HTMLAttributes<HTMLDivElement> {
|
|
38
48
|
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
39
49
|
}
|
|
@@ -129,8 +139,8 @@ export declare function TabsContent({ className, ...props }: ComponentPropsWitho
|
|
|
129
139
|
export declare const Dialog: import("react").FC<DialogPrimitive.DialogProps>;
|
|
130
140
|
export declare const DialogTrigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
131
141
|
export declare const DialogClose: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
132
|
-
export declare const DialogTitle:
|
|
133
|
-
export declare const DialogDescription:
|
|
142
|
+
export declare const DialogTitle: typeof DialogPrimitive.Title;
|
|
143
|
+
export declare const DialogDescription: typeof DialogPrimitive.Description;
|
|
134
144
|
export interface DialogContentProps extends ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
135
145
|
size?: 'sm' | 'md';
|
|
136
146
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"package": "@facto-to/design-system",
|
|
4
|
-
"packageVersion": "0.1.0-beta.
|
|
4
|
+
"packageVersion": "0.1.0-beta.4",
|
|
5
5
|
"exports": [
|
|
6
6
|
"Badge",
|
|
7
7
|
"Button",
|
|
@@ -17,7 +17,10 @@
|
|
|
17
17
|
"EmptyState",
|
|
18
18
|
"EnhancedSearchField",
|
|
19
19
|
"FactoTheme",
|
|
20
|
+
"Icon",
|
|
20
21
|
"IconButton",
|
|
22
|
+
"ModalFooter",
|
|
23
|
+
"ModalHeader",
|
|
21
24
|
"Notice",
|
|
22
25
|
"SearchField",
|
|
23
26
|
"Select",
|
|
@@ -60,11 +63,20 @@
|
|
|
60
63
|
"--facto-accent",
|
|
61
64
|
"--facto-accent-soft",
|
|
62
65
|
"--facto-accent-strong",
|
|
66
|
+
"--facto-action-danger",
|
|
67
|
+
"--facto-action-danger-hover",
|
|
68
|
+
"--facto-action-danger-pressed",
|
|
63
69
|
"--facto-action-disabled",
|
|
64
70
|
"--facto-action-disabled-text",
|
|
71
|
+
"--facto-action-link",
|
|
72
|
+
"--facto-action-link-pressed",
|
|
65
73
|
"--facto-action-primary",
|
|
66
74
|
"--facto-action-primary-foreground",
|
|
67
75
|
"--facto-action-primary-hover",
|
|
76
|
+
"--facto-action-primary-pressed",
|
|
77
|
+
"--facto-action-secondary",
|
|
78
|
+
"--facto-action-secondary-hover",
|
|
79
|
+
"--facto-action-secondary-pressed",
|
|
68
80
|
"--facto-badge-padding",
|
|
69
81
|
"--facto-button-danger-padding",
|
|
70
82
|
"--facto-button-font-size",
|
|
@@ -72,10 +84,13 @@
|
|
|
72
84
|
"--facto-button-padding",
|
|
73
85
|
"--facto-button-padding-lg",
|
|
74
86
|
"--facto-button-padding-sm",
|
|
87
|
+
"--facto-button-radius",
|
|
75
88
|
"--facto-button-text-padding",
|
|
76
89
|
"--facto-canvas",
|
|
77
90
|
"--facto-checkbox-border",
|
|
78
91
|
"--facto-checkbox-foreground",
|
|
92
|
+
"--facto-control-selected-background",
|
|
93
|
+
"--facto-control-selected-foreground",
|
|
79
94
|
"--facto-control-text",
|
|
80
95
|
"--facto-danger",
|
|
81
96
|
"--facto-danger-soft",
|
|
@@ -93,7 +108,11 @@
|
|
|
93
108
|
"--facto-font-weight-regular",
|
|
94
109
|
"--facto-font-weight-semibold",
|
|
95
110
|
"--facto-icon-button-size",
|
|
111
|
+
"--facto-icon-button-visual-size",
|
|
112
|
+
"--facto-info",
|
|
113
|
+
"--facto-info-soft",
|
|
96
114
|
"--facto-input-background",
|
|
115
|
+
"--facto-input-focus-width",
|
|
97
116
|
"--facto-input-font-size",
|
|
98
117
|
"--facto-input-height",
|
|
99
118
|
"--facto-input-line-height",
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
See catalog.json for the exact runtime exports and api.d.ts for types. The catalog is generated, not a list of independent widgets: compound parts count separately. Search declarations for the selected export rather than reading all types.
|
|
4
4
|
|
|
5
|
-
- Actions: Button (primary/secondary/danger/text; sm/md/lg), IconButton (ariaLabel required). Button does not implement asChild.
|
|
5
|
+
- Actions: Button (primary/secondary/danger/text; sm/md/lg), IconButton (ariaLabel required; 44px target), Icon (shared decorative close/arrowLeft/check/chevronDown/info/warning). Button does not implement asChild.
|
|
6
6
|
- Forms: TextField, Textarea, SearchField (native events); EnhancedSearchField (string callback); Select (options + onValueChange); Checkbox and Switch (Radix checked callbacks).
|
|
7
7
|
- Layout: Surface/Card, Stack (gap 1–6), DashboardGrid, Widget, WidgetHeader, WidgetList, WidgetRow, WidgetKeyValue, WidgetAmount, WidgetAction. WidgetAction accepts href for a link; inspect its union type.
|
|
8
8
|
- Feedback: Badge (success/warning/danger/neutral), Notice (also info), EmptyState, Skeleton. Badge has no info tone. Notice and EmptyState require title, not just children.
|
|
9
9
|
- Tabs: Tabs, TabsList, TabsTrigger, TabsContent; matching value strings, keep accessible tab labels.
|
|
10
|
-
- Dialog: Dialog, DialogTrigger, DialogContent, DialogTitle, DialogDescription, DialogClose. Sheet has corresponding six parts. Use trigger/close asChild to wrap a Button; supply title and description in content.
|
|
10
|
+
- Dialog: Dialog, DialogTrigger, DialogContent, DialogTitle, DialogDescription, DialogClose. Sheet has corresponding six parts. ModalHeader/ModalFooter are optional stateless layout slots. DialogContent defaults to sm=400px; explicit md=580px is the wide legacy variant. Use trigger/close asChild to wrap a Button; supply title and description in content.
|
|
11
11
|
- Tooltip: TooltipProvider, Tooltip, TooltipTrigger, TooltipContent. Trigger asChild with a focusable control; default compact dark tooltip, variant="content" for white expanded content. Provider delay 300ms.
|
|
12
|
-
- Toast: ToastProvider, Toast, ToastTitle, ToastDescription, ToastAction, ToastClose, ToastViewport. App controls open/onOpenChange. Default duration 2600ms, bottom center,
|
|
12
|
+
- Toast: ToastProvider, Toast, ToastTitle, ToastDescription, ToastAction, ToastClose, ToastViewport. App controls open/onOpenChange. Default duration 2600ms, bottom center, semantic status surface and matching text/icon. One viewport per group. ToastAction requires altText. No imperative global notification store is exported.
|
|
13
13
|
- Theme: FactoTheme and FactoThemeTokens type. Defaults work without custom values; inline token overrides are forwarded to portals.
|
|
14
14
|
|
|
15
15
|
There is no exported Table, DataTable, DatePicker, Chart, Sidebar, Form controller or router. Keep host implementations for these and apply scoped tokens, or choose a separate dependency only when the task needs it. Do not import internal dist files, copy source modules or claim shadcn-compatible props merely because the implementation uses Radix.
|
|
@@ -1,34 +1,51 @@
|
|
|
1
|
-
# Facto
|
|
1
|
+
# Facto UI visual contract
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This SDK release adopts **Facto UI Standard design rules v1.2, document revision v1.2.5 (2026-09-26)**. The default is the Dashboard light palette. Do not add a theme switch or persistence when adopting it. Existing scoped token overrides remain supported; test their contrast and portalled surfaces separately.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Use the installed `tokens.css` and component declarations. UI migration changes presentation only: preserve data, authentication, validation, disabled conditions, events, state, API calls and persistence. Dashboard business components and the payment/connection SDK are outside this package.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Common recipes
|
|
8
|
+
|
|
9
|
+
Values below are CSS pixels at a 16px root and 100% zoom. Font tokens use rem so text can grow.
|
|
10
|
+
|
|
11
|
+
| Role | Recipe |
|
|
8
12
|
| --- | --- |
|
|
9
|
-
|
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
13
|
+
| Body / helper / error | Inter 14/20, weight 400 |
|
|
14
|
+
| Page / sheet / section heading | 24/32, 20/28, 16/24; weight 600 |
|
|
15
|
+
| Input text / field label | 16/24/400; external label 14/20/500 |
|
|
16
|
+
| Badge / metadata | 12/16; weight 500 / 400 |
|
|
17
|
+
| Ordinary button | Pill, 14/20/500, minimum 40 fine pointer / 44 touch or mixed, padding 8×16 |
|
|
18
|
+
| Large primary | Minimum 52, 16/24/500, padding 12×24 |
|
|
19
|
+
| Input / search / select | Minimum 44, padding 8×12, radius 12 |
|
|
20
|
+
| Card | Radius 16, no shadow; padding 24, compact 20, narrow content 16 |
|
|
21
|
+
| Modal | Default maximum 400, padding 20 on every size, radius 24; header/body/footer gap 20 |
|
|
22
|
+
| Menu | Padding 12, radius 12; items minimum 44, padding 8×12, 14/20/500 |
|
|
23
|
+
| Switch | 44×44 hit target; 34×20 track, white 16px thumb; checked #00d66f |
|
|
24
|
+
| Icon button | 44×44 hit target; visible sm 28 / md 38 / lg 44 circle |
|
|
25
|
+
| Notice / Toast | Padding 12×16, gap 8, radius 12; text 14/20 |
|
|
26
|
+
|
|
27
|
+
Primary actions are near black, secondary actions soft gray, destructive actions dark red. All roles use the same pill geometry and disabled treatment. Do not use an outlined rectangle for an ordinary secondary action. Use natural content width; `fullWidth` is an explicit composition choice, not a universal modal rule.
|
|
28
|
+
|
|
29
|
+
Canvas #f5f5f4, surface #ffffff, subtle #f3f3f2, text #121411, muted #62655f. Status pairs: success #0b6b4b/#e7fbf2, warning #805300/#fff7df, danger #9f2333/#fff0f2, info #175c9c/#eaf3fb. Brand #00d64f is restrained emphasis, not a universal white-text button background. Decorative lines use #e7e7e5; do not add dark borders to every button for contrast.
|
|
30
|
+
|
|
31
|
+
## Focus and state
|
|
32
|
+
|
|
33
|
+
TextField, Textarea, both search fields and Select have a gray idle surface (#f5f5f5), transparent border, and **white focused surface with one dark 2px inset outline, offset −2px, no shadow**. Pointer and keyboard focus use the same field recipe. Invalid fields retain their error border and associated message; readonly remains readable and selectable. Compound search fields have a single outer focus edge.
|
|
34
|
+
|
|
35
|
+
Other controls use a dark 2px keyboard-only external outline, offset 2px. Focus is not green. Forced-colors uses the system Highlight color. Disabled controls retain their geometry and use disabled tokens. Verify hover, pressed, focus, disabled, loading and selected states; do not change their triggering conditions.
|
|
36
|
+
|
|
37
|
+
## Overlays and layout
|
|
38
|
+
|
|
39
|
+
Use `ModalHeader` / `ModalFooter` as presentation slots. A close control composes the existing `DialogClose` or `SheetClose` with `IconButton size="sm" className="facto-modal-close"` and `<Icon name="close" />`. The visible 28px circle aligns with the content's right edge; the 44px target extends into the padding. Retain native button semantics, Radix focus trapping, Escape dismissal and focus restoration.
|
|
40
|
+
|
|
41
|
+
`DialogContent` defaults to compact `size="sm"` (400). Explicit `size="md"` is the 580px legacy wide variant; use it only for content that needs the width. `SheetContent side="center"` uses 400 on desktop and preserves the existing bottom-sheet shape on narrow screens. `side="right"` is the 480px details drawer. Floating overlays keep at least 16px screen gutter, separately from internal padding. Long content must scroll, including in short landscape windows.
|
|
42
|
+
|
|
43
|
+
Use existing layouts rather than importing Dashboard feature code. A profile/settings column should be at most 640px and centered in the main area after the sidebar; its text remains left aligned. Tables, navigation and domain forms remain consumer-owned. DashboardGrid is a compact widget composition, not a page shell.
|
|
44
|
+
|
|
45
|
+
## Verify each consumer
|
|
46
|
+
|
|
47
|
+
Import `fonts.css` and verify Inter actually loads. Test desktop 1440, tablet 834, mobile 390, 320px reflow, short height, touch/mixed input, keyboard, long content, 200% text and text spacing. Keep one stateful component tree across responsive changes. Check host-style isolation and theme overrides through portals. Do not call an untested browser or physical device passed, or use a screenshot alone as a functional test.
|
|
48
|
+
|
|
49
|
+
## Upgrading older visual overrides
|
|
50
|
+
|
|
51
|
+
This beta intentionally changes visual defaults. `--facto-radius-control` remains the general 12px control radius; buttons now use `--facto-button-radius` (pill). Older button-specific `--facto-radius-control-sm`, `--facto-radius-control-lg` and `--facto-radius-danger` entries are retained only for migration discovery and have no styling effect; move button overrides to `--facto-button-radius`. `--facto-icon-button-size` controls the ordinary visible circle; the interactive target remains at least 44px. Prefer `--facto-icon-button-visual-size` for new adapters. `--facto-input-focus-width` still controls the inset edge (default 2px). Consumer DOM selectors targeting a direct child SVG/thumb should be reviewed: visible icon, switch and checkbox surfaces now use inner presentation spans.
|
|
@@ -7,7 +7,7 @@ Read version.json for the version used to generate this skill. Check the target
|
|
|
7
7
|
For a new compatible project with no installed package:
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
npm install --save-exact @facto-to/design-system@0.1.0-beta.
|
|
10
|
+
npm install --save-exact @facto-to/design-system@0.1.0-beta.4
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
React 19 and React DOM 19 must already be compatible with the host; do not reinstall or upgrade them blindly. No Tailwind, backend SDK, API key or runtime environment variable is required.
|
|
@@ -4,23 +4,23 @@
|
|
|
4
4
|
--facto-font-sans:
|
|
5
5
|
'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI',
|
|
6
6
|
Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
7
|
-
--facto-font-size:
|
|
8
|
-
--facto-line-height:
|
|
9
|
-
--facto-tracking:
|
|
10
|
-
--facto-font-size-label:
|
|
11
|
-
--facto-line-height-label:
|
|
12
|
-
--facto-font-size-heading-sm:
|
|
13
|
-
--facto-font-size-heading-md:
|
|
14
|
-
--facto-font-size-heading-lg:
|
|
15
|
-
--facto-line-height-heading-sm:
|
|
16
|
-
--facto-line-height-heading-md:
|
|
17
|
-
--facto-line-height-heading-lg:
|
|
18
|
-
--facto-font-size-amount:
|
|
19
|
-
--facto-line-height-amount:
|
|
7
|
+
--facto-font-size: 0.875rem;
|
|
8
|
+
--facto-line-height: 1.25rem;
|
|
9
|
+
--facto-tracking: 0;
|
|
10
|
+
--facto-font-size-label: 0.75rem;
|
|
11
|
+
--facto-line-height-label: 1rem;
|
|
12
|
+
--facto-font-size-heading-sm: 1rem;
|
|
13
|
+
--facto-font-size-heading-md: 1.25rem;
|
|
14
|
+
--facto-font-size-heading-lg: 1.5rem;
|
|
15
|
+
--facto-line-height-heading-sm: 1.5rem;
|
|
16
|
+
--facto-line-height-heading-md: 1.75rem;
|
|
17
|
+
--facto-line-height-heading-lg: 2rem;
|
|
18
|
+
--facto-font-size-amount: 1.75rem;
|
|
19
|
+
--facto-line-height-amount: 2.25rem;
|
|
20
20
|
--facto-font-weight-regular: 400;
|
|
21
21
|
--facto-font-weight-medium: 500;
|
|
22
22
|
--facto-font-weight-semibold: 600;
|
|
23
|
-
--facto-font-weight-bold:
|
|
23
|
+
--facto-font-weight-bold: 600;
|
|
24
24
|
--facto-tracking-heading: -0.035em;
|
|
25
25
|
--facto-tracking-heading-tight: -0.02em;
|
|
26
26
|
--facto-tracking-heading-lg: -0.588px;
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
--facto-surface: #fff;
|
|
29
29
|
--facto-subtle: #f3f3f2;
|
|
30
30
|
--facto-text: #121411;
|
|
31
|
-
--facto-control-text: #
|
|
32
|
-
--facto-muted: #
|
|
31
|
+
--facto-control-text: #121411;
|
|
32
|
+
--facto-muted: #62655f;
|
|
33
33
|
/* Accessible secondary copy on the existing tinted surfaces. */
|
|
34
|
-
--facto-muted-on-subtle: #
|
|
34
|
+
--facto-muted-on-subtle: #62655f;
|
|
35
35
|
--facto-line: #e7e7e5;
|
|
36
36
|
--facto-accent: #00d64f;
|
|
37
37
|
--facto-accent-strong: #0b6b4b;
|
|
@@ -39,61 +39,74 @@
|
|
|
39
39
|
--facto-success: #0b6b4b;
|
|
40
40
|
--facto-success-strong: #0b6b4b;
|
|
41
41
|
--facto-success-soft: #e7fbf2;
|
|
42
|
-
--facto-danger: #
|
|
42
|
+
--facto-danger: #9f2333;
|
|
43
43
|
--facto-danger-soft: #fff0f2;
|
|
44
|
-
|
|
45
|
-
on warning-soft; it is the only accessibility normalization in this palette. */
|
|
46
|
-
--facto-warning: #956207;
|
|
44
|
+
--facto-warning: #805300;
|
|
47
45
|
--facto-warning-soft: #fff7df;
|
|
48
|
-
--facto-
|
|
49
|
-
--facto-
|
|
46
|
+
--facto-info: #175c9c;
|
|
47
|
+
--facto-info-soft: #eaf3fb;
|
|
48
|
+
--facto-action-primary: #171716;
|
|
49
|
+
--facto-action-primary-hover: #2c2e2a;
|
|
50
|
+
--facto-action-primary-pressed: #080908;
|
|
50
51
|
--facto-action-primary-foreground: #fff;
|
|
51
|
-
--facto-action-
|
|
52
|
-
--facto-action-
|
|
53
|
-
--facto-
|
|
54
|
-
--facto-
|
|
55
|
-
--facto-
|
|
56
|
-
--facto-
|
|
57
|
-
--facto-
|
|
58
|
-
--facto-
|
|
59
|
-
--facto-
|
|
60
|
-
--facto-
|
|
52
|
+
--facto-action-secondary: #f3f3f2;
|
|
53
|
+
--facto-action-secondary-hover: #eaeae7;
|
|
54
|
+
--facto-action-secondary-pressed: #ddded9;
|
|
55
|
+
--facto-action-danger: #9f2333;
|
|
56
|
+
--facto-action-danger-hover: #851d2b;
|
|
57
|
+
--facto-action-danger-pressed: #6f1723;
|
|
58
|
+
--facto-action-link: #0b6b4b;
|
|
59
|
+
--facto-action-link-pressed: #084d36;
|
|
60
|
+
--facto-action-disabled: #eaeae7;
|
|
61
|
+
--facto-action-disabled-text: #62655f;
|
|
62
|
+
--facto-surface-border: #e7e7e5;
|
|
63
|
+
--facto-radius-control: 12px;
|
|
64
|
+
--facto-radius-input: 12px;
|
|
65
|
+
--facto-radius-card: 16px;
|
|
66
|
+
--facto-radius-dialog: 24px;
|
|
67
|
+
--facto-radius-sheet: 24px;
|
|
68
|
+
--facto-radius-sheet-mobile: 24px;
|
|
69
|
+
--facto-surface-padding: 24px;
|
|
61
70
|
--facto-widget-padding: 20px;
|
|
62
|
-
--facto-input-padding:
|
|
63
|
-
--facto-button-padding:
|
|
71
|
+
--facto-input-padding: 8px 12px;
|
|
72
|
+
--facto-button-padding: 8px 16px;
|
|
64
73
|
--facto-button-padding-sm: 8px 12px;
|
|
65
|
-
--facto-button-padding-lg:
|
|
66
|
-
--facto-button-danger-padding:
|
|
74
|
+
--facto-button-padding-lg: 12px 24px;
|
|
75
|
+
--facto-button-danger-padding: 8px 16px;
|
|
67
76
|
--facto-button-text-padding: 4px;
|
|
68
|
-
--facto-button-font-size:
|
|
69
|
-
--facto-button-line-height:
|
|
70
|
-
--facto-radius
|
|
77
|
+
--facto-button-font-size: 0.875rem;
|
|
78
|
+
--facto-button-line-height: 1.25rem;
|
|
79
|
+
--facto-button-radius: 999px;
|
|
80
|
+
--facto-radius-control-sm: 12px;
|
|
71
81
|
--facto-radius-control-lg: 12px;
|
|
72
82
|
--facto-radius-danger: 12px;
|
|
73
|
-
--facto-input-height:
|
|
83
|
+
--facto-input-height: 44px;
|
|
74
84
|
--facto-input-background: #f5f5f5;
|
|
75
|
-
|
|
76
|
-
--facto-input-
|
|
77
|
-
--facto-input-
|
|
78
|
-
--facto-
|
|
85
|
+
/* Optional theme overrides; controls fall back to their local surface/text. */
|
|
86
|
+
--facto-input-focus-width: 2px;
|
|
87
|
+
--facto-input-placeholder: #62655f;
|
|
88
|
+
--facto-input-font-size: 1rem;
|
|
89
|
+
--facto-input-line-height: 1.5rem;
|
|
90
|
+
--facto-badge-padding: 4px 8px;
|
|
79
91
|
--facto-icon-button-size: 38px;
|
|
92
|
+
--facto-icon-button-visual-size: initial;
|
|
80
93
|
--facto-layer-overlay: 1000;
|
|
81
94
|
--facto-layer-dialog: 1001;
|
|
82
95
|
--facto-layer-select: 1100;
|
|
83
96
|
--facto-layer-tooltip: 1200;
|
|
84
97
|
--facto-layer-toast: 1300;
|
|
85
|
-
--facto-toast-radius:
|
|
86
|
-
--facto-toast-padding:
|
|
87
|
-
--facto-toast-gap:
|
|
98
|
+
--facto-toast-radius: 12px;
|
|
99
|
+
--facto-toast-padding: 12px 16px;
|
|
100
|
+
--facto-toast-gap: 8px;
|
|
88
101
|
--facto-toast-offset: 24px;
|
|
89
102
|
--facto-toast-offset-mobile: 16px;
|
|
90
103
|
--facto-toast-max-width: 520px;
|
|
91
104
|
--facto-toast-default-foreground: #fff;
|
|
92
105
|
--facto-toast-default-description: rgba(255, 255, 255, 0.76);
|
|
93
|
-
--facto-toast-error-accent: #
|
|
94
|
-
--facto-toast-error-description: #
|
|
95
|
-
--facto-toast-shadow: 0
|
|
96
|
-
--facto-toast-error-shadow: 0
|
|
106
|
+
--facto-toast-error-accent: #9f2333;
|
|
107
|
+
--facto-toast-error-description: #62655f;
|
|
108
|
+
--facto-toast-shadow: 0 8px 32px rgba(18, 20, 17, 0.12);
|
|
109
|
+
--facto-toast-error-shadow: 0 8px 32px rgba(18, 20, 17, 0.12);
|
|
97
110
|
--facto-tooltip-font-size: 12px;
|
|
98
111
|
--facto-tooltip-line-height: 19.5px;
|
|
99
112
|
--facto-tooltip-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
|
@@ -102,35 +115,37 @@
|
|
|
102
115
|
--facto-tooltip-default-foreground: oklch(98.5% 0 0);
|
|
103
116
|
--facto-tooltip-radius: 6px;
|
|
104
117
|
--facto-tooltip-padding: 6px 10px;
|
|
105
|
-
--facto-search-placeholder: #
|
|
106
|
-
--facto-shadow-card:
|
|
107
|
-
--facto-shadow-select: 0
|
|
118
|
+
--facto-search-placeholder: #62655f;
|
|
119
|
+
--facto-shadow-card: none;
|
|
120
|
+
--facto-shadow-select: 0 8px 32px rgba(18, 20, 17, 0.12);
|
|
108
121
|
--facto-shadow-switch-thumb: 0 1px 2px rgba(0, 0, 0, 0.15);
|
|
109
122
|
--facto-shadow-tabs-trigger-active: 0 1px 3px rgba(0, 0, 0, 0.08);
|
|
110
|
-
--facto-shadow-dialog: 0
|
|
111
|
-
--facto-shadow-sheet: 0
|
|
123
|
+
--facto-shadow-dialog: 0 8px 32px rgba(18, 20, 17, 0.12);
|
|
124
|
+
--facto-shadow-sheet: 0 8px 32px rgba(18, 20, 17, 0.12);
|
|
112
125
|
--facto-shadow-sheet-bottom: 0 -12px 32px rgba(0, 0, 0, 0.12);
|
|
113
126
|
--facto-dashboard-gap: 8px;
|
|
114
127
|
--facto-widget-heading: #171717;
|
|
115
|
-
--facto-widget-muted: #
|
|
128
|
+
--facto-widget-muted: #62655f;
|
|
116
129
|
--facto-widget-action-background: #f5f5f5;
|
|
117
130
|
--facto-widget-action-hover: #ececec;
|
|
118
|
-
--facto-focus:
|
|
119
|
-
--facto-widget-focus:
|
|
131
|
+
--facto-focus: #121411;
|
|
132
|
+
--facto-widget-focus: #121411;
|
|
120
133
|
--facto-switch-track: #d8d8d6;
|
|
121
134
|
--facto-switch-track-checked: #00d66f;
|
|
122
135
|
--facto-switch-thumb: #fff;
|
|
123
136
|
--facto-checkbox-border: #c9c9c7;
|
|
124
137
|
--facto-checkbox-foreground: #fff;
|
|
138
|
+
--facto-control-selected-background: #0b6b4b;
|
|
139
|
+
--facto-control-selected-foreground: initial;
|
|
125
140
|
--facto-tabs-list-background: #f2f2f1;
|
|
126
|
-
--facto-overlay-background: rgba(
|
|
141
|
+
--facto-overlay-background: rgba(18, 20, 17, 0.32);
|
|
127
142
|
--facto-skeleton-background: linear-gradient(
|
|
128
143
|
90deg,
|
|
129
144
|
#ececea 20%,
|
|
130
145
|
#f8f8f7 50%,
|
|
131
146
|
#ececea 80%
|
|
132
147
|
);
|
|
133
|
-
--facto-notice-info-border: #
|
|
148
|
+
--facto-notice-info-border: #b7d5ef;
|
|
134
149
|
--facto-notice-success-border: #b7efd0;
|
|
135
150
|
--facto-notice-warning-border: #efd796;
|
|
136
151
|
--facto-notice-danger-border: #f3b8c0;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"package": "@facto-to/design-system",
|
|
4
|
-
"packageVersion": "0.1.0-beta.
|
|
4
|
+
"packageVersion": "0.1.0-beta.4",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"react": "^19.0.0",
|
|
7
7
|
"react-dom": "^19.0.0"
|
|
8
8
|
},
|
|
9
|
-
"apiSha256": "
|
|
10
|
-
"tokensSha256": "
|
|
9
|
+
"apiSha256": "76ff61c915697125f0c12ef4d73eb64888dfcf7f5d4565a6709879459050481a",
|
|
10
|
+
"tokensSha256": "3cb6cc86d5adf10a757416b9e1b5c2b9fa702d548f0aac432b72919d77839200"
|
|
11
11
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
|
4
4
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
5
5
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
6
6
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
7
|
-
import type { AnchorHTMLAttributes, ButtonHTMLAttributes, ComponentPropsWithoutRef, ComponentPropsWithRef, CSSProperties, HTMLAttributes, InputHTMLAttributes, ReactNode, TextareaHTMLAttributes } from 'react';
|
|
7
|
+
import type { AnchorHTMLAttributes, ButtonHTMLAttributes, ComponentPropsWithoutRef, ComponentPropsWithRef, CSSProperties, HTMLAttributes, InputHTMLAttributes, ReactNode, TextareaHTMLAttributes, SVGProps } from 'react';
|
|
8
8
|
import './styles.css';
|
|
9
9
|
export type FactoThemeTokens = Partial<Record<`--facto-${string}`, string | number>>;
|
|
10
10
|
type ThemeTokens = FactoThemeTokens;
|
|
@@ -16,6 +16,16 @@ export interface FactoThemeProps extends Omit<HTMLAttributes<HTMLDivElement>, 's
|
|
|
16
16
|
}
|
|
17
17
|
/** Scoped token container. Inline `--facto-*` values are forwarded to portalled overlays. */
|
|
18
18
|
export declare function FactoTheme({ className, tokens, style, ...props }: FactoThemeProps): import("react").JSX.Element;
|
|
19
|
+
/** Shared decorative symbols; name the containing control, not the glyph. */
|
|
20
|
+
export type IconName = 'close' | 'arrowLeft' | 'check' | 'chevronDown' | 'info' | 'warning';
|
|
21
|
+
export interface IconProps extends SVGProps<SVGSVGElement> {
|
|
22
|
+
name: IconName;
|
|
23
|
+
size?: number;
|
|
24
|
+
}
|
|
25
|
+
export declare function Icon({ name, size, ...props }: IconProps): import("react").JSX.Element;
|
|
26
|
+
/** Layout only: use existing Dialog/Sheet title and close primitives inside. */
|
|
27
|
+
export declare function ModalHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
28
|
+
export declare function ModalFooter({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
19
29
|
/** Button hierarchy based on the final Facto user application controls. */
|
|
20
30
|
export type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'text';
|
|
21
31
|
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
@@ -33,7 +43,7 @@ export interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonEle
|
|
|
33
43
|
size?: ButtonSize;
|
|
34
44
|
}
|
|
35
45
|
export declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
36
|
-
/**
|
|
46
|
+
/** Neutral content container with a quiet border and no elevation. */
|
|
37
47
|
export interface SurfaceProps extends HTMLAttributes<HTMLDivElement> {
|
|
38
48
|
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
39
49
|
}
|
|
@@ -129,8 +139,8 @@ export declare function TabsContent({ className, ...props }: ComponentPropsWitho
|
|
|
129
139
|
export declare const Dialog: import("react").FC<DialogPrimitive.DialogProps>;
|
|
130
140
|
export declare const DialogTrigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
131
141
|
export declare const DialogClose: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
132
|
-
export declare const DialogTitle:
|
|
133
|
-
export declare const DialogDescription:
|
|
142
|
+
export declare const DialogTitle: typeof DialogPrimitive.Title;
|
|
143
|
+
export declare const DialogDescription: typeof DialogPrimitive.Description;
|
|
134
144
|
export interface DialogContentProps extends ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
135
145
|
size?: 'sm' | 'md';
|
|
136
146
|
}
|