@arcfusionz/arc-primitive-ui 0.0.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/dist/index.d.ts +3399 -0
- package/dist/index.js +5344 -0
- package/package.json +59 -0
- package/src/styles/theme.css +341 -0
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@arcfusionz/arc-primitive-ui",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "ArcFusion primitive UI components",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/arcfusion-ai/arc-components.git",
|
|
10
|
+
"directory": "packages/primitive-ui"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/arcfusion-ai/arc-components#readme",
|
|
13
|
+
"bugs": "https://github.com/arcfusion-ai/arc-components/issues",
|
|
14
|
+
"main": "./dist/index.js",
|
|
15
|
+
"module": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"import": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./theme.css": "./src/styles/theme.css"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist",
|
|
26
|
+
"src/styles"
|
|
27
|
+
],
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"sideEffects": [
|
|
32
|
+
"**/*.css"
|
|
33
|
+
],
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
36
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
37
|
+
"react-hook-form": "^7.46.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@hookform/resolvers": "^5.4.0",
|
|
41
|
+
"@types/react": "^19.0.0",
|
|
42
|
+
"@types/react-dom": "^19.0.0",
|
|
43
|
+
"react": "^19.0.0",
|
|
44
|
+
"react-dom": "^19.0.0",
|
|
45
|
+
"react-hook-form": "^7.82.0",
|
|
46
|
+
"tsdown": "^0.22.12",
|
|
47
|
+
"typescript": "^5.7.0",
|
|
48
|
+
"zod": "^4.4.3"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@base-ui/react": "^1.6.0",
|
|
52
|
+
"clsx": "^2.1.1",
|
|
53
|
+
"tailwind-merge": "^3.6.0"
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"build": "tsdown",
|
|
57
|
+
"typecheck": "tsc --noEmit"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ArcFusion Design Tokens
|
|
3
|
+
* Source of truth: ArcFusion Brand Toolkit 2026
|
|
4
|
+
*
|
|
5
|
+
* Consumers import this AFTER Tailwind:
|
|
6
|
+
*
|
|
7
|
+
* @import "tailwindcss";
|
|
8
|
+
* @import "@arcfusionz/arc-primitive-ui/theme.css";
|
|
9
|
+
*
|
|
10
|
+
* Two tiers:
|
|
11
|
+
* 1. Primitive scales — raw color ramps & font stacks
|
|
12
|
+
* 2. Semantic aliases — role-based tokens components use
|
|
13
|
+
*
|
|
14
|
+
* `static` emits every token as a CSS variable even when no utility uses
|
|
15
|
+
* it yet, so consumers (and the Storybook palette docs) can read any token
|
|
16
|
+
* at runtime via var(--color-*).
|
|
17
|
+
*
|
|
18
|
+
* Hexes marked [brand] are locked by the brand book; the remaining steps
|
|
19
|
+
* extend them into full ramps.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
@theme static {
|
|
23
|
+
/* ---------------------------------------------------------------------
|
|
24
|
+
* Typography
|
|
25
|
+
* Headline: Poppins ("friendly but geometric") · Body/UI: Inter
|
|
26
|
+
* Formal documents: Noto Serif · Thai pairing: Noto Sans Thai / Sarabun
|
|
27
|
+
* Note: the brand does not use a monospace family; Tailwind's default
|
|
28
|
+
* mono token is removed on purpose.
|
|
29
|
+
* ------------------------------------------------------------------- */
|
|
30
|
+
--font-sans: "Inter", "Sarabun", ui-sans-serif, system-ui, sans-serif;
|
|
31
|
+
--font-heading: "Poppins", "Noto Sans Thai", ui-sans-serif, system-ui, sans-serif;
|
|
32
|
+
--font-serif: "Noto Serif", Georgia, serif;
|
|
33
|
+
--font-mono: initial;
|
|
34
|
+
|
|
35
|
+
/* ---------------------------------------------------------------------
|
|
36
|
+
* Radius
|
|
37
|
+
* The system uses a single 6px radius. Tailwind's default radius scale
|
|
38
|
+
* is removed so `rounded-md` is the only sized option (`rounded-none`
|
|
39
|
+
* and `rounded-full` stay available for structural cases).
|
|
40
|
+
* ------------------------------------------------------------------- */
|
|
41
|
+
--radius-*: initial;
|
|
42
|
+
--radius-md: 6px;
|
|
43
|
+
|
|
44
|
+
/* ---------------------------------------------------------------------
|
|
45
|
+
* Motion
|
|
46
|
+
* AI Loader uses an asymmetric 2.4s ambient rhythm. Processing combines a
|
|
47
|
+
* variable-speed 3.6s rotation, a strong whole-mark pulse, and a monochrome
|
|
48
|
+
* currentColor fill. Its satellites fade at peak speed and return as the
|
|
49
|
+
* rotation eases. The four-point path itself never morphs. Skeleton's wave
|
|
50
|
+
* crosses a placeholder in 1.6s and rests off-canvas when motion is reduced.
|
|
51
|
+
* Progress sweeps its indeterminate segment across the track in 1.8s;
|
|
52
|
+
* reduced motion swaps the sweep for Tailwind's opacity pulse so activity
|
|
53
|
+
* still reads without positional movement.
|
|
54
|
+
* `motion-safe` leaves a still frame for reduced-motion users.
|
|
55
|
+
* ------------------------------------------------------------------- */
|
|
56
|
+
--animate-ai-loader-rotate: ai-loader-rotate 3.6s infinite;
|
|
57
|
+
--animate-ai-loader-processing-pulse: ai-loader-processing-pulse 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
58
|
+
--animate-ai-loader-processing-satellite: ai-loader-processing-satellite 3.6s linear infinite;
|
|
59
|
+
--animate-ai-loader-core: ai-loader-core 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
60
|
+
--animate-ai-loader-facet: ai-loader-facet 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
61
|
+
--animate-ai-loader-spark: ai-loader-spark 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
62
|
+
--animate-ai-loader-text-shimmer: ai-loader-text-shimmer 2s linear infinite;
|
|
63
|
+
--animate-skeleton-wave: skeleton-wave 1.6s ease-in-out infinite;
|
|
64
|
+
--animate-progress-indeterminate: progress-indeterminate 1.8s ease-in-out infinite;
|
|
65
|
+
|
|
66
|
+
/* ---------------------------------------------------------------------
|
|
67
|
+
* Primary — Electric Blue (Hero Brand B / Functional actions)
|
|
68
|
+
* ------------------------------------------------------------------- */
|
|
69
|
+
--color-primary-50: #f0f5fe;
|
|
70
|
+
--color-primary-100: #dfeafd;
|
|
71
|
+
--color-primary-200: #c2d4f9; /* [brand] soft wash — zebra rows, secondary buttons */
|
|
72
|
+
--color-primary-300: #9bbaf8;
|
|
73
|
+
--color-primary-400: #699ef7;
|
|
74
|
+
--color-primary-500: #3b82f6; /* [brand] accessible blue — links, active on dark */
|
|
75
|
+
--color-primary-600: #1848f3; /* [brand] Electric Blue — primary actions */
|
|
76
|
+
--color-primary-700: #143ad4;
|
|
77
|
+
--color-primary-800: #1530ab;
|
|
78
|
+
--color-primary-900: #172c84;
|
|
79
|
+
--color-primary-950: #0d1a52;
|
|
80
|
+
|
|
81
|
+
/* ---------------------------------------------------------------------
|
|
82
|
+
* Navy — Hero Brand A (marketing headers, key visuals, dark surfaces)
|
|
83
|
+
* ------------------------------------------------------------------- */
|
|
84
|
+
--color-navy-50: #eeeefb;
|
|
85
|
+
--color-navy-100: #dedef8;
|
|
86
|
+
--color-navy-200: #c3c3f2;
|
|
87
|
+
--color-navy-300: #9f9ee9;
|
|
88
|
+
--color-navy-400: #7b77de;
|
|
89
|
+
--color-navy-500: #5d54d1;
|
|
90
|
+
--color-navy-600: #4b3dbf;
|
|
91
|
+
--color-navy-700: #3c2e9f;
|
|
92
|
+
--color-navy-800: #2f2280;
|
|
93
|
+
--color-navy-900: #1d1168;
|
|
94
|
+
--color-navy-950: #040067; /* [brand] Deep Navy */
|
|
95
|
+
|
|
96
|
+
/* ---------------------------------------------------------------------
|
|
97
|
+
* Slate — The Engineering Grays (blue-tinted; replaces pure black/white)
|
|
98
|
+
* Brand book defines the scale by name only; hexes extended here.
|
|
99
|
+
* Slate-50 for table cards · Slate-900 for code blocks.
|
|
100
|
+
* ------------------------------------------------------------------- */
|
|
101
|
+
--color-slate-50: #f7f9fc;
|
|
102
|
+
--color-slate-100: #eff2f8;
|
|
103
|
+
--color-slate-200: #dee4ef;
|
|
104
|
+
--color-slate-300: #c3cddf;
|
|
105
|
+
--color-slate-400: #93a2bd;
|
|
106
|
+
--color-slate-500: #67789b;
|
|
107
|
+
--color-slate-600: #4a5878;
|
|
108
|
+
--color-slate-700: #38445f;
|
|
109
|
+
--color-slate-800: #253048;
|
|
110
|
+
--color-slate-900: #111a30;
|
|
111
|
+
--color-slate-950: #0a101f;
|
|
112
|
+
|
|
113
|
+
/* ---------------------------------------------------------------------
|
|
114
|
+
* Status ramps — brand book shows Success/Error swatches without hexes;
|
|
115
|
+
* ramps defined here. Warning is an extension for a complete system.
|
|
116
|
+
* ------------------------------------------------------------------- */
|
|
117
|
+
--color-success-50: #ebfef2;
|
|
118
|
+
--color-success-100: #d0fbe0;
|
|
119
|
+
--color-success-200: #a5f5c6;
|
|
120
|
+
--color-success-300: #6be9a6;
|
|
121
|
+
--color-success-400: #30d57f;
|
|
122
|
+
--color-success-500: #10bf62;
|
|
123
|
+
--color-success-600: #059b4e;
|
|
124
|
+
--color-success-700: #077c41;
|
|
125
|
+
--color-success-800: #0a6236;
|
|
126
|
+
--color-success-900: #0a502e;
|
|
127
|
+
--color-success-950: #032d18;
|
|
128
|
+
|
|
129
|
+
--color-warning-50: #fffbeb;
|
|
130
|
+
--color-warning-100: #fef3c7;
|
|
131
|
+
--color-warning-200: #fde58a;
|
|
132
|
+
--color-warning-300: #fcd24d;
|
|
133
|
+
--color-warning-400: #fabe23;
|
|
134
|
+
--color-warning-500: #f4a80b;
|
|
135
|
+
--color-warning-600: #d88406;
|
|
136
|
+
--color-warning-700: #b36209;
|
|
137
|
+
--color-warning-800: #914d0e;
|
|
138
|
+
--color-warning-900: #78400f;
|
|
139
|
+
--color-warning-950: #452103;
|
|
140
|
+
|
|
141
|
+
--color-error-50: #fef2f2;
|
|
142
|
+
--color-error-100: #fee2e1;
|
|
143
|
+
--color-error-200: #fec9c8;
|
|
144
|
+
--color-error-300: #fba3a1;
|
|
145
|
+
--color-error-400: #f76d6a;
|
|
146
|
+
--color-error-500: #ee4540;
|
|
147
|
+
--color-error-600: #db2723;
|
|
148
|
+
--color-error-700: #b81d19;
|
|
149
|
+
--color-error-800: #981c19;
|
|
150
|
+
--color-error-900: #7e1f1d;
|
|
151
|
+
--color-error-950: #440c0b;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@keyframes skeleton-wave {
|
|
155
|
+
from {
|
|
156
|
+
translate: -100% 0;
|
|
157
|
+
}
|
|
158
|
+
to {
|
|
159
|
+
translate: 100% 0;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/* The indeterminate Progress segment is 40% of its track wide; translate is
|
|
164
|
+
relative to the segment itself, so -100% rests fully off the left edge and
|
|
165
|
+
250% (100% / 40% width) exits fully off the right. */
|
|
166
|
+
@keyframes progress-indeterminate {
|
|
167
|
+
from {
|
|
168
|
+
translate: -100% 0;
|
|
169
|
+
}
|
|
170
|
+
to {
|
|
171
|
+
translate: 250% 0;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
@keyframes ai-loader-rotate {
|
|
176
|
+
0% {
|
|
177
|
+
transform: rotate(0deg);
|
|
178
|
+
animation-timing-function: cubic-bezier(0.45, 0, 0.75, 0.35);
|
|
179
|
+
}
|
|
180
|
+
28% {
|
|
181
|
+
transform: rotate(60deg);
|
|
182
|
+
animation-timing-function: cubic-bezier(0.15, 0.75, 0.25, 1);
|
|
183
|
+
}
|
|
184
|
+
58% {
|
|
185
|
+
transform: rotate(220deg);
|
|
186
|
+
animation-timing-function: cubic-bezier(0.55, 0, 0.8, 0.45);
|
|
187
|
+
}
|
|
188
|
+
76% {
|
|
189
|
+
transform: rotate(276deg);
|
|
190
|
+
animation-timing-function: cubic-bezier(0.2, 0.7, 0.3, 1);
|
|
191
|
+
}
|
|
192
|
+
100% {
|
|
193
|
+
transform: rotate(360deg);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
@keyframes ai-loader-processing-pulse {
|
|
198
|
+
0%,
|
|
199
|
+
100% {
|
|
200
|
+
opacity: 0.82;
|
|
201
|
+
transform: scale(0.72);
|
|
202
|
+
}
|
|
203
|
+
34% {
|
|
204
|
+
opacity: 1;
|
|
205
|
+
transform: scale(1.08);
|
|
206
|
+
}
|
|
207
|
+
56% {
|
|
208
|
+
opacity: 0.9;
|
|
209
|
+
transform: scale(0.86);
|
|
210
|
+
}
|
|
211
|
+
78% {
|
|
212
|
+
opacity: 1;
|
|
213
|
+
transform: scale(1.04);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
@keyframes ai-loader-processing-satellite {
|
|
218
|
+
0%,
|
|
219
|
+
18%,
|
|
220
|
+
100% {
|
|
221
|
+
opacity: 1;
|
|
222
|
+
}
|
|
223
|
+
28%,
|
|
224
|
+
38% {
|
|
225
|
+
opacity: 0;
|
|
226
|
+
}
|
|
227
|
+
58% {
|
|
228
|
+
opacity: 1;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@keyframes ai-loader-text-shimmer {
|
|
233
|
+
0% {
|
|
234
|
+
background-position:
|
|
235
|
+
100% 50%,
|
|
236
|
+
0 0;
|
|
237
|
+
}
|
|
238
|
+
100% {
|
|
239
|
+
background-position:
|
|
240
|
+
0% 50%,
|
|
241
|
+
0 0;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@keyframes ai-loader-core {
|
|
246
|
+
0%,
|
|
247
|
+
100% {
|
|
248
|
+
opacity: 0.95;
|
|
249
|
+
transform: rotate(0deg) scale(1);
|
|
250
|
+
}
|
|
251
|
+
26% {
|
|
252
|
+
opacity: 0.82;
|
|
253
|
+
transform: rotate(-8deg) scale(0.82);
|
|
254
|
+
}
|
|
255
|
+
56% {
|
|
256
|
+
opacity: 1;
|
|
257
|
+
transform: rotate(0deg) scale(1);
|
|
258
|
+
}
|
|
259
|
+
78% {
|
|
260
|
+
opacity: 0.92;
|
|
261
|
+
transform: rotate(9deg) scale(0.9);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
@keyframes ai-loader-facet {
|
|
266
|
+
0%,
|
|
267
|
+
100% {
|
|
268
|
+
opacity: 0.15;
|
|
269
|
+
transform: rotate(45deg) scale(0.75);
|
|
270
|
+
}
|
|
271
|
+
36% {
|
|
272
|
+
opacity: 0.34;
|
|
273
|
+
transform: rotate(55deg) scale(0.82);
|
|
274
|
+
}
|
|
275
|
+
68% {
|
|
276
|
+
opacity: 0.12;
|
|
277
|
+
transform: rotate(36deg) scale(0.58);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
@keyframes ai-loader-spark {
|
|
282
|
+
0%,
|
|
283
|
+
100% {
|
|
284
|
+
opacity: 0.45;
|
|
285
|
+
transform: scale(1);
|
|
286
|
+
}
|
|
287
|
+
20% {
|
|
288
|
+
opacity: 0.18;
|
|
289
|
+
transform: scale(0.45);
|
|
290
|
+
}
|
|
291
|
+
42% {
|
|
292
|
+
opacity: 0.95;
|
|
293
|
+
transform: scale(1);
|
|
294
|
+
}
|
|
295
|
+
62% {
|
|
296
|
+
opacity: 0.28;
|
|
297
|
+
transform: scale(0.62);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/* -----------------------------------------------------------------------
|
|
302
|
+
* Semantic tokens — what components actually reference.
|
|
303
|
+
* --------------------------------------------------------------------- */
|
|
304
|
+
@theme static {
|
|
305
|
+
--color-background: #ffffff; /* [brand] the "Clean Slate" */
|
|
306
|
+
--color-foreground: var(--color-slate-900);
|
|
307
|
+
|
|
308
|
+
--color-surface: var(--color-slate-50);
|
|
309
|
+
--color-surface-foreground: var(--color-slate-900);
|
|
310
|
+
|
|
311
|
+
--color-muted: var(--color-slate-100);
|
|
312
|
+
--color-muted-foreground: var(--color-slate-500);
|
|
313
|
+
|
|
314
|
+
--color-border: var(--color-slate-200);
|
|
315
|
+
--color-ring: var(--color-primary-600);
|
|
316
|
+
|
|
317
|
+
/* Scrim behind modal surfaces (dialogs, drawers). Carries its own alpha so
|
|
318
|
+
overlays fade the whole layer via opacity without restating the color. */
|
|
319
|
+
--color-overlay: color-mix(in oklab, var(--color-slate-950) 50%, transparent);
|
|
320
|
+
|
|
321
|
+
--color-primary: var(--color-primary-600);
|
|
322
|
+
--color-primary-foreground: #ffffff;
|
|
323
|
+
|
|
324
|
+
--color-secondary: var(--color-primary-200);
|
|
325
|
+
--color-secondary-foreground: var(--color-navy-950);
|
|
326
|
+
|
|
327
|
+
--color-hero: var(--color-navy-950);
|
|
328
|
+
--color-hero-foreground: #ffffff;
|
|
329
|
+
|
|
330
|
+
--color-success: var(--color-success-600);
|
|
331
|
+
--color-success-foreground: #ffffff;
|
|
332
|
+
|
|
333
|
+
--color-warning: var(--color-warning-600);
|
|
334
|
+
--color-warning-foreground: #ffffff;
|
|
335
|
+
|
|
336
|
+
--color-destructive: var(--color-error-600);
|
|
337
|
+
--color-destructive-foreground: #ffffff;
|
|
338
|
+
|
|
339
|
+
--color-info: var(--color-primary-500);
|
|
340
|
+
--color-info-foreground: #ffffff;
|
|
341
|
+
}
|