@lets-events/react 12.1.3 → 12.1.5

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.js CHANGED
@@ -34,6 +34,9 @@ var __objRest = (source, exclude) => {
34
34
  }
35
35
  return target;
36
36
  };
37
+ var __esm = (fn, res) => function __init() {
38
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
39
+ };
37
40
  var __commonJS = (cb, mod) => function __require() {
38
41
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
39
42
  };
@@ -155,7 +158,7 @@ var require_react_is_development = __commonJS({
155
158
  var Portal = REACT_PORTAL_TYPE;
156
159
  var Profiler = REACT_PROFILER_TYPE;
157
160
  var StrictMode = REACT_STRICT_MODE_TYPE;
158
- var Suspense = REACT_SUSPENSE_TYPE;
161
+ var Suspense2 = REACT_SUSPENSE_TYPE;
159
162
  var hasWarnedAboutDeprecatedIsAsyncMode = false;
160
163
  function isAsyncMode(object) {
161
164
  {
@@ -214,7 +217,7 @@ var require_react_is_development = __commonJS({
214
217
  exports2.Portal = Portal;
215
218
  exports2.Profiler = Profiler;
216
219
  exports2.StrictMode = StrictMode;
217
- exports2.Suspense = Suspense;
220
+ exports2.Suspense = Suspense2;
218
221
  exports2.isAsyncMode = isAsyncMode;
219
222
  exports2.isConcurrentMode = isConcurrentMode;
220
223
  exports2.isContextConsumer = isContextConsumer;
@@ -859,6 +862,1558 @@ var require_prop_types = __commonJS({
859
862
  }
860
863
  });
861
864
 
865
+ // src/components/Icon.tsx
866
+ var import_react_fontawesome, import_fontawesome_svg_core, import_free_solid_svg_icons, import_free_regular_svg_icons, import_free_brands_svg_icons, import_prop_types, import_jsx_runtime, Icon, Icon_default;
867
+ var init_Icon = __esm({
868
+ "src/components/Icon.tsx"() {
869
+ "use strict";
870
+ import_react_fontawesome = require("@fortawesome/react-fontawesome");
871
+ import_fontawesome_svg_core = require("@fortawesome/fontawesome-svg-core");
872
+ import_free_solid_svg_icons = require("@fortawesome/free-solid-svg-icons");
873
+ import_free_regular_svg_icons = require("@fortawesome/free-regular-svg-icons");
874
+ import_free_brands_svg_icons = require("@fortawesome/free-brands-svg-icons");
875
+ import_prop_types = __toESM(require_prop_types());
876
+ import_jsx_runtime = require("react/jsx-runtime");
877
+ import_fontawesome_svg_core.library.add(import_free_solid_svg_icons.fas, import_free_regular_svg_icons.far, import_free_brands_svg_icons.fab);
878
+ Icon = (_a) => {
879
+ var _b = _a, { name, prefix = "fas", size = "sm", color = "currentColor", className = "" } = _b, props = __objRest(_b, ["name", "prefix", "size", "color", "className"]);
880
+ var _a2, _b2;
881
+ const sizeMap = {
882
+ "xs": { width: "0.625rem", height: "0.625rem", fontSize: "0.625rem" },
883
+ "sm": { width: "0.625rem", height: "0.625rem", fontSize: "0.625rem" },
884
+ "md": { width: "0.75rem", height: "0.75rem", fontSize: "0.75rem" },
885
+ "xl": { width: "1rem", height: "1rem", fontSize: "1rem" },
886
+ undefined: { width: "0.75rem", height: "0.75rem", fontSize: "0.75rem" }
887
+ };
888
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
889
+ import_react_fontawesome.FontAwesomeIcon,
890
+ __spreadProps(__spreadValues({
891
+ icon: [prefix, name],
892
+ style: sizeMap[size],
893
+ color,
894
+ className
895
+ }, props), {
896
+ width: (_a2 = sizeMap[size]) == null ? void 0 : _a2.width,
897
+ height: (_b2 = sizeMap[size]) == null ? void 0 : _b2.height
898
+ })
899
+ );
900
+ };
901
+ Icon.propTypes = {
902
+ name: import_prop_types.default.string.isRequired,
903
+ prefix: import_prop_types.default.string,
904
+ size: import_prop_types.default.string,
905
+ color: import_prop_types.default.string,
906
+ className: import_prop_types.default.string
907
+ };
908
+ Icon_default = Icon;
909
+ }
910
+ });
911
+
912
+ // ../tokens/dist/index.mjs
913
+ var colors, fonts, fontSizes, fontWeights, lineHeights, radii, space;
914
+ var init_dist = __esm({
915
+ "../tokens/dist/index.mjs"() {
916
+ "use strict";
917
+ colors = {
918
+ brand50: "#DBE8FF",
919
+ brand100: "#BDD5FF",
920
+ brand200: "#7AABFF",
921
+ brand300: "#3881FF",
922
+ brand400: "#005AF5",
923
+ brand500: "#004ED2",
924
+ brand600: "#0042B2",
925
+ brand700: "#00348F",
926
+ brand800: "#00276B",
927
+ brand900: "#001A47",
928
+ brand950: "#000D24",
929
+ blue50: "#E5F1FF",
930
+ blue100: "#CCE4FF",
931
+ blue200: "#9AC9FF",
932
+ blue300: "#66ADFF",
933
+ blue400: "#3392FF",
934
+ blue500: "#0278FE",
935
+ blue600: "#005FCD",
936
+ blue700: "#004799",
937
+ blue800: "#013066",
938
+ blue900: "#001834",
939
+ blue950: "#000C1A",
940
+ red50: "#FCEEEF",
941
+ red100: "#F9DCDF",
942
+ red200: "#F3BEC3",
943
+ red300: "#ED9CA2",
944
+ red400: "#E77982",
945
+ red500: "#E15662",
946
+ red600: "#DB3644",
947
+ red700: "#AD1F2B",
948
+ red800: "#75151D",
949
+ red900: "#380A0E",
950
+ red950: "#1E0507",
951
+ pink100: "#F9DCF3",
952
+ purple50: "#F3EFFB",
953
+ purple100: "#E6DEF7",
954
+ purple200: "#D1C2F0",
955
+ purple300: "#B9A1E8",
956
+ purple400: "#A080E0",
957
+ purple500: "#8961D8",
958
+ purple600: "#6431C8",
959
+ purple700: "#4B2597",
960
+ purple800: "#331966",
961
+ purple900: "#180C31",
962
+ purple950: "#0C0619",
963
+ yellow50: "#FFF9E6",
964
+ yellow100: "#FFF3CD",
965
+ yellow200: "#FFE69C",
966
+ yellow300: "#FFDA6A",
967
+ yellow400: "#FFCD39",
968
+ yellow500: "#FFC107",
969
+ yellow600: "#CC9A06",
970
+ yellow700: "#997404",
971
+ yellow800: "#664D03",
972
+ yellow900: "#332701",
973
+ yellow950: "#191300",
974
+ orange100: "#FEE0D8",
975
+ dark50: "#FFFFFF",
976
+ dark100: "#F4F4F4",
977
+ dark200: "#EAEBF0",
978
+ dark300: "#C2C3C7",
979
+ dark400: "#A9ABB1",
980
+ dark500: "#808289",
981
+ dark600: "#4C4F54",
982
+ dark700: "#34363B",
983
+ dark800: "#1E2023",
984
+ dark900: "#040507",
985
+ dark950: "#030303",
986
+ neutral50: "#FFFFFF",
987
+ neutral100: "#F4F4F4",
988
+ neutral200: "#EAEBF0",
989
+ neutral300: "#C2C3C7",
990
+ neutral400: "#A9ABB1",
991
+ neutral500: "#808289",
992
+ neutral600: "#4C4F54",
993
+ neutral700: "#34363B",
994
+ neutral800: "#1E2023",
995
+ neutral900: "#040507",
996
+ neutral950: "#030303",
997
+ green50: "#E6F9EA",
998
+ green100: "#CDF4D5",
999
+ green200: "#9BE8AC",
1000
+ green300: "#6CD783",
1001
+ green400: "#5BCA72",
1002
+ green500: "#26A743",
1003
+ green600: "#1E8535",
1004
+ green700: "#176427",
1005
+ green800: "#0F421A",
1006
+ green900: "#08210D",
1007
+ green950: "#041107",
1008
+ grey50: "#F4F8FB",
1009
+ grey100: "#E6EEF4",
1010
+ grey200: "#DBE7F0",
1011
+ grey300: "#BCCEDD",
1012
+ grey400: "#9FB6C7",
1013
+ grey500: "#849DAE",
1014
+ grey600: "#698496",
1015
+ grey700: "#516A7A",
1016
+ grey800: "#394F61",
1017
+ grey900: "#233543",
1018
+ grey950: "#101B23",
1019
+ error50: "#FCEEEF",
1020
+ error100: "#F9DCDF",
1021
+ error200: "#F3BEC3",
1022
+ error300: "#ED9CA2",
1023
+ error400: "#E77982",
1024
+ error500: "#E15662",
1025
+ error600: "#DB3644",
1026
+ error700: "#AD1F2B",
1027
+ error800: "#75151D",
1028
+ error900: "#380A0E",
1029
+ error950: "#1E0507",
1030
+ success50: "#E6F9EA",
1031
+ success100: "#CDF4D5",
1032
+ success200: "#9BE8AC",
1033
+ success300: "#6CD783",
1034
+ success400: "#5BCA72",
1035
+ success500: "#26A743",
1036
+ success600: "#1E8535",
1037
+ success700: "#176427",
1038
+ success800: "#0F421A",
1039
+ success900: "#08210D",
1040
+ success950: "#041107",
1041
+ warning50: "#FFF9E6",
1042
+ warning100: "#FFF3CD",
1043
+ warning200: "#FFE69C",
1044
+ warning300: "#FFDA6A",
1045
+ warning400: "#FFCD39",
1046
+ warning500: "#FFC107",
1047
+ warning600: "#CC9A06",
1048
+ warning700: "#997404",
1049
+ warning800: "#664D03",
1050
+ warning900: "#332701",
1051
+ warning950: "#191300",
1052
+ info50: "#E5F1FF",
1053
+ info100: "#CCE4FF",
1054
+ info200: "#9AC9FF",
1055
+ info300: "#66ADFF",
1056
+ info400: "#3392FF",
1057
+ info500: "#0278FE",
1058
+ info600: "#005FCD",
1059
+ info700: "#004799",
1060
+ info800: "#013066",
1061
+ info900: "#001834",
1062
+ info950: "#000C1A",
1063
+ shadow50: "#546B923D"
1064
+ };
1065
+ fonts = {
1066
+ default: '"Work Sans", sans-serif'
1067
+ };
1068
+ fontSizes = {
1069
+ 2: "0.125rem",
1070
+ 4: "0.25rem",
1071
+ 6: "0.375rem",
1072
+ 8: "0.5rem",
1073
+ 10: "0.625rem",
1074
+ 12: "0.75rem",
1075
+ 13: "0.8125rem",
1076
+ 14: "0.875rem",
1077
+ 16: "1rem",
1078
+ 18: "1.125rem",
1079
+ 20: "1.25rem",
1080
+ 22: "1.375rem",
1081
+ 24: "1.5rem",
1082
+ 32: "2rem",
1083
+ 36: "2.25rem",
1084
+ 40: "2.5rem",
1085
+ 48: "3rem",
1086
+ 56: "3.5rem",
1087
+ 64: "4rem",
1088
+ 72: "4.5rem",
1089
+ 80: "5rem",
1090
+ xs: "0.375rem",
1091
+ sm: "0.5rem",
1092
+ md: "0.75rem",
1093
+ lg: "1rem",
1094
+ "2xl": "1.5rem",
1095
+ "3xl": "2rem",
1096
+ "4xl": "2.5rem",
1097
+ full: "62.4375rem",
1098
+ displayLarge: "3.5rem",
1099
+ displayMedium: "3rem",
1100
+ displaySmall: "2.25rem",
1101
+ headline1: "2.5rem",
1102
+ headline2: "2rem",
1103
+ headline3: "1.75rem",
1104
+ headline4: "1.375rem",
1105
+ headline5: "1.25rem",
1106
+ headline6: "1.125rem",
1107
+ headline7: "1rem",
1108
+ headline8: "0.875rem",
1109
+ bodyXL: "1.25rem",
1110
+ bodyL: "1.125rem",
1111
+ bodyM: "1rem",
1112
+ bodyS: "0.875rem",
1113
+ bodyXS: "0.8125rem",
1114
+ bodyXXS: "0.75rem",
1115
+ buttonLarge: "1.25rem",
1116
+ buttonMedium: "0.875rem",
1117
+ buttonSmall: "0.875rem",
1118
+ buttonExtraSmall: "0.75rem",
1119
+ badgeLarge: "1rem",
1120
+ badgeMedium: "0.875rem",
1121
+ badgeSmall: "0.75rem",
1122
+ badgeExtraSmall: "0.625rem",
1123
+ tooltip: "0.875rem",
1124
+ popoversRegular: "0.875rem",
1125
+ labelLarge: "1rem",
1126
+ labelMedium: "0.875rem",
1127
+ labelSmall: "0.8125rem",
1128
+ labelExtraSmall: "0.75rem",
1129
+ captionLarge: "0.8125rem",
1130
+ captionMedium: "0.75rem",
1131
+ captionSmall: "0.625rem"
1132
+ };
1133
+ fontWeights = {
1134
+ regular: "400",
1135
+ medium: "500",
1136
+ semibold: "600",
1137
+ bold: "700"
1138
+ };
1139
+ lineHeights = {
1140
+ smaller: "112.5%",
1141
+ // 4px
1142
+ shorter: "125%",
1143
+ // 8px
1144
+ short: "137.5%",
1145
+ // 12px
1146
+ base: "150%",
1147
+ // 16px
1148
+ tall: "175%",
1149
+ // 24px
1150
+ displayLarge: "4.5rem",
1151
+ displayMedium: "4rem",
1152
+ displaySmall: "3.25rem",
1153
+ headline1: "3.25rem",
1154
+ headline2: "2.75rem",
1155
+ headline3: "2.5rem",
1156
+ headline4: "1.75rem",
1157
+ headline5: "1.5rem",
1158
+ headline6: "1.375rem",
1159
+ headline7: "1.5rem",
1160
+ headline8: "1.25rem",
1161
+ bodyXL: "1.75rem",
1162
+ bodyL: "1.625rem",
1163
+ bodyM: "1.5rem",
1164
+ bodyS: "1.25rem",
1165
+ bodyXS: "1.125rem",
1166
+ bodyXXS: "1rem",
1167
+ buttonLarge: "1.25rem",
1168
+ buttonMedium: "1rem",
1169
+ buttonSmall: "0.875rem",
1170
+ buttonExtraSmall: "0.75rem",
1171
+ badgeLarge: "1rem",
1172
+ badgeMedium: "0.875rem",
1173
+ badgeSmall: "0.75rem",
1174
+ badgeExtraSmall: "0.625rem",
1175
+ tooltip: "1rem",
1176
+ popoversRegular: "1rem",
1177
+ labelLarge: "1.125rem",
1178
+ labelMedium: "1.125rem",
1179
+ labelSmall: "1rem",
1180
+ labelExtraSmall: "1rem",
1181
+ captionLarge: "1rem",
1182
+ captionMedium: "0.875rem",
1183
+ captionSmall: "0.75rem"
1184
+ };
1185
+ radii = {
1186
+ "3xs": "2px",
1187
+ "2xs": "4px",
1188
+ "xs": "6px",
1189
+ "sm": "8px",
1190
+ "md": "10px",
1191
+ "lg": "12px",
1192
+ "xl": "14px",
1193
+ "2xl": "16px",
1194
+ "3xl": "18px",
1195
+ "4xl": "20px",
1196
+ "5xl": "22px",
1197
+ "6xl": "24px",
1198
+ "7xl": "32px",
1199
+ "8xl": "36px",
1200
+ "9xl": "40px",
1201
+ "10xl": "48px",
1202
+ "11xl": "56px",
1203
+ "12xl": "64px",
1204
+ "13xl": "72px",
1205
+ "14xl": "80px",
1206
+ full: "99999px"
1207
+ };
1208
+ space = {
1209
+ 2: "0.125rem",
1210
+ 4: "0.25rem",
1211
+ 6: "0.375rem",
1212
+ 8: "0.5rem",
1213
+ 10: "0.625rem",
1214
+ 12: "0.75rem",
1215
+ 13: "0.8125rem",
1216
+ 14: "0.875rem",
1217
+ 16: "1rem",
1218
+ 18: "1.125rem",
1219
+ 20: "1.25rem",
1220
+ 22: "1.375rem",
1221
+ 24: "1.5rem",
1222
+ 32: "2rem",
1223
+ 36: "2.25rem",
1224
+ 40: "2.5rem",
1225
+ 48: "3rem",
1226
+ 56: "3.5rem",
1227
+ 64: "4rem",
1228
+ 72: "4.5rem",
1229
+ 80: "5rem",
1230
+ full: "62.4375rem"
1231
+ };
1232
+ }
1233
+ });
1234
+
1235
+ // src/styles/index.ts
1236
+ var import_react, styled, css, globalCss, keyframes, getCssText, theme, createTheme, config;
1237
+ var init_styles = __esm({
1238
+ "src/styles/index.ts"() {
1239
+ "use strict";
1240
+ init_dist();
1241
+ import_react = require("@stitches/react");
1242
+ ({
1243
+ styled,
1244
+ css,
1245
+ globalCss,
1246
+ keyframes,
1247
+ getCssText,
1248
+ theme,
1249
+ createTheme,
1250
+ config
1251
+ } = (0, import_react.createStitches)({
1252
+ themeMap: __spreadProps(__spreadValues({}, import_react.defaultThemeMap), {
1253
+ height: "space",
1254
+ width: "space",
1255
+ gap: "space"
1256
+ }),
1257
+ theme: {
1258
+ colors,
1259
+ fontSizes,
1260
+ fonts,
1261
+ fontWeights,
1262
+ lineHeights,
1263
+ radii,
1264
+ space
1265
+ }
1266
+ }));
1267
+ }
1268
+ });
1269
+
1270
+ // src/types/typographyValues.ts
1271
+ var typographyValues, typographyLabelValues;
1272
+ var init_typographyValues = __esm({
1273
+ "src/types/typographyValues.ts"() {
1274
+ "use strict";
1275
+ typographyValues = {
1276
+ displayLarge: {
1277
+ fontSize: "$displayLarge",
1278
+ lineHeight: "$displayLarge",
1279
+ letterSpacing: "$displayLarge"
1280
+ },
1281
+ displayMedium: {
1282
+ fontSize: "$displayMedium",
1283
+ lineHeight: "$displayMedium",
1284
+ letterSpacing: "$displayMedium"
1285
+ },
1286
+ displaySmall: {
1287
+ fontSize: "$displaySmall",
1288
+ lineHeight: "$displaySmall",
1289
+ letterSpacing: "$displaySmall"
1290
+ },
1291
+ headline1: {
1292
+ fontSize: "$headline1",
1293
+ lineHeight: "$headline1"
1294
+ },
1295
+ headline2: {
1296
+ fontSize: "$headline2",
1297
+ lineHeight: "$headline2"
1298
+ },
1299
+ headline3: {
1300
+ fontSize: "$headline3",
1301
+ lineHeight: "$headline3"
1302
+ },
1303
+ headline4: {
1304
+ fontSize: "$headline4",
1305
+ lineHeight: "$headline4"
1306
+ },
1307
+ headline5: {
1308
+ fontSize: "$headline5",
1309
+ lineHeight: "$headline5"
1310
+ },
1311
+ headline6: {
1312
+ fontSize: "$headline6",
1313
+ lineHeight: "$headline6"
1314
+ },
1315
+ headline7: {
1316
+ fontSize: "$headline7",
1317
+ lineHeight: "$headline7"
1318
+ },
1319
+ headline8: {
1320
+ fontSize: "$headline8",
1321
+ lineHeight: "$headline8"
1322
+ },
1323
+ bodyXL: {
1324
+ fontSize: "$bodyXL",
1325
+ lineHeight: "$bodyXL"
1326
+ },
1327
+ bodyL: {
1328
+ fontSize: "$bodyL",
1329
+ lineHeight: "$bodyL"
1330
+ },
1331
+ bodyM: {
1332
+ fontSize: "$bodyM",
1333
+ lineHeight: "$bodyM"
1334
+ },
1335
+ bodyS: {
1336
+ fontSize: "$bodyS",
1337
+ lineHeight: "$bodyS"
1338
+ },
1339
+ bodyXS: {
1340
+ fontSize: "$bodyXS",
1341
+ lineHeight: "$bodyXS"
1342
+ },
1343
+ bodyXXS: {
1344
+ fontSize: "$bodyXXS",
1345
+ lineHeight: "$bodyXXS"
1346
+ },
1347
+ badgeLarge: {
1348
+ fontSize: "$badgeLarge",
1349
+ lineHeight: "$badgeLarge"
1350
+ },
1351
+ badgeMedium: {
1352
+ fontSize: "$badgeMedium",
1353
+ lineHeight: "$badgeMedium"
1354
+ },
1355
+ badgeSmall: {
1356
+ fontSize: "$badgeSmall",
1357
+ lineHeight: "$badgeSmall"
1358
+ },
1359
+ badgeExtraSmall: {
1360
+ fontSize: "$badgeExtraSmall",
1361
+ lineHeight: "$badgeExtraSmall"
1362
+ },
1363
+ tooltip: {
1364
+ fontSize: "$tooltip",
1365
+ lineHeight: "$tooltip"
1366
+ },
1367
+ popoversRegular: {
1368
+ fontSize: "$popoversRegular",
1369
+ lineHeight: "$popoversRegular"
1370
+ },
1371
+ captionLarge: {
1372
+ fontSize: "$captionLarge",
1373
+ lineHeight: "$captionLarge"
1374
+ },
1375
+ captionMedium: {
1376
+ fontSize: "$captionMedium",
1377
+ lineHeight: "$captionMedium"
1378
+ },
1379
+ captionSmall: {
1380
+ fontSize: "$captionSmall",
1381
+ lineHeight: "$captionSmall"
1382
+ },
1383
+ buttonLarge: {
1384
+ fontSize: "$buttonLarge",
1385
+ lineHeight: "$buttonLarge"
1386
+ },
1387
+ buttonMedium: {
1388
+ fontSize: "$buttonMedium",
1389
+ lineHeight: "$buttonMedium"
1390
+ },
1391
+ buttonSmall: {
1392
+ fontSize: "$buttonSmall",
1393
+ lineHeight: "$buttonSmall"
1394
+ },
1395
+ buttonExtraSmall: {
1396
+ fontSize: "$buttonExtraSmall",
1397
+ lineHeight: "$buttonExtraSmall"
1398
+ },
1399
+ labelLarge: {
1400
+ fontSize: "$labelLarge",
1401
+ lineHeight: "$labelLarge"
1402
+ },
1403
+ labelMedium: {
1404
+ fontSize: "$labelMedium",
1405
+ lineHeight: "$labelMedium"
1406
+ },
1407
+ labelSmall: {
1408
+ fontSize: "$labelSmall",
1409
+ lineHeight: "$labelSmall"
1410
+ },
1411
+ labelExtraSmall: {
1412
+ fontSize: "$labelExtraSmall",
1413
+ lineHeight: "$labelExtraSmall"
1414
+ }
1415
+ };
1416
+ typographyLabelValues = {
1417
+ labelLarge: {
1418
+ fontSize: "$labelLarge",
1419
+ lineHeight: "$labelLarge"
1420
+ },
1421
+ labelMedium: {
1422
+ fontSize: "$labelMedium",
1423
+ lineHeight: "$labelMedium"
1424
+ },
1425
+ labelSmall: {
1426
+ fontSize: "$labelSmall",
1427
+ lineHeight: "$labelSmall"
1428
+ },
1429
+ labelExtraSmall: {
1430
+ fontSize: "$labelExtraSmall",
1431
+ lineHeight: "$labelExtraSmall"
1432
+ }
1433
+ };
1434
+ }
1435
+ });
1436
+
1437
+ // src/components/Text.tsx
1438
+ function Text(_a) {
1439
+ var _b = _a, { color } = _b, props = __objRest(_b, ["color"]);
1440
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1441
+ TextStyle,
1442
+ __spreadProps(__spreadValues({}, props), {
1443
+ css: __spreadValues({
1444
+ color: color ? "$" + color : "$dark600"
1445
+ }, props.css)
1446
+ })
1447
+ );
1448
+ }
1449
+ var import_themes, import_jsx_runtime2, TextStyle;
1450
+ var init_Text = __esm({
1451
+ "src/components/Text.tsx"() {
1452
+ "use strict";
1453
+ init_styles();
1454
+ import_themes = require("@radix-ui/themes");
1455
+ init_typographyValues();
1456
+ import_jsx_runtime2 = require("react/jsx-runtime");
1457
+ TextStyle = styled(import_themes.Text, {
1458
+ fontFamily: "$default",
1459
+ lineHeight: "$base",
1460
+ variants: {
1461
+ typography: typographyValues,
1462
+ fontWeight: {
1463
+ regular: { fontWeight: "$regular" },
1464
+ medium: { fontWeight: "$medium" },
1465
+ semibold: { fontWeight: "$semibold" },
1466
+ bold: { fontWeight: "$bold" }
1467
+ }
1468
+ }
1469
+ });
1470
+ }
1471
+ });
1472
+
1473
+ // src/components/Flex.tsx
1474
+ function Flex2(_a) {
1475
+ var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
1476
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FlexStyled, __spreadProps(__spreadValues({}, props), { children }));
1477
+ }
1478
+ var import_themes6, import_jsx_runtime6, FlexStyled;
1479
+ var init_Flex = __esm({
1480
+ "src/components/Flex.tsx"() {
1481
+ "use strict";
1482
+ init_styles();
1483
+ import_themes6 = require("@radix-ui/themes");
1484
+ import_jsx_runtime6 = require("react/jsx-runtime");
1485
+ FlexStyled = styled(import_themes6.Flex, {
1486
+ variants: {
1487
+ display: {
1488
+ "flex": { display: "flex" },
1489
+ "inline-flex": { display: "inline-flex" }
1490
+ },
1491
+ align: {
1492
+ start: { alignItems: "flex-start" },
1493
+ center: { alignItems: "center" },
1494
+ end: { alignItems: "flex-end" },
1495
+ stretch: { alignItems: "stretch" },
1496
+ baseline: { alignItems: "baseline" }
1497
+ },
1498
+ justify: {
1499
+ start: { justifyContent: "flex-start" },
1500
+ center: { justifyContent: "center" },
1501
+ end: { justifyContent: "flex-end" },
1502
+ between: { justifyContent: "space-between" },
1503
+ around: { justifyContent: "space-around" },
1504
+ evenly: { justifyContent: "space-evenly" }
1505
+ },
1506
+ direction: {
1507
+ row: { flexDirection: "row" },
1508
+ column: { flexDirection: "column" },
1509
+ "row-reverse": { flexDirection: "row-reverse" },
1510
+ "column-reverse": { flexDirection: "column-reverse" }
1511
+ },
1512
+ gap: {
1513
+ 0: { gap: "0px" },
1514
+ 2: { gap: "$2" },
1515
+ 4: { gap: "$4" },
1516
+ 6: { gap: "$6" },
1517
+ 8: { gap: "$8" },
1518
+ 10: { gap: "$10" },
1519
+ 12: { gap: "$12" },
1520
+ 14: { gap: "$14" },
1521
+ 16: { gap: "$16" },
1522
+ 20: { gap: "$20" },
1523
+ 22: { gap: "$22" },
1524
+ 24: { gap: "$24" },
1525
+ 32: { gap: "$32" },
1526
+ 36: { gap: "$36" },
1527
+ 40: { gap: "$40" },
1528
+ 48: { gap: "$48" },
1529
+ 56: { gap: "$56" },
1530
+ 64: { gap: "$64" },
1531
+ 72: { gap: "$72" },
1532
+ 80: { gap: "$80" },
1533
+ full: { gap: "$full" }
1534
+ },
1535
+ gapY: {
1536
+ 2: { gap: "$2" },
1537
+ 4: { gap: "$4" },
1538
+ 6: { gap: "$6" },
1539
+ 8: { gap: "$8" },
1540
+ 10: { gap: "$10" },
1541
+ 12: { gap: "$12" },
1542
+ 14: { gap: "$14" },
1543
+ 16: { gap: "$16" },
1544
+ 20: { gap: "$20" },
1545
+ 22: { gap: "$22" },
1546
+ 24: { gap: "$24" },
1547
+ 32: { gap: "$32" },
1548
+ 36: { gap: "$36" },
1549
+ 40: { gap: "$40" },
1550
+ 48: { gap: "$48" },
1551
+ 56: { gap: "$56" },
1552
+ 64: { gap: "$64" },
1553
+ 72: { gap: "$72" },
1554
+ 80: { gap: "$80" },
1555
+ full: { gap: "$full" }
1556
+ },
1557
+ gapX: {
1558
+ 2: { gap: "$2" },
1559
+ 4: { gap: "$4" },
1560
+ 6: { gap: "$6" },
1561
+ 8: { gap: "$8" },
1562
+ 10: { gap: "$10" },
1563
+ 12: { gap: "$12" },
1564
+ 14: { gap: "$14" },
1565
+ 16: { gap: "$16" },
1566
+ 20: { gap: "$20" },
1567
+ 22: { gap: "$22" },
1568
+ 24: { gap: "$24" },
1569
+ 32: { gap: "$32" },
1570
+ 36: { gap: "$36" },
1571
+ 40: { gap: "$40" },
1572
+ 48: { gap: "$48" },
1573
+ 56: { gap: "$56" },
1574
+ 64: { gap: "$64" },
1575
+ 72: { gap: "$72" },
1576
+ 80: { gap: "$80" },
1577
+ full: { gap: "$full" }
1578
+ }
1579
+ },
1580
+ defaultVariants: {
1581
+ display: "flex",
1582
+ direction: "row",
1583
+ gap: 10
1584
+ }
1585
+ });
1586
+ }
1587
+ });
1588
+
1589
+ // src/components/Toast/styles/index.ts
1590
+ var import_react12, ToastPrimitive, slideIn, slideOut, swipeOut, ToastViewport, ToastRoot, ToastClose;
1591
+ var init_styles2 = __esm({
1592
+ "src/components/Toast/styles/index.ts"() {
1593
+ "use strict";
1594
+ import_react12 = require("@stitches/react");
1595
+ ToastPrimitive = __toESM(require("@radix-ui/react-toast"));
1596
+ init_styles();
1597
+ slideIn = (0, import_react12.keyframes)({
1598
+ from: {
1599
+ transform: "translateX(calc(100% + 25px))",
1600
+ opacity: 0
1601
+ },
1602
+ to: {
1603
+ transform: "translateX(0)",
1604
+ opacity: 1
1605
+ }
1606
+ });
1607
+ slideOut = (0, import_react12.keyframes)({
1608
+ from: {
1609
+ transform: "translateX(0)",
1610
+ opacity: 1
1611
+ },
1612
+ to: {
1613
+ transform: "translateX(calc(100% + 25px))",
1614
+ opacity: 0
1615
+ }
1616
+ });
1617
+ swipeOut = (0, import_react12.keyframes)({
1618
+ from: {
1619
+ transform: "translateX(var(--radix-toast-swipe-end-x))",
1620
+ opacity: 1
1621
+ },
1622
+ to: {
1623
+ transform: "translateX(calc(100% + 25px))",
1624
+ opacity: 0
1625
+ }
1626
+ });
1627
+ ToastViewport = styled(ToastPrimitive.Viewport, {
1628
+ position: "fixed",
1629
+ top: 0,
1630
+ right: 0,
1631
+ display: "flex",
1632
+ flexDirection: "column",
1633
+ padding: 25,
1634
+ gap: 10,
1635
+ width: 390,
1636
+ maxWidth: "100vw",
1637
+ margin: 0,
1638
+ listStyle: "none",
1639
+ zIndex: 2147483647,
1640
+ outline: "none"
1641
+ });
1642
+ ToastRoot = styled(ToastPrimitive.Root, {
1643
+ backgroundColor: "$neutral50",
1644
+ borderRadius: "$sm",
1645
+ boxShadow: "hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px",
1646
+ padding: "$16",
1647
+ gap: "$8",
1648
+ display: "flex",
1649
+ alignItems: "center",
1650
+ border: "1px solid",
1651
+ position: "relative",
1652
+ zIndex: 9999,
1653
+ '&[data-state="open"]': {
1654
+ animation: `${slideIn} 150ms cubic-bezier(0.16, 1, 0.3, 1)`
1655
+ },
1656
+ '&[data-state="closed"]': {
1657
+ animation: `${slideOut} 100ms ease-in`
1658
+ },
1659
+ '&[data-swipe="move"]': {
1660
+ transform: "translateX(var(--radix-toast-swipe-move-x))"
1661
+ },
1662
+ '&[data-swipe="cancel"]': {
1663
+ transform: "translateX(0)",
1664
+ transition: "transform 200ms ease-out"
1665
+ },
1666
+ '&[data-swipe="end"]': {
1667
+ animation: `${swipeOut} 100ms ease-out`
1668
+ },
1669
+ $$toastColor: "inherit",
1670
+ color: "$$toastColor",
1671
+ borderColor: "$$toastColor",
1672
+ variants: {
1673
+ type: {
1674
+ success: {
1675
+ $$toastColor: "$colors$success600",
1676
+ backgroundColor: "$success50"
1677
+ },
1678
+ error: {
1679
+ $$toastColor: "$colors$error600",
1680
+ backgroundColor: "$error50"
1681
+ },
1682
+ warning: {
1683
+ $$toastColor: "$colors$warning600",
1684
+ backgroundColor: "$warning50"
1685
+ },
1686
+ info: {
1687
+ $$toastColor: "$colors$info600",
1688
+ backgroundColor: "$info50"
1689
+ }
1690
+ }
1691
+ },
1692
+ defaultVariants: {
1693
+ type: "info"
1694
+ }
1695
+ });
1696
+ ToastClose = styled(ToastPrimitive.Close, {
1697
+ border: "none",
1698
+ backgroundColor: "transparent",
1699
+ display: "flex",
1700
+ alignItems: "center",
1701
+ justifyContent: "center",
1702
+ color: "inherit",
1703
+ borderRadius: 4,
1704
+ padding: 4,
1705
+ cursor: "pointer",
1706
+ opacity: 0.7,
1707
+ "&:hover": {
1708
+ opacity: 1,
1709
+ backgroundColor: "rgba(0, 0, 0, 0.05)"
1710
+ },
1711
+ "&:focus": {
1712
+ boxShadow: "0 0 0 2px currentColor",
1713
+ opacity: 1
1714
+ }
1715
+ });
1716
+ }
1717
+ });
1718
+
1719
+ // src/components/Toast/components/ToastItem.tsx
1720
+ function ToastItem({
1721
+ toast,
1722
+ onRemove
1723
+ }) {
1724
+ const [open, setOpen] = (0, import_react13.useState)(true);
1725
+ const handleOpenChange = (open2) => {
1726
+ setOpen(open2);
1727
+ if (!open2) {
1728
+ onRemove(toast.id);
1729
+ }
1730
+ };
1731
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1732
+ ToastRoot,
1733
+ {
1734
+ type: toast.type,
1735
+ duration: toast.duration,
1736
+ open,
1737
+ onOpenChange: handleOpenChange,
1738
+ children: [
1739
+ (toast == null ? void 0 : toast.icon) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon_default, { name: toast.icon, size: "xl" }),
1740
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { style: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { typography: "bodyS", fontWeight: "medium", children: toast.message }) }),
1741
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ToastClose, { "aria-label": "Close", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon_default, { name: "xmark", size: "md" }) })
1742
+ ]
1743
+ }
1744
+ );
1745
+ }
1746
+ var import_react13, import_jsx_runtime23;
1747
+ var init_ToastItem = __esm({
1748
+ "src/components/Toast/components/ToastItem.tsx"() {
1749
+ "use strict";
1750
+ import_react13 = require("react");
1751
+ init_Icon();
1752
+ init_styles2();
1753
+ init_Text();
1754
+ import_jsx_runtime23 = require("react/jsx-runtime");
1755
+ }
1756
+ });
1757
+
1758
+ // src/components/Toast/components/ToastProvider.tsx
1759
+ function ToastProvider({
1760
+ children,
1761
+ defaultDuration = 5e3,
1762
+ maxToasts = 5,
1763
+ swipeDirection = "right"
1764
+ }) {
1765
+ const [toasts, setToasts] = (0, import_react14.useState)([]);
1766
+ const addToast = (toastData) => {
1767
+ const id = Math.random().toString(36).substr(2, 9);
1768
+ const newToast = __spreadProps(__spreadValues({
1769
+ id
1770
+ }, toastData), {
1771
+ type: (toastData == null ? void 0 : toastData.type) || "info",
1772
+ duration: (toastData == null ? void 0 : toastData.duration) || defaultDuration,
1773
+ createdAt: Date.now()
1774
+ });
1775
+ setToasts((prevToasts) => {
1776
+ const updatedToasts = [...prevToasts, newToast];
1777
+ return updatedToasts.slice(-maxToasts);
1778
+ });
1779
+ return id;
1780
+ };
1781
+ const removeToast = (id) => {
1782
+ setToasts((prevToasts) => prevToasts.filter((toast) => toast.id !== id));
1783
+ };
1784
+ const removeAllToasts = () => {
1785
+ setToasts([]);
1786
+ };
1787
+ const contextValue = {
1788
+ toasts,
1789
+ addToast,
1790
+ removeToast,
1791
+ removeAllToasts
1792
+ };
1793
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToastContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(ToastPrimitive2.Provider, { swipeDirection, children: [
1794
+ children,
1795
+ toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToastItem, { toast, onRemove: removeToast }, toast.id)),
1796
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToastViewport, {})
1797
+ ] }) });
1798
+ }
1799
+ var import_react14, ToastPrimitive2, import_jsx_runtime24, ToastContext;
1800
+ var init_ToastProvider = __esm({
1801
+ "src/components/Toast/components/ToastProvider.tsx"() {
1802
+ "use strict";
1803
+ import_react14 = require("react");
1804
+ ToastPrimitive2 = __toESM(require("@radix-ui/react-toast"));
1805
+ init_ToastItem();
1806
+ init_styles2();
1807
+ import_jsx_runtime24 = require("react/jsx-runtime");
1808
+ ToastContext = (0, import_react14.createContext)(null);
1809
+ }
1810
+ });
1811
+
1812
+ // src/components/Toast/hooks/useToast.ts
1813
+ var import_react15, useToast;
1814
+ var init_useToast = __esm({
1815
+ "src/components/Toast/hooks/useToast.ts"() {
1816
+ "use strict";
1817
+ import_react15 = require("react");
1818
+ init_ToastProvider();
1819
+ useToast = () => {
1820
+ const context = (0, import_react15.useContext)(ToastContext);
1821
+ if (!context) {
1822
+ throw new Error("useToast deve ser usado dentro de um ToastProvider");
1823
+ }
1824
+ return context;
1825
+ };
1826
+ }
1827
+ });
1828
+
1829
+ // src/utils/uploadService.ts
1830
+ var generateUniqueFilename, UploadService;
1831
+ var init_uploadService = __esm({
1832
+ "src/utils/uploadService.ts"() {
1833
+ "use strict";
1834
+ generateUniqueFilename = (originalName) => {
1835
+ const timestamp = Date.now().toString(36);
1836
+ const random = Math.random().toString(36).substring(2, 8);
1837
+ const extension = originalName.split(".").pop();
1838
+ return `${timestamp}_${random}.${extension}`;
1839
+ };
1840
+ UploadService = class {
1841
+ static getPresignedUrl(filename, contentType, config2) {
1842
+ return __async(this, null, function* () {
1843
+ var _a;
1844
+ const apiUrl = config2.apiUrl;
1845
+ const presignedUrlEndpoint = (_a = config2.endpoints) == null ? void 0 : _a.presignedUrl;
1846
+ const bucket = config2.s3Bucket;
1847
+ try {
1848
+ const response = yield fetch(`${apiUrl}${presignedUrlEndpoint}`, {
1849
+ method: "POST",
1850
+ headers: {
1851
+ "Content-Type": "application/json"
1852
+ },
1853
+ body: JSON.stringify({
1854
+ filename,
1855
+ contentType,
1856
+ bucket
1857
+ })
1858
+ });
1859
+ if (!response.ok) {
1860
+ throw new Error("Falha ao gerar URL de upload");
1861
+ }
1862
+ const data = yield response.json();
1863
+ return data.presignedUrl;
1864
+ } catch (error) {
1865
+ console.error("Erro ao gerar URL pr\xE9-assinada:", error);
1866
+ throw new Error("Falha ao gerar URL de upload");
1867
+ }
1868
+ });
1869
+ }
1870
+ static uploadToS3(file, config2, onProgress) {
1871
+ return __async(this, null, function* () {
1872
+ try {
1873
+ const uniqueFilename = generateUniqueFilename(file.name);
1874
+ const blob = new Blob([file], { type: file.type });
1875
+ const s3Url = `${config2.s3Url}/${uniqueFilename}`;
1876
+ return new Promise((resolve, reject) => {
1877
+ const xhr = new XMLHttpRequest();
1878
+ xhr.upload.addEventListener("progress", (event) => {
1879
+ if (event.lengthComputable) {
1880
+ const percentComplete = Math.round(
1881
+ event.loaded / event.total * 100
1882
+ );
1883
+ onProgress == null ? void 0 : onProgress({
1884
+ amount: percentComplete,
1885
+ message: `Fazendo upload... ${percentComplete}%`
1886
+ });
1887
+ }
1888
+ });
1889
+ xhr.addEventListener("load", () => {
1890
+ if (xhr.status === 200) {
1891
+ resolve({
1892
+ url: s3Url,
1893
+ filename: uniqueFilename,
1894
+ size: file.size,
1895
+ type: file.type
1896
+ });
1897
+ } else {
1898
+ reject(new Error(`Upload falhou com status: ${xhr.status}`));
1899
+ }
1900
+ });
1901
+ xhr.addEventListener("error", () => {
1902
+ reject(new Error("Erro de rede durante upload"));
1903
+ });
1904
+ xhr.open("PUT", s3Url);
1905
+ xhr.setRequestHeader("Content-Type", file.type);
1906
+ xhr.send(blob);
1907
+ });
1908
+ } catch (error) {
1909
+ console.error("Erro no upload:", error);
1910
+ throw error;
1911
+ }
1912
+ });
1913
+ }
1914
+ static uploadViaAPI(file, config2, onProgress) {
1915
+ return __async(this, null, function* () {
1916
+ try {
1917
+ const formData = new FormData();
1918
+ formData.append("file", file);
1919
+ const bucket = config2.s3Bucket;
1920
+ formData.append("bucket", bucket);
1921
+ const xhr = new XMLHttpRequest();
1922
+ return new Promise((resolve, reject) => {
1923
+ var _a;
1924
+ xhr.upload.addEventListener("progress", (event) => {
1925
+ if (event.lengthComputable) {
1926
+ const percentComplete = Math.round(
1927
+ event.loaded / event.total * 100
1928
+ );
1929
+ onProgress == null ? void 0 : onProgress({
1930
+ amount: percentComplete,
1931
+ message: `Fazendo upload... ${percentComplete}%`
1932
+ });
1933
+ }
1934
+ });
1935
+ xhr.addEventListener("load", () => {
1936
+ if (xhr.status === 200) {
1937
+ try {
1938
+ const response = JSON.parse(xhr.responseText);
1939
+ resolve({
1940
+ url: response.url,
1941
+ filename: response.filename,
1942
+ size: file.size,
1943
+ type: file.type
1944
+ });
1945
+ } catch (error) {
1946
+ reject(new Error("Resposta inv\xE1lida do servidor"));
1947
+ }
1948
+ } else {
1949
+ reject(new Error(`Upload falhou com status: ${xhr.status}`));
1950
+ }
1951
+ });
1952
+ xhr.addEventListener("error", () => {
1953
+ reject(new Error("Erro de rede durante upload"));
1954
+ });
1955
+ const apiUrl = config2.apiUrl;
1956
+ const uploadEndpoint = (_a = config2.endpoints) == null ? void 0 : _a.upload;
1957
+ xhr.open("POST", `${apiUrl}${uploadEndpoint}`);
1958
+ xhr.send(formData);
1959
+ });
1960
+ } catch (error) {
1961
+ console.error("Erro no upload via API:", error);
1962
+ throw error;
1963
+ }
1964
+ });
1965
+ }
1966
+ };
1967
+ }
1968
+ });
1969
+
1970
+ // src/components/RichEditor/styledComponents.ts
1971
+ var QuillContainer, QuillEditor;
1972
+ var init_styledComponents = __esm({
1973
+ "src/components/RichEditor/styledComponents.ts"() {
1974
+ "use strict";
1975
+ init_styles();
1976
+ QuillContainer = styled("div", {
1977
+ display: "flex",
1978
+ flexDirection: "column"
1979
+ });
1980
+ QuillEditor = styled("div", {
1981
+ "& .ql-editor": {
1982
+ minHeight: "200px",
1983
+ padding: "$12",
1984
+ fontSize: "$14",
1985
+ lineHeight: "$base",
1986
+ fontFamily: "$default",
1987
+ color: "$neutral900",
1988
+ backgroundColor: "$white",
1989
+ border: "none",
1990
+ outline: "none",
1991
+ cursor: "text",
1992
+ caretColor: "$primary500",
1993
+ "&:focus": {
1994
+ borderColor: "$primary500",
1995
+ boxShadow: "0 0 0 1px $primary500"
1996
+ },
1997
+ "& p": {
1998
+ margin: "0 0 $8 0"
1999
+ },
2000
+ "& p:last-child": {
2001
+ marginBottom: 0
2002
+ },
2003
+ "& .ql-cursor": {
2004
+ borderLeft: "2px solid $primary500"
2005
+ }
2006
+ },
2007
+ "& .ql-toolbar": {
2008
+ backgroundColor: "$grey100",
2009
+ border: "1px solid $neutral300",
2010
+ borderBottom: "none",
2011
+ borderTopLeftRadius: "$sm",
2012
+ borderTopRightRadius: "$sm",
2013
+ padding: "$8 $12"
2014
+ },
2015
+ "& .ql-container": {
2016
+ border: "1px solid $neutral300",
2017
+ borderTop: "none",
2018
+ borderBottomLeftRadius: "$sm",
2019
+ borderBottomRightRadius: "$sm",
2020
+ fontFamily: "$default"
2021
+ },
2022
+ "& .ql-snow .ql-picker.ql-header .ql-picker-item[data-value='1']::before": {
2023
+ content: "T\xEDtulo 1"
2024
+ },
2025
+ "& .ql-snow .ql-picker.ql-header .ql-picker-item[data-value='2']::before": {
2026
+ content: "T\xEDtulo 2"
2027
+ }
2028
+ });
2029
+ }
2030
+ });
2031
+
2032
+ // src/components/RichEditor/QuillComponent.tsx
2033
+ var QuillComponent_exports = {};
2034
+ __export(QuillComponent_exports, {
2035
+ default: () => QuillComponent_default
2036
+ });
2037
+ var import_react20, import_react_quilljs, import_quill_snow, import_jsx_runtime51, QuillComponent, QuillComponent_default;
2038
+ var init_QuillComponent = __esm({
2039
+ "src/components/RichEditor/QuillComponent.tsx"() {
2040
+ "use strict";
2041
+ import_react20 = require("react");
2042
+ import_react_quilljs = require("react-quilljs");
2043
+ import_quill_snow = require("quill/dist/quill.snow.css");
2044
+ init_Flex();
2045
+ init_Text();
2046
+ init_useToast();
2047
+ init_uploadService();
2048
+ init_styledComponents();
2049
+ import_jsx_runtime51 = require("react/jsx-runtime");
2050
+ QuillComponent = ({
2051
+ value = "",
2052
+ onChange,
2053
+ placeholder = "Digite seu texto aqui...",
2054
+ disabled = false,
2055
+ className,
2056
+ uploadConfig
2057
+ }) => {
2058
+ const [showVideoModal, setShowVideoModal] = (0, import_react20.useState)(false);
2059
+ const [videoUrl, setVideoUrl] = (0, import_react20.useState)("");
2060
+ const [showLinkModal, setShowLinkModal] = (0, import_react20.useState)(false);
2061
+ const [linkUrl, setLinkUrl] = (0, import_react20.useState)("");
2062
+ const videoModalRef = (0, import_react20.useRef)(null);
2063
+ const linkModalRef = (0, import_react20.useRef)(null);
2064
+ const { addToast, removeToast } = useToast();
2065
+ const modules = {
2066
+ toolbar: [
2067
+ [{ header: [1, 2, false] }],
2068
+ ["bold", "italic", "underline", "strike"],
2069
+ [{ color: [] }, { background: [] }],
2070
+ [{ align: [] }],
2071
+ [{ list: "ordered" }, { list: "bullet" }],
2072
+ ["link", "image", "video"]
2073
+ ],
2074
+ clipboard: {
2075
+ matchVisual: false
2076
+ }
2077
+ };
2078
+ const formats = [
2079
+ "header",
2080
+ "bold",
2081
+ "italic",
2082
+ "underline",
2083
+ "strike",
2084
+ "color",
2085
+ "background",
2086
+ "align",
2087
+ "list",
2088
+ "link",
2089
+ "image",
2090
+ "video"
2091
+ ];
2092
+ const { quill, quillRef } = (0, import_react_quilljs.useQuill)({
2093
+ theme: "snow",
2094
+ modules,
2095
+ formats,
2096
+ placeholder,
2097
+ readOnly: disabled
2098
+ });
2099
+ const handleImageUpload = (0, import_react20.useCallback)(
2100
+ (file) => __async(null, null, function* () {
2101
+ if (disabled || !quill || !uploadConfig) return;
2102
+ try {
2103
+ addToast({
2104
+ type: "info",
2105
+ message: "Carregando imagem...",
2106
+ duration: 2e3
2107
+ });
2108
+ const uploadedFile = yield UploadService.uploadToS3(file, uploadConfig);
2109
+ removeToast("info");
2110
+ addToast({
2111
+ type: "success",
2112
+ message: "Imagem adicionada com sucesso!"
2113
+ });
2114
+ const selection = quill.getSelection();
2115
+ const index = selection ? selection.index : quill.getLength();
2116
+ quill.insertEmbed(index, "image", uploadedFile.url);
2117
+ quill.setSelection(index + 1, 0);
2118
+ } catch (error) {
2119
+ console.error("Erro no upload:", error);
2120
+ addToast({
2121
+ type: "error",
2122
+ message: "Erro no upload: N\xE3o foi poss\xEDvel enviar a imagem. Tente novamente."
2123
+ });
2124
+ }
2125
+ }),
2126
+ [disabled, quill, addToast, removeToast, uploadConfig]
2127
+ );
2128
+ (0, import_react20.useEffect)(() => {
2129
+ if (quill && value) {
2130
+ const currentContent = quill.root.innerHTML;
2131
+ if (currentContent !== value) {
2132
+ const selection = quill.getSelection();
2133
+ quill.clipboard.dangerouslyPasteHTML(value);
2134
+ if (selection) {
2135
+ quill.setSelection(selection.index, selection.length);
2136
+ } else {
2137
+ quill.setSelection(quill.getLength(), 0);
2138
+ }
2139
+ }
2140
+ }
2141
+ }, [quill, value]);
2142
+ (0, import_react20.useEffect)(() => {
2143
+ if (quill) {
2144
+ quill.on("text-change", (delta, oldDelta, source) => {
2145
+ if (source === "user") {
2146
+ const html = quill.root.innerHTML;
2147
+ onChange == null ? void 0 : onChange(html);
2148
+ }
2149
+ });
2150
+ const toolbar = quill.getModule("toolbar");
2151
+ if (toolbar) {
2152
+ toolbar.addHandler("link", () => setShowLinkModal(true));
2153
+ toolbar.addHandler("video", () => setShowVideoModal(true));
2154
+ toolbar.addHandler("image", () => {
2155
+ const input = document.createElement("input");
2156
+ input.setAttribute("type", "file");
2157
+ input.setAttribute("accept", "image/*");
2158
+ input.click();
2159
+ input.onchange = () => __async(null, null, function* () {
2160
+ var _a;
2161
+ const file = (_a = input.files) == null ? void 0 : _a[0];
2162
+ if (file) {
2163
+ yield handleImageUpload(file);
2164
+ }
2165
+ });
2166
+ });
2167
+ }
2168
+ setTimeout(() => {
2169
+ var _a, _b;
2170
+ const toolbarElement = (_b = (_a = quillRef.current) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
2171
+ if (toolbarElement) {
2172
+ const headerSelect = toolbarElement.querySelector(
2173
+ "select[data-value]"
2174
+ );
2175
+ if (headerSelect) {
2176
+ const options = headerSelect.querySelectorAll("option");
2177
+ options.forEach((option) => {
2178
+ if (option.value === "1") {
2179
+ option.textContent = "T\xEDtulo 1";
2180
+ } else if (option.value === "2") {
2181
+ option.textContent = "T\xEDtulo 2";
2182
+ } else if (option.value === "") {
2183
+ option.textContent = "Normal";
2184
+ }
2185
+ });
2186
+ }
2187
+ }
2188
+ }, 2e3);
2189
+ }
2190
+ }, [quill, onChange, handleImageUpload]);
2191
+ (0, import_react20.useEffect)(() => {
2192
+ if (quill) {
2193
+ quill.enable(!disabled);
2194
+ if (!disabled) {
2195
+ if (quill.getLength() <= 1) {
2196
+ quill.focus();
2197
+ quill.setSelection(0, 0);
2198
+ }
2199
+ }
2200
+ }
2201
+ }, [quill, disabled]);
2202
+ const handleLinkCancel = (0, import_react20.useCallback)(() => {
2203
+ setLinkUrl("");
2204
+ setShowLinkModal(false);
2205
+ }, []);
2206
+ const handleLinkSubmit = (0, import_react20.useCallback)(() => {
2207
+ if (!linkUrl.trim() || !quill) return;
2208
+ const url = linkUrl.trim();
2209
+ const selection = quill.getSelection();
2210
+ if (selection && selection.length > 0) {
2211
+ quill.format("link", url);
2212
+ } else {
2213
+ const index = quill.getLength();
2214
+ quill.insertText(index, url, "link", url);
2215
+ quill.setSelection(index + url.length, 0);
2216
+ }
2217
+ setLinkUrl("");
2218
+ setShowLinkModal(false);
2219
+ }, [linkUrl, quill]);
2220
+ const handleVideoCancel = (0, import_react20.useCallback)(() => {
2221
+ setVideoUrl("");
2222
+ setShowVideoModal(false);
2223
+ }, []);
2224
+ const handleVideoSubmit = (0, import_react20.useCallback)(() => {
2225
+ var _a, _b;
2226
+ if (!videoUrl.trim() || !quill) return;
2227
+ let processedUrl = videoUrl.trim();
2228
+ if (processedUrl.includes("youtube.com/watch")) {
2229
+ const videoId = (_a = processedUrl.match(/[?&]v=([^&]+)/)) == null ? void 0 : _a[1];
2230
+ if (videoId) {
2231
+ processedUrl = `https://www.youtube.com/embed/${videoId}`;
2232
+ }
2233
+ } else if (processedUrl.includes("youtu.be/")) {
2234
+ const videoId = (_b = processedUrl.split("youtu.be/")[1]) == null ? void 0 : _b.split("?")[0];
2235
+ if (videoId) {
2236
+ processedUrl = `https://www.youtube.com/embed/${videoId}`;
2237
+ }
2238
+ }
2239
+ const videoHTML = `
2240
+ <iframe
2241
+ src="${processedUrl}"
2242
+ style="max-width:100%; height:315px; border:0;"
2243
+ title="Video player"
2244
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
2245
+ allowfullscreen>
2246
+ </iframe>
2247
+ <br/>
2248
+ `;
2249
+ const selection = quill.getSelection();
2250
+ const insertIndex = selection ? selection.index : quill.getLength();
2251
+ quill.clipboard.dangerouslyPasteHTML(insertIndex, videoHTML);
2252
+ quill.setSelection(insertIndex + 1, 0);
2253
+ setVideoUrl("");
2254
+ setShowVideoModal(false);
2255
+ }, [videoUrl, quill]);
2256
+ (0, import_react20.useEffect)(() => {
2257
+ const handleClickOutside = (event) => {
2258
+ if (showVideoModal && videoModalRef.current && !videoModalRef.current.contains(event.target)) {
2259
+ handleVideoCancel();
2260
+ }
2261
+ if (showLinkModal && linkModalRef.current && !linkModalRef.current.contains(event.target)) {
2262
+ handleLinkCancel();
2263
+ }
2264
+ };
2265
+ document.addEventListener("mousedown", handleClickOutside);
2266
+ return () => document.removeEventListener("mousedown", handleClickOutside);
2267
+ }, [showVideoModal, showLinkModal, handleVideoCancel, handleLinkCancel]);
2268
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuillContainer, { className, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(QuillEditor, { style: { position: "relative" }, children: [
2269
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { ref: quillRef }),
2270
+ showVideoModal && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2271
+ "div",
2272
+ {
2273
+ ref: videoModalRef,
2274
+ style: {
2275
+ position: "absolute",
2276
+ top: "20px",
2277
+ left: "20px",
2278
+ right: "20px",
2279
+ backgroundColor: "white",
2280
+ border: "1px solid #e0e0e0",
2281
+ borderRadius: "4px",
2282
+ padding: "12px",
2283
+ boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
2284
+ zIndex: 1e3,
2285
+ width: "fit-content"
2286
+ },
2287
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Flex2, { gap: 8, align: "center", children: [
2288
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2289
+ Text,
2290
+ {
2291
+ style: { fontSize: "14px", fontWeight: "500", color: "#333" },
2292
+ children: "V\xEDdeo:"
2293
+ }
2294
+ ),
2295
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2296
+ "input",
2297
+ {
2298
+ type: "text",
2299
+ value: videoUrl,
2300
+ onChange: (e) => setVideoUrl(e.target.value),
2301
+ placeholder: "Embed URL",
2302
+ style: {
2303
+ padding: "8px 12px",
2304
+ border: "1px solid #d0d0d0",
2305
+ borderRadius: "4px",
2306
+ fontSize: "14px",
2307
+ backgroundColor: "#f8f8f8"
2308
+ },
2309
+ onKeyDown: (e) => {
2310
+ if (e.key === "Enter") {
2311
+ handleVideoSubmit();
2312
+ } else if (e.key === "Escape") {
2313
+ handleVideoCancel();
2314
+ }
2315
+ },
2316
+ autoFocus: true
2317
+ }
2318
+ ),
2319
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2320
+ "button",
2321
+ {
2322
+ onClick: handleVideoSubmit,
2323
+ disabled: !videoUrl.trim(),
2324
+ style: {
2325
+ padding: "8px 16px",
2326
+ backgroundColor: "#007bff",
2327
+ color: "white",
2328
+ border: "none",
2329
+ borderRadius: "4px",
2330
+ fontSize: "14px",
2331
+ cursor: videoUrl.trim() ? "pointer" : "not-allowed",
2332
+ opacity: videoUrl.trim() ? 1 : 0.6
2333
+ },
2334
+ children: "Ok"
2335
+ }
2336
+ )
2337
+ ] })
2338
+ }
2339
+ ),
2340
+ showLinkModal && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2341
+ "div",
2342
+ {
2343
+ ref: linkModalRef,
2344
+ style: {
2345
+ position: "absolute",
2346
+ top: "20px",
2347
+ left: "20px",
2348
+ right: "20px",
2349
+ backgroundColor: "white",
2350
+ border: "1px solid #e0e0e0",
2351
+ borderRadius: "4px",
2352
+ padding: "12px",
2353
+ boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
2354
+ zIndex: 1e3,
2355
+ width: "fit-content"
2356
+ },
2357
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Flex2, { gap: 8, align: "center", children: [
2358
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2359
+ Text,
2360
+ {
2361
+ style: { fontSize: "14px", fontWeight: "500", color: "#333" },
2362
+ children: "Link:"
2363
+ }
2364
+ ),
2365
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2366
+ "input",
2367
+ {
2368
+ type: "text",
2369
+ value: linkUrl,
2370
+ onChange: (e) => setLinkUrl(e.target.value),
2371
+ placeholder: "URL do link",
2372
+ style: {
2373
+ padding: "8px 12px",
2374
+ border: "1px solid #d0d0d0",
2375
+ borderRadius: "4px",
2376
+ fontSize: "14px",
2377
+ backgroundColor: "#f8f8f8",
2378
+ width: "300px"
2379
+ },
2380
+ onKeyDown: (e) => {
2381
+ if (e.key === "Enter") {
2382
+ handleLinkSubmit();
2383
+ } else if (e.key === "Escape") {
2384
+ handleLinkCancel();
2385
+ }
2386
+ },
2387
+ autoFocus: true
2388
+ }
2389
+ ),
2390
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2391
+ "button",
2392
+ {
2393
+ onClick: handleLinkSubmit,
2394
+ disabled: !linkUrl.trim(),
2395
+ style: {
2396
+ padding: "8px 16px",
2397
+ backgroundColor: "#007bff",
2398
+ color: "white",
2399
+ border: "none",
2400
+ borderRadius: "4px",
2401
+ fontSize: "14px",
2402
+ cursor: linkUrl.trim() ? "pointer" : "not-allowed",
2403
+ opacity: linkUrl.trim() ? 1 : 0.6
2404
+ },
2405
+ children: "Ok"
2406
+ }
2407
+ )
2408
+ ] })
2409
+ }
2410
+ )
2411
+ ] }) });
2412
+ };
2413
+ QuillComponent_default = QuillComponent;
2414
+ }
2415
+ });
2416
+
862
2417
  // src/index.tsx
