@norges-domstoler/dds-components 24.4.0 → 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 +580 -425
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +944 -645
- package/dist/index.d.cts +848 -10302
- package/dist/index.d.mts +848 -10302
- package/dist/index.mjs +574 -424
- 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"
|
|
@@ -1764,16 +1782,14 @@ Badge.displayName = "Badge";
|
|
|
1764
1782
|
//#region src/components/Icon/Icon.tsx
|
|
1765
1783
|
const getSize = (iconSize) => {
|
|
1766
1784
|
switch (iconSize) {
|
|
1767
|
-
case "small": return "var(--dds-size-icon-small)";
|
|
1768
|
-
case "medium": return "var(--dds-size-icon-medium)";
|
|
1769
|
-
case "large": return "var(--dds-size-icon-large)";
|
|
1770
1785
|
case "component": return "var(--dds-size-icon-component)";
|
|
1771
1786
|
case "inherit": return "1em";
|
|
1772
|
-
default: return
|
|
1787
|
+
default: return `var(--dds-size-${iconSize})`;
|
|
1773
1788
|
}
|
|
1774
1789
|
};
|
|
1790
|
+
[...SIZE_SCALE];
|
|
1775
1791
|
function Icon(props) {
|
|
1776
|
-
const { id, iconSize = "
|
|
1792
|
+
const { id, iconSize = "6", color = "currentcolor", icon, className, style, htmlProps, iconState, ...rest } = props;
|
|
1777
1793
|
const size = getSize(iconSize);
|
|
1778
1794
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(icon, {
|
|
1779
1795
|
...getBaseHTMLProps(id, className, style, htmlProps, rest),
|
|
@@ -1890,7 +1906,7 @@ const commonTexts = createTexts({
|
|
|
1890
1906
|
//#endregion
|
|
1891
1907
|
//#region src/components/Spinner/Spinner.tsx
|
|
1892
1908
|
function Spinner(props) {
|
|
1893
|
-
const { size = "var(--dds-size-
|
|
1909
|
+
const { size = "var(--dds-size-6)", color = "icon-action-resting", tooltip, id, className, htmlProps, style, ...rest } = props;
|
|
1894
1910
|
const { t } = useTranslation();
|
|
1895
1911
|
const uniqueId = `${(0, react.useId)()}-spinnerTitle`;
|
|
1896
1912
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
@@ -1900,7 +1916,8 @@ function Spinner(props) {
|
|
|
1900
1916
|
...getBaseHTMLProps(id, cn(className, Spinner_module_default.svg), {
|
|
1901
1917
|
...style,
|
|
1902
1918
|
width: size,
|
|
1903
|
-
height: size
|
|
1919
|
+
height: size,
|
|
1920
|
+
["--dds-color-spinner"]: getTextColor(color)
|
|
1904
1921
|
}, htmlProps, rest),
|
|
1905
1922
|
children: [
|
|
1906
1923
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("title", {
|
|
@@ -1911,7 +1928,6 @@ function Spinner(props) {
|
|
|
1911
1928
|
cx: "12",
|
|
1912
1929
|
cy: "12.25",
|
|
1913
1930
|
r: "6",
|
|
1914
|
-
fill: getTextColor(color),
|
|
1915
1931
|
className: Spinner_module_default.jordskifterett
|
|
1916
1932
|
}),
|
|
1917
1933
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
@@ -1919,12 +1935,10 @@ function Spinner(props) {
|
|
|
1919
1935
|
y: "10.25",
|
|
1920
1936
|
width: "16",
|
|
1921
1937
|
height: "4",
|
|
1922
|
-
fill: getTextColor(color),
|
|
1923
1938
|
className: Spinner_module_default.lagmannsrett
|
|
1924
1939
|
}),
|
|
1925
1940
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
1926
1941
|
d: "M12 16.6154C16.4183 16.6154 20 12.7581 20 8H4C4 12.7581 7.58172 16.6154 12 16.6154Z",
|
|
1927
|
-
fill: getTextColor(color),
|
|
1928
1942
|
className: Spinner_module_default.tingrett
|
|
1929
1943
|
})
|
|
1930
1944
|
]
|
|
@@ -1975,7 +1989,7 @@ const DropdownItem = ({ icon, className, children: propChildren, purpose = "defa
|
|
|
1975
1989
|
loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1976
1990
|
className: cn(utilStyles_module_default["center-absolute"]),
|
|
1977
1991
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spinner, {
|
|
1978
|
-
size: "var(--dds-size-icon-
|
|
1992
|
+
size: "var(--dds-size-icon-component)",
|
|
1979
1993
|
tooltip: loadingTooltip
|
|
1980
1994
|
})
|
|
1981
1995
|
}),
|
|
@@ -2155,7 +2169,7 @@ var Icon_module_default = { "svg": "dds-Icon-module__svg" };
|
|
|
2155
2169
|
//#endregion
|
|
2156
2170
|
//#region src/components/Icon/utils/SvgWrapper.tsx
|
|
2157
2171
|
const size = 24;
|
|
2158
|
-
const sizeCSS = "var(--dds-size-
|
|
2172
|
+
const sizeCSS = "var(--dds-size-6)";
|
|
2159
2173
|
function SvgWrapper({ height, width, fill = "currentColor", className, title, children, iconState: _iconState, style, ...props }) {
|
|
2160
2174
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
2161
2175
|
...props,
|
|
@@ -2231,6 +2245,20 @@ function ArrowDownIcon(props) {
|
|
|
2231
2245
|
});
|
|
2232
2246
|
}
|
|
2233
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
|
|
2234
2262
|
//#region src/components/Icon/icons/arrowLeft.tsx
|
|
2235
2263
|
/** Arrows and chevron. Search terms: pil, arrow, venstre, left, tilbake, back. */
|
|
2236
2264
|
function ArrowLeftIcon(props) {
|
|
@@ -2258,6 +2286,20 @@ function ArrowUpIcon(props) {
|
|
|
2258
2286
|
});
|
|
2259
2287
|
}
|
|
2260
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
|
|
2261
2303
|
//#region src/components/Icon/icons/arrowUpRight.tsx
|
|
2262
2304
|
/** Arrows and chevron. Search terms: pil, arrow, opp, up, høyre, right. */
|
|
2263
2305
|
function ArrowUpRightIcon(props) {
|
|
@@ -4145,8 +4187,10 @@ var icons_exports = /* @__PURE__ */ __exportAll({
|
|
|
4145
4187
|
AppsIcon: () => AppsIcon,
|
|
4146
4188
|
ArchiveIcon: () => ArchiveIcon,
|
|
4147
4189
|
ArrowDownIcon: () => ArrowDownIcon,
|
|
4190
|
+
ArrowDownUpIcon: () => ArrowDownUpIcon,
|
|
4148
4191
|
ArrowLeftIcon: () => ArrowLeftIcon,
|
|
4149
4192
|
ArrowRightIcon: () => ArrowRightIcon,
|
|
4193
|
+
ArrowUpDownIcon: () => ArrowUpDownIcon,
|
|
4150
4194
|
ArrowUpIcon: () => ArrowUpIcon,
|
|
4151
4195
|
ArrowUpRightIcon: () => ArrowUpRightIcon,
|
|
4152
4196
|
AttachmentIcon: () => AttachmentIcon,
|
|
@@ -4450,7 +4494,7 @@ const BackLink = ({ label, ref, as = "a", ...rest }) => {
|
|
|
4450
4494
|
const { t } = useTranslation();
|
|
4451
4495
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
4452
4496
|
ref,
|
|
4453
|
-
"aria-label": t(texts$
|
|
4497
|
+
"aria-label": t(texts$30.goBack),
|
|
4454
4498
|
className: typographyStyles_module_default["body-short-medium"],
|
|
4455
4499
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
4456
4500
|
as,
|
|
@@ -4466,7 +4510,7 @@ const BackLink = ({ label, ref, as = "a", ...rest }) => {
|
|
|
4466
4510
|
});
|
|
4467
4511
|
};
|
|
4468
4512
|
BackLink.displayName = "BackLink";
|
|
4469
|
-
const texts$
|
|
4513
|
+
const texts$30 = createTexts({ goBack: {
|
|
4470
4514
|
nb: "Gå tilbake",
|
|
4471
4515
|
no: "Gå tilbake",
|
|
4472
4516
|
nn: "Gå tilbake",
|
|
@@ -4675,7 +4719,7 @@ const Label = ({ showRequiredStyling, readOnly, id, className, style, htmlProps,
|
|
|
4675
4719
|
const content = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
4676
4720
|
readOnly && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
4677
4721
|
icon: LockFilledIcon,
|
|
4678
|
-
iconSize: "
|
|
4722
|
+
iconSize: "4",
|
|
4679
4723
|
className: Label_module_default["read-only__icon"]
|
|
4680
4724
|
}),
|
|
4681
4725
|
children,
|
|
@@ -4779,19 +4823,25 @@ var Button_module_default = {
|
|
|
4779
4823
|
"button--primary": "dds-Button-module__button--primary",
|
|
4780
4824
|
"button--secondary": "dds-Button-module__button--secondary",
|
|
4781
4825
|
"button--tertiary": "dds-Button-module__button--tertiary",
|
|
4782
|
-
"button--danger": "dds-Button-module__button--danger",
|
|
4783
|
-
"
|
|
4826
|
+
"button--primary-danger": "dds-Button-module__button--primary-danger",
|
|
4827
|
+
"button--secondary-danger": "dds-Button-module__button--secondary-danger"
|
|
4784
4828
|
};
|
|
4785
4829
|
//#endregion
|
|
4786
4830
|
//#region src/components/ButtonGroup/ButtonGroup.context.tsx
|
|
4787
4831
|
const ButtonGroupContext = (0, react.createContext)({});
|
|
4788
4832
|
const useButtonGroupContext = () => (0, react.useContext)(ButtonGroupContext);
|
|
4789
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
|
|
4790
4840
|
//#region src/components/Button/Button.tsx
|
|
4791
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 }) => {
|
|
4792
4842
|
const { purpose: groupPurpose, size: groupSize } = useButtonGroupContext();
|
|
4793
4843
|
const { t } = useTranslation();
|
|
4794
|
-
const spinnerTooltip = loadingTooltip ?? t(texts$
|
|
4844
|
+
const spinnerTooltip = loadingTooltip ?? t(texts$29.saving);
|
|
4795
4845
|
const hasLabel = !!children;
|
|
4796
4846
|
const hasIcon = !!icon;
|
|
4797
4847
|
const hasLabelAndIcon = hasIcon && hasLabel;
|
|
@@ -4799,7 +4849,7 @@ const Button = ({ as: propAs, children, purpose = "primary", size: propSize = "m
|
|
|
4799
4849
|
const isTextButton = hasLabel && !hasIcon;
|
|
4800
4850
|
const noContent = !hasLabel && !hasIcon;
|
|
4801
4851
|
const size = groupSize ?? propSize;
|
|
4802
|
-
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);
|
|
4803
4853
|
const iconElement = hasIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
4804
4854
|
icon,
|
|
4805
4855
|
iconSize: "component",
|
|
@@ -4821,7 +4871,7 @@ const Button = ({ as: propAs, children, purpose = "primary", size: propSize = "m
|
|
|
4821
4871
|
className: cn(!noContent && Button_module_default["spinner-wrapper--absolute"]),
|
|
4822
4872
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spinner, {
|
|
4823
4873
|
size: "var(--dds-size-icon-component)",
|
|
4824
|
-
color:
|
|
4874
|
+
color: "currentColor",
|
|
4825
4875
|
tooltip: spinnerTooltip
|
|
4826
4876
|
})
|
|
4827
4877
|
})
|
|
@@ -4843,12 +4893,12 @@ const Button = ({ as: propAs, children, purpose = "primary", size: propSize = "m
|
|
|
4843
4893
|
children: [content, badgeProps && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Badge, {
|
|
4844
4894
|
...badgeProps,
|
|
4845
4895
|
size,
|
|
4846
|
-
className: cn(
|
|
4896
|
+
className: cn(common_module_default["badge--on-corner"], badgeProps.className)
|
|
4847
4897
|
})]
|
|
4848
4898
|
});
|
|
4849
4899
|
};
|
|
4850
4900
|
Button.displayName = "Button";
|
|
4851
|
-
const texts$
|
|
4901
|
+
const texts$29 = createTexts({ saving: {
|
|
4852
4902
|
no: "Lagring pågår",
|
|
4853
4903
|
nb: "Lagring pågår",
|
|
4854
4904
|
nn: "Lagring pågår",
|
|
@@ -4988,14 +5038,12 @@ var Toggle_module_default = {
|
|
|
4988
5038
|
"track": "dds-Toggle-module__track",
|
|
4989
5039
|
"thumb": "dds-Toggle-module__thumb",
|
|
4990
5040
|
"checkmark": "dds-Toggle-module__checkmark",
|
|
4991
|
-
"unchecked-icon": "dds-Toggle-module__unchecked-icon",
|
|
4992
|
-
"checked-icon": "dds-Toggle-module__checked-icon",
|
|
4993
5041
|
"labeltext--readonly": "dds-Toggle-module__labeltext--readonly",
|
|
4994
5042
|
"icon--read-only": "dds-Toggle-module__icon--read-only",
|
|
5043
|
+
"small": "dds-Toggle-module__small",
|
|
4995
5044
|
"medium": "dds-Toggle-module__medium",
|
|
4996
5045
|
"large": "dds-Toggle-module__large",
|
|
4997
5046
|
"label--is-loading": "dds-Toggle-module__label--is-loading",
|
|
4998
|
-
"label--color-scheme": "dds-Toggle-module__label--color-scheme",
|
|
4999
5047
|
"label--disabled": "dds-Toggle-module__label--disabled",
|
|
5000
5048
|
"label--read-only": "dds-Toggle-module__label--read-only"
|
|
5001
5049
|
};
|
|
@@ -5008,34 +5056,24 @@ const VisuallyHidden = ({ id, as: asProp, className, style, htmlProps, ...rest }
|
|
|
5008
5056
|
});
|
|
5009
5057
|
};
|
|
5010
5058
|
VisuallyHidden.displayName = "VisuallyHidden";
|
|
5011
|
-
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 }) => {
|
|
5012
5060
|
const { t } = useTranslation();
|
|
5013
5061
|
const generatedId = (0, react.useId)();
|
|
5014
5062
|
const uniqueId = id ?? `${generatedId}-toggle`;
|
|
5015
|
-
const iconSize =
|
|
5063
|
+
const iconSize = {
|
|
5064
|
+
small: "3",
|
|
5065
|
+
medium: "4",
|
|
5066
|
+
large: "5"
|
|
5067
|
+
}[size];
|
|
5016
5068
|
const [checked, setChecked] = useControllableState({
|
|
5017
5069
|
value: checkedProp,
|
|
5018
5070
|
defaultValue: defaultChecked ?? false,
|
|
5019
5071
|
onChange
|
|
5020
5072
|
});
|
|
5021
|
-
const isColorScheme = variant === "colorScheme";
|
|
5022
|
-
const marker = isColorScheme ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
5023
|
-
className: Toggle_module_default["unchecked-icon"],
|
|
5024
|
-
icon: SunIcon,
|
|
5025
|
-
iconSize
|
|
5026
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
5027
|
-
className: Toggle_module_default["checked-icon"],
|
|
5028
|
-
icon: MoonIcon,
|
|
5029
|
-
iconSize
|
|
5030
|
-
})] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
5031
|
-
className: Toggle_module_default.checkmark,
|
|
5032
|
-
icon: CheckIcon,
|
|
5033
|
-
iconSize
|
|
5034
|
-
});
|
|
5035
5073
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
5036
5074
|
htmlFor: uniqueId,
|
|
5037
5075
|
style,
|
|
5038
|
-
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"]),
|
|
5039
5077
|
children: [
|
|
5040
5078
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(HiddenInput, {
|
|
5041
5079
|
...getBaseHTMLProps(uniqueId, focus_module_default["focusable-sibling"], void 0, htmlProps, rest),
|
|
@@ -5051,7 +5089,14 @@ const Toggle = ({ id, children, size = "medium", checked: checkedProp, defaultCh
|
|
|
5051
5089
|
className: cn(Toggle_module_default.track, focus_module_default["focus-styled-sibling"]),
|
|
5052
5090
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5053
5091
|
className: Toggle_module_default.thumb,
|
|
5054
|
-
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
|
+
})
|
|
5055
5100
|
})
|
|
5056
5101
|
}),
|
|
5057
5102
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
@@ -5059,7 +5104,7 @@ const Toggle = ({ id, children, size = "medium", checked: checkedProp, defaultCh
|
|
|
5059
5104
|
children: [
|
|
5060
5105
|
readOnly && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
5061
5106
|
icon: LockFilledIcon,
|
|
5062
|
-
iconSize: "
|
|
5107
|
+
iconSize: "4",
|
|
5063
5108
|
className: Toggle_module_default["icon--read-only"]
|
|
5064
5109
|
}),
|
|
5065
5110
|
children,
|
|
@@ -5237,7 +5282,7 @@ const Breadcrumbs = ({ children, smallScreenBreakpoint, id, className, style, ht
|
|
|
5237
5282
|
size: "xsmall",
|
|
5238
5283
|
icon: MoreHorizontalIcon,
|
|
5239
5284
|
purpose: "tertiary",
|
|
5240
|
-
"aria-label": bChildrenTruncated.length > 1 ? t(texts$
|
|
5285
|
+
"aria-label": bChildrenTruncated.length > 1 ? t(texts$28.showHiddenTo(bChildren.length - 1)) : t(texts$28.showHidden)
|
|
5241
5286
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OverflowMenu, {
|
|
5242
5287
|
portal: false,
|
|
5243
5288
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OverflowMenuList, { children: bChildrenTruncated })
|
|
@@ -5257,7 +5302,7 @@ const Breadcrumbs = ({ children, smallScreenBreakpoint, id, className, style, ht
|
|
|
5257
5302
|
};
|
|
5258
5303
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("nav", {
|
|
5259
5304
|
...getBaseHTMLProps(id, cn(className, typographyStyles_module_default["body-short-medium"]), style, htmlProps, rest),
|
|
5260
|
-
"aria-label": t(texts$
|
|
5305
|
+
"aria-label": t(texts$28.breadcrumbs),
|
|
5261
5306
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(HStack, {
|
|
5262
5307
|
...responsiveListProps,
|
|
5263
5308
|
hideBelow: hasSmallScreenBreakpoint ? smallScreenBreakpoint : void 0,
|
|
@@ -5270,7 +5315,7 @@ const Breadcrumbs = ({ children, smallScreenBreakpoint, id, className, style, ht
|
|
|
5270
5315
|
});
|
|
5271
5316
|
};
|
|
5272
5317
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
5273
|
-
const texts$
|
|
5318
|
+
const texts$28 = createTexts({
|
|
5274
5319
|
breadcrumbs: {
|
|
5275
5320
|
nb: "Brødsmulesti",
|
|
5276
5321
|
no: "Brødsmulesti",
|
|
@@ -5419,6 +5464,10 @@ const CardExpandableBody = ({ children, className, style, htmlProps, padding, ..
|
|
|
5419
5464
|
};
|
|
5420
5465
|
CardExpandableBody.displayName = "CardExpandableBody";
|
|
5421
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
|
|
5422
5471
|
//#region src/components/SelectionControl/Checkbox/CheckboxGroupContext.tsx
|
|
5423
5472
|
const CheckboxGroupContext = (0, react.createContext)(null);
|
|
5424
5473
|
const useCheckboxGroup = () => {
|
|
@@ -5444,15 +5493,22 @@ const SelectionControl = ({ controlType, className, ...rest }) => /* @__PURE__ *
|
|
|
5444
5493
|
className: cn(className, SelectionControl_module_default["selection-control"], controlType === "radio" && SelectionControl_module_default["selection-control--radio"]),
|
|
5445
5494
|
...rest
|
|
5446
5495
|
});
|
|
5447
|
-
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] };
|
|
5448
5501
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
5449
5502
|
as: "label",
|
|
5450
5503
|
position: "relative",
|
|
5504
|
+
style: {
|
|
5505
|
+
...style,
|
|
5506
|
+
...styleVariables
|
|
5507
|
+
},
|
|
5451
5508
|
display: "flex",
|
|
5452
5509
|
alignItems: "center",
|
|
5453
5510
|
width: "fit-content",
|
|
5454
|
-
|
|
5455
|
-
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"]),
|
|
5456
5512
|
...rest
|
|
5457
5513
|
});
|
|
5458
5514
|
};
|
|
@@ -5467,7 +5523,7 @@ const renderGroupLabel = ({ id, showRequiredStyling, readOnly, label }) => {
|
|
|
5467
5523
|
readOnly && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
5468
5524
|
icon: LockIcon,
|
|
5469
5525
|
className: Label_module_default["read-only__icon"],
|
|
5470
|
-
iconSize: "
|
|
5526
|
+
iconSize: "4"
|
|
5471
5527
|
}),
|
|
5472
5528
|
label,
|
|
5473
5529
|
" ",
|
|
@@ -5477,15 +5533,8 @@ const renderGroupLabel = ({ id, showRequiredStyling, readOnly, label }) => {
|
|
|
5477
5533
|
else return null;
|
|
5478
5534
|
};
|
|
5479
5535
|
//#endregion
|
|
5480
|
-
//#region src/components/SelectionControl/SelectionControl.utils.tsx
|
|
5481
|
-
const selectionControlTypographyProps = {
|
|
5482
|
-
color: "inherit",
|
|
5483
|
-
typographyType: "body-short-medium",
|
|
5484
|
-
as: "span"
|
|
5485
|
-
};
|
|
5486
|
-
//#endregion
|
|
5487
5536
|
//#region src/components/SelectionControl/Checkbox/Checkbox.tsx
|
|
5488
|
-
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 }) => {
|
|
5489
5538
|
const generatedId = (0, react.useId)();
|
|
5490
5539
|
const uniqueId = id ?? `${generatedId}-checkbox`;
|
|
5491
5540
|
const checkboxGroup = useCheckboxGroup();
|
|
@@ -5494,6 +5543,7 @@ const Checkbox = ({ id, name, label, error = false, disabled, readOnly, indeterm
|
|
|
5494
5543
|
const isReadOnly = readOnly || checkboxGroup?.readOnly;
|
|
5495
5544
|
const hasError = error || checkboxGroup?.error;
|
|
5496
5545
|
const isDisabled = disabled || checkboxGroup?.disabled;
|
|
5546
|
+
const controlSize = size || checkboxGroup?.size || "medium";
|
|
5497
5547
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Label$1, {
|
|
5498
5548
|
disabled: isDisabled,
|
|
5499
5549
|
htmlFor: uniqueId,
|
|
@@ -5501,6 +5551,7 @@ const Checkbox = ({ id, name, label, error = false, disabled, readOnly, indeterm
|
|
|
5501
5551
|
controlType: "checkbox",
|
|
5502
5552
|
className,
|
|
5503
5553
|
style,
|
|
5554
|
+
size: controlSize,
|
|
5504
5555
|
children: [
|
|
5505
5556
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(HiddenInput, {
|
|
5506
5557
|
...getBaseHTMLProps(uniqueId, void 0, void 0, htmlProps, rest),
|
|
@@ -5525,10 +5576,7 @@ const Checkbox = ({ id, name, label, error = false, disabled, readOnly, indeterm
|
|
|
5525
5576
|
controlType: "checkbox",
|
|
5526
5577
|
className: focus_module_default["focus-styled-sibling"]
|
|
5527
5578
|
}),
|
|
5528
|
-
hasChildren ? children : hasLabel ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5529
|
-
...selectionControlTypographyProps,
|
|
5530
|
-
children: label
|
|
5531
|
-
}) : null
|
|
5579
|
+
hasChildren ? children : hasLabel ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label }) : null
|
|
5532
5580
|
]
|
|
5533
5581
|
});
|
|
5534
5582
|
};
|
|
@@ -5590,7 +5638,7 @@ const renderInputMessage = ({ tip, tipId, errorMessage, errorMessageId, noSpacin
|
|
|
5590
5638
|
//#endregion
|
|
5591
5639
|
//#region src/components/SelectionControl/Checkbox/CheckboxGroup.tsx
|
|
5592
5640
|
const CheckboxGroup = (props) => {
|
|
5593
|
-
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;
|
|
5594
5642
|
const { "aria-required": ariaRequired } = htmlProps;
|
|
5595
5643
|
const generatedId = (0, react.useId)();
|
|
5596
5644
|
const uniqueGroupId = groupId ?? `${generatedId}-checkboxGroup`;
|
|
@@ -5604,7 +5652,8 @@ const CheckboxGroup = (props) => {
|
|
|
5604
5652
|
uniqueGroupId,
|
|
5605
5653
|
tipId: tip ? tipId : void 0,
|
|
5606
5654
|
disabled,
|
|
5607
|
-
readOnly
|
|
5655
|
+
readOnly,
|
|
5656
|
+
size
|
|
5608
5657
|
};
|
|
5609
5658
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5610
5659
|
...getBaseHTMLProps(id, cn(className, SelectionControl_module_default.container), style, {
|
|
@@ -5656,7 +5705,7 @@ const getIsChecked = ({ value, groupValue, checked }) => {
|
|
|
5656
5705
|
}
|
|
5657
5706
|
return !!value;
|
|
5658
5707
|
};
|
|
5659
|
-
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 }) => {
|
|
5660
5709
|
const generatedId = (0, react.useId)();
|
|
5661
5710
|
const uniqueId = id ?? `${generatedId}-radioButton`;
|
|
5662
5711
|
const hasChildren = !!children;
|
|
@@ -5677,6 +5726,7 @@ const RadioButton = ({ id, name, label, disabled = false, readOnly = false, erro
|
|
|
5677
5726
|
groupValue: radioButtonGroup?.value,
|
|
5678
5727
|
checked
|
|
5679
5728
|
});
|
|
5729
|
+
const controlSize = size || radioButtonGroup?.size || "medium";
|
|
5680
5730
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Label$1, {
|
|
5681
5731
|
disabled: isDisabled,
|
|
5682
5732
|
style,
|
|
@@ -5684,6 +5734,7 @@ const RadioButton = ({ id, name, label, disabled = false, readOnly = false, erro
|
|
|
5684
5734
|
hasText: hasLabel || hasChildren,
|
|
5685
5735
|
htmlFor: uniqueId,
|
|
5686
5736
|
controlType: "radio",
|
|
5737
|
+
size: controlSize,
|
|
5687
5738
|
children: [
|
|
5688
5739
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(HiddenInput, {
|
|
5689
5740
|
...getBaseHTMLProps(uniqueId, void 0, void 0, htmlProps, rest),
|
|
@@ -5705,17 +5756,14 @@ const RadioButton = ({ id, name, label, disabled = false, readOnly = false, erro
|
|
|
5705
5756
|
controlType: "radio",
|
|
5706
5757
|
className: focus_module_default["focus-styled-sibling"]
|
|
5707
5758
|
}),
|
|
5708
|
-
hasChildren ? children : hasLabel ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5709
|
-
...selectionControlTypographyProps,
|
|
5710
|
-
children: label
|
|
5711
|
-
}) : null
|
|
5759
|
+
hasChildren ? children : hasLabel ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label }) : null
|
|
5712
5760
|
]
|
|
5713
5761
|
});
|
|
5714
5762
|
};
|
|
5715
5763
|
RadioButton.displayName = "RadioButton";
|
|
5716
5764
|
//#endregion
|
|
5717
5765
|
//#region src/components/SelectionControl/RadioButton/RadioButtonGroup.tsx
|
|
5718
|
-
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 }) => {
|
|
5719
5767
|
const { "aria-required": ariaRequired = false } = htmlProps;
|
|
5720
5768
|
const generatedId = (0, react.useId)();
|
|
5721
5769
|
const uniqueGroupId = groupId ?? `${generatedId}-radioButtonGroup`;
|
|
@@ -5737,7 +5785,8 @@ const RadioButtonGroup = ({ name, label, groupId, errorMessage, tip, disabled =
|
|
|
5737
5785
|
required,
|
|
5738
5786
|
readOnly,
|
|
5739
5787
|
value: groupValue,
|
|
5740
|
-
onChange: handleChange
|
|
5788
|
+
onChange: handleChange,
|
|
5789
|
+
size
|
|
5741
5790
|
};
|
|
5742
5791
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5743
5792
|
...getBaseHTMLProps(id, cn(className, SelectionControl_module_default.container), style, {
|
|
@@ -5775,10 +5824,6 @@ const RadioButtonGroup = ({ name, label, groupId, errorMessage, tip, disabled =
|
|
|
5775
5824
|
};
|
|
5776
5825
|
RadioButtonGroup.displayName = "RadioButtonGroup";
|
|
5777
5826
|
//#endregion
|
|
5778
|
-
//#region src/components/Card/CardSelectionControl/CardSelectable.context.tsx
|
|
5779
|
-
const CardSelectableContext = (0, react.createContext)({});
|
|
5780
|
-
const useCardSelectableContext = () => (0, react.useContext)(CardSelectableContext);
|
|
5781
|
-
//#endregion
|
|
5782
5827
|
//#region src/components/Card/CardSelectionControl/CardSelectable.tsx
|
|
5783
5828
|
const CardSelectable = (props) => {
|
|
5784
5829
|
const { appearance = "filled", cardType: cardTypeProp, id, padding, controlPlacementProps = {}, "aria-describedby": ariaDescribedby, className, htmlProps, style, ...rest } = props;
|
|
@@ -5802,9 +5847,9 @@ Provide \`cardType\` either via a parent <CardSelectableGroup> or directly on th
|
|
|
5802
5847
|
value
|
|
5803
5848
|
};
|
|
5804
5849
|
const customStyles = {
|
|
5805
|
-
["--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))",
|
|
5806
5851
|
["--dds-selection-control-card-control-top"]: top,
|
|
5807
|
-
["--dds-selection-control-card-control-left"]: left ?? `var(--dds-spacing-x1
|
|
5852
|
+
["--dds-selection-control-card-control-left"]: left ?? `var(--dds-spacing-x1)`
|
|
5808
5853
|
};
|
|
5809
5854
|
const sharedProps = {
|
|
5810
5855
|
...getBaseHTMLProps(id, classNames, {
|
|
@@ -5876,8 +5921,124 @@ const CardSelectableGroup = ({ name, cardType, errorMessage, disabled, readOnly,
|
|
|
5876
5921
|
};
|
|
5877
5922
|
CardSelectableGroup.displayName = "CardSelectableGroup";
|
|
5878
5923
|
//#endregion
|
|
5879
|
-
//#region src/components/Chip/Chip.
|
|
5880
|
-
|
|
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 }) => {
|
|
5881
6042
|
const { t } = useTranslation();
|
|
5882
6043
|
const { "aria-label": ariaLabel, ...restHTMLprops } = htmlProps;
|
|
5883
6044
|
const [isOpen, setIsOpen] = (0, react.useState)(true);
|
|
@@ -5885,30 +6046,23 @@ const Chip = ({ children, onClose, id, className, style, htmlProps = {}, ...rest
|
|
|
5885
6046
|
setIsOpen(false);
|
|
5886
6047
|
onClose?.();
|
|
5887
6048
|
};
|
|
5888
|
-
return isOpen ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
padding: "x0.25 0 x0.25 x0.5",
|
|
5894
|
-
borderRadius: "chip",
|
|
5895
|
-
border: "border-subtle",
|
|
5896
|
-
background: "surface-subtle",
|
|
5897
|
-
...getBaseHTMLProps(id, cn(className, typographyStyles_module_default["body-short-medium"]), style, restHTMLprops, rest),
|
|
5898
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextOverflowEllipsisInner, { children }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Bleed, {
|
|
5899
|
-
as: Button,
|
|
5900
|
-
purpose: "tertiary",
|
|
5901
|
-
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, {
|
|
5902
6054
|
icon: CloseIcon,
|
|
6055
|
+
color: "icon-default",
|
|
5903
6056
|
onClick,
|
|
5904
|
-
"aria-label": ariaLabel ?? t(texts$
|
|
5905
|
-
bleedMarginBlock: "x0.25",
|
|
5906
|
-
reflectivePadding: true
|
|
6057
|
+
"aria-label": ariaLabel ?? t(texts$27.removeChip) + (children ? ` ${children}` : "")
|
|
5907
6058
|
})]
|
|
5908
6059
|
}) : null;
|
|
5909
6060
|
};
|
|
5910
|
-
|
|
5911
|
-
|
|
6061
|
+
ChipRemovable.displayName = "ChipRemovable";
|
|
6062
|
+
ChipRadio.displayName = "ChipRadio";
|
|
6063
|
+
ChipCheckbox.displayName = "ChipCheckbox";
|
|
6064
|
+
ChipButton.displayName = "ChipButton";
|
|
6065
|
+
const texts$27 = createTexts({ removeChip: {
|
|
5912
6066
|
nb: "Fjern merkelapp",
|
|
5913
6067
|
no: "Fjern merkelapp",
|
|
5914
6068
|
nn: "Fjern merkelapp",
|
|
@@ -5917,17 +6071,49 @@ const texts$26 = createTexts({ removeChip: {
|
|
|
5917
6071
|
} });
|
|
5918
6072
|
//#endregion
|
|
5919
6073
|
//#region src/components/Chip/ChipGroup.tsx
|
|
5920
|
-
const ChipGroup = (
|
|
5921
|
-
const
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
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
|
|
5927
6099
|
});
|
|
5928
6100
|
};
|
|
5929
6101
|
ChipGroup.displayName = "ChipGroup";
|
|
5930
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
|
|
5931
6117
|
//#region src/components/CookieBanner/CookieBanner.module.css
|
|
5932
6118
|
var CookieBanner_module_default = {
|
|
5933
6119
|
"container": "dds-CookieBanner-module__container",
|
|
@@ -5989,7 +6175,7 @@ function CookieBanner({ headerText, description, buttons, checkboxes, id, classN
|
|
|
5989
6175
|
children: [heading, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShowHide, {
|
|
5990
6176
|
as: Button,
|
|
5991
6177
|
showBelow: collapsedBreakpoint,
|
|
5992
|
-
"aria-label": t(texts$
|
|
6178
|
+
"aria-label": t(texts$26.expandConsent),
|
|
5993
6179
|
purpose: "tertiary",
|
|
5994
6180
|
icon: ExpandIcon,
|
|
5995
6181
|
onClick: () => setIsCollapsedOnBreakpoint(false),
|
|
@@ -6025,7 +6211,7 @@ function CookieBanner({ headerText, description, buttons, checkboxes, id, classN
|
|
|
6025
6211
|
});
|
|
6026
6212
|
}
|
|
6027
6213
|
CookieBanner.displayName = "CookieBanner";
|
|
6028
|
-
const texts$
|
|
6214
|
+
const texts$26 = createTexts({ expandConsent: {
|
|
6029
6215
|
nb: "Utvid samtykke for bruk av informasjonskapsler",
|
|
6030
6216
|
no: "Utvid samtykke for bruk av informasjonskapsler",
|
|
6031
6217
|
nn: "Utvid samtykke for bruk av informasjonskapslar",
|
|
@@ -6258,32 +6444,32 @@ function CalendarGrid({ state, ...props }) {
|
|
|
6258
6444
|
const weeksInMonth = (0, _internationalized_date.getWeeksInMonth)(state.visibleRange.start, locale);
|
|
6259
6445
|
const weekDays = [
|
|
6260
6446
|
{
|
|
6261
|
-
short: t(texts$
|
|
6262
|
-
full: t(texts$
|
|
6447
|
+
short: t(texts$25.mo),
|
|
6448
|
+
full: t(texts$25.monday)
|
|
6263
6449
|
},
|
|
6264
6450
|
{
|
|
6265
|
-
short: t(texts$
|
|
6266
|
-
full: t(texts$
|
|
6451
|
+
short: t(texts$25.tu),
|
|
6452
|
+
full: t(texts$25.tuesday)
|
|
6267
6453
|
},
|
|
6268
6454
|
{
|
|
6269
|
-
short: t(texts$
|
|
6270
|
-
full: t(texts$
|
|
6455
|
+
short: t(texts$25.we),
|
|
6456
|
+
full: t(texts$25.wednesday)
|
|
6271
6457
|
},
|
|
6272
6458
|
{
|
|
6273
|
-
short: t(texts$
|
|
6274
|
-
full: t(texts$
|
|
6459
|
+
short: t(texts$25.th),
|
|
6460
|
+
full: t(texts$25.thursday)
|
|
6275
6461
|
},
|
|
6276
6462
|
{
|
|
6277
|
-
short: t(texts$
|
|
6278
|
-
full: t(texts$
|
|
6463
|
+
short: t(texts$25.fr),
|
|
6464
|
+
full: t(texts$25.friday)
|
|
6279
6465
|
},
|
|
6280
6466
|
{
|
|
6281
|
-
short: t(texts$
|
|
6282
|
-
full: t(texts$
|
|
6467
|
+
short: t(texts$25.sa),
|
|
6468
|
+
full: t(texts$25.saturday)
|
|
6283
6469
|
},
|
|
6284
6470
|
{
|
|
6285
|
-
short: t(texts$
|
|
6286
|
-
full: t(texts$
|
|
6471
|
+
short: t(texts$25.su),
|
|
6472
|
+
full: t(texts$25.sunday)
|
|
6287
6473
|
}
|
|
6288
6474
|
];
|
|
6289
6475
|
const { showWeekNumbers, onClose } = (0, react.useContext)(CalendarPopoverContext);
|
|
@@ -6302,7 +6488,7 @@ function CalendarGrid({ state, ...props }) {
|
|
|
6302
6488
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6303
6489
|
"aria-hidden": true,
|
|
6304
6490
|
children: "#"
|
|
6305
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$
|
|
6491
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$25.weekNumber) })]
|
|
6306
6492
|
}), weekDays.map((day, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(CalendarCell, {
|
|
6307
6493
|
as: "th",
|
|
6308
6494
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -6326,7 +6512,7 @@ function CalendarGrid({ state, ...props }) {
|
|
|
6326
6512
|
});
|
|
6327
6513
|
}
|
|
6328
6514
|
CalendarGrid.displayName = "CalendarGrid";
|
|
6329
|
-
const texts$
|
|
6515
|
+
const texts$25 = createTexts({
|
|
6330
6516
|
weekNumber: {
|
|
6331
6517
|
nb: "Ukenummer",
|
|
6332
6518
|
no: "Ukenummer",
|
|
@@ -6461,7 +6647,7 @@ function Calendar(props) {
|
|
|
6461
6647
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VStack, {
|
|
6462
6648
|
...calendarProps,
|
|
6463
6649
|
gap: "x0.25",
|
|
6464
|
-
height: "
|
|
6650
|
+
height: "calc(var(--dds-size-10) * 8 + var(--dds-spacing-x0-5))",
|
|
6465
6651
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
6466
6652
|
justifyContent: "space-between",
|
|
6467
6653
|
alignItems: "center",
|
|
@@ -6469,7 +6655,7 @@ function Calendar(props) {
|
|
|
6469
6655
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
6470
6656
|
"aria-hidden": optAttr(isPrevDisabled),
|
|
6471
6657
|
type: "button",
|
|
6472
|
-
"aria-label": t(texts$
|
|
6658
|
+
"aria-label": t(texts$24.previousMonth),
|
|
6473
6659
|
onClick: (e) => onPrev?.(e),
|
|
6474
6660
|
size: "small",
|
|
6475
6661
|
purpose: "tertiary",
|
|
@@ -6486,7 +6672,7 @@ function Calendar(props) {
|
|
|
6486
6672
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
6487
6673
|
type: "button",
|
|
6488
6674
|
"aria-hidden": optAttr(isNextDisabled),
|
|
6489
|
-
"aria-label": t(texts$
|
|
6675
|
+
"aria-label": t(texts$24.nextMonth),
|
|
6490
6676
|
onClick: (e) => onNext?.(e),
|
|
6491
6677
|
size: "small",
|
|
6492
6678
|
purpose: "tertiary",
|
|
@@ -6498,7 +6684,7 @@ function Calendar(props) {
|
|
|
6498
6684
|
});
|
|
6499
6685
|
}
|
|
6500
6686
|
Calendar.displayName = "Calendar";
|
|
6501
|
-
const texts$
|
|
6687
|
+
const texts$24 = createTexts({
|
|
6502
6688
|
nextMonth: {
|
|
6503
6689
|
nb: "Neste måned",
|
|
6504
6690
|
no: "Neste måned",
|
|
@@ -6515,79 +6701,19 @@ const texts$23 = createTexts({
|
|
|
6515
6701
|
}
|
|
6516
6702
|
});
|
|
6517
6703
|
//#endregion
|
|
6518
|
-
//#region src/components/helpers/InlineIconButton/InlineIconButton.module.css
|
|
6519
|
-
var InlineIconButton_module_default = { "button": "dds-InlineIconButton-module__button" };
|
|
6520
|
-
//#endregion
|
|
6521
|
-
//#region src/components/helpers/InlineIconButton/InlineIconButton.tsx
|
|
6522
|
-
const InlineIconButton = ({ className, size, icon, color, ...rest }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StylelessButton, {
|
|
6523
|
-
className: cn(className, InlineIconButton_module_default.button, _key1),
|
|
6524
|
-
...rest,
|
|
6525
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
6526
|
-
icon,
|
|
6527
|
-
iconSize: size,
|
|
6528
|
-
color
|
|
6529
|
-
})
|
|
6530
|
-
});
|
|
6531
|
-
InlineIconButton.displayName = "InlineIconButton";
|
|
6532
|
-
//#endregion
|
|
6533
|
-
//#region src/components/helpers/Input/Input.module.css
|
|
6534
|
-
var Input_module_default = {
|
|
6535
|
-
"container": "dds-Input-module__container",
|
|
6536
|
-
"input-group": "dds-Input-module__input-group",
|
|
6537
|
-
"input": "dds-Input-module__input",
|
|
6538
|
-
"disabled": "dds-Input-module__disabled",
|
|
6539
|
-
"read-only": "dds-Input-module__read-only",
|
|
6540
|
-
"input--stateful": "dds-Input-module__input--stateful",
|
|
6541
|
-
"input--hover": "dds-Input-module__input--hover",
|
|
6542
|
-
"input--stateful-danger": "dds-Input-module__input--stateful-danger",
|
|
6543
|
-
"input--large": "dds-Input-module__input--large",
|
|
6544
|
-
"input--medium": "dds-Input-module__input--medium",
|
|
6545
|
-
"input--small": "dds-Input-module__input--small",
|
|
6546
|
-
"input--xsmall": "dds-Input-module__input--xsmall",
|
|
6547
|
-
"input-with-icon--large": "dds-Input-module__input-with-icon--large",
|
|
6548
|
-
"input-with-icon--medium": "dds-Input-module__input-with-icon--medium",
|
|
6549
|
-
"input-with-icon--small": "dds-Input-module__input-with-icon--small",
|
|
6550
|
-
"input-with-icon--xsmall": "dds-Input-module__input-with-icon--xsmall",
|
|
6551
|
-
"input-with-el-right--large": "dds-Input-module__input-with-el-right--large",
|
|
6552
|
-
"input-with-el-right--medium": "dds-Input-module__input-with-el-right--medium",
|
|
6553
|
-
"input-with-el-right--small": "dds-Input-module__input-with-el-right--small",
|
|
6554
|
-
"input-with-el-right--xsmall": "dds-Input-module__input-with-el-right--xsmall",
|
|
6555
|
-
"input-with-btn-right--large": "dds-Input-module__input-with-btn-right--large",
|
|
6556
|
-
"input-with-btn-right--medium": "dds-Input-module__input-with-btn-right--medium",
|
|
6557
|
-
"input-with-btn-right--small": "dds-Input-module__input-with-btn-right--small",
|
|
6558
|
-
"input-with-btn-right--xsmall": "dds-Input-module__input-with-btn-right--xsmall",
|
|
6559
|
-
"input-with-icon-and-button-right--large": "dds-Input-module__input-with-icon-and-button-right--large",
|
|
6560
|
-
"input-with-icon-and-button-right--medium": "dds-Input-module__input-with-icon-and-button-right--medium",
|
|
6561
|
-
"input-with-icon-and-button-right--small": "dds-Input-module__input-with-icon-and-button-right--small",
|
|
6562
|
-
"input-with-icon-and-button-right--xsmall": "dds-Input-module__input-with-icon-and-button-right--xsmall",
|
|
6563
|
-
"input-group__absolute-el-right--large": "dds-Input-module__input-group__absolute-el-right--large",
|
|
6564
|
-
"input-group__absolute-el-right--medium": "dds-Input-module__input-group__absolute-el-right--medium",
|
|
6565
|
-
"input-group__absolute-el-right--small": "dds-Input-module__input-group__absolute-el-right--small",
|
|
6566
|
-
"input-group__absolute-el-right--xsmall": "dds-Input-module__input-group__absolute-el-right--xsmall",
|
|
6567
|
-
"input-group__btn-right": "dds-Input-module__input-group__btn-right",
|
|
6568
|
-
"input-group__btn-right-with-right-icon--xsmall": "dds-Input-module__input-group__btn-right-with-right-icon--xsmall",
|
|
6569
|
-
"input-group__btn-right-with-right-icon--small": "dds-Input-module__input-group__btn-right-with-right-icon--small",
|
|
6570
|
-
"input-group__btn-right-with-right-icon--medium": "dds-Input-module__input-group__btn-right-with-right-icon--medium",
|
|
6571
|
-
"input-group__btn-right-with-right-icon--large": "dds-Input-module__input-group__btn-right-with-right-icon--large",
|
|
6572
|
-
"input--with-affix": "dds-Input-module__input--with-affix",
|
|
6573
|
-
"input-group__absolute-el": "dds-Input-module__input-group__absolute-el",
|
|
6574
|
-
"input-group__absolute-el--large": "dds-Input-module__input-group__absolute-el--large",
|
|
6575
|
-
"input-group__absolute-el--medium": "dds-Input-module__input-group__absolute-el--medium",
|
|
6576
|
-
"input-group__absolute-el--small": "dds-Input-module__input-group__absolute-el--small",
|
|
6577
|
-
"input-group__absolute-el--xsmall": "dds-Input-module__input-group__absolute-el--xsmall"
|
|
6578
|
-
};
|
|
6579
|
-
//#endregion
|
|
6580
6704
|
//#region src/components/date-inputs/DatePicker/DateField/CalendarButton.tsx
|
|
6581
6705
|
function CalendarButton({ componentSize = "medium", isReadOnly, ...props }) {
|
|
6582
6706
|
const ref = (0, react.useRef)(null);
|
|
6583
6707
|
const { buttonProps } = (0, _react_aria_button.useButton)(props, ref);
|
|
6584
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6708
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
6585
6709
|
...buttonProps,
|
|
6586
6710
|
ref,
|
|
6587
6711
|
type: "button",
|
|
6588
|
-
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),
|
|
6589
6713
|
icon: CalendarIcon,
|
|
6590
|
-
size:
|
|
6714
|
+
size: componentSize,
|
|
6715
|
+
purpose: "tertiary",
|
|
6716
|
+
disabled: props.isDisabled
|
|
6591
6717
|
});
|
|
6592
6718
|
}
|
|
6593
6719
|
//#endregion
|
|
@@ -6602,16 +6728,16 @@ function formatDateFieldSegments(segments) {
|
|
|
6602
6728
|
const formattedDaySegment = {
|
|
6603
6729
|
...daySegment,
|
|
6604
6730
|
text: daySegment.text.padStart(2, "0"),
|
|
6605
|
-
placeholder: t(texts$
|
|
6731
|
+
placeholder: t(texts$23.dayPlaceholder)
|
|
6606
6732
|
};
|
|
6607
6733
|
const formattedMonthSegment = {
|
|
6608
6734
|
...monthSegment,
|
|
6609
6735
|
text: monthSegment.text.padStart(2, "0"),
|
|
6610
|
-
placeholder: t(texts$
|
|
6736
|
+
placeholder: t(texts$23.monthPlaceholder)
|
|
6611
6737
|
};
|
|
6612
6738
|
const formattedYearSegment = {
|
|
6613
6739
|
...yearSegment,
|
|
6614
|
-
placeholder: t(texts$
|
|
6740
|
+
placeholder: t(texts$23.yearPlaceholder)
|
|
6615
6741
|
};
|
|
6616
6742
|
const formattedSeparatorSegment = {
|
|
6617
6743
|
...separatorSegment,
|
|
@@ -6625,7 +6751,7 @@ function formatDateFieldSegments(segments) {
|
|
|
6625
6751
|
formattedYearSegment
|
|
6626
6752
|
];
|
|
6627
6753
|
}
|
|
6628
|
-
const texts$
|
|
6754
|
+
const texts$23 = createTexts({
|
|
6629
6755
|
dayPlaceholder: {
|
|
6630
6756
|
nb: "dd",
|
|
6631
6757
|
no: "dd",
|
|
@@ -6805,7 +6931,7 @@ function DateField({ componentSize = "medium", buttonProps, groupProps, ref, cle
|
|
|
6805
6931
|
}),
|
|
6806
6932
|
suffix: showClearButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ClearButton, {
|
|
6807
6933
|
absolute: true,
|
|
6808
|
-
"aria-label": t(texts$
|
|
6934
|
+
"aria-label": t(texts$22.clearDate),
|
|
6809
6935
|
"aria-hidden": !hasValue,
|
|
6810
6936
|
className: cn(!hasValue && utilStyles_module_default.invisible),
|
|
6811
6937
|
size: componentSize,
|
|
@@ -6824,7 +6950,7 @@ function DateField({ componentSize = "medium", buttonProps, groupProps, ref, cle
|
|
|
6824
6950
|
});
|
|
6825
6951
|
}
|
|
6826
6952
|
DateField.displayName = "DateField";
|
|
6827
|
-
const texts$
|
|
6953
|
+
const texts$22 = createTexts({ clearDate: {
|
|
6828
6954
|
en: "Clear date",
|
|
6829
6955
|
nb: "Tøm dato",
|
|
6830
6956
|
no: "Tøm dato",
|
|
@@ -7108,7 +7234,8 @@ var Table_module_default = {
|
|
|
7108
7234
|
"cell--right": "dds-Table-module__cell--right",
|
|
7109
7235
|
"cell--center": "dds-Table-module__cell--center",
|
|
7110
7236
|
"cell__inner": "dds-Table-module__cell__inner",
|
|
7111
|
-
"sort-button": "dds-Table-module__sort-button"
|
|
7237
|
+
"sort-button": "dds-Table-module__sort-button",
|
|
7238
|
+
"filter-cell": "dds-Table-module__filter-cell"
|
|
7112
7239
|
};
|
|
7113
7240
|
//#endregion
|
|
7114
7241
|
//#region src/components/DetailList/DetailList.tsx
|
|
@@ -7380,7 +7507,7 @@ const ErrorSummary = ({ heading: pHeading, className, style, children, id, htmlP
|
|
|
7380
7507
|
}) : pHeading ? pHeading : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Heading, {
|
|
7381
7508
|
level: 2,
|
|
7382
7509
|
typographyType: "heading-small",
|
|
7383
|
-
children: t(texts$
|
|
7510
|
+
children: t(texts$21.toProceedCorrectErrors)
|
|
7384
7511
|
});
|
|
7385
7512
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Paper, {
|
|
7386
7513
|
...getBaseHTMLProps(id, cn(className, ErrorSummary_module_default.container), style, htmlProps, props),
|
|
@@ -7390,7 +7517,7 @@ const ErrorSummary = ({ heading: pHeading, className, style, children, id, htmlP
|
|
|
7390
7517
|
});
|
|
7391
7518
|
};
|
|
7392
7519
|
ErrorSummary.displayName = "ErrorSummary";
|
|
7393
|
-
const texts$
|
|
7520
|
+
const texts$21 = createTexts({ toProceedCorrectErrors: {
|
|
7394
7521
|
nb: "For å gå videre må du rette opp følgende feil:",
|
|
7395
7522
|
no: "For å gå videre må du rette opp følgende feil:",
|
|
7396
7523
|
nn: "For å gå vidare må du rette opp følgjande feil:",
|
|
@@ -7424,6 +7551,7 @@ const FavStar = ({ id, className, style, onChange, checked: checkedProp, default
|
|
|
7424
7551
|
defaultValue: defaultChecked ?? false,
|
|
7425
7552
|
onChange
|
|
7426
7553
|
});
|
|
7554
|
+
const iconSize = size === "large" ? "8" : "6";
|
|
7427
7555
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
7428
7556
|
className: cn(className, FavStar_module_default.container, FavStar_module_default[`container--${size}`], focus_module_default["has-focusable-input"]),
|
|
7429
7557
|
style,
|
|
@@ -7435,15 +7563,15 @@ const FavStar = ({ id, className, style, onChange, checked: checkedProp, default
|
|
|
7435
7563
|
checked,
|
|
7436
7564
|
onChange: (e) => setChecked(e.target.checked),
|
|
7437
7565
|
type: "checkbox",
|
|
7438
|
-
"aria-label": props["aria-label"] ?? t(texts$
|
|
7566
|
+
"aria-label": props["aria-label"] ?? t(texts$20.favourite)
|
|
7439
7567
|
}),
|
|
7440
7568
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
7441
|
-
iconSize
|
|
7569
|
+
iconSize,
|
|
7442
7570
|
icon: StarIcon,
|
|
7443
7571
|
className: FavStar_module_default.icon
|
|
7444
7572
|
}),
|
|
7445
7573
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
7446
|
-
iconSize
|
|
7574
|
+
iconSize,
|
|
7447
7575
|
icon: StarFilledIcon,
|
|
7448
7576
|
className: cn(FavStar_module_default.icon, !checked && FavStar_module_default["icon--invisible"])
|
|
7449
7577
|
})
|
|
@@ -7451,7 +7579,7 @@ const FavStar = ({ id, className, style, onChange, checked: checkedProp, default
|
|
|
7451
7579
|
});
|
|
7452
7580
|
};
|
|
7453
7581
|
FavStar.displayName = "FavStar";
|
|
7454
|
-
const texts$
|
|
7582
|
+
const texts$20 = createTexts({ favourite: {
|
|
7455
7583
|
nb: "Stjernemarker",
|
|
7456
7584
|
no: "Stjernemarker",
|
|
7457
7585
|
nn: "Stjernemerk",
|
|
@@ -7465,9 +7593,7 @@ var Feedback_module_default = {
|
|
|
7465
7593
|
"rating-container--horizontal": "dds-Feedback-module__rating-container--horizontal",
|
|
7466
7594
|
"rating-container--vertical": "dds-Feedback-module__rating-container--vertical",
|
|
7467
7595
|
"rating-submitted-title": "dds-Feedback-module__rating-submitted-title",
|
|
7468
|
-
"button": "dds-Feedback-module__button"
|
|
7469
|
-
"button--horizontal": "dds-Feedback-module__button--horizontal",
|
|
7470
|
-
"button--vertical": "dds-Feedback-module__button--vertical"
|
|
7596
|
+
"button": "dds-Feedback-module__button"
|
|
7471
7597
|
};
|
|
7472
7598
|
//#endregion
|
|
7473
7599
|
//#region src/components/TextArea/TextArea.module.css
|
|
@@ -7495,7 +7621,7 @@ function CharCounter(props) {
|
|
|
7495
7621
|
"/",
|
|
7496
7622
|
max
|
|
7497
7623
|
]
|
|
7498
|
-
}), /* @__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)) })]
|
|
7499
7625
|
});
|
|
7500
7626
|
}
|
|
7501
7627
|
const renderCharCounter = (id, isShown, textLength, maxLength) => {
|
|
@@ -7505,7 +7631,7 @@ const renderCharCounter = (id, isShown, textLength, maxLength) => {
|
|
|
7505
7631
|
current: textLength
|
|
7506
7632
|
});
|
|
7507
7633
|
};
|
|
7508
|
-
const texts$
|
|
7634
|
+
const texts$19 = createTexts({ charsWritten: (current, max, remain) => ({
|
|
7509
7635
|
nb: `${current} av ${max} tegn skrevet. ${remain} igjen.`,
|
|
7510
7636
|
no: `${current} av ${max} tegn skrevet. ${remain} igjen.`,
|
|
7511
7637
|
nn: `${current} av ${max} teikn skrivne. ${remain} att.`,
|
|
@@ -7607,12 +7733,12 @@ const CommentComponent = ({ rating, feedbackText, positiveFeedbackLabel, negativ
|
|
|
7607
7733
|
size: "small",
|
|
7608
7734
|
onClick: handleSubmit,
|
|
7609
7735
|
loading,
|
|
7610
|
-
children: t(texts$
|
|
7736
|
+
children: t(texts$18.send)
|
|
7611
7737
|
})
|
|
7612
7738
|
]
|
|
7613
7739
|
});
|
|
7614
7740
|
};
|
|
7615
|
-
const texts$
|
|
7741
|
+
const texts$18 = createTexts({ send: {
|
|
7616
7742
|
nb: "Send inn",
|
|
7617
7743
|
no: "Send inn",
|
|
7618
7744
|
nn: "Send inn",
|
|
@@ -7724,7 +7850,7 @@ const RatingComponent = ({ layout, ratingLabel, loading, thumbUpTooltip, thumbDo
|
|
|
7724
7850
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
|
|
7725
7851
|
className: typographyStyles_module_default["label-medium"],
|
|
7726
7852
|
children: ratingLabel
|
|
7727
|
-
}), 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, {
|
|
7728
7854
|
gap: "x0.75",
|
|
7729
7855
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tooltip, {
|
|
7730
7856
|
text: thumbUpTooltip,
|
|
@@ -7748,7 +7874,7 @@ const RatingComponent = ({ layout, ratingLabel, loading, thumbUpTooltip, thumbDo
|
|
|
7748
7874
|
})]
|
|
7749
7875
|
});
|
|
7750
7876
|
};
|
|
7751
|
-
const texts$
|
|
7877
|
+
const texts$17 = createTexts({ uploadingFeedback: {
|
|
7752
7878
|
nb: "Laster opp tilbakemelding...",
|
|
7753
7879
|
no: "Laster opp tilbakemelding...",
|
|
7754
7880
|
nn: "Lastar opp tilbakemelding...",
|
|
@@ -7762,14 +7888,14 @@ const Feedback = ({ layout = "vertical", ratingLabel, positiveFeedbackLabel, neg
|
|
|
7762
7888
|
const [rating, setRating] = (0, react.useState)(null);
|
|
7763
7889
|
const [feedbackText, setFeedbackText] = (0, react.useState)();
|
|
7764
7890
|
const [isFeedbackSubmitted, setIsFeedbackSubmitted] = (0, react.useState)(false);
|
|
7765
|
-
const tRatingLabel = ratingLabel ?? t(texts$
|
|
7766
|
-
const tPositiveFeedbackLabel = positiveFeedbackLabel ?? t(texts$
|
|
7767
|
-
const tNegativeFeedbackLabel = negativeFeedbackLabel ?? t(texts$
|
|
7768
|
-
const tRatingSubmittedTitle = ratingSubmittedTitle ?? t(texts$
|
|
7769
|
-
const tSubmittedTitle = submittedTitle ?? t(texts$
|
|
7770
|
-
const tTextAreaTip = textAreaTip ?? t(texts$
|
|
7771
|
-
const tThumbUpTooltip = thumbUpTooltip ?? t(texts$
|
|
7772
|
-
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);
|
|
7773
7899
|
(0, react.useEffect)(() => {
|
|
7774
7900
|
if (ratingProp !== void 0) setRating(ratingProp);
|
|
7775
7901
|
}, [ratingProp]);
|
|
@@ -7813,7 +7939,7 @@ const Feedback = ({ layout = "vertical", ratingLabel, positiveFeedbackLabel, neg
|
|
|
7813
7939
|
});
|
|
7814
7940
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Paragraph, { children: tSubmittedTitle });
|
|
7815
7941
|
};
|
|
7816
|
-
const texts$
|
|
7942
|
+
const texts$16 = createTexts({
|
|
7817
7943
|
ratingQuestion: {
|
|
7818
7944
|
nb: "Hva syns du om tjenesten?",
|
|
7819
7945
|
no: "Hva syns du om tjenesten?",
|
|
@@ -7974,10 +8100,10 @@ const File$1 = (props) => {
|
|
|
7974
8100
|
type: "button",
|
|
7975
8101
|
onClick: removeFile,
|
|
7976
8102
|
icon: CloseIcon,
|
|
7977
|
-
"aria-label": t(texts$
|
|
8103
|
+
"aria-label": t(texts$15.removeFile(stateFile.name)),
|
|
7978
8104
|
htmlProps: {
|
|
7979
8105
|
"aria-invalid": !isValid ? true : void 0,
|
|
7980
|
-
"aria-errormessage": !isValid ? t(texts$
|
|
8106
|
+
"aria-errormessage": !isValid ? t(texts$15.invalidFile) : void 0,
|
|
7981
8107
|
"aria-describedby": spaceSeparatedIdListGenerator(errorsList.map((e) => e.id))
|
|
7982
8108
|
}
|
|
7983
8109
|
})] })]
|
|
@@ -7988,11 +8114,11 @@ const File$1 = (props) => {
|
|
|
7988
8114
|
purpose: "secondary",
|
|
7989
8115
|
onClick: () => onRetry(fileId),
|
|
7990
8116
|
icon: RefreshIcon,
|
|
7991
|
-
children: t(texts$
|
|
8117
|
+
children: t(texts$15.tryAgain)
|
|
7992
8118
|
})]
|
|
7993
8119
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ErrorList, { errors: errorsList })] });
|
|
7994
8120
|
};
|
|
7995
|
-
const texts$
|
|
8121
|
+
const texts$15 = createTexts({
|
|
7996
8122
|
removeFile: (file) => ({
|
|
7997
8123
|
nb: `Fjern fil ${file}`,
|
|
7998
8124
|
no: `Fjern fil ${file}`,
|
|
@@ -8133,7 +8259,7 @@ const useFileUploader = (props) => {
|
|
|
8133
8259
|
isFileDialogActive: false,
|
|
8134
8260
|
isDragActive: false,
|
|
8135
8261
|
dragCounter: 0,
|
|
8136
|
-
rootErrors: calcRootErrors(t(texts$
|
|
8262
|
+
rootErrors: calcRootErrors(t(texts$14.invalidFileAmount), initialFileUploaderFiles, maxFiles, errorMessage)
|
|
8137
8263
|
});
|
|
8138
8264
|
const { files: stateFiles } = state;
|
|
8139
8265
|
(0, react.useEffect)(() => {
|
|
@@ -8144,7 +8270,7 @@ const useFileUploader = (props) => {
|
|
|
8144
8270
|
return {
|
|
8145
8271
|
name: file.name,
|
|
8146
8272
|
file,
|
|
8147
|
-
errors: accepted ? [] : [t(texts$
|
|
8273
|
+
errors: accepted ? [] : [t(texts$14.invalidFileType)]
|
|
8148
8274
|
};
|
|
8149
8275
|
}
|
|
8150
8276
|
return {
|
|
@@ -8167,7 +8293,7 @@ const useFileUploader = (props) => {
|
|
|
8167
8293
|
(0, react.useEffect)(() => {
|
|
8168
8294
|
dispatch({
|
|
8169
8295
|
type: "setRootErrors",
|
|
8170
|
-
payload: calcRootErrors(t(texts$
|
|
8296
|
+
payload: calcRootErrors(t(texts$14.invalidFileAmount), stateFiles, maxFiles, errorMessage)
|
|
8171
8297
|
});
|
|
8172
8298
|
}, [
|
|
8173
8299
|
dispatch,
|
|
@@ -8198,7 +8324,7 @@ const useFileUploader = (props) => {
|
|
|
8198
8324
|
const newFiles = (await (0, file_selector.fromEvent)(evt)).filter((f) => !existingFileNames.includes(f.name)).map((file) => ({
|
|
8199
8325
|
file,
|
|
8200
8326
|
name: file.name,
|
|
8201
|
-
errors: isFileAccepted(file, accept) ? [] : [t(texts$
|
|
8327
|
+
errors: isFileAccepted(file, accept) ? [] : [t(texts$14.invalidFileType)]
|
|
8202
8328
|
})).concat(stateFiles);
|
|
8203
8329
|
const mergedFiles = [...stateFiles.filter((f) => f.url).map((f) => ({
|
|
8204
8330
|
name: f.name,
|
|
@@ -8290,7 +8416,7 @@ const useFileUploader = (props) => {
|
|
|
8290
8416
|
removeFile
|
|
8291
8417
|
};
|
|
8292
8418
|
};
|
|
8293
|
-
const texts$
|
|
8419
|
+
const texts$14 = createTexts({
|
|
8294
8420
|
invalidFileType: {
|
|
8295
8421
|
nb: "Ugyldig filtype",
|
|
8296
8422
|
no: "Ugyldig filtype",
|
|
@@ -8311,8 +8437,8 @@ const texts$13 = createTexts({
|
|
|
8311
8437
|
const FileUploader = (props) => {
|
|
8312
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;
|
|
8313
8439
|
const { t } = useTranslation();
|
|
8314
|
-
const tDropAreaLabel = dropAreaLabel ?? t(texts$
|
|
8315
|
-
const tBtnLabel = btnLabel ?? t(texts$
|
|
8440
|
+
const tDropAreaLabel = dropAreaLabel ?? t(texts$13.dragAndDropOr);
|
|
8441
|
+
const tBtnLabel = btnLabel ?? t(texts$13.selectFile);
|
|
8316
8442
|
const generatedId = (0, react.useId)();
|
|
8317
8443
|
const uniqueId = id ?? `${generatedId}-fileUploader`;
|
|
8318
8444
|
const { state: { files: stateFiles, isDragActive, rootErrors }, getRootProps, getInputProps, getButtonProps, removeFile } = useFileUploader({
|
|
@@ -8418,7 +8544,7 @@ const FileUploader = (props) => {
|
|
|
8418
8544
|
children: [
|
|
8419
8545
|
input,
|
|
8420
8546
|
tDropAreaLabel,
|
|
8421
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$
|
|
8547
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$13.uploadFileWithButton) }),
|
|
8422
8548
|
button
|
|
8423
8549
|
]
|
|
8424
8550
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box, {
|
|
@@ -8431,12 +8557,12 @@ const FileUploader = (props) => {
|
|
|
8431
8557
|
className: cn(readOnly && focus_module_default["focus-styled-sibling"], readOnly && FileUploader_module_default["readonly--file-list"]),
|
|
8432
8558
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, {
|
|
8433
8559
|
id: fileListNameId,
|
|
8434
|
-
children: t(texts$
|
|
8560
|
+
children: t(texts$13.uploadedFiles)
|
|
8435
8561
|
}), inactive && fileListElements.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Typography, {
|
|
8436
8562
|
italic: true,
|
|
8437
8563
|
as: "span",
|
|
8438
8564
|
color: disabled ? "text-subtle" : "text-medium",
|
|
8439
|
-
children: t(texts$
|
|
8565
|
+
children: t(texts$13.noFiles)
|
|
8440
8566
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StylelessList, {
|
|
8441
8567
|
"aria-labelledby": fileListNameId,
|
|
8442
8568
|
children: fileListElements
|
|
@@ -8446,7 +8572,7 @@ const FileUploader = (props) => {
|
|
|
8446
8572
|
});
|
|
8447
8573
|
};
|
|
8448
8574
|
FileUploader.displayName = "FileUploader";
|
|
8449
|
-
const texts$
|
|
8575
|
+
const texts$13 = createTexts({
|
|
8450
8576
|
dragAndDropOr: {
|
|
8451
8577
|
nb: "Dra og slipp filer her eller",
|
|
8452
8578
|
no: "Dra og slipp filer her eller",
|
|
@@ -8626,7 +8752,7 @@ function FormSummaryEmptyValue() {
|
|
|
8626
8752
|
" ",
|
|
8627
8753
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VisuallyHidden, { children: [
|
|
8628
8754
|
" ",
|
|
8629
|
-
t(texts$
|
|
8755
|
+
t(texts$12.noValue),
|
|
8630
8756
|
" "
|
|
8631
8757
|
] })
|
|
8632
8758
|
] });
|
|
@@ -8640,7 +8766,7 @@ function FormSummaryError({ ...props }) {
|
|
|
8640
8766
|
})
|
|
8641
8767
|
});
|
|
8642
8768
|
}
|
|
8643
|
-
const texts$
|
|
8769
|
+
const texts$12 = createTexts({ noValue: {
|
|
8644
8770
|
nb: "Ikke fylt ut",
|
|
8645
8771
|
no: "Ikke fylt ut",
|
|
8646
8772
|
nn: "Ikkje fylt ut",
|
|
@@ -8702,7 +8828,7 @@ const InlineButton = ({ className, color, icon, children, ...rest }) => /* @__PU
|
|
|
8702
8828
|
...rest,
|
|
8703
8829
|
children: icon ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
8704
8830
|
icon,
|
|
8705
|
-
iconSize: "
|
|
8831
|
+
iconSize: "component"
|
|
8706
8832
|
}) : children
|
|
8707
8833
|
});
|
|
8708
8834
|
//#endregion
|
|
@@ -8766,13 +8892,13 @@ const inlineEditVisuallyHidden = (id, clearable) => {
|
|
|
8766
8892
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VisuallyHidden, {
|
|
8767
8893
|
id,
|
|
8768
8894
|
children: [
|
|
8769
|
-
t(texts$
|
|
8895
|
+
t(texts$11.inlineEditInfo),
|
|
8770
8896
|
" ",
|
|
8771
|
-
!clearable && t(texts$
|
|
8897
|
+
!clearable && t(texts$11.notClearable)
|
|
8772
8898
|
]
|
|
8773
8899
|
});
|
|
8774
8900
|
};
|
|
8775
|
-
const texts$
|
|
8901
|
+
const texts$11 = createTexts({
|
|
8776
8902
|
inlineEditInfo: {
|
|
8777
8903
|
nb: "Escape, Enter eller Tab for å lagre.",
|
|
8778
8904
|
no: "Escape, Enter eller Tab for å lagre.",
|
|
@@ -9029,7 +9155,7 @@ const InternalHeader = (props) => {
|
|
|
9029
9155
|
const hasSmallScreenBreakpoint = !!smallScreenBreakpoint;
|
|
9030
9156
|
const hasNavInContextMenu = hasSmallScreenBreakpoint && hasNavigationElements;
|
|
9031
9157
|
const navigation = hasNavigationElements ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
9032
|
-
"aria-label": t(texts$
|
|
9158
|
+
"aria-label": t(texts$10.siteNavigation),
|
|
9033
9159
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShowHide, {
|
|
9034
9160
|
as: StylelessList,
|
|
9035
9161
|
hideBelow: hasSmallScreenBreakpoint ? smallScreenBreakpoint : void 0,
|
|
@@ -9082,7 +9208,7 @@ const InternalHeader = (props) => {
|
|
|
9082
9208
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(OverflowMenuGroup, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
9083
9209
|
icon: hasNavInContextMenu ? MenuIcon : MoreVerticalIcon,
|
|
9084
9210
|
purpose: "tertiary",
|
|
9085
|
-
"aria-label": t(texts$
|
|
9211
|
+
"aria-label": t(texts$10.openMenu)
|
|
9086
9212
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(OverflowMenu, {
|
|
9087
9213
|
className: InternalHeader_module_default["context-menu"],
|
|
9088
9214
|
children: [
|
|
@@ -9095,7 +9221,7 @@ const InternalHeader = (props) => {
|
|
|
9095
9221
|
}) }),
|
|
9096
9222
|
hasNavInContextMenu && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShowHide, {
|
|
9097
9223
|
as: "nav",
|
|
9098
|
-
"aria-label": t(texts$
|
|
9224
|
+
"aria-label": t(texts$10.siteNavigation),
|
|
9099
9225
|
showBelow: smallScreenBreakpoint,
|
|
9100
9226
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OverflowMenuList, { children: navItems.map((item, i) => /* @__PURE__ */ (0, react.createElement)(OverflowMenuLink, {
|
|
9101
9227
|
...item,
|
|
@@ -9122,7 +9248,7 @@ const InternalHeader = (props) => {
|
|
|
9122
9248
|
});
|
|
9123
9249
|
};
|
|
9124
9250
|
InternalHeader.displayName = "InternalHeader";
|
|
9125
|
-
const texts$
|
|
9251
|
+
const texts$10 = createTexts({
|
|
9126
9252
|
openMenu: {
|
|
9127
9253
|
nb: "Åpne meny",
|
|
9128
9254
|
no: "Åpne meny",
|
|
@@ -9445,7 +9571,7 @@ const NewsPopover = ({ id, className, style, htmlProps, header, news, defaultAct
|
|
|
9445
9571
|
}),
|
|
9446
9572
|
news.map((slide, i) => {
|
|
9447
9573
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
9448
|
-
iconSize: "
|
|
9574
|
+
iconSize: "4",
|
|
9449
9575
|
icon: CircleFilledIcon,
|
|
9450
9576
|
color: activeSlide === i ? "brand-tertiary-default" : "brand-tertiary-subtle"
|
|
9451
9577
|
}, `${slide.heading}-${i}`);
|
|
@@ -9753,7 +9879,7 @@ const DDSOption = ({ testId, ...props }) => /* @__PURE__ */ (0, react_jsx_runtim
|
|
|
9753
9879
|
},
|
|
9754
9880
|
children: [props.isSelected && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
9755
9881
|
icon: CheckIcon,
|
|
9756
|
-
iconSize: "
|
|
9882
|
+
iconSize: "component"
|
|
9757
9883
|
}), props.children]
|
|
9758
9884
|
});
|
|
9759
9885
|
const CustomOption = ({ testId, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Option, {
|
|
@@ -10082,7 +10208,7 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10082
10208
|
value: 50
|
|
10083
10209
|
},
|
|
10084
10210
|
{
|
|
10085
|
-
label: t(texts$
|
|
10211
|
+
label: t(texts$9.all),
|
|
10086
10212
|
value: itemsAmount
|
|
10087
10213
|
}
|
|
10088
10214
|
];
|
|
@@ -10157,7 +10283,7 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10157
10283
|
const navigation = withPagination ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box, {
|
|
10158
10284
|
as: "nav",
|
|
10159
10285
|
ref,
|
|
10160
|
-
"aria-label": t(texts$
|
|
10286
|
+
"aria-label": t(texts$9.pagination),
|
|
10161
10287
|
display: "flex",
|
|
10162
10288
|
alignItems: "center",
|
|
10163
10289
|
...!withSelect && !withCounter && { ...baseHTMLProps },
|
|
@@ -10194,7 +10320,7 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10194
10320
|
onClick: (event) => {
|
|
10195
10321
|
onPageChange(event, 1);
|
|
10196
10322
|
},
|
|
10197
|
-
"aria-label": t(texts$
|
|
10323
|
+
"aria-label": t(texts$9.firstPage)
|
|
10198
10324
|
})
|
|
10199
10325
|
}),
|
|
10200
10326
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
@@ -10230,7 +10356,7 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10230
10356
|
onClick: (event) => {
|
|
10231
10357
|
onPageChange(event, pagesLength);
|
|
10232
10358
|
},
|
|
10233
|
-
"aria-label": t(texts$
|
|
10359
|
+
"aria-label": t(texts$9.lastPage)
|
|
10234
10360
|
})
|
|
10235
10361
|
})
|
|
10236
10362
|
]
|
|
@@ -10262,16 +10388,16 @@ const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage =
|
|
|
10262
10388
|
isClearable: false,
|
|
10263
10389
|
onChange: handleSelectChange,
|
|
10264
10390
|
componentSize: "small",
|
|
10265
|
-
"aria-label": t(texts$
|
|
10391
|
+
"aria-label": t(texts$9.itemsPerPage)
|
|
10266
10392
|
}), withCounter && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Paragraph, {
|
|
10267
10393
|
typographyType: "body-short-medium",
|
|
10268
|
-
children: t(texts$
|
|
10394
|
+
children: t(texts$9.showsAmountOfTotalItems(activePageFirstItem, activePageLastItem, itemsAmount))
|
|
10269
10395
|
})]
|
|
10270
10396
|
}), navigation]
|
|
10271
10397
|
});
|
|
10272
10398
|
};
|
|
10273
10399
|
Pagination.displayName = "Pagination";
|
|
10274
|
-
const texts$
|
|
10400
|
+
const texts$9 = createTexts({
|
|
10275
10401
|
pagination: {
|
|
10276
10402
|
nb: "Paginering",
|
|
10277
10403
|
no: "Paginering",
|
|
@@ -11581,8 +11707,8 @@ const createCountryOptions = (countries) => {
|
|
|
11581
11707
|
const countryOptions = createCountryOptions(COUNTRIES);
|
|
11582
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 }) => {
|
|
11583
11709
|
const { t } = useTranslation();
|
|
11584
|
-
const tGroupLabel = groupLabel ?? t(texts$
|
|
11585
|
-
const tSelectLabel = selectLabel ?? t(texts$
|
|
11710
|
+
const tGroupLabel = groupLabel ?? t(texts$8.countryCodeAndPhoneNumber);
|
|
11711
|
+
const tSelectLabel = selectLabel ?? t(texts$8.countryCode);
|
|
11586
11712
|
const generatedId = (0, react.useId)();
|
|
11587
11713
|
const uniqueId = props.id ?? generatedId;
|
|
11588
11714
|
const phoneInputId = `${uniqueId}-phone-input`;
|
|
@@ -11731,7 +11857,7 @@ const PhoneInput = ({ label, readOnly, errorMessage, tip, required, width, compo
|
|
|
11731
11857
|
};
|
|
11732
11858
|
PhoneInput.displayName = "PhoneInput";
|
|
11733
11859
|
const getCallingCode = (s) => s.substring(s.indexOf("+"), s.length) ?? "";
|
|
11734
|
-
const texts$
|
|
11860
|
+
const texts$8 = createTexts({
|
|
11735
11861
|
countryCode: {
|
|
11736
11862
|
nb: "Landskode",
|
|
11737
11863
|
no: "Landskode",
|
|
@@ -11835,6 +11961,7 @@ const Popover = ({ id, header, withCloseButton = true, onBlur, children, placeme
|
|
|
11835
11961
|
}),
|
|
11836
11962
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
11837
11963
|
marginBlock: !hasTitle && withCloseButton ? "x2 0" : "0",
|
|
11964
|
+
height: "100%",
|
|
11838
11965
|
children
|
|
11839
11966
|
}),
|
|
11840
11967
|
withCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
@@ -11972,11 +12099,11 @@ const ProgressTrackerItem = (props) => {
|
|
|
11972
12099
|
const stepNumberContent = (0, react.useMemo)(() => {
|
|
11973
12100
|
if (completed) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
11974
12101
|
icon: CheckIcon,
|
|
11975
|
-
iconSize: "
|
|
12102
|
+
iconSize: "5"
|
|
11976
12103
|
});
|
|
11977
12104
|
if (icon !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
11978
12105
|
icon,
|
|
11979
|
-
iconSize: "
|
|
12106
|
+
iconSize: "5"
|
|
11980
12107
|
});
|
|
11981
12108
|
return stepNumber;
|
|
11982
12109
|
}, [
|
|
@@ -12003,7 +12130,7 @@ const ProgressTrackerItem = (props) => {
|
|
|
12003
12130
|
color: getTextColor(),
|
|
12004
12131
|
children
|
|
12005
12132
|
})] });
|
|
12006
|
-
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)}`;
|
|
12007
12134
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
12008
12135
|
as: "li",
|
|
12009
12136
|
display: direction === "row" ? "flex" : void 0,
|
|
@@ -12028,7 +12155,7 @@ const ProgressTrackerItem = (props) => {
|
|
|
12028
12155
|
});
|
|
12029
12156
|
};
|
|
12030
12157
|
ProgressTrackerItem.displayName = "ProgressTracker.Item";
|
|
12031
|
-
const texts$
|
|
12158
|
+
const texts$7 = createTexts({
|
|
12032
12159
|
uncompleted: {
|
|
12033
12160
|
nb: "trinn ikke ferdig",
|
|
12034
12161
|
no: "trinn ikke ferdig",
|
|
@@ -12069,7 +12196,7 @@ const ProgressTracker = (() => {
|
|
|
12069
12196
|
direction
|
|
12070
12197
|
},
|
|
12071
12198
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
12072
|
-
"aria-label": ariaLabel ?? t(texts$
|
|
12199
|
+
"aria-label": ariaLabel ?? t(texts$6.stepProgression),
|
|
12073
12200
|
...getBaseHTMLProps(id, className, style, htmlProps, rest),
|
|
12074
12201
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
12075
12202
|
as: StylelessOList,
|
|
@@ -12099,7 +12226,7 @@ function passIndexPropToProgressTrackerItem(children) {
|
|
|
12099
12226
|
index
|
|
12100
12227
|
}));
|
|
12101
12228
|
}
|
|
12102
|
-
const texts$
|
|
12229
|
+
const texts$6 = createTexts({ stepProgression: {
|
|
12103
12230
|
nb: "Trinnprogresjon",
|
|
12104
12231
|
no: "Trinnprogresjon",
|
|
12105
12232
|
nn: "Trinnprogresjon",
|
|
@@ -12221,7 +12348,7 @@ const SearchSuggestions = ({ id, searchId, className, style, htmlProps, suggesti
|
|
|
12221
12348
|
marginBlock: "x0.25 0",
|
|
12222
12349
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DropdownHeader, {
|
|
12223
12350
|
id: suggestionsHeaderId,
|
|
12224
|
-
children: t(texts$
|
|
12351
|
+
children: t(texts$5.searchSuggestions)
|
|
12225
12352
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StylelessList, {
|
|
12226
12353
|
role: "listbox",
|
|
12227
12354
|
"aria-labelledby": suggestionsHeaderId,
|
|
@@ -12231,7 +12358,7 @@ const SearchSuggestions = ({ id, searchId, className, style, htmlProps, suggesti
|
|
|
12231
12358
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchSuggestionItem, {
|
|
12232
12359
|
index,
|
|
12233
12360
|
focus: focus === index && showSuggestions,
|
|
12234
|
-
"aria-label": t(texts$
|
|
12361
|
+
"aria-label": t(texts$5.search(suggestion)),
|
|
12235
12362
|
onClick: onSuggestionClick,
|
|
12236
12363
|
"aria-setsize": suggestionsToRender.length,
|
|
12237
12364
|
"aria-posinset": index,
|
|
@@ -12243,7 +12370,7 @@ const SearchSuggestions = ({ id, searchId, className, style, htmlProps, suggesti
|
|
|
12243
12370
|
});
|
|
12244
12371
|
};
|
|
12245
12372
|
SearchSuggestions.displayName = "SearchSuggestions";
|
|
12246
|
-
const texts$
|
|
12373
|
+
const texts$5 = createTexts({
|
|
12247
12374
|
search: (suggestion) => ({
|
|
12248
12375
|
no: `${suggestion} søk`,
|
|
12249
12376
|
nb: `${suggestion} søk`,
|
|
@@ -12324,11 +12451,11 @@ const Search$1 = ({ componentSize = "medium", buttonProps, showIcon = true, name
|
|
|
12324
12451
|
showSuggestions: context.showSuggestions
|
|
12325
12452
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, {
|
|
12326
12453
|
id: suggestionsDescriptionId,
|
|
12327
|
-
children: t(texts$
|
|
12454
|
+
children: t(texts$4.useArrowKeys)
|
|
12328
12455
|
})] }),
|
|
12329
12456
|
hasValue && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ClearButton, {
|
|
12330
12457
|
size: componentSize,
|
|
12331
|
-
"aria-label": t(texts$
|
|
12458
|
+
"aria-label": t(texts$4.clearSearch),
|
|
12332
12459
|
onClick: clearInput
|
|
12333
12460
|
})
|
|
12334
12461
|
]
|
|
@@ -12347,7 +12474,7 @@ const Search$1 = ({ componentSize = "medium", buttonProps, showIcon = true, name
|
|
|
12347
12474
|
size: componentSize,
|
|
12348
12475
|
onClick,
|
|
12349
12476
|
...otherButtonProps,
|
|
12350
|
-
children: buttonLabel ?? t(texts$
|
|
12477
|
+
children: buttonLabel ?? t(texts$4.search)
|
|
12351
12478
|
})]
|
|
12352
12479
|
}) : inputGroup, renderInputMessage({
|
|
12353
12480
|
tip,
|
|
@@ -12355,7 +12482,7 @@ const Search$1 = ({ componentSize = "medium", buttonProps, showIcon = true, name
|
|
|
12355
12482
|
})] })] });
|
|
12356
12483
|
};
|
|
12357
12484
|
Search$1.displayName = "Search";
|
|
12358
|
-
const texts$
|
|
12485
|
+
const texts$4 = createTexts({
|
|
12359
12486
|
clearSearch: {
|
|
12360
12487
|
nb: "Tøm søk",
|
|
12361
12488
|
no: "Tøm søk",
|
|
@@ -12518,7 +12645,7 @@ const SplitButton = ({ size, primaryAction, secondaryActions, purpose = "primary
|
|
|
12518
12645
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
12519
12646
|
...buttonStyleProps,
|
|
12520
12647
|
icon: isOpen ? ChevronUpIcon : ChevronDownIcon,
|
|
12521
|
-
"aria-label": t(texts$
|
|
12648
|
+
"aria-label": t(texts$3.moreActions),
|
|
12522
12649
|
purpose,
|
|
12523
12650
|
className: cn(SplitButton_module_default.option, purpose === "primary" && SplitButton_module_default["option--primary"]),
|
|
12524
12651
|
type: "button"
|
|
@@ -12533,7 +12660,7 @@ const SplitButton = ({ size, primaryAction, secondaryActions, purpose = "primary
|
|
|
12533
12660
|
});
|
|
12534
12661
|
};
|
|
12535
12662
|
SplitButton.displayName = "SplitButton";
|
|
12536
|
-
const texts$
|
|
12663
|
+
const texts$3 = createTexts({ moreActions: {
|
|
12537
12664
|
nb: "Flere handlinger",
|
|
12538
12665
|
no: "Flere handlinger",
|
|
12539
12666
|
nn: "Fleire handlingar",
|
|
@@ -12591,6 +12718,60 @@ const Cell = ({ children, type: _type, layout = "left", collapseKey, className,
|
|
|
12591
12718
|
};
|
|
12592
12719
|
Cell.displayName = "Table.Cell";
|
|
12593
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
|
|
12594
12775
|
//#region src/components/Table/Foot.tsx
|
|
12595
12776
|
const Foot = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tfoot", { ...props });
|
|
12596
12777
|
Foot.displayName = "Table.Foot";
|
|
@@ -12702,9 +12883,9 @@ const texts$1 = createTexts({
|
|
|
12702
12883
|
const SortCell = ({ isSorted, sortOrder, onClick, children, ...rest }) => {
|
|
12703
12884
|
const { t } = useTranslation();
|
|
12704
12885
|
const SortIcon = () => {
|
|
12705
|
-
if (!isSorted || !sortOrder) return
|
|
12706
|
-
if (sortOrder === "ascending") return
|
|
12707
|
-
return
|
|
12886
|
+
if (!isSorted || !sortOrder) return ArrowUpDownIcon;
|
|
12887
|
+
if (sortOrder === "ascending") return ArrowUpIcon;
|
|
12888
|
+
return ArrowDownIcon;
|
|
12708
12889
|
};
|
|
12709
12890
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Cell, {
|
|
12710
12891
|
type: "head",
|
|
@@ -12798,6 +12979,7 @@ Table.Head = Head;
|
|
|
12798
12979
|
Table.Body = Body;
|
|
12799
12980
|
Table.Cell = Cell;
|
|
12800
12981
|
Table.SortCell = SortCell;
|
|
12982
|
+
Table.FilterCell = FilterCell;
|
|
12801
12983
|
Table.Row = Row;
|
|
12802
12984
|
Table.Foot = Foot;
|
|
12803
12985
|
//#endregion
|
|
@@ -12869,7 +13051,7 @@ const AddTabButton = ({ ref, children, index, className, width = "1fr", ...rest
|
|
|
12869
13051
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
12870
13052
|
...rest,
|
|
12871
13053
|
ref: combinedRef,
|
|
12872
|
-
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"]),
|
|
12873
13055
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
12874
13056
|
icon: PlusIcon,
|
|
12875
13057
|
iconSize: "inherit"
|
|
@@ -13083,17 +13265,12 @@ TabPanels.displayName = "TabPanels";
|
|
|
13083
13265
|
//#region src/components/Tag/Tag.module.css
|
|
13084
13266
|
var Tag_module_default = {
|
|
13085
13267
|
"container": "dds-Tag-module__container",
|
|
13086
|
-
"container--
|
|
13087
|
-
"container--
|
|
13088
|
-
"container--
|
|
13089
|
-
"container--
|
|
13090
|
-
"container--
|
|
13091
|
-
"container--
|
|
13092
|
-
"container--danger--strong": "dds-Tag-module__container--danger--strong",
|
|
13093
|
-
"container--warning--default": "dds-Tag-module__container--warning--default",
|
|
13094
|
-
"container--warning--strong": "dds-Tag-module__container--warning--strong",
|
|
13095
|
-
"container--info--default": "dds-Tag-module__container--info--default",
|
|
13096
|
-
"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"
|
|
13097
13274
|
};
|
|
13098
13275
|
//#endregion
|
|
13099
13276
|
//#region src/components/Tag/Tag.tsx
|
|
@@ -13102,12 +13279,42 @@ const icons = {
|
|
|
13102
13279
|
danger: ErrorIcon,
|
|
13103
13280
|
warning: WarningIcon,
|
|
13104
13281
|
success: CheckCircledIcon,
|
|
13105
|
-
|
|
13106
|
-
};
|
|
13107
|
-
const Tag = ({ purpose
|
|
13108
|
-
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;
|
|
13109
13313
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(TextOverflowEllipsisWrapper, {
|
|
13110
|
-
...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),
|
|
13111
13318
|
children: [withIcon && icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
13112
13319
|
icon,
|
|
13113
13320
|
iconSize: "component"
|
|
@@ -13118,7 +13325,6 @@ Tag.displayName = "Tag";
|
|
|
13118
13325
|
//#endregion
|
|
13119
13326
|
//#region src/components/TextInput/TextInput.module.css
|
|
13120
13327
|
var TextInput_module_default = {
|
|
13121
|
-
"container": "dds-TextInput-module__container",
|
|
13122
13328
|
"container--readonly": "dds-TextInput-module__container--readonly",
|
|
13123
13329
|
"container--disabled": "dds-TextInput-module__container--disabled",
|
|
13124
13330
|
"input--extended": "dds-TextInput-module__input--extended",
|
|
@@ -13190,7 +13396,7 @@ const TextInput = ({ label, afterLabelContent, disabled, readOnly, errorMessage,
|
|
|
13190
13396
|
disabled && TextInput_module_default["affix--disabled"]
|
|
13191
13397
|
];
|
|
13192
13398
|
if (hasIcon) extendedInput = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box, {
|
|
13193
|
-
className: cn(Input_module_default["input-group"]
|
|
13399
|
+
className: cn(Input_module_default["input-group"]),
|
|
13194
13400
|
width: inputWidth,
|
|
13195
13401
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
13196
13402
|
icon,
|
|
@@ -13230,7 +13436,7 @@ const TextInput = ({ label, afterLabelContent, disabled, readOnly, errorMessage,
|
|
|
13230
13436
|
]
|
|
13231
13437
|
});
|
|
13232
13438
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
13233
|
-
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}`]),
|
|
13234
13440
|
style,
|
|
13235
13441
|
children: [
|
|
13236
13442
|
renderLabel({
|
|
@@ -13360,7 +13566,7 @@ const ToggleRadio = ({ value, name, onChange, checked, "aria-label": ariaLabel,
|
|
|
13360
13566
|
as: "span",
|
|
13361
13567
|
justifyContent: "center",
|
|
13362
13568
|
alignItems: "center",
|
|
13363
|
-
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"]),
|
|
13364
13570
|
children: [icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
13365
13571
|
icon,
|
|
13366
13572
|
iconSize: "component"
|
|
@@ -13370,62 +13576,6 @@ const ToggleRadio = ({ value, name, onChange, checked, "aria-label": ariaLabel,
|
|
|
13370
13576
|
};
|
|
13371
13577
|
ToggleRadio.displayName = "ToggleRadio";
|
|
13372
13578
|
//#endregion
|
|
13373
|
-
//#region src/components/ToggleButton/ToggleButton.module.css
|
|
13374
|
-
var ToggleButton_module_default = { "content": "dds-ToggleButton-module__content" };
|
|
13375
|
-
//#endregion
|
|
13376
|
-
//#region src/components/ToggleButton/ToggleButton.tsx
|
|
13377
|
-
const ToggleButton = ({ id, label, icon, size = "small", className, style, htmlProps, ...rest }) => {
|
|
13378
|
-
const generatedId = (0, react.useId)();
|
|
13379
|
-
const uniqueId = id ?? `${generatedId}-toggleButton`;
|
|
13380
|
-
const hasIcon = !!icon;
|
|
13381
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box, {
|
|
13382
|
-
as: "label",
|
|
13383
|
-
htmlFor: uniqueId,
|
|
13384
|
-
width: "fit-content",
|
|
13385
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(HiddenInput, {
|
|
13386
|
-
...getBaseHTMLProps(uniqueId, cn(className, focus_module_default["focusable-sibling"]), style, htmlProps, rest),
|
|
13387
|
-
type: "checkbox"
|
|
13388
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Paper, {
|
|
13389
|
-
as: "span",
|
|
13390
|
-
border: "border-default",
|
|
13391
|
-
background: "surface-default",
|
|
13392
|
-
borderRadius: "rounded",
|
|
13393
|
-
width: "fit-content",
|
|
13394
|
-
display: "inline-flex",
|
|
13395
|
-
alignItems: "center",
|
|
13396
|
-
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"]] : []),
|
|
13397
|
-
children: [hasIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
13398
|
-
icon,
|
|
13399
|
-
iconSize: "component"
|
|
13400
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label })]
|
|
13401
|
-
})]
|
|
13402
|
-
});
|
|
13403
|
-
};
|
|
13404
|
-
ToggleButton.displayName = "ToggleButton";
|
|
13405
|
-
//#endregion
|
|
13406
|
-
//#region src/components/ToggleButton/ToggleButtonGroup.tsx
|
|
13407
|
-
const ToggleButtonGroup = (props) => {
|
|
13408
|
-
const { children, direction = "row", label, labelId, id, className, style, htmlProps, ...rest } = props;
|
|
13409
|
-
const generatedId = (0, react.useId)();
|
|
13410
|
-
const uniqueLabelId = labelId ?? `${generatedId}-ToggleButtonGroupLabel`;
|
|
13411
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
13412
|
-
...getBaseHTMLProps(id, className, style, htmlProps, rest),
|
|
13413
|
-
role: "group",
|
|
13414
|
-
"aria-labelledby": label ? uniqueLabelId : void 0,
|
|
13415
|
-
children: [renderGroupLabel({
|
|
13416
|
-
label,
|
|
13417
|
-
id: uniqueLabelId
|
|
13418
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
|
|
13419
|
-
display: "flex",
|
|
13420
|
-
flexWrap: "wrap",
|
|
13421
|
-
gap: "x0.75",
|
|
13422
|
-
flexDirection: direction,
|
|
13423
|
-
children
|
|
13424
|
-
})]
|
|
13425
|
-
});
|
|
13426
|
-
};
|
|
13427
|
-
ToggleButtonGroup.displayName = "ToggleButtonGroup";
|
|
13428
|
-
//#endregion
|
|
13429
13579
|
exports.Accordion = Accordion;
|
|
13430
13580
|
exports.AccordionBody = AccordionBody;
|
|
13431
13581
|
exports.AccordionContextProvider = AccordionContextProvider;
|
|
@@ -13437,8 +13587,10 @@ exports.AnimatedChevronUpDownIcon = AnimatedChevronUpDownIcon;
|
|
|
13437
13587
|
exports.AppsIcon = AppsIcon;
|
|
13438
13588
|
exports.ArchiveIcon = ArchiveIcon;
|
|
13439
13589
|
exports.ArrowDownIcon = ArrowDownIcon;
|
|
13590
|
+
exports.ArrowDownUpIcon = ArrowDownUpIcon;
|
|
13440
13591
|
exports.ArrowLeftIcon = ArrowLeftIcon;
|
|
13441
13592
|
exports.ArrowRightIcon = ArrowRightIcon;
|
|
13593
|
+
exports.ArrowUpDownIcon = ArrowUpDownIcon;
|
|
13442
13594
|
exports.ArrowUpIcon = ArrowUpIcon;
|
|
13443
13595
|
exports.ArrowUpRightIcon = ArrowUpRightIcon;
|
|
13444
13596
|
exports.AttachmentIcon = AttachmentIcon;
|
|
@@ -13488,7 +13640,11 @@ exports.ChevronLeftIcon = ChevronLeftIcon;
|
|
|
13488
13640
|
exports.ChevronRightIcon = ChevronRightIcon;
|
|
13489
13641
|
exports.ChevronUpIcon = ChevronUpIcon;
|
|
13490
13642
|
exports.Chip = Chip;
|
|
13643
|
+
exports.ChipButton = ChipButton;
|
|
13644
|
+
exports.ChipCheckbox = ChipCheckbox;
|
|
13491
13645
|
exports.ChipGroup = ChipGroup;
|
|
13646
|
+
exports.ChipRadio = ChipRadio;
|
|
13647
|
+
exports.ChipRemovable = ChipRemovable;
|
|
13492
13648
|
exports.CircleFilledIcon = CircleFilledIcon;
|
|
13493
13649
|
exports.CircleIcon = CircleIcon;
|
|
13494
13650
|
exports.CloseCircledIcon = CloseCircledIcon;
|
|
@@ -13727,6 +13883,7 @@ exports.TabPanels = TabPanels;
|
|
|
13727
13883
|
exports.Table = Table;
|
|
13728
13884
|
exports.TableBody = Body;
|
|
13729
13885
|
exports.TableCell = Cell;
|
|
13886
|
+
exports.TableFilterCell = FilterCell;
|
|
13730
13887
|
exports.TableFoot = Foot;
|
|
13731
13888
|
exports.TableHead = Head;
|
|
13732
13889
|
exports.TableRow = Row;
|
|
@@ -13748,8 +13905,6 @@ exports.TingrettIcon = TingrettIcon;
|
|
|
13748
13905
|
exports.TipIcon = TipIcon;
|
|
13749
13906
|
exports.Toggle = Toggle;
|
|
13750
13907
|
exports.ToggleBar = ToggleBar;
|
|
13751
|
-
exports.ToggleButton = ToggleButton;
|
|
13752
|
-
exports.ToggleButtonGroup = ToggleButtonGroup;
|
|
13753
13908
|
exports.ToggleRadio = ToggleRadio;
|
|
13754
13909
|
exports.Tooltip = Tooltip;
|
|
13755
13910
|
exports.TrashIcon = TrashIcon;
|