@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.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,179 @@ 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
+ boxSizing: "border-box",
9205
+ backgroundColor: "$dark50",
9206
+ display: "block",
9207
+ "&:hover": {
9208
+ backgroundColor: "$dark100"
9209
+ }
9210
+ };
9211
+ var BadgeWrapper = styled("div", {
9212
+ flex: "1",
9213
+ display: "flex",
9214
+ justifyContent: "start",
9215
+ flexWrap: "wrap",
9216
+ gap: "4px"
9217
+ });
9218
+ var BadgeCloseBtn = styled("div", {
9219
+ borderRadius: "100%",
9220
+ width: "16px",
9221
+ height: "16px",
9222
+ minWidth: "16px",
9223
+ minHeight: "16px",
9224
+ display: "flex",
9225
+ justifyContent: "center",
9226
+ alignItems: "center",
9227
+ "&:hover": {
9228
+ backgroundColor: "$dark600"
9229
+ }
9230
+ });
9231
+ var MultiSelect = React7.forwardRef(
9232
+ ({
9233
+ placeholder,
9234
+ value: selectedValues = [],
9235
+ onValueChange,
9236
+ options,
9237
+ color,
9238
+ width = "100%",
9239
+ zIndex = "auto"
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
+ zIndex
9311
+ },
9312
+ children: /* @__PURE__ */ jsx26(
9313
+ CheckboxGroup,
9314
+ {
9315
+ value: selectedValues,
9316
+ onValueChange: (v) => {
9317
+ onValueChange == null ? void 0 : onValueChange(v);
9318
+ },
9319
+ 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)) })
9320
+ }
9321
+ )
9322
+ }
9323
+ )
9324
+ ] }) });
9325
+ }
9326
+ );
9327
+
9169
9328
  // src/components/Grid.tsx
9170
9329
  import { Grid as GridRadix } from "@radix-ui/themes";
