@lets-events/react 11.3.0 → 11.4.1

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 (58) hide show
  1. package/.eslintrc.json +2 -2
  2. package/.turbo/turbo-build.log +18 -20
  3. package/CHANGELOG.md +12 -0
  4. package/dist/index.d.mts +968 -207
  5. package/dist/index.d.ts +968 -207
  6. package/dist/index.js +266 -54
  7. package/dist/index.mjs +262 -48
  8. package/package.json +1 -1
  9. package/src/components/Alert.tsx +303 -303
  10. package/src/components/Avatar.tsx +55 -55
  11. package/src/components/Badge.tsx +125 -128
  12. package/src/components/Box.tsx +3 -3
  13. package/src/components/Button/index.tsx +16 -16
  14. package/src/components/Button/styledComponents.ts +287 -287
  15. package/src/components/ButtonGroup.tsx +484 -484
  16. package/src/components/Calendar/index.tsx +136 -136
  17. package/src/components/Calendar/styledComponents.ts +209 -209
  18. package/src/components/Card.tsx +48 -48
  19. package/src/components/CheckboxGroup.tsx +196 -214
  20. package/src/components/Container.tsx +39 -39
  21. package/src/components/Drawer/index.tsx +48 -48
  22. package/src/components/Drawer/styledComponents.ts +46 -46
  23. package/src/components/Dropdown.tsx +167 -167
  24. package/src/components/Filter.tsx +164 -164
  25. package/src/components/Flex.tsx +118 -118
  26. package/src/components/FormFields/ErrorFormMessage.tsx +36 -36
  27. package/src/components/FormFields/Form.tsx +25 -25
  28. package/src/components/FormFields/FormLabel.tsx +29 -29
  29. package/src/components/FormFields/MultiSelectFormField.tsx +59 -0
  30. package/src/components/FormFields/TextAreaFormField.tsx +46 -46
  31. package/src/components/FormFields/TextFormField.tsx +46 -46
  32. package/src/components/Grid.tsx +137 -137
  33. package/src/components/Icon.tsx +47 -47
  34. package/src/components/MenuDropdown/index.tsx +30 -30
  35. package/src/components/MenuDropdown/styledComponents.ts +31 -31
  36. package/src/components/Modal.tsx +90 -90
  37. package/src/components/MultiSelect.tsx +218 -0
  38. package/src/components/RadioGroup.tsx +210 -210
  39. package/src/components/Section.tsx +33 -33
  40. package/src/components/Step.tsx +164 -164
  41. package/src/components/Switch.tsx +108 -108
  42. package/src/components/Text.tsx +38 -39
  43. package/src/components/TextField.tsx +315 -315
  44. package/src/components/TextareaField.tsx +128 -128
  45. package/src/components/TimePicker.tsx +298 -298
  46. package/src/components/Toast/components/ToastItem.tsx +41 -41
  47. package/src/components/Toast/components/ToastProvider.tsx +63 -63
  48. package/src/components/Toast/hooks/useToast.ts +12 -12
  49. package/src/components/Toast/index.tsx +5 -5
  50. package/src/components/Toast/styles/index.ts +135 -135
  51. package/src/components/Toast/types/index.ts +46 -46
  52. package/src/components/Tooltip/index.tsx +66 -66
  53. package/src/components/Tooltip/styles.ts +77 -77
  54. package/src/hooks/useOnClickOutside.tsx +20 -20
  55. package/src/index.tsx +44 -42
  56. package/src/styles/index.ts +38 -38
  57. package/src/types/typographyValues.ts +178 -178
  58. package/tsconfig.json +3 -3
