@mw-kit/mw-ui 1.10.1 → 1.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Select/hooks/index.d.ts +1 -0
- package/dist/components/Select/hooks/useFloatingMenu/index.d.ts +3 -1
- package/dist/components/Select/hooks/useInitialPlacement/index.d.ts +6 -0
- package/dist/components/Select/styles.d.ts +3 -1
- package/dist/components/Select/types.d.ts +11 -0
- package/dist/index.d.mts +11 -0
- package/dist/index.js +195 -110
- package/dist/index.mjs +159 -74
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18974,8 +18974,8 @@ var ProgressBar = ({ type, value, ...props }) => {
|
|
|
18974
18974
|
var ProgressBar_default = ProgressBar;
|
|
18975
18975
|
|
|
18976
18976
|
// src/components/Select/index.tsx
|
|
18977
|
-
var
|
|
18978
|
-
var
|
|
18977
|
+
var import_react81 = __toESM(require("react"));
|
|
18978
|
+
var import_react82 = require("@floating-ui/react");
|
|
18979
18979
|
|
|
18980
18980
|
// src/components/Select/hooks/useAsyncOptions/index.ts
|
|
18981
18981
|
var import_react70 = require("react");
|
|
@@ -19049,11 +19049,15 @@ var useAsyncOptions_default = useAsyncOptions;
|
|
|
19049
19049
|
|
|
19050
19050
|
// src/components/Select/hooks/useFloatingMenu/index.ts
|
|
19051
19051
|
var import_react71 = require("@floating-ui/react");
|
|
19052
|
-
var useFloatingMenu = ({
|
|
19052
|
+
var useFloatingMenu = ({
|
|
19053
|
+
open,
|
|
19054
|
+
onOpenChange,
|
|
19055
|
+
placement = "bottom"
|
|
19056
|
+
}) => {
|
|
19053
19057
|
const floating = (0, import_react71.useFloating)({
|
|
19054
19058
|
open,
|
|
19055
19059
|
onOpenChange,
|
|
19056
|
-
placement:
|
|
19060
|
+
placement: `${placement}-start`,
|
|
19057
19061
|
whileElementsMounted: import_react71.autoUpdate,
|
|
19058
19062
|
middleware: [
|
|
19059
19063
|
(0, import_react71.flip)(),
|
|
@@ -19082,12 +19086,59 @@ var useFloatingMenu = ({ open, onOpenChange }) => {
|
|
|
19082
19086
|
};
|
|
19083
19087
|
var useFloatingMenu_default = useFloatingMenu;
|
|
19084
19088
|
|
|
19085
|
-
// src/components/Select/hooks/
|
|
19089
|
+
// src/components/Select/hooks/useInitialPlacement/index.ts
|
|
19086
19090
|
var import_react72 = require("react");
|
|
19091
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? import_react72.useLayoutEffect : import_react72.useEffect;
|
|
19092
|
+
var resolveSelectPlacement = (triggerRect, context) => {
|
|
19093
|
+
const midpoint = context.top + context.height / 2;
|
|
19094
|
+
return triggerRect.top >= midpoint ? "top" : "bottom";
|
|
19095
|
+
};
|
|
19096
|
+
var useInitialPlacement = (props, referenceNode) => {
|
|
19097
|
+
const [placement, setPlacement] = (0, import_react72.useState)(
|
|
19098
|
+
props.placement ?? "bottom"
|
|
19099
|
+
);
|
|
19100
|
+
const syncPlacement = (0, import_react72.useCallback)(
|
|
19101
|
+
(node) => {
|
|
19102
|
+
if (props.placement !== void 0) {
|
|
19103
|
+
setPlacement(props.placement);
|
|
19104
|
+
return;
|
|
19105
|
+
}
|
|
19106
|
+
if (!node) return;
|
|
19107
|
+
const context = props.boundRef ? props.boundRef.getBoundingClientRect() : {
|
|
19108
|
+
top: 0,
|
|
19109
|
+
height: window.innerHeight
|
|
19110
|
+
};
|
|
19111
|
+
const nextPlacement = resolveSelectPlacement(
|
|
19112
|
+
node.getBoundingClientRect(),
|
|
19113
|
+
context
|
|
19114
|
+
);
|
|
19115
|
+
setPlacement(nextPlacement);
|
|
19116
|
+
},
|
|
19117
|
+
[props.boundRef, props.placement]
|
|
19118
|
+
);
|
|
19119
|
+
useIsomorphicLayoutEffect(() => {
|
|
19120
|
+
syncPlacement(referenceNode);
|
|
19121
|
+
if (props.placement !== void 0 || !referenceNode) return;
|
|
19122
|
+
const onUpdate = () => {
|
|
19123
|
+
syncPlacement(referenceNode);
|
|
19124
|
+
};
|
|
19125
|
+
window.addEventListener("scroll", onUpdate, true);
|
|
19126
|
+
window.addEventListener("resize", onUpdate);
|
|
19127
|
+
return () => {
|
|
19128
|
+
window.removeEventListener("scroll", onUpdate, true);
|
|
19129
|
+
window.removeEventListener("resize", onUpdate);
|
|
19130
|
+
};
|
|
19131
|
+
}, [referenceNode, syncPlacement, props.placement]);
|
|
19132
|
+
return { placement, syncPlacement };
|
|
19133
|
+
};
|
|
19134
|
+
var useInitialPlacement_default = useInitialPlacement;
|
|
19135
|
+
|
|
19136
|
+
// src/components/Select/hooks/useListNavigation/index.ts
|
|
19137
|
+
var import_react73 = require("react");
|
|
19087
19138
|
var INVALID_INDEX = -1;
|
|
19088
19139
|
var useActiveIndex = (itemCount, scrollToIndex) => {
|
|
19089
|
-
const [activeIndex, setActiveIndex] = (0,
|
|
19090
|
-
(0,
|
|
19140
|
+
const [activeIndex, setActiveIndex] = (0, import_react73.useState)(INVALID_INDEX);
|
|
19141
|
+
(0, import_react73.useEffect)(() => {
|
|
19091
19142
|
setActiveIndex((current) => {
|
|
19092
19143
|
if (current >= itemCount) return INVALID_INDEX;
|
|
19093
19144
|
return current;
|
|
@@ -19107,19 +19158,19 @@ var useListNavigation = ({
|
|
|
19107
19158
|
scrollToIndex
|
|
19108
19159
|
}) => {
|
|
19109
19160
|
const [activeIndex, setActiveIndex] = useActiveIndex(itemCount, scrollToIndex);
|
|
19110
|
-
const firstEnabledIndex = (0,
|
|
19161
|
+
const firstEnabledIndex = (0, import_react73.useMemo)(() => {
|
|
19111
19162
|
for (let index = 0; index < itemCount; index += 1) {
|
|
19112
19163
|
if (!isItemDisabled(index)) return index;
|
|
19113
19164
|
}
|
|
19114
19165
|
return INVALID_INDEX;
|
|
19115
19166
|
}, [isItemDisabled, itemCount]);
|
|
19116
|
-
const lastEnabledIndex = (0,
|
|
19167
|
+
const lastEnabledIndex = (0, import_react73.useMemo)(() => {
|
|
19117
19168
|
for (let index = itemCount - 1; index >= 0; index -= 1) {
|
|
19118
19169
|
if (!isItemDisabled(index)) return index;
|
|
19119
19170
|
}
|
|
19120
19171
|
return INVALID_INDEX;
|
|
19121
19172
|
}, [isItemDisabled, itemCount]);
|
|
19122
|
-
const findNextEnabled = (0,
|
|
19173
|
+
const findNextEnabled = (0, import_react73.useCallback)(
|
|
19123
19174
|
(from, direction) => {
|
|
19124
19175
|
let index = from;
|
|
19125
19176
|
while (index >= 0 && index < itemCount) {
|
|
@@ -19130,7 +19181,7 @@ var useListNavigation = ({
|
|
|
19130
19181
|
},
|
|
19131
19182
|
[isItemDisabled, itemCount]
|
|
19132
19183
|
);
|
|
19133
|
-
const onKeyDown = (0,
|
|
19184
|
+
const onKeyDown = (0, import_react73.useCallback)(
|
|
19134
19185
|
(event) => {
|
|
19135
19186
|
if (event.key === "ArrowDown") {
|
|
19136
19187
|
event.preventDefault();
|
|
@@ -19183,13 +19234,13 @@ var useListNavigation = ({
|
|
|
19183
19234
|
var useListNavigation_default = useListNavigation;
|
|
19184
19235
|
|
|
19185
19236
|
// src/components/Select/hooks/useRuleIndex/index.ts
|
|
19186
|
-
var
|
|
19237
|
+
var import_react74 = require("react");
|
|
19187
19238
|
var useRuleIndex = ({
|
|
19188
19239
|
options,
|
|
19189
19240
|
getKey,
|
|
19190
19241
|
rules
|
|
19191
19242
|
}) => {
|
|
19192
|
-
const failedRuleByKey = (0,
|
|
19243
|
+
const failedRuleByKey = (0, import_react74.useMemo)(() => {
|
|
19193
19244
|
const failedRuleByKey2 = /* @__PURE__ */ new Map();
|
|
19194
19245
|
options.forEach((option) => {
|
|
19195
19246
|
const key = getKey(option);
|
|
@@ -19200,7 +19251,7 @@ var useRuleIndex = ({
|
|
|
19200
19251
|
});
|
|
19201
19252
|
return failedRuleByKey2;
|
|
19202
19253
|
}, [getKey, options, rules]);
|
|
19203
|
-
const getFailedRuleByKey = (0,
|
|
19254
|
+
const getFailedRuleByKey = (0, import_react74.useCallback)(
|
|
19204
19255
|
(key) => {
|
|
19205
19256
|
return failedRuleByKey.get(key);
|
|
19206
19257
|
},
|
|
@@ -19214,11 +19265,11 @@ var useRuleIndex = ({
|
|
|
19214
19265
|
var useRuleIndex_default = useRuleIndex;
|
|
19215
19266
|
|
|
19216
19267
|
// src/components/Select/hooks/useVirtualizedOptions/index.ts
|
|
19217
|
-
var
|
|
19268
|
+
var import_react75 = require("react");
|
|
19218
19269
|
var import_react_virtual = require("@tanstack/react-virtual");
|
|
19219
19270
|
var useVirtualizedOptions = (params) => {
|
|
19220
19271
|
const { optionsLength, loading, onPaginate, overscan = 2 } = params;
|
|
19221
|
-
const estimateSize = (0,
|
|
19272
|
+
const estimateSize = (0, import_react75.useMemo)(() => {
|
|
19222
19273
|
const estimateSize2 = params.estimateSize;
|
|
19223
19274
|
if (estimateSize2 === void 0) {
|
|
19224
19275
|
return () => 46;
|
|
@@ -19228,8 +19279,8 @@ var useVirtualizedOptions = (params) => {
|
|
|
19228
19279
|
}
|
|
19229
19280
|
return () => estimateSize2;
|
|
19230
19281
|
}, [params.estimateSize]);
|
|
19231
|
-
const listRef = (0,
|
|
19232
|
-
const searchRef = (0,
|
|
19282
|
+
const listRef = (0, import_react75.useRef)(null);
|
|
19283
|
+
const searchRef = (0, import_react75.useRef)(null);
|
|
19233
19284
|
const rowVirtualizer = (0, import_react_virtual.useVirtualizer)({
|
|
19234
19285
|
count: optionsLength,
|
|
19235
19286
|
getScrollElement: () => listRef.current,
|
|
@@ -19237,14 +19288,14 @@ var useVirtualizedOptions = (params) => {
|
|
|
19237
19288
|
overscan
|
|
19238
19289
|
});
|
|
19239
19290
|
const virtualItems = rowVirtualizer.getVirtualItems();
|
|
19240
|
-
(0,
|
|
19291
|
+
(0, import_react75.useEffect)(() => {
|
|
19241
19292
|
searchRef.current?.focus();
|
|
19242
19293
|
}, [searchRef.current]);
|
|
19243
|
-
const endIndex = (0,
|
|
19294
|
+
const endIndex = (0, import_react75.useMemo)(
|
|
19244
19295
|
() => virtualItems[virtualItems.length - 1]?.index ?? 0,
|
|
19245
19296
|
[virtualItems]
|
|
19246
19297
|
);
|
|
19247
|
-
(0,
|
|
19298
|
+
(0, import_react75.useEffect)(() => {
|
|
19248
19299
|
if (loading || optionsLength < 1) return;
|
|
19249
19300
|
if (endIndex >= optionsLength - 1 - overscan) {
|
|
19250
19301
|
onPaginate();
|
|
@@ -19260,10 +19311,10 @@ var useVirtualizedOptions = (params) => {
|
|
|
19260
19311
|
var useVirtualizedOptions_default = useVirtualizedOptions;
|
|
19261
19312
|
|
|
19262
19313
|
// src/components/Select/instances/multi/index.tsx
|
|
19263
|
-
var
|
|
19314
|
+
var import_react79 = __toESM(require("react"));
|
|
19264
19315
|
|
|
19265
19316
|
// src/components/Select/components/Apply/index.tsx
|
|
19266
|
-
var
|
|
19317
|
+
var import_react76 = require("react");
|
|
19267
19318
|
|
|
19268
19319
|
// src/components/Select/components/Apply/styles.ts
|
|
19269
19320
|
var import_styled_components73 = __toESM(require("styled-components"));
|
|
@@ -19306,8 +19357,8 @@ var Apply = ({
|
|
|
19306
19357
|
onClose,
|
|
19307
19358
|
draft
|
|
19308
19359
|
}) => {
|
|
19309
|
-
const value = (0,
|
|
19310
|
-
const failedApplyRule = (0,
|
|
19360
|
+
const value = (0, import_react76.useMemo)(() => Array.from(draft.values()), [draft]);
|
|
19361
|
+
const failedApplyRule = (0, import_react76.useMemo)(() => {
|
|
19311
19362
|
const rule = applyRules.find((rule2) => !rule2.allow(value));
|
|
19312
19363
|
return rule;
|
|
19313
19364
|
}, [value, applyRules]);
|
|
@@ -19350,7 +19401,7 @@ var Apply = ({
|
|
|
19350
19401
|
var Apply_default = Apply;
|
|
19351
19402
|
|
|
19352
19403
|
// src/components/Select/components/Scroll/index.tsx
|
|
19353
|
-
var
|
|
19404
|
+
var import_react77 = __toESM(require("react"));
|
|
19354
19405
|
|
|
19355
19406
|
// src/components/Select/components/Scroll/styles.ts
|
|
19356
19407
|
var import_styled_components74 = __toESM(require("styled-components"));
|
|
@@ -19478,7 +19529,7 @@ var OptionRow = import_styled_components74.default.div`
|
|
|
19478
19529
|
|
|
19479
19530
|
// src/components/Select/components/Scroll/index.tsx
|
|
19480
19531
|
var import_jsx_runtime362 = require("react/jsx-runtime");
|
|
19481
|
-
var Scroll =
|
|
19532
|
+
var Scroll = import_react77.default.forwardRef(
|
|
19482
19533
|
({
|
|
19483
19534
|
menuId,
|
|
19484
19535
|
loading,
|
|
@@ -19568,7 +19619,7 @@ var Scroll = import_react76.default.forwardRef(
|
|
|
19568
19619
|
var Scroll_default = Scroll;
|
|
19569
19620
|
|
|
19570
19621
|
// src/components/Select/components/Search/index.tsx
|
|
19571
|
-
var
|
|
19622
|
+
var import_react78 = __toESM(require("react"));
|
|
19572
19623
|
|
|
19573
19624
|
// src/components/Select/components/Search/styles.ts
|
|
19574
19625
|
var import_styled_components75 = __toESM(require("styled-components"));
|
|
@@ -19614,9 +19665,9 @@ var SearchContainer = import_styled_components75.default.div`
|
|
|
19614
19665
|
|
|
19615
19666
|
// src/components/Select/components/Search/index.tsx
|
|
19616
19667
|
var import_jsx_runtime363 = require("react/jsx-runtime");
|
|
19617
|
-
var Search =
|
|
19668
|
+
var Search = import_react78.default.forwardRef(
|
|
19618
19669
|
({ menuId, onKeyDown, value: [value, setValue], activeIndex }, ref) => {
|
|
19619
|
-
const [inputRef, setInputRef] = (0,
|
|
19670
|
+
const [inputRef, setInputRef] = (0, import_react78.useState)(null);
|
|
19620
19671
|
return /* @__PURE__ */ (0, import_jsx_runtime363.jsxs)(SearchContainer, { children: [
|
|
19621
19672
|
/* @__PURE__ */ (0, import_jsx_runtime363.jsx)(
|
|
19622
19673
|
"input",
|
|
@@ -19773,7 +19824,7 @@ var useDraftOptions = (draft, finder) => {
|
|
|
19773
19824
|
debounced: [search]
|
|
19774
19825
|
} = useDebouncedState_default("", () => {
|
|
19775
19826
|
}, SEARCH_DEBOUNCE_MS);
|
|
19776
|
-
const options = (0,
|
|
19827
|
+
const options = (0, import_react79.useMemo)(() => {
|
|
19777
19828
|
const options2 = Array.from(draft.values());
|
|
19778
19829
|
if (!search) return options2;
|
|
19779
19830
|
return finder(search, options2);
|
|
@@ -19786,7 +19837,7 @@ var useDraftOptions = (draft, finder) => {
|
|
|
19786
19837
|
};
|
|
19787
19838
|
};
|
|
19788
19839
|
var useDraft = (value, getKey) => {
|
|
19789
|
-
const [draft, setDraft] = (0,
|
|
19840
|
+
const [draft, setDraft] = (0, import_react79.useState)(() => ({
|
|
19790
19841
|
options: buildMap(value, getKey),
|
|
19791
19842
|
on: false
|
|
19792
19843
|
}));
|
|
@@ -19898,8 +19949,8 @@ var SelectMultiOptions = ({
|
|
|
19898
19949
|
const onUnselectAll = () => {
|
|
19899
19950
|
setDraft(/* @__PURE__ */ new Map([]));
|
|
19900
19951
|
};
|
|
19901
|
-
const getIsSelected = (0,
|
|
19902
|
-
return /* @__PURE__ */ (0, import_jsx_runtime364.jsxs)(
|
|
19952
|
+
const getIsSelected = (0, import_react79.useCallback)((key) => draft.has(key), [draft]);
|
|
19953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime364.jsxs)(import_react79.default.Fragment, { children: [
|
|
19903
19954
|
/* @__PURE__ */ (0, import_jsx_runtime364.jsxs)(Header14, { children: [
|
|
19904
19955
|
/* @__PURE__ */ (0, import_jsx_runtime364.jsxs)(
|
|
19905
19956
|
DraftSwitch,
|
|
@@ -19987,6 +20038,11 @@ var useMultiSelect = ({
|
|
|
19987
20038
|
clearable,
|
|
19988
20039
|
readOnly,
|
|
19989
20040
|
viewMode,
|
|
20041
|
+
borderless,
|
|
20042
|
+
paddingless,
|
|
20043
|
+
zIndex,
|
|
20044
|
+
placement,
|
|
20045
|
+
boundRef,
|
|
19990
20046
|
overscan,
|
|
19991
20047
|
estimateSize,
|
|
19992
20048
|
height,
|
|
@@ -19996,9 +20052,9 @@ var useMultiSelect = ({
|
|
|
19996
20052
|
applyRules,
|
|
19997
20053
|
...buttonProps
|
|
19998
20054
|
}) => {
|
|
19999
|
-
const closedLabel = (0,
|
|
20055
|
+
const closedLabel = (0, import_react79.useMemo)(() => {
|
|
20000
20056
|
if (value.length < 1) {
|
|
20001
|
-
return viewMode ? /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
|
|
20057
|
+
return viewMode ? /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(import_react79.default.Fragment, { children: "\xA0" }) : placeholder;
|
|
20002
20058
|
}
|
|
20003
20059
|
return `H\xE1 ${value.length} op\xE7\xF5es selecionadas`;
|
|
20004
20060
|
}, [placeholder, value.length, viewMode]);
|
|
@@ -20013,7 +20069,7 @@ var useMultiSelect = ({
|
|
|
20013
20069
|
var multi_default = useMultiSelect;
|
|
20014
20070
|
|
|
20015
20071
|
// src/components/Select/instances/single/index.tsx
|
|
20016
|
-
var
|
|
20072
|
+
var import_react80 = __toESM(require("react"));
|
|
20017
20073
|
var import_jsx_runtime365 = require("react/jsx-runtime");
|
|
20018
20074
|
var SelectSingleOptions = ({
|
|
20019
20075
|
loader: loader2,
|
|
@@ -20074,11 +20130,11 @@ var SelectSingleOptions = ({
|
|
|
20074
20130
|
onSelect: onToggleByIndex,
|
|
20075
20131
|
scrollToIndex: rowVirtualizer.scrollToIndex
|
|
20076
20132
|
});
|
|
20077
|
-
const getIsSelected = (0,
|
|
20133
|
+
const getIsSelected = (0, import_react80.useCallback)(
|
|
20078
20134
|
(key) => selectedKey === key,
|
|
20079
20135
|
[selectedKey]
|
|
20080
20136
|
);
|
|
20081
|
-
return /* @__PURE__ */ (0, import_jsx_runtime365.jsxs)(
|
|
20137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime365.jsxs)(import_react80.default.Fragment, { children: [
|
|
20082
20138
|
/* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
|
|
20083
20139
|
Search_default2,
|
|
20084
20140
|
{
|
|
@@ -20124,6 +20180,11 @@ var useSingleSelect = ({
|
|
|
20124
20180
|
clearable,
|
|
20125
20181
|
readOnly,
|
|
20126
20182
|
viewMode,
|
|
20183
|
+
borderless,
|
|
20184
|
+
paddingless,
|
|
20185
|
+
zIndex,
|
|
20186
|
+
placement,
|
|
20187
|
+
boundRef,
|
|
20127
20188
|
overscan,
|
|
20128
20189
|
estimateSize,
|
|
20129
20190
|
height,
|
|
@@ -20133,9 +20194,9 @@ var useSingleSelect = ({
|
|
|
20133
20194
|
...buttonProps
|
|
20134
20195
|
}) => {
|
|
20135
20196
|
const ClosedValueComponent = ValueComponent || OptionComponent;
|
|
20136
|
-
const closedLabel = (0,
|
|
20197
|
+
const closedLabel = (0, import_react80.useMemo)(() => {
|
|
20137
20198
|
if (!value) {
|
|
20138
|
-
return viewMode ? /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
|
|
20199
|
+
return viewMode ? /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(import_react80.default.Fragment, { children: "\xA0" }) : placeholder;
|
|
20139
20200
|
}
|
|
20140
20201
|
return /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
|
|
20141
20202
|
ClosedValueComponent,
|
|
@@ -20166,8 +20227,6 @@ var instances_default = useSelect2;
|
|
|
20166
20227
|
// src/components/Select/styles.ts
|
|
20167
20228
|
var import_styled_components77 = __toESM(require("styled-components"));
|
|
20168
20229
|
var FloatingWrapper = import_styled_components77.default.div`
|
|
20169
|
-
z-index: 1000;
|
|
20170
|
-
|
|
20171
20230
|
&,
|
|
20172
20231
|
& > div {
|
|
20173
20232
|
height: var(--height);
|
|
@@ -20205,17 +20264,30 @@ var Trigger = import_styled_components77.default.button`
|
|
|
20205
20264
|
transition-timing-function: linear;
|
|
20206
20265
|
transition-duration: 0.25s;
|
|
20207
20266
|
|
|
20208
|
-
${({
|
|
20267
|
+
${({
|
|
20268
|
+
theme: theme4,
|
|
20269
|
+
$viewMode: viewMode,
|
|
20270
|
+
$borderless: borderless,
|
|
20271
|
+
$paddingless: paddingless
|
|
20272
|
+
}) => viewMode ? import_styled_components77.css`
|
|
20209
20273
|
padding: 0;
|
|
20210
20274
|
|
|
20211
20275
|
border: none;
|
|
20212
20276
|
` : import_styled_components77.css`
|
|
20213
|
-
|
|
20214
|
-
|
|
20215
|
-
|
|
20216
|
-
|
|
20217
|
-
|
|
20218
|
-
|
|
20277
|
+
${paddingless ? import_styled_components77.css`
|
|
20278
|
+
padding: 0;
|
|
20279
|
+
` : import_styled_components77.css`
|
|
20280
|
+
min-height: 35px;
|
|
20281
|
+
padding: 0 ${theme4.spacings.s3};
|
|
20282
|
+
`}
|
|
20283
|
+
|
|
20284
|
+
${borderless ? import_styled_components77.css`
|
|
20285
|
+
border: none;
|
|
20286
|
+
` : import_styled_components77.css`
|
|
20287
|
+
border-style: solid;
|
|
20288
|
+
border-width: 1px;
|
|
20289
|
+
border-radius: 4px;
|
|
20290
|
+
`}
|
|
20219
20291
|
`}
|
|
20220
20292
|
|
|
20221
20293
|
outline: none !important;
|
|
@@ -20259,11 +20331,11 @@ var Trigger = import_styled_components77.default.button`
|
|
|
20259
20331
|
pointer-events: none;
|
|
20260
20332
|
}
|
|
20261
20333
|
|
|
20262
|
-
>
|
|
20334
|
+
> div:nth-child(2) > svg {
|
|
20263
20335
|
transition-property: transform;
|
|
20264
20336
|
transition-timing-function: linear;
|
|
20265
20337
|
transition-duration: 0.25s;
|
|
20266
|
-
transform: rotate(${({ $
|
|
20338
|
+
transform: rotate(${({ $rotate: rotate }) => rotate ? "180deg" : "0deg"});
|
|
20267
20339
|
}
|
|
20268
20340
|
`;
|
|
20269
20341
|
var TriggerValue = import_styled_components77.default.div`
|
|
@@ -20320,10 +20392,12 @@ var OptionContainer = import_styled_components77.default.div`
|
|
|
20320
20392
|
|
|
20321
20393
|
// src/components/Select/index.tsx
|
|
20322
20394
|
var import_jsx_runtime366 = require("react/jsx-runtime");
|
|
20323
|
-
var Select2 =
|
|
20395
|
+
var Select2 = import_react81.default.forwardRef(
|
|
20324
20396
|
(props, ref) => {
|
|
20325
|
-
const [open, setOpen] = (0,
|
|
20326
|
-
const
|
|
20397
|
+
const [open, setOpen] = (0, import_react81.useState)(false);
|
|
20398
|
+
const [triggerRef, setTriggerRef] = (0, import_react81.useState)(null);
|
|
20399
|
+
const { placement, syncPlacement } = useInitialPlacement_default(props, triggerRef);
|
|
20400
|
+
const id = props.id || (0, import_react81.useId)();
|
|
20327
20401
|
const { isRequired, isInvalid: isInvalid2, isViewMode, isDisabled } = Form_default.useContext(
|
|
20328
20402
|
props.name
|
|
20329
20403
|
);
|
|
@@ -20333,14 +20407,15 @@ var Select2 = import_react80.default.forwardRef(
|
|
|
20333
20407
|
const viewMode = isViewMode() || props.viewMode;
|
|
20334
20408
|
const { floating, transition, interactions } = useFloatingMenu_default({
|
|
20335
20409
|
open,
|
|
20336
|
-
onOpenChange: setOpen
|
|
20410
|
+
onOpenChange: setOpen,
|
|
20411
|
+
placement
|
|
20337
20412
|
});
|
|
20338
|
-
const height = (0,
|
|
20413
|
+
const height = (0, import_react81.useMemo)(() => {
|
|
20339
20414
|
if (transition.status !== "open") return 0;
|
|
20340
20415
|
if (props.height !== void 0) return props.height;
|
|
20341
20416
|
return props.type === "single-select" ? 240 : 260;
|
|
20342
20417
|
}, [transition.status !== "open", props.type, props.height]);
|
|
20343
|
-
const menuId = (0,
|
|
20418
|
+
const menuId = (0, import_react81.useId)();
|
|
20344
20419
|
const onTriggerKeyDown = (event) => {
|
|
20345
20420
|
if (!open && ["ArrowDown", "ArrowUp", "Enter", " "].includes(event.key)) {
|
|
20346
20421
|
event.preventDefault();
|
|
@@ -20348,7 +20423,21 @@ var Select2 = import_react80.default.forwardRef(
|
|
|
20348
20423
|
}
|
|
20349
20424
|
};
|
|
20350
20425
|
const { isEmpty, placeholder, Component: Component5, onClear, buttonProps } = instances_default(props);
|
|
20351
|
-
|
|
20426
|
+
const clearEnabled = !isEmpty && props.clearable && !props.disabled && !props.readOnly;
|
|
20427
|
+
const setRef = (0, import_react81.useCallback)(
|
|
20428
|
+
(node) => {
|
|
20429
|
+
floating.refs.setReference(node);
|
|
20430
|
+
setTriggerRef(node);
|
|
20431
|
+
syncPlacement(node);
|
|
20432
|
+
if (typeof ref === "function") {
|
|
20433
|
+
ref(node);
|
|
20434
|
+
} else if (ref) {
|
|
20435
|
+
ref.current = node;
|
|
20436
|
+
}
|
|
20437
|
+
},
|
|
20438
|
+
[floating.refs.setReference, ref, syncPlacement]
|
|
20439
|
+
);
|
|
20440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime366.jsxs)(import_react81.default.Fragment, { children: [
|
|
20352
20441
|
props.label !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(Label11, { htmlFor: id, $viewMode: viewMode, children: props.label }),
|
|
20353
20442
|
/* @__PURE__ */ (0, import_jsx_runtime366.jsxs)(
|
|
20354
20443
|
Trigger,
|
|
@@ -20359,9 +20448,11 @@ var Select2 = import_react80.default.forwardRef(
|
|
|
20359
20448
|
"aria-haspopup": "listbox",
|
|
20360
20449
|
"aria-expanded": open,
|
|
20361
20450
|
"aria-controls": menuId,
|
|
20362
|
-
$
|
|
20451
|
+
$rotate: open && !clearEnabled,
|
|
20363
20452
|
$empty: isEmpty,
|
|
20364
20453
|
$viewMode: viewMode,
|
|
20454
|
+
$borderless: props.borderless,
|
|
20455
|
+
$paddingless: props.paddingless,
|
|
20365
20456
|
"aria-readonly": props.readOnly || viewMode,
|
|
20366
20457
|
"aria-invalid": invalid,
|
|
20367
20458
|
"aria-required": required && !viewMode,
|
|
@@ -20379,14 +20470,7 @@ var Select2 = import_react80.default.forwardRef(
|
|
|
20379
20470
|
buttonProps.onKeyDown?.(event);
|
|
20380
20471
|
}
|
|
20381
20472
|
}),
|
|
20382
|
-
ref:
|
|
20383
|
-
floating.refs.setReference(node);
|
|
20384
|
-
if (typeof ref === "function") {
|
|
20385
|
-
ref(node);
|
|
20386
|
-
} else if (ref) {
|
|
20387
|
-
ref.current = node;
|
|
20388
|
-
}
|
|
20389
|
-
},
|
|
20473
|
+
ref: setRef,
|
|
20390
20474
|
children: [
|
|
20391
20475
|
/* @__PURE__ */ (0, import_jsx_runtime366.jsx)(TriggerValue, { children: placeholder }),
|
|
20392
20476
|
!viewMode && /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
|
|
@@ -20394,7 +20478,7 @@ var Select2 = import_react80.default.forwardRef(
|
|
|
20394
20478
|
{
|
|
20395
20479
|
width: "14px",
|
|
20396
20480
|
color: props.invalid ? ["warningRed"] : ["darkGrey"],
|
|
20397
|
-
|
|
20481
|
+
...clearEnabled ? {
|
|
20398
20482
|
type: "feather",
|
|
20399
20483
|
icon: "x",
|
|
20400
20484
|
onClick: (e) => {
|
|
@@ -20411,13 +20495,14 @@ var Select2 = import_react80.default.forwardRef(
|
|
|
20411
20495
|
]
|
|
20412
20496
|
}
|
|
20413
20497
|
),
|
|
20414
|
-
transition.isMounted ? /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
|
|
20498
|
+
transition.isMounted ? /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(import_react82.FloatingPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
|
|
20415
20499
|
FloatingWrapper,
|
|
20416
20500
|
{
|
|
20417
20501
|
ref: floating.refs.setFloating,
|
|
20418
20502
|
style: {
|
|
20419
20503
|
...floating.floatingStyles,
|
|
20420
|
-
"--height": `${height}px
|
|
20504
|
+
"--height": `${height}px`,
|
|
20505
|
+
zIndex: props.zIndex !== void 0 ? props.zIndex : 1e3
|
|
20421
20506
|
},
|
|
20422
20507
|
...interactions.getFloatingProps(),
|
|
20423
20508
|
children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
|
|
@@ -20438,7 +20523,7 @@ var Select_default3 = Object.assign(Select2, {
|
|
|
20438
20523
|
});
|
|
20439
20524
|
|
|
20440
20525
|
// src/components/Signature/index.tsx
|
|
20441
|
-
var
|
|
20526
|
+
var import_react83 = require("react");
|
|
20442
20527
|
var import_react_signature_canvas = __toESM(require("react-signature-canvas"));
|
|
20443
20528
|
|
|
20444
20529
|
// src/components/Signature/styles.ts
|
|
@@ -20544,12 +20629,12 @@ var SignatureInput = ({
|
|
|
20544
20629
|
onEnd = voidFn,
|
|
20545
20630
|
...props
|
|
20546
20631
|
}) => {
|
|
20547
|
-
const [name, setName] = (0,
|
|
20548
|
-
const [font, setFont] = (0,
|
|
20549
|
-
const [showPlaceholder, setShowPlaceholder] = (0,
|
|
20550
|
-
const [loading, setLoading] = (0,
|
|
20551
|
-
const [ref, setRef] = (0,
|
|
20552
|
-
(0,
|
|
20632
|
+
const [name, setName] = (0, import_react83.useState)("");
|
|
20633
|
+
const [font, setFont] = (0, import_react83.useState)(FONTS[0]);
|
|
20634
|
+
const [showPlaceholder, setShowPlaceholder] = (0, import_react83.useState)(true);
|
|
20635
|
+
const [loading, setLoading] = (0, import_react83.useState)(false);
|
|
20636
|
+
const [ref, setRef] = (0, import_react83.useState)(null);
|
|
20637
|
+
(0, import_react83.useEffect)(() => {
|
|
20553
20638
|
if (!ref) return;
|
|
20554
20639
|
const refreshValue = () => {
|
|
20555
20640
|
if (ref.isEmpty() && !value) return;
|
|
@@ -20562,7 +20647,7 @@ var SignatureInput = ({
|
|
|
20562
20647
|
window.addEventListener("resize", refreshValue);
|
|
20563
20648
|
return () => window.removeEventListener("resize", refreshValue);
|
|
20564
20649
|
}, [ref, value]);
|
|
20565
|
-
const setByText = (0,
|
|
20650
|
+
const setByText = (0, import_react83.useCallback)(
|
|
20566
20651
|
async (name2, font2) => {
|
|
20567
20652
|
if (!ref) return;
|
|
20568
20653
|
const trimmed = name2.trim();
|
|
@@ -20591,14 +20676,14 @@ var SignatureInput = ({
|
|
|
20591
20676
|
},
|
|
20592
20677
|
[ref]
|
|
20593
20678
|
);
|
|
20594
|
-
const onBeginHandler = (0,
|
|
20679
|
+
const onBeginHandler = (0, import_react83.useCallback)(
|
|
20595
20680
|
(event) => {
|
|
20596
20681
|
onBegin(event, ref);
|
|
20597
20682
|
setShowPlaceholder(false);
|
|
20598
20683
|
},
|
|
20599
20684
|
[ref, onBegin]
|
|
20600
20685
|
);
|
|
20601
|
-
const onEndHandler = (0,
|
|
20686
|
+
const onEndHandler = (0, import_react83.useCallback)(
|
|
20602
20687
|
(event) => {
|
|
20603
20688
|
onEnd(event, ref);
|
|
20604
20689
|
if (!ref || ref.isEmpty()) return;
|
|
@@ -20606,17 +20691,17 @@ var SignatureInput = ({
|
|
|
20606
20691
|
},
|
|
20607
20692
|
[ref, onEnd]
|
|
20608
20693
|
);
|
|
20609
|
-
const onApplyHandler = (0,
|
|
20694
|
+
const onApplyHandler = (0, import_react83.useCallback)(() => {
|
|
20610
20695
|
setByText(name, font);
|
|
20611
20696
|
}, [name, font, setByText]);
|
|
20612
|
-
const onClearHandler = (0,
|
|
20697
|
+
const onClearHandler = (0, import_react83.useCallback)(() => {
|
|
20613
20698
|
if (!ref) return;
|
|
20614
20699
|
setShowPlaceholder(true);
|
|
20615
20700
|
setName("");
|
|
20616
20701
|
ref.clear();
|
|
20617
20702
|
setValue("");
|
|
20618
20703
|
}, [ref]);
|
|
20619
|
-
const empty = (0,
|
|
20704
|
+
const empty = (0, import_react83.useMemo)(() => !value && (!ref || ref.isEmpty()), [ref, value]);
|
|
20620
20705
|
return /* @__PURE__ */ (0, import_jsx_runtime367.jsxs)(Container26, { children: [
|
|
20621
20706
|
/* @__PURE__ */ (0, import_jsx_runtime367.jsx)(
|
|
20622
20707
|
Input_default,
|
|
@@ -20700,13 +20785,13 @@ var SignatureInput = ({
|
|
|
20700
20785
|
var Signature_default = SignatureInput;
|
|
20701
20786
|
|
|
20702
20787
|
// src/components/Tabs/index.tsx
|
|
20703
|
-
var
|
|
20788
|
+
var import_react89 = __toESM(require("react"));
|
|
20704
20789
|
|
|
20705
20790
|
// src/components/Tabs/components/ScrollButtons/index.tsx
|
|
20706
|
-
var
|
|
20791
|
+
var import_react85 = __toESM(require("react"));
|
|
20707
20792
|
|
|
20708
20793
|
// src/components/Tabs/components/ScrollButton/index.tsx
|
|
20709
|
-
var
|
|
20794
|
+
var import_react84 = require("react");
|
|
20710
20795
|
|
|
20711
20796
|
// src/components/Tabs/components/ScrollButton/styled.ts
|
|
20712
20797
|
var import_styled_components79 = __toESM(require("styled-components"));
|
|
@@ -20737,7 +20822,7 @@ var import_jsx_runtime368 = require("react/jsx-runtime");
|
|
|
20737
20822
|
var ScrollButton = (props) => {
|
|
20738
20823
|
const { mode, visible, scrollRef } = props;
|
|
20739
20824
|
const icon = `chevron_${mode}`;
|
|
20740
|
-
const onClick = (0,
|
|
20825
|
+
const onClick = (0, import_react84.useCallback)(() => {
|
|
20741
20826
|
if (!scrollRef) return;
|
|
20742
20827
|
scrollRef.scrollBy({
|
|
20743
20828
|
left: mode === "left" ? -(scrollRef.scrollWidth + 1) : scrollRef.scrollWidth,
|
|
@@ -20790,10 +20875,10 @@ var Container28 = import_styled_components80.default.div`
|
|
|
20790
20875
|
var import_jsx_runtime369 = require("react/jsx-runtime");
|
|
20791
20876
|
var ScrollButtons = (props) => {
|
|
20792
20877
|
const { activeTabIndex, tabsLength } = props;
|
|
20793
|
-
const [ref, setRef] = (0,
|
|
20794
|
-
const [showLeftArrow, setShowLeftArrow] = (0,
|
|
20795
|
-
const [showRightArrow, setShowRightArrow] = (0,
|
|
20796
|
-
const checkScrollPosition = (0,
|
|
20878
|
+
const [ref, setRef] = (0, import_react85.useState)(null);
|
|
20879
|
+
const [showLeftArrow, setShowLeftArrow] = (0, import_react85.useState)(false);
|
|
20880
|
+
const [showRightArrow, setShowRightArrow] = (0, import_react85.useState)(false);
|
|
20881
|
+
const checkScrollPosition = (0, import_react85.useCallback)(() => {
|
|
20797
20882
|
if (!ref) return;
|
|
20798
20883
|
if (ref.scrollWidth > ref.offsetWidth) {
|
|
20799
20884
|
const { scrollLeft, scrollWidth, clientWidth } = ref;
|
|
@@ -20804,12 +20889,12 @@ var ScrollButtons = (props) => {
|
|
|
20804
20889
|
setShowRightArrow(false);
|
|
20805
20890
|
}
|
|
20806
20891
|
}, [ref]);
|
|
20807
|
-
(0,
|
|
20892
|
+
(0, import_react85.useEffect)(() => {
|
|
20808
20893
|
checkScrollPosition();
|
|
20809
20894
|
window.addEventListener("resize", checkScrollPosition);
|
|
20810
20895
|
return () => window.removeEventListener("resize", checkScrollPosition);
|
|
20811
20896
|
}, [checkScrollPosition, tabsLength]);
|
|
20812
|
-
(0,
|
|
20897
|
+
(0, import_react85.useEffect)(() => {
|
|
20813
20898
|
if (!ref) return;
|
|
20814
20899
|
if (ref.scrollWidth <= ref.offsetWidth) return;
|
|
20815
20900
|
const element = ref.children[activeTabIndex];
|
|
@@ -20819,7 +20904,7 @@ var ScrollButtons = (props) => {
|
|
|
20819
20904
|
inline: "nearest"
|
|
20820
20905
|
});
|
|
20821
20906
|
}, [activeTabIndex, ref]);
|
|
20822
|
-
return /* @__PURE__ */ (0, import_jsx_runtime369.jsxs)(
|
|
20907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime369.jsxs)(import_react85.default.Fragment, { children: [
|
|
20823
20908
|
/* @__PURE__ */ (0, import_jsx_runtime369.jsx)(ScrollButton_default, { scrollRef: ref, mode: "left", visible: showLeftArrow }),
|
|
20824
20909
|
/* @__PURE__ */ (0, import_jsx_runtime369.jsx)(
|
|
20825
20910
|
Container28,
|
|
@@ -20842,7 +20927,7 @@ var ScrollButtons = (props) => {
|
|
|
20842
20927
|
var ScrollButtons_default = ScrollButtons;
|
|
20843
20928
|
|
|
20844
20929
|
// src/components/Tabs/components/TabItem/index.tsx
|
|
20845
|
-
var
|
|
20930
|
+
var import_react88 = __toESM(require("react"));
|
|
20846
20931
|
|
|
20847
20932
|
// src/components/Tabs/functions.ts
|
|
20848
20933
|
var sortTabs = (tabs, sorted = []) => {
|
|
@@ -20890,7 +20975,7 @@ var buildComponent = (component, provider) => {
|
|
|
20890
20975
|
};
|
|
20891
20976
|
|
|
20892
20977
|
// src/components/Tabs/components/TabItem/components/Close/index.tsx
|
|
20893
|
-
var
|
|
20978
|
+
var import_react86 = require("react");
|
|
20894
20979
|
|
|
20895
20980
|
// src/components/Tabs/components/TabItem/components/Close/styles.ts
|
|
20896
20981
|
var import_styled_components81 = __toESM(require("styled-components"));
|
|
@@ -20928,7 +21013,7 @@ var Close2 = (props) => {
|
|
|
20928
21013
|
options: [options, setOptions]
|
|
20929
21014
|
} = props;
|
|
20930
21015
|
const onClose = props.onClose || (() => true);
|
|
20931
|
-
const onClickClose = (0,
|
|
21016
|
+
const onClickClose = (0, import_react86.useCallback)(
|
|
20932
21017
|
async (event) => {
|
|
20933
21018
|
if (options.length === 1) return;
|
|
20934
21019
|
const newOptions = [...options];
|
|
@@ -20957,7 +21042,7 @@ var Close2 = (props) => {
|
|
|
20957
21042
|
var Close_default = Close2;
|
|
20958
21043
|
|
|
20959
21044
|
// src/components/Tabs/components/TabItem/components/LabelItem/index.tsx
|
|
20960
|
-
var
|
|
21045
|
+
var import_react87 = require("react");
|
|
20961
21046
|
|
|
20962
21047
|
// src/components/Tabs/components/TabItem/components/LabelItem/styled.ts
|
|
20963
21048
|
var import_styled_components82 = __toESM(require("styled-components"));
|
|
@@ -21015,7 +21100,7 @@ var StyledTab = import_styled_components82.default.div`
|
|
|
21015
21100
|
var import_jsx_runtime371 = require("react/jsx-runtime");
|
|
21016
21101
|
var LabelItem = (props) => {
|
|
21017
21102
|
const { children, onClick, primary, hasSiblings, internal } = props;
|
|
21018
|
-
const [ref, setRef] = (0,
|
|
21103
|
+
const [ref, setRef] = (0, import_react87.useState)(null);
|
|
21019
21104
|
return /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(
|
|
21020
21105
|
StyledTab,
|
|
21021
21106
|
{
|
|
@@ -21071,7 +21156,7 @@ var Container29 = import_styled_components83.default.div`
|
|
|
21071
21156
|
|
|
21072
21157
|
// src/components/Tabs/components/TabItem/index.tsx
|
|
21073
21158
|
var import_jsx_runtime372 = require("react/jsx-runtime");
|
|
21074
|
-
var VoidClose = () => /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(
|
|
21159
|
+
var VoidClose = () => /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(import_react88.default.Fragment, {});
|
|
21075
21160
|
var TabItem = (props) => {
|
|
21076
21161
|
const {
|
|
21077
21162
|
active: [active, setActive],
|
|
@@ -21081,7 +21166,7 @@ var TabItem = (props) => {
|
|
|
21081
21166
|
alwaysOpen
|
|
21082
21167
|
} = props;
|
|
21083
21168
|
const CloseComponent = alwaysOpen || tabs.length < 2 ? VoidClose : Close_default;
|
|
21084
|
-
return /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(
|
|
21169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(import_react88.default.Fragment, { children: sortedTabs.map(({ index, ...tab }) => {
|
|
21085
21170
|
const isActive = index === active;
|
|
21086
21171
|
const hasSiblings = hasChildren(tabs, tab.group);
|
|
21087
21172
|
const canClose = !props.internal && (!tab.primary || !hasSiblings);
|
|
@@ -21177,11 +21262,11 @@ var Tabs = import_styled_components84.default.div`
|
|
|
21177
21262
|
|
|
21178
21263
|
// src/components/Tabs/index.tsx
|
|
21179
21264
|
var import_jsx_runtime373 = require("react/jsx-runtime");
|
|
21180
|
-
var VoidProvider = (props) => /* @__PURE__ */ (0, import_jsx_runtime373.jsx)(
|
|
21265
|
+
var VoidProvider = (props) => /* @__PURE__ */ (0, import_jsx_runtime373.jsx)(import_react89.default.Fragment, { children: props.children });
|
|
21181
21266
|
var Component4 = (props) => {
|
|
21182
21267
|
const components = props.components || {};
|
|
21183
|
-
const [options, setOptions] = typeof props.options[1] === "function" ? props.options : (0,
|
|
21184
|
-
const [active, setActive] = Array.isArray(props.active) ? props.active : (0,
|
|
21268
|
+
const [options, setOptions] = typeof props.options[1] === "function" ? props.options : (0, import_react89.useState)(props.options);
|
|
21269
|
+
const [active, setActive] = Array.isArray(props.active) ? props.active : (0, import_react89.useState)(props.active);
|
|
21185
21270
|
const sortedTabs = sortTabs(options.map((tab, index) => ({ ...tab, index })));
|
|
21186
21271
|
const activeTabIndex = sortedTabs.findIndex((tab) => tab.index === active);
|
|
21187
21272
|
const divProps = filterObject(props, [
|
|
@@ -21195,7 +21280,7 @@ var Component4 = (props) => {
|
|
|
21195
21280
|
"delimiter",
|
|
21196
21281
|
"spacing"
|
|
21197
21282
|
]);
|
|
21198
|
-
return /* @__PURE__ */ (0, import_jsx_runtime373.jsxs)(
|
|
21283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime373.jsxs)(import_react89.default.Fragment, { children: [
|
|
21199
21284
|
/* @__PURE__ */ (0, import_jsx_runtime373.jsx)(
|
|
21200
21285
|
Tabs,
|
|
21201
21286
|
{
|
|
@@ -21228,7 +21313,7 @@ var Component4 = (props) => {
|
|
|
21228
21313
|
),
|
|
21229
21314
|
options.map((tab, index) => {
|
|
21230
21315
|
if (tab.component === void 0) {
|
|
21231
|
-
return /* @__PURE__ */ (0, import_jsx_runtime373.jsx)(
|
|
21316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime373.jsx)(import_react89.default.Fragment, {}, index);
|
|
21232
21317
|
}
|
|
21233
21318
|
const Component5 = components[tab.component];
|
|
21234
21319
|
const Provider7 = Component5.provider || VoidProvider;
|
|
@@ -21406,7 +21491,7 @@ var Toast = ({
|
|
|
21406
21491
|
var Toast_default = Toast;
|
|
21407
21492
|
|
|
21408
21493
|
// src/components/Zoom/index.tsx
|
|
21409
|
-
var
|
|
21494
|
+
var import_react90 = __toESM(require("react"));
|
|
21410
21495
|
|
|
21411
21496
|
// src/components/Zoom/styles.ts
|
|
21412
21497
|
var import_styled_components87 = __toESM(require("styled-components"));
|
|
@@ -21481,8 +21566,8 @@ var ModalContent = import_styled_components87.default.div`
|
|
|
21481
21566
|
var import_jsx_runtime376 = require("react/jsx-runtime");
|
|
21482
21567
|
var Zoom = (props) => {
|
|
21483
21568
|
const { src, width, height, ...imgProps } = props;
|
|
21484
|
-
const [modalOpened, setModalOpened] = (0,
|
|
21485
|
-
return /* @__PURE__ */ (0, import_jsx_runtime376.jsxs)(
|
|
21569
|
+
const [modalOpened, setModalOpened] = (0, import_react90.useState)(false);
|
|
21570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime376.jsxs)(import_react90.default.Fragment, { children: [
|
|
21486
21571
|
/* @__PURE__ */ (0, import_jsx_runtime376.jsxs)(
|
|
21487
21572
|
Container32,
|
|
21488
21573
|
{
|