@teach-in/react 0.2.0 → 0.4.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.
Files changed (255) hide show
  1. package/dist/chunk-2SNKT7I4.mjs +9 -0
  2. package/dist/chunk-3YOW5DEZ.mjs +45 -0
  3. package/dist/chunk-4N3FFVKQ.mjs +14 -0
  4. package/dist/{chunk-PFLROV3C.mjs → chunk-544SDU73.mjs} +2 -2
  5. package/dist/chunk-7BTEKEON.mjs +11 -0
  6. package/dist/{chunk-X7ER4IDJ.mjs → chunk-AFVGHUW2.mjs} +2 -2
  7. package/dist/chunk-C4PCTOGM.mjs +12 -0
  8. package/dist/chunk-CA2EAK5M.mjs +40 -0
  9. package/dist/chunk-E5QSNLSR.mjs +38 -0
  10. package/dist/chunk-EEGPGLDC.mjs +26 -0
  11. package/dist/chunk-FKHR6G3R.mjs +1 -0
  12. package/dist/chunk-FQUYFYMS.mjs +24 -0
  13. package/dist/chunk-ICRO6HS3.mjs +1 -0
  14. package/dist/chunk-J3GK2CGQ.mjs +1 -0
  15. package/dist/chunk-JTPBZJ4S.mjs +14 -0
  16. package/dist/chunk-L6XIUULU.mjs +14 -0
  17. package/dist/chunk-LLP2PTPK.mjs +1 -0
  18. package/dist/{chunk-6UIBJVXP.mjs → chunk-MCZBJUTN.mjs} +1 -1
  19. package/dist/chunk-MJTSZFLC.mjs +1 -0
  20. package/dist/{chunk-WTXPB253.mjs → chunk-N3QOXWJI.mjs} +1 -1
  21. package/dist/chunk-N7GOJBLM.mjs +1 -0
  22. package/dist/{chunk-GEJLG5RP.mjs → chunk-NLHQDWUK.mjs} +3 -2
  23. package/dist/chunk-NOXFF2KJ.mjs +16 -0
  24. package/dist/chunk-NVLF7L4R.mjs +1 -0
  25. package/dist/chunk-OZSO3C5Q.mjs +14 -0
  26. package/dist/chunk-PKZZEODR.mjs +29 -0
  27. package/dist/chunk-PSK7I7V4.mjs +30 -0
  28. package/dist/chunk-Q2ILWL7L.mjs +1 -0
  29. package/dist/chunk-Q6JSJOU4.mjs +1 -0
  30. package/dist/chunk-QUMDPADZ.mjs +14 -0
  31. package/dist/chunk-RRA7GWP2.mjs +1 -0
  32. package/dist/chunk-SAYYLTIE.mjs +52 -0
  33. package/dist/chunk-TSD6GU35.mjs +16 -0
  34. package/dist/chunk-U4FAPNVK.mjs +1 -0
  35. package/dist/chunk-UFYLYN5Z.mjs +37 -0
  36. package/dist/chunk-UNBE67YJ.mjs +1 -0
  37. package/dist/chunk-UON5ACST.mjs +1 -0
  38. package/dist/chunk-UT5RUCAT.mjs +1 -0
  39. package/dist/chunk-UUKS7JYX.mjs +1 -0
  40. package/dist/chunk-VWGY6KWP.mjs +15 -0
  41. package/dist/chunk-W2A6C27Y.mjs +35 -0
  42. package/dist/{chunk-545OBZ4O.mjs → chunk-WFNNN6WU.mjs} +1 -1
  43. package/dist/chunk-XHCXM5MU.mjs +14 -0
  44. package/dist/chunk-YNCISHAU.mjs +27 -0
  45. package/dist/chunk-ZSYIKEXW.mjs +21 -0
  46. package/dist/index.d.ts +1 -0
  47. package/dist/index.js +606 -193
  48. package/dist/index.mjs +261 -112
  49. package/dist/ui/data/image/image.d.ts +6 -0
  50. package/dist/ui/data/image/image.js +47 -0
  51. package/dist/ui/data/image/image.mjs +7 -0
  52. package/dist/ui/data/image/index.d.ts +1 -0
  53. package/dist/ui/data/image/index.js +49 -0
  54. package/dist/ui/data/image/index.mjs +8 -0
  55. package/dist/ui/data/index.d.ts +3 -0
  56. package/dist/ui/data/index.js +48 -2
  57. package/dist/ui/data/index.mjs +32 -5
  58. package/dist/ui/data/table/index.d.ts +1 -0
  59. package/dist/ui/data/table/index.js +52 -0
  60. package/dist/ui/data/table/index.mjs +20 -0
  61. package/dist/ui/data/table/table.d.ts +23 -0
  62. package/dist/ui/data/table/table.js +50 -0
  63. package/dist/ui/data/table/table.mjs +19 -0
  64. package/dist/ui/data/user/index.d.ts +1 -0
  65. package/dist/ui/data/user/index.js +49 -0
  66. package/dist/ui/data/user/index.mjs +8 -0
  67. package/dist/ui/data/user/user.d.ts +6 -0
  68. package/dist/ui/data/user/user.js +47 -0
  69. package/dist/ui/data/user/user.mjs +7 -0
  70. package/dist/ui/feedback/chip/chip.js +18 -1
  71. package/dist/ui/feedback/chip/chip.mjs +3 -1
  72. package/dist/ui/feedback/chip/index.js +18 -1
  73. package/dist/ui/feedback/chip/index.mjs +3 -1
  74. package/dist/ui/feedback/index.d.ts +2 -0
  75. package/dist/ui/feedback/index.js +85 -11
  76. package/dist/ui/feedback/index.mjs +32 -3
  77. package/dist/ui/feedback/progress/circular-progress.d.ts +9 -0
  78. package/dist/ui/feedback/progress/circular-progress.js +47 -0
  79. package/dist/ui/feedback/progress/circular-progress.mjs +7 -0
  80. package/dist/ui/feedback/progress/index.d.ts +2 -0
  81. package/dist/ui/feedback/progress/index.js +60 -0
  82. package/dist/ui/feedback/progress/index.mjs +12 -0
  83. package/dist/ui/feedback/progress/progress.d.ts +9 -0
  84. package/dist/ui/feedback/progress/progress.js +47 -0
  85. package/dist/ui/feedback/progress/progress.mjs +7 -0
  86. package/dist/ui/feedback/toast/index.d.ts +1 -0
  87. package/dist/ui/feedback/toast/index.js +73 -0
  88. package/dist/ui/feedback/toast/index.mjs +21 -0
  89. package/dist/ui/feedback/toast/toast.d.ts +17 -0
  90. package/dist/ui/feedback/toast/toast.js +71 -0
  91. package/dist/ui/feedback/toast/toast.mjs +21 -0
  92. package/dist/ui/form/index.js +106 -53
  93. package/dist/ui/form/index.mjs +30 -21
  94. package/dist/ui/form/rhf/fields/autocomplete-field.mjs +13 -8
  95. package/dist/ui/form/rhf/fields/checkbox-field.js +1 -1
  96. package/dist/ui/form/rhf/fields/checkbox-field.mjs +14 -9
  97. package/dist/ui/form/rhf/fields/date-picker-field.mjs +13 -8
  98. package/dist/ui/form/rhf/fields/email-field.mjs +13 -8
  99. package/dist/ui/form/rhf/fields/index.d.ts +1 -0
  100. package/dist/ui/form/rhf/fields/index.js +102 -49
  101. package/dist/ui/form/rhf/fields/index.mjs +28 -19
  102. package/dist/ui/form/rhf/fields/input-field.mjs +13 -8
  103. package/dist/ui/form/rhf/fields/radio-field.d.ts +10 -0
  104. package/dist/ui/form/rhf/fields/radio-field.js +78 -0
  105. package/dist/ui/form/rhf/fields/radio-field.mjs +31 -0
  106. package/dist/ui/form/rhf/fields/select-field.d.ts +8 -3
  107. package/dist/ui/form/rhf/fields/select-field.js +23 -10
  108. package/dist/ui/form/rhf/fields/select-field.mjs +14 -9
  109. package/dist/ui/form/rhf/fields/switch-field.mjs +13 -8
  110. package/dist/ui/form/rhf/fields/text-field.mjs +13 -8
  111. package/dist/ui/form/rhf/fields/textarea-field.mjs +13 -8
  112. package/dist/ui/form/rhf/index.js +102 -49
  113. package/dist/ui/form/rhf/index.mjs +28 -19
  114. package/dist/ui/format/index.mjs +9 -9
  115. package/dist/ui/index.js +604 -193
  116. package/dist/ui/index.mjs +258 -112
  117. package/dist/ui/inputs/checkbox/checkbox-group.d.ts +9 -0
  118. package/dist/ui/inputs/checkbox/checkbox-group.js +45 -0
  119. package/dist/ui/inputs/checkbox/checkbox-group.mjs +7 -0
  120. package/dist/ui/inputs/checkbox/checkbox.js +1 -1
  121. package/dist/ui/inputs/checkbox/checkbox.mjs +1 -1
  122. package/dist/ui/inputs/checkbox/index.d.ts +1 -0
  123. package/dist/ui/inputs/checkbox/index.js +12 -3
  124. package/dist/ui/inputs/checkbox/index.mjs +7 -3
  125. package/dist/ui/inputs/index.d.ts +1 -0
  126. package/dist/ui/inputs/index.js +114 -39
  127. package/dist/ui/inputs/index.mjs +28 -11
  128. package/dist/ui/inputs/radio/index.d.ts +2 -0
  129. package/dist/ui/inputs/radio/index.js +57 -0
  130. package/dist/ui/inputs/radio/index.mjs +12 -0
  131. package/dist/ui/inputs/radio/radio-group.d.ts +9 -0
  132. package/dist/ui/inputs/radio/radio-group.js +49 -0
  133. package/dist/ui/inputs/radio/radio-group.mjs +7 -0
  134. package/dist/ui/inputs/radio/radio.d.ts +6 -0
  135. package/dist/ui/inputs/radio/radio.js +32 -0
  136. package/dist/ui/inputs/radio/radio.mjs +7 -0
  137. package/dist/ui/inputs/select/index.js +21 -9
  138. package/dist/ui/inputs/select/index.mjs +1 -1
  139. package/dist/ui/inputs/select/select.d.ts +18 -5
  140. package/dist/ui/inputs/select/select.js +21 -9
  141. package/dist/ui/inputs/select/select.mjs +1 -1
  142. package/dist/ui/inputs/switch/favorite-switch.d.ts +6 -0
  143. package/dist/ui/inputs/switch/favorite-switch.js +62 -0
  144. package/dist/ui/inputs/switch/favorite-switch.mjs +8 -0
  145. package/dist/ui/inputs/switch/index.d.ts +1 -0
  146. package/dist/ui/inputs/switch/index.js +35 -0
  147. package/dist/ui/inputs/switch/index.mjs +5 -1
  148. package/dist/ui/layout/accordion/accordion.d.ts +10 -0
  149. package/dist/ui/layout/accordion/accordion.js +35 -0
  150. package/dist/ui/layout/accordion/accordion.mjs +9 -0
  151. package/dist/ui/layout/accordion/index.d.ts +1 -0
  152. package/dist/ui/layout/accordion/index.js +37 -0
  153. package/dist/ui/layout/accordion/index.mjs +10 -0
  154. package/dist/ui/layout/container/container.mjs +99 -63
  155. package/dist/ui/layout/container/index.mjs +99 -63
  156. package/dist/ui/layout/divider/divider.d.ts +6 -0
  157. package/dist/ui/layout/divider/divider.js +48 -0
  158. package/dist/ui/layout/divider/divider.mjs +7 -0
  159. package/dist/ui/layout/divider/index.d.ts +1 -0
  160. package/dist/ui/layout/divider/index.js +50 -0
  161. package/dist/ui/layout/divider/index.mjs +8 -0
  162. package/dist/ui/layout/index.d.ts +3 -0
  163. package/dist/ui/layout/index.js +32 -0
  164. package/dist/ui/layout/index.mjs +113 -66
  165. package/dist/ui/layout/page/index.mjs +11 -5
  166. package/dist/ui/layout/page/page-loading.mjs +8 -2
  167. package/dist/ui/layout/page/section-loading.mjs +8 -2
  168. package/dist/ui/layout/scroll-shadow/index.d.ts +1 -0
  169. package/dist/ui/layout/scroll-shadow/index.js +49 -0
  170. package/dist/ui/layout/scroll-shadow/index.mjs +8 -0
  171. package/dist/ui/layout/scroll-shadow/scroll-shadow.d.ts +9 -0
  172. package/dist/ui/layout/scroll-shadow/scroll-shadow.js +47 -0
  173. package/dist/ui/layout/scroll-shadow/scroll-shadow.mjs +7 -0
  174. package/dist/ui/navigation/breadcrumbs/breadcrumbs.d.ts +10 -0
  175. package/dist/ui/navigation/breadcrumbs/breadcrumbs.js +37 -0
  176. package/dist/ui/navigation/breadcrumbs/breadcrumbs.mjs +9 -0
  177. package/dist/ui/navigation/breadcrumbs/index.d.ts +1 -0
  178. package/dist/ui/navigation/breadcrumbs/index.js +39 -0
  179. package/dist/ui/navigation/breadcrumbs/index.mjs +10 -0
  180. package/dist/ui/navigation/index.d.ts +3 -0
  181. package/dist/ui/navigation/index.js +88 -2
  182. package/dist/ui/navigation/index.mjs +31 -2
  183. package/dist/ui/navigation/navbar/index.d.ts +1 -0
  184. package/dist/ui/navigation/navbar/index.js +85 -0
  185. package/dist/ui/navigation/navbar/index.mjs +20 -0
  186. package/dist/ui/navigation/navbar/navbar.d.ts +26 -0
  187. package/dist/ui/navigation/navbar/navbar.js +83 -0
  188. package/dist/ui/navigation/navbar/navbar.mjs +19 -0
  189. package/dist/ui/navigation/tabs/index.d.ts +1 -0
  190. package/dist/ui/navigation/tabs/index.js +56 -0
  191. package/dist/ui/navigation/tabs/index.mjs +8 -0
  192. package/dist/ui/navigation/tabs/tabs.d.ts +7 -0
  193. package/dist/ui/navigation/tabs/tabs.js +54 -0
  194. package/dist/ui/navigation/tabs/tabs.mjs +7 -0
  195. package/dist/ui/overlays/dropdown/dropdown.d.ts +28 -0
  196. package/dist/ui/overlays/dropdown/dropdown.js +48 -0
  197. package/dist/ui/overlays/dropdown/dropdown.mjs +15 -0
  198. package/dist/ui/overlays/dropdown/index.d.ts +1 -0
  199. package/dist/ui/overlays/dropdown/index.js +50 -0
  200. package/dist/ui/overlays/dropdown/index.mjs +16 -0
  201. package/dist/ui/overlays/index.d.ts +2 -0
  202. package/dist/ui/overlays/index.js +47 -2
  203. package/dist/ui/overlays/index.mjs +20 -2
  204. package/dist/ui/overlays/popover/index.d.ts +1 -0
  205. package/dist/ui/overlays/popover/index.js +51 -0
  206. package/dist/ui/overlays/popover/index.mjs +8 -0
  207. package/dist/ui/overlays/popover/popover.d.ts +10 -0
  208. package/dist/ui/overlays/popover/popover.js +49 -0
  209. package/dist/ui/overlays/popover/popover.mjs +7 -0
  210. package/dist/ui/provider/index.js +31 -2
  211. package/dist/ui/provider/index.mjs +16 -1
  212. package/dist/ui/provider/ui-provider.d.ts +3 -1
  213. package/dist/ui/provider/ui-provider.js +31 -2
  214. package/dist/ui/provider/ui-provider.mjs +16 -1
  215. package/dist/ui/surface/card/card.d.ts +36 -0
  216. package/dist/ui/surface/card/card.js +65 -0
  217. package/dist/ui/surface/card/card.mjs +7 -0
  218. package/dist/ui/surface/card/index.d.ts +1 -0
  219. package/dist/ui/surface/card/index.js +67 -0
  220. package/dist/ui/surface/card/index.mjs +8 -0
  221. package/dist/ui/surface/index.d.ts +1 -0
  222. package/dist/ui/surface/index.js +39 -0
  223. package/dist/ui/surface/index.mjs +6 -1
  224. package/dist/ui/theme/colors/common.mjs +5 -5
  225. package/dist/ui/theme/colors/index.js +1 -1
  226. package/dist/ui/theme/colors/index.mjs +7 -7
  227. package/dist/ui/theme/colors/semantic.js +1 -1
  228. package/dist/ui/theme/colors/semantic.mjs +6 -6
  229. package/dist/ui/theme/colors.js +1 -1
  230. package/dist/ui/theme/colors.mjs +7 -7
  231. package/dist/ui/theme/index.js +1 -1
  232. package/dist/ui/theme/index.mjs +8 -8
  233. package/dist/ui/theme/theme.js +1 -1
  234. package/dist/ui/theme/theme.mjs +8 -8
  235. package/dist/utils/extend-variants.d.ts +41 -0
  236. package/dist/utils/extend-variants.js +34 -0
  237. package/dist/utils/extend-variants.mjs +7 -0
  238. package/dist/utils/index.d.ts +1 -0
  239. package/dist/utils/index.js +36 -0
  240. package/dist/utils/index.mjs +8 -0
  241. package/package.json +18 -3
  242. package/dist/chunk-6WK4W5LL.mjs +0 -17
  243. package/dist/chunk-GQ3LBZ2Q.mjs +0 -33
  244. package/dist/chunk-ONQIPN3G.mjs +0 -14
  245. package/dist/{chunk-54ZSBA6H.mjs → chunk-3C4DPNCD.mjs} +0 -0
  246. package/dist/{chunk-5EWHMXCP.mjs → chunk-54FA62HL.mjs} +0 -0
  247. package/dist/{chunk-5HUR2CNH.mjs → chunk-57JRJHSH.mjs} +0 -0
  248. package/dist/{chunk-NCM6KIQH.mjs → chunk-5WDV3PDI.mjs} +12 -12
  249. /package/dist/{chunk-IZ5KKF6P.mjs → chunk-773RYGHT.mjs} +0 -0
  250. /package/dist/{chunk-5YMUHF45.mjs → chunk-AR4IYKG5.mjs} +0 -0
  251. /package/dist/{chunk-CAJWTQDB.mjs → chunk-AT6DX4DN.mjs} +0 -0
  252. /package/dist/{chunk-JJHHWDZT.mjs → chunk-BGNMWHME.mjs} +0 -0
  253. /package/dist/{chunk-OEHJDT6R.mjs → chunk-CTKWGSNJ.mjs} +0 -0
  254. /package/dist/{chunk-UURZJWWV.mjs → chunk-CZEO3U25.mjs} +0 -0
  255. /package/dist/{chunk-WJXIRSSW.mjs → chunk-DRZAPJZH.mjs} +0 -0
