@northlight/ui 2.34.0 → 2.34.2
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/es/northlight.d.ts +1 -1
- package/dist/es/northlight.js +378 -378
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +577 -577
- package/dist/umd/northlight.cjs.map +1 -1
- package/dist/umd/northlight.min.cjs +1 -1
- package/dist/umd/northlight.min.cjs.map +1 -1
- package/package.json +2 -2
package/dist/umd/northlight.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@chakra-ui/react'), require('react'), require('chakra-react-select'), require('ramda'), require('@react-aria/focus'), require('react-hook-form'), require('@chakra-ui/system'), require('@northlight/tokens'), require('@chakra-ui/theme-tools'), require('@northlight/icons'), require('@hookform/resolvers/joi'), require('@react-aria/checkbox'), require('@react-aria/radio'), require('@react-aria/utils'), require('@react-stately/radio'), require('@react-stately/checkbox'), require('@react-aria/datepicker'), require('@react-stately/datepicker'), require('@internationalized/date'), require('@react-aria/button'), require('@react-aria/i18n'), require('@react-stately/calendar'), require('@react-aria/calendar'), require('react-router-dom'), require('@chakra-ui/clickable'), require('framer-motion'), require('@dnd-kit/core'), require('@dnd-kit/utilities'), require('@dnd-kit/sortable'), require('@dnd-kit/modifiers'), require('react-window'), require('react-virtualized-auto-sizer'), require('react-avatar-editor'), require('react-number-format'), require('react-input-mask'), require('yafu')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['exports', '@chakra-ui/react', 'react', 'chakra-react-select', 'ramda', '@react-aria/focus', 'react-hook-form', '@chakra-ui/system', '@northlight/tokens', '@chakra-ui/theme-tools', '@northlight/icons', '@hookform/resolvers/joi', '@react-aria/checkbox', '@react-aria/radio', '@react-aria/utils', '@react-stately/radio', '@react-stately/checkbox', '@react-aria/datepicker', '@react-stately/datepicker', '@internationalized/date', '@react-aria/button', '@react-aria/i18n', '@react-stately/calendar', '@react-aria/calendar', 'react-router-dom', '@chakra-ui/clickable', 'framer-motion', '@dnd-kit/core', '@dnd-kit/utilities', '@dnd-kit/sortable', '@dnd-kit/modifiers', 'react-window', 'react-virtualized-auto-sizer', 'react-avatar-editor', 'react-number-format', 'react-input-mask', 'yafu'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.northlight = {}, global.react, global.React
|
|
5
|
-
})(this, (function (exports, react, React
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.northlight = {}, global.react, global.React, global.chakraReactSelect, global.ramda, global.focus, global.reactHookForm, global.system, global.tokens, global.themeTools, global.icons, global.joi, global.checkbox$1, global.radio$1, global.utils, global.radio, global.checkbox, global.datepicker, global.datepicker$1, global.date, global.button, global.i18n, global.calendar$1, global.calendar, global.reactRouterDom, global.clickable, global.framerMotion, global.core, global.utilities, global.sortable, global.modifiers, global.reactWindow, global.AutoSizer, global.AvatarEditor, global.reactNumberFormat, global.InputMask, global.yafu));
|
|
5
|
+
})(this, (function (exports, react, React, chakraReactSelect, ramda, focus, reactHookForm, system, tokens, themeTools, icons, joi, checkbox$1, radio$1, utils, radio, checkbox, datepicker, datepicker$1, date, button, i18n, calendar$1, calendar, reactRouterDom, clickable, framerMotion, core, utilities, sortable, modifiers, reactWindow, AutoSizer, AvatarEditor, reactNumberFormat, InputMask, yafu) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var __defProp$2t = Object.defineProperty;
|
|
8
8
|
var __getOwnPropSymbols$2t = Object.getOwnPropertySymbols;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
}
|
|
21
21
|
return a;
|
|
22
22
|
};
|
|
23
|
-
const Accordion = (props) => /* @__PURE__ */ React
|
|
23
|
+
const Accordion = (props) => /* @__PURE__ */ React.createElement(react.Accordion, __spreadValues$2t({}, props));
|
|
24
24
|
|
|
25
25
|
var __defProp$2s = Object.defineProperty;
|
|
26
26
|
var __getOwnPropSymbols$2s = Object.getOwnPropertySymbols;
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
}
|
|
39
39
|
return a;
|
|
40
40
|
};
|
|
41
|
-
const AccordionButton = (props) => /* @__PURE__ */ React
|
|
41
|
+
const AccordionButton = (props) => /* @__PURE__ */ React.createElement(react.AccordionButton, __spreadValues$2s({}, props));
|
|
42
42
|
|
|
43
43
|
var __defProp$2r = Object.defineProperty;
|
|
44
44
|
var __getOwnPropSymbols$2r = Object.getOwnPropertySymbols;
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
}
|
|
57
57
|
return a;
|
|
58
58
|
};
|
|
59
|
-
const AccordionPanel = (props) => /* @__PURE__ */ React
|
|
59
|
+
const AccordionPanel = (props) => /* @__PURE__ */ React.createElement(react.AccordionPanel, __spreadValues$2r({}, props));
|
|
60
60
|
|
|
61
61
|
var __defProp$2q = Object.defineProperty;
|
|
62
62
|
var __getOwnPropSymbols$2q = Object.getOwnPropertySymbols;
|
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
}
|
|
75
75
|
return a;
|
|
76
76
|
};
|
|
77
|
-
const AccordionItem = (props) => /* @__PURE__ */ React
|
|
77
|
+
const AccordionItem = (props) => /* @__PURE__ */ React.createElement(react.AccordionItem, __spreadValues$2q({}, props));
|
|
78
78
|
|
|
79
79
|
const useDebounce = (value, delay) => {
|
|
80
|
-
const [debouncedValue, setDebouncedValue] = React
|
|
81
|
-
React
|
|
80
|
+
const [debouncedValue, setDebouncedValue] = React.useState(value);
|
|
81
|
+
React.useEffect(() => {
|
|
82
82
|
const handler = setTimeout(() => {
|
|
83
83
|
setDebouncedValue(value);
|
|
84
84
|
}, delay);
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
};
|
|
91
91
|
|
|
92
92
|
const useLoadingMessage = (prefix = "", delay = 300) => {
|
|
93
|
-
const [dots, setDots] = React
|
|
93
|
+
const [dots, setDots] = React.useState(".");
|
|
94
94
|
react.useInterval(() => {
|
|
95
95
|
if (dots.length === 3) {
|
|
96
96
|
setDots(".");
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
};
|
|
120
120
|
|
|
121
121
|
const useScrollToBottom = (scrollView, messages) => {
|
|
122
|
-
React
|
|
122
|
+
React.useEffect(() => {
|
|
123
123
|
const div = scrollView.current;
|
|
124
124
|
if (div) {
|
|
125
125
|
smoothScrollToBottom(div);
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
isMulti = false,
|
|
203
203
|
value
|
|
204
204
|
}) => {
|
|
205
|
-
const items = React
|
|
205
|
+
const items = React.useRef(value);
|
|
206
206
|
const handleChange = (val, event) => {
|
|
207
207
|
var _a;
|
|
208
208
|
onChange(val, event);
|
|
@@ -227,12 +227,12 @@
|
|
|
227
227
|
|
|
228
228
|
const isBetween = (point, min, max) => point >= min && point <= max;
|
|
229
229
|
const useOutsideRectClick = (ref, callback) => {
|
|
230
|
-
const stateRef = React
|
|
230
|
+
const stateRef = React.useRef({
|
|
231
231
|
isPointerDown: false,
|
|
232
232
|
ignoreEmulatedMouseEvents: false
|
|
233
233
|
});
|
|
234
234
|
const state = stateRef.current;
|
|
235
|
-
React
|
|
235
|
+
React.useEffect(() => {
|
|
236
236
|
const handleMouseClick = (event) => {
|
|
237
237
|
let clientX;
|
|
238
238
|
let clientY;
|
|
@@ -303,8 +303,8 @@
|
|
|
303
303
|
};
|
|
304
304
|
|
|
305
305
|
const useDidUpdateEffect = (effect, dependencies) => {
|
|
306
|
-
const didMountRef = React
|
|
307
|
-
React
|
|
306
|
+
const didMountRef = React.useRef(false);
|
|
307
|
+
React.useEffect(() => {
|
|
308
308
|
if (didMountRef.current) {
|
|
309
309
|
effect();
|
|
310
310
|
}
|
|
@@ -409,7 +409,7 @@
|
|
|
409
409
|
}
|
|
410
410
|
return a;
|
|
411
411
|
};
|
|
412
|
-
const passPropsToChild = (child, styles) => React
|
|
412
|
+
const passPropsToChild = (child, styles) => React.isValidElement(child) ? React.cloneElement(child, __spreadValues$2p({}, styles)) : child;
|
|
413
413
|
|
|
414
414
|
var __defProp$2o = Object.defineProperty;
|
|
415
415
|
var __getOwnPropSymbols$2o = Object.getOwnPropertySymbols;
|
|
@@ -428,7 +428,7 @@
|
|
|
428
428
|
return a;
|
|
429
429
|
};
|
|
430
430
|
const getChildrenWithProps = (children, styles, predicate = ramda.T) => {
|
|
431
|
-
const childrenAsArr = React
|
|
431
|
+
const childrenAsArr = React.Children.toArray(children);
|
|
432
432
|
const childrenWithoutFocus = childrenAsArr.map((child, i) => predicate(child, i) ? passPropsToChild(child, __spreadValues$2o({}, styles)) : child);
|
|
433
433
|
return childrenWithoutFocus;
|
|
434
434
|
};
|
|
@@ -450,9 +450,9 @@
|
|
|
450
450
|
};
|
|
451
451
|
};
|
|
452
452
|
|
|
453
|
-
const CustomTheme = React
|
|
453
|
+
const CustomTheme = React.createContext("webappTheme");
|
|
454
454
|
const useCurrentTheme = () => {
|
|
455
|
-
const theme = React
|
|
455
|
+
const theme = React.useContext(CustomTheme);
|
|
456
456
|
return theme;
|
|
457
457
|
};
|
|
458
458
|
|
|
@@ -479,7 +479,7 @@
|
|
|
479
479
|
maxWidthPx = Number.MAX_SAFE_INTEGER,
|
|
480
480
|
defaultWidthPx
|
|
481
481
|
}) => {
|
|
482
|
-
const [adjustableWidth, setAdjustableWidth] = React
|
|
482
|
+
const [adjustableWidth, setAdjustableWidth] = React.useState(defaultWidthPx);
|
|
483
483
|
const resizeProps = {
|
|
484
484
|
onMouseDown: (e) => {
|
|
485
485
|
e.preventDefault();
|
|
@@ -3733,11 +3733,11 @@
|
|
|
3733
3733
|
"onError"
|
|
3734
3734
|
]);
|
|
3735
3735
|
const [borderColor] = react.useToken("border.select", ["focus"]);
|
|
3736
|
-
const [menuIsOpen, setMenuIsOpen] = React
|
|
3737
|
-
const [inputValue, setInputValue] = React
|
|
3738
|
-
const [selectedOptions, setSelectedOptions] = React
|
|
3739
|
-
const [isFocused, setIsFocused] = React
|
|
3740
|
-
React
|
|
3736
|
+
const [menuIsOpen, setMenuIsOpen] = React.useState(false);
|
|
3737
|
+
const [inputValue, setInputValue] = React.useState("");
|
|
3738
|
+
const [selectedOptions, setSelectedOptions] = React.useState(value);
|
|
3739
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
3740
|
+
React.useEffect(() => {
|
|
3741
3741
|
setSelectedOptions(value);
|
|
3742
3742
|
}, [value.length]);
|
|
3743
3743
|
const CustomSelect = chakraReactSelect.CreatableSelect;
|
|
@@ -3781,7 +3781,7 @@
|
|
|
3781
3781
|
setMenuIsOpen(true);
|
|
3782
3782
|
}
|
|
3783
3783
|
};
|
|
3784
|
-
return /* @__PURE__ */ React
|
|
3784
|
+
return /* @__PURE__ */ React.createElement(react.Box, { w: "full", "data-testid": testId }, /* @__PURE__ */ React.createElement(
|
|
3785
3785
|
CustomSelect,
|
|
3786
3786
|
__spreadValues$2g(__spreadProps$t(__spreadValues$2g({
|
|
3787
3787
|
isMulti: true,
|
|
@@ -3860,19 +3860,19 @@
|
|
|
3860
3860
|
container,
|
|
3861
3861
|
text
|
|
3862
3862
|
} = react.useMultiStyleConfig("Avatar", __spreadValues$2f({ variant, image }, rest));
|
|
3863
|
-
return /* @__PURE__ */ React
|
|
3863
|
+
return /* @__PURE__ */ React.createElement(
|
|
3864
3864
|
react.chakra.div,
|
|
3865
3865
|
__spreadValues$2f({
|
|
3866
3866
|
__css: container,
|
|
3867
3867
|
"data-testid": "organization-logo-test-id"
|
|
3868
3868
|
}, rest),
|
|
3869
|
-
image ? /* @__PURE__ */ React
|
|
3869
|
+
image ? /* @__PURE__ */ React.createElement(
|
|
3870
3870
|
react.chakra.img,
|
|
3871
3871
|
{
|
|
3872
3872
|
alt: name,
|
|
3873
3873
|
src: image
|
|
3874
3874
|
}
|
|
3875
|
-
) : /* @__PURE__ */ React
|
|
3875
|
+
) : /* @__PURE__ */ React.createElement(react.chakra.span, { __css: text }, getInitials(name))
|
|
3876
3876
|
);
|
|
3877
3877
|
};
|
|
3878
3878
|
|
|
@@ -3912,7 +3912,7 @@
|
|
|
3912
3912
|
"variant",
|
|
3913
3913
|
"children"
|
|
3914
3914
|
]);
|
|
3915
|
-
return /* @__PURE__ */ React
|
|
3915
|
+
return /* @__PURE__ */ React.createElement(react.Alert, __spreadValues$2e({ variant }, rest), children);
|
|
3916
3916
|
};
|
|
3917
3917
|
|
|
3918
3918
|
var __defProp$2d = Object.defineProperty;
|
|
@@ -3931,7 +3931,7 @@
|
|
|
3931
3931
|
}
|
|
3932
3932
|
return a;
|
|
3933
3933
|
};
|
|
3934
|
-
const AspectRatio = (props) => /* @__PURE__ */ React
|
|
3934
|
+
const AspectRatio = (props) => /* @__PURE__ */ React.createElement(react.AspectRatio, __spreadValues$2d({}, props));
|
|
3935
3935
|
|
|
3936
3936
|
var __defProp$2c = Object.defineProperty;
|
|
3937
3937
|
var __getOwnPropSymbols$2c = Object.getOwnPropertySymbols;
|
|
@@ -3973,15 +3973,15 @@
|
|
|
3973
3973
|
"color",
|
|
3974
3974
|
"boxSize"
|
|
3975
3975
|
]);
|
|
3976
|
-
const CustomIcon = As != null ? As : () => /* @__PURE__ */ React
|
|
3976
|
+
const CustomIcon = As != null ? As : () => /* @__PURE__ */ React.createElement(react.Icon, null);
|
|
3977
3977
|
const styles = react.useStyleConfig("Icon", { size, color, boxSize });
|
|
3978
|
-
return /* @__PURE__ */ React
|
|
3978
|
+
return /* @__PURE__ */ React.createElement(
|
|
3979
3979
|
react.Icon,
|
|
3980
3980
|
__spreadValues$2c({
|
|
3981
3981
|
ref,
|
|
3982
3982
|
sx: styles
|
|
3983
3983
|
}, rest),
|
|
3984
|
-
/* @__PURE__ */ React
|
|
3984
|
+
/* @__PURE__ */ React.createElement(CustomIcon, null)
|
|
3985
3985
|
);
|
|
3986
3986
|
});
|
|
3987
3987
|
|
|
@@ -3989,7 +3989,7 @@
|
|
|
3989
3989
|
notificationCount = 0
|
|
3990
3990
|
}) => {
|
|
3991
3991
|
const { badge } = react.useMultiStyleConfig("Avatar");
|
|
3992
|
-
return /* @__PURE__ */ React
|
|
3992
|
+
return /* @__PURE__ */ React.createElement(react.chakra.span, { sx: badge }, notificationCount > 999 ? "999+" : notificationCount);
|
|
3993
3993
|
};
|
|
3994
3994
|
|
|
3995
3995
|
var __defProp$2b = Object.defineProperty;
|
|
@@ -4043,21 +4043,21 @@
|
|
|
4043
4043
|
name,
|
|
4044
4044
|
bgColor
|
|
4045
4045
|
});
|
|
4046
|
-
return /* @__PURE__ */ React
|
|
4046
|
+
return /* @__PURE__ */ React.createElement(react.Box, __spreadValues$2b({ __css: container, "data-testid": "avatar-test-id" }, rest), image ? /* @__PURE__ */ React.createElement(
|
|
4047
4047
|
react.chakra.img,
|
|
4048
4048
|
{
|
|
4049
4049
|
alt: name,
|
|
4050
4050
|
src: image,
|
|
4051
4051
|
sx: userImage
|
|
4052
4052
|
}
|
|
4053
|
-
) : name ? /* @__PURE__ */ React
|
|
4053
|
+
) : name ? /* @__PURE__ */ React.createElement(react.chakra.span, { sx: text }, getInitials(name)) : /* @__PURE__ */ React.createElement(
|
|
4054
4054
|
Icon,
|
|
4055
4055
|
{
|
|
4056
4056
|
as: variant === "square" ? icons.UserSquareDuo : icons.BusinessContactDuo,
|
|
4057
4057
|
sx: icon,
|
|
4058
4058
|
"aria-label": "user-avatar"
|
|
4059
4059
|
}
|
|
4060
|
-
), notificationCount > 0 && /* @__PURE__ */ React
|
|
4060
|
+
), notificationCount > 0 && /* @__PURE__ */ React.createElement(AvatarBadge, { notificationCount }));
|
|
4061
4061
|
};
|
|
4062
4062
|
|
|
4063
4063
|
var __defProp$2a = Object.defineProperty;
|
|
@@ -4088,7 +4088,7 @@
|
|
|
4088
4088
|
}
|
|
4089
4089
|
return target;
|
|
4090
4090
|
};
|
|
4091
|
-
const H1 = React
|
|
4091
|
+
const H1 = React.forwardRef((_a, ref) => {
|
|
4092
4092
|
var _b = _a, {
|
|
4093
4093
|
children,
|
|
4094
4094
|
sx = {}
|
|
@@ -4097,7 +4097,7 @@
|
|
|
4097
4097
|
"sx"
|
|
4098
4098
|
]);
|
|
4099
4099
|
const styles = react.useStyleConfig("H1", { sx });
|
|
4100
|
-
return /* @__PURE__ */ React
|
|
4100
|
+
return /* @__PURE__ */ React.createElement(
|
|
4101
4101
|
react.Heading,
|
|
4102
4102
|
__spreadValues$2a({
|
|
4103
4103
|
as: "h1",
|
|
@@ -4136,7 +4136,7 @@
|
|
|
4136
4136
|
}
|
|
4137
4137
|
return target;
|
|
4138
4138
|
};
|
|
4139
|
-
const H2 = React
|
|
4139
|
+
const H2 = React.forwardRef((_a, ref) => {
|
|
4140
4140
|
var _b = _a, {
|
|
4141
4141
|
children,
|
|
4142
4142
|
sx = {}
|
|
@@ -4145,7 +4145,7 @@
|
|
|
4145
4145
|
"sx"
|
|
4146
4146
|
]);
|
|
4147
4147
|
const styles = react.useStyleConfig("H2", { sx });
|
|
4148
|
-
return /* @__PURE__ */ React
|
|
4148
|
+
return /* @__PURE__ */ React.createElement(
|
|
4149
4149
|
react.Heading,
|
|
4150
4150
|
__spreadValues$29({
|
|
4151
4151
|
as: "h2",
|
|
@@ -4184,7 +4184,7 @@
|
|
|
4184
4184
|
}
|
|
4185
4185
|
return target;
|
|
4186
4186
|
};
|
|
4187
|
-
const H3 = React
|
|
4187
|
+
const H3 = React.forwardRef((_a, ref) => {
|
|
4188
4188
|
var _b = _a, {
|
|
4189
4189
|
children,
|
|
4190
4190
|
sx = {}
|
|
@@ -4193,7 +4193,7 @@
|
|
|
4193
4193
|
"sx"
|
|
4194
4194
|
]);
|
|
4195
4195
|
const styles = react.useStyleConfig("H3", { sx });
|
|
4196
|
-
return /* @__PURE__ */ React
|
|
4196
|
+
return /* @__PURE__ */ React.createElement(
|
|
4197
4197
|
react.Heading,
|
|
4198
4198
|
__spreadValues$28({
|
|
4199
4199
|
as: "h3",
|
|
@@ -4232,7 +4232,7 @@
|
|
|
4232
4232
|
}
|
|
4233
4233
|
return target;
|
|
4234
4234
|
};
|
|
4235
|
-
const H4 = React
|
|
4235
|
+
const H4 = React.forwardRef((_a, ref) => {
|
|
4236
4236
|
var _b = _a, {
|
|
4237
4237
|
children,
|
|
4238
4238
|
sx = {}
|
|
@@ -4241,7 +4241,7 @@
|
|
|
4241
4241
|
"sx"
|
|
4242
4242
|
]);
|
|
4243
4243
|
const styles = react.useStyleConfig("H4", { sx });
|
|
4244
|
-
return /* @__PURE__ */ React
|
|
4244
|
+
return /* @__PURE__ */ React.createElement(
|
|
4245
4245
|
react.Heading,
|
|
4246
4246
|
__spreadValues$27({
|
|
4247
4247
|
as: "h4",
|
|
@@ -4280,7 +4280,7 @@
|
|
|
4280
4280
|
}
|
|
4281
4281
|
return target;
|
|
4282
4282
|
};
|
|
4283
|
-
const H5 = React
|
|
4283
|
+
const H5 = React.forwardRef((_a, ref) => {
|
|
4284
4284
|
var _b = _a, {
|
|
4285
4285
|
children,
|
|
4286
4286
|
sx = {}
|
|
@@ -4289,7 +4289,7 @@
|
|
|
4289
4289
|
"sx"
|
|
4290
4290
|
]);
|
|
4291
4291
|
const styles = react.useStyleConfig("H5", { sx });
|
|
4292
|
-
return /* @__PURE__ */ React
|
|
4292
|
+
return /* @__PURE__ */ React.createElement(
|
|
4293
4293
|
react.Heading,
|
|
4294
4294
|
__spreadValues$26({
|
|
4295
4295
|
as: "h5",
|
|
@@ -4328,7 +4328,7 @@
|
|
|
4328
4328
|
}
|
|
4329
4329
|
return target;
|
|
4330
4330
|
};
|
|
4331
|
-
const H6 = React
|
|
4331
|
+
const H6 = React.forwardRef((_a, ref) => {
|
|
4332
4332
|
var _b = _a, {
|
|
4333
4333
|
children,
|
|
4334
4334
|
sx = {}
|
|
@@ -4337,7 +4337,7 @@
|
|
|
4337
4337
|
"sx"
|
|
4338
4338
|
]);
|
|
4339
4339
|
const styles = react.useStyleConfig("H6", { sx });
|
|
4340
|
-
return /* @__PURE__ */ React
|
|
4340
|
+
return /* @__PURE__ */ React.createElement(
|
|
4341
4341
|
react.Heading,
|
|
4342
4342
|
__spreadValues$25({
|
|
4343
4343
|
as: "h6",
|
|
@@ -4376,7 +4376,7 @@
|
|
|
4376
4376
|
}
|
|
4377
4377
|
return target;
|
|
4378
4378
|
};
|
|
4379
|
-
const P = React
|
|
4379
|
+
const P = React.forwardRef((_a, ref) => {
|
|
4380
4380
|
var _b = _a, {
|
|
4381
4381
|
children,
|
|
4382
4382
|
variant = "16",
|
|
@@ -4387,7 +4387,7 @@
|
|
|
4387
4387
|
"sx"
|
|
4388
4388
|
]);
|
|
4389
4389
|
const styles = react.useStyleConfig("P", { variant, sx });
|
|
4390
|
-
return /* @__PURE__ */ React
|
|
4390
|
+
return /* @__PURE__ */ React.createElement(
|
|
4391
4391
|
react.Text,
|
|
4392
4392
|
__spreadValues$24({
|
|
4393
4393
|
variant,
|
|
@@ -4426,11 +4426,11 @@
|
|
|
4426
4426
|
}
|
|
4427
4427
|
return target;
|
|
4428
4428
|
};
|
|
4429
|
-
const Blockquote = React
|
|
4429
|
+
const Blockquote = React.forwardRef(
|
|
4430
4430
|
(_a, ref) => {
|
|
4431
4431
|
var _b = _a, { children, sx = {} } = _b, rest = __objRest$1F(_b, ["children", "sx"]);
|
|
4432
4432
|
const styles = react.useStyleConfig("Blockquote", { sx });
|
|
4433
|
-
return /* @__PURE__ */ React
|
|
4433
|
+
return /* @__PURE__ */ React.createElement(react.Text, __spreadValues$23({ as: "span", sx: styles, ref }, rest), children);
|
|
4434
4434
|
}
|
|
4435
4435
|
);
|
|
4436
4436
|
|
|
@@ -4462,7 +4462,7 @@
|
|
|
4462
4462
|
}
|
|
4463
4463
|
return target;
|
|
4464
4464
|
};
|
|
4465
|
-
const Capitalized = React
|
|
4465
|
+
const Capitalized = React.forwardRef((_a, ref) => {
|
|
4466
4466
|
var _b = _a, {
|
|
4467
4467
|
children,
|
|
4468
4468
|
sx = {}
|
|
@@ -4471,7 +4471,7 @@
|
|
|
4471
4471
|
"sx"
|
|
4472
4472
|
]);
|
|
4473
4473
|
const styles = react.useStyleConfig("Capitalized", { sx });
|
|
4474
|
-
return /* @__PURE__ */ React
|
|
4474
|
+
return /* @__PURE__ */ React.createElement(
|
|
4475
4475
|
react.Text,
|
|
4476
4476
|
__spreadValues$22({
|
|
4477
4477
|
as: "span",
|
|
@@ -4510,7 +4510,7 @@
|
|
|
4510
4510
|
}
|
|
4511
4511
|
return target;
|
|
4512
4512
|
};
|
|
4513
|
-
const Lead = React
|
|
4513
|
+
const Lead = React.forwardRef((_a, ref) => {
|
|
4514
4514
|
var _b = _a, {
|
|
4515
4515
|
children,
|
|
4516
4516
|
sx = {}
|
|
@@ -4519,7 +4519,7 @@
|
|
|
4519
4519
|
"sx"
|
|
4520
4520
|
]);
|
|
4521
4521
|
const styles = react.useStyleConfig("Lead", { sx });
|
|
4522
|
-
return /* @__PURE__ */ React
|
|
4522
|
+
return /* @__PURE__ */ React.createElement(
|
|
4523
4523
|
react.Text,
|
|
4524
4524
|
__spreadValues$21({
|
|
4525
4525
|
as: "span",
|
|
@@ -4558,7 +4558,7 @@
|
|
|
4558
4558
|
}
|
|
4559
4559
|
return target;
|
|
4560
4560
|
};
|
|
4561
|
-
const Small = React
|
|
4561
|
+
const Small = React.forwardRef((_a, ref) => {
|
|
4562
4562
|
var _b = _a, {
|
|
4563
4563
|
children,
|
|
4564
4564
|
sx = {}
|
|
@@ -4567,7 +4567,7 @@
|
|
|
4567
4567
|
"sx"
|
|
4568
4568
|
]);
|
|
4569
4569
|
const styles = react.useStyleConfig("Small", { sx });
|
|
4570
|
-
return /* @__PURE__ */ React
|
|
4570
|
+
return /* @__PURE__ */ React.createElement(
|
|
4571
4571
|
react.Text,
|
|
4572
4572
|
__spreadValues$20({
|
|
4573
4573
|
as: "small",
|
|
@@ -4606,7 +4606,7 @@
|
|
|
4606
4606
|
}
|
|
4607
4607
|
return target;
|
|
4608
4608
|
};
|
|
4609
|
-
const Tiny = React
|
|
4609
|
+
const Tiny = React.forwardRef((_a, ref) => {
|
|
4610
4610
|
var _b = _a, {
|
|
4611
4611
|
children,
|
|
4612
4612
|
sx = {}
|
|
@@ -4615,7 +4615,7 @@
|
|
|
4615
4615
|
"sx"
|
|
4616
4616
|
]);
|
|
4617
4617
|
const styles = react.useStyleConfig("Tiny", { sx });
|
|
4618
|
-
return /* @__PURE__ */ React
|
|
4618
|
+
return /* @__PURE__ */ React.createElement(
|
|
4619
4619
|
react.Text,
|
|
4620
4620
|
__spreadValues$1$({
|
|
4621
4621
|
as: "span",
|
|
@@ -4654,7 +4654,7 @@
|
|
|
4654
4654
|
}
|
|
4655
4655
|
return target;
|
|
4656
4656
|
};
|
|
4657
|
-
const Label = React
|
|
4657
|
+
const Label = React.forwardRef((_a, ref) => {
|
|
4658
4658
|
var _b = _a, {
|
|
4659
4659
|
children,
|
|
4660
4660
|
size = "sm",
|
|
@@ -4665,11 +4665,11 @@
|
|
|
4665
4665
|
"sx"
|
|
4666
4666
|
]);
|
|
4667
4667
|
const styles = react.useStyleConfig("Label", { sx, size });
|
|
4668
|
-
return /* @__PURE__ */ React
|
|
4668
|
+
return /* @__PURE__ */ React.createElement(
|
|
4669
4669
|
react.FormLabel,
|
|
4670
4670
|
__spreadValues$1_({
|
|
4671
4671
|
sx: styles,
|
|
4672
|
-
requiredIndicator: /* @__PURE__ */ React
|
|
4672
|
+
requiredIndicator: /* @__PURE__ */ React.createElement(react.VisuallyHidden, null),
|
|
4673
4673
|
ref
|
|
4674
4674
|
}, rest),
|
|
4675
4675
|
children
|
|
@@ -4704,11 +4704,11 @@
|
|
|
4704
4704
|
}
|
|
4705
4705
|
return target;
|
|
4706
4706
|
};
|
|
4707
|
-
const NumVal = React
|
|
4707
|
+
const NumVal = React.forwardRef(
|
|
4708
4708
|
(_a, ref) => {
|
|
4709
4709
|
var _b = _a, { children, size = "sm", sx = {} } = _b, rest = __objRest$1z(_b, ["children", "size", "sx"]);
|
|
4710
4710
|
const styles = react.useStyleConfig("NumVal", { sx, size });
|
|
4711
|
-
return /* @__PURE__ */ React
|
|
4711
|
+
return /* @__PURE__ */ React.createElement(
|
|
4712
4712
|
react.Text,
|
|
4713
4713
|
__spreadValues$1Z({
|
|
4714
4714
|
as: "span",
|
|
@@ -4736,10 +4736,10 @@
|
|
|
4736
4736
|
onChange = ramda.identity,
|
|
4737
4737
|
rect
|
|
4738
4738
|
}) => {
|
|
4739
|
-
const [max, setMax] = React
|
|
4740
|
-
const [windowState, setWindowState] = React
|
|
4741
|
-
const isLocked = React
|
|
4742
|
-
const nbrChildren = React
|
|
4739
|
+
const [max, setMax] = React.useState(ramda.isNil(rect) ? initMax : 0);
|
|
4740
|
+
const [windowState, setWindowState] = React.useState(EMPTY_WINDOW);
|
|
4741
|
+
const isLocked = React.useRef(false);
|
|
4742
|
+
const nbrChildren = React.Children.count(children);
|
|
4743
4743
|
const updateMax = () => {
|
|
4744
4744
|
if (!rect)
|
|
4745
4745
|
return;
|
|
@@ -4752,7 +4752,7 @@
|
|
|
4752
4752
|
}
|
|
4753
4753
|
};
|
|
4754
4754
|
const rectDependency = ramda.defaultTo(EMPTY_RECT, rect);
|
|
4755
|
-
React
|
|
4755
|
+
React.useEffect(updateMax, [
|
|
4756
4756
|
rectDependency.clientWidth,
|
|
4757
4757
|
rectDependency.clientHeight,
|
|
4758
4758
|
nbrChildren,
|
|
@@ -4761,7 +4761,7 @@
|
|
|
4761
4761
|
windowState.innerHeight,
|
|
4762
4762
|
initMax
|
|
4763
4763
|
]);
|
|
4764
|
-
React
|
|
4764
|
+
React.useEffect(() => {
|
|
4765
4765
|
isLocked.current = false;
|
|
4766
4766
|
}, [rectDependency.clientHeight, rectDependency.clientWidth]);
|
|
4767
4767
|
const handleResize = () => {
|
|
@@ -4773,13 +4773,13 @@
|
|
|
4773
4773
|
});
|
|
4774
4774
|
}, 200);
|
|
4775
4775
|
};
|
|
4776
|
-
React
|
|
4776
|
+
React.useEffect(() => {
|
|
4777
4777
|
window.addEventListener("resize", handleResize);
|
|
4778
4778
|
return () => {
|
|
4779
4779
|
window.removeEventListener("resize", handleResize);
|
|
4780
4780
|
};
|
|
4781
4781
|
}, []);
|
|
4782
|
-
React
|
|
4782
|
+
React.useEffect(() => {
|
|
4783
4783
|
const nbrRemainingChildren = positiveOrZero(nbrChildren - max);
|
|
4784
4784
|
onChange(nbrRemainingChildren);
|
|
4785
4785
|
}, [max, nbrChildren]);
|
|
@@ -4787,11 +4787,11 @@
|
|
|
4787
4787
|
max,
|
|
4788
4788
|
getChildrenWithProps(children, ramda.defaultTo({}, childrenProps))
|
|
4789
4789
|
);
|
|
4790
|
-
return /* @__PURE__ */ React
|
|
4790
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, shownChildren);
|
|
4791
4791
|
};
|
|
4792
4792
|
|
|
4793
4793
|
const useOverflowGroup = () => {
|
|
4794
|
-
const [rect, setRect] = React
|
|
4794
|
+
const [rect, setRect] = React.useState(null);
|
|
4795
4795
|
const containerRef = (node) => {
|
|
4796
4796
|
if (node) {
|
|
4797
4797
|
setRect(node);
|
|
@@ -4838,13 +4838,13 @@
|
|
|
4838
4838
|
"max",
|
|
4839
4839
|
"spacing"
|
|
4840
4840
|
]);
|
|
4841
|
-
const [nbrRemainingAvatars, setNbrRemainingAvatars] = React
|
|
4841
|
+
const [nbrRemainingAvatars, setNbrRemainingAvatars] = React.useState(0);
|
|
4842
4842
|
const childrenWithMargin = getChildrenWithProps(
|
|
4843
4843
|
children,
|
|
4844
4844
|
{ ml: spacing },
|
|
4845
4845
|
(_child, idx) => idx > 0
|
|
4846
4846
|
);
|
|
4847
|
-
return /* @__PURE__ */ React
|
|
4847
|
+
return /* @__PURE__ */ React.createElement(react.HStack, __spreadValues$1Y({ bgColor: "background.default" }, rest), /* @__PURE__ */ React.createElement(react.HStack, { spacing: 0 }, /* @__PURE__ */ React.createElement(OverflowGroup, { max, onChange: setNbrRemainingAvatars }, childrenWithMargin)), nbrRemainingAvatars > 0 && /* @__PURE__ */ React.createElement(Small, { sx: { color: "blue.500" } }, "+", nbrRemainingAvatars));
|
|
4848
4848
|
};
|
|
4849
4849
|
|
|
4850
4850
|
var __defProp$1X = Object.defineProperty;
|
|
@@ -4863,7 +4863,7 @@
|
|
|
4863
4863
|
}
|
|
4864
4864
|
return a;
|
|
4865
4865
|
};
|
|
4866
|
-
const Badge = React
|
|
4866
|
+
const Badge = React.forwardRef((props, ref) => /* @__PURE__ */ React.createElement(react.Badge, __spreadValues$1X({ ref }, props)));
|
|
4867
4867
|
|
|
4868
4868
|
var __defProp$1W = Object.defineProperty;
|
|
4869
4869
|
var __getOwnPropSymbols$1W = Object.getOwnPropertySymbols;
|
|
@@ -4904,7 +4904,7 @@
|
|
|
4904
4904
|
"isBlinking"
|
|
4905
4905
|
]);
|
|
4906
4906
|
const styles = react.useStyleConfig("Blinker", { color, size, isBlinking });
|
|
4907
|
-
return /* @__PURE__ */ React
|
|
4907
|
+
return /* @__PURE__ */ React.createElement(react.Box, __spreadValues$1W({ sx: styles, "data-testid": "blinker-test-id" }, rest));
|
|
4908
4908
|
};
|
|
4909
4909
|
|
|
4910
4910
|
var __defProp$1V = Object.defineProperty;
|
|
@@ -4937,7 +4937,7 @@
|
|
|
4937
4937
|
};
|
|
4938
4938
|
const Spinner = (_a) => {
|
|
4939
4939
|
var rest = __objRest$1w(_a, []);
|
|
4940
|
-
return /* @__PURE__ */ React
|
|
4940
|
+
return /* @__PURE__ */ React.createElement(react.Spinner, __spreadValues$1V({}, rest));
|
|
4941
4941
|
};
|
|
4942
4942
|
|
|
4943
4943
|
var __defProp$1U = Object.defineProperty;
|
|
@@ -4974,16 +4974,16 @@
|
|
|
4974
4974
|
md: "sm",
|
|
4975
4975
|
lg: "md"
|
|
4976
4976
|
};
|
|
4977
|
-
const Button = React
|
|
4977
|
+
const Button = React.forwardRef(
|
|
4978
4978
|
(_a, ref) => {
|
|
4979
4979
|
var _b = _a, { variant = "default", children, size = "md" } = _b, rest = __objRest$1v(_b, ["variant", "children", "size"]);
|
|
4980
|
-
return /* @__PURE__ */ React
|
|
4980
|
+
return /* @__PURE__ */ React.createElement(
|
|
4981
4981
|
react.Button,
|
|
4982
4982
|
__spreadValues$1U({
|
|
4983
4983
|
variant,
|
|
4984
4984
|
ref,
|
|
4985
4985
|
size,
|
|
4986
|
-
spinner: /* @__PURE__ */ React
|
|
4986
|
+
spinner: /* @__PURE__ */ React.createElement(
|
|
4987
4987
|
Spinner,
|
|
4988
4988
|
{
|
|
4989
4989
|
size: SpinnerSizeMap[size]
|
|
@@ -5038,7 +5038,7 @@
|
|
|
5038
5038
|
"variant"
|
|
5039
5039
|
]);
|
|
5040
5040
|
const controlledValue = typeof value === "boolean" ? { isChecked: value } : { value };
|
|
5041
|
-
return /* @__PURE__ */ React
|
|
5041
|
+
return /* @__PURE__ */ React.createElement(
|
|
5042
5042
|
react.Checkbox,
|
|
5043
5043
|
__spreadValues$1T(__spreadValues$1T({
|
|
5044
5044
|
size,
|
|
@@ -5093,7 +5093,7 @@
|
|
|
5093
5093
|
}
|
|
5094
5094
|
return target;
|
|
5095
5095
|
};
|
|
5096
|
-
const Form = React
|
|
5096
|
+
const Form = React.forwardRef((_a, ref) => {
|
|
5097
5097
|
var _b = _a, {
|
|
5098
5098
|
initialValues,
|
|
5099
5099
|
onSubmit,
|
|
@@ -5132,10 +5132,10 @@
|
|
|
5132
5132
|
defaultValues: initialValues,
|
|
5133
5133
|
resolver: getResolver()
|
|
5134
5134
|
}, formSettings));
|
|
5135
|
-
React
|
|
5135
|
+
React.useImperativeHandle(ref, ramda.always(newMethods), []);
|
|
5136
5136
|
if (enableReinitialize) {
|
|
5137
|
-
const initalValuesImage = React
|
|
5138
|
-
React
|
|
5137
|
+
const initalValuesImage = React.useRef({});
|
|
5138
|
+
React.useEffect(() => {
|
|
5139
5139
|
if (!ramda.equals(initalValuesImage.current, initialValues)) {
|
|
5140
5140
|
newMethods == null ? void 0 : newMethods.reset(initialValues);
|
|
5141
5141
|
initalValuesImage.current = initialValues;
|
|
@@ -5154,7 +5154,7 @@
|
|
|
5154
5154
|
newMethods.trigger();
|
|
5155
5155
|
e.preventDefault();
|
|
5156
5156
|
};
|
|
5157
|
-
return /* @__PURE__ */ React
|
|
5157
|
+
return /* @__PURE__ */ React.createElement(reactHookForm.FormProvider, __spreadValues$1S(__spreadValues$1S({}, newMethods), rest), /* @__PURE__ */ React.createElement("form", { style: __spreadValues$1S({ width: "100%" }, innerFormStyle), onSubmit: handleSubmit }, typeof children === "function" ? children(newMethods) : children));
|
|
5158
5158
|
});
|
|
5159
5159
|
|
|
5160
5160
|
var __defProp$1R = Object.defineProperty;
|
|
@@ -5188,13 +5188,13 @@
|
|
|
5188
5188
|
}
|
|
5189
5189
|
return target;
|
|
5190
5190
|
};
|
|
5191
|
-
const FormLabel = React
|
|
5191
|
+
const FormLabel = React.forwardRef((_a, ref) => {
|
|
5192
5192
|
var _b = _a, {
|
|
5193
5193
|
children: label
|
|
5194
5194
|
} = _b, rest = __objRest$1s(_b, [
|
|
5195
5195
|
"children"
|
|
5196
5196
|
]);
|
|
5197
|
-
return /* @__PURE__ */ React
|
|
5197
|
+
return /* @__PURE__ */ React.createElement(
|
|
5198
5198
|
Label,
|
|
5199
5199
|
__spreadProps$s(__spreadValues$1R({
|
|
5200
5200
|
size: "sm",
|
|
@@ -5264,15 +5264,15 @@
|
|
|
5264
5264
|
const { formState: { errors } } = methods;
|
|
5265
5265
|
const control = passedControl != null ? passedControl : methods.control;
|
|
5266
5266
|
const fieldError = getFieldError(name, errors);
|
|
5267
|
-
return /* @__PURE__ */ React
|
|
5267
|
+
return /* @__PURE__ */ React.createElement(react.FormControl, { isInvalid: !!fieldError, isRequired, ref }, /* @__PURE__ */ React.createElement(
|
|
5268
5268
|
react.Stack,
|
|
5269
5269
|
__spreadValues$1Q({
|
|
5270
5270
|
spacing: "auto",
|
|
5271
5271
|
direction,
|
|
5272
5272
|
alignItems: direction === "column" ? "stretch" : "center"
|
|
5273
5273
|
}, rest),
|
|
5274
|
-
label && /* @__PURE__ */ React
|
|
5275
|
-
/* @__PURE__ */ React
|
|
5274
|
+
label && /* @__PURE__ */ React.createElement(FormLabel, { htmlFor: noLabelConnection ? void 0 : name, mb: 1 }, label),
|
|
5275
|
+
/* @__PURE__ */ React.createElement(
|
|
5276
5276
|
reactHookForm.Controller,
|
|
5277
5277
|
{
|
|
5278
5278
|
name,
|
|
@@ -5281,9 +5281,9 @@
|
|
|
5281
5281
|
render: ({ field }) => children(field, methods)
|
|
5282
5282
|
}
|
|
5283
5283
|
)
|
|
5284
|
-
), /* @__PURE__ */ React
|
|
5284
|
+
), /* @__PURE__ */ React.createElement(react.FormErrorMessage, null, fieldError && (fieldError == null ? void 0 : fieldError.message)));
|
|
5285
5285
|
};
|
|
5286
|
-
const Field = React
|
|
5286
|
+
const Field = React.forwardRef(BaseField);
|
|
5287
5287
|
|
|
5288
5288
|
const useSetValueRefreshed = () => {
|
|
5289
5289
|
const { setValue, watch } = reactHookForm.useFormContext();
|
|
@@ -5322,7 +5322,7 @@
|
|
|
5322
5322
|
}
|
|
5323
5323
|
return target;
|
|
5324
5324
|
};
|
|
5325
|
-
const CheckboxField = React
|
|
5325
|
+
const CheckboxField = React.forwardRef((_a, ref) => {
|
|
5326
5326
|
var _b = _a, {
|
|
5327
5327
|
name,
|
|
5328
5328
|
label,
|
|
@@ -5344,13 +5344,13 @@
|
|
|
5344
5344
|
"labelPlacement",
|
|
5345
5345
|
"labelSize"
|
|
5346
5346
|
]);
|
|
5347
|
-
return /* @__PURE__ */ React
|
|
5347
|
+
return /* @__PURE__ */ React.createElement(
|
|
5348
5348
|
react.Box,
|
|
5349
5349
|
{
|
|
5350
5350
|
w: label ? "full" : "fit-content",
|
|
5351
5351
|
display: "inline-flex"
|
|
5352
5352
|
},
|
|
5353
|
-
/* @__PURE__ */ React
|
|
5353
|
+
/* @__PURE__ */ React.createElement(
|
|
5354
5354
|
Field,
|
|
5355
5355
|
{
|
|
5356
5356
|
name,
|
|
@@ -5360,13 +5360,13 @@
|
|
|
5360
5360
|
validate,
|
|
5361
5361
|
ref
|
|
5362
5362
|
},
|
|
5363
|
-
({ onChange, value }) => /* @__PURE__ */ React
|
|
5363
|
+
({ onChange, value }) => /* @__PURE__ */ React.createElement(
|
|
5364
5364
|
react.Flex,
|
|
5365
5365
|
{
|
|
5366
5366
|
gap: 2,
|
|
5367
5367
|
direction: labelPlacement === "left" ? "row-reverse" : "row"
|
|
5368
5368
|
},
|
|
5369
|
-
/* @__PURE__ */ React
|
|
5369
|
+
/* @__PURE__ */ React.createElement(
|
|
5370
5370
|
Checkbox,
|
|
5371
5371
|
__spreadValues$1P({
|
|
5372
5372
|
name,
|
|
@@ -5379,7 +5379,7 @@
|
|
|
5379
5379
|
"data-testid": "checkbox-field-test-id"
|
|
5380
5380
|
}, rest)
|
|
5381
5381
|
),
|
|
5382
|
-
/* @__PURE__ */ React
|
|
5382
|
+
/* @__PURE__ */ React.createElement(Label, { htmlFor: name, sx: { fontWeight: "normal" }, size: labelSize }, label)
|
|
5383
5383
|
)
|
|
5384
5384
|
)
|
|
5385
5385
|
);
|
|
@@ -5413,7 +5413,7 @@
|
|
|
5413
5413
|
}
|
|
5414
5414
|
return target;
|
|
5415
5415
|
};
|
|
5416
|
-
const CheckboxGroupField = React
|
|
5416
|
+
const CheckboxGroupField = React.forwardRef((_a, ref) => {
|
|
5417
5417
|
var _b = _a, {
|
|
5418
5418
|
name,
|
|
5419
5419
|
label,
|
|
@@ -5431,7 +5431,7 @@
|
|
|
5431
5431
|
"validate",
|
|
5432
5432
|
"onChange"
|
|
5433
5433
|
]);
|
|
5434
|
-
return /* @__PURE__ */ React
|
|
5434
|
+
return /* @__PURE__ */ React.createElement(react.Box, { w: label ? "full" : "fit-content" }, /* @__PURE__ */ React.createElement(
|
|
5435
5435
|
Field,
|
|
5436
5436
|
{
|
|
5437
5437
|
name,
|
|
@@ -5441,7 +5441,7 @@
|
|
|
5441
5441
|
direction,
|
|
5442
5442
|
ref
|
|
5443
5443
|
},
|
|
5444
|
-
({ onChange, value }) => /* @__PURE__ */ React
|
|
5444
|
+
({ onChange, value }) => /* @__PURE__ */ React.createElement(
|
|
5445
5445
|
react.CheckboxGroup,
|
|
5446
5446
|
__spreadValues$1O({
|
|
5447
5447
|
onChange: (e) => {
|
|
@@ -5484,7 +5484,7 @@
|
|
|
5484
5484
|
}
|
|
5485
5485
|
return target;
|
|
5486
5486
|
};
|
|
5487
|
-
const IconButton = React
|
|
5487
|
+
const IconButton = React.forwardRef((_a, ref) => {
|
|
5488
5488
|
var _b = _a, {
|
|
5489
5489
|
variant = "default",
|
|
5490
5490
|
icon,
|
|
@@ -5498,8 +5498,8 @@
|
|
|
5498
5498
|
]);
|
|
5499
5499
|
var _a2;
|
|
5500
5500
|
const IconComponent = icon != null ? icon : children;
|
|
5501
|
-
const IconWithSize = React
|
|
5502
|
-
return /* @__PURE__ */ React
|
|
5501
|
+
const IconWithSize = React.cloneElement(IconComponent, { size: (_a2 = IconComponent.props.size) != null ? _a2 : rest.size });
|
|
5502
|
+
return /* @__PURE__ */ React.createElement(
|
|
5503
5503
|
react.IconButton,
|
|
5504
5504
|
__spreadValues$1N({
|
|
5505
5505
|
variant,
|
|
@@ -5514,14 +5514,14 @@
|
|
|
5514
5514
|
const paletteColors = getShades(100, 500);
|
|
5515
5515
|
const defaultColors = getShades(500);
|
|
5516
5516
|
|
|
5517
|
-
const ColorButton = React
|
|
5517
|
+
const ColorButton = React.forwardRef(({
|
|
5518
5518
|
color,
|
|
5519
5519
|
onClick,
|
|
5520
5520
|
size,
|
|
5521
5521
|
selected = false
|
|
5522
5522
|
}, ref) => {
|
|
5523
5523
|
if (!color)
|
|
5524
|
-
return /* @__PURE__ */ React
|
|
5524
|
+
return /* @__PURE__ */ React.createElement(react.Box, null);
|
|
5525
5525
|
const { defaultArrows, focusPrevious, focusNext } = useArrowFocus(columns);
|
|
5526
5526
|
const onKeyDown = (e) => {
|
|
5527
5527
|
switch (e.key) {
|
|
@@ -5539,7 +5539,7 @@
|
|
|
5539
5539
|
}
|
|
5540
5540
|
};
|
|
5541
5541
|
const { colorButton } = react.useMultiStyleConfig("ColorPicker", { size });
|
|
5542
|
-
return /* @__PURE__ */ React
|
|
5542
|
+
return /* @__PURE__ */ React.createElement(
|
|
5543
5543
|
IconButton,
|
|
5544
5544
|
{
|
|
5545
5545
|
bg: color,
|
|
@@ -5548,7 +5548,7 @@
|
|
|
5548
5548
|
"aria-label": `select-${color}`,
|
|
5549
5549
|
onClick,
|
|
5550
5550
|
sx: colorButton,
|
|
5551
|
-
icon: /* @__PURE__ */ React
|
|
5551
|
+
icon: /* @__PURE__ */ React.createElement(Icon, { as: icons.CheckDuo, boxSize: selected ? void 0 : "0" }),
|
|
5552
5552
|
color: getContrastColor(color)
|
|
5553
5553
|
}
|
|
5554
5554
|
);
|
|
@@ -5570,7 +5570,7 @@
|
|
|
5570
5570
|
}
|
|
5571
5571
|
return a;
|
|
5572
5572
|
};
|
|
5573
|
-
const Popover = (props) => /* @__PURE__ */ React
|
|
5573
|
+
const Popover = (props) => /* @__PURE__ */ React.createElement(react.Popover, __spreadValues$1M({ isLazy: true }, props));
|
|
5574
5574
|
|
|
5575
5575
|
const ColorsExpandButton = ({
|
|
5576
5576
|
onClick,
|
|
@@ -5597,7 +5597,7 @@
|
|
|
5597
5597
|
break;
|
|
5598
5598
|
}
|
|
5599
5599
|
};
|
|
5600
|
-
return /* @__PURE__ */ React
|
|
5600
|
+
return /* @__PURE__ */ React.createElement(
|
|
5601
5601
|
IconButton,
|
|
5602
5602
|
{
|
|
5603
5603
|
variant: "ghost",
|
|
@@ -5606,7 +5606,7 @@
|
|
|
5606
5606
|
onClick,
|
|
5607
5607
|
sx: colorButton
|
|
5608
5608
|
},
|
|
5609
|
-
/* @__PURE__ */ React
|
|
5609
|
+
/* @__PURE__ */ React.createElement(Icon, { as: expanded ? icons.ChevronUpDuo : icons.ChevronDownDuo })
|
|
5610
5610
|
);
|
|
5611
5611
|
};
|
|
5612
5612
|
|
|
@@ -5698,9 +5698,9 @@
|
|
|
5698
5698
|
]);
|
|
5699
5699
|
const { isOpen, onToggle, onClose } = react.useDisclosure();
|
|
5700
5700
|
const [expanded, setExpanded] = react.useBoolean();
|
|
5701
|
-
const [selectedColor, setSelectedColor] = React
|
|
5702
|
-
const [visibleColors, setVisibleColors] = React
|
|
5703
|
-
const initialFocusRef = React
|
|
5701
|
+
const [selectedColor, setSelectedColor] = React.useState(value);
|
|
5702
|
+
const [visibleColors, setVisibleColors] = React.useState(colors);
|
|
5703
|
+
const initialFocusRef = React.useRef(null);
|
|
5704
5704
|
const {
|
|
5705
5705
|
trigger,
|
|
5706
5706
|
heading
|
|
@@ -5710,14 +5710,14 @@
|
|
|
5710
5710
|
for (let i = 0; i < baseColors.length % columns; i += 1) {
|
|
5711
5711
|
baseColors.push("");
|
|
5712
5712
|
}
|
|
5713
|
-
React
|
|
5713
|
+
React.useEffect(() => {
|
|
5714
5714
|
if (value === "") {
|
|
5715
5715
|
setSelectedColor(null);
|
|
5716
5716
|
} else {
|
|
5717
5717
|
setSelectedColor(parsedValue);
|
|
5718
5718
|
}
|
|
5719
5719
|
}, [value]);
|
|
5720
|
-
React
|
|
5720
|
+
React.useEffect(() => {
|
|
5721
5721
|
if (expanded) {
|
|
5722
5722
|
setVisibleColors((prev) => prev.concat(expandedColors));
|
|
5723
5723
|
} else {
|
|
@@ -5748,14 +5748,14 @@
|
|
|
5748
5748
|
setSelectedColor(null);
|
|
5749
5749
|
onChange(null);
|
|
5750
5750
|
};
|
|
5751
|
-
return /* @__PURE__ */ React
|
|
5751
|
+
return /* @__PURE__ */ React.createElement(react.Box, { "data-testid": "color-picker-test-id" }, /* @__PURE__ */ React.createElement(
|
|
5752
5752
|
Popover,
|
|
5753
5753
|
__spreadValues$1K({
|
|
5754
5754
|
isOpen,
|
|
5755
5755
|
onClose,
|
|
5756
5756
|
initialFocusRef
|
|
5757
5757
|
}, popoverProps),
|
|
5758
|
-
/* @__PURE__ */ React
|
|
5758
|
+
/* @__PURE__ */ React.createElement(react.PopoverTrigger, null, /* @__PURE__ */ React.createElement(
|
|
5759
5759
|
IconButton,
|
|
5760
5760
|
__spreadValues$1K({
|
|
5761
5761
|
onClick: onToggle,
|
|
@@ -5763,10 +5763,10 @@
|
|
|
5763
5763
|
name,
|
|
5764
5764
|
sx: trigger,
|
|
5765
5765
|
size,
|
|
5766
|
-
icon: /* @__PURE__ */ React
|
|
5766
|
+
icon: /* @__PURE__ */ React.createElement(Icon, { as: icons.ColorsDuo })
|
|
5767
5767
|
}, rest)
|
|
5768
5768
|
)),
|
|
5769
|
-
/* @__PURE__ */ React
|
|
5769
|
+
/* @__PURE__ */ React.createElement(RenderInPortal, { shouldRenderInPortal }, /* @__PURE__ */ React.createElement(react.PopoverContent, { w: "auto", boxShadow: "md", p: 2, bgColor: "background.default" }, /* @__PURE__ */ React.createElement(react.Stack, null, /* @__PURE__ */ React.createElement(
|
|
5770
5770
|
react.PopoverHeader,
|
|
5771
5771
|
{
|
|
5772
5772
|
color: "text.default",
|
|
@@ -5777,7 +5777,7 @@
|
|
|
5777
5777
|
width: "full"
|
|
5778
5778
|
},
|
|
5779
5779
|
"Pick a color",
|
|
5780
|
-
clearable && trigger.color !== "unset" && /* @__PURE__ */ React
|
|
5780
|
+
clearable && trigger.color !== "unset" && /* @__PURE__ */ React.createElement(
|
|
5781
5781
|
Button,
|
|
5782
5782
|
{
|
|
5783
5783
|
size: "sm",
|
|
@@ -5787,7 +5787,7 @@
|
|
|
5787
5787
|
},
|
|
5788
5788
|
"Clear"
|
|
5789
5789
|
)
|
|
5790
|
-
), /* @__PURE__ */ React
|
|
5790
|
+
), /* @__PURE__ */ React.createElement(react.PopoverBody, { p: 0 }, /* @__PURE__ */ React.createElement(react.Stack, { alignItems: "center", p: 0, spacing: 0 }, /* @__PURE__ */ React.createElement(focus.FocusScope, null, /* @__PURE__ */ React.createElement(
|
|
5791
5791
|
react.SimpleGrid,
|
|
5792
5792
|
{
|
|
5793
5793
|
columns: getNumberOfColumns(),
|
|
@@ -5798,7 +5798,7 @@
|
|
|
5798
5798
|
pl: 4,
|
|
5799
5799
|
py: 1
|
|
5800
5800
|
},
|
|
5801
|
-
visibleColors.map((color, index) => /* @__PURE__ */ React
|
|
5801
|
+
visibleColors.map((color, index) => /* @__PURE__ */ React.createElement(
|
|
5802
5802
|
ColorButton,
|
|
5803
5803
|
{
|
|
5804
5804
|
color,
|
|
@@ -5809,7 +5809,7 @@
|
|
|
5809
5809
|
onClick: () => handleSelect(color)
|
|
5810
5810
|
}
|
|
5811
5811
|
))
|
|
5812
|
-
), expandedColors.length > 0 && /* @__PURE__ */ React
|
|
5812
|
+
), expandedColors.length > 0 && /* @__PURE__ */ React.createElement(
|
|
5813
5813
|
ColorsExpandButton,
|
|
5814
5814
|
{
|
|
5815
5815
|
onClick: expandColors,
|
|
@@ -5862,7 +5862,7 @@
|
|
|
5862
5862
|
"isRequired",
|
|
5863
5863
|
"validate"
|
|
5864
5864
|
]);
|
|
5865
|
-
return /* @__PURE__ */ React
|
|
5865
|
+
return /* @__PURE__ */ React.createElement(
|
|
5866
5866
|
Field,
|
|
5867
5867
|
{
|
|
5868
5868
|
name,
|
|
@@ -5871,7 +5871,7 @@
|
|
|
5871
5871
|
isRequired,
|
|
5872
5872
|
validate
|
|
5873
5873
|
},
|
|
5874
|
-
({ onChange, value }) => /* @__PURE__ */ React
|
|
5874
|
+
({ onChange, value }) => /* @__PURE__ */ React.createElement(
|
|
5875
5875
|
ColorPicker,
|
|
5876
5876
|
__spreadValues$1J({
|
|
5877
5877
|
name,
|
|
@@ -5901,7 +5901,7 @@
|
|
|
5901
5901
|
return a;
|
|
5902
5902
|
};
|
|
5903
5903
|
var __spreadProps$r = (a, b) => __defProps$r(a, __getOwnPropDescs$r(b));
|
|
5904
|
-
const FlipButtonContext = React
|
|
5904
|
+
const FlipButtonContext = React.createContext(null);
|
|
5905
5905
|
const useFlipButtonState = (props, isMulti) => isMulti ? checkbox.useCheckboxGroupState(props) : radio.useRadioGroupState(props);
|
|
5906
5906
|
const useFlipButtonGroup = (props, state, isMulti) => {
|
|
5907
5907
|
const propsWithLabel = __spreadProps$r(__spreadValues$1I({}, props), {
|
|
@@ -5972,8 +5972,8 @@
|
|
|
5972
5972
|
"value",
|
|
5973
5973
|
"iconPlacement"
|
|
5974
5974
|
]);
|
|
5975
|
-
const state = React
|
|
5976
|
-
const ref = React
|
|
5975
|
+
const state = React.useContext(FlipButtonContext);
|
|
5976
|
+
const ref = React.useRef(null);
|
|
5977
5977
|
const propsWithoutChildren = ramda.omit(["children"], __spreadProps$q(__spreadValues$1H({}, props), { "aria-label": `${isMulti ? "Checkbox" : "Radio"}-input for ${value}` }));
|
|
5978
5978
|
const { inputProps } = isMulti ? checkbox$1.useCheckboxGroupItem(propsWithoutChildren, state, ref) : radio$1.useRadio(propsWithoutChildren, state, ref);
|
|
5979
5979
|
const { button, buttonIcon } = react.useMultiStyleConfig("FlipButton", { size, variant });
|
|
@@ -6008,7 +6008,7 @@
|
|
|
6008
6008
|
isMulti: isMulti || false,
|
|
6009
6009
|
focusRing,
|
|
6010
6010
|
value
|
|
6011
|
-
}, rest)) : /* @__PURE__ */ React
|
|
6011
|
+
}, rest)) : /* @__PURE__ */ React.createElement(
|
|
6012
6012
|
react.HStack,
|
|
6013
6013
|
{
|
|
6014
6014
|
spacing: isSelected && iconPlacement !== "none" || icon ? 2 : 0,
|
|
@@ -6017,9 +6017,9 @@
|
|
|
6017
6017
|
"aria-disabled": isDisabled,
|
|
6018
6018
|
as: "label"
|
|
6019
6019
|
},
|
|
6020
|
-
/* @__PURE__ */ React
|
|
6021
|
-
icon && iconPlacement !== "none" ? /* @__PURE__ */ React
|
|
6022
|
-
/* @__PURE__ */ React
|
|
6020
|
+
/* @__PURE__ */ React.createElement("input", __spreadValues$1H({}, flipButtonProps)),
|
|
6021
|
+
icon && iconPlacement !== "none" ? /* @__PURE__ */ React.createElement(Icon, { as: icon || icons.CheckSolid, sx: buttonIcon }) : isSelected && iconPlacement !== "none" && /* @__PURE__ */ React.createElement(react.SlideFade, { in: isSelected }, /* @__PURE__ */ React.createElement(Icon, { as: icon || icons.CheckSolid, sx: buttonIcon })),
|
|
6022
|
+
/* @__PURE__ */ React.createElement(react.Text, { textAlign: "center" }, children)
|
|
6023
6023
|
);
|
|
6024
6024
|
};
|
|
6025
6025
|
|
|
@@ -6079,9 +6079,9 @@
|
|
|
6079
6079
|
"sx"
|
|
6080
6080
|
]);
|
|
6081
6081
|
const { state, flipButtonGroupProps } = useFlipButton(props, isMulti);
|
|
6082
|
-
const numberOfButtons = React
|
|
6083
|
-
const childrenWithProps = React
|
|
6084
|
-
(child) => React
|
|
6082
|
+
const numberOfButtons = React.Children.count(children);
|
|
6083
|
+
const childrenWithProps = React.Children.toArray(children).map(
|
|
6084
|
+
(child) => React.isValidElement(child) ? React.cloneElement(child, __spreadValues$1G({
|
|
6085
6085
|
key: child.props.value,
|
|
6086
6086
|
isMulti,
|
|
6087
6087
|
variant,
|
|
@@ -6098,7 +6098,7 @@
|
|
|
6098
6098
|
sx
|
|
6099
6099
|
});
|
|
6100
6100
|
const restWithoutOnChange = ramda.omit(["onChange"], rest);
|
|
6101
|
-
return /* @__PURE__ */ React
|
|
6101
|
+
return /* @__PURE__ */ React.createElement(
|
|
6102
6102
|
react.Stack,
|
|
6103
6103
|
__spreadValues$1G(__spreadProps$p(__spreadValues$1G({}, flipButtonGroupProps), {
|
|
6104
6104
|
direction,
|
|
@@ -6106,7 +6106,7 @@
|
|
|
6106
6106
|
spacing: 0,
|
|
6107
6107
|
sx: container
|
|
6108
6108
|
}), restWithoutOnChange),
|
|
6109
|
-
/* @__PURE__ */ React
|
|
6109
|
+
/* @__PURE__ */ React.createElement(FlipButtonContext.Provider, { value: state }, childrenWithProps)
|
|
6110
6110
|
);
|
|
6111
6111
|
};
|
|
6112
6112
|
|
|
@@ -6138,7 +6138,7 @@
|
|
|
6138
6138
|
}
|
|
6139
6139
|
return target;
|
|
6140
6140
|
};
|
|
6141
|
-
const FlipButtonGroupField = React
|
|
6141
|
+
const FlipButtonGroupField = React.forwardRef((_a, ref) => {
|
|
6142
6142
|
var _b = _a, {
|
|
6143
6143
|
name,
|
|
6144
6144
|
label,
|
|
@@ -6158,7 +6158,7 @@
|
|
|
6158
6158
|
"onChange",
|
|
6159
6159
|
"validate"
|
|
6160
6160
|
]);
|
|
6161
|
-
return /* @__PURE__ */ React
|
|
6161
|
+
return /* @__PURE__ */ React.createElement(
|
|
6162
6162
|
Field,
|
|
6163
6163
|
{
|
|
6164
6164
|
name,
|
|
@@ -6168,7 +6168,7 @@
|
|
|
6168
6168
|
validate,
|
|
6169
6169
|
ref
|
|
6170
6170
|
},
|
|
6171
|
-
({ onChange, value }) => /* @__PURE__ */ React
|
|
6171
|
+
({ onChange, value }) => /* @__PURE__ */ React.createElement(
|
|
6172
6172
|
FlipButtonGroup,
|
|
6173
6173
|
__spreadValues$1F({
|
|
6174
6174
|
name,
|
|
@@ -6216,10 +6216,10 @@
|
|
|
6216
6216
|
const hoverAndActiveStyles = {
|
|
6217
6217
|
borderLeftColor: theme.colors.border["pane-divider"].hover
|
|
6218
6218
|
};
|
|
6219
|
-
const ResizeHandle = React
|
|
6219
|
+
const ResizeHandle = React.forwardRef(
|
|
6220
6220
|
(_a, ref) => {
|
|
6221
6221
|
var _b = _a, { color } = _b, rest = __objRest$1h(_b, ["color"]);
|
|
6222
|
-
return /* @__PURE__ */ React
|
|
6222
|
+
return /* @__PURE__ */ React.createElement(
|
|
6223
6223
|
react.Box,
|
|
6224
6224
|
__spreadValues$1E({
|
|
6225
6225
|
ref,
|
|
@@ -6259,9 +6259,9 @@
|
|
|
6259
6259
|
var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
|
|
6260
6260
|
const Trigger = (props) => {
|
|
6261
6261
|
const { isDisabled, handleClick } = props;
|
|
6262
|
-
const ref = React
|
|
6262
|
+
const ref = React.useRef(null);
|
|
6263
6263
|
const { buttonProps } = button.useButton(props, ref);
|
|
6264
|
-
return /* @__PURE__ */ React
|
|
6264
|
+
return /* @__PURE__ */ React.createElement(
|
|
6265
6265
|
Button,
|
|
6266
6266
|
__spreadProps$o(__spreadValues$1D({}, buttonProps), {
|
|
6267
6267
|
ref,
|
|
@@ -6272,7 +6272,7 @@
|
|
|
6272
6272
|
onPointerDown: handleClick,
|
|
6273
6273
|
pointerEvents: isDisabled ? "none" : "auto"
|
|
6274
6274
|
}),
|
|
6275
|
-
/* @__PURE__ */ React
|
|
6275
|
+
/* @__PURE__ */ React.createElement(Icon, { as: icons.CalendarDuo })
|
|
6276
6276
|
);
|
|
6277
6277
|
};
|
|
6278
6278
|
|
|
@@ -6296,12 +6296,12 @@
|
|
|
6296
6296
|
};
|
|
6297
6297
|
var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
|
|
6298
6298
|
const DateSegment = ({ segment, state }) => {
|
|
6299
|
-
const ref = React
|
|
6299
|
+
const ref = React.useRef(null);
|
|
6300
6300
|
const { segmentProps } = datepicker.useDateSegment(segment, state, ref);
|
|
6301
6301
|
const isDivider = segment.type === "literal";
|
|
6302
6302
|
const { dateSegment } = react.useMultiStyleConfig("DatePicker");
|
|
6303
6303
|
const minWidth = `${String(segment.maxValue).length}ch`;
|
|
6304
|
-
return /* @__PURE__ */ React
|
|
6304
|
+
return /* @__PURE__ */ React.createElement(
|
|
6305
6305
|
react.Box,
|
|
6306
6306
|
__spreadProps$n(__spreadValues$1C({}, segmentProps), {
|
|
6307
6307
|
ref,
|
|
@@ -6343,7 +6343,7 @@
|
|
|
6343
6343
|
};
|
|
6344
6344
|
var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
|
|
6345
6345
|
const DateField = (props) => {
|
|
6346
|
-
const ref = React
|
|
6346
|
+
const ref = React.useRef(null);
|
|
6347
6347
|
const state = datepicker$1.useDateFieldState(__spreadProps$m(__spreadValues$1B({}, props), {
|
|
6348
6348
|
/* Hard coding the United Kingdom locale,
|
|
6349
6349
|
this enforces using english characters e.g.
|
|
@@ -6361,7 +6361,7 @@
|
|
|
6361
6361
|
const sortedSegments = ramda.split(delimeterIncluded, dateFormat).map(
|
|
6362
6362
|
(query, index) => getMatchingSegment(query, index)
|
|
6363
6363
|
);
|
|
6364
|
-
return /* @__PURE__ */ React
|
|
6364
|
+
return /* @__PURE__ */ React.createElement(
|
|
6365
6365
|
react.Box,
|
|
6366
6366
|
__spreadProps$m(__spreadValues$1B({}, fieldProps), {
|
|
6367
6367
|
ref,
|
|
@@ -6371,7 +6371,7 @@
|
|
|
6371
6371
|
}),
|
|
6372
6372
|
sortedSegments.map((segment, i) => {
|
|
6373
6373
|
const id = `${segment.type}-${i}`;
|
|
6374
|
-
return /* @__PURE__ */ React
|
|
6374
|
+
return /* @__PURE__ */ React.createElement(DateSegment, { segment, state, key: id });
|
|
6375
6375
|
})
|
|
6376
6376
|
);
|
|
6377
6377
|
};
|
|
@@ -6407,11 +6407,11 @@
|
|
|
6407
6407
|
}
|
|
6408
6408
|
return target;
|
|
6409
6409
|
};
|
|
6410
|
-
const StyledField = React
|
|
6410
|
+
const StyledField = React.forwardRef(
|
|
6411
6411
|
(_a, ref) => {
|
|
6412
6412
|
var _b = _a, { isInvalid, isDisabled, children, variant } = _b, rest = __objRest$1g(_b, ["isInvalid", "isDisabled", "children", "variant"]);
|
|
6413
6413
|
const { styledField } = react.useMultiStyleConfig("DatePicker", { variant });
|
|
6414
|
-
return /* @__PURE__ */ React
|
|
6414
|
+
return /* @__PURE__ */ React.createElement(
|
|
6415
6415
|
react.Box,
|
|
6416
6416
|
__spreadProps$l(__spreadValues$1A({}, rest), {
|
|
6417
6417
|
ref,
|
|
@@ -6443,7 +6443,7 @@
|
|
|
6443
6443
|
}
|
|
6444
6444
|
return a;
|
|
6445
6445
|
};
|
|
6446
|
-
const Table = (props) => /* @__PURE__ */ React
|
|
6446
|
+
const Table = (props) => /* @__PURE__ */ React.createElement(react.Table, __spreadValues$1z({}, props));
|
|
6447
6447
|
|
|
6448
6448
|
var __defProp$1y = Object.defineProperty;
|
|
6449
6449
|
var __defProps$k = Object.defineProperties;
|
|
@@ -6469,7 +6469,7 @@
|
|
|
6469
6469
|
date: date$1,
|
|
6470
6470
|
currentMonth
|
|
6471
6471
|
}) => {
|
|
6472
|
-
const ref = React
|
|
6472
|
+
const ref = React.useRef(null);
|
|
6473
6473
|
const { cellProps, buttonProps, isSelected, formattedDate } = calendar.useCalendarCell(
|
|
6474
6474
|
{ date: date$1 },
|
|
6475
6475
|
state,
|
|
@@ -6477,7 +6477,7 @@
|
|
|
6477
6477
|
);
|
|
6478
6478
|
const isToday = date$1.compare(date.today(state.timeZone)) === 0;
|
|
6479
6479
|
const isOutsideMonth = !date.isSameMonth(currentMonth, date$1);
|
|
6480
|
-
return /* @__PURE__ */ React
|
|
6480
|
+
return /* @__PURE__ */ React.createElement(react.chakra.td, __spreadValues$1y({}, cellProps), /* @__PURE__ */ React.createElement(
|
|
6481
6481
|
Button,
|
|
6482
6482
|
__spreadProps$k(__spreadValues$1y({}, buttonProps), {
|
|
6483
6483
|
ref,
|
|
@@ -6494,10 +6494,10 @@
|
|
|
6494
6494
|
));
|
|
6495
6495
|
};
|
|
6496
6496
|
|
|
6497
|
-
const DayLabels = React
|
|
6497
|
+
const DayLabels = React.memo(({ weekDays }) => {
|
|
6498
6498
|
const { dayLabel } = system.useMultiStyleConfig("Calendar");
|
|
6499
6499
|
const weekDaysWithIds = weekDays.map((day, i) => ({ label: day, _id: i }));
|
|
6500
|
-
return /* @__PURE__ */ React
|
|
6500
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, weekDaysWithIds.map(({ label, _id }) => /* @__PURE__ */ React.createElement(system.chakra.th, { key: _id, __css: dayLabel }, label)));
|
|
6501
6501
|
});
|
|
6502
6502
|
|
|
6503
6503
|
const mondayFirstWeekDays = ["M", "T", "W", "T", "F", "S", "S"];
|
|
@@ -6532,16 +6532,16 @@
|
|
|
6532
6532
|
}
|
|
6533
6533
|
return target;
|
|
6534
6534
|
};
|
|
6535
|
-
const CalendarGrid = React
|
|
6535
|
+
const CalendarGrid = React.memo(
|
|
6536
6536
|
(_a) => {
|
|
6537
6537
|
var _b = _a, { state, locale, firstDayOfWeek } = _b, rest = __objRest$1f(_b, ["state", "locale", "firstDayOfWeek"]);
|
|
6538
6538
|
const startDate = state.visibleRange.start;
|
|
6539
6539
|
const { gridProps, headerProps } = calendar.useCalendarGrid(rest, state);
|
|
6540
6540
|
const weeksInMonth = date.getWeeksInMonth(startDate, locale);
|
|
6541
6541
|
const weekDays = getWeekdays(firstDayOfWeek);
|
|
6542
|
-
return /* @__PURE__ */ React
|
|
6543
|
-
(weekIndex) => /* @__PURE__ */ React
|
|
6544
|
-
(date) => date ? /* @__PURE__ */ React
|
|
6542
|
+
return /* @__PURE__ */ React.createElement(Table, __spreadValues$1x({ variant: "unstyled" }, gridProps), /* @__PURE__ */ React.createElement(react.Thead, __spreadValues$1x({}, headerProps), /* @__PURE__ */ React.createElement(react.Tr, null, /* @__PURE__ */ React.createElement(DayLabels, { weekDays }))), /* @__PURE__ */ React.createElement(react.Tbody, null, ramda.times(
|
|
6543
|
+
(weekIndex) => /* @__PURE__ */ React.createElement(react.Tr, { key: weekIndex }, state.getDatesInWeek(weekIndex, startDate).map(
|
|
6544
|
+
(date) => date ? /* @__PURE__ */ React.createElement(
|
|
6545
6545
|
CalendarCell,
|
|
6546
6546
|
{
|
|
6547
6547
|
key: date.day,
|
|
@@ -6549,7 +6549,7 @@
|
|
|
6549
6549
|
date,
|
|
6550
6550
|
currentMonth: startDate
|
|
6551
6551
|
}
|
|
6552
|
-
) : /* @__PURE__ */ React
|
|
6552
|
+
) : /* @__PURE__ */ React.createElement(react.chakra.td, null)
|
|
6553
6553
|
)),
|
|
6554
6554
|
weeksInMonth
|
|
6555
6555
|
)));
|
|
@@ -6589,9 +6589,9 @@
|
|
|
6589
6589
|
};
|
|
6590
6590
|
const MonthButton = (_a) => {
|
|
6591
6591
|
var _b = _a, { children } = _b, rest = __objRest$1e(_b, ["children"]);
|
|
6592
|
-
const ref = React
|
|
6592
|
+
const ref = React.useRef(null);
|
|
6593
6593
|
const { buttonProps } = button.useButton(rest, ref);
|
|
6594
|
-
return /* @__PURE__ */ React
|
|
6594
|
+
return /* @__PURE__ */ React.createElement(
|
|
6595
6595
|
Button,
|
|
6596
6596
|
__spreadProps$j(__spreadValues$1w({}, buttonProps), {
|
|
6597
6597
|
boxSize: 8,
|
|
@@ -6626,7 +6626,7 @@
|
|
|
6626
6626
|
const diff = index - selectedMonth;
|
|
6627
6627
|
state.setFocusedDate(state.visibleRange.start.add({ months: diff }));
|
|
6628
6628
|
};
|
|
6629
|
-
return /* @__PURE__ */ React
|
|
6629
|
+
return /* @__PURE__ */ React.createElement(
|
|
6630
6630
|
react.Select,
|
|
6631
6631
|
{
|
|
6632
6632
|
id: "month",
|
|
@@ -6640,7 +6640,7 @@
|
|
|
6640
6640
|
w: "max-content",
|
|
6641
6641
|
textAlign: "center"
|
|
6642
6642
|
},
|
|
6643
|
-
months.map((month, i) => /* @__PURE__ */ React
|
|
6643
|
+
months.map((month, i) => /* @__PURE__ */ React.createElement("option", { value: i, key: `month-${i}` }, month))
|
|
6644
6644
|
);
|
|
6645
6645
|
};
|
|
6646
6646
|
|
|
@@ -6649,7 +6649,7 @@
|
|
|
6649
6649
|
years
|
|
6650
6650
|
}) => {
|
|
6651
6651
|
const { dateSelect } = react.useMultiStyleConfig("Calendar");
|
|
6652
|
-
return /* @__PURE__ */ React
|
|
6652
|
+
return /* @__PURE__ */ React.createElement(
|
|
6653
6653
|
react.Select,
|
|
6654
6654
|
{
|
|
6655
6655
|
id: "year",
|
|
@@ -6662,7 +6662,7 @@
|
|
|
6662
6662
|
sx: dateSelect,
|
|
6663
6663
|
w: "max-content"
|
|
6664
6664
|
},
|
|
6665
|
-
years.map((year, i) => /* @__PURE__ */ React
|
|
6665
|
+
years.map((year, i) => /* @__PURE__ */ React.createElement("option", { key: year.formatted, value: i }, year.formatted))
|
|
6666
6666
|
);
|
|
6667
6667
|
};
|
|
6668
6668
|
|
|
@@ -6701,7 +6701,7 @@
|
|
|
6701
6701
|
const date = years[index].value;
|
|
6702
6702
|
state.setFocusedDate(date);
|
|
6703
6703
|
};
|
|
6704
|
-
return /* @__PURE__ */ React
|
|
6704
|
+
return /* @__PURE__ */ React.createElement(YearSelect, { onChange, years });
|
|
6705
6705
|
};
|
|
6706
6706
|
|
|
6707
6707
|
const YearSelectRangeCalendar = ({
|
|
@@ -6713,7 +6713,7 @@
|
|
|
6713
6713
|
const date = years[index].value;
|
|
6714
6714
|
state.setFocusedDate(date);
|
|
6715
6715
|
};
|
|
6716
|
-
return /* @__PURE__ */ React
|
|
6716
|
+
return /* @__PURE__ */ React.createElement(YearSelect, { onChange, years });
|
|
6717
6717
|
};
|
|
6718
6718
|
|
|
6719
6719
|
const MILLISECONDS_PER_DAY = 864e5;
|
|
@@ -6788,8 +6788,8 @@
|
|
|
6788
6788
|
}) => {
|
|
6789
6789
|
const isOutsideMonth = !date.isSameMonth(currentMonth, date$1);
|
|
6790
6790
|
if (isOutsideMonth)
|
|
6791
|
-
return /* @__PURE__ */ React
|
|
6792
|
-
const ref = React
|
|
6791
|
+
return /* @__PURE__ */ React.createElement(react.chakra.td, null);
|
|
6792
|
+
const ref = React.useRef(null);
|
|
6793
6793
|
const {
|
|
6794
6794
|
cellProps,
|
|
6795
6795
|
buttonProps,
|
|
@@ -6799,7 +6799,7 @@
|
|
|
6799
6799
|
const isToday = date$1.compare(date.today(state.timeZone)) === 0;
|
|
6800
6800
|
const isHighlighted = range && date$1 < range.end && date$1 > range.start;
|
|
6801
6801
|
const isSelected = range && !isHighlighted && (ramda.equals(date$1, range.start) || ramda.equals(date$1, range.end));
|
|
6802
|
-
return /* @__PURE__ */ React
|
|
6802
|
+
return /* @__PURE__ */ React.createElement(react.chakra.td, __spreadValues$1v({}, cellProps), /* @__PURE__ */ React.createElement(
|
|
6803
6803
|
react.chakra.button,
|
|
6804
6804
|
__spreadProps$i(__spreadValues$1v({}, buttonProps), {
|
|
6805
6805
|
type: "button",
|
|
@@ -6887,19 +6887,19 @@
|
|
|
6887
6887
|
const { gridProps, headerProps } = calendar.useCalendarGrid(rest, state);
|
|
6888
6888
|
const weekDays = getWeekdays(firstDayOfWeek);
|
|
6889
6889
|
const weeksInMonth = date.getWeeksInMonth(startDate, locale);
|
|
6890
|
-
const weekNumberStart = React
|
|
6890
|
+
const weekNumberStart = React.useMemo(() => {
|
|
6891
6891
|
const weekNumber = getWeekNumberAtStartOfMonth(startDate.year, startDate.month);
|
|
6892
6892
|
return weekNumber;
|
|
6893
6893
|
}, [startDate.year, startDate.month]);
|
|
6894
|
-
return /* @__PURE__ */ React
|
|
6894
|
+
return /* @__PURE__ */ React.createElement(react.Box, __spreadProps$h(__spreadValues$1u({}, calendarProps), { h: "265px", p: "0" }), /* @__PURE__ */ React.createElement(react.Stack, null, /* @__PURE__ */ React.createElement(react.Flex, { justify: "space-between", w: "full", p: "1", alignItems: "center" }, /* @__PURE__ */ React.createElement(MonthButton, __spreadValues$1u({}, prevButtonProps), /* @__PURE__ */ React.createElement(Icon, { as: icons.ChevronLeftSolid, boxSize: 4 })), /* @__PURE__ */ React.createElement(react.HStack, { spacing: "0" }, /* @__PURE__ */ React.createElement(MonthSelect, { state }), /* @__PURE__ */ React.createElement(YearSelectRangeCalendar, { state })), /* @__PURE__ */ React.createElement(MonthButton, __spreadValues$1u({}, nextButtonProps), /* @__PURE__ */ React.createElement(Icon, { as: icons.ChevronRightSolid, boxSize: 4 }))), /* @__PURE__ */ React.createElement(react.chakra.table, __spreadProps$h(__spreadValues$1u({}, gridProps), { sx: { borderSpacing: "0" } }), /* @__PURE__ */ React.createElement(react.chakra.thead, __spreadValues$1u({}, headerProps), /* @__PURE__ */ React.createElement(react.chakra.tr, null, /* @__PURE__ */ React.createElement(react.chakra.th, null), /* @__PURE__ */ React.createElement(DayLabels, { weekDays }))), /* @__PURE__ */ React.createElement(react.chakra.tbody, null, ramda.times((weekIndex) => {
|
|
6895
6895
|
const weekNumber = getDisplayWeek(
|
|
6896
6896
|
weekNumberStart,
|
|
6897
6897
|
weekIndex,
|
|
6898
6898
|
startDate.year,
|
|
6899
6899
|
startDate.month
|
|
6900
6900
|
);
|
|
6901
|
-
return /* @__PURE__ */ React
|
|
6902
|
-
(date) => date ? /* @__PURE__ */ React
|
|
6901
|
+
return /* @__PURE__ */ React.createElement(react.chakra.tr, { key: weekIndex }, /* @__PURE__ */ React.createElement(react.chakra.td, null, /* @__PURE__ */ React.createElement(Small, { sx: { color: "text.subdued" }, pr: "2" }, "w.", weekNumber)), state.getDatesInWeek(weekIndex, startDate).map(
|
|
6902
|
+
(date) => date ? /* @__PURE__ */ React.createElement(
|
|
6903
6903
|
RangeCell,
|
|
6904
6904
|
{
|
|
6905
6905
|
key: date.day,
|
|
@@ -6908,7 +6908,7 @@
|
|
|
6908
6908
|
date,
|
|
6909
6909
|
currentMonth: startDate
|
|
6910
6910
|
}
|
|
6911
|
-
) : /* @__PURE__ */ React
|
|
6911
|
+
) : /* @__PURE__ */ React.createElement(react.chakra.td, null)
|
|
6912
6912
|
));
|
|
6913
6913
|
}, weeksInMonth)))));
|
|
6914
6914
|
};
|
|
@@ -6944,7 +6944,7 @@
|
|
|
6944
6944
|
props,
|
|
6945
6945
|
state
|
|
6946
6946
|
);
|
|
6947
|
-
return /* @__PURE__ */ React
|
|
6947
|
+
return /* @__PURE__ */ React.createElement(react.Box, __spreadProps$g(__spreadValues$1t({}, calendarProps), { __css: container }), /* @__PURE__ */ React.createElement(react.Stack, null, /* @__PURE__ */ React.createElement(react.Flex, { justifyContent: "space-between" }, /* @__PURE__ */ React.createElement(react.Box, { paddingInlineStart: "2" }, /* @__PURE__ */ React.createElement(YearSelectCalendar, { state })), /* @__PURE__ */ React.createElement(react.HStack, { spacing: 2 }, /* @__PURE__ */ React.createElement(MonthButton, __spreadValues$1t({}, prevButtonProps), /* @__PURE__ */ React.createElement(Icon, { as: icons.ChevronLeftSolid, boxSize: 4 })), /* @__PURE__ */ React.createElement(MonthButton, __spreadValues$1t({}, nextButtonProps), /* @__PURE__ */ React.createElement(Icon, { as: icons.ChevronRightSolid, boxSize: 4 })))), /* @__PURE__ */ React.createElement(
|
|
6948
6948
|
CalendarGrid,
|
|
6949
6949
|
{
|
|
6950
6950
|
state,
|
|
@@ -6959,7 +6959,7 @@
|
|
|
6959
6959
|
children
|
|
6960
6960
|
}) => {
|
|
6961
6961
|
const locale = firstDayOfWeek === "monday" ? "en-DE" : "en-US";
|
|
6962
|
-
return /* @__PURE__ */ React
|
|
6962
|
+
return /* @__PURE__ */ React.createElement(i18n.I18nProvider, { locale }, children);
|
|
6963
6963
|
};
|
|
6964
6964
|
|
|
6965
6965
|
var __defProp$1s = Object.defineProperty;
|
|
@@ -6992,7 +6992,7 @@
|
|
|
6992
6992
|
variant = "outline",
|
|
6993
6993
|
firstDayOfWeek = "monday"
|
|
6994
6994
|
} = props;
|
|
6995
|
-
const ref = React
|
|
6995
|
+
const ref = React.useRef();
|
|
6996
6996
|
const { group } = react.useMultiStyleConfig("DatePicker");
|
|
6997
6997
|
const state = datepicker$1.useDatePickerState(__spreadProps$f(__spreadValues$1s({}, props), {
|
|
6998
6998
|
shouldCloseOnSelect: false,
|
|
@@ -7004,35 +7004,35 @@
|
|
|
7004
7004
|
ref
|
|
7005
7005
|
);
|
|
7006
7006
|
const togglePopup = () => state.setOpen(!state.isOpen);
|
|
7007
|
-
return /* @__PURE__ */ React
|
|
7007
|
+
return /* @__PURE__ */ React.createElement(
|
|
7008
7008
|
Popover,
|
|
7009
7009
|
{
|
|
7010
7010
|
isOpen: state.isOpen,
|
|
7011
7011
|
onClose: () => state.setOpen(false),
|
|
7012
7012
|
placement: "bottom-end"
|
|
7013
7013
|
},
|
|
7014
|
-
/* @__PURE__ */ React
|
|
7014
|
+
/* @__PURE__ */ React.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React.createElement(react.HStack, { minW: 56 }, /* @__PURE__ */ React.createElement(react.InputGroup, __spreadProps$f(__spreadValues$1s({}, groupProps), { ref, __css: group }), /* @__PURE__ */ React.createElement(
|
|
7015
7015
|
StyledField,
|
|
7016
7016
|
{
|
|
7017
7017
|
isDisabled,
|
|
7018
7018
|
isInvalid,
|
|
7019
7019
|
variant
|
|
7020
7020
|
},
|
|
7021
|
-
/* @__PURE__ */ React
|
|
7022
|
-
), /* @__PURE__ */ React
|
|
7021
|
+
/* @__PURE__ */ React.createElement(react.Box, { paddingInlineStart: "1a", paddingInlineEnd: 10 }, /* @__PURE__ */ React.createElement(DateField, __spreadProps$f(__spreadValues$1s({}, fieldProps), { dateFormat })))
|
|
7022
|
+
), /* @__PURE__ */ React.createElement(
|
|
7023
7023
|
react.InputRightElement,
|
|
7024
7024
|
{
|
|
7025
7025
|
sx: { height: "100%", paddingRight: "1" },
|
|
7026
7026
|
zIndex: 0
|
|
7027
7027
|
},
|
|
7028
|
-
/* @__PURE__ */ React
|
|
7028
|
+
/* @__PURE__ */ React.createElement(
|
|
7029
7029
|
Trigger,
|
|
7030
7030
|
__spreadProps$f(__spreadValues$1s({}, buttonProps), {
|
|
7031
7031
|
isDisabled,
|
|
7032
7032
|
handleClick: togglePopup
|
|
7033
7033
|
})
|
|
7034
7034
|
)
|
|
7035
|
-
)), /* @__PURE__ */ React
|
|
7035
|
+
)), /* @__PURE__ */ React.createElement(
|
|
7036
7036
|
IconButton,
|
|
7037
7037
|
{
|
|
7038
7038
|
"aria-label": "reset-date",
|
|
@@ -7042,10 +7042,10 @@
|
|
|
7042
7042
|
onClick: resetDate,
|
|
7043
7043
|
hidden: !state.dateValue || !isClearable,
|
|
7044
7044
|
isDisabled,
|
|
7045
|
-
icon: /* @__PURE__ */ React
|
|
7045
|
+
icon: /* @__PURE__ */ React.createElement(Icon, { as: icons.XCloseSolid })
|
|
7046
7046
|
}
|
|
7047
7047
|
))),
|
|
7048
|
-
state.isOpen && /* @__PURE__ */ React
|
|
7048
|
+
state.isOpen && /* @__PURE__ */ React.createElement(react.PopoverContent, __spreadProps$f(__spreadValues$1s({}, dialogProps), { ref, w: 64, border: "none" }), /* @__PURE__ */ React.createElement(focus.FocusScope, { contain: true, restoreFocus: true }, /* @__PURE__ */ React.createElement(DatePickerLocaleWrapper, { firstDayOfWeek }, /* @__PURE__ */ React.createElement(Calendar, __spreadProps$f(__spreadValues$1s({}, calendarProps), { firstDayOfWeek })))))
|
|
7049
7049
|
);
|
|
7050
7050
|
};
|
|
7051
7051
|
|
|
@@ -7080,7 +7080,7 @@
|
|
|
7080
7080
|
const Clickable = (_a) => {
|
|
7081
7081
|
var _b = _a, { href, linkProps } = _b, rest = __objRest$1c(_b, ["href", "linkProps"]);
|
|
7082
7082
|
const clickable$1 = clickable.useClickable(rest);
|
|
7083
|
-
return /* @__PURE__ */ React
|
|
7083
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, !ramda.isNil(href) && /* @__PURE__ */ React.createElement(
|
|
7084
7084
|
react.Link,
|
|
7085
7085
|
__spreadValues$1r(__spreadValues$1r({
|
|
7086
7086
|
as: reactRouterDom.Link,
|
|
@@ -7088,14 +7088,14 @@
|
|
|
7088
7088
|
to: href,
|
|
7089
7089
|
_hover: { textDecoration: "none" }
|
|
7090
7090
|
}, linkProps), clickable$1)
|
|
7091
|
-
), ramda.isNil(href) && /* @__PURE__ */ React
|
|
7091
|
+
), ramda.isNil(href) && /* @__PURE__ */ React.createElement(react.chakra.button, __spreadValues$1r({ _focusVisible: ring }, clickable$1)));
|
|
7092
7092
|
};
|
|
7093
7093
|
|
|
7094
7094
|
const DateButton = ({
|
|
7095
7095
|
isActive,
|
|
7096
7096
|
onClick,
|
|
7097
7097
|
children
|
|
7098
|
-
}) => /* @__PURE__ */ React
|
|
7098
|
+
}) => /* @__PURE__ */ React.createElement(react.Flex, { maxW: "120px" }, /* @__PURE__ */ React.createElement(Clickable, { onClick }, /* @__PURE__ */ React.createElement(
|
|
7099
7099
|
Label,
|
|
7100
7100
|
{
|
|
7101
7101
|
_hover: {
|
|
@@ -7350,7 +7350,7 @@
|
|
|
7350
7350
|
locale = "",
|
|
7351
7351
|
height = "17.5rem"
|
|
7352
7352
|
}) => {
|
|
7353
|
-
const { quickDates, fiscalQuarters } = React
|
|
7353
|
+
const { quickDates, fiscalQuarters } = React.useMemo(
|
|
7354
7354
|
() => getQuickSelectOptions(state, locale, fiscalStartMonth, fiscalStartDay),
|
|
7355
7355
|
[]
|
|
7356
7356
|
);
|
|
@@ -7362,7 +7362,7 @@
|
|
|
7362
7362
|
};
|
|
7363
7363
|
const getIsActive = (newDate) => ramda.equals(state.value, newDate.value);
|
|
7364
7364
|
const shouldShow = (dates) => ramda.any((date) => validRange(date.value, state), dates);
|
|
7365
|
-
return /* @__PURE__ */ React
|
|
7365
|
+
return /* @__PURE__ */ React.createElement(react.Stack, { alignItems: "start", borderRight: seperator, pt: "2" }, /* @__PURE__ */ React.createElement(
|
|
7366
7366
|
react.Stack,
|
|
7367
7367
|
{
|
|
7368
7368
|
h: height,
|
|
@@ -7373,7 +7373,7 @@
|
|
|
7373
7373
|
display: shouldShow(quickDates) ? "initial" : "none"
|
|
7374
7374
|
},
|
|
7375
7375
|
ramda.map(
|
|
7376
|
-
(quickDate) => validRange(quickDate.value, state) && /* @__PURE__ */ React
|
|
7376
|
+
(quickDate) => validRange(quickDate.value, state) && /* @__PURE__ */ React.createElement(react.Box, { minH: "20px", key: `quick-select-${quickDate.label}` }, /* @__PURE__ */ React.createElement(
|
|
7377
7377
|
DateButton,
|
|
7378
7378
|
{
|
|
7379
7379
|
onClick: updateDate(quickDate.value),
|
|
@@ -7383,14 +7383,14 @@
|
|
|
7383
7383
|
)),
|
|
7384
7384
|
quickDates
|
|
7385
7385
|
)
|
|
7386
|
-
), /* @__PURE__ */ React
|
|
7386
|
+
), /* @__PURE__ */ React.createElement(
|
|
7387
7387
|
react.Box,
|
|
7388
7388
|
{
|
|
7389
7389
|
w: "50%",
|
|
7390
7390
|
borderTop: seperator,
|
|
7391
7391
|
display: shouldShow(fiscalQuarters) ? "initial" : "none"
|
|
7392
7392
|
}
|
|
7393
|
-
), /* @__PURE__ */ React
|
|
7393
|
+
), /* @__PURE__ */ React.createElement(react.Spacer, null), /* @__PURE__ */ React.createElement(
|
|
7394
7394
|
react.Flex,
|
|
7395
7395
|
{
|
|
7396
7396
|
justifyContent: "space-between",
|
|
@@ -7400,7 +7400,7 @@
|
|
|
7400
7400
|
display: shouldShow(fiscalQuarters) ? "flex" : "none"
|
|
7401
7401
|
},
|
|
7402
7402
|
ramda.map(
|
|
7403
|
-
(quarter) => validRange(quarter.value, state) && /* @__PURE__ */ React
|
|
7403
|
+
(quarter) => validRange(quarter.value, state) && /* @__PURE__ */ React.createElement(
|
|
7404
7404
|
DateButton,
|
|
7405
7405
|
{
|
|
7406
7406
|
onClick: updateDate(quarter.value),
|
|
@@ -7452,7 +7452,7 @@
|
|
|
7452
7452
|
buttonLabel = "Save"
|
|
7453
7453
|
} = props;
|
|
7454
7454
|
const { locale } = i18n.useLocale();
|
|
7455
|
-
const ref = React
|
|
7455
|
+
const ref = React.useRef(null);
|
|
7456
7456
|
const { rangeCalendarContainer } = react.useMultiStyleConfig("Calendar");
|
|
7457
7457
|
const calendarOneState = calendar$1.useCalendarState({
|
|
7458
7458
|
value: value && value.start ? value.start : null,
|
|
@@ -7499,7 +7499,7 @@
|
|
|
7499
7499
|
onSave == null ? void 0 : onSave();
|
|
7500
7500
|
handleClose();
|
|
7501
7501
|
};
|
|
7502
|
-
return /* @__PURE__ */ React
|
|
7502
|
+
return /* @__PURE__ */ React.createElement(react.Box, { ref, __css: rangeCalendarContainer }, /* @__PURE__ */ React.createElement(react.Stack, null, /* @__PURE__ */ React.createElement(react.Flex, { gap: 4 }, /* @__PURE__ */ React.createElement(
|
|
7503
7503
|
QuickSelect,
|
|
7504
7504
|
{
|
|
7505
7505
|
state,
|
|
@@ -7507,21 +7507,21 @@
|
|
|
7507
7507
|
fiscalStartMonth,
|
|
7508
7508
|
fiscalStartDay
|
|
7509
7509
|
}
|
|
7510
|
-
), /* @__PURE__ */ React
|
|
7510
|
+
), /* @__PURE__ */ React.createElement(react.Stack, null, /* @__PURE__ */ React.createElement(react.HStack, { alignItems: "start", spacing: 8, h: "full", pt: "2" }, /* @__PURE__ */ React.createElement(react.Stack, __spreadValues$1q({ h: "full" }, focusedStartMonthProps), /* @__PURE__ */ React.createElement(react.Box, { p: "2" }, /* @__PURE__ */ React.createElement(Label, { size: "xs" }, "Start date:"), /* @__PURE__ */ React.createElement(
|
|
7511
7511
|
StandaloneCalendarGrid,
|
|
7512
7512
|
{
|
|
7513
7513
|
state: calendarOneState,
|
|
7514
7514
|
range: value,
|
|
7515
7515
|
firstDayOfWeek
|
|
7516
7516
|
}
|
|
7517
|
-
))), /* @__PURE__ */ React
|
|
7517
|
+
))), /* @__PURE__ */ React.createElement(react.Stack, { h: "full", justify: "space-between" }, /* @__PURE__ */ React.createElement(react.Stack, { opacity: value && value.start ? "1" : "0.4" }, /* @__PURE__ */ React.createElement(react.Box, { p: "2" }, /* @__PURE__ */ React.createElement(Label, { size: "xs" }, "End date:"), /* @__PURE__ */ React.createElement(
|
|
7518
7518
|
StandaloneCalendarGrid,
|
|
7519
7519
|
{
|
|
7520
7520
|
state: calendarTwoState,
|
|
7521
7521
|
range: value,
|
|
7522
7522
|
firstDayOfWeek
|
|
7523
7523
|
}
|
|
7524
|
-
))), /* @__PURE__ */ React
|
|
7524
|
+
))), /* @__PURE__ */ React.createElement(react.HStack, { pt: "2", alignSelf: "end" }, isClearable && /* @__PURE__ */ React.createElement(Button, { onClick: resetDate, variant: "ghost", size: "sm" }, "Clear"), /* @__PURE__ */ React.createElement(Button, { variant: "brand", onClick: handleSave, size: "sm" }, buttonLabel))))))));
|
|
7525
7525
|
};
|
|
7526
7526
|
|
|
7527
7527
|
const isValidDateRange = (value) => ramda.is(Object, value) && ramda.has("startDate", value) && ramda.has("endDate", value) && ramda.is(String, value.startDate) && ramda.is(String, value.endDate);
|
|
@@ -7555,9 +7555,9 @@
|
|
|
7555
7555
|
children
|
|
7556
7556
|
}) => {
|
|
7557
7557
|
if (renderInPortal) {
|
|
7558
|
-
return /* @__PURE__ */ React
|
|
7558
|
+
return /* @__PURE__ */ React.createElement(react.Portal, null, children);
|
|
7559
7559
|
}
|
|
7560
|
-
return /* @__PURE__ */ React
|
|
7560
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
|
|
7561
7561
|
};
|
|
7562
7562
|
const DateRangePicker = (props) => {
|
|
7563
7563
|
const {
|
|
@@ -7578,7 +7578,7 @@
|
|
|
7578
7578
|
onSave,
|
|
7579
7579
|
buttonLabel = "Save"
|
|
7580
7580
|
} = props;
|
|
7581
|
-
const ref = React
|
|
7581
|
+
const ref = React.useRef();
|
|
7582
7582
|
const { group } = react.useMultiStyleConfig("DatePicker");
|
|
7583
7583
|
const parsedProps = {
|
|
7584
7584
|
onChange: (date) => {
|
|
@@ -7617,28 +7617,28 @@
|
|
|
7617
7617
|
ref,
|
|
7618
7618
|
handler: () => state.setOpen(false)
|
|
7619
7619
|
});
|
|
7620
|
-
return /* @__PURE__ */ React
|
|
7620
|
+
return /* @__PURE__ */ React.createElement(
|
|
7621
7621
|
Popover,
|
|
7622
7622
|
{
|
|
7623
7623
|
isOpen: state.isOpen,
|
|
7624
7624
|
onClose: handleClose,
|
|
7625
7625
|
placement: "bottom-start"
|
|
7626
7626
|
},
|
|
7627
|
-
/* @__PURE__ */ React
|
|
7627
|
+
/* @__PURE__ */ React.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React.createElement(react.HStack, null, /* @__PURE__ */ React.createElement(react.InputGroup, __spreadProps$e(__spreadValues$1p({}, groupProps), { ref, __css: group }), /* @__PURE__ */ React.createElement(
|
|
7628
7628
|
StyledField,
|
|
7629
7629
|
{
|
|
7630
7630
|
isDisabled,
|
|
7631
7631
|
isInvalid,
|
|
7632
7632
|
variant
|
|
7633
7633
|
},
|
|
7634
|
-
/* @__PURE__ */ React
|
|
7635
|
-
), /* @__PURE__ */ React
|
|
7634
|
+
/* @__PURE__ */ React.createElement(react.HStack, { paddingInlineStart: "1a", paddingInlineEnd: 10 }, /* @__PURE__ */ React.createElement(DateField, __spreadProps$e(__spreadValues$1p({}, startFieldProps), { dateFormat })), /* @__PURE__ */ React.createElement(P, null, "-"), /* @__PURE__ */ React.createElement(DateField, __spreadProps$e(__spreadValues$1p({}, endFieldProps), { dateFormat })))
|
|
7635
|
+
), /* @__PURE__ */ React.createElement(react.InputRightElement, { sx: { height: "100%", paddingRight: "1" } }, /* @__PURE__ */ React.createElement(
|
|
7636
7636
|
Trigger,
|
|
7637
7637
|
__spreadProps$e(__spreadValues$1p({}, buttonProps), {
|
|
7638
7638
|
isDisabled,
|
|
7639
7639
|
handleClick: togglePopup
|
|
7640
7640
|
})
|
|
7641
|
-
))), /* @__PURE__ */ React
|
|
7641
|
+
))), /* @__PURE__ */ React.createElement(
|
|
7642
7642
|
IconButton,
|
|
7643
7643
|
{
|
|
7644
7644
|
"aria-label": "reset-date",
|
|
@@ -7648,10 +7648,10 @@
|
|
|
7648
7648
|
onClick: resetDate,
|
|
7649
7649
|
hidden: !isClearable,
|
|
7650
7650
|
isDisabled,
|
|
7651
|
-
icon: /* @__PURE__ */ React
|
|
7651
|
+
icon: /* @__PURE__ */ React.createElement(Icon, { as: icons.XCloseSolid })
|
|
7652
7652
|
}
|
|
7653
7653
|
))),
|
|
7654
|
-
/* @__PURE__ */ React
|
|
7654
|
+
/* @__PURE__ */ React.createElement(PortalWrapper, { renderInPortal }, state.isOpen && /* @__PURE__ */ React.createElement(react.PopoverContent, __spreadProps$e(__spreadValues$1p({}, dialogProps), { ref, w: "max-content" }), /* @__PURE__ */ React.createElement(focus.FocusScope, { contain: true, restoreFocus: true }, /* @__PURE__ */ React.createElement(DatePickerLocaleWrapper, { firstDayOfWeek }, /* @__PURE__ */ React.createElement(
|
|
7655
7655
|
RangeCalendar,
|
|
7656
7656
|
__spreadProps$e(__spreadValues$1p({}, calendarProps), {
|
|
7657
7657
|
resetDate,
|
|
@@ -7706,7 +7706,7 @@
|
|
|
7706
7706
|
"children"
|
|
7707
7707
|
]);
|
|
7708
7708
|
const containsInputGroupElement = ramda.not(ramda.all(ramda.isNil, [inputLeftElement, inputRightElement]));
|
|
7709
|
-
return containsInputGroupElement ? /* @__PURE__ */ React
|
|
7709
|
+
return containsInputGroupElement ? /* @__PURE__ */ React.createElement(react.InputGroup, __spreadValues$1o({}, rest), inputLeftElement, children, inputRightElement) : /* @__PURE__ */ React.createElement(React.Fragment, null, children);
|
|
7710
7710
|
};
|
|
7711
7711
|
|
|
7712
7712
|
var __defProp$1n = Object.defineProperty;
|
|
@@ -7737,7 +7737,7 @@
|
|
|
7737
7737
|
}
|
|
7738
7738
|
return target;
|
|
7739
7739
|
};
|
|
7740
|
-
const DatePickerField = React
|
|
7740
|
+
const DatePickerField = React.forwardRef((_a, ref) => {
|
|
7741
7741
|
var _b = _a, {
|
|
7742
7742
|
name,
|
|
7743
7743
|
minValue,
|
|
@@ -7776,7 +7776,7 @@
|
|
|
7776
7776
|
}
|
|
7777
7777
|
onChangeCallback(date$1);
|
|
7778
7778
|
};
|
|
7779
|
-
return /* @__PURE__ */ React
|
|
7779
|
+
return /* @__PURE__ */ React.createElement(
|
|
7780
7780
|
Field,
|
|
7781
7781
|
{
|
|
7782
7782
|
name,
|
|
@@ -7786,13 +7786,13 @@
|
|
|
7786
7786
|
validate,
|
|
7787
7787
|
ref
|
|
7788
7788
|
},
|
|
7789
|
-
({ value, onChange }, { formState: { errors } }) => /* @__PURE__ */ React
|
|
7789
|
+
({ value, onChange }, { formState: { errors } }) => /* @__PURE__ */ React.createElement(
|
|
7790
7790
|
InputGroupWrapper,
|
|
7791
7791
|
{
|
|
7792
7792
|
inputLeftElement,
|
|
7793
7793
|
inputRightElement
|
|
7794
7794
|
},
|
|
7795
|
-
/* @__PURE__ */ React
|
|
7795
|
+
/* @__PURE__ */ React.createElement(
|
|
7796
7796
|
DatePicker,
|
|
7797
7797
|
__spreadValues$1n({
|
|
7798
7798
|
firstDayOfWeek,
|
|
@@ -7838,7 +7838,7 @@
|
|
|
7838
7838
|
}
|
|
7839
7839
|
return target;
|
|
7840
7840
|
};
|
|
7841
|
-
const DateRangePickerField = React
|
|
7841
|
+
const DateRangePickerField = React.forwardRef((_a, ref) => {
|
|
7842
7842
|
var _b = _a, {
|
|
7843
7843
|
name,
|
|
7844
7844
|
minValue,
|
|
@@ -7879,7 +7879,7 @@
|
|
|
7879
7879
|
}
|
|
7880
7880
|
onChangeCallback(dateRange);
|
|
7881
7881
|
};
|
|
7882
|
-
return /* @__PURE__ */ React
|
|
7882
|
+
return /* @__PURE__ */ React.createElement(
|
|
7883
7883
|
Field,
|
|
7884
7884
|
{
|
|
7885
7885
|
name,
|
|
@@ -7889,7 +7889,7 @@
|
|
|
7889
7889
|
validate,
|
|
7890
7890
|
ref
|
|
7891
7891
|
},
|
|
7892
|
-
({ value, onChange }, { formState: { errors } }) => /* @__PURE__ */ React
|
|
7892
|
+
({ value, onChange }, { formState: { errors } }) => /* @__PURE__ */ React.createElement(
|
|
7893
7893
|
DateRangePicker,
|
|
7894
7894
|
__spreadValues$1m({
|
|
7895
7895
|
firstDayOfWeek,
|
|
@@ -7964,7 +7964,7 @@
|
|
|
7964
7964
|
]);
|
|
7965
7965
|
const iconVariant = variant;
|
|
7966
7966
|
const icon = tooltipIconMap[iconVariant];
|
|
7967
|
-
const TooltipContent = /* @__PURE__ */ React
|
|
7967
|
+
const TooltipContent = /* @__PURE__ */ React.createElement(react.HStack, { alignItems: "flex-start" }, hasIcon && /* @__PURE__ */ React.createElement(Icon, { as: icon, color: `icon.toast.${iconVariant}` }), /* @__PURE__ */ React.createElement(react.VStack, { spacing: 0, alignItems: "flex-start" }, /* @__PURE__ */ React.createElement(Label, { size: "sm" }, title), /* @__PURE__ */ React.createElement(
|
|
7968
7968
|
P,
|
|
7969
7969
|
{
|
|
7970
7970
|
variant: "14",
|
|
@@ -7974,7 +7974,7 @@
|
|
|
7974
7974
|
},
|
|
7975
7975
|
description
|
|
7976
7976
|
)));
|
|
7977
|
-
return /* @__PURE__ */ React
|
|
7977
|
+
return /* @__PURE__ */ React.createElement(
|
|
7978
7978
|
react.Tooltip,
|
|
7979
7979
|
__spreadValues$1l({
|
|
7980
7980
|
hasArrow,
|
|
@@ -8026,7 +8026,7 @@
|
|
|
8026
8026
|
const SVG_SIZE = 2 * (RADIUS + STROKE_WIDTH);
|
|
8027
8027
|
const CIRCUMFERENCE = 2 * Math.PI * RADIUS;
|
|
8028
8028
|
const strokeDashoffset = CIRCUMFERENCE - progress / 100 * CIRCUMFERENCE;
|
|
8029
|
-
return /* @__PURE__ */ React
|
|
8029
|
+
return /* @__PURE__ */ React.createElement(
|
|
8030
8030
|
react.Circle,
|
|
8031
8031
|
__spreadValues$1k({
|
|
8032
8032
|
as: "svg",
|
|
@@ -8036,7 +8036,7 @@
|
|
|
8036
8036
|
transform: "rotate(-90deg)"
|
|
8037
8037
|
}
|
|
8038
8038
|
}, rest),
|
|
8039
|
-
/* @__PURE__ */ React
|
|
8039
|
+
/* @__PURE__ */ React.createElement(
|
|
8040
8040
|
system.chakra.circle,
|
|
8041
8041
|
{
|
|
8042
8042
|
cx: SVG_SIZE / 2,
|
|
@@ -8047,7 +8047,7 @@
|
|
|
8047
8047
|
strokeWidth: STROKE_WIDTH
|
|
8048
8048
|
}
|
|
8049
8049
|
),
|
|
8050
|
-
/* @__PURE__ */ React
|
|
8050
|
+
/* @__PURE__ */ React.createElement(
|
|
8051
8051
|
system.chakra.circle,
|
|
8052
8052
|
{
|
|
8053
8053
|
cx: SVG_SIZE / 2,
|
|
@@ -8109,9 +8109,9 @@
|
|
|
8109
8109
|
"tooltipText",
|
|
8110
8110
|
"aria-label"
|
|
8111
8111
|
]);
|
|
8112
|
-
const [progress, setProgress] = React
|
|
8113
|
-
const [isHovering, setIsHovering] = React
|
|
8114
|
-
const timerRef = React
|
|
8112
|
+
const [progress, setProgress] = React.useState(0);
|
|
8113
|
+
const [isHovering, setIsHovering] = React.useState(false);
|
|
8114
|
+
const timerRef = React.useRef(void 0);
|
|
8115
8115
|
const clearTimer = () => {
|
|
8116
8116
|
if (timerRef.current) {
|
|
8117
8117
|
clearInterval(timerRef.current);
|
|
@@ -8119,7 +8119,7 @@
|
|
|
8119
8119
|
}
|
|
8120
8120
|
setProgress(0);
|
|
8121
8121
|
};
|
|
8122
|
-
React
|
|
8122
|
+
React.useEffect(() => clearTimer, []);
|
|
8123
8123
|
const startTimer = () => {
|
|
8124
8124
|
clearTimer();
|
|
8125
8125
|
const startTime = Date.now();
|
|
@@ -8141,7 +8141,7 @@
|
|
|
8141
8141
|
setIsHovering(false);
|
|
8142
8142
|
clearTimer();
|
|
8143
8143
|
};
|
|
8144
|
-
return /* @__PURE__ */ React
|
|
8144
|
+
return /* @__PURE__ */ React.createElement(Tooltip, { label: tooltipText, placement: "top" }, /* @__PURE__ */ React.createElement(
|
|
8145
8145
|
react.Center,
|
|
8146
8146
|
__spreadValues$1j({
|
|
8147
8147
|
position: "relative",
|
|
@@ -8153,16 +8153,16 @@
|
|
|
8153
8153
|
boxSize: "50px",
|
|
8154
8154
|
opacity: `${(100 - progress) / 100}`
|
|
8155
8155
|
}, rest),
|
|
8156
|
-
/* @__PURE__ */ React
|
|
8156
|
+
/* @__PURE__ */ React.createElement(
|
|
8157
8157
|
IconButton,
|
|
8158
8158
|
{
|
|
8159
|
-
icon: /* @__PURE__ */ React
|
|
8159
|
+
icon: /* @__PURE__ */ React.createElement(Icon, { as: icon }),
|
|
8160
8160
|
size: "md",
|
|
8161
8161
|
"aria-label": ariaLabel,
|
|
8162
8162
|
variant: "ghost"
|
|
8163
8163
|
}
|
|
8164
8164
|
),
|
|
8165
|
-
isHovering && /* @__PURE__ */ React
|
|
8165
|
+
isHovering && /* @__PURE__ */ React.createElement(
|
|
8166
8166
|
TimeoutProgressCircle,
|
|
8167
8167
|
{
|
|
8168
8168
|
ringColor,
|
|
@@ -8213,8 +8213,8 @@
|
|
|
8213
8213
|
return { offsetX: defaultOffset, offsetY: defaultOffset };
|
|
8214
8214
|
};
|
|
8215
8215
|
const useDelay = (show, enterDelay, exitDelay) => {
|
|
8216
|
-
const [showWithDelay, setShowWithDelay] = React
|
|
8217
|
-
React
|
|
8216
|
+
const [showWithDelay, setShowWithDelay] = React.useState(false);
|
|
8217
|
+
React.useEffect(() => {
|
|
8218
8218
|
const ref = setTimeout(
|
|
8219
8219
|
() => setShowWithDelay(show),
|
|
8220
8220
|
show ? enterDelay : exitDelay
|
|
@@ -8224,8 +8224,8 @@
|
|
|
8224
8224
|
return showWithDelay;
|
|
8225
8225
|
};
|
|
8226
8226
|
const useHiddenDisplay = (anchor = false, exitDelay = 0, exitDuration = 0, duration = 0, onTransitionComplete = ramda.identity) => {
|
|
8227
|
-
const [hidden, setHidden] = React
|
|
8228
|
-
React
|
|
8227
|
+
const [hidden, setHidden] = React.useState(anchor);
|
|
8228
|
+
React.useEffect(() => {
|
|
8229
8229
|
const ref = setTimeout(() => {
|
|
8230
8230
|
setHidden(anchor);
|
|
8231
8231
|
onTransitionComplete(anchor);
|
|
@@ -8291,7 +8291,7 @@
|
|
|
8291
8291
|
const showWithDelay = useDelay(show, enterDelay, exitDelay);
|
|
8292
8292
|
const isHidden = useHiddenDisplay(show, exitDelay, exitDuration, duration, onTransitionComplete);
|
|
8293
8293
|
const childrenWithProps = getChildrenWithFocus(children, disableFocus, isHidden);
|
|
8294
|
-
return /* @__PURE__ */ React
|
|
8294
|
+
return /* @__PURE__ */ React.createElement(
|
|
8295
8295
|
react.Fade,
|
|
8296
8296
|
__spreadValues$1i({
|
|
8297
8297
|
in: showWithDelay,
|
|
@@ -8358,7 +8358,7 @@
|
|
|
8358
8358
|
const showWithDelay = useDelay(show, enterDelay, exitDelay);
|
|
8359
8359
|
const isHidden = useHiddenDisplay(show, exitDelay, exitDuration, duration, onTransitionComplete);
|
|
8360
8360
|
const childrenWithProps = getChildrenWithFocus(children, disableFocus, isHidden);
|
|
8361
|
-
return /* @__PURE__ */ React
|
|
8361
|
+
return /* @__PURE__ */ React.createElement(
|
|
8362
8362
|
react.ScaleFade,
|
|
8363
8363
|
__spreadValues$1h({
|
|
8364
8364
|
in: showWithDelay,
|
|
@@ -8427,7 +8427,7 @@
|
|
|
8427
8427
|
const showWithDelay = useDelay(show, enterDelay, exitDelay);
|
|
8428
8428
|
const isHidden = useHiddenDisplay(show, exitDelay, exitDuration, duration, onTransitionComplete);
|
|
8429
8429
|
const childrenWithProps = getChildrenWithFocus(children, disableFocus, isHidden);
|
|
8430
|
-
return /* @__PURE__ */ React
|
|
8430
|
+
return /* @__PURE__ */ React.createElement(
|
|
8431
8431
|
react.Slide,
|
|
8432
8432
|
__spreadValues$1g({
|
|
8433
8433
|
in: showWithDelay,
|
|
@@ -8504,7 +8504,7 @@
|
|
|
8504
8504
|
const showWithDelay = useDelay(show, enterDelay, exitDelay);
|
|
8505
8505
|
const isHidden = useHiddenDisplay(show, exitDelay, exitDuration, duration, onTransitionComplete);
|
|
8506
8506
|
const childrenWithProps = getChildrenWithFocus(children, disableFocus, isHidden);
|
|
8507
|
-
return /* @__PURE__ */ React
|
|
8507
|
+
return /* @__PURE__ */ React.createElement(
|
|
8508
8508
|
react.SlideFade,
|
|
8509
8509
|
__spreadValues$1f({
|
|
8510
8510
|
in: showWithDelay,
|
|
@@ -8573,7 +8573,7 @@
|
|
|
8573
8573
|
const showWithDelay = useDelay(show, enterDelay, exitDelay);
|
|
8574
8574
|
const isHidden = useHiddenDisplay(show, exitDelay, exitDuration, duration, onTransitionComplete);
|
|
8575
8575
|
const childrenWithProps = getChildrenWithFocus(children, disableFocus, isHidden);
|
|
8576
|
-
return /* @__PURE__ */ React
|
|
8576
|
+
return /* @__PURE__ */ React.createElement(
|
|
8577
8577
|
react.Collapse,
|
|
8578
8578
|
__spreadValues$1e({
|
|
8579
8579
|
in: showWithDelay,
|
|
@@ -8664,13 +8664,13 @@
|
|
|
8664
8664
|
defaultWidthPx,
|
|
8665
8665
|
stationaryEdge: direction
|
|
8666
8666
|
});
|
|
8667
|
-
return /* @__PURE__ */ React
|
|
8667
|
+
return /* @__PURE__ */ React.createElement(
|
|
8668
8668
|
react.Box,
|
|
8669
8669
|
{
|
|
8670
8670
|
w: adjustableWidth,
|
|
8671
8671
|
display: isOpen && shouldPush ? "initial" : "none"
|
|
8672
8672
|
},
|
|
8673
|
-
/* @__PURE__ */ React
|
|
8673
|
+
/* @__PURE__ */ React.createElement(react.Portal, null, /* @__PURE__ */ React.createElement(
|
|
8674
8674
|
Slide,
|
|
8675
8675
|
{
|
|
8676
8676
|
direction,
|
|
@@ -8681,7 +8681,7 @@
|
|
|
8681
8681
|
zIndex
|
|
8682
8682
|
}
|
|
8683
8683
|
},
|
|
8684
|
-
/* @__PURE__ */ React
|
|
8684
|
+
/* @__PURE__ */ React.createElement(
|
|
8685
8685
|
react.Flex,
|
|
8686
8686
|
__spreadValues$1d({
|
|
8687
8687
|
sx: __spreadProps$d(__spreadValues$1d({}, container), { w: adjustableWidth }),
|
|
@@ -8690,8 +8690,8 @@
|
|
|
8690
8690
|
overflow: "hidden",
|
|
8691
8691
|
direction: direction === "left" ? "row-reverse" : "row"
|
|
8692
8692
|
}, rest),
|
|
8693
|
-
isResizable && /* @__PURE__ */ React
|
|
8694
|
-
/* @__PURE__ */ React
|
|
8693
|
+
isResizable && /* @__PURE__ */ React.createElement(ResizeHandle, __spreadValues$1d({}, resizeProps)),
|
|
8694
|
+
/* @__PURE__ */ React.createElement(focus.FocusScope, { autoFocus }, /* @__PURE__ */ React.createElement(react.VStack, { w: "full", h: "full", alignItems: "normal" }, newChildren))
|
|
8695
8695
|
)
|
|
8696
8696
|
))
|
|
8697
8697
|
);
|
|
@@ -8734,7 +8734,7 @@
|
|
|
8734
8734
|
"onClose"
|
|
8735
8735
|
]);
|
|
8736
8736
|
const { header } = system.useMultiStyleConfig("Toolbox", {});
|
|
8737
|
-
return /* @__PURE__ */ React
|
|
8737
|
+
return /* @__PURE__ */ React.createElement(react.Flex, __spreadValues$1c({ sx: header }, rest), typeof children === "string" ? /* @__PURE__ */ React.createElement(H4, null, children) : children, /* @__PURE__ */ React.createElement(
|
|
8738
8738
|
react.CloseButton,
|
|
8739
8739
|
{
|
|
8740
8740
|
"aria-label": "Close toolbox",
|
|
@@ -8776,7 +8776,7 @@
|
|
|
8776
8776
|
const ToolboxContent = (_a) => {
|
|
8777
8777
|
var _b = _a, { sx = {}, children } = _b, rest = __objRest$_(_b, ["sx", "children"]);
|
|
8778
8778
|
const { body } = system.useMultiStyleConfig("Toolbox", {});
|
|
8779
|
-
return /* @__PURE__ */ React
|
|
8779
|
+
return /* @__PURE__ */ React.createElement(
|
|
8780
8780
|
react.Flex,
|
|
8781
8781
|
__spreadValues$1b({
|
|
8782
8782
|
sx: ramda.merge(body, sx)
|
|
@@ -8816,7 +8816,7 @@
|
|
|
8816
8816
|
const ToolboxFooter = (_a) => {
|
|
8817
8817
|
var _b = _a, { children } = _b, rest = __objRest$Z(_b, ["children"]);
|
|
8818
8818
|
const { footer } = system.useMultiStyleConfig("Toolbox", {});
|
|
8819
|
-
return /* @__PURE__ */ React
|
|
8819
|
+
return /* @__PURE__ */ React.createElement(react.Flex, __spreadValues$1a({ sx: footer }, rest), children);
|
|
8820
8820
|
};
|
|
8821
8821
|
|
|
8822
8822
|
var __defProp$19 = Object.defineProperty;
|
|
@@ -8859,7 +8859,7 @@
|
|
|
8859
8859
|
"name",
|
|
8860
8860
|
"value"
|
|
8861
8861
|
]);
|
|
8862
|
-
return /* @__PURE__ */ React
|
|
8862
|
+
return /* @__PURE__ */ React.createElement(
|
|
8863
8863
|
react.Radio,
|
|
8864
8864
|
__spreadValues$19({
|
|
8865
8865
|
size,
|
|
@@ -8908,7 +8908,7 @@
|
|
|
8908
8908
|
"children",
|
|
8909
8909
|
"name"
|
|
8910
8910
|
]);
|
|
8911
|
-
return /* @__PURE__ */ React
|
|
8911
|
+
return /* @__PURE__ */ React.createElement(react.RadioGroup, __spreadValues$18({ name, id: name }, rest), /* @__PURE__ */ React.createElement(react.Stack, { direction }, children));
|
|
8912
8912
|
};
|
|
8913
8913
|
|
|
8914
8914
|
var __defProp$17 = Object.defineProperty;
|
|
@@ -8939,7 +8939,7 @@
|
|
|
8939
8939
|
}
|
|
8940
8940
|
return target;
|
|
8941
8941
|
};
|
|
8942
|
-
const RadioGroupField = React
|
|
8942
|
+
const RadioGroupField = React.forwardRef((_a, ref) => {
|
|
8943
8943
|
var _b = _a, {
|
|
8944
8944
|
name,
|
|
8945
8945
|
label,
|
|
@@ -8957,7 +8957,7 @@
|
|
|
8957
8957
|
"validate",
|
|
8958
8958
|
"onChange"
|
|
8959
8959
|
]);
|
|
8960
|
-
return /* @__PURE__ */ React
|
|
8960
|
+
return /* @__PURE__ */ React.createElement(react.Box, { w: label ? "full" : "fit-content" }, /* @__PURE__ */ React.createElement(
|
|
8961
8961
|
Field,
|
|
8962
8962
|
{
|
|
8963
8963
|
name,
|
|
@@ -8967,7 +8967,7 @@
|
|
|
8967
8967
|
validate,
|
|
8968
8968
|
ref
|
|
8969
8969
|
},
|
|
8970
|
-
({ onChange, value }) => /* @__PURE__ */ React
|
|
8970
|
+
({ onChange, value }) => /* @__PURE__ */ React.createElement(
|
|
8971
8971
|
RadioGroup,
|
|
8972
8972
|
__spreadValues$17({
|
|
8973
8973
|
name,
|
|
@@ -8996,7 +8996,7 @@
|
|
|
8996
8996
|
isActive = false,
|
|
8997
8997
|
itemWidth = carouselItemWidth,
|
|
8998
8998
|
itemHeight = carouselItemWidth
|
|
8999
|
-
}) => /* @__PURE__ */ React
|
|
8999
|
+
}) => /* @__PURE__ */ React.createElement(framerMotion.motion.div, { animate: isActive ? "active" : "inActive", variants }, /* @__PURE__ */ React.createElement(react.Center, { minW: `${itemWidth}px`, h: `${itemHeight}px ` }, children));
|
|
9000
9000
|
|
|
9001
9001
|
var __defProp$16 = Object.defineProperty;
|
|
9002
9002
|
var __getOwnPropSymbols$16 = Object.getOwnPropertySymbols;
|
|
@@ -9035,13 +9035,13 @@
|
|
|
9035
9035
|
"direction"
|
|
9036
9036
|
]);
|
|
9037
9037
|
const { arrow } = react.useMultiStyleConfig("Carousel", {});
|
|
9038
|
-
return /* @__PURE__ */ React
|
|
9038
|
+
return /* @__PURE__ */ React.createElement(
|
|
9039
9039
|
react.Center,
|
|
9040
9040
|
__spreadValues$16({
|
|
9041
9041
|
sx: arrow,
|
|
9042
9042
|
onClick
|
|
9043
9043
|
}, rest),
|
|
9044
|
-
/* @__PURE__ */ React
|
|
9044
|
+
/* @__PURE__ */ React.createElement(IconButton, { "aria-label": `move carousel to ${direction}`, variant: "ghost", size: "lg" }, /* @__PURE__ */ React.createElement(Icon, { as: direction === "right" ? icons.ChevronRightSolid : icons.ChevronLeftSolid }))
|
|
9045
9045
|
);
|
|
9046
9046
|
};
|
|
9047
9047
|
|
|
@@ -9095,28 +9095,28 @@
|
|
|
9095
9095
|
"spacing",
|
|
9096
9096
|
"carouselStyles"
|
|
9097
9097
|
]);
|
|
9098
|
-
const [dragging, setDragging] = React
|
|
9099
|
-
const [containerWidth, setContainerWidth] = React
|
|
9100
|
-
const [activeIndex, setActiveIndex] = React
|
|
9098
|
+
const [dragging, setDragging] = React.useState(false);
|
|
9099
|
+
const [containerWidth, setContainerWidth] = React.useState(0);
|
|
9100
|
+
const [activeIndex, setActiveIndex] = React.useState(0);
|
|
9101
9101
|
const x = framerMotion.useMotionValue(0);
|
|
9102
9102
|
const { radio, container } = react.useMultiStyleConfig("Carousel", {});
|
|
9103
|
-
const childrenAsArray = React
|
|
9104
|
-
const numberOfChildren = React
|
|
9103
|
+
const childrenAsArray = React.Children.toArray(children);
|
|
9104
|
+
const numberOfChildren = React.Children.count(children);
|
|
9105
9105
|
const carouselTotalWidth = itemWidth + spacing;
|
|
9106
9106
|
const totalWidth = carouselTotalWidth * numberOfChildren;
|
|
9107
|
-
const containerRef = React
|
|
9108
|
-
React
|
|
9107
|
+
const containerRef = React.useRef(null);
|
|
9108
|
+
React.useEffect(() => {
|
|
9109
9109
|
setContainerWidth(containerRef.current.clientWidth);
|
|
9110
9110
|
}, []);
|
|
9111
9111
|
const getNewX = () => -(activeIndex * carouselTotalWidth);
|
|
9112
9112
|
const updateActiveIndex = () => {
|
|
9113
9113
|
setActiveIndex(Math.abs(Math.round(x.get() / carouselTotalWidth)));
|
|
9114
9114
|
};
|
|
9115
|
-
React
|
|
9115
|
+
React.useEffect(() => {
|
|
9116
9116
|
framerMotion.animate(x, getNewX());
|
|
9117
9117
|
onChange(activeIndex);
|
|
9118
9118
|
}, [activeIndex]);
|
|
9119
|
-
React
|
|
9119
|
+
React.useEffect(() => {
|
|
9120
9120
|
setActiveIndex(controlledIndex);
|
|
9121
9121
|
}, [controlledIndex]);
|
|
9122
9122
|
const handleRightArrowClick = () => {
|
|
@@ -9129,7 +9129,7 @@
|
|
|
9129
9129
|
(prev) => activeIndex === 0 ? numberOfChildren - 1 : prev - 1
|
|
9130
9130
|
);
|
|
9131
9131
|
};
|
|
9132
|
-
return /* @__PURE__ */ React
|
|
9132
|
+
return /* @__PURE__ */ React.createElement(
|
|
9133
9133
|
react.Box,
|
|
9134
9134
|
__spreadValues$15({
|
|
9135
9135
|
cursor: dragging ? "grabbing" : "grab",
|
|
@@ -9139,7 +9139,7 @@
|
|
|
9139
9139
|
pl: `${(containerWidth - itemWidth) / 2}px`,
|
|
9140
9140
|
sx: container
|
|
9141
9141
|
}, rest),
|
|
9142
|
-
/* @__PURE__ */ React
|
|
9142
|
+
/* @__PURE__ */ React.createElement(
|
|
9143
9143
|
framerMotion.motion.div,
|
|
9144
9144
|
{
|
|
9145
9145
|
drag: "x",
|
|
@@ -9151,14 +9151,14 @@
|
|
|
9151
9151
|
dragConstraints: { right: 0, left: -(totalWidth - itemWidth) },
|
|
9152
9152
|
onDragEnd: updateActiveIndex
|
|
9153
9153
|
},
|
|
9154
|
-
/* @__PURE__ */ React
|
|
9154
|
+
/* @__PURE__ */ React.createElement(
|
|
9155
9155
|
react.HStack,
|
|
9156
9156
|
__spreadValues$15({
|
|
9157
9157
|
spacing: `${spacing}px`,
|
|
9158
9158
|
width: `${totalWidth}px`,
|
|
9159
9159
|
h: "full"
|
|
9160
9160
|
}, carouselStyles),
|
|
9161
|
-
childrenAsArray.map((child, index) => /* @__PURE__ */ React
|
|
9161
|
+
childrenAsArray.map((child, index) => /* @__PURE__ */ React.createElement(
|
|
9162
9162
|
CarouselItem,
|
|
9163
9163
|
{
|
|
9164
9164
|
isActive: index === activeIndex,
|
|
@@ -9170,14 +9170,14 @@
|
|
|
9170
9170
|
))
|
|
9171
9171
|
)
|
|
9172
9172
|
),
|
|
9173
|
-
showRadio && /* @__PURE__ */ React
|
|
9173
|
+
showRadio && /* @__PURE__ */ React.createElement(
|
|
9174
9174
|
RadioGroup,
|
|
9175
9175
|
{
|
|
9176
9176
|
onChange: (val) => setActiveIndex(parseInt(val, 10)),
|
|
9177
9177
|
value: `${activeIndex}`,
|
|
9178
9178
|
sx: radio
|
|
9179
9179
|
},
|
|
9180
|
-
/* @__PURE__ */ React
|
|
9180
|
+
/* @__PURE__ */ React.createElement(react.HStack, null, childrenAsArray.map((_child, i) => /* @__PURE__ */ React.createElement(
|
|
9181
9181
|
Radio,
|
|
9182
9182
|
{
|
|
9183
9183
|
value: `${i}`,
|
|
@@ -9186,14 +9186,14 @@
|
|
|
9186
9186
|
}
|
|
9187
9187
|
)))
|
|
9188
9188
|
),
|
|
9189
|
-
showArrows && /* @__PURE__ */ React
|
|
9189
|
+
showArrows && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
9190
9190
|
CarouselArrow,
|
|
9191
9191
|
{
|
|
9192
9192
|
direction: "left",
|
|
9193
9193
|
onClick: handleLeftArrowClick,
|
|
9194
9194
|
left: "2"
|
|
9195
9195
|
}
|
|
9196
|
-
), /* @__PURE__ */ React
|
|
9196
|
+
), /* @__PURE__ */ React.createElement(
|
|
9197
9197
|
CarouselArrow,
|
|
9198
9198
|
{
|
|
9199
9199
|
direction: "right",
|
|
@@ -9288,17 +9288,17 @@
|
|
|
9288
9288
|
function getComponents(components) {
|
|
9289
9289
|
return ramda.merge(
|
|
9290
9290
|
{
|
|
9291
|
-
Menu: (props) => /* @__PURE__ */ React
|
|
9292
|
-
DropdownIndicator: (props) => props.selectProps.icon ? /* @__PURE__ */ React
|
|
9293
|
-
Option: (props) => props.selectProps.customOption ? /* @__PURE__ */ React
|
|
9294
|
-
MultiValueContainer: (props) => props.selectProps.customTag ? /* @__PURE__ */ React
|
|
9291
|
+
Menu: (props) => /* @__PURE__ */ React.createElement(react.Box, { "data-testid": "select-menu-wrapper-test-id" }, /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.Menu, __spreadValues$13({}, props), props.children)),
|
|
9292
|
+
DropdownIndicator: (props) => props.selectProps.icon ? /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.DropdownIndicator, __spreadValues$13({}, props), /* @__PURE__ */ React.createElement(Icon, { as: props.selectProps.icon })) : /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.DropdownIndicator, __spreadValues$13({}, props)),
|
|
9293
|
+
Option: (props) => props.selectProps.customOption ? /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.Option, __spreadValues$13({}, props), props.selectProps.customOption(props.data)) : /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.Option, __spreadValues$13({}, props)),
|
|
9294
|
+
MultiValueContainer: (props) => props.selectProps.customTag ? /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.MultiValueContainer, __spreadValues$13({}, props), props.selectProps.customTag(props.data)) : /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.MultiValueContainer, __spreadValues$13({}, props)),
|
|
9295
9295
|
Control: (_a) => {
|
|
9296
9296
|
var _b = _a, {
|
|
9297
9297
|
children
|
|
9298
9298
|
} = _b, props = __objRest$T(_b, [
|
|
9299
9299
|
"children"
|
|
9300
9300
|
]);
|
|
9301
|
-
return props.selectProps.leftComponent ? /* @__PURE__ */ React
|
|
9301
|
+
return props.selectProps.leftComponent ? /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.Control, __spreadValues$13({}, props), /* @__PURE__ */ React.createElement(react.HStack, { w: "full", pl: "2" }, props.selectProps.leftComponent, /* @__PURE__ */ React.createElement(react.HStack, { w: "full", justify: "space-between" }, children))) : /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.Control, __spreadValues$13({}, props), children);
|
|
9302
9302
|
}
|
|
9303
9303
|
},
|
|
9304
9304
|
components || {}
|
|
@@ -9333,7 +9333,7 @@
|
|
|
9333
9333
|
}
|
|
9334
9334
|
return target;
|
|
9335
9335
|
};
|
|
9336
|
-
const SearchBar = React
|
|
9336
|
+
const SearchBar = React.forwardRef(
|
|
9337
9337
|
(_a, ref) => {
|
|
9338
9338
|
var _b = _a, {
|
|
9339
9339
|
defaultOptions = [],
|
|
@@ -9370,9 +9370,9 @@
|
|
|
9370
9370
|
"onSearchInputChange",
|
|
9371
9371
|
"icon"
|
|
9372
9372
|
]);
|
|
9373
|
-
const [filtered, setFiltered] = React
|
|
9374
|
-
const [filterInput, setFilterInput] = React
|
|
9375
|
-
const debounceFunction = React
|
|
9373
|
+
const [filtered, setFiltered] = React.useState(defaultOptions);
|
|
9374
|
+
const [filterInput, setFilterInput] = React.useState("");
|
|
9375
|
+
const debounceFunction = React.useMemo(
|
|
9376
9376
|
() => createDebounceFunctionInstance(debouncedWaitTime),
|
|
9377
9377
|
[debouncedWaitTime]
|
|
9378
9378
|
);
|
|
@@ -9383,7 +9383,7 @@
|
|
|
9383
9383
|
isMulti,
|
|
9384
9384
|
value: ramda.is(Array, value) ? value : []
|
|
9385
9385
|
});
|
|
9386
|
-
const customComponents = React
|
|
9386
|
+
const customComponents = React.useMemo(
|
|
9387
9387
|
() => getComponents(),
|
|
9388
9388
|
[]
|
|
9389
9389
|
);
|
|
@@ -9418,7 +9418,7 @@
|
|
|
9418
9418
|
}
|
|
9419
9419
|
}
|
|
9420
9420
|
};
|
|
9421
|
-
return /* @__PURE__ */ React
|
|
9421
|
+
return /* @__PURE__ */ React.createElement(react.Box, { w: "full", "data-testid": testId }, /* @__PURE__ */ React.createElement(
|
|
9422
9422
|
chakraReactSelect.AsyncSelect,
|
|
9423
9423
|
__spreadValues$12({
|
|
9424
9424
|
cacheOptions: true,
|
|
@@ -9498,7 +9498,7 @@
|
|
|
9498
9498
|
"inputLeftElement",
|
|
9499
9499
|
"inputRightElement"
|
|
9500
9500
|
]);
|
|
9501
|
-
return /* @__PURE__ */ React
|
|
9501
|
+
return /* @__PURE__ */ React.createElement(
|
|
9502
9502
|
Field,
|
|
9503
9503
|
{
|
|
9504
9504
|
name,
|
|
@@ -9509,13 +9509,13 @@
|
|
|
9509
9509
|
validate,
|
|
9510
9510
|
ref
|
|
9511
9511
|
},
|
|
9512
|
-
({ value, onChange }) => /* @__PURE__ */ React
|
|
9512
|
+
({ value, onChange }) => /* @__PURE__ */ React.createElement(react.HStack, { w: "full" }, /* @__PURE__ */ React.createElement(
|
|
9513
9513
|
InputGroupWrapper,
|
|
9514
9514
|
{
|
|
9515
9515
|
inputLeftElement,
|
|
9516
9516
|
inputRightElement
|
|
9517
9517
|
},
|
|
9518
|
-
/* @__PURE__ */ React
|
|
9518
|
+
/* @__PURE__ */ React.createElement(
|
|
9519
9519
|
SearchBar,
|
|
9520
9520
|
__spreadValues$11({
|
|
9521
9521
|
name,
|
|
@@ -9529,7 +9529,7 @@
|
|
|
9529
9529
|
value
|
|
9530
9530
|
}, rest)
|
|
9531
9531
|
)
|
|
9532
|
-
), /* @__PURE__ */ React
|
|
9532
|
+
), /* @__PURE__ */ React.createElement(
|
|
9533
9533
|
IconButton,
|
|
9534
9534
|
{
|
|
9535
9535
|
"aria-label": `${name}-close-button`,
|
|
@@ -9538,12 +9538,12 @@
|
|
|
9538
9538
|
fontSize: "sm",
|
|
9539
9539
|
hidden: ramda.isEmpty(value) || !isClearable,
|
|
9540
9540
|
onClick: () => onChange([]),
|
|
9541
|
-
icon: /* @__PURE__ */ React
|
|
9541
|
+
icon: /* @__PURE__ */ React.createElement(Icon, { as: icons.XCloseSolid })
|
|
9542
9542
|
}
|
|
9543
9543
|
))
|
|
9544
9544
|
);
|
|
9545
9545
|
};
|
|
9546
|
-
const SearchBarField = React
|
|
9546
|
+
const SearchBarField = React.forwardRef(BaseSearchBarField);
|
|
9547
9547
|
|
|
9548
9548
|
var __defProp$10 = Object.defineProperty;
|
|
9549
9549
|
var __getOwnPropSymbols$10 = Object.getOwnPropertySymbols;
|
|
@@ -9561,7 +9561,7 @@
|
|
|
9561
9561
|
}
|
|
9562
9562
|
return a;
|
|
9563
9563
|
};
|
|
9564
|
-
const DragAndDrop = (props) => /* @__PURE__ */ React
|
|
9564
|
+
const DragAndDrop = (props) => /* @__PURE__ */ React.createElement(core.DndContext, __spreadValues$10({}, props));
|
|
9565
9565
|
|
|
9566
9566
|
var __defProp$$ = Object.defineProperty;
|
|
9567
9567
|
var __getOwnPropSymbols$$ = Object.getOwnPropertySymbols;
|
|
@@ -9591,7 +9591,7 @@
|
|
|
9591
9591
|
}
|
|
9592
9592
|
return target;
|
|
9593
9593
|
};
|
|
9594
|
-
const Tag = React
|
|
9594
|
+
const Tag = React.forwardRef((_a, ref) => {
|
|
9595
9595
|
var _b = _a, {
|
|
9596
9596
|
children,
|
|
9597
9597
|
variant = "solid",
|
|
@@ -9603,7 +9603,7 @@
|
|
|
9603
9603
|
"bgColor",
|
|
9604
9604
|
"colorScheme"
|
|
9605
9605
|
]);
|
|
9606
|
-
return /* @__PURE__ */ React
|
|
9606
|
+
return /* @__PURE__ */ React.createElement(
|
|
9607
9607
|
react.Tag,
|
|
9608
9608
|
__spreadValues$$({
|
|
9609
9609
|
bgColor,
|
|
@@ -9617,7 +9617,7 @@
|
|
|
9617
9617
|
|
|
9618
9618
|
const OverflowIndicator = ({
|
|
9619
9619
|
nbrRemainingTags
|
|
9620
|
-
}) => /* @__PURE__ */ React
|
|
9620
|
+
}) => /* @__PURE__ */ React.createElement(Tag, { variant: "subtle", minW: "max-content" }, "+", nbrRemainingTags);
|
|
9621
9621
|
|
|
9622
9622
|
var __defProp$_ = Object.defineProperty;
|
|
9623
9623
|
var __getOwnPropSymbols$_ = Object.getOwnPropertySymbols;
|
|
@@ -9659,17 +9659,17 @@
|
|
|
9659
9659
|
"spacing",
|
|
9660
9660
|
"OverflowIndicator"
|
|
9661
9661
|
]);
|
|
9662
|
-
const [nbrRemainingTags, setNbrRemainingTags] = React
|
|
9662
|
+
const [nbrRemainingTags, setNbrRemainingTags] = React.useState(0);
|
|
9663
9663
|
const { rect, containerRef } = useOverflowGroup();
|
|
9664
|
-
return /* @__PURE__ */ React
|
|
9664
|
+
return /* @__PURE__ */ React.createElement(
|
|
9665
9665
|
react.HStack,
|
|
9666
9666
|
__spreadValues$_({
|
|
9667
9667
|
bgColor: "background.default",
|
|
9668
9668
|
ref: containerRef,
|
|
9669
9669
|
overflow: "hidden"
|
|
9670
9670
|
}, rest),
|
|
9671
|
-
/* @__PURE__ */ React
|
|
9672
|
-
nbrRemainingTags > 0 && /* @__PURE__ */ React
|
|
9671
|
+
/* @__PURE__ */ React.createElement(react.HStack, { spacing }, /* @__PURE__ */ React.createElement(OverflowGroup, { max, onChange: setNbrRemainingTags, rect }, children)),
|
|
9672
|
+
nbrRemainingTags > 0 && /* @__PURE__ */ React.createElement(OverflowIndicator$1, { nbrRemainingTags })
|
|
9673
9673
|
);
|
|
9674
9674
|
};
|
|
9675
9675
|
|
|
@@ -9701,7 +9701,7 @@
|
|
|
9701
9701
|
}
|
|
9702
9702
|
return target;
|
|
9703
9703
|
};
|
|
9704
|
-
const DragItem = React
|
|
9704
|
+
const DragItem = React.forwardRef(
|
|
9705
9705
|
(_a, ref) => {
|
|
9706
9706
|
var _b = _a, {
|
|
9707
9707
|
size = "md",
|
|
@@ -9714,7 +9714,7 @@
|
|
|
9714
9714
|
"itemLabel",
|
|
9715
9715
|
"bgColor"
|
|
9716
9716
|
]);
|
|
9717
|
-
return /* @__PURE__ */ React
|
|
9717
|
+
return /* @__PURE__ */ React.createElement(
|
|
9718
9718
|
Tag,
|
|
9719
9719
|
__spreadValues$Z({
|
|
9720
9720
|
ref,
|
|
@@ -9723,8 +9723,8 @@
|
|
|
9723
9723
|
size,
|
|
9724
9724
|
minW: "max-content"
|
|
9725
9725
|
}, rest),
|
|
9726
|
-
/* @__PURE__ */ React
|
|
9727
|
-
/* @__PURE__ */ React
|
|
9726
|
+
/* @__PURE__ */ React.createElement(react.TagLabel, null, itemLabel),
|
|
9727
|
+
/* @__PURE__ */ React.createElement(react.TagRightIcon, null, /* @__PURE__ */ React.createElement(Icon, { as: icons.DotsMatrixSolid }))
|
|
9728
9728
|
);
|
|
9729
9729
|
}
|
|
9730
9730
|
);
|
|
@@ -9786,13 +9786,13 @@
|
|
|
9786
9786
|
"isDragging"
|
|
9787
9787
|
]);
|
|
9788
9788
|
if (!listeners) {
|
|
9789
|
-
return /* @__PURE__ */ React
|
|
9789
|
+
return /* @__PURE__ */ React.createElement(DragItem, { itemLabel });
|
|
9790
9790
|
}
|
|
9791
|
-
const childrenWithDragCursor = React
|
|
9791
|
+
const childrenWithDragCursor = React.isValidElement(children) ? React.cloneElement(children, {
|
|
9792
9792
|
cursor: isDragging ? "grabbing" : "grab"
|
|
9793
9793
|
}) : children;
|
|
9794
9794
|
const dragEventListeners = !disableDrag && listeners;
|
|
9795
|
-
return /* @__PURE__ */ React
|
|
9795
|
+
return /* @__PURE__ */ React.createElement(
|
|
9796
9796
|
react.Box,
|
|
9797
9797
|
__spreadValues$Y(__spreadProps$b(__spreadValues$Y({
|
|
9798
9798
|
ref: setNodeRef
|
|
@@ -9803,7 +9803,7 @@
|
|
|
9803
9803
|
w: "max-content",
|
|
9804
9804
|
"data-testid": dataTestId
|
|
9805
9805
|
}), dragEventListeners),
|
|
9806
|
-
typeof childrenWithDragCursor === "function" ? childrenWithDragCursor(listeners, props) : childrenWithDragCursor || /* @__PURE__ */ React
|
|
9806
|
+
typeof childrenWithDragCursor === "function" ? childrenWithDragCursor(listeners, props) : childrenWithDragCursor || /* @__PURE__ */ React.createElement(DragItem, { isDragging, itemLabel })
|
|
9807
9807
|
);
|
|
9808
9808
|
};
|
|
9809
9809
|
|
|
@@ -9844,7 +9844,7 @@
|
|
|
9844
9844
|
"data-testid"
|
|
9845
9845
|
]);
|
|
9846
9846
|
const _a2 = core.useDroppable(__spreadValues$X({}, rest)), { setNodeRef } = _a2, props = __objRest$M(_a2, ["setNodeRef"]);
|
|
9847
|
-
return /* @__PURE__ */ React
|
|
9847
|
+
return /* @__PURE__ */ React.createElement(react.Box, { ref: setNodeRef, "data-testid": testId }, typeof children === "function" ? children(props) : children || /* @__PURE__ */ React.createElement(react.Center, null, "Drop here"));
|
|
9848
9848
|
};
|
|
9849
9849
|
|
|
9850
9850
|
var __defProp$W = Object.defineProperty;
|
|
@@ -9863,7 +9863,7 @@
|
|
|
9863
9863
|
}
|
|
9864
9864
|
return a;
|
|
9865
9865
|
};
|
|
9866
|
-
const Sortable = (props) => /* @__PURE__ */ React
|
|
9866
|
+
const Sortable = (props) => /* @__PURE__ */ React.createElement(sortable.SortableContext, __spreadValues$W({}, props));
|
|
9867
9867
|
|
|
9868
9868
|
var __defProp$V = Object.defineProperty;
|
|
9869
9869
|
var __defProps$a = Object.defineProperties;
|
|
@@ -9926,10 +9926,10 @@
|
|
|
9926
9926
|
"isDragging"
|
|
9927
9927
|
]);
|
|
9928
9928
|
if (!listeners) {
|
|
9929
|
-
return /* @__PURE__ */ React
|
|
9929
|
+
return /* @__PURE__ */ React.createElement(DragItem, { itemLabel });
|
|
9930
9930
|
}
|
|
9931
|
-
const timeStampSnapchot = React
|
|
9932
|
-
const inEditMode = React
|
|
9931
|
+
const timeStampSnapchot = React.useRef(0);
|
|
9932
|
+
const inEditMode = React.useRef(false);
|
|
9933
9933
|
const { onPointerDown, onKeyDown } = listeners;
|
|
9934
9934
|
const handlePointerDown = (e) => {
|
|
9935
9935
|
const elapsedTime = e.timeStamp - timeStampSnapchot.current;
|
|
@@ -9950,14 +9950,14 @@
|
|
|
9950
9950
|
transform: utilities.CSS.Translate.toString(transform),
|
|
9951
9951
|
transition
|
|
9952
9952
|
};
|
|
9953
|
-
const childrenWithDragCursor = React
|
|
9953
|
+
const childrenWithDragCursor = React.isValidElement(children) ? React.cloneElement(children, {
|
|
9954
9954
|
cursor: isDragging ? "grabbing" : "grab"
|
|
9955
9955
|
}) : children;
|
|
9956
9956
|
const dragEventListeners = !disableDrag && {
|
|
9957
9957
|
onPointerDown: handlePointerDown,
|
|
9958
9958
|
onKeyDown: handleKeyDown
|
|
9959
9959
|
};
|
|
9960
|
-
return /* @__PURE__ */ React
|
|
9960
|
+
return /* @__PURE__ */ React.createElement(
|
|
9961
9961
|
react.Box,
|
|
9962
9962
|
__spreadValues$V(__spreadProps$a(__spreadValues$V({
|
|
9963
9963
|
ref: setNodeRef,
|
|
@@ -9968,7 +9968,7 @@
|
|
|
9968
9968
|
borderRadius: "tag.default",
|
|
9969
9969
|
"data-testid": dataTestId
|
|
9970
9970
|
}), dragEventListeners),
|
|
9971
|
-
(typeof childrenWithDragCursor === "function" ? childrenWithDragCursor(listeners, props) : childrenWithDragCursor) || /* @__PURE__ */ React
|
|
9971
|
+
(typeof childrenWithDragCursor === "function" ? childrenWithDragCursor(listeners, props) : childrenWithDragCursor) || /* @__PURE__ */ React.createElement(DragItem, { isDragging, itemLabel })
|
|
9972
9972
|
);
|
|
9973
9973
|
};
|
|
9974
9974
|
|
|
@@ -10002,7 +10002,7 @@
|
|
|
10002
10002
|
};
|
|
10003
10003
|
const DragHandle = (_a) => {
|
|
10004
10004
|
var _b = _a, { icon, isDragging } = _b, rest = __objRest$K(_b, ["icon", "isDragging"]);
|
|
10005
|
-
return /* @__PURE__ */ React
|
|
10005
|
+
return /* @__PURE__ */ React.createElement(
|
|
10006
10006
|
Icon,
|
|
10007
10007
|
__spreadValues$U({
|
|
10008
10008
|
as: icon || icons.DragDuo,
|
|
@@ -10042,7 +10042,7 @@
|
|
|
10042
10042
|
const DropZone = (_a) => {
|
|
10043
10043
|
var _b = _a, { sx = {}, name, children } = _b, rest = __objRest$J(_b, ["sx", "name", "children"]);
|
|
10044
10044
|
const { dropZone } = react.useMultiStyleConfig("DragAndDrop", { sx });
|
|
10045
|
-
return /* @__PURE__ */ React
|
|
10045
|
+
return /* @__PURE__ */ React.createElement(Droppable, { id: name }, /* @__PURE__ */ React.createElement(react.Stack, __spreadValues$T({ sx: dropZone }, rest), children));
|
|
10046
10046
|
};
|
|
10047
10047
|
|
|
10048
10048
|
var __defProp$S = Object.defineProperty;
|
|
@@ -10072,7 +10072,7 @@
|
|
|
10072
10072
|
collisionDetection,
|
|
10073
10073
|
sensors
|
|
10074
10074
|
}) {
|
|
10075
|
-
const [activeItem, setActiveItem] = React
|
|
10075
|
+
const [activeItem, setActiveItem] = React.useState(null);
|
|
10076
10076
|
const moveBetweenContainers = (activeContainerName, activeIndex, overContainerName, overIndex, item) => __spreadProps$9(__spreadValues$S({}, items), {
|
|
10077
10077
|
[activeContainerName]: ramda.remove(activeIndex, 1, items[activeContainerName]),
|
|
10078
10078
|
[overContainerName]: ramda.insert(overIndex, item, items[overContainerName])
|
|
@@ -10138,7 +10138,7 @@
|
|
|
10138
10138
|
));
|
|
10139
10139
|
}
|
|
10140
10140
|
};
|
|
10141
|
-
return /* @__PURE__ */ React
|
|
10141
|
+
return /* @__PURE__ */ React.createElement(
|
|
10142
10142
|
DragAndDrop,
|
|
10143
10143
|
{
|
|
10144
10144
|
sensors: sensors || customSensors,
|
|
@@ -10166,8 +10166,8 @@
|
|
|
10166
10166
|
disableDrag = false,
|
|
10167
10167
|
modifiers
|
|
10168
10168
|
}) {
|
|
10169
|
-
const [activeItem, setActiveItem] = React
|
|
10170
|
-
const identifierItems = React
|
|
10169
|
+
const [activeItem, setActiveItem] = React.useState(null);
|
|
10170
|
+
const identifierItems = React.useMemo(() => ramda.map(createKey, items), [items]);
|
|
10171
10171
|
const customSensors = core.useSensors(
|
|
10172
10172
|
core.useSensor(core.PointerSensor),
|
|
10173
10173
|
core.useSensor(core.KeyboardSensor, {
|
|
@@ -10191,7 +10191,7 @@
|
|
|
10191
10191
|
onChange(newItems);
|
|
10192
10192
|
}
|
|
10193
10193
|
};
|
|
10194
|
-
return /* @__PURE__ */ React
|
|
10194
|
+
return /* @__PURE__ */ React.createElement(
|
|
10195
10195
|
DragAndDrop,
|
|
10196
10196
|
{
|
|
10197
10197
|
sensors: sensors || customSensors,
|
|
@@ -10200,7 +10200,7 @@
|
|
|
10200
10200
|
onDragEnd: handleDragEnd,
|
|
10201
10201
|
modifiers
|
|
10202
10202
|
},
|
|
10203
|
-
/* @__PURE__ */ React
|
|
10203
|
+
/* @__PURE__ */ React.createElement(
|
|
10204
10204
|
Sortable,
|
|
10205
10205
|
{
|
|
10206
10206
|
items: identifierItems,
|
|
@@ -10208,7 +10208,7 @@
|
|
|
10208
10208
|
},
|
|
10209
10209
|
items.map((item, index) => {
|
|
10210
10210
|
const id = createKey(item);
|
|
10211
|
-
return /* @__PURE__ */ React
|
|
10211
|
+
return /* @__PURE__ */ React.createElement(
|
|
10212
10212
|
SortableItem,
|
|
10213
10213
|
{
|
|
10214
10214
|
key: id,
|
|
@@ -10221,11 +10221,11 @@
|
|
|
10221
10221
|
);
|
|
10222
10222
|
})
|
|
10223
10223
|
),
|
|
10224
|
-
displayOverlay && /* @__PURE__ */ React
|
|
10224
|
+
displayOverlay && /* @__PURE__ */ React.createElement(core.DragOverlay, null, activeItem ? /* @__PURE__ */ React.createElement(DragItem, { itemLabel: activeItem }) : null)
|
|
10225
10225
|
);
|
|
10226
10226
|
}
|
|
10227
10227
|
|
|
10228
|
-
const SortableContainer = ({ children, items, strategy }) => /* @__PURE__ */ React
|
|
10228
|
+
const SortableContainer = ({ children, items, strategy }) => /* @__PURE__ */ React.createElement(Sortable, { items, strategy: strategy || sortable.rectSortingStrategy }, items.map((id) => /* @__PURE__ */ React.createElement(SortableItem, { key: id, id, itemLabel: id }, typeof children === "function" ? children(id) : children)));
|
|
10229
10229
|
|
|
10230
10230
|
var __defProp$R = Object.defineProperty;
|
|
10231
10231
|
var __getOwnPropSymbols$R = Object.getOwnPropertySymbols;
|
|
@@ -10255,7 +10255,7 @@
|
|
|
10255
10255
|
}
|
|
10256
10256
|
return target;
|
|
10257
10257
|
};
|
|
10258
|
-
const FastList = React
|
|
10258
|
+
const FastList = React.forwardRef((_a, ref) => {
|
|
10259
10259
|
var _b = _a, {
|
|
10260
10260
|
itemCount,
|
|
10261
10261
|
itemSize,
|
|
@@ -10275,7 +10275,7 @@
|
|
|
10275
10275
|
"overscanCount",
|
|
10276
10276
|
"initialScrollOffset"
|
|
10277
10277
|
]);
|
|
10278
|
-
return /* @__PURE__ */ React
|
|
10278
|
+
return /* @__PURE__ */ React.createElement(AutoSizer, null, ({ width: autoWidth, height: autoHeight }) => /* @__PURE__ */ React.createElement(
|
|
10279
10279
|
reactWindow.VariableSizeList,
|
|
10280
10280
|
__spreadValues$R({
|
|
10281
10281
|
itemCount,
|
|
@@ -10287,7 +10287,7 @@
|
|
|
10287
10287
|
overscanCount,
|
|
10288
10288
|
ref
|
|
10289
10289
|
}, rest),
|
|
10290
|
-
({ style, index }) => /* @__PURE__ */ React
|
|
10290
|
+
({ style, index }) => /* @__PURE__ */ React.createElement("div", { style }, typeof children === "function" ? children(index) : children)
|
|
10291
10291
|
));
|
|
10292
10292
|
});
|
|
10293
10293
|
|
|
@@ -10319,7 +10319,7 @@
|
|
|
10319
10319
|
}
|
|
10320
10320
|
return target;
|
|
10321
10321
|
};
|
|
10322
|
-
const FastGrid = React
|
|
10322
|
+
const FastGrid = React.forwardRef((_a, ref) => {
|
|
10323
10323
|
var _b = _a, {
|
|
10324
10324
|
columns,
|
|
10325
10325
|
rows,
|
|
@@ -10341,7 +10341,7 @@
|
|
|
10341
10341
|
"overscanRowCount",
|
|
10342
10342
|
"overscanColumnCount"
|
|
10343
10343
|
]);
|
|
10344
|
-
return /* @__PURE__ */ React
|
|
10344
|
+
return /* @__PURE__ */ React.createElement(AutoSizer, null, ({ width: autoWidth, height: autoHeight }) => /* @__PURE__ */ React.createElement(
|
|
10345
10345
|
reactWindow.VariableSizeGrid,
|
|
10346
10346
|
__spreadValues$Q({
|
|
10347
10347
|
rowCount: rows,
|
|
@@ -10354,7 +10354,7 @@
|
|
|
10354
10354
|
overscanColumnCount,
|
|
10355
10355
|
ref
|
|
10356
10356
|
}, rest),
|
|
10357
|
-
({ style, rowIndex, columnIndex }) => /* @__PURE__ */ React
|
|
10357
|
+
({ style, rowIndex, columnIndex }) => /* @__PURE__ */ React.createElement("div", { style }, typeof children === "function" ? children(rowIndex, columnIndex) : children)
|
|
10358
10358
|
));
|
|
10359
10359
|
});
|
|
10360
10360
|
|
|
@@ -10389,23 +10389,23 @@
|
|
|
10389
10389
|
} = react.useEditableControls();
|
|
10390
10390
|
const { onEdit, isEditing } = react.useEditableState();
|
|
10391
10391
|
const { button, icon, controls } = react.useMultiStyleConfig("EditableText", { size, isEditing });
|
|
10392
|
-
return /* @__PURE__ */ React
|
|
10392
|
+
return /* @__PURE__ */ React.createElement(react.HStack, { spacing: 1, sx: controls }, isEditing ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
10393
10393
|
IconButton,
|
|
10394
10394
|
__spreadValues$P({
|
|
10395
10395
|
"aria-label": "Cancel",
|
|
10396
10396
|
sx: button,
|
|
10397
10397
|
variant: mapEditableVariantsToButtonCancelVariants[variant]
|
|
10398
10398
|
}, getCancelButtonProps()),
|
|
10399
|
-
/* @__PURE__ */ React
|
|
10400
|
-
), /* @__PURE__ */ React
|
|
10399
|
+
/* @__PURE__ */ React.createElement(Icon, { sx: icon, as: icons.XCloseSolid })
|
|
10400
|
+
), /* @__PURE__ */ React.createElement(
|
|
10401
10401
|
IconButton,
|
|
10402
10402
|
__spreadValues$P({
|
|
10403
10403
|
"aria-label": "Save",
|
|
10404
10404
|
sx: button,
|
|
10405
10405
|
variant: mapEditableVariantsToButtonSubmitVariants[variant]
|
|
10406
10406
|
}, getSubmitButtonProps()),
|
|
10407
|
-
/* @__PURE__ */ React
|
|
10408
|
-
)) : /* @__PURE__ */ React
|
|
10407
|
+
/* @__PURE__ */ React.createElement(Icon, { sx: icon, as: icons.CheckDuo })
|
|
10408
|
+
)) : /* @__PURE__ */ React.createElement(
|
|
10409
10409
|
IconButton,
|
|
10410
10410
|
{
|
|
10411
10411
|
"aria-label": "Edit",
|
|
@@ -10413,7 +10413,7 @@
|
|
|
10413
10413
|
sx: button,
|
|
10414
10414
|
onClick: onEdit
|
|
10415
10415
|
},
|
|
10416
|
-
/* @__PURE__ */ React
|
|
10416
|
+
/* @__PURE__ */ React.createElement(Icon, { sx: icon, as: icons.EditDuo })
|
|
10417
10417
|
));
|
|
10418
10418
|
};
|
|
10419
10419
|
|
|
@@ -10459,12 +10459,12 @@
|
|
|
10459
10459
|
"leftItem",
|
|
10460
10460
|
"variant"
|
|
10461
10461
|
]);
|
|
10462
|
-
const [value, setValue] = React
|
|
10462
|
+
const [value, setValue] = React.useState(inputValue);
|
|
10463
10463
|
const { input, preview } = react.useMultiStyleConfig("EditableText", { size, value });
|
|
10464
|
-
React
|
|
10464
|
+
React.useEffect(() => {
|
|
10465
10465
|
setValue(inputValue);
|
|
10466
10466
|
}, [inputValue]);
|
|
10467
|
-
return /* @__PURE__ */ React
|
|
10467
|
+
return /* @__PURE__ */ React.createElement(
|
|
10468
10468
|
react.Editable,
|
|
10469
10469
|
__spreadValues$O({
|
|
10470
10470
|
isPreviewFocusable: true,
|
|
@@ -10473,20 +10473,20 @@
|
|
|
10473
10473
|
onChange: (newValue) => setValue(newValue),
|
|
10474
10474
|
onSubmit
|
|
10475
10475
|
}, rest),
|
|
10476
|
-
/* @__PURE__ */ React
|
|
10476
|
+
/* @__PURE__ */ React.createElement(react.InputGroup, { size }, leftItem && /* @__PURE__ */ React.createElement(react.InputLeftElement, null, leftItem), /* @__PURE__ */ React.createElement(
|
|
10477
10477
|
react.Input,
|
|
10478
10478
|
{
|
|
10479
10479
|
as: react.EditablePreview,
|
|
10480
10480
|
sx: preview
|
|
10481
10481
|
}
|
|
10482
|
-
), /* @__PURE__ */ React
|
|
10482
|
+
), /* @__PURE__ */ React.createElement(
|
|
10483
10483
|
react.Input,
|
|
10484
10484
|
{
|
|
10485
10485
|
as: react.EditableInput,
|
|
10486
10486
|
size,
|
|
10487
10487
|
sx: input
|
|
10488
10488
|
}
|
|
10489
|
-
), /* @__PURE__ */ React
|
|
10489
|
+
), /* @__PURE__ */ React.createElement(react.InputRightElement, { sx: { width: "min-content" } }, /* @__PURE__ */ React.createElement(EditableControls, { size, variant })))
|
|
10490
10490
|
);
|
|
10491
10491
|
};
|
|
10492
10492
|
|
|
@@ -10526,15 +10526,15 @@
|
|
|
10526
10526
|
"isCentered",
|
|
10527
10527
|
"children"
|
|
10528
10528
|
]);
|
|
10529
|
-
return /* @__PURE__ */ React
|
|
10529
|
+
return /* @__PURE__ */ React.createElement(
|
|
10530
10530
|
react.Modal,
|
|
10531
10531
|
__spreadValues$N({
|
|
10532
10532
|
isCentered,
|
|
10533
10533
|
scrollBehavior: "inside",
|
|
10534
10534
|
motionPreset: "slideInBottom"
|
|
10535
10535
|
}, rest),
|
|
10536
|
-
/* @__PURE__ */ React
|
|
10537
|
-
/* @__PURE__ */ React
|
|
10536
|
+
/* @__PURE__ */ React.createElement(react.ModalOverlay, null),
|
|
10537
|
+
/* @__PURE__ */ React.createElement(react.ModalContent, { "data-testid": "modal-test-id" }, /* @__PURE__ */ React.createElement(react.ModalCloseButton, { "data-testid": "modal-test-button-id" }), children)
|
|
10538
10538
|
);
|
|
10539
10539
|
};
|
|
10540
10540
|
|
|
@@ -10574,7 +10574,7 @@
|
|
|
10574
10574
|
"stayMountedOnClose",
|
|
10575
10575
|
"isOpen"
|
|
10576
10576
|
]);
|
|
10577
|
-
return /* @__PURE__ */ React
|
|
10577
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, (stayMountedOnClose || isOpen) && /* @__PURE__ */ React.createElement(ModalBase, __spreadValues$M({ isOpen }, rest)));
|
|
10578
10578
|
};
|
|
10579
10579
|
|
|
10580
10580
|
var __defProp$L = Object.defineProperty;
|
|
@@ -10593,7 +10593,7 @@
|
|
|
10593
10593
|
}
|
|
10594
10594
|
return a;
|
|
10595
10595
|
};
|
|
10596
|
-
const ModalBody = (props) => /* @__PURE__ */ React
|
|
10596
|
+
const ModalBody = (props) => /* @__PURE__ */ React.createElement(react.ModalBody, __spreadValues$L({ minH: props.h, maxH: props.h }, props));
|
|
10597
10597
|
|
|
10598
10598
|
var __defProp$K = Object.defineProperty;
|
|
10599
10599
|
var __getOwnPropSymbols$K = Object.getOwnPropertySymbols;
|
|
@@ -10623,7 +10623,7 @@
|
|
|
10623
10623
|
}
|
|
10624
10624
|
return target;
|
|
10625
10625
|
};
|
|
10626
|
-
const FileEditorModal = React
|
|
10626
|
+
const FileEditorModal = React.forwardRef((_a, ref) => {
|
|
10627
10627
|
var _b = _a, {
|
|
10628
10628
|
fileName,
|
|
10629
10629
|
setFileName,
|
|
@@ -10645,21 +10645,21 @@
|
|
|
10645
10645
|
"canEditFileName",
|
|
10646
10646
|
"canCropImage"
|
|
10647
10647
|
]);
|
|
10648
|
-
const [zoomLevel, setZoomLevel] = React
|
|
10649
|
-
const [position, setPosition] = React
|
|
10648
|
+
const [zoomLevel, setZoomLevel] = React.useState(1);
|
|
10649
|
+
const [position, setPosition] = React.useState({ x: 0.5, y: 0.5 });
|
|
10650
10650
|
const handleClose = () => {
|
|
10651
10651
|
setZoomLevel(1);
|
|
10652
10652
|
onClose();
|
|
10653
10653
|
};
|
|
10654
|
-
return /* @__PURE__ */ React
|
|
10654
|
+
return /* @__PURE__ */ React.createElement(
|
|
10655
10655
|
Modal,
|
|
10656
10656
|
__spreadValues$K({
|
|
10657
10657
|
isOpen,
|
|
10658
10658
|
onClose,
|
|
10659
10659
|
closeOnOverlayClick: false
|
|
10660
10660
|
}, rest),
|
|
10661
|
-
/* @__PURE__ */ React
|
|
10662
|
-
/* @__PURE__ */ React
|
|
10661
|
+
/* @__PURE__ */ React.createElement(react.ModalHeader, null, "Edit ", isImage ? "image" : "file"),
|
|
10662
|
+
/* @__PURE__ */ React.createElement(
|
|
10663
10663
|
ModalBody,
|
|
10664
10664
|
{
|
|
10665
10665
|
display: "flex",
|
|
@@ -10669,7 +10669,7 @@
|
|
|
10669
10669
|
gap: 4,
|
|
10670
10670
|
minH: "300px"
|
|
10671
10671
|
},
|
|
10672
|
-
/* @__PURE__ */ React
|
|
10672
|
+
/* @__PURE__ */ React.createElement(react.Stack, { display: isImage && canCropImage ? "inherit" : "none" }, /* @__PURE__ */ React.createElement(
|
|
10673
10673
|
AvatarEditor,
|
|
10674
10674
|
{
|
|
10675
10675
|
ref,
|
|
@@ -10683,7 +10683,7 @@
|
|
|
10683
10683
|
scale: zoomLevel,
|
|
10684
10684
|
rotate: 0
|
|
10685
10685
|
}
|
|
10686
|
-
), /* @__PURE__ */ React
|
|
10686
|
+
), /* @__PURE__ */ React.createElement(react.HStack, { w: "90%" }, /* @__PURE__ */ React.createElement(FormLabel, null, "Zoom"), /* @__PURE__ */ React.createElement(
|
|
10687
10687
|
react.Slider,
|
|
10688
10688
|
{
|
|
10689
10689
|
"aria-label": "zoom",
|
|
@@ -10694,12 +10694,12 @@
|
|
|
10694
10694
|
max: 10,
|
|
10695
10695
|
onChange: (value) => setZoomLevel(value)
|
|
10696
10696
|
},
|
|
10697
|
-
/* @__PURE__ */ React
|
|
10698
|
-
/* @__PURE__ */ React
|
|
10697
|
+
/* @__PURE__ */ React.createElement(react.SliderTrack, null, /* @__PURE__ */ React.createElement(react.SliderFilledTrack, null)),
|
|
10698
|
+
/* @__PURE__ */ React.createElement(react.SliderThumb, { boxSize: 6 }, /* @__PURE__ */ React.createElement(Icon, { as: icons.ZoomInDuo }))
|
|
10699
10699
|
))),
|
|
10700
|
-
canEditFileName && /* @__PURE__ */ React
|
|
10700
|
+
canEditFileName && /* @__PURE__ */ React.createElement(react.Stack, { w: "90%", direction: isImage ? "row" : "column", pt: 2 }, /* @__PURE__ */ React.createElement(FormLabel, null, "Name the file:"), /* @__PURE__ */ React.createElement(react.Box, { maxW: "50%" }, /* @__PURE__ */ React.createElement(EditableText, { onSubmit: (v) => setFileName(v), value: fileName, size: "sm" })))
|
|
10701
10701
|
),
|
|
10702
|
-
/* @__PURE__ */ React
|
|
10702
|
+
/* @__PURE__ */ React.createElement(react.ModalFooter, null, /* @__PURE__ */ React.createElement(react.HStack, null, /* @__PURE__ */ React.createElement(Button, { variant: "danger", onClick: handleClose }, "Cancel"), /* @__PURE__ */ React.createElement(Button, { variant: "success", onClick: handleCrop }, "Save")))
|
|
10703
10703
|
);
|
|
10704
10704
|
});
|
|
10705
10705
|
|
|
@@ -10747,7 +10747,7 @@
|
|
|
10747
10747
|
confirmDelete();
|
|
10748
10748
|
onClose();
|
|
10749
10749
|
};
|
|
10750
|
-
return /* @__PURE__ */ React
|
|
10750
|
+
return /* @__PURE__ */ React.createElement(Modal, __spreadValues$J({ isOpen, onClose }, rest), /* @__PURE__ */ React.createElement(
|
|
10751
10751
|
react.ModalHeader,
|
|
10752
10752
|
{
|
|
10753
10753
|
sx: { fontSize: "lg" },
|
|
@@ -10758,7 +10758,7 @@
|
|
|
10758
10758
|
},
|
|
10759
10759
|
"Delete ",
|
|
10760
10760
|
fileName
|
|
10761
|
-
), /* @__PURE__ */ React
|
|
10761
|
+
), /* @__PURE__ */ React.createElement(ModalBody, null, "Deleting this file is a permanent action. You will not be able to recover this file at a later time."), /* @__PURE__ */ React.createElement(react.ModalFooter, null, /* @__PURE__ */ React.createElement(Button, { variant: "danger", onClick: handleDelete }, "Delete")));
|
|
10762
10762
|
};
|
|
10763
10763
|
|
|
10764
10764
|
const updateTimeThreshold = 0.5;
|
|
@@ -10792,10 +10792,10 @@
|
|
|
10792
10792
|
}
|
|
10793
10793
|
return target;
|
|
10794
10794
|
};
|
|
10795
|
-
const ProgressBar = React
|
|
10795
|
+
const ProgressBar = React.forwardRef(
|
|
10796
10796
|
(_a, ref) => {
|
|
10797
10797
|
var _b = _a, { animationSlideTimeMs = animationSlideTime, sx } = _b, props = __objRest$B(_b, ["animationSlideTimeMs", "sx"]);
|
|
10798
|
-
return /* @__PURE__ */ React
|
|
10798
|
+
return /* @__PURE__ */ React.createElement(
|
|
10799
10799
|
react.Progress,
|
|
10800
10800
|
__spreadValues$I({
|
|
10801
10801
|
ref,
|
|
@@ -10868,11 +10868,11 @@
|
|
|
10868
10868
|
"onLoadEnd",
|
|
10869
10869
|
"hideDisplay"
|
|
10870
10870
|
]);
|
|
10871
|
-
const ref = React
|
|
10872
|
-
const timeRef = React
|
|
10871
|
+
const ref = React.useRef(null);
|
|
10872
|
+
const timeRef = React.useRef(0);
|
|
10873
10873
|
const progress = Math.max(0, Math.min(loaded, 1));
|
|
10874
|
-
const [timeLeft, setTimeLeft] = React
|
|
10875
|
-
React
|
|
10874
|
+
const [timeLeft, setTimeLeft] = React.useState(0);
|
|
10875
|
+
React.useEffect(() => {
|
|
10876
10876
|
if (ref.current) {
|
|
10877
10877
|
ref.current.children[0].style.width = `${progress * 100}%`;
|
|
10878
10878
|
}
|
|
@@ -10886,7 +10886,7 @@
|
|
|
10886
10886
|
timeRef.current = Date.now();
|
|
10887
10887
|
}
|
|
10888
10888
|
}, [progress]);
|
|
10889
|
-
return /* @__PURE__ */ React
|
|
10889
|
+
return /* @__PURE__ */ React.createElement(
|
|
10890
10890
|
Fade,
|
|
10891
10891
|
{
|
|
10892
10892
|
in: progress < 1,
|
|
@@ -10900,7 +10900,7 @@
|
|
|
10900
10900
|
}
|
|
10901
10901
|
}
|
|
10902
10902
|
},
|
|
10903
|
-
/* @__PURE__ */ React
|
|
10903
|
+
/* @__PURE__ */ React.createElement(react.VStack, __spreadValues$H({}, rest), /* @__PURE__ */ React.createElement(Small, null, Math.round(progress * 100), "%", " ", !!timeLeft && `\xB7 ${formattedTime(timeLeft)} left`), /* @__PURE__ */ React.createElement(
|
|
10904
10904
|
ProgressBar,
|
|
10905
10905
|
{
|
|
10906
10906
|
ref,
|
|
@@ -11147,7 +11147,7 @@
|
|
|
11147
11147
|
"icon",
|
|
11148
11148
|
"color"
|
|
11149
11149
|
]);
|
|
11150
|
-
return /* @__PURE__ */ React
|
|
11150
|
+
return /* @__PURE__ */ React.createElement(IconButton, __spreadValues$F({ variant: "ghost", size: "sm" }, rest), /* @__PURE__ */ React.createElement(Icon, { as: icon, boxSize: "24px", color }));
|
|
11151
11151
|
};
|
|
11152
11152
|
|
|
11153
11153
|
var __defProp$E = Object.defineProperty;
|
|
@@ -11207,24 +11207,24 @@
|
|
|
11207
11207
|
"editFileOptions",
|
|
11208
11208
|
"sx"
|
|
11209
11209
|
]);
|
|
11210
|
-
const fileInputRef = React
|
|
11211
|
-
const imageEditorRef = React
|
|
11212
|
-
const [file, setFile] = React
|
|
11213
|
-
const [isInvalid, setIsInvalid] = React
|
|
11214
|
-
const [name, setName] = React
|
|
11210
|
+
const fileInputRef = React.useRef(null);
|
|
11211
|
+
const imageEditorRef = React.useRef(null);
|
|
11212
|
+
const [file, setFile] = React.useState(value);
|
|
11213
|
+
const [isInvalid, setIsInvalid] = React.useState(false);
|
|
11214
|
+
const [name, setName] = React.useState("");
|
|
11215
11215
|
const editModal = react.useDisclosure();
|
|
11216
11216
|
const deleteModal = react.useDisclosure();
|
|
11217
|
-
const [editable, setEditable] = React
|
|
11218
|
-
const [hasLoaded, setHasLoaded] = React
|
|
11219
|
-
const [isLoading, setIsLoading] = React
|
|
11220
|
-
const [isImage, setIsImage] = React
|
|
11221
|
-
const [uploaded, setUploaded] = React
|
|
11217
|
+
const [editable, setEditable] = React.useState(false);
|
|
11218
|
+
const [hasLoaded, setHasLoaded] = React.useState(false);
|
|
11219
|
+
const [isLoading, setIsLoading] = React.useState(false);
|
|
11220
|
+
const [isImage, setIsImage] = React.useState(true);
|
|
11221
|
+
const [uploaded, setUploaded] = React.useState(uploadedInitial);
|
|
11222
11222
|
const onlyImageAccepted = onlyAcceptsImages(acceptFormat);
|
|
11223
11223
|
const isUploading = uploaded < 1;
|
|
11224
|
-
React
|
|
11224
|
+
React.useEffect(() => {
|
|
11225
11225
|
setUploaded(uploadedInitial);
|
|
11226
11226
|
}, [uploadedInitial]);
|
|
11227
|
-
React
|
|
11227
|
+
React.useEffect(() => {
|
|
11228
11228
|
if (!isUploading) {
|
|
11229
11229
|
setIsLoading(false);
|
|
11230
11230
|
setHasLoaded(true);
|
|
@@ -11238,7 +11238,7 @@
|
|
|
11238
11238
|
currentTheme,
|
|
11239
11239
|
sx
|
|
11240
11240
|
}, rest));
|
|
11241
|
-
React
|
|
11241
|
+
React.useEffect(() => {
|
|
11242
11242
|
if (isInvalid) {
|
|
11243
11243
|
setTimeout(() => {
|
|
11244
11244
|
setIsInvalid(false);
|
|
@@ -11317,7 +11317,7 @@
|
|
|
11317
11317
|
}
|
|
11318
11318
|
}
|
|
11319
11319
|
};
|
|
11320
|
-
return /* @__PURE__ */ React
|
|
11320
|
+
return /* @__PURE__ */ React.createElement(react.Stack, __spreadValues$E({ maxW: filePicker.width }, rest), /* @__PURE__ */ React.createElement(
|
|
11321
11321
|
Clickable,
|
|
11322
11322
|
{
|
|
11323
11323
|
onClick: handleOnClick,
|
|
@@ -11326,7 +11326,7 @@
|
|
|
11326
11326
|
onMouseEnter: () => setEditable(true),
|
|
11327
11327
|
onMouseLeave: () => setEditable(false)
|
|
11328
11328
|
},
|
|
11329
|
-
/* @__PURE__ */ React
|
|
11329
|
+
/* @__PURE__ */ React.createElement(react.Box, { sx: filePicker }, /* @__PURE__ */ React.createElement(
|
|
11330
11330
|
react.SlideFade,
|
|
11331
11331
|
{
|
|
11332
11332
|
in: hasLoaded,
|
|
@@ -11336,7 +11336,7 @@
|
|
|
11336
11336
|
display: hasLoaded && isImage ? "initial" : "none"
|
|
11337
11337
|
}
|
|
11338
11338
|
},
|
|
11339
|
-
/* @__PURE__ */ React
|
|
11339
|
+
/* @__PURE__ */ React.createElement(
|
|
11340
11340
|
react.Image,
|
|
11341
11341
|
{
|
|
11342
11342
|
src: file ? isFile(file) ? URL.createObjectURL(file) : file : "",
|
|
@@ -11348,7 +11348,7 @@
|
|
|
11348
11348
|
w: "full"
|
|
11349
11349
|
}
|
|
11350
11350
|
)
|
|
11351
|
-
), /* @__PURE__ */ React
|
|
11351
|
+
), /* @__PURE__ */ React.createElement(
|
|
11352
11352
|
react.Input,
|
|
11353
11353
|
{
|
|
11354
11354
|
type: "file",
|
|
@@ -11357,7 +11357,7 @@
|
|
|
11357
11357
|
ref: fileInputRef,
|
|
11358
11358
|
onChange: handleChange
|
|
11359
11359
|
}
|
|
11360
|
-
), /* @__PURE__ */ React
|
|
11360
|
+
), /* @__PURE__ */ React.createElement(
|
|
11361
11361
|
react.Stack,
|
|
11362
11362
|
{
|
|
11363
11363
|
display: hasLoaded && isImage ? "none" : "default",
|
|
@@ -11365,7 +11365,7 @@
|
|
|
11365
11365
|
w: "85%",
|
|
11366
11366
|
spacing: "0a"
|
|
11367
11367
|
},
|
|
11368
|
-
/* @__PURE__ */ React
|
|
11368
|
+
/* @__PURE__ */ React.createElement(
|
|
11369
11369
|
Icon,
|
|
11370
11370
|
{
|
|
11371
11371
|
as: onlyImageAccepted ? icons.Image03Solid : icons.UploadCloudSolid,
|
|
@@ -11375,7 +11375,7 @@
|
|
|
11375
11375
|
"aria-label": "file-icon-upload"
|
|
11376
11376
|
}
|
|
11377
11377
|
),
|
|
11378
|
-
/* @__PURE__ */ React
|
|
11378
|
+
/* @__PURE__ */ React.createElement(
|
|
11379
11379
|
Icon,
|
|
11380
11380
|
{
|
|
11381
11381
|
as: icons.FileBlankDuo,
|
|
@@ -11384,7 +11384,7 @@
|
|
|
11384
11384
|
display: hasLoaded && !isImage ? "inline-block" : "none"
|
|
11385
11385
|
}
|
|
11386
11386
|
),
|
|
11387
|
-
/* @__PURE__ */ React
|
|
11387
|
+
/* @__PURE__ */ React.createElement(
|
|
11388
11388
|
P,
|
|
11389
11389
|
{
|
|
11390
11390
|
variant: isInvalid ? "16" : "14",
|
|
@@ -11397,7 +11397,7 @@
|
|
|
11397
11397
|
},
|
|
11398
11398
|
isInvalid ? "File not supported" : file && isFile(file) ? file.name : `Drag & drop ${onlyImageAccepted ? "image" : "file"} or`
|
|
11399
11399
|
),
|
|
11400
|
-
/* @__PURE__ */ React
|
|
11400
|
+
/* @__PURE__ */ React.createElement(
|
|
11401
11401
|
Lead,
|
|
11402
11402
|
{
|
|
11403
11403
|
sx: {
|
|
@@ -11408,8 +11408,8 @@
|
|
|
11408
11408
|
},
|
|
11409
11409
|
"Click to upload"
|
|
11410
11410
|
),
|
|
11411
|
-
/* @__PURE__ */ React
|
|
11412
|
-
), /* @__PURE__ */ React
|
|
11411
|
+
/* @__PURE__ */ React.createElement(react.Box, { display: isLoading ? "block" : "none", pt: 1 }, loadWithSpinner ? /* @__PURE__ */ React.createElement(Spinner, null) : /* @__PURE__ */ React.createElement(LoadingBar, { loaded: uploaded }))
|
|
11412
|
+
), /* @__PURE__ */ React.createElement(
|
|
11413
11413
|
react.Fade,
|
|
11414
11414
|
{
|
|
11415
11415
|
in: hasLoaded && editable,
|
|
@@ -11418,7 +11418,7 @@
|
|
|
11418
11418
|
justifyContent: "center"
|
|
11419
11419
|
}
|
|
11420
11420
|
},
|
|
11421
|
-
/* @__PURE__ */ React
|
|
11421
|
+
/* @__PURE__ */ React.createElement(
|
|
11422
11422
|
react.HStack,
|
|
11423
11423
|
{
|
|
11424
11424
|
spacing: 2,
|
|
@@ -11430,7 +11430,7 @@
|
|
|
11430
11430
|
width: "44",
|
|
11431
11431
|
py: 2
|
|
11432
11432
|
},
|
|
11433
|
-
editFileOptions.canEdit && /* @__PURE__ */ React
|
|
11433
|
+
editFileOptions.canEdit && /* @__PURE__ */ React.createElement(
|
|
11434
11434
|
FileIconButton,
|
|
11435
11435
|
{
|
|
11436
11436
|
"aria-label": "edit-file",
|
|
@@ -11438,7 +11438,7 @@
|
|
|
11438
11438
|
icon: icons.EditBoxDuo
|
|
11439
11439
|
}
|
|
11440
11440
|
),
|
|
11441
|
-
/* @__PURE__ */ React
|
|
11441
|
+
/* @__PURE__ */ React.createElement(
|
|
11442
11442
|
FileIconButton,
|
|
11443
11443
|
{
|
|
11444
11444
|
"aria-label": "download-file",
|
|
@@ -11446,7 +11446,7 @@
|
|
|
11446
11446
|
icon: icons.DownloadDuo
|
|
11447
11447
|
}
|
|
11448
11448
|
),
|
|
11449
|
-
/* @__PURE__ */ React
|
|
11449
|
+
/* @__PURE__ */ React.createElement(
|
|
11450
11450
|
FileIconButton,
|
|
11451
11451
|
{
|
|
11452
11452
|
"aria-label": "delete-file",
|
|
@@ -11456,7 +11456,7 @@
|
|
|
11456
11456
|
}
|
|
11457
11457
|
)
|
|
11458
11458
|
)
|
|
11459
|
-
), /* @__PURE__ */ React
|
|
11459
|
+
), /* @__PURE__ */ React.createElement(
|
|
11460
11460
|
P,
|
|
11461
11461
|
{
|
|
11462
11462
|
variant: "14",
|
|
@@ -11465,7 +11465,7 @@
|
|
|
11465
11465
|
},
|
|
11466
11466
|
isFile(file) && readableFileSize(file == null ? void 0 : file.size)
|
|
11467
11467
|
))
|
|
11468
|
-
), /* @__PURE__ */ React
|
|
11468
|
+
), /* @__PURE__ */ React.createElement(
|
|
11469
11469
|
FileEditorModal,
|
|
11470
11470
|
__spreadProps$7(__spreadValues$E({}, editModal), {
|
|
11471
11471
|
fileName: name,
|
|
@@ -11477,7 +11477,7 @@
|
|
|
11477
11477
|
canEditFileName: editFileOptions.canEditName,
|
|
11478
11478
|
canCropImage: editFileOptions.canEditImage
|
|
11479
11479
|
})
|
|
11480
|
-
), /* @__PURE__ */ React
|
|
11480
|
+
), /* @__PURE__ */ React.createElement(
|
|
11481
11481
|
ConfirmDeleteModal,
|
|
11482
11482
|
__spreadProps$7(__spreadValues$E({}, deleteModal), {
|
|
11483
11483
|
confirmDelete: clearImage,
|
|
@@ -11530,8 +11530,8 @@
|
|
|
11530
11530
|
"validate",
|
|
11531
11531
|
"onChange"
|
|
11532
11532
|
]);
|
|
11533
|
-
const [uploaded, setUploaded] = React
|
|
11534
|
-
return /* @__PURE__ */ React
|
|
11533
|
+
const [uploaded, setUploaded] = React.useState(0);
|
|
11534
|
+
return /* @__PURE__ */ React.createElement(
|
|
11535
11535
|
Field,
|
|
11536
11536
|
{
|
|
11537
11537
|
name,
|
|
@@ -11540,7 +11540,7 @@
|
|
|
11540
11540
|
isRequired,
|
|
11541
11541
|
validate
|
|
11542
11542
|
},
|
|
11543
|
-
({ onChange, value }) => /* @__PURE__ */ React
|
|
11543
|
+
({ onChange, value }) => /* @__PURE__ */ React.createElement(
|
|
11544
11544
|
FilePicker,
|
|
11545
11545
|
__spreadValues$D({
|
|
11546
11546
|
onChange: async (file) => {
|
|
@@ -11608,14 +11608,14 @@
|
|
|
11608
11608
|
"updatePreviewFiles",
|
|
11609
11609
|
"maxFileSize"
|
|
11610
11610
|
]);
|
|
11611
|
-
const inputRef = React
|
|
11612
|
-
const [isInvalid, setIsInvalid] = React
|
|
11611
|
+
const inputRef = React.useRef(null);
|
|
11612
|
+
const [isInvalid, setIsInvalid] = React.useState(false);
|
|
11613
11613
|
const currentTheme = useCurrentTheme();
|
|
11614
11614
|
const { multiFilePicker } = react.useMultiStyleConfig("FilePicker", __spreadValues$C({ isInvalid, currentTheme }, rest));
|
|
11615
|
-
const [active, setActive] = React
|
|
11616
|
-
const [errorMessage, setErrorMessage] = React
|
|
11615
|
+
const [active, setActive] = React.useState(false);
|
|
11616
|
+
const [errorMessage, setErrorMessage] = React.useState("");
|
|
11617
11617
|
const onlyImageAccepted = onlyAcceptsImages(acceptFormat);
|
|
11618
|
-
React
|
|
11618
|
+
React.useEffect(() => {
|
|
11619
11619
|
if (isInvalid) {
|
|
11620
11620
|
setTimeout(() => {
|
|
11621
11621
|
setIsInvalid(false);
|
|
@@ -11668,7 +11668,7 @@
|
|
|
11668
11668
|
updateMultipleFiles(e.target.files);
|
|
11669
11669
|
}
|
|
11670
11670
|
};
|
|
11671
|
-
return /* @__PURE__ */ React
|
|
11671
|
+
return /* @__PURE__ */ React.createElement(
|
|
11672
11672
|
Clickable,
|
|
11673
11673
|
{
|
|
11674
11674
|
onClick: handleClick,
|
|
@@ -11677,7 +11677,7 @@
|
|
|
11677
11677
|
onMouseEnter: toggleHover,
|
|
11678
11678
|
onMouseLeave: toggleHover
|
|
11679
11679
|
},
|
|
11680
|
-
/* @__PURE__ */ React
|
|
11680
|
+
/* @__PURE__ */ React.createElement(react.Box, __spreadValues$C({ sx: multiFilePicker }, rest), /* @__PURE__ */ React.createElement(
|
|
11681
11681
|
react.Stack,
|
|
11682
11682
|
{
|
|
11683
11683
|
alignItems: "center",
|
|
@@ -11686,7 +11686,7 @@
|
|
|
11686
11686
|
w: "full",
|
|
11687
11687
|
spacing: 0
|
|
11688
11688
|
},
|
|
11689
|
-
/* @__PURE__ */ React
|
|
11689
|
+
/* @__PURE__ */ React.createElement(
|
|
11690
11690
|
Icon,
|
|
11691
11691
|
{
|
|
11692
11692
|
as: onlyImageAccepted ? icons.Image03Solid : icons.UploadCloudSolid,
|
|
@@ -11696,10 +11696,10 @@
|
|
|
11696
11696
|
mb: onlyImageAccepted ? "0a" : 0
|
|
11697
11697
|
}
|
|
11698
11698
|
),
|
|
11699
|
-
/* @__PURE__ */ React
|
|
11700
|
-
/* @__PURE__ */ React
|
|
11701
|
-
/* @__PURE__ */ React
|
|
11702
|
-
), /* @__PURE__ */ React
|
|
11699
|
+
/* @__PURE__ */ React.createElement(react.HStack, { spacing: 1, display: isInvalid ? "none" : "flex" }, /* @__PURE__ */ React.createElement(P, { variant: "14", textAlign: "center", alignSelf: "center" }, "Drag & drop ", onlyImageAccepted ? "images" : "files", " here or"), /* @__PURE__ */ React.createElement(Lead, { sx: { textDecoration: "underline", color: "blue.500" } }, "choose ", onlyImageAccepted ? "image" : "file")),
|
|
11700
|
+
/* @__PURE__ */ React.createElement(P, { variant: "14", textAlign: "center", alignSelf: "center", display: isInvalid ? "initial" : "none" }, errorMessage),
|
|
11701
|
+
/* @__PURE__ */ React.createElement(P, { variant: "14", sx: { color: "gray.400" } }, "Max file size is ", readableFileSize(maxFileSize))
|
|
11702
|
+
), /* @__PURE__ */ React.createElement(
|
|
11703
11703
|
react.Input,
|
|
11704
11704
|
{
|
|
11705
11705
|
type: "file",
|
|
@@ -11745,12 +11745,12 @@
|
|
|
11745
11745
|
const { fileItem } = react.useMultiStyleConfig("FilePicker");
|
|
11746
11746
|
const editModalDisclosure = react.useDisclosure();
|
|
11747
11747
|
const deleteModalDisclosure = react.useDisclosure();
|
|
11748
|
-
const imageEditorRef = React
|
|
11749
|
-
const [fileName, setFileName] = React
|
|
11750
|
-
const [show, setShow] = React
|
|
11751
|
-
const [hasLoaded, setHasLoaded] = React
|
|
11752
|
-
const [loadingImage, setLoadingImage] = React
|
|
11753
|
-
React
|
|
11748
|
+
const imageEditorRef = React.useRef(null);
|
|
11749
|
+
const [fileName, setFileName] = React.useState("");
|
|
11750
|
+
const [show, setShow] = React.useState(true);
|
|
11751
|
+
const [hasLoaded, setHasLoaded] = React.useState(false);
|
|
11752
|
+
const [loadingImage, setLoadingImage] = React.useState(true);
|
|
11753
|
+
React.useEffect(() => {
|
|
11754
11754
|
if (file.src) {
|
|
11755
11755
|
const buffer = new Image();
|
|
11756
11756
|
buffer.src = file.src;
|
|
@@ -11784,7 +11784,7 @@
|
|
|
11784
11784
|
deleteFile(file);
|
|
11785
11785
|
}, 500);
|
|
11786
11786
|
};
|
|
11787
|
-
return /* @__PURE__ */ React
|
|
11787
|
+
return /* @__PURE__ */ React.createElement(
|
|
11788
11788
|
SlideFade,
|
|
11789
11789
|
{
|
|
11790
11790
|
in: show,
|
|
@@ -11793,7 +11793,7 @@
|
|
|
11793
11793
|
enterDuration: !isLazy ? 300 : 1,
|
|
11794
11794
|
exitDuration: 300
|
|
11795
11795
|
},
|
|
11796
|
-
/* @__PURE__ */ React
|
|
11796
|
+
/* @__PURE__ */ React.createElement(react.Box, { sx: fileItem }, /* @__PURE__ */ React.createElement(
|
|
11797
11797
|
react.HStack,
|
|
11798
11798
|
{
|
|
11799
11799
|
w: "full",
|
|
@@ -11804,7 +11804,7 @@
|
|
|
11804
11804
|
px: 2,
|
|
11805
11805
|
pt: file.isUploading && !hasLoaded ? 2 : 0
|
|
11806
11806
|
},
|
|
11807
|
-
/* @__PURE__ */ React
|
|
11807
|
+
/* @__PURE__ */ React.createElement(react.HStack, { spacing: 4, alignItems: "start", maxW: "50%" }, isFileImage(file) ? file.isUploading || loadingImage ? /* @__PURE__ */ React.createElement(
|
|
11808
11808
|
Icon,
|
|
11809
11809
|
{
|
|
11810
11810
|
as: icons.Image03Duo,
|
|
@@ -11814,7 +11814,7 @@
|
|
|
11814
11814
|
borderRadius: "8",
|
|
11815
11815
|
p: "2"
|
|
11816
11816
|
}
|
|
11817
|
-
) : /* @__PURE__ */ React
|
|
11817
|
+
) : /* @__PURE__ */ React.createElement(
|
|
11818
11818
|
react.Image,
|
|
11819
11819
|
{
|
|
11820
11820
|
src: file.src || "",
|
|
@@ -11824,7 +11824,7 @@
|
|
|
11824
11824
|
borderRadius: "8",
|
|
11825
11825
|
boxSize: "10"
|
|
11826
11826
|
}
|
|
11827
|
-
) : /* @__PURE__ */ React
|
|
11827
|
+
) : /* @__PURE__ */ React.createElement(
|
|
11828
11828
|
Icon,
|
|
11829
11829
|
{
|
|
11830
11830
|
as: icons.FileBlankDuo,
|
|
@@ -11832,7 +11832,7 @@
|
|
|
11832
11832
|
p: "1",
|
|
11833
11833
|
color: "gray.300"
|
|
11834
11834
|
}
|
|
11835
|
-
), /* @__PURE__ */ React
|
|
11835
|
+
), /* @__PURE__ */ React.createElement(
|
|
11836
11836
|
react.Stack,
|
|
11837
11837
|
{
|
|
11838
11838
|
alignItems: "start",
|
|
@@ -11840,7 +11840,7 @@
|
|
|
11840
11840
|
spacing: "0",
|
|
11841
11841
|
maxW: "100%"
|
|
11842
11842
|
},
|
|
11843
|
-
/* @__PURE__ */ React
|
|
11843
|
+
/* @__PURE__ */ React.createElement(
|
|
11844
11844
|
P,
|
|
11845
11845
|
{
|
|
11846
11846
|
variant: "14",
|
|
@@ -11851,9 +11851,9 @@
|
|
|
11851
11851
|
},
|
|
11852
11852
|
file == null ? void 0 : file.name
|
|
11853
11853
|
),
|
|
11854
|
-
/* @__PURE__ */ React
|
|
11854
|
+
/* @__PURE__ */ React.createElement(P, { variant: "14", sx: { color: "gray.400" } }, (file == null ? void 0 : file.size) && readableFileSize(file.size))
|
|
11855
11855
|
)),
|
|
11856
|
-
/* @__PURE__ */ React
|
|
11856
|
+
/* @__PURE__ */ React.createElement(
|
|
11857
11857
|
react.HStack,
|
|
11858
11858
|
{
|
|
11859
11859
|
spacing: "3",
|
|
@@ -11863,7 +11863,7 @@
|
|
|
11863
11863
|
display: file.isUploading ? "none" : "flex",
|
|
11864
11864
|
p: "1"
|
|
11865
11865
|
},
|
|
11866
|
-
canEdit && /* @__PURE__ */ React
|
|
11866
|
+
canEdit && /* @__PURE__ */ React.createElement(
|
|
11867
11867
|
FileIconButton,
|
|
11868
11868
|
{
|
|
11869
11869
|
"aria-label": "Edit-image",
|
|
@@ -11871,7 +11871,7 @@
|
|
|
11871
11871
|
icon: icons.EditBoxDuo
|
|
11872
11872
|
}
|
|
11873
11873
|
),
|
|
11874
|
-
/* @__PURE__ */ React
|
|
11874
|
+
/* @__PURE__ */ React.createElement(
|
|
11875
11875
|
FileIconButton,
|
|
11876
11876
|
{
|
|
11877
11877
|
"aria-label": "download-image",
|
|
@@ -11879,14 +11879,14 @@
|
|
|
11879
11879
|
icon: icons.DownloadDuo
|
|
11880
11880
|
}
|
|
11881
11881
|
),
|
|
11882
|
-
/* @__PURE__ */ React
|
|
11882
|
+
/* @__PURE__ */ React.createElement(
|
|
11883
11883
|
react.CloseButton,
|
|
11884
11884
|
{
|
|
11885
11885
|
onClick: confirmDelete ? deleteModalDisclosure.onOpen : clearImage
|
|
11886
11886
|
}
|
|
11887
11887
|
)
|
|
11888
11888
|
)
|
|
11889
|
-
), /* @__PURE__ */ React
|
|
11889
|
+
), /* @__PURE__ */ React.createElement(
|
|
11890
11890
|
react.Box,
|
|
11891
11891
|
{
|
|
11892
11892
|
w: "full",
|
|
@@ -11896,14 +11896,14 @@
|
|
|
11896
11896
|
mt: "-2",
|
|
11897
11897
|
display: file.isUploading ? "block" : "none"
|
|
11898
11898
|
},
|
|
11899
|
-
/* @__PURE__ */ React
|
|
11899
|
+
/* @__PURE__ */ React.createElement(
|
|
11900
11900
|
LoadingBar,
|
|
11901
11901
|
{
|
|
11902
11902
|
loaded: file.size ? ((file == null ? void 0 : file.uploaded) || 0) / file.size : 0,
|
|
11903
11903
|
onLoadEnd: () => setHasLoaded(true)
|
|
11904
11904
|
}
|
|
11905
11905
|
)
|
|
11906
|
-
), canEdit && /* @__PURE__ */ React
|
|
11906
|
+
), canEdit && /* @__PURE__ */ React.createElement(
|
|
11907
11907
|
FileEditorModal,
|
|
11908
11908
|
__spreadProps$6(__spreadValues$B({}, editModalDisclosure), {
|
|
11909
11909
|
fileName: fileName || file.name,
|
|
@@ -11915,7 +11915,7 @@
|
|
|
11915
11915
|
isImage: isFileImage(file),
|
|
11916
11916
|
ref: imageEditorRef
|
|
11917
11917
|
})
|
|
11918
|
-
), /* @__PURE__ */ React
|
|
11918
|
+
), /* @__PURE__ */ React.createElement(
|
|
11919
11919
|
ConfirmDeleteModal,
|
|
11920
11920
|
__spreadProps$6(__spreadValues$B({}, deleteModalDisclosure), {
|
|
11921
11921
|
confirmDelete: clearImage,
|
|
@@ -11973,11 +11973,11 @@
|
|
|
11973
11973
|
"editFileOptions",
|
|
11974
11974
|
"enableSmartLoad"
|
|
11975
11975
|
]);
|
|
11976
|
-
const [uploadingFilesReference, setUploadingFilesReference] = React
|
|
11977
|
-
const [overflowing, setOverflowing] = React
|
|
11976
|
+
const [uploadingFilesReference, setUploadingFilesReference] = React.useState(uploadingFiles);
|
|
11977
|
+
const [overflowing, setOverflowing] = React.useState(false);
|
|
11978
11978
|
const formattedFiles = files == null ? void 0 : files.map((file) => isFile(file) ? createPreviewFileObject(file) : file);
|
|
11979
|
-
const listRef = React
|
|
11980
|
-
React
|
|
11979
|
+
const listRef = React.useRef(null);
|
|
11980
|
+
React.useEffect(() => {
|
|
11981
11981
|
if (uploadingFiles && uploadingFilesReference && files) {
|
|
11982
11982
|
if (enableSmartLoad) {
|
|
11983
11983
|
const newVal = getNewUploadingFiles(uploadingFilesReference, uploadingFiles, files);
|
|
@@ -11991,7 +11991,7 @@
|
|
|
11991
11991
|
}
|
|
11992
11992
|
}, [uploadingFiles, files]);
|
|
11993
11993
|
const isLazy = uploadingFilesReference ? ramda.any((file) => file.isLazy || false, uploadingFilesReference) : false;
|
|
11994
|
-
return /* @__PURE__ */ React
|
|
11994
|
+
return /* @__PURE__ */ React.createElement(
|
|
11995
11995
|
react.Stack,
|
|
11996
11996
|
__spreadValues$A({
|
|
11997
11997
|
ref: listRef,
|
|
@@ -12000,7 +12000,7 @@
|
|
|
12000
12000
|
pr: overflowing ? 2 : 0,
|
|
12001
12001
|
overflowY: "auto"
|
|
12002
12002
|
}, rest),
|
|
12003
|
-
uploadingFilesReference && ramda.map((file) => /* @__PURE__ */ React
|
|
12003
|
+
uploadingFilesReference && ramda.map((file) => /* @__PURE__ */ React.createElement(
|
|
12004
12004
|
FileItem,
|
|
12005
12005
|
{
|
|
12006
12006
|
onChangeCallback: onChange,
|
|
@@ -12012,7 +12012,7 @@
|
|
|
12012
12012
|
editFileOptions
|
|
12013
12013
|
}
|
|
12014
12014
|
), uploadingFilesReference),
|
|
12015
|
-
formattedFiles && ramda.map((file) => /* @__PURE__ */ React
|
|
12015
|
+
formattedFiles && ramda.map((file) => /* @__PURE__ */ React.createElement(
|
|
12016
12016
|
FileItem,
|
|
12017
12017
|
{
|
|
12018
12018
|
onChangeCallback: onChange,
|
|
@@ -12083,8 +12083,8 @@
|
|
|
12083
12083
|
"editFileOptions",
|
|
12084
12084
|
"variant"
|
|
12085
12085
|
]);
|
|
12086
|
-
const [bufferFiles, setBufferFiles] = React
|
|
12087
|
-
const [previewFiles, setPreviewFiles] = React
|
|
12086
|
+
const [bufferFiles, setBufferFiles] = React.useState([]);
|
|
12087
|
+
const [previewFiles, setPreviewFiles] = React.useState([]);
|
|
12088
12088
|
const getIndexById = (id) => ramda.findIndex((file) => file._id === id, previewFiles);
|
|
12089
12089
|
const addFile = (file, id) => {
|
|
12090
12090
|
const addedFile = createPreviewFileObject(file);
|
|
@@ -12103,14 +12103,14 @@
|
|
|
12103
12103
|
setBufferFiles(queuedFiles);
|
|
12104
12104
|
}
|
|
12105
12105
|
};
|
|
12106
|
-
return /* @__PURE__ */ React
|
|
12106
|
+
return /* @__PURE__ */ React.createElement(
|
|
12107
12107
|
react.Stack,
|
|
12108
12108
|
__spreadValues$z({
|
|
12109
12109
|
spacing: 4,
|
|
12110
12110
|
maxW: "inherit",
|
|
12111
12111
|
maxH: "inherit"
|
|
12112
12112
|
}, rest),
|
|
12113
|
-
/* @__PURE__ */ React
|
|
12113
|
+
/* @__PURE__ */ React.createElement(
|
|
12114
12114
|
MultiFileUploader,
|
|
12115
12115
|
{
|
|
12116
12116
|
acceptFormat,
|
|
@@ -12122,7 +12122,7 @@
|
|
|
12122
12122
|
variant
|
|
12123
12123
|
}
|
|
12124
12124
|
),
|
|
12125
|
-
/* @__PURE__ */ React
|
|
12125
|
+
/* @__PURE__ */ React.createElement(
|
|
12126
12126
|
MultiFileList,
|
|
12127
12127
|
{
|
|
12128
12128
|
files: files || previewFiles,
|
|
@@ -12191,7 +12191,7 @@
|
|
|
12191
12191
|
const formattedFiles = ramda.map((file) => isFile(file) ? file : createFileObjectFromSrc(file), buffer);
|
|
12192
12192
|
return formattedFiles;
|
|
12193
12193
|
};
|
|
12194
|
-
return /* @__PURE__ */ React
|
|
12194
|
+
return /* @__PURE__ */ React.createElement(
|
|
12195
12195
|
Field,
|
|
12196
12196
|
{
|
|
12197
12197
|
name,
|
|
@@ -12206,7 +12206,7 @@
|
|
|
12206
12206
|
const newValues = ramda.remove(removedIndex, 1, value);
|
|
12207
12207
|
onChange(newValues);
|
|
12208
12208
|
};
|
|
12209
|
-
return /* @__PURE__ */ React
|
|
12209
|
+
return /* @__PURE__ */ React.createElement(
|
|
12210
12210
|
MultiFilePicker,
|
|
12211
12211
|
__spreadValues$y({
|
|
12212
12212
|
onChange: async (files) => {
|
|
@@ -12240,7 +12240,7 @@
|
|
|
12240
12240
|
children,
|
|
12241
12241
|
theme: theme$1 = theme,
|
|
12242
12242
|
themeName = "webappTheme"
|
|
12243
|
-
}) => /* @__PURE__ */ React
|
|
12243
|
+
}) => /* @__PURE__ */ React.createElement(react.ChakraProvider, { resetCSS: true, theme: theme$1 }, /* @__PURE__ */ React.createElement(CustomTheme.Provider, { value: themeName }, children));
|
|
12244
12244
|
|
|
12245
12245
|
var __defProp$x = Object.defineProperty;
|
|
12246
12246
|
var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
|
|
@@ -12272,20 +12272,20 @@
|
|
|
12272
12272
|
};
|
|
12273
12273
|
const Menu = (_a) => {
|
|
12274
12274
|
var _b = _a, { variant = "relaxed" } = _b, props = __objRest$s(_b, ["variant"]);
|
|
12275
|
-
return /* @__PURE__ */ React
|
|
12275
|
+
return /* @__PURE__ */ React.createElement(react.Menu, __spreadValues$x({ variant }, props));
|
|
12276
12276
|
};
|
|
12277
12277
|
|
|
12278
12278
|
const NumberInputStepper = ({
|
|
12279
12279
|
includePercentage = false,
|
|
12280
12280
|
enableStepperArrows = false
|
|
12281
|
-
}) => /* @__PURE__ */ React
|
|
12281
|
+
}) => /* @__PURE__ */ React.createElement(react.NumberInputStepper, null, /* @__PURE__ */ React.createElement(react.HStack, { alignItems: "center", h: "full" }, includePercentage && /* @__PURE__ */ React.createElement(react.Center, { bgColor: "gray.50", borderRadius: "md", boxSize: "6" }, /* @__PURE__ */ React.createElement(P, null, "%")), enableStepperArrows && /* @__PURE__ */ React.createElement(react.HStack, { alignItems: "center", h: "full" }, /* @__PURE__ */ React.createElement(react.Divider, { orientation: "vertical", h: "50%" }), /* @__PURE__ */ React.createElement(react.NumberIncrementStepper, { border: "none" }, /* @__PURE__ */ React.createElement(
|
|
12282
12282
|
Icon,
|
|
12283
12283
|
{
|
|
12284
12284
|
as: icons.ChevronUpSolid,
|
|
12285
12285
|
color: "icon.input-stepper.default",
|
|
12286
12286
|
boxSize: 4
|
|
12287
12287
|
}
|
|
12288
|
-
)), /* @__PURE__ */ React
|
|
12288
|
+
)), /* @__PURE__ */ React.createElement(react.NumberDecrementStepper, null, /* @__PURE__ */ React.createElement(
|
|
12289
12289
|
Icon,
|
|
12290
12290
|
{
|
|
12291
12291
|
as: icons.ChevronDownSolid,
|
|
@@ -12373,7 +12373,7 @@
|
|
|
12373
12373
|
const filteredNaN = Number.isNaN(value) ? "" : value;
|
|
12374
12374
|
onChange(`${filteredNaN}`);
|
|
12375
12375
|
};
|
|
12376
|
-
return /* @__PURE__ */ React
|
|
12376
|
+
return /* @__PURE__ */ React.createElement(
|
|
12377
12377
|
react.NumberInput,
|
|
12378
12378
|
__spreadValues$w(__spreadValues$w({
|
|
12379
12379
|
variant,
|
|
@@ -12381,8 +12381,8 @@
|
|
|
12381
12381
|
onChange: handleChange,
|
|
12382
12382
|
id: name
|
|
12383
12383
|
}, percentageProps), rest),
|
|
12384
|
-
/* @__PURE__ */ React
|
|
12385
|
-
/* @__PURE__ */ React
|
|
12384
|
+
/* @__PURE__ */ React.createElement(react.NumberInputField, { onChange: handleChange }),
|
|
12385
|
+
/* @__PURE__ */ React.createElement(
|
|
12386
12386
|
NumberInputStepper,
|
|
12387
12387
|
{
|
|
12388
12388
|
includePercentage: onlyAcceptPercentage,
|
|
@@ -12420,7 +12420,7 @@
|
|
|
12420
12420
|
}
|
|
12421
12421
|
return target;
|
|
12422
12422
|
};
|
|
12423
|
-
const NumberInputField = React
|
|
12423
|
+
const NumberInputField = React.forwardRef((_a, ref) => {
|
|
12424
12424
|
var _b = _a, {
|
|
12425
12425
|
name,
|
|
12426
12426
|
label,
|
|
@@ -12443,7 +12443,7 @@
|
|
|
12443
12443
|
"inputRightElement"
|
|
12444
12444
|
]);
|
|
12445
12445
|
const formatNumber = (value, factor) => onlyAcceptPercentage ? advancedParseFloat(value * factor) : value;
|
|
12446
|
-
return /* @__PURE__ */ React
|
|
12446
|
+
return /* @__PURE__ */ React.createElement(
|
|
12447
12447
|
Field,
|
|
12448
12448
|
{
|
|
12449
12449
|
name,
|
|
@@ -12455,14 +12455,14 @@
|
|
|
12455
12455
|
},
|
|
12456
12456
|
({ onChange, value }) => {
|
|
12457
12457
|
const initialValue = ramda.isNil(value) || Number.isNaN(parseFloat(value)) ? "" : formatNumber(value, 100);
|
|
12458
|
-
const [displayValue, setDisplayValue] = React
|
|
12459
|
-
return /* @__PURE__ */ React
|
|
12458
|
+
const [displayValue, setDisplayValue] = React.useState(initialValue);
|
|
12459
|
+
return /* @__PURE__ */ React.createElement(
|
|
12460
12460
|
InputGroupWrapper,
|
|
12461
12461
|
{
|
|
12462
12462
|
inputLeftElement,
|
|
12463
12463
|
inputRightElement
|
|
12464
12464
|
},
|
|
12465
|
-
/* @__PURE__ */ React
|
|
12465
|
+
/* @__PURE__ */ React.createElement(
|
|
12466
12466
|
NumberInput,
|
|
12467
12467
|
__spreadValues$v({
|
|
12468
12468
|
name,
|
|
@@ -12510,7 +12510,7 @@
|
|
|
12510
12510
|
}
|
|
12511
12511
|
return target;
|
|
12512
12512
|
};
|
|
12513
|
-
const NotificationIconButton = React
|
|
12513
|
+
const NotificationIconButton = React.forwardRef((_a, ref) => {
|
|
12514
12514
|
var _b = _a, {
|
|
12515
12515
|
variant = "ghost",
|
|
12516
12516
|
icon,
|
|
@@ -12526,17 +12526,17 @@
|
|
|
12526
12526
|
"blinkerColor",
|
|
12527
12527
|
"size"
|
|
12528
12528
|
]);
|
|
12529
|
-
const [isBlinking, setIsBlinking] = React
|
|
12529
|
+
const [isBlinking, setIsBlinking] = React.useState(false);
|
|
12530
12530
|
const { container, notifier } = react.useMultiStyleConfig("NotificationIconButton", { size, variant });
|
|
12531
|
-
return /* @__PURE__ */ React
|
|
12531
|
+
return /* @__PURE__ */ React.createElement(
|
|
12532
12532
|
react.Box,
|
|
12533
12533
|
{
|
|
12534
12534
|
onMouseEnter: () => setIsBlinking(true),
|
|
12535
12535
|
onMouseLeave: () => setIsBlinking(false),
|
|
12536
12536
|
sx: container
|
|
12537
12537
|
},
|
|
12538
|
-
hasNotification && /* @__PURE__ */ React
|
|
12539
|
-
/* @__PURE__ */ React
|
|
12538
|
+
hasNotification && /* @__PURE__ */ React.createElement(react.Box, { sx: notifier }, /* @__PURE__ */ React.createElement(Blinker, { isBlinking, color: blinkerColor, size: "2xs" })),
|
|
12539
|
+
/* @__PURE__ */ React.createElement(
|
|
12540
12540
|
IconButton,
|
|
12541
12541
|
__spreadValues$u({
|
|
12542
12542
|
variant,
|
|
@@ -12590,7 +12590,7 @@
|
|
|
12590
12590
|
"hidden",
|
|
12591
12591
|
"children"
|
|
12592
12592
|
]);
|
|
12593
|
-
return /* @__PURE__ */ React
|
|
12593
|
+
return /* @__PURE__ */ React.createElement(react.PinInput, __spreadProps$5(__spreadValues$t({}, rest), { variant, placeholder: "\u25CF", mask: hidden }), children);
|
|
12594
12594
|
};
|
|
12595
12595
|
|
|
12596
12596
|
const isStringArray = (value) => ramda.is(Array, value) && ramda.length(value) > 0 && typeof value[0] === "string";
|
|
@@ -12638,7 +12638,7 @@
|
|
|
12638
12638
|
}
|
|
12639
12639
|
return target;
|
|
12640
12640
|
};
|
|
12641
|
-
const Select = React
|
|
12641
|
+
const Select = React.forwardRef((_a, ref) => {
|
|
12642
12642
|
var _b = _a, {
|
|
12643
12643
|
options,
|
|
12644
12644
|
isMulti,
|
|
@@ -12679,20 +12679,20 @@
|
|
|
12679
12679
|
isMulti,
|
|
12680
12680
|
value: ramda.is(Array, value) ? value : []
|
|
12681
12681
|
});
|
|
12682
|
-
const customComponents = React
|
|
12682
|
+
const customComponents = React.useMemo(
|
|
12683
12683
|
() => getComponents(components),
|
|
12684
12684
|
[generateComponentsUpdateKey()]
|
|
12685
12685
|
);
|
|
12686
|
-
const prevOptions = React
|
|
12686
|
+
const prevOptions = React.useRef(
|
|
12687
12687
|
options
|
|
12688
12688
|
);
|
|
12689
|
-
const renderedOptions = React
|
|
12689
|
+
const renderedOptions = React.useMemo(() => {
|
|
12690
12690
|
if (!ramda.equals(prevOptions.current, options)) {
|
|
12691
12691
|
prevOptions.current = options;
|
|
12692
12692
|
}
|
|
12693
12693
|
return prevOptions.current;
|
|
12694
12694
|
}, [options]);
|
|
12695
|
-
return /* @__PURE__ */ React
|
|
12695
|
+
return /* @__PURE__ */ React.createElement(react.Box, { w: "full", "data-testid": testId, cursor: "pointer" }, /* @__PURE__ */ React.createElement(
|
|
12696
12696
|
chakraReactSelect.Select,
|
|
12697
12697
|
__spreadValues$s(__spreadProps$4(__spreadValues$s({
|
|
12698
12698
|
isMulti,
|
|
@@ -12772,7 +12772,7 @@
|
|
|
12772
12772
|
"inputLeftElement",
|
|
12773
12773
|
"inputRightElement"
|
|
12774
12774
|
]);
|
|
12775
|
-
return /* @__PURE__ */ React
|
|
12775
|
+
return /* @__PURE__ */ React.createElement(
|
|
12776
12776
|
Field,
|
|
12777
12777
|
{
|
|
12778
12778
|
name,
|
|
@@ -12783,13 +12783,13 @@
|
|
|
12783
12783
|
validate,
|
|
12784
12784
|
ref
|
|
12785
12785
|
},
|
|
12786
|
-
({ value, onChange }) => /* @__PURE__ */ React
|
|
12786
|
+
({ value, onChange }) => /* @__PURE__ */ React.createElement(react.HStack, { w: "full" }, /* @__PURE__ */ React.createElement(
|
|
12787
12787
|
InputGroupWrapper,
|
|
12788
12788
|
{
|
|
12789
12789
|
inputLeftElement,
|
|
12790
12790
|
inputRightElement
|
|
12791
12791
|
},
|
|
12792
|
-
/* @__PURE__ */ React
|
|
12792
|
+
/* @__PURE__ */ React.createElement(
|
|
12793
12793
|
Select,
|
|
12794
12794
|
__spreadValues$r({
|
|
12795
12795
|
name,
|
|
@@ -12808,7 +12808,7 @@
|
|
|
12808
12808
|
) : null
|
|
12809
12809
|
}, rest)
|
|
12810
12810
|
)
|
|
12811
|
-
), /* @__PURE__ */ React
|
|
12811
|
+
), /* @__PURE__ */ React.createElement(
|
|
12812
12812
|
IconButton,
|
|
12813
12813
|
{
|
|
12814
12814
|
"aria-label": `${name}-close-button`,
|
|
@@ -12820,12 +12820,12 @@
|
|
|
12820
12820
|
onChange(void 0);
|
|
12821
12821
|
onChangeCallback(void 0, { action: "clear", removedValues: value });
|
|
12822
12822
|
},
|
|
12823
|
-
icon: /* @__PURE__ */ React
|
|
12823
|
+
icon: /* @__PURE__ */ React.createElement(Icon, { as: icons.XCloseSolid })
|
|
12824
12824
|
}
|
|
12825
12825
|
))
|
|
12826
12826
|
);
|
|
12827
12827
|
};
|
|
12828
|
-
const SelectField = React
|
|
12828
|
+
const SelectField = React.forwardRef(BaseSelectField);
|
|
12829
12829
|
|
|
12830
12830
|
var __defProp$q = Object.defineProperty;
|
|
12831
12831
|
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
@@ -12867,7 +12867,7 @@
|
|
|
12867
12867
|
"name",
|
|
12868
12868
|
"size"
|
|
12869
12869
|
]);
|
|
12870
|
-
return /* @__PURE__ */ React
|
|
12870
|
+
return /* @__PURE__ */ React.createElement(
|
|
12871
12871
|
react.Switch,
|
|
12872
12872
|
__spreadValues$q({
|
|
12873
12873
|
size,
|
|
@@ -12906,7 +12906,7 @@
|
|
|
12906
12906
|
}
|
|
12907
12907
|
return target;
|
|
12908
12908
|
};
|
|
12909
|
-
const SwitchField = React
|
|
12909
|
+
const SwitchField = React.forwardRef((_a, ref) => {
|
|
12910
12910
|
var _b = _a, {
|
|
12911
12911
|
name,
|
|
12912
12912
|
label,
|
|
@@ -12926,7 +12926,7 @@
|
|
|
12926
12926
|
"labelPlacement",
|
|
12927
12927
|
"labelSize"
|
|
12928
12928
|
]);
|
|
12929
|
-
return /* @__PURE__ */ React
|
|
12929
|
+
return /* @__PURE__ */ React.createElement(react.Box, { w: label ? "full" : "fit-content", display: "inline-flex" }, /* @__PURE__ */ React.createElement(
|
|
12930
12930
|
Field,
|
|
12931
12931
|
{
|
|
12932
12932
|
name,
|
|
@@ -12936,7 +12936,7 @@
|
|
|
12936
12936
|
validate,
|
|
12937
12937
|
ref
|
|
12938
12938
|
},
|
|
12939
|
-
({ onChange, value }) => /* @__PURE__ */ React
|
|
12939
|
+
({ onChange, value }) => /* @__PURE__ */ React.createElement(
|
|
12940
12940
|
react.Flex,
|
|
12941
12941
|
{
|
|
12942
12942
|
display: "inline-flex",
|
|
@@ -12944,7 +12944,7 @@
|
|
|
12944
12944
|
gap: 2,
|
|
12945
12945
|
direction: labelPlacement === "left" ? "row-reverse" : "row"
|
|
12946
12946
|
},
|
|
12947
|
-
/* @__PURE__ */ React
|
|
12947
|
+
/* @__PURE__ */ React.createElement(
|
|
12948
12948
|
Switch,
|
|
12949
12949
|
__spreadValues$p({
|
|
12950
12950
|
name,
|
|
@@ -12956,7 +12956,7 @@
|
|
|
12956
12956
|
"data-testid": "switch-field-test-id"
|
|
12957
12957
|
}, rest)
|
|
12958
12958
|
),
|
|
12959
|
-
/* @__PURE__ */ React
|
|
12959
|
+
/* @__PURE__ */ React.createElement(Label, { htmlFor: name, sx: { fontWeight: "normal" }, size: labelSize }, label)
|
|
12960
12960
|
)
|
|
12961
12961
|
));
|
|
12962
12962
|
});
|
|
@@ -12977,7 +12977,7 @@
|
|
|
12977
12977
|
}
|
|
12978
12978
|
return a;
|
|
12979
12979
|
};
|
|
12980
|
-
const TabPanel = (props) => /* @__PURE__ */ React
|
|
12980
|
+
const TabPanel = (props) => /* @__PURE__ */ React.createElement(react.TabPanel, __spreadValues$o({ padding: 0 }, props));
|
|
12981
12981
|
|
|
12982
12982
|
var __defProp$n = Object.defineProperty;
|
|
12983
12983
|
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
@@ -13017,7 +13017,7 @@
|
|
|
13017
13017
|
"variant",
|
|
13018
13018
|
"isManual"
|
|
13019
13019
|
]);
|
|
13020
|
-
return /* @__PURE__ */ React
|
|
13020
|
+
return /* @__PURE__ */ React.createElement(
|
|
13021
13021
|
react.Tabs,
|
|
13022
13022
|
__spreadValues$n({
|
|
13023
13023
|
isManual,
|
|
@@ -13067,7 +13067,7 @@
|
|
|
13067
13067
|
"name",
|
|
13068
13068
|
"value"
|
|
13069
13069
|
]);
|
|
13070
|
-
return /* @__PURE__ */ React
|
|
13070
|
+
return /* @__PURE__ */ React.createElement(
|
|
13071
13071
|
react.Textarea,
|
|
13072
13072
|
__spreadValues$m({
|
|
13073
13073
|
size,
|
|
@@ -13106,7 +13106,7 @@
|
|
|
13106
13106
|
}
|
|
13107
13107
|
return target;
|
|
13108
13108
|
};
|
|
13109
|
-
const TextareaField = React
|
|
13109
|
+
const TextareaField = React.forwardRef((_a, ref) => {
|
|
13110
13110
|
var _b = _a, {
|
|
13111
13111
|
name,
|
|
13112
13112
|
label,
|
|
@@ -13122,7 +13122,7 @@
|
|
|
13122
13122
|
"direction",
|
|
13123
13123
|
"onChange"
|
|
13124
13124
|
]);
|
|
13125
|
-
return /* @__PURE__ */ React
|
|
13125
|
+
return /* @__PURE__ */ React.createElement(
|
|
13126
13126
|
Field,
|
|
13127
13127
|
{
|
|
13128
13128
|
name,
|
|
@@ -13132,7 +13132,7 @@
|
|
|
13132
13132
|
direction,
|
|
13133
13133
|
ref
|
|
13134
13134
|
},
|
|
13135
|
-
({ onChange, value }) => /* @__PURE__ */ React
|
|
13135
|
+
({ onChange, value }) => /* @__PURE__ */ React.createElement(
|
|
13136
13136
|
Textarea,
|
|
13137
13137
|
__spreadValues$l({
|
|
13138
13138
|
name,
|
|
@@ -13218,7 +13218,7 @@
|
|
|
13218
13218
|
"inputRightElement",
|
|
13219
13219
|
"onBlur"
|
|
13220
13220
|
]);
|
|
13221
|
-
const [valueState, setValueState] = React
|
|
13221
|
+
const [valueState, setValueState] = React.useState(valueProp);
|
|
13222
13222
|
const isControlled = typeof valueProp !== "undefined";
|
|
13223
13223
|
const value = isControlled ? valueProp : valueState;
|
|
13224
13224
|
const props = presetMap[preset];
|
|
@@ -13253,16 +13253,16 @@
|
|
|
13253
13253
|
sourceInfo
|
|
13254
13254
|
);
|
|
13255
13255
|
};
|
|
13256
|
-
React
|
|
13256
|
+
React.useEffect(() => {
|
|
13257
13257
|
validateRange();
|
|
13258
13258
|
}, [value]);
|
|
13259
|
-
return /* @__PURE__ */ React
|
|
13259
|
+
return /* @__PURE__ */ React.createElement(
|
|
13260
13260
|
InputGroupWrapper,
|
|
13261
13261
|
{
|
|
13262
13262
|
inputLeftElement,
|
|
13263
13263
|
inputRightElement
|
|
13264
13264
|
},
|
|
13265
|
-
/* @__PURE__ */ React
|
|
13265
|
+
/* @__PURE__ */ React.createElement(
|
|
13266
13266
|
reactNumberFormat.NumericFormat,
|
|
13267
13267
|
__spreadValues$k(__spreadValues$k({
|
|
13268
13268
|
allowLeadingZeros: true,
|
|
@@ -13308,7 +13308,7 @@
|
|
|
13308
13308
|
}
|
|
13309
13309
|
return target;
|
|
13310
13310
|
};
|
|
13311
|
-
const FormattedNumberInputField = React
|
|
13311
|
+
const FormattedNumberInputField = React.forwardRef((_a, ref) => {
|
|
13312
13312
|
var _b = _a, {
|
|
13313
13313
|
name,
|
|
13314
13314
|
label,
|
|
@@ -13324,7 +13324,7 @@
|
|
|
13324
13324
|
"onChange",
|
|
13325
13325
|
"direction"
|
|
13326
13326
|
]);
|
|
13327
|
-
return /* @__PURE__ */ React
|
|
13327
|
+
return /* @__PURE__ */ React.createElement(
|
|
13328
13328
|
Field,
|
|
13329
13329
|
{
|
|
13330
13330
|
name,
|
|
@@ -13334,7 +13334,7 @@
|
|
|
13334
13334
|
validate,
|
|
13335
13335
|
ref
|
|
13336
13336
|
},
|
|
13337
|
-
({ onChange, value }) => /* @__PURE__ */ React
|
|
13337
|
+
({ onChange, value }) => /* @__PURE__ */ React.createElement(
|
|
13338
13338
|
FormattedNumberInput,
|
|
13339
13339
|
__spreadValues$j({
|
|
13340
13340
|
name,
|
|
@@ -13398,7 +13398,7 @@
|
|
|
13398
13398
|
"onChange",
|
|
13399
13399
|
"onBlur"
|
|
13400
13400
|
]);
|
|
13401
|
-
return /* @__PURE__ */ React
|
|
13401
|
+
return /* @__PURE__ */ React.createElement(
|
|
13402
13402
|
CustomInput,
|
|
13403
13403
|
{
|
|
13404
13404
|
mask,
|
|
@@ -13409,7 +13409,7 @@
|
|
|
13409
13409
|
onChange,
|
|
13410
13410
|
onBlur
|
|
13411
13411
|
},
|
|
13412
|
-
({ name: nameProp }) => /* @__PURE__ */ React
|
|
13412
|
+
({ name: nameProp }) => /* @__PURE__ */ React.createElement(
|
|
13413
13413
|
react.Input,
|
|
13414
13414
|
__spreadValues$i({
|
|
13415
13415
|
placeholder: maskPlaceholder != null ? maskPlaceholder : placeholder,
|
|
@@ -13447,7 +13447,7 @@
|
|
|
13447
13447
|
}
|
|
13448
13448
|
return target;
|
|
13449
13449
|
};
|
|
13450
|
-
const TextField = React
|
|
13450
|
+
const TextField = React.forwardRef((_a, ref) => {
|
|
13451
13451
|
var _b = _a, {
|
|
13452
13452
|
name,
|
|
13453
13453
|
label,
|
|
@@ -13469,7 +13469,7 @@
|
|
|
13469
13469
|
"inputLeftElement",
|
|
13470
13470
|
"inputRightElement"
|
|
13471
13471
|
]);
|
|
13472
|
-
return /* @__PURE__ */ React
|
|
13472
|
+
return /* @__PURE__ */ React.createElement(
|
|
13473
13473
|
Field,
|
|
13474
13474
|
{
|
|
13475
13475
|
name,
|
|
@@ -13479,13 +13479,13 @@
|
|
|
13479
13479
|
direction,
|
|
13480
13480
|
ref
|
|
13481
13481
|
},
|
|
13482
|
-
({ onChange, value }) => /* @__PURE__ */ React
|
|
13482
|
+
({ onChange, value }) => /* @__PURE__ */ React.createElement(
|
|
13483
13483
|
InputGroupWrapper,
|
|
13484
13484
|
{
|
|
13485
13485
|
inputLeftElement,
|
|
13486
13486
|
inputRightElement
|
|
13487
13487
|
},
|
|
13488
|
-
/* @__PURE__ */ React
|
|
13488
|
+
/* @__PURE__ */ React.createElement(
|
|
13489
13489
|
As,
|
|
13490
13490
|
__spreadValues$h({
|
|
13491
13491
|
id: name,
|
|
@@ -13554,20 +13554,20 @@
|
|
|
13554
13554
|
"onClose"
|
|
13555
13555
|
]);
|
|
13556
13556
|
const icon = toastIconMap[variant];
|
|
13557
|
-
return /* @__PURE__ */ React
|
|
13557
|
+
return /* @__PURE__ */ React.createElement(
|
|
13558
13558
|
react.Alert,
|
|
13559
13559
|
__spreadValues$g({
|
|
13560
13560
|
variant,
|
|
13561
13561
|
"data-testid": "toast-test"
|
|
13562
13562
|
}, rest),
|
|
13563
|
-
/* @__PURE__ */ React
|
|
13563
|
+
/* @__PURE__ */ React.createElement(react.HStack, { alignItems: "flex-start" }, icon && /* @__PURE__ */ React.createElement(
|
|
13564
13564
|
Icon,
|
|
13565
13565
|
{
|
|
13566
13566
|
as: icon,
|
|
13567
13567
|
color: `icon.toast.${variant}`,
|
|
13568
13568
|
boxSize: 6
|
|
13569
13569
|
}
|
|
13570
|
-
), /* @__PURE__ */ React
|
|
13570
|
+
), /* @__PURE__ */ React.createElement(react.Stack, { spacing: 0, alignItems: "flex-start" }, title && /* @__PURE__ */ React.createElement(Label, { size: "md" }, title), description && /* @__PURE__ */ React.createElement(
|
|
13571
13571
|
P,
|
|
13572
13572
|
{
|
|
13573
13573
|
sx: {
|
|
@@ -13575,7 +13575,7 @@
|
|
|
13575
13575
|
}
|
|
13576
13576
|
},
|
|
13577
13577
|
description
|
|
13578
|
-
)), /* @__PURE__ */ React
|
|
13578
|
+
)), /* @__PURE__ */ React.createElement(
|
|
13579
13579
|
react.CloseButton,
|
|
13580
13580
|
{
|
|
13581
13581
|
size: "sm",
|
|
@@ -13606,7 +13606,7 @@
|
|
|
13606
13606
|
};
|
|
13607
13607
|
const useToast = (defaultOpts = {}) => {
|
|
13608
13608
|
const toast = react.useToast(defaultOpts);
|
|
13609
|
-
const toastIdRef = React
|
|
13609
|
+
const toastIdRef = React.useRef(null);
|
|
13610
13610
|
return (opts = {}) => {
|
|
13611
13611
|
const toastProps = __spreadValues$f({
|
|
13612
13612
|
render: ({ onClose }) => {
|
|
@@ -13615,7 +13615,7 @@
|
|
|
13615
13615
|
title = "Success",
|
|
13616
13616
|
description = ""
|
|
13617
13617
|
} = opts;
|
|
13618
|
-
return /* @__PURE__ */ React
|
|
13618
|
+
return /* @__PURE__ */ React.createElement(
|
|
13619
13619
|
Toast,
|
|
13620
13620
|
{
|
|
13621
13621
|
variant,
|
|
@@ -13686,7 +13686,7 @@
|
|
|
13686
13686
|
const pinColor = pinVariantMap[variant];
|
|
13687
13687
|
const pinSizeTuple = pinSizeMap[size];
|
|
13688
13688
|
const [outerSize, innerSize] = pinSizeTuple;
|
|
13689
|
-
return /* @__PURE__ */ React
|
|
13689
|
+
return /* @__PURE__ */ React.createElement(
|
|
13690
13690
|
react.Circle,
|
|
13691
13691
|
__spreadValues$e({
|
|
13692
13692
|
size: outerSize,
|
|
@@ -13694,7 +13694,7 @@
|
|
|
13694
13694
|
borderWidth: "xs",
|
|
13695
13695
|
borderColor: pinColor
|
|
13696
13696
|
}, rest),
|
|
13697
|
-
/* @__PURE__ */ React
|
|
13697
|
+
/* @__PURE__ */ React.createElement(
|
|
13698
13698
|
react.Circle,
|
|
13699
13699
|
{
|
|
13700
13700
|
size: innerSize,
|
|
@@ -13738,7 +13738,7 @@
|
|
|
13738
13738
|
} = _b, rest = __objRest$a(_b, [
|
|
13739
13739
|
"message"
|
|
13740
13740
|
]);
|
|
13741
|
-
return /* @__PURE__ */ React
|
|
13741
|
+
return /* @__PURE__ */ React.createElement(react.Alert, __spreadValues$d({ backgroundColor: "background.default", color: "text.default", width: "100%" }, rest), /* @__PURE__ */ React.createElement(react.VStack, { w: "full" }, /* @__PURE__ */ React.createElement(Icon, { as: toastIconMap.error, color: "icon.toast.error", boxSize: 6 }), /* @__PURE__ */ React.createElement(react.AlertTitle, null, " Error "), message && /* @__PURE__ */ React.createElement(react.AlertDescription, null, message)));
|
|
13742
13742
|
};
|
|
13743
13743
|
|
|
13744
13744
|
var __defProp$c = Object.defineProperty;
|
|
@@ -13757,7 +13757,7 @@
|
|
|
13757
13757
|
}
|
|
13758
13758
|
return a;
|
|
13759
13759
|
};
|
|
13760
|
-
const StepPanel = (props) => /* @__PURE__ */ React
|
|
13760
|
+
const StepPanel = (props) => /* @__PURE__ */ React.createElement(TabPanel, __spreadValues$c({ padding: 0 }, props));
|
|
13761
13761
|
|
|
13762
13762
|
var __defProp$b = Object.defineProperty;
|
|
13763
13763
|
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
@@ -13775,7 +13775,7 @@
|
|
|
13775
13775
|
}
|
|
13776
13776
|
return a;
|
|
13777
13777
|
};
|
|
13778
|
-
const Steps = (props) => /* @__PURE__ */ React
|
|
13778
|
+
const Steps = (props) => /* @__PURE__ */ React.createElement(react.Tabs, __spreadValues$b({ isManual: true }, props));
|
|
13779
13779
|
|
|
13780
13780
|
var __defProp$a = Object.defineProperty;
|
|
13781
13781
|
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
@@ -13813,12 +13813,12 @@
|
|
|
13813
13813
|
description: descriptionStyle,
|
|
13814
13814
|
indicator: indicatorStyle
|
|
13815
13815
|
} = react.useMultiStyleConfig("Step");
|
|
13816
|
-
return /* @__PURE__ */ React
|
|
13816
|
+
return /* @__PURE__ */ React.createElement(
|
|
13817
13817
|
react.Tab,
|
|
13818
13818
|
__spreadValues$a({
|
|
13819
13819
|
sx: step
|
|
13820
13820
|
}, rest),
|
|
13821
|
-
/* @__PURE__ */ React
|
|
13821
|
+
/* @__PURE__ */ React.createElement(react.Flex, { flexDirection: "row", alignItems: "flex-start", gap: "4", _groupFocusVisible: ring }, indicator && /* @__PURE__ */ React.createElement(
|
|
13822
13822
|
react.Box,
|
|
13823
13823
|
{
|
|
13824
13824
|
sx: indicatorStyle,
|
|
@@ -13826,7 +13826,7 @@
|
|
|
13826
13826
|
justifyContent: "center"
|
|
13827
13827
|
},
|
|
13828
13828
|
indicator
|
|
13829
|
-
), /* @__PURE__ */ React
|
|
13829
|
+
), /* @__PURE__ */ React.createElement(react.Flex, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Capitalized, { sx: labelStyle }, label), description && /* @__PURE__ */ React.createElement(Lead, { sx: descriptionStyle }, description)))
|
|
13830
13830
|
);
|
|
13831
13831
|
};
|
|
13832
13832
|
|
|
@@ -13863,9 +13863,9 @@
|
|
|
13863
13863
|
};
|
|
13864
13864
|
const StepList = (_a) => {
|
|
13865
13865
|
var _b = _a, { children } = _b, rest = __objRest$8(_b, ["children"]);
|
|
13866
|
-
const tabs = React
|
|
13866
|
+
const tabs = React.Children.count(children);
|
|
13867
13867
|
const styles = react.useStyleConfig("StepList", { tabs });
|
|
13868
|
-
return /* @__PURE__ */ React
|
|
13868
|
+
return /* @__PURE__ */ React.createElement(react.TabList, __spreadProps$2(__spreadValues$9({}, rest), { sx: styles }), children);
|
|
13869
13869
|
};
|
|
13870
13870
|
|
|
13871
13871
|
var __defProp$8 = Object.defineProperty;
|
|
@@ -13896,7 +13896,7 @@
|
|
|
13896
13896
|
}
|
|
13897
13897
|
return target;
|
|
13898
13898
|
};
|
|
13899
|
-
const ClipboardInput = React
|
|
13899
|
+
const ClipboardInput = React.forwardRef((_a, ref) => {
|
|
13900
13900
|
var _b = _a, {
|
|
13901
13901
|
size = "md",
|
|
13902
13902
|
value,
|
|
@@ -13908,10 +13908,10 @@
|
|
|
13908
13908
|
]);
|
|
13909
13909
|
const { hasCopied, onCopy, setValue } = react.useClipboard(value);
|
|
13910
13910
|
const { button, icon, tooltip } = react.useMultiStyleConfig("ClipboardInput", { size });
|
|
13911
|
-
React
|
|
13911
|
+
React.useEffect(() => {
|
|
13912
13912
|
setValue(value);
|
|
13913
13913
|
}, [value]);
|
|
13914
|
-
return /* @__PURE__ */ React
|
|
13914
|
+
return /* @__PURE__ */ React.createElement(react.InputGroup, { size, "data-testid": "clipboard-input-test-id", ref }, /* @__PURE__ */ React.createElement(
|
|
13915
13915
|
react.Input,
|
|
13916
13916
|
__spreadValues$8({
|
|
13917
13917
|
textOverflow: "ellipsis",
|
|
@@ -13919,7 +13919,7 @@
|
|
|
13919
13919
|
isReadOnly: true,
|
|
13920
13920
|
value
|
|
13921
13921
|
}, rest)
|
|
13922
|
-
), /* @__PURE__ */ React
|
|
13922
|
+
), /* @__PURE__ */ React.createElement(react.InputRightElement, null, /* @__PURE__ */ React.createElement(
|
|
13923
13923
|
Tooltip,
|
|
13924
13924
|
{
|
|
13925
13925
|
label: hasCopied ? "Copied!" : "Copy",
|
|
@@ -13927,7 +13927,7 @@
|
|
|
13927
13927
|
closeOnClick: false,
|
|
13928
13928
|
sx: tooltip
|
|
13929
13929
|
},
|
|
13930
|
-
/* @__PURE__ */ React
|
|
13930
|
+
/* @__PURE__ */ React.createElement(
|
|
13931
13931
|
IconButton,
|
|
13932
13932
|
{
|
|
13933
13933
|
"aria-label": ariaLabel || "Click to copy",
|
|
@@ -13935,7 +13935,7 @@
|
|
|
13935
13935
|
variant: hasCopied ? "success" : "default",
|
|
13936
13936
|
sx: button
|
|
13937
13937
|
},
|
|
13938
|
-
/* @__PURE__ */ React
|
|
13938
|
+
/* @__PURE__ */ React.createElement(
|
|
13939
13939
|
Icon,
|
|
13940
13940
|
{
|
|
13941
13941
|
as: hasCopied ? icons.CheckDuo : icons.CopyDuo,
|
|
@@ -13988,8 +13988,8 @@
|
|
|
13988
13988
|
"minLeftWidth",
|
|
13989
13989
|
"minRightWidth"
|
|
13990
13990
|
]);
|
|
13991
|
-
const dividerRef = React
|
|
13992
|
-
const mouseDownHandler = React
|
|
13991
|
+
const dividerRef = React.useRef(null);
|
|
13992
|
+
const mouseDownHandler = React.useCallback(
|
|
13993
13993
|
(e) => {
|
|
13994
13994
|
if (e.target !== dividerRef.current) {
|
|
13995
13995
|
return;
|
|
@@ -14022,14 +14022,14 @@
|
|
|
14022
14022
|
[]
|
|
14023
14023
|
);
|
|
14024
14024
|
const containerStyle = react.useStyleConfig("SplitPane", { minLeftWidth, minRightWidth, initialSplit, isOpen });
|
|
14025
|
-
return /* @__PURE__ */ React
|
|
14025
|
+
return /* @__PURE__ */ React.createElement(
|
|
14026
14026
|
react.Grid,
|
|
14027
14027
|
__spreadValues$7({
|
|
14028
14028
|
sx: containerStyle,
|
|
14029
14029
|
onPointerDown: mouseDownHandler
|
|
14030
14030
|
}, rest),
|
|
14031
14031
|
children[0],
|
|
14032
|
-
isOpen && React
|
|
14032
|
+
isOpen && React.cloneElement(children[1], { ref: dividerRef }),
|
|
14033
14033
|
isOpen && children[2]
|
|
14034
14034
|
);
|
|
14035
14035
|
};
|
|
@@ -14064,7 +14064,7 @@
|
|
|
14064
14064
|
};
|
|
14065
14065
|
const PaneItem = (_a) => {
|
|
14066
14066
|
var _b = _a, { children } = _b, rest = __objRest$5(_b, ["children"]);
|
|
14067
|
-
return /* @__PURE__ */ React
|
|
14067
|
+
return /* @__PURE__ */ React.createElement(react.GridItem, __spreadValues$6({ overflow: "hidden" }, rest), children);
|
|
14068
14068
|
};
|
|
14069
14069
|
|
|
14070
14070
|
var __defProp$5 = Object.defineProperty;
|
|
@@ -14085,7 +14085,7 @@
|
|
|
14085
14085
|
};
|
|
14086
14086
|
const PaneDivider = react.forwardRef((props, ref) => {
|
|
14087
14087
|
const style = react.useStyleConfig("PaneDivider");
|
|
14088
|
-
return /* @__PURE__ */ React
|
|
14088
|
+
return /* @__PURE__ */ React.createElement(
|
|
14089
14089
|
react.Box,
|
|
14090
14090
|
__spreadValues$5({
|
|
14091
14091
|
ref,
|
|
@@ -14138,8 +14138,8 @@
|
|
|
14138
14138
|
]);
|
|
14139
14139
|
const rows = getChildrenWithProps(children, {});
|
|
14140
14140
|
const parsedRowHeight = system.useToken("sizes", rowHeight);
|
|
14141
|
-
return /* @__PURE__ */ React
|
|
14142
|
-
(row, i) => /* @__PURE__ */ React
|
|
14141
|
+
return /* @__PURE__ */ React.createElement(react.Stack, __spreadValues$4({ spacing, position: "relative" }, rest), rows.map(
|
|
14142
|
+
(row, i) => /* @__PURE__ */ React.createElement(react.HStack, { key: `row-${i}`, alignItems: stepCircleAlignment }, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
14143
14143
|
react.Box,
|
|
14144
14144
|
{
|
|
14145
14145
|
borderRadius: "full",
|
|
@@ -14150,7 +14150,7 @@
|
|
|
14150
14150
|
zIndex: "docked",
|
|
14151
14151
|
marginTop: `${stepCircleMarginTopPx}px`
|
|
14152
14152
|
},
|
|
14153
|
-
/* @__PURE__ */ React
|
|
14153
|
+
/* @__PURE__ */ React.createElement(
|
|
14154
14154
|
Label,
|
|
14155
14155
|
{
|
|
14156
14156
|
size: "sm",
|
|
@@ -14161,7 +14161,7 @@
|
|
|
14161
14161
|
i + 1
|
|
14162
14162
|
)
|
|
14163
14163
|
), row))
|
|
14164
|
-
), /* @__PURE__ */ React
|
|
14164
|
+
), /* @__PURE__ */ React.createElement(
|
|
14165
14165
|
react.Divider,
|
|
14166
14166
|
{
|
|
14167
14167
|
orientation: "vertical",
|
|
@@ -14205,7 +14205,7 @@
|
|
|
14205
14205
|
const getCustomComponents = () => ({
|
|
14206
14206
|
Option: (_a) => {
|
|
14207
14207
|
var _b = _a, { children } = _b, props = __objRest$3(_b, ["children"]);
|
|
14208
|
-
return /* @__PURE__ */ React
|
|
14208
|
+
return /* @__PURE__ */ React.createElement(ChakraOption, __spreadValues$3({}, props), props.data.isCreation && /* @__PURE__ */ React.createElement(
|
|
14209
14209
|
react.Flex,
|
|
14210
14210
|
{
|
|
14211
14211
|
mr: 3,
|
|
@@ -14214,8 +14214,8 @@
|
|
|
14214
14214
|
justifyContent: "center",
|
|
14215
14215
|
alignItems: "center"
|
|
14216
14216
|
},
|
|
14217
|
-
/* @__PURE__ */ React
|
|
14218
|
-
), !props.data.isCreation && /* @__PURE__ */ React
|
|
14217
|
+
/* @__PURE__ */ React.createElement(Icon, { as: icons.PlusSolid, color: "brand" })
|
|
14218
|
+
), !props.data.isCreation && /* @__PURE__ */ React.createElement(react.Box, { mr: 3, width: 1.5 }), /* @__PURE__ */ React.createElement(
|
|
14219
14219
|
react.Text,
|
|
14220
14220
|
{
|
|
14221
14221
|
color: props.data.isCreation ? "text.brand" : "text.default",
|
|
@@ -14284,19 +14284,19 @@
|
|
|
14284
14284
|
"value",
|
|
14285
14285
|
"menuPlacement"
|
|
14286
14286
|
]);
|
|
14287
|
-
const [selectedOption, setSelectedOption] = React
|
|
14287
|
+
const [selectedOption, setSelectedOption] = React.useState(() => {
|
|
14288
14288
|
var _a2, _b2;
|
|
14289
14289
|
const targetValue = (_a2 = value != null ? value : defaultValue) != null ? _a2 : null;
|
|
14290
14290
|
return targetValue ? (_b2 = standardOptions.find((option) => option.value === targetValue)) != null ? _b2 : null : null;
|
|
14291
14291
|
});
|
|
14292
|
-
const [newOptionPlaceholder, setNewOptionPlaceholder] = React
|
|
14293
|
-
const [createdOptions, setCreatedOptions] = React
|
|
14294
|
-
const [createNewOption, setCreateNewOption] = React
|
|
14295
|
-
const [addFieldInputValue, setAddFieldInputValue] = React
|
|
14292
|
+
const [newOptionPlaceholder, setNewOptionPlaceholder] = React.useState(initialPlaceholder);
|
|
14293
|
+
const [createdOptions, setCreatedOptions] = React.useState([]);
|
|
14294
|
+
const [createNewOption, setCreateNewOption] = React.useState(false);
|
|
14295
|
+
const [addFieldInputValue, setAddFieldInputValue] = React.useState("");
|
|
14296
14296
|
function isCreationOption(option) {
|
|
14297
14297
|
return option && typeof option.isCreation === "boolean";
|
|
14298
14298
|
}
|
|
14299
|
-
const ref = React
|
|
14299
|
+
const ref = React.useRef(null);
|
|
14300
14300
|
const checkIfNewOptionTextExistsInOptions = (string, options) => ramda.any((option) => ramda.toLower(option.value) === string, options);
|
|
14301
14301
|
const handleCreateOption = (newOptionTextString) => {
|
|
14302
14302
|
setCreateNewOption(true);
|
|
@@ -14341,31 +14341,31 @@
|
|
|
14341
14341
|
onOptionChange(option);
|
|
14342
14342
|
}
|
|
14343
14343
|
};
|
|
14344
|
-
const combinedOptions = React
|
|
14344
|
+
const combinedOptions = React.useMemo(
|
|
14345
14345
|
() => yafu.uniqBy(ramda.prop("value"), [...standardOptions, ...createdOptions]),
|
|
14346
14346
|
[standardOptions, createdOptions]
|
|
14347
14347
|
);
|
|
14348
14348
|
const customOptions = [
|
|
14349
14349
|
__spreadProps$1(__spreadValues$2({}, creationOption), {
|
|
14350
|
-
icon: /* @__PURE__ */ React
|
|
14350
|
+
icon: /* @__PURE__ */ React.createElement(react.Icon, { as: icons.PlusSolid, color: "brand" })
|
|
14351
14351
|
}),
|
|
14352
14352
|
...combinedOptions
|
|
14353
14353
|
];
|
|
14354
|
-
React
|
|
14354
|
+
React.useEffect(() => {
|
|
14355
14355
|
var _a2;
|
|
14356
14356
|
const newSelectedOption = (_a2 = combinedOptions.find((option) => option.value === value)) != null ? _a2 : null;
|
|
14357
14357
|
if ((selectedOption == null ? void 0 : selectedOption.value) !== (newSelectedOption == null ? void 0 : newSelectedOption.value)) {
|
|
14358
14358
|
setSelectedOption(newSelectedOption);
|
|
14359
14359
|
}
|
|
14360
14360
|
}, [value, combinedOptions]);
|
|
14361
|
-
return /* @__PURE__ */ React
|
|
14361
|
+
return /* @__PURE__ */ React.createElement(
|
|
14362
14362
|
react.Box,
|
|
14363
14363
|
{
|
|
14364
14364
|
ref,
|
|
14365
14365
|
w: "full",
|
|
14366
14366
|
borderRadius: "none"
|
|
14367
14367
|
},
|
|
14368
|
-
createNewOption && /* @__PURE__ */ React
|
|
14368
|
+
createNewOption && /* @__PURE__ */ React.createElement(
|
|
14369
14369
|
EditableText,
|
|
14370
14370
|
{
|
|
14371
14371
|
value: addFieldInputValue,
|
|
@@ -14389,7 +14389,7 @@
|
|
|
14389
14389
|
}
|
|
14390
14390
|
}
|
|
14391
14391
|
),
|
|
14392
|
-
!createNewOption && /* @__PURE__ */ React
|
|
14392
|
+
!createNewOption && /* @__PURE__ */ React.createElement(
|
|
14393
14393
|
chakraReactSelect.CreatableSelect,
|
|
14394
14394
|
__spreadValues$2({
|
|
14395
14395
|
menuPlacement,
|
|
@@ -14481,15 +14481,15 @@
|
|
|
14481
14481
|
]);
|
|
14482
14482
|
var _a2;
|
|
14483
14483
|
const { isOpen, onToggle, onClose } = react.useDisclosure();
|
|
14484
|
-
const [inputValueState, setInputValueState] = React
|
|
14485
|
-
const [selectOptionState, setselectOptionState] = React
|
|
14486
|
-
const [enableSelectInput, setEnableSelectInput] = React
|
|
14484
|
+
const [inputValueState, setInputValueState] = React.useState(valueProp == null ? void 0 : valueProp.input);
|
|
14485
|
+
const [selectOptionState, setselectOptionState] = React.useState(valueProp == null ? void 0 : valueProp.option);
|
|
14486
|
+
const [enableSelectInput, setEnableSelectInput] = React.useState(false);
|
|
14487
14487
|
const isInputValueControlled = typeof (valueProp == null ? void 0 : valueProp.input) !== "undefined";
|
|
14488
14488
|
const inputValue = isInputValueControlled ? valueProp.input : inputValueState;
|
|
14489
14489
|
const isOptionControlled = typeof (valueProp == null ? void 0 : valueProp.option) !== "undefined";
|
|
14490
14490
|
const selectOption = isOptionControlled ? valueProp.option : selectOptionState;
|
|
14491
|
-
const buttonRef = React
|
|
14492
|
-
const selectRef = React
|
|
14491
|
+
const buttonRef = React.useRef();
|
|
14492
|
+
const selectRef = React.useRef();
|
|
14493
14493
|
const getNewValue = (option, input) => {
|
|
14494
14494
|
const newValueOption = option != null ? option : options[0];
|
|
14495
14495
|
return ramda.is(Number, input) ? { input: Number(input), option: newValueOption } : { option: newValueOption };
|
|
@@ -14521,12 +14521,12 @@
|
|
|
14521
14521
|
}
|
|
14522
14522
|
onToggle();
|
|
14523
14523
|
};
|
|
14524
|
-
React
|
|
14524
|
+
React.useEffect(() => {
|
|
14525
14525
|
if (enableSelectInput) {
|
|
14526
14526
|
selectRef.current.focus();
|
|
14527
14527
|
}
|
|
14528
14528
|
}, [enableSelectInput]);
|
|
14529
|
-
React
|
|
14529
|
+
React.useEffect(() => {
|
|
14530
14530
|
const needsToCorrectOption = !selectOption;
|
|
14531
14531
|
const needsToCorrectInput = !ramda.is(Number, inputValue) && defaultToZeroIfEmpty;
|
|
14532
14532
|
const option = needsToCorrectOption ? options[0] : selectOption;
|
|
@@ -14541,7 +14541,7 @@
|
|
|
14541
14541
|
onChange == null ? void 0 : onChange(getNewValue(option, input));
|
|
14542
14542
|
}
|
|
14543
14543
|
}, [inputValue, defaultToZeroIfEmpty]);
|
|
14544
|
-
return /* @__PURE__ */ React
|
|
14544
|
+
return /* @__PURE__ */ React.createElement(react.InputGroup, null, /* @__PURE__ */ React.createElement(
|
|
14545
14545
|
FormattedNumberInput,
|
|
14546
14546
|
__spreadValues$1({
|
|
14547
14547
|
width: "100%",
|
|
@@ -14556,7 +14556,7 @@
|
|
|
14556
14556
|
min,
|
|
14557
14557
|
max
|
|
14558
14558
|
}, rest)
|
|
14559
|
-
), /* @__PURE__ */ React
|
|
14559
|
+
), /* @__PURE__ */ React.createElement(
|
|
14560
14560
|
react.InputRightElement,
|
|
14561
14561
|
{
|
|
14562
14562
|
width: "auto",
|
|
@@ -14564,7 +14564,7 @@
|
|
|
14564
14564
|
justifyContent: "flex-end",
|
|
14565
14565
|
padding: 2
|
|
14566
14566
|
},
|
|
14567
|
-
/* @__PURE__ */ React
|
|
14567
|
+
/* @__PURE__ */ React.createElement(
|
|
14568
14568
|
react.Button,
|
|
14569
14569
|
{
|
|
14570
14570
|
ref: buttonRef,
|
|
@@ -14575,7 +14575,7 @@
|
|
|
14575
14575
|
},
|
|
14576
14576
|
(_a2 = selectOption == null ? void 0 : selectOption.label) != null ? _a2 : ""
|
|
14577
14577
|
)
|
|
14578
|
-
), /* @__PURE__ */ React
|
|
14578
|
+
), /* @__PURE__ */ React.createElement(react.Box, { position: "absolute", width: "100%" }, /* @__PURE__ */ React.createElement(
|
|
14579
14579
|
Select,
|
|
14580
14580
|
{
|
|
14581
14581
|
ref: selectRef,
|
|
@@ -14648,7 +14648,7 @@
|
|
|
14648
14648
|
"validate",
|
|
14649
14649
|
"onChange"
|
|
14650
14650
|
]);
|
|
14651
|
-
return /* @__PURE__ */ React
|
|
14651
|
+
return /* @__PURE__ */ React.createElement(
|
|
14652
14652
|
Field,
|
|
14653
14653
|
{
|
|
14654
14654
|
name,
|
|
@@ -14657,7 +14657,7 @@
|
|
|
14657
14657
|
isRequired,
|
|
14658
14658
|
validate
|
|
14659
14659
|
},
|
|
14660
|
-
({ value, onChange }) => /* @__PURE__ */ React
|
|
14660
|
+
({ value, onChange }) => /* @__PURE__ */ React.createElement(
|
|
14661
14661
|
ComboPicker,
|
|
14662
14662
|
__spreadValues({
|
|
14663
14663
|
"data-testid": "combo-picker-test-id",
|