@lets-events/react 11.0.6 → 11.2.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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +12 -0
- package/dist/index.d.mts +411 -5
- package/dist/index.d.ts +411 -5
- package/dist/index.js +152 -5
- package/dist/index.mjs +150 -5
- package/package.json +5 -2
- package/src/components/FormFields/ErrorFormMessage.tsx +36 -0
- package/src/components/FormFields/Form.tsx +25 -0
- package/src/components/FormFields/FormLabel.tsx +29 -0
- package/src/components/FormFields/TextAreaFormField.tsx +46 -0
- package/src/components/FormFields/TextFormField.tsx +46 -0
- package/src/components/TextField.tsx +2 -2
- package/src/components/TextareaField.tsx +23 -7
- package/src/index.tsx +33 -26
package/dist/index.d.ts
CHANGED
|
@@ -5,13 +5,14 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import * as _stitches_react_types_styled_component from '@stitches/react/types/styled-component';
|
|
6
6
|
import * as _stitches_react_types_css_util from '@stitches/react/types/css-util';
|
|
7
7
|
import * as react from 'react';
|
|
8
|
-
import react__default, { ComponentProps, ElementType, ReactNode } from 'react';
|
|
8
|
+
import react__default, { ComponentProps, ElementType, ReactNode, JSX } from 'react';
|
|
9
9
|
import * as _radix_ui_themes from '@radix-ui/themes';
|
|
10
10
|
import { TextField as TextField$1, RadioGroup as RadioGroup$1, CheckboxGroup as CheckboxGroup$1, DropdownMenu as DropdownMenu$1, AlertDialog, Switch as Switch$1 } from '@radix-ui/themes';
|
|
11
11
|
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, UseFormProps, SubmitHandler, FieldValues } 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
|
-
|
|
11023
|
-
|
|
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,39 @@ type SectionProps = ComponentProps<typeof SectionStyled> & {
|
|
|
12980
13351
|
};
|
|
12981
13352
|
declare function Section({ children, ...props }: SectionProps): react_jsx_runtime.JSX.Element;
|
|
12982
13353
|
|
|
12983
|
-
|
|
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;
|
|
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
|
+
type FormProps = UseFormProps & {
|
|
13384
|
+
onSubmit: SubmitHandler<FieldValues>;
|
|
13385
|
+
children: JSX.Element;
|
|
13386
|
+
};
|
|
13387
|
+
declare const Form: ({ onSubmit, children, ...props }: FormProps) => react_jsx_runtime.JSX.Element;
|
|
13388
|
+
|
|
13389
|
+
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, Form, FormLabel, type FormLabelProps, type FormProps, 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,13 @@ __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
|
+
Form: () => Form,
|
|
1048
|
+
FormLabel: () => FormLabel,
|
|
1046
1049
|
Grid: () => Grid,
|
|
1047
1050
|
GridStyled: () => GridStyled,
|
|
1048
1051
|
Icon: () => Icon,
|
|
@@ -1062,10 +1065,12 @@ __export(index_exports, {
|
|
|
1062
1065
|
Switch: () => Switch,
|
|
1063
1066
|
SwitchStyled: () => SwitchStyled,
|
|
1064
1067
|
Text: () => Text,
|
|
1068
|
+
TextAreaFormField: () => TextAreaFormField,
|
|
1065
1069
|
TextField: () => TextField,
|
|
1066
1070
|
TextFieldSlot: () => TextFieldSlot,
|
|
1067
1071
|
TextFieldSlotStyled: () => TextFieldSlotStyled,
|
|
1068
1072
|
TextFieldStyled: () => TextFieldStyled,
|
|
1073
|
+
TextFormField: () => TextFormField,
|
|
1069
1074
|
TextStyle: () => TextStyle,
|
|
1070
1075
|
TextareaField: () => TextareaField,
|
|
1071
1076
|
TextareaFieldStyle: () => TextareaFieldStyle,
|
|
@@ -2623,14 +2628,14 @@ var TextFieldStyled = styled(import_themes7.TextField.Root, {
|
|
|
2623
2628
|
color: {
|
|
2624
2629
|
default: {
|
|
2625
2630
|
color: "$dark400",
|
|
2626
|
-
border: "1px solid $
|
|
2631
|
+
border: "1px solid $dark300",
|
|
2627
2632
|
"&:has(input:focus)": {
|
|
2628
2633
|
border: "2px solid $brand300"
|
|
2629
2634
|
},
|
|
2630
2635
|
"&:has(input:disabled)": {
|
|
2631
2636
|
backgroundColor: "$dark100",
|
|
2632
2637
|
color: "$dark400",
|
|
2633
|
-
border: "1px solid $
|
|
2638
|
+
border: "1px solid $dark300",
|
|
2634
2639
|
cursor: "not-allowed"
|
|
2635
2640
|
}
|
|
2636
2641
|
},
|
|
@@ -8782,7 +8787,6 @@ var TextareaContainer = styled("div", {
|
|
|
8782
8787
|
overflow: "hidden",
|
|
8783
8788
|
width: "100%",
|
|
8784
8789
|
border: "1px solid",
|
|
8785
|
-
borderColor: "$dark300",
|
|
8786
8790
|
borderRadius: "$sm",
|
|
8787
8791
|
"&:has(textarea:focus)": {
|
|
8788
8792
|
border: "1px solid $brand300"
|
|
@@ -8792,6 +8796,19 @@ var TextareaContainer = styled("div", {
|
|
|
8792
8796
|
color: "$dark400",
|
|
8793
8797
|
border: "1px solid $dark200",
|
|
8794
8798
|
cursor: "not-allowed"
|
|
8799
|
+
},
|
|
8800
|
+
variants: {
|
|
8801
|
+
color: {
|
|
8802
|
+
default: {
|
|
8803
|
+
borderColor: "$dark300"
|
|
8804
|
+
},
|
|
8805
|
+
error: {
|
|
8806
|
+
borderColor: "$error400"
|
|
8807
|
+
}
|
|
8808
|
+
}
|
|
8809
|
+
},
|
|
8810
|
+
defaultVariants: {
|
|
8811
|
+
color: "default"
|
|
8795
8812
|
}
|
|
8796
8813
|
});
|
|
8797
8814
|
var TextareaLimitIndicator = styled("div", {
|
|
@@ -8809,7 +8826,7 @@ var TextareaLimitIndicator = styled("div", {
|
|
|
8809
8826
|
}
|
|
8810
8827
|
});
|
|
8811
8828
|
var TextareaField = import_react8.default.forwardRef((_a, fowardedRef) => {
|
|
8812
|
-
var _b = _a, { maxLength } = _b, props = __objRest(_b, ["maxLength"]);
|
|
8829
|
+
var _b = _a, { maxLength, color } = _b, props = __objRest(_b, ["maxLength", "color"]);
|
|
8813
8830
|
const inputRef = (0, import_react8.useRef)(null);
|
|
8814
8831
|
const badgeRef = (0, import_react8.useRef)(null);
|
|
8815
8832
|
const updateCharCountBadge = () => {
|
|
@@ -8823,7 +8840,7 @@ var TextareaField = import_react8.default.forwardRef((_a, fowardedRef) => {
|
|
|
8823
8840
|
updateCharCountBadge();
|
|
8824
8841
|
(_a2 = props.onInput) == null ? void 0 : _a2.call(props, e);
|
|
8825
8842
|
};
|
|
8826
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(TextareaContainer, { children: [
|
|
8843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(TextareaContainer, { color, children: [
|
|
8827
8844
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
8828
8845
|
TextareaFieldStyle,
|
|
8829
8846
|
__spreadValues({
|
|
@@ -9297,6 +9314,131 @@ function Section(_a) {
|
|
|
9297
9314
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
9298
9315
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SectionStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
9299
9316
|
}
|
|
9317
|
+
|
|
9318
|
+
// src/components/FormFields/ErrorFormMessage.tsx
|
|
9319
|
+
var import_free_solid_svg_icons2 = require("@fortawesome/free-solid-svg-icons");
|
|
9320
|
+
var import_react_fontawesome2 = require("@fortawesome/react-fontawesome");
|
|
9321
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
9322
|
+
var ErrorFormMessage = ({ message: message2 }) => {
|
|
9323
|
+
if (!message2) return null;
|
|
9324
|
+
if (typeof message2 !== "string") {
|
|
9325
|
+
return null;
|
|
9326
|
+
}
|
|
9327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Flex2, { justify: "start", align: "center", gap: 6, children: [
|
|
9328
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_fontawesome2.FontAwesomeIcon, { icon: import_free_solid_svg_icons2.faXmarkCircle, color: colors.error600, size: "1x" }),
|
|
9329
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { typography: "bodyXS", fontWeight: "medium", color: "error600", children: message2 })
|
|
9330
|
+
] });
|
|
9331
|
+
};
|
|
9332
|
+
|
|
9333
|
+
// src/components/FormFields/FormLabel.tsx
|
|
9334
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
9335
|
+
var FormLabel = ({
|
|
9336
|
+
name,
|
|
9337
|
+
label,
|
|
9338
|
+
haveError,
|
|
9339
|
+
required
|
|
9340
|
+
}) => {
|
|
9341
|
+
if (!label) return null;
|
|
9342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
9343
|
+
Text,
|
|
9344
|
+
{
|
|
9345
|
+
typography: "labelMedium",
|
|
9346
|
+
fontWeight: "medium",
|
|
9347
|
+
color: haveError ? "error600" : "dark700",
|
|
9348
|
+
id: `${name}-label`,
|
|
9349
|
+
children: [
|
|
9350
|
+
label,
|
|
9351
|
+
!required && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: "dark500", children: " (opcional)" })
|
|
9352
|
+
]
|
|
9353
|
+
}
|
|
9354
|
+
);
|
|
9355
|
+
};
|
|
9356
|
+
|
|
9357
|
+
// src/components/FormFields/TextAreaFormField.tsx
|
|
9358
|
+
var import_react_hook_form = require("react-hook-form");
|
|
9359
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
9360
|
+
var TextAreaFormField = ({
|
|
9361
|
+
name,
|
|
9362
|
+
label,
|
|
9363
|
+
required,
|
|
9364
|
+
placeholder
|
|
9365
|
+
}) => {
|
|
9366
|
+
var _a;
|
|
9367
|
+
const {
|
|
9368
|
+
register,
|
|
9369
|
+
formState: { errors }
|
|
9370
|
+
} = (0, import_react_hook_form.useFormContext)();
|
|
9371
|
+
const haveError = !!errors[name];
|
|
9372
|
+
const errorMsg = (_a = errors[name]) == null ? void 0 : _a.message;
|
|
9373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Flex2, { direction: "column", children: [
|
|
9374
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
9375
|
+
FormLabel,
|
|
9376
|
+
{
|
|
9377
|
+
name,
|
|
9378
|
+
label,
|
|
9379
|
+
required,
|
|
9380
|
+
haveError
|
|
9381
|
+
}
|
|
9382
|
+
),
|
|
9383
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
9384
|
+
TextareaField,
|
|
9385
|
+
__spreadProps(__spreadValues({}, register(name, { required })), {
|
|
9386
|
+
placeholder,
|
|
9387
|
+
color: haveError ? "error" : "default",
|
|
9388
|
+
"aria-labelledby": `${name}-label`
|
|
9389
|
+
})
|
|
9390
|
+
),
|
|
9391
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ErrorFormMessage, { message: errorMsg })
|
|
9392
|
+
] });
|
|
9393
|
+
};
|
|
9394
|
+
|
|
9395
|
+
// src/components/FormFields/TextFormField.tsx
|
|
9396
|
+
var import_react_hook_form2 = require("react-hook-form");
|
|
9397
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
9398
|
+
var TextFormField = ({
|
|
9399
|
+
name,
|
|
9400
|
+
label,
|
|
9401
|
+
required,
|
|
9402
|
+
placeholder
|
|
9403
|
+
}) => {
|
|
9404
|
+
var _a;
|
|
9405
|
+
const {
|
|
9406
|
+
register,
|
|
9407
|
+
formState: { errors }
|
|
9408
|
+
} = (0, import_react_hook_form2.useFormContext)();
|
|
9409
|
+
const haveError = !!errors[name];
|
|
9410
|
+
const errorMsg = (_a = errors[name]) == null ? void 0 : _a.message;
|
|
9411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Flex2, { direction: "column", children: [
|
|
9412
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
9413
|
+
FormLabel,
|
|
9414
|
+
{
|
|
9415
|
+
name,
|
|
9416
|
+
label,
|
|
9417
|
+
required,
|
|
9418
|
+
haveError
|
|
9419
|
+
}
|
|
9420
|
+
),
|
|
9421
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
9422
|
+
TextField,
|
|
9423
|
+
__spreadProps(__spreadValues({}, register(name, { required })), {
|
|
9424
|
+
placeholder,
|
|
9425
|
+
color: haveError ? "error" : "default",
|
|
9426
|
+
"aria-labelledby": `${name}-label`
|
|
9427
|
+
})
|
|
9428
|
+
),
|
|
9429
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ErrorFormMessage, { message: errorMsg })
|
|
9430
|
+
] });
|
|
9431
|
+
};
|
|
9432
|
+
|
|
9433
|
+
// src/components/FormFields/Form.tsx
|
|
9434
|
+
var import_react_hook_form3 = require("react-hook-form");
|
|
9435
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
9436
|
+
var Form = (_a) => {
|
|
9437
|
+
var _b = _a, { onSubmit, children } = _b, props = __objRest(_b, ["onSubmit", "children"]);
|
|
9438
|
+
const methods = (0, import_react_hook_form3.useForm)(props);
|
|
9439
|
+
const { handleSubmit } = methods;
|
|
9440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_hook_form3.FormProvider, __spreadProps(__spreadValues({}, methods), { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("form", { onSubmit: handleSubmit(onSubmit), children }) }));
|
|
9441
|
+
};
|
|
9300
9442
|
// Annotate the CommonJS export names for ESM import in node:
|
|
9301
9443
|
0 && (module.exports = {
|
|
9302
9444
|
Alert,
|
|
@@ -9327,10 +9469,13 @@ function Section(_a) {
|
|
|
9327
9469
|
ContainerStyled,
|
|
9328
9470
|
DropdownMenu,
|
|
9329
9471
|
DropdownMenuItem,
|
|
9472
|
+
ErrorFormMessage,
|
|
9330
9473
|
Filter,
|
|
9331
9474
|
FilterItem,
|
|
9332
9475
|
Flex,
|
|
9333
9476
|
FlexStyled,
|
|
9477
|
+
Form,
|
|
9478
|
+
FormLabel,
|
|
9334
9479
|
Grid,
|
|
9335
9480
|
GridStyled,
|
|
9336
9481
|
Icon,
|
|
@@ -9350,10 +9495,12 @@ function Section(_a) {
|
|
|
9350
9495
|
Switch,
|
|
9351
9496
|
SwitchStyled,
|
|
9352
9497
|
Text,
|
|
9498
|
+
TextAreaFormField,
|
|
9353
9499
|
TextField,
|
|
9354
9500
|
TextFieldSlot,
|
|
9355
9501
|
TextFieldSlotStyled,
|
|
9356
9502
|
TextFieldStyled,
|
|
9503
|
+
TextFormField,
|
|
9357
9504
|
TextStyle,
|
|
9358
9505
|
TextareaField,
|
|
9359
9506
|
TextareaFieldStyle,
|