@godxjp/ui 6.11.0 → 7.0.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/README.md +5 -0
- package/dist/aspect-ratio-DGoYrOry.d.ts +6 -0
- package/dist/avatar-D9MdXzfF.d.ts +8 -0
- package/dist/{checkbox-9w-eF8sM.d.ts → checkbox-CK2mYEpD.d.ts} +1 -1
- package/dist/chunk-7AMHT5Z5.js +61 -0
- package/dist/chunk-B3WX53JQ.js +40 -0
- package/dist/{chunk-X3OSXYAB.js → chunk-EQRQM6RF.js} +126 -181
- package/dist/chunk-FRU44GA2.js +18 -0
- package/dist/chunk-FYM3MJSK.js +59 -0
- package/dist/{chunk-M64MVRLS.js → chunk-HKQITNB3.js} +12 -48
- package/dist/{chunk-GXHZAJUA.js → chunk-O2OUNXV4.js} +10 -10
- package/dist/{chunk-BM5LIDCS.js → chunk-OGFWIXRO.js} +7 -16
- package/dist/chunk-R2W2FX5Q.js +48 -0
- package/dist/chunk-SEG2YBXF.js +29 -0
- package/dist/{chunk-XG7XDYIM.js → chunk-V3N266PT.js} +48 -2
- package/dist/{chunk-OI7TDPEJ.js → chunk-VXXKR5U4.js} +5 -46
- package/dist/components/admin/index.d.ts +12 -10
- package/dist/components/admin/index.js +18 -17
- package/dist/components/data-display/badge.d.ts +12 -4
- package/dist/components/data-display/badge.js +3 -1
- package/dist/components/data-display/card.d.ts +5 -5
- package/dist/components/data-display/card.js +1 -1
- package/dist/components/data-display/index.d.ts +10 -22
- package/dist/components/data-display/index.js +23 -32
- package/dist/components/data-entry/autocomplete.d.ts +1 -1
- package/dist/components/data-entry/calendar.d.ts +1 -1
- package/dist/components/data-entry/cascader.d.ts +1 -1
- package/dist/components/data-entry/cascader.js +2 -2
- package/dist/components/data-entry/checkbox.d.ts +2 -2
- package/dist/components/data-entry/color-picker.d.ts +1 -1
- package/dist/components/data-entry/command.d.ts +5 -5
- package/dist/components/data-entry/date-picker.d.ts +1 -1
- package/dist/components/data-entry/date-range-picker.d.ts +1 -1
- package/dist/components/data-entry/index.d.ts +18 -14
- package/dist/components/data-entry/index.js +12 -72
- package/dist/components/data-entry/radio.d.ts +1 -1
- package/dist/components/data-entry/select.d.ts +1 -1
- package/dist/components/data-entry/slider.d.ts +1 -1
- package/dist/components/data-entry/switch.d.ts +1 -1
- package/dist/components/data-entry/switch.js +1 -1
- package/dist/components/data-entry/time-picker.d.ts +1 -1
- package/dist/components/data-entry/transfer.d.ts +2 -2
- package/dist/components/data-entry/tree-select.d.ts +1 -1
- package/dist/components/data-entry/tree-select.js +2 -2
- package/dist/components/data-entry/upload.d.ts +2 -2
- package/dist/components/feedback/index.d.ts +2 -1
- package/dist/components/feedback/index.js +3 -2
- package/dist/components/layout/index.d.ts +11 -38
- package/dist/components/layout/index.js +2 -3
- package/dist/components/navigation/index.d.ts +2 -3
- package/dist/components/navigation/index.js +3 -4
- package/dist/components/navigation/pagination.d.ts +1 -1
- package/dist/components/navigation/steps.d.ts +2 -2
- package/dist/components/navigation/tabs.d.ts +14 -2
- package/dist/components/navigation/tabs.js +1 -1
- package/dist/components/ui/index.d.ts +14 -7
- package/dist/components/ui/index.js +14 -11
- package/dist/{data-display.prop-i0iaSwMV.d.ts → data-display.prop-CXP9Jfdn.d.ts} +14 -14
- package/dist/{data-entry.prop-Cjidhei7.d.ts → data-entry.prop-CpSx5dX6.d.ts} +1 -17
- package/dist/{data-table-Bg7fPpXy.d.ts → data-table-C5lcmAwE.d.ts} +7 -30
- package/dist/{filter-bar-BpUvE_yO.d.ts → filter-bar-zSKz7YCR.d.ts} +1 -1
- package/dist/index.d.ts +12 -10
- package/dist/index.js +18 -17
- package/dist/{navigation.prop-Ck5_gSfs.d.ts → navigation.prop-DAH4ysXj.d.ts} +6 -7
- package/dist/props/components/index.d.ts +3 -3
- package/dist/props/index.d.ts +3 -3
- package/dist/props/index.js +1 -1
- package/dist/props/registry.d.ts +7 -12
- package/dist/props/registry.js +1 -1
- package/dist/{search-input-mAZy3Den.d.ts → search-input-rR2XDrjv.d.ts} +1 -1
- package/dist/skeleton-CqFO4dRc.d.ts +20 -0
- package/dist/styles/badge-layout.css +2 -2
- package/dist/styles/card-layout.css +19 -19
- package/dist/styles/control.css +68 -0
- package/dist/styles/data-display-layout.css +23 -81
- package/dist/styles/layout.css +19 -71
- package/dist/toggle-group-BulJgKh3.d.ts +26 -0
- package/dist/tokens/primitives/card.css +9 -9
- package/dist/use-toast-Dsw3yE2S.d.ts +19 -0
- package/package.json +11 -7
- package/scripts/ui-audit.mjs +38 -1
- package/dist/chunk-BPSKQUL2.js +0 -68
- package/dist/chunk-PIIRNAXA.js +0 -26
- package/dist/chunk-WXW43RK5.js +0 -24
- package/dist/components/navigation/tabs-items.d.ts +0 -12
- package/dist/components/navigation/tabs-items.js +0 -3
- package/dist/use-toast-Dol5bdY3.d.ts +0 -34
- package/dist/{chunk-PFOBVLF3.js → chunk-6TSU4IHV.js} +0 -0
- package/dist/{chunk-V7RC4PBY.js → chunk-JJCGMCTL.js} +1 -1
- package/dist/{chunk-VRSHUKDF.js → chunk-RVY4F7LK.js} +1 -1
|
@@ -301,7 +301,7 @@
|
|
|
301
301
|
padding-block: var(--card-space-footer-y);
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
-
/* ──
|
|
304
|
+
/* ── StatCard — KPI tile aligned to dashboard design ─────────────── */
|
|
305
305
|
[data-slot="card"][data-stat-card] {
|
|
306
306
|
padding: var(--card-space-header-y) var(--card-space-inset);
|
|
307
307
|
}
|
|
@@ -313,51 +313,51 @@
|
|
|
313
313
|
column-gap: var(--space-inline-md);
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
[data-slot="card-
|
|
316
|
+
[data-slot="stat-card-body"] {
|
|
317
317
|
min-width: 0;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
[data-slot="card-
|
|
320
|
+
[data-slot="stat-card-label"] {
|
|
321
321
|
display: flex;
|
|
322
322
|
align-items: center;
|
|
323
323
|
gap: var(--space-inline-xs);
|
|
324
324
|
color: hsl(var(--muted-foreground));
|
|
325
|
-
font-size: var(--card-
|
|
326
|
-
font-weight: var(--card-
|
|
327
|
-
letter-spacing: var(--card-
|
|
325
|
+
font-size: var(--stat-card-label-font-size);
|
|
326
|
+
font-weight: var(--stat-card-label-font-weight);
|
|
327
|
+
letter-spacing: var(--stat-card-label-letter-spacing);
|
|
328
328
|
line-height: var(--line-height-normal);
|
|
329
329
|
text-transform: uppercase;
|
|
330
330
|
}
|
|
331
331
|
|
|
332
|
-
[data-slot="card-
|
|
332
|
+
[data-slot="stat-card-label"] svg {
|
|
333
333
|
width: 0.875rem;
|
|
334
334
|
height: 0.875rem;
|
|
335
335
|
flex-shrink: 0;
|
|
336
336
|
stroke-width: 1.6;
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
-
[data-slot="card-
|
|
339
|
+
[data-slot="stat-card-value-row"] {
|
|
340
340
|
display: flex;
|
|
341
341
|
align-items: baseline;
|
|
342
342
|
gap: var(--space-inline-sm);
|
|
343
|
-
margin-top: var(--card-
|
|
343
|
+
margin-top: var(--stat-card-gap);
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
-
[data-slot="card"][data-stat-align="end"] [data-slot="card-
|
|
347
|
-
[data-slot="card"][data-stat-layout="inline"] [data-slot="card-
|
|
346
|
+
[data-slot="card"][data-stat-align="end"] [data-slot="stat-card-value-row"],
|
|
347
|
+
[data-slot="card"][data-stat-layout="inline"] [data-slot="stat-card-value-row"] {
|
|
348
348
|
justify-content: flex-end;
|
|
349
349
|
text-align: right;
|
|
350
350
|
}
|
|
351
351
|
|
|
352
|
-
[data-slot="card-
|
|
353
|
-
font-size: var(--card-
|
|
354
|
-
font-weight: var(--card-
|
|
352
|
+
[data-slot="stat-card-value"] {
|
|
353
|
+
font-size: var(--stat-card-value-font-size);
|
|
354
|
+
font-weight: var(--stat-card-value-font-weight);
|
|
355
355
|
letter-spacing: var(--letter-spacing-tight);
|
|
356
|
-
line-height: var(--card-
|
|
356
|
+
line-height: var(--stat-card-value-line-height);
|
|
357
357
|
font-variant-numeric: tabular-nums;
|
|
358
358
|
}
|
|
359
359
|
|
|
360
|
-
[data-slot="card-
|
|
360
|
+
[data-slot="stat-card-delta"] {
|
|
361
361
|
color: hsl(var(--muted-foreground));
|
|
362
362
|
font-size: var(--font-size-xs);
|
|
363
363
|
font-weight: var(--font-weight-medium);
|
|
@@ -365,9 +365,9 @@
|
|
|
365
365
|
font-variant-numeric: tabular-nums;
|
|
366
366
|
}
|
|
367
367
|
|
|
368
|
-
[data-slot="card-
|
|
369
|
-
margin-top: var(--card-
|
|
368
|
+
[data-slot="stat-card-hint"] {
|
|
369
|
+
margin-top: var(--stat-card-gap);
|
|
370
370
|
color: hsl(var(--muted-foreground));
|
|
371
|
-
font-size: var(--card-
|
|
371
|
+
font-size: var(--stat-card-hint-font-size);
|
|
372
372
|
line-height: var(--line-height-normal);
|
|
373
373
|
}
|
package/dist/styles/control.css
CHANGED
|
@@ -3,6 +3,74 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
@layer components {
|
|
6
|
+
.ui-toggle {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
gap: var(--space-inline-xs);
|
|
11
|
+
border-radius: var(--radius-md);
|
|
12
|
+
color: hsl(var(--foreground));
|
|
13
|
+
font-size: var(--font-size-sm);
|
|
14
|
+
font-weight: var(--font-weight-medium);
|
|
15
|
+
transition:
|
|
16
|
+
background-color 150ms ease,
|
|
17
|
+
border-color 150ms ease,
|
|
18
|
+
color 150ms ease,
|
|
19
|
+
box-shadow 150ms ease;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ui-toggle-default {
|
|
23
|
+
border: 1px solid transparent;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ui-toggle-outline {
|
|
27
|
+
border: 1px solid hsl(var(--border));
|
|
28
|
+
background: hsl(var(--background));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ui-toggle-default-size {
|
|
32
|
+
min-height: var(--control-height);
|
|
33
|
+
padding-inline: var(--space-3);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.ui-toggle-sm {
|
|
37
|
+
min-height: var(--control-height-sm);
|
|
38
|
+
padding-inline: var(--space-2);
|
|
39
|
+
font-size: var(--font-size-xs);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ui-toggle-lg {
|
|
43
|
+
min-height: var(--control-height-lg);
|
|
44
|
+
padding-inline: var(--space-4);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ui-toggle:hover {
|
|
48
|
+
background: hsl(var(--accent));
|
|
49
|
+
color: hsl(var(--accent-foreground));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.ui-toggle[data-state="on"] {
|
|
53
|
+
background: hsl(var(--primary));
|
|
54
|
+
color: hsl(var(--primary-foreground));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ui-toggle:focus-visible {
|
|
58
|
+
outline: none;
|
|
59
|
+
box-shadow: 0 0 0 3px hsl(var(--ring) / 0.35);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ui-toggle:disabled,
|
|
63
|
+
.ui-toggle[data-disabled] {
|
|
64
|
+
cursor: not-allowed;
|
|
65
|
+
opacity: var(--disabled-opacity);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.ui-toggle-group {
|
|
69
|
+
display: inline-flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
gap: var(--space-1);
|
|
72
|
+
}
|
|
73
|
+
|
|
6
74
|
.ui-button {
|
|
7
75
|
display: inline-flex;
|
|
8
76
|
align-items: center;
|
|
@@ -1,67 +1,36 @@
|
|
|
1
1
|
@layer components {
|
|
2
|
-
.ui-
|
|
2
|
+
.ui-avatar {
|
|
3
|
+
position: relative;
|
|
3
4
|
display: inline-flex;
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
width: var(--control-height);
|
|
6
|
+
height: var(--control-height);
|
|
7
|
+
flex-shrink: 0;
|
|
6
8
|
align-items: center;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
border:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
font-size: var(--font-size-xs);
|
|
9
|
+
justify-content: center;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
border-radius: 9999px;
|
|
12
|
+
background: hsl(var(--muted));
|
|
13
|
+
color: hsl(var(--muted-foreground));
|
|
14
|
+
font-size: var(--font-size-sm);
|
|
14
15
|
font-weight: var(--font-weight-medium);
|
|
15
|
-
font-variant-numeric: tabular-nums;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.ui-code-badge[data-kind="internal"] {
|
|
19
|
-
--code-badge-hsl: var(--tracking-internal);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.ui-code-badge[data-kind="seller"] {
|
|
23
|
-
--code-badge-hsl: var(--tracking-seller);
|
|
24
16
|
}
|
|
25
17
|
|
|
26
|
-
.ui-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
.ui-code-badge svg {
|
|
31
|
-
width: 0.875rem;
|
|
32
|
-
height: 0.875rem;
|
|
33
|
-
flex-shrink: 0;
|
|
34
|
-
opacity: 0.82;
|
|
18
|
+
.ui-avatar-image {
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
object-fit: cover;
|
|
35
22
|
}
|
|
36
23
|
|
|
37
|
-
.ui-
|
|
38
|
-
display:
|
|
39
|
-
|
|
24
|
+
.ui-avatar-fallback {
|
|
25
|
+
display: flex;
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 100%;
|
|
40
28
|
align-items: center;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
font-size: 0.625rem;
|
|
44
|
-
font-weight: var(--font-weight-semibold);
|
|
45
|
-
letter-spacing: 0;
|
|
46
|
-
line-height: 1rem;
|
|
47
|
-
text-align: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
background: hsl(var(--muted));
|
|
48
31
|
}
|
|
49
32
|
|
|
50
|
-
.ui-
|
|
51
|
-
width: 1px;
|
|
52
|
-
height: 0.875rem;
|
|
53
|
-
background: hsl(var(--code-badge-hsl) / var(--code-badge-separator-alpha));
|
|
54
|
-
content: "";
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.ui-code-badge-value {
|
|
58
|
-
min-width: 0;
|
|
59
|
-
overflow: hidden;
|
|
60
|
-
text-overflow: ellipsis;
|
|
61
|
-
white-space: nowrap;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.ui-progress-meter {
|
|
33
|
+
.ui-progress {
|
|
65
34
|
display: flex;
|
|
66
35
|
flex-direction: column;
|
|
67
36
|
gap: var(--space-2);
|
|
@@ -80,7 +49,7 @@
|
|
|
80
49
|
background: hsl(var(--success));
|
|
81
50
|
}
|
|
82
51
|
|
|
83
|
-
.ui-progress
|
|
52
|
+
.ui-progress[data-tone="warning"] .ui-progress-bar {
|
|
84
53
|
background: hsl(var(--warning));
|
|
85
54
|
}
|
|
86
55
|
|
|
@@ -216,31 +185,4 @@
|
|
|
216
185
|
font-size: var(--font-size-sm);
|
|
217
186
|
}
|
|
218
187
|
|
|
219
|
-
.ui-scan-panel {
|
|
220
|
-
display: grid;
|
|
221
|
-
aspect-ratio: 1 / 1;
|
|
222
|
-
place-items: center;
|
|
223
|
-
border: 2px dashed hsl(var(--primary) / 0.3);
|
|
224
|
-
border-radius: calc(var(--radius) + 0.25rem);
|
|
225
|
-
background: hsl(var(--primary) / 0.05);
|
|
226
|
-
text-align: center;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.ui-scan-panel svg {
|
|
230
|
-
width: 4rem;
|
|
231
|
-
height: 4rem;
|
|
232
|
-
margin-inline: auto;
|
|
233
|
-
color: hsl(var(--primary));
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.ui-scan-title {
|
|
237
|
-
margin-top: var(--space-3);
|
|
238
|
-
font-size: var(--font-size-lg);
|
|
239
|
-
font-weight: var(--font-weight-semibold);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.ui-scan-description {
|
|
243
|
-
color: hsl(var(--muted-foreground));
|
|
244
|
-
font-size: var(--font-size-sm);
|
|
245
|
-
}
|
|
246
188
|
}
|
package/dist/styles/layout.css
CHANGED
|
@@ -4,6 +4,25 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@layer components {
|
|
7
|
+
.ui-separator {
|
|
8
|
+
flex-shrink: 0;
|
|
9
|
+
background: hsl(var(--border));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ui-separator[data-orientation="horizontal"] {
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 1px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ui-separator[data-orientation="vertical"] {
|
|
18
|
+
width: 1px;
|
|
19
|
+
height: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ui-aspect-ratio {
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
25
|
+
|
|
7
26
|
.ui-stack-xs {
|
|
8
27
|
display: flex;
|
|
9
28
|
flex-direction: column;
|
|
@@ -281,77 +300,6 @@
|
|
|
281
300
|
color: hsl(var(--foreground));
|
|
282
301
|
}
|
|
283
302
|
|
|
284
|
-
.ui-mobile-stage {
|
|
285
|
-
min-height: 100vh;
|
|
286
|
-
padding: var(--space-section-active);
|
|
287
|
-
background: hsl(var(--secondary));
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
.ui-mobile-frame {
|
|
291
|
-
display: flex;
|
|
292
|
-
flex-direction: column;
|
|
293
|
-
width: min(100%, 23.5rem);
|
|
294
|
-
min-height: 50.75rem;
|
|
295
|
-
margin-inline: auto;
|
|
296
|
-
overflow: hidden;
|
|
297
|
-
border: 1px solid hsl(var(--border));
|
|
298
|
-
border-radius: 1.75rem;
|
|
299
|
-
background: hsl(var(--background));
|
|
300
|
-
box-shadow: var(--shadow-xl, 0 20px 25px -5px rgb(0 0 0 / 0.1));
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
.ui-mobile-header {
|
|
304
|
-
display: flex;
|
|
305
|
-
align-items: center;
|
|
306
|
-
justify-content: space-between;
|
|
307
|
-
gap: var(--space-inline-sm);
|
|
308
|
-
padding: var(--space-3) var(--space-4);
|
|
309
|
-
background: hsl(var(--primary));
|
|
310
|
-
color: hsl(var(--primary-foreground));
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.ui-mobile-title {
|
|
314
|
-
font-size: var(--font-size-sm);
|
|
315
|
-
font-weight: var(--font-weight-semibold);
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
.ui-mobile-subtitle {
|
|
319
|
-
color: hsl(0 0% 100% / 0.6);
|
|
320
|
-
font-size: var(--font-size-xs);
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
.ui-mobile-main {
|
|
324
|
-
flex: 1;
|
|
325
|
-
padding: var(--space-4);
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.ui-mobile-nav {
|
|
329
|
-
display: grid;
|
|
330
|
-
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
331
|
-
border-top: 1px solid hsl(var(--border));
|
|
332
|
-
background: hsl(var(--card));
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
.ui-mobile-nav-item {
|
|
336
|
-
display: flex;
|
|
337
|
-
height: 4rem;
|
|
338
|
-
flex-direction: column;
|
|
339
|
-
align-items: center;
|
|
340
|
-
justify-content: center;
|
|
341
|
-
gap: var(--space-1);
|
|
342
|
-
color: hsl(var(--muted-foreground));
|
|
343
|
-
font-size: var(--font-size-xs);
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
.ui-mobile-nav-item[data-active="true"] {
|
|
347
|
-
color: hsl(var(--primary));
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
.ui-mobile-nav-item svg {
|
|
351
|
-
width: 1.25rem;
|
|
352
|
-
height: 1.25rem;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
303
|
.ui-empty-state {
|
|
356
304
|
display: flex;
|
|
357
305
|
flex-direction: column;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
3
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
6
|
+
|
|
7
|
+
declare const toggleVariants: (props?: ({
|
|
8
|
+
variant?: "default" | "outline" | null | undefined;
|
|
9
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
|
+
type ToggleProps = React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>;
|
|
12
|
+
declare const Toggle: React.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
13
|
+
variant?: "default" | "outline" | null | undefined;
|
|
14
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
15
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
|
|
17
|
+
declare const ToggleGroup: React.ForwardRefExoticComponent<((Omit<ToggleGroupPrimitive.ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & {
|
|
18
|
+
variant?: ToggleProps["variant"];
|
|
19
|
+
size?: ToggleProps["size"];
|
|
20
|
+
}) & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
declare const ToggleGroupItem: React.ForwardRefExoticComponent<Omit<ToggleGroupPrimitive.ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
22
|
+
variant?: ToggleProps["variant"];
|
|
23
|
+
size?: ToggleProps["size"];
|
|
24
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
25
|
+
|
|
26
|
+
export { Toggle as T, ToggleGroup as a, ToggleGroupItem as b, type ToggleProps as c, toggleVariants as t };
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
--card-header-background: var(--muted);
|
|
18
18
|
--card-header-background-alpha: 0.55;
|
|
19
19
|
--card-radius: var(--radius);
|
|
20
|
-
--card-
|
|
21
|
-
--card-
|
|
22
|
-
--card-
|
|
23
|
-
--card-
|
|
24
|
-
--card-
|
|
25
|
-
--card-
|
|
26
|
-
--card-
|
|
27
|
-
--card-
|
|
28
|
-
--card-
|
|
20
|
+
--stat-card-label-font-size: var(--font-size-xs);
|
|
21
|
+
--stat-card-label-font-weight: var(--font-weight-medium);
|
|
22
|
+
--stat-card-label-letter-spacing: 0.04em;
|
|
23
|
+
--stat-card-value-font-size: 1.625rem;
|
|
24
|
+
--stat-card-value-line-height: 1.1;
|
|
25
|
+
--stat-card-value-font-weight: var(--font-weight-semibold);
|
|
26
|
+
--stat-card-hint-font-size: var(--font-size-xs);
|
|
27
|
+
--stat-card-gap: var(--space-stack-xs);
|
|
28
|
+
--stat-card-icon-size: 2.25rem;
|
|
29
29
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ExternalToast, toast as toast$1 } from 'sonner';
|
|
3
|
+
|
|
4
|
+
type LegacyToastOptions = ExternalToast & {
|
|
5
|
+
title?: React.ReactNode;
|
|
6
|
+
description?: React.ReactNode;
|
|
7
|
+
variant?: "default" | "destructive" | "success";
|
|
8
|
+
};
|
|
9
|
+
type ToastFn = typeof toast$1 & ((options: LegacyToastOptions) => ReturnType<typeof toast$1>);
|
|
10
|
+
/** Sonner toast + legacy `{ title, variant }` object form. */
|
|
11
|
+
declare const toast: ToastFn;
|
|
12
|
+
/** Legacy hook — prefer `toast` import directly; kept for existing admin pages. */
|
|
13
|
+
declare function useToast(): {
|
|
14
|
+
toast: (options: LegacyToastOptions) => string | number;
|
|
15
|
+
dismiss: (id?: number | string) => string | number;
|
|
16
|
+
toasts: readonly [];
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { type LegacyToastOptions as L, toast as t, useToast as u };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@godxjp/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "@godxjp/ui — shared React UI framework (shadcn + Radix + Tailwind v4).",
|
|
6
6
|
"files": [
|
|
@@ -209,10 +209,6 @@
|
|
|
209
209
|
"types": "./dist/components/navigation/tabs.d.ts",
|
|
210
210
|
"import": "./dist/components/navigation/tabs.js"
|
|
211
211
|
},
|
|
212
|
-
"./ui/tabs-items": {
|
|
213
|
-
"types": "./dist/components/navigation/tabs-items.d.ts",
|
|
214
|
-
"import": "./dist/components/navigation/tabs-items.js"
|
|
215
|
-
},
|
|
216
212
|
"./ui/pagination": {
|
|
217
213
|
"types": "./dist/components/navigation/pagination.d.ts",
|
|
218
214
|
"import": "./dist/components/navigation/pagination.js"
|
|
@@ -239,8 +235,11 @@
|
|
|
239
235
|
"test": "vitest run",
|
|
240
236
|
"test:watch": "vitest",
|
|
241
237
|
"test:coverage": "vitest run --coverage",
|
|
242
|
-
"verify": "pnpm typecheck && pnpm lint && pnpm format && pnpm test",
|
|
243
|
-
"verify:release": "pnpm typecheck && pnpm lint && pnpm build && pnpm test",
|
|
238
|
+
"verify": "pnpm typecheck && pnpm lint && pnpm format && pnpm check:mcp-sync && pnpm check:mcp-orphans && pnpm test",
|
|
239
|
+
"verify:release": "pnpm typecheck && pnpm lint && pnpm check:mcp-sync && pnpm check:mcp-orphans && pnpm build && pnpm test",
|
|
240
|
+
"check:mcp-sync": "node scripts/check-mcp-sync.mjs",
|
|
241
|
+
"check:mcp-orphans": "node scripts/check-mcp-orphans.mjs",
|
|
242
|
+
"release": "node scripts/release.mjs",
|
|
244
243
|
"preview": "node preview/scripts/kill-port.mjs && vite --config preview/vite.config.ts --port 6008 --strictPort",
|
|
245
244
|
"preview:build": "vite build --config preview/vite.config.ts",
|
|
246
245
|
"docs:sync-primitives": "node preview/scripts/sync-primitive-docs.mjs && prettier --write \"docs/primitives/**/*.tsx\"",
|
|
@@ -262,6 +261,8 @@
|
|
|
262
261
|
"@date-fns/tz": "^1.5.0",
|
|
263
262
|
"@fontsource/m-plus-2": "^5.2.9",
|
|
264
263
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
264
|
+
"@radix-ui/react-aspect-ratio": "^1.1.8",
|
|
265
|
+
"@radix-ui/react-avatar": "^1.1.11",
|
|
265
266
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
266
267
|
"@radix-ui/react-collapsible": "^1.1.12",
|
|
267
268
|
"@radix-ui/react-context": "^1.1.2",
|
|
@@ -272,10 +273,13 @@
|
|
|
272
273
|
"@radix-ui/react-radio-group": "^1.3.8",
|
|
273
274
|
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
274
275
|
"@radix-ui/react-select": "^2.2.6",
|
|
276
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
275
277
|
"@radix-ui/react-slider": "^1.3.6",
|
|
276
278
|
"@radix-ui/react-slot": "^1.2.4",
|
|
277
279
|
"@radix-ui/react-switch": "^1.2.6",
|
|
278
280
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
281
|
+
"@radix-ui/react-toggle": "^1.1.10",
|
|
282
|
+
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
279
283
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
280
284
|
"class-variance-authority": "^0.7.1",
|
|
281
285
|
"clsx": "^2.1.1",
|
package/scripts/ui-audit.mjs
CHANGED
|
@@ -72,6 +72,25 @@ const RULES = [
|
|
|
72
72
|
test: /<textarea[\s>]/,
|
|
73
73
|
message: "Use <Textarea> from @godxjp/ui, not a raw <textarea> (rules §3).",
|
|
74
74
|
},
|
|
75
|
+
{
|
|
76
|
+
id: "no-raw-input",
|
|
77
|
+
severity: "error",
|
|
78
|
+
test: /<input[\s>]/,
|
|
79
|
+
message: "Use <Input> from @godxjp/ui, not a raw <input> (rules §3).",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: "no-raw-button",
|
|
83
|
+
severity: "error",
|
|
84
|
+
test: /<button[\s>]/,
|
|
85
|
+
message: "Use <Button> from @godxjp/ui, not a raw <button> (rules §3).",
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "card-manual-padding",
|
|
89
|
+
severity: "error",
|
|
90
|
+
test: /<Card\b[^>]*\bp-[1-9]/,
|
|
91
|
+
message:
|
|
92
|
+
"Don't hand-roll padding on <Card> (className='p-4'…) — wrap the body in <CardContent>. (p-0 for a full-bleed table is fine.)",
|
|
93
|
+
},
|
|
75
94
|
{
|
|
76
95
|
id: "no-dark-color-override",
|
|
77
96
|
severity: "warn",
|
|
@@ -120,11 +139,18 @@ function walk(dir, acc = []) {
|
|
|
120
139
|
return acc;
|
|
121
140
|
}
|
|
122
141
|
|
|
142
|
+
// Structural: a <Card> (without p-0) whose first child is body content rather than a Card
|
|
143
|
+
// sub-component sits FLUSH (no padding). Per-line regexes can't see across lines, so this is a
|
|
144
|
+
// whole-file pass. The body must be wrapped in <CardContent> (titles in <CardHeader>).
|
|
145
|
+
const CARD_FLUSH =
|
|
146
|
+
/<Card(?![^>]*\bp-0\b)(?:\s[^>]*)?>\s*<(?!CardContent|CardHeader|CardCover|CardFooter|\/Card)/g;
|
|
147
|
+
|
|
123
148
|
const findings = [];
|
|
124
149
|
for (const dir of SCAN_DIRS) {
|
|
125
150
|
for (const file of walk(join(CWD, dir))) {
|
|
126
151
|
const rel = relative(CWD, file);
|
|
127
|
-
const
|
|
152
|
+
const content = readFileSync(file, "utf8");
|
|
153
|
+
const lines = content.split("\n");
|
|
128
154
|
lines.forEach((line, i) => {
|
|
129
155
|
for (const rule of RULES) {
|
|
130
156
|
if (rule.test.test(line)) {
|
|
@@ -139,6 +165,17 @@ for (const dir of SCAN_DIRS) {
|
|
|
139
165
|
}
|
|
140
166
|
}
|
|
141
167
|
});
|
|
168
|
+
for (const match of content.matchAll(CARD_FLUSH)) {
|
|
169
|
+
findings.push({
|
|
170
|
+
file: rel,
|
|
171
|
+
line: content.slice(0, match.index).split("\n").length,
|
|
172
|
+
rule: "card-needs-content",
|
|
173
|
+
severity: "error",
|
|
174
|
+
message:
|
|
175
|
+
"<Card> body content must be wrapped in <CardContent> (it has NO padding otherwise) — use <CardContent flush> only for a full-bleed table.",
|
|
176
|
+
snippet: match[0].replace(/\s+/g, " ").slice(0, 120),
|
|
177
|
+
});
|
|
178
|
+
}
|
|
142
179
|
}
|
|
143
180
|
}
|
|
144
181
|
|
package/dist/chunk-BPSKQUL2.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { Tabs, TabsList, TabsTrigger, TabsContent } from './chunk-XG7XDYIM.js';
|
|
2
|
-
import { cn } from './chunk-U7N2A7A3.js';
|
|
3
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
function TabsItems({
|
|
6
|
-
items,
|
|
7
|
-
value,
|
|
8
|
-
defaultValue,
|
|
9
|
-
onValueChange,
|
|
10
|
-
variant = "default",
|
|
11
|
-
className,
|
|
12
|
-
listClassName,
|
|
13
|
-
contentClassName
|
|
14
|
-
}) {
|
|
15
|
-
const firstKey = items[0]?.key;
|
|
16
|
-
const resolvedDefault = defaultValue ?? firstKey;
|
|
17
|
-
return /* @__PURE__ */ jsxs(
|
|
18
|
-
Tabs,
|
|
19
|
-
{
|
|
20
|
-
value,
|
|
21
|
-
defaultValue: value === void 0 ? resolvedDefault : void 0,
|
|
22
|
-
onValueChange,
|
|
23
|
-
className,
|
|
24
|
-
"data-slot": "tabs",
|
|
25
|
-
children: [
|
|
26
|
-
/* @__PURE__ */ jsx(
|
|
27
|
-
TabsList,
|
|
28
|
-
{
|
|
29
|
-
"data-slot": "tabs-list",
|
|
30
|
-
className: cn(
|
|
31
|
-
variant === "line" && "h-auto w-full justify-start rounded-none border-b bg-transparent p-0",
|
|
32
|
-
variant === "card" && "w-full justify-start",
|
|
33
|
-
listClassName
|
|
34
|
-
),
|
|
35
|
-
children: items.map((item) => /* @__PURE__ */ jsxs(
|
|
36
|
-
TabsTrigger,
|
|
37
|
-
{
|
|
38
|
-
value: item.key,
|
|
39
|
-
disabled: item.disabled,
|
|
40
|
-
className: cn(
|
|
41
|
-
variant === "line" && "data-[state=active]:border-primary rounded-none border-b-2 border-transparent bg-transparent px-4 py-2 shadow-none data-[state=active]:bg-transparent data-[state=active]:shadow-none",
|
|
42
|
-
variant === "card" && "data-[state=active]:shadow-sm"
|
|
43
|
-
),
|
|
44
|
-
children: [
|
|
45
|
-
item.icon && /* @__PURE__ */ jsx("span", { className: "mr-1.5 inline-flex", children: item.icon }),
|
|
46
|
-
item.label
|
|
47
|
-
]
|
|
48
|
-
},
|
|
49
|
-
item.key
|
|
50
|
-
))
|
|
51
|
-
}
|
|
52
|
-
),
|
|
53
|
-
items.map((item) => /* @__PURE__ */ jsx(
|
|
54
|
-
TabsContent,
|
|
55
|
-
{
|
|
56
|
-
value: item.key,
|
|
57
|
-
"data-slot": "tabs-panel",
|
|
58
|
-
className: cn(variant === "line" && "mt-0", contentClassName),
|
|
59
|
-
children: item.children
|
|
60
|
-
},
|
|
61
|
-
item.key
|
|
62
|
-
))
|
|
63
|
-
]
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export { TabsItems };
|
package/dist/chunk-PIIRNAXA.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { toneWarningClass, toneSuccessClass } from './chunk-ICM6XBST.js';
|
|
2
|
-
import { cn } from './chunk-U7N2A7A3.js';
|
|
3
|
-
import { cva } from 'class-variance-authority';
|
|
4
|
-
import { jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
var badgeVariants = cva(
|
|
7
|
-
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring",
|
|
8
|
-
{
|
|
9
|
-
variants: {
|
|
10
|
-
variant: {
|
|
11
|
-
default: "border-transparent bg-primary text-primary-foreground",
|
|
12
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
13
|
-
destructive: "border-transparent bg-destructive text-destructive-foreground",
|
|
14
|
-
outline: "text-foreground",
|
|
15
|
-
success: cn("border-transparent", toneSuccessClass),
|
|
16
|
-
warning: cn("border-transparent", toneWarningClass)
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
defaultVariants: { variant: "default" }
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
function Badge({ className, variant, ...props }) {
|
|
23
|
-
return /* @__PURE__ */ jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { Badge };
|