@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/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,
|
|
@@ -22128,6 +22129,12 @@ var SearchAndFilterControlsWrapper = import_react138.css`
|
|
|
22128
22129
|
grid-template-columns: auto 1fr 1fr;
|
|
22129
22130
|
gap: var(--spacing-base);
|
|
22130
22131
|
`;
|
|
22132
|
+
var SearchAndFilterOutterControlWrapper = import_react138.css`
|
|
22133
|
+
align-items: stretch;
|
|
22134
|
+
display: grid;
|
|
22135
|
+
grid-template-columns: 1fr auto;
|
|
22136
|
+
gap: var(--spacing-sm);
|
|
22137
|
+
`;
|
|
22131
22138
|
var ConditionalFilterRow = import_react138.css`
|
|
22132
22139
|
display: grid;
|
|
22133
22140
|
grid-template-columns: 35px 1fr;
|
|
@@ -22305,6 +22312,7 @@ var FilterButton2 = ({ text = "Filters", filterCount, ...props }) => {
|
|
|
22305
22312
|
type: "button",
|
|
22306
22313
|
css: [FilterButton, filterCount ? FilterButtonWithOptions : void 0],
|
|
22307
22314
|
...props,
|
|
22315
|
+
"data-testid": "filters-button",
|
|
22308
22316
|
children: [
|
|
22309
22317
|
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Icon, { icon: "filter-add", iconColor: "currentColor", size: "1rem" }),
|
|
22310
22318
|
text,
|
|
@@ -22316,6 +22324,8 @@ var FilterButton2 = ({ text = "Filters", filterCount, ...props }) => {
|
|
|
22316
22324
|
|
|
22317
22325
|
// src/components/SearchAndFilter/FilterControls.tsx
|
|
22318
22326
|
init_emotion_jsx_shim();
|
|
22327
|
+
var import_react140 = require("react");
|
|
22328
|
+
var import_react_use3 = require("react-use");
|
|
22319
22329
|
|
|
22320
22330
|
// src/components/SearchAndFilter/hooks/useSearchAndFilter.tsx
|
|
22321
22331
|
init_emotion_jsx_shim();
|
|
@@ -22338,18 +22348,27 @@ var SearchAndFilterContext = (0, import_react139.createContext)({
|
|
|
22338
22348
|
handleDeleteFilter: () => {
|
|
22339
22349
|
},
|
|
22340
22350
|
filterOptions: [],
|
|
22341
|
-
validFilterQuery: []
|
|
22351
|
+
validFilterQuery: [],
|
|
22352
|
+
totalResults: 0
|
|
22342
22353
|
});
|
|
22343
22354
|
var SearchAndFilterProvider = ({
|
|
22344
22355
|
filters,
|
|
22345
22356
|
filterOptions,
|
|
22357
|
+
onSearchChange,
|
|
22346
22358
|
onChange,
|
|
22359
|
+
totalResults,
|
|
22347
22360
|
children
|
|
22348
22361
|
}) => {
|
|
22349
22362
|
const [searchTerm, setSearchTerm] = (0, import_react139.useState)("");
|
|
22350
22363
|
const deferredSearchTerm = (0, import_react139.useDeferredValue)(searchTerm);
|
|
22351
22364
|
const [filterVisibility, setFilterVisibility] = (0, import_react139.useState)(false);
|
|
22352
|
-
const handleSearchTerm = (0, import_react139.useCallback)(
|
|
22365
|
+
const handleSearchTerm = (0, import_react139.useCallback)(
|
|
22366
|
+
(term) => {
|
|
22367
|
+
setSearchTerm(term);
|
|
22368
|
+
onSearchChange(term);
|
|
22369
|
+
},
|
|
22370
|
+
[setSearchTerm, onSearchChange]
|
|
22371
|
+
);
|
|
22353
22372
|
const handleToggleFilterVisibilty = (0, import_react139.useCallback)(
|
|
22354
22373
|
(visible) => setFilterVisibility(visible),
|
|
22355
22374
|
[setFilterVisibility]
|
|
@@ -22400,7 +22419,8 @@ var SearchAndFilterProvider = ({
|
|
|
22400
22419
|
handleResetFilters: () => handleResetFilters(),
|
|
22401
22420
|
handleDeleteFilter: (index) => handleDeleteFilter(index),
|
|
22402
22421
|
filterOptions,
|
|
22403
|
-
validFilterQuery
|
|
22422
|
+
validFilterQuery,
|
|
22423
|
+
totalResults
|
|
22404
22424
|
},
|
|
22405
22425
|
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(VerticalRhythm, { children })
|
|
22406
22426
|
}
|
|
@@ -22414,7 +22434,20 @@ var useSearchAndFilter = () => {
|
|
|
22414
22434
|
// src/components/SearchAndFilter/FilterControls.tsx
|
|
22415
22435
|
var import_jsx_runtime119 = require("@emotion/react/jsx-runtime");
|
|
22416
22436
|
var FilterControls = ({ children }) => {
|
|
22417
|
-
const { setFilterVisibility, filterVisibility, setSearchTerm, validFilterQuery } = useSearchAndFilter();
|
|
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]);
|
|
22418
22451
|
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(import_jsx_runtime119.Fragment, { children: [
|
|
22419
22452
|
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
22420
22453
|
FilterButton2,
|
|
@@ -22430,9 +22463,9 @@ var FilterControls = ({ children }) => {
|
|
|
22430
22463
|
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
22431
22464
|
InputKeywordSearch,
|
|
22432
22465
|
{
|
|
22433
|
-
type: "search",
|
|
22434
22466
|
placeholder: "Search...",
|
|
22435
|
-
onSearchTextChanged: (e) =>
|
|
22467
|
+
onSearchTextChanged: (e) => setLocaleSearchTerm(e),
|
|
22468
|
+
value: localeSearchTerm,
|
|
22436
22469
|
compact: true,
|
|
22437
22470
|
rounded: true
|
|
22438
22471
|
}
|
|
@@ -22443,19 +22476,20 @@ var FilterControls = ({ children }) => {
|
|
|
22443
22476
|
|
|
22444
22477
|
// src/components/SearchAndFilter/FilterItem.tsx
|
|
22445
22478
|
init_emotion_jsx_shim();
|
|
22479
|
+
var import_react143 = require("react");
|
|
22446
22480
|
|
|
22447
22481
|
// src/components/SearchAndFilter/FilterEditor.tsx
|
|
22448
22482
|
init_emotion_jsx_shim();
|
|
22449
|
-
var import_react141 = require("@emotion/react");
|
|
22450
22483
|
var import_react142 = require("react");
|
|
22484
|
+
var import_react_use4 = require("react-use");
|
|
22451
22485
|
|
|
22452
22486
|
// src/components/Validation/StatusBullet.tsx
|
|
22453
22487
|
init_emotion_jsx_shim();
|
|
22454
22488
|
|
|
22455
22489
|
// src/components/Validation/StatusBullet.styles.ts
|
|
22456
22490
|
init_emotion_jsx_shim();
|
|
22457
|
-
var
|
|
22458
|
-
var StatusBulletContainer =
|
|
22491
|
+
var import_react141 = require("@emotion/react");
|
|
22492
|
+
var StatusBulletContainer = import_react141.css`
|
|
22459
22493
|
align-items: center;
|
|
22460
22494
|
align-self: center;
|
|
22461
22495
|
color: var(--gray-500);
|
|
@@ -22472,33 +22506,33 @@ var StatusBulletContainer = import_react140.css`
|
|
|
22472
22506
|
display: block;
|
|
22473
22507
|
}
|
|
22474
22508
|
`;
|
|
22475
|
-
var StatusBulletBase =
|
|
22509
|
+
var StatusBulletBase = import_react141.css`
|
|
22476
22510
|
font-size: var(--fs-sm);
|
|
22477
22511
|
&:before {
|
|
22478
22512
|
width: var(--fs-xs);
|
|
22479
22513
|
height: var(--fs-xs);
|
|
22480
22514
|
}
|
|
22481
22515
|
`;
|
|
22482
|
-
var StatusBulletSmall =
|
|
22516
|
+
var StatusBulletSmall = import_react141.css`
|
|
22483
22517
|
font-size: var(--fs-xs);
|
|
22484
22518
|
&:before {
|
|
22485
22519
|
width: var(--fs-xxs);
|
|
22486
22520
|
height: var(--fs-xxs);
|
|
22487
22521
|
}
|
|
22488
22522
|
`;
|
|
22489
|
-
var StatusDraft =
|
|
22523
|
+
var StatusDraft = import_react141.css`
|
|
22490
22524
|
&:before {
|
|
22491
22525
|
background: var(--white);
|
|
22492
22526
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
22493
22527
|
}
|
|
22494
22528
|
`;
|
|
22495
|
-
var StatusModified =
|
|
22529
|
+
var StatusModified = import_react141.css`
|
|
22496
22530
|
&:before {
|
|
22497
22531
|
background: linear-gradient(to right, var(--white) 50%, var(--primary-action-default) 50% 100%);
|
|
22498
22532
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
22499
22533
|
}
|
|
22500
22534
|
`;
|
|
22501
|
-
var StatusError =
|
|
22535
|
+
var StatusError = import_react141.css`
|
|
22502
22536
|
color: var(--error);
|
|
22503
22537
|
&:before {
|
|
22504
22538
|
/* TODO: replace this with an svg icon */
|
|
@@ -22511,17 +22545,17 @@ var StatusError = import_react140.css`
|
|
|
22511
22545
|
);
|
|
22512
22546
|
}
|
|
22513
22547
|
`;
|
|
22514
|
-
var StatusPublished =
|
|
22548
|
+
var StatusPublished = import_react141.css`
|
|
22515
22549
|
&:before {
|
|
22516
22550
|
background: var(--primary-action-default);
|
|
22517
22551
|
}
|
|
22518
22552
|
`;
|
|
22519
|
-
var StatusOrphan =
|
|
22553
|
+
var StatusOrphan = import_react141.css`
|
|
22520
22554
|
&:before {
|
|
22521
22555
|
background: var(--brand-secondary-5);
|
|
22522
22556
|
}
|
|
22523
22557
|
`;
|
|
22524
|
-
var StatusUnknown =
|
|
22558
|
+
var StatusUnknown = import_react141.css`
|
|
22525
22559
|
&:before {
|
|
22526
22560
|
background: var(--gray-800);
|
|
22527
22561
|
}
|
|
@@ -22564,6 +22598,7 @@ var import_jsx_runtime121 = require("@emotion/react/jsx-runtime");
|
|
|
22564
22598
|
var FilterMultiChoiceEditor = ({
|
|
22565
22599
|
value,
|
|
22566
22600
|
options,
|
|
22601
|
+
isDisabled,
|
|
22567
22602
|
...props
|
|
22568
22603
|
}) => {
|
|
22569
22604
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
@@ -22573,28 +22608,32 @@ var FilterMultiChoiceEditor = ({
|
|
|
22573
22608
|
options,
|
|
22574
22609
|
isMulti: true,
|
|
22575
22610
|
isClearable: true,
|
|
22611
|
+
isDisabled,
|
|
22576
22612
|
onChange: (e) => {
|
|
22577
22613
|
var _a;
|
|
22578
22614
|
return props.onChange((_a = e.map((item) => item.value)) != null ? _a : []);
|
|
22579
|
-
}
|
|
22615
|
+
},
|
|
22616
|
+
value
|
|
22580
22617
|
}
|
|
22581
22618
|
);
|
|
22582
22619
|
};
|
|
22583
22620
|
var FilterSingleChoiceEditor = ({
|
|
22584
22621
|
options,
|
|
22585
22622
|
value,
|
|
22586
|
-
|
|
22623
|
+
isDisabled,
|
|
22624
|
+
onChange
|
|
22587
22625
|
}) => {
|
|
22588
22626
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22589
22627
|
InputComboBox,
|
|
22590
22628
|
{
|
|
22591
22629
|
options,
|
|
22592
22630
|
isClearable: true,
|
|
22593
|
-
...props,
|
|
22594
22631
|
onChange: (e) => {
|
|
22595
22632
|
var _a;
|
|
22596
|
-
return
|
|
22597
|
-
}
|
|
22633
|
+
return onChange((_a = e == null ? void 0 : e.value) != null ? _a : "");
|
|
22634
|
+
},
|
|
22635
|
+
isDisabled,
|
|
22636
|
+
value
|
|
22598
22637
|
}
|
|
22599
22638
|
);
|
|
22600
22639
|
};
|
|
@@ -22604,52 +22643,58 @@ var CustomOptions = ({ label, value }) => {
|
|
|
22604
22643
|
var StatusMultiEditor = ({
|
|
22605
22644
|
options,
|
|
22606
22645
|
value,
|
|
22607
|
-
|
|
22646
|
+
isDisabled,
|
|
22647
|
+
onChange
|
|
22608
22648
|
}) => {
|
|
22609
22649
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22610
22650
|
InputComboBox,
|
|
22611
22651
|
{
|
|
22612
22652
|
options,
|
|
22613
22653
|
isMulti: true,
|
|
22614
|
-
...props,
|
|
22615
22654
|
onChange: (e) => {
|
|
22616
22655
|
var _a;
|
|
22617
|
-
return
|
|
22656
|
+
return onChange((_a = e.map((item) => item.value)) != null ? _a : []);
|
|
22618
22657
|
},
|
|
22619
|
-
formatOptionLabel: CustomOptions
|
|
22658
|
+
formatOptionLabel: CustomOptions,
|
|
22659
|
+
value,
|
|
22660
|
+
isDisabled
|
|
22620
22661
|
}
|
|
22621
22662
|
);
|
|
22622
22663
|
};
|
|
22623
22664
|
var StatusSingleEditor = ({
|
|
22624
22665
|
options,
|
|
22625
22666
|
value,
|
|
22626
|
-
|
|
22667
|
+
isDisabled,
|
|
22668
|
+
onChange
|
|
22627
22669
|
}) => {
|
|
22628
22670
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22629
22671
|
InputComboBox,
|
|
22630
22672
|
{
|
|
22631
22673
|
options,
|
|
22632
|
-
...props,
|
|
22633
22674
|
onChange: (e) => {
|
|
22634
22675
|
var _a;
|
|
22635
|
-
return
|
|
22676
|
+
return onChange((_a = e == null ? void 0 : e.value) != null ? _a : "");
|
|
22636
22677
|
},
|
|
22637
|
-
formatOptionLabel: CustomOptions
|
|
22678
|
+
formatOptionLabel: CustomOptions,
|
|
22679
|
+
value,
|
|
22680
|
+
isDisabled
|
|
22638
22681
|
}
|
|
22639
22682
|
);
|
|
22640
22683
|
};
|
|
22641
|
-
var TextEditor = ({ onChange, ariaLabel }) => {
|
|
22684
|
+
var TextEditor = ({ onChange, ariaLabel, value }) => {
|
|
22685
|
+
(0, import_react_use4.useDebounce)(() => onChange, 500, [value]);
|
|
22642
22686
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22643
22687
|
Input,
|
|
22644
22688
|
{
|
|
22645
22689
|
showLabel: false,
|
|
22646
|
-
|
|
22690
|
+
label: ariaLabel,
|
|
22647
22691
|
onChange: (e) => onChange(e.currentTarget.value),
|
|
22648
|
-
placeholder: "Enter phrase to search\u2026"
|
|
22692
|
+
placeholder: "Enter phrase to search\u2026",
|
|
22693
|
+
value
|
|
22649
22694
|
}
|
|
22650
22695
|
);
|
|
22651
22696
|
};
|
|
22652
|
-
var NumberRangeEditor = ({ onChange,
|
|
22697
|
+
var NumberRangeEditor = ({ onChange, disabled: disabled2, ariaLabel, value }) => {
|
|
22653
22698
|
const [minValue, setMinValue] = (0, import_react142.useState)("");
|
|
22654
22699
|
const [maxValue, setMaxValue] = (0, import_react142.useState)("");
|
|
22655
22700
|
const [error, setError] = (0, import_react142.useState)("");
|
|
@@ -22676,48 +22721,64 @@ var NumberRangeEditor = ({ onChange, ...props }) => {
|
|
|
22676
22721
|
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22677
22722
|
Input,
|
|
22678
22723
|
{
|
|
22679
|
-
|
|
22724
|
+
label: `${ariaLabel}-min`,
|
|
22680
22725
|
type: "number",
|
|
22681
22726
|
showLabel: false,
|
|
22682
22727
|
min: 0,
|
|
22683
22728
|
placeholder: "Low",
|
|
22684
22729
|
onChange: (e) => setMinValue(e.currentTarget.value),
|
|
22685
|
-
"aria-invalid": !error ? false : true
|
|
22730
|
+
"aria-invalid": !error ? false : true,
|
|
22731
|
+
disabled: disabled2,
|
|
22732
|
+
value: value ? value[0] : ""
|
|
22686
22733
|
}
|
|
22687
22734
|
),
|
|
22688
22735
|
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22689
22736
|
Input,
|
|
22690
22737
|
{
|
|
22691
|
-
...props,
|
|
22692
22738
|
type: "number",
|
|
22739
|
+
label: `${ariaLabel}-max`,
|
|
22693
22740
|
showLabel: false,
|
|
22694
22741
|
min: 0,
|
|
22695
22742
|
placeholder: "High",
|
|
22696
22743
|
onChange: (e) => setMaxValue(e.currentTarget.value),
|
|
22697
|
-
"aria-invalid": !error ? false : true
|
|
22744
|
+
"aria-invalid": !error ? false : true,
|
|
22745
|
+
disabled: disabled2,
|
|
22746
|
+
value: value ? value[1] : ""
|
|
22698
22747
|
}
|
|
22699
22748
|
),
|
|
22700
22749
|
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(ErrorContainer, { errorMessage: error })
|
|
22701
22750
|
] });
|
|
22702
22751
|
};
|
|
22703
|
-
var NumberEditor = ({ ariaLabel, onChange }) => {
|
|
22752
|
+
var NumberEditor = ({ ariaLabel, onChange, disabled: disabled2, value }) => {
|
|
22704
22753
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22705
22754
|
Input,
|
|
22706
22755
|
{
|
|
22707
|
-
|
|
22756
|
+
label: ariaLabel,
|
|
22708
22757
|
type: "number",
|
|
22709
22758
|
showLabel: false,
|
|
22710
22759
|
min: 0,
|
|
22711
|
-
onChange: (e) => onChange(e.currentTarget.value)
|
|
22760
|
+
onChange: (e) => onChange(e.currentTarget.value),
|
|
22761
|
+
disabled: disabled2,
|
|
22762
|
+
value
|
|
22712
22763
|
}
|
|
22713
22764
|
);
|
|
22714
22765
|
};
|
|
22715
|
-
var DateEditor = ({ onChange,
|
|
22716
|
-
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22766
|
+
var DateEditor = ({ onChange, ariaLabel, disabled: disabled2, value }) => {
|
|
22767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22768
|
+
Input,
|
|
22769
|
+
{
|
|
22770
|
+
type: "date",
|
|
22771
|
+
label: ariaLabel,
|
|
22772
|
+
showLabel: false,
|
|
22773
|
+
onChange: (e) => onChange(e.currentTarget.value),
|
|
22774
|
+
disabled: disabled2,
|
|
22775
|
+
value
|
|
22776
|
+
}
|
|
22777
|
+
);
|
|
22717
22778
|
};
|
|
22718
|
-
var DateRangeEditor = ({ ariaLabel, onChange }) => {
|
|
22719
|
-
const [minDateValue, setMinDateValue] = (0, import_react142.useState)("");
|
|
22720
|
-
const [maxDateValue, setMaxDateValue] = (0, import_react142.useState)("");
|
|
22779
|
+
var DateRangeEditor = ({ ariaLabel, onChange, disabled: disabled2, value }) => {
|
|
22780
|
+
const [minDateValue, setMinDateValue] = (0, import_react142.useState)(value ? value[0] : "");
|
|
22781
|
+
const [maxDateValue, setMaxDateValue] = (0, import_react142.useState)(value ? value[1] : "");
|
|
22721
22782
|
const [error, setError] = (0, import_react142.useState)("");
|
|
22722
22783
|
(0, import_react142.useEffect)(() => {
|
|
22723
22784
|
if (!minDateValue || !maxDateValue) {
|
|
@@ -22754,23 +22815,25 @@ var DateRangeEditor = ({ ariaLabel, onChange }) => {
|
|
|
22754
22815
|
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22755
22816
|
Input,
|
|
22756
22817
|
{
|
|
22757
|
-
|
|
22818
|
+
label: `${ariaLabel}-min-date`,
|
|
22758
22819
|
type: "date",
|
|
22759
22820
|
showLabel: false,
|
|
22760
22821
|
value: minDateValue,
|
|
22761
22822
|
onChange: (e) => setMinDateValue(e.currentTarget.value),
|
|
22762
|
-
"aria-invalid": !error ? false : true
|
|
22823
|
+
"aria-invalid": !error ? false : true,
|
|
22824
|
+
disabled: disabled2
|
|
22763
22825
|
}
|
|
22764
22826
|
),
|
|
22765
22827
|
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22766
22828
|
Input,
|
|
22767
22829
|
{
|
|
22768
|
-
|
|
22830
|
+
label: `${ariaLabel}-max-date`,
|
|
22769
22831
|
type: "date",
|
|
22770
22832
|
showLabel: false,
|
|
22771
22833
|
value: maxDateValue,
|
|
22772
22834
|
onChange: (e) => setMaxDateValue(e.currentTarget.value),
|
|
22773
|
-
"aria-invalid": !error ? false : true
|
|
22835
|
+
"aria-invalid": !error ? false : true,
|
|
22836
|
+
disabled: disabled2
|
|
22774
22837
|
}
|
|
22775
22838
|
),
|
|
22776
22839
|
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(ErrorContainer, { errorMessage: error })
|
|
@@ -22784,7 +22847,7 @@ var FilterEditorRenderer = ({ editorType, ...props }) => {
|
|
|
22784
22847
|
if (editorType === "empty") {
|
|
22785
22848
|
return null;
|
|
22786
22849
|
}
|
|
22787
|
-
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Editor, { ...props });
|
|
22850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Editor, { ...props, disabled: props.isDisabled });
|
|
22788
22851
|
};
|
|
22789
22852
|
var filterMapper = {
|
|
22790
22853
|
multiChoice: FilterMultiChoiceEditor,
|
|
@@ -22802,10 +22865,10 @@ var ErrorContainer = ({ errorMessage }) => {
|
|
|
22802
22865
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22803
22866
|
"div",
|
|
22804
22867
|
{
|
|
22805
|
-
css:
|
|
22806
|
-
|
|
22807
|
-
order: 6
|
|
22808
|
-
|
|
22868
|
+
css: {
|
|
22869
|
+
gridColumn: "span 6",
|
|
22870
|
+
order: 6
|
|
22871
|
+
},
|
|
22809
22872
|
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(FieldMessage, { errorMessage })
|
|
22810
22873
|
}
|
|
22811
22874
|
);
|
|
@@ -22818,7 +22881,7 @@ var SearchAndFilterOptionsContainer2 = ({
|
|
|
22818
22881
|
buttonRow,
|
|
22819
22882
|
children
|
|
22820
22883
|
}) => {
|
|
22821
|
-
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { css: SearchAndFilterOptionsContainer, children: [
|
|
22884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { css: SearchAndFilterOptionsContainer, "data-testid": "search-and-filter-options", children: [
|
|
22822
22885
|
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { css: SearchAndFilterOptionsInnerContainer, children }),
|
|
22823
22886
|
buttonRow ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
22824
22887
|
HorizontalRhythm,
|
|
@@ -22901,11 +22964,35 @@ var FilterItem = ({
|
|
|
22901
22964
|
onValueChange
|
|
22902
22965
|
}) => {
|
|
22903
22966
|
var _a, _b;
|
|
22904
|
-
const { filters, handleDeleteFilter } = useSearchAndFilter();
|
|
22967
|
+
const { filters, handleDeleteFilter, filterOptions } = useSearchAndFilter();
|
|
22905
22968
|
const label = filters[index].field !== "" ? filters[index].field : "unknown filter field";
|
|
22906
22969
|
const operatorLabel = filters[index].operator !== "" ? `operator ${filters[index].operator}` : "unknown operator";
|
|
22907
22970
|
const metaDataLabel = filters[index].value !== "" ? `value ${filters[index].value}` : "unknown value";
|
|
22908
22971
|
const metaDataPossibleOptions = (_b = (_a = operatorOptions.find((op) => filters[index].operator === op.value)) == null ? void 0 : _a.editorType) != null ? _b : "singleChoice";
|
|
22972
|
+
const { selectedFieldValue, selectedOperatorValue, selectedMetaValue } = (0, import_react143.useMemo)(() => {
|
|
22973
|
+
var _a2, _b2;
|
|
22974
|
+
const currentSelectedFilter = filterOptions.find((item) => {
|
|
22975
|
+
var _a3;
|
|
22976
|
+
return (_a3 = item.options) == null ? void 0 : _a3.find((op) => op.value === filters[index].field);
|
|
22977
|
+
});
|
|
22978
|
+
const selectedFieldValue2 = (_b2 = (_a2 = currentSelectedFilter == null ? void 0 : currentSelectedFilter.options) == null ? void 0 : _a2.find((item) => {
|
|
22979
|
+
return filters[index].field === item.value;
|
|
22980
|
+
})) != null ? _b2 : [];
|
|
22981
|
+
const selectedOperatorValue2 = operatorOptions == null ? void 0 : operatorOptions.find((item) => {
|
|
22982
|
+
return filters[index].operator === item.value;
|
|
22983
|
+
});
|
|
22984
|
+
const selectedMetaValue2 = valueOptions.filter((item) => {
|
|
22985
|
+
if (Array.isArray(filters[index].value) && item.value) {
|
|
22986
|
+
return filters[index].value.includes(item.value);
|
|
22987
|
+
}
|
|
22988
|
+
return filters[index].value === item.value;
|
|
22989
|
+
});
|
|
22990
|
+
return {
|
|
22991
|
+
selectedFieldValue: selectedFieldValue2,
|
|
22992
|
+
selectedOperatorValue: selectedOperatorValue2 != null ? selectedOperatorValue2 : void 0,
|
|
22993
|
+
selectedMetaValue: selectedMetaValue2.length > 0 ? selectedMetaValue2 : filters[index].value
|
|
22994
|
+
};
|
|
22995
|
+
}, [filters, filterOptions, index, operatorOptions, valueOptions]);
|
|
22909
22996
|
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { css: ConditionalFilterRow, children: [
|
|
22910
22997
|
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("span", { children: index === 0 ? "where" : "and" }),
|
|
22911
22998
|
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { css: ConditionalInputRow, children: [
|
|
@@ -22917,7 +23004,8 @@ var FilterItem = ({
|
|
|
22917
23004
|
onChange: (e) => {
|
|
22918
23005
|
var _a2;
|
|
22919
23006
|
onParamChange((_a2 = e == null ? void 0 : e.value) != null ? _a2 : "");
|
|
22920
|
-
}
|
|
23007
|
+
},
|
|
23008
|
+
value: selectedFieldValue
|
|
22921
23009
|
}
|
|
22922
23010
|
),
|
|
22923
23011
|
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
@@ -22929,7 +23017,8 @@ var FilterItem = ({
|
|
|
22929
23017
|
var _a2;
|
|
22930
23018
|
return onOperatorChange((_a2 = e == null ? void 0 : e.value) != null ? _a2 : "");
|
|
22931
23019
|
},
|
|
22932
|
-
isDisabled: !filters[index].field
|
|
23020
|
+
isDisabled: !filters[index].field,
|
|
23021
|
+
value: selectedOperatorValue
|
|
22933
23022
|
}
|
|
22934
23023
|
),
|
|
22935
23024
|
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
@@ -22938,7 +23027,9 @@ var FilterItem = ({
|
|
|
22938
23027
|
"aria-label": metaDataLabel,
|
|
22939
23028
|
editorType: metaDataPossibleOptions,
|
|
22940
23029
|
options: valueOptions,
|
|
22941
|
-
onChange: (e) => onValueChange(e != null ? e : "")
|
|
23030
|
+
onChange: (e) => onValueChange(e != null ? e : ""),
|
|
23031
|
+
isDisabled: !filters[index].operator,
|
|
23032
|
+
value: selectedMetaValue
|
|
22942
23033
|
}
|
|
22943
23034
|
),
|
|
22944
23035
|
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
@@ -23000,30 +23091,73 @@ var FilterItems = () => {
|
|
|
23000
23091
|
|
|
23001
23092
|
// src/components/SearchAndFilter/SearchAndFilter.tsx
|
|
23002
23093
|
init_emotion_jsx_shim();
|
|
23094
|
+
|
|
23095
|
+
// src/components/SearchAndFilter/SearchAndFilterResultContainer.tsx
|
|
23096
|
+
init_emotion_jsx_shim();
|
|
23003
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");
|
|
23004
23121
|
var SearchAndFilter = ({
|
|
23005
23122
|
filters,
|
|
23006
23123
|
filterOptions,
|
|
23007
|
-
filterControls = /* @__PURE__ */ (0,
|
|
23008
|
-
|
|
23009
|
-
|
|
23124
|
+
filterControls = /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(FilterControls, {}),
|
|
23125
|
+
viewSwitchControls,
|
|
23126
|
+
children = /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(FilterItems, {}),
|
|
23127
|
+
onChange,
|
|
23128
|
+
onSearchChange,
|
|
23129
|
+
totalResults
|
|
23010
23130
|
}) => {
|
|
23011
|
-
return /* @__PURE__ */ (0,
|
|
23012
|
-
|
|
23013
|
-
|
|
23014
|
-
|
|
23131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
23132
|
+
SearchAndFilterProvider,
|
|
23133
|
+
{
|
|
23134
|
+
filters,
|
|
23135
|
+
filterOptions,
|
|
23136
|
+
onChange,
|
|
23137
|
+
onSearchChange,
|
|
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 }),
|
|
23142
|
+
viewSwitchControls
|
|
23143
|
+
] }),
|
|
23144
|
+
children,
|
|
23145
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(SearchAndFilterResultContainer, {})
|
|
23146
|
+
] })
|
|
23147
|
+
}
|
|
23148
|
+
);
|
|
23015
23149
|
};
|
|
23016
23150
|
|
|
23017
23151
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
23018
23152
|
init_emotion_jsx_shim();
|
|
23019
|
-
var
|
|
23153
|
+
var import_react145 = require("@emotion/react");
|
|
23020
23154
|
var import_CgCheck5 = require("@react-icons/all-files/cg/CgCheck");
|
|
23021
|
-
var
|
|
23155
|
+
var import_react146 = require("react");
|
|
23022
23156
|
|
|
23023
23157
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
23024
23158
|
init_emotion_jsx_shim();
|
|
23025
|
-
var
|
|
23026
|
-
var segmentedControlStyles =
|
|
23159
|
+
var import_react144 = require("@emotion/react");
|
|
23160
|
+
var segmentedControlStyles = import_react144.css`
|
|
23027
23161
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
23028
23162
|
--segmented-control-border-width: 1px;
|
|
23029
23163
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -23042,14 +23176,14 @@ var segmentedControlStyles = import_react143.css`
|
|
|
23042
23176
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
23043
23177
|
font-size: var(--fs-xs);
|
|
23044
23178
|
`;
|
|
23045
|
-
var segmentedControlVerticalStyles =
|
|
23179
|
+
var segmentedControlVerticalStyles = import_react144.css`
|
|
23046
23180
|
flex-direction: column;
|
|
23047
23181
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
23048
23182
|
var(--segmented-control-rounded-value) 0 0;
|
|
23049
23183
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
23050
23184
|
var(--segmented-control-rounded-value);
|
|
23051
23185
|
`;
|
|
23052
|
-
var segmentedControlItemStyles =
|
|
23186
|
+
var segmentedControlItemStyles = import_react144.css`
|
|
23053
23187
|
&:first-of-type label {
|
|
23054
23188
|
border-radius: var(--segmented-control-first-border-radius);
|
|
23055
23189
|
}
|
|
@@ -23057,10 +23191,10 @@ var segmentedControlItemStyles = import_react143.css`
|
|
|
23057
23191
|
border-radius: var(--segmented-control-last-border-radius);
|
|
23058
23192
|
}
|
|
23059
23193
|
`;
|
|
23060
|
-
var segmentedControlInputStyles =
|
|
23194
|
+
var segmentedControlInputStyles = import_react144.css`
|
|
23061
23195
|
${accessibleHidden}
|
|
23062
23196
|
`;
|
|
23063
|
-
var segmentedControlLabelStyles = (checked, disabled2) =>
|
|
23197
|
+
var segmentedControlLabelStyles = (checked, disabled2) => import_react144.css`
|
|
23064
23198
|
position: relative;
|
|
23065
23199
|
display: flex;
|
|
23066
23200
|
align-items: center;
|
|
@@ -23127,23 +23261,23 @@ var segmentedControlLabelStyles = (checked, disabled2) => import_react143.css`
|
|
|
23127
23261
|
`}
|
|
23128
23262
|
}
|
|
23129
23263
|
`;
|
|
23130
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
23264
|
+
var segmentedControlLabelIconOnlyStyles = import_react144.css`
|
|
23131
23265
|
padding-inline: 0.5em;
|
|
23132
23266
|
`;
|
|
23133
|
-
var segmentedControlLabelCheckStyles =
|
|
23267
|
+
var segmentedControlLabelCheckStyles = import_react144.css`
|
|
23134
23268
|
opacity: 0.5;
|
|
23135
23269
|
`;
|
|
23136
|
-
var segmentedControlLabelContentStyles =
|
|
23270
|
+
var segmentedControlLabelContentStyles = import_react144.css`
|
|
23137
23271
|
display: flex;
|
|
23138
23272
|
align-items: center;
|
|
23139
23273
|
justify-content: center;
|
|
23140
23274
|
gap: var(--spacing-sm);
|
|
23141
23275
|
height: 100%;
|
|
23142
23276
|
`;
|
|
23143
|
-
var segmentedControlLabelTextStyles =
|
|
23277
|
+
var segmentedControlLabelTextStyles = import_react144.css``;
|
|
23144
23278
|
|
|
23145
23279
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
23146
|
-
var
|
|
23280
|
+
var import_jsx_runtime126 = require("@emotion/react/jsx-runtime");
|
|
23147
23281
|
var SegmentedControl = ({
|
|
23148
23282
|
name,
|
|
23149
23283
|
options,
|
|
@@ -23155,7 +23289,7 @@ var SegmentedControl = ({
|
|
|
23155
23289
|
size = "md",
|
|
23156
23290
|
...props
|
|
23157
23291
|
}) => {
|
|
23158
|
-
const onOptionChange = (0,
|
|
23292
|
+
const onOptionChange = (0, import_react146.useCallback)(
|
|
23159
23293
|
(event) => {
|
|
23160
23294
|
if (event.target.checked) {
|
|
23161
23295
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -23163,18 +23297,18 @@ var SegmentedControl = ({
|
|
|
23163
23297
|
},
|
|
23164
23298
|
[options, onChange]
|
|
23165
23299
|
);
|
|
23166
|
-
const sizeStyles = (0,
|
|
23300
|
+
const sizeStyles = (0, import_react146.useMemo)(() => {
|
|
23167
23301
|
const map = {
|
|
23168
|
-
sm: (0,
|
|
23169
|
-
md: (0,
|
|
23170
|
-
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)" })
|
|
23171
23305
|
};
|
|
23172
23306
|
return map[size];
|
|
23173
23307
|
}, [size]);
|
|
23174
|
-
const isIconOnly = (0,
|
|
23308
|
+
const isIconOnly = (0, import_react146.useMemo)(() => {
|
|
23175
23309
|
return options.every((option) => option && option.icon && !option.label);
|
|
23176
23310
|
}, [options]);
|
|
23177
|
-
return /* @__PURE__ */ (0,
|
|
23311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
23178
23312
|
"div",
|
|
23179
23313
|
{
|
|
23180
23314
|
css: [segmentedControlStyles, orientation === "vertical" ? segmentedControlVerticalStyles : void 0],
|
|
@@ -23186,7 +23320,7 @@ var SegmentedControl = ({
|
|
|
23186
23320
|
}
|
|
23187
23321
|
const text = option.label ? option.label : option.icon ? null : String(option.value);
|
|
23188
23322
|
const isDisabled = disabled2 || option.disabled;
|
|
23189
|
-
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)(
|
|
23190
23324
|
"label",
|
|
23191
23325
|
{
|
|
23192
23326
|
css: [
|
|
@@ -23195,7 +23329,7 @@ var SegmentedControl = ({
|
|
|
23195
23329
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
23196
23330
|
],
|
|
23197
23331
|
children: [
|
|
23198
|
-
/* @__PURE__ */ (0,
|
|
23332
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
23199
23333
|
"input",
|
|
23200
23334
|
{
|
|
23201
23335
|
css: segmentedControlInputStyles,
|
|
@@ -23207,10 +23341,10 @@ var SegmentedControl = ({
|
|
|
23207
23341
|
disabled: isDisabled
|
|
23208
23342
|
}
|
|
23209
23343
|
),
|
|
23210
|
-
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0,
|
|
23211
|
-
/* @__PURE__ */ (0,
|
|
23212
|
-
!option.icon ? null : /* @__PURE__ */ (0,
|
|
23213
|
-
!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 })
|
|
23214
23348
|
] })
|
|
23215
23349
|
]
|
|
23216
23350
|
}
|
|
@@ -23225,18 +23359,18 @@ init_emotion_jsx_shim();
|
|
|
23225
23359
|
|
|
23226
23360
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
23227
23361
|
init_emotion_jsx_shim();
|
|
23228
|
-
var
|
|
23229
|
-
var lightFadingOut =
|
|
23362
|
+
var import_react147 = require("@emotion/react");
|
|
23363
|
+
var lightFadingOut = import_react147.keyframes`
|
|
23230
23364
|
from { opacity: 0.1; }
|
|
23231
23365
|
to { opacity: 0.025; }
|
|
23232
23366
|
`;
|
|
23233
|
-
var skeletonStyles =
|
|
23367
|
+
var skeletonStyles = import_react147.css`
|
|
23234
23368
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
23235
23369
|
background-color: var(--gray-900);
|
|
23236
23370
|
`;
|
|
23237
23371
|
|
|
23238
23372
|
// src/components/Skeleton/Skeleton.tsx
|
|
23239
|
-
var
|
|
23373
|
+
var import_jsx_runtime127 = require("@emotion/react/jsx-runtime");
|
|
23240
23374
|
var Skeleton = ({
|
|
23241
23375
|
width = "100%",
|
|
23242
23376
|
height = "1.25rem",
|
|
@@ -23244,7 +23378,7 @@ var Skeleton = ({
|
|
|
23244
23378
|
circle = false,
|
|
23245
23379
|
children,
|
|
23246
23380
|
...otherProps
|
|
23247
|
-
}) => /* @__PURE__ */ (0,
|
|
23381
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
23248
23382
|
"div",
|
|
23249
23383
|
{
|
|
23250
23384
|
css: [
|
|
@@ -23269,8 +23403,8 @@ var React25 = __toESM(require("react"));
|
|
|
23269
23403
|
|
|
23270
23404
|
// src/components/Switch/Switch.styles.ts
|
|
23271
23405
|
init_emotion_jsx_shim();
|
|
23272
|
-
var
|
|
23273
|
-
var SwitchInputContainer =
|
|
23406
|
+
var import_react148 = require("@emotion/react");
|
|
23407
|
+
var SwitchInputContainer = import_react148.css`
|
|
23274
23408
|
cursor: pointer;
|
|
23275
23409
|
display: inline-block;
|
|
23276
23410
|
position: relative;
|
|
@@ -23279,7 +23413,7 @@ var SwitchInputContainer = import_react147.css`
|
|
|
23279
23413
|
vertical-align: middle;
|
|
23280
23414
|
user-select: none;
|
|
23281
23415
|
`;
|
|
23282
|
-
var SwitchInput =
|
|
23416
|
+
var SwitchInput = import_react148.css`
|
|
23283
23417
|
appearance: none;
|
|
23284
23418
|
border-radius: var(--rounded-full);
|
|
23285
23419
|
background-color: var(--white);
|
|
@@ -23317,7 +23451,7 @@ var SwitchInput = import_react147.css`
|
|
|
23317
23451
|
cursor: not-allowed;
|
|
23318
23452
|
}
|
|
23319
23453
|
`;
|
|
23320
|
-
var SwitchInputDisabled =
|
|
23454
|
+
var SwitchInputDisabled = import_react148.css`
|
|
23321
23455
|
opacity: var(--opacity-50);
|
|
23322
23456
|
cursor: not-allowed;
|
|
23323
23457
|
|
|
@@ -23325,7 +23459,7 @@ var SwitchInputDisabled = import_react147.css`
|
|
|
23325
23459
|
cursor: not-allowed;
|
|
23326
23460
|
}
|
|
23327
23461
|
`;
|
|
23328
|
-
var SwitchInputLabel =
|
|
23462
|
+
var SwitchInputLabel = import_react148.css`
|
|
23329
23463
|
align-items: center;
|
|
23330
23464
|
color: var(--typography-base);
|
|
23331
23465
|
display: inline-flex;
|
|
@@ -23346,26 +23480,26 @@ var SwitchInputLabel = import_react147.css`
|
|
|
23346
23480
|
top: 0;
|
|
23347
23481
|
}
|
|
23348
23482
|
`;
|
|
23349
|
-
var SwitchText =
|
|
23483
|
+
var SwitchText = import_react148.css`
|
|
23350
23484
|
color: var(--gray-500);
|
|
23351
23485
|
font-size: var(--fs-sm);
|
|
23352
23486
|
padding-inline: var(--spacing-2xl) 0;
|
|
23353
23487
|
`;
|
|
23354
23488
|
|
|
23355
23489
|
// src/components/Switch/Switch.tsx
|
|
23356
|
-
var
|
|
23490
|
+
var import_jsx_runtime128 = require("@emotion/react/jsx-runtime");
|
|
23357
23491
|
var Switch = React25.forwardRef(
|
|
23358
23492
|
({ label, infoText, toggleText, children, ...inputProps }, ref) => {
|
|
23359
23493
|
let additionalText = infoText;
|
|
23360
23494
|
if (infoText && toggleText) {
|
|
23361
23495
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
23362
23496
|
}
|
|
23363
|
-
return /* @__PURE__ */ (0,
|
|
23364
|
-
/* @__PURE__ */ (0,
|
|
23365
|
-
/* @__PURE__ */ (0,
|
|
23366
|
-
/* @__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 })
|
|
23367
23501
|
] }),
|
|
23368
|
-
additionalText ? /* @__PURE__ */ (0,
|
|
23502
|
+
additionalText ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("p", { css: SwitchText, children: additionalText }) : null,
|
|
23369
23503
|
children
|
|
23370
23504
|
] });
|
|
23371
23505
|
}
|
|
@@ -23377,8 +23511,8 @@ var React26 = __toESM(require("react"));
|
|
|
23377
23511
|
|
|
23378
23512
|
// src/components/Table/Table.styles.ts
|
|
23379
23513
|
init_emotion_jsx_shim();
|
|
23380
|
-
var
|
|
23381
|
-
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`
|
|
23382
23516
|
border-bottom: 1px solid var(--gray-400);
|
|
23383
23517
|
border-collapse: collapse;
|
|
23384
23518
|
min-width: 100%;
|
|
@@ -23389,67 +23523,67 @@ var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => impor
|
|
|
23389
23523
|
padding: ${cellPadding};
|
|
23390
23524
|
}
|
|
23391
23525
|
`;
|
|
23392
|
-
var tableHead =
|
|
23526
|
+
var tableHead = import_react149.css`
|
|
23393
23527
|
background: var(--gray-100);
|
|
23394
23528
|
color: var(--typography-base);
|
|
23395
23529
|
text-align: left;
|
|
23396
23530
|
`;
|
|
23397
|
-
var tableRow =
|
|
23531
|
+
var tableRow = import_react149.css`
|
|
23398
23532
|
border-bottom: 1px solid var(--gray-200);
|
|
23399
23533
|
`;
|
|
23400
|
-
var tableCellHead =
|
|
23534
|
+
var tableCellHead = import_react149.css`
|
|
23401
23535
|
font-size: var(--fs-sm);
|
|
23402
23536
|
text-transform: uppercase;
|
|
23403
23537
|
font-weight: var(--fw-bold);
|
|
23404
23538
|
`;
|
|
23405
23539
|
|
|
23406
23540
|
// src/components/Table/Table.tsx
|
|
23407
|
-
var
|
|
23541
|
+
var import_jsx_runtime129 = require("@emotion/react/jsx-runtime");
|
|
23408
23542
|
var Table = React26.forwardRef(
|
|
23409
23543
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
23410
|
-
return /* @__PURE__ */ (0,
|
|
23544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
23411
23545
|
}
|
|
23412
23546
|
);
|
|
23413
23547
|
var TableHead = React26.forwardRef(
|
|
23414
23548
|
({ children, ...otherProps }, ref) => {
|
|
23415
|
-
return /* @__PURE__ */ (0,
|
|
23549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("thead", { ref, css: tableHead, ...otherProps, children });
|
|
23416
23550
|
}
|
|
23417
23551
|
);
|
|
23418
23552
|
var TableBody = React26.forwardRef(
|
|
23419
23553
|
({ children, ...otherProps }, ref) => {
|
|
23420
|
-
return /* @__PURE__ */ (0,
|
|
23554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("tbody", { ref, ...otherProps, children });
|
|
23421
23555
|
}
|
|
23422
23556
|
);
|
|
23423
23557
|
var TableFoot = React26.forwardRef(
|
|
23424
23558
|
({ children, ...otherProps }, ref) => {
|
|
23425
|
-
return /* @__PURE__ */ (0,
|
|
23559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("tfoot", { ref, ...otherProps, children });
|
|
23426
23560
|
}
|
|
23427
23561
|
);
|
|
23428
23562
|
var TableRow = React26.forwardRef(
|
|
23429
23563
|
({ children, ...otherProps }, ref) => {
|
|
23430
|
-
return /* @__PURE__ */ (0,
|
|
23564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("tr", { ref, css: tableRow, ...otherProps, children });
|
|
23431
23565
|
}
|
|
23432
23566
|
);
|
|
23433
23567
|
var TableCellHead = React26.forwardRef(
|
|
23434
23568
|
({ children, ...otherProps }, ref) => {
|
|
23435
|
-
return /* @__PURE__ */ (0,
|
|
23569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
23436
23570
|
}
|
|
23437
23571
|
);
|
|
23438
23572
|
var TableCellData = React26.forwardRef(
|
|
23439
23573
|
({ children, ...otherProps }, ref) => {
|
|
23440
|
-
return /* @__PURE__ */ (0,
|
|
23574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("td", { ref, ...otherProps, children });
|
|
23441
23575
|
}
|
|
23442
23576
|
);
|
|
23443
23577
|
|
|
23444
23578
|
// src/components/Tabs/Tabs.tsx
|
|
23445
23579
|
init_emotion_jsx_shim();
|
|
23446
|
-
var
|
|
23447
|
-
var
|
|
23580
|
+
var import_react151 = require("@ariakit/react");
|
|
23581
|
+
var import_react152 = require("react");
|
|
23448
23582
|
|
|
23449
23583
|
// src/components/Tabs/Tabs.styles.ts
|
|
23450
23584
|
init_emotion_jsx_shim();
|
|
23451
|
-
var
|
|
23452
|
-
var tabButtonStyles =
|
|
23585
|
+
var import_react150 = require("@emotion/react");
|
|
23586
|
+
var tabButtonStyles = import_react150.css`
|
|
23453
23587
|
align-items: center;
|
|
23454
23588
|
border: 0;
|
|
23455
23589
|
height: 2.5rem;
|
|
@@ -23466,16 +23600,16 @@ var tabButtonStyles = import_react149.css`
|
|
|
23466
23600
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
23467
23601
|
}
|
|
23468
23602
|
`;
|
|
23469
|
-
var tabButtonGroupStyles =
|
|
23603
|
+
var tabButtonGroupStyles = import_react150.css`
|
|
23470
23604
|
display: flex;
|
|
23471
23605
|
gap: var(--spacing-base);
|
|
23472
23606
|
border-bottom: 1px solid var(--gray-300);
|
|
23473
23607
|
`;
|
|
23474
23608
|
|
|
23475
23609
|
// src/components/Tabs/Tabs.tsx
|
|
23476
|
-
var
|
|
23610
|
+
var import_jsx_runtime130 = require("@emotion/react/jsx-runtime");
|
|
23477
23611
|
var useCurrentTab = () => {
|
|
23478
|
-
const context = (0,
|
|
23612
|
+
const context = (0, import_react151.useTabStore)();
|
|
23479
23613
|
if (!context) {
|
|
23480
23614
|
throw new Error("This component can only be used inside <Tabs>");
|
|
23481
23615
|
}
|
|
@@ -23489,13 +23623,13 @@ var Tabs = ({
|
|
|
23489
23623
|
manual,
|
|
23490
23624
|
...props
|
|
23491
23625
|
}) => {
|
|
23492
|
-
const selected = (0,
|
|
23626
|
+
const selected = (0, import_react152.useMemo)(() => {
|
|
23493
23627
|
if (selectedId)
|
|
23494
23628
|
return selectedId;
|
|
23495
23629
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
23496
23630
|
}, [selectedId, useHashForState]);
|
|
23497
|
-
const tab = (0,
|
|
23498
|
-
const onTabSelect = (0,
|
|
23631
|
+
const tab = (0, import_react151.useTabStore)({ ...props, selectOnMove: !manual, selectedId: selected });
|
|
23632
|
+
const onTabSelect = (0, import_react152.useCallback)(
|
|
23499
23633
|
(value) => {
|
|
23500
23634
|
const selectedValueWithoutNull = value != null ? value : void 0;
|
|
23501
23635
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -23506,28 +23640,28 @@ var Tabs = ({
|
|
|
23506
23640
|
},
|
|
23507
23641
|
[onSelectedIdChange, useHashForState]
|
|
23508
23642
|
);
|
|
23509
|
-
(0,
|
|
23643
|
+
(0, import_react152.useEffect)(() => {
|
|
23510
23644
|
if (selected && selected !== tab.getState().activeId) {
|
|
23511
23645
|
tab.setSelectedId(selected);
|
|
23512
23646
|
}
|
|
23513
23647
|
}, [selected, tab]);
|
|
23514
|
-
return /* @__PURE__ */ (0,
|
|
23648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_react151.TabProvider, { store: tab, setSelectedId: onTabSelect, children });
|
|
23515
23649
|
};
|
|
23516
23650
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
23517
|
-
return /* @__PURE__ */ (0,
|
|
23651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_react151.TabList, { ...props, css: tabButtonGroupStyles, children });
|
|
23518
23652
|
};
|
|
23519
23653
|
var TabButton = ({
|
|
23520
23654
|
children,
|
|
23521
23655
|
id,
|
|
23522
23656
|
...props
|
|
23523
23657
|
}) => {
|
|
23524
|
-
return /* @__PURE__ */ (0,
|
|
23658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_react151.Tab, { type: "button", id, ...props, css: tabButtonStyles, children });
|
|
23525
23659
|
};
|
|
23526
23660
|
var TabContent = ({
|
|
23527
23661
|
children,
|
|
23528
23662
|
...props
|
|
23529
23663
|
}) => {
|
|
23530
|
-
return /* @__PURE__ */ (0,
|
|
23664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_react151.TabPanel, { ...props, children });
|
|
23531
23665
|
};
|
|
23532
23666
|
|
|
23533
23667
|
// src/components/Toast/Toast.tsx
|
|
@@ -23536,8 +23670,8 @@ var import_react_toastify = require("react-toastify");
|
|
|
23536
23670
|
|
|
23537
23671
|
// src/components/Toast/Toast.styles.ts
|
|
23538
23672
|
init_emotion_jsx_shim();
|
|
23539
|
-
var
|
|
23540
|
-
var toastContainerStyles =
|
|
23673
|
+
var import_react153 = require("@emotion/react");
|
|
23674
|
+
var toastContainerStyles = import_react153.css`
|
|
23541
23675
|
${functionalColors}
|
|
23542
23676
|
|
|
23543
23677
|
--toastify-color-light: white;
|
|
@@ -23760,9 +23894,9 @@ var toastContainerStyles = import_react152.css`
|
|
|
23760
23894
|
`;
|
|
23761
23895
|
|
|
23762
23896
|
// src/components/Toast/Toast.tsx
|
|
23763
|
-
var
|
|
23897
|
+
var import_jsx_runtime131 = require("@emotion/react/jsx-runtime");
|
|
23764
23898
|
var ToastContainer = ({ limit = 4 }) => {
|
|
23765
|
-
return /* @__PURE__ */ (0,
|
|
23899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
23766
23900
|
import_react_toastify.ToastContainer,
|
|
23767
23901
|
{
|
|
23768
23902
|
css: toastContainerStyles,
|
|
@@ -23907,6 +24041,7 @@ var ToastContainer = ({ limit = 4 }) => {
|
|
|
23907
24041
|
SearchAndFilterContext,
|
|
23908
24042
|
SearchAndFilterOptionsContainer,
|
|
23909
24043
|
SearchAndFilterProvider,
|
|
24044
|
+
SearchAndFilterResultContainer,
|
|
23910
24045
|
SegmentedControl,
|
|
23911
24046
|
ShortcutContext,
|
|
23912
24047
|
ShortcutRevealer,
|