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,270 @@
|
|
|
1
|
+
{
|
|
2
|
+
"passportVersion": "1.0.0",
|
|
3
|
+
"identity": {
|
|
4
|
+
"component": "Progress",
|
|
5
|
+
"folder": "progress",
|
|
6
|
+
"exports": [
|
|
7
|
+
"CircularProgress",
|
|
8
|
+
"Progress"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"source": {
|
|
12
|
+
"libraryVersion": "2.3.0",
|
|
13
|
+
"files": [
|
|
14
|
+
"core/index.ts",
|
|
15
|
+
"core/progress.ts",
|
|
16
|
+
"core/types.ts",
|
|
17
|
+
"index.ts",
|
|
18
|
+
"react/CircularProgress.tsx",
|
|
19
|
+
"react/Progress.tsx",
|
|
20
|
+
"react/locale.ts",
|
|
21
|
+
"react/props.ts"
|
|
22
|
+
],
|
|
23
|
+
"sourceHash": "sha256:4684455b4f9c43c803373f5742e9cd51a5d6b889c12d45e6ad92f8796e24cbb5"
|
|
24
|
+
},
|
|
25
|
+
"props": [
|
|
26
|
+
{
|
|
27
|
+
"name": "aria-describedby",
|
|
28
|
+
"type": "string",
|
|
29
|
+
"typeText": "string | undefined",
|
|
30
|
+
"required": false,
|
|
31
|
+
"origin": "inherited"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "aria-label",
|
|
35
|
+
"type": "string",
|
|
36
|
+
"typeText": "string | undefined",
|
|
37
|
+
"required": false,
|
|
38
|
+
"origin": "inherited"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "aria-labelledby",
|
|
42
|
+
"type": "string",
|
|
43
|
+
"typeText": "string | undefined",
|
|
44
|
+
"required": false,
|
|
45
|
+
"origin": "inherited"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "children",
|
|
49
|
+
"type": "other",
|
|
50
|
+
"typeText": "ReactNode",
|
|
51
|
+
"required": false,
|
|
52
|
+
"origin": "derived"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "className",
|
|
56
|
+
"type": "string",
|
|
57
|
+
"typeText": "string | undefined",
|
|
58
|
+
"required": false,
|
|
59
|
+
"origin": "derived"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "classNames",
|
|
63
|
+
"type": "other",
|
|
64
|
+
"typeText": "Partial<Record<ProgressSlot, string>> | undefined",
|
|
65
|
+
"required": false,
|
|
66
|
+
"origin": "derived"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "hidden",
|
|
70
|
+
"type": "boolean",
|
|
71
|
+
"typeText": "boolean | undefined",
|
|
72
|
+
"required": false,
|
|
73
|
+
"origin": "inherited"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "id",
|
|
77
|
+
"type": "string",
|
|
78
|
+
"typeText": "string | undefined",
|
|
79
|
+
"required": false,
|
|
80
|
+
"origin": "inherited"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "label",
|
|
84
|
+
"type": "other",
|
|
85
|
+
"typeText": "ReactNode",
|
|
86
|
+
"required": false,
|
|
87
|
+
"origin": "derived",
|
|
88
|
+
"description": "Names the bar. Shown above it, and used as the accessible name.",
|
|
89
|
+
"descriptionOrigin": "jsdoc"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "localeText",
|
|
93
|
+
"type": "other",
|
|
94
|
+
"typeText": "Partial<ProgressLocaleText> | undefined",
|
|
95
|
+
"required": false,
|
|
96
|
+
"origin": "derived"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "max",
|
|
100
|
+
"type": "number",
|
|
101
|
+
"typeText": "number | undefined",
|
|
102
|
+
"required": false,
|
|
103
|
+
"default": 100,
|
|
104
|
+
"origin": "derived",
|
|
105
|
+
"description": "What `value` is measured against. Default 100.",
|
|
106
|
+
"descriptionOrigin": "jsdoc"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "ref",
|
|
110
|
+
"type": "other",
|
|
111
|
+
"typeText": "Ref<HTMLDivElement> | undefined",
|
|
112
|
+
"required": false,
|
|
113
|
+
"origin": "derived"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"name": "showValue",
|
|
117
|
+
"type": "boolean",
|
|
118
|
+
"typeText": "boolean | undefined",
|
|
119
|
+
"required": false,
|
|
120
|
+
"default": false,
|
|
121
|
+
"origin": "derived",
|
|
122
|
+
"description": "Show the percentage beside the label.",
|
|
123
|
+
"descriptionOrigin": "jsdoc"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "size",
|
|
127
|
+
"type": "enum",
|
|
128
|
+
"values": [
|
|
129
|
+
"lg",
|
|
130
|
+
"md",
|
|
131
|
+
"sm"
|
|
132
|
+
],
|
|
133
|
+
"typeText": "ProgressSize | undefined",
|
|
134
|
+
"required": false,
|
|
135
|
+
"default": "md",
|
|
136
|
+
"origin": "derived",
|
|
137
|
+
"description": "Default `md`.",
|
|
138
|
+
"descriptionOrigin": "jsdoc"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"name": "style",
|
|
142
|
+
"type": "other",
|
|
143
|
+
"typeText": "CSSProperties | undefined",
|
|
144
|
+
"required": false,
|
|
145
|
+
"origin": "derived"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "tabIndex",
|
|
149
|
+
"type": "number",
|
|
150
|
+
"typeText": "number | undefined",
|
|
151
|
+
"required": false,
|
|
152
|
+
"origin": "inherited"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "thickness",
|
|
156
|
+
"type": "number",
|
|
157
|
+
"typeText": "number | undefined",
|
|
158
|
+
"required": false,
|
|
159
|
+
"default": 4,
|
|
160
|
+
"origin": "derived",
|
|
161
|
+
"description": "Ring thickness in pixels. Default 4.",
|
|
162
|
+
"descriptionOrigin": "jsdoc"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "title",
|
|
166
|
+
"type": "string",
|
|
167
|
+
"typeText": "string | undefined",
|
|
168
|
+
"required": false,
|
|
169
|
+
"origin": "inherited"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "value",
|
|
173
|
+
"type": "number",
|
|
174
|
+
"typeText": "number | null | undefined",
|
|
175
|
+
"required": false,
|
|
176
|
+
"default": null,
|
|
177
|
+
"origin": "derived",
|
|
178
|
+
"description": "How far along. `null` means the length is not known yet.",
|
|
179
|
+
"descriptionOrigin": "jsdoc"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "valueText",
|
|
183
|
+
"type": "other",
|
|
184
|
+
"typeText": "ReactNode",
|
|
185
|
+
"required": false,
|
|
186
|
+
"origin": "derived",
|
|
187
|
+
"description": "Replace what is shown and read, e.g. \"3.2 MB of 8 MB\".",
|
|
188
|
+
"descriptionOrigin": "jsdoc"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": "variant",
|
|
192
|
+
"type": "enum",
|
|
193
|
+
"values": [
|
|
194
|
+
"accent",
|
|
195
|
+
"danger",
|
|
196
|
+
"success",
|
|
197
|
+
"warning"
|
|
198
|
+
],
|
|
199
|
+
"typeText": "ProgressVariant | undefined",
|
|
200
|
+
"required": false,
|
|
201
|
+
"default": "accent",
|
|
202
|
+
"origin": "derived",
|
|
203
|
+
"description": "Default `accent`.",
|
|
204
|
+
"descriptionOrigin": "jsdoc"
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
"inherits": [
|
|
208
|
+
{
|
|
209
|
+
"from": "HTMLAttributes<HTMLDivElement>",
|
|
210
|
+
"omitted": [
|
|
211
|
+
"role"
|
|
212
|
+
],
|
|
213
|
+
"passthrough": true
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
"events": [],
|
|
217
|
+
"slots": [
|
|
218
|
+
"root",
|
|
219
|
+
"header",
|
|
220
|
+
"label",
|
|
221
|
+
"value",
|
|
222
|
+
"track",
|
|
223
|
+
"bar",
|
|
224
|
+
"svg"
|
|
225
|
+
],
|
|
226
|
+
"states": [
|
|
227
|
+
{
|
|
228
|
+
"attr": "data-indeterminate"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"attr": "data-size",
|
|
232
|
+
"values": [
|
|
233
|
+
"lg",
|
|
234
|
+
"sm"
|
|
235
|
+
]
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"attr": "data-theme",
|
|
239
|
+
"values": [
|
|
240
|
+
"dark",
|
|
241
|
+
"light"
|
|
242
|
+
]
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"attr": "data-variant",
|
|
246
|
+
"values": [
|
|
247
|
+
"danger",
|
|
248
|
+
"success",
|
|
249
|
+
"warning"
|
|
250
|
+
]
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"accessibility": {
|
|
254
|
+
"supplied": [],
|
|
255
|
+
"required": []
|
|
256
|
+
},
|
|
257
|
+
"composition": {},
|
|
258
|
+
"operations": {},
|
|
259
|
+
"intentDomains": [],
|
|
260
|
+
"safeMutations": {},
|
|
261
|
+
"examples": [],
|
|
262
|
+
"coverage": {
|
|
263
|
+
"propsTotal": 21,
|
|
264
|
+
"propsDescribed": 8,
|
|
265
|
+
"describedPct": 38,
|
|
266
|
+
"authoredSections": [
|
|
267
|
+
"accessibility"
|
|
268
|
+
]
|
|
269
|
+
}
|
|
270
|
+
}
|
|
@@ -1,201 +1,200 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Progress and CircularProgress styles.
|
|
3
|
-
*
|
|
4
|
-
* The bar is drawn from --pr-fraction (0 to 1) rather than a width in percent,
|
|
5
|
-
* so the same number drives the bar, the ring and any transition. Tokens read
|
|
6
|
-
* the shared --gbs-* variables when they are set on an ancestor (set them on
|
|
7
|
-
* :root to theme every component at once). Rules
|
|
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
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* Progress and CircularProgress styles.
|
|
3
|
+
*
|
|
4
|
+
* The bar is drawn from --pr-fraction (0 to 1) rather than a width in percent,
|
|
5
|
+
* so the same number drives the bar, the ring and any transition. Tokens read
|
|
6
|
+
* the shared --gbs-* variables when they are set on an ancestor (set them on
|
|
7
|
+
* :root to theme every component at once). Rules are unlayered: they beat a
|
|
8
|
+
* framework reset on specificity, and lose to anything you pass through
|
|
9
|
+
* `className`. With Tailwind v4, import this file after the framework and
|
|
10
|
+
* inside its components layer - see the README.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
.pr-root,
|
|
14
|
+
.pr-circle {
|
|
15
|
+
--pr-fg: var(--gbs-fg, var(--dg-fg, light-dark(#18181b, #f4f4f5)));
|
|
16
|
+
--pr-muted: var(--gbs-muted, var(--dg-muted, light-dark(#71717a, #a1a1aa)));
|
|
17
|
+
--pr-track: var(--gbs-subtle, light-dark(#e4e4e7, #27272a));
|
|
18
|
+
--pr-accent: var(--gbs-accent, var(--dg-accent, light-dark(#2563eb, #60a5fa)));
|
|
19
|
+
--pr-success: var(--gbs-success, light-dark(#15803d, #4ade80));
|
|
20
|
+
--pr-warning: var(--gbs-warning, light-dark(#b45309, #fbbf24));
|
|
21
|
+
--pr-danger: var(--gbs-danger, var(--dg-danger, light-dark(#dc2626, #f87171)));
|
|
22
|
+
--pr-font-size: var(--gbs-font-size, var(--dg-font-size, 13px));
|
|
23
|
+
--pr-height: 8px;
|
|
24
|
+
--pr-duration: 240ms;
|
|
25
|
+
--pr-bar: var(--pr-accent);
|
|
26
|
+
|
|
27
|
+
color-scheme: inherit;
|
|
28
|
+
font-size: var(--pr-font-size);
|
|
29
|
+
color: var(--pr-fg);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:where(.dark, [data-theme="dark"]) :is(.pr-root, .pr-circle) {
|
|
33
|
+
color-scheme: dark;
|
|
34
|
+
}
|
|
35
|
+
:where(.light, [data-theme="light"]) :is(.pr-root, .pr-circle) {
|
|
36
|
+
color-scheme: light;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:where(.pr-root, .pr-circle) *,
|
|
40
|
+
:where(.pr-root, .pr-circle) *::before,
|
|
41
|
+
:where(.pr-root, .pr-circle) *::after {
|
|
42
|
+
box-sizing: border-box;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.pr-root[data-variant="success"],
|
|
46
|
+
.pr-circle[data-variant="success"] {
|
|
47
|
+
--pr-bar: var(--pr-success);
|
|
48
|
+
}
|
|
49
|
+
.pr-root[data-variant="warning"],
|
|
50
|
+
.pr-circle[data-variant="warning"] {
|
|
51
|
+
--pr-bar: var(--pr-warning);
|
|
52
|
+
}
|
|
53
|
+
.pr-root[data-variant="danger"],
|
|
54
|
+
.pr-circle[data-variant="danger"] {
|
|
55
|
+
--pr-bar: var(--pr-danger);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* ------------------------------------------------------------------ bar */
|
|
59
|
+
|
|
60
|
+
.pr-root {
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
gap: 6px;
|
|
64
|
+
min-width: 0;
|
|
65
|
+
}
|
|
66
|
+
.pr-root[data-size="sm"] {
|
|
67
|
+
--pr-height: 4px;
|
|
68
|
+
--pr-font-size: 12px;
|
|
69
|
+
}
|
|
70
|
+
.pr-root[data-size="lg"] {
|
|
71
|
+
--pr-height: 12px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.pr-header {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: baseline;
|
|
77
|
+
justify-content: space-between;
|
|
78
|
+
gap: 12px;
|
|
79
|
+
min-width: 0;
|
|
80
|
+
}
|
|
81
|
+
.pr-label {
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
font-weight: 500;
|
|
84
|
+
text-overflow: ellipsis;
|
|
85
|
+
white-space: nowrap;
|
|
86
|
+
}
|
|
87
|
+
.pr-value {
|
|
88
|
+
flex: none;
|
|
89
|
+
color: var(--pr-muted);
|
|
90
|
+
font-variant-numeric: tabular-nums;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.pr-track {
|
|
94
|
+
position: relative;
|
|
95
|
+
width: 100%;
|
|
96
|
+
height: var(--pr-height);
|
|
97
|
+
border-radius: 999px;
|
|
98
|
+
background: var(--pr-track);
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.pr-bar {
|
|
103
|
+
width: 100%;
|
|
104
|
+
height: 100%;
|
|
105
|
+
border-radius: inherit;
|
|
106
|
+
background: var(--pr-bar);
|
|
107
|
+
/* `scaleX` from the origin: the compositor handles it, so a bar that ticks
|
|
108
|
+
up every few milliseconds costs nothing in layout. */
|
|
109
|
+
transform-origin: left center;
|
|
110
|
+
scale: var(--pr-fraction, 0) 1;
|
|
111
|
+
transition: scale var(--pr-duration) ease;
|
|
112
|
+
}
|
|
113
|
+
.pr-root:dir(rtl) .pr-bar {
|
|
114
|
+
transform-origin: right center;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* With no length to show, a short bar sweeps the track instead. */
|
|
118
|
+
.pr-root[data-indeterminate] .pr-bar {
|
|
119
|
+
width: 35%;
|
|
120
|
+
scale: 1 1;
|
|
121
|
+
animation: pr-sweep 1.3s ease-in-out infinite;
|
|
122
|
+
}
|
|
123
|
+
@keyframes pr-sweep {
|
|
124
|
+
from {
|
|
125
|
+
translate: -100%;
|
|
126
|
+
}
|
|
127
|
+
to {
|
|
128
|
+
translate: 300%;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* ----------------------------------------------------------------- ring */
|
|
133
|
+
|
|
134
|
+
.pr-circle {
|
|
135
|
+
position: relative;
|
|
136
|
+
display: inline-flex;
|
|
137
|
+
flex: none;
|
|
138
|
+
align-items: center;
|
|
139
|
+
justify-content: center;
|
|
140
|
+
vertical-align: middle;
|
|
141
|
+
}
|
|
142
|
+
.pr-svg {
|
|
143
|
+
width: 100%;
|
|
144
|
+
height: 100%;
|
|
145
|
+
/* Zero is at three o'clock in SVG; a progress ring starts at the top. */
|
|
146
|
+
rotate: -90deg;
|
|
147
|
+
}
|
|
148
|
+
.pr-circle-track {
|
|
149
|
+
stroke: var(--pr-track);
|
|
150
|
+
}
|
|
151
|
+
.pr-circle-bar {
|
|
152
|
+
stroke: var(--pr-bar);
|
|
153
|
+
transition: stroke-dashoffset var(--pr-duration) ease;
|
|
154
|
+
}
|
|
155
|
+
.pr-circle[data-indeterminate] .pr-svg {
|
|
156
|
+
animation: pr-spin 1s linear infinite;
|
|
157
|
+
}
|
|
158
|
+
@keyframes pr-spin {
|
|
159
|
+
from {
|
|
160
|
+
rotate: -90deg;
|
|
161
|
+
}
|
|
162
|
+
to {
|
|
163
|
+
rotate: 270deg;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.pr-circle-label {
|
|
168
|
+
position: absolute;
|
|
169
|
+
font-size: calc(var(--pr-font-size) - 1px);
|
|
170
|
+
font-variant-numeric: tabular-nums;
|
|
171
|
+
font-weight: 600;
|
|
172
|
+
line-height: 1;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
@media (prefers-reduced-motion: reduce) {
|
|
176
|
+
.pr-bar,
|
|
177
|
+
.pr-circle-bar {
|
|
178
|
+
transition: none;
|
|
179
|
+
}
|
|
180
|
+
/* Movement that repeats forever is what reduced motion is about, but a
|
|
181
|
+
stopped indeterminate bar would look broken — so it slows instead. */
|
|
182
|
+
.pr-root[data-indeterminate] .pr-bar {
|
|
183
|
+
animation-duration: 3s;
|
|
184
|
+
}
|
|
185
|
+
.pr-circle[data-indeterminate] .pr-svg {
|
|
186
|
+
animation-duration: 2.5s;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@media (forced-colors: active) {
|
|
191
|
+
.pr-track {
|
|
192
|
+
border: 1px solid CanvasText;
|
|
193
|
+
}
|
|
194
|
+
.pr-bar {
|
|
195
|
+
background: Highlight;
|
|
196
|
+
}
|
|
197
|
+
.pr-circle-bar {
|
|
198
|
+
stroke: Highlight;
|
|
199
|
+
}
|
|
200
|
+
}
|