@lets-events/react 11.0.6 → 11.1.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.
package/dist/index.d.ts CHANGED
@@ -12,6 +12,7 @@ import { Colors } from '@lets-events/tokens';
12
12
  import { MaskOptions, format, unformat } from '@react-input/mask';
13
13
  import { Dialog } from 'radix-ui';
14
14
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
15
+ import { FieldError, Merge, FieldErrorsImpl } from 'react-hook-form';
15
16
 
16
17
  interface IconProps extends Omit<FontAwesomeIconProps, "icon" | "size"> {
17
18
  name: IconName;
@@ -11019,9 +11020,379 @@ declare const TextareaFieldStyle: _stitches_react_types_styled_component.StyledC
11019
11020
  transition: "transitions";
11020
11021
  zIndex: "zIndices";
11021
11022
  }, {}>>;
11022
- type TextareaFieldProps = ComponentProps<typeof TextareaFieldStyle> & {
11023
- limit: number;
11024
- };
11023
+ declare const TextareaContainer: _stitches_react_types_styled_component.StyledComponent<"div", {
11024
+ color?: "default" | "error" | undefined;
11025
+ }, {}, _stitches_react_types_css_util.CSS<{}, {
11026
+ colors: {
11027
+ brand50: string;
11028
+ brand100: string;
11029
+ brand200: string;
11030
+ brand300: string;
11031
+ brand400: string;
11032
+ brand500: string;
11033
+ brand600: string;
11034
+ brand700: string;
11035
+ brand800: string;
11036
+ brand900: string;
11037
+ brand950: string;
11038
+ blue50: string;
11039
+ blue100: string;
11040
+ blue200: string;
11041
+ blue300: string;
11042
+ blue400: string;
11043
+ blue500: string;
11044
+ blue600: string;
11045
+ blue700: string;
11046
+ blue800: string;
11047
+ blue900: string;
11048
+ blue950: string;
11049
+ red50: string;
11050
+ red100: string;
11051
+ red200: string;
11052
+ red300: string;
11053
+ red400: string;
11054
+ red500: string;
11055
+ red600: string;
11056
+ red700: string;
11057
+ red800: string;
11058
+ red900: string;
11059
+ red950: string;
11060
+ purple50: string;
11061
+ purple100: string;
11062
+ purple200: string;
11063
+ purple300: string;
11064
+ purple400: string;
11065
+ purple500: string;
11066
+ purple600: string;
11067
+ purple700: string;
11068
+ purple800: string;
11069
+ purple900: string;
11070
+ purple950: string;
11071
+ yellow50: string;
11072
+ yellow100: string;
11073
+ yellow200: string;
11074
+ yellow300: string;
11075
+ yellow400: string;
11076
+ yellow500: string;
11077
+ yellow600: string;
11078
+ yellow700: string;
11079
+ yellow800: string;
11080
+ yellow900: string;
11081
+ yellow950: string;
11082
+ dark50: string;
11083
+ dark100: string;
11084
+ dark200: string;
11085
+ dark300: string;
11086
+ dark400: string;
11087
+ dark500: string;
11088
+ dark600: string;
11089
+ dark700: string;
11090
+ dark800: string;
11091
+ dark900: string;
11092
+ dark950: string;
11093
+ neutral50: string;
11094
+ neutral100: string;
11095
+ neutral200: string;
11096
+ neutral300: string;
11097
+ neutral400: string;
11098
+ neutral500: string;
11099
+ neutral600: string;
11100
+ neutral700: string;
11101
+ neutral800: string;
11102
+ neutral900: string;
11103
+ neutral950: string;
11104
+ green50: string;
11105
+ green100: string;
11106
+ green200: string;
11107
+ green300: string;
11108
+ green400: string;
11109
+ green500: string;
11110
+ green600: string;
11111
+ green700: string;
11112
+ green800: string;
11113
+ green900: string;
11114
+ green950: string;
11115
+ grey50: string;
11116
+ grey100: string;
11117
+ grey200: string;
11118
+ grey300: string;
11119
+ grey400: string;
11120
+ grey500: string;
11121
+ grey600: string;
11122
+ grey700: string;
11123
+ grey800: string;
11124
+ grey900: string;
11125
+ grey950: string;
11126
+ error50: string;
11127
+ error100: string;
11128
+ error200: string;
11129
+ error300: string;
11130
+ error400: string;
11131
+ error500: string;
11132
+ error600: string;
11133
+ error700: string;
11134
+ error800: string;
11135
+ error900: string;
11136
+ error950: string;
11137
+ success50: string;
11138
+ success100: string;
11139
+ success200: string;
11140
+ success300: string;
11141
+ success400: string;
11142
+ success500: string;
11143
+ success600: string;
11144
+ success700: string;
11145
+ success800: string;
11146
+ success900: string;
11147
+ success950: string;
11148
+ warning50: string;
11149
+ warning100: string;
11150
+ warning200: string;
11151
+ warning300: string;
11152
+ warning400: string;
11153
+ warning500: string;
11154
+ warning600: string;
11155
+ warning700: string;
11156
+ warning800: string;
11157
+ warning900: string;
11158
+ warning950: string;
11159
+ info50: string;
11160
+ info100: string;
11161
+ info200: string;
11162
+ info300: string;
11163
+ info400: string;
11164
+ info500: string;
11165
+ info600: string;
11166
+ info700: string;
11167
+ info800: string;
11168
+ info900: string;
11169
+ info950: string;
11170
+ };
11171
+ fontSizes: {
11172
+ 2: string;
11173
+ 4: string;
11174
+ 6: string;
11175
+ 8: string;
11176
+ 10: string;
11177
+ 12: string;
11178
+ 13: string;
11179
+ 14: string;
11180
+ 16: string;
11181
+ 18: string;
11182
+ 20: string;
11183
+ 22: string;
11184
+ 24: string;
11185
+ 32: string;
11186
+ 36: string;
11187
+ 40: string;
11188
+ 48: string;
11189
+ 56: string;
11190
+ 64: string;
11191
+ 72: string;
11192
+ 80: string;
11193
+ xs: string;
11194
+ sm: string;
11195
+ md: string;
11196
+ lg: string;
11197
+ '2xl': string;
11198
+ '3xl': string;
11199
+ '4xl': string;
11200
+ full: string;
11201
+ };
11202
+ fonts: {
11203
+ default: string;
11204
+ };
11205
+ fontWeights: {
11206
+ regular: string;
11207
+ medium: string;
11208
+ semibold: string;
11209
+ bold: string;
11210
+ };
11211
+ lineHeights: {
11212
+ smaller: string;
11213
+ shorter: string;
11214
+ short: string;
11215
+ base: string;
11216
+ tall: string;
11217
+ };
11218
+ radii: {
11219
+ '3xs': string;
11220
+ '2xs': string;
11221
+ xs: string;
11222
+ sm: string;
11223
+ md: string;
11224
+ lg: string;
11225
+ xl: string;
11226
+ '2xl': string;
11227
+ '3xl': string;
11228
+ '4xl': string;
11229
+ '5xl': string;
11230
+ '6xl': string;
11231
+ '7xl': string;
11232
+ '8xl': string;
11233
+ '9xl': string;
11234
+ '10xl': string;
11235
+ '11xl': string;
11236
+ '12xl': string;
11237
+ '13xl': string;
11238
+ '14xl': string;
11239
+ full: string;
11240
+ };
11241
+ space: {
11242
+ 2: string;
11243
+ 4: string;
11244
+ 6: string;
11245
+ 8: string;
11246
+ 10: string;
11247
+ 12: string;
11248
+ 13: string;
11249
+ 14: string;
11250
+ 16: string;
11251
+ 18: string;
11252
+ 20: string;
11253
+ 22: string;
11254
+ 24: string;
11255
+ 32: string;
11256
+ 36: string;
11257
+ 40: string;
11258
+ 48: string;
11259
+ 56: string;
11260
+ 64: string;
11261
+ 72: string;
11262
+ 80: string;
11263
+ full: string;
11264
+ };
11265
+ }, {
11266
+ height: "space";
11267
+ width: "space";
11268
+ gap: "space";
11269
+ gridGap: "space";
11270
+ columnGap: "space";
11271
+ gridColumnGap: "space";
11272
+ rowGap: "space";
11273
+ gridRowGap: "space";
11274
+ inset: "space";
11275
+ insetBlock: "space";
11276
+ insetBlockEnd: "space";
11277
+ insetBlockStart: "space";
11278
+ insetInline: "space";
11279
+ insetInlineEnd: "space";
11280
+ insetInlineStart: "space";
11281
+ margin: "space";
11282
+ marginTop: "space";
11283
+ marginRight: "space";
11284
+ marginBottom: "space";
11285
+ marginLeft: "space";
11286
+ marginBlock: "space";
11287
+ marginBlockEnd: "space";
11288
+ marginBlockStart: "space";
11289
+ marginInline: "space";
11290
+ marginInlineEnd: "space";
11291
+ marginInlineStart: "space";
11292
+ padding: "space";
11293
+ paddingTop: "space";
11294
+ paddingRight: "space";
11295
+ paddingBottom: "space";
11296
+ paddingLeft: "space";
11297
+ paddingBlock: "space";
11298
+ paddingBlockEnd: "space";
11299
+ paddingBlockStart: "space";
11300
+ paddingInline: "space";
11301
+ paddingInlineEnd: "space";
11302
+ paddingInlineStart: "space";
11303
+ scrollMargin: "space";
11304
+ scrollMarginTop: "space";
11305
+ scrollMarginRight: "space";
11306
+ scrollMarginBottom: "space";
11307
+ scrollMarginLeft: "space";
11308
+ scrollMarginBlock: "space";
11309
+ scrollMarginBlockEnd: "space";
11310
+ scrollMarginBlockStart: "space";
11311
+ scrollMarginInline: "space";
11312
+ scrollMarginInlineEnd: "space";
11313
+ scrollMarginInlineStart: "space";
11314
+ scrollPadding: "space";
11315
+ scrollPaddingTop: "space";
11316
+ scrollPaddingRight: "space";
11317
+ scrollPaddingBottom: "space";
11318
+ scrollPaddingLeft: "space";
11319
+ scrollPaddingBlock: "space";
11320
+ scrollPaddingBlockEnd: "space";
11321
+ scrollPaddingBlockStart: "space";
11322
+ scrollPaddingInline: "space";
11323
+ scrollPaddingInlineEnd: "space";
11324
+ scrollPaddingInlineStart: "space";
11325
+ top: "space";
11326
+ right: "space";
11327
+ bottom: "space";
11328
+ left: "space";
11329
+ fontSize: "fontSizes";
11330
+ background: "colors";
11331
+ backgroundColor: "colors";
11332
+ backgroundImage: "colors";
11333
+ borderImage: "colors";
11334
+ border: "colors";
11335
+ borderBlock: "colors";
11336
+ borderBlockEnd: "colors";
11337
+ borderBlockStart: "colors";
11338
+ borderBottom: "colors";
11339
+ borderBottomColor: "colors";
11340
+ borderColor: "colors";
11341
+ borderInline: "colors";
11342
+ borderInlineEnd: "colors";
11343
+ borderInlineStart: "colors";
11344
+ borderLeft: "colors";
11345
+ borderLeftColor: "colors";
11346
+ borderRight: "colors";
11347
+ borderRightColor: "colors";
11348
+ borderTop: "colors";
11349
+ borderTopColor: "colors";
11350
+ caretColor: "colors";
11351
+ color: "colors";
11352
+ columnRuleColor: "colors";
11353
+ outline: "colors";
11354
+ outlineColor: "colors";
11355
+ fill: "colors";
11356
+ stroke: "colors";
11357
+ textDecorationColor: "colors";
11358
+ fontFamily: "fonts";
11359
+ fontWeight: "fontWeights";
11360
+ lineHeight: "lineHeights";
11361
+ letterSpacing: "letterSpacings";
11362
+ blockSize: "sizes";
11363
+ minBlockSize: "sizes";
11364
+ maxBlockSize: "sizes";
11365
+ inlineSize: "sizes";
11366
+ minInlineSize: "sizes";
11367
+ maxInlineSize: "sizes";
11368
+ minWidth: "sizes";
11369
+ maxWidth: "sizes";
11370
+ minHeight: "sizes";
11371
+ maxHeight: "sizes";
11372
+ flexBasis: "sizes";
11373
+ gridTemplateColumns: "sizes";
11374
+ gridTemplateRows: "sizes";
11375
+ borderWidth: "borderWidths";
11376
+ borderTopWidth: "borderWidths";
11377
+ borderLeftWidth: "borderWidths";
11378
+ borderRightWidth: "borderWidths";
11379
+ borderBottomWidth: "borderWidths";
11380
+ borderStyle: "borderStyles";
11381
+ borderTopStyle: "borderStyles";
11382
+ borderLeftStyle: "borderStyles";
11383
+ borderRightStyle: "borderStyles";
11384
+ borderBottomStyle: "borderStyles";
11385
+ borderRadius: "radii";
11386
+ borderTopLeftRadius: "radii";
11387
+ borderTopRightRadius: "radii";
11388
+ borderBottomRightRadius: "radii";
11389
+ borderBottomLeftRadius: "radii";
11390
+ boxShadow: "shadows";
11391
+ textShadow: "shadows";
11392
+ transition: "transitions";
11393
+ zIndex: "zIndices";
11394
+ }, {}>>;
11395
+ type TextareaFieldProps = Omit<ComponentProps<typeof TextareaFieldStyle>, "color"> & ComponentProps<typeof TextareaContainer>;
11025
11396
  declare const TextareaField: react__default.ForwardRefExoticComponent<Omit<TextareaFieldProps, "ref"> & react__default.RefAttributes<HTMLTextAreaElement>>;
