@deepnoid/ui 0.1.157 → 0.1.159

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 (117) hide show
  1. package/.turbo/turbo-build.log +168 -158
  2. package/dist/{chunk-DQ3ZRNX4.mjs → chunk-3QE57PU3.mjs} +1 -1
  3. package/dist/{chunk-5KOTQEFC.mjs → chunk-3X376ACN.mjs} +1 -1
  4. package/dist/{chunk-IN6M25YL.mjs → chunk-46EIW6MN.mjs} +2 -2
  5. package/dist/{chunk-MGGBCCZL.mjs → chunk-7QL54JRV.mjs} +2 -2
  6. package/dist/{chunk-ACFDUCPL.mjs → chunk-CSG6FDBX.mjs} +2 -2
  7. package/dist/{chunk-VUMESK5D.mjs → chunk-DDFJMHBC.mjs} +37 -2
  8. package/dist/{chunk-NB45YSED.mjs → chunk-ITFEV25U.mjs} +1 -1
  9. package/dist/{chunk-DSEF7GGB.mjs → chunk-JKYLYL3A.mjs} +1 -1
  10. package/dist/{chunk-QJUPHJN6.mjs → chunk-KLBA5J2H.mjs} +1 -1
  11. package/dist/chunk-L5FRTUM6.mjs +100 -0
  12. package/dist/{chunk-T7IJB3N4.mjs → chunk-OBOPDVVM.mjs} +4 -4
  13. package/dist/chunk-OLQOLLKG.mjs +1 -0
  14. package/dist/{chunk-JJAPJQUD.mjs → chunk-OY5W6JCO.mjs} +1 -1
  15. package/dist/{chunk-PO4H65C3.mjs → chunk-PXAJEOZS.mjs} +1 -1
  16. package/dist/{chunk-T6V6BJOT.mjs → chunk-QHETCLHO.mjs} +2 -2
  17. package/dist/{chunk-BFC4VP3B.mjs → chunk-QR5CKZLL.mjs} +57 -62
  18. package/dist/{chunk-LBJN5TAP.mjs → chunk-R7KUEH3N.mjs} +1 -1
  19. package/dist/{chunk-ZUAOUHWS.mjs → chunk-SFA2DEUD.mjs} +3 -3
  20. package/dist/{chunk-HLWNJLRZ.mjs → chunk-XHCPYYMC.mjs} +1 -1
  21. package/dist/{chunk-73NBUI4Y.mjs → chunk-YQYO5RLZ.mjs} +1 -1
  22. package/dist/{chunk-SHI7P4DQ.mjs → chunk-Z7CLJYRF.mjs} +1 -1
  23. package/dist/components/avatar/avatar.js +37 -2
  24. package/dist/components/avatar/avatar.mjs +2 -2
  25. package/dist/components/avatar/index.js +37 -2
  26. package/dist/components/avatar/index.mjs +2 -2
  27. package/dist/components/breadcrumb/breadcrumb.js +37 -2
  28. package/dist/components/breadcrumb/breadcrumb.mjs +5 -5
  29. package/dist/components/breadcrumb/index.js +37 -2
  30. package/dist/components/breadcrumb/index.mjs +5 -5
  31. package/dist/components/button/button.js +37 -2
  32. package/dist/components/button/button.mjs +3 -3
  33. package/dist/components/button/icon-button.js +37 -2
  34. package/dist/components/button/icon-button.mjs +3 -3
  35. package/dist/components/button/index.js +37 -2
  36. package/dist/components/button/index.mjs +4 -4
  37. package/dist/components/chip/chip.js +37 -2
  38. package/dist/components/chip/chip.mjs +3 -3
  39. package/dist/components/chip/index.js +37 -2
  40. package/dist/components/chip/index.mjs +3 -3
  41. package/dist/components/fileUpload/fileUpload.js +93 -63
  42. package/dist/components/fileUpload/fileUpload.mjs +6 -6
  43. package/dist/components/fileUpload/index.js +93 -63
  44. package/dist/components/fileUpload/index.mjs +6 -6
  45. package/dist/components/icon/Icon.d.mts +4 -0
  46. package/dist/components/icon/Icon.d.ts +4 -0
  47. package/dist/components/icon/Icon.js +37 -2
  48. package/dist/components/icon/Icon.mjs +2 -2
  49. package/dist/components/icon/index.js +37 -2
  50. package/dist/components/icon/index.mjs +2 -2
  51. package/dist/components/icon/template.d.mts +1 -0
  52. package/dist/components/icon/template.d.ts +1 -0
  53. package/dist/components/icon/template.js +37 -2
  54. package/dist/components/icon/template.mjs +1 -1
  55. package/dist/components/input/index.js +93 -63
  56. package/dist/components/input/index.mjs +3 -3
  57. package/dist/components/input/input.d.mts +6 -3
  58. package/dist/components/input/input.d.ts +6 -3
  59. package/dist/components/input/input.js +93 -63
  60. package/dist/components/input/input.mjs +3 -3
  61. package/dist/components/list/index.js +37 -2
  62. package/dist/components/list/index.mjs +4 -4
  63. package/dist/components/list/listItem.js +37 -2
  64. package/dist/components/list/listItem.mjs +4 -4
  65. package/dist/components/modal/index.js +37 -2
  66. package/dist/components/modal/index.mjs +5 -5
  67. package/dist/components/modal/modal.js +37 -2
  68. package/dist/components/modal/modal.mjs +5 -5
  69. package/dist/components/pagination/index.js +93 -63
  70. package/dist/components/pagination/index.mjs +4 -4
  71. package/dist/components/pagination/pagination.js +93 -63
  72. package/dist/components/pagination/pagination.mjs +4 -4
  73. package/dist/components/picker/datePicker.js +93 -63
  74. package/dist/components/picker/datePicker.mjs +6 -6
  75. package/dist/components/picker/day.d.mts +2 -2
  76. package/dist/components/picker/day.d.ts +2 -2
  77. package/dist/components/picker/index.js +93 -63
  78. package/dist/components/picker/index.mjs +8 -8
  79. package/dist/components/picker/timePicker.js +37 -2
  80. package/dist/components/picker/timePicker.mjs +4 -4
  81. package/dist/components/select/index.js +37 -2
  82. package/dist/components/select/index.mjs +3 -3
  83. package/dist/components/select/select.js +37 -2
  84. package/dist/components/select/select.mjs +3 -3
  85. package/dist/components/starRating/index.d.mts +4 -0
  86. package/dist/components/starRating/index.d.ts +4 -0
  87. package/dist/components/starRating/index.js +5279 -0
  88. package/dist/components/starRating/index.mjs +14 -0
  89. package/dist/components/starRating/starRating.d.mts +60 -0
  90. package/dist/components/starRating/starRating.d.ts +60 -0
  91. package/dist/components/starRating/starRating.js +5278 -0
  92. package/dist/components/starRating/starRating.mjs +15 -0
  93. package/dist/components/table/index.js +93 -63
  94. package/dist/components/table/index.mjs +7 -7
  95. package/dist/components/table/table-body.js +93 -63
  96. package/dist/components/table/table-body.mjs +5 -5
  97. package/dist/components/table/table-head.js +93 -63
  98. package/dist/components/table/table-head.mjs +5 -5
  99. package/dist/components/table/table.js +93 -63
  100. package/dist/components/table/table.mjs +5 -5
  101. package/dist/components/timePicker/calendar.js +37 -2
  102. package/dist/components/timePicker/calendar.mjs +2 -2
  103. package/dist/components/toast/index.js +37 -2
  104. package/dist/components/toast/index.mjs +4 -4
  105. package/dist/components/toast/toast.js +37 -2
  106. package/dist/components/toast/toast.mjs +3 -3
  107. package/dist/components/toast/use-toast.js +37 -2
  108. package/dist/components/toast/use-toast.mjs +4 -4
  109. package/dist/components/tree/index.js +37 -2
  110. package/dist/components/tree/index.mjs +3 -3
  111. package/dist/components/tree/tree.js +37 -2
  112. package/dist/components/tree/tree.mjs +3 -3
  113. package/dist/index.d.mts +1 -0
  114. package/dist/index.d.ts +1 -0
  115. package/dist/index.js +180 -63
  116. package/dist/index.mjs +37 -32
  117. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -132,6 +132,7 @@ __export(index_exports, {
132
132
  ScrollArea: () => scrollArea_default,
133
133
  Select: () => select_default,
134
134
  Skeleton: () => skeleton_default,
135
+ StarRating: () => starRating_default,
135
136
  Switch: () => switch_default,
136
137
  Table: () => table_default,
137
138
  Tabs: () => tabs_default,
@@ -1135,8 +1136,8 @@ var template = {
1135
1136
  {
1136
1137
  fillRule: "evenodd",
1137
1138
  clipRule: "evenodd",
1138
- fill: "currentColor",
1139
- d: "M8.26603 3.51086C8.53733 2.82971 9.46267 2.82971 9.73397 3.51086L10.9948 6.67687L14.2674 6.95135C14.9723 7.01017 15.2582 7.92848 14.721 8.40913L12.2278 10.6398L12.989 13.9746C13.1531 14.6931 12.4052 15.2604 11.8021 14.8759L9 13.0886L6.19794 14.8759C5.59478 15.2604 4.84687 14.6925 5.01099 13.9746L5.77221 10.6398L3.27901 8.40913C2.74185 7.92848 3.02769 7.01017 3.73259 6.95135L7.00519 6.67687L8.26603 3.51086Z"
1139
+ d: "M8.26603 3.51086C8.53733 2.82971 9.46267 2.82971 9.73397 3.51086L10.9948 6.67687L14.2674 6.95135C14.9723 7.01017 15.2582 7.92848 14.721 8.40913L12.2278 10.6398L12.989 13.9746C13.1531 14.6931 12.4052 15.2604 11.8021 14.8759L9 13.0886L6.19794 14.8759C5.59478 15.2604 4.84687 14.6925 5.01099 13.9746L5.77221 10.6398L3.27901 8.40913C2.74185 7.92848 3.02769 7.01017 3.73259 6.95135L7.00519 6.67687L8.26603 3.51086Z",
1140
+ fill: "currentColor"
1140
1141
  }
1141
1142
  ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1142
1143
  "path",
@@ -1150,6 +1151,41 @@ var template = {
1150
1151
  }
1151
1152
  );
1152
1153
  },
1154
+ halfStar: ({ className }) => {
1155
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1156
+ "svg",
1157
+ {
1158
+ xmlns: "http://www.w3.org/2000/svg",
1159
+ width: "18",
1160
+ height: "18",
1161
+ viewBox: "0 0 18 18",
1162
+ fill: "none",
1163
+ className,
1164
+ children: [
1165
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("clipPath", { id: "half-clip", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "0", y: "0", width: "9", height: "18" }) }) }),
1166
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1167
+ "path",
1168
+ {
1169
+ fillRule: "evenodd",
1170
+ clipRule: "evenodd",
1171
+ fill: "currentColor",
1172
+ d: "M8.26603 3.51086C8.53733 2.82971 9.46267 2.82971 9.73397 3.51086L10.9948 6.67687L14.2674 6.95135C14.9723 7.01017 15.2582 7.92848 14.721 8.40913L12.2278 10.6398L12.989 13.9746C13.1531 14.6931 12.4052 15.2604 11.8021 14.8759L9 13.0886L6.19794 14.8759C5.59478 15.2604 4.84687 14.6925 5.01099 13.9746L5.77221 10.6398L3.27901 8.40913C2.74185 7.92848 3.02769 7.01017 3.73259 6.95135L7.00519 6.67687L8.26603 3.51086Z",
1173
+ clipPath: "url(#half-clip)"
1174
+ }
1175
+ ),
1176
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1177
+ "path",
1178
+ {
1179
+ d: "M8.65925 3.23957C8.68697 3.16871 8.73417 3.1081 8.79484 3.06544C8.85552 3.02278 8.92693 3 9 3C9.07306 3 9.14448 3.02278 9.20515 3.06544C9.26583 3.1081 9.31303 3.16871 9.34074 3.23957L10.7332 6.74977C10.7593 6.81546 10.8021 6.87233 10.857 6.91413C10.912 6.95594 10.9768 6.98105 11.0445 6.98672L14.6603 7.29028C14.9873 7.31775 15.1196 7.74563 14.8706 7.96883L12.1158 10.4427C12.0644 10.4888 12.026 10.5489 12.005 10.6164C11.984 10.6839 11.981 10.7561 11.9966 10.8252L12.8386 14.5236C12.8555 14.5978 12.8511 14.6756 12.8259 14.7471C12.8006 14.8187 12.7557 14.8808 12.6968 14.9257C12.6379 14.9705 12.5677 14.996 12.495 14.999C12.4222 15.002 12.3503 14.9824 12.2882 14.9425L9.19199 12.9611C9.13418 12.9241 9.06775 12.9045 9 12.9045C8.93225 12.9045 8.86581 12.9241 8.808 12.9611L5.71181 14.9432C5.64973 14.9831 5.57778 15.0027 5.50504 14.9997C5.43231 14.9967 5.36206 14.9712 5.30316 14.9263C5.24426 14.8815 5.19936 14.8194 5.17412 14.7478C5.14889 14.6763 5.14445 14.5985 5.16138 14.5243L6.00341 10.8252C6.01903 10.7561 6.01616 10.6838 5.99511 10.6164C5.97407 10.5489 5.93568 10.4888 5.88415 10.4427L3.12936 7.96883C3.07389 7.91927 3.03369 7.85357 3.01387 7.78005C2.99405 7.70652 2.9955 7.62849 3.01802 7.55583C3.04055 7.48317 3.08314 7.41915 3.1404 7.37188C3.19767 7.3246 3.26703 7.29621 3.33971 7.29028L6.95553 6.98672C7.02319 6.98105 7.08804 6.95594 7.14296 6.91413C7.19787 6.87233 7.24072 6.81546 7.26679 6.74977L8.65925 3.23957Z",
1180
+ stroke: "currentColor",
1181
+ strokeLinecap: "round",
1182
+ strokeLinejoin: "round"
1183
+ }
1184
+ )
1185
+ ]
1186
+ }
1187
+ );
1188
+ },
1153
1189
  avatar: ({ className }) => {
1154
1190
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1155
1191
  "svg",
@@ -7074,7 +7110,7 @@ var Input = (0, import_react11.forwardRef)((originalProps, ref) => {
7074
7110
  ),
7075
7111
  size: originalProps.size
7076
7112
  }),
