@lets-events/react 11.3.0 → 11.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 (58) hide show
  1. package/.eslintrc.json +2 -2
  2. package/.turbo/turbo-build.log +18 -20
  3. package/CHANGELOG.md +6 -0
  4. package/dist/index.d.mts +967 -207
  5. package/dist/index.d.ts +967 -207
  6. package/dist/index.js +265 -54
  7. package/dist/index.mjs +261 -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 +65 -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 +216 -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.mjs CHANGED
@@ -1557,7 +1557,6 @@ import { jsx as jsx2 } from "react/jsx-runtime";
1557
1557
  var TextStyle = styled(TextRadix, {
1558
1558
  fontFamily: "$default",
1559
1559
  lineHeight: "$base",
1560
- color: "$grey950",
1561
1560
  variants: {
1562
1561
  typography: typographyValues,
1563
1562
  fontWeight: {
@@ -1574,7 +1573,7 @@ function Text(_a) {
1574
1573
  TextStyle,
1575
1574
  __spreadProps(__spreadValues({}, props), {
1576
1575
  css: __spreadValues({
1577
- color: color ? "$" + color : "$grey950"
1576
+ color: color ? "$" + color : "$dark600"
1578
1577
  }, props.css)
1579
1578
  })
1580
1579
  );
@@ -2986,10 +2985,10 @@ import { CheckboxGroup as CheckboxGroupRadix } from "@radix-ui/themes";
2986
2985
  import { jsx as jsx9 } from "react/jsx-runtime";
2987
2986
  var CheckboxGroupStyled = styled(CheckboxGroupRadix.Root, {
2988
2987
  fontFamily: "$default",
2989
- "svg": {
2988
+ svg: {
2990
2989
  display: "none"
2991
2990
  },
2992
- "label": {
2991
+ label: {
2993
2992
  display: "flex",
2994
2993
  alignItems: "center",
2995
2994
  gap: "$8",
@@ -3032,7 +3031,7 @@ var CheckboxGroupStyled = styled(CheckboxGroupRadix.Root, {
3032
3031
  variants: {
3033
3032
  color: {
3034
3033
  success: {
3035
- "label": {
3034
+ label: {
3036
3035
  "&:focus button, &:hover button": {
3037
3036
  boxShadow: "0px 0px 0px 4px rgba(38, 167, 67, 0.50)"
3038
3037
  }
@@ -3047,7 +3046,7 @@ var CheckboxGroupStyled = styled(CheckboxGroupRadix.Root, {
3047
3046
  },
3048
3047
  blue: {},
3049
3048
  error: {
3050
- "label": {
3049
+ label: {
3051
3050
  "&:focus button, &:hover button": {
3052
3051
  boxShadow: "0px 0px 0px 4px rgba(225, 86, 98, 0.50)"
3053
3052
  }
@@ -3063,7 +3062,7 @@ var CheckboxGroupStyled = styled(CheckboxGroupRadix.Root, {
3063
3062
  },
3064
3063
  disabled: {
3065
3064
  true: {
3066
- "label": {
3065
+ label: {
3067
3066
  cursor: "not-allowed",
3068
3067
  opacity: 0.5,
3069
3068
  "&:focus button, &:hover button": {
@@ -3089,7 +3088,7 @@ var CheckboxGroupStyled = styled(CheckboxGroupRadix.Root, {
3089
3088
  color: "blue",
3090
3089
  disabled: false,
3091
3090
  css: {
3092
- "label": {
3091
+ label: {
3093
3092
  "&:focus button, &:hover button": {
3094
3093
  boxShadow: "0px 0px 0px 4px rgba(56, 129, 255, 0.50)"
3095
3094
  }
@@ -3147,21 +3146,14 @@ var CheckboxGroupStyled = styled(CheckboxGroupRadix.Root, {
3147
3146
  disabled: false
3148
3147
  }
3149
3148
  });
3149
+ var StyledItem = styled(CheckboxGroupRadix.Item, {});
3150
3150
  function CheckboxGroup(_a) {
3151
- var _b = _a, {
3152
- children
3153
- } = _b, props = __objRest(_b, [
3154
- "children"
3155
- ]);
3151
+ var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
3156
3152
  return /* @__PURE__ */ jsx9(CheckboxGroupStyled, __spreadProps(__spreadValues({}, props), { children }));
3157
3153
  }
3158
3154
  function CheckboxItem(_a) {
3159
- var _b = _a, {
3160
- children
3161
- } = _b, props = __objRest(_b, [
3162
- "children"
3163
- ]);
3164
- return /* @__PURE__ */ jsx9(CheckboxGroupRadix.Item, __spreadProps(__spreadValues({}, props), { children }));
3155
+ var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
3156
+ return /* @__PURE__ */ jsx9(StyledItem, __spreadProps(__spreadValues({}, props), { children }));
3165
3157
  }
3166
3158
 
3167
3159
  // src/components/Filter.tsx
@@ -3456,9 +3448,6 @@ var BadgeStyled = styled(BadgeRadix, {
3456
3448
  fontFamily: "$default",
3457
3449
  borderRadius: "$sm",
3458
3450
  verticalAlign: "middle",
3459
- "svg": {
3460
- marginRight: "10px"
3461
- },
3462
3451
  variants: {
3463
3452
  color: {
3464
3453
  primary: {
@@ -9166,9 +9155,178 @@ function Tooltip({
9166
9155
  ] }) });
9167
9156
  }
9168
9157
 
9158
+ // src/components/MultiSelect.tsx
9159
+ import { DropdownMenu as DropdownMenu3, Theme as Theme4 } from "@radix-ui/themes";
9160
+ import { FontAwesomeIcon as FontAwesomeIcon2 } from "@fortawesome/react-fontawesome";
9161
+ import {
9162
+ faChevronDown,
9163
+ faChevronUp,
9164
+ faX
9165
+ } from "@fortawesome/free-solid-svg-icons";
9166
+ import { useCallback as useCallback2, useMemo, useRef as useRef4, useState as useState6 } from "react";
9167
+ import React7 from "react";
9168
+ import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
9169
+ var StyledContent = styled(DropdownMenu3.Content, {
9170
+ backgroundColor: "$dark50",
9171
+ borderRadius: "$sm",
9172
+ padding: "$8 0",
9173
+ boxShadow: "0px 2px 4px 0px #23354329, 0px 4px 4px 0px #23354314",
9174
+ boxSizing: "border-box",
9175
+ border: "1px solid $dark300"
9176
+ });
9177
+ var StyledTrigger = styled("div", {
9178
+ minHeight: "40px",
9179
+ borderRadius: "$sm",
9180
+ cursor: "pointer",
9181
+ display: "flex",
9182
+ justifyContent: "start",
9183
+ alignItems: "center",
9184
+ padding: "$6 $14",
9185
+ boxSizing: "border-box",
9186
+ gap: "4px",
9187
+ variants: {
9188
+ color: {
9189
+ default: {
9190
+ border: "1px solid $dark300"
9191
+ },
9192
+ error: {
9193
+ border: "1px solid $error400"
9194
+ }
9195
+ }
9196
+ },
9197
+ defaultVariants: {
9198
+ color: "default"
9199
+ }
9200
+ });
9201
+ var itemStyle = {
9202
+ padding: "$4 $16",
9203
+ minHeight: "$32",
9204
+ height: "32px",
9205
+ boxSizing: "border-box",
9206
+ backgroundColor: "$dark50",
9207
+ display: "block",
9208
+ "&:hover": {
9209
+ backgroundColor: "$dark100"
9210
+ }
9211
+ };
9212
+ var BadgeWrapper = styled("div", {
9213
+ flex: "1",
9214
+ display: "flex",
9215
+ justifyContent: "start",
9216
+ flexWrap: "wrap",
9217
+ gap: "4px"
9218
+ });
9219
+ var BadgeCloseBtn = styled("div", {
9220
+ borderRadius: "100%",
9221
+ width: "16px",
9222
+ height: "16px",
9223
+ minWidth: "16px",
9224
+ minHeight: "16px",
9225
+ display: "flex",
9226
+ justifyContent: "center",
9227
+ alignItems: "center",
9228
+ "&:hover": {
9229
+ backgroundColor: "$dark600"
9230
+ }
9231
+ });
9232
+ var MultiSelect = React7.forwardRef(
9233
+ ({
9234
+ placeholder,
9235
+ value: selectedValues = [],
9236
+ onValueChange,
9237
+ options,
9238
+ color,
9239
+ width = "100%"
9240
+ }, fowardedRef) => {
9241
+ var _a;
9242
+ const [isOpen, setIsOpen] = useState6(false);
9243
+ const triggerRef = useRef4(null);
9244
+ const labelByValue = useMemo(() => {
9245
+ return options.reduce((prev, curr) => {
9246
+ return __spreadProps(__spreadValues({}, prev), {
9247
+ [curr.value]: curr.label
9248
+ });
9249
+ }, {});
9250
+ }, [options]);
9251
+ const handleRemove = useCallback2(
9252
+ (value) => {
9253
+ const newValue = selectedValues.filter((v) => v !== value);
9254
+ onValueChange == null ? void 0 : onValueChange(newValue);
9255
+ },
9256
+ [selectedValues, onValueChange]
9257
+ );
9258
+ const menuWidth = (_a = triggerRef.current) == null ? void 0 : _a.offsetWidth;
9259
+ return /* @__PURE__ */ jsx26(Theme4, { children: /* @__PURE__ */ jsxs14(DropdownMenu3.Root, { open: isOpen, onOpenChange: () => setIsOpen(false), children: [
9260
+ /* @__PURE__ */ jsx26(DropdownMenu3.Trigger, { onClick: () => setIsOpen(true), children: /* @__PURE__ */ jsxs14(
9261
+ StyledTrigger,
9262
+ {
9263
+ css: {
9264
+ width
9265
+ },
9266
+ ref: (r) => {
9267
+ if (!r) return;
9268
+ triggerRef.current = r;
9269
+ if (fowardedRef) {
9270
+ if (typeof fowardedRef === "function") fowardedRef(r);
9271
+ else {
9272
+ fowardedRef.current = r;
9273
+ }
9274
+ }
9275
+ },
9276
+ color,
9277
+ children: [
9278
+ selectedValues.length === 0 ? /* @__PURE__ */ jsx26(Text, { typography: "labelMedium", css: { flex: 1 }, children: placeholder != null ? placeholder : "Selecione" }) : /* @__PURE__ */ jsx26(BadgeWrapper, { children: selectedValues.map((value) => {
9279
+ return /* @__PURE__ */ jsx26(Badge, { size: "sm", color: "dark", children: /* @__PURE__ */ jsxs14(Flex2, { justify: "between", align: "center", children: [
9280
+ /* @__PURE__ */ jsx26(Text, { typography: "badgeSmall", color: "dark100", children: labelByValue[value] }),
9281
+ /* @__PURE__ */ jsx26(
9282
+ BadgeCloseBtn,
9283
+ {
9284
+ onClick: (e) => {
9285
+ e.stopPropagation();
9286
+ handleRemove(value);
9287
+ },
9288
+ role: "button",
9289
+ children: /* @__PURE__ */ jsx26(FontAwesomeIcon2, { icon: faX, size: "xs" })
9290
+ }
9291
+ )
9292
+ ] }) }, value);
9293
+ }) }),
9294
+ /* @__PURE__ */ jsx26(
9295
+ FontAwesomeIcon2,
9296
+ {
9297
+ icon: isOpen ? faChevronUp : faChevronDown,
9298
+ size: "sm",
9299
+ color: colors.dark600
9300
+ }
9301
+ )
9302
+ ]
9303
+ }
9304
+ ) }),
9305
+ /* @__PURE__ */ jsx26(
9306
+ StyledContent,
9307
+ {
9308
+ css: {
9309
+ width: menuWidth ? menuWidth + "px" : width
9310
+ },
9311
+ children: /* @__PURE__ */ jsx26(
9312
+ CheckboxGroup,
9313
+ {
9314
+ value: selectedValues,
9315
+ onValueChange: (v) => {
9316
+ onValueChange == null ? void 0 : onValueChange(v);
9317
+ },
9318
+ children: /* @__PURE__ */ jsx26(Flex2, { direction: "column", gap: 8, children: options.map(({ value, label }, i) => /* @__PURE__ */ jsx26(CheckboxItem, { value, css: itemStyle, children: /* @__PURE__ */ jsx26(Text, { typography: "labelSmall", children: label }) }, i)) })
9319
+ }
9320
+ )
9321
+ }
9322
+ )
9323
+ ] }) });
9324
+ }
9325
+ );
9326
+
9169
9327
  // src/components/Grid.tsx
9170
9328
  import { Grid as GridRadix } from "@radix-ui/themes";
9171
- import { jsx as jsx26 } from "react/jsx-runtime";
9329
+ import { jsx as jsx27 } from "react/jsx-runtime";
9172
9330
  var GridStyled = styled(GridRadix, {
9173
9331
  display: "grid",
9174
9332
  variants: {
@@ -9290,12 +9448,12 @@ var GridStyled = styled(GridRadix, {
9290
9448
  });
9291
9449
  function Grid(_a) {
9292
9450
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
9293
- return /* @__PURE__ */ jsx26(GridStyled, __spreadProps(__spreadValues({}, props), { children }));
9451
+ return /* @__PURE__ */ jsx27(GridStyled, __spreadProps(__spreadValues({}, props), { children }));
9294
9452
  }
9295
9453
 
9296
9454
  // src/components/Container.tsx
9297
9455
  import { Container as ContainerRadix } from "@radix-ui/themes";
9298
- import { jsx as jsx27 } from "react/jsx-runtime";
9456
+ import { jsx as jsx28 } from "react/jsx-runtime";
9299
9457
  var ContainerStyled = styled(ContainerRadix, {
9300
9458
  variants: {
9301
9459
  size: {
@@ -9325,12 +9483,12 @@ var ContainerStyled = styled(ContainerRadix, {
9325
9483
  });
9326
9484
  function Container(_a) {
9327
9485
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
9328
- return /* @__PURE__ */ jsx27(ContainerStyled, __spreadProps(__spreadValues({}, props), { children }));
9486
+ return /* @__PURE__ */ jsx28(ContainerStyled, __spreadProps(__spreadValues({}, props), { children }));
9329
9487
  }
9330
9488
 
9331
9489
  // src/components/Section.tsx
9332
9490
  import { Section as SectionRadix } from "@radix-ui/themes";
9333
- import { jsx as jsx28 } from "react/jsx-runtime";
9491
+ import { jsx as jsx29 } from "react/jsx-runtime";
9334
9492
  var SectionStyled = styled(SectionRadix, {
9335
9493
  variants: {
9336
9494
  size: {
@@ -9354,26 +9512,26 @@ var SectionStyled = styled(SectionRadix, {
9354
9512
  });
9355
9513
  function Section(_a) {
9356
9514
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
9357
- return /* @__PURE__ */ jsx28(SectionStyled, __spreadProps(__spreadValues({}, props), { children }));
9515
+ return /* @__PURE__ */ jsx29(SectionStyled, __spreadProps(__spreadValues({}, props), { children }));
9358
9516
  }
9359
9517
 
9360
9518
  // src/components/FormFields/ErrorFormMessage.tsx
9361
9519
  import { faXmarkCircle } from "@fortawesome/free-solid-svg-icons";
9362
- import { FontAwesomeIcon as FontAwesomeIcon2 } from "@fortawesome/react-fontawesome";
9363
- import { jsx as jsx29, jsxs as jsxs14 } from "react/jsx-runtime";
9520
+ import { FontAwesomeIcon as FontAwesomeIcon3 } from "@fortawesome/react-fontawesome";
9521
+ import { jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
9364
9522
  var ErrorFormMessage = ({ message: message2 }) => {
9365
9523
  if (!message2) return null;
9366
9524
  if (typeof message2 !== "string") {
9367
9525
  return null;
9368
9526
  }
9369
- return /* @__PURE__ */ jsxs14(Flex2, { justify: "start", align: "center", gap: 6, children: [
9370
- /* @__PURE__ */ jsx29(FontAwesomeIcon2, { icon: faXmarkCircle, color: colors.error600, size: "1x" }),
9371
- /* @__PURE__ */ jsx29(Text, { typography: "bodyXS", fontWeight: "medium", color: "error600", children: message2 })
9527
+ return /* @__PURE__ */ jsxs15(Flex2, { justify: "start", align: "center", gap: 6, children: [
9528
+ /* @__PURE__ */ jsx30(FontAwesomeIcon3, { icon: faXmarkCircle, color: colors.error600, size: "1x" }),
9529
+ /* @__PURE__ */ jsx30(Text, { typography: "bodyXS", fontWeight: "medium", color: "error600", children: message2 })
9372
9530
  ] });
9373
9531
  };
9374
9532
 
9375
9533
  // src/components/FormFields/FormLabel.tsx
9376
- import { jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
9534
+ import { jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
9377
9535
  var FormLabel = ({
9378
9536
  name,
9379
9537
  label,
@@ -9381,7 +9539,7 @@ var FormLabel = ({
9381
9539
  required
9382
9540
  }) => {
9383
9541
  if (!label) return null;
9384
- return /* @__PURE__ */ jsxs15(
9542
+ return /* @__PURE__ */ jsxs16(
9385
9543
  Text,
9386
9544
  {
9387
9545
  typography: "labelMedium",
@@ -9390,7 +9548,7 @@ var FormLabel = ({
9390
9548
  id: `${name}-label`,
9391
9549
  children: [
9392
9550
  label,
9393
- !required && /* @__PURE__ */ jsx30(Text, { color: "dark500", children: " (opcional)" })
9551
+ !required && /* @__PURE__ */ jsx31(Text, { color: "dark500", children: " (opcional)" })
9394
9552
  ]
9395
9553
  }
9396
9554
  );
@@ -9398,7 +9556,7 @@ var FormLabel = ({
9398
9556
 
9399
9557
  // src/components/FormFields/TextAreaFormField.tsx
9400
9558
  import { useFormContext } from "react-hook-form";
9401
- import { jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
9559
+ import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
9402
9560
  var TextAreaFormField = ({
9403
9561
  name,
9404
9562
  label,
@@ -9412,8 +9570,8 @@ var TextAreaFormField = ({
9412
9570
  } = useFormContext();
9413
9571
  const haveError = !!errors[name];
9414
9572
  const errorMsg = (_a = errors[name]) == null ? void 0 : _a.message;
9415
- return /* @__PURE__ */ jsxs16(Flex2, { direction: "column", children: [
9416
- /* @__PURE__ */ jsx31(
9573
+ return /* @__PURE__ */ jsxs17(Flex2, { direction: "column", children: [
9574
+ /* @__PURE__ */ jsx32(
9417
9575
  FormLabel,
9418
9576
  {
9419
9577
  name,
@@ -9422,7 +9580,7 @@ var TextAreaFormField = ({
9422
9580
  haveError
9423
9581
  }
9424
9582
  ),
9425
- /* @__PURE__ */ jsx31(
9583
+ /* @__PURE__ */ jsx32(
9426
9584
  TextareaField,
9427
9585
  __spreadProps(__spreadValues({}, register(name, { required })), {
9428
9586
  placeholder,
@@ -9430,13 +9588,13 @@ var TextAreaFormField = ({
9430
9588
  "aria-labelledby": `${name}-label`
9431
9589
  })
9432
9590
  ),
9433
- /* @__PURE__ */ jsx31(ErrorFormMessage, { message: errorMsg })
9591
+ /* @__PURE__ */ jsx32(ErrorFormMessage, { message: errorMsg })
9434
9592
  ] });
9435
9593
  };
9436
9594
 
9437
9595
  // src/components/FormFields/TextFormField.tsx
9438
9596
  import { useFormContext as useFormContext2 } from "react-hook-form";
9439
- import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
9597
+ import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
9440
9598
  var TextFormField = ({
9441
9599
  name,
9442
9600
  label,
@@ -9450,8 +9608,8 @@ var TextFormField = ({
9450
9608
  } = useFormContext2();
9451
9609
  const haveError = !!errors[name];
9452
9610
  const errorMsg = (_a = errors[name]) == null ? void 0 : _a.message;
9453
- return /* @__PURE__ */ jsxs17(Flex2, { direction: "column", children: [
9454
- /* @__PURE__ */ jsx32(
9611
+ return /* @__PURE__ */ jsxs18(Flex2, { direction: "column", children: [
9612
+ /* @__PURE__ */ jsx33(
9455
9613
  FormLabel,
9456
9614
  {
9457
9615
  name,
@@ -9460,7 +9618,7 @@ var TextFormField = ({
9460
9618
  haveError
9461
9619
  }
9462
9620
  ),
9463
- /* @__PURE__ */ jsx32(
9621
+ /* @__PURE__ */ jsx33(
9464
9622
  TextField,
9465
9623
  __spreadProps(__spreadValues({}, register(name, { required })), {
9466
9624
  placeholder,
@@ -9468,7 +9626,7 @@ var TextFormField = ({
9468
9626
  "aria-labelledby": `${name}-label`
9469
9627
  })
9470
9628
  ),
9471
- /* @__PURE__ */ jsx32(ErrorFormMessage, { message: errorMsg })
9629
+ /* @__PURE__ */ jsx33(ErrorFormMessage, { message: errorMsg })
9472
9630
  ] });
9473
9631
  };
9474
9632
 
@@ -9477,12 +9635,65 @@ import {
9477
9635
  FormProvider,
9478
9636
  useForm
9479
9637
  } from "react-hook-form";
9480
- import { jsx as jsx33 } from "react/jsx-runtime";
9638
+ import { jsx as jsx34 } from "react/jsx-runtime";
9481
9639
  var Form = (_a) => {
9482
9640
  var _b = _a, { onSubmit, children } = _b, props = __objRest(_b, ["onSubmit", "children"]);
9483
9641
  const methods = useForm(props);
9484
9642
  const { handleSubmit } = methods;
9485
- return /* @__PURE__ */ jsx33(FormProvider, __spreadProps(__spreadValues({}, methods), { children: /* @__PURE__ */ jsx33("form", { onSubmit: handleSubmit(onSubmit), children }) }));
9643
+ return /* @__PURE__ */ jsx34(FormProvider, __spreadProps(__spreadValues({}, methods), { children: /* @__PURE__ */ jsx34("form", { onSubmit: handleSubmit(onSubmit), children }) }));
9644
+ };
9645
+
9646
+ // src/components/FormFields/MultiSelectFormField.tsx
9647
+ import { useController, useFormContext as useFormContext3 } from "react-hook-form";
9648
+ import { jsx as jsx35, jsxs as jsxs19 } from "react/jsx-runtime";
9649
+ var MultiSelectFormField = (_a) => {
9650
+ var _b = _a, {
9651
+ name,
9652
+ label,
9653
+ required
9654
+ } = _b, rest = __objRest(_b, [
9655
+ "name",
9656
+ "label",
9657
+ "required"
9658
+ ]);
9659
+ var _a2;
9660
+ const {
9661
+ formState: { errors }
9662
+ } = useFormContext3();
9663
+ const { field } = useController({
9664
+ name,
9665
+ rules: {
9666
+ required
9667
+ },
9668
+ defaultValue: []
9669
+ });
9670
+ const { value, onChange, ref, onBlur, disabled } = field;
9671
+ const haveError = !!errors[name];
9672
+ const errorMsg = (_a2 = errors[name]) == null ? void 0 : _a2.message;
9673
+ const handleChange = (v) => {
9674
+ onChange(v);
9675
+ };
9676
+ return /* @__PURE__ */ jsxs19(Flex2, { direction: "column", children: [
9677
+ /* @__PURE__ */ jsx35(
9678
+ FormLabel,
9679
+ {
9680
+ name,
9681
+ label,
9682
+ required,
9683
+ haveError
9684
+ }
9685
+ ),
9686
+ /* @__PURE__ */ jsx35(
9687
+ MultiSelect,
9688
+ __spreadValues({
9689
+ value,
9690
+ onValueChange: handleChange,
9691
+ ref,
9692
+ color: haveError ? "error" : "default"
9693
+ }, rest)
9694
+ ),
9695
+ /* @__PURE__ */ jsx35(ErrorFormMessage, { message: errorMsg })
9696
+ ] });
9486
9697
  };
9487
9698
  export {
9488
9699
  Alert,
@@ -9527,6 +9738,8 @@ export {
9527
9738
  InputStyled,
9528
9739
  MenuDropdown,
9529
9740
  Modal,
9741
+ MultiSelect,
9742
+ MultiSelectFormField,
9530
9743
  RadioGroup,
9531
9744
  RadioGroupStyled,
9532
9745
  RadioItem,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lets-events/react",
3
- "version": "11.3.0",
3
+ "version": "11.4.0",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",