11026
11397
 
11027
11398
  type ToastType = 'success' | 'error' | 'warning' | 'info';
@@ -12980,4 +13351,33 @@ type SectionProps = ComponentProps<typeof SectionStyled> & {
12980
13351
  };
12981
13352
  declare function Section({ children, ...props }: SectionProps): react_jsx_runtime.JSX.Element;
12982
13353
 
12983
- export { Alert, AlertDialogCompleteStyled, AlertDialogDescriptionStyled, AlertDialogRowStyled, AlertDialogSimpleStyled, AlertDialogSubtitleStyled, AlertDialogTitleStyled, AlertDialoghrStyled, type AlertProps, Avatar, type AvatarProps, AvatarStyled, Badge, type BadgeProps, BadgeStyled, Box, Button, ButtonGroup, type ButtonGroupProps, ButtonGroupStyled, ButtonItem, type ButtonItemProps, ButtonItemStyled, type ButtonProps, Calendar, type CalendarProps, Card, type CardProps, CardStyled, CheckboxGroup, type CheckboxGroupProps, CheckboxGroupStyled, CheckboxItem, type CheckboxItemProps, Container, type ContainerProps, ContainerStyled, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, Filter, FilterItem, type FilterItemProps, type FilterProps, Flex, type FlexProps, FlexStyled, Grid, type GridProps, GridStyled, Icon, InputStyled, Modal, type ModalProps, RadioGroup, type RadioGroupProps, RadioGroupStyled, RadioItem, type RadioItemProps, Section, type SectionProps, SectionStyled, Step, StepContent, StepList, type StepProps, StepStyled, StepTrigger, StepWrapper, Switch, type SwitchProps, SwitchStyled, Text, TextField, type TextFieldProps, TextFieldSlot, type TextFieldSlotProps, TextFieldSlotStyled, TextFieldStyled, type TextProps, TextStyle, TextareaField, type TextareaFieldProps, TextareaFieldStyle, TimePicker, TimePickerButtonStyled, TimePickerDropdownStyled, TimePickerFooterStyled, type TimePickerProps, TimePickerStyled, TimerPickerContentStyled, type Toast, type ToastComponentProps, type ToastConfig, type ToastContextType, ToastItem, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastType, type ToasterShowOptions, Tooltip, TooltipContent, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, maskFormat, maskUnformat, useToast };
13354
+ type ErrorFormMessageProps = {
13355
+ message?: string | FieldError | Merge<FieldError, FieldErrorsImpl<any>> | undefined;
13356
+ };
13357
+ declare const ErrorFormMessage: ({ message }: ErrorFormMessageProps) => react_jsx_runtime.JSX.Element | null | undefined;
13358
+
13359
+ type FormLabelProps = {
13360
+ name: string;
13361
+ label?: string;
13362
+ haveError?: boolean;
13363
+ required?: boolean;
13364
+ };
13365
+ declare const FormLabel: ({ name, label, haveError, required, }: FormLabelProps) => react_jsx_runtime.JSX.Element | null;
13366
+
13367
+ type TextAreaFormFieldProps = {
13368
+ name: string;
13369
+ label?: string;
13370
+ required?: boolean;
13371
+ placeholder?: string;
13372
+ };
13373
+ declare const TextAreaFormField: ({ name, label, required, placeholder, }: TextAreaFormFieldProps) => react_jsx_runtime.JSX.Element;
13374
+
13375
+ type TextFormFieldProps = {
13376
+ name: string;
13377
+ label?: string;
13378
+ required?: boolean;
13379
+ placeholder?: string;
13380
+ };
13381
+ declare const TextFormField: ({ name, label, required, placeholder, }: TextFormFieldProps) => react_jsx_runtime.JSX.Element;
13382
+
13383
+ export { Alert, AlertDialogCompleteStyled, AlertDialogDescriptionStyled, AlertDialogRowStyled, AlertDialogSimpleStyled, AlertDialogSubtitleStyled, AlertDialogTitleStyled, AlertDialoghrStyled, type AlertProps, Avatar, type AvatarProps, AvatarStyled, Badge, type BadgeProps, BadgeStyled, Box, Button, ButtonGroup, type ButtonGroupProps, ButtonGroupStyled, ButtonItem, type ButtonItemProps, ButtonItemStyled, type ButtonProps, Calendar, type CalendarProps, Card, type CardProps, CardStyled, CheckboxGroup, type CheckboxGroupProps, CheckboxGroupStyled, CheckboxItem, type CheckboxItemProps, Container, type ContainerProps, ContainerStyled, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, ErrorFormMessage, type ErrorFormMessageProps, Filter, FilterItem, type FilterItemProps, type FilterProps, Flex, type FlexProps, FlexStyled, FormLabel, type FormLabelProps, Grid, type GridProps, GridStyled, Icon, InputStyled, Modal, type ModalProps, RadioGroup, type RadioGroupProps, RadioGroupStyled, RadioItem, type RadioItemProps, Section, type SectionProps, SectionStyled, Step, StepContent, StepList, type StepProps, StepStyled, StepTrigger, StepWrapper, Switch, type SwitchProps, SwitchStyled, Text, TextAreaFormField, type TextAreaFormFieldProps, TextField, type TextFieldProps, TextFieldSlot, type TextFieldSlotProps, TextFieldSlotStyled, TextFieldStyled, TextFormField, type TextFormFieldProps, type TextProps, TextStyle, TextareaField, type TextareaFieldProps, TextareaFieldStyle, TimePicker, TimePickerButtonStyled, TimePickerDropdownStyled, TimePickerFooterStyled, type TimePickerProps, TimePickerStyled, TimerPickerContentStyled, type Toast, type ToastComponentProps, type ToastConfig, type ToastContextType, ToastItem, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastType, type ToasterShowOptions, Tooltip, TooltipContent, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, maskFormat, maskUnformat, useToast };
package/dist/index.js CHANGED
@@ -1039,10 +1039,12 @@ __export(index_exports, {
1039
1039
  ContainerStyled: () => ContainerStyled,
1040
1040
  DropdownMenu: () => DropdownMenu2,
1041
1041
  DropdownMenuItem: () => DropdownMenuItem,
1042
+ ErrorFormMessage: () => ErrorFormMessage,
1042
1043
  Filter: () => Filter,
1043
1044
  FilterItem: () => FilterItem,
1044
1045
  Flex: () => Flex2,
1045
1046
  FlexStyled: () => FlexStyled,
1047
+ FormLabel: () => FormLabel,
1046
1048
  Grid: () => Grid,
1047
1049
  GridStyled: () => GridStyled,
1048
1050
  Icon: () => Icon,
@@ -1062,10 +1064,12 @@ __export(index_exports, {
1062
1064
  Switch: () => Switch,
1063
1065
  SwitchStyled: () => SwitchStyled,
1064
1066
  Text: () => Text,
1067
+ TextAreaFormField: () => TextAreaFormField,
1065
1068
  TextField: () => TextField,
1066
1069
  TextFieldSlot: () => TextFieldSlot,
1067
1070
  TextFieldSlotStyled: () => TextFieldSlotStyled,
1068
1071
  TextFieldStyled: () => TextFieldStyled,
1072
+ TextFormField: () => TextFormField,
1069
1073
  TextStyle: () => TextStyle,
1070
1074
  TextareaField: () => TextareaField,
1071
1075
  TextareaFieldStyle: () => TextareaFieldStyle,
@@ -2623,14 +2627,14 @@ var TextFieldStyled = styled(import_themes7.TextField.Root, {
2623
2627
  color: {
2624
2628
  default: {
2625
2629
  color: "$dark400",
2626
- border: "1px solid $dark200",
2630
+ border: "1px solid $dark300",
2627
2631
  "&:has(input:focus)": {
2628
2632
  border: "2px solid $brand300"
2629
2633
  },
2630
2634
  "&:has(input:disabled)": {
2631
2635
  backgroundColor: "$dark100",
2632
2636
  color: "$dark400",
2633
- border: "1px solid $dark200",
2637
+ border: "1px solid $dark300",
2634
2638
  cursor: "not-allowed"
2635
2639
  }
2636
2640
  },
@@ -8782,7 +8786,6 @@ var TextareaContainer = styled("div", {
8782
8786
  overflow: "hidden",
8783
8787
  width: "100%",
8784
8788
  border: "1px solid",
8785
- borderColor: "$dark300",
8786
8789
  borderRadius: "$sm",
8787
8790
  "&:has(textarea:focus)": {
8788
8791
  border: "1px solid $brand300"
@@ -8792,6 +8795,19 @@ var TextareaContainer = styled("div", {
8792
8795
  color: "$dark400",
8793
8796
  border: "1px solid $dark200",
8794
8797
  cursor: "not-allowed"
8798
+ },
8799
+ variants: {
8800
+ color: {
8801
+ default: {
8802
+ borderColor: "$dark300"
8803
+ },
8804
+ error: {
8805
+ borderColor: "$error400"
8806
+ }
8807
+ }
8808
+ },
8809
+ defaultVariants: {
8810
+ color: "default"
8795
8811
  }
8796
8812
  });
8797
8813
  var TextareaLimitIndicator = styled("div", {
@@ -8809,7 +8825,7 @@ var TextareaLimitIndicator = styled("div", {
8809
8825
  }
8810
8826
  });
8811
8827
  var TextareaField = import_react8.default.forwardRef((_a, fowardedRef) => {
8812
- var _b = _a, { maxLength } = _b, props = __objRest(_b, ["maxLength"]);
8828
+ var _b = _a, { maxLength, color } = _b, props = __objRest(_b, ["maxLength", "color"]);
8813
8829
  const inputRef = (0, import_react8.useRef)(null);
8814
8830
  const badgeRef = (0, import_react8.useRef)(null);
8815
8831
  const updateCharCountBadge = () => {
@@ -8823,7 +8839,7 @@ var TextareaField = import_react8.default.forwardRef((_a, fowardedRef) => {
8823
8839
  updateCharCountBadge();
8824
8840
  (_a2 = props.onInput) == null ? void 0 : _a2.call(props, e);
8825
8841
  };
8826
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(TextareaContainer, { children: [
8842
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(TextareaContainer, { color, children: [
8827
8843
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
8828
8844
  TextareaFieldStyle,
8829
8845
  __spreadValues({
@@ -9297,6 +9313,121 @@ function Section(_a) {
9297
9313
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
9298
9314
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SectionStyled, __spreadProps(__spreadValues({}, props), { children }));
9299
9315
  }
9316
+
9317
+ // src/components/FormFields/ErrorFormMessage.tsx
9318
+ var import_free_solid_svg_icons2 = require("@fortawesome/free-solid-svg-icons");
9319
+ var import_react_fontawesome2 = require("@fortawesome/react-fontawesome");
9320
+ var import_jsx_runtime27 = require("react/jsx-runtime");
9321
+ var ErrorFormMessage = ({ message: message2 }) => {
9322
+ if (!message2) return;
9323
+ if (typeof message2 !== "string") {
9324
+ return null;
9325
+ }
9326
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Flex2, { justify: "start", align: "center", gap: 6, children: [
9327
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_fontawesome2.FontAwesomeIcon, { icon: import_free_solid_svg_icons2.faXmarkCircle, color: colors.error600, size: "1x" }),
9328
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { typography: "bodyXS", fontWeight: "medium", color: "error600", children: message2 })
9329
+ ] });
9330
+ };
9331
+
9332
+ // src/components/FormFields/FormLabel.tsx
9333
+ var import_jsx_runtime28 = require("react/jsx-runtime");
9334
+ var FormLabel = ({
9335
+ name,
9336
+ label,
9337
+ haveError,
9338
+ required
9339
+ }) => {
9340
+ if (!label) return null;
9341
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
9342
+ Text,
9343
+ {
9344
+ typography: "labelMedium",
9345
+ fontWeight: "medium",
9346
+ color: haveError ? "error600" : "dark700",
9347
+ id: `${name}-label`,
9348
+ children: [
9349
+ label,
9350
+ !required && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: "dark500", children: " (opcional)" })
9351
+ ]
9352
+ }
9353
+ );
9354
+ };
9355
+
9356
+ // src/components/FormFields/TextAreaFormField.tsx
9357
+ var import_react_hook_form = require("react-hook-form");
9358
+ var import_jsx_runtime29 = require("react/jsx-runtime");
9359
+ var TextAreaFormField = ({
9360
+ name,
9361
+ label,
9362
+ required,
9363
+ placeholder
9364
+ }) => {
9365
+ var _a;
9366
+ const {
9367
+ register,
9368
+ formState: { errors }
9369
+ } = (0, import_react_hook_form.useFormContext)();
9370
+ const haveError = !!errors[name];
9371
+ const errorMsg = (_a = errors[name]) == null ? void 0 : _a.message;
9372
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Flex2, { direction: "column", children: [
9373
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
9374
+ FormLabel,
9375
+ {
9376
+ name,
9377
+ label,
9378
+ required,
9379
+ haveError
9380
+ }
9381
+ ),
9382
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
9383
+ TextareaField,
9384
+ __spreadProps(__spreadValues({}, register(name, { required })), {
9385
+ placeholder,
9386
+ color: haveError ? "error" : "default",
9387
+ "aria-labelledby": `${name}-label`
9388
+ })
9389
+ ),
9390
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ErrorFormMessage, { message: errorMsg })
9391
+ ] });
9392
+ };
9393
+
9394
+ // src/components/FormFields/TextFormField.tsx
9395
+ var import_react_hook_form2 = require("react-hook-form");
9396
+ var import_jsx_runtime30 = require("react/jsx-runtime");
9397
+ var TextFormField = ({
9398
+ name,
9399
+ label,
9400
+ required,
9401
+ placeholder
9402
+ }) => {
9403
+ var _a;
9404
+ const {
9405
+ register,
9406
+ formState: { errors }
9407
+ } = (0, import_react_hook_form2.useFormContext)();
9408
+ const haveError = !!errors[name];
9409
+ const errorMsg = (_a = errors[name]) == null ? void 0 : _a.message;
9410
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Flex2, { direction: "column", children: [
9411
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
9412
+ FormLabel,
9413
+ {
9414
+ name,
9415
+ label,
9416
+ required,
9417
+ haveError
9418
+ }
9419
+ ),
9420
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
9421
+ TextField,
9422
+ __spreadProps(__spreadValues({}, register(name, { required })), {
9423
+ placeholder,
9424
+ color: haveError ? "error" : "default",
9425
+ "aria-labelledby": `${name}-label`
9426
+ })
9427
+ ),
9428
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ErrorFormMessage, { message: errorMsg })
9429
+ ] });
9430
+ };
9300
9431
  // Annotate the CommonJS export names for ESM import in node:
9301
9432
  0 && (module.exports = {
9302
9433
  Alert,
@@ -9327,10 +9458,12 @@ function Section(_a) {
9327
9458
  ContainerStyled,
9328
9459
  DropdownMenu,
9329
9460
  DropdownMenuItem,
9461
+ ErrorFormMessage,
9330
9462
  Filter,
9331
9463
  FilterItem,
9332
9464
  Flex,
9333
9465
  FlexStyled,
9466
+ FormLabel,
9334
9467
  Grid,
9335
9468
  GridStyled,
9336
9469
  Icon,
@@ -9350,10 +9483,12 @@ function Section(_a) {
9350
9483
  Switch,
9351
9484
  SwitchStyled,
9352
9485
  Text,
9486
+ TextAreaFormField,
9353
9487
  TextField,
9354
9488
  TextFieldSlot,
9355
9489
  TextFieldSlotStyled,
9356
9490
  TextFieldStyled,
9491
+ TextFormField,
9357
9492
  TextStyle,
9358
9493
  TextareaField,
9359
9494
  TextareaFieldStyle,