@uniformdev/design-system 19.137.1-alpha.4 → 19.138.1-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -15607,6 +15607,10 @@ function InputComboBox(props) {
15607
15607
  },
15608
15608
  '&:has([aria-readonly="true"])': {
15609
15609
  background: "var(--gray-100)",
15610
+ 'div[class^="input-combobox__multi-value__remove"]': {
15611
+ borderRight: "none",
15612
+ display: "none"
15613
+ },
15610
15614
  "&:hover": {
15611
15615
  borderColor: "var(--gray-300)"
15612
15616
  },
@@ -15662,7 +15666,7 @@ function InputComboBox(props) {
15662
15666
  color: "var(--typography-base)"
15663
15667
  };
15664
15668
  },
15665
- multiValueRemove: (styles) => {
15669
+ multiValueRemove: (styles, state) => {
15666
15670
  return {
15667
15671
  ...styles,
15668
15672
  background: "var(--gray-100)",
@@ -15670,7 +15674,8 @@ function InputComboBox(props) {
15670
15674
  color: "var(--white)",
15671
15675
  background: "var(--action-destructive-default)",
15672
15676
  transition: "color var(--duration-fast) var(--timing-ease-out), background-color var(--duration-fast) var(--timing-ease-out)"
15673
- }
15677
+ },
15678
+ ...state.isDisabled && { display: "none" }
15674
15679
  };
15675
15680
  }
15676
15681
  }
@@ -22541,22 +22546,6 @@ var SearchAndFilterButtonGroup = import_react139.css`
22541
22546
  margin-top: var(--spacing-xs);
22542
22547
  margin-left: calc(56px + var(--spacing-md));
22543
22548
  `;
22544
- var SortFilterWrapper = (hiddenLocaleInput) => import_react139.css`
22545
- border-top: 1px solid var(--gray-300);
22546
- align-items: center;
22547
- display: grid;
22548
- grid-template-columns: ${hiddenLocaleInput ? "1fr" : "1fr 200px"};
22549
- gap: var(--spacing-xl);
22550
- padding: var(--spacing-base) var(--spacing-md) 0;
22551
- position: relative;
22552
- z-index: 0;
22553
- `;
22554
- var SortFilterInputRow = import_react139.css`
22555
- align-items: center;
22556
- display: grid;
22557
- grid-template-columns: 1fr auto;
22558
- gap: var(--spacing-base);
22559
- `;
22560
22549
 
22561
22550
  // src/components/SearchAndFilter/FilterButton.tsx
22562
22551
  var import_jsx_runtime118 = require("@emotion/react/jsx-runtime");