863
2418
  var index_exports = {};
864
2419
  __export(index_exports, {
@@ -932,6 +2487,7 @@ __export(index_exports, {
932
2487
  StepTrigger: () => StepTrigger,
933
2488
  StepWrapper: () => StepWrapper,
934
2489
  Switch: () => Switch,
2490
+ SwitchFormField: () => SwitchFormField,
935
2491
  SwitchStyled: () => SwitchStyled,
936
2492
  Text: () => Text,
937
2493
  TextAreaFormField: () => TextAreaFormField,
@@ -956,595 +2512,21 @@ __export(index_exports, {
956
2512
  TooltipContent: () => TooltipContent,
957
2513
  TooltipProvider: () => TooltipProvider,
958
2514
  TooltipRoot: () => TooltipRoot,
959
- TooltipTrigger: () => TooltipTrigger,
960
- UploadService: () => UploadService,
961
- isValidCNPJ: () => isValidCNPJ,
962
- maskFormat: () => maskFormat,
963
- maskUnformat: () => maskUnformat,
964
- useImageUpload: () => useImageUpload,
965
- useToast: () => useToast
966
- });
967
- module.exports = __toCommonJS(index_exports);
968
-
969
- // src/components/Icon.tsx
970
- var import_react_fontawesome = require("@fortawesome/react-fontawesome");
971
- var import_fontawesome_svg_core = require("@fortawesome/fontawesome-svg-core");
972
- var import_free_solid_svg_icons = require("@fortawesome/free-solid-svg-icons");
973
- var import_free_regular_svg_icons = require("@fortawesome/free-regular-svg-icons");
974
- var import_free_brands_svg_icons = require("@fortawesome/free-brands-svg-icons");
975
- var import_prop_types = __toESM(require_prop_types());
976
- var import_jsx_runtime = require("react/jsx-runtime");
977
- import_fontawesome_svg_core.library.add(import_free_solid_svg_icons.fas, import_free_regular_svg_icons.far, import_free_brands_svg_icons.fab);
978
- var Icon = (_a) => {
979
- var _b = _a, { name, prefix = "fas", size = "sm", color = "currentColor", className = "" } = _b, props = __objRest(_b, ["name", "prefix", "size", "color", "className"]);
980
- var _a2, _b2;
981
- const sizeMap = {
982
- "xs": { width: "0.625rem", height: "0.625rem", fontSize: "0.625rem" },
983
- "sm": { width: "0.625rem", height: "0.625rem", fontSize: "0.625rem" },
984
- "md": { width: "0.75rem", height: "0.75rem", fontSize: "0.75rem" },
985
- "xl": { width: "1rem", height: "1rem", fontSize: "1rem" },
986
- undefined: { width: "0.75rem", height: "0.75rem", fontSize: "0.75rem" }
987
- };
988
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
989
- import_react_fontawesome.FontAwesomeIcon,
990
- __spreadProps(__spreadValues({
991
- icon: [prefix, name],
992
- style: sizeMap[size],
993
- color,
994
- className
995
- }, props), {
996
- width: (_a2 = sizeMap[size]) == null ? void 0 : _a2.width,
997
- height: (_b2 = sizeMap[size]) == null ? void 0 : _b2.height
998
- })
999
- );
1000
- };
1001
- Icon.propTypes = {
1002
- name: import_prop_types.default.string.isRequired,
1003
- prefix: import_prop_types.default.string,
1004
- size: import_prop_types.default.string,
1005
- color: import_prop_types.default.string,
1006
- className: import_prop_types.default.string
1007
- };
1008
- var Icon_default = Icon;
1009
-
1010
- // ../tokens/dist/index.mjs
1011
- var colors = {
1012
- brand50: "#DBE8FF",
1013
- brand100: "#BDD5FF",
1014
- brand200: "#7AABFF",
1015
- brand300: "#3881FF",
1016
- brand400: "#005AF5",
1017
- brand500: "#004ED2",
1018
- brand600: "#0042B2",
1019
- brand700: "#00348F",
1020
- brand800: "#00276B",
1021
- brand900: "#001A47",
1022
- brand950: "#000D24",
1023
- blue50: "#E5F1FF",
1024
- blue100: "#CCE4FF",
1025
- blue200: "#9AC9FF",
1026
- blue300: "#66ADFF",
1027
- blue400: "#3392FF",
1028
- blue500: "#0278FE",
1029
- blue600: "#005FCD",
1030
- blue700: "#004799",
1031
- blue800: "#013066",
1032
- blue900: "#001834",
1033
- blue950: "#000C1A",
1034
- red50: "#FCEEEF",
1035
- red100: "#F9DCDF",
1036
- red200: "#F3BEC3",
1037
- red300: "#ED9CA2",
1038
- red400: "#E77982",
1039
- red500: "#E15662",
1040
- red600: "#DB3644",
1041
- red700: "#AD1F2B",
1042
- red800: "#75151D",
1043
- red900: "#380A0E",
1044
- red950: "#1E0507",
1045
- pink100: "#F9DCF3",
1046
- purple50: "#F3EFFB",
1047
- purple100: "#E6DEF7",
1048
- purple200: "#D1C2F0",
1049
- purple300: "#B9A1E8",
1050
- purple400: "#A080E0",
1051
- purple500: "#8961D8",
1052
- purple600: "#6431C8",
1053
- purple700: "#4B2597",
1054
- purple800: "#331966",
1055
- purple900: "#180C31",
1056
- purple950: "#0C0619",
1057
- yellow50: "#FFF9E6",
1058
- yellow100: "#FFF3CD",
1059
- yellow200: "#FFE69C",
1060
- yellow300: "#FFDA6A",
1061
- yellow400: "#FFCD39",
1062
- yellow500: "#FFC107",
1063
- yellow600: "#CC9A06",
1064
- yellow700: "#997404",
1065
- yellow800: "#664D03",
1066
- yellow900: "#332701",
1067
- yellow950: "#191300",
1068
- orange100: "#FEE0D8",
1069
- dark50: "#FFFFFF",
1070
- dark100: "#F4F4F4",
1071
- dark200: "#EAEBF0",
1072
- dark300: "#C2C3C7",
1073
- dark400: "#A9ABB1",
1074
- dark500: "#808289",
1075
- dark600: "#4C4F54",
1076
- dark700: "#34363B",
1077
- dark800: "#1E2023",
1078
- dark900: "#040507",
1079
- dark950: "#030303",
1080
- neutral50: "#FFFFFF",
1081
- neutral100: "#F4F4F4",
1082
- neutral200: "#EAEBF0",
1083
- neutral300: "#C2C3C7",
1084
- neutral400: "#A9ABB1",
1085
- neutral500: "#808289",
1086
- neutral600: "#4C4F54",
1087
- neutral700: "#34363B",
1088
- neutral800: "#1E2023",
1089
- neutral900: "#040507",
1090
- neutral950: "#030303",
1091
- green50: "#E6F9EA",
1092
- green100: "#CDF4D5",
1093
- green200: "#9BE8AC",
1094
- green300: "#6CD783",
1095
- green400: "#5BCA72",
1096
- green500: "#26A743",
1097
- green600: "#1E8535",
1098
- green700: "#176427",
1099
- green800: "#0F421A",
1100
- green900: "#08210D",
1101
- green950: "#041107",
1102
- grey50: "#F4F8FB",
1103
- grey100: "#E6EEF4",
1104
- grey200: "#DBE7F0",
1105
- grey300: "#BCCEDD",
1106
- grey400: "#9FB6C7",
1107
- grey500: "#849DAE",
1108
- grey600: "#698496",
1109
- grey700: "#516A7A",
1110
- grey800: "#394F61",
1111
- grey900: "#233543",
1112
- grey950: "#101B23",
1113
- error50: "#FCEEEF",
1114
- error100: "#F9DCDF",
1115
- error200: "#F3BEC3",
1116
- error300: "#ED9CA2",
1117
- error400: "#E77982",
1118
- error500: "#E15662",
1119
- error600: "#DB3644",
1120
- error700: "#AD1F2B",
1121
- error800: "#75151D",
1122
- error900: "#380A0E",
1123
- error950: "#1E0507",
1124
- success50: "#E6F9EA",
1125
- success100: "#CDF4D5",
1126
- success200: "#9BE8AC",
1127
- success300: "#6CD783",
1128
- success400: "#5BCA72",
1129
- success500: "#26A743",
1130
- success600: "#1E8535",
1131
- success700: "#176427",
1132
- success800: "#0F421A",
1133
- success900: "#08210D",
1134
- success950: "#041107",
1135
- warning50: "#FFF9E6",
1136
- warning100: "#FFF3CD",
1137
- warning200: "#FFE69C",
1138
- warning300: "#FFDA6A",
1139
- warning400: "#FFCD39",
1140
- warning500: "#FFC107",
1141
- warning600: "#CC9A06",
1142
- warning700: "#997404",
1143
- warning800: "#664D03",
1144
- warning900: "#332701",
1145
- warning950: "#191300",
1146
- info50: "#E5F1FF",
1147
- info100: "#CCE4FF",
1148
- info200: "#9AC9FF",
1149
- info300: "#66ADFF",
1150
- info400: "#3392FF",
1151
- info500: "#0278FE",
1152
- info600: "#005FCD",
1153
- info700: "#004799",
1154
- info800: "#013066",
1155
- info900: "#001834",
1156
- info950: "#000C1A",
1157
- shadow50: "#546B923D"
1158
- };
1159
- var fonts = {
1160
- default: '"Work Sans", sans-serif'
1161
- };
1162
- var fontSizes = {
1163
- 2: "0.125rem",
1164
- 4: "0.25rem",
1165
- 6: "0.375rem",
1166
- 8: "0.5rem",
1167
- 10: "0.625rem",
1168
- 12: "0.75rem",
1169
- 13: "0.8125rem",
1170
- 14: "0.875rem",
1171
- 16: "1rem",
1172
- 18: "1.125rem",
1173
- 20: "1.25rem",
1174
- 22: "1.375rem",
1175
- 24: "1.5rem",
1176
- 32: "2rem",
1177
- 36: "2.25rem",
1178
- 40: "2.5rem",
1179
- 48: "3rem",
1180
- 56: "3.5rem",
1181
- 64: "4rem",
1182
- 72: "4.5rem",
1183
- 80: "5rem",
1184
- xs: "0.375rem",
1185
- sm: "0.5rem",
1186
- md: "0.75rem",
1187
- lg: "1rem",
1188
- "2xl": "1.5rem",
1189
- "3xl": "2rem",
1190
- "4xl": "2.5rem",
1191
- full: "62.4375rem",
1192
- displayLarge: "3.5rem",
1193
- displayMedium: "3rem",
1194
- displaySmall: "2.25rem",
1195
- headline1: "2.5rem",
1196
- headline2: "2rem",
1197
- headline3: "1.75rem",
1198
- headline4: "1.375rem",
1199
- headline5: "1.25rem",
1200
- headline6: "1.125rem",
1201
- headline7: "1rem",
1202
- headline8: "0.875rem",
1203
- bodyXL: "1.25rem",
1204
- bodyL: "1.125rem",
1205
- bodyM: "1rem",
1206
- bodyS: "0.875rem",
1207
- bodyXS: "0.8125rem",
1208
- bodyXXS: "0.75rem",
1209
- buttonLarge: "1.25rem",
1210
- buttonMedium: "0.875rem",
1211
- buttonSmall: "0.875rem",
1212
- buttonExtraSmall: "0.75rem",
1213
- badgeLarge: "1rem",
1214
- badgeMedium: "0.875rem",
1215
- badgeSmall: "0.75rem",
1216
- badgeExtraSmall: "0.625rem",
1217
- tooltip: "0.875rem",
1218
- popoversRegular: "0.875rem",
1219
- labelLarge: "1rem",
1220
- labelMedium: "0.875rem",
1221
- labelSmall: "0.8125rem",
1222
- labelExtraSmall: "0.75rem",
1223
- captionLarge: "0.8125rem",
1224
- captionMedium: "0.75rem",
1225
- captionSmall: "0.625rem"
1226
- };
1227
- var fontWeights = {
1228
- regular: "400",
1229
- medium: "500",
1230
- semibold: "600",
1231
- bold: "700"
1232
- };
1233
- var lineHeights = {
1234
- smaller: "112.5%",
1235
- // 4px
1236
- shorter: "125%",
1237
- // 8px
1238
- short: "137.5%",
1239
- // 12px
1240
- base: "150%",
1241
- // 16px
1242
- tall: "175%",
1243
- // 24px
1244
- displayLarge: "4.5rem",
1245
- displayMedium: "4rem",
1246
- displaySmall: "3.25rem",
1247
- headline1: "3.25rem",
1248
- headline2: "2.75rem",
1249
- headline3: "2.5rem",
1250
- headline4: "1.75rem",
1251
- headline5: "1.5rem",
1252
- headline6: "1.375rem",
1253
- headline7: "1.5rem",
1254
- headline8: "1.25rem",
1255
- bodyXL: "1.75rem",
1256
- bodyL: "1.625rem",
1257
- bodyM: "1.5rem",
1258
- bodyS: "1.25rem",
1259
- bodyXS: "1.125rem",
1260
- bodyXXS: "1rem",
1261
- buttonLarge: "1.25rem",
1262
- buttonMedium: "1rem",
1263
- buttonSmall: "0.875rem",
1264
- buttonExtraSmall: "0.75rem",
1265
- badgeLarge: "1rem",
1266
- badgeMedium: "0.875rem",
1267
- badgeSmall: "0.75rem",
1268
- badgeExtraSmall: "0.625rem",
1269
- tooltip: "1rem",
1270
- popoversRegular: "1rem",
1271
- labelLarge: "1.125rem",
1272
- labelMedium: "1.125rem",
1273
- labelSmall: "1rem",
1274
- labelExtraSmall: "1rem",
1275
- captionLarge: "1rem",
1276
- captionMedium: "0.875rem",
1277
- captionSmall: "0.75rem"
1278
- };
1279
- var radii = {
1280
- "3xs": "2px",
1281
- "2xs": "4px",
1282
- "xs": "6px",
1283
- "sm": "8px",
1284
- "md": "10px",
1285
- "lg": "12px",
1286
- "xl": "14px",
1287
- "2xl": "16px",
1288
- "3xl": "18px",
1289
- "4xl": "20px",
1290
- "5xl": "22px",
1291
- "6xl": "24px",
1292
- "7xl": "32px",
1293
- "8xl": "36px",
1294
- "9xl": "40px",
1295
- "10xl": "48px",
1296
- "11xl": "56px",
1297
- "12xl": "64px",
1298
- "13xl": "72px",
1299
- "14xl": "80px",
1300
- full: "99999px"
1301
- };
1302
- var space = {
1303
- 2: "0.125rem",
1304
- 4: "0.25rem",
1305
- 6: "0.375rem",
1306
- 8: "0.5rem",
1307
- 10: "0.625rem",
1308
- 12: "0.75rem",
1309
- 13: "0.8125rem",
1310
- 14: "0.875rem",
1311
- 16: "1rem",
1312
- 18: "1.125rem",
1313
- 20: "1.25rem",
1314
- 22: "1.375rem",
1315
- 24: "1.5rem",
1316
- 32: "2rem",
1317
- 36: "2.25rem",
1318
- 40: "2.5rem",
1319
- 48: "3rem",
1320
- 56: "3.5rem",
1321
- 64: "4rem",
1322
- 72: "4.5rem",
1323
- 80: "5rem",
1324
- full: "62.4375rem"
1325
- };
1326
-
1327
- // src/styles/index.ts
1328
- var import_react = require("@stitches/react");
1329
- var {
1330
- styled,
1331
- css,
1332
- globalCss,
1333
- keyframes,
1334
- getCssText,
1335
- theme,
1336
- createTheme,
1337
- config
1338
- } = (0, import_react.createStitches)({
1339
- themeMap: __spreadProps(__spreadValues({}, import_react.defaultThemeMap), {
1340
- height: "space",
1341
- width: "space",
1342
- gap: "space"
1343
- }),
1344
- theme: {
1345
- colors,
1346
- fontSizes,
1347
- fonts,
1348
- fontWeights,
1349
- lineHeights,
1350
- radii,
1351
- space
1352
- }
1353
- });
1354
-
1355
- // src/components/Text.tsx
1356
- var import_themes = require("@radix-ui/themes");
1357
-
1358
- // src/types/typographyValues.ts
1359
- var typographyValues = {
1360
- displayLarge: {
1361
- fontSize: "$displayLarge",
1362
- lineHeight: "$displayLarge",
1363
- letterSpacing: "$displayLarge"
1364
- },
1365
- displayMedium: {
1366
- fontSize: "$displayMedium",
1367
- lineHeight: "$displayMedium",
1368
- letterSpacing: "$displayMedium"
1369
- },
1370
- displaySmall: {
1371
- fontSize: "$displaySmall",
1372
- lineHeight: "$displaySmall",
1373
- letterSpacing: "$displaySmall"
1374
- },
1375
- headline1: {
1376
- fontSize: "$headline1",
1377
- lineHeight: "$headline1"
1378
- },
1379
- headline2: {
1380
- fontSize: "$headline2",
1381
- lineHeight: "$headline2"
1382
- },
1383
- headline3: {
1384
- fontSize: "$headline3",
1385
- lineHeight: "$headline3"
1386
- },
1387
- headline4: {
1388
- fontSize: "$headline4",
1389
- lineHeight: "$headline4"
1390
- },
1391
- headline5: {
1392
- fontSize: "$headline5",
1393
- lineHeight: "$headline5"
1394
- },
1395
- headline6: {
1396
- fontSize: "$headline6",
1397
- lineHeight: "$headline6"
1398
- },
1399
- headline7: {
1400
- fontSize: "$headline7",
1401
- lineHeight: "$headline7"
1402
- },
1403
- headline8: {
1404
- fontSize: "$headline8",
1405
- lineHeight: "$headline8"
1406
- },
1407
- bodyXL: {
1408
- fontSize: "$bodyXL",
1409
- lineHeight: "$bodyXL"
1410
- },
1411
- bodyL: {
1412
- fontSize: "$bodyL",
1413
- lineHeight: "$bodyL"
1414
- },
1415
- bodyM: {
1416
- fontSize: "$bodyM",
1417
- lineHeight: "$bodyM"
1418
- },
1419
- bodyS: {
1420
- fontSize: "$bodyS",
1421
- lineHeight: "$bodyS"
1422
- },
1423
- bodyXS: {
1424
- fontSize: "$bodyXS",
1425
- lineHeight: "$bodyXS"
1426
- },
1427
- bodyXXS: {
1428
- fontSize: "$bodyXXS",
1429
- lineHeight: "$bodyXXS"
1430
- },
1431
- badgeLarge: {
1432
- fontSize: "$badgeLarge",
1433
- lineHeight: "$badgeLarge"
1434
- },
1435
- badgeMedium: {
1436
- fontSize: "$badgeMedium",
1437
- lineHeight: "$badgeMedium"
1438
- },
1439
- badgeSmall: {
1440
- fontSize: "$badgeSmall",
1441
- lineHeight: "$badgeSmall"
1442
- },
1443
- badgeExtraSmall: {
1444
- fontSize: "$badgeExtraSmall",
1445
- lineHeight: "$badgeExtraSmall"
1446
- },
1447
- tooltip: {
1448
- fontSize: "$tooltip",
1449
- lineHeight: "$tooltip"
1450
- },
1451
- popoversRegular: {
1452
- fontSize: "$popoversRegular",
1453
- lineHeight: "$popoversRegular"
1454
- },
1455
- captionLarge: {
1456
- fontSize: "$captionLarge",
1457
- lineHeight: "$captionLarge"
1458
- },
1459
- captionMedium: {
1460
- fontSize: "$captionMedium",
1461
- lineHeight: "$captionMedium"
1462
- },
1463
- captionSmall: {
1464
- fontSize: "$captionSmall",
1465
- lineHeight: "$captionSmall"
1466
- },
1467
- buttonLarge: {
1468
- fontSize: "$buttonLarge",
1469
- lineHeight: "$buttonLarge"
1470
- },
1471
- buttonMedium: {
1472
- fontSize: "$buttonMedium",
1473
- lineHeight: "$buttonMedium"
1474
- },
1475
- buttonSmall: {
1476
- fontSize: "$buttonSmall",
1477
- lineHeight: "$buttonSmall"
1478
- },
1479
- buttonExtraSmall: {
1480
- fontSize: "$buttonExtraSmall",
1481
- lineHeight: "$buttonExtraSmall"
1482
- },
1483
- labelLarge: {
1484
- fontSize: "$labelLarge",
1485
- lineHeight: "$labelLarge"
1486
- },
1487
- labelMedium: {
1488
- fontSize: "$labelMedium",
1489
- lineHeight: "$labelMedium"
1490
- },
1491
- labelSmall: {
1492
- fontSize: "$labelSmall",
1493
- lineHeight: "$labelSmall"
1494
- },
1495
- labelExtraSmall: {
1496
- fontSize: "$labelExtraSmall",
1497
- lineHeight: "$labelExtraSmall"
1498
- }
1499
- };
1500
- var typographyLabelValues = {
1501
- labelLarge: {
1502
- fontSize: "$labelLarge",
1503
- lineHeight: "$labelLarge"
1504
- },
1505
- labelMedium: {
1506
- fontSize: "$labelMedium",
1507
- lineHeight: "$labelMedium"
1508
- },
1509
- labelSmall: {
1510
- fontSize: "$labelSmall",
1511
- lineHeight: "$labelSmall"
1512
- },
1513
- labelExtraSmall: {
1514
- fontSize: "$labelExtraSmall",
1515
- lineHeight: "$labelExtraSmall"
1516
- }
1517
- };
1518
-
1519
- // src/components/Text.tsx
1520
- var import_jsx_runtime2 = require("react/jsx-runtime");
1521
- var TextStyle = styled(import_themes.Text, {
1522
- fontFamily: "$default",
1523
- lineHeight: "$base",
1524
- variants: {
1525
- typography: typographyValues,
1526
- fontWeight: {
1527
- regular: { fontWeight: "$regular" },
1528
- medium: { fontWeight: "$medium" },
1529
- semibold: { fontWeight: "$semibold" },
1530
- bold: { fontWeight: "$bold" }
1531
- }
1532
- }
1533
- });
1534
- function Text(_a) {
1535
- var _b = _a, { color } = _b, props = __objRest(_b, ["color"]);
1536
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1537
- TextStyle,
1538
- __spreadProps(__spreadValues({}, props), {
1539
- css: __spreadValues({
1540
- color: color ? "$" + color : "$dark600"
1541
- }, props.css)
1542
- })
1543
- );
1544
- }
2515
+ TooltipTrigger: () => TooltipTrigger,
2516
+ UploadService: () => UploadService,
2517
+ isValidCNPJ: () => isValidCNPJ,
2518
+ maskFormat: () => maskFormat,
2519
+ maskUnformat: () => maskUnformat,
2520
+ useImageUpload: () => useImageUpload,
2521
+ useToast: () => useToast
2522
+ });
2523
+ module.exports = __toCommonJS(index_exports);
2524
+ init_Icon();
2525
+ init_Text();
1545
2526
 
