gbs-add-block 2.1.0 → 2.3.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/SKILL.md +190 -134
- package/.gbs/skills/gbs-components/references/install.md +25 -3
- package/.gbs/skills/gbs-components/references/styling.md +246 -207
- package/CHANGELOG.md +74 -0
- package/README.md +154 -23
- package/index.cjs +212 -3
- package/package.json +41 -10
- package/schema/passport-v1.schema.json +204 -0
- package/source/beta-components/accordion/passport.json +259 -0
- package/source/beta-components/accordion/styles.css +207 -208
- package/source/beta-components/alert/passport.json +250 -0
- package/source/beta-components/alert/styles.css +154 -155
- package/source/beta-components/avatar/passport.json +294 -0
- package/source/beta-components/avatar/styles.css +225 -226
- package/source/beta-components/badge/passport.json +332 -0
- package/source/beta-components/badge/styles.css +203 -204
- package/source/beta-components/breadcrumb/passport.json +243 -0
- package/source/beta-components/breadcrumb/styles.css +138 -140
- package/source/beta-components/button/passport.json +402 -0
- package/source/beta-components/button/passport.manual.json +31 -0
- package/source/beta-components/button/styles.css +232 -234
- package/source/beta-components/card/passport.json +337 -0
- package/source/beta-components/card/styles.css +230 -232
- package/source/beta-components/checkbox/passport.json +456 -0
- package/source/beta-components/checkbox/styles.css +211 -213
- package/source/beta-components/combobox/passport.json +456 -0
- package/source/beta-components/combobox/styles.css +419 -417
- package/source/beta-components/data-grid/agent/coerce.ts +368 -0
- package/source/beta-components/data-grid/agent/contract.ts +410 -0
- package/source/beta-components/data-grid/agent/dataset.ts +92 -0
- package/source/beta-components/data-grid/agent/engine.ts +470 -0
- package/source/beta-components/data-grid/agent/executors.ts +155 -0
- package/source/beta-components/data-grid/agent/index.ts +79 -0
- package/source/beta-components/data-grid/agent/intent.ts +324 -0
- package/source/beta-components/data-grid/agent/operations.ts +335 -0
- package/source/beta-components/data-grid/agent/validate.ts +630 -0
- package/source/beta-components/data-grid/agent/webmcp.ts +107 -0
- package/source/beta-components/data-grid/index.ts +14 -7
- package/source/beta-components/data-grid/passport.json +1051 -0
- package/source/beta-components/data-grid/passport.manual.json +255 -0
- package/source/beta-components/data-grid/react/AskGrid.tsx +164 -0
- package/source/beta-components/data-grid/react/DataGrid.tsx +39 -0
- package/source/beta-components/data-grid/styles.css +874 -716
- package/source/beta-components/date-picker/passport.json +407 -0
- package/source/beta-components/date-picker/styles.css +445 -446
- package/source/beta-components/dialog/passport.json +344 -0
- package/source/beta-components/dialog/styles.css +280 -279
- package/source/beta-components/file-uploader/passport.json +518 -0
- package/source/beta-components/file-uploader/styles.css +394 -396
- package/source/beta-components/input/passport.json +536 -0
- package/source/beta-components/input/styles.css +295 -297
- package/source/beta-components/menu/passport.json +322 -0
- package/source/beta-components/menu/styles.css +224 -223
- package/source/beta-components/modal/passport.json +289 -0
- package/source/beta-components/modal/styles.css +241 -240
- package/source/beta-components/number-input/passport.json +541 -0
- package/source/beta-components/number-input/styles.css +230 -231
- package/source/beta-components/popover/passport.json +238 -0
- package/source/beta-components/popover/styles.css +148 -147
- package/source/beta-components/progress/passport.json +270 -0
- package/source/beta-components/progress/styles.css +200 -201
- package/source/beta-components/radio-group/passport.json +477 -0
- package/source/beta-components/radio-group/styles.css +269 -270
- package/source/beta-components/shared/core/agent/adapter.ts +65 -0
- package/source/beta-components/shared/core/agent/history.ts +120 -0
- package/source/beta-components/shared/core/agent/index.ts +46 -0
- package/source/beta-components/shared/core/agent/numbers.ts +217 -0
- package/source/beta-components/shared/core/agent/schema.ts +180 -0
- package/source/beta-components/shared/core/agent/types.ts +169 -0
- package/source/beta-components/shared/core/agent/webmcp.ts +328 -0
- package/source/beta-components/shared/index.ts +9 -0
- package/source/beta-components/shared/react/GramproAIProvider.tsx +50 -0
- package/source/beta-components/shared/react/useAskAgent.ts +217 -0
- package/source/beta-components/shared/styles.css +79 -0
- package/source/beta-components/shared/version.json +4 -4
- package/source/beta-components/shared/version.ts +6 -6
- package/source/beta-components/skeleton/passport.json +251 -0
- package/source/beta-components/skeleton/styles.css +185 -187
- package/source/beta-components/spinner/passport.json +245 -0
- package/source/beta-components/spinner/styles.css +173 -174
- package/source/beta-components/switch/passport.json +421 -0
- package/source/beta-components/switch/styles.css +227 -229
- package/source/beta-components/tabs/passport.json +315 -0
- package/source/beta-components/tabs/styles.css +263 -264
- package/source/beta-components/textarea/passport.json +382 -0
- package/source/beta-components/textarea/styles.css +158 -160
- package/source/beta-components/toaster/passport.json +221 -0
- package/source/beta-components/toaster/styles.css +282 -282
- package/source/beta-components/tooltip/passport.json +170 -0
- package/source/beta-components/tooltip/styles.css +71 -73
- package/tools/env.cjs +61 -0
- package/tools/passport/cli.cjs +79 -0
- package/tools/passport/extract.cjs +493 -0
- package/tools/passport/index.cjs +185 -0
- package/tools/passport/merge.cjs +131 -0
- package/tools/passport/policy.cjs +65 -0
- package/tools/passport/validate.cjs +277 -0
- package/tools/ts-require.cjs +79 -0
- package/source/beta-components/accordion/__tests__/core.test.ts +0 -58
- package/source/beta-components/alert/__tests__/core.test.ts +0 -17
- package/source/beta-components/avatar/__tests__/core.test.ts +0 -88
- package/source/beta-components/badge/__tests__/core.test.ts +0 -46
- package/source/beta-components/breadcrumb/__tests__/core.test.ts +0 -58
- package/source/beta-components/button/__tests__/core.test.ts +0 -31
- package/source/beta-components/card/__tests__/core.test.ts +0 -57
- package/source/beta-components/checkbox/__tests__/core.test.ts +0 -40
- package/source/beta-components/combobox/__tests__/core.test.ts +0 -134
- package/source/beta-components/data-grid/__tests__/core.test.ts +0 -356
- package/source/beta-components/data-grid/__tests__/export.test.ts +0 -70
- package/source/beta-components/data-grid/__tests__/pdf.test.ts +0 -209
- package/source/beta-components/date-picker/__tests__/core.test.ts +0 -273
- package/source/beta-components/dialog/__tests__/core.test.ts +0 -86
- package/source/beta-components/file-uploader/__tests__/core.test.ts +0 -395
- package/source/beta-components/input/__tests__/core.test.ts +0 -75
- package/source/beta-components/menu/__tests__/core.test.ts +0 -120
- package/source/beta-components/modal/__tests__/core.test.ts +0 -55
- package/source/beta-components/number-input/__tests__/core.test.ts +0 -151
- package/source/beta-components/progress/__tests__/core.test.ts +0 -56
- package/source/beta-components/radio-group/__tests__/core.test.ts +0 -64
- package/source/beta-components/shared/__tests__/boundaries.test.ts +0 -95
- package/source/beta-components/shared/__tests__/core.test.ts +0 -55
- package/source/beta-components/shared/__tests__/position.test.ts +0 -143
- package/source/beta-components/skeleton/__tests__/core.test.ts +0 -41
- package/source/beta-components/spinner/__tests__/core.test.ts +0 -48
- package/source/beta-components/switch/__tests__/core.test.ts +0 -64
- package/source/beta-components/tabs/__tests__/core.test.ts +0 -51
- package/source/beta-components/textarea/__tests__/core.test.ts +0 -38
- package/source/beta-components/toaster/__tests__/core.test.ts +0 -256
- package/source/beta-components/tooltip/__tests__/core.test.ts +0 -42
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../../schema/passport-v1.schema.json",
|
|
3
|
+
"component": "Button",
|
|
4
|
+
"purpose": "Trigger an action. Not for navigation unless `render` supplies a link element.",
|
|
5
|
+
"intentDomains": ["ActionIntent"],
|
|
6
|
+
"accessibility": {
|
|
7
|
+
"supplied": [
|
|
8
|
+
"native <button> semantics, including Enter and Space activation",
|
|
9
|
+
"disabled state via the native attribute",
|
|
10
|
+
"focus-visible ring",
|
|
11
|
+
"the spinner is aria-hidden; loadingText is announced"
|
|
12
|
+
],
|
|
13
|
+
"required": [
|
|
14
|
+
"aria-label when the button is icon-only (`icon` with no children)",
|
|
15
|
+
"type=\"submit\" on the button that submits a form; the default is \"button\""
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"composition": {
|
|
19
|
+
"mustNotContain": ["Button", "a"],
|
|
20
|
+
"notes": "Nesting interactive elements is invalid HTML and traps keyboard focus. Use `render` to change the element instead of wrapping it."
|
|
21
|
+
},
|
|
22
|
+
"safeMutations": {
|
|
23
|
+
"allowed": ["variant", "size", "fullWidth", "leading", "trailing", "icon", "loadingText"],
|
|
24
|
+
"forbidden": ["type", "onClick", "render", "loading", "disabled"],
|
|
25
|
+
"rationale": "Appearance is safe for an agent to change. `type` and `onClick` change behaviour; `loading` and `disabled` are owned by the component's own async handling."
|
|
26
|
+
},
|
|
27
|
+
"propNotes": {
|
|
28
|
+
"render": "Escape hatch for router links. Changes the rendered element, so composition rules apply to whatever it returns.",
|
|
29
|
+
"loading": "Managed automatically when `onClick` returns a promise. Setting it manually opts out of that."
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -1,234 +1,232 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Button 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
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
.
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
.
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
}
|
|
234
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* Button 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 are unlayered: they beat a framework
|
|
7
|
+
* reset on specificity, and lose to anything you pass through `className`.
|
|
8
|
+
* With Tailwind v4, import this file after the framework and inside its
|
|
9
|
+
* components layer - see the README.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
.bt-root {
|
|
13
|
+
--bt-bg: var(--gbs-bg, var(--dg-bg, light-dark(#ffffff, #0b0b0e)));
|
|
14
|
+
--bt-fg: var(--gbs-fg, var(--dg-fg, light-dark(#18181b, #f4f4f5)));
|
|
15
|
+
--bt-border: var(--gbs-border, var(--dg-border, light-dark(#e4e4e7, #27272a)));
|
|
16
|
+
--bt-hover: var(--gbs-hover, var(--dg-hover, light-dark(#f4f4f5, #1f1f23)));
|
|
17
|
+
--bt-subtle: var(--gbs-subtle, light-dark(#f4f4f5, #1c1c20));
|
|
18
|
+
--bt-accent: var(--gbs-accent, var(--dg-accent, light-dark(#2563eb, #60a5fa)));
|
|
19
|
+
--bt-accent-fg: var(--gbs-accent-fg, var(--dg-accent-fg, light-dark(#ffffff, #0b1220)));
|
|
20
|
+
--bt-danger: var(--gbs-danger, var(--dg-danger, light-dark(#dc2626, #f87171)));
|
|
21
|
+
--bt-danger-fg: var(--gbs-danger-fg, light-dark(#ffffff, #1c0606));
|
|
22
|
+
--bt-focus: var(--gbs-focus, var(--dg-focus, light-dark(#2563eb, #60a5fa)));
|
|
23
|
+
--bt-radius: var(--gbs-radius, var(--dg-radius, 8px));
|
|
24
|
+
--bt-font-size: var(--gbs-font-size, var(--dg-font-size, 13px));
|
|
25
|
+
--bt-height: 36px;
|
|
26
|
+
--bt-px: 14px;
|
|
27
|
+
--bt-gap: 8px;
|
|
28
|
+
|
|
29
|
+
/* Per variant. */
|
|
30
|
+
--bt-fill: var(--bt-accent);
|
|
31
|
+
--bt-fill-hover: color-mix(in oklab, var(--bt-accent), var(--bt-fg) 12%);
|
|
32
|
+
--bt-ink: var(--bt-accent-fg);
|
|
33
|
+
--bt-line: var(--bt-accent);
|
|
34
|
+
|
|
35
|
+
color-scheme: inherit;
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
position: relative;
|
|
38
|
+
display: inline-grid;
|
|
39
|
+
place-items: center;
|
|
40
|
+
height: var(--bt-height);
|
|
41
|
+
padding: 0 var(--bt-px);
|
|
42
|
+
border: 1px solid var(--bt-line);
|
|
43
|
+
border-radius: var(--bt-radius);
|
|
44
|
+
background: var(--bt-fill);
|
|
45
|
+
color: var(--bt-ink);
|
|
46
|
+
font: inherit;
|
|
47
|
+
font-size: var(--bt-font-size);
|
|
48
|
+
font-weight: 500;
|
|
49
|
+
line-height: 1;
|
|
50
|
+
white-space: nowrap;
|
|
51
|
+
text-decoration: none;
|
|
52
|
+
vertical-align: middle;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
user-select: none;
|
|
55
|
+
-webkit-tap-highlight-color: transparent;
|
|
56
|
+
transition:
|
|
57
|
+
background-color 120ms ease,
|
|
58
|
+
border-color 120ms ease,
|
|
59
|
+
color 120ms ease,
|
|
60
|
+
scale 120ms ease;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:where(.dark, [data-theme="dark"]) .bt-root {
|
|
64
|
+
color-scheme: dark;
|
|
65
|
+
}
|
|
66
|
+
:where(.light, [data-theme="light"]) .bt-root {
|
|
67
|
+
color-scheme: light;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:where(.bt-root) *,
|
|
71
|
+
:where(.bt-root) *::before,
|
|
72
|
+
:where(.bt-root) *::after {
|
|
73
|
+
box-sizing: border-box;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* ------------------------------------------------------------ variants */
|
|
77
|
+
|
|
78
|
+
.bt-root[data-variant="secondary"] {
|
|
79
|
+
--bt-fill: var(--bt-subtle);
|
|
80
|
+
--bt-fill-hover: color-mix(in oklab, var(--bt-subtle), var(--bt-fg) 8%);
|
|
81
|
+
--bt-ink: var(--bt-fg);
|
|
82
|
+
--bt-line: transparent;
|
|
83
|
+
}
|
|
84
|
+
.bt-root[data-variant="outline"] {
|
|
85
|
+
--bt-fill: var(--bt-bg);
|
|
86
|
+
--bt-fill-hover: var(--bt-hover);
|
|
87
|
+
--bt-ink: var(--bt-fg);
|
|
88
|
+
--bt-line: var(--bt-border);
|
|
89
|
+
}
|
|
90
|
+
.bt-root[data-variant="ghost"] {
|
|
91
|
+
--bt-fill: transparent;
|
|
92
|
+
--bt-fill-hover: var(--bt-hover);
|
|
93
|
+
--bt-ink: var(--bt-fg);
|
|
94
|
+
--bt-line: transparent;
|
|
95
|
+
}
|
|
96
|
+
.bt-root[data-variant="danger"] {
|
|
97
|
+
--bt-fill: var(--bt-danger);
|
|
98
|
+
--bt-fill-hover: color-mix(in oklab, var(--bt-danger), var(--bt-fg) 12%);
|
|
99
|
+
--bt-ink: var(--bt-danger-fg);
|
|
100
|
+
--bt-line: var(--bt-danger);
|
|
101
|
+
}
|
|
102
|
+
.bt-root[data-variant="link"] {
|
|
103
|
+
--bt-fill: transparent;
|
|
104
|
+
--bt-fill-hover: transparent;
|
|
105
|
+
--bt-ink: var(--bt-accent);
|
|
106
|
+
--bt-line: transparent;
|
|
107
|
+
--bt-px: 0px;
|
|
108
|
+
height: auto;
|
|
109
|
+
text-underline-offset: 3px;
|
|
110
|
+
}
|
|
111
|
+
.bt-root[data-variant="link"]:hover:not([aria-disabled="true"], :disabled) {
|
|
112
|
+
text-decoration: underline;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* --------------------------------------------------------------- sizes */
|
|
116
|
+
|
|
117
|
+
.bt-root[data-size="sm"] {
|
|
118
|
+
--bt-height: 30px;
|
|
119
|
+
--bt-px: 10px;
|
|
120
|
+
--bt-gap: 6px;
|
|
121
|
+
--bt-font-size: 12px;
|
|
122
|
+
}
|
|
123
|
+
.bt-root[data-size="lg"] {
|
|
124
|
+
--bt-height: 44px;
|
|
125
|
+
--bt-px: 18px;
|
|
126
|
+
--bt-gap: 10px;
|
|
127
|
+
--bt-font-size: 14px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* -------------------------------------------------------------- states */
|
|
131
|
+
|
|
132
|
+
.bt-root:hover:not([aria-disabled="true"], :disabled) {
|
|
133
|
+
background: var(--bt-fill-hover);
|
|
134
|
+
}
|
|
135
|
+
.bt-root:active:not([aria-disabled="true"], :disabled) {
|
|
136
|
+
scale: 0.98;
|
|
137
|
+
}
|
|
138
|
+
.bt-root:focus-visible {
|
|
139
|
+
outline: 2px solid var(--bt-focus);
|
|
140
|
+
outline-offset: 2px;
|
|
141
|
+
}
|
|
142
|
+
.bt-root:disabled,
|
|
143
|
+
.bt-root[aria-disabled="true"]:not([data-busy]) {
|
|
144
|
+
opacity: 0.5;
|
|
145
|
+
cursor: not-allowed;
|
|
146
|
+
}
|
|
147
|
+
.bt-root[data-busy] {
|
|
148
|
+
cursor: progress;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.bt-root[data-icon-only] {
|
|
152
|
+
width: var(--bt-height);
|
|
153
|
+
padding: 0;
|
|
154
|
+
}
|
|
155
|
+
.bt-root[data-full-width] {
|
|
156
|
+
width: 100%;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* ------------------------------------------------------------- content */
|
|
160
|
+
|
|
161
|
+
.bt-content,
|
|
162
|
+
.bt-spinner {
|
|
163
|
+
grid-area: 1 / 1;
|
|
164
|
+
display: inline-flex;
|
|
165
|
+
align-items: center;
|
|
166
|
+
justify-content: center;
|
|
167
|
+
gap: var(--bt-gap);
|
|
168
|
+
min-width: 0;
|
|
169
|
+
}
|
|
170
|
+
/* The label keeps its space while the spinner sits on top… */
|
|
171
|
+
.bt-content[data-hidden] {
|
|
172
|
+
visibility: hidden;
|
|
173
|
+
}
|
|
174
|
+
/* …unless loading text replaces it. */
|
|
175
|
+
.bt-root[data-loading-text] .bt-content {
|
|
176
|
+
display: none;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.bt-icon {
|
|
180
|
+
display: inline-flex;
|
|
181
|
+
flex: none;
|
|
182
|
+
}
|
|
183
|
+
.bt-icon > svg {
|
|
184
|
+
width: 1.15em;
|
|
185
|
+
height: 1.15em;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.bt-spinner-ring {
|
|
189
|
+
width: 1.15em;
|
|
190
|
+
height: 1.15em;
|
|
191
|
+
fill: none;
|
|
192
|
+
stroke: currentColor;
|
|
193
|
+
stroke-width: 2.5;
|
|
194
|
+
stroke-linecap: round;
|
|
195
|
+
stroke-dasharray: 30 100;
|
|
196
|
+
animation: bt-rotate 0.8s linear infinite;
|
|
197
|
+
}
|
|
198
|
+
@keyframes bt-rotate {
|
|
199
|
+
to {
|
|
200
|
+
transform: rotate(360deg);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.bt-sr-only {
|
|
205
|
+
position: absolute;
|
|
206
|
+
width: 1px;
|
|
207
|
+
height: 1px;
|
|
208
|
+
margin: -1px;
|
|
209
|
+
padding: 0;
|
|
210
|
+
overflow: hidden;
|
|
211
|
+
clip-path: inset(50%);
|
|
212
|
+
white-space: nowrap;
|
|
213
|
+
border: 0;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
@media (prefers-reduced-motion: reduce) {
|
|
217
|
+
.bt-root {
|
|
218
|
+
transition: none;
|
|
219
|
+
}
|
|
220
|
+
.bt-root:active:not([aria-disabled="true"], :disabled) {
|
|
221
|
+
scale: none;
|
|
222
|
+
}
|
|
223
|
+
.bt-spinner-ring {
|
|
224
|
+
animation-duration: 2.4s;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
@media (forced-colors: active) {
|
|
229
|
+
.bt-root {
|
|
230
|
+
border-color: ButtonText;
|
|
231
|
+
}
|
|
232
|
+
}
|