gbs-add-block 2.0.4 → 2.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/.gbs/skills/gbs-components/references/styling.md +21 -15
- package/README.md +22 -7
- package/package.json +1 -1
- package/source/beta-components/accordion/styles.css +5 -5
- package/source/beta-components/alert/styles.css +4 -4
- package/source/beta-components/avatar/styles.css +226 -227
- package/source/beta-components/badge/styles.css +7 -7
- package/source/beta-components/breadcrumb/styles.css +5 -4
- package/source/beta-components/button/styles.css +5 -4
- package/source/beta-components/card/styles.css +5 -4
- package/source/beta-components/checkbox/styles.css +5 -4
- package/source/beta-components/combobox/styles.css +4 -4
- package/source/beta-components/data-grid/styles.css +7 -8
- package/source/beta-components/date-picker/styles.css +4 -4
- package/source/beta-components/dialog/styles.css +5 -4
- package/source/beta-components/file-uploader/styles.css +5 -4
- package/source/beta-components/input/styles.css +5 -4
- package/source/beta-components/menu/styles.css +5 -4
- package/source/beta-components/modal/styles.css +5 -4
- package/source/beta-components/number-input/styles.css +5 -5
- package/source/beta-components/popover/styles.css +5 -4
- package/source/beta-components/progress/styles.css +1 -2
- package/source/beta-components/radio-group/styles.css +270 -270
- package/source/beta-components/skeleton/styles.css +5 -4
- package/source/beta-components/spinner/styles.css +174 -174
- package/source/beta-components/switch/styles.css +229 -229
- package/source/beta-components/tabs/styles.css +264 -264
- package/source/beta-components/textarea/styles.css +5 -4
- package/source/beta-components/toaster/styles.css +1 -2
- package/source/beta-components/tooltip/styles.css +5 -4
|
@@ -1,264 +1,264 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Tabs styles.
|
|
3
|
-
*
|
|
4
|
-
* Tokens read the shared --gbs-* variables when they are set on an ancestor
|
|
5
|
-
* (set them on :root to theme every component at once) and fall back to the
|
|
6
|
-
* same default palette otherwise. Rules live in the `
|
|
7
|
-
*
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@layer
|
|
12
|
-
.tb-root {
|
|
13
|
-
--tb-bg: var(--gbs-bg, var(--dg-bg, light-dark(#ffffff, #0b0b0e)));
|
|
14
|
-
--tb-fg: var(--gbs-fg, var(--dg-fg, light-dark(#18181b, #f4f4f5)));
|
|
15
|
-
--tb-muted: var(--gbs-muted, var(--dg-muted, light-dark(#71717a, #a1a1aa)));
|
|
16
|
-
/*
|
|
17
|
-
* Unselected tabs are darker than ordinary muted text. A tab is a control,
|
|
18
|
-
* not a hint, and the strip usually sits on the page's own background
|
|
19
|
-
* rather than on a white card — where the shared muted grey only just
|
|
20
|
-
* clears 4.5:1, and misses it on anything tinted.
|
|
21
|
-
*/
|
|
22
|
-
--tb-tab-fg: var(--gbs-tab-fg, light-dark(#5b5b64, #a1a1aa));
|
|
23
|
-
--tb-border: var(--gbs-border, var(--dg-border, light-dark(#e4e4e7, #27272a)));
|
|
24
|
-
--tb-hover: var(--gbs-hover, var(--dg-hover, light-dark(#f4f4f5, #1f1f23)));
|
|
25
|
-
--tb-track: var(--gbs-subtle, light-dark(#f4f4f5, #18181b));
|
|
26
|
-
--tb-accent: var(--gbs-accent, var(--dg-accent, light-dark(#2563eb, #60a5fa)));
|
|
27
|
-
--tb-accent-soft: var(--gbs-accent-soft, var(--dg-accent-soft, light-dark(#eff6ff, #172554)));
|
|
28
|
-
--tb-focus: var(--gbs-focus, var(--dg-focus, light-dark(#2563eb, #60a5fa)));
|
|
29
|
-
--tb-radius: var(--gbs-radius, var(--dg-radius, 8px));
|
|
30
|
-
--tb-font-size: var(--gbs-font-size, var(--dg-font-size, 13px));
|
|
31
|
-
--tb-height: 36px;
|
|
32
|
-
--tb-px: 12px;
|
|
33
|
-
--tb-duration: 200ms;
|
|
34
|
-
|
|
35
|
-
color-scheme: inherit;
|
|
36
|
-
display: flex;
|
|
37
|
-
flex-direction: column;
|
|
38
|
-
gap: 12px;
|
|
39
|
-
min-width: 0;
|
|
40
|
-
font-size: var(--tb-font-size);
|
|
41
|
-
line-height: 1.4;
|
|
42
|
-
color: var(--tb-fg);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
:where(.dark, [data-theme="dark"]) .tb-root {
|
|
46
|
-
color-scheme: dark;
|
|
47
|
-
}
|
|
48
|
-
:where(.light, [data-theme="light"]) .tb-root {
|
|
49
|
-
color-scheme: light;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
:where(.tb-root) *,
|
|
53
|
-
:where(.tb-root) *::before,
|
|
54
|
-
:where(.tb-root) *::after {
|
|
55
|
-
box-sizing: border-box;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.tb-root[data-size="sm"] {
|
|
59
|
-
--tb-height: 30px;
|
|
60
|
-
--tb-px: 10px;
|
|
61
|
-
--tb-font-size: 12px;
|
|
62
|
-
}
|
|
63
|
-
.tb-root[data-size="lg"] {
|
|
64
|
-
--tb-height: 44px;
|
|
65
|
-
--tb-px: 16px;
|
|
66
|
-
--tb-font-size: 14px;
|
|
67
|
-
}
|
|
68
|
-
.tb-root[data-orientation="vertical"] {
|
|
69
|
-
flex-direction: row;
|
|
70
|
-
gap: 20px;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/* ---------------------------------------------------------------- list */
|
|
74
|
-
|
|
75
|
-
.tb-list {
|
|
76
|
-
position: relative;
|
|
77
|
-
display: flex;
|
|
78
|
-
flex: none;
|
|
79
|
-
gap: 2px;
|
|
80
|
-
overflow-x: auto;
|
|
81
|
-
scrollbar-width: none;
|
|
82
|
-
}
|
|
83
|
-
.tb-root[data-orientation="vertical"] .tb-list {
|
|
84
|
-
flex-direction: column;
|
|
85
|
-
overflow: visible;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.tb-tab {
|
|
89
|
-
position: relative;
|
|
90
|
-
z-index: 1;
|
|
91
|
-
display: inline-flex;
|
|
92
|
-
flex: none;
|
|
93
|
-
align-items: center;
|
|
94
|
-
justify-content: center;
|
|
95
|
-
gap: 6px;
|
|
96
|
-
height: var(--tb-height);
|
|
97
|
-
padding: 0 var(--tb-px);
|
|
98
|
-
border: 0;
|
|
99
|
-
border-radius: calc(var(--tb-radius) - 2px);
|
|
100
|
-
background: transparent;
|
|
101
|
-
color: var(--tb-tab-fg);
|
|
102
|
-
font: inherit;
|
|
103
|
-
font-weight: 500;
|
|
104
|
-
white-space: nowrap;
|
|
105
|
-
cursor: pointer;
|
|
106
|
-
transition: color 120ms ease;
|
|
107
|
-
}
|
|
108
|
-
.tb-root[data-orientation="vertical"] .tb-tab {
|
|
109
|
-
justify-content: flex-start;
|
|
110
|
-
}
|
|
111
|
-
.tb-tab:hover:not([aria-disabled="true"]),
|
|
112
|
-
.tb-tab[aria-selected="true"] {
|
|
113
|
-
color: var(--tb-fg);
|
|
114
|
-
}
|
|
115
|
-
.tb-tab:focus-visible {
|
|
116
|
-
outline: 2px solid var(--tb-focus);
|
|
117
|
-
outline-offset: -2px;
|
|
118
|
-
}
|
|
119
|
-
.tb-tab[aria-disabled="true"] {
|
|
120
|
-
opacity: 0.45;
|
|
121
|
-
cursor: not-allowed;
|
|
122
|
-
}
|
|
123
|
-
.tb-icon {
|
|
124
|
-
display: inline-flex;
|
|
125
|
-
}
|
|
126
|
-
.tb-icon > svg {
|
|
127
|
-
width: 1.1em;
|
|
128
|
-
height: 1.1em;
|
|
129
|
-
}
|
|
130
|
-
.tb-badge {
|
|
131
|
-
min-width: 18px;
|
|
132
|
-
padding: 1px 6px;
|
|
133
|
-
border-radius: 999px;
|
|
134
|
-
background: var(--tb-hover);
|
|
135
|
-
color: var(--tb-fg);
|
|
136
|
-
font-size: 0.85em;
|
|
137
|
-
font-variant-numeric: tabular-nums;
|
|
138
|
-
line-height: 1.4;
|
|
139
|
-
text-align: center;
|
|
140
|
-
}
|
|
141
|
-
.tb-tab[aria-selected="true"] .tb-badge {
|
|
142
|
-
background: var(--tb-accent-soft);
|
|
143
|
-
color: var(--tb-accent);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/* The indicator is measured in JS; it slides between tabs. */
|
|
147
|
-
.tb-indicator {
|
|
148
|
-
position: absolute;
|
|
149
|
-
z-index: 0;
|
|
150
|
-
pointer-events: none;
|
|
151
|
-
opacity: 0;
|
|
152
|
-
transition:
|
|
153
|
-
left var(--tb-duration) ease,
|
|
154
|
-
top var(--tb-duration) ease,
|
|
155
|
-
width var(--tb-duration) ease,
|
|
156
|
-
height var(--tb-duration) ease;
|
|
157
|
-
}
|
|
158
|
-
.tb-list[style*="--tb-indicator-size"] .tb-indicator {
|
|
159
|
-
opacity: 1;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/* ---------------------------------------------------------------- line */
|
|
163
|
-
|
|
164
|
-
.tb-root[data-variant="line"] .tb-list {
|
|
165
|
-
border-bottom: 1px solid var(--tb-border);
|
|
166
|
-
}
|
|
167
|
-
.tb-root[data-variant="line"] .tb-indicator {
|
|
168
|
-
bottom: -1px;
|
|
169
|
-
left: var(--tb-indicator-start);
|
|
170
|
-
width: var(--tb-indicator-size);
|
|
171
|
-
height: 2px;
|
|
172
|
-
border-radius: 2px;
|
|
173
|
-
background: var(--tb-accent);
|
|
174
|
-
}
|
|
175
|
-
.tb-root[data-variant="line"][data-orientation="vertical"] .tb-list {
|
|
176
|
-
border-bottom: 0;
|
|
177
|
-
border-inline-end: 1px solid var(--tb-border);
|
|
178
|
-
}
|
|
179
|
-
.tb-root[data-variant="line"][data-orientation="vertical"] .tb-indicator {
|
|
180
|
-
top: var(--tb-indicator-start);
|
|
181
|
-
bottom: auto;
|
|
182
|
-
left: auto;
|
|
183
|
-
inset-inline-end: -1px;
|
|
184
|
-
width: 2px;
|
|
185
|
-
height: var(--tb-indicator-size);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/* --------------------------------------------------------------- pills */
|
|
189
|
-
|
|
190
|
-
.tb-root[data-variant="pills"] .tb-indicator {
|
|
191
|
-
top: 0;
|
|
192
|
-
left: var(--tb-indicator-start);
|
|
193
|
-
width: var(--tb-indicator-size);
|
|
194
|
-
height: 100%;
|
|
195
|
-
border-radius: calc(var(--tb-radius) - 2px);
|
|
196
|
-
background: var(--tb-accent-soft);
|
|
197
|
-
}
|
|
198
|
-
.tb-root[data-variant="pills"] .tb-tab[aria-selected="true"] {
|
|
199
|
-
color: var(--tb-accent);
|
|
200
|
-
}
|
|
201
|
-
.tb-root[data-variant="pills"][data-orientation="vertical"] .tb-indicator {
|
|
202
|
-
top: var(--tb-indicator-start);
|
|
203
|
-
left: 0;
|
|
204
|
-
width: 100%;
|
|
205
|
-
height: var(--tb-indicator-size);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/* ------------------------------------------------------------ enclosed */
|
|
209
|
-
|
|
210
|
-
.tb-root[data-variant="enclosed"] .tb-list {
|
|
211
|
-
padding: 3px;
|
|
212
|
-
border-radius: var(--tb-radius);
|
|
213
|
-
background: var(--tb-track);
|
|
214
|
-
}
|
|
215
|
-
.tb-root[data-variant="enclosed"] .tb-indicator {
|
|
216
|
-
top: 3px;
|
|
217
|
-
bottom: 3px;
|
|
218
|
-
left: var(--tb-indicator-start);
|
|
219
|
-
width: var(--tb-indicator-size);
|
|
220
|
-
border-radius: calc(var(--tb-radius) - 2px);
|
|
221
|
-
background: var(--tb-bg);
|
|
222
|
-
box-shadow: 0 1px 3px light-dark(rgb(0 0 0 / 0.12), rgb(0 0 0 / 0.5));
|
|
223
|
-
}
|
|
224
|
-
.tb-root[data-variant="enclosed"] .tb-tab {
|
|
225
|
-
height: calc(var(--tb-height) - 6px);
|
|
226
|
-
}
|
|
227
|
-
.tb-root[data-variant="enclosed"][data-orientation="vertical"] .tb-indicator {
|
|
228
|
-
top: var(--tb-indicator-start);
|
|
229
|
-
bottom: auto;
|
|
230
|
-
left: 3px;
|
|
231
|
-
right: 3px;
|
|
232
|
-
width: auto;
|
|
233
|
-
height: var(--tb-indicator-size);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/* Before the indicator is measured (server render), mark the selected tab statically. */
|
|
237
|
-
.tb-root[data-variant="line"] .tb-list:not([style*="--tb-indicator-size"]) .tb-tab[aria-selected="true"] {
|
|
238
|
-
box-shadow: inset 0 -2px 0 var(--tb-accent);
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/* --------------------------------------------------------------- panel */
|
|
242
|
-
|
|
243
|
-
.tb-panel {
|
|
244
|
-
flex: 1 1 auto;
|
|
245
|
-
min-width: 0;
|
|
246
|
-
border-radius: 4px;
|
|
247
|
-
}
|
|
248
|
-
.tb-panel:focus-visible {
|
|
249
|
-
outline: 2px solid var(--tb-focus);
|
|
250
|
-
outline-offset: 4px;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
@media (prefers-reduced-motion: reduce) {
|
|
254
|
-
.tb-root {
|
|
255
|
-
--tb-duration: 0s;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
@media (forced-colors: active) {
|
|
260
|
-
.tb-indicator {
|
|
261
|
-
background: Highlight;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* Tabs styles.
|
|
3
|
+
*
|
|
4
|
+
* Tokens read the shared --gbs-* variables when they are set on an ancestor
|
|
5
|
+
* (set them on :root to theme every component at once) and fall back to the
|
|
6
|
+
* same default palette otherwise. Rules live in the `gbs` layer; declare
|
|
7
|
+
* where it sits in your global CSS, e.g. `@layer reset, gbs, app,
|
|
8
|
+
* utilities;`, and anything in a later layer overrides them.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
@layer gbs {
|
|
12
|
+
.tb-root {
|
|
13
|
+
--tb-bg: var(--gbs-bg, var(--dg-bg, light-dark(#ffffff, #0b0b0e)));
|
|
14
|
+
--tb-fg: var(--gbs-fg, var(--dg-fg, light-dark(#18181b, #f4f4f5)));
|
|
15
|
+
--tb-muted: var(--gbs-muted, var(--dg-muted, light-dark(#71717a, #a1a1aa)));
|
|
16
|
+
/*
|
|
17
|
+
* Unselected tabs are darker than ordinary muted text. A tab is a control,
|
|
18
|
+
* not a hint, and the strip usually sits on the page's own background
|
|
19
|
+
* rather than on a white card — where the shared muted grey only just
|
|
20
|
+
* clears 4.5:1, and misses it on anything tinted.
|
|
21
|
+
*/
|
|
22
|
+
--tb-tab-fg: var(--gbs-tab-fg, light-dark(#5b5b64, #a1a1aa));
|
|
23
|
+
--tb-border: var(--gbs-border, var(--dg-border, light-dark(#e4e4e7, #27272a)));
|
|
24
|
+
--tb-hover: var(--gbs-hover, var(--dg-hover, light-dark(#f4f4f5, #1f1f23)));
|
|
25
|
+
--tb-track: var(--gbs-subtle, light-dark(#f4f4f5, #18181b));
|
|
26
|
+
--tb-accent: var(--gbs-accent, var(--dg-accent, light-dark(#2563eb, #60a5fa)));
|
|
27
|
+
--tb-accent-soft: var(--gbs-accent-soft, var(--dg-accent-soft, light-dark(#eff6ff, #172554)));
|
|
28
|
+
--tb-focus: var(--gbs-focus, var(--dg-focus, light-dark(#2563eb, #60a5fa)));
|
|
29
|
+
--tb-radius: var(--gbs-radius, var(--dg-radius, 8px));
|
|
30
|
+
--tb-font-size: var(--gbs-font-size, var(--dg-font-size, 13px));
|
|
31
|
+
--tb-height: 36px;
|
|
32
|
+
--tb-px: 12px;
|
|
33
|
+
--tb-duration: 200ms;
|
|
34
|
+
|
|
35
|
+
color-scheme: inherit;
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
gap: 12px;
|
|
39
|
+
min-width: 0;
|
|
40
|
+
font-size: var(--tb-font-size);
|
|
41
|
+
line-height: 1.4;
|
|
42
|
+
color: var(--tb-fg);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:where(.dark, [data-theme="dark"]) .tb-root {
|
|
46
|
+
color-scheme: dark;
|
|
47
|
+
}
|
|
48
|
+
:where(.light, [data-theme="light"]) .tb-root {
|
|
49
|
+
color-scheme: light;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:where(.tb-root) *,
|
|
53
|
+
:where(.tb-root) *::before,
|
|
54
|
+
:where(.tb-root) *::after {
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.tb-root[data-size="sm"] {
|
|
59
|
+
--tb-height: 30px;
|
|
60
|
+
--tb-px: 10px;
|
|
61
|
+
--tb-font-size: 12px;
|
|
62
|
+
}
|
|
63
|
+
.tb-root[data-size="lg"] {
|
|
64
|
+
--tb-height: 44px;
|
|
65
|
+
--tb-px: 16px;
|
|
66
|
+
--tb-font-size: 14px;
|
|
67
|
+
}
|
|
68
|
+
.tb-root[data-orientation="vertical"] {
|
|
69
|
+
flex-direction: row;
|
|
70
|
+
gap: 20px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* ---------------------------------------------------------------- list */
|
|
74
|
+
|
|
75
|
+
.tb-list {
|
|
76
|
+
position: relative;
|
|
77
|
+
display: flex;
|
|
78
|
+
flex: none;
|
|
79
|
+
gap: 2px;
|
|
80
|
+
overflow-x: auto;
|
|
81
|
+
scrollbar-width: none;
|
|
82
|
+
}
|
|
83
|
+
.tb-root[data-orientation="vertical"] .tb-list {
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
overflow: visible;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.tb-tab {
|
|
89
|
+
position: relative;
|
|
90
|
+
z-index: 1;
|
|
91
|
+
display: inline-flex;
|
|
92
|
+
flex: none;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
gap: 6px;
|
|
96
|
+
height: var(--tb-height);
|
|
97
|
+
padding: 0 var(--tb-px);
|
|
98
|
+
border: 0;
|
|
99
|
+
border-radius: calc(var(--tb-radius) - 2px);
|
|
100
|
+
background: transparent;
|
|
101
|
+
color: var(--tb-tab-fg);
|
|
102
|
+
font: inherit;
|
|
103
|
+
font-weight: 500;
|
|
104
|
+
white-space: nowrap;
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
transition: color 120ms ease;
|
|
107
|
+
}
|
|
108
|
+
.tb-root[data-orientation="vertical"] .tb-tab {
|
|
109
|
+
justify-content: flex-start;
|
|
110
|
+
}
|
|
111
|
+
.tb-tab:hover:not([aria-disabled="true"]),
|
|
112
|
+
.tb-tab[aria-selected="true"] {
|
|
113
|
+
color: var(--tb-fg);
|
|
114
|
+
}
|
|
115
|
+
.tb-tab:focus-visible {
|
|
116
|
+
outline: 2px solid var(--tb-focus);
|
|
117
|
+
outline-offset: -2px;
|
|
118
|
+
}
|
|
119
|
+
.tb-tab[aria-disabled="true"] {
|
|
120
|
+
opacity: 0.45;
|
|
121
|
+
cursor: not-allowed;
|
|
122
|
+
}
|
|
123
|
+
.tb-icon {
|
|
124
|
+
display: inline-flex;
|
|
125
|
+
}
|
|
126
|
+
.tb-icon > svg {
|
|
127
|
+
width: 1.1em;
|
|
128
|
+
height: 1.1em;
|
|
129
|
+
}
|
|
130
|
+
.tb-badge {
|
|
131
|
+
min-width: 18px;
|
|
132
|
+
padding: 1px 6px;
|
|
133
|
+
border-radius: 999px;
|
|
134
|
+
background: var(--tb-hover);
|
|
135
|
+
color: var(--tb-fg);
|
|
136
|
+
font-size: 0.85em;
|
|
137
|
+
font-variant-numeric: tabular-nums;
|
|
138
|
+
line-height: 1.4;
|
|
139
|
+
text-align: center;
|
|
140
|
+
}
|
|
141
|
+
.tb-tab[aria-selected="true"] .tb-badge {
|
|
142
|
+
background: var(--tb-accent-soft);
|
|
143
|
+
color: var(--tb-accent);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* The indicator is measured in JS; it slides between tabs. */
|
|
147
|
+
.tb-indicator {
|
|
148
|
+
position: absolute;
|
|
149
|
+
z-index: 0;
|
|
150
|
+
pointer-events: none;
|
|
151
|
+
opacity: 0;
|
|
152
|
+
transition:
|
|
153
|
+
left var(--tb-duration) ease,
|
|
154
|
+
top var(--tb-duration) ease,
|
|
155
|
+
width var(--tb-duration) ease,
|
|
156
|
+
height var(--tb-duration) ease;
|
|
157
|
+
}
|
|
158
|
+
.tb-list[style*="--tb-indicator-size"] .tb-indicator {
|
|
159
|
+
opacity: 1;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/* ---------------------------------------------------------------- line */
|
|
163
|
+
|
|
164
|
+
.tb-root[data-variant="line"] .tb-list {
|
|
165
|
+
border-bottom: 1px solid var(--tb-border);
|
|
166
|
+
}
|
|
167
|
+
.tb-root[data-variant="line"] .tb-indicator {
|
|
168
|
+
bottom: -1px;
|
|
169
|
+
left: var(--tb-indicator-start);
|
|
170
|
+
width: var(--tb-indicator-size);
|
|
171
|
+
height: 2px;
|
|
172
|
+
border-radius: 2px;
|
|
173
|
+
background: var(--tb-accent);
|
|
174
|
+
}
|
|
175
|
+
.tb-root[data-variant="line"][data-orientation="vertical"] .tb-list {
|
|
176
|
+
border-bottom: 0;
|
|
177
|
+
border-inline-end: 1px solid var(--tb-border);
|
|
178
|
+
}
|
|
179
|
+
.tb-root[data-variant="line"][data-orientation="vertical"] .tb-indicator {
|
|
180
|
+
top: var(--tb-indicator-start);
|
|
181
|
+
bottom: auto;
|
|
182
|
+
left: auto;
|
|
183
|
+
inset-inline-end: -1px;
|
|
184
|
+
width: 2px;
|
|
185
|
+
height: var(--tb-indicator-size);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* --------------------------------------------------------------- pills */
|
|
189
|
+
|
|
190
|
+
.tb-root[data-variant="pills"] .tb-indicator {
|
|
191
|
+
top: 0;
|
|
192
|
+
left: var(--tb-indicator-start);
|
|
193
|
+
width: var(--tb-indicator-size);
|
|
194
|
+
height: 100%;
|
|
195
|
+
border-radius: calc(var(--tb-radius) - 2px);
|
|
196
|
+
background: var(--tb-accent-soft);
|
|
197
|
+
}
|
|
198
|
+
.tb-root[data-variant="pills"] .tb-tab[aria-selected="true"] {
|
|
199
|
+
color: var(--tb-accent);
|
|
200
|
+
}
|
|
201
|
+
.tb-root[data-variant="pills"][data-orientation="vertical"] .tb-indicator {
|
|
202
|
+
top: var(--tb-indicator-start);
|
|
203
|
+
left: 0;
|
|
204
|
+
width: 100%;
|
|
205
|
+
height: var(--tb-indicator-size);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* ------------------------------------------------------------ enclosed */
|
|
209
|
+
|
|
210
|
+
.tb-root[data-variant="enclosed"] .tb-list {
|
|
211
|
+
padding: 3px;
|
|
212
|
+
border-radius: var(--tb-radius);
|
|
213
|
+
background: var(--tb-track);
|
|
214
|
+
}
|
|
215
|
+
.tb-root[data-variant="enclosed"] .tb-indicator {
|
|
216
|
+
top: 3px;
|
|
217
|
+
bottom: 3px;
|
|
218
|
+
left: var(--tb-indicator-start);
|
|
219
|
+
width: var(--tb-indicator-size);
|
|
220
|
+
border-radius: calc(var(--tb-radius) - 2px);
|
|
221
|
+
background: var(--tb-bg);
|
|
222
|
+
box-shadow: 0 1px 3px light-dark(rgb(0 0 0 / 0.12), rgb(0 0 0 / 0.5));
|
|
223
|
+
}
|
|
224
|
+
.tb-root[data-variant="enclosed"] .tb-tab {
|
|
225
|
+
height: calc(var(--tb-height) - 6px);
|
|
226
|
+
}
|
|
227
|
+
.tb-root[data-variant="enclosed"][data-orientation="vertical"] .tb-indicator {
|
|
228
|
+
top: var(--tb-indicator-start);
|
|
229
|
+
bottom: auto;
|
|
230
|
+
left: 3px;
|
|
231
|
+
right: 3px;
|
|
232
|
+
width: auto;
|
|
233
|
+
height: var(--tb-indicator-size);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* Before the indicator is measured (server render), mark the selected tab statically. */
|
|
237
|
+
.tb-root[data-variant="line"] .tb-list:not([style*="--tb-indicator-size"]) .tb-tab[aria-selected="true"] {
|
|
238
|
+
box-shadow: inset 0 -2px 0 var(--tb-accent);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/* --------------------------------------------------------------- panel */
|
|
242
|
+
|
|
243
|
+
.tb-panel {
|
|
244
|
+
flex: 1 1 auto;
|
|
245
|
+
min-width: 0;
|
|
246
|
+
border-radius: 4px;
|
|
247
|
+
}
|
|
248
|
+
.tb-panel:focus-visible {
|
|
249
|
+
outline: 2px solid var(--tb-focus);
|
|
250
|
+
outline-offset: 4px;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
@media (prefers-reduced-motion: reduce) {
|
|
254
|
+
.tb-root {
|
|
255
|
+
--tb-duration: 0s;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
@media (forced-colors: active) {
|
|
260
|
+
.tb-indicator {
|
|
261
|
+
background: Highlight;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Tokens read the shared --gbs-* variables when they are set on an ancestor
|
|
5
5
|
* (set them on :root to theme every component at once) and fall back to the
|
|
6
|
-
* same default palette otherwise. Rules live in the `
|
|
7
|
-
*
|
|
6
|
+
* same default palette otherwise. Rules live in the `gbs` layer. Declare
|
|
7
|
+
* where that sits in your global CSS — e.g. `@layer reset, gbs, app,
|
|
8
|
+
* utilities;` — and anything in a later layer, Tailwind utilities included,
|
|
9
|
+
* overrides them.
|
|
8
10
|
*/
|
|
9
|
-
@layer theme, base, components, utilities;
|
|
10
11
|
|
|
11
|
-
@layer
|
|
12
|
+
@layer gbs {
|
|
12
13
|
.ta-root {
|
|
13
14
|
--ta-fg: var(--gbs-fg, var(--dg-fg, light-dark(#18181b, #f4f4f5)));
|
|
14
15
|
--ta-muted: var(--gbs-muted, var(--dg-muted, light-dark(#71717a, #a1a1aa)));
|
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
* the same default palette otherwise. Rules live in the `components`
|
|
7
7
|
* layer, so utility classes passed through `className` / `classNames` win.
|
|
8
8
|
*/
|
|
9
|
-
@layer theme, base, components, utilities;
|
|
10
9
|
|
|
11
|
-
@layer
|
|
10
|
+
@layer gbs {
|
|
12
11
|
.ts-region {
|
|
13
12
|
--ts-bg: var(--gbs-bg, var(--dg-bg, light-dark(#ffffff, #0b0b0e)));
|
|
14
13
|
--ts-fg: var(--gbs-fg, var(--dg-fg, light-dark(#18181b, #f4f4f5)));
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Tokens read the shared --gbs-* variables when they are set on an ancestor
|
|
5
5
|
* (set them on :root to theme every component at once) and fall back to the
|
|
6
|
-
* same default palette otherwise. Rules live in the `
|
|
7
|
-
*
|
|
6
|
+
* same default palette otherwise. Rules live in the `gbs` layer. Declare
|
|
7
|
+
* where that sits in your global CSS — e.g. `@layer reset, gbs, app,
|
|
8
|
+
* utilities;` — and anything in a later layer, Tailwind utilities included,
|
|
9
|
+
* overrides them.
|
|
8
10
|
*/
|
|
9
|
-
@layer theme, base, components, utilities;
|
|
10
11
|
|
|
11
|
-
@layer
|
|
12
|
+
@layer gbs {
|
|
12
13
|
.tt-root {
|
|
13
14
|
/* Inverted against the page, the way a tooltip is expected to read. */
|
|
14
15
|
--tt-bg: var(--gbs-tooltip-bg, light-dark(#18181b, #f4f4f5));
|