7077
- [slots, classNames, originalProps.size]
7113
+ [slots, classNames, originalProps.size, inputProps.readOnly]
7078
7114
  );
7079
7115
  const renderStartContent = () => {
7080
7116
  if ((0, import_react11.isValidElement)(startContent)) {
@@ -7197,31 +7233,22 @@ var inputStyle = tv(
7197
7233
  "placeholder:text-neutral-main",
7198
7234
  "outline-none",
7199
7235
  "focus:ring-0",
7200
- "group-has-[:hover]/input:text-neutral-dark",
7201
- "group-has-[:hover]/input:placeholder:text-neutral-dark",
7202
- "group-has-[:focus]/input:text-neutral-dark",
7203
- "group-has-[:focus]/input:placeholder:text-neutral-dark",
7204
- "group-has-[p.error]/input:text-danger-main",
7205
- "group-has-[p.error]/input:placeholder:text-danger-main",
7206
- "group-has-[p.error]/input:placeholder:hover:!text-danger-main"
7236
+ "group-has-[:hover:not(:read-only):not(:focus)]/input:text-neutral-dark",
7237
+ "group-has-[:hover:not(:read-only):not(:focus)]/input:placeholder:text-neutral-dark",
7238
+ "group-has-[:focus:not(:read-only)]/input:text-neutral-dark",
7239
+ "group-has-[:focus:not(:read-only)]/input:placeholder:text-neutral-dark",
7240
+ "read-only:!text-body-foreground",
7241
+ "read-only:placeholder:!text-body-foreground"
7207
7242
  ],
7208
7243
  content: [
7209
7244
  "flex",
7210
7245
  "items-center",
7211
7246
  "select-none",
7212
7247
  "text-neutral-main",
7213
- "group-has-[:hover]/input:text-neutral-dark",
7214
- "group-has-[p.error]/input:text-danger-main",
7215
- "group-has-[p.error]/input:hover:text-danger-main",
7216
- "group-has-[p.error]/input:focus:text-danger-main"
7217
- ],
7218
- helperMessage: [
7219
- "text-neutral-main",
7220
- "group-has-[:hover]/input:text-neutral-dark",
7221
- "group-has-[p.error]/input:text-danger-main",
7222
- "group-has-[p.error]/input:hover:text-danger-main",
7223
- "group-has-[p.error]/input:focus:text-danger-main"
7248
+ "group-has-[:hover:not(:read-only):not(:focus)]/input:text-neutral-dark",
7249
+ "read-only:!text-body-foreground"
7224
7250
  ],
7251
+ helperMessage: ["text-neutral-main", "group-has-[:hover:not(:read-only):not(:focus)]/input:text-neutral-dark"],
7225
7252
  errorMessage: ["text-danger-main"],
7226
7253
  readonlyWrapper: [
7227
7254
  "pointer-events-none",
@@ -7230,7 +7257,7 @@ var inputStyle = tv(
7230
7257
  "[&>input]:text-body-foreground",
7231
7258
  "[&>input]:placeholder:text-body-foreground"
7232
7259
  ],
7233
- readonly: []
7260
+ readonly: ["text-body-foreground"]
7234
7261
  },
7235
7262
  variants: {
7236
7263
  variant: {
@@ -7241,8 +7268,8 @@ var inputStyle = tv(
7241
7268
  outline: {
7242
7269
  inputWrapper: [
7243
7270
  "border-neutral-light",
7244
- "group-has-[:hover]/input:bg-trans-soft",
7245
- "group-has-[:focus]/input:bg-body-background",
7271
+ "group-has-[:hover:not(:read-only):not(:focus)]/input:bg-trans-soft",
7272
+ "group-has-[:focus:not(:read-only)]/input:bg-body-background",
7246
7273
  "group-has-[p.error]/input:border-danger-main"
7247
7274
  ],
7248
7275
  readonlyWrapper: ["!bg-trans-soft"]
@@ -7251,8 +7278,8 @@ var inputStyle = tv(
7251
7278
  inputWrapper: [
7252
7279
  "bg-transparent",
7253
7280
  "rounded-none",
7254
- "group-has-[:hover]/input:bg-trans-soft",
7255
- "group-has-[:focus]/input:bg-body-background",
7281
+ "group-has-[:hover:not(:read-only):not(:focus)]/input:bg-trans-soft",
7282
+ "group-has-[:focus:not(:read-only)]/input:bg-body-background",
7256
7283
  "group-has-[p.error]/input:border-danger-main"
7257
7284
  ],
7258
7285
  readonlyWrapper: ["!bg-trans-soft"]
@@ -7260,22 +7287,13 @@ var inputStyle = tv(
7260
7287
  },
7261
7288
  color: {
7262
7289
  primary: {
7263
- content: ["group-has-[:focus]/input:text-primary-main", "group-has-[:focus]/input:hover:text-primary-main"],
7264
- helperMessage: [
7265
- "group-has-[:focus]/input:text-primary-main",
7266
- "group-has-[:focus]/input:hover:text-primary-main"
7267
- ],
7290
+ content: ["group-has-[:focus:not(:read-only)]/input:text-primary-main", "read-only:!text-primary-main"],
7291
+ helperMessage: ["group-has-[:focus:not(:read-only)]/input:text-primary-main"],
7268
7292
  readonly: ["text-primary-main"]
7269
7293
  },
7270
7294
  secondary: {
7271
- content: [
7272
- "group-has-[:focus]/input:text-secondary-main",
7273
- "group-has-[:focus]/input:hover:text-secondary-main"
7274
- ],
7275
- helperMessage: [
7276
- "group-has-[:focus]/input:text-secondary-main",
7277
- "group-has-[:focus]/input:hover:text-secondary-main"
7278
- ],
7295
+ content: ["group-has-[:focus:not(:read-only)]/input:text-secondary-main", "read-only:!text-secondary-main"],
7296
+ helperMessage: ["group-has-[:focus:not(:read-only)]/input:text-secondary-main"],
7279
7297
  readonly: ["text-secondary-main"]
7280
7298
  }
7281
7299
  },
@@ -7326,14 +7344,9 @@ var inputStyle = tv(
7326
7344
  },
7327
7345
  disabled: {
7328
7346
  true: {
7329
- inputWrapper: ["!bg-neutral-soft", "pointer-events-none", "group-has-[p.error]/input:!text-danger-light"],
7330
- input: [
7331
- "!text-neutral-light",
7332
- "placeholder:!text-neutral-light",
7333
- "group-has-[p.error]/input:!text-danger-light",
7334
- "group-has-[p.error]/input:placeholder:!text-danger-light"
7335
- ],
7336
- content: ["!text-neutral-light", "group-has-[p.error]/input:!text-danger-light"],
7347
+ inputWrapper: ["!bg-neutral-soft", "pointer-events-none"],
7348
+ input: ["!text-neutral-light", "placeholder:!text-neutral-light"],
7349
+ content: ["!text-neutral-light"],
7337
7350
  helperMessage: ["!text-neutral-light"],
7338
7351
  errorMessage: ["!text-danger-light"]
7339
7352
  }
@@ -7341,11 +7354,9 @@ var inputStyle = tv(
7341
7354
  readonly: {
7342
7355
  true: {
7343
7356
  readonlyWrapper: ["pointer-events-none"],
7344
- input: [
7345
- "group-has-[p.error]/input:!text-danger-main",
7346
- "group-has-[p.error]/input:placeholder:!text-danger-main"
7347
- ],
7348
- content: ["group-has-[p.error]/input:!text-danger-main"]
7357
+ input: ["!text-body-foreground", "placeholder:!text-body-foreground"],
7358
+ content: ["!text-body-foreground"],
7359
+ helperMessage: ["!text-body-foreground"]
7349
7360
  }
7350
7361
  }
7351
7362
  },
@@ -7406,17 +7417,6 @@ var inputStyle = tv(
7406
7417
  inputWrapper: ["border-b-xl"]
7407
7418
  }
7408
7419
  },
7409
- {
7410
- disabled: true,
7411
- variant: ["outline", "underline"],
7412
- class: {
7413
- inputWrapper: ["!bg-body-background", "group-has-[p.error]/input:!border-danger-light"],
7414
- content: [
7415
- "group-has-[p.error]/input:!text-danger-light",
7416
- "group-has-[p.error]/input:placeholder:!text-danger-light"
7417
- ]
7418
- }
7419
- },
7420
7420
  {
7421
7421
  readonly: true,
7422
7422
  color: "primary",
@@ -7432,6 +7432,37 @@ var inputStyle = tv(
7432
7432
  input: ["!text-secondary-main", "placeholder:!text-secondary-main"],
7433
7433
  content: ["!text-secondary-main"]
7434
7434
  }
7435
+ },
7436
+ {
7437
+ disabled: true,
7438
+ class: {
7439
+ input: [
7440
+ "group-has-[p.error]/input:!text-danger-light",
7441
+ "group-has-[p.error]/input:placeholder:!text-danger-light"
7442
+ ],
7443
+ content: ["group-has-[p.error]/input:!text-danger-light"],
7444
+ helperMessage: ["group-has-[p.error]/input:!text-danger-light"],
7445
+ errorMessage: ["!text-danger-light"]
7446
+ }
7447
+ },
7448
+ {
7449
+ disabled: true,
7450
+ variant: ["outline", "underline"],
7451
+ class: {
7452
+ inputWrapper: ["!bg-body-background", "group-has-[p.error]/input:!border-danger-light"]
7453
+ }
7454
+ },
7455
+ {
7456
+ disabled: false,
7457
+ class: {
7458
+ input: [
7459
+ "group-has-[p.error]/input:!text-danger-main",
7460
+ "group-has-[p.error]/input:placeholder:!text-danger-main"
7461
+ ],
7462
+ content: ["group-has-[p.error]/input:!text-danger-main"],
7463
+ helperMessage: ["group-has-[p.error]/input:!text-danger-main"],
7464
+ errorMessage: ["!text-danger-main"]
7465
+ }
7435
7466
  }
7436
7467
  ],
7437
7468
  defaultVariants: {
@@ -13099,6 +13130,91 @@ var radarChartStyle = tv({
13099
13130
  color: "primary"
13100
13131
  }
13101
13132
  });
13133
+
13134
+ // src/components/starRating/starRating.tsx
13135
+ var import_react42 = require("react");
13136
+ var import_jsx_runtime45 = require("react/jsx-runtime");
13137
+ var StarRating = (0, import_react42.forwardRef)((originalProps, ref) => {
13138
+ const [props, variantProps] = mapPropsVariants(originalProps, starRatingStyle.variantKeys);
13139
+ const {
13140
+ stars,
13141
+ size,
13142
+ value,
13143
+ onChange,
13144
+ readOnly = false,
13145
+ allowHalf = false,
13146
+ classNames,
13147
+ filledColor = "text-primary-main",
13148
+ emptyColor = "text-neutral-light"
13149
+ } = { ...props, ...variantProps };
13150
+ const slots = (0, import_react42.useMemo)(() => starRatingStyle({ ...variantProps }), [variantProps]);
13151
+ const [hoverRating, setHoverRating] = (0, import_react42.useState)(0);
13152
+ const handleStarClick = (starIndex, isHalf = false) => {
13153
+ if (readOnly || !onChange) return;
13154
+ const newRating = allowHalf && isHalf ? starIndex - 0.5 : starIndex;
13155
+ onChange(newRating);
13156
+ };
13157
+ const handleStarHover = (starIndex, isHalf = false) => {
13158
+ if (readOnly) return;
13159
+ const newHoverRating = allowHalf && isHalf ? starIndex - 0.5 : starIndex;
13160
+ setHoverRating(newHoverRating);
13161
+ };
13162
+ const handleMouseLeave = () => {
13163
+ if (readOnly) return;
13164
+ setHoverRating(0);
13165
+ };
13166
+ const createRange = (n) => {
13167
+ return Array.from({ length: n }, (_, i) => i + 1);
13168
+ };
13169
+ const renderStar = (starIndex) => {
13170
+ const currentRating = readOnly ? value : hoverRating || value;
13171
+ const isFull = currentRating >= starIndex;
13172
+ const isHalf = allowHalf && currentRating >= starIndex - 0.5 && currentRating < starIndex;
13173
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: slots.starWrapper({ class: classNames == null ? void 0 : classNames.starWrapper }), children: [
13174
+ !readOnly && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
13175
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13176
+ "div",
13177
+ {
13178
+ className: slots.star({ class: classNames == null ? void 0 : classNames.star }),
13179
+ onClick: () => handleStarClick(starIndex),
13180
+ onMouseEnter: () => handleStarHover(starIndex)
13181
+ }
13182
+ ),
13183
+ allowHalf && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13184
+ "div",
13185
+ {
13186
+ className: slots.starHalf({ class: classNames == null ? void 0 : classNames.starHalf }),
13187
+ onClick: () => handleStarClick(starIndex, true),
13188
+ onMouseEnter: () => handleStarHover(starIndex, true)
13189
+ }
13190
+ )
13191
+ ] }),
13192
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { children: isHalf ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Icon_default, { name: "halfStar", className: filledColor, size }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Icon_default, { name: "star", fill: isFull, className: isFull ? filledColor : emptyColor, size }) })
13193
+ ] }, starIndex);
13194
+ };
13195
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), onMouseLeave: handleMouseLeave, children: createRange(stars).map(renderStar) });
13196
+ });
13197
+ StarRating.displayName = "StarRating";
13198
+ var starRating_default = StarRating;
13199
+ var starRatingStyle = tv({
13200
+ slots: {
13201
+ base: ["flex", "items-center"],
13202
+ starWrapper: ["relative", "inline-block"],
13203
+ star: ["absolute", "inset-0", "z-10", "h-full", "w-full", "cursor-pointer"],
13204
+ starHalf: ["absolute", "left-0", "top-0", "z-20", "h-full", "w-1/2", "cursor-pointer"]
13205
+ },
13206
+ variants: {
13207
+ size: {
13208
+ sm: {},
13209
+ md: {},
13210
+ lg: {},
13211
+ xl: {}
13212
+ }
13213
+ },
13214
+ defaultVariants: {
13215
+ size: "xl"
13216
+ }
13217
+ });
13102
13218
  // Annotate the CommonJS export names for ESM import in node:
