@lets-events/react 11.8.1 → 12.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/.eslintrc.json +2 -2
  2. package/.turbo/turbo-build.log +21 -18
  3. package/CHANGELOG.md +12 -0
  4. package/dist/index.d.mts +139 -11
  5. package/dist/index.d.ts +139 -11
  6. package/dist/index.js +1260 -361
  7. package/dist/index.mjs +1251 -358
  8. package/package.json +7 -2
  9. package/src/components/Alert.tsx +303 -303
  10. package/src/components/Avatar.tsx +55 -55
  11. package/src/components/Badge.tsx +125 -125
  12. package/src/components/Box.tsx +3 -3
  13. package/src/components/Button/index.tsx +16 -16
  14. package/src/components/Button/styledComponents.ts +288 -287
  15. package/src/components/ButtonGroup.tsx +484 -484
  16. package/src/components/Calendar/index.tsx +146 -136
  17. package/src/components/Calendar/styledComponents.ts +250 -209
  18. package/src/components/Card.tsx +48 -48
  19. package/src/components/CheckboxGroup.tsx +176 -176
  20. package/src/components/Container.tsx +39 -39
  21. package/src/components/Drawer/index.tsx +129 -55
  22. package/src/components/Drawer/styledComponents.ts +46 -46
  23. package/src/components/Dropdown.tsx +302 -302
  24. package/src/components/Filter.tsx +164 -164
  25. package/src/components/Flex.tsx +118 -118
  26. package/src/components/FormFields/AddressFormFields/CityFormField.tsx +111 -111
  27. package/src/components/FormFields/AddressFormFields/CountryFormField.tsx +33 -33
  28. package/src/components/FormFields/AddressFormFields/PostalCodeFormField.tsx +39 -39
  29. package/src/components/FormFields/AddressFormFields/StateFormField.tsx +32 -32
  30. package/src/components/FormFields/AddressFormFields/index.tsx +141 -141
  31. package/src/components/FormFields/BirthDateFormField.tsx +84 -84
  32. package/src/components/FormFields/CNPJFormField.tsx +87 -87
  33. package/src/components/FormFields/CPFFormField.tsx +78 -78
  34. package/src/components/FormFields/CalendarFormField.tsx +92 -0
  35. package/src/components/FormFields/CheckboxGroupFormField.tsx +91 -91
  36. package/src/components/FormFields/EmailFormField.tsx +27 -27
  37. package/src/components/FormFields/Form.tsx +39 -39
  38. package/src/components/FormFields/IdentityDocumentNumberFormField.tsx +37 -40
  39. package/src/components/FormFields/MultiSelectFormField.tsx +64 -55
  40. package/src/components/FormFields/PhoneFormField.tsx +40 -40
  41. package/src/components/FormFields/RadioGroupFormField.tsx +84 -84
  42. package/src/components/FormFields/RichEditorFormField.tsx +69 -0
  43. package/src/components/FormFields/SelectFormField.tsx +93 -93
  44. package/src/components/FormFields/TextAreaFormField.tsx +57 -48
  45. package/src/components/FormFields/TextFormField.tsx +112 -112
  46. package/src/components/FormFields/TimePickerFormField.tsx +88 -0
  47. package/src/components/FormFields/subComponents/ErrorFormMessage.tsx +36 -36
  48. package/src/components/FormFields/subComponents/FormLabel.tsx +29 -29
  49. package/src/components/FormFields/utils/validation.ts +23 -23
  50. package/src/components/Grid.tsx +137 -137
  51. package/src/components/Icon.tsx +47 -47
  52. package/src/components/MenuDropdown/index.tsx +38 -38
  53. package/src/components/MenuDropdown/styledComponents.ts +31 -31
  54. package/src/components/Modal.tsx +90 -90
  55. package/src/components/MultiSelect.tsx +311 -267
  56. package/src/components/RadioGroup.tsx +210 -210
  57. package/src/components/RichEditor/QuillComponent.tsx +413 -0
  58. package/src/components/RichEditor/RichEditor.tsx +38 -0
  59. package/src/components/RichEditor/index.ts +2 -0
  60. package/src/components/RichEditor/styledComponents.ts +62 -0
  61. package/src/components/Section.tsx +33 -33
  62. package/src/components/Step.tsx +164 -164
  63. package/src/components/Switch.tsx +108 -108
  64. package/src/components/Text.tsx +38 -38
  65. package/src/components/TextField.tsx +372 -365
  66. package/src/components/TextareaField.tsx +128 -128
  67. package/src/components/TimePicker.tsx +325 -298
  68. package/src/components/Toast/components/ToastItem.tsx +41 -41
  69. package/src/components/Toast/components/ToastProvider.tsx +63 -63
  70. package/src/components/Toast/hooks/useToast.ts +12 -12
  71. package/src/components/Toast/index.tsx +5 -5
  72. package/src/components/Toast/styles/index.ts +135 -135
  73. package/src/components/Toast/types/index.ts +46 -46
  74. package/src/components/Tooltip/index.tsx +66 -66
  75. package/src/components/Tooltip/styles.ts +77 -77
  76. package/src/hooks/useCountries.ts +41 -41
  77. package/src/hooks/useImageUpload.ts +139 -0
  78. package/src/hooks/useOnClickOutside.tsx +42 -20
  79. package/src/index.tsx +67 -55
  80. package/src/styles/index.ts +38 -38
  81. package/src/types/typographyValues.ts +178 -178
  82. package/src/utils/getNestedValue.ts +3 -3
  83. package/src/utils/states.ts +29 -29
  84. package/src/utils/uploadService.ts +180 -0
  85. package/tsconfig.json +3 -3
  86. package/tsup.config.ts +38 -0
  87. package/dist/index.css +0 -171
package/dist/index.js CHANGED
@@ -80,124 +80,11 @@ var __async = (__this, __arguments, generator) => {
80
80
  });
81
81
  };
82
82
 
83
- // ../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js
84
- var require_react_is_production_min = __commonJS({
85
- "../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js"(exports2) {
86
- "use strict";
87
- var b = "function" === typeof Symbol && Symbol.for;
88
- var c = b ? Symbol.for("react.element") : 60103;
89
- var d = b ? Symbol.for("react.portal") : 60106;
90
- var e = b ? Symbol.for("react.fragment") : 60107;
91
- var f = b ? Symbol.for("react.strict_mode") : 60108;
92
- var g = b ? Symbol.for("react.profiler") : 60114;
93
- var h = b ? Symbol.for("react.provider") : 60109;
94
- var k = b ? Symbol.for("react.context") : 60110;
95
- var l = b ? Symbol.for("react.async_mode") : 60111;
96
- var m = b ? Symbol.for("react.concurrent_mode") : 60111;
97
- var n = b ? Symbol.for("react.forward_ref") : 60112;
98
- var p = b ? Symbol.for("react.suspense") : 60113;
99
- var q = b ? Symbol.for("react.suspense_list") : 60120;
100
- var r = b ? Symbol.for("react.memo") : 60115;
101
- var t = b ? Symbol.for("react.lazy") : 60116;
102
- var v = b ? Symbol.for("react.block") : 60121;
103
- var w = b ? Symbol.for("react.fundamental") : 60117;
104
- var x = b ? Symbol.for("react.responder") : 60118;
105
- var y = b ? Symbol.for("react.scope") : 60119;
106
- function z(a) {
107
- if ("object" === typeof a && null !== a) {
108
- var u = a.$$typeof;
109
- switch (u) {
110
- case c:
111
- switch (a = a.type, a) {
112
- case l:
113
- case m:
114
- case e:
115
- case g:
116
- case f:
117
- case p:
118
- return a;
119
- default:
120
- switch (a = a && a.$$typeof, a) {
121
- case k:
122
- case n:
123
- case t:
124
- case r:
125
- case h:
126
- return a;
127
- default:
128
- return u;
129
- }
130
- }
131
- case d:
132
- return u;
133
- }
134
- }
135
- }
136
- function A(a) {
137
- return z(a) === m;
138
- }
139
- exports2.AsyncMode = l;
140
- exports2.ConcurrentMode = m;
141
- exports2.ContextConsumer = k;
142
- exports2.ContextProvider = h;
143
- exports2.Element = c;
144
- exports2.ForwardRef = n;
145
- exports2.Fragment = e;
146
- exports2.Lazy = t;
147
- exports2.Memo = r;
148
- exports2.Portal = d;
149
- exports2.Profiler = g;
150
- exports2.StrictMode = f;
151
- exports2.Suspense = p;
152
- exports2.isAsyncMode = function(a) {
153
- return A(a) || z(a) === l;
154
- };
155
- exports2.isConcurrentMode = A;
156
- exports2.isContextConsumer = function(a) {
157
- return z(a) === k;
158
- };
159
- exports2.isContextProvider = function(a) {
160
- return z(a) === h;
161
- };
162
- exports2.isElement = function(a) {
163
- return "object" === typeof a && null !== a && a.$$typeof === c;
164
- };
165
- exports2.isForwardRef = function(a) {
166
- return z(a) === n;
167
- };
168
- exports2.isFragment = function(a) {
169
- return z(a) === e;
170
- };
171
- exports2.isLazy = function(a) {
172
- return z(a) === t;
173
- };
174
- exports2.isMemo = function(a) {
175
- return z(a) === r;
176
- };
177
- exports2.isPortal = function(a) {
178
- return z(a) === d;
179
- };
180
- exports2.isProfiler = function(a) {
181
- return z(a) === g;
182
- };
183
- exports2.isStrictMode = function(a) {
184
- return z(a) === f;
185
- };
186
- exports2.isSuspense = function(a) {
187
- return z(a) === p;
188
- };
189
- exports2.isValidElementType = function(a) {
190
- return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
191
- };
192
- exports2.typeOf = z;
193
- }
194
- });
195
-
196
83
  // ../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js
