opui-css 3.3.2 → 3.3.4
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/LICENSE +21 -21
- package/dist/op.css +52 -52
- package/dist/theme-one/components.css +3869 -0
- package/dist/{theme-one.css → theme-one/theme-one.css} +4404 -4404
- package/dist/theme-two/components.css +3591 -0
- package/dist/{theme-two.css → theme-two/theme-two.css} +4121 -4121
- package/package.json +16 -12
- package/src/core/normalize.css +196 -196
- package/src/core/utils.css +60 -60
- package/src/open-props.css +10 -10
- package/src/themes/theme-one/components/accordion.css +172 -172
- package/src/themes/theme-one/components/alert.css +85 -85
- package/src/themes/theme-one/components/avatar.css +68 -68
- package/src/themes/theme-one/components/badge.css +101 -101
- package/src/themes/theme-one/components/button-group.css +69 -69
- package/src/themes/theme-one/components/button.css +281 -281
- package/src/themes/theme-one/components/card.css +82 -82
- package/src/themes/theme-one/components/checkbox-radio.css +123 -123
- package/src/themes/theme-one/components/chip.css +135 -135
- package/src/themes/theme-one/components/definition-list.css +68 -68
- package/src/themes/theme-one/components/dialog.css +59 -59
- package/src/themes/theme-one/components/divider.css +7 -7
- package/src/themes/theme-one/components/field-group.css +83 -83
- package/src/themes/theme-one/components/field.css +494 -494
- package/src/themes/theme-one/components/icon-button.css +40 -40
- package/src/themes/theme-one/components/link.css +21 -21
- package/src/themes/theme-one/components/list.css +318 -318
- package/src/themes/theme-one/components/progress.css +83 -83
- package/src/themes/theme-one/components/range.css +121 -121
- package/src/themes/theme-one/components/rich-text.css +210 -210
- package/src/themes/theme-one/components/select.css +163 -163
- package/src/themes/theme-one/components/snackbar.css +148 -148
- package/src/themes/theme-one/components/spinner.css +38 -38
- package/src/themes/theme-one/components/switch.css +225 -225
- package/src/themes/theme-one/components/tab-buttons.css +120 -120
- package/src/themes/theme-one/components/table.css +92 -92
- package/src/themes/theme-one/components/text-field.css +57 -57
- package/src/themes/theme-one/components/textarea.css +25 -25
- package/src/themes/theme-one/components/toggle-button-group.css +135 -135
- package/src/themes/theme-one/components/tooltip.css +94 -94
- package/src/themes/theme-one/components/typography.css +209 -209
- package/src/themes/theme-one/components.css +37 -37
- package/src/themes/theme-one/imports.css +16 -16
- package/src/themes/theme-one/theme.css +163 -163
- package/src/themes/theme-two/components/accordion.css +172 -172
- package/src/themes/theme-two/components/alert.css +85 -85
- package/src/themes/theme-two/components/avatar.css +68 -68
- package/src/themes/theme-two/components/badge.css +101 -101
- package/src/themes/theme-two/components/button-group.css +50 -50
- package/src/themes/theme-two/components/button.css +229 -229
- package/src/themes/theme-two/components/card.css +82 -82
- package/src/themes/theme-two/components/checkbox-radio.css +123 -123
- package/src/themes/theme-two/components/chip.css +135 -135
- package/src/themes/theme-two/components/definition-list.css +68 -68
- package/src/themes/theme-two/components/dialog.css +59 -59
- package/src/themes/theme-two/components/divider.css +7 -7
- package/src/themes/theme-two/components/field-group.css +83 -83
- package/src/themes/theme-two/components/field.css +281 -281
- package/src/themes/theme-two/components/icon-button.css +40 -40
- package/src/themes/theme-two/components/link.css +21 -21
- package/src/themes/theme-two/components/list.css +318 -318
- package/src/themes/theme-two/components/progress.css +83 -83
- package/src/themes/theme-two/components/range.css +121 -121
- package/src/themes/theme-two/components/rich-text.css +210 -210
- package/src/themes/theme-two/components/select.css +162 -162
- package/src/themes/theme-two/components/snackbar.css +148 -148
- package/src/themes/theme-two/components/spinner.css +38 -38
- package/src/themes/theme-two/components/switch.css +225 -225
- package/src/themes/theme-two/components/tab-buttons.css +120 -120
- package/src/themes/theme-two/components/table.css +99 -99
- package/src/themes/theme-two/components/text-field.css +57 -57
- package/src/themes/theme-two/components/textarea.css +25 -25
- package/src/themes/theme-two/components/toggle-button-group.css +135 -135
- package/src/themes/theme-two/components/tooltip.css +94 -94
- package/src/themes/theme-two/components/typography.css +209 -209
- package/src/themes/theme-two/components.css +37 -37
- package/src/themes/theme-two/imports.css +16 -16
- package/src/themes/theme-two/theme.css +158 -158
|
@@ -1,162 +1,162 @@
|
|
|
1
|
-
@layer components.extended {
|
|
2
|
-
:where(.field > select) {
|
|
3
|
-
position: relative;
|
|
4
|
-
|
|
5
|
-
/* Default arrow */
|
|
6
|
-
&::picker-icon {
|
|
7
|
-
block-size: 0;
|
|
8
|
-
border-block-start: 5px solid;
|
|
9
|
-
border-inline: 5px solid transparent;
|
|
10
|
-
color: currentColor;
|
|
11
|
-
content: "";
|
|
12
|
-
inline-size: 0;
|
|
13
|
-
inset: 50% var(--size-3) auto auto;
|
|
14
|
-
pointer-events: none;
|
|
15
|
-
position: absolute;
|
|
16
|
-
translate: 0 -50%;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&:open {
|
|
20
|
-
&::picker-icon {
|
|
21
|
-
rotate: 180deg;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/* Select popover */
|
|
26
|
-
&::picker(select) {
|
|
27
|
-
/* Animation on-stage styles */
|
|
28
|
-
border: 0;
|
|
29
|
-
box-shadow: var(--shadow-2);
|
|
30
|
-
opacity: 1;
|
|
31
|
-
padding: 0;
|
|
32
|
-
scale: 1;
|
|
33
|
-
|
|
34
|
-
/* Animation starting styles */
|
|
35
|
-
@starting-style {
|
|
36
|
-
opacity: 0;
|
|
37
|
-
transform: scale(0.9);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
41
|
-
transition: display 0.2s allow-discrete, opacity 0.2s var(--ease-3),
|
|
42
|
-
overlay 0.2s allow-discrete, scale 0.2s var(--ease-3);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/* Animation off-stage styles */
|
|
47
|
-
&:not(:open)::picker(select) {
|
|
48
|
-
opacity: 0;
|
|
49
|
-
scale: 0.9;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
button {
|
|
53
|
-
background-color: transparent;
|
|
54
|
-
display: flex;
|
|
55
|
-
inline-size: 100%;
|
|
56
|
-
margin: 0;
|
|
57
|
-
position: relative;
|
|
58
|
-
|
|
59
|
-
selectedcontent {
|
|
60
|
-
overflow: hidden;
|
|
61
|
-
text-overflow: ellipsis;
|
|
62
|
-
white-space: nowrap;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.list {
|
|
67
|
-
/* Groups */
|
|
68
|
-
[role="group"] {
|
|
69
|
-
label {
|
|
70
|
-
background-color: light-dark(var(--gray-3), var(--gray-13));
|
|
71
|
-
color: light-dark(
|
|
72
|
-
oklch(from var(--text-color-1) calc(l * 0.75) c h),
|
|
73
|
-
oklch(from var(--text-color-1) calc(l * 1.25) c h)
|
|
74
|
-
);
|
|
75
|
-
font-weight: 500;
|
|
76
|
-
overflow: hidden;
|
|
77
|
-
padding-inline: var(--size-2);
|
|
78
|
-
text-overflow: ellipsis;
|
|
79
|
-
white-space: nowrap;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
&:not(:first-child),
|
|
83
|
-
option:first-of-type {
|
|
84
|
-
margin-block-start: var(--size-2);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
option:last-of-type,
|
|
88
|
-
&:last-child {
|
|
89
|
-
option:last-of-type {
|
|
90
|
-
margin-block-end: 0;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/* Option */
|
|
96
|
-
option {
|
|
97
|
-
/* Checkmark */
|
|
98
|
-
/* TODO - checkmark should be the final version of the checkmark API. Follow the development of this and remove redundant psuedo stuff. */
|
|
99
|
-
&::check {
|
|
100
|
-
display: none;
|
|
101
|
-
}
|
|
102
|
-
&::checkmark {
|
|
103
|
-
display: none;
|
|
104
|
-
}
|
|
105
|
-
&::before {
|
|
106
|
-
display: none;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
&:focus-visible {
|
|
110
|
-
outline-offset: -1px;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
:where(.field:has(> select)) {
|
|
117
|
-
/* Size */
|
|
118
|
-
&.small {
|
|
119
|
-
button {
|
|
120
|
-
padding-inline: var(--size-2) var(--size-7);
|
|
121
|
-
|
|
122
|
-
&::after {
|
|
123
|
-
inset-inline-end: var(--size-2);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/*
|
|
129
|
-
* Non-experimental Select
|
|
130
|
-
*
|
|
131
|
-
* Hack to get the arrow working. Pseudo elements aren't allowed on the `<select>` element, so need to add it on the `.field` class instead. Noting this down if an `:after` element would be needed on a `.field`.
|
|
132
|
-
*/
|
|
133
|
-
&:not(:has(button)) {
|
|
134
|
-
select {
|
|
135
|
-
appearance: none;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/* Arrow */
|
|
139
|
-
&::after {
|
|
140
|
-
align-self: center;
|
|
141
|
-
block-size: 0;
|
|
142
|
-
border-block-start: 5px solid;
|
|
143
|
-
border-inline: 5px solid transparent;
|
|
144
|
-
content: "";
|
|
145
|
-
display: inline-block;
|
|
146
|
-
flex-shrink: 0;
|
|
147
|
-
grid-column: 1/-1;
|
|
148
|
-
grid-row: 2;
|
|
149
|
-
inline-size: 0;
|
|
150
|
-
inset-inline-end: var(--size-3);
|
|
151
|
-
justify-self: end;
|
|
152
|
-
pointer-events: none;
|
|
153
|
-
position: relative;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
select:has(button),
|
|
159
|
-
::picker(select) {
|
|
160
|
-
appearance: base-select;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
1
|
+
@layer components.extended {
|
|
2
|
+
:where(.field > select) {
|
|
3
|
+
position: relative;
|
|
4
|
+
|
|
5
|
+
/* Default arrow */
|
|
6
|
+
&::picker-icon {
|
|
7
|
+
block-size: 0;
|
|
8
|
+
border-block-start: 5px solid;
|
|
9
|
+
border-inline: 5px solid transparent;
|
|
10
|
+
color: currentColor;
|
|
11
|
+
content: "";
|
|
12
|
+
inline-size: 0;
|
|
13
|
+
inset: 50% var(--size-3) auto auto;
|
|
14
|
+
pointer-events: none;
|
|
15
|
+
position: absolute;
|
|
16
|
+
translate: 0 -50%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:open {
|
|
20
|
+
&::picker-icon {
|
|
21
|
+
rotate: 180deg;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Select popover */
|
|
26
|
+
&::picker(select) {
|
|
27
|
+
/* Animation on-stage styles */
|
|
28
|
+
border: 0;
|
|
29
|
+
box-shadow: var(--shadow-2);
|
|
30
|
+
opacity: 1;
|
|
31
|
+
padding: 0;
|
|
32
|
+
scale: 1;
|
|
33
|
+
|
|
34
|
+
/* Animation starting styles */
|
|
35
|
+
@starting-style {
|
|
36
|
+
opacity: 0;
|
|
37
|
+
transform: scale(0.9);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
41
|
+
transition: display 0.2s allow-discrete, opacity 0.2s var(--ease-3),
|
|
42
|
+
overlay 0.2s allow-discrete, scale 0.2s var(--ease-3);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Animation off-stage styles */
|
|
47
|
+
&:not(:open)::picker(select) {
|
|
48
|
+
opacity: 0;
|
|
49
|
+
scale: 0.9;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
button {
|
|
53
|
+
background-color: transparent;
|
|
54
|
+
display: flex;
|
|
55
|
+
inline-size: 100%;
|
|
56
|
+
margin: 0;
|
|
57
|
+
position: relative;
|
|
58
|
+
|
|
59
|
+
selectedcontent {
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
text-overflow: ellipsis;
|
|
62
|
+
white-space: nowrap;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.list {
|
|
67
|
+
/* Groups */
|
|
68
|
+
[role="group"] {
|
|
69
|
+
label {
|
|
70
|
+
background-color: light-dark(var(--gray-3), var(--gray-13));
|
|
71
|
+
color: light-dark(
|
|
72
|
+
oklch(from var(--text-color-1) calc(l * 0.75) c h),
|
|
73
|
+
oklch(from var(--text-color-1) calc(l * 1.25) c h)
|
|
74
|
+
);
|
|
75
|
+
font-weight: 500;
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
padding-inline: var(--size-2);
|
|
78
|
+
text-overflow: ellipsis;
|
|
79
|
+
white-space: nowrap;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&:not(:first-child),
|
|
83
|
+
option:first-of-type {
|
|
84
|
+
margin-block-start: var(--size-2);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
option:last-of-type,
|
|
88
|
+
&:last-child {
|
|
89
|
+
option:last-of-type {
|
|
90
|
+
margin-block-end: 0;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Option */
|
|
96
|
+
option {
|
|
97
|
+
/* Checkmark */
|
|
98
|
+
/* TODO - checkmark should be the final version of the checkmark API. Follow the development of this and remove redundant psuedo stuff. */
|
|
99
|
+
&::check {
|
|
100
|
+
display: none;
|
|
101
|
+
}
|
|
102
|
+
&::checkmark {
|
|
103
|
+
display: none;
|
|
104
|
+
}
|
|
105
|
+
&::before {
|
|
106
|
+
display: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&:focus-visible {
|
|
110
|
+
outline-offset: -1px;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:where(.field:has(> select)) {
|
|
117
|
+
/* Size */
|
|
118
|
+
&.small {
|
|
119
|
+
button {
|
|
120
|
+
padding-inline: var(--size-2) var(--size-7);
|
|
121
|
+
|
|
122
|
+
&::after {
|
|
123
|
+
inset-inline-end: var(--size-2);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/*
|
|
129
|
+
* Non-experimental Select
|
|
130
|
+
*
|
|
131
|
+
* Hack to get the arrow working. Pseudo elements aren't allowed on the `<select>` element, so need to add it on the `.field` class instead. Noting this down if an `:after` element would be needed on a `.field`.
|
|
132
|
+
*/
|
|
133
|
+
&:not(:has(button)) {
|
|
134
|
+
select {
|
|
135
|
+
appearance: none;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* Arrow */
|
|
139
|
+
&::after {
|
|
140
|
+
align-self: center;
|
|
141
|
+
block-size: 0;
|
|
142
|
+
border-block-start: 5px solid;
|
|
143
|
+
border-inline: 5px solid transparent;
|
|
144
|
+
content: "";
|
|
145
|
+
display: inline-block;
|
|
146
|
+
flex-shrink: 0;
|
|
147
|
+
grid-column: 1/-1;
|
|
148
|
+
grid-row: 2;
|
|
149
|
+
inline-size: 0;
|
|
150
|
+
inset-inline-end: var(--size-3);
|
|
151
|
+
justify-self: end;
|
|
152
|
+
pointer-events: none;
|
|
153
|
+
position: relative;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
select:has(button),
|
|
159
|
+
::picker(select) {
|
|
160
|
+
appearance: base-select;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
@@ -1,148 +1,148 @@
|
|
|
1
|
-
@layer components.extended {
|
|
2
|
-
:where(.snackbar) {
|
|
3
|
-
align-items: center;
|
|
4
|
-
/* Inverse surface-filled */
|
|
5
|
-
background-color: light-dark(var(--gray-15), var(--gray-2));
|
|
6
|
-
border-radius: var(--border-radius);
|
|
7
|
-
box-shadow: var(--shadow-2);
|
|
8
|
-
color: var(--text-color-1-contrast);
|
|
9
|
-
display: flex;
|
|
10
|
-
font-size: var(--font-size-sm);
|
|
11
|
-
gap: var(--size-3);
|
|
12
|
-
inset-block: auto var(--size-3);
|
|
13
|
-
inset-inline: var(--size-3) auto;
|
|
14
|
-
justify-content: space-between;
|
|
15
|
-
min-inline-size: min(100%, 37ch);
|
|
16
|
-
padding: var(--size-2) var(--size-3);
|
|
17
|
-
position: fixed;
|
|
18
|
-
inline-size: calc(100% - var(--size-6, 1.75rem));
|
|
19
|
-
z-index: 100;
|
|
20
|
-
|
|
21
|
-
&::backdrop {
|
|
22
|
-
display: none;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
* {
|
|
26
|
-
word-break: break-word;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/* Global positioning (in relation to the window) */
|
|
30
|
-
/*** Default (end-start) */
|
|
31
|
-
inset-block: auto var(--size-3);
|
|
32
|
-
inset-inline: 50% 0;
|
|
33
|
-
translate: -50% 0;
|
|
34
|
-
|
|
35
|
-
&.start-start,
|
|
36
|
-
&.start-center,
|
|
37
|
-
&.start-end {
|
|
38
|
-
inset-block: var(--size-3) auto;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* TODO use @custom-media instead? */
|
|
42
|
-
@container (width > 480px) {
|
|
43
|
-
/* Default (end-start) */
|
|
44
|
-
inset-block: auto var(--size-7, 2rem);
|
|
45
|
-
inset-inline: var(--size-7, 2rem) auto;
|
|
46
|
-
translate: revert;
|
|
47
|
-
inline-size: fit-content;
|
|
48
|
-
|
|
49
|
-
&.end-start,
|
|
50
|
-
&.end-end,
|
|
51
|
-
&.start-start,
|
|
52
|
-
&.start-end {
|
|
53
|
-
translate: revert;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&.start-start {
|
|
57
|
-
inset-block: var(--size-7, 2rem) auto;
|
|
58
|
-
inset-inline: var(--size-7, 2rem) auto;
|
|
59
|
-
}
|
|
60
|
-
&.start-center {
|
|
61
|
-
inset-block: var(--size-7, 2rem) auto;
|
|
62
|
-
inset-inline: 50% 0;
|
|
63
|
-
translate: -50% 0;
|
|
64
|
-
}
|
|
65
|
-
&.start-end {
|
|
66
|
-
inset-block: var(--size-7, 2rem) auto;
|
|
67
|
-
inset-inline: auto var(--size-7, 2rem);
|
|
68
|
-
}
|
|
69
|
-
&.end-start {
|
|
70
|
-
inset-block-end: var(--size-7, 2rem);
|
|
71
|
-
inset-inline: var(--size-7, 2rem) auto;
|
|
72
|
-
}
|
|
73
|
-
&.end-center {
|
|
74
|
-
inset-block: auto var(--size-7, 2rem);
|
|
75
|
-
inset-inline: 50% 0;
|
|
76
|
-
translate: -50% 0;
|
|
77
|
-
}
|
|
78
|
-
&.end-end {
|
|
79
|
-
inset-block: auto var(--size-7, 2rem);
|
|
80
|
-
inset-inline: auto var(--size-7, 2rem);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/* Absolute positioning */
|
|
85
|
-
&.absolute {
|
|
86
|
-
position: absolute;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/* Actions */
|
|
90
|
-
.actions {
|
|
91
|
-
align-items: center;
|
|
92
|
-
display: flex;
|
|
93
|
-
flex-shrink: 0;
|
|
94
|
-
gap: var(--size-3);
|
|
95
|
-
padding-inline: 0;
|
|
96
|
-
|
|
97
|
-
button {
|
|
98
|
-
/* Inverse hover and active backgrounds */
|
|
99
|
-
&:where(:not([disabled])) {
|
|
100
|
-
&:where(:not(:active):hover) {
|
|
101
|
-
--_bg-color: light-dark(
|
|
102
|
-
color-mix(in oklch, white 40%, black),
|
|
103
|
-
color-mix(in oklch, white 85%, black)
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
&:where(:hover:active) {
|
|
108
|
-
--_bg-color: light-dark(
|
|
109
|
-
color-mix(in oklch, white 45%, black),
|
|
110
|
-
color-mix(in oklch, white 80%, black)
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
button:not(:has(svg)) {
|
|
117
|
-
border-radius: var(--border-radius);
|
|
118
|
-
font-size: inherit;
|
|
119
|
-
max-block-size: var(--size-6, 1.5rem);
|
|
120
|
-
padding: 1ex;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
button:has(svg) {
|
|
124
|
-
color: inherit;
|
|
125
|
-
max-inline-size: var(--size-6, 1.75rem);
|
|
126
|
-
margin: var(--size-00);
|
|
127
|
-
padding: var(--size-1);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/* Animations */
|
|
132
|
-
opacity: 0;
|
|
133
|
-
transition: display 0.075s allow-discrete, overlay 0.075s allow-discrete,
|
|
134
|
-
opacity 0.075s var(--ease-out-1);
|
|
135
|
-
|
|
136
|
-
&:popover-open,
|
|
137
|
-
&:popover-open::backdrop,
|
|
138
|
-
&.visible {
|
|
139
|
-
opacity: 1;
|
|
140
|
-
transition: display 0.25s allow-discrete, overlay 0.25s allow-discrete,
|
|
141
|
-
opacity 0.25s var(--ease-out-1);
|
|
142
|
-
|
|
143
|
-
@starting-style {
|
|
144
|
-
opacity: 0;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
1
|
+
@layer components.extended {
|
|
2
|
+
:where(.snackbar) {
|
|
3
|
+
align-items: center;
|
|
4
|
+
/* Inverse surface-filled */
|
|
5
|
+
background-color: light-dark(var(--gray-15), var(--gray-2));
|
|
6
|
+
border-radius: var(--border-radius);
|
|
7
|
+
box-shadow: var(--shadow-2);
|
|
8
|
+
color: var(--text-color-1-contrast);
|
|
9
|
+
display: flex;
|
|
10
|
+
font-size: var(--font-size-sm);
|
|
11
|
+
gap: var(--size-3);
|
|
12
|
+
inset-block: auto var(--size-3);
|
|
13
|
+
inset-inline: var(--size-3) auto;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
min-inline-size: min(100%, 37ch);
|
|
16
|
+
padding: var(--size-2) var(--size-3);
|
|
17
|
+
position: fixed;
|
|
18
|
+
inline-size: calc(100% - var(--size-6, 1.75rem));
|
|
19
|
+
z-index: 100;
|
|
20
|
+
|
|
21
|
+
&::backdrop {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
* {
|
|
26
|
+
word-break: break-word;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Global positioning (in relation to the window) */
|
|
30
|
+
/*** Default (end-start) */
|
|
31
|
+
inset-block: auto var(--size-3);
|
|
32
|
+
inset-inline: 50% 0;
|
|
33
|
+
translate: -50% 0;
|
|
34
|
+
|
|
35
|
+
&.start-start,
|
|
36
|
+
&.start-center,
|
|
37
|
+
&.start-end {
|
|
38
|
+
inset-block: var(--size-3) auto;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* TODO use @custom-media instead? */
|
|
42
|
+
@container (width > 480px) {
|
|
43
|
+
/* Default (end-start) */
|
|
44
|
+
inset-block: auto var(--size-7, 2rem);
|
|
45
|
+
inset-inline: var(--size-7, 2rem) auto;
|
|
46
|
+
translate: revert;
|
|
47
|
+
inline-size: fit-content;
|
|
48
|
+
|
|
49
|
+
&.end-start,
|
|
50
|
+
&.end-end,
|
|
51
|
+
&.start-start,
|
|
52
|
+
&.start-end {
|
|
53
|
+
translate: revert;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&.start-start {
|
|
57
|
+
inset-block: var(--size-7, 2rem) auto;
|
|
58
|
+
inset-inline: var(--size-7, 2rem) auto;
|
|
59
|
+
}
|
|
60
|
+
&.start-center {
|
|
61
|
+
inset-block: var(--size-7, 2rem) auto;
|
|
62
|
+
inset-inline: 50% 0;
|
|
63
|
+
translate: -50% 0;
|
|
64
|
+
}
|
|
65
|
+
&.start-end {
|
|
66
|
+
inset-block: var(--size-7, 2rem) auto;
|
|
67
|
+
inset-inline: auto var(--size-7, 2rem);
|
|
68
|
+
}
|
|
69
|
+
&.end-start {
|
|
70
|
+
inset-block-end: var(--size-7, 2rem);
|
|
71
|
+
inset-inline: var(--size-7, 2rem) auto;
|
|
72
|
+
}
|
|
73
|
+
&.end-center {
|
|
74
|
+
inset-block: auto var(--size-7, 2rem);
|
|
75
|
+
inset-inline: 50% 0;
|
|
76
|
+
translate: -50% 0;
|
|
77
|
+
}
|
|
78
|
+
&.end-end {
|
|
79
|
+
inset-block: auto var(--size-7, 2rem);
|
|
80
|
+
inset-inline: auto var(--size-7, 2rem);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Absolute positioning */
|
|
85
|
+
&.absolute {
|
|
86
|
+
position: absolute;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Actions */
|
|
90
|
+
.actions {
|
|
91
|
+
align-items: center;
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-shrink: 0;
|
|
94
|
+
gap: var(--size-3);
|
|
95
|
+
padding-inline: 0;
|
|
96
|
+
|
|
97
|
+
button {
|
|
98
|
+
/* Inverse hover and active backgrounds */
|
|
99
|
+
&:where(:not([disabled])) {
|
|
100
|
+
&:where(:not(:active):hover) {
|
|
101
|
+
--_bg-color: light-dark(
|
|
102
|
+
color-mix(in oklch, white 40%, black),
|
|
103
|
+
color-mix(in oklch, white 85%, black)
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&:where(:hover:active) {
|
|
108
|
+
--_bg-color: light-dark(
|
|
109
|
+
color-mix(in oklch, white 45%, black),
|
|
110
|
+
color-mix(in oklch, white 80%, black)
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
button:not(:has(svg)) {
|
|
117
|
+
border-radius: var(--border-radius);
|
|
118
|
+
font-size: inherit;
|
|
119
|
+
max-block-size: var(--size-6, 1.5rem);
|
|
120
|
+
padding: 1ex;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
button:has(svg) {
|
|
124
|
+
color: inherit;
|
|
125
|
+
max-inline-size: var(--size-6, 1.75rem);
|
|
126
|
+
margin: var(--size-00);
|
|
127
|
+
padding: var(--size-1);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Animations */
|
|
132
|
+
opacity: 0;
|
|
133
|
+
transition: display 0.075s allow-discrete, overlay 0.075s allow-discrete,
|
|
134
|
+
opacity 0.075s var(--ease-out-1);
|
|
135
|
+
|
|
136
|
+
&:popover-open,
|
|
137
|
+
&:popover-open::backdrop,
|
|
138
|
+
&.visible {
|
|
139
|
+
opacity: 1;
|
|
140
|
+
transition: display 0.25s allow-discrete, overlay 0.25s allow-discrete,
|
|
141
|
+
opacity 0.25s var(--ease-out-1);
|
|
142
|
+
|
|
143
|
+
@starting-style {
|
|
144
|
+
opacity: 0;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|