@godxjp/ui 9.1.0 → 10.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 +58 -29
- package/dist/app/index.d.ts +1 -1
- package/dist/app/index.js +4 -4
- package/dist/{app.prop-DnIXFzLi.d.ts → app.prop-Cy6dJnU8.d.ts} +18 -35
- package/dist/aspect-ratio-CZZJd9Km.d.ts +9 -0
- package/dist/{checkbox-ChRsR7Nk.d.ts → checkbox-em-oFM5D.d.ts} +1 -1
- package/dist/{chunk-LJLGABFV.js → chunk-2HXZT2WJ.js} +17 -9
- package/dist/{chunk-QLMXEJSY.js → chunk-3Q4A4U2P.js} +24 -1
- package/dist/{chunk-26CPAKUP.js → chunk-44YRPSZ7.js} +1 -2
- package/dist/{chunk-HB2OHB5X.js → chunk-5NCFLCM7.js} +27 -16
- package/dist/{chunk-FXFJF4YA.js → chunk-6CSBMMZS.js} +262 -31
- package/dist/{chunk-ZRRLOOBX.js → chunk-6HHSU6RG.js} +8 -6
- package/dist/{chunk-INSF6K3Y.js → chunk-7Q45MBFW.js} +7 -5
- package/dist/{chunk-O24Z3ULJ.js → chunk-BE6GJGKJ.js} +1 -1
- package/dist/{chunk-5D42MFB4.js → chunk-BG5RNXTH.js} +71 -2
- package/dist/{chunk-AINW5WYN.js → chunk-COD66MFF.js} +1 -2
- package/dist/{chunk-IOGU3ZWF.js → chunk-DNGJHWJZ.js} +3 -3
- package/dist/{chunk-3TS3G4U3.js → chunk-EE5DKOHX.js} +3 -1
- package/dist/{chunk-KXOAZGPA.js → chunk-EQZP53KI.js} +33 -8
- package/dist/{chunk-BHV2FUOA.js → chunk-EZHHJQWQ.js} +1 -1
- package/dist/{chunk-N3JPLJ3B.js → chunk-GDDCSKCB.js} +12 -5
- package/dist/{chunk-RLGHEV4A.js → chunk-HTG5VHU7.js} +10 -1
- package/dist/{chunk-R2W2FX5Q.js → chunk-I7NQ2LIL.js} +1 -9
- package/dist/{chunk-XQMPK4GM.js → chunk-IHRMOJXD.js} +86 -39
- package/dist/{chunk-TILFZBTE.js → chunk-INIIF7F7.js} +1 -4
- package/dist/{chunk-UIYEAUWA.js → chunk-IY347EQA.js} +2 -2
- package/dist/{chunk-HCM4JAC2.js → chunk-JWGLJXQU.js} +39 -11
- package/dist/{chunk-TO33OY4L.js → chunk-LMKUKCTN.js} +1 -1
- package/dist/chunk-NXVCI6YB.js +453 -0
- package/dist/{chunk-JBHXILI4.js → chunk-O6DQZYNI.js} +63 -44
- package/dist/{chunk-O2OUNXV4.js → chunk-P5KPCT6R.js} +3 -3
- package/dist/{chunk-56NYZNVY.js → chunk-PDXFQS7M.js} +112 -49
- package/dist/{chunk-F7PG4OEV.js → chunk-QSGW3ZWK.js} +12 -4
- package/dist/{chunk-25RYBC5T.js → chunk-S2IJKT3D.js} +1 -1
- package/dist/{chunk-OJZ6C2HM.js → chunk-SARQRCKO.js} +54 -48
- package/dist/chunk-T2QO2S65.js +126 -0
- package/dist/{chunk-442ULAA6.js → chunk-TGNBXS7H.js} +142 -62
- package/dist/{chunk-6J7GRCDA.js → chunk-UNVRNJCB.js} +71 -11
- package/dist/{chunk-6YBYAEXD.js → chunk-VSM44AYE.js} +94 -24
- package/dist/chunk-VSUYVT2Q.js +163 -0
- package/dist/{chunk-4R7QL3MW.js → chunk-X2VY4MOW.js} +14 -29
- package/dist/{chunk-FRU44GA2.js → chunk-XK3M3VRR.js} +16 -2
- package/dist/{chunk-6YK3IJXW.js → chunk-Z46J47FY.js} +73 -77
- package/dist/components/admin/index.d.ts +23 -13
- package/dist/components/admin/index.js +29 -30
- package/dist/components/data-display/badge.js +3 -3
- package/dist/components/data-display/card.d.ts +3 -3
- package/dist/components/data-display/card.js +1 -1
- package/dist/components/data-display/carousel.js +3 -1
- package/dist/components/data-display/index.js +55 -33
- package/dist/components/data-entry/calendar.d.ts +1 -1
- package/dist/components/data-entry/calendar.js +1 -1
- package/dist/components/data-entry/cascader.d.ts +1 -1
- package/dist/components/data-entry/cascader.js +5 -5
- package/dist/components/data-entry/checkbox.d.ts +2 -2
- package/dist/components/data-entry/checkbox.js +2 -2
- package/dist/components/data-entry/color-picker.d.ts +1 -1
- package/dist/components/data-entry/color-picker.js +3 -3
- package/dist/components/data-entry/date-picker.d.ts +2 -2
- package/dist/components/data-entry/date-picker.js +4 -4
- package/dist/components/data-entry/date-range-picker.d.ts +2 -2
- package/dist/components/data-entry/date-range-picker.js +4 -4
- package/dist/components/data-entry/index.d.ts +9 -25
- package/dist/components/data-entry/index.js +22 -26
- package/dist/components/data-entry/radio.d.ts +1 -1
- package/dist/components/data-entry/radio.js +2 -2
- package/dist/components/data-entry/select.d.ts +2 -2
- package/dist/components/data-entry/select.js +3 -4
- package/dist/components/data-entry/slider.d.ts +1 -1
- package/dist/components/data-entry/switch.d.ts +2 -2
- package/dist/components/data-entry/switch.js +1 -1
- package/dist/components/data-entry/time-input.js +2 -2
- package/dist/components/data-entry/time-picker.d.ts +3 -1
- package/dist/components/data-entry/time-picker.js +3 -3
- package/dist/components/data-entry/transfer.d.ts +2 -2
- package/dist/components/data-entry/transfer.js +5 -5
- package/dist/components/data-entry/tree-select.d.ts +1 -1
- package/dist/components/data-entry/tree-select.js +5 -5
- package/dist/components/data-entry/upload.d.ts +2 -2
- package/dist/components/data-entry/upload.js +5 -5
- package/dist/components/feedback/alert.js +5 -5
- package/dist/components/feedback/dialog.d.ts +20 -1
- package/dist/components/feedback/dialog.js +3 -3
- package/dist/components/feedback/index.d.ts +10 -18
- package/dist/components/feedback/index.js +9 -9
- package/dist/components/feedback/sheet.js +1 -1
- package/dist/components/layout/index.d.ts +27 -15
- package/dist/components/layout/index.js +7 -5
- package/dist/components/navigation/dropdown-menu.js +1 -1
- package/dist/components/navigation/index.d.ts +15 -17
- package/dist/components/navigation/index.js +7 -8
- package/dist/components/navigation/pagination.d.ts +25 -4
- package/dist/components/navigation/pagination.js +4 -5
- package/dist/components/navigation/steps.d.ts +3 -3
- package/dist/components/navigation/steps.js +3 -1
- package/dist/components/query/index.d.ts +1 -5
- package/dist/components/query/index.js +6 -8
- package/dist/components/ui/index.d.ts +13 -12
- package/dist/components/ui/index.js +30 -32
- package/dist/{data-entry.prop-CDkOajPj.d.ts → data-entry.prop-BR4vNA1j.d.ts} +7 -35
- package/dist/filter-bar-BxjSJJnQ.d.ts +7 -0
- package/dist/{inline-DCqn4O29.d.ts → flex-D_EXRFSW.d.ts} +2 -8
- package/dist/form/index.js +1 -1
- package/dist/i18n/index.d.ts +82 -10
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +7 -7
- package/dist/index.js +41 -44
- package/dist/{layout.prop-DwJKI6ka.d.ts → layout.prop-JE2TcRyL.d.ts} +8 -2
- package/dist/lib/datetime/index.js +1 -1
- package/dist/{navigation.prop-8DgElO0c.d.ts → navigation.prop-DMcXkR-J.d.ts} +9 -11
- package/dist/{toggle-group-BulJgKh3.d.ts → password-strength-DVRvXEOK.d.ts} +24 -3
- package/dist/props/components/index.d.ts +4 -4
- package/dist/props/index.d.ts +4 -4
- package/dist/props/index.js +1 -1
- package/dist/props/registry.d.ts +84 -39
- package/dist/props/registry.js +1 -1
- package/dist/{search-input-cezAxpgb.d.ts → search-input-DpqDMXcn.d.ts} +2 -4
- package/dist/{skeleton-uWAjSacg.d.ts → skeleton-cj9kh5wo.d.ts} +1 -3
- package/dist/styles/control.css +176 -41
- package/dist/styles/data-display-layout.css +41 -15
- package/dist/styles/data-entry-layout.css +71 -0
- package/dist/styles/feedback-layout.css +44 -12
- package/dist/styles/index.css +45 -1
- package/dist/styles/layout.css +66 -17
- package/dist/styles/navigation-layout.css +3 -1
- package/dist/styles/shell-layout.css +3 -3
- package/dist/styles/table-layout.css +13 -0
- package/dist/tokens/foundation.css +12 -1
- package/dist/tokens/semantic/layout.css +2 -2
- package/dist/tooltip-Bf2KjRy8.d.ts +14 -0
- package/package.json +7 -7
- package/scripts/ui-audit.mjs +31 -2
- package/dist/aspect-ratio-DGoYrOry.d.ts +0 -6
- package/dist/chunk-CAEL2ZD2.js +0 -222
- package/dist/chunk-FYM3MJSK.js +0 -59
- package/dist/chunk-GKXPALFT.js +0 -32
- package/dist/chunk-JKHWLPM5.js +0 -101
- package/dist/chunk-KDBGFJJI.js +0 -220
- package/dist/chunk-VN72SWHX.js +0 -189
- package/dist/components/data-entry/autocomplete.d.ts +0 -24
- package/dist/components/data-entry/autocomplete.js +0 -10
- package/dist/components/data-entry/combobox.d.ts +0 -22
- package/dist/components/data-entry/combobox.js +0 -6
- package/dist/filter-bar-BycYH10i.d.ts +0 -14
- /package/dist/{chunk-LDSLS6HE.js → chunk-7CFO5FFE.js} +0 -0
package/dist/styles/index.css
CHANGED
|
@@ -3,9 +3,19 @@
|
|
|
3
3
|
/* Default sans font — self-contained so consumers need no font config (subsetted: latin/vi/jp). */
|
|
4
4
|
@import "@fontsource/m-plus-2/400.css";
|
|
5
5
|
@import "@fontsource/m-plus-2/500.css";
|
|
6
|
-
@import "@fontsource/m-plus-2/600.css";
|
|
7
6
|
@import "@fontsource/m-plus-2/700.css";
|
|
8
7
|
@import "tailwindcss";
|
|
8
|
+
|
|
9
|
+
/* Guarantee the full set of semantic color utilities ships in the compiled CSS
|
|
10
|
+
* even when the library itself only references a few — consumers (and the token
|
|
11
|
+
* docs) must be able to use bg/text/border for EVERY semantic role. Without this
|
|
12
|
+
* Tailwind's JIT drops unused roles (success/info/attention) → transparent. */
|
|
13
|
+
@source inline(
|
|
14
|
+
"{bg,text,border,ring}-{primary,secondary,muted,accent,destructive,success,warning,info,attention}"
|
|
15
|
+
);
|
|
16
|
+
@source inline(
|
|
17
|
+
"{bg,text}-{primary,secondary,muted,accent,destructive,success,warning,info,attention}-foreground"
|
|
18
|
+
);
|
|
9
19
|
@source "../**/*.{tsx,ts}";
|
|
10
20
|
@import "../tokens/base.css";
|
|
11
21
|
@import "./density.css";
|
|
@@ -104,6 +114,40 @@
|
|
|
104
114
|
"calt" 1;
|
|
105
115
|
}
|
|
106
116
|
|
|
117
|
+
/* Semantic heading scale — SEO + accessibility: real <h1>–<h6> elements carry
|
|
118
|
+
* the document outline (one <h1> per page, levels never skipped). Visual size
|
|
119
|
+
* follows the dxs-kintai scale; component titles override via their own class. */
|
|
120
|
+
h1 {
|
|
121
|
+
font-size: var(--heading-h1);
|
|
122
|
+
font-weight: var(--font-weight-medium);
|
|
123
|
+
line-height: var(--line-height-tight);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
h2 {
|
|
127
|
+
font-size: var(--heading-h2);
|
|
128
|
+
font-weight: var(--font-weight-medium);
|
|
129
|
+
line-height: var(--line-height-tight);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
h3 {
|
|
133
|
+
font-size: var(--heading-h3);
|
|
134
|
+
font-weight: var(--font-weight-medium);
|
|
135
|
+
line-height: var(--line-height-tight);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
h4 {
|
|
139
|
+
font-size: var(--heading-h4);
|
|
140
|
+
font-weight: var(--font-weight-medium);
|
|
141
|
+
line-height: var(--line-height-tight);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
h5,
|
|
145
|
+
h6 {
|
|
146
|
+
font-size: var(--font-size-xs);
|
|
147
|
+
font-weight: var(--font-weight-medium);
|
|
148
|
+
line-height: var(--line-height-tight);
|
|
149
|
+
}
|
|
150
|
+
|
|
107
151
|
code {
|
|
108
152
|
font-family: var(--font-family-mono);
|
|
109
153
|
}
|
package/dist/styles/layout.css
CHANGED
|
@@ -173,9 +173,9 @@
|
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
@container (min-width: 1024px) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
176
|
+
.ui-responsive-grid {
|
|
177
|
+
grid-template-columns: repeat(var(--responsive-grid-lg, 4), minmax(0, 1fr));
|
|
178
|
+
}
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
.ui-split-pane {
|
|
@@ -235,25 +235,30 @@
|
|
|
235
235
|
display: flex;
|
|
236
236
|
flex-direction: column;
|
|
237
237
|
min-height: 100%;
|
|
238
|
-
padding: var(--space-page-active-y)
|
|
238
|
+
padding: var(--space-page-active-y) 0;
|
|
239
239
|
gap: var(--space-section-active);
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
+
/* Horizontal page insets live on the header/body/footer — NOT the container —
|
|
243
|
+
* so the header divider and footer border span the full page width
|
|
244
|
+
* (full-bleed) while their content stays aligned with the body. */
|
|
245
|
+
.ui-page-header,
|
|
246
|
+
.ui-page-body,
|
|
247
|
+
.ui-page-footer {
|
|
248
|
+
padding-left: var(--space-page-active-x);
|
|
249
|
+
padding-right: var(--space-page-active-x);
|
|
250
|
+
}
|
|
251
|
+
|
|
242
252
|
.ui-page-container--narrow .ui-page-body {
|
|
243
253
|
max-width: 42rem;
|
|
244
254
|
}
|
|
245
255
|
|
|
246
|
-
|
|
256
|
+
/* flush = full-bleed body (DataTable); header/footer keep their inset. */
|
|
257
|
+
.ui-page-container--flush .ui-page-body {
|
|
247
258
|
padding-left: 0;
|
|
248
259
|
padding-right: 0;
|
|
249
260
|
}
|
|
250
261
|
|
|
251
|
-
.ui-page-container--flush .ui-page-header,
|
|
252
|
-
.ui-page-container--flush .ui-page-footer {
|
|
253
|
-
padding-left: var(--space-page-active-x);
|
|
254
|
-
padding-right: var(--space-page-active-x);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
262
|
.ui-page-container-inset,
|
|
258
263
|
.ui-page-inset {
|
|
259
264
|
padding-left: var(--space-page-active-x);
|
|
@@ -308,8 +313,8 @@
|
|
|
308
313
|
}
|
|
309
314
|
|
|
310
315
|
.ui-page-title {
|
|
311
|
-
font-size: var(--
|
|
312
|
-
font-weight: var(--font-weight-
|
|
316
|
+
font-size: var(--heading-h1);
|
|
317
|
+
font-weight: var(--font-weight-medium);
|
|
313
318
|
letter-spacing: var(--letter-spacing-tight);
|
|
314
319
|
line-height: var(--line-height-tight);
|
|
315
320
|
overflow-wrap: anywhere;
|
|
@@ -328,10 +333,6 @@
|
|
|
328
333
|
flex-shrink: 0;
|
|
329
334
|
justify-content: flex-end;
|
|
330
335
|
}
|
|
331
|
-
|
|
332
|
-
.ui-page-title {
|
|
333
|
-
font-size: var(--font-size-2xl);
|
|
334
|
-
}
|
|
335
336
|
}
|
|
336
337
|
|
|
337
338
|
.ui-page-subtitle {
|
|
@@ -473,6 +474,12 @@
|
|
|
473
474
|
gap: var(--pagination-item-gap);
|
|
474
475
|
}
|
|
475
476
|
|
|
477
|
+
.ui-pagination-item {
|
|
478
|
+
display: flex;
|
|
479
|
+
align-items: center;
|
|
480
|
+
justify-content: center;
|
|
481
|
+
}
|
|
482
|
+
|
|
476
483
|
.ui-pagination-ellipsis {
|
|
477
484
|
display: flex;
|
|
478
485
|
align-items: center;
|
|
@@ -480,6 +487,48 @@
|
|
|
480
487
|
color: hsl(var(--muted-foreground));
|
|
481
488
|
}
|
|
482
489
|
|
|
490
|
+
.ui-pagination-link {
|
|
491
|
+
display: inline-flex;
|
|
492
|
+
width: 2rem;
|
|
493
|
+
height: 2rem;
|
|
494
|
+
align-items: center;
|
|
495
|
+
justify-content: center;
|
|
496
|
+
border-radius: var(--radius-sm);
|
|
497
|
+
border: 1px solid hsl(var(--border));
|
|
498
|
+
color: hsl(var(--foreground));
|
|
499
|
+
text-decoration: none;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.ui-pagination-link[data-active="true"] {
|
|
503
|
+
border-color: hsl(var(--ring) / 0.5);
|
|
504
|
+
background: hsl(var(--primary));
|
|
505
|
+
color: hsl(var(--primary-foreground));
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.ui-pagination-link:hover,
|
|
509
|
+
.ui-pagination-link[data-state="open"],
|
|
510
|
+
.ui-pagination-link[data-state="on"] {
|
|
511
|
+
background: hsl(var(--accent));
|
|
512
|
+
color: hsl(var(--accent-foreground));
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.ui-pagination-link[data-active="true"]:hover {
|
|
516
|
+
background: hsl(var(--primary));
|
|
517
|
+
color: hsl(var(--primary-foreground));
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.ui-pagination-link[data-state="disabled"],
|
|
521
|
+
.ui-pagination-link[aria-disabled="true"],
|
|
522
|
+
.ui-pagination-link-disabled {
|
|
523
|
+
pointer-events: none;
|
|
524
|
+
opacity: 0.5;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
.ui-pagination-prev,
|
|
528
|
+
.ui-pagination-next {
|
|
529
|
+
gap: var(--space-2);
|
|
530
|
+
}
|
|
531
|
+
|
|
483
532
|
.ui-pagination-page {
|
|
484
533
|
font-variant-numeric: tabular-nums;
|
|
485
534
|
}
|
|
@@ -241,7 +241,7 @@
|
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
.sb-nav-item[data-active="true"] {
|
|
244
|
-
font-weight:
|
|
244
|
+
font-weight: var(--font-weight-medium);
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
.sb-icon {
|
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
background: hsl(var(--secondary));
|
|
275
275
|
color: hsl(var(--muted-foreground));
|
|
276
276
|
font-size: 10px;
|
|
277
|
-
font-weight:
|
|
277
|
+
font-weight: var(--font-weight-medium);
|
|
278
278
|
line-height: 1.125rem;
|
|
279
279
|
padding-inline: 0.375rem;
|
|
280
280
|
}
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
padding: var(--space-1) var(--space-2);
|
|
356
356
|
color: hsl(var(--muted-foreground));
|
|
357
357
|
font-size: var(--font-size-xs);
|
|
358
|
-
font-weight:
|
|
358
|
+
font-weight: var(--font-weight-medium);
|
|
359
359
|
white-space: nowrap;
|
|
360
360
|
}
|
|
361
361
|
|
|
@@ -48,6 +48,19 @@
|
|
|
48
48
|
gap: var(--space-inline-md);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
/* Sortable header label is a real button (keyboard + aria-sort); inherits the cell's type. */
|
|
52
|
+
.ui-data-table-sort-button {
|
|
53
|
+
display: inline-flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
gap: var(--space-inline-xs);
|
|
56
|
+
padding: 0;
|
|
57
|
+
background: transparent;
|
|
58
|
+
color: inherit;
|
|
59
|
+
font: inherit;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
outline: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
51
64
|
.ui-data-table-bulk {
|
|
52
65
|
display: flex;
|
|
53
66
|
align-items: center;
|
|
@@ -74,9 +74,20 @@
|
|
|
74
74
|
--font-size-lg: 1.1875rem; /* 19px */
|
|
75
75
|
--font-size-xl: 1.375rem; /* 22px */
|
|
76
76
|
--font-size-2xl: 1.625rem; /* 26px */
|
|
77
|
+
|
|
78
|
+
/* Semantic heading scale (dxs-kintai: info-dense JP enterprise, weight 500,
|
|
79
|
+
* never marketing-size). Applied to base h1–h4 + component titles. */
|
|
80
|
+
--heading-h1: 1.25rem; /* 20px — page title / h1 */
|
|
81
|
+
--heading-h2: 1.125rem; /* 18px — section / h2 */
|
|
82
|
+
--heading-h3: 0.875rem; /* 14px — h3 */
|
|
83
|
+
--heading-h4: 0.8125rem; /* 13px — h4 */
|
|
84
|
+
|
|
77
85
|
--font-weight-normal: 400;
|
|
78
86
|
--font-weight-medium: 500;
|
|
79
|
-
|
|
87
|
+
/* dxs-kintai uses three weights only (400/500/700). 600 is forbidden
|
|
88
|
+
* (ambiguous between 500 and 700) — the legacy "semibold" token collapses to
|
|
89
|
+
* medium so any remaining reference renders at 500. */
|
|
90
|
+
--font-weight-semibold: 500;
|
|
80
91
|
--line-height-tight: 1.25;
|
|
81
92
|
--line-height-normal: 1.5;
|
|
82
93
|
--line-height-body: 1.7;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* Layout primitive tokens: page, section, stack, inline. */
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
|
-
--space-page-x: var(--
|
|
5
|
-
--space-page-y: var(--
|
|
4
|
+
--space-page-x: var(--space-6); /* 24px — comfortable page gutter (4px grid) */
|
|
5
|
+
--space-page-y: var(--space-6); /* 24px */
|
|
6
6
|
--space-section: var(--phi-0);
|
|
7
7
|
--space-stack-xs: var(--space-1);
|
|
8
8
|
--space-stack-sm: var(--space-2);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
4
|
+
|
|
5
|
+
/** Opt-in provider for tuning delay across a subtree. Each <Tooltip> already self-provides. */
|
|
6
|
+
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): react_jsx_runtime.JSX.Element;
|
|
7
|
+
/** Self-contained tooltip — no app-level provider needed. Controllable via `open`/`onOpenChange`. */
|
|
8
|
+
declare function Tooltip({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Root> & {
|
|
9
|
+
delayDuration?: number;
|
|
10
|
+
}): react_jsx_runtime.JSX.Element;
|
|
11
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
|
|
14
|
+
export { Tooltip as T, TooltipContent as a, TooltipProvider as b, TooltipTrigger as c };
|
package/package.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@godxjp/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"packageManager": "pnpm@10.29.1",
|
|
6
|
+
"sideEffects": false,
|
|
5
7
|
"description": "@godxjp/ui — shared React UI framework (shadcn + Radix + Tailwind v4).",
|
|
6
8
|
"files": [
|
|
7
9
|
"dist",
|
|
@@ -181,10 +183,6 @@
|
|
|
181
183
|
"types": "./dist/components/data-entry/transfer.d.ts",
|
|
182
184
|
"import": "./dist/components/data-entry/transfer.js"
|
|
183
185
|
},
|
|
184
|
-
"./ui/combobox": {
|
|
185
|
-
"types": "./dist/components/data-entry/combobox.d.ts",
|
|
186
|
-
"import": "./dist/components/data-entry/combobox.js"
|
|
187
|
-
},
|
|
188
186
|
"./ui/command": {
|
|
189
187
|
"types": "./dist/components/data-entry/command.d.ts",
|
|
190
188
|
"import": "./dist/components/data-entry/command.js"
|
|
@@ -267,8 +265,9 @@
|
|
|
267
265
|
"test": "vitest run",
|
|
268
266
|
"test:watch": "vitest",
|
|
269
267
|
"test:coverage": "vitest run --coverage",
|
|
270
|
-
"
|
|
271
|
-
"verify
|
|
268
|
+
"check:example-imports": "node scripts/check-example-imports.mjs",
|
|
269
|
+
"verify": "pnpm typecheck && pnpm lint && pnpm format && pnpm build && pnpm preview:build && pnpm check:example-imports && pnpm check:core-isolation && pnpm check:prop-vocabulary && pnpm check:token-tiers && pnpm check:mcp-sync && pnpm check:mcp-orphans && pnpm test",
|
|
270
|
+
"verify:release": "pnpm typecheck && pnpm lint && pnpm build && pnpm preview:build && pnpm check:example-imports && pnpm check:core-isolation && pnpm check:prop-vocabulary && pnpm check:token-tiers && pnpm check:mcp-sync && pnpm check:mcp-orphans && pnpm test",
|
|
272
271
|
"check:mcp-sync": "node scripts/check-mcp-sync.mjs",
|
|
273
272
|
"check:mcp-orphans": "node scripts/check-mcp-orphans.mjs",
|
|
274
273
|
"check:prop-vocabulary": "node scripts/check-prop-vocabulary.mjs",
|
|
@@ -365,6 +364,7 @@
|
|
|
365
364
|
"typescript-eslint": "^8.60.0",
|
|
366
365
|
"vite": "^8.0.10",
|
|
367
366
|
"vitest": "^4.1.5",
|
|
367
|
+
"vitest-axe": "1.0.0-pre.5",
|
|
368
368
|
"zod": "^4.4.3"
|
|
369
369
|
},
|
|
370
370
|
"bin": {
|
package/scripts/ui-audit.mjs
CHANGED
|
@@ -65,8 +65,7 @@ const RULES = [
|
|
|
65
65
|
{
|
|
66
66
|
id: "value-callback-on-value-change",
|
|
67
67
|
severity: "error",
|
|
68
|
-
test:
|
|
69
|
-
/<(?:Checkbox\.Group|Upload|Cascader|TreeSelect|Transfer|SearchSelect|DatePicker|DateRangePicker|TimePicker|ColorPicker|LocalePicker|TimezonePicker|DateFormatPicker|TimeFormatPicker)\b[^>]*\bonChange=/,
|
|
68
|
+
test: /<(?:Checkbox\.Group|Upload|Cascader|TreeSelect|Transfer|SearchSelect|DatePicker|DateRangePicker|TimePicker|ColorPicker|LocalePicker|TimezonePicker|DateFormatPicker|TimeFormatPicker)\b[^>]*\bonChange=/,
|
|
70
69
|
message:
|
|
71
70
|
"Abstract value components use onValueChange, not onChange. Reserve onChange for DOM events.",
|
|
72
71
|
},
|
|
@@ -76,6 +75,36 @@ const RULES = [
|
|
|
76
75
|
test: /(bg|text|border|ring|fill|stroke|from|to|via)-\[#[0-9a-fA-F]{3,8}\]/,
|
|
77
76
|
message: "No hardcoded hex colors in className; use design-system tokens (rules §4).",
|
|
78
77
|
},
|
|
78
|
+
// Arbitrary RAW-NUMERIC Tailwind values — the #1 source of "every agent does it
|
|
79
|
+
// differently". Match `<util>-[<digit/.>...]` only; `var(--token)` / `calc()` escape
|
|
80
|
+
// (they start with a letter), so token-driven values stay legal (rules §4–§5).
|
|
81
|
+
{
|
|
82
|
+
id: "no-arbitrary-spacing",
|
|
83
|
+
severity: "error",
|
|
84
|
+
test: /\b(p|px|py|pt|pb|pl|pr|pe|ps|m|mx|my|mt|mb|ml|mr|me|ms|gap|gap-x|gap-y|inset|inset-x|inset-y|top|right|bottom|left)-\[-?\.?\d/,
|
|
85
|
+
message:
|
|
86
|
+
"No arbitrary spacing (p-[13px], gap-[7px]…). Use the token scale / <Stack gap> / <Inline gap> / <PageContainer> (rules §5).",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: "no-arbitrary-size",
|
|
90
|
+
severity: "error",
|
|
91
|
+
test: /\b(w|h|size|min-w|max-w|min-h|max-h|basis)-\[-?\.?\d/,
|
|
92
|
+
message:
|
|
93
|
+
"No arbitrary width/height (w-[37px], max-w-[65ch]…). Use token sizes or a sizing prop; the component sizes its own icons (rules §4).",
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: "no-arbitrary-typography",
|
|
97
|
+
severity: "error",
|
|
98
|
+
test: /\b(text|leading|tracking|font)-\[-?\.?\d/,
|
|
99
|
+
message:
|
|
100
|
+
"No arbitrary type (text-[20px], leading-[1.7], font-[600]…). Use the type-scale tokens (text-xs…text-3xl) (rules §4).",
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: "no-arbitrary-radius",
|
|
104
|
+
severity: "error",
|
|
105
|
+
test: /\brounded(?:-[a-z]+)?-\[-?\.?\d/,
|
|
106
|
+
message: "No arbitrary radius (rounded-[6px]…). Use rounded-sm/md/lg radius tokens (rules §4).",
|
|
107
|
+
},
|
|
79
108
|
{
|
|
80
109
|
id: "no-raw-select",
|
|
81
110
|
severity: "error",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
|
|
3
|
-
|
|
4
|
-
declare const AspectRatio: React.ForwardRefExoticComponent<Omit<AspectRatioPrimitive.AspectRatioProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
|
|
6
|
-
export { AspectRatio as A };
|
package/dist/chunk-CAEL2ZD2.js
DELETED
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import { SearchSelect } from './chunk-KDBGFJJI.js';
|
|
2
|
-
import { controlTriggerClass } from './chunk-IBK5D2Q6.js';
|
|
3
|
-
import { cn } from './chunk-U7N2A7A3.js';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
6
|
-
import { ChevronDown, ChevronUp } from 'lucide-react';
|
|
7
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
|
-
|
|
9
|
-
function isDataSelect(props) {
|
|
10
|
-
return "options" in props || "loadOptions" in props;
|
|
11
|
-
}
|
|
12
|
-
function Select(props) {
|
|
13
|
-
if (isDataSelect(props)) {
|
|
14
|
-
return /* @__PURE__ */ jsx(DataSelect, { ...props });
|
|
15
|
-
}
|
|
16
|
-
return /* @__PURE__ */ jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
17
|
-
}
|
|
18
|
-
function SelectGroup(props) {
|
|
19
|
-
return /* @__PURE__ */ jsx(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
20
|
-
}
|
|
21
|
-
function SelectValue(props) {
|
|
22
|
-
return /* @__PURE__ */ jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
23
|
-
}
|
|
24
|
-
var SelectTrigger = React.forwardRef(({ className, children, size = "default", ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
25
|
-
SelectPrimitive.Trigger,
|
|
26
|
-
{
|
|
27
|
-
ref,
|
|
28
|
-
"data-slot": "select-trigger",
|
|
29
|
-
"data-size": size,
|
|
30
|
-
className: cn(
|
|
31
|
-
controlTriggerClass,
|
|
32
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground w-fit gap-2 whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2",
|
|
33
|
-
className
|
|
34
|
-
),
|
|
35
|
-
...props,
|
|
36
|
-
children: [
|
|
37
|
-
children,
|
|
38
|
-
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-4 shrink-0 opacity-50", "aria-hidden": "true" }) })
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
));
|
|
42
|
-
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
43
|
-
var SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
44
|
-
SelectPrimitive.ScrollUpButton,
|
|
45
|
-
{
|
|
46
|
-
ref,
|
|
47
|
-
"data-slot": "select-scroll-up-button",
|
|
48
|
-
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
49
|
-
...props,
|
|
50
|
-
children: /* @__PURE__ */ jsx(ChevronUp, { className: "size-4", "aria-hidden": "true" })
|
|
51
|
-
}
|
|
52
|
-
));
|
|
53
|
-
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
54
|
-
var SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
55
|
-
SelectPrimitive.ScrollDownButton,
|
|
56
|
-
{
|
|
57
|
-
ref,
|
|
58
|
-
"data-slot": "select-scroll-down-button",
|
|
59
|
-
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
60
|
-
...props,
|
|
61
|
-
children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-4", "aria-hidden": "true" })
|
|
62
|
-
}
|
|
63
|
-
));
|
|
64
|
-
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
65
|
-
var SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
66
|
-
SelectPrimitive.Content,
|
|
67
|
-
{
|
|
68
|
-
ref,
|
|
69
|
-
"data-slot": "select-content",
|
|
70
|
-
className: cn(
|
|
71
|
-
"bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border shadow-md",
|
|
72
|
-
position === "popper" && "translate-y-1",
|
|
73
|
-
className
|
|
74
|
-
),
|
|
75
|
-
position,
|
|
76
|
-
...props,
|
|
77
|
-
children: [
|
|
78
|
-
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
79
|
-
/* @__PURE__ */ jsx(
|
|
80
|
-
SelectPrimitive.Viewport,
|
|
81
|
-
{
|
|
82
|
-
"data-slot": "select-viewport",
|
|
83
|
-
className: cn(
|
|
84
|
-
"p-1",
|
|
85
|
-
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
86
|
-
),
|
|
87
|
-
children
|
|
88
|
-
}
|
|
89
|
-
),
|
|
90
|
-
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
91
|
-
]
|
|
92
|
-
}
|
|
93
|
-
) }));
|
|
94
|
-
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
95
|
-
var SelectLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
96
|
-
SelectPrimitive.Label,
|
|
97
|
-
{
|
|
98
|
-
ref,
|
|
99
|
-
"data-slot": "select-label",
|
|
100
|
-
className: cn("px-2 py-1.5 text-sm font-medium", className),
|
|
101
|
-
...props
|
|
102
|
-
}
|
|
103
|
-
));
|
|
104
|
-
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
105
|
-
var SelectItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
106
|
-
SelectPrimitive.Item,
|
|
107
|
-
{
|
|
108
|
-
ref,
|
|
109
|
-
"data-slot": "select-item",
|
|
110
|
-
className: cn(
|
|
111
|
-
"focus:bg-accent focus:text-accent-foreground data-[state=checked]:bg-accent data-[state=checked]:text-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm px-2.5 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[state=checked]:font-medium [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
112
|
-
className
|
|
113
|
-
),
|
|
114
|
-
...props,
|
|
115
|
-
children: /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
116
|
-
}
|
|
117
|
-
));
|
|
118
|
-
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
119
|
-
var SelectSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
120
|
-
SelectPrimitive.Separator,
|
|
121
|
-
{
|
|
122
|
-
ref,
|
|
123
|
-
"data-slot": "select-separator",
|
|
124
|
-
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
125
|
-
...props
|
|
126
|
-
}
|
|
127
|
-
));
|
|
128
|
-
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
129
|
-
function groupDataOptions(options) {
|
|
130
|
-
const order = [];
|
|
131
|
-
const buckets = /* @__PURE__ */ new Map();
|
|
132
|
-
for (const option of options) {
|
|
133
|
-
const key = option.group ?? "";
|
|
134
|
-
if (!buckets.has(key)) {
|
|
135
|
-
buckets.set(key, []);
|
|
136
|
-
order.push(key);
|
|
137
|
-
}
|
|
138
|
-
buckets.get(key).push(option);
|
|
139
|
-
}
|
|
140
|
-
return order.map((key) => ({ heading: key || void 0, items: buckets.get(key) ?? [] }));
|
|
141
|
-
}
|
|
142
|
-
function DataSelect({
|
|
143
|
-
options = [],
|
|
144
|
-
loadOptions,
|
|
145
|
-
showSearch,
|
|
146
|
-
value = "",
|
|
147
|
-
onValueChange,
|
|
148
|
-
renderOption,
|
|
149
|
-
selectedLabel,
|
|
150
|
-
placeholder,
|
|
151
|
-
searchPlaceholder,
|
|
152
|
-
emptyMessage,
|
|
153
|
-
loadingMessage,
|
|
154
|
-
clearLabel,
|
|
155
|
-
clearable,
|
|
156
|
-
disabled,
|
|
157
|
-
name,
|
|
158
|
-
id,
|
|
159
|
-
className,
|
|
160
|
-
"data-testid": dataTestId
|
|
161
|
-
}) {
|
|
162
|
-
const searchable = showSearch ?? Boolean(loadOptions);
|
|
163
|
-
if (searchable) {
|
|
164
|
-
return /* @__PURE__ */ jsx(
|
|
165
|
-
SearchSelect,
|
|
166
|
-
{
|
|
167
|
-
value,
|
|
168
|
-
onValueChange,
|
|
169
|
-
options,
|
|
170
|
-
loadOptions,
|
|
171
|
-
renderOption,
|
|
172
|
-
selectedLabel,
|
|
173
|
-
placeholder,
|
|
174
|
-
searchPlaceholder,
|
|
175
|
-
emptyMessage,
|
|
176
|
-
loadingMessage,
|
|
177
|
-
clearLabel,
|
|
178
|
-
clearable,
|
|
179
|
-
disabled,
|
|
180
|
-
name,
|
|
181
|
-
id,
|
|
182
|
-
className,
|
|
183
|
-
"data-testid": dataTestId
|
|
184
|
-
}
|
|
185
|
-
);
|
|
186
|
-
}
|
|
187
|
-
const optionTestId = (optionValue) => dataTestId ? `${dataTestId}-option-${optionValue}` : void 0;
|
|
188
|
-
const renderItem = (option) => /* @__PURE__ */ jsx(
|
|
189
|
-
SelectItem,
|
|
190
|
-
{
|
|
191
|
-
value: option.value,
|
|
192
|
-
disabled: option.disabled,
|
|
193
|
-
"data-testid": optionTestId(option.value),
|
|
194
|
-
children: renderOption ? renderOption(option) : option.label
|
|
195
|
-
},
|
|
196
|
-
option.value
|
|
197
|
-
);
|
|
198
|
-
return /* @__PURE__ */ jsxs(
|
|
199
|
-
SelectPrimitive.Root,
|
|
200
|
-
{
|
|
201
|
-
"data-slot": "select",
|
|
202
|
-
value: value || void 0,
|
|
203
|
-
onValueChange: (next) => onValueChange?.(
|
|
204
|
-
next,
|
|
205
|
-
options.find((option) => option.value === next)
|
|
206
|
-
),
|
|
207
|
-
disabled,
|
|
208
|
-
name,
|
|
209
|
-
children: [
|
|
210
|
-
/* @__PURE__ */ jsx(SelectTrigger, { id, "data-testid": dataTestId, className, children: /* @__PURE__ */ jsx(SelectValue, { placeholder }) }),
|
|
211
|
-
/* @__PURE__ */ jsx(SelectContent, { children: groupDataOptions(options).map(
|
|
212
|
-
(group) => group.heading ? /* @__PURE__ */ jsxs(SelectGroup, { children: [
|
|
213
|
-
/* @__PURE__ */ jsx(SelectLabel, { children: group.heading }),
|
|
214
|
-
group.items.map(renderItem)
|
|
215
|
-
] }, group.heading) : /* @__PURE__ */ jsx(React.Fragment, { children: group.items.map(renderItem) }, "__ungrouped")
|
|
216
|
-
) })
|
|
217
|
-
]
|
|
218
|
-
}
|
|
219
|
-
);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
package/dist/chunk-FYM3MJSK.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { cn } from './chunk-U7N2A7A3.js';
|
|
2
|
-
import * as React2 from 'react';
|
|
3
|
-
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
4
|
-
import { cva } from 'class-variance-authority';
|
|
5
|
-
import { jsx } from 'react/jsx-runtime';
|
|
6
|
-
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
7
|
-
|
|
8
|
-
var toggleVariants = cva("ui-toggle", {
|
|
9
|
-
variants: {
|
|
10
|
-
variant: {
|
|
11
|
-
default: "ui-toggle-default",
|
|
12
|
-
outline: "ui-toggle-outline"
|
|
13
|
-
},
|
|
14
|
-
size: {
|
|
15
|
-
sm: "ui-toggle-sm",
|
|
16
|
-
default: "ui-toggle-default-size",
|
|
17
|
-
lg: "ui-toggle-lg"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
defaultVariants: {
|
|
21
|
-
variant: "default",
|
|
22
|
-
size: "default"
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
var Toggle = React2.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
26
|
-
TogglePrimitive.Root,
|
|
27
|
-
{
|
|
28
|
-
ref,
|
|
29
|
-
"data-slot": "toggle",
|
|
30
|
-
className: cn(toggleVariants({ variant, size }), className),
|
|
31
|
-
...props
|
|
32
|
-
}
|
|
33
|
-
));
|
|
34
|
-
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
35
|
-
var ToggleGroup = React2.forwardRef(({ className, variant = "default", size = "default", children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
36
|
-
ToggleGroupPrimitive.Root,
|
|
37
|
-
{
|
|
38
|
-
ref,
|
|
39
|
-
"data-slot": "toggle-group",
|
|
40
|
-
"data-variant": variant,
|
|
41
|
-
"data-size": size,
|
|
42
|
-
className: cn("ui-toggle-group", className),
|
|
43
|
-
...props,
|
|
44
|
-
children
|
|
45
|
-
}
|
|
46
|
-
));
|
|
47
|
-
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
48
|
-
var ToggleGroupItem = React2.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
49
|
-
ToggleGroupPrimitive.Item,
|
|
50
|
-
{
|
|
51
|
-
ref,
|
|
52
|
-
"data-slot": "toggle-group-item",
|
|
53
|
-
className: cn(toggleVariants({ variant, size }), className),
|
|
54
|
-
...props
|
|
55
|
-
}
|
|
56
|
-
));
|
|
57
|
-
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
58
|
-
|
|
59
|
-
export { Toggle, ToggleGroup, ToggleGroupItem, toggleVariants };
|