@@ -33,9 +33,13 @@ var inputs_exports = {};
33
33
  __export(inputs_exports, {
34
34
  Autocomplete: () => Autocomplete,
35
35
  Checkbox: () => Checkbox,
36
+ CheckboxGroup: () => CheckboxGroup,
36
37
  DatePicker: () => DatePicker,
37
38
  Email: () => Email,
39
+ FavoriteSwitch: () => FavoriteSwitch,
38
40
  Input: () => Input,
41
+ Radio: () => Radio,
42
+ RadioGroup: () => RadioGroup,
39
43
  Select: () => Select,
40
44
  Switch: () => Switch,
41
45
  Text: () => Text,
@@ -60,64 +64,83 @@ var import_react2 = __toESM(require("react"));
60
64
  var import_jsx_runtime2 = require("react/jsx-runtime");
61
65
  var Checkbox = import_react2.default.forwardRef(
62
66
  ({ label, ...props }, ref) => {
63
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_checkbox.Checkbox, { ref, label, ...props, children: label });
67
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_checkbox.Checkbox, { ref, ...props, children: label });
64
68
  }
65
69
  );
66
70
  Checkbox.displayName = "TeachInUI.Checkbox";
67
71
 
68
- // src/ui/inputs/date-picker/date-picker.tsx
72
+ // src/ui/inputs/checkbox/checkbox-group.tsx
69
73
  var import_react3 = __toESM(require("react"));
