@luscii-healthtech/web-ui 39.35.2 → 40.0.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 +951 -927
- 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/Avatar/AvatarGroup.d.ts +1 -1
- package/dist/src/components/Collapse/Collapse.d.ts +1 -1
- package/dist/src/components/Container/types/FlexContainerProps.type.d.ts +2 -2
- package/dist/src/components/Icon/Icon.d.ts +1 -1
- package/dist/src/components/Text/Text.d.ts +36 -36
- package/dist/src/utils/radius.utils.d.ts +6 -6
- package/dist/src/utils/responsiveness.utils.d.ts +7 -7
- package/dist/src/utils/shadow.utils.d.ts +4 -4
- package/dist/web-ui-tailwind.css +3406 -45099
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +8 -6
|
@@ -9,6 +9,7 @@ var isString = require('lodash/isString');
|
|
|
9
9
|
var omit = require('lodash/omit');
|
|
10
10
|
var core = require('@dnd-kit/core');
|
|
11
11
|
var sortable = require('@dnd-kit/sortable');
|
|
12
|
+
var tailwindMerge = require('tailwind-merge');
|
|
12
13
|
var reactLazyLoadImageComponent = require('react-lazy-load-image-component');
|
|
13
14
|
var utilities = require('@dnd-kit/utilities');
|
|
14
15
|
var Tooltip$1 = require('@radix-ui/react-tooltip');
|
|
@@ -24,7 +25,6 @@ var pt = require('date-fns/locale/pt');
|
|
|
24
25
|
require('react-datepicker/dist/react-datepicker.min.css');
|
|
25
26
|
var PropTypes = require('prop-types');
|
|
26
27
|
var FlyOutMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
27
|
-
var tailwindMerge = require('tailwind-merge');
|
|
28
28
|
var RadixHC = require('@radix-ui/react-hover-card');
|
|
29
29
|
var ReactSelect = require('react-select');
|
|
30
30
|
var groupBy = require('lodash/groupBy');
|
|
@@ -168,32 +168,32 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
168
168
|
};
|
|
169
169
|
|
|
170
170
|
const FlexContainer = (props) => {
|
|
171
|
-
const { children, alignItems, verticalSpacing = "none", horizontalSpacing = "none", justifyContent, hasPadding, position = "", type, backgroundColor = "ui
|
|
172
|
-
return jsxRuntime.jsx("div", { className: classNames__default.default("ui
|
|
173
|
-
"ui
|
|
174
|
-
"ui
|
|
175
|
-
"ui
|
|
176
|
-
"ui
|
|
177
|
-
"ui
|
|
178
|
-
"ui
|
|
179
|
-
"ui
|
|
180
|
-
"ui
|
|
181
|
-
"ui
|
|
182
|
-
"ui
|
|
183
|
-
"ui
|
|
184
|
-
"ui
|
|
185
|
-
"ui
|
|
186
|
-
"ui
|
|
187
|
-
"ui
|
|
188
|
-
"ui
|
|
189
|
-
"ui
|
|
190
|
-
"ui
|
|
191
|
-
"ui
|
|
192
|
-
"ui
|
|
193
|
-
"ui
|
|
194
|
-
"ui
|
|
195
|
-
"ui
|
|
196
|
-
"ui
|
|
171
|
+
const { children, alignItems, verticalSpacing = "none", horizontalSpacing = "none", justifyContent, hasPadding, position = "", type, backgroundColor = "ui:bg-transparent", stretch = true } = props;
|
|
172
|
+
return jsxRuntime.jsx("div", { className: classNames__default.default("ui:flex", backgroundColor, {
|
|
173
|
+
"ui:flex-row": type === "row",
|
|
174
|
+
"ui:flex-col": type === "column",
|
|
175
|
+
"ui:relative": position === "relative",
|
|
176
|
+
"ui:absolute": position === "absolute",
|
|
177
|
+
"ui:static": position === "static",
|
|
178
|
+
"ui:fixed": position === "fixed",
|
|
179
|
+
"ui:sticky": position === "sticky",
|
|
180
|
+
"ui:justify-center": justifyContent === "center",
|
|
181
|
+
"ui:justify-start": justifyContent === "start",
|
|
182
|
+
"ui:justify-end": justifyContent === "end",
|
|
183
|
+
"ui:justify-between": justifyContent === "between",
|
|
184
|
+
"ui:items-start": alignItems === "start",
|
|
185
|
+
"ui:items-center": alignItems === "center",
|
|
186
|
+
"ui:items-end": alignItems === "end",
|
|
187
|
+
"ui:space-x-1": horizontalSpacing === "tiny",
|
|
188
|
+
"ui:space-x-2": horizontalSpacing === "small",
|
|
189
|
+
"ui:space-x-4": horizontalSpacing === "medium",
|
|
190
|
+
"ui:space-x-8": horizontalSpacing === "large",
|
|
191
|
+
"ui:space-y-1": verticalSpacing === "tiny",
|
|
192
|
+
"ui:space-y-2": verticalSpacing === "small",
|
|
193
|
+
"ui:space-y-4": verticalSpacing === "medium",
|
|
194
|
+
"ui:space-y-8": verticalSpacing === "large",
|
|
195
|
+
"ui:p-4": hasPadding,
|
|
196
|
+
"ui:w-full": stretch
|
|
197
197
|
}), children });
|
|
198
198
|
};
|
|
199
199
|
|
|
@@ -234,62 +234,62 @@ function styleInject(css, ref) {
|
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
var css_248z$i = "/* https://stackoverflow.com/a/13924997 */\n.ui
|
|
237
|
+
var css_248z$i = "/* https://stackoverflow.com/a/13924997 */\n.ui\\:text-two-lines-max {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n /* number of lines to show */\n -webkit-line-clamp: 2;\n line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n";
|
|
238
238
|
styleInject(css_248z$i);
|
|
239
239
|
|
|
240
240
|
const responsiveTextSizeVariants = {
|
|
241
|
-
sm: "ui
|
|
242
|
-
base: "ui
|
|
241
|
+
sm: "ui:text-sm ui:sm:text-xs",
|
|
242
|
+
base: "ui:text-base ui:sm:text-sm"
|
|
243
243
|
};
|
|
244
244
|
const allowedTextStyles = {
|
|
245
|
-
sm: `${responsiveTextSizeVariants.sm} ui
|
|
246
|
-
"sm-strong": `${responsiveTextSizeVariants.sm} ui
|
|
247
|
-
base: `${responsiveTextSizeVariants.base} ui
|
|
248
|
-
medium: `${responsiveTextSizeVariants.base} ui
|
|
249
|
-
strong: `${responsiveTextSizeVariants.base} ui
|
|
245
|
+
sm: `${responsiveTextSizeVariants.sm} ui:font-medium`,
|
|
246
|
+
"sm-strong": `${responsiveTextSizeVariants.sm} ui:font-semibold ui:antialiased`,
|
|
247
|
+
base: `${responsiveTextSizeVariants.base} ui:font-normal`,
|
|
248
|
+
medium: `${responsiveTextSizeVariants.base} ui:font-medium ui:antialiased`,
|
|
249
|
+
strong: `${responsiveTextSizeVariants.base} ui:font-semibold ui:antialiased`,
|
|
250
250
|
lg: "",
|
|
251
|
-
"lg-medium": "ui
|
|
252
|
-
"lg-strong": "ui
|
|
253
|
-
xl: "ui
|
|
254
|
-
"xl-medium": "ui
|
|
255
|
-
"xl-strong": "ui
|
|
251
|
+
"lg-medium": "ui:font-medium ui:antialiased",
|
|
252
|
+
"lg-strong": "ui:font-bold ui:antialiased",
|
|
253
|
+
xl: "ui:text-lg",
|
|
254
|
+
"xl-medium": "ui:font-medium ui:text-lg ui:antialiased",
|
|
255
|
+
"xl-strong": "ui:font-bold ui:text-lg ui:antialiased"
|
|
256
256
|
};
|
|
257
257
|
const allowedColors = {
|
|
258
|
-
base: "ui
|
|
259
|
-
"slate-200": "ui
|
|
260
|
-
"slate-400": "ui
|
|
261
|
-
"slate-500": "ui
|
|
262
|
-
"slate-600": "ui
|
|
263
|
-
red: "ui
|
|
264
|
-
green: "ui
|
|
265
|
-
amber: "ui
|
|
266
|
-
orange: "ui
|
|
267
|
-
grey: "ui
|
|
268
|
-
white: "ui
|
|
269
|
-
"blue-800": "ui
|
|
270
|
-
current: "ui
|
|
258
|
+
base: "ui:text-slate-800",
|
|
259
|
+
"slate-200": "ui:text-slate-200",
|
|
260
|
+
"slate-400": "ui:text-slate-400",
|
|
261
|
+
"slate-500": "ui:text-slate-500",
|
|
262
|
+
"slate-600": "ui:text-slate-600",
|
|
263
|
+
red: "ui:text-red-800",
|
|
264
|
+
green: "ui:text-green-800",
|
|
265
|
+
amber: "ui:text-yellow-800",
|
|
266
|
+
orange: "ui:text-yellow-800",
|
|
267
|
+
grey: "ui:text-slate-500",
|
|
268
|
+
white: "ui:text-white",
|
|
269
|
+
"blue-800": "ui:text-primary",
|
|
270
|
+
current: "ui:text-current",
|
|
271
271
|
/**
|
|
272
272
|
* Semantic colors
|
|
273
273
|
*/
|
|
274
|
-
"on-negative": "ui
|
|
275
|
-
"on-positive": "ui
|
|
276
|
-
"on-secondary": "ui
|
|
277
|
-
"on-surface": "ui
|
|
278
|
-
"on-surface-variant": "ui
|
|
279
|
-
"on-warning": "ui
|
|
280
|
-
"positive-solid": "ui
|
|
281
|
-
"negative-solid": "ui
|
|
282
|
-
"neutral-interactive": "ui
|
|
283
|
-
primary: "ui
|
|
284
|
-
"primary-dark": "ui
|
|
274
|
+
"on-negative": "ui:text-on-negative",
|
|
275
|
+
"on-positive": "ui:text-on-positive",
|
|
276
|
+
"on-secondary": "ui:text-on-secondary",
|
|
277
|
+
"on-surface": "ui:text-on-surface",
|
|
278
|
+
"on-surface-variant": "ui:text-on-surface-variant",
|
|
279
|
+
"on-warning": "ui:text-on-warning",
|
|
280
|
+
"positive-solid": "ui:text-positive-solid",
|
|
281
|
+
"negative-solid": "ui:text-negative-solid",
|
|
282
|
+
"neutral-interactive": "ui:text-neutral-interactive",
|
|
283
|
+
primary: "ui:text-primary",
|
|
284
|
+
"primary-dark": "ui:text-primary-dark"
|
|
285
285
|
};
|
|
286
286
|
const allowedHoverColors = {
|
|
287
|
-
"blue-900": "hover:
|
|
288
|
-
white: "hover:
|
|
287
|
+
"blue-900": "ui:hover:text-primary-dark",
|
|
288
|
+
white: "ui:hover:text-white"
|
|
289
289
|
};
|
|
290
290
|
const allowedGroupHoverColors = {
|
|
291
|
-
"blue-900": "group-hover:
|
|
292
|
-
white: "group-hover:
|
|
291
|
+
"blue-900": "ui:group-hover:text-primary-dark",
|
|
292
|
+
white: "ui:group-hover:text-white"
|
|
293
293
|
};
|
|
294
294
|
const Text = (props) => {
|
|
295
295
|
var _a, _b;
|
|
@@ -300,7 +300,7 @@ const Text = (props) => {
|
|
|
300
300
|
const containerProps = {
|
|
301
301
|
className: classNames__default.default(
|
|
302
302
|
// apply different style classes
|
|
303
|
-
// for now we stick with ui
|
|
303
|
+
// for now we stick with ui:font-size 16px on the body
|
|
304
304
|
// so I am adjusting our styles accordingly (one step down)
|
|
305
305
|
allowedTextStyles[resolvedVariant !== null && resolvedVariant !== void 0 ? resolvedVariant : "base"],
|
|
306
306
|
allowedColors[color !== null && color !== void 0 ? color : "base"],
|
|
@@ -308,10 +308,10 @@ const Text = (props) => {
|
|
|
308
308
|
selectedGroupHoverColor,
|
|
309
309
|
"leading-6 sm:leading-5",
|
|
310
310
|
{
|
|
311
|
-
"ui
|
|
312
|
-
// FIXME: this class doesn't do anything without a ui
|
|
313
|
-
"ui
|
|
314
|
-
"ui
|
|
311
|
+
"ui:inline": inline,
|
|
312
|
+
// FIXME: this class doesn't do anything without a ui:max-width
|
|
313
|
+
"ui:truncate": truncate,
|
|
314
|
+
"ui:text-two-lines-max": clampLines,
|
|
315
315
|
"in-html-link": containsDangerousHtml,
|
|
316
316
|
capitalize
|
|
317
317
|
},
|
|
@@ -327,7 +327,7 @@ const Text = (props) => {
|
|
|
327
327
|
const IconWrapper = (SVGComponent) => (_a) => {
|
|
328
328
|
var { className, size, color } = _a, rest = __rest(_a, ["className", "size", "color"]);
|
|
329
329
|
const classes = classNames__default.default({
|
|
330
|
-
"ui
|
|
330
|
+
"ui:h-[20px] ui:w-[20px]": size === "s"
|
|
331
331
|
}, className, color ? allowedColors[color] : void 0);
|
|
332
332
|
return jsxRuntime.jsx(SVGComponent, Object.assign({ role: rest.onClick ? "button" : "img", className: classes }, rest));
|
|
333
333
|
};
|
|
@@ -890,21 +890,21 @@ const TOASTER_TYPE_OPTIONS = {
|
|
|
890
890
|
const ToasterPanel = ({ message = "", title = "", type = TOASTER_TYPE_OPTIONS.SUCCESS, showIcon = true, onClickClose, onAnimationEnd }) => {
|
|
891
891
|
const isSuccess = type === TOASTER_TYPE_OPTIONS.SUCCESS;
|
|
892
892
|
const isFailure = type === TOASTER_TYPE_OPTIONS.FAILURE;
|
|
893
|
-
return jsxRuntime.jsxs("div", { role: "status", "data-test-id": `toaster-panel-${type}`, className: classNames__default.default("ui
|
|
893
|
+
return jsxRuntime.jsxs("div", { role: "status", "data-test-id": `toaster-panel-${type}`, className: classNames__default.default("ui:rounded-md ui:shadow-lg", "ui:max-h-19 ui:min-h-13 ui:w-104", "ui:relative", "ui:overflow-hidden", {
|
|
894
894
|
"type-success": isSuccess,
|
|
895
895
|
"type-failure": isFailure,
|
|
896
|
-
"ui
|
|
897
|
-
"ui
|
|
898
|
-
}), children: [jsxRuntime.jsx("div", { className: "ui
|
|
899
|
-
"ui
|
|
900
|
-
}), children: jsxRuntime.jsx(CheckIcon, {}) }), jsxRuntime.jsx("div", { "data-test-id": "failure-toaster-icon", className: classNames__default.default("failure-icon ui
|
|
901
|
-
"ui
|
|
902
|
-
}), children: jsxRuntime.jsx(ExclamationMarkIcon, {}) }), jsxRuntime.jsxs("div", { className: "ui
|
|
903
|
-
"ui
|
|
904
|
-
"ui
|
|
905
|
-
}), children: jsxRuntime.jsx("div", { "data-test-id": "toaster-progress-bar", className: classNames__default.default("ui
|
|
906
|
-
"ui
|
|
907
|
-
"ui
|
|
896
|
+
"ui:bg-red-50": isFailure,
|
|
897
|
+
"ui:bg-green-50": isSuccess
|
|
898
|
+
}), children: [jsxRuntime.jsx("div", { className: "ui:relative ui:p-4", children: jsxRuntime.jsxs("div", { className: "ui:flex ui:flex-row", children: [jsxRuntime.jsx("div", { "data-test-id": "success-toaster-icon", className: classNames__default.default("success-icon ui:text-green-700", {
|
|
899
|
+
"ui:hidden": isFailure || !showIcon
|
|
900
|
+
}), children: jsxRuntime.jsx(CheckIcon, {}) }), jsxRuntime.jsx("div", { "data-test-id": "failure-toaster-icon", className: classNames__default.default("failure-icon ui:text-red-700", {
|
|
901
|
+
"ui:hidden": isSuccess || !showIcon
|
|
902
|
+
}), children: jsxRuntime.jsx(ExclamationMarkIcon, {}) }), jsxRuntime.jsxs("div", { className: "ui:ml-3", children: [jsxRuntime.jsx(Text, { variant: "strong", color: isSuccess ? "green" : "red", "data-test-id": "toaster-title", children: title }), jsxRuntime.jsx(Text, { "data-test-id": "toaster-message", children: message })] }), jsxRuntime.jsx("button", { onClick: onClickClose, className: "ui:ml-auto ui:cursor-pointer ui:focus:outline-primary", "data-test-id": "toaster-close-button", children: jsxRuntime.jsx(CrossIcon, { className: "ui:text-slate-500" }) })] }) }), jsxRuntime.jsx("div", { "data-test-id": "toaster-progress-bar-container", className: classNames__default.default("ui:absolute ui:bottom-0 ui:h-1 ui:w-full ui:rounded-b-md", {
|
|
903
|
+
"ui:bg-red-50": isFailure,
|
|
904
|
+
"ui:bg-green-50": isSuccess
|
|
905
|
+
}), children: jsxRuntime.jsx("div", { "data-test-id": "toaster-progress-bar", className: classNames__default.default("ui:transiation progress-reverse ui:duration-3000 ui:h-full ui:w-full ui:origin-left ui:animate-[progress-reverse_5s_linear_forwards]", {
|
|
906
|
+
"ui:bg-red-400": isFailure,
|
|
907
|
+
"ui:bg-green-400": isSuccess
|
|
908
908
|
}), onAnimationEnd }) })] });
|
|
909
909
|
};
|
|
910
910
|
|
|
@@ -931,17 +931,17 @@ const Title = (props) => {
|
|
|
931
931
|
const { variant: variantFromProps = "base", type, className, text, children, color, level, ref } = props, rest = __rest(props, ["variant", "type", "className", "text", "children", "color", "level", "ref"]);
|
|
932
932
|
const variant = type ? type : variantFromProps;
|
|
933
933
|
const isSmallTitle = variant === "xs" || variant === "sm";
|
|
934
|
-
const containerClassName = classNames__default.default("ui
|
|
934
|
+
const containerClassName = classNames__default.default("ui:font-bold ui:leading-inherit ui:antialiased", allowedColors[color !== null && color !== void 0 ? color : "base"], {
|
|
935
935
|
"title-inter": isSmallTitle,
|
|
936
936
|
"title-avenir": !isSmallTitle
|
|
937
937
|
//this is used to load the correct font from the css
|
|
938
938
|
}, {
|
|
939
|
-
"ui
|
|
940
|
-
"ui
|
|
941
|
-
"ui
|
|
942
|
-
"ui
|
|
943
|
-
"ui
|
|
944
|
-
"ui
|
|
939
|
+
"ui:text-base": variant === "xs",
|
|
940
|
+
"ui:text-xl": variant === "sm",
|
|
941
|
+
"ui:text-2xl": variant === "base",
|
|
942
|
+
"ui:text-3xl": variant === "lg",
|
|
943
|
+
"ui:text-4xl ": variant === "xl",
|
|
944
|
+
"ui:text-6xl ": variant === "2xl"
|
|
945
945
|
}, className);
|
|
946
946
|
let ContainerElement;
|
|
947
947
|
switch (variant) {
|
|
@@ -981,9 +981,9 @@ const AccordionItem = ({ id, title, content, isCollapsedByDefault = false, onClo
|
|
|
981
981
|
setIsCollapsed(!isCollapsed);
|
|
982
982
|
}, [isCollapsed]);
|
|
983
983
|
const Chevron = isCollapsed ? ChevronRightIcon : ChevronDownIcon;
|
|
984
|
-
return jsxRuntime.jsxs("li", { className: "ui
|
|
985
|
-
"ui
|
|
986
|
-
}), children: [jsxRuntime.jsx(Chevron, { className: "ui
|
|
984
|
+
return jsxRuntime.jsxs("li", { className: "ui:border-b ui:border-slate-200 ui:bg-white ui:last:border-b-0", "data-test-id": id, children: [jsxRuntime.jsxs("div", { onClick: toggleCollapsed, className: classNames__default.default("ui:flex ui:w-full ui:select-none ui:flex-row ui:space-x-4 ui:p-4", "ui:cursor-pointer ui:transition-colors ui:duration-300 ui:ease-in-out ui:hover:bg-blue-50", {
|
|
985
|
+
"ui:border-b ui:border-slate-200": !isCollapsed
|
|
986
|
+
}), children: [jsxRuntime.jsx(Chevron, { className: "ui:shrink-0 ui:self-center ui:text-slate-500" }), isString__default.default(title) ? jsxRuntime.jsx(Title, { variant: "xs", children: title }) : title] }), jsxRuntime.jsx("div", { className: classNames__default.default({ "ui:hidden": isCollapsed }), children: content })] });
|
|
987
987
|
};
|
|
988
988
|
|
|
989
989
|
const Accordion = ({ dataTestId, isCollapsedByDefault = false, items, className, footer }) => {
|
|
@@ -991,7 +991,7 @@ const Accordion = ({ dataTestId, isCollapsedByDefault = false, items, className,
|
|
|
991
991
|
return jsxRuntime.jsxs("ul", { "data-test-id": dataTestId, className, children: [(_a = items.map) === null || _a === void 0 ? void 0 : _a.call(items, (item) => {
|
|
992
992
|
var _a2;
|
|
993
993
|
return React.createElement(AccordionItem, Object.assign({}, item, { key: item.id, isCollapsedByDefault: (_a2 = item.isCollapsedByDefault) !== null && _a2 !== void 0 ? _a2 : isCollapsedByDefault }));
|
|
994
|
-
}), footer && jsxRuntime.jsx("div", { className: "ui
|
|
994
|
+
}), footer && jsxRuntime.jsx("div", { className: "ui:p-4", children: footer })] });
|
|
995
995
|
};
|
|
996
996
|
|
|
997
997
|
const isSubstring = (string, searchTerm, caseSensitive = false) => {
|
|
@@ -1005,14 +1005,14 @@ var css_248z$g = ".list-skeleton .skeleton-box {\n display: inline-block;\n he
|
|
|
1005
1005
|
styleInject(css_248z$g);
|
|
1006
1006
|
|
|
1007
1007
|
const ListItemSkeleton = () => {
|
|
1008
|
-
return jsxRuntime.jsxs("div", { className: "ui
|
|
1008
|
+
return jsxRuntime.jsxs("div", { className: "ui:flex ui:flex-row ui:items-center ui:p-4", children: [jsxRuntime.jsx("div", { className: "skeleton-box is-circle ui:mr-2", style: { width: `${32}px`, height: `${32}px` } }), jsxRuntime.jsxs("div", { className: "ui:flex ui:flex-col", children: [jsxRuntime.jsx("div", { className: "skeleton-box ui:mb-1", style: { width: `${160}px`, height: `${14}px` } }), jsxRuntime.jsx("div", { className: "skeleton-box", style: { width: `${110}px`, height: `${14}px` } })] }), jsxRuntime.jsx("div", { className: "skeleton-box is-button ui:ml-auto ui:rounded-full", style: { width: `${24}px`, height: `${24}px` } })] });
|
|
1009
1009
|
};
|
|
1010
1010
|
|
|
1011
1011
|
const ListSkeleton = ({ items, dataTestId = "list-skeleton" }) => {
|
|
1012
1012
|
const skeletonItems = Array.from({ length: items || 5 }, (_, i) => {
|
|
1013
1013
|
return jsxRuntime.jsx(ListItemSkeleton, {}, i);
|
|
1014
1014
|
});
|
|
1015
|
-
return jsxRuntime.jsxs("div", { "data-test-id": dataTestId, className: "list-skeleton ui
|
|
1015
|
+
return jsxRuntime.jsxs("div", { "data-test-id": dataTestId, className: "list-skeleton ui:flex ui:flex-col ui:divide-y ui:divide-slate-200 ui:rounded-2xl ui:border ui:border-slate-50 ui:bg-white ui:shadow", role: "progressbar", children: [jsxRuntime.jsxs("div", { className: "ui:flex ui:flex-row ui:items-center ui:px-4 ui:py-2", children: [jsxRuntime.jsx("div", { className: "skeleton-box", style: { width: `${160}px`, height: `${14}px` } }), jsxRuntime.jsx("div", { className: "skeleton-box is-button ui:ml-auto ui:bg-slate-200 ui:radius-xxs", style: { width: `${110}px`, height: `${36}px` } })] }), skeletonItems] });
|
|
1016
1016
|
};
|
|
1017
1017
|
|
|
1018
1018
|
const ELEVATION = {
|
|
@@ -1033,52 +1033,52 @@ const createShadowClassName = (elevation, options) => {
|
|
|
1033
1033
|
let transitionClassName = "";
|
|
1034
1034
|
if (transition) {
|
|
1035
1035
|
transitionClassName = classNames__default.default({
|
|
1036
|
-
"hover:
|
|
1037
|
-
"focus:
|
|
1038
|
-
"active:
|
|
1036
|
+
"ui:hover:transition-shadow ui:duration-300": modifier === "hover",
|
|
1037
|
+
"ui:focus:transition-shadow ui:duration-300": modifier === "focus",
|
|
1038
|
+
"ui:active:transition-shadow ui:duration-300": modifier === "active"
|
|
1039
1039
|
});
|
|
1040
1040
|
}
|
|
1041
1041
|
if (!modifier) {
|
|
1042
1042
|
return classNames__default.default({
|
|
1043
|
-
"ui
|
|
1044
|
-
"ui
|
|
1045
|
-
"ui
|
|
1046
|
-
"ui
|
|
1047
|
-
"ui
|
|
1048
|
-
"ui
|
|
1049
|
-
"ui
|
|
1043
|
+
"ui:shadow-base": elevation === "base",
|
|
1044
|
+
"ui:shadow-small": elevation === "small",
|
|
1045
|
+
"ui:shadow-medium": elevation === "medium",
|
|
1046
|
+
"ui:shadow-large": elevation === "large",
|
|
1047
|
+
"ui:shadow-surface": elevation === "surface",
|
|
1048
|
+
"ui:shadow-extra-large": elevation === "extraLarge",
|
|
1049
|
+
"ui:shadow-drag": elevation === "drag"
|
|
1050
1050
|
}, transitionClassName);
|
|
1051
1051
|
}
|
|
1052
1052
|
if (modifier === "hover") {
|
|
1053
1053
|
return classNames__default.default({
|
|
1054
|
-
"hover:
|
|
1055
|
-
"hover:
|
|
1056
|
-
"hover:
|
|
1057
|
-
"hover:
|
|
1058
|
-
"hover:
|
|
1059
|
-
"hover:
|
|
1060
|
-
"hover:
|
|
1054
|
+
"ui:hover:shadow-base": elevation === "base",
|
|
1055
|
+
"ui:hover:shadow-small": elevation === "small",
|
|
1056
|
+
"ui:hover:shadow-medium": elevation === "medium",
|
|
1057
|
+
"ui:hover:shadow-large": elevation === "large",
|
|
1058
|
+
"ui:hover:shadow-surface": elevation === "surface",
|
|
1059
|
+
"ui:hover:shadow-extraLarge": elevation === "extraLarge",
|
|
1060
|
+
"ui:hover:shadow-drag": elevation === "drag"
|
|
1061
1061
|
}, transitionClassName);
|
|
1062
1062
|
}
|
|
1063
1063
|
if (modifier === "focus") {
|
|
1064
1064
|
return classNames__default.default({
|
|
1065
|
-
"focus:
|
|
1066
|
-
"focus:
|
|
1067
|
-
"focus:
|
|
1068
|
-
"focus:
|
|
1069
|
-
"focus:
|
|
1070
|
-
"focus:
|
|
1071
|
-
"focus:
|
|
1065
|
+
"ui:focus:shadow-base": elevation === "base",
|
|
1066
|
+
"ui:focus:shadow-small": elevation === "small",
|
|
1067
|
+
"ui:focus:shadow-medium": elevation === "medium",
|
|
1068
|
+
"ui:focus:shadow-large": elevation === "large",
|
|
1069
|
+
"ui:focus:shadow-surface": elevation === "surface",
|
|
1070
|
+
"ui:focus:shadow-extraLarge": elevation === "extraLarge",
|
|
1071
|
+
"ui:focus:shadow-drag": elevation === "drag"
|
|
1072
1072
|
}, transitionClassName);
|
|
1073
1073
|
}
|
|
1074
1074
|
return classNames__default.default({
|
|
1075
|
-
"active:
|
|
1076
|
-
"active:
|
|
1077
|
-
"active:
|
|
1078
|
-
"active:
|
|
1079
|
-
"active:
|
|
1080
|
-
"active:
|
|
1081
|
-
"active:
|
|
1075
|
+
"ui:active:shadow-base": elevation === "base",
|
|
1076
|
+
"ui:active:shadow-small": elevation === "small",
|
|
1077
|
+
"ui:active:shadow-medium": elevation === "medium",
|
|
1078
|
+
"ui:active:shadow-large": elevation === "large",
|
|
1079
|
+
"ui:active:shadow-surface": elevation === "surface",
|
|
1080
|
+
"ui:active:shadow-extraLarge": elevation === "extraLarge",
|
|
1081
|
+
"ui:active:shadow-drag": elevation === "drag"
|
|
1082
1082
|
}, transitionClassName);
|
|
1083
1083
|
};
|
|
1084
1084
|
|
|
@@ -1087,15 +1087,15 @@ const createRadiusClassName = (borderRadius) => {
|
|
|
1087
1087
|
return "";
|
|
1088
1088
|
}
|
|
1089
1089
|
return classNames__default.default({
|
|
1090
|
-
"ui
|
|
1091
|
-
"ui
|
|
1092
|
-
"ui
|
|
1093
|
-
"ui
|
|
1094
|
-
"ui
|
|
1095
|
-
"ui
|
|
1096
|
-
"ui
|
|
1097
|
-
"ui
|
|
1098
|
-
"ui
|
|
1090
|
+
"ui:radius-xxxxs": borderRadius === "xxxxs",
|
|
1091
|
+
"ui:radius-xxxs": borderRadius === "xxxs",
|
|
1092
|
+
"ui:radius-xxs": borderRadius === "xxs",
|
|
1093
|
+
"ui:radius-xs": borderRadius === "xs",
|
|
1094
|
+
"ui:radius-s": borderRadius === "s",
|
|
1095
|
+
"ui:radius-m": borderRadius === "m",
|
|
1096
|
+
"ui:radius-l": borderRadius === "l",
|
|
1097
|
+
"ui:radius-xl": borderRadius === "xl",
|
|
1098
|
+
"ui:radius-xxl": borderRadius === "xxl"
|
|
1099
1099
|
});
|
|
1100
1100
|
};
|
|
1101
1101
|
const createRadiusLeftClassName = (borderRadius) => {
|
|
@@ -1103,15 +1103,15 @@ const createRadiusLeftClassName = (borderRadius) => {
|
|
|
1103
1103
|
return "";
|
|
1104
1104
|
}
|
|
1105
1105
|
return classNames__default.default({
|
|
1106
|
-
"ui
|
|
1107
|
-
"ui
|
|
1108
|
-
"ui
|
|
1109
|
-
"ui
|
|
1110
|
-
"ui
|
|
1111
|
-
"ui
|
|
1112
|
-
"ui
|
|
1113
|
-
"ui
|
|
1114
|
-
"ui
|
|
1106
|
+
"ui:radius-l-xxxxs": borderRadius === "xxxxs",
|
|
1107
|
+
"ui:radius-l-xxxs": borderRadius === "xxxs",
|
|
1108
|
+
"ui:radius-l-xxs": borderRadius === "xxs",
|
|
1109
|
+
"ui:radius-l-xs": borderRadius === "xs",
|
|
1110
|
+
"ui:radius-l-s": borderRadius === "s",
|
|
1111
|
+
"ui:radius-l-m": borderRadius === "m",
|
|
1112
|
+
"ui:radius-l-l": borderRadius === "l",
|
|
1113
|
+
"ui:radius-l-xl": borderRadius === "xl",
|
|
1114
|
+
"ui:radius-l-xxl": borderRadius === "xxl"
|
|
1115
1115
|
});
|
|
1116
1116
|
};
|
|
1117
1117
|
const createRadiusRightClassName = (borderRadius) => {
|
|
@@ -1119,15 +1119,15 @@ const createRadiusRightClassName = (borderRadius) => {
|
|
|
1119
1119
|
return "";
|
|
1120
1120
|
}
|
|
1121
1121
|
return classNames__default.default({
|
|
1122
|
-
"ui
|
|
1123
|
-
"ui
|
|
1124
|
-
"ui
|
|
1125
|
-
"ui
|
|
1126
|
-
"ui
|
|
1127
|
-
"ui
|
|
1128
|
-
"ui
|
|
1129
|
-
"ui
|
|
1130
|
-
"ui
|
|
1122
|
+
"ui:radius-r-xxxxs": borderRadius === "xxxxs",
|
|
1123
|
+
"ui:radius-r-xxxs": borderRadius === "xxxs",
|
|
1124
|
+
"ui:radius-r-xxs": borderRadius === "xxs",
|
|
1125
|
+
"ui:radius-r-xs": borderRadius === "xs",
|
|
1126
|
+
"ui:radius-r-s": borderRadius === "s",
|
|
1127
|
+
"ui:radius-r-m": borderRadius === "m",
|
|
1128
|
+
"ui:radius-r-l": borderRadius === "l",
|
|
1129
|
+
"ui:radius-r-xl": borderRadius === "xl",
|
|
1130
|
+
"ui:radius-r-xxl": borderRadius === "xxl"
|
|
1131
1131
|
});
|
|
1132
1132
|
};
|
|
1133
1133
|
|
|
@@ -1148,7 +1148,7 @@ const spacingKeys = [
|
|
|
1148
1148
|
"my"
|
|
1149
1149
|
];
|
|
1150
1150
|
const createSpacingClassNames = (keys, spacingProps) => {
|
|
1151
|
-
return keys.filter((key) => spacingProps[key]).map((key) => `ui
|
|
1151
|
+
return keys.filter((key) => spacingProps[key]).map((key) => `ui:${key}-${spacingProps[key]}`).join(" ");
|
|
1152
1152
|
};
|
|
1153
1153
|
const Box = (props) => {
|
|
1154
1154
|
const { as: Element = "div", borderRadius, borderRadiusLeft, borderRadiusRight, className, elevation, width, backgroundColor, hoverBackgroundColor, cursor } = props, attributes = __rest(props, ["as", "borderRadius", "borderRadiusLeft", "borderRadiusRight", "className", "elevation", "width", "backgroundColor", "hoverBackgroundColor", "cursor"]);
|
|
@@ -1158,63 +1158,87 @@ const Box = (props) => {
|
|
|
1158
1158
|
const borderRadiusLeftClassName = createRadiusLeftClassName(borderRadiusLeft);
|
|
1159
1159
|
const borderRadiusRightClassName = createRadiusRightClassName(borderRadiusRight);
|
|
1160
1160
|
const attributesWithoutSpacingKeys = omit__default.default(attributes, spacingKeys);
|
|
1161
|
-
|
|
1162
|
-
"ui
|
|
1163
|
-
"ui
|
|
1164
|
-
"ui
|
|
1165
|
-
"ui
|
|
1166
|
-
"ui
|
|
1167
|
-
"ui
|
|
1168
|
-
"ui
|
|
1169
|
-
"ui
|
|
1170
|
-
"ui
|
|
1171
|
-
[`ui
|
|
1172
|
-
"ui
|
|
1173
|
-
"ui
|
|
1174
|
-
"ui
|
|
1175
|
-
"ui
|
|
1176
|
-
"ui
|
|
1177
|
-
"ui
|
|
1161
|
+
const boxClasses = classNames__default.default(spacingClasses, {
|
|
1162
|
+
"ui:bg-surface": backgroundColor === "surface",
|
|
1163
|
+
"ui:bg-background": backgroundColor === "background",
|
|
1164
|
+
"ui:bg-primary-background": backgroundColor === "primary",
|
|
1165
|
+
"ui:bg-secondary-background": backgroundColor === "secondary-background",
|
|
1166
|
+
"ui:bg-slate-100": backgroundColor === "base",
|
|
1167
|
+
"ui:bg-blue-50": backgroundColor === "blue",
|
|
1168
|
+
"ui:bg-red-50": backgroundColor === "red",
|
|
1169
|
+
"ui:bg-green-50": backgroundColor === "green",
|
|
1170
|
+
"ui:bg-amber-50": backgroundColor === "amber",
|
|
1171
|
+
[`ui:w-${width}`]: width && width !== "full",
|
|
1172
|
+
"ui:w-full": width === "full",
|
|
1173
|
+
"ui:w-1/2": width === "1/2",
|
|
1174
|
+
"ui:w-1/3": width === "1/3",
|
|
1175
|
+
"ui:w-2/3": width === "2/3",
|
|
1176
|
+
"ui:w-1/4": width === "1/4",
|
|
1177
|
+
"ui:w-3/4": width === "3/4"
|
|
1178
1178
|
}, {
|
|
1179
|
-
"hover:
|
|
1180
|
-
"hover:
|
|
1181
|
-
"hover:
|
|
1182
|
-
"hover:
|
|
1183
|
-
"hover:
|
|
1184
|
-
"hover:
|
|
1185
|
-
"hover:
|
|
1186
|
-
"hover:
|
|
1179
|
+
"ui:hover:bg-slate-100": hoverBackgroundColor === "base",
|
|
1180
|
+
"ui:hover:bg-background": backgroundColor === "background",
|
|
1181
|
+
"ui:hover:bg-secondary-background": hoverBackgroundColor === "secondary-background",
|
|
1182
|
+
"ui:hover:bg-blue-50": hoverBackgroundColor === "blue",
|
|
1183
|
+
"ui:hover:bg-red-50": hoverBackgroundColor === "red",
|
|
1184
|
+
"ui:hover:bg-green-50": hoverBackgroundColor === "green",
|
|
1185
|
+
"ui:hover:bg-amber-50": hoverBackgroundColor === "amber",
|
|
1186
|
+
"ui:hover:bg-primary-background": hoverBackgroundColor === "primary"
|
|
1187
1187
|
}, {
|
|
1188
|
-
"ui
|
|
1188
|
+
"ui:transition-colors ui:motion-reduce:transition-none": hoverBackgroundColor !== void 0
|
|
1189
1189
|
}, {
|
|
1190
|
-
"ui
|
|
1191
|
-
"ui
|
|
1192
|
-
"ui
|
|
1193
|
-
"ui
|
|
1194
|
-
"ui
|
|
1195
|
-
"ui
|
|
1196
|
-
"ui
|
|
1197
|
-
"ui
|
|
1198
|
-
"ui
|
|
1199
|
-
"ui
|
|
1200
|
-
"ui
|
|
1201
|
-
"ui
|
|
1202
|
-
},
|
|
1190
|
+
"ui:cursor-auto": cursor === "auto",
|
|
1191
|
+
"ui:cursor-default": cursor === "default",
|
|
1192
|
+
"ui:cursor-pointer": cursor === "pointer",
|
|
1193
|
+
"ui:cursor-wait": cursor === "wait",
|
|
1194
|
+
"ui:cursor-move": cursor === "move",
|
|
1195
|
+
"ui:cursor-help": cursor === "help",
|
|
1196
|
+
"ui:cursor-not-allowed": cursor === "not-allowed",
|
|
1197
|
+
"ui:cursor-progress": cursor === "progress",
|
|
1198
|
+
"ui:cursor-copy": cursor === "copy",
|
|
1199
|
+
"ui:cursor-no-drop": cursor === "no-drop",
|
|
1200
|
+
"ui:cursor-grab": cursor === "grab",
|
|
1201
|
+
"ui:cursor-grabbing": cursor === "grabbing"
|
|
1202
|
+
}, shadowClassName, borderRadiusClassName, borderRadiusLeftClassName, borderRadiusRightClassName);
|
|
1203
|
+
return jsxRuntime.jsx(Element, Object.assign({ className: tailwindMerge.twMerge(boxClasses, className) }, attributesWithoutSpacingKeys));
|
|
1203
1204
|
};
|
|
1204
1205
|
|
|
1205
1206
|
const Stack = (props) => {
|
|
1206
1207
|
const { children, gap, align = "start", justify = "normal", axis = "y", className, reverse, wrap = false, divider } = props, attributes = __rest(props, ["children", "gap", "align", "justify", "axis", "className", "reverse", "wrap", "divider"]);
|
|
1207
|
-
const stackClasses = classNames__default.default(`ui
|
|
1208
|
-
"ui
|
|
1209
|
-
"ui
|
|
1210
|
-
"ui
|
|
1211
|
-
"ui
|
|
1212
|
-
"ui
|
|
1213
|
-
|
|
1214
|
-
|
|
1208
|
+
const stackClasses = classNames__default.default(`ui:flex`, {
|
|
1209
|
+
"ui:flex-row": axis === "x",
|
|
1210
|
+
"ui:flex-col": axis === "y",
|
|
1211
|
+
"ui:flex-row-reverse": axis === "x" && reverse,
|
|
1212
|
+
"ui:flex-col-reverse": axis === "y" && reverse,
|
|
1213
|
+
"ui:flex-wrap": wrap,
|
|
1214
|
+
"ui:gap-m": gap === "m",
|
|
1215
|
+
"ui:gap-none": gap === "none",
|
|
1216
|
+
"ui:gap-xxxxs": gap === "xxxxs",
|
|
1217
|
+
"ui:gap-xxxs": gap === "xxxs",
|
|
1218
|
+
"ui:gap-xxs": gap === "xxs",
|
|
1219
|
+
"ui:gap-xs": gap === "xs",
|
|
1220
|
+
"ui:gap-s": gap === "s",
|
|
1221
|
+
"ui:gap-l": gap === "l",
|
|
1222
|
+
"ui:gap-xl": gap === "xl",
|
|
1223
|
+
"ui:gap-xxl": gap === "xxl",
|
|
1224
|
+
"ui:justify-center": justify === "center",
|
|
1225
|
+
"ui:justify-start": justify === "start",
|
|
1226
|
+
"ui:justify-end": justify === "end",
|
|
1227
|
+
"ui:justify-normal": justify === "normal",
|
|
1228
|
+
"ui:justify-between": justify === "between",
|
|
1229
|
+
"ui:justify-around": justify === "around",
|
|
1230
|
+
"ui:justify-evenly": justify === "evenly",
|
|
1231
|
+
"ui:items-center": align === "center",
|
|
1232
|
+
"ui:items-start": align === "start",
|
|
1233
|
+
"ui:items-end": align === "end",
|
|
1234
|
+
"ui:items-baseline": align === "baseline",
|
|
1235
|
+
"ui:items-stretch": align === "stretch",
|
|
1236
|
+
"ui:items-normal": align === "normal"
|
|
1237
|
+
});
|
|
1238
|
+
const classes = tailwindMerge.twMerge(stackClasses, className);
|
|
1215
1239
|
if (divider) {
|
|
1216
1240
|
const numberOfChildNodes = React__namespace.default.Children.toArray(children).length;
|
|
1217
|
-
return jsxRuntime.jsx(Box, Object.assign({ className:
|
|
1241
|
+
return jsxRuntime.jsx(Box, Object.assign({ className: classes }, attributes, { children: React__namespace.default.Children.map(children, (child, index) => {
|
|
1218
1242
|
const isLastItem = index >= numberOfChildNodes - 1;
|
|
1219
1243
|
if (React__namespace.default.isValidElement(child) === false) {
|
|
1220
1244
|
return null;
|
|
@@ -1225,28 +1249,28 @@ const Stack = (props) => {
|
|
|
1225
1249
|
return jsxRuntime.jsxs(React__namespace.default.Fragment, { children: [child, divider] });
|
|
1226
1250
|
}) }));
|
|
1227
1251
|
}
|
|
1228
|
-
return jsxRuntime.jsx(Box, Object.assign({ className:
|
|
1252
|
+
return jsxRuntime.jsx(Box, Object.assign({ className: classes }, attributes, { children }));
|
|
1229
1253
|
};
|
|
1230
1254
|
|
|
1231
1255
|
const BaseListHeader = ({ title, subtitle, button, headerAccessory, transparent, withBorder }) => {
|
|
1232
1256
|
const hasHeaderComponent = Boolean(button || headerAccessory);
|
|
1233
|
-
return jsxRuntime.jsxs("div", { "data-test-id": "base-list-header", className: classNames__default.default("ui
|
|
1234
|
-
"ui
|
|
1235
|
-
"ui
|
|
1236
|
-
"ui
|
|
1237
|
-
"ui
|
|
1238
|
-
"ui
|
|
1239
|
-
"ui
|
|
1240
|
-
"ui
|
|
1241
|
-
"ui
|
|
1242
|
-
"ui
|
|
1243
|
-
}), children: [jsxRuntime.jsxs(Stack, { children: [typeof title === "string" && jsxRuntime.jsx(Title, { variant: "xs", text: title }), title && typeof title === "object" && jsxRuntime.jsx(Title, Object.assign({ variant: "xs" }, title)), subtitle && jsxRuntime.jsx(Text, { color: "on-surface-variant", children: subtitle })] }), button && jsxRuntime.jsx("div", { className: "ui
|
|
1257
|
+
return jsxRuntime.jsxs("div", { "data-test-id": "base-list-header", className: classNames__default.default("ui:flex ui:flex-row ui:items-center ui:space-x-4 ui:rounded-t-2xl", {
|
|
1258
|
+
"ui:py-4": !hasHeaderComponent || subtitle,
|
|
1259
|
+
"ui:py-2": hasHeaderComponent && !subtitle,
|
|
1260
|
+
"ui:border-slate-300 ui:bg-white ui:px-4": !transparent,
|
|
1261
|
+
"ui:border-b ui:border-b-slate-200": !transparent && !withBorder,
|
|
1262
|
+
"ui:border ui:border-b-0": withBorder && !transparent,
|
|
1263
|
+
"ui:mb-px": transparent,
|
|
1264
|
+
"ui:justify-between": title && hasHeaderComponent,
|
|
1265
|
+
"ui:justify-start": title && !hasHeaderComponent,
|
|
1266
|
+
"ui:justify-end": !title && hasHeaderComponent
|
|
1267
|
+
}), children: [jsxRuntime.jsxs(Stack, { children: [typeof title === "string" && jsxRuntime.jsx(Title, { variant: "xs", text: title }), title && typeof title === "object" && jsxRuntime.jsx(Title, Object.assign({ variant: "xs" }, title)), subtitle && jsxRuntime.jsx(Text, { color: "on-surface-variant", children: subtitle })] }), button && jsxRuntime.jsx("div", { className: "ui:space-x-3", children: React__namespace.default.createElement(button.buttonType, button.buttonProps) }), headerAccessory && jsxRuntime.jsx("div", { className: "ui:space-x-3", children: headerAccessory })] });
|
|
1244
1268
|
};
|
|
1245
1269
|
|
|
1246
1270
|
const BaseListEmptyState = ({ message, roundTop, withBorder }) => {
|
|
1247
|
-
const className = classNames__default.default("ui
|
|
1248
|
-
"ui
|
|
1249
|
-
"ui
|
|
1271
|
+
const className = classNames__default.default("ui:p-4 ui:bg-white ui:rounded-b-2xl", {
|
|
1272
|
+
"ui:rounded-t-2xl": roundTop,
|
|
1273
|
+
"ui:border-slate-300 ui:border": withBorder
|
|
1250
1274
|
});
|
|
1251
1275
|
return jsxRuntime.jsx("div", { className, children: jsxRuntime.jsx(Text, { children: message }) });
|
|
1252
1276
|
};
|
|
@@ -1271,13 +1295,13 @@ function isIconKey(key) {
|
|
|
1271
1295
|
|
|
1272
1296
|
const DragHandle = React.forwardRef((_a, ref) => {
|
|
1273
1297
|
var { dataTestId, className: classes, grabbing, disabled = false } = _a, props = __rest(_a, ["dataTestId", "className", "grabbing", "disabled"]);
|
|
1274
|
-
const className = classNames__default.default(classes, "ui
|
|
1275
|
-
"ui
|
|
1276
|
-
"ui
|
|
1277
|
-
"hover:
|
|
1278
|
-
"ui
|
|
1298
|
+
const className = classNames__default.default(classes, "ui:py-2 ui:focus:outline-primary", {
|
|
1299
|
+
"ui:cursor-grab": !grabbing && !disabled,
|
|
1300
|
+
"ui:cursor-grabbing ui:shadow-sm ui:bg-slate-200": grabbing && !disabled,
|
|
1301
|
+
"ui:hover:bg-slate-200 ui:hover:shadow-sm ui:transition ui:duration-200 ui:rounded": !disabled,
|
|
1302
|
+
"ui:cursor-not-allowed": disabled
|
|
1279
1303
|
});
|
|
1280
|
-
return jsxRuntime.jsx("button", Object.assign({ ref }, props, { tabIndex: 0, className, "data-test-id": dataTestId !== null && dataTestId !== void 0 ? dataTestId : "dragHandle", children: jsxRuntime.jsx(Icon, { name: "DragIcon", className: disabled ? "ui
|
|
1304
|
+
return jsxRuntime.jsx("button", Object.assign({ ref }, props, { tabIndex: 0, className, "data-test-id": dataTestId !== null && dataTestId !== void 0 ? dataTestId : "dragHandle", children: jsxRuntime.jsx(Icon, { name: "DragIcon", className: disabled ? "ui:text-slate-300" : "ui:text-slate-400" }) }));
|
|
1281
1305
|
});
|
|
1282
1306
|
|
|
1283
1307
|
var img$9 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3e%3cpath d='M18 16V2C18 0.9 17.1 0 16 0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H16C17.1 18 18 17.1 18 16ZM5.9 10.98L8 13.51L11.1 9.52C11.3 9.26 11.7 9.26 11.9 9.53L15.41 14.21C15.66 14.54 15.42 15.01 15.01 15.01H3.02C2.6 15.01 2.37 14.53 2.63 14.2L5.12 11C5.31 10.74 5.69 10.73 5.9 10.98Z' fill='%23D1D5DB'/%3e%3c/svg%3e";
|
|
@@ -1293,7 +1317,7 @@ const ImageInner = (_a) => {
|
|
|
1293
1317
|
return null;
|
|
1294
1318
|
}
|
|
1295
1319
|
}
|
|
1296
|
-
return jsxRuntime.jsx(reactLazyLoadImageComponent.LazyLoadImage, Object.assign({ className: classNames__default.default(className), effect: "blur", useIntersectionObserver: true, placeholder: jsxRuntime.jsx("div", { className: "ui
|
|
1320
|
+
return jsxRuntime.jsx(reactLazyLoadImageComponent.LazyLoadImage, Object.assign({ className: classNames__default.default(className), effect: "blur", useIntersectionObserver: true, placeholder: jsxRuntime.jsx("div", { className: "ui:flex ui:h-full ui:w-full ui:flex-row ui:items-center ui:justify-center ui:rounded", children: jsxRuntime.jsx("img", { src: img$9, alt: "image-icon" }) }), src, onClick, onError: () => setIsError(true), wrapperClassName }, otherProps));
|
|
1297
1321
|
};
|
|
1298
1322
|
var Image$1 = reactLazyLoadImageComponent.trackWindowScroll(ImageInner);
|
|
1299
1323
|
|
|
@@ -1306,7 +1330,7 @@ const BaseListIcon = ({ icon, onAssetLoadError }) => {
|
|
|
1306
1330
|
function onListItemIconLoad() {
|
|
1307
1331
|
setLoadIconError(false);
|
|
1308
1332
|
}
|
|
1309
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon && React__namespace.default.isValidElement(icon) && icon, icon && typeof icon === "function" && React__namespace.default.createElement(icon, { className: "ui
|
|
1333
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon && React__namespace.default.isValidElement(icon) && icon, icon && typeof icon === "function" && React__namespace.default.createElement(icon, { className: "ui:w-6 ui:h-6" }), !loadIconError && icon && typeof icon === "string" && jsxRuntime.jsx(Image$1, { src: icon, "data-chromatic": "ignore", alt: "list-item-icon", className: "ui:h-6 ui:w-6 ui:text-sm", onLoad: onListItemIconLoad, onError: onListItemIconLoadError }), loadIconError && jsxRuntime.jsx(ImageIcon, { className: "ui:h-6 ui:w-6 ui:text-slate-300" })] });
|
|
1310
1334
|
};
|
|
1311
1335
|
|
|
1312
1336
|
function createAssetLoadError(payload, callback) {
|
|
@@ -1317,24 +1341,24 @@ function createAssetLoadError(payload, callback) {
|
|
|
1317
1341
|
}
|
|
1318
1342
|
const BaseListItem = React__namespace.default.forwardRef(({ itemId, title, tooltipId, roundTop, roundBottom = true, isDraggable, isSelected, subtitle, accessories, onlyShowAccessoriesOnHover, icon, onClick, handleItemClick, onAssetLoadError, dataTestId, renderDragHandle, withBorder, htmlProps, className: classNameProp, __isNested }, ref) => {
|
|
1319
1343
|
const clickHandler = onClick !== null && onClick !== void 0 ? onClick : handleItemClick;
|
|
1320
|
-
const className = classNames__default.default("ui
|
|
1321
|
-
"first:
|
|
1322
|
-
"last:
|
|
1323
|
-
"ui
|
|
1324
|
-
"hover:
|
|
1325
|
-
"last:
|
|
1326
|
-
"first:
|
|
1344
|
+
const className = classNames__default.default("ui:group", "ui:flex ui:flex-row ui:items-center ui:space-x-4 ui:bg-white", "ui:px-4 ui:border-b ui:border-slate-200", {
|
|
1345
|
+
"ui:first:rounded-t-2xl": roundTop,
|
|
1346
|
+
"ui:last:rounded-b-2xl": roundBottom,
|
|
1347
|
+
"ui:cursor-pointer": clickHandler,
|
|
1348
|
+
"ui:hover:bg-blue-50 ui:transition-colors ui:ease-in-out ui:duration-300": clickHandler,
|
|
1349
|
+
"ui:last:border-b-0": !withBorder,
|
|
1350
|
+
"ui:first:border-t ui:border-l ui:border-r": withBorder,
|
|
1327
1351
|
// Nested padding calculated as 3x medium spacing and 2x large spacing (size of our icons)
|
|
1328
|
-
"ui
|
|
1352
|
+
"ui:pl-[calc(3*theme('spacing.m')+2*theme('spacing.l'))]": __isNested
|
|
1329
1353
|
}, classNameProp);
|
|
1330
|
-
return jsxRuntime.jsxs("li", Object.assign({ className, "data-id": itemId, "data-tip": itemId, "data-for": tooltipId, "data-test-id": dataTestId || `base-list-item-${itemId}`, onClick: clickHandler }, htmlProps, { ref, children: [isDraggable && (renderDragHandle ? renderDragHandle() : jsxRuntime.jsx(DragHandle, { grabbing: false })), __isNested && jsxRuntime.jsx(Box, { width: "xxs", backgroundColor: "primary", className: "ui
|
|
1354
|
+
return jsxRuntime.jsxs("li", Object.assign({ className, "data-id": itemId, "data-tip": itemId, "data-for": tooltipId, "data-test-id": dataTestId || `base-list-item-${itemId}`, onClick: clickHandler }, htmlProps, { ref, children: [isDraggable && (renderDragHandle ? renderDragHandle() : jsxRuntime.jsx(DragHandle, { grabbing: false })), __isNested && jsxRuntime.jsx(Box, { width: "xxs", backgroundColor: "primary", className: "ui:self-stretch" }), icon && jsxRuntime.jsx(BaseListIcon, { icon, onAssetLoadError: createAssetLoadError({
|
|
1331
1355
|
itemId,
|
|
1332
1356
|
title,
|
|
1333
1357
|
subtitle,
|
|
1334
1358
|
icon
|
|
1335
|
-
}, onAssetLoadError) }), jsxRuntime.jsxs("div", { className: "ui
|
|
1336
|
-
"ui
|
|
1337
|
-
"group-hover:
|
|
1359
|
+
}, onAssetLoadError) }), jsxRuntime.jsxs("div", { className: "ui:py-4", children: [typeof title === "string" ? jsxRuntime.jsx(Text, { variant: isSelected ? "strong" : "base", children: title }) : title, subtitle && (typeof subtitle === "string" ? jsxRuntime.jsx(Text, { variant: "sm", color: "slate-500", children: subtitle }) : subtitle)] }), jsxRuntime.jsx("div", { className: "ui:grow" }), jsxRuntime.jsx(Stack, { axis: "x", gap: "xxs", align: "center", className: classNames__default.default({
|
|
1360
|
+
"ui:opacity-0": onlyShowAccessoriesOnHover,
|
|
1361
|
+
"ui:group-hover:opacity-100": onlyShowAccessoriesOnHover
|
|
1338
1362
|
}), children: accessories })] }));
|
|
1339
1363
|
});
|
|
1340
1364
|
|
|
@@ -1410,23 +1434,23 @@ const DefaultState = ({ icon, message, horizontal = false, alignMessage = "cente
|
|
|
1410
1434
|
return null;
|
|
1411
1435
|
}
|
|
1412
1436
|
const alignLeft = horizontal || alignMessage === "left";
|
|
1413
|
-
const className = classNames__default.default("ui
|
|
1414
|
-
"ui
|
|
1415
|
-
"ui
|
|
1437
|
+
const className = classNames__default.default("ui:p-4 ui:flex ui:items-center", {
|
|
1438
|
+
"ui:flex-col ui:justify-center": !alignLeft,
|
|
1439
|
+
"ui:flex-row ui:w-full ": alignLeft
|
|
1416
1440
|
});
|
|
1417
|
-
return jsxRuntime.jsxs("div", { className, children: [icon && jsxRuntime.jsx(Icon, { name: icon, className: classNames__default.default("ui
|
|
1418
|
-
"ui
|
|
1419
|
-
"ui
|
|
1420
|
-
}) }), message && jsxRuntime.jsx(Text, { type: "base", color: "slate-500", className: "ui
|
|
1441
|
+
return jsxRuntime.jsxs("div", { className, children: [icon && jsxRuntime.jsx(Icon, { name: icon, className: classNames__default.default("ui:text-slate-500", {
|
|
1442
|
+
"ui:mb-2": message && !alignLeft,
|
|
1443
|
+
"ui:mr-2": alignLeft
|
|
1444
|
+
}) }), message && jsxRuntime.jsx(Text, { type: "base", color: "slate-500", className: "ui:text-center", text: message })] });
|
|
1421
1445
|
};
|
|
1422
1446
|
const DropzonePresentation = React.forwardRef(({ message, icon, isHighlighted, isClickable, className, dataTestId, children, horizontal, alignMessage }, ref) => {
|
|
1423
|
-
const classes = classNames__default.default("ui
|
|
1447
|
+
const classes = classNames__default.default("ui:border ui:flex ui:items-center ui:justify-center ui:border-primary", {
|
|
1424
1448
|
"dropzone-dashed-border": !isHighlighted,
|
|
1425
|
-
"ui
|
|
1426
|
-
"ui
|
|
1427
|
-
"ui
|
|
1428
|
-
"ui
|
|
1429
|
-
"hover:
|
|
1449
|
+
"ui:bg-white": !isHighlighted,
|
|
1450
|
+
"ui:bg-blue-50": isHighlighted,
|
|
1451
|
+
"ui:border-dashed": !isHighlighted,
|
|
1452
|
+
"ui:border-solid": isHighlighted,
|
|
1453
|
+
"ui:hover:bg-blue-100 ui:transition-colors ui:ease-in-out ui:duration-300": isClickable
|
|
1430
1454
|
}, className);
|
|
1431
1455
|
return jsxRuntime.jsx("div", { className: classes, ref, "data-test-id": dataTestId, children: children || jsxRuntime.jsx(DefaultState, { icon, message, horizontal, alignMessage }) });
|
|
1432
1456
|
});
|
|
@@ -1439,7 +1463,7 @@ const Dropzone = (_a) => {
|
|
|
1439
1463
|
});
|
|
1440
1464
|
const presentation = jsxRuntime.jsx(DropzonePresentation, Object.assign({ ref: setNodeRef, isHighlighted: isOver, isClickable: onClick && !disabled }, props, { dataTestId: dataTestId !== null && dataTestId !== void 0 ? dataTestId : `dropzone-${identifier}` }));
|
|
1441
1465
|
if (onClick) {
|
|
1442
|
-
return jsxRuntime.jsx("button", { onClick, disabled, className: "ui
|
|
1466
|
+
return jsxRuntime.jsx("button", { onClick, disabled, className: "ui:block ui:w-full ui:rounded ui:focus:outline-primary", children: presentation });
|
|
1443
1467
|
}
|
|
1444
1468
|
return presentation;
|
|
1445
1469
|
};
|
|
@@ -1456,7 +1480,7 @@ const SortableBaseListItem = (_a) => {
|
|
|
1456
1480
|
});
|
|
1457
1481
|
const styleTransform = utilities.CSS.Transform.toString(transform);
|
|
1458
1482
|
if (isDragging) {
|
|
1459
|
-
return jsxRuntime.jsxs("div", { style: { transform: styleTransform, position: "relative" }, children: [jsxRuntime.jsx(DropzonePresentation, { className: "ui
|
|
1483
|
+
return jsxRuntime.jsxs("div", { style: { transform: styleTransform, position: "relative" }, children: [jsxRuntime.jsx(DropzonePresentation, { className: "ui:absolute ui:h-full ui:w-full" }), jsxRuntime.jsx("div", { className: "ui:invisible", children: jsxRuntime.jsx(BaseListItem, Object.assign({}, props, { ref: setNodeRef, htmlProps: { style: { transform: styleTransform } }, isDraggable: true, renderDragHandle: () => jsxRuntime.jsx(DragHandle, Object.assign({}, attributes, listeners, { disabled: !props.isDraggable, grabbing: isDragging })) })) })] });
|
|
1460
1484
|
}
|
|
1461
1485
|
return jsxRuntime.jsx(BaseListItem, Object.assign({}, props, { ref: setNodeRef, htmlProps: { style: { transform: styleTransform } }, isDraggable: true, renderDragHandle: () => jsxRuntime.jsx(DragHandle, Object.assign({}, attributes, listeners, { disabled: !props.isDraggable, grabbing: isDragging })) }));
|
|
1462
1486
|
};
|
|
@@ -1470,7 +1494,7 @@ const ListItem = (props) => {
|
|
|
1470
1494
|
return jsxRuntime.jsx(BaseListItem, Object.assign({}, props));
|
|
1471
1495
|
};
|
|
1472
1496
|
|
|
1473
|
-
var css_248z$e = "
|
|
1497
|
+
var css_248z$e = "/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */\n@layer properties;\nli.gu-mirror {\n position: fixed;\n z-index: 9999;\n margin: calc(var(--ui-spacing, 0.25rem) * 0);\n --tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 8px 10px -6px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n}\nli.gu-hide {\n display: none;\n}\nli.gu-unselectable {\n user-select: none;\n}\nli.gu-transit {\n background-color: var(--ui-color-blue-50, #eff6ff);\n filter: none;\n border-radius: 0;\n --tw-border-style: none;\n border-style: none;\n opacity: 100%;\n}\nli.gu-transit > * {\n visibility: hidden;\n}\n@property --tw-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: \"*\";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n }\n }\n}";
|
|
1474
1498
|
styleInject(css_248z$e);
|
|
1475
1499
|
|
|
1476
1500
|
const DefaultList = (_a) => {
|
|
@@ -1510,8 +1534,8 @@ const DefaultList = (_a) => {
|
|
|
1510
1534
|
e.stopPropagation();
|
|
1511
1535
|
toggleExpand(parentItem.itemId);
|
|
1512
1536
|
}
|
|
1513
|
-
}, children: jsxRuntime.jsx(ChevronRightIcon, { color: "neutral-interactive", "aria-hidden": "true", className: classNames__default.default("ui
|
|
1514
|
-
"ui
|
|
1537
|
+
}, children: jsxRuntime.jsx(ChevronRightIcon, { color: "neutral-interactive", "aria-hidden": "true", className: classNames__default.default("ui:shrink-0 ui:transition-transform", {
|
|
1538
|
+
"ui:rotate-90": isExpanded
|
|
1515
1539
|
}) }) }), parentItem.icon ? jsxRuntime.jsx(BaseListIcon, { icon: parentItem.icon }) : null] });
|
|
1516
1540
|
}
|
|
1517
1541
|
result.push(Object.assign(Object.assign(Object.assign({}, parentItem), { icon: composedIcon, htmlProps: Object.assign(Object.assign({}, parentItem.htmlProps), { id: `list-item-${parentItem.itemId}` }) }), parentItem.handleItemClick ? {
|
|
@@ -1548,7 +1572,7 @@ const DefaultList = (_a) => {
|
|
|
1548
1572
|
});
|
|
1549
1573
|
}
|
|
1550
1574
|
setDraggedListItem(null);
|
|
1551
|
-
}, children: [jsxRuntime.jsx(SortableBaseList, Object.assign({ draggableIdentifier: "sortable-list-identifier", items: innerItems.map((item) => Object.assign(Object.assign({}, item), { draggableIdentifier: `${item.itemId}`, isDraggable: true, onAssetLoadError })), subtitle }, props)), jsxRuntime.jsx(core.DragOverlay, { dropAnimation: null, wrapperElement: "ul", className: "ui
|
|
1575
|
+
}, children: [jsxRuntime.jsx(SortableBaseList, Object.assign({ draggableIdentifier: "sortable-list-identifier", items: innerItems.map((item) => Object.assign(Object.assign({}, item), { draggableIdentifier: `${item.itemId}`, isDraggable: true, onAssetLoadError })), subtitle }, props)), jsxRuntime.jsx(core.DragOverlay, { dropAnimation: null, wrapperElement: "ul", className: "ui:shadow-lg", children: draggedListItem && jsxRuntime.jsx(ListItem, Object.assign({}, draggedListItem, { renderDragHandle: () => jsxRuntime.jsx(DragHandle, { grabbing: true }) })) })] });
|
|
1552
1576
|
};
|
|
1553
1577
|
const List = (props) => {
|
|
1554
1578
|
if ("draggableListType" in props) {
|
|
@@ -1567,27 +1591,27 @@ const List = (props) => {
|
|
|
1567
1591
|
const calculateResponsiveWidthClasses = (size) => {
|
|
1568
1592
|
if (typeof size === "string") {
|
|
1569
1593
|
return {
|
|
1570
|
-
"ui
|
|
1571
|
-
"ui
|
|
1572
|
-
"ui
|
|
1573
|
-
"ui
|
|
1574
|
-
"ui
|
|
1594
|
+
"ui:w-16": size === "sm",
|
|
1595
|
+
"ui:w-32": size === "md",
|
|
1596
|
+
"ui:w-56": size === "lg",
|
|
1597
|
+
"ui:w-80": size === "xl",
|
|
1598
|
+
"ui:w-full": size === "full"
|
|
1575
1599
|
};
|
|
1576
1600
|
}
|
|
1577
1601
|
const sizesMapped = {
|
|
1578
|
-
sm: "
|
|
1579
|
-
md: "
|
|
1580
|
-
lg: "
|
|
1581
|
-
xl: "
|
|
1582
|
-
full: "
|
|
1602
|
+
sm: "w-16",
|
|
1603
|
+
md: "w-32",
|
|
1604
|
+
lg: "w-56",
|
|
1605
|
+
xl: "w-80",
|
|
1606
|
+
full: "w-full"
|
|
1583
1607
|
};
|
|
1584
1608
|
const [defaultSize, smallSize, mediumSize, largeSize, extraLargeSize] = size;
|
|
1585
1609
|
return [
|
|
1586
|
-
sizesMapped[defaultSize]
|
|
1587
|
-
smallSize ? `sm:${sizesMapped[smallSize]}` : "",
|
|
1588
|
-
mediumSize ? `md:${sizesMapped[mediumSize]}` : "",
|
|
1589
|
-
largeSize ? `lg:${sizesMapped[largeSize]}` : "",
|
|
1590
|
-
extraLargeSize ? `xl:${sizesMapped[extraLargeSize]}` : ""
|
|
1610
|
+
`ui:${sizesMapped[defaultSize]}`,
|
|
1611
|
+
smallSize ? `ui:sm:${sizesMapped[smallSize]}` : "",
|
|
1612
|
+
mediumSize ? `ui:md:${sizesMapped[mediumSize]}` : "",
|
|
1613
|
+
largeSize ? `ui:lg:${sizesMapped[largeSize]}` : "",
|
|
1614
|
+
extraLargeSize ? `ui:xl:${sizesMapped[extraLargeSize]}` : ""
|
|
1591
1615
|
].filter(Boolean);
|
|
1592
1616
|
};
|
|
1593
1617
|
|
|
@@ -1596,41 +1620,41 @@ const StyledInput = React__namespace.default.forwardRef((_a, ref) => {
|
|
|
1596
1620
|
const hasPrefix = !!prefix;
|
|
1597
1621
|
const hasSuffix = !!suffix;
|
|
1598
1622
|
const hasNoExtraContent = !hasPrefix && !hasSuffix;
|
|
1599
|
-
return jsxRuntime.jsxs(FlexRow, { spacing: "none", "data-test-id": "input-component-container", stretch: false, children: [jsxRuntime.jsx("span", { className: classNames__default.default("ui
|
|
1600
|
-
"ui
|
|
1601
|
-
"ui
|
|
1602
|
-
"ui
|
|
1603
|
-
"ui
|
|
1604
|
-
}, "ui
|
|
1605
|
-
"ui
|
|
1606
|
-
}), children: [icon && jsxRuntime.jsx("div", { className: classNames__default.default("ui
|
|
1607
|
-
"ui
|
|
1623
|
+
return jsxRuntime.jsxs(FlexRow, { spacing: "none", "data-test-id": "input-component-container", stretch: false, children: [jsxRuntime.jsx("span", { className: classNames__default.default("ui:h-11 ui:border-b ui:border-t ui:border-solid ui:border-input-border", {
|
|
1624
|
+
"ui:hidden": hasNoExtraContent,
|
|
1625
|
+
"ui:order-1": hasSuffix,
|
|
1626
|
+
"ui:rounded-l ui:border-l": hasPrefix,
|
|
1627
|
+
"ui:rounded-r ui:border-r": hasSuffix
|
|
1628
|
+
}, "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", {
|
|
1629
|
+
"ui:flex ui:grow": width === "full"
|
|
1630
|
+
}), children: [icon && jsxRuntime.jsx("div", { className: classNames__default.default("ui:absolute ui:left-4 ui:top-1/2", {
|
|
1631
|
+
"ui:grow": width === "full"
|
|
1608
1632
|
}), style: {
|
|
1609
1633
|
transform: "translateY(-50%)",
|
|
1610
1634
|
zIndex: 20
|
|
1611
|
-
}, children: jsxRuntime.jsx(IconComponentOrKey, { name: icon, className: "ui
|
|
1612
|
-
"ui
|
|
1613
|
-
"ui
|
|
1614
|
-
"ui
|
|
1615
|
-
"hover:
|
|
1616
|
-
"ui
|
|
1617
|
-
"focus:
|
|
1618
|
-
"focus:
|
|
1619
|
-
"focus:
|
|
1620
|
-
"ui
|
|
1621
|
-
}, "ui
|
|
1622
|
-
"ui
|
|
1623
|
-
// to make sure the ui
|
|
1624
|
-
"ui
|
|
1625
|
-
"ui
|
|
1626
|
-
"ui
|
|
1627
|
-
"ui
|
|
1628
|
-
"ui
|
|
1629
|
-
}, "ui
|
|
1635
|
+
}, children: jsxRuntime.jsx(IconComponentOrKey, { name: icon, className: "ui:h-6 ui:w-6 ui:text-slate-300" }) }), jsxRuntime.jsx("input", Object.assign({ ref, className: classNames__default.default("ui:block", calculateResponsiveWidthClasses(width), { "ui:pl-12": icon }, {
|
|
1636
|
+
"ui:bg-slate-50 ui:text-slate-400": attributes.disabled,
|
|
1637
|
+
"ui:text-slate-800": !attributes.disabled,
|
|
1638
|
+
"ui:border-input-border": !attributes.disabled && !isError,
|
|
1639
|
+
"ui:hover:border-input-border-dark": !attributes.disabled,
|
|
1640
|
+
"ui:border-red-700": isError,
|
|
1641
|
+
"ui:focus:outline-negative": isError,
|
|
1642
|
+
"ui:focus:border-primary": !isError,
|
|
1643
|
+
"ui:focus:outline-primary": !isError,
|
|
1644
|
+
"ui:bg-white": !attributes.disabled
|
|
1645
|
+
}, "ui:h-11", "ui:p-2", "ui:border", "ui:text-base ui:sm:text-sm", "ui:placeholder-slate-500", "ui:border-solid", "ui:transition-colors", "ui:duration-300", {
|
|
1646
|
+
"ui:z-10": hasSuffix || hasPrefix,
|
|
1647
|
+
// to make sure the ui:outline is displayed completely
|
|
1648
|
+
"ui:rounded": hasNoExtraContent,
|
|
1649
|
+
"ui:rounded-l": hasSuffix,
|
|
1650
|
+
"ui:rounded-r": hasPrefix,
|
|
1651
|
+
"ui:order-2": hasPrefix,
|
|
1652
|
+
"ui:order-1": hasSuffix
|
|
1653
|
+
}, "ui:shadow-default", className) }, attributes)), jsxRuntime.jsx("div", { className: "ui:absolute ui:right-0 ui:top-1/2", style: {
|
|
1630
1654
|
transform: "translateY(-50%)"
|
|
1631
|
-
}, children: jsxRuntime.jsx(CrossIcon, { className: classNames__default.default("ui
|
|
1632
|
-
"ui
|
|
1633
|
-
"ui
|
|
1655
|
+
}, children: jsxRuntime.jsx(CrossIcon, { className: classNames__default.default("ui:mr-3 ui:h-6 ui:w-6 ui:cursor-pointer ui:text-slate-300", {
|
|
1656
|
+
"ui:block": isClearIconVisible,
|
|
1657
|
+
"ui:hidden": !isClearIconVisible
|
|
1634
1658
|
}), onClick: onClickClearField }) })] })] });
|
|
1635
1659
|
});
|
|
1636
1660
|
|
|
@@ -1677,7 +1701,7 @@ const SearchInput = React__namespace.default.forwardRef((props, ref) => {
|
|
|
1677
1701
|
|
|
1678
1702
|
const Content$2 = (_a) => {
|
|
1679
1703
|
var { container, children, className } = _a, contentProps = __rest(_a, ["container", "children", "className"]);
|
|
1680
|
-
return jsxRuntime.jsx(Tooltip__namespace.Portal, { container, children: jsxRuntime.jsxs(Tooltip__namespace.Content, Object.assign({ className: classNames__default.default(className, "ui
|
|
1704
|
+
return jsxRuntime.jsx(Tooltip__namespace.Portal, { container, children: jsxRuntime.jsxs(Tooltip__namespace.Content, Object.assign({ className: classNames__default.default(className, "ui:max-w-55", "ui:z-20", "ui:data-[state=delayed-open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=delayed-open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=delayed-open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2"), sideOffset: 4 }, contentProps, { children: [jsxRuntime.jsx(Box, { backgroundColor: "secondary-background", px: "m", py: "xs", borderRadius: "xxxxs", children }), jsxRuntime.jsx(Tooltip__namespace.Arrow, { width: 8, height: 8, className: "ui:fill-secondary-background" })] })) });
|
|
1681
1705
|
};
|
|
1682
1706
|
Content$2.displayName = "Tooltip.Content";
|
|
1683
1707
|
const Root$1 = (props) => jsxRuntime.jsx(Tooltip__namespace.Root, Object.assign({}, props));
|
|
@@ -1694,7 +1718,7 @@ const Tooltip = {
|
|
|
1694
1718
|
};
|
|
1695
1719
|
|
|
1696
1720
|
const Spinner = (props) => {
|
|
1697
|
-
return jsxRuntime.jsxs("svg", { className: `ui
|
|
1721
|
+
return jsxRuntime.jsxs("svg", { className: `ui:h-5 ui:w-5 ui:animate-spin ${props.className}`, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsxRuntime.jsx("circle", { className: "ui:opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), jsxRuntime.jsx("path", { className: "ui:opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] });
|
|
1698
1722
|
};
|
|
1699
1723
|
|
|
1700
1724
|
const ButtonV2 = React__namespace.default.forwardRef((_a, innerRef) => {
|
|
@@ -1713,39 +1737,39 @@ const ButtonV2 = React__namespace.default.forwardRef((_a, innerRef) => {
|
|
|
1713
1737
|
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
1714
1738
|
}
|
|
1715
1739
|
const buttonClassName = classNames__default.default([
|
|
1716
|
-
"[transition:transform_150ms,box-shadow_150ms,color_150ms,background-color_150ms,border-color_150ms,background-position_300ms] ui
|
|
1717
|
-
"ui
|
|
1718
|
-
"ui
|
|
1719
|
-
"ui
|
|
1720
|
-
"ui
|
|
1721
|
-
"ui
|
|
1722
|
-
"ui
|
|
1723
|
-
"ui
|
|
1740
|
+
"ui:[transition:transform_150ms,box-shadow_150ms,color_150ms,background-color_150ms,border-color_150ms,background-position_300ms] ui:ease-out",
|
|
1741
|
+
"ui:border",
|
|
1742
|
+
"ui:radius-xxs",
|
|
1743
|
+
"ui:outline-offset-4 ui:focus:outline-primary",
|
|
1744
|
+
"ui:group",
|
|
1745
|
+
"ui:relative",
|
|
1746
|
+
"ui:inline-flex ui:flex-row ui:items-center ui:justify-center ui:shrink-0",
|
|
1747
|
+
"ui:shadow-sm"
|
|
1724
1748
|
], {
|
|
1725
|
-
"ui
|
|
1749
|
+
"ui:gap-xxs": content
|
|
1726
1750
|
}, {
|
|
1727
|
-
"ui
|
|
1728
|
-
"ui
|
|
1729
|
-
"active:
|
|
1751
|
+
"ui:opacity-50": disabled,
|
|
1752
|
+
"ui:cursor-not-allowed": isPending !== null && isPending !== void 0 ? isPending : disabled,
|
|
1753
|
+
"ui:active:shadow-none ui:active:scale-[0.98]": isInteractive,
|
|
1730
1754
|
/**
|
|
1731
1755
|
* Specific paddings for each combination of text and/or icon.
|
|
1732
1756
|
*/
|
|
1733
|
-
"ui
|
|
1734
|
-
"ui
|
|
1757
|
+
"ui:pl-m ui:pr-l": hasContentAndLeadingIcon,
|
|
1758
|
+
"ui:pl-l ui:pr-m": hasContentAndTrailingIcon,
|
|
1735
1759
|
/**
|
|
1736
1760
|
* Deducting 1px from the padding to account for the border.
|
|
1737
1761
|
*/
|
|
1738
|
-
"ui
|
|
1739
|
-
"ui
|
|
1740
|
-
"ui
|
|
1741
|
-
}, "ui
|
|
1762
|
+
"ui:px-[calc(var(--ui-spacing-m)-1px)]": true,
|
|
1763
|
+
"ui:py-[calc(var(--ui-spacing-xxs)-1px)]": size === "medium",
|
|
1764
|
+
"ui:py-[calc(var(--ui-spacing-s)-1px)]": size === "large"
|
|
1765
|
+
}, "ui:h-12 ui:sm:h-auto", className);
|
|
1742
1766
|
const textColorClass = allowedColors[textColor !== null && textColor !== void 0 ? textColor : "base"];
|
|
1743
1767
|
const tooltipAttrs = title ? {
|
|
1744
1768
|
"data-tip": true,
|
|
1745
1769
|
"data-for": buttonTooltipId
|
|
1746
1770
|
} : {};
|
|
1747
|
-
const buttonComponent = jsxRuntime.jsxs("button", Object.assign({ ref: innerRef }, otherAttributes, { className: buttonClassName, type, onClick: handleClick, disabled: disabled !== null && disabled !== void 0 ? disabled : isPending, "aria-disabled": disabled, "aria-busy": isPending, "data-test-id": (_e = dataTestId !== null && dataTestId !== void 0 ? dataTestId : otherAttributes["data-test-id"]) !== null && _e !== void 0 ? _e : otherAttributes.id }, tooltipAttrs, { children: [leadingIcon && jsxRuntime.jsx(IconLayoutWrapper, { isInvisible: isPending, children: leadingIcon }), !leadingIcon && icon && jsxRuntime.jsx(IconLayoutWrapper, { isInvisible: isPending, children: jsxRuntime.jsx(IconComponentOrKey, { name: icon }) }), isPending && jsxRuntime.jsx("span", { className: "ui
|
|
1748
|
-
"ui
|
|
1771
|
+
const buttonComponent = jsxRuntime.jsxs("button", Object.assign({ ref: innerRef }, otherAttributes, { className: buttonClassName, type, onClick: handleClick, disabled: disabled !== null && disabled !== void 0 ? disabled : isPending, "aria-disabled": disabled, "aria-busy": isPending, "data-test-id": (_e = dataTestId !== null && dataTestId !== void 0 ? dataTestId : otherAttributes["data-test-id"]) !== null && _e !== void 0 ? _e : otherAttributes.id }, tooltipAttrs, { children: [leadingIcon && jsxRuntime.jsx(IconLayoutWrapper, { isInvisible: isPending, children: leadingIcon }), !leadingIcon && icon && jsxRuntime.jsx(IconLayoutWrapper, { isInvisible: isPending, children: jsxRuntime.jsx(IconComponentOrKey, { name: icon }) }), isPending && jsxRuntime.jsx("span", { className: "ui:absolute ui:left-1/2 ui:top-1/2 ui:-translate-x-1/2 ui:-translate-y-1/2 ui:transform ui:opacity-100", children: jsxRuntime.jsx(Spinner, { className: textColorClass }) }), content && jsxRuntime.jsx(Text, { variant: "strong", className: classNames__default.default({
|
|
1772
|
+
"ui:opacity-[0.01]": isPending
|
|
1749
1773
|
}), color: textColor, hoverColor: textHoverColor, hoverInGroup: true, children: content }), trailingIcon && jsxRuntime.jsx(IconLayoutWrapper, { isInvisible: isPending, children: trailingIcon })] }));
|
|
1750
1774
|
if (title) {
|
|
1751
1775
|
return jsxRuntime.jsxs(Tooltip.Root, { children: [jsxRuntime.jsx(Tooltip.Trigger, { asChild: true, id: buttonTooltipId, children: buttonComponent }), jsxRuntime.jsx(Tooltip.Content, { container: titleTooltipContainer, children: jsxRuntime.jsx(Tooltip.Text, { children: title }) })] });
|
|
@@ -1754,16 +1778,16 @@ const ButtonV2 = React__namespace.default.forwardRef((_a, innerRef) => {
|
|
|
1754
1778
|
});
|
|
1755
1779
|
function IconLayoutWrapper({ children, className, isInvisible }) {
|
|
1756
1780
|
return jsxRuntime.jsx("span", { className: classNames__default.default(
|
|
1757
|
-
"ui
|
|
1781
|
+
"ui:shrink-0",
|
|
1758
1782
|
/**
|
|
1759
1783
|
* Text on a medium button is 2px smaller than the icon. So to
|
|
1760
1784
|
* make sure the icon can grow beyond the text, we need to
|
|
1761
1785
|
* allow the icon to grow beyond the text. This essentially
|
|
1762
1786
|
* vertically centers the icon.
|
|
1763
1787
|
*/
|
|
1764
|
-
"
|
|
1788
|
+
"ui:-m-[2px]",
|
|
1765
1789
|
{
|
|
1766
|
-
"ui
|
|
1790
|
+
"ui:invisible": isInvisible
|
|
1767
1791
|
},
|
|
1768
1792
|
className
|
|
1769
1793
|
), children });
|
|
@@ -1772,12 +1796,12 @@ function IconLayoutWrapper({ children, className, isInvisible }) {
|
|
|
1772
1796
|
const SecondaryButton = React__namespace.default.forwardRef((props, innerRef) => {
|
|
1773
1797
|
const { textColor = "primary", textHoverColor = "blue-900" } = props, rest = __rest(props, ["textColor", "textHoverColor"]);
|
|
1774
1798
|
return jsxRuntime.jsx(ButtonV2, Object.assign({ ref: innerRef }, rest, { className: classNames__default.default([
|
|
1775
|
-
`ui
|
|
1799
|
+
`ui:text-${textColor}`,
|
|
1776
1800
|
// Colors of any icons on the button
|
|
1777
|
-
"ui
|
|
1778
|
-
"ui
|
|
1801
|
+
"ui:bg-white",
|
|
1802
|
+
"ui:border-neutral-border-high-contrast",
|
|
1779
1803
|
{
|
|
1780
|
-
"hover:
|
|
1804
|
+
"ui:hover:border-neutral-interactive ui:hover:bg-primary-background": !props.isDisabled
|
|
1781
1805
|
}
|
|
1782
1806
|
], props.className), textColor, textHoverColor }));
|
|
1783
1807
|
});
|
|
@@ -1794,7 +1818,7 @@ const imageSrc = {
|
|
|
1794
1818
|
"no-notes-found": img$6
|
|
1795
1819
|
};
|
|
1796
1820
|
const EmptyListMessage = ({ text, imageName, dataTestId = "empty-list-message", className }) => {
|
|
1797
|
-
return jsxRuntime.jsxs("div", { className: classNames__default.default("ui
|
|
1821
|
+
return jsxRuntime.jsxs("div", { className: classNames__default.default("ui:flex ui:flex-col ui:items-center", className), "data-test-id": dataTestId, children: [imageName && jsxRuntime.jsx("img", { className: "ui:mb-2.5", alt: "", src: imageSrc[imageName] }), jsxRuntime.jsx(Text, { className: "ui:text-center", text })] });
|
|
1798
1822
|
};
|
|
1799
1823
|
|
|
1800
1824
|
var img$5 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='68' height='20' viewBox='0 0 68 20'%3e %3cg fill='none' fill-rule='nonzero'%3e %3ccircle cx='10' cy='10' r='10' fill='%23F09'%3e %3canimate attributeName='opacity' dur='2s' values='1%3b0.6%3b1' repeatCount='indefinite' begin='0.1'/%3e %3canimate attributeName='r' dur='2s' repeatCount='indefinite' values='10%3b8%3b10' begin='0.1'/%3e %3c/circle%3e %3ccircle cx='34' cy='10' r='10' fill='%236ABFA5'%3e %3canimate attributeName='opacity' dur='2s' values='1%3b0.6%3b1' repeatCount='indefinite' begin='0.6'/%3e %3canimate attributeName='r' dur='2s' repeatCount='indefinite' values='10%3b8%3b10' begin='0.6'/%3e %3c/circle%3e %3ccircle cx='58' cy='10' r='10' fill='%236670A5'%3e %3canimate attributeName='opacity' dur='2s' values='1%3b0.6%3b1' repeatCount='indefinite' begin='1.1'/%3e %3canimate attributeName='r' dur='2s' repeatCount='indefinite' values='10%3b8%3b10' begin='1.1'/%3e %3c/circle%3e %3c/g%3e%3c/svg%3e";
|
|
@@ -1812,24 +1836,24 @@ function LoadingIndicator(_a) {
|
|
|
1812
1836
|
const containerClassName = classNames__default.default("cweb-loading", className, {
|
|
1813
1837
|
"as-modal": asModal
|
|
1814
1838
|
});
|
|
1815
|
-
return jsxRuntime.jsx("div", Object.assign({}, restProps, { className: containerClassName, "data-test-id": dataTestId, role: "progressbar", children: jsxRuntime.jsx("img", { src: asSpinner ? spinnerToRender : img$5, "data-chromatic": "ignore", className: classNames__default.default("ui
|
|
1816
|
-
"ui
|
|
1817
|
-
"ui
|
|
1839
|
+
return jsxRuntime.jsx("div", Object.assign({}, restProps, { className: containerClassName, "data-test-id": dataTestId, role: "progressbar", children: jsxRuntime.jsx("img", { src: asSpinner ? spinnerToRender : img$5, "data-chromatic": "ignore", className: classNames__default.default("ui:fill-current ui:stroke-current ui:text-gray-600", {
|
|
1840
|
+
"ui:h-4 ui:w-4": asSpinner,
|
|
1841
|
+
"ui:h-12 ui:w-12": !asSpinner
|
|
1818
1842
|
}) }) }));
|
|
1819
1843
|
}
|
|
1820
1844
|
|
|
1821
1845
|
const CenteredHero = ({ title, text, image, slots, background = "slate-50", imageSize = "small", dataTestId = "centered-hero" }) => {
|
|
1822
|
-
return jsxRuntime.jsxs("div", { className: classNames__default.default("ui
|
|
1823
|
-
"ui
|
|
1824
|
-
"ui
|
|
1825
|
-
}), "data-test-id": dataTestId, children: [image && jsxRuntime.jsx("img", { src: image, className: classNames__default.default("ui
|
|
1826
|
-
"ui
|
|
1827
|
-
"ui
|
|
1828
|
-
}) }), title && jsxRuntime.jsx(Title, { variant: "base", children: title }), text && jsxRuntime.jsx(Text, { className: "ui
|
|
1846
|
+
return jsxRuntime.jsxs("div", { className: classNames__default.default("ui:align-center ui:flex ui:w-full ui:flex-col ui:items-center ui:p-6", {
|
|
1847
|
+
"ui:bg-white": background === "white",
|
|
1848
|
+
"ui:bg-slate-50": background === "slate-50"
|
|
1849
|
+
}), "data-test-id": dataTestId, children: [image && jsxRuntime.jsx("img", { src: image, className: classNames__default.default("ui:mb-4", {
|
|
1850
|
+
"ui:max-h-36": imageSize === "small",
|
|
1851
|
+
"ui:max-h-72": imageSize === "large"
|
|
1852
|
+
}) }), title && jsxRuntime.jsx(Title, { variant: "base", children: title }), text && jsxRuntime.jsx(Text, { className: "ui:text-center", children: text }), (slots === null || slots === void 0 ? void 0 : slots.bottom) && jsxRuntime.jsx(Box, { mt: "m", children: slots === null || slots === void 0 ? void 0 : slots.bottom })] });
|
|
1829
1853
|
};
|
|
1830
1854
|
|
|
1831
1855
|
const AccordionListActions = (props) => {
|
|
1832
|
-
return jsxRuntime.jsx("div", { className: "ui
|
|
1856
|
+
return jsxRuntime.jsx("div", { className: "ui:flex ui:flex-row ui:flex-wrap ui:justify-start ui:gap-3", children: props.children });
|
|
1833
1857
|
};
|
|
1834
1858
|
|
|
1835
1859
|
const AccordionList = (_a) => {
|
|
@@ -1883,59 +1907,59 @@ const AccordionList = (_a) => {
|
|
|
1883
1907
|
}), content: contentForAccordionItem(filteredItem) });
|
|
1884
1908
|
})) !== null && _a2 !== void 0 ? _a2 : [];
|
|
1885
1909
|
}, [accordionItems, searchString, isSearchEnabled]);
|
|
1886
|
-
return jsxRuntime.jsxs("div", { className: "ui
|
|
1910
|
+
return jsxRuntime.jsxs("div", { className: "ui:flex ui:h-full ui:flex-col ui:overflow-auto ui:rounded-lg ui:bg-white", children: [jsxRuntime.jsxs("div", { className: "ui:flex ui:flex-col ui:space-y-4 ui:border-b ui:border-slate-200 ui:p-6", children: [jsxRuntime.jsx(Stack, { axis: "x", justify: "between", width: "full", children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [title && jsxRuntime.jsx(Title, { variant: "sm", children: title }), headerActions && jsxRuntime.jsx(jsxRuntime.Fragment, { children: headerActions })] }) }), isSearchEnabled && jsxRuntime.jsx(SearchInput, { width: "full", value: searchString, placeholder: searchPlaceholder, onChange: (e) => {
|
|
1887
1911
|
setSearchString(typeof e === "string" ? e : e.currentTarget.value);
|
|
1888
|
-
} }), buttonProps && jsxRuntime.jsx("div", { children: jsxRuntime.jsx(SecondaryButton, Object.assign({}, buttonProps)) }), actions && jsxRuntime.jsx("div", { children: actions })] }), isError && errorState && jsxRuntime.jsx(CenteredHero, { dataTestId: "hero-error", title: errorState.title, text: errorState.description, image: "" }), !isError && isLoading && jsxRuntime.jsx(LoadingIndicator, { className: "ui
|
|
1912
|
+
} }), buttonProps && jsxRuntime.jsx("div", { children: jsxRuntime.jsx(SecondaryButton, Object.assign({}, buttonProps)) }), actions && jsxRuntime.jsx("div", { children: actions })] }), isError && errorState && jsxRuntime.jsx(CenteredHero, { dataTestId: "hero-error", title: errorState.title, text: errorState.description, image: "" }), !isError && isLoading && jsxRuntime.jsx(LoadingIndicator, { className: "ui:flex-1" }), !isError && !isLoading && filteredAccordionItems.length > 0 && jsxRuntime.jsx(Accordion, Object.assign({}, accordionProps, { items: filteredAccordionItems })), !isError && !isLoading && filteredAccordionItems.length === 0 && jsxRuntime.jsx(EmptyListMessage, { imageName: "search-not-found", text: emptyListText, className: "ui:mb-4 ui:border-b ui:border-t ui:border-slate-200 ui:py-4" })] });
|
|
1889
1913
|
};
|
|
1890
1914
|
AccordionList.Actions = AccordionListActions;
|
|
1891
1915
|
|
|
1892
1916
|
const TertiaryButton = React__namespace.default.forwardRef((props, innerRef) => {
|
|
1893
1917
|
return jsxRuntime.jsx(ButtonV2, Object.assign({ ref: innerRef }, props, { className: classNames__default.default([
|
|
1894
|
-
"ui
|
|
1895
|
-
"ui
|
|
1918
|
+
"ui:text-primary",
|
|
1919
|
+
"ui:border-transparent ui:bg-transparent ui:!shadow-none",
|
|
1896
1920
|
{
|
|
1897
|
-
"hover:
|
|
1921
|
+
"ui:hover:bg-primary-background ui:hover:text-primary-dark": !props.isDisabled
|
|
1898
1922
|
}
|
|
1899
1923
|
], props.className), textColor: "blue-800", textHoverColor: "blue-900" }));
|
|
1900
1924
|
});
|
|
1901
1925
|
|
|
1902
1926
|
const ModalHeader = (props) => {
|
|
1903
|
-
return jsxRuntime.jsxs("div", { className: classNames__default.default("ui
|
|
1927
|
+
return jsxRuntime.jsxs("div", { className: classNames__default.default("ui:flex ui:flex-row", "ui:space-x-2 ui:px-6 ui:py-4", "ui:items-center ui:justify-between", "ui:border-b ui:border-slate-100", "ui:rounded-t-lg"), children: [jsxRuntime.jsx(Title, { text: props.title, type: "sm" }), jsxRuntime.jsx(TertiaryButton, { icon: CrossIcon, onClick: props.onCloseClick })] });
|
|
1904
1928
|
};
|
|
1905
1929
|
|
|
1906
1930
|
const PrimaryButton = React__namespace.default.forwardRef((props, innerRef) => {
|
|
1907
1931
|
return jsxRuntime.jsx(ButtonV2, Object.assign({ ref: innerRef }, props, { className: classNames__default.default([
|
|
1908
|
-
"ui
|
|
1909
|
-
"ui
|
|
1910
|
-
"ui
|
|
1932
|
+
"ui:text-white",
|
|
1933
|
+
"ui:bg-linear-to-r",
|
|
1934
|
+
"ui:gradient-blue",
|
|
1911
1935
|
{
|
|
1912
|
-
"hover:
|
|
1936
|
+
"ui:hover:gradient-blue--hover": !props.isDisabled && !props.isPending
|
|
1913
1937
|
}
|
|
1914
1938
|
], props.className), textColor: "white" }));
|
|
1915
1939
|
});
|
|
1916
1940
|
|
|
1917
1941
|
const ModalFooter = (props) => {
|
|
1918
|
-
return jsxRuntime.jsxs("div", { className: classNames__default.default("ui
|
|
1919
|
-
"ui
|
|
1920
|
-
"ui
|
|
1921
|
-
}), children: [props.footerLeadingAccessory && (typeof props.footerLeadingAccessory === "string" ? jsxRuntime.jsx(Text, { variant: "base", color: "slate-500", children: props.footerLeadingAccessory }) : props.footerLeadingAccessory), props.footerLeadingComponent && (typeof props.footerLeadingComponent === "string" ? jsxRuntime.jsx(Text, { variant: "base", color: "slate-500", children: props.footerLeadingComponent }) : jsxRuntime.jsx(SecondaryButton, Object.assign({ "data-test-id": "modal-footer-leading-secondary-button" }, props.footerLeadingComponent))), jsxRuntime.jsxs("div", { className: "ui
|
|
1942
|
+
return jsxRuntime.jsxs("div", { className: classNames__default.default("ui:flex ui:flex-row", "ui:space-x-2 ui:px-6 ui:py-4", "ui:items-center", "ui:border-t ui:border-slate-100 ui:bg-slate-50", "ui:rounded-b-lg", {
|
|
1943
|
+
"ui:justify-between": props.footerLeadingComponent || props.footerLeadingAccessory,
|
|
1944
|
+
"ui:justify-end": !props.footerLeadingComponent && !props.footerLeadingAccessory
|
|
1945
|
+
}), children: [props.footerLeadingAccessory && (typeof props.footerLeadingAccessory === "string" ? jsxRuntime.jsx(Text, { variant: "base", color: "slate-500", children: props.footerLeadingAccessory }) : props.footerLeadingAccessory), props.footerLeadingComponent && (typeof props.footerLeadingComponent === "string" ? jsxRuntime.jsx(Text, { variant: "base", color: "slate-500", children: props.footerLeadingComponent }) : jsxRuntime.jsx(SecondaryButton, Object.assign({ "data-test-id": "modal-footer-leading-secondary-button" }, props.footerLeadingComponent))), jsxRuntime.jsxs("div", { className: "ui:flex ui:flex-row ui:space-x-2", children: [props.footerTrailingComponents.secondaryButton, props.footerTrailingComponents.secondaryButtonProps && jsxRuntime.jsx(SecondaryButton, Object.assign({ "data-test-id": "modal-footer-trailing-secondary-button" }, props.footerTrailingComponents.secondaryButtonProps)), props.footerTrailingComponents.primaryButton, props.footerTrailingComponents.primaryButtonProps && jsxRuntime.jsx(PrimaryButton, Object.assign({ "data-test-id": "modal-footer-trailing-primary-button" }, props.footerTrailingComponents.primaryButtonProps))] })] });
|
|
1922
1946
|
};
|
|
1923
1947
|
|
|
1924
1948
|
const ModalBase = (props) => {
|
|
1925
1949
|
var _a;
|
|
1926
1950
|
const { size = "medium", withContentPaddingY = true, isOpen = false } = props;
|
|
1927
|
-
return jsxRuntime.jsxs(ReactModal__default.default, { isOpen, data: { "test-id": (_a = props.dataTestId) !== null && _a !== void 0 ? _a : "react-modal" }, contentLabel: props.title, overlayClassName: classNames__default.default("ui
|
|
1928
|
-
"ui
|
|
1929
|
-
"ui
|
|
1930
|
-
"md:
|
|
1931
|
-
"md:
|
|
1932
|
-
"md:
|
|
1933
|
-
"md:
|
|
1951
|
+
return jsxRuntime.jsxs(ReactModal__default.default, { isOpen, data: { "test-id": (_a = props.dataTestId) !== null && _a !== void 0 ? _a : "react-modal" }, contentLabel: props.title, overlayClassName: classNames__default.default("ui:px-2 ui:py-15", "ui:z-20", "ui:fixed ui:top-0 ui:bottom-0 ui:left-0 ui:right-0", "ui:overflow-x-hidden ui:overflow-y-auto", "ui:bg-overlay"), onRequestClose: props.onCloseClick, shouldFocusAfterRender: false, shouldCloseOnOverlayClick: false, className: classNames__default.default("ui:mx-auto ui:my-0", "ui:relative", "ui:rounded-lg ui:bg-white ui:shadow-lg ui:outline-none", {
|
|
1952
|
+
"ui:overflow-y-hidden": props.scrollableContent,
|
|
1953
|
+
"ui:mt-17": props.withExtraMarginTop,
|
|
1954
|
+
"ui:md:w-120": size === "dialog-medium",
|
|
1955
|
+
"ui:md:w-80": size === "small" || size === "dialog-small",
|
|
1956
|
+
"ui:md:w-132": size === "medium",
|
|
1957
|
+
"ui:md:w-216": size === "wide"
|
|
1934
1958
|
}), children: [props.title && jsxRuntime.jsx(ModalHeader, { title: props.title, onCloseClick: props.onCloseClick }), jsxRuntime.jsx("div", { className: classNames__default.default({
|
|
1935
|
-
"ui
|
|
1936
|
-
"ui
|
|
1937
|
-
}), children: jsxRuntime.jsx("div", { className: classNames__default.default("ui
|
|
1938
|
-
"ui
|
|
1959
|
+
"ui:rounded-t-lg": !props.title,
|
|
1960
|
+
"ui:max-h-135 ui:overflow-y-auto": props.scrollableContent
|
|
1961
|
+
}), children: jsxRuntime.jsx("div", { className: classNames__default.default("ui:px-6", {
|
|
1962
|
+
"ui:py-6": withContentPaddingY
|
|
1939
1963
|
}), children: props.children }) }), jsxRuntime.jsx(ModalFooter, { footerLeadingAccessory: props.footerLeadingAccessory, footerLeadingComponent: props.footerLeadingComponent, footerTrailingComponents: props.footerTrailingComponents })] });
|
|
1940
1964
|
};
|
|
1941
1965
|
|
|
@@ -1947,26 +1971,26 @@ Modal.setAppElement = ReactModal__default.default.setAppElement;
|
|
|
1947
1971
|
const Tag = (_a) => {
|
|
1948
1972
|
var { text, colorTheme = "gray", className, size = "base", variant = "flat", showIcon, truncate, children } = _a, rest = __rest(_a, ["text", "colorTheme", "className", "size", "variant", "showIcon", "truncate", "children"]);
|
|
1949
1973
|
const isBordered = variant === "bordered" || "";
|
|
1950
|
-
return jsxRuntime.jsxs(Stack, Object.assign({ axis: "x", gap: "xxxxs", className: classNames__default.default("ui
|
|
1974
|
+
return jsxRuntime.jsxs(Stack, Object.assign({ axis: "x", gap: "xxxxs", className: classNames__default.default("ui:inline-flex ui:items-center ui:rounded-lg ui:px-2 ui:py-1", { "overflow-hidden": truncate }, className, {
|
|
1951
1975
|
[[
|
|
1952
|
-
"ui
|
|
1953
|
-
isBordered && "ui
|
|
1976
|
+
"ui:bg-negative-background ui:text-on-negative",
|
|
1977
|
+
isBordered && "ui:border-negative-border"
|
|
1954
1978
|
].join(" ")]: colorTheme === "red",
|
|
1955
1979
|
[[
|
|
1956
|
-
"ui
|
|
1957
|
-
isBordered && "ui
|
|
1980
|
+
"ui:bg-warning-background ui:text-on-warning",
|
|
1981
|
+
isBordered && "ui:border-warning-border"
|
|
1958
1982
|
].join(" ")]: colorTheme === "amber",
|
|
1959
1983
|
[[
|
|
1960
|
-
"ui
|
|
1961
|
-
isBordered && "ui
|
|
1984
|
+
"ui:bg-positive-background ui:text-on-positive",
|
|
1985
|
+
isBordered && "ui:border-positive-border"
|
|
1962
1986
|
].join(" ")]: colorTheme === "green",
|
|
1963
1987
|
[[
|
|
1964
|
-
"ui
|
|
1965
|
-
isBordered && "ui
|
|
1988
|
+
"ui:bg-neutral-background ui:text-on-surface",
|
|
1989
|
+
isBordered && "ui:border-neutral-border-high-contrast"
|
|
1966
1990
|
].join(" ")]: colorTheme === "gray",
|
|
1967
1991
|
[[
|
|
1968
|
-
"ui
|
|
1969
|
-
isBordered && "ui
|
|
1992
|
+
"ui:bg-primary-background ui:text-primary",
|
|
1993
|
+
isBordered && "ui:border-primary-border"
|
|
1970
1994
|
].join(" ")]: colorTheme === "blue"
|
|
1971
1995
|
}, {
|
|
1972
1996
|
/**
|
|
@@ -1975,14 +1999,14 @@ const Tag = (_a) => {
|
|
|
1975
1999
|
* variants have the same dimensions, we need to adjust the padding to account for
|
|
1976
2000
|
* the border width.
|
|
1977
2001
|
*/
|
|
1978
|
-
"ui
|
|
2002
|
+
"ui:border ui:px-[calc(--spacing(2)-1px)] ui:py-[calc(--spacing(1)-1px)]": variant === "bordered"
|
|
1979
2003
|
}) }, rest, { children: [showIcon && jsxRuntime.jsx(TagIcon, { colorTheme, size }), jsxRuntime.jsx(
|
|
1980
2004
|
Text,
|
|
1981
2005
|
{
|
|
1982
2006
|
/**
|
|
1983
2007
|
* Ensures the `small` size, with smaller text, is the same height as the `base` size.
|
|
1984
2008
|
*/
|
|
1985
|
-
className: "ui
|
|
2009
|
+
className: "ui:leading-5",
|
|
1986
2010
|
color: "current",
|
|
1987
2011
|
variant: size === "small" ? "sm-strong" : "base",
|
|
1988
2012
|
truncate,
|
|
@@ -1991,7 +2015,7 @@ const Tag = (_a) => {
|
|
|
1991
2015
|
)] }));
|
|
1992
2016
|
};
|
|
1993
2017
|
function TagIcon({ colorTheme, size }) {
|
|
1994
|
-
const sizeClass = classNames__default.default({ "ui
|
|
2018
|
+
const sizeClass = classNames__default.default({ "ui:h-[16px] ui:w-[16px]": size === "small" });
|
|
1995
2019
|
const props = { size: "s" };
|
|
1996
2020
|
switch (colorTheme) {
|
|
1997
2021
|
case "red":
|
|
@@ -1999,11 +2023,11 @@ function TagIcon({ colorTheme, size }) {
|
|
|
1999
2023
|
case "amber":
|
|
2000
2024
|
return jsxRuntime.jsx(SmallSquareIcon, Object.assign({}, props, { className: sizeClass }));
|
|
2001
2025
|
case "green":
|
|
2002
|
-
return jsxRuntime.jsx(SmallArrowUpIcon, Object.assign({}, props, { className: classNames__default.default(sizeClass, "ui
|
|
2026
|
+
return jsxRuntime.jsx(SmallArrowUpIcon, Object.assign({}, props, { className: classNames__default.default(sizeClass, "ui:rotate-90") }));
|
|
2003
2027
|
case "gray":
|
|
2004
|
-
return jsxRuntime.jsx(SmallDiamondIcon, Object.assign({}, props, { className: classNames__default.default(sizeClass, "ui
|
|
2028
|
+
return jsxRuntime.jsx(SmallDiamondIcon, Object.assign({}, props, { className: classNames__default.default(sizeClass, "ui:text-on-surface-variant") }));
|
|
2005
2029
|
case "blue":
|
|
2006
|
-
return jsxRuntime.jsx(SmallArrowUpIcon, Object.assign({}, props, { className: classNames__default.default(sizeClass, "ui
|
|
2030
|
+
return jsxRuntime.jsx(SmallArrowUpIcon, Object.assign({}, props, { className: classNames__default.default(sizeClass, "ui:rotate-90") }));
|
|
2007
2031
|
}
|
|
2008
2032
|
}
|
|
2009
2033
|
|
|
@@ -2011,42 +2035,42 @@ function ChatBubble(props) {
|
|
|
2011
2035
|
const { as: Component = "div", children, className, sender: _, timestamp: __, readReceipt, color = "blue", tipPosition } = props, rest = __rest(props, ["as", "children", "className", "sender", "timestamp", "readReceipt", "color", "tipPosition"]);
|
|
2012
2036
|
const isInteractive = (Component === "button" || Component === "a") && !rest.disabled;
|
|
2013
2037
|
const tipPositionClasses = classNames__default.default({
|
|
2014
|
-
"ui
|
|
2015
|
-
"
|
|
2016
|
-
"
|
|
2017
|
-
"
|
|
2018
|
-
"
|
|
2038
|
+
"ui:hidden": !tipPosition,
|
|
2039
|
+
"ui:-left-[11px] ui:-top-[11px] ui:rotate-45": tipPosition === "top-left",
|
|
2040
|
+
"ui:-right-[11px] ui:-top-[11px] ui:rotate-45": tipPosition === "top-right",
|
|
2041
|
+
"ui:-left-[11px] ui:-bottom-[11px] ui:rotate-225": tipPosition === "bottom-left",
|
|
2042
|
+
"ui:-right-[11px] ui:-bottom-[11px] ui:rotate-225": tipPosition === "bottom-right"
|
|
2019
2043
|
});
|
|
2020
2044
|
const backgroundColorClasses = classNames__default.default({
|
|
2021
|
-
"ui
|
|
2022
|
-
"ui
|
|
2045
|
+
"ui:bg-blue-100": color === "blue",
|
|
2046
|
+
"ui:bg-slate-100": color === "grey"
|
|
2023
2047
|
});
|
|
2024
|
-
const tipColorClasses = classNames__default.default("ui
|
|
2025
|
-
"ui
|
|
2026
|
-
"ui
|
|
2027
|
-
"group-hover/chat-bubble:
|
|
2028
|
-
"group-hover/chat-bubble:
|
|
2048
|
+
const tipColorClasses = classNames__default.default("ui:border-transparent", {
|
|
2049
|
+
"ui:border-b-blue-100 ui:border-r-blue-100": color === "blue",
|
|
2050
|
+
"ui:border-b-slate-100 ui:border-r-slate-100": color === "grey",
|
|
2051
|
+
"ui:group-hover/chat-bubble:border-b-blue-50 ui:group-hover/chat-bubble:border-r-blue-50": isInteractive && color === "blue",
|
|
2052
|
+
"ui:group-hover/chat-bubble:border-b-slate-50 ui:group-hover/chat-bubble:border-r-slate-50": isInteractive && color === "grey"
|
|
2029
2053
|
});
|
|
2030
|
-
const transitionClasses = "ui
|
|
2031
|
-
return jsxRuntime.jsx(Component, Object.assign({}, rest, { className: classNames__default.default("ui
|
|
2032
|
-
"ui
|
|
2033
|
-
"ui
|
|
2034
|
-
}, transitionClasses, className), children: jsxRuntime.jsxs("div", { className: classNames__default.default("ui
|
|
2035
|
-
"group-hover/chat-bubble:
|
|
2036
|
-
"group-hover/chat-bubble:
|
|
2037
|
-
}), children: [jsxRuntime.jsx("div", { className: classNames__default.default(tipColorClasses, tipPositionClasses, transitionClasses, "ui
|
|
2054
|
+
const transitionClasses = "ui:transition-colors ui:duration-150 ui:ease-out";
|
|
2055
|
+
return jsxRuntime.jsx(Component, Object.assign({}, rest, { className: classNames__default.default("ui:group/chat-bubble ui:text-left", {
|
|
2056
|
+
"ui:pl-[16px]": tipPosition === "top-left" || tipPosition === "bottom-left",
|
|
2057
|
+
"ui:pr-[16px]": tipPosition === "top-right" || tipPosition === "bottom-right"
|
|
2058
|
+
}, transitionClasses, className), children: jsxRuntime.jsxs("div", { className: classNames__default.default("ui:transition-colors ui:duration-150 ui:ease-out", backgroundColorClasses, "ui:relative ui:grid ui:gap-xxs ui:p-m ui:radius-m", {
|
|
2059
|
+
"ui:group-hover/chat-bubble:bg-blue-50": isInteractive && color === "blue",
|
|
2060
|
+
"ui:group-hover/chat-bubble:bg-slate-50": isInteractive && color === "grey"
|
|
2061
|
+
}), children: [jsxRuntime.jsx("div", { className: classNames__default.default(tipColorClasses, tipPositionClasses, transitionClasses, "ui:absolute ui:h-[11px] ui:w-[11px] ui:transform ui:border-11") }), jsxRuntime.jsx(Meta, Object.assign({}, props)), jsxRuntime.jsx(Content$1, { children }), jsxRuntime.jsx("div", { className: "ui:absolute ui:radius-m" }), readReceipt && jsxRuntime.jsx(Text, { variant: "sm", children: readReceipt })] }) }));
|
|
2038
2062
|
}
|
|
2039
2063
|
function Meta(props) {
|
|
2040
2064
|
const { sender, timestamp } = props;
|
|
2041
2065
|
if (!sender && !timestamp) {
|
|
2042
2066
|
return null;
|
|
2043
2067
|
}
|
|
2044
|
-
return jsxRuntime.jsxs("div", { className: "ui
|
|
2068
|
+
return jsxRuntime.jsxs("div", { className: "ui:flex ui:flex-wrap ui:items-center ui:gap-x-xs", children: [sender && jsxRuntime.jsx(Text, { variant: "strong", children: sender }), timestamp && jsxRuntime.jsx(Text, { variant: "sm", children: timestamp })] });
|
|
2045
2069
|
}
|
|
2046
2070
|
function Content$1(props) {
|
|
2047
2071
|
const { children } = props;
|
|
2048
2072
|
if (typeof children === "string") {
|
|
2049
|
-
return jsxRuntime.jsx(Text, { className: "ui
|
|
2073
|
+
return jsxRuntime.jsx(Text, { className: "ui:whitespace-break-spaces", children });
|
|
2050
2074
|
}
|
|
2051
2075
|
return jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
2052
2076
|
}
|
|
@@ -2055,7 +2079,7 @@ function ChatBubbleText(props) {
|
|
|
2055
2079
|
}
|
|
2056
2080
|
ChatBubble.Text = ChatBubbleText;
|
|
2057
2081
|
function ChatBubbleDateIndicator(props) {
|
|
2058
|
-
return jsxRuntime.jsx("div", { className: "ui
|
|
2082
|
+
return jsxRuntime.jsx("div", { className: "ui:flex ui:justify-center", children: jsxRuntime.jsx(Tag, { colorTheme: "gray", size: "small", children: props.children }) });
|
|
2059
2083
|
}
|
|
2060
2084
|
ChatBubble.DateIndicator = ChatBubbleDateIndicator;
|
|
2061
2085
|
|
|
@@ -2086,27 +2110,27 @@ const Avatar = ({ color = "slate", size = "medium", applyGroupOffset, src, alt,
|
|
|
2086
2110
|
mounted = false;
|
|
2087
2111
|
};
|
|
2088
2112
|
}, [defaultImage, src]);
|
|
2089
|
-
const sizeClassName = classNames__default.default("ui
|
|
2090
|
-
"ui
|
|
2091
|
-
"ui
|
|
2092
|
-
"ui
|
|
2093
|
-
"ui
|
|
2113
|
+
const sizeClassName = classNames__default.default("ui:rounded-full", {
|
|
2114
|
+
"ui:h-32 ui:w-32": size === "large",
|
|
2115
|
+
"ui:h-16 ui:w-16": size === "medium",
|
|
2116
|
+
"ui:h-9 ui:w-9": size === "small",
|
|
2117
|
+
"ui:h-6 ui:w-6": size === "xsmall"
|
|
2094
2118
|
});
|
|
2095
2119
|
const groupOffsetClassNames = classNames__default.default({
|
|
2096
|
-
"
|
|
2097
|
-
"
|
|
2098
|
-
"
|
|
2099
|
-
"
|
|
2120
|
+
"ui:-ml-[calc(theme('spacing.32')/4)]": size === "large" && applyGroupOffset,
|
|
2121
|
+
"ui:-ml-[calc(theme('spacing.16')/4)]": size === "medium" && applyGroupOffset,
|
|
2122
|
+
"ui:-ml-[calc(theme('spacing.9')/4)]": size === "small" && applyGroupOffset,
|
|
2123
|
+
"ui:-ml-[calc(theme('spacing.6')/4)]": size === "xsmall" && applyGroupOffset
|
|
2100
2124
|
});
|
|
2101
2125
|
const colorClassName = classNames__default.default({
|
|
2102
|
-
"ui
|
|
2103
|
-
"ui
|
|
2126
|
+
"ui:bg-neutral-200 ui:text-on-surface": color === "slate",
|
|
2127
|
+
"ui:bg-primary ui:text-white": color === "primary"
|
|
2104
2128
|
});
|
|
2105
|
-
const containerClassName = classNames__default.default(className, sizeClassName, groupOffsetClassNames, colorClassName, "ui
|
|
2129
|
+
const containerClassName = classNames__default.default(className, sizeClassName, groupOffsetClassNames, colorClassName, "ui:flex ui:items-center ui:justify-center");
|
|
2106
2130
|
const textClassName = classNames__default.default({
|
|
2107
|
-
"ui
|
|
2108
|
-
"ui
|
|
2109
|
-
"ui
|
|
2131
|
+
"ui:text-5xl": size === "large",
|
|
2132
|
+
"ui:text-2xl": size === "medium",
|
|
2133
|
+
"ui:text-sm": size === "small" || size === "xsmall"
|
|
2110
2134
|
});
|
|
2111
2135
|
const imageClassName = classNames__default.default(sizeClassName);
|
|
2112
2136
|
const renderAvatar = () => {
|
|
@@ -2125,7 +2149,7 @@ const Avatar = ({ color = "slate", size = "medium", applyGroupOffset, src, alt,
|
|
|
2125
2149
|
return jsxRuntime.jsx("div", { className: containerClassName, children: jsxRuntime.jsx("div", { children: renderAvatar() }) });
|
|
2126
2150
|
};
|
|
2127
2151
|
function ScreenReaderText({ children }) {
|
|
2128
|
-
return jsxRuntime.jsx("span", { className: "ui
|
|
2152
|
+
return jsxRuntime.jsx("span", { className: "ui:sr-only", children });
|
|
2129
2153
|
}
|
|
2130
2154
|
|
|
2131
2155
|
const AvatarGroup = (props) => {
|
|
@@ -2142,15 +2166,15 @@ const AvatarGroup = (props) => {
|
|
|
2142
2166
|
if (index + 1 > maxAvatars) {
|
|
2143
2167
|
return null;
|
|
2144
2168
|
}
|
|
2145
|
-
return jsxRuntime.jsx(Avatar, Object.assign({}, child.props, { applyGroupOffset: index > 0, className: classNames__default.default(child.props.className, `ui
|
|
2146
|
-
"ui
|
|
2147
|
-
"ui
|
|
2148
|
-
"ui
|
|
2149
|
-
"ui
|
|
2169
|
+
return jsxRuntime.jsx(Avatar, Object.assign({}, child.props, { applyGroupOffset: index > 0, className: classNames__default.default(child.props.className, `ui:outline`, {
|
|
2170
|
+
"ui:outline-surface": !props.outlineColor || props.outlineColor === "surface",
|
|
2171
|
+
"ui:outline-slate-50": props.outlineColor === "slate-50",
|
|
2172
|
+
"ui:outline-slate-100": props.outlineColor === "slate-100",
|
|
2173
|
+
"ui:outline-white": props.outlineColor === "white"
|
|
2150
2174
|
}, {
|
|
2151
|
-
"ui
|
|
2152
|
-
"ui
|
|
2153
|
-
"ui
|
|
2175
|
+
"ui:outline-2": child.props.size === "xsmall" || child.props.size === "small",
|
|
2176
|
+
"ui:outline-4": child.props.size === "medium",
|
|
2177
|
+
"ui:outline-8": child.props.size === "large"
|
|
2154
2178
|
}) }));
|
|
2155
2179
|
}), jsxRuntime.jsx(MoreAvatarsLabel, Object.assign({}, props, { maxAvatars }))] }));
|
|
2156
2180
|
};
|
|
@@ -2169,19 +2193,19 @@ function MoreAvatarsLabel(props) {
|
|
|
2169
2193
|
const Badge = (props) => {
|
|
2170
2194
|
var _a;
|
|
2171
2195
|
const containerClasses = classNames__default.default([
|
|
2172
|
-
"ui
|
|
2173
|
-
"ui
|
|
2174
|
-
"ui
|
|
2175
|
-
"ui
|
|
2176
|
-
"ui
|
|
2177
|
-
"ui
|
|
2178
|
-
"ui
|
|
2179
|
-
"ui
|
|
2196
|
+
"ui:inline-flex",
|
|
2197
|
+
"ui:items-center",
|
|
2198
|
+
"ui:justify-center",
|
|
2199
|
+
"ui:rounded-full",
|
|
2200
|
+
"ui:h-6",
|
|
2201
|
+
"ui:min-w-24",
|
|
2202
|
+
"ui:px-2",
|
|
2203
|
+
"ui:bg-primary-background"
|
|
2180
2204
|
], props.className);
|
|
2181
2205
|
const textClasses = classNames__default.default([
|
|
2182
|
-
"ui
|
|
2183
|
-
"ui
|
|
2184
|
-
"ui
|
|
2206
|
+
"ui:text-xs",
|
|
2207
|
+
"ui:text-primary",
|
|
2208
|
+
"ui:leading-none"
|
|
2185
2209
|
]);
|
|
2186
2210
|
const badgeContent = (_a = props.children) !== null && _a !== void 0 ? _a : props.badgeCount;
|
|
2187
2211
|
return jsxRuntime.jsx("div", { className: containerClasses, children: jsxRuntime.jsx("span", { className: textClasses, children: badgeContent }) });
|
|
@@ -2190,16 +2214,16 @@ const Badge = (props) => {
|
|
|
2190
2214
|
const PrimaryIconButton = React__namespace.default.forwardRef((props, innerRef) => {
|
|
2191
2215
|
const { children: icon, size = "medium", label } = props, rest = __rest(props, ["children", "size", "label"]);
|
|
2192
2216
|
return jsxRuntime.jsx(PrimaryButton, Object.assign({ ref: innerRef }, rest, { "aria-label": label, size, leadingIcon: icon, className: classNames__default.default({
|
|
2193
|
-
"ui
|
|
2194
|
-
"ui
|
|
2217
|
+
"ui:px-[calc(var(--ui-spacing-xxs)-1px)]": size === "medium",
|
|
2218
|
+
"ui:px-[calc(var(--ui-spacing-s)-1px)]": size === "large"
|
|
2195
2219
|
}, props.className) }));
|
|
2196
2220
|
});
|
|
2197
2221
|
|
|
2198
2222
|
const SecondaryIconButton = React__namespace.default.forwardRef((props, innerRef) => {
|
|
2199
2223
|
const { children: icon, size = "medium", label } = props, rest = __rest(props, ["children", "size", "label"]);
|
|
2200
2224
|
return jsxRuntime.jsx(SecondaryButton, Object.assign({ ref: innerRef }, rest, { "aria-label": label, size, leadingIcon: icon, className: classNames__default.default({
|
|
2201
|
-
"ui
|
|
2202
|
-
"ui
|
|
2225
|
+
"ui:px-[calc(var(--ui-spacing-xxs)-1px)]": size === "medium",
|
|
2226
|
+
"ui:px-[calc(var(--ui-spacing-s)-1px)]": size === "large"
|
|
2203
2227
|
}, props.className) }));
|
|
2204
2228
|
});
|
|
2205
2229
|
|
|
@@ -2209,20 +2233,20 @@ const TertiaryIconButton = React__namespace.default.forwardRef((props, innerRef)
|
|
|
2209
2233
|
/**
|
|
2210
2234
|
* Add horizontal padding and possibly undo it with negative margin.
|
|
2211
2235
|
*/
|
|
2212
|
-
"ui
|
|
2213
|
-
"
|
|
2214
|
-
"ui
|
|
2215
|
-
"
|
|
2216
|
-
"
|
|
2217
|
-
"
|
|
2236
|
+
"ui:px-[calc(var(--ui-spacing-xxs)-1px)]": size === "medium",
|
|
2237
|
+
"ui:-mx-[calc(theme('spacing.xxs')-1px)]": expand && size === "medium",
|
|
2238
|
+
"ui:px-[calc(var(--ui-spacing-s)-1px)]": size === "large",
|
|
2239
|
+
"ui:-mx-[calc(theme('spacing.s')-1px)]": expand && size === "large",
|
|
2240
|
+
"ui:-my-[calc(theme('spacing.xxs')-1px)]": expand && size === "medium",
|
|
2241
|
+
"ui:-my-[calc(theme('spacing.s')-1px)]": expand && size === "large"
|
|
2218
2242
|
}, props.className) }));
|
|
2219
2243
|
});
|
|
2220
2244
|
|
|
2221
2245
|
const DotButton = (_a) => {
|
|
2222
2246
|
var { onClick, isActive, className } = _a, rest = __rest(_a, ["onClick", "isActive", "className"]);
|
|
2223
|
-
const classes = classNames__default.default(className, "ui
|
|
2224
|
-
"ui
|
|
2225
|
-
"ui
|
|
2247
|
+
const classes = classNames__default.default(className, "ui:rounded-full", "ui:hover:bg-primary", "ui:size-2", {
|
|
2248
|
+
"ui:bg-primary": isActive,
|
|
2249
|
+
"ui:bg-slate-300": !isActive
|
|
2226
2250
|
});
|
|
2227
2251
|
return jsxRuntime.jsx(Box, Object.assign({ as: "button", onClick, className: classes }, rest));
|
|
2228
2252
|
};
|
|
@@ -2264,10 +2288,10 @@ const Carousel = ({ id, className, slides = [], labels }) => {
|
|
|
2264
2288
|
const index = Math.round(scrollLeft / scrollWidth);
|
|
2265
2289
|
setCurrentIndexDebounced(index);
|
|
2266
2290
|
}, [setCurrentIndexDebounced]);
|
|
2267
|
-
return jsxRuntime.jsx("div", { ref: slidesContainer, id, className, children: jsxRuntime.jsxs(Stack, { width: "full", align: "stretch", gap: "m", children: [jsxRuntime.jsxs(Stack, { axis: "x", align: "stretch", width: "full", gap: "m", children: [jsxRuntime.jsx(Stack, { justify: "center", children: jsxRuntime.jsx(SecondaryButton, { onClick: onClickPrevious, leadingIcon: jsxRuntime.jsx(LeftArrowIcon, {}), "aria-label": labels === null || labels === void 0 ? void 0 : labels.previousButton, disabled: slides.length === 0 }) }), jsxRuntime.jsx(Stack, { as: "ol", axis: "x", width: "full", align: "stretch", className: "ui
|
|
2291
|
+
return jsxRuntime.jsx("div", { ref: slidesContainer, id, className, children: jsxRuntime.jsxs(Stack, { width: "full", align: "stretch", gap: "m", children: [jsxRuntime.jsxs(Stack, { axis: "x", align: "stretch", width: "full", gap: "m", children: [jsxRuntime.jsx(Stack, { justify: "center", children: jsxRuntime.jsx(SecondaryButton, { onClick: onClickPrevious, leadingIcon: jsxRuntime.jsx(LeftArrowIcon, {}), "aria-label": labels === null || labels === void 0 ? void 0 : labels.previousButton, disabled: slides.length === 0 }) }), jsxRuntime.jsx(Stack, { as: "ol", axis: "x", width: "full", align: "stretch", className: "ui:w-full ui:snap-x ui:snap-mandatory ui:overflow-x-auto", style: { scrollbarWidth: "none" }, onScroll, children: slides.map((slide, i) => jsxRuntime.jsx(Box, { width: "full", as: "li", className: "ui:shrink-0 ui:snap-start", children: slide }, i)) }), jsxRuntime.jsx(Stack, { justify: "center", children: jsxRuntime.jsx(SecondaryButton, { onClick: onClickNext, leadingIcon: jsxRuntime.jsx(ChevronRightIcon, {}), "aria-label": labels === null || labels === void 0 ? void 0 : labels.nextButton, disabled: slides.length === 0 }) })] }), jsxRuntime.jsx(Stack, { align: "center", children: jsxRuntime.jsx(DotList, { activeIndex: currentIndex, amount: slides.length, onClickIndex: scrollToIndex }) })] }) });
|
|
2268
2292
|
};
|
|
2269
2293
|
|
|
2270
|
-
var css_248z$c = "
|
|
2294
|
+
var css_248z$c = "/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */\n.cweb-checkbox {\n outline: none;\n}\n.cweb-checkbox .cweb-checkbox-input {\n position: absolute;\n -webkit-appearance: none;\n height: 1px;\n opacity: 0;\n width: 1px;\n}\n.cweb-checkbox.type-regular .cweb-checkbox-icon-container {\n border-color: #cccccc;\n}\n.cweb-checkbox.type-regular .cweb-checkbox-icon-container {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 0 0 auto;\n border-width: 1px;\n border-style: solid;\n border-radius: 4px;\n}\n.cweb-checkbox.type-regular.hasError .cweb-checkbox-icon-container {\n border-color: var(--ui-color-red-800, #991b1b);\n}\n.cweb-checkbox.type-regular.is-focused .cweb-checkbox-icon-container {\n border-color: #1e40af;\n}\n.cweb-checkbox.type-regular.is-checked .cweb-checkbox-icon {\n padding: 4px;\n background: url(\"data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2210%22 height%3D%228%22 viewBox%3D%220 0 10 8%22 fill%3D%22none%22%3E %3Cpath d%3D%22M9.207 0.792787C9.39447 0.980314 9.49979 1.23462 9.49979 1.49979C9.49979 1.76495 9.39447 2.01926 9.207 2.20679L4.207 7.20679C4.01947 7.39426 3.76516 7.49957 3.5 7.49957C3.23484 7.49957 2.98053 7.39426 2.793 7.20679L0.793 5.20679C0.610842 5.01818 0.510047 4.76558 0.512326 4.50339C0.514604 4.24119 0.619773 3.99038 0.805181 3.80497C0.990589 3.61956 1.2414 3.51439 1.5036 3.51211C1.7658 3.50983 2.0184 3.61063 2.207 3.79279L3.5 5.08579L7.793 0.792787C7.98053 0.605316 8.23484 0.5 8.5 0.5C8.76516 0.5 9.01947 0.605316 9.207 0.792787Z%22 fill%3D%22white%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-checkbox.type-regular.is-checked .cweb-checkbox-icon-container {\n border-color: #1e40af;\n}\n.cweb-checkbox.type-regular.is-checked.is-focused .cweb-checkbox-icon-container {\n border-color: #1d4ed8;\n}\n.cweb-checkbox.type-regular.is-indeterminate .cweb-checkbox-icon {\n width: 0.5rem;\n height: 0.5rem;\n padding: 4px;\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2210%22 height%3D%222%22 viewBox%3D%220 0 10 2%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M9 -4.37114e-08C9.55228 -1.95703e-08 10 0.447715 10 1C10 1.55228 9.55228 2 9 2L1 2C0.447716 2 -6.78525e-08 1.55228 -4.37114e-08 1C-1.95703e-08 0.447715 0.447715 -4.17544e-07 1 -3.93402e-07L9 -4.37114e-08Z%22 fill%3D%22white%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-checkbox.type-regular.is-indeterminate .cweb-checkbox-icon-container {\n border-color: #1e40af;\n}\n.cweb-checkbox.type-regular.is-indeterminate.is-focused .cweb-checkbox-icon-container {\n border-color: #1d4ed8;\n}\n.cweb-checkbox.type-regular.is-disabled.show-cross-when-disabled .cweb-checkbox-icon {\n width: 10px;\n height: 10px;\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2211px%22 height%3D%2211px%22 viewBox%3D%220 0 11 11%22 version%3D%221.1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E %3Cg stroke%3D%22none%22 stroke-width%3D%221%22 fill%3D%22none%22 fill-rule%3D%22evenodd%22 stroke-linecap%3D%22round%22%3E %3Cg transform%3D%22translate(-6.000000%2C -7.000000)%22 stroke%3D%22%232D2D2D%22 stroke-width%3D%222%22%3E %3Cpath d%3D%22M7%2C17 L16%2C8 M16%2C17 L7%2C8%22 %2F%3E %3C%2Fg%3E %3C%2Fg%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n opacity: 0.6;\n}";
|
|
2271
2295
|
styleInject(css_248z$c);
|
|
2272
2296
|
|
|
2273
2297
|
const CheckboxInner = (props) => {
|
|
@@ -2279,7 +2303,7 @@ const CheckboxInner = (props) => {
|
|
|
2279
2303
|
"is-focused": isFocused,
|
|
2280
2304
|
"is-checked": checked && !indeterminate,
|
|
2281
2305
|
"is-indeterminate": indeterminate,
|
|
2282
|
-
"ui
|
|
2306
|
+
"ui:opacity-50 ui:cursor-not-allowed is-disabled": isDisabled,
|
|
2283
2307
|
hasError: error
|
|
2284
2308
|
});
|
|
2285
2309
|
React.useEffect(() => {
|
|
@@ -2318,22 +2342,22 @@ const CheckboxInner = (props) => {
|
|
|
2318
2342
|
* upon marking the checkbox as checked/unchecked.
|
|
2319
2343
|
*/
|
|
2320
2344
|
onClick,
|
|
2321
|
-
children: jsxRuntime.jsx("label", { className: classNames__default.default(classNameCheckboxLabel, "cweb-checkbox-label ui
|
|
2322
|
-
"ui
|
|
2323
|
-
"ui
|
|
2324
|
-
}), "data-test-id": "checkbox-label", children: jsxRuntime.jsxs("div", { className: "ui
|
|
2325
|
-
"ui
|
|
2326
|
-
"ui
|
|
2327
|
-
"group-hover:
|
|
2328
|
-
"group-hover:
|
|
2329
|
-
"ui
|
|
2330
|
-
}), "data-test-id": "checkbox-span", children: jsxRuntime.jsx("div", { className: "cweb-checkbox-icon ui
|
|
2345
|
+
children: jsxRuntime.jsx("label", { className: classNames__default.default(classNameCheckboxLabel, "cweb-checkbox-label ui:group ui:relative ui:overflow-hidden", "ui:flex ui:w-full ui:cursor-pointer", {
|
|
2346
|
+
"ui:cursor-not-allowed": isDisabled,
|
|
2347
|
+
"ui:cursor-pointer": !isDisabled
|
|
2348
|
+
}), "data-test-id": "checkbox-label", children: jsxRuntime.jsxs("div", { className: "ui:flex", children: [jsxRuntime.jsxs("div", { className: "ui:flex ui:h-[24px] ui:flex-col ui:justify-center ui:sm:h-[20px]", children: [jsxRuntime.jsx("input", { id, ref: innerRef, "data-test-id": `checkbox-${name}`, className: "cweb-checkbox-input", name, type: "checkbox", checked, disabled: isDisabled, value, onBlur: handleBlur, onFocus: handleFocus, onChange: handleChange }), jsxRuntime.jsx("span", { className: classNames__default.default("cweb-checkbox-icon-container ui:transition-colors", "ui:h-6 ui:w-6", "ui:sm:h-4 ui:sm:w-4", {
|
|
2349
|
+
"ui:bg-primary": checked || indeterminate,
|
|
2350
|
+
"ui:bg-white": !checked && !indeterminate,
|
|
2351
|
+
"ui:group-hover:bg-blue-50": type === "regular" && !(checked || indeterminate),
|
|
2352
|
+
"ui:group-hover:bg-primary-dark": checked || indeterminate,
|
|
2353
|
+
"ui:outline-primary": isFocused
|
|
2354
|
+
}), "data-test-id": "checkbox-span", children: jsxRuntime.jsx("div", { className: "cweb-checkbox-icon ui:h-3 ui:w-3 ui:sm:h-2 ui:sm:w-2" }) })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(Label, Object.assign({}, props)), explanation && jsxRuntime.jsx(Text, { className: "ui:ml-2 ui:select-none", color: "slate-500", "data-test-id": "checkbox-explanation", children: explanation })] })] }) })
|
|
2331
2355
|
});
|
|
2332
2356
|
};
|
|
2333
2357
|
function Label(props) {
|
|
2334
2358
|
const { text, renderLabel } = props;
|
|
2335
2359
|
const divAttributes = {
|
|
2336
|
-
className: "ui
|
|
2360
|
+
className: "ui:ml-2 ui:select-none",
|
|
2337
2361
|
"data-test-id": "checkbox-text"
|
|
2338
2362
|
};
|
|
2339
2363
|
if (renderLabel) {
|
|
@@ -2347,21 +2371,21 @@ function Label(props) {
|
|
|
2347
2371
|
const Checkbox = React__namespace.default.forwardRef((props, ref) => jsxRuntime.jsx(CheckboxInner, Object.assign({}, props, { innerRef: ref })));
|
|
2348
2372
|
|
|
2349
2373
|
const Chip = ({ accessory, leadingIcon, onClick, text }) => {
|
|
2350
|
-
return jsxRuntime.jsx(SecondaryButton, { className: "
|
|
2374
|
+
return jsxRuntime.jsx(SecondaryButton, { className: "ui:bg-transparent! ui:px-s! ui:radius-xxxxs!", onClick, leadingIcon, trailingIcon: accessory, children: text });
|
|
2351
2375
|
};
|
|
2352
2376
|
|
|
2353
2377
|
const ConfirmationDialogTitle = (props) => {
|
|
2354
2378
|
var _a;
|
|
2355
|
-
return props.title ? jsxRuntime.jsxs("div", { "data-test-id": "confirmation-dialog-title", className: classNames__default.default("ui
|
|
2356
|
-
"ui
|
|
2357
|
-
}), children: [props.title.icon && jsxRuntime.jsx(IconComponentOrKey, { name: props.title.icon, className: "dialog-header-icon ui
|
|
2379
|
+
return props.title ? jsxRuntime.jsxs("div", { "data-test-id": "confirmation-dialog-title", className: classNames__default.default("ui:flex ui:flex-col ui:space-y-2 ui:text-center", {
|
|
2380
|
+
"ui:items-center ui:justify-center": (_a = props.title) === null || _a === void 0 ? void 0 : _a.icon
|
|
2381
|
+
}), children: [props.title.icon && jsxRuntime.jsx(IconComponentOrKey, { name: props.title.icon, className: "dialog-header-icon ui:h-12 ui:w-12 ui:text-primary" }), jsxRuntime.jsx(Title, { variant: "sm", children: props.title.title })] }) : null;
|
|
2358
2382
|
};
|
|
2359
2383
|
|
|
2360
2384
|
function Link(props) {
|
|
2361
2385
|
const { as: Element = "a", className } = props, rest = __rest(props, ["as", "className"]);
|
|
2362
|
-
const ownClasses = ["ui
|
|
2386
|
+
const ownClasses = ["ui:cursor-pointer ui:focus:outline-primary"];
|
|
2363
2387
|
if (typeof props.children === "string") {
|
|
2364
|
-
ownClasses.push("ui
|
|
2388
|
+
ownClasses.push("ui:text-primary", "ui:hover:underline", "ui:hover:text-primary-dark");
|
|
2365
2389
|
}
|
|
2366
2390
|
const classes = classNames__default.default(ownClasses, className);
|
|
2367
2391
|
return jsxRuntime.jsx(Element, Object.assign({ className: classes }, rest));
|
|
@@ -2369,13 +2393,13 @@ function Link(props) {
|
|
|
2369
2393
|
|
|
2370
2394
|
const NotificationBanner = (_a) => {
|
|
2371
2395
|
var { icon, className, stretch = true, centerContent = false, noBorder = false, color = "base", linkProps, text, children } = _a, boxProps = __rest(_a, ["icon", "className", "stretch", "centerContent", "noBorder", "color", "linkProps", "text", "children"]);
|
|
2372
|
-
const classes = classNames__default.default("ui
|
|
2373
|
-
"ui
|
|
2374
|
-
"ui
|
|
2375
|
-
"ui
|
|
2376
|
-
"ui
|
|
2377
|
-
"ui
|
|
2378
|
-
"ui
|
|
2396
|
+
const classes = classNames__default.default("ui:min-h-13", className, {
|
|
2397
|
+
"ui:bg-slate-100 ui:border-slate-300 ui:text-slate-800": color === "base",
|
|
2398
|
+
"ui:bg-blue-50 ui:border-primary-light ui:text-primary": color === "blue",
|
|
2399
|
+
"ui:bg-red-50 ui:border-red-700 ui:text-red-700": color === "red",
|
|
2400
|
+
"ui:bg-green-50 ui:border-green-700 ui:text-green-700": color === "green",
|
|
2401
|
+
"ui:bg-amber-50 ui:border-amber-700 ui:text-amber-700": color === "amber",
|
|
2402
|
+
"ui:border ui:border-solid": !noBorder
|
|
2379
2403
|
});
|
|
2380
2404
|
const textColor = {
|
|
2381
2405
|
red: "red",
|
|
@@ -2387,11 +2411,11 @@ const NotificationBanner = (_a) => {
|
|
|
2387
2411
|
};
|
|
2388
2412
|
const colour = color ? textColor[color] : "base";
|
|
2389
2413
|
return jsxRuntime.jsxs(Stack, Object.assign({ p: "m", as: "div", axis: "x", align: "center", justify: centerContent ? "center" : "start", "data-test-id": "notification-banner", borderRadius: "xxxxs", width: stretch ? "full" : void 0, className: classNames__default.default(classes, {
|
|
2390
|
-
"ui
|
|
2414
|
+
"ui:inline-flex": !stretch
|
|
2391
2415
|
}) }, boxProps, { children: [icon && (typeof icon === "function" ? React__namespace.default.createElement(icon, {
|
|
2392
|
-
className: "ui
|
|
2393
|
-
}) : jsxRuntime.jsx("img", { src: icon, className: "ui
|
|
2394
|
-
"ui
|
|
2416
|
+
className: "ui:w-6 ui:h-6 ui:mr-3 ui:shrink-0"
|
|
2417
|
+
}) : jsxRuntime.jsx("img", { src: icon, className: "ui:mr-3 ui:h-6 ui:w-6" })), jsxRuntime.jsxs("div", { className: "ui:flex ui:flex-col", children: [children, (text || linkProps) && jsxRuntime.jsxs("div", { className: "ui:flex ui:flex-row ui:items-center", children: [text && jsxRuntime.jsx(Text, { className: classNames__default.default({
|
|
2418
|
+
"ui:mr-1": linkProps
|
|
2395
2419
|
}), "data-test-id": "notification-text", color: colour, children: text }), linkProps && jsxRuntime.jsx(Link, { "data-test-id": "notification-text-link", "aria-disabled": !linkProps.enabled, rel: "noopener", target: "_blank", onClick: linkProps.handleClick, children: linkProps.text })] })] })] }));
|
|
2396
2420
|
};
|
|
2397
2421
|
|
|
@@ -2403,12 +2427,12 @@ const HelperAndErrorText = (props) => {
|
|
|
2403
2427
|
return jsxRuntime.jsx(Box, { id: props.describingId, children: props.errorText && jsxRuntime.jsx(Text, { variant: "sm", color: "red", children: props.errorText }) });
|
|
2404
2428
|
};
|
|
2405
2429
|
|
|
2406
|
-
var css_248z$b = ".ui
|
|
2430
|
+
var css_248z$b = "/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */\n.ui\\:radio-form-field-label input[type=\"radio\"]:checked + .ui\\:radio-circle {\n background-color: var(--ui-color-blue-800);\n border-color: var(--ui-color-blue-800);\n}\n.ui\\:radio-form-field-label input[type=\"radio\"]:disabled + .ui\\:radio-circle {\n opacity: 0.5;\n}\n.ui\\:radio-form-field-label[data-has-error=\"true\"] .ui\\:radio-circle {\n border-color: var(--ui-color-red-700, #b91c1c);\n outline-color: #FFF1F1;\n}\n.ui\\:radio-form-field-label\n input[type=\"radio\"]:checked\n + .ui\\:radio-circle\n .ui\\:radio-inner-circle {\n background-color: var(--ui-color-white, #fff);\n}\n";
|
|
2407
2431
|
styleInject(css_248z$b);
|
|
2408
2432
|
|
|
2409
2433
|
const StyledRadio = React__namespace.default.forwardRef((props, ref) => {
|
|
2410
2434
|
const { className } = props, attributes = __rest(props, ["className"]);
|
|
2411
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("input", Object.assign({ type: "radio" }, attributes, { className: classNames__default.default("ui
|
|
2435
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("input", Object.assign({ type: "radio" }, attributes, { className: classNames__default.default("ui:hidden", className), ref })), jsxRuntime.jsx("span", { "aria-hidden": true, className: classNames__default.default("ui:radio-circle ui:flex ui:h-4 ui:w-4 ui:flex-col ui:items-center ui:justify-center ui:rounded-xl ui:border ui:border-slate-300", "ui:transition-colors ui:duration-300 ui:ease-in-out"), children: jsxRuntime.jsx("span", { className: "ui:radio-inner-circle ui:block ui:h-1.5 ui:w-1.5 ui:rounded-xl ui:transition-colors ui:duration-300 ui:ease-in-out" }) })] });
|
|
2412
2436
|
});
|
|
2413
2437
|
|
|
2414
2438
|
function RadioInner(_a) {
|
|
@@ -2416,13 +2440,13 @@ function RadioInner(_a) {
|
|
|
2416
2440
|
const { value, disabled } = otherProps;
|
|
2417
2441
|
const nameHtmlFor = `${name}-field-${value}`;
|
|
2418
2442
|
const semanticId = React__namespace.default.useId();
|
|
2419
|
-
return jsxRuntime.jsxs(Stack, { as: "label", axis: "x", gap: "xs", className: "ui
|
|
2443
|
+
return jsxRuntime.jsxs(Stack, { as: "label", axis: "x", gap: "xs", className: "ui:radio-form-field-label ui:flex ui:flex-row ui:leading-none", htmlFor: nameHtmlFor, "data-has-error": isError, "data-test-id": nameHtmlFor, children: [jsxRuntime.jsx(StyledRadio, Object.assign({}, otherProps, { name, id: nameHtmlFor, ref: innerRef, "aria-describedby": semanticId })), jsxRuntime.jsxs("div", { children: [text && jsxRuntime.jsx(Text, { inline: true, variant: "base", color: disabled ? "slate-500" : void 0, children: text }), jsxRuntime.jsx(HelperAndErrorText, { helperText: info, describingId: semanticId })] })] });
|
|
2420
2444
|
}
|
|
2421
2445
|
const RadioV2 = React__namespace.default.forwardRef((props, ref) => jsxRuntime.jsx(RadioInner, Object.assign({}, props, { innerRef: ref })));
|
|
2422
2446
|
|
|
2423
2447
|
function RadioGroupInner(_a) {
|
|
2424
2448
|
var { innerRef, options, defaultValue, title } = _a, registerProps = __rest(_a, ["innerRef", "options", "defaultValue", "title"]);
|
|
2425
|
-
return jsxRuntime.jsxs("div", { className: classNames__default.default("ui
|
|
2449
|
+
return jsxRuntime.jsxs("div", { className: classNames__default.default("ui:flex ui:flex-col ui:space-y-2"), "data-test-id": `${registerProps.name}-radio-group`, children: [title && jsxRuntime.jsx(Text, { text: title }), options.map((option) => {
|
|
2426
2450
|
let defaultChecked;
|
|
2427
2451
|
if (!isNil__default.default(defaultValue)) {
|
|
2428
2452
|
defaultChecked = defaultValue === option.value;
|
|
@@ -2456,7 +2480,7 @@ const ConfirmationDialogMessage = (props) => {
|
|
|
2456
2480
|
if (typeof message === "string") {
|
|
2457
2481
|
return jsxRuntime.jsx(Text, { text: message, containsDangerousHtml: true });
|
|
2458
2482
|
}
|
|
2459
|
-
return jsxRuntime.jsx("div", { className: "ui
|
|
2483
|
+
return jsxRuntime.jsx("div", { className: "ui:space-y-2", children: message.map((messageLine) => jsxRuntime.jsx(Text, { containsDangerousHtml: true, children: messageLine }, messageLine)) });
|
|
2460
2484
|
};
|
|
2461
2485
|
|
|
2462
2486
|
const ConfirmationDialog = (_a) => {
|
|
@@ -2483,7 +2507,7 @@ const ConfirmationDialog = (_a) => {
|
|
|
2483
2507
|
return jsxRuntime.jsx(ModalBase, { size, dataTestId, isOpen: props.isOpen, withExtraMarginTop: true, onCloseClick: handleOnCloseClick, footerTrailingComponents: {
|
|
2484
2508
|
primaryButton: props.texts.confirmLabel ? jsxRuntime.jsx(PrimaryButton, { dataTestId: "modal-footer-trailing-primary-button", isPending: props.isProcessing, onClick: onConfirmHandler, children: props.texts.confirmLabel }) : null,
|
|
2485
2509
|
secondaryButton: jsxRuntime.jsx(SecondaryButton, { dataTestId: "modal-footer-trailing-secondary-button", onClick: props.onCancel, isDisabled: props.isProcessing, children: props.texts.cancelLabel })
|
|
2486
|
-
}, children: jsxRuntime.jsxs("div", { className: "ui
|
|
2510
|
+
}, children: jsxRuntime.jsxs("div", { className: "ui:min-h-13 ui:space-y-4", children: [jsxRuntime.jsx(ConfirmationDialogTitle, { title: props.withTitle }), children, message && jsxRuntime.jsx(ConfirmationDialogMessage, { message }), jsxRuntime.jsx(ConfirmationDialogChoices, { choices: props.choices, onChoiceChangeCallback: onChoiceChange, selectedChoice })] }) });
|
|
2487
2511
|
};
|
|
2488
2512
|
|
|
2489
2513
|
const LocaleContext = React.createContext("en-GB");
|
|
@@ -2520,12 +2544,12 @@ const DatePicker = (props) => {
|
|
|
2520
2544
|
React.useEffect(() => {
|
|
2521
2545
|
updateLocale(locale);
|
|
2522
2546
|
}, [locale]);
|
|
2523
|
-
const pickerClassName = classNames__default.default("cweb-datepicker ui
|
|
2524
|
-
"
|
|
2525
|
-
"
|
|
2526
|
-
"
|
|
2527
|
-
"
|
|
2528
|
-
"
|
|
2547
|
+
const pickerClassName = classNames__default.default("cweb-datepicker ui:text-slate-800 ui:text-sm", className, {
|
|
2548
|
+
"ui:z-10!": zIndex === 10,
|
|
2549
|
+
"ui:z-20!": zIndex === 20,
|
|
2550
|
+
"ui:z-30!": zIndex === 30,
|
|
2551
|
+
"ui:z-40!": zIndex === 40,
|
|
2552
|
+
"ui:z-50!": zIndex === 50
|
|
2529
2553
|
});
|
|
2530
2554
|
const getDateFormat = () => {
|
|
2531
2555
|
const { formatDateWithTime = false } = props;
|
|
@@ -2538,12 +2562,12 @@ const DatePicker = (props) => {
|
|
|
2538
2562
|
};
|
|
2539
2563
|
const dateFormat = getDateFormat();
|
|
2540
2564
|
return jsxRuntime.jsx(ReactDatePicker__default.default, Object.assign({}, otherProps, { adjustDateOnChange, allowSameDay, calendarClassName: "cweb-datepicker-calendar", className: pickerClassName, dateFormat, disabled: isDisabled, dropdownMode: "select", locale: getLocaleModule(locale), maxDate, minDate, popperClassName: classNames__default.default("react-datepicker-popper", {
|
|
2541
|
-
"
|
|
2542
|
-
"
|
|
2543
|
-
"
|
|
2544
|
-
"
|
|
2545
|
-
"
|
|
2546
|
-
}), popperPlacement: "bottom-start", portalId, ref: datePickerRef, selected, shouldCloseOnSelect, showMonthDropdown, showYearDropdown, timeFormat: "HH:mm", children: jsxRuntime.jsx("div", { className: "ui
|
|
2565
|
+
"ui:z-10!": popperZIndex === 10,
|
|
2566
|
+
"ui:z-20!": popperZIndex === 20,
|
|
2567
|
+
"ui:z-30!": popperZIndex === 30,
|
|
2568
|
+
"ui:z-40!": popperZIndex === 40,
|
|
2569
|
+
"ui:z-50!": popperZIndex === 50
|
|
2570
|
+
}), popperPlacement: "bottom-start", portalId, ref: datePickerRef, selected, shouldCloseOnSelect, showMonthDropdown, showYearDropdown, timeFormat: "HH:mm", children: jsxRuntime.jsx("div", { className: "ui:m-2 ui:mt-0", children: hasCloseButton ? jsxRuntime.jsx(PrimaryButton, { onClick: handleCloseButtonClick, children: closeButtonText !== null && closeButtonText !== void 0 ? closeButtonText : "OK" }) : null }) }));
|
|
2547
2571
|
};
|
|
2548
2572
|
|
|
2549
2573
|
var img$2 = "data:image/svg+xml,%3csvg width='8' height='14' viewBox='0 0 8 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 0C4.26522 5.96046e-08 4.51957 0.105357 4.70711 0.292893L7.70711 3.29289C8.09763 3.68342 8.09763 4.31658 7.70711 4.70711C7.31658 5.09763 6.68342 5.09763 6.29289 4.70711L4 2.41421L1.70711 4.70711C1.31658 5.09763 0.683417 5.09763 0.292893 4.70711C-0.0976311 4.31658 -0.097631 3.68342 0.292893 3.29289L3.29289 0.292893C3.48043 0.105357 3.73478 0 4 0ZM0.292893 9.29289C0.683417 8.90237 1.31658 8.90237 1.70711 9.29289L4 11.5858L6.29289 9.29289C6.68342 8.90237 7.31658 8.90237 7.70711 9.29289C8.09763 9.68342 8.09763 10.3166 7.70711 10.7071L4.70711 13.7071C4.31658 14.0976 3.68342 14.0976 3.29289 13.7071L0.292893 10.7071C-0.0976311 10.3166 -0.0976311 9.68342 0.292893 9.29289Z' fill='%239CA3AF'/%3e%3c/svg%3e";
|
|
@@ -2727,9 +2751,9 @@ class Dropdown extends React.PureComponent {
|
|
|
2727
2751
|
__publicField$1(this, "renderIndividualItem", (item) => {
|
|
2728
2752
|
const { highlightIndex } = this.state;
|
|
2729
2753
|
const isItemSelected = item.highlightIndex === highlightIndex;
|
|
2730
|
-
const itemClassName = classNames__default.default("dropdown-list-item ui
|
|
2754
|
+
const itemClassName = classNames__default.default("dropdown-list-item ui:p-3", {
|
|
2731
2755
|
"is-selected": isItemSelected,
|
|
2732
|
-
"ui
|
|
2756
|
+
"ui:flex ui:flex-row ui:justify-between ui:space-x-2": isItemSelected
|
|
2733
2757
|
});
|
|
2734
2758
|
const textType = isItemSelected ? "strong" : "base";
|
|
2735
2759
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2752,7 +2776,7 @@ class Dropdown extends React.PureComponent {
|
|
|
2752
2776
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2753
2777
|
"img",
|
|
2754
2778
|
{
|
|
2755
|
-
className: classNames__default.default({ "ui
|
|
2779
|
+
className: classNames__default.default({ "ui:hidden": !isItemSelected }),
|
|
2756
2780
|
src: img$1,
|
|
2757
2781
|
alt: "checked"
|
|
2758
2782
|
}
|
|
@@ -2764,10 +2788,10 @@ class Dropdown extends React.PureComponent {
|
|
|
2764
2788
|
});
|
|
2765
2789
|
__publicField$1(this, "renderGroupedItems", (item) => {
|
|
2766
2790
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "dropdown-list-item-group", children: [
|
|
2767
|
-
item.title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ui
|
|
2791
|
+
item.title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ui:bg-main-background ui:p-3", tabIndex: "-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2768
2792
|
Text,
|
|
2769
2793
|
{
|
|
2770
|
-
className: "ui
|
|
2794
|
+
className: "ui:uppercase",
|
|
2771
2795
|
"data-test-id": item.text,
|
|
2772
2796
|
text: item.title,
|
|
2773
2797
|
type: "sm",
|
|
@@ -2847,10 +2871,10 @@ class Dropdown extends React.PureComponent {
|
|
|
2847
2871
|
{
|
|
2848
2872
|
...otherProps,
|
|
2849
2873
|
className: classNames__default.default(
|
|
2850
|
-
"dropdown-header ui
|
|
2874
|
+
"dropdown-header ui:cursor-pointer ui:space-x-2 ui:border ui:border-solid ui:p-3",
|
|
2851
2875
|
{
|
|
2852
|
-
"ui
|
|
2853
|
-
"ui
|
|
2876
|
+
"ui:border-primary-dark": isDropdownOpen,
|
|
2877
|
+
"ui:border-input-border hover:ui:border-input-border-dark": !isDropdownOpen
|
|
2854
2878
|
}
|
|
2855
2879
|
),
|
|
2856
2880
|
onClick: onDropdownClick,
|
|
@@ -2946,7 +2970,7 @@ const InfoField = (props) => {
|
|
|
2946
2970
|
};
|
|
2947
2971
|
break;
|
|
2948
2972
|
}
|
|
2949
|
-
return jsxRuntime.jsxs(Stack, { axis: "x", align: "center", gap: "s", className: props.className, children: [props.icon, jsxRuntime.jsxs(Stack, Object.assign({}, boxProps, { className: "ui
|
|
2973
|
+
return jsxRuntime.jsxs(Stack, { axis: "x", align: "center", gap: "s", className: props.className, children: [props.icon, jsxRuntime.jsxs(Stack, Object.assign({}, boxProps, { className: "ui:overflow-hidden", children: [jsxRuntime.jsx(Text, { type: "sm", color: "slate-500", className: classNames__default.default({ "ui:break-words": props.supportsMultiline }, { "ui:whitespace-nowrap": !props.supportsMultiline }), children: props.label }), jsxRuntime.jsx(Text, { className: classNames__default.default({ "ui:break-words": props.supportsMultiline }, { "ui:whitespace-nowrap": !props.supportsMultiline }), truncate: !props.supportsMultiline, children: props.value })] }))] });
|
|
2950
2974
|
};
|
|
2951
2975
|
|
|
2952
2976
|
function cn(...inputs) {
|
|
@@ -2968,30 +2992,30 @@ const FlyOutMenuContent = React__namespace.forwardRef((_a, ref) => {
|
|
|
2968
2992
|
} = _a, props = __rest(_a, ["className", "sideOffset", "align", "container"]);
|
|
2969
2993
|
return jsxRuntime.jsx(FlyOutMenuPrimitive__namespace.Portal, { container, children: jsxRuntime.jsx(FlyOutMenuPrimitive__namespace.Content, Object.assign({ onClick: (event) => {
|
|
2970
2994
|
event.stopPropagation();
|
|
2971
|
-
}, ref, align, sideOffset, className: cn("ui
|
|
2995
|
+
}, ref, align, sideOffset, className: cn("ui:z-50 ui:min-w-[8rem] ui:max-w-[30ch] ui:overflow-hidden ui:border ui:border-color-border ui:bg-white ui:shadow-large ui:radius-m", "ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2", className) }, props)) });
|
|
2972
2996
|
});
|
|
2973
2997
|
FlyOutMenuContent.displayName = FlyOutMenuPrimitive__namespace.Content.displayName;
|
|
2974
2998
|
const FlyOutMenuItem = React__namespace.forwardRef((_a, ref) => {
|
|
2975
2999
|
var { className, icon, children } = _a, props = __rest(_a, ["className", "icon", "children"]);
|
|
2976
|
-
return jsxRuntime.jsxs(FlyOutMenuPrimitive__namespace.Item, Object.assign({ ref, className: cn("ui
|
|
3000
|
+
return jsxRuntime.jsxs(FlyOutMenuPrimitive__namespace.Item, Object.assign({ ref, className: cn("ui:gap-m", "ui:relative ui:flex ui:select-none ui:items-center ui:rounded-sm ui:text-sm ui:outline-none ui:transition-colors", "focus:text-accent-foreground ui:focus:bg-primary-background", className) }, props, { children: [icon, children] }));
|
|
2977
3001
|
});
|
|
2978
3002
|
FlyOutMenuItem.displayName = FlyOutMenuPrimitive__namespace.Item.displayName;
|
|
2979
3003
|
const FlyOutMenuLabel = React__namespace.forwardRef((_a, ref) => {
|
|
2980
3004
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
2981
|
-
return jsxRuntime.jsx(FlyOutMenuPrimitive__namespace.Label, Object.assign({ ref, className: cn("ui
|
|
3005
|
+
return jsxRuntime.jsx(FlyOutMenuPrimitive__namespace.Label, Object.assign({ ref, className: cn("ui:px-s ui:pb-xxs ui:pt-l", className) }, props, { children: jsxRuntime.jsx(Text, { variant: "strong", children: props.children }) }));
|
|
2982
3006
|
});
|
|
2983
3007
|
FlyOutMenuLabel.displayName = FlyOutMenuPrimitive__namespace.Label.displayName;
|
|
2984
3008
|
const FlyOutMenuSeparator = React__namespace.forwardRef((_a, ref) => {
|
|
2985
3009
|
var { className, color = "divider" } = _a, props = __rest(_a, ["className", "color"]);
|
|
2986
|
-
return jsxRuntime.jsx(FlyOutMenuPrimitive__namespace.Separator, Object.assign({ ref, className: cn("ui
|
|
2987
|
-
"ui
|
|
2988
|
-
"ui
|
|
3010
|
+
return jsxRuntime.jsx(FlyOutMenuPrimitive__namespace.Separator, Object.assign({ ref, className: cn("ui:h-px", {
|
|
3011
|
+
"ui:bg-color-divider": color === "divider",
|
|
3012
|
+
"ui:bg-neutral-border-high-contrast": color === "interactive"
|
|
2989
3013
|
}, className) }, props));
|
|
2990
3014
|
});
|
|
2991
3015
|
FlyOutMenuSeparator.displayName = FlyOutMenuPrimitive__namespace.Separator.displayName;
|
|
2992
3016
|
const ItemButton = (props) => {
|
|
2993
3017
|
const { children, icon } = props, rest = __rest(props, ["children", "icon"]);
|
|
2994
|
-
return jsxRuntime.jsxs("button", Object.assign({}, rest, { className: "ui
|
|
3018
|
+
return jsxRuntime.jsxs("button", Object.assign({}, rest, { className: "ui:flex ui:w-full ui:gap-s ui:p-s", children: [React__namespace.isValidElement(icon) ? React__namespace.cloneElement(icon, { className: "ui:shrink-0" }) : null, jsxRuntime.jsx(Text, { className: "ui:mt-[2px] ui:text-start", children })] }));
|
|
2995
3019
|
};
|
|
2996
3020
|
const FlyOutMenuButtonItem = (props) => {
|
|
2997
3021
|
const { children, icon } = props, rest = __rest(props, ["children", "icon"]);
|
|
@@ -2999,17 +3023,17 @@ const FlyOutMenuButtonItem = (props) => {
|
|
|
2999
3023
|
};
|
|
3000
3024
|
const FlyOutMenuChildrenItem = (props) => {
|
|
3001
3025
|
const { children, icon } = props, rest = __rest(props, ["children", "icon"]);
|
|
3002
|
-
return jsxRuntime.jsxs("div", Object.assign({}, rest, { className: "ui
|
|
3026
|
+
return jsxRuntime.jsxs("div", Object.assign({}, rest, { className: "ui:flex ui:w-full ui:gap-s ui:p-s", children: [React__namespace.isValidElement(icon) ? React__namespace.cloneElement(icon, { className: "ui:shrink-0" }) : null, jsxRuntime.jsx("div", { className: "ui:mt-[2px] ui:w-full", children })] }));
|
|
3003
3027
|
};
|
|
3004
3028
|
const FlyOutMenuSwitchItem = React__namespace.forwardRef((props, forwardedRef) => {
|
|
3005
3029
|
const { children, icon, onSelect, checkedIndicator } = props, rest = __rest(props, ["children", "icon", "onSelect", "checkedIndicator"]);
|
|
3006
|
-
return jsxRuntime.jsx(FlyOutMenuPrimitive__namespace.CheckboxItem, Object.assign({ ref: forwardedRef, className: "ui
|
|
3030
|
+
return jsxRuntime.jsx(FlyOutMenuPrimitive__namespace.CheckboxItem, Object.assign({ ref: forwardedRef, className: "ui:outline-none ui:focus:bg-primary-background", onSelect: (event) => {
|
|
3007
3031
|
event.preventDefault();
|
|
3008
3032
|
onSelect === null || onSelect === void 0 ? void 0 : onSelect(event);
|
|
3009
|
-
} }, rest, { children: jsxRuntime.jsx("div", { className: "ui
|
|
3010
|
-
"ui
|
|
3011
|
-
"ui
|
|
3012
|
-
}) }) }), jsxRuntime.jsx(Text, { className: "ui
|
|
3033
|
+
} }, rest, { children: jsxRuntime.jsx("div", { className: "ui:flex ui:w-full", children: jsxRuntime.jsxs("label", { className: "ui:inline-flex ui:w-full ui:cursor-pointer ui:p-s", children: [React__namespace.isValidElement(icon) ? React__namespace.cloneElement(icon, { className: "ui:shrink-0" }) : null, jsxRuntime.jsxs("div", { className: "ui:inline-flex ui:w-full ui:flex-row-reverse ui:gap-m", children: [jsxRuntime.jsx("div", { className: "ui:peer ui:ml-auto", children: checkedIndicator !== null && checkedIndicator !== void 0 ? checkedIndicator : jsxRuntime.jsx("div", { className: classNames__default.default("ui:relative ui:h-6 ui:w-11 ui:rounded-full ui:transition-colors", "ui:after:absolute ui:after:start-[2px] ui:after:top-[2px] ui:after:h-5 ui:after:w-5 ui:after:rounded-full ui:after:border ui:after:border-slate-300 ui:after:bg-white ui:after:transition-all ui:after:content-['']", {
|
|
3034
|
+
"ui:bg-primary-light ui:after:translate-x-full ui:after:border-white": props.checked === true,
|
|
3035
|
+
"ui:bg-slate-300": !props.checked
|
|
3036
|
+
}) }) }), jsxRuntime.jsx(Text, { className: "ui:ml-3 ui:mt-[2px] ui:text-start", children })] })] }) }) }));
|
|
3013
3037
|
});
|
|
3014
3038
|
const FlyOutMenu = {
|
|
3015
3039
|
Root: FlyOutMenuRoot,
|
|
@@ -3033,8 +3057,8 @@ const LabeledDatePicker = (_a) => {
|
|
|
3033
3057
|
const helperErrorTextId = React__namespace.default.useId();
|
|
3034
3058
|
const isError = Boolean(errorText);
|
|
3035
3059
|
const datePickerClassNames = classNames__default.default({
|
|
3036
|
-
"ui
|
|
3037
|
-
"focus:
|
|
3060
|
+
"ui:!border-negative-border": isError,
|
|
3061
|
+
"ui:!focus:outline-negative": isError
|
|
3038
3062
|
}, classNameFromProps);
|
|
3039
3063
|
return jsxRuntime.jsxs(Stack, { as: "label", gap: "xxxxs", children: [label && jsxRuntime.jsx(LabelText, { children: label }), jsxRuntime.jsx(DatePicker, Object.assign({}, props, { className: datePickerClassNames, "aria-describedby": helperErrorTextId })), jsxRuntime.jsx(HelperAndErrorText, { helperText, errorText, describingId: helperErrorTextId })] });
|
|
3040
3064
|
};
|
|
@@ -3049,7 +3073,7 @@ const LabeledRadio = React__namespace.default.forwardRef((props, ref) => {
|
|
|
3049
3073
|
const { children, label, helperText, errorText, className, inputClassName } = props, attributes = __rest(props, ["children", "label", "helperText", "errorText", "className", "inputClassName"]);
|
|
3050
3074
|
const { id, disabled } = attributes;
|
|
3051
3075
|
const semanticId = React__namespace.default.useId();
|
|
3052
|
-
return jsxRuntime.jsxs(Stack, { as: "label", axis: "x", gap: "xs", htmlFor: id, className: classNames__default.default("ui
|
|
3076
|
+
return jsxRuntime.jsxs(Stack, { as: "label", axis: "x", gap: "xs", htmlFor: id, className: classNames__default.default("ui:radio-form-field-label", className), children: [jsxRuntime.jsxs("div", { className: "ui:relative ui:flex ui:flex-row ui:items-center ui:self-start", children: [jsxRuntime.jsx(Text, { "aria-hidden": true, className: "ui:w-4 ui:opacity-0", children: "CENTER" }), jsxRuntime.jsx("div", { className: "ui:absolute", children: jsxRuntime.jsx(StyledRadio, Object.assign({ "aria-describedby": semanticId }, attributes, { ref, className: inputClassName })) })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(RadioLabel, { label, disabled, children }), jsxRuntime.jsx(HelperAndErrorText, { helperText, errorText, describingId: semanticId })] })] });
|
|
3053
3077
|
});
|
|
3054
3078
|
function RadioLabel(props) {
|
|
3055
3079
|
const { children, label, disabled } = props;
|
|
@@ -3065,7 +3089,7 @@ function RadioLabel(props) {
|
|
|
3065
3089
|
const LabeledRadioGroup = (props) => {
|
|
3066
3090
|
const { children, title, className } = props;
|
|
3067
3091
|
const semanticId = React__namespace.default.useId();
|
|
3068
|
-
return jsxRuntime.jsxs(Stack, { as: "fieldset", "aria-describedby": semanticId, className: classNames__default.default(className), gap: "xxxxs", children: [title && jsxRuntime.jsx("legend", { className: "ui
|
|
3092
|
+
return jsxRuntime.jsxs(Stack, { as: "fieldset", "aria-describedby": semanticId, className: classNames__default.default(className), gap: "xxxxs", children: [title && jsxRuntime.jsx("legend", { className: "ui:contents", children: jsxRuntime.jsx(Text, { children: title }) }), jsxRuntime.jsx(Stack, { gap: "xxs", children }), jsxRuntime.jsx(HelperAndErrorText, { helperText: props.helperText, errorText: props.errorText, describingId: semanticId })] });
|
|
3069
3093
|
};
|
|
3070
3094
|
|
|
3071
3095
|
const Actions$1 = (props) => {
|
|
@@ -3077,8 +3101,8 @@ const Actions$1 = (props) => {
|
|
|
3077
3101
|
* bar. I'm imagining this inconsistent spacing will be discussed
|
|
3078
3102
|
* in design soon, but for now this is what it should be.
|
|
3079
3103
|
*/
|
|
3080
|
-
"
|
|
3081
|
-
"ui
|
|
3104
|
+
"ui:-my-[10px]",
|
|
3105
|
+
"ui:flex ui:flex-wrap ui:justify-end ui:gap-2",
|
|
3082
3106
|
className
|
|
3083
3107
|
), children }));
|
|
3084
3108
|
};
|
|
@@ -3093,12 +3117,12 @@ const Padding$1 = (props) => {
|
|
|
3093
3117
|
|
|
3094
3118
|
const Section$1 = (props) => {
|
|
3095
3119
|
const { children } = props, rest = __rest(props, ["children"]);
|
|
3096
|
-
return jsxRuntime.jsx("div", Object.assign({}, rest, { className: classNames__default.default("ui
|
|
3120
|
+
return jsxRuntime.jsx("div", Object.assign({}, rest, { className: classNames__default.default("ui:mt-4", props.className), children }));
|
|
3097
3121
|
};
|
|
3098
3122
|
|
|
3099
3123
|
const TopBar = (props) => {
|
|
3100
3124
|
const { children } = props, rest = __rest(props, ["children"]);
|
|
3101
|
-
return jsxRuntime.jsx("div", Object.assign({}, rest, { className: classNames__default.default("ui
|
|
3125
|
+
return jsxRuntime.jsx("div", Object.assign({}, rest, { className: classNames__default.default("ui:my-4", props.className), children }));
|
|
3102
3126
|
};
|
|
3103
3127
|
TopBar.Actions = Actions$1;
|
|
3104
3128
|
|
|
@@ -3109,11 +3133,11 @@ function Card(props) {
|
|
|
3109
3133
|
modifier: "hover",
|
|
3110
3134
|
transition: true
|
|
3111
3135
|
});
|
|
3112
|
-
const classes = classNames__default.default("ui
|
|
3113
|
-
"ui
|
|
3114
|
-
"hover:
|
|
3136
|
+
const classes = classNames__default.default("ui:overflow-hidden", "ui:bg-white", "ui:transition-colors ui:duration-300", className, hoverShadowClassName, {
|
|
3137
|
+
"ui:border ui:border-slate-300": border,
|
|
3138
|
+
"ui:hover:border-slate-400": hasHoverEffect
|
|
3115
3139
|
});
|
|
3116
|
-
return jsxRuntime.jsx(Box, Object.assign({ as: Element, elevation, borderRadius }, rest, { className: classes, children: jsxRuntime.jsxs(Box, { className: "ui
|
|
3140
|
+
return jsxRuntime.jsx(Box, Object.assign({ as: Element, elevation, borderRadius }, rest, { className: classes, children: jsxRuntime.jsxs(Box, { className: "ui:bg-white", children: [jsxRuntime.jsx(RenderTopBar, Object.assign({}, props)), padding ? jsxRuntime.jsx(Padding$1, { children }) : children] }) }));
|
|
3117
3141
|
}
|
|
3118
3142
|
Card.Title = (props) => jsxRuntime.jsx(Title, Object.assign({ variant: "sm" }, props));
|
|
3119
3143
|
Card.TopBar = TopBar;
|
|
@@ -3123,7 +3147,7 @@ Card.Actions = Actions$1;
|
|
|
3123
3147
|
function RenderTopBar(props) {
|
|
3124
3148
|
const { title, actions } = props;
|
|
3125
3149
|
if (title && actions) {
|
|
3126
|
-
return jsxRuntime.jsx(Padding$1, { children: jsxRuntime.jsxs(TopBar, { className: "ui
|
|
3150
|
+
return jsxRuntime.jsx(Padding$1, { children: jsxRuntime.jsxs(TopBar, { className: "ui:flex ui:flex-wrap ui:items-center ui:justify-between", children: [jsxRuntime.jsx(Title, { variant: "sm", children: title }), jsxRuntime.jsx(Actions$1, { children: actions })] }) });
|
|
3127
3151
|
}
|
|
3128
3152
|
if (actions) {
|
|
3129
3153
|
return jsxRuntime.jsx(Padding$1, { children: jsxRuntime.jsx(TopBar, { children: jsxRuntime.jsx(Actions$1, { children: actions }) }) });
|
|
@@ -3136,12 +3160,12 @@ function RenderTopBar(props) {
|
|
|
3136
3160
|
|
|
3137
3161
|
const Content = (_a) => {
|
|
3138
3162
|
var { container, className } = _a, restContentProps = __rest(_a, ["container", "className"]);
|
|
3139
|
-
return jsxRuntime.jsx(RadixHC__namespace.Portal, { container, children: jsxRuntime.jsx(RadixHC__namespace.Content, Object.assign({ sideOffset: 8, className: classNames__default.default(className, "ui
|
|
3163
|
+
return jsxRuntime.jsx(RadixHC__namespace.Portal, { container, children: jsxRuntime.jsx(RadixHC__namespace.Content, Object.assign({ sideOffset: 8, className: classNames__default.default(className, "ui:max-w-80", "ui:z-20", "ui:data-[state=open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2") }, restContentProps)) });
|
|
3140
3164
|
};
|
|
3141
3165
|
Content.displayName = "HoverCard.Content";
|
|
3142
3166
|
const Root = (props) => jsxRuntime.jsx(RadixHC__namespace.Root, Object.assign({ openDelay: 100, closeDelay: 200 }, props));
|
|
3143
3167
|
Root.displayName = "HoverCard.Root";
|
|
3144
|
-
const CustomCard = (props) => jsxRuntime.jsx(Card, Object.assign({ border: true, elevation: "medium" }, props, { className: classNames__default.default(props.className, "ui
|
|
3168
|
+
const CustomCard = (props) => jsxRuntime.jsx(Card, Object.assign({ border: true, elevation: "medium" }, props, { className: classNames__default.default(props.className, "ui:mw-104") }));
|
|
3145
3169
|
CustomCard.displayName = "HoverCard.Card";
|
|
3146
3170
|
const HoverCard = {
|
|
3147
3171
|
Arrow: RadixHC__namespace.Arrow,
|
|
@@ -3157,25 +3181,25 @@ const Line = ({ left, right, className }) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
|
3157
3181
|
className: classNames__default.default(
|
|
3158
3182
|
className,
|
|
3159
3183
|
"cweb-line",
|
|
3160
|
-
"ui
|
|
3184
|
+
"ui:flex-no-wrap ui:flex ui:flex-row"
|
|
3161
3185
|
),
|
|
3162
3186
|
children: [
|
|
3163
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ui
|
|
3187
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ui:flex", children: left?.map(
|
|
3164
3188
|
(item) => item && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3165
3189
|
"div",
|
|
3166
3190
|
{
|
|
3167
|
-
className: "ui
|
|
3191
|
+
className: "ui:mr-3 ui:flex ui:items-center",
|
|
3168
3192
|
children: item
|
|
3169
3193
|
},
|
|
3170
3194
|
item.key ?? item.props.id
|
|
3171
3195
|
)
|
|
3172
3196
|
) }),
|
|
3173
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ui
|
|
3174
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ui
|
|
3197
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ui:grow" }),
|
|
3198
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ui:flex", children: right?.map((item) => {
|
|
3175
3199
|
return item && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3176
3200
|
"div",
|
|
3177
3201
|
{
|
|
3178
|
-
className: "ui
|
|
3202
|
+
className: "ui:ml-3 ui:first:ml-0",
|
|
3179
3203
|
children: item
|
|
3180
3204
|
},
|
|
3181
3205
|
item.key ?? item.props.id
|
|
@@ -3193,22 +3217,22 @@ Line.propTypes = {
|
|
|
3193
3217
|
const THead = (props) => {
|
|
3194
3218
|
return jsxRuntime.jsx("thead", { className: classNames__default.default(
|
|
3195
3219
|
// Styles for all <th>
|
|
3196
|
-
"[&>tr>th]:
|
|
3197
|
-
"[&>tr>th]:
|
|
3198
|
-
"[&>tr>th]:
|
|
3220
|
+
"ui:[&>tr>th]:border-neutral-border-high-contrast",
|
|
3221
|
+
"ui:[&>tr>th]:border-y",
|
|
3222
|
+
"ui:[&>tr>th]:px-xxs",
|
|
3199
3223
|
// Styles for the first <th> in the header row
|
|
3200
|
-
"[&>tr>th:first-child]:
|
|
3224
|
+
"ui:[&>tr>th:first-child]:rounded-tl-2xl ui:[&>tr>th:first-child]:border-l ui:[&>tr>th:first-child]:pl-l",
|
|
3201
3225
|
// Styles for the last <th> in the table row
|
|
3202
|
-
"[&>tr>th:last-child]:
|
|
3226
|
+
"ui:[&>tr>th:last-child]:rounded-tr-2xl ui:[&>tr>th:last-child]:border-r ui:[&>tr>th:last-child]:pr-l"
|
|
3203
3227
|
), children: props.children });
|
|
3204
3228
|
};
|
|
3205
3229
|
function TableHeader(props) {
|
|
3206
3230
|
if (props.selectAllComponent) {
|
|
3207
|
-
return jsxRuntime.jsx(THead, { children: jsxRuntime.jsx("tr", { className: "ui
|
|
3231
|
+
return jsxRuntime.jsx(THead, { children: jsxRuntime.jsx("tr", { className: "ui:rounded-2xl", children: jsxRuntime.jsx("th", { colSpan: props.colSpan, children: props.selectAllComponent }) }) });
|
|
3208
3232
|
}
|
|
3209
|
-
return jsxRuntime.jsx(THead, { children: jsxRuntime.jsxs("tr", { className: "ui
|
|
3233
|
+
return jsxRuntime.jsx(THead, { children: jsxRuntime.jsxs("tr", { className: "ui:rounded-2xl", children: [props.selectAllCheckbox && jsxRuntime.jsx("th", { children: props.selectAllCheckbox }), props.fieldConfigurations.map((fieldConfig) => {
|
|
3210
3234
|
var _a;
|
|
3211
|
-
return jsxRuntime.jsx("th", { children: jsxRuntime.jsx(Text, { variant: "strong", className: "ui
|
|
3235
|
+
return jsxRuntime.jsx("th", { children: jsxRuntime.jsx(Text, { variant: "strong", className: "ui:truncate ui:py-m ui:text-left ui:capitalize ui:leading-5", children: (_a = fieldConfig.headerText) !== null && _a !== void 0 ? _a : "" }) }, fieldConfig.key);
|
|
3212
3236
|
})] }) });
|
|
3213
3237
|
}
|
|
3214
3238
|
|
|
@@ -3260,18 +3284,18 @@ function prepareClientSidePagination({
|
|
|
3260
3284
|
|
|
3261
3285
|
function TableBodyRowDataCell(props) {
|
|
3262
3286
|
if ("render" in props.fieldConfig && props.fieldConfig.render) {
|
|
3263
|
-
return jsxRuntime.jsx("td", { className: classNames__default.default("ui
|
|
3287
|
+
return jsxRuntime.jsx("td", { className: classNames__default.default("ui:px-2 ui:first:pl-6 ui:last:pr-6"), children: props.fieldConfig.render(props.item) });
|
|
3264
3288
|
}
|
|
3265
3289
|
const content = props.fieldConfig.content(props.item);
|
|
3266
3290
|
const isTextCellEmpty = isTableFieldText(content) && !content.text && !content.tag;
|
|
3267
|
-
return jsxRuntime.jsxs("td", { className: classNames__default.default("ui
|
|
3268
|
-
"ui
|
|
3269
|
-
"group-hover:
|
|
3291
|
+
return jsxRuntime.jsxs("td", { className: classNames__default.default("ui:px-2 ui:align-middle ui:first:pl-6 ui:last:pr-6"), children: [isTableFieldText(content) && jsxRuntime.jsxs(Stack, { axis: "x", align: "center", gap: "xs", children: [content.tag && jsxRuntime.jsx(Tag, { colorTheme: content.tag.color, children: content.tag.text }), jsxRuntime.jsx(CellTextContent, { content, emptyFieldContent: isTextCellEmpty ? props.emptyFieldContentText : void 0 })] }), isTableFieldAction(content) && jsxRuntime.jsx("div", { className: classNames__default.default("ui:flex ui:flex-row ui:justify-end", "ui:transition-opacity ui:duration-300 ui:ease-in-out", {
|
|
3292
|
+
"ui:opacity-0": props.fieldConfig.onlyShowContentOnHovering,
|
|
3293
|
+
"ui:group-hover:opacity-100": props.fieldConfig.onlyShowContentOnHovering
|
|
3270
3294
|
}), children: content.map((action) => {
|
|
3271
3295
|
if (!action) {
|
|
3272
3296
|
return null;
|
|
3273
3297
|
}
|
|
3274
|
-
return jsxRuntime.jsx(TertiaryButton, { "data-test-id": `${action.key}-button`, className: "ui
|
|
3298
|
+
return jsxRuntime.jsx(TertiaryButton, { "data-test-id": `${action.key}-button`, className: "ui:ml-2 ui:first:ml-0", icon: action.icon, isDisabled: action.isDisabled, title: action.title, onClick: () => {
|
|
3275
3299
|
action.handleClick(props.item);
|
|
3276
3300
|
} }, action.key);
|
|
3277
3301
|
}) })] });
|
|
@@ -3281,12 +3305,12 @@ const CellTextContent = (props) => {
|
|
|
3281
3305
|
if (!props.content.description && !props.content.text && !props.emptyFieldContent) {
|
|
3282
3306
|
return null;
|
|
3283
3307
|
}
|
|
3284
|
-
return jsxRuntime.jsxs(Stack, { py: "m", children: [(props.content.text || props.emptyFieldContent) && jsxRuntime.jsx(Text, { className: classNames__default.default("ui
|
|
3285
|
-
"ui
|
|
3286
|
-
"ui
|
|
3308
|
+
return jsxRuntime.jsxs(Stack, { py: "m", children: [(props.content.text || props.emptyFieldContent) && jsxRuntime.jsx(Text, { className: classNames__default.default("ui:text-left ui:leading-5", {
|
|
3309
|
+
"ui:break-all": props.content.breakAllWord,
|
|
3310
|
+
"ui:break-words": !props.content.breakAllWord
|
|
3287
3311
|
}), children: (_a = props.content.text) !== null && _a !== void 0 ? _a : props.emptyFieldContent }), props.content.description && jsxRuntime.jsx(Text, { className: classNames__default.default({
|
|
3288
|
-
"ui
|
|
3289
|
-
"ui
|
|
3312
|
+
"ui:break-all": props.content.description.breakAllWord,
|
|
3313
|
+
"ui:break-words": !props.content.description.breakAllWord
|
|
3290
3314
|
}), variant: "sm", color: "slate-500", children: props.content.description.content })] });
|
|
3291
3315
|
};
|
|
3292
3316
|
|
|
@@ -3321,34 +3345,34 @@ function TableBody(props) {
|
|
|
3321
3345
|
return jsxRuntime.jsxs("tbody", { className: classNames__default.default(
|
|
3322
3346
|
props.className,
|
|
3323
3347
|
// setting border color across all cells
|
|
3324
|
-
"[&>tr>td]:
|
|
3348
|
+
"ui:[&>tr>td]:border-neutral-border-high-contrast",
|
|
3325
3349
|
// left border for first cell and right border for last cell
|
|
3326
|
-
"[&>tr>td:first-child]:
|
|
3327
|
-
"[&>tr>td]:
|
|
3350
|
+
"ui:[&>tr>td:first-child]:border-l ui:[&>tr>td:last-child]:border-r",
|
|
3351
|
+
"ui:[&>tr>td]:border-b",
|
|
3328
3352
|
/**
|
|
3329
3353
|
* Configuration for the top row to have rounded edges, in case
|
|
3330
3354
|
* there is no header.
|
|
3331
3355
|
*/
|
|
3332
3356
|
{
|
|
3333
|
-
"[&>tr:first-child>td]:
|
|
3334
|
-
"[&>tr:first-child>td:first-child]:
|
|
3335
|
-
"[&>tr:first-child>td:last-child]:
|
|
3357
|
+
"ui:[&>tr:first-child>td]:border-t": props.topRowRounded,
|
|
3358
|
+
"ui:[&>tr:first-child>td:first-child]:rounded-tl-2xl": props.topRowRounded,
|
|
3359
|
+
"ui:[&>tr:first-child>td:last-child]:rounded-tr-2xl": props.topRowRounded
|
|
3336
3360
|
},
|
|
3337
3361
|
/**
|
|
3338
3362
|
* Configuration for the last row to have rounded edges, in case
|
|
3339
3363
|
* there is no footer.
|
|
3340
3364
|
*/
|
|
3341
3365
|
{
|
|
3342
|
-
"[&>tr:last-child>td:first-child]:
|
|
3343
|
-
"[&>tr:last-child>td:last-child]:
|
|
3366
|
+
"ui:[&>tr:last-child>td:first-child]:rounded-bl-2xl": props.lastRowRounded,
|
|
3367
|
+
"ui:[&>tr:last-child>td:last-child]:rounded-br-2xl": props.lastRowRounded
|
|
3344
3368
|
}
|
|
3345
3369
|
), children: [!props.isLoading && ((_a = props.items) === null || _a === void 0 ? void 0 : _a.map((item, index) => {
|
|
3346
3370
|
const clickCallback = isOnSelectMode ? generateOnRowClickSelectHandler({ item, index }) : generateRowClickHandler(item);
|
|
3347
|
-
return jsxRuntime.jsxs("tr", { tabIndex: 0, className: classNames__default.default("ui
|
|
3348
|
-
"ui
|
|
3349
|
-
"ui
|
|
3350
|
-
"ui
|
|
3351
|
-
}, props.className), onClick: clickCallback, children: [props.isSelectable && jsxRuntime.jsx("td", { className: "ui
|
|
3371
|
+
return jsxRuntime.jsxs("tr", { tabIndex: 0, className: classNames__default.default("ui:group", {
|
|
3372
|
+
"ui:cursor-pointer ui:transition-colors ui:duration-300 ui:ease-in-out ui:hover:bg-blue-50 ui:focus:outline-primary": props.onRowClick,
|
|
3373
|
+
"ui:cursor-default ui:hover:bg-white": !props.onRowClick,
|
|
3374
|
+
"ui:bg-blue-100": isItemChecked(index)
|
|
3375
|
+
}, props.className), onClick: clickCallback, children: [props.isSelectable && jsxRuntime.jsx("td", { className: "ui:px-0", children: jsxRuntime.jsx(Checkbox, { className: "ui:ml-4 ui:w-fit", classNameCheckboxLabel: "ui:p-2", isChecked: isItemChecked(index), onClick: (event) => event.stopPropagation(), onChange: (event) => {
|
|
3352
3376
|
var _a2;
|
|
3353
3377
|
event.stopPropagation();
|
|
3354
3378
|
(_a2 = props.onSelectRow) === null || _a2 === void 0 ? void 0 : _a2.call(props, {
|
|
@@ -3357,7 +3381,7 @@ function TableBody(props) {
|
|
|
3357
3381
|
value: item
|
|
3358
3382
|
});
|
|
3359
3383
|
} }) }), props.fieldConfigurations.map((fieldConfig) => jsxRuntime.jsx(TableBodyRowDataCell, { item, fieldConfig, emptyFieldContentText: props.emptyFieldContentText }, fieldConfig.key))] }, JSON.stringify(item));
|
|
3360
|
-
})), props.isLoading && jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: props.colSpan, children: jsxRuntime.jsx(LoadingIndicator, { className: "ui
|
|
3384
|
+
})), props.isLoading && jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: props.colSpan, children: jsxRuntime.jsx(LoadingIndicator, { className: "ui:px-3 ui:py-0", asModal: false }) }) }), props.showEmptyView && jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: props.colSpan, children: jsxRuntime.jsx(EmptyListMessage, { className: "ui:py-6", text: props.emptyItemsText, imageName: "search-not-found" }) }) })] });
|
|
3361
3385
|
}
|
|
3362
3386
|
|
|
3363
3387
|
const PaginationMenuSmall = (props) => {
|
|
@@ -3365,7 +3389,7 @@ const PaginationMenuSmall = (props) => {
|
|
|
3365
3389
|
const pageNumber = event.currentTarget.dataset.page;
|
|
3366
3390
|
pageNumber && props.onChange(parseInt(pageNumber, 10), props.pageSize);
|
|
3367
3391
|
};
|
|
3368
|
-
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
|
|
3392
|
+
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 })] });
|
|
3369
3393
|
};
|
|
3370
3394
|
|
|
3371
3395
|
var css_248z$8 = ".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}";
|
|
@@ -3478,11 +3502,11 @@ const Select = React__namespace.default.forwardRef((_a, innerRef) => {
|
|
|
3478
3502
|
return jsxRuntime.jsx(ReactSelect.components.SelectContainer, Object.assign({}, commonProps, { innerProps: Object.assign({}, commonProps.innerProps, Object.assign({}, getDataAttributes())), children }));
|
|
3479
3503
|
};
|
|
3480
3504
|
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, {
|
|
3481
|
-
"ui
|
|
3482
|
-
"ui
|
|
3483
|
-
"ui
|
|
3484
|
-
"ui
|
|
3485
|
-
"ui
|
|
3505
|
+
"ui:w-16": width === "sm",
|
|
3506
|
+
"ui:w-32": width === "md",
|
|
3507
|
+
"ui:w-56": width === "lg",
|
|
3508
|
+
"ui:w-80": width === "xl",
|
|
3509
|
+
"ui:grow": width === "full"
|
|
3486
3510
|
}), components: {
|
|
3487
3511
|
SelectContainer: CustomContainer,
|
|
3488
3512
|
DropdownIndicator: SelectDropdownIndicator,
|
|
@@ -3529,7 +3553,7 @@ const PaginationMenuLarge = (props) => {
|
|
|
3529
3553
|
const newPage = event.currentTarget.dataset.page;
|
|
3530
3554
|
newPage && props.onChange(parseInt(newPage, 10), props.pageSize);
|
|
3531
3555
|
};
|
|
3532
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "ui
|
|
3556
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "ui:flex ui:flex-row ui:items-center", children: [props.pageSize && props.resultCount && jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Text, { text: props.localization.display }), jsxRuntime.jsx(Select, { className: "ui:ml-2 ui:mr-4 ui:w-24", options: PAGE_SIZE_OPTIONS, onChange: handleOnPageSizeSelect, value: props.pageSize, menuPlacement: "auto" })] }), jsxRuntime.jsx(Text, { text: props.localization.page }), jsxRuntime.jsx(Select, { className: "ui:ml-2 ui:w-24", options: getPageNumberOptions(props.pageCount), onChange: handleOnPageNumberSelect, value: props.currentPageNumber, isDisabled: props.pageCount < 2, menuPlacement: "auto" })] }), jsxRuntime.jsxs("div", { className: "ui:ml-4 ui:flex ui:flex-row ui:items-center", children: [jsxRuntime.jsx(Text, { text: getSummaryText(props.pageCount, props.currentPageNumber, props.localization, props.pageSize, props.resultCount), color: "slate-500" }), jsxRuntime.jsx(SecondaryButton, { "data-test-id": "prev-button", text: props.localization.previous, "data-page": props.currentPageNumber - 1, onClick: handleOnPrevNextButtonClick, isDisabled: props.currentPageNumber === 1, className: "ui:ml-4" }), jsxRuntime.jsx(SecondaryButton, { "data-test-id": "next-button", text: props.localization.next, isDisabled: props.currentPageNumber === props.pageCount, "data-page": props.currentPageNumber + 1, onClick: handleOnPrevNextButtonClick, className: "ui:ml-4" })] })] });
|
|
3533
3557
|
};
|
|
3534
3558
|
|
|
3535
3559
|
const PaginationMenuCursor = (props) => {
|
|
@@ -3540,7 +3564,7 @@ const PaginationMenuCursor = (props) => {
|
|
|
3540
3564
|
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 })] });
|
|
3541
3565
|
};
|
|
3542
3566
|
|
|
3543
|
-
const Wrapper = ({ className, children }) => jsxRuntime.jsx("div", { className: classNames__default.default("ui
|
|
3567
|
+
const Wrapper = ({ className, children }) => jsxRuntime.jsx("div", { className: classNames__default.default("ui:flex ui:w-full ui:flex-row ui:items-center ui:justify-between", className), children });
|
|
3544
3568
|
const PaginationMenu = (props) => {
|
|
3545
3569
|
if (props.type === "small" || props.small) {
|
|
3546
3570
|
return jsxRuntime.jsx(Wrapper, { className: props.className, children: jsxRuntime.jsx(PaginationMenuSmall, { pageCount: props.pageCount, currentPageNumber: props.currentPageNumber, pageSize: props.pageSize, onChange: props.onChange }) });
|
|
@@ -3552,7 +3576,7 @@ const PaginationMenu = (props) => {
|
|
|
3552
3576
|
};
|
|
3553
3577
|
|
|
3554
3578
|
const TableFooter = (props) => {
|
|
3555
|
-
return jsxRuntime.jsx("tfoot", { children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { className: "ui
|
|
3579
|
+
return jsxRuntime.jsx("tfoot", { children: jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { className: "ui:rounded-b-2xl ui:border-x ui:border-b ui:border-neutral-border-high-contrast", colSpan: props.colSpan, children: jsxRuntime.jsx(PaginationMenu, Object.assign({ className: "ui:p-6" }, props.paginationMenuProps)) }) }) });
|
|
3556
3580
|
};
|
|
3557
3581
|
|
|
3558
3582
|
function Table(_a) {
|
|
@@ -3596,13 +3620,13 @@ function Table(_a) {
|
|
|
3596
3620
|
};
|
|
3597
3621
|
const shouldDisplayHeaderSelectAll = isSelectable && items && items.length > 0;
|
|
3598
3622
|
const shouldDisplaySelectAllControls = shouldDisplayHeaderSelectAll && rowSelectionHeaderAccessories && selectedItems && selectedItems.length > 0;
|
|
3599
|
-
const toggleAllCheckbox = jsxRuntime.jsxs("label", { children: [jsxRuntime.jsx("span", { className: "ui
|
|
3600
|
-
return jsxRuntime.jsxs("table", Object.assign({ className: classNames__default.default("ui
|
|
3623
|
+
const toggleAllCheckbox = jsxRuntime.jsxs("label", { children: [jsxRuntime.jsx("span", { className: "ui:sr-only", children: "Select all rows" }), jsxRuntime.jsx(Checkbox, { isChecked: getSelectAllCheckboxState() === "checked", isIndeterminate: getSelectAllCheckboxState() === "indeterminate", onChange: handleOnToggleAll })] });
|
|
3624
|
+
return jsxRuntime.jsxs("table", Object.assign({ className: classNames__default.default("ui:w-full ui:table-auto ui:bg-white", "ui:border-separate ui:border-spacing-0 ui:rounded-2xl", className), "data-test-id": dataTestId }, otherAttributes, { children: [showHeader ? jsxRuntime.jsx(TableHeader, { fieldConfigurations, colSpan, selectAllCheckbox: shouldDisplayHeaderSelectAll ? toggleAllCheckbox : null, selectAllComponent: shouldDisplaySelectAllControls ? jsxRuntime.jsxs(Stack, { axis: "x", align: "center", gap: "xs", my: "xxs", children: [toggleAllCheckbox, rowSelectionHeaderAccessories] }) : null }) : null, jsxRuntime.jsx(
|
|
3601
3625
|
TableBody,
|
|
3602
3626
|
{
|
|
3603
3627
|
// TODO: early return to remove all the boolean juggling.
|
|
3604
3628
|
className: classNames__default.default({
|
|
3605
|
-
"ui
|
|
3629
|
+
"ui:border-b ui:border-neutral-border-high-contrast": showFooter
|
|
3606
3630
|
}),
|
|
3607
3631
|
items,
|
|
3608
3632
|
fieldConfigurations,
|
|
@@ -3691,12 +3715,12 @@ const CheckboxGroup = ({ title, items, onChange, onStateChange, className, isCol
|
|
|
3691
3715
|
};
|
|
3692
3716
|
const checkedItemsCount = items === null || items === void 0 ? void 0 : items.filter((item) => item === null || item === void 0 ? void 0 : item.isChecked).length;
|
|
3693
3717
|
const groupTitle = checkedItemsCount > 0 ? `${title} (${checkedItemsCount})` : title;
|
|
3694
|
-
return jsxRuntime.jsxs("div", { className: classNames__default.default("ui
|
|
3718
|
+
return jsxRuntime.jsxs("div", { className: classNames__default.default("ui:flex ui:flex-col", className), children: [title && jsxRuntime.jsxs("div", { className: "ui:flex ui:w-full ui:flex-row ui:items-center", children: [jsxRuntime.jsx(Checkbox, { renderLabel: () => jsxRuntime.jsx(Text, { variant: "strong", children: groupTitle }), onChange: handleGroupClick, isChecked: groupCheckboxState === CheckboxState.CHECKED, isDisabled, isIndeterminate: groupCheckboxState === CheckboxState.INDETERMINATE, className: "ui:flex-1 ui:py-3" }, title), collapsible && jsxRuntime.jsx(GroupCollapseButton, { "aria-label": getGroupCollapseButtonAriaLabel({
|
|
3695
3719
|
groupTitle: title,
|
|
3696
3720
|
collapsed
|
|
3697
|
-
}), collapsed, type: "button", onClick: handleGroupCollapse })] }), !collapsed && items.map((item) => React.createElement(Checkbox, Object.assign({}, item, { key: item.id, text: item.label, onChange: handleCheckboxChange, className: classNames__default.default("ui
|
|
3698
|
-
"ui
|
|
3699
|
-
"ui
|
|
3721
|
+
}), collapsed, type: "button", onClick: handleGroupCollapse })] }), !collapsed && items.map((item) => React.createElement(Checkbox, Object.assign({}, item, { key: item.id, text: item.label, onChange: handleCheckboxChange, className: classNames__default.default("ui:py-3", {
|
|
3722
|
+
"ui:ml-10": collapsible,
|
|
3723
|
+
"ui:ml-5": !collapsible
|
|
3700
3724
|
}) })))] });
|
|
3701
3725
|
};
|
|
3702
3726
|
function getGroupCollapseButtonAriaLabel(args) {
|
|
@@ -3708,15 +3732,15 @@ function getGroupCollapseButtonAriaLabel(args) {
|
|
|
3708
3732
|
function GroupCollapseButton(props) {
|
|
3709
3733
|
const { collapsed } = props, rest = __rest(props, ["collapsed"]);
|
|
3710
3734
|
return jsxRuntime.jsx("button", Object.assign({}, rest, { className: classNames__default.default(
|
|
3711
|
-
"ui
|
|
3735
|
+
"ui:outline-none",
|
|
3712
3736
|
// We have a custom focus indicator for this one.
|
|
3713
|
-
"ui
|
|
3714
|
-
"ui
|
|
3737
|
+
"ui:group",
|
|
3738
|
+
"ui:py-2.5",
|
|
3715
3739
|
// Icon height is 24px, so only needs 10px of padding to match the 44px height of the text and padding.
|
|
3716
|
-
"ui
|
|
3740
|
+
"ui:pl-6",
|
|
3717
3741
|
// Make the click area a little larger for better UX.
|
|
3718
|
-
"ui
|
|
3719
|
-
), children: jsxRuntime.jsxs("div", { className: classNames__default.default("group-hover:
|
|
3742
|
+
"ui:text-slate-600 ui:transition-colors ui:duration-75"
|
|
3743
|
+
), children: jsxRuntime.jsxs("div", { className: classNames__default.default("ui:group-hover:bg-slate-200 ui:group-focus-visible:bg-slate-200", "ui:relative ui:h-full ui:rounded-full ui:transition-transform", `${collapsed ? "ui:rotate-0" : "ui:-rotate-180"}`), children: [jsxRuntime.jsx(ChevronDownIcon, {}), jsxRuntime.jsx("div", { className: classNames__default.default("ui:absolute ui:right-0 ui:top-0 ui:-z-[10]") })] }) }));
|
|
3720
3744
|
}
|
|
3721
3745
|
|
|
3722
3746
|
const CheckboxList = ({ groups, onChange, onStateChange, className }) => {
|
|
@@ -3744,12 +3768,12 @@ const CheckboxList = ({ groups, onChange, onStateChange, className }) => {
|
|
|
3744
3768
|
});
|
|
3745
3769
|
onStateChange === null || onStateChange === void 0 ? void 0 : onStateChange(newState);
|
|
3746
3770
|
};
|
|
3747
|
-
return jsxRuntime.jsx("div", { className: classNames__default.default("ui
|
|
3771
|
+
return jsxRuntime.jsx("div", { className: classNames__default.default("ui:flex ui:flex-col", className), children: groups.map((group) => {
|
|
3748
3772
|
if (group.title) {
|
|
3749
3773
|
const groupTitle = group.title;
|
|
3750
3774
|
return jsxRuntime.jsx(CheckboxGroup, { items: group.items, title: group.title, isCollapsed: group.isCollapsed, collapsible: group.collapsible, onChange, onStateChange: (items) => handleGroupChange({ groupTitle, items }) }, group.title);
|
|
3751
3775
|
} else {
|
|
3752
|
-
return group.items.map((item) => React.createElement(Checkbox, Object.assign({}, item, { key: item.id, text: item.label, onChange: handleCheckboxChange, classNameCheckboxLabel: "ui
|
|
3776
|
+
return group.items.map((item) => React.createElement(Checkbox, Object.assign({}, item, { key: item.id, text: item.label, onChange: handleCheckboxChange, classNameCheckboxLabel: "ui:py-3" })));
|
|
3753
3777
|
}
|
|
3754
3778
|
}) });
|
|
3755
3779
|
};
|
|
@@ -3767,18 +3791,18 @@ const Divider = (props) => {
|
|
|
3767
3791
|
}
|
|
3768
3792
|
const { className, dark } = props, rest = __rest(props, ["className", "dark"]);
|
|
3769
3793
|
const darkTheme = Boolean(dark);
|
|
3770
|
-
return jsxRuntime.jsx("div", Object.assign({ className: classNames__default.default("ui
|
|
3771
|
-
"ui
|
|
3772
|
-
"ui
|
|
3794
|
+
return jsxRuntime.jsx("div", Object.assign({ className: classNames__default.default("ui:border-color ui:block ui:w-full ui:border-b ui:border-solid ui:last:border-b-0", className, {
|
|
3795
|
+
"ui:border-color-divider": !darkTheme,
|
|
3796
|
+
"ui:border-slate-600": darkTheme
|
|
3773
3797
|
}) }, rest));
|
|
3774
3798
|
};
|
|
3775
3799
|
const HrDivider = (props) => {
|
|
3776
3800
|
const { className, color = "border" } = props;
|
|
3777
3801
|
return jsxRuntime.jsx("hr", { className: classNames__default.default({
|
|
3778
|
-
"ui
|
|
3779
|
-
"ui
|
|
3780
|
-
"ui
|
|
3781
|
-
"ui
|
|
3802
|
+
"ui:border-color-divider": color === "divider",
|
|
3803
|
+
"ui:border-color-border": color === "border",
|
|
3804
|
+
"ui:border-neutral-border-high-contrast": color === "high-contrast",
|
|
3805
|
+
"ui:border-neutral-border-low-contrast": color === "low-contrast"
|
|
3782
3806
|
}, className) });
|
|
3783
3807
|
};
|
|
3784
3808
|
const VerticalFlowDivider = (props) => {
|
|
@@ -3857,23 +3881,23 @@ const CheckboxListModal = ({
|
|
|
3857
3881
|
return jsxRuntime.jsxs(Modal, { isOpen, title: texts.title, onCloseClick: handleOnCloseClick, footerTrailingComponents: {
|
|
3858
3882
|
primaryButton: jsxRuntime.jsx(PrimaryButton, { dataTestId: "modal-footer-trailing-primary-button", onClick: handleOnSaveClick, children: texts.confirmLabel }),
|
|
3859
3883
|
secondaryButton: jsxRuntime.jsx(SecondaryButton, { dataTestId: "modal-footer-trailing-secondary-button", onClick: handleOnCloseClick, children: texts.cancelLabel })
|
|
3860
|
-
}, scrollableContent: true, children: [accessory && jsxRuntime.jsxs("div", { className: "ui
|
|
3884
|
+
}, scrollableContent: true, children: [accessory && jsxRuntime.jsxs("div", { className: "ui:mb-6 ui:flex ui:flex-col ui:space-y-6", children: [accessory, jsxRuntime.jsx(Divider, { version: "v2", color: "divider" })] }), isLoadingInitialItems && jsxRuntime.jsx(LoadingIndicator, {}), hasSearch && !isLoadingInitialItems && jsxRuntime.jsx("div", { className: "ui:mb-2", children: jsxRuntime.jsxs("label", { htmlFor: "checkbox-list-search", className: "ui:flex ui:flex-col ui:space-y-2", children: [texts.searchInputLabel && jsxRuntime.jsx(Text, { variant: "strong", children: texts.searchInputLabel }), jsxRuntime.jsx(SearchInput, { id: "checkbox-list-search", width: "full", value: search, placeholder: texts.searchPlaceHolder, onChange: handleOnSearchChange })] }) }), !isLoadingInitialItems && (items === null || items === void 0 ? void 0 : items.length) > 0 && jsxRuntime.jsx(CheckboxList, { groups, onChange: handleOnItemChange }), !isLoadingInitialItems && (items === null || items === void 0 ? void 0 : items.length) === 0 && jsxRuntime.jsx(Text, { text: texts.emptyState })] });
|
|
3861
3885
|
};
|
|
3862
3886
|
|
|
3863
3887
|
const NavLayout = (props) => {
|
|
3864
3888
|
const { patientSidebar = null, isNavDisabled, menu, disableScrolling, pageHeader, children, isInViewer } = props, rest = __rest(props, ["patientSidebar", "isNavDisabled", "menu", "disableScrolling", "pageHeader", "children", "isInViewer"]);
|
|
3865
3889
|
const inViewer = isInViewer;
|
|
3866
|
-
return jsxRuntime.jsxs("div", Object.assign({ "data-test-id": "nav-layout", "data-in-viewer": inViewer, className: "ui
|
|
3867
|
-
"ui
|
|
3890
|
+
return jsxRuntime.jsxs("div", Object.assign({ "data-test-id": "nav-layout", "data-in-viewer": inViewer, className: "ui:mb-3 ui:flex ui:h-full ui:w-full ui:flex-col ui:lg:mb-0 ui:lg:flex-row" }, rest, { children: [!isNavDisabled && jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [menu, patientSidebar] }), jsxRuntime.jsxs("div", { id: "page-main-content", "data-test-id": "page-main-content", className: classNames__default.default([
|
|
3891
|
+
"ui:w-full",
|
|
3868
3892
|
{
|
|
3869
|
-
"ui
|
|
3870
|
-
"ui
|
|
3871
|
-
"ui
|
|
3893
|
+
"ui:overflow-y-auto": !disableScrolling,
|
|
3894
|
+
"ui:max-h-screen": !inViewer,
|
|
3895
|
+
"ui:h-screen": inViewer
|
|
3872
3896
|
}
|
|
3873
3897
|
]), children: [pageHeader && jsxRuntime.jsx("div", { "data-test-id": "nav-layout-page-header", children: pageHeader }), jsxRuntime.jsx("div", { "data-test-id": "page-body", className: classNames__default.default({
|
|
3874
|
-
"ui
|
|
3898
|
+
"ui:px-xl": !!pageHeader,
|
|
3875
3899
|
// assuming this is not set because it's the PatientPages.js
|
|
3876
|
-
"ui
|
|
3900
|
+
"ui:h-full": inViewer
|
|
3877
3901
|
// this allows extra spacing in the small viewport of hix specially when dealing with dropdowns
|
|
3878
3902
|
}), children })] })] }));
|
|
3879
3903
|
};
|
|
@@ -3903,7 +3927,7 @@ function Page({
|
|
|
3903
3927
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: mergedPageClasses, children: /* @__PURE__ */ jsxRuntime.jsx(LoadingIndicator, { asModal: false }) });
|
|
3904
3928
|
}
|
|
3905
3929
|
const maybeTitle = title instanceof Function ? title() : title;
|
|
3906
|
-
const accessoryClasses = classNames__default.default("cweb-page-header ui
|
|
3930
|
+
const accessoryClasses = classNames__default.default("cweb-page-header ui:mb-4", {
|
|
3907
3931
|
[`accessory-${accessoryPosition}`]: true
|
|
3908
3932
|
});
|
|
3909
3933
|
const accessoriesContent = accessories instanceof Function ? accessories() : accessories;
|
|
@@ -3953,8 +3977,8 @@ Page.propTypes = {
|
|
|
3953
3977
|
};
|
|
3954
3978
|
|
|
3955
3979
|
const Step = ({ title, stepNumber, active, localization }) => {
|
|
3956
|
-
const barColor = active ? "ui
|
|
3957
|
-
return jsxRuntime.jsxs("div", { className: "ui
|
|
3980
|
+
const barColor = active ? "ui:bg-primary" : "ui:bg-slate-200";
|
|
3981
|
+
return jsxRuntime.jsxs("div", { className: "ui:w-full", children: [jsxRuntime.jsx("div", { className: `ui:mb-2 ui:h-1 ui:w-full ui:rounded ${barColor}` }), jsxRuntime.jsx(Text, { text: `${localization.step} ${stepNumber}`, type: "strong", color: active ? "blue-800" : "slate-500" }), jsxRuntime.jsx(Text, { text: title, type: "strong" })] });
|
|
3958
3982
|
};
|
|
3959
3983
|
|
|
3960
3984
|
const Steps = ({ orderedStepTitles, currentStep, className, localization }) => {
|
|
@@ -3963,7 +3987,7 @@ const Steps = ({ orderedStepTitles, currentStep, className, localization }) => {
|
|
|
3963
3987
|
{ title: stepTitle, stepNumber: index + 1, active: index + 1 <= currentStep, localization },
|
|
3964
3988
|
`step-${index}-${stepTitle.split(" ")[0]}`
|
|
3965
3989
|
));
|
|
3966
|
-
return jsxRuntime.jsx("div", { className: `ui
|
|
3990
|
+
return jsxRuntime.jsx("div", { className: `ui:flex ui:flex-row ui:justify-items-stretch ui:space-x-6 ${className}`, children: renderedSteps });
|
|
3967
3991
|
};
|
|
3968
3992
|
|
|
3969
3993
|
const isBreadcrumbDividerProps = (subject) => {
|
|
@@ -3975,17 +3999,17 @@ const isBreadcrumbDividerProps = (subject) => {
|
|
|
3975
3999
|
};
|
|
3976
4000
|
|
|
3977
4001
|
const BreadcrumbItem = (props) => {
|
|
3978
|
-
return jsxRuntime.jsx("li", { className: "ui
|
|
4002
|
+
return jsxRuntime.jsx("li", { className: "ui:flex ui:flex-row ui:items-center ui:slash-split", children: jsxRuntime.jsx(BreadcrumbContent, Object.assign({}, props)) });
|
|
3979
4003
|
};
|
|
3980
4004
|
const linkTextProps = {
|
|
3981
4005
|
variant: "base",
|
|
3982
4006
|
color: "blue-800",
|
|
3983
|
-
className: "ui
|
|
4007
|
+
className: "ui:whitespace-nowrap ui:max-w-[320px] ui:truncate"
|
|
3984
4008
|
};
|
|
3985
4009
|
const defaultTextProps = {
|
|
3986
4010
|
variant: "strong",
|
|
3987
4011
|
color: "base",
|
|
3988
|
-
className: "ui
|
|
4012
|
+
className: "ui:whitespace-nowrap ui:w-full ui:max-w-[320px] ui:truncate"
|
|
3989
4013
|
};
|
|
3990
4014
|
const BreadcrumbContent = (_a) => {
|
|
3991
4015
|
var { name, link } = _a, props = __rest(_a, ["name", "link"]);
|
|
@@ -3996,7 +4020,7 @@ const BreadcrumbContent = (_a) => {
|
|
|
3996
4020
|
}) });
|
|
3997
4021
|
};
|
|
3998
4022
|
const BreadcrumbDividerItem = ({ onClick, truncatedCrumbs }) => {
|
|
3999
|
-
return jsxRuntime.jsx("li", { className: "ui
|
|
4023
|
+
return jsxRuntime.jsx("li", { className: "ui:flex ui:flex-row ui:items-center ui:slash-split", children: jsxRuntime.jsx("button", { onClick, title: truncatedCrumbs.map((crumb) => crumb.name).join(" / "), className: "ui:px-1", children: jsxRuntime.jsx(Text, { color: "blue-800", variant: "strong", children: "\u2026" }) }) });
|
|
4000
4024
|
};
|
|
4001
4025
|
|
|
4002
4026
|
const renderBreadcrumbItem = ({ link, name, textProps }) => {
|
|
@@ -4036,16 +4060,16 @@ const Breadcrumbs = ({
|
|
|
4036
4060
|
dividerProps,
|
|
4037
4061
|
...tail
|
|
4038
4062
|
];
|
|
4039
|
-
return jsxRuntime.jsx("ul", { "data-test-id": "breadcrumbs", className: "ui
|
|
4063
|
+
return jsxRuntime.jsx("ul", { "data-test-id": "breadcrumbs", className: "ui:flex ui:flex-row ui:flex-wrap ui:items-center", children: (isTruncated ? crumbsAndDivider : crumbs).map((crumbOrDividerProps) => isBreadcrumbDividerProps(crumbOrDividerProps) ? jsxRuntime.jsx(BreadcrumbDividerItem, Object.assign({}, crumbOrDividerProps), `divider-${truncatedCrumbs.map((crumb) => crumb.name).join("-")}`) : jsxRuntime.jsx(BreadcrumbItem, Object.assign({}, crumbOrDividerProps, { render: renderItem }), crumbOrDividerProps.key || crumbOrDividerProps.name)) });
|
|
4040
4064
|
};
|
|
4041
4065
|
|
|
4042
4066
|
const TabbarItem = ({ title, index, isSelected, onSelect, className, badgeCount = 0, isLoading = false, dataTestId = "" }) => {
|
|
4043
4067
|
const handleTabClick = () => onSelect === null || onSelect === void 0 ? void 0 : onSelect(index);
|
|
4044
|
-
const itemClassName = classNames__default.default("ui
|
|
4045
|
-
"ui
|
|
4046
|
-
"ui
|
|
4068
|
+
const itemClassName = classNames__default.default("ui:flex ui:items-center ui:py-m", "ui:border-b-2 ui:hover:text-primary", "ui:transition ui:ease-in ui:duration-150", className, {
|
|
4069
|
+
"ui:border-b-transparent ui:text-on-surface": !isSelected,
|
|
4070
|
+
"ui:border-b-primary ui:text-primary": isSelected
|
|
4047
4071
|
});
|
|
4048
|
-
return jsxRuntime.jsxs("button", { className: itemClassName, onClick: handleTabClick, "data-test-id": dataTestId, role: "tab", "aria-selected": isSelected, children: [typeof title === "string" ? jsxRuntime.jsx(Text, { variant: "strong", color: "current", as: "span", className: "ui
|
|
4072
|
+
return jsxRuntime.jsxs("button", { className: itemClassName, onClick: handleTabClick, "data-test-id": dataTestId, role: "tab", "aria-selected": isSelected, children: [typeof title === "string" ? jsxRuntime.jsx(Text, { variant: "strong", color: "current", as: "span", className: "ui:leading-inherit", children: title }) : title, badgeCount > 0 && jsxRuntime.jsx(Badge, { className: "ui:ml-1", children: badgeCount }), isLoading && jsxRuntime.jsx(LoadingIndicator, { asSpinner: true, spinnerColor: "gray", className: "ui:w-6" })] });
|
|
4049
4073
|
};
|
|
4050
4074
|
|
|
4051
4075
|
const Tabbar = ({ tabs = [], selectedIndex, onSelect, className }) => {
|
|
@@ -4057,7 +4081,7 @@ const Tabbar = ({ tabs = [], selectedIndex, onSelect, className }) => {
|
|
|
4057
4081
|
setInnerSelectedIndex(index);
|
|
4058
4082
|
onSelect === null || onSelect === void 0 ? void 0 : onSelect({ index, selectedTab: tabs[index] });
|
|
4059
4083
|
};
|
|
4060
|
-
return jsxRuntime.jsx("div", { className: classNames__default.default("ui
|
|
4084
|
+
return jsxRuntime.jsx("div", { className: classNames__default.default("ui:flex ui:w-full ui:gap-xl", className), role: "tablist", children: tabs === null || tabs === void 0 ? void 0 : tabs.map((tabItemProps, index) => {
|
|
4061
4085
|
var _a;
|
|
4062
4086
|
const itemProps = Object.assign({ index, onSelect: handleOnTabSelect, isSelected: innerSelectedIndex === index }, tabItemProps);
|
|
4063
4087
|
return jsxRuntime.jsx(TabbarItem, Object.assign({}, itemProps), (_a = tabItemProps.dataTestId) !== null && _a !== void 0 ? _a : index);
|
|
@@ -4067,51 +4091,51 @@ const Tabbar = ({ tabs = [], selectedIndex, onSelect, className }) => {
|
|
|
4067
4091
|
const PageTitle = (props) => {
|
|
4068
4092
|
const { as: Component = "h2", className } = props, rest = __rest(props, ["as", "className"]);
|
|
4069
4093
|
return jsxRuntime.jsx(Component, Object.assign({}, rest, { className: classNames__default.default(
|
|
4070
|
-
"title-avenir ui
|
|
4094
|
+
"title-avenir ui:text-3xl ui:font-bold ui:antialiased",
|
|
4071
4095
|
/**
|
|
4072
4096
|
* Design calls for a specific line height. Let's see later
|
|
4073
4097
|
* if we should include this in the titles sizing system.
|
|
4074
4098
|
*/
|
|
4075
|
-
"ui
|
|
4076
|
-
"ui
|
|
4099
|
+
"ui:leading-[1.2]",
|
|
4100
|
+
"ui:bg-linear-to-br ui:from-blue-800 ui:to-blue-700 ui:bg-clip-text ui:text-transparent",
|
|
4077
4101
|
className
|
|
4078
4102
|
) }));
|
|
4079
4103
|
};
|
|
4080
4104
|
|
|
4081
4105
|
const PageHeader = ({ navigation, breadcrumbs, dataTestId, accessories, isPolling, title, contained, className, truncateBreadcrumbsAfter, renderBreadcrumbItem, banner }) => {
|
|
4082
4106
|
var _a;
|
|
4083
|
-
const withContained = { "ui
|
|
4107
|
+
const withContained = { "ui:max-w-3xl ui:m-auto": contained };
|
|
4084
4108
|
const hasTabBar = Boolean((_a = navigation === null || navigation === void 0 ? void 0 : navigation.tabs) === null || _a === void 0 ? void 0 : _a.length);
|
|
4085
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { "data-test-id": "page-header", className: classNames__default.default("ui
|
|
4109
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { "data-test-id": "page-header", className: classNames__default.default("ui:pt-xl", className, {
|
|
4086
4110
|
/**
|
|
4087
4111
|
* The tab bar should sit snugly against the bottom of the page header, but
|
|
4088
4112
|
* this is the only exception. Other than that the page header should have
|
|
4089
4113
|
* a bottom padding.
|
|
4090
4114
|
*/
|
|
4091
|
-
"ui
|
|
4092
|
-
"ui
|
|
4093
|
-
"ui
|
|
4094
|
-
}), children: [banner && jsxRuntime.jsx(NotificationBanner, { noBorder: banner.noBorder, color: banner.color, "data-test-id": `page-header-banner-${title}`, className: "ui
|
|
4115
|
+
"ui:pb-l": !hasTabBar,
|
|
4116
|
+
"ui:px-xl": !contained,
|
|
4117
|
+
"ui:w-full": contained
|
|
4118
|
+
}), children: [banner && jsxRuntime.jsx(NotificationBanner, { noBorder: banner.noBorder, color: banner.color, "data-test-id": `page-header-banner-${title}`, className: "ui:mb-m", icon: banner.icon, children: jsxRuntime.jsxs("div", { className: "ui:flex ui:flex-col", children: [banner.title && jsxRuntime.jsx(Text, { color: "current", variant: "strong", children: banner.title }), jsxRuntime.jsx(Text, { color: "current", containsDangerousHtml: banner.text.isHTML, children: banner.text.content })] }) }), jsxRuntime.jsxs("div", { className: classNames__default.default({ "ui:flex ui:flex-col": !contained }), children: [!!(breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length) && jsxRuntime.jsx("div", { className: classNames__default.default("ui:mb-m", withContained), children: jsxRuntime.jsx(Breadcrumbs, { crumbs: breadcrumbs, truncateAfter: truncateBreadcrumbsAfter, renderItem: renderBreadcrumbItem }) }), jsxRuntime.jsxs("div", { className: classNames__default.default("ui:flex ui:flex-row ui:items-center ui:justify-between", withContained), children: [jsxRuntime.jsxs("div", { className: "ui:flex ui:flex-row ui:items-center ui:gap-xxs", children: [typeof title === "string" ? jsxRuntime.jsx(PageTitle, { "data-test-id": `${dataTestId}-title`, children: title }) : jsxRuntime.jsx(Box, { width: "full", children: title }), isPolling && jsxRuntime.jsx(LoadingIndicator, { asSpinner: true, className: "page-spinner", spinnerColor: "gray" })] }), accessories && jsxRuntime.jsx("div", { "data-test-id": "page-header-accessories", children: accessories })] })] }), navigation && jsxRuntime.jsx(Tabbar, Object.assign({}, navigation, { className: classNames__default.default(navigation.className, withContained) }))] }), jsxRuntime.jsx(Divider, { version: "v2" })] });
|
|
4095
4119
|
};
|
|
4096
4120
|
|
|
4097
4121
|
const CRUDPage = ({ submitButtonProps, cancelButtonProps, className, children, isLoading, isSubmitting, dataTestId = "page", title, header, steps, isMobileFriendly, belowHeader }) => {
|
|
4098
|
-
const mergedClasses = classNames__default.default("cweb-crud-page", "ui
|
|
4122
|
+
const mergedClasses = classNames__default.default("cweb-crud-page", "ui:w-full ui:mb-0 ui:mx-auto ui:pb-8", className);
|
|
4099
4123
|
const submitButton = submitButtonProps && jsxRuntime.jsx(PrimaryButton, Object.assign({ "data-test-id": "submit-button", role: "primary", isPending: isSubmitting }, submitButtonProps), "submit-button");
|
|
4100
4124
|
const cancelButton = cancelButtonProps && jsxRuntime.jsx(TertiaryButton, Object.assign({ "data-test-id": "cancel-button", role: "secondary" }, cancelButtonProps), "cancel-button");
|
|
4101
4125
|
if (isLoading) {
|
|
4102
|
-
return jsxRuntime.jsx("div", { className: "cweb-crud-page-container", "data-test-id": dataTestId, children: jsxRuntime.jsxs("div", { className: classNames__default.default(mergedClasses, "ui
|
|
4126
|
+
return jsxRuntime.jsx("div", { className: "cweb-crud-page-container", "data-test-id": dataTestId, children: jsxRuntime.jsxs("div", { className: classNames__default.default(mergedClasses, "ui:relative ui:overflow-y-hidden", "cweb-crud-page-loading-container"), style: { height: "90vh" }, children: [jsxRuntime.jsx(PageHeaderBlock, { header, title }), jsxRuntime.jsx(LoadingIndicator, { className: classNames__default.default("crud-page-loader", "ui:absolute ui:bottom-0 ui:left-0 ui:right-0 ui:top-0 ui:m-auto ui:h-12 ui:w-12"), asModal: false })] }) });
|
|
4103
4127
|
}
|
|
4104
4128
|
return jsxRuntime.jsx("div", { className: classNames__default.default("cweb-crud-page-container", {
|
|
4105
|
-
"ui
|
|
4106
|
-
}), "data-test-id": dataTestId, children: jsxRuntime.jsxs("div", { className: mergedClasses, "data-test-id": dataTestId, children: [jsxRuntime.jsx(PageHeaderBlock, { header, title }), belowHeader, jsxRuntime.jsx("div", { className: "ui
|
|
4129
|
+
"ui:h-screen ui:overflow-y-auto": isMobileFriendly
|
|
4130
|
+
}), "data-test-id": dataTestId, children: jsxRuntime.jsxs("div", { className: mergedClasses, "data-test-id": dataTestId, children: [jsxRuntime.jsx(PageHeaderBlock, { header, title }), belowHeader, jsxRuntime.jsx("div", { className: "ui:flex ui:justify-center", children: jsxRuntime.jsxs("div", { className: classNames__default.default(
|
|
4107
4131
|
"cweb-crud-page-form-container",
|
|
4108
|
-
"ui
|
|
4132
|
+
"ui:w-full ui:max-w-3xl ui:rounded ui:bg-white ui:p-6",
|
|
4109
4133
|
/**
|
|
4110
4134
|
* If the belowHeader component is passed, there is no need for the extra margin,
|
|
4111
4135
|
* since the spacing needed will be occupied by the `belowHeader` component itself.
|
|
4112
4136
|
*/
|
|
4113
|
-
{ "ui
|
|
4114
|
-
), children: [steps && jsxRuntime.jsx(Steps, { className: "ui
|
|
4137
|
+
{ "ui:mt-xl": !belowHeader }
|
|
4138
|
+
), children: [steps && jsxRuntime.jsx(Steps, { className: "ui:mb-4", orderedStepTitles: steps.titles, currentStep: steps.currentStep, localization: steps.localization }), children, jsxRuntime.jsx(Line, { left: [submitButton, cancelButton], className: classNames__default.default("cweb-crud-page-button-line", "ui:mt-4 ui:border-t ui:border-solid ui:border-color-divider ui:pt-4") })] }) })] }) });
|
|
4115
4139
|
};
|
|
4116
4140
|
const PageHeaderBlock = ({ header, title }) => {
|
|
4117
4141
|
if (!title && !header) {
|
|
@@ -4119,7 +4143,7 @@ const PageHeaderBlock = ({ header, title }) => {
|
|
|
4119
4143
|
}
|
|
4120
4144
|
let pageHeaderComponent = null;
|
|
4121
4145
|
if (title) {
|
|
4122
|
-
pageHeaderComponent = jsxRuntime.jsx("div", { className: "ui
|
|
4146
|
+
pageHeaderComponent = jsxRuntime.jsx("div", { className: "ui:align-center ui:flex ui:flex-row ui:justify-start", children: jsxRuntime.jsx(PageHeader, { banner: null, title: jsxRuntime.jsxs("div", { className: "ui:flex ui:flex-nowrap ui:items-center ui:gap-m", children: [title.icon && jsxRuntime.jsx("img", { id: "title-icon", src: title.icon, className: "ui:h-9 ui:w-9", alt: "title icon" }), jsxRuntime.jsx(PageTitle, { children: title.text })] }) }) });
|
|
4123
4147
|
}
|
|
4124
4148
|
if (header) {
|
|
4125
4149
|
if (header.breadcrumbs !== void 0 && header.renderBreadcrumbItem !== void 0) {
|
|
@@ -4128,7 +4152,7 @@ const PageHeaderBlock = ({ header, title }) => {
|
|
|
4128
4152
|
pageHeaderComponent = jsxRuntime.jsx(PageHeader, Object.assign({}, header, { breadcrumbs: void 0, renderBreadcrumbItem: void 0 }));
|
|
4129
4153
|
}
|
|
4130
4154
|
}
|
|
4131
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "ui
|
|
4155
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "ui:align-center ui:flex ui:flex-row ui:justify-start", children: pageHeaderComponent }), jsxRuntime.jsx(Divider, { version: "v2" })] });
|
|
4132
4156
|
};
|
|
4133
4157
|
|
|
4134
4158
|
var img = "data:image/svg+xml,%3csvg width='340' height='638' viewBox='0 0 340 638' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3crect x='8' y='60' width='50' height='8' rx='4' transform='rotate(90 8 60)' fill='%23111827'/%3e %3crect x='8' y='118' width='50' height='8' rx='4' transform='rotate(90 8 118)' fill='%23111827'/%3e %3crect x='340' y='67' width='30' height='8' rx='4' transform='rotate(90 340 67)' fill='%23111827'/%3e %3cpath fill-rule='evenodd' clip-rule='evenodd' d='M36 0C18.3269 0 4 14.3269 4 32V606C4 623.673 18.3269 638 36 638H304C321.673 638 336 623.673 336 606V32C336 14.3269 321.673 0 304 0H36ZM28 43C23.5817 43 20 46.5817 20 51V549C20 553.418 23.5817 557 28 557H312C316.418 557 320 553.418 320 549V51C320 46.5817 316.418 43 312 43H28Z' fill='%23374151'/%3e %3ccircle cx='171' cy='598' r='16' fill='%236B7280'/%3e %3ccircle cx='105.5' cy='22.5' r='4.5' fill='%236B7280'/%3e %3crect x='118' y='18' width='104' height='9' rx='4' fill='%239CA3AF'/%3e%3c/svg%3e";
|
|
@@ -4171,11 +4195,11 @@ const PreviewPhone = ({ className, children }) => {
|
|
|
4171
4195
|
const widthScale = containerWidth < phoneWidth ? containerWidth / phoneWidth : 1;
|
|
4172
4196
|
setScale(heightScale < widthScale ? heightScale : widthScale);
|
|
4173
4197
|
}, [windowHeight, windowWidth]);
|
|
4174
|
-
return showPhone ? jsxRuntime.jsx("div", { ref: containerCallbak, className: classNames__default.default("ui
|
|
4198
|
+
return showPhone ? jsxRuntime.jsx("div", { ref: containerCallbak, className: classNames__default.default("ui:relative ui:flex ui:h-full ui:items-center ui:justify-center", className), children: jsxRuntime.jsxs("div", { className: "ui:absolute", style: {
|
|
4175
4199
|
width: phoneWidth,
|
|
4176
4200
|
height: phoneHeight,
|
|
4177
4201
|
transform: `scale(${scale})`
|
|
4178
|
-
}, children: [jsxRuntime.jsx("div", { className: "ui
|
|
4202
|
+
}, children: [jsxRuntime.jsx("div", { className: "ui:h-full ui:px-5 ui:pb-20 ui:pt-11", children: jsxRuntime.jsx("div", { className: "ui:h-full ui:overflow-y-auto ui:bg-white", children }) }), jsxRuntime.jsx("img", { className: "ui:pointer-events-none ui:absolute ui:top-0", src: img, alt: "phone mockup" })] }) }) : jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
4179
4203
|
};
|
|
4180
4204
|
|
|
4181
4205
|
var css_248z$6 = "/**\n * --- DEPRECATED ---\n * DON'T USE ANYTHING FROM THIS FILE IN FUTURE CHANGES. WE SHOULD BE\n * USING TAILWIND CLASSES DIRECTLY IN OUR COMPONENTS.\n */\n.cweb-radio {\n outline: none;\n}\n.cweb-radio .cweb-radio-input {\n -webkit-appearance: none;\n height: 1px;\n opacity: 0;\n width: 1px;\n}\n.cweb-radio .cweb-radio-label-text {\n margin-left: 8px;\n user-select: none;\n text-align: left;\n}\n.cweb-radio .cweb-radio-label {\n display: flex;\n align-items: center;\n margin-bottom: 0;\n}\n.cweb-radio .cweb-radio-icon-container {\n width: 16px;\n height: 16px;\n position: relative;\n border: 1px solid #cccccc;\n border-radius: 50%;\n transition: background-color 0.3s ease-in-out;\n}\n.cweb-radio .cweb-radio-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: block;\n}\n.cweb-radio.is-focused .cweb-radio-icon-container {\n border-color: #1e40af;\n}\n.cweb-radio.is-checked .cweb-radio-icon {\n width: 5px;\n height: 5px;\n background-color: #ffffff;\n border-radius: 50%;\n}";
|
|
@@ -4210,10 +4234,10 @@ class Radio extends React.PureComponent {
|
|
|
4210
4234
|
render() {
|
|
4211
4235
|
const { className, isChecked, isDisabled, name, value, text } = this.props;
|
|
4212
4236
|
const { isFocused } = this.state;
|
|
4213
|
-
const containerClassName = classNames__default.default("cweb-radio ui
|
|
4237
|
+
const containerClassName = classNames__default.default("cweb-radio ui:mr-4", className, {
|
|
4214
4238
|
"is-focused": isFocused,
|
|
4215
4239
|
"is-checked": isChecked,
|
|
4216
|
-
"ui
|
|
4240
|
+
"ui:opacity-50": isDisabled
|
|
4217
4241
|
});
|
|
4218
4242
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: containerClassName, ref: this.containerRef, children: /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "cweb-radio-label", children: [
|
|
4219
4243
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4234,11 +4258,11 @@ class Radio extends React.PureComponent {
|
|
|
4234
4258
|
"span",
|
|
4235
4259
|
{
|
|
4236
4260
|
className: classNames__default.default("cweb-radio-icon-container", {
|
|
4237
|
-
"ui
|
|
4238
|
-
"hover:
|
|
4239
|
-
"ui
|
|
4240
|
-
"ui
|
|
4241
|
-
"ui
|
|
4261
|
+
"ui:bg-primary": isChecked,
|
|
4262
|
+
"ui:hover:bg-primary-dark": isChecked,
|
|
4263
|
+
"ui:outline-primary": isFocused,
|
|
4264
|
+
"ui:cursor-not-allowed": isDisabled,
|
|
4265
|
+
"ui:cursor-pointer": !isDisabled
|
|
4242
4266
|
}),
|
|
4243
4267
|
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "cweb-radio-icon" })
|
|
4244
4268
|
}
|
|
@@ -4247,7 +4271,7 @@ class Radio extends React.PureComponent {
|
|
|
4247
4271
|
Text,
|
|
4248
4272
|
{
|
|
4249
4273
|
className: classNames__default.default("cweb-radio-label-text", {
|
|
4250
|
-
"ui
|
|
4274
|
+
"ui:cursor-not-allowed": isDisabled
|
|
4251
4275
|
}),
|
|
4252
4276
|
text
|
|
4253
4277
|
}
|
|
@@ -4321,13 +4345,13 @@ const SectionHeader = ({ title, aside, isLoading = false }) => {
|
|
|
4321
4345
|
};
|
|
4322
4346
|
|
|
4323
4347
|
const SectionFooter = ({ children }) => {
|
|
4324
|
-
return jsxRuntime.jsx(Stack, { as: "footer", width: "full", p: "m", className: "ui
|
|
4348
|
+
return jsxRuntime.jsx(Stack, { as: "footer", width: "full", p: "m", className: "ui:border-t-slate-200", children });
|
|
4325
4349
|
};
|
|
4326
4350
|
|
|
4327
4351
|
const Section = (_a) => {
|
|
4328
4352
|
var { title, footer, children, headerAside, className, isLoading = false, headerTitle } = _a, restProps = __rest(_a, ["title", "footer", "children", "headerAside", "className", "isLoading", "headerTitle"]);
|
|
4329
|
-
return jsxRuntime.jsxs(Stack, Object.assign({ as: "section", "aria-label": title, title, width: "full", className: classNames__default.default("ui
|
|
4330
|
-
"ui
|
|
4353
|
+
return jsxRuntime.jsxs(Stack, Object.assign({ as: "section", "aria-label": title, title, width: "full", className: classNames__default.default("ui:rounded-lg ui:bg-white", className) }, restProps, { children: [(title || headerAside || headerTitle) && jsxRuntime.jsx(SectionHeader, { title: headerTitle || title, aside: headerAside, isLoading }), jsxRuntime.jsx(Box, { width: "full", className: classNames__default.default({
|
|
4354
|
+
"ui:border-t ui:border-t-slate-200": children
|
|
4331
4355
|
}), children: isLoading ? null : children }), footer && jsxRuntime.jsx(SectionFooter, { children: footer })] }));
|
|
4332
4356
|
};
|
|
4333
4357
|
|
|
@@ -4344,8 +4368,8 @@ const SectionItem = (props) => {
|
|
|
4344
4368
|
|
|
4345
4369
|
function SectionItemWithContent(props) {
|
|
4346
4370
|
const { text, icon, className, iconClass, onClick } = props, rest = __rest(props, ["text", "icon", "className", "iconClass", "onClick"]);
|
|
4347
|
-
const mergedClasses = classNames__default.default("cweb-section-ui
|
|
4348
|
-
const iconClasses = classNames__default.default("ui
|
|
4371
|
+
const mergedClasses = classNames__default.default("cweb-section-ui:bg-item", className);
|
|
4372
|
+
const iconClasses = classNames__default.default("ui:w-6 ui:h-6 ui:mr-4", iconClass);
|
|
4349
4373
|
return jsxRuntime.jsxs(SectionItem, Object.assign({ className: mergedClasses, onClick }, rest, { children: [icon && jsxRuntime.jsx("img", { className: iconClasses, src: icon, alt: "" }), jsxRuntime.jsx(Text, { text })] }));
|
|
4350
4374
|
}
|
|
4351
4375
|
|
|
@@ -4357,32 +4381,32 @@ const StyledSelect = React__namespace.default.forwardRef((_a, ref) => {
|
|
|
4357
4381
|
const hasPrefix = !!prefix;
|
|
4358
4382
|
const hasSuffix = !!suffix;
|
|
4359
4383
|
const hasNoExtraContent = !hasPrefix && !hasSuffix;
|
|
4360
|
-
return jsxRuntime.jsxs(FlexRow, { spacing: "none", "data-test-id": "input-component-container", stretch: false, children: [jsxRuntime.jsx("span", { className: classNames__default.default("ui
|
|
4361
|
-
"ui
|
|
4362
|
-
"ui
|
|
4363
|
-
"ui
|
|
4364
|
-
"ui
|
|
4365
|
-
}, "ui
|
|
4366
|
-
"ui
|
|
4367
|
-
}), children: [jsxRuntime.jsx("select", Object.assign({ ref, className: classNames__default.default("styled-select", "ui
|
|
4368
|
-
"ui
|
|
4369
|
-
"ui
|
|
4370
|
-
"ui
|
|
4371
|
-
"hover:
|
|
4372
|
-
"ui
|
|
4373
|
-
"focus:
|
|
4374
|
-
"focus:
|
|
4375
|
-
"focus:
|
|
4376
|
-
"ui
|
|
4377
|
-
}, "ui
|
|
4378
|
-
"ui
|
|
4379
|
-
"ui
|
|
4380
|
-
"ui
|
|
4381
|
-
"ui
|
|
4382
|
-
"ui
|
|
4383
|
-
}, "ui
|
|
4384
|
+
return jsxRuntime.jsxs(FlexRow, { spacing: "none", "data-test-id": "input-component-container", stretch: false, children: [jsxRuntime.jsx("span", { className: classNames__default.default("ui:h-11 ui:border-b ui:border-t ui:border-solid ui:border-input-border", {
|
|
4385
|
+
"ui:hidden": hasNoExtraContent,
|
|
4386
|
+
"ui:order-1": hasSuffix,
|
|
4387
|
+
"ui:rounded-l ui:border-l": hasPrefix,
|
|
4388
|
+
"ui:rounded-r ui:border-r": hasSuffix
|
|
4389
|
+
}, "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", {
|
|
4390
|
+
"ui:flex ui:grow": width === "full"
|
|
4391
|
+
}), children: [jsxRuntime.jsx("select", Object.assign({ ref, className: classNames__default.default("styled-select", "ui:block ui:min-w-[4rem]", calculateResponsiveWidthClasses(width), {
|
|
4392
|
+
"ui:bg-slate-50 ui:text-slate-400": attributes.disabled,
|
|
4393
|
+
"ui:text-slate-800": !attributes.disabled,
|
|
4394
|
+
"ui:border-input-border": !attributes.disabled && !isError,
|
|
4395
|
+
"ui:hover:border-input-border-dark": !attributes.disabled,
|
|
4396
|
+
"ui:border-red-700": isError,
|
|
4397
|
+
"ui:focus:outline-negative": isError,
|
|
4398
|
+
"ui:focus:border-primary": !isError,
|
|
4399
|
+
"ui:focus:outline-primary": !isError,
|
|
4400
|
+
"ui:bg-white": !attributes.disabled
|
|
4401
|
+
}, "ui:h-11", "ui:p-2", "ui:border", "ui:text-base ui:sm:text-sm", "ui:placeholder-slate-500", "ui:border-solid", "ui:transition-colors", "ui:duration-300", {
|
|
4402
|
+
"ui:rounded": hasNoExtraContent,
|
|
4403
|
+
"ui:rounded-l": hasSuffix,
|
|
4404
|
+
"ui:rounded-r": hasPrefix,
|
|
4405
|
+
"ui:order-2": hasPrefix,
|
|
4406
|
+
"ui:order-1": hasSuffix
|
|
4407
|
+
}, "ui:shadow-default", className) }, attributes, { children })), jsxRuntime.jsx("div", { className: "ui:pointer-events-none ui:absolute ui:right-0 ui:top-1/2", style: {
|
|
4384
4408
|
transform: "translateY(-50%)"
|
|
4385
|
-
}, children: jsxRuntime.jsx(ChevronDownIcon, { className: classNames__default.default("ui
|
|
4409
|
+
}, children: jsxRuntime.jsx(ChevronDownIcon, { className: classNames__default.default("ui:mr-3 ui:h-6 ui:w-6 ui:bg-white ui:text-slate-300") }) })] })] });
|
|
4386
4410
|
});
|
|
4387
4411
|
|
|
4388
4412
|
const LabeledSelect = React__namespace.default.forwardRef((props, ref) => {
|
|
@@ -4432,17 +4456,17 @@ const SettingsMenuButton = (props) => {
|
|
|
4432
4456
|
console.error("An icon component is required to use this component, please make sure to pass it as a prop. ");
|
|
4433
4457
|
return jsxRuntime.jsx("span", { children: "Invalid props passed to this component." });
|
|
4434
4458
|
}
|
|
4435
|
-
return jsxRuntime.jsxs("div", { onClick: handleShowMenu, className: "ui
|
|
4436
|
-
"
|
|
4437
|
-
"
|
|
4438
|
-
"
|
|
4439
|
-
"
|
|
4440
|
-
"ui
|
|
4459
|
+
return jsxRuntime.jsxs("div", { onClick: handleShowMenu, className: "ui:relative", children: [jsxRuntime.jsx(TertiaryButton, { icon: iconComponent, onClick: handleShowMenu, text: buttonTitle, role: "tertiary" }), jsxRuntime.jsxs("div", { ref: menuRef, className: classNames__default.default("ui:transform ui:cursor-default ui:transition-all ui:duration-300", "ui:absolute ui:-top-1 ui:z-30", "ui:max-h-78 ui:w-80 ui:overflow-y-auto ui:rounded", "ui:bg-white ui:shadow-md", "ui:border ui:border-slate-300", {
|
|
4460
|
+
"ui:-left-54": shiftMenuTo === "left",
|
|
4461
|
+
"ui:-right-54": shiftMenuTo === "right",
|
|
4462
|
+
"ui:-left-68": shiftMenuTo === "left-md",
|
|
4463
|
+
"ui:-right-68": shiftMenuTo === "right-md",
|
|
4464
|
+
"ui:left-1/2 ui:-translate-x-1/2 ui:transform": !shiftMenuTo
|
|
4441
4465
|
// centering the menu in the Y axis of the button
|
|
4442
4466
|
}, {
|
|
4443
|
-
"ui
|
|
4444
|
-
"ui
|
|
4445
|
-
}), children: [menuTitle && jsxRuntime.jsx("div", { className: "ui
|
|
4467
|
+
"ui:pointer-events-none ui:opacity-0": !showMenu,
|
|
4468
|
+
"ui:opacity-100": showMenu
|
|
4469
|
+
}), children: [menuTitle && jsxRuntime.jsx("div", { className: "ui:h-11 ui:w-full ui:bg-slate-50 ui:p-3", children: jsxRuntime.jsx(Text, { type: "sm", className: "ui:uppercase", text: menuTitle }) }), innerConfiguration.map((innerConfig) => jsxRuntime.jsxs("div", { className: "ui:flex ui:h-11 ui:w-full ui:items-center ui:justify-between ui:p-3", children: [jsxRuntime.jsx(Text, { text: innerConfig.itemName }), jsxRuntime.jsx(Checkbox, { name: innerConfig.itemName, id: innerConfig.itemId, type: "switch", isChecked: innerConfig.on, onChange: handleOnVisibilitySwitchChanged })] }, innerConfig.itemId))] })] });
|
|
4446
4470
|
};
|
|
4447
4471
|
|
|
4448
4472
|
var css_248z$2 = "/**\n * --- DEPRECATED ---\n * DON'T USE ANYTHING FROM THIS FILE IN FUTURE CHANGES. WE SHOULD BE\n * USING TAILWIND CLASSES DIRECTLY IN OUR COMPONENTS.\n */\n.cweb-switcher-item {\n display: flex;\n justify-content: center;\n flex-direction: row;\n align-items: center;\n}\n.cweb-switcher-item .cweb-switcher-item-link {\n display: flex;\n align-items: center;\n text-decoration: none;\n padding: 0.5rem 1rem;\n cursor: pointer;\n}\n.cweb-switcher-item .cweb-switcher-item-link .cweb-switcher-item-link-icon {\n display: flex;\n align-items: center;\n}\n.cweb-switcher-item .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-default,\n.cweb-switcher-item .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-active {\n width: 20px;\n height: 20px;\n}\n.cweb-switcher-item .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-active {\n display: none;\n}\n.cweb-switcher-item .cweb-switcher-item-link .cweb-switcher-item-link-text {\n color: #737373;\n transition: color 0.4s ease;\n padding-bottom: 0;\n}\n.cweb-switcher-item .cweb-switcher-item-link .cweb-switcher-item-link-icon + .cweb-switcher-item-link-text {\n margin-left: 8px;\n padding: 0;\n}\n.cweb-switcher-item.is-selected, .cweb-switcher-item:hover, .cweb-switcher-item:active {\n border-color: #1e40af;\n z-index: 1;\n}\n.cweb-switcher-item.is-selected .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-default, .cweb-switcher-item:hover .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-default, .cweb-switcher-item:active .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-default {\n display: none;\n}\n.cweb-switcher-item.is-selected .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-active, .cweb-switcher-item:hover .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-active, .cweb-switcher-item:active .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-active {\n display: inherit;\n}\n.cweb-switcher-item.is-selected .cweb-switcher-item-link .cweb-switcher-item-link-text, .cweb-switcher-item:hover .cweb-switcher-item-link .cweb-switcher-item-link-text, .cweb-switcher-item:active .cweb-switcher-item-link .cweb-switcher-item-link-text {\n color: #1e40af;\n}\n.cweb-switcher-item.is-disabled {\n pointer-events: none;\n}";
|
|
@@ -4472,11 +4496,11 @@ function SwitcherItem({
|
|
|
4472
4496
|
const itemClassName = classNames__default.default(
|
|
4473
4497
|
"",
|
|
4474
4498
|
className,
|
|
4475
|
-
"ui
|
|
4476
|
-
"first:
|
|
4499
|
+
"ui:flex ui:flex-row ui:h-11 ui:p-2 ui:items-center ui:border-solid ui:border-t ui:border-b ui:border-l ui:border-slate-200 ui:transition ui:duration-300 ui:cursor-pointer",
|
|
4500
|
+
"ui:first:rounded-l-xl ui:last:rounded-r-xl ui:last:border-r",
|
|
4477
4501
|
{
|
|
4478
|
-
"ui
|
|
4479
|
-
"ui
|
|
4502
|
+
"ui:bg-slate-100 ui:text-slate-500": isSelected,
|
|
4503
|
+
"ui:bg-slate-50 ui:hover:bg-slate-100 ui:hover:text-slate-500 ui:text-slate-300": !isSelected
|
|
4480
4504
|
}
|
|
4481
4505
|
);
|
|
4482
4506
|
let calculatedIcon;
|
|
@@ -4486,8 +4510,8 @@ function SwitcherItem({
|
|
|
4486
4510
|
calculatedIcon = isSelected ? icon.active : icon.default;
|
|
4487
4511
|
}
|
|
4488
4512
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: itemClassName, onClick: handleItemClick, children: [
|
|
4489
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ui
|
|
4490
|
-
icon?.showBadge && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ui
|
|
4513
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ui:relative ui:block", children: [
|
|
4514
|
+
icon?.showBadge && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ui:absolute ui:right-0 ui:top-0 ui:h-2.5 ui:w-2.5 ui:rounded-xl ui:border-2 ui:border-slate-50 ui:bg-red-400" }),
|
|
4491
4515
|
calculatedIcon
|
|
4492
4516
|
] }),
|
|
4493
4517
|
name && /* @__PURE__ */ jsxRuntime.jsx(Text, { text: name, color: isSelected ? "base" : "gray-500" })
|
|
@@ -4514,7 +4538,7 @@ function Switcher({
|
|
|
4514
4538
|
className: classNames__default.default(
|
|
4515
4539
|
"cweb-switcher",
|
|
4516
4540
|
className,
|
|
4517
|
-
"ui
|
|
4541
|
+
"ui:m-0 ui:flex ui:list-none ui:p-0"
|
|
4518
4542
|
),
|
|
4519
4543
|
"data-test-id": "switcher-container",
|
|
4520
4544
|
children: items.map((item, index) => {
|
|
@@ -4558,23 +4582,23 @@ const Switch = (props) => {
|
|
|
4558
4582
|
onChange === null || onChange === void 0 ? void 0 : onChange(checkedChanged);
|
|
4559
4583
|
};
|
|
4560
4584
|
const enabled = !disabled;
|
|
4561
|
-
return jsxRuntime.jsx(RadixSwitch__namespace.Root, { id, name, checked, disabled, onCheckedChange: handleChange, className: classNames__default.default("ui
|
|
4562
|
-
"ui
|
|
4563
|
-
"ui
|
|
4564
|
-
"ui
|
|
4565
|
-
"ui
|
|
4566
|
-
}), children: jsxRuntime.jsx(RadixSwitch__namespace.Thumb, { className: classNames__default.default("ui
|
|
4585
|
+
return jsxRuntime.jsx(RadixSwitch__namespace.Root, { id, name, checked, disabled, onCheckedChange: handleChange, className: classNames__default.default("ui:h-[28px] ui:w-[56px]", "ui:relative ui:rounded-full ui:outline-none", {
|
|
4586
|
+
"ui:cursor-pointer": enabled,
|
|
4587
|
+
"ui:cursor-not-allowed": disabled,
|
|
4588
|
+
"ui:bg-secondary-dark ui:data-[state=checked]:bg-green-400": enabled,
|
|
4589
|
+
"ui:bg-slate-200": disabled
|
|
4590
|
+
}), children: jsxRuntime.jsx(RadixSwitch__namespace.Thumb, { className: classNames__default.default("ui:h-[20px] ui:w-[20px]", "ui:bg-white", "ui:transition-transform ui:duration-100 ui:will-change-transform", "ui:translate-x-1 ui:data-[state=checked]:translate-x-[32px]", "ui:block ui:rounded-full") }) });
|
|
4567
4591
|
};
|
|
4568
4592
|
|
|
4569
4593
|
const ImageCategory = (props) => {
|
|
4570
|
-
return jsxRuntime.jsxs("div", { className: "ui
|
|
4594
|
+
return jsxRuntime.jsxs("div", { className: "ui:mt-4 ui:w-full", children: [jsxRuntime.jsx(Text, { text: props.category.key }), jsxRuntime.jsx("div", { className: "ui:flex ui:flex-row ui:flex-wrap", children: props.images.map((option, index) => {
|
|
4571
4595
|
const isSelected = option === props.highlightedImage;
|
|
4572
|
-
return jsxRuntime.jsx("button", { "data-test-id": `image-from-selector-${index.toString().padStart(2, "0")}`, "data-index": index, "data-src": option, onClick: props.handleImageClick, className: classNames__default.default("ui
|
|
4573
|
-
"ui
|
|
4574
|
-
"ui
|
|
4575
|
-
"ui
|
|
4576
|
-
}), children: jsxRuntime.jsx(Image$1, { className: "ui
|
|
4577
|
-
"ui
|
|
4596
|
+
return jsxRuntime.jsx("button", { "data-test-id": `image-from-selector-${index.toString().padStart(2, "0")}`, "data-index": index, "data-src": option, onClick: props.handleImageClick, className: classNames__default.default("ui:m-2 ui:rounded ui:border ui:border-solid ui:border-slate-300 ui:p-2", {
|
|
4597
|
+
"ui:outline ui:outline-primary": isSelected,
|
|
4598
|
+
"ui:h-11 ui:w-11": props.isTypeCompact,
|
|
4599
|
+
"ui:h-22 ui:w-36": !props.isTypeCompact
|
|
4600
|
+
}), children: jsxRuntime.jsx(Image$1, { className: "ui:h-full ui:w-full ui:rounded", src: option, wrapperClassName: classNames__default.default({
|
|
4601
|
+
"ui:h-full ui:w-full": !props.isTypeCompact
|
|
4578
4602
|
}) }) }, option);
|
|
4579
4603
|
}) })] });
|
|
4580
4604
|
};
|
|
@@ -4687,23 +4711,23 @@ const ImagePickerInner = ({
|
|
|
4687
4711
|
}
|
|
4688
4712
|
});
|
|
4689
4713
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(FlexContainer, { type: isTypeCompact ? "row" : "column", horizontalSpacing: isTypeCompact ? "small" : "none", verticalSpacing: !isTypeCompact ? "small" : "none", children: [selectedMedia && jsxRuntime.jsxs("div", { className: classNames__default.default({
|
|
4690
|
-
"ui
|
|
4691
|
-
"ui
|
|
4692
|
-
}), children: [isUploading && jsxRuntime.jsx(LoadingIndicator, { className: "ui
|
|
4693
|
-
"ui
|
|
4714
|
+
"ui:h-11 ui:w-11 ui:shrink-0 ui:rounded-full ui:bg-secondary ui:p-3": isTypeCompact,
|
|
4715
|
+
"ui:h-44 ui:w-full": !isTypeCompact
|
|
4716
|
+
}), children: [isUploading && jsxRuntime.jsx(LoadingIndicator, { className: "ui:my-16" }), !isUploading && selectedMediaType === "image" && jsxRuntime.jsx(Image$1, { className: classNames__default.default("ui:h-full ui:w-full", {
|
|
4717
|
+
"ui:rounded ui:bg-secondary ui:object-contain ui:p-3": !isTypeCompact
|
|
4694
4718
|
}), src: selectedMedia, wrapperClassName: classNames__default.default({
|
|
4695
|
-
"ui
|
|
4696
|
-
}) }), !isUploading && !isErrorUploading && selectedMediaType === "video" && jsxRuntime.jsx("video", { className: classNames__default.default("ui
|
|
4697
|
-
"ui
|
|
4698
|
-
"ui
|
|
4719
|
+
"ui:w-full ui:h-full": !isTypeCompact
|
|
4720
|
+
}) }), !isUploading && !isErrorUploading && selectedMediaType === "video" && jsxRuntime.jsx("video", { className: classNames__default.default("ui:h-full", {
|
|
4721
|
+
"ui:w-full ui:rounded ui:bg-secondary ui:object-contain ui:p-3": !isTypeCompact,
|
|
4722
|
+
"ui:w-full": isTypeCompact
|
|
4699
4723
|
}), src: selectedMedia, playsInline: true, controls: true, disablePictureInPicture: true, preload: "none", poster: placeholderImage, children: "There is a video, but your browser doesn't support showing the video." }), selectedMediaType !== "image" && selectedMediaType !== "video" && jsxRuntime.jsx(NotificationBanner, { color: "blue", icon: InfoIcon, children: jsxRuntime.jsx(Text, { children: (_a = localisation.unsupportedMediaType) !== null && _a !== void 0 ? _a : "File uploaded successfully but preview not supported." }) })] }), error && jsxRuntime.jsx(NotificationBanner, { color: "red", icon: ExclamationMarkIcon, children: jsxRuntime.jsx(Text, { children: error }) }), jsxRuntime.jsxs(FlexRow, { spacing: "small", children: [jsxRuntime.jsx(SecondaryButton, { "data-test-id": `image-picker-${name}`, id: `image-picker-${name}`, isDisabled, className: "cweb-imagePicker-change", text: localisation.openModalButton, onClick: () => setIsImagesPanelOpen(true), ref: innerRef }), isUploadButtonVisible && jsxRuntime.jsxs("span", { className: "cweb-imagePicker-upload", children: [jsxRuntime.jsx(SecondaryButton, { text: localisation.uploadImage, isDisabled, isPending: isUploading, id: `upload-image-${name}`, onClick: () => {
|
|
4700
4724
|
var _a2;
|
|
4701
4725
|
setIsImagesPanelOpen(false);
|
|
4702
4726
|
(_a2 = fileInputRef.current) === null || _a2 === void 0 ? void 0 : _a2.click();
|
|
4703
|
-
} }), jsxRuntime.jsx("input", { ref: fileInputRef, type: "file", disabled: isDisabled, name: `uploaded-${name}`, accept: acceptedMimeTypes.join(","), onChange: uploadImage, className: "ui
|
|
4727
|
+
} }), jsxRuntime.jsx("input", { ref: fileInputRef, type: "file", disabled: isDisabled, name: `uploaded-${name}`, accept: acceptedMimeTypes.join(","), onChange: uploadImage, className: "ui:hidden" })] }), isClearButtonVisible && selectedMedia !== placeholderImage && !isUploading && jsxRuntime.jsx(SecondaryButton, { text: localisation.clearSelection, isDisabled, isPending: isUploading, onClick: handleDeleteClick })] })] }), jsxRuntime.jsxs(ModalBase, { size: "wide", onCloseClick: handleCloseModal, scrollableContent: true, footerTrailingComponents: {
|
|
4704
4728
|
primaryButton: jsxRuntime.jsx(PrimaryButton, { dataTestId: "modal-footer-trailing-primary-button", onClick: handleConfirmSelection, children: localisation.selectButton }),
|
|
4705
4729
|
secondaryButton: jsxRuntime.jsx(SecondaryButton, { dataTestId: "modal-footer-trailing-secondary-button", onClick: handleCloseModal, children: localisation.cancel })
|
|
4706
|
-
}, isOpen: isImagesPanelOpen, title: localisation.modalTitle, children: [jsxRuntime.jsx(SearchInput, { name: "searchImages", className: "ui
|
|
4730
|
+
}, isOpen: isImagesPanelOpen, title: localisation.modalTitle, children: [jsxRuntime.jsx(SearchInput, { name: "searchImages", className: "ui:w-full", value: search, placeholder: localisation.search, onChange: handleSearchChange }), jsxRuntime.jsx("div", { className: "ui:flex ui:w-full ui:flex-row ui:flex-wrap ui:items-center", children: filteredCategories === null || filteredCategories === void 0 ? void 0 : filteredCategories.map((category) => jsxRuntime.jsx(ImageCategory, { category, images: images === null || images === void 0 ? void 0 : images.filter((categoryImage) => categoryImage.includes(category.folder)), highlightedImage, handleImageClick, isTypeCompact }, category.folder)) })] })] });
|
|
4707
4731
|
};
|
|
4708
4732
|
const MediaPicker = React__namespace.default.forwardRef((props, ref) => {
|
|
4709
4733
|
var _a, _b;
|
|
@@ -4711,9 +4735,9 @@ const MediaPicker = React__namespace.default.forwardRef((props, ref) => {
|
|
|
4711
4735
|
return jsxRuntime.jsx(ImagePickerInner, Object.assign({}, mappedProps, { innerRef: ref }));
|
|
4712
4736
|
});
|
|
4713
4737
|
|
|
4714
|
-
const TagGroup = ({ children, tags, tagSize = "base", className }) => jsxRuntime.jsxs("div", { className: classNames__default.default("ui
|
|
4738
|
+
const TagGroup = ({ children, tags, tagSize = "base", className }) => jsxRuntime.jsxs("div", { className: classNames__default.default("ui:flex ui:flex-row ui:flex-wrap ui:gap-2", className), children: [children, tags === null || tags === void 0 ? void 0 : tags.map((tag) => jsxRuntime.jsx(Tag, Object.assign({ size: tagSize }, tag)))] });
|
|
4715
4739
|
|
|
4716
|
-
var css_248z$1 = "
|
|
4740
|
+
var css_248z$1 = "/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */\n.cweb-textarea {\n resize: none;\n background-color: field;\n}\n.cweb-textarea.has-icon {\n background-size: 24px;\n background-position: 10px 10px;\n background-repeat: no-repeat;\n padding-left: 44px;\n}\n.cweb-textarea.resizable {\n resize: both;\n}\n.cweb-textarea.resizable-x {\n resize: horizontal;\n}\n.cweb-textarea.resizable-y {\n resize: vertical;\n}\n.cweb-textarea:focus {\n border-color: var(--color-primary);\n}\n.cweb-textarea:disabled {\n cursor: not-allowed;\n}\n.cweb-textarea.has-error {\n border: 1px solid #b91c1c;\n color: #991b1b;\n}";
|
|
4717
4741
|
styleInject(css_248z$1);
|
|
4718
4742
|
|
|
4719
4743
|
const resizeTypes = {
|
|
@@ -4739,34 +4763,34 @@ const Textarea = React__namespace.default.forwardRef((_a, ref) => {
|
|
|
4739
4763
|
// Base classes
|
|
4740
4764
|
className,
|
|
4741
4765
|
"cweb-textarea",
|
|
4742
|
-
"ui
|
|
4743
|
-
"ui
|
|
4744
|
-
"ui
|
|
4766
|
+
"ui:w-full",
|
|
4767
|
+
"ui:rounded",
|
|
4768
|
+
"ui:text-sm",
|
|
4745
4769
|
// Padding and border
|
|
4746
|
-
"ui
|
|
4747
|
-
"ui
|
|
4748
|
-
"ui
|
|
4749
|
-
"ui
|
|
4770
|
+
"ui:p-2",
|
|
4771
|
+
"ui:border",
|
|
4772
|
+
"ui:border-solid",
|
|
4773
|
+
"ui:input-border",
|
|
4750
4774
|
// Colors and states
|
|
4751
|
-
"ui
|
|
4752
|
-
"hover:
|
|
4753
|
-
"focus:
|
|
4754
|
-
"focus:
|
|
4775
|
+
"ui:placeholder-gray-500",
|
|
4776
|
+
"ui:hover:input-border-dark",
|
|
4777
|
+
"ui:focus:outline-primary",
|
|
4778
|
+
"ui:focus:border-primary",
|
|
4755
4779
|
// Transitions
|
|
4756
|
-
"ui
|
|
4757
|
-
"ui
|
|
4780
|
+
"ui:transition-colors",
|
|
4781
|
+
"ui:duration-300",
|
|
4758
4782
|
{
|
|
4759
4783
|
// Disabled state
|
|
4760
|
-
"ui
|
|
4761
|
-
"ui
|
|
4784
|
+
"ui:bg-slate-50 ui:text-slate-400": isDisabled,
|
|
4785
|
+
"ui:text-on-surface": !isDisabled,
|
|
4762
4786
|
// Normal state (not disabled, not error)
|
|
4763
|
-
"ui
|
|
4764
|
-
"hover:
|
|
4787
|
+
"ui:border-input-border": !isDisabled && !isError,
|
|
4788
|
+
"ui:hover:border-input-border-dark": !isDisabled,
|
|
4765
4789
|
// Error state
|
|
4766
|
-
"ui
|
|
4767
|
-
"focus:
|
|
4768
|
-
"focus:
|
|
4769
|
-
"focus:
|
|
4790
|
+
"ui:border-negative-border": isError,
|
|
4791
|
+
"ui:focus:outline-negative": isError,
|
|
4792
|
+
"ui:focus:border-primary": !isError,
|
|
4793
|
+
"ui:focus:outline-primary": !isError,
|
|
4770
4794
|
// Style if icon present, and resizable states
|
|
4771
4795
|
"has-icon": !!icon,
|
|
4772
4796
|
resizable: resizable === resizeTypes.BOTH,
|
|
@@ -4818,65 +4842,65 @@ const TextEditor = (_a) => {
|
|
|
4818
4842
|
};
|
|
4819
4843
|
|
|
4820
4844
|
const TextLink = (props) => {
|
|
4821
|
-
const className = classNames__default.default("ui
|
|
4822
|
-
"ui
|
|
4823
|
-
"ui
|
|
4845
|
+
const className = classNames__default.default("ui:text-sm ui:hover:underline", {
|
|
4846
|
+
"ui:cursor-pointer": props.enabled,
|
|
4847
|
+
"ui:cursor-default": !props.enabled
|
|
4824
4848
|
}, {
|
|
4825
|
-
"ui
|
|
4826
|
-
"ui
|
|
4849
|
+
"ui:text-primary": props.enabled,
|
|
4850
|
+
"ui:text-slate-800": !props.enabled
|
|
4827
4851
|
}, {
|
|
4828
|
-
"hover:
|
|
4829
|
-
"hover:
|
|
4852
|
+
"ui:hover:text-primary-dark": props.enabled,
|
|
4853
|
+
"ui:hover:text-slate-900": !props.enabled
|
|
4830
4854
|
});
|
|
4831
4855
|
return jsxRuntime.jsx("a", { href: props.href, rel: props.rel, target: props.target, onClick: props.onClick, className: classNames__default.default(className, props.className), children: props.text });
|
|
4832
4856
|
};
|
|
4833
4857
|
|
|
4834
4858
|
const TimelineStep = React__namespace.default.forwardRef(({ content, type = "base", dataTestId, title }, ref) => {
|
|
4835
4859
|
const isWideStep = type === "wide";
|
|
4836
|
-
const borderClassNames = "ui
|
|
4837
|
-
const containerClassNames = classNames__default.default("ui
|
|
4860
|
+
const borderClassNames = "ui:ml-4 ui:pl-6 ui:border-primary ui:border-l-2";
|
|
4861
|
+
const containerClassNames = classNames__default.default("ui:relative", {
|
|
4838
4862
|
[borderClassNames]: !isWideStep,
|
|
4839
|
-
"ui
|
|
4863
|
+
"ui:bg-white ui:rounded-lg ui:overflow-hidden": isWideStep
|
|
4840
4864
|
});
|
|
4841
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isWideStep && jsxRuntime.jsx("div", { className: classNames__default.default(borderClassNames, "ui
|
|
4842
|
-
"ui
|
|
4843
|
-
"ui
|
|
4844
|
-
"ui
|
|
4865
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isWideStep && jsxRuntime.jsx("div", { className: classNames__default.default(borderClassNames, "ui:h-4 ui:first:h-0") }), jsxRuntime.jsxs("div", { className: containerClassNames, "data-test-id": dataTestId === void 0 ? "" : `timeline-step-${dataTestId}`, ref, children: [jsxRuntime.jsxs("div", { className: "ui:flex ui:flex-col", children: [title && jsxRuntime.jsx(Text, Object.assign({ type: "lg-strong", className: "ui:flex ui:h-13 ui:flex-row ui:items-center ui:border-b" }, typeof title === "object" ? title : { text: title })), content] }), jsxRuntime.jsx("div", { className: "ui:absolute ui:-left-2 ui:top-0 ui:-ml-px ui:flex ui:h-13 ui:flex-row ui:items-center", children: jsxRuntime.jsx("span", { className: classNames__default.default("ui:inline-block ui:h-4 ui:w-4 ui:rounded-lg", {
|
|
4866
|
+
"ui:hidden": ["wide", "withoutDot"].includes(type),
|
|
4867
|
+
"ui:bg-primary": "base" === type,
|
|
4868
|
+
"ui:border-4 ui:border-primary ui:bg-white": "emptyDot" === type
|
|
4845
4869
|
}) }) })] })] });
|
|
4846
4870
|
});
|
|
4847
4871
|
|
|
4848
4872
|
const TimelineHeader = ({ title, buttons, withBorder = true }) => {
|
|
4849
4873
|
const hasButtons = buttons && buttons.length > 0;
|
|
4850
|
-
const className = classNames__default.default("ui
|
|
4851
|
-
"ui
|
|
4852
|
-
"ui
|
|
4853
|
-
"ui
|
|
4854
|
-
"ui
|
|
4855
|
-
"ui
|
|
4856
|
-
"ui
|
|
4874
|
+
const className = classNames__default.default("ui:flex ui:flex-row ui:items-center ui:space-x-4 ui:rounded-t ui:px-4", {
|
|
4875
|
+
"ui:py-4": !hasButtons,
|
|
4876
|
+
"ui:py-2": hasButtons,
|
|
4877
|
+
"ui:justify-between": title && hasButtons,
|
|
4878
|
+
"ui:justify-start": title && !hasButtons,
|
|
4879
|
+
"ui:justify-end": !title && hasButtons,
|
|
4880
|
+
"ui:border-b": withBorder
|
|
4857
4881
|
});
|
|
4858
|
-
return jsxRuntime.jsxs("div", { "data-test-id": "timeline-header", className, children: [title && jsxRuntime.jsx(Title, Object.assign({ variant: "sm" }, typeof title === "object" ? title : { text: title })), hasButtons && jsxRuntime.jsx("div", { className: "ui
|
|
4882
|
+
return jsxRuntime.jsxs("div", { "data-test-id": "timeline-header", className, children: [title && jsxRuntime.jsx(Title, Object.assign({ variant: "sm" }, typeof title === "object" ? title : { text: title })), hasButtons && jsxRuntime.jsx("div", { className: "ui:flex ui:flex-row ui:space-x-4", children: buttons.map(({ buttonType: ButtonComponent, buttonProps }) => jsxRuntime.jsx(ButtonComponent, Object.assign({}, buttonProps))) })] });
|
|
4859
4883
|
};
|
|
4860
4884
|
|
|
4861
4885
|
const Timeline = ({ headerProps, steps, loadMoreButtonProps, dataTestId = "timeline", emptyHeroProps }) => {
|
|
4862
4886
|
const isEmptyTimeline = !steps || steps.length === 0;
|
|
4863
|
-
return jsxRuntime.jsxs("div", { className: "ui
|
|
4864
|
-
"ui
|
|
4865
|
-
}), children: steps.map((step) => jsxRuntime.jsx(TimelineStep, Object.assign({}, step))) }), loadMoreButtonProps && jsxRuntime.jsx("div", { className: "ui
|
|
4887
|
+
return jsxRuntime.jsxs("div", { className: "ui:rounded-xl ui:bg-white", "data-test-id": dataTestId, children: [headerProps && jsxRuntime.jsx(TimelineHeader, Object.assign({}, headerProps)), isEmptyTimeline && emptyHeroProps && jsxRuntime.jsx(CenteredHero, Object.assign({ background: "white" }, emptyHeroProps)), !isEmptyTimeline && jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: classNames__default.default("ui:px-4 ui:pb-4", {
|
|
4888
|
+
"ui:pt-4": !headerProps
|
|
4889
|
+
}), children: steps.map((step) => jsxRuntime.jsx(TimelineStep, Object.assign({}, step))) }), loadMoreButtonProps && jsxRuntime.jsx("div", { className: "ui:border-t ui:py-6 ui:text-center", children: jsxRuntime.jsx(SecondaryButton, Object.assign({}, loadMoreButtonProps)) })] })] });
|
|
4866
4890
|
};
|
|
4867
4891
|
|
|
4868
4892
|
const Padding = (props) => {
|
|
4869
|
-
return jsxRuntime.jsx("div", { className: classNames__default.default("ui
|
|
4893
|
+
return jsxRuntime.jsx("div", { className: classNames__default.default("ui:p-4", props.className), children: props.children });
|
|
4870
4894
|
};
|
|
4871
4895
|
const Item$1 = (props) => {
|
|
4872
4896
|
const { _DO_NOT_USE_index } = props, rest = __rest(props, ["_DO_NOT_USE_index"]);
|
|
4873
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [_DO_NOT_USE_index === 0 ? null : jsxRuntime.jsx("div", { "data-index": _DO_NOT_USE_index, className: classNames__default.default("ui
|
|
4897
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [_DO_NOT_USE_index === 0 ? null : jsxRuntime.jsx("div", { "data-index": _DO_NOT_USE_index, className: classNames__default.default("ui:absolute ui:left-0 ui:right-0", "ui:border-t ui:border-slate-200") }), jsxRuntime.jsx("li", Object.assign({}, rest, { children: React__namespace.default.Children.map(props.children, (child) => {
|
|
4874
4898
|
if (!React__namespace.default.isValidElement(child)) {
|
|
4875
4899
|
return child;
|
|
4876
4900
|
}
|
|
4877
4901
|
if (child.type === UnorderedList) {
|
|
4878
4902
|
return jsxRuntime.jsx(UnorderedList, Object.assign({}, child.props, {
|
|
4879
|
-
className: classNames__default.default(child.props.className, "ui
|
|
4903
|
+
className: classNames__default.default(child.props.className, "ui:pl-4"),
|
|
4880
4904
|
/**
|
|
4881
4905
|
* We use this to show the border on the root list
|
|
4882
4906
|
* and to make it the relative parent for the absolute
|
|
@@ -4886,15 +4910,15 @@ const Item$1 = (props) => {
|
|
|
4886
4910
|
}));
|
|
4887
4911
|
}
|
|
4888
4912
|
if (child.type === Indent) {
|
|
4889
|
-
return jsxRuntime.jsx(Indent, Object.assign({}, child.props, { className: classNames__default.default(child.props.className, "ui
|
|
4913
|
+
return jsxRuntime.jsx(Indent, Object.assign({}, child.props, { className: classNames__default.default(child.props.className, "ui:pl-4") }));
|
|
4890
4914
|
}
|
|
4891
4915
|
return child;
|
|
4892
4916
|
}) }))] });
|
|
4893
4917
|
};
|
|
4894
4918
|
const UnorderedList = (props) => {
|
|
4895
4919
|
const { _DO_NOT_USE_isRoot = true } = props, rest = __rest(props, ["_DO_NOT_USE_isRoot"]);
|
|
4896
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [_DO_NOT_USE_isRoot ? null : jsxRuntime.jsx("div", { className: classNames__default.default("ui
|
|
4897
|
-
"ui
|
|
4920
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [_DO_NOT_USE_isRoot ? null : jsxRuntime.jsx("div", { className: classNames__default.default("ui:absolute ui:left-0 ui:right-0", "ui:border-t ui:border-slate-200") }), jsxRuntime.jsx("ul", Object.assign({}, rest, { className: classNames__default.default({
|
|
4921
|
+
"ui:relative": _DO_NOT_USE_isRoot
|
|
4898
4922
|
}, props.className), children: React__namespace.default.Children.map(props.children, (child, index) => {
|
|
4899
4923
|
if (!React__namespace.default.isValidElement(child)) {
|
|
4900
4924
|
return child !== null && child !== void 0 ? child : null;
|
|
@@ -4912,7 +4936,7 @@ const Indent = ({ children, indentSize = "m" }) => {
|
|
|
4912
4936
|
return child !== null && child !== void 0 ? child : null;
|
|
4913
4937
|
}
|
|
4914
4938
|
const Component = child.type;
|
|
4915
|
-
return jsxRuntime.jsx(Component, Object.assign({}, child.props, { className: classNames__default.default(child.props.className, `ui
|
|
4939
|
+
return jsxRuntime.jsx(Component, Object.assign({}, child.props, { className: classNames__default.default(child.props.className, `ui:pl-${indentSize}`) }));
|
|
4916
4940
|
}) });
|
|
4917
4941
|
};
|
|
4918
4942
|
UnorderedList.Item = Item$1;
|
|
@@ -4920,15 +4944,15 @@ UnorderedList.Padding = Padding;
|
|
|
4920
4944
|
UnorderedList.Indent = Indent;
|
|
4921
4945
|
|
|
4922
4946
|
const FullPageModalHeader = ({ primaryButtonProps, actions, title }) => {
|
|
4923
|
-
return jsxRuntime.jsxs("div", { className: "ui
|
|
4947
|
+
return jsxRuntime.jsxs("div", { className: "ui:flex ui:h-19 ui:flex-row ui:items-center ui:justify-between ui:bg-white ui:px-6", children: [jsxRuntime.jsx(PageTitle, { children: title }), primaryButtonProps && !actions && jsxRuntime.jsx(PrimaryButton, Object.assign({ "data-test-id": "modal-primary-button" }, primaryButtonProps)), actions && jsxRuntime.jsx("div", { children: actions })] });
|
|
4924
4948
|
};
|
|
4925
4949
|
|
|
4926
4950
|
const FullPageModalActions = (props) => {
|
|
4927
|
-
return jsxRuntime.jsx("div", { className: "ui
|
|
4951
|
+
return jsxRuntime.jsx("div", { className: "ui:flex ui:flex-row ui:flex-wrap ui:justify-end ui:gap-3", children: props.children });
|
|
4928
4952
|
};
|
|
4929
4953
|
|
|
4930
4954
|
const FullPageModal = ({ children, dataTestId, isOpen = false, onCloseClick, primaryButtonProps, actions, title }) => {
|
|
4931
|
-
return jsxRuntime.jsx(ReactModal__default.default, { isOpen, contentLabel: title, overlayClassName: "ui
|
|
4955
|
+
return jsxRuntime.jsx(ReactModal__default.default, { isOpen, contentLabel: title, overlayClassName: "ui:fixed ui:inset-0 ui:overflow-x-hidden ui:overflow-y-auto ui:z-20", onRequestClose: onCloseClick, shouldFocusAfterRender: false, className: "ui:h-full ui:w-full", data: { "test-id": dataTestId !== null && dataTestId !== void 0 ? dataTestId : "react-modal" }, children: jsxRuntime.jsxs("div", { className: "ui:flex ui:h-full ui:w-full ui:flex-col ui:bg-slate-100", children: [jsxRuntime.jsx(FullPageModalHeader, { title, primaryButtonProps, actions }), jsxRuntime.jsx("div", { className: "ui:flex ui:h-full ui:flex-row ui:overflow-hidden", children })] }) });
|
|
4932
4956
|
};
|
|
4933
4957
|
FullPageModal.Actions = FullPageModalActions;
|
|
4934
4958
|
FullPageModal.setAppElement = ReactModal__default.default.setAppElement;
|
|
@@ -4955,8 +4979,8 @@ const DetailsDisclosure = (_a) => {
|
|
|
4955
4979
|
}, rest, { children })) });
|
|
4956
4980
|
};
|
|
4957
4981
|
const DefaultOpenIndicator = ({ isOpen }) => {
|
|
4958
|
-
return jsxRuntime.jsx(ChevronRightIcon, { className: classNames__default.default("ui
|
|
4959
|
-
"ui
|
|
4982
|
+
return jsxRuntime.jsx(ChevronRightIcon, { className: classNames__default.default("ui:shrink-0 ui:transition-transform", {
|
|
4983
|
+
"ui:rotate-90": isOpen
|
|
4960
4984
|
}) });
|
|
4961
4985
|
};
|
|
4962
4986
|
const OpenIndicator = ({ component: Component = DefaultOpenIndicator }) => {
|
|
@@ -4980,16 +5004,16 @@ const VerticalMenu = (props) => {
|
|
|
4980
5004
|
const isCollapsed = variant === "primary-collapsed";
|
|
4981
5005
|
const shouldShowCollapseButton = localization && Boolean(onCollapseButtonClick);
|
|
4982
5006
|
const hasHeaderContent = title || shouldShowCollapseButton;
|
|
4983
|
-
return jsxRuntime.jsx(context$1.Provider, { value: { variant }, children: jsxRuntime.jsxs(Stack, Object.assign({ as: "div", px: "xxs", py: "m", align: "normal", className: classNames__default.default("ui
|
|
5007
|
+
return jsxRuntime.jsx(context$1.Provider, { value: { variant }, children: jsxRuntime.jsxs(Stack, Object.assign({ as: "div", px: "xxs", py: "m", align: "normal", className: classNames__default.default("ui:max-w-full ui:text-slate-800", className) }, rest, { children: [header && jsxRuntime.jsx("div", { children: header }), jsxRuntime.jsxs(Stack, { axis: "x", gap: "xxs", p: hasHeaderContent ? "m" : void 0, align: "start", justify: "between", width: "full", children: [title && jsxRuntime.jsx(Box, { children: jsxRuntime.jsx(Text, { variant: "lg-strong", children: title }) }), shouldShowCollapseButton && jsxRuntime.jsx(
|
|
4984
5008
|
Box,
|
|
4985
5009
|
{
|
|
4986
5010
|
/**
|
|
4987
5011
|
* Push the button to the right when the menu is expanded without a title.
|
|
4988
5012
|
* Needed in case there is no title.
|
|
4989
5013
|
*/
|
|
4990
|
-
className: classNames__default.default("ui
|
|
4991
|
-
"ui
|
|
4992
|
-
"ui
|
|
5014
|
+
className: classNames__default.default("ui:grid", {
|
|
5015
|
+
"ui:flex-1": isCollapsed,
|
|
5016
|
+
"ui:ml-auto": !isCollapsed
|
|
4993
5017
|
}),
|
|
4994
5018
|
children: jsxRuntime.jsx(CollapseButtonWrapperComponent, { children: jsxRuntime.jsx(TertiaryIconButton, {
|
|
4995
5019
|
size: "medium",
|
|
@@ -5000,12 +5024,12 @@ const VerticalMenu = (props) => {
|
|
|
5000
5024
|
* case we want to override that to be black when the button is
|
|
5001
5025
|
* not hovered.
|
|
5002
5026
|
*/
|
|
5003
|
-
className: "[&:not(:hover)]:
|
|
5027
|
+
className: "ui:[&:not(:hover)]:text-black",
|
|
5004
5028
|
onClick: onCollapseButtonClick,
|
|
5005
5029
|
children: jsxRuntime.jsx(SidebarIcon, {})
|
|
5006
5030
|
}) })
|
|
5007
5031
|
}
|
|
5008
|
-
)] }), isPrimaryVariant && hasHeaderContent && jsxRuntime.jsx(VerticalMenu.Divider, {}), jsxRuntime.jsx("div", { children: props.children }), jsxRuntime.jsx("div", { className: "ui
|
|
5032
|
+
)] }), isPrimaryVariant && hasHeaderContent && jsxRuntime.jsx(VerticalMenu.Divider, {}), jsxRuntime.jsx("div", { children: props.children }), jsxRuntime.jsx("div", { className: "ui:mt-auto", children: footer })] })) });
|
|
5009
5033
|
};
|
|
5010
5034
|
VerticalMenu.Divider = MenuDivider;
|
|
5011
5035
|
VerticalMenu.Item = MenuItem;
|
|
@@ -5016,33 +5040,33 @@ VerticalMenu.NotificationBubble = MenuItemNotificationBubble;
|
|
|
5016
5040
|
VerticalMenu.ItemGroup = MenuItemGroup;
|
|
5017
5041
|
function MenuItemText(props) {
|
|
5018
5042
|
const { variant: menuVariant } = React.useContext(context$1);
|
|
5019
|
-
return jsxRuntime.jsx(Text, Object.assign({ as: "span", color: "current", variant: menuVariant === "primary" ? "strong" : props.variant }, props, { className: classNames__default.default("sm:
|
|
5043
|
+
return jsxRuntime.jsx(Text, Object.assign({ as: "span", color: "current", variant: menuVariant === "primary" ? "strong" : props.variant }, props, { className: classNames__default.default("ui:sm:leading-[24px]", props.className) }));
|
|
5020
5044
|
}
|
|
5021
5045
|
const useGetClassName = () => {
|
|
5022
5046
|
const { variant } = React.useContext(context$1);
|
|
5023
5047
|
return React.useCallback(
|
|
5024
5048
|
// eslint-disable-next-line consistent-return
|
|
5025
5049
|
({ isActive = false, classNameProp = "" } = {}) => {
|
|
5026
|
-
const base = "ui
|
|
5050
|
+
const base = "ui:block ui:w-full ui:py-xs ui:radius-xxs ui:text-current";
|
|
5027
5051
|
switch (variant) {
|
|
5028
5052
|
case "primary":
|
|
5029
5053
|
case "primary-collapsed":
|
|
5030
5054
|
return classNames__default.default(
|
|
5031
5055
|
base,
|
|
5032
|
-
"ui
|
|
5056
|
+
"ui:px-m",
|
|
5033
5057
|
// Transitions
|
|
5034
|
-
"ui
|
|
5058
|
+
"ui:transition-[color,background,transform]",
|
|
5035
5059
|
// States
|
|
5036
|
-
"hover:
|
|
5060
|
+
"ui:hover:bg-primary-background ui:hover:text-primary ui:focus:text-primary ui:active:scale-[0.98]",
|
|
5037
5061
|
{
|
|
5038
|
-
"ui
|
|
5039
|
-
"ui
|
|
5062
|
+
"ui:bg-transparent ui:text-on-surface": !isActive,
|
|
5063
|
+
"ui:bg-linear-to-r ui:from-blue-800 ui:to-blue-700 ui:text-white ui:hover:text-white ui:focus:text-white": isActive
|
|
5040
5064
|
},
|
|
5041
5065
|
classNameProp
|
|
5042
5066
|
);
|
|
5043
5067
|
case "secondary":
|
|
5044
|
-
return classNames__default.default(base, "hover:
|
|
5045
|
-
["[&_span]:
|
|
5068
|
+
return classNames__default.default(base, "ui:hover:text-primary ui:focus:text-primary ui:active:scale-[0.98]", {
|
|
5069
|
+
["ui:[&_span]:font-bold"]: isActive
|
|
5046
5070
|
});
|
|
5047
5071
|
}
|
|
5048
5072
|
},
|
|
@@ -5055,8 +5079,8 @@ function MenuItem(props) {
|
|
|
5055
5079
|
const getClassName = useGetClassName();
|
|
5056
5080
|
if (children) {
|
|
5057
5081
|
return jsxRuntime.jsx("div", { className: classNames__default.default({
|
|
5058
|
-
"ui
|
|
5059
|
-
"ui
|
|
5082
|
+
"ui:px-m": paddingX,
|
|
5083
|
+
"ui:py-xs": paddingY
|
|
5060
5084
|
}, props.className), children });
|
|
5061
5085
|
}
|
|
5062
5086
|
return (_a = props.render) === null || _a === void 0 ? void 0 : _a.call(props, { getClassName });
|
|
@@ -5069,19 +5093,19 @@ function MenuItemLayout(props) {
|
|
|
5069
5093
|
return jsxRuntime.jsx("div", { children });
|
|
5070
5094
|
}
|
|
5071
5095
|
const itemIsTextOrNumber = typeof text === "string" || typeof text === "number";
|
|
5072
|
-
return jsxRuntime.jsxs("div", { className: classNames__default.default("ui
|
|
5096
|
+
return jsxRuntime.jsxs("div", { className: classNames__default.default("ui:relative ui:flex ui:items-start ui:gap-xxs", className), children: [icon && /**
|
|
5073
5097
|
* If the item is a text or number, we can to add an aria-label to the icon
|
|
5074
5098
|
* so that it can be read by screen readers. If the item is not a text or
|
|
5075
5099
|
* number, there's not much we can do and accessibility is up to the consumer.
|
|
5076
5100
|
*/
|
|
5077
|
-
jsxRuntime.jsx("span", { "aria-label": itemIsTextOrNumber ? String(text) : void 0, children: icon }), text && !isCollapsed && jsxRuntime.jsx(MenuItemText, { children: text }), aside && jsxRuntime.jsx("span", { className: "ui
|
|
5101
|
+
jsxRuntime.jsx("span", { "aria-label": itemIsTextOrNumber ? String(text) : void 0, children: icon }), text && !isCollapsed && jsxRuntime.jsx(MenuItemText, { children: text }), aside && jsxRuntime.jsx("span", { className: "ui:ml-auto", children: aside }), notificationBubbleText && !isCollapsed && jsxRuntime.jsx("span", { className: "ui:ml-auto", children: jsxRuntime.jsx(MenuItemNotificationBubble, { children: notificationBubbleText }) }), notificationBubbleText && isCollapsed && jsxRuntime.jsx("span", { "aria-label": notificationBubbleText, className: "ui:absolute ui:right-[-8px] ui:top-[-4px] ui:h-[8px] ui:w-[8px] ui:rounded-full ui:bg-red-500" })] });
|
|
5078
5102
|
}
|
|
5079
5103
|
function MenuItemPadding(props) {
|
|
5080
5104
|
const { variant } = React.useContext(context$1);
|
|
5081
5105
|
const { children, className, paddingX = variant === "primary", paddingY = true } = props;
|
|
5082
5106
|
return jsxRuntime.jsx("div", { className: classNames__default.default({
|
|
5083
|
-
"ui
|
|
5084
|
-
"ui
|
|
5107
|
+
"ui:px-m": paddingX,
|
|
5108
|
+
"ui:py-xs": paddingY
|
|
5085
5109
|
}, className), children });
|
|
5086
5110
|
}
|
|
5087
5111
|
function MenuItemNotificationBubble(props) {
|
|
@@ -5091,17 +5115,17 @@ function MenuItemNotificationBubble(props) {
|
|
|
5091
5115
|
* text size here. This makes the bubble a perfect circle when
|
|
5092
5116
|
* there is too little text.
|
|
5093
5117
|
*/
|
|
5094
|
-
"ui
|
|
5095
|
-
"ui
|
|
5118
|
+
"ui:min-w-l",
|
|
5119
|
+
"ui:rounded-full ui:bg-red-500 ui:px-xxs ui:text-center",
|
|
5096
5120
|
props.className
|
|
5097
|
-
), children: jsxRuntime.jsx(Text, { color: "white", as: "span", className: "ui
|
|
5121
|
+
), children: jsxRuntime.jsx(Text, { color: "white", as: "span", className: "ui:align-text-bottom", children: props.children }) });
|
|
5098
5122
|
}
|
|
5099
5123
|
function MenuDivider(props) {
|
|
5100
|
-
return jsxRuntime.jsx(Box, { my: "xxs", children: jsxRuntime.jsx(Divider, Object.assign({ className: "ui
|
|
5124
|
+
return jsxRuntime.jsx(Box, { my: "xxs", children: jsxRuntime.jsx(Divider, Object.assign({ className: "ui:border-neutral-border-high-contrast ui:last:border-b-1" }, props)) });
|
|
5101
5125
|
}
|
|
5102
5126
|
function MenuItemGroupOpenIndicator({ isOpen }) {
|
|
5103
|
-
return jsxRuntime.jsx(Text, { color: "on-surface", as: "span", children: jsxRuntime.jsx(ChevronDownIcon, { className: classNames__default.default("ui
|
|
5104
|
-
"ui
|
|
5127
|
+
return jsxRuntime.jsx(Text, { color: "on-surface", as: "span", children: jsxRuntime.jsx(ChevronDownIcon, { className: classNames__default.default("ui:shrink-0 ui:transition-transform", {
|
|
5128
|
+
"ui:rotate-180": isOpen
|
|
5105
5129
|
}) }) });
|
|
5106
5130
|
}
|
|
5107
5131
|
function MenuItemGroup(_a) {
|
|
@@ -5119,42 +5143,42 @@ const ActiveFilters = (props) => {
|
|
|
5119
5143
|
return categorizedFilterOption;
|
|
5120
5144
|
});
|
|
5121
5145
|
}).filter((activeFilter) => activeFilter.isChecked);
|
|
5122
|
-
return jsxRuntime.jsx("div", { className: "ui
|
|
5146
|
+
return jsxRuntime.jsx("div", { className: "ui:bg-gray-100", children: jsxRuntime.jsxs("div", { className: "ui:min-h-15 ui:max-w-7xl ui:py-s ui:sm:flex ui:sm:items-center", children: [jsxRuntime.jsx(Text, { variant: "base", color: "slate-500", children: localization.filtersLabel }), jsxRuntime.jsx("div", { className: "ui:mt-2 ui:sm:ml-4 ui:sm:mt-0", children: jsxRuntime.jsx(Stack, { axis: "x", gap: "m", align: "center", wrap: true, children: activeFilters.map((activeFilter, idx) => jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsxs("span", { className: "ui:mx-1 ui:inline-flex ui:items-center ui:rounded-full ui:border ui:border-neutral-border-high-contrast ui:bg-white ui:py-xxxxs ui:pl-m ui:pr-xxs ui:hover:border-neutral-interactive ui:hover:bg-primary-background", children: [jsxRuntime.jsx(Text, { variant: "base", children: activeFilter.label }), jsxRuntime.jsx("button", { type: "button", "aria-label": removeFilterOptionLabelGetter(activeFilter), className: "ui:mx-1 ui:inline-flex ui:h-6 ui:w-6 ui:shrink-0 ui:rounded-full ui:p-0 ui:text-on-surface", onClick: () => onRemoveActiveFilter({
|
|
5123
5147
|
changedFilterOption: {
|
|
5124
5148
|
isChecked: false,
|
|
5125
5149
|
id: activeFilter.id,
|
|
5126
5150
|
label: activeFilter.label,
|
|
5127
5151
|
value: activeFilter.value
|
|
5128
5152
|
}
|
|
5129
|
-
}), children: jsxRuntime.jsx(CrossIcon, {}) })] }), idx < activeFilters.length - 1 && jsxRuntime.jsx("div", { "aria-hidden": "true", className: "ui
|
|
5153
|
+
}), children: jsxRuntime.jsx(CrossIcon, {}) })] }), idx < activeFilters.length - 1 && jsxRuntime.jsx("div", { "aria-hidden": "true", className: "ui:h-5 ui:w-px ui:bg-slate-300" })] }, `${activeFilter.id}-${activeFilter.label}`)) }) })] }) });
|
|
5130
5154
|
};
|
|
5131
5155
|
|
|
5132
5156
|
const FilterMenu = (props) => {
|
|
5133
5157
|
const { showCheckedAmount = false, alignPopover = "left", categorizedFilter, singleSelection = false } = props;
|
|
5134
5158
|
const multiSelection = !singleSelection;
|
|
5135
5159
|
const amountOfCheckedItems = categorizedFilter.options.filter((option) => option.isChecked).length;
|
|
5136
|
-
return jsxRuntime.jsxs(react.Popover, { className: "ui
|
|
5160
|
+
return jsxRuntime.jsxs(react.Popover, { className: "ui:relative ui:inline-block ui:px-4 ui:text-left", children: [jsxRuntime.jsxs(react.PopoverButton, { className: "ui:group ui:inline-flex ui:justify-center ui:text-sm ui:font-medium ui:text-slate-700 ui:hover:text-slate-900", children: [jsxRuntime.jsx("span", { children: categorizedFilter.label }), amountOfCheckedItems > 0 && showCheckedAmount ? jsxRuntime.jsx("span", { className: "ui:ml-1.5 ui:rounded ui:bg-slate-200 ui:px-1.5 ui:py-0.5 ui:text-xs ui:font-semibold ui:tabular-nums ui:text-slate-700", children: amountOfCheckedItems }) : null, jsxRuntime.jsx(solid.ChevronDownIcon, { className: "ui:-mr-1 ui:ml-1 ui:h-5 ui:w-5 ui:shrink-0 ui:text-slate-400 ui:group-hover:text-slate-500", "aria-hidden": "true" })] }), jsxRuntime.jsx(react.Transition, { enter: "ui:transition ui:ease-out ui:duration-100", enterFrom: "ui:transform ui:opacity-0 ui:scale-95", enterTo: "ui:transform ui:opacity-100 ui:scale-100", leave: "ui:transition ui:ease-in ui:duration-75", leaveFrom: "ui:transform ui:opacity-100 ui:scale-100", leaveTo: "ui:transform ui:opacity-0 ui:scale-95", children: jsxRuntime.jsx(react.PopoverPanel, { className: classNames__default.default("ui:min-w-58", "ui:absolute ui:z-10 ui:mt-2", "ui:rounded-2xl ui:bg-white ui:shadow-2xl ui:ring-1 ui:ring-black ui:ring-opacity-5", "ui:focus:outline-none", "ui:border ui:border-neutral-border-high-contrast", {
|
|
5137
5161
|
// Align popover to the left side of the button label
|
|
5138
|
-
"ui
|
|
5162
|
+
"ui:left-4 ui:origin-top-left": alignPopover === "left",
|
|
5139
5163
|
// Align popover to the right side of the chevron icon
|
|
5140
|
-
"ui
|
|
5141
|
-
}), children: ({ close }) => jsxRuntime.jsx("form", { className: "ui
|
|
5164
|
+
"ui:right-3 ui:origin-top-right": alignPopover === "right"
|
|
5165
|
+
}), children: ({ close }) => jsxRuntime.jsx("form", { className: "ui:max-h-120 ui:overflow-y-auto", children: categorizedFilter.options.map((option) => jsxRuntime.jsxs("label", { className: classNames__default.default("ui:first-of-type:rounded-t-2xl", "ui:last-of-type:rounded-b-2xl", "ui:flex ui:items-center ui:p-3", "ui:cursor-pointer", "ui:transition-colors ui:duration-300 ui:ease-in-out ui:hover:bg-primary-background"), htmlFor: `filter-${option.id}`, role: multiSelection ? "menuitemcheckbox" : "menuitem", children: [jsxRuntime.jsx("input", { id: `filter-${option.id}`, name: `${option.value}`, defaultValue: option.value, type: "checkbox", defaultChecked: option.isChecked, onChange: () => {
|
|
5142
5166
|
props.onFilterOptionChange({
|
|
5143
5167
|
changedFilterOption: Object.assign(Object.assign({}, option), { isChecked: !option.isChecked })
|
|
5144
5168
|
});
|
|
5145
5169
|
if (singleSelection) {
|
|
5146
5170
|
close();
|
|
5147
5171
|
}
|
|
5148
|
-
}, className: classNames__default.default("ui
|
|
5149
|
-
"ui
|
|
5172
|
+
}, className: classNames__default.default("ui:form-checkbox ui:h-4 ui:w-4 ui:rounded ui:border-slate-300 ui:text-primary ui:focus:ring-primary", {
|
|
5173
|
+
"ui:hidden": singleSelection
|
|
5150
5174
|
}) }), jsxRuntime.jsx("span", { className: classNames__default.default({
|
|
5151
|
-
"ui
|
|
5152
|
-
"ui
|
|
5153
|
-
}), children: jsxRuntime.jsx(Text, { className: "ui
|
|
5154
|
-
"ui
|
|
5155
|
-
"ui
|
|
5156
|
-
"ui
|
|
5157
|
-
}), children: jsxRuntime.jsx(solid.CheckIcon, { className: "ui
|
|
5175
|
+
"ui:pr-l": multiSelection,
|
|
5176
|
+
"ui:ml-s": multiSelection
|
|
5177
|
+
}), children: jsxRuntime.jsx(Text, { className: "ui:whitespace-nowrap ui:capitalize", variant: option.isChecked ? "strong" : "base", children: option.label }) }), jsxRuntime.jsx("span", { className: classNames__default.default("ui:ml-auto ui:pr-s", {
|
|
5178
|
+
"ui:hidden": multiSelection,
|
|
5179
|
+
"ui:text-primary": option.isChecked,
|
|
5180
|
+
"ui:text-transparent": !option.isChecked
|
|
5181
|
+
}), children: jsxRuntime.jsx(solid.CheckIcon, { className: "ui:ml-s ui:h-5 ui:w-5 ui:shrink-0" }) })] }, `${option.id}`)) }) }) })] }, categorizedFilter.key);
|
|
5158
5182
|
};
|
|
5159
5183
|
|
|
5160
5184
|
const isSortingOption = (option) => {
|
|
@@ -5182,7 +5206,7 @@ const SortMenu = (props) => {
|
|
|
5182
5206
|
|
|
5183
5207
|
const FiltersMenus = (props) => {
|
|
5184
5208
|
const { filters, singleSelection } = props;
|
|
5185
|
-
return jsxRuntime.jsx("div", { className: "ui
|
|
5209
|
+
return jsxRuntime.jsx("div", { className: "ui:hidden ui:sm:block", children: jsxRuntime.jsx("div", { className: "ui:flow-root", children: jsxRuntime.jsx(react.PopoverGroup, { className: "ui:-mx-4 ui:flex ui:items-center ui:divide-x ui:divide-slate-200", children: filters.map((categorizedFilter) => jsxRuntime.jsx(FilterMenu, { alignPopover: "right", showCheckedAmount: true, categorizedFilter, onFilterOptionChange: props.onFilterOptionChange, singleSelection }, `filter-menu-${categorizedFilter.key}`)) }) }) });
|
|
5186
5210
|
};
|
|
5187
5211
|
|
|
5188
5212
|
const isPresetFilterOption = (option) => {
|
|
@@ -5250,7 +5274,7 @@ const FilterBar = (_a) => {
|
|
|
5250
5274
|
};
|
|
5251
5275
|
const hasFiltersApplied = categorizedFilters.some((categorizedFilter) => categorizedFilter.options.some((option) => option.isChecked));
|
|
5252
5276
|
const shouldShowActiveFilters = hasFiltersApplied ? true : !hideActiveFiltersWhenEmpty;
|
|
5253
|
-
return jsxRuntime.jsx("div", { children: jsxRuntime.jsxs("section", { "aria-labelledby": "filter-heading", children: [jsxRuntime.jsx(Box, { borderRadius: "l", py: "m", children: jsxRuntime.jsxs(Stack, { axis: "x", align: "normal", justify: "between", className: "
|
|
5277
|
+
return jsxRuntime.jsx("div", { children: jsxRuntime.jsxs("section", { "aria-labelledby": "filter-heading", children: [jsxRuntime.jsx(Box, { borderRadius: "l", py: "m", children: jsxRuntime.jsxs(Stack, { axis: "x", align: "normal", justify: "between", className: "ui:-ml-m", children: [jsxRuntime.jsx(Stack, { axis: "x", align: "normal", children: menuOrder.map((menu, index) => {
|
|
5254
5278
|
const hasPresetMenu = presetFilterOptions && menuOrder.includes("presetFilters");
|
|
5255
5279
|
const hasSortingMenu = sortingOptions && menuOrder.includes("sorting");
|
|
5256
5280
|
const hasMultipleMenus = hasPresetMenu && hasSortingMenu;
|
|
@@ -5260,7 +5284,7 @@ const FilterBar = (_a) => {
|
|
|
5260
5284
|
if (hasMultipleMenus && menu === "divider") {
|
|
5261
5285
|
return jsxRuntime.jsx(
|
|
5262
5286
|
Box,
|
|
5263
|
-
{ className: "ui
|
|
5287
|
+
{ className: "ui:h-full ui:w-px ui:border-l ui:border-color-border" },
|
|
5264
5288
|
`divider-${index}`
|
|
5265
5289
|
);
|
|
5266
5290
|
}
|
|
@@ -5425,18 +5449,18 @@ const WeekdaysPicker = (props) => {
|
|
|
5425
5449
|
dir: ___
|
|
5426
5450
|
} = props, rest = __rest(props, ["locale", "selectedOptions", "onChange", "className", "id", "children", "defaultValue", "dir"]);
|
|
5427
5451
|
const options = getLocalizedWeekdays({ locale });
|
|
5428
|
-
return jsxRuntime.jsx(ToggleGroup__namespace.Root, Object.assign({}, rest, { id, className: classNames__default.default("ui
|
|
5452
|
+
return jsxRuntime.jsx(ToggleGroup__namespace.Root, Object.assign({}, rest, { id, className: classNames__default.default("ui:flex ui:gap-2", className), type: "multiple", value: selectedOptions, onValueChange: onChange, children: options.map(({ englishName, localizedFullWeekdayName, localizedWeekdayLetter }) => {
|
|
5429
5453
|
return jsxRuntime.jsx(ToggleGroup__namespace.Item, { value: englishName, "aria-label": localizedFullWeekdayName, className: classNames__default.default(
|
|
5430
|
-
"ui
|
|
5431
|
-
"ui
|
|
5432
|
-
"ui
|
|
5433
|
-
"hover:
|
|
5454
|
+
"ui:transition-[color,background_color,border-color,transform] ui:duration-150 ui:ease-out",
|
|
5455
|
+
"ui:flex ui:select-none ui:items-center ui:justify-center ui:p-xxs",
|
|
5456
|
+
"ui:border ui:border-neutral-border-high-contrast ui:radius-xxxxs",
|
|
5457
|
+
"ui:hover:border-on-positive",
|
|
5434
5458
|
/**
|
|
5435
5459
|
* Only keyboard users will see this. Black is properly visible
|
|
5436
5460
|
* on both selected/unselected states.
|
|
5437
5461
|
**/
|
|
5438
|
-
"ui-outline-
|
|
5439
|
-
"data-[state=on]:
|
|
5462
|
+
"ui:focus-visible:outline-2 ui:focus-visible:-outline-offset-2 ui:focus-visible:outline-black",
|
|
5463
|
+
"ui:data-[state=on]:border-positive-border ui:data-[state=on]:bg-green-50"
|
|
5440
5464
|
), children: jsxRuntime.jsx(Text, { variant: "base", children: localizedWeekdayLetter }) }, englishName);
|
|
5441
5465
|
}) }));
|
|
5442
5466
|
};
|
|
@@ -5468,7 +5492,7 @@ const FileUpload = React.forwardRef((props, ref) => {
|
|
|
5468
5492
|
if (selectedFile) {
|
|
5469
5493
|
return jsxRuntime.jsx(UploadedFileSection, { file: selectedFile, onRemove: handleOnUnselectFile });
|
|
5470
5494
|
}
|
|
5471
|
-
return jsxRuntime.jsxs(FlexRow, { children: [jsxRuntime.jsx(SecondaryButton, { onClick: handleOnUploadClick, children: buttonText }), jsxRuntime.jsx("input", Object.assign({ type: "file", className: "ui
|
|
5495
|
+
return jsxRuntime.jsxs(FlexRow, { children: [jsxRuntime.jsx(SecondaryButton, { onClick: handleOnUploadClick, children: buttonText }), jsxRuntime.jsx("input", Object.assign({ type: "file", className: "ui:hidden", accept, size: maxFileSize ? maxFileSize * 1024 * 1024 : void 0, name, id, ref: (element) => {
|
|
5472
5496
|
fileUploadRef.current = element;
|
|
5473
5497
|
if (ref) {
|
|
5474
5498
|
if (typeof ref === "function") {
|
|
@@ -5480,31 +5504,31 @@ const FileUpload = React.forwardRef((props, ref) => {
|
|
|
5480
5504
|
}, onChange: handleChangeEvent, disabled: isDisabled }, otherProps))] });
|
|
5481
5505
|
});
|
|
5482
5506
|
const UploadedFileSection = ({ file, onRemove }) => {
|
|
5483
|
-
return jsxRuntime.jsx("div", { className: "ui
|
|
5507
|
+
return jsxRuntime.jsx("div", { className: "ui:inline-block ui:flex-row ui:rounded-lg ui:bg-blue-100", children: jsxRuntime.jsxs(Stack, { axis: "x", justify: "center", align: "center", gap: "xxxs", py: "xxs", px: "m", title: file.name, children: [jsxRuntime.jsx(Text, { truncate: true, className: "ui:max-w-55", children: file.name }), jsxRuntime.jsx(TertiaryButton, { icon: "TrashBinIcon", onClick: onRemove })] }) });
|
|
5484
5508
|
};
|
|
5485
5509
|
|
|
5486
5510
|
const StatusIndicator = (props) => {
|
|
5487
5511
|
const { status, children } = props;
|
|
5488
|
-
return jsxRuntime.jsxs("div", { className: "ui
|
|
5489
|
-
"ui
|
|
5490
|
-
"ui
|
|
5491
|
-
"ui
|
|
5512
|
+
return jsxRuntime.jsxs("div", { className: "ui:flex ui:flex-row ui:items-center ui:gap-x-s", children: [jsxRuntime.jsx("div", { className: classNames__default.default("ui:h-3 ui:w-3 ui:rounded-full", {
|
|
5513
|
+
"ui:bg-green-500": status === "fine",
|
|
5514
|
+
"ui:bg-amber-500": status === "caution",
|
|
5515
|
+
"ui:bg-red-500": status === "danger"
|
|
5492
5516
|
}) }), children] });
|
|
5493
5517
|
};
|
|
5494
5518
|
|
|
5495
5519
|
const Skeleton = ({ width, height, variant = "text", children }) => {
|
|
5496
|
-
const base = `ui
|
|
5520
|
+
const base = `ui:bg-slate-300 ui:animate-pulse ui:block ${String.raw(templateObject_1 || (templateObject_1 = __makeTemplateObject([void 0], ["ui:before:content-['\\00a0']"])))}`;
|
|
5497
5521
|
const className = classNames__default.default(base, {
|
|
5498
|
-
"ui
|
|
5499
|
-
"ui
|
|
5500
|
-
"ui
|
|
5522
|
+
"ui:rounded": variant === "rounded" || variant === "text",
|
|
5523
|
+
"ui:rounded-full": variant === "circular",
|
|
5524
|
+
"ui:scale-y-75 ui:origin-[0_55%] ui:height-auto": variant === "text"
|
|
5501
5525
|
});
|
|
5502
5526
|
return jsxRuntime.jsx("span", { className, style: { width, height }, children });
|
|
5503
5527
|
};
|
|
5504
5528
|
var templateObject_1;
|
|
5505
5529
|
|
|
5506
5530
|
const LoadingState = () => {
|
|
5507
|
-
return jsxRuntime.jsx(Card, { className: classNames__default.default("ui
|
|
5531
|
+
return jsxRuntime.jsx(Card, { className: classNames__default.default("ui:w-full ui:border ui:border-slate-100"), padding: false, elevation: "surface", children: jsxRuntime.jsx(Box, { children: jsxRuntime.jsxs(Stack, { width: "full", p: "m", axis: "x", justify: "between", align: "center", children: [jsxRuntime.jsx(Stack, { gap: "xs", width: "full", children: jsxRuntime.jsxs(Stack, { gap: "m", axis: "x", align: "center", width: "full", children: [jsxRuntime.jsx(Skeleton, { variant: "rounded", width: 24, height: 24 }), jsxRuntime.jsxs(Stack, { width: "full", children: [jsxRuntime.jsx(Title, { variant: "xs", children: jsxRuntime.jsx(Skeleton, { width: 120 }) }), jsxRuntime.jsx(Text, { variant: "sm", color: "slate-500", children: jsxRuntime.jsx(Skeleton, { width: 100 }) })] })] }) }), jsxRuntime.jsx(Skeleton, { variant: "rounded", width: 24, height: 24 })] }) }) });
|
|
5508
5532
|
};
|
|
5509
5533
|
|
|
5510
5534
|
const TimelineCard = ({ title, subtitle, icon, leadingIcon, trailingIcon, statusText, state = "default", variant, disabled = false, isLoading = false, onClick }) => {
|
|
@@ -5512,33 +5536,33 @@ const TimelineCard = ({ title, subtitle, icon, leadingIcon, trailingIcon, status
|
|
|
5512
5536
|
const getTitle = () => {
|
|
5513
5537
|
return typeof title === "string" ? jsxRuntime.jsx(Text, { variant: "base", color: "slate-500", children: title }) : title;
|
|
5514
5538
|
};
|
|
5515
|
-
return jsxRuntime.jsxs(Stack, { axis: "x", width: "full", align: "center", children: [isLoading ? jsxRuntime.jsx(LoadingState, {}) : jsxRuntime.jsx(Card, { as: onClick ? "button" : "div", className: classNames__default.default("ui
|
|
5516
|
-
"ui
|
|
5539
|
+
return jsxRuntime.jsxs(Stack, { axis: "x", width: "full", align: "center", children: [isLoading ? jsxRuntime.jsx(LoadingState, {}) : jsxRuntime.jsx(Card, { as: onClick ? "button" : "div", className: classNames__default.default("ui:w-full ui:border ui:border-slate-100", {
|
|
5540
|
+
"ui:text-start ui:hover:border-slate-200 ui:focus:border-blue-800 ui:focus:outline-primary": onClick
|
|
5517
5541
|
}), padding: false, elevation: presentation === "highlighted" ? "medium" : "surface", onClick, disabled, children: jsxRuntime.jsx(Box, { className: classNames__default.default({
|
|
5518
|
-
["ui
|
|
5519
|
-
}), children: jsxRuntime.jsxs(Stack, { width: "full", p: "m", axis: "x", justify: "between", align: "center", children: [jsxRuntime.jsxs(Stack, { gap: "xs", children: [statusText && jsxRuntime.jsx(Text, { variant: "sm", color: "slate-500", children: statusText }), jsxRuntime.jsxs(Stack, { gap: "m", axis: "x", align: "center", children: [(icon === null || icon === void 0 ? void 0 : icon.url) && jsxRuntime.jsx("img", { className: "ui
|
|
5520
|
-
["ui
|
|
5542
|
+
["ui:border-l-8 ui:border-primary"]: presentation === "highlighted"
|
|
5543
|
+
}), children: jsxRuntime.jsxs(Stack, { width: "full", p: "m", axis: "x", justify: "between", align: "center", children: [jsxRuntime.jsxs(Stack, { gap: "xs", children: [statusText && jsxRuntime.jsx(Text, { variant: "sm", color: "slate-500", children: statusText }), jsxRuntime.jsxs(Stack, { gap: "m", axis: "x", align: "center", children: [(icon === null || icon === void 0 ? void 0 : icon.url) && jsxRuntime.jsx("img", { className: "ui:shrink-0", width: 24, height: 24, src: icon.url }), (icon === null || icon === void 0 ? void 0 : icon.iconKey) && jsxRuntime.jsx(Icon, { className: "ui:shrink-0", name: icon.iconKey }), leadingIcon, jsxRuntime.jsxs(Stack, { width: "full", children: [(presentation === "bold" || presentation === "highlighted") && jsxRuntime.jsx(Title, { variant: "xs", children: title }), presentation === "default" && getTitle(), typeof subtitle === "string" ? jsxRuntime.jsx(Text, { variant: "sm", color: "slate-500", children: subtitle }) : subtitle] })] })] }), trailingIcon] }) }) }), jsxRuntime.jsx("svg", { role: "presentation", width: "17", height: "27", viewBox: "0 0 17 27", fill: "none", className: classNames__default.default("ui:translate-x-[-1.5px]", {
|
|
5544
|
+
["ui:invisible"]: presentation !== "highlighted"
|
|
5521
5545
|
}), children: jsxRuntime.jsx("path", { d: "M0.5 0.5L16 13L0.5 26", stroke: "rgb(226 232 240)", fill: "#fff" }) })] });
|
|
5522
5546
|
};
|
|
5523
5547
|
|
|
5524
|
-
const TimelineDot = ({ className }) => jsxRuntime.jsx("svg", { width: "24", height: "24", fill: "none", className, children: jsxRuntime.jsx("circle", { width: "16", height: "16", cx: "12", cy: "12", r: "8", className: "ui
|
|
5525
|
-
const TimelineEmphasizedDot = ({ className }) => jsxRuntime.jsx("svg", { width: "24", height: "24", fill: "none", className, children: jsxRuntime.jsx("circle", { cx: "12", cy: "11.5", r: "9.5", className: "ui
|
|
5548
|
+
const TimelineDot = ({ className }) => jsxRuntime.jsx("svg", { width: "24", height: "24", fill: "none", className, children: jsxRuntime.jsx("circle", { width: "16", height: "16", cx: "12", cy: "12", r: "8", className: "ui:fill-blue-300" }) });
|
|
5549
|
+
const TimelineEmphasizedDot = ({ className }) => jsxRuntime.jsx("svg", { width: "24", height: "24", fill: "none", className, children: jsxRuntime.jsx("circle", { cx: "12", cy: "11.5", r: "9.5", className: "ui:fill-white ui:stroke-blue-800 ui:stroke-[4px]" }) });
|
|
5526
5550
|
const TimelineCardLayout = (_a) => {
|
|
5527
5551
|
var { dotStyle, lineStyle = "solid", children } = _a, stackProps = __rest(_a, ["dotStyle", "lineStyle", "children"]);
|
|
5528
|
-
return jsxRuntime.jsxs(Stack, Object.assign({ axis: "x", gap: "s", width: "full", align: "stretch" }, stackProps, { children: [jsxRuntime.jsx("div", { "aria-hidden": "true", className: classNames__default.default("ui
|
|
5529
|
-
"ui
|
|
5530
|
-
"ui
|
|
5531
|
-
}), children: [dotStyle === "emphasized" && jsxRuntime.jsx(TimelineEmphasizedDot, { className: "ui
|
|
5552
|
+
return jsxRuntime.jsxs(Stack, Object.assign({ axis: "x", gap: "s", width: "full", align: "stretch" }, stackProps, { children: [jsxRuntime.jsx("div", { "aria-hidden": "true", className: classNames__default.default("ui:relative ui:w-full ui:max-w-[24px] ui:bg-position-[left_11px_top]"), children: jsxRuntime.jsxs("div", { className: classNames__default.default("ui:absolute ui:top-[-8px] ui:h-[calc(100%+16px)] ui:w-full ui:max-w-[24px] ui:bg-position-[left_11px_top]", {
|
|
5553
|
+
"ui:timelineCardLayout-line--dashed": lineStyle === "dashed",
|
|
5554
|
+
"ui:timelineCardLayout-line--solid": lineStyle === "solid"
|
|
5555
|
+
}), children: [dotStyle === "emphasized" && jsxRuntime.jsx(TimelineEmphasizedDot, { className: "ui:absolute ui:bottom-0 ui:top-0 ui:my-auto" }), dotStyle === "regular" && jsxRuntime.jsx(TimelineDot, { className: "ui:absolute ui:bottom-0 ui:top-0 ui:my-auto" })] }) }), jsxRuntime.jsx(Box, { width: "full", children })] }));
|
|
5532
5556
|
};
|
|
5533
5557
|
|
|
5534
5558
|
const StyledBaseList = (_a) => {
|
|
5535
5559
|
var { children, className, color = "base", variant = "base", listVariant = "unordered", position = "inside" } = _a, rest = __rest(_a, ["children", "className", "color", "variant", "listVariant", "position"]);
|
|
5536
|
-
const classes = classNames__default.default("ui
|
|
5537
|
-
"ui
|
|
5538
|
-
"ui
|
|
5539
|
-
"ui
|
|
5540
|
-
"ui
|
|
5541
|
-
"ui
|
|
5560
|
+
const classes = classNames__default.default("ui:list-inside", className, allowedColors[color], allowedTextStyles[variant], {
|
|
5561
|
+
"ui:list-outside": position === "outside",
|
|
5562
|
+
"ui:list-inside": position === "inside",
|
|
5563
|
+
"ui:list-disc": listVariant === "unordered" || listVariant === "unordered-nested",
|
|
5564
|
+
"ui:pl-l": listVariant === "unordered-nested",
|
|
5565
|
+
"ui:list-decimal": listVariant === "ordered"
|
|
5542
5566
|
});
|
|
5543
5567
|
const listElement = listVariant === "ordered" ? "ol" : "ul";
|
|
5544
5568
|
return jsxRuntime.jsx(Box, Object.assign({ as: listElement, className: classes }, rest, { children }));
|
|
@@ -5563,23 +5587,23 @@ StyledOrderedList.Item = StyledBaseList.Item;
|
|
|
5563
5587
|
const HoverIndicatorControlContext = React.createContext(null);
|
|
5564
5588
|
const HoverIndicatorControl = (_a) => {
|
|
5565
5589
|
var { indicator, className, as = "button", disabled = false } = _a, boxProps = __rest(_a, ["indicator", "className", "as", "disabled"]);
|
|
5566
|
-
return jsxRuntime.jsx(HoverIndicatorControlContext.Provider, { value: { indicator, disabled }, children: jsxRuntime.jsx(Box, Object.assign({ as, className: classNames__default.default(className, "ui
|
|
5567
|
-
"ui
|
|
5568
|
-
"ui
|
|
5590
|
+
return jsxRuntime.jsx(HoverIndicatorControlContext.Provider, { value: { indicator, disabled }, children: jsxRuntime.jsx(Box, Object.assign({ as, className: classNames__default.default(className, "ui:group", {
|
|
5591
|
+
"ui:cursor-pointer": !disabled,
|
|
5592
|
+
"ui:cursor-default": disabled
|
|
5569
5593
|
}) }, boxProps)) });
|
|
5570
5594
|
};
|
|
5571
5595
|
const Indicator = () => {
|
|
5572
5596
|
const context = React.useContext(HoverIndicatorControlContext);
|
|
5573
|
-
return jsxRuntime.jsx("div", { className: classNames__default.default({ "group-hover:
|
|
5597
|
+
return jsxRuntime.jsx("div", { className: classNames__default.default({ "ui:group-hover:visible": (context === null || context === void 0 ? void 0 : context.disabled) === false }, "ui:invisible"), children: context === null || context === void 0 ? void 0 : context.indicator });
|
|
5574
5598
|
};
|
|
5575
5599
|
HoverIndicatorControl.Indicator = Indicator;
|
|
5576
5600
|
|
|
5577
5601
|
const Collapse = (props) => {
|
|
5578
|
-
const { children, className, contentClassName: classNameFromProps, isCollapsed, onClick, moreIndicator = jsxRuntime.jsx(Text, { className: "ui
|
|
5602
|
+
const { children, className, contentClassName: classNameFromProps, isCollapsed, onClick, moreIndicator = jsxRuntime.jsx(Text, { className: "ui:text-center", children: "..." }), showMoreIndicator = true } = props;
|
|
5579
5603
|
const contentClassName = classNames__default.default("w-full", classNameFromProps, {
|
|
5580
|
-
"ui
|
|
5604
|
+
"ui:overflow-hidden": isCollapsed
|
|
5581
5605
|
});
|
|
5582
|
-
const buttonClassName = classNames__default.default("ui
|
|
5606
|
+
const buttonClassName = classNames__default.default("ui:text-left", className);
|
|
5583
5607
|
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("button", { className: buttonClassName, onClick, "aria-expanded": !isCollapsed, children: [jsxRuntime.jsx("div", { className: contentClassName, children }), isCollapsed && showMoreIndicator && moreIndicator] }) });
|
|
5584
5608
|
};
|
|
5585
5609
|
|
|
@@ -5590,22 +5614,23 @@ const useModalDialog = () => React.useContext(context);
|
|
|
5590
5614
|
const ModalDialog = (_a) => {
|
|
5591
5615
|
var { open, className, size, onClose, children, variant = "centered-dialog" } = _a, rest = __rest(_a, ["open", "className", "size", "onClose", "children", "variant"]);
|
|
5592
5616
|
const dialog = React.useRef(null);
|
|
5593
|
-
const classes = classNames__default.default("ui
|
|
5594
|
-
"ui
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
"md:
|
|
5598
|
-
"md:
|
|
5617
|
+
const classes = classNames__default.default("ui:bg-transparent", "ui:max-w-[calc(100dvw-(var(--ui-spacing-xl)))]", {
|
|
5618
|
+
"ui:my-xl": variant === "centered-dialog",
|
|
5619
|
+
"ui:mx-auto": variant === "centered-dialog"
|
|
5620
|
+
}, "ui:top-0", "ui:bottom-auto", {
|
|
5621
|
+
"ui:md:w-80": size === "s",
|
|
5622
|
+
"ui:md:w-132": size === "m",
|
|
5623
|
+
"ui:md:w-216": size === "l"
|
|
5599
5624
|
}, {
|
|
5600
|
-
"ui
|
|
5601
|
-
"ui
|
|
5602
|
-
"ui
|
|
5603
|
-
"ui
|
|
5625
|
+
"ui:right-0": variant === "side-modal",
|
|
5626
|
+
"ui:left-auto": variant === "side-modal",
|
|
5627
|
+
"ui:bottom-0": variant === "side-modal",
|
|
5628
|
+
"ui:max-h-full": variant === "side-modal"
|
|
5604
5629
|
}, {
|
|
5605
|
-
"ui
|
|
5606
|
-
"ui
|
|
5607
|
-
"ui
|
|
5608
|
-
"ui
|
|
5630
|
+
"ui:w-screen": variant === "full-screen",
|
|
5631
|
+
"ui:h-screen": variant === "full-screen",
|
|
5632
|
+
"ui:fixed ui:top-0 ui:bottom-0 ui:left-0 ui:right-0": variant === "full-screen",
|
|
5633
|
+
"ui:p-0": variant === "full-screen"
|
|
5609
5634
|
}, className);
|
|
5610
5635
|
React.useEffect(() => {
|
|
5611
5636
|
var _a2, _b;
|
|
@@ -5616,15 +5641,15 @@ const ModalDialog = (_a) => {
|
|
|
5616
5641
|
}
|
|
5617
5642
|
}, [open, variant]);
|
|
5618
5643
|
return jsxRuntime.jsx(context.Provider, { value: { $dialog: dialog.current }, children: jsxRuntime.jsx("dialog", Object.assign({ ref: dialog, className: classes, onClose }, rest, { children: jsxRuntime.jsx(Card, { padding: false, borderRadius: variant === "side-modal" ? "none" : "m", borderRadiusLeft: variant === "side-modal" ? "m" : "none", className: classNames__default.default({
|
|
5619
|
-
"ui
|
|
5644
|
+
"ui:h-screen": variant === "side-modal"
|
|
5620
5645
|
}), children: jsxRuntime.jsx(Stack, { width: "full", align: "stretch", className: classNames__default.default({
|
|
5621
|
-
"ui
|
|
5622
|
-
"ui
|
|
5646
|
+
"ui:max-h-[calc(100dvh-(var(--ui-spacing-xl))*2)]": variant === "centered-dialog",
|
|
5647
|
+
"ui:h-screen": variant === "side-modal"
|
|
5623
5648
|
}), children }) }) })) });
|
|
5624
5649
|
};
|
|
5625
5650
|
const Body = (_a) => {
|
|
5626
5651
|
var { className } = _a, rest = __rest(_a, ["className"]);
|
|
5627
|
-
const classes = classNames__default.default(className, "ui
|
|
5652
|
+
const classes = classNames__default.default(className, "ui:overflow-y-auto ui:flex-1");
|
|
5628
5653
|
return jsxRuntime.jsx(Box, Object.assign({ className: classes, p: "m" }, rest));
|
|
5629
5654
|
};
|
|
5630
5655
|
const Header = (props) => {
|
|
@@ -5638,7 +5663,7 @@ const CloseButton = (props) => {
|
|
|
5638
5663
|
};
|
|
5639
5664
|
const Actions = (_a) => {
|
|
5640
5665
|
var { className } = _a, rest = __rest(_a, ["className"]);
|
|
5641
|
-
const classes = classNames__default.default(className, "ui
|
|
5666
|
+
const classes = classNames__default.default(className, "ui:self-end");
|
|
5642
5667
|
return jsxRuntime.jsx(Stack, Object.assign({ axis: "x", gap: "xs", className: classes }, rest));
|
|
5643
5668
|
};
|
|
5644
5669
|
ModalDialog.Header = Header;
|
|
@@ -5651,8 +5676,8 @@ ModalDialog.useModalDialog = useModalDialog;
|
|
|
5651
5676
|
|
|
5652
5677
|
const AsideLayout = (_a) => {
|
|
5653
5678
|
var { aside, children } = _a, rest = __rest(_a, ["aside", "children"]);
|
|
5654
|
-
const containerClasses = classNames__default.default("ui
|
|
5655
|
-
const asideContainerClassNames = classNames__default.default("ui
|
|
5679
|
+
const containerClasses = classNames__default.default("ui:flex-col ui:md:flex-row");
|
|
5680
|
+
const asideContainerClassNames = classNames__default.default("ui:w-full ui:md:w-60 ui:lg:w-72");
|
|
5656
5681
|
return jsxRuntime.jsxs(Stack, Object.assign({ className: containerClasses, align: "stretch", width: "full" }, rest, { children: [jsxRuntime.jsx(Box, { className: asideContainerClassNames, children: aside }), jsxRuntime.jsx(Box, { width: "full", children })] }));
|
|
5657
5682
|
};
|
|
5658
5683
|
|
|
@@ -5681,29 +5706,28 @@ const isSupportedFileType = (fileUrl) => {
|
|
|
5681
5706
|
return isSupportedImage(fileUrl) || isSupportedFile(fileUrl);
|
|
5682
5707
|
};
|
|
5683
5708
|
const ButtonTooltipContent = ({ children }) => {
|
|
5684
|
-
return jsxRuntime.jsxs(Tooltip__namespace.Content, { className: classNames__default.default("ui
|
|
5709
|
+
return jsxRuntime.jsxs(Tooltip__namespace.Content, { className: classNames__default.default("ui:max-w-55", "ui:data-[state=delayed-open]:animate-in ui:data-[state=closed]:animate-out ui:data-[state=closed]:fade-out-0 ui:data-[state=delayed-open]:fade-in-0 ui:data-[state=closed]:zoom-out-95 ui:data-[state=delayed-open]:zoom-in-95 ui:data-[side=bottom]:slide-in-from-top-2 ui:data-[side=left]:slide-in-from-right-2 ui:data-[side=right]:slide-in-from-left-2 ui:data-[side=top]:slide-in-from-bottom-2"), sideOffset: 4, children: [jsxRuntime.jsx(Box, { backgroundColor: "secondary-background", px: "m", py: "xs", borderRadius: "xxxxs", children: jsxRuntime.jsx(Text, { color: "on-secondary", children }) }), jsxRuntime.jsx(Tooltip__namespace.Arrow, { width: 8, height: 8, className: "ui:fill-secondary-background" })] });
|
|
5685
5710
|
};
|
|
5686
|
-
const backdropClassNames = classNames__default.default("backdrop:
|
|
5711
|
+
const backdropClassNames = classNames__default.default("ui:backdrop:backdrop-blur-sm", "ui:backdrop:bg-overlay-dark");
|
|
5687
5712
|
const previewClassNames = classNames__default.default(
|
|
5688
|
-
"ui
|
|
5689
|
-
"ui
|
|
5690
|
-
"ui
|
|
5691
|
-
"ui
|
|
5692
|
-
"ui
|
|
5713
|
+
"ui:h-screen",
|
|
5714
|
+
"ui:w-screen",
|
|
5715
|
+
"ui:my-0",
|
|
5716
|
+
"ui:py-l",
|
|
5717
|
+
"ui:px-34",
|
|
5693
5718
|
// Width of the buttons + padding
|
|
5694
|
-
"ui
|
|
5695
|
-
"ui
|
|
5719
|
+
"ui:fixed ui:top-0 ui:bottom-0 ui:left-0 ui:right-0",
|
|
5720
|
+
"ui:bg-transparent"
|
|
5696
5721
|
);
|
|
5697
|
-
const buttonContainerClassNames = classNames__default.default("ui
|
|
5722
|
+
const buttonContainerClassNames = classNames__default.default("ui:fixed ui:top-l ui:right-l");
|
|
5698
5723
|
const imageClassNames = classNames__default.default(
|
|
5699
|
-
"ui
|
|
5700
|
-
"ui-max-h-[calc(100vh-theme(spacing.12))]"
|
|
5724
|
+
"ui:max-h-[calc(100vh-(--spacing(12)))]"
|
|
5701
5725
|
// Full height minus the padding
|
|
5702
5726
|
);
|
|
5703
5727
|
const fileClassNames = classNames__default.default(
|
|
5704
|
-
"ui
|
|
5728
|
+
"ui:w-[calc(100vw-(--spacing(68)))]",
|
|
5705
5729
|
// Full width minus the padding
|
|
5706
|
-
"ui
|
|
5730
|
+
"ui:h-[calc(100vh-(--spacing(12)))]"
|
|
5707
5731
|
// Full height minus the padding
|
|
5708
5732
|
);
|
|
5709
5733
|
const FilePreview = (props) => {
|
|
@@ -5736,16 +5760,16 @@ const AlertWidget = (props) => {
|
|
|
5736
5760
|
default:
|
|
5737
5761
|
throw new TypeError(`The \`variant\` property in AlertWidget can only be one from \`red\`, \`amber\` or \`gray\` - saw [${props.variant}]`);
|
|
5738
5762
|
}
|
|
5739
|
-
return jsxRuntime.jsxs(Stack, { className: classNames__default.default(["ui
|
|
5740
|
-
"ui
|
|
5741
|
-
"ui
|
|
5742
|
-
"ui
|
|
5743
|
-
"ui
|
|
5744
|
-
"ui
|
|
5745
|
-
"ui
|
|
5746
|
-
"ui
|
|
5747
|
-
"ui
|
|
5748
|
-
"ui
|
|
5763
|
+
return jsxRuntime.jsxs(Stack, { className: classNames__default.default(["ui:border", "ui:inline-flex ui:py-1"], {
|
|
5764
|
+
"ui:bg-neutral-background": props.variant === "gray",
|
|
5765
|
+
"ui:border-neutral-border-high-contrast": props.variant === "gray",
|
|
5766
|
+
"ui:text-on-surface": props.variant === "gray",
|
|
5767
|
+
"ui:bg-negative-background": props.variant === "red",
|
|
5768
|
+
"ui:border-on-negative": props.variant === "red",
|
|
5769
|
+
"ui:text-on-negative": props.variant === "gray",
|
|
5770
|
+
"ui:bg-warning-background": props.variant === "amber",
|
|
5771
|
+
"ui:border-on-warning": props.variant === "amber",
|
|
5772
|
+
"ui:text-on-warning": props.variant === "amber"
|
|
5749
5773
|
}), borderRadius: "xxs", px: "xxs", py: "xxxxs", axis: "x", gap: "xxs", align: "center", children: [jsxRuntime.jsx(IconComponent, {}), typeof props.content === "string" ? jsxRuntime.jsx(Text, { color: contentTextColor, variant: "strong", children: props.content }) : props.content] });
|
|
5750
5774
|
};
|
|
5751
5775
|
|