gbs-add-block 2.0.4 → 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 -201
- package/CHANGELOG.md +74 -0
- package/README.md +157 -11
- 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 +201 -203
- 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 -139
- 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 -233
- package/source/beta-components/card/passport.json +337 -0
- package/source/beta-components/card/styles.css +230 -231
- package/source/beta-components/checkbox/passport.json +456 -0
- package/source/beta-components/checkbox/styles.css +211 -212
- 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 -717
- 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 -278
- package/source/beta-components/file-uploader/passport.json +518 -0
- package/source/beta-components/file-uploader/styles.css +394 -395
- package/source/beta-components/input/passport.json +536 -0
- package/source/beta-components/input/styles.css +295 -296
- package/source/beta-components/menu/passport.json +322 -0
- package/source/beta-components/menu/styles.css +224 -222
- package/source/beta-components/modal/passport.json +289 -0
- package/source/beta-components/modal/styles.css +241 -239
- 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 -146
- package/source/beta-components/progress/passport.json +270 -0
- package/source/beta-components/progress/styles.css +200 -202
- package/source/beta-components/radio-group/passport.json +477 -0
- package/source/beta-components/radio-group/styles.css +241 -242
- 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 -186
- package/source/beta-components/spinner/passport.json +245 -0
- package/source/beta-components/spinner/styles.css +145 -146
- package/source/beta-components/switch/passport.json +421 -0
- package/source/beta-components/switch/styles.css +194 -196
- package/source/beta-components/tabs/passport.json +315 -0
- package/source/beta-components/tabs/styles.css +234 -235
- package/source/beta-components/textarea/passport.json +382 -0
- package/source/beta-components/textarea/styles.css +158 -159
- package/source/beta-components/toaster/passport.json +221 -0
- package/source/beta-components/toaster/styles.css +282 -283
- package/source/beta-components/tooltip/passport.json +170 -0
- package/source/beta-components/tooltip/styles.css +71 -72
- 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
|
@@ -1,296 +1,295 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Input and OtpInput 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
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* Input and OtpInput 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
|
+
.in-root {
|
|
13
|
+
--in-bg: var(--gbs-bg, var(--dg-bg, light-dark(#ffffff, #0b0b0e)));
|
|
14
|
+
--in-fg: var(--gbs-fg, var(--dg-fg, light-dark(#18181b, #f4f4f5)));
|
|
15
|
+
--in-muted: var(--gbs-muted, var(--dg-muted, light-dark(#71717a, #a1a1aa)));
|
|
16
|
+
--in-border: var(--gbs-border, var(--dg-border, light-dark(#e4e4e7, #27272a)));
|
|
17
|
+
--in-hover: var(--gbs-hover, var(--dg-hover, light-dark(#f4f4f5, #1f1f23)));
|
|
18
|
+
--in-input-bg: var(--gbs-input-bg, var(--dg-input-bg, light-dark(#ffffff, #121216)));
|
|
19
|
+
--in-readonly-bg: var(--gbs-readonly-bg, light-dark(#fafafa, #0e0e12));
|
|
20
|
+
--in-accent: var(--gbs-accent, var(--dg-accent, light-dark(#2563eb, #60a5fa)));
|
|
21
|
+
--in-focus: var(--gbs-focus, var(--dg-focus, light-dark(#2563eb, #60a5fa)));
|
|
22
|
+
--in-danger: var(--gbs-danger, var(--dg-danger, light-dark(#dc2626, #f87171)));
|
|
23
|
+
--in-radius: var(--gbs-radius, var(--dg-radius, 8px));
|
|
24
|
+
--in-font-size: var(--gbs-font-size, var(--dg-font-size, 13px));
|
|
25
|
+
--in-height: 36px;
|
|
26
|
+
--in-px: 10px;
|
|
27
|
+
--in-cell: 42px;
|
|
28
|
+
|
|
29
|
+
color-scheme: inherit;
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
gap: 4px;
|
|
33
|
+
width: 100%;
|
|
34
|
+
min-width: 0;
|
|
35
|
+
font-size: var(--in-font-size);
|
|
36
|
+
line-height: 1.4;
|
|
37
|
+
color: var(--in-fg);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:where(.dark, [data-theme="dark"]) .in-root {
|
|
41
|
+
color-scheme: dark;
|
|
42
|
+
}
|
|
43
|
+
:where(.light, [data-theme="light"]) .in-root {
|
|
44
|
+
color-scheme: light;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:where(.in-root) *,
|
|
48
|
+
:where(.in-root) *::before,
|
|
49
|
+
:where(.in-root) *::after {
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.in-root[data-size="sm"] {
|
|
54
|
+
--in-height: 30px;
|
|
55
|
+
--in-font-size: 12px;
|
|
56
|
+
--in-px: 8px;
|
|
57
|
+
--in-cell: 34px;
|
|
58
|
+
}
|
|
59
|
+
.in-root[data-size="lg"] {
|
|
60
|
+
--in-height: 44px;
|
|
61
|
+
--in-font-size: 14px;
|
|
62
|
+
--in-px: 12px;
|
|
63
|
+
--in-cell: 50px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.in-label {
|
|
67
|
+
font-weight: 500;
|
|
68
|
+
}
|
|
69
|
+
.in-label[data-required]::after {
|
|
70
|
+
content: " *";
|
|
71
|
+
color: var(--in-danger);
|
|
72
|
+
}
|
|
73
|
+
.in-footer {
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: baseline;
|
|
76
|
+
gap: 8px;
|
|
77
|
+
}
|
|
78
|
+
.in-description {
|
|
79
|
+
flex: 1 1 auto;
|
|
80
|
+
min-width: 0;
|
|
81
|
+
color: var(--in-muted);
|
|
82
|
+
font-size: 0.92em;
|
|
83
|
+
}
|
|
84
|
+
.in-count {
|
|
85
|
+
flex: none;
|
|
86
|
+
margin-inline-start: auto;
|
|
87
|
+
color: var(--in-muted);
|
|
88
|
+
font-size: 0.92em;
|
|
89
|
+
font-variant-numeric: tabular-nums;
|
|
90
|
+
}
|
|
91
|
+
.in-count[data-over] {
|
|
92
|
+
color: var(--in-danger);
|
|
93
|
+
}
|
|
94
|
+
.in-error {
|
|
95
|
+
color: var(--in-danger);
|
|
96
|
+
font-size: 0.92em;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* --------------------------------------------------------------- input */
|
|
100
|
+
|
|
101
|
+
.in-control {
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
gap: 6px;
|
|
105
|
+
width: 100%;
|
|
106
|
+
height: var(--in-height);
|
|
107
|
+
padding: 0 calc(var(--in-px) - 4px) 0 var(--in-px);
|
|
108
|
+
border: 1px solid var(--in-border);
|
|
109
|
+
border-radius: var(--in-radius);
|
|
110
|
+
background: var(--in-input-bg);
|
|
111
|
+
cursor: text;
|
|
112
|
+
}
|
|
113
|
+
.in-control:hover:not([data-disabled]) {
|
|
114
|
+
border-color: color-mix(in oklab, var(--in-border), var(--in-fg) 25%);
|
|
115
|
+
}
|
|
116
|
+
.in-control:focus-within {
|
|
117
|
+
outline: 2px solid var(--in-focus);
|
|
118
|
+
outline-offset: -1px;
|
|
119
|
+
}
|
|
120
|
+
.in-control[data-invalid] {
|
|
121
|
+
border-color: var(--in-danger);
|
|
122
|
+
outline-color: var(--in-danger);
|
|
123
|
+
}
|
|
124
|
+
.in-control[data-readonly] {
|
|
125
|
+
background: var(--in-readonly-bg);
|
|
126
|
+
}
|
|
127
|
+
.in-control[data-disabled] {
|
|
128
|
+
opacity: 0.55;
|
|
129
|
+
cursor: not-allowed;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.in-input {
|
|
133
|
+
flex: 1 1 auto;
|
|
134
|
+
width: 100%;
|
|
135
|
+
min-width: 0;
|
|
136
|
+
height: 100%;
|
|
137
|
+
padding: 0;
|
|
138
|
+
border: 0;
|
|
139
|
+
outline: 0;
|
|
140
|
+
background: transparent;
|
|
141
|
+
color: inherit;
|
|
142
|
+
font: inherit;
|
|
143
|
+
}
|
|
144
|
+
.in-input::placeholder {
|
|
145
|
+
color: var(--in-muted);
|
|
146
|
+
}
|
|
147
|
+
.in-input:disabled {
|
|
148
|
+
cursor: not-allowed;
|
|
149
|
+
}
|
|
150
|
+
/* Keep browser autofill from painting its own background over the field. */
|
|
151
|
+
.in-input:autofill {
|
|
152
|
+
box-shadow: 0 0 0 100px var(--in-input-bg) inset;
|
|
153
|
+
-webkit-text-fill-color: var(--in-fg);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.in-adornment {
|
|
157
|
+
display: inline-flex;
|
|
158
|
+
flex: none;
|
|
159
|
+
align-items: center;
|
|
160
|
+
color: var(--in-muted);
|
|
161
|
+
white-space: nowrap;
|
|
162
|
+
}
|
|
163
|
+
.in-adornment[data-side="trailing"] {
|
|
164
|
+
padding-inline-end: 4px;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.in-icon-button {
|
|
168
|
+
display: inline-grid;
|
|
169
|
+
flex: none;
|
|
170
|
+
place-items: center;
|
|
171
|
+
width: 26px;
|
|
172
|
+
height: 26px;
|
|
173
|
+
padding: 0;
|
|
174
|
+
border: 0;
|
|
175
|
+
border-radius: 6px;
|
|
176
|
+
background: transparent;
|
|
177
|
+
color: var(--in-muted);
|
|
178
|
+
cursor: pointer;
|
|
179
|
+
}
|
|
180
|
+
.in-icon-button:hover:not(:disabled) {
|
|
181
|
+
background: var(--in-hover);
|
|
182
|
+
color: var(--in-fg);
|
|
183
|
+
}
|
|
184
|
+
.in-icon-button:focus-visible {
|
|
185
|
+
outline: 2px solid var(--in-focus);
|
|
186
|
+
outline-offset: 1px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* ----------------------------------------------------------------- otp */
|
|
190
|
+
|
|
191
|
+
.in-otp {
|
|
192
|
+
position: relative;
|
|
193
|
+
display: inline-flex;
|
|
194
|
+
align-items: center;
|
|
195
|
+
gap: 8px;
|
|
196
|
+
width: max-content;
|
|
197
|
+
max-width: 100%;
|
|
198
|
+
}
|
|
199
|
+
/*
|
|
200
|
+
* The real input covers the cells but draws nothing: the cells show its value,
|
|
201
|
+
* and it still receives typing, paste, autofill and assistive technology.
|
|
202
|
+
*/
|
|
203
|
+
.in-otp-input {
|
|
204
|
+
position: absolute;
|
|
205
|
+
inset: 0;
|
|
206
|
+
z-index: 1;
|
|
207
|
+
width: 100%;
|
|
208
|
+
height: 100%;
|
|
209
|
+
padding: 0;
|
|
210
|
+
border: 0;
|
|
211
|
+
outline: 0;
|
|
212
|
+
background: transparent;
|
|
213
|
+
color: transparent;
|
|
214
|
+
caret-color: transparent;
|
|
215
|
+
font-size: 16px; /* 16px keeps iOS from zooming in on focus */
|
|
216
|
+
letter-spacing: 0;
|
|
217
|
+
cursor: text;
|
|
218
|
+
}
|
|
219
|
+
.in-otp-input::selection {
|
|
220
|
+
background: transparent;
|
|
221
|
+
}
|
|
222
|
+
.in-otp-input:autofill {
|
|
223
|
+
box-shadow: none;
|
|
224
|
+
-webkit-text-fill-color: transparent;
|
|
225
|
+
}
|
|
226
|
+
.in-otp-input:disabled {
|
|
227
|
+
cursor: not-allowed;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.in-otp-cell {
|
|
231
|
+
display: grid;
|
|
232
|
+
flex: none;
|
|
233
|
+
place-items: center;
|
|
234
|
+
width: var(--in-cell);
|
|
235
|
+
height: calc(var(--in-cell) * 1.15);
|
|
236
|
+
border: 1px solid var(--in-border);
|
|
237
|
+
border-radius: var(--in-radius);
|
|
238
|
+
background: var(--in-input-bg);
|
|
239
|
+
font-size: 1.35em;
|
|
240
|
+
font-weight: 600;
|
|
241
|
+
font-variant-numeric: tabular-nums;
|
|
242
|
+
transition: border-color 120ms ease;
|
|
243
|
+
}
|
|
244
|
+
.in-otp-cell[data-filled] {
|
|
245
|
+
border-color: color-mix(in oklab, var(--in-border), var(--in-fg) 30%);
|
|
246
|
+
}
|
|
247
|
+
.in-otp-cell[data-active] {
|
|
248
|
+
outline: 2px solid var(--in-focus);
|
|
249
|
+
outline-offset: -1px;
|
|
250
|
+
}
|
|
251
|
+
.in-otp[data-invalid] .in-otp-cell {
|
|
252
|
+
border-color: var(--in-danger);
|
|
253
|
+
}
|
|
254
|
+
.in-otp[data-invalid] .in-otp-cell[data-active] {
|
|
255
|
+
outline-color: var(--in-danger);
|
|
256
|
+
}
|
|
257
|
+
.in-otp[data-disabled] .in-otp-cell {
|
|
258
|
+
opacity: 0.55;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.in-otp-caret {
|
|
262
|
+
width: 1.5px;
|
|
263
|
+
height: 1.1em;
|
|
264
|
+
background: currentColor;
|
|
265
|
+
animation: in-caret 1s steps(2, jump-none) infinite;
|
|
266
|
+
}
|
|
267
|
+
@keyframes in-caret {
|
|
268
|
+
50% {
|
|
269
|
+
opacity: 0;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.in-otp-separator {
|
|
274
|
+
flex: none;
|
|
275
|
+
width: 10px;
|
|
276
|
+
height: 2px;
|
|
277
|
+
border-radius: 1px;
|
|
278
|
+
background: var(--in-muted);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
@media (prefers-reduced-motion: reduce) {
|
|
282
|
+
.in-otp-caret {
|
|
283
|
+
animation: none;
|
|
284
|
+
}
|
|
285
|
+
.in-otp-cell {
|
|
286
|
+
transition: none;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
@media (forced-colors: active) {
|
|
291
|
+
.in-otp-cell[data-active],
|
|
292
|
+
.in-control:focus-within {
|
|
293
|
+
outline-color: Highlight;
|
|
294
|
+
}
|
|
295
|
+
}
|