@lets-events/react 12.1.9 → 12.1.10

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,9 +34,6 @@ 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
- };
40
37
  var __commonJS = (cb, mod) => function __require() {
41
38
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
42
39
  };
@@ -848,1587 +845,17 @@ var require_factoryWithTypeCheckers = __commonJS({
848
845
 
849
846
  // ../../node_modules/prop-types/index.js
850
847
  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_runtime51, QuillComponent, QuillComponent_default;
2038
- var init_QuillComponent = __esm({
2039
- "src/components/RichEditor/QuillComponent.tsx"() {
2040
- "use strict";
2041
- import_react20 = require("react");
2042
- import_react_quilljs = require("react-quilljs");
2043
- import_quill_snow = require("quill/dist/quill.snow.css");
2044
- init_Flex();
2045
- init_Text();
2046
- init_useToast();
2047
- init_uploadService();
2048
- init_styledComponents();
2049
- import_jsx_runtime51 = require("react/jsx-runtime");
2050
- QuillComponent = ({
2051
- value = "",
2052
- onChange,
2053
- placeholder = "Digite seu texto aqui...",
2054
- disabled = false,
2055
- className,
2056
- uploadConfig,
2057
- simpleVersion = false,
2058
- onCharacterCountChange,
2059
- maxLength
2060
- }) => {
2061
- const [showVideoModal, setShowVideoModal] = (0, import_react20.useState)(false);
2062
- const [videoUrl, setVideoUrl] = (0, import_react20.useState)("");
2063
- const [showLinkModal, setShowLinkModal] = (0, import_react20.useState)(false);
2064
- const [linkUrl, setLinkUrl] = (0, import_react20.useState)("");
2065
- const videoModalRef = (0, import_react20.useRef)(null);
2066
- const linkModalRef = (0, import_react20.useRef)(null);
2067
- const { addToast, removeToast } = useToast();
2068
- const modules = simpleVersion ? {
2069
- toolbar: [
2070
- ["bold", "italic", "underline"],
2071
- [{ list: "ordered" }, { list: "bullet" }],
2072
- ["link"]
2073
- ],
2074
- clipboard: {
2075
- matchVisual: false
2076
- }
2077
- } : {
2078
- toolbar: [
2079
- [{ header: [1, 2, false] }],
2080
- ["bold", "italic", "underline", "strike"],
2081
- [{ color: [] }, { background: [] }],
2082
- [{ align: [] }],
2083
- [{ list: "ordered" }, { list: "bullet" }],
2084
- ["link", "image", "video"]
2085
- ],
2086
- clipboard: {
2087
- matchVisual: false
2088
- }
2089
- };
2090
- const formats = simpleVersion ? ["bold", "italic", "underline", "list", "link"] : [
2091
- "header",
2092
- "bold",
2093
- "italic",
2094
- "underline",
2095
- "strike",
2096
- "color",
2097
- "background",
2098
- "align",
2099
- "list",
2100
- "link",
2101
- "image",
2102
- "video"
2103
- ];
2104
- const { quill, quillRef } = (0, import_react_quilljs.useQuill)({
2105
- theme: "snow",
2106
- modules,
2107
- formats,
2108
- placeholder,
2109
- readOnly: disabled
2110
- });
2111
- const handleImageUpload = (0, import_react20.useCallback)(
2112
- (file) => __async(null, null, function* () {
2113
- if (disabled || !quill || !uploadConfig) return;
2114
- try {
2115
- addToast({
2116
- type: "info",
2117
- message: "Carregando imagem...",
2118
- duration: 2e3
2119
- });
2120
- const uploadedFile = yield UploadService.uploadToS3(file, uploadConfig);
2121
- removeToast("info");
2122
- addToast({
2123
- type: "success",
2124
- message: "Imagem adicionada com sucesso!"
2125
- });
2126
- const selection = quill.getSelection();
2127
- const index = selection ? selection.index : quill.getLength();
2128
- quill.insertEmbed(index, "image", uploadedFile.url);
2129
- quill.setSelection(index + 1, 0);
2130
- } catch (error) {
2131
- console.error("Erro no upload:", error);
2132
- addToast({
2133
- type: "error",
2134
- message: "Erro no upload: N\xE3o foi poss\xEDvel enviar a imagem. Tente novamente."
2135
- });
2136
- }
2137
- }),
2138
- [disabled, quill, addToast, removeToast, uploadConfig]
2139
- );
2140
- (0, import_react20.useEffect)(() => {
2141
- if (quill && value) {
2142
- const currentContent = quill.root.innerHTML;
2143
- if (currentContent !== value) {
2144
- const selection = quill.getSelection();
2145
- quill.clipboard.dangerouslyPasteHTML(value);
2146
- if (selection) {
2147
- quill.setSelection(selection.index, selection.length);
2148
- } else {
2149
- quill.setSelection(quill.getLength(), 0);
2150
- }
2151
- }
2152
- }
2153
- }, [quill, value]);
2154
- (0, import_react20.useEffect)(() => {
2155
- if (quill) {
2156
- quill.on("text-change", (delta, oldDelta, source) => {
2157
- if (source === "user") {
2158
- const text = quill.getText().trim();
2159
- const count = text.length;
2160
- if (maxLength !== void 0 && count > maxLength) {
2161
- quill.deleteText(maxLength, count - maxLength);
2162
- return;
2163
- }
2164
- onChange == null ? void 0 : onChange(quill.root.innerHTML);
2165
- onCharacterCountChange == null ? void 0 : onCharacterCountChange(count);
2166
- }
2167
- });
2168
- const toolbar = quill.getModule("toolbar");
2169
- if (toolbar) {
2170
- toolbar.addHandler("link", () => setShowLinkModal(true));
2171
- toolbar.addHandler("video", () => setShowVideoModal(true));
2172
- toolbar.addHandler("image", () => {
2173
- const input = document.createElement("input");
2174
- input.setAttribute("type", "file");
2175
- input.setAttribute("accept", "image/*");
2176
- input.click();
2177
- input.onchange = () => __async(null, null, function* () {
2178
- var _a;
2179
- const file = (_a = input.files) == null ? void 0 : _a[0];
2180
- if (file) {
2181
- yield handleImageUpload(file);
2182
- }
2183
- });
2184
- });
2185
- }
2186
- setTimeout(() => {
2187
- var _a, _b;
2188
- const toolbarElement = (_b = (_a = quillRef.current) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
2189
- if (toolbarElement) {
2190
- const headerSelect = toolbarElement.querySelector(
2191
- "select[data-value]"
2192
- );
2193
- if (headerSelect) {
2194
- const options = headerSelect.querySelectorAll("option");
2195
- options.forEach((option) => {
2196
- if (option.value === "1") {
2197
- option.textContent = "T\xEDtulo 1";
2198
- } else if (option.value === "2") {
2199
- option.textContent = "T\xEDtulo 2";
2200
- } else if (option.value === "") {
2201
- option.textContent = "Normal";
2202
- }
2203
- });
2204
- }
2205
- }
2206
- }, 2e3);
2207
- }
2208
- }, [quill, onChange, handleImageUpload, onCharacterCountChange]);
2209
- (0, import_react20.useEffect)(() => {
2210
- if (quill) {
2211
- quill.enable(!disabled);
2212
- if (!disabled) {
2213
- if (quill.getLength() <= 1) {
2214
- quill.focus();
2215
- quill.setSelection(0, 0);
2216
- }
2217
- }
2218
- }
2219
- }, [quill, disabled]);
2220
- const handleLinkCancel = (0, import_react20.useCallback)(() => {
2221
- setLinkUrl("");
2222
- setShowLinkModal(false);
2223
- }, []);
2224
- const handleLinkSubmit = (0, import_react20.useCallback)(() => {
2225
- if (!linkUrl.trim() || !quill) return;
2226
- const url = linkUrl.trim();
2227
- const selection = quill.getSelection();
2228
- if (selection && selection.length > 0) {
2229
- quill.format("link", url);
2230
- } else {
2231
- const index = quill.getLength();
2232
- quill.insertText(index, url, "link", url);
2233
- quill.setSelection(index + url.length, 0);
2234
- }
2235
- setLinkUrl("");
2236
- setShowLinkModal(false);
2237
- }, [linkUrl, quill]);
2238
- const handleVideoCancel = (0, import_react20.useCallback)(() => {
2239
- setVideoUrl("");
2240
- setShowVideoModal(false);
2241
- }, []);
2242
- const handleVideoSubmit = (0, import_react20.useCallback)(() => {
2243
- var _a, _b;
2244
- if (!videoUrl.trim() || !quill) return;
2245
- let processedUrl = videoUrl.trim();
2246
- if (processedUrl.includes("youtube.com/watch")) {
2247
- const videoId = (_a = processedUrl.match(/[?&]v=([^&]+)/)) == null ? void 0 : _a[1];
2248
- if (videoId) {
2249
- processedUrl = `https://www.youtube.com/embed/${videoId}`;
2250
- }
2251
- } else if (processedUrl.includes("youtu.be/")) {
2252
- const videoId = (_b = processedUrl.split("youtu.be/")[1]) == null ? void 0 : _b.split("?")[0];
2253
- if (videoId) {
2254
- processedUrl = `https://www.youtube.com/embed/${videoId}`;
2255
- }
2256
- }
2257
- const videoHTML = `
2258
- <iframe
2259
- src="${processedUrl}"
2260
- style="max-width:100%; height:315px; border:0;"
2261
- title="Video player"
2262
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
2263
- allowfullscreen>
2264
- </iframe>
2265
- <br/>
2266
- `;
2267
- const selection = quill.getSelection();
2268
- const insertIndex = selection ? selection.index : quill.getLength();
2269
- quill.clipboard.dangerouslyPasteHTML(insertIndex, videoHTML);
2270
- quill.setSelection(insertIndex + 1, 0);
2271
- setVideoUrl("");
2272
- setShowVideoModal(false);
2273
- }, [videoUrl, quill]);
2274
- (0, import_react20.useEffect)(() => {
2275
- const handleClickOutside = (event) => {
2276
- if (showVideoModal && videoModalRef.current && !videoModalRef.current.contains(event.target)) {
2277
- handleVideoCancel();
2278
- }
2279
- if (showLinkModal && linkModalRef.current && !linkModalRef.current.contains(event.target)) {
2280
- handleLinkCancel();
2281
- }
2282
- };
2283
- document.addEventListener("mousedown", handleClickOutside);
2284
- return () => document.removeEventListener("mousedown", handleClickOutside);
2285
- }, [showVideoModal, showLinkModal, handleVideoCancel, handleLinkCancel]);
2286
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuillContainer, { className, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(QuillEditor, { style: { position: "relative" }, children: [
2287
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { ref: quillRef }),
2288
- showVideoModal && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2289
- "div",
2290
- {
2291
- ref: videoModalRef,
2292
- style: {
2293
- position: "absolute",
2294
- top: "20px",
2295
- left: "20px",
2296
- right: "20px",
2297
- backgroundColor: "white",
2298
- border: "1px solid #e0e0e0",
2299
- borderRadius: "4px",
2300
- padding: "12px",
2301
- boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
2302
- zIndex: 1e3,
2303
- width: "fit-content"
2304
- },
2305
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Flex2, { gap: 8, align: "center", children: [
2306
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2307
- Text,
2308
- {
2309
- style: { fontSize: "14px", fontWeight: "500", color: "#333" },
2310
- children: "V\xEDdeo:"
2311
- }
2312
- ),
2313
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2314
- "input",
2315
- {
2316
- type: "text",
2317
- value: videoUrl,
2318
- onChange: (e) => setVideoUrl(e.target.value),
2319
- placeholder: "Embed URL",
2320
- style: {
2321
- padding: "8px 12px",
2322
- border: "1px solid #d0d0d0",
2323
- borderRadius: "4px",
2324
- fontSize: "14px",
2325
- backgroundColor: "#f8f8f8"
2326
- },
2327
- onKeyDown: (e) => {
2328
- if (e.key === "Enter") {
2329
- handleVideoSubmit();
2330
- } else if (e.key === "Escape") {
2331
- handleVideoCancel();
2332
- }
2333
- },
2334
- autoFocus: true
2335
- }
2336
- ),
2337
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2338
- "button",
2339
- {
2340
- onClick: handleVideoSubmit,
2341
- disabled: !videoUrl.trim(),
2342
- style: {
2343
- padding: "8px 16px",
2344
- backgroundColor: "#007bff",
2345
- color: "white",
2346
- border: "none",
2347
- borderRadius: "4px",
2348
- fontSize: "14px",
2349
- cursor: videoUrl.trim() ? "pointer" : "not-allowed",
2350
- opacity: videoUrl.trim() ? 1 : 0.6
2351
- },
2352
- children: "Ok"
2353
- }
2354
- )
2355
- ] })
2356
- }
2357
- ),
2358
- showLinkModal && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2359
- "div",
2360
- {
2361
- ref: linkModalRef,
2362
- style: {
2363
- position: "absolute",
2364
- top: "20px",
2365
- left: "20px",
2366
- right: "20px",
2367
- backgroundColor: "white",
2368
- border: "1px solid #e0e0e0",
2369
- borderRadius: "4px",
2370
- padding: "12px",
2371
- boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
2372
- zIndex: 1e3,
2373
- width: "fit-content"
2374
- },
2375
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Flex2, { gap: 8, align: "center", children: [
2376
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2377
- Text,
2378
- {
2379
- style: { fontSize: "14px", fontWeight: "500", color: "#333" },
2380
- children: "Link:"
2381
- }
2382
- ),
2383
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2384
- "input",
2385
- {
2386
- type: "text",
2387
- value: linkUrl,
2388
- onChange: (e) => setLinkUrl(e.target.value),
2389
- placeholder: "URL do link",
2390
- style: {
2391
- padding: "8px 12px",
2392
- border: "1px solid #d0d0d0",
2393
- borderRadius: "4px",
2394
- fontSize: "14px",
2395
- backgroundColor: "#f8f8f8",
2396
- width: "300px"
2397
- },
2398
- onKeyDown: (e) => {
2399
- if (e.key === "Enter") {
2400
- handleLinkSubmit();
2401
- } else if (e.key === "Escape") {
2402
- handleLinkCancel();
2403
- }
2404
- },
2405
- autoFocus: true
2406
- }
2407
- ),
2408
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2409
- "button",
2410
- {
2411
- onClick: handleLinkSubmit,
2412
- disabled: !linkUrl.trim(),
2413
- style: {
2414
- padding: "8px 16px",
2415
- backgroundColor: "#007bff",
2416
- color: "white",
2417
- border: "none",
2418
- borderRadius: "4px",
2419
- fontSize: "14px",
2420
- cursor: linkUrl.trim() ? "pointer" : "not-allowed",
2421
- opacity: linkUrl.trim() ? 1 : 0.6
2422
- },
2423
- children: "Ok"
2424
- }
2425
- )
2426
- ] })
2427
- }
2428
- )
2429
- ] }) });
2430
- };
2431
- QuillComponent_default = QuillComponent;
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;
2432
859
  }
