@uniformdev/design-system 19.116.2-alpha.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 +105 -58
- package/dist/index.d.mts +26 -4
- package/dist/index.d.ts +26 -4
- package/dist/index.js +160 -111
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1475,6 +1475,7 @@ __export(src_exports, {
|
|
|
1475
1475
|
SearchAndFilterContext: () => SearchAndFilterContext,
|
|
1476
1476
|
SearchAndFilterOptionsContainer: () => SearchAndFilterOptionsContainer2,
|
|
1477
1477
|
SearchAndFilterProvider: () => SearchAndFilterProvider,
|
|
1478
|
+
SearchAndFilterResultContainer: () => SearchAndFilterResultContainer,
|
|
1478
1479
|
SegmentedControl: () => SegmentedControl,
|
|
1479
1480
|
ShortcutContext: () => ShortcutContext,
|
|
1480
1481
|
ShortcutRevealer: () => ShortcutRevealer,
|
|
@@ -22323,6 +22324,8 @@ var FilterButton2 = ({ text = "Filters", filterCount, ...props }) => {
|
|
|
22323
22324
|
|
|
22324
22325
|
// src/components/SearchAndFilter/FilterControls.tsx
|
|
22325
22326
|
init_emotion_jsx_shim();
|
|
22327
|
+
var import_react140 = require("react");
|
|
22328
|
+
var import_react_use3 = require("react-use");
|
|
22326
22329
|
|
|
22327
22330
|
// src/components/SearchAndFilter/hooks/useSearchAndFilter.tsx
|
|
22328
22331
|
init_emotion_jsx_shim();
|
|
@@ -22345,13 +22348,15 @@ var SearchAndFilterContext = (0, import_react139.createContext)({
|
|
|
22345
22348
|
handleDeleteFilter: () => {
|
|
22346
22349
|
},
|
|
22347
22350
|
filterOptions: [],
|
|
22348
|
-
validFilterQuery: []
|
|
22351
|
+
validFilterQuery: [],
|
|
22352
|
+
totalResults: 0
|
|
22349
22353
|
});
|
|
22350
22354
|
var SearchAndFilterProvider = ({
|
|
22351
22355
|
filters,
|
|
22352
22356
|
filterOptions,
|
|
22353
22357
|
onSearchChange,
|
|
22354
22358
|
onChange,
|
|
22359
|
+
totalResults,
|
|
22355
22360
|
children
|
|
22356
22361
|
}) => {
|
|
22357
22362
|
const [searchTerm, setSearchTerm] = (0, import_react139.useState)("");
|
|
@@ -22414,7 +22419,8 @@ var SearchAndFilterProvider = ({
|
|
|
22414
22419
|
handleResetFilters: () => handleResetFilters(),
|
|
22415
22420
|
handleDeleteFilter: (index) => handleDeleteFilter(index),
|
|
22416
22421
|
filterOptions,
|
|
22417
|
-
validFilterQuery
|
|
22422
|
+
validFilterQuery,
|
|
22423
|
+
totalResults
|
|
22418
22424
|
},
|
|
22419
22425
|
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(VerticalRhythm, { children })
|
|
22420
22426
|
}
|
|
@@ -22429,6 +22435,19 @@ var useSearchAndFilter = () => {
|
|
|
22429
22435
|
var import_jsx_runtime119 = require("@emotion/react/jsx-runtime");
|
|
22430
22436
|
var FilterControls = ({ children }) => {
|
|
22431
22437
|
const { setFilterVisibility, filterVisibility, setSearchTerm, validFilterQuery, searchTerm } = useSearchAndFilter();
|
|
22438
|
+
const [localeSearchTerm, setLocaleSearchTerm] = (0, import_react140.useState)("");
|
|
22439
|
+
(0, import_react_use3.useDebounce)(
|
|
22440
|
+
() => {
|
|
22441
|
+
setSearchTerm(localeSearchTerm);
|
|
22442
|
+
},
|
|
22443
|
+
300,
|
|
22444
|
+
[localeSearchTerm, searchTerm]
|
|
22445
|
+
);
|
|
22446
|
+
(0, import_react140.useEffect)(() => {
|
|
22447
|
+
if (searchTerm === "") {
|
|
22448
|
+
setLocaleSearchTerm("");
|
|
22449
|
+
}
|
|
22450
|
+
}, [searchTerm]);
|
|
22432
22451
|
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(import_jsx_runtime119.Fragment, { children: [
|
|
22433
22452
|
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
22434
22453
|
FilterButton2,
|
|
@@ -22442,11 +22461,11 @@ var FilterControls = ({ children }) => {
|
|
|
22442
22461
|
}
|
|
22443
22462
|
),
|
|
22444
22463
|
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
22445
|
-
|
|
22464
|
+
InputKeywordSearch,
|
|
22446
22465
|
{
|
|
22447
22466
|
placeholder: "Search...",
|
|
22448
|
-
onSearchTextChanged: (e) =>
|
|
22449
|
-
|
|
22467
|
+
onSearchTextChanged: (e) => setLocaleSearchTerm(e),
|
|
22468
|
+
value: localeSearchTerm,
|
|
22450
22469
|
compact: true,
|
|
22451
22470
|
rounded: true
|
|
22452
22471
|
}
|
|
@@ -22457,20 +22476,20 @@ var FilterControls = ({ children }) => {
|
|
|
22457
22476
|
|
|
22458
22477
|
// src/components/SearchAndFilter/FilterItem.tsx
|
|
22459
22478
|
init_emotion_jsx_shim();
|
|
22460
|
-
var
|
|
22479
|
+
var import_react143 = require("react");
|
|
22461
22480
|
|
|
22462
22481
|
// src/components/SearchAndFilter/FilterEditor.tsx
|
|
22463
22482
|
init_emotion_jsx_shim();
|
|
22464
|
-
var
|
|
22465
|
-
var
|
|
22483
|
+
var import_react142 = require("react");
|
|
22484
|
+
var import_react_use4 = require("react-use");
|
|
22466
22485
|
|
|
22467
22486
|
// src/components/Validation/StatusBullet.tsx
|
|
22468
22487
|
init_emotion_jsx_shim();
|
|
22469
22488
|
|
|
22470
22489
|
// src/components/Validation/StatusBullet.styles.ts
|
|
22471
22490
|
init_emotion_jsx_shim();
|
|
22472
|
-
var
|
|
22473
|
-
var StatusBulletContainer =
|
|
22491
|
+
var import_react141 = require("@emotion/react");
|
|
22492
|
+
var StatusBulletContainer = import_react141.css`
|
|
22474
22493
|
align-items: center;
|
|
22475
22494
|
align-self: center;
|
|
22476
22495
|
color: var(--gray-500);
|
|
@@ -22487,33 +22506,33 @@ var StatusBulletContainer = import_react140.css`
|
|
|
22487
22506
|
display: block;
|
|
22488
22507
|
}
|
|
22489
22508
|
`;
|
|
22490
|
-
var StatusBulletBase =
|
|
22509
|
+
var StatusBulletBase = import_react141.css`
|
|
22491
22510
|
font-size: var(--fs-sm);
|
|
22492
22511
|
&:before {
|
|
22493
22512
|
width: var(--fs-xs);
|
|
22494
22513
|
height: var(--fs-xs);
|
|
22495
22514
|
}
|
|
22496
22515
|
`;
|
|
22497
|
-
var StatusBulletSmall =
|
|
22516
|
+
var StatusBulletSmall = import_react141.css`
|
|
22498
22517
|
font-size: var(--fs-xs);
|
|
22499
22518
|
&:before {
|
|
22500
22519
|
width: var(--fs-xxs);
|
|
22501
22520
|
height: var(--fs-xxs);
|
|
22502
22521
|
}
|
|
22503
22522
|
`;
|
|
22504
|
-
var StatusDraft =
|
|
22523
|
+
var StatusDraft = import_react141.css`
|
|
22505
22524
|
&:before {
|
|
22506
22525
|
background: var(--white);
|
|
22507
22526
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
22508
22527
|
}
|
|
22509
22528
|
`;
|
|
22510
|
-
var StatusModified =
|
|
22529
|
+
var StatusModified = import_react141.css`
|
|
22511
22530
|
&:before {
|
|
22512
22531
|
background: linear-gradient(to right, var(--white) 50%, var(--primary-action-default) 50% 100%);
|
|
22513
22532
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
22514
22533
|
}
|
|
22515
22534
|
`;
|
|
22516
|
-
var StatusError =
|
|
22535
|
+
var StatusError = import_react141.css`
|
|
22517
22536
|
color: var(--error);
|
|
22518
22537
|
&:before {
|
|
22519
22538
|
/* TODO: replace this with an svg icon */
|
|
@@ -22526,17 +22545,17 @@ var StatusError = import_react140.css`
|
|
|
22526
22545
|
);
|
|
22527
22546
|
}
|
|
22528
22547
|
`;
|
|
22529
|
-
var StatusPublished =
|
|
22548
|
+
var StatusPublished = import_react141.css`
|
|
22530
22549
|
&:before {
|
|
22531
22550
|
background: var(--primary-action-default);
|
|
22532
22551
|
}
|
|
22533
22552
|
`;
|
|
22534
|
-
var StatusOrphan =
|
|
22553
|
+
var StatusOrphan = import_react141.css`
|
|
22535
22554
|
&:before {
|
|
22536
22555
|
background: var(--brand-secondary-5);
|
|
22537
22556
|
}
|
|
22538
22557
|
`;
|
|
22539
|
-
var StatusUnknown =
|
|
22558
|
+
var StatusUnknown = import_react141.css`
|
|
22540
22559
|
&:before {
|
|
22541
22560
|
background: var(--gray-800);
|
|
22542
22561
|
}
|
|
@@ -22663,7 +22682,7 @@ var StatusSingleEditor = ({
|
|
|
22663
22682
|
);
|
|
22664
22683
|
};
|
|
22665
22684
|
var TextEditor = ({ onChange, ariaLabel, value }) => {
|
|
22666
|
-
(0,
|
|
22685
|
+
(0, import_react_use4.useDebounce)(() => onChange, 500, [value]);
|
|
22667
22686
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22668
22687
|
Input,
|
|
22669
22688
|
{
|
|
@@ -22676,10 +22695,10 @@ var TextEditor = ({ onChange, ariaLabel, value }) => {
|
|
|
22676
22695
|
);
|
|
22677
22696
|
};
|
|
22678
22697
|
var NumberRangeEditor = ({ onChange, disabled: disabled2, ariaLabel, value }) => {
|
|
22679
|
-
const [minValue, setMinValue] = (0,
|
|
22680
|
-
const [maxValue, setMaxValue] = (0,
|
|
22681
|
-
const [error, setError] = (0,
|
|
22682
|
-
(0,
|
|
22698
|
+
const [minValue, setMinValue] = (0, import_react142.useState)("");
|
|
22699
|
+
const [maxValue, setMaxValue] = (0, import_react142.useState)("");
|
|
22700
|
+
const [error, setError] = (0, import_react142.useState)("");
|
|
22701
|
+
(0, import_react142.useEffect)(() => {
|
|
22683
22702
|
if (!maxValue && !minValue) {
|
|
22684
22703
|
return;
|
|
22685
22704
|
}
|
|
@@ -22758,10 +22777,10 @@ var DateEditor = ({ onChange, ariaLabel, disabled: disabled2, value }) => {
|
|
|
22758
22777
|
);
|
|
22759
22778
|
};
|
|
22760
22779
|
var DateRangeEditor = ({ ariaLabel, onChange, disabled: disabled2, value }) => {
|
|
22761
|
-
const [minDateValue, setMinDateValue] = (0,
|
|
22762
|
-
const [maxDateValue, setMaxDateValue] = (0,
|
|
22763
|
-
const [error, setError] = (0,
|
|
22764
|
-
(0,
|
|
22780
|
+
const [minDateValue, setMinDateValue] = (0, import_react142.useState)(value ? value[0] : "");
|
|
22781
|
+
const [maxDateValue, setMaxDateValue] = (0, import_react142.useState)(value ? value[1] : "");
|
|
22782
|
+
const [error, setError] = (0, import_react142.useState)("");
|
|
22783
|
+
(0, import_react142.useEffect)(() => {
|
|
22765
22784
|
if (!minDateValue || !maxDateValue) {
|
|
22766
22785
|
return;
|
|
22767
22786
|
}
|
|
@@ -22950,7 +22969,7 @@ var FilterItem = ({
|
|
|
22950
22969
|
const operatorLabel = filters[index].operator !== "" ? `operator ${filters[index].operator}` : "unknown operator";
|
|
22951
22970
|
const metaDataLabel = filters[index].value !== "" ? `value ${filters[index].value}` : "unknown value";
|
|
22952
22971
|
const metaDataPossibleOptions = (_b = (_a = operatorOptions.find((op) => filters[index].operator === op.value)) == null ? void 0 : _a.editorType) != null ? _b : "singleChoice";
|
|
22953
|
-
const { selectedFieldValue, selectedOperatorValue, selectedMetaValue } = (0,
|
|
22972
|
+
const { selectedFieldValue, selectedOperatorValue, selectedMetaValue } = (0, import_react143.useMemo)(() => {
|
|
22954
22973
|
var _a2, _b2;
|
|
22955
22974
|
const currentSelectedFilter = filterOptions.find((item) => {
|
|
22956
22975
|
var _a3;
|
|
@@ -23072,29 +23091,58 @@ var FilterItems = () => {
|
|
|
23072
23091
|
|
|
23073
23092
|
// src/components/SearchAndFilter/SearchAndFilter.tsx
|
|
23074
23093
|
init_emotion_jsx_shim();
|
|
23094
|
+
|
|
23095
|
+
// src/components/SearchAndFilter/SearchAndFilterResultContainer.tsx
|
|
23096
|
+
init_emotion_jsx_shim();
|
|
23075
23097
|
var import_jsx_runtime124 = require("@emotion/react/jsx-runtime");
|
|
23098
|
+
var SearchAndFilterResultContainer = ({
|
|
23099
|
+
clearButtonLabel = "clear"
|
|
23100
|
+
}) => {
|
|
23101
|
+
const { searchTerm, setSearchTerm, totalResults } = useSearchAndFilter();
|
|
23102
|
+
return searchTerm ? /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_jsx_runtime124.Fragment, { children: [
|
|
23103
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(HorizontalRhythm, { children: [
|
|
23104
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("span", { children: [
|
|
23105
|
+
totalResults,
|
|
23106
|
+
" results for ",
|
|
23107
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("strong", { children: [
|
|
23108
|
+
'"',
|
|
23109
|
+
searchTerm,
|
|
23110
|
+
'"'
|
|
23111
|
+
] })
|
|
23112
|
+
] }),
|
|
23113
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Button, { buttonType: "ghostDestructive", size: "zero", onClick: () => setSearchTerm(""), children: clearButtonLabel })
|
|
23114
|
+
] }),
|
|
23115
|
+
totalResults === 0 ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Callout, { title: "No search results found", type: "note", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Button, { buttonType: "tertiaryOutline", size: "sm", onClick: () => setSearchTerm(""), children: "Clear search" }) }) : null
|
|
23116
|
+
] }) : null;
|
|
23117
|
+
};
|
|
23118
|
+
|
|
23119
|
+
// src/components/SearchAndFilter/SearchAndFilter.tsx
|
|
23120
|
+
var import_jsx_runtime125 = require("@emotion/react/jsx-runtime");
|
|
23076
23121
|
var SearchAndFilter = ({
|
|
23077
23122
|
filters,
|
|
23078
23123
|
filterOptions,
|
|
23079
|
-
filterControls = /* @__PURE__ */ (0,
|
|
23124
|
+
filterControls = /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(FilterControls, {}),
|
|
23080
23125
|
viewSwitchControls,
|
|
23081
|
-
children = /* @__PURE__ */ (0,
|
|
23126
|
+
children = /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(FilterItems, {}),
|
|
23082
23127
|
onChange,
|
|
23083
|
-
onSearchChange
|
|
23128
|
+
onSearchChange,
|
|
23129
|
+
totalResults
|
|
23084
23130
|
}) => {
|
|
23085
|
-
return /* @__PURE__ */ (0,
|
|
23131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
23086
23132
|
SearchAndFilterProvider,
|
|
23087
23133
|
{
|
|
23088
23134
|
filters,
|
|
23089
23135
|
filterOptions,
|
|
23090
23136
|
onChange,
|
|
23091
23137
|
onSearchChange,
|
|
23092
|
-
|
|
23093
|
-
|
|
23094
|
-
|
|
23138
|
+
totalResults,
|
|
23139
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(VerticalRhythm, { css: SearchAndFilterContainer, "data-testid": "search-and-filter", children: [
|
|
23140
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { css: SearchAndFilterOutterControlWrapper, children: [
|
|
23141
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { css: SearchAndFilterControlsWrapper, children: filterControls }),
|
|
23095
23142
|
viewSwitchControls
|
|
23096
23143
|
] }),
|
|
23097
|
-
children
|
|
23144
|
+
children,
|
|
23145
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(SearchAndFilterResultContainer, {})
|
|
23098
23146
|
] })
|
|
23099
23147
|
}
|
|
23100
23148
|
);
|
|
@@ -23102,14 +23150,14 @@ var SearchAndFilter = ({
|
|
|
23102
23150
|
|
|
23103
23151
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
23104
23152
|
init_emotion_jsx_shim();
|
|
23105
|
-
var
|
|
23153
|
+
var import_react145 = require("@emotion/react");
|
|
23106
23154
|
var import_CgCheck5 = require("@react-icons/all-files/cg/CgCheck");
|
|
23107
|
-
var
|
|
23155
|
+
var import_react146 = require("react");
|
|
23108
23156
|
|
|
23109
23157
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
23110
23158
|
init_emotion_jsx_shim();
|
|
23111
|
-
var
|
|
23112
|
-
var segmentedControlStyles =
|
|
23159
|
+
var import_react144 = require("@emotion/react");
|
|
23160
|
+
var segmentedControlStyles = import_react144.css`
|
|
23113
23161
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
23114
23162
|
--segmented-control-border-width: 1px;
|
|
23115
23163
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -23128,14 +23176,14 @@ var segmentedControlStyles = import_react143.css`
|
|
|
23128
23176
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
23129
23177
|
font-size: var(--fs-xs);
|
|
23130
23178
|
`;
|
|
23131
|
-
var segmentedControlVerticalStyles =
|
|
23179
|
+
var segmentedControlVerticalStyles = import_react144.css`
|
|
23132
23180
|
flex-direction: column;
|
|
23133
23181
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
23134
23182
|
var(--segmented-control-rounded-value) 0 0;
|
|
23135
23183
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
23136
23184
|
var(--segmented-control-rounded-value);
|
|
23137
23185
|
`;
|
|
23138
|
-
var segmentedControlItemStyles =
|
|
23186
|
+
var segmentedControlItemStyles = import_react144.css`
|
|
23139
23187
|
&:first-of-type label {
|
|
23140
23188
|
border-radius: var(--segmented-control-first-border-radius);
|
|
23141
23189
|
}
|
|
@@ -23143,10 +23191,10 @@ var segmentedControlItemStyles = import_react143.css`
|
|
|
23143
23191
|
border-radius: var(--segmented-control-last-border-radius);
|
|
23144
23192
|
}
|
|
23145
23193
|
`;
|
|
23146
|
-
var segmentedControlInputStyles =
|
|
23194
|
+
var segmentedControlInputStyles = import_react144.css`
|
|
23147
23195
|
${accessibleHidden}
|
|
23148
23196
|
`;
|
|
23149
|
-
var segmentedControlLabelStyles = (checked, disabled2) =>
|
|
23197
|
+
var segmentedControlLabelStyles = (checked, disabled2) => import_react144.css`
|
|
23150
23198
|
position: relative;
|
|
23151
23199
|
display: flex;
|
|
23152
23200
|
align-items: center;
|
|
@@ -23213,23 +23261,23 @@ var segmentedControlLabelStyles = (checked, disabled2) => import_react143.css`
|
|
|
23213
23261
|
`}
|
|
23214
23262
|
}
|
|
23215
23263
|
`;
|
|
23216
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
23264
|
+
var segmentedControlLabelIconOnlyStyles = import_react144.css`
|
|
23217
23265
|
padding-inline: 0.5em;
|
|
23218
23266
|
`;
|
|
23219
|
-
var segmentedControlLabelCheckStyles =
|
|
23267
|
+
var segmentedControlLabelCheckStyles = import_react144.css`
|
|
23220
23268
|
opacity: 0.5;
|
|
23221
23269
|
`;
|
|
23222
|
-
var segmentedControlLabelContentStyles =
|
|
23270
|
+
var segmentedControlLabelContentStyles = import_react144.css`
|
|
23223
23271
|
display: flex;
|
|
23224
23272
|
align-items: center;
|
|
23225
23273
|
justify-content: center;
|
|
23226
23274
|
gap: var(--spacing-sm);
|
|
23227
23275
|
height: 100%;
|
|
23228
23276
|
`;
|
|
23229
|
-
var segmentedControlLabelTextStyles =
|
|
23277
|
+
var segmentedControlLabelTextStyles = import_react144.css``;
|
|
23230
23278
|
|
|
23231
23279
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
23232
|
-
var
|
|
23280
|
+
var import_jsx_runtime126 = require("@emotion/react/jsx-runtime");
|
|
23233
23281
|
var SegmentedControl = ({
|
|
23234
23282
|
name,
|
|
23235
23283
|
options,
|
|
@@ -23241,7 +23289,7 @@ var SegmentedControl = ({
|
|
|
23241
23289
|
size = "md",
|
|
23242
23290
|
...props
|
|
23243
23291
|
}) => {
|
|
23244
|
-
const onOptionChange = (0,
|
|
23292
|
+
const onOptionChange = (0, import_react146.useCallback)(
|
|
23245
23293
|
(event) => {
|
|
23246
23294
|
if (event.target.checked) {
|
|
23247
23295
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -23249,18 +23297,18 @@ var SegmentedControl = ({
|
|
|
23249
23297
|
},
|
|
23250
23298
|
[options, onChange]
|
|
23251
23299
|
);
|
|
23252
|
-
const sizeStyles = (0,
|
|
23300
|
+
const sizeStyles = (0, import_react146.useMemo)(() => {
|
|
23253
23301
|
const map = {
|
|
23254
|
-
sm: (0,
|
|
23255
|
-
md: (0,
|
|
23256
|
-
lg: (0,
|
|
23302
|
+
sm: (0, import_react145.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
23303
|
+
md: (0, import_react145.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
23304
|
+
lg: (0, import_react145.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" })
|
|
23257
23305
|
};
|
|
23258
23306
|
return map[size];
|
|
23259
23307
|
}, [size]);
|
|
23260
|
-
const isIconOnly = (0,
|
|
23308
|
+
const isIconOnly = (0, import_react146.useMemo)(() => {
|
|
23261
23309
|
return options.every((option) => option && option.icon && !option.label);
|
|
23262
23310
|
}, [options]);
|
|
23263
|
-
return /* @__PURE__ */ (0,
|
|
23311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
23264
23312
|
"div",
|
|
23265
23313
|
{
|
|
23266
23314
|
css: [segmentedControlStyles, orientation === "vertical" ? segmentedControlVerticalStyles : void 0],
|
|
@@ -23272,7 +23320,7 @@ var SegmentedControl = ({
|
|
|
23272
23320
|
}
|
|
23273
23321
|
const text = option.label ? option.label : option.icon ? null : String(option.value);
|
|
23274
23322
|
const isDisabled = disabled2 || option.disabled;
|
|
23275
|
-
return /* @__PURE__ */ (0,
|
|
23323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { css: segmentedControlItemStyles, "data-testid": "container-segmented-control", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
|
|
23276
23324
|
"label",
|
|
23277
23325
|
{
|
|
23278
23326
|
css: [
|
|
@@ -23281,7 +23329,7 @@ var SegmentedControl = ({
|
|
|
23281
23329
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
23282
23330
|
],
|
|
23283
23331
|
children: [
|
|
23284
|
-
/* @__PURE__ */ (0,
|
|
23332
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
23285
23333
|
"input",
|
|
23286
23334
|
{
|
|
23287
23335
|
css: segmentedControlInputStyles,
|
|
@@ -23293,10 +23341,10 @@ var SegmentedControl = ({
|
|
|
23293
23341
|
disabled: isDisabled
|
|
23294
23342
|
}
|
|
23295
23343
|
),
|
|
23296
|
-
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0,
|
|
23297
|
-
/* @__PURE__ */ (0,
|
|
23298
|
-
!option.icon ? null : /* @__PURE__ */ (0,
|
|
23299
|
-
!text ? null : /* @__PURE__ */ (0,
|
|
23344
|
+
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_CgCheck5.CgCheck, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
|
|
23345
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("span", { css: segmentedControlLabelContentStyles, children: [
|
|
23346
|
+
!option.icon ? null : /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Icon, { icon: option.icon, size: "1.5em", iconColor: "currentColor" }),
|
|
23347
|
+
!text ? null : /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { css: segmentedControlLabelTextStyles, children: text })
|
|
23300
23348
|
] })
|
|
23301
23349
|
]
|
|
23302
23350
|
}
|
|
@@ -23311,18 +23359,18 @@ init_emotion_jsx_shim();
|
|
|
23311
23359
|
|
|
23312
23360
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
23313
23361
|
init_emotion_jsx_shim();
|
|
23314
|
-
var
|
|
23315
|
-
var lightFadingOut =
|
|
23362
|
+
var import_react147 = require("@emotion/react");
|
|
23363
|
+
var lightFadingOut = import_react147.keyframes`
|
|
23316
23364
|
from { opacity: 0.1; }
|
|
23317
23365
|
to { opacity: 0.025; }
|
|
23318
23366
|
`;
|
|
23319
|
-
var skeletonStyles =
|
|
23367
|
+
var skeletonStyles = import_react147.css`
|
|
23320
23368
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
23321
23369
|
background-color: var(--gray-900);
|
|
23322
23370
|
`;
|
|
23323
23371
|
|
|
23324
23372
|
// src/components/Skeleton/Skeleton.tsx
|
|
23325
|
-
var
|
|
23373
|
+
var import_jsx_runtime127 = require("@emotion/react/jsx-runtime");
|
|
23326
23374
|
var Skeleton = ({
|
|
23327
23375
|
width = "100%",
|
|
23328
23376
|
height = "1.25rem",
|
|
@@ -23330,7 +23378,7 @@ var Skeleton = ({
|
|
|
23330
23378
|
circle = false,
|
|
23331
23379
|
children,
|
|
23332
23380
|
...otherProps
|
|
23333
|
-
}) => /* @__PURE__ */ (0,
|
|
23381
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
23334
23382
|
"div",
|
|
23335
23383
|
{
|
|
23336
23384
|
css: [
|
|
@@ -23355,8 +23403,8 @@ var React25 = __toESM(require("react"));
|
|
|
23355
23403
|
|
|
23356
23404
|
// src/components/Switch/Switch.styles.ts
|
|
23357
23405
|
init_emotion_jsx_shim();
|
|
23358
|
-
var
|
|
23359
|
-
var SwitchInputContainer =
|
|
23406
|
+
var import_react148 = require("@emotion/react");
|
|
23407
|
+
var SwitchInputContainer = import_react148.css`
|
|
23360
23408
|
cursor: pointer;
|
|
23361
23409
|
display: inline-block;
|
|
23362
23410
|
position: relative;
|
|
@@ -23365,7 +23413,7 @@ var SwitchInputContainer = import_react147.css`
|
|
|
23365
23413
|
vertical-align: middle;
|
|
23366
23414
|
user-select: none;
|
|
23367
23415
|
`;
|
|
23368
|
-
var SwitchInput =
|
|
23416
|
+
var SwitchInput = import_react148.css`
|
|
23369
23417
|
appearance: none;
|
|
23370
23418
|
border-radius: var(--rounded-full);
|
|
23371
23419
|
background-color: var(--white);
|
|
@@ -23403,7 +23451,7 @@ var SwitchInput = import_react147.css`
|
|
|
23403
23451
|
cursor: not-allowed;
|
|
23404
23452
|
}
|
|
23405
23453
|
`;
|
|
23406
|
-
var SwitchInputDisabled =
|
|
23454
|
+
var SwitchInputDisabled = import_react148.css`
|
|
23407
23455
|
opacity: var(--opacity-50);
|
|
23408
23456
|
cursor: not-allowed;
|
|
23409
23457
|
|
|
@@ -23411,7 +23459,7 @@ var SwitchInputDisabled = import_react147.css`
|
|
|
23411
23459
|
cursor: not-allowed;
|
|
23412
23460
|
}
|
|
23413
23461
|
`;
|
|
23414
|
-
var SwitchInputLabel =
|
|
23462
|
+
var SwitchInputLabel = import_react148.css`
|
|
23415
23463
|
align-items: center;
|
|
23416
23464
|
color: var(--typography-base);
|
|
23417
23465
|
display: inline-flex;
|
|
@@ -23432,26 +23480,26 @@ var SwitchInputLabel = import_react147.css`
|
|
|
23432
23480
|
top: 0;
|
|
23433
23481
|
}
|
|
23434
23482
|
`;
|
|
23435
|
-
var SwitchText =
|
|
23483
|
+
var SwitchText = import_react148.css`
|
|
23436
23484
|
color: var(--gray-500);
|
|
23437
23485
|
font-size: var(--fs-sm);
|
|
23438
23486
|
padding-inline: var(--spacing-2xl) 0;
|
|
23439
23487
|
`;
|
|
23440
23488
|
|
|
23441
23489
|
// src/components/Switch/Switch.tsx
|
|
23442
|
-
var
|
|
23490
|
+
var import_jsx_runtime128 = require("@emotion/react/jsx-runtime");
|
|
23443
23491
|
var Switch = React25.forwardRef(
|
|
23444
23492
|
({ label, infoText, toggleText, children, ...inputProps }, ref) => {
|
|
23445
23493
|
let additionalText = infoText;
|
|
23446
23494
|
if (infoText && toggleText) {
|
|
23447
23495
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
23448
23496
|
}
|
|
23449
|
-
return /* @__PURE__ */ (0,
|
|
23450
|
-
/* @__PURE__ */ (0,
|
|
23451
|
-
/* @__PURE__ */ (0,
|
|
23452
|
-
/* @__PURE__ */ (0,
|
|
23497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
|
|
23498
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("label", { css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0], children: [
|
|
23499
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
|
|
23500
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { css: SwitchInputLabel, children: label })
|
|
23453
23501
|
] }),
|
|
23454
|
-
additionalText ? /* @__PURE__ */ (0,
|
|
23502
|
+
additionalText ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("p", { css: SwitchText, children: additionalText }) : null,
|
|
23455
23503
|
children
|
|
23456
23504
|
] });
|
|
23457
23505
|
}
|
|
@@ -23463,8 +23511,8 @@ var React26 = __toESM(require("react"));
|
|
|
23463
23511
|
|
|
23464
23512
|
// src/components/Table/Table.styles.ts
|
|
23465
23513
|
init_emotion_jsx_shim();
|
|
23466
|
-
var
|
|
23467
|
-
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) =>
|
|
23514
|
+
var import_react149 = require("@emotion/react");
|
|
23515
|
+
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => import_react149.css`
|
|
23468
23516
|
border-bottom: 1px solid var(--gray-400);
|
|
23469
23517
|
border-collapse: collapse;
|
|
23470
23518
|
min-width: 100%;
|
|
@@ -23475,67 +23523,67 @@ var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => impor
|
|
|
23475
23523
|
padding: ${cellPadding};
|
|
23476
23524
|
}
|
|
23477
23525
|
`;
|
|
23478
|
-
var tableHead =
|
|
23526
|
+
var tableHead = import_react149.css`
|
|
23479
23527
|
background: var(--gray-100);
|
|
23480
23528
|
color: var(--typography-base);
|
|
23481
23529
|
text-align: left;
|
|
23482
23530
|
`;
|
|
23483
|
-
var tableRow =
|
|
23531
|
+
var tableRow = import_react149.css`
|
|
23484
23532
|
border-bottom: 1px solid var(--gray-200);
|
|
23485
23533
|
`;
|
|
23486
|
-
var tableCellHead =
|
|
23534
|
+
var tableCellHead = import_react149.css`
|
|
23487
23535
|
font-size: var(--fs-sm);
|
|
23488
23536
|
text-transform: uppercase;
|
|
23489
23537
|
font-weight: var(--fw-bold);
|
|
23490
23538
|
`;
|
|
23491
23539
|
|
|
23492
23540
|
// src/components/Table/Table.tsx
|
|
23493
|
-
var
|
|
23541
|
+
var import_jsx_runtime129 = require("@emotion/react/jsx-runtime");
|
|
23494
23542
|
var Table = React26.forwardRef(
|
|
23495
23543
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
23496
|
-
return /* @__PURE__ */ (0,
|
|
23544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
23497
23545
|
}
|
|
23498
23546
|
);
|
|
23499
23547
|
var TableHead = React26.forwardRef(
|
|
23500
23548
|
({ children, ...otherProps }, ref) => {
|
|
23501
|
-
return /* @__PURE__ */ (0,
|
|
23549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("thead", { ref, css: tableHead, ...otherProps, children });
|
|
23502
23550
|
}
|
|
23503
23551
|
);
|
|
23504
23552
|
var TableBody = React26.forwardRef(
|
|
23505
23553
|
({ children, ...otherProps }, ref) => {
|
|
23506
|
-
return /* @__PURE__ */ (0,
|
|
23554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("tbody", { ref, ...otherProps, children });
|
|
23507
23555
|
}
|
|
23508
23556
|
);
|
|
23509
23557
|
var TableFoot = React26.forwardRef(
|
|
23510
23558
|
({ children, ...otherProps }, ref) => {
|
|
23511
|
-
return /* @__PURE__ */ (0,
|
|
23559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("tfoot", { ref, ...otherProps, children });
|
|
23512
23560
|
}
|
|
23513
23561
|
);
|
|
23514
23562
|
var TableRow = React26.forwardRef(
|
|
23515
23563
|
({ children, ...otherProps }, ref) => {
|
|
23516
|
-
return /* @__PURE__ */ (0,
|
|
23564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("tr", { ref, css: tableRow, ...otherProps, children });
|
|
23517
23565
|
}
|
|
23518
23566
|
);
|
|
23519
23567
|
var TableCellHead = React26.forwardRef(
|
|
23520
23568
|
({ children, ...otherProps }, ref) => {
|
|
23521
|
-
return /* @__PURE__ */ (0,
|
|
23569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
23522
23570
|
}
|
|
23523
23571
|
);
|
|
23524
23572
|
var TableCellData = React26.forwardRef(
|
|
23525
23573
|
({ children, ...otherProps }, ref) => {
|
|
23526
|
-
return /* @__PURE__ */ (0,
|
|
23574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("td", { ref, ...otherProps, children });
|
|
23527
23575
|
}
|
|
23528
23576
|
);
|
|
23529
23577
|
|
|
23530
23578
|
// src/components/Tabs/Tabs.tsx
|
|
23531
23579
|
init_emotion_jsx_shim();
|
|
23532
|
-
var
|
|
23533
|
-
var
|
|
23580
|
+
var import_react151 = require("@ariakit/react");
|
|
23581
|
+
var import_react152 = require("react");
|
|
23534
23582
|
|
|
23535
23583
|
// src/components/Tabs/Tabs.styles.ts
|
|
23536
23584
|
init_emotion_jsx_shim();
|
|
23537
|
-
var
|
|
23538
|
-
var tabButtonStyles =
|
|
23585
|
+
var import_react150 = require("@emotion/react");
|
|
23586
|
+
var tabButtonStyles = import_react150.css`
|
|
23539
23587
|
align-items: center;
|
|
23540
23588
|
border: 0;
|
|
23541
23589
|
height: 2.5rem;
|
|
@@ -23552,16 +23600,16 @@ var tabButtonStyles = import_react149.css`
|
|
|
23552
23600
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
23553
23601
|
}
|
|
23554
23602
|
`;
|
|
23555
|
-
var tabButtonGroupStyles =
|
|
23603
|
+
var tabButtonGroupStyles = import_react150.css`
|
|
23556
23604
|
display: flex;
|
|
23557
23605
|
gap: var(--spacing-base);
|
|
23558
23606
|
border-bottom: 1px solid var(--gray-300);
|
|
23559
23607
|
`;
|
|
23560
23608
|
|
|
23561
23609
|
// src/components/Tabs/Tabs.tsx
|
|
23562
|
-
var
|
|
23610
|
+
var import_jsx_runtime130 = require("@emotion/react/jsx-runtime");
|
|
23563
23611
|
var useCurrentTab = () => {
|
|
23564
|
-
const context = (0,
|
|
23612
|
+
const context = (0, import_react151.useTabStore)();
|
|
23565
23613
|
if (!context) {
|
|
23566
23614
|
throw new Error("This component can only be used inside <Tabs>");
|
|
23567
23615
|
}
|
|
@@ -23575,13 +23623,13 @@ var Tabs = ({
|
|
|
23575
23623
|
manual,
|
|
23576
23624
|
...props
|
|
23577
23625
|
}) => {
|
|
23578
|
-
const selected = (0,
|
|
23626
|
+
const selected = (0, import_react152.useMemo)(() => {
|
|
23579
23627
|
if (selectedId)
|
|
23580
23628
|
return selectedId;
|
|
23581
23629
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
23582
23630
|
}, [selectedId, useHashForState]);
|
|
23583
|
-
const tab = (0,
|
|
23584
|
-
const onTabSelect = (0,
|
|
23631
|
+
const tab = (0, import_react151.useTabStore)({ ...props, selectOnMove: !manual, selectedId: selected });
|
|
23632
|
+
const onTabSelect = (0, import_react152.useCallback)(
|
|
23585
23633
|
(value) => {
|
|
23586
23634
|
const selectedValueWithoutNull = value != null ? value : void 0;
|
|
23587
23635
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -23592,28 +23640,28 @@ var Tabs = ({
|
|
|
23592
23640
|
},
|
|
23593
23641
|
[onSelectedIdChange, useHashForState]
|
|
23594
23642
|
);
|
|
23595
|
-
(0,
|
|
23643
|
+
(0, import_react152.useEffect)(() => {
|
|
23596
23644
|
if (selected && selected !== tab.getState().activeId) {
|
|
23597
23645
|
tab.setSelectedId(selected);
|
|
23598
23646
|
}
|
|
23599
23647
|
}, [selected, tab]);
|
|
23600
|
-
return /* @__PURE__ */ (0,
|
|
23648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_react151.TabProvider, { store: tab, setSelectedId: onTabSelect, children });
|
|
23601
23649
|
};
|
|
23602
23650
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
23603
|
-
return /* @__PURE__ */ (0,
|
|
23651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_react151.TabList, { ...props, css: tabButtonGroupStyles, children });
|
|
23604
23652
|
};
|
|
23605
23653
|
var TabButton = ({
|
|
23606
23654
|
children,
|
|
23607
23655
|
id,
|
|
23608
23656
|
...props
|
|
23609
23657
|
}) => {
|
|
23610
|
-
return /* @__PURE__ */ (0,
|
|
23658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_react151.Tab, { type: "button", id, ...props, css: tabButtonStyles, children });
|
|
23611
23659
|
};
|
|
23612
23660
|
var TabContent = ({
|
|
23613
23661
|
children,
|
|
23614
23662
|
...props
|
|
23615
23663
|
}) => {
|
|
23616
|
-
return /* @__PURE__ */ (0,
|
|
23664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_react151.TabPanel, { ...props, children });
|
|
23617
23665
|
};
|
|
23618
23666
|
|
|
23619
23667
|
// src/components/Toast/Toast.tsx
|
|
@@ -23622,8 +23670,8 @@ var import_react_toastify = require("react-toastify");
|
|
|
23622
23670
|
|
|
23623
23671
|
// src/components/Toast/Toast.styles.ts
|
|
23624
23672
|
init_emotion_jsx_shim();
|
|
23625
|
-
var
|
|
23626
|
-
var toastContainerStyles =
|
|
23673
|
+
var import_react153 = require("@emotion/react");
|
|
23674
|
+
var toastContainerStyles = import_react153.css`
|
|
23627
23675
|
${functionalColors}
|
|
23628
23676
|
|
|
23629
23677
|
--toastify-color-light: white;
|
|
@@ -23846,9 +23894,9 @@ var toastContainerStyles = import_react152.css`
|
|
|
23846
23894
|
`;
|
|
23847
23895
|
|
|
23848
23896
|
// src/components/Toast/Toast.tsx
|
|
23849
|
-
var
|
|
23897
|
+
var import_jsx_runtime131 = require("@emotion/react/jsx-runtime");
|
|
23850
23898
|
var ToastContainer = ({ limit = 4 }) => {
|
|
23851
|
-
return /* @__PURE__ */ (0,
|
|
23899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
23852
23900
|
import_react_toastify.ToastContainer,
|
|
23853
23901
|
{
|
|
23854
23902
|
css: toastContainerStyles,
|
|
@@ -23993,6 +24041,7 @@ var ToastContainer = ({ limit = 4 }) => {
|
|
|
23993
24041
|
SearchAndFilterContext,
|
|
23994
24042
|
SearchAndFilterOptionsContainer,
|
|
23995
24043
|
SearchAndFilterProvider,
|
|
24044
|
+
SearchAndFilterResultContainer,
|
|
23996
24045
|
SegmentedControl,
|
|
23997
24046
|
ShortcutContext,
|
|
23998
24047
|
ShortcutRevealer,
|