@facto-to/design-system 0.1.0-beta.5 → 0.1.0-beta.7
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 +5 -1
- package/README.md +44 -4
- package/dist/ai/SKILL.md +5 -1
- package/dist/ai/references/api.d.ts +304 -91
- package/dist/ai/references/catalog.json +27 -2
- package/dist/ai/references/component-adoption.json +4 -0
- package/dist/ai/references/components.md +26 -0
- package/dist/ai/references/design.md +4 -2
- package/dist/ai/references/integration.md +1 -1
- package/dist/ai/references/standard-target.json +5 -0
- package/dist/ai/references/standard-version.json +9 -0
- package/dist/ai/references/tokens.css +2 -0
- package/dist/ai/references/ui-standard-reference.md +498 -0
- package/dist/ai/references/ui-standard.md +195 -0
- package/dist/ai/references/version.json +12 -3
- package/dist/index.d.ts +304 -91
- package/dist/index.js +845 -437
- package/dist/styles.css +1 -1
- package/dist/tokens.css +2 -0
- package/package.json +8 -4
|
@@ -13,3 +13,29 @@ See catalog.json for the exact runtime exports and api.d.ts for types. The catal
|
|
|
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,3 +1,5 @@
|
|
|
1
|
+
Public target: [UI standard](ui-standard.md) and [reference](ui-standard-reference.md). This file describes the existing component baseline, not complete adoption of the newer target.
|
|
2
|
+
|
|
1
3
|
# Facto UI visual contract
|
|
2
4
|
|
|
3
5
|
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.
|
|
@@ -58,6 +60,6 @@ At widths up to 700px, newly opened Dialog/Sheet panels slide upward for 320ms w
|
|
|
58
60
|
|
|
59
61
|
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
62
|
|
|
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).
|
|
63
|
+
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). Consumer pagination behavior remains outside the SDK.
|
|
62
64
|
|
|
63
|
-
|
|
65
|
+
Routing, visibility, submission policies and 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.
|
|
10
|
+
npm install --save-exact @facto-to/design-system@0.1.0-beta.7
|
|
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.
|
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
--facto-toast-mobile-reserve: min(max(192px, calc(env(safe-area-inset-top) + 176px)), 50dvh);
|
|
105
105
|
--facto-toast-desktop-reserve: min(200px, calc(50dvh + 16px));
|
|
106
106
|
--facto-motion-overlay-mobile-enter: 320ms;
|
|
107
|
+
--facto-motion-overlay-bottom-duration: 240ms;
|
|
108
|
+
--facto-motion-overlay-bottom-distance: 28px;
|
|
107
109
|
--facto-motion-overlay-backdrop-enter: 200ms;
|
|
108
110
|
--facto-motion-overlay-enter-easing: cubic-bezier(.22, 1, .36, 1);
|
|
109
111
|
--facto-toast-default-foreground: #fff;
|