@lets-events/react 12.1.2 → 12.1.4

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;
@@ -840,22 +843,1574 @@ var require_factoryWithTypeCheckers = __commonJS({
840
843
  ReactPropTypes.PropTypes = ReactPropTypes;
841
844
  return ReactPropTypes;
842
845
  };
843
- }
844
- });
845
-
846
- // ../../node_modules/prop-types/index.js
847
- var require_prop_types = __commonJS({
848
- "../../node_modules/prop-types/index.js"(exports2, module2) {
849
- "use strict";
850
- if (true) {
851
- ReactIs = require_react_is();
852
- throwOnDirectAccess = true;
853
- module2.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
854
- } else {
855
- module2.exports = null();
856
- }
857
- var ReactIs;
858
- var throwOnDirectAccess;
846
+ }
847
+ });
848
+
849
+ // ../../node_modules/prop-types/index.js
850
+ var require_prop_types = __commonJS({
851
+ "../../node_modules/prop-types/index.js"(exports2, module2) {
852
+ "use strict";
853
+ if (true) {
854
+ ReactIs = require_react_is();
855
+ throwOnDirectAccess = true;
856
+ module2.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
857
+ } else {
858
+ module2.exports = null();
859
+ }
860
+ var ReactIs;
861
+ var throwOnDirectAccess;
862
+ }
863
+ });
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_runtime50, 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_runtime50 = 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_runtime50.jsx)(QuillContainer, { className, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(QuillEditor, { style: { position: "relative" }, children: [
2269
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { ref: quillRef }),
2270
+ showVideoModal && /* @__PURE__ */ (0, import_jsx_runtime50.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_runtime50.jsxs)(Flex2, { gap: 8, align: "center", children: [
2288
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
2289
+ Text,
2290
+ {
2291
+ style: { fontSize: "14px", fontWeight: "500", color: "#333" },
2292
+ children: "V\xEDdeo:"
2293
+ }
2294
+ ),
2295
+ /* @__PURE__ */ (0, import_jsx_runtime50.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_runtime50.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_runtime50.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_runtime50.jsxs)(Flex2, { gap: 8, align: "center", children: [
2358
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
2359
+ Text,
2360
+ {
2361
+ style: { fontSize: "14px", fontWeight: "500", color: "#333" },
2362
+ children: "Link:"
2363
+ }
2364
+ ),
2365
+ /* @__PURE__ */ (0, import_jsx_runtime50.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_runtime50.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;
859
2414
  }
860
2415
  });
861
2416
 
@@ -965,586 +2520,12 @@ __export(index_exports, {
965
2520
  useToast: () => useToast
966
2521
  });
967
2522
  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
- }
2523
+ init_Icon();
2524
+ init_Text();
1545
2525
 
1546
2526
  // src/components/Button/styledComponents.ts
1547
2527
  var import_themes2 = require("@radix-ui/themes");
2528
+ init_styles();
1548
2529
  var ButtonStyled = styled(import_themes2.Button, {
1549
2530
  $$buttonColor: "inherit",
1550
2531
  $$buttonBgColor: "$colors$grey50",
@@ -1838,6 +2819,7 @@ function Button(_a) {
1838
2819
  }
1839
2820
 
1840
2821
  // src/components/ButtonGroup.tsx
2822
+ init_styles();
1841
2823
  var import_themes4 = require("@radix-ui/themes");
1842
2824
  var import_jsx_runtime4 = require("react/jsx-runtime");
1843
2825
  var ButtonItemStyled = styled(import_themes4.Button, {
@@ -2313,6 +3295,7 @@ function ButtonGroup(_a) {
2313
3295
  }
2314
3296
 
2315
3297
  // src/components/Avatar.tsx
3298
+ init_styles();
2316
3299
  var import_themes5 = require("@radix-ui/themes");
2317
3300
  var import_jsx_runtime5 = require("react/jsx-runtime");
2318
3301
  var AvatarStyled = styled(import_themes5.Avatar, {
@@ -2364,118 +3347,12 @@ function Avatar(_a) {
2364
3347
 
2365
3348
  // src/components/TextField.tsx
2366
3349
  var import_react2 = __toESM(require("react"));
3350
+ init_styles();
2367
3351
  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
3352
+ init_Icon();
3353
+ init_typographyValues();
3354
+ init_Text();
3355
+ init_Flex();
2479
3356
  var import_mask = require("@react-input/mask");
2480
3357
  var import_jsx_runtime7 = require("react/jsx-runtime");
2481
3358
  var TextFieldStyled = styled(import_themes7.TextField.Root, {
@@ -2806,7 +3683,9 @@ function TextFieldSlot(_a) {
2806
3683
  }
2807
3684
 
2808
3685
  // src/components/RadioGroup.tsx
3686
+ init_styles();
2809
3687
  var import_themes8 = require("@radix-ui/themes");
3688
+ init_typographyValues();
2810
3689
  var import_jsx_runtime8 = require("react/jsx-runtime");
2811
3690
  var RadioGroupStyled = styled(import_themes8.RadioGroup.Root, {
2812
3691
  fontFamily: "$default",
@@ -2996,7 +3875,9 @@ function RadioItem(_a) {
2996
3875
  }
2997
3876
 
2998
3877
  // src/components/CheckboxGroup.tsx
3878
+ init_styles();
2999
3879
  var import_themes9 = require("@radix-ui/themes");
3880
+ init_typographyValues();
3000
3881
  var import_jsx_runtime9 = require("react/jsx-runtime");
3001
3882
  var CheckboxGroupStyled = styled(import_themes9.CheckboxGroup.Root, {
3002
3883
  fontFamily: "$default",
@@ -3150,7 +4031,10 @@ function CheckboxItem(_a) {
3150
4031
  }
3151
4032
 
3152
4033
  // src/components/Filter.tsx
4034
+ init_styles();
3153
4035
  var import_themes10 = require("@radix-ui/themes");
4036
+ init_Icon();
4037
+ init_typographyValues();
3154
4038
  var import_jsx_runtime10 = require("react/jsx-runtime");
3155
4039
  var FilterContentStyled = styled(import_themes10.DropdownMenu.Content, {
3156
4040
  background: "white",
@@ -3292,7 +4176,10 @@ function FilterItem(_a) {
3292
4176
  // src/components/Dropdown.tsx
3293
4177
  var import_react3 = __toESM(require("react"));
3294
4178
  var import_free_solid_svg_icons2 = require("@fortawesome/free-solid-svg-icons");
4179
+ init_typographyValues();
3295
4180
  var import_react_fontawesome2 = require("@fortawesome/react-fontawesome");
4181
+ init_dist();
4182
+ init_styles();
3296
4183
  var import_jsx_runtime11 = require("react/jsx-runtime");
3297
4184
  var DropdownMenuItemStyled = styled("div", {
3298
4185
  fontFamily: "$default",
@@ -3552,6 +4439,7 @@ function DropdownMenuItem(_a) {
3552
4439
 
3553
4440
  // src/components/Badge.tsx
3554
4441
  var import_react4 = __toESM(require("react"));
4442
+ init_styles();
3555
4443
  var import_themes11 = require("@radix-ui/themes");
3556
4444
  var import_jsx_runtime12 = require("react/jsx-runtime");
3557
4445
  var BadgeStyled = styled(import_themes11.Badge, {
@@ -3664,13 +4552,16 @@ function Badge(_a) {
3664
4552
  }
3665
4553
 
3666
4554
  // src/components/Modal.tsx
4555
+ init_styles();
3667
4556
  var import_radix_ui = require("radix-ui");
4557
+ init_Icon();
3668
4558
 
3669
4559
  // src/components/Box.tsx
3670
4560
  var import_themes12 = require("@radix-ui/themes");
3671
4561
  var Box = import_themes12.Box;
3672
4562
 
3673
4563
  // src/components/Modal.tsx
4564
+ init_Text();
3674
4565
  var import_jsx_runtime13 = require("react/jsx-runtime");
3675
4566
  var ModalContentStyled = styled(import_radix_ui.Dialog.Content, {
3676
4567
  fontFamily: "$default",
@@ -3735,6 +4626,7 @@ function Modal(_a) {
3735
4626
  var import_react6 = require("react");
3736
4627
 
3737
4628
  // src/components/MenuDropdown/styledComponents.ts
4629
+ init_styles();
3738
4630
  var MenuDropdownContainerStyled = styled("div", {
3739
4631
  position: "relative",
3740
4632
  width: "fit-content"
@@ -3765,6 +4657,9 @@ var MenuItemsContainerStyled = styled("div", {
3765
4657
  height: "fit-content"
3766
4658
  });
3767
4659
 
4660
+ // src/components/MenuDropdown/index.tsx
4661
+ init_Icon();
4662
+
3768
4663
  // src/hooks/useOnClickOutside.tsx
3769
4664
  var import_react5 = require("react");
3770
4665
  function useOnClickOutside(ref, handler) {
@@ -7707,7 +8602,11 @@ function cleanEscapedString2(input) {
7707
8602
  return input.match(escapedStringRegExp2)[1].replace(doubleQuoteRegExp2, "'");
7708
8603
  }
7709
8604
 
8605
+ // src/components/Calendar/index.tsx
8606
+ init_Icon();
8607
+
7710
8608
  // src/components/Calendar/styledComponents.ts
8609
+ init_styles();
7711
8610
  var CalendarStyled = styled("div", {
7712
8611
  fontFamily: "$default",
7713
8612
  lineHeight: "$base",
@@ -8066,8 +8965,11 @@ function Calendar(_a) {
8066
8965
 
8067
8966
  // src/components/Drawer/index.tsx
8068
8967
  var import_react8 = require("react");
8968
+ init_dist();
8969
+ init_Icon();
8069
8970
 
8070
8971
  // src/components/Drawer/styledComponents.ts
8972
+ init_styles();
8071
8973
  var DrawerOverlayStyled = styled("div", {
8072
8974
  position: "fixed",
8073
8975
  top: 0,
@@ -8184,6 +9086,9 @@ function Drawer({
8184
9086
 
8185
9087
  // src/components/TimePicker.tsx
8186
9088
  var import_react9 = require("react");
9089
+ init_Text();
9090
+ init_Icon();
9091
+ init_styles();
8187
9092
  var import_jsx_runtime17 = require("react/jsx-runtime");
8188
9093
  var TimePickerStyled = styled("div", {
8189
9094
  position: "relative",
@@ -8508,7 +9413,11 @@ function TimePicker({
8508
9413
  }
8509
9414
 
8510
9415
  // src/components/Alert.tsx
9416
+ init_styles();
8511
9417
  var import_themes13 = require("@radix-ui/themes");
9418
+ init_Flex();
9419
+ init_Icon();
9420
+ init_Text();
8512
9421
  var import_jsx_runtime18 = require("react/jsx-runtime");
8513
9422
  var AlertDialogSimpleStyled = styled(import_themes13.AlertDialog.Content, {
8514
9423
  fontFamily: "$default",
@@ -8749,6 +9658,7 @@ function Alert(_a) {
8749
9658
 
8750
9659
  // src/components/Switch.tsx
8751
9660
  var import_themes14 = require("@radix-ui/themes");
9661
+ init_styles();
8752
9662
  var import_jsx_runtime19 = require("react/jsx-runtime");
8753
9663
  var SwitchStyled = styled(import_themes14.Switch, {
8754
9664
  all: "unset",
@@ -8848,6 +9758,7 @@ function Switch(props) {
8848
9758
 
8849
9759
  // src/components/Step.tsx
8850
9760
  var import_react10 = __toESM(require("react"));
9761
+ init_styles();
8851
9762
  var import_themes15 = require("@radix-ui/themes");
8852
9763
  var import_jsx_runtime20 = require("react/jsx-runtime");
8853
9764
  var StepStyled = styled("div", {
@@ -8980,6 +9891,7 @@ function StepWrapper(_a) {
8980
9891
  }
8981
9892
 
8982
9893
  // src/components/Card.tsx
9894
+ init_styles();
8983
9895
  var import_themes16 = require("@radix-ui/themes");
8984
9896
  var import_jsx_runtime21 = require("react/jsx-runtime");
8985
9897
  var CardStyled = styled(import_themes16.Card, {
@@ -9022,7 +9934,10 @@ function Card(_a) {
9022
9934
 
9023
9935
  // src/components/TextareaField.tsx
9024
9936
  var import_themes17 = require("@radix-ui/themes");
9937
+ init_styles();
9025
9938
  var import_react11 = __toESM(require("react"));
9939
+ init_typographyValues();
9940
+ init_Text();
9026
9941
  var import_jsx_runtime22 = require("react/jsx-runtime");
9027
9942
  var TextareaFieldStyle = styled(import_themes17.TextArea, {
9028
9943
  display: "flex",
@@ -9087,257 +10002,53 @@ var TextareaLimitIndicator = styled("div", {
9087
10002
  padding: "$4"
9088
10003
  }
9089
10004
  });
9090
- var TextareaField = import_react11.default.forwardRef((_a, fowardedRef) => {
9091
- var _b = _a, { maxLength, color } = _b, props = __objRest(_b, ["maxLength", "color"]);
9092
- const inputRef = (0, import_react11.useRef)(null);
9093
- const badgeRef = (0, import_react11.useRef)(null);
9094
- const updateCharCountBadge = () => {
9095
- var _a2, _b2;
9096
- if (!maxLength || !badgeRef.current) return;
9097
- const remainingChars = maxLength - ((_b2 = (_a2 = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a2.value.length) != null ? _b2 : 0);
9098
- badgeRef.current.textContent = String(remainingChars);
9099
- };
9100
- const handleInput = (e) => {
9101
- var _a2;
9102
- updateCharCountBadge();
9103
- (_a2 = props.onInput) == null ? void 0 : _a2.call(props, e);
9104
- };
9105
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(TextareaContainer, { color, children: [
9106
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
9107
- TextareaFieldStyle,
9108
- __spreadValues({
9109
- rows: 4,
9110
- ref: (r) => {
9111
- if (!r) return;
9112
- inputRef.current = r;
9113
- if (fowardedRef) {
9114
- if (typeof fowardedRef === "function") fowardedRef(r);
9115
- else {
9116
- fowardedRef.current = r;
9117
- }
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", ref: badgeRef, children: maxLength }) })
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);
10005
+ var TextareaField = import_react11.default.forwardRef((_a, forwardedRef) => {
10006
+ var _b = _a, { maxLength, color } = _b, props = __objRest(_b, ["maxLength", "color"]);
10007
+ const inputRef = (0, import_react11.useRef)(null);
10008
+ const [remaining, setRemaining] = (0, import_react11.useState)(maxLength);
10009
+ (0, import_react11.useEffect)(() => {
10010
+ var _a2;
10011
+ if (maxLength && inputRef.current) {
10012
+ setRemaining(maxLength - ((_a2 = inputRef.current.value.length) != null ? _a2 : 0));
9265
10013
  }
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
- ]
10014
+ }, [maxLength]);
10015
+ const handleInput = (e) => {
10016
+ var _a2;
10017
+ if (maxLength) {
10018
+ setRemaining(maxLength - e.currentTarget.value.length);
9279
10019
  }
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
10020
+ (_a2 = props.onInput) == null ? void 0 : _a2.call(props, e);
9321
10021
  };
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
- }
10022
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(TextareaContainer, { color, children: [
10023
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10024
+ TextareaFieldStyle,
10025
+ __spreadValues({
10026
+ rows: 4,
10027
+ ref: (r) => {
10028
+ if (!r) return;
10029
+ inputRef.current = r;
10030
+ if (forwardedRef) {
10031
+ if (typeof forwardedRef === "function") forwardedRef(r);
10032
+ else forwardedRef.current = r;
10033
+ }
10034
+ },
10035
+ onInput: handleInput,
10036
+ maxLength
10037
+ }, props)
10038
+ ),
10039
+ maxLength && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TextareaLimitIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { typography: "badgeMedium", children: remaining }) })
10040
+ ] });
10041
+ });
9328
10042
 
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
- };
10043
+ // src/components/Toast/index.tsx
10044
+ init_ToastItem();
10045
+ init_ToastProvider();
10046
+ init_useToast();
9338
10047
 
9339
10048
  // src/components/Tooltip/index.tsx
9340
10049
  var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
10050
+ init_styles();
10051
+ init_Text();
9341
10052
  var import_jsx_runtime25 = require("react/jsx-runtime");
9342
10053
  var TooltipProvider = TooltipPrimitive.Provider;
9343
10054
  var TooltipRoot = TooltipPrimitive.Root;
@@ -9389,9 +10100,13 @@ function Tooltip({
9389
10100
  // src/components/MultiSelect.tsx
9390
10101
  var import_react16 = __toESM(require("react"));
9391
10102
  var import_themes18 = require("@radix-ui/themes");
10103
+ init_styles();
10104
+ init_Text();
9392
10105
  var import_react_fontawesome3 = require("@fortawesome/react-fontawesome");
9393
10106
  var import_free_solid_svg_icons3 = require("@fortawesome/free-solid-svg-icons");
10107
+ init_dist();
9394
10108
  var import_react17 = require("react");
10109
+ init_Flex();
9395
10110
  var import_jsx_runtime26 = require("react/jsx-runtime");
9396
10111
  var StyledContent = styled(import_themes18.DropdownMenu.Content, {
9397
10112
  backgroundColor: "$dark50",
@@ -9655,7 +10370,11 @@ var MultiSelect = import_react16.default.forwardRef(
9655
10370
  }
9656
10371
  );
9657
10372
 
10373
+ // src/index.tsx
10374
+ init_Flex();
10375
+
9658
10376
  // src/components/Grid.tsx
10377
+ init_styles();
9659
10378
  var import_themes19 = require("@radix-ui/themes");
9660
10379
  var import_jsx_runtime27 = require("react/jsx-runtime");
9661
10380
  var GridStyled = styled(import_themes19.Grid, {
@@ -9783,6 +10502,7 @@ function Grid(_a) {
9783
10502
  }
9784
10503
 
9785
10504
  // src/components/Container.tsx
10505
+ init_styles();
9786
10506
  var import_themes20 = require("@radix-ui/themes");
9787
10507
  var import_jsx_runtime28 = require("react/jsx-runtime");
9788
10508
  var ContainerStyled = styled(import_themes20.Container, {
@@ -9818,6 +10538,7 @@ function Container(_a) {
9818
10538
  }
9819
10539
 
9820
10540
  // src/components/Section.tsx
10541
+ init_styles();
9821
10542
  var import_themes21 = require("@radix-ui/themes");
9822
10543
  var import_jsx_runtime29 = require("react/jsx-runtime");
9823
10544
  var SectionStyled = styled(import_themes21.Section, {
@@ -9849,6 +10570,9 @@ function Section(_a) {
9849
10570
  // src/components/FormFields/subComponents/ErrorFormMessage.tsx
9850
10571
  var import_free_solid_svg_icons4 = require("@fortawesome/free-solid-svg-icons");
9851
10572
  var import_react_fontawesome4 = require("@fortawesome/react-fontawesome");
10573
+ init_dist();
10574
+ init_Flex();
10575
+ init_Text();
9852
10576
  var import_jsx_runtime30 = require("react/jsx-runtime");
9853
10577
  var ErrorFormMessage = ({ message: message2 }) => {
9854
10578
  if (!message2) return null;
@@ -9862,6 +10586,7 @@ var ErrorFormMessage = ({ message: message2 }) => {
9862
10586
  };
9863
10587
 
9864
10588
  // src/components/FormFields/subComponents/FormLabel.tsx
10589
+ init_Text();
9865
10590
  var import_jsx_runtime31 = require("react/jsx-runtime");
9866
10591
  var FormLabel = ({
9867
10592
  name,
@@ -9887,6 +10612,7 @@ var FormLabel = ({
9887
10612
 
9888
10613
  // src/components/FormFields/TextAreaFormField.tsx
9889
10614
  var import_react_hook_form = require("react-hook-form");
10615
+ init_Flex();
9890
10616
  var import_jsx_runtime32 = require("react/jsx-runtime");
9891
10617
  var TextAreaFormField = (_a) => {
9892
10618
  var _b = _a, {
@@ -9939,6 +10665,7 @@ var TextAreaFormField = (_a) => {
9939
10665
 
9940
10666
  // src/components/FormFields/TextFormField.tsx
9941
10667
  var import_react_hook_form2 = require("react-hook-form");
10668
+ init_Flex();
9942
10669
  var import_react18 = require("react");
9943
10670
  var import_mask2 = require("@react-input/mask");
9944
10671
  var import_jsx_runtime33 = require("react/jsx-runtime");
@@ -10045,6 +10772,7 @@ var Form = (_a) => {
10045
10772
 
10046
10773
  // src/components/FormFields/MultiSelectFormField.tsx
10047
10774
  var import_react_hook_form4 = require("react-hook-form");
10775
+ init_Flex();
10048
10776
  var import_jsx_runtime35 = require("react/jsx-runtime");
10049
10777
  var MultiSelectFormField = (_a) => {
10050
10778
  var _b = _a, {
@@ -10152,6 +10880,7 @@ var PhoneFormField = ({
10152
10880
 
10153
10881
  // src/components/FormFields/CPFFormField.tsx
10154
10882
  var import_react_hook_form5 = require("react-hook-form");
10883
+ init_Flex();
10155
10884
  var import_jsx_runtime37 = require("react/jsx-runtime");
10156
10885
  var isValidCPF = (cpf) => {
10157
10886
  cpf = cpf.replace(/[^\d]+/g, "");
@@ -10377,8 +11106,12 @@ var IdentityDocumentNumberFormField = ({
10377
11106
  // src/components/FormFields/AddressFormFields/index.tsx
10378
11107
  var import_react_hook_form8 = require("react-hook-form");
10379
11108
 
11109
+ // src/components/FormFields/AddressFormFields/CountryFormField.tsx
11110
+ init_Flex();
11111
+
10380
11112
  // src/components/FormFields/SelectFormField.tsx
10381
11113
  var import_react_hook_form6 = require("react-hook-form");
11114
+ init_Flex();
10382
11115
 
10383
11116
  // src/utils/getNestedValue.ts
10384
11117
  function getNestedValue(obj, path) {
@@ -10670,6 +11403,7 @@ function CityFormField({
10670
11403
  }
10671
11404
 
10672
11405
  // src/components/FormFields/AddressFormFields/index.tsx
11406
+ init_styles();
10673
11407
  var import_jsx_runtime46 = require("react/jsx-runtime");
10674
11408
  function getNestedValue2(obj, path) {
10675
11409
  return path.split(".").reduce((acc, key) => acc == null ? void 0 : acc[key], obj);
@@ -10799,6 +11533,7 @@ function AddressFormFields({
10799
11533
 
10800
11534
  // src/components/FormFields/RadioGroupFormField.tsx
10801
11535
  var import_react_hook_form9 = require("react-hook-form");
11536
+ init_Flex();
10802
11537
  var import_jsx_runtime47 = require("react/jsx-runtime");
10803
11538
  var RadioGroupFormField = ({
10804
11539
  name,
@@ -10860,6 +11595,7 @@ var RadioGroupFormField = ({
10860
11595
 
10861
11596
  // src/components/FormFields/CheckboxGroupFormField.tsx
10862
11597
  var import_react_hook_form10 = require("react-hook-form");
11598
+ init_Flex();
10863
11599
  var import_jsx_runtime48 = require("react/jsx-runtime");
10864
11600
  var CheckboxGroupFormField = ({
10865
11601
  name,
@@ -10949,572 +11685,19 @@ var EmailFormField = ({
10949
11685
 
10950
11686
  // src/components/FormFields/RichEditorFormField.tsx
10951
11687
  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
-
10957
- // src/utils/uploadService.ts
10958
- var generateUniqueFilename = (originalName) => {
10959
- const timestamp = Date.now().toString(36);
10960
- const random = Math.random().toString(36).substring(2, 8);
10961
- const extension = originalName.split(".").pop();
10962
- return `${timestamp}_${random}.${extension}`;
10963
- };
10964
- var UploadService = class {
10965
- static getPresignedUrl(filename, contentType, config2) {
10966
- return __async(this, null, function* () {
10967
- var _a;
10968
- const apiUrl = config2.apiUrl;
10969
- const presignedUrlEndpoint = (_a = config2.endpoints) == null ? void 0 : _a.presignedUrl;
10970
- const bucket = config2.s3Bucket;
10971
- try {
10972
- const response = yield fetch(`${apiUrl}${presignedUrlEndpoint}`, {
10973
- method: "POST",
10974
- headers: {
10975
- "Content-Type": "application/json"
10976
- },
10977
- body: JSON.stringify({
10978
- filename,
10979
- contentType,
10980
- bucket
10981
- })
10982
- });
10983
- if (!response.ok) {
10984
- throw new Error("Falha ao gerar URL de upload");
10985
- }
10986
- const data = yield response.json();
10987
- return data.presignedUrl;
10988
- } catch (error) {
10989
- console.error("Erro ao gerar URL pr\xE9-assinada:", error);
10990
- throw new Error("Falha ao gerar URL de upload");
10991
- }
10992
- });
10993
- }
10994
- static uploadToS3(file, config2, onProgress) {
10995
- return __async(this, null, function* () {
10996
- try {
10997
- const uniqueFilename = generateUniqueFilename(file.name);
10998
- const blob = new Blob([file], { type: file.type });
10999
- const s3Url = `${config2.s3Url}/${uniqueFilename}`;
11000
- return new Promise((resolve, reject) => {
11001
- const xhr = new XMLHttpRequest();
11002
- xhr.upload.addEventListener("progress", (event) => {
11003
- if (event.lengthComputable) {
11004
- const percentComplete = Math.round(
11005
- event.loaded / event.total * 100
11006
- );
11007
- onProgress == null ? void 0 : onProgress({
11008
- amount: percentComplete,
11009
- message: `Fazendo upload... ${percentComplete}%`
11010
- });
11011
- }
11012
- });
11013
- xhr.addEventListener("load", () => {
11014
- if (xhr.status === 200) {
11015
- resolve({
11016
- url: s3Url,
11017
- filename: uniqueFilename,
11018
- size: file.size,
11019
- type: file.type
11020
- });
11021
- } else {
11022
- reject(new Error(`Upload falhou com status: ${xhr.status}`));
11023
- }
11024
- });
11025
- xhr.addEventListener("error", () => {
11026
- reject(new Error("Erro de rede durante upload"));
11027
- });
11028
- xhr.open("PUT", s3Url);
11029
- xhr.setRequestHeader("Content-Type", file.type);
11030
- xhr.send(blob);
11031
- });
11032
- } catch (error) {
11033
- console.error("Erro no upload:", error);
11034
- throw error;
11035
- }
11036
- });
11037
- }
11038
- static uploadViaAPI(file, config2, onProgress) {
11039
- return __async(this, null, function* () {
11040
- try {
11041
- const formData = new FormData();
11042
- formData.append("file", file);
11043
- const bucket = config2.s3Bucket;
11044
- formData.append("bucket", bucket);
11045
- const xhr = new XMLHttpRequest();
11046
- return new Promise((resolve, reject) => {
11047
- var _a;
11048
- xhr.upload.addEventListener("progress", (event) => {
11049
- if (event.lengthComputable) {
11050
- const percentComplete = Math.round(
11051
- event.loaded / event.total * 100
11052
- );
11053
- onProgress == null ? void 0 : onProgress({
11054
- amount: percentComplete,
11055
- message: `Fazendo upload... ${percentComplete}%`
11056
- });
11057
- }
11058
- });
11059
- xhr.addEventListener("load", () => {
11060
- if (xhr.status === 200) {
11061
- try {
11062
- const response = JSON.parse(xhr.responseText);
11063
- resolve({
11064
- url: response.url,
11065
- filename: response.filename,
11066
- size: file.size,
11067
- type: file.type
11068
- });
11069
- } catch (error) {
11070
- reject(new Error("Resposta inv\xE1lida do servidor"));
11071
- }
11072
- } else {
11073
- reject(new Error(`Upload falhou com status: ${xhr.status}`));
11074
- }
11075
- });
11076
- xhr.addEventListener("error", () => {
11077
- reject(new Error("Erro de rede durante upload"));
11078
- });
11079
- const apiUrl = config2.apiUrl;
11080
- const uploadEndpoint = (_a = config2.endpoints) == null ? void 0 : _a.upload;
11081
- xhr.open("POST", `${apiUrl}${uploadEndpoint}`);
11082
- xhr.send(formData);
11083
- });
11084
- } catch (error) {
11085
- console.error("Erro no upload via API:", error);
11086
- throw error;
11087
- }
11088
- });
11089
- }
11090
- };
11091
-
11092
- // src/components/RichEditor/styledComponents.ts
11093
- var QuillContainer = styled("div", {
11094
- display: "flex",
11095
- flexDirection: "column"
11096
- });
11097
- var QuillEditor = styled("div", {
11098
- "& .ql-editor": {
11099
- minHeight: "200px",
11100
- padding: "$12",
11101
- fontSize: "$14",
11102
- lineHeight: "$base",
11103
- fontFamily: "$default",
11104
- color: "$neutral900",
11105
- backgroundColor: "$white",
11106
- border: "none",
11107
- outline: "none",
11108
- cursor: "text",
11109
- caretColor: "$primary500",
11110
- "&:focus": {
11111
- borderColor: "$primary500",
11112
- boxShadow: "0 0 0 1px $primary500"
11113
- },
11114
- "& p": {
11115
- margin: "0 0 $8 0"
11116
- },
11117
- "& p:last-child": {
11118
- marginBottom: 0
11119
- },
11120
- "& .ql-cursor": {
11121
- borderLeft: "2px solid $primary500"
11122
- }
11123
- },
11124
- "& .ql-toolbar": {
11125
- backgroundColor: "$grey100",
11126
- border: "1px solid $neutral300",
11127
- borderBottom: "none",
11128
- borderTopLeftRadius: "$sm",
11129
- borderTopRightRadius: "$sm",
11130
- padding: "$8 $12"
11131
- },
11132
- "& .ql-container": {
11133
- border: "1px solid $neutral300",
11134
- borderTop: "none",
11135
- borderBottomLeftRadius: "$sm",
11136
- borderBottomRightRadius: "$sm",
11137
- fontFamily: "$default"
11138
- },
11139
- "& .ql-snow .ql-picker.ql-header .ql-picker-item[data-value='1']::before": {
11140
- content: "T\xEDtulo 1"
11141
- },
11142
- "& .ql-snow .ql-picker.ql-header .ql-picker-item[data-value='2']::before": {
11143
- content: "T\xEDtulo 2"
11144
- }
11145
- });
11146
-
11147
- // src/components/RichEditor/QuillComponent.tsx
11148
- var import_jsx_runtime50 = require("react/jsx-runtime");
11149
- var QuillComponent = ({
11150
- value = "",
11151
- onChange,
11152
- placeholder = "Digite seu texto aqui...",
11153
- disabled = false,
11154
- className,
11155
- uploadConfig
11156
- }) => {
11157
- const [showVideoModal, setShowVideoModal] = (0, import_react20.useState)(false);
11158
- const [videoUrl, setVideoUrl] = (0, import_react20.useState)("");
11159
- const [showLinkModal, setShowLinkModal] = (0, import_react20.useState)(false);
11160
- const [linkUrl, setLinkUrl] = (0, import_react20.useState)("");
11161
- const videoModalRef = (0, import_react20.useRef)(null);
11162
- const linkModalRef = (0, import_react20.useRef)(null);
11163
- const { addToast, removeToast } = useToast();
11164
- const modules = {
11165
- toolbar: [
11166
- [{ header: [1, 2, false] }],
11167
- ["bold", "italic", "underline", "strike"],
11168
- [{ color: [] }, { background: [] }],
11169
- [{ align: [] }],
11170
- [{ list: "ordered" }, { list: "bullet" }],
11171
- ["link", "image", "video"]
11172
- ],
11173
- clipboard: {
11174
- matchVisual: false
11175
- }
11176
- };
11177
- const formats = [
11178
- "header",
11179
- "bold",
11180
- "italic",
11181
- "underline",
11182
- "strike",
11183
- "color",
11184
- "background",
11185
- "align",
11186
- "list",
11187
- "link",
11188
- "image",
11189
- "video"
11190
- ];
11191
- const { quill, quillRef } = (0, import_react_quilljs.useQuill)({
11192
- theme: "snow",
11193
- modules,
11194
- formats,
11195
- placeholder,
11196
- readOnly: disabled
11197
- });
11198
- const handleImageUpload = (0, import_react20.useCallback)(
11199
- (file) => __async(null, null, function* () {
11200
- if (disabled || !quill || !uploadConfig) return;
11201
- try {
11202
- addToast({
11203
- type: "info",
11204
- message: "Carregando imagem...",
11205
- duration: 2e3
11206
- });
11207
- const uploadedFile = yield UploadService.uploadToS3(file, uploadConfig);
11208
- removeToast("info");
11209
- addToast({
11210
- type: "success",
11211
- message: "Imagem adicionada com sucesso!"
11212
- });
11213
- const selection = quill.getSelection();
11214
- const index = selection ? selection.index : quill.getLength();
11215
- quill.insertEmbed(index, "image", uploadedFile.url);
11216
- quill.setSelection(index + 1, 0);
11217
- } catch (error) {
11218
- console.error("Erro no upload:", error);
11219
- addToast({
11220
- type: "error",
11221
- message: "Erro no upload: N\xE3o foi poss\xEDvel enviar a imagem. Tente novamente."
11222
- });
11223
- }
11224
- }),
11225
- [disabled, quill, addToast, removeToast, uploadConfig]
11226
- );
11227
- (0, import_react20.useEffect)(() => {
11228
- if (quill && value) {
11229
- const currentContent = quill.root.innerHTML;
11230
- if (currentContent !== value) {
11231
- const selection = quill.getSelection();
11232
- quill.clipboard.dangerouslyPasteHTML(value);
11233
- if (selection) {
11234
- quill.setSelection(selection.index, selection.length);
11235
- } else {
11236
- quill.setSelection(quill.getLength(), 0);
11237
- }
11238
- }
11239
- }
11240
- }, [quill, value]);
11241
- (0, import_react20.useEffect)(() => {
11242
- if (quill) {
11243
- quill.on("text-change", (delta, oldDelta, source) => {
11244
- if (source === "user") {
11245
- const html = quill.root.innerHTML;
11246
- onChange == null ? void 0 : onChange(html);
11247
- }
11248
- });
11249
- const toolbar = quill.getModule("toolbar");
11250
- if (toolbar) {
11251
- toolbar.addHandler("link", () => setShowLinkModal(true));
11252
- toolbar.addHandler("video", () => setShowVideoModal(true));
11253
- toolbar.addHandler("image", () => {
11254
- const input = document.createElement("input");
11255
- input.setAttribute("type", "file");
11256
- input.setAttribute("accept", "image/*");
11257
- input.click();
11258
- input.onchange = () => __async(null, null, function* () {
11259
- var _a;
11260
- const file = (_a = input.files) == null ? void 0 : _a[0];
11261
- if (file) {
11262
- yield handleImageUpload(file);
11263
- }
11264
- });
11265
- });
11266
- }
11267
- setTimeout(() => {
11268
- var _a, _b;
11269
- const toolbarElement = (_b = (_a = quillRef.current) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
11270
- if (toolbarElement) {
11271
- const headerSelect = toolbarElement.querySelector(
11272
- "select[data-value]"
11273
- );
11274
- if (headerSelect) {
11275
- const options = headerSelect.querySelectorAll("option");
11276
- options.forEach((option) => {
11277
- if (option.value === "1") {
11278
- option.textContent = "T\xEDtulo 1";
11279
- } else if (option.value === "2") {
11280
- option.textContent = "T\xEDtulo 2";
11281
- } else if (option.value === "") {
11282
- option.textContent = "Normal";
11283
- }
11284
- });
11285
- }
11286
- }
11287
- }, 2e3);
11288
- }
11289
- }, [quill, onChange, handleImageUpload]);
11290
- (0, import_react20.useEffect)(() => {
11291
- if (quill) {
11292
- quill.enable(!disabled);
11293
- if (!disabled) {
11294
- if (quill.getLength() <= 1) {
11295
- quill.focus();
11296
- quill.setSelection(0, 0);
11297
- }
11298
- }
11299
- }
11300
- }, [quill, disabled]);
11301
- const handleLinkCancel = (0, import_react20.useCallback)(() => {
11302
- setLinkUrl("");
11303
- setShowLinkModal(false);
11304
- }, []);
11305
- const handleLinkSubmit = (0, import_react20.useCallback)(() => {
11306
- if (!linkUrl.trim() || !quill) return;
11307
- const url = linkUrl.trim();
11308
- const selection = quill.getSelection();
11309
- if (selection && selection.length > 0) {
11310
- quill.format("link", url);
11311
- } else {
11312
- const index = quill.getLength();
11313
- quill.insertText(index, url, "link", url);
11314
- quill.setSelection(index + url.length, 0);
11315
- }
11316
- setLinkUrl("");
11317
- setShowLinkModal(false);
11318
- }, [linkUrl, quill]);
11319
- const handleVideoCancel = (0, import_react20.useCallback)(() => {
11320
- setVideoUrl("");
11321
- setShowVideoModal(false);
11322
- }, []);
11323
- const handleVideoSubmit = (0, import_react20.useCallback)(() => {
11324
- var _a, _b;
11325
- if (!videoUrl.trim() || !quill) return;
11326
- let processedUrl = videoUrl.trim();
11327
- if (processedUrl.includes("youtube.com/watch")) {
11328
- const videoId = (_a = processedUrl.match(/[?&]v=([^&]+)/)) == null ? void 0 : _a[1];
11329
- if (videoId) {
11330
- processedUrl = `https://www.youtube.com/embed/${videoId}`;
11331
- }
11332
- } else if (processedUrl.includes("youtu.be/")) {
11333
- const videoId = (_b = processedUrl.split("youtu.be/")[1]) == null ? void 0 : _b.split("?")[0];
11334
- if (videoId) {
11335
- processedUrl = `https://www.youtube.com/embed/${videoId}`;
11336
- }
11337
- }
11338
- const videoHTML = `
11339
- <iframe
11340
- src="${processedUrl}"
11341
- style="max-width:100%; height:315px; border:0;"
11342
- title="Video player"
11343
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
11344
- allowfullscreen>
11345
- </iframe>
11346
- <br/>
11347
- `;
11348
- const selection = quill.getSelection();
11349
- const insertIndex = selection ? selection.index : quill.getLength();
11350
- quill.clipboard.dangerouslyPasteHTML(insertIndex, videoHTML);
11351
- quill.setSelection(insertIndex + 1, 0);
11352
- setVideoUrl("");
11353
- setShowVideoModal(false);
11354
- }, [videoUrl, quill]);
11355
- (0, import_react20.useEffect)(() => {
11356
- const handleClickOutside = (event) => {
11357
- if (showVideoModal && videoModalRef.current && !videoModalRef.current.contains(event.target)) {
11358
- handleVideoCancel();
11359
- }
11360
- if (showLinkModal && linkModalRef.current && !linkModalRef.current.contains(event.target)) {
11361
- handleLinkCancel();
11362
- }
11363
- };
11364
- document.addEventListener("mousedown", handleClickOutside);
11365
- return () => document.removeEventListener("mousedown", handleClickOutside);
11366
- }, [showVideoModal, showLinkModal, handleVideoCancel, handleLinkCancel]);
11367
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(QuillContainer, { className, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(QuillEditor, { style: { position: "relative" }, children: [
11368
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { ref: quillRef }),
11369
- showVideoModal && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11370
- "div",
11371
- {
11372
- ref: videoModalRef,
11373
- style: {
11374
- position: "absolute",
11375
- top: "20px",
11376
- left: "20px",
11377
- right: "20px",
11378
- backgroundColor: "white",
11379
- border: "1px solid #e0e0e0",
11380
- borderRadius: "4px",
11381
- padding: "12px",
11382
- boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
11383
- zIndex: 1e3,
11384
- width: "fit-content"
11385
- },
11386
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Flex2, { gap: 8, align: "center", children: [
11387
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11388
- Text,
11389
- {
11390
- style: { fontSize: "14px", fontWeight: "500", color: "#333" },
11391
- children: "V\xEDdeo:"
11392
- }
11393
- ),
11394
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11395
- "input",
11396
- {
11397
- type: "text",
11398
- value: videoUrl,
11399
- onChange: (e) => setVideoUrl(e.target.value),
11400
- placeholder: "Embed URL",
11401
- style: {
11402
- padding: "8px 12px",
11403
- border: "1px solid #d0d0d0",
11404
- borderRadius: "4px",
11405
- fontSize: "14px",
11406
- backgroundColor: "#f8f8f8"
11407
- },
11408
- onKeyDown: (e) => {
11409
- if (e.key === "Enter") {
11410
- handleVideoSubmit();
11411
- } else if (e.key === "Escape") {
11412
- handleVideoCancel();
11413
- }
11414
- },
11415
- autoFocus: true
11416
- }
11417
- ),
11418
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11419
- "button",
11420
- {
11421
- onClick: handleVideoSubmit,
11422
- disabled: !videoUrl.trim(),
11423
- style: {
11424
- padding: "8px 16px",
11425
- backgroundColor: "#007bff",
11426
- color: "white",
11427
- border: "none",
11428
- borderRadius: "4px",
11429
- fontSize: "14px",
11430
- cursor: videoUrl.trim() ? "pointer" : "not-allowed",
11431
- opacity: videoUrl.trim() ? 1 : 0.6
11432
- },
11433
- children: "Ok"
11434
- }
11435
- )
11436
- ] })
11437
- }
11438
- ),
11439
- showLinkModal && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11440
- "div",
11441
- {
11442
- ref: linkModalRef,
11443
- style: {
11444
- position: "absolute",
11445
- top: "20px",
11446
- left: "20px",
11447
- right: "20px",
11448
- backgroundColor: "white",
11449
- border: "1px solid #e0e0e0",
11450
- borderRadius: "4px",
11451
- padding: "12px",
11452
- boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
11453
- zIndex: 1e3,
11454
- width: "fit-content"
11455
- },
11456
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Flex2, { gap: 8, align: "center", children: [
11457
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11458
- Text,
11459
- {
11460
- style: { fontSize: "14px", fontWeight: "500", color: "#333" },
11461
- children: "Link:"
11462
- }
11463
- ),
11464
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11465
- "input",
11466
- {
11467
- type: "text",
11468
- value: linkUrl,
11469
- onChange: (e) => setLinkUrl(e.target.value),
11470
- placeholder: "URL do link",
11471
- style: {
11472
- padding: "8px 12px",
11473
- border: "1px solid #d0d0d0",
11474
- borderRadius: "4px",
11475
- fontSize: "14px",
11476
- backgroundColor: "#f8f8f8",
11477
- width: "300px"
11478
- },
11479
- onKeyDown: (e) => {
11480
- if (e.key === "Enter") {
11481
- handleLinkSubmit();
11482
- } else if (e.key === "Escape") {
11483
- handleLinkCancel();
11484
- }
11485
- },
11486
- autoFocus: true
11487
- }
11488
- ),
11489
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11490
- "button",
11491
- {
11492
- onClick: handleLinkSubmit,
11493
- disabled: !linkUrl.trim(),
11494
- style: {
11495
- padding: "8px 16px",
11496
- backgroundColor: "#007bff",
11497
- color: "white",
11498
- border: "none",
11499
- borderRadius: "4px",
11500
- fontSize: "14px",
11501
- cursor: linkUrl.trim() ? "pointer" : "not-allowed",
11502
- opacity: linkUrl.trim() ? 1 : 0.6
11503
- },
11504
- children: "Ok"
11505
- }
11506
- )
11507
- ] })
11508
- }
11509
- )
11510
- ] }) });
11511
- };
11512
- var QuillComponent_default = QuillComponent;
11688
+ init_Flex();
11513
11689
 
11514
11690
  // src/components/RichEditor/RichEditor.tsx
11691
+ var import_react21 = require("react");
11515
11692
  var import_jsx_runtime51 = require("react/jsx-runtime");
11693
+ var QuillComponent2 = (0, import_react21.lazy)(() => Promise.resolve().then(() => (init_QuillComponent(), QuillComponent_exports)));
11516
11694
  var RichEditor = (props) => {
11517
- 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)) }) });
11695
+ const [isClient, setIsClient] = (0, import_react21.useState)(false);
11696
+ (0, import_react21.useEffect)(() => {
11697
+ setIsClient(typeof window !== "undefined");
11698
+ }, []);
11699
+ if (!isClient) return null;
11700
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ToastProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react21.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuillComponent2, __spreadValues({}, props)) }) }) });
11518
11701
  };
11519
11702
  var RichEditor_default = RichEditor;
11520
11703
 
@@ -11574,7 +11757,8 @@ var RichEditorFormField = (_a) => {
11574
11757
 
11575
11758
  // src/components/FormFields/CalendarFormField.tsx
11576
11759
  var import_react_hook_form12 = require("react-hook-form");
11577
- var import_react21 = require("react");
11760
+ init_Flex();
11761
+ var import_react22 = require("react");
11578
11762
  var import_jsx_runtime53 = require("react/jsx-runtime");
11579
11763
  var CalendarFormField = (_a) => {
11580
11764
  var _b = _a, {
@@ -11596,7 +11780,7 @@ var CalendarFormField = (_a) => {
11596
11780
  "onChange",
11597
11781
  "allowPastDates"
11598
11782
  ]);
11599
- const handleValidate = (0, import_react21.useCallback)(
11783
+ const handleValidate = (0, import_react22.useCallback)(
11600
11784
  (value) => {
11601
11785
  var _a2;
11602
11786
  if (value === void 0 || value === null) {
@@ -11650,7 +11834,8 @@ var CalendarFormField = (_a) => {
11650
11834
 
11651
11835
  // src/components/FormFields/TimePickerFormField.tsx
11652
11836
  var import_react_hook_form13 = require("react-hook-form");
11653
- var import_react22 = require("react");
11837
+ init_Flex();
11838
+ var import_react23 = require("react");
11654
11839
  var import_jsx_runtime54 = require("react/jsx-runtime");
11655
11840
  var TimePickerFormField = (_a) => {
11656
11841
  var _b = _a, {
@@ -11668,7 +11853,7 @@ var TimePickerFormField = (_a) => {
11668
11853
  "validationErrorMessage",
11669
11854
  "rules"
11670
11855
  ]);
11671
- const handleValidate = (0, import_react22.useCallback)(
11856
+ const handleValidate = (0, import_react23.useCallback)(
11672
11857
  (value) => {
11673
11858
  var _a2;
11674
11859
  if (value === void 0 || value === null || value === "") {
@@ -11720,11 +11905,12 @@ var TimePickerFormField = (_a) => {
11720
11905
  };
11721
11906
 
11722
11907
  // src/hooks/useImageUpload.ts
11723
- var import_react23 = require("react");
11908
+ var import_react24 = require("react");
11909
+ init_uploadService();
11724
11910
  var useImageUpload = (options) => {
11725
- const [isUploading, setIsUploading] = (0, import_react23.useState)(false);
11726
- const [progress, setProgress] = (0, import_react23.useState)(null);
11727
- const [error, setError] = (0, import_react23.useState)(null);
11911
+ const [isUploading, setIsUploading] = (0, import_react24.useState)(false);
11912
+ const [progress, setProgress] = (0, import_react24.useState)(null);
11913
+ const [error, setError] = (0, import_react24.useState)(null);
11728
11914
  const {
11729
11915
  onSuccess,
11730
11916
  onError,
@@ -11734,7 +11920,7 @@ var useImageUpload = (options) => {
11734
11920
  allowedTypes = ["image/jpeg", "image/png", "image/gif", "image/webp"],
11735
11921
  uploadConfig
11736
11922
  } = options;
11737
- const validateFile = (0, import_react23.useCallback)(
11923
+ const validateFile = (0, import_react24.useCallback)(
11738
11924
  (file) => {
11739
11925
  if (!allowedTypes.includes(file.type)) {
11740
11926
  const errorMsg = "Tipo de arquivo n\xE3o suportado";
@@ -11752,7 +11938,7 @@ var useImageUpload = (options) => {
11752
11938
  },
11753
11939
  [allowedTypes, maxFileSize, onError]
11754
11940
  );
11755
- const uploadFile = (0, import_react23.useCallback)(
11941
+ const uploadFile = (0, import_react24.useCallback)(
11756
11942
  (file) => __async(null, null, function* () {
11757
11943
  if (!validateFile(file)) {
11758
11944
  return null;
@@ -11805,7 +11991,7 @@ var useImageUpload = (options) => {
11805
11991
  }),
11806
11992
  [validateFile, onSuccess, onError, onProgress]
11807
11993
  );
11808
- const reset = (0, import_react23.useCallback)(() => {
11994
+ const reset = (0, import_react24.useCallback)(() => {
11809
11995
  setIsUploading(false);
11810
11996
  setProgress(null);
11811
11997
  setError(null);
@@ -11818,6 +12004,9 @@ var useImageUpload = (options) => {
11818
12004
  reset
11819
12005
  };
11820
12006
  };
12007
+
12008
+ // src/index.tsx
12009
+ init_uploadService();
11821
12010
  // Annotate the CommonJS export names for ESM import in node:
11822
12011
  0 && (module.exports = {
11823
12012
  AddressFormFields,