2433
860
  });
2434
861
 
@@ -2540,12 +967,586 @@ __export(index_exports, {
2540
967
  useToast: () => useToast
2541
968
  });
2542
969
  module.exports = __toCommonJS(index_exports);
2543
- init_Icon();
2544
- init_Text();
970
+
971
+ // src/components/Icon.tsx
972
+ var import_react_fontawesome = require("@fortawesome/react-fontawesome");
973
+ var import_fontawesome_svg_core = require("@fortawesome/fontawesome-svg-core");
974
+ var import_free_solid_svg_icons = require("@fortawesome/free-solid-svg-icons");
975
+ var import_free_regular_svg_icons = require("@fortawesome/free-regular-svg-icons");
976
+ var import_free_brands_svg_icons = require("@fortawesome/free-brands-svg-icons");
977
+ var import_prop_types = __toESM(require_prop_types());
978
+ var import_jsx_runtime = require("react/jsx-runtime");
979
+ import_fontawesome_svg_core.library.add(import_free_solid_svg_icons.fas, import_free_regular_svg_icons.far, import_free_brands_svg_icons.fab);
980
+ var Icon = (_a) => {
981
+ var _b = _a, { name, prefix = "fas", size = "sm", color = "currentColor", className = "" } = _b, props = __objRest(_b, ["name", "prefix", "size", "color", "className"]);
982
+ var _a2, _b2;
983
+ const sizeMap = {
984
+ "xs": { width: "0.625rem", height: "0.625rem", fontSize: "0.625rem" },
985
+ "sm": { width: "0.625rem", height: "0.625rem", fontSize: "0.625rem" },
986
+ "md": { width: "0.75rem", height: "0.75rem", fontSize: "0.75rem" },
987
+ "xl": { width: "1rem", height: "1rem", fontSize: "1rem" },
988
+ undefined: { width: "0.75rem", height: "0.75rem", fontSize: "0.75rem" }
989
+ };
990
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
991
+ import_react_fontawesome.FontAwesomeIcon,
992
+ __spreadProps(__spreadValues({
993
+ icon: [prefix, name],
994
+ style: sizeMap[size],
995
+ color,
996
+ className
997
+ }, props), {
998
+ width: (_a2 = sizeMap[size]) == null ? void 0 : _a2.width,
999
+ height: (_b2 = sizeMap[size]) == null ? void 0 : _b2.height
1000
+ })
1001
+ );
1002
+ };
1003
+ Icon.propTypes = {
1004
+ name: import_prop_types.default.string.isRequired,
1005
+ prefix: import_prop_types.default.string,
1006
+ size: import_prop_types.default.string,
1007
+ color: import_prop_types.default.string,
1008
+ className: import_prop_types.default.string
1009
+ };
1010
+ var Icon_default = Icon;
1011
+
1012
+ // ../tokens/dist/index.mjs
1013
+ var colors = {
1014
+ brand50: "#DBE8FF",
1015
+ brand100: "#BDD5FF",
1016
+ brand200: "#7AABFF",
1017
+ brand300: "#3881FF",
1018
+ brand400: "#005AF5",
1019
+ brand500: "#004ED2",
1020
+ brand600: "#0042B2",
1021
+ brand700: "#00348F",
1022
+ brand800: "#00276B",
1023
+ brand900: "#001A47",
1024
+ brand950: "#000D24",
1025
+ blue50: "#E5F1FF",
1026
+ blue100: "#CCE4FF",
1027
+ blue200: "#9AC9FF",
1028
+ blue300: "#66ADFF",
1029
+ blue400: "#3392FF",
1030
+ blue500: "#0278FE",
1031
+ blue600: "#005FCD",
1032
+ blue700: "#004799",
1033
+ blue800: "#013066",
1034
+ blue900: "#001834",
1035
+ blue950: "#000C1A",
1036
+ red50: "#FCEEEF",
1037
+ red100: "#F9DCDF",
1038
+ red200: "#F3BEC3",
1039
+ red300: "#ED9CA2",
1040
+ red400: "#E77982",
1041
+ red500: "#E15662",
1042
+ red600: "#DB3644",
1043
+ red700: "#AD1F2B",
1044
+ red800: "#75151D",
1045
+ red900: "#380A0E",
1046
+ red950: "#1E0507",
1047
+ pink100: "#F9DCF3",
1048
+ purple50: "#F3EFFB",
1049
+ purple100: "#E6DEF7",
1050
+ purple200: "#D1C2F0",
1051
+ purple300: "#B9A1E8",
1052
+ purple400: "#A080E0",
1053
+ purple500: "#8961D8",
1054
+ purple600: "#6431C8",
1055
+ purple700: "#4B2597",
1056
+ purple800: "#331966",
1057
+ purple900: "#180C31",
1058
+ purple950: "#0C0619",
1059
+ yellow50: "#FFF9E6",
1060
+ yellow100: "#FFF3CD",
1061
+ yellow200: "#FFE69C",
1062
+ yellow300: "#FFDA6A",
1063
+ yellow400: "#FFCD39",
1064
+ yellow500: "#FFC107",
1065
+ yellow600: "#CC9A06",
1066
+ yellow700: "#997404",
1067
+ yellow800: "#664D03",
1068
+ yellow900: "#332701",
1069
+ yellow950: "#191300",
1070
+ orange100: "#FEE0D8",
1071
+ dark50: "#FFFFFF",
1072
+ dark100: "#F4F4F4",
1073
+ dark200: "#EAEBF0",
1074
+ dark300: "#C2C3C7",
1075
+ dark400: "#A9ABB1",
1076
+ dark500: "#808289",
1077
+ dark600: "#4C4F54",
1078
+ dark700: "#34363B",
1079
+ dark800: "#1E2023",
1080
+ dark900: "#040507",
1081
+ dark950: "#030303",
1082
+ neutral50: "#FFFFFF",
1083
+ neutral100: "#F4F4F4",
1084
+ neutral200: "#EAEBF0",
1085
+ neutral300: "#C2C3C7",
1086
+ neutral400: "#A9ABB1",
1087
+ neutral500: "#808289",
1088
+ neutral600: "#4C4F54",
1089
+ neutral700: "#34363B",
1090
+ neutral800: "#1E2023",
1091
+ neutral900: "#040507",
1092
+ neutral950: "#030303",
1093
+ green50: "#E6F9EA",
1094
+ green100: "#CDF4D5",
1095
+ green200: "#9BE8AC",
1096
+ green300: "#6CD783",
1097
+ green400: "#5BCA72",
1098
+ green500: "#26A743",
1099
+ green600: "#1E8535",
1100
+ green700: "#176427",
1101
+ green800: "#0F421A",
1102
+ green900: "#08210D",
1103
+ green950: "#041107",
1104
+ grey50: "#F4F8FB",
1105
+ grey100: "#E6EEF4",
1106
+ grey200: "#DBE7F0",
1107
+ grey300: "#BCCEDD",
1108
+ grey400: "#9FB6C7",
1109
+ grey500: "#849DAE",
1110
+ grey600: "#698496",
1111
+ grey700: "#516A7A",
1112
+ grey800: "#394F61",
1113
+ grey900: "#233543",
1114
+ grey950: "#101B23",
1115
+ error50: "#FCEEEF",
1116
+ error100: "#F9DCDF",
1117
+ error200: "#F3BEC3",
1118
+ error300: "#ED9CA2",
1119
+ error400: "#E77982",
1120
+ error500: "#E15662",
1121
+ error600: "#DB3644",
1122
+ error700: "#AD1F2B",
1123
+ error800: "#75151D",
1124
+ error900: "#380A0E",
1125
+ error950: "#1E0507",
1126
+ success50: "#E6F9EA",
1127
+ success100: "#CDF4D5",
1128
+ success200: "#9BE8AC",
1129
+ success300: "#6CD783",
1130
+ success400: "#5BCA72",
1131
+ success500: "#26A743",
1132
+ success600: "#1E8535",
1133
+ success700: "#176427",
1134
+ success800: "#0F421A",
1135
+ success900: "#08210D",
1136
+ success950: "#041107",
1137
+ warning50: "#FFF9E6",
1138
+ warning100: "#FFF3CD",
1139
+ warning200: "#FFE69C",
1140
+ warning300: "#FFDA6A",
1141
+ warning400: "#FFCD39",
1142
+ warning500: "#FFC107",
1143
+ warning600: "#CC9A06",
1144
+ warning700: "#997404",
1145
+ warning800: "#664D03",
1146
+ warning900: "#332701",
1147
+ warning950: "#191300",
1148
+ info50: "#E5F1FF",
1149
+ info100: "#CCE4FF",
1150
+ info200: "#9AC9FF",
1151
+ info300: "#66ADFF",
1152
+ info400: "#3392FF",
1153
+ info500: "#0278FE",
1154
+ info600: "#005FCD",
1155
+ info700: "#004799",
1156
+ info800: "#013066",
1157
+ info900: "#001834",
1158
+ info950: "#000C1A",
1159
+ shadow50: "#546B923D"
1160
+ };
1161
+ var fonts = {
1162
+ default: '"Work Sans", sans-serif'
1163
+ };
1164
+ var fontSizes = {
1165
+ 2: "0.125rem",
1166
+ 4: "0.25rem",
1167
+ 6: "0.375rem",
1168
+ 8: "0.5rem",
1169
+ 10: "0.625rem",
1170
+ 12: "0.75rem",
1171
+ 13: "0.8125rem",
1172
+ 14: "0.875rem",
1173
+ 16: "1rem",
1174
+ 18: "1.125rem",
1175
+ 20: "1.25rem",
1176
+ 22: "1.375rem",
1177
+ 24: "1.5rem",
1178
+ 32: "2rem",
1179
+ 36: "2.25rem",
1180
+ 40: "2.5rem",
1181
+ 48: "3rem",
1182
+ 56: "3.5rem",
1183
+ 64: "4rem",
1184
+ 72: "4.5rem",
1185
+ 80: "5rem",
1186
+ xs: "0.375rem",
1187
+ sm: "0.5rem",
1188
+ md: "0.75rem",
1189
+ lg: "1rem",
1190
+ "2xl": "1.5rem",
1191
+ "3xl": "2rem",
1192
+ "4xl": "2.5rem",
1193
+ full: "62.4375rem",
1194
+ displayLarge: "3.5rem",
1195
+ displayMedium: "3rem",
1196
+ displaySmall: "2.25rem",
1197
+ headline1: "2.5rem",
1198
+ headline2: "2rem",
1199
+ headline3: "1.75rem",
1200
+ headline4: "1.375rem",
1201
+ headline5: "1.25rem",
1202
+ headline6: "1.125rem",
1203
+ headline7: "1rem",
1204
+ headline8: "0.875rem",
1205
+ bodyXL: "1.25rem",
1206
+ bodyL: "1.125rem",
1207
+ bodyM: "1rem",
1208
+ bodyS: "0.875rem",
1209
+ bodyXS: "0.8125rem",
1210
+ bodyXXS: "0.75rem",
1211
+ buttonLarge: "1.25rem",
1212
+ buttonMedium: "0.875rem",
1213
+ buttonSmall: "0.875rem",
1214
+ buttonExtraSmall: "0.75rem",
1215
+ badgeLarge: "1rem",
1216
+ badgeMedium: "0.875rem",
1217
+ badgeSmall: "0.75rem",
1218
+ badgeExtraSmall: "0.625rem",
1219
+ tooltip: "0.875rem",
1220
+ popoversRegular: "0.875rem",
1221
+ labelLarge: "1rem",
1222
+ labelMedium: "0.875rem",
1223
+ labelSmall: "0.8125rem",
1224
+ labelExtraSmall: "0.75rem",
1225
+ captionLarge: "0.8125rem",
1226
+ captionMedium: "0.75rem",
1227
+ captionSmall: "0.625rem"
1228
+ };
1229
+ var fontWeights = {
1230
+ regular: "400",
1231
+ medium: "500",
1232
+ semibold: "600",
1233
+ bold: "700"
1234
+ };
1235
+ var lineHeights = {
1236
+ smaller: "112.5%",
1237
+ // 4px
1238
+ shorter: "125%",
1239
+ // 8px
1240
+ short: "137.5%",
1241
+ // 12px
1242
+ base: "150%",
1243
+ // 16px
1244
+ tall: "175%",
1245
+ // 24px
1246
+ displayLarge: "4.5rem",
1247
+ displayMedium: "4rem",
1248
+ displaySmall: "3.25rem",
1249
+ headline1: "3.25rem",
1250
+ headline2: "2.75rem",
1251
+ headline3: "2.5rem",
1252
+ headline4: "1.75rem",
1253
+ headline5: "1.5rem",
1254
+ headline6: "1.375rem",
1255
+ headline7: "1.5rem",
1256
+ headline8: "1.25rem",
1257
+ bodyXL: "1.75rem",
1258
+ bodyL: "1.625rem",
1259
+ bodyM: "1.5rem",
1260
+ bodyS: "1.25rem",
1261
+ bodyXS: "1.125rem",
1262
+ bodyXXS: "1rem",
1263
+ buttonLarge: "1.25rem",
1264
+ buttonMedium: "1rem",
1265
+ buttonSmall: "0.875rem",
1266
+ buttonExtraSmall: "0.75rem",
1267
+ badgeLarge: "1rem",
1268
+ badgeMedium: "0.875rem",
1269
+ badgeSmall: "0.75rem",
1270
+ badgeExtraSmall: "0.625rem",
1271
+ tooltip: "1rem",
1272
+ popoversRegular: "1rem",
1273
+ labelLarge: "1.125rem",
1274
+ labelMedium: "1.125rem",
1275
+ labelSmall: "1rem",
1276
+ labelExtraSmall: "1rem",
1277
+ captionLarge: "1rem",
1278
+ captionMedium: "0.875rem",
1279
+ captionSmall: "0.75rem"
1280
+ };
1281
+ var radii = {
1282
+ "3xs": "2px",
1283
+ "2xs": "4px",
1284
+ "xs": "6px",
1285
+ "sm": "8px",
1286
+ "md": "10px",
1287
+ "lg": "12px",
1288
+ "xl": "14px",
1289
+ "2xl": "16px",
1290
+ "3xl": "18px",
1291
+ "4xl": "20px",
1292
+ "5xl": "22px",
1293
+ "6xl": "24px",
1294
+ "7xl": "32px",
1295
+ "8xl": "36px",
1296
+ "9xl": "40px",
1297
+ "10xl": "48px",
1298
+ "11xl": "56px",
1299
+ "12xl": "64px",
1300
+ "13xl": "72px",
1301
+ "14xl": "80px",
1302
+ full: "99999px"
1303
+ };
1304
+ var space = {
1305
+ 2: "0.125rem",
1306
+ 4: "0.25rem",
1307
+ 6: "0.375rem",
1308
+ 8: "0.5rem",
1309
+ 10: "0.625rem",
1310
+ 12: "0.75rem",
1311
+ 13: "0.8125rem",
1312
+ 14: "0.875rem",
1313
+ 16: "1rem",
1314
+ 18: "1.125rem",
1315
+ 20: "1.25rem",
1316
+ 22: "1.375rem",
1317
+ 24: "1.5rem",
1318
+ 32: "2rem",
1319
+ 36: "2.25rem",
1320
+ 40: "2.5rem",
1321
+ 48: "3rem",
1322
+ 56: "3.5rem",
1323
+ 64: "4rem",
1324
+ 72: "4.5rem",
1325
+ 80: "5rem",
1326
+ full: "62.4375rem"
1327
+ };
1328
+
1329
+ // src/styles/index.ts
1330
+ var import_react = require("@stitches/react");
1331
+ var {
1332
+ styled,
1333
+ css,
1334
+ globalCss,
1335
+ keyframes,
1336
+ getCssText,
1337
+ theme,
1338
+ createTheme,
1339
+ config
1340
+ } = (0, import_react.createStitches)({
1341
+ themeMap: __spreadProps(__spreadValues({}, import_react.defaultThemeMap), {
1342
+ height: "space",
1343
+ width: "space",
1344
+ gap: "space"
1345
+ }),
1346
+ theme: {
1347
+ colors,
1348
+ fontSizes,
1349
+ fonts,
1350
+ fontWeights,
1351
+ lineHeights,
1352
+ radii,
1353
+ space
1354
+ }
1355
+ });
1356
+
1357
+ // src/components/Text.tsx
1358
+ var import_themes = require("@radix-ui/themes");
1359
+
1360
+ // src/types/typographyValues.ts
1361
+ var typographyValues = {
1362
+ displayLarge: {
1363
+ fontSize: "$displayLarge",
1364
+ lineHeight: "$displayLarge",
1365
+ letterSpacing: "$displayLarge"
1366
+ },
1367
+ displayMedium: {
1368
+ fontSize: "$displayMedium",
1369
+ lineHeight: "$displayMedium",
1370
+ letterSpacing: "$displayMedium"
1371
+ },
1372
+ displaySmall: {
1373
+ fontSize: "$displaySmall",
1374
+ lineHeight: "$displaySmall",
1375
+ letterSpacing: "$displaySmall"
1376
+ },
1377
+ headline1: {
1378
+ fontSize: "$headline1",
1379
+ lineHeight: "$headline1"
1380
+ },
1381
+ headline2: {
1382
+ fontSize: "$headline2",
1383
+ lineHeight: "$headline2"
1384
+ },
1385
+ headline3: {
1386
+ fontSize: "$headline3",
1387
+ lineHeight: "$headline3"
1388
+ },
1389
+ headline4: {
1390
+ fontSize: "$headline4",
1391
+ lineHeight: "$headline4"
1392
+ },
1393
+ headline5: {
1394
+ fontSize: "$headline5",
1395
+ lineHeight: "$headline5"
1396
+ },
1397
+ headline6: {
1398
+ fontSize: "$headline6",
1399
+ lineHeight: "$headline6"
1400
+ },
1401
+ headline7: {
1402
+ fontSize: "$headline7",
1403
+ lineHeight: "$headline7"
1404
+ },
1405
+ headline8: {
1406
+ fontSize: "$headline8",
1407
+ lineHeight: "$headline8"
1408
+ },
1409
+ bodyXL: {
1410
+ fontSize: "$bodyXL",
1411
+ lineHeight: "$bodyXL"
1412
+ },
1413
+ bodyL: {
1414
+ fontSize: "$bodyL",
1415
+ lineHeight: "$bodyL"
1416
+ },
1417
+ bodyM: {
1418
+ fontSize: "$bodyM",
1419
+ lineHeight: "$bodyM"
1420
+ },
1421
+ bodyS: {
1422
+ fontSize: "$bodyS",
1423
+ lineHeight: "$bodyS"
1424
+ },
1425
+ bodyXS: {
1426
+ fontSize: "$bodyXS",
1427
+ lineHeight: "$bodyXS"
1428
+ },
1429
+ bodyXXS: {
1430
+ fontSize: "$bodyXXS",
1431
+ lineHeight: "$bodyXXS"
1432
+ },
1433
+ badgeLarge: {
1434
+ fontSize: "$badgeLarge",
1435
+ lineHeight: "$badgeLarge"
1436
+ },
1437
+ badgeMedium: {
1438
+ fontSize: "$badgeMedium",
1439
+ lineHeight: "$badgeMedium"
1440
+ },
1441
+ badgeSmall: {
1442
+ fontSize: "$badgeSmall",
1443
+ lineHeight: "$badgeSmall"
1444
+ },
1445
+ badgeExtraSmall: {
1446
+ fontSize: "$badgeExtraSmall",
1447
+ lineHeight: "$badgeExtraSmall"
1448
+ },
1449
+ tooltip: {
1450
+ fontSize: "$tooltip",
1451
+ lineHeight: "$tooltip"
1452
+ },
1453
+ popoversRegular: {
1454
+ fontSize: "$popoversRegular",
1455
+ lineHeight: "$popoversRegular"
1456
+ },
1457
+ captionLarge: {
1458
+ fontSize: "$captionLarge",
1459
+ lineHeight: "$captionLarge"
1460
+ },
1461
+ captionMedium: {
1462
+ fontSize: "$captionMedium",
1463
+ lineHeight: "$captionMedium"
1464
+ },
1465
+ captionSmall: {
1466
+ fontSize: "$captionSmall",
1467
+ lineHeight: "$captionSmall"
1468
+ },
1469
+ buttonLarge: {
1470
+ fontSize: "$buttonLarge",
1471
+ lineHeight: "$buttonLarge"
1472
+ },
1473
+ buttonMedium: {
1474
+ fontSize: "$buttonMedium",
1475
+ lineHeight: "$buttonMedium"
1476
+ },
1477
+ buttonSmall: {
1478
+ fontSize: "$buttonSmall",
1479
+ lineHeight: "$buttonSmall"
1480
+ },
1481
+ buttonExtraSmall: {
1482
+ fontSize: "$buttonExtraSmall",
1483
+ lineHeight: "$buttonExtraSmall"
1484
+ },
1485
+ labelLarge: {
1486
+ fontSize: "$labelLarge",
1487
+ lineHeight: "$labelLarge"
1488
+ },
1489
+ labelMedium: {
1490
+ fontSize: "$labelMedium",
1491
+ lineHeight: "$labelMedium"
1492
+ },
1493
+ labelSmall: {
1494
+ fontSize: "$labelSmall",
1495
+ lineHeight: "$labelSmall"
1496
+ },
1497
+ labelExtraSmall: {
1498
+ fontSize: "$labelExtraSmall",
1499
+ lineHeight: "$labelExtraSmall"
1500
+ }
1501
+ };
1502
+ var typographyLabelValues = {
1503
+ labelLarge: {
1504
+ fontSize: "$labelLarge",
1505
+ lineHeight: "$labelLarge"
1506
+ },
1507
+ labelMedium: {
1508
+ fontSize: "$labelMedium",
1509
+ lineHeight: "$labelMedium"
1510
+ },
1511
+ labelSmall: {
1512
+ fontSize: "$labelSmall",
1513
+ lineHeight: "$labelSmall"
1514
+ },
1515
+ labelExtraSmall: {
1516
+ fontSize: "$labelExtraSmall",
1517
+ lineHeight: "$labelExtraSmall"
1518
+ }
1519
+ };
1520
+
1521
+ // src/components/Text.tsx
1522
+ var import_jsx_runtime2 = require("react/jsx-runtime");
1523
+ var TextStyle = styled(import_themes.Text, {
1524
+ fontFamily: "$default",
1525
+ lineHeight: "$base",
1526
+ variants: {
1527
+ typography: typographyValues,
1528
+ fontWeight: {
1529
+ regular: { fontWeight: "$regular" },
1530
+ medium: { fontWeight: "$medium" },
1531
+ semibold: { fontWeight: "$semibold" },
1532
+ bold: { fontWeight: "$bold" }
1533
+ }
1534
+ }
1535
+ });
1536
+ function Text(_a) {
1537
+ var _b = _a, { color } = _b, props = __objRest(_b, ["color"]);
1538
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1539
+ TextStyle,
1540
+ __spreadProps(__spreadValues({}, props), {
1541
+ css: __spreadValues({
1542
+ color: color ? "$" + color : "$dark600"
1543
+ }, props.css)
1544
+ })
1545
+ );
1546
+ }
2545
1547
 