@@ -22734,6 +22723,7 @@ var FilterMultiChoiceEditor = ({
22734
22723
  ...props
22735
22724
  }) => {
22736
22725
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
22726
+ const isClearable = !readOnly || !disabled2;
22737
22727
  return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
22738
22728
  InputComboBox,
22739
22729
  {
@@ -22741,7 +22731,7 @@ var FilterMultiChoiceEditor = ({
22741
22731
  placeholder: "Type to search...",
22742
22732
  options,
22743
22733
  isMulti: true,
22744
- isClearable: true,
22734
+ isClearable,
22745
22735
  isDisabled: disabled2,
22746
22736
  onChange: (e) => {
22747
22737
  var _a;
@@ -23130,31 +23120,17 @@ var SearchAndFilterContext = (0, import_react142.createContext)({
23130
23120
  },
23131
23121
  handleDeleteFilter: () => {
23132
23122
  },
23133
- handleLocaleChange: () => {
23134
- },
23135
- setSortBy: () => {
23136
- },
23137
- sortByValue: "",
23138
23123
  filterOptions: [],
23139
- sortOptions: [],
23140
23124
  validFilterQuery: [],
23141
23125
  filterMapper: {},
23142
- totalResults: 0,
23143
- localeOptions: [],
23144
- localeValue: ""
23126
+ totalResults: 0
23145
23127
  });
23146
23128
  var SearchAndFilterProvider = ({
23147
23129
  filters,
23148
23130
  filterOptions,
23149
- sortOptions,
23150
- defaultSortByValue,
23151
- defaultLocale = "",
23152
- localeOptions,
23153
- onLocaleChange,
23154
23131
  filterVisible = false,
23155
23132
  onSearchChange,
23156
23133
  onChange,
23157
- onSortChange,
23158
23134
  resetFilterValues = [{ field: "", operator: "", value: "" }],
23159
23135
  totalResults,
23160
23136
  filterMapper: filterMapper2 = filterMapper,
@@ -23163,8 +23139,6 @@ var SearchAndFilterProvider = ({
23163
23139
  const [searchTerm, setSearchTerm] = (0, import_react142.useState)("");
23164
23140
  const deferredSearchTerm = (0, import_react142.useDeferredValue)(searchTerm);
23165
23141
  const [filterVisibility, setFilterVisibility] = (0, import_react142.useState)(filterVisible);
23166
- const [sortByValue, setSortByValue] = (0, import_react142.useState)(defaultSortByValue);
23167
- const [localeValue, setLocale] = (0, import_react142.useState)(defaultLocale);
23168
23142
  const handleSearchTerm = (0, import_react142.useCallback)(
23169
23143
  (term) => {
23170
23144
  setSearchTerm(term);
@@ -23172,21 +23146,7 @@ var SearchAndFilterProvider = ({
23172
23146
  },
23173
23147
  [setSearchTerm, onSearchChange]
23174
23148
  );
23175
- const handleLocaleChange = (0, import_react142.useCallback)(
23176
- (locale) => {
23177
- setLocale(locale);
23178
- onLocaleChange == null ? void 0 : onLocaleChange(locale);
23179
- },
23180
- [onLocaleChange]
23181
- );
23182
- const handleOnSortChange = (0, import_react142.useCallback)(
23183
- (sort) => {
23184
- setSortByValue(sort);
23185
- onSortChange(sort);
23186
- },
23187
- [onSortChange]
23188
- );
23189
- const handleToggleFilterVisibilty = (0, import_react142.useCallback)(
23149
+ const handleToggleFilterVisibility = (0, import_react142.useCallback)(
23190
23150
  (visible) => setFilterVisibility(visible),
23191
23151
  [setFilterVisibility]
23192
23152
  );
@@ -23228,22 +23188,16 @@ var SearchAndFilterProvider = ({
23228
23188
  value: {
23229
23189
  searchTerm: deferredSearchTerm,
23230
23190
  setSearchTerm: (e) => handleSearchTerm(e),
23231
- setSortBy: (e) => handleOnSortChange(e),
23232
- sortByValue,
23233
23191
  filterVisibility,
23234
- setFilterVisibility: (e) => handleToggleFilterVisibilty(e),
23192
+ setFilterVisibility: (e) => handleToggleFilterVisibility(e),
23235
23193
  filters,
23236
23194
  setFilters: (e) => onChange(e),
23237
23195
  handleAddFilter,
23238
23196
  handleResetFilters,
23239
23197
  handleDeleteFilter,
23240
23198
  filterOptions,
23241
- sortOptions,
23242
23199
  validFilterQuery,
23243
23200
  totalResults,
23244
- localeOptions,
23245
- localeValue,
23246
- handleLocaleChange,
23247
23201
  filterMapper: filterMapper2
23248
23202
  },
23249
23203
  children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(VerticalRhythm, { children })
@@ -23306,7 +23260,7 @@ var FilterControls = ({
23306
23260
 
23307
23261
  // src/components/SearchAndFilter/FilterItem.tsx
23308
23262
  init_emotion_jsx_shim();
23309
- var import_react148 = require("react");
23263
+ var import_react145 = require("react");
23310
23264
 
23311
23265
  // src/components/SearchAndFilter/FilterMenu.tsx
23312
23266
  init_emotion_jsx_shim();
@@ -23314,7 +23268,7 @@ var import_react144 = __toESM(require("react"));
23314
23268
  var import_jsx_runtime123 = require("@emotion/react/jsx-runtime");
23315
23269
  var SearchAndFilterOptionsContainer2 = ({
23316
23270
  buttonRow,
23317
- sortControls,
23271
+ additionalFiltersContainer,
23318
23272
  children
23319
23273
  }) => {
23320
23274
  return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { css: SearchAndFilterOptionsContainer, children: [
@@ -23329,14 +23283,14 @@ var SearchAndFilterOptionsContainer2 = ({
23329
23283
  children: buttonRow
23330
23284
  }
23331
23285
  ) : null,
23332
- sortControls ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { children: sortControls }) : null
23286
+ additionalFiltersContainer ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { children: additionalFiltersContainer }) : null
23333
23287
  ] });
23334
23288
  };
23335
23289
  var FilterMenu = ({
23336
23290
  id,
23337
23291
  filterTitle = "Show results",
23338
23292
  menuControls,
23339
- sortControls,
23293
+ additionalFiltersContainer,
23340
23294
  children,
23341
23295
  dataTestId,
23342
23296
  resetButtonText = "reset"
@@ -23349,339 +23303,36 @@ var FilterMenu = ({
23349
23303
  (_a = innerMenuRef.current) == null ? void 0 : _a.focus();
23350
23304
  }
23351
23305
  }, [filterVisibility]);
23352
- return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(VerticalRhythm, { gap: "sm", "aria-haspopup": "true", id, "data-testid": dataTestId, children: filterVisibility ? /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(SearchAndFilterOptionsContainer2, { buttonRow: menuControls, sortControls, children: [
23353
- /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(HorizontalRhythm, { gap: "sm", align: "center", justify: "space-between", children: [
23354
- /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("span", { css: Title, ref: innerMenuRef, tabIndex: 0, children: filterTitle }),
23355
- (filters == null ? void 0 : filters.length) ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
23356
- "button",
23357
- {
23358
- type: "button",
23359
- css: ResetConditionsBtn,
23360
- onClick: () => {
23361
- handleResetFilters();
23362
- setFilterVisibility(false);
23363
- },
23364
- "data-testid": "reset-filters",
23365
- children: resetButtonText
23366
- }
23367
- ) : null
23368
- ] }),
23369
- children
23370
- ] }) : null });
23371
- };
23372
-
23373
- // src/components/SearchAndFilter/SortItems.tsx
23374
- init_emotion_jsx_shim();
23375
-
23376
- // src/components/SegmentedControl/SegmentedControl.tsx
23377
- init_emotion_jsx_shim();
23378
- var import_react146 = require("@emotion/react");
23379
- var import_CgCheck5 = require("@react-icons/all-files/cg/CgCheck");
23380
- var import_react147 = require("react");
23381
-
23382
- // src/components/SegmentedControl/SegmentedControl.styles.ts
23383
- init_emotion_jsx_shim();
23384
- var import_react145 = require("@emotion/react");
23385
- var segmentedControlStyles = import_react145.css`
23386
- --segmented-control-rounded-value: var(--rounded-base);
23387
- --segmented-control-border-width: 1px;
23388
- --segmented-control-selected-color: var(--brand-secondary-3);
23389
- --segmented-control-first-border-radius: var(--segmented-control-rounded-value) 0 0
23390
- var(--segmented-control-rounded-value);
23391
- --segmented-control-last-border-radius: 0 var(--segmented-control-rounded-value)
23392
- var(--segmented-control-rounded-value) 0;
23393
-
23394
- position: relative;
23395
- display: flex;
23396
- justify-content: flex-start;
23397
- width: fit-content;
23398
- background-color: var(--gray-300);
23399
- padding: var(--segmented-control-border-width);
23400
- gap: var(--segmented-control-border-width);
23401
- border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
23402
- font-size: var(--fs-xs);
23403
- `;
23404
- var segmentedControlVerticalStyles = import_react145.css`
23405
- flex-direction: column;
23406
- --segmented-control-first-border-radius: var(--segmented-control-rounded-value)
23407
- var(--segmented-control-rounded-value) 0 0;
23408
- --segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
23409
- var(--segmented-control-rounded-value);
23410
- `;
23411
- var segmentedControlItemStyles = import_react145.css`
23412
- &:first-of-type label {
23413
- border-radius: var(--segmented-control-first-border-radius);
23414
- }
23415
- &:last-of-type label {
23416
- border-radius: var(--segmented-control-last-border-radius);
23417
- }
23418
- `;
23419
- var segmentedControlInputStyles = import_react145.css`
23420
- ${accessibleHidden}
23421
- `;
23422
- var segmentedControlLabelStyles = (checked, disabled2) => import_react145.css`
23423
- position: relative;
23424
- display: flex;
23425
- align-items: center;
23426
- justify-content: center;
23427
- height: 2rem;
23428
- padding-inline: var(--spacing-base);
23429
- background-color: white;
23430
- transition-property: background-color, color, box-shadow;
23431
- transition-duration: var(--duration-xfast);
23432
- transition-timing-function: ease-in-out;
23433
- z-index: 1;
23434
- cursor: pointer;
23435
-
23436
- &:has(:checked:not(:disabled)) {
23437
- background-color: var(--segmented-control-selected-color);
23438
- outline: var(--segmented-control-border-width) solid var(--segmented-control-selected-color);
23439
- box-shadow: 0 0.43em 1.7em 0 rgba(0, 0, 0, 0.15);
23440
- color: white;
23441
- -webkit-text-stroke-width: thin;
23442
- z-index: 0;
23443
- }
23444
-
23445
- &:hover:not(:has(:disabled, :checked)) {
23446
- background-color: var(--gray-100);
23447
- }
23448
-
23449
- &:has(:disabled) {
23450
- color: var(--gray-400);
23451
- cursor: default;
23452
- }
23453
-
23454
- &:has(:checked:disabled) {
23455
- color: var(--gray-50);
23456
- background-color: var(--gray-400);
23457
- }
23458
-
23459
- // Firefox fallback using emotion variables
23460
- // we can delete this whole block of code and variables in SegmentedControl.tsx
23461
- // once Firefox supports :has selector
23462
- @supports not selector(:has(*)) {
23463
- // equivalent to &:has(:checked:not(:disabled))
23464
- ${checked && !disabled2 ? `
23465
- background-color: var(--segmented-control-selected-color);
23466
- outline: var(--segmented-control-border-width) solid var(--segmented-control-selected-color);
23467
- box-shadow: 0 0.43em 1.7em 0 rgba(0, 0, 0, 0.15);
23468
- color: white;
23469
- -webkit-text-stroke-width: thin;
23470
- z-index: 0;` : void 0}
23471
-
23472
- // equivalent to &:hover:not(:has(:disabled, :checked))
23473
- &:hover {
23474
- ${!checked && !disabled2 ? `background-color: var(--gray-100);` : void 0}
23475
- }
23476
-
23477
- // equivalent to &:has(:disabled)
23478
- ${disabled2 ? `
23479
- color: var(--gray-400);
23480
- cursor: default;` : void 0}
23481
-
23482
- // equivalent to &:has(:checked:disabled)
23483
- ${checked && disabled2 && `
23484
- color: var(--gray-50);
23485
- background-color: var(--gray-400);
23486
- `}
23487
- }
23488
- `;
23489
- var segmentedControlLabelIconOnlyStyles = import_react145.css`
23490
- padding-inline: 0.5em;
23491
- `;
23492
- var segmentedControlLabelCheckStyles = import_react145.css`
23493
- opacity: 0.5;
23494
- `;
23495
- var segmentedControlLabelContentStyles = import_react145.css`
23496
- display: flex;
23497
- align-items: center;
23498
- justify-content: center;
23499
- gap: var(--spacing-sm);
23500
- height: 100%;
23501
- `;
23502
- var segmentedControlLabelTextStyles = import_react145.css``;
23503
-
23504
- // src/components/SegmentedControl/SegmentedControl.tsx
23505
- var import_jsx_runtime124 = require("@emotion/react/jsx-runtime");
23506
- var SegmentedControl = ({
23507
- name,
23508
- options,
23509
- value,
23510
- onChange,
23511
- noCheckmark = false,
23512
- disabled: disabled2 = false,
23513
- orientation = "horizontal",
23514
- size = "md",
23515
- hideOptionText = false,
23516
- iconSize = "1.5em",
23517
- ...props
23518
- }) => {
23519
- const onOptionChange = (0, import_react147.useCallback)(
23520
- (event) => {
23521
- if (event.target.checked) {
23522
- onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
23523
- }
23524
- },
23525
- [options, onChange]
23526
- );
23527
- const sizeStyles = (0, import_react147.useMemo)(() => {
23528
- const map = {
23529
- sm: (0, import_react146.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
23530
- md: (0, import_react146.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
23531
- lg: (0, import_react146.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" }),
23532
- xl: (0, import_react146.css)({ height: "calc(48px - 2px)", fontSize: "var(--fs-base)" })
23533
- };
23534
- return map[size];
23535
- }, [size]);
23536
- const isIconOnly = (0, import_react147.useMemo)(() => {
23537
- return options.every((option) => option && option.icon && !option.label);
23538
- }, [options]);
23539
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
23540
- "div",
23306
+ return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(VerticalRhythm, { gap: "sm", "aria-haspopup": "true", id, "data-testid": dataTestId, children: filterVisibility ? /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
23307
+ SearchAndFilterOptionsContainer2,
23541
23308
  {
23542
- css: [segmentedControlStyles, orientation === "vertical" ? segmentedControlVerticalStyles : void 0],
23543
- ...props,
23544
- "data-testid": "segmented-control",
23545
- children: options.map((option, index) => {
23546
- var _a;
23547
- if (!option) {
23548
- return null;
23549
- }
23550
- const text = option.label ? option.label : option.icon ? null : String(option.value);
23551
- const isDisabled = disabled2 || option.disabled;
23552
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
23553
- "div",
23554
- {
23555
- css: segmentedControlItemStyles,
23556
- "data-testid": option["data-testid"] ? option["data-testid"] : "container-segmented-control",
23557
- children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
23558
- "label",
23559
- {
23560
- css: [
23561
- segmentedControlLabelStyles(option.value === value, isDisabled),
23562
- sizeStyles,
23563
- isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
23564
- ],
23565
- children: [
23566
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
23567
- "input",
23568
- {
23569
- css: segmentedControlInputStyles,
23570
- type: "radio",
23571
- name,
23572
- value: index,
23573
- checked: option.value === value,
23574
- onChange: onOptionChange,
23575
- disabled: isDisabled
23576
- }
23577
- ),
23578
- option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_CgCheck5.CgCheck, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
23579
- /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("span", { css: segmentedControlLabelContentStyles, children: [
23580
- !option.icon ? null : /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Icon, { icon: option.icon, size: iconSize, iconColor: "currentColor" }),
23581
- !text || hideOptionText ? null : /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { css: segmentedControlLabelTextStyles, children: text })
23582
- ] })
23583
- ]
23584
- }
23585
- )
23586
- }
23587
- ) }, JSON.stringify(option.value));
23588
- })
23589
- }
23590
- );
23591
- };
23592
-
23593
- // src/components/SearchAndFilter/SortItems.tsx
23594
- var import_jsx_runtime125 = require("@emotion/react/jsx-runtime");
23595
- var SortItems = ({ sortByLabel = "Sort by", localeLabel = "Locale returned" }) => {
23596
- var _a, _b;
23597
- const { sortOptions, setSortBy, sortByValue, localeValue, localeOptions, handleLocaleChange } = useSearchAndFilter();
23598
- const hideLocaleOptions = !localeOptions;
23599
- const values = sortByValue.split("_");
23600
- const sortDirection = values.pop();
23601
- const sortField = values.join("_");
23602
- const currentSelectedOption = (_b = (_a = sortOptions.find((item) => {
23603
- var _a2;
23604
- return (_a2 = item.options) == null ? void 0 : _a2.find((option) => option.value === sortField);
23605
- })) == null ? void 0 : _a.options) == null ? void 0 : _b.find((nestedOption) => nestedOption.value === sortField);
23606
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { css: [SortFilterWrapper(hideLocaleOptions)], "data-testid": "sorting-options", children: [
23607
- /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(VerticalRhythm, { gap: "xs", children: [
23608
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { css: Title, children: sortByLabel }),
23609
- /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { css: SortFilterInputRow, children: [
23610
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
23611
- InputComboBox,
23612
- {
23613
- id: "sort-by-field",
23614
- "aria-label": "Sort by",
23615
- options: sortOptions,
23616
- onChange: (e) => {
23617
- const fieldName = e == null ? void 0 : e.value;
23618
- setSortBy(`${fieldName}_${sortDirection}`);
23619
- },
23620
- styles: {
23621
- menu(base) {
23622
- return {
23623
- ...base,
23624
- minWidth: "max-content"
23625
- };
23626
- }
23627
- },
23628
- value: currentSelectedOption
23629
- }
23630
- ),
23631
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
23632
- SegmentedControl,
23633
- {
23634
- noCheckmark: true,
23635
- name: "sortBy",
23636
- hideOptionText: true,
23637
- iconSize: "1rem",
23638
- size: "xl",
23639
- options: [
23640
- {
23641
- label: "Ascending",
23642
- icon: "arrow-up",
23643
- value: `ASC`,
23644
- tooltip: "Ascending (e.g. A-Z, newest to oldest)",
23645
- "data-testid": "sort-ascending"
23309
+ buttonRow: menuControls,
23310
+ additionalFiltersContainer,
23311
+ children: [
23312
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(HorizontalRhythm, { gap: "sm", align: "center", justify: "space-between", children: [
23313
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("span", { css: Title, ref: innerMenuRef, tabIndex: 0, children: filterTitle }),
23314
+ (filters == null ? void 0 : filters.length) ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
23315
+ "button",
23316
+ {
23317
+ type: "button",
23318
+ css: ResetConditionsBtn,
23319
+ onClick: () => {
23320
+ handleResetFilters();
23321
+ setFilterVisibility(false);
23646
23322
  },
23647
- {
23648
- label: "Descending",
23649
- icon: "arrow-down",
23650
- value: `DESC`,
23651
- tooltip: "Descending (e.g. Z-A, oldest to newest)",
23652
- "data-testid": "sort-descending"
23653
- }
23654
- ],
23655
- onChange: (e) => setSortBy(`${sortField}_${e}`),
23656
- value: sortDirection
23657
- }
23658
- )
23659
- ] })
23660
- ] }),
23661
- hideLocaleOptions ? null : /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(VerticalRhythm, { gap: "xs", children: [
23662
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { css: Title, children: localeLabel }),
23663
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
23664
- InputSelect,
23665
- {
23666
- name: "localeReturned",
23667
- "aria-label": "Locale returned",
23668
- label: "Locale returned",
23669
- showLabel: false,
23670
- "data-testid": "context-locale",
23671
- onChange: (e) => {
23672
- var _a2;
23673
- return handleLocaleChange((_a2 = e.currentTarget.value) != null ? _a2 : "");
23674
- },
23675
- options: localeOptions,
23676
- value: localeValue
23677
- }
23678
- )
23679
- ] })
23680
- ] });
23323
+ "data-testid": "reset-filters",
23324
+ children: resetButtonText
23325
+ }
23326
+ ) : null
23327
+ ] }),
23328
+ children
23329
+ ]
23330
+ }
23331
+ ) : null });
23681
23332
  };