1546
2527
  // src/components/Button/styledComponents.ts
1547
2528
  var import_themes2 = require("@radix-ui/themes");
2529
+ init_styles();
1548
2530
  var ButtonStyled = styled(import_themes2.Button, {
1549
2531
  $$buttonColor: "inherit",
1550
2532
  $$buttonBgColor: "$colors$grey50",
@@ -1838,6 +2820,7 @@ function Button(_a) {
1838
2820
  }
1839
2821
 
1840
2822
  // src/components/ButtonGroup.tsx
2823
+ init_styles();
1841
2824
  var import_themes4 = require("@radix-ui/themes");
1842
2825
  var import_jsx_runtime4 = require("react/jsx-runtime");
1843
2826
  var ButtonItemStyled = styled(import_themes4.Button, {
@@ -2313,6 +3296,7 @@ function ButtonGroup(_a) {
2313
3296
  }
2314
3297
 
2315
3298
  // src/components/Avatar.tsx
3299
+ init_styles();
2316
3300
  var import_themes5 = require("@radix-ui/themes");
2317
3301
  var import_jsx_runtime5 = require("react/jsx-runtime");
2318
3302
  var AvatarStyled = styled(import_themes5.Avatar, {
@@ -2364,118 +3348,12 @@ function Avatar(_a) {
2364
3348
 
2365
3349
  // src/components/TextField.tsx
2366
3350
  var import_react2 = __toESM(require("react"));
3351
+ init_styles();
2367
3352
  var import_themes7 = require("@radix-ui/themes");
2368
-
2369
- // src/components/Flex.tsx
2370
- var import_themes6 = require("@radix-ui/themes");
2371
- var import_jsx_runtime6 = require("react/jsx-runtime");
2372
- var FlexStyled = styled(import_themes6.Flex, {
2373
- variants: {
2374
- display: {
2375
- "flex": { display: "flex" },
2376
- "inline-flex": { display: "inline-flex" }
2377
- },
2378
- align: {
2379
- start: { alignItems: "flex-start" },
2380
- center: { alignItems: "center" },
2381
- end: { alignItems: "flex-end" },
2382
- stretch: { alignItems: "stretch" },
2383
- baseline: { alignItems: "baseline" }
2384
- },
2385
- justify: {
2386
- start: { justifyContent: "flex-start" },
2387
- center: { justifyContent: "center" },
2388
- end: { justifyContent: "flex-end" },
2389
- between: { justifyContent: "space-between" },
2390
- around: { justifyContent: "space-around" },
2391
- evenly: { justifyContent: "space-evenly" }
2392
- },
2393
- direction: {
2394
- row: { flexDirection: "row" },
2395
- column: { flexDirection: "column" },
2396
- "row-reverse": { flexDirection: "row-reverse" },
2397
- "column-reverse": { flexDirection: "column-reverse" }
2398
- },
2399
- gap: {
2400
- 0: { gap: "0px" },
2401
- 2: { gap: "$2" },
2402
- 4: { gap: "$4" },
2403
- 6: { gap: "$6" },
2404
- 8: { gap: "$8" },
2405
- 10: { gap: "$10" },
2406
- 12: { gap: "$12" },
2407
- 14: { gap: "$14" },
2408
- 16: { gap: "$16" },
2409
- 20: { gap: "$20" },
2410
- 22: { gap: "$22" },
2411
- 24: { gap: "$24" },
2412
- 32: { gap: "$32" },
2413
- 36: { gap: "$36" },
2414
- 40: { gap: "$40" },
2415
- 48: { gap: "$48" },
2416
- 56: { gap: "$56" },
2417
- 64: { gap: "$64" },
2418
- 72: { gap: "$72" },
2419
- 80: { gap: "$80" },
2420
- full: { gap: "$full" }
2421
- },
2422
- gapY: {
2423
- 2: { gap: "$2" },
2424
- 4: { gap: "$4" },
2425
- 6: { gap: "$6" },
2426
- 8: { gap: "$8" },
2427
- 10: { gap: "$10" },
2428
- 12: { gap: "$12" },
2429
- 14: { gap: "$14" },
2430
- 16: { gap: "$16" },
2431
- 20: { gap: "$20" },
2432
- 22: { gap: "$22" },
2433
- 24: { gap: "$24" },
2434
- 32: { gap: "$32" },
2435
- 36: { gap: "$36" },
2436
- 40: { gap: "$40" },
2437
- 48: { gap: "$48" },
2438
- 56: { gap: "$56" },
2439
- 64: { gap: "$64" },
2440
- 72: { gap: "$72" },
2441
- 80: { gap: "$80" },
2442
- full: { gap: "$full" }
2443
- },
2444
- gapX: {
2445
- 2: { gap: "$2" },
2446
- 4: { gap: "$4" },
2447
- 6: { gap: "$6" },
2448
- 8: { gap: "$8" },
2449
- 10: { gap: "$10" },
2450
- 12: { gap: "$12" },
2451
- 14: { gap: "$14" },
2452
- 16: { gap: "$16" },
2453
- 20: { gap: "$20" },
2454
- 22: { gap: "$22" },
2455
- 24: { gap: "$24" },
2456
- 32: { gap: "$32" },
2457
- 36: { gap: "$36" },
2458
- 40: { gap: "$40" },
2459
- 48: { gap: "$48" },
2460
- 56: { gap: "$56" },
2461
- 64: { gap: "$64" },
2462
- 72: { gap: "$72" },
2463
- 80: { gap: "$80" },
2464
- full: { gap: "$full" }
2465
- }
2466
- },
2467
- defaultVariants: {
2468
- display: "flex",
2469
- direction: "row",
2470
- gap: 10
2471
- }
2472
- });
2473
- function Flex2(_a) {
2474
- var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
2475
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FlexStyled, __spreadProps(__spreadValues({}, props), { children }));
2476
- }
2477
-
2478
- // src/components/TextField.tsx
3353
+ init_Icon();
3354
+ init_typographyValues();
3355
+ init_Text();
3356
+ init_Flex();
2479
3357
  var import_mask = require("@react-input/mask");
2480
3358
  var import_jsx_runtime7 = require("react/jsx-runtime");
2481
3359
  var TextFieldStyled = styled(import_themes7.TextField.Root, {
@@ -2806,7 +3684,9 @@ function TextFieldSlot(_a) {
2806
3684
  }
2807
3685
 
2808
3686
  // src/components/RadioGroup.tsx
3687
+ init_styles();
2809
3688
  var import_themes8 = require("@radix-ui/themes");
3689
+ init_typographyValues();
2810
3690
  var import_jsx_runtime8 = require("react/jsx-runtime");
2811
3691
  var RadioGroupStyled = styled(import_themes8.RadioGroup.Root, {
2812
3692
  fontFamily: "$default",
@@ -2996,7 +3876,9 @@ function RadioItem(_a) {
2996
3876
  }
2997
3877
 
2998
3878
  // src/components/CheckboxGroup.tsx
3879
+ init_styles();
2999
3880
  var import_themes9 = require("@radix-ui/themes");
3881
+ init_typographyValues();
3000
3882
  var import_jsx_runtime9 = require("react/jsx-runtime");
3001
3883
  var CheckboxGroupStyled = styled(import_themes9.CheckboxGroup.Root, {
3002
3884
  fontFamily: "$default",
@@ -3150,7 +4032,10 @@ function CheckboxItem(_a) {
3150
4032
  }
3151
4033
 
3152
4034
  // src/components/Filter.tsx
4035
+ init_styles();
3153
4036
  var import_themes10 = require("@radix-ui/themes");
4037
+ init_Icon();
4038
+ init_typographyValues();
3154
4039
  var import_jsx_runtime10 = require("react/jsx-runtime");
3155
4040
  var FilterContentStyled = styled(import_themes10.DropdownMenu.Content, {
3156
4041
  background: "white",
@@ -3292,7 +4177,10 @@ function FilterItem(_a) {
3292
4177
  // src/components/Dropdown.tsx
3293
4178
  var import_react3 = __toESM(require("react"));
3294
4179
  var import_free_solid_svg_icons2 = require("@fortawesome/free-solid-svg-icons");
4180
+ init_typographyValues();
3295
4181
  var import_react_fontawesome2 = require("@fortawesome/react-fontawesome");
4182
+ init_dist();
4183
+ init_styles();
3296
4184
  var import_jsx_runtime11 = require("react/jsx-runtime");
3297
4185
  var DropdownMenuItemStyled = styled("div", {
3298
4186
  fontFamily: "$default",
@@ -3552,6 +4440,7 @@ function DropdownMenuItem(_a) {
3552
4440
 
3553
4441
  // src/components/Badge.tsx
3554
4442
  var import_react4 = __toESM(require("react"));
4443
+ init_styles();
3555
4444
  var import_themes11 = require("@radix-ui/themes");
3556
4445
  var import_jsx_runtime12 = require("react/jsx-runtime");
3557
4446
  var BadgeStyled = styled(import_themes11.Badge, {
@@ -3664,13 +4553,16 @@ function Badge(_a) {
3664
4553
  }
3665
4554
 
3666
4555
  // src/components/Modal.tsx
4556
+ init_styles();
3667
4557
  var import_radix_ui = require("radix-ui");
4558
+ init_Icon();
3668
4559
 
3669
4560
  // src/components/Box.tsx
3670
4561
  var import_themes12 = require("@radix-ui/themes");
3671
4562
  var Box = import_themes12.Box;
3672
4563
 
3673
4564
  // src/components/Modal.tsx
4565
+ init_Text();
3674
4566
  var import_jsx_runtime13 = require("react/jsx-runtime");
3675
4567
  var ModalContentStyled = styled(import_radix_ui.Dialog.Content, {
3676
4568
  fontFamily: "$default",
@@ -3735,6 +4627,7 @@ function Modal(_a) {
3735
4627
  var import_react6 = require("react");
3736
4628
 
3737
4629
  // src/components/MenuDropdown/styledComponents.ts
4630
+ init_styles();
3738
4631
  var MenuDropdownContainerStyled = styled("div", {
3739
4632
  position: "relative",
3740
4633
  width: "fit-content"
@@ -3765,6 +4658,9 @@ var MenuItemsContainerStyled = styled("div", {
3765
4658
  height: "fit-content"
3766
4659
  });
3767
4660
 
4661
+ // src/components/MenuDropdown/index.tsx
4662
+ init_Icon();
4663
+
3768
4664
  // src/hooks/useOnClickOutside.tsx
3769
4665
  var import_react5 = require("react");
3770
4666
  function useOnClickOutside(ref, handler) {
@@ -7707,7 +8603,11 @@ function cleanEscapedString2(input) {
7707
8603
  return input.match(escapedStringRegExp2)[1].replace(doubleQuoteRegExp2, "'");
7708
8604
  }
7709
8605
 
8606
+ // src/components/Calendar/index.tsx
8607
+ init_Icon();
8608
+
7710
8609
  // src/components/Calendar/styledComponents.ts
8610
+ init_styles();
7711
8611
  var CalendarStyled = styled("div", {
7712
8612
  fontFamily: "$default",
7713
8613
  lineHeight: "$base",
@@ -8066,8 +8966,11 @@ function Calendar(_a) {
8066
8966
 
8067
8967
  // src/components/Drawer/index.tsx
8068
8968
  var import_react8 = require("react");
8969
+ init_dist();
8970
+ init_Icon();
8069
8971
 
8070
8972
  // src/components/Drawer/styledComponents.ts
8973
+ init_styles();
8071
8974
  var DrawerOverlayStyled = styled("div", {
8072
8975
  position: "fixed",
8073
8976
  top: 0,
@@ -8184,6 +9087,9 @@ function Drawer({
8184
9087
 
8185
9088
  // src/components/TimePicker.tsx
8186
9089
  var import_react9 = require("react");
9090
+ init_Text();
9091
+ init_Icon();
9092
+ init_styles();
8187
9093
  var import_jsx_runtime17 = require("react/jsx-runtime");
8188
9094
  var TimePickerStyled = styled("div", {
8189
9095
  position: "relative",
@@ -8508,7 +9414,11 @@ function TimePicker({
8508
9414
  }
8509
9415
 
8510
9416
  // src/components/Alert.tsx
9417
+ init_styles();
8511
9418
  var import_themes13 = require("@radix-ui/themes");
9419
+ init_Flex();
9420
+ init_Icon();
9421
+ init_Text();
8512
9422
  var import_jsx_runtime18 = require("react/jsx-runtime");
8513
9423
  var AlertDialogSimpleStyled = styled(import_themes13.AlertDialog.Content, {
8514
9424
  fontFamily: "$default",
@@ -8749,6 +9659,7 @@ function Alert(_a) {
8749
9659
 
8750
9660
  // src/components/Switch.tsx
8751
9661
  var import_themes14 = require("@radix-ui/themes");
9662
+ init_styles();
8752
9663
  var import_jsx_runtime19 = require("react/jsx-runtime");
8753
9664
  var SwitchStyled = styled(import_themes14.Switch, {
8754
9665
  all: "unset",
@@ -8848,6 +9759,7 @@ function Switch(props) {
8848
9759
 
8849
9760
  // src/components/Step.tsx
8850
9761
  var import_react10 = __toESM(require("react"));
9762
+ init_styles();
8851
9763
  var import_themes15 = require("@radix-ui/themes");
8852
9764
  var import_jsx_runtime20 = require("react/jsx-runtime");
8853
9765
  var StepStyled = styled("div", {
@@ -8980,6 +9892,7 @@ function StepWrapper(_a) {
8980
9892
  }
8981
9893
 
8982
9894
  // src/components/Card.tsx
9895
+ init_styles();
8983
9896
  var import_themes16 = require("@radix-ui/themes");
8984
9897
  var import_jsx_runtime21 = require("react/jsx-runtime");
8985
9898
  var CardStyled = styled(import_themes16.Card, {
@@ -9022,7 +9935,10 @@ function Card(_a) {
9022
9935
 
9023
9936
  // src/components/TextareaField.tsx
9024
9937
  var import_themes17 = require("@radix-ui/themes");
9938
+ init_styles();
9025
9939
  var import_react11 = __toESM(require("react"));
9940
+ init_typographyValues();
9941
+ init_Text();
9026
9942
  var import_jsx_runtime22 = require("react/jsx-runtime");
9027
9943
  var TextareaFieldStyle = styled(import_themes17.TextArea, {
9028
9944
  display: "flex",
@@ -9091,253 +10007,49 @@ var TextareaField = import_react11.default.forwardRef((_a, forwardedRef) => {
9091
10007
  var _b = _a, { maxLength, color } = _b, props = __objRest(_b, ["maxLength", "color"]);
9092
10008
  const inputRef = (0, import_react11.useRef)(null);
9093
10009
  const [remaining, setRemaining] = (0, import_react11.useState)(maxLength);
9094
- (0, import_react11.useEffect)(() => {
9095
- var _a2;
9096
- if (maxLength && inputRef.current) {
9097
- setRemaining(maxLength - ((_a2 = inputRef.current.value.length) != null ? _a2 : 0));
9098
- }
9099
- }, [maxLength]);
9100
- const handleInput = (e) => {
9101
- var _a2;
9102
- if (maxLength) {
9103
- setRemaining(maxLength - e.currentTarget.value.length);
9104
- }
9105
- (_a2 = props.onInput) == null ? void 0 : _a2.call(props, e);
9106
- };
9107
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(TextareaContainer, { color, children: [
9108
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
9109
- TextareaFieldStyle,
9110
- __spreadValues({
9111
- rows: 4,
9112
- ref: (r) => {
9113
- if (!r) return;
9114
- inputRef.current = r;
9115
- if (forwardedRef) {
9116
- if (typeof forwardedRef === "function") forwardedRef(r);
9117
- else forwardedRef.current = r;
9118
- }
9119
- },
9120
- onInput: handleInput,
9121
- maxLength
9122
- }, props)
9123
- ),
9124
- maxLength && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TextareaLimitIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { typography: "badgeMedium", children: remaining }) })
9125
- ] });
9126
- });
9127
-
9128
- // src/components/Toast/components/ToastItem.tsx
9129
- var import_react13 = require("react");
9130
-
9131
- // src/components/Toast/styles/index.ts
9132
- var import_react12 = require("@stitches/react");
9133
- var ToastPrimitive = __toESM(require("@radix-ui/react-toast"));
9134
- var slideIn = (0, import_react12.keyframes)({
9135
- from: {
9136
- transform: "translateX(calc(100% + 25px))",
9137
- opacity: 0
9138
- },
9139
- to: {
9140
- transform: "translateX(0)",
9141
- opacity: 1
9142
- }
9143
- });
9144
- var slideOut = (0, import_react12.keyframes)({
9145
- from: {
9146
- transform: "translateX(0)",
9147
- opacity: 1
9148
- },
9149
- to: {
9150
- transform: "translateX(calc(100% + 25px))",
9151
- opacity: 0
9152
- }
9153
- });
9154
- var swipeOut = (0, import_react12.keyframes)({
9155
- from: {
9156
- transform: "translateX(var(--radix-toast-swipe-end-x))",
9157
- opacity: 1
9158
- },
9159
- to: {
9160
- transform: "translateX(calc(100% + 25px))",
9161
- opacity: 0
9162
- }
9163
- });
9164
- var ToastViewport = styled(ToastPrimitive.Viewport, {
9165
- position: "fixed",
9166
- top: 0,
9167
- right: 0,
9168
- display: "flex",
9169
- flexDirection: "column",
9170
- padding: 25,
9171
- gap: 10,
9172
- width: 390,
9173
- maxWidth: "100vw",
9174
- margin: 0,
9175
- listStyle: "none",
9176
- zIndex: 2147483647,
9177
- outline: "none"
9178
- });
9179
- var ToastRoot = styled(ToastPrimitive.Root, {
9180
- backgroundColor: "$neutral50",
9181
- borderRadius: "$sm",
9182
- boxShadow: "hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px",
9183
- padding: "$16",
9184
- gap: "$8",
9185
- display: "flex",
9186
- alignItems: "center",
9187
- border: "1px solid",
9188
- position: "relative",
9189
- zIndex: 9999,
9190
- '&[data-state="open"]': {
9191
- animation: `${slideIn} 150ms cubic-bezier(0.16, 1, 0.3, 1)`
9192
- },
9193
- '&[data-state="closed"]': {
9194
- animation: `${slideOut} 100ms ease-in`
9195
- },
9196
- '&[data-swipe="move"]': {
9197
- transform: "translateX(var(--radix-toast-swipe-move-x))"
9198
- },
9199
- '&[data-swipe="cancel"]': {
9200
- transform: "translateX(0)",
9201
- transition: "transform 200ms ease-out"
9202
- },
9203
- '&[data-swipe="end"]': {
9204
- animation: `${swipeOut} 100ms ease-out`
9205
- },
9206
- $$toastColor: "inherit",
9207
- color: "$$toastColor",
9208
- borderColor: "$$toastColor",
9209
- variants: {
9210
- type: {
9211
- success: {
9212
- $$toastColor: "$colors$success600",
9213
- backgroundColor: "$success50"
9214
- },
9215
- error: {
9216
- $$toastColor: "$colors$error600",
9217
- backgroundColor: "$error50"
9218
- },
9219
- warning: {
9220
- $$toastColor: "$colors$warning600",
9221
- backgroundColor: "$warning50"
9222
- },
9223
- info: {
9224
- $$toastColor: "$colors$info600",
9225
- backgroundColor: "$info50"
9226
- }
9227
- }
9228
- },
9229
- defaultVariants: {
9230
- type: "info"
9231
- }
9232
- });
9233
- var ToastClose = styled(ToastPrimitive.Close, {
9234
- border: "none",
9235
- backgroundColor: "transparent",
9236
- display: "flex",
9237
- alignItems: "center",
9238
- justifyContent: "center",
9239
- color: "inherit",
9240
- borderRadius: 4,
9241
- padding: 4,
9242
- cursor: "pointer",
9243
- opacity: 0.7,
9244
- "&:hover": {
9245
- opacity: 1,
9246
- backgroundColor: "rgba(0, 0, 0, 0.05)"
9247
- },
9248
- "&:focus": {
9249
- boxShadow: "0 0 0 2px currentColor",
9250
- opacity: 1
9251
- }
9252
- });
9253
-
9254
- // src/components/Toast/components/ToastItem.tsx
9255
- var import_jsx_runtime23 = require("react/jsx-runtime");
9256
- function ToastItem({
9257
- toast,
9258
- onRemove
9259
- }) {
9260
- const [open, setOpen] = (0, import_react13.useState)(true);
9261
- const handleOpenChange = (open2) => {
9262
- setOpen(open2);
9263
- if (!open2) {
9264
- onRemove(toast.id);
9265
- }
9266
- };
9267
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
9268
- ToastRoot,
9269
- {
9270
- type: toast.type,
9271
- duration: toast.duration,
9272
- open,
9273
- onOpenChange: handleOpenChange,
9274
- children: [
9275
- (toast == null ? void 0 : toast.icon) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon_default, { name: toast.icon, size: "xl" }),
9276
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { style: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { typography: "bodyS", fontWeight: "medium", children: toast.message }) }),
9277
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ToastClose, { "aria-label": "Close", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon_default, { name: "xmark", size: "md" }) })
9278
- ]
9279
- }
9280
- );
9281
- }
9282
-
9283
- // src/components/Toast/components/ToastProvider.tsx
9284
- var import_react14 = require("react");
9285
- var ToastPrimitive2 = __toESM(require("@radix-ui/react-toast"));
9286
- var import_jsx_runtime24 = require("react/jsx-runtime");
9287
- var ToastContext = (0, import_react14.createContext)(null);
9288
- function ToastProvider({
9289
- children,
9290
- defaultDuration = 5e3,
9291
- maxToasts = 5,
9292
- swipeDirection = "right"
9293
- }) {
9294
- const [toasts, setToasts] = (0, import_react14.useState)([]);
9295
- const addToast = (toastData) => {
9296
- const id = Math.random().toString(36).substr(2, 9);
9297
- const newToast = __spreadProps(__spreadValues({
9298
- id
9299
- }, toastData), {
9300
- type: (toastData == null ? void 0 : toastData.type) || "info",
9301
- duration: (toastData == null ? void 0 : toastData.duration) || defaultDuration,
9302
- createdAt: Date.now()
9303
- });
9304
- setToasts((prevToasts) => {
9305
- const updatedToasts = [...prevToasts, newToast];
9306
- return updatedToasts.slice(-maxToasts);
9307
- });
9308
- return id;
9309
- };
9310
- const removeToast = (id) => {
9311
- setToasts((prevToasts) => prevToasts.filter((toast) => toast.id !== id));
9312
- };
9313
- const removeAllToasts = () => {
9314
- setToasts([]);
9315
- };
9316
- const contextValue = {
9317
- toasts,
9318
- addToast,
9319
- removeToast,
9320
- removeAllToasts
10010
+ (0, import_react11.useEffect)(() => {
10011
+ var _a2;
10012
+ if (maxLength && inputRef.current) {
10013
+ setRemaining(maxLength - ((_a2 = inputRef.current.value.length) != null ? _a2 : 0));
10014
+ }
10015
+ }, [maxLength]);
10016
+ const handleInput = (e) => {
10017
+ var _a2;
10018
+ if (maxLength) {
10019
+ setRemaining(maxLength - e.currentTarget.value.length);
10020
+ }
10021
+ (_a2 = props.onInput) == null ? void 0 : _a2.call(props, e);
9321
10022
  };
9322
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToastContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(ToastPrimitive2.Provider, { swipeDirection, children: [
9323
- children,
9324
- toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToastItem, { toast, onRemove: removeToast }, toast.id)),
9325
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToastViewport, {})
9326
- ] }) });
9327
- }
10023
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(TextareaContainer, { color, children: [
10024
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10025
+ TextareaFieldStyle,
10026
+ __spreadValues({
10027
+ rows: 4,
10028
+ ref: (r) => {
10029
+ if (!r) return;
10030
+ inputRef.current = r;
10031
+ if (forwardedRef) {
10032
+ if (typeof forwardedRef === "function") forwardedRef(r);
10033
+ else forwardedRef.current = r;
10034
+ }
10035
+ },
10036
+ onInput: handleInput,
10037
+ maxLength
10038
+ }, props)
10039
+ ),
10040
+ maxLength && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TextareaLimitIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { typography: "badgeMedium", children: remaining }) })
10041
+ ] });
10042
+ });
9328
10043
 
9329
- // src/components/Toast/hooks/useToast.ts
9330
- var import_react15 = require("react");
9331
- var useToast = () => {
9332
- const context = (0, import_react15.useContext)(ToastContext);
9333
- if (!context) {
9334
- throw new Error("useToast deve ser usado dentro de um ToastProvider");
9335
- }
9336
- return context;
9337
- };
10044
+ // src/components/Toast/index.tsx
10045
+ init_ToastItem();
10046
+ init_ToastProvider();
10047
+ init_useToast();
9338
10048
 
9339
10049
  // src/components/Tooltip/index.tsx
9340
10050
  var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
10051
+ init_styles();
10052
+ init_Text();
9341
10053
  var import_jsx_runtime25 = require("react/jsx-runtime");
9342
10054
  var TooltipProvider = TooltipPrimitive.Provider;
9343
10055
  var TooltipRoot = TooltipPrimitive.Root;
@@ -9389,9 +10101,13 @@ function Tooltip({
9389
10101
  // src/components/MultiSelect.tsx
9390
10102
  var import_react16 = __toESM(require("react"));
9391
10103
  var import_themes18 = require("@radix-ui/themes");
10104
+ init_styles();
10105
+ init_Text();
9392
10106
  var import_react_fontawesome3 = require("@fortawesome/react-fontawesome");
9393
10107
  var import_free_solid_svg_icons3 = require("@fortawesome/free-solid-svg-icons");
10108
+ init_dist();
9394
10109
  var import_react17 = require("react");
10110
+ init_Flex();
9395
10111
  var import_jsx_runtime26 = require("react/jsx-runtime");
9396
10112
  var StyledContent = styled(import_themes18.DropdownMenu.Content, {
9397
10113
  backgroundColor: "$dark50",
@@ -9655,7 +10371,11 @@ var MultiSelect = import_react16.default.forwardRef(
9655
10371
  }
9656
10372
  );
9657
10373
 
10374
+ // src/index.tsx
10375
+ init_Flex();
10376
+
9658
10377
  // src/components/Grid.tsx
10378
+ init_styles();
9659
10379
  var import_themes19 = require("@radix-ui/themes");
9660
10380
  var import_jsx_runtime27 = require("react/jsx-runtime");
9661
10381
  var GridStyled = styled(import_themes19.Grid, {
@@ -9783,6 +10503,7 @@ function Grid(_a) {
9783
10503
  }
9784
10504
 
9785
10505
  // src/components/Container.tsx
10506
+ init_styles();
9786
10507
  var import_themes20 = require("@radix-ui/themes");
9787
10508
  var import_jsx_runtime28 = require("react/jsx-runtime");
9788
10509
  var ContainerStyled = styled(import_themes20.Container, {
@@ -9818,6 +10539,7 @@ function Container(_a) {
9818
10539
  }
9819
10540
 
9820
10541
  // src/components/Section.tsx
10542
+ init_styles();
9821
10543
  var import_themes21 = require("@radix-ui/themes");
9822
10544
  var import_jsx_runtime29 = require("react/jsx-runtime");
9823
10545
  var SectionStyled = styled(import_themes21.Section, {
@@ -9849,6 +10571,9 @@ function Section(_a) {
9849
10571
  // src/components/FormFields/subComponents/ErrorFormMessage.tsx
9850
10572
  var import_free_solid_svg_icons4 = require("@fortawesome/free-solid-svg-icons");
9851
10573
  var import_react_fontawesome4 = require("@fortawesome/react-fontawesome");
10574
+ init_dist();
10575
+ init_Flex();
10576
+ init_Text();
9852
10577
  var import_jsx_runtime30 = require("react/jsx-runtime");
9853
10578
  var ErrorFormMessage = ({ message: message2 }) => {
9854
10579
  if (!message2) return null;
@@ -9862,6 +10587,7 @@ var ErrorFormMessage = ({ message: message2 }) => {
9862
10587
  };
9863
10588
 
9864
10589
  // src/components/FormFields/subComponents/FormLabel.tsx
10590
+ init_Text();
9865
10591
  var import_jsx_runtime31 = require("react/jsx-runtime");
9866
10592
  var FormLabel = ({
9867
10593
  name,
@@ -9887,6 +10613,7 @@ var FormLabel = ({
9887
10613
 
9888
10614
  // src/components/FormFields/TextAreaFormField.tsx
9889
10615
  var import_react_hook_form = require("react-hook-form");
10616
+ init_Flex();
9890
10617
  var import_jsx_runtime32 = require("react/jsx-runtime");
9891
10618
  var TextAreaFormField = (_a) => {
9892
10619
  var _b = _a, {
@@ -9939,6 +10666,7 @@ var TextAreaFormField = (_a) => {
9939
10666
 
9940
10667
  // src/components/FormFields/TextFormField.tsx
9941
10668
  var import_react_hook_form2 = require("react-hook-form");
10669
+ init_Flex();
9942
10670
  var import_react18 = require("react");
9943
10671
  var import_mask2 = require("@react-input/mask");
9944
10672
  var import_jsx_runtime33 = require("react/jsx-runtime");
@@ -10045,6 +10773,7 @@ var Form = (_a) => {
10045
10773
 
10046
10774
  // src/components/FormFields/MultiSelectFormField.tsx
10047
10775
  var import_react_hook_form4 = require("react-hook-form");
10776
+ init_Flex();
10048
10777
  var import_jsx_runtime35 = require("react/jsx-runtime");
10049
10778
  var MultiSelectFormField = (_a) => {
10050
10779
  var _b = _a, {
@@ -10152,6 +10881,7 @@ var PhoneFormField = ({
10152
10881
 
10153
10882
  // src/components/FormFields/CPFFormField.tsx
10154
10883
  var import_react_hook_form5 = require("react-hook-form");
10884
+ init_Flex();
10155
10885
  var import_jsx_runtime37 = require("react/jsx-runtime");
10156
10886
  var isValidCPF = (cpf) => {
10157
10887
  cpf = cpf.replace(/[^\d]+/g, "");
@@ -10377,8 +11107,12 @@ var IdentityDocumentNumberFormField = ({
10377
11107
  // src/components/FormFields/AddressFormFields/index.tsx
10378
11108
  var import_react_hook_form8 = require("react-hook-form");
10379
11109
 
11110
+ // src/components/FormFields/AddressFormFields/CountryFormField.tsx
11111
+ init_Flex();
11112
+
10380
11113
  // src/components/FormFields/SelectFormField.tsx
10381
11114
  var import_react_hook_form6 = require("react-hook-form");
11115
+ init_Flex();
10382
11116
 
10383
11117
  // src/utils/getNestedValue.ts
10384
11118
  function getNestedValue(obj, path) {
@@ -10670,6 +11404,7 @@ function CityFormField({
10670
11404
  }
10671
11405
 
10672
11406
  // src/components/FormFields/AddressFormFields/index.tsx
11407
+ init_styles();
10673
11408
  var import_jsx_runtime46 = require("react/jsx-runtime");
10674
11409
  function getNestedValue2(obj, path) {
10675
11410
  return path.split(".").reduce((acc, key) => acc == null ? void 0 : acc[key], obj);
@@ -10799,6 +11534,7 @@ function AddressFormFields({
10799
11534
 
10800
11535
  // src/components/FormFields/RadioGroupFormField.tsx
10801
11536
  var import_react_hook_form9 = require("react-hook-form");
11537
+ init_Flex();
10802
11538
  var import_jsx_runtime47 = require("react/jsx-runtime");
10803
11539
  var RadioGroupFormField = ({
10804
11540
  name,
@@ -10860,6 +11596,7 @@ var RadioGroupFormField = ({
10860
11596
 
10861
11597
  // src/components/FormFields/CheckboxGroupFormField.tsx
10862
11598
  var import_react_hook_form10 = require("react-hook-form");
11599
+ init_Flex();
10863
11600
  var import_jsx_runtime48 = require("react/jsx-runtime");
10864
11601
  var CheckboxGroupFormField = ({
10865
11602
  name,
@@ -10926,15 +11663,53 @@ var CheckboxGroupFormField = ({
10926
11663
  ] });
10927
11664
  };
10928
11665
 
10929
- // src/components/FormFields/EmailFormField.tsx
11666
+ // src/components/FormFields/SwitchFormField.tsx
11667
+ var import_react_hook_form11 = require("react-hook-form");
11668
+ init_Flex();
11669
+ init_Text();
10930
11670
  var import_jsx_runtime49 = require("react/jsx-runtime");
11671
+ var SwitchFormField = ({
11672
+ name,
11673
+ label,
11674
+ defaultValue = false,
11675
+ watch = false
11676
+ }) => {
11677
+ const {
11678
+ control,
11679
+ watch: watchForm
11680
+ } = (0, import_react_hook_form11.useFormContext)();
11681
+ if (watch) {
11682
+ watchForm(name);
11683
+ }
11684
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Flex2, { justify: "between", style: { margin: "1rem 0" }, children: [
11685
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { typography: "labelMedium", fontWeight: "regular", children: label }),
11686
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11687
+ import_react_hook_form11.Controller,
11688
+ {
11689
+ control,
11690
+ name,
11691
+ defaultValue,
11692
+ render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11693
+ Switch,
11694
+ {
11695
+ checked: field.value,
11696
+ onCheckedChange: field.onChange
11697
+ }
11698
+ )
11699
+ }
11700
+ )
11701
+ ] });
11702
+ };
11703
+
11704
+ // src/components/FormFields/EmailFormField.tsx
11705
+ var import_jsx_runtime50 = require("react/jsx-runtime");
10931
11706
  var EmailFormField = ({
10932
11707
  name,
10933
11708
  label,
10934
11709
  required,
10935
11710
  placeholder
10936
11711
  }) => {
10937
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11712
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
10938
11713
  TextFormField,
10939
11714
  {
10940
11715
  name,
@@ -10948,579 +11723,25 @@ var EmailFormField = ({
10948
11723
  };
10949
11724
 
10950
11725
  // src/components/FormFields/RichEditorFormField.tsx
10951
- var import_react_hook_form11 = require("react-hook-form");
10952
-
10953
- // src/components/RichEditor/QuillComponent.tsx
10954
- var import_react20 = require("react");
10955
- var import_react_quilljs = require("react-quilljs");
10956
- var import_quill_snow = require("quill/dist/quill.snow.css");
10957
-
10958
- // src/utils/uploadService.ts
10959
- var generateUniqueFilename = (originalName) => {
10960
- const timestamp = Date.now().toString(36);
10961
- const random = Math.random().toString(36).substring(2, 8);
10962
- const extension = originalName.split(".").pop();
10963
- return `${timestamp}_${random}.${extension}`;
10964
- };
10965
- var UploadService = class {
10966
- static getPresignedUrl(filename, contentType, config2) {
10967
- return __async(this, null, function* () {
10968
- var _a;
10969
- const apiUrl = config2.apiUrl;
10970
- const presignedUrlEndpoint = (_a = config2.endpoints) == null ? void 0 : _a.presignedUrl;
10971
- const bucket = config2.s3Bucket;
10972
- try {
10973
- const response = yield fetch(`${apiUrl}${presignedUrlEndpoint}`, {
10974
- method: "POST",
10975
- headers: {
10976
- "Content-Type": "application/json"
10977
- },
10978
- body: JSON.stringify({
10979
- filename,
10980
- contentType,
10981
- bucket
10982
- })
10983
- });
10984
- if (!response.ok) {
10985
- throw new Error("Falha ao gerar URL de upload");
10986
- }
10987
- const data = yield response.json();
10988
- return data.presignedUrl;
10989
- } catch (error) {
10990
- console.error("Erro ao gerar URL pr\xE9-assinada:", error);
10991
- throw new Error("Falha ao gerar URL de upload");
10992
- }
10993
- });
10994
- }
10995
- static uploadToS3(file, config2, onProgress) {
10996
- return __async(this, null, function* () {
10997
- try {
10998
- const uniqueFilename = generateUniqueFilename(file.name);
10999
- const blob = new Blob([file], { type: file.type });
11000
- const s3Url = `${config2.s3Url}/${uniqueFilename}`;
11001
- return new Promise((resolve, reject) => {
11002
- const xhr = new XMLHttpRequest();
11003
- xhr.upload.addEventListener("progress", (event) => {
11004
- if (event.lengthComputable) {
11005
- const percentComplete = Math.round(
11006
- event.loaded / event.total * 100
11007
- );
11008
- onProgress == null ? void 0 : onProgress({
11009
- amount: percentComplete,
11010
- message: `Fazendo upload... ${percentComplete}%`
11011
- });
11012
- }
11013
- });
11014
- xhr.addEventListener("load", () => {
11015
- if (xhr.status === 200) {
11016
- resolve({
11017
- url: s3Url,
11018
- filename: uniqueFilename,
11019
- size: file.size,
11020
- type: file.type
11021
- });
11022
- } else {
11023
- reject(new Error(`Upload falhou com status: ${xhr.status}`));
11024
- }
11025
- });
11026
- xhr.addEventListener("error", () => {
11027
- reject(new Error("Erro de rede durante upload"));
11028
- });
11029
- xhr.open("PUT", s3Url);
11030
- xhr.setRequestHeader("Content-Type", file.type);
11031
- xhr.send(blob);
11032
- });
11033
- } catch (error) {
11034
- console.error("Erro no upload:", error);
11035
- throw error;
11036
- }
11037
- });
11038
- }
11039
- static uploadViaAPI(file, config2, onProgress) {
11040
- return __async(this, null, function* () {
11041
- try {
11042
- const formData = new FormData();
11043
- formData.append("file", file);
11044
- const bucket = config2.s3Bucket;
11045
- formData.append("bucket", bucket);
11046
- const xhr = new XMLHttpRequest();
11047
- return new Promise((resolve, reject) => {
11048
- var _a;
11049
- xhr.upload.addEventListener("progress", (event) => {
11050
- if (event.lengthComputable) {
11051
- const percentComplete = Math.round(
11052
- event.loaded / event.total * 100
11053
- );
11054
- onProgress == null ? void 0 : onProgress({
11055
- amount: percentComplete,
11056
- message: `Fazendo upload... ${percentComplete}%`
11057
- });
11058
- }
11059
- });
11060
- xhr.addEventListener("load", () => {
11061
- if (xhr.status === 200) {
11062
- try {
11063
- const response = JSON.parse(xhr.responseText);
11064
- resolve({
11065
- url: response.url,
11066
- filename: response.filename,
11067
- size: file.size,
11068
- type: file.type
11069
- });
11070
- } catch (error) {
11071
- reject(new Error("Resposta inv\xE1lida do servidor"));
11072
- }
11073
- } else {
11074
- reject(new Error(`Upload falhou com status: ${xhr.status}`));
11075
- }
11076
- });
11077
- xhr.addEventListener("error", () => {
11078
- reject(new Error("Erro de rede durante upload"));
11079
- });
11080
- const apiUrl = config2.apiUrl;
11081
- const uploadEndpoint = (_a = config2.endpoints) == null ? void 0 : _a.upload;
11082
- xhr.open("POST", `${apiUrl}${uploadEndpoint}`);
11083
- xhr.send(formData);
11084
- });
11085
- } catch (error) {
11086
- console.error("Erro no upload via API:", error);
11087
- throw error;
11088
- }
11089
- });
11090
- }
11091
- };
11092
-
11093
- // src/components/RichEditor/styledComponents.ts
11094
- var QuillContainer = styled("div", {
11095
- display: "flex",
11096
- flexDirection: "column"
11097
- });
11098
- var QuillEditor = styled("div", {
11099
- "& .ql-editor": {
11100
- minHeight: "200px",
11101
- padding: "$12",
11102
- fontSize: "$14",
11103
- lineHeight: "$base",
11104
- fontFamily: "$default",
11105
- color: "$neutral900",
11106
- backgroundColor: "$white",
11107
- border: "none",
11108
- outline: "none",
11109
- cursor: "text",
11110
- caretColor: "$primary500",
11111
- "&:focus": {
11112
- borderColor: "$primary500",
11113
- boxShadow: "0 0 0 1px $primary500"
11114
- },
11115
- "& p": {
11116
- margin: "0 0 $8 0"
11117
- },
11118
- "& p:last-child": {
11119
- marginBottom: 0
11120
- },
11121
- "& .ql-cursor": {
11122
- borderLeft: "2px solid $primary500"
11123
- }
11124
- },
11125
- "& .ql-toolbar": {
11126
- backgroundColor: "$grey100",
11127
- border: "1px solid $neutral300",
11128
- borderBottom: "none",
11129
- borderTopLeftRadius: "$sm",
11130
- borderTopRightRadius: "$sm",
11131
- padding: "$8 $12"
11132
- },
11133
- "& .ql-container": {
11134
- border: "1px solid $neutral300",
11135
- borderTop: "none",
11136
- borderBottomLeftRadius: "$sm",
11137
- borderBottomRightRadius: "$sm",
11138
- fontFamily: "$default"
11139
- },
11140
- "& .ql-snow .ql-picker.ql-header .ql-picker-item[data-value='1']::before": {
11141
- content: "T\xEDtulo 1"
11142
- },
11143
- "& .ql-snow .ql-picker.ql-header .ql-picker-item[data-value='2']::before": {
11144
- content: "T\xEDtulo 2"
11145
- }
11146
- });
11147
-
11148
- // src/components/RichEditor/QuillComponent.tsx
11149
- var import_jsx_runtime50 = require("react/jsx-runtime");
11150
- var QuillComponent = ({
11151
- value = "",
11152
- onChange,
11153
- placeholder = "Digite seu texto aqui...",
11154
- disabled = false,
11155
- className,
11156
- uploadConfig
11157
- }) => {
11158
- const [showVideoModal, setShowVideoModal] = (0, import_react20.useState)(false);
11159
- const [videoUrl, setVideoUrl] = (0, import_react20.useState)("");
11160
- const [showLinkModal, setShowLinkModal] = (0, import_react20.useState)(false);
11161
- const [linkUrl, setLinkUrl] = (0, import_react20.useState)("");
11162
- const videoModalRef = (0, import_react20.useRef)(null);
11163
- const linkModalRef = (0, import_react20.useRef)(null);
11164
- const { addToast, removeToast } = useToast();
11165
- const modules = {
11166
- toolbar: [
11167
- [{ header: [1, 2, false] }],
11168
- ["bold", "italic", "underline", "strike"],
11169
- [{ color: [] }, { background: [] }],
11170
- [{ align: [] }],
11171
- [{ list: "ordered" }, { list: "bullet" }],
11172
- ["link", "image", "video"]
11173
- ],
11174
- clipboard: {
11175
- matchVisual: false
11176
- }
11177
- };
11178
- const formats = [
11179
- "header",
11180
- "bold",
11181
- "italic",
11182
- "underline",
11183
- "strike",
11184
- "color",
11185
- "background",
11186
- "align",
11187
- "list",
11188
- "link",
11189
- "image",
11190
- "video"
11191
- ];
11192
- const { quill, quillRef } = (0, import_react_quilljs.useQuill)({
11193
- theme: "snow",
11194
- modules,
11195
- formats,
11196
- placeholder,
11197
- readOnly: disabled
11198
- });
11199
- const handleImageUpload = (0, import_react20.useCallback)(
11200
- (file) => __async(null, null, function* () {
11201
- if (disabled || !quill || !uploadConfig) return;
11202
- try {
11203
- addToast({
11204
- type: "info",
11205
- message: "Carregando imagem...",
11206
- duration: 2e3
11207
- });
11208
- const uploadedFile = yield UploadService.uploadToS3(file, uploadConfig);
11209
- removeToast("info");
11210
- addToast({
11211
- type: "success",
11212
- message: "Imagem adicionada com sucesso!"
11213
- });
11214
- const selection = quill.getSelection();
11215
- const index = selection ? selection.index : quill.getLength();
11216
- quill.insertEmbed(index, "image", uploadedFile.url);
11217
- quill.setSelection(index + 1, 0);
11218
- } catch (error) {
11219
- console.error("Erro no upload:", error);
11220
- addToast({
11221
- type: "error",
11222
- message: "Erro no upload: N\xE3o foi poss\xEDvel enviar a imagem. Tente novamente."
11223
- });
11224
- }
11225
- }),
11226
- [disabled, quill, addToast, removeToast, uploadConfig]
11227
- );
11228
- (0, import_react20.useEffect)(() => {
11229
- if (quill && value) {
11230
- const currentContent = quill.root.innerHTML;
11231
- if (currentContent !== value) {
11232
- const selection = quill.getSelection();
11233
- quill.clipboard.dangerouslyPasteHTML(value);
11234
- if (selection) {
11235
- quill.setSelection(selection.index, selection.length);
11236
- } else {
11237
- quill.setSelection(quill.getLength(), 0);
11238
- }
11239
- }
11240
- }
11241
- }, [quill, value]);
11242
- (0, import_react20.useEffect)(() => {
11243
- if (quill) {
11244
- quill.on("text-change", (delta, oldDelta, source) => {
11245
- if (source === "user") {
11246
- const html = quill.root.innerHTML;
11247
- onChange == null ? void 0 : onChange(html);
11248
- }
11249
- });
11250
- const toolbar = quill.getModule("toolbar");
11251
- if (toolbar) {
11252
- toolbar.addHandler("link", () => setShowLinkModal(true));
11253
- toolbar.addHandler("video", () => setShowVideoModal(true));
11254
- toolbar.addHandler("image", () => {
11255
- const input = document.createElement("input");
11256
- input.setAttribute("type", "file");
11257
- input.setAttribute("accept", "image/*");
11258
- input.click();
11259
- input.onchange = () => __async(null, null, function* () {
11260
- var _a;
11261
- const file = (_a = input.files) == null ? void 0 : _a[0];
11262
- if (file) {
11263
- yield handleImageUpload(file);
11264
- }
11265
- });
11266
- });
11267
- }
11268
- setTimeout(() => {
11269
- var _a, _b;
11270
- const toolbarElement = (_b = (_a = quillRef.current) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
11271
- if (toolbarElement) {
11272
- const headerSelect = toolbarElement.querySelector(
11273
- "select[data-value]"
11274
- );
11275
- if (headerSelect) {
11276
- const options = headerSelect.querySelectorAll("option");
11277
- options.forEach((option) => {
11278
- if (option.value === "1") {
11279
- option.textContent = "T\xEDtulo 1";
11280
- } else if (option.value === "2") {
11281
- option.textContent = "T\xEDtulo 2";
11282
- } else if (option.value === "") {
11283
- option.textContent = "Normal";
11284
- }
11285
- });
11286
- }
11287
- }
11288
- }, 2e3);
11289
- }
11290
- }, [quill, onChange, handleImageUpload]);
11291
- (0, import_react20.useEffect)(() => {
11292
- if (quill) {
11293
- quill.enable(!disabled);
11294
- if (!disabled) {
11295
- if (quill.getLength() <= 1) {
11296
- quill.focus();
11297
- quill.setSelection(0, 0);
11298
- }
11299
- }
11300
- }
11301
- }, [quill, disabled]);
11302
- const handleLinkCancel = (0, import_react20.useCallback)(() => {
11303
- setLinkUrl("");
11304
- setShowLinkModal(false);
11305
- }, []);
11306
- const handleLinkSubmit = (0, import_react20.useCallback)(() => {
11307
- if (!linkUrl.trim() || !quill) return;
11308
- const url = linkUrl.trim();
11309
- const selection = quill.getSelection();
11310
- if (selection && selection.length > 0) {
11311
- quill.format("link", url);
11312
- } else {
11313
- const index = quill.getLength();
11314
- quill.insertText(index, url, "link", url);
11315
- quill.setSelection(index + url.length, 0);
11316
- }
11317
- setLinkUrl("");
11318
- setShowLinkModal(false);
11319
- }, [linkUrl, quill]);
11320
- const handleVideoCancel = (0, import_react20.useCallback)(() => {
11321
- setVideoUrl("");
11322
- setShowVideoModal(false);
11323
- }, []);
11324
- const handleVideoSubmit = (0, import_react20.useCallback)(() => {
11325
- var _a, _b;
11326
- if (!videoUrl.trim() || !quill) return;
11327
- let processedUrl = videoUrl.trim();
11328
- if (processedUrl.includes("youtube.com/watch")) {
11329
- const videoId = (_a = processedUrl.match(/[?&]v=([^&]+)/)) == null ? void 0 : _a[1];
11330
- if (videoId) {
11331
- processedUrl = `https://www.youtube.com/embed/${videoId}`;
11332
- }
11333
- } else if (processedUrl.includes("youtu.be/")) {
11334
- const videoId = (_b = processedUrl.split("youtu.be/")[1]) == null ? void 0 : _b.split("?")[0];
11335
- if (videoId) {
11336
- processedUrl = `https://www.youtube.com/embed/${videoId}`;
11337
- }
11338
- }
11339
- const videoHTML = `
11340
- <iframe
11341
- src="${processedUrl}"
11342
- style="max-width:100%; height:315px; border:0;"
11343
- title="Video player"
11344
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
11345
- allowfullscreen>
11346
- </iframe>
11347
- <br/>
11348
- `;
11349
- const selection = quill.getSelection();
11350
- const insertIndex = selection ? selection.index : quill.getLength();
11351
- quill.clipboard.dangerouslyPasteHTML(insertIndex, videoHTML);
11352
- quill.setSelection(insertIndex + 1, 0);
11353
- setVideoUrl("");
11354
- setShowVideoModal(false);
11355
- }, [videoUrl, quill]);
11356
- (0, import_react20.useEffect)(() => {
11357
- const handleClickOutside = (event) => {
11358
- if (showVideoModal && videoModalRef.current && !videoModalRef.current.contains(event.target)) {
11359
- handleVideoCancel();
11360
- }
11361
- if (showLinkModal && linkModalRef.current && !linkModalRef.current.contains(event.target)) {
11362
- handleLinkCancel();
11363
- }
11364
- };
11365
- document.addEventListener("mousedown", handleClickOutside);
11366
- return () => document.removeEventListener("mousedown", handleClickOutside);
11367
- }, [showVideoModal, showLinkModal, handleVideoCancel, handleLinkCancel]);
11368
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(QuillContainer, { className, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(QuillEditor, { style: { position: "relative" }, children: [
11369
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { ref: quillRef }),
11370
- showVideoModal && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11371
- "div",
11372
- {
11373
- ref: videoModalRef,
11374
- style: {
11375
- position: "absolute",
11376
- top: "20px",
11377
- left: "20px",
11378
- right: "20px",
11379
- backgroundColor: "white",
11380
- border: "1px solid #e0e0e0",
11381
- borderRadius: "4px",
11382
- padding: "12px",
11383
- boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
11384
- zIndex: 1e3,
11385
- width: "fit-content"
11386
- },
11387
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Flex2, { gap: 8, align: "center", children: [
11388
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11389
- Text,
11390
- {
11391
- style: { fontSize: "14px", fontWeight: "500", color: "#333" },
11392
- children: "V\xEDdeo:"
11393
- }
11394
- ),
11395
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11396
- "input",
11397
- {
11398
- type: "text",
11399
- value: videoUrl,
11400
- onChange: (e) => setVideoUrl(e.target.value),
11401
- placeholder: "Embed URL",
11402
- style: {
11403
- padding: "8px 12px",
11404
- border: "1px solid #d0d0d0",
11405
- borderRadius: "4px",
11406
- fontSize: "14px",
11407
- backgroundColor: "#f8f8f8"
11408
- },
11409
- onKeyDown: (e) => {
11410
- if (e.key === "Enter") {
11411
- handleVideoSubmit();
11412
- } else if (e.key === "Escape") {
11413
- handleVideoCancel();
11414
- }
11415
- },
11416
- autoFocus: true
11417
- }
11418
- ),
11419
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11420
- "button",
11421
- {
11422
- onClick: handleVideoSubmit,
11423
- disabled: !videoUrl.trim(),
11424
- style: {
11425
- padding: "8px 16px",
11426
- backgroundColor: "#007bff",
11427
- color: "white",
11428
- border: "none",
11429
- borderRadius: "4px",
11430
- fontSize: "14px",
11431
- cursor: videoUrl.trim() ? "pointer" : "not-allowed",
11432
- opacity: videoUrl.trim() ? 1 : 0.6
11433
- },
11434
- children: "Ok"
11435
- }
11436
- )
11437
- ] })
11438
- }
11439
- ),
11440
- showLinkModal && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11441
- "div",
11442
- {
11443
- ref: linkModalRef,
11444
- style: {
11445
- position: "absolute",
11446
- top: "20px",
11447
- left: "20px",
11448
- right: "20px",
11449
- backgroundColor: "white",
11450
- border: "1px solid #e0e0e0",
11451
- borderRadius: "4px",
11452
- padding: "12px",
11453
- boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
11454
- zIndex: 1e3,
11455
- width: "fit-content"
11456
- },
11457
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Flex2, { gap: 8, align: "center", children: [
11458
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11459
- Text,
11460
- {
11461
- style: { fontSize: "14px", fontWeight: "500", color: "#333" },
11462
- children: "Link:"
11463
- }
11464
- ),
11465
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11466
- "input",
11467
- {
11468
- type: "text",
11469
- value: linkUrl,
11470
- onChange: (e) => setLinkUrl(e.target.value),
11471
- placeholder: "URL do link",
11472
- style: {
11473
- padding: "8px 12px",
11474
- border: "1px solid #d0d0d0",
11475
- borderRadius: "4px",
11476
- fontSize: "14px",
11477
- backgroundColor: "#f8f8f8",
11478
- width: "300px"
11479
- },
11480
- onKeyDown: (e) => {
11481
- if (e.key === "Enter") {
11482
- handleLinkSubmit();
11483
- } else if (e.key === "Escape") {
11484
- handleLinkCancel();
11485
- }
11486
- },
11487
- autoFocus: true
11488
- }
11489
- ),
11490
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11491
- "button",
11492
- {
11493
- onClick: handleLinkSubmit,
11494
- disabled: !linkUrl.trim(),
11495
- style: {
11496
- padding: "8px 16px",
11497
- backgroundColor: "#007bff",
11498
- color: "white",
11499
- border: "none",
11500
- borderRadius: "4px",
11501
- fontSize: "14px",
11502
- cursor: linkUrl.trim() ? "pointer" : "not-allowed",
11503
- opacity: linkUrl.trim() ? 1 : 0.6
11504
- },
11505
- children: "Ok"
11506
- }
11507
- )
11508
- ] })
11509
- }
11510
- )
11511
- ] }) });
11512
- };
11513
- var QuillComponent_default = QuillComponent;
11726
+ var import_react_hook_form12 = require("react-hook-form");
11727
+ init_Flex();
11514
11728
 
11515
11729
  // src/components/RichEditor/RichEditor.tsx
11516
- var import_jsx_runtime51 = require("react/jsx-runtime");
11730
+ var import_react21 = require("react");
11731
+ var import_jsx_runtime52 = require("react/jsx-runtime");
11732
+ var QuillComponent2 = (0, import_react21.lazy)(() => Promise.resolve().then(() => (init_QuillComponent(), QuillComponent_exports)));
11517
11733
  var RichEditor = (props) => {
11518
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ToastProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuillComponent_default, __spreadValues({}, props)) }) });
11734
+ const [isClient, setIsClient] = (0, import_react21.useState)(false);
11735
+ (0, import_react21.useEffect)(() => {
11736
+ setIsClient(typeof window !== "undefined");
11737
+ }, []);
11738
+ if (!isClient) return null;
11739
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ToastProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react21.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(QuillComponent2, __spreadValues({}, props)) }) }) });
11519
11740
  };
11520
11741
  var RichEditor_default = RichEditor;
11521
11742
 
11522
11743
  // src/components/FormFields/RichEditorFormField.tsx
11523
- var import_jsx_runtime52 = require("react/jsx-runtime");
11744
+ var import_jsx_runtime53 = require("react/jsx-runtime");
11524
11745
  var RichEditorFormField = (_a) => {
11525
11746
  var _b = _a, {
11526
11747
  name,
@@ -11535,7 +11756,7 @@ var RichEditorFormField = (_a) => {
11535
11756
  "validate",
11536
11757
  "validationErrorMessage"
11537
11758
  ]);
11538
- const { field, fieldState } = (0, import_react_hook_form11.useController)({
11759
+ const { field, fieldState } = (0, import_react_hook_form12.useController)({
11539
11760
  name,
11540
11761
  rules: {
11541
11762
  required: required ? validationErrorMessage : false,
@@ -11551,8 +11772,8 @@ var RichEditorFormField = (_a) => {
11551
11772
  const fieldError = fieldState.error;
11552
11773
  const haveError = !!fieldError;
11553
11774
  const errorMsg = fieldError == null ? void 0 : fieldError.message;
11554
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Flex2, { direction: "column", children: [
11555
- label && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11775
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Flex2, { direction: "column", children: [
11776
+ label && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
11556
11777
  FormLabel,
11557
11778
  {
11558
11779
  name,
@@ -11561,7 +11782,7 @@ var RichEditorFormField = (_a) => {
11561
11782
  haveError
11562
11783
  }
11563
11784
  ),
11564
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11785
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
11565
11786
  RichEditor_default,
11566
11787
  __spreadProps(__spreadValues({}, props), {
11567
11788
  value: field.value,
@@ -11569,14 +11790,15 @@ var RichEditorFormField = (_a) => {
11569
11790
  "aria-labelledby": `${name}-label`
11570
11791
  })
11571
11792
  ),
11572
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ErrorFormMessage, { message: errorMsg })
11793
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ErrorFormMessage, { message: errorMsg })
11573
11794
  ] });
11574
11795
  };
11575
11796
 
11576
11797
  // src/components/FormFields/CalendarFormField.tsx
11577
- var import_react_hook_form12 = require("react-hook-form");
11578
- var import_react21 = require("react");
11579
- var import_jsx_runtime53 = require("react/jsx-runtime");
11798
+ var import_react_hook_form13 = require("react-hook-form");
11799
+ init_Flex();
11800
+ var import_react22 = require("react");
11801
+ var import_jsx_runtime54 = require("react/jsx-runtime");
11580
11802
  var CalendarFormField = (_a) => {
11581
11803
  var _b = _a, {
11582
11804
  name,
@@ -11597,7 +11819,7 @@ var CalendarFormField = (_a) => {
11597
11819
  "onChange",
11598
11820
  "allowPastDates"
11599
11821
  ]);
11600
- const handleValidate = (0, import_react21.useCallback)(
11822
+ const handleValidate = (0, import_react22.useCallback)(
11601
11823
  (value) => {
11602
11824
  var _a2;
11603
11825
  if (value === void 0 || value === null) {
@@ -11608,7 +11830,7 @@ var CalendarFormField = (_a) => {
11608
11830
  },
11609
11831
  [validate, required, validationErrorMessage]
11610
11832
  );
11611
- const { field, fieldState } = (0, import_react_hook_form12.useController)({
11833
+ const { field, fieldState } = (0, import_react_hook_form13.useController)({
11612
11834
  name,
11613
11835
  rules: __spreadValues({
11614
11836
  required: required ? validationErrorMessage : false,
@@ -11623,8 +11845,8 @@ var CalendarFormField = (_a) => {
11623
11845
  const handleCalendarChange = (date) => {
11624
11846
  setSelected(date);
11625
11847
  };
11626
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Flex2, { direction: "column", style: { flex: "1" }, children: [
11627
- label && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
11848
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Flex2, { direction: "column", style: { flex: "1" }, children: [
11849
+ label && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
11628
11850
  FormLabel,
11629
11851
  {
11630
11852
  name,
@@ -11633,7 +11855,7 @@ var CalendarFormField = (_a) => {
11633
11855
  haveError
11634
11856
  }
11635
11857
  ),
11636
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
11858
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
11637
11859
  Calendar,
11638
11860
  __spreadValues({
11639
11861
  selected,
@@ -11645,14 +11867,15 @@ var CalendarFormField = (_a) => {
11645
11867
  allowPastDates
11646
11868
  }, calendarProps)
11647
11869
  ),
11648
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ErrorFormMessage, { message: errorMsg })
11870
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ErrorFormMessage, { message: errorMsg })
11649
11871
  ] });
11650
11872
  };
11651
11873
 
11652
11874
  // src/components/FormFields/TimePickerFormField.tsx
11653
- var import_react_hook_form13 = require("react-hook-form");
11654
- var import_react22 = require("react");
11655
- var import_jsx_runtime54 = require("react/jsx-runtime");
11875
+ var import_react_hook_form14 = require("react-hook-form");
11876
+ init_Flex();
11877
+ var import_react23 = require("react");
11878
+ var import_jsx_runtime55 = require("react/jsx-runtime");
11656
11879
  var TimePickerFormField = (_a) => {
11657
11880
  var _b = _a, {
11658
11881
  name,
@@ -11669,7 +11892,7 @@ var TimePickerFormField = (_a) => {
11669
11892
  "validationErrorMessage",
11670
11893
  "rules"
11671
11894
  ]);
11672
- const handleValidate = (0, import_react22.useCallback)(
11895
+ const handleValidate = (0, import_react23.useCallback)(
11673
11896
  (value) => {
11674
11897
  var _a2;
11675
11898
  if (value === void 0 || value === null || value === "") {
@@ -11680,7 +11903,7 @@ var TimePickerFormField = (_a) => {
11680
11903
  },
11681
11904
  [validate, required, validationErrorMessage]
11682
11905
  );
11683
- const { field, fieldState } = (0, import_react_hook_form13.useController)({
11906
+ const { field, fieldState } = (0, import_react_hook_form14.useController)({
11684
11907
  name,
11685
11908
  rules: __spreadValues({
11686
11909
  required: required ? validationErrorMessage : false,
@@ -11695,8 +11918,8 @@ var TimePickerFormField = (_a) => {
11695
11918
  const handleTimePickerChange = (time) => {
11696
11919
  setSelected(time);
11697
11920
  };
11698
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Flex2, { direction: "column", style: { flex: "1" }, children: [
11699
- label && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
11921
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Flex2, { direction: "column", style: { flex: "1" }, children: [
11922
+ label && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
11700
11923
  FormLabel,
11701
11924
  {
11702
11925
  name,
@@ -11705,7 +11928,7 @@ var TimePickerFormField = (_a) => {
11705
11928
  haveError
11706
11929
  }
11707
11930
  ),
11708
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
11931
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
11709
11932
  TimePicker,
11710
11933
  __spreadValues({
11711
11934
  selected,
@@ -11716,16 +11939,17 @@ var TimePickerFormField = (_a) => {
11716
11939
  hasError: haveError
11717
11940
  }, timePickerProps)
11718
11941
  ),
11719
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ErrorFormMessage, { message: errorMsg })
11942
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ErrorFormMessage, { message: errorMsg })
11720
11943
  ] });
11721
11944
  };
11722
11945
 
11723
11946
  // src/hooks/useImageUpload.ts
11724
- var import_react23 = require("react");
11947
+ var import_react24 = require("react");
11948
+ init_uploadService();
11725
11949
  var useImageUpload = (options) => {
11726
- const [isUploading, setIsUploading] = (0, import_react23.useState)(false);
11727
- const [progress, setProgress] = (0, import_react23.useState)(null);
11728
- const [error, setError] = (0, import_react23.useState)(null);
11950
+ const [isUploading, setIsUploading] = (0, import_react24.useState)(false);
11951
+ const [progress, setProgress] = (0, import_react24.useState)(null);
11952
+ const [error, setError] = (0, import_react24.useState)(null);
11729
11953
  const {
11730
11954
  onSuccess,
11731
11955
  onError,
@@ -11735,7 +11959,7 @@ var useImageUpload = (options) => {
11735
11959
  allowedTypes = ["image/jpeg", "image/png", "image/gif", "image/webp"],
11736
11960
  uploadConfig
11737
11961
  } = options;
11738
- const validateFile = (0, import_react23.useCallback)(
11962
+ const validateFile = (0, import_react24.useCallback)(
11739
11963
  (file) => {
11740
11964
  if (!allowedTypes.includes(file.type)) {
11741
11965
  const errorMsg = "Tipo de arquivo n\xE3o suportado";
@@ -11753,7 +11977,7 @@ var useImageUpload = (options) => {
11753
11977
  },
11754
11978
  [allowedTypes, maxFileSize, onError]
11755
11979
  );
11756
- const uploadFile = (0, import_react23.useCallback)(
11980
+ const uploadFile = (0, import_react24.useCallback)(
11757
11981
  (file) => __async(null, null, function* () {
11758
11982
  if (!validateFile(file)) {
11759
11983
  return null;
@@ -11806,7 +12030,7 @@ var useImageUpload = (options) => {
11806
12030
  }),
11807
12031
  [validateFile, onSuccess, onError, onProgress]
11808
12032
  );
11809
- const reset = (0, import_react23.useCallback)(() => {
12033
+ const reset = (0, import_react24.useCallback)(() => {
11810
12034
  setIsUploading(false);
11811
12035
  setProgress(null);
11812
12036
  setError(null);
@@ -11819,6 +12043,9 @@ var useImageUpload = (options) => {
11819
12043
  reset
11820
12044
  };
11821
12045
  };
12046
+
12047
+ // src/index.tsx
12048
+ init_uploadService();
11822
12049
  // Annotate the CommonJS export names for ESM import in node:
11823
12050
  0 && (module.exports = {
11824
12051
  AddressFormFields,
@@ -11891,6 +12118,7 @@ var useImageUpload = (options) => {
11891
12118
  StepTrigger,
11892
12119
  StepWrapper,
11893
12120
  Switch,
12121
+ SwitchFormField,
11894
12122
  SwitchStyled,
11895
12123
  Text,
11896
12124
  TextAreaFormField,