@fileverse/ui 5.3.3 → 5.4.0-unstable-styles-1

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/package.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "@fileverse/ui",
3
- "version": "5.3.3",
3
+ "version": "5.4.0-unstable-styles-1",
4
4
  "files": [
5
- "/dist"
5
+ "/dist",
6
+ "/tailwind",
7
+ "!/tailwind/*.test.ts"
6
8
  ],
7
9
  "repository": {
8
10
  "type": "git",
@@ -14,11 +16,13 @@
14
16
  ".": {
15
17
  "import": "./dist/index.es.js"
16
18
  },
17
- "./styles": "./dist/index.css"
19
+ "./styles": "./dist/index.css",
20
+ "./styles/base": "./dist/base.css",
21
+ "./tailwind": "./tailwind/preset.cjs"
18
22
  },
19
23
  "scripts": {
20
24
  "dev": "vite",
21
- "build-css": "postcss src/index.css -o dist/index.css",
25
+ "build-css": "postcss src/base.css -o dist/base.css && postcss src/index.css -o dist/tailwind.css && cat dist/tailwind.css dist/base.css > dist/index.css && rm dist/tailwind.css",
22
26
  "build": "tsc --project tsconfig.json && vite build && npm run build-css",
23
27
  "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
24
28
  "preview": "vite preview",
@@ -54,6 +58,8 @@
54
58
  "emoji-picker-react": "^4.11.1",
55
59
  "framer-motion": "^11.18.2",
56
60
  "lucide-react": "^0.475.0",
61
+ "postcss": "^8.5.28",
62
+ "postcss-js": "^4.1.0",
57
63
  "react-day-picker": "^8.10.1",
58
64
  "tailwind-merge": "^2.2.2",
59
65
  "tailwindcss-animate": "^1.0.7",
@@ -62,7 +68,8 @@
62
68
  },
63
69
  "peerDependencies": {
64
70
  "react": "^18.2.0 || ^19.0.0",
65
- "react-dom": "^18.2.0 || ^19.0.0"
71
+ "react-dom": "^18.2.0 || ^19.0.0",
72
+ "tailwindcss": "^3.4.0"
66
73
  },
67
74
  "devDependencies": {
68
75
  "@chromatic-com/storybook": "^1.5.0",
@@ -100,7 +107,6 @@
100
107
  "husky": "^9.1.4",
101
108
  "jsdom": "^24.0.0",
102
109
  "lint-staged": "^15.2.7",
103
- "postcss": "^8.4.38",
104
110
  "postcss-cli": "^11.0.0",
105
111
  "prettier": "^3.3.3",
106
112
  "storybook": "^8.1.9",
@@ -120,4 +126,4 @@
120
126
  "npx prettier --write"
121
127
  ]
122
128
  }