package/dist/index.js CHANGED
@@ -1053,6 +1053,8 @@ __export(index_exports, {
1053
1053
  InputStyled: () => InputStyled,
1054
1054
  MenuDropdown: () => MenuDropdown,
1055
1055
  Modal: () => Modal,
1056
+ MultiSelect: () => MultiSelect,
1057
+ MultiSelectFormField: () => MultiSelectFormField,
1056
1058
  RadioGroup: () => RadioGroup,
1057
1059
  RadioGroupStyled: () => RadioGroupStyled,
1058
1060
  RadioItem: () => RadioItem,
@@ -1650,7 +1652,6 @@ var import_jsx_runtime2 = require("react/jsx-runtime");
1650
1652
  var TextStyle = styled(import_themes.Text, {
1651
1653
  fontFamily: "$default",
1652
1654
  lineHeight: "$base",
1653
- color: "$grey950",
1654
1655
  variants: {
1655
1656
  typography: typographyValues,
1656
1657
  fontWeight: {
@@ -1667,7 +1668,7 @@ function Text(_a) {
1667
1668
  TextStyle,
1668
1669
  __spreadProps(__spreadValues({}, props), {
1669
1670
  css: __spreadValues({
1670
- color: color ? "$" + color : "$grey950"
1671
+ color: color ? "$" + color : "$dark600"
1671
1672
  }, props.css)
1672
1673
  })
1673
1674
  );
@@ -3079,10 +3080,10 @@ var import_themes9 = require("@radix-ui/themes");
3079
3080
  var import_jsx_runtime9 = require("react/jsx-runtime");
3080
3081
  var CheckboxGroupStyled = styled(import_themes9.CheckboxGroup.Root, {
3081
3082
  fontFamily: "$default",
3082
- "svg": {
3083
+ svg: {
3083
3084
  display: "none"
3084
3085
  },
3085
- "label": {
3086
+ label: {
3086
3087
  display: "flex",
3087
3088
  alignItems: "center",
3088
3089
  gap: "$8",
@@ -3125,7 +3126,7 @@ var CheckboxGroupStyled = styled(import_themes9.CheckboxGroup.Root, {
3125
3126
  variants: {
3126
3127
  color: {
3127
3128
  success: {
3128
- "label": {
3129
+ label: {
3129
3130
  "&:focus button, &:hover button": {
3130
3131
  boxShadow: "0px 0px 0px 4px rgba(38, 167, 67, 0.50)"
3131
3132
  }
@@ -3140,7 +3141,7 @@ var CheckboxGroupStyled = styled(import_themes9.CheckboxGroup.Root, {
3140
3141
  },
3141
3142
  blue: {},
3142
3143
  error: {
3143
- "label": {
3144
+ label: {
3144
3145
  "&:focus button, &:hover button": {
3145
3146
  boxShadow: "0px 0px 0px 4px rgba(225, 86, 98, 0.50)"
3146
3147
  }
@@ -3156,7 +3157,7 @@ var CheckboxGroupStyled = styled(import_themes9.CheckboxGroup.Root, {
3156
3157
  },
3157
3158
  disabled: {
3158
3159
  true: {
3159
- "label": {
3160
+ label: {
3160
3161
  cursor: "not-allowed",
3161
3162
  opacity: 0.5,
3162
3163
  "&:focus button, &:hover button": {
@@ -3182,7 +3183,7 @@ var CheckboxGroupStyled = styled(import_themes9.CheckboxGroup.Root, {
3182
3183
  color: "blue",
3183
3184
  disabled: false,
3184
3185
  css: {
3185
- "label": {
3186
+ label: {
3186
3187
  "&:focus button, &:hover button": {
3187
3188
  boxShadow: "0px 0px 0px 4px rgba(56, 129, 255, 0.50)"
3188
3189
  }
@@ -3240,21 +3241,14 @@ var CheckboxGroupStyled = styled(import_themes9.CheckboxGroup.Root, {
3240
3241
  disabled: false
3241
3242
  }
3242
3243
  });
3244
+ var StyledItem = styled(import_themes9.CheckboxGroup.Item, {});
3243
3245
  function CheckboxGroup(_a) {
3244
- var _b = _a, {
3245
- children
3246
- } = _b, props = __objRest(_b, [
3247
- "children"
3248
- ]);
3246
+ var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
3249
3247
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(CheckboxGroupStyled, __spreadProps(__spreadValues({}, props), { children }));
3250
3248
  }
3251
3249
  function CheckboxItem(_a) {
3252
- var _b = _a, {
3253
- children
3254
- } = _b, props = __objRest(_b, [
3255
- "children"
3256
- ]);
3257
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_themes9.CheckboxGroup.Item, __spreadProps(__spreadValues({}, props), { children }));
3250
+ var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
3251
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(StyledItem, __spreadProps(__spreadValues({}, props), { children }));
3258
3252
  }
3259
3253
 
3260
3254
  // src/components/Filter.tsx
@@ -3549,9 +3543,6 @@ var BadgeStyled = styled(import_themes12.Badge, {
3549
3543
  fontFamily: "$default",
3550
3544
  borderRadius: "$sm",
3551
3545
  verticalAlign: "middle",
3552
- "svg": {
3553
- marginRight: "10px"
3554
- },
3555
3546
  variants: {
3556
3547
  color: {
3557
3548
  primary: {
@@ -9259,10 +9250,176 @@ function Tooltip({
9259
9250
  ] }) });
9260
9251
  }
9261
9252
 
9262
- // src/components/Grid.tsx
9253
+ // src/components/MultiSelect.tsx
9263
9254
  var import_themes19 = require("@radix-ui/themes");
9255
+ var import_react_fontawesome2 = require("@fortawesome/react-fontawesome");
9256
+ var import_free_solid_svg_icons2 = require("@fortawesome/free-solid-svg-icons");
9257
+ var import_react14 = require("react");
9258
+ var import_react15 = __toESM(require("react"));
9264
9259
  var import_jsx_runtime26 = require("react/jsx-runtime");
9265
- var GridStyled = styled(import_themes19.Grid, {
9260
+ var StyledContent = styled(import_themes19.DropdownMenu.Content, {
9261
+ backgroundColor: "$dark50",
9262
+ borderRadius: "$sm",
9263
+ padding: "$8 0",
9264
+ boxShadow: "0px 2px 4px 0px #23354329, 0px 4px 4px 0px #23354314",
9265
+ boxSizing: "border-box",
9266
+ border: "1px solid $dark300"
9267
+ });
9268
+ var StyledTrigger = styled("div", {
9269
+ minHeight: "40px",
9270
+ borderRadius: "$sm",
9271
+ cursor: "pointer",
9272
+ display: "flex",
9273
+ justifyContent: "start",
9274
+ alignItems: "center",
9275
+ padding: "$6 $14",
9276
+ boxSizing: "border-box",
9277
+ gap: "4px",
9278
+ variants: {
9279
+ color: {
9280
+ default: {
9281
+ border: "1px solid $dark300"
9282
+ },
9283
+ error: {
9284
+ border: "1px solid $error400"
9285
+ }
9286
+ }
9287
+ },
9288
+ defaultVariants: {
9289
+ color: "default"
9290
+ }
9291
+ });
9292
+ var itemStyle = {
9293
+ padding: "$4 $16",
9294
+ minHeight: "$32",
9295
+ boxSizing: "border-box",
9296
+ backgroundColor: "$dark50",
9297
+ display: "block",
9298
+ "&:hover": {
9299
+ backgroundColor: "$dark100"
9300
+ }
9301
+ };
9302
+ var BadgeWrapper = styled("div", {
9303
+ flex: "1",
9304
+ display: "flex",
9305
+ justifyContent: "start",
9306
+ flexWrap: "wrap",
9307
+ gap: "4px"
9308
+ });
9309
+ var BadgeCloseBtn = styled("div", {
9310
+ borderRadius: "100%",
9311
+ width: "16px",
9312
+ height: "16px",
9313
+ minWidth: "16px",
9314
+ minHeight: "16px",
9315
+ display: "flex",
9316
+ justifyContent: "center",
9317
+ alignItems: "center",
9318
+ "&:hover": {
9319
+ backgroundColor: "$dark600"
9320
+ }
9321
+ });
9322
+ var MultiSelect = import_react15.default.forwardRef(
9323
+ ({
9324
+ placeholder,
9325
+ value: selectedValues = [],
9326
+ onValueChange,
9327
+ options,
9328
+ color,
9329
+ width = "100%",
9330
+ zIndex = "auto"
9331
+ }, fowardedRef) => {
9332
+ var _a;
9333
+ const [isOpen, setIsOpen] = (0, import_react14.useState)(false);
9334
+ const triggerRef = (0, import_react14.useRef)(null);
9335
+ const labelByValue = (0, import_react14.useMemo)(() => {
9336
+ return options.reduce((prev, curr) => {
9337
+ return __spreadProps(__spreadValues({}, prev), {
9338
+ [curr.value]: curr.label
9339
+ });
9340
+ }, {});
9341
+ }, [options]);
9342
+ const handleRemove = (0, import_react14.useCallback)(
9343
+ (value) => {
9344
+ const newValue = selectedValues.filter((v) => v !== value);
9345
+ onValueChange == null ? void 0 : onValueChange(newValue);
9346
+ },
9347
+ [selectedValues, onValueChange]
9348
+ );
9349
+ const menuWidth = (_a = triggerRef.current) == null ? void 0 : _a.offsetWidth;
9350
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_themes19.Theme, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_themes19.DropdownMenu.Root, { open: isOpen, onOpenChange: () => setIsOpen(false), children: [
9351
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_themes19.DropdownMenu.Trigger, { onClick: () => setIsOpen(true), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
9352
+ StyledTrigger,
9353
+ {
9354
+ css: {
9355
+ width
9356
+ },
9357
+ ref: (r) => {
9358
+ if (!r) return;
9359
+ triggerRef.current = r;
9360
+ if (fowardedRef) {
9361
+ if (typeof fowardedRef === "function") fowardedRef(r);
9362
+ else {
9363
+ fowardedRef.current = r;
9364
+ }
9365
+ }
9366
+ },
9367
+ color,
9368
+ children: [
9369
+ selectedValues.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { typography: "labelMedium", css: { flex: 1 }, children: placeholder != null ? placeholder : "Selecione" }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(BadgeWrapper, { children: selectedValues.map((value) => {
9370
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Badge, { size: "sm", color: "dark", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Flex2, { justify: "between", align: "center", children: [
9371
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { typography: "badgeSmall", color: "dark100", children: labelByValue[value] }),
9372
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9373
+ BadgeCloseBtn,
9374
+ {
9375
+ onClick: (e) => {
9376
+ e.stopPropagation();
9377
+ handleRemove(value);
9378
+ },
9379
+ role: "button",
9380
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_fontawesome2.FontAwesomeIcon, { icon: import_free_solid_svg_icons2.faX, size: "xs" })
9381
+ }
9382
+ )
9383
+ ] }) }, value);
9384
+ }) }),
9385
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9386
+ import_react_fontawesome2.FontAwesomeIcon,
9387
+ {
9388
+ icon: isOpen ? import_free_solid_svg_icons2.faChevronUp : import_free_solid_svg_icons2.faChevronDown,
9389
+ size: "sm",
9390
+ color: colors.dark600
9391
+ }
9392
+ )
9393
+ ]
9394
+ }
9395
+ ) }),
9396
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9397
+ StyledContent,
9398
+ {
9399
+ css: {
9400
+ width: menuWidth ? menuWidth + "px" : width,
9401
+ zIndex
9402
+ },
9403
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9404
+ CheckboxGroup,
9405
+ {
9406
+ value: selectedValues,
9407
+ onValueChange: (v) => {
9408
+ onValueChange == null ? void 0 : onValueChange(v);
9409
+ },
9410
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Flex2, { direction: "column", gap: 8, children: options.map(({ value, label }, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CheckboxItem, { value, css: itemStyle, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { typography: "labelSmall", children: label }) }, i)) })
9411
+ }
9412
+ )
9413
+ }
9414
+ )
9415
+ ] }) });
9416
+ }
9417
+ );
9418
+
9419
+ // src/components/Grid.tsx
9420
+ var import_themes20 = require("@radix-ui/themes");
9421
+ var import_jsx_runtime27 = require("react/jsx-runtime");
9422
+ var GridStyled = styled(import_themes20.Grid, {
9266
9423
  display: "grid",
9267
9424
  variants: {
9268
9425
  display: {
@@ -9383,13 +9540,13 @@ var GridStyled = styled(import_themes19.Grid, {
9383
9540
  });
9384
9541
  function Grid(_a) {
9385
9542
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
9386
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GridStyled, __spreadProps(__spreadValues({}, props), { children }));
9543
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(GridStyled, __spreadProps(__spreadValues({}, props), { children }));
9387
9544
  }
9388
9545
 
9389
9546
  // src/components/Container.tsx
9390
- var import_themes20 = require("@radix-ui/themes");
9391
- var import_jsx_runtime27 = require("react/jsx-runtime");
9392
- var ContainerStyled = styled(import_themes20.Container, {
9547
+ var import_themes21 = require("@radix-ui/themes");
9548
+ var import_jsx_runtime28 = require("react/jsx-runtime");
9549
+ var ContainerStyled = styled(import_themes21.Container, {
9393
9550
  variants: {
9394
9551
  size: {
9395
9552
  xs: { maxWidth: "576px" },
@@ -9418,13 +9575,13 @@ var ContainerStyled = styled(import_themes20.Container, {
9418
9575
  });
9419
9576
  function Container(_a) {
9420
9577
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
9421
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ContainerStyled, __spreadProps(__spreadValues({}, props), { children }));
9578
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ContainerStyled, __spreadProps(__spreadValues({}, props), { children }));
9422
9579
  }
9423
9580
 
9424
9581
  // src/components/Section.tsx
9425
- var import_themes21 = require("@radix-ui/themes");
9426
- var import_jsx_runtime28 = require("react/jsx-runtime");
9427
- var SectionStyled = styled(import_themes21.Section, {
9582
+ var import_themes22 = require("@radix-ui/themes");
9583
+ var import_jsx_runtime29 = require("react/jsx-runtime");
9584
+ var SectionStyled = styled(import_themes22.Section, {
9428
9585
  variants: {
9429
9586
  size: {
9430
9587
  xs: { maxWidth: "576px" },
@@ -9447,26 +9604,26 @@ var SectionStyled = styled(import_themes21.Section, {
9447
9604
  });
9448
9605
  function Section(_a) {
9449
9606
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
9450
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SectionStyled, __spreadProps(__spreadValues({}, props), { children }));
9607
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SectionStyled, __spreadProps(__spreadValues({}, props), { children }));
9451
9608
  }
9452
9609
 
9453
9610
  // src/components/FormFields/ErrorFormMessage.tsx
9454
- var import_free_solid_svg_icons2 = require("@fortawesome/free-solid-svg-icons");
9455
- var import_react_fontawesome2 = require("@fortawesome/react-fontawesome");
9456
- var import_jsx_runtime29 = require("react/jsx-runtime");
9611
+ var import_free_solid_svg_icons3 = require("@fortawesome/free-solid-svg-icons");
9612
+ var import_react_fontawesome3 = require("@fortawesome/react-fontawesome");
9613
+ var import_jsx_runtime30 = require("react/jsx-runtime");
9457
9614
  var ErrorFormMessage = ({ message: message2 }) => {
9458
9615
  if (!message2) return null;
9459
9616
  if (typeof message2 !== "string") {
9460
9617
  return null;
9461
9618
  }
9462
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Flex2, { justify: "start", align: "center", gap: 6, children: [
9463
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_fontawesome2.FontAwesomeIcon, { icon: import_free_solid_svg_icons2.faXmarkCircle, color: colors.error600, size: "1x" }),
9464
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { typography: "bodyXS", fontWeight: "medium", color: "error600", children: message2 })
9619
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Flex2, { justify: "start", align: "center", gap: 6, children: [
9620
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_fontawesome3.FontAwesomeIcon, { icon: import_free_solid_svg_icons3.faXmarkCircle, color: colors.error600, size: "1x" }),
9621
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { typography: "bodyXS", fontWeight: "medium", color: "error600", children: message2 })
9465
9622
  ] });
9466
9623
  };
9467
9624
 
9468
9625
  // src/components/FormFields/FormLabel.tsx
9469
- var import_jsx_runtime30 = require("react/jsx-runtime");
9626
+ var import_jsx_runtime31 = require("react/jsx-runtime");
9470
9627
  var FormLabel = ({
9471
9628
  name,
9472
9629
  label,
@@ -9474,7 +9631,7 @@ var FormLabel = ({
9474
9631
  required
9475
9632
  }) => {
9476
9633
  if (!label) return null;
9477
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
9634
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
9478
9635
  Text,
9479
9636
  {
9480
9637
  typography: "labelMedium",
@@ -9483,7 +9640,7 @@ var FormLabel = ({
9483
9640
  id: `${name}-label`,
9484
9641
  children: [
9485
9642
  label,
9486
- !required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "dark500", children: " (opcional)" })
9643
+ !required && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { color: "dark500", children: " (opcional)" })
9487
9644
  ]
9488
9645
  }
9489
9646
  );
@@ -9491,7 +9648,7 @@ var FormLabel = ({
9491
9648
 
9492
9649
  // src/components/FormFields/TextAreaFormField.tsx
9493
9650
  var import_react_hook_form = require("react-hook-form");
9494
- var import_jsx_runtime31 = require("react/jsx-runtime");
9651
+ var import_jsx_runtime32 = require("react/jsx-runtime");
9495
9652
  var TextAreaFormField = ({
9496
9653
  name,
9497
9654
  label,
@@ -9505,8 +9662,8 @@ var TextAreaFormField = ({
9505
9662
  } = (0, import_react_hook_form.useFormContext)();
9506
9663
  const haveError = !!errors[name];
9507
9664
  const errorMsg = (_a = errors[name]) == null ? void 0 : _a.message;
9508
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Flex2, { direction: "column", children: [
9509
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
9665
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Flex2, { direction: "column", children: [
9666
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
9510
9667
  FormLabel,
9511
9668
  {
9512
9669
  name,
@@ -9515,7 +9672,7 @@ var TextAreaFormField = ({
9515
9672
  haveError
9516
9673
  }
9517
9674
  ),
9518
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
9675
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
9519
9676
  TextareaField,
9520
9677
  __spreadProps(__spreadValues({}, register(name, { required })), {
9521
9678
  placeholder,
@@ -9523,13 +9680,13 @@ var TextAreaFormField = ({
9523
9680
  "aria-labelledby": `${name}-label`
9524
9681
  })
9525
9682
  ),
9526
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ErrorFormMessage, { message: errorMsg })
9683
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ErrorFormMessage, { message: errorMsg })
9527
9684
  ] });
9528
9685
  };
9529
9686
 
9530
9687
  // src/components/FormFields/TextFormField.tsx
9531
9688
  var import_react_hook_form2 = require("react-hook-form");
9532
- var import_jsx_runtime32 = require("react/jsx-runtime");
9689
+ var import_jsx_runtime33 = require("react/jsx-runtime");
9533
9690
  var TextFormField = ({
9534
9691
  name,
9535
9692
  label,
@@ -9543,8 +9700,8 @@ var TextFormField = ({
9543
9700
  } = (0, import_react_hook_form2.useFormContext)();
9544
9701
  const haveError = !!errors[name];
9545
9702
  const errorMsg = (_a = errors[name]) == null ? void 0 : _a.message;
9546
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Flex2, { direction: "column", children: [
9547
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
9703
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Flex2, { direction: "column", children: [
9704
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9548
9705
  FormLabel,
9549
9706
  {
9550
9707
  name,
@@ -9553,7 +9710,7 @@ var TextFormField = ({
9553
9710
  haveError
9554
9711
  }
9555
9712
  ),
9556
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
9713
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9557
9714
  TextField,
9558
9715
  __spreadProps(__spreadValues({}, register(name, { required })), {
9559
9716
  placeholder,
@@ -9561,18 +9718,71 @@ var TextFormField = ({
9561
9718
  "aria-labelledby": `${name}-label`
9562
9719
  })
9563
9720
  ),
9564
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ErrorFormMessage, { message: errorMsg })
9721
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ErrorFormMessage, { message: errorMsg })
9565
9722
  ] });
9566
9723
  };
9567
9724
 
9568
9725
  // src/components/FormFields/Form.tsx
9569
9726
  var import_react_hook_form3 = require("react-hook-form");
9570
- var import_jsx_runtime33 = require("react/jsx-runtime");
9727
+ var import_jsx_runtime34 = require("react/jsx-runtime");
9571
9728
  var Form = (_a) => {
9572
9729
  var _b = _a, { onSubmit, children } = _b, props = __objRest(_b, ["onSubmit", "children"]);
9573
9730
  const methods = (0, import_react_hook_form3.useForm)(props);
9574
9731
  const { handleSubmit } = methods;
9575
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_hook_form3.FormProvider, __spreadProps(__spreadValues({}, methods), { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("form", { onSubmit: handleSubmit(onSubmit), children }) }));
9732
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_hook_form3.FormProvider, __spreadProps(__spreadValues({}, methods), { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("form", { onSubmit: handleSubmit(onSubmit), children }) }));
9733
+ };
9734
+
9735
+ // src/components/FormFields/MultiSelectFormField.tsx
9736
+ var import_react_hook_form4 = require("react-hook-form");
9737
+ var import_jsx_runtime35 = require("react/jsx-runtime");
9738
+ var MultiSelectFormField = (_a) => {
9739
+ var _b = _a, {
9740
+ name,
9741
+ label,
9742
+ required
9743
+ } = _b, rest = __objRest(_b, [
9744
+ "name",
9745
+ "label",
9746
+ "required"
9747
+ ]);
9748
+ var _a2;
9749
+ const {
9750
+ formState: { errors }
9751
+ } = (0, import_react_hook_form4.useFormContext)();
9752
+ const { field } = (0, import_react_hook_form4.useController)({
9753
+ name,
9754
+ rules: {
9755
+ required
9756
+ },
9757
+ defaultValue: []
9758
+ });
9759
+ const { value, onChange, ref, onBlur, disabled } = field;
9760
+ const haveError = !!errors[name];
9761
+ const errorMsg = (_a2 = errors[name]) == null ? void 0 : _a2.message;
9762
+ const handleChange = (v) => {
9763
+ onChange(v);
9764
+ };
9765
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Flex2, { direction: "column", children: [
9766
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9767
+ FormLabel,
9768
+ {
9769
+ name,
9770
+ label,
9771
+ required,
9772
+ haveError
9773
+ }
9774
+ ),
9775
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9776
+ MultiSelect,
9777
+ __spreadValues({
9778
+ value,
9779
+ onValueChange: handleChange,
9780
+ ref,
9781
+ color: haveError ? "error" : "default"
9782
+ }, rest)
9783
+ ),
9784
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ErrorFormMessage, { message: errorMsg })
9785
+ ] });
9576
9786
  };
9577
9787
  // Annotate the CommonJS export names for ESM import in node:
9578
9788
  0 && (module.exports = {
@@ -9618,6 +9828,8 @@ var Form = (_a) => {
9618
9828
  InputStyled,
9619
9829
  MenuDropdown,
9620
9830
  Modal,
9831
+ MultiSelect,
9832
+ MultiSelectFormField,
9621
9833
  RadioGroup,
9622
9834
  RadioGroupStyled,
9623
9835
  RadioItem,