@deepnoid/ui 0.1.12 → 0.1.13

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.
Files changed (109) hide show
  1. package/.turbo/turbo-build.log +158 -148
  2. package/dist/{chunk-LHDOM76J.mjs → chunk-2KAR2PTQ.mjs} +1 -1
  3. package/dist/{chunk-QYJORE4E.mjs → chunk-4GLKWK3Z.mjs} +1 -1
  4. package/dist/{chunk-H5DOTBKA.mjs → chunk-56RN6YOP.mjs} +1 -1
  5. package/dist/{chunk-RMTHVIPI.mjs → chunk-57WBWSSL.mjs} +2 -2
  6. package/dist/{chunk-ILFY6MZ6.mjs → chunk-6G7GOPSB.mjs} +5 -5
  7. package/dist/{chunk-PI6Q5JDU.mjs → chunk-7R4NOC2G.mjs} +11 -11
  8. package/dist/{chunk-6BBDU4HW.mjs → chunk-7R4QY3TA.mjs} +1 -1
  9. package/dist/{chunk-M5KV3WZ2.mjs → chunk-A7OXEUCC.mjs} +29 -37
  10. package/dist/{chunk-W55GVLPJ.mjs → chunk-AHTNXGAY.mjs} +1 -1
  11. package/dist/{chunk-RRI3I435.mjs → chunk-DADMVOYI.mjs} +1 -1
  12. package/dist/{chunk-ASQAVFM5.mjs → chunk-GQS6V47G.mjs} +1 -1
  13. package/dist/{chunk-C62UPLCC.mjs → chunk-GXWSYM7Z.mjs} +2 -2
  14. package/dist/{chunk-KHI2DZTG.mjs → chunk-LP724WOP.mjs} +4 -4
  15. package/dist/{chunk-BWURZ3WF.mjs → chunk-NEUCUEIG.mjs} +2 -2
  16. package/dist/{chunk-DPCE4DLW.mjs → chunk-NJ4PBW65.mjs} +1 -1
  17. package/dist/{chunk-G3LQ3ZX6.mjs → chunk-O5UA4WDU.mjs} +1 -1
  18. package/dist/{chunk-OHDRKCOC.mjs → chunk-T5LK5CJS.mjs} +41 -23
  19. package/dist/chunk-TTY3EEXX.mjs +143 -0
  20. package/dist/{chunk-N4F3R6HG.mjs → chunk-WB24YDE2.mjs} +1 -1
  21. package/dist/{chunk-N4UFXIUC.mjs → chunk-YQGZRSUQ.mjs} +1 -1
  22. package/dist/chunk-ZMJYDLTS.mjs +380 -0
  23. package/dist/components/avatar/avatar.js +29 -37
  24. package/dist/components/avatar/avatar.mjs +2 -2
  25. package/dist/components/avatar/index.js +29 -37
  26. package/dist/components/avatar/index.mjs +2 -2
  27. package/dist/components/breadcrumb/breadcrumb.d.mts +0 -3
  28. package/dist/components/breadcrumb/breadcrumb.d.ts +0 -3
  29. package/dist/components/breadcrumb/breadcrumb.js +257 -65
  30. package/dist/components/breadcrumb/breadcrumb.mjs +13 -3
  31. package/dist/components/breadcrumb/index.js +257 -65
  32. package/dist/components/breadcrumb/index.mjs +13 -3
  33. package/dist/components/button/button-group.js +1 -1
  34. package/dist/components/button/button-group.mjs +1 -1
  35. package/dist/components/button/button.js +29 -37
  36. package/dist/components/button/button.mjs +4 -4
  37. package/dist/components/button/icon-button.d.mts +157 -0
  38. package/dist/components/button/icon-button.d.ts +157 -0
  39. package/dist/components/button/icon-button.js +4674 -0
  40. package/dist/components/button/icon-button.mjs +16 -0
  41. package/dist/components/button/index.d.mts +5 -0
  42. package/dist/components/button/index.d.ts +5 -0
  43. package/dist/components/button/index.js +566 -45
  44. package/dist/components/button/index.mjs +16 -7
  45. package/dist/components/button/text-button.d.mts +146 -0
  46. package/dist/components/button/text-button.d.ts +146 -0
  47. package/dist/components/button/text-button.js +507 -0
  48. package/dist/components/button/text-button.mjs +11 -0
  49. package/dist/components/chip/chip.js +29 -37
  50. package/dist/components/chip/chip.mjs +3 -3
  51. package/dist/components/chip/index.js +29 -37
  52. package/dist/components/chip/index.mjs +3 -3
  53. package/dist/components/dateTimePicker/calendar.js +29 -37
  54. package/dist/components/dateTimePicker/calendar.mjs +3 -3
  55. package/dist/components/dateTimePicker/dateTimePicker.js +29 -37
  56. package/dist/components/dateTimePicker/dateTimePicker.mjs +7 -7
  57. package/dist/components/dateTimePicker/index.js +29 -37
  58. package/dist/components/dateTimePicker/index.mjs +7 -7
  59. package/dist/components/dateTimePicker/timePicker.js +29 -37
  60. package/dist/components/dateTimePicker/timePicker.mjs +5 -5
  61. package/dist/components/icon/Icon.d.mts +4 -4
  62. package/dist/components/icon/Icon.d.ts +4 -4
  63. package/dist/components/icon/Icon.js +29 -37
  64. package/dist/components/icon/Icon.mjs +2 -2
  65. package/dist/components/icon/index.js +29 -37
  66. package/dist/components/icon/index.mjs +2 -2
  67. package/dist/components/icon/template.d.mts +1 -1
  68. package/dist/components/icon/template.d.ts +1 -1
  69. package/dist/components/icon/template.js +29 -37
  70. package/dist/components/icon/template.mjs +1 -1
  71. package/dist/components/input/index.js +29 -37
  72. package/dist/components/input/index.mjs +3 -3
  73. package/dist/components/input/input.js +29 -37
  74. package/dist/components/input/input.mjs +3 -3
  75. package/dist/components/list/index.js +29 -37
  76. package/dist/components/list/index.mjs +4 -4
  77. package/dist/components/list/listItem.js +29 -37
  78. package/dist/components/list/listItem.mjs +4 -4
  79. package/dist/components/modal/index.js +29 -37
  80. package/dist/components/modal/index.mjs +10 -7
  81. package/dist/components/modal/modal.js +29 -37
  82. package/dist/components/modal/modal.mjs +10 -7
  83. package/dist/components/pagination/index.js +36 -44
  84. package/dist/components/pagination/index.mjs +5 -5
  85. package/dist/components/pagination/pagination.js +36 -44
  86. package/dist/components/pagination/pagination.mjs +5 -5
  87. package/dist/components/ripple/index.mjs +3 -3
  88. package/dist/components/select/index.js +29 -37
  89. package/dist/components/select/index.mjs +4 -4
  90. package/dist/components/select/option.js +29 -37
  91. package/dist/components/select/option.mjs +3 -3
  92. package/dist/components/select/select.js +29 -37
  93. package/dist/components/select/select.mjs +4 -4
  94. package/dist/components/table/index.js +36 -44
  95. package/dist/components/table/index.mjs +6 -6
  96. package/dist/components/table/table.js +36 -44
  97. package/dist/components/table/table.mjs +6 -6
  98. package/dist/components/toast/index.js +29 -37
  99. package/dist/components/toast/index.mjs +4 -4
  100. package/dist/components/toast/toast.js +29 -37
  101. package/dist/components/toast/toast.mjs +3 -3
  102. package/dist/components/toast/use-toast.js +29 -37
  103. package/dist/components/toast/use-toast.mjs +4 -4
  104. package/dist/index.d.mts +2 -0
  105. package/dist/index.d.ts +2 -0
  106. package/dist/index.js +1102 -608
  107. package/dist/index.mjs +50 -42
  108. package/package.json +1 -1
  109. /package/dist/{chunk-VUYUQGLF.mjs → chunk-MY5U63QO.mjs} +0 -0
