@facto-to/design-system 0.1.0-beta.4 → 0.1.0-beta.6

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.
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@facto-to/design-system",
4
- "packageVersion": "0.1.0-beta.4",
4
+ "packageVersion": "0.1.0-beta.6",
5
5
  "exports": [
6
+ "Avatar",
6
7
  "Badge",
7
8
  "Button",
8
9
  "Card",
@@ -14,14 +15,34 @@
14
15
  "DialogDescription",
15
16
  "DialogTitle",
16
17
  "DialogTrigger",
18
+ "DropdownMenu",
19
+ "DropdownMenuContent",
20
+ "DropdownMenuItem",
21
+ "DropdownMenuSeparator",
22
+ "DropdownMenuTrigger",
17
23
  "EmptyState",
18
24
  "EnhancedSearchField",
25
+ "ErrorState",
19
26
  "FactoTheme",
27
+ "Field",
28
+ "FilterChip",
20
29
  "Icon",
21
30
  "IconButton",
31
+ "ListGroup",
32
+ "ListRow",
33
+ "ListSkeleton",
34
+ "LoadingMore",
35
+ "LogoStack",
22
36
  "ModalFooter",
23
37
  "ModalHeader",
24
38
  "Notice",
39
+ "NotificationsProvider",
40
+ "OtpInput",
41
+ "Popover",
42
+ "PopoverClose",
43
+ "PopoverContent",
44
+ "PopoverTrigger",
45
+ "ResendCodeButton",
25
46
  "SearchField",
26
47
  "Select",
27
48
  "Sheet",
@@ -32,6 +53,7 @@
32
53
  "SheetTrigger",
33
54
  "Skeleton",
34
55
  "Stack",
56
+ "StepChecklist",
35
57
  "Surface",
36
58
  "Switch",
37
59
  "Tabs",
@@ -57,7 +79,8 @@
57
79
  "WidgetHeader",
58
80
  "WidgetKeyValue",
59
81
  "WidgetList",
60
- "WidgetRow"
82
+ "WidgetRow",
83
+ "useToast"
61
84
  ],