13103
13219
  0 && (module.exports = {
13104
13220
  Accordion,
@@ -13131,6 +13247,7 @@ var radarChartStyle = tv({
13131
13247
  ScrollArea,
13132
13248
  Select,
13133
13249
  Skeleton,
13250
+ StarRating,
13134
13251
  Switch,
13135
13252
  Table,
13136
13253
  Tabs,
package/dist/index.mjs CHANGED
@@ -1,46 +1,50 @@
1
1
  "use client";
2
+ import "./chunk-HIE2YRGA.mjs";
3
+ import {
4
+ tooltip_default
5
+ } from "./chunk-YBVJFHH6.mjs";
6
+ import "./chunk-ZMOAFSYE.mjs";
7
+ import "./chunk-WSIADHVC.mjs";
2
8
  import "./chunk-MBLZYQCN.mjs";
3
9
  import {
4
10
  tree_default
5
- } from "./chunk-HLWNJLRZ.mjs";
11
+ } from "./chunk-XHCPYYMC.mjs";
12
+ import "./chunk-RRAZM5D3.mjs";
13
+ import {
14
+ textarea_default
15
+ } from "./chunk-3CRSSRCH.mjs";
6
16
  import "./chunk-LUWGOKLG.mjs";
7
17
  import {
8
18
  ToastProvider,
9
19
  useToast
10
- } from "./chunk-QJUPHJN6.mjs";
20
+ } from "./chunk-KLBA5J2H.mjs";
11
21
  import "./chunk-ZOTHPHXA.mjs";
12
22
  import {
13
23
  toast_default
14
- } from "./chunk-DQ3ZRNX4.mjs";
15
- import "./chunk-HIE2YRGA.mjs";
16
- import {
17
- tooltip_default
18
- } from "./chunk-YBVJFHH6.mjs";
19
- import "./chunk-ZMOAFSYE.mjs";
20
- import "./chunk-WSIADHVC.mjs";
24
+ } from "./chunk-3QE57PU3.mjs";
21
25
  import "./chunk-DX3KXNP6.mjs";
26
+ import {
27
+ definition_table_default
28
+ } from "./chunk-JZMJ5UMR.mjs";
22
29
  import {
23
30
  table_default
24
- } from "./chunk-JJAPJQUD.mjs";
31
+ } from "./chunk-OY5W6JCO.mjs";
25
32
  import "./chunk-3MY6LO7N.mjs";
