@uniformdev/design-system 19.114.0 → 19.115.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 CHANGED
@@ -704,6 +704,15 @@ var input = (whiteSpaceWrap) => css2`
704
704
  font-size: var(--fs-sm);
705
705
  margin-right: var(--spacing-base);
706
706
  }
707
+
708
+ &[aria-invalid='true'] {
709
+ border-color: var(--action-destructive-default);
710
+ box-shadow: var(--elevation-100);
711
+
712
+ &:hover {
713
+ border-color: var(--action-destructive-hover);
714
+ }
715
+ }
707
716
  `;
708
717
  var inputError = css2`
709
718
  border-color: var(--action-destructive-default);
@@ -2013,6 +2022,27 @@ var listViewLong = GenIcon({
2013
2022
  }
2014
2023
  ]
2015
2024
  });
2025
+ var filterAdd = GenIcon({
2026
+ tag: "svg",
2027
+ attr: {
2028
+ role: "img",
2029
+ viewBox: "0 0 16 16",
2030
+ fill: "none",
2031
+ strokeWidth: ""
2032
+ },
2033
+ child: [
2034
+ {
2035
+ tag: "path",
2036
+ attr: {
2037
+ stroke: "currentColor",
2038
+ d: "M8 13.3334L6 14V8.33335L3.01333 5.04802C2.7903 4.80264 2.6667 4.48295 2.66666 4.15135V2.66669H13.3333V4.11469C13.3333 4.46828 13.1927 4.80736 12.9427 5.05735L10 8.00002V10M10.6667 12.6667H14.6667M12.6667 10.6667V14.6667",
2039
+ strokeLinejoin: "round",
2040
+ strokeLinecap: "round"
2041
+ },
2042
+ child: []
2043
+ }
2044
+ ]
2045
+ });
2016
2046
  var customIcons = {
2017
2047
  "rectangle-rounded": rectangleRoundedIcon,
2018
2048
  card: cardIcon,
@@ -2039,7 +2069,8 @@ var customIcons = {
2039
2069
  "diamond-fill": diamondFill,
2040
2070
  "magic-wand": magicWand,
2041
2071
  "list-view-short": listViewShort,
2042
- "list-view-long": listViewLong
2072
+ "list-view-long": listViewLong,
2073
+ "filter-add": filterAdd
2043
2074
  };
2044
2075
 
2045
2076
  // src/components/AddListButton/AddListButton.styles.ts
@@ -20057,146 +20088,1215 @@ var ProgressListItem = ({
20057
20088
  ] });
20058
20089
  };
20059
20090
 
20060
- // src/components/SegmentedControl/SegmentedControl.tsx
20061
- import { css as css93 } from "@emotion/react";
20062
- import { CgCheck as CgCheck4 } from "@react-icons/all-files/cg/CgCheck";
20063
- import { useCallback as useCallback10, useMemo as useMemo6 } from "react";
20091
+ // src/components/SearchAndFilter/constants.ts
20092
+ var NUMBER_OPERATORS = [
20093
+ {
20094
+ label: "equals...",
20095
+ symbol: "=",
20096
+ value: "eq",
20097
+ editorType: "number"
20098
+ },
20099
+ {
20100
+ label: "does not equal...",
20101
+ symbol: "\u2260",
20102
+ value: "neq",
20103
+ editorType: "number"
20104
+ },
20105
+ {
20106
+ label: "greater than...",
20107
+ symbol: ">",
20108
+ value: "gt",
20109
+ editorType: "number"
20110
+ },
20111
+ {
20112
+ label: "greater than or equal to...",
20113
+ symbol: "\u2265",
20114
+ value: "gte",
20115
+ editorType: "number"
20116
+ },
20117
+ {
20118
+ label: "less than...",
20119
+ symbol: "<",
20120
+ value: "lt",
20121
+ editorType: "number"
20122
+ },
20123
+ {
20124
+ label: "less than or equal to...",
20125
+ symbol: "\u2264",
20126
+ value: "lte",
20127
+ editorType: "number"
20128
+ },
20129
+ {
20130
+ label: "is empty...",
20131
+ value: "ndef",
20132
+ editorType: "empty"
20133
+ },
20134
+ {
20135
+ label: "is between...",
20136
+ value: "between",
20137
+ editorType: "numberRange"
20138
+ },
20139
+ {
20140
+ label: "is not empty...",
20141
+ value: "def",
20142
+ editorType: "empty"
20143
+ }
20144
+ ];
20145
+ var DATE_OPERATORS = [
20146
+ {
20147
+ label: "is...",
20148
+ value: "eq",
20149
+ editorType: "date"
20150
+ },
20151
+ {
20152
+ label: "is between...",
20153
+ value: "between",
20154
+ editorType: "dateRange"
20155
+ },
20156
+ {
20157
+ label: "is before...",
20158
+ value: "lt",
20159
+ editorType: "date"
20160
+ },
20161
+ {
20162
+ label: "is after...",
20163
+ value: "gt",
20164
+ editorType: "date"
20165
+ },
20166
+ {
20167
+ label: "is on or before...",
20168
+ value: "lte",
20169
+ editorType: "date"
20170
+ },
20171
+ {
20172
+ label: "is on or after...",
20173
+ value: "gte",
20174
+ editorType: "date"
20175
+ },
20176
+ {
20177
+ label: "is empty...",
20178
+ value: "ndef",
20179
+ editorType: "empty"
20180
+ },
20181
+ {
20182
+ label: "is not...",
20183
+ value: "neq",
20184
+ editorType: "date"
20185
+ },
20186
+ {
20187
+ label: "is not empty...",
20188
+ value: "def",
20189
+ editorType: "empty"
20190
+ }
20191
+ ];
20192
+ var TEXTBOX_OPERATORS = [
20193
+ {
20194
+ label: "is...",
20195
+ value: "eq",
20196
+ editorType: "text"
20197
+ },
20198
+ {
20199
+ label: "is empty...",
20200
+ value: "ndef",
20201
+ editorType: "empty"
20202
+ },
20203
+ {
20204
+ label: "contains...",
20205
+ value: "match",
20206
+ editorType: "text"
20207
+ },
20208
+ {
20209
+ label: "is not...",
20210
+ value: "neq",
20211
+ editorType: "text"
20212
+ },
20213
+ {
20214
+ label: "is not empty...",
20215
+ value: "def",
20216
+ editorType: "empty"
20217
+ }
20218
+ ];
20219
+ var RICHTEXT_OPERATORS = [
20220
+ {
20221
+ label: "is empty...",
20222
+ value: "ndef",
20223
+ editorType: "empty"
20224
+ },
20225
+ {
20226
+ label: "contains...",
20227
+ value: "match",
20228
+ editorType: "text"
20229
+ },
20230
+ {
20231
+ label: "is not empty...",
20232
+ value: "def",
20233
+ editorType: "empty"
20234
+ }
20235
+ ];
20236
+ var CHECKBOX_OPERATORS = [
20237
+ {
20238
+ label: "is checked...",
20239
+ value: "def",
20240
+ editorType: "empty"
20241
+ },
20242
+ {
20243
+ label: "is not checked...",
20244
+ value: "ndef",
20245
+ editorType: "empty"
20246
+ }
20247
+ ];
20248
+ var SYSTEM_FIELD_OPERATORS = [
20249
+ {
20250
+ label: "is...",
20251
+ value: "eq",
20252
+ editorType: "singleChoice"
20253
+ },
20254
+ {
20255
+ label: "is any of...",
20256
+ value: "in",
20257
+ editorType: "multiChoice"
20258
+ },
20259
+ {
20260
+ label: "is not...",
20261
+ value: "neq",
20262
+ editorType: "singleChoice"
20263
+ },
20264
+ {
20265
+ label: "is none of...",
20266
+ value: "nin",
20267
+ editorType: "multiChoice"
20268
+ }
20269
+ ];
20064
20270
 
20065
- // src/components/SegmentedControl/SegmentedControl.styles.ts
20271
+ // src/components/SearchAndFilter/styles/SearchAndFilter.styles.ts
20066
20272
  import { css as css92 } from "@emotion/react";
20067
- var segmentedControlStyles = css92`
20068
- --segmented-control-rounded-value: var(--rounded-base);
20069
- --segmented-control-border-width: 1px;
20070
- --segmented-control-selected-color: var(--brand-secondary-3);
20071
- --segmented-control-first-border-radius: var(--segmented-control-rounded-value) 0 0
20072
- var(--segmented-control-rounded-value);
20073
- --segmented-control-last-border-radius: 0 var(--segmented-control-rounded-value)
20074
- var(--segmented-control-rounded-value) 0;
20273
+ var SearchAndFilterContainer = css92``;
20274
+ var SearchAndFilterControlsWrapper = css92`
20275
+ align-items: stretch;
20276
+ display: grid;
20277
+ grid-template-columns: auto 1fr 1fr;
20278
+ gap: var(--spacing-base);
20279
+ `;
20280
+ var ConditionalFilterRow = css92`
20281
+ display: grid;
20282
+ grid-template-columns: 35px 1fr;
20283
+ gap: var(--spacing-sm);
20284
+ padding: 0 var(--spacing-sm);
20285
+ margin-left: var(--spacing-base);
20075
20286
 
20076
- position: relative;
20077
- display: flex;
20078
- justify-content: flex-start;
20079
- width: fit-content;
20080
- background-color: var(--gray-300);
20081
- padding: var(--segmented-control-border-width);
20082
- gap: var(--segmented-control-border-width);
20083
- border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
20084
- font-size: var(--fs-xs);
20287
+ ${cq("380px")} {
20288
+ align-items: center;
20289
+ }
20290
+
20291
+ &:first-of-type {
20292
+ margin-left: 0;
20293
+ grid-template-columns: 50px 1fr;
20294
+ }
20295
+
20296
+ @media (prefers-reduced-motion: no-preference) {
20297
+ animation: ${fadeInLtr} var(--duration-fast) var(--timing-ease-out);
20298
+ }
20085
20299
  `;
