lizaui 9.0.2 → 9.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/button/index.cjs.js +1 -1
- package/dist/button/index.es.js +1 -1
- package/dist/calendar/index.cjs.js +64 -800
- package/dist/calendar/index.cjs.js.map +1 -1
- package/dist/calendar/index.es.js +29 -765
- package/dist/calendar/index.es.js.map +1 -1
- package/dist/checkbox/index.cjs.js +1 -1
- package/dist/checkbox/index.es.js +1 -1
- package/dist/chip/index.cjs.js +9 -9
- package/dist/chip/index.cjs.js.map +1 -1
- package/dist/chip/index.es.js +2 -2
- package/dist/chunks/{button-MKhaqe0K.js → button-B0fpJrMg.js} +3 -3
- package/dist/chunks/{button-MKhaqe0K.js.map → button-B0fpJrMg.js.map} +1 -1
- package/dist/chunks/{button-BKebd9mx.js → button-d5z8H59K.js} +13 -13
- package/dist/chunks/{button-BKebd9mx.js.map → button-d5z8H59K.js.map} +1 -1
- package/dist/chunks/{checkbox-DpLEjjb9.js → checkbox-C1Sssumg.js} +3 -3
- package/dist/chunks/{checkbox-DpLEjjb9.js.map → checkbox-C1Sssumg.js.map} +1 -1
- package/dist/chunks/{checkbox-BoxBfskJ.js → checkbox-ovjcc7jF.js} +15 -15
- package/dist/chunks/{checkbox-BoxBfskJ.js.map → checkbox-ovjcc7jF.js.map} +1 -1
- package/dist/chunks/{index-BHpUy2Ix.js → index-CEKmKomA.js} +2 -2
- package/dist/chunks/{index-BHpUy2Ix.js.map → index-CEKmKomA.js.map} +1 -1
- package/dist/chunks/{index-CATvGmak.js → index-C_sOsPRt.js} +5 -5
- package/dist/chunks/{index-CATvGmak.js.map → index-C_sOsPRt.js.map} +1 -1
- package/dist/chunks/{index-CNDtGisb.js → index-DaMyCNJ8.js} +2 -2
- package/dist/chunks/{index-CNDtGisb.js.map → index-DaMyCNJ8.js.map} +1 -1
- package/dist/chunks/{label-error-DkVGsF5w.js → label-error-BTCuInp7.js} +2 -2
- package/dist/chunks/{label-error-DkVGsF5w.js.map → label-error-BTCuInp7.js.map} +1 -1
- package/dist/chunks/label-error-C8lIsfXu.js +9 -0
- package/dist/chunks/{label-error-2QXnvbxJ.js.map → label-error-C8lIsfXu.js.map} +1 -1
- package/dist/chunks/{ripple-CTAKSntE.js → ripple-Bm6QamOy.js} +4 -4
- package/dist/chunks/{ripple-CTAKSntE.js.map → ripple-Bm6QamOy.js.map} +1 -1
- package/dist/chunks/{scroll-area-CNEU8oOo.js → scroll-area-C0NhSIO2.js} +31 -31
- package/dist/chunks/{scroll-area-CNEU8oOo.js.map → scroll-area-C0NhSIO2.js.map} +1 -1
- package/dist/chunks/{scroll-area-3h3tgoqp.js → scroll-area-JgKF61tc.js} +3 -3
- package/dist/chunks/{scroll-area-3h3tgoqp.js.map → scroll-area-JgKF61tc.js.map} +1 -1
- package/dist/chunks/{select-BW-plZA9.js → select-DGnc8VJi.js} +73 -73
- package/dist/chunks/{select-BW-plZA9.js.map → select-DGnc8VJi.js.map} +1 -1
- package/dist/chunks/{select-wGmz50gN.js → select-Dpyj5dUk.js} +3 -3
- package/dist/chunks/{select-wGmz50gN.js.map → select-Dpyj5dUk.js.map} +1 -1
- package/dist/chunks/{styled-components.browser.esm-DbYXI9h_.js → styled-components.browser.esm-CPR7VH_x.js} +3 -3
- package/dist/chunks/{styled-components.browser.esm-DbYXI9h_.js.map → styled-components.browser.esm-CPR7VH_x.js.map} +1 -1
- package/dist/chunks/{textarea-CPHr2RpC.js → textarea-D2_KC-J4.js} +98 -98
- package/dist/chunks/{textarea-CPHr2RpC.js.map → textarea-D2_KC-J4.js.map} +1 -1
- package/dist/chunks/{textarea-CXQO1MMF.js → textarea-_HQpXiCX.js} +8 -8
- package/dist/chunks/{textarea-CXQO1MMF.js.map → textarea-_HQpXiCX.js.map} +1 -1
- package/dist/chunks/{tooltip-05Mv2hjx.js → tooltip-GGFk8ALK.js} +15 -15
- package/dist/chunks/{tooltip-05Mv2hjx.js.map → tooltip-GGFk8ALK.js.map} +1 -1
- package/dist/chunks/{tooltip-D3J0_sJU.js → tooltip-JwIbppjO.js} +3 -3
- package/dist/chunks/{tooltip-D3J0_sJU.js.map → tooltip-JwIbppjO.js.map} +1 -1
- package/dist/chunks/tv-B0li4IsO.js +41 -0
- package/dist/chunks/tv-B0li4IsO.js.map +1 -0
- package/dist/chunks/tv-CGbWb8zP.js +40 -0
- package/dist/chunks/tv-CGbWb8zP.js.map +1 -0
- package/dist/chunks/utils-H80jjgLf.js +9 -0
- package/dist/chunks/{utils-BnY7EXd5.js.map → utils-H80jjgLf.js.map} +1 -1
- package/dist/chunks/utils-ij3i9zTT.js +8 -0
- package/dist/chunks/{utils-nIKS3WsJ.js.map → utils-ij3i9zTT.js.map} +1 -1
- package/dist/components/calendar/date-picker/date-picker.d.ts +1 -1
- package/dist/components/calendar/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/calendar/date-picker/date-picker.style.d.ts +1 -0
- package/dist/components/calendar/date-picker/date-picker.style.d.ts.map +1 -1
- package/dist/components/calendar/date-picker/interface/date-picker.interface.d.ts +1 -0
- package/dist/components/calendar/date-picker/interface/date-picker.interface.d.ts.map +1 -1
- package/dist/divider/index.cjs.js +4 -4
- package/dist/divider/index.es.js +1 -1
- package/dist/modal/index.cjs.js +17 -17
- package/dist/modal/index.es.js +3 -3
- package/dist/pagination/index.cjs.js +29 -29
- package/dist/pagination/index.cjs.js.map +1 -1
- package/dist/pagination/index.es.js +5 -5
- package/dist/phone-input/index.cjs.js +32 -31
- package/dist/phone-input/index.cjs.js.map +1 -1
- package/dist/phone-input/index.es.js +7 -6
- package/dist/phone-input/index.es.js.map +1 -1
- package/dist/ripple/index.cjs.js +1 -1
- package/dist/select-input/index.cjs.js +39 -39
- package/dist/select-input/index.cjs.js.map +1 -1
- package/dist/select-input/index.es.js +5 -5
- package/dist/table/index.cjs.js +44 -44
- package/dist/table/index.cjs.js.map +1 -1
- package/dist/table/index.es.js +5 -5
- package/dist/time-input/index.cjs.js +53 -53
- package/dist/time-input/index.cjs.js.map +1 -1
- package/dist/time-input/index.es.js +5 -5
- package/dist/tooltip/index.cjs.js +1 -1
- package/dist/tooltip/index.es.js +1 -1
- package/dist/ui/index.cjs.js +324 -324
- package/dist/ui/index.es.js +10 -10
- package/package.json +8 -2
- package/dist/chunks/bundle-mjs-BWLS65yY.js +0 -3003
- package/dist/chunks/bundle-mjs-BWLS65yY.js.map +0 -1
- package/dist/chunks/bundle-mjs-DB1IOBLD.js +0 -3004
- package/dist/chunks/bundle-mjs-DB1IOBLD.js.map +0 -1
- package/dist/chunks/clsx-CBkIpawf.js +0 -16
- package/dist/chunks/clsx-CBkIpawf.js.map +0 -1
- package/dist/chunks/clsx-DgYk2OaC.js +0 -17
- package/dist/chunks/clsx-DgYk2OaC.js.map +0 -1
- package/dist/chunks/label-error-2QXnvbxJ.js +0 -9
- package/dist/chunks/tv-C-wpiWwh.js +0 -274
- package/dist/chunks/tv-C-wpiWwh.js.map +0 -1
- package/dist/chunks/tv-C4gJMNo3.js +0 -275
- package/dist/chunks/tv-C4gJMNo3.js.map +0 -1
- package/dist/chunks/utils-BnY7EXd5.js +0 -9
- package/dist/chunks/utils-nIKS3WsJ.js +0 -8
- package/dist/chunks/v4-BQ42ZlDJ.js +0 -39
- package/dist/chunks/v4-BQ42ZlDJ.js.map +0 -1
- package/dist/chunks/v4-C3omdoBX.js +0 -40
- 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
|
|
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
|
|
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
|
|
12
|
-
const
|
|
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
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
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 =
|
|
786
|
-
const ClearIcon =
|
|
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
|
|
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
|
|
932
|
-
const calendar =
|
|
933
|
-
return portalContainer ? ReactDOM.createPortal(
|
|
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
|
-
|
|
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__ */
|
|
207
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
957
208
|
FaCalendar,
|
|
958
209
|
{
|
|
959
|
-
className: 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__ */
|
|
219
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
969
220
|
MdOutlineClose,
|
|
970
221
|
{
|
|
971
|
-
className: clsx
|
|
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
|
|
@@ -1141,7 +392,17 @@ const CalendarStyle = styledComponents_browser_esm.dt.div`
|
|
|
1141
392
|
|
|
1142
393
|
/* =========================== estilos para react-calendar ================== */
|
|
1143
394
|
.react-calendar {
|
|
1144
|
-
|
|
395
|
+
${({ showdoubleview, widthcalendar }) => {
|
|
396
|
+
if (showdoubleview === "true") {
|
|
397
|
+
return styledComponents_browser_esm.lt`
|
|
398
|
+
width: auto;
|
|
399
|
+
`;
|
|
400
|
+
} else {
|
|
401
|
+
return styledComponents_browser_esm.lt`
|
|
402
|
+
width: ${`${widthcalendar}px`};
|
|
403
|
+
`;
|
|
404
|
+
}
|
|
405
|
+
}}
|
|
1145
406
|
border: none;
|
|
1146
407
|
padding: 12px;
|
|
1147
408
|
font-family: var(--font-family-base);
|
|
@@ -1384,7 +645,7 @@ const CalendarStyle = styledComponents_browser_esm.dt.div`
|
|
|
1384
645
|
const CalendarPicker = ({
|
|
1385
646
|
id,
|
|
1386
647
|
value,
|
|
1387
|
-
showDoubleView,
|
|
648
|
+
showDoubleView = false,
|
|
1388
649
|
classNameContainer,
|
|
1389
650
|
className,
|
|
1390
651
|
color = "primary",
|
|
@@ -1411,17 +672,18 @@ const CalendarPicker = ({
|
|
|
1411
672
|
onBlur,
|
|
1412
673
|
type = "date-picker",
|
|
1413
674
|
size = "md",
|
|
1414
|
-
tileContent = null
|
|
675
|
+
tileContent = null,
|
|
676
|
+
showActionButtons = true
|
|
1415
677
|
}) => {
|
|
1416
678
|
const [show, setShow] = React.useState(showCalendar);
|
|
1417
679
|
const inputRef = React.useRef(0);
|
|
1418
|
-
const uui =
|
|
680
|
+
const uui = uuid.v4();
|
|
1419
681
|
const inputId = React.useId();
|
|
1420
682
|
const resolvedId = id || inputId;
|
|
1421
683
|
const isInvalid = !disabled && !!error && touched;
|
|
1422
684
|
React.useEffect(() => {
|
|
1423
685
|
const element = document.getElementById(uui);
|
|
1424
|
-
if (element) {
|
|
686
|
+
if (element && !showDoubleView) {
|
|
1425
687
|
if (widthCalendar) inputRef.current = widthCalendar;
|
|
1426
688
|
else inputRef.current = element.clientWidth;
|
|
1427
689
|
}
|
|
@@ -1455,27 +717,28 @@ const CalendarPicker = ({
|
|
|
1455
717
|
const labelClass = utils.cn("form-control-label block font-normal text-sm text-foreground mb-1", {
|
|
1456
718
|
"text-danger": isInvalid
|
|
1457
719
|
});
|
|
1458
|
-
return /* @__PURE__ */
|
|
1459
|
-
|
|
720
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
721
|
+
reactTinyPopover.Popover,
|
|
1460
722
|
{
|
|
1461
723
|
isOpen: show,
|
|
1462
724
|
containerStyle: {
|
|
1463
725
|
zIndex: "100"
|
|
1464
726
|
},
|
|
1465
|
-
content: /* @__PURE__ */
|
|
727
|
+
content: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1466
728
|
CalendarStyle,
|
|
1467
729
|
{
|
|
1468
730
|
color,
|
|
1469
731
|
showcalendar: show.toString(),
|
|
1470
732
|
widthcalendar: inputRef.current,
|
|
733
|
+
showdoubleview: showDoubleView.toString(),
|
|
1471
734
|
className: "shadow-medium bg-content1 rounded-md",
|
|
1472
735
|
children: [
|
|
1473
736
|
loading ? (
|
|
1474
737
|
/* <Loading size="sm" color="secondary" /> */
|
|
1475
|
-
/* @__PURE__ */
|
|
738
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "loading" })
|
|
1476
739
|
) : null,
|
|
1477
|
-
/* @__PURE__ */
|
|
1478
|
-
/* @__PURE__ */
|
|
740
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full relative flex flex-col gap-2", children: [
|
|
741
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1479
742
|
Calendar,
|
|
1480
743
|
{
|
|
1481
744
|
value,
|
|
@@ -1488,14 +751,14 @@ const CalendarPicker = ({
|
|
|
1488
751
|
tileDisabled,
|
|
1489
752
|
selectRange: type === "date-range-picker",
|
|
1490
753
|
returnValue: type === "date-range-picker" ? "range" : "start",
|
|
1491
|
-
prevLabel: /* @__PURE__ */
|
|
1492
|
-
nextLabel: /* @__PURE__ */
|
|
754
|
+
prevLabel: /* @__PURE__ */ jsxRuntime.jsx(FaArrowLeft, { className: "w-4 h-5" }),
|
|
755
|
+
nextLabel: /* @__PURE__ */ jsxRuntime.jsx(FaArrowRight, { className: "w-4 h-5" }),
|
|
1493
756
|
tileContent
|
|
1494
757
|
}
|
|
1495
758
|
),
|
|
1496
|
-
/* @__PURE__ */
|
|
1497
|
-
/* @__PURE__ */
|
|
1498
|
-
/* @__PURE__ */
|
|
759
|
+
showActionButtons && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-x-4 p-3 w-full", children: [
|
|
760
|
+
/* @__PURE__ */ jsxRuntime.jsx(button.Button, { onClick: handleChangeToDay, color, className: "flex-1", children: "Hoy" }),
|
|
761
|
+
/* @__PURE__ */ jsxRuntime.jsx(button.Button, { color: "default", variant: "bordered", className: "flex-1", onClick: () => setShow(false), children: "Cerrar" })
|
|
1499
762
|
] })
|
|
1500
763
|
] })
|
|
1501
764
|
]
|
|
@@ -1505,36 +768,37 @@ const CalendarPicker = ({
|
|
|
1505
768
|
reposition: true,
|
|
1506
769
|
onClickOutside: handleCloseCalendar,
|
|
1507
770
|
clickOutsideCapture: true,
|
|
1508
|
-
children: /* @__PURE__ */
|
|
771
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1509
772
|
CalendarStyle,
|
|
1510
773
|
{
|
|
1511
774
|
color,
|
|
1512
|
-
className:
|
|
775
|
+
className: tailwindMerge.twMerge(classNameContainer, "relative"),
|
|
1513
776
|
onClick: handleOpenCalendar,
|
|
1514
777
|
showcalendar: show.toString(),
|
|
1515
778
|
id: uui,
|
|
1516
779
|
widthcalendar: inputRef.current,
|
|
780
|
+
showdoubleview: showDoubleView.toString(),
|
|
1517
781
|
error,
|
|
1518
782
|
size,
|
|
1519
783
|
children: [
|
|
1520
|
-
label && /* @__PURE__ */
|
|
784
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: resolvedId, className: labelClass, children: [
|
|
1521
785
|
label,
|
|
1522
786
|
" ",
|
|
1523
|
-
required && /* @__PURE__ */
|
|
787
|
+
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-danger", children: "*" })
|
|
1524
788
|
] }),
|
|
1525
|
-
type === "date-picker" ? /* @__PURE__ */
|
|
789
|
+
type === "date-picker" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1526
790
|
DatePicker,
|
|
1527
791
|
{
|
|
1528
792
|
id: resolvedId,
|
|
1529
793
|
value,
|
|
1530
794
|
onChange,
|
|
1531
|
-
calendarIcon: /* @__PURE__ */
|
|
795
|
+
calendarIcon: /* @__PURE__ */ jsxRuntime.jsx(IconCalendar, { disabled, error }),
|
|
1532
796
|
shouldOpenCalendar: () => false,
|
|
1533
|
-
className:
|
|
797
|
+
className: tailwindMerge.twMerge("w-full h-input-default", className),
|
|
1534
798
|
format,
|
|
1535
799
|
locale,
|
|
1536
800
|
showLeadingZeros: true,
|
|
1537
|
-
clearIcon: /* @__PURE__ */
|
|
801
|
+
clearIcon: /* @__PURE__ */ jsxRuntime.jsx(IconCloseCalendar, { disabled, error, onClick: handleClearCalendar }),
|
|
1538
802
|
minDate,
|
|
1539
803
|
maxDate,
|
|
1540
804
|
disabled,
|
|
@@ -1547,19 +811,19 @@ const CalendarPicker = ({
|
|
|
1547
811
|
monthPlaceholder: "MM",
|
|
1548
812
|
yearPlaceholder: "YYYY"
|
|
1549
813
|
}
|
|
1550
|
-
) : /* @__PURE__ */
|
|
814
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1551
815
|
DateRangePicker,
|
|
1552
816
|
{
|
|
1553
817
|
id: resolvedId,
|
|
1554
818
|
value,
|
|
1555
819
|
onChange,
|
|
1556
|
-
calendarIcon: /* @__PURE__ */
|
|
820
|
+
calendarIcon: /* @__PURE__ */ jsxRuntime.jsx(IconCalendar, { disabled, error }),
|
|
1557
821
|
shouldOpenCalendar: () => false,
|
|
1558
|
-
className:
|
|
822
|
+
className: tailwindMerge.twMerge("w-full", className),
|
|
1559
823
|
format,
|
|
1560
824
|
locale,
|
|
1561
825
|
showLeadingZeros: true,
|
|
1562
|
-
clearIcon: /* @__PURE__ */
|
|
826
|
+
clearIcon: /* @__PURE__ */ jsxRuntime.jsx(IconCloseCalendar, { disabled, error, onClick: handleClearCalendar }),
|
|
1563
827
|
minDate,
|
|
1564
828
|
maxDate,
|
|
1565
829
|
disabled,
|
|
@@ -1572,7 +836,7 @@ const CalendarPicker = ({
|
|
|
1572
836
|
yearPlaceholder: "YYYY"
|
|
1573
837
|
}
|
|
1574
838
|
),
|
|
1575
|
-
!disabled && error ? /* @__PURE__ */
|
|
839
|
+
!disabled && error ? /* @__PURE__ */ jsxRuntime.jsx(labelError.LabelError, { text: error }) : null
|
|
1576
840
|
]
|
|
1577
841
|
}
|
|
1578
842
|
)
|