opui-css 5.0.1 → 5.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/CHANGELOG.md +45 -0
- package/MIGRATING.md +11 -0
- package/README.md +1 -1
- package/components/Accordion/Accordion.astro +12 -2
- package/components/Anchor/Anchor.astro +5 -1
- package/components/ButtonGroup/ButtonGroup.astro +8 -1
- package/components/Card/Card.astro +3 -1
- package/components/Checkbox/Checkbox.astro +3 -3
- package/components/ClassicSelect/ClassicSelect.astro +3 -3
- package/components/Dialog/Dialog.astro +3 -1
- package/components/Radio/Radio.astro +3 -3
- package/components/Select/Select.astro +3 -3
- package/components/Switch/Switch.astro +3 -3
- package/components/TextField/TextField.astro +3 -3
- package/components/Textarea/Textarea.astro +3 -3
- package/core/normalize.css +16 -10
- package/core/palette.css +313 -58
- package/core/utils.css +2 -2
- package/css/components/accordion.css +7 -7
- package/css/components/anchor.css +23 -23
- package/css/components/badge.css +4 -4
- package/css/components/button-group.css +28 -14
- package/css/components/button.css +29 -17
- package/css/components/callout.css +95 -92
- package/css/components/card.css +6 -8
- package/css/components/checkbox.css +209 -203
- package/css/components/chip.css +11 -6
- package/css/components/description-list.css +2 -1
- package/css/components/dialog.css +2 -1
- package/css/components/drawer.css +167 -167
- package/css/components/form.css +8 -7
- package/css/components/icon-button.css +32 -13
- package/css/components/list.css +10 -12
- package/css/components/progress.css +4 -3
- package/css/components/radio.css +168 -170
- package/css/components/range.css +14 -9
- package/css/components/select.css +9 -6
- package/css/components/spinner.css +4 -3
- package/css/components/switch.css +8 -5
- package/css/components/table.css +4 -10
- package/css/components/tabs.css +17 -16
- package/css/components/text-field.css +9 -10
- package/css/components/text-input.css +8 -4
- package/css/components/textarea.css +3 -1
- package/css/components/toast.css +156 -157
- package/css/components/toggle-button.css +76 -72
- package/css/components/tooltip.css +59 -56
- package/css/components/typography.css +31 -31
- package/css/imports.css +5 -4
- package/css/theme.css +14 -20
- package/dist/op.css +0 -62
- package/dist/op.css.map +1 -1
- package/dist/opui.components.css +1259 -1184
- package/dist/opui.components.css.map +1 -1
- package/dist/opui.css +1719 -1393
- package/dist/opui.css.map +1 -1
- package/open-props.css +0 -1
- package/package.json +1 -1
|
@@ -1,205 +1,211 @@
|
|
|
1
1
|
@layer components.root {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
2
|
+
label.ui-checkbox {
|
|
3
|
+
--_input-size: var(--size-4);
|
|
4
|
+
|
|
5
|
+
align-items: center;
|
|
6
|
+
color: var(--text-primary);
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
display: inline-grid;
|
|
9
|
+
gap: 0 var(--size-2);
|
|
10
|
+
grid-auto-columns: auto;
|
|
11
|
+
grid-auto-flow: column;
|
|
12
|
+
inline-size: fit-content;
|
|
13
|
+
line-height: 1.5;
|
|
14
|
+
transform: translateZ(0);
|
|
15
|
+
user-select: none;
|
|
16
|
+
|
|
17
|
+
/* Disabled */
|
|
18
|
+
&:has([disabled]) {
|
|
19
|
+
cursor: not-allowed;
|
|
20
|
+
opacity: 0.64;
|
|
21
|
+
user-select: none;
|
|
22
|
+
|
|
23
|
+
input {
|
|
24
|
+
cursor: not-allowed;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Required dot */
|
|
29
|
+
&:has(:invalid) {
|
|
30
|
+
.ui-label:after {
|
|
31
|
+
color: var(--red);
|
|
32
|
+
content: "*";
|
|
33
|
+
inset: 0 -0.25ex auto auto;
|
|
34
|
+
position: absolute;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Label */
|
|
39
|
+
.ui-label {
|
|
40
|
+
color: var(--text-primary);
|
|
41
|
+
font-size: var(--font-size-05);
|
|
42
|
+
grid-column: 2;
|
|
43
|
+
grid-row: 1;
|
|
44
|
+
position: relative;
|
|
45
|
+
padding-inline: 0 1ex;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* End text */
|
|
49
|
+
:where(.ui-end-text) {
|
|
50
|
+
color: var(--text-muted);
|
|
51
|
+
font-size: var(--font-size-0);
|
|
52
|
+
grid-column: 2;
|
|
53
|
+
grid-row: 2;
|
|
54
|
+
line-height: 1.5;
|
|
55
|
+
z-index: 1;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Spread layout */
|
|
59
|
+
&.ui-spread {
|
|
60
|
+
align-items: center;
|
|
61
|
+
column-gap: var(--size-4);
|
|
62
|
+
grid-auto-flow: unset;
|
|
63
|
+
grid-template-columns: 1fr auto;
|
|
64
|
+
inline-size: 100%;
|
|
65
|
+
|
|
66
|
+
.ui-label {
|
|
67
|
+
font-weight: 600;
|
|
68
|
+
grid-column: 1;
|
|
69
|
+
grid-row: 1;
|
|
70
|
+
inline-size: fit-content;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
input {
|
|
74
|
+
grid-column: 2;
|
|
75
|
+
grid-row: 1;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:where(.ui-end-text) {
|
|
79
|
+
grid-column: 1;
|
|
80
|
+
grid-row: 2;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Stacked layout */
|
|
85
|
+
&.ui-stack {
|
|
86
|
+
justify-items: center;
|
|
87
|
+
grid-auto-columns: unset;
|
|
88
|
+
|
|
89
|
+
.ui-label {
|
|
90
|
+
grid-column: 1/-1;
|
|
91
|
+
grid-row: 2;
|
|
92
|
+
margin-block-start: var(--size-1);
|
|
93
|
+
padding-inline: 1ex;
|
|
94
|
+
|
|
95
|
+
/* Required dot */
|
|
96
|
+
&::after {
|
|
97
|
+
inset: 0 -0.25ex auto auto;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.ui-end-text {
|
|
102
|
+
grid-column: 1/-1;
|
|
103
|
+
grid-row: 3;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* Input */
|
|
108
|
+
input[type="checkbox"] {
|
|
109
|
+
--_input-size: var(--size-4);
|
|
110
|
+
|
|
111
|
+
appearance: none;
|
|
112
|
+
aspect-ratio: 1;
|
|
113
|
+
background-color: var(--surface-default);
|
|
114
|
+
block-size: var(--_input-size);
|
|
115
|
+
border-radius: var(--radius-1);
|
|
116
|
+
border: 1px solid var(--border-color);
|
|
117
|
+
box-sizing: border-box;
|
|
118
|
+
cursor: pointer;
|
|
119
|
+
display: grid;
|
|
120
|
+
font-size: var(--_input-size);
|
|
121
|
+
inline-size: var(--_input-size);
|
|
122
|
+
margin: 0;
|
|
123
|
+
padding: 0;
|
|
124
|
+
place-items: center;
|
|
125
|
+
position: relative;
|
|
126
|
+
|
|
127
|
+
&:checked,
|
|
128
|
+
&:indeterminate {
|
|
129
|
+
background-color: var(--primary);
|
|
130
|
+
border-color: var(--primary);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Checkmark */
|
|
134
|
+
&::after {
|
|
135
|
+
background-color: var(--primary-contrast);
|
|
136
|
+
clip-path: polygon(
|
|
137
|
+
15% 52%,
|
|
138
|
+
40% 77%,
|
|
139
|
+
85% 32%,
|
|
140
|
+
75% 22%,
|
|
141
|
+
40% 57%,
|
|
142
|
+
25% 42%
|
|
143
|
+
);
|
|
144
|
+
content: "";
|
|
145
|
+
inset: 0;
|
|
146
|
+
opacity: 0;
|
|
147
|
+
position: absolute;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&:checked::after,
|
|
151
|
+
&:indeterminate::after {
|
|
152
|
+
opacity: 1;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* Indeterminate dash */
|
|
156
|
+
&:indeterminate::after {
|
|
157
|
+
clip-path: polygon(20% 45%, 80% 45%, 80% 55%, 20% 55%);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&::before {
|
|
161
|
+
--highlight-size: 175%;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Sizes */
|
|
166
|
+
&.ui-small {
|
|
167
|
+
input[type="checkbox"] {
|
|
168
|
+
--_input-size: var(--size-3);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&.ui-large {
|
|
173
|
+
input[type="checkbox"] {
|
|
174
|
+
--_input-size: var(--size-5);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* Validation */
|
|
179
|
+
&[data-invalid],
|
|
180
|
+
&:has(:user-invalid) {
|
|
181
|
+
--primary: var(--critical);
|
|
182
|
+
|
|
183
|
+
:where(.ui-end-text) {
|
|
184
|
+
color: var(--critical);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* Touch devices */
|
|
189
|
+
@media (pointer: coarse) {
|
|
190
|
+
input {
|
|
191
|
+
--_input-size: var(--size-4);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@media (forced-colors: active) {
|
|
196
|
+
input {
|
|
197
|
+
border: 1px solid CanvasText;
|
|
198
|
+
|
|
199
|
+
&:checked,
|
|
200
|
+
&:indeterminate {
|
|
201
|
+
background-color: SelectedItem;
|
|
202
|
+
border-color: SelectedItem;
|
|
203
|
+
|
|
204
|
+
&::after {
|
|
205
|
+
background-color: SelectedItemText;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
205
211
|
}
|
package/css/components/chip.css
CHANGED
|
@@ -29,8 +29,10 @@
|
|
|
29
29
|
|
|
30
30
|
&:where(button, a):where(:not([disabled])) {
|
|
31
31
|
&:where(:not(:active)):hover {
|
|
32
|
-
--_bg-color: light-dark(
|
|
33
|
-
|
|
32
|
+
--_bg-color: light-dark(
|
|
33
|
+
oklch(from var(--surface-tonal) calc(l * 0.98) c h),
|
|
34
|
+
oklch(from var(--surface-tonal) calc(l * 1.1) c h)
|
|
35
|
+
);
|
|
34
36
|
}
|
|
35
37
|
}
|
|
36
38
|
|
|
@@ -64,7 +66,8 @@
|
|
|
64
66
|
|
|
65
67
|
&:where(:not([disabled])) {
|
|
66
68
|
&:where(:not(:active):hover) {
|
|
67
|
-
--ripple: radial-gradient(circle, transparent 1%, var(--_bg-color) 1%)
|
|
69
|
+
--ripple: radial-gradient(circle, transparent 1%, var(--_bg-color) 1%)
|
|
70
|
+
center/15000%;
|
|
68
71
|
|
|
69
72
|
transition: background var(--button-ripple-duration);
|
|
70
73
|
}
|
|
@@ -78,9 +81,11 @@
|
|
|
78
81
|
/* Disabled */
|
|
79
82
|
&:where([disabled]) {
|
|
80
83
|
opacity: 0.64;
|
|
81
|
-
--_color: color-mix(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
+
--_color: color-mix(
|
|
85
|
+
in oklch,
|
|
86
|
+
var(--text-muted) 50%,
|
|
87
|
+
var(--surface-default)
|
|
88
|
+
);
|
|
84
89
|
cursor: not-allowed;
|
|
85
90
|
}
|
|
86
91
|
}
|
|
@@ -70,7 +70,8 @@
|
|
|
70
70
|
&::after {
|
|
71
71
|
background-color: transparent;
|
|
72
72
|
block-size: 2px;
|
|
73
|
-
border-block-end: var(--_border-width) var(--_border-style)
|
|
73
|
+
border-block-end: var(--_border-width) var(--_border-style)
|
|
74
|
+
var(--border-color);
|
|
74
75
|
content: "";
|
|
75
76
|
order: 1;
|
|
76
77
|
}
|