123
- }
129
+ }
@@ -0,0 +1,472 @@
1
+ .font-smoothed {
2
+ -webkit-font-smoothing: antialiased;
3
+ -moz-osx-font-smoothing: grayscale;
4
+ text-rendering: optimizeLegibility;
5
+ }
6
+
7
+ .text-heading-2xlg {
8
+ font-family: system-ui;
9
+ font-size: 32px;
10
+ font-weight: 700;
11
+ line-height: 40px;
12
+ }
13
+
14
+ .text-heading-xlg {
15
+ font-family: system-ui;
16
+ font-size: 24px;
17
+ font-weight: 500;
18
+ line-height: 32px;
19
+ }
20
+
21
+ .text-heading-xlg-bold {
22
+ font-family: system-ui;
23
+ font-size: 24px;
24
+ font-weight: 700;
25
+ line-height: 32px;
26
+ }
27
+
28
+ .text-heading-lg {
29
+ font-family: system-ui;
30
+ font-size: 20px;
31
+ font-weight: 500;
32
+ line-height: 28px;
33
+ }
34
+
35
+ .text-heading-lg-bold {
36
+ font-family: system-ui;
37
+ font-size: 20px;
38
+ font-weight: 700;
39
+ line-height: 28px;
40
+ }
41
+
42
+ .text-heading-md {
43
+ font-family: system-ui;
44
+ font-size: 18px;
45
+ font-weight: 500;
46
+ line-height: 28px;
47
+ }
48
+
49
+ .text-heading-md-bold {
50
+ font-family: system-ui;
51
+ font-size: 18px;
52
+ font-weight: 700;
53
+ line-height: 28px;
54
+ }
55
+
56
+ .text-heading-sm {
57
+ font-family: system-ui;
58
+ font-size: 16px;
59
+ font-weight: 500;
60
+ line-height: 22px;
61
+ }
62
+
63
+ .text-heading-sm-bold {
64
+ font-family: system-ui;
65
+ font-size: 16px;
66
+ font-weight: 700;
67
+ line-height: 22px;
68
+ }
69
+
70
+ .text-heading-xsm {
71
+ font-family: system-ui;
72
+ font-size: 14px;
73
+ font-weight: 500;
74
+ line-height: 20px;
75
+ }
76
+
77
+ .text-heading-xsm-bold {
78
+ font-family: system-ui;
79
+ font-size: 14px;
80
+ font-weight: 700;
81
+ line-height: 20px;
82
+ }
83
+
84
+ .text-body-md {
85
+ font-family: system-ui;
86
+ font-size: 16px;
87
+ font-weight: 400;
88
+ line-height: 24px;
89
+ }
90
+
91
+ .text-body-md-bold {
92
+ font-family: system-ui;
93
+ font-size: 16px;
94
+ font-weight: 500;
95
+ line-height: 24px;
96
+ }
97
+
98
+ .text-body-sm {
99
+ font-family: system-ui;
100
+ font-size: 14px;
101
+ font-weight: 400;
102
+ line-height: 20px;
103
+ }
104
+
105
+ .text-body-sm-bold {
106
+ font-family: system-ui;
107
+ font-size: 14px;
108
+ font-weight: 500;
109
+ line-height: 20px;
110
+ }
111
+
112
+ .text-helper-text-sm {
113
+ font-family: system-ui;
114
+ font-size: 12px;
115
+ font-weight: 400;
116
+ line-height: 16px;
117
+ }
118
+
119
+ .text-helper-link {
120
+ font-family: system-ui;
121
+ font-size: 12px;
122
+ font-weight: 400;
123
+ line-height: 16px;
124
+ text-decoration: underline;
125
+ }
126
+
127
+ .color-text-default {
128
+ color: hsl(var(--color-text-default));
129
+ }
130
+
131
+ .color-text-secondary {
132
+ color: hsl(var(--color-text-secondary));
133
+ }
134
+
135
+ .color-text-disabled {
136
+ color: hsl(var(--color-text-disabled));
137
+ }
138
+
139
+ .color-text-danger {
140
+ color: hsl(var(--color-text-danger));
141
+ }
142
+
143
+ .color-text-success {
144
+ color: hsl(var(--color-text-success));
145
+ }
146
+
147
+ .color-text-link {
148
+ color: hsl(var(--color-text-link));
149
+ }
150
+
151
+ .color-text-inverse {
152
+ color: hsl(var(--color-text-inverse));
153
+ }
154
+
155
+ .color-text-on-brand {
156
+ color: hsl(var(--color-text-on-brand));
157
+ }
158
+
159
+ .color-bg-default {
160
+ background-color: hsl(var(--color-bg-default));
161
+ }
162
+
163
+ .color-bg-default-hover {
164
+ background-color: hsl(var(--color-bg-default-hover));
165
+ }
166
+
167
+ .color-bg-default-active {
168
+ background-color: hsl(var(--color-bg-default-active));
169
+ }
170
+
171
+ .color-bg-default-selected {
172
+ background-color: hsl(var(--color-bg-default-selected));
173
+ }
174
+
175
+ .color-bg-secondary {
176
+ background-color: hsl(var(--color-bg-secondary));
177
+ }
178
+
179
+ .color-bg-secondary-hover {
180
+ background-color: hsl(var(--color-bg-secondary-hover));
181
+ }
182
+
183
+ .color-bg-tertiary {
184
+ background-color: hsl(var(--color-bg-tertiary));
185
+ }
186
+
187
+ .color-bg-disabled {
188
+ background-color: hsl(var(--color-bg-disabled));
189
+ }
190
+
191
+ .color-bg-brand {
192
+ background-color: hsl(var(--color-bg-brand));
193
+ }
194
+
195
+ .color-bg-brand-hover {
196
+ background-color: hsl(var(--color-bg-brand-hover));
197
+ }
198
+
199
+ .color-bg-brand-light {
200
+ background-color: hsl(var(--color-bg-brand-light));
201
+ }
202
+
203
+ .color-bg-danger {
204
+ background-color: hsl(var(--color-bg-danger));
205
+ }
206
+
207
+ .color-bg-danger-light {
208
+ background-color: hsl(var(--color-bg-danger-light));
209
+ }
210
+
211
+ .color-bg-success-light {
212
+ background-color: hsl(var(--color-bg-success-light));
213
+ }
214
+
215
+ .color-bg-info-light {
216
+ background-color: hsl(var(--color-bg-info-light));
217
+ }
218
+
219
+ .color-bg-success {
220
+ background-color: hsl(var(--color-bg-success));
221
+ }
222
+
223
+ .color-bg-default-inverse {
224
+ background-color: hsl(var(--color-bg-default-inverse));
225
+ }
226
+
227
+ .color-bg-tooltip {
228
+ background-color: hsl(var(--color-bg-tooltip));
229
+ }
230
+
231
+ .color-text-tooltip {
232
+ color: hsl(var(--color-text-tooltip));
233
+ }
234
+
235
+ .color-bg-inline-comment {
236
+ background-color: hsl(var(--color-inline-comment));
237
+ }
238
+
239
+ .color-bg-inline-comment-active {
240
+ background-color: hsl(var(--color-inline-comment-active));
241
+ }
242
+
243
+ .color-bg-transparent {
244
+ background-color: hsl(var(--color-bg-transparent));
245
+ }
246
+
247
+ .color-button-default {
248
+ background-color: hsl(var(--color-button-default));
249
+ border-color: hsl(var(--color-button-default));
250
+ }
251
+
252
+ .color-button-default-hover {
253
+ background-color: hsl(var(--color-button-default-hover));
254
+ }
255
+
256
+ .color-button-secondary {
257
+ border: 2px solid hsl(var(--color-border-active));
258
+ }
259
+
260
+ .color-button-secondary-hover {
261
+ background-color: hsl(var(--color-button-secondary-hover));
262
+ }
263
+
264
+ .color-button-disabled {
265
+ background-color: hsl(var(--color-button-disabled));
266
+ border-color: hsl(var(--color-button-disabled));
267
+ color: hsl(var(--color-text-disabled));
268
+ }
269
+
270
+ .color-button-danger {
271
+ background-color: hsl(var(--color-button-danger));
272
+ border-color: hsl(var(--color-button-danger));
273
+ }
274
+
275
+ .color-button-danger-hover {
276
+ background-color: hsl(var(--color-button-danger-hover));
277
+ }
278
+
279
+ .color-button-floating {
280
+ background-color: hsl(var(--color-button-floating));
281
+ border-color: hsl(var(--color-border-default));
282
+ }
283
+
284
+ .color-button-floating-hover {
285
+ background-color: hsl(var(--color-button-floating-hover));
286
+ }
287
+
288
+ .color-border-default {
289
+ border-color: hsl(var(--color-border-default));
290
+ }
291
+
292
+ .color-border-toast-warning {
293
+ border-left-color: hsl(var(--color-border-warning));
294
+ }
295
+
296
+ .color-border-toast-error {
297
+ border-left-color: hsl(var(--color-border-danger));
298
+ }
299
+
300
+ .color-border-toast-success {
301
+ border-left-color: hsl(var(--color-border-success));
302
+ }
303
+
304
+ .color-border-toast-info {
305
+ border-left-color: hsl(var(--color-border-info));
306
+ }
307
+
308
+ .color-border-hover {
309
+ border-color: hsl(var(--color-border-hover));
310
+ }
311
+
312
+ .color-border-light {
313
+ border-color: hsl(var(--color-border-light));
314
+ }
315
+
316
+ .color-border-active {
317
+ border-color: hsl(var(--color-border-active));
318
+ }
319
+
320
+ .color-border-focused {
321
+ border-color: hsl(var(--color-border-focused));
322
+ }
323
+
324
+ .color-border-warning {
325
+ border-color: hsl(var(--color-border-warning));
326
+ }
327
+
328
+ .color-border-success {
329
+ border-color: hsl(var(--color-border-success));
330
+ }
331
+
332
+ .color-border-info {
333
+ border-color: hsl(var(--color-border-info));
334
+ }
335
+
336
+ .color-border-disabled {
337
+ border-color: hsl(var(--color-border-disabled));
338
+ }
339
+
340
+ .color-border-danger {
341
+ border-color: hsl(var(--color-border-danger));
342
+ }
343
+
344
+ .color-icon-default {
345
+ background-color: hsl(var(--color-icon-default));
346
+ }
347
+
348
+ .color-icon-default-hover {
349
+ color: hsl(var(--color-icon-default-hover));
350
+ }
351
+
352
+ .color-icon-brand {
353
+ color: hsl(var(--color-icon-brand));
354
+ }
355
+
356
+ .color-icon-secondary {
357
+ color: hsl(var(--color-icon-secondary));
358
+ }
359
+
360
+ .color-icon-disabled {
361
+ background-color: hsl(var(--color-icon-disabled));
362
+ }
363
+
364
+ .color-icon-inverse {
365
+ color: hsl(var(--color-icon-inverse));
366
+ }
367
+
368
+ .color-icon-success {
369
+ color: hsl(var(--color-icon-success));
370
+ }
371
+
372
+ .color-icon-danger {
373
+ color: hsl(var(--color-icon-danger));
374
+ }
375
+
376
+ .color-icon-warning {
377
+ color: hsl(var(--color-icon-warning));
378
+ }
379
+
380
+ .color-icon-info {
381
+ color: hsl(var(--color-icon-info));
382
+ }
383
+
384
+ .color-icon-on-brand {
385
+ color: hsl(var(--color-icon-on-brand));
386
+ }
387
+
388
+ .color-utility-overlay {
389
+ background-color: hsl(var(--color-utility-overlay));
390
+ }
391
+
392
+ .shadow-elevation-1 {
393
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
394
+ }
395
+
396
+ .shadow-elevation-2 {
397
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
398
+ }
399
+
400
+ .shadow-elevation-3 {
401
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
402
+ }
403
+
404
+ .shadow-elevation-4 {
405
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
406
+ }
407
+
408
+ .divider-y-sm {
409
+ border-right-width: 0px;
410
+ border-left-width: 0.5px;
411
+ border-left-color: hsl(var(--color-border-default));
412
+ }
413
+
414
+ .divider-y-md {
415
+ border-right-width: 0px;
416
+ border-left-width: 1px;
417
+ border-left-color: hsl(var(--color-border-default));
418
+ }
419
+
420
+ .divider-y-lg {
421
+ border-right-width: 0px;
422
+ border-left-width: 2px;
423
+ border-left-color: hsl(var(--color-border-default));
424
+ }
425
+
426
+ .divider-y-xlg {
427
+ border-right-width: 0px;
428
+ border-left-width: 4px;
429
+ border-left-color: hsl(var(--color-border-default));
430
+ }
431
+
432
+ .divider-x-sm {
433
+ border-bottom-width: 0px;
434
+ border-top-width: 0.5px;
435
+ border-left-color: hsl(var(--color-border-default));
436
+ }
437
+
438
+ .divider-x-md {
439
+ border-bottom-width: 0px;
440
+ border-top-width: 1px;
441
+ border-top-color: hsl(var(--color-border-default));
442
+ }
443
+
444
+ .divider-x-lg {
445
+ border-bottom-width: 0px;
446
+ border-top-width: 2px;
447
+ border-top-color: hsl(var(--color-border-default));
448
+ }
449
+
450
+ .divider-x-xlg {
451
+ border-bottom-width: 0px;
452
+ border-top-width: 4px;
453
+ border-top-color: hsl(var(--color-border-default));
454
+ }
455
+
456
+ .avatar-sm {
457
+ border-radius: 4px;
458
+ border-width: 2px;
459
+ }
460
+
461
+ .avatar-lg {
462
+ border-radius: 8px;
463
+ border-width: 4px;
464
+ }
465
+
466
+ .toggle-default {
467
+ background-color: hsl(var(--color-bg-disabled));
468
+ }
469
+
470
+ .toggle-active {
471
+ background-color: hsl(var(--color-bg-brand));
472
+ }
@@ -0,0 +1,44 @@
1
+ const fs = require("fs")
2
+ const path = require("path")
3
+ const postcss = require("postcss")
4
+ const postcssJs = require("postcss-js")
5
+ const plugin = require("tailwindcss/plugin")
6
+
7
+ // components.css is the single source of truth for the design-system classes.
8
+ const components = postcssJs.objectify(
9
+ postcss.parse(fs.readFileSync(path.join(__dirname, "components.css"), "utf8")),
10
+ )
11
+
12
+ module.exports = {
13
+ darkMode: ["class"],
14
+ theme: {
15
+ extend: {
16
+ colors: {
17
+ focused: "hsl(var(--focused))",
18
+ },
19
+ borderRadius: {
20
+ lg: "var(--radius)",
21
+ md: "calc(var(--radius) - 2px)",
22
+ sm: "calc(var(--radius) - 4px)",
23
+ },
24
+ keyframes: {
25
+ "accordion-down": {
26
+ from: { height: "0" },
27
+ to: { height: "var(--radix-accordion-content-height)" },
28
+ },
29
+ "accordion-up": {
30
+ from: { height: "var(--radix-accordion-content-height)" },
31
+ to: { height: "0" },
32
+ },
33
+ },
34
+ animation: {
35
+ "accordion-down": "accordion-down 0.2s ease-out",
36
+ "accordion-up": "accordion-up 0.2s ease-out",
37
+ },
38
+ },
39
+ },
40
+ plugins: [
41
+ require("tailwindcss-animate"),
42
+ plugin(({ addComponents }) => addComponents(components)),
43
+ ],
44
+ }