23682
23333
 
23683
23334
  // src/components/SearchAndFilter/FilterItem.tsx
23684
- var import_jsx_runtime126 = require("@emotion/react/jsx-runtime");
23335
+ var import_jsx_runtime124 = require("@emotion/react/jsx-runtime");
23685
23336
  var FilterItem = ({
23686
23337
  index,
23687
23338
  paramOptions,
@@ -23697,7 +23348,7 @@ var FilterItem = ({
23697
23348
  const operatorLabel = filters[index].operator !== "" ? `operator ${filters[index].operator}` : "unknown operator";
23698
23349
  const metaDataLabel = filters[index].value !== "" ? `value ${filters[index].value}` : "unknown value";
23699
23350
  const metaDataPossibleOptions = (_b = (_a = operatorOptions.find((op) => filters[index].operator === op.value)) == null ? void 0 : _a.editorType) != null ? _b : "singleChoice";
23700
- const { selectedFieldValue, selectedOperatorValue, selectedMetaValue, readOnly, bindable } = (0, import_react148.useMemo)(() => {
23351
+ const { selectedFieldValue, selectedOperatorValue, selectedMetaValue, readOnly, bindable } = (0, import_react145.useMemo)(() => {
23701
23352
  var _a2;
23702
23353
  const currentSelectedFilter = filterOptions.find((item) => {
23703
23354
  var _a3;
@@ -23724,10 +23375,10 @@ var FilterItem = ({
23724
23375
  menuIsOpen: false,
23725
23376
  isClearable: false
23726
23377
  } : {};
23727
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { css: ConditionalFilterRow, "data-testid": "filter-item", children: [
23728
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { children: index === 0 ? "Where" : "and" }),
23729
- /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { css: ConditionalInputRow, children: [
23730
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
23378
+ return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { css: ConditionalFilterRow, "data-testid": "filter-item", children: [
23379
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { children: index === 0 ? "Where" : "and" }),
23380
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { css: ConditionalInputRow, children: [
23381
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
23731
23382
  InputComboBox,
23732
23383
  {
23733
23384
  "aria-label": label,
@@ -23754,7 +23405,7 @@ var FilterItem = ({
23754
23405
  name: `filter-field-${index}`
23755
23406
  }
23756
23407
  ),
23757
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
23408
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
23758
23409
  InputComboBox,
23759
23410
  {
23760
23411
  "aria-label": operatorLabel,
@@ -23778,7 +23429,7 @@ var FilterItem = ({
23778
23429
  name: `filter-operator-${index}`
23779
23430
  }
23780
23431
  ),
23781
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
23432
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
23782
23433
  FilterEditorRenderer,
23783
23434
  {
23784
23435
  "aria-label": metaDataLabel,
@@ -23792,7 +23443,7 @@ var FilterItem = ({
23792
23443
  valueTestId: "filter-value"
23793
23444
  }
23794
23445
  ),
23795
- readOnly || index === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
23446
+ readOnly || index === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
23796
23447
  "button",
23797
23448
  {
23798
23449
  type: "button",
@@ -23800,13 +23451,16 @@ var FilterItem = ({
23800
23451
  "aria-label": "delete filter",
23801
23452
  css: IconBtn,
23802
23453
  "data-testid": "delete-filter",
23803
- children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Icon, { icon: "trash", iconColor: "red", size: "1rem" })
23454
+ children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Icon, { icon: "trash", iconColor: "red", size: "1rem" })
23804
23455
  }
23805
23456
  )
23806
23457
  ] })
23807
23458
  ] });
23808
23459
  };
23809
- var FilterItems = ({ addButtonText = "add condition" }) => {
23460
+ var FilterItems = ({
23461
+ addButtonText = "add condition",
23462
+ additionalFiltersContainer
23463
+ }) => {
23810
23464
  const { filterOptions, filters, setFilters, handleAddFilter } = useSearchAndFilter();
23811
23465
  const handleUpdateFilter = (index, prop, value) => {
23812
23466
  var _a, _b, _c, _d, _e;
@@ -23836,12 +23490,12 @@ var FilterItems = ({ addButtonText = "add condition" }) => {
23836
23490
  }
23837
23491
  setFilters(next);
23838
23492
  };
23839
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
23493
+ return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
23840
23494
  FilterMenu,
23841
23495
  {
23842
23496
  id: "search-and-filter-options",
23843
23497
  dataTestId: "search-and-filter-options",
23844
- menuControls: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
23498
+ menuControls: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
23845
23499
  "button",
23846
23500
  {
23847
23501
  type: "button",
@@ -23849,12 +23503,12 @@ var FilterItems = ({ addButtonText = "add condition" }) => {
23849
23503
  onClick: handleAddFilter,
23850
23504
  "data-testid": "add-filter",
23851
23505
  children: [
23852
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Icon, { icon: "math-plus", iconColor: "currentColor", size: "1rem" }),
23506
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Icon, { icon: "math-plus", iconColor: "currentColor", size: "1rem" }),
23853
23507
  addButtonText
23854
23508
  ]
23855
23509
  }
23856
23510
  ),
23857
- sortControls: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(SortItems, {}),
23511
+ additionalFiltersContainer,
23858
23512
  children: filters.map((item, i) => {
23859
23513
  var _a, _b, _c, _d, _e, _f;
23860
23514
  const availableTypeOptions = (_b = (_a = filterOptions.find((fo) => {
@@ -23863,7 +23517,7 @@ var FilterItems = ({ addButtonText = "add condition" }) => {
23863
23517
  })) == null ? void 0 : _a.options) != null ? _b : [];
23864
23518
  const possibleValueOptions = (_d = (_c = availableTypeOptions == null ? void 0 : availableTypeOptions.find((op) => op.value === item.field)) == null ? void 0 : _c.valueOptions) != null ? _d : [];
23865
23519
  const possibleOperators = (_f = (_e = availableTypeOptions == null ? void 0 : availableTypeOptions.find((op) => op.value === item.field)) == null ? void 0 : _e.operatorOptions) != null ? _f : [];
23866
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
23520
+ return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
23867
23521
  FilterItem,
23868
23522
  {
23869
23523
  index: i,
@@ -23886,7 +23540,7 @@ init_emotion_jsx_shim();
23886
23540
 
23887
23541
  // src/components/SearchAndFilter/SearchAndFilterResultContainer.tsx
23888
23542
  init_emotion_jsx_shim();
23889
- var import_jsx_runtime127 = require("@emotion/react/jsx-runtime");
23543
+ var import_jsx_runtime125 = require("@emotion/react/jsx-runtime");
23890
23544
  var SearchAndFilterResultContainer = ({
23891
23545
  buttonText,
23892
23546
  clearButtonLabel = "clear",
@@ -23920,75 +23574,63 @@ var SearchAndFilterResultContainer = ({
23920
23574
  if (totalResults && totalResults > 0) {
23921
23575
  return null;
23922
23576
  }
23923
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, { children: [
23924
- /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(HorizontalRhythm, { children: [
23925
- /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("span", { children: [
23577
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_jsx_runtime125.Fragment, { children: [
23578
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(HorizontalRhythm, { children: [
23579
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("span", { children: [
23926
23580
  totalResults,
23927
23581
  " results ",
23928
23582
  searchTerm ? `for "${searchTerm}"` : null
23929
23583
  ] }),
23930
- !searchTerm ? null : /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Button, { buttonType: "ghostDestructive", size: "zero", onClick: () => setSearchTerm(""), children: clearButtonLabel })
23584
+ !searchTerm ? null : /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Button, { buttonType: "ghostDestructive", size: "zero", onClick: () => setSearchTerm(""), children: clearButtonLabel })
23931
23585
  ] }),
23932
- totalResults === 0 ? /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(Callout, { title: calloutTitle2 != null ? calloutTitle2 : automateCalloutTitle(), type: "note", children: [
23933
- calloutText ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Paragraph, { children: calloutText }) : null,
23934
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Button, { buttonType: "tertiaryOutline", size: "xs", onClick: onHandleClear != null ? onHandleClear : handleResetFilters, children: buttonText != null ? buttonText : "Clear search" })
23586
+ totalResults === 0 ? /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(Callout, { title: calloutTitle2 != null ? calloutTitle2 : automateCalloutTitle(), type: "note", children: [
23587
+ calloutText ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Paragraph, { children: calloutText }) : null,
23588
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Button, { buttonType: "tertiaryOutline", size: "xs", onClick: onHandleClear != null ? onHandleClear : handleResetFilters, children: buttonText != null ? buttonText : "Clear search" })
23935
23589
  ] }) : null
23936
23590
  ] });
23937
23591
  };
23938
23592
 
23939
23593
  // src/components/SearchAndFilter/SearchAndFilter.tsx
23940
- var import_jsx_runtime128 = require("@emotion/react/jsx-runtime");
23594
+ var import_jsx_runtime126 = require("@emotion/react/jsx-runtime");
23941
23595
  var SearchAndFilter = ({
23942
23596
  filters,
23943
23597
  filterOptions,
23944
23598
  filterVisible,
23945
- sortOptions,
23946
- defaultSortByValue,
23947
23599
  filterControls,
23948
23600
  viewSwitchControls,
23949
- resultsContainerView = /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(SearchAndFilterResultContainer, {}),
23950
- children = /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(FilterItems, {}),
23601
+ resultsContainerView = /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(SearchAndFilterResultContainer, {}),
23951
23602
  filterMapper: filterMapper2 = filterMapper,
23603
+ additionalFiltersContainer,
23952
23604
  onChange,
23953
23605
  onSearchChange,
23954
- onSortChange,
23955
- onLocaleChange,
23956
23606
  totalResults,
23957
- resetFilterValues = [],
23958
- defaultLocale,
23959
- localeOptions
23607
+ resetFilterValues = []
23960
23608
  }) => {
23961
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
23609
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
23962
23610
  SearchAndFilterProvider,
23963
23611
  {
23964
23612
  filters,
23965
23613
  filterOptions,
23966
23614
  filterVisible,
23967
- defaultSortByValue,
23968
- sortOptions,
23969
23615
  onChange,
23970
23616
  onSearchChange,
23971
- onSortChange,
23972
23617
  totalResults,
23973
23618
  resetFilterValues,
23974
- defaultLocale,
23975
- localeOptions,
23976
- onLocaleChange,
23977
23619
  filterMapper: filterMapper2,
23978
- children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(VerticalRhythm, { css: SearchAndFilterContainer, "data-testid": "search-and-filter", children: [
23979
- /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { css: SearchAndFilterOutterControlWrapper(viewSwitchControls ? "1fr auto" : "1fr"), children: [
23980
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
23620
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(VerticalRhythm, { css: SearchAndFilterContainer, "data-testid": "search-and-filter", children: [
23621
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { css: SearchAndFilterOutterControlWrapper(viewSwitchControls ? "1fr auto" : "1fr"), children: [
23622
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
23981
23623
  "div",
23982
23624
  {
23983
23625
  css: SearchAndFilterControlsWrapper(
23984
23626
  viewSwitchControls ? "auto 1fr 0.05fr" : "auto auto 1fr"
23985
23627
  ),
23986
- children: !filterControls ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(FilterControls, { hideSearchInput: !onSearchChange }) : filterControls
23628
+ children: !filterControls ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(FilterControls, { hideSearchInput: !onSearchChange }) : filterControls
23987
23629
  }
23988
23630
  ),
23989
23631
  viewSwitchControls
23990
23632
  ] }),
23991
- children,
23633
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(FilterItems, { additionalFiltersContainer }),
23992
23634
  resultsContainerView
23993
23635
  ] })
23994
23636
  }
@@ -23997,17 +23639,17 @@ var SearchAndFilter = ({
23997
23639
 
23998
23640
  // src/components/SearchAndFilter/SearchOnlyFilter.tsx
23999
23641
  init_emotion_jsx_shim();
24000
- var import_react149 = require("react");
23642
+ var import_react146 = require("react");
24001
23643
  var import_react_use5 = require("react-use");
24002
- var import_jsx_runtime129 = require("@emotion/react/jsx-runtime");
24003
- var SearchOnlyContext = (0, import_react149.createContext)({
23644
+ var import_jsx_runtime127 = require("@emotion/react/jsx-runtime");
23645
+ var SearchOnlyContext = (0, import_react146.createContext)({
24004
23646
  searchTerm: "",
24005
23647
  setSearchTerm: () => {
24006
23648
  }
24007
23649
  });
24008
23650
  var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
24009
23651
  const { searchTerm, setSearchTerm } = useSearchAndFilter();
24010
- const [localeSearchTerm, setLocaleSearchTerm] = (0, import_react149.useState)("");
23652
+ const [localeSearchTerm, setLocaleSearchTerm] = (0, import_react146.useState)("");
24011
23653
  (0, import_react_use5.useDebounce)(
24012
23654
  () => {
24013
23655
  setSearchTerm(localeSearchTerm);
@@ -24016,14 +23658,14 @@ var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
24016
23658
  300,
24017
23659
  [localeSearchTerm]
24018
23660
  );
24019
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
23661
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
24020
23662
  SearchOnlyContext.Provider,
24021
23663
  {
24022
23664
  value: {
24023
23665
  searchTerm,
24024
23666
  setSearchTerm: setLocaleSearchTerm
24025
23667
  },
24026
- children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { css: { maxWidth: maxWidth != null ? maxWidth : "712px" }, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
23668
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { css: { maxWidth: maxWidth != null ? maxWidth : "712px" }, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
24027
23669
  InputKeywordSearch,
24028
23670
  {
24029
23671
  placeholder: "Search...",
@@ -24037,6 +23679,223 @@ var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
24037
23679
  );
24038
23680
  };
24039
23681
 
23682
+ // src/components/SegmentedControl/SegmentedControl.tsx
23683
+ init_emotion_jsx_shim();
23684
+ var import_react148 = require("@emotion/react");
23685
+ var import_CgCheck5 = require("@react-icons/all-files/cg/CgCheck");
23686
+ var import_react149 = require("react");
23687
+
23688
+ // src/components/SegmentedControl/SegmentedControl.styles.ts
23689
+ init_emotion_jsx_shim();
23690
+ var import_react147 = require("@emotion/react");
23691
+ var segmentedControlStyles = import_react147.css`
23692
+ --segmented-control-rounded-value: var(--rounded-base);
23693
+ --segmented-control-border-width: 1px;
23694
+ --segmented-control-selected-color: var(--brand-secondary-3);
23695
+ --segmented-control-first-border-radius: var(--segmented-control-rounded-value) 0 0
23696
+ var(--segmented-control-rounded-value);
23697
+ --segmented-control-last-border-radius: 0 var(--segmented-control-rounded-value)
23698
+ var(--segmented-control-rounded-value) 0;
23699
+
23700
+ position: relative;
23701
+ display: flex;
23702
+ justify-content: flex-start;
23703
+ width: fit-content;
23704
+ background-color: var(--gray-300);
23705
+ padding: var(--segmented-control-border-width);
23706
+ gap: var(--segmented-control-border-width);
23707
+ border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
23708
+ font-size: var(--fs-xs);
23709
+ `;
23710
+ var segmentedControlVerticalStyles = import_react147.css`
23711
+ flex-direction: column;
23712
+ --segmented-control-first-border-radius: var(--segmented-control-rounded-value)
23713
+ var(--segmented-control-rounded-value) 0 0;
23714
+ --segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
23715
+ var(--segmented-control-rounded-value);
23716
+ `;
23717
+ var segmentedControlItemStyles = import_react147.css`
23718
+ &:first-of-type label {
23719
+ border-radius: var(--segmented-control-first-border-radius);
23720
+ }
23721
+ &:last-of-type label {
23722
+ border-radius: var(--segmented-control-last-border-radius);
23723
+ }
23724
+ `;
23725
+ var segmentedControlInputStyles = import_react147.css`
23726
+ ${accessibleHidden}
23727
+ `;
23728
+ var segmentedControlLabelStyles = (checked, disabled2) => import_react147.css`
23729
+ position: relative;
23730
+ display: flex;
23731
+ align-items: center;
23732
+ justify-content: center;
23733
+ height: 2rem;
23734
+ padding-inline: var(--spacing-base);
23735
+ background-color: white;
23736
+ transition-property: background-color, color, box-shadow;
23737
+ transition-duration: var(--duration-xfast);
23738
+ transition-timing-function: ease-in-out;
23739
+ z-index: 1;
23740
+ cursor: pointer;
23741
+
23742
+ &:has(:checked:not(:disabled)) {
23743
+ background-color: var(--segmented-control-selected-color);
23744
+ outline: var(--segmented-control-border-width) solid var(--segmented-control-selected-color);
23745
+ box-shadow: 0 0.43em 1.7em 0 rgba(0, 0, 0, 0.15);
23746
+ color: white;
23747
+ -webkit-text-stroke-width: thin;
23748
+ z-index: 0;
23749
+ }
23750
+
23751
+ &:hover:not(:has(:disabled, :checked)) {
23752
+ background-color: var(--gray-100);
23753
+ }
23754
+
23755
+ &:has(:disabled) {
23756
+ color: var(--gray-400);
23757
+ cursor: default;
23758
+ }
23759
+
23760
+ &:has(:checked:disabled) {
23761
+ color: var(--gray-50);
23762
+ background-color: var(--gray-400);
23763
+ }
23764
+
23765
+ // Firefox fallback using emotion variables
23766
+ // we can delete this whole block of code and variables in SegmentedControl.tsx
23767
+ // once Firefox supports :has selector
23768
+ @supports not selector(:has(*)) {
23769
+ // equivalent to &:has(:checked:not(:disabled))
23770
+ ${checked && !disabled2 ? `
23771
+ background-color: var(--segmented-control-selected-color);
23772
+ outline: var(--segmented-control-border-width) solid var(--segmented-control-selected-color);
23773
+ box-shadow: 0 0.43em 1.7em 0 rgba(0, 0, 0, 0.15);
23774
+ color: white;
23775
+ -webkit-text-stroke-width: thin;
23776
+ z-index: 0;` : void 0}
23777
+
23778
+ // equivalent to &:hover:not(:has(:disabled, :checked))
23779
+ &:hover {
23780
+ ${!checked && !disabled2 ? `background-color: var(--gray-100);` : void 0}
23781
+ }
23782
+
23783
+ // equivalent to &:has(:disabled)
23784
+ ${disabled2 ? `
23785
+ color: var(--gray-400);
23786
+ cursor: default;` : void 0}
23787
+
23788
+ // equivalent to &:has(:checked:disabled)
23789
+ ${checked && disabled2 && `
23790
+ color: var(--gray-50);
23791
+ background-color: var(--gray-400);
23792
+ `}
23793
+ }
23794
+ `;
23795
+ var segmentedControlLabelIconOnlyStyles = import_react147.css`
23796
+ padding-inline: 0.5em;
23797
+ `;
23798
+ var segmentedControlLabelCheckStyles = import_react147.css`
23799
+ opacity: 0.5;
23800
+ `;
23801
+ var segmentedControlLabelContentStyles = import_react147.css`
23802
+ display: flex;
23803
+ align-items: center;
23804
+ justify-content: center;
23805
+ gap: var(--spacing-sm);
23806
+ height: 100%;
23807
+ `;
23808
+ var segmentedControlLabelTextStyles = import_react147.css``;
23809
+
23810
+ // src/components/SegmentedControl/SegmentedControl.tsx
23811
+ var import_jsx_runtime128 = require("@emotion/react/jsx-runtime");
23812
+ var SegmentedControl = ({
23813
+ name,
23814
+ options,
23815
+ value,
23816
+ onChange,
23817
+ noCheckmark = false,
23818
+ disabled: disabled2 = false,
23819
+ orientation = "horizontal",
23820
+ size = "md",
23821
+ hideOptionText = false,
23822
+ iconSize = "1.5em",
23823
+ ...props
23824
+ }) => {
23825
+ const onOptionChange = (0, import_react149.useCallback)(
23826
+ (event) => {
23827
+ if (event.target.checked) {
23828
+ onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
23829
+ }
23830
+ },
23831
+ [options, onChange]
23832
+ );
23833
+ const sizeStyles = (0, import_react149.useMemo)(() => {
23834
+ const map = {
23835
+ sm: (0, import_react148.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
23836
+ md: (0, import_react148.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
23837
+ lg: (0, import_react148.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" }),
23838
+ xl: (0, import_react148.css)({ height: "calc(48px - 2px)", fontSize: "var(--fs-base)" })
23839
+ };
23840
+ return map[size];
23841
+ }, [size]);
23842
+ const isIconOnly = (0, import_react149.useMemo)(() => {
23843
+ return options.every((option) => option && option.icon && !option.label);
23844
+ }, [options]);
23845
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
23846
+ "div",
23847
+ {
23848
+ css: [segmentedControlStyles, orientation === "vertical" ? segmentedControlVerticalStyles : void 0],
23849
+ ...props,
23850
+ "data-testid": "segmented-control",
23851
+ children: options.map((option, index) => {
23852
+ var _a;
23853
+ if (!option) {
23854
+ return null;
23855
+ }
23856
+ const text = option.label ? option.label : option.icon ? null : String(option.value);
23857
+ const isDisabled = disabled2 || option.disabled;
23858
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
23859
+ "div",
23860
+ {
23861
+ css: segmentedControlItemStyles,
23862
+ "data-testid": option["data-testid"] ? option["data-testid"] : "container-segmented-control",
23863
+ children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
23864
+ "label",
23865
+ {
23866
+ css: [
23867
+ segmentedControlLabelStyles(option.value === value, isDisabled),
23868
+ sizeStyles,
23869
+ isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
23870
+ ],
23871
+ children: [
23872
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
23873
+ "input",
23874
+ {
23875
+ css: segmentedControlInputStyles,
23876
+ type: "radio",
23877
+ name,
23878
+ value: index,
23879
+ checked: option.value === value,
23880
+ onChange: onOptionChange,
23881
+ disabled: isDisabled
23882
+ }
23883
+ ),
23884
+ option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_CgCheck5.CgCheck, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
23885
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("span", { css: segmentedControlLabelContentStyles, children: [
23886
+ !option.icon ? null : /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Icon, { icon: option.icon, size: iconSize, iconColor: "currentColor" }),
23887
+ !text || hideOptionText ? null : /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { css: segmentedControlLabelTextStyles, children: text })
23888
+ ] })
23889
+ ]
23890
+ }
23891
+ )
23892
+ }
23893
+ ) }, JSON.stringify(option.value));
23894
+ })
23895
+ }
23896
+ );
23897
+ };
23898
+
24040
23899
  // src/components/Skeleton/Skeleton.tsx
24041
23900
  init_emotion_jsx_shim();
24042
23901
 
@@ -24053,7 +23912,7 @@ var skeletonStyles = import_react150.css`
24053
23912
  `;
24054
23913
 
24055
23914
  // src/components/Skeleton/Skeleton.tsx
24056
- var import_jsx_runtime130 = require("@emotion/react/jsx-runtime");
23915
+ var import_jsx_runtime129 = require("@emotion/react/jsx-runtime");
24057
23916
  var Skeleton = ({
24058
23917
  width = "100%",
24059
23918
  height = "1.25rem",
@@ -24061,7 +23920,7 @@ var Skeleton = ({
24061
23920
  circle = false,
24062
23921
  children,
24063
23922
  ...otherProps
24064
- }) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
23923
+ }) => /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
24065
23924
  "div",
24066
23925
  {
24067
23926
  css: [
@@ -24170,19 +24029,19 @@ var SwitchText = import_react151.css`
24170
24029
  `;
24171
24030
 
24172
24031
  // src/components/Switch/Switch.tsx
24173
- var import_jsx_runtime131 = require("@emotion/react/jsx-runtime");
24032
+ var import_jsx_runtime130 = require("@emotion/react/jsx-runtime");
24174
24033
  var Switch = React26.forwardRef(
24175
24034
  ({ label, infoText, toggleText, children, ...inputProps }, ref) => {
24176
24035
  let additionalText = infoText;
24177
24036
  if (infoText && toggleText) {
24178
24037
  additionalText = inputProps.checked ? toggleText : infoText;
24179
24038
  }
24180
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_jsx_runtime131.Fragment, { children: [
24181
- /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("label", { css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0], children: [
24182
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
24183
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("span", { css: SwitchInputLabel, children: label })
24039
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_jsx_runtime130.Fragment, { children: [
24040
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("label", { css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0], children: [
24041
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
24042
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { css: SwitchInputLabel, children: label })
24184
24043
  ] }),
24185
- additionalText ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("p", { css: SwitchText, children: additionalText }) : null,
24044
+ additionalText ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("p", { css: SwitchText, children: additionalText }) : null,
24186
24045
  children
24187
24046
  ] });
24188
24047
  }
@@ -24221,40 +24080,40 @@ var tableCellHead = import_react152.css`
24221
24080
  `;
24222
24081
 
24223
24082
  // src/components/Table/Table.tsx
24224
- var import_jsx_runtime132 = require("@emotion/react/jsx-runtime");
24083
+ var import_jsx_runtime131 = require("@emotion/react/jsx-runtime");
24225
24084
  var Table = React27.forwardRef(
24226
24085
  ({ children, cellPadding, ...otherProps }, ref) => {
24227
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("table", { ref, css: table({ cellPadding }), ...otherProps, children });
24086
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("table", { ref, css: table({ cellPadding }), ...otherProps, children });
24228
24087
  }
24229
24088
  );
24230
24089
  var TableHead = React27.forwardRef(
24231
24090
  ({ children, ...otherProps }, ref) => {
24232
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("thead", { ref, css: tableHead, ...otherProps, children });
24091
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("thead", { ref, css: tableHead, ...otherProps, children });
24233
24092
  }
24234
24093
  );
24235
24094
  var TableBody = React27.forwardRef(
24236
24095
  ({ children, ...otherProps }, ref) => {
24237
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("tbody", { ref, ...otherProps, children });
24096
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("tbody", { ref, ...otherProps, children });
24238
24097
  }
24239
24098
  );
24240
24099
  var TableFoot = React27.forwardRef(
24241
24100
  ({ children, ...otherProps }, ref) => {
24242
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("tfoot", { ref, ...otherProps, children });
24101
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("tfoot", { ref, ...otherProps, children });
24243
24102
  }
24244
24103
  );
24245
24104
  var TableRow = React27.forwardRef(
24246
24105
  ({ children, ...otherProps }, ref) => {
24247
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("tr", { ref, css: tableRow, ...otherProps, children });
24106
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("tr", { ref, css: tableRow, ...otherProps, children });
24248
24107
  }
24249
24108
  );
24250
24109
  var TableCellHead = React27.forwardRef(
24251
24110
  ({ children, ...otherProps }, ref) => {
24252
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("th", { ref, css: tableCellHead, ...otherProps, children });
24111
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("th", { ref, css: tableCellHead, ...otherProps, children });
24253
24112
  }
24254
24113
  );
24255
24114
  var TableCellData = React27.forwardRef(
24256
24115
  ({ children, ...otherProps }, ref) => {
24257
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("td", { ref, ...otherProps, children });
24116
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("td", { ref, ...otherProps, children });
24258
24117
  }
24259
24118
  );
24260
24119
 
@@ -24290,7 +24149,7 @@ var tabButtonGroupStyles = import_react153.css`
24290
24149
  `;
24291
24150
 
24292
24151
  // src/components/Tabs/Tabs.tsx
24293
- var import_jsx_runtime133 = require("@emotion/react/jsx-runtime");
24152
+ var import_jsx_runtime132 = require("@emotion/react/jsx-runtime");
24294
24153
  var useCurrentTab = () => {
24295
24154
  const context = (0, import_react154.useTabStore)();
24296
24155
  if (!context) {
@@ -24328,23 +24187,23 @@ var Tabs = ({
24328
24187
  tab.setSelectedId(selected);
24329
24188
  }
24330
24189
  }, [selected, tab]);
24331
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_react154.TabProvider, { store: tab, setSelectedId: onTabSelect, children });
24190
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_react154.TabProvider, { store: tab, setSelectedId: onTabSelect, children });
24332
24191
  };
24333
24192
  var TabButtonGroup = ({ children, ...props }) => {
24334
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_react154.TabList, { ...props, css: tabButtonGroupStyles, children });
24193
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_react154.TabList, { ...props, css: tabButtonGroupStyles, children });
24335
24194
  };
24336
24195
  var TabButton = ({
24337
24196
  children,
24338
24197
  id,
24339
24198
  ...props
24340
24199
  }) => {
24341
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_react154.Tab, { type: "button", id, ...props, css: tabButtonStyles, children });
24200
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_react154.Tab, { type: "button", id, ...props, css: tabButtonStyles, children });
24342
24201
  };
24343
24202
  var TabContent = ({
24344
24203
  children,
24345
24204
  ...props
24346
24205
  }) => {
24347
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_react154.TabPanel, { ...props, children });
24206
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_react154.TabPanel, { ...props, children });
24348
24207
  };
24349
24208
 
24350
24209
  // src/components/Toast/Toast.tsx
@@ -24577,9 +24436,9 @@ var toastContainerStyles = import_react156.css`
24577
24436
  `;
24578
24437
 
24579
24438
  // src/components/Toast/Toast.tsx
24580
- var import_jsx_runtime134 = require("@emotion/react/jsx-runtime");
24439
+ var import_jsx_runtime133 = require("@emotion/react/jsx-runtime");
24581
24440
  var ToastContainer = ({ limit = 4 }) => {
24582
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
24441
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
24583
24442
  import_react_toastify.ToastContainer,
24584
24443
  {
24585
24444
  css: toastContainerStyles,