74
+ var import_checkbox2 = require("@heroui/checkbox");
75
+ var import_jsx_runtime3 = require("react/jsx-runtime");
76
+ var CheckboxGroup = import_react3.default.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_checkbox2.CheckboxGroup, { ref, ...props }));
77
+ CheckboxGroup.displayName = "TeachInUI.CheckboxGroup";
78
+
79
+ // src/ui/inputs/date-picker/date-picker.tsx
80
+ var import_react4 = __toESM(require("react"));
70
81
  var import_date_picker = require("@heroui/date-picker");
71
82
  var import_i18n = require("@react-aria/i18n");
72
- var import_jsx_runtime3 = require("react/jsx-runtime");
73
- var DatePicker = import_react3.default.forwardRef(
83
+ var import_jsx_runtime4 = require("react/jsx-runtime");
84
+ var DatePicker = import_react4.default.forwardRef(
74
85
  ({ locale, ...props }, ref) => {
75
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_i18n.I18nProvider, { locale, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_date_picker.DatePicker, { ref, ...props }) });
86
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_i18n.I18nProvider, { locale, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_date_picker.DatePicker, { ref, ...props }) });
76
87
  }
77
88
  );
78
89
  DatePicker.displayName = "TeachInUI.DatePicker";
79
90
 
80
91
  // src/ui/inputs/email/email.tsx
