@deepnoid/ui 0.1.12 → 0.1.14
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/.turbo/turbo-build.log +166 -156
- package/dist/{chunk-LHDOM76J.mjs → chunk-2KAR2PTQ.mjs} +1 -1
- package/dist/{chunk-QYJORE4E.mjs → chunk-4GLKWK3Z.mjs} +1 -1
- package/dist/{chunk-H5DOTBKA.mjs → chunk-56RN6YOP.mjs} +1 -1
- package/dist/{chunk-RMTHVIPI.mjs → chunk-57WBWSSL.mjs} +2 -2
- package/dist/{chunk-ILFY6MZ6.mjs → chunk-6G7GOPSB.mjs} +5 -5
- package/dist/{chunk-G3LQ3ZX6.mjs → chunk-72JRFZCH.mjs} +4 -4
- package/dist/{chunk-PI6Q5JDU.mjs → chunk-7R4NOC2G.mjs} +11 -11
- package/dist/{chunk-6BBDU4HW.mjs → chunk-7R4QY3TA.mjs} +1 -1
- package/dist/{chunk-M5KV3WZ2.mjs → chunk-A7OXEUCC.mjs} +29 -37
- package/dist/{chunk-W55GVLPJ.mjs → chunk-AHTNXGAY.mjs} +1 -1
- package/dist/{chunk-M2IRRTFM.mjs → chunk-D7WPZ5C6.mjs} +17 -14
- package/dist/{chunk-RRI3I435.mjs → chunk-DADMVOYI.mjs} +1 -1
- package/dist/{chunk-ASQAVFM5.mjs → chunk-GQS6V47G.mjs} +1 -1
- package/dist/{chunk-C62UPLCC.mjs → chunk-GXWSYM7Z.mjs} +2 -2
- package/dist/{chunk-OHDRKCOC.mjs → chunk-KFBG45BI.mjs} +43 -26
- package/dist/chunk-KSZEUKBY.mjs +143 -0
- package/dist/{chunk-KHI2DZTG.mjs → chunk-LP724WOP.mjs} +4 -4
- package/dist/{chunk-BWURZ3WF.mjs → chunk-NEUCUEIG.mjs} +2 -2
- package/dist/{chunk-DPCE4DLW.mjs → chunk-NJ4PBW65.mjs} +1 -1
- package/dist/chunk-QRAHATAM.mjs +380 -0
- package/dist/{chunk-N4F3R6HG.mjs → chunk-WB24YDE2.mjs} +1 -1
- package/dist/{chunk-N4UFXIUC.mjs → chunk-YQGZRSUQ.mjs} +1 -1
- package/dist/components/avatar/avatar.js +29 -37
- package/dist/components/avatar/avatar.mjs +2 -2
- package/dist/components/avatar/index.js +29 -37
- package/dist/components/avatar/index.mjs +2 -2
- package/dist/components/breadcrumb/breadcrumb.d.mts +0 -3
- package/dist/components/breadcrumb/breadcrumb.d.ts +0 -3
- package/dist/components/breadcrumb/breadcrumb.js +257 -66
- package/dist/components/breadcrumb/breadcrumb.mjs +13 -3
- package/dist/components/breadcrumb/index.js +257 -66
- package/dist/components/breadcrumb/index.mjs +13 -3
- package/dist/components/button/button-group.js +1 -1
- package/dist/components/button/button-group.mjs +1 -1
- package/dist/components/button/button.js +29 -37
- package/dist/components/button/button.mjs +4 -4
- package/dist/components/button/icon-button.d.mts +157 -0
- package/dist/components/button/icon-button.d.ts +157 -0
- package/dist/components/button/icon-button.js +4674 -0
- package/dist/components/button/icon-button.mjs +16 -0
- package/dist/components/button/index.d.mts +5 -0
- package/dist/components/button/index.d.ts +5 -0
- package/dist/components/button/index.js +566 -45
- package/dist/components/button/index.mjs +16 -7
- package/dist/components/button/text-button.d.mts +146 -0
- package/dist/components/button/text-button.d.ts +146 -0
- package/dist/components/button/text-button.js +507 -0
- package/dist/components/button/text-button.mjs +11 -0
- package/dist/components/chip/chip.js +29 -37
- package/dist/components/chip/chip.mjs +3 -3
- package/dist/components/chip/index.js +29 -37
- package/dist/components/chip/index.mjs +3 -3
- package/dist/components/dateTimePicker/calendar.js +29 -37
- package/dist/components/dateTimePicker/calendar.mjs +3 -3
- package/dist/components/dateTimePicker/dateTimePicker.js +29 -37
- package/dist/components/dateTimePicker/dateTimePicker.mjs +7 -7
- package/dist/components/dateTimePicker/index.js +29 -37
- package/dist/components/dateTimePicker/index.mjs +7 -7
- package/dist/components/dateTimePicker/timePicker.js +29 -37
- package/dist/components/dateTimePicker/timePicker.mjs +5 -5
- package/dist/components/icon/Icon.d.mts +4 -4
- package/dist/components/icon/Icon.d.ts +4 -4
- package/dist/components/icon/Icon.js +29 -37
- package/dist/components/icon/Icon.mjs +2 -2
- package/dist/components/icon/index.js +29 -37
- package/dist/components/icon/index.mjs +2 -2
- package/dist/components/icon/template.d.mts +1 -1
- package/dist/components/icon/template.d.ts +1 -1
- package/dist/components/icon/template.js +29 -37
- package/dist/components/icon/template.mjs +1 -1
- package/dist/components/input/index.js +29 -37
- package/dist/components/input/index.mjs +3 -3
- package/dist/components/input/input.js +29 -37
- package/dist/components/input/input.mjs +3 -3
- package/dist/components/list/index.js +29 -37
- package/dist/components/list/index.mjs +4 -4
- package/dist/components/list/listItem.js +29 -37
- package/dist/components/list/listItem.mjs +4 -4
- package/dist/components/modal/index.js +29 -37
- package/dist/components/modal/index.mjs +10 -7
- package/dist/components/modal/modal.js +29 -37
- package/dist/components/modal/modal.mjs +10 -7
- package/dist/components/pagination/index.js +36 -44
- package/dist/components/pagination/index.mjs +5 -5
- package/dist/components/pagination/pagination.js +36 -44
- package/dist/components/pagination/pagination.mjs +5 -5
- package/dist/components/ripple/index.mjs +3 -3
- package/dist/components/select/index.js +29 -37
- package/dist/components/select/index.mjs +4 -4
- package/dist/components/select/option.js +29 -37
- package/dist/components/select/option.mjs +3 -3
- package/dist/components/select/select.js +29 -37
- package/dist/components/select/select.mjs +4 -4
- package/dist/components/table/index.js +55 -60
- package/dist/components/table/index.mjs +7 -7
- package/dist/components/table/table-body.js +17 -14
- package/dist/components/table/table-body.mjs +1 -1
- package/dist/components/table/table.js +55 -60
- package/dist/components/table/table.mjs +7 -7
- package/dist/components/toast/index.js +29 -37
- package/dist/components/toast/index.mjs +4 -4
- package/dist/components/toast/toast.js +29 -37
- package/dist/components/toast/toast.mjs +3 -3
- package/dist/components/toast/use-toast.js +29 -37
- package/dist/components/toast/use-toast.mjs +4 -4
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1115 -619
- package/dist/index.mjs +48 -40
- package/package.json +1 -1
- /package/dist/{chunk-VUYUQGLF.mjs → chunk-MY5U63QO.mjs} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
input_default
|
|
4
|
-
} from "./chunk-LHDOM76J.mjs";
|
|
5
2
|
import {
|
|
6
3
|
usePagination_default
|
|
7
4
|
} from "./chunk-F3HENRVM.mjs";
|
|
5
|
+
import {
|
|
6
|
+
input_default
|
|
7
|
+
} from "./chunk-2KAR2PTQ.mjs";
|
|
8
8
|
import {
|
|
9
9
|
Icon_default
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DADMVOYI.mjs";
|
|
11
11
|
import {
|
|
12
12
|
tv
|
|
13
13
|
} from "./chunk-2ZT6V4QR.mjs";
|
|
@@ -138,7 +138,7 @@ var paginationStyle = tv(
|
|
|
138
138
|
"items-center",
|
|
139
139
|
"justify-center",
|
|
140
140
|
"cursor-pointer",
|
|
141
|
-
"
|
|
141
|
+
"text-neutral-main",
|
|
142
142
|
"data-[is-active=false]:stroke-neutral-light",
|
|
143
143
|
"data-[is-active=false]:cursor-default"
|
|
144
144
|
],
|
|
@@ -201,7 +201,7 @@ var paginationStyle = tv(
|
|
|
201
201
|
"data-[selected=true]:text-primary-main",
|
|
202
202
|
"data-[selected=true]:bg-primary-soft"
|
|
203
203
|
],
|
|
204
|
-
icon: ["hover:
|
|
204
|
+
icon: ["hover:text-primary-main"]
|
|
205
205
|
}
|
|
206
206
|
},
|
|
207
207
|
{
|
|
@@ -213,7 +213,7 @@ var paginationStyle = tv(
|
|
|
213
213
|
"data-[selected=true]:text-secondary-main",
|
|
214
214
|
"data-[selected=true]:bg-secondary-soft"
|
|
215
215
|
],
|
|
216
|
-
icon: ["hover:
|
|
216
|
+
icon: ["hover:text-secondary-main"]
|
|
217
217
|
}
|
|
218
218
|
},
|
|
219
219
|
{
|
|
@@ -225,7 +225,7 @@ var paginationStyle = tv(
|
|
|
225
225
|
"data-[selected=true]:text-neutral-dark",
|
|
226
226
|
"data-[selected=true]:bg-neutral-soft"
|
|
227
227
|
],
|
|
228
|
-
icon: ["hover:
|
|
228
|
+
icon: ["hover:text-neutral-dark"]
|
|
229
229
|
}
|
|
230
230
|
},
|
|
231
231
|
{
|
|
@@ -237,7 +237,7 @@ var paginationStyle = tv(
|
|
|
237
237
|
"data-[selected=true]:text-primary-main",
|
|
238
238
|
"data-[selected=true]:border-b-primary-main"
|
|
239
239
|
],
|
|
240
|
-
icon: ["hover:
|
|
240
|
+
icon: ["hover:text-primary-main"]
|
|
241
241
|
}
|
|
242
242
|
},
|
|
243
243
|
{
|
|
@@ -249,7 +249,7 @@ var paginationStyle = tv(
|
|
|
249
249
|
"data-[selected=true]:text-secondary-main",
|
|
250
250
|
"data-[selected=true]:border-b-secondary-main"
|
|
251
251
|
],
|
|
252
|
-
icon: ["hover:
|
|
252
|
+
icon: ["hover:text-secondary-main"]
|
|
253
253
|
}
|
|
254
254
|
},
|
|
255
255
|
{
|
|
@@ -261,7 +261,7 @@ var paginationStyle = tv(
|
|
|
261
261
|
"data-[selected=true]:text-neutral-dark",
|
|
262
262
|
"data-[selected=true]:border-b-neutral-main"
|
|
263
263
|
],
|
|
264
|
-
icon: ["hover:
|
|
264
|
+
icon: ["hover:text-neutral-dark"]
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
],
|
|
@@ -409,6 +409,35 @@ var template = {
|
|
|
409
409
|
}
|
|
410
410
|
);
|
|
411
411
|
},
|
|
412
|
+
home: ({ className }) => {
|
|
413
|
+
return /* @__PURE__ */ jsxs(
|
|
414
|
+
"svg",
|
|
415
|
+
{
|
|
416
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
417
|
+
width: "18",
|
|
418
|
+
height: "18",
|
|
419
|
+
viewBox: "0 0 18 18",
|
|
420
|
+
fill: "none",
|
|
421
|
+
className,
|
|
422
|
+
children: [
|
|
423
|
+
/* @__PURE__ */ jsx(
|
|
424
|
+
"path",
|
|
425
|
+
{
|
|
426
|
+
d: "M8.60249 2.88071C8.70796 2.77538 8.85092 2.71621 8.99999 2.71621C9.14905 2.71621 9.29202 2.77538 9.39749 2.88071L15.915 9.39821C15.9669 9.45191 16.029 9.49474 16.0976 9.52418C16.1663 9.55363 16.2401 9.56911 16.3148 9.56973C16.3895 9.57034 16.4635 9.55607 16.5326 9.52776C16.6018 9.49944 16.6645 9.45764 16.7173 9.4048C16.7701 9.35196 16.8119 9.28914 16.8401 9.22C16.8684 9.15086 16.8826 9.07678 16.8819 9.00209C16.8812 8.92741 16.8656 8.8536 16.8361 8.78499C16.8066 8.71638 16.7637 8.65433 16.71 8.60246L10.1932 2.08496C10.0365 1.92826 9.85051 1.80396 9.64577 1.71915C9.44103 1.63435 9.22159 1.5907 8.99999 1.5907C8.77838 1.5907 8.55894 1.63435 8.3542 1.71915C8.14947 1.80396 7.96344 1.92826 7.80674 2.08496L1.28924 8.60246C1.23554 8.65438 1.19272 8.71647 1.16327 8.78511C1.13382 8.85375 1.11834 8.92757 1.11773 9.00225C1.11711 9.07694 1.13138 9.15101 1.15969 9.22012C1.18801 9.28924 1.22981 9.35202 1.28265 9.40481C1.33549 9.4576 1.39831 9.49934 1.46745 9.52759C1.53659 9.55584 1.61067 9.57004 1.68536 9.56935C1.76005 9.56867 1.83385 9.55312 1.90246 9.5236C1.97108 9.49409 2.03312 9.45121 2.08499 9.39746L8.60249 2.88071Z",
|
|
427
|
+
fill: "currentColor"
|
|
428
|
+
}
|
|
429
|
+
),
|
|
430
|
+
/* @__PURE__ */ jsx(
|
|
431
|
+
"path",
|
|
432
|
+
{
|
|
433
|
+
d: "M9 4.07397L15.1193 10.1932C15.1418 10.2157 15.1643 10.2367 15.1875 10.2577V14.9062C15.1875 15.6825 14.5575 16.3125 13.7812 16.3125H11.25C11.1008 16.3125 10.9577 16.2532 10.8523 16.1477C10.7468 16.0422 10.6875 15.8992 10.6875 15.75V12.375C10.6875 12.2258 10.6282 12.0827 10.5227 11.9772C10.4173 11.8717 10.2742 11.8125 10.125 11.8125H7.875C7.72582 11.8125 7.58274 11.8717 7.47725 11.9772C7.37176 12.0827 7.3125 12.2258 7.3125 12.375V15.75C7.3125 15.8992 7.25324 16.0422 7.14775 16.1477C7.04226 16.2532 6.89918 16.3125 6.75 16.3125H4.21875C3.84579 16.3125 3.4881 16.1643 3.22438 15.9006C2.96066 15.6369 2.8125 15.2792 2.8125 14.9062V10.2577C2.83583 10.2369 2.85859 10.2153 2.88075 10.1932L9 4.07397Z",
|
|
434
|
+
fill: "currentColor"
|
|
435
|
+
}
|
|
436
|
+
)
|
|
437
|
+
]
|
|
438
|
+
}
|
|
439
|
+
);
|
|
440
|
+
},
|
|
412
441
|
// ----------------------------------- old ---------------------------------
|
|
413
442
|
// ** Status **
|
|
414
443
|
plus: ({ className, fill }) => {
|
|
@@ -865,43 +894,6 @@ var template = {
|
|
|
865
894
|
// );
|
|
866
895
|
// },
|
|
867
896
|
// ** Common **
|
|
868
|
-
home: ({ className, fill }) => {
|
|
869
|
-
return /* @__PURE__ */ jsx(
|
|
870
|
-
"svg",
|
|
871
|
-
{
|
|
872
|
-
width: "24",
|
|
873
|
-
height: "24",
|
|
874
|
-
viewBox: "0 0 24 24",
|
|
875
|
-
fill: "none",
|
|
876
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
877
|
-
className,
|
|
878
|
-
children: fill ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
879
|
-
/* @__PURE__ */ jsx(
|
|
880
|
-
"path",
|
|
881
|
-
{
|
|
882
|
-
d: "M11.4699 3.84111C11.6106 3.70066 11.8012 3.62177 11.9999 3.62177C12.1987 3.62177 12.3893 3.70066 12.5299 3.84111L21.2199 12.5311C21.2892 12.6027 21.3719 12.6598 21.4635 12.6991C21.555 12.7383 21.6534 12.759 21.753 12.7598C21.8526 12.7606 21.9513 12.7416 22.0435 12.7038C22.1356 12.6661 22.2194 12.6104 22.2897 12.5399C22.3601 12.4694 22.4158 12.3857 22.4534 12.2935C22.4911 12.2013 22.51 12.1025 22.5091 12.003C22.5082 11.9034 22.4875 11.805 22.4481 11.7135C22.4088 11.622 22.3516 11.5393 22.2799 11.4701L13.5909 2.78011C13.382 2.57118 13.134 2.40544 12.861 2.29237C12.588 2.17929 12.2954 2.12109 11.9999 2.12109C11.7045 2.12109 11.4119 2.17929 11.1389 2.29237C10.8659 2.40544 10.6179 2.57118 10.4089 2.78011L1.71894 11.4701C1.64734 11.5393 1.59025 11.6221 1.55098 11.7136C1.51172 11.8052 1.49108 11.9036 1.49026 12.0032C1.48944 12.1028 1.50846 12.2015 1.54622 12.2937C1.58397 12.3858 1.6397 12.4695 1.71015 12.5399C1.78061 12.6103 1.86437 12.6659 1.95656 12.7036C2.04875 12.7413 2.14752 12.7602 2.2471 12.7593C2.34669 12.7584 2.44509 12.7377 2.53658 12.6983C2.62806 12.659 2.71079 12.6018 2.77994 12.5301L11.4699 3.84111Z",
|
|
883
|
-
fill: "currentColor"
|
|
884
|
-
}
|
|
885
|
-
),
|
|
886
|
-
/* @__PURE__ */ jsx(
|
|
887
|
-
"path",
|
|
888
|
-
{
|
|
889
|
-
d: "M12 5.43213L20.159 13.5911C20.189 13.6211 20.219 13.6491 20.25 13.6771V19.8751C20.25 20.9101 19.41 21.7501 18.375 21.7501H15C14.8011 21.7501 14.6103 21.6711 14.4697 21.5305C14.329 21.3898 14.25 21.199 14.25 21.0001V16.5001C14.25 16.3012 14.171 16.1105 14.0303 15.9698C13.8897 15.8291 13.6989 15.7501 13.5 15.7501H10.5C10.3011 15.7501 10.1103 15.8291 9.96967 15.9698C9.82902 16.1105 9.75 16.3012 9.75 16.5001V21.0001C9.75 21.199 9.67098 21.3898 9.53033 21.5305C9.38968 21.6711 9.19891 21.7501 9 21.7501H5.625C5.12772 21.7501 4.65081 21.5526 4.29917 21.201C3.94754 20.8493 3.75 20.3724 3.75 19.8751V13.6771C3.78111 13.6493 3.81146 13.6206 3.841 13.5911L12 5.43213Z",
|
|
890
|
-
fill: "currentColor"
|
|
891
|
-
}
|
|
892
|
-
)
|
|
893
|
-
] }) : /* @__PURE__ */ jsx(
|
|
894
|
-
"path",
|
|
895
|
-
{
|
|
896
|
-
d: "M2.25 12.0001L11.204 3.04507C11.644 2.60607 12.356 2.60607 12.795 3.04507L21.75 12.0001M4.5 9.75007V19.8751C4.5 20.4961 5.004 21.0001 5.625 21.0001H9.75V16.1251C9.75 15.5041 10.254 15.0001 10.875 15.0001H13.125C13.746 15.0001 14.25 15.5041 14.25 16.1251V21.0001H18.375C18.996 21.0001 19.5 20.4961 19.5 19.8751V9.75007M8.25 21.0001H16.5",
|
|
897
|
-
stroke: "currentColor",
|
|
898
|
-
strokeLinecap: "round",
|
|
899
|
-
strokeLinejoin: "round"
|
|
900
|
-
}
|
|
901
|
-
)
|
|
902
|
-
}
|
|
903
|
-
);
|
|
904
|
-
},
|
|
905
897
|
camera: ({ className, fill }) => {
|
|
906
898
|
return /* @__PURE__ */ jsx(
|
|
907
899
|
"svg",
|
|
@@ -57,20 +57,23 @@ var TableBody = ({
|
|
|
57
57
|
);
|
|
58
58
|
const hasRows = rows.length > 0;
|
|
59
59
|
const colSpan = (columns.length || 1) + (selectableRows ? 1 : 0);
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
60
|
+
return /* @__PURE__ */ jsxs("tbody", { className: slots.tbody({ class: classNames == null ? void 0 : classNames.tbody }), children: [
|
|
61
|
+
hasRows && rows.map((row, rowIndex) => {
|
|
62
|
+
const isRowChecked = checkedRows.has(rowIndex);
|
|
63
|
+
return /* @__PURE__ */ jsxs("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), "aria-checked": isRowChecked, children: [
|
|
64
|
+
columns.map((column) => /* @__PURE__ */ createElement("td", { ...getCellProps(column, row), key: column.field })),
|
|
65
|
+
selectableRows && /* @__PURE__ */ jsx("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
66
|
+
checkbox_default,
|
|
67
|
+
{
|
|
68
|
+
size,
|
|
69
|
+
checked: isRowChecked,
|
|
70
|
+
onChange: (e) => onCheckRow(rowIndex, e.target.checked)
|
|
71
|
+
}
|
|
72
|
+
) }) })
|
|
73
|
+
] }, rowIndex);
|
|
74
|
+
}),
|
|
75
|
+
!hasRows && emptyContent && /* @__PURE__ */ jsx("tr", { className: clsx(slots.tr({ class: classNames == null ? void 0 : classNames.tr }), "border-none"), children: /* @__PURE__ */ jsx("td", { colSpan, className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: emptyContent }) })
|
|
76
|
+
] });
|
|
74
77
|
};
|
|
75
78
|
var table_body_default = TableBody;
|
|
76
79
|
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-ZOTHPHXA.mjs";
|
|
5
5
|
import {
|
|
6
6
|
toast_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-56RN6YOP.mjs";
|
|
8
8
|
|
|
9
9
|
// src/components/toast/use-toast.tsx
|
|
10
10
|
import { createContext, useContext, useState, useCallback, useEffect, useRef } from "react";
|
|
@@ -1,38 +1,63 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
text_button_default
|
|
4
|
+
} from "./chunk-KSZEUKBY.mjs";
|
|
2
5
|
import {
|
|
3
6
|
Icon_default
|
|
4
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DADMVOYI.mjs";
|
|
5
8
|
import {
|
|
6
9
|
tv
|
|
7
10
|
} from "./chunk-2ZT6V4QR.mjs";
|
|
8
11
|
|
|
9
12
|
// src/components/breadcrumb/breadcrumb.tsx
|
|
10
13
|
import { forwardRef, useMemo } from "react";
|
|
11
|
-
import {
|
|
12
|
-
var BreadcrumbMenu = forwardRef(({ label, onClick, isCurrent, size }
|
|
13
|
-
const slots = useMemo(() => breadcrumbStyle({ size }), [size]);
|
|
14
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
var BreadcrumbMenu = forwardRef(({ label, onClick, isCurrent, size }) => {
|
|
14
16
|
return /* @__PURE__ */ jsx(
|
|
15
|
-
|
|
17
|
+
text_button_default,
|
|
16
18
|
{
|
|
17
|
-
|
|
19
|
+
variant: isCurrent ? "underline" : "non-under",
|
|
20
|
+
color: isCurrent ? "primary" : "neutral",
|
|
21
|
+
size,
|
|
18
22
|
onClick,
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
"aria-label": label,
|
|
24
|
+
classNames: { base: "font-bold" },
|
|
21
25
|
children: label
|
|
22
26
|
}
|
|
23
27
|
);
|
|
24
28
|
});
|
|
25
29
|
var Breadcrumb = forwardRef(({ startIconName, size, menus, classNames }, ref) => {
|
|
26
30
|
const slots = useMemo(() => breadcrumbStyle({ size }), [size]);
|
|
27
|
-
const renderMenus = (menus2) =>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
const renderMenus = (menus2) => {
|
|
32
|
+
const flatMenus = [];
|
|
33
|
+
const flatten = (items) => {
|
|
34
|
+
var _a;
|
|
35
|
+
for (const item of items) {
|
|
36
|
+
flatMenus.push(item);
|
|
37
|
+
if ((_a = item.children) == null ? void 0 : _a.length) {
|
|
38
|
+
flatten(item.children);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
flatten(menus2);
|
|
43
|
+
return flatMenus.map((menu, index) => {
|
|
44
|
+
const isLast = index === flatMenus.length - 1;
|
|
45
|
+
return /* @__PURE__ */ jsxs(
|
|
46
|
+
"li",
|
|
47
|
+
{
|
|
48
|
+
className: "flex items-center gap-[5px]",
|
|
49
|
+
"aria-current": isLast ? "page" : void 0,
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ jsx(BreadcrumbMenu, { label: menu.label, onClick: menu.onClick, isCurrent: isLast, size }),
|
|
52
|
+
!isLast && /* @__PURE__ */ jsx(Icon_default, { name: "right", className: slots.separator() })
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
`${menu.label}-${index}`
|
|
56
|
+
);
|
|
57
|
+
});
|
|
58
|
+
};
|
|
34
59
|
return /* @__PURE__ */ jsx("nav", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), "aria-label": "Breadcrumb", children: /* @__PURE__ */ jsxs("ul", { className: "flex items-center gap-1", children: [
|
|
35
|
-
startIconName && /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Icon_default, { name: startIconName,
|
|
60
|
+
startIconName && /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Icon_default, { name: startIconName, size, className: `${slots.icon()}` }) }),
|
|
36
61
|
renderMenus(menus)
|
|
37
62
|
] }) });
|
|
38
63
|
});
|
|
@@ -41,16 +66,8 @@ var breadcrumb_default = Breadcrumb;
|
|
|
41
66
|
var breadcrumbStyle = tv({
|
|
42
67
|
slots: {
|
|
43
68
|
base: ["flex", "items-center"],
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"flex",
|
|
47
|
-
"items-center",
|
|
48
|
-
"hover:underline",
|
|
49
|
-
"cursor-pointer",
|
|
50
|
-
"[line-height:initial]"
|
|
51
|
-
],
|
|
52
|
-
icon: ["fill-primary-main", "text-primary-main", "stroke-primary-main"],
|
|
53
|
-
separator: ["stroke-neutral-main"]
|
|
69
|
+
icon: ["text-primary-main"],
|
|
70
|
+
separator: ["text-neutral-main"]
|
|
54
71
|
},
|
|
55
72
|
variants: {
|
|
56
73
|
size: {
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
tv
|
|
4
|
+
} from "./chunk-2ZT6V4QR.mjs";
|
|
5
|
+
import {
|
|
6
|
+
clsx
|
|
7
|
+
} from "./chunk-27Y6K5NK.mjs";
|
|
8
|
+
import {
|
|
9
|
+
mapPropsVariants
|
|
10
|
+
} from "./chunk-E3G5QXSH.mjs";
|
|
11
|
+
|
|
12
|
+
// src/components/button/text-button.tsx
|
|
13
|
+
import {
|
|
14
|
+
forwardRef,
|
|
15
|
+
useMemo,
|
|
16
|
+
useCallback,
|
|
17
|
+
isValidElement,
|
|
18
|
+
cloneElement
|
|
19
|
+
} from "react";
|
|
20
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
|
+
var TextButton = forwardRef((originalProps, ref) => {
|
|
22
|
+
const [props, variantProps] = mapPropsVariants(originalProps, textButtonStyle.variantKeys);
|
|
23
|
+
const { children, startContent, endContent, classNames, variant, isDisabled, size, ...buttonProps } = {
|
|
24
|
+
...props,
|
|
25
|
+
...variantProps
|
|
26
|
+
};
|
|
27
|
+
const slots = useMemo(() => textButtonStyle({ ...variantProps }), [variantProps]);
|
|
28
|
+
const getContentProps = useCallback(() => {
|
|
29
|
+
const className = slots.content({ class: classNames == null ? void 0 : classNames.content });
|
|
30
|
+
return { className, size };
|
|
31
|
+
}, [slots, classNames, size]);
|
|
32
|
+
const renderContent = (content) => {
|
|
33
|
+
const contentProps = getContentProps();
|
|
34
|
+
if (isValidElement(content)) {
|
|
35
|
+
const _content = content;
|
|
36
|
+
const contentProps2 = getContentProps();
|
|
37
|
+
const mergedProps = {
|
|
38
|
+
...contentProps2,
|
|
39
|
+
...typeof _content.props.className === "string" && {
|
|
40
|
+
className: clsx(contentProps2.className, _content.props.className)
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
return cloneElement(_content, mergedProps);
|
|
44
|
+
}
|
|
45
|
+
return /* @__PURE__ */ jsx("div", { ...contentProps, children: content });
|
|
46
|
+
};
|
|
47
|
+
return /* @__PURE__ */ jsxs(
|
|
48
|
+
"button",
|
|
49
|
+
{
|
|
50
|
+
...buttonProps,
|
|
51
|
+
ref,
|
|
52
|
+
disabled: isDisabled,
|
|
53
|
+
className: clsx(
|
|
54
|
+
slots.base({ class: classNames == null ? void 0 : classNames.base }),
|
|
55
|
+
variant === "underline" && slots.underline({ class: classNames == null ? void 0 : classNames.underline })
|
|
56
|
+
),
|
|
57
|
+
children: [
|
|
58
|
+
startContent && renderContent(startContent),
|
|
59
|
+
children,
|
|
60
|
+
endContent && renderContent(endContent)
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
});
|
|
65
|
+
TextButton.displayName = "TextButton";
|
|
66
|
+
var text_button_default = TextButton;
|
|
67
|
+
var textButtonStyle = tv({
|
|
68
|
+
slots: {
|
|
69
|
+
base: ["flex", "items-center", "justify-center", "whitespace-nowrap", "overflow-hidden"],
|
|
70
|
+
content: [],
|
|
71
|
+
underline: ["underline", "decoration-skip-ink", "underline-offset-auto"]
|
|
72
|
+
},
|
|
73
|
+
variants: {
|
|
74
|
+
variant: {
|
|
75
|
+
"non-under": [],
|
|
76
|
+
underline: []
|
|
77
|
+
},
|
|
78
|
+
color: {
|
|
79
|
+
primary: [],
|
|
80
|
+
secondary: [],
|
|
81
|
+
neutral: []
|
|
82
|
+
},
|
|
83
|
+
size: {
|
|
84
|
+
sm: {
|
|
85
|
+
base: ["text-sm"],
|
|
86
|
+
underline: ["decoration-[1px]"]
|
|
87
|
+
},
|
|
88
|
+
md: {
|
|
89
|
+
base: ["text-md"],
|
|
90
|
+
underline: ["decoration-[1.25px]"]
|
|
91
|
+
},
|
|
92
|
+
lg: {
|
|
93
|
+
base: ["text-lg"],
|
|
94
|
+
underline: ["decoration-[1.5px]"]
|
|
95
|
+
},
|
|
96
|
+
xl: {
|
|
97
|
+
base: ["text-xl"],
|
|
98
|
+
underline: ["decoration-[1.75px]"]
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
isDisabled: {
|
|
102
|
+
true: {
|
|
103
|
+
base: ["!text-neutral-light", "pointer-events-none"]
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
isInGroup: {
|
|
107
|
+
true: {
|
|
108
|
+
base: ["[&:not(:first-child):not(:last-child)]:rounded-none", "first:rounded-r-none", "last:rounded-l-none"]
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
compoundVariants: [
|
|
113
|
+
{
|
|
114
|
+
color: "primary",
|
|
115
|
+
class: {
|
|
116
|
+
base: ["text-primary-main", "hover:text-primary-dark", "active:text-primary-strong"]
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
color: "secondary",
|
|
121
|
+
class: {
|
|
122
|
+
base: ["text-secondary-main", "hover:text-secondary-dark", "active:text-secondary-strong"]
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
color: "neutral",
|
|
127
|
+
class: {
|
|
128
|
+
base: ["text-neutral-main", "hover:text-neutral-dark", "active:text-neutral-strong"]
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
defaultVariants: {
|
|
133
|
+
size: "md",
|
|
134
|
+
color: "primary",
|
|
135
|
+
variant: "non-under",
|
|
136
|
+
isDisabled: false,
|
|
137
|
+
isInGroup: false
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
export {
|
|
142
|
+
text_button_default
|
|
143
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
ripple_default
|
|
4
|
-
} from "./chunk-LXHUO6VM.mjs";
|
|
5
2
|
import {
|
|
6
3
|
useRipple
|
|
7
4
|
} from "./chunk-6PNKRBUT.mjs";
|
|
5
|
+
import {
|
|
6
|
+
ripple_default
|
|
7
|
+
} from "./chunk-LXHUO6VM.mjs";
|
|
8
8
|
import {
|
|
9
9
|
Icon_default
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DADMVOYI.mjs";
|
|
11
11
|
import {
|
|
12
12
|
tv
|
|
13
13
|
} from "./chunk-2ZT6V4QR.mjs";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
option_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NJ4PBW65.mjs";
|
|
5
5
|
import {
|
|
6
6
|
useSelect
|
|
7
7
|
} from "./chunk-S3QS5B7F.mjs";
|
|
8
8
|
import {
|
|
9
9
|
Icon_default
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DADMVOYI.mjs";
|
|
11
11
|
import {
|
|
12
12
|
tv
|
|
13
13
|
} from "./chunk-2ZT6V4QR.mjs";
|