@uniformdev/design-system 19.79.1-alpha.13 → 19.79.1-alpha.18
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/LICENSE +1 -1
- package/dist/esm/index.js +1976 -308
- package/dist/index.d.mts +338 -6
- package/dist/index.d.ts +338 -6
- package/dist/index.js +1985 -282
- package/package.json +5 -4
package/dist/esm/index.js
CHANGED
|
@@ -639,7 +639,7 @@ var input = (whiteSpaceWrap) => css2`
|
|
|
639
639
|
border-radius: var(--rounded-sm);
|
|
640
640
|
color: var(--gray-700);
|
|
641
641
|
padding: var(--input-padding);
|
|
642
|
-
min-height:
|
|
642
|
+
min-height: 50px;
|
|
643
643
|
width: 100%;
|
|
644
644
|
position: relative;
|
|
645
645
|
white-space: ${whiteSpaceWrap};
|
|
@@ -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);
|
|
@@ -1223,6 +1232,9 @@ var IconColorAction = css8`
|
|
|
1223
1232
|
var IconColorAccent = css8`
|
|
1224
1233
|
color: var(--accent-alt-dark);
|
|
1225
1234
|
`;
|
|
1235
|
+
var IconColorAccentDark = css8`
|
|
1236
|
+
color: var(--accent-dark);
|
|
1237
|
+
`;
|
|
1226
1238
|
var IconColorAccentLight = css8`
|
|
1227
1239
|
color: var(--accent-light);
|
|
1228
1240
|
`;
|
|
@@ -1266,6 +1278,7 @@ var IconInner = ({ icon, iconColor = "default", size = "1.5rem", ...otherProps }
|
|
|
1266
1278
|
red: IconColorRed,
|
|
1267
1279
|
accent: IconColorAccent,
|
|
1268
1280
|
currentColor: IconColorCurrent,
|
|
1281
|
+
"accent-dark": IconColorAccentDark,
|
|
1269
1282
|
"accent-light": IconColorAccentLight
|
|
1270
1283
|
};
|
|
1271
1284
|
if (isIconName && isLoading) {
|
|
@@ -2013,6 +2026,27 @@ var listViewLong = GenIcon({
|
|
|
2013
2026
|
}
|
|
2014
2027
|
]
|
|
2015
2028
|
});
|
|
2029
|
+
var filterAdd = GenIcon({
|
|
2030
|
+
tag: "svg",
|
|
2031
|
+
attr: {
|
|
2032
|
+
role: "img",
|
|
2033
|
+
viewBox: "0 0 16 16",
|
|
2034
|
+
fill: "none",
|
|
2035
|
+
strokeWidth: ""
|
|
2036
|
+
},
|
|
2037
|
+
child: [
|
|
2038
|
+
{
|
|
2039
|
+
tag: "path",
|
|
2040
|
+
attr: {
|
|
2041
|
+
stroke: "currentColor",
|
|
2042
|
+
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",
|
|
2043
|
+
strokeLinejoin: "round",
|
|
2044
|
+
strokeLinecap: "round"
|
|
2045
|
+
},
|
|
2046
|
+
child: []
|
|
2047
|
+
}
|
|
2048
|
+
]
|
|
2049
|
+
});
|
|
2016
2050
|
var customIcons = {
|
|
2017
2051
|
"rectangle-rounded": rectangleRoundedIcon,
|
|
2018
2052
|
card: cardIcon,
|
|
@@ -2039,7 +2073,8 @@ var customIcons = {
|
|
|
2039
2073
|
"diamond-fill": diamondFill,
|
|
2040
2074
|
"magic-wand": magicWand,
|
|
2041
2075
|
"list-view-short": listViewShort,
|
|
2042
|
-
"list-view-long": listViewLong
|
|
2076
|
+
"list-view-long": listViewLong,
|
|
2077
|
+
"filter-add": filterAdd
|
|
2043
2078
|
};
|
|
2044
2079
|
|
|
2045
2080
|
// src/components/AddListButton/AddListButton.styles.ts
|
|
@@ -2522,7 +2557,7 @@ import { css as css15 } from "@emotion/react";
|
|
|
2522
2557
|
var PageHeaderSectionContainer = css15`
|
|
2523
2558
|
display: flex;
|
|
2524
2559
|
justify-content: space-between;
|
|
2525
|
-
margin-bottom: var(--spacing-
|
|
2560
|
+
margin-bottom: var(--spacing-sm);
|
|
2526
2561
|
flex-direction: column;
|
|
2527
2562
|
gap: var(--spacing-sm);
|
|
2528
2563
|
|
|
@@ -12184,7 +12219,7 @@ var ButtonWithMenu = ({
|
|
|
12184
12219
|
};
|
|
12185
12220
|
|
|
12186
12221
|
// src/components/Calendar/Calendar.tsx
|
|
12187
|
-
import { parseDate, today } from "@internationalized/date";
|
|
12222
|
+
import { isToday, parseDate, today } from "@internationalized/date";
|
|
12188
12223
|
import { useCallback, useState as useState3 } from "react";
|
|
12189
12224
|
import {
|
|
12190
12225
|
Button as AriaButton,
|
|
@@ -12197,6 +12232,7 @@ import {
|
|
|
12197
12232
|
// src/components/Calendar/Calendar.styles.ts
|
|
12198
12233
|
import { css as css28 } from "@emotion/react";
|
|
12199
12234
|
var container = css28`
|
|
12235
|
+
--calendar-cell-size: 1.8rem;
|
|
12200
12236
|
width: fit-content;
|
|
12201
12237
|
max-width: 100%;
|
|
12202
12238
|
`;
|
|
@@ -12221,13 +12257,13 @@ var headerNavButton = css28`
|
|
|
12221
12257
|
}
|
|
12222
12258
|
`;
|
|
12223
12259
|
var cell = css28`
|
|
12224
|
-
width:
|
|
12225
|
-
line-height:
|
|
12260
|
+
width: var(--calendar-cell-size);
|
|
12261
|
+
line-height: var(--calendar-cell-size);
|
|
12226
12262
|
text-align: center;
|
|
12227
12263
|
border-radius: var(--rounded-sm);
|
|
12228
12264
|
cursor: default;
|
|
12229
12265
|
outline: none;
|
|
12230
|
-
margin: 1px;
|
|
12266
|
+
margin: 1px 0;
|
|
12231
12267
|
forced-color-adjust: none;
|
|
12232
12268
|
|
|
12233
12269
|
&:hover {
|
|
@@ -12253,6 +12289,12 @@ var cell = css28`
|
|
|
12253
12289
|
color: var(--white);
|
|
12254
12290
|
}
|
|
12255
12291
|
`;
|
|
12292
|
+
var cellIsOutsideRange = css28`
|
|
12293
|
+
color: var(--gray-400);
|
|
12294
|
+
`;
|
|
12295
|
+
var cellIsToday = css28`
|
|
12296
|
+
background: var(--gray-200);
|
|
12297
|
+
`;
|
|
12256
12298
|
var actions = css28`
|
|
12257
12299
|
display: flex;
|
|
12258
12300
|
justify-content: end;
|
|
@@ -12281,6 +12323,9 @@ var Calendar = ({
|
|
|
12281
12323
|
...props
|
|
12282
12324
|
}) => {
|
|
12283
12325
|
const [focusedValue, setFocusedValue] = useState3(void 0);
|
|
12326
|
+
const today_date = today(timeZone);
|
|
12327
|
+
const minDate = tryParseDate(minValue);
|
|
12328
|
+
const maxDate = tryParseDate(maxValue);
|
|
12284
12329
|
const handleChange = useCallback(
|
|
12285
12330
|
(value2) => {
|
|
12286
12331
|
onChange == null ? void 0 : onChange(value2.toString());
|
|
@@ -12288,10 +12333,9 @@ var Calendar = ({
|
|
|
12288
12333
|
[onChange]
|
|
12289
12334
|
);
|
|
12290
12335
|
const gotoToday = useCallback(() => {
|
|
12291
|
-
|
|
12292
|
-
|
|
12293
|
-
|
|
12294
|
-
}, [onChange, timeZone]);
|
|
12336
|
+
onChange == null ? void 0 : onChange(today_date.toString());
|
|
12337
|
+
setFocusedValue(today_date);
|
|
12338
|
+
}, [onChange, today_date]);
|
|
12295
12339
|
return /* @__PURE__ */ jsxs18("div", { ...props, children: [
|
|
12296
12340
|
/* @__PURE__ */ jsxs18(
|
|
12297
12341
|
AriaCalendar,
|
|
@@ -12299,8 +12343,8 @@ var Calendar = ({
|
|
|
12299
12343
|
value: tryParseDate(value) || null,
|
|
12300
12344
|
focusedValue,
|
|
12301
12345
|
onFocusChange: setFocusedValue,
|
|
12302
|
-
minValue:
|
|
12303
|
-
maxValue:
|
|
12346
|
+
minValue: minDate,
|
|
12347
|
+
maxValue: maxDate,
|
|
12304
12348
|
onChange: handleChange,
|
|
12305
12349
|
css: container,
|
|
12306
12350
|
"aria-label": "Appointment date",
|
|
@@ -12327,7 +12371,18 @@ var Calendar = ({
|
|
|
12327
12371
|
}
|
|
12328
12372
|
)
|
|
12329
12373
|
] }),
|
|
12330
|
-
/* @__PURE__ */ jsx29(CalendarGrid, { children: (date) => /* @__PURE__ */ jsx29(
|
|
12374
|
+
/* @__PURE__ */ jsx29(CalendarGrid, { children: (date) => /* @__PURE__ */ jsx29(
|
|
12375
|
+
CalendarCell,
|
|
12376
|
+
{
|
|
12377
|
+
css: [
|
|
12378
|
+
cell,
|
|
12379
|
+
minDate && date.compare(minDate) < 0 ? cellIsOutsideRange : null,
|
|
12380
|
+
maxDate && date.compare(maxDate) > 0 ? cellIsOutsideRange : null,
|
|
12381
|
+
isToday(date, timeZone) ? cellIsToday : null
|
|
12382
|
+
],
|
|
12383
|
+
date
|
|
12384
|
+
}
|
|
12385
|
+
) })
|
|
12331
12386
|
]
|
|
12332
12387
|
}
|
|
12333
12388
|
),
|
|
@@ -13344,8 +13399,8 @@ var DashedBox = ({
|
|
|
13344
13399
|
};
|
|
13345
13400
|
|
|
13346
13401
|
// src/components/DateTimePicker/DateTimePicker.tsx
|
|
13347
|
-
import { getLocalTimeZone as getLocalTimeZone2, parseDate as parseDate2, parseTime as parseTime2 } from "@internationalized/date";
|
|
13348
|
-
import { createContext as createContext2, useCallback as useCallback3, useContext as useContext3, useEffect as useEffect4, useMemo, useState as
|
|
13402
|
+
import { getLocalTimeZone as getLocalTimeZone2, parseDate as parseDate2, parseTime as parseTime2, Time as Time3 } from "@internationalized/date";
|
|
13403
|
+
import { createContext as createContext2, useCallback as useCallback3, useContext as useContext3, useEffect as useEffect4, useMemo, useState as useState6 } from "react";
|
|
13349
13404
|
import { Popover as Popover2, PopoverDisclosure, usePopoverState } from "reakit/Popover";
|
|
13350
13405
|
|
|
13351
13406
|
// src/components/Input/styles/CaptionText.styles.ts
|
|
@@ -13786,6 +13841,13 @@ function InputComboBox(props) {
|
|
|
13786
13841
|
boxShadow: "none",
|
|
13787
13842
|
borderColor: "var(--accent-dark-hover)"
|
|
13788
13843
|
},
|
|
13844
|
+
'&:has([aria-readonly="true"])': {
|
|
13845
|
+
background: "var(--gray-100)",
|
|
13846
|
+
"&:hover": {
|
|
13847
|
+
borderColor: "var(--gray-300)"
|
|
13848
|
+
},
|
|
13849
|
+
...state.isFocused ? { borderColor: "var(--gray-300)" } : {}
|
|
13850
|
+
},
|
|
13789
13851
|
...(_b = (_a2 = props.styles) == null ? void 0 : _a2.control) == null ? void 0 : _b.call(_a2, base, state)
|
|
13790
13852
|
};
|
|
13791
13853
|
},
|
|
@@ -13996,6 +14058,8 @@ var InputInlineSelect = ({
|
|
|
13996
14058
|
// src/components/Input/InputKeywordSearch.tsx
|
|
13997
14059
|
import { CgClose as CgClose4 } from "@react-icons/all-files/cg/CgClose";
|
|
13998
14060
|
import { CgSearch } from "@react-icons/all-files/cg/CgSearch";
|
|
14061
|
+
import * as React12 from "react";
|
|
14062
|
+
import { useDebounce } from "react-use";
|
|
13999
14063
|
import { jsx as jsx53 } from "@emotion/react/jsx-runtime";
|
|
14000
14064
|
var InputKeywordSearch = ({
|
|
14001
14065
|
onSearchTextChanged,
|
|
@@ -14017,6 +14081,9 @@ var InputKeywordSearch = ({
|
|
|
14017
14081
|
e.preventDefault();
|
|
14018
14082
|
}
|
|
14019
14083
|
};
|
|
14084
|
+
const handleClear = () => {
|
|
14085
|
+
onClear ? onClear() : onSearchTextChanged("");
|
|
14086
|
+
};
|
|
14020
14087
|
return /* @__PURE__ */ jsx53(
|
|
14021
14088
|
Input,
|
|
14022
14089
|
{
|
|
@@ -14025,7 +14092,16 @@ var InputKeywordSearch = ({
|
|
|
14025
14092
|
placeholder,
|
|
14026
14093
|
showLabel: false,
|
|
14027
14094
|
value,
|
|
14028
|
-
icon: value ? /* @__PURE__ */ jsx53(
|
|
14095
|
+
icon: value ? /* @__PURE__ */ jsx53(
|
|
14096
|
+
"button",
|
|
14097
|
+
{
|
|
14098
|
+
css: inputSearchCloseBtn,
|
|
14099
|
+
onClick: handleClear,
|
|
14100
|
+
type: "button",
|
|
14101
|
+
"data-testid": "keyword-search-clear-button",
|
|
14102
|
+
children: /* @__PURE__ */ jsx53(Icon, { icon: CgClose4, iconColor: "red", size: "1rem" })
|
|
14103
|
+
}
|
|
14104
|
+
) : /* @__PURE__ */ jsx53(Icon, { icon: CgSearch, iconColor: "gray", size: "1rem" }),
|
|
14029
14105
|
onChange: handleSearchTextChanged,
|
|
14030
14106
|
onKeyPress: preventSubmitOnField,
|
|
14031
14107
|
disabled: disabled2,
|
|
@@ -14042,6 +14118,16 @@ var InputKeywordSearch = ({
|
|
|
14042
14118
|
}
|
|
14043
14119
|
);
|
|
14044
14120
|
};
|
|
14121
|
+
var DebouncedInputKeywordSearch = ({
|
|
14122
|
+
delay = 300,
|
|
14123
|
+
onSearchTextChanged,
|
|
14124
|
+
defaultValue,
|
|
14125
|
+
...props
|
|
14126
|
+
}) => {
|
|
14127
|
+
const [searchText, setSearchText] = React12.useState(defaultValue != null ? defaultValue : "");
|
|
14128
|
+
useDebounce(() => onSearchTextChanged(searchText), delay, [searchText]);
|
|
14129
|
+
return /* @__PURE__ */ jsx53(InputKeywordSearch, { ...props, value: searchText, onSearchTextChanged: setSearchText });
|
|
14130
|
+
};
|
|
14045
14131
|
|
|
14046
14132
|
// src/components/Input/InputSelect.tsx
|
|
14047
14133
|
import { forwardRef as forwardRef8 } from "react";
|
|
@@ -14110,7 +14196,7 @@ var InputSelect = forwardRef8(
|
|
|
14110
14196
|
|
|
14111
14197
|
// src/components/Input/InputTime.tsx
|
|
14112
14198
|
import { parseTime } from "@internationalized/date";
|
|
14113
|
-
import * as
|
|
14199
|
+
import * as React13 from "react";
|
|
14114
14200
|
import { useCallback as useCallback2 } from "react";
|
|
14115
14201
|
import {
|
|
14116
14202
|
DateInput,
|
|
@@ -14174,7 +14260,7 @@ function tryParseTime(isoTime) {
|
|
|
14174
14260
|
return void 0;
|
|
14175
14261
|
}
|
|
14176
14262
|
}
|
|
14177
|
-
var InputTime =
|
|
14263
|
+
var InputTime = React13.forwardRef(
|
|
14178
14264
|
({
|
|
14179
14265
|
id,
|
|
14180
14266
|
label,
|
|
@@ -14255,9 +14341,9 @@ var InputTime = React12.forwardRef(
|
|
|
14255
14341
|
InputTime.displayName = "InputTime";
|
|
14256
14342
|
|
|
14257
14343
|
// src/components/Input/InputToggle.tsx
|
|
14258
|
-
import * as
|
|
14344
|
+
import * as React14 from "react";
|
|
14259
14345
|
import { jsx as jsx56, jsxs as jsxs34 } from "@emotion/react/jsx-runtime";
|
|
14260
|
-
var InputToggle =
|
|
14346
|
+
var InputToggle = React14.forwardRef(
|
|
14261
14347
|
({
|
|
14262
14348
|
label,
|
|
14263
14349
|
type,
|
|
@@ -14427,7 +14513,7 @@ var popover = css52`
|
|
|
14427
14513
|
padding: var(--spacing-md);
|
|
14428
14514
|
max-width: none;
|
|
14429
14515
|
gap: var(--spacing-md);
|
|
14430
|
-
grid-template-columns:
|
|
14516
|
+
grid-template-columns: 0.8fr 1fr;
|
|
14431
14517
|
grid-template-rows: 1fr 1fr;
|
|
14432
14518
|
|
|
14433
14519
|
[data-variant='date'] & {
|
|
@@ -14489,7 +14575,7 @@ import {
|
|
|
14489
14575
|
function getTimeZoneLabel(tz) {
|
|
14490
14576
|
var _a;
|
|
14491
14577
|
const offset = (_a = Intl.DateTimeFormat("en", { timeZoneName: "shortOffset", timeZone: tz }).formatToParts().find((p) => p.type === "timeZoneName")) == null ? void 0 : _a.value;
|
|
14492
|
-
return tz + (offset ? ` (${offset})` : "");
|
|
14578
|
+
return String(tz).replace(/_/g, " ") + (offset ? ` (${offset})` : "");
|
|
14493
14579
|
}
|
|
14494
14580
|
function tryParseAbsolute(isoDateTime, timeZone) {
|
|
14495
14581
|
try {
|
|
@@ -14524,7 +14610,8 @@ var DateTimePickerVariant = /* @__PURE__ */ ((DateTimePickerVariant2) => {
|
|
|
14524
14610
|
|
|
14525
14611
|
// src/components/DateTimePicker/DateTimePicker.tsx
|
|
14526
14612
|
import { jsx as jsx61, jsxs as jsxs38 } from "@emotion/react/jsx-runtime";
|
|
14527
|
-
var
|
|
14613
|
+
var timeZoneOptions = typeof Intl !== "undefined" && typeof Intl.supportedValuesOf === "function" ? Intl.supportedValuesOf("timeZone") : ["Etc/UTC"];
|
|
14614
|
+
var TIMEZONE_OPTIONS = timeZoneOptions.map((v) => ({
|
|
14528
14615
|
label: getTimeZoneLabel(v),
|
|
14529
14616
|
value: v
|
|
14530
14617
|
}));
|
|
@@ -14567,16 +14654,17 @@ var DateTimePicker = ({
|
|
|
14567
14654
|
() => tryParseAbsoluteToDateString(maxVisible, value == null ? void 0 : value.timeZone),
|
|
14568
14655
|
[maxVisible, value == null ? void 0 : value.timeZone]
|
|
14569
14656
|
);
|
|
14570
|
-
const [draftDate, setDraftDate] =
|
|
14571
|
-
const [draftTime, setDraftTime] =
|
|
14572
|
-
const [draftTimeZone, setDraftTimeZone] =
|
|
14657
|
+
const [draftDate, setDraftDate] = useState6(null);
|
|
14658
|
+
const [draftTime, setDraftTime] = useState6(null);
|
|
14659
|
+
const [draftTimeZone, setDraftTimeZone] = useState6(() => {
|
|
14573
14660
|
const timeZone = (parsedValue == null ? void 0 : parsedValue.timeZone) || getLocalTimeZone2();
|
|
14574
14661
|
return TIMEZONE_OPTIONS.find(({ value: value2 }) => value2 === timeZone);
|
|
14575
14662
|
});
|
|
14576
14663
|
useEffect4(() => {
|
|
14664
|
+
var _a;
|
|
14577
14665
|
if (popover2.visible) {
|
|
14578
14666
|
setDraftDate(tryToCalendarDate(parsedValue));
|
|
14579
|
-
setDraftTime(tryToTime(parsedValue));
|
|
14667
|
+
setDraftTime((_a = tryToTime(parsedValue)) != null ? _a : new Time3(0, 0));
|
|
14580
14668
|
}
|
|
14581
14669
|
}, [parsedValue, popover2.visible]);
|
|
14582
14670
|
const handleDateChange = useCallback3((isoDate) => {
|
|
@@ -14704,7 +14792,7 @@ var DateTimePicker = ({
|
|
|
14704
14792
|
// src/components/DescriptionList/DescriptionList.tsx
|
|
14705
14793
|
import { TbCheck } from "@react-icons/all-files/tb/TbCheck";
|
|
14706
14794
|
import { TbMinus } from "@react-icons/all-files/tb/TbMinus";
|
|
14707
|
-
import
|
|
14795
|
+
import React15 from "react";
|
|
14708
14796
|
|
|
14709
14797
|
// src/components/DescriptionList/DescriptionList.styles.ts
|
|
14710
14798
|
import { css as css53 } from "@emotion/react";
|
|
@@ -14735,7 +14823,7 @@ var descriptionListValueStyles = css53`
|
|
|
14735
14823
|
|
|
14736
14824
|
// src/components/DescriptionList/DescriptionList.tsx
|
|
14737
14825
|
import { jsx as jsx62, jsxs as jsxs39 } from "@emotion/react/jsx-runtime";
|
|
14738
|
-
var DescriptionList =
|
|
14826
|
+
var DescriptionList = React15.forwardRef(
|
|
14739
14827
|
({ items, variant = "horizontal", ...listProps }, ref) => {
|
|
14740
14828
|
if (!(items == null ? void 0 : items.length)) {
|
|
14741
14829
|
return null;
|
|
@@ -14746,7 +14834,7 @@ var DescriptionList = React14.forwardRef(
|
|
|
14746
14834
|
ref,
|
|
14747
14835
|
css: variant === "vertical" ? descriptionListVertical : descriptionListHorizontal,
|
|
14748
14836
|
...listProps,
|
|
14749
|
-
children: items == null ? void 0 : items.map(({ label, value }) => /* @__PURE__ */ jsxs39(
|
|
14837
|
+
children: items == null ? void 0 : items.map(({ label, value }) => /* @__PURE__ */ jsxs39(React15.Fragment, { children: [
|
|
14750
14838
|
/* @__PURE__ */ jsx62("dt", { css: descriptionListLabelStyles, children: label }),
|
|
14751
14839
|
/* @__PURE__ */ jsx62("dd", { css: descriptionListValueStyles, children: typeof value === "boolean" ? /* @__PURE__ */ jsx62(DescriptionListValueBoolean, { value }) : value })
|
|
14752
14840
|
] }, label))
|
|
@@ -14762,7 +14850,7 @@ var DescriptionListValueBoolean = ({ value }) => {
|
|
|
14762
14850
|
};
|
|
14763
14851
|
|
|
14764
14852
|
// src/components/Details/Details.tsx
|
|
14765
|
-
import * as
|
|
14853
|
+
import * as React16 from "react";
|
|
14766
14854
|
|
|
14767
14855
|
// src/components/Details/Details.styles.ts
|
|
14768
14856
|
import { css as css54 } from "@emotion/react";
|
|
@@ -14821,9 +14909,9 @@ var Details = ({
|
|
|
14821
14909
|
onChange,
|
|
14822
14910
|
...props
|
|
14823
14911
|
}) => {
|
|
14824
|
-
const detailsRef =
|
|
14825
|
-
const [internalOpen, setInternalOpen] =
|
|
14826
|
-
const memoizedIsOpen =
|
|
14912
|
+
const detailsRef = React16.useRef(null);
|
|
14913
|
+
const [internalOpen, setInternalOpen] = React16.useState(isOpenByDefault);
|
|
14914
|
+
const memoizedIsOpen = React16.useMemo(() => {
|
|
14827
14915
|
return isOpen !== void 0 ? isOpen : internalOpen;
|
|
14828
14916
|
}, [internalOpen, isOpen]);
|
|
14829
14917
|
return /* @__PURE__ */ jsxs40(
|
|
@@ -14866,7 +14954,7 @@ var Details = ({
|
|
|
14866
14954
|
|
|
14867
14955
|
// src/components/Drawer/Drawer.tsx
|
|
14868
14956
|
import { CgChevronRight } from "@react-icons/all-files/cg/CgChevronRight";
|
|
14869
|
-
import
|
|
14957
|
+
import React18, { createContext as createContext4, useContext as useContext5, useEffect as useEffect5, useRef as useRef4, useState as useState9 } from "react";
|
|
14870
14958
|
import { createPortal } from "react-dom";
|
|
14871
14959
|
|
|
14872
14960
|
// src/components/Drawer/Drawer.styles.ts
|
|
@@ -14977,7 +15065,7 @@ var drawerWrapperOverlayStyles = css55`
|
|
|
14977
15065
|
`;
|
|
14978
15066
|
|
|
14979
15067
|
// src/components/Drawer/DrawerProvider.tsx
|
|
14980
|
-
import { createContext as createContext3, useCallback as useCallback4, useContext as useContext4, useRef as useRef3, useState as
|
|
15068
|
+
import { createContext as createContext3, useCallback as useCallback4, useContext as useContext4, useRef as useRef3, useState as useState8 } from "react";
|
|
14981
15069
|
import { jsx as jsx64 } from "@emotion/react/jsx-runtime";
|
|
14982
15070
|
var DrawerContext = createContext3({
|
|
14983
15071
|
providerId: "",
|
|
@@ -14995,9 +15083,9 @@ function renderDrawerId(drawer) {
|
|
|
14995
15083
|
return `${drawer.stackId ? `\u{1F95E} ${drawer.stackId} ` : ""}\u{1F194} ${drawer.id}${drawer.instanceKey ? ` \u{1F511} ${drawer.instanceKey}` : ""}`;
|
|
14996
15084
|
}
|
|
14997
15085
|
var DrawerProvider = ({ children }) => {
|
|
14998
|
-
const [drawersRegistry, setDrawersRegistry] =
|
|
15086
|
+
const [drawersRegistry, setDrawersRegistry] = useState8([]);
|
|
14999
15087
|
const providerId = useRef3(crypto.randomUUID());
|
|
15000
|
-
const [drawerTakeoverStackId, setDrawerTakeoverStackId] =
|
|
15088
|
+
const [drawerTakeoverStackId, setDrawerTakeoverStackId] = useState8(void 0);
|
|
15001
15089
|
useShortcut({
|
|
15002
15090
|
handler: () => {
|
|
15003
15091
|
var _a, _b;
|
|
@@ -15111,7 +15199,7 @@ var CurrentDrawerContext = createContext4({});
|
|
|
15111
15199
|
var useCurrentDrawer = () => {
|
|
15112
15200
|
return useContext5(CurrentDrawerContext);
|
|
15113
15201
|
};
|
|
15114
|
-
var Drawer =
|
|
15202
|
+
var Drawer = React18.forwardRef(
|
|
15115
15203
|
({ minWidth, maxWidth, position, leftAligned, ...drawerProps }, ref) => {
|
|
15116
15204
|
var _a;
|
|
15117
15205
|
const { stackId: inheritedStackId } = useCurrentDrawer();
|
|
@@ -15139,7 +15227,7 @@ var DrawerInner = ({
|
|
|
15139
15227
|
}) => {
|
|
15140
15228
|
const { registerDrawer, unregisterDrawer, providerId } = useDrawer();
|
|
15141
15229
|
const closeButtonRef = useRef4(null);
|
|
15142
|
-
const [rendererElement, setRendererElement] =
|
|
15230
|
+
const [rendererElement, setRendererElement] = useState9(null);
|
|
15143
15231
|
useEffect5(() => {
|
|
15144
15232
|
registerDrawer({
|
|
15145
15233
|
drawer: {
|
|
@@ -15412,7 +15500,7 @@ var IconButton = forwardRef12(
|
|
|
15412
15500
|
IconButton.displayName = "IconButton";
|
|
15413
15501
|
|
|
15414
15502
|
// src/components/Image/Image.tsx
|
|
15415
|
-
import { useCallback as useCallback5, useEffect as useEffect8, useState as
|
|
15503
|
+
import { useCallback as useCallback5, useEffect as useEffect8, useState as useState10 } from "react";
|
|
15416
15504
|
|
|
15417
15505
|
// src/components/Image/Image.styles.ts
|
|
15418
15506
|
import { css as css58 } from "@emotion/react";
|
|
@@ -15513,8 +15601,8 @@ function Image({
|
|
|
15513
15601
|
height,
|
|
15514
15602
|
...imgAttribs
|
|
15515
15603
|
}) {
|
|
15516
|
-
const [loading, setLoading] =
|
|
15517
|
-
const [loadErrorText, setLoadErrorText] =
|
|
15604
|
+
const [loading, setLoading] = useState10(true);
|
|
15605
|
+
const [loadErrorText, setLoadErrorText] = useState10("");
|
|
15518
15606
|
const errorText = "The text you provided is not a valid URL";
|
|
15519
15607
|
const updateImageSrc = useCallback5(() => {
|
|
15520
15608
|
let message = "";
|
|
@@ -15868,7 +15956,7 @@ var EditTeamIntegrationTile = ({
|
|
|
15868
15956
|
// src/components/Tiles/IntegrationComingSoon.tsx
|
|
15869
15957
|
import { css as css61 } from "@emotion/react";
|
|
15870
15958
|
import { CgHeart } from "@react-icons/all-files/cg/CgHeart";
|
|
15871
|
-
import { useEffect as useEffect9, useState as
|
|
15959
|
+
import { useEffect as useEffect9, useState as useState11 } from "react";
|
|
15872
15960
|
import { jsx as jsx76, jsxs as jsxs49 } from "@emotion/react/jsx-runtime";
|
|
15873
15961
|
var IntegrationComingSoon = ({
|
|
15874
15962
|
name,
|
|
@@ -15878,7 +15966,7 @@ var IntegrationComingSoon = ({
|
|
|
15878
15966
|
timing = 1e3,
|
|
15879
15967
|
...props
|
|
15880
15968
|
}) => {
|
|
15881
|
-
const [upVote, setUpVote] =
|
|
15969
|
+
const [upVote, setUpVote] = useState11(false);
|
|
15882
15970
|
const handleUpVoteInteraction = () => {
|
|
15883
15971
|
setUpVote((prev) => !prev);
|
|
15884
15972
|
onUpVoteClick();
|
|
@@ -17005,7 +17093,7 @@ var MediaCard = ({
|
|
|
17005
17093
|
|
|
17006
17094
|
// src/components/Modal/Modal.tsx
|
|
17007
17095
|
import { CgClose as CgClose5 } from "@react-icons/all-files/cg/CgClose";
|
|
17008
|
-
import
|
|
17096
|
+
import React21, { useEffect as useEffect11, useRef as useRef6 } from "react";
|
|
17009
17097
|
|
|
17010
17098
|
// src/components/Modal/Modal.styles.ts
|
|
17011
17099
|
import { css as css76 } from "@emotion/react";
|
|
@@ -17082,7 +17170,7 @@ var modalContentStyles = css76`
|
|
|
17082
17170
|
// src/components/Modal/Modal.tsx
|
|
17083
17171
|
import { jsx as jsx94, jsxs as jsxs63 } from "@emotion/react/jsx-runtime";
|
|
17084
17172
|
var defaultModalHeight = "51rem";
|
|
17085
|
-
var Modal =
|
|
17173
|
+
var Modal = React21.forwardRef(
|
|
17086
17174
|
({
|
|
17087
17175
|
header: header2,
|
|
17088
17176
|
children,
|
|
@@ -17474,6 +17562,16 @@ var toggleInput2 = css79`
|
|
|
17474
17562
|
color: var(--white);
|
|
17475
17563
|
}
|
|
17476
17564
|
|
|
17565
|
+
&:indeterminate,
|
|
17566
|
+
&:indeterminate:hover,
|
|
17567
|
+
&:indeterminate:focus {
|
|
17568
|
+
background: var(--accent-dark-active)
|
|
17569
|
+
url('data:image/svg+xml;base64,PHN2ZwogIHdpZHRoPSIxNiIKICBoZWlnaHQ9IjE2IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKPgogIDxwYXRoCiAgICBkPSJNNCAxMkM0IDExLjQ0NzcgNC40NDc3MiAxMSA1IDExSDE5QzE5LjU1MjMgMTEgMjAgMTEuNDQ3NyAyMCAxMkMyMCAxMi41NTIzIDE5LjU1MjMgMTMgMTkgMTNINUM0LjQ0NzcyIDEzIDQgMTIuNTUyMyA0IDEyWiIKICAgIGZpbGw9IndoaXRlIgogIC8+Cjwvc3ZnPg==')
|
|
17570
|
+
no-repeat center center;
|
|
17571
|
+
border-color: var(--accent-dark-active);
|
|
17572
|
+
color: var(--white);
|
|
17573
|
+
}
|
|
17574
|
+
|
|
17477
17575
|
&:hover {
|
|
17478
17576
|
border-color: var(--accent-dark-hover);
|
|
17479
17577
|
}
|
|
@@ -17711,7 +17809,7 @@ var ParameterGroup = forwardRef13(
|
|
|
17711
17809
|
import { forwardRef as forwardRef15, useDeferredValue } from "react";
|
|
17712
17810
|
|
|
17713
17811
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
17714
|
-
import { useState as
|
|
17812
|
+
import { useState as useState12 } from "react";
|
|
17715
17813
|
import { createPortal as createPortal2 } from "react-dom";
|
|
17716
17814
|
|
|
17717
17815
|
// src/components/ParameterInputs/styles/ParameterImage.styles.ts
|
|
@@ -17754,7 +17852,7 @@ var previewModalImage = css82`
|
|
|
17754
17852
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
17755
17853
|
import { Fragment as Fragment13, jsx as jsx100, jsxs as jsxs68 } from "@emotion/react/jsx-runtime";
|
|
17756
17854
|
function ParameterImagePreview({ imageSrc }) {
|
|
17757
|
-
const [showModal, setShowModal] =
|
|
17855
|
+
const [showModal, setShowModal] = useState12(false);
|
|
17758
17856
|
return imageSrc ? /* @__PURE__ */ jsxs68("div", { css: previewWrapper, children: [
|
|
17759
17857
|
/* @__PURE__ */ jsx100(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
|
|
17760
17858
|
/* @__PURE__ */ jsx100(
|
|
@@ -17786,7 +17884,7 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
|
17786
17884
|
|
|
17787
17885
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
17788
17886
|
import { css as css84 } from "@emotion/react";
|
|
17789
|
-
import { useState as
|
|
17887
|
+
import { useState as useState13 } from "react";
|
|
17790
17888
|
|
|
17791
17889
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
17792
17890
|
import { jsx as jsx101 } from "@emotion/react/jsx-runtime";
|
|
@@ -17907,7 +18005,7 @@ var ParameterShell = ({
|
|
|
17907
18005
|
isParameterGroup = false,
|
|
17908
18006
|
...props
|
|
17909
18007
|
}) => {
|
|
17910
|
-
const [manualErrorMessage, setManualErrorMessage] =
|
|
18008
|
+
const [manualErrorMessage, setManualErrorMessage] = useState13(void 0);
|
|
17911
18009
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
17912
18010
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
17913
18011
|
return /* @__PURE__ */ jsxs69("div", { css: inputContainer2, ...props, id, children: [
|
|
@@ -18525,7 +18623,7 @@ import {
|
|
|
18525
18623
|
ElementNode as ElementNode2,
|
|
18526
18624
|
FOCUS_COMMAND
|
|
18527
18625
|
} from "lexical";
|
|
18528
|
-
import { useCallback as useCallback8, useEffect as useEffect13, useRef as useRef7, useState as
|
|
18626
|
+
import { useCallback as useCallback8, useEffect as useEffect13, useRef as useRef7, useState as useState14 } from "react";
|
|
18529
18627
|
|
|
18530
18628
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
18531
18629
|
import { $isAtNodeEnd } from "@lexical/selection";
|
|
@@ -18868,10 +18966,10 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
18868
18966
|
return path;
|
|
18869
18967
|
};
|
|
18870
18968
|
const [editor] = useLexicalComposerContext2();
|
|
18871
|
-
const [linkPopoverState, setLinkPopoverState] =
|
|
18969
|
+
const [linkPopoverState, setLinkPopoverState] = useState14();
|
|
18872
18970
|
const linkPopoverElRef = useRef7(null);
|
|
18873
|
-
const [isEditorFocused, setIsEditorFocused] =
|
|
18874
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] =
|
|
18971
|
+
const [isEditorFocused, setIsEditorFocused] = useState14(false);
|
|
18972
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState14(false);
|
|
18875
18973
|
useEffect13(() => {
|
|
18876
18974
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
18877
18975
|
setLinkPopoverState(void 0);
|
|
@@ -19128,7 +19226,7 @@ import {
|
|
|
19128
19226
|
FORMAT_TEXT_COMMAND,
|
|
19129
19227
|
SELECTION_CHANGE_COMMAND
|
|
19130
19228
|
} from "lexical";
|
|
19131
|
-
import { useCallback as useCallback9, useEffect as useEffect15, useMemo as useMemo4, useState as
|
|
19229
|
+
import { useCallback as useCallback9, useEffect as useEffect15, useMemo as useMemo4, useState as useState15 } from "react";
|
|
19132
19230
|
import { Fragment as Fragment17, jsx as jsx110, jsxs as jsxs74 } from "@emotion/react/jsx-runtime";
|
|
19133
19231
|
var toolbar = css87`
|
|
19134
19232
|
background: var(--gray-50);
|
|
@@ -19439,7 +19537,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19439
19537
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
19440
19538
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
19441
19539
|
);
|
|
19442
|
-
const [activeFormats, setActiveFormats] =
|
|
19540
|
+
const [activeFormats, setActiveFormats] = useState15([]);
|
|
19443
19541
|
const visibleFormatsWithIcon = useMemo4(() => {
|
|
19444
19542
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
19445
19543
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
@@ -19460,7 +19558,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19460
19558
|
});
|
|
19461
19559
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
19462
19560
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
19463
|
-
const [activeElement, setActiveElement] =
|
|
19561
|
+
const [activeElement, setActiveElement] = useState15("paragraph");
|
|
19464
19562
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
19465
19563
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
19466
19564
|
);
|
|
@@ -19475,7 +19573,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
19475
19573
|
}
|
|
19476
19574
|
);
|
|
19477
19575
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
19478
|
-
const [isLink, setIsLink] =
|
|
19576
|
+
const [isLink, setIsLink] = useState15(false);
|
|
19479
19577
|
const linkElementVisible = useMemo4(() => {
|
|
19480
19578
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
19481
19579
|
}, [isLink, enabledBuiltInElements]);
|
|
@@ -19610,7 +19708,7 @@ var editorPlaceholder = css88`
|
|
|
19610
19708
|
left: calc(var(--spacing-sm) + 1px);
|
|
19611
19709
|
pointer-events: none;
|
|
19612
19710
|
position: absolute;
|
|
19613
|
-
top: var(--spacing-
|
|
19711
|
+
top: var(--spacing-sm);
|
|
19614
19712
|
user-select: none;
|
|
19615
19713
|
`;
|
|
19616
19714
|
var editorInput = css88`
|
|
@@ -20057,91 +20155,1545 @@ var ProgressListItem = ({
|
|
|
20057
20155
|
] });
|
|
20058
20156
|
};
|
|
20059
20157
|
|
|
20060
|
-
// src/components/
|
|
20061
|
-
|
|
20062
|
-
|
|
20063
|
-
|
|
20158
|
+
// src/components/SearchAndFilter/constants.ts
|
|
20159
|
+
var NUMBER_OPERATORS = [
|
|
20160
|
+
{
|
|
20161
|
+
label: "equals...",
|
|
20162
|
+
symbol: "=",
|
|
20163
|
+
value: "eq",
|
|
20164
|
+
editorType: "number"
|
|
20165
|
+
},
|
|
20166
|
+
{
|
|
20167
|
+
label: "does not equal...",
|
|
20168
|
+
symbol: "\u2260",
|
|
20169
|
+
value: "neq",
|
|
20170
|
+
editorType: "number"
|
|
20171
|
+
},
|
|
20172
|
+
{
|
|
20173
|
+
label: "greater than...",
|
|
20174
|
+
symbol: ">",
|
|
20175
|
+
value: "gt",
|
|
20176
|
+
editorType: "number"
|
|
20177
|
+
},
|
|
20178
|
+
{
|
|
20179
|
+
label: "greater than or equal to...",
|
|
20180
|
+
symbol: "\u2265",
|
|
20181
|
+
value: "gte",
|
|
20182
|
+
editorType: "number"
|
|
20183
|
+
},
|
|
20184
|
+
{
|
|
20185
|
+
label: "less than...",
|
|
20186
|
+
symbol: "<",
|
|
20187
|
+
value: "lt",
|
|
20188
|
+
editorType: "number"
|
|
20189
|
+
},
|
|
20190
|
+
{
|
|
20191
|
+
label: "less than or equal to...",
|
|
20192
|
+
symbol: "\u2264",
|
|
20193
|
+
value: "lte",
|
|
20194
|
+
editorType: "number"
|
|
20195
|
+
},
|
|
20196
|
+
{
|
|
20197
|
+
label: "is empty...",
|
|
20198
|
+
value: "ndef",
|
|
20199
|
+
editorType: "empty"
|
|
20200
|
+
},
|
|
20201
|
+
{
|
|
20202
|
+
label: "is between...",
|
|
20203
|
+
value: "between",
|
|
20204
|
+
editorType: "numberRange"
|
|
20205
|
+
},
|
|
20206
|
+
{
|
|
20207
|
+
label: "is not empty...",
|
|
20208
|
+
value: "def",
|
|
20209
|
+
editorType: "empty"
|
|
20210
|
+
}
|
|
20211
|
+
];
|
|
20212
|
+
var DATE_OPERATORS = [
|
|
20213
|
+
{
|
|
20214
|
+
label: "is...",
|
|
20215
|
+
value: "eq",
|
|
20216
|
+
editorType: "date"
|
|
20217
|
+
},
|
|
20218
|
+
{
|
|
20219
|
+
label: "is between...",
|
|
20220
|
+
value: "between",
|
|
20221
|
+
editorType: "dateRange"
|
|
20222
|
+
},
|
|
20223
|
+
{
|
|
20224
|
+
label: "is before...",
|
|
20225
|
+
value: "lt",
|
|
20226
|
+
editorType: "date"
|
|
20227
|
+
},
|
|
20228
|
+
{
|
|
20229
|
+
label: "is after...",
|
|
20230
|
+
value: "gt",
|
|
20231
|
+
editorType: "date"
|
|
20232
|
+
},
|
|
20233
|
+
{
|
|
20234
|
+
label: "is on or before...",
|
|
20235
|
+
value: "lte",
|
|
20236
|
+
editorType: "date"
|
|
20237
|
+
},
|
|
20238
|
+
{
|
|
20239
|
+
label: "is on or after...",
|
|
20240
|
+
value: "gte",
|
|
20241
|
+
editorType: "date"
|
|
20242
|
+
},
|
|
20243
|
+
{
|
|
20244
|
+
label: "is empty...",
|
|
20245
|
+
value: "ndef",
|
|
20246
|
+
editorType: "empty"
|
|
20247
|
+
},
|
|
20248
|
+
{
|
|
20249
|
+
label: "is not...",
|
|
20250
|
+
value: "neq",
|
|
20251
|
+
editorType: "date"
|
|
20252
|
+
},
|
|
20253
|
+
{
|
|
20254
|
+
label: "is not empty...",
|
|
20255
|
+
value: "def",
|
|
20256
|
+
editorType: "empty"
|
|
20257
|
+
}
|
|
20258
|
+
];
|
|
20259
|
+
var TEXTBOX_OPERATORS = [
|
|
20260
|
+
{
|
|
20261
|
+
label: "is...",
|
|
20262
|
+
value: "eq",
|
|
20263
|
+
editorType: "text"
|
|
20264
|
+
},
|
|
20265
|
+
{
|
|
20266
|
+
label: "is empty...",
|
|
20267
|
+
value: "ndef",
|
|
20268
|
+
editorType: "empty"
|
|
20269
|
+
},
|
|
20270
|
+
{
|
|
20271
|
+
label: "contains...",
|
|
20272
|
+
value: "match",
|
|
20273
|
+
editorType: "text"
|
|
20274
|
+
},
|
|
20275
|
+
{
|
|
20276
|
+
label: "is not...",
|
|
20277
|
+
value: "neq",
|
|
20278
|
+
editorType: "text"
|
|
20279
|
+
},
|
|
20280
|
+
{
|
|
20281
|
+
label: "is not empty...",
|
|
20282
|
+
value: "def",
|
|
20283
|
+
editorType: "empty"
|
|
20284
|
+
}
|
|
20285
|
+
];
|
|
20286
|
+
var USER_OPERATORS = [
|
|
20287
|
+
{
|
|
20288
|
+
label: "is...",
|
|
20289
|
+
value: "eq",
|
|
20290
|
+
editorType: "text"
|
|
20291
|
+
},
|
|
20292
|
+
{
|
|
20293
|
+
label: "contains...",
|
|
20294
|
+
value: "match",
|
|
20295
|
+
editorType: "text"
|
|
20296
|
+
},
|
|
20297
|
+
{
|
|
20298
|
+
label: "is not...",
|
|
20299
|
+
value: "neq",
|
|
20300
|
+
editorType: "text"
|
|
20301
|
+
}
|
|
20302
|
+
];
|
|
20303
|
+
var SYSTEM_DATE_OPERATORS = [
|
|
20304
|
+
{
|
|
20305
|
+
label: "is...",
|
|
20306
|
+
value: "eq",
|
|
20307
|
+
editorType: "date"
|
|
20308
|
+
},
|
|
20309
|
+
{
|
|
20310
|
+
label: "is between...",
|
|
20311
|
+
value: "between",
|
|
20312
|
+
editorType: "dateRange"
|
|
20313
|
+
},
|
|
20314
|
+
{
|
|
20315
|
+
label: "is before...",
|
|
20316
|
+
value: "lt",
|
|
20317
|
+
editorType: "date"
|
|
20318
|
+
},
|
|
20319
|
+
{
|
|
20320
|
+
label: "is after...",
|
|
20321
|
+
value: "gt",
|
|
20322
|
+
editorType: "date"
|
|
20323
|
+
},
|
|
20324
|
+
{
|
|
20325
|
+
label: "is on or before...",
|
|
20326
|
+
value: "lte",
|
|
20327
|
+
editorType: "date"
|
|
20328
|
+
},
|
|
20329
|
+
{
|
|
20330
|
+
label: "is on or after...",
|
|
20331
|
+
value: "gte",
|
|
20332
|
+
editorType: "date"
|
|
20333
|
+
},
|
|
20334
|
+
{
|
|
20335
|
+
label: "is not...",
|
|
20336
|
+
value: "neq",
|
|
20337
|
+
editorType: "date"
|
|
20338
|
+
}
|
|
20339
|
+
];
|
|
20340
|
+
var RICHTEXT_OPERATORS = [
|
|
20341
|
+
{
|
|
20342
|
+
label: "is empty...",
|
|
20343
|
+
value: "ndef",
|
|
20344
|
+
editorType: "empty"
|
|
20345
|
+
},
|
|
20346
|
+
{
|
|
20347
|
+
label: "contains...",
|
|
20348
|
+
value: "match",
|
|
20349
|
+
editorType: "text"
|
|
20350
|
+
},
|
|
20351
|
+
{
|
|
20352
|
+
label: "is not empty...",
|
|
20353
|
+
value: "def",
|
|
20354
|
+
editorType: "empty"
|
|
20355
|
+
}
|
|
20356
|
+
];
|
|
20357
|
+
var CHECKBOX_OPERATORS = [
|
|
20358
|
+
{
|
|
20359
|
+
label: "is checked...",
|
|
20360
|
+
value: "def",
|
|
20361
|
+
editorType: "empty"
|
|
20362
|
+
},
|
|
20363
|
+
{
|
|
20364
|
+
label: "is not checked...",
|
|
20365
|
+
value: "ndef",
|
|
20366
|
+
editorType: "empty"
|
|
20367
|
+
}
|
|
20368
|
+
];
|
|
20369
|
+
var SYSTEM_FIELD_OPERATORS = [
|
|
20370
|
+
{
|
|
20371
|
+
label: "is...",
|
|
20372
|
+
value: "eq",
|
|
20373
|
+
editorType: "singleChoice"
|
|
20374
|
+
},
|
|
20375
|
+
{
|
|
20376
|
+
label: "is any of...",
|
|
20377
|
+
value: "in",
|
|
20378
|
+
editorType: "multiChoice"
|
|
20379
|
+
},
|
|
20380
|
+
{
|
|
20381
|
+
label: "is not...",
|
|
20382
|
+
value: "neq",
|
|
20383
|
+
editorType: "singleChoice"
|
|
20384
|
+
},
|
|
20385
|
+
{
|
|
20386
|
+
label: "is none of...",
|
|
20387
|
+
value: "nin",
|
|
20388
|
+
editorType: "multiChoice"
|
|
20389
|
+
}
|
|
20390
|
+
];
|
|
20064
20391
|
|
|
20065
|
-
// src/components/
|
|
20392
|
+
// src/components/SearchAndFilter/styles/SearchAndFilter.styles.ts
|
|
20066
20393
|
import { css as css92 } from "@emotion/react";
|
|
20067
|
-
var
|
|
20068
|
-
|
|
20069
|
-
|
|
20070
|
-
|
|
20071
|
-
|
|
20072
|
-
|
|
20073
|
-
|
|
20074
|
-
|
|
20394
|
+
var SearchAndFilterContainer = css92``;
|
|
20395
|
+
var SearchAndFilterControlsWrapper = (gridColumns) => css92`
|
|
20396
|
+
align-items: stretch;
|
|
20397
|
+
display: grid;
|
|
20398
|
+
grid-template-columns: ${gridColumns};
|
|
20399
|
+
gap: var(--spacing-sm);
|
|
20400
|
+
`;
|
|
20401
|
+
var SearchAndFilterOutterControlWrapper = (gridColumns) => css92`
|
|
20402
|
+
align-items: stretch;
|
|
20403
|
+
display: grid;
|
|
20404
|
+
grid-template-columns: ${gridColumns};
|
|
20405
|
+
gap: var(--spacing-sm);
|
|
20406
|
+
`;
|
|
20407
|
+
var ConditionalFilterRow = css92`
|
|
20408
|
+
display: grid;
|
|
20409
|
+
grid-template-columns: 35px 1fr;
|
|
20410
|
+
gap: var(--spacing-sm);
|
|
20411
|
+
margin-left: var(--spacing-base);
|
|
20075
20412
|
|
|
20076
|
-
|
|
20077
|
-
|
|
20078
|
-
|
|
20079
|
-
|
|
20080
|
-
|
|
20081
|
-
|
|
20082
|
-
|
|
20083
|
-
|
|
20084
|
-
|
|
20413
|
+
${cq("380px")} {
|
|
20414
|
+
align-items: center;
|
|
20415
|
+
}
|
|
20416
|
+
|
|
20417
|
+
&:first-of-type {
|
|
20418
|
+
margin-left: 0;
|
|
20419
|
+
grid-template-columns: 50px 1fr;
|
|
20420
|
+
}
|
|
20421
|
+
|
|
20422
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
20423
|
+
animation: ${fadeInLtr} var(--duration-fast) var(--timing-ease-out);
|
|
20424
|
+
}
|
|
20085
20425
|
`;
|
|
20086
|
-
var
|
|
20426
|
+
var ConditionalInputRow = css92`
|
|
20427
|
+
display: flex;
|
|
20428
|
+
gap: var(--spacing-sm);
|
|
20087
20429
|
flex-direction: column;
|
|
20088
|
-
|
|
20089
|
-
|
|
20090
|
-
|
|
20091
|
-
|
|
20092
|
-
`;
|
|
20093
|
-
var segmentedControlItemStyles = css92`
|
|
20094
|
-
&:first-of-type label {
|
|
20095
|
-
border-radius: var(--segmented-control-first-border-radius);
|
|
20430
|
+
|
|
20431
|
+
${cq("380px")} {
|
|
20432
|
+
align-items: center;
|
|
20433
|
+
flex-direction: row;
|
|
20096
20434
|
}
|
|
20097
|
-
|
|
20098
|
-
|
|
20435
|
+
${cq("580px")} {
|
|
20436
|
+
display: grid;
|
|
20437
|
+
grid-template-columns: 200px 160px 1fr 32px;
|
|
20099
20438
|
}
|
|
20100
20439
|
`;
|
|
20101
|
-
var
|
|
20102
|
-
${
|
|
20440
|
+
var SearchInput = css92`
|
|
20441
|
+
${input("nowrap")}
|
|
20442
|
+
border-radius: var(--rounded-full);
|
|
20443
|
+
padding: var(--spacing-sm) var(--spacing-base);
|
|
20444
|
+
font-size: var(--fs-sm);
|
|
20445
|
+
padding-right: var(--spacing-2xl);
|
|
20103
20446
|
`;
|
|
20104
|
-
var
|
|
20105
|
-
position: relative;
|
|
20106
|
-
display: flex;
|
|
20447
|
+
var FilterButton = css92`
|
|
20107
20448
|
align-items: center;
|
|
20108
|
-
|
|
20109
|
-
|
|
20110
|
-
|
|
20111
|
-
|
|
20112
|
-
|
|
20113
|
-
|
|
20114
|
-
|
|
20115
|
-
|
|
20116
|
-
|
|
20449
|
+
background: var(--white);
|
|
20450
|
+
border: 1px solid var(--gray-300);
|
|
20451
|
+
border-radius: var(--rounded-full);
|
|
20452
|
+
color: var(--typography-base);
|
|
20453
|
+
display: flex;
|
|
20454
|
+
gap: var(--spacing-sm);
|
|
20455
|
+
padding: var(--spacing-sm) var(--spacing-base);
|
|
20456
|
+
transition: color var(--duration-fast) var(--timing-ease-out),
|
|
20457
|
+
background-color var(--duration-fast) var(--timing-ease-out),
|
|
20458
|
+
border-color var(--duration-fast) var(--timing-ease-out),
|
|
20459
|
+
box-shadow var(--duration-fast) var(--timing-ease-out);
|
|
20117
20460
|
|
|
20118
|
-
|
|
20119
|
-
|
|
20120
|
-
|
|
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;
|
|
20461
|
+
svg {
|
|
20462
|
+
color: var(--gray-300);
|
|
20463
|
+
transition: color var(--duration-fast) var(--timing-ease-out);
|
|
20125
20464
|
}
|
|
20126
20465
|
|
|
20127
|
-
&:hover
|
|
20128
|
-
|
|
20129
|
-
|
|
20466
|
+
&:hover,
|
|
20467
|
+
:where([aria-expanded='true']) {
|
|
20468
|
+
outline: none;
|
|
20469
|
+
background: var(--gray-200);
|
|
20470
|
+
border-color: var(--gray-300);
|
|
20130
20471
|
|
|
20131
|
-
|
|
20132
|
-
|
|
20133
|
-
|
|
20472
|
+
svg {
|
|
20473
|
+
color: var(--typography-base);
|
|
20474
|
+
}
|
|
20134
20475
|
}
|
|
20135
20476
|
|
|
20136
|
-
&:
|
|
20137
|
-
|
|
20138
|
-
background-color: var(--gray-400);
|
|
20477
|
+
&:disabled {
|
|
20478
|
+
opacity: var(--opacity-50);
|
|
20139
20479
|
}
|
|
20140
|
-
|
|
20141
|
-
|
|
20142
|
-
|
|
20143
|
-
|
|
20144
|
-
|
|
20480
|
+
`;
|
|
20481
|
+
var FilterButtonText = css92`
|
|
20482
|
+
overflow: hidden;
|
|
20483
|
+
text-overflow: ellipsis;
|
|
20484
|
+
white-space: nowrap;
|
|
20485
|
+
max-width: 14ch;
|
|
20486
|
+
`;
|
|
20487
|
+
var FilterButtonSelected = css92`
|
|
20488
|
+
background: var(--gray-100);
|
|
20489
|
+
border-color: var(--gray-300);
|
|
20490
|
+
|
|
20491
|
+
svg {
|
|
20492
|
+
color: var(--accent-dark);
|
|
20493
|
+
}
|
|
20494
|
+
`;
|
|
20495
|
+
var FilterButtonWithOptions = css92`
|
|
20496
|
+
:where([aria-expanded='true']) {
|
|
20497
|
+
background: var(--purple-rain-100);
|
|
20498
|
+
border-color: var(--accent-light);
|
|
20499
|
+
color: var(--typography-base);
|
|
20500
|
+
box-shadow: var(--elevation-100);
|
|
20501
|
+
|
|
20502
|
+
svg {
|
|
20503
|
+
color: var(--accent-dark);
|
|
20504
|
+
}
|
|
20505
|
+
}
|
|
20506
|
+
`;
|
|
20507
|
+
var SearchIcon = css92`
|
|
20508
|
+
color: var(--icon-color);
|
|
20509
|
+
position: absolute;
|
|
20510
|
+
inset: 0 var(--spacing-base) 0 auto;
|
|
20511
|
+
margin: auto;
|
|
20512
|
+
transition: color var(--duration-fast) var(--timing-ease-out);
|
|
20513
|
+
`;
|
|
20514
|
+
var AddConditionalBtn = css92`
|
|
20515
|
+
align-items: center;
|
|
20516
|
+
background: transparent;
|
|
20517
|
+
border: none;
|
|
20518
|
+
color: var(--primary-action-default);
|
|
20519
|
+
display: flex;
|
|
20520
|
+
gap: var(--spacing-sm);
|
|
20521
|
+
transition: color var(--duration-fast) var(--timing-ease-out);
|
|
20522
|
+
padding: 0;
|
|
20523
|
+
|
|
20524
|
+
&:hover,
|
|
20525
|
+
&:focus {
|
|
20526
|
+
color: var(--primary-action-hover);
|
|
20527
|
+
}
|
|
20528
|
+
|
|
20529
|
+
&:disabled {
|
|
20530
|
+
color: var(--gray-400);
|
|
20531
|
+
}
|
|
20532
|
+
`;
|
|
20533
|
+
var Title = css92`
|
|
20534
|
+
color: var(--typography-light);
|
|
20535
|
+
|
|
20536
|
+
&:focus {
|
|
20537
|
+
outline: none;
|
|
20538
|
+
}
|
|
20539
|
+
`;
|
|
20540
|
+
var ResetConditionsBtn = css92`
|
|
20541
|
+
background: transparent;
|
|
20542
|
+
border: none;
|
|
20543
|
+
color: var(--action-destructive-default);
|
|
20544
|
+
transition: color var(--duration-fast) var(--timing-ease-out);
|
|
20545
|
+
padding: 0;
|
|
20546
|
+
|
|
20547
|
+
&:hover,
|
|
20548
|
+
&:focus {
|
|
20549
|
+
color: var(--action-destructive-hover);
|
|
20550
|
+
}
|
|
20551
|
+
`;
|
|
20552
|
+
var IconBtn = css92`
|
|
20553
|
+
background: transparent;
|
|
20554
|
+
border: none;
|
|
20555
|
+
padding: var(--spacing-sm);
|
|
20556
|
+
`;
|
|
20557
|
+
var CloseBtn = css92`
|
|
20558
|
+
color: var(--gray-500);
|
|
20559
|
+
background: transparent;
|
|
20560
|
+
border: none;
|
|
20561
|
+
padding: 0;
|
|
20562
|
+
position: absolute;
|
|
20563
|
+
top: var(--spacing-base);
|
|
20564
|
+
right: var(--spacing-base);
|
|
20565
|
+
`;
|
|
20566
|
+
var SearchAndFilterOptionsContainer = css92`
|
|
20567
|
+
background: var(--gray-50);
|
|
20568
|
+
border: 1px solid var(--gray-300);
|
|
20569
|
+
border-radius: var(--rounded-base);
|
|
20570
|
+
container-type: inline-size;
|
|
20571
|
+
display: flex;
|
|
20572
|
+
flex-direction: column;
|
|
20573
|
+
gap: var(--spacing-sm);
|
|
20574
|
+
padding: var(--spacing-md) var(--spacing-md) var(--spacing-base);
|
|
20575
|
+
will-change: height;
|
|
20576
|
+
position: relative;
|
|
20577
|
+
z-index: 1;
|
|
20578
|
+
`;
|
|
20579
|
+
var SearchAndFilterOptionsInnerContainer = css92`
|
|
20580
|
+
display: flex;
|
|
20581
|
+
flex-direction: column;
|
|
20582
|
+
gap: var(--spacing-sm);
|
|
20583
|
+
`;
|
|
20584
|
+
var SearchAndFilterButtonGroup = css92`
|
|
20585
|
+
margin-top: var(--spacing-base);
|
|
20586
|
+
`;
|
|
20587
|
+
var SortFilterInputRow = css92`
|
|
20588
|
+
align-items: center;
|
|
20589
|
+
display: flex;
|
|
20590
|
+
gap: var(--spacing-sm);
|
|
20591
|
+
`;
|
|
20592
|
+
|
|
20593
|
+
// src/components/SearchAndFilter/FilterButton.tsx
|
|
20594
|
+
import { jsx as jsx117, jsxs as jsxs79 } from "@emotion/react/jsx-runtime";
|
|
20595
|
+
var FilterButton2 = ({
|
|
20596
|
+
text = "Filters",
|
|
20597
|
+
icon = "filter-add",
|
|
20598
|
+
filterCount,
|
|
20599
|
+
hasSelectedValue,
|
|
20600
|
+
...props
|
|
20601
|
+
}) => {
|
|
20602
|
+
return /* @__PURE__ */ jsxs79(
|
|
20603
|
+
"button",
|
|
20604
|
+
{
|
|
20605
|
+
type: "button",
|
|
20606
|
+
css: [
|
|
20607
|
+
FilterButton,
|
|
20608
|
+
hasSelectedValue ? FilterButtonSelected : void 0,
|
|
20609
|
+
filterCount ? [FilterButtonWithOptions, FilterButtonSelected] : void 0
|
|
20610
|
+
],
|
|
20611
|
+
...props,
|
|
20612
|
+
"data-testid": "filters-button",
|
|
20613
|
+
children: [
|
|
20614
|
+
/* @__PURE__ */ jsx117(Icon, { icon, iconColor: "currentColor", size: "1rem" }),
|
|
20615
|
+
/* @__PURE__ */ jsx117("span", { css: FilterButtonText, children: text }),
|
|
20616
|
+
filterCount ? /* @__PURE__ */ jsx117(Counter, { count: filterCount, bgColor: "var(--white)" }) : null
|
|
20617
|
+
]
|
|
20618
|
+
}
|
|
20619
|
+
);
|
|
20620
|
+
};
|
|
20621
|
+
|
|
20622
|
+
// src/components/SearchAndFilter/FilterControls.tsx
|
|
20623
|
+
import { useEffect as useEffect18, useState as useState17 } from "react";
|
|
20624
|
+
import { useDebounce as useDebounce2, useEffectOnce } from "react-use";
|
|
20625
|
+
|
|
20626
|
+
// src/components/SearchAndFilter/hooks/useSearchAndFilter.tsx
|
|
20627
|
+
import {
|
|
20628
|
+
createContext as createContext6,
|
|
20629
|
+
useCallback as useCallback10,
|
|
20630
|
+
useContext as useContext7,
|
|
20631
|
+
useDeferredValue as useDeferredValue2,
|
|
20632
|
+
useEffect as useEffect17,
|
|
20633
|
+
useMemo as useMemo6,
|
|
20634
|
+
useState as useState16
|
|
20635
|
+
} from "react";
|
|
20636
|
+
import { jsx as jsx118 } from "@emotion/react/jsx-runtime";
|
|
20637
|
+
var SearchAndFilterContext = createContext6({
|
|
20638
|
+
searchTerm: "",
|
|
20639
|
+
setSearchTerm: () => {
|
|
20640
|
+
},
|
|
20641
|
+
filterVisibility: void 0,
|
|
20642
|
+
setFilterVisibility: () => {
|
|
20643
|
+
},
|
|
20644
|
+
filters: [],
|
|
20645
|
+
setFilters: () => {
|
|
20646
|
+
},
|
|
20647
|
+
handleAddFilter: () => {
|
|
20648
|
+
},
|
|
20649
|
+
handleResetFilters: () => {
|
|
20650
|
+
},
|
|
20651
|
+
handleDeleteFilter: () => {
|
|
20652
|
+
},
|
|
20653
|
+
setSortBy: () => {
|
|
20654
|
+
},
|
|
20655
|
+
sortByValue: "",
|
|
20656
|
+
filterOptions: [],
|
|
20657
|
+
sortOptions: [],
|
|
20658
|
+
validFilterQuery: [],
|
|
20659
|
+
totalResults: 0
|
|
20660
|
+
});
|
|
20661
|
+
var SearchAndFilterProvider = ({
|
|
20662
|
+
filters,
|
|
20663
|
+
filterOptions,
|
|
20664
|
+
sortOptions,
|
|
20665
|
+
defaultSortByValue,
|
|
20666
|
+
filterMode: filterMode3 = void 0,
|
|
20667
|
+
onSearchChange,
|
|
20668
|
+
onChange,
|
|
20669
|
+
onSortChange,
|
|
20670
|
+
totalResults,
|
|
20671
|
+
children
|
|
20672
|
+
}) => {
|
|
20673
|
+
const [searchTerm, setSearchTerm] = useState16("");
|
|
20674
|
+
const deferredSearchTerm = useDeferredValue2(searchTerm);
|
|
20675
|
+
const [filterVisibility, setFilterVisibility] = useState16(filterMode3);
|
|
20676
|
+
const [sortByValue, setSortByValue] = useState16(defaultSortByValue);
|
|
20677
|
+
const handleSearchTerm = useCallback10(
|
|
20678
|
+
(term) => {
|
|
20679
|
+
setSearchTerm(term);
|
|
20680
|
+
onSearchChange == null ? void 0 : onSearchChange(term);
|
|
20681
|
+
},
|
|
20682
|
+
[setSearchTerm, onSearchChange]
|
|
20683
|
+
);
|
|
20684
|
+
const handleOnSortChange = useCallback10(
|
|
20685
|
+
(sort) => {
|
|
20686
|
+
setSortByValue(sort);
|
|
20687
|
+
onSortChange(sort);
|
|
20688
|
+
},
|
|
20689
|
+
[onSortChange]
|
|
20690
|
+
);
|
|
20691
|
+
const handleToggleFilterVisibilty = useCallback10(
|
|
20692
|
+
(mode) => setFilterVisibility(mode),
|
|
20693
|
+
[setFilterVisibility]
|
|
20694
|
+
);
|
|
20695
|
+
const handleAddFilter = useCallback10(() => {
|
|
20696
|
+
onChange([...filters, { field: "", operator: "", value: "" }]);
|
|
20697
|
+
}, [filters, onChange]);
|
|
20698
|
+
const handleResetFilters = useCallback10(() => {
|
|
20699
|
+
onChange([]);
|
|
20700
|
+
}, [onChange]);
|
|
20701
|
+
const handleDeleteFilter = useCallback10(
|
|
20702
|
+
(index) => {
|
|
20703
|
+
const remainingFilters = filters.filter((_, i) => i !== index);
|
|
20704
|
+
onChange(remainingFilters);
|
|
20705
|
+
},
|
|
20706
|
+
[filters, onChange]
|
|
20707
|
+
);
|
|
20708
|
+
const validFilterQuery = useMemo6(() => {
|
|
20709
|
+
const hasValidFilters = filters.every((f) => f.field && f.operator && f.value);
|
|
20710
|
+
if (hasValidFilters) {
|
|
20711
|
+
return filters;
|
|
20712
|
+
}
|
|
20713
|
+
}, [filters]);
|
|
20714
|
+
useEffect17(() => {
|
|
20715
|
+
if (filterVisibility) {
|
|
20716
|
+
const handleEscKeyFilterClose = (e) => {
|
|
20717
|
+
if (e.key === "Escape") {
|
|
20718
|
+
setFilterVisibility(void 0);
|
|
20719
|
+
}
|
|
20720
|
+
};
|
|
20721
|
+
document.addEventListener("keydown", (e) => handleEscKeyFilterClose(e));
|
|
20722
|
+
return () => {
|
|
20723
|
+
document.removeEventListener("keydown", (e) => handleEscKeyFilterClose(e));
|
|
20724
|
+
};
|
|
20725
|
+
}
|
|
20726
|
+
}, [filterVisibility]);
|
|
20727
|
+
return /* @__PURE__ */ jsx118(
|
|
20728
|
+
SearchAndFilterContext.Provider,
|
|
20729
|
+
{
|
|
20730
|
+
value: {
|
|
20731
|
+
searchTerm: deferredSearchTerm,
|
|
20732
|
+
setSearchTerm: (e) => handleSearchTerm(e),
|
|
20733
|
+
setSortBy: (e) => handleOnSortChange(e),
|
|
20734
|
+
sortByValue,
|
|
20735
|
+
filterVisibility,
|
|
20736
|
+
setFilterVisibility: (e) => handleToggleFilterVisibilty(e),
|
|
20737
|
+
filters,
|
|
20738
|
+
setFilters: (e) => onChange(e),
|
|
20739
|
+
handleAddFilter,
|
|
20740
|
+
handleResetFilters,
|
|
20741
|
+
handleDeleteFilter,
|
|
20742
|
+
filterOptions,
|
|
20743
|
+
sortOptions,
|
|
20744
|
+
validFilterQuery,
|
|
20745
|
+
totalResults
|
|
20746
|
+
},
|
|
20747
|
+
children: /* @__PURE__ */ jsx118(VerticalRhythm, { children })
|
|
20748
|
+
}
|
|
20749
|
+
);
|
|
20750
|
+
};
|
|
20751
|
+
var useSearchAndFilter = () => {
|
|
20752
|
+
const value = useContext7(SearchAndFilterContext);
|
|
20753
|
+
return { ...value };
|
|
20754
|
+
};
|
|
20755
|
+
|
|
20756
|
+
// src/components/SearchAndFilter/FilterControls.tsx
|
|
20757
|
+
import { Fragment as Fragment19, jsx as jsx119, jsxs as jsxs80 } from "@emotion/react/jsx-runtime";
|
|
20758
|
+
var FilterControls = ({
|
|
20759
|
+
children,
|
|
20760
|
+
defaultSortByValue,
|
|
20761
|
+
hideSearchInput
|
|
20762
|
+
}) => {
|
|
20763
|
+
var _a, _b, _c;
|
|
20764
|
+
const {
|
|
20765
|
+
setFilterVisibility,
|
|
20766
|
+
filterVisibility,
|
|
20767
|
+
setSearchTerm,
|
|
20768
|
+
validFilterQuery,
|
|
20769
|
+
searchTerm,
|
|
20770
|
+
sortByValue,
|
|
20771
|
+
filterOptions
|
|
20772
|
+
} = useSearchAndFilter();
|
|
20773
|
+
const [initialSortValue, setInitialSortValue] = useState17(sortByValue);
|
|
20774
|
+
const [localeSearchTerm, setLocaleSearchTerm] = useState17("");
|
|
20775
|
+
const [userHasChangedSortByValue, setUserHasChangedSortByValue] = useState17(false);
|
|
20776
|
+
useDebounce2(
|
|
20777
|
+
() => {
|
|
20778
|
+
setSearchTerm(localeSearchTerm);
|
|
20779
|
+
},
|
|
20780
|
+
300,
|
|
20781
|
+
[localeSearchTerm, searchTerm]
|
|
20782
|
+
);
|
|
20783
|
+
useEffect18(() => {
|
|
20784
|
+
if (searchTerm === "") {
|
|
20785
|
+
setLocaleSearchTerm("");
|
|
20786
|
+
}
|
|
20787
|
+
}, [searchTerm]);
|
|
20788
|
+
const handleFilterToggle = (mode) => {
|
|
20789
|
+
if (filterVisibility === "filters" && mode === "filters" || filterVisibility === "sort" && mode === "sort") {
|
|
20790
|
+
return setFilterVisibility(void 0);
|
|
20791
|
+
}
|
|
20792
|
+
return setFilterVisibility(mode);
|
|
20793
|
+
};
|
|
20794
|
+
const sortValue = (sortByValue != null ? sortByValue : defaultSortByValue).split("_");
|
|
20795
|
+
const sortDirection = sortValue == null ? void 0 : sortValue.pop();
|
|
20796
|
+
const sortField = sortValue == null ? void 0 : sortValue.join("_");
|
|
20797
|
+
const sortOn = sortField.startsWith("fields.") ? "contentTypeFields" : "metadata";
|
|
20798
|
+
const sortByValueLabel = (_c = (_b = (_a = filterOptions == null ? void 0 : filterOptions.find((op) => op.value === sortOn)) == null ? void 0 : _a.options) == null ? void 0 : _b.find((f) => f.value === sortField)) == null ? void 0 : _c.label;
|
|
20799
|
+
const sortByIcon = userHasChangedSortByValue ? sortDirection === "ASC" ? "arrow-up" : "arrow-down" : "sort-az";
|
|
20800
|
+
useEffectOnce(() => {
|
|
20801
|
+
setInitialSortValue(sortByValue);
|
|
20802
|
+
});
|
|
20803
|
+
useEffect18(() => {
|
|
20804
|
+
if (initialSortValue !== sortByValue) {
|
|
20805
|
+
setUserHasChangedSortByValue(true);
|
|
20806
|
+
}
|
|
20807
|
+
}, [initialSortValue, sortByValue]);
|
|
20808
|
+
return /* @__PURE__ */ jsxs80(Fragment19, { children: [
|
|
20809
|
+
/* @__PURE__ */ jsx119(
|
|
20810
|
+
FilterButton2,
|
|
20811
|
+
{
|
|
20812
|
+
"aria-controls": "search-and-filter-options",
|
|
20813
|
+
"aria-label": "filter options",
|
|
20814
|
+
"aria-haspopup": "true",
|
|
20815
|
+
"aria-expanded": filterVisibility === "filters",
|
|
20816
|
+
filterCount: validFilterQuery == null ? void 0 : validFilterQuery.length,
|
|
20817
|
+
onClick: () => handleFilterToggle("filters")
|
|
20818
|
+
}
|
|
20819
|
+
),
|
|
20820
|
+
/* @__PURE__ */ jsx119(
|
|
20821
|
+
FilterButton2,
|
|
20822
|
+
{
|
|
20823
|
+
"aria-controls": "search-and-filter-sortBy",
|
|
20824
|
+
"aria-label": "sort by options",
|
|
20825
|
+
"aria-haspopup": "true",
|
|
20826
|
+
text: !userHasChangedSortByValue ? "Sort" : sortByValueLabel,
|
|
20827
|
+
icon: sortByIcon,
|
|
20828
|
+
"aria-expanded": filterVisibility === "sort",
|
|
20829
|
+
hasSelectedValue: sortByValue !== "",
|
|
20830
|
+
onClick: () => handleFilterToggle("sort"),
|
|
20831
|
+
"data-testid": "sort-by-dropdown"
|
|
20832
|
+
}
|
|
20833
|
+
),
|
|
20834
|
+
hideSearchInput ? null : /* @__PURE__ */ jsx119(
|
|
20835
|
+
InputKeywordSearch,
|
|
20836
|
+
{
|
|
20837
|
+
placeholder: "Search...",
|
|
20838
|
+
onSearchTextChanged: (e) => setLocaleSearchTerm(e),
|
|
20839
|
+
value: localeSearchTerm,
|
|
20840
|
+
compact: true,
|
|
20841
|
+
rounded: true
|
|
20842
|
+
}
|
|
20843
|
+
),
|
|
20844
|
+
children
|
|
20845
|
+
] });
|
|
20846
|
+
};
|
|
20847
|
+
|
|
20848
|
+
// src/components/SearchAndFilter/FilterItem.tsx
|
|
20849
|
+
import { useMemo as useMemo7 } from "react";
|
|
20850
|
+
|
|
20851
|
+
// src/components/SearchAndFilter/FilterEditor.tsx
|
|
20852
|
+
import { useEffect as useEffect19, useState as useState18 } from "react";
|
|
20853
|
+
import { useDebounce as useDebounce3 } from "react-use";
|
|
20854
|
+
|
|
20855
|
+
// src/components/Validation/StatusBullet.styles.ts
|
|
20856
|
+
import { css as css93 } from "@emotion/react";
|
|
20857
|
+
var StatusBulletContainer = css93`
|
|
20858
|
+
align-items: center;
|
|
20859
|
+
align-self: center;
|
|
20860
|
+
color: var(--gray-500);
|
|
20861
|
+
display: inline-flex;
|
|
20862
|
+
font-weight: var(--fw-regular);
|
|
20863
|
+
gap: var(--spacing-xs);
|
|
20864
|
+
line-height: 1;
|
|
20865
|
+
position: relative;
|
|
20866
|
+
text-transform: lowercase;
|
|
20867
|
+
|
|
20868
|
+
&:before {
|
|
20869
|
+
border-radius: var(--rounded-full);
|
|
20870
|
+
content: '';
|
|
20871
|
+
display: block;
|
|
20872
|
+
}
|
|
20873
|
+
`;
|
|
20874
|
+
var StatusBulletBase = css93`
|
|
20875
|
+
font-size: var(--fs-sm);
|
|
20876
|
+
&:before {
|
|
20877
|
+
width: var(--fs-xs);
|
|
20878
|
+
height: var(--fs-xs);
|
|
20879
|
+
}
|
|
20880
|
+
`;
|
|
20881
|
+
var StatusBulletSmall = css93`
|
|
20882
|
+
font-size: var(--fs-xs);
|
|
20883
|
+
&:before {
|
|
20884
|
+
width: var(--fs-xxs);
|
|
20885
|
+
height: var(--fs-xxs);
|
|
20886
|
+
}
|
|
20887
|
+
`;
|
|
20888
|
+
var StatusDraft = css93`
|
|
20889
|
+
&:before {
|
|
20890
|
+
background: var(--white);
|
|
20891
|
+
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
20892
|
+
}
|
|
20893
|
+
`;
|
|
20894
|
+
var StatusModified = css93`
|
|
20895
|
+
&:before {
|
|
20896
|
+
background: linear-gradient(to right, var(--white) 50%, var(--primary-action-default) 50% 100%);
|
|
20897
|
+
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
20898
|
+
}
|
|
20899
|
+
`;
|
|
20900
|
+
var StatusError = css93`
|
|
20901
|
+
color: var(--error);
|
|
20902
|
+
&:before {
|
|
20903
|
+
/* TODO: replace this with an svg icon */
|
|
20904
|
+
background: linear-gradient(
|
|
20905
|
+
133deg,
|
|
20906
|
+
var(--error) 41%,
|
|
20907
|
+
var(--white) 42%,
|
|
20908
|
+
var(--white) 58%,
|
|
20909
|
+
var(--error) 59%
|
|
20910
|
+
);
|
|
20911
|
+
}
|
|
20912
|
+
`;
|
|
20913
|
+
var StatusPublished = css93`
|
|
20914
|
+
&:before {
|
|
20915
|
+
background: var(--primary-action-default);
|
|
20916
|
+
}
|
|
20917
|
+
`;
|
|
20918
|
+
var StatusOrphan = css93`
|
|
20919
|
+
&:before {
|
|
20920
|
+
background: var(--brand-secondary-5);
|
|
20921
|
+
}
|
|
20922
|
+
`;
|
|
20923
|
+
var StatusUnknown = css93`
|
|
20924
|
+
&:before {
|
|
20925
|
+
background: var(--gray-800);
|
|
20926
|
+
}
|
|
20927
|
+
`;
|
|
20928
|
+
var StatusDeleted = css93`
|
|
20929
|
+
&:before {
|
|
20930
|
+
background: var(--error);
|
|
20931
|
+
}
|
|
20932
|
+
`;
|
|
20933
|
+
|
|
20934
|
+
// src/components/Validation/StatusBullet.tsx
|
|
20935
|
+
import { jsx as jsx120 } from "@emotion/react/jsx-runtime";
|
|
20936
|
+
var StatusBullet = ({
|
|
20937
|
+
status,
|
|
20938
|
+
hideText = false,
|
|
20939
|
+
size = "base",
|
|
20940
|
+
message,
|
|
20941
|
+
...props
|
|
20942
|
+
}) => {
|
|
20943
|
+
const currentStateStyles = {
|
|
20944
|
+
Error: StatusError,
|
|
20945
|
+
Modified: StatusModified,
|
|
20946
|
+
Unsaved: StatusDraft,
|
|
20947
|
+
Orphan: StatusOrphan,
|
|
20948
|
+
Published: StatusPublished,
|
|
20949
|
+
Draft: StatusDraft,
|
|
20950
|
+
Previous: StatusDraft,
|
|
20951
|
+
Unknown: StatusUnknown,
|
|
20952
|
+
Deleted: StatusDeleted
|
|
20953
|
+
};
|
|
20954
|
+
const statusSize = size === "base" ? StatusBulletBase : StatusBulletSmall;
|
|
20955
|
+
return /* @__PURE__ */ jsx120(
|
|
20956
|
+
"span",
|
|
20957
|
+
{
|
|
20958
|
+
role: "status",
|
|
20959
|
+
css: [StatusBulletContainer, currentStateStyles[status], statusSize],
|
|
20960
|
+
title: message != null ? message : status,
|
|
20961
|
+
...props,
|
|
20962
|
+
children: hideText ? null : message ? message : status
|
|
20963
|
+
}
|
|
20964
|
+
);
|
|
20965
|
+
};
|
|
20966
|
+
|
|
20967
|
+
// src/components/SearchAndFilter/FilterEditor.tsx
|
|
20968
|
+
import { Fragment as Fragment20, jsx as jsx121, jsxs as jsxs81 } from "@emotion/react/jsx-runtime";
|
|
20969
|
+
var readOnlyAttributes = {
|
|
20970
|
+
isSearchable: false,
|
|
20971
|
+
menuIsOpen: false,
|
|
20972
|
+
isClearable: false
|
|
20973
|
+
};
|
|
20974
|
+
var FilterMultiChoiceEditor = ({
|
|
20975
|
+
value,
|
|
20976
|
+
options,
|
|
20977
|
+
isDisabled,
|
|
20978
|
+
readOnly,
|
|
20979
|
+
valueTestId,
|
|
20980
|
+
...props
|
|
20981
|
+
}) => {
|
|
20982
|
+
const readOnlyProps = readOnly ? readOnlyAttributes : {};
|
|
20983
|
+
return /* @__PURE__ */ jsx121("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx121(
|
|
20984
|
+
InputComboBox,
|
|
20985
|
+
{
|
|
20986
|
+
...props,
|
|
20987
|
+
placeholder: "Type to search...",
|
|
20988
|
+
options,
|
|
20989
|
+
isMulti: true,
|
|
20990
|
+
isClearable: true,
|
|
20991
|
+
isDisabled,
|
|
20992
|
+
onChange: (e) => {
|
|
20993
|
+
var _a;
|
|
20994
|
+
return props.onChange((_a = e.map((item) => item.value)) != null ? _a : []);
|
|
20995
|
+
},
|
|
20996
|
+
value,
|
|
20997
|
+
"aria-readonly": readOnly,
|
|
20998
|
+
styles: {
|
|
20999
|
+
menu(base) {
|
|
21000
|
+
return {
|
|
21001
|
+
...base,
|
|
21002
|
+
minWidth: "max-content"
|
|
21003
|
+
};
|
|
21004
|
+
}
|
|
21005
|
+
},
|
|
21006
|
+
...readOnlyProps
|
|
21007
|
+
}
|
|
21008
|
+
) });
|
|
21009
|
+
};
|
|
21010
|
+
var FilterSingleChoiceEditor = ({
|
|
21011
|
+
options,
|
|
21012
|
+
value,
|
|
21013
|
+
isDisabled,
|
|
21014
|
+
readOnly,
|
|
21015
|
+
onChange,
|
|
21016
|
+
valueTestId
|
|
21017
|
+
}) => {
|
|
21018
|
+
const readOnlyProps = readOnly ? readOnlyAttributes : {};
|
|
21019
|
+
return /* @__PURE__ */ jsx121("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx121(
|
|
21020
|
+
InputComboBox,
|
|
21021
|
+
{
|
|
21022
|
+
placeholder: "Type to search...",
|
|
21023
|
+
options,
|
|
21024
|
+
isClearable: true,
|
|
21025
|
+
onChange: (e) => {
|
|
21026
|
+
var _a;
|
|
21027
|
+
return onChange((_a = e == null ? void 0 : e.value) != null ? _a : "");
|
|
21028
|
+
},
|
|
21029
|
+
isDisabled,
|
|
21030
|
+
value,
|
|
21031
|
+
"aria-readonly": readOnly,
|
|
21032
|
+
styles: {
|
|
21033
|
+
menu(base) {
|
|
21034
|
+
return {
|
|
21035
|
+
...base,
|
|
21036
|
+
minWidth: "max-content"
|
|
21037
|
+
};
|
|
21038
|
+
}
|
|
21039
|
+
},
|
|
21040
|
+
...readOnlyProps
|
|
21041
|
+
}
|
|
21042
|
+
) });
|
|
21043
|
+
};
|
|
21044
|
+
var CustomOptions = ({ label, value }) => {
|
|
21045
|
+
return /* @__PURE__ */ jsx121(StatusBullet, { status: label, message: value });
|
|
21046
|
+
};
|
|
21047
|
+
var StatusMultiEditor = ({
|
|
21048
|
+
options,
|
|
21049
|
+
value,
|
|
21050
|
+
isDisabled,
|
|
21051
|
+
readOnly,
|
|
21052
|
+
onChange,
|
|
21053
|
+
valueTestId
|
|
21054
|
+
}) => {
|
|
21055
|
+
const readOnlyProps = readOnly ? readOnlyAttributes : {};
|
|
21056
|
+
return /* @__PURE__ */ jsx121("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx121(
|
|
21057
|
+
InputComboBox,
|
|
21058
|
+
{
|
|
21059
|
+
options,
|
|
21060
|
+
isMulti: true,
|
|
21061
|
+
onChange: (e) => {
|
|
21062
|
+
var _a;
|
|
21063
|
+
return onChange((_a = e.map((item) => item.value)) != null ? _a : []);
|
|
21064
|
+
},
|
|
21065
|
+
formatOptionLabel: CustomOptions,
|
|
21066
|
+
value,
|
|
21067
|
+
isDisabled,
|
|
21068
|
+
styles: {
|
|
21069
|
+
menu(base) {
|
|
21070
|
+
return {
|
|
21071
|
+
...base,
|
|
21072
|
+
minWidth: "max-content"
|
|
21073
|
+
};
|
|
21074
|
+
}
|
|
21075
|
+
},
|
|
21076
|
+
...readOnlyProps
|
|
21077
|
+
}
|
|
21078
|
+
) });
|
|
21079
|
+
};
|
|
21080
|
+
var StatusSingleEditor = ({
|
|
21081
|
+
options,
|
|
21082
|
+
value,
|
|
21083
|
+
isDisabled,
|
|
21084
|
+
readOnly,
|
|
21085
|
+
onChange,
|
|
21086
|
+
valueTestId
|
|
21087
|
+
}) => {
|
|
21088
|
+
const readOnlyProps = readOnly ? readOnlyAttributes : {};
|
|
21089
|
+
return /* @__PURE__ */ jsx121("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx121(
|
|
21090
|
+
InputComboBox,
|
|
21091
|
+
{
|
|
21092
|
+
options,
|
|
21093
|
+
onChange: (e) => {
|
|
21094
|
+
var _a;
|
|
21095
|
+
return onChange((_a = e == null ? void 0 : e.value) != null ? _a : "");
|
|
21096
|
+
},
|
|
21097
|
+
formatOptionLabel: CustomOptions,
|
|
21098
|
+
value,
|
|
21099
|
+
isDisabled,
|
|
21100
|
+
styles: {
|
|
21101
|
+
menu(base) {
|
|
21102
|
+
return {
|
|
21103
|
+
...base,
|
|
21104
|
+
minWidth: "max-content"
|
|
21105
|
+
};
|
|
21106
|
+
}
|
|
21107
|
+
},
|
|
21108
|
+
...readOnlyProps
|
|
21109
|
+
}
|
|
21110
|
+
) });
|
|
21111
|
+
};
|
|
21112
|
+
var TextEditor = ({ onChange, ariaLabel, value, readOnly, valueTestId }) => {
|
|
21113
|
+
useDebounce3(() => onChange, 500, [value]);
|
|
21114
|
+
return /* @__PURE__ */ jsx121(
|
|
21115
|
+
Input,
|
|
21116
|
+
{
|
|
21117
|
+
showLabel: false,
|
|
21118
|
+
label: ariaLabel,
|
|
21119
|
+
onChange: (e) => onChange(e.currentTarget.value),
|
|
21120
|
+
placeholder: "Enter phrase to search\u2026",
|
|
21121
|
+
value,
|
|
21122
|
+
readOnly,
|
|
21123
|
+
"data-testid": valueTestId
|
|
21124
|
+
}
|
|
21125
|
+
);
|
|
21126
|
+
};
|
|
21127
|
+
var NumberRangeEditor = ({
|
|
21128
|
+
onChange,
|
|
21129
|
+
disabled: disabled2,
|
|
21130
|
+
ariaLabel,
|
|
21131
|
+
value,
|
|
21132
|
+
readOnly,
|
|
21133
|
+
valueTestId
|
|
21134
|
+
}) => {
|
|
21135
|
+
const [minValue, setMinValue] = useState18("");
|
|
21136
|
+
const [maxValue, setMaxValue] = useState18("");
|
|
21137
|
+
const [error, setError] = useState18("");
|
|
21138
|
+
useEffect19(() => {
|
|
21139
|
+
if (!maxValue && !minValue) {
|
|
21140
|
+
return;
|
|
21141
|
+
}
|
|
21142
|
+
const max = Number(maxValue);
|
|
21143
|
+
const min = Number(minValue);
|
|
21144
|
+
if (max < min || min > max) {
|
|
21145
|
+
setError("Please enter a valid numeric range");
|
|
21146
|
+
onChange([]);
|
|
21147
|
+
return;
|
|
21148
|
+
}
|
|
21149
|
+
if (maxValue && !minValue || minValue && !maxValue) {
|
|
21150
|
+
setError("Please enter both a low and high number");
|
|
21151
|
+
onChange([]);
|
|
21152
|
+
return;
|
|
21153
|
+
}
|
|
21154
|
+
setError("");
|
|
21155
|
+
onChange([minValue, maxValue]);
|
|
21156
|
+
}, [maxValue, minValue, setError]);
|
|
21157
|
+
return /* @__PURE__ */ jsxs81(Fragment20, { children: [
|
|
21158
|
+
/* @__PURE__ */ jsxs81("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
|
|
21159
|
+
/* @__PURE__ */ jsx121(
|
|
21160
|
+
Input,
|
|
21161
|
+
{
|
|
21162
|
+
label: `${ariaLabel}-min`,
|
|
21163
|
+
type: "number",
|
|
21164
|
+
showLabel: false,
|
|
21165
|
+
min: 0,
|
|
21166
|
+
placeholder: "Low",
|
|
21167
|
+
onChange: (e) => setMinValue(e.currentTarget.value),
|
|
21168
|
+
"aria-invalid": !error ? false : true,
|
|
21169
|
+
disabled: disabled2,
|
|
21170
|
+
value: value ? value[0] : "",
|
|
21171
|
+
readOnly
|
|
21172
|
+
}
|
|
21173
|
+
),
|
|
21174
|
+
/* @__PURE__ */ jsx121(
|
|
21175
|
+
Input,
|
|
21176
|
+
{
|
|
21177
|
+
type: "number",
|
|
21178
|
+
label: `${ariaLabel}-max`,
|
|
21179
|
+
showLabel: false,
|
|
21180
|
+
min: 0,
|
|
21181
|
+
placeholder: "High",
|
|
21182
|
+
onChange: (e) => setMaxValue(e.currentTarget.value),
|
|
21183
|
+
"aria-invalid": !error ? false : true,
|
|
21184
|
+
disabled: disabled2,
|
|
21185
|
+
value: value ? value[1] : "",
|
|
21186
|
+
readOnly
|
|
21187
|
+
}
|
|
21188
|
+
)
|
|
21189
|
+
] }),
|
|
21190
|
+
/* @__PURE__ */ jsx121(ErrorContainer, { errorMessage: error })
|
|
21191
|
+
] });
|
|
21192
|
+
};
|
|
21193
|
+
var NumberEditor = ({
|
|
21194
|
+
ariaLabel,
|
|
21195
|
+
onChange,
|
|
21196
|
+
disabled: disabled2,
|
|
21197
|
+
value,
|
|
21198
|
+
readOnly,
|
|
21199
|
+
valueTestId
|
|
21200
|
+
}) => {
|
|
21201
|
+
return /* @__PURE__ */ jsx121(
|
|
21202
|
+
Input,
|
|
21203
|
+
{
|
|
21204
|
+
label: ariaLabel,
|
|
21205
|
+
type: "number",
|
|
21206
|
+
showLabel: false,
|
|
21207
|
+
min: 0,
|
|
21208
|
+
onChange: (e) => onChange(e.currentTarget.value),
|
|
21209
|
+
disabled: disabled2,
|
|
21210
|
+
value,
|
|
21211
|
+
readOnly,
|
|
21212
|
+
"data-testid": valueTestId
|
|
21213
|
+
}
|
|
21214
|
+
);
|
|
21215
|
+
};
|
|
21216
|
+
var DateEditor = ({
|
|
21217
|
+
onChange,
|
|
21218
|
+
ariaLabel,
|
|
21219
|
+
disabled: disabled2,
|
|
21220
|
+
value,
|
|
21221
|
+
readOnly,
|
|
21222
|
+
valueTestId
|
|
21223
|
+
}) => {
|
|
21224
|
+
return /* @__PURE__ */ jsx121(
|
|
21225
|
+
Input,
|
|
21226
|
+
{
|
|
21227
|
+
type: "date",
|
|
21228
|
+
label: ariaLabel,
|
|
21229
|
+
showLabel: false,
|
|
21230
|
+
onChange: (e) => onChange(e.currentTarget.value),
|
|
21231
|
+
disabled: disabled2,
|
|
21232
|
+
value,
|
|
21233
|
+
readOnly,
|
|
21234
|
+
"data-testid": valueTestId
|
|
21235
|
+
}
|
|
21236
|
+
);
|
|
21237
|
+
};
|
|
21238
|
+
var DateRangeEditor = ({
|
|
21239
|
+
ariaLabel,
|
|
21240
|
+
onChange,
|
|
21241
|
+
disabled: disabled2,
|
|
21242
|
+
value,
|
|
21243
|
+
readOnly,
|
|
21244
|
+
valueTestId
|
|
21245
|
+
}) => {
|
|
21246
|
+
const [minDateValue, setMinDateValue] = useState18(value ? value[0] : "");
|
|
21247
|
+
const [maxDateValue, setMaxDateValue] = useState18(value ? value[1] : "");
|
|
21248
|
+
const [error, setError] = useState18("");
|
|
21249
|
+
useEffect19(() => {
|
|
21250
|
+
if (!minDateValue || !maxDateValue) {
|
|
21251
|
+
return;
|
|
21252
|
+
}
|
|
21253
|
+
const minDate = new Date(minDateValue);
|
|
21254
|
+
const maxDate = new Date(maxDateValue);
|
|
21255
|
+
if (maxDate < minDate) {
|
|
21256
|
+
setError("The max date cannot be lower than the min date");
|
|
21257
|
+
onChange([]);
|
|
21258
|
+
return;
|
|
21259
|
+
}
|
|
21260
|
+
if (maxDate && !minDate) {
|
|
21261
|
+
setError("Please enter both a low and high date");
|
|
21262
|
+
onChange([]);
|
|
21263
|
+
return;
|
|
21264
|
+
}
|
|
21265
|
+
const minDateString = minDate.toDateString();
|
|
21266
|
+
const maxDateString = maxDate.toDateString();
|
|
21267
|
+
if (minDateString === maxDateString || maxDateString === minDateString) {
|
|
21268
|
+
setError("The min and max date cannot be the same");
|
|
21269
|
+
onChange([]);
|
|
21270
|
+
return;
|
|
21271
|
+
}
|
|
21272
|
+
if (minDate > maxDate) {
|
|
21273
|
+
setError("The min date cannot be higher than the max date");
|
|
21274
|
+
onChange([]);
|
|
21275
|
+
return;
|
|
21276
|
+
}
|
|
21277
|
+
setError("");
|
|
21278
|
+
onChange([minDateValue, maxDateValue]);
|
|
21279
|
+
}, [minDateValue, maxDateValue, setError]);
|
|
21280
|
+
return /* @__PURE__ */ jsxs81(Fragment20, { children: [
|
|
21281
|
+
/* @__PURE__ */ jsxs81("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
|
|
21282
|
+
/* @__PURE__ */ jsx121(
|
|
21283
|
+
Input,
|
|
21284
|
+
{
|
|
21285
|
+
label: `${ariaLabel}-min-date`,
|
|
21286
|
+
type: "date",
|
|
21287
|
+
showLabel: false,
|
|
21288
|
+
value: minDateValue,
|
|
21289
|
+
onChange: (e) => setMinDateValue(e.currentTarget.value),
|
|
21290
|
+
"aria-invalid": !error ? false : true,
|
|
21291
|
+
disabled: disabled2,
|
|
21292
|
+
readOnly
|
|
21293
|
+
}
|
|
21294
|
+
),
|
|
21295
|
+
/* @__PURE__ */ jsx121(
|
|
21296
|
+
Input,
|
|
21297
|
+
{
|
|
21298
|
+
label: `${ariaLabel}-max-date`,
|
|
21299
|
+
type: "date",
|
|
21300
|
+
showLabel: false,
|
|
21301
|
+
value: maxDateValue,
|
|
21302
|
+
onChange: (e) => setMaxDateValue(e.currentTarget.value),
|
|
21303
|
+
"aria-invalid": !error ? false : true,
|
|
21304
|
+
disabled: disabled2,
|
|
21305
|
+
readOnly
|
|
21306
|
+
}
|
|
21307
|
+
)
|
|
21308
|
+
] }),
|
|
21309
|
+
/* @__PURE__ */ jsx121(ErrorContainer, { errorMessage: error })
|
|
21310
|
+
] });
|
|
21311
|
+
};
|
|
21312
|
+
var FilterEditorRenderer = ({ editorType, ...props }) => {
|
|
21313
|
+
const Editor = filterMapper[editorType];
|
|
21314
|
+
if (!Editor) {
|
|
21315
|
+
return null;
|
|
21316
|
+
}
|
|
21317
|
+
if (editorType === "empty") {
|
|
21318
|
+
return null;
|
|
21319
|
+
}
|
|
21320
|
+
return /* @__PURE__ */ jsx121(Editor, { ...props, disabled: props.isDisabled });
|
|
21321
|
+
};
|
|
21322
|
+
var filterMapper = {
|
|
21323
|
+
multiChoice: FilterMultiChoiceEditor,
|
|
21324
|
+
singleChoice: FilterSingleChoiceEditor,
|
|
21325
|
+
date: DateEditor,
|
|
21326
|
+
dateRange: DateRangeEditor,
|
|
21327
|
+
text: TextEditor,
|
|
21328
|
+
numberRange: NumberRangeEditor,
|
|
21329
|
+
number: NumberEditor,
|
|
21330
|
+
statusMultiChoice: StatusMultiEditor,
|
|
21331
|
+
statusSingleChoice: StatusSingleEditor,
|
|
21332
|
+
empty: null
|
|
21333
|
+
};
|
|
21334
|
+
var ErrorContainer = ({ errorMessage }) => {
|
|
21335
|
+
return /* @__PURE__ */ jsx121(
|
|
21336
|
+
"div",
|
|
21337
|
+
{
|
|
21338
|
+
css: {
|
|
21339
|
+
gridColumn: "span 6",
|
|
21340
|
+
order: 6
|
|
21341
|
+
},
|
|
21342
|
+
children: /* @__PURE__ */ jsx121(FieldMessage, { errorMessage })
|
|
21343
|
+
}
|
|
21344
|
+
);
|
|
21345
|
+
};
|
|
21346
|
+
var twoColumnGrid = {
|
|
21347
|
+
display: "grid",
|
|
21348
|
+
gridTemplateColumns: "1fr 1fr",
|
|
21349
|
+
gap: "var(--spacing-sm);"
|
|
21350
|
+
};
|
|
21351
|
+
|
|
21352
|
+
// src/components/SearchAndFilter/FilterMenu.tsx
|
|
21353
|
+
import React24, { useEffect as useEffect20 } from "react";
|
|
21354
|
+
import { jsx as jsx122, jsxs as jsxs82 } from "@emotion/react/jsx-runtime";
|
|
21355
|
+
var SearchAndFilterOptionsContainer2 = ({
|
|
21356
|
+
buttonRow,
|
|
21357
|
+
children
|
|
21358
|
+
}) => {
|
|
21359
|
+
return /* @__PURE__ */ jsxs82("div", { css: SearchAndFilterOptionsContainer, "data-testid": "search-and-filter-options", children: [
|
|
21360
|
+
/* @__PURE__ */ jsx122("div", { css: SearchAndFilterOptionsInnerContainer, children }),
|
|
21361
|
+
buttonRow ? /* @__PURE__ */ jsx122(
|
|
21362
|
+
HorizontalRhythm,
|
|
21363
|
+
{
|
|
21364
|
+
css: SearchAndFilterButtonGroup,
|
|
21365
|
+
gap: "sm",
|
|
21366
|
+
align: "center",
|
|
21367
|
+
justify: "space-between",
|
|
21368
|
+
children: buttonRow
|
|
21369
|
+
}
|
|
21370
|
+
) : null
|
|
21371
|
+
] });
|
|
21372
|
+
};
|
|
21373
|
+
var FilterMenu = ({ id, filterTitle = "Show results", menuControls, children }) => {
|
|
21374
|
+
const { filterVisibility, setFilterVisibility } = useSearchAndFilter();
|
|
21375
|
+
const innerMenuRef = React24.useRef(null);
|
|
21376
|
+
useEffect20(() => {
|
|
21377
|
+
var _a;
|
|
21378
|
+
if (filterVisibility) {
|
|
21379
|
+
(_a = innerMenuRef.current) == null ? void 0 : _a.focus();
|
|
21380
|
+
}
|
|
21381
|
+
}, [filterVisibility]);
|
|
21382
|
+
return /* @__PURE__ */ jsx122(VerticalRhythm, { gap: "sm", "aria-haspopup": "true", id, children: filterVisibility ? /* @__PURE__ */ jsxs82(SearchAndFilterOptionsContainer2, { buttonRow: menuControls, children: [
|
|
21383
|
+
/* @__PURE__ */ jsx122("span", { css: Title, ref: innerMenuRef, tabIndex: 0, children: filterTitle }),
|
|
21384
|
+
/* @__PURE__ */ jsx122(
|
|
21385
|
+
"button",
|
|
21386
|
+
{
|
|
21387
|
+
type: "button",
|
|
21388
|
+
"aria-label": "close filters",
|
|
21389
|
+
css: [CloseBtn],
|
|
21390
|
+
onClick: () => setFilterVisibility(void 0),
|
|
21391
|
+
children: /* @__PURE__ */ jsx122(Icon, { icon: "close", iconColor: "currentColor", size: "1.1rem" })
|
|
21392
|
+
}
|
|
21393
|
+
),
|
|
21394
|
+
children
|
|
21395
|
+
] }) : null });
|
|
21396
|
+
};
|
|
21397
|
+
|
|
21398
|
+
// src/components/SearchAndFilter/FilterItem.tsx
|
|
21399
|
+
import { Fragment as Fragment21, jsx as jsx123, jsxs as jsxs83 } from "@emotion/react/jsx-runtime";
|
|
21400
|
+
var FilterItem = ({
|
|
21401
|
+
index,
|
|
21402
|
+
paramOptions,
|
|
21403
|
+
operatorOptions,
|
|
21404
|
+
valueOptions,
|
|
21405
|
+
onParamChange,
|
|
21406
|
+
onOperatorChange,
|
|
21407
|
+
onValueChange
|
|
21408
|
+
}) => {
|
|
21409
|
+
var _a, _b;
|
|
21410
|
+
const { filters, handleDeleteFilter, filterOptions } = useSearchAndFilter();
|
|
21411
|
+
const label = filters[index].field !== "" ? filters[index].field : "unknown filter field";
|
|
21412
|
+
const operatorLabel = filters[index].operator !== "" ? `operator ${filters[index].operator}` : "unknown operator";
|
|
21413
|
+
const metaDataLabel = filters[index].value !== "" ? `value ${filters[index].value}` : "unknown value";
|
|
21414
|
+
const metaDataPossibleOptions = (_b = (_a = operatorOptions.find((op) => filters[index].operator === op.value)) == null ? void 0 : _a.editorType) != null ? _b : "singleChoice";
|
|
21415
|
+
const { selectedFieldValue, selectedOperatorValue, selectedMetaValue, readOnly } = useMemo7(() => {
|
|
21416
|
+
var _a2;
|
|
21417
|
+
const currentSelectedFilter = filterOptions.find((item) => {
|
|
21418
|
+
var _a3;
|
|
21419
|
+
return (_a3 = item.options) == null ? void 0 : _a3.find((op) => op.value === filters[index].field);
|
|
21420
|
+
});
|
|
21421
|
+
const selectedFieldValue2 = (_a2 = currentSelectedFilter == null ? void 0 : currentSelectedFilter.options) == null ? void 0 : _a2.find((item) => {
|
|
21422
|
+
return filters[index].field === item.value;
|
|
21423
|
+
});
|
|
21424
|
+
const isCurrentFieldReadOnly = selectedFieldValue2 == null ? void 0 : selectedFieldValue2.readOnly;
|
|
21425
|
+
const selectedOperatorValue2 = operatorOptions == null ? void 0 : operatorOptions.find((item) => {
|
|
21426
|
+
return filters[index].operator === item.value;
|
|
21427
|
+
});
|
|
21428
|
+
const selectedMetaValue2 = valueOptions.filter((item) => {
|
|
21429
|
+
if (Array.isArray(filters[index].value) && item.value) {
|
|
21430
|
+
return filters[index].value.includes(item.value);
|
|
21431
|
+
}
|
|
21432
|
+
return filters[index].value === item.value;
|
|
21433
|
+
});
|
|
21434
|
+
return {
|
|
21435
|
+
selectedFieldValue: selectedFieldValue2,
|
|
21436
|
+
selectedOperatorValue: selectedOperatorValue2 != null ? selectedOperatorValue2 : void 0,
|
|
21437
|
+
selectedMetaValue: selectedMetaValue2.length > 0 ? selectedMetaValue2 : filters[index].value,
|
|
21438
|
+
readOnly: isCurrentFieldReadOnly
|
|
21439
|
+
};
|
|
21440
|
+
}, [filters, filterOptions, index, operatorOptions, valueOptions]);
|
|
21441
|
+
const readOnlyProps = readOnly ? {
|
|
21442
|
+
"aria-readonly": true,
|
|
21443
|
+
isSearchable: false,
|
|
21444
|
+
menuIsOpen: false,
|
|
21445
|
+
isClearable: false
|
|
21446
|
+
} : {};
|
|
21447
|
+
return /* @__PURE__ */ jsxs83("div", { css: ConditionalFilterRow, "data-testid": "filter-item", children: [
|
|
21448
|
+
/* @__PURE__ */ jsx123("span", { children: index === 0 ? "Where" : "and" }),
|
|
21449
|
+
/* @__PURE__ */ jsxs83("div", { css: ConditionalInputRow, children: [
|
|
21450
|
+
/* @__PURE__ */ jsx123(
|
|
21451
|
+
InputComboBox,
|
|
21452
|
+
{
|
|
21453
|
+
"aria-label": label,
|
|
21454
|
+
options: paramOptions,
|
|
21455
|
+
onChange: (e) => {
|
|
21456
|
+
var _a2;
|
|
21457
|
+
onParamChange((_a2 = e == null ? void 0 : e.value) != null ? _a2 : "");
|
|
21458
|
+
},
|
|
21459
|
+
isOptionDisabled: (option) => {
|
|
21460
|
+
var _a2;
|
|
21461
|
+
return (_a2 = option == null ? void 0 : option.disabled) != null ? _a2 : false;
|
|
21462
|
+
},
|
|
21463
|
+
styles: {
|
|
21464
|
+
menu(base) {
|
|
21465
|
+
return {
|
|
21466
|
+
...base,
|
|
21467
|
+
minWidth: "max-content"
|
|
21468
|
+
};
|
|
21469
|
+
}
|
|
21470
|
+
},
|
|
21471
|
+
value: selectedFieldValue,
|
|
21472
|
+
...readOnlyProps,
|
|
21473
|
+
id: "filter-field"
|
|
21474
|
+
}
|
|
21475
|
+
),
|
|
21476
|
+
/* @__PURE__ */ jsx123(
|
|
21477
|
+
InputComboBox,
|
|
21478
|
+
{
|
|
21479
|
+
"aria-label": operatorLabel,
|
|
21480
|
+
options: operatorOptions,
|
|
21481
|
+
onChange: (e) => {
|
|
21482
|
+
var _a2;
|
|
21483
|
+
return onOperatorChange((_a2 = e == null ? void 0 : e.value) != null ? _a2 : "");
|
|
21484
|
+
},
|
|
21485
|
+
isDisabled: !filters[index].field,
|
|
21486
|
+
value: selectedOperatorValue,
|
|
21487
|
+
styles: {
|
|
21488
|
+
menu(base) {
|
|
21489
|
+
return {
|
|
21490
|
+
...base,
|
|
21491
|
+
minWidth: "max-content"
|
|
21492
|
+
};
|
|
21493
|
+
}
|
|
21494
|
+
},
|
|
21495
|
+
...readOnlyProps,
|
|
21496
|
+
id: "filter-operator"
|
|
21497
|
+
}
|
|
21498
|
+
),
|
|
21499
|
+
/* @__PURE__ */ jsx123(
|
|
21500
|
+
FilterEditorRenderer,
|
|
21501
|
+
{
|
|
21502
|
+
"aria-label": metaDataLabel,
|
|
21503
|
+
editorType: metaDataPossibleOptions,
|
|
21504
|
+
options: valueOptions,
|
|
21505
|
+
onChange: (e) => onValueChange(e != null ? e : ""),
|
|
21506
|
+
readOnly,
|
|
21507
|
+
isDisabled: !filters[index].operator,
|
|
21508
|
+
value: selectedMetaValue,
|
|
21509
|
+
valueTestId: "filter-value"
|
|
21510
|
+
}
|
|
21511
|
+
),
|
|
21512
|
+
readOnly ? null : /* @__PURE__ */ jsx123(
|
|
21513
|
+
"button",
|
|
21514
|
+
{
|
|
21515
|
+
type: "button",
|
|
21516
|
+
onClick: () => handleDeleteFilter(index),
|
|
21517
|
+
"aria-label": "delete filter",
|
|
21518
|
+
css: IconBtn,
|
|
21519
|
+
"data-testid": "delete-filter",
|
|
21520
|
+
children: /* @__PURE__ */ jsx123(Icon, { icon: "trash", iconColor: "red", size: "1rem" })
|
|
21521
|
+
}
|
|
21522
|
+
)
|
|
21523
|
+
] })
|
|
21524
|
+
] });
|
|
21525
|
+
};
|
|
21526
|
+
var FilterItems = ({
|
|
21527
|
+
addButtonText = "add condition",
|
|
21528
|
+
resetButtonText = "reset filters"
|
|
21529
|
+
}) => {
|
|
21530
|
+
const { filterOptions, filters, setFilters, handleAddFilter, handleResetFilters, setFilterVisibility } = useSearchAndFilter();
|
|
21531
|
+
const handleUpdateFilter = (index, prop, value) => {
|
|
21532
|
+
var _a, _b, _c, _d, _e;
|
|
21533
|
+
const next = [...filters];
|
|
21534
|
+
next[index] = { ...next[index], [prop]: value };
|
|
21535
|
+
if (prop === "operator") {
|
|
21536
|
+
next[index].value = "";
|
|
21537
|
+
if (value === "def" || value === "true") {
|
|
21538
|
+
next[index].value = "true";
|
|
21539
|
+
}
|
|
21540
|
+
if (value === "ndef" || value === "false") {
|
|
21541
|
+
next[index].value = "false";
|
|
21542
|
+
}
|
|
21543
|
+
}
|
|
21544
|
+
if (prop === "field") {
|
|
21545
|
+
const firstOperatorInAvailableOperators = (_e = (_d = (_c = (_b = (_a = filterOptions.find((fo) => {
|
|
21546
|
+
var _a2;
|
|
21547
|
+
return (_a2 = fo.options) == null ? void 0 : _a2.find((op) => op.value === value);
|
|
21548
|
+
})) == null ? void 0 : _a.options) == null ? void 0 : _b.find((op) => op.value === next[index].field)) == null ? void 0 : _c.operatorOptions) == null ? void 0 : _d[0].value) != null ? _e : "eq";
|
|
21549
|
+
next[index].operator = firstOperatorInAvailableOperators;
|
|
21550
|
+
next[index].value = "";
|
|
21551
|
+
}
|
|
21552
|
+
setFilters(next);
|
|
21553
|
+
};
|
|
21554
|
+
return /* @__PURE__ */ jsx123(
|
|
21555
|
+
FilterMenu,
|
|
21556
|
+
{
|
|
21557
|
+
id: "search-and-filter-options",
|
|
21558
|
+
menuControls: /* @__PURE__ */ jsxs83(Fragment21, { children: [
|
|
21559
|
+
/* @__PURE__ */ jsxs83(
|
|
21560
|
+
"button",
|
|
21561
|
+
{
|
|
21562
|
+
type: "button",
|
|
21563
|
+
css: AddConditionalBtn,
|
|
21564
|
+
onClick: handleAddFilter,
|
|
21565
|
+
"data-testid": "add-filter",
|
|
21566
|
+
children: [
|
|
21567
|
+
/* @__PURE__ */ jsx123(Icon, { icon: "math-plus", iconColor: "currentColor", size: "1rem" }),
|
|
21568
|
+
addButtonText
|
|
21569
|
+
]
|
|
21570
|
+
}
|
|
21571
|
+
),
|
|
21572
|
+
(filters == null ? void 0 : filters.length) ? /* @__PURE__ */ jsx123(
|
|
21573
|
+
"button",
|
|
21574
|
+
{
|
|
21575
|
+
type: "button",
|
|
21576
|
+
css: ResetConditionsBtn,
|
|
21577
|
+
onClick: () => {
|
|
21578
|
+
handleResetFilters();
|
|
21579
|
+
setFilterVisibility(void 0);
|
|
21580
|
+
},
|
|
21581
|
+
"data-testid": "reset-filters",
|
|
21582
|
+
children: resetButtonText
|
|
21583
|
+
}
|
|
21584
|
+
) : null
|
|
21585
|
+
] }),
|
|
21586
|
+
children: filters.map((item, i) => {
|
|
21587
|
+
var _a, _b, _c, _d, _e, _f;
|
|
21588
|
+
const availableTypeOptions = (_b = (_a = filterOptions.find((fo) => {
|
|
21589
|
+
var _a2;
|
|
21590
|
+
return (_a2 = fo.options) == null ? void 0 : _a2.find((op) => op.value === item.field);
|
|
21591
|
+
})) == null ? void 0 : _a.options) != null ? _b : [];
|
|
21592
|
+
const possibleValueOptions = (_d = (_c = availableTypeOptions == null ? void 0 : availableTypeOptions.find((op) => op.value === item.field)) == null ? void 0 : _c.valueOptions) != null ? _d : [];
|
|
21593
|
+
const possibleOperators = (_f = (_e = availableTypeOptions == null ? void 0 : availableTypeOptions.find((op) => op.value === item.field)) == null ? void 0 : _e.operatorOptions) != null ? _f : [];
|
|
21594
|
+
return /* @__PURE__ */ jsx123(
|
|
21595
|
+
FilterItem,
|
|
21596
|
+
{
|
|
21597
|
+
index: i,
|
|
21598
|
+
paramOptions: filterOptions,
|
|
21599
|
+
onParamChange: (e) => handleUpdateFilter(i, "field", e),
|
|
21600
|
+
operatorOptions: possibleOperators,
|
|
21601
|
+
onOperatorChange: (e) => handleUpdateFilter(i, "operator", e),
|
|
21602
|
+
onValueChange: (e) => handleUpdateFilter(i, "value", e),
|
|
21603
|
+
valueOptions: possibleValueOptions
|
|
21604
|
+
},
|
|
21605
|
+
i
|
|
21606
|
+
);
|
|
21607
|
+
})
|
|
21608
|
+
}
|
|
21609
|
+
);
|
|
21610
|
+
};
|
|
21611
|
+
|
|
21612
|
+
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
21613
|
+
import { css as css95 } from "@emotion/react";
|
|
21614
|
+
import { CgCheck as CgCheck4 } from "@react-icons/all-files/cg/CgCheck";
|
|
21615
|
+
import { useCallback as useCallback11, useMemo as useMemo8 } from "react";
|
|
21616
|
+
|
|
21617
|
+
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
21618
|
+
import { css as css94 } from "@emotion/react";
|
|
21619
|
+
var segmentedControlStyles = css94`
|
|
21620
|
+
--segmented-control-rounded-value: var(--rounded-base);
|
|
21621
|
+
--segmented-control-border-width: 1px;
|
|
21622
|
+
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
21623
|
+
--segmented-control-first-border-radius: var(--segmented-control-rounded-value) 0 0
|
|
21624
|
+
var(--segmented-control-rounded-value);
|
|
21625
|
+
--segmented-control-last-border-radius: 0 var(--segmented-control-rounded-value)
|
|
21626
|
+
var(--segmented-control-rounded-value) 0;
|
|
21627
|
+
|
|
21628
|
+
position: relative;
|
|
21629
|
+
display: flex;
|
|
21630
|
+
justify-content: flex-start;
|
|
21631
|
+
width: fit-content;
|
|
21632
|
+
background-color: var(--gray-300);
|
|
21633
|
+
padding: var(--segmented-control-border-width);
|
|
21634
|
+
gap: var(--segmented-control-border-width);
|
|
21635
|
+
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
21636
|
+
font-size: var(--fs-xs);
|
|
21637
|
+
`;
|
|
21638
|
+
var segmentedControlVerticalStyles = css94`
|
|
21639
|
+
flex-direction: column;
|
|
21640
|
+
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
21641
|
+
var(--segmented-control-rounded-value) 0 0;
|
|
21642
|
+
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
21643
|
+
var(--segmented-control-rounded-value);
|
|
21644
|
+
`;
|
|
21645
|
+
var segmentedControlItemStyles = css94`
|
|
21646
|
+
&:first-of-type label {
|
|
21647
|
+
border-radius: var(--segmented-control-first-border-radius);
|
|
21648
|
+
}
|
|
21649
|
+
&:last-of-type label {
|
|
21650
|
+
border-radius: var(--segmented-control-last-border-radius);
|
|
21651
|
+
}
|
|
21652
|
+
`;
|
|
21653
|
+
var segmentedControlInputStyles = css94`
|
|
21654
|
+
${accessibleHidden}
|
|
21655
|
+
`;
|
|
21656
|
+
var segmentedControlLabelStyles = (checked, disabled2) => css94`
|
|
21657
|
+
position: relative;
|
|
21658
|
+
display: flex;
|
|
21659
|
+
align-items: center;
|
|
21660
|
+
justify-content: center;
|
|
21661
|
+
height: 2rem;
|
|
21662
|
+
padding-inline: var(--spacing-base);
|
|
21663
|
+
background-color: white;
|
|
21664
|
+
transition-property: background-color, color, box-shadow;
|
|
21665
|
+
transition-duration: var(--duration-xfast);
|
|
21666
|
+
transition-timing-function: ease-in-out;
|
|
21667
|
+
z-index: 1;
|
|
21668
|
+
cursor: pointer;
|
|
21669
|
+
|
|
21670
|
+
&:has(:checked:not(:disabled)) {
|
|
21671
|
+
background-color: var(--segmented-control-selected-color);
|
|
21672
|
+
outline: var(--segmented-control-border-width) solid var(--segmented-control-selected-color);
|
|
21673
|
+
box-shadow: 0 0.43em 1.7em 0 rgba(0, 0, 0, 0.15);
|
|
21674
|
+
color: white;
|
|
21675
|
+
-webkit-text-stroke-width: thin;
|
|
21676
|
+
z-index: 0;
|
|
21677
|
+
}
|
|
21678
|
+
|
|
21679
|
+
&:hover:not(:has(:disabled, :checked)) {
|
|
21680
|
+
background-color: var(--gray-100);
|
|
21681
|
+
}
|
|
21682
|
+
|
|
21683
|
+
&:has(:disabled) {
|
|
21684
|
+
color: var(--gray-400);
|
|
21685
|
+
cursor: default;
|
|
21686
|
+
}
|
|
21687
|
+
|
|
21688
|
+
&:has(:checked:disabled) {
|
|
21689
|
+
color: var(--gray-50);
|
|
21690
|
+
background-color: var(--gray-400);
|
|
21691
|
+
}
|
|
21692
|
+
|
|
21693
|
+
// Firefox fallback using emotion variables
|
|
21694
|
+
// we can delete this whole block of code and variables in SegmentedControl.tsx
|
|
21695
|
+
// once Firefox supports :has selector
|
|
21696
|
+
@supports not selector(:has(*)) {
|
|
20145
21697
|
// equivalent to &:has(:checked:not(:disabled))
|
|
20146
21698
|
${checked && !disabled2 ? `
|
|
20147
21699
|
background-color: var(--segmented-control-selected-color);
|
|
@@ -20168,23 +21720,23 @@ var segmentedControlLabelStyles = (checked, disabled2) => css92`
|
|
|
20168
21720
|
`}
|
|
20169
21721
|
}
|
|
20170
21722
|
`;
|
|
20171
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
21723
|
+
var segmentedControlLabelIconOnlyStyles = css94`
|
|
20172
21724
|
padding-inline: 0.5em;
|
|
20173
21725
|
`;
|
|
20174
|
-
var segmentedControlLabelCheckStyles =
|
|
21726
|
+
var segmentedControlLabelCheckStyles = css94`
|
|
20175
21727
|
opacity: 0.5;
|
|
20176
21728
|
`;
|
|
20177
|
-
var segmentedControlLabelContentStyles =
|
|
21729
|
+
var segmentedControlLabelContentStyles = css94`
|
|
20178
21730
|
display: flex;
|
|
20179
21731
|
align-items: center;
|
|
20180
21732
|
justify-content: center;
|
|
20181
21733
|
gap: var(--spacing-sm);
|
|
20182
21734
|
height: 100%;
|
|
20183
21735
|
`;
|
|
20184
|
-
var segmentedControlLabelTextStyles =
|
|
21736
|
+
var segmentedControlLabelTextStyles = css94``;
|
|
20185
21737
|
|
|
20186
21738
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
20187
|
-
import { jsx as
|
|
21739
|
+
import { jsx as jsx124, jsxs as jsxs84 } from "@emotion/react/jsx-runtime";
|
|
20188
21740
|
var SegmentedControl = ({
|
|
20189
21741
|
name,
|
|
20190
21742
|
options,
|
|
@@ -20196,7 +21748,7 @@ var SegmentedControl = ({
|
|
|
20196
21748
|
size = "md",
|
|
20197
21749
|
...props
|
|
20198
21750
|
}) => {
|
|
20199
|
-
const onOptionChange =
|
|
21751
|
+
const onOptionChange = useCallback11(
|
|
20200
21752
|
(event) => {
|
|
20201
21753
|
if (event.target.checked) {
|
|
20202
21754
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -20204,18 +21756,18 @@ var SegmentedControl = ({
|
|
|
20204
21756
|
},
|
|
20205
21757
|
[options, onChange]
|
|
20206
21758
|
);
|
|
20207
|
-
const sizeStyles =
|
|
21759
|
+
const sizeStyles = useMemo8(() => {
|
|
20208
21760
|
const map = {
|
|
20209
|
-
sm:
|
|
20210
|
-
md:
|
|
20211
|
-
lg:
|
|
21761
|
+
sm: css95({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
21762
|
+
md: css95({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
21763
|
+
lg: css95({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" })
|
|
20212
21764
|
};
|
|
20213
21765
|
return map[size];
|
|
20214
21766
|
}, [size]);
|
|
20215
|
-
const isIconOnly =
|
|
21767
|
+
const isIconOnly = useMemo8(() => {
|
|
20216
21768
|
return options.every((option) => option && option.icon && !option.label);
|
|
20217
21769
|
}, [options]);
|
|
20218
|
-
return /* @__PURE__ */
|
|
21770
|
+
return /* @__PURE__ */ jsx124(
|
|
20219
21771
|
"div",
|
|
20220
21772
|
{
|
|
20221
21773
|
css: [segmentedControlStyles, orientation === "vertical" ? segmentedControlVerticalStyles : void 0],
|
|
@@ -20227,7 +21779,7 @@ var SegmentedControl = ({
|
|
|
20227
21779
|
}
|
|
20228
21780
|
const text = option.label ? option.label : option.icon ? null : String(option.value);
|
|
20229
21781
|
const isDisabled = disabled2 || option.disabled;
|
|
20230
|
-
return /* @__PURE__ */
|
|
21782
|
+
return /* @__PURE__ */ jsx124(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ jsx124("div", { css: segmentedControlItemStyles, "data-testid": "container-segmented-control", children: /* @__PURE__ */ jsxs84(
|
|
20231
21783
|
"label",
|
|
20232
21784
|
{
|
|
20233
21785
|
css: [
|
|
@@ -20236,7 +21788,7 @@ var SegmentedControl = ({
|
|
|
20236
21788
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
20237
21789
|
],
|
|
20238
21790
|
children: [
|
|
20239
|
-
/* @__PURE__ */
|
|
21791
|
+
/* @__PURE__ */ jsx124(
|
|
20240
21792
|
"input",
|
|
20241
21793
|
{
|
|
20242
21794
|
css: segmentedControlInputStyles,
|
|
@@ -20248,10 +21800,10 @@ var SegmentedControl = ({
|
|
|
20248
21800
|
disabled: isDisabled
|
|
20249
21801
|
}
|
|
20250
21802
|
),
|
|
20251
|
-
option.value !== value || noCheckmark ? null : /* @__PURE__ */
|
|
20252
|
-
/* @__PURE__ */
|
|
20253
|
-
!option.icon ? null : /* @__PURE__ */
|
|
20254
|
-
!text ? null : /* @__PURE__ */
|
|
21803
|
+
option.value !== value || noCheckmark ? null : /* @__PURE__ */ jsx124(CgCheck4, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
|
|
21804
|
+
/* @__PURE__ */ jsxs84("span", { css: segmentedControlLabelContentStyles, children: [
|
|
21805
|
+
!option.icon ? null : /* @__PURE__ */ jsx124(Icon, { icon: option.icon, size: "1.5em", iconColor: "currentColor" }),
|
|
21806
|
+
!text ? null : /* @__PURE__ */ jsx124("span", { css: segmentedControlLabelTextStyles, children: text })
|
|
20255
21807
|
] })
|
|
20256
21808
|
]
|
|
20257
21809
|
}
|
|
@@ -20261,19 +21813,219 @@ var SegmentedControl = ({
|
|
|
20261
21813
|
);
|
|
20262
21814
|
};
|
|
20263
21815
|
|
|
21816
|
+
// src/components/SearchAndFilter/SortItems.tsx
|
|
21817
|
+
import { jsx as jsx125, jsxs as jsxs85 } from "@emotion/react/jsx-runtime";
|
|
21818
|
+
var SortItems = () => {
|
|
21819
|
+
var _a, _b;
|
|
21820
|
+
const { sortOptions, setSortBy, sortByValue } = useSearchAndFilter();
|
|
21821
|
+
const values = sortByValue.split("_");
|
|
21822
|
+
const sortDirection = values.pop();
|
|
21823
|
+
const sortField = values.join("_");
|
|
21824
|
+
const currentSelectedOption = (_b = (_a = sortOptions.find((item) => {
|
|
21825
|
+
var _a2;
|
|
21826
|
+
return (_a2 = item.options) == null ? void 0 : _a2.find((option) => option.value === sortField);
|
|
21827
|
+
})) == null ? void 0 : _a.options) == null ? void 0 : _b.find((nestedOption) => nestedOption.value === sortField);
|
|
21828
|
+
return /* @__PURE__ */ jsx125(FilterMenu, { id: "search-and-filter-options", filterTitle: "Sort by", children: /* @__PURE__ */ jsxs85("div", { css: SortFilterInputRow, children: [
|
|
21829
|
+
/* @__PURE__ */ jsx125(
|
|
21830
|
+
InputComboBox,
|
|
21831
|
+
{
|
|
21832
|
+
options: sortOptions,
|
|
21833
|
+
onChange: (e) => {
|
|
21834
|
+
const fieldName = e == null ? void 0 : e.value;
|
|
21835
|
+
setSortBy(`${fieldName}_${sortDirection}`);
|
|
21836
|
+
},
|
|
21837
|
+
styles: {
|
|
21838
|
+
menu(base) {
|
|
21839
|
+
return {
|
|
21840
|
+
...base,
|
|
21841
|
+
minWidth: "max-content"
|
|
21842
|
+
};
|
|
21843
|
+
}
|
|
21844
|
+
},
|
|
21845
|
+
value: currentSelectedOption
|
|
21846
|
+
}
|
|
21847
|
+
),
|
|
21848
|
+
/* @__PURE__ */ jsx125(
|
|
21849
|
+
SegmentedControl,
|
|
21850
|
+
{
|
|
21851
|
+
noCheckmark: true,
|
|
21852
|
+
name: "sortBy",
|
|
21853
|
+
options: [
|
|
21854
|
+
{ label: "Ascending", value: `ASC` },
|
|
21855
|
+
{ label: "Descending", value: `DESC` }
|
|
21856
|
+
],
|
|
21857
|
+
onChange: (e) => setSortBy(`${sortField}_${e}`),
|
|
21858
|
+
value: sortDirection
|
|
21859
|
+
}
|
|
21860
|
+
)
|
|
21861
|
+
] }) });
|
|
21862
|
+
};
|
|
21863
|
+
|
|
21864
|
+
// src/components/SearchAndFilter/FilterModeView.tsx
|
|
21865
|
+
import { jsx as jsx126 } from "@emotion/react/jsx-runtime";
|
|
21866
|
+
var FilterModeView = () => {
|
|
21867
|
+
const { filterVisibility } = useSearchAndFilter();
|
|
21868
|
+
const modeView = {
|
|
21869
|
+
filters: /* @__PURE__ */ jsx126(FilterItems, {}),
|
|
21870
|
+
sort: /* @__PURE__ */ jsx126(SortItems, {})
|
|
21871
|
+
};
|
|
21872
|
+
return filterVisibility ? modeView[filterVisibility] : null;
|
|
21873
|
+
};
|
|
21874
|
+
|
|
21875
|
+
// src/components/SearchAndFilter/SearchAndFilterResultContainer.tsx
|
|
21876
|
+
import { Fragment as Fragment22, jsx as jsx127, jsxs as jsxs86 } from "@emotion/react/jsx-runtime";
|
|
21877
|
+
var SearchAndFilterResultContainer = ({
|
|
21878
|
+
buttonText,
|
|
21879
|
+
clearButtonLabel = "clear",
|
|
21880
|
+
calloutTitle: calloutTitle2,
|
|
21881
|
+
calloutText,
|
|
21882
|
+
onHandleClear
|
|
21883
|
+
}) => {
|
|
21884
|
+
const { searchTerm, setSearchTerm, totalResults, setFilters, filters } = useSearchAndFilter();
|
|
21885
|
+
const automateCalloutTitle = () => {
|
|
21886
|
+
if (searchTerm && !filters.length) {
|
|
21887
|
+
return "No search results found";
|
|
21888
|
+
}
|
|
21889
|
+
if (filters.length && !searchTerm) {
|
|
21890
|
+
return "No results match the selected filters";
|
|
21891
|
+
}
|
|
21892
|
+
return "No matching results found";
|
|
21893
|
+
};
|
|
21894
|
+
const handleResetFilters = () => {
|
|
21895
|
+
if (searchTerm && !filters.length) {
|
|
21896
|
+
setSearchTerm("");
|
|
21897
|
+
return;
|
|
21898
|
+
} else if (!searchTerm && filters.length) {
|
|
21899
|
+
setFilters([{ field: "", operator: "", value: "" }]);
|
|
21900
|
+
return;
|
|
21901
|
+
} else {
|
|
21902
|
+
setSearchTerm("");
|
|
21903
|
+
setFilters([{ field: "", operator: "", value: "" }]);
|
|
21904
|
+
return;
|
|
21905
|
+
}
|
|
21906
|
+
};
|
|
21907
|
+
if (totalResults && totalResults > 0) {
|
|
21908
|
+
return null;
|
|
21909
|
+
}
|
|
21910
|
+
return /* @__PURE__ */ jsxs86(Fragment22, { children: [
|
|
21911
|
+
/* @__PURE__ */ jsxs86(HorizontalRhythm, { children: [
|
|
21912
|
+
/* @__PURE__ */ jsxs86("span", { children: [
|
|
21913
|
+
totalResults,
|
|
21914
|
+
" results ",
|
|
21915
|
+
searchTerm ? `for "${searchTerm}"` : null
|
|
21916
|
+
] }),
|
|
21917
|
+
!searchTerm ? null : /* @__PURE__ */ jsx127(Button, { buttonType: "ghostDestructive", size: "zero", onClick: () => setSearchTerm(""), children: clearButtonLabel })
|
|
21918
|
+
] }),
|
|
21919
|
+
totalResults === 0 ? /* @__PURE__ */ jsxs86(Callout, { title: calloutTitle2 != null ? calloutTitle2 : automateCalloutTitle(), type: "note", children: [
|
|
21920
|
+
calloutText ? /* @__PURE__ */ jsx127(Paragraph, { children: calloutText }) : null,
|
|
21921
|
+
/* @__PURE__ */ jsx127(Button, { buttonType: "tertiaryOutline", size: "xs", onClick: onHandleClear != null ? onHandleClear : handleResetFilters, children: buttonText != null ? buttonText : "Clear search" })
|
|
21922
|
+
] }) : null
|
|
21923
|
+
] });
|
|
21924
|
+
};
|
|
21925
|
+
|
|
21926
|
+
// src/components/SearchAndFilter/SearchAndFilter.tsx
|
|
21927
|
+
import { jsx as jsx128, jsxs as jsxs87 } from "@emotion/react/jsx-runtime";
|
|
21928
|
+
var SearchAndFilter = ({
|
|
21929
|
+
filters,
|
|
21930
|
+
filterOptions,
|
|
21931
|
+
filterMode: filterMode3,
|
|
21932
|
+
sortOptions,
|
|
21933
|
+
defaultSortByValue,
|
|
21934
|
+
filterControls,
|
|
21935
|
+
viewSwitchControls,
|
|
21936
|
+
resultsContainerView = /* @__PURE__ */ jsx128(SearchAndFilterResultContainer, {}),
|
|
21937
|
+
children = /* @__PURE__ */ jsx128(FilterModeView, {}),
|
|
21938
|
+
onChange,
|
|
21939
|
+
onSearchChange,
|
|
21940
|
+
onSortChange,
|
|
21941
|
+
totalResults
|
|
21942
|
+
}) => {
|
|
21943
|
+
return /* @__PURE__ */ jsx128(
|
|
21944
|
+
SearchAndFilterProvider,
|
|
21945
|
+
{
|
|
21946
|
+
filters,
|
|
21947
|
+
filterOptions,
|
|
21948
|
+
filterMode: filterMode3,
|
|
21949
|
+
defaultSortByValue,
|
|
21950
|
+
sortOptions,
|
|
21951
|
+
onChange,
|
|
21952
|
+
onSearchChange,
|
|
21953
|
+
onSortChange,
|
|
21954
|
+
totalResults,
|
|
21955
|
+
children: /* @__PURE__ */ jsxs87(VerticalRhythm, { css: SearchAndFilterContainer, "data-testid": "search-and-filter", children: [
|
|
21956
|
+
/* @__PURE__ */ jsxs87("div", { css: SearchAndFilterOutterControlWrapper(viewSwitchControls ? "1fr auto" : "1fr"), children: [
|
|
21957
|
+
/* @__PURE__ */ jsx128(
|
|
21958
|
+
"div",
|
|
21959
|
+
{
|
|
21960
|
+
css: SearchAndFilterControlsWrapper(
|
|
21961
|
+
viewSwitchControls ? "auto auto 1fr 0.5fr" : "auto auto 1fr"
|
|
21962
|
+
),
|
|
21963
|
+
children: !filterControls ? /* @__PURE__ */ jsx128(FilterControls, { hideSearchInput: !onSearchChange, defaultSortByValue }) : filterControls
|
|
21964
|
+
}
|
|
21965
|
+
),
|
|
21966
|
+
viewSwitchControls
|
|
21967
|
+
] }),
|
|
21968
|
+
children,
|
|
21969
|
+
resultsContainerView
|
|
21970
|
+
] })
|
|
21971
|
+
}
|
|
21972
|
+
);
|
|
21973
|
+
};
|
|
21974
|
+
|
|
21975
|
+
// src/components/SearchAndFilter/SearchOnlyFilter.tsx
|
|
21976
|
+
import { createContext as createContext7, useState as useState19 } from "react";
|
|
21977
|
+
import { useDebounce as useDebounce4 } from "react-use";
|
|
21978
|
+
import { jsx as jsx129 } from "@emotion/react/jsx-runtime";
|
|
21979
|
+
var SearchOnlyContext = createContext7({
|
|
21980
|
+
searchTerm: "",
|
|
21981
|
+
setSearchTerm: () => {
|
|
21982
|
+
}
|
|
21983
|
+
});
|
|
21984
|
+
var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
|
|
21985
|
+
const { searchTerm, setSearchTerm } = useSearchAndFilter();
|
|
21986
|
+
const [localeSearchTerm, setLocaleSearchTerm] = useState19("");
|
|
21987
|
+
useDebounce4(
|
|
21988
|
+
() => {
|
|
21989
|
+
setSearchTerm(localeSearchTerm);
|
|
21990
|
+
onSearchChange == null ? void 0 : onSearchChange(localeSearchTerm);
|
|
21991
|
+
},
|
|
21992
|
+
300,
|
|
21993
|
+
[localeSearchTerm]
|
|
21994
|
+
);
|
|
21995
|
+
return /* @__PURE__ */ jsx129(
|
|
21996
|
+
SearchOnlyContext.Provider,
|
|
21997
|
+
{
|
|
21998
|
+
value: {
|
|
21999
|
+
searchTerm,
|
|
22000
|
+
setSearchTerm: setLocaleSearchTerm
|
|
22001
|
+
},
|
|
22002
|
+
children: /* @__PURE__ */ jsx129("div", { css: { maxWidth: maxWidth != null ? maxWidth : "712px" }, children: /* @__PURE__ */ jsx129(
|
|
22003
|
+
InputKeywordSearch,
|
|
22004
|
+
{
|
|
22005
|
+
placeholder: "Search...",
|
|
22006
|
+
onSearchTextChanged: (e) => setLocaleSearchTerm(e),
|
|
22007
|
+
value: localeSearchTerm,
|
|
22008
|
+
compact: true,
|
|
22009
|
+
rounded: true
|
|
22010
|
+
}
|
|
22011
|
+
) })
|
|
22012
|
+
}
|
|
22013
|
+
);
|
|
22014
|
+
};
|
|
22015
|
+
|
|
20264
22016
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
20265
|
-
import { css as
|
|
22017
|
+
import { css as css96, keyframes as keyframes5 } from "@emotion/react";
|
|
20266
22018
|
var lightFadingOut = keyframes5`
|
|
20267
22019
|
from { opacity: 0.1; }
|
|
20268
22020
|
to { opacity: 0.025; }
|
|
20269
22021
|
`;
|
|
20270
|
-
var skeletonStyles =
|
|
22022
|
+
var skeletonStyles = css96`
|
|
20271
22023
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
20272
22024
|
background-color: var(--gray-900);
|
|
20273
22025
|
`;
|
|
20274
22026
|
|
|
20275
22027
|
// src/components/Skeleton/Skeleton.tsx
|
|
20276
|
-
import { jsx as
|
|
22028
|
+
import { jsx as jsx130 } from "@emotion/react/jsx-runtime";
|
|
20277
22029
|
var Skeleton = ({
|
|
20278
22030
|
width = "100%",
|
|
20279
22031
|
height = "1.25rem",
|
|
@@ -20281,7 +22033,7 @@ var Skeleton = ({
|
|
|
20281
22033
|
circle = false,
|
|
20282
22034
|
children,
|
|
20283
22035
|
...otherProps
|
|
20284
|
-
}) => /* @__PURE__ */
|
|
22036
|
+
}) => /* @__PURE__ */ jsx130(
|
|
20285
22037
|
"div",
|
|
20286
22038
|
{
|
|
20287
22039
|
css: [
|
|
@@ -20301,11 +22053,11 @@ var Skeleton = ({
|
|
|
20301
22053
|
);
|
|
20302
22054
|
|
|
20303
22055
|
// src/components/Switch/Switch.tsx
|
|
20304
|
-
import * as
|
|
22056
|
+
import * as React26 from "react";
|
|
20305
22057
|
|
|
20306
22058
|
// src/components/Switch/Switch.styles.ts
|
|
20307
|
-
import { css as
|
|
20308
|
-
var SwitchInputContainer =
|
|
22059
|
+
import { css as css97 } from "@emotion/react";
|
|
22060
|
+
var SwitchInputContainer = css97`
|
|
20309
22061
|
cursor: pointer;
|
|
20310
22062
|
display: inline-block;
|
|
20311
22063
|
position: relative;
|
|
@@ -20314,7 +22066,7 @@ var SwitchInputContainer = css95`
|
|
|
20314
22066
|
vertical-align: middle;
|
|
20315
22067
|
user-select: none;
|
|
20316
22068
|
`;
|
|
20317
|
-
var SwitchInput =
|
|
22069
|
+
var SwitchInput = css97`
|
|
20318
22070
|
appearance: none;
|
|
20319
22071
|
border-radius: var(--rounded-full);
|
|
20320
22072
|
background-color: var(--white);
|
|
@@ -20352,7 +22104,7 @@ var SwitchInput = css95`
|
|
|
20352
22104
|
cursor: not-allowed;
|
|
20353
22105
|
}
|
|
20354
22106
|
`;
|
|
20355
|
-
var SwitchInputDisabled =
|
|
22107
|
+
var SwitchInputDisabled = css97`
|
|
20356
22108
|
opacity: var(--opacity-50);
|
|
20357
22109
|
cursor: not-allowed;
|
|
20358
22110
|
|
|
@@ -20360,7 +22112,7 @@ var SwitchInputDisabled = css95`
|
|
|
20360
22112
|
cursor: not-allowed;
|
|
20361
22113
|
}
|
|
20362
22114
|
`;
|
|
20363
|
-
var SwitchInputLabel =
|
|
22115
|
+
var SwitchInputLabel = css97`
|
|
20364
22116
|
align-items: center;
|
|
20365
22117
|
color: var(--typography-base);
|
|
20366
22118
|
display: inline-flex;
|
|
@@ -20381,37 +22133,37 @@ var SwitchInputLabel = css95`
|
|
|
20381
22133
|
top: 0;
|
|
20382
22134
|
}
|
|
20383
22135
|
`;
|
|
20384
|
-
var SwitchText =
|
|
22136
|
+
var SwitchText = css97`
|
|
20385
22137
|
color: var(--gray-500);
|
|
20386
22138
|
font-size: var(--fs-sm);
|
|
20387
22139
|
padding-inline: var(--spacing-2xl) 0;
|
|
20388
22140
|
`;
|
|
20389
22141
|
|
|
20390
22142
|
// src/components/Switch/Switch.tsx
|
|
20391
|
-
import { Fragment as
|
|
20392
|
-
var Switch =
|
|
22143
|
+
import { Fragment as Fragment23, jsx as jsx131, jsxs as jsxs88 } from "@emotion/react/jsx-runtime";
|
|
22144
|
+
var Switch = React26.forwardRef(
|
|
20393
22145
|
({ label, infoText, toggleText, children, ...inputProps }, ref) => {
|
|
20394
22146
|
let additionalText = infoText;
|
|
20395
22147
|
if (infoText && toggleText) {
|
|
20396
22148
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
20397
22149
|
}
|
|
20398
|
-
return /* @__PURE__ */
|
|
20399
|
-
/* @__PURE__ */
|
|
20400
|
-
/* @__PURE__ */
|
|
20401
|
-
/* @__PURE__ */
|
|
22150
|
+
return /* @__PURE__ */ jsxs88(Fragment23, { children: [
|
|
22151
|
+
/* @__PURE__ */ jsxs88("label", { css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0], children: [
|
|
22152
|
+
/* @__PURE__ */ jsx131("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
|
|
22153
|
+
/* @__PURE__ */ jsx131("span", { css: SwitchInputLabel, children: label })
|
|
20402
22154
|
] }),
|
|
20403
|
-
additionalText ? /* @__PURE__ */
|
|
22155
|
+
additionalText ? /* @__PURE__ */ jsx131("p", { css: SwitchText, children: additionalText }) : null,
|
|
20404
22156
|
children
|
|
20405
22157
|
] });
|
|
20406
22158
|
}
|
|
20407
22159
|
);
|
|
20408
22160
|
|
|
20409
22161
|
// src/components/Table/Table.tsx
|
|
20410
|
-
import * as
|
|
22162
|
+
import * as React27 from "react";
|
|
20411
22163
|
|
|
20412
22164
|
// src/components/Table/Table.styles.ts
|
|
20413
|
-
import { css as
|
|
20414
|
-
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) =>
|
|
22165
|
+
import { css as css98 } from "@emotion/react";
|
|
22166
|
+
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => css98`
|
|
20415
22167
|
border-bottom: 1px solid var(--gray-400);
|
|
20416
22168
|
border-collapse: collapse;
|
|
20417
22169
|
min-width: 100%;
|
|
@@ -20422,55 +22174,55 @@ var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => css96
|
|
|
20422
22174
|
padding: ${cellPadding};
|
|
20423
22175
|
}
|
|
20424
22176
|
`;
|
|
20425
|
-
var tableHead =
|
|
22177
|
+
var tableHead = css98`
|
|
20426
22178
|
background: var(--gray-100);
|
|
20427
22179
|
color: var(--typography-base);
|
|
20428
22180
|
text-align: left;
|
|
20429
22181
|
`;
|
|
20430
|
-
var tableRow =
|
|
22182
|
+
var tableRow = css98`
|
|
20431
22183
|
border-bottom: 1px solid var(--gray-200);
|
|
20432
22184
|
`;
|
|
20433
|
-
var tableCellHead =
|
|
22185
|
+
var tableCellHead = css98`
|
|
20434
22186
|
font-size: var(--fs-sm);
|
|
20435
22187
|
text-transform: uppercase;
|
|
20436
22188
|
font-weight: var(--fw-bold);
|
|
20437
22189
|
`;
|
|
20438
22190
|
|
|
20439
22191
|
// src/components/Table/Table.tsx
|
|
20440
|
-
import { jsx as
|
|
20441
|
-
var Table =
|
|
22192
|
+
import { jsx as jsx132 } from "@emotion/react/jsx-runtime";
|
|
22193
|
+
var Table = React27.forwardRef(
|
|
20442
22194
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
20443
|
-
return /* @__PURE__ */
|
|
22195
|
+
return /* @__PURE__ */ jsx132("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
20444
22196
|
}
|
|
20445
22197
|
);
|
|
20446
|
-
var TableHead =
|
|
22198
|
+
var TableHead = React27.forwardRef(
|
|
20447
22199
|
({ children, ...otherProps }, ref) => {
|
|
20448
|
-
return /* @__PURE__ */
|
|
22200
|
+
return /* @__PURE__ */ jsx132("thead", { ref, css: tableHead, ...otherProps, children });
|
|
20449
22201
|
}
|
|
20450
22202
|
);
|
|
20451
|
-
var TableBody =
|
|
22203
|
+
var TableBody = React27.forwardRef(
|
|
20452
22204
|
({ children, ...otherProps }, ref) => {
|
|
20453
|
-
return /* @__PURE__ */
|
|
22205
|
+
return /* @__PURE__ */ jsx132("tbody", { ref, ...otherProps, children });
|
|
20454
22206
|
}
|
|
20455
22207
|
);
|
|
20456
|
-
var TableFoot =
|
|
22208
|
+
var TableFoot = React27.forwardRef(
|
|
20457
22209
|
({ children, ...otherProps }, ref) => {
|
|
20458
|
-
return /* @__PURE__ */
|
|
22210
|
+
return /* @__PURE__ */ jsx132("tfoot", { ref, ...otherProps, children });
|
|
20459
22211
|
}
|
|
20460
22212
|
);
|
|
20461
|
-
var TableRow =
|
|
22213
|
+
var TableRow = React27.forwardRef(
|
|
20462
22214
|
({ children, ...otherProps }, ref) => {
|
|
20463
|
-
return /* @__PURE__ */
|
|
22215
|
+
return /* @__PURE__ */ jsx132("tr", { ref, css: tableRow, ...otherProps, children });
|
|
20464
22216
|
}
|
|
20465
22217
|
);
|
|
20466
|
-
var TableCellHead =
|
|
22218
|
+
var TableCellHead = React27.forwardRef(
|
|
20467
22219
|
({ children, ...otherProps }, ref) => {
|
|
20468
|
-
return /* @__PURE__ */
|
|
22220
|
+
return /* @__PURE__ */ jsx132("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
20469
22221
|
}
|
|
20470
22222
|
);
|
|
20471
|
-
var TableCellData =
|
|
22223
|
+
var TableCellData = React27.forwardRef(
|
|
20472
22224
|
({ children, ...otherProps }, ref) => {
|
|
20473
|
-
return /* @__PURE__ */
|
|
22225
|
+
return /* @__PURE__ */ jsx132("td", { ref, ...otherProps, children });
|
|
20474
22226
|
}
|
|
20475
22227
|
);
|
|
20476
22228
|
|
|
@@ -20482,11 +22234,11 @@ import {
|
|
|
20482
22234
|
TabProvider as AriakitTabProvider,
|
|
20483
22235
|
useTabStore as useAriakitTabStore
|
|
20484
22236
|
} from "@ariakit/react";
|
|
20485
|
-
import { useCallback as
|
|
22237
|
+
import { useCallback as useCallback12, useEffect as useEffect21, useMemo as useMemo9 } from "react";
|
|
20486
22238
|
|
|
20487
22239
|
// src/components/Tabs/Tabs.styles.ts
|
|
20488
|
-
import { css as
|
|
20489
|
-
var tabButtonStyles =
|
|
22240
|
+
import { css as css99 } from "@emotion/react";
|
|
22241
|
+
var tabButtonStyles = css99`
|
|
20490
22242
|
align-items: center;
|
|
20491
22243
|
border: 0;
|
|
20492
22244
|
height: 2.5rem;
|
|
@@ -20503,14 +22255,14 @@ var tabButtonStyles = css97`
|
|
|
20503
22255
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
20504
22256
|
}
|
|
20505
22257
|
`;
|
|
20506
|
-
var tabButtonGroupStyles =
|
|
22258
|
+
var tabButtonGroupStyles = css99`
|
|
20507
22259
|
display: flex;
|
|
20508
22260
|
gap: var(--spacing-base);
|
|
20509
22261
|
border-bottom: 1px solid var(--gray-300);
|
|
20510
22262
|
`;
|
|
20511
22263
|
|
|
20512
22264
|
// src/components/Tabs/Tabs.tsx
|
|
20513
|
-
import { jsx as
|
|
22265
|
+
import { jsx as jsx133 } from "@emotion/react/jsx-runtime";
|
|
20514
22266
|
var useCurrentTab = () => {
|
|
20515
22267
|
const context = useAriakitTabStore();
|
|
20516
22268
|
if (!context) {
|
|
@@ -20526,13 +22278,13 @@ var Tabs = ({
|
|
|
20526
22278
|
manual,
|
|
20527
22279
|
...props
|
|
20528
22280
|
}) => {
|
|
20529
|
-
const selected =
|
|
22281
|
+
const selected = useMemo9(() => {
|
|
20530
22282
|
if (selectedId)
|
|
20531
22283
|
return selectedId;
|
|
20532
22284
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
20533
22285
|
}, [selectedId, useHashForState]);
|
|
20534
22286
|
const tab = useAriakitTabStore({ ...props, selectOnMove: !manual, selectedId: selected });
|
|
20535
|
-
const onTabSelect =
|
|
22287
|
+
const onTabSelect = useCallback12(
|
|
20536
22288
|
(value) => {
|
|
20537
22289
|
const selectedValueWithoutNull = value != null ? value : void 0;
|
|
20538
22290
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -20543,36 +22295,36 @@ var Tabs = ({
|
|
|
20543
22295
|
},
|
|
20544
22296
|
[onSelectedIdChange, useHashForState]
|
|
20545
22297
|
);
|
|
20546
|
-
|
|
22298
|
+
useEffect21(() => {
|
|
20547
22299
|
if (selected && selected !== tab.getState().activeId) {
|
|
20548
22300
|
tab.setSelectedId(selected);
|
|
20549
22301
|
}
|
|
20550
22302
|
}, [selected, tab]);
|
|
20551
|
-
return /* @__PURE__ */
|
|
22303
|
+
return /* @__PURE__ */ jsx133(AriakitTabProvider, { store: tab, setSelectedId: onTabSelect, children });
|
|
20552
22304
|
};
|
|
20553
22305
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
20554
|
-
return /* @__PURE__ */
|
|
22306
|
+
return /* @__PURE__ */ jsx133(AriakitTabList, { ...props, css: tabButtonGroupStyles, children });
|
|
20555
22307
|
};
|
|
20556
22308
|
var TabButton = ({
|
|
20557
22309
|
children,
|
|
20558
22310
|
id,
|
|
20559
22311
|
...props
|
|
20560
22312
|
}) => {
|
|
20561
|
-
return /* @__PURE__ */
|
|
22313
|
+
return /* @__PURE__ */ jsx133(AriakitTab, { type: "button", id, ...props, css: tabButtonStyles, children });
|
|
20562
22314
|
};
|
|
20563
22315
|
var TabContent = ({
|
|
20564
22316
|
children,
|
|
20565
22317
|
...props
|
|
20566
22318
|
}) => {
|
|
20567
|
-
return /* @__PURE__ */
|
|
22319
|
+
return /* @__PURE__ */ jsx133(AriakitTabPanel, { ...props, children });
|
|
20568
22320
|
};
|
|
20569
22321
|
|
|
20570
22322
|
// src/components/Toast/Toast.tsx
|
|
20571
22323
|
import { toast, ToastContainer as ToastifyContainer } from "react-toastify";
|
|
20572
22324
|
|
|
20573
22325
|
// src/components/Toast/Toast.styles.ts
|
|
20574
|
-
import { css as
|
|
20575
|
-
var toastContainerStyles =
|
|
22326
|
+
import { css as css100 } from "@emotion/react";
|
|
22327
|
+
var toastContainerStyles = css100`
|
|
20576
22328
|
${functionalColors}
|
|
20577
22329
|
|
|
20578
22330
|
--toastify-color-light: white;
|
|
@@ -20795,9 +22547,9 @@ var toastContainerStyles = css98`
|
|
|
20795
22547
|
`;
|
|
20796
22548
|
|
|
20797
22549
|
// src/components/Toast/Toast.tsx
|
|
20798
|
-
import { jsx as
|
|
22550
|
+
import { jsx as jsx134 } from "@emotion/react/jsx-runtime";
|
|
20799
22551
|
var ToastContainer = ({ limit = 4 }) => {
|
|
20800
|
-
return /* @__PURE__ */
|
|
22552
|
+
return /* @__PURE__ */ jsx134(
|
|
20801
22553
|
ToastifyContainer,
|
|
20802
22554
|
{
|
|
20803
22555
|
css: toastContainerStyles,
|
|
@@ -20809,112 +22561,6 @@ var ToastContainer = ({ limit = 4 }) => {
|
|
|
20809
22561
|
}
|
|
20810
22562
|
);
|
|
20811
22563
|
};
|
|
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
22564
|
export {
|
|
20919
22565
|
AddButton,
|
|
20920
22566
|
AddListButton,
|
|
@@ -20925,6 +22571,7 @@ export {
|
|
|
20925
22571
|
Banner,
|
|
20926
22572
|
Button,
|
|
20927
22573
|
ButtonWithMenu,
|
|
22574
|
+
CHECKBOX_OPERATORS,
|
|
20928
22575
|
Calendar,
|
|
20929
22576
|
Callout,
|
|
20930
22577
|
Caption,
|
|
@@ -20938,9 +22585,11 @@ export {
|
|
|
20938
22585
|
Counter,
|
|
20939
22586
|
CreateTeamIntegrationTile,
|
|
20940
22587
|
CurrentDrawerContext,
|
|
22588
|
+
DATE_OPERATORS,
|
|
20941
22589
|
DashedBox,
|
|
20942
22590
|
DateTimePicker,
|
|
20943
22591
|
DateTimePickerVariant,
|
|
22592
|
+
DebouncedInputKeywordSearch,
|
|
20944
22593
|
DescriptionList,
|
|
20945
22594
|
Details,
|
|
20946
22595
|
DismissibleChipAction,
|
|
@@ -20951,6 +22600,11 @@ export {
|
|
|
20951
22600
|
EditTeamIntegrationTile,
|
|
20952
22601
|
ErrorMessage,
|
|
20953
22602
|
Fieldset,
|
|
22603
|
+
FilterButton2 as FilterButton,
|
|
22604
|
+
FilterControls,
|
|
22605
|
+
FilterItem,
|
|
22606
|
+
FilterItems,
|
|
22607
|
+
FilterMenu,
|
|
20954
22608
|
Heading,
|
|
20955
22609
|
HexModalBackground,
|
|
20956
22610
|
HorizontalRhythm,
|
|
@@ -20995,6 +22649,7 @@ export {
|
|
|
20995
22649
|
MenuItemSeparator,
|
|
20996
22650
|
Modal,
|
|
20997
22651
|
MultilineChip,
|
|
22652
|
+
NUMBER_OPERATORS,
|
|
20998
22653
|
PageHeaderSection,
|
|
20999
22654
|
Pagination,
|
|
21000
22655
|
Paragraph,
|
|
@@ -21027,11 +22682,21 @@ export {
|
|
|
21027
22682
|
ProgressBar,
|
|
21028
22683
|
ProgressList,
|
|
21029
22684
|
ProgressListItem,
|
|
22685
|
+
RICHTEXT_OPERATORS,
|
|
21030
22686
|
ResolveIcon,
|
|
21031
22687
|
RichTextToolbarIcon,
|
|
22688
|
+
SYSTEM_DATE_OPERATORS,
|
|
22689
|
+
SYSTEM_FIELD_OPERATORS,
|
|
21032
22690
|
ScrollableList,
|
|
21033
22691
|
ScrollableListInputItem,
|
|
21034
22692
|
ScrollableListItem,
|
|
22693
|
+
SearchAndFilter,
|
|
22694
|
+
SearchAndFilterContext,
|
|
22695
|
+
SearchAndFilterOptionsContainer2 as SearchAndFilterOptionsContainer,
|
|
22696
|
+
SearchAndFilterProvider,
|
|
22697
|
+
SearchAndFilterResultContainer,
|
|
22698
|
+
SearchOnlyContext,
|
|
22699
|
+
SearchOnlyFilter,
|
|
21035
22700
|
SegmentedControl,
|
|
21036
22701
|
ShortcutContext,
|
|
21037
22702
|
ShortcutRevealer,
|
|
@@ -21040,6 +22705,7 @@ export {
|
|
|
21040
22705
|
SuccessMessage,
|
|
21041
22706
|
Switch,
|
|
21042
22707
|
TAKEOVER_STACK_ID,
|
|
22708
|
+
TEXTBOX_OPERATORS,
|
|
21043
22709
|
TabButton,
|
|
21044
22710
|
TabButtonGroup,
|
|
21045
22711
|
TabContent,
|
|
@@ -21060,6 +22726,7 @@ export {
|
|
|
21060
22726
|
ToastContainer,
|
|
21061
22727
|
Tooltip,
|
|
21062
22728
|
TwoColumnLayout,
|
|
22729
|
+
USER_OPERATORS,
|
|
21063
22730
|
UniformBadge,
|
|
21064
22731
|
UniformLogo,
|
|
21065
22732
|
UniformLogoLarge,
|
|
@@ -21141,6 +22808,7 @@ export {
|
|
|
21141
22808
|
useIconContext,
|
|
21142
22809
|
useOutsideClick,
|
|
21143
22810
|
useParameterShell,
|
|
22811
|
+
useSearchAndFilter,
|
|
21144
22812
|
useShortcut,
|
|
21145
22813
|
warningIcon,
|
|
21146
22814
|
yesNoIcon
|