9171
- import { jsx as jsx26 } from "react/jsx-runtime";
9330
+ import { jsx as jsx27 } from "react/jsx-runtime";
9172
9331
  var GridStyled = styled(GridRadix, {
9173
9332
  display: "grid",
9174
9333
  variants: {
@@ -9290,12 +9449,12 @@ var GridStyled = styled(GridRadix, {
9290
9449
  });
9291
9450
  function Grid(_a) {
9292
9451
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
9293
- return /* @__PURE__ */ jsx26(GridStyled, __spreadProps(__spreadValues({}, props), { children }));
9452
+ return /* @__PURE__ */ jsx27(GridStyled, __spreadProps(__spreadValues({}, props), { children }));
9294
9453
  }
9295
9454
 
9296
9455
  // src/components/Container.tsx
9297
9456
  import { Container as ContainerRadix } from "@radix-ui/themes";
9298
- import { jsx as jsx27 } from "react/jsx-runtime";
9457
+ import { jsx as jsx28 } from "react/jsx-runtime";
9299
9458
  var ContainerStyled = styled(ContainerRadix, {
9300
9459
  variants: {
9301
9460
  size: {
@@ -9325,12 +9484,12 @@ var ContainerStyled = styled(ContainerRadix, {
9325
9484
  });
9326
9485
  function Container(_a) {
9327
9486
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
9328
- return /* @__PURE__ */ jsx27(ContainerStyled, __spreadProps(__spreadValues({}, props), { children }));
9487
+ return /* @__PURE__ */ jsx28(ContainerStyled, __spreadProps(__spreadValues({}, props), { children }));
9329
9488
  }
9330
9489
 
9331
9490
  // src/components/Section.tsx
9332
9491
  import { Section as SectionRadix } from "@radix-ui/themes";
9333
- import { jsx as jsx28 } from "react/jsx-runtime";
9492
+ import { jsx as jsx29 } from "react/jsx-runtime";
9334
9493
  var SectionStyled = styled(SectionRadix, {
9335
9494
  variants: {
9336
9495
  size: {
@@ -9354,26 +9513,26 @@ var SectionStyled = styled(SectionRadix, {
9354
9513
  });
9355
9514
  function Section(_a) {
9356
9515
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
9357
- return /* @__PURE__ */ jsx28(SectionStyled, __spreadProps(__spreadValues({}, props), { children }));
9516
+ return /* @__PURE__ */ jsx29(SectionStyled, __spreadProps(__spreadValues({}, props), { children }));
9358
9517
  }
9359
9518
 
9360
9519
  // src/components/FormFields/ErrorFormMessage.tsx
9361
9520
  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";
9521
+ import { FontAwesomeIcon as FontAwesomeIcon3 } from "@fortawesome/react-fontawesome";
9522
+ import { jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
9364
9523
  var ErrorFormMessage = ({ message: message2 }) => {
9365
9524
  if (!message2) return null;
9366
9525
  if (typeof message2 !== "string") {
9367
9526
  return null;
9368
9527
  }
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 })
9528
+ return /* @__PURE__ */ jsxs15(Flex2, { justify: "start", align: "center", gap: 6, children: [
9529
+ /* @__PURE__ */ jsx30(FontAwesomeIcon3, { icon: faXmarkCircle, color: colors.error600, size: "1x" }),
9530
+ /* @__PURE__ */ jsx30(Text, { typography: "bodyXS", fontWeight: "medium", color: "error600", children: message2 })
9372
9531
  ] });
9373
9532
  };
9374
9533
 
9375
9534
  // src/components/FormFields/FormLabel.tsx
9376
- import { jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
9535
+ import { jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
9377
9536
  var FormLabel = ({
9378
9537
  name,
9379
9538
  label,
@@ -9381,7 +9540,7 @@ var FormLabel = ({
9381
9540
  required
9382
9541
  }) => {
9383
9542
  if (!label) return null;
9384
- return /* @__PURE__ */ jsxs15(
9543
+ return /* @__PURE__ */ jsxs16(
9385
9544
  Text,
9386
9545
  {
9387
9546
  typography: "labelMedium",
@@ -9390,7 +9549,7 @@ var FormLabel = ({
9390
9549
  id: `${name}-label`,
9391
9550
  children: [
9392
9551
  label,
9393
- !required && /* @__PURE__ */ jsx30(Text, { color: "dark500", children: " (opcional)" })
9552
+ !required && /* @__PURE__ */ jsx31(Text, { color: "dark500", children: " (opcional)" })
9394
9553
  ]
9395
9554
  }
9396
9555
  );
@@ -9398,7 +9557,7 @@ var FormLabel = ({
9398
9557
 
9399
9558
  // src/components/FormFields/TextAreaFormField.tsx
9400
9559
  import { useFormContext } from "react-hook-form";
9401
- import { jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
9560
+ import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
9402
9561
  var TextAreaFormField = ({
9403
9562
  name,
9404
9563
  label,
@@ -9412,8 +9571,8 @@ var TextAreaFormField = ({
9412
9571
  } = useFormContext();
9413
9572
  const haveError = !!errors[name];
9414
9573
  const errorMsg = (_a = errors[name]) == null ? void 0 : _a.message;
9415
- return /* @__PURE__ */ jsxs16(Flex2, { direction: "column", children: [
9416
- /* @__PURE__ */ jsx31(
9574
+ return /* @__PURE__ */ jsxs17(Flex2, { direction: "column", children: [
9575
+ /* @__PURE__ */ jsx32(
9417
9576
  FormLabel,
9418
9577
  {
9419
9578
  name,
@@ -9422,7 +9581,7 @@ var TextAreaFormField = ({
9422
9581
  haveError
9423
9582
  }
9424
9583
  ),
9425
- /* @__PURE__ */ jsx31(
9584
+ /* @__PURE__ */ jsx32(
9426
9585
  TextareaField,
9427
9586
  __spreadProps(__spreadValues({}, register(name, { required })), {
9428
9587
  placeholder,
@@ -9430,13 +9589,13 @@ var TextAreaFormField = ({
9430
9589
  "aria-labelledby": `${name}-label`
9431
9590
  })
9432
9591
  ),
9433
- /* @__PURE__ */ jsx31(ErrorFormMessage, { message: errorMsg })
9592
+ /* @__PURE__ */ jsx32(ErrorFormMessage, { message: errorMsg })
9434
9593
  ] });
9435
9594
  };
9436
9595
 
9437
9596
  // src/components/FormFields/TextFormField.tsx
9438
9597
  import { useFormContext as useFormContext2 } from "react-hook-form";
9439
- import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
9598
+ import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
9440
9599
  var TextFormField = ({
9441
9600
  name,
9442
9601
  label,
@@ -9450,8 +9609,8 @@ var TextFormField = ({
9450
9609
  } = useFormContext2();
9451
9610
  const haveError = !!errors[name];
9452
9611
  const errorMsg = (_a = errors[name]) == null ? void 0 : _a.message;
9453
- return /* @__PURE__ */ jsxs17(Flex2, { direction: "column", children: [
9454
- /* @__PURE__ */ jsx32(
9612
+ return /* @__PURE__ */ jsxs18(Flex2, { direction: "column", children: [
9613
+ /* @__PURE__ */ jsx33(
9455
9614
  FormLabel,
9456
9615
  {
9457
9616
  name,
@@ -9460,7 +9619,7 @@ var TextFormField = ({
9460
9619
  haveError
9461
9620
  }
9462
9621
  ),
9463
- /* @__PURE__ */ jsx32(
9622
+ /* @__PURE__ */ jsx33(
9464
9623
  TextField,
9465
9624
  __spreadProps(__spreadValues({}, register(name, { required })), {
9466
9625
  placeholder,
@@ -9468,7 +9627,7 @@ var TextFormField = ({
9468
9627
  "aria-labelledby": `${name}-label`
9469
9628
  })
9470
9629
  ),
9471
- /* @__PURE__ */ jsx32(ErrorFormMessage, { message: errorMsg })
9630
+ /* @__PURE__ */ jsx33(ErrorFormMessage, { message: errorMsg })
9472
9631
  ] });
9473
9632
  };
9474
9633
 
@@ -9477,12 +9636,65 @@ import {
9477
9636
  FormProvider,
9478
9637
  useForm
9479
9638
  } from "react-hook-form";
9480
- import { jsx as jsx33 } from "react/jsx-runtime";
9639
+ import { jsx as jsx34 } from "react/jsx-runtime";
9481
9640
  var Form = (_a) => {
9482
9641
  var _b = _a, { onSubmit, children } = _b, props = __objRest(_b, ["onSubmit", "children"]);
9483
9642
  const methods = useForm(props);
9484
9643
  const { handleSubmit } = methods;
9485
- return /* @__PURE__ */ jsx33(FormProvider, __spreadProps(__spreadValues({}, methods), { children: /* @__PURE__ */ jsx33("form", { onSubmit: handleSubmit(onSubmit), children }) }));
9644
+ return /* @__PURE__ */ jsx34(FormProvider, __spreadProps(__spreadValues({}, methods), { children: /* @__PURE__ */ jsx34("form", { onSubmit: handleSubmit(onSubmit), children }) }));
9645
+ };
9646
+
9647
+ // src/components/FormFields/MultiSelectFormField.tsx
9648
+ import { useController, useFormContext as useFormContext3 } from "react-hook-form";
9649
+ import { jsx as jsx35, jsxs as jsxs19 } from "react/jsx-runtime";
9650
+ var MultiSelectFormField = (_a) => {
9651
+ var _b = _a, {
9652
+ name,
9653
+ label,
9654
+ required
9655
+ } = _b, rest = __objRest(_b, [
9656
+ "name",
9657
+ "label",
9658
+ "required"
9659
+ ]);
9660
+ var _a2;
9661
+ const {
9662
+ formState: { errors }
9663
+ } = useFormContext3();
9664
+ const { field } = useController({
9665
+ name,
9666
+ rules: {
9667
+ required
9668
+ },
9669
+ defaultValue: []
9670
+ });
9671
+ const { value, onChange, ref, onBlur, disabled } = field;
9672
+ const haveError = !!errors[name];
9673
+ const errorMsg = (_a2 = errors[name]) == null ? void 0 : _a2.message;
9674
+ const handleChange = (v) => {
9675
+ onChange(v);
9676
+ };
9677
+ return /* @__PURE__ */ jsxs19(Flex2, { direction: "column", children: [
9678
+ /* @__PURE__ */ jsx35(
9679
+ FormLabel,
9680
+ {
9681
+ name,
9682
+ label,
9683
+ required,
9684
+ haveError
9685
+ }
9686
+ ),
9687
+ /* @__PURE__ */ jsx35(
9688
+ MultiSelect,
9689
+ __spreadValues({
9690
+ value,
9691
+ onValueChange: handleChange,
9692
+ ref,
9693
+ color: haveError ? "error" : "default"
9694
+ }, rest)
9695
+ ),
9696
+ /* @__PURE__ */ jsx35(ErrorFormMessage, { message: errorMsg })
9697
+ ] });
9486
9698
  };
9487
9699
  export {
9488
9700
  Alert,
@@ -9527,6 +9739,8 @@ export {
9527
9739
  InputStyled,
9528
9740
  MenuDropdown,
9529
9741
  Modal,
9742
+ MultiSelect,
9743
+ MultiSelectFormField,
9530
9744
  RadioGroup,
9531
9745
  RadioGroupStyled,
9532
9746
  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.1",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",