@fileverse/ui 5.4.0-unstable-styles-1 → 5.4.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/README.md +11 -2
- package/dist/base.css +3 -7
- package/dist/index.css +15 -11
- package/package.json +6 -1
- package/tailwind/components.css +12 -4
- package/tailwind/preset.cjs +3 -1
package/README.md
CHANGED
|
@@ -25,6 +25,11 @@ import './globals.css'; // your tailwind entry
|
|
|
25
25
|
import '@fileverse/ui/styles/base'; // tokens, `*`/`body` rules, third-party overrides
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
+
`styles/base` also ships the legacy `!important` spacing/border-radius utilities
|
|
29
|
+
(`.space-*`, `.gap-*`, `.border-radius-*`, and friends) at the same position they held in the old
|
|
30
|
+
bundle; if your own Tailwind theme defines spacing/radius keys with the same names, these
|
|
31
|
+
`!important` rules win. Treat them as deprecated.
|
|
32
|
+
|
|
28
33
|
2. Add the preset and scan the ui bundle in `tailwind.config.js`:
|
|
29
34
|
|
|
30
35
|
```js
|
|
@@ -32,12 +37,16 @@ module.exports = {
|
|
|
32
37
|
presets: [require('@fileverse/ui/tailwind')],
|
|
33
38
|
content: [
|
|
34
39
|
'./src/**/*.{ts,tsx}',
|
|
35
|
-
'./node_modules/@fileverse/ui/dist
|
|
40
|
+
'./node_modules/@fileverse/ui/dist/**/*.{js,mjs}',
|
|
36
41
|
],
|
|
37
42
|
};
|
|
38
43
|
```
|
|
39
44
|
|
|
40
|
-
The preset sets `darkMode: ['class']`, adds `tailwindcss-animate`, and registers the `color-*`, `text-heading-*`, `text-body-*`, `shadow-elevation-*`, `divider-*`, `avatar-*`, and `toggle-*` classes, so variants such as `hover:color-bg-default-hover` work.
|
|
45
|
+
The preset sets `darkMode: ['class']`, adds `tailwindcss-animate`, and registers the `color-*`, `text-heading-*`, `text-body-*`, `text-helper-text-sm`, `text-helper-link`, `font-smoothed`, `shadow-elevation-*`, `divider-*`, `avatar-*`, and `toggle-*` classes, so variants such as `hover:color-bg-default-hover` work.
|
|
46
|
+
|
|
47
|
+
The `content` entry for `node_modules/@fileverse/ui/dist/**/*.{js,mjs}` is required: Tailwind 3 does not merge `content` from presets, and without it the design-system classes and the utilities the ui components use are purged from your build. The preset targets Tailwind 3.4; Tailwind 4 is not supported.
|
|
48
|
+
|
|
49
|
+
That literal `node_modules` path assumes a hoisted install; under pnpm, Yarn PnP, or a monorepo workspace it won't resolve, so point `content` at the package's actual install location instead.
|
|
41
50
|
|
|
42
51
|
### Legacy bundle (deprecated)
|
|
43
52
|
|
package/dist/base.css
CHANGED
|
@@ -402,7 +402,9 @@
|
|
|
402
402
|
--color-utility-overlay: 0, 0%, 0%, 0.72; /* Black 72% */
|
|
403
403
|
}
|
|
404
404
|
|
|
405
|
-
|
|
405
|
+
*,
|
|
406
|
+
::before,
|
|
407
|
+
::after {
|
|
406
408
|
border-color: hsl(var(--color-border-default));
|
|
407
409
|
-webkit-font-smoothing: antialiased;
|
|
408
410
|
-moz-osx-font-smoothing: grayscale;
|
|
@@ -414,12 +416,6 @@ body {
|
|
|
414
416
|
color: hsl(var(--color-text-default));
|
|
415
417
|
}
|
|
416
418
|
|
|
417
|
-
/** COLORS **/
|
|
418
|
-
|
|
419
|
-
/* ELEVATIONS */
|
|
420
|
-
|
|
421
|
-
/* DIVIDERS */
|
|
422
|
-
|
|
423
419
|
#selected-value > div > div > p {
|
|
424
420
|
display: none;
|
|
425
421
|
}
|
package/dist/index.css
CHANGED
|
@@ -816,16 +816,24 @@ video {
|
|
|
816
816
|
background-color: hsl(var(--color-utility-overlay));
|
|
817
817
|
}
|
|
818
818
|
.shadow-elevation-1 {
|
|
819
|
-
|
|
819
|
+
--tw-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
|
|
820
|
+
--tw-shadow-colored: 0 1px 2px var(--tw-shadow-color);
|
|
821
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
820
822
|
}
|
|
821
823
|
.shadow-elevation-2 {
|
|
822
|
-
|
|
824
|
+
--tw-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
|
|
825
|
+
--tw-shadow-colored: 0 2px 4px var(--tw-shadow-color);
|
|
826
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
823
827
|
}
|
|
824
828
|
.shadow-elevation-3 {
|
|
825
|
-
|
|
829
|
+
--tw-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
|
|
830
|
+
--tw-shadow-colored: 0 4px 16px var(--tw-shadow-color);
|
|
831
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
826
832
|
}
|
|
827
833
|
.shadow-elevation-4 {
|
|
828
|
-
|
|
834
|
+
--tw-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
|
|
835
|
+
--tw-shadow-colored: 0 8px 32px var(--tw-shadow-color);
|
|
836
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
829
837
|
}
|
|
830
838
|
.divider-y-sm {
|
|
831
839
|
border-right-width: 0px;
|
|
@@ -3767,7 +3775,9 @@ video {
|
|
|
3767
3775
|
--color-utility-overlay: 0, 0%, 0%, 0.72; /* Black 72% */
|
|
3768
3776
|
}
|
|
3769
3777
|
|
|
3770
|
-
|
|
3778
|
+
*,
|
|
3779
|
+
::before,
|
|
3780
|
+
::after {
|
|
3771
3781
|
border-color: hsl(var(--color-border-default));
|
|
3772
3782
|
-webkit-font-smoothing: antialiased;
|
|
3773
3783
|
-moz-osx-font-smoothing: grayscale;
|
|
@@ -3779,12 +3789,6 @@ body {
|
|
|
3779
3789
|
color: hsl(var(--color-text-default));
|
|
3780
3790
|
}
|
|
3781
3791
|
|
|
3782
|
-
/** COLORS **/
|
|
3783
|
-
|
|
3784
|
-
/* ELEVATIONS */
|
|
3785
|
-
|
|
3786
|
-
/* DIVIDERS */
|
|
3787
|
-
|
|
3788
3792
|
#selected-value > div > div > p {
|
|
3789
3793
|
display: none;
|
|
3790
3794
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fileverse/ui",
|
|
3
|
-
"version": "5.4.0
|
|
3
|
+
"version": "5.4.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"/dist",
|
|
6
6
|
"/tailwind",
|
|
@@ -71,6 +71,11 @@
|
|
|
71
71
|
"react-dom": "^18.2.0 || ^19.0.0",
|
|
72
72
|
"tailwindcss": "^3.4.0"
|
|
73
73
|
},
|
|
74
|
+
"peerDependenciesMeta": {
|
|
75
|
+
"tailwindcss": {
|
|
76
|
+
"optional": true
|
|
77
|
+
}
|
|
78
|
+
},
|
|
74
79
|
"devDependencies": {
|
|
75
80
|
"@chromatic-com/storybook": "^1.5.0",
|
|
76
81
|
"@storybook/addon-actions": "^8.1.9",
|
package/tailwind/components.css
CHANGED
|
@@ -390,19 +390,27 @@
|
|
|
390
390
|
}
|
|
391
391
|
|
|
392
392
|
.shadow-elevation-1 {
|
|
393
|
-
|
|
393
|
+
--tw-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
|
|
394
|
+
--tw-shadow-colored: 0 1px 2px var(--tw-shadow-color);
|
|
395
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
394
396
|
}
|
|
395
397
|
|
|
396
398
|
.shadow-elevation-2 {
|
|
397
|
-
|
|
399
|
+
--tw-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
|
|
400
|
+
--tw-shadow-colored: 0 2px 4px var(--tw-shadow-color);
|
|
401
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
398
402
|
}
|
|
399
403
|
|
|
400
404
|
.shadow-elevation-3 {
|
|
401
|
-
|
|
405
|
+
--tw-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
|
|
406
|
+
--tw-shadow-colored: 0 4px 16px var(--tw-shadow-color);
|
|
407
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
402
408
|
}
|
|
403
409
|
|
|
404
410
|
.shadow-elevation-4 {
|
|
405
|
-
|
|
411
|
+
--tw-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
|
|
412
|
+
--tw-shadow-colored: 0 8px 32px var(--tw-shadow-color);
|
|
413
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
406
414
|
}
|
|
407
415
|
|
|
408
416
|
.divider-y-sm {
|
package/tailwind/preset.cjs
CHANGED