@@ -105,7 +105,7 @@ __export(breadcrumb_exports, {
105
105
  default: () => breadcrumb_default
106
106
  });
107
107
  module.exports = __toCommonJS(breadcrumb_exports);
108
- var import_react = require("react");
108
+ var import_react2 = require("react");
109
109
 
110
110
  // src/utils/tailwind-variants.ts
111
111
  var import_tailwind_variants = require("tailwind-variants");
@@ -733,6 +733,35 @@ var template = {
733
733
  }
734
734
  );
735
735
  },
736
+ home: ({ className }) => {
737
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
738
+ "svg",
739
+ {
740
+ xmlns: "http://www.w3.org/2000/svg",
741
+ width: "18",
742
+ height: "18",
743
+ viewBox: "0 0 18 18",
744
+ fill: "none",
745
+ className,
746
+ children: [
747
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
748
+ "path",
749
+ {
750
+ 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",
751
+ fill: "currentColor"
752
+ }
753
+ ),
754
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
755
+ "path",
756
+ {
757
+ 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",
758
+ fill: "currentColor"
759
+ }
760
+ )
761
+ ]
762
+ }
763
+ );
764
+ },
736
765
  // ----------------------------------- old ---------------------------------
737
766
  // ** Status **
738
767
  plus: ({ className, fill }) => {
@@ -1189,43 +1218,6 @@ var template = {
1189
1218
  // );
1190
1219
  // },
1191
1220
  // ** Common **
1192
- home: ({ className, fill }) => {
1193
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1194
- "svg",
1195
- {
1196
- width: "24",
1197
- height: "24",
1198
- viewBox: "0 0 24 24",
1199
- fill: "none",
1200
- xmlns: "http://www.w3.org/2000/svg",
1201
- className,
1202
- children: fill ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
1203
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1204
- "path",
1205
- {
1206
- 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",
1207
- fill: "currentColor"
1208
- }
1209
- ),
1210
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1211
- "path",
1212
- {
1213
- 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",
1214
- fill: "currentColor"
1215
- }
1216
- )
1217
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1218
- "path",
1219
- {
1220
- 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",
1221
- stroke: "currentColor",
1222
- strokeLinecap: "round",
1223
- strokeLinejoin: "round"
1224
- }
1225
- )
1226
- }
1227
- );
1228
- },
1229
1221
  camera: ({ className, fill }) => {
1230
1222
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1231
1223
  "svg",
@@ -4236,32 +4228,240 @@ var Icon = ({ name, size = "md", fill = false, className, onClick, ...props }) =
4236
4228
  };