197
84
  var require_react_is_development = __commonJS({
198
85
  "../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"(exports2) {
199
86
  "use strict";
200
- if (process.env.NODE_ENV !== "production") {
87
+ if (true) {
201
88
  (function() {
202
89
  "use strict";
203
90
  var hasSymbol = typeof Symbol === "function" && Symbol.for;
@@ -352,8 +239,8 @@ var require_react_is_development = __commonJS({
352
239
  var require_react_is = __commonJS({
353
240
  "../../node_modules/prop-types/node_modules/react-is/index.js"(exports2, module2) {
354
241
  "use strict";
355
- if (process.env.NODE_ENV === "production") {
356
- module2.exports = require_react_is_production_min();
242
+ if (false) {
243
+ module2.exports = null;
357
244
  } else {
358
245
  module2.exports = require_react_is_development();
359
246
  }
@@ -453,7 +340,7 @@ var require_checkPropTypes = __commonJS({
453
340
  "use strict";
454
341
  var printWarning = function() {
455
342
  };
456
- if (process.env.NODE_ENV !== "production") {
343
+ if (true) {
457
344
  ReactPropTypesSecret = require_ReactPropTypesSecret();
458
345
  loggedTypeFailures = {};
459
346
  has = require_has();
@@ -472,7 +359,7 @@ var require_checkPropTypes = __commonJS({
472
359
  var loggedTypeFailures;
473
360
  var has;
474
361
  function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
475
- if (process.env.NODE_ENV !== "production") {
362
+ if (true) {
476
363
  for (var typeSpecName in typeSpecs) {
477
364
  if (has(typeSpecs, typeSpecName)) {
478
365
  var error;
@@ -505,7 +392,7 @@ var require_checkPropTypes = __commonJS({
505
392
  }
506
393
  }
507
394
  checkPropTypes.resetWarningCache = function() {
508
- if (process.env.NODE_ENV !== "production") {
395
+ if (true) {
509
396
  loggedTypeFailures = {};
510
397
  }
511
398
  };
@@ -524,7 +411,7 @@ var require_factoryWithTypeCheckers = __commonJS({
524
411
  var checkPropTypes = require_checkPropTypes();
525
412
  var printWarning = function() {
526
413
  };
527
- if (process.env.NODE_ENV !== "production") {
414
+ if (true) {
528
415
  printWarning = function(text) {
529
416
  var message2 = "Warning: " + text;
530
417
  if (typeof console !== "undefined") {
@@ -584,7 +471,7 @@ var require_factoryWithTypeCheckers = __commonJS({
584
471
  }
585
472
  PropTypeError.prototype = Error.prototype;
586
473
  function createChainableTypeChecker(validate) {
587
- if (process.env.NODE_ENV !== "production") {
474
+ if (true) {
588
475
  var manualPropTypeCallCache = {};
589
476
  var manualPropTypeWarningCount = 0;
590
477
  }
@@ -598,7 +485,7 @@ var require_factoryWithTypeCheckers = __commonJS({
598
485
  );
599
486
  err.name = "Invariant Violation";
600
487
  throw err;
601
- } else if (process.env.NODE_ENV !== "production" && typeof console !== "undefined") {
488
+ } else if (typeof console !== "undefined") {
602
489
  var cacheKey = componentName + ":" + propName;
603
490
  if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
604
491
  manualPropTypeWarningCount < 3) {
@@ -699,7 +586,7 @@ var require_factoryWithTypeCheckers = __commonJS({
699
586
  }
700
587
  function createEnumTypeChecker(expectedValues) {
701
588
  if (!Array.isArray(expectedValues)) {
702
- if (process.env.NODE_ENV !== "production") {
589
+ if (true) {
703
590
  if (arguments.length > 1) {
704
591
  printWarning(
705
592
  "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
@@ -752,7 +639,7 @@ var require_factoryWithTypeCheckers = __commonJS({
752
639
  }
753
640
  function createUnionTypeChecker(arrayOfTypeCheckers) {
754
641
  if (!Array.isArray(arrayOfTypeCheckers)) {
755
- process.env.NODE_ENV !== "production" ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
642
+ true ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
756
643
  return emptyFunctionThatReturnsNull;
757
644
  }
758
645
  for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
@@ -956,72 +843,16 @@ var require_factoryWithTypeCheckers = __commonJS({
956
843
  }
957
844
  });
958
845
 
959
- // ../../node_modules/prop-types/factoryWithThrowingShims.js
960
- var require_factoryWithThrowingShims = __commonJS({
961
- "../../node_modules/prop-types/factoryWithThrowingShims.js"(exports2, module2) {
962
- "use strict";
963
- var ReactPropTypesSecret = require_ReactPropTypesSecret();
964
- function emptyFunction() {
965
- }
966
- function emptyFunctionWithReset() {
967
- }
968
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
969
- module2.exports = function() {
970
- function shim(props, propName, componentName, location, propFullName, secret) {
971
- if (secret === ReactPropTypesSecret) {
972
- return;
973
- }
974
- var err = new Error(
975
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
976
- );
977
- err.name = "Invariant Violation";
978
- throw err;
979
- }
980
- ;
981
- shim.isRequired = shim;
982
- function getShim() {
983
- return shim;
984
- }
985
- ;
986
- var ReactPropTypes = {
987
- array: shim,
988
- bigint: shim,
989
- bool: shim,
990
- func: shim,
991
- number: shim,
992
- object: shim,
993
- string: shim,
994
- symbol: shim,
995
- any: shim,
996
- arrayOf: getShim,
997
- element: shim,
998
- elementType: shim,
999
- instanceOf: getShim,
1000
- node: shim,
1001
- objectOf: getShim,
1002
- oneOf: getShim,
1003
- oneOfType: getShim,
1004
- shape: getShim,
1005
- exact: getShim,
1006
- checkPropTypes: emptyFunctionWithReset,
1007
- resetWarningCache: emptyFunction
1008
- };
1009
- ReactPropTypes.PropTypes = ReactPropTypes;
1010
- return ReactPropTypes;
1011
- };
1012
- }
1013
- });
1014
-
1015
846
  // ../../node_modules/prop-types/index.js
1016
847
  var require_prop_types = __commonJS({
1017
848
  "../../node_modules/prop-types/index.js"(exports2, module2) {
1018
849
  "use strict";
1019
- if (process.env.NODE_ENV !== "production") {
850
+ if (true) {
1020
851
  ReactIs = require_react_is();
1021
852
  throwOnDirectAccess = true;
1022
853
  module2.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
1023
854
  } else {
1024
- module2.exports = require_factoryWithThrowingShims()();
855
+ module2.exports = null();
1025
856
  }
1026
857
  var ReactIs;
1027
858
  var throwOnDirectAccess;
@@ -1054,6 +885,7 @@ __export(index_exports, {
1054
885
  CNPJFormField: () => CNPJFormField,
1055
886
  CPFFormField: () => CPFFormField,
1056
887
  Calendar: () => Calendar,
888
+ CalendarFormField: () => CalendarFormField,
1057
889
  Card: () => Card,
1058
890
  CardStyled: () => CardStyled,
1059
891
  CheckboxGroup: () => CheckboxGroup,
@@ -1088,6 +920,8 @@ __export(index_exports, {
1088
920
  RadioGroupFormField: () => RadioGroupFormField,
1089
921
  RadioGroupStyled: () => RadioGroupStyled,
1090
922
  RadioItem: () => RadioItem,
923
+ RichEditor: () => RichEditor_default,
924
+ RichEditorFormField: () => RichEditorFormField,
1091
925
  Section: () => Section,
1092
926
  SectionStyled: () => SectionStyled,
1093
927
  SelectFormField: () => SelectFormField,
@@ -1113,6 +947,7 @@ __export(index_exports, {
1113
947
  TimePickerButtonStyled: () => TimePickerButtonStyled,
1114
948
  TimePickerDropdownStyled: () => TimePickerDropdownStyled,
1115
949
  TimePickerFooterStyled: () => TimePickerFooterStyled,
950
+ TimePickerFormField: () => TimePickerFormField,
1116
951
  TimePickerStyled: () => TimePickerStyled,
1117
952
  TimerPickerContentStyled: () => TimerPickerContentStyled,
1118
953
  ToastItem: () => ToastItem,
@@ -1122,9 +957,11 @@ __export(index_exports, {
1122
957
  TooltipProvider: () => TooltipProvider,
1123
958
  TooltipRoot: () => TooltipRoot,
1124
959
  TooltipTrigger: () => TooltipTrigger,
960
+ UploadService: () => UploadService,
1125
961
  isValidCNPJ: () => isValidCNPJ,
1126
962
  maskFormat: () => maskFormat,
1127
963
  maskUnformat: () => maskUnformat,
964
+ useImageUpload: () => useImageUpload,
1128
965
  useToast: () => useToast
1129
966
  });
1130
967
  module.exports = __toCommonJS(index_exports);
@@ -1959,6 +1796,7 @@ var ButtonStyled = styled(import_themes2.Button, {
1959
1796
  color: "$$buttonColor",
1960
1797
  width: "100%",
1961
1798
  borderRadius: 0,
1799
+ whiteSpace: "nowrap",
1962
1800
  "&:hover": {
1963
1801
  backgroundColor: "$dark100"
1964
1802
  }
@@ -2842,7 +2680,8 @@ var TextField = import_react2.default.forwardRef(
2842
2680
  addon,
2843
2681
  textAlign = "left",
2844
2682
  mask,
2845
- maxLength
2683
+ maxLength,
2684
+ hasError
2846
2685
  } = _b, props = __objRest(_b, [
2847
2686
  "children",
2848
2687
  "isValid",
@@ -2853,7 +2692,8 @@ var TextField = import_react2.default.forwardRef(
2853
2692
  "addon",
2854
2693
  "textAlign",
2855
2694
  "mask",
2856
- "maxLength"
2695
+ "maxLength",
2696
+ "hasError"
2857
2697
  ]);
2858
2698
  const maskRef = mask ? (0, import_mask.useMask)(mask) : void 0;
2859
2699
  const inputRef = import_react2.default.useRef(null);
@@ -2871,11 +2711,18 @@ var TextField = import_react2.default.forwardRef(
2871
2711
  };
2872
2712
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Flex2, { direction: "column", css: { width: "100%", position: "relative" }, children: [
2873
2713
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Flex2, { gap: "0", css: { width: "100%" }, children: [
2874
- !!addon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(InputAddon, { color, typography: "labelSmall", children: addon }),
2714
+ !!addon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2715
+ InputAddon,
2716
+ {
2717
+ color: hasError ? "error" : color,
2718
+ typography: "labelSmall",
2719
+ children: addon
2720
+ }
2721
+ ),
2875
2722
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
2876
2723
  TextFieldStyled,
2877
2724
  __spreadProps(__spreadValues({
2878
- color,
2725
+ color: hasError ? "error" : color || "default",
2879
2726
  isValid: isValid2,
2880
2727
  name,
2881
2728
  typography,
@@ -2904,7 +2751,7 @@ var TextField = import_react2.default.forwardRef(
2904
2751
  {
2905
2752
  position: "flex-end",
2906
2753
  name,
2907
- color,
2754
+ color: hasError ? "error" : color,
2908
2755
  typography,
2909
2756
  fontWeight,
2910
2757
  textAlign,
@@ -3923,10 +3770,24 @@ var import_react5 = require("react");
3923
3770
  function useOnClickOutside(ref, handler) {
3924
3771
  (0, import_react5.useEffect)(() => {
3925
3772
  const listener = (event) => {
3926
- if (!ref.current || ref.current.contains(event.target)) {
3773
+ if (!(ref == null ? void 0 : ref.current) || !event.target) {
3774
+ return;
3775
+ }
3776
+ const target = event.target;
3777
+ const currentTarget = event.currentTarget;
3778
+ if (ref.current.contains(target) || ref.current.contains(currentTarget)) {
3927
3779
  return;
3928
3780
  }
3929
- handler();
3781
+ if (target.tagName === "HTML" || target.tagName === "BODY") {
3782
+ const elementAtPoint = document.elementFromPoint(
3783
+ event.clientX,
3784
+ event.clientY
3785
+ );
3786
+ if (elementAtPoint && ref.current.contains(elementAtPoint)) {
3787
+ return;
3788
+ }
3789
+ }
3790
+ handler(event);
3930
3791
  };
3931
3792
  document.addEventListener("mousedown", listener);
3932
3793
  document.addEventListener("touchstart", listener);
@@ -7852,7 +7713,17 @@ var CalendarStyled = styled("div", {
7852
7713
  lineHeight: "$base",
7853
7714
  fontSize: "$14",
7854
7715
  borderRadius: "$sm",
7855
- position: "relative"
7716
+ position: "relative",
7717
+ width: "fit-content",
7718
+ variants: {
7719
+ expand: {
7720
+ true: {
7721
+ width: "100%",
7722
+ flex: "1",
7723
+ display: "flex"
7724
+ }
7725
+ }
7726
+ }
7856
7727
  });
7857
7728
  var CalendarButtonStyled = styled("button", {
7858
7729
  backgroundColor: "transparent",
@@ -7861,25 +7732,52 @@ var CalendarButtonStyled = styled("button", {
7861
7732
  padding: "0",
7862
7733
  cursor: "pointer",
7863
7734
  "> div > div": {
7864
- paddingLeft: "1rem",
7865
- "input": {
7735
+ paddingLeft: "0",
7736
+ input: {
7866
7737
  textAlign: "right"
7867
7738
  }
7739
+ },
7740
+ variants: {
7741
+ expand: {
7742
+ true: {
7743
+ flex: "1",
7744
+ display: "flex",
7745
+ maxWidth: "100%"
7746
+ }
7747
+ }
7868
7748
  }
7869
7749
  });
7870
7750
  var CalendarContentStyled = styled("div", {
7871
7751
  fontFamily: "$default",
7872
7752
  lineHeight: "$base",
7873
7753
  fontSize: "$14",
7874
- width: "100%",
7875
7754
  maxWidth: "fit-content",
7876
7755
  border: "1px solid $neutral300",
7877
7756
  borderRadius: "$sm",
7878
7757
  boxShadow: "0px 2px 8px 0px $shadow50",
7879
7758
  position: "absolute",
7880
- left: "0",
7881
7759
  backgroundColor: "$neutral50",
7882
- zIndex: "999999"
7760
+ zIndex: "999999",
7761
+ variants: {
7762
+ position: {
7763
+ top: {
7764
+ bottom: "110%",
7765
+ left: "0"
7766
+ },
7767
+ bottom: {
7768
+ top: "110%",
7769
+ left: "0"
7770
+ },
7771
+ "top-right": {
7772
+ bottom: "110%",
7773
+ right: "0"
7774
+ },
7775
+ "bottom-right": {
7776
+ top: "110%",
7777
+ right: "0"
7778
+ }
7779
+ }
7780
+ }
7883
7781
  });
7884
7782
  var CalendarFooterStyled = styled("div", {
7885
7783
  borderTop: "2px solid $neutral100",
@@ -7896,7 +7794,7 @@ var DayPickerWrapperStyled = styled("div", {
7896
7794
  color: "$dark500"
7897
7795
  },
7898
7796
  ".rdp-root": {
7899
- padding: "$16"
7797
+ padding: "$8"
7900
7798
  },
7901
7799
  ".rdp-today .rdp-day_button": {
7902
7800
  color: "$brand500",
@@ -8067,14 +7965,20 @@ function Calendar(_a) {
8067
7965
  calendarLayout,
8068
7966
  selected,
8069
7967
  setSelected,
8070
- position = "bottom"
7968
+ position = "bottom",
7969
+ hasError,
7970
+ expand,
7971
+ allowPastDates = false
8071
7972
  } = _b, props = __objRest(_b, [
8072
7973
  "action",
8073
7974
  "actionText",
8074
7975
  "calendarLayout",
8075
7976
  "selected",
8076
7977
  "setSelected",
8077
- "position"
7978
+ "position",
7979
+ "hasError",
7980
+ "expand",
7981
+ "allowPastDates"
8078
7982
  ]);
8079
7983
  const [inputValue, setInputValue] = (0, import_react7.useState)("");
8080
7984
  const [showContainer, setShowCalendar] = (0, import_react7.useState)(false);
@@ -8096,15 +8000,20 @@ function Calendar(_a) {
8096
8000
  setInputValue(masked);
8097
8001
  const parsed = parse(masked, "dd/MM/yyyy", /* @__PURE__ */ new Date());
8098
8002
  if (isValid(parsed)) {
8003
+ if (!allowPastDates && parsed < today) {
8004
+ console.warn("Datas passadas n\xE3o s\xE3o permitidas:", masked);
8005
+ return;
8006
+ }
8099
8007
  setSelected(parsed);
8100
8008
  } else {
8101
8009
  console.warn("Data inv\xE1lida inserida no input:", masked);
8102
8010
  }
8103
8011
  };
8104
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(CalendarStyled, __spreadProps(__spreadValues({}, props), { ref: dropdownRef, children: [
8012
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(CalendarStyled, __spreadProps(__spreadValues({}, props), { expand, ref: dropdownRef, children: [
8105
8013
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8106
8014
  CalendarButtonStyled,
8107
8015
  {
8016
+ expand,
8108
8017
  type: "button",
8109
8018
  onClick: () => setShowCalendar((prev) => !prev),
8110
8019
  children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
@@ -8116,47 +8025,42 @@ function Calendar(_a) {
8116
8025
  onChange: handleInputChange,
8117
8026
  inputMode: "numeric",
8118
8027
  textAlign: "right",
8028
+ color: hasError ? "error" : "default",
8119
8029
  children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TextFieldSlot, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon_default, { name: "calendar", size: "xl" }) })
8120
8030
  }
8121
8031
  )
8122
8032
  }
8123
8033
  ),
8124
- showContainer && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
8125
- CalendarContentStyled,
8126
- {
8127
- style: position === "top" ? { bottom: "110%" } : { top: "110%" },
8128
- children: [
8129
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DayPickerWrapperStyled, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8130
- import_react_day_picker.DayPicker,
8131
- {
8132
- mode: "single",
8133
- captionLayout: calendarLayout,
8134
- selected,
8135
- onSelect: setSelected,
8136
- required: true,
8137
- locale: ptBR,
8138
- disabled: { before: today },
8139
- startMonth: today,
8140
- endMonth: maxDate
8141
- }
8142
- ) }) }),
8143
- action && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CalendarFooterStyled, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8144
- Button,
8145
- {
8146
- variant: "text",
8147
- color: "brand",
8148
- type: "button",
8149
- onClick: () => {
8150
- setShowCalendar(false);
8151
- },
8152
- size: "medium",
8153
- fontWeight: "medium",
8154
- children: actionText != null ? actionText : "Aplicar"
8155
- }
8156
- ) })
8157
- ]
8158
- }
8159
- )
8034
+ showContainer && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(CalendarContentStyled, { position, children: [
8035
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DayPickerWrapperStyled, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8036
+ import_react_day_picker.DayPicker,
8037
+ {
8038
+ mode: "single",
8039
+ captionLayout: calendarLayout,
8040
+ selected,
8041
+ onSelect: setSelected,
8042
+ required: true,
8043
+ locale: ptBR,
8044
+ disabled: allowPastDates ? void 0 : { before: today },
8045
+ startMonth: allowPastDates ? void 0 : today,
8046
+ endMonth: maxDate
8047
+ }
8048
+ ) }) }),
8049
+ action && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CalendarFooterStyled, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8050
+ Button,
8051
+ {
8052
+ variant: "text",
8053
+ color: "brand",
8054
+ type: "button",
8055
+ onClick: () => {
8056
+ setShowCalendar(false);
8057
+ },
8058
+ size: "medium",
8059
+ fontWeight: "medium",
8060
+ children: actionText != null ? actionText : "Aplicar"
8061
+ }
8062
+ ) })
8063
+ ] })
8160
8064
  ] })) });
8161
8065
  }
8162
8066
 
@@ -8219,8 +8123,45 @@ function Drawer({
8219
8123
  }) {
8220
8124
  if (!isOpen) return null;
8221
8125
  const drawerContainerRef = (0, import_react8.useRef)(null);
8222
- useOnClickOutside(drawerContainerRef, () => {
8223
- onClose();
8126
+ useOnClickOutside(drawerContainerRef, (event) => {
8127
+ var _a;
8128
+ if (!event || !drawerContainerRef.current) {
8129
+ return;
8130
+ }
8131
+ let target = event.target;
8132
+ if (target.tagName === "HTML" || target.tagName === "BODY") {
8133
+ if (event instanceof MouseEvent) {
8134
+ const actualElement = document.elementFromPoint(
8135
+ event.clientX,
8136
+ event.clientY
8137
+ );
8138
+ if (actualElement) {
8139
+ target = actualElement;
8140
+ }
8141
+ }
8142
+ }
8143
+ let currentElement = target;
8144
+ let hierarchy = [];
8145
+ while (currentElement && currentElement !== document.body) {
8146
+ hierarchy.push({
8147
+ tagName: currentElement.tagName,
8148
+ className: currentElement.className,
8149
+ id: currentElement.id,
8150
+ attributes: Array.from(currentElement.attributes || []).map((attr) => ({
8151
+ name: attr.name,
8152
+ value: attr.value
8153
+ }))
8154
+ });
8155
+ currentElement = currentElement.parentElement;
8156
+ }
8157
+ if ((_a = drawerContainerRef.current) == null ? void 0 : _a.contains(target)) {
8158
+ return;
8159
+ }
8160
+ const isDropdownOpen = target.closest("[data-radix-popper-content-wrapper]") || target.closest('[role="dialog"]') || target.closest('[data-state="open"]') || target.closest("[data-radix-dropdown-menu-content]") || target.closest("[data-radix-dropdown-menu-root]") || target.closest("[data-radix-dropdown-menu-trigger]") || target.closest("[data-radix-dropdown-menu-portal]") || target.closest("[data-radix-dropdown-menu-item]") || target.closest("[data-radix-dropdown-menu-checkbox-item]") || target.closest("[data-radix-dropdown-menu-radio-item]") || target.closest("[data-radix-dropdown-menu-separator]") || target.closest("[data-radix-dropdown-menu-label]") || target.closest("[data-radix-dropdown-menu-group]") || target.closest("[data-radix-dropdown-menu-sub]") || target.closest("[data-radix-dropdown-menu-sub-trigger]") || target.closest("[data-radix-dropdown-menu-sub-content]") || target.closest("[data-radix-dropdown-menu-radio-group]");
8161
+ const shouldPreventClose = isDropdownOpen || target.closest("[data-radix-dropdown-menu-root]") || target.closest("[data-radix-dropdown-menu-trigger]") || target.closest("[data-radix-dropdown-menu-content]") || target.closest("[data-radix-dropdown-menu-portal]") || target.closest("[data-radix-dropdown-menu-item]") || target.closest("[data-radix-dropdown-menu-checkbox-item]") || target.closest("[data-radix-dropdown-menu-radio-item]") || target.closest("[data-radix-dropdown-menu-separator]") || target.closest("[data-radix-dropdown-menu-label]") || target.closest("[data-radix-dropdown-menu-group]") || target.closest("[data-radix-dropdown-menu-sub]") || target.closest("[data-radix-dropdown-menu-sub-trigger]") || target.closest("[data-radix-dropdown-menu-sub-content]") || target.closest("[data-radix-dropdown-menu-radio-group]");
8162
+ if (!shouldPreventClose) {
8163
+ onClose();
8164
+ }
8224
8165
  });
8225
8166
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DrawerOverlayStyled, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
8226
8167
  DrawerContainerStyled,
@@ -8249,18 +8190,24 @@ var TimePickerStyled = styled("div", {
8249
8190
  fontFamily: "$default",
8250
8191
  lineHeight: "$base",
8251
8192
  fontSize: "$14",
8252
- maxWidth: "200px",
8253
8193
  borderRadius: "$sm",
8254
8194
  "> div > div": {
8255
- paddingLeft: "1rem",
8256
8195
  input: {
8257
8196
  textAlign: "right"
8258
8197
  }
8198
+ },
8199
+ variants: {
8200
+ expand: {
8201
+ true: {
8202
+ width: "100%",
8203
+ flex: "1",
8204
+ display: "flex"
8205
+ }
8206
+ }
8259
8207
  }
8260
8208
  });
8261
8209
  var TimePickerDropdownStyled = styled("div", {
8262
8210
  position: "absolute",
8263
- left: 0,
8264
8211
  zIndex: 10,
8265
8212
  width: "100%",
8266
8213
  maxWidth: "8.875rem",
@@ -8330,21 +8277,30 @@ var InputStyled = styled("input", {
8330
8277
  var TimePickerButtonStyled = styled("button", {
8331
8278
  backgroundColor: "transparent",
8332
8279
  border: "none",
8333
- maxWidth: "200px",
8334
8280
  padding: "0",
8335
8281
  cursor: "pointer",
8336
8282
  "> div > div": {
8337
- paddingLeft: "1rem",
8338
8283
  input: {
8339
8284
  textAlign: "right"
8340
8285
  }
8286
+ },
8287
+ variants: {
8288
+ expand: {
8289
+ true: {
8290
+ flex: "1",
8291
+ display: "flex",
8292
+ maxWidth: "100%"
8293
+ }
8294
+ }
8341
8295
  }
8342
8296
  });
8343
8297
  var pad = (num) => String(num).padStart(2, "0");
8344
8298
  function TimePicker({
8345
8299
  selected,
8346
8300
  setSelected,
8347
- position = "bottom"
8301
+ position = "bottom",
8302
+ hasError,
8303
+ expand = false
8348
8304
  }) {
8349
8305
  const [hours, setHours] = (0, import_react9.useState)("00");
8350
8306
  const [minutes, setMinutes] = (0, import_react9.useState)("00");
@@ -8381,12 +8337,13 @@ function TimePicker({
8381
8337
  },
8382
8338
  [hours, minutes]
8383
8339
  );
8384
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(TimePickerStyled, { ref: dropdownRef, children: [
8340
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(TimePickerStyled, { ref: dropdownRef, expand, children: [
8385
8341
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
8386
8342
  TimePickerButtonStyled,
8387
8343
  {
8388
8344
  type: "button",
8389
8345
  onClick: () => setIsOpen((prev) => !prev),
8346
+ expand,
8390
8347
  children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
8391
8348
  TextField,
8392
8349
  {
@@ -8396,6 +8353,7 @@ function TimePicker({
8396
8353
  placeholder: "00:00",
8397
8354
  typography: "labelSmall",
8398
8355
  fontWeight: "regular",
8356
+ color: hasError ? "error" : "default",
8399
8357
  children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TextFieldSlot, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon_default, { name: "clock", size: "xl" }) })
8400
8358
  }
8401
8359
  )
@@ -8404,7 +8362,7 @@ function TimePicker({
8404
8362
  isOpen && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
8405
8363
  TimePickerDropdownStyled,
8406
8364
  {
8407
- style: position === "top" ? { bottom: "110%" } : { top: "110%" },
8365
+ style: position === "top" ? { bottom: "110%", left: "0" } : position === "top-right" ? { bottom: "110%", right: "0" } : position === "bottom-right" ? { top: "110%", right: "0" } : { top: "110%", left: "0" },
8408
8366
  children: [
8409
8367
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(TimerPickerContentStyled, { children: [
8410
8368
  ["hours", "minutes"].map((unit) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
@@ -9429,11 +9387,11 @@ function Tooltip({
9429
9387
  }
9430
9388
 
9431
9389
  // src/components/MultiSelect.tsx
9390
+ var import_react16 = __toESM(require("react"));
9432
9391
  var import_themes18 = require("@radix-ui/themes");
9433
9392
  var import_react_fontawesome3 = require("@fortawesome/react-fontawesome");
9434
9393
  var import_free_solid_svg_icons3 = require("@fortawesome/free-solid-svg-icons");
9435
- var import_react16 = require("react");
9436
- var import_react17 = __toESM(require("react"));
9394
+ var import_react17 = require("react");
9437
9395
  var import_jsx_runtime26 = require("react/jsx-runtime");
9438
9396
  var StyledContent = styled(import_themes18.DropdownMenu.Content, {
9439
9397
  backgroundColor: "$dark50",
@@ -9441,7 +9399,10 @@ var StyledContent = styled(import_themes18.DropdownMenu.Content, {
9441
9399
  padding: "$8 0",
9442
9400
  boxShadow: "0px 2px 4px 0px #23354329, 0px 4px 4px 0px #23354314",
9443
9401
  boxSizing: "border-box",
9444
- border: "1px solid $dark300"
9402
+ border: "1px solid $dark300",
9403
+ zIndex: 999999,
9404
+ minWidth: "var(--radix-dropdown-menu-trigger-width)",
9405
+ maxWidth: "var(--radix-dropdown-menu-trigger-width)"
9445
9406
  });
9446
9407
  var StyledTrigger = styled("div", {
9447
9408
  minHeight: "40px",
@@ -9453,6 +9414,7 @@ var StyledTrigger = styled("div", {
9453
9414
  padding: "$6 $14",
9454
9415
  boxSizing: "border-box",
9455
9416
  gap: "4px",
9417
+ width: "100%",
9456
9418
  variants: {
9457
9419
  color: {
9458
9420
  default: {
@@ -9485,17 +9447,42 @@ var itemStyle = {
9485
9447
  }
9486
9448
  };
9487
9449
  var StyledItem2 = styled("div", __spreadValues({}, itemStyle));
9488
- var BadgeWrapper = styled("div", {
9489
- flex: "1",
9490
- display: "flex",
9491
- gap: "4px",
9492
- marginTop: "8px",
9493
- flexDirection: "column"
9494
- });
9495
9450
  var BadgeCloseBtn = styled("div", {
9496
9451
  cursor: "pointer"
9497
9452
  });
9498
- var MultiSelect = import_react17.default.forwardRef(
9453
+ var StyledFlexWithMaxHeight = styled(Flex2, {
9454
+ variants: {
9455
+ hasMaxHeight: {
9456
+ true: {
9457
+ overflowY: "auto",
9458
+ "&::-webkit-scrollbar": {
9459
+ width: "4px"
9460
+ },
9461
+ "&::-webkit-scrollbar-track": {
9462
+ backgroundColor: "$dark100",
9463
+ borderRadius: "2px"
9464
+ },
9465
+ "&::-webkit-scrollbar-thumb": {
9466
+ backgroundColor: "$dark300",
9467
+ borderRadius: "2px",
9468
+ "&:hover": {
9469
+ backgroundColor: "$dark400"
9470
+ }
9471
+ }
9472
+ }
9473
+ }
9474
+ },
9475
+ defaultVariants: {
9476
+ hasMaxHeight: false
9477
+ }
9478
+ });
9479
+ var StyledText = styled(Text, {
9480
+ flex: 1,
9481
+ overflow: "hidden",
9482
+ whiteSpace: "nowrap",
9483
+ textOverflow: "ellipsis"
9484
+ });
9485
+ var MultiSelect = import_react16.default.forwardRef(
9499
9486
  ({
9500
9487
  placeholder,
9501
9488
  value: selectedValues = [],
@@ -9506,12 +9493,13 @@ var MultiSelect = import_react17.default.forwardRef(
9506
9493
  zIndex = "auto",
9507
9494
  showSelectedValues = true,
9508
9495
  singleSelect = false,
9509
- disabled = false
9496
+ selectedOrientation = "column",
9497
+ disabled = false,
9498
+ maxHeight
9510
9499
  }, fowardedRef) => {
9511
- var _a;
9512
9500
  const [isOpen, setIsOpen] = (0, import_react16.useState)(false);
9513
9501
  const triggerRef = (0, import_react16.useRef)(null);
9514
- const labelByValue = (0, import_react16.useMemo)(() => {
9502
+ const labelByValue = (0, import_react17.useMemo)(() => {
9515
9503
  return options.reduce((prev, curr) => {
9516
9504
  return __spreadProps(__spreadValues({}, prev), {
9517
9505
  [curr.value]: curr.label
@@ -9525,8 +9513,7 @@ var MultiSelect = import_react17.default.forwardRef(
9525
9513
  },
9526
9514
  [selectedValues, onValueChange]
9527
9515
  );
9528
- const menuWidth = (_a = triggerRef.current) == null ? void 0 : _a.offsetWidth;
9529
- const text = (0, import_react16.useMemo)(() => {
9516
+ const text = (0, import_react17.useMemo)(() => {
9530
9517
  if (selectedValues.length > 0 && singleSelect) {
9531
9518
  const value = selectedValues[0];
9532
9519
  return labelByValue[value];
@@ -9537,67 +9524,60 @@ var MultiSelect = import_react17.default.forwardRef(
9537
9524
  onValueChange == null ? void 0 : onValueChange([v]);
9538
9525
  setIsOpen(false);
9539
9526
  };
9527
+ const handleToggle = (0, import_react16.useCallback)(
9528
+ (e) => {
9529
+ e.preventDefault();
9530
+ e.stopPropagation();
9531
+ if (disabled) return;
9532
+ setIsOpen((prev) => !prev);
9533
+ },
9534
+ [disabled]
9535
+ );
9540
9536
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_themes18.Theme, { children: [
9541
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_themes18.DropdownMenu.Root, { open: isOpen, onOpenChange: () => setIsOpen(false), children: [
9542
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9543
- import_themes18.DropdownMenu.Trigger,
9537
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_themes18.DropdownMenu.Root, { children: [
9538
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_themes18.DropdownMenu.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
9539
+ StyledTrigger,
9544
9540
  {
9545
- onClick: () => {
9546
- if (disabled) return;
9547
- setIsOpen(true);
9548
- },
9549
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
9550
- StyledTrigger,
9551
- {
9552
- css: {
9553
- width
9554
- },
9555
- ref: (r) => {
9556
- if (!r) return;
9557
- triggerRef.current = r;
9558
- if (fowardedRef) {
9559
- if (typeof fowardedRef === "function") fowardedRef(r);
9560
- else {
9561
- fowardedRef.current = r;
9562
- }
9563
- }
9564
- },
9565
- color,
9566
- disabled,
9567
- children: [
9568
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9569
- Text,
9570
- {
9571
- typography: "labelMedium",
9572
- css: {
9573
- flex: 1,
9574
- overflow: "hidden",
9575
- whiteSpace: "nowrap",
9576
- textOverflow: "ellipsis"
9577
- },
9578
- color: disabled ? "dark400" : void 0,
9579
- children: text
9580
- }
9581
- ),
9582
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9583
- import_react_fontawesome3.FontAwesomeIcon,
9584
- {
9585
- icon: isOpen ? import_free_solid_svg_icons3.faChevronUp : import_free_solid_svg_icons3.faChevronDown,
9586
- size: "sm",
9587
- color: disabled ? colors.dark400 : colors.dark600
9588
- }
9589
- )
9590
- ]
9541
+ ref: (r) => {
9542
+ if (!r) return;
9543
+ triggerRef.current = r;
9544
+ if (fowardedRef) {
9545
+ if (typeof fowardedRef === "function") fowardedRef(r);
9546
+ else {
9547
+ fowardedRef.current = r;
9548
+ }
9591
9549
  }
9592
- )
9550
+ },
9551
+ color,
9552
+ disabled,
9553
+ style: width !== "100%" ? { width } : void 0,
9554
+ onClick: handleToggle,
9555
+ children: [
9556
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9557
+ StyledText,
9558
+ {
9559
+ typography: "labelMedium",
9560
+ color: disabled ? "dark400" : void 0,
9561
+ children: text
9562
+ }
9563
+ ),
9564
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9565
+ import_react_fontawesome3.FontAwesomeIcon,
9566
+ {
9567
+ icon: isOpen ? import_free_solid_svg_icons3.faChevronUp : import_free_solid_svg_icons3.faChevronDown,
9568
+ size: "sm",
9569
+ color: disabled ? colors.dark400 : colors.dark600
9570
+ }
9571
+ )
9572
+ ]
9593
9573
  }
9594
- ),
9574
+ ) }),
9595
9575
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9596
9576
  StyledContent,
9597
9577
  {
9598
9578
  css: {
9599
- width: menuWidth ? menuWidth + "px" : width,
9600
- zIndex
9579
+ width: "100%",
9580
+ zIndex: zIndex === "auto" ? 999999 : zIndex
9601
9581
  },
9602
9582
  children: !singleSelect ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9603
9583
  CheckboxGroup,
@@ -9606,36 +9586,71 @@ var MultiSelect = import_react17.default.forwardRef(
9606
9586
  onValueChange: (v) => {
9607
9587
  onValueChange == null ? void 0 : onValueChange(v);
9608
9588
  },
9609
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Flex2, { direction: "column", gap: 8, children: options.map(({ value, label }, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CheckboxItem, { value, css: itemStyle, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { typography: "labelSmall", children: label }) }, i)) })
9589
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9590
+ StyledFlexWithMaxHeight,
9591
+ {
9592
+ direction: "column",
9593
+ gap: 8,
9594
+ hasMaxHeight: !!maxHeight,
9595
+ style: maxHeight ? { maxHeight } : void 0,
9596
+ children: options.map(({ value, label }, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CheckboxItem, { value, css: itemStyle, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { typography: "labelSmall", children: label }) }, i))
9597
+ }
9598
+ )
9599
+ }
9600
+ ) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9601
+ StyledFlexWithMaxHeight,
9602
+ {
9603
+ direction: "column",
9604
+ gap: 8,
9605
+ hasMaxHeight: !!maxHeight,
9606
+ style: maxHeight ? { maxHeight } : void 0,
9607
+ children: options.map(({ value, label }, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(StyledItem2, { onClick: () => handleItemClick(value), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { typography: "labelSmall", children: label }) }, i))
9610
9608
  }
9611
- ) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Flex2, { direction: "column", gap: 8, children: options.map(({ value, label }, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(StyledItem2, { onClick: () => handleItemClick(value), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { typography: "labelSmall", children: label }) }, i)) })
9609
+ )
9612
9610
  }
9613
9611
  )
9614
9612
  ] }),
9615
- selectedValues.length > 0 && showSelectedValues && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(BadgeWrapper, { children: selectedValues.map((value) => {
9616
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Flex2, { gap: 4, children: [
9617
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9618
- BadgeCloseBtn,
9619
- {
9620
- onClick: (e) => {
9621
- e.stopPropagation();
9622
- handleRemove(value);
9623
- },
9624
- role: "button",
9625
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_fontawesome3.FontAwesomeIcon, { icon: import_free_solid_svg_icons3.faSquareXmark, size: "sm" })
9626
- }
9627
- ),
9628
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9629
- Text,
9613
+ selectedValues.length > 0 && showSelectedValues && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9614
+ Flex2,
9615
+ {
9616
+ direction: selectedOrientation,
9617
+ gap: 8,
9618
+ align: selectedOrientation === "column" ? "start" : "center",
9619
+ justify: "start",
9620
+ css: { margin: "8px 0" },
9621
+ children: selectedValues.map((value) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
9622
+ Flex2,
9630
9623
  {
9631
- typography: "captionMedium",
9632
- fontWeight: "regular",
9633
- color: "dark600",
9634
- children: labelByValue[value]
9635
- }
9636
- )
9637
- ] });
9638
- }) }) })
9624
+ gap: 4,
9625
+ align: "center",
9626
+ css: { flexWrap: "wrap" },
9627
+ children: [
9628
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9629
+ BadgeCloseBtn,
9630
+ {
9631
+ onClick: (e) => {
9632
+ e.stopPropagation();
9633
+ handleRemove(value);
9634
+ },
9635
+ role: "button",
9636
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_fontawesome3.FontAwesomeIcon, { icon: import_free_solid_svg_icons3.faSquareXmark, size: "sm" })
9637
+ }
9638
+ ),
9639
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9640
+ Text,
9641
+ {
9642
+ typography: "captionMedium",
9643
+ fontWeight: "regular",
9644
+ color: "dark600",
9645
+ children: labelByValue[value]
9646
+ }
9647
+ )
9648
+ ]
9649
+ },
9650
+ value
9651
+ ))
9652
+ }
9653
+ ) })
9639
9654
  ] });
9640
9655
  }
9641
9656
  );
@@ -9878,12 +9893,16 @@ var TextAreaFormField = (_a) => {
9878
9893
  name,
9879
9894
  label,
9880
9895
  required,
9881
- placeholder
9896
+ placeholder,
9897
+ validate,
9898
+ validationErrorMessage = "Este campo \xE9 obrigat\xF3rio."
9882
9899
  } = _b, props = __objRest(_b, [
9883
9900
  "name",
9884
9901
  "label",
9885
9902
  "required",
9886
- "placeholder"
9903
+ "placeholder",
9904
+ "validate",
9905
+ "validationErrorMessage"
9887
9906
  ]);
9888
9907
  var _a2;
9889
9908
  const {
@@ -9892,6 +9911,10 @@ var TextAreaFormField = (_a) => {
9892
9911
  } = (0, import_react_hook_form.useFormContext)();
9893
9912
  const haveError = !!errors[name];
9894
9913
  const errorMsg = (_a2 = errors[name]) == null ? void 0 : _a2.message;
9914
+ const validationRules = {
9915
+ required: required ? validationErrorMessage : false,
9916
+ validate
9917
+ };
9895
9918
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Flex2, { direction: "column", children: [
9896
9919
  /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
9897
9920
  FormLabel,
@@ -9904,7 +9927,7 @@ var TextAreaFormField = (_a) => {
9904
9927
  ),
9905
9928
  /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
9906
9929
  TextareaField,
9907
- __spreadProps(__spreadValues(__spreadValues({}, props), register(name, { required })), {
9930
+ __spreadProps(__spreadValues(__spreadValues({}, props), register(name, validationRules)), {
9908
9931
  placeholder,
9909
9932
  color: haveError ? "error" : "default",
9910
9933
  "aria-labelledby": `${name}-label`
@@ -10027,11 +10050,17 @@ var MultiSelectFormField = (_a) => {
10027
10050
  var _b = _a, {
10028
10051
  name,
10029
10052
  label,
10030
- required
10053
+ required,
10054
+ selectedOrientation = "column",
10055
+ zIndex,
10056
+ maxHeight
10031
10057
  } = _b, rest = __objRest(_b, [
10032
10058
  "name",
10033
10059
  "label",
10034
- "required"
10060
+ "required",
10061
+ "selectedOrientation",
10062
+ "zIndex",
10063
+ "maxHeight"
10035
10064
  ]);
10036
10065
  var _a2;
10037
10066
  const { field, fieldState } = (0, import_react_hook_form4.useController)({
@@ -10063,7 +10092,10 @@ var MultiSelectFormField = (_a) => {
10063
10092
  value,
10064
10093
  onValueChange: handleChange,
10065
10094
  ref,
10066
- color: haveError ? "error" : "default"
10095
+ color: haveError ? "error" : "default",
10096
+ selectedOrientation,
10097
+ zIndex,
10098
+ maxHeight
10067
10099
  }, rest)
10068
10100
  ),
10069
10101
  /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ErrorFormMessage, { message: errorMsg })
@@ -10313,10 +10345,6 @@ var BirthDateFormField = ({
10313
10345
 
10314
10346
  // src/components/FormFields/IdentityDocumentNumberFormField.tsx
10315
10347
  var import_jsx_runtime40 = require("react/jsx-runtime");
10316
- var isValidRG = (rg) => {
10317
- const cleaned = rg.replace(/[^\d]/g, "");
10318
- return /^\d{9}$/.test(cleaned);
10319
- };
10320
10348
  var IdentityDocumentNumberFormField = ({
10321
10349
  name,
10322
10350
  label,
@@ -10336,9 +10364,11 @@ var IdentityDocumentNumberFormField = ({
10336
10364
  replacement: { _: /[0-9]/ }
10337
10365
  },
10338
10366
  validate: (value) => {
10339
- const isEmpty = value.replace(/[^\d]/g, "").length === 0;
10367
+ const cleaned = value.replace(/[^\d]/g, "");
10368
+ const isEmpty = cleaned.length === 0;
10340
10369
  if (!required && isEmpty) return true;
10341
- return isValidRG(value) || validationErrorMessage;
10370
+ if (cleaned.length >= 3) return true;
10371
+ return validationErrorMessage;
10342
10372
  }
10343
10373
  }
10344
10374
  );
@@ -10916,6 +10946,879 @@ var EmailFormField = ({
10916
10946
  }
10917
10947
  );
10918
10948
  };
10949
+
10950
+ // src/components/FormFields/RichEditorFormField.tsx
10951
+ var import_react_hook_form11 = require("react-hook-form");
10952
+
10953
+ // src/components/RichEditor/QuillComponent.tsx
10954
+ var import_react20 = require("react");
10955
+ var import_react_quilljs = require("react-quilljs");
10956
+ var import_quill_snow = require("quill/dist/quill.snow.css");
10957
+
10958
+ // src/utils/uploadService.ts
10959
+ var generateUniqueFilename = (originalName) => {
10960
+ const timestamp = Date.now().toString(36);
10961
+ const random = Math.random().toString(36).substring(2, 8);
10962
+ const extension = originalName.split(".").pop();
10963
+ return `${timestamp}_${random}.${extension}`;
10964
+ };
10965
+ var UploadService = class {
10966
+ static getPresignedUrl(filename, contentType, config2) {
10967
+ return __async(this, null, function* () {
10968
+ var _a;
10969
+ const apiUrl = config2.apiUrl;
10970
+ const presignedUrlEndpoint = (_a = config2.endpoints) == null ? void 0 : _a.presignedUrl;
10971
+ const bucket = config2.s3Bucket;
10972
+ try {
10973
+ const response = yield fetch(`${apiUrl}${presignedUrlEndpoint}`, {
10974
+ method: "POST",
10975
+ headers: {
10976
+ "Content-Type": "application/json"
10977
+ },
10978
+ body: JSON.stringify({
10979
+ filename,
10980
+ contentType,
10981
+ bucket
10982
+ })
10983
+ });
10984
+ if (!response.ok) {
10985
+ throw new Error("Falha ao gerar URL de upload");
10986
+ }
10987
+ const data = yield response.json();
10988
+ return data.presignedUrl;
10989
+ } catch (error) {
10990
+ console.error("Erro ao gerar URL pr\xE9-assinada:", error);
10991
+ throw new Error("Falha ao gerar URL de upload");
10992
+ }
10993
+ });
10994
+ }
10995
+ static uploadToS3(file, config2, onProgress) {
10996
+ return __async(this, null, function* () {
10997
+ try {
10998
+ const uniqueFilename = generateUniqueFilename(file.name);
10999
+ const blob = new Blob([file], { type: file.type });
11000
+ const s3Url = `${config2.s3Url}/${uniqueFilename}`;
11001
+ return new Promise((resolve, reject) => {
11002
+ const xhr = new XMLHttpRequest();
11003
+ xhr.upload.addEventListener("progress", (event) => {
11004
+ if (event.lengthComputable) {
11005
+ const percentComplete = Math.round(
11006
+ event.loaded / event.total * 100
11007
+ );
11008
+ onProgress == null ? void 0 : onProgress({
11009
+ amount: percentComplete,
11010
+ message: `Fazendo upload... ${percentComplete}%`
11011
+ });
11012
+ }
11013
+ });
11014
+ xhr.addEventListener("load", () => {
11015
+ if (xhr.status === 200) {
11016
+ resolve({
11017
+ url: s3Url,
11018
+ filename: uniqueFilename,
11019
+ size: file.size,
11020
+ type: file.type
11021
+ });
11022
+ } else {
11023
+ reject(new Error(`Upload falhou com status: ${xhr.status}`));
11024
+ }
11025
+ });
11026
+ xhr.addEventListener("error", () => {
11027
+ reject(new Error("Erro de rede durante upload"));
11028
+ });
11029
+ xhr.open("PUT", s3Url);
11030
+ xhr.setRequestHeader("Content-Type", file.type);
11031
+ xhr.send(blob);
11032
+ });
11033
+ } catch (error) {
11034
+ console.error("Erro no upload:", error);
11035
+ throw error;
11036
+ }
11037
+ });
11038
+ }
11039
+ static uploadViaAPI(file, config2, onProgress) {
11040
+ return __async(this, null, function* () {
11041
+ try {
11042
+ const formData = new FormData();
11043
+ formData.append("file", file);
11044
+ const bucket = config2.s3Bucket;
11045
+ formData.append("bucket", bucket);
11046
+ const xhr = new XMLHttpRequest();
11047
+ return new Promise((resolve, reject) => {
11048
+ var _a;
11049
+ xhr.upload.addEventListener("progress", (event) => {
11050
+ if (event.lengthComputable) {
11051
+ const percentComplete = Math.round(
11052
+ event.loaded / event.total * 100
11053
+ );
11054
+ onProgress == null ? void 0 : onProgress({
11055
+ amount: percentComplete,
11056
+ message: `Fazendo upload... ${percentComplete}%`
11057
+ });
11058
+ }
11059
+ });
11060
+ xhr.addEventListener("load", () => {
11061
+ if (xhr.status === 200) {
11062
+ try {
11063
+ const response = JSON.parse(xhr.responseText);
11064
+ resolve({
11065
+ url: response.url,
11066
+ filename: response.filename,
11067
+ size: file.size,
11068
+ type: file.type
11069
+ });
11070
+ } catch (error) {
11071
+ reject(new Error("Resposta inv\xE1lida do servidor"));
11072
+ }
11073
+ } else {
11074
+ reject(new Error(`Upload falhou com status: ${xhr.status}`));
11075
+ }
11076
+ });
11077
+ xhr.addEventListener("error", () => {
11078
+ reject(new Error("Erro de rede durante upload"));
11079
+ });
11080
+ const apiUrl = config2.apiUrl;
11081
+ const uploadEndpoint = (_a = config2.endpoints) == null ? void 0 : _a.upload;
11082
+ xhr.open("POST", `${apiUrl}${uploadEndpoint}`);
11083
+ xhr.send(formData);
11084
+ });
11085
+ } catch (error) {
11086
+ console.error("Erro no upload via API:", error);
11087
+ throw error;
11088
+ }
11089
+ });
11090
+ }
11091
+ };
11092
+
11093
+ // src/components/RichEditor/styledComponents.ts
11094
+ var QuillContainer = styled("div", {
11095
+ display: "flex",
11096
+ flexDirection: "column"
11097
+ });
11098
+ var QuillEditor = styled("div", {
11099
+ "& .ql-editor": {
11100
+ minHeight: "200px",
11101
+ padding: "$12",
11102
+ fontSize: "$14",
11103
+ lineHeight: "$base",
11104
+ fontFamily: "$default",
11105
+ color: "$neutral900",
11106
+ backgroundColor: "$white",
11107
+ border: "none",
11108
+ outline: "none",
11109
+ cursor: "text",
11110
+ caretColor: "$primary500",
11111
+ "&:focus": {
11112
+ borderColor: "$primary500",
11113
+ boxShadow: "0 0 0 1px $primary500"
11114
+ },
11115
+ "& p": {
11116
+ margin: "0 0 $8 0"
11117
+ },
11118
+ "& p:last-child": {
11119
+ marginBottom: 0
11120
+ },
11121
+ "& .ql-cursor": {
11122
+ borderLeft: "2px solid $primary500"
11123
+ }
11124
+ },
11125
+ "& .ql-toolbar": {
11126
+ backgroundColor: "$grey100",
11127
+ border: "1px solid $neutral300",
11128
+ borderBottom: "none",
11129
+ borderTopLeftRadius: "$sm",
11130
+ borderTopRightRadius: "$sm",
11131
+ padding: "$8 $12"
11132
+ },
11133
+ "& .ql-container": {
11134
+ border: "1px solid $neutral300",
11135
+ borderTop: "none",
11136
+ borderBottomLeftRadius: "$sm",
11137
+ borderBottomRightRadius: "$sm",
11138
+ fontFamily: "$default"
11139
+ },
11140
+ "& .ql-snow .ql-picker.ql-header .ql-picker-item[data-value='1']::before": {
11141
+ content: "T\xEDtulo 1"
11142
+ },
11143
+ "& .ql-snow .ql-picker.ql-header .ql-picker-item[data-value='2']::before": {
11144
+ content: "T\xEDtulo 2"
11145
+ }
11146
+ });
11147
+
11148
+ // src/components/RichEditor/QuillComponent.tsx
11149
+ var import_jsx_runtime50 = require("react/jsx-runtime");
11150
+ var QuillComponent = ({
11151
+ value = "",
11152
+ onChange,
11153
+ placeholder = "Digite seu texto aqui...",
11154
+ disabled = false,
11155
+ className,
11156
+ uploadConfig
11157
+ }) => {
11158
+ const [showVideoModal, setShowVideoModal] = (0, import_react20.useState)(false);
11159
+ const [videoUrl, setVideoUrl] = (0, import_react20.useState)("");
11160
+ const [showLinkModal, setShowLinkModal] = (0, import_react20.useState)(false);
11161
+ const [linkUrl, setLinkUrl] = (0, import_react20.useState)("");
11162
+ const videoModalRef = (0, import_react20.useRef)(null);
11163
+ const linkModalRef = (0, import_react20.useRef)(null);
11164
+ const { addToast, removeToast } = useToast();
11165
+ const modules = {
11166
+ toolbar: [
11167
+ [{ header: [1, 2, false] }],
11168
+ ["bold", "italic", "underline", "strike"],
11169
+ [{ color: [] }, { background: [] }],
11170
+ [{ align: [] }],
11171
+ [{ list: "ordered" }, { list: "bullet" }],
11172
+ ["link", "image", "video"]
11173
+ ],
11174
+ clipboard: {
11175
+ matchVisual: false
11176
+ }
11177
+ };
11178
+ const formats = [
11179
+ "header",
11180
+ "bold",
11181
+ "italic",
11182
+ "underline",
11183
+ "strike",
11184
+ "color",
11185
+ "background",
11186
+ "align",
11187
+ "list",
11188
+ "link",
11189
+ "image",
11190
+ "video"
11191
+ ];
11192
+ const { quill, quillRef } = (0, import_react_quilljs.useQuill)({
11193
+ theme: "snow",
11194
+ modules,
11195
+ formats,
11196
+ placeholder,
11197
+ readOnly: disabled
11198
+ });
11199
+ const handleImageUpload = (0, import_react20.useCallback)(
11200
+ (file) => __async(null, null, function* () {
11201
+ if (disabled || !quill || !uploadConfig) return;
11202
+ try {
11203
+ addToast({
11204
+ type: "info",
11205
+ message: "Carregando imagem...",
11206
+ duration: 2e3
11207
+ });
11208
+ const uploadedFile = yield UploadService.uploadToS3(file, uploadConfig);
11209
+ removeToast("info");
11210
+ addToast({
11211
+ type: "success",
11212
+ message: "Imagem adicionada com sucesso!"
11213
+ });
11214
+ const selection = quill.getSelection();
11215
+ const index = selection ? selection.index : quill.getLength();
11216
+ quill.insertEmbed(index, "image", uploadedFile.url);
11217
+ quill.setSelection(index + 1, 0);
11218
+ } catch (error) {
11219
+ console.error("Erro no upload:", error);
11220
+ addToast({
11221
+ type: "error",
11222
+ message: "Erro no upload: N\xE3o foi poss\xEDvel enviar a imagem. Tente novamente."
11223
+ });
11224
+ }
11225
+ }),
11226
+ [disabled, quill, addToast, removeToast, uploadConfig]
11227
+ );
11228
+ (0, import_react20.useEffect)(() => {
11229
+ if (quill && value) {
11230
+ const currentContent = quill.root.innerHTML;
11231
+ if (currentContent !== value) {
11232
+ const selection = quill.getSelection();
11233
+ quill.clipboard.dangerouslyPasteHTML(value);
11234
+ if (selection) {
11235
+ quill.setSelection(selection.index, selection.length);
11236
+ } else {
11237
+ quill.setSelection(quill.getLength(), 0);
11238
+ }
11239
+ }
11240
+ }
11241
+ }, [quill, value]);
11242
+ (0, import_react20.useEffect)(() => {
11243
+ if (quill) {
11244
+ quill.on("text-change", (delta, oldDelta, source) => {
11245
+ if (source === "user") {
11246
+ const html = quill.root.innerHTML;
11247
+ onChange == null ? void 0 : onChange(html);
11248
+ }
11249
+ });
11250
+ const toolbar = quill.getModule("toolbar");
11251
+ if (toolbar) {
11252
+ toolbar.addHandler("link", () => setShowLinkModal(true));
11253
+ toolbar.addHandler("video", () => setShowVideoModal(true));
11254
+ toolbar.addHandler("image", () => {
11255
+ const input = document.createElement("input");
11256
+ input.setAttribute("type", "file");
11257
+ input.setAttribute("accept", "image/*");
11258
+ input.click();
11259
+ input.onchange = () => __async(null, null, function* () {
11260
+ var _a;
11261
+ const file = (_a = input.files) == null ? void 0 : _a[0];
11262
+ if (file) {
11263
+ yield handleImageUpload(file);
11264
+ }
11265
+ });
11266
+ });
11267
+ }
11268
+ setTimeout(() => {
11269
+ var _a, _b;
11270
+ const toolbarElement = (_b = (_a = quillRef.current) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
11271
+ if (toolbarElement) {
11272
+ const headerSelect = toolbarElement.querySelector(
11273
+ "select[data-value]"
11274
+ );
11275
+ if (headerSelect) {
11276
+ const options = headerSelect.querySelectorAll("option");
11277
+ options.forEach((option) => {
11278
+ if (option.value === "1") {
11279
+ option.textContent = "T\xEDtulo 1";
11280
+ } else if (option.value === "2") {
11281
+ option.textContent = "T\xEDtulo 2";
11282
+ } else if (option.value === "") {
11283
+ option.textContent = "Normal";
11284
+ }
11285
+ });
11286
+ }
11287
+ }
11288
+ }, 2e3);
11289
+ }
11290
+ }, [quill, onChange, handleImageUpload]);
11291
+ (0, import_react20.useEffect)(() => {
11292
+ if (quill) {
11293
+ quill.enable(!disabled);
11294
+ if (!disabled) {
11295
+ if (quill.getLength() <= 1) {
11296
+ quill.focus();
11297
+ quill.setSelection(0, 0);
11298
+ }
11299
+ }
11300
+ }
11301
+ }, [quill, disabled]);
11302
+ const handleLinkCancel = (0, import_react20.useCallback)(() => {
11303
+ setLinkUrl("");
11304
+ setShowLinkModal(false);
11305
+ }, []);
11306
+ const handleLinkSubmit = (0, import_react20.useCallback)(() => {
11307
+ if (!linkUrl.trim() || !quill) return;
11308
+ const url = linkUrl.trim();
11309
+ const selection = quill.getSelection();
11310
+ if (selection && selection.length > 0) {
11311
+ quill.format("link", url);
11312
+ } else {
11313
+ const index = quill.getLength();
11314
+ quill.insertText(index, url, "link", url);
11315
+ quill.setSelection(index + url.length, 0);
11316
+ }
11317
+ setLinkUrl("");
11318
+ setShowLinkModal(false);
11319
+ }, [linkUrl, quill]);
11320
+ const handleVideoCancel = (0, import_react20.useCallback)(() => {
11321
+ setVideoUrl("");
11322
+ setShowVideoModal(false);
11323
+ }, []);
11324
+ const handleVideoSubmit = (0, import_react20.useCallback)(() => {
11325
+ var _a, _b;
11326
+ if (!videoUrl.trim() || !quill) return;
11327
+ let processedUrl = videoUrl.trim();
11328
+ if (processedUrl.includes("youtube.com/watch")) {
11329
+ const videoId = (_a = processedUrl.match(/[?&]v=([^&]+)/)) == null ? void 0 : _a[1];
11330
+ if (videoId) {
11331
+ processedUrl = `https://www.youtube.com/embed/${videoId}`;
11332
+ }
11333
+ } else if (processedUrl.includes("youtu.be/")) {
11334
+ const videoId = (_b = processedUrl.split("youtu.be/")[1]) == null ? void 0 : _b.split("?")[0];
11335
+ if (videoId) {
11336
+ processedUrl = `https://www.youtube.com/embed/${videoId}`;
11337
+ }
11338
+ }
11339
+ const videoHTML = `
11340
+ <iframe
11341
+ src="${processedUrl}"
11342
+ style="max-width:100%; height:315px; border:0;"
11343
+ title="Video player"
11344
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
11345
+ allowfullscreen>
11346
+ </iframe>
11347
+ <br/>
11348
+ `;
11349
+ const selection = quill.getSelection();
11350
+ const insertIndex = selection ? selection.index : quill.getLength();
11351
+ quill.clipboard.dangerouslyPasteHTML(insertIndex, videoHTML);
11352
+ quill.setSelection(insertIndex + 1, 0);
11353
+ setVideoUrl("");
11354
+ setShowVideoModal(false);
11355
+ }, [videoUrl, quill]);
11356
+ (0, import_react20.useEffect)(() => {
11357
+ const handleClickOutside = (event) => {
11358
+ if (showVideoModal && videoModalRef.current && !videoModalRef.current.contains(event.target)) {
11359
+ handleVideoCancel();
11360
+ }
11361
+ if (showLinkModal && linkModalRef.current && !linkModalRef.current.contains(event.target)) {
11362
+ handleLinkCancel();
11363
+ }
11364
+ };
11365
+ document.addEventListener("mousedown", handleClickOutside);
11366
+ return () => document.removeEventListener("mousedown", handleClickOutside);
11367
+ }, [showVideoModal, showLinkModal, handleVideoCancel, handleLinkCancel]);
11368
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(QuillContainer, { className, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(QuillEditor, { style: { position: "relative" }, children: [
11369
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { ref: quillRef }),
11370
+ showVideoModal && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11371
+ "div",
11372
+ {
11373
+ ref: videoModalRef,
11374
+ style: {
11375
+ position: "absolute",
11376
+ top: "20px",
11377
+ left: "20px",
11378
+ right: "20px",
11379
+ backgroundColor: "white",
11380
+ border: "1px solid #e0e0e0",
11381
+ borderRadius: "4px",
11382
+ padding: "12px",
11383
+ boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
11384
+ zIndex: 1e3,
11385
+ width: "fit-content"
11386
+ },
11387
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Flex2, { gap: 8, align: "center", children: [
11388
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11389
+ Text,
11390
+ {
11391
+ style: { fontSize: "14px", fontWeight: "500", color: "#333" },
11392
+ children: "V\xEDdeo:"
11393
+ }
11394
+ ),
11395
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11396
+ "input",
11397
+ {
11398
+ type: "text",
11399
+ value: videoUrl,
11400
+ onChange: (e) => setVideoUrl(e.target.value),
11401
+ placeholder: "Embed URL",
11402
+ style: {
11403
+ padding: "8px 12px",
11404
+ border: "1px solid #d0d0d0",
11405
+ borderRadius: "4px",
11406
+ fontSize: "14px",
11407
+ backgroundColor: "#f8f8f8"
11408
+ },
11409
+ onKeyDown: (e) => {
11410
+ if (e.key === "Enter") {
11411
+ handleVideoSubmit();
11412
+ } else if (e.key === "Escape") {
11413
+ handleVideoCancel();
11414
+ }
11415
+ },
11416
+ autoFocus: true
11417
+ }
11418
+ ),
11419
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11420
+ "button",
11421
+ {
11422
+ onClick: handleVideoSubmit,
11423
+ disabled: !videoUrl.trim(),
11424
+ style: {
11425
+ padding: "8px 16px",
11426
+ backgroundColor: "#007bff",
11427
+ color: "white",
11428
+ border: "none",
11429
+ borderRadius: "4px",
11430
+ fontSize: "14px",
11431
+ cursor: videoUrl.trim() ? "pointer" : "not-allowed",
11432
+ opacity: videoUrl.trim() ? 1 : 0.6
11433
+ },
11434
+ children: "Ok"
11435
+ }
11436
+ )
11437
+ ] })
11438
+ }
11439
+ ),
11440
+ showLinkModal && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11441
+ "div",
11442
+ {
11443
+ ref: linkModalRef,
11444
+ style: {
11445
+ position: "absolute",
11446
+ top: "20px",
11447
+ left: "20px",
11448
+ right: "20px",
11449
+ backgroundColor: "white",
11450
+ border: "1px solid #e0e0e0",
11451
+ borderRadius: "4px",
11452
+ padding: "12px",
11453
+ boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
11454
+ zIndex: 1e3,
11455
+ width: "fit-content"
11456
+ },
11457
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Flex2, { gap: 8, align: "center", children: [
11458
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11459
+ Text,
11460
+ {
11461
+ style: { fontSize: "14px", fontWeight: "500", color: "#333" },
11462
+ children: "Link:"
11463
+ }
11464
+ ),
11465
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11466
+ "input",
11467
+ {
11468
+ type: "text",
11469
+ value: linkUrl,
11470
+ onChange: (e) => setLinkUrl(e.target.value),
11471
+ placeholder: "URL do link",
11472
+ style: {
11473
+ padding: "8px 12px",
11474
+ border: "1px solid #d0d0d0",
11475
+ borderRadius: "4px",
11476
+ fontSize: "14px",
11477
+ backgroundColor: "#f8f8f8",
11478
+ width: "300px"
11479
+ },
11480
+ onKeyDown: (e) => {
11481
+ if (e.key === "Enter") {
11482
+ handleLinkSubmit();
11483
+ } else if (e.key === "Escape") {
11484
+ handleLinkCancel();
11485
+ }
11486
+ },
11487
+ autoFocus: true
11488
+ }
11489
+ ),
11490
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
11491
+ "button",
11492
+ {
11493
+ onClick: handleLinkSubmit,
11494
+ disabled: !linkUrl.trim(),
11495
+ style: {
11496
+ padding: "8px 16px",
11497
+ backgroundColor: "#007bff",
11498
+ color: "white",
11499
+ border: "none",
11500
+ borderRadius: "4px",
11501
+ fontSize: "14px",
11502
+ cursor: linkUrl.trim() ? "pointer" : "not-allowed",
11503
+ opacity: linkUrl.trim() ? 1 : 0.6
11504
+ },
11505
+ children: "Ok"
11506
+ }
11507
+ )
11508
+ ] })
11509
+ }
11510
+ )
11511
+ ] }) });
11512
+ };
11513
+ var QuillComponent_default = QuillComponent;
11514
+
11515
+ // src/components/RichEditor/RichEditor.tsx
11516
+ var import_jsx_runtime51 = require("react/jsx-runtime");
11517
+ var RichEditor = (props) => {
11518
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ToastProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuillComponent_default, __spreadValues({}, props)) }) });
11519
+ };
11520
+ var RichEditor_default = RichEditor;
11521
+
11522
+ // src/components/FormFields/RichEditorFormField.tsx
11523
+ var import_jsx_runtime52 = require("react/jsx-runtime");
11524
+ var RichEditorFormField = (_a) => {
11525
+ var _b = _a, {
11526
+ name,
11527
+ label,
11528
+ required,
11529
+ validate,
11530
+ validationErrorMessage = "Este campo \xE9 obrigat\xF3rio."
11531
+ } = _b, props = __objRest(_b, [
11532
+ "name",
11533
+ "label",
11534
+ "required",
11535
+ "validate",
11536
+ "validationErrorMessage"
11537
+ ]);
11538
+ const { field, fieldState } = (0, import_react_hook_form11.useController)({
11539
+ name,
11540
+ rules: {
11541
+ required: required ? validationErrorMessage : false,
11542
+ validate: (value) => {
11543
+ var _a2;
11544
+ if (value === void 0 || value === null || !required && value.trim() === "")
11545
+ return true;
11546
+ return (_a2 = validate == null ? void 0 : validate(value)) != null ? _a2 : true;
11547
+ }
11548
+ },
11549
+ defaultValue: ""
11550
+ });
11551
+ const fieldError = fieldState.error;
11552
+ const haveError = !!fieldError;
11553
+ const errorMsg = fieldError == null ? void 0 : fieldError.message;
11554
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Flex2, { direction: "column", children: [
11555
+ label && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11556
+ FormLabel,
11557
+ {
11558
+ name,
11559
+ label,
11560
+ required,
11561
+ haveError
11562
+ }
11563
+ ),
11564
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
11565
+ RichEditor_default,
11566
+ __spreadProps(__spreadValues({}, props), {
11567
+ value: field.value,
11568
+ onChange: field.onChange,
11569
+ "aria-labelledby": `${name}-label`
11570
+ })
11571
+ ),
11572
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ErrorFormMessage, { message: errorMsg })
11573
+ ] });
11574
+ };
11575
+
11576
+ // src/components/FormFields/CalendarFormField.tsx
11577
+ var import_react_hook_form12 = require("react-hook-form");
11578
+ var import_react21 = require("react");
11579
+ var import_jsx_runtime53 = require("react/jsx-runtime");
11580
+ var CalendarFormField = (_a) => {
11581
+ var _b = _a, {
11582
+ name,
11583
+ label,
11584
+ required,
11585
+ validate,
11586
+ validationErrorMessage = "Este campo \xE9 obrigat\xF3rio.",
11587
+ rules,
11588
+ onChange,
11589
+ allowPastDates
11590
+ } = _b, calendarProps = __objRest(_b, [
11591
+ "name",
11592
+ "label",
11593
+ "required",
11594
+ "validate",
11595
+ "validationErrorMessage",
11596
+ "rules",
11597
+ "onChange",
11598
+ "allowPastDates"
11599
+ ]);
11600
+ const handleValidate = (0, import_react21.useCallback)(
11601
+ (value) => {
11602
+ var _a2;
11603
+ if (value === void 0 || value === null) {
11604
+ if (required) return validationErrorMessage;
11605
+ return true;
11606
+ }
11607
+ return (_a2 = validate == null ? void 0 : validate(value)) != null ? _a2 : true;
11608
+ },
11609
+ [validate, required, validationErrorMessage]
11610
+ );
11611
+ const { field, fieldState } = (0, import_react_hook_form12.useController)({
11612
+ name,
11613
+ rules: __spreadValues({
11614
+ required: required ? validationErrorMessage : false,
11615
+ validate: handleValidate
11616
+ }, rules),
11617
+ defaultValue: void 0
11618
+ });
11619
+ const fieldError = fieldState.error;
11620
+ const haveError = !!fieldError;
11621
+ const errorMsg = fieldError == null ? void 0 : fieldError.message;
11622
+ const { value: selected, onChange: setSelected } = field;
11623
+ const handleCalendarChange = (date) => {
11624
+ setSelected(date);
11625
+ };
11626
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Flex2, { direction: "column", style: { flex: "1" }, children: [
11627
+ label && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
11628
+ FormLabel,
11629
+ {
11630
+ name,
11631
+ label,
11632
+ required,
11633
+ haveError
11634
+ }
11635
+ ),
11636
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
11637
+ Calendar,
11638
+ __spreadValues({
11639
+ selected,
11640
+ setSelected: (value) => {
11641
+ const date = typeof value === "function" ? value(selected) : value;
11642
+ handleCalendarChange(date);
11643
+ },
11644
+ hasError: haveError,
11645
+ allowPastDates
11646
+ }, calendarProps)
11647
+ ),
11648
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ErrorFormMessage, { message: errorMsg })
11649
+ ] });
11650
+ };
11651
+
11652
+ // src/components/FormFields/TimePickerFormField.tsx
11653
+ var import_react_hook_form13 = require("react-hook-form");
11654
+ var import_react22 = require("react");
11655
+ var import_jsx_runtime54 = require("react/jsx-runtime");
11656
+ var TimePickerFormField = (_a) => {
11657
+ var _b = _a, {
11658
+ name,
11659
+ label,
11660
+ required,
11661
+ validate,
11662
+ validationErrorMessage = "Este campo \xE9 obrigat\xF3rio.",
11663
+ rules
11664
+ } = _b, timePickerProps = __objRest(_b, [
11665
+ "name",
11666
+ "label",
11667
+ "required",
11668
+ "validate",
11669
+ "validationErrorMessage",
11670
+ "rules"
11671
+ ]);
11672
+ const handleValidate = (0, import_react22.useCallback)(
11673
+ (value) => {
11674
+ var _a2;
11675
+ if (value === void 0 || value === null || value === "") {
11676
+ if (required) return validationErrorMessage;
11677
+ return true;
11678
+ }
11679
+ return (_a2 = validate == null ? void 0 : validate(value)) != null ? _a2 : true;
11680
+ },
11681
+ [validate, required, validationErrorMessage]
11682
+ );
11683
+ const { field, fieldState } = (0, import_react_hook_form13.useController)({
11684
+ name,
11685
+ rules: __spreadValues({
11686
+ required: required ? validationErrorMessage : false,
11687
+ validate: handleValidate
11688
+ }, rules),
11689
+ defaultValue: void 0
11690
+ });
11691
+ const fieldError = fieldState.error;
11692
+ const haveError = !!fieldError;
11693
+ const errorMsg = fieldError == null ? void 0 : fieldError.message;
11694
+ const { value: selected, onChange: setSelected } = field;
11695
+ const handleTimePickerChange = (time) => {
11696
+ setSelected(time);
11697
+ };
11698
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Flex2, { direction: "column", style: { flex: "1" }, children: [
11699
+ label && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
11700
+ FormLabel,
11701
+ {
11702
+ name,
11703
+ label,
11704
+ required,
11705
+ haveError
11706
+ }
11707
+ ),
11708
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
11709
+ TimePicker,
11710
+ __spreadValues({
11711
+ selected,
11712
+ setSelected: (value) => {
11713
+ const time = typeof value === "function" ? value(selected) : value;
11714
+ handleTimePickerChange(time);
11715
+ },
11716
+ hasError: haveError
11717
+ }, timePickerProps)
11718
+ ),
11719
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ErrorFormMessage, { message: errorMsg })
11720
+ ] });
11721
+ };
11722
+
11723
+ // src/hooks/useImageUpload.ts
11724
+ var import_react23 = require("react");
11725
+ var useImageUpload = (options) => {
11726
+ const [isUploading, setIsUploading] = (0, import_react23.useState)(false);
11727
+ const [progress, setProgress] = (0, import_react23.useState)(null);
11728
+ const [error, setError] = (0, import_react23.useState)(null);
11729
+ const {
11730
+ onSuccess,
11731
+ onError,
11732
+ onProgress,
11733
+ maxFileSize = 5 * 1024 * 1024,
11734
+ // 5MB default
11735
+ allowedTypes = ["image/jpeg", "image/png", "image/gif", "image/webp"],
11736
+ uploadConfig
11737
+ } = options;
11738
+ const validateFile = (0, import_react23.useCallback)(
11739
+ (file) => {
11740
+ if (!allowedTypes.includes(file.type)) {
11741
+ const errorMsg = "Tipo de arquivo n\xE3o suportado";
11742
+ setError(errorMsg);
11743
+ onError == null ? void 0 : onError(errorMsg);
11744
+ return false;
11745
+ }
11746
+ if (file.size > maxFileSize) {
11747
+ const errorMsg = `Arquivo muito grande. M\xE1ximo: ${(maxFileSize / 1024 / 1024).toFixed(1)}MB`;
11748
+ setError(errorMsg);
11749
+ onError == null ? void 0 : onError(errorMsg);
11750
+ return false;
11751
+ }
11752
+ return true;
11753
+ },
11754
+ [allowedTypes, maxFileSize, onError]
11755
+ );
11756
+ const uploadFile = (0, import_react23.useCallback)(
11757
+ (file) => __async(null, null, function* () {
11758
+ if (!validateFile(file)) {
11759
+ return null;
11760
+ }
11761
+ setIsUploading(true);
11762
+ setError(null);
11763
+ setProgress(null);
11764
+ try {
11765
+ const uploadedFile = yield UploadService.uploadToS3(
11766
+ file,
11767
+ uploadConfig,
11768
+ (progress2) => {
11769
+ setProgress(progress2);
11770
+ onProgress == null ? void 0 : onProgress(progress2);
11771
+ }
11772
+ );
11773
+ setIsUploading(false);
11774
+ setProgress(null);
11775
+ onSuccess == null ? void 0 : onSuccess(uploadedFile);
11776
+ return uploadedFile;
11777
+ } catch (error2) {
11778
+ console.error("Erro no upload S3:", error2);
11779
+ try {
11780
+ setProgress({
11781
+ amount: 0,
11782
+ message: "Tentando m\xE9todo alternativo..."
11783
+ });
11784
+ const uploadedFile = yield UploadService.uploadViaAPI(
11785
+ file,
11786
+ uploadConfig,
11787
+ (progress2) => {
11788
+ setProgress(progress2);
11789
+ onProgress == null ? void 0 : onProgress(progress2);
11790
+ }
11791
+ );
11792
+ setIsUploading(false);
11793
+ setProgress(null);
11794
+ onSuccess == null ? void 0 : onSuccess(uploadedFile);
11795
+ return uploadedFile;
11796
+ } catch (fallbackError) {
11797
+ console.error("Erro no fallback:", fallbackError);
11798
+ const errorMsg = "Falha no upload da imagem. Tente novamente.";
11799
+ setError(errorMsg);
11800
+ setIsUploading(false);
11801
+ setProgress(null);
11802
+ onError == null ? void 0 : onError(errorMsg);
11803
+ return null;
11804
+ }
11805
+ }
11806
+ }),
11807
+ [validateFile, onSuccess, onError, onProgress]
11808
+ );
11809
+ const reset = (0, import_react23.useCallback)(() => {
11810
+ setIsUploading(false);
11811
+ setProgress(null);
11812
+ setError(null);
11813
+ }, []);
11814
+ return {
11815
+ uploadFile,
11816
+ isUploading,
11817
+ progress,
11818
+ error,
11819
+ reset
11820
+ };
11821
+ };
10919
11822
  // Annotate the CommonJS export names for ESM import in node:
10920
11823
  0 && (module.exports = {
10921
11824
  AddressFormFields,
@@ -10941,6 +11844,7 @@ var EmailFormField = ({
10941
11844
  CNPJFormField,
10942
11845
  CPFFormField,
10943
11846
  Calendar,
11847
+ CalendarFormField,
10944
11848
  Card,
10945
11849
  CardStyled,
10946
11850
  CheckboxGroup,
@@ -10975,6 +11879,8 @@ var EmailFormField = ({
10975
11879
  RadioGroupFormField,
10976
11880
  RadioGroupStyled,
10977
11881
  RadioItem,
11882
+ RichEditor,
11883
+ RichEditorFormField,
10978
11884
  Section,
10979
11885
  SectionStyled,
10980
11886
  SelectFormField,
@@ -11000,6 +11906,7 @@ var EmailFormField = ({
11000
11906
  TimePickerButtonStyled,
11001
11907
  TimePickerDropdownStyled,
11002
11908
  TimePickerFooterStyled,
11909
+ TimePickerFormField,
11003
11910
  TimePickerStyled,
11004
11911
  TimerPickerContentStyled,
11005
11912
  ToastItem,
@@ -11009,23 +11916,15 @@ var EmailFormField = ({
11009
11916
  TooltipProvider,
11010
11917
  TooltipRoot,
11011
11918
  TooltipTrigger,
11919
+ UploadService,
11012
11920
  isValidCNPJ,
11013
11921
  maskFormat,
11014
11922
  maskUnformat,
11923
+ useImageUpload,
11015
11924
  useToast
11016
11925
  });
11017
11926
  /*! Bundled license information:
11018
11927
 
11019
- react-is/cjs/react-is.production.min.js:
11020
- (** @license React v16.13.1
11021
- * react-is.production.min.js
11022
- *
11023
- * Copyright (c) Facebook, Inc. and its affiliates.
11024
- *
11025
- * This source code is licensed under the MIT license found in the
11026
- * LICENSE file in the root directory of this source tree.
11027
- *)
11028
-
11029
11928
  react-is/cjs/react-is.development.js:
11030
11929
  (** @license React v16.13.1
11031
11930
  * react-is.development.js