20086
- var segmentedControlVerticalStyles = css92`
20300
+ var ConditionalInputRow = css92`
20301
+ display: flex;
20302
+ gap: var(--spacing-sm);
20087
20303
  flex-direction: column;
20088
- --segmented-control-first-border-radius: var(--segmented-control-rounded-value)
20089
- var(--segmented-control-rounded-value) 0 0;
20090
- --segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
20091
- var(--segmented-control-rounded-value);
20092
- `;
20093
- var segmentedControlItemStyles = css92`
20094
- &:first-of-type label {
20095
- border-radius: var(--segmented-control-first-border-radius);
20304
+
20305
+ ${cq("380px")} {
20306
+ align-items: center;
20307
+ flex-direction: row;
20096
20308
  }
20097
- &:last-of-type label {
20098
- border-radius: var(--segmented-control-last-border-radius);
20309
+ ${cq("580px")} {
20310
+ display: grid;
20311
+ grid-template-columns: repeat(4, minmax(160px, auto)) 32px;
20099
20312
  }
20100
20313
  `;
20101
- var segmentedControlInputStyles = css92`
20102
- ${accessibleHidden}
20314
+ var SearchInput = css92`
20315
+ ${input("nowrap")}
20316
+ border-radius: var(--rounded-full);
20317
+ padding: var(--spacing-sm) var(--spacing-base);
20318
+ font-size: var(--fs-sm);
20319
+ padding-right: var(--spacing-2xl);
20103
20320
  `;
20104
- var segmentedControlLabelStyles = (checked, disabled2) => css92`
20105
- position: relative;
20106
- display: flex;
20321
+ var FilterButton = css92`
20107
20322
  align-items: center;
20108
- justify-content: center;
20109
- height: 2rem;
20110
- padding-inline: var(--spacing-base);
20111
- background-color: white;
20112
- transition-property: background-color, color, box-shadow;
20113
- transition-duration: var(--duration-xfast);
20114
- transition-timing-function: ease-in-out;
20115
- z-index: 1;
20116
- cursor: pointer;
20117
-
20118
- &:has(:checked:not(:disabled)) {
20119
- background-color: var(--segmented-control-selected-color);
20120
- outline: var(--segmented-control-border-width) solid var(--segmented-control-selected-color);
20121
- box-shadow: 0 0.43em 1.7em 0 rgba(0, 0, 0, 0.15);
20122
- color: white;
20123
- -webkit-text-stroke-width: thin;
20124
- z-index: 0;
20125
- }
20323
+ background: var(--white);
20324
+ border: 1px solid var(--gray-300);
20325
+ border-radius: var(--rounded-full);
20326
+ color: var(--typography-base);
20327
+ display: flex;
20328
+ gap: var(--spacing-sm);
20329
+ padding: var(--spacing-sm) var(--spacing-base);
20330
+ transition: color var(--duration-fast) var(--timing-ease-out),
20331
+ background-color var(--duration-fast) var(--timing-ease-out);
20126
20332
 
20127
- &:hover:not(:has(:disabled, :checked)) {
20128
- background-color: var(--gray-100);
20333
+ svg {
20334
+ color: var(--gray-300);
20335
+ transition: color var(--duration-fast) var(--timing-ease-out);
20129
20336
  }
20130
20337
 
20131
- &:has(:disabled) {
20132
- color: var(--gray-400);
20133
- cursor: default;
20134
- }
20338
+ &:focus,
20339
+ &:hover {
20340
+ outline: none;
20341
+ background: var(--gray-300);
20135
20342
 
20136
- &:has(:checked:disabled) {
20137
- color: var(--gray-50);
20138
- background-color: var(--gray-400);
20343
+ svg {
20344
+ color: var(--typography-base);
20345
+ }
20139
20346
  }
20140
20347
 
20141
- // Firefox fallback using emotion variables
20142
- // we can delete this whole block of code and variables in SegmentedControl.tsx
20143
- // once Firefox supports :has selector
20144
- @supports not selector(:has(*)) {
20145
- // equivalent to &:has(:checked:not(:disabled))
20146
- ${checked && !disabled2 ? `
20147
- background-color: var(--segmented-control-selected-color);
20148
- outline: var(--segmented-control-border-width) solid var(--segmented-control-selected-color);
20149
- box-shadow: 0 0.43em 1.7em 0 rgba(0, 0, 0, 0.15);
20150
- color: white;
20151
- -webkit-text-stroke-width: thin;
20152
- z-index: 0;` : void 0}
20348
+ :where([aria-expanded='true']) {
20349
+ background: var(--purple-rain-100);
20153
20350
 
20154
- // equivalent to &:hover:not(:has(:disabled, :checked))
20155
- &:hover {
20156
- ${!checked && !disabled2 ? `background-color: var(--gray-100);` : void 0}
20351
+ svg {
20352
+ color: var(--typography-base);
20157
20353
  }
20158
-
20159
- // equivalent to &:has(:disabled)
20160
- ${disabled2 ? `
20161
- color: var(--gray-400);
20162
- cursor: default;` : void 0}
20163
-
20164
- // equivalent to &:has(:checked:disabled)
20165
- ${checked && disabled2 && `
20166
- color: var(--gray-50);
20167
- background-color: var(--gray-400);
20168
- `}
20169
20354
  }
20170
20355
  `;
20171
- var segmentedControlLabelIconOnlyStyles = css92`
20172
- padding-inline: 0.5em;
20356
+ var FilterButtonWithOptions = css92`
20357
+ background: var(--purple-rain-100);
20358
+ color: var(--typography-base);
20359
+ svg {
20360
+ color: var(--typography-base);
20361
+ }
20173
20362
  `;
20174
- var segmentedControlLabelCheckStyles = css92`
20175
- opacity: 0.5;
20363
+ var SearchIcon = css92`
20364
+ color: var(--icon-color);
20365
+ position: absolute;
20366
+ inset: 0 var(--spacing-base) 0 auto;
20367
+ margin: auto;
20368
+ transition: color var(--duration-fast) var(--timing-ease-out);
20176
20369
  `;
20177
- var segmentedControlLabelContentStyles = css92`
20178
- display: flex;
20370
+ var AddConditionalBtn = css92`
20179
20371
  align-items: center;
20180
- justify-content: center;
20372
+ background: transparent;
20373
+ border: none;
20374
+ color: var(--primary-action-default);
20375
+ display: flex;
20181
20376
  gap: var(--spacing-sm);
20182
- height: 100%;
20377
+ transition: color var(--duration-fast) var(--timing-ease-out);
20378
+ padding: 0;
20379
+ font-size: var(--fs-sm);
20380
+
20381
+ &:hover,
20382
+ &:focus {
20383
+ color: var(--primary-action-hover);
20384
+ }
20183
20385
  `;
20184
- var segmentedControlLabelTextStyles = css92``;
20386
+ var Title = css92`
20387
+ color: var(--typography-light);
20388
+ `;
20389
+ var ResetConditionsBtn = css92`
20390
+ background: transparent;
20391
+ border: none;
20392
+ color: var(--action-destructive-default);
20393
+ transition: color var(--duration-fast) var(--timing-ease-out);
20394
+ padding: 0;
20185
20395
 
20186
- // src/components/SegmentedControl/SegmentedControl.tsx
20187
- import { jsx as jsx117, jsxs as jsxs79 } from "@emotion/react/jsx-runtime";
20188
- var SegmentedControl = ({
20189
- name,
20190
- options,
20191
- value,
20192
- onChange,
20193
- noCheckmark = false,
20194
- disabled: disabled2 = false,
20195
- orientation = "horizontal",
20196
- size = "md",
20396
+ &:hover,
20397
+ &:focus {
20398
+ color: var(--action-destructive-hover);
20399
+ }
20400
+ `;
20401
+ var IconBtn = css92`
20402
+ background: transparent;
20403
+ border: none;
20404
+ padding: var(--spacing-sm);
20405
+ `;
20406
+ var CloseBtn = css92`
20407
+ color: var(--gray-500);
20408
+ background: transparent;
20409
+ border: none;
20410
+ padding: 0;
20411
+ position: absolute;
20412
+ top: var(--spacing-base);
20413
+ right: var(--spacing-base);
20414
+ `;
20415
+ var SearchAndFilterOptionsContainer = css92`
20416
+ background: var(--gray-50);
20417
+ border: 1px solid var(--gray-300);
20418
+ border-radius: var(--rounded-base);
20419
+ container-type: inline-size;
20420
+ display: flex;
20421
+ flex-direction: column;
20422
+ gap: var(--spacing-sm);
20423
+ padding: var(--spacing-md) var(--spacing-md) var(--spacing-base);
20424
+ will-change: height;
20425
+ position: relative;
20426
+ z-index: var(--z-50);
20427
+ `;
20428
+ var SearchAndFilterOptionsInnerContainer = css92`
20429
+ display: flex;
20430
+ flex-direction: column;
20431
+ gap: var(--spacing-sm);
20432
+ // TODO: this is nice for responsive but is causing issue with the dropdown
20433
+ // ${scrollbarStyles}
20434
+ // overflow-x: auto;
20435
+ // overflow-y: visible;
20436
+ `;
20437
+ var SearchAndFilterButtonGroup = css92`
20438
+ margin-top: var(--spacing-base);
20439
+ `;
20440
+ var SelectOpen = css92`
20441
+ position: relative;
20442
+ .input-combobox__menu {
20443
+ background: red;
20444
+ z-index: 99999 !important;
20445
+ }
20446
+ `;
20447
+
20448
+ // src/components/SearchAndFilter/FilterButton.tsx
20449
+ import { jsx as jsx117, jsxs as jsxs79 } from "@emotion/react/jsx-runtime";
20450
+ var FilterButton2 = ({ text = "Filters", filterCount, ...props }) => {
20451
+ return /* @__PURE__ */ jsxs79(
20452
+ "button",
20453
+ {
20454
+ type: "button",
20455
+ css: [FilterButton, filterCount ? FilterButtonWithOptions : void 0],
20456
+ ...props,
20457
+ children: [
20458
+ /* @__PURE__ */ jsx117(Icon, { icon: "filter-add", iconColor: "currentColor", size: "1rem" }),
20459
+ text,
20460
+ filterCount ? /* @__PURE__ */ jsx117(Counter, { count: filterCount, bgColor: "var(--white)" }) : null
20461
+ ]
20462
+ }
20463
+ );
20464
+ };
20465
+
20466
+ // src/components/SearchAndFilter/hooks/useSearchAndFilter.tsx
20467
+ import {
20468
+ createContext as createContext6,
20469
+ useCallback as useCallback10,
20470
+ useContext as useContext7,
20471
+ useDeferredValue as useDeferredValue2,
20472
+ useEffect as useEffect17,
20473
+ useMemo as useMemo6,
20474
+ useState as useState15
20475
+ } from "react";
20476
+ import { jsx as jsx118 } from "@emotion/react/jsx-runtime";
20477
+ var SearchAndFilterContext = createContext6({
20478
+ searchTerm: "",
20479
+ setSearchTerm: () => {
20480
+ },
20481
+ filterVisibility: false,
20482
+ setFilterVisibility: () => {
20483
+ },
20484
+ filters: [],
20485
+ setFilters: () => {
20486
+ },
20487
+ handleAddFilter: () => {
20488
+ },
20489
+ handleResetFilters: () => {
20490
+ },
20491
+ handleDeleteFilter: () => {
20492
+ },
20493
+ filterOptions: [],
20494
+ validFilterQuery: []
20495
+ });
20496
+ var SearchAndFilterProvider = ({
20497
+ filters,
20498
+ filterOptions,
20499
+ onChange,
20500
+ children
20501
+ }) => {
20502
+ const [searchTerm, setSearchTerm] = useState15("");
20503
+ const deferredSearchTerm = useDeferredValue2(searchTerm);
20504
+ const [filterVisibility, setFilterVisibility] = useState15(false);
20505
+ const handleSearchTerm = useCallback10((term) => setSearchTerm(term), [setSearchTerm]);
20506
+ const handleToggleFilterVisibilty = useCallback10(
20507
+ (visible) => setFilterVisibility(visible),
20508
+ [setFilterVisibility]
20509
+ );
20510
+ const handleAddFilter = useCallback10(() => {
20511
+ onChange([...filters, { field: "", operator: "", value: "" }]);
20512
+ }, [filters, onChange]);
20513
+ const handleResetFilters = useCallback10(() => {
20514
+ onChange([]);
20515
+ }, [onChange]);
20516
+ const handleDeleteFilter = useCallback10(
20517
+ (index) => {
20518
+ const remainingFilters = filters.filter((_, i) => i !== index);
20519
+ onChange(remainingFilters);
20520
+ },
20521
+ [filters, onChange]
20522
+ );
20523
+ const validFilterQuery = useMemo6(() => {
20524
+ const hasValidFilters = filters.every((f) => f.field && f.operator && f.value);
20525
+ if (hasValidFilters) {
20526
+ return filters;
20527
+ }
20528
+ }, [filters]);
20529
+ useEffect17(() => {
20530
+ if (filterVisibility) {
20531
+ const handleEscKeyFilterClose = (e) => {
20532
+ if (e.key === "Escape") {
20533
+ setFilterVisibility(false);
20534
+ }
20535
+ };
20536
+ document.addEventListener("keydown", (e) => handleEscKeyFilterClose(e));
20537
+ return () => {
20538
+ document.removeEventListener("keydown", (e) => handleEscKeyFilterClose(e));
20539
+ };
20540
+ }
20541
+ }, [filterVisibility, setFilterVisibility]);
20542
+ return /* @__PURE__ */ jsx118(
20543
+ SearchAndFilterContext.Provider,
20544
+ {
20545
+ value: {
20546
+ searchTerm: deferredSearchTerm,
20547
+ setSearchTerm: (e) => handleSearchTerm(e),
20548
+ filterVisibility,
20549
+ setFilterVisibility: (e) => handleToggleFilterVisibilty(e),
20550
+ filters,
20551
+ setFilters: (e) => onChange(e),
20552
+ handleAddFilter: () => handleAddFilter(),
20553
+ handleResetFilters: () => handleResetFilters(),
20554
+ handleDeleteFilter: (index) => handleDeleteFilter(index),
20555
+ filterOptions,
20556
+ validFilterQuery
20557
+ },
20558
+ children: /* @__PURE__ */ jsx118(VerticalRhythm, { children })
20559
+ }
20560
+ );
20561
+ };
20562
+ var useSearchAndFilter = () => {
20563
+ const value = useContext7(SearchAndFilterContext);
20564
+ return { ...value };
20565
+ };
20566
+
20567
+ // src/components/SearchAndFilter/FilterControls.tsx
20568
+ import { Fragment as Fragment19, jsx as jsx119, jsxs as jsxs80 } from "@emotion/react/jsx-runtime";
20569
+ var FilterControls = ({ children }) => {
20570
+ const { setFilterVisibility, filterVisibility, setSearchTerm, validFilterQuery } = useSearchAndFilter();
20571
+ return /* @__PURE__ */ jsxs80(Fragment19, { children: [
20572
+ /* @__PURE__ */ jsx119(
20573
+ FilterButton2,
20574
+ {
20575
+ "aria-controls": "search-and-filter-options",
20576
+ "aria-label": "filter options",
20577
+ "aria-haspopup": "true",
20578
+ "aria-expanded": filterVisibility,
20579
+ filterCount: validFilterQuery == null ? void 0 : validFilterQuery.length,
20580
+ onClick: () => setFilterVisibility(!filterVisibility)
20581
+ }
20582
+ ),
20583
+ /* @__PURE__ */ jsx119(
20584
+ InputKeywordSearch,
20585
+ {
20586
+ type: "search",
20587
+ placeholder: "Search...",
20588
+ onSearchTextChanged: (e) => setSearchTerm(e),
20589
+ compact: true,
20590
+ rounded: true
20591
+ }
20592
+ ),
20593
+ children
20594
+ ] });
20595
+ };
20596
+
20597
+ // src/components/SearchAndFilter/FilterEditor.tsx
20598
+ import { css as css94 } from "@emotion/react";
20599
+ import { useEffect as useEffect18, useState as useState16 } from "react";
20600
+
20601
+ // src/components/Validation/StatusBullet.styles.ts
20602
+ import { css as css93 } from "@emotion/react";
20603
+ var StatusBulletContainer = css93`
20604
+ align-items: center;
20605
+ align-self: center;
20606
+ color: var(--gray-500);
20607
+ display: inline-flex;
20608
+ font-weight: var(--fw-regular);
20609
+ gap: var(--spacing-xs);
20610
+ line-height: 1;
20611
+ position: relative;
20612
+ text-transform: lowercase;
20613
+
20614
+ &:before {
20615
+ border-radius: var(--rounded-full);
20616
+ content: '';
20617
+ display: block;
20618
+ }
20619
+ `;
20620
+ var StatusBulletBase = css93`
20621
+ font-size: var(--fs-sm);
20622
+ &:before {
20623
+ width: var(--fs-xs);
20624
+ height: var(--fs-xs);
20625
+ }
20626
+ `;
20627
+ var StatusBulletSmall = css93`
20628
+ font-size: var(--fs-xs);
20629
+ &:before {
20630
+ width: var(--fs-xxs);
20631
+ height: var(--fs-xxs);
20632
+ }
20633
+ `;
20634
+ var StatusDraft = css93`
20635
+ &:before {
20636
+ background: var(--white);
20637
+ box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
20638
+ }
20639
+ `;
20640
+ var StatusModified = css93`
20641
+ &:before {
20642
+ background: linear-gradient(to right, var(--white) 50%, var(--primary-action-default) 50% 100%);
20643
+ box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
20644
+ }
20645
+ `;
20646
+ var StatusError = css93`
20647
+ color: var(--error);
20648
+ &:before {
20649
+ /* TODO: replace this with an svg icon */
20650
+ background: linear-gradient(
20651
+ 133deg,
20652
+ var(--error) 41%,
20653
+ var(--white) 42%,
20654
+ var(--white) 58%,
20655
+ var(--error) 59%
20656
+ );
20657
+ }
20658
+ `;
20659
+ var StatusPublished = css93`
20660
+ &:before {
20661
+ background: var(--primary-action-default);
20662
+ }
20663
+ `;
20664
+ var StatusOrphan = css93`
20665
+ &:before {
20666
+ background: var(--brand-secondary-5);
20667
+ }
20668
+ `;
20669
+ var StatusUnknown = css93`
20670
+ &:before {
20671
+ background: var(--gray-800);
20672
+ }
20673
+ `;
20674
+
20675
+ // src/components/Validation/StatusBullet.tsx
20676
+ import { jsx as jsx120 } from "@emotion/react/jsx-runtime";
20677
+ var StatusBullet = ({
20678
+ status,
20679
+ hideText = false,
20680
+ size = "base",
20681
+ message,
20682
+ ...props
20683
+ }) => {
20684
+ const currentStateStyles = {
20685
+ Error: StatusError,
20686
+ Modified: StatusModified,
20687
+ Unsaved: StatusDraft,
20688
+ Orphan: StatusOrphan,
20689
+ Published: StatusPublished,
20690
+ Draft: StatusDraft,
20691
+ Previous: StatusDraft,
20692
+ Unknown: StatusUnknown
20693
+ };
20694
+ const statusSize = size === "base" ? StatusBulletBase : StatusBulletSmall;
20695
+ return /* @__PURE__ */ jsx120(
20696
+ "span",
20697
+ {
20698
+ role: "status",
20699
+ css: [StatusBulletContainer, currentStateStyles[status], statusSize],
20700
+ title: message != null ? message : status,
20701
+ ...props,
20702
+ children: hideText ? null : message ? message : status
20703
+ }
20704
+ );
20705
+ };
20706
+
20707
+ // src/components/SearchAndFilter/FilterEditor.tsx
20708
+ import { Fragment as Fragment20, jsx as jsx121, jsxs as jsxs81 } from "@emotion/react/jsx-runtime";
20709
+ var FilterMultiChoiceEditor = ({
20710
+ value,
20711
+ options,
20712
+ ...props
20713
+ }) => {
20714
+ return /* @__PURE__ */ jsx121(
20715
+ InputComboBox,
20716
+ {
20717
+ ...props,
20718
+ options,
20719
+ isMulti: true,
20720
+ isClearable: true,
20721
+ onChange: (e) => {
20722
+ var _a;
20723
+ return props.onChange((_a = e.map((item) => item.value)) != null ? _a : []);
20724
+ }
20725
+ }
20726
+ );
20727
+ };
20728
+ var FilterSingleChoiceEditor = ({
20729
+ options,
20730
+ value,
20731
+ ...props
20732
+ }) => {
20733
+ return /* @__PURE__ */ jsx121(
20734
+ InputComboBox,
20735
+ {
20736
+ options,
20737
+ isClearable: true,
20738
+ ...props,
20739
+ onChange: (e) => {
20740
+ var _a;
20741
+ return props.onChange((_a = e == null ? void 0 : e.value) != null ? _a : "");
20742
+ }
20743
+ }
20744
+ );
20745
+ };
20746
+ var CustomOptions = ({ label, value }) => {
20747
+ return /* @__PURE__ */ jsx121(StatusBullet, { status: label, message: value });
20748
+ };
20749
+ var StatusMultiEditor = ({
20750
+ options,
20751
+ value,
20752
+ ...props
20753
+ }) => {
20754
+ return /* @__PURE__ */ jsx121(
20755
+ InputComboBox,
20756
+ {
20757
+ options,
20758
+ isMulti: true,
20759
+ ...props,
20760
+ onChange: (e) => {
20761
+ var _a;
20762
+ return props.onChange((_a = e.map((item) => item.value)) != null ? _a : []);
20763
+ },
20764
+ formatOptionLabel: CustomOptions
20765
+ }
20766
+ );
20767
+ };
20768
+ var StatusSingleEditor = ({
20769
+ options,
20770
+ value,
20771
+ ...props
20772
+ }) => {
20773
+ return /* @__PURE__ */ jsx121(
20774
+ InputComboBox,
20775
+ {
20776
+ options,
20777
+ ...props,
20778
+ onChange: (e) => {
20779
+ var _a;
20780
+ return props.onChange((_a = e == null ? void 0 : e.value) != null ? _a : "");
20781
+ },
20782
+ formatOptionLabel: CustomOptions
20783
+ }
20784
+ );
20785
+ };
20786
+ var TextEditor = ({ onChange, ariaLabel }) => {
20787
+ return /* @__PURE__ */ jsx121(
20788
+ Input,
20789
+ {
20790
+ showLabel: false,
20791
+ "aria-label": ariaLabel,
20792
+ onChange: (e) => onChange(e.currentTarget.value),
20793
+ placeholder: "Enter phrase to search\u2026"
20794
+ }
20795
+ );
20796
+ };
20797
+ var NumberRangeEditor = ({ onChange, ...props }) => {
20798
+ const [minValue, setMinValue] = useState16("");
20799
+ const [maxValue, setMaxValue] = useState16("");
20800
+ const [error, setError] = useState16("");
20801
+ useEffect18(() => {
20802
+ if (!maxValue && !minValue) {
20803
+ return;
20804
+ }
20805
+ const max = Number(maxValue);
20806
+ const min = Number(minValue);
20807
+ if (max < min || min > max) {
20808
+ setError("Please enter a valid numeric range");
20809
+ onChange([]);
20810
+ return;
20811
+ }
20812
+ if (maxValue && !minValue || minValue && !maxValue) {
20813
+ setError("Please enter both a low and high number");
20814
+ onChange([]);
20815
+ return;
20816
+ }
20817
+ setError("");
20818
+ onChange([minValue, maxValue]);
20819
+ }, [maxValue, minValue, setError]);
20820
+ return /* @__PURE__ */ jsxs81(Fragment20, { children: [
20821
+ /* @__PURE__ */ jsx121(
20822
+ Input,
20823
+ {
20824
+ ...props,
20825
+ type: "number",
20826
+ showLabel: false,
20827
+ min: 0,
20828
+ placeholder: "Low",
20829
+ onChange: (e) => setMinValue(e.currentTarget.value),
20830
+ "aria-invalid": !error ? false : true
20831
+ }
20832
+ ),
20833
+ /* @__PURE__ */ jsx121(
20834
+ Input,
20835
+ {
20836
+ ...props,
20837
+ type: "number",
20838
+ showLabel: false,
20839
+ min: 0,
20840
+ placeholder: "High",
20841
+ onChange: (e) => setMaxValue(e.currentTarget.value),
20842
+ "aria-invalid": !error ? false : true
20843
+ }
20844
+ ),
20845
+ /* @__PURE__ */ jsx121(ErrorContainer, { errorMessage: error })
20846
+ ] });
20847
+ };
20848
+ var NumberEditor = ({ ariaLabel, onChange }) => {
20849
+ return /* @__PURE__ */ jsx121(
20850
+ Input,
20851
+ {
20852
+ "aria-label": ariaLabel,
20853
+ type: "number",
20854
+ showLabel: false,
20855
+ min: 0,
20856
+ onChange: (e) => onChange(e.currentTarget.value)
20857
+ }
20858
+ );
20859
+ };
20860
+ var DateEditor = ({ onChange, ...props }) => {
20861
+ return /* @__PURE__ */ jsx121(Input, { type: "date", ...props, showLabel: false, onChange: (e) => onChange(e.currentTarget.value) });
20862
+ };
20863
+ var DateRangeEditor = ({ ariaLabel, onChange }) => {
20864
+ const [minDateValue, setMinDateValue] = useState16("");
20865
+ const [maxDateValue, setMaxDateValue] = useState16("");
20866
+ const [error, setError] = useState16("");
20867
+ useEffect18(() => {
20868
+ if (!minDateValue || !maxDateValue) {
20869
+ return;
20870
+ }
20871
+ const minDate = new Date(minDateValue);
20872
+ const maxDate = new Date(maxDateValue);
20873
+ if (maxDate < minDate) {
20874
+ setError("The max date cannot be lower than the min date");
20875
+ onChange([]);
20876
+ return;
20877
+ }
20878
+ if (maxDate && !minDate) {
20879
+ setError("Please enter both a low and high date");
20880
+ onChange([]);
20881
+ return;
20882
+ }
20883
+ const minDateString = minDate.toDateString();
20884
+ const maxDateString = maxDate.toDateString();
20885
+ if (minDateString === maxDateString || maxDateString === minDateString) {
20886
+ setError("The min and max date cannot be the same");
20887
+ onChange([]);
20888
+ return;
20889
+ }
20890
+ if (minDate > maxDate) {
20891
+ setError("The min date cannot be higher than the max date");
20892
+ onChange([]);
20893
+ return;
20894
+ }
20895
+ setError("");
20896
+ onChange([minDateValue, maxDateValue]);
20897
+ }, [minDateValue, maxDateValue, setError]);
20898
+ return /* @__PURE__ */ jsxs81(Fragment20, { children: [
20899
+ /* @__PURE__ */ jsx121(
20900
+ Input,
20901
+ {
20902
+ "aria-label": `${ariaLabel}-min-date`,
20903
+ type: "date",
20904
+ showLabel: false,
20905
+ value: minDateValue,
20906
+ onChange: (e) => setMinDateValue(e.currentTarget.value),
20907
+ "aria-invalid": !error ? false : true
20908
+ }
20909
+ ),
20910
+ /* @__PURE__ */ jsx121(
20911
+ Input,
20912
+ {
20913
+ "aria-label": `${ariaLabel}-max-date`,
20914
+ type: "date",
20915
+ showLabel: false,
20916
+ value: maxDateValue,
20917
+ onChange: (e) => setMaxDateValue(e.currentTarget.value),
20918
+ "aria-invalid": !error ? false : true
20919
+ }
20920
+ ),
20921
+ /* @__PURE__ */ jsx121(ErrorContainer, { errorMessage: error })
20922
+ ] });
20923
+ };
20924
+ var FilterEditorRenderer = ({ editorType, ...props }) => {
20925
+ const Editor = filterMapper[editorType];
20926
+ if (!Editor) {
20927
+ return null;
20928
+ }
20929
+ if (editorType === "empty") {
20930
+ return null;
20931
+ }
20932
+ return /* @__PURE__ */ jsx121(Editor, { ...props });
20933
+ };
20934
+ var filterMapper = {
20935
+ multiChoice: FilterMultiChoiceEditor,
20936
+ singleChoice: FilterSingleChoiceEditor,
20937
+ date: DateEditor,
20938
+ dateRange: DateRangeEditor,
20939
+ text: TextEditor,
20940
+ numberRange: NumberRangeEditor,
20941
+ number: NumberEditor,
20942
+ statusMultiChoice: StatusMultiEditor,
20943
+ statusSingleChoice: StatusSingleEditor,
20944
+ empty: null
20945
+ };
20946
+ var ErrorContainer = ({ errorMessage }) => {
20947
+ return /* @__PURE__ */ jsx121(
20948
+ "div",
20949
+ {
20950
+ css: css94`
20951
+ grid-column: span 6;
20952
+ order: 6;
20953
+ `,
20954
+ children: /* @__PURE__ */ jsx121(FieldMessage, { errorMessage })
20955
+ }
20956
+ );
20957
+ };
20958
+
20959
+ // src/components/SearchAndFilter/FilterMenu.tsx
20960
+ import { Fragment as Fragment21, jsx as jsx122, jsxs as jsxs82 } from "@emotion/react/jsx-runtime";
20961
+ var SearchAndFilterOptionsContainer2 = ({
20962
+ buttonRow,
20963
+ children
20964
+ }) => {
20965
+ return /* @__PURE__ */ jsxs82("div", { css: SearchAndFilterOptionsContainer, children: [
20966
+ /* @__PURE__ */ jsx122("div", { css: SearchAndFilterOptionsInnerContainer, children }),
20967
+ buttonRow ? /* @__PURE__ */ jsx122(
20968
+ HorizontalRhythm,
20969
+ {
20970
+ css: SearchAndFilterButtonGroup,
20971
+ gap: "sm",
20972
+ align: "center",
20973
+ justify: "space-between",
20974
+ children: buttonRow
20975
+ }
20976
+ ) : null
20977
+ ] });
20978
+ };
20979
+ var FilterMenu = ({
20980
+ id,
20981
+ addButtonText = "add condition",
20982
+ isAddDisabled,
20983
+ resetButtonText = "reset filters",
20984
+ filterTitle = "Show records",
20985
+ children
20986
+ }) => {
20987
+ const { filterVisibility, handleAddFilter, handleResetFilters, setFilterVisibility, validFilterQuery } = useSearchAndFilter();
20988
+ return /* @__PURE__ */ jsx122(VerticalRhythm, { gap: "sm", "aria-haspopup": "true", id, children: filterVisibility ? /* @__PURE__ */ jsxs82(
20989
+ SearchAndFilterOptionsContainer2,
20990
+ {
20991
+ buttonRow: /* @__PURE__ */ jsxs82(Fragment21, { children: [
20992
+ /* @__PURE__ */ jsxs82(
20993
+ "button",
20994
+ {
20995
+ type: "button",
20996
+ css: AddConditionalBtn,
20997
+ onClick: handleAddFilter,
20998
+ disabled: isAddDisabled,
20999
+ children: [
21000
+ /* @__PURE__ */ jsx122(Icon, { icon: "math-plus", iconColor: "gray", size: "1rem" }),
21001
+ addButtonText
21002
+ ]
21003
+ }
21004
+ ),
21005
+ (validFilterQuery == null ? void 0 : validFilterQuery.length) ? /* @__PURE__ */ jsx122(
21006
+ "button",
21007
+ {
21008
+ type: "button",
21009
+ css: ResetConditionsBtn,
21010
+ onClick: () => {
21011
+ handleResetFilters();
21012
+ setFilterVisibility(false);
21013
+ },
21014
+ children: resetButtonText
21015
+ }
21016
+ ) : null
21017
+ ] }),
21018
+ children: [
21019
+ /* @__PURE__ */ jsx122("span", { css: Title, children: filterTitle }),
21020
+ /* @__PURE__ */ jsx122(
21021
+ "button",
21022
+ {
21023
+ type: "button",
21024
+ "aria-label": "close filters",
21025
+ css: [CloseBtn],
21026
+ onClick: () => setFilterVisibility(!filterVisibility),
21027
+ children: /* @__PURE__ */ jsx122(Icon, { icon: "close", iconColor: "currentColor", size: "1.1rem" })
21028
+ }
21029
+ ),
21030
+ children
21031
+ ]
21032
+ }
21033
+ ) : null });
21034
+ };
21035
+
21036
+ // src/components/SearchAndFilter/FilterItem.tsx
21037
+ import { jsx as jsx123, jsxs as jsxs83 } from "@emotion/react/jsx-runtime";
21038
+ var FilterItem = ({
21039
+ index,
21040
+ paramOptions,
21041
+ operatorOptions,
21042
+ valueOptions,
21043
+ onParamChange,
21044
+ onOperatorChange,
21045
+ onValueChange
21046
+ }) => {
21047
+ var _a, _b;
21048
+ const { filters, handleDeleteFilter } = useSearchAndFilter();
21049
+ const label = filters[index].field !== "" ? filters[index].field : "unknown filter field";
21050
+ const operatorLabel = filters[index].operator !== "" ? `operator ${filters[index].operator}` : "unknown operator";
21051
+ const metaDataLabel = filters[index].value !== "" ? `value ${filters[index].value}` : "unknown value";
21052
+ const metaDataPossibleOptions = (_b = (_a = operatorOptions.find((op) => filters[index].operator === op.value)) == null ? void 0 : _a.editorType) != null ? _b : "singleChoice";
21053
+ return /* @__PURE__ */ jsxs83("div", { css: ConditionalFilterRow, children: [
21054
+ /* @__PURE__ */ jsx123("span", { children: index === 0 ? "where" : "and" }),
21055
+ /* @__PURE__ */ jsxs83("div", { css: ConditionalInputRow, children: [
21056
+ /* @__PURE__ */ jsx123(
21057
+ InputComboBox,
21058
+ {
21059
+ "aria-label": label,
21060
+ options: paramOptions,
21061
+ onChange: (e) => {
21062
+ var _a2;
21063
+ onParamChange((_a2 = e == null ? void 0 : e.value) != null ? _a2 : "");
21064
+ }
21065
+ }
21066
+ ),
21067
+ /* @__PURE__ */ jsx123(
21068
+ InputComboBox,
21069
+ {
21070
+ "aria-label": operatorLabel,
21071
+ options: operatorOptions,
21072
+ onChange: (e) => {
21073
+ var _a2;
21074
+ return onOperatorChange((_a2 = e == null ? void 0 : e.value) != null ? _a2 : "");
21075
+ },
21076
+ isDisabled: !filters[index].field
21077
+ }
21078
+ ),
21079
+ /* @__PURE__ */ jsx123(
21080
+ FilterEditorRenderer,
21081
+ {
21082
+ "aria-label": metaDataLabel,
21083
+ editorType: metaDataPossibleOptions,
21084
+ options: valueOptions,
21085
+ onChange: (e) => onValueChange(e != null ? e : "")
21086
+ }
21087
+ ),
21088
+ /* @__PURE__ */ jsx123(
21089
+ "button",
21090
+ {
21091
+ type: "button",
21092
+ onClick: () => handleDeleteFilter(index),
21093
+ "aria-label": "delete filter",
21094
+ css: IconBtn,
21095
+ children: /* @__PURE__ */ jsx123(Icon, { icon: "trash", iconColor: "red", size: "1rem" })
21096
+ }
21097
+ )
21098
+ ] })
21099
+ ] });
21100
+ };
21101
+ var FilterItems = () => {
21102
+ const { filterOptions, filters, setFilters } = useSearchAndFilter();
21103
+ const handleUpdateFilter = (index, prop, value) => {
21104
+ const next = [...filters];
21105
+ next[index] = { ...next[index], [prop]: value };
21106
+ if (prop === "operator") {
21107
+ next[index].value = "";
21108
+ if (value === "def" || value === "true") {
21109
+ next[index].value = "true";
21110
+ }
21111
+ if (value === "ndef" || value === "false") {
21112
+ next[index].value = "false";
21113
+ }
21114
+ }
21115
+ if (prop === "field") {
21116
+ next[index].operator = "";
21117
+ next[index].value = "";
21118
+ }
21119
+ setFilters(next);
21120
+ };
21121
+ return /* @__PURE__ */ jsx123(FilterMenu, { id: "search-and-filter-options", children: filters.map((item, i) => {
21122
+ var _a, _b, _c, _d, _e, _f;
21123
+ const availableTypeOptions = (_b = (_a = filterOptions.find((fo) => {
21124
+ var _a2;
21125
+ return (_a2 = fo.options) == null ? void 0 : _a2.find((op) => op.value === item.field);
21126
+ })) == null ? void 0 : _a.options) != null ? _b : [];
21127
+ const possibleValueOptions = (_d = (_c = availableTypeOptions == null ? void 0 : availableTypeOptions.find((op) => op.value === item.field)) == null ? void 0 : _c.valueOptions) != null ? _d : [];
21128
+ const possibleOperators = (_f = (_e = availableTypeOptions == null ? void 0 : availableTypeOptions.find((op) => op.value === item.field)) == null ? void 0 : _e.operatorOptions) != null ? _f : [];
21129
+ return /* @__PURE__ */ jsx123(
21130
+ FilterItem,
21131
+ {
21132
+ index: i,
21133
+ paramOptions: filterOptions,
21134
+ onParamChange: (e) => handleUpdateFilter(i, "field", e),
21135
+ operatorOptions: possibleOperators,
21136
+ onOperatorChange: (e) => handleUpdateFilter(i, "operator", e),
21137
+ onValueChange: (e) => handleUpdateFilter(i, "value", e),
21138
+ valueOptions: possibleValueOptions
21139
+ },
21140
+ i
21141
+ );
21142
+ }) });
21143
+ };
21144
+
21145
+ // src/components/SearchAndFilter/SearchAndFilter.tsx
21146
+ import { jsx as jsx124, jsxs as jsxs84 } from "@emotion/react/jsx-runtime";
21147
+ var SearchAndFilter = ({
21148
+ filters,
21149
+ filterOptions,
21150
+ filterControls = /* @__PURE__ */ jsx124(FilterControls, {}),
21151
+ children = /* @__PURE__ */ jsx124(FilterItems, {}),
21152
+ onChange
21153
+ }) => {
21154
+ return /* @__PURE__ */ jsx124(SearchAndFilterProvider, { filters, filterOptions, onChange, children: /* @__PURE__ */ jsxs84(VerticalRhythm, { css: SearchAndFilterContainer, "data-testid": "search-and-filter", children: [
21155
+ /* @__PURE__ */ jsx124("div", { css: SearchAndFilterControlsWrapper, children: filterControls }),
21156
+ children
21157
+ ] }) });
21158
+ };
21159
+
21160
+ // src/components/SegmentedControl/SegmentedControl.tsx
21161
+ import { css as css96 } from "@emotion/react";
21162
+ import { CgCheck as CgCheck4 } from "@react-icons/all-files/cg/CgCheck";
21163
+ import { useCallback as useCallback11, useMemo as useMemo7 } from "react";
21164
+
21165
+ // src/components/SegmentedControl/SegmentedControl.styles.ts
21166
+ import { css as css95 } from "@emotion/react";
21167
+ var segmentedControlStyles = css95`
21168
+ --segmented-control-rounded-value: var(--rounded-base);
21169
+ --segmented-control-border-width: 1px;
21170
+ --segmented-control-selected-color: var(--brand-secondary-3);
21171
+ --segmented-control-first-border-radius: var(--segmented-control-rounded-value) 0 0
21172
+ var(--segmented-control-rounded-value);
21173
+ --segmented-control-last-border-radius: 0 var(--segmented-control-rounded-value)
21174
+ var(--segmented-control-rounded-value) 0;
21175
+
21176
+ position: relative;
21177
+ display: flex;
21178
+ justify-content: flex-start;
21179
+ width: fit-content;
21180
+ background-color: var(--gray-300);
21181
+ padding: var(--segmented-control-border-width);
21182
+ gap: var(--segmented-control-border-width);
21183
+ border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
21184
+ font-size: var(--fs-xs);
21185
+ `;
21186
+ var segmentedControlVerticalStyles = css95`
21187
+ flex-direction: column;
21188
+ --segmented-control-first-border-radius: var(--segmented-control-rounded-value)
21189
+ var(--segmented-control-rounded-value) 0 0;
21190
+ --segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
21191
+ var(--segmented-control-rounded-value);
21192
+ `;
21193
+ var segmentedControlItemStyles = css95`
21194
+ &:first-of-type label {
21195
+ border-radius: var(--segmented-control-first-border-radius);
21196
+ }
21197
+ &:last-of-type label {
21198
+ border-radius: var(--segmented-control-last-border-radius);
21199
+ }
21200
+ `;
21201
+ var segmentedControlInputStyles = css95`
21202
+ ${accessibleHidden}
21203
+ `;
21204
+ var segmentedControlLabelStyles = (checked, disabled2) => css95`
21205
+ position: relative;
21206
+ display: flex;
21207
+ align-items: center;
21208
+ justify-content: center;
21209
+ height: 2rem;
21210
+ padding-inline: var(--spacing-base);
21211
+ background-color: white;
21212
+ transition-property: background-color, color, box-shadow;
21213
+ transition-duration: var(--duration-xfast);
21214
+ transition-timing-function: ease-in-out;
21215
+ z-index: 1;
21216
+ cursor: pointer;
21217
+
21218
+ &:has(:checked:not(:disabled)) {
21219
+ background-color: var(--segmented-control-selected-color);
21220
+ outline: var(--segmented-control-border-width) solid var(--segmented-control-selected-color);
21221
+ box-shadow: 0 0.43em 1.7em 0 rgba(0, 0, 0, 0.15);
21222
+ color: white;
21223
+ -webkit-text-stroke-width: thin;
21224
+ z-index: 0;
21225
+ }
21226
+
21227
+ &:hover:not(:has(:disabled, :checked)) {
21228
+ background-color: var(--gray-100);
21229
+ }
21230
+
21231
+ &:has(:disabled) {
21232
+ color: var(--gray-400);
21233
+ cursor: default;
21234
+ }
21235
+
21236
+ &:has(:checked:disabled) {
21237
+ color: var(--gray-50);
21238
+ background-color: var(--gray-400);
21239
+ }
21240
+
21241
+ // Firefox fallback using emotion variables
21242
+ // we can delete this whole block of code and variables in SegmentedControl.tsx
21243
+ // once Firefox supports :has selector
21244
+ @supports not selector(:has(*)) {
21245
+ // equivalent to &:has(:checked:not(:disabled))
21246
+ ${checked && !disabled2 ? `
21247
+ background-color: var(--segmented-control-selected-color);
21248
+ outline: var(--segmented-control-border-width) solid var(--segmented-control-selected-color);
21249
+ box-shadow: 0 0.43em 1.7em 0 rgba(0, 0, 0, 0.15);
21250
+ color: white;
21251
+ -webkit-text-stroke-width: thin;
21252
+ z-index: 0;` : void 0}
21253
+
21254
+ // equivalent to &:hover:not(:has(:disabled, :checked))
21255
+ &:hover {
21256
+ ${!checked && !disabled2 ? `background-color: var(--gray-100);` : void 0}
21257
+ }
21258
+
21259
+ // equivalent to &:has(:disabled)
21260
+ ${disabled2 ? `
21261
+ color: var(--gray-400);
21262
+ cursor: default;` : void 0}
21263
+
21264
+ // equivalent to &:has(:checked:disabled)
21265
+ ${checked && disabled2 && `
21266
+ color: var(--gray-50);
21267
+ background-color: var(--gray-400);
21268
+ `}
21269
+ }
21270
+ `;
21271
+ var segmentedControlLabelIconOnlyStyles = css95`
21272
+ padding-inline: 0.5em;
21273
+ `;
21274
+ var segmentedControlLabelCheckStyles = css95`
21275
+ opacity: 0.5;
21276
+ `;
21277
+ var segmentedControlLabelContentStyles = css95`
21278
+ display: flex;
21279
+ align-items: center;
21280
+ justify-content: center;
21281
+ gap: var(--spacing-sm);
21282
+ height: 100%;
21283
+ `;
21284
+ var segmentedControlLabelTextStyles = css95``;
21285
+
21286
+ // src/components/SegmentedControl/SegmentedControl.tsx
21287
+ import { jsx as jsx125, jsxs as jsxs85 } from "@emotion/react/jsx-runtime";
21288
+ var SegmentedControl = ({
21289
+ name,
21290
+ options,
21291
+ value,
21292
+ onChange,
21293
+ noCheckmark = false,
21294
+ disabled: disabled2 = false,
21295
+ orientation = "horizontal",
21296
+ size = "md",
20197
21297
  ...props
20198
21298
  }) => {
20199
- const onOptionChange = useCallback10(
21299
+ const onOptionChange = useCallback11(
20200
21300
  (event) => {
20201
21301
  if (event.target.checked) {
20202
21302
  onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
@@ -20204,18 +21304,18 @@ var SegmentedControl = ({
20204
21304
  },
20205
21305
  [options, onChange]
20206
21306
  );
20207
- const sizeStyles = useMemo6(() => {
21307
+ const sizeStyles = useMemo7(() => {
20208
21308
  const map = {
20209
- sm: css93({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
20210
- md: css93({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
20211
- lg: css93({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" })
21309
+ sm: css96({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
21310
+ md: css96({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
21311
+ lg: css96({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" })
20212
21312
  };
20213
21313
  return map[size];
20214
21314
  }, [size]);
20215
- const isIconOnly = useMemo6(() => {
21315
+ const isIconOnly = useMemo7(() => {
20216
21316
  return options.every((option) => option && option.icon && !option.label);
20217
21317
  }, [options]);
20218
- return /* @__PURE__ */ jsx117(
21318
+ return /* @__PURE__ */ jsx125(
20219
21319
  "div",
20220
21320
  {
20221
21321
  css: [segmentedControlStyles, orientation === "vertical" ? segmentedControlVerticalStyles : void 0],
@@ -20227,7 +21327,7 @@ var SegmentedControl = ({
20227
21327
  }
20228
21328
  const text = option.label ? option.label : option.icon ? null : String(option.value);
20229
21329
  const isDisabled = disabled2 || option.disabled;
20230
- return /* @__PURE__ */ jsx117(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ jsx117("div", { css: segmentedControlItemStyles, "data-testid": "container-segmented-control", children: /* @__PURE__ */ jsxs79(
21330
+ return /* @__PURE__ */ jsx125(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ jsx125("div", { css: segmentedControlItemStyles, "data-testid": "container-segmented-control", children: /* @__PURE__ */ jsxs85(
20231
21331
  "label",
20232
21332
  {
20233
21333
  css: [
@@ -20236,7 +21336,7 @@ var SegmentedControl = ({
20236
21336
  isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
20237
21337
  ],
20238
21338
  children: [
20239
- /* @__PURE__ */ jsx117(
21339
+ /* @__PURE__ */ jsx125(
20240
21340
  "input",
20241
21341
  {
20242
21342
  css: segmentedControlInputStyles,
@@ -20248,10 +21348,10 @@ var SegmentedControl = ({
20248
21348
  disabled: isDisabled
20249
21349
  }
20250
21350
  ),
20251
- option.value !== value || noCheckmark ? null : /* @__PURE__ */ jsx117(CgCheck4, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
20252
- /* @__PURE__ */ jsxs79("span", { css: segmentedControlLabelContentStyles, children: [
20253
- !option.icon ? null : /* @__PURE__ */ jsx117(Icon, { icon: option.icon, size: "1.5em", iconColor: "currentColor" }),
20254
- !text ? null : /* @__PURE__ */ jsx117("span", { css: segmentedControlLabelTextStyles, children: text })
21351
+ option.value !== value || noCheckmark ? null : /* @__PURE__ */ jsx125(CgCheck4, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
21352
+ /* @__PURE__ */ jsxs85("span", { css: segmentedControlLabelContentStyles, children: [
21353
+ !option.icon ? null : /* @__PURE__ */ jsx125(Icon, { icon: option.icon, size: "1.5em", iconColor: "currentColor" }),
21354
+ !text ? null : /* @__PURE__ */ jsx125("span", { css: segmentedControlLabelTextStyles, children: text })
20255
21355
  ] })
20256
21356
  ]
20257
21357
  }
@@ -20262,18 +21362,18 @@ var SegmentedControl = ({
20262
21362
  };
20263
21363
 
20264
21364
  // src/components/Skeleton/Skeleton.styles.ts
20265
- import { css as css94, keyframes as keyframes5 } from "@emotion/react";
21365
+ import { css as css97, keyframes as keyframes5 } from "@emotion/react";
20266
21366
  var lightFadingOut = keyframes5`
20267
21367
  from { opacity: 0.1; }
20268
21368
  to { opacity: 0.025; }
20269
21369
  `;
20270
- var skeletonStyles = css94`
21370
+ var skeletonStyles = css97`
20271
21371
  animation: ${lightFadingOut} 1s ease-out infinite alternate;
20272
21372
  background-color: var(--gray-900);
20273
21373
  `;
20274
21374
 
20275
21375
  // src/components/Skeleton/Skeleton.tsx
20276
- import { jsx as jsx118 } from "@emotion/react/jsx-runtime";
21376
+ import { jsx as jsx126 } from "@emotion/react/jsx-runtime";
20277
21377
  var Skeleton = ({
20278
21378
  width = "100%",
20279
21379
  height = "1.25rem",
@@ -20281,7 +21381,7 @@ var Skeleton = ({
20281
21381
  circle = false,
20282
21382
  children,
20283
21383
  ...otherProps
20284
- }) => /* @__PURE__ */ jsx118(
21384
+ }) => /* @__PURE__ */ jsx126(
20285
21385
  "div",
20286
21386
  {
20287
21387
  css: [
@@ -20304,8 +21404,8 @@ var Skeleton = ({
20304
21404
  import * as React24 from "react";
20305
21405
 
20306
21406
  // src/components/Switch/Switch.styles.ts
20307
- import { css as css95 } from "@emotion/react";
20308
- var SwitchInputContainer = css95`
21407
+ import { css as css98 } from "@emotion/react";
21408
+ var SwitchInputContainer = css98`
20309
21409
  cursor: pointer;
20310
21410
  display: inline-block;
20311
21411
  position: relative;
@@ -20314,7 +21414,7 @@ var SwitchInputContainer = css95`
20314
21414
  vertical-align: middle;
20315
21415
  user-select: none;
20316
21416
  `;
20317
- var SwitchInput = css95`
21417
+ var SwitchInput = css98`
20318
21418
  appearance: none;
20319
21419
  border-radius: var(--rounded-full);
20320
21420
  background-color: var(--white);
@@ -20352,7 +21452,7 @@ var SwitchInput = css95`
20352
21452
  cursor: not-allowed;
20353
21453
  }
20354
21454
  `;
20355
- var SwitchInputDisabled = css95`
21455
+ var SwitchInputDisabled = css98`
20356
21456
  opacity: var(--opacity-50);
20357
21457
  cursor: not-allowed;
20358
21458
 
@@ -20360,7 +21460,7 @@ var SwitchInputDisabled = css95`
20360
21460
  cursor: not-allowed;
20361
21461
  }
20362
21462
  `;
20363
- var SwitchInputLabel = css95`
21463
+ var SwitchInputLabel = css98`
20364
21464
  align-items: center;
20365
21465
  color: var(--typography-base);
20366
21466
  display: inline-flex;
@@ -20381,26 +21481,26 @@ var SwitchInputLabel = css95`
20381
21481
  top: 0;
20382
21482
  }
20383
21483
  `;
20384
- var SwitchText = css95`
21484
+ var SwitchText = css98`
20385
21485
  color: var(--gray-500);
20386
21486
  font-size: var(--fs-sm);
20387
21487
  padding-inline: var(--spacing-2xl) 0;
20388
21488
  `;
20389
21489
 
20390
21490
  // src/components/Switch/Switch.tsx
20391
- import { Fragment as Fragment19, jsx as jsx119, jsxs as jsxs80 } from "@emotion/react/jsx-runtime";
21491
+ import { Fragment as Fragment22, jsx as jsx127, jsxs as jsxs86 } from "@emotion/react/jsx-runtime";
20392
21492
  var Switch = React24.forwardRef(
20393
21493
  ({ label, infoText, toggleText, children, ...inputProps }, ref) => {
20394
21494
  let additionalText = infoText;
20395
21495
  if (infoText && toggleText) {
20396
21496
  additionalText = inputProps.checked ? toggleText : infoText;
20397
21497
  }
20398
- return /* @__PURE__ */ jsxs80(Fragment19, { children: [
20399
- /* @__PURE__ */ jsxs80("label", { css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0], children: [
20400
- /* @__PURE__ */ jsx119("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
20401
- /* @__PURE__ */ jsx119("span", { css: SwitchInputLabel, children: label })
21498
+ return /* @__PURE__ */ jsxs86(Fragment22, { children: [
21499
+ /* @__PURE__ */ jsxs86("label", { css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0], children: [
21500
+ /* @__PURE__ */ jsx127("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
21501
+ /* @__PURE__ */ jsx127("span", { css: SwitchInputLabel, children: label })
20402
21502
  ] }),
20403
- additionalText ? /* @__PURE__ */ jsx119("p", { css: SwitchText, children: additionalText }) : null,
21503
+ additionalText ? /* @__PURE__ */ jsx127("p", { css: SwitchText, children: additionalText }) : null,
20404
21504
  children
20405
21505
  ] });
20406
21506
  }
@@ -20410,8 +21510,8 @@ var Switch = React24.forwardRef(
20410
21510
  import * as React25 from "react";
20411
21511
 
20412
21512
  // src/components/Table/Table.styles.ts
20413
- import { css as css96 } from "@emotion/react";
20414
- var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => css96`
21513
+ import { css as css99 } from "@emotion/react";
21514
+ var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => css99`
20415
21515
  border-bottom: 1px solid var(--gray-400);
20416
21516
  border-collapse: collapse;
20417
21517
  min-width: 100%;
@@ -20422,55 +21522,55 @@ var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => css96
20422
21522
  padding: ${cellPadding};
20423
21523
  }
20424
21524
  `;
20425
- var tableHead = css96`
21525
+ var tableHead = css99`
20426
21526
  background: var(--gray-100);
20427
21527
  color: var(--typography-base);
20428
21528
  text-align: left;
20429
21529
  `;
20430
- var tableRow = css96`
21530
+ var tableRow = css99`
20431
21531
  border-bottom: 1px solid var(--gray-200);
20432
21532
  `;
20433
- var tableCellHead = css96`
21533
+ var tableCellHead = css99`
20434
21534
  font-size: var(--fs-sm);
20435
21535
  text-transform: uppercase;
20436
21536
  font-weight: var(--fw-bold);
20437
21537
  `;
20438
21538
 
20439
21539
  // src/components/Table/Table.tsx
20440
- import { jsx as jsx120 } from "@emotion/react/jsx-runtime";
21540
+ import { jsx as jsx128 } from "@emotion/react/jsx-runtime";
20441
21541
  var Table = React25.forwardRef(
20442
21542
  ({ children, cellPadding, ...otherProps }, ref) => {
20443
- return /* @__PURE__ */ jsx120("table", { ref, css: table({ cellPadding }), ...otherProps, children });
21543
+ return /* @__PURE__ */ jsx128("table", { ref, css: table({ cellPadding }), ...otherProps, children });
20444
21544
  }
20445
21545
  );
20446
21546
  var TableHead = React25.forwardRef(
20447
21547
  ({ children, ...otherProps }, ref) => {
20448
- return /* @__PURE__ */ jsx120("thead", { ref, css: tableHead, ...otherProps, children });
21548
+ return /* @__PURE__ */ jsx128("thead", { ref, css: tableHead, ...otherProps, children });
20449
21549
  }
20450
21550
  );
20451
21551
  var TableBody = React25.forwardRef(
20452
21552
  ({ children, ...otherProps }, ref) => {
20453
- return /* @__PURE__ */ jsx120("tbody", { ref, ...otherProps, children });
21553
+ return /* @__PURE__ */ jsx128("tbody", { ref, ...otherProps, children });
20454
21554
  }
20455
21555
  );
20456
21556
  var TableFoot = React25.forwardRef(
20457
21557
  ({ children, ...otherProps }, ref) => {
20458
- return /* @__PURE__ */ jsx120("tfoot", { ref, ...otherProps, children });
21558
+ return /* @__PURE__ */ jsx128("tfoot", { ref, ...otherProps, children });
20459
21559
  }
20460
21560
  );
20461
21561
  var TableRow = React25.forwardRef(
20462
21562
  ({ children, ...otherProps }, ref) => {
20463
- return /* @__PURE__ */ jsx120("tr", { ref, css: tableRow, ...otherProps, children });
21563
+ return /* @__PURE__ */ jsx128("tr", { ref, css: tableRow, ...otherProps, children });
20464
21564
  }
20465
21565
  );
20466
21566
  var TableCellHead = React25.forwardRef(
20467
21567
  ({ children, ...otherProps }, ref) => {
20468
- return /* @__PURE__ */ jsx120("th", { ref, css: tableCellHead, ...otherProps, children });
21568
+ return /* @__PURE__ */ jsx128("th", { ref, css: tableCellHead, ...otherProps, children });
20469
21569
  }
20470
21570
  );
20471
21571
  var TableCellData = React25.forwardRef(
20472
21572
  ({ children, ...otherProps }, ref) => {
20473
- return /* @__PURE__ */ jsx120("td", { ref, ...otherProps, children });
21573
+ return /* @__PURE__ */ jsx128("td", { ref, ...otherProps, children });
20474
21574
  }
20475
21575
  );
20476
21576
 
@@ -20482,11 +21582,11 @@ import {
20482
21582
  TabProvider as AriakitTabProvider,
20483
21583
  useTabStore as useAriakitTabStore
20484
21584
  } from "@ariakit/react";
20485
- import { useCallback as useCallback11, useEffect as useEffect17, useMemo as useMemo7 } from "react";
21585
+ import { useCallback as useCallback12, useEffect as useEffect19, useMemo as useMemo8 } from "react";
20486
21586
 
20487
21587
  // src/components/Tabs/Tabs.styles.ts
20488
- import { css as css97 } from "@emotion/react";
20489
- var tabButtonStyles = css97`
21588
+ import { css as css100 } from "@emotion/react";
21589
+ var tabButtonStyles = css100`
20490
21590
  align-items: center;
20491
21591
  border: 0;
20492
21592
  height: 2.5rem;
@@ -20503,14 +21603,14 @@ var tabButtonStyles = css97`
20503
21603
  box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
20504
21604
  }
20505
21605
  `;
20506
- var tabButtonGroupStyles = css97`
21606
+ var tabButtonGroupStyles = css100`
20507
21607
  display: flex;
20508
21608
  gap: var(--spacing-base);
20509
21609
  border-bottom: 1px solid var(--gray-300);
20510
21610
  `;
20511
21611
 
20512
21612
  // src/components/Tabs/Tabs.tsx
20513
- import { jsx as jsx121 } from "@emotion/react/jsx-runtime";
21613
+ import { jsx as jsx129 } from "@emotion/react/jsx-runtime";
20514
21614
  var useCurrentTab = () => {
20515
21615
  const context = useAriakitTabStore();
20516
21616
  if (!context) {
@@ -20526,13 +21626,13 @@ var Tabs = ({
20526
21626
  manual,
20527
21627
  ...props
20528
21628
  }) => {
20529
- const selected = useMemo7(() => {
21629
+ const selected = useMemo8(() => {
20530
21630
  if (selectedId)
20531
21631
  return selectedId;
20532
21632
  return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
20533
21633
  }, [selectedId, useHashForState]);
20534
21634
  const tab = useAriakitTabStore({ ...props, selectOnMove: !manual, selectedId: selected });
20535
- const onTabSelect = useCallback11(
21635
+ const onTabSelect = useCallback12(
20536
21636
  (value) => {
20537
21637
  const selectedValueWithoutNull = value != null ? value : void 0;
20538
21638
  onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
@@ -20543,36 +21643,36 @@ var Tabs = ({
20543
21643
  },
20544
21644
  [onSelectedIdChange, useHashForState]
20545
21645
  );
20546
- useEffect17(() => {
21646
+ useEffect19(() => {
20547
21647
  if (selected && selected !== tab.getState().activeId) {
20548
21648
  tab.setSelectedId(selected);
20549
21649
  }
20550
21650
  }, [selected, tab]);
20551
- return /* @__PURE__ */ jsx121(AriakitTabProvider, { store: tab, setSelectedId: onTabSelect, children });
21651
+ return /* @__PURE__ */ jsx129(AriakitTabProvider, { store: tab, setSelectedId: onTabSelect, children });
20552
21652
  };
20553
21653
  var TabButtonGroup = ({ children, ...props }) => {
20554
- return /* @__PURE__ */ jsx121(AriakitTabList, { ...props, css: tabButtonGroupStyles, children });
21654
+ return /* @__PURE__ */ jsx129(AriakitTabList, { ...props, css: tabButtonGroupStyles, children });
20555
21655
  };
20556
21656
  var TabButton = ({
20557
21657
  children,
20558
21658
  id,
20559
21659
  ...props
20560
21660
  }) => {
20561
- return /* @__PURE__ */ jsx121(AriakitTab, { type: "button", id, ...props, css: tabButtonStyles, children });
21661
+ return /* @__PURE__ */ jsx129(AriakitTab, { type: "button", id, ...props, css: tabButtonStyles, children });
20562
21662
  };
20563
21663
  var TabContent = ({
20564
21664
  children,
20565
21665
  ...props
20566
21666
  }) => {
20567
- return /* @__PURE__ */ jsx121(AriakitTabPanel, { ...props, children });
21667
+ return /* @__PURE__ */ jsx129(AriakitTabPanel, { ...props, children });
20568
21668
  };
20569
21669
 
20570
21670
  // src/components/Toast/Toast.tsx
20571
21671
  import { toast, ToastContainer as ToastifyContainer } from "react-toastify";
20572
21672
 
20573
21673
  // src/components/Toast/Toast.styles.ts
20574
- import { css as css98 } from "@emotion/react";
20575
- var toastContainerStyles = css98`
21674
+ import { css as css101 } from "@emotion/react";
21675
+ var toastContainerStyles = css101`
20576
21676
  ${functionalColors}
20577
21677
 
20578
21678
  --toastify-color-light: white;
@@ -20795,9 +21895,9 @@ var toastContainerStyles = css98`
20795
21895
  `;
20796
21896
 
20797
21897
  // src/components/Toast/Toast.tsx
20798
- import { jsx as jsx122 } from "@emotion/react/jsx-runtime";
21898
+ import { jsx as jsx130 } from "@emotion/react/jsx-runtime";
20799
21899
  var ToastContainer = ({ limit = 4 }) => {
20800
- return /* @__PURE__ */ jsx122(
21900
+ return /* @__PURE__ */ jsx130(
20801
21901
  ToastifyContainer,
20802
21902
  {
20803
21903
  css: toastContainerStyles,
@@ -20809,112 +21909,6 @@ var ToastContainer = ({ limit = 4 }) => {
20809
21909
  }
20810
21910
  );
20811
21911
  };
20812
-
20813
- // src/components/Validation/StatusBullet.styles.ts
20814
- import { css as css99 } from "@emotion/react";
20815
- var StatusBulletContainer = css99`
20816
- align-items: center;
20817
- align-self: center;
20818
- color: var(--gray-500);
20819
- display: inline-flex;
20820
- font-weight: var(--fw-regular);
20821
- gap: var(--spacing-xs);
20822
- line-height: 1;
20823
- position: relative;
20824
- text-transform: lowercase;
20825
-
20826
- &:before {
20827
- border-radius: var(--rounded-full);
20828
- content: '';
20829
- display: block;
20830
- }
20831
- `;
20832
- var StatusBulletBase = css99`
20833
- font-size: var(--fs-sm);
20834
- &:before {
20835
- width: var(--fs-xs);
20836
- height: var(--fs-xs);
20837
- }
20838
- `;
20839
- var StatusBulletSmall = css99`
20840
- font-size: var(--fs-xs);
20841
- &:before {
20842
- width: var(--fs-xxs);
20843
- height: var(--fs-xxs);
20844
- }
20845
- `;
20846
- var StatusDraft = css99`
20847
- &:before {
20848
- background: var(--white);
20849
- box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
20850
- }
20851
- `;
20852
- var StatusModified = css99`
20853
- &:before {
20854
- background: linear-gradient(to right, var(--white) 50%, var(--primary-action-default) 50% 100%);
20855
- box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
20856
- }
20857
- `;
20858
- var StatusError = css99`
20859
- color: var(--error);
20860
- &:before {
20861
- /* TODO: replace this with an svg icon */
20862
- background: linear-gradient(
20863
- 133deg,
20864
- var(--error) 41%,
20865
- var(--white) 42%,
20866
- var(--white) 58%,
20867
- var(--error) 59%
20868
- );
20869
- }
20870
- `;
20871
- var StatusPublished = css99`
20872
- &:before {
20873
- background: var(--primary-action-default);
20874
- }
20875
- `;
20876
- var StatusOrphan = css99`
20877
- &:before {
20878
- background: var(--brand-secondary-5);
20879
- }
20880
- `;
20881
- var StatusUnknown = css99`
20882
- &:before {
20883
- background: var(--gray-800);
20884
- }
20885
- `;
20886
-
20887
- // src/components/Validation/StatusBullet.tsx
20888
- import { jsx as jsx123 } from "@emotion/react/jsx-runtime";
20889
- var StatusBullet = ({
20890
- status,
20891
- hideText = false,
20892
- size = "base",
20893
- message,
20894
- ...props
20895
- }) => {
20896
- const currentStateStyles = {
20897
- Error: StatusError,
20898
- Modified: StatusModified,
20899
- Unsaved: StatusDraft,
20900
- Orphan: StatusOrphan,
20901
- Published: StatusPublished,
20902
- Draft: StatusDraft,
20903
- Previous: StatusDraft,
20904
- Unknown: StatusUnknown
20905
- };
20906
- const statusSize = size === "base" ? StatusBulletBase : StatusBulletSmall;
20907
- return /* @__PURE__ */ jsx123(
20908
- "span",
20909
- {
20910
- role: "status",
20911
- css: [StatusBulletContainer, currentStateStyles[status], statusSize],
20912
- title: message != null ? message : status,
20913
- ...props,
20914
- children: hideText ? null : message ? message : status
20915
- }
20916
- );
20917
- };
20918
21912
  export {
20919
21913
  AddButton,
20920
21914
  AddListButton,
@@ -20925,6 +21919,7 @@ export {
20925
21919
  Banner,
20926
21920
  Button,
20927
21921
  ButtonWithMenu,
21922
+ CHECKBOX_OPERATORS,
20928
21923
  Calendar,
20929
21924
  Callout,
20930
21925
  Caption,
@@ -20938,6 +21933,7 @@ export {
20938
21933
  Counter,
20939
21934
  CreateTeamIntegrationTile,
20940
21935
  CurrentDrawerContext,
21936
+ DATE_OPERATORS,
20941
21937
  DashedBox,
20942
21938
  DateTimePicker,
20943
21939
  DateTimePickerVariant,
@@ -20951,6 +21947,11 @@ export {
20951
21947
  EditTeamIntegrationTile,
20952
21948
  ErrorMessage,
20953
21949
  Fieldset,
21950
+ FilterButton2 as FilterButton,
21951
+ FilterControls,
21952
+ FilterItem,
21953
+ FilterItems,
21954
+ FilterMenu,
20954
21955
  Heading,
20955
21956
  HexModalBackground,
20956
21957
  HorizontalRhythm,
@@ -20995,6 +21996,7 @@ export {
20995
21996
  MenuItemSeparator,
20996
21997
  Modal,
20997
21998
  MultilineChip,
21999
+ NUMBER_OPERATORS,
20998
22000
  PageHeaderSection,
20999
22001
  Pagination,
21000
22002
  Paragraph,
@@ -21027,11 +22029,17 @@ export {
21027
22029
  ProgressBar,
21028
22030
  ProgressList,
21029
22031
  ProgressListItem,
22032
+ RICHTEXT_OPERATORS,
21030
22033
  ResolveIcon,
21031
22034
  RichTextToolbarIcon,
22035
+ SYSTEM_FIELD_OPERATORS,
21032
22036
  ScrollableList,
21033
22037
  ScrollableListInputItem,
21034
22038
  ScrollableListItem,
22039
+ SearchAndFilter,
22040
+ SearchAndFilterContext,
22041
+ SearchAndFilterOptionsContainer2 as SearchAndFilterOptionsContainer,
22042
+ SearchAndFilterProvider,
21035
22043
  SegmentedControl,
21036
22044
  ShortcutContext,
21037
22045
  ShortcutRevealer,
@@ -21040,6 +22048,7 @@ export {
21040
22048
  SuccessMessage,
21041
22049
  Switch,
21042
22050
  TAKEOVER_STACK_ID,
22051
+ TEXTBOX_OPERATORS,
21043
22052
  TabButton,
21044
22053
  TabButtonGroup,
21045
22054
  TabContent,
@@ -21141,6 +22150,7 @@ export {
21141
22150
  useIconContext,
21142
22151
  useOutsideClick,
21143
22152
  useParameterShell,
22153
+ useSearchAndFilter,
21144
22154
  useShortcut,
21145
22155
  warningIcon,
21146
22156
  yesNoIcon