4237
4229
  var Icon_default = Icon;
4238
4230
 
4239
- // src/components/breadcrumb/breadcrumb.tsx
4231
+ // src/utils/props.ts
4232
+ var mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
4233
+ if (!variantKeys) {
4234
+ return [props, {}];
4235
+ }
4236
+ const picked = variantKeys.reduce((acc, key) => {
4237
+ if (key in props) {
4238
+ return { ...acc, [key]: props[key] };
4239
+ } else {
4240
+ return acc;
4241
+ }
4242
+ }, {});
4243
+ if (removeVariantProps) {
4244
+ const omitted = Object.keys(props).filter((key) => !variantKeys.includes(key)).reduce((acc, key) => ({ ...acc, [key]: props[key] }), {});
4245
+ return [omitted, picked];
4246
+ } else {
4247
+ return [props, picked];
4248
+ }
4249
+ };
4250
+
4251
+ // src/components/button/text-button.tsx
4252
+ var import_react = require("react");
4253
+
4254
+ // src/utils/clsx.ts
4255
+ function clsx(...args) {
4256
+ var i = 0, tmp, x, str = "";
4257
+ while (i < args.length) {
4258
+ if (tmp = args[i++]) {
4259
+ if (x = toVal(tmp)) {
4260
+ str && (str += " ");
4261
+ str += x;
4262
+ }
4263
+ }
4264
+ }
4265
+ return str;
4266
+ }
4267
+ function toVal(mix) {
4268
+ var k, y, str = "";
4269
+ if (typeof mix === "string" || typeof mix === "number") {
4270
+ str += mix;
4271
+ } else if (typeof mix === "object") {
4272
+ if (Array.isArray(mix)) {
4273
+ var len = mix.length;
4274
+ for (k = 0; k < len; k++) {
4275
+ if (mix[k]) {
4276
+ if (y = toVal(mix[k])) {
4277
+ str && (str += " ");
4278
+ str += y;
4279
+ }
4280
+ }
4281
+ }
4282
+ } else {
4283
+ for (y in mix) {
4284
+ if (mix[y]) {
4285
+ str && (str += " ");
4286
+ str += y;
4287
+ }
4288
+ }
4289
+ }
4290
+ }
4291
+ return str;
4292
+ }
4293
+
4294
+ // src/components/button/text-button.tsx
4240
4295
  var import_jsx_runtime3 = require("react/jsx-runtime");
