opui-css 2.3.0 → 2.4.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/README.md +7 -23
- package/dist/{theme-one+op.css → op+ui.css} +20 -167
- package/dist/{theme-one.css → ui.css} +12 -168
- package/package.json +4 -6
- package/src/{themes/theme-one/components → components}/toggle-button-group.css +5 -1
- package/src/core/components.css +37 -0
- package/src/main.css +13 -0
- package/src/opui.css +10 -0
- package/src/{themes/theme-one/setup.css → theme.css} +1 -1
- package/dist/theme-two+op.css +0 -4021
- package/dist/theme-two.css +0 -3975
- package/src/themes/theme-one/components/table.css +0 -100
- package/src/themes/theme-one/components.css +0 -37
- package/src/themes/theme-one/theme+op.css +0 -5
- package/src/themes/theme-one/theme.css +0 -13
- package/src/themes/theme-two/components/accordion.css +0 -172
- package/src/themes/theme-two/components/alert.css +0 -85
- package/src/themes/theme-two/components/avatar.css +0 -68
- package/src/themes/theme-two/components/badge.css +0 -101
- package/src/themes/theme-two/components/button-group.css +0 -50
- package/src/themes/theme-two/components/button.css +0 -217
- package/src/themes/theme-two/components/card.css +0 -82
- package/src/themes/theme-two/components/checkbox-radio.css +0 -123
- package/src/themes/theme-two/components/chip.css +0 -135
- package/src/themes/theme-two/components/definition-list.css +0 -65
- package/src/themes/theme-two/components/dialog.css +0 -59
- package/src/themes/theme-two/components/divider.css +0 -7
- package/src/themes/theme-two/components/field-group.css +0 -83
- package/src/themes/theme-two/components/field.css +0 -281
- package/src/themes/theme-two/components/icon-button.css +0 -40
- package/src/themes/theme-two/components/link.css +0 -21
- package/src/themes/theme-two/components/list.css +0 -317
- package/src/themes/theme-two/components/progress.css +0 -83
- package/src/themes/theme-two/components/range.css +0 -121
- package/src/themes/theme-two/components/rich-text.css +0 -210
- package/src/themes/theme-two/components/select.css +0 -162
- package/src/themes/theme-two/components/snackbar.css +0 -148
- package/src/themes/theme-two/components/spinner.css +0 -38
- package/src/themes/theme-two/components/switch.css +0 -189
- package/src/themes/theme-two/components/tab-buttons.css +0 -120
- package/src/themes/theme-two/components/text-field.css +0 -57
- package/src/themes/theme-two/components/textarea.css +0 -25
- package/src/themes/theme-two/components/toggle-button-group.css +0 -135
- package/src/themes/theme-two/components/tooltip.css +0 -94
- package/src/themes/theme-two/components/typography.css +0 -209
- package/src/themes/theme-two/components.css +0 -37
- package/src/themes/theme-two/setup.css +0 -158
- package/src/themes/theme-two/theme+op.css +0 -5
- package/src/themes/theme-two/theme.css +0 -13
- /package/src/{themes/theme-one/components → components}/accordion.css +0 -0
- /package/src/{themes/theme-one/components → components}/alert.css +0 -0
- /package/src/{themes/theme-one/components → components}/avatar.css +0 -0
- /package/src/{themes/theme-one/components → components}/badge.css +0 -0
- /package/src/{themes/theme-one/components → components}/button-group.css +0 -0
- /package/src/{themes/theme-one/components → components}/button.css +0 -0
- /package/src/{themes/theme-one/components → components}/card.css +0 -0
- /package/src/{themes/theme-one/components → components}/checkbox-radio.css +0 -0
- /package/src/{themes/theme-one/components → components}/chip.css +0 -0
- /package/src/{themes/theme-one/components → components}/definition-list.css +0 -0
- /package/src/{themes/theme-one/components → components}/dialog.css +0 -0
- /package/src/{themes/theme-one/components → components}/divider.css +0 -0
- /package/src/{themes/theme-one/components → components}/field-group.css +0 -0
- /package/src/{themes/theme-one/components → components}/field.css +0 -0
- /package/src/{themes/theme-one/components → components}/icon-button.css +0 -0
- /package/src/{themes/theme-one/components → components}/link.css +0 -0
- /package/src/{themes/theme-one/components → components}/list.css +0 -0
- /package/src/{themes/theme-one/components → components}/progress.css +0 -0
- /package/src/{themes/theme-one/components → components}/range.css +0 -0
- /package/src/{themes/theme-one/components → components}/rich-text.css +0 -0
- /package/src/{themes/theme-one/components → components}/select.css +0 -0
- /package/src/{themes/theme-one/components → components}/snackbar.css +0 -0
- /package/src/{themes/theme-one/components → components}/spinner.css +0 -0
- /package/src/{themes/theme-one/components → components}/switch.css +0 -0
- /package/src/{themes/theme-one/components → components}/tab-buttons.css +0 -0
- /package/src/{themes/theme-two/components → components}/table.css +0 -0
- /package/src/{themes/theme-one/components → components}/text-field.css +0 -0
- /package/src/{themes/theme-one/components → components}/textarea.css +0 -0
- /package/src/{themes/theme-one/components → components}/tooltip.css +0 -0
- /package/src/{themes/theme-one/components → components}/typography.css +0 -0
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
@layer components.root {
|
|
2
|
-
:where(table) {
|
|
3
|
-
border-collapse: collapse;
|
|
4
|
-
display: block;
|
|
5
|
-
margin: var(--size-3) 0;
|
|
6
|
-
max-inline-size: 100%;
|
|
7
|
-
position: relative;
|
|
8
|
-
|
|
9
|
-
/* Rows */
|
|
10
|
-
tr {
|
|
11
|
-
background-color: var(--surface-default);
|
|
12
|
-
border-top: 1px solid var(--border-color);
|
|
13
|
-
|
|
14
|
-
&:hover {
|
|
15
|
-
background-color: oklch(from var(--surface-filled) l c h / 75%);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/* Cells */
|
|
20
|
-
th,
|
|
21
|
-
td {
|
|
22
|
-
border: 1px solid var(--border-color);
|
|
23
|
-
padding: var(--size-1) var(--size-2);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
th {
|
|
27
|
-
background-color: var(--surface-filled);
|
|
28
|
-
color: var(--text-color-1);
|
|
29
|
-
font-size: var(--font-size-sm, 0.75rem);
|
|
30
|
-
font-weight: 600;
|
|
31
|
-
text-align: start;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
td {
|
|
35
|
-
font-size: var(--font-size-sm, 0.75rem);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/* Caption */
|
|
39
|
-
caption {
|
|
40
|
-
caption-side: bottom;
|
|
41
|
-
color: var(--text-color-2);
|
|
42
|
-
font-size: var(--font-size-sm, 0.75rem);
|
|
43
|
-
padding: var(--size-2) 0;
|
|
44
|
-
text-align: start;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/* Footer */
|
|
48
|
-
tfoot {
|
|
49
|
-
border-top: 2px solid var(--border-color);
|
|
50
|
-
|
|
51
|
-
tr {
|
|
52
|
-
background-color: var(--surface-filled);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
td {
|
|
56
|
-
color: var(--text-color-1);
|
|
57
|
-
font-weight: 600;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/* Column group */
|
|
62
|
-
colgroup col {
|
|
63
|
-
border: none;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@container (width < 60ch) {
|
|
67
|
-
th,
|
|
68
|
-
td {
|
|
69
|
-
padding: var(--size-1) 0.875rem;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/* Sticky header */
|
|
74
|
-
&.sticky-header thead {
|
|
75
|
-
background-color: var(--surface-filled);
|
|
76
|
-
position: sticky;
|
|
77
|
-
inset-block-start: 0;
|
|
78
|
-
z-index: 1;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/* Dense */
|
|
82
|
-
&.dense {
|
|
83
|
-
th,
|
|
84
|
-
td {
|
|
85
|
-
padding: var(--size-1) var(--size-2);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
caption {
|
|
89
|
-
padding: var(--size-1) 0;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@container (width < 60ch) {
|
|
93
|
-
th,
|
|
94
|
-
td {
|
|
95
|
-
padding: var(--size-1) var(--size-2);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Components are divided into two categories - if they are stand-alone (root) or if they are built on top of others (extended).
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/*** Root components (no dependencies) */
|
|
6
|
-
@import "./components/button.css";
|
|
7
|
-
@import "./components/icon-button.css";
|
|
8
|
-
@import "./components/tab-buttons.css";
|
|
9
|
-
@import "./components/toggle-button-group.css";
|
|
10
|
-
@import "./components/avatar.css";
|
|
11
|
-
@import "./components/badge.css";
|
|
12
|
-
@import "./components/card.css";
|
|
13
|
-
@import "./components/chip.css";
|
|
14
|
-
@import "./components/definition-list.css";
|
|
15
|
-
@import "./components/divider.css";
|
|
16
|
-
@import "./components/link.css";
|
|
17
|
-
@import "./components/table.css";
|
|
18
|
-
@import "./components/progress.css";
|
|
19
|
-
@import "./components/spinner.css";
|
|
20
|
-
@import "./components/checkbox-radio.css";
|
|
21
|
-
@import "./components/switch.css";
|
|
22
|
-
@import "./components/range.css";
|
|
23
|
-
@import "./components/typography.css";
|
|
24
|
-
|
|
25
|
-
/*** Extended components (has dependencies) */
|
|
26
|
-
@import "./components/button-group.css";
|
|
27
|
-
@import "./components/accordion.css";
|
|
28
|
-
@import "./components/list.css";
|
|
29
|
-
@import "./components/alert.css";
|
|
30
|
-
@import "./components/dialog.css";
|
|
31
|
-
@import "./components/snackbar.css";
|
|
32
|
-
@import "./components/field-group.css";
|
|
33
|
-
@import "./components/field.css";
|
|
34
|
-
@import "./components/select.css";
|
|
35
|
-
@import "./components/text-field.css";
|
|
36
|
-
@import "./components/textarea.css";
|
|
37
|
-
@import "./components/rich-text.css";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
@layer openprops, normalize, utils, theme, components.root, components.extended;
|
|
2
|
-
|
|
3
|
-
/* Normalize */
|
|
4
|
-
@import "../../core/normalize.css";
|
|
5
|
-
|
|
6
|
-
/* Utils */
|
|
7
|
-
@import "../../core/utils.css";
|
|
8
|
-
|
|
9
|
-
/* Components */
|
|
10
|
-
@import "./components.css";
|
|
11
|
-
|
|
12
|
-
/* Setup */
|
|
13
|
-
@import "./setup.css";
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
@layer components.extended {
|
|
2
|
-
:where(details) {
|
|
3
|
-
--_accordion-transition-time: 0.2s;
|
|
4
|
-
--_bg-color: transparent;
|
|
5
|
-
--_margin-inline: var(--size-1);
|
|
6
|
-
--_shadow: none;
|
|
7
|
-
|
|
8
|
-
background-color: var(--_bg-color);
|
|
9
|
-
box-shadow: var(--_shadow);
|
|
10
|
-
border-radius: var(--border-radius, 4px);
|
|
11
|
-
display: block;
|
|
12
|
-
margin-inline: var(--_margin-inline);
|
|
13
|
-
transition: all var(--_accordion-transition-time) ease-out;
|
|
14
|
-
|
|
15
|
-
/* Accordion animation */
|
|
16
|
-
/* https://nerdy.dev/open-and-close-transitions-for-the-details-element */
|
|
17
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
18
|
-
interpolate-size: allow-keywords;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&::details-content {
|
|
22
|
-
block-size: 0;
|
|
23
|
-
opacity: 0;
|
|
24
|
-
overflow-y: clip;
|
|
25
|
-
transition: content-visibility var(--_accordion-transition-time)
|
|
26
|
-
allow-discrete,
|
|
27
|
-
opacity var(--_accordion-transition-time),
|
|
28
|
-
block-size var(--_accordion-transition-time);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&[open]::details-content {
|
|
32
|
-
block-size: auto;
|
|
33
|
-
opacity: 1;
|
|
34
|
-
}
|
|
35
|
-
/***/
|
|
36
|
-
|
|
37
|
-
& > summary {
|
|
38
|
-
background-color: inherit;
|
|
39
|
-
cursor: pointer;
|
|
40
|
-
font-weight: 700;
|
|
41
|
-
padding-block: var(--size-3);
|
|
42
|
-
user-select: none;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* Custom arrow */
|
|
46
|
-
/* summary {
|
|
47
|
-
align-items: center;
|
|
48
|
-
background-color: inherit;
|
|
49
|
-
cursor: pointer;
|
|
50
|
-
display: flex;
|
|
51
|
-
justify-content: space-between;
|
|
52
|
-
list-style: none;
|
|
53
|
-
padding-block: var(--size-3);
|
|
54
|
-
user-select: none;
|
|
55
|
-
|
|
56
|
-
&::marker,
|
|
57
|
-
&::-webkit-details-marker {
|
|
58
|
-
display: none;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
svg {
|
|
62
|
-
transition: rotate 0.2s ease-out;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
&[open] > summary svg {
|
|
67
|
-
rotate: 180deg;
|
|
68
|
-
} */
|
|
69
|
-
|
|
70
|
-
& > .content {
|
|
71
|
-
margin-block-start: 0;
|
|
72
|
-
padding-block: var(--size-2) var(--size-3);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
& > .actions {
|
|
76
|
-
display: flex;
|
|
77
|
-
gap: var(--size-1);
|
|
78
|
-
justify-content: end;
|
|
79
|
-
margin-block-start: var(--size-3);
|
|
80
|
-
padding-block-end: var(--size-1);
|
|
81
|
-
padding-inline: var(--size-3) var(--size-1);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/* Variants */
|
|
85
|
-
&.card,
|
|
86
|
-
&.text {
|
|
87
|
-
--_bg-color: transparent;
|
|
88
|
-
--_margin-inline: var(--size-1);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&.elevated {
|
|
92
|
-
--_bg-color: var(--surface-elevated);
|
|
93
|
-
--_margin-inline: 0;
|
|
94
|
-
--_shadow: var(--shadow-2);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
&.outlined {
|
|
98
|
-
--_bg-color: var(--surface-default);
|
|
99
|
-
--_margin-inline: 0;
|
|
100
|
-
border: 1px solid var(--border-color);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
&.tonal {
|
|
104
|
-
--_bg-color: var(--surface-tonal);
|
|
105
|
-
--_margin-inline: 0;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
&:where(.elevated, .outlined, .tonal) > * {
|
|
109
|
-
padding-inline: var(--size-3);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/* Accordion group */
|
|
114
|
-
:where(.card:has(details)) {
|
|
115
|
-
--_gutter-color: var(--border-color);
|
|
116
|
-
|
|
117
|
-
display: block;
|
|
118
|
-
|
|
119
|
-
& > .content {
|
|
120
|
-
margin-block: 0;
|
|
121
|
-
padding: 0;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
&.card,
|
|
125
|
-
&.text {
|
|
126
|
-
&:not(.tonal, .outlined, .elevated) {
|
|
127
|
-
summary {
|
|
128
|
-
padding-inline: 0;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
details {
|
|
134
|
-
--_margin-inline: 0;
|
|
135
|
-
|
|
136
|
-
border: 0;
|
|
137
|
-
box-shadow: none;
|
|
138
|
-
|
|
139
|
-
& > * {
|
|
140
|
-
padding-inline: var(--size-3);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/* Border between accordion items */
|
|
144
|
-
& + & {
|
|
145
|
-
summary {
|
|
146
|
-
border-radius: 0;
|
|
147
|
-
border-block-start: 1px solid var(--_gutter-color);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/* First item */
|
|
152
|
-
&:first-of-type {
|
|
153
|
-
border-start-start-radius: var(--border-radius, 0.25rem);
|
|
154
|
-
border-start-end-radius: var(--border-radius, 0.25rem);
|
|
155
|
-
summary {
|
|
156
|
-
border-start-start-radius: var(--border-radius, 0.25rem);
|
|
157
|
-
border-start-end-radius: var(--border-radius, 0.25rem);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/* Last item */
|
|
162
|
-
&:last-of-type {
|
|
163
|
-
border-end-start-radius: var(--border-radius, 0.25rem);
|
|
164
|
-
border-end-end-radius: var(--border-radius, 0.25rem);
|
|
165
|
-
summary {
|
|
166
|
-
border-end-start-radius: var(--border-radius, 0.25rem);
|
|
167
|
-
border-end-end-radius: var(--border-radius, 0.25rem);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
@layer components.extended {
|
|
2
|
-
:where(.alert) {
|
|
3
|
-
--_bg-color: var(--surface-tonal);
|
|
4
|
-
--_border-color: var(--surface-tonal);
|
|
5
|
-
--_color: var(--text-color-1);
|
|
6
|
-
|
|
7
|
-
&.outlined {
|
|
8
|
-
--_bg-color: var(--surface-default);
|
|
9
|
-
--_border-color: var(--border-color);
|
|
10
|
-
--_color: var(--text-color-1);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
background-color: var(--_bg-color);
|
|
14
|
-
border: 1px solid var(--_border-color);
|
|
15
|
-
border-radius: var(--border-radius);
|
|
16
|
-
color: var(--_color);
|
|
17
|
-
padding: var(--size-3);
|
|
18
|
-
|
|
19
|
-
& > .content {
|
|
20
|
-
display: grid;
|
|
21
|
-
gap: var(--size-2);
|
|
22
|
-
font-size: var(--font-size-sm);
|
|
23
|
-
|
|
24
|
-
h1,
|
|
25
|
-
h2,
|
|
26
|
-
h3,
|
|
27
|
-
h4,
|
|
28
|
-
h5,
|
|
29
|
-
h6 {
|
|
30
|
-
color: inherit;
|
|
31
|
-
font-size: var(--font-size-md);
|
|
32
|
-
font-weight: 600;
|
|
33
|
-
|
|
34
|
-
* {
|
|
35
|
-
font-size: inherit;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/* Colors */
|
|
41
|
-
&.error,
|
|
42
|
-
&.ok,
|
|
43
|
-
&.warning {
|
|
44
|
-
--_bg-color: var(--color-4);
|
|
45
|
-
--_border-color: var(--color-9);
|
|
46
|
-
--_color: var(--color-15);
|
|
47
|
-
|
|
48
|
-
&.outlined {
|
|
49
|
-
--_bg-color: var(--surface-default);
|
|
50
|
-
--_border-color: var(--color-9);
|
|
51
|
-
--_color: light-dark(var(--color-15), var(--color-1));
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
svg {
|
|
55
|
-
margin-block-start: 0.15rem;
|
|
56
|
-
stroke: var(--color-9);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/* Links
|
|
61
|
-
* Can't make sure contrast will be acceptable (yet) so we use the current text color instead.
|
|
62
|
-
*/
|
|
63
|
-
&:not(.outlined) {
|
|
64
|
-
a[href] {
|
|
65
|
-
color: inherit;
|
|
66
|
-
|
|
67
|
-
&:hover {
|
|
68
|
-
color: var(--primary);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/* Icon */
|
|
74
|
-
&:has(svg) {
|
|
75
|
-
display: grid;
|
|
76
|
-
gap: var(--size-3);
|
|
77
|
-
grid-template-columns: var(--size-4) 1fr;
|
|
78
|
-
|
|
79
|
-
svg {
|
|
80
|
-
margin-block-start: 0.15rem;
|
|
81
|
-
stroke: currentColor;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
@layer components.root {
|
|
2
|
-
:where(.avatar) {
|
|
3
|
-
--_bg-color: var(--color-8);
|
|
4
|
-
--_color: var(--text-color-1);
|
|
5
|
-
--_width: 40px;
|
|
6
|
-
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: var(--_bg-color);
|
|
9
|
-
color: var(--_color);
|
|
10
|
-
aspect-ratio: 1;
|
|
11
|
-
border-radius: 100vmax;
|
|
12
|
-
display: inline-flex;
|
|
13
|
-
inline-size: var(--_width);
|
|
14
|
-
justify-content: center;
|
|
15
|
-
overflow: clip;
|
|
16
|
-
position: relative;
|
|
17
|
-
text-align: center;
|
|
18
|
-
text-decoration: none;
|
|
19
|
-
|
|
20
|
-
&:has(img) {
|
|
21
|
-
background-color: transparent;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
svg {
|
|
25
|
-
max-inline-size: var(--size-5);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
img {
|
|
29
|
-
block-size: 100%;
|
|
30
|
-
inline-size: 100%;
|
|
31
|
-
inset: 0;
|
|
32
|
-
object-fit: cover;
|
|
33
|
-
position: absolute;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&.squared {
|
|
37
|
-
border-radius: 0;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&.rounded {
|
|
41
|
-
border-radius: var(--border-size-3);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/*
|
|
46
|
-
TODO: implement reading-order if that becomes a thing.
|
|
47
|
-
https://developer.chrome.com/blog/reading-order/
|
|
48
|
-
*/
|
|
49
|
-
:where(.avatar-group) {
|
|
50
|
-
--_margin: var(--size-1);
|
|
51
|
-
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: row-reverse;
|
|
54
|
-
|
|
55
|
-
&.gap-small {
|
|
56
|
-
--_margin: var(--size-2);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&.gap-x-small {
|
|
60
|
-
--_margin: var(--size-3);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.avatar {
|
|
64
|
-
margin-inline-end: calc(-1 * var(--_margin));
|
|
65
|
-
outline: 2px solid var(--surface-default);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
@layer components.root {
|
|
2
|
-
:where(.badge) {
|
|
3
|
-
--_bg-color: var(--primary);
|
|
4
|
-
--_border-color: var(--primary);
|
|
5
|
-
--_color: var(--gray-1);
|
|
6
|
-
--_inset-offset: 16px;
|
|
7
|
-
--_inset: auto auto calc(100% - var(--_inset-offset))
|
|
8
|
-
calc(100% - var(--_inset-offset));
|
|
9
|
-
--_translate: 0;
|
|
10
|
-
|
|
11
|
-
display: inline-flex;
|
|
12
|
-
position: relative;
|
|
13
|
-
|
|
14
|
-
&::after {
|
|
15
|
-
background-color: var(--_bg-color);
|
|
16
|
-
border: 2px solid var(--_border-color);
|
|
17
|
-
border-radius: 100vmax;
|
|
18
|
-
color: var(--_color);
|
|
19
|
-
content: attr(aria-label);
|
|
20
|
-
font-size: 12px;
|
|
21
|
-
font-weight: 500;
|
|
22
|
-
block-size: var(--size-4);
|
|
23
|
-
line-height: normal;
|
|
24
|
-
min-inline-size: var(--size-4, 1.125rem);
|
|
25
|
-
padding-inline: var(--size-1);
|
|
26
|
-
inset: var(--_inset);
|
|
27
|
-
position: absolute;
|
|
28
|
-
text-align: center;
|
|
29
|
-
translate: var(--_translate);
|
|
30
|
-
transition: opacity 0.2s var(--ease-out-1);
|
|
31
|
-
inline-size: max-content;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/* Alignment */
|
|
35
|
-
&.start-start {
|
|
36
|
-
--_inset: auto calc(100% - var(--_inset-offset))
|
|
37
|
-
calc(100% - var(--_inset-offset)) auto;
|
|
38
|
-
}
|
|
39
|
-
&.start-end {
|
|
40
|
-
--_inset: auto auto calc(100% - var(--_inset-offset))
|
|
41
|
-
calc(100% - var(--_inset-offset));
|
|
42
|
-
}
|
|
43
|
-
&.end-start {
|
|
44
|
-
--_inset: calc(100% - var(--_inset-offset))
|
|
45
|
-
calc(100% - var(--_inset-offset)) auto auto;
|
|
46
|
-
}
|
|
47
|
-
&.end-end {
|
|
48
|
-
--_inset: calc(100% - var(--_inset-offset)) auto auto
|
|
49
|
-
calc(100% - var(--_inset-offset));
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/* Dot */
|
|
53
|
-
&.dot {
|
|
54
|
-
--_inset: 0 -1px auto auto;
|
|
55
|
-
&::after {
|
|
56
|
-
content: "";
|
|
57
|
-
min-inline-size: var(--size-2);
|
|
58
|
-
block-size: var(--size-2);
|
|
59
|
-
inline-size: var(--size-2);
|
|
60
|
-
padding: 0;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/* Visibility */
|
|
65
|
-
&.invisible {
|
|
66
|
-
&::after {
|
|
67
|
-
opacity: 0;
|
|
68
|
-
pointer-events: none;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/* Colors */
|
|
73
|
-
&.error,
|
|
74
|
-
&.good,
|
|
75
|
-
&.ok,
|
|
76
|
-
&.warning {
|
|
77
|
-
--_bg-color: var(--color-8);
|
|
78
|
-
--_border-color: var(--color-8);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
[dir="rtl"] {
|
|
83
|
-
:where(.badge) {
|
|
84
|
-
--_inset: auto calc(100% - 16px) calc(100% - 16px) auto;
|
|
85
|
-
|
|
86
|
-
/* Alignment */
|
|
87
|
-
&.start-start {
|
|
88
|
-
--_inset: auto auto calc(100% - 16px) calc(100% - 16px);
|
|
89
|
-
}
|
|
90
|
-
&.start-end {
|
|
91
|
-
--_inset: auto calc(100% - 16px) calc(100% - 16px) auto;
|
|
92
|
-
}
|
|
93
|
-
&.end-start {
|
|
94
|
-
--_inset: calc(100% - 16px) auto auto calc(100% - 16px);
|
|
95
|
-
}
|
|
96
|
-
&.end-end {
|
|
97
|
-
--_inset: calc(100% - 16px) calc(100% - 16px) auto auto;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
@layer components.extended {
|
|
2
|
-
:where([role="group"].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
|
-
border-radius: 0;
|
|
11
|
-
|
|
12
|
-
svg {
|
|
13
|
-
max-inline-size: 0.7lh;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&:focus-visible {
|
|
17
|
-
outline-offset: -4px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
& + & {
|
|
21
|
-
border-inline-width: 1px;
|
|
22
|
-
margin-inline-start: -1px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&:first-of-type {
|
|
26
|
-
border-bottom-left-radius: var(--_border-radius);
|
|
27
|
-
border-top-left-radius: var(--_border-radius);
|
|
28
|
-
}
|
|
29
|
-
&:last-of-type {
|
|
30
|
-
border-bottom-right-radius: var(--_border-radius);
|
|
31
|
-
border-top-right-radius: var(--_border-radius);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/* Variants */
|
|
35
|
-
&:where(.tonal, .filled) {
|
|
36
|
-
& + button {
|
|
37
|
-
border-inline-start-color: var(--color-7);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
& + &[disabled] {
|
|
41
|
-
border-inline-start-color: color-mix(
|
|
42
|
-
in oklch,
|
|
43
|
-
var(--border-color) 90%,
|
|
44
|
-
white
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|