lizaui 9.0.2 → 9.0.3

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 (102) hide show
  1. package/dist/button/index.cjs.js +1 -1
  2. package/dist/button/index.es.js +1 -1
  3. package/dist/calendar/index.cjs.js +47 -796
  4. package/dist/calendar/index.cjs.js.map +1 -1
  5. package/dist/calendar/index.es.js +11 -760
  6. package/dist/calendar/index.es.js.map +1 -1
  7. package/dist/checkbox/index.cjs.js +1 -1
  8. package/dist/checkbox/index.es.js +1 -1
  9. package/dist/chip/index.cjs.js +9 -9
  10. package/dist/chip/index.cjs.js.map +1 -1
  11. package/dist/chip/index.es.js +2 -2
  12. package/dist/chunks/{button-MKhaqe0K.js → button-B0fpJrMg.js} +3 -3
  13. package/dist/chunks/{button-MKhaqe0K.js.map → button-B0fpJrMg.js.map} +1 -1
  14. package/dist/chunks/{button-BKebd9mx.js → button-d5z8H59K.js} +13 -13
  15. package/dist/chunks/{button-BKebd9mx.js.map → button-d5z8H59K.js.map} +1 -1
  16. package/dist/chunks/{checkbox-DpLEjjb9.js → checkbox-C1Sssumg.js} +3 -3
  17. package/dist/chunks/{checkbox-DpLEjjb9.js.map → checkbox-C1Sssumg.js.map} +1 -1
  18. package/dist/chunks/{checkbox-BoxBfskJ.js → checkbox-ovjcc7jF.js} +15 -15
  19. package/dist/chunks/{checkbox-BoxBfskJ.js.map → checkbox-ovjcc7jF.js.map} +1 -1
  20. package/dist/chunks/{index-BHpUy2Ix.js → index-CEKmKomA.js} +2 -2
  21. package/dist/chunks/{index-BHpUy2Ix.js.map → index-CEKmKomA.js.map} +1 -1
  22. package/dist/chunks/{index-CATvGmak.js → index-C_sOsPRt.js} +5 -5
  23. package/dist/chunks/{index-CATvGmak.js.map → index-C_sOsPRt.js.map} +1 -1
  24. package/dist/chunks/{index-CNDtGisb.js → index-DaMyCNJ8.js} +2 -2
  25. package/dist/chunks/{index-CNDtGisb.js.map → index-DaMyCNJ8.js.map} +1 -1
  26. package/dist/chunks/{label-error-DkVGsF5w.js → label-error-BTCuInp7.js} +2 -2
  27. package/dist/chunks/{label-error-DkVGsF5w.js.map → label-error-BTCuInp7.js.map} +1 -1
  28. package/dist/chunks/label-error-C8lIsfXu.js +9 -0
  29. package/dist/chunks/{label-error-2QXnvbxJ.js.map → label-error-C8lIsfXu.js.map} +1 -1
  30. package/dist/chunks/{ripple-CTAKSntE.js → ripple-Bm6QamOy.js} +4 -4
  31. package/dist/chunks/{ripple-CTAKSntE.js.map → ripple-Bm6QamOy.js.map} +1 -1
  32. package/dist/chunks/{scroll-area-CNEU8oOo.js → scroll-area-C0NhSIO2.js} +31 -31
  33. package/dist/chunks/{scroll-area-CNEU8oOo.js.map → scroll-area-C0NhSIO2.js.map} +1 -1
  34. package/dist/chunks/{scroll-area-3h3tgoqp.js → scroll-area-JgKF61tc.js} +3 -3
  35. package/dist/chunks/{scroll-area-3h3tgoqp.js.map → scroll-area-JgKF61tc.js.map} +1 -1
  36. package/dist/chunks/{select-BW-plZA9.js → select-DGnc8VJi.js} +73 -73
  37. package/dist/chunks/{select-BW-plZA9.js.map → select-DGnc8VJi.js.map} +1 -1
  38. package/dist/chunks/{select-wGmz50gN.js → select-Dpyj5dUk.js} +3 -3
  39. package/dist/chunks/{select-wGmz50gN.js.map → select-Dpyj5dUk.js.map} +1 -1
  40. package/dist/chunks/{styled-components.browser.esm-DbYXI9h_.js → styled-components.browser.esm-CPR7VH_x.js} +3 -3
  41. package/dist/chunks/{styled-components.browser.esm-DbYXI9h_.js.map → styled-components.browser.esm-CPR7VH_x.js.map} +1 -1
  42. package/dist/chunks/{textarea-CPHr2RpC.js → textarea-D2_KC-J4.js} +98 -98
  43. package/dist/chunks/{textarea-CPHr2RpC.js.map → textarea-D2_KC-J4.js.map} +1 -1
  44. package/dist/chunks/{textarea-CXQO1MMF.js → textarea-_HQpXiCX.js} +8 -8
  45. package/dist/chunks/{textarea-CXQO1MMF.js.map → textarea-_HQpXiCX.js.map} +1 -1
  46. package/dist/chunks/{tooltip-05Mv2hjx.js → tooltip-GGFk8ALK.js} +15 -15
  47. package/dist/chunks/{tooltip-05Mv2hjx.js.map → tooltip-GGFk8ALK.js.map} +1 -1
  48. package/dist/chunks/{tooltip-D3J0_sJU.js → tooltip-JwIbppjO.js} +3 -3
  49. package/dist/chunks/{tooltip-D3J0_sJU.js.map → tooltip-JwIbppjO.js.map} +1 -1
  50. package/dist/chunks/tv-B0li4IsO.js +41 -0
  51. package/dist/chunks/tv-B0li4IsO.js.map +1 -0
  52. package/dist/chunks/tv-CGbWb8zP.js +40 -0
  53. package/dist/chunks/tv-CGbWb8zP.js.map +1 -0
  54. package/dist/chunks/utils-H80jjgLf.js +9 -0
  55. package/dist/chunks/{utils-BnY7EXd5.js.map → utils-H80jjgLf.js.map} +1 -1
  56. package/dist/chunks/utils-ij3i9zTT.js +8 -0
  57. package/dist/chunks/{utils-nIKS3WsJ.js.map → utils-ij3i9zTT.js.map} +1 -1
  58. package/dist/divider/index.cjs.js +4 -4
  59. package/dist/divider/index.es.js +1 -1
  60. package/dist/modal/index.cjs.js +17 -17
  61. package/dist/modal/index.es.js +3 -3
  62. package/dist/pagination/index.cjs.js +29 -29
  63. package/dist/pagination/index.cjs.js.map +1 -1
  64. package/dist/pagination/index.es.js +5 -5
  65. package/dist/phone-input/index.cjs.js +32 -31
  66. package/dist/phone-input/index.cjs.js.map +1 -1
  67. package/dist/phone-input/index.es.js +7 -6
  68. package/dist/phone-input/index.es.js.map +1 -1
  69. package/dist/ripple/index.cjs.js +1 -1
  70. package/dist/select-input/index.cjs.js +39 -39
  71. package/dist/select-input/index.cjs.js.map +1 -1
  72. package/dist/select-input/index.es.js +5 -5
  73. package/dist/table/index.cjs.js +44 -44
  74. package/dist/table/index.cjs.js.map +1 -1
  75. package/dist/table/index.es.js +5 -5
  76. package/dist/time-input/index.cjs.js +53 -53
  77. package/dist/time-input/index.cjs.js.map +1 -1
  78. package/dist/time-input/index.es.js +5 -5
  79. package/dist/tooltip/index.cjs.js +1 -1
  80. package/dist/tooltip/index.es.js +1 -1
  81. package/dist/ui/index.cjs.js +324 -324
  82. package/dist/ui/index.es.js +10 -10
  83. package/package.json +8 -2
  84. package/dist/chunks/bundle-mjs-BWLS65yY.js +0 -3003
  85. package/dist/chunks/bundle-mjs-BWLS65yY.js.map +0 -1
  86. package/dist/chunks/bundle-mjs-DB1IOBLD.js +0 -3004
  87. package/dist/chunks/bundle-mjs-DB1IOBLD.js.map +0 -1
  88. package/dist/chunks/clsx-CBkIpawf.js +0 -16
  89. package/dist/chunks/clsx-CBkIpawf.js.map +0 -1
  90. package/dist/chunks/clsx-DgYk2OaC.js +0 -17
  91. package/dist/chunks/clsx-DgYk2OaC.js.map +0 -1
  92. package/dist/chunks/label-error-2QXnvbxJ.js +0 -9
  93. package/dist/chunks/tv-C-wpiWwh.js +0 -274
  94. package/dist/chunks/tv-C-wpiWwh.js.map +0 -1
  95. package/dist/chunks/tv-C4gJMNo3.js +0 -275
  96. package/dist/chunks/tv-C4gJMNo3.js.map +0 -1
  97. package/dist/chunks/utils-BnY7EXd5.js +0 -9
  98. package/dist/chunks/utils-nIKS3WsJ.js +0 -8
  99. package/dist/chunks/v4-BQ42ZlDJ.js +0 -39
  100. package/dist/chunks/v4-BQ42ZlDJ.js.map +0 -1
  101. package/dist/chunks/v4-C3omdoBX.js +0 -40
  102. package/dist/chunks/v4-C3omdoBX.js.map +0 -1