26
33
  import {
27
34
  tabs_default
28
35
  } from "./chunk-NBJHZ4X2.mjs";
29
- import "./chunk-RRAZM5D3.mjs";
30
- import {
31
- textarea_default
32
- } from "./chunk-3CRSSRCH.mjs";
33
36
  import "./chunk-MZ76AA76.mjs";
34
37
  import {
35
38
  skeleton_default
36
39
  } from "./chunk-6PN3DGOE.mjs";
40
+ import "./chunk-OLQOLLKG.mjs";
41
+ import {
42
+ starRating_default
43
+ } from "./chunk-L5FRTUM6.mjs";
37
44
  import "./chunk-LVFI2NOH.mjs";
38
45
  import {
39
46
  switch_default
40
47
  } from "./chunk-AGE57VDD.mjs";
41
- import {
42
- definition_table_default
43
- } from "./chunk-JZMJ5UMR.mjs";
44
48
  import "./chunk-TPFN22HR.mjs";
45
49
  import {
46
50
  radio_default
@@ -48,22 +52,22 @@ import {
48
52
  import "./chunk-7B7LRG5J.mjs";
49
53
  import {
50
54
  pagination_default
51
- } from "./chunk-MGGBCCZL.mjs";
55
+ } from "./chunk-7QL54JRV.mjs";
52
56
  import "./chunk-F3HENRVM.mjs";
53
57
  import "./chunk-4VWG4726.mjs";
54
58
  import {
55
59
  datePicker_default
56
- } from "./chunk-T7IJB3N4.mjs";
60
+ } from "./chunk-OBOPDVVM.mjs";
57
61
  import {
58
62
  day_default
59
63
  } from "./chunk-4DESGO3D.mjs";