81
- var import_react5 = __toESM(require("react"));
92
+ var import_react6 = __toESM(require("react"));
82
93
 
83
94
  // src/ui/inputs/input/input.tsx
84
- var import_react4 = __toESM(require("react"));
95
+ var import_react5 = __toESM(require("react"));
85
96
  var import_input = require("@heroui/input");
86
- var import_jsx_runtime4 = require("react/jsx-runtime");
87
- var Input = import_react4.default.forwardRef(({ ...props }, ref) => {
88
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_input.Input, { ref, ...props });
97
+ var import_jsx_runtime5 = require("react/jsx-runtime");
98
+ var Input = import_react5.default.forwardRef(({ ...props }, ref) => {
99
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_input.Input, { ref, ...props });
89
100
  });
90
101
  Input.displayName = "TeachInUI.Input";
91
102
 
92
103
  // src/ui/inputs/email/email.tsx
93
- var import_jsx_runtime5 = require("react/jsx-runtime");
94
- var Email = import_react5.default.forwardRef(({ ...props }, ref) => {
95
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Input, { ref, autoComplete: "email", type: "email", ...props });
104
+ var import_jsx_runtime6 = require("react/jsx-runtime");
105
+ var Email = import_react6.default.forwardRef(({ ...props }, ref) => {
106
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Input, { ref, autoComplete: "email", type: "email", ...props });
96
107
  });
