@luscii-healthtech/web-ui 30.0.4 → 30.1.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/components/ConfirmationDialog/types/ConfirmationDialog.types.d.ts +5 -1
- package/dist/index.development.js +179 -177
- package/dist/index.development.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
import type { IconKey, IconProps } from "../../Icons/types/IconProps.type";
|
|
3
3
|
import type { NotificationBannerColor } from "../../NotificationBanner/NotificationBanner";
|
|
4
4
|
interface ConfirmationDialogTexts {
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* You can also use the `children` prop for this.
|
|
7
|
+
*/
|
|
8
|
+
message?: string | string[];
|
|
6
9
|
confirmLabel: string;
|
|
7
10
|
cancelLabel: string;
|
|
8
11
|
}
|
|
@@ -16,6 +19,7 @@ export interface ConfirmationDialogChoice<T extends string = string> {
|
|
|
16
19
|
};
|
|
17
20
|
}
|
|
18
21
|
export interface ConfirmationDialogProps {
|
|
22
|
+
children?: React.ReactNode;
|
|
19
23
|
texts: ConfirmationDialogTexts;
|
|
20
24
|
isOpen: boolean;
|
|
21
25
|
onCancel: () => void;
|
|
@@ -7,11 +7,11 @@ var isString = require('lodash/isString');
|
|
|
7
7
|
var lodash = require('lodash');
|
|
8
8
|
var core = require('@dnd-kit/core');
|
|
9
9
|
var sortable = require('@dnd-kit/sortable');
|
|
10
|
+
var omit = require('lodash.omit');
|
|
10
11
|
var reactLazyLoadImageComponent = require('react-lazy-load-image-component');
|
|
11
12
|
var utilities = require('@dnd-kit/utilities');
|
|
12
13
|
var ReactTooltip = require('react-tooltip');
|
|
13
14
|
var router = require('@reach/router');
|
|
14
|
-
var omit = require('lodash.omit');
|
|
15
15
|
var ReactModal = require('react-modal');
|
|
16
16
|
var Glider = require('react-glider');
|
|
17
17
|
require('glider-js/glider.min.css');
|
|
@@ -58,8 +58,8 @@ function _interopNamespace(e) {
|
|
|
58
58
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
59
59
|
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
60
60
|
var isString__default = /*#__PURE__*/_interopDefault(isString);
|
|
61
|
-
var ReactTooltip__default = /*#__PURE__*/_interopDefault(ReactTooltip);
|
|
62
61
|
var omit__default = /*#__PURE__*/_interopDefault(omit);
|
|
62
|
+
var ReactTooltip__default = /*#__PURE__*/_interopDefault(ReactTooltip);
|
|
63
63
|
var ReactModal__default = /*#__PURE__*/_interopDefault(ReactModal);
|
|
64
64
|
var Glider__default = /*#__PURE__*/_interopDefault(Glider);
|
|
65
65
|
var ReactDatePicker__default = /*#__PURE__*/_interopDefault(ReactDatePicker);
|
|
@@ -1280,6 +1280,178 @@ const DragHandle = React.forwardRef((_a, ref) => {
|
|
|
1280
1280
|
);
|
|
1281
1281
|
});
|
|
1282
1282
|
|
|
1283
|
+
const ELEVATION = {
|
|
1284
|
+
surface: "none",
|
|
1285
|
+
base: "0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06)",
|
|
1286
|
+
small: "0px 1px 2px rgba(0, 0, 0, 0.05)",
|
|
1287
|
+
medium: "0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06)",
|
|
1288
|
+
large: "0px 10px 15px -3px rgba(0, 0, 0, 0.1), 0px 4px 6px -2px rgba(0, 0, 0, 0.05)",
|
|
1289
|
+
extraLarge: "0px 6px 10px rgba(0, 0, 0, 0.14), 0px 1px 18px rgba(0, 0, 0, 0.12), 0px 3px 5px rgba(0, 0, 0, 0.2)",
|
|
1290
|
+
drag: "0px 20px 25px -5px rgba(0, 0, 0, 0.1), 0px 10px 10px -5px rgba(0, 0, 0, 0.04)"
|
|
1291
|
+
};
|
|
1292
|
+
|
|
1293
|
+
const createShadowClassName = (elevation, options) => {
|
|
1294
|
+
if (!elevation || !ELEVATION[elevation]) {
|
|
1295
|
+
return "";
|
|
1296
|
+
}
|
|
1297
|
+
const { modifier, transition } = options || {};
|
|
1298
|
+
let transitionClassName = "";
|
|
1299
|
+
if (transition) {
|
|
1300
|
+
transitionClassName = classNames__default.default({
|
|
1301
|
+
"hover:ui-transition-shadow ui-duration-300": modifier === "hover",
|
|
1302
|
+
"focus:ui-transition-shadow ui-duration-300": modifier === "focus",
|
|
1303
|
+
"active:ui-transition-shadow ui-duration-300": modifier === "active"
|
|
1304
|
+
});
|
|
1305
|
+
}
|
|
1306
|
+
if (!modifier) {
|
|
1307
|
+
return classNames__default.default({
|
|
1308
|
+
"ui-shadow-base": elevation === "base",
|
|
1309
|
+
"ui-shadow-small": elevation === "small",
|
|
1310
|
+
"ui-shadow-medium": elevation === "medium",
|
|
1311
|
+
"ui-shadow-large": elevation === "large",
|
|
1312
|
+
"ui-shadow-surface": elevation === "surface",
|
|
1313
|
+
"ui-shadow-extraLarge": elevation === "extraLarge",
|
|
1314
|
+
"ui-shadow-drag": elevation === "drag"
|
|
1315
|
+
}, transitionClassName);
|
|
1316
|
+
}
|
|
1317
|
+
if (modifier === "hover") {
|
|
1318
|
+
return classNames__default.default({
|
|
1319
|
+
"hover:ui-shadow-base": elevation === "base",
|
|
1320
|
+
"hover:ui-shadow-small": elevation === "small",
|
|
1321
|
+
"hover:ui-shadow-medium": elevation === "medium",
|
|
1322
|
+
"hover:ui-shadow-large": elevation === "large",
|
|
1323
|
+
"hover:ui-shadow-surface": elevation === "surface",
|
|
1324
|
+
"hover:ui-shadow-extraLarge": elevation === "extraLarge",
|
|
1325
|
+
"hover:ui-shadow-drag": elevation === "drag"
|
|
1326
|
+
}, transitionClassName);
|
|
1327
|
+
}
|
|
1328
|
+
if (modifier === "focus") {
|
|
1329
|
+
return classNames__default.default({
|
|
1330
|
+
"focus:ui-shadow-base": elevation === "base",
|
|
1331
|
+
"focus:ui-shadow-small": elevation === "small",
|
|
1332
|
+
"focus:ui-shadow-medium": elevation === "medium",
|
|
1333
|
+
"focus:ui-shadow-large": elevation === "large",
|
|
1334
|
+
"focus:ui-shadow-surface": elevation === "surface",
|
|
1335
|
+
"focus:ui-shadow-extraLarge": elevation === "extraLarge",
|
|
1336
|
+
"focus:ui-shadow-drag": elevation === "drag"
|
|
1337
|
+
}, transitionClassName);
|
|
1338
|
+
}
|
|
1339
|
+
return classNames__default.default({
|
|
1340
|
+
"active:ui-shadow-base": elevation === "base",
|
|
1341
|
+
"active:ui-shadow-small": elevation === "small",
|
|
1342
|
+
"active:ui-shadow-medium": elevation === "medium",
|
|
1343
|
+
"active:ui-shadow-large": elevation === "large",
|
|
1344
|
+
"active:ui-shadow-surface": elevation === "surface",
|
|
1345
|
+
"active:ui-shadow-extraLarge": elevation === "extraLarge",
|
|
1346
|
+
"active:ui-shadow-drag": elevation === "drag"
|
|
1347
|
+
}, transitionClassName);
|
|
1348
|
+
};
|
|
1349
|
+
|
|
1350
|
+
const SIZES = {
|
|
1351
|
+
/**
|
|
1352
|
+
* Represents the tiny size of 4px.
|
|
1353
|
+
*/
|
|
1354
|
+
xxxxs: "4px",
|
|
1355
|
+
/**
|
|
1356
|
+
* Represents a very extra extra small size of 6px.
|
|
1357
|
+
*/
|
|
1358
|
+
xxxs: "6px",
|
|
1359
|
+
/**
|
|
1360
|
+
* Represents an extra extra small size of 8px.
|
|
1361
|
+
*/
|
|
1362
|
+
xxs: "8px",
|
|
1363
|
+
/**
|
|
1364
|
+
* Represents an extra small size of 10px.
|
|
1365
|
+
*/
|
|
1366
|
+
xs: "10px",
|
|
1367
|
+
/**
|
|
1368
|
+
* Represents a small size of 12px.
|
|
1369
|
+
*/
|
|
1370
|
+
s: "12px",
|
|
1371
|
+
/**
|
|
1372
|
+
* Represents a medium size of 16px.
|
|
1373
|
+
*/
|
|
1374
|
+
m: "16px",
|
|
1375
|
+
/**
|
|
1376
|
+
* Represents a large size of 24px.
|
|
1377
|
+
*/
|
|
1378
|
+
l: "24px",
|
|
1379
|
+
/**
|
|
1380
|
+
* Represents an extra large size of 32px.
|
|
1381
|
+
*/
|
|
1382
|
+
xl: "32px",
|
|
1383
|
+
/**
|
|
1384
|
+
* Represents an extra extra large size of 32px.
|
|
1385
|
+
*/
|
|
1386
|
+
xxl: "32px"
|
|
1387
|
+
};
|
|
1388
|
+
|
|
1389
|
+
const createRadiusClassName = (borderRadius) => {
|
|
1390
|
+
if (!borderRadius || !SIZES[borderRadius]) {
|
|
1391
|
+
return "";
|
|
1392
|
+
}
|
|
1393
|
+
return classNames__default.default({
|
|
1394
|
+
"ui-radius-xxxxs": borderRadius === "xxxxs",
|
|
1395
|
+
"ui-radius-xxxs": borderRadius === "xxxs",
|
|
1396
|
+
"ui-radius-xxs": borderRadius === "xxs",
|
|
1397
|
+
"ui-radius-xs": borderRadius === "xs",
|
|
1398
|
+
"ui-radius-s": borderRadius === "s",
|
|
1399
|
+
"ui-radius-m": borderRadius === "m",
|
|
1400
|
+
"ui-radius-l": borderRadius === "l",
|
|
1401
|
+
"ui-radius-xl": borderRadius === "xl",
|
|
1402
|
+
"ui-radius-xxl": borderRadius === "xxl"
|
|
1403
|
+
});
|
|
1404
|
+
};
|
|
1405
|
+
|
|
1406
|
+
const spacingKeys = [
|
|
1407
|
+
"p",
|
|
1408
|
+
"pt",
|
|
1409
|
+
"pr",
|
|
1410
|
+
"pb",
|
|
1411
|
+
"pl",
|
|
1412
|
+
"px",
|
|
1413
|
+
"py",
|
|
1414
|
+
"m",
|
|
1415
|
+
"mt",
|
|
1416
|
+
"mr",
|
|
1417
|
+
"mb",
|
|
1418
|
+
"ml",
|
|
1419
|
+
"mx",
|
|
1420
|
+
"my"
|
|
1421
|
+
];
|
|
1422
|
+
const createSpacingClassNames = (keys, spacingProps) => {
|
|
1423
|
+
return keys.filter((key) => spacingProps[key]).map((key) => `ui-${key}-${spacingProps[key]}`).join(" ");
|
|
1424
|
+
};
|
|
1425
|
+
const Box = (props) => {
|
|
1426
|
+
const { as: Element = "div", borderRadius, className, elevation, width } = props, attributes = __rest(props, ["as", "borderRadius", "className", "elevation", "width"]);
|
|
1427
|
+
const spacingClasses = createSpacingClassNames(spacingKeys, props);
|
|
1428
|
+
const shadowClassName = createShadowClassName(elevation);
|
|
1429
|
+
const borderRadiusClassName = createRadiusClassName(borderRadius);
|
|
1430
|
+
const attributesWithoutSpacingKeys = omit__default.default(attributes, spacingKeys);
|
|
1431
|
+
return React__namespace.default.createElement(Element, Object.assign({ className: classNames__default.default(spacingClasses, {
|
|
1432
|
+
"ui-bg-slate-100": props.backgroundColor === "base",
|
|
1433
|
+
"ui-bg-blue-50": props.backgroundColor === "blue",
|
|
1434
|
+
"ui-bg-red-50": props.backgroundColor === "red",
|
|
1435
|
+
" ui-bg-green-50": props.backgroundColor === "green",
|
|
1436
|
+
" ui-bg-amber-50": props.backgroundColor === "amber",
|
|
1437
|
+
[`ui-w-${width}`]: width && width !== "full",
|
|
1438
|
+
"ui-w-full": width === "full"
|
|
1439
|
+
}, className, shadowClassName, borderRadiusClassName) }, attributesWithoutSpacingKeys));
|
|
1440
|
+
};
|
|
1441
|
+
|
|
1442
|
+
const Stack = (props) => {
|
|
1443
|
+
const { children, gap, align = "start", justify = "normal", axis = "y", className, reverse, wrap = false } = props, attributes = __rest(props, ["children", "gap", "align", "justify", "axis", "className", "reverse", "wrap"]);
|
|
1444
|
+
const stackClasses = classNames__default.default(`ui-flex`, {
|
|
1445
|
+
"ui-flex-row": axis === "x",
|
|
1446
|
+
"ui-flex-col": axis === "y",
|
|
1447
|
+
"ui-flex-row-reverse": axis === "x" && reverse,
|
|
1448
|
+
"ui-flex-col-reverse": axis === "y" && reverse,
|
|
1449
|
+
"ui-flex-wrap": wrap,
|
|
1450
|
+
[`ui-gap-${gap}`]: gap
|
|
1451
|
+
}, `ui-items-${align} ui-justify-${justify}`);
|
|
1452
|
+
return React__namespace.default.createElement(Box, Object.assign({ className: classNames__default.default(stackClasses, className) }, attributes), children);
|
|
1453
|
+
};
|
|
1454
|
+
|
|
1283
1455
|
var img$i = "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";
|
|
1284
1456
|
|
|
1285
1457
|
const Image$1 = (_a) => {
|
|
@@ -1352,7 +1524,7 @@ const BaseListItem = React__namespace.default.forwardRef(({ itemId, title, toolt
|
|
|
1352
1524
|
subtitle && (typeof subtitle === "string" ? React__namespace.default.createElement(Text, { variant: "sm", color: "slate-500" }, subtitle) : subtitle)
|
|
1353
1525
|
),
|
|
1354
1526
|
React__namespace.default.createElement("div", { className: "ui-flex-grow" }),
|
|
1355
|
-
React__namespace.default.createElement("
|
|
1527
|
+
React__namespace.default.createElement(Stack, { axis: "x", gap: "m", align: "center", className: classNames__default.default({
|
|
1356
1528
|
"ui-opacity-0": onlyShowAccessoriesOnHover,
|
|
1357
1529
|
"group-hover:ui-opacity-100": onlyShowAccessoriesOnHover
|
|
1358
1530
|
}) }, accessories)
|
|
@@ -2075,178 +2247,6 @@ const CenteredHero = ({ title, text, image, buttons = [], background = "slate-50
|
|
|
2075
2247
|
);
|
|
2076
2248
|
};
|
|
2077
2249
|
|
|
2078
|
-
const ELEVATION = {
|
|
2079
|
-
surface: "none",
|
|
2080
|
-
base: "0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06)",
|
|
2081
|
-
small: "0px 1px 2px rgba(0, 0, 0, 0.05)",
|
|
2082
|
-
medium: "0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06)",
|
|
2083
|
-
large: "0px 10px 15px -3px rgba(0, 0, 0, 0.1), 0px 4px 6px -2px rgba(0, 0, 0, 0.05)",
|
|
2084
|
-
extraLarge: "0px 6px 10px rgba(0, 0, 0, 0.14), 0px 1px 18px rgba(0, 0, 0, 0.12), 0px 3px 5px rgba(0, 0, 0, 0.2)",
|
|
2085
|
-
drag: "0px 20px 25px -5px rgba(0, 0, 0, 0.1), 0px 10px 10px -5px rgba(0, 0, 0, 0.04)"
|
|
2086
|
-
};
|
|
2087
|
-
|
|
2088
|
-
const createShadowClassName = (elevation, options) => {
|
|
2089
|
-
if (!elevation || !ELEVATION[elevation]) {
|
|
2090
|
-
return "";
|
|
2091
|
-
}
|
|
2092
|
-
const { modifier, transition } = options || {};
|
|
2093
|
-
let transitionClassName = "";
|
|
2094
|
-
if (transition) {
|
|
2095
|
-
transitionClassName = classNames__default.default({
|
|
2096
|
-
"hover:ui-transition-shadow ui-duration-300": modifier === "hover",
|
|
2097
|
-
"focus:ui-transition-shadow ui-duration-300": modifier === "focus",
|
|
2098
|
-
"active:ui-transition-shadow ui-duration-300": modifier === "active"
|
|
2099
|
-
});
|
|
2100
|
-
}
|
|
2101
|
-
if (!modifier) {
|
|
2102
|
-
return classNames__default.default({
|
|
2103
|
-
"ui-shadow-base": elevation === "base",
|
|
2104
|
-
"ui-shadow-small": elevation === "small",
|
|
2105
|
-
"ui-shadow-medium": elevation === "medium",
|
|
2106
|
-
"ui-shadow-large": elevation === "large",
|
|
2107
|
-
"ui-shadow-surface": elevation === "surface",
|
|
2108
|
-
"ui-shadow-extraLarge": elevation === "extraLarge",
|
|
2109
|
-
"ui-shadow-drag": elevation === "drag"
|
|
2110
|
-
}, transitionClassName);
|
|
2111
|
-
}
|
|
2112
|
-
if (modifier === "hover") {
|
|
2113
|
-
return classNames__default.default({
|
|
2114
|
-
"hover:ui-shadow-base": elevation === "base",
|
|
2115
|
-
"hover:ui-shadow-small": elevation === "small",
|
|
2116
|
-
"hover:ui-shadow-medium": elevation === "medium",
|
|
2117
|
-
"hover:ui-shadow-large": elevation === "large",
|
|
2118
|
-
"hover:ui-shadow-surface": elevation === "surface",
|
|
2119
|
-
"hover:ui-shadow-extraLarge": elevation === "extraLarge",
|
|
2120
|
-
"hover:ui-shadow-drag": elevation === "drag"
|
|
2121
|
-
}, transitionClassName);
|
|
2122
|
-
}
|
|
2123
|
-
if (modifier === "focus") {
|
|
2124
|
-
return classNames__default.default({
|
|
2125
|
-
"focus:ui-shadow-base": elevation === "base",
|
|
2126
|
-
"focus:ui-shadow-small": elevation === "small",
|
|
2127
|
-
"focus:ui-shadow-medium": elevation === "medium",
|
|
2128
|
-
"focus:ui-shadow-large": elevation === "large",
|
|
2129
|
-
"focus:ui-shadow-surface": elevation === "surface",
|
|
2130
|
-
"focus:ui-shadow-extraLarge": elevation === "extraLarge",
|
|
2131
|
-
"focus:ui-shadow-drag": elevation === "drag"
|
|
2132
|
-
}, transitionClassName);
|
|
2133
|
-
}
|
|
2134
|
-
return classNames__default.default({
|
|
2135
|
-
"active:ui-shadow-base": elevation === "base",
|
|
2136
|
-
"active:ui-shadow-small": elevation === "small",
|
|
2137
|
-
"active:ui-shadow-medium": elevation === "medium",
|
|
2138
|
-
"active:ui-shadow-large": elevation === "large",
|
|
2139
|
-
"active:ui-shadow-surface": elevation === "surface",
|
|
2140
|
-
"active:ui-shadow-extraLarge": elevation === "extraLarge",
|
|
2141
|
-
"active:ui-shadow-drag": elevation === "drag"
|
|
2142
|
-
}, transitionClassName);
|
|
2143
|
-
};
|
|
2144
|
-
|
|
2145
|
-
const SIZES = {
|
|
2146
|
-
/**
|
|
2147
|
-
* Represents the tiny size of 4px.
|
|
2148
|
-
*/
|
|
2149
|
-
xxxxs: "4px",
|
|
2150
|
-
/**
|
|
2151
|
-
* Represents a very extra extra small size of 6px.
|
|
2152
|
-
*/
|
|
2153
|
-
xxxs: "6px",
|
|
2154
|
-
/**
|
|
2155
|
-
* Represents an extra extra small size of 8px.
|
|
2156
|
-
*/
|
|
2157
|
-
xxs: "8px",
|
|
2158
|
-
/**
|
|
2159
|
-
* Represents an extra small size of 10px.
|
|
2160
|
-
*/
|
|
2161
|
-
xs: "10px",
|
|
2162
|
-
/**
|
|
2163
|
-
* Represents a small size of 12px.
|
|
2164
|
-
*/
|
|
2165
|
-
s: "12px",
|
|
2166
|
-
/**
|
|
2167
|
-
* Represents a medium size of 16px.
|
|
2168
|
-
*/
|
|
2169
|
-
m: "16px",
|
|
2170
|
-
/**
|
|
2171
|
-
* Represents a large size of 24px.
|
|
2172
|
-
*/
|
|
2173
|
-
l: "24px",
|
|
2174
|
-
/**
|
|
2175
|
-
* Represents an extra large size of 32px.
|
|
2176
|
-
*/
|
|
2177
|
-
xl: "32px",
|
|
2178
|
-
/**
|
|
2179
|
-
* Represents an extra extra large size of 32px.
|
|
2180
|
-
*/
|
|
2181
|
-
xxl: "32px"
|
|
2182
|
-
};
|
|
2183
|
-
|
|
2184
|
-
const createRadiusClassName = (borderRadius) => {
|
|
2185
|
-
if (!borderRadius || !SIZES[borderRadius]) {
|
|
2186
|
-
return "";
|
|
2187
|
-
}
|
|
2188
|
-
return classNames__default.default({
|
|
2189
|
-
"ui-radius-xxxxs": borderRadius === "xxxxs",
|
|
2190
|
-
"ui-radius-xxxs": borderRadius === "xxxs",
|
|
2191
|
-
"ui-radius-xxs": borderRadius === "xxs",
|
|
2192
|
-
"ui-radius-xs": borderRadius === "xs",
|
|
2193
|
-
"ui-radius-s": borderRadius === "s",
|
|
2194
|
-
"ui-radius-m": borderRadius === "m",
|
|
2195
|
-
"ui-radius-l": borderRadius === "l",
|
|
2196
|
-
"ui-radius-xl": borderRadius === "xl",
|
|
2197
|
-
"ui-radius-xxl": borderRadius === "xxl"
|
|
2198
|
-
});
|
|
2199
|
-
};
|
|
2200
|
-
|
|
2201
|
-
const spacingKeys = [
|
|
2202
|
-
"p",
|
|
2203
|
-
"pt",
|
|
2204
|
-
"pr",
|
|
2205
|
-
"pb",
|
|
2206
|
-
"pl",
|
|
2207
|
-
"px",
|
|
2208
|
-
"py",
|
|
2209
|
-
"m",
|
|
2210
|
-
"mt",
|
|
2211
|
-
"mr",
|
|
2212
|
-
"mb",
|
|
2213
|
-
"ml",
|
|
2214
|
-
"mx",
|
|
2215
|
-
"my"
|
|
2216
|
-
];
|
|
2217
|
-
const createSpacingClassNames = (keys, spacingProps) => {
|
|
2218
|
-
return keys.filter((key) => spacingProps[key]).map((key) => `ui-${key}-${spacingProps[key]}`).join(" ");
|
|
2219
|
-
};
|
|
2220
|
-
const Box = (props) => {
|
|
2221
|
-
const { as: Element = "div", borderRadius, className, elevation, width } = props, attributes = __rest(props, ["as", "borderRadius", "className", "elevation", "width"]);
|
|
2222
|
-
const spacingClasses = createSpacingClassNames(spacingKeys, props);
|
|
2223
|
-
const shadowClassName = createShadowClassName(elevation);
|
|
2224
|
-
const borderRadiusClassName = createRadiusClassName(borderRadius);
|
|
2225
|
-
const attributesWithoutSpacingKeys = omit__default.default(attributes, spacingKeys);
|
|
2226
|
-
return React__namespace.default.createElement(Element, Object.assign({ className: classNames__default.default(spacingClasses, {
|
|
2227
|
-
"ui-bg-slate-100": props.backgroundColor === "base",
|
|
2228
|
-
"ui-bg-blue-50": props.backgroundColor === "blue",
|
|
2229
|
-
"ui-bg-red-50": props.backgroundColor === "red",
|
|
2230
|
-
" ui-bg-green-50": props.backgroundColor === "green",
|
|
2231
|
-
" ui-bg-amber-50": props.backgroundColor === "amber",
|
|
2232
|
-
[`ui-w-${width}`]: width && width !== "full",
|
|
2233
|
-
"ui-w-full": width === "full"
|
|
2234
|
-
}, className, shadowClassName, borderRadiusClassName) }, attributesWithoutSpacingKeys));
|
|
2235
|
-
};
|
|
2236
|
-
|
|
2237
|
-
const Stack = (props) => {
|
|
2238
|
-
const { children, gap, align = "start", justify = "normal", axis = "y", className, reverse, wrap = false } = props, attributes = __rest(props, ["children", "gap", "align", "justify", "axis", "className", "reverse", "wrap"]);
|
|
2239
|
-
const stackClasses = classNames__default.default(`ui-flex`, {
|
|
2240
|
-
"ui-flex-row": axis === "x",
|
|
2241
|
-
"ui-flex-col": axis === "y",
|
|
2242
|
-
"ui-flex-row-reverse": axis === "x" && reverse,
|
|
2243
|
-
"ui-flex-col-reverse": axis === "y" && reverse,
|
|
2244
|
-
"ui-flex-wrap": wrap,
|
|
2245
|
-
[`ui-gap-${gap}`]: gap
|
|
2246
|
-
}, `ui-items-${align} ui-justify-${justify}`);
|
|
2247
|
-
return React__namespace.default.createElement(Box, Object.assign({ className: classNames__default.default(stackClasses, className) }, attributes), children);
|
|
2248
|
-
};
|
|
2249
|
-
|
|
2250
2250
|
const AccordionListActions = (props) => {
|
|
2251
2251
|
return React__namespace.default.createElement("div", { className: "ui-flex ui-flex-row ui-flex-wrap ui-justify-start ui-gap-3" }, props.children);
|
|
2252
2252
|
};
|
|
@@ -2929,7 +2929,8 @@ const ConfirmationDialogMessage = (props) => {
|
|
|
2929
2929
|
|
|
2930
2930
|
const ConfirmationDialog = (_a) => {
|
|
2931
2931
|
var { dataTestId = "confirmation-dialog-modal" } = _a, props = __rest(_a, ["dataTestId"]);
|
|
2932
|
-
const { choices } = props;
|
|
2932
|
+
const { children, choices } = props;
|
|
2933
|
+
const { message } = props.texts;
|
|
2933
2934
|
const [selectedChoice, setSelectedChoice] = React.useState(choices === null || choices === void 0 ? void 0 : choices.options.find((choice) => choice.value === choices.defaultChoice));
|
|
2934
2935
|
const handleOnCloseClick = () => {
|
|
2935
2936
|
if (!props.isProcessing) {
|
|
@@ -2964,7 +2965,8 @@ const ConfirmationDialog = (_a) => {
|
|
|
2964
2965
|
"div",
|
|
2965
2966
|
{ className: "ui-min-h-13 ui-space-y-4" },
|
|
2966
2967
|
React__namespace.default.createElement(ConfirmationDialogTitle, { title: props.withTitle }),
|
|
2967
|
-
|
|
2968
|
+
children,
|
|
2969
|
+
message && React__namespace.default.createElement(ConfirmationDialogMessage, { message }),
|
|
2968
2970
|
React__namespace.default.createElement(ConfirmationDialogChoices, { choices: props.choices, onChoiceChangeCallback: onChoiceChange, selectedChoice })
|
|
2969
2971
|
)
|
|
2970
2972
|
);
|