@sia-ui/cli 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +51 -0
- package/dist/diff.mjs +91 -0
- package/dist/index.js +325 -0
- package/dist/lifecycle.mjs +242 -0
- package/dist/lock.mjs +92 -0
- package/dist/registry/package/components/Accordion/index.tsx +172 -0
- package/dist/registry/package/components/Accordion/styles.css +97 -0
- package/dist/registry/package/components/Alert/index.tsx +31 -0
- package/dist/registry/package/components/Alert/styles.css +12 -0
- package/dist/registry/package/components/AmountDisplay/index.tsx +11 -0
- package/dist/registry/package/components/AmountDisplay/styles.css +9 -0
- package/dist/registry/package/components/AppShell/index.tsx +6 -0
- package/dist/registry/package/components/AppShell/styles.css +7 -0
- package/dist/registry/package/components/AspectRatio/index.tsx +29 -0
- package/dist/registry/package/components/AspectRatio/styles.css +15 -0
- package/dist/registry/package/components/AsyncState/index.tsx +22 -0
- package/dist/registry/package/components/AsyncState/styles.css +1 -0
- package/dist/registry/package/components/AuditMeta/index.tsx +44 -0
- package/dist/registry/package/components/AuditMeta/styles.css +12 -0
- package/dist/registry/package/components/AuthLayout/index.tsx +39 -0
- package/dist/registry/package/components/AuthLayout/styles.css +6 -0
- package/dist/registry/package/components/Autocomplete/index.tsx +8 -0
- package/dist/registry/package/components/Avatar/index.tsx +23 -0
- package/dist/registry/package/components/Avatar/styles.css +5 -0
- package/dist/registry/package/components/Badge/index.tsx +62 -0
- package/dist/registry/package/components/Badge/styles.css +26 -0
- package/dist/registry/package/components/Breadcrumb/index.tsx +131 -0
- package/dist/registry/package/components/Breadcrumb/styles.css +76 -0
- package/dist/registry/package/components/Button/index.tsx +91 -0
- package/dist/registry/package/components/Button/styles.css +111 -0
- package/dist/registry/package/components/Calendar/index.tsx +192 -0
- package/dist/registry/package/components/Card/index.tsx +8 -0
- package/dist/registry/package/components/Card/styles.css +4 -0
- package/dist/registry/package/components/Chart/index.tsx +437 -0
- package/dist/registry/package/components/Chart/styles.css +182 -0
- package/dist/registry/package/components/Checkbox/index.tsx +193 -0
- package/dist/registry/package/components/Checkbox/styles.css +39 -0
- package/dist/registry/package/components/ColorPicker/index.tsx +6 -0
- package/dist/registry/package/components/ColorPicker/styles.css +2 -0
- package/dist/registry/package/components/CommandPalette/index.tsx +7 -0
- package/dist/registry/package/components/CommandPalette/styles.css +8 -0
- package/dist/registry/package/components/ConfirmDialog/index.tsx +24 -0
- package/dist/registry/package/components/Container/index.tsx +11 -0
- package/dist/registry/package/components/Container/styles.css +1 -0
- package/dist/registry/package/components/Countdown/index.tsx +3 -0
- package/dist/registry/package/components/CrudPage/index.tsx +9 -0
- package/dist/registry/package/components/CrudPage/styles.css +1 -0
- package/dist/registry/package/components/CurrencyInput/index.tsx +15 -0
- package/dist/registry/package/components/CurrencyInput/styles.css +1 -0
- package/dist/registry/package/components/DataTable/index.tsx +240 -0
- package/dist/registry/package/components/DataTable/styles.css +98 -0
- package/dist/registry/package/components/DatePicker/index.tsx +102 -0
- package/dist/registry/package/components/DateRangeFilter/index.tsx +8 -0
- package/dist/registry/package/components/DateRangeFilter/styles.css +4 -0
- package/dist/registry/package/components/DateRangePicker/index.tsx +36 -0
- package/dist/registry/package/components/DateTimePicker/index.tsx +32 -0
- package/dist/registry/package/components/Descriptions/index.tsx +7 -0
- package/dist/registry/package/components/Descriptions/styles.css +8 -0
- package/dist/registry/package/components/Divider/index.tsx +12 -0
- package/dist/registry/package/components/Divider/styles.css +3 -0
- package/dist/registry/package/components/Drawer/context.ts +14 -0
- package/dist/registry/package/components/Drawer/index.tsx +209 -0
- package/dist/registry/package/components/Drawer/styles.css +151 -0
- package/dist/registry/package/components/DropdownMenu/index.tsx +350 -0
- package/dist/registry/package/components/DropdownMenu/styles.css +100 -0
- package/dist/registry/package/components/DurationDisplay/index.tsx +3 -0
- package/dist/registry/package/components/EmptyState/index.tsx +23 -0
- package/dist/registry/package/components/EmptyState/styles.css +6 -0
- package/dist/registry/package/components/EntityMeta/index.tsx +65 -0
- package/dist/registry/package/components/EntityMeta/styles.css +9 -0
- package/dist/registry/package/components/ErrorState/index.tsx +30 -0
- package/dist/registry/package/components/ErrorState/styles.css +6 -0
- package/dist/registry/package/components/EventCalendar/index.tsx +8 -0
- package/dist/registry/package/components/EventCalendar/styles.css +8 -0
- package/dist/registry/package/components/Field/index.tsx +664 -0
- package/dist/registry/package/components/Field/styles.css +14 -0
- package/dist/registry/package/components/FileUpload/index.tsx +68 -0
- package/dist/registry/package/components/FileUpload/styles.css +4 -0
- package/dist/registry/package/components/FiltersBar/index.tsx +20 -0
- package/dist/registry/package/components/FiltersBar/styles.css +6 -0
- package/dist/registry/package/components/Form/index.tsx +211 -0
- package/dist/registry/package/components/Form/styles.css +80 -0
- package/dist/registry/package/components/FormField/index.tsx +2 -0
- package/dist/registry/package/components/HoverCard/index.tsx +121 -0
- package/dist/registry/package/components/HoverCard/styles.css +26 -0
- package/dist/registry/package/components/IconButton/index.tsx +27 -0
- package/dist/registry/package/components/IconButton/styles.css +7 -0
- package/dist/registry/package/components/Icons/index.tsx +185 -0
- package/dist/registry/package/components/ImageUpload/index.tsx +6 -0
- package/dist/registry/package/components/ImageUpload/styles.css +4 -0
- package/dist/registry/package/components/Input/index.tsx +103 -0
- package/dist/registry/package/components/Input/styles.css +8 -0
- package/dist/registry/package/components/InputNumber/index.tsx +196 -0
- package/dist/registry/package/components/InputNumber/styles.css +54 -0
- package/dist/registry/package/components/JsonEditor/index.tsx +6 -0
- package/dist/registry/package/components/JsonEditor/styles.css +2 -0
- package/dist/registry/package/components/KpiGrid/index.tsx +11 -0
- package/dist/registry/package/components/KpiGrid/styles.css +5 -0
- package/dist/registry/package/components/Label/index.tsx +43 -0
- package/dist/registry/package/components/Label/styles.css +25 -0
- package/dist/registry/package/components/MarkdownEditor/index.tsx +5 -0
- package/dist/registry/package/components/MiniCalendar/index.tsx +3 -0
- package/dist/registry/package/components/Modal/index.tsx +104 -0
- package/dist/registry/package/components/Modal/styles.css +20 -0
- package/dist/registry/package/components/MonthPicker/index.tsx +5 -0
- package/dist/registry/package/components/MultiSelect/index.tsx +133 -0
- package/dist/registry/package/components/MultiSelect/styles.css +3 -0
- package/dist/registry/package/components/OtpInput/index.tsx +5 -0
- package/dist/registry/package/components/OtpInput/styles.css +2 -0
- package/dist/registry/package/components/Overlay/index.tsx +140 -0
- package/dist/registry/package/components/Overlay/styles.css +1 -0
- package/dist/registry/package/components/PageHeader/index.tsx +24 -0
- package/dist/registry/package/components/PageHeader/styles.css +5 -0
- package/dist/registry/package/components/Pagination/index.tsx +155 -0
- package/dist/registry/package/components/Pagination/styles.css +103 -0
- package/dist/registry/package/components/PasswordInput/index.tsx +125 -0
- package/dist/registry/package/components/PasswordInput/styles.css +58 -0
- package/dist/registry/package/components/PermissionGate/index.tsx +3 -0
- package/dist/registry/package/components/PhoneInput/index.tsx +189 -0
- package/dist/registry/package/components/PhoneInput/styles.css +35 -0
- package/dist/registry/package/components/Popover/index.tsx +12 -0
- package/dist/registry/package/components/Popover/styles.css +12 -0
- package/dist/registry/package/components/Progress/index.tsx +149 -0
- package/dist/registry/package/components/Progress/styles.css +101 -0
- package/dist/registry/package/components/QrCode/index.tsx +6 -0
- package/dist/registry/package/components/QrCode/styles.css +5 -0
- package/dist/registry/package/components/RadioGroup/index.tsx +29 -0
- package/dist/registry/package/components/RadioGroup/styles.css +20 -0
- package/dist/registry/package/components/Rating/index.tsx +82 -0
- package/dist/registry/package/components/Rating/styles.css +41 -0
- package/dist/registry/package/components/ReferenceSelect/index.tsx +7 -0
- package/dist/registry/package/components/ReferenceSelect/styles.css +2 -0
- package/dist/registry/package/components/RelativeTime/index.tsx +22 -0
- package/dist/registry/package/components/RelativeTime/styles.css +1 -0
- package/dist/registry/package/components/RequireSession/index.tsx +127 -0
- package/dist/registry/package/components/RequireSession/styles.css +13 -0
- package/dist/registry/package/components/ResizablePanel/index.tsx +6 -0
- package/dist/registry/package/components/ResizablePanel/styles.css +5 -0
- package/dist/registry/package/components/RichTextEditor/index.tsx +5 -0
- package/dist/registry/package/components/RichTextEditor/styles.css +2 -0
- package/dist/registry/package/components/ScrollArea/index.tsx +114 -0
- package/dist/registry/package/components/ScrollArea/styles.css +74 -0
- package/dist/registry/package/components/SearchInput/index.tsx +121 -0
- package/dist/registry/package/components/SearchInput/styles.css +6 -0
- package/dist/registry/package/components/Select/index.tsx +324 -0
- package/dist/registry/package/components/Select/styles.css +58 -0
- package/dist/registry/package/components/Sidebar/index.tsx +232 -0
- package/dist/registry/package/components/Sidebar/styles.css +140 -0
- package/dist/registry/package/components/Skeleton/index.tsx +21 -0
- package/dist/registry/package/components/Skeleton/styles.css +2 -0
- package/dist/registry/package/components/Slider/index.tsx +193 -0
- package/dist/registry/package/components/Slider/styles.css +53 -0
- package/dist/registry/package/components/Spinner/index.tsx +28 -0
- package/dist/registry/package/components/Spinner/styles.css +8 -0
- package/dist/registry/package/components/StatCard/index.tsx +15 -0
- package/dist/registry/package/components/StatCard/styles.css +3 -0
- package/dist/registry/package/components/Statistic/index.tsx +23 -0
- package/dist/registry/package/components/Statistic/styles.css +6 -0
- package/dist/registry/package/components/Steps/index.tsx +108 -0
- package/dist/registry/package/components/Steps/styles.css +138 -0
- package/dist/registry/package/components/Switch/index.tsx +46 -0
- package/dist/registry/package/components/Switch/styles.css +26 -0
- package/dist/registry/package/components/Tabs/index.tsx +44 -0
- package/dist/registry/package/components/Tabs/styles.css +41 -0
- package/dist/registry/package/components/TagsInput/index.tsx +6 -0
- package/dist/registry/package/components/TagsInput/styles.css +2 -0
- package/dist/registry/package/components/Textarea/index.tsx +21 -0
- package/dist/registry/package/components/Textarea/styles.css +7 -0
- package/dist/registry/package/components/TimePicker/index.tsx +76 -0
- package/dist/registry/package/components/TimePicker/styles.css +13 -0
- package/dist/registry/package/components/TimeRangePicker/index.tsx +32 -0
- package/dist/registry/package/components/TimeRangePicker/styles.css +1 -0
- package/dist/registry/package/components/Timeline/index.tsx +8 -0
- package/dist/registry/package/components/Timeline/styles.css +12 -0
- package/dist/registry/package/components/Timer/index.tsx +9 -0
- package/dist/registry/package/components/Toast/index.tsx +426 -0
- package/dist/registry/package/components/Toast/styles.css +175 -0
- package/dist/registry/package/components/Toggle/index.tsx +181 -0
- package/dist/registry/package/components/Toggle/styles.css +124 -0
- package/dist/registry/package/components/Tooltip/index.tsx +163 -0
- package/dist/registry/package/components/Tooltip/styles.css +57 -0
- package/dist/registry/package/components/Tour/index.tsx +8 -0
- package/dist/registry/package/components/Tour/styles.css +6 -0
- package/dist/registry/package/components/Transfer/index.tsx +7 -0
- package/dist/registry/package/components/Transfer/styles.css +6 -0
- package/dist/registry/package/components/Tree/index.tsx +8 -0
- package/dist/registry/package/components/Tree/styles.css +6 -0
- package/dist/registry/package/components/TreeSelect/index.tsx +10 -0
- package/dist/registry/package/components/TreeSelect/styles.css +3 -0
- package/dist/registry/package/components/Typography/index.tsx +27 -0
- package/dist/registry/package/components/Typography/styles.css +16 -0
- package/dist/registry/package/components/UnsavedChangesGuard/index.tsx +4 -0
- package/dist/registry/package/components/WeekPicker/index.tsx +5 -0
- package/dist/registry/package/components/YearPicker/index.tsx +3 -0
- package/dist/registry/package/lib/form-adapter-rhf.tsx +141 -0
- package/dist/registry/registry.json +1780 -0
- package/dist/registry/styles/sia-ui.css +361 -0
- package/dist/source.mjs +93 -0
- package/package.json +55 -0
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
/* Règles couvrant plusieurs composants, ou aucun : variables de thème,
|
|
2
|
+
animations partagées, ajustements responsives transverses. */
|
|
3
|
+
|
|
4
|
+
/* @generated:theme */
|
|
5
|
+
/* Écrit par scripts/build-theme.mjs — ne pas modifier à la main. */
|
|
6
|
+
:root {
|
|
7
|
+
--sia-background: #ffffff;
|
|
8
|
+
--sia-foreground: #0f172a;
|
|
9
|
+
--sia-surface: #f8fafc;
|
|
10
|
+
--sia-surface-raised: #ffffff;
|
|
11
|
+
--sia-border: #e2e8f0;
|
|
12
|
+
--sia-border-strong: #cbd5e1;
|
|
13
|
+
--sia-muted: #64748b;
|
|
14
|
+
--sia-primary: #2563eb;
|
|
15
|
+
--sia-primary-foreground: #ffffff;
|
|
16
|
+
--sia-secondary: #7c3aed;
|
|
17
|
+
--sia-info: #0ea5e9;
|
|
18
|
+
--sia-success: #10b981;
|
|
19
|
+
--sia-warning: #f59e0b;
|
|
20
|
+
--sia-danger: #ef4444;
|
|
21
|
+
--sia-radius: 0.5rem;
|
|
22
|
+
--sia-radius-none: 0;
|
|
23
|
+
--sia-radius-xs: 0.125rem;
|
|
24
|
+
--sia-radius-sm: 0.25rem;
|
|
25
|
+
--sia-radius-md: 0.375rem;
|
|
26
|
+
--sia-radius-lg: 0.5rem;
|
|
27
|
+
--sia-radius-xl: 0.75rem;
|
|
28
|
+
--sia-radius-2xl: 1rem;
|
|
29
|
+
--sia-radius-3xl: 1.5rem;
|
|
30
|
+
--sia-radius-4xl: 2rem;
|
|
31
|
+
--sia-radius-5xl: 3rem;
|
|
32
|
+
--sia-radius-6xl: 4rem;
|
|
33
|
+
--sia-radius-7xl: 5rem;
|
|
34
|
+
--sia-radius-8xl: 6rem;
|
|
35
|
+
--sia-radius-9xl: 7rem;
|
|
36
|
+
--sia-radius-full: 9999px;
|
|
37
|
+
--sia-duration-instant: 80ms;
|
|
38
|
+
--sia-duration-fast: 120ms;
|
|
39
|
+
--sia-duration-base: 180ms;
|
|
40
|
+
--sia-duration-slow: 260ms;
|
|
41
|
+
--sia-easing-standard: cubic-bezier(0.2, 0.7, 0.3, 1);
|
|
42
|
+
--sia-easing-entrance: cubic-bezier(0, 0.55, 0.45, 1);
|
|
43
|
+
--sia-easing-exit: cubic-bezier(0.4, 0, 1, 1);
|
|
44
|
+
--sia-easing-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
45
|
+
--sia-elevation-rest: 0 1px 2px rgb(15 23 42 / 0.05);
|
|
46
|
+
--sia-elevation-hover: 0 1px 2px rgb(15 23 42 / 0.06), 0 3px 8px rgb(15 23 42 / 0.07);
|
|
47
|
+
--sia-elevation-press: 0 1px 1px rgb(15 23 42 / 0.10);
|
|
48
|
+
--sia-elevation-overlay: 0 10px 30px rgb(15 23 42 / 0.12), 0 2px 8px rgb(15 23 42 / 0.06);
|
|
49
|
+
--sia-elevation-modal: 0 24px 60px rgb(15 23 42 / 0.22);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Le thème sombre suit le réglage du système, sauf choix explicite. */
|
|
53
|
+
@media (prefers-color-scheme: dark) {
|
|
54
|
+
:root:not([data-sia-color-mode="light"]) {
|
|
55
|
+
--sia-background: #0f172a;
|
|
56
|
+
--sia-foreground: #f8fafc;
|
|
57
|
+
--sia-surface: #1e293b;
|
|
58
|
+
--sia-surface-raised: #334155;
|
|
59
|
+
--sia-border: #334155;
|
|
60
|
+
--sia-border-strong: #475569;
|
|
61
|
+
--sia-muted: #94a3b8;
|
|
62
|
+
--sia-primary: #60a5fa;
|
|
63
|
+
--sia-primary-foreground: #0f172a;
|
|
64
|
+
--sia-secondary: #a78bfa;
|
|
65
|
+
--sia-info: #38bdf8;
|
|
66
|
+
--sia-success: #34d399;
|
|
67
|
+
--sia-warning: #fbbf24;
|
|
68
|
+
--sia-danger: #f87171;
|
|
69
|
+
--sia-radius: 0.5rem;
|
|
70
|
+
--sia-radius-none: 0;
|
|
71
|
+
--sia-radius-xs: 0.125rem;
|
|
72
|
+
--sia-radius-sm: 0.25rem;
|
|
73
|
+
--sia-radius-md: 0.375rem;
|
|
74
|
+
--sia-radius-lg: 0.5rem;
|
|
75
|
+
--sia-radius-xl: 0.75rem;
|
|
76
|
+
--sia-radius-2xl: 1rem;
|
|
77
|
+
--sia-radius-3xl: 1.5rem;
|
|
78
|
+
--sia-radius-4xl: 2rem;
|
|
79
|
+
--sia-radius-5xl: 3rem;
|
|
80
|
+
--sia-radius-6xl: 4rem;
|
|
81
|
+
--sia-radius-7xl: 5rem;
|
|
82
|
+
--sia-radius-8xl: 6rem;
|
|
83
|
+
--sia-radius-9xl: 7rem;
|
|
84
|
+
--sia-radius-full: 9999px;
|
|
85
|
+
--sia-duration-instant: 80ms;
|
|
86
|
+
--sia-duration-fast: 120ms;
|
|
87
|
+
--sia-duration-base: 180ms;
|
|
88
|
+
--sia-duration-slow: 260ms;
|
|
89
|
+
--sia-easing-standard: cubic-bezier(0.2, 0.7, 0.3, 1);
|
|
90
|
+
--sia-easing-entrance: cubic-bezier(0, 0.55, 0.45, 1);
|
|
91
|
+
--sia-easing-exit: cubic-bezier(0.4, 0, 1, 1);
|
|
92
|
+
--sia-easing-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
93
|
+
--sia-elevation-rest: 0 1px 2px rgb(15 23 42 / 0.05);
|
|
94
|
+
--sia-elevation-hover: 0 1px 2px rgb(15 23 42 / 0.06), 0 3px 8px rgb(15 23 42 / 0.07);
|
|
95
|
+
--sia-elevation-press: 0 1px 1px rgb(15 23 42 / 0.10);
|
|
96
|
+
--sia-elevation-overlay: 0 10px 30px rgb(15 23 42 / 0.12), 0 2px 8px rgb(15 23 42 / 0.06);
|
|
97
|
+
--sia-elevation-modal: 0 24px 60px rgb(15 23 42 / 0.22);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
[data-sia-color-mode="dark"] {
|
|
102
|
+
--sia-background: #0f172a;
|
|
103
|
+
--sia-foreground: #f8fafc;
|
|
104
|
+
--sia-surface: #1e293b;
|
|
105
|
+
--sia-surface-raised: #334155;
|
|
106
|
+
--sia-border: #334155;
|
|
107
|
+
--sia-border-strong: #475569;
|
|
108
|
+
--sia-muted: #94a3b8;
|
|
109
|
+
--sia-primary: #60a5fa;
|
|
110
|
+
--sia-primary-foreground: #0f172a;
|
|
111
|
+
--sia-secondary: #a78bfa;
|
|
112
|
+
--sia-info: #38bdf8;
|
|
113
|
+
--sia-success: #34d399;
|
|
114
|
+
--sia-warning: #fbbf24;
|
|
115
|
+
--sia-danger: #f87171;
|
|
116
|
+
--sia-radius: 0.5rem;
|
|
117
|
+
--sia-radius-none: 0;
|
|
118
|
+
--sia-radius-xs: 0.125rem;
|
|
119
|
+
--sia-radius-sm: 0.25rem;
|
|
120
|
+
--sia-radius-md: 0.375rem;
|
|
121
|
+
--sia-radius-lg: 0.5rem;
|
|
122
|
+
--sia-radius-xl: 0.75rem;
|
|
123
|
+
--sia-radius-2xl: 1rem;
|
|
124
|
+
--sia-radius-3xl: 1.5rem;
|
|
125
|
+
--sia-radius-4xl: 2rem;
|
|
126
|
+
--sia-radius-5xl: 3rem;
|
|
127
|
+
--sia-radius-6xl: 4rem;
|
|
128
|
+
--sia-radius-7xl: 5rem;
|
|
129
|
+
--sia-radius-8xl: 6rem;
|
|
130
|
+
--sia-radius-9xl: 7rem;
|
|
131
|
+
--sia-radius-full: 9999px;
|
|
132
|
+
--sia-duration-instant: 80ms;
|
|
133
|
+
--sia-duration-fast: 120ms;
|
|
134
|
+
--sia-duration-base: 180ms;
|
|
135
|
+
--sia-duration-slow: 260ms;
|
|
136
|
+
--sia-easing-standard: cubic-bezier(0.2, 0.7, 0.3, 1);
|
|
137
|
+
--sia-easing-entrance: cubic-bezier(0, 0.55, 0.45, 1);
|
|
138
|
+
--sia-easing-exit: cubic-bezier(0.4, 0, 1, 1);
|
|
139
|
+
--sia-easing-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
140
|
+
--sia-elevation-rest: 0 1px 2px rgb(15 23 42 / 0.05);
|
|
141
|
+
--sia-elevation-hover: 0 1px 2px rgb(15 23 42 / 0.06), 0 3px 8px rgb(15 23 42 / 0.07);
|
|
142
|
+
--sia-elevation-press: 0 1px 1px rgb(15 23 42 / 0.10);
|
|
143
|
+
--sia-elevation-overlay: 0 10px 30px rgb(15 23 42 / 0.12), 0 2px 8px rgb(15 23 42 / 0.06);
|
|
144
|
+
--sia-elevation-modal: 0 24px 60px rgb(15 23 42 / 0.22);
|
|
145
|
+
}
|
|
146
|
+
/* @end:theme */
|
|
147
|
+
.sia-radius--default { border-radius:var(--sia-radius); }
|
|
148
|
+
.sia-radius--none { border-radius:0; }
|
|
149
|
+
.sia-radius--sm { border-radius:.25rem; }
|
|
150
|
+
.sia-radius--lg { border-radius:.75rem; }
|
|
151
|
+
.sia-radius--full { border-radius:9999px; }
|
|
152
|
+
.sia-input { width:100%; min-height:2.5rem; padding:0 .75rem; color:var(--sia-foreground); background:var(--sia-background); border:1px solid var(--sia-border); border-radius:var(--sia-radius); font:inherit; line-height:1.25; }
|
|
153
|
+
.sia-input:focus-visible,.sia-button:focus-visible { outline:3px solid color-mix(in srgb,var(--sia-primary) 30%,transparent); outline-offset:2px; }
|
|
154
|
+
.sia-input--invalid { border-color:var(--sia-danger); }
|
|
155
|
+
.sia-input--embedded { min-width:0; border:0; border-radius:0; background:transparent; }
|
|
156
|
+
.sia-input--embedded:focus-visible { outline:0; }
|
|
157
|
+
.sia-input--embedded.sia-input--invalid { border-color:transparent; }
|
|
158
|
+
.sia-textarea:focus-visible,.sia-switch:focus-visible,.sia-choice__control:focus-visible { outline:3px solid color-mix(in srgb,var(--sia-primary) 30%,transparent); outline-offset:2px; }
|
|
159
|
+
.sia-choice { display:inline-flex; align-items:flex-start; gap:.65rem; color:var(--sia-foreground); cursor:pointer; }
|
|
160
|
+
.sia-choice--disabled { cursor:not-allowed; opacity:.55; }
|
|
161
|
+
.sia-choice__control { width:1rem; height:1rem; margin:.15rem 0 0; accent-color:var(--sia-primary); }
|
|
162
|
+
.sia-choice__content { display:grid; gap:.15rem; }
|
|
163
|
+
.sia-choice__label { font-weight:600; }
|
|
164
|
+
.sia-choice__description { color:var(--sia-muted); font-size:.82rem; }
|
|
165
|
+
.sia-field,.sia-form-field,.sia-stack { display:flex; flex-direction:column; gap:.5rem; }
|
|
166
|
+
.sia-spinner { width:1rem; height:1rem; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:sia-spin .7s linear infinite; }
|
|
167
|
+
@keyframes sia-spin { to { transform:rotate(360deg); } }
|
|
168
|
+
@keyframes sia-skeleton { to { background-position:-200% 0; } }
|
|
169
|
+
/* Wave 1 foundations */
|
|
170
|
+
/* Masque sans retirer du clavier ni de l'arbre d'accessibilité. `clip-path`
|
|
171
|
+
et `appearance` comptent autant que la taille : un contrôle natif seulement
|
|
172
|
+
passé en `opacity:0` reste peint, et son rendu clignote sous le visuel
|
|
173
|
+
personnalisé au moment du clic. */
|
|
174
|
+
.sia-visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); clip-path:inset(50%); white-space:nowrap; border:0; appearance:none; }
|
|
175
|
+
.sia-spinner--sm { width:.75rem; height:.75rem; }
|
|
176
|
+
.sia-spinner--md { width:1rem; height:1rem; }
|
|
177
|
+
.sia-spinner--lg { width:1.5rem; height:1.5rem; border-width:3px; }
|
|
178
|
+
.sia-spinner--xs { width:.75rem; height:.75rem; }
|
|
179
|
+
.sia-spinner--sm { width:1rem; height:1rem; }
|
|
180
|
+
.sia-spinner--md { width:1.5rem; height:1.5rem; }
|
|
181
|
+
.sia-spinner--lg { width:2rem; height:2rem; }
|
|
182
|
+
.sia-spinner--xl { width:3rem; height:3rem; }
|
|
183
|
+
.sia-spinner--ring { border:2px solid color-mix(in srgb,currentColor 28%,transparent); border-top-color:currentColor; border-radius:50%; animation:sia-spin .7s linear infinite; }
|
|
184
|
+
.sia-spinner--double-ring { position:relative; border:0; animation:none; }
|
|
185
|
+
.sia-spinner--double-ring::before,.sia-spinner--double-ring::after { content:""; position:absolute; inset:0; border:2px solid transparent; border-top-color:currentColor; border-radius:50%; animation:sia-spin 1.2s linear infinite; }
|
|
186
|
+
.sia-spinner--double-ring::after { border-top-color:color-mix(in srgb,currentColor 50%,transparent); animation-duration:.8s; animation-direction:reverse; }
|
|
187
|
+
.sia-spinner--dots { display:inline-flex; align-items:center; justify-content:center; gap:.18em; border:0; animation:none; }
|
|
188
|
+
.sia-spinner--dots::before,.sia-spinner--dots::after,.sia-spinner--dots > span { content:""; width:.28em; height:.28em; min-width:3px; min-height:3px; border-radius:50%; background:currentColor; animation:sia-spinner-dots 1.4s ease-in-out infinite; }
|
|
189
|
+
.sia-spinner--dots::before { animation-delay:-.32s; }
|
|
190
|
+
.sia-spinner--dots > span { animation-delay:-.16s; }
|
|
191
|
+
@keyframes sia-spinner-dots { 0%,80%,100% { opacity:.4; transform:scale(.6); } 40% { opacity:1; transform:scale(1); } }
|
|
192
|
+
/* Wave 2 business components */
|
|
193
|
+
@media (max-width:900px) { .sia-kpi-grid--3,.sia-kpi-grid--4 { grid-template-columns:repeat(2,minmax(0,1fr)); } }
|
|
194
|
+
@media (max-width:560px) { .sia-kpi-grid--2,.sia-kpi-grid--3,.sia-kpi-grid--4 { grid-template-columns:1fr; } .sia-filters-bar { align-items:stretch; }.sia-filters-bar__main,.sia-filters-bar__actions { width:100%; } }
|
|
195
|
+
@media (max-width:640px) { .sia-page-header { flex-direction:column; } .sia-page-header__actions { width:100%; } .sia-entity-meta__grid { grid-template-columns:1fr; } }
|
|
196
|
+
.sia-month-picker,.sia-year-picker,.sia-week-picker { min-height:2.5rem; padding:0 .75rem; border:1px solid var(--sia-border); border-radius:var(--sia-radius); color:var(--sia-foreground); background:var(--sia-background); font:inherit; }
|
|
197
|
+
.sia-picker--invalid { border-color:var(--sia-danger); }
|
|
198
|
+
.sia-tone--neutral { --sia-accent:var(--sia-muted); --sia-accent-foreground:var(--sia-background); }
|
|
199
|
+
.sia-tone--primary { --sia-accent:var(--sia-primary); --sia-accent-foreground:var(--sia-primary-foreground); }
|
|
200
|
+
.sia-tone--info { --sia-accent:var(--sia-info); --sia-accent-foreground:#fff; }
|
|
201
|
+
.sia-tone--success { --sia-accent:var(--sia-success); --sia-accent-foreground:#fff; }
|
|
202
|
+
.sia-tone--warning { --sia-accent:var(--sia-warning); --sia-accent-foreground:#fff; }
|
|
203
|
+
.sia-tone--danger { --sia-accent:var(--sia-danger); --sia-accent-foreground:#fff; }
|
|
204
|
+
.sia-picker { --sia-accent:var(--sia-primary); --sia-accent-foreground:var(--sia-primary-foreground); position:relative; min-width:0; color:var(--sia-foreground); }
|
|
205
|
+
.sia-picker__trigger { display:flex; align-items:center; gap:.65rem; width:100%; min-height:2.65rem; padding:.55rem .7rem; border:1px solid var(--sia-border); border-radius:var(--sia-radius); color:inherit; background:var(--sia-background); box-shadow:0 1px 2px rgb(15 23 42 / .04); font:inherit; text-align:left; cursor:pointer; transition:border-color .15s,box-shadow .15s,background .15s; }
|
|
206
|
+
.sia-picker__trigger:hover:not(:disabled) { border-color:color-mix(in srgb,var(--sia-accent) 55%,var(--sia-border)); background:color-mix(in srgb,var(--sia-accent) 2%,var(--sia-background)); }
|
|
207
|
+
.sia-picker__trigger:focus-visible { outline:0; border-color:var(--sia-accent); box-shadow:0 0 0 3px color-mix(in srgb,var(--sia-accent) 20%,transparent); }
|
|
208
|
+
.sia-picker__icon { flex:none; width:1.1rem; height:1.1rem; color:var(--sia-accent); }
|
|
209
|
+
.sia-picker__value { min-width:0; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
|
|
210
|
+
.sia-picker__placeholder { color:var(--sia-muted); }
|
|
211
|
+
.sia-picker__actions { display:inline-flex; align-items:center; gap:.35rem; flex:none; color:var(--sia-muted); }
|
|
212
|
+
.sia-picker__actions svg { display:block; width:1rem; height:1rem; }
|
|
213
|
+
.sia-picker__clear { display:inline-grid; place-items:center; width:1.4rem; height:1.4rem; border-radius:50%; }
|
|
214
|
+
.sia-picker__clear:hover { color:var(--sia-foreground); background:var(--sia-surface); }
|
|
215
|
+
.sia-picker--invalid .sia-picker__trigger { border-color:var(--sia-danger); }
|
|
216
|
+
.sia-picker--disabled { opacity:.58; }
|
|
217
|
+
.sia-picker__trigger:disabled { cursor:not-allowed; }
|
|
218
|
+
.sia-picker__overlay { overflow:hidden; border:1px solid var(--sia-border); border-radius:calc(var(--sia-radius) * 1.35); color:var(--sia-foreground); background:var(--sia-background); box-shadow:0 20px 55px rgb(15 23 42 / .18); }
|
|
219
|
+
.sia-picker__footer { display:flex; align-items:center; justify-content:flex-end; gap:.5rem; width:100%; }
|
|
220
|
+
.sia-picker__footer button { padding:.35rem .55rem; border:0; border-radius:.4rem; color:var(--sia-accent); background:transparent; font:inherit; font-weight:650; cursor:pointer; }
|
|
221
|
+
.sia-range-picker { width:min(100%,38rem); }
|
|
222
|
+
.sia-range-picker__trigger { display:grid; grid-template-columns:auto minmax(7rem,1fr) auto minmax(7rem,1fr) auto; }
|
|
223
|
+
.sia-range-picker__part { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
|
|
224
|
+
.sia-range-picker__separator { width:1rem; height:1rem; color:var(--sia-muted); }
|
|
225
|
+
.sia-time-range-picker,.sia-date-time-picker { display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; }
|
|
226
|
+
.sia-time-range-picker > .sia-picker,.sia-date-time-picker > .sia-picker { flex:1 1 12rem; }
|
|
227
|
+
.sia-calendar { --sia-accent:var(--sia-primary); --sia-accent-foreground:var(--sia-primary-foreground); width:min(100%,22rem); padding:.85rem; background:var(--sia-background); }
|
|
228
|
+
.sia-calendar--fullscreen { width:100%; }
|
|
229
|
+
.sia-calendar__header { display:grid; grid-template-columns:2.25rem 1fr 2.25rem; align-items:center; gap:.5rem; margin-bottom:.65rem; }
|
|
230
|
+
.sia-calendar__nav,.sia-calendar__heading button { display:inline-grid; place-items:center; min-height:2.1rem; padding:.35rem .55rem; border:0; border-radius:.5rem; color:var(--sia-foreground); background:transparent; font:inherit; font-weight:700; cursor:pointer; }
|
|
231
|
+
.sia-calendar__nav:hover,.sia-calendar__heading button:hover { color:var(--sia-accent); background:color-mix(in srgb,var(--sia-accent) 9%,transparent); }
|
|
232
|
+
.sia-calendar__nav svg { width:1rem; height:1rem; }
|
|
233
|
+
.sia-calendar__heading { display:flex; align-items:center; justify-content:center; gap:.1rem; text-transform:capitalize; }
|
|
234
|
+
.sia-calendar__weekdays,.sia-calendar__grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
|
|
235
|
+
.sia-calendar__weekdays span { padding:.35rem .1rem; color:var(--sia-muted); font-size:.68rem; font-weight:700; text-align:center; text-transform:uppercase; }
|
|
236
|
+
.sia-calendar__cell { position:relative; min-width:0; min-height:2.65rem; padding:.12rem; }
|
|
237
|
+
.sia-calendar__cell > button { position:relative; z-index:1; width:100%; min-height:2.4rem; border:0; border-radius:.55rem; color:var(--sia-foreground); background:transparent; font:inherit; cursor:pointer; }
|
|
238
|
+
.sia-calendar__cell > button:hover:not(:disabled) { color:var(--sia-accent); background:color-mix(in srgb,var(--sia-accent) 9%,transparent); }
|
|
239
|
+
.sia-calendar__cell > button[aria-pressed="true"] { color:var(--sia-accent-foreground); background:var(--sia-accent); box-shadow:0 5px 12px color-mix(in srgb,var(--sia-accent) 24%,transparent); }
|
|
240
|
+
.sia-calendar__cell[data-in-range]::before { content:""; position:absolute; z-index:0; inset:.4rem 0; background:color-mix(in srgb,var(--sia-accent) 13%,transparent); }
|
|
241
|
+
.sia-calendar__cell[data-range-edge="start"]::before { left:50%; border-radius:.5rem 0 0 .5rem; }
|
|
242
|
+
.sia-calendar__cell[data-range-edge="end"]::before { right:50%; border-radius:0 .5rem .5rem 0; }
|
|
243
|
+
.sia-calendar__cell[data-outside] > button { color:color-mix(in srgb,var(--sia-muted) 55%,transparent); }
|
|
244
|
+
.sia-calendar__cell[data-today] > button { box-shadow:inset 0 0 0 1px var(--sia-accent); }
|
|
245
|
+
.sia-calendar__cell > button:disabled { opacity:.32; cursor:not-allowed; }
|
|
246
|
+
.sia-calendar__months { display:grid; grid-template-columns:repeat(3,1fr); gap:.4rem; min-height:16rem; align-content:center; }
|
|
247
|
+
.sia-calendar__months button { min-height:3rem; border:0; border-radius:.55rem; color:var(--sia-foreground); background:transparent; font:inherit; text-transform:capitalize; cursor:pointer; }
|
|
248
|
+
.sia-calendar__months button:hover,.sia-calendar__months button[data-selected] { color:var(--sia-accent); background:color-mix(in srgb,var(--sia-accent) 10%,transparent); }
|
|
249
|
+
.sia-calendar__footer { display:flex; min-height:2.5rem; align-items:center; padding:.55rem .2rem 0; margin-top:.4rem; border-top:1px solid var(--sia-border); }
|
|
250
|
+
.sia-calendar__week-number { position:absolute; z-index:2; top:.05rem; left:.15rem; color:var(--sia-muted); font-size:.55rem; pointer-events:none; }
|
|
251
|
+
.sia-calendar--mini { max-width:20rem; font-size:.82rem; }
|
|
252
|
+
.sia-calendar--mini .sia-calendar__cell { min-height:2rem; }
|
|
253
|
+
.sia-calendar--mini .sia-calendar__cell > button { min-height:1.8rem; }
|
|
254
|
+
.sia-event-calendar .sia-calendar__cell { min-height:7rem; border-top:1px solid var(--sia-border); }
|
|
255
|
+
.sia-timer,.sia-duration-display { font-variant-numeric:tabular-nums; font-weight:700; }
|
|
256
|
+
.sia-crud-page > .sia-pagination { justify-content:flex-end; }
|
|
257
|
+
[data-sia-tour-active="true"] { position:relative; z-index:1701; box-shadow:0 0 0 4px var(--sia-primary); }
|
|
258
|
+
@media (max-width:720px) { .sia-descriptions__grid--2,.sia-descriptions__grid--3 { grid-template-columns:1fr; }.sia-transfer { grid-template-columns:1fr; }.sia-transfer__actions { grid-auto-flow:column; justify-content:center; }.sia-app-shell { grid-template-columns:4rem 1fr; }.sia-auth-layout { grid-template-columns:1fr; }.sia-auth-layout > aside { display:none; }.sia-event-calendar .sia-calendar__cell { min-height:4rem; }.sia-event-calendar__events { display:none; } }
|
|
259
|
+
/* Keep text and icons optically centered across native control variants. */
|
|
260
|
+
.sia-select__trigger,
|
|
261
|
+
.sia-picker__trigger,
|
|
262
|
+
.sia-pagination button,
|
|
263
|
+
.sia-file-upload button,
|
|
264
|
+
.sia-tree-select__trigger,
|
|
265
|
+
.sia-month-picker,
|
|
266
|
+
.sia-year-picker,
|
|
267
|
+
.sia-week-picker,
|
|
268
|
+
.sia-radio-button { line-height:1.25; }
|
|
269
|
+
@media (max-width:640px) { .sia-field--horizontal { display:flex; }.sia-field--horizontal .sia-field__header,.sia-field--horizontal .sia-field__control,.sia-field--horizontal .sia-field__help,.sia-field--horizontal .sia-field__message { grid-column:auto; } }
|
|
270
|
+
/* Typed Field controls */
|
|
271
|
+
.sia-multi-select,.sia-autocomplete { position:relative; }
|
|
272
|
+
.sia-multi-select__trigger,.sia-autocomplete > input { width:100%; min-height:2.5rem; padding:.4rem .75rem; border:1px solid var(--sia-border); border-radius:var(--sia-radius); color:var(--sia-foreground); background:var(--sia-background); text-align:left; }
|
|
273
|
+
.sia-multi-select__values > span,.sia-tags-input > span { display:inline-flex; align-items:center; gap:.25rem; padding:.2rem .45rem; border-radius:999px; color:var(--sia-primary); background:color-mix(in srgb,var(--sia-primary) 10%,transparent); font-size:.8rem; }
|
|
274
|
+
.sia-multi-select__values button,.sia-tags-input > span button { padding:0; border:0; color:inherit; background:transparent; }
|
|
275
|
+
.sia-multi-select__panel,.sia-autocomplete [role="listbox"] { position:absolute; z-index:60; top:calc(100% + .35rem); width:100%; max-height:18rem; overflow:auto; padding:.5rem; border:1px solid var(--sia-border); border-radius:var(--sia-radius); background:var(--sia-background); box-shadow:0 12px 30px rgb(2 6 23 / .15); }
|
|
276
|
+
.sia-multi-select__panel label,.sia-autocomplete [role="option"] { display:flex; gap:.5rem; width:100%; padding:.5rem; border:0; border-radius:.35rem; background:transparent; text-align:left; }
|
|
277
|
+
/* Stable picker geometry: portals must not shrink the calendar content. */
|
|
278
|
+
.sia-picker__overlay { box-sizing:border-box; }
|
|
279
|
+
.sia-picker__overlay .sia-calendar { box-sizing:border-box; width:22rem; min-width:22rem; max-width:calc(100vw - 1rem); }
|
|
280
|
+
@media (max-width:380px) { .sia-picker__overlay .sia-calendar { width:calc(100vw - 1rem); min-width:0; } }
|
|
281
|
+
.sia-picker__overlay .sia-calendar__cell { min-height:2.3rem; }
|
|
282
|
+
.sia-picker__overlay .sia-calendar__cell > button { min-height:2.05rem; }
|
|
283
|
+
.sia-picker__overlay .sia-calendar__weekdays span { padding:.25rem .1rem; }
|
|
284
|
+
.sia-input--sm { min-height:2.1rem; font-size:.875rem; }
|
|
285
|
+
.sia-input--lg { min-height:3rem; }
|
|
286
|
+
.sia-input--solid,.sia-input-wrapper.sia-input--solid { border-color:transparent; background:var(--sia-surface); }
|
|
287
|
+
.sia-input--ghost,.sia-input-wrapper.sia-input--ghost { border-color:transparent; background:transparent; box-shadow:none; }
|
|
288
|
+
.sia-input--underline,.sia-input-wrapper.sia-input--underline { border-width:0 0 1px; border-radius:0; background:transparent; box-shadow:none; }
|
|
289
|
+
.sia-input.sia-tone--primary,.sia-input-wrapper.sia-tone--primary { --sia-input-accent:var(--sia-primary); }
|
|
290
|
+
.sia-input.sia-tone--info,.sia-input-wrapper.sia-tone--info { --sia-input-accent:var(--sia-info); }
|
|
291
|
+
.sia-input.sia-tone--success,.sia-input-wrapper.sia-tone--success { --sia-input-accent:var(--sia-success); }
|
|
292
|
+
.sia-input.sia-tone--warning,.sia-input-wrapper.sia-tone--warning { --sia-input-accent:var(--sia-warning); }
|
|
293
|
+
.sia-input.sia-tone--danger,.sia-input-wrapper.sia-tone--danger { --sia-input-accent:var(--sia-danger); }
|
|
294
|
+
.sia-input[class*="sia-tone--"]:focus-visible,.sia-input-wrapper[class*="sia-tone--"]:focus-within { outline-color:color-mix(in srgb,var(--sia-input-accent,var(--sia-primary)) 30%,transparent); border-color:var(--sia-input-accent,var(--sia-border)); }
|
|
295
|
+
.sia-code-editor,.sia-markdown-editor,.sia-rich-text-editor { display:grid; gap:.4rem; }
|
|
296
|
+
.sia-code-editor textarea,.sia-markdown-editor textarea { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
|
|
297
|
+
.sia-editor-toolbar { display:flex; gap:.3rem; padding:.35rem; border:1px solid var(--sia-border); border-radius:var(--sia-radius) var(--sia-radius) 0 0; background:var(--sia-surface); }
|
|
298
|
+
.sia-editor-toolbar button { min-height:2rem; padding:0 .55rem; border:1px solid var(--sia-border); border-radius:.3rem; background:var(--sia-background); }
|
|
299
|
+
.sia-editor-toolbar + .sia-textarea,.sia-rich-text-editor [contenteditable] { border-radius:0 0 var(--sia-radius) var(--sia-radius); }
|
|
300
|
+
.sia-editor-preview,.sia-rich-text-editor [contenteditable] { min-height:8rem; padding:.75rem; border:1px solid var(--sia-border); background:var(--sia-background); }
|
|
301
|
+
|
|
302
|
+
/* ==========================================================================
|
|
303
|
+
Mouvement
|
|
304
|
+
========================================================================== */
|
|
305
|
+
|
|
306
|
+
/* Le repli universel. Une préférence système de mouvement réduit n'est pas un
|
|
307
|
+
confort : c'est une demande médicale pour les personnes sujettes aux
|
|
308
|
+
vertiges vestibulaires. On coupe tout, sans exception. */
|
|
309
|
+
@media (prefers-reduced-motion: reduce) {
|
|
310
|
+
*,
|
|
311
|
+
*::before,
|
|
312
|
+
*::after {
|
|
313
|
+
animation-duration: 0.01ms !important;
|
|
314
|
+
animation-iteration-count: 1 !important;
|
|
315
|
+
transition-duration: 0.01ms !important;
|
|
316
|
+
scroll-behavior: auto !important;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/* Les transitions que les composants réutilisent. Aucune durée n'est écrite
|
|
321
|
+
en dur dans un composant : elles viennent toutes d'ici. */
|
|
322
|
+
.sia-transition-colors {
|
|
323
|
+
transition:
|
|
324
|
+
color var(--sia-duration-fast) var(--sia-easing-standard),
|
|
325
|
+
background-color var(--sia-duration-fast) var(--sia-easing-standard),
|
|
326
|
+
border-color var(--sia-duration-fast) var(--sia-easing-standard);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.sia-transition-lift {
|
|
330
|
+
transition:
|
|
331
|
+
transform var(--sia-duration-fast) var(--sia-easing-standard),
|
|
332
|
+
box-shadow var(--sia-duration-base) var(--sia-easing-standard),
|
|
333
|
+
filter var(--sia-duration-fast) var(--sia-easing-standard);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/* Entrées de couches flottantes */
|
|
337
|
+
@keyframes sia-fade-in {
|
|
338
|
+
from { opacity: 0; }
|
|
339
|
+
to { opacity: 1; }
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
@keyframes sia-scale-in {
|
|
343
|
+
from { opacity: 0; transform: scale(0.96) translateY(4px); }
|
|
344
|
+
to { opacity: 1; transform: none; }
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
@keyframes sia-slide-up {
|
|
348
|
+
from { opacity: 0; transform: translateY(8px); }
|
|
349
|
+
to { opacity: 1; transform: none; }
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.sia-anim-fade { animation: sia-fade-in var(--sia-duration-base) var(--sia-easing-entrance); }
|
|
353
|
+
.sia-anim-scale { animation: sia-scale-in var(--sia-duration-base) var(--sia-easing-entrance); }
|
|
354
|
+
.sia-anim-slide { animation: sia-slide-up var(--sia-duration-base) var(--sia-easing-entrance); }
|
|
355
|
+
|
|
356
|
+
/* Un anneau de focus identique partout : un seul endroit à changer. */
|
|
357
|
+
.sia-focus-ring:focus-visible,
|
|
358
|
+
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
|
|
359
|
+
outline: 2px solid var(--sia-primary);
|
|
360
|
+
outline-offset: 2px;
|
|
361
|
+
}
|
package/dist/source.mjs
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* D'où viennent le registre et les fichiers : du paquet, ou du réseau.
|
|
6
|
+
*
|
|
7
|
+
* La copie embarquée dans la CLI fige le catalogue au jour de sa publication :
|
|
8
|
+
* corriger une entrée obligerait chacun à mettre la CLI à jour. Un registre
|
|
9
|
+
* servi en HTTP règle cela — à condition que son URL porte le numéro de
|
|
10
|
+
* format, `…/r/v1/`, pour qu'une CLI ancienne continue de trouver ce qu'elle
|
|
11
|
+
* sait lire quand un `v2` incompatible apparaîtra.
|
|
12
|
+
*
|
|
13
|
+
* Les deux sources rendent la même chose : les commandes ne savent pas
|
|
14
|
+
* laquelle elles utilisent.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/** Le format de document que cette CLI sait lire. */
|
|
18
|
+
const FORMAT = 1;
|
|
19
|
+
|
|
20
|
+
function verifierFormat(registre, origine) {
|
|
21
|
+
// Absent = registre d'avant l'introduction du champ; il a la forme 1.
|
|
22
|
+
const format = registre.format ?? FORMAT;
|
|
23
|
+
if (format !== FORMAT) {
|
|
24
|
+
throw new Error(
|
|
25
|
+
`${origine} est au format ${format}, et cette CLI lit le format ${FORMAT}.\n` +
|
|
26
|
+
"Mettre la CLI à jour, ou pointer une URL de la forme …/r/v1/.",
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
return registre;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** La source embarquée : le registre copié dans `dist/` à la construction. */
|
|
33
|
+
export async function sourceLocale(racine) {
|
|
34
|
+
const registre = verifierFormat(
|
|
35
|
+
JSON.parse(await readFile(join(racine, "registry.json"), "utf8")),
|
|
36
|
+
"Le registre embarqué",
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
origine: "embarqué",
|
|
41
|
+
registre,
|
|
42
|
+
lire: (fichier) => readFile(join(racine, "package", fichier)),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* La source distante.
|
|
48
|
+
*
|
|
49
|
+
* Aucune mise en cache : la CLI tourne une fois, à la main. Un cache
|
|
50
|
+
* introduirait la question de son invalidation pour économiser quelques
|
|
51
|
+
* requêtes par installation.
|
|
52
|
+
*/
|
|
53
|
+
export async function sourceDistante(base) {
|
|
54
|
+
const racine = base.endsWith("/") ? base : `${base}/`;
|
|
55
|
+
|
|
56
|
+
const reponse = await fetch(new URL("registry.json", racine)).catch(
|
|
57
|
+
(cause) => {
|
|
58
|
+
throw new Error(`Registre injoignable : ${racine}\n${cause.message}`);
|
|
59
|
+
},
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
if (!reponse.ok) {
|
|
63
|
+
throw new Error(
|
|
64
|
+
`Registre injoignable : ${racine}registry.json a répondu ${reponse.status}.`,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const registre = verifierFormat(await reponse.json(), racine);
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
origine: racine,
|
|
72
|
+
registre,
|
|
73
|
+
lire: async (fichier) => {
|
|
74
|
+
const url = new URL(`package/${fichier}`, racine);
|
|
75
|
+
const r = await fetch(url);
|
|
76
|
+
if (!r.ok) {
|
|
77
|
+
throw new Error(`${fichier} a répondu ${r.status} sur ${racine}`);
|
|
78
|
+
}
|
|
79
|
+
return Buffer.from(await r.arrayBuffer());
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Choisit la source.
|
|
86
|
+
*
|
|
87
|
+
* `--registry <url>` l'emporte sur `sia-ui.json`, qui l'emporte sur la copie
|
|
88
|
+
* embarquée — du plus explicite au plus implicite.
|
|
89
|
+
*/
|
|
90
|
+
export async function choisirSource({ racineLocale, url }) {
|
|
91
|
+
if (url) return sourceDistante(url);
|
|
92
|
+
return sourceLocale(racineLocale);
|
|
93
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sia-ui/cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Install SIA UI components progressively into an application.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"sia-ui",
|
|
7
|
+
"cli",
|
|
8
|
+
"scaffolding",
|
|
9
|
+
"components",
|
|
10
|
+
"registry"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"author": "Ivan Mbella",
|
|
14
|
+
"homepage": "https://github.com/BeatJo/sia-ui#readme",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/BeatJo/sia-ui/issues"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/BeatJo/sia-ui.git",
|
|
21
|
+
"directory": "packages/cli"
|
|
22
|
+
},
|
|
23
|
+
"type": "module",
|
|
24
|
+
"files": [
|
|
25
|
+
"dist",
|
|
26
|
+
"README.md",
|
|
27
|
+
"LICENSE"
|
|
28
|
+
],
|
|
29
|
+
"bin": {
|
|
30
|
+
"sia-ui": "./dist/index.js"
|
|
31
|
+
},
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/node": "^25.0.3",
|
|
37
|
+
"@types/react": "^19.2.7",
|
|
38
|
+
"react": "^19.2.3",
|
|
39
|
+
"react-dom": "^19.2.3",
|
|
40
|
+
"typescript": "^5.9.3",
|
|
41
|
+
"vitest": "^4.0.16",
|
|
42
|
+
"@sia-ui/headless": "0.1.0",
|
|
43
|
+
"@sia-ui/tokens": "0.1.0",
|
|
44
|
+
"@sia-ui/utils": "0.1.0",
|
|
45
|
+
"@sia-ui/react": "0.1.0"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "node scripts/build.mjs",
|
|
49
|
+
"dev": "pnpm build && node dist/index.js",
|
|
50
|
+
"typecheck": "tsc --noEmit && node --check src/index.mjs",
|
|
51
|
+
"test": "vitest run",
|
|
52
|
+
"lint": "eslint src && node --check src/index.mjs",
|
|
53
|
+
"clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\""
|
|
54
|
+
}
|
|
55
|
+
}
|