@norges-domstoler/dds-components 24.3.1 → 25.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +678 -431
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +976 -644
- package/dist/index.d.cts +896 -10305
- package/dist/index.d.mts +896 -10305
- package/dist/index.mjs +671 -430
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -124,8 +124,9 @@ var typographyStyles_module_default = {
|
|
|
124
124
|
"text-color--on-tertiary-medium": "dds-typographyStyles-module__text-color--on-tertiary-medium",
|
|
125
125
|
"text-color--on-tertiary-subtle": "dds-typographyStyles-module__text-color--on-tertiary-subtle",
|
|
126
126
|
"text-color--on-tertiary-strong": "dds-typographyStyles-module__text-color--on-tertiary-strong",
|
|
127
|
-
"text-color--on-
|
|
128
|
-
"text-color--on-
|
|
127
|
+
"text-color--domain-on-domain": "dds-typographyStyles-module__text-color--domain-on-domain",
|
|
128
|
+
"text-color--statistics-on-default": "dds-typographyStyles-module__text-color--statistics-on-default",
|
|
129
|
+
"text-color--statistics-on-subtle": "dds-typographyStyles-module__text-color--statistics-on-subtle",
|
|
129
130
|
"text-color--on-inverse": "dds-typographyStyles-module__text-color--on-inverse",
|
|
130
131
|
"icon-color--default": "dds-typographyStyles-module__icon-color--default",
|
|
131
132
|
"icon-color--medium": "dds-typographyStyles-module__icon-color--medium",
|
|
@@ -441,8 +442,9 @@ const TEXT_COLORS = [
|
|
|
441
442
|
"text-on-tertiary-medium",
|
|
442
443
|
"text-on-tertiary-subtle",
|
|
443
444
|
"text-on-tertiary-strong",
|
|
444
|
-
"text-on-
|
|
445
|
-
"text-on-
|
|
445
|
+
"text-domain-on-domain",
|
|
446
|
+
"text-statistics-on-default",
|
|
447
|
+
"text-statistics-on-subtle",
|
|
446
448
|
"icon-on-action",
|
|
447
449
|
"icon-on-info-default",
|
|
448
450
|
"icon-on-success-default",
|
|
@@ -1174,7 +1176,59 @@ function getBaseHTMLProps(id, className, style, htmlProps, unknownProps) {
|
|
|
1174
1176
|
});
|
|
1175
1177
|
}
|
|
1176
1178
|
//#endregion
|
|
1177
|
-
//#region src/
|
|
1179
|
+
//#region src/components/layout/common/Responsive.types.tsx
|
|
1180
|
+
const BREAKPOINTS = [
|
|
1181
|
+
"xs",
|
|
1182
|
+
"sm",
|
|
1183
|
+
"md",
|
|
1184
|
+
"lg",
|
|
1185
|
+
"xl"
|
|
1186
|
+
];
|
|
1187
|
+
const SPACING_SCALES = [
|
|
1188
|
+
"x0",
|
|
1189
|
+
"x0.125",
|
|
1190
|
+
"x0.25",
|
|
1191
|
+
"x0.5",
|
|
1192
|
+
"x0.75",
|
|
1193
|
+
"x1",
|
|
1194
|
+
"x1.5",
|
|
1195
|
+
"x2",
|
|
1196
|
+
"x2.5",
|
|
1197
|
+
"x3",
|
|
1198
|
+
"x4",
|
|
1199
|
+
"x6",
|
|
1200
|
+
"x10"
|
|
1201
|
+
];
|
|
1202
|
+
const SIZE_SCALE = [
|
|
1203
|
+
"0",
|
|
1204
|
+
"1",
|
|
1205
|
+
"2",
|
|
1206
|
+
"3",
|
|
1207
|
+
"4",
|
|
1208
|
+
"5",
|
|
1209
|
+
"6",
|
|
1210
|
+
"7",
|
|
1211
|
+
"8",
|
|
1212
|
+
"9",
|
|
1213
|
+
"10",
|
|
1214
|
+
"11",
|
|
1215
|
+
"12",
|
|
1216
|
+
"13",
|
|
1217
|
+
"14"
|
|
1218
|
+
];
|
|
1219
|
+
const Z_INDEXES = [
|
|
1220
|
+
"skiptocontent",
|
|
1221
|
+
"modal-backdrop",
|
|
1222
|
+
"drawer",
|
|
1223
|
+
"drawer-backdrop",
|
|
1224
|
+
"overflowmenu",
|
|
1225
|
+
"popover",
|
|
1226
|
+
"tooltip",
|
|
1227
|
+
"dropdown",
|
|
1228
|
+
"sticky",
|
|
1229
|
+
"absolute-element"
|
|
1230
|
+
];
|
|
1231
|
+
[...SIZE_SCALE];
|
|
1178
1232
|
function createSizes(...sizes) {
|
|
1179
1233
|
return sizes;
|
|
1180
1234
|
}
|
|
@@ -1189,7 +1243,7 @@ const BORDER_RADII = [
|
|
|
1189
1243
|
"button",
|
|
1190
1244
|
"input",
|
|
1191
1245
|
"surface",
|
|
1192
|
-
"
|
|
1246
|
+
"tag",
|
|
1193
1247
|
"rounded",
|
|
1194
1248
|
"0"
|
|
1195
1249
|
];
|
|
@@ -1296,42 +1350,6 @@ var layout_module_default = {
|
|
|
1296
1350
|
"dds-flow": "dds-layout-module__dds-flow"
|
|
1297
1351
|
};
|
|
1298
1352
|
//#endregion
|
|
1299
|
-
//#region src/components/layout/common/Responsive.types.tsx
|
|
1300
|
-
const BREAKPOINTS = [
|
|
1301
|
-
"xs",
|
|
1302
|
-
"sm",
|
|
1303
|
-
"md",
|
|
1304
|
-
"lg",
|
|
1305
|
-
"xl"
|
|
1306
|
-
];
|
|
1307
|
-
const SPACING_SCALES = [
|
|
1308
|
-
"x0",
|
|
1309
|
-
"x0.125",
|
|
1310
|
-
"x0.25",
|
|
1311
|
-
"x0.5",
|
|
1312
|
-
"x0.75",
|
|
1313
|
-
"x1",
|
|
1314
|
-
"x1.5",
|
|
1315
|
-
"x2",
|
|
1316
|
-
"x2.5",
|
|
1317
|
-
"x3",
|
|
1318
|
-
"x4",
|
|
1319
|
-
"x6",
|
|
1320
|
-
"x10"
|
|
1321
|
-
];
|
|
1322
|
-
const Z_INDEXES = [
|
|
1323
|
-
"skiptocontent",
|
|
1324
|
-
"modal-backdrop",
|
|
1325
|
-
"drawer",
|
|
1326
|
-
"drawer-backdrop",
|
|
1327
|
-
"overflowmenu",
|
|
1328
|
-
"popover",
|
|
1329
|
-
"tooltip",
|
|
1330
|
-
"dropdown",
|
|
1331
|
-
"sticky",
|
|
1332
|
-
"absolute-element"
|
|
1333
|
-
];
|
|
1334
|
-
//#endregion
|
|
1335
1353
|
//#region src/components/layout/common/utils.tsx
|
|
1336
1354
|
const TOKEN_PREFIX = "dds";
|
|
1337
1355
|
const hasValue = (value) => {
|
|
@@ -1372,7 +1390,7 @@ const getValue = (v, bp, invert) => {
|
|
|
1372
1390
|
else output = v;
|
|
1373
1391
|
return invert ? invertValue(output) : output;
|
|
1374
1392
|
};
|
|
1375
|
-
const convertMultiValue = (value, bp, invert) => value.split(" ").map((v) => getValue(v, bp, invert)).join(" ");
|
|
1393
|
+
const convertMultiValue = (value, bp, invert, mode = "token") => value.split(" ").map((v) => mode === "raw" ? v : getValue(v, bp, invert)).join(" ");
|
|
1376
1394
|
const invertValue = (v) => v === "0" ? "0" : `calc(-1 * ${v})`;
|
|
1377
1395
|
const buildCSSKey = (prefix, suffix, bp) => {
|
|
1378
1396
|
let key = `--${TOKEN_PREFIX}`;
|
|
@@ -1387,13 +1405,13 @@ function getCSSProperties(property, prefix, suffix, invert) {
|
|
|
1387
1405
|
properties[buildCSSKey(prefix, suffix)] = convertMultiValue(property.toString(), void 0, invert);
|
|
1388
1406
|
return properties;
|
|
1389
1407
|
}
|
|
1390
|
-
function getResponsiveCSSProperties(property, prefix, suffix,
|
|
1408
|
+
function getResponsiveCSSProperties(property, prefix, suffix, options = {}) {
|
|
1391
1409
|
if (property === void 0 || property === null) return;
|
|
1392
1410
|
const properties = {};
|
|
1393
1411
|
if (isBreakpointObject(property)) BREAKPOINTS.forEach((bp) => {
|
|
1394
|
-
if (property[bp] !== void 0 && property[bp] !== null) properties[buildCSSKey(prefix, suffix, bp)] = convertMultiValue(property[bp].toString(), bp, invert);
|
|
1412
|
+
if (property[bp] !== void 0 && property[bp] !== null) properties[buildCSSKey(prefix, suffix, bp)] = convertMultiValue(property[bp].toString(), bp, options.invert, options.mode);
|
|
1395
1413
|
});
|
|
1396
|
-
else properties[buildCSSKey(prefix, suffix)] = convertMultiValue(property.toString(), void 0, invert);
|
|
1414
|
+
else properties[buildCSSKey(prefix, suffix)] = convertMultiValue(property.toString(), void 0, options.invert, options.mode);
|
|
1397
1415
|
return properties;
|
|
1398
1416
|
}
|
|
1399
1417
|
/**
|
|
@@ -1460,30 +1478,30 @@ const Box = ({ id, className, style, padding, paddingInline, paddingBlock, margi
|
|
|
1460
1478
|
...getResponsiveCSSProperties(width, "r", "w"),
|
|
1461
1479
|
...getResponsiveCSSProperties(maxWidth, "r", "max-w"),
|
|
1462
1480
|
...getResponsiveCSSProperties(minWidth, "r", "min-w"),
|
|
1463
|
-
...getResponsiveCSSProperties(position, "r", "pos"),
|
|
1481
|
+
...getResponsiveCSSProperties(position, "r", "pos", { mode: "raw" }),
|
|
1464
1482
|
...getResponsiveCSSProperties(left, "r", "l"),
|
|
1465
1483
|
...getResponsiveCSSProperties(right, "r", "r"),
|
|
1466
1484
|
...getResponsiveCSSProperties(top, "r", "t"),
|
|
1467
1485
|
...getResponsiveCSSProperties(bottom, "r", "b"),
|
|
1468
|
-
...getResponsiveCSSProperties(overflow, "r", "o"),
|
|
1469
|
-
...getResponsiveCSSProperties(overflowX, "r", "o-x"),
|
|
1470
|
-
...getResponsiveCSSProperties(overflowY, "r", "o-y"),
|
|
1471
|
-
...getResponsiveCSSProperties(display, "r", "display"),
|
|
1472
|
-
...getResponsiveCSSProperties(textAlign, "r", "text-align"),
|
|
1473
|
-
...getResponsiveCSSProperties(flex, "r", "flex"),
|
|
1474
|
-
...getResponsiveCSSProperties(flexDirection, "r", "flex-dir"),
|
|
1486
|
+
...getResponsiveCSSProperties(overflow, "r", "o", { mode: "raw" }),
|
|
1487
|
+
...getResponsiveCSSProperties(overflowX, "r", "o-x", { mode: "raw" }),
|
|
1488
|
+
...getResponsiveCSSProperties(overflowY, "r", "o-y", { mode: "raw" }),
|
|
1489
|
+
...getResponsiveCSSProperties(display, "r", "display", { mode: "raw" }),
|
|
1490
|
+
...getResponsiveCSSProperties(textAlign, "r", "text-align", { mode: "raw" }),
|
|
1491
|
+
...getResponsiveCSSProperties(flex, "r", "flex", { mode: "raw" }),
|
|
1492
|
+
...getResponsiveCSSProperties(flexDirection, "r", "flex-dir", { mode: "raw" }),
|
|
1475
1493
|
...getResponsiveCSSProperties(gap, "r", "gap"),
|
|
1476
1494
|
...getResponsiveCSSProperties(columnGap, "r", "c-gap"),
|
|
1477
1495
|
...getResponsiveCSSProperties(rowGap, "r", "r-gap"),
|
|
1478
|
-
...getResponsiveCSSProperties(alignItems, "r", "a-i"),
|
|
1479
|
-
...getResponsiveCSSProperties(alignContent, "r", "a-c"),
|
|
1480
|
-
...getResponsiveCSSProperties(justifyItems, "r", "j-i"),
|
|
1481
|
-
...getResponsiveCSSProperties(placeItems, "r", "pl-i"),
|
|
1482
|
-
...getResponsiveCSSProperties(justifyContent, "r", "j-c"),
|
|
1483
|
-
...getResponsiveCSSProperties(flexWrap, "r", "wrap"),
|
|
1484
|
-
...getResponsiveCSSProperties(flexBasis, "r", "basis"),
|
|
1485
|
-
...getResponsiveCSSProperties(flexFlow, "r", "flow"),
|
|
1486
|
-
...getResponsiveCSSProperties(wordBreak, "r", "word-break"),
|
|
1496
|
+
...getResponsiveCSSProperties(alignItems, "r", "a-i", { mode: "raw" }),
|
|
1497
|
+
...getResponsiveCSSProperties(alignContent, "r", "a-c", { mode: "raw" }),
|
|
1498
|
+
...getResponsiveCSSProperties(justifyItems, "r", "j-i", { mode: "raw" }),
|
|
1499
|
+
...getResponsiveCSSProperties(placeItems, "r", "pl-i", { mode: "raw" }),
|
|
1500
|
+
...getResponsiveCSSProperties(justifyContent, "r", "j-c", { mode: "raw" }),
|
|
1501
|
+
...getResponsiveCSSProperties(flexWrap, "r", "wrap", { mode: "raw" }),
|
|
1502
|
+
...getResponsiveCSSProperties(flexBasis, "r", "basis", { mode: "raw" }),
|
|
1503
|
+
...getResponsiveCSSProperties(flexFlow, "r", "flow", { mode: "raw" }),
|
|
1504
|
+
...getResponsiveCSSProperties(wordBreak, "r", "word-break", { mode: "raw" }),
|
|
1487
1505
|
...getResponsiveCSSProperties(zIndex, "r", "z-index")
|
|
1488
1506
|
};
|
|
1489
1507
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShowHide, { ...getBaseHTMLProps(id, cn(className, hasValue(padding) && layout_module_default["dds-p"], hasValue(paddingInline) && layout_module_default["dds-p-i"], hasValue(paddingBlock) && layout_module_default["dds-p-b"], hasValue(margin) && layout_module_default["dds-m"], hasValue(marginInline) && layout_module_default["dds-m-i"], hasValue(marginBlock) && layout_module_default["dds-m-b"], hasValue(height) && layout_module_default["dds-h"], hasValue(maxHeight) && layout_module_default["dds-max-h"], hasValue(minHeight) && layout_module_default["dds-min-h"], hasValue(width) && layout_module_default["dds-w"], hasValue(maxWidth) && layout_module_default["dds-max-w"], hasValue(minWidth) && layout_module_default["dds-min-w"], hasValue(position) && layout_module_default["dds-pos"], hasValue(left) && layout_module_default["dds-l"], hasValue(right) && layout_module_default["dds-r"], hasValue(top) && layout_module_default["dds-t"], hasValue(bottom) && layout_module_default["dds-b"], hasValue(overflow) && layout_module_default["dds-o"], hasValue(overflowX) && layout_module_default["dds-o-x"], hasValue(overflowY) && layout_module_default["dds-o-y"], hasValue(display) && layout_module_default["dds-display"], hasValue(textAlign) && layout_module_default["dds-text-align"], hasValue(flex) && layout_module_default["dds-flex"], hasValue(flexDirection) && layout_module_default["dds-flex-dir"], hasValue(gap) && layout_module_default["dds-gap"], hasValue(columnGap) && layout_module_default["dds-c-gap"], hasValue(rowGap) && layout_module_default["dds-r-gap"], hasValue(alignContent) && layout_module_default["dds-a-c"], hasValue(alignItems) && layout_module_default["dds-a-i"], hasValue(justifyContent) && layout_module_default["dds-j-c"], hasValue(justifyItems) && layout_module_default["dds-j-i"], hasValue(placeItems) && layout_module_default["dds-pl-i"], hasValue(flexWrap) && layout_module_default["dds-wrap"], hasValue(flexBasis) && layout_module_default["dds-basis"], hasValue(flexFlow) && layout_module_default["dds-flow"], hasValue(wordBreak) && layout_module_default["dds-word-break"], hasValue(zIndex) && layout_module_default["dds-z-index"]), {
|
|
@@ -1500,8 +1518,8 @@ const Bleed = ({ id, className, style, htmlProps, bleedMarginBlock, bleedMarginI
|
|
|
1500
1518
|
...getResponsiveCSSProperties(bleedMarginBlock, "r", "p-b")
|
|
1501
1519
|
} : {};
|
|
1502
1520
|
const responsiveStyles = {
|
|
1503
|
-
...getResponsiveCSSProperties(bleedMarginInline, "r", "bleed-m-i", true),
|
|
1504
|
-
...getResponsiveCSSProperties(bleedMarginBlock, "r", "bleed-m-b", true),
|
|
1521
|
+
...getResponsiveCSSProperties(bleedMarginInline, "r", "bleed-m-i", { invert: true }),
|
|
1522
|
+
...getResponsiveCSSProperties(bleedMarginBlock, "r", "bleed-m-b", { invert: true }),
|
|
1505
1523
|
...reflStyles
|
|
1506
1524
|
};
|
|
1507
1525
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, { ...getBaseHTMLProps(id, cn(className, hasValue(bleedMarginInline) && layout_module_default["dds-bleed-m-i"], hasValue(bleedMarginBlock) && layout_module_default["dds-bleed-m-b"], hasValue(bleedMarginInline) && reflectivePadding && layout_module_default["dds-p-i"], hasValue(bleedMarginBlock) && reflectivePadding && layout_module_default["dds-p-b"]), {
|
|
@@ -1597,7 +1615,7 @@ const GridChild = ({ id, className, htmlProps, style, gridRow, gridArea, justify
|
|
|
1597
1615
|
const styleVariables = {
|
|
1598
1616
|
...getResponsiveCSSProperties(gridRow, "r", "grid-row"),
|
|
1599
1617
|
...getResponsiveCSSProperties(gridArea, "r", "grid-area"),
|
|
1600
|
-
...getResponsiveCSSProperties(justifySelf, "r", "j-self"),
|
|
1618
|
+
...getResponsiveCSSProperties(justifySelf, "r", "j-self", { mode: "raw" }),
|
|
1601
1619
|
...getResponsiveCSSProperties(columnsOccupied, "r", "grid-column")
|
|
1602
1620
|
};
|
|
1603
1621
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, { ...getBaseHTMLProps(id, cn(className, Grid_module_default["child-col-count"], hasValue(gridRow) && Grid_module_default["dds-grid-row"], hasValue(gridArea) && Grid_module_default["dds-grid-area"], hasValue(justifySelf) && Grid_module_default["dds-j-self"], hasValue(columnsOccupied) && Grid_module_default["dds-grid-column"], columnsOccupied === "firstHalf" && Grid_module_default["child--first-half"], columnsOccupied === "secondHalf" && Grid_module_default["child--second-half"]), {
|
|
@@ -1621,7 +1639,7 @@ var Paper_module_default = {
|
|
|
1621
1639
|
var surface_module_default = {
|
|
1622
1640
|
"border-radius--button": "dds-surface-module__border-radius--button",
|
|
1623
1641
|
"border-radius--surface": "dds-surface-module__border-radius--surface",
|
|
1624
|
-
"border-radius--
|
|
1642
|
+
"border-radius--tag": "dds-surface-module__border-radius--tag",
|
|
1625
1643
|
"border-radius--input": "dds-surface-module__border-radius--input",
|
|
1626
1644
|
"border-radius--rounded": "dds-surface-module__border-radius--rounded",
|
|
1627
1645
|
"border-radius--0": "dds-surface-module__border-radius--0"
|
|
@@ -1708,19 +1726,70 @@ var DropdownItem_module_default = {
|
|
|
1708
1726
|
"item--loading": "dds-DropdownItem-module__item--loading"
|
|
1709
1727
|
};
|
|
1710
1728
|
//#endregion
|
|
1729
|
+
//#region src/components/Badge/Badge.module.css
|
|
1730
|
+
var Badge_module_default = {
|
|
1731
|
+
"container": "dds-Badge-module__container",
|
|
1732
|
+
"notification": "dds-Badge-module__notification",
|
|
1733
|
+
"action": "dds-Badge-module__action",
|
|
1734
|
+
"neutral": "dds-Badge-module__neutral",
|
|
1735
|
+
"subtle": "dds-Badge-module__subtle"
|
|
1736
|
+
};
|
|
1737
|
+
const Badge = ({ id, className, style, htmlProps, purpose = "notification", size = "medium", children, max = 9, showZero = false, ...rest }) => {
|
|
1738
|
+
const hasChildren = !!children || showZero && children === 0;
|
|
1739
|
+
const heightVariant = hasChildren ? "withChildren" : "noChildren";
|
|
1740
|
+
const height = {
|
|
1741
|
+
withChildren: {
|
|
1742
|
+
xsmall: "18px",
|
|
1743
|
+
small: "21px",
|
|
1744
|
+
medium: "24px",
|
|
1745
|
+
large: "27px"
|
|
1746
|
+
},
|
|
1747
|
+
noChildren: {
|
|
1748
|
+
xsmall: "x0.5",
|
|
1749
|
+
small: "x0.75",
|
|
1750
|
+
medium: "x1",
|
|
1751
|
+
large: "x1.5"
|
|
1752
|
+
}
|
|
1753
|
+
};
|
|
1754
|
+
const color = {
|
|
1755
|
+
notification: "text-on-notification",
|
|
1756
|
+
action: "text-on-action",
|
|
1757
|
+
neutral: "text-on-inverse",
|
|
1758
|
+
subtle: "text-default"
|
|
1759
|
+
};
|
|
1760
|
+
const displayValue = hasChildren && max && children > max ? `${max}+` : children;
|
|
1761
|
+
if (!(!showZero && children === 0 ? false : true)) return null;
|
|
1762
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
1763
|
+
as: "span",
|
|
1764
|
+
paddingInline: hasChildren ? "x0.25" : void 0,
|
|
1765
|
+
minWidth: height[heightVariant][size],
|
|
1766
|
+
maxWidth: "fit-content",
|
|
1767
|
+
height: height[heightVariant][size],
|
|
1768
|
+
display: "inline-flex",
|
|
1769
|
+
alignItems: "center",
|
|
1770
|
+
justifyContent: "center",
|
|
1771
|
+
...getBaseHTMLProps(id, cn(className, Badge_module_default.container, Badge_module_default[purpose], typographyStyles_module_default[`body-short-${size}`]), style, htmlProps, rest),
|
|
1772
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Typography, {
|
|
1773
|
+
as: "span",
|
|
1774
|
+
typographyType: `body-short-${size}`,
|
|
1775
|
+
color: color[purpose],
|
|
1776
|
+
children: displayValue
|
|
1777
|
+
})
|
|
1778
|
+
});
|
|
1779
|
+
};
|
|
1780
|
+
Badge.displayName = "Badge";
|
|
1781
|
+
//#endregion
|
|
1711
1782
|
//#region src/components/Icon/Icon.tsx
|
|
1712
1783
|
const getSize = (iconSize) => {
|
|
1713
1784
|
switch (iconSize) {
|
|
1714
|
-
case "small": return "var(--dds-size-icon-small)";
|
|
1715
|
-
case "medium": return "var(--dds-size-icon-medium)";
|
|
1716
|
-
case "large": return "var(--dds-size-icon-large)";
|
|
1717
1785
|
case "component": return "var(--dds-size-icon-component)";
|
|
1718
1786
|
case "inherit": return "1em";
|
|
1719
|
-
default: return
|
|
1787
|
+
default: return `var(--dds-size-${iconSize})`;
|
|
1720
1788
|
}
|
|
1721
1789
|
};
|
|
1790
|
+
[...SIZE_SCALE];
|
|
1722
1791
|
function Icon(props) {
|
|
1723
|
-
const { id, iconSize = "
|
|
1792
|
+
const { id, iconSize = "6", color = "currentcolor", icon, className, style, htmlProps, iconState, ...rest } = props;
|
|
1724
1793
|
const size = getSize(iconSize);
|
|
1725
1794
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(icon, {
|
|
1726
1795
|
...getBaseHTMLProps(id, className, style, htmlProps, rest),
|
|
@@ -1837,7 +1906,7 @@ const commonTexts = createTexts({
|
|
|
1837
1906
|
//#endregion
|
|
1838
1907
|
//#region src/components/Spinner/Spinner.tsx
|
|
1839
1908
|
function Spinner(props) {
|
|
1840
|
-
const { size = "var(--dds-size-
|
|
1909
|
+
const { size = "var(--dds-size-6)", color = "icon-action-resting", tooltip, id, className, htmlProps, style, ...rest } = props;
|
|
1841
1910
|
const { t } = useTranslation();
|
|
1842
1911
|
const uniqueId = `${(0, react.useId)()}-spinnerTitle`;
|
|
1843
1912
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
@@ -1847,7 +1916,8 @@ function Spinner(props) {
|
|
|
1847
1916
|
...getBaseHTMLProps(id, cn(className, Spinner_module_default.svg), {
|
|
1848
1917
|
...style,
|
|
1849
1918
|
width: size,
|
|
1850
|
-
height: size
|
|
1919
|
+
height: size,
|
|
1920
|
+
["--dds-color-spinner"]: getTextColor(color)
|
|
1851
1921
|
}, htmlProps, rest),
|
|
1852
1922
|
children: [
|
|
1853
1923
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("title", {
|
|
@@ -1858,7 +1928,6 @@ function Spinner(props) {
|
|
|
1858
1928
|
cx: "12",
|
|
1859
1929
|
cy: "12.25",
|
|
1860
1930
|
r: "6",
|
|
1861
|
-
fill: getTextColor(color),
|
|
1862
1931
|
className: Spinner_module_default.jordskifterett
|
|
1863
1932
|
}),
|
|
1864
1933
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
@@ -1866,12 +1935,10 @@ function Spinner(props) {
|
|
|
1866
1935
|
y: "10.25",
|
|
1867
1936
|
width: "16",
|
|
1868
1937
|
height: "4",
|
|
1869
|
-
fill: getTextColor(color),
|
|
1870
1938
|
className: Spinner_module_default.lagmannsrett
|
|
1871
1939
|
}),
|
|
1872
1940
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
1873
1941
|
d: "M12 16.6154C16.4183 16.6154 20 12.7581 20 8H4C4 12.7581 7.58172 16.6154 12 16.6154Z",
|
|
1874
|
-
fill: getTextColor(color),
|
|
1875
1942
|
className: Spinner_module_default.tingrett
|
|
1876
1943
|
})
|
|
1877
1944
|
]
|
|
@@ -1893,7 +1960,7 @@ var focus_module_default = {
|
|
|
1893
1960
|
};
|
|
1894
1961
|
//#endregion
|
|
1895
1962
|
//#region src/components/helpers/Dropdown/DropdownItem.tsx
|
|
1896
|
-
const DropdownItem = ({ icon, className, children: propChildren, purpose = "default", loading, loadingTooltip, ...rest }) => {
|
|
1963
|
+
const DropdownItem = ({ icon, className, children: propChildren, purpose = "default", loading, loadingTooltip, badgeProps, ...rest }) => {
|
|
1897
1964
|
const itemCns = [
|
|
1898
1965
|
DropdownItem_module_default.item,
|
|
1899
1966
|
DropdownItem_module_default[purpose],
|
|
@@ -1922,7 +1989,7 @@ const DropdownItem = ({ icon, className, children: propChildren, purpose = "defa
|
|
|
1922
1989
|
loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1923
1990
|
className: cn(utilStyles_module_default["center-absolute"]),
|
|
1924
1991
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spinner, {
|
|
1925
|
-
size: "var(--dds-size-icon-
|
|
1992
|
+
size: "var(--dds-size-icon-component)",
|
|
1926
1993
|
tooltip: loadingTooltip
|
|
1927
1994
|
})
|
|
1928
1995
|
}),
|
|
@@ -1931,7 +1998,13 @@ const DropdownItem = ({ icon, className, children: propChildren, purpose = "defa
|
|
|
1931
1998
|
icon,
|
|
1932
1999
|
className: cn(loading && utilStyles_module_default.invisible)
|
|
1933
2000
|
}),
|
|
1934
|
-
children
|
|
2001
|
+
children,
|
|
2002
|
+
badgeProps && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
2003
|
+
as: Badge,
|
|
2004
|
+
...badgeProps,
|
|
2005
|
+
size: "small",
|
|
2006
|
+
marginInline: "x0.25 0"
|
|
2007
|
+
})
|
|
1935
2008
|
]
|
|
1936
2009
|
});
|
|
1937
2010
|
};
|
|
@@ -2096,7 +2169,7 @@ var Icon_module_default = { "svg": "dds-Icon-module__svg" };
|
|
|
2096
2169
|
//#endregion
|
|
2097
2170
|
//#region src/components/Icon/utils/SvgWrapper.tsx
|
|
2098
2171
|
const size = 24;
|
|
2099
|
-
const sizeCSS = "var(--dds-size-
|
|
2172
|
+
const sizeCSS = "var(--dds-size-6)";
|
|
2100
2173
|
function SvgWrapper({ height, width, fill = "currentColor", className, title, children, iconState: _iconState, style, ...props }) {
|
|
2101
2174
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
2102
2175
|
...props,
|
|
@@ -2172,6 +2245,20 @@ function ArrowDownIcon(props) {
|
|
|
2172
2245
|
});
|
|
2173
2246
|
}
|
|
2174
2247
|
//#endregion
|
|
2248
|
+
//#region src/components/Icon/icons/arrowDownUp.tsx
|
|
2249
|
+
/** Arrows and chevron. Search terms: pil, arrow, ned, down. */
|
|
2250
|
+
function ArrowDownUpIcon(props) {
|
|
2251
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SvgWrapper, {
|
|
2252
|
+
...props,
|
|
2253
|
+
children: [
|
|
2254
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M10.4697 15.4697C10.7626 15.1768 11.2374 15.1768 11.5303 15.4697C11.8232 15.7626 11.8232 16.2374 11.5303 16.5303L7.53028 20.5303C7.23738 20.8232 6.76262 20.8232 6.46973 20.5303L2.46973 16.5303C2.17684 16.2374 2.17684 15.7626 2.46973 15.4697C2.76262 15.1768 3.23738 15.1768 3.53028 15.4697L7 18.9394L10.4697 15.4697Z" }),
|
|
2255
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M6.25 20V3.99999C6.25 3.58578 6.58579 3.24999 7 3.24999C7.41422 3.24999 7.75 3.58578 7.75 3.99999V20C7.75 20.4142 7.41422 20.75 7 20.75C6.58579 20.75 6.25 20.4142 6.25 20Z" }),
|
|
2256
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M16.5264 3.41796C16.821 3.17765 17.2557 3.19512 17.5303 3.46972L21.5303 7.46972C21.8232 7.76261 21.8232 8.23737 21.5303 8.53027C21.2374 8.82316 20.7626 8.82316 20.4697 8.53027L17 5.06054L13.5303 8.53027C13.2374 8.82316 12.7626 8.82316 12.4697 8.53027C12.1768 8.23737 12.1768 7.76261 12.4697 7.46972L16.4697 3.46972L16.5264 3.41796Z" }),
|
|
2257
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M16.25 20V3.99999C16.25 3.58578 16.5858 3.24999 17 3.24999C17.4142 3.24999 17.75 3.58578 17.75 3.99999V20C17.75 20.4142 17.4142 20.75 17 20.75C16.5858 20.75 16.25 20.4142 16.25 20Z" })
|
|
2258
|
+
]
|
|
2259
|
+
});
|
|
2260
|
+
}
|
|
2261
|
+
//#endregion
|
|
2175
2262
|
//#region src/components/Icon/icons/arrowLeft.tsx
|
|
2176
2263
|
/** Arrows and chevron. Search terms: pil, arrow, venstre, left, tilbake, back. */
|
|
2177
2264
|
function ArrowLeftIcon(props) {
|
|
@@ -2199,6 +2286,20 @@ function ArrowUpIcon(props) {
|
|
|
2199
2286
|
});
|
|
2200
2287
|
}
|
|
2201
2288
|
//#endregion
|
|
2289
|
+
//#region src/components/Icon/icons/arrowUpDown.tsx
|
|
2290
|
+
/** Arrows and chevron. Search terms: pil, arrow, ned, down. */
|
|
2291
|
+
function ArrowUpDownIcon(props) {
|
|
2292
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SvgWrapper, {
|
|
2293
|
+
...props,
|
|
2294
|
+
children: [
|
|
2295
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M20.4697 15.4697C20.7626 15.1768 21.2374 15.1768 21.5303 15.4697C21.8232 15.7626 21.8232 16.2374 21.5303 16.5303L17.5303 20.5303C17.2374 20.8232 16.7626 20.8232 16.4697 20.5303L12.4697 16.5303C12.1768 16.2374 12.1768 15.7626 12.4697 15.4697C12.7626 15.1768 13.2374 15.1768 13.5303 15.4697L17 18.9394L20.4697 15.4697Z" }),
|
|
2296
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M16.25 20V3.99999C16.25 3.58578 16.5858 3.24999 17 3.24999C17.4142 3.24999 17.75 3.58578 17.75 3.99999V20C17.75 20.4142 17.4142 20.75 17 20.75C16.5858 20.75 16.25 20.4142 16.25 20Z" }),
|
|
2297
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M6.52637 3.41796C6.82095 3.17765 7.25567 3.19512 7.53028 3.46972L11.5303 7.46972C11.8232 7.76261 11.8232 8.23737 11.5303 8.53027C11.2374 8.82316 10.7626 8.82316 10.4697 8.53027L7 5.06054L3.53028 8.53027C3.23738 8.82316 2.76262 8.82316 2.46973 8.53027C2.17684 8.23737 2.17684 7.76261 2.46973 7.46972L6.46973 3.46972L6.52637 3.41796Z" }),
|
|
2298
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M6.25 20V3.99999C6.25 3.58578 6.58579 3.24999 7 3.24999C7.41422 3.24999 7.75 3.58578 7.75 3.99999V20C7.75 20.4142 7.41422 20.75 7 20.75C6.58579 20.75 6.25 20.4142 6.25 20Z" })
|
|
2299
|
+
]
|
|
2300
|
+
});
|
|
2301
|
+
}
|
|
2302
|
+
//#endregion
|
|
2202
2303
|
//#region src/components/Icon/icons/arrowUpRight.tsx
|
|
2203
2304
|
/** Arrows and chevron. Search terms: pil, arrow, opp, up, høyre, right. */
|
|
2204
2305
|
function ArrowUpRightIcon(props) {
|
|
@@ -4086,8 +4187,10 @@ var icons_exports = /* @__PURE__ */ __exportAll({
|
|
|
4086
4187
|
AppsIcon: () => AppsIcon,
|
|
4087
4188
|
ArchiveIcon: () => ArchiveIcon,
|
|
4088
4189
|
ArrowDownIcon: () => ArrowDownIcon,
|
|
4190
|
+
ArrowDownUpIcon: () => ArrowDownUpIcon,
|
|
4089
4191
|
ArrowLeftIcon: () => ArrowLeftIcon,
|
|
4090
4192
|
ArrowRightIcon: () => ArrowRightIcon,
|
|
4193
|
+
ArrowUpDownIcon: () => ArrowUpDownIcon,
|
|
4091
4194
|
ArrowUpIcon: () => ArrowUpIcon,
|
|
4092
4195
|
ArrowUpRightIcon: () => ArrowUpRightIcon,
|
|
4093
4196
|
AttachmentIcon: () => AttachmentIcon,
|
|
@@ -4391,7 +4494,7 @@ const BackLink = ({ label, ref, as = "a", ...rest }) => {
|
|
|
4391
4494
|
const { t } = useTranslation();
|
|
4392
4495
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
4393
4496
|
ref,
|
|
4394
|
-
"aria-label": t(texts$
|
|
4497
|
+
"aria-label": t(texts$30.goBack),
|
|
4395
4498
|
className: typographyStyles_module_default["body-short-medium"],
|
|
4396
4499
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
4397
4500
|
as,
|
|
@@ -4407,7 +4510,7 @@ const BackLink = ({ label, ref, as = "a", ...rest }) => {
|
|
|
4407
4510
|
});
|
|
4408
4511
|
};
|
|
4409
4512
|
BackLink.displayName = "BackLink";
|
|
4410
|
-
const texts$
|
|
4513
|
+
const texts$30 = createTexts({ goBack: {
|
|
4411
4514
|
nb: "Gå tilbake",
|
|
4412
4515
|
no: "Gå tilbake",
|
|
4413
4516
|
nn: "Gå tilbake",
|
|
@@ -4616,7 +4719,7 @@ const Label = ({ showRequiredStyling, readOnly, id, className, style, htmlProps,
|
|
|
4616
4719
|
const content = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
4617
4720
|
readOnly && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
4618
4721
|
icon: LockFilledIcon,
|
|
4619
|
-
iconSize: "
|
|
4722
|
+
iconSize: "4",
|
|
4620
4723
|
className: Label_module_default["read-only__icon"]
|
|
4621
4724
|
}),
|
|
4622
4725
|
children,
|
|
@@ -4720,18 +4823,25 @@ var Button_module_default = {
|
|
|
4720
4823
|
"button--primary": "dds-Button-module__button--primary",
|
|
4721
4824
|
"button--secondary": "dds-Button-module__button--secondary",
|
|
4722
4825
|
"button--tertiary": "dds-Button-module__button--tertiary",
|
|
4723
|
-
"button--danger": "dds-Button-module__button--danger"
|
|
4826
|
+
"button--primary-danger": "dds-Button-module__button--primary-danger",
|
|
4827
|
+
"button--secondary-danger": "dds-Button-module__button--secondary-danger"
|
|
4724
4828
|
};
|
|
4725
4829
|
//#endregion
|
|
4726
4830
|
//#region src/components/ButtonGroup/ButtonGroup.context.tsx
|
|
4727
4831
|
const ButtonGroupContext = (0, react.createContext)({});
|
|
4728
4832
|
const useButtonGroupContext = () => (0, react.useContext)(ButtonGroupContext);
|
|
4729
4833
|
//#endregion
|
|
4834
|
+
//#region src/components/helpers/styling/common.module.css
|
|
4835
|
+
var common_module_default = {
|
|
4836
|
+
"badge--on-corner": "dds-common-module__badge--on-corner",
|
|
4837
|
+
"button": "dds-common-module__button"
|
|
4838
|
+
};
|
|
4839
|
+
//#endregion
|
|
4730
4840
|
//#region src/components/Button/Button.tsx
|
|
4731
|
-
const Button = ({ as: propAs, children, purpose = "primary", size: propSize = "medium", iconPosition = "left", loading, loadingTooltip, fullWidth = false, icon, iconState, onClick, onFocus, onBlur, id, ref, className, style, htmlProps, ...props }) => {
|
|
4841
|
+
const Button = ({ as: propAs, children, purpose = "primary", size: propSize = "medium", iconPosition = "left", loading, loadingTooltip, fullWidth = false, icon, iconState, onClick, onFocus, onBlur, badgeProps, id, ref, className, style, htmlProps, ...props }) => {
|
|
4732
4842
|
const { purpose: groupPurpose, size: groupSize } = useButtonGroupContext();
|
|
4733
4843
|
const { t } = useTranslation();
|
|
4734
|
-
const spinnerTooltip = loadingTooltip ?? t(texts$
|
|
4844
|
+
const spinnerTooltip = loadingTooltip ?? t(texts$29.saving);
|
|
4735
4845
|
const hasLabel = !!children;
|
|
4736
4846
|
const hasIcon = !!icon;
|
|
4737
4847
|
const hasLabelAndIcon = hasIcon && hasLabel;
|
|
@@ -4739,7 +4849,7 @@ const Button = ({ as: propAs, children, purpose = "primary", size: propSize = "m
|
|
|
4739
4849
|
const isTextButton = hasLabel && !hasIcon;
|
|
4740
4850
|
const noContent = !hasLabel && !hasIcon;
|
|
4741
4851
|
const size = groupSize ?? propSize;
|
|
4742
|
-
const buttonCn = cn(className, Button_module_default.button, Button_module_default[`button--${groupPurpose ? groupPurpose : purpose}`], Button_module_default[`button--${size}`], isTextButton && Button_module_default["just-text"], ...hasLabelAndIcon ? [Button_module_default["with-text-and-icon"], Button_module_default[`with-icon-${iconPosition}`]] : [], isIconButton && Button_module_default["just-icon"], noContent && Button_module_default["no-content"], fullWidth && Button_module_default["button--full-width"], loading && Button_module_default["button--is-loading"], typographyStyles_module_default[`body-short-${size}`], _key1);
|
|
4852
|
+
const buttonCn = cn(className, Button_module_default.button, Button_module_default[`button--${groupPurpose ? groupPurpose : purpose}`], Button_module_default[`button--${size}`], isTextButton && Button_module_default["just-text"], ...hasLabelAndIcon ? [Button_module_default["with-text-and-icon"], Button_module_default[`with-icon-${iconPosition}`]] : [], isIconButton && Button_module_default["just-icon"], noContent && Button_module_default["no-content"], fullWidth && Button_module_default["button--full-width"], loading && Button_module_default["button--is-loading"], typographyStyles_module_default[`body-short-${size}`], common_module_default.button, _key1);
|
|
4743
4853
|
const iconElement = hasIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
4744
4854
|
icon,
|
|
4745
4855
|
iconSize: "component",
|
|
@@ -4761,7 +4871,7 @@ const Button = ({ as: propAs, children, purpose = "primary", size: propSize = "m
|
|
|
4761
4871
|
className: cn(!noContent && Button_module_default["spinner-wrapper--absolute"]),
|
|
4762
4872
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spinner, {
|
|
4763
4873
|
size: "var(--dds-size-icon-component)",
|
|
4764
|
-
color:
|
|
4874
|
+
color: "currentColor",
|
|
4765
4875
|
tooltip: spinnerTooltip
|
|
4766
4876
|
})
|
|
4767
4877
|
})
|
|
@@ -4771,7 +4881,7 @@ const Button = ({ as: propAs, children, purpose = "primary", size: propSize = "m
|
|
|
4771
4881
|
const isDisabled = (restDisabled ?? htmlDisabled ?? loading) === true;
|
|
4772
4882
|
const as = propAs ? propAs : "button";
|
|
4773
4883
|
const aProps = as === "a" ? { rel: "noopener noreferrer" } : {};
|
|
4774
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.
|
|
4884
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ElementAs, {
|
|
4775
4885
|
as,
|
|
4776
4886
|
ref,
|
|
4777
4887
|
...getBaseHTMLProps(id, buttonCn, style, htmlProps, restFinal),
|
|
@@ -4780,11 +4890,15 @@ const Button = ({ as: propAs, children, purpose = "primary", size: propSize = "m
|
|
|
4780
4890
|
onBlur,
|
|
4781
4891
|
disabled: isDisabled,
|
|
4782
4892
|
...aProps,
|
|
4783
|
-
children: content
|
|
4893
|
+
children: [content, badgeProps && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Badge, {
|
|
4894
|
+
...badgeProps,
|
|
4895
|
+
size,
|
|
4896
|
+
className: cn(common_module_default["badge--on-corner"], badgeProps.className)
|
|
4897
|
+
})]
|
|
4784
4898
|
});
|
|
4785
4899
|
};
|
|
4786
4900
|
Button.displayName = "Button";
|
|
4787
|
-
const texts$
|
|
4901
|
+
const texts$29 = createTexts({ saving: {
|
|
4788
4902
|
no: "Lagring pågår",
|
|
4789
4903
|
nb: "Lagring pågår",
|
|
4790
4904
|
nn: "Lagring pågår",
|
|
@@ -4924,14 +5038,12 @@ var Toggle_module_default = {
|
|
|
4924
5038
|
"track": "dds-Toggle-module__track",
|
|
4925
5039
|
"thumb": "dds-Toggle-module__thumb",
|
|
4926
5040
|
"checkmark": "dds-Toggle-module__checkmark",
|
|
4927
|
-
"unchecked-icon": "dds-Toggle-module__unchecked-icon",
|
|
4928
|
-
"checked-icon": "dds-Toggle-module__checked-icon",
|
|
4929
5041
|
"labeltext--readonly": "dds-Toggle-module__labeltext--readonly",
|
|
4930
5042
|
"icon--read-only": "dds-Toggle-module__icon--read-only",
|
|
5043
|
+
"small": "dds-Toggle-module__small",
|
|
4931
5044
|
"medium": "dds-Toggle-module__medium",
|
|
4932
5045
|
"large": "dds-Toggle-module__large",
|
|
4933
5046
|
"label--is-loading": "dds-Toggle-module__label--is-loading",
|
|
4934
|
-
"label--color-scheme": "dds-Toggle-module__label--color-scheme",
|
|
4935
5047
|
"label--disabled": "dds-Toggle-module__label--disabled",
|
|
4936
5048
|
"label--read-only": "dds-Toggle-module__label--read-only"
|
|
4937
5049
|
};
|
|
@@ -4944,34 +5056,24 @@ const VisuallyHidden = ({ id, as: asProp, className, style, htmlProps, ...rest }
|
|
|
4944
5056
|
});
|
|
4945
5057
|
};
|
|
4946
5058
|
VisuallyHidden.displayName = "VisuallyHidden";
|
|
4947
|
-
const Toggle = ({ id, children, size = "medium", checked: checkedProp, defaultChecked, onChange, disabled, readOnly, isLoading, className, style, htmlProps = {},
|
|
5059
|
+
const Toggle = ({ id, children, size = "medium", checked: checkedProp, defaultChecked, onChange, disabled, readOnly, isLoading, className, style, htmlProps = {}, ...rest }) => {
|
|
4948
5060
|
const { t } = useTranslation();
|
|
4949
5061
|
const generatedId = (0, react.useId)();
|
|
4950
5062
|
const uniqueId = id ?? `${generatedId}-toggle`;
|
|
4951
|
-
const iconSize =
|
|
5063
|
+
const iconSize = {
|
|
5064
|
+
small: "3",
|
|
5065
|
+
medium: "4",
|
|
5066
|
+
large: "5"
|
|
5067
|
+
}[size];
|
|
4952
5068
|
const [checked, setChecked] = useControllableState({
|
|
4953
5069
|
value: checkedProp,
|
|
4954
5070
|
defaultValue: defaultChecked ?? false,
|
|
4955
5071
|
onChange
|
|
4956
5072
|
});
|
|
4957
|
-
const isColorScheme = variant === "colorScheme";
|
|
4958
|
-
const marker = isColorScheme ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
4959
|
-
className: Toggle_module_default["unchecked-icon"],
|
|
4960
|
-
icon: SunIcon,
|
|
4961
|
-
iconSize
|
|
4962
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
4963
|
-
className: Toggle_module_default["checked-icon"],
|
|
4964
|
-
icon: MoonIcon,
|
|
4965
|
-
iconSize
|
|
4966
|
-
})] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
4967
|
-
className: Toggle_module_default.checkmark,
|
|
4968
|
-
icon: CheckIcon,
|
|
4969
|
-
iconSize
|
|
4970
|
-
});
|
|
4971
5073
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
4972
5074
|
htmlFor: uniqueId,
|
|
4973
5075
|
style,
|
|
4974
|
-
className: cn(className, Toggle_module_default.label, Toggle_module_default[size], isLoading && Toggle_module_default["label--is-loading"], disabled && Toggle_module_default["label--disabled"], readOnly && Toggle_module_default["label--read-only"]
|
|
5076
|
+
className: cn(className, Toggle_module_default.label, Toggle_module_default[size], typographyStyles_module_default[`body-short-${size}`], isLoading && Toggle_module_default["label--is-loading"], disabled && Toggle_module_default["label--disabled"], readOnly && Toggle_module_default["label--read-only"]),
|
|
4975
5077
|
children: [
|
|
4976
5078
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(HiddenInput, {
|
|
4977
5079
|
...getBaseHTMLProps(uniqueId, focus_module_default["focusable-sibling"], void 0, htmlProps, rest),
|
|
@@ -4987,7 +5089,14 @@ const Toggle = ({ id, children, size = "medium", checked: checkedProp, defaultCh
|
|
|
4987
5089
|
className: cn(Toggle_module_default.track, focus_module_default["focus-styled-sibling"]),
|
|
4988
5090
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4989
5091
|
className: Toggle_module_default.thumb,
|
|
4990
|
-
children: isLoading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spinner, {
|
|
5092
|
+
children: isLoading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spinner, {
|
|
5093
|
+
size: `var(--dds-size-${iconSize})`,
|
|
5094
|
+
color: "currentColor"
|
|
5095
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
5096
|
+
className: Toggle_module_default.checkmark,
|
|
5097
|
+
icon: CheckIcon,
|
|
5098
|
+
iconSize
|
|
5099
|
+
})
|
|
4991
5100
|
})
|
|
4992
5101
|
}),
|
|
4993
5102
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
@@ -4995,7 +5104,7 @@ const Toggle = ({ id, children, size = "medium", checked: checkedProp, defaultCh
|
|
|
4995
5104
|
children: [
|
|
4996
5105
|
readOnly && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
4997
5106
|
icon: LockFilledIcon,
|
|
4998
|
-
iconSize: "
|
|
5107
|
+
iconSize: "4",
|
|
4999
5108
|
className: Toggle_module_default["icon--read-only"]
|
|
5000
5109
|
}),
|
|
5001
5110
|
children,
|
|
@@ -5173,7 +5282,7 @@ const Breadcrumbs = ({ children, smallScreenBreakpoint, id, className, style, ht
|
|
|
5173
5282
|
size: "xsmall",
|
|
5174
5283
|
icon: MoreHorizontalIcon,
|
|
5175
5284
|
purpose: "tertiary",
|
|
5176
|
-
"aria-label": bChildrenTruncated.length > 1 ? t(texts$
|
|
5285
|
+
"aria-label": bChildrenTruncated.length > 1 ? t(texts$28.showHiddenTo(bChildren.length - 1)) : t(texts$28.showHidden)
|
|
5177
5286
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OverflowMenu, {
|
|
5178
5287
|
portal: false,
|
|
5179
5288
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OverflowMenuList, { children: bChildrenTruncated })
|
|
@@ -5193,7 +5302,7 @@ const Breadcrumbs = ({ children, smallScreenBreakpoint, id, className, style, ht
|
|
|
5193
5302
|
};
|
|
5194
5303
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("nav", {
|
|
5195
5304
|
...getBaseHTMLProps(id, cn(className, typographyStyles_module_default["body-short-medium"]), style, htmlProps, rest),
|
|
5196
|
-
"aria-label": t(texts$
|
|
5305
|
+
"aria-label": t(texts$28.breadcrumbs),
|
|
5197
5306
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(HStack, {
|
|
5198
5307
|
...responsiveListProps,
|
|
5199
5308
|
hideBelow: hasSmallScreenBreakpoint ? smallScreenBreakpoint : void 0,
|
|
@@ -5206,7 +5315,7 @@ const Breadcrumbs = ({ children, smallScreenBreakpoint, id, className, style, ht
|
|
|
5206
5315
|
});
|
|
5207
5316
|
};
|
|
5208
5317
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
5209
|
-
const texts$
|
|
5318
|
+
const texts$28 = createTexts({
|
|
5210
5319
|
breadcrumbs: {
|
|
5211
5320
|
nb: "Brødsmulesti",
|
|
5212
5321
|
no: "Brødsmulesti",
|
|
@@ -5355,6 +5464,10 @@ const CardExpandableBody = ({ children, className, style, htmlProps, padding, ..
|
|
|
5355
5464
|
};
|
|
5356
5465
|
CardExpandableBody.displayName = "CardExpandableBody";
|
|
5357
5466
|
//#endregion
|
|
5467
|
+
//#region src/components/Card/CardSelectionControl/CardSelectable.context.tsx
|
|
5468
|
+
const CardSelectableContext = (0, react.createContext)({});
|
|
5469
|
+
const useCardSelectableContext = () => (0, react.useContext)(CardSelectableContext);
|
|
5470
|
+
//#endregion
|
|
5358
5471
|
//#region src/components/SelectionControl/Checkbox/CheckboxGroupContext.tsx
|
|
5359
5472
|
const CheckboxGroupContext = (0, react.createContext)(null);
|
|
5360
5473
|
const useCheckboxGroup = () => {
|
|
@@ -5380,15 +5493,22 @@ const SelectionControl = ({ controlType, className, ...rest }) => /* @__PURE__ *
|
|
|
5380
5493
|
className: cn(className, SelectionControl_module_default["selection-control"], controlType === "radio" && SelectionControl_module_default["selection-control--radio"]),
|
|
5381
5494
|
...rest
|
|
5382
5495
|
});
|
|
5383
|
-
const Label$1 = ({ disabled, hasText, controlType, className, ...rest }) => {
|
|
5496
|
+
const Label$1 = ({ disabled, hasText, controlType, className, size = "medium", style, ...rest }) => {
|
|
5497
|
+
const styleVariables = { "--dds-size-sl": {
|
|
5498
|
+
small: "var(--dds-size-5)",
|
|
5499
|
+
medium: "var(--dds-size-6)"
|
|
5500
|
+
}[size] };
|
|
5384
5501
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
5385
5502
|
as: "label",
|
|
5386
5503
|
position: "relative",
|
|
5504
|
+
style: {
|
|
5505
|
+
...style,
|
|
5506
|
+
...styleVariables
|
|
5507
|
+
},
|
|
5387
5508
|
display: "flex",
|
|
5388
5509
|
alignItems: "center",
|
|
5389
5510
|
width: "fit-content",
|
|
5390
|
-
|
|
5391
|
-
className: cn(className, SelectionControl_module_default.label, SelectionControl_module_default[`label--${controlType}`], !hasText && SelectionControl_module_default["label--no-text"], typographyStyles_module_default["body-short-medium"], disabled && typographyStyles_module_default["text-color--subtle"]),
|
|
5511
|
+
className: cn(className, SelectionControl_module_default.label, SelectionControl_module_default[`label--${controlType}`], !hasText && SelectionControl_module_default["label--no-text"], typographyStyles_module_default[`body-short-${size}`], disabled && typographyStyles_module_default["text-color--subtle"]),
|
|
5392
5512
|
...rest
|
|
5393
5513
|
});
|
|
5394
5514
|
};
|
|
@@ -5403,7 +5523,7 @@ const renderGroupLabel = ({ id, showRequiredStyling, readOnly, label }) => {
|
|
|
5403
5523
|
readOnly && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
5404
5524
|
icon: LockIcon,
|
|
5405
5525
|
className: Label_module_default["read-only__icon"],
|
|
5406
|
-
iconSize: "
|
|
5526
|
+
iconSize: "4"
|
|
5407
5527
|
}),
|
|
5408
5528
|
label,
|
|
5409
5529
|
" ",
|
|
@@ -5413,15 +5533,8 @@ const renderGroupLabel = ({ id, showRequiredStyling, readOnly, label }) => {
|
|
|
5413
5533
|
else return null;
|
|
5414
5534
|
};
|
|
5415
5535
|
//#endregion
|
|
5416
|
-
//#region src/components/SelectionControl/SelectionControl.utils.tsx
|
|
5417
|
-
const selectionControlTypographyProps = {
|
|
5418
|
-
color: "inherit",
|
|
5419
|
-
typographyType: "body-short-medium",
|
|
5420
|
-
as: "span"
|
|
5421
|
-
};
|
|
5422
|
-
//#endregion
|
|
5423
5536
|
//#region src/components/SelectionControl/Checkbox/Checkbox.tsx
|
|
5424
|
-
const Checkbox = ({ id, name, label, error = false, disabled, readOnly, indeterminate, "aria-describedby": ariaDescribedby, className, htmlProps = {}, style, children, ...rest }) => {
|
|
5537
|
+
const Checkbox = ({ id, name, label, error = false, disabled, readOnly, indeterminate, "aria-describedby": ariaDescribedby, className, htmlProps = {}, style, children, size, ...rest }) => {
|
|
5425
5538
|
const generatedId = (0, react.useId)();
|
|
5426
5539
|
const uniqueId = id ?? `${generatedId}-checkbox`;
|
|
5427
5540
|
const checkboxGroup = useCheckboxGroup();
|
|
@@ -5430,6 +5543,7 @@ const Checkbox = ({ id, name, label, error = false, disabled, readOnly, indeterm
|
|
|
5430
5543
|
const isReadOnly = readOnly || checkboxGroup?.readOnly;
|
|
5431
5544
|
const hasError = error || checkboxGroup?.error;
|
|
5432
5545
|
const isDisabled = disabled || checkboxGroup?.disabled;
|
|
5546
|
+
const controlSize = size || checkboxGroup?.size || "medium";
|
|
5433
5547
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Label$1, {
|
|
5434
5548
|
disabled: isDisabled,
|
|
5435
5549
|
htmlFor: uniqueId,
|
|
@@ -5437,6 +5551,7 @@ const Checkbox = ({ id, name, label, error = false, disabled, readOnly, indeterm
|
|
|
5437
5551
|
controlType: "checkbox",
|
|
5438
5552
|
className,
|
|
5439
5553
|
style,
|
|
5554
|
+
size: controlSize,
|
|
5440
5555
|
children: [
|
|
5441
5556
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(HiddenInput, {
|
|
5442
5557
|
...getBaseHTMLProps(uniqueId, void 0, void 0, htmlProps, rest),
|
|
@@ -5461,10 +5576,7 @@ const Checkbox = ({ id, name, label, error = false, disabled, readOnly, indeterm
|
|
|
5461
5576
|
controlType: "checkbox",
|
|
5462
5577
|
className: focus_module_default["focus-styled-sibling"]
|
|
5463
5578
|
}),
|
|
5464
|
-
hasChildren ? children : hasLabel ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5465
|
-
...selectionControlTypographyProps,
|
|
5466
|
-
children: label
|
|
5467
|
-
}) : null
|
|
5579
|
+
hasChildren ? children : hasLabel ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label }) : null
|
|
5468
5580
|
]
|
|
5469
5581
|
});
|
|
5470
5582
|
};
|
|
@@ -5526,7 +5638,7 @@ const renderInputMessage = ({ tip, tipId, errorMessage, errorMessageId, noSpacin
|
|
|
5526
5638
|
//#endregion
|
|
5527
5639
|
//#region src/components/SelectionControl/Checkbox/CheckboxGroup.tsx
|
|
5528
5640
|
const CheckboxGroup = (props) => {
|
|
5529
|
-
const { label, direction = "row", errorMessage, tip, required = false, disabled = false, readOnly = false, groupId, children, id, className, style, htmlProps = {}, ...rest } = props;
|
|
5641
|
+
const { label, direction = "row", errorMessage, tip, required = false, disabled = false, readOnly = false, groupId, children, id, className, style, htmlProps = {}, size = "medium", ...rest } = props;
|
|
5530
5642
|
const { "aria-required": ariaRequired } = htmlProps;
|
|
5531
5643
|
const generatedId = (0, react.useId)();
|
|
5532
5644
|
const uniqueGroupId = groupId ?? `${generatedId}-checkboxGroup`;
|
|
@@ -5540,7 +5652,8 @@ const CheckboxGroup = (props) => {
|
|
|
5540
5652
|
uniqueGroupId,
|
|
5541
5653
|
tipId: tip ? tipId : void 0,
|
|
5542
5654
|
disabled,
|
|
5543
|
-
readOnly
|
|
5655
|
+
readOnly,
|
|
5656
|
+
size
|
|
5544
5657
|
};
|
|
5545
5658
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5546
5659
|
...getBaseHTMLProps(id, cn(className, SelectionControl_module_default.container), style, {
|
|
@@ -5592,7 +5705,7 @@ const getIsChecked = ({ value, groupValue, checked }) => {
|
|
|
5592
5705
|
}
|
|
5593
5706
|
return !!value;
|
|
5594
5707
|
};
|
|
5595
|
-
const RadioButton = ({ id, name, label, disabled = false, readOnly = false, error = false, checked, value, children, required = false, onChange, "aria-describedby": ariaDescribedby, className, htmlProps = {}, style, ...rest }) => {
|
|
5708
|
+
const RadioButton = ({ id, name, label, disabled = false, readOnly = false, error = false, checked, value, children, required = false, onChange, "aria-describedby": ariaDescribedby, className, htmlProps = {}, size, style, ...rest }) => {
|
|
5596
5709
|
const generatedId = (0, react.useId)();
|
|
5597
5710
|
const uniqueId = id ?? `${generatedId}-radioButton`;
|
|
5598
5711
|
const hasChildren = !!children;
|
|
@@ -5613,6 +5726,7 @@ const RadioButton = ({ id, name, label, disabled = false, readOnly = false, erro
|
|
|
5613
5726
|
groupValue: radioButtonGroup?.value,
|
|
5614
5727
|
checked
|
|
5615
5728
|
});
|
|
5729
|
+
const controlSize = size || radioButtonGroup?.size || "medium";
|
|
5616
5730
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Label$1, {
|
|
5617
5731
|
disabled: isDisabled,
|
|
5618
5732
|
style,
|
|
@@ -5620,6 +5734,7 @@ const RadioButton = ({ id, name, label, disabled = false, readOnly = false, erro
|
|
|
5620
5734
|
hasText: hasLabel || hasChildren,
|
|
5621
5735
|
htmlFor: uniqueId,
|
|
5622
5736
|
controlType: "radio",
|
|
5737
|
+
size: controlSize,
|
|
5623
5738
|
children: [
|
|
5624
5739
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(HiddenInput, {
|
|
5625
5740
|
...getBaseHTMLProps(uniqueId, void 0, void 0, htmlProps, rest),
|
|
@@ -5641,17 +5756,14 @@ const RadioButton = ({ id, name, label, disabled = false, readOnly = false, erro
|
|
|
5641
5756
|
controlType: "radio",
|
|
5642
5757
|
className: focus_module_default["focus-styled-sibling"]
|
|
5643
5758
|
}),
|
|
5644
|
-
hasChildren ? children : hasLabel ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5645
|
-
...selectionControlTypographyProps,
|
|
5646
|
-
children: label
|
|
5647
|
-
}) : null
|
|
5759
|
+
hasChildren ? children : hasLabel ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label }) : null
|
|
5648
5760
|
]
|
|
5649
5761
|
});
|
|
5650
5762
|
};
|
|
5651
5763
|
RadioButton.displayName = "RadioButton";
|
|
5652
5764
|
//#endregion
|
|
5653
5765
|
//#region src/components/SelectionControl/RadioButton/RadioButtonGroup.tsx
|
|
5654
|
-
const RadioButtonGroup = ({ name, label, groupId, errorMessage, tip, disabled = false, readOnly = false, direction = "row", value, defaultValue, children, required = false, onChange, id, className, style, htmlProps = {}, ...rest }) => {
|
|
5766
|
+
const RadioButtonGroup = ({ name, label, groupId, errorMessage, tip, disabled = false, readOnly = false, direction = "row", value, defaultValue, children, required = false, onChange, size = "medium", id, className, style, htmlProps = {}, ...rest }) => {
|
|
5655
5767
|
const { "aria-required": ariaRequired = false } = htmlProps;
|
|
5656
5768
|
const generatedId = (0, react.useId)();
|
|
5657
5769
|
const uniqueGroupId = groupId ?? `${generatedId}-radioButtonGroup`;
|
|
@@ -5673,7 +5785,8 @@ const RadioButtonGroup = ({ name, label, groupId, errorMessage, tip, disabled =
|
|
|
5673
5785
|
required,
|
|
5674
5786
|
readOnly,
|
|
5675
5787
|
value: groupValue,
|
|
5676
|
-
onChange: handleChange
|
|
5788
|
+
onChange: handleChange,
|
|
5789
|
+
size
|
|
5677
5790
|
};
|
|
5678
5791
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5679
5792
|
...getBaseHTMLProps(id, cn(className, SelectionControl_module_default.container), style, {
|
|
@@ -5711,10 +5824,6 @@ const RadioButtonGroup = ({ name, label, groupId, errorMessage, tip, disabled =
|
|
|
5711
5824
|
};
|
|
5712
5825
|
RadioButtonGroup.displayName = "RadioButtonGroup";
|
|
5713
5826
|
//#endregion
|
|
5714
|
-
//#region src/components/Card/CardSelectionControl/CardSelectable.context.tsx
|
|
5715
|
-
const CardSelectableContext = (0, react.createContext)({});
|
|
5716
|
-
const useCardSelectableContext = () => (0, react.useContext)(CardSelectableContext);
|
|
5717
|
-
//#endregion
|
|
5718
5827
|
//#region src/components/Card/CardSelectionControl/CardSelectable.tsx
|
|
5719
5828
|
const CardSelectable = (props) => {
|
|
5720
5829
|
const { appearance = "filled", cardType: cardTypeProp, id, padding, controlPlacementProps = {}, "aria-describedby": ariaDescribedby, className, htmlProps, style, ...rest } = props;
|
|
@@ -5738,9 +5847,9 @@ Provide \`cardType\` either via a parent <CardSelectableGroup> or directly on th
|
|
|
5738
5847
|
value
|
|
5739
5848
|
};
|
|
5740
5849
|
const customStyles = {
|
|
5741
|
-
["--dds-selection-control-card-padding"]: padding ?? "var(--dds-spacing-x1-5) var(--dds-spacing-x1-5) var(--dds-spacing-x1-5) calc(var(--dds-size-
|
|
5850
|
+
["--dds-selection-control-card-padding"]: padding ?? "var(--dds-spacing-x1-5) var(--dds-spacing-x1-5) var(--dds-spacing-x1-5) calc(var(--dds-size-6) + var(--dds-spacing-x0-5) + var(--dds-spacing-x1))",
|
|
5742
5851
|
["--dds-selection-control-card-control-top"]: top,
|
|
5743
|
-
["--dds-selection-control-card-control-left"]: left ?? `var(--dds-spacing-x1
|
|
5852
|
+
["--dds-selection-control-card-control-left"]: left ?? `var(--dds-spacing-x1)`
|
|
5744
5853
|
};
|
|
5745
5854
|
const sharedProps = {
|
|
5746
5855
|
...getBaseHTMLProps(id, classNames, {
|
|
@@ -5812,8 +5921,124 @@ const CardSelectableGroup = ({ name, cardType, errorMessage, disabled, readOnly,
|
|
|
5812
5921
|
};
|
|
5813
5922
|
CardSelectableGroup.displayName = "CardSelectableGroup";
|
|
5814
5923
|
//#endregion
|
|
5815
|
-
//#region src/components/Chip/Chip.
|
|
5816
|
-
|
|
5924
|
+
//#region src/components/Chip/Chip.module.css
|
|
5925
|
+
var Chip_module_default = {
|
|
5926
|
+
"container": "dds-Chip-module__container",
|
|
5927
|
+
"selection-control": "dds-Chip-module__selection-control",
|
|
5928
|
+
"removable": "dds-Chip-module__removable",
|
|
5929
|
+
"selection-control-spacing": "dds-Chip-module__selection-control-spacing",
|
|
5930
|
+
"selection-control--no-indicator": "dds-Chip-module__selection-control--no-indicator"
|
|
5931
|
+
};
|
|
5932
|
+
//#endregion
|
|
5933
|
+
//#region src/components/helpers/Input/Input.module.css
|
|
5934
|
+
var Input_module_default = {
|
|
5935
|
+
"container": "dds-Input-module__container",
|
|
5936
|
+
"input-group": "dds-Input-module__input-group",
|
|
5937
|
+
"input": "dds-Input-module__input",
|
|
5938
|
+
"disabled": "dds-Input-module__disabled",
|
|
5939
|
+
"read-only": "dds-Input-module__read-only",
|
|
5940
|
+
"input--stateful": "dds-Input-module__input--stateful",
|
|
5941
|
+
"input--hover": "dds-Input-module__input--hover",
|
|
5942
|
+
"input--stateful-danger": "dds-Input-module__input--stateful-danger",
|
|
5943
|
+
"input--large": "dds-Input-module__input--large",
|
|
5944
|
+
"input--medium": "dds-Input-module__input--medium",
|
|
5945
|
+
"input--small": "dds-Input-module__input--small",
|
|
5946
|
+
"input--xsmall": "dds-Input-module__input--xsmall",
|
|
5947
|
+
"compact--medium": "dds-Input-module__compact--medium",
|
|
5948
|
+
"compact--small": "dds-Input-module__compact--small",
|
|
5949
|
+
"compact-with-icon--medium": "dds-Input-module__compact-with-icon--medium",
|
|
5950
|
+
"compact-with-icon--small": "dds-Input-module__compact-with-icon--small",
|
|
5951
|
+
"input-with-icon--large": "dds-Input-module__input-with-icon--large",
|
|
5952
|
+
"input-with-icon--medium": "dds-Input-module__input-with-icon--medium",
|
|
5953
|
+
"input-with-icon--small": "dds-Input-module__input-with-icon--small",
|
|
5954
|
+
"input-with-icon--xsmall": "dds-Input-module__input-with-icon--xsmall",
|
|
5955
|
+
"input-with-el-right--large": "dds-Input-module__input-with-el-right--large",
|
|
5956
|
+
"input-with-el-right--medium": "dds-Input-module__input-with-el-right--medium",
|
|
5957
|
+
"input-with-el-right--small": "dds-Input-module__input-with-el-right--small",
|
|
5958
|
+
"input-with-el-right--xsmall": "dds-Input-module__input-with-el-right--xsmall",
|
|
5959
|
+
"input-with-btn-right--large": "dds-Input-module__input-with-btn-right--large",
|
|
5960
|
+
"input-with-btn-right--medium": "dds-Input-module__input-with-btn-right--medium",
|
|
5961
|
+
"input-with-btn-right--small": "dds-Input-module__input-with-btn-right--small",
|
|
5962
|
+
"input-with-btn-right--xsmall": "dds-Input-module__input-with-btn-right--xsmall",
|
|
5963
|
+
"input-with-icon-and-button-right--large": "dds-Input-module__input-with-icon-and-button-right--large",
|
|
5964
|
+
"input-with-icon-and-button-right--medium": "dds-Input-module__input-with-icon-and-button-right--medium",
|
|
5965
|
+
"input-with-icon-and-button-right--small": "dds-Input-module__input-with-icon-and-button-right--small",
|
|
5966
|
+
"input-with-icon-and-button-right--xsmall": "dds-Input-module__input-with-icon-and-button-right--xsmall",
|
|
5967
|
+
"input-group__absolute-el-right--large": "dds-Input-module__input-group__absolute-el-right--large",
|
|
5968
|
+
"input-group__absolute-el-right--medium": "dds-Input-module__input-group__absolute-el-right--medium",
|
|
5969
|
+
"input-group__absolute-el-right--small": "dds-Input-module__input-group__absolute-el-right--small",
|
|
5970
|
+
"input-group__absolute-el-right--xsmall": "dds-Input-module__input-group__absolute-el-right--xsmall",
|
|
5971
|
+
"input-group__btn-right": "dds-Input-module__input-group__btn-right",
|
|
5972
|
+
"input-group__btn-right-with-right-icon--xsmall": "dds-Input-module__input-group__btn-right-with-right-icon--xsmall",
|
|
5973
|
+
"input-group__btn-right-with-right-icon--small": "dds-Input-module__input-group__btn-right-with-right-icon--small",
|
|
5974
|
+
"input-group__btn-right-with-right-icon--medium": "dds-Input-module__input-group__btn-right-with-right-icon--medium",
|
|
5975
|
+
"input-group__btn-right-with-right-icon--large": "dds-Input-module__input-group__btn-right-with-right-icon--large",
|
|
5976
|
+
"input--with-affix": "dds-Input-module__input--with-affix",
|
|
5977
|
+
"input-group__absolute-el": "dds-Input-module__input-group__absolute-el",
|
|
5978
|
+
"input-group__absolute-el--large": "dds-Input-module__input-group__absolute-el--large",
|
|
5979
|
+
"input-group__absolute-el--medium": "dds-Input-module__input-group__absolute-el--medium",
|
|
5980
|
+
"input-group__absolute-el--small": "dds-Input-module__input-group__absolute-el--small",
|
|
5981
|
+
"input-group__absolute-el--xsmall": "dds-Input-module__input-group__absolute-el--xsmall"
|
|
5982
|
+
};
|
|
5983
|
+
const ChipBase = ({ htmlProps, size = "medium", id, className, style, children, icon, ...rest }) => {
|
|
5984
|
+
const hasIcon = !!icon;
|
|
5985
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Paper, {
|
|
5986
|
+
display: "inline-flex",
|
|
5987
|
+
alignItems: "center",
|
|
5988
|
+
maxWidth: "100%",
|
|
5989
|
+
borderRadius: "rounded",
|
|
5990
|
+
border: "border-subtle",
|
|
5991
|
+
...getBaseHTMLProps(id, cn(className, typographyStyles_module_default[`body-short-${size}`], Input_module_default[`compact--${size}`], hasIcon && Input_module_default[`compact-with-icon--${size}`], Chip_module_default.container, _key1), style, htmlProps, {
|
|
5992
|
+
...rest,
|
|
5993
|
+
...typeof rest.as === "function" ? { size } : {}
|
|
5994
|
+
}),
|
|
5995
|
+
children: [!!icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
5996
|
+
icon,
|
|
5997
|
+
iconSize: "component"
|
|
5998
|
+
}), children]
|
|
5999
|
+
});
|
|
6000
|
+
};
|
|
6001
|
+
const ChipButton = ({ htmlProps, size = "medium", id, className, style, children, badgeProps, ...rest }) => {
|
|
6002
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ChipBase, {
|
|
6003
|
+
as: "button",
|
|
6004
|
+
size,
|
|
6005
|
+
...getBaseHTMLProps(id, cn(className, common_module_default.button), style, htmlProps, rest),
|
|
6006
|
+
children: [children, badgeProps && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Badge, {
|
|
6007
|
+
...badgeProps,
|
|
6008
|
+
size,
|
|
6009
|
+
className: cn(common_module_default["badge--on-corner"], badgeProps.className)
|
|
6010
|
+
})]
|
|
6011
|
+
});
|
|
6012
|
+
};
|
|
6013
|
+
const ChipSelectionControl = ({ as, htmlProps, size = "medium", showSelectionControlIndicator = true, id, className, style, ...rest }) => {
|
|
6014
|
+
const sizeKey = {
|
|
6015
|
+
small: "sm",
|
|
6016
|
+
medium: "md"
|
|
6017
|
+
}[size];
|
|
6018
|
+
const showIndicator = showSelectionControlIndicator && !rest.icon;
|
|
6019
|
+
const styleVariables = showIndicator ? {
|
|
6020
|
+
["--dds-spacing-chip-sl-left"]: `calc(var(--dds-spacing-compact-icon-left-${sizeKey}) + var(--dds-spacing-compact-icon-text-gap-${sizeKey}) + var(--dds-size-icon-component))`,
|
|
6021
|
+
["--dds-spacing-chip-sl-right"]: `var(--dds-spacing-compact-inline-${sizeKey})`,
|
|
6022
|
+
["--dds-spacing-chip-sl-marker-left"]: `var(--dds-spacing-compact-icon-left-${sizeKey})`
|
|
6023
|
+
} : {};
|
|
6024
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChipBase, {
|
|
6025
|
+
as,
|
|
6026
|
+
size,
|
|
6027
|
+
...getBaseHTMLProps(id, cn(className, Chip_module_default["selection-control"], showIndicator ? Chip_module_default["selection-control-spacing"] : cn(Chip_module_default["selection-control--no-indicator"], focus_module_default["has-focusable-input"])), {
|
|
6028
|
+
...style,
|
|
6029
|
+
...styleVariables
|
|
6030
|
+
}, htmlProps, rest)
|
|
6031
|
+
});
|
|
6032
|
+
};
|
|
6033
|
+
const ChipCheckbox = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChipSelectionControl, {
|
|
6034
|
+
...props,
|
|
6035
|
+
as: Checkbox
|
|
6036
|
+
});
|
|
6037
|
+
const ChipRadio = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChipSelectionControl, {
|
|
6038
|
+
...props,
|
|
6039
|
+
as: RadioButton
|
|
6040
|
+
});
|
|
6041
|
+
const ChipRemovable = ({ htmlProps = {}, onClose, size = "medium", id, className, style, children, ...rest }) => {
|
|
5817
6042
|
const { t } = useTranslation();
|
|
5818
6043
|
const { "aria-label": ariaLabel, ...restHTMLprops } = htmlProps;
|
|
5819
6044
|
const [isOpen, setIsOpen] = (0, react.useState)(true);
|
|
@@ -5821,30 +6046,23 @@ const Chip = ({ children, onClose, id, className, style, htmlProps = {}, ...rest
|
|
|
5821
6046
|
setIsOpen(false);
|
|
5822
6047
|
onClose?.();
|
|
5823
6048
|
};
|
|
5824
|
-
return isOpen ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
padding: "x0.25 0 x0.25 x0.5",
|
|
5830
|
-
borderRadius: "chip",
|
|
5831
|
-
border: "border-subtle",
|
|
5832
|
-
background: "surface-subtle",
|
|
5833
|
-
...getBaseHTMLProps(id, cn(className, typographyStyles_module_default["body-short-medium"]), style, restHTMLprops, rest),
|
|
5834
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextOverflowEllipsisInner, { children }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Bleed, {
|
|
5835
|
-
as: Button,
|
|
5836
|
-
purpose: "tertiary",
|
|
5837
|
-
size: "xsmall",
|
|
6049
|
+
return isOpen ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ChipBase, {
|
|
6050
|
+
as: "span",
|
|
6051
|
+
size,
|
|
6052
|
+
...getBaseHTMLProps(id, cn(className, Chip_module_default.removable), style, restHTMLprops, rest),
|
|
6053
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextOverflowEllipsisInner, { children }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InlineButton, {
|
|
5838
6054
|
icon: CloseIcon,
|
|
6055
|
+
color: "icon-default",
|
|
5839
6056
|
onClick,
|
|
5840
|
-
"aria-label": ariaLabel ?? t(texts$
|
|
5841
|
-
bleedMarginBlock: "x0.25",
|
|
5842
|
-
reflectivePadding: true
|
|
6057
|
+
"aria-label": ariaLabel ?? t(texts$27.removeChip) + (children ? ` ${children}` : "")
|
|
5843
6058
|
})]
|
|
5844
6059
|
}) : null;
|
|
5845
6060
|
};
|
|
5846
|
-
|
|
5847
|
-
|
|
6061
|
+
ChipRemovable.displayName = "ChipRemovable";
|
|
6062
|
+
ChipRadio.displayName = "ChipRadio";
|
|
6063
|
+
ChipCheckbox.displayName = "ChipCheckbox";
|
|
6064
|
+
ChipButton.displayName = "ChipButton";
|
|
6065
|
+
const texts$27 = createTexts({ removeChip: {
|
|
5848
6066
|
nb: "Fjern merkelapp",
|
|
5849
6067
|
no: "Fjern merkelapp",
|
|
5850
6068
|
nn: "Fjern merkelapp",
|
|
@@ -5853,17 +6071,49 @@ const texts$26 = createTexts({ removeChip: {
|
|
|
5853
6071
|
} });
|
|
5854
6072
|
//#endregion
|
|
5855
6073
|
//#region src/components/Chip/ChipGroup.tsx
|
|
5856
|
-
const ChipGroup = (
|
|
5857
|
-
const
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
6074
|
+
const ChipGroup = (props) => {
|
|
6075
|
+
const { children, label, labelId, gap = "x0.75", flexWrap = "wrap", id, className, style, htmlProps, ...rest } = props;
|
|
6076
|
+
const generatedId = (0, react.useId)();
|
|
6077
|
+
const uniqueLabelId = labelId ?? `${generatedId}-ChipGroupLabel`;
|
|
6078
|
+
const baseProps = getBaseHTMLProps(id, className, style, htmlProps, rest);
|
|
6079
|
+
const layout = {
|
|
6080
|
+
gap,
|
|
6081
|
+
flexWrap
|
|
6082
|
+
};
|
|
6083
|
+
return label ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6084
|
+
...baseProps,
|
|
6085
|
+
role: "group",
|
|
6086
|
+
"aria-labelledby": label ? uniqueLabelId : void 0,
|
|
6087
|
+
children: [renderGroupLabel({
|
|
6088
|
+
label,
|
|
6089
|
+
id: uniqueLabelId
|
|
6090
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HStack, {
|
|
6091
|
+
...layout,
|
|
6092
|
+
children
|
|
6093
|
+
})]
|
|
6094
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HStack, {
|
|
6095
|
+
...baseProps,
|
|
6096
|
+
...layout,
|
|
6097
|
+
role: "group",
|
|
6098
|
+
children
|
|
5863
6099
|
});
|
|
5864
6100
|
};
|
|
5865
6101
|
ChipGroup.displayName = "ChipGroup";
|
|
5866
6102
|
//#endregion
|
|
6103
|
+
//#region src/components/Chip/index.ts
|
|
6104
|
+
const Chip = {
|
|
6105
|
+
Button: ChipButton,
|
|
6106
|
+
Checkbox: ChipCheckbox,
|
|
6107
|
+
Radio: ChipRadio,
|
|
6108
|
+
Removable: ChipRemovable,
|
|
6109
|
+
Group: ChipGroup
|
|
6110
|
+
};
|
|
6111
|
+
Chip.Button.displayName = "Chip.Button";
|
|
6112
|
+
Chip.Checkbox.displayName = "Chip.Checkbox";
|
|
6113
|
+
Chip.Radio.displayName = "Chip.Radio";
|
|
6114
|
+
Chip.Removable.displayName = "Chip.Removable";
|
|
6115
|
+
Chip.Group.displayName = "Chip.Group";
|
|
6116
|
+
//#endregion
|
|
5867
6117
|
//#region src/components/CookieBanner/CookieBanner.module.css
|
|
5868
6118
|
var CookieBanner_module_default = {
|
|
5869
6119
|
"container": "dds-CookieBanner-module__container",
|
|
@@ -5925,7 +6175,7 @@ function CookieBanner({ headerText, description, buttons, checkboxes, id, classN
|
|
|
5925
6175
|
children: [heading, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShowHide, {
|
|
5926
6176
|
as: Button,
|
|
5927
6177
|
showBelow: collapsedBreakpoint,
|
|
5928
|
-
"aria-label": t(texts$
|
|
6178
|
+
"aria-label": t(texts$26.expandConsent),
|
|
5929
6179
|
purpose: "tertiary",
|
|
5930
6180
|
icon: ExpandIcon,
|
|
5931
6181
|
onClick: () => setIsCollapsedOnBreakpoint(false),
|
|
@@ -5961,7 +6211,7 @@ function CookieBanner({ headerText, description, buttons, checkboxes, id, classN
|
|
|
5961
6211
|
});
|
|
5962
6212
|
}
|
|
5963
6213
|
CookieBanner.displayName = "CookieBanner";
|
|
5964
|
-
const texts$
|
|
6214
|
+
const texts$26 = createTexts({ expandConsent: {
|
|
5965
6215
|
nb: "Utvid samtykke for bruk av informasjonskapsler",
|
|
5966
6216
|
no: "Utvid samtykke for bruk av informasjonskapsler",
|
|
5967
6217
|
nn: "Utvid samtykke for bruk av informasjonskapslar",
|
|
@@ -6194,32 +6444,32 @@ function CalendarGrid({ state, ...props }) {
|
|
|
6194
6444
|
const weeksInMonth = (0, _internationalized_date.getWeeksInMonth)(state.visibleRange.start, locale);
|
|
6195
6445
|
const weekDays = [
|
|
6196
6446
|
{
|
|
6197
|
-
short: t(texts$
|
|
6198
|
-
full: t(texts$
|
|
6447
|
+
short: t(texts$25.mo),
|
|
6448
|
+
full: t(texts$25.monday)
|
|
6199
6449
|
},
|
|
6200
6450
|
{
|
|
6201
|
-
short: t(texts$
|
|
6202
|
-
full: t(texts$
|
|
6451
|
+
short: t(texts$25.tu),
|
|
6452
|
+
full: t(texts$25.tuesday)
|
|
6203
6453
|
},
|
|
6204
6454
|
{
|
|
6205
|
-
short: t(texts$
|
|
6206
|
-
full: t(texts$
|
|
6455
|
+
short: t(texts$25.we),
|
|
6456
|
+
full: t(texts$25.wednesday)
|
|
6207
6457
|
},
|
|
6208
6458
|
{
|
|
6209
|
-
short: t(texts$
|
|
6210
|
-
full: t(texts$
|
|
6459
|
+
short: t(texts$25.th),
|
|
6460
|
+
full: t(texts$25.thursday)
|
|
6211
6461
|
},
|
|
6212
6462
|
{
|
|
6213
|
-
short: t(texts$
|
|
6214
|
-
full: t(texts$
|
|
6463
|
+
short: t(texts$25.fr),
|
|
6464
|
+
full: t(texts$25.friday)
|
|
6215
6465
|
},
|
|
6216
6466
|
{
|
|
6217
|
-
short: t(texts$
|
|
6218
|
-
full: t(texts$
|
|
6467
|
+
short: t(texts$25.sa),
|
|
6468
|
+
full: t(texts$25.saturday)
|
|
6219
6469
|
},
|
|
6220
6470
|
{
|
|
6221
|
-
short: t(texts$
|
|
6222
|
-
full: t(texts$
|
|
6471
|
+
short: t(texts$25.su),
|
|
6472
|
+
full: t(texts$25.sunday)
|
|
6223
6473
|
}
|
|
6224
6474
|
];
|
|
6225
6475
|
const { showWeekNumbers, onClose } = (0, react.useContext)(CalendarPopoverContext);
|
|
@@ -6238,7 +6488,7 @@ function CalendarGrid({ state, ...props }) {
|
|
|
6238
6488
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6239
6489
|
"aria-hidden": true,
|
|
6240
6490
|
children: "#"
|
|
6241
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$
|
|
6491
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$25.weekNumber) })]
|
|
6242
6492
|
}), weekDays.map((day, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(CalendarCell, {
|
|
6243
6493
|
as: "th",
|
|
6244
6494
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -6262,7 +6512,7 @@ function CalendarGrid({ state, ...props }) {
|
|
|
6262
6512
|
});
|
|
6263
6513
|
}
|
|
6264
6514
|
CalendarGrid.displayName = "CalendarGrid";
|
|
6265
|
-
const texts$
|
|
6515
|
+
const texts$25 = createTexts({
|
|
6266
6516
|
weekNumber: {
|
|
6267
6517
|
nb: "Ukenummer",
|
|
6268
6518
|
no: "Ukenummer",
|
|
@@ -6397,7 +6647,7 @@ function Calendar(props) {
|
|
|
6397
6647
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VStack, {
|
|
6398
6648
|
...calendarProps,
|
|
6399
6649
|
gap: "x0.25",
|
|
6400
|
-
height: "
|
|
6650
|
+
height: "calc(var(--dds-size-10) * 8 + var(--dds-spacing-x0-5))",
|
|
6401
6651
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
6402
6652
|
justifyContent: "space-between",
|
|
6403
6653
|
alignItems: "center",
|
|
@@ -6405,7 +6655,7 @@ function Calendar(props) {
|
|
|
6405
6655
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
6406
6656
|
"aria-hidden": optAttr(isPrevDisabled),
|
|
6407
6657
|
type: "button",
|
|
6408
|
-
"aria-label": t(texts$
|
|
6658
|
+
"aria-label": t(texts$24.previousMonth),
|
|
6409
6659
|
onClick: (e) => onPrev?.(e),
|
|
6410
6660
|
size: "small",
|
|
6411
6661
|
purpose: "tertiary",
|
|
@@ -6422,7 +6672,7 @@ function Calendar(props) {
|
|
|
6422
6672
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
6423
6673
|
type: "button",
|
|
6424
6674
|
"aria-hidden": optAttr(isNextDisabled),
|
|
6425
|
-
"aria-label": t(texts$
|
|
6675
|
+
"aria-label": t(texts$24.nextMonth),
|
|
6426
6676
|
onClick: (e) => onNext?.(e),
|
|
6427
6677
|
size: "small",
|
|
6428
6678
|
purpose: "tertiary",
|
|
@@ -6434,7 +6684,7 @@ function Calendar(props) {
|
|
|
6434
6684
|
});
|
|
6435
6685
|
}
|
|
6436
6686
|
Calendar.displayName = "Calendar";
|
|
6437
|
-
const texts$
|
|
6687
|
+
const texts$24 = createTexts({
|
|
6438
6688
|
nextMonth: {
|
|
6439
6689
|
nb: "Neste måned",
|
|
6440
6690
|
no: "Neste måned",
|
|
@@ -6451,79 +6701,19 @@ const texts$23 = createTexts({
|
|
|
6451
6701
|
}
|
|
6452
6702
|
});
|
|
6453
6703
|
//#endregion
|
|
6454
|
-
//#region src/components/helpers/InlineIconButton/InlineIconButton.module.css
|
|
6455
|
-
var InlineIconButton_module_default = { "button": "dds-InlineIconButton-module__button" };
|
|
6456
|
-
//#endregion
|
|
6457
|
-
//#region src/components/helpers/InlineIconButton/InlineIconButton.tsx
|
|
6458
|
-
const InlineIconButton = ({ className, size, icon, color, ...rest }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StylelessButton, {
|
|
6459
|
-
className: cn(className, InlineIconButton_module_default.button, _key1),
|
|
6460
|
-
...rest,
|
|
6461
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
6462
|
-
icon,
|
|
6463
|
-
iconSize: size,
|
|
6464
|
-
color
|
|
6465
|
-
})
|
|
6466
|
-
});
|
|
6467
|
-
InlineIconButton.displayName = "InlineIconButton";
|
|
6468
|
-
//#endregion
|
|
6469
|
-
//#region src/components/helpers/Input/Input.module.css
|
|
6470
|
-
var Input_module_default = {
|
|
6471
|
-
"container": "dds-Input-module__container",
|
|
6472
|
-
"input-group": "dds-Input-module__input-group",
|
|
6473
|
-
"input": "dds-Input-module__input",
|
|
6474
|
-
"disabled": "dds-Input-module__disabled",
|
|
6475
|
-
"read-only": "dds-Input-module__read-only",
|
|
6476
|
-
"input--stateful": "dds-Input-module__input--stateful",
|
|
6477
|
-
"input--hover": "dds-Input-module__input--hover",
|
|
6478
|
-
"input--stateful-danger": "dds-Input-module__input--stateful-danger",
|
|
6479
|
-
"input--large": "dds-Input-module__input--large",
|
|
6480
|
-
"input--medium": "dds-Input-module__input--medium",
|
|
6481
|
-
"input--small": "dds-Input-module__input--small",
|
|
6482
|
-
"input--xsmall": "dds-Input-module__input--xsmall",
|
|
6483
|
-
"input-with-icon--large": "dds-Input-module__input-with-icon--large",
|
|
6484
|
-
"input-with-icon--medium": "dds-Input-module__input-with-icon--medium",
|
|
6485
|
-
"input-with-icon--small": "dds-Input-module__input-with-icon--small",
|
|
6486
|
-
"input-with-icon--xsmall": "dds-Input-module__input-with-icon--xsmall",
|
|
6487
|
-
"input-with-el-right--large": "dds-Input-module__input-with-el-right--large",
|
|
6488
|
-
"input-with-el-right--medium": "dds-Input-module__input-with-el-right--medium",
|
|
6489
|
-
"input-with-el-right--small": "dds-Input-module__input-with-el-right--small",
|
|
6490
|
-
"input-with-el-right--xsmall": "dds-Input-module__input-with-el-right--xsmall",
|
|
6491
|
-
"input-with-btn-right--large": "dds-Input-module__input-with-btn-right--large",
|
|
6492
|
-
"input-with-btn-right--medium": "dds-Input-module__input-with-btn-right--medium",
|
|
6493
|
-
"input-with-btn-right--small": "dds-Input-module__input-with-btn-right--small",
|
|
6494
|
-
"input-with-btn-right--xsmall": "dds-Input-module__input-with-btn-right--xsmall",
|
|
6495
|
-
"input-with-icon-and-button-right--large": "dds-Input-module__input-with-icon-and-button-right--large",
|
|
6496
|
-
"input-with-icon-and-button-right--medium": "dds-Input-module__input-with-icon-and-button-right--medium",
|
|
6497
|
-
"input-with-icon-and-button-right--small": "dds-Input-module__input-with-icon-and-button-right--small",
|
|
6498
|
-
"input-with-icon-and-button-right--xsmall": "dds-Input-module__input-with-icon-and-button-right--xsmall",
|
|
6499
|
-
"input-group__absolute-el-right--large": "dds-Input-module__input-group__absolute-el-right--large",
|
|
6500
|
-
"input-group__absolute-el-right--medium": "dds-Input-module__input-group__absolute-el-right--medium",
|
|
6501
|
-
"input-group__absolute-el-right--small": "dds-Input-module__input-group__absolute-el-right--small",
|
|
6502
|
-
"input-group__absolute-el-right--xsmall": "dds-Input-module__input-group__absolute-el-right--xsmall",
|
|
6503
|
-
"input-group__btn-right": "dds-Input-module__input-group__btn-right",
|
|
6504
|
-
"input-group__btn-right-with-right-icon--xsmall": "dds-Input-module__input-group__btn-right-with-right-icon--xsmall",
|
|
6505
|
-
"input-group__btn-right-with-right-icon--small": "dds-Input-module__input-group__btn-right-with-right-icon--small",
|
|
6506
|
-
"input-group__btn-right-with-right-icon--medium": "dds-Input-module__input-group__btn-right-with-right-icon--medium",
|
|
6507
|
-
"input-group__btn-right-with-right-icon--large": "dds-Input-module__input-group__btn-right-with-right-icon--large",
|
|
6508
|
-
"input--with-affix": "dds-Input-module__input--with-affix",
|
|
6509
|
-
"input-group__absolute-el": "dds-Input-module__input-group__absolute-el",
|
|
6510
|
-
"input-group__absolute-el--large": "dds-Input-module__input-group__absolute-el--large",
|
|
6511
|
-
"input-group__absolute-el--medium": "dds-Input-module__input-group__absolute-el--medium",
|
|
6512
|
-
"input-group__absolute-el--small": "dds-Input-module__input-group__absolute-el--small",
|
|
6513
|
-
"input-group__absolute-el--xsmall": "dds-Input-module__input-group__absolute-el--xsmall"
|
|
6514
|
-
};
|
|
6515
|
-
//#endregion
|
|
6516
6704
|
//#region src/components/date-inputs/DatePicker/DateField/CalendarButton.tsx
|
|
6517
6705
|
function CalendarButton({ componentSize = "medium", isReadOnly, ...props }) {
|
|
6518
6706
|
const ref = (0, react.useRef)(null);
|
|
6519
6707
|
const { buttonProps } = (0, _react_aria_button.useButton)(props, ref);
|
|
6520
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6708
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
6521
6709
|
...buttonProps,
|
|
6522
6710
|
ref,
|
|
6523
6711
|
type: "button",
|
|
6524
|
-
className: cn(buttonProps.className, DateInput_module_default["popover-button"], isReadOnly && DateInput_module_default["popover-button--readonly"], !props.isDisabled && "dds-focus-module__focusable", Input_module_default["input-group__absolute-el"],
|
|
6712
|
+
className: cn(buttonProps.className, DateInput_module_default["popover-button"], isReadOnly && DateInput_module_default["popover-button--readonly"], !props.isDisabled && "dds-focus-module__focusable", Input_module_default["input-group__absolute-el"], Button_module_default.clear),
|
|
6525
6713
|
icon: CalendarIcon,
|
|
6526
|
-
size:
|
|
6714
|
+
size: componentSize,
|
|
6715
|
+
purpose: "tertiary",
|
|
6716
|
+
disabled: props.isDisabled
|
|
6527
6717
|
});
|
|
6528
6718
|
}
|
|
6529
6719
|
//#endregion
|
|
@@ -6538,16 +6728,16 @@ function formatDateFieldSegments(segments) {
|
|
|
6538
6728
|
const formattedDaySegment = {
|
|
6539
6729
|
...daySegment,
|
|
6540
6730
|
text: daySegment.text.padStart(2, "0"),
|
|
6541
|
-
placeholder: t(texts$
|
|
6731
|
+
placeholder: t(texts$23.dayPlaceholder)
|
|
6542
6732
|
};
|
|
6543
6733
|
const formattedMonthSegment = {
|
|
6544
6734
|
...monthSegment,
|
|
6545
6735
|
text: monthSegment.text.padStart(2, "0"),
|
|
6546
|
-
placeholder: t(texts$
|
|
6736
|
+
placeholder: t(texts$23.monthPlaceholder)
|
|
6547
6737
|
};
|
|
6548
6738
|
const formattedYearSegment = {
|
|
6549
6739
|
...yearSegment,
|
|
6550
|
-
placeholder: t(texts$
|
|
6740
|
+
placeholder: t(texts$23.yearPlaceholder)
|
|
6551
6741
|
};
|
|
6552
6742
|
const formattedSeparatorSegment = {
|
|
6553
6743
|
...separatorSegment,
|
|
@@ -6561,7 +6751,7 @@ function formatDateFieldSegments(segments) {
|
|
|
6561
6751
|
formattedYearSegment
|
|
6562
6752
|
];
|
|
6563
6753
|
}
|
|
6564
|
-
const texts$
|
|
6754
|
+
const texts$23 = createTexts({
|
|
6565
6755
|
dayPlaceholder: {
|
|
6566
6756
|
nb: "dd",
|
|
6567
6757
|
no: "dd",
|
|
@@ -6741,7 +6931,7 @@ function DateField({ componentSize = "medium", buttonProps, groupProps, ref, cle
|
|
|
6741
6931
|
}),
|
|
6742
6932
|
suffix: showClearButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ClearButton, {
|
|
6743
6933
|
absolute: true,
|
|
6744
|
-
"aria-label": t(texts$
|
|
6934
|
+
"aria-label": t(texts$22.clearDate),
|
|
6745
6935
|
"aria-hidden": !hasValue,
|
|
6746
6936
|
className: cn(!hasValue && utilStyles_module_default.invisible),
|
|
6747
6937
|
size: componentSize,
|
|
@@ -6760,7 +6950,7 @@ function DateField({ componentSize = "medium", buttonProps, groupProps, ref, cle
|
|
|
6760
6950
|
});
|
|
6761
6951
|
}
|
|
6762
6952
|
DateField.displayName = "DateField";
|
|
6763
|
-
const texts$
|
|
6953
|
+
const texts$22 = createTexts({ clearDate: {
|
|
6764
6954
|
en: "Clear date",
|
|
6765
6955
|
nb: "Tøm dato",
|
|
6766
6956
|
no: "Tøm dato",
|
|
@@ -7044,7 +7234,8 @@ var Table_module_default = {
|
|
|
7044
7234
|
"cell--right": "dds-Table-module__cell--right",
|
|
7045
7235
|
"cell--center": "dds-Table-module__cell--center",
|
|
7046
7236
|
"cell__inner": "dds-Table-module__cell__inner",
|
|
7047
|
-
"sort-button": "dds-Table-module__sort-button"
|
|
7237
|
+
"sort-button": "dds-Table-module__sort-button",
|
|
7238
|
+
"filter-cell": "dds-Table-module__filter-cell"
|
|
7048
7239
|
};
|
|
7049
7240
|
//#endregion
|
|
7050
7241
|
//#region src/components/DetailList/DetailList.tsx
|
|
@@ -7316,7 +7507,7 @@ const ErrorSummary = ({ heading: pHeading, className, style, children, id, htmlP
|
|
|
7316
7507
|
}) : pHeading ? pHeading : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Heading, {
|
|
7317
7508
|
level: 2,
|
|
7318
7509
|
typographyType: "heading-small",
|
|
7319
|
-
children: t(texts$
|
|
7510
|
+
children: t(texts$21.toProceedCorrectErrors)
|
|
7320
7511
|
});
|
|
7321
7512
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Paper, {
|
|
7322
7513
|
...getBaseHTMLProps(id, cn(className, ErrorSummary_module_default.container), style, htmlProps, props),
|
|
@@ -7326,7 +7517,7 @@ const ErrorSummary = ({ heading: pHeading, className, style, children, id, htmlP
|
|
|
7326
7517
|
});
|
|
7327
7518
|
};
|
|
7328
7519
|
ErrorSummary.displayName = "ErrorSummary";
|
|
7329
|
-
const texts$
|
|
7520
|
+
const texts$21 = createTexts({ toProceedCorrectErrors: {
|
|
7330
7521
|
nb: "For å gå videre må du rette opp følgende feil:",
|
|
7331
7522
|
no: "For å gå videre må du rette opp følgende feil:",
|
|
7332
7523
|
nn: "For å gå vidare må du rette opp følgjande feil:",
|
|
@@ -7360,6 +7551,7 @@ const FavStar = ({ id, className, style, onChange, checked: checkedProp, default
|
|
|
7360
7551
|
defaultValue: defaultChecked ?? false,
|
|
7361
7552
|
onChange
|
|
7362
7553
|
});
|
|
7554
|
+
const iconSize = size === "large" ? "8" : "6";
|
|
7363
7555
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
7364
7556
|
className: cn(className, FavStar_module_default.container, FavStar_module_default[`container--${size}`], focus_module_default["has-focusable-input"]),
|
|
7365
7557
|
style,
|
|
@@ -7371,15 +7563,15 @@ const FavStar = ({ id, className, style, onChange, checked: checkedProp, default
|
|
|
7371
7563
|
checked,
|
|
7372
7564
|
onChange: (e) => setChecked(e.target.checked),
|
|
7373
7565
|
type: "checkbox",
|
|
7374
|
-
"aria-label": props["aria-label"] ?? t(texts$
|
|
7566
|
+
"aria-label": props["aria-label"] ?? t(texts$20.favourite)
|
|
7375
7567
|
}),
|
|
7376
7568
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
7377
|
-
iconSize
|
|
7569
|
+
iconSize,
|
|
7378
7570
|
icon: StarIcon,
|
|
7379
7571
|
className: FavStar_module_default.icon
|
|
7380
7572
|
}),
|
|
7381
7573
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
7382
|
-
iconSize
|
|
7574
|
+
iconSize,
|
|
7383
7575
|
icon: StarFilledIcon,
|
|
7384
7576
|
className: cn(FavStar_module_default.icon, !checked && FavStar_module_default["icon--invisible"])
|
|
7385
7577
|
})
|
|
@@ -7387,7 +7579,7 @@ const FavStar = ({ id, className, style, onChange, checked: checkedProp, default
|
|
|
7387
7579
|
});
|
|
7388
7580
|
};
|
|
7389
7581
|
FavStar.displayName = "FavStar";
|
|
7390
|
-
const texts$
|
|
7582
|
+
const texts$20 = createTexts({ favourite: {
|
|
7391
7583
|
nb: "Stjernemarker",
|
|
7392
7584
|
no: "Stjernemarker",
|
|
7393
7585
|
nn: "Stjernemerk",
|
|
@@ -7401,9 +7593,7 @@ var Feedback_module_default = {
|
|
|
7401
7593
|
"rating-container--horizontal": "dds-Feedback-module__rating-container--horizontal",
|
|
7402
7594
|
"rating-container--vertical": "dds-Feedback-module__rating-container--vertical",
|
|
7403
7595
|
"rating-submitted-title": "dds-Feedback-module__rating-submitted-title",
|
|
7404
|
-
"button": "dds-Feedback-module__button"
|
|
7405
|
-
"button--horizontal": "dds-Feedback-module__button--horizontal",
|
|
7406
|
-
"button--vertical": "dds-Feedback-module__button--vertical"
|
|
7596
|
+
"button": "dds-Feedback-module__button"
|
|
7407
7597
|
};
|
|
7408
7598
|
//#endregion
|
|
7409
7599
|
//#region src/components/TextArea/TextArea.module.css
|
|
@@ -7431,7 +7621,7 @@ function CharCounter(props) {
|
|
|
7431
7621
|
"/",
|
|
7432
7622
|
max
|
|
7433
7623
|
]
|
|
7434
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$
|
|
7624
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$19.charsWritten(current, max, max - current)) })]
|
|
7435
7625
|
});
|
|
7436
7626
|
}
|
|
7437
7627
|
const renderCharCounter = (id, isShown, textLength, maxLength) => {
|
|
@@ -7441,7 +7631,7 @@ const renderCharCounter = (id, isShown, textLength, maxLength) => {
|
|
|
7441
7631
|
current: textLength
|
|
7442
7632
|
});
|
|
7443
7633
|
};
|
|
7444
|
-
const texts$
|
|
7634
|
+
const texts$19 = createTexts({ charsWritten: (current, max, remain) => ({
|
|
7445
7635
|
nb: `${current} av ${max} tegn skrevet. ${remain} igjen.`,
|
|
7446
7636
|
no: `${current} av ${max} tegn skrevet. ${remain} igjen.`,
|
|
7447
7637
|
nn: `${current} av ${max} teikn skrivne. ${remain} att.`,
|
|
@@ -7543,12 +7733,12 @@ const CommentComponent = ({ rating, feedbackText, positiveFeedbackLabel, negativ
|
|
|
7543
7733
|
size: "small",
|
|
7544
7734
|
onClick: handleSubmit,
|
|
7545
7735
|
loading,
|
|
7546
|
-
children: t(texts$
|
|
7736
|
+
children: t(texts$18.send)
|
|
7547
7737
|
})
|
|
7548
7738
|
]
|
|
7549
7739
|
});
|
|
7550
7740
|
};
|
|
7551
|
-
const texts$
|
|
7741
|
+
const texts$18 = createTexts({ send: {
|
|
7552
7742
|
nb: "Send inn",
|
|
7553
7743
|
no: "Send inn",
|
|
7554
7744
|
nn: "Send inn",
|
|
@@ -7660,7 +7850,7 @@ const RatingComponent = ({ layout, ratingLabel, loading, thumbUpTooltip, thumbDo
|
|
|
7660
7850
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
|
|
7661
7851
|
className: typographyStyles_module_default["label-medium"],
|
|
7662
7852
|
children: ratingLabel
|
|
7663
|
-
}), loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spinner, { tooltip: t(texts$
|
|
7853
|
+
}), loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spinner, { tooltip: t(texts$17.uploadingFeedback) }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
7664
7854
|
gap: "x0.75",
|
|
7665
7855
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tooltip, {
|
|
7666
7856
|
text: thumbUpTooltip,
|
|
@@ -7684,7 +7874,7 @@ const RatingComponent = ({ layout, ratingLabel, loading, thumbUpTooltip, thumbDo
|
|
|
7684
7874
|
})]
|
|
7685
7875
|
});
|
|
7686
7876
|
};
|
|
7687
|
-
const texts$
|
|
7877
|
+
const texts$17 = createTexts({ uploadingFeedback: {
|
|
7688
7878
|
nb: "Laster opp tilbakemelding...",
|
|
7689
7879
|
no: "Laster opp tilbakemelding...",
|
|
7690
7880
|
nn: "Lastar opp tilbakemelding...",
|
|
@@ -7698,14 +7888,14 @@ const Feedback = ({ layout = "vertical", ratingLabel, positiveFeedbackLabel, neg
|
|
|
7698
7888
|
const [rating, setRating] = (0, react.useState)(null);
|
|
7699
7889
|
const [feedbackText, setFeedbackText] = (0, react.useState)();
|
|
7700
7890
|
const [isFeedbackSubmitted, setIsFeedbackSubmitted] = (0, react.useState)(false);
|
|
7701
|
-
const tRatingLabel = ratingLabel ?? t(texts$
|
|
7702
|
-
const tPositiveFeedbackLabel = positiveFeedbackLabel ?? t(texts$
|
|
7703
|
-
const tNegativeFeedbackLabel = negativeFeedbackLabel ?? t(texts$
|
|
7704
|
-
const tRatingSubmittedTitle = ratingSubmittedTitle ?? t(texts$
|
|
7705
|
-
const tSubmittedTitle = submittedTitle ?? t(texts$
|
|
7706
|
-
const tTextAreaTip = textAreaTip ?? t(texts$
|
|
7707
|
-
const tThumbUpTooltip = thumbUpTooltip ?? t(texts$
|
|
7708
|
-
const tThumbDownTooltip = thumbDownTooltip ?? t(texts$
|
|
7891
|
+
const tRatingLabel = ratingLabel ?? t(texts$16.ratingQuestion);
|
|
7892
|
+
const tPositiveFeedbackLabel = positiveFeedbackLabel ?? t(texts$16.improvalQuestion);
|
|
7893
|
+
const tNegativeFeedbackLabel = negativeFeedbackLabel ?? t(texts$16.improvalQuestion);
|
|
7894
|
+
const tRatingSubmittedTitle = ratingSubmittedTitle ?? t(texts$16.thanks);
|
|
7895
|
+
const tSubmittedTitle = submittedTitle ?? t(texts$16.thanks);
|
|
7896
|
+
const tTextAreaTip = textAreaTip ?? t(texts$16.sensitiveInfo);
|
|
7897
|
+
const tThumbUpTooltip = thumbUpTooltip ?? t(texts$16.good);
|
|
7898
|
+
const tThumbDownTooltip = thumbDownTooltip ?? t(texts$16.bad);
|
|
7709
7899
|
(0, react.useEffect)(() => {
|
|
7710
7900
|
if (ratingProp !== void 0) setRating(ratingProp);
|
|
7711
7901
|
}, [ratingProp]);
|
|
@@ -7749,7 +7939,7 @@ const Feedback = ({ layout = "vertical", ratingLabel, positiveFeedbackLabel, neg
|
|
|
7749
7939
|
});
|
|
7750
7940
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Paragraph, { children: tSubmittedTitle });
|
|
7751
7941
|
};
|
|
7752
|
-
const texts$
|
|
7942
|
+
const texts$16 = createTexts({
|
|
7753
7943
|
ratingQuestion: {
|
|
7754
7944
|
nb: "Hva syns du om tjenesten?",
|
|
7755
7945
|
no: "Hva syns du om tjenesten?",
|
|
@@ -7910,10 +8100,10 @@ const File$1 = (props) => {
|
|
|
7910
8100
|
type: "button",
|
|
7911
8101
|
onClick: removeFile,
|
|
7912
8102
|
icon: CloseIcon,
|
|
7913
|
-
"aria-label": t(texts$
|
|
8103
|
+
"aria-label": t(texts$15.removeFile(stateFile.name)),
|
|
7914
8104
|
htmlProps: {
|
|
7915
8105
|
"aria-invalid": !isValid ? true : void 0,
|
|
7916
|
-
"aria-errormessage": !isValid ? t(texts$
|
|
8106
|
+
"aria-errormessage": !isValid ? t(texts$15.invalidFile) : void 0,
|
|
7917
8107
|
"aria-describedby": spaceSeparatedIdListGenerator(errorsList.map((e) => e.id))
|
|
7918
8108
|
}
|
|
7919
8109
|
})] })]
|
|
@@ -7924,11 +8114,11 @@ const File$1 = (props) => {
|
|
|
7924
8114
|
purpose: "secondary",
|
|
7925
8115
|
onClick: () => onRetry(fileId),
|
|
7926
8116
|
icon: RefreshIcon,
|
|
7927
|
-
children: t(texts$
|
|
8117
|
+
children: t(texts$15.tryAgain)
|
|
7928
8118
|
})]
|
|
7929
8119
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ErrorList, { errors: errorsList })] });
|
|
7930
8120
|
};
|
|
7931
|
-
const texts$
|
|
8121
|
+
const texts$15 = createTexts({
|
|
7932
8122
|
removeFile: (file) => ({
|
|
7933
8123
|
nb: `Fjern fil ${file}`,
|
|
7934
8124
|
no: `Fjern fil ${file}`,
|
|
@@ -8069,7 +8259,7 @@ const useFileUploader = (props) => {
|
|
|
8069
8259
|
isFileDialogActive: false,
|
|
8070
8260
|
isDragActive: false,
|
|
8071
8261
|
dragCounter: 0,
|
|
8072
|
-
rootErrors: calcRootErrors(t(texts$
|
|
8262
|
+
rootErrors: calcRootErrors(t(texts$14.invalidFileAmount), initialFileUploaderFiles, maxFiles, errorMessage)
|
|
8073
8263
|
});
|
|
8074
8264
|
const { files: stateFiles } = state;
|
|
8075
8265
|
(0, react.useEffect)(() => {
|
|
@@ -8080,7 +8270,7 @@ const useFileUploader = (props) => {
|
|
|
8080
8270
|
return {
|
|
8081
8271
|
name: file.name,
|
|
8082
8272
|
file,
|
|
8083
|
-
errors: accepted ? [] : [t(texts$
|
|
8273
|
+
errors: accepted ? [] : [t(texts$14.invalidFileType)]
|
|
8084
8274
|
};
|
|
8085
8275
|
}
|
|
8086
8276
|
return {
|
|
@@ -8103,7 +8293,7 @@ const useFileUploader = (props) => {
|
|
|
8103
8293
|
(0, react.useEffect)(() => {
|
|
8104
8294
|
dispatch({
|
|
8105
8295
|
type: "setRootErrors",
|
|
8106
|
-
payload: calcRootErrors(t(texts$
|
|
8296
|
+
payload: calcRootErrors(t(texts$14.invalidFileAmount), stateFiles, maxFiles, errorMessage)
|
|
8107
8297
|
});
|
|
8108
8298
|
}, [
|
|
8109
8299
|
dispatch,
|
|
@@ -8134,7 +8324,7 @@ const useFileUploader = (props) => {
|
|
|
8134
8324
|
const newFiles = (await (0, file_selector.fromEvent)(evt)).filter((f) => !existingFileNames.includes(f.name)).map((file) => ({
|
|
8135
8325
|
file,
|
|
8136
8326
|
name: file.name,
|
|
8137
|
-
errors: isFileAccepted(file, accept) ? [] : [t(texts$
|
|
8327
|
+
errors: isFileAccepted(file, accept) ? [] : [t(texts$14.invalidFileType)]
|
|
8138
8328
|
})).concat(stateFiles);
|
|
8139
8329
|
const mergedFiles = [...stateFiles.filter((f) => f.url).map((f) => ({
|
|
8140
8330
|
name: f.name,
|
|
@@ -8226,7 +8416,7 @@ const useFileUploader = (props) => {
|
|
|
8226
8416
|
removeFile
|
|
8227
8417
|
};
|
|
8228
8418
|
};
|
|
8229
|
-
const texts$
|
|
8419
|
+
const texts$14 = createTexts({
|
|
8230
8420
|
invalidFileType: {
|
|
8231
8421
|
nb: "Ugyldig filtype",
|
|
8232
8422
|
no: "Ugyldig filtype",
|
|
@@ -8247,8 +8437,8 @@ const texts$13 = createTexts({
|
|
|
8247
8437
|
const FileUploader = (props) => {
|
|
8248
8438
|
const { id, label, dropAreaLabel, btnLabel, tip, required = false, withDragAndDrop = true, initialFiles, value, accept, maxFiles, disabled, readOnly, onChange, onKeyDown, width = "var(--dds-input-default-width)", errorMessage, hideFileList, className, afterLabelContent, fileStatusMap, deriveId, onRetry, ...rest } = props;
|
|
8249
8439
|
const { t } = useTranslation();
|
|
8250
|
-
const tDropAreaLabel = dropAreaLabel ?? t(texts$
|
|
8251
|
-
const tBtnLabel = btnLabel ?? t(texts$
|
|
8440
|
+
const tDropAreaLabel = dropAreaLabel ?? t(texts$13.dragAndDropOr);
|
|
8441
|
+
const tBtnLabel = btnLabel ?? t(texts$13.selectFile);
|
|
8252
8442
|
const generatedId = (0, react.useId)();
|
|
8253
8443
|
const uniqueId = id ?? `${generatedId}-fileUploader`;
|
|
8254
8444
|
const { state: { files: stateFiles, isDragActive, rootErrors }, getRootProps, getInputProps, getButtonProps, removeFile } = useFileUploader({
|
|
@@ -8354,7 +8544,7 @@ const FileUploader = (props) => {
|
|
|
8354
8544
|
children: [
|
|
8355
8545
|
input,
|
|
8356
8546
|
tDropAreaLabel,
|
|
8357
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$
|
|
8547
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$13.uploadFileWithButton) }),
|
|
8358
8548
|
button
|
|
8359
8549
|
]
|
|
8360
8550
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box, {
|
|
@@ -8367,12 +8557,12 @@ const FileUploader = (props) => {
|
|
|
8367
8557
|
className: cn(readOnly && focus_module_default["focus-styled-sibling"], readOnly && FileUploader_module_default["readonly--file-list"]),
|
|
8368
8558
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, {
|
|
8369
8559
|
id: fileListNameId,
|
|
8370
|
-
children: t(texts$
|
|
8560
|
+
children: t(texts$13.uploadedFiles)
|
|
8371
8561
|
}), inactive && fileListElements.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Typography, {
|
|
8372
8562
|
italic: true,
|
|
8373
8563
|
as: "span",
|
|
8374
8564
|
color: disabled ? "text-subtle" : "text-medium",
|
|
8375
|
-
children: t(texts$
|
|
8565
|
+
children: t(texts$13.noFiles)
|
|
8376
8566
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StylelessList, {
|
|
8377
8567
|
"aria-labelledby": fileListNameId,
|
|
8378
8568
|
children: fileListElements
|
|
@@ -8382,7 +8572,7 @@ const FileUploader = (props) => {
|
|
|
8382
8572
|
});
|
|
8383
8573
|
};
|
|
8384
8574
|
FileUploader.displayName = "FileUploader";
|
|
8385
|
-
const texts$
|
|
8575
|
+
const texts$13 = createTexts({
|
|
8386
8576
|
dragAndDropOr: {
|
|
8387
8577
|
nb: "Dra og slipp filer her eller",
|
|
8388
8578
|
no: "Dra og slipp filer her eller",
|
|
@@ -8562,7 +8752,7 @@ function FormSummaryEmptyValue() {
|
|
|
8562
8752
|
" ",
|
|
8563
8753
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VisuallyHidden, { children: [
|
|
8564
8754
|
" ",
|
|
8565
|
-
t(texts$
|
|
8755
|
+
t(texts$12.noValue),
|
|
8566
8756
|
" "
|
|
8567
8757
|
] })
|
|
8568
8758
|
] });
|
|
@@ -8576,7 +8766,7 @@ function FormSummaryError({ ...props }) {
|
|
|
8576
8766
|
})
|
|
8577
8767
|
});
|
|
8578
8768
|
}
|
|
8579
|
-
const texts$
|
|
8769
|
+
const texts$12 = createTexts({ noValue: {
|
|
8580
8770
|
nb: "Ikke fylt ut",
|
|
8581
8771
|
no: "Ikke fylt ut",
|
|
8582
8772
|
nn: "Ikkje fylt ut",
|
|
@@ -8638,7 +8828,7 @@ const InlineButton = ({ className, color, icon, children, ...rest }) => /* @__PU
|
|
|
8638
8828
|
...rest,
|
|
8639
8829
|
children: icon ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
8640
8830
|
icon,
|
|
8641
|
-
iconSize: "
|
|
8831
|
+
iconSize: "component"
|
|
8642
8832
|
}) : children
|
|
8643
8833
|
});
|
|
8644
8834
|
//#endregion
|
|
@@ -8702,13 +8892,13 @@ const inlineEditVisuallyHidden = (id, clearable) => {
|
|
|
8702
8892
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VisuallyHidden, {
|
|
8703
8893
|
id,
|
|
8704
8894
|
children: [
|
|
8705
|
-
t(texts$
|
|
8895
|
+
t(texts$11.inlineEditInfo),
|
|
8706
8896
|
" ",
|
|
8707
|
-
!clearable && t(texts$
|
|
8897
|
+
!clearable && t(texts$11.notClearable)
|
|
8708
8898
|
]
|
|
8709
8899
|
});
|
|
8710
8900
|
};
|
|
8711
|
-
const texts$
|
|
8901
|
+
const texts$11 = createTexts({
|
|
8712
8902
|
inlineEditInfo: {
|
|
8713
8903
|
nb: "Escape, Enter eller Tab for å lagre.",
|
|
8714
8904
|
no: "Escape, Enter eller Tab for å lagre.",
|
|
@@ -8965,7 +9155,7 @@ const InternalHeader = (props) => {
|
|
|
8965
9155
|
const hasSmallScreenBreakpoint = !!smallScreenBreakpoint;
|
|
8966
9156
|
const hasNavInContextMenu = hasSmallScreenBreakpoint && hasNavigationElements;
|
|
8967
9157
|
const navigation = hasNavigationElements ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
8968
|
-
"aria-label": t(texts$
|
|
9158
|
+
"aria-label": t(texts$10.siteNavigation),
|
|
8969
9159
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShowHide, {
|
|
8970
9160
|
as: StylelessList,
|
|
8971
9161
|
hideBelow: hasSmallScreenBreakpoint ? smallScreenBreakpoint : void 0,
|
|
@@ -9018,7 +9208,7 @@ const InternalHeader = (props) => {
|
|
|
9018
9208
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(OverflowMenuGroup, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
9019
9209
|
icon: hasNavInContextMenu ? MenuIcon : MoreVerticalIcon,
|
|
9020
9210
|
purpose: "tertiary",
|
|
9021
|
-
"aria-label": t(texts$
|
|
9211
|
+
"aria-label": t(texts$10.openMenu)
|
|
9022
9212
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(OverflowMenu, {
|
|
9023
9213
|
className: InternalHeader_module_default["context-menu"],
|
|
9024
9214
|
children: [
|
|
@@ -9031,7 +9221,7 @@ const InternalHeader = (props) => {
|
|
|
9031
9221
|
}) }),
|
|
9032
9222
|
hasNavInContextMenu && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShowHide, {
|
|
9033
9223
|
as: "nav",
|
|
9034
|
-
"aria-label": t(texts$
|
|
9224
|
+
"aria-label": t(texts$10.siteNavigation),
|
|
9035
9225
|
showBelow: smallScreenBreakpoint,
|
|
9036
9226
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OverflowMenuList, { children: navItems.map((item, i) => /* @__PURE__ */ (0, react.createElement)(OverflowMenuLink, {
|
|
9037
9227
|
...item,
|
|
@@ -9058,7 +9248,7 @@ const InternalHeader = (props) => {
|
|
|
9058
9248
|
});
|
|
9059
9249
|
};
|
|
9060
9250
|
InternalHeader.displayName = "InternalHeader";
|
|
9061
|
-
const texts$
|
|
9251
|
+
const texts$10 = createTexts({
|
|
9062
9252
|
openMenu: {
|
|
9063
9253
|
nb: "Åpne meny",
|
|
9064
9254
|
no: "Åpne meny",
|
|
@@ -9381,7 +9571,7 @@ const NewsPopover = ({ id, className, style, htmlProps, header, news, defaultAct
|
|
|
9381
9571
|
}),
|
|
9382
9572
|
news.map((slide, i) => {
|
|
9383
9573
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
9384
|
-
iconSize: "
|
|
9574
|
+
iconSize: "4",
|
|
9385
9575
|
icon: CircleFilledIcon,
|
|
9386
9576
|
color: activeSlide === i ? "brand-tertiary-default" : "brand-tertiary-subtle"
|
|
9387
9577
|
}, `${slide.heading}-${i}`);
|
|
@@ -9689,7 +9879,7 @@ const DDSOption = ({ testId, ...props }) => /* @__PURE__ */ (0, react_jsx_runtim
|
|
|
9689
9879
|
},
|
|
9690
9880
|
children: [props.isSelected && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
9691
9881
|
icon: CheckIcon,
|
|
9692
|
-
iconSize: "
|
|
9882
|
+
iconSize: "component"
|
|
9693
9883
|
}), props.children]
|
|
9694
9884
|
});
|
|
9695
9885
|
const CustomOption = ({ testId, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Option, {
|
|
@@ -10018,7 +10208,7 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10018
10208
|
value: 50
|
|
10019
10209
|
},
|
|
10020
10210
|
{
|
|
10021
|
-
label: t(texts$
|
|
10211
|
+
label: t(texts$9.all),
|
|
10022
10212
|
value: itemsAmount
|
|
10023
10213
|
}
|
|
10024
10214
|
];
|
|
@@ -10093,7 +10283,7 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10093
10283
|
const navigation = withPagination ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box, {
|
|
10094
10284
|
as: "nav",
|
|
10095
10285
|
ref,
|
|
10096
|
-
"aria-label": t(texts$
|
|
10286
|
+
"aria-label": t(texts$9.pagination),
|
|
10097
10287
|
display: "flex",
|
|
10098
10288
|
alignItems: "center",
|
|
10099
10289
|
...!withSelect && !withCounter && { ...baseHTMLProps },
|
|
@@ -10130,7 +10320,7 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10130
10320
|
onClick: (event) => {
|
|
10131
10321
|
onPageChange(event, 1);
|
|
10132
10322
|
},
|
|
10133
|
-
"aria-label": t(texts$
|
|
10323
|
+
"aria-label": t(texts$9.firstPage)
|
|
10134
10324
|
})
|
|
10135
10325
|
}),
|
|
10136
10326
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
@@ -10166,7 +10356,7 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10166
10356
|
onClick: (event) => {
|
|
10167
10357
|
onPageChange(event, pagesLength);
|
|
10168
10358
|
},
|
|
10169
|
-
"aria-label": t(texts$
|
|
10359
|
+
"aria-label": t(texts$9.lastPage)
|
|
10170
10360
|
})
|
|
10171
10361
|
})
|
|
10172
10362
|
]
|
|
@@ -10198,16 +10388,16 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10198
10388
|
isClearable: false,
|
|
10199
10389
|
onChange: handleSelectChange,
|
|
10200
10390
|
componentSize: "small",
|
|
10201
|
-
"aria-label": t(texts$
|
|
10391
|
+
"aria-label": t(texts$9.itemsPerPage)
|
|
10202
10392
|
}), withCounter && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Paragraph, {
|
|
10203
10393
|
typographyType: "body-short-medium",
|
|
10204
|
-
children: t(texts$
|
|
10394
|
+
children: t(texts$9.showsAmountOfTotalItems(activePageFirstItem, activePageLastItem, itemsAmount))
|
|
10205
10395
|
})]
|
|
10206
10396
|
}), navigation]
|
|
10207
10397
|
});
|
|
10208
10398
|
};
|
|
10209
10399
|
Pagination.displayName = "Pagination";
|
|
10210
|
-
const texts$
|
|
10400
|
+
const texts$9 = createTexts({
|
|
10211
10401
|
pagination: {
|
|
10212
10402
|
nb: "Paginering",
|
|
10213
10403
|
no: "Paginering",
|
|
@@ -11517,8 +11707,8 @@ const createCountryOptions = (countries) => {
|
|
|
11517
11707
|
const countryOptions = createCountryOptions(COUNTRIES);
|
|
11518
11708
|
const PhoneInput = ({ label, readOnly, errorMessage, tip, required, width, componentSize = "medium", name, className, style, value, selectLabel, selectRef, onChange, defaultValue, "aria-required": ariaRequired, "aria-describedby": ariaDescribedby, groupLabel, afterLabelContent, ref, ...props }) => {
|
|
11519
11709
|
const { t } = useTranslation();
|
|
11520
|
-
const tGroupLabel = groupLabel ?? t(texts$
|
|
11521
|
-
const tSelectLabel = selectLabel ?? t(texts$
|
|
11710
|
+
const tGroupLabel = groupLabel ?? t(texts$8.countryCodeAndPhoneNumber);
|
|
11711
|
+
const tSelectLabel = selectLabel ?? t(texts$8.countryCode);
|
|
11522
11712
|
const generatedId = (0, react.useId)();
|
|
11523
11713
|
const uniqueId = props.id ?? generatedId;
|
|
11524
11714
|
const phoneInputId = `${uniqueId}-phone-input`;
|
|
@@ -11667,7 +11857,7 @@ const PhoneInput = ({ label, readOnly, errorMessage, tip, required, width, compo
|
|
|
11667
11857
|
};
|
|
11668
11858
|
PhoneInput.displayName = "PhoneInput";
|
|
11669
11859
|
const getCallingCode = (s) => s.substring(s.indexOf("+"), s.length) ?? "";
|
|
11670
|
-
const texts$
|
|
11860
|
+
const texts$8 = createTexts({
|
|
11671
11861
|
countryCode: {
|
|
11672
11862
|
nb: "Landskode",
|
|
11673
11863
|
no: "Landskode",
|
|
@@ -11771,6 +11961,7 @@ const Popover = ({ id, header, withCloseButton = true, onBlur, children, placeme
|
|
|
11771
11961
|
}),
|
|
11772
11962
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
11773
11963
|
marginBlock: !hasTitle && withCloseButton ? "x2 0" : "0",
|
|
11964
|
+
height: "100%",
|
|
11774
11965
|
children
|
|
11775
11966
|
}),
|
|
11776
11967
|
withCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
@@ -11908,11 +12099,11 @@ const ProgressTrackerItem = (props) => {
|
|
|
11908
12099
|
const stepNumberContent = (0, react.useMemo)(() => {
|
|
11909
12100
|
if (completed) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
11910
12101
|
icon: CheckIcon,
|
|
11911
|
-
iconSize: "
|
|
12102
|
+
iconSize: "5"
|
|
11912
12103
|
});
|
|
11913
12104
|
if (icon !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
11914
12105
|
icon,
|
|
11915
|
-
iconSize: "
|
|
12106
|
+
iconSize: "5"
|
|
11916
12107
|
});
|
|
11917
12108
|
return stepNumber;
|
|
11918
12109
|
}, [
|
|
@@ -11939,7 +12130,7 @@ const ProgressTrackerItem = (props) => {
|
|
|
11939
12130
|
color: getTextColor(),
|
|
11940
12131
|
children
|
|
11941
12132
|
})] });
|
|
11942
|
-
const ariaLabel = htmlProps?.["aria-label"] ? htmlProps?.["aria-label"] : `${children}, ${stepNumber}. ${completed ? t(texts$
|
|
12133
|
+
const ariaLabel = htmlProps?.["aria-label"] ? htmlProps?.["aria-label"] : `${children}, ${stepNumber}. ${completed ? t(texts$7.completed) : t(texts$7.uncompleted)}`;
|
|
11943
12134
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
11944
12135
|
as: "li",
|
|
11945
12136
|
display: direction === "row" ? "flex" : void 0,
|
|
@@ -11964,7 +12155,7 @@ const ProgressTrackerItem = (props) => {
|
|
|
11964
12155
|
});
|
|
11965
12156
|
};
|
|
11966
12157
|
ProgressTrackerItem.displayName = "ProgressTracker.Item";
|
|
11967
|
-
const texts$
|
|
12158
|
+
const texts$7 = createTexts({
|
|
11968
12159
|
uncompleted: {
|
|
11969
12160
|
nb: "trinn ikke ferdig",
|
|
11970
12161
|
no: "trinn ikke ferdig",
|
|
@@ -12005,7 +12196,7 @@ const ProgressTracker = (() => {
|
|
|
12005
12196
|
direction
|
|
12006
12197
|
},
|
|
12007
12198
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
12008
|
-
"aria-label": ariaLabel ?? t(texts$
|
|
12199
|
+
"aria-label": ariaLabel ?? t(texts$6.stepProgression),
|
|
12009
12200
|
...getBaseHTMLProps(id, className, style, htmlProps, rest),
|
|
12010
12201
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
12011
12202
|
as: StylelessOList,
|
|
@@ -12035,7 +12226,7 @@ function passIndexPropToProgressTrackerItem(children) {
|
|
|
12035
12226
|
index
|
|
12036
12227
|
}));
|
|
12037
12228
|
}
|
|
12038
|
-
const texts$
|
|
12229
|
+
const texts$6 = createTexts({ stepProgression: {
|
|
12039
12230
|
nb: "Trinnprogresjon",
|
|
12040
12231
|
no: "Trinnprogresjon",
|
|
12041
12232
|
nn: "Trinnprogresjon",
|
|
@@ -12157,7 +12348,7 @@ const SearchSuggestions = ({ id, searchId, className, style, htmlProps, suggesti
|
|
|
12157
12348
|
marginBlock: "x0.25 0",
|
|
12158
12349
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DropdownHeader, {
|
|
12159
12350
|
id: suggestionsHeaderId,
|
|
12160
|
-
children: t(texts$
|
|
12351
|
+
children: t(texts$5.searchSuggestions)
|
|
12161
12352
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StylelessList, {
|
|
12162
12353
|
role: "listbox",
|
|
12163
12354
|
"aria-labelledby": suggestionsHeaderId,
|
|
@@ -12167,7 +12358,7 @@ const SearchSuggestions = ({ id, searchId, className, style, htmlProps, suggesti
|
|
|
12167
12358
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchSuggestionItem, {
|
|
12168
12359
|
index,
|
|
12169
12360
|
focus: focus === index && showSuggestions,
|
|
12170
|
-
"aria-label": t(texts$
|
|
12361
|
+
"aria-label": t(texts$5.search(suggestion)),
|
|
12171
12362
|
onClick: onSuggestionClick,
|
|
12172
12363
|
"aria-setsize": suggestionsToRender.length,
|
|
12173
12364
|
"aria-posinset": index,
|
|
@@ -12179,7 +12370,7 @@ const SearchSuggestions = ({ id, searchId, className, style, htmlProps, suggesti
|
|
|
12179
12370
|
});
|
|
12180
12371
|
};
|
|
12181
12372
|
SearchSuggestions.displayName = "SearchSuggestions";
|
|
12182
|
-
const texts$
|
|
12373
|
+
const texts$5 = createTexts({
|
|
12183
12374
|
search: (suggestion) => ({
|
|
12184
12375
|
no: `${suggestion} søk`,
|
|
12185
12376
|
nb: `${suggestion} søk`,
|
|
@@ -12260,11 +12451,11 @@ const Search$1 = ({ componentSize = "medium", buttonProps, showIcon = true, name
|
|
|
12260
12451
|
showSuggestions: context.showSuggestions
|
|
12261
12452
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, {
|
|
12262
12453
|
id: suggestionsDescriptionId,
|
|
12263
|
-
children: t(texts$
|
|
12454
|
+
children: t(texts$4.useArrowKeys)
|
|
12264
12455
|
})] }),
|
|
12265
12456
|
hasValue && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ClearButton, {
|
|
12266
12457
|
size: componentSize,
|
|
12267
|
-
"aria-label": t(texts$
|
|
12458
|
+
"aria-label": t(texts$4.clearSearch),
|
|
12268
12459
|
onClick: clearInput
|
|
12269
12460
|
})
|
|
12270
12461
|
]
|
|
@@ -12283,7 +12474,7 @@ const Search$1 = ({ componentSize = "medium", buttonProps, showIcon = true, name
|
|
|
12283
12474
|
size: componentSize,
|
|
12284
12475
|
onClick,
|
|
12285
12476
|
...otherButtonProps,
|
|
12286
|
-
children: buttonLabel ?? t(texts$
|
|
12477
|
+
children: buttonLabel ?? t(texts$4.search)
|
|
12287
12478
|
})]
|
|
12288
12479
|
}) : inputGroup, renderInputMessage({
|
|
12289
12480
|
tip,
|
|
@@ -12291,7 +12482,7 @@ const Search$1 = ({ componentSize = "medium", buttonProps, showIcon = true, name
|
|
|
12291
12482
|
})] })] });
|
|
12292
12483
|
};
|
|
12293
12484
|
Search$1.displayName = "Search";
|
|
12294
|
-
const texts$
|
|
12485
|
+
const texts$4 = createTexts({
|
|
12295
12486
|
clearSearch: {
|
|
12296
12487
|
nb: "Tøm søk",
|
|
12297
12488
|
no: "Tøm søk",
|
|
@@ -12454,7 +12645,7 @@ const SplitButton = ({ size, primaryAction, secondaryActions, purpose = "primary
|
|
|
12454
12645
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
12455
12646
|
...buttonStyleProps,
|
|
12456
12647
|
icon: isOpen ? ChevronUpIcon : ChevronDownIcon,
|
|
12457
|
-
"aria-label": t(texts$
|
|
12648
|
+
"aria-label": t(texts$3.moreActions),
|
|
12458
12649
|
purpose,
|
|
12459
12650
|
className: cn(SplitButton_module_default.option, purpose === "primary" && SplitButton_module_default["option--primary"]),
|
|
12460
12651
|
type: "button"
|
|
@@ -12469,7 +12660,7 @@ const SplitButton = ({ size, primaryAction, secondaryActions, purpose = "primary
|
|
|
12469
12660
|
});
|
|
12470
12661
|
};
|
|
12471
12662
|
SplitButton.displayName = "SplitButton";
|
|
12472
|
-
const texts$
|
|
12663
|
+
const texts$3 = createTexts({ moreActions: {
|
|
12473
12664
|
nb: "Flere handlinger",
|
|
12474
12665
|
no: "Flere handlinger",
|
|
12475
12666
|
nn: "Fleire handlingar",
|
|
@@ -12527,6 +12718,60 @@ const Cell = ({ children, type: _type, layout = "left", collapseKey, className,
|
|
|
12527
12718
|
};
|
|
12528
12719
|
Cell.displayName = "Table.Cell";
|
|
12529
12720
|
//#endregion
|
|
12721
|
+
//#region src/components/Table/FilterCell.tsx
|
|
12722
|
+
const FilterCell = ({ sortOrder, children, className, badgeCount, popoverProps, popoverChildren, popoverGroupProps, ...rest }) => {
|
|
12723
|
+
const { t } = useTranslation();
|
|
12724
|
+
const SortIcon = !sortOrder ? void 0 : sortOrder === "ascending" ? ArrowDownIcon : ArrowUpIcon;
|
|
12725
|
+
const hasBadgeCount = !!badgeCount;
|
|
12726
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Cell, {
|
|
12727
|
+
type: "head",
|
|
12728
|
+
"aria-sort": sortOrder ? sortOrder : void 0,
|
|
12729
|
+
...rest,
|
|
12730
|
+
className: cn(Table_module_default["filter-cell"], className),
|
|
12731
|
+
children: [
|
|
12732
|
+
children,
|
|
12733
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(PopoverGroup, {
|
|
12734
|
+
...popoverGroupProps,
|
|
12735
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
12736
|
+
type: "button",
|
|
12737
|
+
icon: FilterListIcon,
|
|
12738
|
+
purpose: "secondary",
|
|
12739
|
+
size: "xsmall",
|
|
12740
|
+
"aria-label": `${t(texts$2.openFilterMenu)}${badgeCount ? ` ${badgeCount}` : ""}`,
|
|
12741
|
+
badgeProps: hasBadgeCount ? {
|
|
12742
|
+
children: badgeCount,
|
|
12743
|
+
purpose: "neutral"
|
|
12744
|
+
} : void 0
|
|
12745
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Popover, {
|
|
12746
|
+
...popoverProps,
|
|
12747
|
+
children: popoverChildren
|
|
12748
|
+
})]
|
|
12749
|
+
}),
|
|
12750
|
+
SortIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
12751
|
+
icon: SortIcon,
|
|
12752
|
+
iconSize: "inherit"
|
|
12753
|
+
})
|
|
12754
|
+
]
|
|
12755
|
+
});
|
|
12756
|
+
};
|
|
12757
|
+
FilterCell.displayName = "Table.FilterCell";
|
|
12758
|
+
const texts$2 = createTexts({
|
|
12759
|
+
openFilterMenu: {
|
|
12760
|
+
nb: "Åpne filtreringsmeny",
|
|
12761
|
+
no: "Åpne filtreringsmeny",
|
|
12762
|
+
nn: "Opne filtreringsmeny",
|
|
12763
|
+
en: "Open filter menu",
|
|
12764
|
+
se: "-"
|
|
12765
|
+
},
|
|
12766
|
+
filterMenu: {
|
|
12767
|
+
nb: "Filtreringsmeny",
|
|
12768
|
+
no: "Filtreringsmeny",
|
|
12769
|
+
nn: "Filtreringsmeny",
|
|
12770
|
+
en: "Filter menu",
|
|
12771
|
+
se: "-"
|
|
12772
|
+
}
|
|
12773
|
+
});
|
|
12774
|
+
//#endregion
|
|
12530
12775
|
//#region src/components/Table/Foot.tsx
|
|
12531
12776
|
const Foot = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tfoot", { ...props });
|
|
12532
12777
|
Foot.displayName = "Table.Foot";
|
|
@@ -12638,9 +12883,9 @@ const texts$1 = createTexts({
|
|
|
12638
12883
|
const SortCell = ({ isSorted, sortOrder, onClick, children, ...rest }) => {
|
|
12639
12884
|
const { t } = useTranslation();
|
|
12640
12885
|
const SortIcon = () => {
|
|
12641
|
-
if (!isSorted || !sortOrder) return
|
|
12642
|
-
if (sortOrder === "ascending") return
|
|
12643
|
-
return
|
|
12886
|
+
if (!isSorted || !sortOrder) return ArrowUpDownIcon;
|
|
12887
|
+
if (sortOrder === "ascending") return ArrowUpIcon;
|
|
12888
|
+
return ArrowDownIcon;
|
|
12644
12889
|
};
|
|
12645
12890
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Cell, {
|
|
12646
12891
|
type: "head",
|
|
@@ -12734,6 +12979,7 @@ Table.Head = Head;
|
|
|
12734
12979
|
Table.Body = Body;
|
|
12735
12980
|
Table.Cell = Cell;
|
|
12736
12981
|
Table.SortCell = SortCell;
|
|
12982
|
+
Table.FilterCell = FilterCell;
|
|
12737
12983
|
Table.Row = Row;
|
|
12738
12984
|
Table.Foot = Foot;
|
|
12739
12985
|
//#endregion
|
|
@@ -12762,7 +13008,8 @@ var Tabs_module_default = {
|
|
|
12762
13008
|
"tab--medium--column": "dds-Tabs-module__tab--medium--column",
|
|
12763
13009
|
"tab--small--column": "dds-Tabs-module__tab--small--column",
|
|
12764
13010
|
"tab--row": "dds-Tabs-module__tab--row",
|
|
12765
|
-
"tab--column": "dds-Tabs-module__tab--column"
|
|
13011
|
+
"tab--column": "dds-Tabs-module__tab--column",
|
|
13012
|
+
"tab--column__badge": "dds-Tabs-module__tab--column__badge"
|
|
12766
13013
|
};
|
|
12767
13014
|
//#endregion
|
|
12768
13015
|
//#region src/components/Tabs/TabWidthContext.tsx
|
|
@@ -12804,7 +13051,7 @@ const AddTabButton = ({ ref, children, index, className, width = "1fr", ...rest
|
|
|
12804
13051
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
12805
13052
|
...rest,
|
|
12806
13053
|
ref: combinedRef,
|
|
12807
|
-
className: cn(className, Tabs_module_default.tab, Tabs_module_default[`tab--${tabContentDirection}`], typographyStyles_module_default[`body-short-${size}`], focus_module_default["focusable--inset"]),
|
|
13054
|
+
className: cn(className, Tabs_module_default.tab, Tabs_module_default[`tab--${tabContentDirection}`], Tabs_module_default[`tab--${size}--${tabContentDirection}`], typographyStyles_module_default[`body-short-${size}`], focus_module_default["focusable--inset"]),
|
|
12808
13055
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
12809
13056
|
icon: PlusIcon,
|
|
12810
13057
|
iconSize: "inherit"
|
|
@@ -12849,7 +13096,7 @@ const Tabs = ({ id, activeTab, onChange, tabContentDirection = "row", size = "sm
|
|
|
12849
13096
|
Tabs.displayName = "Tabs";
|
|
12850
13097
|
//#endregion
|
|
12851
13098
|
//#region src/components/Tabs/Tab.tsx
|
|
12852
|
-
const Tab = ({ active = false, icon, children, focus, setFocus, index, onClick, onKeyDown, id, className, htmlProps = {}, style, width = "1fr", ref, ...rest }) => {
|
|
13099
|
+
const Tab = ({ active = false, icon, children, focus, setFocus, index, onClick, onKeyDown, id, className, htmlProps = {}, style, width = "1fr", ref, badgeProps, ...rest }) => {
|
|
12853
13100
|
useSetTabWidth(index, width);
|
|
12854
13101
|
const itemRef = (0, react.useRef)(null);
|
|
12855
13102
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
@@ -12873,6 +13120,32 @@ const Tab = ({ active = false, icon, children, focus, setFocus, index, onClick,
|
|
|
12873
13120
|
handleSelect();
|
|
12874
13121
|
onKeyDown?.(e);
|
|
12875
13122
|
};
|
|
13123
|
+
const badgeSize = {
|
|
13124
|
+
small: "xsmall",
|
|
13125
|
+
medium: "small"
|
|
13126
|
+
};
|
|
13127
|
+
const hasIcon = !!icon;
|
|
13128
|
+
const hasVerticalBadge = badgeProps && !!badgeProps?.children === false && tabContentDirection === "column" && hasIcon;
|
|
13129
|
+
const hasHorizontalBadge = badgeProps && !hasVerticalBadge;
|
|
13130
|
+
const content = hasHorizontalBadge && tabContentDirection === "row" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
13131
|
+
as: Badge,
|
|
13132
|
+
...badgeProps,
|
|
13133
|
+
size: badgeSize[size]
|
|
13134
|
+
})] }) : hasHorizontalBadge && tabContentDirection === "column" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
13135
|
+
gap: "x0.5",
|
|
13136
|
+
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
13137
|
+
as: Badge,
|
|
13138
|
+
...badgeProps,
|
|
13139
|
+
size: badgeSize[size]
|
|
13140
|
+
})]
|
|
13141
|
+
}) : hasVerticalBadge ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
13142
|
+
as: Badge,
|
|
13143
|
+
...badgeProps,
|
|
13144
|
+
size: badgeSize[size],
|
|
13145
|
+
className: cn(Tabs_module_default["tab--column__badge"], badgeProps?.className),
|
|
13146
|
+
top: "x0.125",
|
|
13147
|
+
right: "calc(50% - (var(--dds-size-icon-component) / 2 ))"
|
|
13148
|
+
})] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children });
|
|
12876
13149
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
12877
13150
|
...getBaseHTMLProps(id, cn(className, Tabs_module_default.tab, Tabs_module_default[`tab--${size}--${tabContentDirection}`], active && Tabs_module_default["tab--active"], Tabs_module_default[`tab--${tabContentDirection}`], typographyStyles_module_default[`body-short-${size}`], focus_module_default["focusable--inset"]), style, fixedHtmlProps, rest),
|
|
12878
13151
|
ref: combinedRef,
|
|
@@ -12884,7 +13157,7 @@ const Tab = ({ active = false, icon, children, focus, setFocus, index, onClick,
|
|
|
12884
13157
|
children: [icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
12885
13158
|
icon,
|
|
12886
13159
|
iconSize: "component"
|
|
12887
|
-
}),
|
|
13160
|
+
}), content]
|
|
12888
13161
|
});
|
|
12889
13162
|
};
|
|
12890
13163
|
Tab.displayName = "Tab";
|
|
@@ -12992,17 +13265,12 @@ TabPanels.displayName = "TabPanels";
|
|
|
12992
13265
|
//#region src/components/Tag/Tag.module.css
|
|
12993
13266
|
var Tag_module_default = {
|
|
12994
13267
|
"container": "dds-Tag-module__container",
|
|
12995
|
-
"container--
|
|
12996
|
-
"container--
|
|
12997
|
-
"container--
|
|
12998
|
-
"container--
|
|
12999
|
-
"container--
|
|
13000
|
-
"container--
|
|
13001
|
-
"container--danger--strong": "dds-Tag-module__container--danger--strong",
|
|
13002
|
-
"container--warning--default": "dds-Tag-module__container--warning--default",
|
|
13003
|
-
"container--warning--strong": "dds-Tag-module__container--warning--strong",
|
|
13004
|
-
"container--info--default": "dds-Tag-module__container--info--default",
|
|
13005
|
-
"container--info--strong": "dds-Tag-module__container--info--strong"
|
|
13268
|
+
"container--small": "dds-Tag-module__container--small",
|
|
13269
|
+
"container--medium": "dds-Tag-module__container--medium",
|
|
13270
|
+
"container--outline": "dds-Tag-module__container--outline",
|
|
13271
|
+
"container--subtle": "dds-Tag-module__container--subtle",
|
|
13272
|
+
"container--strong": "dds-Tag-module__container--strong",
|
|
13273
|
+
"container--accent-left": "dds-Tag-module__container--accent-left"
|
|
13006
13274
|
};
|
|
13007
13275
|
//#endregion
|
|
13008
13276
|
//#region src/components/Tag/Tag.tsx
|
|
@@ -13011,12 +13279,42 @@ const icons = {
|
|
|
13011
13279
|
danger: ErrorIcon,
|
|
13012
13280
|
warning: WarningIcon,
|
|
13013
13281
|
success: CheckCircledIcon,
|
|
13014
|
-
|
|
13015
|
-
};
|
|
13016
|
-
const Tag = ({ purpose
|
|
13017
|
-
const
|
|
13282
|
+
neutral: void 0
|
|
13283
|
+
};
|
|
13284
|
+
const Tag = ({ purpose, appearance = "outline", id, className, style, children, htmlProps, withIcon, size = "medium", color, ...rest }) => {
|
|
13285
|
+
const hasColor = color !== void 0;
|
|
13286
|
+
const resolvedPurpose = !hasColor ? purpose ?? "neutral" : void 0;
|
|
13287
|
+
const hasResolvedPurpose = resolvedPurpose !== void 0;
|
|
13288
|
+
const isDefaultPurpose = resolvedPurpose === "neutral";
|
|
13289
|
+
const icon = hasResolvedPurpose ? icons[resolvedPurpose] : void 0;
|
|
13290
|
+
const purposeStyleVariables = {
|
|
13291
|
+
["--dds-color-tag-background-default"]: `var(--dds-color-surface-${purpose}-default)`,
|
|
13292
|
+
["--dds-color-tag-background-strong"]: `var(--dds-color-surface-${purpose}-strong)`,
|
|
13293
|
+
["--dds-color-tag-border-outline"]: `var(--dds-color-border-${purpose})`,
|
|
13294
|
+
["--dds-color-tag-text"]: "var(--dds-color-text-on-status-default)",
|
|
13295
|
+
["--dds-color-tag-icon"]: `var(--dds-color-icon-on-${purpose}-default)`
|
|
13296
|
+
};
|
|
13297
|
+
const defaultPurposeStyleVariables = {
|
|
13298
|
+
["--dds-color-tag-background-default"]: "var(--dds-color-surface-subtle)",
|
|
13299
|
+
["--dds-color-tag-background-strong"]: "var(--dds-color-surface-strong)",
|
|
13300
|
+
["--dds-color-tag-border-outline"]: "var(--dds-color-border-subtle)",
|
|
13301
|
+
["--dds-color-tag-text"]: "var(--dds-color-text-default)"
|
|
13302
|
+
};
|
|
13303
|
+
const colorStyleVariables = {
|
|
13304
|
+
["--dds-color-tag-background-default"]: `var(--dds-color-domain-${color}-subtle)`,
|
|
13305
|
+
["--dds-color-tag-background-strong"]: `var(--dds-color-domain-${color}-strong)`,
|
|
13306
|
+
["--dds-color-tag-border-outline"]: `var(--dds-color-domain-${color}-border)`,
|
|
13307
|
+
["--dds-color-tag-text"]: `var(--dds-color-domain-text-on-domain)`
|
|
13308
|
+
};
|
|
13309
|
+
let styleVariables = {};
|
|
13310
|
+
if (isDefaultPurpose) styleVariables = defaultPurposeStyleVariables;
|
|
13311
|
+
else if (hasResolvedPurpose) styleVariables = purposeStyleVariables;
|
|
13312
|
+
else if (hasColor) styleVariables = colorStyleVariables;
|
|
13018
13313
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(TextOverflowEllipsisWrapper, {
|
|
13019
|
-
...getBaseHTMLProps(id, cn(className, typographyStyles_module_default[
|
|
13314
|
+
...getBaseHTMLProps(id, cn(className, typographyStyles_module_default[`body-short-${size}`], Tag_module_default.container, Input_module_default[`compact--${size}`], withIcon && Input_module_default[`compact-with-icon--${size}`], Tag_module_default[`container--${appearance}`], Tag_module_default[`container--${size}`]), {
|
|
13315
|
+
...style,
|
|
13316
|
+
...styleVariables
|
|
13317
|
+
}, htmlProps, rest),
|
|
13020
13318
|
children: [withIcon && icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
13021
13319
|
icon,
|
|
13022
13320
|
iconSize: "component"
|
|
@@ -13027,7 +13325,6 @@ Tag.displayName = "Tag";
|
|
|
13027
13325
|
//#endregion
|
|
13028
13326
|
//#region src/components/TextInput/TextInput.module.css
|
|
13029
13327
|
var TextInput_module_default = {
|
|
13030
|
-
"container": "dds-TextInput-module__container",
|
|
13031
13328
|
"container--readonly": "dds-TextInput-module__container--readonly",
|
|
13032
13329
|
"container--disabled": "dds-TextInput-module__container--disabled",
|
|
13033
13330
|
"input--extended": "dds-TextInput-module__input--extended",
|
|
@@ -13099,7 +13396,7 @@ const TextInput = ({ label, afterLabelContent, disabled, readOnly, errorMessage,
|
|
|
13099
13396
|
disabled && TextInput_module_default["affix--disabled"]
|
|
13100
13397
|
];
|
|
13101
13398
|
if (hasIcon) extendedInput = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box, {
|
|
13102
|
-
className: cn(Input_module_default["input-group"]
|
|
13399
|
+
className: cn(Input_module_default["input-group"]),
|
|
13103
13400
|
width: inputWidth,
|
|
13104
13401
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
13105
13402
|
icon,
|
|
@@ -13139,7 +13436,7 @@ const TextInput = ({ label, afterLabelContent, disabled, readOnly, errorMessage,
|
|
|
13139
13436
|
]
|
|
13140
13437
|
});
|
|
13141
13438
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
13142
|
-
className: cn(className, Input_module_default.container,
|
|
13439
|
+
className: cn(className, Input_module_default.container, readOnly && TextInput_module_default["container--readonly"], disabled && TextInput_module_default["container--disabled"], typographyStyles_module_default[`body-short-${componentSize}`]),
|
|
13143
13440
|
style,
|
|
13144
13441
|
children: [
|
|
13145
13442
|
renderLabel({
|
|
@@ -13269,7 +13566,7 @@ const ToggleRadio = ({ value, name, onChange, checked, "aria-label": ariaLabel,
|
|
|
13269
13566
|
as: "span",
|
|
13270
13567
|
justifyContent: "center",
|
|
13271
13568
|
alignItems: "center",
|
|
13272
|
-
className: cn(typographyStyles_module_default[`body-short-${group.size}`], ToggleBar_module_default.content, Button_module_default[contentTypeCn], hasLabel && hasIcon && Button_module_default["with-icon-left"], Button_module_default[`button--${group.size}`], focus_module_default["focus-styled-sibling"]),
|
|
13569
|
+
className: cn(typographyStyles_module_default[`body-short-${group.size}`], ToggleBar_module_default.content, Button_module_default[contentTypeCn], Button_module_default[`button--${group.size}`], hasLabel && hasIcon && Button_module_default["with-icon-left"], Button_module_default[`button--${group.size}`], focus_module_default["focus-styled-sibling"]),
|
|
13273
13570
|
children: [icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
13274
13571
|
icon,
|
|
13275
13572
|
iconSize: "component"
|
|
@@ -13279,62 +13576,6 @@ const ToggleRadio = ({ value, name, onChange, checked, "aria-label": ariaLabel,
|
|
|
13279
13576
|
};
|
|
13280
13577
|
ToggleRadio.displayName = "ToggleRadio";
|
|
13281
13578
|
//#endregion
|
|
13282
|
-
//#region src/components/ToggleButton/ToggleButton.module.css
|
|
13283
|
-
var ToggleButton_module_default = { "content": "dds-ToggleButton-module__content" };
|
|
13284
|
-
//#endregion
|
|
13285
|
-
//#region src/components/ToggleButton/ToggleButton.tsx
|
|
13286
|
-
const ToggleButton = ({ id, label, icon, size = "small", className, style, htmlProps, ...rest }) => {
|
|
13287
|
-
const generatedId = (0, react.useId)();
|
|
13288
|
-
const uniqueId = id ?? `${generatedId}-toggleButton`;
|
|
13289
|
-
const hasIcon = !!icon;
|
|
13290
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box, {
|
|
13291
|
-
as: "label",
|
|
13292
|
-
htmlFor: uniqueId,
|
|
13293
|
-
width: "fit-content",
|
|
13294
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(HiddenInput, {
|
|
13295
|
-
...getBaseHTMLProps(uniqueId, cn(className, focus_module_default["focusable-sibling"]), style, htmlProps, rest),
|
|
13296
|
-
type: "checkbox"
|
|
13297
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Paper, {
|
|
13298
|
-
as: "span",
|
|
13299
|
-
border: "border-default",
|
|
13300
|
-
background: "surface-default",
|
|
13301
|
-
borderRadius: "rounded",
|
|
13302
|
-
width: "fit-content",
|
|
13303
|
-
display: "inline-flex",
|
|
13304
|
-
alignItems: "center",
|
|
13305
|
-
className: cn(ToggleButton_module_default.content, typographyStyles_module_default[`body-short-${size}`], focus_module_default["focus-styled-sibling"], Button_module_default[`button--${size}`], Button_module_default["just-text"], ...hasIcon ? [Button_module_default["with-text-and-icon"], Button_module_default["with-icon-left"]] : []),
|
|
13306
|
-
children: [hasIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
13307
|
-
icon,
|
|
13308
|
-
iconSize: "component"
|
|
13309
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label })]
|
|
13310
|
-
})]
|
|
13311
|
-
});
|
|
13312
|
-
};
|
|
13313
|
-
ToggleButton.displayName = "ToggleButton";
|
|
13314
|
-
//#endregion
|
|
13315
|
-
//#region src/components/ToggleButton/ToggleButtonGroup.tsx
|
|
13316
|
-
const ToggleButtonGroup = (props) => {
|
|
13317
|
-
const { children, direction = "row", label, labelId, id, className, style, htmlProps, ...rest } = props;
|
|
13318
|
-
const generatedId = (0, react.useId)();
|
|
13319
|
-
const uniqueLabelId = labelId ?? `${generatedId}-ToggleButtonGroupLabel`;
|
|
13320
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
13321
|
-
...getBaseHTMLProps(id, className, style, htmlProps, rest),
|
|
13322
|
-
role: "group",
|
|
13323
|
-
"aria-labelledby": label ? uniqueLabelId : void 0,
|
|
13324
|
-
children: [renderGroupLabel({
|
|
13325
|
-
label,
|
|
13326
|
-
id: uniqueLabelId
|
|
13327
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
13328
|
-
display: "flex",
|
|
13329
|
-
flexWrap: "wrap",
|
|
13330
|
-
gap: "x0.75",
|
|
13331
|
-
flexDirection: direction,
|
|
13332
|
-
children
|
|
13333
|
-
})]
|
|
13334
|
-
});
|
|
13335
|
-
};
|
|
13336
|
-
ToggleButtonGroup.displayName = "ToggleButtonGroup";
|
|
13337
|
-
//#endregion
|
|
13338
13579
|
exports.Accordion = Accordion;
|
|
13339
13580
|
exports.AccordionBody = AccordionBody;
|
|
13340
13581
|
exports.AccordionContextProvider = AccordionContextProvider;
|
|
@@ -13346,8 +13587,10 @@ exports.AnimatedChevronUpDownIcon = AnimatedChevronUpDownIcon;
|
|
|
13346
13587
|
exports.AppsIcon = AppsIcon;
|
|
13347
13588
|
exports.ArchiveIcon = ArchiveIcon;
|
|
13348
13589
|
exports.ArrowDownIcon = ArrowDownIcon;
|
|
13590
|
+
exports.ArrowDownUpIcon = ArrowDownUpIcon;
|
|
13349
13591
|
exports.ArrowLeftIcon = ArrowLeftIcon;
|
|
13350
13592
|
exports.ArrowRightIcon = ArrowRightIcon;
|
|
13593
|
+
exports.ArrowUpDownIcon = ArrowUpDownIcon;
|
|
13351
13594
|
exports.ArrowUpIcon = ArrowUpIcon;
|
|
13352
13595
|
exports.ArrowUpRightIcon = ArrowUpRightIcon;
|
|
13353
13596
|
exports.AttachmentIcon = AttachmentIcon;
|
|
@@ -13355,6 +13598,7 @@ exports.BORDER_COLORS = BORDER_COLORS;
|
|
|
13355
13598
|
exports.BORDER_RADII = BORDER_RADII;
|
|
13356
13599
|
exports.BackLink = BackLink;
|
|
13357
13600
|
exports.Backdrop = Backdrop;
|
|
13601
|
+
exports.Badge = Badge;
|
|
13358
13602
|
exports.BarChartBoxedIcon = BarChartBoxedIcon;
|
|
13359
13603
|
exports.BarChartIcon = BarChartIcon;
|
|
13360
13604
|
exports.Bleed = Bleed;
|
|
@@ -13396,7 +13640,11 @@ exports.ChevronLeftIcon = ChevronLeftIcon;
|
|
|
13396
13640
|
exports.ChevronRightIcon = ChevronRightIcon;
|
|
13397
13641
|
exports.ChevronUpIcon = ChevronUpIcon;
|
|
13398
13642
|
exports.Chip = Chip;
|
|
13643
|
+
exports.ChipButton = ChipButton;
|
|
13644
|
+
exports.ChipCheckbox = ChipCheckbox;
|
|
13399
13645
|
exports.ChipGroup = ChipGroup;
|
|
13646
|
+
exports.ChipRadio = ChipRadio;
|
|
13647
|
+
exports.ChipRemovable = ChipRemovable;
|
|
13400
13648
|
exports.CircleFilledIcon = CircleFilledIcon;
|
|
13401
13649
|
exports.CircleIcon = CircleIcon;
|
|
13402
13650
|
exports.CloseCircledIcon = CloseCircledIcon;
|
|
@@ -13635,6 +13883,7 @@ exports.TabPanels = TabPanels;
|
|
|
13635
13883
|
exports.Table = Table;
|
|
13636
13884
|
exports.TableBody = Body;
|
|
13637
13885
|
exports.TableCell = Cell;
|
|
13886
|
+
exports.TableFilterCell = FilterCell;
|
|
13638
13887
|
exports.TableFoot = Foot;
|
|
13639
13888
|
exports.TableHead = Head;
|
|
13640
13889
|
exports.TableRow = Row;
|
|
@@ -13656,8 +13905,6 @@ exports.TingrettIcon = TingrettIcon;
|
|
|
13656
13905
|
exports.TipIcon = TipIcon;
|
|
13657
13906
|
exports.Toggle = Toggle;
|
|
13658
13907
|
exports.ToggleBar = ToggleBar;
|
|
13659
|
-
exports.ToggleButton = ToggleButton;
|
|
13660
|
-
exports.ToggleButtonGroup = ToggleButtonGroup;
|
|
13661
13908
|
exports.ToggleRadio = ToggleRadio;
|
|
13662
13909
|
exports.Tooltip = Tooltip;
|
|
13663
13910
|
exports.TrashIcon = TrashIcon;
|