opui-css 4.1.0 → 5.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 +29 -0
- package/MIGRATING.md +23 -1
- package/README.md +1 -1
- package/components/AGENTS.md +20 -19
- package/components/Accordion/Accordion.astro +3 -3
- package/components/Anchor/Anchor.astro +2 -2
- package/components/Avatar/Avatar.astro +2 -8
- package/components/Badge/Badge.astro +12 -7
- package/components/Button/Button.astro +1 -1
- package/components/ButtonGroup/ButtonGroup.astro +1 -1
- package/components/Callout/Callout.astro +3 -3
- package/components/Card/Card.astro +3 -3
- package/components/Checkbox/Checkbox.astro +6 -6
- package/components/Chip/Chip.astro +5 -5
- package/components/ClassicSelect/ClassicSelect.astro +6 -6
- package/components/DescriptionList/Description.astro +1 -1
- package/components/DescriptionList/DescriptionList.astro +2 -2
- package/components/DescriptionList/Item.astro +1 -1
- package/components/DescriptionList/Term.astro +1 -1
- package/components/Dialog/Dialog.astro +3 -3
- package/components/Divider/Divider.astro +4 -1
- package/components/Drawer/Drawer.astro +5 -5
- package/components/Drawer/DrawerFooter.astro +1 -1
- package/components/Drawer/DrawerHeader.astro +1 -1
- package/components/FieldDescription/FieldDescription.astro +1 -1
- package/components/FieldGroup/FieldGroup.astro +1 -1
- package/components/FieldLegend/FieldLegend.astro +1 -1
- package/components/FieldSet/FieldSet.astro +1 -1
- package/components/Form/Form.astro +1 -1
- package/components/IconButton/IconButton.astro +1 -1
- package/components/List/List.astro +5 -5
- package/components/ListItem/ListItem.astro +12 -12
- package/components/Progress/Progress.astro +1 -1
- package/components/Radio/Radio.astro +5 -5
- package/components/Range/Range.astro +8 -8
- package/components/Select/Select.astro +13 -13
- package/components/Switch/Switch.astro +8 -8
- package/components/Table/Table.astro +4 -1
- package/components/Tabs/Tabs.astro +1 -1
- package/components/Tabs/TabsItem.astro +1 -1
- package/components/Tabs/TabsPanel.astro +1 -1
- package/components/Tabs/TabsTab.astro +1 -1
- package/components/TextField/TextField.astro +13 -13
- package/components/Textarea/Textarea.astro +13 -13
- package/components/Toast/Toast.astro +6 -6
- package/components/ToggleButton/ToggleButton.astro +3 -3
- package/components/ToggleGroup/ToggleGroup.astro +3 -3
- package/components/Tooltip/Tooltip.astro +1 -1
- package/core/utils.css +4 -4
- package/css/components/accordion.css +11 -11
- package/css/components/anchor.css +3 -3
- package/css/components/avatar.css +5 -5
- package/css/components/badge.css +14 -14
- package/css/components/button-group.css +16 -16
- package/css/components/button.css +12 -12
- package/css/components/callout.css +9 -9
- package/css/components/card.css +12 -12
- package/css/components/checkbox.css +13 -13
- package/css/components/chip.css +5 -5
- package/css/components/description-list.css +11 -8
- package/css/components/dialog.css +3 -3
- package/css/components/divider.css +4 -4
- package/css/components/drawer.css +21 -21
- package/css/components/form.css +18 -18
- package/css/components/icon-button.css +9 -9
- package/css/components/link.css +1 -1
- package/css/components/list.css +29 -29
- package/css/components/progress.css +4 -4
- package/css/components/radio.css +10 -10
- package/css/components/range.css +31 -31
- package/css/components/select.css +4 -4
- package/css/components/spinner.css +1 -1
- package/css/components/switch.css +23 -23
- package/css/components/table.css +3 -3
- package/css/components/tabs.css +14 -8
- package/css/components/text-field.css +47 -47
- package/css/components/text-input.css +7 -7
- package/css/components/textarea.css +3 -3
- package/css/components/toast.css +12 -12
- package/css/components/toggle-button.css +6 -6
- package/css/components/toggle-group.css +10 -10
- package/css/components/tooltip.css +6 -6
- package/css/components/typography.css +30 -30
- package/css/js/toast.js +7 -7
- package/css/theme.css +8 -8
- package/dist/opui.components.css +407 -398
- package/dist/opui.components.css.map +1 -1
- package/dist/opui.css +419 -410
- package/dist/opui.css.map +1 -1
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
@layer components.root {
|
|
2
|
-
:where(
|
|
2
|
+
:where(.ui-divider) {
|
|
3
3
|
background-color: var(--border-color);
|
|
4
4
|
block-size: var(--border-size-1);
|
|
5
5
|
margin-block: var(--size-fluid-3);
|
|
6
6
|
|
|
7
7
|
/* Border color */
|
|
8
|
-
&.border-filled {
|
|
8
|
+
&.ui-border-filled {
|
|
9
9
|
background-color: var(--surface-filled);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
&.border-primary {
|
|
12
|
+
&.ui-border-primary {
|
|
13
13
|
background-color: var(--primary);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
&.border-tonal {
|
|
16
|
+
&.ui-border-tonal {
|
|
17
17
|
background-color: var(--surface-tonal);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@layer components.root {
|
|
2
|
-
:where(dialog.drawer) {
|
|
2
|
+
:where(dialog.ui-drawer) {
|
|
3
3
|
--_backdrop-bg-color: transparent;
|
|
4
4
|
--_backdrop-blur: blur(2px);
|
|
5
5
|
--_bg-color: var(--surface-default);
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
opacity var(--_transition-duration) var(--_transition-timing);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
&.backdrop-transparent {
|
|
46
|
+
&.ui-backdrop-transparent {
|
|
47
47
|
--_backdrop-blur: none;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.header {
|
|
50
|
+
.ui-header {
|
|
51
51
|
align-items: center;
|
|
52
52
|
border-block-end: var(--_border-width) solid var(--_border-color);
|
|
53
53
|
display: flex;
|
|
@@ -58,18 +58,18 @@
|
|
|
58
58
|
margin: 0;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
:where(.icon-button) {
|
|
61
|
+
:where(.ui-icon-button) {
|
|
62
62
|
margin-inline-start: auto;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
.content {
|
|
66
|
+
.ui-content {
|
|
67
67
|
flex: 1;
|
|
68
68
|
overflow-y: auto;
|
|
69
69
|
padding: var(--_content-padding);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
.footer {
|
|
72
|
+
.ui-footer {
|
|
73
73
|
border-block-start: var(--_border-width) solid var(--_border-color);
|
|
74
74
|
display: flex;
|
|
75
75
|
gap: var(--_footer-gap);
|
|
@@ -77,48 +77,48 @@
|
|
|
77
77
|
padding: var(--_footer-padding);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
&.inline-start,
|
|
81
|
-
&.inline-end {
|
|
80
|
+
&.ui-inline-start,
|
|
81
|
+
&.ui-inline-end {
|
|
82
82
|
block-size: 100dvb;
|
|
83
83
|
inline-size: var(--_inline-size);
|
|
84
84
|
inset-block: 0;
|
|
85
85
|
max-block-size: 100%;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
&.inline-start {
|
|
88
|
+
&.ui-inline-start {
|
|
89
89
|
border-inline-end: var(--_border-width) solid var(--_border-color);
|
|
90
90
|
inset-inline-end: auto;
|
|
91
91
|
inset-inline-start: 0;
|
|
92
92
|
translate: -100% 0;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
&.inline-end {
|
|
95
|
+
&.ui-inline-end {
|
|
96
96
|
border-inline-start: var(--_border-width) solid var(--_border-color);
|
|
97
97
|
inset-inline-end: 0;
|
|
98
98
|
inset-inline-start: auto;
|
|
99
99
|
translate: 100% 0;
|
|
100
100
|
|
|
101
|
-
.footer {
|
|
101
|
+
.ui-footer {
|
|
102
102
|
justify-content: start;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
&.block-start,
|
|
107
|
-
&.block-end {
|
|
106
|
+
&.ui-block-start,
|
|
107
|
+
&.ui-block-end {
|
|
108
108
|
block-size: var(--_block-size);
|
|
109
109
|
inline-size: 100dvi;
|
|
110
110
|
inset-inline: 0;
|
|
111
111
|
max-block-size: 80dvb;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
&.block-start {
|
|
114
|
+
&.ui-block-start {
|
|
115
115
|
border-block-end: var(--_border-width) solid var(--_border-color);
|
|
116
116
|
inset-block-end: auto;
|
|
117
117
|
inset-block-start: 0;
|
|
118
118
|
translate: 0 -100%;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
&.block-end {
|
|
121
|
+
&.ui-block-end {
|
|
122
122
|
border-block-start: var(--_border-width) solid var(--_border-color);
|
|
123
123
|
inset-block-end: 0;
|
|
124
124
|
inset-block-start: auto;
|
|
@@ -137,29 +137,29 @@
|
|
|
137
137
|
opacity: 0;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
&.inline-start {
|
|
140
|
+
&.ui-inline-start {
|
|
141
141
|
translate: -100% 0;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
&.inline-end {
|
|
144
|
+
&.ui-inline-end {
|
|
145
145
|
translate: 100% 0;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
&.block-start {
|
|
148
|
+
&.ui-block-start {
|
|
149
149
|
translate: 0 -100%;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
&.block-end {
|
|
152
|
+
&.ui-block-end {
|
|
153
153
|
translate: 0 100%;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
/* Scroll-lock is provided by the shared `.scroll-lock` utility in core/utils.css.
|
|
159
|
+
/* Scroll-lock is provided by the shared `.ui-scroll-lock` utility in core/utils.css.
|
|
160
160
|
This carve-out re-enables page scrolling when a transparent-backdrop drawer is
|
|
161
161
|
open on wide viewports (where the drawer doesn't visually cover the page). */
|
|
162
|
-
html:has(dialog.drawer.scroll-lock[open].backdrop-transparent) {
|
|
162
|
+
html:has(dialog.ui-drawer.ui-scroll-lock[open].ui-backdrop-transparent) {
|
|
163
163
|
overflow: unset;
|
|
164
164
|
overscroll-behavior: auto;
|
|
165
165
|
|
package/css/components/form.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@layer components.extended {
|
|
2
2
|
|
|
3
3
|
/* Form */
|
|
4
|
-
:where(.form) {
|
|
4
|
+
:where(.ui-form) {
|
|
5
5
|
display: grid;
|
|
6
6
|
gap: var(--size-8);
|
|
7
7
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
/* Fieldset */
|
|
14
|
-
:where(.fieldset) {
|
|
14
|
+
:where(.ui-fieldset) {
|
|
15
15
|
all: unset;
|
|
16
16
|
border: 0;
|
|
17
17
|
border-radius: 0;
|
|
@@ -22,20 +22,20 @@
|
|
|
22
22
|
padding: 0;
|
|
23
23
|
|
|
24
24
|
/* Legend */
|
|
25
|
-
:where(legend, .legend) {
|
|
25
|
+
:where(legend, .ui-legend) {
|
|
26
26
|
all: unset;
|
|
27
27
|
color: var(--text-primary);
|
|
28
28
|
font-weight: 600;
|
|
29
29
|
margin-block-end: var(--size-3);
|
|
30
30
|
padding: 0;
|
|
31
31
|
|
|
32
|
-
&:has(+ :where(.field-description)) {
|
|
32
|
+
&:has(+ :where(.ui-field-description)) {
|
|
33
33
|
margin-block-end: 0;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
/* Field description / supporting text */
|
|
38
|
-
:where(.field-description) {
|
|
38
|
+
:where(.ui-field-description) {
|
|
39
39
|
color: var(--text-muted);
|
|
40
40
|
font-size: var(--font-size-05);
|
|
41
41
|
line-height: var(--font-lineheight-3);
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/* End text */
|
|
49
|
-
:where(.end-text) {
|
|
49
|
+
:where(.ui-end-text) {
|
|
50
50
|
color: var(--text-muted);
|
|
51
51
|
font-size: var(--font-size-0);
|
|
52
52
|
line-height: var(--font-lineheight-3);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
&:has(.text-field.row) {
|
|
55
|
+
&:has(.ui-text-field.ui-row) {
|
|
56
56
|
row-gap: var(--size-7);
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -63,26 +63,26 @@
|
|
|
63
63
|
|
|
64
64
|
input,
|
|
65
65
|
label,
|
|
66
|
-
.label {
|
|
66
|
+
.ui-label {
|
|
67
67
|
cursor: not-allowed;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
/* Error / validation */
|
|
72
72
|
&[data-invalid] {
|
|
73
|
-
:where(.end-text) {
|
|
73
|
+
:where(.ui-end-text) {
|
|
74
74
|
color: var(--primary);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
:where(.checkbox, .radio, .switch) {
|
|
77
|
+
:where(.ui-checkbox, .ui-radio, .ui-switch) {
|
|
78
78
|
--palette-source: oklch(0.58 0.21 var(--hue-red));
|
|
79
79
|
|
|
80
|
-
:where(.end-text) {
|
|
80
|
+
:where(.ui-end-text) {
|
|
81
81
|
color: var(--primary);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
:where(.switch) {
|
|
85
|
+
:where(.ui-switch) {
|
|
86
86
|
input {
|
|
87
87
|
border-radius: var(--radius-round);
|
|
88
88
|
outline: 2px solid var(--primary);
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
|
|
93
93
|
/* Required */
|
|
94
94
|
&:has(:invalid) {
|
|
95
|
-
:where(legend, .legend) {
|
|
95
|
+
:where(legend, .ui-legend) {
|
|
96
96
|
padding-inline-end: 1ex;
|
|
97
97
|
position: relative;
|
|
98
98
|
|
|
@@ -107,18 +107,18 @@
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
/* Field group */
|
|
110
|
-
:where(.field-group) {
|
|
110
|
+
:where(.ui-field-group) {
|
|
111
111
|
display: flex;
|
|
112
112
|
flex-direction: column;
|
|
113
113
|
gap: var(--size-4);
|
|
114
114
|
|
|
115
115
|
/* If it only has checkboxes, radios, or switches */
|
|
116
|
-
&:has(> :where(.checkbox, .radio, .switch)):not(:has(> :not(.checkbox, .radio, .switch))) {
|
|
116
|
+
&:has(> :where(.ui-checkbox, .ui-radio, .ui-switch)):not(:has(> :not(.ui-checkbox, .ui-radio, .ui-switch))) {
|
|
117
117
|
gap: var(--size-2);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
/* If it only has buttons */
|
|
121
|
-
&:has(.button):not(:has(*:not(.button))) {
|
|
121
|
+
&:has(.ui-button):not(:has(*:not(.ui-button))) {
|
|
122
122
|
align-items: center;
|
|
123
123
|
flex-direction: row;
|
|
124
124
|
gap: var(--size-2);
|
|
@@ -134,11 +134,11 @@
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
/* Directions */
|
|
137
|
-
&.row {
|
|
137
|
+
&.ui-row {
|
|
138
138
|
flex-direction: row;
|
|
139
139
|
flex-wrap: wrap;
|
|
140
140
|
|
|
141
|
-
&:has(> :where(.checkbox, .radio, .switch)) {
|
|
141
|
+
&:has(> :where(.ui-checkbox, .ui-radio, .ui-switch)) {
|
|
142
142
|
gap: var(--size-4);
|
|
143
143
|
}
|
|
144
144
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@layer components.root {
|
|
2
|
-
:where(.icon-button) {
|
|
2
|
+
:where(.ui-icon-button) {
|
|
3
3
|
--_color: light-dark(var(--color-16), var(--color-1));
|
|
4
4
|
--_color-contrast: light-dark(var(--color-1), var(--color-16));
|
|
5
5
|
--_color-tonal: var(--surface-tonal);
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
contrast text, and hover/active strategy are identical.
|
|
68
68
|
The .critical scope class in theme.css redirects --palette-source so
|
|
69
69
|
--color-6 below becomes a tint of the active color. */
|
|
70
|
-
&.critical,
|
|
71
|
-
&.primary {
|
|
70
|
+
&.ui-critical,
|
|
71
|
+
&.ui-primary {
|
|
72
72
|
--_color-contrast: var(--gray-1);
|
|
73
73
|
--_color-tonal: var(--color-6);
|
|
74
74
|
--_accent-tonal-contrast: var(--text-primary-contrast);
|
|
@@ -82,11 +82,11 @@
|
|
|
82
82
|
--_outlined-active-bg-color: oklch(from var(--_accent) calc(l - 0.1) c h);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
&.critical {
|
|
85
|
+
&.ui-critical {
|
|
86
86
|
--_color: var(--critical);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
&.primary {
|
|
89
|
+
&.ui-primary {
|
|
90
90
|
--_color: var(--primary);
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
/* Size */
|
|
110
|
-
&.small {
|
|
110
|
+
&.ui-small {
|
|
111
111
|
block-size: var(--size-4);
|
|
112
112
|
inline-size: var(--size-4);
|
|
113
113
|
|
|
@@ -118,18 +118,18 @@
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
/* Variants */
|
|
121
|
-
&.outlined {
|
|
121
|
+
&.ui-outlined {
|
|
122
122
|
--_bg-color: transparent;
|
|
123
123
|
--_border-color: var(--_accent);
|
|
124
124
|
--_text-color: var(--_accent);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
&.tonal {
|
|
127
|
+
&.ui-tonal {
|
|
128
128
|
--_bg-color: var(--_accent-tonal);
|
|
129
129
|
--_text-color: var(--_accent-tonal-contrast);
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
&.filled {
|
|
132
|
+
&.ui-filled {
|
|
133
133
|
--_bg-color: var(--_accent);
|
|
134
134
|
--_interaction-active-color: var(--_filled-active-bg-color);
|
|
135
135
|
--_interaction-hover-color: var(--_filled-hover-bg-color);
|
package/css/components/link.css
CHANGED
package/css/components/list.css
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
Lists meant to be used stand-alone or as part of Select elements
|
|
5
5
|
|
|
6
6
|
Intended use-case:
|
|
7
|
-
- ul.list > li
|
|
8
|
-
- .select > .list > option
|
|
7
|
+
- ul.ui-list > li
|
|
8
|
+
- .ui-select > .ui-list > option
|
|
9
9
|
*/
|
|
10
|
-
:where(.list) {
|
|
10
|
+
:where(.ui-list) {
|
|
11
11
|
--_bg-color: var(--surface-filled);
|
|
12
12
|
--_bg-color-hover: oklch(from var(--primary) l c h / 15%);
|
|
13
13
|
|
|
@@ -25,20 +25,20 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/* Background color */
|
|
28
|
-
&.transparent {
|
|
28
|
+
&.ui-transparent {
|
|
29
29
|
--_bg-color: transparent;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
&.default {
|
|
32
|
+
&.ui-default {
|
|
33
33
|
--_bg-color: var(--surface-default);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
&.tonal {
|
|
36
|
+
&.ui-tonal {
|
|
37
37
|
--_bg-color: var(--surface-tonal);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/* Borders on all list items */
|
|
41
|
-
&.bordered {
|
|
41
|
+
&.ui-bordered {
|
|
42
42
|
:where(li + li, option + option) {
|
|
43
43
|
margin-block-start: var(--size-3);
|
|
44
44
|
|
|
@@ -57,13 +57,13 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/* Dense - less gaps and spacing */
|
|
60
|
-
&.dense {
|
|
60
|
+
&.ui-dense {
|
|
61
61
|
:where(li, option) {
|
|
62
62
|
gap: var(--size-2);
|
|
63
63
|
min-block-size: var(--size-7);
|
|
64
64
|
padding: var(--size-1) var(--size-2);
|
|
65
65
|
|
|
66
|
-
&.border-top {
|
|
66
|
+
&.ui-border-top {
|
|
67
67
|
margin-block-start: var(--size-2);
|
|
68
68
|
|
|
69
69
|
&::before {
|
|
@@ -85,29 +85,29 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
85
85
|
|
|
86
86
|
/* Checkbox / Radio */
|
|
87
87
|
&>label {
|
|
88
|
-
.end {
|
|
88
|
+
.ui-end {
|
|
89
89
|
padding-inline-end: 0.125rem;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
&:where(.checkbox, .radio) {
|
|
92
|
+
&:where(.ui-checkbox, .ui-radio) {
|
|
93
93
|
--_input-size: var(--size-3);
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
/* Leading and trailing content */
|
|
98
|
-
.start,
|
|
99
|
-
.end {
|
|
100
|
-
.avatar {
|
|
98
|
+
.ui-start,
|
|
99
|
+
.ui-end {
|
|
100
|
+
.ui-avatar {
|
|
101
101
|
max-inline-size: var(--size-6);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
.icon-button,
|
|
104
|
+
.ui-icon-button,
|
|
105
105
|
svg {
|
|
106
106
|
max-inline-size: var(--size-4);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
.checkbox,
|
|
110
|
-
.radio {
|
|
109
|
+
.ui-checkbox,
|
|
110
|
+
.ui-radio {
|
|
111
111
|
--_input-size: var(--size-3);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
@@ -115,7 +115,7 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
/* Gutterless */
|
|
118
|
-
&.gutterless {
|
|
118
|
+
&.ui-gutterless {
|
|
119
119
|
:where(li, option) {
|
|
120
120
|
padding-inline: 0;
|
|
121
121
|
|
|
@@ -220,20 +220,20 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
220
220
|
|
|
221
221
|
/* Checkbox / Radio / Switch */
|
|
222
222
|
&>label {
|
|
223
|
-
&:where(.checkbox, .radio, .switch) {
|
|
223
|
+
&:where(.ui-checkbox, .ui-radio, .ui-switch) {
|
|
224
224
|
display: flex;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
.end {
|
|
227
|
+
.ui-end {
|
|
228
228
|
padding-inline-end: var(--size-1);
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
&:where(.checkbox, .radio) {
|
|
231
|
+
&:where(.ui-checkbox, .ui-radio) {
|
|
232
232
|
inline-size: 100%;
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
/* Switches look comically big in lists, so it's better to use a smaller variant */
|
|
236
|
-
&.switch {
|
|
236
|
+
&.ui-switch {
|
|
237
237
|
--_dot-size: 0.75rem;
|
|
238
238
|
--_track-height: var(--size-4);
|
|
239
239
|
--_track-width: 2.5rem;
|
|
@@ -246,7 +246,7 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
/* Border between list items */
|
|
249
|
-
&.border-top {
|
|
249
|
+
&.ui-border-top {
|
|
250
250
|
margin-block-start: var(--size-3);
|
|
251
251
|
|
|
252
252
|
&::before {
|
|
@@ -261,7 +261,7 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
/* Text */
|
|
264
|
-
.text {
|
|
264
|
+
.ui-text {
|
|
265
265
|
flex: 1;
|
|
266
266
|
line-height: 1.6;
|
|
267
267
|
|
|
@@ -277,7 +277,7 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
/* Leading content */
|
|
280
|
-
.start {
|
|
280
|
+
.ui-start {
|
|
281
281
|
align-items: center;
|
|
282
282
|
align-self: center;
|
|
283
283
|
display: grid;
|
|
@@ -305,7 +305,7 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
/* Trailing content */
|
|
308
|
-
.end {
|
|
308
|
+
.ui-end {
|
|
309
309
|
align-items: center;
|
|
310
310
|
display: flex;
|
|
311
311
|
font-size: var(--font-size-0);
|
|
@@ -330,13 +330,13 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
/* Inset */
|
|
333
|
-
&.inset {
|
|
334
|
-
.text {
|
|
333
|
+
&.ui-inset {
|
|
334
|
+
.ui-text {
|
|
335
335
|
padding-inline-start: calc(var(--size-5) + var(--size-3));
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
/* Safety measure so it won't look bad if there for some reason should exist a leading element inside. */
|
|
339
|
-
.start {
|
|
339
|
+
.ui-start {
|
|
340
340
|
display: none;
|
|
341
341
|
}
|
|
342
342
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@layer components.root {
|
|
2
|
-
:where(progress) {
|
|
2
|
+
:where(.ui-progress) {
|
|
3
3
|
--_accent-color: var(--primary);
|
|
4
4
|
--_bg-color: var(--surface-tonal);
|
|
5
5
|
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
vertical-align: baseline;
|
|
16
16
|
|
|
17
17
|
/* Color */
|
|
18
|
-
&.filled {
|
|
18
|
+
&.ui-filled {
|
|
19
19
|
--_bg-color: var(--surface-filled);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
&.default {
|
|
22
|
+
&.ui-default {
|
|
23
23
|
--_bg-color: var(--surface-default);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
&.tonal {
|
|
26
|
+
&.ui-tonal {
|
|
27
27
|
--_bg-color: var(--surface-tonal);
|
|
28
28
|
}
|
|
29
29
|
|
package/css/components/radio.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@layer components.root {
|
|
2
|
-
label.radio {
|
|
2
|
+
label.ui-radio {
|
|
3
3
|
--_input-size: 1.125rem;
|
|
4
4
|
--_indicator-size: 50%;
|
|
5
5
|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
/* Required dot */
|
|
30
30
|
&:has(:invalid) {
|
|
31
|
-
.label:after {
|
|
31
|
+
.ui-label:after {
|
|
32
32
|
color: var(--red);
|
|
33
33
|
content: "*";
|
|
34
34
|
inset: 0 -0.25ex auto auto;
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/* Label */
|
|
40
|
-
.label {
|
|
40
|
+
.ui-label {
|
|
41
41
|
color: var(--text-primary);
|
|
42
42
|
font-size: var(--font-size-05);
|
|
43
43
|
grid-column: 2;
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
/* End text */
|
|
50
|
-
:where(.end-text) {
|
|
50
|
+
:where(.ui-end-text) {
|
|
51
51
|
color: var(--text-muted);
|
|
52
52
|
font-size: var(--font-size-0);
|
|
53
53
|
grid-column: 2;
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/* Stacked layout */
|
|
60
|
-
&.stack {
|
|
60
|
+
&.ui-stack {
|
|
61
61
|
grid-auto-columns: unset;
|
|
62
62
|
justify-items: center;
|
|
63
63
|
|
|
64
|
-
.label {
|
|
64
|
+
.ui-label {
|
|
65
65
|
grid-column: 1/-1;
|
|
66
66
|
grid-row: 2;
|
|
67
67
|
margin-block-start: var(--size-1);
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
.end-text {
|
|
76
|
+
.ui-end-text {
|
|
77
77
|
grid-column: 1/-1;
|
|
78
78
|
grid-row: 3;
|
|
79
79
|
}
|
|
@@ -122,14 +122,14 @@
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
/* Sizes */
|
|
125
|
-
&.small {
|
|
125
|
+
&.ui-small {
|
|
126
126
|
input[type="radio"] {
|
|
127
127
|
--_input-size: var(--size-3);
|
|
128
128
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
&.large {
|
|
132
|
+
&.ui-large {
|
|
133
133
|
input[type="radio"] {
|
|
134
134
|
--_input-size: var(--size-4);
|
|
135
135
|
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
&:has(:user-invalid) {
|
|
142
142
|
--palette-source: oklch(0.58 0.21 var(--hue-red));
|
|
143
143
|
|
|
144
|
-
:where(.end-text) {
|
|
144
|
+
:where(.ui-end-text) {
|
|
145
145
|
color: var(--primary);
|
|
146
146
|
}
|
|
147
147
|
}
|