@@ -1,771 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require$$0 = require("react/jsx-runtime");
3
+ const jsxRuntime = require("react/jsx-runtime");
4
4
  require("react-calendar/dist/Calendar.css");
5
5
  require("react-date-picker/dist/DatePicker.css");
6
- const React = require("react");
7
- const ReactDOM = require("react-dom");
6
+ const reactTinyPopover = require("react-tiny-popover");
8
7
  const iconBase = require("../chunks/iconBase-BDCKtYly.js");
9
8
  const Calendar = require("react-calendar");
10
9
  const DatePicker = require("react-date-picker");
11
- const clsx = require("../chunks/clsx-CBkIpawf.js");
12
- const styledComponents_browser_esm = require("../chunks/styled-components.browser.esm-DbYXI9h_.js");
10
+ const React = require("react");
11
+ const ReactDOM = require("react-dom");
12
+ const clsx = require("clsx");
13
+ const styledComponents_browser_esm = require("../chunks/styled-components.browser.esm-CPR7VH_x.js");
13
14
  const DateInput = require("react-date-picker/dist/DateInput");
14
- const bundleMjs = require("../chunks/bundle-mjs-BWLS65yY.js");
15
- const labelError = require("../chunks/label-error-2QXnvbxJ.js");
16
- const utils = require("../chunks/utils-nIKS3WsJ.js");
17
- const button = require("../chunks/button-BKebd9mx.js");
18
- const v4 = require("../chunks/v4-BQ42ZlDJ.js");
19
- var Popover = {};
20
- var PopoverPortal = {};
21
- var hasRequiredPopoverPortal;
22
- function requirePopoverPortal() {
23
- if (hasRequiredPopoverPortal) return PopoverPortal;
24
- hasRequiredPopoverPortal = 1;
25
- Object.defineProperty(PopoverPortal, "__esModule", { value: true });
26
- PopoverPortal.PopoverPortal = void 0;
27
- var react_1 = React;
28
- var react_dom_1 = ReactDOM;
29
- var PopoverPortal$1 = function(_a) {
30
- var container = _a.container, element = _a.element, scoutElement = _a.scoutElement, children = _a.children;
31
- (0, react_1.useLayoutEffect)(function() {
32
- container.appendChild(element);
33
- container.appendChild(scoutElement);
34
- return function() {
35
- container.removeChild(element);
36
- container.removeChild(scoutElement);
37
- };
38
- }, [container, element, scoutElement]);
39
- return (0, react_dom_1.createPortal)(children, element);
40
- };
41
- PopoverPortal.PopoverPortal = PopoverPortal$1;
42
- return PopoverPortal;
43
- }
44
- var util = {};
45
- var hasRequiredUtil;
46
- function requireUtil() {
47
- if (hasRequiredUtil) return util;
48
- hasRequiredUtil = 1;
49
- (function(exports2) {
50
- var __assign = util && util.__assign || function() {
51
- __assign = Object.assign || function(t) {
52
- for (var s, i = 1, n = arguments.length; i < n; i++) {
53
- s = arguments[i];
54
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
55
- t[p] = s[p];
56
- }
57
- return t;
58
- };
59
- return __assign.apply(this, arguments);
60
- };
61
- Object.defineProperty(exports2, "__esModule", { value: true });
62
- exports2.getNudgedPopoverRect = exports2.getNewPopoverRect = exports2.popoverRectForPosition = exports2.createContainer = exports2.rectsAreEqual = exports2.createRect = exports2.EMPTY_RECT = void 0;
63
- exports2.EMPTY_RECT = {
64
- top: 0,
65
- left: 0,
66
- right: 0,
67
- bottom: 0,
68
- width: 0,
69
- height: 0
70
- };
71
- var createRect = function(_a) {
72
- var top = _a.top, left = _a.left, width = _a.width, height = _a.height;
73
- return {
74
- top,
75
- left,
76
- width,
77
- height,
78
- right: left + width,
79
- bottom: top + height
80
- };
81
- };
82
- exports2.createRect = createRect;
83
- var rectsAreEqual = function(rectA, rectB) {
84
- return rectA === rectB || (rectA === null || rectA === void 0 ? void 0 : rectA.bottom) === (rectB === null || rectB === void 0 ? void 0 : rectB.bottom) && (rectA === null || rectA === void 0 ? void 0 : rectA.height) === (rectB === null || rectB === void 0 ? void 0 : rectB.height) && (rectA === null || rectA === void 0 ? void 0 : rectA.left) === (rectB === null || rectB === void 0 ? void 0 : rectB.left) && (rectA === null || rectA === void 0 ? void 0 : rectA.right) === (rectB === null || rectB === void 0 ? void 0 : rectB.right) && (rectA === null || rectA === void 0 ? void 0 : rectA.top) === (rectB === null || rectB === void 0 ? void 0 : rectB.top) && (rectA === null || rectA === void 0 ? void 0 : rectA.width) === (rectB === null || rectB === void 0 ? void 0 : rectB.width);
85
- };
86
- exports2.rectsAreEqual = rectsAreEqual;
87
- var createContainer = function(_a) {
88
- var containerStyle = _a.containerStyle, containerClassName = _a.containerClassName;
89
- var container = window.document.createElement("div");
90
- if (containerClassName)
91
- container.className = containerClassName;
92
- Object.assign(container.style, containerStyle);
93
- return container;
94
- };
95
- exports2.createContainer = createContainer;
96
- var popoverRectForPosition = function(position, childRect, popoverRect, padding, align) {
97
- var targetMidX = childRect.left + childRect.width / 2;
98
- var targetMidY = childRect.top + childRect.height / 2;
99
- var width = popoverRect.width, height = popoverRect.height;
100
- var top;
101
- var left;
102
- switch (position) {
103
- case "left":
104
- top = targetMidY - height / 2;
105
- left = childRect.left - padding - width;
106
- if (align === "start") {
107
- top = childRect.top;
108
- }
109
- if (align === "end") {
110
- top = childRect.bottom - height;
111
- }
112
- break;
113
- case "bottom":
114
- top = childRect.bottom + padding;
115
- left = targetMidX - width / 2;
116
- if (align === "start") {
117
- left = childRect.left;
118
- }
119
- if (align === "end") {
120
- left = childRect.right - width;
121
- }
122
- break;
123
- case "right":
124
- top = targetMidY - height / 2;
125
- left = childRect.right + padding;
126
- if (align === "start") {
127
- top = childRect.top;
128
- }
129
- if (align === "end") {
130
- top = childRect.bottom - height;
131
- }
132
- break;
133
- default:
134
- top = childRect.top - height - padding;
135
- left = targetMidX - width / 2;
136
- if (align === "start") {
137
- left = childRect.left;
138
- }
139
- if (align === "end") {
140
- left = childRect.right - width;
141
- }
142
- break;
143
- }
144
- return (0, exports2.createRect)({ left, top, width, height });
145
- };
146
- exports2.popoverRectForPosition = popoverRectForPosition;
147
- var getNewPopoverRect = function(_a, boundaryInset) {
148
- var position = _a.position, align = _a.align, childRect = _a.childRect, popoverRect = _a.popoverRect, boundaryRect = _a.boundaryRect, padding = _a.padding, reposition = _a.reposition;
149
- var rect = (0, exports2.popoverRectForPosition)(position, childRect, popoverRect, padding, align);
150
- var boundaryViolation = reposition && (position === "top" && rect.top < boundaryRect.top + boundaryInset || position === "left" && rect.left < boundaryRect.left + boundaryInset || position === "right" && rect.right > boundaryRect.right - boundaryInset || position === "bottom" && rect.bottom > boundaryRect.bottom - boundaryInset);
151
- return {
152
- rect,
153
- boundaryViolation
154
- };
155
- };
156
- exports2.getNewPopoverRect = getNewPopoverRect;
157
- var getNudgedPopoverRect = function(popoverRect, boundaryRect, boundaryInset) {
158
- var topBoundary = boundaryRect.top + boundaryInset;
159
- var leftBoundary = boundaryRect.left + boundaryInset;
160
- var rightBoundary = boundaryRect.right - boundaryInset;
161
- var bottomBoundary = boundaryRect.bottom - boundaryInset;
162
- var top = popoverRect.top < topBoundary ? topBoundary : popoverRect.top;
163
- top = top + popoverRect.height > bottomBoundary ? bottomBoundary - popoverRect.height : top;
164
- var left = popoverRect.left < leftBoundary ? leftBoundary : popoverRect.left;
165
- left = left + popoverRect.width > rightBoundary ? rightBoundary - popoverRect.width : left;
166
- return (0, exports2.createRect)(__assign(__assign({}, popoverRect), { top, left }));
167
- };
168
- exports2.getNudgedPopoverRect = getNudgedPopoverRect;
169
- })(util);
170
- return util;
171
- }
172
- var usePopover = {};
173
- var useElementRef = {};
174
- var hasRequiredUseElementRef;
175
- function requireUseElementRef() {
176
- if (hasRequiredUseElementRef) return useElementRef;
177
- hasRequiredUseElementRef = 1;
178
- Object.defineProperty(useElementRef, "__esModule", { value: true });
179
- useElementRef.useElementRef = void 0;
180
- var react_1 = React;
181
- var util_1 = requireUtil();
182
- var useElementRef$1 = function(_a) {
183
- var containerClassName = _a.containerClassName, containerStyle = _a.containerStyle;
184
- var ref = (0, react_1.useRef)();
185
- var element = (0, react_1.useState)(function() {
186
- return (0, util_1.createContainer)({ containerStyle, containerClassName });
187
- })[0];
188
- (0, react_1.useLayoutEffect)(function() {
189
- element.className = containerClassName;
190
- }, [containerClassName, element]);
191
- (0, react_1.useLayoutEffect)(function() {
192
- Object.assign(element.style, containerStyle);
193
- }, [containerStyle, element]);
194
- ref.current = element;
195
- return ref;
196
- };
197
- useElementRef.useElementRef = useElementRef$1;
198
- return useElementRef;
199
- }
200
- var hasRequiredUsePopover;
201
- function requireUsePopover() {
202
- if (hasRequiredUsePopover) return usePopover;
203
- hasRequiredUsePopover = 1;
204
- Object.defineProperty(usePopover, "__esModule", { value: true });
205
- usePopover.usePopover = void 0;
206
- var react_1 = React;
207
- var util_1 = requireUtil();
208
- var useElementRef_1 = requireUseElementRef();
209
- var POPOVER_STYLE = {
210
- position: "fixed",
211
- overflow: "visible",
212
- top: "0px",
213
- left: "0px"
214
- };
215
- var SCOUT_STYLE = {
216
- position: "fixed",
217
- top: "0px",
218
- left: "0px",
219
- width: "0px",
220
- height: "0px",
221
- visibility: "hidden"
222
- };
223
- var usePopover$1 = function(_a) {
224
- var isOpen = _a.isOpen, childRef = _a.childRef, positions = _a.positions, containerClassName = _a.containerClassName, parentElement = _a.parentElement, transform = _a.transform, transformMode = _a.transformMode, align = _a.align, padding = _a.padding, reposition = _a.reposition, boundaryInset = _a.boundaryInset, boundaryElement = _a.boundaryElement, onPositionPopover = _a.onPositionPopover;
225
- var scoutRef = (0, useElementRef_1.useElementRef)({
226
- containerClassName: "react-tiny-popover-scout",
227
- containerStyle: SCOUT_STYLE
228
- });
229
- var popoverRef = (0, useElementRef_1.useElementRef)({
230
- containerClassName: containerClassName != null && containerClassName.length > 0 && containerClassName !== "react-tiny-popover-container" ? "react-tiny-popover-container ".concat(containerClassName) : "react-tiny-popover-container",
231
- containerStyle: POPOVER_STYLE
232
- });
233
- var positionPopover = (0, react_1.useCallback)(function(_a2) {
234
- var _b, _c;
235
- var _d = _a2 === void 0 ? {} : _a2, _e = _d.positionIndex, positionIndex = _e === void 0 ? 0 : _e, _f = _d.parentRect, parentRect = _f === void 0 ? parentElement.getBoundingClientRect() : _f, _g = _d.childRect, childRect = _g === void 0 ? (_b = childRef === null || childRef === void 0 ? void 0 : childRef.current) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect() : _g, _h = _d.scoutRect, scoutRect = _h === void 0 ? (_c = scoutRef === null || scoutRef === void 0 ? void 0 : scoutRef.current) === null || _c === void 0 ? void 0 : _c.getBoundingClientRect() : _h, _j = _d.popoverRect, popoverRect = _j === void 0 ? popoverRef.current.getBoundingClientRect() : _j, _k = _d.boundaryRect, boundaryRect = _k === void 0 ? boundaryElement === parentElement ? parentRect : boundaryElement.getBoundingClientRect() : _k;
236
- if (!childRect || !parentRect || !isOpen) {
237
- return;
238
- }
239
- if (transform && transformMode === "absolute") {
240
- var _l = typeof transform === "function" ? transform({
241
- childRect,
242
- popoverRect,
243
- parentRect,
244
- boundaryRect,
245
- padding,
246
- align,
247
- nudgedTop: 0,
248
- nudgedLeft: 0,
249
- boundaryInset,
250
- violations: util_1.EMPTY_RECT,
251
- hasViolations: false
252
- }) : transform, inputTop = _l.top, inputLeft = _l.left;
253
- var finalLeft_1 = Math.round(parentRect.left + inputLeft - scoutRect.left);
254
- var finalTop_1 = Math.round(parentRect.top + inputTop - scoutRect.top);
255
- popoverRef.current.style.transform = "translate(".concat(finalLeft_1, "px, ").concat(finalTop_1, "px)");
256
- onPositionPopover({
257
- childRect,
258
- popoverRect: (0, util_1.createRect)({
259
- left: finalLeft_1,
260
- top: finalTop_1,
261
- width: popoverRect.width,
262
- height: popoverRect.height
263
- }),
264
- parentRect,
265
- boundaryRect,
266
- padding,
267
- align,
268
- transform: { top: inputTop, left: inputLeft },
269
- nudgedTop: 0,
270
- nudgedLeft: 0,
271
- boundaryInset,
272
- violations: util_1.EMPTY_RECT,
273
- hasViolations: false
274
- });
275
- return;
276
- }
277
- var isExhausted = positionIndex === positions.length;
278
- var position = isExhausted ? positions[0] : positions[positionIndex];
279
- var _m = (0, util_1.getNewPopoverRect)({
280
- childRect,
281
- popoverRect,
282
- boundaryRect,
283
- position,
284
- align,
285
- padding,
286
- reposition
287
- }, boundaryInset), rect = _m.rect, boundaryViolation = _m.boundaryViolation;
288
- if (boundaryViolation && reposition && !isExhausted) {
289
- positionPopover({
290
- positionIndex: positionIndex + 1,
291
- childRect,
292
- popoverRect,
293
- parentRect,
294
- boundaryRect
295
- });
296
- return;
297
- }
298
- var top = rect.top, left = rect.left, width = rect.width, height = rect.height;
299
- var shouldNudge = reposition && !isExhausted;
300
- var _o = (0, util_1.getNudgedPopoverRect)(rect, boundaryRect, boundaryInset), nudgedLeft = _o.left, nudgedTop = _o.top;
301
- var finalTop = top;
302
- var finalLeft = left;
303
- if (shouldNudge) {
304
- finalTop = nudgedTop;
305
- finalLeft = nudgedLeft;
306
- }
307
- finalTop = Math.round(finalTop - scoutRect.top);
308
- finalLeft = Math.round(finalLeft - scoutRect.left);
309
- popoverRef.current.style.transform = "translate(".concat(finalLeft, "px, ").concat(finalTop, "px)");
310
- var potentialViolations = {
311
- top: boundaryRect.top + boundaryInset - finalTop,
312
- left: boundaryRect.left + boundaryInset - finalLeft,
313
- right: finalLeft + width - boundaryRect.right + boundaryInset,
314
- bottom: finalTop + height - boundaryRect.bottom + boundaryInset
315
- };
316
- var popoverState = {
317
- childRect,
318
- popoverRect: (0, util_1.createRect)({ left: finalLeft, top: finalTop, width, height }),
319
- parentRect,
320
- boundaryRect,
321
- position,
322
- align,
323
- padding,
324
- nudgedTop: nudgedTop - top,
325
- nudgedLeft: nudgedLeft - left,
326
- boundaryInset,
327
- violations: {
328
- top: potentialViolations.top <= 0 ? 0 : potentialViolations.top,
329
- left: potentialViolations.left <= 0 ? 0 : potentialViolations.left,
330
- right: potentialViolations.right <= 0 ? 0 : potentialViolations.right,
331
- bottom: potentialViolations.bottom <= 0 ? 0 : potentialViolations.bottom
332
- },
333
- hasViolations: potentialViolations.top > 0 || potentialViolations.left > 0 || potentialViolations.right > 0 || potentialViolations.bottom > 0
334
- };
335
- if (transform) {
336
- onPositionPopover(popoverState);
337
- var _p = typeof transform === "function" ? transform(popoverState) : transform, transformTop = _p.top, transformLeft = _p.left;
338
- popoverRef.current.style.transform = "translate(".concat(Math.round(finalLeft + (transformLeft !== null && transformLeft !== void 0 ? transformLeft : 0)), "px, ").concat(Math.round(finalTop + (transformTop !== null && transformTop !== void 0 ? transformTop : 0)), "px)");
339
- popoverState.nudgedLeft += transformLeft !== null && transformLeft !== void 0 ? transformLeft : 0;
340
- popoverState.nudgedTop += transformTop !== null && transformTop !== void 0 ? transformTop : 0;
341
- popoverState.transform = { top: transformTop, left: transformLeft };
342
- }
343
- onPositionPopover(popoverState);
344
- }, [
345
- parentElement,
346
- childRef,
347
- scoutRef,
348
- popoverRef,
349
- boundaryElement,
350
- isOpen,
351
- transform,
352
- transformMode,
353
- positions,
354
- align,
355
- padding,
356
- reposition,
357
- boundaryInset,
358
- onPositionPopover
359
- ]);
360
- return { positionPopover, popoverRef, scoutRef };
361
- };
362
- usePopover.usePopover = usePopover$1;
363
- return usePopover;
364
- }
365
- var useMemoizedArray = {};
366
- var hasRequiredUseMemoizedArray;
367
- function requireUseMemoizedArray() {
368
- if (hasRequiredUseMemoizedArray) return useMemoizedArray;
369
- hasRequiredUseMemoizedArray = 1;
370
- Object.defineProperty(useMemoizedArray, "__esModule", { value: true });
371
- useMemoizedArray.useMemoizedArray = void 0;
372
- var react_1 = React;
373
- var useMemoizedArray$1 = function(externalArray) {
374
- var prevArrayRef = (0, react_1.useRef)(externalArray);
375
- var array = (0, react_1.useMemo)(function() {
376
- if (prevArrayRef.current === externalArray)
377
- return prevArrayRef.current;
378
- if (prevArrayRef.current.length !== externalArray.length) {
379
- prevArrayRef.current = externalArray;
380
- return externalArray;
381
- }
382
- for (var i = 0; i < externalArray.length; i += 1) {
383
- if (externalArray[i] !== prevArrayRef.current[i]) {
384
- prevArrayRef.current = externalArray;
385
- return externalArray;
386
- }
387
- }
388
- return prevArrayRef.current;
389
- }, [externalArray]);
390
- return array;
391
- };
392
- useMemoizedArray.useMemoizedArray = useMemoizedArray$1;
393
- return useMemoizedArray;
394
- }
395
- var useHandlePrevValues = {};
396
- var hasRequiredUseHandlePrevValues;
397
- function requireUseHandlePrevValues() {
398
- if (hasRequiredUseHandlePrevValues) return useHandlePrevValues;
399
- hasRequiredUseHandlePrevValues = 1;
400
- Object.defineProperty(useHandlePrevValues, "__esModule", { value: true });
401
- useHandlePrevValues.useHandlePrevValues = void 0;
402
- var react_1 = React;
403
- var useHandlePrevValues$1 = function(props) {
404
- var prevPositions = (0, react_1.useRef)(props.positions);
405
- var prevReposition = (0, react_1.useRef)(props.reposition);
406
- var prevTransformMode = (0, react_1.useRef)(props.transformMode);
407
- var prevTransform = (0, react_1.useRef)(props.transform);
408
- var prevBoundaryElement = (0, react_1.useRef)(props.boundaryElement);
409
- var prevBoundaryInset = (0, react_1.useRef)(props.boundaryInset);
410
- var updatePrevValues = (0, react_1.useCallback)(function() {
411
- prevPositions.current = props.positions;
412
- prevReposition.current = props.reposition;
413
- prevTransformMode.current = props.transformMode;
414
- prevTransform.current = props.transform;
415
- prevBoundaryElement.current = props.boundaryElement;
416
- prevBoundaryInset.current = props.boundaryInset;
417
- }, [
418
- props.boundaryElement,
419
- props.boundaryInset,
420
- props.positions,
421
- props.reposition,
422
- props.transform,
423
- props.transformMode
424
- ]);
425
- return {
426
- prev: {
427
- positions: prevPositions.current,
428
- reposition: prevReposition.current,
429
- transformMode: prevTransformMode.current,
430
- transform: prevTransform.current,
431
- boundaryElement: prevBoundaryElement.current,
432
- boundaryInset: prevBoundaryInset.current
433
- },
434
- updatePrevValues
435
- };
436
- };
437
- useHandlePrevValues.useHandlePrevValues = useHandlePrevValues$1;
438
- return useHandlePrevValues;
439
- }
440
- var useArrowContainer = {};
441
- var hasRequiredUseArrowContainer;
442
- function requireUseArrowContainer() {
443
- if (hasRequiredUseArrowContainer) return useArrowContainer;
444
- hasRequiredUseArrowContainer = 1;
445
- var __assign = useArrowContainer && useArrowContainer.__assign || function() {
446
- __assign = Object.assign || function(t) {
447
- for (var s, i = 1, n = arguments.length; i < n; i++) {
448
- s = arguments[i];
449
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
450
- t[p] = s[p];
451
- }
452
- return t;
453
- };
454
- return __assign.apply(this, arguments);
455
- };
456
- Object.defineProperty(useArrowContainer, "__esModule", { value: true });
457
- useArrowContainer.useArrowContainer = void 0;
458
- var react_1 = React;
459
- var useArrowContainer$1 = function(_a) {
460
- var childRect = _a.childRect, popoverRect = _a.popoverRect, position = _a.position, arrowSize = _a.arrowSize, arrowColor = _a.arrowColor;
461
- var arrowContainerStyle = (0, react_1.useMemo)(function() {
462
- return {
463
- padding: arrowSize
464
- };
465
- }, [arrowSize]);
466
- var arrowStyle = (0, react_1.useMemo)(function() {
467
- return __assign({ position: "absolute" }, (function() {
468
- var arrowWidth = arrowSize * 2;
469
- var top = childRect.top - popoverRect.top + childRect.height / 2 - arrowWidth / 2;
470
- var left = childRect.left - popoverRect.left + childRect.width / 2 - arrowWidth / 2;
471
- var lowerBound = arrowSize;
472
- var leftUpperBound = popoverRect.width - arrowSize;
473
- var topUpperBound = popoverRect.height - arrowSize;
474
- left = left < lowerBound ? lowerBound : left;
475
- left = left + arrowWidth > leftUpperBound ? leftUpperBound - arrowWidth : left;
476
- top = top < lowerBound ? lowerBound : top;
477
- top = top + arrowWidth > topUpperBound ? topUpperBound - arrowWidth : top;
478
- top = Number.isNaN(top) ? 0 : top;
479
- left = Number.isNaN(left) ? 0 : left;
480
- switch (position) {
481
- case "right":
482
- return {
483
- borderTop: "".concat(arrowSize, "px solid transparent"),
484
- borderBottom: "".concat(arrowSize, "px solid transparent"),
485
- borderRight: "".concat(arrowSize, "px solid ").concat(arrowColor),
486
- left: 0,
487
- top
488
- };
489
- case "left":
490
- return {
491
- borderTop: "".concat(arrowSize, "px solid transparent"),
492
- borderBottom: "".concat(arrowSize, "px solid transparent"),
493
- borderLeft: "".concat(arrowSize, "px solid ").concat(arrowColor),
494
- right: 0,
495
- top
496
- };
497
- case "bottom":
498
- return {
499
- borderLeft: "".concat(arrowSize, "px solid transparent"),
500
- borderRight: "".concat(arrowSize, "px solid transparent"),
501
- borderBottom: "".concat(arrowSize, "px solid ").concat(arrowColor),
502
- top: 0,
503
- left
504
- };
505
- case "top":
506
- return {
507
- borderLeft: "".concat(arrowSize, "px solid transparent"),
508
- borderRight: "".concat(arrowSize, "px solid transparent"),
509
- borderTop: "".concat(arrowSize, "px solid ").concat(arrowColor),
510
- bottom: 0,
511
- left
512
- };
513
- default:
514
- return {
515
- display: "hidden"
516
- };
517
- }
518
- })());
519
- }, [
520
- arrowColor,
521
- arrowSize,
522
- childRect.height,
523
- childRect.left,
524
- childRect.top,
525
- childRect.width,
526
- popoverRect.height,
527
- popoverRect.left,
528
- popoverRect.top,
529
- popoverRect.width,
530
- position
531
- ]);
532
- return {
533
- arrowContainerStyle,
534
- arrowStyle
535
- };
536
- };
537
- useArrowContainer.useArrowContainer = useArrowContainer$1;
538
- return useArrowContainer;
539
- }
540
- var ArrowContainer = {};
541
- var hasRequiredArrowContainer;
542
- function requireArrowContainer() {
543
- if (hasRequiredArrowContainer) return ArrowContainer;
544
- hasRequiredArrowContainer = 1;
545
- var __assign = ArrowContainer && ArrowContainer.__assign || function() {
546
- __assign = Object.assign || function(t) {
547
- for (var s, i = 1, n = arguments.length; i < n; i++) {
548
- s = arguments[i];
549
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
550
- t[p] = s[p];
551
- }
552
- return t;
553
- };
554
- return __assign.apply(this, arguments);
555
- };
556
- Object.defineProperty(ArrowContainer, "__esModule", { value: true });
557
- ArrowContainer.ArrowContainer = void 0;
558
- var jsx_runtime_1 = require$$0;
559
- var react_1 = React;
560
- var useArrowContainer_1 = requireUseArrowContainer();
561
- var ArrowContainer$1 = function(_a) {
562
- var childRect = _a.childRect, popoverRect = _a.popoverRect, position = _a.position, arrowColor = _a.arrowColor, arrowSize = _a.arrowSize, arrowClassName = _a.arrowClassName, externalArrowStyle = _a.arrowStyle, className = _a.className, children = _a.children, externalArrowContainerStyle = _a.style;
563
- var _b = (0, useArrowContainer_1.useArrowContainer)({
564
- childRect,
565
- popoverRect,
566
- position,
567
- arrowColor,
568
- arrowSize
569
- }), arrowContainerStyle = _b.arrowContainerStyle, arrowStyle = _b.arrowStyle;
570
- var mergedContainerStyle = (0, react_1.useMemo)(function() {
571
- return __assign(__assign({}, arrowContainerStyle), externalArrowContainerStyle);
572
- }, [arrowContainerStyle, externalArrowContainerStyle]);
573
- var mergedArrowStyle = (0, react_1.useMemo)(function() {
574
- return __assign(__assign({}, arrowStyle), externalArrowStyle);
575
- }, [arrowStyle, externalArrowStyle]);
576
- return (0, jsx_runtime_1.jsxs)("div", { className, style: mergedContainerStyle, children: [(0, jsx_runtime_1.jsx)("div", { style: mergedArrowStyle, className: arrowClassName }), children] });
577
- };
578
- ArrowContainer.ArrowContainer = ArrowContainer$1;
579
- return ArrowContainer;
580
- }
581
- var hasRequiredPopover;
582
- function requirePopover() {
583
- if (hasRequiredPopover) return Popover;
584
- hasRequiredPopover = 1;
585
- (function(exports2) {
586
- var __assign = Popover && Popover.__assign || function() {
587
- __assign = Object.assign || function(t) {
588
- for (var s, i = 1, n = arguments.length; i < n; i++) {
589
- s = arguments[i];
590
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
591
- t[p] = s[p];
592
- }
593
- return t;
594
- };
595
- return __assign.apply(this, arguments);
596
- };
597
- Object.defineProperty(exports2, "__esModule", { value: true });
598
- exports2.Popover = exports2.usePopover = exports2.ArrowContainer = exports2.useArrowContainer = void 0;
599
- var jsx_runtime_1 = require$$0;
600
- var react_1 = React;
601
- var PopoverPortal_1 = requirePopoverPortal();
602
- var util_1 = requireUtil();
603
- var usePopover_1 = requireUsePopover();
604
- Object.defineProperty(exports2, "usePopover", { enumerable: true, get: function() {
605
- return usePopover_1.usePopover;
606
- } });
607
- var useMemoizedArray_1 = requireUseMemoizedArray();
608
- var useHandlePrevValues_1 = requireUseHandlePrevValues();
609
- var useArrowContainer_1 = requireUseArrowContainer();
610
- Object.defineProperty(exports2, "useArrowContainer", { enumerable: true, get: function() {
611
- return useArrowContainer_1.useArrowContainer;
612
- } });
613
- var ArrowContainer_1 = requireArrowContainer();
614
- Object.defineProperty(exports2, "ArrowContainer", { enumerable: true, get: function() {
615
- return ArrowContainer_1.ArrowContainer;
616
- } });
617
- var DEFAULT_POSITIONS = ["top", "left", "right", "bottom"];
618
- var PopoverInternal = (0, react_1.forwardRef)(function(_a, externalRef) {
619
- var isOpen = _a.isOpen, children = _a.children, content = _a.content, _b = _a.positions, externalPositions = _b === void 0 ? DEFAULT_POSITIONS : _b, _c = _a.align, align = _c === void 0 ? "center" : _c, _d = _a.padding, padding = _d === void 0 ? 0 : _d, _e = _a.reposition, reposition = _e === void 0 ? true : _e, _f = _a.parentElement, parentElement = _f === void 0 ? window.document.body : _f, _g = _a.boundaryElement, boundaryElement = _g === void 0 ? parentElement : _g, containerClassName = _a.containerClassName, containerStyle = _a.containerStyle, transform = _a.transform, _h = _a.transformMode, transformMode = _h === void 0 ? "absolute" : _h, _j = _a.boundaryInset, boundaryInset = _j === void 0 ? 0 : _j, onClickOutside = _a.onClickOutside, _k = _a.clickOutsideCapture, clickOutsideCapture = _k === void 0 ? false : _k;
620
- var positions = (0, useMemoizedArray_1.useMemoizedArray)(Array.isArray(externalPositions) ? externalPositions : [externalPositions]);
621
- var _l = (0, useHandlePrevValues_1.useHandlePrevValues)({
622
- positions,
623
- reposition,
624
- transformMode,
625
- transform,
626
- boundaryElement,
627
- boundaryInset
628
- }), prev = _l.prev, updatePrevValues = _l.updatePrevValues;
629
- var childRef = (0, react_1.useRef)();
630
- var _m = (0, react_1.useState)({
631
- align,
632
- nudgedLeft: 0,
633
- nudgedTop: 0,
634
- position: positions[0],
635
- padding,
636
- childRect: util_1.EMPTY_RECT,
637
- popoverRect: util_1.EMPTY_RECT,
638
- parentRect: util_1.EMPTY_RECT,
639
- boundaryRect: util_1.EMPTY_RECT,
640
- boundaryInset,
641
- violations: util_1.EMPTY_RECT,
642
- hasViolations: false
643
- }), popoverState = _m[0], setPopoverState = _m[1];
644
- var onPositionPopover = (0, react_1.useCallback)(function(popoverState2) {
645
- return setPopoverState(popoverState2);
646
- }, []);
647
- var _o = (0, usePopover_1.usePopover)({
648
- isOpen,
649
- childRef,
650
- containerClassName,
651
- parentElement,
652
- boundaryElement,
653
- transform,
654
- transformMode,
655
- positions,
656
- align,
657
- padding,
658
- boundaryInset,
659
- reposition,
660
- onPositionPopover
661
- }), positionPopover = _o.positionPopover, popoverRef = _o.popoverRef, scoutRef = _o.scoutRef;
662
- (0, react_1.useLayoutEffect)(function() {
663
- var shouldUpdate = true;
664
- var updatePopover = function() {
665
- var _a2, _b2;
666
- if (isOpen && shouldUpdate) {
667
- var childRect = (_a2 = childRef === null || childRef === void 0 ? void 0 : childRef.current) === null || _a2 === void 0 ? void 0 : _a2.getBoundingClientRect();
668
- var popoverRect = (_b2 = popoverRef === null || popoverRef === void 0 ? void 0 : popoverRef.current) === null || _b2 === void 0 ? void 0 : _b2.getBoundingClientRect();
669
- if (childRect != null && popoverRect != null && (!(0, util_1.rectsAreEqual)(childRect, popoverState.childRect) || popoverRect.width !== popoverState.popoverRect.width || popoverRect.height !== popoverState.popoverRect.height || popoverState.padding !== padding || popoverState.align !== align || positions !== prev.positions || reposition !== prev.reposition || transformMode !== prev.transformMode || transform !== prev.transform || boundaryElement !== prev.boundaryElement || boundaryInset !== prev.boundaryInset)) {
670
- positionPopover();
671
- }
672
- updatePrevValues();
673
- if (shouldUpdate) {
674
- window.requestAnimationFrame(updatePopover);
675
- }
676
- }
677
- };
678
- updatePopover();
679
- return function() {
680
- shouldUpdate = false;
681
- };
682
- }, [
683
- align,
684
- boundaryElement,
685
- boundaryInset,
686
- isOpen,
687
- padding,
688
- popoverRef,
689
- popoverState.align,
690
- popoverState.childRect,
691
- popoverState.padding,
692
- popoverState.popoverRect.height,
693
- popoverState.popoverRect.width,
694
- positionPopover,
695
- positions,
696
- prev.boundaryElement,
697
- prev.boundaryInset,
698
- prev.positions,
699
- prev.reposition,
700
- prev.transform,
701
- prev.transformMode,
702
- reposition,
703
- transform,
704
- transformMode,
705
- updatePrevValues
706
- ]);
707
- (0, react_1.useEffect)(function() {
708
- var popoverElement = popoverRef.current;
709
- Object.assign(popoverElement.style, containerStyle);
710
- return function() {
711
- Object.keys(containerStyle !== null && containerStyle !== void 0 ? containerStyle : {}).forEach(function(key) {
712
- return delete popoverElement.style[key];
713
- });
714
- };
715
- }, [containerStyle, isOpen, popoverRef]);
716
- var handleOnClickOutside = (0, react_1.useCallback)(function(e) {
717
- var _a2, _b2;
718
- if (isOpen && !((_a2 = popoverRef.current) === null || _a2 === void 0 ? void 0 : _a2.contains(e.target)) && !((_b2 = childRef.current) === null || _b2 === void 0 ? void 0 : _b2.contains(e.target))) {
719
- onClickOutside === null || onClickOutside === void 0 ? void 0 : onClickOutside(e);
720
- }
721
- }, [isOpen, onClickOutside, popoverRef]);
722
- var handleWindowResize = (0, react_1.useCallback)(function() {
723
- if (childRef.current && isOpen) {
724
- window.requestAnimationFrame(function() {
725
- return positionPopover();
726
- });
727
- }
728
- }, [positionPopover, isOpen]);
729
- (0, react_1.useEffect)(function() {
730
- var body = parentElement.ownerDocument.body;
731
- body.addEventListener("click", handleOnClickOutside, clickOutsideCapture);
732
- body.addEventListener("contextmenu", handleOnClickOutside, clickOutsideCapture);
733
- window.addEventListener("resize", handleWindowResize);
734
- return function() {
735
- body.removeEventListener("click", handleOnClickOutside, clickOutsideCapture);
736
- body.removeEventListener("contextmenu", handleOnClickOutside, clickOutsideCapture);
737
- window.removeEventListener("resize", handleWindowResize);
738
- };
739
- }, [clickOutsideCapture, handleOnClickOutside, handleWindowResize, parentElement]);
740
- var handleRef = (0, react_1.useCallback)(function(node) {
741
- childRef.current = node;
742
- if (externalRef != null) {
743
- if (typeof externalRef === "object") {
744
- externalRef.current = node;
745
- } else if (typeof externalRef === "function") {
746
- externalRef(node);
747
- }
748
- }
749
- }, [externalRef]);
750
- var renderChild = function() {
751
- return (0, react_1.cloneElement)(children, { ref: handleRef });
752
- };
753
- var renderPopover = function() {
754
- if (!isOpen)
755
- return null;
756
- return (0, jsx_runtime_1.jsx)(PopoverPortal_1.PopoverPortal, { element: popoverRef.current, scoutElement: scoutRef.current, container: parentElement, children: typeof content === "function" ? content(popoverState) : content });
757
- };
758
- return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [renderChild(), renderPopover()] });
759
- });
760
- exports2.Popover = (0, react_1.forwardRef)(function(props, ref) {
761
- if (typeof window === "undefined")
762
- return props.children;
763
- return (0, jsx_runtime_1.jsx)(PopoverInternal, __assign({}, props, { ref }));
764
- });
765
- })(Popover);
766
- return Popover;
767
- }
768
- var PopoverExports = requirePopover();
15
+ const tailwindMerge = require("tailwind-merge");
16
+ const uuid = require("uuid");
17
+ const labelError = require("../chunks/label-error-C8lIsfXu.js");
18
+ const utils = require("../chunks/utils-ij3i9zTT.js");
19
+ const button = require("../chunks/button-d5z8H59K.js");
769
20
  function FaArrowLeft(props) {
770
21
  return iconBase.GenIcon({ "attr": { "viewBox": "0 0 448 512" }, "child": [{ "tag": "path", "attr": { "d": "M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z" }, "child": [] }] })(props);
771
22
  }