97
108
  Email.displayName = "TeachInUI.Email";
98
109
 
99
110
  // src/ui/inputs/select/select.tsx
100
- var import_react6 = __toESM(require("react"));
111
+ var import_react7 = __toESM(require("react"));
101
112
  var import_select = require("@heroui/select");
102
- var import_jsx_runtime6 = require("react/jsx-runtime");
103
- var Select = import_react6.default.forwardRef(
104
- ({ value, items, onChange, ...props }, ref) => {
105
- const selectedKeys = value != null ? /* @__PURE__ */ new Set([value]) : void 0;
106
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
113
+ var import_jsx_runtime7 = require("react/jsx-runtime");
114
+ var Select = import_react7.default.forwardRef(
115
+ ({ value, items, onChange, selectionMode, ...props }, ref) => {
116
+ const isMultiple = selectionMode === "multiple";
117
+ const selectedKeys = import_react7.default.useMemo(() => {
118
+ if (value == null) return /* @__PURE__ */ new Set();
119
+ return new Set(Array.isArray(value) ? value : [value]);
120
+ }, [value]);
121
+ const handleSelectionChange = import_react7.default.useCallback(
122
+ (keys) => {
123
+ var _a;
124
+ if (keys === "all") return;
125
+ const selected = Array.from(keys).filter((key) => typeof key === "string");
126
+ if (isMultiple) {
127
+ onChange == null ? void 0 : onChange(selected);
128
+ } else {
129
+ onChange == null ? void 0 : onChange((_a = selected[0]) != null ? _a : null);
130
+ }
131
+ },
132
+ [onChange, isMultiple]
133
+ );
134
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
107
135
  import_select.Select,
108
136
  {
109
137
  ref,
110
138
  items,
111
- placeholder: " ",
112
139
  selectedKeys,
113
- onSelectionChange: (keys) => {
114
- const selected = Array.from(keys)[0];
115
- if (typeof selected === "string") {
116
- onChange == null ? void 0 : onChange(selected);
117
- }
118
- },
140
+ selectionMode,
141
+ onSelectionChange: handleSelectionChange,
119
142
  ...props,
120
- children: (item) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_select.SelectItem, { children: item.label }, item.key)
143
+ children: (item) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_select.SelectItem, { children: item.label }, item.key)
121
144
  }
122
145
  );
123
146
  }
@@ -125,29 +148,77 @@ var Select = import_react6.default.forwardRef(
125
148
  Select.displayName = "TeachInUI.Select";
126
149
 
127
150
  // src/ui/inputs/switch/switch.tsx
128
- var import_react7 = __toESM(require("react"));
151
+ var import_react8 = __toESM(require("react"));
129
152
  var import_switch = require("@heroui/switch");
130
- var import_jsx_runtime7 = require("react/jsx-runtime");
131
- var Switch = import_react7.default.forwardRef(({ ...props }, ref) => {
132
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_switch.Switch, { ref, ...props });
153
+ var import_jsx_runtime8 = require("react/jsx-runtime");
154
+ var Switch = import_react8.default.forwardRef(({ ...props }, ref) => {
155
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_switch.Switch, { ref, ...props });
133
156
  });
134
157
  Switch.displayName = "TeachInUI.Switch";
135
158
 
159
+ // src/ui/inputs/switch/favorite-switch.tsx
160
+ var import_switch2 = require("@heroui/switch");
161
+ var import_lucide_react = require("lucide-react");
162
+ var import_tailwind_variants = require("tailwind-variants");
163
+ var import_jsx_runtime9 = require("react/jsx-runtime");
164
+ var bookmarkVariants = (0, import_tailwind_variants.tv)({
165
+ base: "size-6 stroke-default-400 group-hover:fill-primary-100 group-hover:stroke-default-400",
166
+ variants: {
167
+ isSelected: {
168
+ true: "stroke-primary fill-primary-100"
169
+ }
170
+ }
171
+ });
172
+ function FavoriteSwitch({ isSelected, onValueChange }) {
173
+ const { Component, slots, getBaseProps, getInputProps, getWrapperProps } = (0, import_switch2.useSwitch)({
174
+ isSelected,
175
+ onValueChange
176
+ });
177
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Component, { ...getBaseProps(), children: [
178
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "sr-only", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("input", { ...getInputProps() }) }),
179
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
180
+ "div",
181
+ {
182
+ ...getWrapperProps(),
183
+ className: slots.wrapper({
184
+ class: "flex h-8 w-8 cursor-pointer items-center justify-center rounded-sm !bg-transparent"
185
+ }),
186
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react.Bookmark, { className: bookmarkVariants({ isSelected }) })
187
+ }
188
+ )
189
+ ] });
190
+ }
191
+
192
+ // src/ui/inputs/radio/radio.tsx
193
+ var import_radio = require("@heroui/radio");
194
+ var Radio = Object.assign(import_radio.Radio, { displayName: "TeachInUI.Radio" });
195
+
196
+ // src/ui/inputs/radio/radio-group.tsx
197
+ var import_react9 = __toESM(require("react"));
198
+ var import_radio2 = require("@heroui/radio");
199
+ var import_jsx_runtime10 = require("react/jsx-runtime");
200
+ var RadioGroup = import_react9.default.forwardRef(
201
+ (props, ref) => {
202
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_radio2.RadioGroup, { ref, ...props });
203
+ }
204
+ );
205
+ RadioGroup.displayName = "TeachInUI.RadioGroup";
206
+
136
207
  // src/ui/inputs/text/text.tsx
