opui-css 5.0.0 → 5.1.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 +317 -276
- package/LICENSE +21 -21
- package/MIGRATING.md +138 -127
- package/README.md +87 -87
- package/astro/index.ts +46 -46
- package/components/AGENTS.md +248 -248
- package/components/Accordion/Accordion.astro +52 -42
- package/components/Anchor/Anchor.astro +55 -51
- package/components/Avatar/Avatar.astro +38 -38
- package/components/Badge/Badge.astro +59 -59
- package/components/Button/Button.astro +45 -45
- package/components/ButtonGroup/ButtonGroup.astro +36 -29
- package/components/Callout/Callout.astro +75 -75
- package/components/Card/Card.astro +38 -36
- package/components/Checkbox/Checkbox.astro +76 -76
- package/components/Checkbox/CheckboxInput.astro +32 -32
- package/components/Chip/Chip.astro +37 -37
- package/components/ClassicSelect/ClassicSelect.astro +83 -83
- package/components/DescriptionList/Description.astro +12 -12
- package/components/DescriptionList/DescriptionList.astro +22 -22
- package/components/DescriptionList/Item.astro +12 -12
- package/components/DescriptionList/Term.astro +12 -12
- package/components/DescriptionList/index.ts +12 -12
- package/components/Dialog/Dialog.astro +43 -41
- package/components/Divider/Divider.astro +17 -17
- package/components/Drawer/Drawer.astro +49 -49
- package/components/Drawer/DrawerFooter.astro +14 -14
- package/components/Drawer/DrawerHeader.astro +31 -31
- package/components/FieldDescription/FieldDescription.astro +13 -13
- package/components/FieldGroup/FieldGroup.astro +31 -31
- package/components/FieldLegend/FieldLegend.astro +15 -15
- package/components/FieldSet/FieldSet.astro +15 -15
- package/components/Form/Form.astro +15 -15
- package/components/IconButton/IconButton.astro +26 -26
- package/components/List/List.astro +36 -36
- package/components/ListItem/ListItem.astro +118 -118
- package/components/Progress/Progress.astro +41 -40
- package/components/Radio/Radio.astro +70 -70
- package/components/Radio/RadioInput.astro +24 -24
- package/components/Range/Range.astro +136 -136
- package/components/Select/Select.astro +106 -106
- package/components/Switch/Switch.astro +101 -101
- package/components/Switch/SwitchInput.astro +25 -25
- package/components/Table/Body.astro +13 -13
- package/components/Table/Cell.astro +13 -13
- package/components/Table/Column.astro +15 -15
- package/components/Table/ColumnGroup.astro +13 -13
- package/components/Table/Head.astro +13 -13
- package/components/Table/HeaderCell.astro +13 -13
- package/components/Table/Row.astro +13 -13
- package/components/Table/Table.astro +18 -18
- package/components/Table/index.ts +20 -20
- package/components/Tabs/Tabs.astro +28 -28
- package/components/Tabs/TabsItem.astro +47 -47
- package/components/Tabs/TabsPanel.astro +21 -21
- package/components/Tabs/TabsTab.astro +19 -19
- package/components/Tabs/index.ts +14 -14
- package/components/TextField/TextField.astro +128 -128
- package/components/Textarea/Textarea.astro +106 -106
- package/components/Toast/Toast.astro +42 -42
- package/components/ToggleButton/ToggleButton.astro +53 -53
- package/components/ToggleGroup/ToggleGroup.astro +49 -49
- package/components/Tooltip/Tooltip.astro +30 -30
- package/core/normalize.css +200 -194
- package/core/palette.css +110 -59
- package/core/utils.css +71 -71
- package/css/components/accordion.css +174 -174
- package/css/components/anchor.css +27 -27
- package/css/components/avatar.css +65 -65
- package/css/components/badge.css +107 -107
- package/css/components/button-group.css +193 -179
- package/css/components/button.css +227 -215
- package/css/components/callout.css +112 -109
- package/css/components/card.css +115 -117
- package/css/components/checkbox.css +211 -205
- package/css/components/chip.css +92 -87
- package/css/components/description-list.css +81 -80
- package/css/components/dialog.css +69 -68
- package/css/components/divider.css +20 -20
- package/css/components/drawer.css +171 -171
- package/css/components/form.css +147 -146
- package/css/components/icon-button.css +158 -139
- package/css/components/link.css +21 -21
- package/css/components/list.css +343 -345
- package/css/components/progress.css +103 -97
- package/css/components/radio.css +170 -172
- package/css/components/range.css +342 -337
- package/css/components/select.css +172 -169
- package/css/components/spinner.css +38 -37
- package/css/components/switch.css +271 -268
- package/css/components/table.css +173 -179
- package/css/components/tabs.css +84 -83
- package/css/components/text-field.css +449 -450
- package/css/components/text-input.css +68 -64
- package/css/components/textarea.css +26 -24
- package/css/components/toast.css +160 -161
- package/css/components/toggle-button.css +91 -87
- package/css/components/toggle-group.css +56 -56
- package/css/components/tooltip.css +70 -67
- package/css/components/typography.css +585 -585
- package/css/components.css +41 -41
- package/css/imports.css +17 -16
- package/css/js/checkbox.js +21 -21
- package/css/js/toast.js +94 -94
- package/css/theme.css +133 -132
- package/dist/op.css +4 -66
- package/dist/op.css.map +1 -1
- package/dist/opui.components.css +5234 -5154
- package/dist/opui.components.css.map +1 -1
- package/dist/opui.css +5798 -5663
- package/dist/opui.css.map +1 -1
- package/env.d.ts +14 -14
- package/open-props.css +8 -9
- package/package.json +81 -81
|
@@ -1,179 +1,193 @@
|
|
|
1
|
-
@layer components.extended {
|
|
2
|
-
:where([role="group"].ui-button-group) {
|
|
3
|
-
--_border-radius: var(--button-border-radius);
|
|
4
|
-
|
|
5
|
-
border-radius: var(--_border-radius);
|
|
6
|
-
display: inline-flex;
|
|
7
|
-
min-width: max-content;
|
|
8
|
-
|
|
9
|
-
/* Button */
|
|
10
|
-
button {
|
|
11
|
-
border-radius: 0;
|
|
12
|
-
|
|
13
|
-
/* button.css > --_accent-tonal */
|
|
14
|
-
--_divider-color: light-dark(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
--_color-
|
|
36
|
-
--
|
|
37
|
-
--
|
|
38
|
-
--_default-
|
|
39
|
-
--
|
|
40
|
-
--_filled-
|
|
41
|
-
--
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
padding-inline:
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
:where(.ui-button-group.ui-
|
|
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
|
-
&:where(:active) {
|
|
93
|
-
--_bg-color: var(--
|
|
94
|
-
--_text-color: var(--_accent-contrast);
|
|
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
|
-
border-start-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
border-
|
|
137
|
-
border-
|
|
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
|
-
border-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
1
|
+
@layer components.extended {
|
|
2
|
+
:where([role="group"].ui-button-group) {
|
|
3
|
+
--_border-radius: var(--button-border-radius);
|
|
4
|
+
|
|
5
|
+
border-radius: var(--_border-radius);
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
min-width: max-content;
|
|
8
|
+
|
|
9
|
+
/* Button */
|
|
10
|
+
button {
|
|
11
|
+
border-radius: 0;
|
|
12
|
+
|
|
13
|
+
/* button.css > --_accent-tonal */
|
|
14
|
+
--_divider-color: light-dark(
|
|
15
|
+
oklch(from var(--_accent-tonal) calc(l - 0.1) c h),
|
|
16
|
+
oklch(from var(--_accent-tonal) calc(l + 0.1) c h)
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
&.ui-outlined {
|
|
20
|
+
--_divider-color: var(--_border-color);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&.ui-filled {
|
|
24
|
+
--_divider-color: currentColor;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:focus-visible {
|
|
28
|
+
outline-offset: -4px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Color inheritance from Button Group — shared interaction model.
|
|
32
|
+
The .critical scope class in theme.css redirects --palette-source so
|
|
33
|
+
--color-6 below becomes a tint of the active color. */
|
|
34
|
+
:where(.ui-button-group.ui-critical, .ui-button-group.ui-primary) & {
|
|
35
|
+
--_color-contrast: var(--gray-1);
|
|
36
|
+
--_color-tonal: var(--color-6);
|
|
37
|
+
--_accent-tonal-contrast: var(--text-primary-contrast);
|
|
38
|
+
--_default-hover-bg-color: oklch(from var(--_accent) l c h / 15%);
|
|
39
|
+
--_default-active-bg-color: oklch(from var(--_accent) l c h / 25%);
|
|
40
|
+
--_filled-hover-bg-color: oklch(from var(--_accent) calc(l - 0.1) c h);
|
|
41
|
+
--_filled-active-bg-color: oklch(
|
|
42
|
+
from var(--_accent) calc(l - 0.15) c h
|
|
43
|
+
);
|
|
44
|
+
--_outlined-active-bg-color: oklch(
|
|
45
|
+
from var(--_accent) calc(l - 0.1) c h
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:where(.ui-button-group.ui-critical) & {
|
|
50
|
+
--_color: var(--critical);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:where(.ui-button-group.ui-primary) & {
|
|
54
|
+
--_color: var(--primary);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:where(.ui-button-group.ui-small) & {
|
|
58
|
+
--_min-height: 1.875rem;
|
|
59
|
+
padding-block: 0;
|
|
60
|
+
padding-inline: 1ex;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:where(.ui-button-group.ui-large) & {
|
|
64
|
+
--_min-height: 2.875rem;
|
|
65
|
+
padding-inline: 4ex;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:where(.ui-button-group.ui-outlined) & {
|
|
69
|
+
--_border-color: var(--_accent);
|
|
70
|
+
--_divider-color: var(--_accent);
|
|
71
|
+
|
|
72
|
+
&:where(:not([disabled])) {
|
|
73
|
+
&:where(:not(:active):hover) {
|
|
74
|
+
--_bg-color: var(--_accent);
|
|
75
|
+
--_border-color: var(--_accent);
|
|
76
|
+
--_text-color: var(--_accent-contrast);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&:where(:active) {
|
|
80
|
+
--_bg-color: var(--_outlined-active-bg-color);
|
|
81
|
+
--_border-color: var(--_outlined-active-bg-color);
|
|
82
|
+
--_text-color: var(--_accent-contrast);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:where(.ui-button-group.ui-tonal) & {
|
|
88
|
+
--_bg-color: var(--_accent-tonal);
|
|
89
|
+
--_text-color: var(--_accent-tonal-contrast);
|
|
90
|
+
|
|
91
|
+
&:where(:not([disabled])) {
|
|
92
|
+
&:where(:not(:active):hover) {
|
|
93
|
+
--_bg-color: var(--_accent);
|
|
94
|
+
--_text-color: var(--_accent-contrast);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&:where(:active) {
|
|
98
|
+
--_bg-color: var(--_outlined-active-bg-color);
|
|
99
|
+
--_text-color: var(--_accent-contrast);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:where(.ui-button-group.ui-filled) & {
|
|
105
|
+
--_bg-color: var(--_accent);
|
|
106
|
+
--_text-color: var(--_accent-contrast);
|
|
107
|
+
--_divider-color: currentColor;
|
|
108
|
+
|
|
109
|
+
:where(.ui-button-group.ui-critical, .ui-button-group.ui-primary) & {
|
|
110
|
+
--_divider-color: light-dark(
|
|
111
|
+
oklch(from var(--_accent) calc(l - 0.1) c h),
|
|
112
|
+
oklch(from var(--_accent) calc(l + 0.1) c h)
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&:where(:not([disabled])) {
|
|
117
|
+
&:where(:not(:active):hover) {
|
|
118
|
+
--_bg-color: var(--_filled-hover-bg-color);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&:where(:active) {
|
|
122
|
+
--_bg-color: var(--_filled-active-bg-color);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&:not(.ui-vertical) {
|
|
129
|
+
button {
|
|
130
|
+
&:first-of-type {
|
|
131
|
+
border-end-start-radius: var(--_border-radius);
|
|
132
|
+
border-start-start-radius: var(--_border-radius);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&:last-of-type {
|
|
136
|
+
border-end-end-radius: var(--_border-radius);
|
|
137
|
+
border-start-end-radius: var(--_border-radius);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* Siblings */
|
|
141
|
+
& + & {
|
|
142
|
+
border-inline-start-color: var(--_divider-color);
|
|
143
|
+
border-inline-width: 1px;
|
|
144
|
+
margin-inline-start: -1px;
|
|
145
|
+
|
|
146
|
+
&[disabled] {
|
|
147
|
+
border-inline-start-color: color-mix(
|
|
148
|
+
in oklch,
|
|
149
|
+
var(--_divider-color) 40%,
|
|
150
|
+
transparent
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&.ui-vertical {
|
|
158
|
+
flex-direction: column;
|
|
159
|
+
|
|
160
|
+
button {
|
|
161
|
+
padding: var(--size-2);
|
|
162
|
+
|
|
163
|
+
&:has(svg) {
|
|
164
|
+
aspect-ratio: 1;
|
|
165
|
+
padding: var(--size-1);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&:first-of-type {
|
|
169
|
+
border-start-start-radius: var(--_border-radius);
|
|
170
|
+
border-start-end-radius: var(--_border-radius);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&:last-of-type {
|
|
174
|
+
border-end-start-radius: var(--_border-radius);
|
|
175
|
+
border-end-end-radius: var(--_border-radius);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
& + & {
|
|
179
|
+
border-block-start: 1px solid var(--_divider-color);
|
|
180
|
+
margin-block-start: -1px;
|
|
181
|
+
|
|
182
|
+
&[disabled] {
|
|
183
|
+
border-block-start-color: color-mix(
|
|
184
|
+
in oklch,
|
|
185
|
+
var(--_divider-color) 40%,
|
|
186
|
+
transparent
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|