60
64
  import {
61
65
  timePicker_default
62
- } from "./chunk-T6V6BJOT.mjs";
66
+ } from "./chunk-QHETCLHO.mjs";
63
67
  import "./chunk-QCEKPS7U.mjs";
64
68
  import {
65
69
  select_default
66
- } from "./chunk-SHI7P4DQ.mjs";
70
+ } from "./chunk-Z7CLJYRF.mjs";
67
71
  import "./chunk-FWFEKWWD.mjs";
68
72
  import "./chunk-7MVEAQ7Z.mjs";
69
73
  import {
@@ -71,15 +75,15 @@ import {
71
75
  } from "./chunk-3IILPVRA.mjs";
72
76
  import {
73
77
  listItem_default
74
- } from "./chunk-ACFDUCPL.mjs";
78
+ } from "./chunk-CSG6FDBX.mjs";
75
79
  import "./chunk-DJOG6Z35.mjs";
76
80
  import {
77
81
  modal_default
78
- } from "./chunk-IN6M25YL.mjs";
82
+ } from "./chunk-46EIW6MN.mjs";
79
83
  import "./chunk-MGEWSREV.mjs";
80
84
  import {
81
85
  chip_default
82
- } from "./chunk-5KOTQEFC.mjs";
86
+ } from "./chunk-3X376ACN.mjs";
83
87
  import "./chunk-32GA3YW4.mjs";