137
- var import_react8 = __toESM(require("react"));
138
- var import_jsx_runtime8 = require("react/jsx-runtime");
139
- var Text = import_react8.default.forwardRef(({ ...props }, ref) => {
140
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Input, { ref, type: "text", ...props });
208
+ var import_react10 = __toESM(require("react"));
209
+ var import_jsx_runtime11 = require("react/jsx-runtime");
210
+ var Text = import_react10.default.forwardRef(({ ...props }, ref) => {
211
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Input, { ref, type: "text", ...props });
141
212
  });
142
213
  Text.displayName = "TeachInUI.Text";
143
214
 
144
215
  // src/ui/inputs/textarea/textarea.tsx
145
216
  var import_input5 = require("@heroui/input");
146
- var import_react9 = __toESM(require("react"));
147
- var import_jsx_runtime9 = require("react/jsx-runtime");
148
- var Textarea = import_react9.default.forwardRef(
217
+ var import_react11 = __toESM(require("react"));
218
+ var import_jsx_runtime12 = require("react/jsx-runtime");
219
+ var Textarea = import_react11.default.forwardRef(
149
220
  ({ minRows = 4, ...props }, ref) => {
150
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_input5.Textarea, { ref, minRows, ...props });
221
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_input5.Textarea, { ref, minRows, ...props });
151
222
  }
152
223
  );
153
224
  Textarea.displayName = "TeachInUI.Textarea";
@@ -155,9 +226,13 @@ Textarea.displayName = "TeachInUI.Textarea";
155
226
  0 && (module.exports = {
156
227
  Autocomplete,
157
228
  Checkbox,
229
+ CheckboxGroup,
158
230
  DatePicker,
159
231
  Email,
232
+ FavoriteSwitch,
160
233
  Input,
234
+ Radio,
235
+ RadioGroup,
161
236
  Select,
162
237
  Switch,
163
238
  Text,
@@ -1,17 +1,27 @@
1
1
  "use client";
2
- import "../../chunk-5YMUHF45.mjs";
3
- import "../../chunk-5HK7HRTR.mjs";
2
+ import "../../chunk-CZEO3U25.mjs";
3
+ import "../../chunk-DUQFM3QS.mjs";
4
4
  import {
5
- Textarea
6
- } from "../../chunk-HJUZTISD.mjs";
7
- import "../../chunk-5EWHMXCP.mjs";
5
+ Text
6
+ } from "../../chunk-KTUGFQWJ.mjs";
7
+ import "../../chunk-RRA7GWP2.mjs";
8
+ import {
9
+ RadioGroup
10
+ } from "../../chunk-NOXFF2KJ.mjs";
11
+ import {
12
+ Radio
13
+ } from "../../chunk-2SNKT7I4.mjs";
14
+ import "../../chunk-LLP2PTPK.mjs";
15
+ import {
16
+ FavoriteSwitch
17
+ } from "../../chunk-E5QSNLSR.mjs";
8
18
  import {
9
19
  Switch
10
20
  } from "../../chunk-N3EAW6UO.mjs";
11
- import "../../chunk-DUQFM3QS.mjs";
21
+ import "../../chunk-5HK7HRTR.mjs";
12
22
  import {
13
- Text
14
- } from "../../chunk-KTUGFQWJ.mjs";
23
+ Textarea
24
+ } from "../../chunk-HJUZTISD.mjs";
15
25
  import "../../chunk-V2HNFTTX.mjs";