2546
1548
  // src/components/Button/styledComponents.ts
2547
1549
  var import_themes2 = require("@radix-ui/themes");
2548
- init_styles();
2549
1550
  var ButtonStyled = styled(import_themes2.Button, {
2550
1551
  $$buttonColor: "inherit",
2551
1552
  $$buttonBgColor: "$colors$grey50",
@@ -2839,7 +1840,6 @@ function Button(_a) {
2839
1840
  }
2840
1841
 
2841
1842
  // src/components/ButtonGroup.tsx
2842
- init_styles();
2843
1843
  var import_themes4 = require("@radix-ui/themes");
2844
1844
  var import_jsx_runtime4 = require("react/jsx-runtime");
2845
1845
  var ButtonItemStyled = styled(import_themes4.Button, {
@@ -3315,7 +2315,6 @@ function ButtonGroup(_a) {
3315
2315
  }
3316
2316
 
3317
2317
  // src/components/Avatar.tsx
3318
- init_styles();
3319
2318
  var import_themes5 = require("@radix-ui/themes");
3320
2319
  var import_jsx_runtime5 = require("react/jsx-runtime");
3321
2320
  var AvatarStyled = styled(import_themes5.Avatar, {
@@ -3367,12 +2366,118 @@ function Avatar(_a) {
3367
2366
 
3368
2367
  // src/components/TextField.tsx
3369
2368
  var import_react2 = __toESM(require("react"));
3370
- init_styles();
3371
2369
  var import_themes7 = require("@radix-ui/themes");
3372
- init_Icon();
3373
- init_typographyValues();
3374
- init_Text();
3375
- init_Flex();
2370
+
2371
+ // src/components/Flex.tsx
2372
+ var import_themes6 = require("@radix-ui/themes");
2373
+ var import_jsx_runtime6 = require("react/jsx-runtime");
2374
+ var FlexStyled = styled(import_themes6.Flex, {
2375
+ variants: {
2376
+ display: {
2377
+ "flex": { display: "flex" },
2378
+ "inline-flex": { display: "inline-flex" }
2379
+ },
2380
+ align: {
2381
+ start: { alignItems: "flex-start" },
2382
+ center: { alignItems: "center" },
2383
+ end: { alignItems: "flex-end" },
2384
+ stretch: { alignItems: "stretch" },
2385
+ baseline: { alignItems: "baseline" }
2386
+ },
2387
+ justify: {
2388
+ start: { justifyContent: "flex-start" },
2389
+ center: { justifyContent: "center" },
2390
+ end: { justifyContent: "flex-end" },
2391
+ between: { justifyContent: "space-between" },
2392
+ around: { justifyContent: "space-around" },
2393
+ evenly: { justifyContent: "space-evenly" }
2394
+ },
2395
+ direction: {
2396
+ row: { flexDirection: "row" },
2397
+ column: { flexDirection: "column" },
2398
+ "row-reverse": { flexDirection: "row-reverse" },
2399
+ "column-reverse": { flexDirection: "column-reverse" }
2400
+ },
2401
+ gap: {
2402
+ 0: { gap: "0px" },
2403
+ 2: { gap: "$2" },
2404
+ 4: { gap: "$4" },
2405
+ 6: { gap: "$6" },
2406
+ 8: { gap: "$8" },
2407
+ 10: { gap: "$10" },
2408
+ 12: { gap: "$12" },
2409
+ 14: { gap: "$14" },
2410
+ 16: { gap: "$16" },
2411
+ 20: { gap: "$20" },
2412
+ 22: { gap: "$22" },
2413
+ 24: { gap: "$24" },
2414
+ 32: { gap: "$32" },
2415
+ 36: { gap: "$36" },
2416
+ 40: { gap: "$40" },
2417
+ 48: { gap: "$48" },
2418
+ 56: { gap: "$56" },
2419
+ 64: { gap: "$64" },
2420
+ 72: { gap: "$72" },
2421
+ 80: { gap: "$80" },
2422
+ full: { gap: "$full" }
2423
+ },
2424
+ gapY: {
2425
+ 2: { gap: "$2" },
2426
+ 4: { gap: "$4" },
2427
+ 6: { gap: "$6" },
2428
+ 8: { gap: "$8" },
2429
+ 10: { gap: "$10" },
2430
+ 12: { gap: "$12" },
2431
+ 14: { gap: "$14" },
2432
+ 16: { gap: "$16" },
2433
+ 20: { gap: "$20" },
2434
+ 22: { gap: "$22" },
2435
+ 24: { gap: "$24" },
2436
+ 32: { gap: "$32" },
2437
+ 36: { gap: "$36" },
2438
+ 40: { gap: "$40" },
2439
+ 48: { gap: "$48" },
2440
+ 56: { gap: "$56" },
2441
+ 64: { gap: "$64" },
2442
+ 72: { gap: "$72" },
2443
+ 80: { gap: "$80" },
2444
+ full: { gap: "$full" }
2445
+ },
2446
+ gapX: {
2447
+ 2: { gap: "$2" },
2448
+ 4: { gap: "$4" },
2449
+ 6: { gap: "$6" },
2450
+ 8: { gap: "$8" },
2451
+ 10: { gap: "$10" },
2452
+ 12: { gap: "$12" },
2453
+ 14: { gap: "$14" },
2454
+ 16: { gap: "$16" },
2455
+ 20: { gap: "$20" },
2456
+ 22: { gap: "$22" },
2457
+ 24: { gap: "$24" },
2458
+ 32: { gap: "$32" },
2459
+ 36: { gap: "$36" },
2460
+ 40: { gap: "$40" },
2461
+ 48: { gap: "$48" },
2462
+ 56: { gap: "$56" },
2463
+ 64: { gap: "$64" },
2464
+ 72: { gap: "$72" },
2465
+ 80: { gap: "$80" },
2466
+ full: { gap: "$full" }
2467
+ }
2468
+ },
2469
+ defaultVariants: {
2470
+ display: "flex",
2471
+ direction: "row",
2472
+ gap: 10
2473
+ }
2474
+ });
2475
+ function Flex2(_a) {
2476
+ var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
2477
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FlexStyled, __spreadProps(__spreadValues({}, props), { children }));
2478
+ }
2479
+
2480
+ // src/components/TextField.tsx
3376
2481
  var import_mask = require("@react-input/mask");
3377
2482
  var import_jsx_runtime7 = require("react/jsx-runtime");
3378
2483
  var TextFieldStyled = styled(import_themes7.TextField.Root, {
@@ -3703,9 +2808,7 @@ function TextFieldSlot(_a) {
3703
2808
  }
3704
2809
 
3705
2810
  // src/components/RadioGroup.tsx
3706
- init_styles();
3707
2811
  var import_themes8 = require("@radix-ui/themes");
3708
- init_typographyValues();
3709
2812
  var import_jsx_runtime8 = require("react/jsx-runtime");
3710
2813
  var RadioGroupStyled = styled(import_themes8.RadioGroup.Root, {
3711
2814
  fontFamily: "$default",
@@ -3895,9 +2998,7 @@ function RadioItem(_a) {
3895
2998
  }
3896
2999
 
3897
3000
  // src/components/CheckboxGroup.tsx
3898
- init_styles();
3899
3001
  var import_themes9 = require("@radix-ui/themes");
3900
- init_typographyValues();
3901
3002
  var import_jsx_runtime9 = require("react/jsx-runtime");
3902
3003
  var CheckboxGroupStyled = styled(import_themes9.CheckboxGroup.Root, {
3903
3004
  fontFamily: "$default",
@@ -4051,10 +3152,7 @@ function CheckboxItem(_a) {
4051
3152
  }
4052
3153
 
4053
3154
  // src/components/Filter.tsx
4054
- init_styles();
4055
3155
  var import_themes10 = require("@radix-ui/themes");
4056
- init_Icon();
4057
- init_typographyValues();
4058
3156
  var import_jsx_runtime10 = require("react/jsx-runtime");
4059
3157
  var FilterContentStyled = styled(import_themes10.DropdownMenu.Content, {
4060
3158
  background: "white",
@@ -4196,10 +3294,7 @@ function FilterItem(_a) {
4196
3294
  // src/components/Dropdown.tsx
4197
3295
  var import_react3 = __toESM(require("react"));
4198
3296
  var import_free_solid_svg_icons2 = require("@fortawesome/free-solid-svg-icons");
4199
- init_typographyValues();
4200
3297
  var import_react_fontawesome2 = require("@fortawesome/react-fontawesome");
4201
- init_dist();
4202
- init_styles();
4203
3298
  var import_jsx_runtime11 = require("react/jsx-runtime");
4204
3299
  var DropdownMenuItemStyled = styled("div", {
4205
3300
  fontFamily: "$default",
@@ -4459,7 +3554,6 @@ function DropdownMenuItem(_a) {
4459
3554
 
4460
3555
  // src/components/Badge.tsx
4461
3556
  var import_react4 = __toESM(require("react"));
4462
- init_styles();
4463
3557
  var import_themes11 = require("@radix-ui/themes");
4464
3558
  var import_jsx_runtime12 = require("react/jsx-runtime");
4465
3559
  var BadgeStyled = styled(import_themes11.Badge, {
@@ -4572,16 +3666,13 @@ function Badge(_a) {
4572
3666
  }
4573
3667
 
4574
3668
  // src/components/Modal.tsx
4575
- init_styles();
4576
3669
  var import_radix_ui = require("radix-ui");
4577
- init_Icon();
4578
3670
 
4579
3671
  // src/components/Box.tsx
4580
3672
  var import_themes12 = require("@radix-ui/themes");
4581
3673
  var Box = import_themes12.Box;
4582
3674
 
4583
3675
  // src/components/Modal.tsx
4584
- init_Text();
4585
3676
  var import_jsx_runtime13 = require("react/jsx-runtime");
4586
3677
  var ModalContentStyled = styled(import_radix_ui.Dialog.Content, {
4587
3678
  fontFamily: "$default",
@@ -4646,7 +3737,6 @@ function Modal(_a) {
4646
3737
  var import_react6 = require("react");
4647
3738
 
4648
3739
  // src/components/MenuDropdown/styledComponents.ts
4649
- init_styles();
4650
3740
  var MenuDropdownContainerStyled = styled("div", {
4651
3741
  position: "relative",
4652
3742
  width: "fit-content"
@@ -4677,9 +3767,6 @@ var MenuItemsContainerStyled = styled("div", {
4677
3767
  height: "fit-content"
4678
3768
  });
4679
3769
 
4680
- // src/components/MenuDropdown/index.tsx
4681
- init_Icon();
4682
-
4683
3770
  // src/hooks/useOnClickOutside.tsx
4684
3771
  var import_react5 = require("react");
4685
3772
  function useOnClickOutside(ref, handler) {
@@ -8622,11 +7709,7 @@ function cleanEscapedString2(input) {
8622
7709
  return input.match(escapedStringRegExp2)[1].replace(doubleQuoteRegExp2, "'");
8623
7710
  }
8624
7711
 
8625
- // src/components/Calendar/index.tsx
8626
- init_Icon();
8627
-
8628
7712
  // src/components/Calendar/styledComponents.ts
8629
- init_styles();
8630
7713
  var CalendarStyled = styled("div", {
8631
7714
  fontFamily: "$default",
8632
7715
  lineHeight: "$base",
@@ -8985,11 +8068,8 @@ function Calendar(_a) {
8985
8068
 
8986
8069
  // src/components/Drawer/index.tsx
8987
8070
  var import_react8 = require("react");
8988
- init_dist();
8989
- init_Icon();
8990
8071
 
8991
8072
  // src/components/Drawer/styledComponents.ts
8992
- init_styles();
8993
8073
  var DrawerOverlayStyled = styled("div", {
8994
8074
  position: "fixed",
8995
8075
  top: 0,
@@ -9106,9 +8186,6 @@ function Drawer({
9106
8186
 
9107
8187
  // src/components/TimePicker.tsx
9108
8188
  var import_react9 = require("react");
9109
- init_Text();
9110
- init_Icon();
9111
- init_styles();
9112
8189
  var import_jsx_runtime17 = require("react/jsx-runtime");
9113
8190
  var TimePickerStyled = styled("div", {
9114
8191
  position: "relative",
@@ -9437,11 +8514,7 @@ function TimePicker({
9437
8514
  }
9438
8515
 
9439
8516
  // src/components/Alert.tsx
9440
- init_styles();
9441
8517
  var import_themes13 = require("@radix-ui/themes");
9442
- init_Flex();
9443
- init_Icon();
9444
- init_Text();
9445
8518
  var import_jsx_runtime18 = require("react/jsx-runtime");
9446
8519
  var AlertDialogSimpleStyled = styled(import_themes13.AlertDialog.Content, {
9447
8520
  fontFamily: "$default",
@@ -9682,7 +8755,6 @@ function Alert(_a) {
9682
8755
 
9683
8756
  // src/components/Switch.tsx
9684
8757
  var import_themes14 = require("@radix-ui/themes");
9685
- init_styles();
9686
8758
  var import_jsx_runtime19 = require("react/jsx-runtime");
9687
8759
  var SwitchStyled = styled(import_themes14.Switch, {
9688
8760
  all: "unset",
@@ -9782,7 +8854,6 @@ function Switch(props) {
9782
8854
 
9783
8855
  // src/components/Step.tsx
9784
8856
  var import_react10 = __toESM(require("react"));
9785
- init_styles();
9786
8857
  var import_themes15 = require("@radix-ui/themes");
9787
8858
  var import_jsx_runtime20 = require("react/jsx-runtime");
9788
8859
  var StepStyled = styled("div", {
@@ -9915,7 +8986,6 @@ function StepWrapper(_a) {
9915
8986
  }
9916
8987
 
9917
8988
  // src/components/Card.tsx
9918
- init_styles();
9919
8989
  var import_themes16 = require("@radix-ui/themes");
9920
8990
  var import_jsx_runtime21 = require("react/jsx-runtime");
9921
8991
  var CardStyled = styled(import_themes16.Card, {
@@ -9958,10 +9028,7 @@ function Card(_a) {
9958
9028
 
9959
9029
  // src/components/TextareaField.tsx
9960
9030
  var import_themes17 = require("@radix-ui/themes");
9961
- init_styles();
9962
9031
  var import_react11 = __toESM(require("react"));
9963
- init_typographyValues();
9964
- init_Text();
9965
9032
  var import_jsx_runtime22 = require("react/jsx-runtime");
9966
9033
  var TextareaFieldStyle = styled(import_themes17.TextArea, {
9967
9034
  display: "flex",
@@ -10035,44 +9102,248 @@ var TextareaField = import_react11.default.forwardRef((_a, forwardedRef) => {
10035
9102
  if (maxLength && inputRef.current) {
10036
9103
  setRemaining(maxLength - ((_a2 = inputRef.current.value.length) != null ? _a2 : 0));
10037
9104
  }
10038
- }, [maxLength]);
10039
- const handleInput = (e) => {
10040
- var _a2;
10041
- if (maxLength) {
10042
- setRemaining(maxLength - e.currentTarget.value.length);
9105
+ }, [maxLength]);
9106
+ const handleInput = (e) => {
9107
+ var _a2;
9108
+ if (maxLength) {
9109
+ setRemaining(maxLength - e.currentTarget.value.length);
9110
+ }
9111
+ (_a2 = props.onInput) == null ? void 0 : _a2.call(props, e);
9112
+ };
9113
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(TextareaContainer, { color, children: [
9114
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
9115
+ TextareaFieldStyle,
9116
+ __spreadValues({
9117
+ rows: 4,
9118
+ ref: (r) => {
9119
+ if (!r) return;
9120
+ inputRef.current = r;
9121
+ if (forwardedRef) {
9122
+ if (typeof forwardedRef === "function") forwardedRef(r);
9123
+ else forwardedRef.current = r;
9124
+ }
9125
+ },
9126
+ onInput: handleInput,
9127
+ maxLength
9128
+ }, props)
9129
+ ),
9130
+ maxLength && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TextareaLimitIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { typography: "badgeMedium", children: remaining }) })
9131
+ ] });
9132
+ });
9133
+
9134
+ // src/components/Toast/components/ToastItem.tsx
9135
+ var import_react13 = require("react");
9136
+
9137
+ // src/components/Toast/styles/index.ts
9138
+ var import_react12 = require("@stitches/react");
9139
+ var ToastPrimitive = __toESM(require("@radix-ui/react-toast"));
9140
+ var slideIn = (0, import_react12.keyframes)({
9141
+ from: {
9142
+ transform: "translateX(calc(100% + 25px))",
9143
+ opacity: 0
9144
+ },
9145
+ to: {
9146
+ transform: "translateX(0)",
9147
+ opacity: 1
9148
+ }
9149
+ });
9150
+ var slideOut = (0, import_react12.keyframes)({
9151
+ from: {
9152
+ transform: "translateX(0)",
9153
+ opacity: 1
9154
+ },
9155
+ to: {
9156
+ transform: "translateX(calc(100% + 25px))",
9157
+ opacity: 0
9158
+ }
9159
+ });
9160
+ var swipeOut = (0, import_react12.keyframes)({
9161
+ from: {
9162
+ transform: "translateX(var(--radix-toast-swipe-end-x))",
9163
+ opacity: 1
9164
+ },
9165
+ to: {
9166
+ transform: "translateX(calc(100% + 25px))",
9167
+ opacity: 0
9168
+ }
9169
+ });
9170
+ var ToastViewport = styled(ToastPrimitive.Viewport, {
9171
+ position: "fixed",
9172
+ top: 0,
9173
+ right: 0,
9174
+ display: "flex",
9175
+ flexDirection: "column",
9176
+ padding: 25,
9177
+ gap: 10,
9178
+ width: 390,
9179
+ maxWidth: "100vw",
9180
+ margin: 0,
9181
+ listStyle: "none",
9182
+ zIndex: 2147483647,
9183
+ outline: "none"
9184
+ });
9185
+ var ToastRoot = styled(ToastPrimitive.Root, {
9186
+ backgroundColor: "$neutral50",
9187
+ borderRadius: "$sm",
9188
+ boxShadow: "hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px",
9189
+ padding: "$16",
9190
+ gap: "$8",
9191
+ display: "flex",
9192
+ alignItems: "center",
9193
+ border: "1px solid",
9194
+ position: "relative",
9195
+ zIndex: 9999,
9196
+ '&[data-state="open"]': {
9197
+ animation: `${slideIn} 150ms cubic-bezier(0.16, 1, 0.3, 1)`
9198
+ },
9199
+ '&[data-state="closed"]': {
9200
+ animation: `${slideOut} 100ms ease-in`
9201
+ },
9202
+ '&[data-swipe="move"]': {
9203
+ transform: "translateX(var(--radix-toast-swipe-move-x))"
9204
+ },
9205
+ '&[data-swipe="cancel"]': {
9206
+ transform: "translateX(0)",
9207
+ transition: "transform 200ms ease-out"
9208
+ },
9209
+ '&[data-swipe="end"]': {
9210
+ animation: `${swipeOut} 100ms ease-out`
9211
+ },
9212
+ $$toastColor: "inherit",
9213
+ color: "$$toastColor",
9214
+ borderColor: "$$toastColor",
9215
+ variants: {
9216
+ type: {
9217
+ success: {
9218
+ $$toastColor: "$colors$success600",
9219
+ backgroundColor: "$success50"
9220
+ },
9221
+ error: {
9222
+ $$toastColor: "$colors$error600",
9223
+ backgroundColor: "$error50"
9224
+ },
9225
+ warning: {
9226
+ $$toastColor: "$colors$warning600",
9227
+ backgroundColor: "$warning50"
9228
+ },
9229
+ info: {
9230
+ $$toastColor: "$colors$info600",
9231
+ backgroundColor: "$info50"
9232
+ }
9233
+ }
9234
+ },
9235
+ defaultVariants: {
9236
+ type: "info"
9237
+ }
9238
+ });
9239
+ var ToastClose = styled(ToastPrimitive.Close, {
9240
+ border: "none",
9241
+ backgroundColor: "transparent",
9242
+ display: "flex",
9243
+ alignItems: "center",
9244
+ justifyContent: "center",
9245
+ color: "inherit",
9246
+ borderRadius: 4,
9247
+ padding: 4,
9248
+ cursor: "pointer",
9249
+ opacity: 0.7,
9250
+ "&:hover": {
9251
+ opacity: 1,
9252
+ backgroundColor: "rgba(0, 0, 0, 0.05)"
9253
+ },
9254
+ "&:focus": {
9255
+ boxShadow: "0 0 0 2px currentColor",
9256
+ opacity: 1
9257
+ }
9258
+ });
9259
+
9260
+ // src/components/Toast/components/ToastItem.tsx
9261
+ var import_jsx_runtime23 = require("react/jsx-runtime");
9262
+ function ToastItem({
9263
+ toast,
9264
+ onRemove
9265
+ }) {
9266
+ const [open, setOpen] = (0, import_react13.useState)(true);
9267
+ const handleOpenChange = (open2) => {
9268
+ setOpen(open2);
9269
+ if (!open2) {
9270
+ onRemove(toast.id);
9271
+ }
9272
+ };
9273
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
9274
+ ToastRoot,
9275
+ {
9276
+ type: toast.type,
9277
+ duration: toast.duration,
9278
+ open,
9279
+ onOpenChange: handleOpenChange,
9280
+ children: [
9281
+ (toast == null ? void 0 : toast.icon) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon_default, { name: toast.icon, size: "xl" }),
9282
+ /* @__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 }) }),
9283
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ToastClose, { "aria-label": "Close", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon_default, { name: "xmark", size: "md" }) })
9284
+ ]
10043
9285
  }
10044
- (_a2 = props.onInput) == null ? void 0 : _a2.call(props, e);
9286
+ );
9287
+ }
9288
+
9289
+ // src/components/Toast/components/ToastProvider.tsx
9290
+ var import_react14 = require("react");
9291
+ var ToastPrimitive2 = __toESM(require("@radix-ui/react-toast"));
9292
+ var import_jsx_runtime24 = require("react/jsx-runtime");
9293
+ var ToastContext = (0, import_react14.createContext)(null);
9294
+ function ToastProvider({
9295
+ children,
9296
+ defaultDuration = 5e3,
9297
+ maxToasts = 5,
9298
+ swipeDirection = "right"
9299
+ }) {
9300
+ const [toasts, setToasts] = (0, import_react14.useState)([]);
9301
+ const addToast = (toastData) => {
9302
+ const id = Math.random().toString(36).substr(2, 9);
9303
+ const newToast = __spreadProps(__spreadValues({
9304
+ id
9305
+ }, toastData), {
9306
+ type: (toastData == null ? void 0 : toastData.type) || "info",
9307
+ duration: (toastData == null ? void 0 : toastData.duration) || defaultDuration,
9308
+ createdAt: Date.now()
9309
+ });
9310
+ setToasts((prevToasts) => {
9311
+ const updatedToasts = [...prevToasts, newToast];
9312
+ return updatedToasts.slice(-maxToasts);
9313
+ });
9314
+ return id;
10045
9315
  };
10046
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(TextareaContainer, { color, children: [
10047
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10048
- TextareaFieldStyle,
10049
- __spreadValues({
10050
- rows: 4,
10051
- ref: (r) => {
10052
- if (!r) return;
10053
- inputRef.current = r;
10054
- if (forwardedRef) {
10055
- if (typeof forwardedRef === "function") forwardedRef(r);
10056
- else forwardedRef.current = r;
10057
- }
10058
- },
10059
- onInput: handleInput,
10060
- maxLength
10061
- }, props)
10062
- ),
10063
- maxLength && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TextareaLimitIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { typography: "badgeMedium", children: remaining }) })
10064
- ] });
10065
- });
9316
+ const removeToast = (id) => {
9317
+ setToasts((prevToasts) => prevToasts.filter((toast) => toast.id !== id));
9318
+ };
9319
+ const removeAllToasts = () => {
9320
+ setToasts([]);
9321
+ };
9322
+ const contextValue = {
9323
+ toasts,
9324
+ addToast,
9325
+ removeToast,
9326
+ removeAllToasts
9327
+ };
9328
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToastContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(ToastPrimitive2.Provider, { swipeDirection, children: [
9329
+ children,
9330
+ toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToastItem, { toast, onRemove: removeToast }, toast.id)),
9331
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToastViewport, {})
9332
+ ] }) });
9333
+ }
10066
9334
 
10067
- // src/components/Toast/index.tsx
10068
- init_ToastItem();
10069
- init_ToastProvider();
10070
- init_useToast();
9335
+ // src/components/Toast/hooks/useToast.ts
9336
+ var import_react15 = require("react");
9337
+ var useToast = () => {
9338
+ const context = (0, import_react15.useContext)(ToastContext);
9339
+ if (!context) {
9340
+ throw new Error("useToast deve ser usado dentro de um ToastProvider");
9341
+ }
9342
+ return context;
9343
+ };
10071
9344
 
10072
9345
  // src/components/Tooltip/index.tsx
10073
9346
  var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
10074
- init_styles();
10075
- init_Text();
10076
9347
  var import_jsx_runtime25 = require("react/jsx-runtime");
10077
9348
  var TooltipProvider = TooltipPrimitive.Provider;
10078
9349
  var TooltipRoot = TooltipPrimitive.Root;
@@ -10124,13 +9395,9 @@ function Tooltip({
10124
9395
  // src/components/MultiSelect.tsx
10125
9396
  var import_react16 = __toESM(require("react"));
10126
9397
  var import_themes18 = require("@radix-ui/themes");
10127
- init_styles();
10128
- init_Text();
10129
9398
  var import_react_fontawesome3 = require("@fortawesome/react-fontawesome");
10130
9399
  var import_free_solid_svg_icons3 = require("@fortawesome/free-solid-svg-icons");
10131
- init_dist();
10132
9400
  var import_react17 = require("react");
10133
- init_Flex();
10134
9401
  var import_jsx_runtime26 = require("react/jsx-runtime");
10135
9402
  var StyledContent = styled(import_themes18.DropdownMenu.Content, {
10136
9403
  backgroundColor: "$dark50",
@@ -10394,11 +9661,7 @@ var MultiSelect = import_react16.default.forwardRef(
10394
9661
  }
10395
9662
  );
10396
9663
 
10397
- // src/index.tsx
10398
- init_Flex();
10399
-
10400
9664
  // src/components/Grid.tsx
10401
- init_styles();
10402
9665
  var import_themes19 = require("@radix-ui/themes");
10403
9666
  var import_jsx_runtime27 = require("react/jsx-runtime");
10404
9667
  var GridStyled = styled(import_themes19.Grid, {
@@ -10526,7 +9789,6 @@ function Grid(_a) {
10526
9789
  }
10527
9790
 
10528
9791
  // src/components/Container.tsx
10529
- init_styles();
10530
9792
  var import_themes20 = require("@radix-ui/themes");
10531
9793
  var import_jsx_runtime28 = require("react/jsx-runtime");
10532
9794
  var ContainerStyled = styled(import_themes20.Container, {
@@ -10562,7 +9824,6 @@ function Container(_a) {
10562
9824
  }
10563
9825
 
10564
9826
  // src/components/Section.tsx
10565
- init_styles();
10566
9827
  var import_themes21 = require("@radix-ui/themes");
10567
9828
  var import_jsx_runtime29 = require("react/jsx-runtime");
10568
9829
  var SectionStyled = styled(import_themes21.Section, {
@@ -10594,9 +9855,6 @@ function Section(_a) {
10594
9855
  // src/components/FormFields/subComponents/ErrorFormMessage.tsx
10595
9856
  var import_free_solid_svg_icons4 = require("@fortawesome/free-solid-svg-icons");
10596
9857
  var import_react_fontawesome4 = require("@fortawesome/react-fontawesome");
10597
- init_dist();
10598
- init_Flex();
10599
- init_Text();
10600
9858
  var import_jsx_runtime30 = require("react/jsx-runtime");
10601
9859
  var ErrorFormMessage = ({ message: message2 }) => {
10602
9860
  if (!message2) return null;
@@ -10610,7 +9868,6 @@ var ErrorFormMessage = ({ message: message2 }) => {
10610
9868
  };
10611
9869
 
10612
9870
  // src/components/FormFields/subComponents/FormLabel.tsx
10613
- init_Text();
10614
9871
  var import_jsx_runtime31 = require("react/jsx-runtime");
10615
9872
  var FormLabel = ({
10616
9873
  name,
@@ -10636,7 +9893,6 @@ var FormLabel = ({
10636
9893
 
10637
9894
  // src/components/FormFields/TextAreaFormField.tsx
10638
9895
  var import_react_hook_form = require("react-hook-form");
10639
- init_Flex();
10640
9896
  var import_jsx_runtime32 = require("react/jsx-runtime");
10641
9897
  var TextAreaFormField = (_a) => {
10642
9898
  var _b = _a, {
@@ -10689,7 +9945,6 @@ var TextAreaFormField = (_a) => {
10689
9945
 
10690
9946
  // src/components/FormFields/TextFormField.tsx
10691
9947
  var import_react_hook_form2 = require("react-hook-form");
10692
- init_Flex();
10693
9948
  var import_react18 = require("react");
10694
9949
  var import_mask2 = require("@react-input/mask");
10695
9950
  var import_jsx_runtime33 = require("react/jsx-runtime");
@@ -10796,7 +10051,6 @@ var Form = (_a) => {
10796
10051
 
10797
10052
  // src/components/FormFields/MultiSelectFormField.tsx
10798
10053
  var import_react_hook_form4 = require("react-hook-form");
10799
- init_Flex();
10800
10054
  var import_jsx_runtime35 = require("react/jsx-runtime");
10801
10055
  var MultiSelectFormField = (_a) => {
10802
10056
  var _b = _a, {
@@ -10904,7 +10158,6 @@ var PhoneFormField = ({
10904
10158
 
10905
10159
  // src/components/FormFields/CPFFormField.tsx
10906
10160
  var import_react_hook_form5 = require("react-hook-form");
10907
- init_Flex();
10908
10161
  var import_jsx_runtime37 = require("react/jsx-runtime");
10909
10162
  var isValidCPF = (cpf) => {
10910
10163
  cpf = cpf.replace(/[^\d]+/g, "");
@@ -11125,12 +10378,8 @@ var IdentityDocumentNumberFormField = ({
11125
10378
  // src/components/FormFields/AddressFormFields/index.tsx
11126
10379
  var import_react_hook_form8 = require("react-hook-form");
11127
10380
 
11128
- // src/components/FormFields/AddressFormFields/CountryFormField.tsx
11129
- init_Flex();
11130
-
11131
10381
  // src/components/FormFields/SelectFormField.tsx
11132
10382
  var import_react_hook_form6 = require("react-hook-form");
11133
- init_Flex();
11134
10383
 
11135
10384
  // src/utils/getNestedValue.ts
11136
10385
  function getNestedValue(obj, path) {
@@ -11422,7 +10671,6 @@ function CityFormField({
11422
10671
  }
11423
10672
 
11424
10673
  // src/components/FormFields/AddressFormFields/index.tsx
11425
- init_styles();
11426
10674
  var import_jsx_runtime46 = require("react/jsx-runtime");
11427
10675
  function getNestedValue2(obj, path) {
11428
10676
  return path.split(".").reduce((acc, key) => acc == null ? void 0 : acc[key], obj);
@@ -11552,7 +10800,6 @@ function AddressFormFields({
11552
10800
 
11553
10801
  // src/components/FormFields/RadioGroupFormField.tsx
11554
10802
  var import_react_hook_form9 = require("react-hook-form");
11555
- init_Flex();
11556
10803
  var import_jsx_runtime47 = require("react/jsx-runtime");
11557
10804
  var RadioGroupFormField = ({
11558
10805
  name,
@@ -11614,7 +10861,6 @@ var RadioGroupFormField = ({
11614
10861
 
11615
10862
  // src/components/FormFields/CheckboxGroupFormField.tsx
11616
10863
  var import_react_hook_form10 = require("react-hook-form");
11617
- init_Flex();
11618
10864
  var import_jsx_runtime48 = require("react/jsx-runtime");
11619
10865
  var CheckboxGroupFormField = ({
11620
10866
  name,
@@ -11683,8 +10929,6 @@ var CheckboxGroupFormField = ({
11683
10929
 
11684
10930
  // src/components/FormFields/SwitchFormField.tsx
11685
10931
  var import_react_hook_form11 = require("react-hook-form");
11686
- init_Flex();
11687
- init_Text();
11688
10932
  var import_jsx_runtime49 = require("react/jsx-runtime");
11689
10933
  var SwitchFormField = ({
11690
10934
  name,
@@ -11742,19 +10986,602 @@ var EmailFormField = ({
11742
10986
 
11743
10987
  // src/components/FormFields/RichEditorFormField.tsx
11744
10988
  var import_react_hook_form12 = require("react-hook-form");
11745
- init_Flex();
11746
10989
 
11747
10990
  // src/components/RichEditor/RichEditor.tsx
11748
10991
  var import_react21 = require("react");
10992
+
10993
+ // src/components/RichEditor/QuillComponent.tsx
10994
+ var import_react20 = require("react");
10995
+ var import_react_quilljs = require("react-quilljs");
10996
+ var import_quill_snow = require("quill/dist/quill.snow.css");
10997
+
10998
+ // src/utils/uploadService.ts
10999
+ var generateUniqueFilename = (originalName) => {
11000
+ const timestamp = Date.now().toString(36);
11001
+ const random = Math.random().toString(36).substring(2, 8);
11002
+ const extension = originalName.split(".").pop();
11003
+ return `${timestamp}_${random}.${extension}`;
11004
+ };
11005
+ var UploadService = class {
11006
+ static getPresignedUrl(filename, contentType, config2) {
11007
+ return __async(this, null, function* () {
11008
+ var _a;
11009
+ const apiUrl = config2.apiUrl;
11010
+ const presignedUrlEndpoint = (_a = config2.endpoints) == null ? void 0 : _a.presignedUrl;
11011
+ const bucket = config2.s3Bucket;
11012
+ try {
11013
+ const response = yield fetch(`${apiUrl}${presignedUrlEndpoint}`, {
11014
+ method: "POST",
11015
+ headers: {
11016
+ "Content-Type": "application/json"
11017
+ },
11018
+ body: JSON.stringify({
11019
+ filename,
11020
+ contentType,
11021
+ bucket
11022
+ })
11023
+ });
11024
+ if (!response.ok) {
11025
+ throw new Error("Falha ao gerar URL de upload");
11026
+ }
11027
+ const data = yield response.json();
11028
+ return data.presignedUrl;
11029
+ } catch (error) {
11030
+ console.error("Erro ao gerar URL pr\xE9-assinada:", error);
11031
+ throw new Error("Falha ao gerar URL de upload");
11032
+ }
11033
+ });
11034
+ }
11035
+ static uploadToS3(file, config2, onProgress) {
11036
+ return __async(this, null, function* () {
11037
+ try {
11038
+ const uniqueFilename = generateUniqueFilename(file.name);
11039
+ const blob = new Blob([file], { type: file.type });
11040
+ const s3Url = `${config2.s3Url}/${uniqueFilename}`;
11041
+ return new Promise((resolve, reject) => {
11042
+ const xhr = new XMLHttpRequest();
11043
+ xhr.upload.addEventListener("progress", (event) => {
11044
+ if (event.lengthComputable) {
11045
+ const percentComplete = Math.round(
11046
+ event.loaded / event.total * 100
11047
+ );
11048
+ onProgress == null ? void 0 : onProgress({
11049
+ amount: percentComplete,
11050
+ message: `Fazendo upload... ${percentComplete}%`
11051
+ });
11052
+ }
11053
+ });
11054
+ xhr.addEventListener("load", () => {
11055
+ if (xhr.status === 200) {
11056
+ resolve({
11057
+ url: s3Url,
11058
+ filename: uniqueFilename,
11059
+ size: file.size,
11060
+ type: file.type
11061
+ });
11062
+ } else {
11063
+ reject(new Error(`Upload falhou com status: ${xhr.status}`));
11064
+ }
11065
+ });
11066
+ xhr.addEventListener("error", () => {
11067
+ reject(new Error("Erro de rede durante upload"));
11068
+ });
11069
+ xhr.open("PUT", s3Url);
11070
+ xhr.setRequestHeader("Content-Type", file.type);
11071
+ xhr.send(blob);
11072
+ });
11073
+ } catch (error) {
11074
+ console.error("Erro no upload:", error);
11075
+ throw error;
11076
+ }
11077
+ });
11078
+ }
11079
+ static uploadViaAPI(file, config2, onProgress) {
11080
+ return __async(this, null, function* () {
11081
+ try {
11082
+ const formData = new FormData();
11083
+ formData.append("file", file);
11084
+ const bucket = config2.s3Bucket;
11085
+ formData.append("bucket", bucket);
11086
+ const xhr = new XMLHttpRequest();
11087
+ return new Promise((resolve, reject) => {
11088
+ var _a;
11089
+ xhr.upload.addEventListener("progress", (event) => {
11090
+ if (event.lengthComputable) {
11091
+ const percentComplete = Math.round(
11092
+ event.loaded / event.total * 100
11093
+ );
11094
+ onProgress == null ? void 0 : onProgress({
11095
+ amount: percentComplete,
11096
+ message: `Fazendo upload... ${percentComplete}%`
11097
+ });
11098
+ }
11099
+ });
11100
+ xhr.addEventListener("load", () => {
11101
+ if (xhr.status === 200) {
11102
+ try {
11103
+ const response = JSON.parse(xhr.responseText);
11104
+ resolve({
11105
+ url: response.url,
11106
+ filename: response.filename,
11107
+ size: file.size,
11108
+ type: file.type
11109
+ });
11110
+ } catch (error) {
11111
+ reject(new Error("Resposta inv\xE1lida do servidor"));
11112
+ }
11113
+ } else {
11114
+ reject(new Error(`Upload falhou com status: ${xhr.status}`));
11115
+ }
11116
+ });
11117
+ xhr.addEventListener("error", () => {
11118
+ reject(new Error("Erro de rede durante upload"));
11119
+ });
11120
+ const apiUrl = config2.apiUrl;
11121
+ const uploadEndpoint = (_a = config2.endpoints) == null ? void 0 : _a.upload;
11122
+ xhr.open("POST", `${apiUrl}${uploadEndpoint}`);
11123
+ xhr.send(formData);
11124
+ });
11125
+ } catch (error) {
11126
+ console.error("Erro no upload via API:", error);
11127
+ throw error;
11128
+ }
11129
+ });
11130
+ }
11131
+ };
11132
+
11133
+ // src/components/RichEditor/styledComponents.ts
11134
+ var QuillContainer = styled("div", {
11135
+ display: "flex",
11136
+ flexDirection: "column"
11137
+ });
11138
+ var QuillEditor = styled("div", {
11139
+ "& .ql-editor": {
11140
+ minHeight: "200px",
11141
+ padding: "$12",
11142
+ fontSize: "$14",
11143
+ lineHeight: "$base",
11144
+ fontFamily: "$default",
11145
+ color: "$neutral900",
11146
+ backgroundColor: "$white",
11147
+ border: "none",
11148
+ outline: "none",
11149
+ cursor: "text",
11150
+ caretColor: "$primary500",
11151
+ "&:focus": {
11152
+ borderColor: "$primary500",
11153
+ boxShadow: "0 0 0 1px $primary500"
11154
+ },
11155
+ "& p": {
11156
+ margin: "0 0 $8 0"
11157
+ },
11158
+ "& h1 span, & h1, & h2, & h2 span": {
11159
+ lineHeight: "1.5rem"
11160
+ },
11161
+ "& p:last-child": {
11162
+ marginBottom: 0
11163
+ },
11164
+ "& .ql-cursor": {
11165
+ borderLeft: "2px solid $primary500"
11166
+ }
11167
+ },
11168
+ "& .ql-toolbar": {
11169
+ backgroundColor: "$grey100",
11170
+ border: "1px solid $neutral300",
11171
+ borderBottom: "none",
11172
+ borderTopLeftRadius: "$sm",
11173
+ borderTopRightRadius: "$sm",
11174
+ padding: "$8 $12"
11175
+ },
11176
+ "& .ql-container": {
11177
+ border: "1px solid $neutral300",
11178
+ borderTop: "none",
11179
+ borderBottomLeftRadius: "$sm",
11180
+ borderBottomRightRadius: "$sm",
11181
+ fontFamily: "$default"
11182
+ },
11183
+ "& .ql-snow .ql-picker.ql-header .ql-picker-item[data-value='1']::before": {
11184
+ content: "T\xEDtulo 1"
11185
+ },
11186
+ "& .ql-snow .ql-picker.ql-header .ql-picker-item[data-value='2']::before": {
11187
+ content: "T\xEDtulo 2"
11188
+ }
11189
+ });
11190
+
11191
+ // src/components/RichEditor/QuillComponent.tsx
11192
+ var import_jsx_runtime51 = require("react/jsx-runtime");
11193
+ var QuillComponent = ({
11194
+ value = "",
11195
+ onChange,
11196
+ placeholder = "Digite seu texto aqui...",
11197
+ disabled = false,
11198
+ className,
11199
+ uploadConfig,
11200
+ simpleVersion = false,
11201
+ onCharacterCountChange,
11202
+ maxLength
11203
+ }) => {
11204
+ const [showVideoModal, setShowVideoModal] = (0, import_react20.useState)(false);
11205
+ const [videoUrl, setVideoUrl] = (0, import_react20.useState)("");
11206
+ const [showLinkModal, setShowLinkModal] = (0, import_react20.useState)(false);
11207
+ const [linkUrl, setLinkUrl] = (0, import_react20.useState)("");
11208
+ const videoModalRef = (0, import_react20.useRef)(null);
11209
+ const linkModalRef = (0, import_react20.useRef)(null);
11210
+ const { addToast, removeToast } = useToast();
11211
+ const modules = simpleVersion ? {
11212
+ toolbar: [
11213
+ ["bold", "italic", "underline"],
11214
+ [{ list: "ordered" }, { list: "bullet" }],
11215
+ ["link"]
11216
+ ],
11217
+ clipboard: {
11218
+ matchVisual: false
11219
+ }
11220
+ } : {
11221
+ toolbar: [
11222
+ [{ header: [1, 2, false] }],
11223
+ ["bold", "italic", "underline", "strike"],
11224
+ [{ color: [] }, { background: [] }],
11225
+ [{ align: [] }],
11226
+ [{ list: "ordered" }, { list: "bullet" }],
11227
+ ["link", "image", "video"]
11228
+ ],
11229
+ clipboard: {
11230
+ matchVisual: false
11231
+ }
11232
+ };
11233
+ const formats = simpleVersion ? ["bold", "italic", "underline", "list", "link"] : [
11234
+ "header",
11235
+ "bold",
11236
+ "italic",
11237
+ "underline",
11238
+ "strike",
11239
+ "color",
11240
+ "background",
11241
+ "align",
11242
+ "list",
11243
+ "link",
11244
+ "image",
11245
+ "video"
11246
+ ];
11247
+ const { quill, quillRef } = (0, import_react_quilljs.useQuill)({
11248
+ theme: "snow",
11249
+ modules,
11250
+ formats,
11251
+ placeholder,
11252
+ readOnly: disabled
11253
+ });
11254
+ const handleImageUpload = (0, import_react20.useCallback)(
11255
+ (file) => __async(null, null, function* () {
11256
+ if (disabled || !quill || !uploadConfig) return;
11257
+ try {
11258
+ addToast({
11259
+ type: "info",
11260
+ message: "Carregando imagem...",
11261
+ duration: 2e3
11262
+ });
11263
+ const uploadedFile = yield UploadService.uploadToS3(file, uploadConfig);
11264
+ removeToast("info");
11265
+ addToast({
11266
+ type: "success",
11267
+ message: "Imagem adicionada com sucesso!"
11268
+ });
11269
+ const selection = quill.getSelection();
11270
+ const index = selection ? selection.index : quill.getLength();
11271
+ quill.insertEmbed(index, "image", uploadedFile.url);
11272
+ quill.setSelection(index + 1, 0);
11273
+ } catch (error) {
11274
+ console.error("Erro no upload:", error);
11275
+ addToast({
11276
+ type: "error",
11277
+ message: "Erro no upload: N\xE3o foi poss\xEDvel enviar a imagem. Tente novamente."
11278
+ });
11279
+ }
11280
+ }),
11281
+ [disabled, quill, addToast, removeToast, uploadConfig]
11282
+ );
11283
+ (0, import_react20.useEffect)(() => {
11284
+ if (quill && value) {
11285
+ const currentContent = quill.root.innerHTML;
11286
+ if (currentContent !== value) {
11287
+ const selection = quill.getSelection();
11288
+ quill.clipboard.dangerouslyPasteHTML(value);
11289
+ if (selection) {
11290
+ quill.setSelection(selection.index, selection.length);
11291
+ } else {
11292
+ quill.setSelection(quill.getLength(), 0);
11293
+ }
11294
+ }
11295
+ }
11296
+ }, [quill, value]);
11297
+ (0, import_react20.useEffect)(() => {
11298
+ if (quill) {
11299
+ quill.on("text-change", (delta, oldDelta, source) => {
11300
+ if (source === "user") {
11301
+ const text = quill.getText().trim();
11302
+ const count = text.length;
11303
+ if (maxLength !== void 0 && count > maxLength) {
11304
+ quill.deleteText(maxLength, count - maxLength);
11305
+ return;
11306
+ }
11307
+ onChange == null ? void 0 : onChange(quill.root.innerHTML);
11308
+ onCharacterCountChange == null ? void 0 : onCharacterCountChange(count);
11309
+ }
11310
+ });
11311
+ const toolbar = quill.getModule("toolbar");
11312
+ if (toolbar) {
11313
+ toolbar.addHandler("link", () => setShowLinkModal(true));
11314
+ toolbar.addHandler("video", () => setShowVideoModal(true));
11315
+ toolbar.addHandler("image", () => {
11316
+ const input = document.createElement("input");
11317
+ input.setAttribute("type", "file");
11318
+ input.setAttribute("accept", "image/*");
11319
+ input.click();
11320
+ input.onchange = () => __async(null, null, function* () {
11321
+ var _a;
11322
+ const file = (_a = input.files) == null ? void 0 : _a[0];
11323
+ if (file) {
11324
+ yield handleImageUpload(file);
11325
+ }
11326
+ });
11327
+ });
11328
+ }
11329
+ setTimeout(() => {
11330
+ var _a, _b;
11331
+ const toolbarElement = (_b = (_a = quillRef.current) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
11332
+ if (toolbarElement) {
11333
+ const headerSelect = toolbarElement.querySelector(
11334
+ "select[data-value]"
11335
+ );
11336
+ if (headerSelect) {
11337
+ const options = headerSelect.querySelectorAll("option");
11338
+ options.forEach((option) => {
11339
+ if (option.value === "1") {
11340
+ option.textContent = "T\xEDtulo 1";
11341
+ } else if (option.value === "2") {
11342
+ option.textContent = "T\xEDtulo 2";
11343
+ } else if (option.value === "") {
11344
+ option.textContent = "Normal";
11345
+ }
11346
+ });
11347
+ }
11348
+ }
11349
+ }, 2e3);
11350
+ }
11351
+ }, [quill, onChange, handleImageUpload, onCharacterCountChange]);
11352
+ (0, import_react20.useEffect)(() => {
11353
+ if (quill) {
11354
+ quill.enable(!disabled);
11355
+ if (!disabled) {
11356
+ if (quill.getLength() <= 1) {
11357
+ quill.focus();
11358
+ quill.setSelection(0, 0);
11359
+ }
11360
+ }
11361
+ }
11362
+ }, [quill, disabled]);
11363
+ const handleLinkCancel = (0, import_react20.useCallback)(() => {
11364
+ setLinkUrl("");
11365
+ setShowLinkModal(false);
11366
+ }, []);
11367
+ const handleLinkSubmit = (0, import_react20.useCallback)(() => {
11368
+ if (!linkUrl.trim() || !quill) return;
11369
+ const url = linkUrl.trim();
11370
+ const selection = quill.getSelection();
11371
+ if (selection && selection.length > 0) {
11372
+ quill.format("link", url);
11373
+ } else {
11374
+ const index = quill.getLength();
11375
+ quill.insertText(index, url, "link", url);
11376
+ quill.setSelection(index + url.length, 0);
11377
+ }
11378
+ setLinkUrl("");
11379
+ setShowLinkModal(false);
11380
+ }, [linkUrl, quill]);
11381
+ const handleVideoCancel = (0, import_react20.useCallback)(() => {
11382
+ setVideoUrl("");
11383
+ setShowVideoModal(false);
11384
+ }, []);
11385
+ const handleVideoSubmit = (0, import_react20.useCallback)(() => {
11386
+ var _a, _b;
11387
+ if (!videoUrl.trim() || !quill) return;
11388
+ let processedUrl = videoUrl.trim();
11389
+ if (processedUrl.includes("youtube.com/watch")) {
11390
+ const videoId = (_a = processedUrl.match(/[?&]v=([^&]+)/)) == null ? void 0 : _a[1];
11391
+ if (videoId) {
11392
+ processedUrl = `https://www.youtube.com/embed/${videoId}`;
11393
+ }
11394
+ } else if (processedUrl.includes("youtu.be/")) {
11395
+ const videoId = (_b = processedUrl.split("youtu.be/")[1]) == null ? void 0 : _b.split("?")[0];
11396
+ if (videoId) {
11397
+ processedUrl = `https://www.youtube.com/embed/${videoId}`;
11398
+ }
11399
+ }
11400
+ const videoHTML = `
11401
+ <iframe
11402
+ src="${processedUrl}"
11403
+ style="max-width:100%; height:315px; border:0;"
11404
+ title="Video player"
11405
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
11406
+ allowfullscreen>
11407
+ </iframe>
11408
+ <br/>
11409
+ `;
11410
+ const selection = quill.getSelection();
11411
+ const insertIndex = selection ? selection.index : quill.getLength();
11412
+ quill.clipboard.dangerouslyPasteHTML(insertIndex, videoHTML);
11413
+ quill.setSelection(insertIndex + 1, 0);
11414
+ setVideoUrl("");
11415
+ setShowVideoModal(false);
11416
+ }, [videoUrl, quill]);
11417
+ (0, import_react20.useEffect)(() => {
11418
+ const handleClickOutside = (event) => {
11419
+ if (showVideoModal && videoModalRef.current && !videoModalRef.current.contains(event.target)) {
11420
+ handleVideoCancel();
11421
+ }
11422
+ if (showLinkModal && linkModalRef.current && !linkModalRef.current.contains(event.target)) {
11423
+ handleLinkCancel();
11424
+ }
11425
+ };
11426
+ document.addEventListener("mousedown", handleClickOutside);
11427
+ return () => document.removeEventListener("mousedown", handleClickOutside);
11428
+ }, [showVideoModal, showLinkModal, handleVideoCancel, handleLinkCancel]);
11429
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuillContainer, { className, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(QuillEditor, { style: { position: "relative" }, children: [
11430
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { ref: quillRef }),
11431
+ showVideoModal && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11432
+ "div",
11433
+ {
11434
+ ref: videoModalRef,
11435
+ style: {
11436
+ position: "absolute",
11437
+ top: "20px",
11438
+ left: "20px",
11439
+ right: "20px",
11440
+ backgroundColor: "white",
11441
+ border: "1px solid #e0e0e0",
11442
+ borderRadius: "4px",
11443
+ padding: "12px",
11444
+ boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
11445
+ zIndex: 1e3,
11446
+ width: "fit-content"
11447
+ },
11448
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Flex2, { gap: 8, align: "center", children: [
11449
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11450
+ Text,
11451
+ {
11452
+ style: { fontSize: "14px", fontWeight: "500", color: "#333" },
11453
+ children: "V\xEDdeo:"
11454
+ }
11455
+ ),
11456
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11457
+ "input",
11458
+ {
11459
+ type: "text",
11460
+ value: videoUrl,
11461
+ onChange: (e) => setVideoUrl(e.target.value),
11462
+ placeholder: "Embed URL",
11463
+ style: {
11464
+ padding: "8px 12px",
11465
+ border: "1px solid #d0d0d0",
11466
+ borderRadius: "4px",
11467
+ fontSize: "14px",
11468
+ backgroundColor: "#f8f8f8"
11469
+ },
11470
+ onKeyDown: (e) => {
11471
+ if (e.key === "Enter") {
11472
+ handleVideoSubmit();
11473
+ } else if (e.key === "Escape") {
11474
+ handleVideoCancel();
11475
+ }
11476
+ },
11477
+ autoFocus: true
11478
+ }
11479
+ ),
11480
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11481
+ "button",
11482
+ {
11483
+ onClick: handleVideoSubmit,
11484
+ disabled: !videoUrl.trim(),
11485
+ style: {
11486
+ padding: "8px 16px",
11487
+ backgroundColor: "#007bff",
11488
+ color: "white",
11489
+ border: "none",
11490
+ borderRadius: "4px",
11491
+ fontSize: "14px",
11492
+ cursor: videoUrl.trim() ? "pointer" : "not-allowed",
11493
+ opacity: videoUrl.trim() ? 1 : 0.6
11494
+ },
11495
+ children: "Ok"
11496
+ }
11497
+ )
11498
+ ] })
11499
+ }
11500
+ ),
11501
+ showLinkModal && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11502
+ "div",
11503
+ {
11504
+ ref: linkModalRef,
11505
+ style: {
11506
+ position: "absolute",
11507
+ top: "20px",
11508
+ left: "20px",
11509
+ right: "20px",
11510
+ backgroundColor: "white",
11511
+ border: "1px solid #e0e0e0",
11512
+ borderRadius: "4px",
11513
+ padding: "12px",
11514
+ boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
11515
+ zIndex: 1e3,
11516
+ width: "fit-content"
11517
+ },
11518
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Flex2, { gap: 8, align: "center", children: [
11519
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11520
+ Text,
11521
+ {
11522
+ style: { fontSize: "14px", fontWeight: "500", color: "#333" },
11523
+ children: "Link:"
11524
+ }
11525
+ ),
11526
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11527
+ "input",
11528
+ {
11529
+ type: "text",
11530
+ value: linkUrl,
11531
+ onChange: (e) => setLinkUrl(e.target.value),
11532
+ placeholder: "URL do link",
11533
+ style: {
11534
+ padding: "8px 12px",
11535
+ border: "1px solid #d0d0d0",
11536
+ borderRadius: "4px",
11537
+ fontSize: "14px",
11538
+ backgroundColor: "#f8f8f8",
11539
+ width: "300px"
11540
+ },
11541
+ onKeyDown: (e) => {
11542
+ if (e.key === "Enter") {
11543
+ handleLinkSubmit();
11544
+ } else if (e.key === "Escape") {
11545
+ handleLinkCancel();
11546
+ }
11547
+ },
11548
+ autoFocus: true
11549
+ }
11550
+ ),
11551
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11552
+ "button",
11553
+ {
11554
+ onClick: handleLinkSubmit,
11555
+ disabled: !linkUrl.trim(),
11556
+ style: {
11557
+ padding: "8px 16px",
11558
+ backgroundColor: "#007bff",
11559
+ color: "white",
11560
+ border: "none",
11561
+ borderRadius: "4px",
11562
+ fontSize: "14px",
11563
+ cursor: linkUrl.trim() ? "pointer" : "not-allowed",
11564
+ opacity: linkUrl.trim() ? 1 : 0.6
11565
+ },
11566
+ children: "Ok"
11567
+ }
11568
+ )
11569
+ ] })
11570
+ }
11571
+ )
11572
+ ] }) });
11573
+ };
11574
+ var QuillComponent_default = QuillComponent;
11575
+
11576
+ // src/components/RichEditor/RichEditor.tsx
11749
11577
  var import_jsx_runtime52 = require("react/jsx-runtime");
11750
- var QuillComponent2 = (0, import_react21.lazy)(() => Promise.resolve().then(() => (init_QuillComponent(), QuillComponent_exports)));
11751
11578
  var RichEditor = (props) => {
11752
11579
  const [isClient, setIsClient] = (0, import_react21.useState)(false);
11753
11580
  (0, import_react21.useEffect)(() => {
11754
11581
  setIsClient(typeof window !== "undefined");
11755
11582
  }, []);
11756
11583
  if (!isClient) return null;
11757
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ToastProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react21.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(QuillComponent2, __spreadValues({}, props)) }) }) });
11584
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ToastProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(QuillComponent_default, __spreadValues({}, props)) }) });
11758
11585
  };
11759
11586
  var RichEditor_default = RichEditor;
11760
11587
 
@@ -11836,7 +11663,6 @@ var RichEditorFormField = (_a) => {
11836
11663
 
11837
11664
  // src/components/FormFields/CalendarFormField.tsx
11838
11665
  var import_react_hook_form13 = require("react-hook-form");
11839
- init_Flex();
11840
11666
  var import_react23 = require("react");
11841
11667
  var import_jsx_runtime54 = require("react/jsx-runtime");
11842
11668
  var CalendarFormField = (_a) => {
@@ -11913,7 +11739,6 @@ var CalendarFormField = (_a) => {
11913
11739
 
11914
11740
  // src/components/FormFields/TimePickerFormField.tsx
11915
11741
  var import_react_hook_form14 = require("react-hook-form");
11916
- init_Flex();
11917
11742
  var import_react24 = require("react");
11918
11743
  var import_jsx_runtime55 = require("react/jsx-runtime");
11919
11744
  var TimePickerFormField = (_a) => {
@@ -11985,7 +11810,6 @@ var TimePickerFormField = (_a) => {
11985
11810
 
11986
11811
  // src/hooks/useImageUpload.ts
11987
11812
  var import_react25 = require("react");
11988
- init_uploadService();
11989
11813
  var useImageUpload = (options) => {
11990
11814
  const [isUploading, setIsUploading] = (0, import_react25.useState)(false);
11991
11815
  const [progress, setProgress] = (0, import_react25.useState)(null);
@@ -12083,9 +11907,6 @@ var useImageUpload = (options) => {
12083
11907
  reset
12084
11908
  };
12085
11909
  };
12086
-
12087
- // src/index.tsx
12088
- init_uploadService();
12089
11910
  // Annotate the CommonJS export names for ESM import in node:
12090
11911
  0 && (module.exports = {
12091
11912
  AddressFormFields,