@@ -782,8 +33,8 @@ const iconProps = {
782
33
  stroke: "black",
783
34
  strokeWidth: 2
784
35
  };
785
- const CalendarIcon = require$$0.jsxs("svg", { ...iconProps, "aria-hidden": "true", className: `${baseClassName}__calendar-button__icon ${baseClassName}__button__icon`, children: [require$$0.jsx("rect", { fill: "none", height: "15", width: "15", x: "2", y: "2" }), require$$0.jsx("line", { x1: "6", x2: "6", y1: "0", y2: "4" }), require$$0.jsx("line", { x1: "13", x2: "13", y1: "0", y2: "4" })] });
786
- const ClearIcon = require$$0.jsxs("svg", { ...iconProps, "aria-hidden": "true", className: `${baseClassName}__clear-button__icon ${baseClassName}__button__icon`, children: [require$$0.jsx("line", { x1: "4", x2: "15", y1: "4", y2: "15" }), require$$0.jsx("line", { x1: "15", x2: "4", y1: "4", y2: "15" })] });
36
+ const CalendarIcon = jsxRuntime.jsxs("svg", { ...iconProps, "aria-hidden": "true", className: `${baseClassName}__calendar-button__icon ${baseClassName}__button__icon`, children: [jsxRuntime.jsx("rect", { fill: "none", height: "15", width: "15", x: "2", y: "2" }), jsxRuntime.jsx("line", { x1: "6", x2: "6", y1: "0", y2: "4" }), jsxRuntime.jsx("line", { x1: "13", x2: "13", y1: "0", y2: "4" })] });
37
+ const ClearIcon = jsxRuntime.jsxs("svg", { ...iconProps, "aria-hidden": "true", className: `${baseClassName}__clear-button__icon ${baseClassName}__button__icon`, children: [jsxRuntime.jsx("line", { x1: "4", x2: "15", y1: "4", y2: "15" }), jsxRuntime.jsx("line", { x1: "15", x2: "4", y1: "4", y2: "15" })] });
787
38
  function DateRangePicker(props) {
788
39
  const { autoFocus, calendarAriaLabel, calendarIcon = CalendarIcon, className, clearAriaLabel, clearIcon = ClearIcon, closeCalendar: shouldCloseCalendarOnSelect = true, "data-testid": dataTestid, dayAriaLabel, dayPlaceholder, disableCalendar, disabled, format, id, isOpen: isOpenProps = null, locale, maxDate, maxDetail = "month", minDate, monthAriaLabel, monthPlaceholder, name = "daterange", nativeInputAriaLabel, onCalendarClose, onCalendarOpen, onChange: onChangeProps, onFocus: onFocusProps, onInvalidChange, openCalendarOnFocus = true, rangeDivider = "–", required, shouldCloseCalendar, shouldOpenCalendar, showLeadingZeros, value, yearAriaLabel, yearPlaceholder, ...otherProps } = props;
789
40
  const [isOpen, setIsOpen] = React.useState(isOpenProps);
@@ -920,7 +171,7 @@ function DateRangePicker(props) {
920
171
  required,
921
172
  showLeadingZeros
922
173
  };
923
- return require$$0.jsxs("div", { className: `${baseClassName}__wrapper`, children: [require$$0.jsx(DateInput, { ...commonProps, autoFocus, name: `${name}_from`, onChange: onChangeFrom, returnValue: "start", value: valueFrom }), require$$0.jsx("span", { className: `${baseClassName}__range-divider`, children: rangeDivider }), require$$0.jsx(DateInput, { ...commonProps, name: `${name}_to`, onChange: onChangeTo, returnValue: "end", value: valueTo }), clearIcon !== null && require$$0.jsx("button", { "aria-label": clearAriaLabel, className: `${baseClassName}__clear-button ${baseClassName}__button`, disabled, onClick: clear, onFocus: stopPropagation, type: "button", children: typeof clearIcon === "function" ? React.createElement(clearIcon) : clearIcon }), calendarIcon !== null && !disableCalendar && require$$0.jsx("button", { "aria-expanded": isOpen || false, "aria-label": calendarAriaLabel, className: `${baseClassName}__calendar-button ${baseClassName}__button`, disabled, onClick: toggleCalendar, onFocus: stopPropagation, type: "button", children: typeof calendarIcon === "function" ? React.createElement(calendarIcon) : calendarIcon })] });
174
+ return jsxRuntime.jsxs("div", { className: `${baseClassName}__wrapper`, children: [jsxRuntime.jsx(DateInput, { ...commonProps, autoFocus, name: `${name}_from`, onChange: onChangeFrom, returnValue: "start", value: valueFrom }), jsxRuntime.jsx("span", { className: `${baseClassName}__range-divider`, children: rangeDivider }), jsxRuntime.jsx(DateInput, { ...commonProps, name: `${name}_to`, onChange: onChangeTo, returnValue: "end", value: valueTo }), clearIcon !== null && jsxRuntime.jsx("button", { "aria-label": clearAriaLabel, className: `${baseClassName}__clear-button ${baseClassName}__button`, disabled, onClick: clear, onFocus: stopPropagation, type: "button", children: typeof clearIcon === "function" ? React.createElement(clearIcon) : clearIcon }), calendarIcon !== null && !disableCalendar && jsxRuntime.jsx("button", { "aria-expanded": isOpen || false, "aria-label": calendarAriaLabel, className: `${baseClassName}__calendar-button ${baseClassName}__button`, disabled, onClick: toggleCalendar, onFocus: stopPropagation, type: "button", children: typeof calendarIcon === "function" ? React.createElement(calendarIcon) : calendarIcon })] });
924
175
  }