16
26
  import {
17
27
  DatePicker
@@ -27,21 +37,28 @@ import {
27
37
  import "../../chunk-AQ3ISJKU.mjs";
28
38
  import {
29
39
  Select
30
- } from "../../chunk-GQ3LBZ2Q.mjs";
40
+ } from "../../chunk-3YOW5DEZ.mjs";
31
41
  import "../../chunk-WYJW5NNA.mjs";
32
42
  import {
33
43
  Autocomplete
34
44
  } from "../../chunk-C3MURCMZ.mjs";
35
- import "../../chunk-WJXIRSSW.mjs";
45
+ import "../../chunk-UUKS7JYX.mjs";
46
+ import {
47
+ CheckboxGroup
48
+ } from "../../chunk-C4PCTOGM.mjs";
36
49
  import {
37
50
  Checkbox
38
- } from "../../chunk-WTXPB253.mjs";
51
+ } from "../../chunk-N3QOXWJI.mjs";
39
52
  export {
40
53
  Autocomplete,
41
54
  Checkbox,
55
+ CheckboxGroup,
42
56
  DatePicker,
43
57
  Email,
58
+ FavoriteSwitch,
44
59
  Input,
60
+ Radio,
61
+ RadioGroup,
45
62
  Select,
46
63
  Switch,
47
64
  Text,
@@ -0,0 +1,2 @@
1
+ export * from "./radio";
2
+ export * from "./radio-group";
@@ -0,0 +1,57 @@
1
+ "use client";
2
+ "use strict";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+
31
+ // src/ui/inputs/radio/index.ts
32
+ var radio_exports = {};
33
+ __export(radio_exports, {
34
+ Radio: () => Radio,
35
+ RadioGroup: () => RadioGroup
36
+ });
37
+ module.exports = __toCommonJS(radio_exports);
38
+
39
+ // src/ui/inputs/radio/radio.tsx
40
+ var import_radio = require("@heroui/radio");
41
+ var Radio = Object.assign(import_radio.Radio, { displayName: "TeachInUI.Radio" });
42
+
43
+ // src/ui/inputs/radio/radio-group.tsx
44
+ var import_react = __toESM(require("react"));
45
+ var import_radio2 = require("@heroui/radio");
46
+ var import_jsx_runtime = require("react/jsx-runtime");
47
+ var RadioGroup = import_react.default.forwardRef(
48
+ (props, ref) => {
49
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_radio2.RadioGroup, { ref, ...props });
50
+ }
51
+ );
52
+ RadioGroup.displayName = "TeachInUI.RadioGroup";
53
+ // Annotate the CommonJS export names for ESM import in node:
54
+ 0 && (module.exports = {
55
+ Radio,
56
+ RadioGroup
57
+ });
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import "../../../chunk-RRA7GWP2.mjs";
3
+ import {
4
+ RadioGroup
5
+ } from "../../../chunk-NOXFF2KJ.mjs";
6
+ import {
7
+ Radio
8
+ } from "../../../chunk-2SNKT7I4.mjs";
9
+ export {
10
+ Radio,
11
+ RadioGroup
12
+ };
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { RadioGroup as HeroUIRadioGroup } from "@heroui/radio";
3
+ export type RadioGroupProps = React.ComponentProps<typeof HeroUIRadioGroup>;
4
+ declare const RadioGroup: React.ForwardRefExoticComponent<(Omit<import("@heroui/system").OmitCommonProps<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof import("@heroui/radio").RadioGroupProps> & import("@heroui/radio").RadioGroupProps & {
5
+ as?: import("@heroui/system").As<any> | undefined;
6
+ }, "ref"> | Omit<import("@heroui/system").OmitCommonProps<Omit<Omit<any, "ref">, never>, keyof import("@heroui/radio").RadioGroupProps> & import("@heroui/radio").RadioGroupProps & {
7
+ as?: import("@heroui/system").As<any> | undefined;
8
+ }, "ref">) & React.RefAttributes<HTMLDivElement>>;
9
+ export { RadioGroup };
@@ -0,0 +1,49 @@
1
+ "use client";
2
+ "use strict";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+
31
+ // src/ui/inputs/radio/radio-group.tsx
32
+ var radio_group_exports = {};
33
+ __export(radio_group_exports, {
34
+ RadioGroup: () => RadioGroup
35
+ });
36
+ module.exports = __toCommonJS(radio_group_exports);
37
+ var import_react = __toESM(require("react"));
38
+ var import_radio = require("@heroui/radio");
39
+ var import_jsx_runtime = require("react/jsx-runtime");
40
+ var RadioGroup = import_react.default.forwardRef(
41
+ (props, ref) => {
42
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_radio.RadioGroup, { ref, ...props });
43
+ }
44
+ );
45
+ RadioGroup.displayName = "TeachInUI.RadioGroup";
46
+ // Annotate the CommonJS export names for ESM import in node:
47
+ 0 && (module.exports = {
48
+ RadioGroup
49
+ });
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import {
3
+ RadioGroup
4
+ } from "../../../chunk-NOXFF2KJ.mjs";
5
+ export {
6
+ RadioGroup
7
+ };
@@ -0,0 +1,6 @@
1
+ import { Radio as HeroUIRadio } from "@heroui/radio";
2
+ export type RadioProps = React.ComponentProps<typeof HeroUIRadio>;
3
+ declare const Radio: import("@heroui/system").InternalForwardRefRenderFunction<"input", import("@heroui/radio").RadioProps, never> & {
4
+ displayName: string;
5
+ };
6
+ export { Radio };
@@ -0,0 +1,32 @@
1
+ "use client";
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/ui/inputs/radio/radio.tsx
22
+ var radio_exports = {};
23
+ __export(radio_exports, {
24
+ Radio: () => Radio
25
+ });
26
+ module.exports = __toCommonJS(radio_exports);
27
+ var import_radio = require("@heroui/radio");
28
+ var Radio = Object.assign(import_radio.Radio, { displayName: "TeachInUI.Radio" });
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ Radio
32
+ });
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import {
3
+ Radio
4
+ } from "../../../chunk-2SNKT7I4.mjs";
5
+ export {
6
+ Radio
7
+ };
@@ -40,21 +40,33 @@ var import_react = __toESM(require("react"));
40
40
  var import_select = require("@heroui/select");
41
41
  var import_jsx_runtime = require("react/jsx-runtime");
