@mw-kit/mw-ui 1.8.13 → 1.8.14
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/index.js
CHANGED
|
@@ -7767,10 +7767,10 @@ var Button = (props) => {
|
|
|
7767
7767
|
var Button_default = Button;
|
|
7768
7768
|
|
|
7769
7769
|
// src/components/Filters/AppliedFilters/components/Menu/index.tsx
|
|
7770
|
-
var
|
|
7770
|
+
var import_react41 = require("react");
|
|
7771
7771
|
|
|
7772
7772
|
// src/components/Input/index.tsx
|
|
7773
|
-
var
|
|
7773
|
+
var import_react40 = __toESM(require("react"));
|
|
7774
7774
|
|
|
7775
7775
|
// src/components/Input/components/Checkbox/index.tsx
|
|
7776
7776
|
var import_react7 = __toESM(require("react"));
|
|
@@ -13169,7 +13169,7 @@ Range.displayName = "input";
|
|
|
13169
13169
|
var Range_default = Range;
|
|
13170
13170
|
|
|
13171
13171
|
// src/components/Input/components/Select/index.tsx
|
|
13172
|
-
var
|
|
13172
|
+
var import_react36 = __toESM(require("react"));
|
|
13173
13173
|
|
|
13174
13174
|
// src/components/Input/components/Select/hooks/Select/index.tsx
|
|
13175
13175
|
var import_react31 = __toESM(require("react"));
|
|
@@ -13404,7 +13404,10 @@ var useSelect = (props, [highlight, setHighlight], [options, setOptions], setOpe
|
|
|
13404
13404
|
var Select_default = useSelect;
|
|
13405
13405
|
|
|
13406
13406
|
// src/components/Input/components/Select/hooks/SelectMultiple/index.tsx
|
|
13407
|
-
var
|
|
13407
|
+
var import_react35 = __toESM(require("react"));
|
|
13408
|
+
|
|
13409
|
+
// src/components/Input/components/Select/hooks/SelectMultiple/components/Footer/index.tsx
|
|
13410
|
+
var import_react33 = __toESM(require("react"));
|
|
13408
13411
|
|
|
13409
13412
|
// src/components/Input/components/Select/hooks/SelectMultiple/context.ts
|
|
13410
13413
|
var import_react32 = __toESM(require("react"));
|
|
@@ -13419,9 +13422,16 @@ var Footer2 = () => {
|
|
|
13419
13422
|
const {
|
|
13420
13423
|
props: { value, setValue },
|
|
13421
13424
|
checked: [checked],
|
|
13422
|
-
setOpen
|
|
13425
|
+
setOpen,
|
|
13426
|
+
limits
|
|
13423
13427
|
} = context;
|
|
13428
|
+
const { min, max, enabled, error } = limits;
|
|
13429
|
+
const isDirty = checked.length !== value.length || checked.some((e) => !value.includes(e.value));
|
|
13430
|
+
const belowMin = enabled && typeof min === "number" ? checked.length < min : false;
|
|
13431
|
+
const aboveMax = enabled && typeof max === "number" ? checked.length > max : false;
|
|
13432
|
+
const disabled = !!error || !isDirty || belowMin || aboveMax;
|
|
13424
13433
|
const onClick = () => {
|
|
13434
|
+
if (disabled) return;
|
|
13425
13435
|
const [value2, data] = checked.reduce(
|
|
13426
13436
|
(r, e) => [
|
|
13427
13437
|
[...r[0], e.value],
|
|
@@ -13432,22 +13442,35 @@ var Footer2 = () => {
|
|
|
13432
13442
|
setValue(value2, data);
|
|
13433
13443
|
setOpen(false);
|
|
13434
13444
|
};
|
|
13435
|
-
|
|
13436
|
-
|
|
13437
|
-
|
|
13438
|
-
|
|
13439
|
-
|
|
13440
|
-
|
|
13441
|
-
|
|
13442
|
-
|
|
13443
|
-
|
|
13444
|
-
|
|
13445
|
-
|
|
13445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)(import_react33.default.Fragment, { children: [
|
|
13446
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
|
|
13447
|
+
"span",
|
|
13448
|
+
{
|
|
13449
|
+
style: {
|
|
13450
|
+
padding: "7px",
|
|
13451
|
+
color: "#d32f2f",
|
|
13452
|
+
fontSize: "12px",
|
|
13453
|
+
flex: 1
|
|
13454
|
+
},
|
|
13455
|
+
children: error
|
|
13456
|
+
}
|
|
13457
|
+
),
|
|
13458
|
+
/* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
|
|
13459
|
+
Button_default2,
|
|
13460
|
+
{
|
|
13461
|
+
type: "button",
|
|
13462
|
+
content: "Aplicar",
|
|
13463
|
+
onClick,
|
|
13464
|
+
style: { marginRight: "-3.5px" },
|
|
13465
|
+
disabled
|
|
13466
|
+
}
|
|
13467
|
+
)
|
|
13468
|
+
] });
|
|
13446
13469
|
};
|
|
13447
13470
|
var Footer_default = Footer2;
|
|
13448
13471
|
|
|
13449
13472
|
// src/components/Input/components/Select/hooks/SelectMultiple/components/Header/index.tsx
|
|
13450
|
-
var
|
|
13473
|
+
var import_react34 = __toESM(require("react"));
|
|
13451
13474
|
|
|
13452
13475
|
// src/components/Link/index.tsx
|
|
13453
13476
|
var import_styled_components42 = __toESM(require("styled-components"));
|
|
@@ -13514,8 +13537,10 @@ var CheckAll = () => {
|
|
|
13514
13537
|
const context = useContext3();
|
|
13515
13538
|
const {
|
|
13516
13539
|
checked: [checked, setChecked],
|
|
13517
|
-
options
|
|
13540
|
+
options,
|
|
13541
|
+
limits
|
|
13518
13542
|
} = context;
|
|
13543
|
+
const { max, enabled, error } = limits;
|
|
13519
13544
|
const maxCheck = options.reduce((count, o, idx) => {
|
|
13520
13545
|
var _a;
|
|
13521
13546
|
if (o.disabled) return count;
|
|
@@ -13523,19 +13548,20 @@ var CheckAll = () => {
|
|
|
13523
13548
|
if (rule) return count;
|
|
13524
13549
|
return count + 1;
|
|
13525
13550
|
}, 0);
|
|
13551
|
+
const maxAllowed = enabled && typeof max === "number" ? Math.min(max, maxCheck) : maxCheck;
|
|
13526
13552
|
const onClick = () => {
|
|
13527
13553
|
setChecked((prev) => {
|
|
13528
|
-
if (prev.length >=
|
|
13529
|
-
|
|
13530
|
-
|
|
13531
|
-
|
|
13532
|
-
|
|
13533
|
-
|
|
13534
|
-
|
|
13535
|
-
|
|
13536
|
-
|
|
13537
|
-
|
|
13538
|
-
);
|
|
13554
|
+
if (prev.length >= maxAllowed) return [];
|
|
13555
|
+
if (maxAllowed <= 0) return [];
|
|
13556
|
+
const checked2 = [];
|
|
13557
|
+
options.forEach((o, idx) => {
|
|
13558
|
+
var _a;
|
|
13559
|
+
if (checked2.length >= maxAllowed) return;
|
|
13560
|
+
if (o.disabled) return;
|
|
13561
|
+
const rule = (_a = o.rules) == null ? void 0 : _a.some((rule2) => rule2(idx, o.data) !== true);
|
|
13562
|
+
if (rule) return;
|
|
13563
|
+
checked2.push({ value: o.value, data: o.data });
|
|
13564
|
+
});
|
|
13539
13565
|
return checked2;
|
|
13540
13566
|
});
|
|
13541
13567
|
};
|
|
@@ -13548,8 +13574,8 @@ var CheckAll = () => {
|
|
|
13548
13574
|
/* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
13549
13575
|
Link_default2,
|
|
13550
13576
|
{
|
|
13551
|
-
children: checked.length >=
|
|
13552
|
-
onClick
|
|
13577
|
+
children: checked.length >= maxAllowed ? "Desmarcar todos" : "Selecionar todos",
|
|
13578
|
+
onClick: error ? void 0 : onClick
|
|
13553
13579
|
}
|
|
13554
13580
|
)
|
|
13555
13581
|
] });
|
|
@@ -13557,13 +13583,15 @@ var CheckAll = () => {
|
|
|
13557
13583
|
var Header3 = () => {
|
|
13558
13584
|
const context = useContext3();
|
|
13559
13585
|
if (!context.props.search) {
|
|
13560
|
-
return /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
13586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(import_react34.default.Fragment, {});
|
|
13561
13587
|
}
|
|
13562
13588
|
const {
|
|
13563
|
-
searchInput: [searchInput, setSearchInput]
|
|
13589
|
+
searchInput: [searchInput, setSearchInput],
|
|
13590
|
+
limits
|
|
13564
13591
|
} = context;
|
|
13592
|
+
const showSelectAll = context.props.selectAll && limits.max === void 0;
|
|
13565
13593
|
return /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)(HeaderContainer2, { children: [
|
|
13566
|
-
|
|
13594
|
+
showSelectAll && /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(CheckAll, {}),
|
|
13567
13595
|
/* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
13568
13596
|
Input_default,
|
|
13569
13597
|
{
|
|
@@ -13588,22 +13616,30 @@ var import_jsx_runtime325 = require("react/jsx-runtime");
|
|
|
13588
13616
|
var Label6 = (props) => {
|
|
13589
13617
|
const context = useContext3();
|
|
13590
13618
|
const {
|
|
13591
|
-
checked: [checked, setChecked]
|
|
13619
|
+
checked: [checked, setChecked],
|
|
13620
|
+
limits
|
|
13592
13621
|
} = context;
|
|
13622
|
+
const { max, enabled } = limits;
|
|
13593
13623
|
const { disabled, value } = props.option;
|
|
13624
|
+
const isChecked = checked.findIndex((e) => e.value === value) !== -1;
|
|
13625
|
+
const disabledByLimit = enabled && typeof max === "number" && checked.length >= max && !isChecked;
|
|
13626
|
+
const finalDisabled = disabled || disabledByLimit || !!limits.error;
|
|
13594
13627
|
const LabelComponent = props.label;
|
|
13595
13628
|
return /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
|
|
13596
13629
|
Checkbox_default,
|
|
13597
13630
|
{
|
|
13598
13631
|
type: "checkbox",
|
|
13599
|
-
checked:
|
|
13632
|
+
checked: isChecked,
|
|
13600
13633
|
label: typeof LabelComponent !== "function" ? LabelComponent : /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(LabelComponent, { ...props.option }),
|
|
13601
|
-
disabled,
|
|
13634
|
+
disabled: finalDisabled,
|
|
13602
13635
|
onChange: (event) => {
|
|
13603
|
-
const
|
|
13636
|
+
const isChecked2 = event.target.checked;
|
|
13604
13637
|
setChecked((prev) => {
|
|
13605
13638
|
const newState = prev.filter((v) => v.value !== value);
|
|
13606
|
-
if (
|
|
13639
|
+
if (isChecked2) {
|
|
13640
|
+
if (enabled && typeof max === "number" && prev.length >= max) {
|
|
13641
|
+
return prev;
|
|
13642
|
+
}
|
|
13607
13643
|
const e = props.value.find((e2) => e2.value === value);
|
|
13608
13644
|
newState.push(
|
|
13609
13645
|
e || {
|
|
@@ -13628,24 +13664,44 @@ var Label6 = (props) => {
|
|
|
13628
13664
|
};
|
|
13629
13665
|
var Label_default2 = Label6;
|
|
13630
13666
|
|
|
13667
|
+
// src/components/Input/components/Select/hooks/SelectMultiple/utils.ts
|
|
13668
|
+
var resolveLimits = (minSelected, maxSelected) => {
|
|
13669
|
+
const min = typeof minSelected === "number" && minSelected >= 0 ? minSelected : void 0;
|
|
13670
|
+
const max = typeof maxSelected === "number" && maxSelected >= 0 ? maxSelected : void 0;
|
|
13671
|
+
const enabled = min !== void 0 || max !== void 0;
|
|
13672
|
+
if (!enabled) {
|
|
13673
|
+
return { enabled };
|
|
13674
|
+
}
|
|
13675
|
+
if (min !== void 0 && max !== void 0 && min > max) {
|
|
13676
|
+
return {
|
|
13677
|
+
enabled: false,
|
|
13678
|
+
error: "minSelected cannot be greater than maxSelected"
|
|
13679
|
+
};
|
|
13680
|
+
}
|
|
13681
|
+
return { min, max, enabled };
|
|
13682
|
+
};
|
|
13683
|
+
|
|
13631
13684
|
// src/components/Input/components/Select/hooks/SelectMultiple/index.tsx
|
|
13632
13685
|
var import_jsx_runtime326 = require("react/jsx-runtime");
|
|
13633
|
-
var getOptions2 = (options, value) => {
|
|
13686
|
+
var getOptions2 = (options, value, checked, limits) => {
|
|
13687
|
+
const limitReached = limits.enabled && typeof limits.max === "number" && checked.length >= limits.max && !limits.error;
|
|
13634
13688
|
return options.map((option) => {
|
|
13635
13689
|
const { label, onClick } = option;
|
|
13636
13690
|
const data = { data: option.data, value: option.value };
|
|
13691
|
+
const isChecked = checked.some((c) => c.value === option.value);
|
|
13692
|
+
const disabled = option.disabled || (!!limits.error || limitReached && !isChecked);
|
|
13637
13693
|
const parsed = {
|
|
13638
13694
|
label: (option2) => /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
|
|
13639
13695
|
Label_default2,
|
|
13640
13696
|
{
|
|
13641
|
-
option: { ...data, disabled: option2.disabled },
|
|
13697
|
+
option: { ...data, disabled: disabled || option2.disabled },
|
|
13642
13698
|
label,
|
|
13643
13699
|
value
|
|
13644
13700
|
}
|
|
13645
13701
|
),
|
|
13646
13702
|
onClick,
|
|
13647
13703
|
data,
|
|
13648
|
-
disabled
|
|
13704
|
+
disabled,
|
|
13649
13705
|
rules: option.rules,
|
|
13650
13706
|
keepOpen: true
|
|
13651
13707
|
};
|
|
@@ -13664,10 +13720,17 @@ var parseValue = (value) => {
|
|
|
13664
13720
|
};
|
|
13665
13721
|
var useSelectMultiple = (props, [highlight, setHighlight], [options, setOptions]) => {
|
|
13666
13722
|
const initial = parseValue(props.value);
|
|
13667
|
-
const [checked, setChecked] = (0,
|
|
13723
|
+
const [checked, setChecked] = (0, import_react35.useState)([
|
|
13668
13724
|
...initial
|
|
13669
13725
|
]);
|
|
13670
|
-
const
|
|
13726
|
+
const limits = resolveLimits(props.minSelected, props.maxSelected);
|
|
13727
|
+
const { max, enabled } = limits;
|
|
13728
|
+
(0, import_react35.useEffect)(() => {
|
|
13729
|
+
if (limits.error) {
|
|
13730
|
+
console.error(`[SelectMultiple]: ${limits.error}`);
|
|
13731
|
+
}
|
|
13732
|
+
}, [limits.error]);
|
|
13733
|
+
const parsedOptions = getOptions2(options, initial, checked, limits);
|
|
13671
13734
|
const inputContent = getInputContent2(props.value);
|
|
13672
13735
|
const onReset = () => {
|
|
13673
13736
|
setChecked([...initial]);
|
|
@@ -13679,6 +13742,9 @@ var useSelectMultiple = (props, [highlight, setHighlight], [options, setOptions]
|
|
|
13679
13742
|
setChecked((prev) => {
|
|
13680
13743
|
const index2 = prev.findIndex((e) => e.value === option.value);
|
|
13681
13744
|
if (index2 < 0) {
|
|
13745
|
+
if (enabled && typeof max === "number" && prev.length >= max) {
|
|
13746
|
+
return prev;
|
|
13747
|
+
}
|
|
13682
13748
|
return [
|
|
13683
13749
|
...prev,
|
|
13684
13750
|
{
|
|
@@ -13699,7 +13765,7 @@ var useSelectMultiple = (props, [highlight, setHighlight], [options, setOptions]
|
|
|
13699
13765
|
onReset,
|
|
13700
13766
|
menu: {
|
|
13701
13767
|
itemSpacing: void 0,
|
|
13702
|
-
before: /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(
|
|
13768
|
+
before: /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(import_react35.default.Fragment, { children: [
|
|
13703
13769
|
/* @__PURE__ */ (0, import_jsx_runtime326.jsx)(Header_default2, {}),
|
|
13704
13770
|
/* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
|
|
13705
13771
|
HiddenInput,
|
|
@@ -13719,7 +13785,13 @@ var useSelectMultiple = (props, [highlight, setHighlight], [options, setOptions]
|
|
|
13719
13785
|
return /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
|
|
13720
13786
|
context_default3.Provider,
|
|
13721
13787
|
{
|
|
13722
|
-
value: {
|
|
13788
|
+
value: {
|
|
13789
|
+
...base,
|
|
13790
|
+
props,
|
|
13791
|
+
options,
|
|
13792
|
+
checked: [checked, setChecked],
|
|
13793
|
+
limits
|
|
13794
|
+
},
|
|
13723
13795
|
children
|
|
13724
13796
|
}
|
|
13725
13797
|
);
|
|
@@ -13748,12 +13820,12 @@ var SelectMultiple_default = useSelectMultiple;
|
|
|
13748
13820
|
|
|
13749
13821
|
// src/components/Input/components/Select/index.tsx
|
|
13750
13822
|
var import_jsx_runtime327 = require("react/jsx-runtime");
|
|
13751
|
-
var Select =
|
|
13823
|
+
var Select = import_react36.default.forwardRef(
|
|
13752
13824
|
(props, ref) => {
|
|
13753
13825
|
const { position, loader: loader2, initialLoader } = props;
|
|
13754
|
-
const [options, setOptions] = (0,
|
|
13755
|
-
const [highlight, setHighlight] = (0,
|
|
13756
|
-
const [open, setOpen] = (0,
|
|
13826
|
+
const [options, setOptions] = (0, import_react36.useState)(initialLoader || []);
|
|
13827
|
+
const [highlight, setHighlight] = (0, import_react36.useState)(-1);
|
|
13828
|
+
const [open, setOpen] = (0, import_react36.useState)(false);
|
|
13757
13829
|
const hook = props.type === "select-multiple" ? SelectMultiple_default : Select_default;
|
|
13758
13830
|
const {
|
|
13759
13831
|
parsedOptions,
|
|
@@ -13769,11 +13841,11 @@ var Select = import_react35.default.forwardRef(
|
|
|
13769
13841
|
[options, setOptions],
|
|
13770
13842
|
setOpen
|
|
13771
13843
|
);
|
|
13772
|
-
const [_loading, setLoading] = (0,
|
|
13773
|
-
const [search, _setSearch] = (0,
|
|
13774
|
-
const [searchInput, setSearchInput] = (0,
|
|
13775
|
-
const [page, setPage] = (0,
|
|
13776
|
-
const [lastPage, setLastPage] = (0,
|
|
13844
|
+
const [_loading, setLoading] = (0, import_react36.useState)(true);
|
|
13845
|
+
const [search, _setSearch] = (0, import_react36.useState)("");
|
|
13846
|
+
const [searchInput, setSearchInput] = (0, import_react36.useState)("");
|
|
13847
|
+
const [page, setPage] = (0, import_react36.useState)(1);
|
|
13848
|
+
const [lastPage, setLastPage] = (0, import_react36.useState)(false);
|
|
13777
13849
|
const loading = props.loading || _loading;
|
|
13778
13850
|
const setSearch = (value) => {
|
|
13779
13851
|
_setSearch(value);
|
|
@@ -13794,7 +13866,9 @@ var Select = import_react35.default.forwardRef(
|
|
|
13794
13866
|
"selectAll",
|
|
13795
13867
|
"setValue",
|
|
13796
13868
|
"type",
|
|
13797
|
-
"value"
|
|
13869
|
+
"value",
|
|
13870
|
+
"minSelected",
|
|
13871
|
+
"maxSelected"
|
|
13798
13872
|
]);
|
|
13799
13873
|
const _onScrollEnd = props.onScrollEnd || (() => {
|
|
13800
13874
|
});
|
|
@@ -13804,7 +13878,7 @@ var Select = import_react35.default.forwardRef(
|
|
|
13804
13878
|
}
|
|
13805
13879
|
_onScrollEnd(e);
|
|
13806
13880
|
};
|
|
13807
|
-
const onSubmit = (0,
|
|
13881
|
+
const onSubmit = (0, import_react36.useCallback)(async () => {
|
|
13808
13882
|
setLoading(true);
|
|
13809
13883
|
const optionsResult = await loader2(search, page);
|
|
13810
13884
|
if (optionsResult === null) return;
|
|
@@ -13820,22 +13894,22 @@ var Select = import_react35.default.forwardRef(
|
|
|
13820
13894
|
setLastPage(lastPage2);
|
|
13821
13895
|
setLoading(false);
|
|
13822
13896
|
}, [loader2, search, page, initialLoader]);
|
|
13823
|
-
(0,
|
|
13897
|
+
(0, import_react36.useEffect)(() => {
|
|
13824
13898
|
const timeoutId = setTimeout(() => onSubmit(), 250);
|
|
13825
13899
|
return () => clearTimeout(timeoutId);
|
|
13826
13900
|
}, [onSubmit]);
|
|
13827
|
-
(0,
|
|
13901
|
+
(0, import_react36.useEffect)(() => {
|
|
13828
13902
|
if (open) return;
|
|
13829
13903
|
setSearch("");
|
|
13830
13904
|
onReset();
|
|
13831
13905
|
}, [props.value, open]);
|
|
13832
|
-
(0,
|
|
13906
|
+
(0, import_react36.useEffect)(() => {
|
|
13833
13907
|
setSearchInput(search);
|
|
13834
13908
|
}, [search]);
|
|
13835
|
-
(0,
|
|
13909
|
+
(0, import_react36.useEffect)(() => {
|
|
13836
13910
|
if (page === 1) setHighlight(-1);
|
|
13837
13911
|
}, [page]);
|
|
13838
|
-
(0,
|
|
13912
|
+
(0, import_react36.useEffect)(() => {
|
|
13839
13913
|
const timeoutId = setTimeout(() => setSearch(searchInput), 1e3);
|
|
13840
13914
|
return () => clearTimeout(timeoutId);
|
|
13841
13915
|
}, [searchInput]);
|
|
@@ -13927,7 +14001,7 @@ Select.displayName = "Select";
|
|
|
13927
14001
|
var Select_default2 = Select;
|
|
13928
14002
|
|
|
13929
14003
|
// src/components/Input/components/Switch/index.tsx
|
|
13930
|
-
var
|
|
14004
|
+
var import_react37 = __toESM(require("react"));
|
|
13931
14005
|
|
|
13932
14006
|
// src/components/Input/components/Switch/styles.ts
|
|
13933
14007
|
var import_styled_components44 = __toESM(require("styled-components"));
|
|
@@ -14087,7 +14161,7 @@ var Switch = (props) => {
|
|
|
14087
14161
|
$keepSpace: true,
|
|
14088
14162
|
children: label[props.checked ? "after" : "before"]
|
|
14089
14163
|
}
|
|
14090
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime328.jsxs)(
|
|
14164
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime328.jsxs)(import_react37.default.Fragment, { children: [
|
|
14091
14165
|
label.before && /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(LabelContainer7, { children: label.before }),
|
|
14092
14166
|
/* @__PURE__ */ (0, import_jsx_runtime328.jsx)("input", { ...htmlProps, type: "checkbox" }),
|
|
14093
14167
|
/* @__PURE__ */ (0, import_jsx_runtime328.jsx)("span", {}),
|
|
@@ -14100,10 +14174,10 @@ var Switch = (props) => {
|
|
|
14100
14174
|
var Switch_default = Switch;
|
|
14101
14175
|
|
|
14102
14176
|
// src/components/Input/components/Tags/index.tsx
|
|
14103
|
-
var
|
|
14177
|
+
var import_react39 = __toESM(require("react"));
|
|
14104
14178
|
|
|
14105
14179
|
// src/components/Input/components/Tags/components/Input/index.tsx
|
|
14106
|
-
var
|
|
14180
|
+
var import_react38 = __toESM(require("react"));
|
|
14107
14181
|
|
|
14108
14182
|
// src/components/Input/components/Tags/components/Input/styles.ts
|
|
14109
14183
|
var import_styled_components45 = __toESM(require("styled-components"));
|
|
@@ -14140,7 +14214,7 @@ var Input4 = import_styled_components45.default.input`
|
|
|
14140
14214
|
|
|
14141
14215
|
// src/components/Input/components/Tags/components/Input/index.tsx
|
|
14142
14216
|
var import_jsx_runtime329 = require("react/jsx-runtime");
|
|
14143
|
-
var Input5 =
|
|
14217
|
+
var Input5 = import_react38.default.forwardRef(
|
|
14144
14218
|
(props, ref) => {
|
|
14145
14219
|
const [value, setValue] = props.value;
|
|
14146
14220
|
const _onKeyDown = props.onKeyDown || (() => {
|
|
@@ -14298,11 +14372,11 @@ var TagContainer = import_styled_components48.default.div`
|
|
|
14298
14372
|
|
|
14299
14373
|
// src/components/Input/components/Tags/index.tsx
|
|
14300
14374
|
var import_jsx_runtime332 = require("react/jsx-runtime");
|
|
14301
|
-
var Tags =
|
|
14375
|
+
var Tags = import_react39.default.forwardRef(
|
|
14302
14376
|
(props, ref) => {
|
|
14303
14377
|
var _a;
|
|
14304
14378
|
const { value, setValue } = props;
|
|
14305
|
-
const [inputValue, setInputValue] = ((_a = props.input) == null ? void 0 : _a.value) ? props.input.value : (0,
|
|
14379
|
+
const [inputValue, setInputValue] = ((_a = props.input) == null ? void 0 : _a.value) ? props.input.value : (0, import_react39.useState)("");
|
|
14306
14380
|
const paddingless = props.paddingless || false;
|
|
14307
14381
|
const borderless = props.borderless || false;
|
|
14308
14382
|
const maxTags = props.maxTags || Number.POSITIVE_INFINITY;
|
|
@@ -14370,7 +14444,7 @@ var Tags_default = Tags;
|
|
|
14370
14444
|
|
|
14371
14445
|
// src/components/Input/index.tsx
|
|
14372
14446
|
var import_jsx_runtime333 = require("react/jsx-runtime");
|
|
14373
|
-
var Component3 =
|
|
14447
|
+
var Component3 = import_react40.default.forwardRef(
|
|
14374
14448
|
(props, ref) => {
|
|
14375
14449
|
switch (props.type) {
|
|
14376
14450
|
case "date": {
|
|
@@ -14514,9 +14588,9 @@ var AppliedFiltersMenu = (props) => {
|
|
|
14514
14588
|
close,
|
|
14515
14589
|
appliedFilters: [appliedFilters, setAppliedFilters]
|
|
14516
14590
|
} = props;
|
|
14517
|
-
const [search, setSearch] = (0,
|
|
14518
|
-
const [searched, setSearched] = (0,
|
|
14519
|
-
(0,
|
|
14591
|
+
const [search, setSearch] = (0, import_react41.useState)("");
|
|
14592
|
+
const [searched, setSearched] = (0, import_react41.useState)("");
|
|
14593
|
+
(0, import_react41.useEffect)(() => {
|
|
14520
14594
|
setSearch("");
|
|
14521
14595
|
setSearched("");
|
|
14522
14596
|
}, [open]);
|
|
@@ -14696,13 +14770,13 @@ var Card = ({ borderType, size: size3, ...rest }) => {
|
|
|
14696
14770
|
var Card_default = Card;
|
|
14697
14771
|
|
|
14698
14772
|
// src/components/Filters/Filters/components/Menu/index.tsx
|
|
14699
|
-
var
|
|
14773
|
+
var import_react44 = require("react");
|
|
14700
14774
|
|
|
14701
14775
|
// src/components/Filters/Filters/components/Submenu/index.tsx
|
|
14702
|
-
var
|
|
14776
|
+
var import_react43 = __toESM(require("react"));
|
|
14703
14777
|
|
|
14704
14778
|
// src/components/Filters/Filters/components/Submenu/components/Header/index.tsx
|
|
14705
|
-
var
|
|
14779
|
+
var import_react42 = require("react");
|
|
14706
14780
|
|
|
14707
14781
|
// src/components/Filters/Filters/components/Submenu/components/Header/styles.ts
|
|
14708
14782
|
var import_styled_components51 = __toESM(require("styled-components"));
|
|
@@ -14736,12 +14810,12 @@ var Header5 = (props) => {
|
|
|
14736
14810
|
allowEmptySearch,
|
|
14737
14811
|
withSearch
|
|
14738
14812
|
} = props;
|
|
14739
|
-
const [search, setSearch] = (0,
|
|
14813
|
+
const [search, setSearch] = (0, import_react42.useState)("");
|
|
14740
14814
|
const setSearched = allowEmptySearch ? _setSearched : (value) => {
|
|
14741
14815
|
if (value === "") return;
|
|
14742
14816
|
_setSearched(value);
|
|
14743
14817
|
};
|
|
14744
|
-
(0,
|
|
14818
|
+
(0, import_react42.useEffect)(() => {
|
|
14745
14819
|
setSearch(searched);
|
|
14746
14820
|
}, [searched]);
|
|
14747
14821
|
const onSubmit = () => {
|
|
@@ -14853,13 +14927,13 @@ var getInstance = (props) => {
|
|
|
14853
14927
|
var Submenu = (props) => {
|
|
14854
14928
|
const { item, close, setAppliedFilters, closeParent } = props;
|
|
14855
14929
|
const { open, isDynamic, itemSpacing, label, allowEmptySearch, getOptions: getOptions3 } = getInstance(props);
|
|
14856
|
-
const [options, setOptions] = (0,
|
|
14857
|
-
const [page, setPage] = (0,
|
|
14858
|
-
const [search, _setSearch] = (0,
|
|
14859
|
-
const [lastPage, setLastPage] = (0,
|
|
14860
|
-
const [loading, setLoading] = (0,
|
|
14861
|
-
const [, setFirstRender] = (0,
|
|
14862
|
-
const onSearch = (0,
|
|
14930
|
+
const [options, setOptions] = (0, import_react43.useState)([]);
|
|
14931
|
+
const [page, setPage] = (0, import_react43.useState)(1);
|
|
14932
|
+
const [search, _setSearch] = (0, import_react43.useState)("");
|
|
14933
|
+
const [lastPage, setLastPage] = (0, import_react43.useState)(false);
|
|
14934
|
+
const [loading, setLoading] = (0, import_react43.useState)(false);
|
|
14935
|
+
const [, setFirstRender] = (0, import_react43.useState)(true);
|
|
14936
|
+
const onSearch = (0, import_react43.useCallback)(async () => {
|
|
14863
14937
|
const { options: newOptions, lastPage: lastPage2 } = await getOptions3(search, page);
|
|
14864
14938
|
setLastPage(lastPage2);
|
|
14865
14939
|
setOptions([...newOptions]);
|
|
@@ -14874,12 +14948,12 @@ var Submenu = (props) => {
|
|
|
14874
14948
|
onSearch();
|
|
14875
14949
|
}
|
|
14876
14950
|
};
|
|
14877
|
-
(0,
|
|
14951
|
+
(0, import_react43.useEffect)(() => {
|
|
14878
14952
|
setOptions([]);
|
|
14879
14953
|
setSearch("", false);
|
|
14880
14954
|
setFirstRender(true);
|
|
14881
14955
|
}, [item]);
|
|
14882
|
-
(0,
|
|
14956
|
+
(0, import_react43.useEffect)(() => {
|
|
14883
14957
|
setFirstRender((firstRender) => {
|
|
14884
14958
|
if (!item || isDynamic && firstRender) {
|
|
14885
14959
|
setLoading(false);
|
|
@@ -14960,9 +15034,9 @@ var Submenu = (props) => {
|
|
|
14960
15034
|
loading,
|
|
14961
15035
|
emptyContent: isDynamic && options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(EmptyMessage, { children: (() => {
|
|
14962
15036
|
if (search !== "") {
|
|
14963
|
-
return /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(
|
|
15037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(import_react43.default.Fragment, { children: "Nenhum resultado foi encontrado" });
|
|
14964
15038
|
}
|
|
14965
|
-
return /* @__PURE__ */ (0, import_jsx_runtime338.jsxs)(
|
|
15039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime338.jsxs)(import_react43.default.Fragment, { children: [
|
|
14966
15040
|
"Utilize a busca para pesquisar por ",
|
|
14967
15041
|
/* @__PURE__ */ (0, import_jsx_runtime338.jsx)("br", {}),
|
|
14968
15042
|
label.text
|
|
@@ -14983,7 +15057,7 @@ var Submenu_default = Submenu;
|
|
|
14983
15057
|
var import_jsx_runtime339 = require("react/jsx-runtime");
|
|
14984
15058
|
var FiltersMenu = (props) => {
|
|
14985
15059
|
const { open, close } = props;
|
|
14986
|
-
const [active, setActive] = (0,
|
|
15060
|
+
const [active, setActive] = (0, import_react44.useState)(-1);
|
|
14987
15061
|
const items = props.items.map((item) => {
|
|
14988
15062
|
return {
|
|
14989
15063
|
label: typeof item.label === "string" ? item.label : item.label.element,
|
|
@@ -14997,7 +15071,7 @@ var FiltersMenu = (props) => {
|
|
|
14997
15071
|
};
|
|
14998
15072
|
});
|
|
14999
15073
|
const selected = active >= 0 && active < props.items.length ? props.items[active] : void 0;
|
|
15000
|
-
(0,
|
|
15074
|
+
(0, import_react44.useEffect)(() => {
|
|
15001
15075
|
if (open) return;
|
|
15002
15076
|
setActive(-1);
|
|
15003
15077
|
}, [open]);
|
|
@@ -15073,14 +15147,14 @@ var Filters = Object.assign(
|
|
|
15073
15147
|
var Filters_default = Filters;
|
|
15074
15148
|
|
|
15075
15149
|
// src/components/Grid/components/Col/index.tsx
|
|
15076
|
-
var
|
|
15150
|
+
var import_react46 = __toESM(require("react"));
|
|
15077
15151
|
|
|
15078
15152
|
// src/components/Grid/components/Row/context.ts
|
|
15079
|
-
var
|
|
15080
|
-
var Provider5 =
|
|
15153
|
+
var import_react45 = __toESM(require("react"));
|
|
15154
|
+
var Provider5 = import_react45.default.createContext({
|
|
15081
15155
|
cols: {}
|
|
15082
15156
|
});
|
|
15083
|
-
var useContext4 = () =>
|
|
15157
|
+
var useContext4 = () => import_react45.default.useContext(Provider5);
|
|
15084
15158
|
var context_default4 = Provider5;
|
|
15085
15159
|
|
|
15086
15160
|
// src/components/Grid/components/Col/styles.ts
|
|
@@ -15253,7 +15327,7 @@ var Col = import_styled_components53.default.div`
|
|
|
15253
15327
|
|
|
15254
15328
|
// src/components/Grid/components/Col/index.tsx
|
|
15255
15329
|
var import_jsx_runtime341 = require("react/jsx-runtime");
|
|
15256
|
-
var Col2 =
|
|
15330
|
+
var Col2 = import_react46.default.forwardRef((props, ref) => {
|
|
15257
15331
|
const context = useContext4();
|
|
15258
15332
|
const colProps = { ...context.cols, ...props };
|
|
15259
15333
|
const htmlProps = filterObject(colProps, [
|
|
@@ -15290,15 +15364,15 @@ Col2.displayName = "Col";
|
|
|
15290
15364
|
var Col_default = Col2;
|
|
15291
15365
|
|
|
15292
15366
|
// src/components/Grid/components/Grid/index.tsx
|
|
15293
|
-
var
|
|
15367
|
+
var import_react48 = __toESM(require("react"));
|
|
15294
15368
|
|
|
15295
15369
|
// src/components/Grid/components/Grid/context.ts
|
|
15296
|
-
var
|
|
15297
|
-
var Provider6 =
|
|
15370
|
+
var import_react47 = __toESM(require("react"));
|
|
15371
|
+
var Provider6 = import_react47.default.createContext({
|
|
15298
15372
|
rows: {},
|
|
15299
15373
|
cols: {}
|
|
15300
15374
|
});
|
|
15301
|
-
var useContext5 = () =>
|
|
15375
|
+
var useContext5 = () => import_react47.default.useContext(Provider6);
|
|
15302
15376
|
var context_default5 = Provider6;
|
|
15303
15377
|
|
|
15304
15378
|
// src/components/Grid/components/Grid/styles.ts
|
|
@@ -15331,7 +15405,7 @@ var Grid = import_styled_components54.default.div`
|
|
|
15331
15405
|
|
|
15332
15406
|
// src/components/Grid/components/Grid/index.tsx
|
|
15333
15407
|
var import_jsx_runtime342 = require("react/jsx-runtime");
|
|
15334
|
-
var Grid2 =
|
|
15408
|
+
var Grid2 = import_react48.default.forwardRef((props, ref) => {
|
|
15335
15409
|
const cols = props.cols || {};
|
|
15336
15410
|
const rows = props.rows || {};
|
|
15337
15411
|
const gridProps = filterObject(props, [
|
|
@@ -15354,7 +15428,7 @@ Grid2.displayName = "Grid";
|
|
|
15354
15428
|
var Grid_default2 = Grid2;
|
|
15355
15429
|
|
|
15356
15430
|
// src/components/Grid/components/Row/index.tsx
|
|
15357
|
-
var
|
|
15431
|
+
var import_react49 = __toESM(require("react"));
|
|
15358
15432
|
|
|
15359
15433
|
// src/components/Grid/components/Row/styles.ts
|
|
15360
15434
|
var import_styled_components55 = __toESM(require("styled-components"));
|
|
@@ -15481,7 +15555,7 @@ var Row = import_styled_components55.default.div`
|
|
|
15481
15555
|
|
|
15482
15556
|
// src/components/Grid/components/Row/index.tsx
|
|
15483
15557
|
var import_jsx_runtime343 = require("react/jsx-runtime");
|
|
15484
|
-
var Row2 =
|
|
15558
|
+
var Row2 = import_react49.default.forwardRef((props, ref) => {
|
|
15485
15559
|
const context = useContext5();
|
|
15486
15560
|
const cols = { ...context.cols, ...props.cols || {} };
|
|
15487
15561
|
const rowProps = { ...props, ...context.rows };
|
|
@@ -15525,15 +15599,15 @@ var Grid3 = Object.assign(Grid_default2, {
|
|
|
15525
15599
|
var Grid_default3 = Grid3;
|
|
15526
15600
|
|
|
15527
15601
|
// src/components/Modal/component.tsx
|
|
15528
|
-
var
|
|
15602
|
+
var import_react51 = require("react");
|
|
15529
15603
|
|
|
15530
15604
|
// src/addons/Portal/index.ts
|
|
15531
|
-
var
|
|
15605
|
+
var import_react50 = require("react");
|
|
15532
15606
|
var import_react_dom = require("react-dom");
|
|
15533
15607
|
var Portal = (props) => {
|
|
15534
15608
|
const { id, opened, children } = props;
|
|
15535
15609
|
const portalRoot = document.createElement("div");
|
|
15536
|
-
(0,
|
|
15610
|
+
(0, import_react50.useEffect)(() => {
|
|
15537
15611
|
if (opened) {
|
|
15538
15612
|
portalRoot.id = id + "-root";
|
|
15539
15613
|
document.body.appendChild(portalRoot);
|
|
@@ -15670,7 +15744,7 @@ var Modal = (props) => {
|
|
|
15670
15744
|
setOpen(false);
|
|
15671
15745
|
}
|
|
15672
15746
|
};
|
|
15673
|
-
(0,
|
|
15747
|
+
(0, import_react51.useEffect)(() => {
|
|
15674
15748
|
const onEscDown = (event) => {
|
|
15675
15749
|
if (closeOnEsc && event.key === "Escape") {
|
|
15676
15750
|
event.preventDefault();
|
|
@@ -15872,7 +15946,7 @@ var Modal2 = Object.assign(component_default, {
|
|
|
15872
15946
|
var Modal_default = Modal2;
|
|
15873
15947
|
|
|
15874
15948
|
// src/components/Placeholder/components/Template1/index.tsx
|
|
15875
|
-
var
|
|
15949
|
+
var import_react52 = __toESM(require("react"));
|
|
15876
15950
|
|
|
15877
15951
|
// src/components/Placeholder/components/Template1/styles.ts
|
|
15878
15952
|
var import_styled_components60 = __toESM(require("styled-components"));
|
|
@@ -15932,7 +16006,7 @@ var MainLine = (0, import_styled_components60.default)(HeaderLine)`
|
|
|
15932
16006
|
// src/components/Placeholder/components/Template1/index.tsx
|
|
15933
16007
|
var import_jsx_runtime348 = require("react/jsx-runtime");
|
|
15934
16008
|
var Template1 = (props) => {
|
|
15935
|
-
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(
|
|
16009
|
+
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(import_react52.default.Fragment, {});
|
|
15936
16010
|
return /* @__PURE__ */ (0, import_jsx_runtime348.jsxs)(Container15, { children: [
|
|
15937
16011
|
/* @__PURE__ */ (0, import_jsx_runtime348.jsxs)(Header7, { children: [
|
|
15938
16012
|
/* @__PURE__ */ (0, import_jsx_runtime348.jsx)(HeaderImage, {}),
|
|
@@ -15953,7 +16027,7 @@ var Template1 = (props) => {
|
|
|
15953
16027
|
var Template1_default = Template1;
|
|
15954
16028
|
|
|
15955
16029
|
// src/components/Placeholder/components/Template2/index.tsx
|
|
15956
|
-
var
|
|
16030
|
+
var import_react53 = __toESM(require("react"));
|
|
15957
16031
|
|
|
15958
16032
|
// src/components/Placeholder/components/Template2/styles.ts
|
|
15959
16033
|
var import_styled_components62 = __toESM(require("styled-components"));
|
|
@@ -16023,7 +16097,7 @@ var HeaderLine3 = (0, import_styled_components62.default)(HeaderLine2)``;
|
|
|
16023
16097
|
// src/components/Placeholder/components/Template2/index.tsx
|
|
16024
16098
|
var import_jsx_runtime349 = require("react/jsx-runtime");
|
|
16025
16099
|
var Template2 = (props) => {
|
|
16026
|
-
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(
|
|
16100
|
+
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(import_react53.default.Fragment, {});
|
|
16027
16101
|
return /* @__PURE__ */ (0, import_jsx_runtime349.jsxs)(Template2Container, { children: [
|
|
16028
16102
|
/* @__PURE__ */ (0, import_jsx_runtime349.jsxs)(Header8, { children: [
|
|
16029
16103
|
/* @__PURE__ */ (0, import_jsx_runtime349.jsx)(HeaderImage2, {}),
|
|
@@ -16041,7 +16115,7 @@ var Template2 = (props) => {
|
|
|
16041
16115
|
var Template2_default = Template2;
|
|
16042
16116
|
|
|
16043
16117
|
// src/components/Placeholder/components/Template3/index.tsx
|
|
16044
|
-
var
|
|
16118
|
+
var import_react54 = __toESM(require("react"));
|
|
16045
16119
|
|
|
16046
16120
|
// src/components/Placeholder/components/Template3/styles.ts
|
|
16047
16121
|
var import_styled_components63 = __toESM(require("styled-components"));
|
|
@@ -16060,7 +16134,7 @@ var Template3Line = (0, import_styled_components63.default)(HeaderLine2)`
|
|
|
16060
16134
|
// src/components/Placeholder/components/Template3/index.tsx
|
|
16061
16135
|
var import_jsx_runtime350 = require("react/jsx-runtime");
|
|
16062
16136
|
var Template3 = (props) => {
|
|
16063
|
-
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
|
|
16137
|
+
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(import_react54.default.Fragment, {});
|
|
16064
16138
|
return /* @__PURE__ */ (0, import_jsx_runtime350.jsxs)(Template3Container, { children: [
|
|
16065
16139
|
/* @__PURE__ */ (0, import_jsx_runtime350.jsx)(Template3Line, { $size: "large", $height: "7px", $color: "#DADADA" }),
|
|
16066
16140
|
/* @__PURE__ */ (0, import_jsx_runtime350.jsx)(Template3Line, { $size: "small", $height: "7px", $color: "#DADADA" }),
|
|
@@ -16072,7 +16146,7 @@ var Template3 = (props) => {
|
|
|
16072
16146
|
var Template3_default = Template3;
|
|
16073
16147
|
|
|
16074
16148
|
// src/components/Placeholder/components/Template4/index.tsx
|
|
16075
|
-
var
|
|
16149
|
+
var import_react55 = __toESM(require("react"));
|
|
16076
16150
|
|
|
16077
16151
|
// src/components/Placeholder/components/Template4/styles.ts
|
|
16078
16152
|
var import_styled_components64 = __toESM(require("styled-components"));
|
|
@@ -16120,7 +16194,7 @@ var CustomLine = (0, import_styled_components64.default)(HeaderLine4)`
|
|
|
16120
16194
|
// src/components/Placeholder/components/Template4/index.tsx
|
|
16121
16195
|
var import_jsx_runtime351 = require("react/jsx-runtime");
|
|
16122
16196
|
var Template4 = (props) => {
|
|
16123
|
-
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(
|
|
16197
|
+
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(import_react55.default.Fragment, {});
|
|
16124
16198
|
return /* @__PURE__ */ (0, import_jsx_runtime351.jsxs)(Template4Container, { children: [
|
|
16125
16199
|
/* @__PURE__ */ (0, import_jsx_runtime351.jsx)(
|
|
16126
16200
|
CustomLine,
|
|
@@ -16199,7 +16273,7 @@ var Template4 = (props) => {
|
|
|
16199
16273
|
var Template4_default = Template4;
|
|
16200
16274
|
|
|
16201
16275
|
// src/components/Placeholder/components/Template5/index.tsx
|
|
16202
|
-
var
|
|
16276
|
+
var import_react56 = __toESM(require("react"));
|
|
16203
16277
|
|
|
16204
16278
|
// src/components/Placeholder/components/Template5/styles.ts
|
|
16205
16279
|
var import_styled_components65 = __toESM(require("styled-components"));
|
|
@@ -16258,7 +16332,7 @@ var MainContent3 = import_styled_components65.default.div`
|
|
|
16258
16332
|
// src/components/Placeholder/components/Template5/index.tsx
|
|
16259
16333
|
var import_jsx_runtime352 = require("react/jsx-runtime");
|
|
16260
16334
|
var Template5 = (props) => {
|
|
16261
|
-
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(
|
|
16335
|
+
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(import_react56.default.Fragment, {});
|
|
16262
16336
|
return /* @__PURE__ */ (0, import_jsx_runtime352.jsxs)(Container19, { children: [
|
|
16263
16337
|
/* @__PURE__ */ (0, import_jsx_runtime352.jsx)(Circle, {}),
|
|
16264
16338
|
/* @__PURE__ */ (0, import_jsx_runtime352.jsxs)(MainContent3, { children: [
|
|
@@ -16304,7 +16378,7 @@ var Template5 = (props) => {
|
|
|
16304
16378
|
var Template5_default = Template5;
|
|
16305
16379
|
|
|
16306
16380
|
// src/components/Placeholder/components/Template6/index.tsx
|
|
16307
|
-
var
|
|
16381
|
+
var import_react57 = __toESM(require("react"));
|
|
16308
16382
|
|
|
16309
16383
|
// src/components/Placeholder/components/Template6/styles.ts
|
|
16310
16384
|
var import_styled_components66 = __toESM(require("styled-components"));
|
|
@@ -16362,7 +16436,7 @@ var CustomLine3 = (0, import_styled_components66.default)(HeaderLine6)`
|
|
|
16362
16436
|
// src/components/Placeholder/components/Template6/index.tsx
|
|
16363
16437
|
var import_jsx_runtime353 = require("react/jsx-runtime");
|
|
16364
16438
|
var Template6 = (props) => {
|
|
16365
|
-
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
|
|
16439
|
+
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(import_react57.default.Fragment, {});
|
|
16366
16440
|
return /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(Container20, { children: /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)(Header9, { children: [
|
|
16367
16441
|
/* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
|
|
16368
16442
|
CustomLine3,
|
|
@@ -16396,7 +16470,7 @@ var Template6 = (props) => {
|
|
|
16396
16470
|
var Template6_default = Template6;
|
|
16397
16471
|
|
|
16398
16472
|
// src/components/Placeholder/components/Template7/index.tsx
|
|
16399
|
-
var
|
|
16473
|
+
var import_react58 = __toESM(require("react"));
|
|
16400
16474
|
|
|
16401
16475
|
// src/components/Placeholder/components/Template7/styles.ts
|
|
16402
16476
|
var import_styled_components67 = __toESM(require("styled-components"));
|
|
@@ -16464,7 +16538,7 @@ var Circle2 = import_styled_components67.default.div`
|
|
|
16464
16538
|
// src/components/Placeholder/components/Template7/index.tsx
|
|
16465
16539
|
var import_jsx_runtime354 = require("react/jsx-runtime");
|
|
16466
16540
|
var Template7 = (props) => {
|
|
16467
|
-
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(
|
|
16541
|
+
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(import_react58.default.Fragment, {});
|
|
16468
16542
|
return /* @__PURE__ */ (0, import_jsx_runtime354.jsxs)(Container21, { children: [
|
|
16469
16543
|
/* @__PURE__ */ (0, import_jsx_runtime354.jsx)(Header10, { children: /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(
|
|
16470
16544
|
CustomLine4,
|
|
@@ -16487,7 +16561,7 @@ var Template7 = (props) => {
|
|
|
16487
16561
|
var Template7_default = Template7;
|
|
16488
16562
|
|
|
16489
16563
|
// src/components/Placeholder/components/Template8/index.tsx
|
|
16490
|
-
var
|
|
16564
|
+
var import_react59 = __toESM(require("react"));
|
|
16491
16565
|
|
|
16492
16566
|
// src/components/Placeholder/components/Template8/styles.ts
|
|
16493
16567
|
var import_styled_components68 = __toESM(require("styled-components"));
|
|
@@ -16548,7 +16622,7 @@ var Main4 = import_styled_components68.default.div`
|
|
|
16548
16622
|
// src/components/Placeholder/components/Template8/index.tsx
|
|
16549
16623
|
var import_jsx_runtime355 = require("react/jsx-runtime");
|
|
16550
16624
|
var Template8 = (props) => {
|
|
16551
|
-
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
|
|
16625
|
+
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(import_react59.default.Fragment, {});
|
|
16552
16626
|
return /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)(Container22, { children: [
|
|
16553
16627
|
/* @__PURE__ */ (0, import_jsx_runtime355.jsx)(Header11, { children: /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
|
|
16554
16628
|
CustomLine5,
|
|
@@ -16584,7 +16658,7 @@ var Template8 = (props) => {
|
|
|
16584
16658
|
var Template8_default = Template8;
|
|
16585
16659
|
|
|
16586
16660
|
// src/components/Placeholder/components/Template9/index.tsx
|
|
16587
|
-
var
|
|
16661
|
+
var import_react60 = __toESM(require("react"));
|
|
16588
16662
|
|
|
16589
16663
|
// src/components/Placeholder/components/Template9/styles.ts
|
|
16590
16664
|
var import_styled_components69 = __toESM(require("styled-components"));
|
|
@@ -16652,7 +16726,7 @@ var Circle3 = import_styled_components69.default.div`
|
|
|
16652
16726
|
// src/components/Placeholder/components/Template9/index.tsx
|
|
16653
16727
|
var import_jsx_runtime356 = require("react/jsx-runtime");
|
|
16654
16728
|
var Template82 = (props) => {
|
|
16655
|
-
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
|
|
16729
|
+
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(import_react60.default.Fragment, {});
|
|
16656
16730
|
return /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(Container23, { children: [
|
|
16657
16731
|
/* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(Header12, { children: [
|
|
16658
16732
|
/* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
|
|
@@ -16680,7 +16754,7 @@ var Template82 = (props) => {
|
|
|
16680
16754
|
var Template9_default = Template82;
|
|
16681
16755
|
|
|
16682
16756
|
// src/components/Placeholder/components/Template10/index.tsx
|
|
16683
|
-
var
|
|
16757
|
+
var import_react61 = __toESM(require("react"));
|
|
16684
16758
|
|
|
16685
16759
|
// src/components/Placeholder/components/Template10/styles.ts
|
|
16686
16760
|
var import_styled_components70 = __toESM(require("styled-components"));
|
|
@@ -16752,7 +16826,7 @@ var Circle4 = import_styled_components70.default.div`
|
|
|
16752
16826
|
// src/components/Placeholder/components/Template10/index.tsx
|
|
16753
16827
|
var import_jsx_runtime357 = require("react/jsx-runtime");
|
|
16754
16828
|
var Template10 = (props) => {
|
|
16755
|
-
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(
|
|
16829
|
+
if (!props.loading) return /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(import_react61.default.Fragment, {});
|
|
16756
16830
|
return /* @__PURE__ */ (0, import_jsx_runtime357.jsxs)(Container24, { children: [
|
|
16757
16831
|
/* @__PURE__ */ (0, import_jsx_runtime357.jsxs)(Header13, { children: [
|
|
16758
16832
|
/* @__PURE__ */ (0, import_jsx_runtime357.jsx)(
|
|
@@ -16966,13 +17040,13 @@ var ProgressBar = ({ type, value, ...props }) => {
|
|
|
16966
17040
|
var ProgressBar_default = ProgressBar;
|
|
16967
17041
|
|
|
16968
17042
|
// src/components/Tabs/index.tsx
|
|
16969
|
-
var
|
|
17043
|
+
var import_react67 = __toESM(require("react"));
|
|
16970
17044
|
|
|
16971
17045
|
// src/components/Tabs/components/ScrollButtons/index.tsx
|
|
16972
|
-
var
|
|
17046
|
+
var import_react63 = __toESM(require("react"));
|
|
16973
17047
|
|
|
16974
17048
|
// src/components/Tabs/components/ScrollButton/index.tsx
|
|
16975
|
-
var
|
|
17049
|
+
var import_react62 = require("react");
|
|
16976
17050
|
|
|
16977
17051
|
// src/components/Tabs/components/ScrollButton/styled.ts
|
|
16978
17052
|
var import_styled_components72 = __toESM(require("styled-components"));
|
|
@@ -17003,7 +17077,7 @@ var import_jsx_runtime360 = require("react/jsx-runtime");
|
|
|
17003
17077
|
var ScrollButton = (props) => {
|
|
17004
17078
|
const { mode, visible, scrollRef } = props;
|
|
17005
17079
|
const icon = `chevron_${mode}`;
|
|
17006
|
-
const onClick = (0,
|
|
17080
|
+
const onClick = (0, import_react62.useCallback)(() => {
|
|
17007
17081
|
if (!scrollRef) return;
|
|
17008
17082
|
scrollRef.scrollBy({
|
|
17009
17083
|
left: mode === "left" ? -(scrollRef.scrollWidth + 1) : scrollRef.scrollWidth,
|
|
@@ -17047,10 +17121,10 @@ var Container27 = import_styled_components73.default.div`
|
|
|
17047
17121
|
var import_jsx_runtime361 = require("react/jsx-runtime");
|
|
17048
17122
|
var ScrollButtons = (props) => {
|
|
17049
17123
|
const { activeTabIndex, tabsLength } = props;
|
|
17050
|
-
const [ref, setRef] = (0,
|
|
17051
|
-
const [showLeftArrow, setShowLeftArrow] = (0,
|
|
17052
|
-
const [showRightArrow, setShowRightArrow] = (0,
|
|
17053
|
-
const checkScrollPosition = (0,
|
|
17124
|
+
const [ref, setRef] = (0, import_react63.useState)(null);
|
|
17125
|
+
const [showLeftArrow, setShowLeftArrow] = (0, import_react63.useState)(false);
|
|
17126
|
+
const [showRightArrow, setShowRightArrow] = (0, import_react63.useState)(false);
|
|
17127
|
+
const checkScrollPosition = (0, import_react63.useCallback)(() => {
|
|
17054
17128
|
if (!ref) return;
|
|
17055
17129
|
if (ref.scrollWidth > ref.offsetWidth) {
|
|
17056
17130
|
const { scrollLeft, scrollWidth, clientWidth } = ref;
|
|
@@ -17061,12 +17135,12 @@ var ScrollButtons = (props) => {
|
|
|
17061
17135
|
setShowRightArrow(false);
|
|
17062
17136
|
}
|
|
17063
17137
|
}, [ref]);
|
|
17064
|
-
(0,
|
|
17138
|
+
(0, import_react63.useEffect)(() => {
|
|
17065
17139
|
checkScrollPosition();
|
|
17066
17140
|
window.addEventListener("resize", checkScrollPosition);
|
|
17067
17141
|
return () => window.removeEventListener("resize", checkScrollPosition);
|
|
17068
17142
|
}, [checkScrollPosition, tabsLength]);
|
|
17069
|
-
(0,
|
|
17143
|
+
(0, import_react63.useEffect)(() => {
|
|
17070
17144
|
if (!ref) return;
|
|
17071
17145
|
if (ref.scrollWidth <= ref.offsetWidth) return;
|
|
17072
17146
|
const element = ref.children[activeTabIndex];
|
|
@@ -17076,7 +17150,7 @@ var ScrollButtons = (props) => {
|
|
|
17076
17150
|
inline: "nearest"
|
|
17077
17151
|
});
|
|
17078
17152
|
}, [activeTabIndex, ref]);
|
|
17079
|
-
return /* @__PURE__ */ (0, import_jsx_runtime361.jsxs)(
|
|
17153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime361.jsxs)(import_react63.default.Fragment, { children: [
|
|
17080
17154
|
/* @__PURE__ */ (0, import_jsx_runtime361.jsx)(ScrollButton_default, { scrollRef: ref, mode: "left", visible: showLeftArrow }),
|
|
17081
17155
|
/* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
|
|
17082
17156
|
Container27,
|
|
@@ -17099,7 +17173,7 @@ var ScrollButtons = (props) => {
|
|
|
17099
17173
|
var ScrollButtons_default = ScrollButtons;
|
|
17100
17174
|
|
|
17101
17175
|
// src/components/Tabs/components/TabItem/index.tsx
|
|
17102
|
-
var
|
|
17176
|
+
var import_react66 = __toESM(require("react"));
|
|
17103
17177
|
|
|
17104
17178
|
// src/components/Tabs/functions.ts
|
|
17105
17179
|
var sortTabs = (tabs, sorted = []) => {
|
|
@@ -17147,7 +17221,7 @@ var buildComponent = (component, provider) => {
|
|
|
17147
17221
|
};
|
|
17148
17222
|
|
|
17149
17223
|
// src/components/Tabs/components/TabItem/components/Close/index.tsx
|
|
17150
|
-
var
|
|
17224
|
+
var import_react64 = require("react");
|
|
17151
17225
|
|
|
17152
17226
|
// src/components/Tabs/components/TabItem/components/Close/styles.ts
|
|
17153
17227
|
var import_styled_components74 = __toESM(require("styled-components"));
|
|
@@ -17185,7 +17259,7 @@ var Close2 = (props) => {
|
|
|
17185
17259
|
options: [options, setOptions]
|
|
17186
17260
|
} = props;
|
|
17187
17261
|
const onClose = props.onClose || (() => true);
|
|
17188
|
-
const onClickClose = (0,
|
|
17262
|
+
const onClickClose = (0, import_react64.useCallback)(
|
|
17189
17263
|
async (event) => {
|
|
17190
17264
|
if (options.length === 1) return;
|
|
17191
17265
|
const newOptions = [...options];
|
|
@@ -17214,7 +17288,7 @@ var Close2 = (props) => {
|
|
|
17214
17288
|
var Close_default = Close2;
|
|
17215
17289
|
|
|
17216
17290
|
// src/components/Tabs/components/TabItem/components/LabelItem/index.tsx
|
|
17217
|
-
var
|
|
17291
|
+
var import_react65 = require("react");
|
|
17218
17292
|
|
|
17219
17293
|
// src/components/Tabs/components/TabItem/components/LabelItem/styled.ts
|
|
17220
17294
|
var import_styled_components75 = __toESM(require("styled-components"));
|
|
@@ -17270,7 +17344,7 @@ var StyledTab = import_styled_components75.default.div`
|
|
|
17270
17344
|
var import_jsx_runtime363 = require("react/jsx-runtime");
|
|
17271
17345
|
var LabelItem = (props) => {
|
|
17272
17346
|
const { children, onClick, primary, hasSiblings, internal } = props;
|
|
17273
|
-
const [ref, setRef] = (0,
|
|
17347
|
+
const [ref, setRef] = (0, import_react65.useState)(null);
|
|
17274
17348
|
return /* @__PURE__ */ (0, import_jsx_runtime363.jsx)(
|
|
17275
17349
|
StyledTab,
|
|
17276
17350
|
{
|
|
@@ -17326,7 +17400,7 @@ var Container28 = import_styled_components76.default.div`
|
|
|
17326
17400
|
|
|
17327
17401
|
// src/components/Tabs/components/TabItem/index.tsx
|
|
17328
17402
|
var import_jsx_runtime364 = require("react/jsx-runtime");
|
|
17329
|
-
var VoidClose = () => /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
|
|
17403
|
+
var VoidClose = () => /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(import_react66.default.Fragment, {});
|
|
17330
17404
|
var TabItem = (props) => {
|
|
17331
17405
|
const {
|
|
17332
17406
|
active: [active, setActive],
|
|
@@ -17336,7 +17410,7 @@ var TabItem = (props) => {
|
|
|
17336
17410
|
alwaysOpen
|
|
17337
17411
|
} = props;
|
|
17338
17412
|
const CloseComponent = alwaysOpen || tabs.length < 2 ? VoidClose : Close_default;
|
|
17339
|
-
return /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(
|
|
17413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(import_react66.default.Fragment, { children: sortedTabs.map(({ index, ...tab }) => {
|
|
17340
17414
|
const isActive = index === active;
|
|
17341
17415
|
const hasSiblings = hasChildren(tabs, tab.group);
|
|
17342
17416
|
const canClose = !props.internal && (!tab.primary || !hasSiblings);
|
|
@@ -17432,11 +17506,11 @@ var Tabs = import_styled_components77.default.div`
|
|
|
17432
17506
|
|
|
17433
17507
|
// src/components/Tabs/index.tsx
|
|
17434
17508
|
var import_jsx_runtime365 = require("react/jsx-runtime");
|
|
17435
|
-
var VoidProvider = (props) => /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
|
|
17509
|
+
var VoidProvider = (props) => /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(import_react67.default.Fragment, { children: props.children });
|
|
17436
17510
|
var Component4 = (props) => {
|
|
17437
17511
|
const components = props.components || {};
|
|
17438
|
-
const [options, setOptions] = typeof props.options[1] === "function" ? props.options : (0,
|
|
17439
|
-
const [active, setActive] = Array.isArray(props.active) ? props.active : (0,
|
|
17512
|
+
const [options, setOptions] = typeof props.options[1] === "function" ? props.options : (0, import_react67.useState)(props.options);
|
|
17513
|
+
const [active, setActive] = Array.isArray(props.active) ? props.active : (0, import_react67.useState)(props.active);
|
|
17440
17514
|
const sortedTabs = sortTabs(options.map((tab, index) => ({ ...tab, index })));
|
|
17441
17515
|
const activeTabIndex = sortedTabs.findIndex((tab) => tab.index === active);
|
|
17442
17516
|
const divProps = filterObject(props, [
|
|
@@ -17450,7 +17524,7 @@ var Component4 = (props) => {
|
|
|
17450
17524
|
"delimiter",
|
|
17451
17525
|
"spacing"
|
|
17452
17526
|
]);
|
|
17453
|
-
return /* @__PURE__ */ (0, import_jsx_runtime365.jsxs)(
|
|
17527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime365.jsxs)(import_react67.default.Fragment, { children: [
|
|
17454
17528
|
/* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
|
|
17455
17529
|
Tabs,
|
|
17456
17530
|
{
|
|
@@ -17483,7 +17557,7 @@ var Component4 = (props) => {
|
|
|
17483
17557
|
),
|
|
17484
17558
|
options.map((tab, index) => {
|
|
17485
17559
|
if (tab.component === void 0) {
|
|
17486
|
-
return /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(
|
|
17560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(import_react67.default.Fragment, {}, index);
|
|
17487
17561
|
}
|
|
17488
17562
|
const Component5 = components[tab.component];
|
|
17489
17563
|
const Provider7 = Component5.provider || VoidProvider;
|
|
@@ -17661,7 +17735,7 @@ var Toast = ({
|
|
|
17661
17735
|
var Toast_default = Toast;
|
|
17662
17736
|
|
|
17663
17737
|
// src/components/Zoom/index.tsx
|
|
17664
|
-
var
|
|
17738
|
+
var import_react68 = __toESM(require("react"));
|
|
17665
17739
|
|
|
17666
17740
|
// src/components/Zoom/styles.ts
|
|
17667
17741
|
var import_styled_components80 = __toESM(require("styled-components"));
|
|
@@ -17736,8 +17810,8 @@ var ModalContent = import_styled_components80.default.div`
|
|
|
17736
17810
|
var import_jsx_runtime368 = require("react/jsx-runtime");
|
|
17737
17811
|
var Zoom = (props) => {
|
|
17738
17812
|
const { src, width, height, ...imgProps } = props;
|
|
17739
|
-
const [modalOpened, setModalOpened] = (0,
|
|
17740
|
-
return /* @__PURE__ */ (0, import_jsx_runtime368.jsxs)(
|
|
17813
|
+
const [modalOpened, setModalOpened] = (0, import_react68.useState)(false);
|
|
17814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime368.jsxs)(import_react68.default.Fragment, { children: [
|
|
17741
17815
|
/* @__PURE__ */ (0, import_jsx_runtime368.jsxs)(
|
|
17742
17816
|
Container31,
|
|
17743
17817
|
{
|