4241
- var BreadcrumbMenu = (0, import_react.forwardRef)(({ label, onClick, isCurrent, size }, ref) => {
4242
- const slots = (0, import_react.useMemo)(() => breadcrumbStyle({ size }), [size]);
4243
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4244
- "span",
4296
+ var TextButton = (0, import_react.forwardRef)((originalProps, ref) => {
4297
+ const [props, variantProps] = mapPropsVariants(originalProps, textButtonStyle.variantKeys);
4298
+ const { children, startContent, endContent, classNames, variant, isDisabled, size, ...buttonProps } = {
4299
+ ...props,
4300
+ ...variantProps
4301
+ };
4302
+ const slots = (0, import_react.useMemo)(() => textButtonStyle({ ...variantProps }), [variantProps]);
4303
+ const getContentProps = (0, import_react.useCallback)(() => {
4304
+ const className = slots.content({ class: classNames == null ? void 0 : classNames.content });
4305
+ return { className, size };
4306
+ }, [slots, classNames, size]);
4307
+ const renderContent = (content) => {
4308
+ const contentProps = getContentProps();
4309
+ if ((0, import_react.isValidElement)(content)) {
4310
+ const _content = content;
4311
+ const contentProps2 = getContentProps();
4312
+ const mergedProps = {
4313
+ ...contentProps2,
4314
+ ...typeof _content.props.className === "string" && {
4315
+ className: clsx(contentProps2.className, _content.props.className)
4316
+ }
4317
+ };
4318
+ return (0, import_react.cloneElement)(_content, mergedProps);
4319
+ }
4320
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { ...contentProps, children: content });
4321
+ };
4322
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4323
+ "button",
4245
4324
  {
4325
+ ...buttonProps,
4246
4326
  ref,
4327
+ disabled: isDisabled,
4328
+ className: clsx(
4329
+ slots.base({ class: classNames == null ? void 0 : classNames.base }),
4330
+ variant === "underline" && slots.underline({ class: classNames == null ? void 0 : classNames.underline })
4331
+ ),
4332
+ children: [
4333
+ startContent && renderContent(startContent),
4334
+ children,
4335
+ endContent && renderContent(endContent)
4336
+ ]
4337
+ }
4338
+ );
4339
+ });
4340
+ TextButton.displayName = "TextButton";
4341
+ var text_button_default = TextButton;
4342
+ var textButtonStyle = tv({
4343
+ slots: {
4344
+ base: ["flex", "items-center", "justify-center", "whitespace-nowrap", "overflow-hidden"],
4345
+ content: [],
4346
+ underline: ["underline", "decoration-skip-ink", "underline-offset-[1px]"]
4347
+ },
4348
+ variants: {
4349
+ variant: {
4350
+ "non-under": [],
4351
+ underline: []
4352
+ },
4353
+ color: {
4354
+ primary: [],
4355
+ secondary: [],
4356
+ neutral: []
4357
+ },
4358
+ size: {
4359
+ sm: {
4360
+ base: ["text-sm"],
4361
+ underline: ["decoration-[1px]"]
4362
+ },
4363
+ md: {
4364
+ base: ["text-md"],
4365
+ underline: ["decoration-[1.25px]"]
4366
+ },
4367
+ lg: {
4368
+ base: ["text-lg"],
4369
+ underline: ["decoration-[1.5px]"]
4370
+ },
4371
+ xl: {
4372
+ base: ["text-xl"],
4373
+ underline: ["decoration-[1.75px]"]
4374
+ }
4375
+ },
4376
+ isDisabled: {
4377
+ true: {
4378
+ base: ["!text-neutral-light", "pointer-events-none"]
4379
+ }
4380
+ },
4381
+ isInGroup: {
4382
+ true: {
4383
+ base: ["[&:not(:first-child):not(:last-child)]:rounded-none", "first:rounded-r-none", "last:rounded-l-none"]
4384
+ }
4385
+ }
4386
+ },
4387
+ compoundVariants: [
4388
+ {
4389
+ color: "primary",
4390
+ class: {
4391
+ base: ["text-primary-main", "hover:text-primary-dark", "active:text-primary-strong"]
4392
+ }
4393
+ },
4394
+ {
4395
+ color: "secondary",
4396
+ class: {
4397
+ base: ["text-secondary-main", "hover:text-secondary-dark", "active:text-secondary-strong"]
4398
+ }
4399
+ },
4400
+ {
4401
+ color: "neutral",
4402
+ class: {
4403
+ base: ["text-neutral-main", "hover:text-neutral-dark", "active:text-neutral-strong"]
4404
+ }
4405
+ }
4406
+ ],
4407
+ defaultVariants: {
4408
+ size: "md",
4409
+ color: "primary",
4410
+ variant: "non-under",
4411
+ isDisabled: false,
4412
+ isInGroup: false
4413
+ }
4414
+ });
4415
+
4416
+ // src/components/breadcrumb/breadcrumb.tsx
4417
+ var import_jsx_runtime4 = require("react/jsx-runtime");
4418
+ var BreadcrumbMenu = (0, import_react2.forwardRef)(({ label, onClick, isCurrent, size }, ref) => {
4419
+ const slots = (0, import_react2.useMemo)(() => breadcrumbStyle({ size }), [size]);
4420
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
4421
+ text_button_default,
4422
+ {
4423
+ variant: isCurrent ? "underline" : "non-under",
4424
+ color: isCurrent ? "primary" : "neutral",
4425
+ size,
4247
4426
  onClick,
4248
- className: `${slots.content()} ${isCurrent ? "text-primary-main underline" : ""}`,
4249
- "aria-current": isCurrent ? "page" : void 0,
4427
+ "aria-label": label,
4428
+ classNames: { base: "font-bold" },
4250
4429
  children: label
4251
4430
  }
4252
4431
  );
4253
4432
  });
