@lablup/ui-common-cli 0.2.0-alpha.15
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/LICENSE +202 -0
- package/NOTICE +8 -0
- package/README.md +28 -0
- package/bin/ui-common.mjs +12 -0
- package/cli/agents.mjs +335 -0
- package/cli/diff.mjs +125 -0
- package/cli/lab-peer.mjs +226 -0
- package/cli/main.mjs +97 -0
- package/cli/passthrough.mjs +153 -0
- package/cli/paths.mjs +290 -0
- package/cli/report.mjs +157 -0
- package/cli/resolve.mjs +257 -0
- package/cli/rewrite.mjs +133 -0
- package/cli/semver.mjs +278 -0
- package/cli/shadow.mjs +161 -0
- package/cli/sync-astryx.mjs +417 -0
- package/cli/upgrade.mjs +776 -0
- package/codemods/0.2/components.mjs +903 -0
- package/codemods/0.2/elements.mjs +745 -0
- package/codemods/0.2/index.mjs +68 -0
- package/codemods/0.2/legacy-classes.json +292 -0
- package/codemods/0.2/local-modules.mjs +510 -0
- package/codemods/0.2/map.mjs +178 -0
- package/codemods/0.2/package-json.mjs +333 -0
- package/codemods/0.2/scan.mjs +397 -0
- package/codemods/0.2/stylesheets.mjs +479 -0
- package/codemods/0.2/theme.mjs +325 -0
- package/codemods/lib/jsx.mjs +352 -0
- package/codemods/lib/todo.mjs +151 -0
- package/codemods/registry.mjs +95 -0
- package/codemods/upstream.mjs +155 -0
- package/migration/0.1-to-0.2.json +629 -0
- package/package.json +50 -0
|
@@ -0,0 +1,629 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "Machine-readable map of what 0.2 removed, renamed or restyled relative to 0.1, for `ui-common upgrade --from 0.1`. Each removedComponents entry names every 0.1 import that reached the component, its Astryx replacement, and the prop changes: `propRenames` a codemod can apply, `valueMaps` for renamed enum values, and `manual` for what it cannot prove (leave a `// TODO(ui-common-upgrade):` marker and a report entry). In 0.2 the root barrel name of a removed component that Astryx also exports (Badge, Button, EmptyState, ProgressBar, Skeleton, Tooltip) already resolves to Astryx's component, so a root import keeps its specifier and only needs the prop changes.",
|
|
3
|
+
"from": "0.1",
|
|
4
|
+
"to": "0.2",
|
|
5
|
+
"removedComponents": [
|
|
6
|
+
{
|
|
7
|
+
"name": "Badge",
|
|
8
|
+
"oldImports": [
|
|
9
|
+
{ "specifier": "@lablup/ui-common", "names": ["Badge", "BadgeProps"] },
|
|
10
|
+
{
|
|
11
|
+
"specifier": "@lablup/ui-common/components/Badge",
|
|
12
|
+
"names": ["Badge", "BadgeProps"]
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"replacement": {
|
|
16
|
+
"specifier": "@lablup/ui-common/Badge",
|
|
17
|
+
"names": { "Badge": "Badge", "BadgeProps": "BadgeProps" }
|
|
18
|
+
},
|
|
19
|
+
"alternatives": [
|
|
20
|
+
{
|
|
21
|
+
"specifier": "@lablup/ui-common/Token",
|
|
22
|
+
"names": { "Badge": "Token", "BadgeProps": "TokenProps" },
|
|
23
|
+
"when": "the badge is a removable or clickable chip rather than a status label"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"propRenames": [
|
|
27
|
+
{ "from": "children", "to": "label", "kind": "children-to-prop" }
|
|
28
|
+
],
|
|
29
|
+
"valueMaps": {
|
|
30
|
+
"variant": {
|
|
31
|
+
"default": "neutral",
|
|
32
|
+
"success": "success",
|
|
33
|
+
"warning": "warning",
|
|
34
|
+
"danger": "error",
|
|
35
|
+
"info": "info",
|
|
36
|
+
"primary": null
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"manual": [
|
|
40
|
+
"variant=\"primary\" has no semantic Badge variant; pick `info` or a colour variant such as `orange`.",
|
|
41
|
+
"size (small | medium) has no Badge counterpart; drop it.",
|
|
42
|
+
"The .badge / .badge--* classes are gone; Astryx's stable class is .astryx-badge."
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "BaseCard",
|
|
47
|
+
"oldImports": [
|
|
48
|
+
{
|
|
49
|
+
"specifier": "@lablup/ui-common",
|
|
50
|
+
"names": ["BaseCard", "BaseCardProps", "BaseCardVariant", "BaseCardState"]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"specifier": "@lablup/ui-common/components/BaseCard",
|
|
54
|
+
"names": [
|
|
55
|
+
"BaseCard",
|
|
56
|
+
"BaseCardProps",
|
|
57
|
+
"BaseCardVariant",
|
|
58
|
+
"BaseCardState",
|
|
59
|
+
"default"
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"replacement": {
|
|
64
|
+
"specifier": "@lablup/ui-common/Card",
|
|
65
|
+
"names": { "BaseCard": "Card", "BaseCardProps": "CardProps" }
|
|
66
|
+
},
|
|
67
|
+
"alternatives": [
|
|
68
|
+
{
|
|
69
|
+
"specifier": "@lablup/ui-common/ClickableCard",
|
|
70
|
+
"names": {
|
|
71
|
+
"BaseCard": "ClickableCard",
|
|
72
|
+
"BaseCardProps": "ClickableCardProps"
|
|
73
|
+
},
|
|
74
|
+
"when": "the card has onClick or clickable; ClickableCard requires a `label` (take it from ariaLabel)"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"propRenames": [
|
|
78
|
+
{ "from": "testId", "to": "data-testid" },
|
|
79
|
+
{ "from": "ariaLabel", "to": "aria-label" },
|
|
80
|
+
{ "from": "ariaChecked", "to": "aria-checked" }
|
|
81
|
+
],
|
|
82
|
+
"valueMaps": {},
|
|
83
|
+
"manual": [
|
|
84
|
+
"variant (default | installed | available) maps to Card variant by intent: default -> \"muted\", installed -> \"default\", available -> \"muted\".",
|
|
85
|
+
"state (loading | active | disabled | warning) has no Card counterpart; express it in the content, or use ClickableCard isDisabled for disabled.",
|
|
86
|
+
"direction=\"row\" has no Card counterpart; wrap the children in an HStack.",
|
|
87
|
+
"hoverable, clickable, onKeyDown, role and tabIndex: ClickableCard owns hover, focus and keyboard activation.",
|
|
88
|
+
"The .base-card classes and the --corner-accent-color property are gone."
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "Button",
|
|
93
|
+
"oldImports": [
|
|
94
|
+
{ "specifier": "@lablup/ui-common", "names": ["Button", "ButtonProps"] },
|
|
95
|
+
{
|
|
96
|
+
"specifier": "@lablup/ui-common/components/Button",
|
|
97
|
+
"names": ["Button", "ButtonProps"]
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"replacement": {
|
|
101
|
+
"specifier": "@lablup/ui-common/Button",
|
|
102
|
+
"names": { "Button": "Button", "ButtonProps": "ButtonProps" }
|
|
103
|
+
},
|
|
104
|
+
"alternatives": [
|
|
105
|
+
{
|
|
106
|
+
"specifier": "@lablup/ui-common/IconButton",
|
|
107
|
+
"names": { "Button": "IconButton", "ButtonProps": "IconButtonProps" },
|
|
108
|
+
"when": "iconOnly is set; the accessible name moves from ariaLabel to label"
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"propRenames": [
|
|
112
|
+
{
|
|
113
|
+
"from": "children",
|
|
114
|
+
"to": "label",
|
|
115
|
+
"kind": "children-to-prop",
|
|
116
|
+
"onlyWhen": "children is a string literal or expression of type string"
|
|
117
|
+
},
|
|
118
|
+
{ "from": "disabled", "to": "isDisabled" },
|
|
119
|
+
{ "from": "loading", "to": "isLoading" },
|
|
120
|
+
{ "from": "iconOnly", "to": "isIconOnly" },
|
|
121
|
+
{ "from": "ariaLabel", "to": "aria-label" },
|
|
122
|
+
{ "from": "fullWidth", "to": "width", "value": "100%" },
|
|
123
|
+
{ "from": "title", "to": "tooltip" }
|
|
124
|
+
],
|
|
125
|
+
"valueMaps": {
|
|
126
|
+
"variant": {
|
|
127
|
+
"primary": "primary",
|
|
128
|
+
"secondary": "secondary",
|
|
129
|
+
"danger": "destructive",
|
|
130
|
+
"ghost": "ghost",
|
|
131
|
+
"text": "ghost",
|
|
132
|
+
"outline": "secondary",
|
|
133
|
+
"success": null
|
|
134
|
+
},
|
|
135
|
+
"size": { "xsmall": "sm", "small": "sm", "medium": "md", "large": "lg" }
|
|
136
|
+
},
|
|
137
|
+
"manual": [
|
|
138
|
+
"`label` is required. A non-string child needs `label` for the accessible name and the node as children.",
|
|
139
|
+
"variant=\"success\" has no Button variant; use primary.",
|
|
140
|
+
"iconPosition=\"right\" becomes `endContent` (an Icon or Badge element only).",
|
|
141
|
+
"shape=\"circle\", inline and active have no counterpart.",
|
|
142
|
+
"The .button / .button--* classes are gone; Astryx's stable class is .astryx-button."
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"name": "DataTable",
|
|
147
|
+
"oldImports": [
|
|
148
|
+
{
|
|
149
|
+
"specifier": "@lablup/ui-common",
|
|
150
|
+
"names": [
|
|
151
|
+
"DataTable",
|
|
152
|
+
"DataTableColumn",
|
|
153
|
+
"DataTableProps",
|
|
154
|
+
"DataTablePersistedState",
|
|
155
|
+
"SortDirection"
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"specifier": "@lablup/ui-common/components/DataTable",
|
|
160
|
+
"names": [
|
|
161
|
+
"DataTable",
|
|
162
|
+
"DataTableColumn",
|
|
163
|
+
"DataTableProps",
|
|
164
|
+
"DataTablePersistedState",
|
|
165
|
+
"SortDirection",
|
|
166
|
+
"default"
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"replacement": {
|
|
171
|
+
"specifier": "@lablup/ui-common/Table",
|
|
172
|
+
"names": {
|
|
173
|
+
"DataTable": "Table",
|
|
174
|
+
"DataTableProps": "TableProps",
|
|
175
|
+
"DataTableColumn": "TableColumn"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"alternatives": [],
|
|
179
|
+
"propRenames": [
|
|
180
|
+
{ "from": "rows", "to": "data" },
|
|
181
|
+
{
|
|
182
|
+
"from": "getRowKey",
|
|
183
|
+
"to": "idKey",
|
|
184
|
+
"kind": "signature-change",
|
|
185
|
+
"note": "idKey takes (item) or a property name; the index argument is gone"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"columnRenames": [
|
|
189
|
+
{ "from": "id", "to": "key" },
|
|
190
|
+
{ "from": "render", "to": "renderCell", "kind": "signature-change" },
|
|
191
|
+
{ "from": "initialWidth", "to": "width" }
|
|
192
|
+
],
|
|
193
|
+
"valueMaps": {},
|
|
194
|
+
"manual": [
|
|
195
|
+
"Sorting, column resizing, column visibility and persisted column state are Table plugins (`plugins`), not props.",
|
|
196
|
+
"loading, loadingState and emptyState: render them around the Table.",
|
|
197
|
+
"onRowClick, isRowClickable and rowClassName: use the row-interaction plugin or children mode.",
|
|
198
|
+
"The .data-table classes are gone."
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "Drawer",
|
|
203
|
+
"oldImports": [
|
|
204
|
+
{ "specifier": "@lablup/ui-common", "names": ["Drawer", "DrawerProps"] },
|
|
205
|
+
{
|
|
206
|
+
"specifier": "@lablup/ui-common/components/Drawer",
|
|
207
|
+
"names": ["Drawer", "DrawerProps"]
|
|
208
|
+
}
|
|
209
|
+
],
|
|
210
|
+
"replacement": {
|
|
211
|
+
"specifier": "@lablup/ui-common/lab",
|
|
212
|
+
"names": { "Drawer": "Drawer", "DrawerProps": "DrawerProps" }
|
|
213
|
+
},
|
|
214
|
+
"alternatives": [],
|
|
215
|
+
"requiresPackages": { "@astryxdesign/lab": "0.6.2-canary.c9fb1ad" },
|
|
216
|
+
"propRenames": [
|
|
217
|
+
{
|
|
218
|
+
"from": "onClose",
|
|
219
|
+
"to": "onOpenChange",
|
|
220
|
+
"kind": "signature-change",
|
|
221
|
+
"note": "called with false; wrap as (open) => { if (!open) onClose(); }"
|
|
222
|
+
},
|
|
223
|
+
{ "from": "title", "to": "label", "onlyWhen": "title is a string" }
|
|
224
|
+
],
|
|
225
|
+
"valueMaps": { "width": { "narrow": 400, "medium": 520, "wide": 900 } },
|
|
226
|
+
"manual": [
|
|
227
|
+
"lab Drawer renders no header: render the title, subtitle and footer inside children.",
|
|
228
|
+
"closeLabel, ariaLabelledBy and ariaDescribedBy have no counterpart.",
|
|
229
|
+
"preventDismiss and onDismissAttempt: decline the close in onOpenChange.",
|
|
230
|
+
"The .drawer classes are gone."
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"name": "EmptyState",
|
|
235
|
+
"oldImports": [
|
|
236
|
+
{
|
|
237
|
+
"specifier": "@lablup/ui-common",
|
|
238
|
+
"names": [
|
|
239
|
+
"EmptyState",
|
|
240
|
+
"EmptyStateProps",
|
|
241
|
+
"EmptyStateAction",
|
|
242
|
+
"EmptyStateSecondaryAction"
|
|
243
|
+
]
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"specifier": "@lablup/ui-common/components/EmptyState",
|
|
247
|
+
"names": [
|
|
248
|
+
"EmptyState",
|
|
249
|
+
"EmptyStateProps",
|
|
250
|
+
"EmptyStateAction",
|
|
251
|
+
"EmptyStateSecondaryAction"
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
"replacement": {
|
|
256
|
+
"specifier": "@lablup/ui-common/EmptyState",
|
|
257
|
+
"names": { "EmptyState": "EmptyState", "EmptyStateProps": "EmptyStateProps" }
|
|
258
|
+
},
|
|
259
|
+
"alternatives": [],
|
|
260
|
+
"propRenames": [{ "from": "illustration", "to": "icon" }],
|
|
261
|
+
"valueMaps": {},
|
|
262
|
+
"manual": [
|
|
263
|
+
"primaryAction and secondaryAction become `actions`, a node: <Button variant=\"primary\" label={a.label} onClick={a.onClick} /> and a secondary Button, or a Link for a secondaryAction with href.",
|
|
264
|
+
"showIllustration={false}: omit `icon`.",
|
|
265
|
+
"children has no slot; put it in `actions` or below the EmptyState.",
|
|
266
|
+
"The title renders as an h3 by default; set headingLevel to fit the outline.",
|
|
267
|
+
"The .empty-state classes are gone."
|
|
268
|
+
]
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"name": "ProgressBar",
|
|
272
|
+
"oldImports": [
|
|
273
|
+
{
|
|
274
|
+
"specifier": "@lablup/ui-common",
|
|
275
|
+
"names": [
|
|
276
|
+
"ProgressBar",
|
|
277
|
+
"ProgressBarProps",
|
|
278
|
+
"ProgressBarVariant",
|
|
279
|
+
"ProgressBarSize"
|
|
280
|
+
]
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"specifier": "@lablup/ui-common/components/ProgressBar",
|
|
284
|
+
"names": [
|
|
285
|
+
"ProgressBar",
|
|
286
|
+
"ProgressBarProps",
|
|
287
|
+
"ProgressBarVariant",
|
|
288
|
+
"ProgressBarSize",
|
|
289
|
+
"default"
|
|
290
|
+
]
|
|
291
|
+
}
|
|
292
|
+
],
|
|
293
|
+
"replacement": {
|
|
294
|
+
"specifier": "@lablup/ui-common/ProgressBar",
|
|
295
|
+
"names": {
|
|
296
|
+
"ProgressBar": "ProgressBar",
|
|
297
|
+
"ProgressBarProps": "ProgressBarProps"
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"alternatives": [],
|
|
301
|
+
"propRenames": [
|
|
302
|
+
{ "from": "showLabel", "to": "hasValueLabel" },
|
|
303
|
+
{ "from": "ariaLabel", "to": "label", "onlyWhen": "label is not also set" }
|
|
304
|
+
],
|
|
305
|
+
"valueMaps": {
|
|
306
|
+
"variant": {
|
|
307
|
+
"primary": "accent",
|
|
308
|
+
"success": "success",
|
|
309
|
+
"error": "error",
|
|
310
|
+
"warning": "warning"
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"manual": [
|
|
314
|
+
"value={null} becomes isIndeterminate (and no value).",
|
|
315
|
+
"`label` is required and is the accessible name; the old visible `label` text maps to it with isLabelHidden when it was not shown.",
|
|
316
|
+
"size and animated have no counterpart.",
|
|
317
|
+
"The .progress-bar classes are gone."
|
|
318
|
+
]
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"name": "Select",
|
|
322
|
+
"oldImports": [
|
|
323
|
+
{
|
|
324
|
+
"specifier": "@lablup/ui-common",
|
|
325
|
+
"names": ["Select", "SelectOption", "SelectProps"]
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"specifier": "@lablup/ui-common/components/Select",
|
|
329
|
+
"names": ["Select", "SelectOption", "SelectProps"]
|
|
330
|
+
}
|
|
331
|
+
],
|
|
332
|
+
"replacement": {
|
|
333
|
+
"specifier": "@lablup/ui-common/Selector",
|
|
334
|
+
"names": {
|
|
335
|
+
"Select": "Selector",
|
|
336
|
+
"SelectProps": "SelectorProps",
|
|
337
|
+
"SelectOption": "SelectorOptionData"
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"alternatives": [],
|
|
341
|
+
"propRenames": [
|
|
342
|
+
{ "from": "disabled", "to": "isDisabled" },
|
|
343
|
+
{ "from": "searchable", "to": "hasSearch" },
|
|
344
|
+
{ "from": "noOptionsLabel", "to": "emptyText" },
|
|
345
|
+
{
|
|
346
|
+
"from": "aria-label",
|
|
347
|
+
"to": "label",
|
|
348
|
+
"onlyWhen": "label is not set; add isLabelHidden"
|
|
349
|
+
}
|
|
350
|
+
],
|
|
351
|
+
"valueMaps": {
|
|
352
|
+
"size": { "small": "sm", "default": "md", "medium": "md", "large": "lg" }
|
|
353
|
+
},
|
|
354
|
+
"manual": [
|
|
355
|
+
"`label` is required and is a string; a node label needs a string for the accessible name.",
|
|
356
|
+
"invalid becomes status={{ type: \"error\" }}.",
|
|
357
|
+
"fullWidth, onBlur and aria-describedby (use `description`) have no direct counterpart.",
|
|
358
|
+
"Selector is not generic over the value type; onChange receives a string.",
|
|
359
|
+
"The .select classes are gone."
|
|
360
|
+
]
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"name": "Skeleton",
|
|
364
|
+
"oldImports": [
|
|
365
|
+
{ "specifier": "@lablup/ui-common", "names": ["Skeleton", "SkeletonProps"] },
|
|
366
|
+
{
|
|
367
|
+
"specifier": "@lablup/ui-common/components/Skeleton",
|
|
368
|
+
"names": ["Skeleton", "SkeletonProps"]
|
|
369
|
+
}
|
|
370
|
+
],
|
|
371
|
+
"replacement": {
|
|
372
|
+
"specifier": "@lablup/ui-common/Skeleton",
|
|
373
|
+
"names": { "Skeleton": "Skeleton", "SkeletonProps": "SkeletonProps" }
|
|
374
|
+
},
|
|
375
|
+
"alternatives": [],
|
|
376
|
+
"note": "Only the base Skeleton is removed. SkeletonCard, SkeletonText, SkeletonChart and SkeletonRow stay, at the root and at @lablup/ui-common/components/Skeleton.",
|
|
377
|
+
"propRenames": [{ "from": "testId", "to": "data-testid" }],
|
|
378
|
+
"valueMaps": { "variant": { "rect": null, "circle": null, "text": null } },
|
|
379
|
+
"manual": [
|
|
380
|
+
"variant=\"circle\" becomes radius=\"rounded\"; variant=\"text\" becomes height=\"1em\"; variant=\"rect\" is the default.",
|
|
381
|
+
"Astryx Skeleton is always decorative (aria-hidden). loadingLabel and decorative are gone: put role=\"status\" and the label on the region that waits.",
|
|
382
|
+
"width and height default to 100% (was 100% and 20px).",
|
|
383
|
+
"The .skeleton and .skeleton__shimmer classes are gone; Astryx's stable class is .astryx-skeleton."
|
|
384
|
+
]
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"name": "StatusTag",
|
|
388
|
+
"oldImports": [
|
|
389
|
+
{
|
|
390
|
+
"specifier": "@lablup/ui-common",
|
|
391
|
+
"names": ["StatusTag", "StatusTagProps", "StatusKind"]
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"specifier": "@lablup/ui-common/components/StatusTag",
|
|
395
|
+
"names": ["StatusTag", "StatusTagProps", "StatusKind", "default"]
|
|
396
|
+
}
|
|
397
|
+
],
|
|
398
|
+
"replacement": {
|
|
399
|
+
"specifier": "@lablup/ui-common/StatusDot",
|
|
400
|
+
"names": { "StatusTag": "StatusDot", "StatusTagProps": "StatusDotProps" }
|
|
401
|
+
},
|
|
402
|
+
"alternatives": [],
|
|
403
|
+
"propRenames": [
|
|
404
|
+
{ "from": "state", "to": "variant", "kind": "value-map" },
|
|
405
|
+
{ "from": "pulse", "to": "isPulsing" }
|
|
406
|
+
],
|
|
407
|
+
"valueMaps": {
|
|
408
|
+
"state": {
|
|
409
|
+
"running": "success",
|
|
410
|
+
"preparing": "accent",
|
|
411
|
+
"idle": "neutral",
|
|
412
|
+
"busy": "accent",
|
|
413
|
+
"stopping": "warning",
|
|
414
|
+
"terminated": "neutral",
|
|
415
|
+
"error": "error"
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
"defaultsToMaterialize": {
|
|
419
|
+
"isPulsing": { "whenState": ["preparing", "stopping", "busy"], "value": true }
|
|
420
|
+
},
|
|
421
|
+
"manual": [
|
|
422
|
+
"StatusDot renders only the dot; `label` becomes its accessible name. Keep the visible text: <HStack gap={1}><StatusDot variant=... label={label} /><Text>{label}</Text></HStack>.",
|
|
423
|
+
"size has no counterpart.",
|
|
424
|
+
"The .status-tag classes and data-testid=\"status-tag-indicator\" are gone."
|
|
425
|
+
]
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"name": "Tabs",
|
|
429
|
+
"oldImports": [
|
|
430
|
+
{
|
|
431
|
+
"specifier": "@lablup/ui-common",
|
|
432
|
+
"names": [
|
|
433
|
+
"Tabs",
|
|
434
|
+
"TabsProps",
|
|
435
|
+
"TabItem",
|
|
436
|
+
"TabGroupMeta",
|
|
437
|
+
"TabOverflowMode",
|
|
438
|
+
"TabVariant"
|
|
439
|
+
]
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"specifier": "@lablup/ui-common/components/Tabs",
|
|
443
|
+
"names": [
|
|
444
|
+
"Tabs",
|
|
445
|
+
"TabsProps",
|
|
446
|
+
"TabItem",
|
|
447
|
+
"TabGroupMeta",
|
|
448
|
+
"TabOverflowMode",
|
|
449
|
+
"TabVariant"
|
|
450
|
+
]
|
|
451
|
+
}
|
|
452
|
+
],
|
|
453
|
+
"replacement": {
|
|
454
|
+
"specifier": "@lablup/ui-common/TabList",
|
|
455
|
+
"names": { "Tabs": "TabList", "TabsProps": "TabListProps" }
|
|
456
|
+
},
|
|
457
|
+
"alternatives": [],
|
|
458
|
+
"propRenames": [
|
|
459
|
+
{ "from": "activeTab", "to": "value" },
|
|
460
|
+
{ "from": "onTabChange", "to": "onChange" }
|
|
461
|
+
],
|
|
462
|
+
"valueMaps": {},
|
|
463
|
+
"manual": [
|
|
464
|
+
"TabList renders the strip only. `tabs` (id, label, content) becomes <Tab value={id} label={label} /> children, and the active panel is rendered by the caller.",
|
|
465
|
+
"defaultTab (uncontrolled) needs caller state: TabList is controlled.",
|
|
466
|
+
"groups, overflowMode, showOverflowControls, showGroupLabels and the overflow labels: TabList chooses overflow itself (`overflow`); groups have no counterpart.",
|
|
467
|
+
"variant: underlined is the default; segmented maps to SegmentedControl; compact to size=\"sm\".",
|
|
468
|
+
"fillContainer becomes layout=\"fill\".",
|
|
469
|
+
"The .tabs classes are gone."
|
|
470
|
+
]
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"name": "Tooltip",
|
|
474
|
+
"oldImports": [
|
|
475
|
+
{ "specifier": "@lablup/ui-common", "names": ["Tooltip", "TooltipProps"] },
|
|
476
|
+
{
|
|
477
|
+
"specifier": "@lablup/ui-common/components/Tooltip",
|
|
478
|
+
"names": ["Tooltip", "TooltipProps"]
|
|
479
|
+
}
|
|
480
|
+
],
|
|
481
|
+
"replacement": {
|
|
482
|
+
"specifier": "@lablup/ui-common/Tooltip",
|
|
483
|
+
"names": { "Tooltip": "Tooltip", "TooltipProps": "TooltipProps" }
|
|
484
|
+
},
|
|
485
|
+
"alternatives": [],
|
|
486
|
+
"propRenames": [],
|
|
487
|
+
"valueMaps": { "placement": { "top": "above", "bottom": "below" } },
|
|
488
|
+
"manual": [
|
|
489
|
+
"toggleable, tooltipId, tabIndex and contentClassName have no counterpart; Astryx Tooltip handles focus and touch itself (focusTrigger, touchTrigger).",
|
|
490
|
+
"The .tooltip classes are gone."
|
|
491
|
+
]
|
|
492
|
+
}
|
|
493
|
+
],
|
|
494
|
+
"keptComponents": [
|
|
495
|
+
{
|
|
496
|
+
"name": "PageHeader",
|
|
497
|
+
"specifiers": ["@lablup/ui-common", "@lablup/ui-common/components/PageHeader"],
|
|
498
|
+
"propChanges": [],
|
|
499
|
+
"classRenames": { "page-header": "uic-page-header" },
|
|
500
|
+
"notes": [
|
|
501
|
+
"The title is Astryx Heading level 1, the retry control an Astryx Button, the dismiss control an Astryx IconButton."
|
|
502
|
+
]
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
"name": "PageLayout",
|
|
506
|
+
"specifiers": ["@lablup/ui-common", "@lablup/ui-common/components/PageLayout"],
|
|
507
|
+
"propChanges": [],
|
|
508
|
+
"classRenames": { "page-layout": "uic-page-layout" },
|
|
509
|
+
"notes": []
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"name": "StatCard",
|
|
513
|
+
"specifiers": ["@lablup/ui-common", "@lablup/ui-common/components/StatCard"],
|
|
514
|
+
"propChanges": [],
|
|
515
|
+
"classRenames": { "stat-card": "uic-stat-card" },
|
|
516
|
+
"removedClasses": ["corner-accent"],
|
|
517
|
+
"removedCustomProperties": ["--corner-accent-color"],
|
|
518
|
+
"notes": [
|
|
519
|
+
"Renders Astryx Card, or ClickableCard when onClick is set. With onClick the accessible name sits on the card's inner button, not on the root.",
|
|
520
|
+
"The loading placeholder is Astryx Skeleton (.astryx-skeleton), not .skeleton."
|
|
521
|
+
]
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"name": "ErrorState",
|
|
525
|
+
"specifiers": ["@lablup/ui-common", "@lablup/ui-common/components/ErrorState"],
|
|
526
|
+
"propChanges": [],
|
|
527
|
+
"classRenames": {
|
|
528
|
+
"error-state": "uic-error-state",
|
|
529
|
+
"error-state__action-btn": "uic-error-state__action",
|
|
530
|
+
"error-state__action-btn--primary": "uic-error-state__action--primary",
|
|
531
|
+
"error-state__action-btn--secondary": "uic-error-state__action--secondary"
|
|
532
|
+
},
|
|
533
|
+
"notes": ["The default icon is Astryx's `error` glyph."]
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"name": "SmoothHeight",
|
|
537
|
+
"specifiers": ["@lablup/ui-common", "@lablup/ui-common/components/SmoothHeight"],
|
|
538
|
+
"propChanges": [],
|
|
539
|
+
"classRenames": { "smooth-height": "uic-smooth-height" },
|
|
540
|
+
"notes": []
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
"name": "DigitPopIn",
|
|
544
|
+
"specifiers": ["@lablup/ui-common", "@lablup/ui-common/components/DigitPopIn"],
|
|
545
|
+
"propChanges": [],
|
|
546
|
+
"classRenames": { "digit-pop-in": "uic-digit-pop-in" },
|
|
547
|
+
"notes": ["The --digit-pop-in-* custom properties keep their 0.1 names."]
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
"name": "SkeletonCard",
|
|
551
|
+
"specifiers": ["@lablup/ui-common", "@lablup/ui-common/components/Skeleton"],
|
|
552
|
+
"propChanges": [],
|
|
553
|
+
"classRenames": { "skeleton-card": "uic-skeleton-card" },
|
|
554
|
+
"notes": []
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
"name": "SkeletonText",
|
|
558
|
+
"specifiers": ["@lablup/ui-common", "@lablup/ui-common/components/Skeleton"],
|
|
559
|
+
"propChanges": [],
|
|
560
|
+
"classRenames": { "skeleton-text": "uic-skeleton-text" },
|
|
561
|
+
"notes": []
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"name": "SkeletonChart",
|
|
565
|
+
"specifiers": ["@lablup/ui-common", "@lablup/ui-common/components/Skeleton"],
|
|
566
|
+
"propChanges": [],
|
|
567
|
+
"classRenames": { "skeleton-chart": "uic-skeleton-chart" },
|
|
568
|
+
"notes": []
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"name": "SkeletonRow",
|
|
572
|
+
"specifiers": ["@lablup/ui-common", "@lablup/ui-common/components/Skeleton"],
|
|
573
|
+
"propChanges": [],
|
|
574
|
+
"classRenames": { "skeleton-row": "uic-skeleton-row" },
|
|
575
|
+
"notes": []
|
|
576
|
+
}
|
|
577
|
+
],
|
|
578
|
+
"movedExports": [
|
|
579
|
+
{
|
|
580
|
+
"name": "usePrefersReducedMotion",
|
|
581
|
+
"from": "@lablup/ui-common/hooks",
|
|
582
|
+
"to": "@lablup/ui-common",
|
|
583
|
+
"note": "From 0.2 @lablup/ui-common/hooks mirrors Astryx's hooks barrel; ui-common's own hook is at the root."
|
|
584
|
+
}
|
|
585
|
+
],
|
|
586
|
+
"classRenameRule": "Each keptComponents classRenames key is a BEM block: `.<block>`, `.<block>__<element>` and `.<block>--<modifier>` all move to the value with the same suffix. Explicit full-name keys win over the block rule.",
|
|
587
|
+
"shapeClassRenames": {
|
|
588
|
+
"skeleton": "uic-skeleton-shape",
|
|
589
|
+
"skeleton--rect": "uic-skeleton-shape--rect",
|
|
590
|
+
"skeleton--circle": "uic-skeleton-shape--circle",
|
|
591
|
+
"skeleton--text": "uic-skeleton-shape--text",
|
|
592
|
+
"skeleton__shimmer": null
|
|
593
|
+
},
|
|
594
|
+
"stylesheets": [
|
|
595
|
+
{
|
|
596
|
+
"specifier": "@lablup/ui-common/styles/base.css",
|
|
597
|
+
"status": "deprecated, removed in 0.3",
|
|
598
|
+
"replaceWith": {
|
|
599
|
+
"layerOrder": "@layer reset, theme, base, astryx-base, astryx-theme, ui-common, components, utilities;",
|
|
600
|
+
"imports": [
|
|
601
|
+
"@lablup/ui-common/reset.css",
|
|
602
|
+
"@lablup/ui-common/astryx.css",
|
|
603
|
+
"@lablup/ui-common/theme/lablup/theme.css",
|
|
604
|
+
"@lablup/ui-common/ui-common.css",
|
|
605
|
+
"@lablup/ui-common/legacy-tokens.css"
|
|
606
|
+
]
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"specifier": "@lablup/ui-common/styles/themes/*.css",
|
|
611
|
+
"status": "deprecated, removed in 0.3",
|
|
612
|
+
"replaceWith": null,
|
|
613
|
+
"note": "The Lablup theme covers light and dark; drop the import."
|
|
614
|
+
}
|
|
615
|
+
],
|
|
616
|
+
"newExports": {
|
|
617
|
+
"@lablup/ui-common/Modal": [
|
|
618
|
+
"Modal",
|
|
619
|
+
"ModalHeader",
|
|
620
|
+
"DialogHeader",
|
|
621
|
+
"configureModalZIndex",
|
|
622
|
+
"useModalLevel",
|
|
623
|
+
"MODAL_OPEN_ATTRIBUTE",
|
|
624
|
+
"MODAL_LIVE_ATTRIBUTE",
|
|
625
|
+
"refreshModalBackground",
|
|
626
|
+
"MAX_MODAL_LEVEL"
|
|
627
|
+
]
|
|
628
|
+
}
|
|
629
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lablup/ui-common-cli",
|
|
3
|
+
"version": "0.2.0-alpha.15",
|
|
4
|
+
"description": "The ui-common command line: the pinned Astryx CLI in @lablup/ui-common terms, the agent block, and the upgrade codemods",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"author": "Lablup Inc.",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/lablup/ui-common.git",
|
|
11
|
+
"directory": "packages/cli"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/lablup/ui-common#the-ui-common-cli",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/lablup/ui-common/issues"
|
|
16
|
+
},
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public",
|
|
19
|
+
"provenance": false
|
|
20
|
+
},
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=22.13.0"
|
|
23
|
+
},
|
|
24
|
+
"bin": {
|
|
25
|
+
"ui-common": "./bin/ui-common.mjs"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"bin",
|
|
29
|
+
"cli",
|
|
30
|
+
"codemods",
|
|
31
|
+
"migration",
|
|
32
|
+
"README.md",
|
|
33
|
+
"NOTICE"
|
|
34
|
+
],
|
|
35
|
+
"exports": {
|
|
36
|
+
"./package.json": "./package.json"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@astryxdesign/cli": "0.6.2",
|
|
40
|
+
"jscodeshift": "^17.4.0",
|
|
41
|
+
"postcss": "^8.5.25",
|
|
42
|
+
"postcss-selector-parser": "^7.1.6"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"@lablup/ui-common": "0.2.0-alpha.15"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@lablup/ui-common": "0.2.0-alpha.15"
|
|
49
|
+
}
|
|
50
|
+
}
|