@zambon-dev/ui 0.0.1-bootstrap.0 → 1.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/CHANGELOG.md +4 -0
- package/README.md +81 -81
- package/fesm2022/zambon-dev-ui-framework.mjs +5943 -3980
- package/fesm2022/zambon-dev-ui-framework.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui-library.mjs +5787 -4272
- package/fesm2022/zambon-dev-ui-library.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui-shared.mjs +2505 -1790
- package/fesm2022/zambon-dev-ui-shared.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui-testing.mjs +73 -77
- package/fesm2022/zambon-dev-ui-testing.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui.mjs +3 -8
- package/i18n/framework/en.json +63 -63
- package/i18n/framework/pt.json +63 -63
- package/i18n/shared/external-content/en.json +12 -12
- package/i18n/shared/external-content/pt.json +12 -12
- package/i18n/shared/language-selector/en.json +5 -5
- package/i18n/shared/language-selector/pt.json +5 -5
- package/i18n/shared/login/en.json +14 -14
- package/i18n/shared/login/pt.json +14 -14
- package/i18n/shared/operations-history/en.json +5 -5
- package/i18n/shared/operations-history/pt.json +5 -5
- package/i18n/shared/services-history/en.json +14 -14
- package/i18n/shared/services-history/pt.json +14 -14
- package/i18n/shared/top-bar/en.json +7 -7
- package/i18n/shared/top-bar/pt.json +7 -7
- package/package.json +1 -1
- package/styles/common.scss +10 -10
- package/styles/components/button.scss +101 -101
- package/styles/components/card.scss +13 -13
- package/styles/components/dropdown-static.scss +35 -35
- package/styles/components/input-group.scss +44 -44
- package/styles/components/input.scss +99 -99
- package/styles/components/label.scss +3 -3
- package/styles/components/row.scss +48 -48
- package/styles/mixins/background.scss +31 -31
- package/styles/theme.css +75 -75
- package/styles/variables.scss +60 -60
- package/types/zambon-dev-ui-framework.d.ts +1459 -1029
- package/types/zambon-dev-ui-library.d.ts +1607 -1165
- package/types/zambon-dev-ui-shared.d.ts +563 -543
- package/types/zambon-dev-ui-testing.d.ts +25 -30
- package/types/zambon-dev-ui.d.ts +3 -3
- package/fesm2022/zambon-dev-ui.mjs.map +0 -1
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
.form-input {
|
|
2
|
-
@apply border-gray-400;
|
|
3
|
-
@apply focus:border-gray-400 focus:ring-4 focus:ring-primary-400/30;
|
|
4
|
-
@apply transition-colors transition-shadow;
|
|
5
|
-
|
|
6
|
-
@apply invalid:border-red-400;
|
|
7
|
-
|
|
8
|
-
@apply disabled:bg-slate-100;
|
|
9
|
-
|
|
10
|
-
&.ng-invalid.ng-touched {
|
|
11
|
-
@apply border-red-600;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
input[type='text'],
|
|
16
|
-
input[type='number'],
|
|
17
|
-
input[type='password'],
|
|
18
|
-
textarea {
|
|
19
|
-
&.form-input {
|
|
20
|
-
@apply mt-1 block w-full rounded-md shadow-xs;
|
|
21
|
-
|
|
22
|
-
&.ng-invalid.ng-touched {
|
|
23
|
-
@apply pr-9;
|
|
24
|
-
@apply focus:ring-red-400/30;
|
|
25
|
-
@apply bg-no-repeat bg-[right_0.5625rem_center] bg-[length:1.125rem_1.125rem];
|
|
26
|
-
background-image: url("data:image/svg+xml,%3csvg class='text-white' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
input[type='checkbox'].form-input {
|
|
32
|
-
@apply p-0.5 h-5 w-5 rounded-sm relative;
|
|
33
|
-
@apply inline-flex flex-row justify-end;
|
|
34
|
-
@apply appearance-none bg-white;
|
|
35
|
-
|
|
36
|
-
@apply disabled:pointer-events-none disabled:opacity-50;
|
|
37
|
-
|
|
38
|
-
&:not(.switch) {
|
|
39
|
-
@apply border-2 shadow-md focus:ring-3 focus:shadow-none;
|
|
40
|
-
|
|
41
|
-
&:before {
|
|
42
|
-
@apply content-[''] rounded-sm;
|
|
43
|
-
@apply flex items-center justify-center absolute inset-0 p-1;
|
|
44
|
-
font-family: var(--fa-family-classic, 'Font Awesome 6 Free');
|
|
45
|
-
font-weight: 900;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&:checked {
|
|
50
|
-
@apply bg-none bg-primary-400 border-primary-400/80;
|
|
51
|
-
|
|
52
|
-
&:before {
|
|
53
|
-
@apply content-['\f00c'];
|
|
54
|
-
@apply text-white;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&:disabled {
|
|
59
|
-
~ label {
|
|
60
|
-
@apply opacity-50;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
~ label {
|
|
65
|
-
@apply ml-2 select-none;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
input[type='checkbox'].form-input.switch {
|
|
70
|
-
@apply w-10 rounded-[2rem];
|
|
71
|
-
@apply appearance-none bg-white;
|
|
72
|
-
|
|
73
|
-
&:before {
|
|
74
|
-
@apply content-[''] h-full aspect-square rounded-full;
|
|
75
|
-
@apply bg-slate-500/60;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&:after {
|
|
79
|
-
@apply content-[''] grow;
|
|
80
|
-
transition: flex-grow 0.15s ease-in-out;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
&:focus:before {
|
|
84
|
-
@apply bg-slate-500/60;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&:checked {
|
|
88
|
-
@apply bg-none bg-primary-400 border-primary-400/80;
|
|
89
|
-
|
|
90
|
-
&:before {
|
|
91
|
-
@apply content-[''];
|
|
92
|
-
@apply bg-white;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
&:after {
|
|
96
|
-
@apply grow-0;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
1
|
+
.form-input {
|
|
2
|
+
@apply border-gray-400;
|
|
3
|
+
@apply focus:border-gray-400 focus:ring-4 focus:ring-primary-400/30;
|
|
4
|
+
@apply transition-colors transition-shadow;
|
|
5
|
+
|
|
6
|
+
@apply invalid:border-red-400;
|
|
7
|
+
|
|
8
|
+
@apply disabled:bg-slate-100;
|
|
9
|
+
|
|
10
|
+
&.ng-invalid.ng-touched {
|
|
11
|
+
@apply border-red-600;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
input[type='text'],
|
|
16
|
+
input[type='number'],
|
|
17
|
+
input[type='password'],
|
|
18
|
+
textarea {
|
|
19
|
+
&.form-input {
|
|
20
|
+
@apply mt-1 block w-full rounded-md shadow-xs;
|
|
21
|
+
|
|
22
|
+
&.ng-invalid.ng-touched {
|
|
23
|
+
@apply pr-9;
|
|
24
|
+
@apply focus:ring-red-400/30;
|
|
25
|
+
@apply bg-no-repeat bg-[right_0.5625rem_center] bg-[length:1.125rem_1.125rem];
|
|
26
|
+
background-image: url("data:image/svg+xml,%3csvg class='text-white' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
input[type='checkbox'].form-input {
|
|
32
|
+
@apply p-0.5 h-5 w-5 rounded-sm relative;
|
|
33
|
+
@apply inline-flex flex-row justify-end;
|
|
34
|
+
@apply appearance-none bg-white;
|
|
35
|
+
|
|
36
|
+
@apply disabled:pointer-events-none disabled:opacity-50;
|
|
37
|
+
|
|
38
|
+
&:not(.switch) {
|
|
39
|
+
@apply border-2 shadow-md focus:ring-3 focus:shadow-none;
|
|
40
|
+
|
|
41
|
+
&:before {
|
|
42
|
+
@apply content-[''] rounded-sm;
|
|
43
|
+
@apply flex items-center justify-center absolute inset-0 p-1;
|
|
44
|
+
font-family: var(--fa-family-classic, 'Font Awesome 6 Free');
|
|
45
|
+
font-weight: 900;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:checked {
|
|
50
|
+
@apply bg-none bg-primary-400 border-primary-400/80;
|
|
51
|
+
|
|
52
|
+
&:before {
|
|
53
|
+
@apply content-['\f00c'];
|
|
54
|
+
@apply text-white;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:disabled {
|
|
59
|
+
~ label {
|
|
60
|
+
@apply opacity-50;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
~ label {
|
|
65
|
+
@apply ml-2 select-none;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
input[type='checkbox'].form-input.switch {
|
|
70
|
+
@apply w-10 rounded-[2rem];
|
|
71
|
+
@apply appearance-none bg-white;
|
|
72
|
+
|
|
73
|
+
&:before {
|
|
74
|
+
@apply content-[''] h-full aspect-square rounded-full;
|
|
75
|
+
@apply bg-slate-500/60;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&:after {
|
|
79
|
+
@apply content-[''] grow;
|
|
80
|
+
transition: flex-grow 0.15s ease-in-out;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&:focus:before {
|
|
84
|
+
@apply bg-slate-500/60;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&:checked {
|
|
88
|
+
@apply bg-none bg-primary-400 border-primary-400/80;
|
|
89
|
+
|
|
90
|
+
&:before {
|
|
91
|
+
@apply content-[''];
|
|
92
|
+
@apply bg-white;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&:after {
|
|
96
|
+
@apply grow-0;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
.form-label {
|
|
2
|
-
@apply block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2;
|
|
3
|
-
}
|
|
1
|
+
.form-label {
|
|
2
|
+
@apply block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2;
|
|
3
|
+
}
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
.row {
|
|
2
|
-
@apply grid gap-3;
|
|
3
|
-
|
|
4
|
-
&.cols-1 {
|
|
5
|
-
@apply grid-cols-1;
|
|
6
|
-
}
|
|
7
|
-
&.cols-2 {
|
|
8
|
-
@apply grid-cols-2;
|
|
9
|
-
}
|
|
10
|
-
&.cols-3 {
|
|
11
|
-
@apply grid-cols-3;
|
|
12
|
-
}
|
|
13
|
-
&.cols-4 {
|
|
14
|
-
@apply grid-cols-4;
|
|
15
|
-
}
|
|
16
|
-
&.cols-5 {
|
|
17
|
-
@apply grid-cols-5;
|
|
18
|
-
}
|
|
19
|
-
&.cols-6 {
|
|
20
|
-
@apply grid-cols-6;
|
|
21
|
-
}
|
|
22
|
-
&.cols-7 {
|
|
23
|
-
@apply grid-cols-7;
|
|
24
|
-
}
|
|
25
|
-
&.cols-8 {
|
|
26
|
-
@apply grid-cols-8;
|
|
27
|
-
}
|
|
28
|
-
&.cols-9 {
|
|
29
|
-
@apply grid-cols-9;
|
|
30
|
-
}
|
|
31
|
-
&.cols-10 {
|
|
32
|
-
@apply grid-cols-10;
|
|
33
|
-
}
|
|
34
|
-
&.cols-11 {
|
|
35
|
-
@apply grid-cols-11;
|
|
36
|
-
}
|
|
37
|
-
&.cols-12 {
|
|
38
|
-
@apply grid-cols-12;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.input-group ~ .input-group {
|
|
42
|
-
@apply mt-0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
~ .row {
|
|
46
|
-
@apply mt-3;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
1
|
+
.row {
|
|
2
|
+
@apply grid gap-3;
|
|
3
|
+
|
|
4
|
+
&.cols-1 {
|
|
5
|
+
@apply grid-cols-1;
|
|
6
|
+
}
|
|
7
|
+
&.cols-2 {
|
|
8
|
+
@apply grid-cols-2;
|
|
9
|
+
}
|
|
10
|
+
&.cols-3 {
|
|
11
|
+
@apply grid-cols-3;
|
|
12
|
+
}
|
|
13
|
+
&.cols-4 {
|
|
14
|
+
@apply grid-cols-4;
|
|
15
|
+
}
|
|
16
|
+
&.cols-5 {
|
|
17
|
+
@apply grid-cols-5;
|
|
18
|
+
}
|
|
19
|
+
&.cols-6 {
|
|
20
|
+
@apply grid-cols-6;
|
|
21
|
+
}
|
|
22
|
+
&.cols-7 {
|
|
23
|
+
@apply grid-cols-7;
|
|
24
|
+
}
|
|
25
|
+
&.cols-8 {
|
|
26
|
+
@apply grid-cols-8;
|
|
27
|
+
}
|
|
28
|
+
&.cols-9 {
|
|
29
|
+
@apply grid-cols-9;
|
|
30
|
+
}
|
|
31
|
+
&.cols-10 {
|
|
32
|
+
@apply grid-cols-10;
|
|
33
|
+
}
|
|
34
|
+
&.cols-11 {
|
|
35
|
+
@apply grid-cols-11;
|
|
36
|
+
}
|
|
37
|
+
&.cols-12 {
|
|
38
|
+
@apply grid-cols-12;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.input-group ~ .input-group {
|
|
42
|
+
@apply mt-0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
~ .row {
|
|
46
|
+
@apply mt-3;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
@mixin fixed-background($image, $color) {
|
|
2
|
-
@apply fixed -z-50 w-full h-screen;
|
|
3
|
-
|
|
4
|
-
@include background($image, $color);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
@mixin background($image, $color) {
|
|
8
|
-
@apply overflow-hidden;
|
|
9
|
-
|
|
10
|
-
&,
|
|
11
|
-
&:before {
|
|
12
|
-
@apply bg-[url(#{$image})] bg-fixed bg-cover;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&:before,
|
|
16
|
-
&:after {
|
|
17
|
-
@apply content-[''] absolute inset-0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&:before {
|
|
21
|
-
@apply blur-sm;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&:after {
|
|
25
|
-
@apply #{$color};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
* {
|
|
29
|
-
@apply z-10;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
1
|
+
@mixin fixed-background($image, $color) {
|
|
2
|
+
@apply fixed -z-50 w-full h-screen;
|
|
3
|
+
|
|
4
|
+
@include background($image, $color);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@mixin background($image, $color) {
|
|
8
|
+
@apply overflow-hidden;
|
|
9
|
+
|
|
10
|
+
&,
|
|
11
|
+
&:before {
|
|
12
|
+
@apply bg-[url(#{$image})] bg-fixed bg-cover;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&:before,
|
|
16
|
+
&:after {
|
|
17
|
+
@apply content-[''] absolute inset-0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:before {
|
|
21
|
+
@apply blur-sm;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:after {
|
|
25
|
+
@apply #{$color};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
* {
|
|
29
|
+
@apply z-10;
|
|
30
|
+
}
|
|
31
|
+
}
|
package/styles/theme.css
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* The Tailwind entry point and the design tokens built on top of it.
|
|
3
|
-
*
|
|
4
|
-
* Tailwind 4 has no JavaScript config: the theme is CSS custom properties declared in `@theme`,
|
|
5
|
-
* and every one of them doubles as a utility. `--color-primary-600` both defines the token and
|
|
6
|
-
* creates `bg-primary-600`, `text-primary-600` and the rest, which is why the palette that used to
|
|
7
|
-
* live in `tailwind.config.js` lives here now.
|
|
8
|
-
*
|
|
9
|
-
* Two kinds of file consume this:
|
|
10
|
-
*
|
|
11
|
-
* An application's global stylesheet imports it, and gets the framework plus the theme:
|
|
12
|
-
* @import '@zambon-dev/shared/styles/theme.css';
|
|
13
|
-
*
|
|
14
|
-
* A stylesheet that only uses `@apply` references it, and gets the theme without emitting the
|
|
15
|
-
* framework a second time:
|
|
16
|
-
* @reference '@zambon-dev/shared/styles/theme.css';
|
|
17
|
-
*
|
|
18
|
-
* That split is new in 4. In 3 the PostCSS plugin carried the config to every file it processed,
|
|
19
|
-
* so `@apply` worked anywhere; in 4 a file is on its own unless it says where its theme comes from.
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/*
|
|
23
|
-
* `theme(static)` emits every theme variable, not only the ones this file is seen to use.
|
|
24
|
-
* Tailwind 4 prunes unused ones, and the design tokens in variables.scss reference the palette
|
|
25
|
-
* through `var(--color-gray-100)` from a different file -- which the pruner cannot see. Without
|
|
26
|
-
* this, those variables resolve to nothing: the sidebar text lost its colour and --app-backdrop's
|
|
27
|
-
* gradient became invalid and disappeared.
|
|
28
|
-
*/
|
|
29
|
-
@import 'tailwindcss' theme(static);
|
|
30
|
-
|
|
31
|
-
@plugin '@tailwindcss/forms';
|
|
32
|
-
|
|
33
|
-
/*
|
|
34
|
-
* Tailwind 4 changed the default border colour from `gray-200` to `currentColor`, so every element
|
|
35
|
-
* with a border and no colour of its own inherits the text colour. Across the Storybooks that was
|
|
36
|
-
* 615 elements going from a light grey hairline to solid black -- a change nothing in the build
|
|
37
|
-
* reports, which is the case tools/style-snapshot exists to catch.
|
|
38
|
-
*
|
|
39
|
-
* This restores the 3.x default. Removing it is a deliberate visual decision, not a cleanup: it
|
|
40
|
-
* means auditing every bordered element for one that was relying on the old default.
|
|
41
|
-
*/
|
|
42
|
-
@layer base {
|
|
43
|
-
*,
|
|
44
|
-
::after,
|
|
45
|
-
::before,
|
|
46
|
-
::backdrop,
|
|
47
|
-
::file-selector-button {
|
|
48
|
-
border-color: var(--color-gray-200, currentColor);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/*
|
|
53
|
-
* Tailwind 4 dropped the preflight rule that gave buttons a pointer cursor; the base reset now
|
|
54
|
-
* leaves them on the browser default. Restored, because every button in these libraries relied on
|
|
55
|
-
* it -- 41 elements across the Storybooks lost their pointer.
|
|
56
|
-
*/
|
|
57
|
-
@layer base {
|
|
58
|
-
button:not(:disabled),
|
|
59
|
-
[role='button']:not(:disabled) {
|
|
60
|
-
cursor: pointer;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
@theme {
|
|
65
|
-
--color-primary-50: #e6f4ff;
|
|
66
|
-
--color-primary-100: #9acaed;
|
|
67
|
-
--color-primary-200: #59a5db;
|
|
68
|
-
--color-primary-300: #2585c8;
|
|
69
|
-
--color-primary-400: #006bb6;
|
|
70
|
-
--color-primary-500: #005794;
|
|
71
|
-
--color-primary-600: #004372;
|
|
72
|
-
--color-primary-700: #002f50;
|
|
73
|
-
--color-primary-800: #001b2f;
|
|
74
|
-
--color-primary-900: #00070d;
|
|
75
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* The Tailwind entry point and the design tokens built on top of it.
|
|
3
|
+
*
|
|
4
|
+
* Tailwind 4 has no JavaScript config: the theme is CSS custom properties declared in `@theme`,
|
|
5
|
+
* and every one of them doubles as a utility. `--color-primary-600` both defines the token and
|
|
6
|
+
* creates `bg-primary-600`, `text-primary-600` and the rest, which is why the palette that used to
|
|
7
|
+
* live in `tailwind.config.js` lives here now.
|
|
8
|
+
*
|
|
9
|
+
* Two kinds of file consume this:
|
|
10
|
+
*
|
|
11
|
+
* An application's global stylesheet imports it, and gets the framework plus the theme:
|
|
12
|
+
* @import '@zambon-dev/shared/styles/theme.css';
|
|
13
|
+
*
|
|
14
|
+
* A stylesheet that only uses `@apply` references it, and gets the theme without emitting the
|
|
15
|
+
* framework a second time:
|
|
16
|
+
* @reference '@zambon-dev/shared/styles/theme.css';
|
|
17
|
+
*
|
|
18
|
+
* That split is new in 4. In 3 the PostCSS plugin carried the config to every file it processed,
|
|
19
|
+
* so `@apply` worked anywhere; in 4 a file is on its own unless it says where its theme comes from.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/*
|
|
23
|
+
* `theme(static)` emits every theme variable, not only the ones this file is seen to use.
|
|
24
|
+
* Tailwind 4 prunes unused ones, and the design tokens in variables.scss reference the palette
|
|
25
|
+
* through `var(--color-gray-100)` from a different file -- which the pruner cannot see. Without
|
|
26
|
+
* this, those variables resolve to nothing: the sidebar text lost its colour and --app-backdrop's
|
|
27
|
+
* gradient became invalid and disappeared.
|
|
28
|
+
*/
|
|
29
|
+
@import 'tailwindcss' theme(static);
|
|
30
|
+
|
|
31
|
+
@plugin '@tailwindcss/forms';
|
|
32
|
+
|
|
33
|
+
/*
|
|
34
|
+
* Tailwind 4 changed the default border colour from `gray-200` to `currentColor`, so every element
|
|
35
|
+
* with a border and no colour of its own inherits the text colour. Across the Storybooks that was
|
|
36
|
+
* 615 elements going from a light grey hairline to solid black -- a change nothing in the build
|
|
37
|
+
* reports, which is the case tools/style-snapshot exists to catch.
|
|
38
|
+
*
|
|
39
|
+
* This restores the 3.x default. Removing it is a deliberate visual decision, not a cleanup: it
|
|
40
|
+
* means auditing every bordered element for one that was relying on the old default.
|
|
41
|
+
*/
|
|
42
|
+
@layer base {
|
|
43
|
+
*,
|
|
44
|
+
::after,
|
|
45
|
+
::before,
|
|
46
|
+
::backdrop,
|
|
47
|
+
::file-selector-button {
|
|
48
|
+
border-color: var(--color-gray-200, currentColor);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/*
|
|
53
|
+
* Tailwind 4 dropped the preflight rule that gave buttons a pointer cursor; the base reset now
|
|
54
|
+
* leaves them on the browser default. Restored, because every button in these libraries relied on
|
|
55
|
+
* it -- 41 elements across the Storybooks lost their pointer.
|
|
56
|
+
*/
|
|
57
|
+
@layer base {
|
|
58
|
+
button:not(:disabled),
|
|
59
|
+
[role='button']:not(:disabled) {
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@theme {
|
|
65
|
+
--color-primary-50: #e6f4ff;
|
|
66
|
+
--color-primary-100: #9acaed;
|
|
67
|
+
--color-primary-200: #59a5db;
|
|
68
|
+
--color-primary-300: #2585c8;
|
|
69
|
+
--color-primary-400: #006bb6;
|
|
70
|
+
--color-primary-500: #005794;
|
|
71
|
+
--color-primary-600: #004372;
|
|
72
|
+
--color-primary-700: #002f50;
|
|
73
|
+
--color-primary-800: #001b2f;
|
|
74
|
+
--color-primary-900: #00070d;
|
|
75
|
+
}
|
package/styles/variables.scss
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
/* Dimensions */
|
|
3
|
-
--sidebar-animation-duration: 600ms;
|
|
4
|
-
--sidebar-collapsed-width: 70px;
|
|
5
|
-
--sidebar-expanded-width: 220px;
|
|
6
|
-
--sidebar-icon-collapsed-margin: 10px;
|
|
7
|
-
--sidebar-item-height: 2.75rem;
|
|
8
|
-
--sidebar-logo-height: 50px;
|
|
9
|
-
--sidebar-picture-size: 50px;
|
|
10
|
-
|
|
11
|
-
/* Surfaces & colors — translucent "glass" (brand-tinted) */
|
|
12
|
-
--sidebar-bg: color-mix(in srgb, var(--color-primary-600) 82%, transparent);
|
|
13
|
-
--sidebar-nav-bg: color-mix(in srgb, white 5%, transparent);
|
|
14
|
-
--sidebar-text: var(--color-gray-100);
|
|
15
|
-
--sidebar-text-muted: color-mix(in srgb, var(--color-gray-100) 60%, transparent);
|
|
16
|
-
--sidebar-item-hover-bg: color-mix(in srgb, white 12%, transparent);
|
|
17
|
-
--sidebar-item-selected-bg: color-mix(in srgb, white 22%, transparent);
|
|
18
|
-
--sidebar-item-selected-text: var(--color-white);
|
|
19
|
-
--sidebar-accent: var(--color-gray-100);
|
|
20
|
-
--sidebar-tree-line: color-mix(in srgb, white 80%, var(--color-primary-600));
|
|
21
|
-
|
|
22
|
-
/* Glass */
|
|
23
|
-
--sidebar-blur: 16px;
|
|
24
|
-
--sidebar-shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.45);
|
|
25
|
-
/* App background the glass sidebar floats over (tune to taste). */
|
|
26
|
-
--app-backdrop: linear-gradient(160deg, var(--color-gray-100) 0%, var(--color-gray-300) 100%);
|
|
27
|
-
|
|
28
|
-
/* Radii (rounded restyle) */
|
|
29
|
-
--sidebar-radius: 1.25rem;
|
|
30
|
-
--sidebar-item-radius: 10px;
|
|
31
|
-
|
|
32
|
-
/* Tabs — a light glass card the views live in. The sidebar's glass is brand-tinted
|
|
33
|
-
and dark; this one is white-tinted, because the panel holds forms and grids that
|
|
34
|
-
need dark-on-light contrast. Same language (blur, radius, shadow), different hue. */
|
|
35
|
-
--tabs-item-bg: color-mix(in srgb, white 45%, transparent);
|
|
36
|
-
--tabs-item-hover-bg: color-mix(in srgb, white 70%, transparent);
|
|
37
|
-
--tabs-item-active-bg: color-mix(in srgb, white 88%, transparent);
|
|
38
|
-
--tabs-item-text: var(--color-gray-600);
|
|
39
|
-
--tabs-item-active-text: var(--color-gray-900);
|
|
40
|
-
--tabs-content-bg: color-mix(in srgb, white 88%, transparent);
|
|
41
|
-
--tabs-border: color-mix(in srgb, white 60%, transparent);
|
|
42
|
-
--tabs-close: var(--color-gray-400);
|
|
43
|
-
--tabs-close-hover-bg: color-mix(in srgb, var(--color-gray-900) 10%, transparent);
|
|
44
|
-
--tabs-close-hover: var(--color-gray-700);
|
|
45
|
-
|
|
46
|
-
/* Glass — softer than the sidebar's, which floats over the backdrop rather than content. */
|
|
47
|
-
--tabs-blur: 16px;
|
|
48
|
-
--tabs-shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.25);
|
|
49
|
-
|
|
50
|
-
/* Radii & dimensions */
|
|
51
|
-
--tabs-radius: 1.25rem;
|
|
52
|
-
--tabs-item-radius: 10px;
|
|
53
|
-
--tabs-height: 2.75rem;
|
|
54
|
-
--tabs-item-max-width: 14rem;
|
|
55
|
-
/* Tabs compress to this before the strip starts scrolling -- still wide enough for a few
|
|
56
|
-
characters plus the close button, so a compressed tab is identifiable rather than a stub. */
|
|
57
|
-
--tabs-item-min-width: 7rem;
|
|
58
|
-
--tabs-scroll-width: 1.75rem;
|
|
59
|
-
--tabs-fade-width: 1.5rem;
|
|
60
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
/* Dimensions */
|
|
3
|
+
--sidebar-animation-duration: 600ms;
|
|
4
|
+
--sidebar-collapsed-width: 70px;
|
|
5
|
+
--sidebar-expanded-width: 220px;
|
|
6
|
+
--sidebar-icon-collapsed-margin: 10px;
|
|
7
|
+
--sidebar-item-height: 2.75rem;
|
|
8
|
+
--sidebar-logo-height: 50px;
|
|
9
|
+
--sidebar-picture-size: 50px;
|
|
10
|
+
|
|
11
|
+
/* Surfaces & colors — translucent "glass" (brand-tinted) */
|
|
12
|
+
--sidebar-bg: color-mix(in srgb, var(--color-primary-600) 82%, transparent);
|
|
13
|
+
--sidebar-nav-bg: color-mix(in srgb, white 5%, transparent);
|
|
14
|
+
--sidebar-text: var(--color-gray-100);
|
|
15
|
+
--sidebar-text-muted: color-mix(in srgb, var(--color-gray-100) 60%, transparent);
|
|
16
|
+
--sidebar-item-hover-bg: color-mix(in srgb, white 12%, transparent);
|
|
17
|
+
--sidebar-item-selected-bg: color-mix(in srgb, white 22%, transparent);
|
|
18
|
+
--sidebar-item-selected-text: var(--color-white);
|
|
19
|
+
--sidebar-accent: var(--color-gray-100);
|
|
20
|
+
--sidebar-tree-line: color-mix(in srgb, white 80%, var(--color-primary-600));
|
|
21
|
+
|
|
22
|
+
/* Glass */
|
|
23
|
+
--sidebar-blur: 16px;
|
|
24
|
+
--sidebar-shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.45);
|
|
25
|
+
/* App background the glass sidebar floats over (tune to taste). */
|
|
26
|
+
--app-backdrop: linear-gradient(160deg, var(--color-gray-100) 0%, var(--color-gray-300) 100%);
|
|
27
|
+
|
|
28
|
+
/* Radii (rounded restyle) */
|
|
29
|
+
--sidebar-radius: 1.25rem;
|
|
30
|
+
--sidebar-item-radius: 10px;
|
|
31
|
+
|
|
32
|
+
/* Tabs — a light glass card the views live in. The sidebar's glass is brand-tinted
|
|
33
|
+
and dark; this one is white-tinted, because the panel holds forms and grids that
|
|
34
|
+
need dark-on-light contrast. Same language (blur, radius, shadow), different hue. */
|
|
35
|
+
--tabs-item-bg: color-mix(in srgb, white 45%, transparent);
|
|
36
|
+
--tabs-item-hover-bg: color-mix(in srgb, white 70%, transparent);
|
|
37
|
+
--tabs-item-active-bg: color-mix(in srgb, white 88%, transparent);
|
|
38
|
+
--tabs-item-text: var(--color-gray-600);
|
|
39
|
+
--tabs-item-active-text: var(--color-gray-900);
|
|
40
|
+
--tabs-content-bg: color-mix(in srgb, white 88%, transparent);
|
|
41
|
+
--tabs-border: color-mix(in srgb, white 60%, transparent);
|
|
42
|
+
--tabs-close: var(--color-gray-400);
|
|
43
|
+
--tabs-close-hover-bg: color-mix(in srgb, var(--color-gray-900) 10%, transparent);
|
|
44
|
+
--tabs-close-hover: var(--color-gray-700);
|
|
45
|
+
|
|
46
|
+
/* Glass — softer than the sidebar's, which floats over the backdrop rather than content. */
|
|
47
|
+
--tabs-blur: 16px;
|
|
48
|
+
--tabs-shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.25);
|
|
49
|
+
|
|
50
|
+
/* Radii & dimensions */
|
|
51
|
+
--tabs-radius: 1.25rem;
|
|
52
|
+
--tabs-item-radius: 10px;
|
|
53
|
+
--tabs-height: 2.75rem;
|
|
54
|
+
--tabs-item-max-width: 14rem;
|
|
55
|
+
/* Tabs compress to this before the strip starts scrolling -- still wide enough for a few
|
|
56
|
+
characters plus the close button, so a compressed tab is identifiable rather than a stub. */
|
|
57
|
+
--tabs-item-min-width: 7rem;
|
|
58
|
+
--tabs-scroll-width: 1.75rem;
|
|
59
|
+
--tabs-fade-width: 1.5rem;
|
|
60
|
+
}
|