925
176
  function renderCalendar() {
926
177
  if (isOpen === null || disableCalendar) {
@@ -928,9 +179,9 @@ function DateRangePicker(props) {
928
179
  }
929
180
  const { calendarProps, portalContainer, value: value2 } = props;
930
181
  const className2 = `${baseClassName}__calendar`;
931
- const classNames = clsx.clsx(className2, `${className2}--${isOpen ? "open" : "closed"}`);
932
- const calendar = require$$0.jsx(Calendar, { locale, maxDate, maxDetail, minDate, onChange: (value3) => onChange(value3), selectRange: true, value: value2, ...calendarProps });
933
- return portalContainer ? ReactDOM.createPortal(require$$0.jsx("div", { ref: calendarWrapper, className: classNames, children: calendar }), portalContainer) : require$$0.jsx(styledComponents_browser_esm.Fit, { children: require$$0.jsx("div", { ref: (ref) => {
182
+ const classNames = clsx(className2, `${className2}--${isOpen ? "open" : "closed"}`);
183
+ const calendar = jsxRuntime.jsx(Calendar, { locale, maxDate, maxDetail, minDate, onChange: (value3) => onChange(value3), selectRange: true, value: value2, ...calendarProps });
184
+ return portalContainer ? ReactDOM.createPortal(jsxRuntime.jsx("div", { ref: calendarWrapper, className: classNames, children: calendar }), portalContainer) : jsxRuntime.jsx(styledComponents_browser_esm.Fit, { children: jsxRuntime.jsx("div", { ref: (ref) => {
934
185
  if (ref && !isOpen) {
935
186
  ref.removeAttribute("style");
936
187
  }
@@ -943,7 +194,7 @@ function DateRangePicker(props) {
943
194
  );
944
195
  return (
945
196
  // biome-ignore lint/a11y/noStaticElementInteractions: False positive caused by non interactive wrapper listening for bubbling events
946
- require$$0.jsxs("div", { className: clsx.clsx(baseClassName, `${baseClassName}--${isOpen ? "open" : "closed"}`, `${baseClassName}--${disabled ? "disabled" : "enabled"}`, className), "data-testid": dataTestid, id, ...eventProps, onFocus, ref: wrapper, children: [renderInputs(), renderCalendar()] })
197
+ jsxRuntime.jsxs("div", { className: clsx(baseClassName, `${baseClassName}--${isOpen ? "open" : "closed"}`, `${baseClassName}--${disabled ? "disabled" : "enabled"}`, className), "data-testid": dataTestid, id, ...eventProps, onFocus, ref: wrapper, children: [renderInputs(), renderCalendar()] })
947
198
  );
948
199
  }
949
200
  function FaCalendar(props) {
@@ -953,10 +204,10 @@ function MdOutlineClose(props) {
953
204
  return iconBase.GenIcon({ "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "fill": "none", "d": "M0 0h24v24H0V0z" }, "child": [] }, { "tag": "path", "attr": { "d": "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" }, "child": [] }] })(props);
954
205
  }
955
206
  const IconCalendar = ({ disabled, error }) => {
956
- return /* @__PURE__ */ require$$0.jsx(
207
+ return /* @__PURE__ */ jsxRuntime.jsx(
957
208
  FaCalendar,
958
209
  {
959
- className: clsx.clsx({
210
+ className: clsx({
960
211
  "fill-gray-400": disabled,
961
212
  "fill-gray-500": !disabled && !error,
962
213
  "fill-red-500": error && !disabled
@@ -965,10 +216,10 @@ const IconCalendar = ({ disabled, error }) => {
965
216
  );
966
217
  };
967
218
  const IconCloseCalendar = ({ disabled, error, onClick }) => {
968
- return /* @__PURE__ */ require$$0.jsx(
219
+ return /* @__PURE__ */ jsxRuntime.jsx(
969
220
  MdOutlineClose,
970
221
  {
971
- className: clsx.clsx("w-5 h-5", {
222
+ className: clsx("w-5 h-5", {
972
223
  "fill-gray-400": disabled,
973
224
  "fill-gray-500": !disabled && !error,
974
225
  "fill-red-500": error && !disabled
@@ -1415,7 +666,7 @@ const CalendarPicker = ({
1415
666
  }) => {
1416
667
  const [show, setShow] = React.useState(showCalendar);
1417
668
  const inputRef = React.useRef(0);
1418
- const uui = v4.v4();
669
+ const uui = uuid.v4();
1419
670
  const inputId = React.useId();
1420
671
  const resolvedId = id || inputId;
1421
672
  const isInvalid = !disabled && !!error && touched;
@@ -1455,14 +706,14 @@ const CalendarPicker = ({
1455
706
  const labelClass = utils.cn("form-control-label block font-normal text-sm text-foreground mb-1", {
1456
707
  "text-danger": isInvalid
1457
708
  });
1458
- return /* @__PURE__ */ require$$0.jsx(
1459
- PopoverExports.Popover,
709
+ return /* @__PURE__ */ jsxRuntime.jsx(
710
+ reactTinyPopover.Popover,
1460
711
  {
1461
712
  isOpen: show,
1462
713
  containerStyle: {
1463
714
  zIndex: "100"
1464
715
  },
1465
- content: /* @__PURE__ */ require$$0.jsxs(
716
+ content: /* @__PURE__ */ jsxRuntime.jsxs(
1466
717
  CalendarStyle,
1467
718
  {
1468
719
  color,
@@ -1472,10 +723,10 @@ const CalendarPicker = ({
1472
723
  children: [
1473
724
  loading ? (
1474
725
  /* <Loading size="sm" color="secondary" /> */
1475
- /* @__PURE__ */ require$$0.jsx("p", { children: "loading" })
726
+ /* @__PURE__ */ jsxRuntime.jsx("p", { children: "loading" })
1476
727
  ) : null,
1477
- /* @__PURE__ */ require$$0.jsxs("div", { className: "w-full relative flex flex-col gap-2", children: [
1478
- /* @__PURE__ */ require$$0.jsx(
728
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full relative flex flex-col gap-2", children: [
729
+ /* @__PURE__ */ jsxRuntime.jsx(
1479
730
  Calendar,
1480
731
  {
1481
732
  value,
@@ -1488,14 +739,14 @@ const CalendarPicker = ({
1488
739
  tileDisabled,
1489
740
  selectRange: type === "date-range-picker",
1490
741
  returnValue: type === "date-range-picker" ? "range" : "start",
1491
- prevLabel: /* @__PURE__ */ require$$0.jsx(FaArrowLeft, { className: "w-4 h-5" }),
1492
- nextLabel: /* @__PURE__ */ require$$0.jsx(FaArrowRight, { className: "w-4 h-5" }),
742
+ prevLabel: /* @__PURE__ */ jsxRuntime.jsx(FaArrowLeft, { className: "w-4 h-5" }),
743
+ nextLabel: /* @__PURE__ */ jsxRuntime.jsx(FaArrowRight, { className: "w-4 h-5" }),
1493
744
  tileContent
1494
745
  }
1495
746
  ),
1496
- /* @__PURE__ */ require$$0.jsxs("div", { className: "flex items-center justify-center gap-x-4 p-3 w-full", children: [
1497
- /* @__PURE__ */ require$$0.jsx(button.Button, { onClick: handleChangeToDay, color, className: "flex-1", children: "Hoy" }),
1498
- /* @__PURE__ */ require$$0.jsx(button.Button, { color: "default", variant: "bordered", className: "flex-1", onClick: () => setShow(false), children: "Cerrar" })
747
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-x-4 p-3 w-full", children: [
748
+ /* @__PURE__ */ jsxRuntime.jsx(button.Button, { onClick: handleChangeToDay, color, className: "flex-1", children: "Hoy" }),
749
+ /* @__PURE__ */ jsxRuntime.jsx(button.Button, { color: "default", variant: "bordered", className: "flex-1", onClick: () => setShow(false), children: "Cerrar" })
1499
750
  ] })
1500
751
  ] })
1501
752
  ]
@@ -1505,11 +756,11 @@ const CalendarPicker = ({
1505
756
  reposition: true,
1506
757
  onClickOutside: handleCloseCalendar,
1507
758
  clickOutsideCapture: true,
1508
- children: /* @__PURE__ */ require$$0.jsxs(
759
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
1509
760
  CalendarStyle,
1510
761
  {
1511
762
  color,
1512
- className: bundleMjs.twMerge(classNameContainer, "relative"),
763
+ className: tailwindMerge.twMerge(classNameContainer, "relative"),
1513
764
  onClick: handleOpenCalendar,
1514
765
  showcalendar: show.toString(),
1515
766
  id: uui,
@@ -1517,24 +768,24 @@ const CalendarPicker = ({
1517
768
  error,
1518
769
  size,
1519
770
  children: [
1520
- label && /* @__PURE__ */ require$$0.jsxs("label", { htmlFor: resolvedId, className: labelClass, children: [
771
+ label && /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: resolvedId, className: labelClass, children: [
1521
772
  label,
1522
773
  " ",
1523
- required && /* @__PURE__ */ require$$0.jsx("span", { className: "text-danger", children: "*" })
774
+ required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-danger", children: "*" })
1524
775
  ] }),
1525
- type === "date-picker" ? /* @__PURE__ */ require$$0.jsx(
776
+ type === "date-picker" ? /* @__PURE__ */ jsxRuntime.jsx(
1526
777
  DatePicker,
1527
778
  {
1528
779
  id: resolvedId,
1529
780
  value,
1530
781
  onChange,
1531
- calendarIcon: /* @__PURE__ */ require$$0.jsx(IconCalendar, { disabled, error }),
782
+ calendarIcon: /* @__PURE__ */ jsxRuntime.jsx(IconCalendar, { disabled, error }),
1532
783
  shouldOpenCalendar: () => false,
1533
- className: bundleMjs.twMerge("w-full h-input-default", className),
784
+ className: tailwindMerge.twMerge("w-full h-input-default", className),
1534
785
  format,
1535
786
  locale,
1536
787
  showLeadingZeros: true,
1537
- clearIcon: /* @__PURE__ */ require$$0.jsx(IconCloseCalendar, { disabled, error, onClick: handleClearCalendar }),
788
+ clearIcon: /* @__PURE__ */ jsxRuntime.jsx(IconCloseCalendar, { disabled, error, onClick: handleClearCalendar }),
1538
789
  minDate,
1539
790
  maxDate,
1540
791
  disabled,
@@ -1547,19 +798,19 @@ const CalendarPicker = ({
1547
798
  monthPlaceholder: "MM",
1548
799
  yearPlaceholder: "YYYY"
1549
800
  }
1550
- ) : /* @__PURE__ */ require$$0.jsx(
801
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1551
802
  DateRangePicker,
1552
803
  {
1553
804
  id: resolvedId,
1554
805
  value,
1555
806
  onChange,
1556
- calendarIcon: /* @__PURE__ */ require$$0.jsx(IconCalendar, { disabled, error }),
807
+ calendarIcon: /* @__PURE__ */ jsxRuntime.jsx(IconCalendar, { disabled, error }),
1557
808
  shouldOpenCalendar: () => false,
1558
- className: bundleMjs.twMerge("w-full", className),
809
+ className: tailwindMerge.twMerge("w-full", className),
1559
810
  format,
1560
811
  locale,
1561
812
  showLeadingZeros: true,
1562
- clearIcon: /* @__PURE__ */ require$$0.jsx(IconCloseCalendar, { disabled, error, onClick: handleClearCalendar }),
813
+ clearIcon: /* @__PURE__ */ jsxRuntime.jsx(IconCloseCalendar, { disabled, error, onClick: handleClearCalendar }),
1563
814
  minDate,
1564
815
  maxDate,
1565
816
  disabled,
@@ -1572,7 +823,7 @@ const CalendarPicker = ({
1572
823
  yearPlaceholder: "YYYY"
1573
824
  }
1574
825
  ),
1575
- !disabled && error ? /* @__PURE__ */ require$$0.jsx(labelError.LabelError, { text: error }) : null
826
+ !disabled && error ? /* @__PURE__ */ jsxRuntime.jsx(labelError.LabelError, { text: error }) : null
1576
827
  ]
1577
828
  }
1578
829
  )