62
85
  "tokens": [
63
86
  "--facto-accent",
@@ -130,6 +153,11 @@
130
153
  "--facto-line-height-heading-md",
131
154
  "--facto-line-height-heading-sm",
132
155
  "--facto-line-height-label",
156
+ "--facto-motion-overlay-backdrop-enter",
157
+ "--facto-motion-overlay-bottom-distance",
158
+ "--facto-motion-overlay-bottom-duration",
159
+ "--facto-motion-overlay-enter-easing",
160
+ "--facto-motion-overlay-mobile-enter",
133
161
  "--facto-muted",
134
162
  "--facto-muted-on-subtle",
135
163
  "--facto-notice-danger-border",
@@ -175,11 +203,13 @@
175
203
  "--facto-text",
176
204
  "--facto-toast-default-description",
177
205
  "--facto-toast-default-foreground",
206
+ "--facto-toast-desktop-reserve",
178
207
  "--facto-toast-error-accent",
179
208
  "--facto-toast-error-description",
180
209
  "--facto-toast-error-shadow",
181
210
  "--facto-toast-gap",
182
211
  "--facto-toast-max-width",
212
+ "--facto-toast-mobile-reserve",
183
213
  "--facto-toast-offset",
184
214
  "--facto-toast-offset-mobile",
185
215
  "--facto-toast-padding",
@@ -9,7 +9,33 @@ See catalog.json for the exact runtime exports and api.d.ts for types. The catal
9
9
  - Tabs: Tabs, TabsList, TabsTrigger, TabsContent; matching value strings, keep accessible tab labels.
10
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, semantic status surface and matching text/icon. 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; desktop top/right 24px with maximum width 420px, mobile top 16px and full available width with 16px side gutters and safe-area insets; 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.
16
+
17
+ ## Overlay motion
18
+
19
+ `DialogContent` and `SheetContent` accept `motionVariant`. Use `auto` (default) for the existing mobile-only 320ms entrance; use `bottom` for the Dashboard-style 240ms rise/fade and reverse exit on all screen widths; use `none` to disable surface and backdrop motion. `bottom` moves 28px and preserves the existing centered/right/bottom placement. System reduced-motion preferences disable every variant's animation. Keep the Root and Content in the React tree and change `open`; conditionally unmounting the entire overlay bypasses its exit animation.
20
+
21
+ ```tsx
22
+ <Dialog open={open} onOpenChange={setOpen}>
23
+ <DialogContent motionVariant="bottom">
24
+ <DialogTitle>Disconnect account?</DialogTitle>
25
+ <DialogDescription>You can reconnect later.</DialogDescription>
26
+ <DialogClose asChild><Button>Cancel</Button></DialogClose>
27
+ </DialogContent>
28
+ </Dialog>
29
+ ```
30
+
31
+ Theme tokens `--facto-motion-overlay-bottom-duration` and `--facto-motion-overlay-bottom-distance` tune the opt-in treatment. `SheetContent side` controls placement; `motionVariant` controls motion independently.
32
+
33
+ ## Public UI additions in beta.6
34
+
35
+ Use the generated `api.d.ts` for exact prop types. `Button` accepts leading/trailing icon slots and retains its width while loading. Use `Field` for inset-label inputs, `OtpInput` for controlled code entry and `ResendCodeButton` for a caller-owned cooldown deadline. OTP completion has a display buffer; verification requests remain outside the SDK.
36
+
37
+ Use `NotificationsProvider` with `useToast()` for scoped notification state, ids, updates, dismissal and promise transitions. This is a provider-scoped API, not a global toast singleton. Catch rejections from `toast.promise`. Keep the provider mounted inside the theme boundary. Loading notifications persist until replaced or dismissed.
38
+
39
+ Use `Popover` for contextual interactive content and `DropdownMenu` for actions. Both restore focus; Tooltip remains supplemental text. `ListRow` becomes an anchor with href or a button with onClick, otherwise a static row. Never nest a button in an interactive row. `ListGroup`, `Avatar`, `LogoStack`, `ErrorState`, `LoadingMore`, `StepChecklist` are generic presentation; keep business registries, routing and data fetching in the app.
40
+
41
+ `FilterChip` exposes selected/aria-pressed; `ListSkeleton` exposes row count and an accessible loading label. `Field` requires inputId; give its native input the same id.
@@ -1,6 +1,6 @@
1
1
  # Facto UI visual contract
2
2
 
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.
3
+ This SDK release adopts **Facto UI Standard design rules v1.2, document revision v1.2.21 (2026-09-28)**. 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
 
@@ -49,3 +49,15 @@ Import `fonts.css` and verify Inter actually loads. Test desktop 1440, tablet 83
49
49
  ## Upgrading older visual overrides
50
50
 
51
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.
52
+
53
+ ## beta.5 responsive overlay changes
54
+
55
+ Single-line ModalHeader has a 32px layout baseline; its 44px close target extends 6px vertically without enlarging the header. A genuinely overflowing title gains keyboard scrolling; ordinary titles do not add a tab stop. Keep descriptions outside the header when a compact title row is intended.
56
+
57
+ At widths up to 700px, newly opened Dialog/Sheet panels slide upward for 320ms with cubic-bezier(.22,1,.36,1); the full-screen scrim fades for 200ms. Reduced motion disables entry animations. Step changes inside the same open panel must not remount the overlay.
58
+
59
+ Toast placement is a Facto decision, not a claim about Link: top/right 24px on desktop, max-width 420px; mobile top16 and full available width minus16px side gutters and safe-area insets. Long messages scroll within a bounded surface. Test active modal actions and focused controls together with notifications, rather than auditing these surfaces separately.
60
+
61
+ Select uses a portalled popper menu with an 8px gap, collision handling and at least148px width where space permits. It retains the Radix modal keyboard contract (arrows/typeahead, Enter selection, Escape and focus return). Dashboard's separate pagination control and its Tab-to-neighbor behavior are not exported by this SDK.
62
+
63
+ Dashboard mobile routes, browser-back/scroll restoration, feature visibility, OTP auto-submit and payment/authentication requests remain application-owned. This release updates shared primitives; it does not export those product flows or automatically upgrade consumers.
@@ -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.4
10
+ npm install --save-exact @facto-to/design-system@0.1.0-beta.6
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.
@@ -100,7 +100,14 @@
100
100
  --facto-toast-gap: 8px;
101
101
  --facto-toast-offset: 24px;
102
102
  --facto-toast-offset-mobile: 16px;
103
- --facto-toast-max-width: 520px;
103
+ --facto-toast-max-width: 420px;
104
+ --facto-toast-mobile-reserve: min(max(192px, calc(env(safe-area-inset-top) + 176px)), 50dvh);
105
+ --facto-toast-desktop-reserve: min(200px, calc(50dvh + 16px));
106
+ --facto-motion-overlay-mobile-enter: 320ms;
107
+ --facto-motion-overlay-bottom-duration: 240ms;
108
+ --facto-motion-overlay-bottom-distance: 28px;
109
+ --facto-motion-overlay-backdrop-enter: 200ms;
110
+ --facto-motion-overlay-enter-easing: cubic-bezier(.22, 1, .36, 1);
104
111
  --facto-toast-default-foreground: #fff;
105
112
  --facto-toast-default-description: rgba(255, 255, 255, 0.76);
106
113
  --facto-toast-error-accent: #9f2333;
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@facto-to/design-system",
4
- "packageVersion": "0.1.0-beta.4",
4
+ "packageVersion": "0.1.0-beta.6",
5
5
  "peerDependencies": {
6
6
  "react": "^19.0.0",
7
7
  "react-dom": "^19.0.0"
8
8
  },
9
- "apiSha256": "76ff61c915697125f0c12ef4d73eb64888dfcf7f5d4565a6709879459050481a",
10
- "tokensSha256": "3cb6cc86d5adf10a757416b9e1b5c2b9fa702d548f0aac432b72919d77839200"
9
+ "apiSha256": "315045b5fcd7259485085df7b3795228e9c947f2b9d6a81bf90847e087fb0426",
10
+ "tokensSha256": "87694ef0c56c366f356f781ccc9860f390017f852726ddd3f29caf59545cdca9"
11
11
  }