4254
- var Breadcrumb = (0, import_react.forwardRef)(({ startIconName, size, menus, classNames }, ref) => {
4255
- const slots = (0, import_react.useMemo)(() => breadcrumbStyle({ size }), [size]);
4256
- const renderMenus = (menus2) => menus2.map((menu, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("li", { className: "flex items-center gap-[5px]", children: [
4257
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BreadcrumbMenu, { label: menu.label, onClick: menu.onClick, isCurrent: !menu.children, size }),
4258
- menu.children ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
4259
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon_default, { name: "right", className: slots.separator() }),
4260
- renderMenus(menu.children)
4261
- ] }) : index !== menus2.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon_default, { name: "right", className: slots.separator() })
4262
- ] }, `${menu.label}-${index}`));
4263
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("nav", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), "aria-label": "Breadcrumb", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("ul", { className: "flex items-center gap-1", children: [
4264
- startIconName && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon_default, { name: startIconName, fill: true, size, className: `${slots.icon()}` }) }),
4433
+ var Breadcrumb = (0, import_react2.forwardRef)(({ startIconName, size, menus, classNames }, ref) => {
4434
+ const slots = (0, import_react2.useMemo)(() => breadcrumbStyle({ size }), [size]);
4435
+ const renderMenus = (menus2) => {
4436
+ const flatMenus = [];
4437
+ const flatten = (items) => {
4438
+ var _a;
4439
+ for (const item of items) {
4440
+ flatMenus.push(item);
4441
+ if ((_a = item.children) == null ? void 0 : _a.length) {
4442
+ flatten(item.children);
4443
+ }
4444
+ }
4445
+ };
4446
+ flatten(menus2);
4447
+ return flatMenus.map((menu, index) => {
4448
+ const isLast = index === flatMenus.length - 1;
4449
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
4450
+ "li",
4451
+ {
4452
+ className: "flex items-center gap-[5px]",
4453
+ "aria-current": isLast ? "page" : void 0,
4454
+ children: [
4455
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(BreadcrumbMenu, { label: menu.label, onClick: menu.onClick, isCurrent: isLast, size }),
4456
+ !isLast && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon_default, { name: "right", className: slots.separator() })
4457
+ ]
4458
+ },
4459
+ `${menu.label}-${index}`
4460
+ );
4461
+ });
4462
+ };
4463
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("nav", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), "aria-label": "Breadcrumb", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("ul", { className: "flex items-center gap-1", children: [
4464
+ startIconName && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon_default, { name: startIconName, size, className: `${slots.icon()}` }) }),
4265
4465
  renderMenus(menus)