42
42
  var Select = import_react.default.forwardRef(
43
- ({ value, items, onChange, ...props }, ref) => {
44
- const selectedKeys = value != null ? /* @__PURE__ */ new Set([value]) : void 0;
43
+ ({ value, items, onChange, selectionMode, ...props }, ref) => {
44
+ const isMultiple = selectionMode === "multiple";
45
+ const selectedKeys = import_react.default.useMemo(() => {
46
+ if (value == null) return /* @__PURE__ */ new Set();
47
+ return new Set(Array.isArray(value) ? value : [value]);
48
+ }, [value]);
49
+ const handleSelectionChange = import_react.default.useCallback(
50
+ (keys) => {
51
+ var _a;
52
+ if (keys === "all") return;
53
+ const selected = Array.from(keys).filter((key) => typeof key === "string");
54
+ if (isMultiple) {
55
+ onChange == null ? void 0 : onChange(selected);
56
+ } else {
57
+ onChange == null ? void 0 : onChange((_a = selected[0]) != null ? _a : null);
58
+ }
59
+ },
60
+ [onChange, isMultiple]
61
+ );
45
62
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
46
63
  import_select.Select,
47
64
  {
48
65
  ref,
49
66
  items,
50
- placeholder: " ",
51
67
  selectedKeys,
52
- onSelectionChange: (keys) => {
53
- const selected = Array.from(keys)[0];
54
- if (typeof selected === "string") {
55
- onChange == null ? void 0 : onChange(selected);
56
- }
57
- },
68
+ selectionMode,
69
+ onSelectionChange: handleSelectionChange,
58
70
  ...props,
59
71
  children: (item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectItem, { children: item.label }, item.key)
60
72
  }
@@ -2,7 +2,7 @@
2
2
  import "../../../chunk-AQ3ISJKU.mjs";
3
3
  import {
4
4
  Select
5
- } from "../../../chunk-GQ3LBZ2Q.mjs";
5
+ } from "../../../chunk-3YOW5DEZ.mjs";
6
6
  export {
7
7
  Select
8
8
  };
@@ -4,10 +4,23 @@ interface Item {
4
4
  key: string;
5
5
  label: string;
6
6
  }
7
- export interface SelectProps extends Omit<HeroUISelectProps<Item>, "value" | "items" | "onSelectionChange" | "onChange" | "children"> {
7
+ type BaseSelectProps = Omit<HeroUISelectProps<Item>, "selectedKeys" | "onSelectionChange" | "children" | "onChange">;
8
+ export type SelectProps = (BaseSelectProps & {
9
+ selectionMode?: "single";
8
10
  value?: string;
9
- items?: Item[];
10
- onChange?: (value: string) => void;
11
- }
12
- export declare const Select: React.ForwardRefExoticComponent<Omit<SelectProps, "ref"> & React.RefAttributes<HTMLSelectElement>>;
11
+ onChange?: (value: string | null) => void;
12
+ }) | (BaseSelectProps & {
13
+ selectionMode: "multiple";
14
+ value?: string[];
15
+ onChange?: (value: string[]) => void;
16
+ });
17
+ export declare const Select: React.ForwardRefExoticComponent<(Omit<BaseSelectProps & {
18
+ selectionMode?: "single";
19
+ value?: string;
20
+ onChange?: (value: string | null) => void;
21
+ }, "ref"> | Omit<BaseSelectProps & {
22
+ selectionMode: "multiple";
23
+ value?: string[];
24
+ onChange?: (value: string[]) => void;
25
+ }, "ref">) & React.RefAttributes<HTMLSelectElement>>;
13
26
  export {};
@@ -38,21 +38,33 @@ var import_react = __toESM(require("react"));
38
38
  var import_select = require("@heroui/select");
39
39
  var import_jsx_runtime = require("react/jsx-runtime");
40
40
  var Select = import_react.default.forwardRef(
41
- ({ value, items, onChange, ...props }, ref) => {
42
- const selectedKeys = value != null ? /* @__PURE__ */ new Set([value]) : void 0;
41
+ ({ value, items, onChange, selectionMode, ...props }, ref) => {
42
+ const isMultiple = selectionMode === "multiple";
43
+ const selectedKeys = import_react.default.useMemo(() => {
44
+ if (value == null) return /* @__PURE__ */ new Set();
45
+ return new Set(Array.isArray(value) ? value : [value]);
46
+ }, [value]);
47
+ const handleSelectionChange = import_react.default.useCallback(
48
+ (keys) => {
49
+ var _a;
50
+ if (keys === "all") return;
51
+ const selected = Array.from(keys).filter((key) => typeof key === "string");
52
+ if (isMultiple) {
53
+ onChange == null ? void 0 : onChange(selected);
54
+ } else {
55
+ onChange == null ? void 0 : onChange((_a = selected[0]) != null ? _a : null);
56
+ }
57
+ },
58
+ [onChange, isMultiple]
59
+ );
43
60
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
61
  import_select.Select,
45
62
  {
46
63
  ref,
47
64
  items,
48
- placeholder: " ",
49
65
  selectedKeys,
50
- onSelectionChange: (keys) => {
51
- const selected = Array.from(keys)[0];
52
- if (typeof selected === "string") {
53
- onChange == null ? void 0 : onChange(selected);
54
- }
55
- },
66
+ selectionMode,
67
+ onSelectionChange: handleSelectionChange,
56
68
  ...props,
57
69
  children: (item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectItem, { children: item.label }, item.key)
58
70
  }
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  Select
4
- } from "../../../chunk-GQ3LBZ2Q.mjs";
4
+ } from "../../../chunk-3YOW5DEZ.mjs";
5
5
  export {
6
6
  Select
7
7
  };
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ export interface Props {
3
+ isSelected: boolean;
4
+ onValueChange?: (isSelected: boolean) => void;
5
+ }
6
+ export declare function FavoriteSwitch({ isSelected, onValueChange }: Props): React.JSX.Element;