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
package/css/components/form.css
CHANGED
|
@@ -1,146 +1,147 @@
|
|
|
1
|
-
@layer components.extended {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
border: 0;
|
|
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
|
-
label
|
|
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
|
-
flex-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
1
|
+
@layer components.extended {
|
|
2
|
+
/* Form */
|
|
3
|
+
:where(.ui-form) {
|
|
4
|
+
display: grid;
|
|
5
|
+
gap: var(--size-8);
|
|
6
|
+
|
|
7
|
+
hr {
|
|
8
|
+
margin-block: 0;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Fieldset */
|
|
13
|
+
:where(.ui-fieldset) {
|
|
14
|
+
all: unset;
|
|
15
|
+
border: 0;
|
|
16
|
+
border-radius: 0;
|
|
17
|
+
display: grid;
|
|
18
|
+
gap: var(--size-1);
|
|
19
|
+
margin: 0;
|
|
20
|
+
min-inline-size: 0;
|
|
21
|
+
padding: 0;
|
|
22
|
+
|
|
23
|
+
/* Legend */
|
|
24
|
+
:where(legend, .ui-legend) {
|
|
25
|
+
all: unset;
|
|
26
|
+
color: var(--text-primary);
|
|
27
|
+
font-weight: 600;
|
|
28
|
+
margin-block-end: var(--size-3);
|
|
29
|
+
padding: 0;
|
|
30
|
+
|
|
31
|
+
&:has(+ :where(.ui-field-description)) {
|
|
32
|
+
margin-block-end: 0;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Field description / supporting text */
|
|
37
|
+
:where(.ui-field-description) {
|
|
38
|
+
color: var(--text-muted);
|
|
39
|
+
font-size: var(--font-size-05);
|
|
40
|
+
line-height: var(--font-lineheight-3);
|
|
41
|
+
|
|
42
|
+
&:has(+ *) {
|
|
43
|
+
margin-block-end: var(--size-3);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* End text */
|
|
48
|
+
:where(.ui-end-text) {
|
|
49
|
+
color: var(--text-muted);
|
|
50
|
+
font-size: var(--font-size-0);
|
|
51
|
+
line-height: var(--font-lineheight-3);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&:has(.ui-text-field.ui-row) {
|
|
55
|
+
row-gap: var(--size-7);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Disabled */
|
|
59
|
+
&[disabled] {
|
|
60
|
+
opacity: 0.64;
|
|
61
|
+
user-select: none;
|
|
62
|
+
|
|
63
|
+
input,
|
|
64
|
+
label,
|
|
65
|
+
.ui-label {
|
|
66
|
+
cursor: not-allowed;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Error / validation */
|
|
71
|
+
&[data-invalid] {
|
|
72
|
+
:where(.ui-end-text) {
|
|
73
|
+
color: var(--critical);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:where(.ui-checkbox, .ui-radio, .ui-switch) {
|
|
77
|
+
--primary: var(--critical);
|
|
78
|
+
|
|
79
|
+
:where(.ui-end-text) {
|
|
80
|
+
color: var(--critical);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:where(.ui-switch) {
|
|
85
|
+
input {
|
|
86
|
+
border-radius: var(--radius-round);
|
|
87
|
+
outline: 2px solid var(--critical);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Required */
|
|
93
|
+
&:has(:invalid) {
|
|
94
|
+
:where(legend, .ui-legend) {
|
|
95
|
+
padding-inline-end: 1ex;
|
|
96
|
+
position: relative;
|
|
97
|
+
|
|
98
|
+
&::after {
|
|
99
|
+
color: var(--red);
|
|
100
|
+
content: "*";
|
|
101
|
+
inset: 0 -0.25ex auto auto;
|
|
102
|
+
position: absolute;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Field group */
|
|
109
|
+
:where(.ui-field-group) {
|
|
110
|
+
display: flex;
|
|
111
|
+
flex-direction: column;
|
|
112
|
+
gap: var(--size-4);
|
|
113
|
+
|
|
114
|
+
/* If it only has checkboxes, radios, or switches */
|
|
115
|
+
&:has(> :where(.ui-checkbox, .ui-radio, .ui-switch)):not(
|
|
116
|
+
:has(> :not(.ui-checkbox, .ui-radio, .ui-switch))
|
|
117
|
+
) {
|
|
118
|
+
gap: var(--size-2);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* If it only has buttons */
|
|
122
|
+
&:has(.ui-button):not(:has(*:not(.ui-button))) {
|
|
123
|
+
align-items: center;
|
|
124
|
+
flex-direction: row;
|
|
125
|
+
gap: var(--size-2);
|
|
126
|
+
|
|
127
|
+
/* If it's not preceeded by an hr */
|
|
128
|
+
&:not(hr + &) {
|
|
129
|
+
margin-block-start: var(--size-4);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
& + & {
|
|
134
|
+
margin-block-start: var(--size-5);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Directions */
|
|
138
|
+
&.ui-row {
|
|
139
|
+
flex-direction: row;
|
|
140
|
+
flex-wrap: wrap;
|
|
141
|
+
|
|
142
|
+
&:has(> :where(.ui-checkbox, .ui-radio, .ui-switch)) {
|
|
143
|
+
gap: var(--size-4);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -1,139 +1,158 @@
|
|
|
1
|
-
@layer components.root {
|
|
2
|
-
:where(.ui-icon-button) {
|
|
3
|
-
--_color: light-dark(var(--color-16), var(--color-1));
|
|
4
|
-
--_color-contrast: light-dark(var(--color-1), var(--color-16));
|
|
5
|
-
--_color-tonal: var(--surface-tonal);
|
|
6
|
-
|
|
7
|
-
--_accent: var(--_color);
|
|
8
|
-
--_accent-contrast: var(--_color-contrast);
|
|
9
|
-
--_accent-tonal: var(--_color-tonal);
|
|
10
|
-
--_accent-tonal-contrast: var(--_color);
|
|
11
|
-
--_default-hover-bg-color: light-dark(
|
|
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
|
-
--_color: var(--
|
|
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
|
-
|
|
1
|
+
@layer components.root {
|
|
2
|
+
:where(.ui-icon-button) {
|
|
3
|
+
--_color: light-dark(var(--color-16), var(--color-1));
|
|
4
|
+
--_color-contrast: light-dark(var(--color-1), var(--color-16));
|
|
5
|
+
--_color-tonal: var(--surface-tonal);
|
|
6
|
+
|
|
7
|
+
--_accent: var(--_color);
|
|
8
|
+
--_accent-contrast: var(--_color-contrast);
|
|
9
|
+
--_accent-tonal: var(--_color-tonal);
|
|
10
|
+
--_accent-tonal-contrast: var(--_color);
|
|
11
|
+
--_default-hover-bg-color: light-dark(
|
|
12
|
+
oklch(from var(--_accent) l 0.01 h / 10%),
|
|
13
|
+
oklch(from var(--_accent) l 0.01 h / 20%)
|
|
14
|
+
);
|
|
15
|
+
--_default-active-bg-color: light-dark(
|
|
16
|
+
oklch(from var(--_accent) l 0.06 h / 20%),
|
|
17
|
+
oklch(from var(--_accent) l 0.06 h / 30%)
|
|
18
|
+
);
|
|
19
|
+
--_filled-hover-bg-color: light-dark(
|
|
20
|
+
oklch(from var(--_accent) calc(l + 0.2) c h),
|
|
21
|
+
oklch(from var(--_accent) calc(l - 0.1) c h)
|
|
22
|
+
);
|
|
23
|
+
--_filled-active-bg-color: light-dark(
|
|
24
|
+
oklch(from var(--_accent) calc(l + 0.3) c h),
|
|
25
|
+
oklch(from var(--_accent) calc(l - 0.15) c h)
|
|
26
|
+
);
|
|
27
|
+
--_outlined-active-bg-color: var(--_filled-active-bg-color);
|
|
28
|
+
|
|
29
|
+
--_bg-color: transparent;
|
|
30
|
+
--_border-color: transparent;
|
|
31
|
+
--_border-width: var(--border-size-1);
|
|
32
|
+
--_text-color: inherit;
|
|
33
|
+
|
|
34
|
+
align-items: center;
|
|
35
|
+
aspect-ratio: 1;
|
|
36
|
+
background-color: var(--_bg-color);
|
|
37
|
+
block-size: var(--size-6);
|
|
38
|
+
border: var(--_border-width) solid var(--_border-color);
|
|
39
|
+
border-radius: var(--radius-round);
|
|
40
|
+
color: var(--_text-color);
|
|
41
|
+
display: inline-flex;
|
|
42
|
+
inline-size: var(--size-6);
|
|
43
|
+
justify-content: center;
|
|
44
|
+
padding: 0;
|
|
45
|
+
transform-style: preserve-3d;
|
|
46
|
+
transition:
|
|
47
|
+
background-color 0.1s ease,
|
|
48
|
+
color 0.1s ease,
|
|
49
|
+
border-color 0.1s ease,
|
|
50
|
+
box-shadow 0.1s ease;
|
|
51
|
+
|
|
52
|
+
&:where([disabled]) {
|
|
53
|
+
--_text-color: light-dark(rgb(0, 0, 0/0.3), rgb(255, 255, 255/0.26));
|
|
54
|
+
cursor: not-allowed;
|
|
55
|
+
opacity: 0.64;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
svg {
|
|
59
|
+
block-size: auto;
|
|
60
|
+
inline-size: auto;
|
|
61
|
+
max-block-size: var(--size-5);
|
|
62
|
+
max-inline-size: var(--size-5);
|
|
63
|
+
pointer-events: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* Ripple effect, utils.css */
|
|
67
|
+
&::before {
|
|
68
|
+
--highlight-size: 130%;
|
|
69
|
+
background-color: transparent;
|
|
70
|
+
|
|
71
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
72
|
+
transition:
|
|
73
|
+
transform 0.2s ease,
|
|
74
|
+
background-color 0.1s ease;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Colors — shared interaction model for critical and primary.
|
|
79
|
+
Each color modifier below only swaps --_color; the tonal surface,
|
|
80
|
+
contrast text, and hover/active strategy are identical.
|
|
81
|
+
The .critical scope class in theme.css redirects --palette-source so
|
|
82
|
+
--color-6 below becomes a tint of the active color. */
|
|
83
|
+
&.ui-critical,
|
|
84
|
+
&.ui-primary {
|
|
85
|
+
--_color-contrast: var(--gray-1);
|
|
86
|
+
--_color-tonal: var(--color-6);
|
|
87
|
+
--_accent-tonal-contrast: var(--text-primary-contrast);
|
|
88
|
+
|
|
89
|
+
--_default-hover-bg-color: oklch(from var(--_accent) l c h / 15%);
|
|
90
|
+
--_default-active-bg-color: oklch(from var(--_accent) l c h / 25%);
|
|
91
|
+
|
|
92
|
+
--_filled-hover-bg-color: oklch(from var(--_accent) calc(l - 0.1) c h);
|
|
93
|
+
--_filled-active-bg-color: oklch(from var(--_accent) calc(l - 0.15) c h);
|
|
94
|
+
|
|
95
|
+
--_outlined-active-bg-color: oklch(from var(--_accent) calc(l - 0.1) c h);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&.ui-critical {
|
|
99
|
+
--_color: var(--critical);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&.ui-primary {
|
|
103
|
+
--_color: var(--primary);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* Element states */
|
|
107
|
+
&:where(:not([disabled])) {
|
|
108
|
+
&:where(:not(:active):hover) {
|
|
109
|
+
&::before {
|
|
110
|
+
background-color: var(
|
|
111
|
+
--_interaction-hover-color,
|
|
112
|
+
var(--_default-hover-bg-color)
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&:where(:hover:active),
|
|
118
|
+
&[aria-current="page"] {
|
|
119
|
+
&::before {
|
|
120
|
+
background-color: var(
|
|
121
|
+
--_interaction-active-color,
|
|
122
|
+
var(--_default-active-bg-color)
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* Size */
|
|
129
|
+
&.ui-small {
|
|
130
|
+
block-size: var(--size-4);
|
|
131
|
+
inline-size: var(--size-4);
|
|
132
|
+
|
|
133
|
+
svg {
|
|
134
|
+
max-block-size: var(--size-4);
|
|
135
|
+
max-inline-size: var(--size-4);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Variants */
|
|
140
|
+
&.ui-outlined {
|
|
141
|
+
--_bg-color: transparent;
|
|
142
|
+
--_border-color: var(--_accent);
|
|
143
|
+
--_text-color: var(--_accent);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&.ui-tonal {
|
|
147
|
+
--_bg-color: var(--_accent-tonal);
|
|
148
|
+
--_text-color: var(--_accent-tonal-contrast);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&.ui-filled {
|
|
152
|
+
--_bg-color: var(--_accent);
|
|
153
|
+
--_interaction-active-color: var(--_filled-active-bg-color);
|
|
154
|
+
--_interaction-hover-color: var(--_filled-hover-bg-color);
|
|
155
|
+
--_text-color: var(--_accent-contrast);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
package/css/components/link.css
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
@layer components.root {
|
|
2
|
-
:where(.ui-link) {
|
|
3
|
-
color: var(--primary);
|
|
4
|
-
cursor: pointer;
|
|
5
|
-
font-weight: 700;
|
|
6
|
-
text-decoration: underline;
|
|
7
|
-
text-decoration-color: var(--primary);
|
|
8
|
-
text-underline-offset: 2px;
|
|
9
|
-
|
|
10
|
-
&[href] {
|
|
11
|
-
&:hover,
|
|
12
|
-
&:focus-visible {
|
|
13
|
-
color: var(--primary-light);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
@supports (-moz-appearance: none) {
|
|
18
|
-
text-underline-offset: 2px;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
1
|
+
@layer components.root {
|
|
2
|
+
:where(.ui-link) {
|
|
3
|
+
color: var(--primary);
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
font-weight: 700;
|
|
6
|
+
text-decoration: underline;
|
|
7
|
+
text-decoration-color: var(--primary);
|
|
8
|
+
text-underline-offset: 2px;
|
|
9
|
+
|
|
10
|
+
&[href] {
|
|
11
|
+
&:hover,
|
|
12
|
+
&:focus-visible {
|
|
13
|
+
color: var(--primary-light);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@supports (-moz-appearance: none) {
|
|
18
|
+
text-underline-offset: 2px;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|