4266
4466
  ] }) });
4267
4467
  });
@@ -4270,16 +4470,8 @@ var breadcrumb_default = Breadcrumb;
4270
4470
  var breadcrumbStyle = tv({
4271
4471
  slots: {
4272
4472
  base: ["flex", "items-center"],
4273
- content: [
4274
- "text-neutral-main",
4275
- "flex",
4276
- "items-center",
4277
- "hover:underline",
4278
- "cursor-pointer",
4279
- "[line-height:initial]"
4280
- ],
4281
4473
  icon: ["fill-primary-main", "text-primary-main", "stroke-primary-main"],
4282
- separator: ["stroke-neutral-main"]
4474
+ separator: ["text-neutral-main"]
4283
4475
  },
4284
4476
  variants: {
4285
4477
  size: {
@@ -1,11 +1,21 @@
1
1
  "use client";
2
2
  import {
3
3
  breadcrumb_default
4
- } from "../../chunk-OHDRKCOC.mjs";
4
+ } from "../../chunk-T5LK5CJS.mjs";
5
+ import "../../chunk-MY5U63QO.mjs";
6
+ import "../../chunk-WB24YDE2.mjs";
7
+ import "../../chunk-LP724WOP.mjs";
8
+ import "../../chunk-ZMJYDLTS.mjs";
9
+ import "../../chunk-6WSACUIB.mjs";
10
+ import "../../chunk-6PNKRBUT.mjs";
11
+ import "../../chunk-LXHUO6VM.mjs";
12
+ import "../../chunk-TTY3EEXX.mjs";
5
13
  import "../../chunk-ZYIIXWVY.mjs";
6
- import "../../chunk-RRI3I435.mjs";
7
- import "../../chunk-M5KV3WZ2.mjs";
14
+ import "../../chunk-DADMVOYI.mjs";
15
+ import "../../chunk-A7OXEUCC.mjs";
8
16
  import "../../chunk-2ZT6V4QR.mjs";
17
+ import "../../chunk-27Y6K5NK.mjs";
18
+ import "../../chunk-E3G5QXSH.mjs";
9
19
  import "../../chunk-AC6TWLRT.mjs";
10
20
  export {
11
21
  breadcrumb_default as default