@facto-to/design-system 0.1.0-beta.3 → 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 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.3 react@^19 react-dom@^19
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.3.tgz
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 compact 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`.
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 defaults follow the Dashboard's final CSS: bottom-center placement, 13px radius, 13px × 17px padding, dark success surface, and 2600ms duration. Error (`tone="danger"`) uses the later white surface/red outline override. Desktop bottom offset is 24px, mobile 16px.
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 follows the compact Dashboard list-search appearance and native events. EnhancedSearchField is an optional richer control, not a source-exact Dashboard widget.
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
- /** Elevated neutral content container. */
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: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
133
- export declare const DialogDescription: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
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.3",
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,9 +108,10 @@
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",
97
- "--facto-input-focus-background",
98
- "--facto-input-focus-color",
99
115
  "--facto-input-focus-width",
100
116
  "--facto-input-font-size",
101
117
  "--facto-input-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, dark success; danger uses white/red. One viewport per group. ToastAction requires altText. No imperative global notification store is exported.
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,42 +1,51 @@
1
- # Facto Dashboard design intent
1
+ # Facto UI visual contract
2
2
 
3
- Default visual language: warm neutral canvas, white surfaces, near-black text and primary actions, restrained green status/accent, compact consistent controls, generous panel radii, quiet borders and shadows. Do not turn every primary action green just because the brand accent is green. Avoid substituting gradients, oversized hero typography or a different spacing scale unless asked.
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
- The generated tokens.css is the authoritative default value reference. Core roles:
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
- | Role | Token / default |
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
- | Canvas / surface / subtle | --facto-canvas #f5f5f4 / --facto-surface #fff / --facto-subtle #f3f3f2 |
10
- | Text / secondary | --facto-text #121411 / --facto-muted #757575 |
11
- | Secondary on tinted background | --facto-muted-on-subtle #6c6c67; use this on canvas/subtle and recheck contrast |
12
- | Border | --facto-line #e7e7e5 |
13
- | Body | Inter, 14px / 21px via font tokens |
14
- | Page heading | --facto-font-size-heading-lg 28px / --facto-line-height-heading-lg 36px |
15
- | Control / input / card radius | 10px / 14px / 24px |
16
- | Surface / compact Widget padding | 26px / 20px |
17
- | Dashboard grid | 194px tracks, --facto-dashboard-gap 8px |
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.
18
34
 
19
- Surface is a general content container. DashboardGrid/Widget is the compact overview preset; choosing a different general page layout does not make it a pixel-identical Dashboard clone. Use semantic HTML and host-scoped token CSS for tables, headings and navigation that have no exported component.
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.
20
36
 
21
- Keep semantic color pairs together when customizing: canvas/text, surface/text, primary/primary-foreground, status/status-soft, tooltip background/foreground and toast background/foreground. Recheck contrast and disabled/focus/hover states. Default warning text has an intentional accessibility adjustment; do not revert it to an earlier application color.
37
+ ## Overlays and layout
22
38
 
23
- Theme extension example (partial tokens inherit defaults):
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.
24
40
 
25
- ```tsx
26
- <FactoTheme tokens={{
27
- '--facto-canvas': '#edf5ff',
28
- '--facto-action-primary': '#1458c0',
29
- '--facto-action-primary-hover': '#10489e',
30
- '--facto-action-primary-foreground': '#ffffff',
31
- }}>{children}</FactoTheme>
32
- ```
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.
33
42
 
34
- Tokens-only adoption is an intentional intermediate result. Identify components still using legacy appearance so the user understands the remaining scope.
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.
35
44
 
36
- ## Text-entry focus
45
+ ## Verify each consumer
37
46
 
38
- TextField, Textarea and search fields use the Dashboard login focus treatment: white surface background and a 1.5px inset neutral edge, with no external green ring. The control dimensions do not change on focus. This applies to pointer and keyboard focus. Error fields keep their danger edge, and forced-colors mode uses a system outline.
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.
39
48
 
40
- By default, focus resolves surface and control-text colors within the current theme. Customize `--facto-input-focus-background`, `--facto-input-focus-color` and `--facto-input-focus-width` together when needed. The general `--facto-focus` token remains the keyboard focus ring for buttons, selects and other actions; do not recolor it globally to change text inputs.
49
+ ## Upgrading older visual overrides
41
50
 
42
- For a scoped legacy input/textarea adapter, mirror these rules on `:focus`: `outline: 0; background: var(--facto-input-focus-background, var(--facto-surface)); box-shadow: inset 0 0 0 var(--facto-input-focus-width) var(--facto-input-focus-color, var(--facto-control-text));`. Remove competing legacy green outlines and restore a system outline under `@media (forced-colors: active)`. Prefer the exported components. Upgrading the package cannot remove host CSS overrides.
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.3
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: 14px;
8
- --facto-line-height: 21px;
9
- --facto-tracking: -0.006em;
10
- --facto-font-size-label: 12px;
11
- --facto-line-height-label: 16px;
12
- --facto-font-size-heading-sm: 16px;
13
- --facto-font-size-heading-md: 19px;
14
- --facto-font-size-heading-lg: 28px;
15
- --facto-line-height-heading-sm: 24px;
16
- --facto-line-height-heading-md: 26px;
17
- --facto-line-height-heading-lg: 36px;
18
- --facto-font-size-amount: 24px;
19
- --facto-line-height-amount: 30px;
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: 700;
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: #171717;
32
- --facto-muted: #757575;
31
+ --facto-control-text: #121411;
32
+ --facto-muted: #62655f;
33
33
  /* Accessible secondary copy on the existing tinted surfaces. */
34
- --facto-muted-on-subtle: #6c6c67;
34
+ --facto-muted-on-subtle: #62655f;
35
35
  --facto-line: #e7e7e5;
36
36
  --facto-accent: #00d64f;
37
37
  --facto-accent-strong: #0b6b4b;
@@ -39,65 +39,74 @@
39
39
  --facto-success: #0b6b4b;
40
40
  --facto-success-strong: #0b6b4b;
41
41
  --facto-success-soft: #e7fbf2;
42
- --facto-danger: #b42336;
42
+ --facto-danger: #9f2333;
43
43
  --facto-danger-soft: #fff0f2;
44
- /* #956207 intentionally replaces the user-app's #9f6a08 for AA text contrast
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-action-primary: #171717;
49
- --facto-action-primary-hover: #2b2f2a;
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-disabled: #e7e7e4;
52
- --facto-action-disabled-text: #9a9a95;
53
- --facto-surface-border: rgba(0, 0, 0, 0.12);
54
- --facto-radius-control: 10px;
55
- --facto-radius-input: 14px;
56
- --facto-radius-card: 24px;
57
- --facto-radius-dialog: 18px;
58
- --facto-radius-sheet: 30px;
59
- --facto-radius-sheet-mobile: 26px;
60
- --facto-surface-padding: 26px;
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: 10px 16px;
63
- --facto-button-padding: 12px 18px;
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: 14px 20px;
66
- --facto-button-danger-padding: 11px 16px;
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: 14px;
69
- --facto-button-line-height: 21px;
70
- --facto-radius-control-sm: 8px;
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: 52px;
83
+ --facto-input-height: 44px;
74
84
  --facto-input-background: #f5f5f5;
75
- /* Optional overrides; resolve surface/text fallbacks at each control's theme. */
76
- --facto-input-focus-background: initial;
77
- --facto-input-focus-color: initial;
78
- --facto-input-focus-width: 1.5px;
79
- --facto-input-placeholder: #8a8a86;
80
- --facto-input-font-size: 15px;
81
- --facto-input-line-height: 20px;
82
- --facto-badge-padding: 5px 8px;
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;
83
91
  --facto-icon-button-size: 38px;
92
+ --facto-icon-button-visual-size: initial;
84
93
  --facto-layer-overlay: 1000;
85
94
  --facto-layer-dialog: 1001;
86
95
  --facto-layer-select: 1100;
87
96
  --facto-layer-tooltip: 1200;
88
97
  --facto-layer-toast: 1300;
89
- --facto-toast-radius: 13px;
90
- --facto-toast-padding: 13px 17px;
91
- --facto-toast-gap: 10px;
98
+ --facto-toast-radius: 12px;
99
+ --facto-toast-padding: 12px 16px;
100
+ --facto-toast-gap: 8px;
92
101
  --facto-toast-offset: 24px;
93
102
  --facto-toast-offset-mobile: 16px;
94
103
  --facto-toast-max-width: 520px;
95
104
  --facto-toast-default-foreground: #fff;
96
105
  --facto-toast-default-description: rgba(255, 255, 255, 0.76);
97
- --facto-toast-error-accent: #d94b5d;
98
- --facto-toast-error-description: #70706d;
99
- --facto-toast-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
100
- --facto-toast-error-shadow: 0 12px 32px rgba(23, 23, 23, 0.14);
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);
101
110
  --facto-tooltip-font-size: 12px;
102
111
  --facto-tooltip-line-height: 19.5px;
103
112
  --facto-tooltip-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
@@ -106,35 +115,37 @@
106
115
  --facto-tooltip-default-foreground: oklch(98.5% 0 0);
107
116
  --facto-tooltip-radius: 6px;
108
117
  --facto-tooltip-padding: 6px 10px;
109
- --facto-search-placeholder: #9d9d9b;
110
- --facto-shadow-card: 0 10px 20px rgba(0, 0, 0, 0.04);
111
- --facto-shadow-select: 0 12px 32px rgba(0, 0, 0, 0.12);
118
+ --facto-search-placeholder: #62655f;
119
+ --facto-shadow-card: none;
120
+ --facto-shadow-select: 0 8px 32px rgba(18, 20, 17, 0.12);
112
121
  --facto-shadow-switch-thumb: 0 1px 2px rgba(0, 0, 0, 0.15);
113
122
  --facto-shadow-tabs-trigger-active: 0 1px 3px rgba(0, 0, 0, 0.08);
114
- --facto-shadow-dialog: 0 24px 64px rgba(0, 0, 0, 0.16);
115
- --facto-shadow-sheet: 0 24px 64px rgba(0, 0, 0, 0.16);
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);
116
125
  --facto-shadow-sheet-bottom: 0 -12px 32px rgba(0, 0, 0, 0.12);
117
126
  --facto-dashboard-gap: 8px;
118
127
  --facto-widget-heading: #171717;
119
- --facto-widget-muted: #707070;
128
+ --facto-widget-muted: #62655f;
120
129
  --facto-widget-action-background: #f5f5f5;
121
130
  --facto-widget-action-hover: #ececec;
122
- --facto-focus: rgba(0, 214, 79, 0.38);
123
- --facto-widget-focus: rgba(0, 229, 139, 0.38);
131
+ --facto-focus: #121411;
132
+ --facto-widget-focus: #121411;
124
133
  --facto-switch-track: #d8d8d6;
125
134
  --facto-switch-track-checked: #00d66f;
126
135
  --facto-switch-thumb: #fff;
127
136
  --facto-checkbox-border: #c9c9c7;
128
137
  --facto-checkbox-foreground: #fff;
138
+ --facto-control-selected-background: #0b6b4b;
139
+ --facto-control-selected-foreground: initial;
129
140
  --facto-tabs-list-background: #f2f2f1;
130
- --facto-overlay-background: rgba(12, 16, 13, 0.34);
141
+ --facto-overlay-background: rgba(18, 20, 17, 0.32);
131
142
  --facto-skeleton-background: linear-gradient(
132
143
  90deg,
133
144
  #ececea 20%,
134
145
  #f8f8f7 50%,
135
146
  #ececea 80%
136
147
  );
137
- --facto-notice-info-border: #d8d8d6;
148
+ --facto-notice-info-border: #b7d5ef;
138
149
  --facto-notice-success-border: #b7efd0;
139
150
  --facto-notice-warning-border: #efd796;
140
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.3",
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": "2a6e05182497fec8cad25377c6d11fdd7b5bc59cdd39f5916aca13180a7dfa62",
10
- "tokensSha256": "de131dd16c29a7c448d27757b4959664dcc9db97d4443d6407a61e99ad9d725a"
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
- /** Elevated neutral content container. */
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: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
133
- export declare const DialogDescription: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
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
  }