@uniformdev/design-system 19.116.0 → 19.117.0
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/esm/index.js +269 -134
- package/dist/index.d.mts +108 -7
- package/dist/index.d.ts +108 -7
- package/dist/index.js +277 -142
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -20301,6 +20301,12 @@ var SearchAndFilterControlsWrapper = css92`
|
|
|
20301
20301
|
grid-template-columns: auto 1fr 1fr;
|
|
20302
20302
|
gap: var(--spacing-base);
|
|
20303
20303
|
`;
|
|
20304
|
+
var SearchAndFilterOutterControlWrapper = css92`
|
|
20305
|
+
align-items: stretch;
|
|
20306
|
+
display: grid;
|
|
20307
|
+
grid-template-columns: 1fr auto;
|
|
20308
|
+
gap: var(--spacing-sm);
|
|
20309
|
+
`;
|
|
20304
20310
|
var ConditionalFilterRow = css92`
|
|
20305
20311
|
display: grid;
|
|
20306
20312
|
grid-template-columns: 35px 1fr;
|
|
@@ -20478,6 +20484,7 @@ var FilterButton2 = ({ text = "Filters", filterCount, ...props }) => {
|
|
|
20478
20484
|
type: "button",
|
|
20479
20485
|
css: [FilterButton, filterCount ? FilterButtonWithOptions : void 0],
|
|
20480
20486
|
...props,
|
|
20487
|
+
"data-testid": "filters-button",
|
|
20481
20488
|
children: [
|
|
20482
20489
|
/* @__PURE__ */ jsx117(Icon, { icon: "filter-add", iconColor: "currentColor", size: "1rem" }),
|
|
20483
20490
|
text,
|
|
@@ -20487,6 +20494,10 @@ var FilterButton2 = ({ text = "Filters", filterCount, ...props }) => {
|
|
|
20487
20494
|
);
|
|
20488
20495
|
};
|
|
20489
20496
|
|
|
20497
|
+
// src/components/SearchAndFilter/FilterControls.tsx
|
|
20498
|
+
import { useEffect as useEffect18, useState as useState17 } from "react";
|
|
20499
|
+
import { useDebounce as useDebounce2 } from "react-use";
|
|
20500
|
+
|
|
20490
20501
|
// src/components/SearchAndFilter/hooks/useSearchAndFilter.tsx
|
|
20491
20502
|
import {
|
|
20492
20503
|
createContext as createContext6,
|
|
@@ -20515,18 +20526,27 @@ var SearchAndFilterContext = createContext6({
|
|
|
20515
20526
|
handleDeleteFilter: () => {
|
|
20516
20527
|
},
|
|
20517
20528
|
filterOptions: [],
|
|
20518
|
-
validFilterQuery: []
|
|
20529
|
+
validFilterQuery: [],
|
|
20530
|
+
totalResults: 0
|
|
20519
20531
|
});
|
|
20520
20532
|
var SearchAndFilterProvider = ({
|
|
20521
20533
|
filters,
|
|
20522
20534
|
filterOptions,
|
|
20535
|
+
onSearchChange,
|
|
20523
20536
|
onChange,
|
|
20537
|
+
totalResults,
|
|
20524
20538
|
children
|
|
20525
20539
|
}) => {
|
|
20526
20540
|
const [searchTerm, setSearchTerm] = useState16("");
|
|
20527
20541
|
const deferredSearchTerm = useDeferredValue2(searchTerm);
|
|
20528
20542
|
const [filterVisibility, setFilterVisibility] = useState16(false);
|
|
20529
|
-
const handleSearchTerm = useCallback10(
|
|
20543
|
+
const handleSearchTerm = useCallback10(
|
|
20544
|
+
(term) => {
|
|
20545
|
+
setSearchTerm(term);
|
|
20546
|
+
onSearchChange(term);
|
|
20547
|
+
},
|
|
20548
|
+
[setSearchTerm, onSearchChange]
|
|
20549
|
+
);
|
|
20530
20550
|
const handleToggleFilterVisibilty = useCallback10(
|
|
20531
20551
|
(visible) => setFilterVisibility(visible),
|
|
20532
20552
|
[setFilterVisibility]
|
|
@@ -20577,7 +20597,8 @@ var SearchAndFilterProvider = ({
|
|
|
20577
20597
|
handleResetFilters: () => handleResetFilters(),
|
|
20578
20598
|
handleDeleteFilter: (index) => handleDeleteFilter(index),
|
|
20579
20599
|
filterOptions,
|
|
20580
|
-
validFilterQuery
|
|
20600
|
+
validFilterQuery,
|
|
20601
|
+
totalResults
|
|
20581
20602
|
},
|
|
20582
20603
|
children: /* @__PURE__ */ jsx118(VerticalRhythm, { children })
|
|
20583
20604
|
}
|
|
@@ -20591,7 +20612,20 @@ var useSearchAndFilter = () => {
|
|
|
20591
20612
|
// src/components/SearchAndFilter/FilterControls.tsx
|
|
20592
20613
|
import { Fragment as Fragment19, jsx as jsx119, jsxs as jsxs80 } from "@emotion/react/jsx-runtime";
|
|
20593
20614
|
var FilterControls = ({ children }) => {
|
|
20594
|
-
const { setFilterVisibility, filterVisibility, setSearchTerm, validFilterQuery } = useSearchAndFilter();
|
|
20615
|
+
const { setFilterVisibility, filterVisibility, setSearchTerm, validFilterQuery, searchTerm } = useSearchAndFilter();
|
|
20616
|
+
const [localeSearchTerm, setLocaleSearchTerm] = useState17("");
|
|
20617
|
+
useDebounce2(
|
|
20618
|
+
() => {
|
|
20619
|
+
setSearchTerm(localeSearchTerm);
|
|
20620
|
+
},
|
|
20621
|
+
300,
|
|
20622
|
+
[localeSearchTerm, searchTerm]
|
|
20623
|
+
);
|
|
20624
|
+
useEffect18(() => {
|
|
20625
|
+
if (searchTerm === "") {
|
|
20626
|
+
setLocaleSearchTerm("");
|
|
20627
|
+
}
|
|
20628
|
+
}, [searchTerm]);
|
|
20595
20629
|
return /* @__PURE__ */ jsxs80(Fragment19, { children: [
|
|
20596
20630
|
/* @__PURE__ */ jsx119(
|
|
20597
20631
|
FilterButton2,
|
|
@@ -20607,9 +20641,9 @@ var FilterControls = ({ children }) => {
|
|
|
20607
20641
|
/* @__PURE__ */ jsx119(
|
|
20608
20642
|
InputKeywordSearch,
|
|
20609
20643
|
{
|
|
20610
|
-
type: "search",
|
|
20611
20644
|
placeholder: "Search...",
|
|
20612
|
-
onSearchTextChanged: (e) =>
|
|
20645
|
+
onSearchTextChanged: (e) => setLocaleSearchTerm(e),
|
|
20646
|
+
value: localeSearchTerm,
|
|
20613
20647
|
compact: true,
|
|
20614
20648
|
rounded: true
|
|
20615
20649
|
}
|
|
@@ -20618,9 +20652,12 @@ var FilterControls = ({ children }) => {
|
|
|
20618
20652
|
] });
|
|
20619
20653
|
};
|
|
20620
20654
|
|
|
20655
|
+
// src/components/SearchAndFilter/FilterItem.tsx
|
|
20656
|
+
import { useMemo as useMemo7 } from "react";
|
|
20657
|
+
|
|
20621
20658
|
// src/components/SearchAndFilter/FilterEditor.tsx
|
|
20622
|
-
import {
|
|
20623
|
-
import {
|
|
20659
|
+
import { useEffect as useEffect19, useState as useState18 } from "react";
|
|
20660
|
+
import { useDebounce as useDebounce3 } from "react-use";
|
|
20624
20661
|
|
|
20625
20662
|
// src/components/Validation/StatusBullet.styles.ts
|
|
20626
20663
|
import { css as css93 } from "@emotion/react";
|
|
@@ -20733,6 +20770,7 @@ import { Fragment as Fragment20, jsx as jsx121, jsxs as jsxs81 } from "@emotion/
|
|
|
20733
20770
|
var FilterMultiChoiceEditor = ({
|
|
20734
20771
|
value,
|
|
20735
20772
|
options,
|
|
20773
|
+
isDisabled,
|
|
20736
20774
|
...props
|
|
20737
20775
|
}) => {
|
|
20738
20776
|
return /* @__PURE__ */ jsx121(
|
|
@@ -20742,28 +20780,32 @@ var FilterMultiChoiceEditor = ({
|
|
|
20742
20780
|
options,
|
|
20743
20781
|
isMulti: true,
|
|
20744
20782
|
isClearable: true,
|
|
20783
|
+
isDisabled,
|
|
20745
20784
|
onChange: (e) => {
|
|
20746
20785
|
var _a;
|
|
20747
20786
|
return props.onChange((_a = e.map((item) => item.value)) != null ? _a : []);
|
|
20748
|
-
}
|
|
20787
|
+
},
|
|
20788
|
+
value
|
|
20749
20789
|
}
|
|
20750
20790
|
);
|
|
20751
20791
|
};
|
|
20752
20792
|
var FilterSingleChoiceEditor = ({
|
|
20753
20793
|
options,
|
|
20754
20794
|
value,
|
|
20755
|
-
|
|
20795
|
+
isDisabled,
|
|
20796
|
+
onChange
|
|
20756
20797
|
}) => {
|
|
20757
20798
|
return /* @__PURE__ */ jsx121(
|
|
20758
20799
|
InputComboBox,
|
|
20759
20800
|
{
|
|
20760
20801
|
options,
|
|
20761
20802
|
isClearable: true,
|
|
20762
|
-
...props,
|
|
20763
20803
|
onChange: (e) => {
|
|
20764
20804
|
var _a;
|
|
20765
|
-
return
|
|
20766
|
-
}
|
|
20805
|
+
return onChange((_a = e == null ? void 0 : e.value) != null ? _a : "");
|
|
20806
|
+
},
|
|
20807
|
+
isDisabled,
|
|
20808
|
+
value
|
|
20767
20809
|
}
|
|
20768
20810
|
);
|
|
20769
20811
|
};
|
|
@@ -20773,56 +20815,62 @@ var CustomOptions = ({ label, value }) => {
|
|
|
20773
20815
|
var StatusMultiEditor = ({
|
|
20774
20816
|
options,
|
|
20775
20817
|
value,
|
|
20776
|
-
|
|
20818
|
+
isDisabled,
|
|
20819
|
+
onChange
|
|
20777
20820
|
}) => {
|
|
20778
20821
|
return /* @__PURE__ */ jsx121(
|
|
20779
20822
|
InputComboBox,
|
|
20780
20823
|
{
|
|
20781
20824
|
options,
|
|
20782
20825
|
isMulti: true,
|
|
20783
|
-
...props,
|
|
20784
20826
|
onChange: (e) => {
|
|
20785
20827
|
var _a;
|
|
20786
|
-
return
|
|
20828
|
+
return onChange((_a = e.map((item) => item.value)) != null ? _a : []);
|
|
20787
20829
|
},
|
|
20788
|
-
formatOptionLabel: CustomOptions
|
|
20830
|
+
formatOptionLabel: CustomOptions,
|
|
20831
|
+
value,
|
|
20832
|
+
isDisabled
|
|
20789
20833
|
}
|
|
20790
20834
|
);
|
|
20791
20835
|
};
|
|
20792
20836
|
var StatusSingleEditor = ({
|
|
20793
20837
|
options,
|
|
20794
20838
|
value,
|
|
20795
|
-
|
|
20839
|
+
isDisabled,
|
|
20840
|
+
onChange
|
|
20796
20841
|
}) => {
|
|
20797
20842
|
return /* @__PURE__ */ jsx121(
|
|
20798
20843
|
InputComboBox,
|
|
20799
20844
|
{
|
|
20800
20845
|
options,
|
|
20801
|
-
...props,
|
|
20802
20846
|
onChange: (e) => {
|
|
20803
20847
|
var _a;
|
|
20804
|
-
return
|
|
20848
|
+
return onChange((_a = e == null ? void 0 : e.value) != null ? _a : "");
|
|
20805
20849
|
},
|
|
20806
|
-
formatOptionLabel: CustomOptions
|
|
20850
|
+
formatOptionLabel: CustomOptions,
|
|
20851
|
+
value,
|
|
20852
|
+
isDisabled
|
|
20807
20853
|
}
|
|
20808
20854
|
);
|
|
20809
20855
|
};
|
|
20810
|
-
var TextEditor = ({ onChange, ariaLabel }) => {
|
|
20856
|
+
var TextEditor = ({ onChange, ariaLabel, value }) => {
|
|
20857
|
+
useDebounce3(() => onChange, 500, [value]);
|
|
20811
20858
|
return /* @__PURE__ */ jsx121(
|
|
20812
20859
|
Input,
|
|
20813
20860
|
{
|
|
20814
20861
|
showLabel: false,
|
|
20815
|
-
|
|
20862
|
+
label: ariaLabel,
|
|
20816
20863
|
onChange: (e) => onChange(e.currentTarget.value),
|
|
20817
|
-
placeholder: "Enter phrase to search\u2026"
|
|
20864
|
+
placeholder: "Enter phrase to search\u2026",
|
|
20865
|
+
value
|
|
20818
20866
|
}
|
|
20819
20867
|
);
|
|
20820
20868
|
};
|
|
20821
|
-
var NumberRangeEditor = ({ onChange,
|
|
20822
|
-
const [minValue, setMinValue] =
|
|
20823
|
-
const [maxValue, setMaxValue] =
|
|
20824
|
-
const [error, setError] =
|
|
20825
|
-
|
|
20869
|
+
var NumberRangeEditor = ({ onChange, disabled: disabled2, ariaLabel, value }) => {
|
|
20870
|
+
const [minValue, setMinValue] = useState18("");
|
|
20871
|
+
const [maxValue, setMaxValue] = useState18("");
|
|
20872
|
+
const [error, setError] = useState18("");
|
|
20873
|
+
useEffect19(() => {
|
|
20826
20874
|
if (!maxValue && !minValue) {
|
|
20827
20875
|
return;
|
|
20828
20876
|
}
|
|
@@ -20845,50 +20893,66 @@ var NumberRangeEditor = ({ onChange, ...props }) => {
|
|
|
20845
20893
|
/* @__PURE__ */ jsx121(
|
|
20846
20894
|
Input,
|
|
20847
20895
|
{
|
|
20848
|
-
|
|
20896
|
+
label: `${ariaLabel}-min`,
|
|
20849
20897
|
type: "number",
|
|
20850
20898
|
showLabel: false,
|
|
20851
20899
|
min: 0,
|
|
20852
20900
|
placeholder: "Low",
|
|
20853
20901
|
onChange: (e) => setMinValue(e.currentTarget.value),
|
|
20854
|
-
"aria-invalid": !error ? false : true
|
|
20902
|
+
"aria-invalid": !error ? false : true,
|
|
20903
|
+
disabled: disabled2,
|
|
20904
|
+
value: value ? value[0] : ""
|
|
20855
20905
|
}
|
|
20856
20906
|
),
|
|
20857
20907
|
/* @__PURE__ */ jsx121(
|
|
20858
20908
|
Input,
|
|
20859
20909
|
{
|
|
20860
|
-
...props,
|
|
20861
20910
|
type: "number",
|
|
20911
|
+
label: `${ariaLabel}-max`,
|
|
20862
20912
|
showLabel: false,
|
|
20863
20913
|
min: 0,
|
|
20864
20914
|
placeholder: "High",
|
|
20865
20915
|
onChange: (e) => setMaxValue(e.currentTarget.value),
|
|
20866
|
-
"aria-invalid": !error ? false : true
|
|
20916
|
+
"aria-invalid": !error ? false : true,
|
|
20917
|
+
disabled: disabled2,
|
|
20918
|
+
value: value ? value[1] : ""
|
|
20867
20919
|
}
|
|
20868
20920
|
),
|
|
20869
20921
|
/* @__PURE__ */ jsx121(ErrorContainer, { errorMessage: error })
|
|
20870
20922
|
] });
|
|
20871
20923
|
};
|
|
20872
|
-
var NumberEditor = ({ ariaLabel, onChange }) => {
|
|
20924
|
+
var NumberEditor = ({ ariaLabel, onChange, disabled: disabled2, value }) => {
|
|
20873
20925
|
return /* @__PURE__ */ jsx121(
|
|
20874
20926
|
Input,
|
|
20875
20927
|
{
|
|
20876
|
-
|
|
20928
|
+
label: ariaLabel,
|
|
20877
20929
|
type: "number",
|
|
20878
20930
|
showLabel: false,
|
|
20879
20931
|
min: 0,
|
|
20880
|
-
onChange: (e) => onChange(e.currentTarget.value)
|
|
20932
|
+
onChange: (e) => onChange(e.currentTarget.value),
|
|
20933
|
+
disabled: disabled2,
|
|
20934
|
+
value
|
|
20881
20935
|
}
|
|
20882
20936
|
);
|
|
20883
20937
|
};
|
|
20884
|
-
var DateEditor = ({ onChange,
|
|
20885
|
-
return /* @__PURE__ */ jsx121(
|
|
20938
|
+
var DateEditor = ({ onChange, ariaLabel, disabled: disabled2, value }) => {
|
|
20939
|
+
return /* @__PURE__ */ jsx121(
|
|
20940
|
+
Input,
|
|
20941
|
+
{
|
|
20942
|
+
type: "date",
|
|
20943
|
+
label: ariaLabel,
|
|
20944
|
+
showLabel: false,
|
|
20945
|
+
onChange: (e) => onChange(e.currentTarget.value),
|
|
20946
|
+
disabled: disabled2,
|
|
20947
|
+
value
|
|
20948
|
+
}
|
|
20949
|
+
);
|
|
20886
20950
|
};
|
|
20887
|
-
var DateRangeEditor = ({ ariaLabel, onChange }) => {
|
|
20888
|
-
const [minDateValue, setMinDateValue] =
|
|
20889
|
-
const [maxDateValue, setMaxDateValue] =
|
|
20890
|
-
const [error, setError] =
|
|
20891
|
-
|
|
20951
|
+
var DateRangeEditor = ({ ariaLabel, onChange, disabled: disabled2, value }) => {
|
|
20952
|
+
const [minDateValue, setMinDateValue] = useState18(value ? value[0] : "");
|
|
20953
|
+
const [maxDateValue, setMaxDateValue] = useState18(value ? value[1] : "");
|
|
20954
|
+
const [error, setError] = useState18("");
|
|
20955
|
+
useEffect19(() => {
|
|
20892
20956
|
if (!minDateValue || !maxDateValue) {
|
|
20893
20957
|
return;
|
|
20894
20958
|
}
|
|
@@ -20923,23 +20987,25 @@ var DateRangeEditor = ({ ariaLabel, onChange }) => {
|
|
|
20923
20987
|
/* @__PURE__ */ jsx121(
|
|
20924
20988
|
Input,
|
|
20925
20989
|
{
|
|
20926
|
-
|
|
20990
|
+
label: `${ariaLabel}-min-date`,
|
|
20927
20991
|
type: "date",
|
|
20928
20992
|
showLabel: false,
|
|
20929
20993
|
value: minDateValue,
|
|
20930
20994
|
onChange: (e) => setMinDateValue(e.currentTarget.value),
|
|
20931
|
-
"aria-invalid": !error ? false : true
|
|
20995
|
+
"aria-invalid": !error ? false : true,
|
|
20996
|
+
disabled: disabled2
|
|
20932
20997
|
}
|
|
20933
20998
|
),
|
|
20934
20999
|
/* @__PURE__ */ jsx121(
|
|
20935
21000
|
Input,
|
|
20936
21001
|
{
|
|
20937
|
-
|
|
21002
|
+
label: `${ariaLabel}-max-date`,
|
|
20938
21003
|
type: "date",
|
|
20939
21004
|
showLabel: false,
|
|
20940
21005
|
value: maxDateValue,
|
|
20941
21006
|
onChange: (e) => setMaxDateValue(e.currentTarget.value),
|
|
20942
|
-
"aria-invalid": !error ? false : true
|
|
21007
|
+
"aria-invalid": !error ? false : true,
|
|
21008
|
+
disabled: disabled2
|
|
20943
21009
|
}
|
|
20944
21010
|
),
|
|
20945
21011
|
/* @__PURE__ */ jsx121(ErrorContainer, { errorMessage: error })
|
|
@@ -20953,7 +21019,7 @@ var FilterEditorRenderer = ({ editorType, ...props }) => {
|
|
|
20953
21019
|
if (editorType === "empty") {
|
|
20954
21020
|
return null;
|
|
20955
21021
|
}
|
|
20956
|
-
return /* @__PURE__ */ jsx121(Editor, { ...props });
|
|
21022
|
+
return /* @__PURE__ */ jsx121(Editor, { ...props, disabled: props.isDisabled });
|
|
20957
21023
|
};
|
|
20958
21024
|
var filterMapper = {
|
|
20959
21025
|
multiChoice: FilterMultiChoiceEditor,
|
|
@@ -20971,10 +21037,10 @@ var ErrorContainer = ({ errorMessage }) => {
|
|
|
20971
21037
|
return /* @__PURE__ */ jsx121(
|
|
20972
21038
|
"div",
|
|
20973
21039
|
{
|
|
20974
|
-
css:
|
|
20975
|
-
|
|
20976
|
-
order: 6
|
|
20977
|
-
|
|
21040
|
+
css: {
|
|
21041
|
+
gridColumn: "span 6",
|
|
21042
|
+
order: 6
|
|
21043
|
+
},
|
|
20978
21044
|
children: /* @__PURE__ */ jsx121(FieldMessage, { errorMessage })
|
|
20979
21045
|
}
|
|
20980
21046
|
);
|
|
@@ -20986,7 +21052,7 @@ var SearchAndFilterOptionsContainer2 = ({
|
|
|
20986
21052
|
buttonRow,
|
|
20987
21053
|
children
|
|
20988
21054
|
}) => {
|
|
20989
|
-
return /* @__PURE__ */ jsxs82("div", { css: SearchAndFilterOptionsContainer, children: [
|
|
21055
|
+
return /* @__PURE__ */ jsxs82("div", { css: SearchAndFilterOptionsContainer, "data-testid": "search-and-filter-options", children: [
|
|
20990
21056
|
/* @__PURE__ */ jsx122("div", { css: SearchAndFilterOptionsInnerContainer, children }),
|
|
20991
21057
|
buttonRow ? /* @__PURE__ */ jsx122(
|
|
20992
21058
|
HorizontalRhythm,
|
|
@@ -21069,11 +21135,35 @@ var FilterItem = ({
|
|
|
21069
21135
|
onValueChange
|
|
21070
21136
|
}) => {
|
|
21071
21137
|
var _a, _b;
|
|
21072
|
-
const { filters, handleDeleteFilter } = useSearchAndFilter();
|
|
21138
|
+
const { filters, handleDeleteFilter, filterOptions } = useSearchAndFilter();
|
|
21073
21139
|
const label = filters[index].field !== "" ? filters[index].field : "unknown filter field";
|
|
21074
21140
|
const operatorLabel = filters[index].operator !== "" ? `operator ${filters[index].operator}` : "unknown operator";
|
|
21075
21141
|
const metaDataLabel = filters[index].value !== "" ? `value ${filters[index].value}` : "unknown value";
|
|
21076
21142
|
const metaDataPossibleOptions = (_b = (_a = operatorOptions.find((op) => filters[index].operator === op.value)) == null ? void 0 : _a.editorType) != null ? _b : "singleChoice";
|
|
21143
|
+
const { selectedFieldValue, selectedOperatorValue, selectedMetaValue } = useMemo7(() => {
|
|
21144
|
+
var _a2, _b2;
|
|
21145
|
+
const currentSelectedFilter = filterOptions.find((item) => {
|
|
21146
|
+
var _a3;
|
|
21147
|
+
return (_a3 = item.options) == null ? void 0 : _a3.find((op) => op.value === filters[index].field);
|
|
21148
|
+
});
|
|
21149
|
+
const selectedFieldValue2 = (_b2 = (_a2 = currentSelectedFilter == null ? void 0 : currentSelectedFilter.options) == null ? void 0 : _a2.find((item) => {
|
|
21150
|
+
return filters[index].field === item.value;
|
|
21151
|
+
})) != null ? _b2 : [];
|
|
21152
|
+
const selectedOperatorValue2 = operatorOptions == null ? void 0 : operatorOptions.find((item) => {
|
|
21153
|
+
return filters[index].operator === item.value;
|
|
21154
|
+
});
|
|
21155
|
+
const selectedMetaValue2 = valueOptions.filter((item) => {
|
|
21156
|
+
if (Array.isArray(filters[index].value) && item.value) {
|
|
21157
|
+
return filters[index].value.includes(item.value);
|
|
21158
|
+
}
|
|
21159
|
+
return filters[index].value === item.value;
|
|
21160
|
+
});
|
|
21161
|
+
return {
|
|
21162
|
+
selectedFieldValue: selectedFieldValue2,
|
|
21163
|
+
selectedOperatorValue: selectedOperatorValue2 != null ? selectedOperatorValue2 : void 0,
|
|
21164
|
+
selectedMetaValue: selectedMetaValue2.length > 0 ? selectedMetaValue2 : filters[index].value
|
|
21165
|
+
};
|
|
21166
|
+
}, [filters, filterOptions, index, operatorOptions, valueOptions]);
|
|
21077
21167
|
return /* @__PURE__ */ jsxs83("div", { css: ConditionalFilterRow, children: [
|
|
21078
21168
|
/* @__PURE__ */ jsx123("span", { children: index === 0 ? "where" : "and" }),
|
|
21079
21169
|
/* @__PURE__ */ jsxs83("div", { css: ConditionalInputRow, children: [
|
|
@@ -21085,7 +21175,8 @@ var FilterItem = ({
|
|
|
21085
21175
|
onChange: (e) => {
|
|
21086
21176
|
var _a2;
|
|
21087
21177
|
onParamChange((_a2 = e == null ? void 0 : e.value) != null ? _a2 : "");
|
|
21088
|
-
}
|
|
21178
|
+
},
|
|
21179
|
+
value: selectedFieldValue
|
|
21089
21180
|
}
|
|
21090
21181
|
),
|
|
21091
21182
|
/* @__PURE__ */ jsx123(
|
|
@@ -21097,7 +21188,8 @@ var FilterItem = ({
|
|
|
21097
21188
|
var _a2;
|
|
21098
21189
|
return onOperatorChange((_a2 = e == null ? void 0 : e.value) != null ? _a2 : "");
|
|
21099
21190
|
},
|
|
21100
|
-
isDisabled: !filters[index].field
|
|
21191
|
+
isDisabled: !filters[index].field,
|
|
21192
|
+
value: selectedOperatorValue
|
|
21101
21193
|
}
|
|
21102
21194
|
),
|
|
21103
21195
|
/* @__PURE__ */ jsx123(
|
|
@@ -21106,7 +21198,9 @@ var FilterItem = ({
|
|
|
21106
21198
|
"aria-label": metaDataLabel,
|
|
21107
21199
|
editorType: metaDataPossibleOptions,
|
|
21108
21200
|
options: valueOptions,
|
|
21109
|
-
onChange: (e) => onValueChange(e != null ? e : "")
|
|
21201
|
+
onChange: (e) => onValueChange(e != null ? e : ""),
|
|
21202
|
+
isDisabled: !filters[index].operator,
|
|
21203
|
+
value: selectedMetaValue
|
|
21110
21204
|
}
|
|
21111
21205
|
),
|
|
21112
21206
|
/* @__PURE__ */ jsx123(
|
|
@@ -21166,29 +21260,69 @@ var FilterItems = () => {
|
|
|
21166
21260
|
}) });
|
|
21167
21261
|
};
|
|
21168
21262
|
|
|
21263
|
+
// src/components/SearchAndFilter/SearchAndFilterResultContainer.tsx
|
|
21264
|
+
import { Fragment as Fragment22, jsx as jsx124, jsxs as jsxs84 } from "@emotion/react/jsx-runtime";
|
|
21265
|
+
var SearchAndFilterResultContainer = ({
|
|
21266
|
+
clearButtonLabel = "clear"
|
|
21267
|
+
}) => {
|
|
21268
|
+
const { searchTerm, setSearchTerm, totalResults } = useSearchAndFilter();
|
|
21269
|
+
return searchTerm ? /* @__PURE__ */ jsxs84(Fragment22, { children: [
|
|
21270
|
+
/* @__PURE__ */ jsxs84(HorizontalRhythm, { children: [
|
|
21271
|
+
/* @__PURE__ */ jsxs84("span", { children: [
|
|
21272
|
+
totalResults,
|
|
21273
|
+
" results for ",
|
|
21274
|
+
/* @__PURE__ */ jsxs84("strong", { children: [
|
|
21275
|
+
'"',
|
|
21276
|
+
searchTerm,
|
|
21277
|
+
'"'
|
|
21278
|
+
] })
|
|
21279
|
+
] }),
|
|
21280
|
+
/* @__PURE__ */ jsx124(Button, { buttonType: "ghostDestructive", size: "zero", onClick: () => setSearchTerm(""), children: clearButtonLabel })
|
|
21281
|
+
] }),
|
|
21282
|
+
totalResults === 0 ? /* @__PURE__ */ jsx124(Callout, { title: "No search results found", type: "note", children: /* @__PURE__ */ jsx124(Button, { buttonType: "tertiaryOutline", size: "sm", onClick: () => setSearchTerm(""), children: "Clear search" }) }) : null
|
|
21283
|
+
] }) : null;
|
|
21284
|
+
};
|
|
21285
|
+
|
|
21169
21286
|
// src/components/SearchAndFilter/SearchAndFilter.tsx
|
|
21170
|
-
import { jsx as
|
|
21287
|
+
import { jsx as jsx125, jsxs as jsxs85 } from "@emotion/react/jsx-runtime";
|
|
21171
21288
|
var SearchAndFilter = ({
|
|
21172
21289
|
filters,
|
|
21173
21290
|
filterOptions,
|
|
21174
|
-
filterControls = /* @__PURE__ */
|
|
21175
|
-
|
|
21176
|
-
|
|
21291
|
+
filterControls = /* @__PURE__ */ jsx125(FilterControls, {}),
|
|
21292
|
+
viewSwitchControls,
|
|
21293
|
+
children = /* @__PURE__ */ jsx125(FilterItems, {}),
|
|
21294
|
+
onChange,
|
|
21295
|
+
onSearchChange,
|
|
21296
|
+
totalResults
|
|
21177
21297
|
}) => {
|
|
21178
|
-
return /* @__PURE__ */
|
|
21179
|
-
|
|
21180
|
-
|
|
21181
|
-
|
|
21298
|
+
return /* @__PURE__ */ jsx125(
|
|
21299
|
+
SearchAndFilterProvider,
|
|
21300
|
+
{
|
|
21301
|
+
filters,
|
|
21302
|
+
filterOptions,
|
|
21303
|
+
onChange,
|
|
21304
|
+
onSearchChange,
|
|
21305
|
+
totalResults,
|
|
21306
|
+
children: /* @__PURE__ */ jsxs85(VerticalRhythm, { css: SearchAndFilterContainer, "data-testid": "search-and-filter", children: [
|
|
21307
|
+
/* @__PURE__ */ jsxs85("div", { css: SearchAndFilterOutterControlWrapper, children: [
|
|
21308
|
+
/* @__PURE__ */ jsx125("div", { css: SearchAndFilterControlsWrapper, children: filterControls }),
|
|
21309
|
+
viewSwitchControls
|
|
21310
|
+
] }),
|
|
21311
|
+
children,
|
|
21312
|
+
/* @__PURE__ */ jsx125(SearchAndFilterResultContainer, {})
|
|
21313
|
+
] })
|
|
21314
|
+
}
|
|
21315
|
+
);
|
|
21182
21316
|
};
|
|
21183
21317
|
|
|
21184
21318
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
21185
|
-
import { css as
|
|
21319
|
+
import { css as css95 } from "@emotion/react";
|
|
21186
21320
|
import { CgCheck as CgCheck4 } from "@react-icons/all-files/cg/CgCheck";
|
|
21187
|
-
import { useCallback as useCallback11, useMemo as
|
|
21321
|
+
import { useCallback as useCallback11, useMemo as useMemo8 } from "react";
|
|
21188
21322
|
|
|
21189
21323
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
21190
|
-
import { css as
|
|
21191
|
-
var segmentedControlStyles =
|
|
21324
|
+
import { css as css94 } from "@emotion/react";
|
|
21325
|
+
var segmentedControlStyles = css94`
|
|
21192
21326
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
21193
21327
|
--segmented-control-border-width: 1px;
|
|
21194
21328
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -21207,14 +21341,14 @@ var segmentedControlStyles = css95`
|
|
|
21207
21341
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
21208
21342
|
font-size: var(--fs-xs);
|
|
21209
21343
|
`;
|
|
21210
|
-
var segmentedControlVerticalStyles =
|
|
21344
|
+
var segmentedControlVerticalStyles = css94`
|
|
21211
21345
|
flex-direction: column;
|
|
21212
21346
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
21213
21347
|
var(--segmented-control-rounded-value) 0 0;
|
|
21214
21348
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
21215
21349
|
var(--segmented-control-rounded-value);
|
|
21216
21350
|
`;
|
|
21217
|
-
var segmentedControlItemStyles =
|
|
21351
|
+
var segmentedControlItemStyles = css94`
|
|
21218
21352
|
&:first-of-type label {
|
|
21219
21353
|
border-radius: var(--segmented-control-first-border-radius);
|
|
21220
21354
|
}
|
|
@@ -21222,10 +21356,10 @@ var segmentedControlItemStyles = css95`
|
|
|
21222
21356
|
border-radius: var(--segmented-control-last-border-radius);
|
|
21223
21357
|
}
|
|
21224
21358
|
`;
|
|
21225
|
-
var segmentedControlInputStyles =
|
|
21359
|
+
var segmentedControlInputStyles = css94`
|
|
21226
21360
|
${accessibleHidden}
|
|
21227
21361
|
`;
|
|
21228
|
-
var segmentedControlLabelStyles = (checked, disabled2) =>
|
|
21362
|
+
var segmentedControlLabelStyles = (checked, disabled2) => css94`
|
|
21229
21363
|
position: relative;
|
|
21230
21364
|
display: flex;
|
|
21231
21365
|
align-items: center;
|
|
@@ -21292,23 +21426,23 @@ var segmentedControlLabelStyles = (checked, disabled2) => css95`
|
|
|
21292
21426
|
`}
|
|
21293
21427
|
}
|
|
21294
21428
|
`;
|
|
21295
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
21429
|
+
var segmentedControlLabelIconOnlyStyles = css94`
|
|
21296
21430
|
padding-inline: 0.5em;
|
|
21297
21431
|
`;
|
|
21298
|
-
var segmentedControlLabelCheckStyles =
|
|
21432
|
+
var segmentedControlLabelCheckStyles = css94`
|
|
21299
21433
|
opacity: 0.5;
|
|
21300
21434
|
`;
|
|
21301
|
-
var segmentedControlLabelContentStyles =
|
|
21435
|
+
var segmentedControlLabelContentStyles = css94`
|
|
21302
21436
|
display: flex;
|
|
21303
21437
|
align-items: center;
|
|
21304
21438
|
justify-content: center;
|
|
21305
21439
|
gap: var(--spacing-sm);
|
|
21306
21440
|
height: 100%;
|
|
21307
21441
|
`;
|
|
21308
|
-
var segmentedControlLabelTextStyles =
|
|
21442
|
+
var segmentedControlLabelTextStyles = css94``;
|
|
21309
21443
|
|
|
21310
21444
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
21311
|
-
import { jsx as
|
|
21445
|
+
import { jsx as jsx126, jsxs as jsxs86 } from "@emotion/react/jsx-runtime";
|
|
21312
21446
|
var SegmentedControl = ({
|
|
21313
21447
|
name,
|
|
21314
21448
|
options,
|
|
@@ -21328,18 +21462,18 @@ var SegmentedControl = ({
|
|
|
21328
21462
|
},
|
|
21329
21463
|
[options, onChange]
|
|
21330
21464
|
);
|
|
21331
|
-
const sizeStyles =
|
|
21465
|
+
const sizeStyles = useMemo8(() => {
|
|
21332
21466
|
const map = {
|
|
21333
|
-
sm:
|
|
21334
|
-
md:
|
|
21335
|
-
lg:
|
|
21467
|
+
sm: css95({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
21468
|
+
md: css95({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
21469
|
+
lg: css95({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" })
|
|
21336
21470
|
};
|
|
21337
21471
|
return map[size];
|
|
21338
21472
|
}, [size]);
|
|
21339
|
-
const isIconOnly =
|
|
21473
|
+
const isIconOnly = useMemo8(() => {
|
|
21340
21474
|
return options.every((option) => option && option.icon && !option.label);
|
|
21341
21475
|
}, [options]);
|
|
21342
|
-
return /* @__PURE__ */
|
|
21476
|
+
return /* @__PURE__ */ jsx126(
|
|
21343
21477
|
"div",
|
|
21344
21478
|
{
|
|
21345
21479
|
css: [segmentedControlStyles, orientation === "vertical" ? segmentedControlVerticalStyles : void 0],
|
|
@@ -21351,7 +21485,7 @@ var SegmentedControl = ({
|
|
|
21351
21485
|
}
|
|
21352
21486
|
const text = option.label ? option.label : option.icon ? null : String(option.value);
|
|
21353
21487
|
const isDisabled = disabled2 || option.disabled;
|
|
21354
|
-
return /* @__PURE__ */
|
|
21488
|
+
return /* @__PURE__ */ jsx126(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ jsx126("div", { css: segmentedControlItemStyles, "data-testid": "container-segmented-control", children: /* @__PURE__ */ jsxs86(
|
|
21355
21489
|
"label",
|
|
21356
21490
|
{
|
|
21357
21491
|
css: [
|
|
@@ -21360,7 +21494,7 @@ var SegmentedControl = ({
|
|
|
21360
21494
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
21361
21495
|
],
|
|
21362
21496
|
children: [
|
|
21363
|
-
/* @__PURE__ */
|
|
21497
|
+
/* @__PURE__ */ jsx126(
|
|
21364
21498
|
"input",
|
|
21365
21499
|
{
|
|
21366
21500
|
css: segmentedControlInputStyles,
|
|
@@ -21372,10 +21506,10 @@ var SegmentedControl = ({
|
|
|
21372
21506
|
disabled: isDisabled
|
|
21373
21507
|
}
|
|
21374
21508
|
),
|
|
21375
|
-
option.value !== value || noCheckmark ? null : /* @__PURE__ */
|
|
21376
|
-
/* @__PURE__ */
|
|
21377
|
-
!option.icon ? null : /* @__PURE__ */
|
|
21378
|
-
!text ? null : /* @__PURE__ */
|
|
21509
|
+
option.value !== value || noCheckmark ? null : /* @__PURE__ */ jsx126(CgCheck4, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
|
|
21510
|
+
/* @__PURE__ */ jsxs86("span", { css: segmentedControlLabelContentStyles, children: [
|
|
21511
|
+
!option.icon ? null : /* @__PURE__ */ jsx126(Icon, { icon: option.icon, size: "1.5em", iconColor: "currentColor" }),
|
|
21512
|
+
!text ? null : /* @__PURE__ */ jsx126("span", { css: segmentedControlLabelTextStyles, children: text })
|
|
21379
21513
|
] })
|
|
21380
21514
|
]
|
|
21381
21515
|
}
|
|
@@ -21386,18 +21520,18 @@ var SegmentedControl = ({
|
|
|
21386
21520
|
};
|
|
21387
21521
|
|
|
21388
21522
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
21389
|
-
import { css as
|
|
21523
|
+
import { css as css96, keyframes as keyframes5 } from "@emotion/react";
|
|
21390
21524
|
var lightFadingOut = keyframes5`
|
|
21391
21525
|
from { opacity: 0.1; }
|
|
21392
21526
|
to { opacity: 0.025; }
|
|
21393
21527
|
`;
|
|
21394
|
-
var skeletonStyles =
|
|
21528
|
+
var skeletonStyles = css96`
|
|
21395
21529
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
21396
21530
|
background-color: var(--gray-900);
|
|
21397
21531
|
`;
|
|
21398
21532
|
|
|
21399
21533
|
// src/components/Skeleton/Skeleton.tsx
|
|
21400
|
-
import { jsx as
|
|
21534
|
+
import { jsx as jsx127 } from "@emotion/react/jsx-runtime";
|
|
21401
21535
|
var Skeleton = ({
|
|
21402
21536
|
width = "100%",
|
|
21403
21537
|
height = "1.25rem",
|
|
@@ -21405,7 +21539,7 @@ var Skeleton = ({
|
|
|
21405
21539
|
circle = false,
|
|
21406
21540
|
children,
|
|
21407
21541
|
...otherProps
|
|
21408
|
-
}) => /* @__PURE__ */
|
|
21542
|
+
}) => /* @__PURE__ */ jsx127(
|
|
21409
21543
|
"div",
|
|
21410
21544
|
{
|
|
21411
21545
|
css: [
|
|
@@ -21428,8 +21562,8 @@ var Skeleton = ({
|
|
|
21428
21562
|
import * as React25 from "react";
|
|
21429
21563
|
|
|
21430
21564
|
// src/components/Switch/Switch.styles.ts
|
|
21431
|
-
import { css as
|
|
21432
|
-
var SwitchInputContainer =
|
|
21565
|
+
import { css as css97 } from "@emotion/react";
|
|
21566
|
+
var SwitchInputContainer = css97`
|
|
21433
21567
|
cursor: pointer;
|
|
21434
21568
|
display: inline-block;
|
|
21435
21569
|
position: relative;
|
|
@@ -21438,7 +21572,7 @@ var SwitchInputContainer = css98`
|
|
|
21438
21572
|
vertical-align: middle;
|
|
21439
21573
|
user-select: none;
|
|
21440
21574
|
`;
|
|
21441
|
-
var SwitchInput =
|
|
21575
|
+
var SwitchInput = css97`
|
|
21442
21576
|
appearance: none;
|
|
21443
21577
|
border-radius: var(--rounded-full);
|
|
21444
21578
|
background-color: var(--white);
|
|
@@ -21476,7 +21610,7 @@ var SwitchInput = css98`
|
|
|
21476
21610
|
cursor: not-allowed;
|
|
21477
21611
|
}
|
|
21478
21612
|
`;
|
|
21479
|
-
var SwitchInputDisabled =
|
|
21613
|
+
var SwitchInputDisabled = css97`
|
|
21480
21614
|
opacity: var(--opacity-50);
|
|
21481
21615
|
cursor: not-allowed;
|
|
21482
21616
|
|
|
@@ -21484,7 +21618,7 @@ var SwitchInputDisabled = css98`
|
|
|
21484
21618
|
cursor: not-allowed;
|
|
21485
21619
|
}
|
|
21486
21620
|
`;
|
|
21487
|
-
var SwitchInputLabel =
|
|
21621
|
+
var SwitchInputLabel = css97`
|
|
21488
21622
|
align-items: center;
|
|
21489
21623
|
color: var(--typography-base);
|
|
21490
21624
|
display: inline-flex;
|
|
@@ -21505,26 +21639,26 @@ var SwitchInputLabel = css98`
|
|
|
21505
21639
|
top: 0;
|
|
21506
21640
|
}
|
|
21507
21641
|
`;
|
|
21508
|
-
var SwitchText =
|
|
21642
|
+
var SwitchText = css97`
|
|
21509
21643
|
color: var(--gray-500);
|
|
21510
21644
|
font-size: var(--fs-sm);
|
|
21511
21645
|
padding-inline: var(--spacing-2xl) 0;
|
|
21512
21646
|
`;
|
|
21513
21647
|
|
|
21514
21648
|
// src/components/Switch/Switch.tsx
|
|
21515
|
-
import { Fragment as
|
|
21649
|
+
import { Fragment as Fragment23, jsx as jsx128, jsxs as jsxs87 } from "@emotion/react/jsx-runtime";
|
|
21516
21650
|
var Switch = React25.forwardRef(
|
|
21517
21651
|
({ label, infoText, toggleText, children, ...inputProps }, ref) => {
|
|
21518
21652
|
let additionalText = infoText;
|
|
21519
21653
|
if (infoText && toggleText) {
|
|
21520
21654
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
21521
21655
|
}
|
|
21522
|
-
return /* @__PURE__ */
|
|
21523
|
-
/* @__PURE__ */
|
|
21524
|
-
/* @__PURE__ */
|
|
21525
|
-
/* @__PURE__ */
|
|
21656
|
+
return /* @__PURE__ */ jsxs87(Fragment23, { children: [
|
|
21657
|
+
/* @__PURE__ */ jsxs87("label", { css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0], children: [
|
|
21658
|
+
/* @__PURE__ */ jsx128("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
|
|
21659
|
+
/* @__PURE__ */ jsx128("span", { css: SwitchInputLabel, children: label })
|
|
21526
21660
|
] }),
|
|
21527
|
-
additionalText ? /* @__PURE__ */
|
|
21661
|
+
additionalText ? /* @__PURE__ */ jsx128("p", { css: SwitchText, children: additionalText }) : null,
|
|
21528
21662
|
children
|
|
21529
21663
|
] });
|
|
21530
21664
|
}
|
|
@@ -21534,8 +21668,8 @@ var Switch = React25.forwardRef(
|
|
|
21534
21668
|
import * as React26 from "react";
|
|
21535
21669
|
|
|
21536
21670
|
// src/components/Table/Table.styles.ts
|
|
21537
|
-
import { css as
|
|
21538
|
-
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) =>
|
|
21671
|
+
import { css as css98 } from "@emotion/react";
|
|
21672
|
+
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => css98`
|
|
21539
21673
|
border-bottom: 1px solid var(--gray-400);
|
|
21540
21674
|
border-collapse: collapse;
|
|
21541
21675
|
min-width: 100%;
|
|
@@ -21546,55 +21680,55 @@ var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => css99
|
|
|
21546
21680
|
padding: ${cellPadding};
|
|
21547
21681
|
}
|
|
21548
21682
|
`;
|
|
21549
|
-
var tableHead =
|
|
21683
|
+
var tableHead = css98`
|
|
21550
21684
|
background: var(--gray-100);
|
|
21551
21685
|
color: var(--typography-base);
|
|
21552
21686
|
text-align: left;
|
|
21553
21687
|
`;
|
|
21554
|
-
var tableRow =
|
|
21688
|
+
var tableRow = css98`
|
|
21555
21689
|
border-bottom: 1px solid var(--gray-200);
|
|
21556
21690
|
`;
|
|
21557
|
-
var tableCellHead =
|
|
21691
|
+
var tableCellHead = css98`
|
|
21558
21692
|
font-size: var(--fs-sm);
|
|
21559
21693
|
text-transform: uppercase;
|
|
21560
21694
|
font-weight: var(--fw-bold);
|
|
21561
21695
|
`;
|
|
21562
21696
|
|
|
21563
21697
|
// src/components/Table/Table.tsx
|
|
21564
|
-
import { jsx as
|
|
21698
|
+
import { jsx as jsx129 } from "@emotion/react/jsx-runtime";
|
|
21565
21699
|
var Table = React26.forwardRef(
|
|
21566
21700
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
21567
|
-
return /* @__PURE__ */
|
|
21701
|
+
return /* @__PURE__ */ jsx129("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
21568
21702
|
}
|
|
21569
21703
|
);
|
|
21570
21704
|
var TableHead = React26.forwardRef(
|
|
21571
21705
|
({ children, ...otherProps }, ref) => {
|
|
21572
|
-
return /* @__PURE__ */
|
|
21706
|
+
return /* @__PURE__ */ jsx129("thead", { ref, css: tableHead, ...otherProps, children });
|
|
21573
21707
|
}
|
|
21574
21708
|
);
|
|
21575
21709
|
var TableBody = React26.forwardRef(
|
|
21576
21710
|
({ children, ...otherProps }, ref) => {
|
|
21577
|
-
return /* @__PURE__ */
|
|
21711
|
+
return /* @__PURE__ */ jsx129("tbody", { ref, ...otherProps, children });
|
|
21578
21712
|
}
|
|
21579
21713
|
);
|
|
21580
21714
|
var TableFoot = React26.forwardRef(
|
|
21581
21715
|
({ children, ...otherProps }, ref) => {
|
|
21582
|
-
return /* @__PURE__ */
|
|
21716
|
+
return /* @__PURE__ */ jsx129("tfoot", { ref, ...otherProps, children });
|
|
21583
21717
|
}
|
|
21584
21718
|
);
|
|
21585
21719
|
var TableRow = React26.forwardRef(
|
|
21586
21720
|
({ children, ...otherProps }, ref) => {
|
|
21587
|
-
return /* @__PURE__ */
|
|
21721
|
+
return /* @__PURE__ */ jsx129("tr", { ref, css: tableRow, ...otherProps, children });
|
|
21588
21722
|
}
|
|
21589
21723
|
);
|
|
21590
21724
|
var TableCellHead = React26.forwardRef(
|
|
21591
21725
|
({ children, ...otherProps }, ref) => {
|
|
21592
|
-
return /* @__PURE__ */
|
|
21726
|
+
return /* @__PURE__ */ jsx129("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
21593
21727
|
}
|
|
21594
21728
|
);
|
|
21595
21729
|
var TableCellData = React26.forwardRef(
|
|
21596
21730
|
({ children, ...otherProps }, ref) => {
|
|
21597
|
-
return /* @__PURE__ */
|
|
21731
|
+
return /* @__PURE__ */ jsx129("td", { ref, ...otherProps, children });
|
|
21598
21732
|
}
|
|
21599
21733
|
);
|
|
21600
21734
|
|
|
@@ -21606,11 +21740,11 @@ import {
|
|
|
21606
21740
|
TabProvider as AriakitTabProvider,
|
|
21607
21741
|
useTabStore as useAriakitTabStore
|
|
21608
21742
|
} from "@ariakit/react";
|
|
21609
|
-
import { useCallback as useCallback12, useEffect as
|
|
21743
|
+
import { useCallback as useCallback12, useEffect as useEffect20, useMemo as useMemo9 } from "react";
|
|
21610
21744
|
|
|
21611
21745
|
// src/components/Tabs/Tabs.styles.ts
|
|
21612
|
-
import { css as
|
|
21613
|
-
var tabButtonStyles =
|
|
21746
|
+
import { css as css99 } from "@emotion/react";
|
|
21747
|
+
var tabButtonStyles = css99`
|
|
21614
21748
|
align-items: center;
|
|
21615
21749
|
border: 0;
|
|
21616
21750
|
height: 2.5rem;
|
|
@@ -21627,14 +21761,14 @@ var tabButtonStyles = css100`
|
|
|
21627
21761
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
21628
21762
|
}
|
|
21629
21763
|
`;
|
|
21630
|
-
var tabButtonGroupStyles =
|
|
21764
|
+
var tabButtonGroupStyles = css99`
|
|
21631
21765
|
display: flex;
|
|
21632
21766
|
gap: var(--spacing-base);
|
|
21633
21767
|
border-bottom: 1px solid var(--gray-300);
|
|
21634
21768
|
`;
|
|
21635
21769
|
|
|
21636
21770
|
// src/components/Tabs/Tabs.tsx
|
|
21637
|
-
import { jsx as
|
|
21771
|
+
import { jsx as jsx130 } from "@emotion/react/jsx-runtime";
|
|
21638
21772
|
var useCurrentTab = () => {
|
|
21639
21773
|
const context = useAriakitTabStore();
|
|
21640
21774
|
if (!context) {
|
|
@@ -21650,7 +21784,7 @@ var Tabs = ({
|
|
|
21650
21784
|
manual,
|
|
21651
21785
|
...props
|
|
21652
21786
|
}) => {
|
|
21653
|
-
const selected =
|
|
21787
|
+
const selected = useMemo9(() => {
|
|
21654
21788
|
if (selectedId)
|
|
21655
21789
|
return selectedId;
|
|
21656
21790
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
@@ -21667,36 +21801,36 @@ var Tabs = ({
|
|
|
21667
21801
|
},
|
|
21668
21802
|
[onSelectedIdChange, useHashForState]
|
|
21669
21803
|
);
|
|
21670
|
-
|
|
21804
|
+
useEffect20(() => {
|
|
21671
21805
|
if (selected && selected !== tab.getState().activeId) {
|
|
21672
21806
|
tab.setSelectedId(selected);
|
|
21673
21807
|
}
|
|
21674
21808
|
}, [selected, tab]);
|
|
21675
|
-
return /* @__PURE__ */
|
|
21809
|
+
return /* @__PURE__ */ jsx130(AriakitTabProvider, { store: tab, setSelectedId: onTabSelect, children });
|
|
21676
21810
|
};
|
|
21677
21811
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
21678
|
-
return /* @__PURE__ */
|
|
21812
|
+
return /* @__PURE__ */ jsx130(AriakitTabList, { ...props, css: tabButtonGroupStyles, children });
|
|
21679
21813
|
};
|
|
21680
21814
|
var TabButton = ({
|
|
21681
21815
|
children,
|
|
21682
21816
|
id,
|
|
21683
21817
|
...props
|
|
21684
21818
|
}) => {
|
|
21685
|
-
return /* @__PURE__ */
|
|
21819
|
+
return /* @__PURE__ */ jsx130(AriakitTab, { type: "button", id, ...props, css: tabButtonStyles, children });
|
|
21686
21820
|
};
|
|
21687
21821
|
var TabContent = ({
|
|
21688
21822
|
children,
|
|
21689
21823
|
...props
|
|
21690
21824
|
}) => {
|
|
21691
|
-
return /* @__PURE__ */
|
|
21825
|
+
return /* @__PURE__ */ jsx130(AriakitTabPanel, { ...props, children });
|
|
21692
21826
|
};
|
|
21693
21827
|
|
|
21694
21828
|
// src/components/Toast/Toast.tsx
|
|
21695
21829
|
import { toast, ToastContainer as ToastifyContainer } from "react-toastify";
|
|
21696
21830
|
|
|
21697
21831
|
// src/components/Toast/Toast.styles.ts
|
|
21698
|
-
import { css as
|
|
21699
|
-
var toastContainerStyles =
|
|
21832
|
+
import { css as css100 } from "@emotion/react";
|
|
21833
|
+
var toastContainerStyles = css100`
|
|
21700
21834
|
${functionalColors}
|
|
21701
21835
|
|
|
21702
21836
|
--toastify-color-light: white;
|
|
@@ -21919,9 +22053,9 @@ var toastContainerStyles = css101`
|
|
|
21919
22053
|
`;
|
|
21920
22054
|
|
|
21921
22055
|
// src/components/Toast/Toast.tsx
|
|
21922
|
-
import { jsx as
|
|
22056
|
+
import { jsx as jsx131 } from "@emotion/react/jsx-runtime";
|
|
21923
22057
|
var ToastContainer = ({ limit = 4 }) => {
|
|
21924
|
-
return /* @__PURE__ */
|
|
22058
|
+
return /* @__PURE__ */ jsx131(
|
|
21925
22059
|
ToastifyContainer,
|
|
21926
22060
|
{
|
|
21927
22061
|
css: toastContainerStyles,
|
|
@@ -22065,6 +22199,7 @@ export {
|
|
|
22065
22199
|
SearchAndFilterContext,
|
|
22066
22200
|
SearchAndFilterOptionsContainer2 as SearchAndFilterOptionsContainer,
|
|
22067
22201
|
SearchAndFilterProvider,
|
|
22202
|
+
SearchAndFilterResultContainer,
|
|
22068
22203
|
SegmentedControl,
|
|
22069
22204
|
ShortcutContext,
|
|
22070
22205
|
ShortcutRevealer,
|