@luminescent/ui 6.0.1 → 6.1.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 +1 -1
- package/src/index.css +50 -14
package/package.json
CHANGED
package/src/index.css
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
--lum-input-p-x: 1.5;
|
|
16
16
|
--lum-border-radius: var(--radius-md);
|
|
17
17
|
--lum-border-mix: 20%;
|
|
18
|
+
--lum-depth: 0;
|
|
18
19
|
--color-lum-border: var(--color-gray-300);
|
|
19
20
|
--color-lum-card-bg: var(--color-gray-900);
|
|
20
21
|
--color-lum-input-bg: var(--color-gray-800);
|
|
@@ -22,7 +23,6 @@
|
|
|
22
23
|
--color-lum-accent: var(--color-blue-500);
|
|
23
24
|
--color-lum-text: var(--color-gray-50);
|
|
24
25
|
--color-lum-text-secondary: var(--color-gray-400);
|
|
25
|
-
--depth: 0;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
|
|
@@ -43,44 +43,80 @@
|
|
|
43
43
|
border-color: color-mix(
|
|
44
44
|
in oklab,
|
|
45
45
|
var(--border-color),
|
|
46
|
-
transparent calc(var(--depth) * 100%)
|
|
46
|
+
transparent calc(var(--lum-depth) * 100%)
|
|
47
47
|
);
|
|
48
48
|
|
|
49
49
|
/* Shadow fades in when depth is active */
|
|
50
50
|
box-shadow:
|
|
51
|
-
inset 0 calc(1px * var(--depth)) calc(2px * var(--depth)) var(--border-color),
|
|
52
|
-
0 calc(1px * var(--depth)) calc(2px * var(--depth)) rgba(0, 0, 0, 0.05),
|
|
53
|
-
0 calc(1px * var(--depth)) calc(3px * var(--depth)) rgba(0, 0, 0, 0.1);
|
|
51
|
+
inset 0 calc(1px * var(--lum-depth)) calc(2px * var(--lum-depth)) var(--border-color),
|
|
52
|
+
0 calc(1px * var(--lum-depth)) calc(2px * var(--lum-depth)) rgba(0, 0, 0, 0.05),
|
|
53
|
+
0 calc(1px * var(--lum-depth)) calc(3px * var(--lum-depth)) rgba(0, 0, 0, 0.1);
|
|
54
54
|
|
|
55
55
|
background-color: var(--bg-color);
|
|
56
56
|
|
|
57
57
|
/* Allow standard color keywords */
|
|
58
58
|
background-color: --value('inherit', 'transparent', 'currentColor');
|
|
59
59
|
border-color: --value('inherit', 'transparent', 'currentColor');
|
|
60
|
-
box-shadow: inset 0 calc(1px * var(--depth)) calc(2px * var(--depth)) --value('inherit', 'transparent', 'currentColor'),
|
|
61
|
-
0 calc(1px * var(--depth)) calc(2px * var(--depth)) --value('inherit', 'transparent', 'currentColor'),
|
|
62
|
-
0 calc(1px * var(--depth)) calc(3px * var(--depth)) --value('inherit', 'transparent', 'currentColor');
|
|
60
|
+
box-shadow: inset 0 calc(1px * var(--lum-depth)) calc(2px * var(--lum-depth)) --value('inherit', 'transparent', 'currentColor'),
|
|
61
|
+
0 calc(1px * var(--lum-depth)) calc(2px * var(--lum-depth)) --value('inherit', 'transparent', 'currentColor'),
|
|
62
|
+
0 calc(1px * var(--lum-depth)) calc(3px * var(--lum-depth)) --value('inherit', 'transparent', 'currentColor');
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
@utility lum-toggle-bg-* {
|
|
66
|
-
|
|
66
|
+
/* Base color logic */
|
|
67
67
|
--alpha: var(--lum-default-alpha);
|
|
68
68
|
--alpha: --modifier(integer);
|
|
69
|
-
|
|
70
69
|
--bg-color: --alpha(--value(--color-*) / calc(var(--alpha, 100) * 1%));
|
|
71
70
|
--border-color: color-mix(in oklab, var(--color-lum-border) var(--lum-border-mix), var(--bg-color));
|
|
72
71
|
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
@apply border border-transparent outline-none;
|
|
73
|
+
&:focus {
|
|
74
|
+
@apply border-lum-accent;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Border fades out when depth is active */
|
|
78
|
+
border-color: color-mix(
|
|
79
|
+
in oklab,
|
|
80
|
+
var(--border-color),
|
|
81
|
+
transparent calc(var(--lum-depth) * 100%)
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
/* Shadow fades in when depth is active */
|
|
85
|
+
box-shadow:
|
|
86
|
+
inset 0 calc(1px * var(--lum-depth)) calc(2px * var(--lum-depth)) var(--border-color),
|
|
87
|
+
0 calc(1px * var(--lum-depth)) calc(2px * var(--lum-depth)) rgba(0, 0, 0, 0.05),
|
|
88
|
+
0 calc(1px * var(--lum-depth)) calc(3px * var(--lum-depth)) rgba(0, 0, 0, 0.1);
|
|
75
89
|
|
|
76
90
|
background-color: var(--bg-color);
|
|
77
|
-
|
|
91
|
+
|
|
92
|
+
/* Allow standard color keywords */
|
|
93
|
+
background-color: --value('inherit', 'transparent', 'currentColor');
|
|
94
|
+
border-color: --value('inherit', 'transparent', 'currentColor');
|
|
95
|
+
box-shadow: inset 0 calc(1px * var(--lum-depth)) calc(2px * var(--lum-depth)) --value('inherit', 'transparent', 'currentColor'),
|
|
96
|
+
0 calc(1px * var(--lum-depth)) calc(2px * var(--lum-depth)) --value('inherit', 'transparent', 'currentColor'),
|
|
97
|
+
0 calc(1px * var(--lum-depth)) calc(3px * var(--lum-depth)) --value('inherit', 'transparent', 'currentColor');
|
|
78
98
|
|
|
79
99
|
&::after, &:hover {
|
|
100
|
+
border-color: color-mix(
|
|
101
|
+
in oklab,
|
|
102
|
+
var(--border-color),
|
|
103
|
+
transparent calc(var(--lum-depth) * 100%)
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
/* Shadow fades in when depth is active */
|
|
107
|
+
box-shadow:
|
|
108
|
+
inset 0 calc(1px * var(--lum-depth)) calc(2px * var(--lum-depth)) var(--border-color),
|
|
109
|
+
0 calc(1px * var(--lum-depth)) calc(2px * var(--lum-depth)) rgba(0, 0, 0, 0.05),
|
|
110
|
+
0 calc(1px * var(--lum-depth)) calc(3px * var(--lum-depth)) rgba(0, 0, 0, 0.1);
|
|
111
|
+
|
|
80
112
|
background-color: --alpha(color-mix(in oklab, white 10%, --value(--color-*)) / calc(var(--alpha, 100) * 1%));
|
|
81
|
-
border-color: var(--border-color);
|
|
82
113
|
|
|
114
|
+
/* Allow standard color keywords */
|
|
83
115
|
background-color: --value('inherit', 'transparent', 'currentColor');
|
|
116
|
+
border-color: --value('inherit', 'transparent', 'currentColor');
|
|
117
|
+
box-shadow: inset 0 calc(1px * var(--lum-depth)) calc(2px * var(--lum-depth)) --value('inherit', 'transparent', 'currentColor'),
|
|
118
|
+
0 calc(1px * var(--lum-depth)) calc(2px * var(--lum-depth)) --value('inherit', 'transparent', 'currentColor'),
|
|
119
|
+
0 calc(1px * var(--lum-depth)) calc(3px * var(--lum-depth)) --value('inherit', 'transparent', 'currentColor');
|
|
84
120
|
}
|
|
85
121
|
}
|
|
86
122
|
|