@luscii-healthtech/web-ui 42.7.0 → 42.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.development.js +173 -166
- package/dist/index.development.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/src/components/Icons/ArrowBackward.d.ts +3 -0
- package/dist/src/components/Icons/index.d.ts +1 -0
- package/dist/src/components/PageWithCenteredContentLayout/PageWithCenteredContentLayout.d.ts +11 -1
- package/dist/stories/PageWithCenteredContentLayout.stories.d.ts +3 -0
- package/dist/web-ui-tailwind.css +8 -5
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -26,8 +26,8 @@ require('react-datepicker/dist/react-datepicker.min.css');
|
|
|
26
26
|
var PropTypes = require('prop-types');
|
|
27
27
|
var FlyOutMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
28
28
|
var RadixHC = require('@radix-ui/react-hover-card');
|
|
29
|
-
var ReactSelect = require('react-select');
|
|
30
29
|
var groupBy = require('lodash/groupBy');
|
|
30
|
+
var ReactSelect = require('react-select');
|
|
31
31
|
var RadixSwitch = require('@radix-ui/react-switch');
|
|
32
32
|
var Quill = require('quill');
|
|
33
33
|
require('quill-paste-smart');
|
|
@@ -71,8 +71,8 @@ var ReactDatePicker__default = /*#__PURE__*/_interopDefault(ReactDatePicker);
|
|
|
71
71
|
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
72
72
|
var FlyOutMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(FlyOutMenuPrimitive);
|
|
73
73
|
var RadixHC__namespace = /*#__PURE__*/_interopNamespace(RadixHC);
|
|
74
|
-
var ReactSelect__default = /*#__PURE__*/_interopDefault(ReactSelect);
|
|
75
74
|
var groupBy__default = /*#__PURE__*/_interopDefault(groupBy);
|
|
75
|
+
var ReactSelect__default = /*#__PURE__*/_interopDefault(ReactSelect);
|
|
76
76
|
var RadixSwitch__namespace = /*#__PURE__*/_interopNamespace(RadixSwitch);
|
|
77
77
|
var Quill__default = /*#__PURE__*/_interopDefault(Quill);
|
|
78
78
|
var isFunction__default = /*#__PURE__*/_interopDefault(isFunction);
|
|
@@ -409,6 +409,9 @@ var AlarmClockIcon = IconWrapper(SvgAlarmClockIcon);
|
|
|
409
409
|
const SvgAmberAlertIcon = (props) => jsxRuntime.jsx("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: "none", viewBox: "0 0 12 12" }, props, { children: jsxRuntime.jsx("rect", { width: 10, height: 10, x: 1, y: 1, stroke: "currentColor", strokeWidth: 2, rx: 5 }) }));
|
|
410
410
|
var AmberAlertIcon = IconWrapper(SvgAmberAlertIcon);
|
|
411
411
|
|
|
412
|
+
const SvgArrowBackward = (props) => jsxRuntime.jsx("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: "none", viewBox: "0 0 24 24" }, props, { children: jsxRuntime.jsx("path", { fill: "currentColor", d: "m7.373 12.75 5.17 5.17a.7.7 0 0 1 .22.521.74.74 0 0 1-.236.532.78.78 0 0 1-.527.225.7.7 0 0 1-.527-.225l-6.34-6.34A.83.83 0 0 1 4.877 12q0-.18.058-.336a.8.8 0 0 1 .198-.297l6.34-6.34a.72.72 0 0 1 .515-.212.75.75 0 0 1 .539.212.74.74 0 0 1 .233.535q0 .302-.233.534L7.373 11.25H18.75q.32 0 .535.216A.73.73 0 0 1 19.5 12a.73.73 0 0 1-.215.535.73.73 0 0 1-.535.215z" }) }));
|
|
413
|
+
var ArrowBackward = IconWrapper(SvgArrowBackward);
|
|
414
|
+
|
|
412
415
|
const SvgArrowForward = (props) => jsxRuntime.jsx("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: "none", viewBox: "0 0 24 24" }, props, { children: jsxRuntime.jsx("path", { fill: "currentColor", d: "M16.627 12.75H5.25a.73.73 0 0 1-.535-.216.73.73 0 0 1-.215-.535q0-.319.215-.535a.73.73 0 0 1 .535-.215h11.377l-5.17-5.17a.7.7 0 0 1-.22-.521q.003-.3.236-.532A.78.78 0 0 1 12 4.801a.7.7 0 0 1 .527.225l6.34 6.34a.83.83 0 0 1 .256.633.83.83 0 0 1-.256.633l-6.34 6.34a.72.72 0 0 1-.514.213.75.75 0 0 1-.54-.213.74.74 0 0 1-.233-.535q0-.3.233-.534z" }) }));
|
|
413
416
|
var ArrowForward = IconWrapper(SvgArrowForward);
|
|
414
417
|
|
|
@@ -745,6 +748,7 @@ var Icons = /*#__PURE__*/Object.freeze({
|
|
|
745
748
|
AlertsIcon: BellIcon,
|
|
746
749
|
AmberAlertColoredIcon: AmberAlertColoredIcon,
|
|
747
750
|
AmberAlertIcon: AmberAlertIcon,
|
|
751
|
+
ArrowBackward: ArrowBackward,
|
|
748
752
|
ArrowForward: ArrowForward,
|
|
749
753
|
AssignIcon: AssignIcon,
|
|
750
754
|
AssignedIcon: AssignedIcon,
|
|
@@ -3429,126 +3433,49 @@ const PaginationMenuSmall = (props) => {
|
|
|
3429
3433
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(TertiaryButton, { "data-test-id": "prev-button", icon: LeftArrowIcon, "data-page": props.currentPageNumber - 1, onClick: handleOnChange, isDisabled: props.currentPageNumber === 1 }), jsxRuntime.jsx(Text, { className: "ui:ml-4", text: `${props.currentPageNumber} / ${props.pageCount}`, type: "sm", color: "slate-500" }), jsxRuntime.jsx(TertiaryButton, { className: "ui:ml-4", "data-test-id": "next-button", icon: ChevronRightIcon, isDisabled: props.currentPageNumber === props.pageCount, "data-page": props.currentPageNumber + 1, onClick: handleOnChange })] });
|
|
3430
3434
|
};
|
|
3431
3435
|
|
|
3432
|
-
var css_248z$8 = ".
|
|
3436
|
+
var css_248z$8 = ".styled-select {\n appearance: none;\n}\n.styled-select::picker-icon {\n appearance: none;\n}";
|
|
3433
3437
|
styleInject(css_248z$8);
|
|
3434
3438
|
|
|
3435
|
-
const
|
|
3436
|
-
|
|
3437
|
-
const
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
fontWeight: state.isSelected ? "bold" : "normal",
|
|
3444
|
-
fontSize: "14px",
|
|
3445
|
-
// tailwind blue-50
|
|
3446
|
-
backgroundColor: state.isFocused ? "#F2FAFD" : "none",
|
|
3447
|
-
color: "inherit",
|
|
3448
|
-
position: "relative",
|
|
3449
|
-
padding: "0.75rem",
|
|
3450
|
-
opacity: state.isDisabled ? "0.5" : 1,
|
|
3451
|
-
"&:after": {
|
|
3452
|
-
visibility: state.isSelected ? "visible" : "hidden"
|
|
3453
|
-
},
|
|
3454
|
-
transition: "background-color 0.3s ease-in-out",
|
|
3455
|
-
"&:hover": {
|
|
3456
|
-
// tailwind blue-50
|
|
3457
|
-
backgroundColor: state.isSelected ? "transparent" : "#F2FAFD"
|
|
3458
|
-
},
|
|
3459
|
-
pointerEvents: state.isDisabled ? "none" : "auto"
|
|
3460
|
-
});
|
|
3461
|
-
},
|
|
3462
|
-
container: (baseStyles) => {
|
|
3463
|
-
return Object.assign(Object.assign({}, baseStyles), { flexGrow: "initial" });
|
|
3464
|
-
},
|
|
3465
|
-
input: (baseStyles) => {
|
|
3466
|
-
return Object.assign(Object.assign({}, baseStyles), { padding: 0, margin: 0 });
|
|
3467
|
-
},
|
|
3468
|
-
multiValue: (baseStyles) => {
|
|
3469
|
-
return Object.assign(Object.assign({}, baseStyles), { lineHeight: "1rem" });
|
|
3470
|
-
},
|
|
3471
|
-
valueContainer: (baseStyles) => {
|
|
3472
|
-
return Object.assign(Object.assign({}, baseStyles), { padding: ".5rem", margin: 0 });
|
|
3473
|
-
},
|
|
3474
|
-
control: (baseStyles, state) => {
|
|
3475
|
-
const navyBlue = "rgb(30 64 175)";
|
|
3476
|
-
const lightGray = "#D1D5DB";
|
|
3477
|
-
const red = "#c53030";
|
|
3478
|
-
const lightRedTransparent = "rgba(255, 98, 102, 0.3)";
|
|
3479
|
-
const darkBlue = "#1e40af";
|
|
3480
|
-
const mediumGray = "#9CA3AF";
|
|
3481
|
-
const lightShadow = "rgba(0, 0, 0, 0.05)";
|
|
3482
|
-
const defaultBorderColor = state.isFocused || state.menuIsOpen ? navyBlue : lightGray;
|
|
3483
|
-
const validatedBorderColor = hasError ? red : defaultBorderColor;
|
|
3484
|
-
const defaultOutline = hasError ? lightRedTransparent : darkBlue;
|
|
3485
|
-
const validatedOutline = `2px solid ${state.isFocused ? defaultOutline : "transparent"}`;
|
|
3486
|
-
return Object.assign(Object.assign({}, baseStyles), {
|
|
3487
|
-
fontSize: "14px",
|
|
3488
|
-
transition: "border 0.3s ease-in-out",
|
|
3489
|
-
// primary outline
|
|
3490
|
-
outline: validatedOutline,
|
|
3491
|
-
outlineOffset: "-2px",
|
|
3492
|
-
borderColor: validatedBorderColor,
|
|
3493
|
-
borderWidth: "1px !important",
|
|
3494
|
-
borderStyle: "solid",
|
|
3495
|
-
borderRadius: "4px",
|
|
3496
|
-
minHeight: state.isMulti ? "44px" : void 0,
|
|
3497
|
-
height: state.isMulti ? void 0 : "44px",
|
|
3498
|
-
boxShadow: `0px 1px 2px ${lightShadow}`,
|
|
3499
|
-
"&:hover": {
|
|
3500
|
-
borderColor: mediumGray,
|
|
3501
|
-
// selector for the chevron
|
|
3502
|
-
'> [class*="IndicatorsContainer"]': {
|
|
3503
|
-
opacity: 1
|
|
3504
|
-
}
|
|
3505
|
-
}
|
|
3506
|
-
});
|
|
3507
|
-
},
|
|
3508
|
-
// The placeholder has the following css prop: grid-area: 1/1/2/3;
|
|
3509
|
-
// And grid-area doesn't work on IE11, so we need to style it slightly different.
|
|
3510
|
-
placeholder: (baseStyles) => Object.assign(Object.assign({}, baseStyles), { fontWeight: 100, color: "#6B7280", margin: 0 }),
|
|
3511
|
-
singleValue: (baseStyles) => {
|
|
3512
|
-
return Object.assign(Object.assign({}, baseStyles), { fontSize: "14px" });
|
|
3513
|
-
},
|
|
3514
|
-
indicatorSeparator: () => ({
|
|
3515
|
-
display: "none"
|
|
3516
|
-
}),
|
|
3517
|
-
menu: (baseStyles) => Object.assign(Object.assign({}, baseStyles), { zIndex: 20 })
|
|
3518
|
-
};
|
|
3519
|
-
}
|
|
3520
|
-
const Select = React__namespace.default.forwardRef((_a, innerRef) => {
|
|
3521
|
-
var { isError = false, styles, options, onChange, value, width = "full", isMulti, className, skipValueProcessing } = _a, otherProps = __rest(_a, ["isError", "styles", "options", "onChange", "value", "width", "isMulti", "className", "skipValueProcessing"]);
|
|
3522
|
-
const customStyles = generateCustomStyles(isError);
|
|
3523
|
-
const mergedStyles = ReactSelect.mergeStyles(customStyles, styles);
|
|
3524
|
-
const isOptionsGrouped = !options ? false : options.reduce((acc, o) => acc || "options" in o && !("values" in o), false);
|
|
3525
|
-
const flatmappedOptions = !options ? [] : isOptionsGrouped ? options.flatMap((g) => g.options) : options;
|
|
3526
|
-
const onChangeWrapped = !onChange ? void 0 : isMulti ? (val, a) => onChange(val.map((v) => v.value), a) : (val, a) => onChange(val === null || val === void 0 ? void 0 : val.value, a);
|
|
3527
|
-
const valueWrapped = !value || !options ? value : isMulti ? flatmappedOptions.filter((o) => value.includes(o.value)) : flatmappedOptions.find((o) => o.value === value);
|
|
3528
|
-
const getDataAttributes = () => {
|
|
3529
|
-
const dataProps = {};
|
|
3530
|
-
for (const prop in otherProps) {
|
|
3531
|
-
if (prop.includes("data-")) {
|
|
3532
|
-
dataProps[prop] = otherProps[prop];
|
|
3533
|
-
}
|
|
3534
|
-
}
|
|
3535
|
-
return dataProps;
|
|
3439
|
+
const StyledSelect = React__namespace.default.forwardRef((_a, ref) => {
|
|
3440
|
+
var { children, suffix, prefix, className, width = "full", height = "lg", isError } = _a, attributes = __rest(_a, ["children", "suffix", "prefix", "className", "width", "height", "isError"]);
|
|
3441
|
+
const hasPrefix = !!prefix;
|
|
3442
|
+
const hasSuffix = !!suffix;
|
|
3443
|
+
const hasNoExtraContent = !hasPrefix && !hasSuffix;
|
|
3444
|
+
const heightClasses = {
|
|
3445
|
+
md: "ui:h-form-md",
|
|
3446
|
+
lg: "ui:h-form-lg"
|
|
3536
3447
|
};
|
|
3537
|
-
const
|
|
3538
|
-
|
|
3539
|
-
|
|
3448
|
+
const paddingClasses = {
|
|
3449
|
+
md: "ui:px-3 py-2 ui:pr-10",
|
|
3450
|
+
// pr-10 to account for the chevron icon
|
|
3451
|
+
lg: "ui:p-3 ui:pr-10"
|
|
3540
3452
|
};
|
|
3541
|
-
return jsxRuntime.
|
|
3542
|
-
"ui:
|
|
3543
|
-
"ui:
|
|
3544
|
-
"ui:
|
|
3545
|
-
"ui:
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3453
|
+
return jsxRuntime.jsxs(FlexRow, { spacing: "none", "data-test-id": "input-component-container", stretch: false, children: [jsxRuntime.jsx("span", { className: classNames__default.default(heightClasses[height], "ui:border-b ui:border-t ui:border-solid ui:border-input-border", {
|
|
3454
|
+
"ui:hidden": hasNoExtraContent,
|
|
3455
|
+
"ui:order-1": hasSuffix,
|
|
3456
|
+
"ui:rounded-l ui:border-l": hasPrefix,
|
|
3457
|
+
"ui:rounded-r ui:border-r": hasSuffix
|
|
3458
|
+
}, "ui:flex ui:flex-col ui:items-center ui:p-3", "ui:text-sm", "ui:text-slate-500", "ui:bg-main-background"), children: suffix || prefix }), jsxRuntime.jsxs("div", { className: classNames__default.default("ui:relative", {
|
|
3459
|
+
"ui:flex ui:grow": width === "full"
|
|
3460
|
+
}), children: [jsxRuntime.jsx("select", Object.assign({ ref, className: classNames__default.default("styled-select", "ui:block ui:min-w-[4rem]", calculateResponsiveWidthClasses(width), {
|
|
3461
|
+
"ui:bg-slate-50 ui:text-slate-400": attributes.disabled,
|
|
3462
|
+
"ui:text-slate-800": !attributes.disabled,
|
|
3463
|
+
"ui:border-input-border": !attributes.disabled && !isError,
|
|
3464
|
+
"ui:hover:border-input-border-dark": !attributes.disabled,
|
|
3465
|
+
"ui:border-red-700": isError,
|
|
3466
|
+
"ui:focus:outline-negative": isError,
|
|
3467
|
+
"ui:focus:border-primary": !isError,
|
|
3468
|
+
"ui:focus:outline-primary": !isError,
|
|
3469
|
+
"ui:bg-white": !attributes.disabled
|
|
3470
|
+
}, heightClasses[height], paddingClasses[height], "ui:border", "ui:text-base ui:sm:text-sm", "ui:placeholder-slate-500", "ui:border-solid", "ui:transition-colors", "ui:duration-300", {
|
|
3471
|
+
"ui:rounded": hasNoExtraContent,
|
|
3472
|
+
"ui:rounded-l": hasSuffix,
|
|
3473
|
+
"ui:rounded-r": hasPrefix,
|
|
3474
|
+
"ui:order-2": hasPrefix,
|
|
3475
|
+
"ui:order-1": hasSuffix
|
|
3476
|
+
}, "ui:shadow-default", className) }, attributes, { children })), jsxRuntime.jsx("div", { className: "ui:pointer-events-none ui:absolute ui:right-0 ui:top-1/2 ui:z-20", style: {
|
|
3477
|
+
transform: "translateY(-50%)"
|
|
3478
|
+
}, children: jsxRuntime.jsx(ChevronDownIcon, { className: classNames__default.default("ui:mr-3 ui:h-6 ui:w-6 ui:text-slate-300") }) })] })] });
|
|
3552
3479
|
});
|
|
3553
3480
|
|
|
3554
3481
|
const PAGE_SIZES = [25, 50, 75, 100];
|
|
@@ -3579,18 +3506,19 @@ const getSummaryText = (pageCount, currentPageNumber, localization, pageSize, re
|
|
|
3579
3506
|
};
|
|
3580
3507
|
|
|
3581
3508
|
const PaginationMenuLarge = (props) => {
|
|
3582
|
-
const handleOnPageNumberSelect = (
|
|
3583
|
-
props.onChange(value, props.pageSize);
|
|
3509
|
+
const handleOnPageNumberSelect = (e) => {
|
|
3510
|
+
props.onChange(Number.parseInt(e.target.value, 10), props.pageSize);
|
|
3584
3511
|
};
|
|
3585
|
-
const handleOnPageSizeSelect = (
|
|
3512
|
+
const handleOnPageSizeSelect = (e) => {
|
|
3513
|
+
const value = Number.parseInt(e.target.value, 10);
|
|
3586
3514
|
const pageSize = PAGE_SIZE_OPTIONS.find((option) => option.value === value);
|
|
3587
3515
|
pageSize && props.onChange(1, pageSize.value);
|
|
3588
3516
|
};
|
|
3589
3517
|
const handleOnPrevNextButtonClick = (event) => {
|
|
3590
3518
|
const newPage = event.currentTarget.dataset.page;
|
|
3591
|
-
newPage && props.onChange(parseInt(newPage, 10), props.pageSize);
|
|
3519
|
+
newPage && props.onChange(Number.parseInt(newPage, 10), props.pageSize);
|
|
3592
3520
|
};
|
|
3593
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(
|
|
3521
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Stack, { axis: "x", align: "center", gap: "s", justify: "start", width: "full", children: [props.pageSize && props.resultCount && jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Text, { children: props.localization.display }), jsxRuntime.jsx(StyledSelect, { onChange: handleOnPageSizeSelect, value: props.pageSize, children: PAGE_SIZE_OPTIONS.map((option) => jsxRuntime.jsx("option", { value: option.value, children: option.label }, option.value)) })] }), jsxRuntime.jsx(Text, { children: props.localization.page }), jsxRuntime.jsx(StyledSelect, { onChange: handleOnPageNumberSelect, value: props.currentPageNumber, disabled: props.pageCount < 2, children: getPageNumberOptions(props.pageCount).map((option) => jsxRuntime.jsx("option", { value: option.value, children: option.label }, option.value)) })] }), jsxRuntime.jsxs(Stack, { axis: "x", align: "center", justify: "end", width: "full", children: [jsxRuntime.jsx(Text, { color: "slate-500", children: getSummaryText(props.pageCount, props.currentPageNumber, props.localization, props.pageSize, props.resultCount) }), jsxRuntime.jsx(SecondaryButton, { "data-test-id": "prev-button", "data-page": props.currentPageNumber - 1, onClick: handleOnPrevNextButtonClick, disabled: props.currentPageNumber === 1, className: "ui:ml-4", children: props.localization.previous }), jsxRuntime.jsx(SecondaryButton, { "data-test-id": "next-button", disabled: props.currentPageNumber === props.pageCount, "data-page": props.currentPageNumber + 1, onClick: handleOnPrevNextButtonClick, className: "ui:ml-4", children: props.localization.next })] })] });
|
|
3594
3522
|
};
|
|
3595
3523
|
|
|
3596
3524
|
const PaginationMenuCursor = (props) => {
|
|
@@ -3601,7 +3529,7 @@ const PaginationMenuCursor = (props) => {
|
|
|
3601
3529
|
return jsxRuntime.jsxs(Stack, { axis: "x", gap: "m", justify: "end", width: "full", children: [jsxRuntime.jsx(SecondaryButton, { "data-test-id": "prev-button", leadingIcon: jsxRuntime.jsx(LeftArrowIcon, {}), "data-cursor": props.previousCursor, isDisabled: !props.previousCursor, onClick: handleOnChange, children: props.localization.previous }), jsxRuntime.jsx(SecondaryButton, { "data-test-id": "next-button", trailingIcon: jsxRuntime.jsx(ChevronRightIcon, {}), "data-cursor": props.nextCursor, isDisabled: !props.nextCursor, onClick: handleOnChange, children: props.localization.next })] });
|
|
3602
3530
|
};
|
|
3603
3531
|
|
|
3604
|
-
const Wrapper = ({ className, children }) => jsxRuntime.jsx("
|
|
3532
|
+
const Wrapper = ({ className, children }) => jsxRuntime.jsx(Stack, { axis: "x", align: "center", className: classNames__default.default(className), justify: "between", width: "full", children });
|
|
3605
3533
|
const PaginationMenu = (props) => {
|
|
3606
3534
|
if (props.type === "small" || props.small) {
|
|
3607
3535
|
return jsxRuntime.jsx(Wrapper, { className: props.className, children: jsxRuntime.jsx(PaginationMenuSmall, { pageCount: props.pageCount, currentPageNumber: props.currentPageNumber, pageSize: props.pageSize, onChange: props.onChange }) });
|
|
@@ -4535,49 +4463,126 @@ function SectionItemWithContent(props) {
|
|
|
4535
4463
|
return jsxRuntime.jsxs(SectionItem, Object.assign({ className: mergedClasses, onClick }, rest, { children: [icon && jsxRuntime.jsx("img", { className: iconClasses, src: icon, alt: "" }), jsxRuntime.jsx(Text, { text })] }));
|
|
4536
4464
|
}
|
|
4537
4465
|
|
|
4538
|
-
var css_248z$3 = ".
|
|
4466
|
+
var css_248z$3 = ".customized-select [class*=MenuList] [class*=option]::after {\n position: absolute;\n content: \"\";\n background: url(\"data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2216%22 height%3D%2216%22 viewBox%3D%220 0 16 16%22%3E %3Cg transform%3D%22translate(1.5%2C 0.5)%22%3E %3Cpath fill%3D%22none%22 fill-rule%3D%22evenodd%22 stroke%3D%22%230074DD%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22 stroke-width%3D%222%22 d%3D%22M12.643 3.357L6.03 9.97l-2.674 2.674L0 9.286%22%2F%3E %3C%2Fg%3E%3C%2Fsvg%3E\") no-repeat center;\n right: 12px;\n height: 1rem;\n width: 1rem;\n}";
|
|
4539
4467
|
styleInject(css_248z$3);
|
|
4540
4468
|
|
|
4541
|
-
const
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4469
|
+
const SelectDropdownIndicator = (props) => jsxRuntime.jsx(ReactSelect.components.DropdownIndicator, Object.assign({}, props, { children: jsxRuntime.jsx(ChevronDownIcon, {}) }));
|
|
4470
|
+
|
|
4471
|
+
const SelectLoadingIndicator = (props) => jsxRuntime.jsx(LoadingIndicator, Object.assign({ asSpinner: true, spinnerColor: "gray" }, props.innerProps, { style: props.getStyles("loadingIndicator", props) }));
|
|
4472
|
+
|
|
4473
|
+
function generateCustomStyles(hasError) {
|
|
4474
|
+
return {
|
|
4475
|
+
option: (baseStyles, state) => {
|
|
4476
|
+
return Object.assign(Object.assign({}, baseStyles), {
|
|
4477
|
+
fontWeight: state.isSelected ? "bold" : "normal",
|
|
4478
|
+
fontSize: "14px",
|
|
4479
|
+
// tailwind blue-50
|
|
4480
|
+
backgroundColor: state.isFocused ? "#F2FAFD" : "none",
|
|
4481
|
+
color: "inherit",
|
|
4482
|
+
position: "relative",
|
|
4483
|
+
padding: "0.75rem",
|
|
4484
|
+
opacity: state.isDisabled ? "0.5" : 1,
|
|
4485
|
+
"&:after": {
|
|
4486
|
+
visibility: state.isSelected ? "visible" : "hidden"
|
|
4487
|
+
},
|
|
4488
|
+
transition: "background-color 0.3s ease-in-out",
|
|
4489
|
+
"&:hover": {
|
|
4490
|
+
// tailwind blue-50
|
|
4491
|
+
backgroundColor: state.isSelected ? "transparent" : "#F2FAFD"
|
|
4492
|
+
},
|
|
4493
|
+
pointerEvents: state.isDisabled ? "none" : "auto"
|
|
4494
|
+
});
|
|
4495
|
+
},
|
|
4496
|
+
container: (baseStyles) => {
|
|
4497
|
+
return Object.assign(Object.assign({}, baseStyles), { flexGrow: "initial" });
|
|
4498
|
+
},
|
|
4499
|
+
input: (baseStyles) => {
|
|
4500
|
+
return Object.assign(Object.assign({}, baseStyles), { padding: 0, margin: 0 });
|
|
4501
|
+
},
|
|
4502
|
+
multiValue: (baseStyles) => {
|
|
4503
|
+
return Object.assign(Object.assign({}, baseStyles), { lineHeight: "1rem" });
|
|
4504
|
+
},
|
|
4505
|
+
valueContainer: (baseStyles) => {
|
|
4506
|
+
return Object.assign(Object.assign({}, baseStyles), { padding: ".5rem", margin: 0 });
|
|
4507
|
+
},
|
|
4508
|
+
control: (baseStyles, state) => {
|
|
4509
|
+
const navyBlue = "rgb(30 64 175)";
|
|
4510
|
+
const lightGray = "#D1D5DB";
|
|
4511
|
+
const red = "#c53030";
|
|
4512
|
+
const lightRedTransparent = "rgba(255, 98, 102, 0.3)";
|
|
4513
|
+
const darkBlue = "#1e40af";
|
|
4514
|
+
const mediumGray = "#9CA3AF";
|
|
4515
|
+
const lightShadow = "rgba(0, 0, 0, 0.05)";
|
|
4516
|
+
const defaultBorderColor = state.isFocused || state.menuIsOpen ? navyBlue : lightGray;
|
|
4517
|
+
const validatedBorderColor = hasError ? red : defaultBorderColor;
|
|
4518
|
+
const defaultOutline = hasError ? lightRedTransparent : darkBlue;
|
|
4519
|
+
const validatedOutline = `2px solid ${state.isFocused ? defaultOutline : "transparent"}`;
|
|
4520
|
+
return Object.assign(Object.assign({}, baseStyles), {
|
|
4521
|
+
fontSize: "14px",
|
|
4522
|
+
transition: "border 0.3s ease-in-out",
|
|
4523
|
+
// primary outline
|
|
4524
|
+
outline: validatedOutline,
|
|
4525
|
+
outlineOffset: "-2px",
|
|
4526
|
+
borderColor: validatedBorderColor,
|
|
4527
|
+
borderWidth: "1px !important",
|
|
4528
|
+
borderStyle: "solid",
|
|
4529
|
+
borderRadius: "4px",
|
|
4530
|
+
minHeight: state.isMulti ? "44px" : void 0,
|
|
4531
|
+
height: state.isMulti ? void 0 : "44px",
|
|
4532
|
+
boxShadow: `0px 1px 2px ${lightShadow}`,
|
|
4533
|
+
"&:hover": {
|
|
4534
|
+
borderColor: mediumGray,
|
|
4535
|
+
// selector for the chevron
|
|
4536
|
+
'> [class*="IndicatorsContainer"]': {
|
|
4537
|
+
opacity: 1
|
|
4538
|
+
}
|
|
4539
|
+
}
|
|
4540
|
+
});
|
|
4541
|
+
},
|
|
4542
|
+
// The placeholder has the following css prop: grid-area: 1/1/2/3;
|
|
4543
|
+
// And grid-area doesn't work on IE11, so we need to style it slightly different.
|
|
4544
|
+
placeholder: (baseStyles) => Object.assign(Object.assign({}, baseStyles), { fontWeight: 100, color: "#6B7280", margin: 0 }),
|
|
4545
|
+
singleValue: (baseStyles) => {
|
|
4546
|
+
return Object.assign(Object.assign({}, baseStyles), { fontSize: "14px" });
|
|
4547
|
+
},
|
|
4548
|
+
indicatorSeparator: () => ({
|
|
4549
|
+
display: "none"
|
|
4550
|
+
}),
|
|
4551
|
+
menu: (baseStyles) => Object.assign(Object.assign({}, baseStyles), { zIndex: 20 })
|
|
4549
4552
|
};
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4553
|
+
}
|
|
4554
|
+
const Select = React__namespace.default.forwardRef((_a, innerRef) => {
|
|
4555
|
+
var { isError = false, styles, options, onChange, value, width = "full", isMulti, className, skipValueProcessing } = _a, otherProps = __rest(_a, ["isError", "styles", "options", "onChange", "value", "width", "isMulti", "className", "skipValueProcessing"]);
|
|
4556
|
+
const customStyles = generateCustomStyles(isError);
|
|
4557
|
+
const mergedStyles = ReactSelect.mergeStyles(customStyles, styles);
|
|
4558
|
+
const isOptionsGrouped = !options ? false : options.reduce((acc, o) => acc || "options" in o && !("values" in o), false);
|
|
4559
|
+
const flatmappedOptions = !options ? [] : isOptionsGrouped ? options.flatMap((g) => g.options) : options;
|
|
4560
|
+
const onChangeWrapped = !onChange ? void 0 : isMulti ? (val, a) => onChange(val.map((v) => v.value), a) : (val, a) => onChange(val === null || val === void 0 ? void 0 : val.value, a);
|
|
4561
|
+
const valueWrapped = !value || !options ? value : isMulti ? flatmappedOptions.filter((o) => value.includes(o.value)) : flatmappedOptions.find((o) => o.value === value);
|
|
4562
|
+
const getDataAttributes = () => {
|
|
4563
|
+
const dataProps = {};
|
|
4564
|
+
for (const prop in otherProps) {
|
|
4565
|
+
if (prop.includes("data-")) {
|
|
4566
|
+
dataProps[prop] = otherProps[prop];
|
|
4567
|
+
}
|
|
4568
|
+
}
|
|
4569
|
+
return dataProps;
|
|
4554
4570
|
};
|
|
4555
|
-
|
|
4556
|
-
"
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
"ui:
|
|
4562
|
-
|
|
4563
|
-
"ui:
|
|
4564
|
-
"ui:
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
"ui:focus:outline-primary": !isError,
|
|
4571
|
-
"ui:bg-white": !attributes.disabled
|
|
4572
|
-
}, heightClasses[height], paddingClasses[height], "ui:border", "ui:text-base ui:sm:text-sm", "ui:placeholder-slate-500", "ui:border-solid", "ui:transition-colors", "ui:duration-300", {
|
|
4573
|
-
"ui:rounded": hasNoExtraContent,
|
|
4574
|
-
"ui:rounded-l": hasSuffix,
|
|
4575
|
-
"ui:rounded-r": hasPrefix,
|
|
4576
|
-
"ui:order-2": hasPrefix,
|
|
4577
|
-
"ui:order-1": hasSuffix
|
|
4578
|
-
}, "ui:shadow-default", className) }, attributes, { children })), jsxRuntime.jsx("div", { className: "ui:pointer-events-none ui:absolute ui:right-0 ui:top-1/2 ui:z-20", style: {
|
|
4579
|
-
transform: "translateY(-50%)"
|
|
4580
|
-
}, children: jsxRuntime.jsx(ChevronDownIcon, { className: classNames__default.default("ui:mr-3 ui:h-6 ui:w-6 ui:text-slate-300") }) })] })] });
|
|
4571
|
+
const CustomContainer = (_a2) => {
|
|
4572
|
+
var { children } = _a2, commonProps = __rest(_a2, ["children"]);
|
|
4573
|
+
return jsxRuntime.jsx(ReactSelect.components.SelectContainer, Object.assign({}, commonProps, { innerProps: Object.assign({}, commonProps.innerProps, Object.assign({}, getDataAttributes())), children }));
|
|
4574
|
+
};
|
|
4575
|
+
return jsxRuntime.jsx(ReactSelect__default.default, Object.assign({}, otherProps, { ref: innerRef, styles: mergedStyles, options, onChange: skipValueProcessing ? onChange : onChangeWrapped, value: skipValueProcessing ? value : valueWrapped, isMulti, className: classNames__default.default("customized-select", className, {
|
|
4576
|
+
"ui:w-16": width === "sm",
|
|
4577
|
+
"ui:w-32": width === "md",
|
|
4578
|
+
"ui:w-56": width === "lg",
|
|
4579
|
+
"ui:w-80": width === "xl",
|
|
4580
|
+
"ui:grow": width === "full"
|
|
4581
|
+
}), components: {
|
|
4582
|
+
SelectContainer: CustomContainer,
|
|
4583
|
+
DropdownIndicator: SelectDropdownIndicator,
|
|
4584
|
+
LoadingIndicator: SelectLoadingIndicator
|
|
4585
|
+
} }));
|
|
4581
4586
|
});
|
|
4582
4587
|
|
|
4583
4588
|
const LabeledSelect = React__namespace.default.forwardRef((props, ref) => {
|
|
@@ -6098,14 +6103,15 @@ const Aside = (props) => {
|
|
|
6098
6103
|
SplitViewLayout.Aside = Aside;
|
|
6099
6104
|
|
|
6100
6105
|
const Header = (props) => {
|
|
6101
|
-
const { children } = props, restProps = __rest(props, ["children"]);
|
|
6102
|
-
|
|
6106
|
+
const { children, className, leftActionSlot, rightActionSlot } = props, restProps = __rest(props, ["children", "className", "leftActionSlot", "rightActionSlot"]);
|
|
6107
|
+
const classes = classNames__default.default(className, "ui:max-w-[100vw] ui:content-center");
|
|
6108
|
+
return jsxRuntime.jsxs(Stack, Object.assign({ as: "header", p: "xl", axis: "x", backgroundColor: "surface", className: classes, gap: "xxl", align: "center", justify: "center" }, restProps, { children: [(leftActionSlot || rightActionSlot) && jsxRuntime.jsx(Box, { className: "ui:w-[--spacing(9)] ui:h-[--spacing(9)]", children: leftActionSlot }), jsxRuntime.jsx(Stack, { axis: "x", justify: "center", width: "full", className: "ui:lg:max-w-[--spacing(310)]", children: jsxRuntime.jsx(Box, { width: "full", children }) }), (leftActionSlot || rightActionSlot) && jsxRuntime.jsx(Box, { className: "ui:w-[--spacing(9)] ui:h-[--spacing(9)]", children: rightActionSlot })] }));
|
|
6103
6109
|
};
|
|
6104
6110
|
Header.displayName = "PageWithCenteredContentLayout.Header";
|
|
6105
6111
|
const Main = (props) => {
|
|
6106
6112
|
const { children, className } = props, restProps = __rest(props, ["children", "className"]);
|
|
6107
6113
|
const classes = classNames__default.default(className, "ui:max-w-[100vw] ui:content-center ui:z-10");
|
|
6108
|
-
return jsxRuntime.jsx(Stack, Object.assign({ as: "main", width: "full", align: "center", p: "xl", className: classes }, restProps, { children: jsxRuntime.jsx(Box, { width: "full", className: "ui:lg:max-w-[--spacing(
|
|
6114
|
+
return jsxRuntime.jsx(Stack, Object.assign({ as: "main", width: "full", align: "center", p: "xl", className: classes }, restProps, { children: jsxRuntime.jsx(Box, { width: "full", className: "ui:lg:max-w-[--spacing(310)]", children }) }));
|
|
6109
6115
|
};
|
|
6110
6116
|
Main.displayName = "PageWithCenteredContentLayout.Main";
|
|
6111
6117
|
const PageWithCenteredContentLayout = (props) => {
|
|
@@ -6253,6 +6259,7 @@ exports.AlertWidget = AlertWidget;
|
|
|
6253
6259
|
exports.AlertsIcon = BellIcon;
|
|
6254
6260
|
exports.AmberAlertColoredIcon = AmberAlertColoredIcon;
|
|
6255
6261
|
exports.AmberAlertIcon = AmberAlertIcon;
|
|
6262
|
+
exports.ArrowBackward = ArrowBackward;
|
|
6256
6263
|
exports.ArrowForward = ArrowForward;
|
|
6257
6264
|
exports.AsideLayout = AsideLayout;
|
|
6258
6265
|
exports.AssignIcon = AssignIcon;
|