84
88
  import {
85
89
  drawer_default
@@ -87,7 +91,7 @@ import {
87
91
  import "./chunk-RLXOHILK.mjs";
88
92
  import {
89
93
  fileUpload_default
90
- } from "./chunk-ZUAOUHWS.mjs";
94
+ } from "./chunk-SFA2DEUD.mjs";
91
95
  import "./chunk-7VOQKIIK.mjs";
92
96
  import {
93
97
  progress_default
@@ -95,7 +99,7 @@ import {
95
99
  import "./chunk-2GCSFWHD.mjs";
96
100
  import {
97
101
  input_default
98
- } from "./chunk-BFC4VP3B.mjs";
102
+ } from "./chunk-QR5CKZLL.mjs";
99
103
  import "./chunk-VYNBJBXD.mjs";
100
104
  import {
101
105
  areaChart_default
@@ -124,7 +128,7 @@ import {
124
128
  import "./chunk-KYIODWXL.mjs";
125
129
  import {
126
130
  breadcrumb_default
127
- } from "./chunk-PO4H65C3.mjs";
131
+ } from "./chunk-PXAJEOZS.mjs";
128
132
  import "./chunk-MY5U63QO.mjs";
129
133
  import {
130
134
  text_button_default
@@ -134,10 +138,10 @@ import {
134
138
  } from "./chunk-ITWKPTSD.mjs";
135
139
  import {
136
140
  button_default
137
- } from "./chunk-73NBUI4Y.mjs";
141
+ } from "./chunk-YQYO5RLZ.mjs";
138
142
  import {
139
143
  icon_button_default
140
- } from "./chunk-DSEF7GGB.mjs";
144
+ } from "./chunk-JKYLYL3A.mjs";
141
145
  import "./chunk-6WSACUIB.mjs";
142
146
  import "./chunk-LXHUO6VM.mjs";
143
147
  import "./chunk-SZL743JC.mjs";
@@ -145,7 +149,7 @@ import "./chunk-ZYIIXWVY.mjs";
145
149
  import {
146
150
  Icon_default,
147
151
  iconTemplate
148
- } from "./chunk-LBJN5TAP.mjs";
152
+ } from "./chunk-R7KUEH3N.mjs";
149
153
  import "./chunk-NMSDSEBD.mjs";
150
154
  import {
151
155
  accordion_default
@@ -157,8 +161,8 @@ import "./chunk-E3G5QXSH.mjs";
157
161
  import "./chunk-7DLOYKVC.mjs";
158
162
  import {
159
163
  avatar_default
160
- } from "./chunk-NB45YSED.mjs";
161
- import "./chunk-VUMESK5D.mjs";
164
+ } from "./chunk-ITFEV25U.mjs";
165
+ import "./chunk-DDFJMHBC.mjs";
162
166
  import {
163
167
  deepnoidUi,
164
168
  tv
@@ -197,6 +201,7 @@ export {
197
201
  scrollArea_default as ScrollArea,
198
202
  select_default as Select,
199
203
  skeleton_default as Skeleton,
204
+ starRating_default as StarRating,
200
205
  switch_default as Switch,
201
206
  table_default as Table,
202
207
  tabs_default as Tabs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepnoid/ui",
3
- "version": "0.1.157",
3
+ "version": "0.1.159",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "exports": {