@norges-domstoler/dds-components 16.0.0 → 16.1.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.css +146 -68
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +27 -6
- package/dist/index.d.ts +27 -6
- package/dist/index.js +1277 -1058
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +976 -762
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -413,14 +413,15 @@ var Input_default = {
|
|
|
413
413
|
input: "Input_input",
|
|
414
414
|
disabled: "Input_disabled",
|
|
415
415
|
"read-only": "Input_read-only",
|
|
416
|
-
active: "Input_active",
|
|
417
416
|
"input--stateful": "Input_input--stateful",
|
|
418
417
|
"input--hover": "Input_input--hover",
|
|
419
418
|
"input--stateful-danger": "Input_input--stateful-danger",
|
|
420
419
|
"input--medium": "Input_input--medium",
|
|
421
420
|
"input--small": "Input_input--small",
|
|
422
421
|
"input--tiny": "Input_input--tiny",
|
|
423
|
-
"input--with-affix": "Input_input--with-affix"
|
|
422
|
+
"input--with-affix": "Input_input--with-affix",
|
|
423
|
+
label: "Input_label",
|
|
424
|
+
"char-counter": "Input_char-counter"
|
|
424
425
|
};
|
|
425
426
|
|
|
426
427
|
// src/components/Typography/Caption/Caption.tsx
|
|
@@ -1044,6 +1045,7 @@ __export(icons_exports, {
|
|
|
1044
1045
|
VisibilityOffIcon: () => VisibilityOffIcon,
|
|
1045
1046
|
VisibilityOnIcon: () => VisibilityOnIcon,
|
|
1046
1047
|
WarningIcon: () => WarningIcon,
|
|
1048
|
+
WebexIcon: () => WebexIcon,
|
|
1047
1049
|
XIcon: () => XIcon,
|
|
1048
1050
|
ZoomInIcon: () => ZoomInIcon,
|
|
1049
1051
|
ZoomOutIcon: () => ZoomOutIcon
|
|
@@ -2031,68 +2033,74 @@ function WarningIcon(props) {
|
|
|
2031
2033
|
] });
|
|
2032
2034
|
}
|
|
2033
2035
|
|
|
2034
|
-
// src/components/Icon/icons/
|
|
2036
|
+
// src/components/Icon/icons/webex.tsx
|
|
2035
2037
|
import { jsx as jsx155 } from "react/jsx-runtime";
|
|
2038
|
+
function WebexIcon(props) {
|
|
2039
|
+
return /* @__PURE__ */ jsx155(SvgWrapper, { ...props, children: /* @__PURE__ */ jsx155("path", { d: "M21.78 7.37601C22.292 8.55701 21.812 10.02 20.67 10.482C18.513 11.37 17.67 9.18701 17.67 9.18701C17.434 8.63701 16.943 7.69101 16.335 7.69101C16.131 7.69101 15.832 7.69101 15.395 8.53501C15.166 8.97801 14.961 9.72001 14.779 10.375L14.689 10.695C14.316 9.10801 13.868 7.24101 13.153 5.87901C12.9577 5.49901 12.7333 5.13901 12.48 4.79901C12.957 4.23202 13.5518 3.77577 14.223 3.46201C14.8838 3.15234 15.6053 2.99416 16.335 2.99901C17.38 2.99901 19.1 3.33701 20.562 5.22601C20.7294 5.43201 20.8787 5.65001 21.01 5.88001C21.288 6.32201 21.53 6.78301 21.736 7.26301L21.779 7.37601H21.78ZM0.0200176 8.40001C-0.149982 7.10501 0.800018 5.84501 1.95302 5.75501C3.74702 5.59801 4.31302 7.14001 4.40802 7.64501L4.43002 7.78201C4.50002 8.22201 4.72002 9.62001 4.91002 10.526C4.98802 10.926 5.15402 11.539 5.26302 11.942L5.26902 11.964L5.29502 12.056C5.40568 12.4567 5.52635 12.8543 5.65702 13.249C5.84235 13.797 6.05602 14.3337 6.29802 14.859C6.76802 15.814 7.22802 16.309 7.66502 16.309C7.86802 16.309 8.17702 16.309 8.62502 15.431C8.90802 14.841 9.13702 14.223 9.30902 13.586C9.68202 15.184 10.12 16.714 10.804 18.042C11.0094 18.4487 11.2477 18.8353 11.519 19.202C11.0424 19.7692 10.448 20.2258 9.77702 20.54C9.11612 20.849 8.39456 21.0065 7.66502 21.001C6.11702 21.001 3.93802 20.303 2.32602 16.996C1.90236 16.0805 1.54218 15.1369 1.24802 14.172C0.972135 13.299 0.740836 12.4125 0.555018 11.516C0.479054 11.1455 0.407383 10.7742 0.340018 10.402C0.212232 9.73822 0.105512 9.07055 0.0200176 8.40001ZM22.067 5.75501L21.865 5.73301H21.813C22.035 6.12501 22.234 6.53001 22.41 6.94801L22.463 7.06101C22.7839 7.82146 22.8082 8.67455 22.531 9.45201C22.2637 10.2164 21.7061 10.8447 20.979 11.201C20.5951 11.3832 20.1759 11.4788 19.751 11.481C19.4614 11.4761 19.174 11.4307 18.897 11.346C18.598 12.528 18.129 13.98 17.702 14.857C17.275 15.734 16.772 16.308 16.324 16.308C16.132 16.308 15.823 16.308 15.374 15.431C15.0917 14.8376 14.8631 14.2202 14.691 13.586C14.5481 13.0638 14.4161 12.5387 14.295 12.011C14.245 11.8128 14.1996 11.6134 14.159 11.413L14.157 11.403C13.751 9.62501 13.292 7.75801 12.502 6.26101C12.2274 5.74058 11.8982 5.25082 11.52 4.80001C11.0419 4.23136 10.4453 3.77403 9.77202 3.46001C9.10921 3.1505 8.3855 2.99332 7.65402 3.00001C6.61802 3.00001 4.90002 3.33801 3.43702 5.22801C3.90302 5.45101 4.30402 5.79001 4.60102 6.21201C4.90602 6.64501 5.10002 7.14501 5.16602 7.67001C5.24202 8.23301 5.42202 9.32401 5.63602 10.358L5.63702 10.365C5.65802 10.475 5.67902 10.586 5.71002 10.707C5.83602 10.367 5.96002 10.065 6.09002 9.75201L6.20202 9.48101L6.33002 9.18801C6.56502 8.63801 7.05602 7.69201 7.65402 7.69201C7.86702 7.69201 8.16702 7.69201 8.60402 8.53601C8.90002 9.14201 9.13602 9.77501 9.31002 10.426C9.44802 10.933 9.58602 11.473 9.70402 12.013C9.74402 12.161 9.77402 12.309 9.80502 12.457L9.81102 12.485C10.238 14.364 10.686 16.175 11.455 17.672C11.6137 17.99 11.7954 18.2937 12 18.583C12.15 18.7983 12.31 19.005 12.48 19.203C13.75 20.653 15.213 21.003 16.323 21.003C17.871 21.003 20.061 20.305 21.673 16.997C22.495 15.297 23.188 12.789 23.445 11.517C23.701 10.247 23.894 9.09801 23.979 8.40201C24.0636 7.78698 23.9086 7.16296 23.546 6.65901C23.37 6.41602 23.1482 6.20982 22.893 6.05201C22.6416 5.89628 22.3601 5.79441 22.067 5.75501Z" }) });
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
// src/components/Icon/icons/x.tsx
|
|
2043
|
+
import { jsx as jsx156 } from "react/jsx-runtime";
|
|
2036
2044
|
function XIcon(props) {
|
|
2037
|
-
return /* @__PURE__ */
|
|
2045
|
+
return /* @__PURE__ */ jsx156(SvgWrapper, { ...props, children: /* @__PURE__ */ jsx156("path", { d: "M17.7508 3H20.8175L14.1175 10.6583L22 21.0775H15.8283L10.995 14.7575L5.46333 21.0775H2.395L9.56167 12.8858L2 3.00083H8.32833L12.6975 8.7775L17.7508 3ZM16.675 19.2425H18.3742L7.405 4.73917H5.58167L16.675 19.2425Z" }) });
|
|
2038
2046
|
}
|
|
2039
2047
|
|
|
2040
2048
|
// src/components/Icon/icons/zoomIn.tsx
|
|
2041
|
-
import { jsx as
|
|
2049
|
+
import { jsx as jsx157 } from "react/jsx-runtime";
|
|
2042
2050
|
function ZoomInIcon(props) {
|
|
2043
|
-
return /* @__PURE__ */
|
|
2051
|
+
return /* @__PURE__ */ jsx157(SvgWrapper, { ...props, children: /* @__PURE__ */ jsx157("path", { d: "M15.5 14h-.79l-.28-.27A6.47 6.47 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zm.5-7H9v2H7v1h2v2h1v-2h2V9h-2V7z" }) });
|
|
2044
2052
|
}
|
|
2045
2053
|
|
|
2046
2054
|
// src/components/Icon/icons/zoomOut.tsx
|
|
2047
|
-
import { jsx as
|
|
2055
|
+
import { jsx as jsx158 } from "react/jsx-runtime";
|
|
2048
2056
|
function ZoomOutIcon(props) {
|
|
2049
|
-
return /* @__PURE__ */
|
|
2057
|
+
return /* @__PURE__ */ jsx158(SvgWrapper, { ...props, children: /* @__PURE__ */ jsx158("path", { d: "M15.5 14h-.79l-.28-.27A6.47 6.47 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7V9z" }) });
|
|
2050
2058
|
}
|
|
2051
2059
|
|
|
2052
2060
|
// src/components/Icon/icons/barChart.tsx
|
|
2053
|
-
import { jsx as
|
|
2061
|
+
import { jsx as jsx159 } from "react/jsx-runtime";
|
|
2054
2062
|
function BarChartIcon(props) {
|
|
2055
|
-
return /* @__PURE__ */
|
|
2063
|
+
return /* @__PURE__ */ jsx159(SvgWrapper, { ...props, children: /* @__PURE__ */ jsx159("path", { d: "M10 20h4V4h-4v16zm-6 0h4v-8H4v8zM16 9v11h4V9h-4z" }) });
|
|
2056
2064
|
}
|
|
2057
2065
|
|
|
2058
2066
|
// src/components/Icon/icons/barChartBoxed.tsx
|
|
2059
|
-
import { jsx as
|
|
2067
|
+
import { jsx as jsx160 } from "react/jsx-runtime";
|
|
2060
2068
|
function BarChartBoxedIcon(props) {
|
|
2061
|
-
return /* @__PURE__ */
|
|
2069
|
+
return /* @__PURE__ */ jsx160(SvgWrapper, { ...props, children: /* @__PURE__ */ jsx160("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM7 10h2v7H7v-7zm4-3h2v10h-2V7zm4 6h2v4h-2v-4z" }) });
|
|
2062
2070
|
}
|
|
2063
2071
|
|
|
2064
2072
|
// src/components/Icon/icons/lineChart.tsx
|
|
2065
|
-
import { jsx as
|
|
2073
|
+
import { jsx as jsx161 } from "react/jsx-runtime";
|
|
2066
2074
|
function LineChartIcon(props) {
|
|
2067
|
-
return /* @__PURE__ */
|
|
2075
|
+
return /* @__PURE__ */ jsx161(SvgWrapper, { ...props, children: /* @__PURE__ */ jsx161("path", { d: "M3.5 18.49l6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99l1.5 1.5z" }) });
|
|
2068
2076
|
}
|
|
2069
2077
|
|
|
2070
2078
|
// src/components/Icon/icons/trendingUp.tsx
|
|
2071
|
-
import { jsx as
|
|
2079
|
+
import { jsx as jsx162 } from "react/jsx-runtime";
|
|
2072
2080
|
function TrendingUpIcon(props) {
|
|
2073
|
-
return /* @__PURE__ */
|
|
2081
|
+
return /* @__PURE__ */ jsx162(SvgWrapper, { ...props, children: /* @__PURE__ */ jsx162("path", { d: "M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6h-6z" }) });
|
|
2074
2082
|
}
|
|
2075
2083
|
|
|
2076
2084
|
// src/components/Icon/icons/trendingDown.tsx
|
|
2077
|
-
import { jsx as
|
|
2085
|
+
import { jsx as jsx163 } from "react/jsx-runtime";
|
|
2078
2086
|
function TrendingDownIcon(props) {
|
|
2079
|
-
return /* @__PURE__ */
|
|
2087
|
+
return /* @__PURE__ */ jsx163(SvgWrapper, { ...props, children: /* @__PURE__ */ jsx163("path", { d: "M16 18l2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6h-6z" }) });
|
|
2080
2088
|
}
|
|
2081
2089
|
|
|
2082
2090
|
// src/components/Icon/icons/libraryAdd.tsx
|
|
2083
|
-
import { jsx as
|
|
2091
|
+
import { jsx as jsx164 } from "react/jsx-runtime";
|
|
2084
2092
|
function LibraryAddIcon(props) {
|
|
2085
|
-
return /* @__PURE__ */
|
|
2093
|
+
return /* @__PURE__ */ jsx164(SvgWrapper, { ...props, children: /* @__PURE__ */ jsx164("path", { d: "M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H8V4h12v12zm-7-2h2v-3h3V9h-3V6h-2v3h-3v2h3v3z" }) });
|
|
2086
2094
|
}
|
|
2087
2095
|
|
|
2088
2096
|
// src/components/Icon/icons/helpSimple.tsx
|
|
2089
|
-
import { jsx as
|
|
2097
|
+
import { jsx as jsx165 } from "react/jsx-runtime";
|
|
2090
2098
|
function HelpSimpleIcon(props) {
|
|
2091
|
-
return /* @__PURE__ */
|
|
2099
|
+
return /* @__PURE__ */ jsx165(SvgWrapper, { ...props, children: /* @__PURE__ */ jsx165("path", { d: "M13.25 21H10.75V18.5714H13.25V21ZM15.8375 11.5893L14.7125 12.7064C13.8125 13.5929 13.25 14.3214 13.25 16.1429H10.75V15.5357C10.75 14.2 11.3125 12.9857 12.2125 12.0993L13.7625 10.5693C14.225 10.1321 14.5 9.525 14.5 8.85714C14.5 7.52143 13.375 6.42857 12 6.42857C10.625 6.42857 9.5 7.52143 9.5 8.85714H7C7 6.17357 9.2375 4 12 4C14.7625 4 17 6.17357 17 8.85714C17 9.92571 16.55 10.8971 15.8375 11.5893Z" }) });
|
|
2092
2100
|
}
|
|
2093
2101
|
|
|
2094
2102
|
// src/components/Typography/Typography/Typography.tsx
|
|
2095
|
-
import { jsx as
|
|
2103
|
+
import { jsx as jsx166, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2096
2104
|
var isAnchorProps = (props) => props.typographyType === "a";
|
|
2097
2105
|
var Typography = forwardRef3(
|
|
2098
2106
|
(props, ref) => {
|
|
@@ -2158,7 +2166,7 @@ var Typography = forwardRef3(
|
|
|
2158
2166
|
rel: relProp,
|
|
2159
2167
|
children: [
|
|
2160
2168
|
children,
|
|
2161
|
-
externalLinkProp && /* @__PURE__ */
|
|
2169
|
+
externalLinkProp && /* @__PURE__ */ jsx166(Icon, { icon: OpenExternalIcon, iconSize: "inherit" })
|
|
2162
2170
|
]
|
|
2163
2171
|
}
|
|
2164
2172
|
);
|
|
@@ -2167,11 +2175,11 @@ var Typography = forwardRef3(
|
|
|
2167
2175
|
Typography.displayName = "Typography";
|
|
2168
2176
|
|
|
2169
2177
|
// src/components/Typography/Caption/Caption.tsx
|
|
2170
|
-
import { jsx as
|
|
2178
|
+
import { jsx as jsx167 } from "react/jsx-runtime";
|
|
2171
2179
|
var Caption = forwardRef4(
|
|
2172
2180
|
(props, ref) => {
|
|
2173
2181
|
const { id, className, htmlProps, children, ...rest } = props;
|
|
2174
|
-
return /* @__PURE__ */
|
|
2182
|
+
return /* @__PURE__ */ jsx167(
|
|
2175
2183
|
Typography,
|
|
2176
2184
|
{
|
|
2177
2185
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
@@ -2519,7 +2527,7 @@ var useScreenSize = function() {
|
|
|
2519
2527
|
};
|
|
2520
2528
|
|
|
2521
2529
|
// src/components/Typography/Heading/Heading.tsx
|
|
2522
|
-
import { jsx as
|
|
2530
|
+
import { jsx as jsx168 } from "react/jsx-runtime";
|
|
2523
2531
|
var getHeadingElement = (level) => `h${level}`;
|
|
2524
2532
|
var getDefaultTypographyType = (h) => {
|
|
2525
2533
|
switch (h) {
|
|
@@ -2576,14 +2584,14 @@ var Heading = forwardRef5(
|
|
|
2576
2584
|
as: headingElement,
|
|
2577
2585
|
ref
|
|
2578
2586
|
};
|
|
2579
|
-
return /* @__PURE__ */
|
|
2587
|
+
return /* @__PURE__ */ jsx168(Typography, { ...headingProps, children });
|
|
2580
2588
|
}
|
|
2581
2589
|
);
|
|
2582
2590
|
Heading.displayName = "Heading";
|
|
2583
2591
|
|
|
2584
2592
|
// src/components/Typography/Label/Label.tsx
|
|
2585
2593
|
import { forwardRef as forwardRef6 } from "react";
|
|
2586
|
-
import { jsx as
|
|
2594
|
+
import { jsx as jsx169, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2587
2595
|
var Label = forwardRef6((props, ref) => {
|
|
2588
2596
|
const { showRequiredStyling, id, className, htmlProps, children, ...rest } = props;
|
|
2589
2597
|
return /* @__PURE__ */ jsxs18(
|
|
@@ -2594,7 +2602,7 @@ var Label = forwardRef6((props, ref) => {
|
|
|
2594
2602
|
typographyType: "supportingStyleLabel01",
|
|
2595
2603
|
children: [
|
|
2596
2604
|
children,
|
|
2597
|
-
showRequiredStyling && /* @__PURE__ */
|
|
2605
|
+
showRequiredStyling && /* @__PURE__ */ jsx169(RequiredMarker, {})
|
|
2598
2606
|
]
|
|
2599
2607
|
}
|
|
2600
2608
|
);
|
|
@@ -2603,11 +2611,11 @@ Label.displayName = "Label";
|
|
|
2603
2611
|
|
|
2604
2612
|
// src/components/Typography/Legend/Legend.tsx
|
|
2605
2613
|
import { forwardRef as forwardRef7 } from "react";
|
|
2606
|
-
import { jsx as
|
|
2614
|
+
import { jsx as jsx170 } from "react/jsx-runtime";
|
|
2607
2615
|
var Legend = forwardRef7(
|
|
2608
2616
|
(props, ref) => {
|
|
2609
2617
|
const { id, className, htmlProps, children, ...rest } = props;
|
|
2610
|
-
return /* @__PURE__ */
|
|
2618
|
+
return /* @__PURE__ */ jsx170(
|
|
2611
2619
|
Typography,
|
|
2612
2620
|
{
|
|
2613
2621
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
@@ -2623,7 +2631,7 @@ Legend.displayName = "Legend";
|
|
|
2623
2631
|
|
|
2624
2632
|
// src/components/Typography/Link/Link.tsx
|
|
2625
2633
|
import { forwardRef as forwardRef8 } from "react";
|
|
2626
|
-
import { jsx as
|
|
2634
|
+
import { jsx as jsx171, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2627
2635
|
var Link = forwardRef8((props, ref) => {
|
|
2628
2636
|
const {
|
|
2629
2637
|
id,
|
|
@@ -2660,7 +2668,7 @@ var Link = forwardRef8((props, ref) => {
|
|
|
2660
2668
|
target: external ? "_blank" : target,
|
|
2661
2669
|
children: [
|
|
2662
2670
|
children,
|
|
2663
|
-
external && /* @__PURE__ */
|
|
2671
|
+
external && /* @__PURE__ */ jsx171(Icon, { iconSize: "inherit", icon: OpenExternalIcon })
|
|
2664
2672
|
]
|
|
2665
2673
|
}
|
|
2666
2674
|
);
|
|
@@ -2669,7 +2677,7 @@ Link.displayName = "Link";
|
|
|
2669
2677
|
|
|
2670
2678
|
// src/components/Typography/Paragraph/Paragraph.tsx
|
|
2671
2679
|
import { forwardRef as forwardRef9 } from "react";
|
|
2672
|
-
import { jsx as
|
|
2680
|
+
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
2673
2681
|
var Paragraph = forwardRef9(
|
|
2674
2682
|
(props, ref) => {
|
|
2675
2683
|
const {
|
|
@@ -2680,7 +2688,7 @@ var Paragraph = forwardRef9(
|
|
|
2680
2688
|
typographyType = "bodySans02",
|
|
2681
2689
|
...rest
|
|
2682
2690
|
} = props;
|
|
2683
|
-
return /* @__PURE__ */
|
|
2691
|
+
return /* @__PURE__ */ jsx172(
|
|
2684
2692
|
Typography,
|
|
2685
2693
|
{
|
|
2686
2694
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
@@ -2694,7 +2702,7 @@ var Paragraph = forwardRef9(
|
|
|
2694
2702
|
Paragraph.displayName = "Paragraph";
|
|
2695
2703
|
|
|
2696
2704
|
// src/components/helpers/Input/Input.tsx
|
|
2697
|
-
import { jsx as
|
|
2705
|
+
import { jsx as jsx173 } from "react/jsx-runtime";
|
|
2698
2706
|
var inputTypographyTypes = {
|
|
2699
2707
|
medium: "bodySans02",
|
|
2700
2708
|
small: "bodySans01",
|
|
@@ -2702,7 +2710,7 @@ var inputTypographyTypes = {
|
|
|
2702
2710
|
};
|
|
2703
2711
|
var Input = forwardRef10((props, ref) => {
|
|
2704
2712
|
const { className, ...rest } = props;
|
|
2705
|
-
return /* @__PURE__ */
|
|
2713
|
+
return /* @__PURE__ */ jsx173(
|
|
2706
2714
|
"input",
|
|
2707
2715
|
{
|
|
2708
2716
|
ref,
|
|
@@ -2720,7 +2728,7 @@ var StatefulInput = forwardRef10(
|
|
|
2720
2728
|
hasErrorMessage,
|
|
2721
2729
|
...rest
|
|
2722
2730
|
} = props;
|
|
2723
|
-
return /* @__PURE__ */
|
|
2731
|
+
return /* @__PURE__ */ jsx173(
|
|
2724
2732
|
Input,
|
|
2725
2733
|
{
|
|
2726
2734
|
ref,
|
|
@@ -2738,6 +2746,38 @@ var StatefulInput = forwardRef10(
|
|
|
2738
2746
|
);
|
|
2739
2747
|
StatefulInput.displayName = "StatefulInput";
|
|
2740
2748
|
|
|
2749
|
+
// src/components/helpers/Input/CharCounter.tsx
|
|
2750
|
+
import { useId } from "react";
|
|
2751
|
+
import { jsx as jsx174, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2752
|
+
function CharCounter(props) {
|
|
2753
|
+
const { current, max, id, className, htmlProps, ...rest } = props;
|
|
2754
|
+
const generatedId = useId();
|
|
2755
|
+
const uniqueId = id != null ? id : `${generatedId}-characterCounter`;
|
|
2756
|
+
return /* @__PURE__ */ jsxs20(
|
|
2757
|
+
Typography,
|
|
2758
|
+
{
|
|
2759
|
+
...getBaseHTMLProps(
|
|
2760
|
+
uniqueId,
|
|
2761
|
+
cn(className, Input_default["char-counter"]),
|
|
2762
|
+
htmlProps,
|
|
2763
|
+
rest
|
|
2764
|
+
),
|
|
2765
|
+
as: "div",
|
|
2766
|
+
typographyType: "supportingStyleHelperText01",
|
|
2767
|
+
"aria-label": `${current} av ${max} tegn skrevet`,
|
|
2768
|
+
children: [
|
|
2769
|
+
current,
|
|
2770
|
+
"/",
|
|
2771
|
+
max
|
|
2772
|
+
]
|
|
2773
|
+
}
|
|
2774
|
+
);
|
|
2775
|
+
}
|
|
2776
|
+
var renderCharCounter = (id, isShown, textLength, maxLength) => {
|
|
2777
|
+
if (!!maxLength && Number.isInteger(maxLength) && maxLength > 0 && isShown)
|
|
2778
|
+
return /* @__PURE__ */ jsx174(CharCounter, { id, max: maxLength, current: textLength });
|
|
2779
|
+
};
|
|
2780
|
+
|
|
2741
2781
|
// src/components/helpers/Input/Input.utils.tsx
|
|
2742
2782
|
function getDefaultText(value, defaultValue) {
|
|
2743
2783
|
if (typeof value === "string") {
|
|
@@ -2765,11 +2805,11 @@ var Paper_default = {
|
|
|
2765
2805
|
};
|
|
2766
2806
|
|
|
2767
2807
|
// src/components/helpers/Paper/Paper.tsx
|
|
2768
|
-
import { jsx as
|
|
2808
|
+
import { jsx as jsx175 } from "react/jsx-runtime";
|
|
2769
2809
|
var Paper = forwardRef11((props, ref) => {
|
|
2770
2810
|
const { elevation, border, className, ...rest } = props;
|
|
2771
2811
|
const borderCn = border === "default" || border === "subtle" ? border : "on-inverse";
|
|
2772
|
-
return /* @__PURE__ */
|
|
2812
|
+
return /* @__PURE__ */ jsx175(
|
|
2773
2813
|
"div",
|
|
2774
2814
|
{
|
|
2775
2815
|
ref,
|
|
@@ -4190,10 +4230,10 @@ var BackLink_default = {
|
|
|
4190
4230
|
};
|
|
4191
4231
|
|
|
4192
4232
|
// src/components/BackLink/BackLink.tsx
|
|
4193
|
-
import { jsx as
|
|
4233
|
+
import { jsx as jsx176, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4194
4234
|
var BackLink = forwardRef12((props, ref) => {
|
|
4195
|
-
return /* @__PURE__ */
|
|
4196
|
-
/* @__PURE__ */
|
|
4235
|
+
return /* @__PURE__ */ jsx176("nav", { ref, "aria-label": "g\xE5 tilbake", children: /* @__PURE__ */ jsxs21(Link, { href: props.href, className: BackLink_default.link, children: [
|
|
4236
|
+
/* @__PURE__ */ jsx176(Icon, { icon: ArrowLeftIcon, iconSize: "small" }),
|
|
4197
4237
|
props.label
|
|
4198
4238
|
] }) });
|
|
4199
4239
|
});
|
|
@@ -4203,7 +4243,7 @@ BackLink.displayName = "BackLink";
|
|
|
4203
4243
|
import {
|
|
4204
4244
|
forwardRef as forwardRef13
|
|
4205
4245
|
} from "react";
|
|
4206
|
-
import { jsx as
|
|
4246
|
+
import { jsx as jsx177 } from "react/jsx-runtime";
|
|
4207
4247
|
var isAnchorTypographyProps = (props) => {
|
|
4208
4248
|
return props.href != void 0;
|
|
4209
4249
|
};
|
|
@@ -4211,9 +4251,9 @@ var Breadcrumb = forwardRef13(
|
|
|
4211
4251
|
(props, ref) => {
|
|
4212
4252
|
const { children, ...rest } = props;
|
|
4213
4253
|
if (isAnchorTypographyProps(props)) {
|
|
4214
|
-
return /* @__PURE__ */
|
|
4254
|
+
return /* @__PURE__ */ jsx177(Typography, { htmlProps: rest, ref, typographyType: "a", children });
|
|
4215
4255
|
}
|
|
4216
|
-
return /* @__PURE__ */
|
|
4256
|
+
return /* @__PURE__ */ jsx177(Typography, { htmlProps: rest, ref, as: "span", children });
|
|
4217
4257
|
}
|
|
4218
4258
|
);
|
|
4219
4259
|
Breadcrumb.displayName = "Breadcrumb";
|
|
@@ -4305,7 +4345,7 @@ var buttonTokens = {
|
|
|
4305
4345
|
|
|
4306
4346
|
// src/components/Spinner/Spinner.tsx
|
|
4307
4347
|
import { ddsTokens as ddsTokens11 } from "@norges-domstoler/dds-design-tokens";
|
|
4308
|
-
import { useId, useRef as useRef4 } from "react";
|
|
4348
|
+
import { useId as useId2, useRef as useRef4 } from "react";
|
|
4309
4349
|
|
|
4310
4350
|
// src/components/Spinner/Spinner.module.css
|
|
4311
4351
|
var Spinner_default = {
|
|
@@ -4316,7 +4356,7 @@ var Spinner_default = {
|
|
|
4316
4356
|
};
|
|
4317
4357
|
|
|
4318
4358
|
// src/components/Spinner/Spinner.tsx
|
|
4319
|
-
import { jsx as
|
|
4359
|
+
import { jsx as jsx178, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4320
4360
|
function Spinner(props) {
|
|
4321
4361
|
const {
|
|
4322
4362
|
size: size2 = ddsTokens11.DdsIconSizeMedium,
|
|
@@ -4330,9 +4370,9 @@ function Spinner(props) {
|
|
|
4330
4370
|
const mountTime = useRef4(Date.now());
|
|
4331
4371
|
const outerAnimationDelay = -(mountTime.current % 2e3);
|
|
4332
4372
|
const innerAnimationDelay = -(mountTime.current % 1500);
|
|
4333
|
-
const generatedId =
|
|
4373
|
+
const generatedId = useId2();
|
|
4334
4374
|
const uniqueId = `${generatedId}-spinnerTitle`;
|
|
4335
|
-
return /* @__PURE__ */
|
|
4375
|
+
return /* @__PURE__ */ jsxs22(
|
|
4336
4376
|
"svg",
|
|
4337
4377
|
{
|
|
4338
4378
|
viewBox: "0 0 50 50",
|
|
@@ -4346,8 +4386,8 @@ function Spinner(props) {
|
|
|
4346
4386
|
animationDelay: outerAnimationDelay + "ms"
|
|
4347
4387
|
},
|
|
4348
4388
|
children: [
|
|
4349
|
-
/* @__PURE__ */
|
|
4350
|
-
/* @__PURE__ */
|
|
4389
|
+
/* @__PURE__ */ jsx178("title", { id: uniqueId, children: tooltip }),
|
|
4390
|
+
/* @__PURE__ */ jsx178(
|
|
4351
4391
|
"circle",
|
|
4352
4392
|
{
|
|
4353
4393
|
className: cn(Spinner_default.circle),
|
|
@@ -4369,7 +4409,7 @@ function Spinner(props) {
|
|
|
4369
4409
|
Spinner.displayName = "Spinner";
|
|
4370
4410
|
|
|
4371
4411
|
// src/components/Button/Button.tsx
|
|
4372
|
-
import { Fragment, jsx as
|
|
4412
|
+
import { Fragment, jsx as jsx179, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4373
4413
|
var typographyTypes = {
|
|
4374
4414
|
large: "bodySans04",
|
|
4375
4415
|
medium: "bodySans02",
|
|
@@ -4418,7 +4458,7 @@ var Button = forwardRef14(
|
|
|
4418
4458
|
typographyStyles_default[getTypographyCn(typographyTypes[size2])],
|
|
4419
4459
|
focusable
|
|
4420
4460
|
);
|
|
4421
|
-
const iconElement = hasIcon && /* @__PURE__ */
|
|
4461
|
+
const iconElement = hasIcon && /* @__PURE__ */ jsx179(
|
|
4422
4462
|
Icon,
|
|
4423
4463
|
{
|
|
4424
4464
|
icon: icon2,
|
|
@@ -4426,18 +4466,18 @@ var Button = forwardRef14(
|
|
|
4426
4466
|
className: cn(Button_default.icon, loading && invisible)
|
|
4427
4467
|
}
|
|
4428
4468
|
);
|
|
4429
|
-
const content = /* @__PURE__ */
|
|
4430
|
-
hasLabel && /* @__PURE__ */
|
|
4469
|
+
const content = /* @__PURE__ */ jsxs23(Fragment, { children: [
|
|
4470
|
+
hasLabel && /* @__PURE__ */ jsxs23(Fragment, { children: [
|
|
4431
4471
|
iconPosition === "left" && iconElement,
|
|
4432
|
-
/* @__PURE__ */
|
|
4472
|
+
/* @__PURE__ */ jsx179("span", { "aria-hidden": loading, className: cn(loading && invisible), children }),
|
|
4433
4473
|
iconPosition === "right" && iconElement
|
|
4434
4474
|
] }),
|
|
4435
4475
|
isIconButton && iconElement,
|
|
4436
|
-
loading && /* @__PURE__ */
|
|
4476
|
+
loading && /* @__PURE__ */ jsx179(
|
|
4437
4477
|
"span",
|
|
4438
4478
|
{
|
|
4439
4479
|
className: cn(!noContent && Button_default["spinner-wrapper--absolute"]),
|
|
4440
|
-
children: /* @__PURE__ */
|
|
4480
|
+
children: /* @__PURE__ */ jsx179(
|
|
4441
4481
|
Spinner,
|
|
4442
4482
|
{
|
|
4443
4483
|
size: button2[size2].spinner.size,
|
|
@@ -4450,7 +4490,7 @@ var Button = forwardRef14(
|
|
|
4450
4490
|
)
|
|
4451
4491
|
] });
|
|
4452
4492
|
if (!href)
|
|
4453
|
-
return /* @__PURE__ */
|
|
4493
|
+
return /* @__PURE__ */ jsx179(
|
|
4454
4494
|
"button",
|
|
4455
4495
|
{
|
|
4456
4496
|
ref,
|
|
@@ -4463,7 +4503,7 @@ var Button = forwardRef14(
|
|
|
4463
4503
|
}
|
|
4464
4504
|
);
|
|
4465
4505
|
else if (href)
|
|
4466
|
-
return /* @__PURE__ */
|
|
4506
|
+
return /* @__PURE__ */ jsx179(
|
|
4467
4507
|
"a",
|
|
4468
4508
|
{
|
|
4469
4509
|
ref,
|
|
@@ -4492,7 +4532,7 @@ Button.displayName = "Button";
|
|
|
4492
4532
|
|
|
4493
4533
|
// src/components/OverflowMenu/OverflowMenu.tsx
|
|
4494
4534
|
import { ddsTokens as ddsTokens12 } from "@norges-domstoler/dds-design-tokens";
|
|
4495
|
-
import { forwardRef as forwardRef17, useEffect as useEffect10, useId as
|
|
4535
|
+
import { forwardRef as forwardRef17, useEffect as useEffect10, useId as useId3 } from "react";
|
|
4496
4536
|
|
|
4497
4537
|
// src/components/OverflowMenu/OverflowMenu.module.css
|
|
4498
4538
|
var OverflowMenu_default = {
|
|
@@ -4510,7 +4550,7 @@ import {
|
|
|
4510
4550
|
useEffect as useEffect9,
|
|
4511
4551
|
useRef as useRef5
|
|
4512
4552
|
} from "react";
|
|
4513
|
-
import { jsx as
|
|
4553
|
+
import { jsx as jsx180, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4514
4554
|
var isAnchorProps2 = (props) => props.href !== void 0;
|
|
4515
4555
|
var isButtonProps = (props) => props.href === void 0 && props.onClick !== void 0;
|
|
4516
4556
|
var OverflowMenuItem = forwardRef15((props, ref) => {
|
|
@@ -4535,7 +4575,7 @@ var OverflowMenuItem = forwardRef15((props, ref) => {
|
|
|
4535
4575
|
role: "menuitem",
|
|
4536
4576
|
tabIndex: focus ? 0 : -1
|
|
4537
4577
|
};
|
|
4538
|
-
const iconElement = icon2 && /* @__PURE__ */
|
|
4578
|
+
const iconElement = icon2 && /* @__PURE__ */ jsx180(Icon, { iconSize: "inherit", icon: icon2 });
|
|
4539
4579
|
const wrapperCn = [
|
|
4540
4580
|
className,
|
|
4541
4581
|
OverflowMenu_default.list__item,
|
|
@@ -4548,7 +4588,7 @@ var OverflowMenuItem = forwardRef15((props, ref) => {
|
|
|
4548
4588
|
utilStyles_default["normalize-button"]
|
|
4549
4589
|
];
|
|
4550
4590
|
if (!href && !onClick) {
|
|
4551
|
-
return /* @__PURE__ */
|
|
4591
|
+
return /* @__PURE__ */ jsxs24(
|
|
4552
4592
|
"span",
|
|
4553
4593
|
{
|
|
4554
4594
|
...{ ...getBaseHTMLProps(id, cn(...wrapperCn), htmlProps, rest), ref },
|
|
@@ -4560,7 +4600,7 @@ var OverflowMenuItem = forwardRef15((props, ref) => {
|
|
|
4560
4600
|
);
|
|
4561
4601
|
}
|
|
4562
4602
|
if (!href) {
|
|
4563
|
-
return /* @__PURE__ */
|
|
4603
|
+
return /* @__PURE__ */ jsxs24(
|
|
4564
4604
|
"button",
|
|
4565
4605
|
{
|
|
4566
4606
|
...getBaseHTMLProps(id, cn(...interactiveWrapperCn), htmlProps, rest),
|
|
@@ -4573,7 +4613,7 @@ var OverflowMenuItem = forwardRef15((props, ref) => {
|
|
|
4573
4613
|
}
|
|
4574
4614
|
);
|
|
4575
4615
|
}
|
|
4576
|
-
return /* @__PURE__ */
|
|
4616
|
+
return /* @__PURE__ */ jsxs24(
|
|
4577
4617
|
"a",
|
|
4578
4618
|
{
|
|
4579
4619
|
...getBaseHTMLProps(id, cn(...interactiveWrapperCn), htmlProps, rest),
|
|
@@ -4600,7 +4640,7 @@ var Divider_default = {
|
|
|
4600
4640
|
};
|
|
4601
4641
|
|
|
4602
4642
|
// src/components/Divider/Divider.tsx
|
|
4603
|
-
import { jsx as
|
|
4643
|
+
import { jsx as jsx181 } from "react/jsx-runtime";
|
|
4604
4644
|
var Divider = forwardRef16((props, ref) => {
|
|
4605
4645
|
const { color = "default", id, className, htmlProps, ...rest } = props;
|
|
4606
4646
|
const colorCn = color === "default" || color === "subtle" ? color : "on-inverse";
|
|
@@ -4613,12 +4653,12 @@ var Divider = forwardRef16((props, ref) => {
|
|
|
4613
4653
|
),
|
|
4614
4654
|
color
|
|
4615
4655
|
};
|
|
4616
|
-
return /* @__PURE__ */
|
|
4656
|
+
return /* @__PURE__ */ jsx181("hr", { ref, ...lineProps });
|
|
4617
4657
|
});
|
|
4618
4658
|
Divider.displayName = "Divider";
|
|
4619
4659
|
|
|
4620
4660
|
// src/components/OverflowMenu/OverflowMenu.tsx
|
|
4621
|
-
import { Fragment as Fragment2, jsx as
|
|
4661
|
+
import { Fragment as Fragment2, jsx as jsx182, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4622
4662
|
var OverflowMenu = forwardRef17(
|
|
4623
4663
|
(props, ref) => {
|
|
4624
4664
|
var _a, _b;
|
|
@@ -4679,7 +4719,7 @@ var OverflowMenu = forwardRef17(
|
|
|
4679
4719
|
hasContextItems && interactiveItems.push(...items);
|
|
4680
4720
|
const hasInteractiveItems = interactiveItems.length > 0;
|
|
4681
4721
|
const [focus] = useRoveFocus(interactiveItems == null ? void 0 : interactiveItems.length, isOpen);
|
|
4682
|
-
const interactiveItemsList = hasInteractiveItems ? interactiveItems.map((item, index) => /* @__PURE__ */
|
|
4722
|
+
const interactiveItemsList = hasInteractiveItems ? interactiveItems.map((item, index) => /* @__PURE__ */ jsx182("li", { children: /* @__PURE__ */ jsx182(
|
|
4683
4723
|
OverflowMenuItem,
|
|
4684
4724
|
{
|
|
4685
4725
|
index,
|
|
@@ -4700,14 +4740,14 @@ var OverflowMenu = forwardRef17(
|
|
|
4700
4740
|
const navItemsFirstPos = hasNavItems ? userPropsPos + 1 : -1;
|
|
4701
4741
|
const navItemsLastPos = hasNavItems ? userPropsPos + navItems.length : -1;
|
|
4702
4742
|
const contextItemsFirstPos = !hasContextItems ? -1 : hasNavItems ? navItemsLastPos + 1 : userPropsPos + 1;
|
|
4703
|
-
return /* @__PURE__ */
|
|
4704
|
-
hasInteractiveUser && /* @__PURE__ */
|
|
4705
|
-
hasNavItems && /* @__PURE__ */
|
|
4743
|
+
return /* @__PURE__ */ jsxs25(Fragment2, { children: [
|
|
4744
|
+
hasInteractiveUser && /* @__PURE__ */ jsx182("ul", { className: ulCn, children: interactiveItemsList == null ? void 0 : interactiveItemsList[0] }),
|
|
4745
|
+
hasNavItems && /* @__PURE__ */ jsx182("nav", { children: /* @__PURE__ */ jsx182("ul", { className: ulCn, children: interactiveItemsList == null ? void 0 : interactiveItemsList.slice(
|
|
4706
4746
|
navItemsFirstPos,
|
|
4707
4747
|
navItemsLastPos + 1
|
|
4708
4748
|
) }) }),
|
|
4709
|
-
hasNavItems && hasContextItems && /* @__PURE__ */
|
|
4710
|
-
hasContextItems && /* @__PURE__ */
|
|
4749
|
+
hasNavItems && hasContextItems && /* @__PURE__ */ jsx182(Divider, { color: "subtle", className: OverflowMenu_default.divider }),
|
|
4750
|
+
hasContextItems && /* @__PURE__ */ jsx182("ul", { className: ulCn, "aria-label": "kontekstmeny", children: interactiveItemsList == null ? void 0 : interactiveItemsList.slice(
|
|
4711
4751
|
contextItemsFirstPos,
|
|
4712
4752
|
interactiveItemsList.length
|
|
4713
4753
|
) })
|
|
@@ -4715,8 +4755,8 @@ var OverflowMenu = forwardRef17(
|
|
|
4715
4755
|
}
|
|
4716
4756
|
};
|
|
4717
4757
|
const { style = {}, ...restHTMLProps } = htmlProps;
|
|
4718
|
-
const generatedId =
|
|
4719
|
-
return /* @__PURE__ */
|
|
4758
|
+
const generatedId = useId3();
|
|
4759
|
+
return /* @__PURE__ */ jsxs25(
|
|
4720
4760
|
Paper,
|
|
4721
4761
|
{
|
|
4722
4762
|
ref: combinedRef,
|
|
@@ -4737,7 +4777,7 @@ var OverflowMenu = forwardRef17(
|
|
|
4737
4777
|
border: "default",
|
|
4738
4778
|
style: { ...style, ...floatingStyles.floating },
|
|
4739
4779
|
children: [
|
|
4740
|
-
hasStaticUser && /* @__PURE__ */
|
|
4780
|
+
hasStaticUser && /* @__PURE__ */ jsx182(OverflowMenuItem, { title: username, icon: PersonIcon }),
|
|
4741
4781
|
interactiveContent()
|
|
4742
4782
|
]
|
|
4743
4783
|
}
|
|
@@ -4751,11 +4791,11 @@ import {
|
|
|
4751
4791
|
Children as ReactChildren,
|
|
4752
4792
|
cloneElement,
|
|
4753
4793
|
isValidElement,
|
|
4754
|
-
useId as
|
|
4794
|
+
useId as useId4,
|
|
4755
4795
|
useRef as useRef6,
|
|
4756
4796
|
useState as useState4
|
|
4757
4797
|
} from "react";
|
|
4758
|
-
import { Fragment as Fragment3, jsx as
|
|
4798
|
+
import { Fragment as Fragment3, jsx as jsx183 } from "react/jsx-runtime";
|
|
4759
4799
|
var OverflowMenuGroup = ({
|
|
4760
4800
|
children,
|
|
4761
4801
|
onClose,
|
|
@@ -4767,7 +4807,7 @@ var OverflowMenuGroup = ({
|
|
|
4767
4807
|
const toggle = () => setIsOpen(!isOpen);
|
|
4768
4808
|
const close = () => setIsOpen(false);
|
|
4769
4809
|
const buttonRef = useRef6(null);
|
|
4770
|
-
const generatedId =
|
|
4810
|
+
const generatedId = useId4();
|
|
4771
4811
|
const uniqueOverflowMenuId = overflowMenuId != null ? overflowMenuId : `${generatedId}-overflowMenu`;
|
|
4772
4812
|
const handleClose = () => {
|
|
4773
4813
|
onClose && onClose();
|
|
@@ -4794,16 +4834,16 @@ var OverflowMenuGroup = ({
|
|
|
4794
4834
|
anchorRef: buttonRef
|
|
4795
4835
|
}));
|
|
4796
4836
|
});
|
|
4797
|
-
return /* @__PURE__ */
|
|
4837
|
+
return /* @__PURE__ */ jsx183(Fragment3, { children: Children8 });
|
|
4798
4838
|
};
|
|
4799
4839
|
OverflowMenuGroup.displayName = "OverflowMenuGroup";
|
|
4800
4840
|
|
|
4801
4841
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
4802
|
-
import { Fragment as Fragment4, jsx as
|
|
4842
|
+
import { Fragment as Fragment4, jsx as jsx184, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4803
4843
|
var Breadcrumbs = forwardRef18(
|
|
4804
4844
|
(props, ref) => {
|
|
4805
4845
|
const { children, smallScreen, id, className, htmlProps, ...rest } = props;
|
|
4806
|
-
const chevronIcon = /* @__PURE__ */
|
|
4846
|
+
const chevronIcon = /* @__PURE__ */ jsx184(
|
|
4807
4847
|
Icon,
|
|
4808
4848
|
{
|
|
4809
4849
|
className: cn(Breadcrumbs_default.icon),
|
|
@@ -4817,7 +4857,7 @@ var Breadcrumbs = forwardRef18(
|
|
|
4817
4857
|
!smallScreen && Breadcrumbs_default[`list-item--large-screen`]
|
|
4818
4858
|
);
|
|
4819
4859
|
const breadcrumbChildren = childrenArray.map((item, index) => {
|
|
4820
|
-
return /* @__PURE__ */
|
|
4860
|
+
return /* @__PURE__ */ jsxs26("li", { className: listItemCn, children: [
|
|
4821
4861
|
index !== 0 && chevronIcon,
|
|
4822
4862
|
item
|
|
4823
4863
|
] }, `breadcrumb-${index}`);
|
|
@@ -4829,12 +4869,12 @@ var Breadcrumbs = forwardRef18(
|
|
|
4829
4869
|
href: item.props.href
|
|
4830
4870
|
};
|
|
4831
4871
|
}).filter((item) => item) : [];
|
|
4832
|
-
const breadcrumbChildrenSmallScreen = /* @__PURE__ */
|
|
4833
|
-
/* @__PURE__ */
|
|
4834
|
-
breadcrumbChildrenTruncated.length > 0 && /* @__PURE__ */
|
|
4872
|
+
const breadcrumbChildrenSmallScreen = /* @__PURE__ */ jsxs26(Fragment4, { children: [
|
|
4873
|
+
/* @__PURE__ */ jsx184("li", { className: listItemCn, children: childrenArray[0] }),
|
|
4874
|
+
breadcrumbChildrenTruncated.length > 0 && /* @__PURE__ */ jsxs26("li", { className: listItemCn, children: [
|
|
4835
4875
|
chevronIcon,
|
|
4836
|
-
/* @__PURE__ */
|
|
4837
|
-
/* @__PURE__ */
|
|
4876
|
+
/* @__PURE__ */ jsxs26(OverflowMenuGroup, { children: [
|
|
4877
|
+
/* @__PURE__ */ jsx184(
|
|
4838
4878
|
Button,
|
|
4839
4879
|
{
|
|
4840
4880
|
size: "tiny",
|
|
@@ -4843,21 +4883,21 @@ var Breadcrumbs = forwardRef18(
|
|
|
4843
4883
|
"aria-label": `Vis br\xF8dsmulesti br\xF8dsmule 2 ${breadcrumbChildrenTruncated.length > 1 && `til ${breadcrumbChildren.length - 1}`}`
|
|
4844
4884
|
}
|
|
4845
4885
|
),
|
|
4846
|
-
/* @__PURE__ */
|
|
4886
|
+
/* @__PURE__ */ jsx184(OverflowMenu, { items: breadcrumbChildrenTruncated })
|
|
4847
4887
|
] })
|
|
4848
4888
|
] }),
|
|
4849
|
-
/* @__PURE__ */
|
|
4889
|
+
/* @__PURE__ */ jsxs26("li", { className: listItemCn, children: [
|
|
4850
4890
|
chevronIcon,
|
|
4851
4891
|
childrenArray[childrenArray.length - 1]
|
|
4852
4892
|
] })
|
|
4853
4893
|
] });
|
|
4854
|
-
return /* @__PURE__ */
|
|
4894
|
+
return /* @__PURE__ */ jsx184(
|
|
4855
4895
|
"nav",
|
|
4856
4896
|
{
|
|
4857
4897
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
4858
4898
|
ref,
|
|
4859
4899
|
"aria-label": "br\xF8dsmulesti",
|
|
4860
|
-
children: /* @__PURE__ */
|
|
4900
|
+
children: /* @__PURE__ */ jsx184("ul", { className: cn(Breadcrumbs_default.list, utilStyles_default["remove-list-styling"]), children: smallScreen ? breadcrumbChildrenSmallScreen : breadcrumbChildren })
|
|
4861
4901
|
}
|
|
4862
4902
|
);
|
|
4863
4903
|
}
|
|
@@ -4880,7 +4920,7 @@ var ButtonGroup_default = {
|
|
|
4880
4920
|
};
|
|
4881
4921
|
|
|
4882
4922
|
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
4883
|
-
import { jsx as
|
|
4923
|
+
import { jsx as jsx185 } from "react/jsx-runtime";
|
|
4884
4924
|
var ButtonGroup = forwardRef19(
|
|
4885
4925
|
(props, ref) => {
|
|
4886
4926
|
const {
|
|
@@ -4899,7 +4939,7 @@ var ButtonGroup = forwardRef19(
|
|
|
4899
4939
|
size: buttonSize
|
|
4900
4940
|
});
|
|
4901
4941
|
});
|
|
4902
|
-
return /* @__PURE__ */
|
|
4942
|
+
return /* @__PURE__ */ jsx185(
|
|
4903
4943
|
"div",
|
|
4904
4944
|
{
|
|
4905
4945
|
ref,
|
|
@@ -4927,7 +4967,7 @@ var Card_default = {
|
|
|
4927
4967
|
};
|
|
4928
4968
|
|
|
4929
4969
|
// src/components/Card/Card.tsx
|
|
4930
|
-
import { jsx as
|
|
4970
|
+
import { jsx as jsx186 } from "react/jsx-runtime";
|
|
4931
4971
|
var Card = (props) => {
|
|
4932
4972
|
const {
|
|
4933
4973
|
appearance = "filled",
|
|
@@ -4947,7 +4987,7 @@ var Card = (props) => {
|
|
|
4947
4987
|
);
|
|
4948
4988
|
if (cardType === "navigation") {
|
|
4949
4989
|
const { href, target } = props;
|
|
4950
|
-
return /* @__PURE__ */
|
|
4990
|
+
return /* @__PURE__ */ jsx186(
|
|
4951
4991
|
"a",
|
|
4952
4992
|
{
|
|
4953
4993
|
...getBaseHTMLProps(
|
|
@@ -4962,22 +5002,22 @@ var Card = (props) => {
|
|
|
4962
5002
|
}
|
|
4963
5003
|
);
|
|
4964
5004
|
}
|
|
4965
|
-
return /* @__PURE__ */
|
|
5005
|
+
return /* @__PURE__ */ jsx186("div", { ...getBaseHTMLProps(id, classNames, htmlProps, rest), ref: cardRef });
|
|
4966
5006
|
};
|
|
4967
5007
|
Card.displayName = "Card";
|
|
4968
5008
|
|
|
4969
5009
|
// src/components/Card/CardAccordion/CardAccordion.tsx
|
|
4970
|
-
import { forwardRef as forwardRef20, useCallback as useCallback4, useEffect as useEffect11, useId as
|
|
5010
|
+
import { forwardRef as forwardRef20, useCallback as useCallback4, useEffect as useEffect11, useId as useId5, useState as useState5 } from "react";
|
|
4971
5011
|
|
|
4972
5012
|
// src/components/Card/CardAccordion/CardAccordionContext.tsx
|
|
4973
5013
|
import { createContext, useContext } from "react";
|
|
4974
|
-
import { jsx as
|
|
5014
|
+
import { jsx as jsx187 } from "react/jsx-runtime";
|
|
4975
5015
|
var CardAccordionContext = createContext({});
|
|
4976
5016
|
var CardAccordionContextProvider = ({
|
|
4977
5017
|
children,
|
|
4978
5018
|
...values
|
|
4979
5019
|
}) => {
|
|
4980
|
-
return /* @__PURE__ */
|
|
5020
|
+
return /* @__PURE__ */ jsx187(CardAccordionContext.Provider, { value: values, children });
|
|
4981
5021
|
};
|
|
4982
5022
|
var useCardAccordionContext = () => {
|
|
4983
5023
|
const context = useContext(CardAccordionContext);
|
|
@@ -4990,7 +5030,7 @@ var useCardAccordionContext = () => {
|
|
|
4990
5030
|
};
|
|
4991
5031
|
|
|
4992
5032
|
// src/components/Card/CardAccordion/CardAccordion.tsx
|
|
4993
|
-
import { jsx as
|
|
5033
|
+
import { jsx as jsx188 } from "react/jsx-runtime";
|
|
4994
5034
|
var CardAccordion = forwardRef20(
|
|
4995
5035
|
(props, ref) => {
|
|
4996
5036
|
const {
|
|
@@ -5003,7 +5043,7 @@ var CardAccordion = forwardRef20(
|
|
|
5003
5043
|
...rest
|
|
5004
5044
|
} = props;
|
|
5005
5045
|
const [expanded, setExpanded] = useState5(isExpanded);
|
|
5006
|
-
const generatedId =
|
|
5046
|
+
const generatedId = useId5();
|
|
5007
5047
|
const accordionId = id != null ? id : `${generatedId}-cardAccordion`;
|
|
5008
5048
|
useEffect11(() => {
|
|
5009
5049
|
setExpanded(isExpanded);
|
|
@@ -5017,7 +5057,7 @@ var CardAccordion = forwardRef20(
|
|
|
5017
5057
|
return newExpanded;
|
|
5018
5058
|
});
|
|
5019
5059
|
}, [onChange]);
|
|
5020
|
-
return /* @__PURE__ */
|
|
5060
|
+
return /* @__PURE__ */ jsx188("div", { ...getBaseHTMLProps(id, className, htmlProps, rest), ref, children: /* @__PURE__ */ jsx188(
|
|
5021
5061
|
CardAccordionContextProvider,
|
|
5022
5062
|
{
|
|
5023
5063
|
headerId: `${accordionId}-header`,
|
|
@@ -5048,7 +5088,7 @@ var CardAccordion_default = {
|
|
|
5048
5088
|
};
|
|
5049
5089
|
|
|
5050
5090
|
// src/components/Card/CardAccordion/CardAccordionHeader.tsx
|
|
5051
|
-
import { jsx as
|
|
5091
|
+
import { jsx as jsx189, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5052
5092
|
var CardAccordionHeader = forwardRef21((props, ref) => {
|
|
5053
5093
|
const {
|
|
5054
5094
|
children,
|
|
@@ -5069,7 +5109,7 @@ var CardAccordionHeader = forwardRef21((props, ref) => {
|
|
|
5069
5109
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5070
5110
|
["--dds-card-accordion-header-container-padding"]: padding != null ? padding : "var(--dds-spacing-x1) var(--dds-spacing-x0-75) var(--dds-spacing-x1) var(--dds-spacing-x1-5)"
|
|
5071
5111
|
};
|
|
5072
|
-
return /* @__PURE__ */
|
|
5112
|
+
return /* @__PURE__ */ jsx189(
|
|
5073
5113
|
"button",
|
|
5074
5114
|
{
|
|
5075
5115
|
...getBaseHTMLProps(
|
|
@@ -5089,7 +5129,7 @@ var CardAccordionHeader = forwardRef21((props, ref) => {
|
|
|
5089
5129
|
"aria-controls": bodyId,
|
|
5090
5130
|
"aria-expanded": isExpanded,
|
|
5091
5131
|
type: "button",
|
|
5092
|
-
children: /* @__PURE__ */
|
|
5132
|
+
children: /* @__PURE__ */ jsxs27(
|
|
5093
5133
|
"div",
|
|
5094
5134
|
{
|
|
5095
5135
|
style: containerStyleVariables,
|
|
@@ -5099,8 +5139,8 @@ var CardAccordionHeader = forwardRef21((props, ref) => {
|
|
|
5099
5139
|
bold && typographyStyles_default.bold
|
|
5100
5140
|
),
|
|
5101
5141
|
children: [
|
|
5102
|
-
/* @__PURE__ */
|
|
5103
|
-
/* @__PURE__ */
|
|
5142
|
+
/* @__PURE__ */ jsx189("div", { className: CardAccordion_default.header__content, children }),
|
|
5143
|
+
/* @__PURE__ */ jsx189("span", { className: CardAccordion_default.header__chevron, children: /* @__PURE__ */ jsx189(
|
|
5104
5144
|
AnimatedChevronUpDown,
|
|
5105
5145
|
{
|
|
5106
5146
|
width: ddsTokens13.DdsIconSizeMedium,
|
|
@@ -5141,7 +5181,7 @@ function useElementHeight(element) {
|
|
|
5141
5181
|
}
|
|
5142
5182
|
|
|
5143
5183
|
// src/components/Card/CardAccordion/CardAccordionBody.tsx
|
|
5144
|
-
import { jsx as
|
|
5184
|
+
import { jsx as jsx190 } from "react/jsx-runtime";
|
|
5145
5185
|
var CardAccordionBody = forwardRef22((props, ref) => {
|
|
5146
5186
|
var _a;
|
|
5147
5187
|
const { children, className, htmlProps, padding, ...rest } = props;
|
|
@@ -5169,7 +5209,7 @@ var CardAccordionBody = forwardRef22((props, ref) => {
|
|
|
5169
5209
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5170
5210
|
["--dds-card-accordion-body-content-padding"]: padding != null ? padding : "var(--dds-spacing-x1) calc(var(--dds-spacing-x2) + var(--dds-spacing-x0-75)) var(--dds-spacing-x2) var(--dds-spacing-x1-5)"
|
|
5171
5211
|
};
|
|
5172
|
-
return /* @__PURE__ */
|
|
5212
|
+
return /* @__PURE__ */ jsx190(
|
|
5173
5213
|
"div",
|
|
5174
5214
|
{
|
|
5175
5215
|
...getBaseHTMLProps(
|
|
@@ -5189,7 +5229,7 @@ var CardAccordionBody = forwardRef22((props, ref) => {
|
|
|
5189
5229
|
"aria-labelledby": headerId,
|
|
5190
5230
|
"aria-hidden": !isExpanded,
|
|
5191
5231
|
style: { ...htmlProps == null ? void 0 : htmlProps.style, ...styleVariables },
|
|
5192
|
-
children: /* @__PURE__ */
|
|
5232
|
+
children: /* @__PURE__ */ jsx190(
|
|
5193
5233
|
"div",
|
|
5194
5234
|
{
|
|
5195
5235
|
ref: bodyRef,
|
|
@@ -5213,7 +5253,7 @@ var Chip_default = {
|
|
|
5213
5253
|
};
|
|
5214
5254
|
|
|
5215
5255
|
// src/components/Chip/Chip.tsx
|
|
5216
|
-
import { jsx as
|
|
5256
|
+
import { jsx as jsx191, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
5217
5257
|
var Chip = forwardRef23((props, ref) => {
|
|
5218
5258
|
const { text, onClose, id, className, htmlProps = {}, ...rest } = props;
|
|
5219
5259
|
const { "aria-label": ariaLabel, ...restHTMLprops } = htmlProps;
|
|
@@ -5222,7 +5262,7 @@ var Chip = forwardRef23((props, ref) => {
|
|
|
5222
5262
|
setIsOpen(false);
|
|
5223
5263
|
onClose && onClose();
|
|
5224
5264
|
};
|
|
5225
|
-
return isOpen ? /* @__PURE__ */
|
|
5265
|
+
return isOpen ? /* @__PURE__ */ jsxs28(
|
|
5226
5266
|
"div",
|
|
5227
5267
|
{
|
|
5228
5268
|
...getBaseHTMLProps(
|
|
@@ -5233,14 +5273,14 @@ var Chip = forwardRef23((props, ref) => {
|
|
|
5233
5273
|
),
|
|
5234
5274
|
ref,
|
|
5235
5275
|
children: [
|
|
5236
|
-
/* @__PURE__ */
|
|
5276
|
+
/* @__PURE__ */ jsx191(
|
|
5237
5277
|
TextOverflowEllipsisInner,
|
|
5238
5278
|
{
|
|
5239
5279
|
className: cn(typographyStyles_default["body-sans-01"]),
|
|
5240
5280
|
children: text
|
|
5241
5281
|
}
|
|
5242
5282
|
),
|
|
5243
|
-
/* @__PURE__ */
|
|
5283
|
+
/* @__PURE__ */ jsx191(
|
|
5244
5284
|
Button,
|
|
5245
5285
|
{
|
|
5246
5286
|
size: "tiny",
|
|
@@ -5258,11 +5298,11 @@ Chip.displayName = "Chip";
|
|
|
5258
5298
|
|
|
5259
5299
|
// src/components/Chip/ChipGroup.tsx
|
|
5260
5300
|
import { Children as Children2, forwardRef as forwardRef24 } from "react";
|
|
5261
|
-
import { jsx as
|
|
5301
|
+
import { jsx as jsx192 } from "react/jsx-runtime";
|
|
5262
5302
|
var ChipGroup = forwardRef24(
|
|
5263
5303
|
({ children, className, ...rest }, ref) => {
|
|
5264
5304
|
const childrenArray = Children2.toArray(children);
|
|
5265
|
-
return /* @__PURE__ */
|
|
5305
|
+
return /* @__PURE__ */ jsx192(
|
|
5266
5306
|
"ul",
|
|
5267
5307
|
{
|
|
5268
5308
|
...rest,
|
|
@@ -5272,7 +5312,7 @@ var ChipGroup = forwardRef24(
|
|
|
5272
5312
|
utilStyles_default["remove-list-styling"]
|
|
5273
5313
|
),
|
|
5274
5314
|
ref,
|
|
5275
|
-
children: childrenArray.map((item, index) => /* @__PURE__ */
|
|
5315
|
+
children: childrenArray.map((item, index) => /* @__PURE__ */ jsx192("li", { children: item }, `chip-${index}`))
|
|
5276
5316
|
}
|
|
5277
5317
|
);
|
|
5278
5318
|
}
|
|
@@ -5306,9 +5346,6 @@ import { useContext as useContext3, useRef as useRef9 } from "react";
|
|
|
5306
5346
|
|
|
5307
5347
|
// src/components/date-inputs/common/DateInput.module.css
|
|
5308
5348
|
var DateInput_default = {
|
|
5309
|
-
"container--medium": "DateInput_container--medium",
|
|
5310
|
-
"container--small": "DateInput_container--small",
|
|
5311
|
-
"container--tiny": "DateInput_container--tiny",
|
|
5312
5349
|
"date-input": "DateInput_date-input",
|
|
5313
5350
|
"date-input--medium": "DateInput_date-input--medium",
|
|
5314
5351
|
"date-input--small": "DateInput_date-input--small",
|
|
@@ -5343,7 +5380,7 @@ import {
|
|
|
5343
5380
|
useEffect as useEffect14,
|
|
5344
5381
|
useRef as useRef8
|
|
5345
5382
|
} from "react";
|
|
5346
|
-
import { jsx as
|
|
5383
|
+
import { jsx as jsx193 } from "react/jsx-runtime";
|
|
5347
5384
|
var CalendarPopoverContext = createContext2({
|
|
5348
5385
|
anchorRef: null,
|
|
5349
5386
|
isOpen: false,
|
|
@@ -5356,13 +5393,13 @@ var CalendarPopover = ({
|
|
|
5356
5393
|
}) => {
|
|
5357
5394
|
const anchorRef = useRef8(null);
|
|
5358
5395
|
useOnKeyDown("Escape", onClose);
|
|
5359
|
-
return /* @__PURE__ */
|
|
5396
|
+
return /* @__PURE__ */ jsx193(CalendarPopoverContext.Provider, { value: { anchorRef, isOpen, onClose }, children });
|
|
5360
5397
|
};
|
|
5361
5398
|
var CalendarPopoverAnchor = ({
|
|
5362
5399
|
children
|
|
5363
5400
|
}) => {
|
|
5364
5401
|
const { anchorRef } = useContext2(CalendarPopoverContext);
|
|
5365
|
-
return /* @__PURE__ */
|
|
5402
|
+
return /* @__PURE__ */ jsx193("div", { ref: anchorRef != null ? anchorRef : void 0, children });
|
|
5366
5403
|
};
|
|
5367
5404
|
var CalendarPopoverContent = ({
|
|
5368
5405
|
children
|
|
@@ -5379,7 +5416,7 @@ var CalendarPopoverContent = ({
|
|
|
5379
5416
|
refs.setReference((_a = anchorRef == null ? void 0 : anchorRef.current) != null ? _a : null);
|
|
5380
5417
|
}, []);
|
|
5381
5418
|
if (!isOpen) return null;
|
|
5382
|
-
return /* @__PURE__ */
|
|
5419
|
+
return /* @__PURE__ */ jsx193(
|
|
5383
5420
|
"div",
|
|
5384
5421
|
{
|
|
5385
5422
|
ref: combinedRef,
|
|
@@ -5395,7 +5432,7 @@ var locale = "no-NO";
|
|
|
5395
5432
|
var timezone = "Europe/Oslo";
|
|
5396
5433
|
|
|
5397
5434
|
// src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
|
|
5398
|
-
import { jsx as
|
|
5435
|
+
import { jsx as jsx194 } from "react/jsx-runtime";
|
|
5399
5436
|
function CalendarCell({ date, state }) {
|
|
5400
5437
|
const ref = useRef9(null);
|
|
5401
5438
|
const {
|
|
@@ -5408,7 +5445,7 @@ function CalendarCell({ date, state }) {
|
|
|
5408
5445
|
isUnavailable
|
|
5409
5446
|
} = useCalendarCell({ date }, state, ref);
|
|
5410
5447
|
if (isDisabled) {
|
|
5411
|
-
return /* @__PURE__ */
|
|
5448
|
+
return /* @__PURE__ */ jsx194("td", { ...cellProps });
|
|
5412
5449
|
}
|
|
5413
5450
|
const { onClose } = useContext3(CalendarPopoverContext);
|
|
5414
5451
|
const variant = isSelected ? "selected" : isUnavailable || isDisabled ? "unavailable" : "default";
|
|
@@ -5417,7 +5454,7 @@ function CalendarCell({ date, state }) {
|
|
|
5417
5454
|
onClose();
|
|
5418
5455
|
}
|
|
5419
5456
|
};
|
|
5420
|
-
return /* @__PURE__ */
|
|
5457
|
+
return /* @__PURE__ */ jsx194("td", { ...cellProps, children: /* @__PURE__ */ jsx194(
|
|
5421
5458
|
"button",
|
|
5422
5459
|
{
|
|
5423
5460
|
...buttonProps,
|
|
@@ -5478,7 +5515,7 @@ function isLeapYear(date) {
|
|
|
5478
5515
|
}
|
|
5479
5516
|
|
|
5480
5517
|
// src/components/date-inputs/DatePicker/Calendar/CalendarGrid.tsx
|
|
5481
|
-
import { jsx as
|
|
5518
|
+
import { jsx as jsx195, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
5482
5519
|
function CalendarGrid({ state, ...props }) {
|
|
5483
5520
|
const { locale: locale2 } = useLocale();
|
|
5484
5521
|
const {
|
|
@@ -5491,7 +5528,7 @@ function CalendarGrid({ state, ...props }) {
|
|
|
5491
5528
|
typographyStyles_default["supporting-style-tiny-02"],
|
|
5492
5529
|
typographyStyles_default["text-color--subtle"]
|
|
5493
5530
|
];
|
|
5494
|
-
return /* @__PURE__ */
|
|
5531
|
+
return /* @__PURE__ */ jsxs29(
|
|
5495
5532
|
"table",
|
|
5496
5533
|
{
|
|
5497
5534
|
...gridProps,
|
|
@@ -5503,16 +5540,16 @@ function CalendarGrid({ state, ...props }) {
|
|
|
5503
5540
|
},
|
|
5504
5541
|
cellPadding: "0",
|
|
5505
5542
|
children: [
|
|
5506
|
-
/* @__PURE__ */
|
|
5507
|
-
/* @__PURE__ */
|
|
5508
|
-
weekDays.map((day, index) => /* @__PURE__ */
|
|
5543
|
+
/* @__PURE__ */ jsx195("thead", { ...headerProps, children: /* @__PURE__ */ jsxs29("tr", { children: [
|
|
5544
|
+
/* @__PURE__ */ jsx195("th", { className: cn(...typographyCn), children: "#" }),
|
|
5545
|
+
weekDays.map((day, index) => /* @__PURE__ */ jsx195("th", { className: cn(...typographyCn), children: day }, index))
|
|
5509
5546
|
] }) }),
|
|
5510
|
-
/* @__PURE__ */
|
|
5547
|
+
/* @__PURE__ */ jsx195("tbody", { children: [...new Array(weeksInMonth).keys()].map((weekIndex) => {
|
|
5511
5548
|
const datesInWeek = state.getDatesInWeek(weekIndex);
|
|
5512
5549
|
const firstExistingDay = datesInWeek.find(Boolean);
|
|
5513
5550
|
const weekNumber = firstExistingDay ? getWeekNumber(firstExistingDay) : "";
|
|
5514
|
-
return /* @__PURE__ */
|
|
5515
|
-
/* @__PURE__ */
|
|
5551
|
+
return /* @__PURE__ */ jsxs29("tr", { children: [
|
|
5552
|
+
/* @__PURE__ */ jsx195(
|
|
5516
5553
|
"td",
|
|
5517
5554
|
{
|
|
5518
5555
|
className: cn(DateInput_default["calendar__week-number"], ...typographyCn),
|
|
@@ -5520,7 +5557,7 @@ function CalendarGrid({ state, ...props }) {
|
|
|
5520
5557
|
}
|
|
5521
5558
|
),
|
|
5522
5559
|
datesInWeek.map(
|
|
5523
|
-
(date, i2) => date ? /* @__PURE__ */
|
|
5560
|
+
(date, i2) => date ? /* @__PURE__ */ jsx195(CalendarCell, { state, date }, i2) : /* @__PURE__ */ jsx195("td", {}, i2)
|
|
5524
5561
|
)
|
|
5525
5562
|
] }, weekIndex);
|
|
5526
5563
|
}) })
|
|
@@ -5531,7 +5568,7 @@ function CalendarGrid({ state, ...props }) {
|
|
|
5531
5568
|
CalendarGrid.displayName = "CalendarGrid";
|
|
5532
5569
|
|
|
5533
5570
|
// src/components/date-inputs/DatePicker/Calendar/Calendar.tsx
|
|
5534
|
-
import { jsx as
|
|
5571
|
+
import { jsx as jsx196, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
5535
5572
|
function createCalendar(identifier2) {
|
|
5536
5573
|
switch (identifier2) {
|
|
5537
5574
|
case "gregory":
|
|
@@ -5559,9 +5596,9 @@ function Calendar(props) {
|
|
|
5559
5596
|
onClose();
|
|
5560
5597
|
}
|
|
5561
5598
|
};
|
|
5562
|
-
return /* @__PURE__ */
|
|
5563
|
-
/* @__PURE__ */
|
|
5564
|
-
/* @__PURE__ */
|
|
5599
|
+
return /* @__PURE__ */ jsxs30("div", { ...calendarProps, className: DateInput_default.calendar, children: [
|
|
5600
|
+
/* @__PURE__ */ jsxs30("div", { className: DateInput_default.calendar__header, children: [
|
|
5601
|
+
/* @__PURE__ */ jsx196(
|
|
5565
5602
|
Button,
|
|
5566
5603
|
{
|
|
5567
5604
|
type: "button",
|
|
@@ -5574,7 +5611,7 @@ function Calendar(props) {
|
|
|
5574
5611
|
className: DateInput_default["calendar__month-button"]
|
|
5575
5612
|
}
|
|
5576
5613
|
),
|
|
5577
|
-
/* @__PURE__ */
|
|
5614
|
+
/* @__PURE__ */ jsx196(
|
|
5578
5615
|
Heading,
|
|
5579
5616
|
{
|
|
5580
5617
|
level: 2,
|
|
@@ -5583,7 +5620,7 @@ function Calendar(props) {
|
|
|
5583
5620
|
children: title
|
|
5584
5621
|
}
|
|
5585
5622
|
),
|
|
5586
|
-
/* @__PURE__ */
|
|
5623
|
+
/* @__PURE__ */ jsx196(
|
|
5587
5624
|
Button,
|
|
5588
5625
|
{
|
|
5589
5626
|
type: "button",
|
|
@@ -5596,7 +5633,7 @@ function Calendar(props) {
|
|
|
5596
5633
|
}
|
|
5597
5634
|
)
|
|
5598
5635
|
] }),
|
|
5599
|
-
/* @__PURE__ */
|
|
5636
|
+
/* @__PURE__ */ jsx196(CalendarGrid, { state })
|
|
5600
5637
|
] });
|
|
5601
5638
|
}
|
|
5602
5639
|
Calendar.displayName = "Calendar";
|
|
@@ -5624,7 +5661,7 @@ import {
|
|
|
5624
5661
|
// src/components/date-inputs/DatePicker/DateField/CalendarButton.tsx
|
|
5625
5662
|
import { useButton } from "@react-aria/button";
|
|
5626
5663
|
import { useRef as useRef10 } from "react";
|
|
5627
|
-
import { jsx as
|
|
5664
|
+
import { jsx as jsx197 } from "react/jsx-runtime";
|
|
5628
5665
|
function CalendarButton({
|
|
5629
5666
|
componentSize,
|
|
5630
5667
|
...props
|
|
@@ -5632,7 +5669,7 @@ function CalendarButton({
|
|
|
5632
5669
|
const ref = useRef10(null);
|
|
5633
5670
|
const { buttonProps } = useButton(props, ref);
|
|
5634
5671
|
const size2 = componentSize === "tiny" ? "small" : "medium";
|
|
5635
|
-
return /* @__PURE__ */
|
|
5672
|
+
return /* @__PURE__ */ jsx197(
|
|
5636
5673
|
"button",
|
|
5637
5674
|
{
|
|
5638
5675
|
...buttonProps,
|
|
@@ -5652,7 +5689,7 @@ function CalendarButton({
|
|
|
5652
5689
|
!props.isDisabled && focusable,
|
|
5653
5690
|
props.isDisabled && "disabled"
|
|
5654
5691
|
),
|
|
5655
|
-
children: /* @__PURE__ */
|
|
5692
|
+
children: /* @__PURE__ */ jsx197(Icon, { icon: CalendarIcon, iconSize: size2 })
|
|
5656
5693
|
}
|
|
5657
5694
|
);
|
|
5658
5695
|
}
|
|
@@ -5660,7 +5697,7 @@ function CalendarButton({
|
|
|
5660
5697
|
// src/components/date-inputs/DatePicker/DateField/DateSegment.tsx
|
|
5661
5698
|
import { useDateSegment } from "@react-aria/datepicker";
|
|
5662
5699
|
import { useRef as useRef11 } from "react";
|
|
5663
|
-
import { jsx as
|
|
5700
|
+
import { jsx as jsx198, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
5664
5701
|
var typographyTypes2 = {
|
|
5665
5702
|
medium: "bodySans02",
|
|
5666
5703
|
small: "bodySans01",
|
|
@@ -5679,7 +5716,7 @@ function DateSegment({
|
|
|
5679
5716
|
var _a;
|
|
5680
5717
|
const ref = useRef11(null);
|
|
5681
5718
|
const { segmentProps } = useDateSegment(segment, state, ref);
|
|
5682
|
-
return /* @__PURE__ */
|
|
5719
|
+
return /* @__PURE__ */ jsxs31(
|
|
5683
5720
|
"div",
|
|
5684
5721
|
{
|
|
5685
5722
|
...segmentProps,
|
|
@@ -5694,7 +5731,7 @@ function DateSegment({
|
|
|
5694
5731
|
minWidth: segment.maxValue != null ? String(segment.maxValue).length + "ch" : void 0
|
|
5695
5732
|
},
|
|
5696
5733
|
children: [
|
|
5697
|
-
/* @__PURE__ */
|
|
5734
|
+
/* @__PURE__ */ jsx198(
|
|
5698
5735
|
"span",
|
|
5699
5736
|
{
|
|
5700
5737
|
"aria-hidden": "true",
|
|
@@ -5731,12 +5768,12 @@ var InputMessage_default = {
|
|
|
5731
5768
|
};
|
|
5732
5769
|
|
|
5733
5770
|
// src/components/InputMessage/InputMessage.tsx
|
|
5734
|
-
import { Fragment as Fragment5, jsx as
|
|
5771
|
+
import { Fragment as Fragment5, jsx as jsx199, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
5735
5772
|
var InputMessage = forwardRef25(
|
|
5736
5773
|
(props, ref) => {
|
|
5737
5774
|
const { message, messageType, id, className, htmlProps, ...rest } = props;
|
|
5738
5775
|
const isError = messageType === "error";
|
|
5739
|
-
return /* @__PURE__ */
|
|
5776
|
+
return /* @__PURE__ */ jsxs32(
|
|
5740
5777
|
"div",
|
|
5741
5778
|
{
|
|
5742
5779
|
...getBaseHTMLProps(
|
|
@@ -5747,8 +5784,8 @@ var InputMessage = forwardRef25(
|
|
|
5747
5784
|
),
|
|
5748
5785
|
ref,
|
|
5749
5786
|
children: [
|
|
5750
|
-
isError && /* @__PURE__ */
|
|
5751
|
-
/* @__PURE__ */
|
|
5787
|
+
isError && /* @__PURE__ */ jsx199(Icon, { icon: ErrorIcon, iconSize: "small", className: InputMessage_default.icon }),
|
|
5788
|
+
/* @__PURE__ */ jsx199(
|
|
5752
5789
|
Typography,
|
|
5753
5790
|
{
|
|
5754
5791
|
typographyType: isError ? "bodySans01" : "supportingStyleHelperText01",
|
|
@@ -5762,8 +5799,8 @@ var InputMessage = forwardRef25(
|
|
|
5762
5799
|
}
|
|
5763
5800
|
);
|
|
5764
5801
|
InputMessage.displayName = "InputMessage";
|
|
5765
|
-
var renderInputMessage = (tip, tipId, errorMessage, errorMessageId) => /* @__PURE__ */
|
|
5766
|
-
errorMessage && errorMessageId && /* @__PURE__ */
|
|
5802
|
+
var renderInputMessage = (tip, tipId, errorMessage, errorMessageId) => /* @__PURE__ */ jsxs32(Fragment5, { children: [
|
|
5803
|
+
errorMessage && errorMessageId && /* @__PURE__ */ jsx199(
|
|
5767
5804
|
InputMessage,
|
|
5768
5805
|
{
|
|
5769
5806
|
message: errorMessage,
|
|
@@ -5771,11 +5808,11 @@ var renderInputMessage = (tip, tipId, errorMessage, errorMessageId) => /* @__PUR
|
|
|
5771
5808
|
id: errorMessageId
|
|
5772
5809
|
}
|
|
5773
5810
|
),
|
|
5774
|
-
tip && tipId && !errorMessage && /* @__PURE__ */
|
|
5811
|
+
tip && tipId && !errorMessage && /* @__PURE__ */ jsx199(InputMessage, { message: tip, messageType: "tip", id: tipId })
|
|
5775
5812
|
] });
|
|
5776
5813
|
|
|
5777
5814
|
// src/components/date-inputs/common/DateInput.tsx
|
|
5778
|
-
import { jsx as
|
|
5815
|
+
import { jsx as jsx200, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
5779
5816
|
function _DateInput({
|
|
5780
5817
|
errorMessage,
|
|
5781
5818
|
tip,
|
|
@@ -5801,28 +5838,36 @@ function _DateInput({
|
|
|
5801
5838
|
const hasLabel = props.label != null;
|
|
5802
5839
|
const hasMessage = hasErrorMessage || hasTip;
|
|
5803
5840
|
const { isOpen } = useContext5(CalendarPopoverContext);
|
|
5804
|
-
|
|
5841
|
+
const styleVariables = {
|
|
5842
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5843
|
+
["--dds-date-input-width"]: width ? width : componentSize === "small" ? "148px" : componentSize === "tiny" ? "125px" : "160px"
|
|
5844
|
+
};
|
|
5845
|
+
return /* @__PURE__ */ jsxs33(
|
|
5805
5846
|
"div",
|
|
5806
5847
|
{
|
|
5807
5848
|
...groupProps,
|
|
5808
|
-
className: cn(
|
|
5809
|
-
className,
|
|
5810
|
-
Input_default.container,
|
|
5811
|
-
DateInput_default[`container--${componentSize}`]
|
|
5812
|
-
),
|
|
5849
|
+
className: cn(className, Input_default.container),
|
|
5813
5850
|
ref: forwardedRef,
|
|
5814
|
-
style: { width },
|
|
5815
5851
|
children: [
|
|
5816
|
-
hasLabel && /* @__PURE__ */
|
|
5817
|
-
|
|
5852
|
+
hasLabel && /* @__PURE__ */ jsx200(
|
|
5853
|
+
Label,
|
|
5854
|
+
{
|
|
5855
|
+
...labelProps,
|
|
5856
|
+
showRequiredStyling: required,
|
|
5857
|
+
className: Input_default.label,
|
|
5858
|
+
children: props.label
|
|
5859
|
+
}
|
|
5860
|
+
),
|
|
5861
|
+
/* @__PURE__ */ jsxs33(
|
|
5818
5862
|
"div",
|
|
5819
5863
|
{
|
|
5820
5864
|
...fieldProps,
|
|
5821
|
-
style,
|
|
5865
|
+
style: { ...style, ...styleVariables },
|
|
5822
5866
|
ref: internalRef,
|
|
5823
5867
|
className: cn(
|
|
5824
5868
|
Input_default.input,
|
|
5825
5869
|
Input_default["input--stateful"],
|
|
5870
|
+
Input_default["input--hover"],
|
|
5826
5871
|
Input_default[`input--${componentSize}`],
|
|
5827
5872
|
hasErrorMessage && Input_default["input--stateful-danger"],
|
|
5828
5873
|
DateInput_default["date-input"],
|
|
@@ -5837,11 +5882,11 @@ function _DateInput({
|
|
|
5837
5882
|
),
|
|
5838
5883
|
children: [
|
|
5839
5884
|
button3,
|
|
5840
|
-
/* @__PURE__ */
|
|
5885
|
+
/* @__PURE__ */ jsx200("div", { className: DateInput_default["date-segment-container"], children })
|
|
5841
5886
|
]
|
|
5842
5887
|
}
|
|
5843
5888
|
),
|
|
5844
|
-
hasMessage && /* @__PURE__ */
|
|
5889
|
+
hasMessage && /* @__PURE__ */ jsx200(
|
|
5845
5890
|
InputMessage,
|
|
5846
5891
|
{
|
|
5847
5892
|
messageType: hasErrorMessage ? "error" : "tip",
|
|
@@ -5856,7 +5901,7 @@ var DateInput = forwardRef26(_DateInput);
|
|
|
5856
5901
|
DateInput.displayName = "DateInput";
|
|
5857
5902
|
|
|
5858
5903
|
// src/components/date-inputs/DatePicker/DateField/DateField.tsx
|
|
5859
|
-
import { jsx as
|
|
5904
|
+
import { jsx as jsx201 } from "react/jsx-runtime";
|
|
5860
5905
|
function _DateField({
|
|
5861
5906
|
componentSize = "medium",
|
|
5862
5907
|
buttonProps,
|
|
@@ -5872,7 +5917,7 @@ function _DateField({
|
|
|
5872
5917
|
const ref = useRef12(null);
|
|
5873
5918
|
const { labelProps, fieldProps } = useDateField(props, state, ref);
|
|
5874
5919
|
const disabled = props.isDisabled || !!fieldProps["aria-disabled"];
|
|
5875
|
-
return /* @__PURE__ */
|
|
5920
|
+
return /* @__PURE__ */ jsx201(
|
|
5876
5921
|
DateInput,
|
|
5877
5922
|
{
|
|
5878
5923
|
...props,
|
|
@@ -5884,7 +5929,7 @@ function _DateField({
|
|
|
5884
5929
|
ref: forwardedRef,
|
|
5885
5930
|
internalRef: ref,
|
|
5886
5931
|
readOnly: props.isReadOnly,
|
|
5887
|
-
prefix: !props.isReadOnly && /* @__PURE__ */
|
|
5932
|
+
prefix: !props.isReadOnly && /* @__PURE__ */ jsx201(
|
|
5888
5933
|
CalendarButton,
|
|
5889
5934
|
{
|
|
5890
5935
|
componentSize,
|
|
@@ -5894,7 +5939,7 @@ function _DateField({
|
|
|
5894
5939
|
),
|
|
5895
5940
|
labelProps,
|
|
5896
5941
|
fieldProps,
|
|
5897
|
-
children: state.segments.map((segment, i2) => /* @__PURE__ */
|
|
5942
|
+
children: state.segments.map((segment, i2) => /* @__PURE__ */ jsx201(
|
|
5898
5943
|
DateSegment,
|
|
5899
5944
|
{
|
|
5900
5945
|
componentSize,
|
|
@@ -5931,7 +5976,7 @@ function createDOMRef(ref) {
|
|
|
5931
5976
|
}
|
|
5932
5977
|
|
|
5933
5978
|
// src/components/date-inputs/DatePicker/DatePicker.tsx
|
|
5934
|
-
import { jsx as
|
|
5979
|
+
import { jsx as jsx202, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
5935
5980
|
var refIsFocusable = (ref) => {
|
|
5936
5981
|
return typeof ref === "object" && ref !== null && "focus" in ref;
|
|
5937
5982
|
};
|
|
@@ -5947,8 +5992,8 @@ function _DatePicker({ errorMessage, componentSize, tip, style, width, ...props
|
|
|
5947
5992
|
state,
|
|
5948
5993
|
ref
|
|
5949
5994
|
);
|
|
5950
|
-
return /* @__PURE__ */
|
|
5951
|
-
/* @__PURE__ */
|
|
5995
|
+
return /* @__PURE__ */ jsx202(I18nProvider, { locale, children: /* @__PURE__ */ jsxs34(CalendarPopover, { isOpen: state.isOpen, onClose: state.close, children: [
|
|
5996
|
+
/* @__PURE__ */ jsx202(CalendarPopoverAnchor, { children: /* @__PURE__ */ jsx202(
|
|
5952
5997
|
DateField,
|
|
5953
5998
|
{
|
|
5954
5999
|
...fieldProps,
|
|
@@ -5964,7 +6009,7 @@ function _DatePicker({ errorMessage, componentSize, tip, style, width, ...props
|
|
|
5964
6009
|
width
|
|
5965
6010
|
}
|
|
5966
6011
|
) }),
|
|
5967
|
-
/* @__PURE__ */
|
|
6012
|
+
/* @__PURE__ */ jsx202(CalendarPopoverContent, { children: /* @__PURE__ */ jsx202(Calendar, { ...calendarProps }) })
|
|
5968
6013
|
] }) });
|
|
5969
6014
|
}
|
|
5970
6015
|
var DatePicker = forwardRef28(_DatePicker);
|
|
@@ -5974,7 +6019,7 @@ DatePicker.displayName = "DatePicker";
|
|
|
5974
6019
|
import { useTimeField } from "@react-aria/datepicker";
|
|
5975
6020
|
import { useTimeFieldState } from "@react-stately/datepicker";
|
|
5976
6021
|
import { forwardRef as forwardRef29, useRef as useRef15 } from "react";
|
|
5977
|
-
import { jsx as
|
|
6022
|
+
import { jsx as jsx203 } from "react/jsx-runtime";
|
|
5978
6023
|
function _TimePicker({ componentSize = "medium", width, ...props }, forwardedRef) {
|
|
5979
6024
|
const ref = useRef15(null);
|
|
5980
6025
|
const state = useTimeFieldState({
|
|
@@ -5988,7 +6033,7 @@ function _TimePicker({ componentSize = "medium", width, ...props }, forwardedRef
|
|
|
5988
6033
|
);
|
|
5989
6034
|
const iconSize = componentSize === "tiny" ? "small" : "medium";
|
|
5990
6035
|
const disabled = props.isDisabled || !!fieldProps["aria-disabled"];
|
|
5991
|
-
return /* @__PURE__ */
|
|
6036
|
+
return /* @__PURE__ */ jsx203(
|
|
5992
6037
|
DateInput,
|
|
5993
6038
|
{
|
|
5994
6039
|
...props,
|
|
@@ -6001,17 +6046,17 @@ function _TimePicker({ componentSize = "medium", width, ...props }, forwardedRef
|
|
|
6001
6046
|
readOnly: props.isReadOnly,
|
|
6002
6047
|
labelProps,
|
|
6003
6048
|
fieldProps,
|
|
6004
|
-
prefix: !props.isReadOnly && /* @__PURE__ */
|
|
6049
|
+
prefix: !props.isReadOnly && /* @__PURE__ */ jsx203(
|
|
6005
6050
|
"span",
|
|
6006
6051
|
{
|
|
6007
6052
|
className: cn(
|
|
6008
6053
|
DateInput_default["icon-wrapper"],
|
|
6009
6054
|
DateInput_default[`icon-wrapper--${iconSize}`]
|
|
6010
6055
|
),
|
|
6011
|
-
children: /* @__PURE__ */
|
|
6056
|
+
children: /* @__PURE__ */ jsx203(Icon, { icon: TimeIcon, iconSize })
|
|
6012
6057
|
}
|
|
6013
6058
|
),
|
|
6014
|
-
children: state.segments.map((segment, i2) => /* @__PURE__ */
|
|
6059
|
+
children: state.segments.map((segment, i2) => /* @__PURE__ */ jsx203(
|
|
6015
6060
|
DateSegment,
|
|
6016
6061
|
{
|
|
6017
6062
|
componentSize,
|
|
@@ -6074,7 +6119,7 @@ var DescriptionList_default = {
|
|
|
6074
6119
|
};
|
|
6075
6120
|
|
|
6076
6121
|
// src/components/DescriptionList/DescriptionList.tsx
|
|
6077
|
-
import { jsx as
|
|
6122
|
+
import { jsx as jsx204 } from "react/jsx-runtime";
|
|
6078
6123
|
var DescriptionList = forwardRef30((props, ref) => {
|
|
6079
6124
|
const {
|
|
6080
6125
|
appearance = "default",
|
|
@@ -6085,7 +6130,7 @@ var DescriptionList = forwardRef30((props, ref) => {
|
|
|
6085
6130
|
htmlProps,
|
|
6086
6131
|
...rest
|
|
6087
6132
|
} = props;
|
|
6088
|
-
return /* @__PURE__ */
|
|
6133
|
+
return /* @__PURE__ */ jsx204(
|
|
6089
6134
|
"dl",
|
|
6090
6135
|
{
|
|
6091
6136
|
ref,
|
|
@@ -6108,24 +6153,24 @@ DescriptionList.displayName = "DescriptionList";
|
|
|
6108
6153
|
|
|
6109
6154
|
// src/components/DescriptionList/DescriptionListTerm.tsx
|
|
6110
6155
|
import { forwardRef as forwardRef31 } from "react";
|
|
6111
|
-
import { jsx as
|
|
6156
|
+
import { jsx as jsx205 } from "react/jsx-runtime";
|
|
6112
6157
|
var DescriptionListTerm = forwardRef31(({ ...rest }, ref) => {
|
|
6113
|
-
return /* @__PURE__ */
|
|
6158
|
+
return /* @__PURE__ */ jsx205("dt", { ref, ...rest });
|
|
6114
6159
|
});
|
|
6115
6160
|
DescriptionListTerm.displayName = "DescriptionListTerm";
|
|
6116
6161
|
|
|
6117
6162
|
// src/components/DescriptionList/DescriptionListDesc.tsx
|
|
6118
6163
|
import { forwardRef as forwardRef32 } from "react";
|
|
6119
|
-
import { jsx as
|
|
6164
|
+
import { jsx as jsx206, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
6120
6165
|
var DescriptionListDesc = forwardRef32((props, ref) => {
|
|
6121
6166
|
const { children, icon: icon2, id, className, htmlProps, ...rest } = props;
|
|
6122
|
-
return /* @__PURE__ */
|
|
6167
|
+
return /* @__PURE__ */ jsxs35(
|
|
6123
6168
|
"dd",
|
|
6124
6169
|
{
|
|
6125
6170
|
ref,
|
|
6126
6171
|
...getBaseHTMLProps(id, cn(className, DescriptionList_default.desc), htmlProps, rest),
|
|
6127
6172
|
children: [
|
|
6128
|
-
icon2 && /* @__PURE__ */
|
|
6173
|
+
icon2 && /* @__PURE__ */ jsx206(Icon, { icon: icon2 }),
|
|
6129
6174
|
" ",
|
|
6130
6175
|
children
|
|
6131
6176
|
]
|
|
@@ -6136,7 +6181,7 @@ DescriptionListDesc.displayName = "DescriptionListDesc";
|
|
|
6136
6181
|
|
|
6137
6182
|
// src/components/DescriptionList/DescriptionListGroup.tsx
|
|
6138
6183
|
import { forwardRef as forwardRef33 } from "react";
|
|
6139
|
-
import { jsx as
|
|
6184
|
+
import { jsx as jsx207 } from "react/jsx-runtime";
|
|
6140
6185
|
var DescriptionListGroup = forwardRef33((props, ref) => {
|
|
6141
6186
|
const {
|
|
6142
6187
|
children,
|
|
@@ -6148,7 +6193,7 @@ var DescriptionListGroup = forwardRef33((props, ref) => {
|
|
|
6148
6193
|
htmlProps,
|
|
6149
6194
|
...rest
|
|
6150
6195
|
} = props;
|
|
6151
|
-
return /* @__PURE__ */
|
|
6196
|
+
return /* @__PURE__ */ jsx207(
|
|
6152
6197
|
"div",
|
|
6153
6198
|
{
|
|
6154
6199
|
ref,
|
|
@@ -6161,7 +6206,7 @@ var DescriptionListGroup = forwardRef33((props, ref) => {
|
|
|
6161
6206
|
DescriptionListGroup.displayName = "DescriptionListGroup";
|
|
6162
6207
|
|
|
6163
6208
|
// src/components/Drawer/Drawer.tsx
|
|
6164
|
-
import { forwardRef as forwardRef34, useId as
|
|
6209
|
+
import { forwardRef as forwardRef34, useId as useId6 } from "react";
|
|
6165
6210
|
import { createPortal } from "react-dom";
|
|
6166
6211
|
|
|
6167
6212
|
// src/components/Drawer/Drawer.module.css
|
|
@@ -6181,7 +6226,7 @@ var Drawer_default = {
|
|
|
6181
6226
|
};
|
|
6182
6227
|
|
|
6183
6228
|
// src/components/Drawer/Drawer.tsx
|
|
6184
|
-
import { jsx as
|
|
6229
|
+
import { jsx as jsx208, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
6185
6230
|
var Drawer = forwardRef34((props, ref) => {
|
|
6186
6231
|
const {
|
|
6187
6232
|
children,
|
|
@@ -6198,7 +6243,7 @@ var Drawer = forwardRef34((props, ref) => {
|
|
|
6198
6243
|
widthProps,
|
|
6199
6244
|
...rest
|
|
6200
6245
|
} = props;
|
|
6201
|
-
const generatedId =
|
|
6246
|
+
const generatedId = useId6();
|
|
6202
6247
|
const uniqueId = id != null ? id : `${generatedId}-drawer`;
|
|
6203
6248
|
const hasHeader = !!header;
|
|
6204
6249
|
const headerId = hasHeader ? `${uniqueId}-header` : void 0;
|
|
@@ -6243,8 +6288,8 @@ var Drawer = forwardRef34((props, ref) => {
|
|
|
6243
6288
|
style: { ...htmlProps == null ? void 0 : htmlProps.style, ...widthProps }
|
|
6244
6289
|
};
|
|
6245
6290
|
return isOpen || hasTransitionedIn ? createPortal(
|
|
6246
|
-
/* @__PURE__ */
|
|
6247
|
-
/* @__PURE__ */
|
|
6291
|
+
/* @__PURE__ */ jsxs36(Paper, { ...containerProps, elevation: 4, children: [
|
|
6292
|
+
/* @__PURE__ */ jsxs36(
|
|
6248
6293
|
"div",
|
|
6249
6294
|
{
|
|
6250
6295
|
className: cn(
|
|
@@ -6253,12 +6298,12 @@ var Drawer = forwardRef34((props, ref) => {
|
|
|
6253
6298
|
utilStyles_default["scrollable-y"]
|
|
6254
6299
|
),
|
|
6255
6300
|
children: [
|
|
6256
|
-
hasHeader && /* @__PURE__ */
|
|
6301
|
+
hasHeader && /* @__PURE__ */ jsx208("div", { id: headerId, children: typeof header === "string" ? /* @__PURE__ */ jsx208(Typography, { typographyType: "headingSans03", children: header }) : header }),
|
|
6257
6302
|
children
|
|
6258
6303
|
]
|
|
6259
6304
|
}
|
|
6260
6305
|
),
|
|
6261
|
-
/* @__PURE__ */
|
|
6306
|
+
/* @__PURE__ */ jsx208(
|
|
6262
6307
|
Button,
|
|
6263
6308
|
{
|
|
6264
6309
|
className: cn(Drawer_default["button--close"]),
|
|
@@ -6281,18 +6326,18 @@ import {
|
|
|
6281
6326
|
Children as ReactChildren3,
|
|
6282
6327
|
cloneElement as cloneElement3,
|
|
6283
6328
|
isValidElement as isValidElement4,
|
|
6284
|
-
useId as
|
|
6329
|
+
useId as useId7,
|
|
6285
6330
|
useRef as useRef16,
|
|
6286
6331
|
useState as useState9
|
|
6287
6332
|
} from "react";
|
|
6288
|
-
import { Fragment as Fragment6, jsxs as
|
|
6333
|
+
import { Fragment as Fragment6, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
6289
6334
|
var DrawerGroup = ({
|
|
6290
6335
|
children,
|
|
6291
6336
|
drawerId,
|
|
6292
6337
|
onOpen,
|
|
6293
6338
|
onClose
|
|
6294
6339
|
}) => {
|
|
6295
|
-
const generatedId =
|
|
6340
|
+
const generatedId = useId7();
|
|
6296
6341
|
const uniqueDrawerId = drawerId != null ? drawerId : `${generatedId}-drawer`;
|
|
6297
6342
|
const buttonRef = useRef16(null);
|
|
6298
6343
|
const [closed, setClosed] = useState9(true);
|
|
@@ -6320,7 +6365,7 @@ var DrawerGroup = ({
|
|
|
6320
6365
|
onClose: handleClose
|
|
6321
6366
|
}));
|
|
6322
6367
|
});
|
|
6323
|
-
return /* @__PURE__ */
|
|
6368
|
+
return /* @__PURE__ */ jsxs37(Fragment6, { children: [
|
|
6324
6369
|
" ",
|
|
6325
6370
|
Children8,
|
|
6326
6371
|
" "
|
|
@@ -6336,7 +6381,7 @@ var EmptyContent_default = {
|
|
|
6336
6381
|
};
|
|
6337
6382
|
|
|
6338
6383
|
// src/components/EmptyContent/EmptyContent.tsx
|
|
6339
|
-
import { jsx as
|
|
6384
|
+
import { jsx as jsx209, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
6340
6385
|
function EmptyContent({
|
|
6341
6386
|
title,
|
|
6342
6387
|
message,
|
|
@@ -6344,15 +6389,15 @@ function EmptyContent({
|
|
|
6344
6389
|
className,
|
|
6345
6390
|
...rest
|
|
6346
6391
|
}) {
|
|
6347
|
-
return /* @__PURE__ */
|
|
6348
|
-
title && /* @__PURE__ */
|
|
6349
|
-
/* @__PURE__ */
|
|
6392
|
+
return /* @__PURE__ */ jsx209("div", { ...rest, className: cn(className, EmptyContent_default.containter), children: /* @__PURE__ */ jsxs38("div", { className: EmptyContent_default.text, children: [
|
|
6393
|
+
title && /* @__PURE__ */ jsx209(Heading, { level: titleHeadingLevel, typographyType: "headingSans02", children: title }),
|
|
6394
|
+
/* @__PURE__ */ jsx209(Paragraph, { className: EmptyContent_default.message, children: message })
|
|
6350
6395
|
] }) });
|
|
6351
6396
|
}
|
|
6352
6397
|
EmptyContent.displayName = "EmptyContent";
|
|
6353
6398
|
|
|
6354
6399
|
// src/components/FavStar/FavStar.tsx
|
|
6355
|
-
import { forwardRef as forwardRef35, useId as
|
|
6400
|
+
import { forwardRef as forwardRef35, useId as useId8 } from "react";
|
|
6356
6401
|
|
|
6357
6402
|
// src/components/FavStar/FavStar.module.css
|
|
6358
6403
|
var FavStar_default = {
|
|
@@ -6401,7 +6446,7 @@ function useControllableState(props) {
|
|
|
6401
6446
|
}
|
|
6402
6447
|
|
|
6403
6448
|
// src/components/FavStar/FavStar.tsx
|
|
6404
|
-
import { jsx as
|
|
6449
|
+
import { jsx as jsx210, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
6405
6450
|
var FavStar = forwardRef35(
|
|
6406
6451
|
({
|
|
6407
6452
|
id,
|
|
@@ -6420,13 +6465,13 @@ var FavStar = forwardRef35(
|
|
|
6420
6465
|
htmlProps,
|
|
6421
6466
|
rest
|
|
6422
6467
|
);
|
|
6423
|
-
const generatedId =
|
|
6468
|
+
const generatedId = useId8();
|
|
6424
6469
|
const [checked, setChecked] = useControllableState({
|
|
6425
6470
|
value: checkedProp,
|
|
6426
6471
|
defaultValue: defaultChecked != null ? defaultChecked : false,
|
|
6427
6472
|
onChange
|
|
6428
6473
|
});
|
|
6429
|
-
return /* @__PURE__ */
|
|
6474
|
+
return /* @__PURE__ */ jsxs39(
|
|
6430
6475
|
"label",
|
|
6431
6476
|
{
|
|
6432
6477
|
className: cn(
|
|
@@ -6438,7 +6483,7 @@ var FavStar = forwardRef35(
|
|
|
6438
6483
|
style,
|
|
6439
6484
|
htmlFor: id != null ? id : generatedId,
|
|
6440
6485
|
children: [
|
|
6441
|
-
/* @__PURE__ */
|
|
6486
|
+
/* @__PURE__ */ jsx210(
|
|
6442
6487
|
"input",
|
|
6443
6488
|
{
|
|
6444
6489
|
...props,
|
|
@@ -6451,8 +6496,8 @@ var FavStar = forwardRef35(
|
|
|
6451
6496
|
className: utilStyles_default["hide-input"]
|
|
6452
6497
|
}
|
|
6453
6498
|
),
|
|
6454
|
-
/* @__PURE__ */
|
|
6455
|
-
/* @__PURE__ */
|
|
6499
|
+
/* @__PURE__ */ jsx210(Icon, { iconSize: size2, icon: StarIcon, className: FavStar_default.icon }),
|
|
6500
|
+
/* @__PURE__ */ jsx210(
|
|
6456
6501
|
Icon,
|
|
6457
6502
|
{
|
|
6458
6503
|
iconSize: size2,
|
|
@@ -6518,7 +6563,7 @@ var Stack_default = {
|
|
|
6518
6563
|
};
|
|
6519
6564
|
|
|
6520
6565
|
// src/components/Stack/Stack.tsx
|
|
6521
|
-
import { jsx as
|
|
6566
|
+
import { jsx as jsx211 } from "react/jsx-runtime";
|
|
6522
6567
|
var HStack = forwardRef36(
|
|
6523
6568
|
({
|
|
6524
6569
|
id,
|
|
@@ -6536,7 +6581,7 @@ var HStack = forwardRef36(
|
|
|
6536
6581
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6537
6582
|
["--dds-stack-justify-content"]: justify
|
|
6538
6583
|
};
|
|
6539
|
-
return /* @__PURE__ */
|
|
6584
|
+
return /* @__PURE__ */ jsx211(
|
|
6540
6585
|
"div",
|
|
6541
6586
|
{
|
|
6542
6587
|
ref,
|
|
@@ -6575,7 +6620,7 @@ var VStack = forwardRef36(
|
|
|
6575
6620
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6576
6621
|
["--dds-stack-justify-content"]: justify
|
|
6577
6622
|
};
|
|
6578
|
-
return /* @__PURE__ */
|
|
6623
|
+
return /* @__PURE__ */ jsx211(
|
|
6579
6624
|
"div",
|
|
6580
6625
|
{
|
|
6581
6626
|
ref,
|
|
@@ -6602,16 +6647,16 @@ function spacingPropToCn(value) {
|
|
|
6602
6647
|
}
|
|
6603
6648
|
|
|
6604
6649
|
// src/components/TextArea/TextArea.tsx
|
|
6605
|
-
import { forwardRef as forwardRef37, useEffect as useEffect16, useId as
|
|
6650
|
+
import { forwardRef as forwardRef37, useEffect as useEffect16, useId as useId9, useRef as useRef18, useState as useState11 } from "react";
|
|
6606
6651
|
|
|
6607
6652
|
// src/components/TextArea/TextArea.module.css
|
|
6608
6653
|
var TextArea_default = {
|
|
6609
|
-
|
|
6610
|
-
|
|
6654
|
+
textarea: "TextArea_textarea",
|
|
6655
|
+
"message-container": "TextArea_message-container"
|
|
6611
6656
|
};
|
|
6612
6657
|
|
|
6613
6658
|
// src/components/TextArea/TextArea.tsx
|
|
6614
|
-
import { jsx as
|
|
6659
|
+
import { jsx as jsx212, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
6615
6660
|
var TextArea = forwardRef37(
|
|
6616
6661
|
(props, ref) => {
|
|
6617
6662
|
const {
|
|
@@ -6626,12 +6671,14 @@ var TextArea = forwardRef37(
|
|
|
6626
6671
|
label,
|
|
6627
6672
|
"aria-required": ariaRequired = false,
|
|
6628
6673
|
"aria-describedby": ariaDescribedby,
|
|
6674
|
+
maxLength,
|
|
6675
|
+
withCharacterCounter = true,
|
|
6629
6676
|
className,
|
|
6630
6677
|
style,
|
|
6631
6678
|
width,
|
|
6632
6679
|
...rest
|
|
6633
6680
|
} = props;
|
|
6634
|
-
const generatedId =
|
|
6681
|
+
const generatedId = useId9();
|
|
6635
6682
|
const uniqueId = id != null ? id : `${generatedId}-textArea`;
|
|
6636
6683
|
const textAreaRef = useRef18(null);
|
|
6637
6684
|
const multiRef = useCombinedRef(ref, textAreaRef);
|
|
@@ -6653,47 +6700,71 @@ var TextArea = forwardRef37(
|
|
|
6653
6700
|
const hasLabel = !!label;
|
|
6654
6701
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
6655
6702
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
6703
|
+
const characterCounterId = derivativeIdGenerator(
|
|
6704
|
+
uniqueId,
|
|
6705
|
+
"characterCounter"
|
|
6706
|
+
);
|
|
6656
6707
|
const showRequiredStyling = required || !!ariaRequired;
|
|
6657
|
-
const
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
value,
|
|
6661
|
-
defaultValue,
|
|
6662
|
-
id: uniqueId,
|
|
6663
|
-
disabled,
|
|
6664
|
-
hasErrorMessage,
|
|
6665
|
-
required,
|
|
6666
|
-
"aria-required": ariaRequired,
|
|
6667
|
-
"aria-describedby": spaceSeparatedIdListGenerator([
|
|
6668
|
-
tip ? tipId : void 0,
|
|
6669
|
-
errorMessage ? errorMessageId : void 0,
|
|
6670
|
-
ariaDescribedby
|
|
6671
|
-
]),
|
|
6672
|
-
"aria-invalid": hasErrorMessage ? true : void 0,
|
|
6673
|
-
...rest
|
|
6708
|
+
const styleVariables = {
|
|
6709
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6710
|
+
["--dds-text-area-width"]: width != null ? width : "var(--dds-input-default-width)"
|
|
6674
6711
|
};
|
|
6675
|
-
return /* @__PURE__ */
|
|
6712
|
+
return /* @__PURE__ */ jsxs40(
|
|
6676
6713
|
"div",
|
|
6677
6714
|
{
|
|
6678
|
-
className: cn(className, Input_default.container
|
|
6679
|
-
style: { ...style
|
|
6715
|
+
className: cn(className, Input_default.container),
|
|
6716
|
+
style: { ...style },
|
|
6680
6717
|
children: [
|
|
6681
|
-
hasLabel && /* @__PURE__ */
|
|
6682
|
-
|
|
6718
|
+
hasLabel && /* @__PURE__ */ jsx212(
|
|
6719
|
+
Label,
|
|
6720
|
+
{
|
|
6721
|
+
showRequiredStyling,
|
|
6722
|
+
htmlFor: uniqueId,
|
|
6723
|
+
className: Input_default.label,
|
|
6724
|
+
children: label
|
|
6725
|
+
}
|
|
6726
|
+
),
|
|
6727
|
+
/* @__PURE__ */ jsx212(
|
|
6683
6728
|
"textarea",
|
|
6684
6729
|
{
|
|
6685
|
-
|
|
6730
|
+
ref: multiRef,
|
|
6731
|
+
id: uniqueId,
|
|
6732
|
+
onChange: onChangeHandler,
|
|
6733
|
+
value,
|
|
6734
|
+
defaultValue,
|
|
6735
|
+
disabled,
|
|
6736
|
+
maxLength,
|
|
6737
|
+
required,
|
|
6738
|
+
"aria-required": ariaRequired,
|
|
6739
|
+
"aria-describedby": spaceSeparatedIdListGenerator([
|
|
6740
|
+
tip ? tipId : void 0,
|
|
6741
|
+
errorMessage ? errorMessageId : void 0,
|
|
6742
|
+
maxLength && withCharacterCounter ? characterCounterId : void 0,
|
|
6743
|
+
ariaDescribedby
|
|
6744
|
+
]),
|
|
6745
|
+
"aria-invalid": hasErrorMessage ? true : void 0,
|
|
6686
6746
|
className: cn(
|
|
6687
6747
|
Input_default.input,
|
|
6688
6748
|
Input_default["input--stateful"],
|
|
6749
|
+
hasErrorMessage && Input_default["input--stateful-danger"],
|
|
6689
6750
|
TextArea_default.textarea,
|
|
6690
6751
|
scrollbar,
|
|
6691
6752
|
typographyStyles_default[getTypographyCn(inputTypographyTypes["medium"])],
|
|
6692
6753
|
focusable
|
|
6693
|
-
)
|
|
6754
|
+
),
|
|
6755
|
+
style: styleVariables,
|
|
6756
|
+
...rest
|
|
6694
6757
|
}
|
|
6695
6758
|
),
|
|
6696
|
-
|
|
6759
|
+
/* @__PURE__ */ jsxs40("div", { className: TextArea_default["message-container"], children: [
|
|
6760
|
+
renderInputMessage(tip, tipId, errorMessage, errorMessageId),
|
|
6761
|
+
renderCharCounter(
|
|
6762
|
+
characterCounterId,
|
|
6763
|
+
withCharacterCounter,
|
|
6764
|
+
text.length,
|
|
6765
|
+
maxLength
|
|
6766
|
+
)
|
|
6767
|
+
] })
|
|
6697
6768
|
]
|
|
6698
6769
|
}
|
|
6699
6770
|
);
|
|
@@ -6702,7 +6773,7 @@ var TextArea = forwardRef37(
|
|
|
6702
6773
|
TextArea.displayName = "TextArea";
|
|
6703
6774
|
|
|
6704
6775
|
// src/components/Feedback/CommentComponent.tsx
|
|
6705
|
-
import { jsx as
|
|
6776
|
+
import { jsx as jsx213, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
6706
6777
|
var CommentComponent = ({
|
|
6707
6778
|
rating,
|
|
6708
6779
|
feedbackText,
|
|
@@ -6714,21 +6785,21 @@ var CommentComponent = ({
|
|
|
6714
6785
|
handleSubmit,
|
|
6715
6786
|
handleFeedbackTextChange
|
|
6716
6787
|
}) => {
|
|
6717
|
-
return /* @__PURE__ */
|
|
6718
|
-
/* @__PURE__ */
|
|
6719
|
-
/* @__PURE__ */
|
|
6788
|
+
return /* @__PURE__ */ jsxs41(VStack, { gap: "x1", align: "flex-start", children: [
|
|
6789
|
+
/* @__PURE__ */ jsxs41("span", { className: Feedback_default["rating-submitted-title"], children: [
|
|
6790
|
+
/* @__PURE__ */ jsx213(
|
|
6720
6791
|
Icon,
|
|
6721
6792
|
{
|
|
6722
6793
|
icon: rating === "positive" ? ThumbUpFilledIcon : ThumbDownFilledIcon,
|
|
6723
6794
|
color: "iconActionResting"
|
|
6724
6795
|
}
|
|
6725
6796
|
),
|
|
6726
|
-
/* @__PURE__ */
|
|
6797
|
+
/* @__PURE__ */ jsxs41(Paragraph, { children: [
|
|
6727
6798
|
ratingSubmittedTitle,
|
|
6728
6799
|
" "
|
|
6729
6800
|
] })
|
|
6730
6801
|
] }),
|
|
6731
|
-
/* @__PURE__ */
|
|
6802
|
+
/* @__PURE__ */ jsx213(
|
|
6732
6803
|
TextArea,
|
|
6733
6804
|
{
|
|
6734
6805
|
value: feedbackText,
|
|
@@ -6737,7 +6808,7 @@ var CommentComponent = ({
|
|
|
6737
6808
|
tip: textAreaTip
|
|
6738
6809
|
}
|
|
6739
6810
|
),
|
|
6740
|
-
/* @__PURE__ */
|
|
6811
|
+
/* @__PURE__ */ jsx213(
|
|
6741
6812
|
Button,
|
|
6742
6813
|
{
|
|
6743
6814
|
purpose: "secondary",
|
|
@@ -6757,7 +6828,7 @@ import {
|
|
|
6757
6828
|
forwardRef as forwardRef38,
|
|
6758
6829
|
isValidElement as isValidElement5,
|
|
6759
6830
|
useEffect as useEffect17,
|
|
6760
|
-
useId as
|
|
6831
|
+
useId as useId10,
|
|
6761
6832
|
useRef as useRef19,
|
|
6762
6833
|
useState as useState12
|
|
6763
6834
|
} from "react";
|
|
@@ -6771,7 +6842,7 @@ var Tooltip_default = {
|
|
|
6771
6842
|
};
|
|
6772
6843
|
|
|
6773
6844
|
// src/components/Tooltip/Tooltip.tsx
|
|
6774
|
-
import { jsx as
|
|
6845
|
+
import { jsx as jsx214, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
6775
6846
|
var Tooltip = forwardRef38(
|
|
6776
6847
|
(props, ref) => {
|
|
6777
6848
|
const {
|
|
@@ -6788,7 +6859,7 @@ var Tooltip = forwardRef38(
|
|
|
6788
6859
|
htmlProps,
|
|
6789
6860
|
...rest
|
|
6790
6861
|
} = props;
|
|
6791
|
-
const generatedId =
|
|
6862
|
+
const generatedId = useId10();
|
|
6792
6863
|
const uniqueTooltipId = tooltipId != null ? tooltipId : `${generatedId}-tooltip`;
|
|
6793
6864
|
const [open, setOpen] = useState12(false);
|
|
6794
6865
|
const [inView, setInView] = useState12(false);
|
|
@@ -6869,9 +6940,9 @@ var Tooltip = forwardRef38(
|
|
|
6869
6940
|
style: { ...positionStyles.floating }
|
|
6870
6941
|
};
|
|
6871
6942
|
const openCn = open && inView ? "open" : "closed";
|
|
6872
|
-
return /* @__PURE__ */
|
|
6943
|
+
return /* @__PURE__ */ jsxs42("div", { ...containerProps, children: [
|
|
6873
6944
|
anchorElement,
|
|
6874
|
-
/* @__PURE__ */
|
|
6945
|
+
/* @__PURE__ */ jsxs42(
|
|
6875
6946
|
Paper,
|
|
6876
6947
|
{
|
|
6877
6948
|
...wrapperProps,
|
|
@@ -6885,15 +6956,15 @@ var Tooltip = forwardRef38(
|
|
|
6885
6956
|
),
|
|
6886
6957
|
children: [
|
|
6887
6958
|
text,
|
|
6888
|
-
/* @__PURE__ */
|
|
6889
|
-
/* @__PURE__ */
|
|
6959
|
+
/* @__PURE__ */ jsx214("div", { ref: setArrowElement, style: positionStyles.arrow, children: /* @__PURE__ */ jsxs42("svg", { width: "36", height: "9", children: [
|
|
6960
|
+
/* @__PURE__ */ jsx214(
|
|
6890
6961
|
"path",
|
|
6891
6962
|
{
|
|
6892
6963
|
d: "M16.586 6.586L10 0h16.154a.373.373 0 00-.263.11l-6.477 6.476a2 2 0 01-2.828 0z",
|
|
6893
6964
|
className: Tooltip_default["svg-arrow__background"]
|
|
6894
6965
|
}
|
|
6895
6966
|
),
|
|
6896
|
-
/* @__PURE__ */
|
|
6967
|
+
/* @__PURE__ */ jsx214(
|
|
6897
6968
|
"path",
|
|
6898
6969
|
{
|
|
6899
6970
|
fillRule: "evenodd",
|
|
@@ -6912,7 +6983,7 @@ var Tooltip = forwardRef38(
|
|
|
6912
6983
|
Tooltip.displayName = "Tooltip";
|
|
6913
6984
|
|
|
6914
6985
|
// src/components/Feedback/RatingComponent.tsx
|
|
6915
|
-
import { jsx as
|
|
6986
|
+
import { jsx as jsx215, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
6916
6987
|
var RatingComponent = ({
|
|
6917
6988
|
layout,
|
|
6918
6989
|
ratingLabel,
|
|
@@ -6922,7 +6993,7 @@ var RatingComponent = ({
|
|
|
6922
6993
|
handleRatingChange
|
|
6923
6994
|
}) => {
|
|
6924
6995
|
const layoutCn = layout === "vertical" ? "column" : "row";
|
|
6925
|
-
const button3 = (purpose, layout2) => /* @__PURE__ */
|
|
6996
|
+
const button3 = (purpose, layout2) => /* @__PURE__ */ jsx215(
|
|
6926
6997
|
"button",
|
|
6927
6998
|
{
|
|
6928
6999
|
"aria-label": purpose === "up" ? thumbUpTooltip : thumbDownTooltip,
|
|
@@ -6933,7 +7004,7 @@ var RatingComponent = ({
|
|
|
6933
7004
|
Feedback_default[`button--${layout2}`],
|
|
6934
7005
|
focusable
|
|
6935
7006
|
),
|
|
6936
|
-
children: /* @__PURE__ */
|
|
7007
|
+
children: /* @__PURE__ */ jsx215(
|
|
6937
7008
|
Icon,
|
|
6938
7009
|
{
|
|
6939
7010
|
icon: purpose === "up" ? ThumbUpIcon : ThumbDownIcon,
|
|
@@ -6942,7 +7013,7 @@ var RatingComponent = ({
|
|
|
6942
7013
|
)
|
|
6943
7014
|
}
|
|
6944
7015
|
);
|
|
6945
|
-
return /* @__PURE__ */
|
|
7016
|
+
return /* @__PURE__ */ jsxs43(
|
|
6946
7017
|
"div",
|
|
6947
7018
|
{
|
|
6948
7019
|
className: cn(
|
|
@@ -6950,10 +7021,10 @@ var RatingComponent = ({
|
|
|
6950
7021
|
Feedback_default[`rating-container--${layoutCn}`]
|
|
6951
7022
|
),
|
|
6952
7023
|
children: [
|
|
6953
|
-
/* @__PURE__ */
|
|
6954
|
-
loading ? /* @__PURE__ */
|
|
6955
|
-
/* @__PURE__ */
|
|
6956
|
-
/* @__PURE__ */
|
|
7024
|
+
/* @__PURE__ */ jsx215(Label, { children: ratingLabel }),
|
|
7025
|
+
loading ? /* @__PURE__ */ jsx215(Spinner, { tooltip: "Laster opp tilbakemelding ..." }) : /* @__PURE__ */ jsxs43(HStack, { gap: "x1", children: [
|
|
7026
|
+
/* @__PURE__ */ jsx215(Tooltip, { text: thumbUpTooltip, children: button3("up", layout) }),
|
|
7027
|
+
/* @__PURE__ */ jsx215(Tooltip, { text: thumbDownTooltip, children: /* @__PURE__ */ jsx215("div", { children: button3("down", layout) }) })
|
|
6957
7028
|
] })
|
|
6958
7029
|
]
|
|
6959
7030
|
}
|
|
@@ -6961,7 +7032,7 @@ var RatingComponent = ({
|
|
|
6961
7032
|
};
|
|
6962
7033
|
|
|
6963
7034
|
// src/components/Feedback/Feedback.tsx
|
|
6964
|
-
import { jsx as
|
|
7035
|
+
import { jsx as jsx216 } from "react/jsx-runtime";
|
|
6965
7036
|
var Feedback = ({
|
|
6966
7037
|
layout = "vertical",
|
|
6967
7038
|
ratingLabel = "Hva syns du om tjenesten?",
|
|
@@ -7007,7 +7078,7 @@ var Feedback = ({
|
|
|
7007
7078
|
isSubmittedProp === void 0 && setIsFeedbackSubmitted(true);
|
|
7008
7079
|
};
|
|
7009
7080
|
if (rating === null && !isFeedbackSubmitted) {
|
|
7010
|
-
return /* @__PURE__ */
|
|
7081
|
+
return /* @__PURE__ */ jsx216(
|
|
7011
7082
|
RatingComponent,
|
|
7012
7083
|
{
|
|
7013
7084
|
layout,
|
|
@@ -7020,7 +7091,7 @@ var Feedback = ({
|
|
|
7020
7091
|
);
|
|
7021
7092
|
}
|
|
7022
7093
|
if (!feedbackTextAreaExcluded && !isFeedbackSubmitted) {
|
|
7023
|
-
return /* @__PURE__ */
|
|
7094
|
+
return /* @__PURE__ */ jsx216(
|
|
7024
7095
|
CommentComponent,
|
|
7025
7096
|
{
|
|
7026
7097
|
rating,
|
|
@@ -7035,7 +7106,7 @@ var Feedback = ({
|
|
|
7035
7106
|
}
|
|
7036
7107
|
);
|
|
7037
7108
|
}
|
|
7038
|
-
return /* @__PURE__ */
|
|
7109
|
+
return /* @__PURE__ */ jsx216(Paragraph, { children: submittedTitle });
|
|
7039
7110
|
};
|
|
7040
7111
|
|
|
7041
7112
|
// src/components/Fieldset/Fieldset.tsx
|
|
@@ -7047,11 +7118,11 @@ var Fieldset_default = {
|
|
|
7047
7118
|
};
|
|
7048
7119
|
|
|
7049
7120
|
// src/components/Fieldset/Fieldset.tsx
|
|
7050
|
-
import { jsx as
|
|
7121
|
+
import { jsx as jsx217 } from "react/jsx-runtime";
|
|
7051
7122
|
var Fieldset = forwardRef39(
|
|
7052
7123
|
(props, ref) => {
|
|
7053
7124
|
const { id, className, htmlProps, ...rest } = props;
|
|
7054
|
-
return /* @__PURE__ */
|
|
7125
|
+
return /* @__PURE__ */ jsx217(
|
|
7055
7126
|
"fieldset",
|
|
7056
7127
|
{
|
|
7057
7128
|
ref,
|
|
@@ -7067,17 +7138,17 @@ var Fieldset = forwardRef39(
|
|
|
7067
7138
|
);
|
|
7068
7139
|
|
|
7069
7140
|
// src/components/FileUploader/FileUploader.tsx
|
|
7070
|
-
import { useId as
|
|
7141
|
+
import { useId as useId11 } from "react";
|
|
7071
7142
|
|
|
7072
7143
|
// src/components/FileUploader/ErrorList.tsx
|
|
7073
|
-
import { jsx as
|
|
7144
|
+
import { jsx as jsx218 } from "react/jsx-runtime";
|
|
7074
7145
|
var ErrorList = (props) => {
|
|
7075
7146
|
const { errors } = props;
|
|
7076
7147
|
if (errors.length < 1) {
|
|
7077
7148
|
return null;
|
|
7078
7149
|
}
|
|
7079
7150
|
if (errors.length === 1) {
|
|
7080
|
-
return /* @__PURE__ */
|
|
7151
|
+
return /* @__PURE__ */ jsx218(
|
|
7081
7152
|
InputMessage,
|
|
7082
7153
|
{
|
|
7083
7154
|
id: errors[0].id,
|
|
@@ -7086,8 +7157,8 @@ var ErrorList = (props) => {
|
|
|
7086
7157
|
}
|
|
7087
7158
|
);
|
|
7088
7159
|
}
|
|
7089
|
-
return /* @__PURE__ */
|
|
7090
|
-
return /* @__PURE__ */
|
|
7160
|
+
return /* @__PURE__ */ jsx218("ul", { className: utilStyles_default["remove-list-styling"], children: errors.map(({ id, message }) => {
|
|
7161
|
+
return /* @__PURE__ */ jsx218("li", { children: /* @__PURE__ */ jsx218(
|
|
7091
7162
|
InputMessage,
|
|
7092
7163
|
{
|
|
7093
7164
|
id,
|
|
@@ -7108,21 +7179,36 @@ var FileUploader_default = {
|
|
|
7108
7179
|
"input-container--no-drag-zone": "FileUploader_input-container--no-drag-zone",
|
|
7109
7180
|
file: "FileUploader_file",
|
|
7110
7181
|
"file--invalid": "FileUploader_file--invalid",
|
|
7182
|
+
"file__icon--invalid": "FileUploader_file__icon--invalid",
|
|
7183
|
+
"file__icon--valid": "FileUploader_file__icon--valid",
|
|
7111
7184
|
file__name: "FileUploader_file__name"
|
|
7112
7185
|
};
|
|
7113
7186
|
|
|
7114
7187
|
// src/components/FileUploader/File.tsx
|
|
7115
|
-
import { jsx as
|
|
7188
|
+
import { jsx as jsx219, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
7116
7189
|
var File = (props) => {
|
|
7117
7190
|
const { parentId, index, file: stateFile, removeFile, isValid } = props;
|
|
7118
7191
|
const errorsList = stateFile.errors.map((e, errorIndex) => ({
|
|
7119
7192
|
id: derivativeIdGenerator(parentId, `file-${index}-error-${errorIndex}`),
|
|
7120
7193
|
message: e
|
|
7121
7194
|
}));
|
|
7122
|
-
return /* @__PURE__ */
|
|
7123
|
-
/* @__PURE__ */
|
|
7124
|
-
/* @__PURE__ */
|
|
7125
|
-
|
|
7195
|
+
return /* @__PURE__ */ jsxs44("li", { children: [
|
|
7196
|
+
/* @__PURE__ */ jsxs44("div", { className: cn(FileUploader_default.file, !isValid && FileUploader_default["file--invalid"]), children: [
|
|
7197
|
+
/* @__PURE__ */ jsx219(
|
|
7198
|
+
"span",
|
|
7199
|
+
{
|
|
7200
|
+
className: cn(FileUploader_default.file__name, typographyStyles_default["body-sans-02"]),
|
|
7201
|
+
children: stateFile.file.name
|
|
7202
|
+
}
|
|
7203
|
+
),
|
|
7204
|
+
/* @__PURE__ */ jsx219(
|
|
7205
|
+
Icon,
|
|
7206
|
+
{
|
|
7207
|
+
icon: isValid ? CheckCircledIcon : ErrorIcon,
|
|
7208
|
+
className: FileUploader_default[`file__icon--${isValid ? "valid" : "invalid"}`]
|
|
7209
|
+
}
|
|
7210
|
+
),
|
|
7211
|
+
/* @__PURE__ */ jsx219(
|
|
7126
7212
|
Button,
|
|
7127
7213
|
{
|
|
7128
7214
|
size: "small",
|
|
@@ -7131,7 +7217,7 @@ var File = (props) => {
|
|
|
7131
7217
|
onClick: removeFile,
|
|
7132
7218
|
icon: CloseIcon,
|
|
7133
7219
|
htmlProps: {
|
|
7134
|
-
"aria-label": `Fjern fil
|
|
7220
|
+
"aria-label": `Fjern fil ${stateFile.file.name}`,
|
|
7135
7221
|
"aria-invalid": !isValid ? true : void 0,
|
|
7136
7222
|
"aria-errormessage": !isValid ? "Ugyldig fil" : void 0,
|
|
7137
7223
|
"aria-describedby": spaceSeparatedIdListGenerator(
|
|
@@ -7141,7 +7227,7 @@ var File = (props) => {
|
|
|
7141
7227
|
}
|
|
7142
7228
|
)
|
|
7143
7229
|
] }),
|
|
7144
|
-
/* @__PURE__ */
|
|
7230
|
+
/* @__PURE__ */ jsx219(ErrorList, { errors: errorsList })
|
|
7145
7231
|
] });
|
|
7146
7232
|
};
|
|
7147
7233
|
|
|
@@ -7433,19 +7519,19 @@ var useFileUploader = (props) => {
|
|
|
7433
7519
|
};
|
|
7434
7520
|
|
|
7435
7521
|
// src/components/VisuallyHidden/VisuallyHidden.tsx
|
|
7436
|
-
import { jsx as
|
|
7522
|
+
import { jsx as jsx220 } from "react/jsx-runtime";
|
|
7437
7523
|
var VisuallyHidden = (props) => {
|
|
7438
7524
|
const { id, className, htmlProps, as, ...rest } = props;
|
|
7439
7525
|
const cl = cn(className, utilStyles_default["visually-hidden"]);
|
|
7440
7526
|
if (as === "div") {
|
|
7441
|
-
return /* @__PURE__ */
|
|
7527
|
+
return /* @__PURE__ */ jsx220("div", { ...getBaseHTMLProps(id, cl, htmlProps, rest) });
|
|
7442
7528
|
}
|
|
7443
|
-
return /* @__PURE__ */
|
|
7529
|
+
return /* @__PURE__ */ jsx220("span", { ...getBaseHTMLProps(id, cl, htmlProps, rest) });
|
|
7444
7530
|
};
|
|
7445
7531
|
VisuallyHidden.displayName = "VisuallyHidden";
|
|
7446
7532
|
|
|
7447
7533
|
// src/components/FileUploader/FileUploader.tsx
|
|
7448
|
-
import { jsx as
|
|
7534
|
+
import { jsx as jsx221, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
7449
7535
|
var FileUploader = (props) => {
|
|
7450
7536
|
const {
|
|
7451
7537
|
id,
|
|
@@ -7468,7 +7554,7 @@ var FileUploader = (props) => {
|
|
|
7468
7554
|
className,
|
|
7469
7555
|
...rest
|
|
7470
7556
|
} = props;
|
|
7471
|
-
const generatedId =
|
|
7557
|
+
const generatedId = useId11();
|
|
7472
7558
|
const uniqueId = id != null ? id : `${generatedId}-fileUploader`;
|
|
7473
7559
|
const {
|
|
7474
7560
|
state: { files: stateFiles, isDragActive, rootErrors },
|
|
@@ -7494,7 +7580,7 @@ var FileUploader = (props) => {
|
|
|
7494
7580
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
7495
7581
|
const buttonId = derivativeIdGenerator(uniqueId, "button");
|
|
7496
7582
|
const inputId = derivativeIdGenerator(uniqueId, "input");
|
|
7497
|
-
const fileListElements = stateFiles.map((stateFile, index) => /* @__PURE__ */
|
|
7583
|
+
const fileListElements = stateFiles.map((stateFile, index) => /* @__PURE__ */ jsx221(
|
|
7498
7584
|
File,
|
|
7499
7585
|
{
|
|
7500
7586
|
parentId: uniqueId,
|
|
@@ -7509,7 +7595,7 @@ var FileUploader = (props) => {
|
|
|
7509
7595
|
id: derivativeIdGenerator(uniqueId, `error-${index}`),
|
|
7510
7596
|
message: e
|
|
7511
7597
|
}));
|
|
7512
|
-
const button3 = /* @__PURE__ */
|
|
7598
|
+
const button3 = /* @__PURE__ */ jsx221(
|
|
7513
7599
|
Button,
|
|
7514
7600
|
{
|
|
7515
7601
|
...getButtonProps(),
|
|
@@ -7529,17 +7615,21 @@ var FileUploader = (props) => {
|
|
|
7529
7615
|
children: btnLabel
|
|
7530
7616
|
}
|
|
7531
7617
|
);
|
|
7532
|
-
return /* @__PURE__ */
|
|
7618
|
+
return /* @__PURE__ */ jsxs45(
|
|
7533
7619
|
"div",
|
|
7534
7620
|
{
|
|
7535
7621
|
id: uniqueId,
|
|
7536
|
-
className: cn(
|
|
7622
|
+
className: cn(
|
|
7623
|
+
className,
|
|
7624
|
+
FileUploader_default.container,
|
|
7625
|
+
typographyStyles_default["body-sans-02"]
|
|
7626
|
+
),
|
|
7537
7627
|
style: { ...style, width },
|
|
7538
7628
|
...rest,
|
|
7539
7629
|
children: [
|
|
7540
|
-
hasLabel && /* @__PURE__ */
|
|
7541
|
-
hasTip && /* @__PURE__ */
|
|
7542
|
-
withDragAndDrop ? /* @__PURE__ */
|
|
7630
|
+
hasLabel && /* @__PURE__ */ jsx221(Label, { id: labelId, showRequiredStyling: showRequiredMarker, children: label }),
|
|
7631
|
+
hasTip && /* @__PURE__ */ jsx221(InputMessage, { id: tipId, message: tip, messageType: "tip" }),
|
|
7632
|
+
withDragAndDrop ? /* @__PURE__ */ jsxs45(
|
|
7543
7633
|
"div",
|
|
7544
7634
|
{
|
|
7545
7635
|
...getRootProps(),
|
|
@@ -7549,7 +7639,7 @@ var FileUploader = (props) => {
|
|
|
7549
7639
|
isDragActive && FileUploader_default["input-container--drag-active"]
|
|
7550
7640
|
),
|
|
7551
7641
|
children: [
|
|
7552
|
-
/* @__PURE__ */
|
|
7642
|
+
/* @__PURE__ */ jsx221(
|
|
7553
7643
|
"input",
|
|
7554
7644
|
{
|
|
7555
7645
|
...getInputProps(),
|
|
@@ -7558,16 +7648,16 @@ var FileUploader = (props) => {
|
|
|
7558
7648
|
}
|
|
7559
7649
|
),
|
|
7560
7650
|
dropAreaLabel,
|
|
7561
|
-
/* @__PURE__ */
|
|
7651
|
+
/* @__PURE__ */ jsx221(VisuallyHidden, { as: "span", children: "velg fil med p\xE5f\xF8lgende knapp" }),
|
|
7562
7652
|
button3
|
|
7563
7653
|
]
|
|
7564
7654
|
}
|
|
7565
|
-
) : /* @__PURE__ */
|
|
7566
|
-
/* @__PURE__ */
|
|
7655
|
+
) : /* @__PURE__ */ jsxs45("div", { className: FileUploader_default["input-container--no-drag-zone"], children: [
|
|
7656
|
+
/* @__PURE__ */ jsx221("input", { ...getInputProps(), id: inputId }),
|
|
7567
7657
|
button3
|
|
7568
7658
|
] }),
|
|
7569
|
-
/* @__PURE__ */
|
|
7570
|
-
!hideFileList && /* @__PURE__ */
|
|
7659
|
+
/* @__PURE__ */ jsx221(ErrorList, { errors: rootErrorsList }),
|
|
7660
|
+
!hideFileList && /* @__PURE__ */ jsx221("ul", { className: utilStyles_default["remove-list-styling"], children: fileListElements })
|
|
7571
7661
|
]
|
|
7572
7662
|
}
|
|
7573
7663
|
);
|
|
@@ -7589,7 +7679,7 @@ var GlobalMessage_default = {
|
|
|
7589
7679
|
};
|
|
7590
7680
|
|
|
7591
7681
|
// src/components/GlobalMessage/GlobalMessage.tsx
|
|
7592
|
-
import { jsx as
|
|
7682
|
+
import { jsx as jsx222, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
7593
7683
|
var purposeVariants = {
|
|
7594
7684
|
info: {
|
|
7595
7685
|
icon: InfoIcon
|
|
@@ -7615,7 +7705,7 @@ var GlobalMessage = forwardRef40(
|
|
|
7615
7705
|
...rest
|
|
7616
7706
|
} = props;
|
|
7617
7707
|
const [isClosed, setClosed] = useState14(false);
|
|
7618
|
-
return !isClosed ? /* @__PURE__ */
|
|
7708
|
+
return !isClosed ? /* @__PURE__ */ jsxs46(
|
|
7619
7709
|
"div",
|
|
7620
7710
|
{
|
|
7621
7711
|
ref,
|
|
@@ -7631,7 +7721,7 @@ var GlobalMessage = forwardRef40(
|
|
|
7631
7721
|
rest
|
|
7632
7722
|
),
|
|
7633
7723
|
children: [
|
|
7634
|
-
/* @__PURE__ */
|
|
7724
|
+
/* @__PURE__ */ jsxs46(
|
|
7635
7725
|
"div",
|
|
7636
7726
|
{
|
|
7637
7727
|
className: cn(
|
|
@@ -7639,12 +7729,12 @@ var GlobalMessage = forwardRef40(
|
|
|
7639
7729
|
closable && GlobalMessage_default["content--closable"]
|
|
7640
7730
|
),
|
|
7641
7731
|
children: [
|
|
7642
|
-
/* @__PURE__ */
|
|
7643
|
-
children != null ? children : /* @__PURE__ */
|
|
7732
|
+
/* @__PURE__ */ jsx222(Icon, { icon: purposeVariants[purpose].icon, className: GlobalMessage_default.icon }),
|
|
7733
|
+
children != null ? children : /* @__PURE__ */ jsx222("span", { children: message })
|
|
7644
7734
|
]
|
|
7645
7735
|
}
|
|
7646
7736
|
),
|
|
7647
|
-
closable && /* @__PURE__ */
|
|
7737
|
+
closable && /* @__PURE__ */ jsx222(
|
|
7648
7738
|
Button,
|
|
7649
7739
|
{
|
|
7650
7740
|
icon: CloseIcon,
|
|
@@ -7675,7 +7765,7 @@ var Grid_default = {
|
|
|
7675
7765
|
};
|
|
7676
7766
|
|
|
7677
7767
|
// src/components/Grid/Grid.tsx
|
|
7678
|
-
import { jsx as
|
|
7768
|
+
import { jsx as jsx223 } from "react/jsx-runtime";
|
|
7679
7769
|
var Grid = (props) => {
|
|
7680
7770
|
const { id, className, htmlProps, as, maxWidth, rowGap, style, ...rest } = props;
|
|
7681
7771
|
const styleVariables = {
|
|
@@ -7700,13 +7790,13 @@ var Grid = (props) => {
|
|
|
7700
7790
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7701
7791
|
["--dds-grid-xl-row-gap"]: (rowGap == null ? void 0 : rowGap.xl) ? rowGap.xl : "var(--dds-grid-xl-gutter-size)"
|
|
7702
7792
|
};
|
|
7703
|
-
return as === "div" ? /* @__PURE__ */
|
|
7793
|
+
return as === "div" ? /* @__PURE__ */ jsx223(
|
|
7704
7794
|
"div",
|
|
7705
7795
|
{
|
|
7706
7796
|
...getBaseHTMLProps(id, cn(className, Grid_default.grid), htmlProps, rest),
|
|
7707
7797
|
style: { ...htmlProps == null ? void 0 : htmlProps.style, ...styleVariables }
|
|
7708
7798
|
}
|
|
7709
|
-
) : /* @__PURE__ */
|
|
7799
|
+
) : /* @__PURE__ */ jsx223(
|
|
7710
7800
|
"form",
|
|
7711
7801
|
{
|
|
7712
7802
|
...getBaseHTMLProps(id, cn(className, Grid_default.grid), htmlProps, rest),
|
|
@@ -7717,7 +7807,7 @@ var Grid = (props) => {
|
|
|
7717
7807
|
Grid.displayName = "Grid";
|
|
7718
7808
|
|
|
7719
7809
|
// src/components/Grid/GridChild.tsx
|
|
7720
|
-
import { jsx as
|
|
7810
|
+
import { jsx as jsx224 } from "react/jsx-runtime";
|
|
7721
7811
|
var isRelativeGridColumn = (type) => {
|
|
7722
7812
|
return type === "all" || type === "firstHalf" || type === "secondHalf";
|
|
7723
7813
|
};
|
|
@@ -7767,7 +7857,7 @@ var GridChild = (props) => {
|
|
|
7767
7857
|
firstHalf: "first-half",
|
|
7768
7858
|
secondHalf: "second-half"
|
|
7769
7859
|
};
|
|
7770
|
-
return /* @__PURE__ */
|
|
7860
|
+
return /* @__PURE__ */ jsx224(
|
|
7771
7861
|
"div",
|
|
7772
7862
|
{
|
|
7773
7863
|
...getBaseHTMLProps(
|
|
@@ -7796,11 +7886,11 @@ var InlineButton_default = {
|
|
|
7796
7886
|
};
|
|
7797
7887
|
|
|
7798
7888
|
// src/components/InlineButton/InlineButton.tsx
|
|
7799
|
-
import { jsx as
|
|
7889
|
+
import { jsx as jsx225 } from "react/jsx-runtime";
|
|
7800
7890
|
var InlineButton = forwardRef41(
|
|
7801
7891
|
(props, ref) => {
|
|
7802
7892
|
const { className, ...rest } = props;
|
|
7803
|
-
return /* @__PURE__ */
|
|
7893
|
+
return /* @__PURE__ */ jsx225(
|
|
7804
7894
|
"button",
|
|
7805
7895
|
{
|
|
7806
7896
|
ref,
|
|
@@ -7828,7 +7918,7 @@ import {
|
|
|
7828
7918
|
isValidElement as isValidElement6,
|
|
7829
7919
|
useState as useState15
|
|
7830
7920
|
} from "react";
|
|
7831
|
-
import { Fragment as Fragment7, jsx as
|
|
7921
|
+
import { Fragment as Fragment7, jsx as jsx226 } from "react/jsx-runtime";
|
|
7832
7922
|
var InlineEdit = (props) => {
|
|
7833
7923
|
const {
|
|
7834
7924
|
emptiable,
|
|
@@ -7878,12 +7968,12 @@ var InlineEdit = (props) => {
|
|
|
7878
7968
|
emptiable
|
|
7879
7969
|
})
|
|
7880
7970
|
);
|
|
7881
|
-
return /* @__PURE__ */
|
|
7971
|
+
return /* @__PURE__ */ jsx226(Fragment7, { children: inputChild });
|
|
7882
7972
|
};
|
|
7883
7973
|
InlineEdit.displayName = "InlineEdit";
|
|
7884
7974
|
|
|
7885
7975
|
// src/components/InlineEdit/InlineTextArea.tsx
|
|
7886
|
-
import { forwardRef as forwardRef42, useId as
|
|
7976
|
+
import { forwardRef as forwardRef42, useId as useId12, useRef as useRef21 } from "react";
|
|
7887
7977
|
|
|
7888
7978
|
// src/components/InlineEdit/InlineEdit.module.css
|
|
7889
7979
|
var InlineEdit_default = {
|
|
@@ -7896,15 +7986,15 @@ var InlineEdit_default = {
|
|
|
7896
7986
|
};
|
|
7897
7987
|
|
|
7898
7988
|
// src/components/InlineEdit/InlineEdit.utils.tsx
|
|
7899
|
-
import { jsxs as
|
|
7900
|
-
var inlineEditVisuallyHidden = (id, emptiable) => /* @__PURE__ */
|
|
7989
|
+
import { jsxs as jsxs47 } from "react/jsx-runtime";
|
|
7990
|
+
var inlineEditVisuallyHidden = (id, emptiable) => /* @__PURE__ */ jsxs47(VisuallyHidden, { id, as: "span", children: [
|
|
7901
7991
|
"Escape, Enter eller Tab for \xE5 lagre.",
|
|
7902
7992
|
" ",
|
|
7903
7993
|
!emptiable && "Inputfeltet er ikke t\xF8mmbar."
|
|
7904
7994
|
] });
|
|
7905
7995
|
|
|
7906
7996
|
// src/components/InlineEdit/InlineTextArea.tsx
|
|
7907
|
-
import { jsx as
|
|
7997
|
+
import { jsx as jsx227, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
7908
7998
|
var InlineTextArea = forwardRef42((props, ref) => {
|
|
7909
7999
|
const {
|
|
7910
8000
|
id,
|
|
@@ -7917,7 +8007,7 @@ var InlineTextArea = forwardRef42((props, ref) => {
|
|
|
7917
8007
|
hideIcon,
|
|
7918
8008
|
...rest
|
|
7919
8009
|
} = props;
|
|
7920
|
-
const genereatedId =
|
|
8010
|
+
const genereatedId = useId12();
|
|
7921
8011
|
const uniqueId = id != null ? id : `${genereatedId}-InlineTextArea`;
|
|
7922
8012
|
const hasErrorMessage = !!errorMessage;
|
|
7923
8013
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
@@ -7926,9 +8016,9 @@ var InlineTextArea = forwardRef42((props, ref) => {
|
|
|
7926
8016
|
const descId = derivativeIdGenerator(uniqueId, "desc");
|
|
7927
8017
|
const inputRef = useRef21(null);
|
|
7928
8018
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
7929
|
-
return /* @__PURE__ */
|
|
7930
|
-
/* @__PURE__ */
|
|
7931
|
-
!isEditing && !hideIcon && /* @__PURE__ */
|
|
8019
|
+
return /* @__PURE__ */ jsxs48("div", { className: InlineEdit_default.container, style: { width }, children: [
|
|
8020
|
+
/* @__PURE__ */ jsxs48("div", { className: Input_default["input-group"], children: [
|
|
8021
|
+
!isEditing && !hideIcon && /* @__PURE__ */ jsx227(
|
|
7932
8022
|
"span",
|
|
7933
8023
|
{
|
|
7934
8024
|
onClick: () => {
|
|
@@ -7936,10 +8026,10 @@ var InlineTextArea = forwardRef42((props, ref) => {
|
|
|
7936
8026
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
7937
8027
|
},
|
|
7938
8028
|
className: InlineEdit_default["icon-wrapper"],
|
|
7939
|
-
children: /* @__PURE__ */
|
|
8029
|
+
children: /* @__PURE__ */ jsx227(Icon, { icon: EditIcon, iconSize: "small" })
|
|
7940
8030
|
}
|
|
7941
8031
|
),
|
|
7942
|
-
/* @__PURE__ */
|
|
8032
|
+
/* @__PURE__ */ jsx227(
|
|
7943
8033
|
"textarea",
|
|
7944
8034
|
{
|
|
7945
8035
|
...rest,
|
|
@@ -7971,12 +8061,12 @@ var InlineTextArea = forwardRef42((props, ref) => {
|
|
|
7971
8061
|
InlineTextArea.displayName = "InlineTextArea";
|
|
7972
8062
|
|
|
7973
8063
|
// src/components/InlineEdit/InlineEditTextArea.tsx
|
|
7974
|
-
import { jsx as
|
|
8064
|
+
import { jsx as jsx228 } from "react/jsx-runtime";
|
|
7975
8065
|
var InlineEditTextArea = forwardRef43((props, ref) => {
|
|
7976
8066
|
const { onSetValue, emptiable, value, onFocus, onChange, onBlur, ...rest } = props;
|
|
7977
8067
|
const textareaRef = useRef22(null);
|
|
7978
8068
|
const combinedRef = useCombinedRef(ref, textareaRef);
|
|
7979
|
-
return /* @__PURE__ */
|
|
8069
|
+
return /* @__PURE__ */ jsx228(
|
|
7980
8070
|
InlineEdit,
|
|
7981
8071
|
{
|
|
7982
8072
|
onSetValue,
|
|
@@ -7986,7 +8076,7 @@ var InlineEditTextArea = forwardRef43((props, ref) => {
|
|
|
7986
8076
|
onFocus,
|
|
7987
8077
|
onChange,
|
|
7988
8078
|
onBlur,
|
|
7989
|
-
children: /* @__PURE__ */
|
|
8079
|
+
children: /* @__PURE__ */ jsx228(InlineTextArea, { ref: combinedRef, ...rest })
|
|
7990
8080
|
}
|
|
7991
8081
|
);
|
|
7992
8082
|
});
|
|
@@ -7995,8 +8085,8 @@ var InlineEditTextArea = forwardRef43((props, ref) => {
|
|
|
7995
8085
|
import { forwardRef as forwardRef45, useRef as useRef24 } from "react";
|
|
7996
8086
|
|
|
7997
8087
|
// src/components/InlineEdit/InlineInput.tsx
|
|
7998
|
-
import { forwardRef as forwardRef44, useId as
|
|
7999
|
-
import { jsx as
|
|
8088
|
+
import { forwardRef as forwardRef44, useId as useId13, useRef as useRef23 } from "react";
|
|
8089
|
+
import { jsx as jsx229, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
8000
8090
|
var InlineInput = forwardRef44(
|
|
8001
8091
|
(props, ref) => {
|
|
8002
8092
|
const {
|
|
@@ -8010,7 +8100,7 @@ var InlineInput = forwardRef44(
|
|
|
8010
8100
|
hideIcon,
|
|
8011
8101
|
...rest
|
|
8012
8102
|
} = props;
|
|
8013
|
-
const genereatedId =
|
|
8103
|
+
const genereatedId = useId13();
|
|
8014
8104
|
const uniqueId = id != null ? id : `${genereatedId}-InlineInput`;
|
|
8015
8105
|
const hasErrorMessage = !!errorMessage;
|
|
8016
8106
|
const hasError = !!error;
|
|
@@ -8019,9 +8109,9 @@ var InlineInput = forwardRef44(
|
|
|
8019
8109
|
const descId = derivativeIdGenerator(uniqueId, "desc");
|
|
8020
8110
|
const inputRef = useRef23(null);
|
|
8021
8111
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
8022
|
-
return /* @__PURE__ */
|
|
8023
|
-
/* @__PURE__ */
|
|
8024
|
-
!isEditing && !hideIcon && /* @__PURE__ */
|
|
8112
|
+
return /* @__PURE__ */ jsxs49("div", { className: InlineEdit_default.container, style: { width }, children: [
|
|
8113
|
+
/* @__PURE__ */ jsxs49("div", { className: Input_default["input-group"], children: [
|
|
8114
|
+
!isEditing && !hideIcon && /* @__PURE__ */ jsx229(
|
|
8025
8115
|
"span",
|
|
8026
8116
|
{
|
|
8027
8117
|
onClick: () => {
|
|
@@ -8029,10 +8119,10 @@ var InlineInput = forwardRef44(
|
|
|
8029
8119
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
8030
8120
|
},
|
|
8031
8121
|
className: InlineEdit_default["icon-wrapper"],
|
|
8032
|
-
children: /* @__PURE__ */
|
|
8122
|
+
children: /* @__PURE__ */ jsx229(Icon, { icon: EditIcon, iconSize: "small" })
|
|
8033
8123
|
}
|
|
8034
8124
|
),
|
|
8035
|
-
/* @__PURE__ */
|
|
8125
|
+
/* @__PURE__ */ jsx229(
|
|
8036
8126
|
"input",
|
|
8037
8127
|
{
|
|
8038
8128
|
...rest,
|
|
@@ -8063,12 +8153,12 @@ var InlineInput = forwardRef44(
|
|
|
8063
8153
|
InlineInput.displayName = "InlineInput";
|
|
8064
8154
|
|
|
8065
8155
|
// src/components/InlineEdit/InlineEditInput.tsx
|
|
8066
|
-
import { jsx as
|
|
8156
|
+
import { jsx as jsx230 } from "react/jsx-runtime";
|
|
8067
8157
|
var InlineEditInput = forwardRef45((props, ref) => {
|
|
8068
8158
|
const { onSetValue, emptiable, value, onFocus, onChange, onBlur, ...rest } = props;
|
|
8069
8159
|
const inputRef = useRef24(null);
|
|
8070
8160
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
8071
|
-
return /* @__PURE__ */
|
|
8161
|
+
return /* @__PURE__ */ jsx230(
|
|
8072
8162
|
InlineEdit,
|
|
8073
8163
|
{
|
|
8074
8164
|
onSetValue,
|
|
@@ -8078,7 +8168,7 @@ var InlineEditInput = forwardRef45((props, ref) => {
|
|
|
8078
8168
|
onFocus,
|
|
8079
8169
|
onChange,
|
|
8080
8170
|
onBlur,
|
|
8081
|
-
children: /* @__PURE__ */
|
|
8171
|
+
children: /* @__PURE__ */ jsx230(InlineInput, { ...rest, ref: combinedRef })
|
|
8082
8172
|
}
|
|
8083
8173
|
);
|
|
8084
8174
|
});
|
|
@@ -8103,9 +8193,9 @@ var InternalHeader_default = {
|
|
|
8103
8193
|
|
|
8104
8194
|
// src/components/InternalHeader/NavigationItem.tsx
|
|
8105
8195
|
import { forwardRef as forwardRef46 } from "react";
|
|
8106
|
-
import { jsx as
|
|
8196
|
+
import { jsx as jsx231 } from "react/jsx-runtime";
|
|
8107
8197
|
var NavigationItem = forwardRef46(({ title, isCurrent, ...rest }, ref) => {
|
|
8108
|
-
return /* @__PURE__ */
|
|
8198
|
+
return /* @__PURE__ */ jsx231(
|
|
8109
8199
|
"a",
|
|
8110
8200
|
{
|
|
8111
8201
|
...rest,
|
|
@@ -8123,7 +8213,7 @@ var NavigationItem = forwardRef46(({ title, isCurrent, ...rest }, ref) => {
|
|
|
8123
8213
|
});
|
|
8124
8214
|
|
|
8125
8215
|
// src/components/InternalHeader/InternalHeader.tsx
|
|
8126
|
-
import { jsx as
|
|
8216
|
+
import { jsx as jsx232, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
8127
8217
|
var InternalHeader = (props) => {
|
|
8128
8218
|
const {
|
|
8129
8219
|
applicationDesc,
|
|
@@ -8156,7 +8246,7 @@ var InternalHeader = (props) => {
|
|
|
8156
8246
|
const hasNavigationElements = !!navigationElements && navigationElements.length > 0;
|
|
8157
8247
|
const hasContextMenuElements = !!contextMenuElements && contextMenuElements.length > 0;
|
|
8158
8248
|
const hasNavInContextMenu = smallScreen && hasNavigationElements;
|
|
8159
|
-
const navigation = hasNavigationElements && !smallScreen ? /* @__PURE__ */
|
|
8249
|
+
const navigation = hasNavigationElements && !smallScreen ? /* @__PURE__ */ jsx232("nav", { "aria-label": "sidenavigasjon", children: /* @__PURE__ */ jsx232(
|
|
8160
8250
|
"ul",
|
|
8161
8251
|
{
|
|
8162
8252
|
className: cn(
|
|
@@ -8167,7 +8257,7 @@ var InternalHeader = (props) => {
|
|
|
8167
8257
|
children: navigationElements.map((item, index) => {
|
|
8168
8258
|
const { href, ...rest2 } = item;
|
|
8169
8259
|
const isCurrent = href === currentPage;
|
|
8170
|
-
return /* @__PURE__ */
|
|
8260
|
+
return /* @__PURE__ */ jsx232("li", { className: InternalHeader_default["nav-list__item"], children: /* @__PURE__ */ jsx232(
|
|
8171
8261
|
NavigationItem,
|
|
8172
8262
|
{
|
|
8173
8263
|
href,
|
|
@@ -8180,7 +8270,7 @@ var InternalHeader = (props) => {
|
|
|
8180
8270
|
}
|
|
8181
8271
|
) }) : null;
|
|
8182
8272
|
const hasContextMenu = hasContextMenuElements || !!userProps || hasNavInContextMenu;
|
|
8183
|
-
return /* @__PURE__ */
|
|
8273
|
+
return /* @__PURE__ */ jsxs50(
|
|
8184
8274
|
"div",
|
|
8185
8275
|
{
|
|
8186
8276
|
...getBaseHTMLProps(
|
|
@@ -8195,7 +8285,7 @@ var InternalHeader = (props) => {
|
|
|
8195
8285
|
rest
|
|
8196
8286
|
),
|
|
8197
8287
|
children: [
|
|
8198
|
-
/* @__PURE__ */
|
|
8288
|
+
/* @__PURE__ */ jsx232(Typography, { typographyType: "bodySans02", bold: true, as: "span", children: applicationHref ? /* @__PURE__ */ jsx232(
|
|
8199
8289
|
"a",
|
|
8200
8290
|
{
|
|
8201
8291
|
href: applicationHref,
|
|
@@ -8204,11 +8294,11 @@ var InternalHeader = (props) => {
|
|
|
8204
8294
|
children: applicationName
|
|
8205
8295
|
}
|
|
8206
8296
|
) : applicationName }),
|
|
8207
|
-
/* @__PURE__ */
|
|
8208
|
-
(hasContextMenu || navigation !== null) && /* @__PURE__ */
|
|
8297
|
+
/* @__PURE__ */ jsx232(Typography, { typographyType: "bodySans02", as: "span", children: applicationDesc }),
|
|
8298
|
+
(hasContextMenu || navigation !== null) && /* @__PURE__ */ jsx232("div", { className: InternalHeader_default["bar-separator"] }),
|
|
8209
8299
|
navigation,
|
|
8210
|
-
hasContextMenu && /* @__PURE__ */
|
|
8211
|
-
/* @__PURE__ */
|
|
8300
|
+
hasContextMenu && /* @__PURE__ */ jsxs50("div", { className: InternalHeader_default["context-menu-group"], children: [
|
|
8301
|
+
/* @__PURE__ */ jsx232(
|
|
8212
8302
|
Button,
|
|
8213
8303
|
{
|
|
8214
8304
|
ref: buttonRef,
|
|
@@ -8220,7 +8310,7 @@ var InternalHeader = (props) => {
|
|
|
8220
8310
|
"aria-label": "\xE5pne meny"
|
|
8221
8311
|
}
|
|
8222
8312
|
),
|
|
8223
|
-
/* @__PURE__ */
|
|
8313
|
+
/* @__PURE__ */ jsx232(
|
|
8224
8314
|
OverflowMenu,
|
|
8225
8315
|
{
|
|
8226
8316
|
isOpen: !contextMenuIsClosed,
|
|
@@ -8252,7 +8342,7 @@ var List_default = {
|
|
|
8252
8342
|
};
|
|
8253
8343
|
|
|
8254
8344
|
// src/components/List/List.tsx
|
|
8255
|
-
import { jsx as
|
|
8345
|
+
import { jsx as jsx233 } from "react/jsx-runtime";
|
|
8256
8346
|
var List = forwardRef47((props, ref) => {
|
|
8257
8347
|
const {
|
|
8258
8348
|
listType = "unordered",
|
|
@@ -8264,7 +8354,7 @@ var List = forwardRef47((props, ref) => {
|
|
|
8264
8354
|
...rest
|
|
8265
8355
|
} = props;
|
|
8266
8356
|
const List2 = listType === "ordered" ? "ol" : "ul";
|
|
8267
|
-
return /* @__PURE__ */
|
|
8357
|
+
return /* @__PURE__ */ jsx233(
|
|
8268
8358
|
List2,
|
|
8269
8359
|
{
|
|
8270
8360
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
@@ -8282,10 +8372,10 @@ List.displayName = "List";
|
|
|
8282
8372
|
|
|
8283
8373
|
// src/components/List/ListItem.tsx
|
|
8284
8374
|
import { forwardRef as forwardRef48 } from "react";
|
|
8285
|
-
import { jsx as
|
|
8375
|
+
import { jsx as jsx234 } from "react/jsx-runtime";
|
|
8286
8376
|
var ListItem = forwardRef48(
|
|
8287
8377
|
({ className, ...rest }, ref) => {
|
|
8288
|
-
return /* @__PURE__ */
|
|
8378
|
+
return /* @__PURE__ */ jsx234("li", { ref, ...rest, className: cn(className, List_default.li) });
|
|
8289
8379
|
}
|
|
8290
8380
|
);
|
|
8291
8381
|
ListItem.displayName = "ListItem";
|
|
@@ -8312,7 +8402,7 @@ var LocalMessage_default = {
|
|
|
8312
8402
|
};
|
|
8313
8403
|
|
|
8314
8404
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
8315
|
-
import { Fragment as Fragment8, jsx as
|
|
8405
|
+
import { Fragment as Fragment8, jsx as jsx235, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
8316
8406
|
var purposeVariants2 = {
|
|
8317
8407
|
info: {
|
|
8318
8408
|
icon: InfoIcon
|
|
@@ -8347,9 +8437,9 @@ var LocalMessage = forwardRef49(
|
|
|
8347
8437
|
} = props;
|
|
8348
8438
|
const [isClosed, setClosed] = useState17(false);
|
|
8349
8439
|
if (isClosed) {
|
|
8350
|
-
return /* @__PURE__ */
|
|
8440
|
+
return /* @__PURE__ */ jsx235(Fragment8, {});
|
|
8351
8441
|
}
|
|
8352
|
-
return /* @__PURE__ */
|
|
8442
|
+
return /* @__PURE__ */ jsxs51(
|
|
8353
8443
|
"div",
|
|
8354
8444
|
{
|
|
8355
8445
|
ref,
|
|
@@ -8368,15 +8458,15 @@ var LocalMessage = forwardRef49(
|
|
|
8368
8458
|
),
|
|
8369
8459
|
style: { ...htmlProps == null ? void 0 : htmlProps.style, width },
|
|
8370
8460
|
children: [
|
|
8371
|
-
/* @__PURE__ */
|
|
8461
|
+
/* @__PURE__ */ jsx235(
|
|
8372
8462
|
Icon,
|
|
8373
8463
|
{
|
|
8374
8464
|
icon: purposeVariants2[purpose].icon,
|
|
8375
8465
|
className: cn(LocalMessage_default.icon, LocalMessage_default.container__icon)
|
|
8376
8466
|
}
|
|
8377
8467
|
),
|
|
8378
|
-
/* @__PURE__ */
|
|
8379
|
-
closable && /* @__PURE__ */
|
|
8468
|
+
/* @__PURE__ */ jsx235("div", { className: LocalMessage_default.container__text, children: children != null ? children : /* @__PURE__ */ jsx235("span", { children: message }) }),
|
|
8469
|
+
closable && /* @__PURE__ */ jsx235(
|
|
8380
8470
|
Button,
|
|
8381
8471
|
{
|
|
8382
8472
|
icon: CloseIcon,
|
|
@@ -8401,7 +8491,7 @@ LocalMessage.displayName = "LocalMessage";
|
|
|
8401
8491
|
import {
|
|
8402
8492
|
forwardRef as forwardRef50,
|
|
8403
8493
|
useEffect as useEffect20,
|
|
8404
|
-
useId as
|
|
8494
|
+
useId as useId14
|
|
8405
8495
|
} from "react";
|
|
8406
8496
|
import { createPortal as createPortal2 } from "react-dom";
|
|
8407
8497
|
|
|
@@ -8440,7 +8530,7 @@ var Modal_default = {
|
|
|
8440
8530
|
};
|
|
8441
8531
|
|
|
8442
8532
|
// src/components/Modal/Modal.tsx
|
|
8443
|
-
import { jsx as
|
|
8533
|
+
import { jsx as jsx236, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
8444
8534
|
var Modal = forwardRef50((props, ref) => {
|
|
8445
8535
|
const {
|
|
8446
8536
|
isOpen = false,
|
|
@@ -8455,7 +8545,7 @@ var Modal = forwardRef50((props, ref) => {
|
|
|
8455
8545
|
htmlProps,
|
|
8456
8546
|
...rest
|
|
8457
8547
|
} = props;
|
|
8458
|
-
const generatedId =
|
|
8548
|
+
const generatedId = useId14();
|
|
8459
8549
|
const modalId = id != null ? id : `${generatedId}-modal`;
|
|
8460
8550
|
const headerId = `${modalId}-header`;
|
|
8461
8551
|
const modalRef = useFocusTrap(isOpen, initialFocusRef);
|
|
@@ -8479,14 +8569,14 @@ var Modal = forwardRef50((props, ref) => {
|
|
|
8479
8569
|
useOnKeyDown(["Escape", "Esc"], () => handleClose());
|
|
8480
8570
|
const hasTransitionedIn = useMountTransition(isOpen, 200);
|
|
8481
8571
|
return isOpen || hasTransitionedIn ? createPortal2(
|
|
8482
|
-
/* @__PURE__ */
|
|
8572
|
+
/* @__PURE__ */ jsx236(
|
|
8483
8573
|
"div",
|
|
8484
8574
|
{
|
|
8485
8575
|
className: cn(
|
|
8486
8576
|
Modal_default.backdrop,
|
|
8487
8577
|
hasTransitionedIn && isOpen ? Modal_default["backdrop--visible"] : Modal_default["backdrop--hidden"]
|
|
8488
8578
|
),
|
|
8489
|
-
children: /* @__PURE__ */
|
|
8579
|
+
children: /* @__PURE__ */ jsxs52(
|
|
8490
8580
|
Paper,
|
|
8491
8581
|
{
|
|
8492
8582
|
...getBaseHTMLProps(
|
|
@@ -8504,11 +8594,11 @@ var Modal = forwardRef50((props, ref) => {
|
|
|
8504
8594
|
id: modalId,
|
|
8505
8595
|
elevation: 4,
|
|
8506
8596
|
children: [
|
|
8507
|
-
/* @__PURE__ */
|
|
8508
|
-
header && /* @__PURE__ */
|
|
8597
|
+
/* @__PURE__ */ jsxs52("div", { className: Modal_default.content, children: [
|
|
8598
|
+
header && /* @__PURE__ */ jsx236("div", { id: headerId, className: Modal_default.header, children: typeof header === "string" ? /* @__PURE__ */ jsx236(Typography, { typographyType: "headingSans03", children: header }) : header }),
|
|
8509
8599
|
children
|
|
8510
8600
|
] }),
|
|
8511
|
-
onClose && /* @__PURE__ */
|
|
8601
|
+
onClose && /* @__PURE__ */ jsx236(
|
|
8512
8602
|
Button,
|
|
8513
8603
|
{
|
|
8514
8604
|
size: "small",
|
|
@@ -8531,11 +8621,11 @@ Modal.displayName = "Modal";
|
|
|
8531
8621
|
|
|
8532
8622
|
// src/components/Modal/ModalBody.tsx
|
|
8533
8623
|
import { forwardRef as forwardRef51 } from "react";
|
|
8534
|
-
import { jsx as
|
|
8624
|
+
import { jsx as jsx237 } from "react/jsx-runtime";
|
|
8535
8625
|
var ModalBody = forwardRef51(
|
|
8536
8626
|
(props, ref) => {
|
|
8537
8627
|
const { children, id, className, scrollable, htmlProps, height, ...rest } = props;
|
|
8538
|
-
return /* @__PURE__ */
|
|
8628
|
+
return /* @__PURE__ */ jsx237(
|
|
8539
8629
|
"div",
|
|
8540
8630
|
{
|
|
8541
8631
|
ref,
|
|
@@ -8560,16 +8650,16 @@ ModalBody.displayName = "ModalBody";
|
|
|
8560
8650
|
|
|
8561
8651
|
// src/components/Modal/ModalActions.tsx
|
|
8562
8652
|
import { forwardRef as forwardRef52 } from "react";
|
|
8563
|
-
import { jsx as
|
|
8653
|
+
import { jsx as jsx238 } from "react/jsx-runtime";
|
|
8564
8654
|
var ModalActions = forwardRef52(
|
|
8565
8655
|
({ className, ...rest }, ref) => {
|
|
8566
|
-
return /* @__PURE__ */
|
|
8656
|
+
return /* @__PURE__ */ jsx238("div", { ref, ...rest, className: cn(className, Modal_default.actions) });
|
|
8567
8657
|
}
|
|
8568
8658
|
);
|
|
8569
8659
|
ModalActions.displayName = "ModalActions";
|
|
8570
8660
|
|
|
8571
8661
|
// src/components/Pagination/Pagination.tsx
|
|
8572
|
-
import { forwardRef as
|
|
8662
|
+
import { forwardRef as forwardRef55, useState as useState18 } from "react";
|
|
8573
8663
|
|
|
8574
8664
|
// src/components/Pagination/Pagination.module.css
|
|
8575
8665
|
var Pagination_default = {
|
|
@@ -8617,7 +8707,7 @@ function PaginationGenerator(pagesAmount, activePage) {
|
|
|
8617
8707
|
}
|
|
8618
8708
|
|
|
8619
8709
|
// src/components/Select/Select.tsx
|
|
8620
|
-
import { forwardRef as forwardRef53, useId as
|
|
8710
|
+
import { forwardRef as forwardRef53, useId as useId15 } from "react";
|
|
8621
8711
|
import {
|
|
8622
8712
|
default as ReactSelect
|
|
8623
8713
|
} from "react-select";
|
|
@@ -8998,7 +9088,7 @@ var getCustomStyles = (size2, hasError, isReadOnly) => ({
|
|
|
8998
9088
|
import {
|
|
8999
9089
|
components
|
|
9000
9090
|
} from "react-select";
|
|
9001
|
-
import { jsx as
|
|
9091
|
+
import { jsx as jsx239, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
9002
9092
|
var {
|
|
9003
9093
|
Option,
|
|
9004
9094
|
NoOptionsMessage,
|
|
@@ -9009,27 +9099,27 @@ var {
|
|
|
9009
9099
|
MultiValueRemove,
|
|
9010
9100
|
Control
|
|
9011
9101
|
} = components;
|
|
9012
|
-
var DDSOption = (props, componentSize) => /* @__PURE__ */
|
|
9013
|
-
props.isSelected && /* @__PURE__ */
|
|
9102
|
+
var DDSOption = (props, componentSize) => /* @__PURE__ */ jsxs53(Option, { ...props, children: [
|
|
9103
|
+
props.isSelected && /* @__PURE__ */ jsx239(Icon, { icon: CheckIcon, iconSize: getFormInputIconSize(componentSize) }),
|
|
9014
9104
|
props.children
|
|
9015
9105
|
] });
|
|
9016
|
-
var CustomOption = (props, Element) => /* @__PURE__ */
|
|
9017
|
-
var CustomSingleValue = (props, id, Element) => /* @__PURE__ */
|
|
9018
|
-
var DDSNoOptionsMessage = (props) => /* @__PURE__ */
|
|
9019
|
-
var DDSClearIndicator = (props, size2) => /* @__PURE__ */
|
|
9020
|
-
var DDSMultiValueRemove = (props) => /* @__PURE__ */
|
|
9106
|
+
var CustomOption = (props, Element) => /* @__PURE__ */ jsx239(Option, { ...props, children: /* @__PURE__ */ jsx239(Element, { ...props }) });
|
|
9107
|
+
var CustomSingleValue = (props, id, Element) => /* @__PURE__ */ jsx239(SingleValue, { ...props, children: /* @__PURE__ */ jsx239("div", { id, className: Select_default["inner-single-value"], children: Element ? /* @__PURE__ */ jsx239(Element, { ...props }) : props.children }) });
|
|
9108
|
+
var DDSNoOptionsMessage = (props) => /* @__PURE__ */ jsx239(NoOptionsMessage, { ...props, children: "Ingen treff" });
|
|
9109
|
+
var DDSClearIndicator = (props, size2) => /* @__PURE__ */ jsx239(ClearIndicator, { ...props, children: /* @__PURE__ */ jsx239(Icon, { icon: CloseSmallIcon, iconSize: getFormInputIconSize(size2) }) });
|
|
9110
|
+
var DDSMultiValueRemove = (props) => /* @__PURE__ */ jsx239(MultiValueRemove, { ...props, children: /* @__PURE__ */ jsx239(Icon, { icon: CloseSmallIcon, iconSize: "small" }) });
|
|
9021
9111
|
var DDSDropdownIndicator = (props, size2) => {
|
|
9022
9112
|
const { className, ...rest } = props;
|
|
9023
|
-
return /* @__PURE__ */
|
|
9113
|
+
return /* @__PURE__ */ jsx239(
|
|
9024
9114
|
DropdownIndicator,
|
|
9025
9115
|
{
|
|
9026
9116
|
...rest,
|
|
9027
9117
|
className: cn(className, Select_default["dropdown-indicator"]),
|
|
9028
|
-
children: /* @__PURE__ */
|
|
9118
|
+
children: /* @__PURE__ */ jsx239(Icon, { icon: ChevronDownIcon, iconSize: getFormInputIconSize(size2) })
|
|
9029
9119
|
}
|
|
9030
9120
|
);
|
|
9031
9121
|
};
|
|
9032
|
-
var DDSInput = (props, ariaInvalid, ariaDescribedby) => /* @__PURE__ */
|
|
9122
|
+
var DDSInput = (props, ariaInvalid, ariaDescribedby) => /* @__PURE__ */ jsx239(
|
|
9033
9123
|
Input2,
|
|
9034
9124
|
{
|
|
9035
9125
|
...props,
|
|
@@ -9039,11 +9129,11 @@ var DDSInput = (props, ariaInvalid, ariaDescribedby) => /* @__PURE__ */ jsx237(
|
|
|
9039
9129
|
);
|
|
9040
9130
|
var DDSControl = (props, componentSize, readOnly, icon2, dataTestId) => {
|
|
9041
9131
|
const { className, ...rest } = props;
|
|
9042
|
-
return /* @__PURE__ */
|
|
9132
|
+
return /* @__PURE__ */ jsx239(
|
|
9043
9133
|
"div",
|
|
9044
9134
|
{
|
|
9045
9135
|
"data-testid": dataTestId ? dataTestId + "-control" : void 0,
|
|
9046
|
-
children: /* @__PURE__ */
|
|
9136
|
+
children: /* @__PURE__ */ jsxs53(
|
|
9047
9137
|
Control,
|
|
9048
9138
|
{
|
|
9049
9139
|
...rest,
|
|
@@ -9054,7 +9144,7 @@ var DDSControl = (props, componentSize, readOnly, icon2, dataTestId) => {
|
|
|
9054
9144
|
readOnly && Select_default["control--readonly"]
|
|
9055
9145
|
),
|
|
9056
9146
|
children: [
|
|
9057
|
-
icon2 && /* @__PURE__ */
|
|
9147
|
+
icon2 && /* @__PURE__ */ jsx239(
|
|
9058
9148
|
Icon,
|
|
9059
9149
|
{
|
|
9060
9150
|
icon: icon2,
|
|
@@ -9071,7 +9161,7 @@ var DDSControl = (props, componentSize, readOnly, icon2, dataTestId) => {
|
|
|
9071
9161
|
};
|
|
9072
9162
|
|
|
9073
9163
|
// src/components/Select/Select.tsx
|
|
9074
|
-
import { jsx as
|
|
9164
|
+
import { jsx as jsx240, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
9075
9165
|
var getPlaceholder = (placeholder2, isMulti) => placeholder2 ? placeholder2 : isMulti ? "-- Velg en eller flere --" : "-- Velg fra listen --";
|
|
9076
9166
|
function SelectInner(props, ref) {
|
|
9077
9167
|
const {
|
|
@@ -9100,7 +9190,7 @@ function SelectInner(props, ref) {
|
|
|
9100
9190
|
"data-testid": dataTestId,
|
|
9101
9191
|
...rest
|
|
9102
9192
|
} = props;
|
|
9103
|
-
const generatedId =
|
|
9193
|
+
const generatedId = useId15();
|
|
9104
9194
|
const uniqueId = id != null ? id : `${generatedId}-select`;
|
|
9105
9195
|
const singleValueId = !isMulti ? `${uniqueId}-singleValue` : void 0;
|
|
9106
9196
|
const hasLabel = !!label;
|
|
@@ -9148,7 +9238,7 @@ function SelectInner(props, ref) {
|
|
|
9148
9238
|
menuPortalTarget: document == null ? void 0 : document.body,
|
|
9149
9239
|
...rest
|
|
9150
9240
|
};
|
|
9151
|
-
return /* @__PURE__ */
|
|
9241
|
+
return /* @__PURE__ */ jsxs54(
|
|
9152
9242
|
"div",
|
|
9153
9243
|
{
|
|
9154
9244
|
className: cn(
|
|
@@ -9158,8 +9248,16 @@ function SelectInner(props, ref) {
|
|
|
9158
9248
|
),
|
|
9159
9249
|
style: { ...style, width },
|
|
9160
9250
|
children: [
|
|
9161
|
-
hasLabel && /* @__PURE__ */
|
|
9162
|
-
|
|
9251
|
+
hasLabel && /* @__PURE__ */ jsx240(
|
|
9252
|
+
Label,
|
|
9253
|
+
{
|
|
9254
|
+
htmlFor: uniqueId,
|
|
9255
|
+
showRequiredStyling,
|
|
9256
|
+
className: Input_default.label,
|
|
9257
|
+
children: label
|
|
9258
|
+
}
|
|
9259
|
+
),
|
|
9260
|
+
/* @__PURE__ */ jsx240(ReactSelect, { ...reactSelectProps, ref }),
|
|
9163
9261
|
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
9164
9262
|
]
|
|
9165
9263
|
}
|
|
@@ -9168,12 +9266,122 @@ function SelectInner(props, ref) {
|
|
|
9168
9266
|
var Select = forwardRef53(SelectInner);
|
|
9169
9267
|
Select.displayName = "Select";
|
|
9170
9268
|
|
|
9269
|
+
// src/components/Select/NativeSelect/NativeSelect.tsx
|
|
9270
|
+
import { forwardRef as forwardRef54, useId as useId16 } from "react";
|
|
9271
|
+
|
|
9272
|
+
// src/components/Select/NativeSelect/NativeSelect.module.css
|
|
9273
|
+
var NativeSelect_default = {
|
|
9274
|
+
container: "NativeSelect_container",
|
|
9275
|
+
select: "NativeSelect_select",
|
|
9276
|
+
"select--readonly": "NativeSelect_select--readonly",
|
|
9277
|
+
"select--medium": "NativeSelect_select--medium",
|
|
9278
|
+
"select--small": "NativeSelect_select--small",
|
|
9279
|
+
"select--tiny": "NativeSelect_select--tiny",
|
|
9280
|
+
icon: "NativeSelect_icon"
|
|
9281
|
+
};
|
|
9282
|
+
|
|
9283
|
+
// src/components/Select/NativeSelect/NativeSelect.tsx
|
|
9284
|
+
import { jsx as jsx241, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
9285
|
+
var NativeSelect = forwardRef54(
|
|
9286
|
+
(props, ref) => {
|
|
9287
|
+
const {
|
|
9288
|
+
id,
|
|
9289
|
+
children,
|
|
9290
|
+
componentSize = "medium",
|
|
9291
|
+
label,
|
|
9292
|
+
multiple,
|
|
9293
|
+
readOnly,
|
|
9294
|
+
errorMessage,
|
|
9295
|
+
tip,
|
|
9296
|
+
required,
|
|
9297
|
+
"aria-required": ariaRequired,
|
|
9298
|
+
"aria-describedby": ariaDescribedby,
|
|
9299
|
+
width,
|
|
9300
|
+
className,
|
|
9301
|
+
style,
|
|
9302
|
+
...rest
|
|
9303
|
+
} = props;
|
|
9304
|
+
const generatedId = useId16();
|
|
9305
|
+
const uniqueId = id != null ? id : `${generatedId}-native-select`;
|
|
9306
|
+
const hasErrorMessage = !!errorMessage;
|
|
9307
|
+
const hasTip = !!tip;
|
|
9308
|
+
const hasLabel = !!label;
|
|
9309
|
+
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
9310
|
+
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
9311
|
+
const showRequiredStyling = !!(required || ariaRequired);
|
|
9312
|
+
const styleVariables = {
|
|
9313
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9314
|
+
["--dds-native-select-width"]: width ? width : componentSize === "tiny" ? "210px" : "var(--dds-input-default-width)"
|
|
9315
|
+
};
|
|
9316
|
+
return /* @__PURE__ */ jsxs55("div", { children: [
|
|
9317
|
+
hasLabel && /* @__PURE__ */ jsx241(
|
|
9318
|
+
Label,
|
|
9319
|
+
{
|
|
9320
|
+
className: Input_default.label,
|
|
9321
|
+
htmlFor: uniqueId,
|
|
9322
|
+
showRequiredStyling,
|
|
9323
|
+
children: label
|
|
9324
|
+
}
|
|
9325
|
+
),
|
|
9326
|
+
/* @__PURE__ */ jsxs55("div", { className: NativeSelect_default.container, children: [
|
|
9327
|
+
/* @__PURE__ */ jsx241(
|
|
9328
|
+
"select",
|
|
9329
|
+
{
|
|
9330
|
+
ref,
|
|
9331
|
+
id: uniqueId,
|
|
9332
|
+
multiple,
|
|
9333
|
+
className: cn(
|
|
9334
|
+
className,
|
|
9335
|
+
NativeSelect_default.select,
|
|
9336
|
+
readOnly && NativeSelect_default["select--readonly"],
|
|
9337
|
+
Input_default.input,
|
|
9338
|
+
Input_default[`input--${componentSize}`],
|
|
9339
|
+
NativeSelect_default[`select--${componentSize}`],
|
|
9340
|
+
scrollbar,
|
|
9341
|
+
focusable,
|
|
9342
|
+
typographyStyles_default[getTypographyCn(inputTypographyTypes[componentSize])],
|
|
9343
|
+
hasErrorMessage && Input_default["input--stateful-danger"]
|
|
9344
|
+
),
|
|
9345
|
+
tabIndex: readOnly ? -1 : 0,
|
|
9346
|
+
style: { ...style, ...styleVariables },
|
|
9347
|
+
"aria-readonly": readOnly,
|
|
9348
|
+
"aria-invalid": hasErrorMessage,
|
|
9349
|
+
"aria-describedby": spaceSeparatedIdListGenerator([
|
|
9350
|
+
hasTip ? tipId : void 0,
|
|
9351
|
+
hasErrorMessage ? errorMessageId : void 0,
|
|
9352
|
+
ariaDescribedby
|
|
9353
|
+
]),
|
|
9354
|
+
required,
|
|
9355
|
+
...rest,
|
|
9356
|
+
children
|
|
9357
|
+
}
|
|
9358
|
+
),
|
|
9359
|
+
!multiple && /* @__PURE__ */ jsx241(
|
|
9360
|
+
Icon,
|
|
9361
|
+
{
|
|
9362
|
+
icon: ChevronDownIcon,
|
|
9363
|
+
iconSize: componentSize === "tiny" ? "small" : "medium",
|
|
9364
|
+
className: NativeSelect_default.icon
|
|
9365
|
+
}
|
|
9366
|
+
)
|
|
9367
|
+
] }),
|
|
9368
|
+
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
9369
|
+
] });
|
|
9370
|
+
}
|
|
9371
|
+
);
|
|
9372
|
+
NativeSelect.displayName = "NativeSelect";
|
|
9373
|
+
var NativeSelectPlaceholder = forwardRef54((props, ref) => {
|
|
9374
|
+
const { children = "-- Velg fra listen --", value, ...rest } = props;
|
|
9375
|
+
return /* @__PURE__ */ jsx241("option", { ref, value: value != null ? value : "", selected: true, ...rest, children });
|
|
9376
|
+
});
|
|
9377
|
+
NativeSelectPlaceholder.displayName = "NativeSelectPlaceholder";
|
|
9378
|
+
|
|
9171
9379
|
// src/components/Select/utils.ts
|
|
9172
9380
|
var createSelectOptions = (...args) => args.map((v2) => ({ label: v2, value: v2 }));
|
|
9173
9381
|
|
|
9174
9382
|
// src/components/Pagination/Pagination.tsx
|
|
9175
|
-
import { jsx as
|
|
9176
|
-
var Pagination =
|
|
9383
|
+
import { jsx as jsx242, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
9384
|
+
var Pagination = forwardRef55(
|
|
9177
9385
|
(props, ref) => {
|
|
9178
9386
|
const {
|
|
9179
9387
|
itemsAmount,
|
|
@@ -9216,7 +9424,7 @@ var Pagination = forwardRef54(
|
|
|
9216
9424
|
};
|
|
9217
9425
|
const listItems = items.length > 0 ? items.map((item, i2) => {
|
|
9218
9426
|
const isActive = item === activePage;
|
|
9219
|
-
return /* @__PURE__ */
|
|
9427
|
+
return /* @__PURE__ */ jsx242("li", { className: Pagination_default.list__item, children: item !== "truncator" ? /* @__PURE__ */ jsx242(
|
|
9220
9428
|
Button,
|
|
9221
9429
|
{
|
|
9222
9430
|
purpose: isActive ? "primary" : "secondary",
|
|
@@ -9227,7 +9435,7 @@ var Pagination = forwardRef54(
|
|
|
9227
9435
|
"aria-label": isActive ? `N\xE5v\xE6rende side (side ${item})` : `G\xE5 til side ${item}`,
|
|
9228
9436
|
children: item
|
|
9229
9437
|
}
|
|
9230
|
-
) : /* @__PURE__ */
|
|
9438
|
+
) : /* @__PURE__ */ jsx242(
|
|
9231
9439
|
Icon,
|
|
9232
9440
|
{
|
|
9233
9441
|
icon: MoreHorizontalIcon,
|
|
@@ -9235,7 +9443,7 @@ var Pagination = forwardRef54(
|
|
|
9235
9443
|
}
|
|
9236
9444
|
) }, `pagination-item-${i2}`);
|
|
9237
9445
|
}) : void 0;
|
|
9238
|
-
const previousPageButton = /* @__PURE__ */
|
|
9446
|
+
const previousPageButton = /* @__PURE__ */ jsx242(
|
|
9239
9447
|
Button,
|
|
9240
9448
|
{
|
|
9241
9449
|
purpose: "secondary",
|
|
@@ -9247,7 +9455,7 @@ var Pagination = forwardRef54(
|
|
|
9247
9455
|
"aria-label": "G\xE5 til forrige siden"
|
|
9248
9456
|
}
|
|
9249
9457
|
);
|
|
9250
|
-
const nextPageButton = /* @__PURE__ */
|
|
9458
|
+
const nextPageButton = /* @__PURE__ */ jsx242(
|
|
9251
9459
|
Button,
|
|
9252
9460
|
{
|
|
9253
9461
|
purpose: "secondary",
|
|
@@ -9264,8 +9472,8 @@ var Pagination = forwardRef54(
|
|
|
9264
9472
|
} : { className: Pagination_default.nav };
|
|
9265
9473
|
const isOnFirstPage = activePage === 1;
|
|
9266
9474
|
const isOnLastPage = activePage === pagesLength;
|
|
9267
|
-
const navigation = withPagination ? /* @__PURE__ */
|
|
9268
|
-
/* @__PURE__ */
|
|
9475
|
+
const navigation = withPagination ? /* @__PURE__ */ jsx242("nav", { ref, "aria-label": "paginering", ...navProps, children: /* @__PURE__ */ jsxs56("ol", { className: Pagination_default.list, children: [
|
|
9476
|
+
/* @__PURE__ */ jsx242(
|
|
9269
9477
|
"li",
|
|
9270
9478
|
{
|
|
9271
9479
|
className: cn(
|
|
@@ -9277,7 +9485,7 @@ var Pagination = forwardRef54(
|
|
|
9277
9485
|
}
|
|
9278
9486
|
),
|
|
9279
9487
|
listItems,
|
|
9280
|
-
/* @__PURE__ */
|
|
9488
|
+
/* @__PURE__ */ jsx242(
|
|
9281
9489
|
"li",
|
|
9282
9490
|
{
|
|
9283
9491
|
className: cn(
|
|
@@ -9289,8 +9497,8 @@ var Pagination = forwardRef54(
|
|
|
9289
9497
|
}
|
|
9290
9498
|
)
|
|
9291
9499
|
] }) }) : null;
|
|
9292
|
-
const smallScreenNavigation = withPagination ? /* @__PURE__ */
|
|
9293
|
-
/* @__PURE__ */
|
|
9500
|
+
const smallScreenNavigation = withPagination ? /* @__PURE__ */ jsx242("nav", { ref, "aria-label": "paginering", ...navProps, children: /* @__PURE__ */ jsxs56("ol", { className: Pagination_default.list, children: [
|
|
9501
|
+
/* @__PURE__ */ jsx242(
|
|
9294
9502
|
"li",
|
|
9295
9503
|
{
|
|
9296
9504
|
className: cn(
|
|
@@ -9298,7 +9506,7 @@ var Pagination = forwardRef54(
|
|
|
9298
9506
|
isOnFirstPage && Pagination_default["list__item--hidden"]
|
|
9299
9507
|
),
|
|
9300
9508
|
"aria-hidden": isOnFirstPage,
|
|
9301
|
-
children: /* @__PURE__ */
|
|
9509
|
+
children: /* @__PURE__ */ jsx242(
|
|
9302
9510
|
Button,
|
|
9303
9511
|
{
|
|
9304
9512
|
purpose: "secondary",
|
|
@@ -9312,7 +9520,7 @@ var Pagination = forwardRef54(
|
|
|
9312
9520
|
)
|
|
9313
9521
|
}
|
|
9314
9522
|
),
|
|
9315
|
-
/* @__PURE__ */
|
|
9523
|
+
/* @__PURE__ */ jsx242(
|
|
9316
9524
|
"li",
|
|
9317
9525
|
{
|
|
9318
9526
|
className: cn(
|
|
@@ -9323,7 +9531,7 @@ var Pagination = forwardRef54(
|
|
|
9323
9531
|
children: previousPageButton
|
|
9324
9532
|
}
|
|
9325
9533
|
),
|
|
9326
|
-
/* @__PURE__ */
|
|
9534
|
+
/* @__PURE__ */ jsx242("li", { className: Pagination_default.list__item, children: /* @__PURE__ */ jsx242(
|
|
9327
9535
|
Button,
|
|
9328
9536
|
{
|
|
9329
9537
|
size: "small",
|
|
@@ -9333,7 +9541,7 @@ var Pagination = forwardRef54(
|
|
|
9333
9541
|
children: activePage
|
|
9334
9542
|
}
|
|
9335
9543
|
) }),
|
|
9336
|
-
/* @__PURE__ */
|
|
9544
|
+
/* @__PURE__ */ jsx242(
|
|
9337
9545
|
"li",
|
|
9338
9546
|
{
|
|
9339
9547
|
className: cn(
|
|
@@ -9344,7 +9552,7 @@ var Pagination = forwardRef54(
|
|
|
9344
9552
|
children: nextPageButton
|
|
9345
9553
|
}
|
|
9346
9554
|
),
|
|
9347
|
-
/* @__PURE__ */
|
|
9555
|
+
/* @__PURE__ */ jsx242(
|
|
9348
9556
|
"li",
|
|
9349
9557
|
{
|
|
9350
9558
|
className: cn(
|
|
@@ -9352,7 +9560,7 @@ var Pagination = forwardRef54(
|
|
|
9352
9560
|
isOnLastPage && Pagination_default["list__item--hidden"]
|
|
9353
9561
|
),
|
|
9354
9562
|
"aria-hidden": isOnLastPage,
|
|
9355
|
-
children: /* @__PURE__ */
|
|
9563
|
+
children: /* @__PURE__ */ jsx242(
|
|
9356
9564
|
Button,
|
|
9357
9565
|
{
|
|
9358
9566
|
purpose: "secondary",
|
|
@@ -9370,7 +9578,7 @@ var Pagination = forwardRef54(
|
|
|
9370
9578
|
const activePageFirstItem = activePage === 1 ? 1 : activePage * itemsPerPage - itemsPerPage + 1;
|
|
9371
9579
|
const activePageLastItem = activePage === pagesLength ? itemsAmount : activePage * itemsPerPage;
|
|
9372
9580
|
const navigationToBeRendered = smallScreen ? smallScreenNavigation : navigation;
|
|
9373
|
-
return !withCounter && !withSelect ? navigationToBeRendered : /* @__PURE__ */
|
|
9581
|
+
return !withCounter && !withSelect ? navigationToBeRendered : /* @__PURE__ */ jsxs56(
|
|
9374
9582
|
"div",
|
|
9375
9583
|
{
|
|
9376
9584
|
...getBaseHTMLProps(
|
|
@@ -9384,8 +9592,8 @@ var Pagination = forwardRef54(
|
|
|
9384
9592
|
rest
|
|
9385
9593
|
),
|
|
9386
9594
|
children: [
|
|
9387
|
-
/* @__PURE__ */
|
|
9388
|
-
withSelect && /* @__PURE__ */
|
|
9595
|
+
/* @__PURE__ */ jsxs56("div", { className: Pagination_default.indicators, children: [
|
|
9596
|
+
withSelect && /* @__PURE__ */ jsx242(
|
|
9389
9597
|
Select,
|
|
9390
9598
|
{
|
|
9391
9599
|
options: selectOptions,
|
|
@@ -9401,7 +9609,7 @@ var Pagination = forwardRef54(
|
|
|
9401
9609
|
"aria-label": "Antall elementer per side"
|
|
9402
9610
|
}
|
|
9403
9611
|
),
|
|
9404
|
-
withCounter && /* @__PURE__ */
|
|
9612
|
+
withCounter && /* @__PURE__ */ jsxs56(Typography, { typographyType: "supportingStyleLabel01", as: "p", children: [
|
|
9405
9613
|
"Viser ",
|
|
9406
9614
|
activePageFirstItem,
|
|
9407
9615
|
"-",
|
|
@@ -9420,7 +9628,7 @@ Pagination.displayName = "Pagination";
|
|
|
9420
9628
|
|
|
9421
9629
|
// src/components/Popover/Popover.tsx
|
|
9422
9630
|
import { ddsTokens as ddsTokens15 } from "@norges-domstoler/dds-design-tokens";
|
|
9423
|
-
import { forwardRef as
|
|
9631
|
+
import { forwardRef as forwardRef56 } from "react";
|
|
9424
9632
|
|
|
9425
9633
|
// src/components/Popover/Popover.module.css
|
|
9426
9634
|
var Popover_default = {
|
|
@@ -9431,8 +9639,8 @@ var Popover_default = {
|
|
|
9431
9639
|
};
|
|
9432
9640
|
|
|
9433
9641
|
// src/components/Popover/Popover.tsx
|
|
9434
|
-
import { jsx as
|
|
9435
|
-
var Popover =
|
|
9642
|
+
import { jsx as jsx243, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
9643
|
+
var Popover = forwardRef56(
|
|
9436
9644
|
(props, ref) => {
|
|
9437
9645
|
const {
|
|
9438
9646
|
title,
|
|
@@ -9472,7 +9680,7 @@ var Popover = forwardRef55(
|
|
|
9472
9680
|
useOnClickOutside(elements, () => {
|
|
9473
9681
|
if (isOpen) onClose && onClose();
|
|
9474
9682
|
});
|
|
9475
|
-
return isOpen || hasTransitionedIn ? /* @__PURE__ */
|
|
9683
|
+
return isOpen || hasTransitionedIn ? /* @__PURE__ */ jsxs57(
|
|
9476
9684
|
Paper,
|
|
9477
9685
|
{
|
|
9478
9686
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
@@ -9489,15 +9697,15 @@ var Popover = forwardRef55(
|
|
|
9489
9697
|
focus_default.focusable
|
|
9490
9698
|
),
|
|
9491
9699
|
children: [
|
|
9492
|
-
title && /* @__PURE__ */
|
|
9493
|
-
/* @__PURE__ */
|
|
9700
|
+
title && /* @__PURE__ */ jsx243("div", { className: Popover_default.title, children: typeof title === "string" ? /* @__PURE__ */ jsx243(Typography, { typographyType: "headingSans02", children: title }) : title }),
|
|
9701
|
+
/* @__PURE__ */ jsx243(
|
|
9494
9702
|
"div",
|
|
9495
9703
|
{
|
|
9496
9704
|
className: !hasTitle && withCloseButton ? Popover_default["content--closable--no-title"] : "",
|
|
9497
9705
|
children
|
|
9498
9706
|
}
|
|
9499
9707
|
),
|
|
9500
|
-
withCloseButton && /* @__PURE__ */
|
|
9708
|
+
withCloseButton && /* @__PURE__ */ jsx243(
|
|
9501
9709
|
Button,
|
|
9502
9710
|
{
|
|
9503
9711
|
icon: CloseIcon,
|
|
@@ -9520,11 +9728,11 @@ import {
|
|
|
9520
9728
|
Children as ReactChildren5,
|
|
9521
9729
|
cloneElement as cloneElement6,
|
|
9522
9730
|
isValidElement as isValidElement7,
|
|
9523
|
-
useId as
|
|
9731
|
+
useId as useId17,
|
|
9524
9732
|
useRef as useRef26,
|
|
9525
9733
|
useState as useState19
|
|
9526
9734
|
} from "react";
|
|
9527
|
-
import { Fragment as Fragment9, jsx as
|
|
9735
|
+
import { Fragment as Fragment9, jsx as jsx244 } from "react/jsx-runtime";
|
|
9528
9736
|
var PopoverGroup = ({
|
|
9529
9737
|
isOpen = false,
|
|
9530
9738
|
onCloseButtonClick,
|
|
@@ -9533,7 +9741,7 @@ var PopoverGroup = ({
|
|
|
9533
9741
|
popoverId
|
|
9534
9742
|
}) => {
|
|
9535
9743
|
const [open, setOpen] = useState19(isOpen);
|
|
9536
|
-
const generatedId =
|
|
9744
|
+
const generatedId = useId17();
|
|
9537
9745
|
const uniquePopoverId = popoverId != null ? popoverId : `${generatedId}-popover`;
|
|
9538
9746
|
const handleOnCloseButtonClick = () => {
|
|
9539
9747
|
setOpen(false);
|
|
@@ -9570,7 +9778,7 @@ var PopoverGroup = ({
|
|
|
9570
9778
|
onClose: handleClose
|
|
9571
9779
|
}));
|
|
9572
9780
|
});
|
|
9573
|
-
return /* @__PURE__ */
|
|
9781
|
+
return /* @__PURE__ */ jsx244(Fragment9, { children: Children8 });
|
|
9574
9782
|
};
|
|
9575
9783
|
PopoverGroup.displayName = "PopoverGroup";
|
|
9576
9784
|
|
|
@@ -9579,7 +9787,7 @@ import {
|
|
|
9579
9787
|
Children as Children4,
|
|
9580
9788
|
Fragment as Fragment11,
|
|
9581
9789
|
cloneElement as cloneElement7,
|
|
9582
|
-
forwardRef as
|
|
9790
|
+
forwardRef as forwardRef57,
|
|
9583
9791
|
isValidElement as isValidElement8,
|
|
9584
9792
|
useEffect as useEffect21,
|
|
9585
9793
|
useMemo as useMemo3,
|
|
@@ -9618,7 +9826,7 @@ var ProgressTracker_default = {
|
|
|
9618
9826
|
|
|
9619
9827
|
// src/components/ProgressTracker/ProgressTrackerItem.tsx
|
|
9620
9828
|
import { useMemo as useMemo2 } from "react";
|
|
9621
|
-
import { Fragment as Fragment10, jsx as
|
|
9829
|
+
import { Fragment as Fragment10, jsx as jsx245, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
9622
9830
|
var toItemState = (active, completed, disabled) => {
|
|
9623
9831
|
if (disabled) {
|
|
9624
9832
|
return "disabled";
|
|
@@ -9650,15 +9858,15 @@ var ProgressTrackerItem = (props) => {
|
|
|
9650
9858
|
const itemState = toItemState(active, completed, disabled);
|
|
9651
9859
|
const stepNumberContent = useMemo2(() => {
|
|
9652
9860
|
if (completed) {
|
|
9653
|
-
return /* @__PURE__ */
|
|
9861
|
+
return /* @__PURE__ */ jsx245(Icon, { icon: CheckIcon, iconSize: "small" });
|
|
9654
9862
|
}
|
|
9655
9863
|
if (icon2 !== void 0) {
|
|
9656
|
-
return /* @__PURE__ */
|
|
9864
|
+
return /* @__PURE__ */ jsx245(Icon, { icon: icon2, iconSize: "small" });
|
|
9657
9865
|
}
|
|
9658
9866
|
return index + 1;
|
|
9659
9867
|
}, [completed, icon2, index]);
|
|
9660
|
-
const stepContent = /* @__PURE__ */
|
|
9661
|
-
/* @__PURE__ */
|
|
9868
|
+
const stepContent = /* @__PURE__ */ jsxs58(Fragment10, { children: [
|
|
9869
|
+
/* @__PURE__ */ jsx245(
|
|
9662
9870
|
"div",
|
|
9663
9871
|
{
|
|
9664
9872
|
"aria-hidden": true,
|
|
@@ -9670,7 +9878,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
9670
9878
|
children: stepNumberContent
|
|
9671
9879
|
}
|
|
9672
9880
|
),
|
|
9673
|
-
/* @__PURE__ */
|
|
9881
|
+
/* @__PURE__ */ jsxs58(
|
|
9674
9882
|
"div",
|
|
9675
9883
|
{
|
|
9676
9884
|
className: cn(
|
|
@@ -9679,13 +9887,13 @@ var ProgressTrackerItem = (props) => {
|
|
|
9679
9887
|
typographyStyles_default["body-sans-03"]
|
|
9680
9888
|
),
|
|
9681
9889
|
children: [
|
|
9682
|
-
/* @__PURE__ */
|
|
9890
|
+
/* @__PURE__ */ jsx245(VisuallyHidden, { as: "span", children: getVisuallyHiddenText(active, completed, index) }),
|
|
9683
9891
|
children
|
|
9684
9892
|
]
|
|
9685
9893
|
}
|
|
9686
9894
|
)
|
|
9687
9895
|
] });
|
|
9688
|
-
return /* @__PURE__ */
|
|
9896
|
+
return /* @__PURE__ */ jsx245("li", { "aria-current": active ? "step" : void 0, className: ProgressTracker_default.item, children: handleStepChange ? /* @__PURE__ */ jsx245(
|
|
9689
9897
|
"button",
|
|
9690
9898
|
{
|
|
9691
9899
|
onClick: !disabled && handleStepChange ? () => handleStepChange(index) : void 0,
|
|
@@ -9693,14 +9901,14 @@ var ProgressTrackerItem = (props) => {
|
|
|
9693
9901
|
className: cn(ProgressTracker_default["item-button"], focusable),
|
|
9694
9902
|
children: stepContent
|
|
9695
9903
|
}
|
|
9696
|
-
) : /* @__PURE__ */
|
|
9904
|
+
) : /* @__PURE__ */ jsx245("div", { className: cn(ProgressTracker_default["item-button"], ProgressTracker_default["item-div"]), children: stepContent }) });
|
|
9697
9905
|
};
|
|
9698
9906
|
ProgressTrackerItem.displayName = "ProgressTracker.Item";
|
|
9699
9907
|
|
|
9700
9908
|
// src/components/ProgressTracker/ProgressTracker.tsx
|
|
9701
|
-
import { jsx as
|
|
9909
|
+
import { jsx as jsx246, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
9702
9910
|
var ProgressTracker = (() => {
|
|
9703
|
-
const Res =
|
|
9911
|
+
const Res = forwardRef57((props, ref) => {
|
|
9704
9912
|
const {
|
|
9705
9913
|
id,
|
|
9706
9914
|
activeStep = 0,
|
|
@@ -9730,14 +9938,14 @@ var ProgressTracker = (() => {
|
|
|
9730
9938
|
const itemsWithConnectorsBetween = intersperseItemsWithConnector(itemsWithIndex);
|
|
9731
9939
|
return itemsWithConnectorsBetween;
|
|
9732
9940
|
}, [children]);
|
|
9733
|
-
return /* @__PURE__ */
|
|
9941
|
+
return /* @__PURE__ */ jsx246(
|
|
9734
9942
|
ProgressTrackerContext.Provider,
|
|
9735
9943
|
{
|
|
9736
9944
|
value: {
|
|
9737
9945
|
activeStep: thisActiveStep,
|
|
9738
9946
|
handleStepChange: handleChange
|
|
9739
9947
|
},
|
|
9740
|
-
children: /* @__PURE__ */
|
|
9948
|
+
children: /* @__PURE__ */ jsx246("div", { role: "group", "aria-label": "progress", ...containerProps, children: /* @__PURE__ */ jsx246("ol", { className: ProgressTracker_default.list, children: steps }) })
|
|
9741
9949
|
}
|
|
9742
9950
|
);
|
|
9743
9951
|
});
|
|
@@ -9761,16 +9969,16 @@ var intersperseItemsWithConnector = (children) => Children4.map(children, (child
|
|
|
9761
9969
|
if (index === 0) {
|
|
9762
9970
|
return child;
|
|
9763
9971
|
}
|
|
9764
|
-
return /* @__PURE__ */
|
|
9765
|
-
/* @__PURE__ */
|
|
9972
|
+
return /* @__PURE__ */ jsxs59(Fragment11, { children: [
|
|
9973
|
+
/* @__PURE__ */ jsx246("div", { "aria-hidden": true, className: ProgressTracker_default.connector }),
|
|
9766
9974
|
child
|
|
9767
9975
|
] }, index);
|
|
9768
9976
|
});
|
|
9769
9977
|
|
|
9770
9978
|
// src/components/Search/Search.tsx
|
|
9771
9979
|
import {
|
|
9772
|
-
forwardRef as
|
|
9773
|
-
useId as
|
|
9980
|
+
forwardRef as forwardRef59,
|
|
9981
|
+
useId as useId18,
|
|
9774
9982
|
useState as useState21
|
|
9775
9983
|
} from "react";
|
|
9776
9984
|
|
|
@@ -9831,9 +10039,9 @@ function createEmptyChangeEvent(inputElementId) {
|
|
|
9831
10039
|
}
|
|
9832
10040
|
|
|
9833
10041
|
// src/components/Search/SearchSuggestions.tsx
|
|
9834
|
-
import { forwardRef as
|
|
9835
|
-
import { jsx as
|
|
9836
|
-
var SearchSuggestions =
|
|
10042
|
+
import { forwardRef as forwardRef58 } from "react";
|
|
10043
|
+
import { jsx as jsx247, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
10044
|
+
var SearchSuggestions = forwardRef58((props, ref) => {
|
|
9837
10045
|
const {
|
|
9838
10046
|
id,
|
|
9839
10047
|
searchId,
|
|
@@ -9852,14 +10060,14 @@ var SearchSuggestions = forwardRef57((props, ref) => {
|
|
|
9852
10060
|
);
|
|
9853
10061
|
const [focus] = useRoveFocus(suggestions == null ? void 0 : suggestions.length, showSuggestions);
|
|
9854
10062
|
const suggestionsToRender = maxSuggestions ? suggestions == null ? void 0 : suggestions.slice(maxSuggestions) : suggestions;
|
|
9855
|
-
const renderedSuggestions = /* @__PURE__ */
|
|
10063
|
+
const renderedSuggestions = /* @__PURE__ */ jsx247(
|
|
9856
10064
|
"ul",
|
|
9857
10065
|
{
|
|
9858
10066
|
role: "listbox",
|
|
9859
10067
|
"aria-labelledby": suggestionsHeaderId,
|
|
9860
10068
|
className: utilStyles_default["remove-list-styling"],
|
|
9861
10069
|
children: suggestionsToRender.map((suggestion, index) => {
|
|
9862
|
-
return /* @__PURE__ */
|
|
10070
|
+
return /* @__PURE__ */ jsx247("li", { role: "option", children: /* @__PURE__ */ jsx247(
|
|
9863
10071
|
OverflowMenuItem,
|
|
9864
10072
|
{
|
|
9865
10073
|
index,
|
|
@@ -9875,7 +10083,7 @@ var SearchSuggestions = forwardRef57((props, ref) => {
|
|
|
9875
10083
|
})
|
|
9876
10084
|
}
|
|
9877
10085
|
);
|
|
9878
|
-
return /* @__PURE__ */
|
|
10086
|
+
return /* @__PURE__ */ jsxs60(
|
|
9879
10087
|
Paper,
|
|
9880
10088
|
{
|
|
9881
10089
|
...getBaseHTMLProps(
|
|
@@ -9894,7 +10102,7 @@ var SearchSuggestions = forwardRef57((props, ref) => {
|
|
|
9894
10102
|
"aria-hidden": !showSuggestions,
|
|
9895
10103
|
border: "default",
|
|
9896
10104
|
children: [
|
|
9897
|
-
/* @__PURE__ */
|
|
10105
|
+
/* @__PURE__ */ jsx247(
|
|
9898
10106
|
"span",
|
|
9899
10107
|
{
|
|
9900
10108
|
id: suggestionsHeaderId,
|
|
@@ -9913,7 +10121,7 @@ var SearchSuggestions = forwardRef57((props, ref) => {
|
|
|
9913
10121
|
SearchSuggestions.displayName = "SearchSuggestions";
|
|
9914
10122
|
|
|
9915
10123
|
// src/components/Search/Search.tsx
|
|
9916
|
-
import { Fragment as Fragment12, jsx as
|
|
10124
|
+
import { Fragment as Fragment12, jsx as jsx248, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
9917
10125
|
var getIconSize = (size2) => {
|
|
9918
10126
|
switch (size2) {
|
|
9919
10127
|
case "large":
|
|
@@ -9924,7 +10132,7 @@ var getIconSize = (size2) => {
|
|
|
9924
10132
|
return "small";
|
|
9925
10133
|
}
|
|
9926
10134
|
};
|
|
9927
|
-
var Search =
|
|
10135
|
+
var Search = forwardRef59(
|
|
9928
10136
|
({
|
|
9929
10137
|
componentSize = "medium",
|
|
9930
10138
|
buttonProps,
|
|
@@ -9940,7 +10148,7 @@ var Search = forwardRef58(
|
|
|
9940
10148
|
...rest
|
|
9941
10149
|
}, ref) => {
|
|
9942
10150
|
var _a;
|
|
9943
|
-
const generatedId =
|
|
10151
|
+
const generatedId = useId18();
|
|
9944
10152
|
const uniqueId = id != null ? id : `${generatedId}-searchInput`;
|
|
9945
10153
|
const hasLabel = !!label;
|
|
9946
10154
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
@@ -9968,10 +10176,10 @@ var Search = forwardRef58(
|
|
|
9968
10176
|
} = buttonProps != null ? buttonProps : {};
|
|
9969
10177
|
const hasSuggestions = !!context.suggestions;
|
|
9970
10178
|
const showSearchButton = !!buttonProps && !!onClick;
|
|
9971
|
-
return /* @__PURE__ */
|
|
9972
|
-
hasLabel && /* @__PURE__ */
|
|
9973
|
-
/* @__PURE__ */
|
|
9974
|
-
/* @__PURE__ */
|
|
10179
|
+
return /* @__PURE__ */ jsxs61("div", { className: Search_default.container, children: [
|
|
10180
|
+
hasLabel && /* @__PURE__ */ jsx248(Label, { htmlFor: uniqueId, children: label }),
|
|
10181
|
+
/* @__PURE__ */ jsxs61("div", { children: [
|
|
10182
|
+
/* @__PURE__ */ jsxs61(
|
|
9975
10183
|
"div",
|
|
9976
10184
|
{
|
|
9977
10185
|
className: cn(
|
|
@@ -9980,8 +10188,8 @@ var Search = forwardRef58(
|
|
|
9980
10188
|
),
|
|
9981
10189
|
style,
|
|
9982
10190
|
children: [
|
|
9983
|
-
/* @__PURE__ */
|
|
9984
|
-
/* @__PURE__ */
|
|
10191
|
+
/* @__PURE__ */ jsxs61("div", { className: Search_default["input-group"], children: [
|
|
10192
|
+
/* @__PURE__ */ jsx248(
|
|
9985
10193
|
Icon,
|
|
9986
10194
|
{
|
|
9987
10195
|
icon: SearchIcon,
|
|
@@ -9989,7 +10197,7 @@ var Search = forwardRef58(
|
|
|
9989
10197
|
className: cn(Search_default["search-icon"])
|
|
9990
10198
|
}
|
|
9991
10199
|
),
|
|
9992
|
-
/* @__PURE__ */
|
|
10200
|
+
/* @__PURE__ */ jsx248(
|
|
9993
10201
|
Input,
|
|
9994
10202
|
{
|
|
9995
10203
|
...rest,
|
|
@@ -10017,8 +10225,8 @@ var Search = forwardRef58(
|
|
|
10017
10225
|
)
|
|
10018
10226
|
}
|
|
10019
10227
|
),
|
|
10020
|
-
hasSuggestions && /* @__PURE__ */
|
|
10021
|
-
/* @__PURE__ */
|
|
10228
|
+
hasSuggestions && /* @__PURE__ */ jsxs61(Fragment12, { children: [
|
|
10229
|
+
/* @__PURE__ */ jsx248(
|
|
10022
10230
|
SearchSuggestions,
|
|
10023
10231
|
{
|
|
10024
10232
|
id: suggestionsId,
|
|
@@ -10030,9 +10238,9 @@ var Search = forwardRef58(
|
|
|
10030
10238
|
componentSize
|
|
10031
10239
|
}
|
|
10032
10240
|
),
|
|
10033
|
-
/* @__PURE__ */
|
|
10241
|
+
/* @__PURE__ */ jsx248(VisuallyHidden, { id: suggestionsDescriptionId, as: "span", children: "Bla i s\xF8keforslag med piltaster n\xE5r listen er utvidet." })
|
|
10034
10242
|
] }),
|
|
10035
|
-
hasValue && /* @__PURE__ */
|
|
10243
|
+
hasValue && /* @__PURE__ */ jsx248(
|
|
10036
10244
|
Button,
|
|
10037
10245
|
{
|
|
10038
10246
|
icon: CloseSmallIcon,
|
|
@@ -10044,7 +10252,7 @@ var Search = forwardRef58(
|
|
|
10044
10252
|
}
|
|
10045
10253
|
)
|
|
10046
10254
|
] }),
|
|
10047
|
-
showSearchButton && /* @__PURE__ */
|
|
10255
|
+
showSearchButton && /* @__PURE__ */ jsx248(
|
|
10048
10256
|
Button,
|
|
10049
10257
|
{
|
|
10050
10258
|
size: componentSize,
|
|
@@ -10069,7 +10277,7 @@ import {
|
|
|
10069
10277
|
useRef as useRef27,
|
|
10070
10278
|
useState as useState22
|
|
10071
10279
|
} from "react";
|
|
10072
|
-
import { jsx as
|
|
10280
|
+
import { jsx as jsx249 } from "react/jsx-runtime";
|
|
10073
10281
|
var SearchAutocompleteWrapper = (props) => {
|
|
10074
10282
|
const {
|
|
10075
10283
|
value,
|
|
@@ -10145,7 +10353,7 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
10145
10353
|
inputValue,
|
|
10146
10354
|
onSugggestionClick: handleSuggestionClick
|
|
10147
10355
|
};
|
|
10148
|
-
return /* @__PURE__ */
|
|
10356
|
+
return /* @__PURE__ */ jsx249(AutocompleteSearchContext.Provider, { value: contextProps, children });
|
|
10149
10357
|
};
|
|
10150
10358
|
SearchAutocompleteWrapper.displayName = "SearchAutocompleteWrapper";
|
|
10151
10359
|
|
|
@@ -10155,7 +10363,7 @@ Search2.AutocompleteWrapper = SearchAutocompleteWrapper;
|
|
|
10155
10363
|
Search2.Suggestions = SearchSuggestions;
|
|
10156
10364
|
|
|
10157
10365
|
// src/components/SelectionControl/Checkbox/Checkbox.tsx
|
|
10158
|
-
import { forwardRef as
|
|
10366
|
+
import { forwardRef as forwardRef61, useId as useId19 } from "react";
|
|
10159
10367
|
|
|
10160
10368
|
// src/components/SelectionControl/Checkbox/CheckboxGroupContext.tsx
|
|
10161
10369
|
import { createContext as createContext5, useContext as useContext8 } from "react";
|
|
@@ -10166,7 +10374,7 @@ var useCheckboxGroup = () => {
|
|
|
10166
10374
|
|
|
10167
10375
|
// src/components/SelectionControl/SelectionControl.styles.tsx
|
|
10168
10376
|
import {
|
|
10169
|
-
forwardRef as
|
|
10377
|
+
forwardRef as forwardRef60
|
|
10170
10378
|
} from "react";
|
|
10171
10379
|
|
|
10172
10380
|
// src/components/SelectionControl/SelectionControl.module.css
|
|
@@ -10187,10 +10395,10 @@ var SelectionControl_default = {
|
|
|
10187
10395
|
};
|
|
10188
10396
|
|
|
10189
10397
|
// src/components/SelectionControl/SelectionControl.styles.tsx
|
|
10190
|
-
import { jsx as
|
|
10191
|
-
var SelectionControl =
|
|
10398
|
+
import { jsx as jsx250 } from "react/jsx-runtime";
|
|
10399
|
+
var SelectionControl = forwardRef60((props, ref) => {
|
|
10192
10400
|
const { controlType, className, ...rest } = props;
|
|
10193
|
-
return /* @__PURE__ */
|
|
10401
|
+
return /* @__PURE__ */ jsx250(
|
|
10194
10402
|
"span",
|
|
10195
10403
|
{
|
|
10196
10404
|
ref,
|
|
@@ -10203,7 +10411,7 @@ var SelectionControl = forwardRef59((props, ref) => {
|
|
|
10203
10411
|
}
|
|
10204
10412
|
);
|
|
10205
10413
|
});
|
|
10206
|
-
var Label2 =
|
|
10414
|
+
var Label2 = forwardRef60(
|
|
10207
10415
|
(props, ref) => {
|
|
10208
10416
|
const {
|
|
10209
10417
|
disabled,
|
|
@@ -10214,7 +10422,7 @@ var Label2 = forwardRef59(
|
|
|
10214
10422
|
className,
|
|
10215
10423
|
...rest
|
|
10216
10424
|
} = props;
|
|
10217
|
-
return /* @__PURE__ */
|
|
10425
|
+
return /* @__PURE__ */ jsx250(
|
|
10218
10426
|
"label",
|
|
10219
10427
|
{
|
|
10220
10428
|
ref,
|
|
@@ -10245,8 +10453,8 @@ var selectionControlTypographyProps = {
|
|
|
10245
10453
|
};
|
|
10246
10454
|
|
|
10247
10455
|
// src/components/SelectionControl/Checkbox/Checkbox.tsx
|
|
10248
|
-
import { jsx as
|
|
10249
|
-
var Checkbox =
|
|
10456
|
+
import { jsx as jsx251, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
10457
|
+
var Checkbox = forwardRef61(
|
|
10250
10458
|
(props, ref) => {
|
|
10251
10459
|
const {
|
|
10252
10460
|
id,
|
|
@@ -10261,7 +10469,7 @@ var Checkbox = forwardRef60(
|
|
|
10261
10469
|
htmlProps = {},
|
|
10262
10470
|
...rest
|
|
10263
10471
|
} = props;
|
|
10264
|
-
const generatedId =
|
|
10472
|
+
const generatedId = useId19();
|
|
10265
10473
|
const uniqueId = id != null ? id : `${generatedId}-checkbox`;
|
|
10266
10474
|
const checkboxGroup = useCheckboxGroup();
|
|
10267
10475
|
const hasLabel = !!label;
|
|
@@ -10270,7 +10478,7 @@ var Checkbox = forwardRef60(
|
|
|
10270
10478
|
className: htmlPropsClassName,
|
|
10271
10479
|
...restHtmlProps
|
|
10272
10480
|
} = htmlProps;
|
|
10273
|
-
return /* @__PURE__ */
|
|
10481
|
+
return /* @__PURE__ */ jsxs62(
|
|
10274
10482
|
Label2,
|
|
10275
10483
|
{
|
|
10276
10484
|
hasError: error || (checkboxGroup == null ? void 0 : checkboxGroup.error),
|
|
@@ -10282,7 +10490,7 @@ var Checkbox = forwardRef60(
|
|
|
10282
10490
|
className: cn(className, htmlPropsClassName),
|
|
10283
10491
|
style,
|
|
10284
10492
|
children: [
|
|
10285
|
-
/* @__PURE__ */
|
|
10493
|
+
/* @__PURE__ */ jsx251(
|
|
10286
10494
|
"input",
|
|
10287
10495
|
{
|
|
10288
10496
|
...getBaseHTMLProps(uniqueId, restHtmlProps, rest),
|
|
@@ -10306,14 +10514,14 @@ var Checkbox = forwardRef60(
|
|
|
10306
10514
|
)
|
|
10307
10515
|
}
|
|
10308
10516
|
),
|
|
10309
|
-
/* @__PURE__ */
|
|
10517
|
+
/* @__PURE__ */ jsx251(
|
|
10310
10518
|
SelectionControl,
|
|
10311
10519
|
{
|
|
10312
10520
|
controlType: "checkbox",
|
|
10313
10521
|
className: focus_default["focus-styled-sibling"]
|
|
10314
10522
|
}
|
|
10315
10523
|
),
|
|
10316
|
-
hasLabel && /* @__PURE__ */
|
|
10524
|
+
hasLabel && /* @__PURE__ */ jsx251(Typography, { ...selectionControlTypographyProps, children: label })
|
|
10317
10525
|
]
|
|
10318
10526
|
}
|
|
10319
10527
|
);
|
|
@@ -10322,8 +10530,8 @@ var Checkbox = forwardRef60(
|
|
|
10322
10530
|
Checkbox.displayName = "Checkbox";
|
|
10323
10531
|
|
|
10324
10532
|
// src/components/SelectionControl/Checkbox/CheckboxGroup.tsx
|
|
10325
|
-
import { useId as
|
|
10326
|
-
import { jsx as
|
|
10533
|
+
import { useId as useId20 } from "react";
|
|
10534
|
+
import { jsx as jsx252, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
10327
10535
|
var CheckboxGroup = (props) => {
|
|
10328
10536
|
const {
|
|
10329
10537
|
label,
|
|
@@ -10341,7 +10549,7 @@ var CheckboxGroup = (props) => {
|
|
|
10341
10549
|
...rest
|
|
10342
10550
|
} = props;
|
|
10343
10551
|
const { "aria-required": ariaRequired } = htmlProps;
|
|
10344
|
-
const generatedId =
|
|
10552
|
+
const generatedId = useId20();
|
|
10345
10553
|
const uniqueGroupId = groupId != null ? groupId : `${generatedId}-checkboxGroup`;
|
|
10346
10554
|
const hasErrorMessage = !!errorMessage;
|
|
10347
10555
|
const showRequiredMarker = required || ariaRequired;
|
|
@@ -10355,7 +10563,7 @@ var CheckboxGroup = (props) => {
|
|
|
10355
10563
|
disabled,
|
|
10356
10564
|
readOnly
|
|
10357
10565
|
};
|
|
10358
|
-
return /* @__PURE__ */
|
|
10566
|
+
return /* @__PURE__ */ jsxs63(
|
|
10359
10567
|
"div",
|
|
10360
10568
|
{
|
|
10361
10569
|
...getBaseHTMLProps(
|
|
@@ -10365,7 +10573,7 @@ var CheckboxGroup = (props) => {
|
|
|
10365
10573
|
rest
|
|
10366
10574
|
),
|
|
10367
10575
|
children: [
|
|
10368
|
-
/* @__PURE__ */
|
|
10576
|
+
/* @__PURE__ */ jsxs63(
|
|
10369
10577
|
Typography,
|
|
10370
10578
|
{
|
|
10371
10579
|
as: "span",
|
|
@@ -10374,12 +10582,12 @@ var CheckboxGroup = (props) => {
|
|
|
10374
10582
|
children: [
|
|
10375
10583
|
label,
|
|
10376
10584
|
" ",
|
|
10377
|
-
showRequiredMarker && /* @__PURE__ */
|
|
10585
|
+
showRequiredMarker && /* @__PURE__ */ jsx252(RequiredMarker, {})
|
|
10378
10586
|
]
|
|
10379
10587
|
}
|
|
10380
10588
|
),
|
|
10381
10589
|
renderInputMessage(tip, tipId),
|
|
10382
|
-
/* @__PURE__ */
|
|
10590
|
+
/* @__PURE__ */ jsx252(CheckboxGroupContext.Provider, { value: { ...contextProps }, children: /* @__PURE__ */ jsx252(
|
|
10383
10591
|
"div",
|
|
10384
10592
|
{
|
|
10385
10593
|
role: "group",
|
|
@@ -10397,7 +10605,7 @@ var CheckboxGroup = (props) => {
|
|
|
10397
10605
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
10398
10606
|
|
|
10399
10607
|
// src/components/SelectionControl/RadioButton/RadioButton.tsx
|
|
10400
|
-
import { forwardRef as
|
|
10608
|
+
import { forwardRef as forwardRef62, useId as useId21 } from "react";
|
|
10401
10609
|
|
|
10402
10610
|
// src/components/SelectionControl/RadioButton/RadioButtonGroupContext.tsx
|
|
10403
10611
|
import { createContext as createContext6, useContext as useContext9 } from "react";
|
|
@@ -10407,7 +10615,7 @@ var useRadioButtonGroup = () => {
|
|
|
10407
10615
|
};
|
|
10408
10616
|
|
|
10409
10617
|
// src/components/SelectionControl/RadioButton/RadioButton.tsx
|
|
10410
|
-
import { jsx as
|
|
10618
|
+
import { jsx as jsx253, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
10411
10619
|
var isValueEqualToGroupValueOrFalsy = (value, group) => {
|
|
10412
10620
|
if (typeof value !== "undefined" && value !== null && group) {
|
|
10413
10621
|
if (typeof value === "number") {
|
|
@@ -10417,7 +10625,7 @@ var isValueEqualToGroupValueOrFalsy = (value, group) => {
|
|
|
10417
10625
|
}
|
|
10418
10626
|
return !!value;
|
|
10419
10627
|
};
|
|
10420
|
-
var RadioButton =
|
|
10628
|
+
var RadioButton = forwardRef62(
|
|
10421
10629
|
(props, ref) => {
|
|
10422
10630
|
const {
|
|
10423
10631
|
id,
|
|
@@ -10441,7 +10649,7 @@ var RadioButton = forwardRef61(
|
|
|
10441
10649
|
style,
|
|
10442
10650
|
...restHtmlProps
|
|
10443
10651
|
} = htmlProps;
|
|
10444
|
-
const generatedId =
|
|
10652
|
+
const generatedId = useId21();
|
|
10445
10653
|
const uniqueId = id != null ? id : `${generatedId}-radioButton`;
|
|
10446
10654
|
const hasLabel = !!label;
|
|
10447
10655
|
const radioButtonGroup = useRadioButtonGroup();
|
|
@@ -10453,7 +10661,7 @@ var RadioButton = forwardRef61(
|
|
|
10453
10661
|
if (radioButtonGroup == null ? void 0 : radioButtonGroup.errorMessageId)
|
|
10454
10662
|
describedByIds.push(radioButtonGroup == null ? void 0 : radioButtonGroup.errorMessageId);
|
|
10455
10663
|
if (ariaDescribedby) describedByIds.push(ariaDescribedby);
|
|
10456
|
-
return /* @__PURE__ */
|
|
10664
|
+
return /* @__PURE__ */ jsxs64(
|
|
10457
10665
|
Label2,
|
|
10458
10666
|
{
|
|
10459
10667
|
hasError: error || (radioButtonGroup == null ? void 0 : radioButtonGroup.error),
|
|
@@ -10465,7 +10673,7 @@ var RadioButton = forwardRef61(
|
|
|
10465
10673
|
htmlFor: uniqueId,
|
|
10466
10674
|
controlType: "radio",
|
|
10467
10675
|
children: [
|
|
10468
|
-
/* @__PURE__ */
|
|
10676
|
+
/* @__PURE__ */ jsx253(
|
|
10469
10677
|
"input",
|
|
10470
10678
|
{
|
|
10471
10679
|
...getBaseHTMLProps(uniqueId, restHtmlProps, rest),
|
|
@@ -10485,14 +10693,14 @@ var RadioButton = forwardRef61(
|
|
|
10485
10693
|
ref
|
|
10486
10694
|
}
|
|
10487
10695
|
),
|
|
10488
|
-
/* @__PURE__ */
|
|
10696
|
+
/* @__PURE__ */ jsx253(
|
|
10489
10697
|
SelectionControl,
|
|
10490
10698
|
{
|
|
10491
10699
|
controlType: "radio",
|
|
10492
10700
|
className: focus_default["focus-styled-sibling"]
|
|
10493
10701
|
}
|
|
10494
10702
|
),
|
|
10495
|
-
/* @__PURE__ */
|
|
10703
|
+
/* @__PURE__ */ jsx253(Typography, { ...selectionControlTypographyProps, children: children != null ? children : label })
|
|
10496
10704
|
]
|
|
10497
10705
|
}
|
|
10498
10706
|
);
|
|
@@ -10502,11 +10710,11 @@ RadioButton.displayName = "RadioButton";
|
|
|
10502
10710
|
|
|
10503
10711
|
// src/components/SelectionControl/RadioButton/RadioButtonGroup.tsx
|
|
10504
10712
|
import {
|
|
10505
|
-
forwardRef as
|
|
10506
|
-
useId as
|
|
10713
|
+
forwardRef as forwardRef63,
|
|
10714
|
+
useId as useId22,
|
|
10507
10715
|
useState as useState23
|
|
10508
10716
|
} from "react";
|
|
10509
|
-
import { jsx as
|
|
10717
|
+
import { jsx as jsx254, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
10510
10718
|
var RadioButtonGroupInner = (props, ref) => {
|
|
10511
10719
|
const {
|
|
10512
10720
|
name,
|
|
@@ -10528,7 +10736,7 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
10528
10736
|
} = props;
|
|
10529
10737
|
const { "aria-required": ariaRequired = false } = htmlProps;
|
|
10530
10738
|
const [groupValue, setGroupValue] = useState23(value);
|
|
10531
|
-
const generatedId =
|
|
10739
|
+
const generatedId = useId22();
|
|
10532
10740
|
const uniqueGroupId = groupId != null ? groupId : `${generatedId}-radioButtonGroup`;
|
|
10533
10741
|
const handleChange = combineHandlers(
|
|
10534
10742
|
(e) => setGroupValue(e.target.value),
|
|
@@ -10548,7 +10756,7 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
10548
10756
|
value: groupValue,
|
|
10549
10757
|
onChange: handleChange
|
|
10550
10758
|
};
|
|
10551
|
-
return /* @__PURE__ */
|
|
10759
|
+
return /* @__PURE__ */ jsxs65(
|
|
10552
10760
|
"div",
|
|
10553
10761
|
{
|
|
10554
10762
|
...getBaseHTMLProps(
|
|
@@ -10559,7 +10767,7 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
10559
10767
|
),
|
|
10560
10768
|
ref,
|
|
10561
10769
|
children: [
|
|
10562
|
-
/* @__PURE__ */
|
|
10770
|
+
/* @__PURE__ */ jsxs65(
|
|
10563
10771
|
Typography,
|
|
10564
10772
|
{
|
|
10565
10773
|
as: "span",
|
|
@@ -10568,12 +10776,12 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
10568
10776
|
children: [
|
|
10569
10777
|
label,
|
|
10570
10778
|
" ",
|
|
10571
|
-
showRequiredMarker && /* @__PURE__ */
|
|
10779
|
+
showRequiredMarker && /* @__PURE__ */ jsx254(RequiredMarker, {})
|
|
10572
10780
|
]
|
|
10573
10781
|
}
|
|
10574
10782
|
),
|
|
10575
10783
|
renderInputMessage(tip, tipId),
|
|
10576
|
-
/* @__PURE__ */
|
|
10784
|
+
/* @__PURE__ */ jsx254(RadioButtonGroupContext.Provider, { value: { ...contextProps }, children: /* @__PURE__ */ jsx254(
|
|
10577
10785
|
"div",
|
|
10578
10786
|
{
|
|
10579
10787
|
role: "radiogroup",
|
|
@@ -10589,11 +10797,11 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
10589
10797
|
}
|
|
10590
10798
|
);
|
|
10591
10799
|
};
|
|
10592
|
-
var RadioButtonGroup =
|
|
10800
|
+
var RadioButtonGroup = forwardRef63(RadioButtonGroupInner);
|
|
10593
10801
|
RadioButtonGroup.displayName = "RadioButtonGroup";
|
|
10594
10802
|
|
|
10595
10803
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
10596
|
-
import { forwardRef as
|
|
10804
|
+
import { forwardRef as forwardRef64 } from "react";
|
|
10597
10805
|
|
|
10598
10806
|
// src/components/SkipToContent/SkipToContent.module.css
|
|
10599
10807
|
var SkipToContent_default = {
|
|
@@ -10602,8 +10810,8 @@ var SkipToContent_default = {
|
|
|
10602
10810
|
};
|
|
10603
10811
|
|
|
10604
10812
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
10605
|
-
import { jsx as
|
|
10606
|
-
var SkipToContent =
|
|
10813
|
+
import { jsx as jsx255 } from "react/jsx-runtime";
|
|
10814
|
+
var SkipToContent = forwardRef64(
|
|
10607
10815
|
(props, ref) => {
|
|
10608
10816
|
const {
|
|
10609
10817
|
text = "Til hovedinnhold",
|
|
@@ -10618,12 +10826,12 @@ var SkipToContent = forwardRef63(
|
|
|
10618
10826
|
style,
|
|
10619
10827
|
...restHtmlProps
|
|
10620
10828
|
} = htmlProps;
|
|
10621
|
-
return /* @__PURE__ */
|
|
10829
|
+
return /* @__PURE__ */ jsx255(
|
|
10622
10830
|
"div",
|
|
10623
10831
|
{
|
|
10624
10832
|
className: cn(className, htmlPropsClassName, SkipToContent_default.wrapper),
|
|
10625
10833
|
style: { ...style, top },
|
|
10626
|
-
children: /* @__PURE__ */
|
|
10834
|
+
children: /* @__PURE__ */ jsx255(
|
|
10627
10835
|
Link,
|
|
10628
10836
|
{
|
|
10629
10837
|
...getBaseHTMLProps(id, restHtmlProps, rest),
|
|
@@ -10640,7 +10848,7 @@ var SkipToContent = forwardRef63(
|
|
|
10640
10848
|
SkipToContent.displayName = "SkipToContent";
|
|
10641
10849
|
|
|
10642
10850
|
// src/components/SplitButton/SplitButton.tsx
|
|
10643
|
-
import { forwardRef as
|
|
10851
|
+
import { forwardRef as forwardRef65, useState as useState24 } from "react";
|
|
10644
10852
|
|
|
10645
10853
|
// src/components/SplitButton/SplitButton.module.css
|
|
10646
10854
|
var SplitButton_default = {
|
|
@@ -10651,8 +10859,8 @@ var SplitButton_default = {
|
|
|
10651
10859
|
};
|
|
10652
10860
|
|
|
10653
10861
|
// src/components/SplitButton/SplitButton.tsx
|
|
10654
|
-
import { jsx as
|
|
10655
|
-
var SplitButton =
|
|
10862
|
+
import { jsx as jsx256, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
10863
|
+
var SplitButton = forwardRef65(
|
|
10656
10864
|
(props, ref) => {
|
|
10657
10865
|
const {
|
|
10658
10866
|
size: size2,
|
|
@@ -10667,8 +10875,8 @@ var SplitButton = forwardRef64(
|
|
|
10667
10875
|
purpose,
|
|
10668
10876
|
size: size2
|
|
10669
10877
|
};
|
|
10670
|
-
return /* @__PURE__ */
|
|
10671
|
-
/* @__PURE__ */
|
|
10878
|
+
return /* @__PURE__ */ jsxs66("div", { ref, className: cn(className, SplitButton_default.container), ...rest, children: [
|
|
10879
|
+
/* @__PURE__ */ jsx256(
|
|
10672
10880
|
Button,
|
|
10673
10881
|
{
|
|
10674
10882
|
...buttonStyleProps,
|
|
@@ -10677,8 +10885,8 @@ var SplitButton = forwardRef64(
|
|
|
10677
10885
|
className: SplitButton_default.main
|
|
10678
10886
|
}
|
|
10679
10887
|
),
|
|
10680
|
-
/* @__PURE__ */
|
|
10681
|
-
/* @__PURE__ */
|
|
10888
|
+
/* @__PURE__ */ jsxs66(OverflowMenuGroup, { onToggle: () => setIsOpen(!isOpen), children: [
|
|
10889
|
+
/* @__PURE__ */ jsx256(
|
|
10682
10890
|
Button,
|
|
10683
10891
|
{
|
|
10684
10892
|
...buttonStyleProps,
|
|
@@ -10691,7 +10899,7 @@ var SplitButton = forwardRef64(
|
|
|
10691
10899
|
)
|
|
10692
10900
|
}
|
|
10693
10901
|
),
|
|
10694
|
-
/* @__PURE__ */
|
|
10902
|
+
/* @__PURE__ */ jsx256(OverflowMenu, { items: secondaryActions, placement: "bottom-end" })
|
|
10695
10903
|
] })
|
|
10696
10904
|
] });
|
|
10697
10905
|
}
|
|
@@ -10703,7 +10911,7 @@ import {
|
|
|
10703
10911
|
Children as Children5,
|
|
10704
10912
|
Fragment as Fragment13,
|
|
10705
10913
|
cloneElement as cloneElement8,
|
|
10706
|
-
forwardRef as
|
|
10914
|
+
forwardRef as forwardRef73,
|
|
10707
10915
|
isValidElement as isValidElement9,
|
|
10708
10916
|
useEffect as useEffect24,
|
|
10709
10917
|
useState as useState26
|
|
@@ -10718,30 +10926,30 @@ var CollapsibleTableContext = createContext7({
|
|
|
10718
10926
|
var useCollapsibleTableContext = () => useContext10(CollapsibleTableContext);
|
|
10719
10927
|
|
|
10720
10928
|
// src/components/Table/normal/Body.tsx
|
|
10721
|
-
import { forwardRef as
|
|
10722
|
-
import { jsx as
|
|
10723
|
-
var Body =
|
|
10929
|
+
import { forwardRef as forwardRef66 } from "react";
|
|
10930
|
+
import { jsx as jsx257 } from "react/jsx-runtime";
|
|
10931
|
+
var Body = forwardRef66(
|
|
10724
10932
|
(props, ref) => {
|
|
10725
|
-
return /* @__PURE__ */
|
|
10933
|
+
return /* @__PURE__ */ jsx257("tbody", { ref, ...props });
|
|
10726
10934
|
}
|
|
10727
10935
|
);
|
|
10728
10936
|
Body.displayName = "Table.Body";
|
|
10729
10937
|
|
|
10730
10938
|
// src/components/Table/normal/Cell.tsx
|
|
10731
10939
|
import {
|
|
10732
|
-
forwardRef as
|
|
10940
|
+
forwardRef as forwardRef68
|
|
10733
10941
|
} from "react";
|
|
10734
10942
|
|
|
10735
10943
|
// src/components/Table/normal/Head.tsx
|
|
10736
10944
|
import {
|
|
10737
10945
|
createContext as createContext8,
|
|
10738
|
-
forwardRef as
|
|
10946
|
+
forwardRef as forwardRef67,
|
|
10739
10947
|
useContext as useContext11
|
|
10740
10948
|
} from "react";
|
|
10741
|
-
import { jsx as
|
|
10742
|
-
var Head =
|
|
10949
|
+
import { jsx as jsx258 } from "react/jsx-runtime";
|
|
10950
|
+
var Head = forwardRef67(
|
|
10743
10951
|
({ children, ...rest }, ref) => {
|
|
10744
|
-
return /* @__PURE__ */
|
|
10952
|
+
return /* @__PURE__ */ jsx258("thead", { ref, ...rest, children: /* @__PURE__ */ jsx258(HeadContext.Provider, { value: true, children }) });
|
|
10745
10953
|
}
|
|
10746
10954
|
);
|
|
10747
10955
|
Head.displayName = "Table.Head";
|
|
@@ -10777,8 +10985,8 @@ var Table_default = {
|
|
|
10777
10985
|
};
|
|
10778
10986
|
|
|
10779
10987
|
// src/components/Table/normal/Cell.tsx
|
|
10780
|
-
import { jsx as
|
|
10781
|
-
var Cell =
|
|
10988
|
+
import { jsx as jsx259 } from "react/jsx-runtime";
|
|
10989
|
+
var Cell = forwardRef68(
|
|
10782
10990
|
({
|
|
10783
10991
|
children,
|
|
10784
10992
|
type: _type,
|
|
@@ -10791,7 +10999,7 @@ var Cell = forwardRef67(
|
|
|
10791
10999
|
const type = _type != null ? _type : isInHead ? "head" : "data";
|
|
10792
11000
|
const { isCollapsibleChild } = collapsibleProps != null ? collapsibleProps : {};
|
|
10793
11001
|
const isComplexLayout = layout === "text and icon";
|
|
10794
|
-
return isCollapsibleChild ? /* @__PURE__ */
|
|
11002
|
+
return isCollapsibleChild ? /* @__PURE__ */ jsx259(DescriptionListDesc, { children }) : type === "head" ? /* @__PURE__ */ jsx259(
|
|
10795
11003
|
"th",
|
|
10796
11004
|
{
|
|
10797
11005
|
ref,
|
|
@@ -10801,15 +11009,15 @@ var Cell = forwardRef67(
|
|
|
10801
11009
|
!isComplexLayout && Table_default[`cell--${layout}`],
|
|
10802
11010
|
Table_default["cell--head"]
|
|
10803
11011
|
),
|
|
10804
|
-
children: isComplexLayout ? /* @__PURE__ */
|
|
11012
|
+
children: isComplexLayout ? /* @__PURE__ */ jsx259("div", { className: Table_default.cell__inner, children }) : children
|
|
10805
11013
|
}
|
|
10806
|
-
) : /* @__PURE__ */
|
|
11014
|
+
) : /* @__PURE__ */ jsx259(
|
|
10807
11015
|
"td",
|
|
10808
11016
|
{
|
|
10809
11017
|
ref,
|
|
10810
11018
|
...rest,
|
|
10811
11019
|
className: cn(className, !isComplexLayout && Table_default[`cell--${layout}`]),
|
|
10812
|
-
children: isComplexLayout ? /* @__PURE__ */
|
|
11020
|
+
children: isComplexLayout ? /* @__PURE__ */ jsx259("div", { className: Table_default.cell__inner, children }) : children
|
|
10813
11021
|
}
|
|
10814
11022
|
);
|
|
10815
11023
|
}
|
|
@@ -10817,23 +11025,23 @@ var Cell = forwardRef67(
|
|
|
10817
11025
|
Cell.displayName = "Table.Cell";
|
|
10818
11026
|
|
|
10819
11027
|
// src/components/Table/normal/Foot.tsx
|
|
10820
|
-
import { forwardRef as
|
|
10821
|
-
import { jsx as
|
|
10822
|
-
var Foot =
|
|
11028
|
+
import { forwardRef as forwardRef69 } from "react";
|
|
11029
|
+
import { jsx as jsx260 } from "react/jsx-runtime";
|
|
11030
|
+
var Foot = forwardRef69(
|
|
10823
11031
|
(props, ref) => {
|
|
10824
|
-
return /* @__PURE__ */
|
|
11032
|
+
return /* @__PURE__ */ jsx260("tfoot", { ref, ...props });
|
|
10825
11033
|
}
|
|
10826
11034
|
);
|
|
10827
11035
|
Foot.displayName = "Table.Foot";
|
|
10828
11036
|
|
|
10829
11037
|
// src/components/Table/normal/Row.tsx
|
|
10830
|
-
import { forwardRef as
|
|
10831
|
-
import { jsx as
|
|
10832
|
-
var Row =
|
|
11038
|
+
import { forwardRef as forwardRef70 } from "react";
|
|
11039
|
+
import { jsx as jsx261 } from "react/jsx-runtime";
|
|
11040
|
+
var Row = forwardRef70(
|
|
10833
11041
|
({ type: _type, mode = "normal", hoverable, selected, className, ...rest }, ref) => {
|
|
10834
11042
|
const isInHeader = useIsInTableHead();
|
|
10835
11043
|
const type = _type != null ? _type : isInHeader ? "head" : "body";
|
|
10836
|
-
return /* @__PURE__ */
|
|
11044
|
+
return /* @__PURE__ */ jsx261(
|
|
10837
11045
|
"tr",
|
|
10838
11046
|
{
|
|
10839
11047
|
ref,
|
|
@@ -10856,23 +11064,23 @@ var Row = forwardRef69(
|
|
|
10856
11064
|
Row.displayName = "Table.Row";
|
|
10857
11065
|
|
|
10858
11066
|
// src/components/Table/normal/SortCell.tsx
|
|
10859
|
-
import { forwardRef as
|
|
10860
|
-
import { jsx as
|
|
11067
|
+
import { forwardRef as forwardRef71 } from "react";
|
|
11068
|
+
import { jsx as jsx262, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
10861
11069
|
var makeSortIcon = (isSorted, sortOrder) => {
|
|
10862
11070
|
if (!isSorted || !sortOrder) {
|
|
10863
|
-
return /* @__PURE__ */
|
|
11071
|
+
return /* @__PURE__ */ jsx262(Icon, { icon: UnfoldMoreIcon, iconSize: "inherit" });
|
|
10864
11072
|
}
|
|
10865
|
-
return sortOrder === "ascending" ? /* @__PURE__ */
|
|
11073
|
+
return sortOrder === "ascending" ? /* @__PURE__ */ jsx262(Icon, { icon: ChevronDownIcon, iconSize: "inherit" }) : /* @__PURE__ */ jsx262(Icon, { icon: ChevronUpIcon, iconSize: "inherit" });
|
|
10866
11074
|
};
|
|
10867
|
-
var SortCell =
|
|
10868
|
-
({ isSorted, sortOrder, onClick, children, ...rest }, ref) => /* @__PURE__ */
|
|
11075
|
+
var SortCell = forwardRef71(
|
|
11076
|
+
({ isSorted, sortOrder, onClick, children, ...rest }, ref) => /* @__PURE__ */ jsx262(
|
|
10869
11077
|
Cell,
|
|
10870
11078
|
{
|
|
10871
11079
|
ref,
|
|
10872
11080
|
type: "head",
|
|
10873
11081
|
"aria-sort": isSorted && sortOrder ? sortOrder : void 0,
|
|
10874
11082
|
...rest,
|
|
10875
|
-
children: /* @__PURE__ */
|
|
11083
|
+
children: /* @__PURE__ */ jsxs67(
|
|
10876
11084
|
"button",
|
|
10877
11085
|
{
|
|
10878
11086
|
onClick,
|
|
@@ -10896,8 +11104,8 @@ var SortCell = forwardRef70(
|
|
|
10896
11104
|
SortCell.displayName = "Table.SortCell";
|
|
10897
11105
|
|
|
10898
11106
|
// src/components/Table/normal/Table.tsx
|
|
10899
|
-
import { forwardRef as
|
|
10900
|
-
import { jsx as
|
|
11107
|
+
import { forwardRef as forwardRef72 } from "react";
|
|
11108
|
+
import { jsx as jsx263 } from "react/jsx-runtime";
|
|
10901
11109
|
function getDensityCn(value) {
|
|
10902
11110
|
switch (value) {
|
|
10903
11111
|
case "normal":
|
|
@@ -10907,7 +11115,7 @@ function getDensityCn(value) {
|
|
|
10907
11115
|
return "extra-compact";
|
|
10908
11116
|
}
|
|
10909
11117
|
}
|
|
10910
|
-
var Table =
|
|
11118
|
+
var Table = forwardRef72(
|
|
10911
11119
|
({
|
|
10912
11120
|
density = "normal",
|
|
10913
11121
|
stickyHeader,
|
|
@@ -10916,7 +11124,7 @@ var Table = forwardRef71(
|
|
|
10916
11124
|
children,
|
|
10917
11125
|
...rest
|
|
10918
11126
|
}, ref) => {
|
|
10919
|
-
return /* @__PURE__ */
|
|
11127
|
+
return /* @__PURE__ */ jsx263(
|
|
10920
11128
|
"table",
|
|
10921
11129
|
{
|
|
10922
11130
|
ref,
|
|
@@ -10938,7 +11146,7 @@ Table.displayName = "Table";
|
|
|
10938
11146
|
|
|
10939
11147
|
// src/components/Table/normal/TableWrapper.tsx
|
|
10940
11148
|
import { useEffect as useEffect23, useRef as useRef28, useState as useState25 } from "react";
|
|
10941
|
-
import { jsx as
|
|
11149
|
+
import { jsx as jsx264 } from "react/jsx-runtime";
|
|
10942
11150
|
var TableWrapper = ({ className, ...rest }) => {
|
|
10943
11151
|
const [overflowX, setOverflowX] = useState25(false);
|
|
10944
11152
|
const [windowWidth, setWindowWidth] = useState25(window.innerWidth);
|
|
@@ -10960,7 +11168,7 @@ var TableWrapper = ({ className, ...rest }) => {
|
|
|
10960
11168
|
window.addEventListener("resize", handleResize);
|
|
10961
11169
|
return () => window.removeEventListener("resize", handleResize);
|
|
10962
11170
|
});
|
|
10963
|
-
return /* @__PURE__ */
|
|
11171
|
+
return /* @__PURE__ */ jsx264(
|
|
10964
11172
|
"div",
|
|
10965
11173
|
{
|
|
10966
11174
|
ref: wrapperRef,
|
|
@@ -10987,8 +11195,8 @@ Table2.Row = Row;
|
|
|
10987
11195
|
Table2.Foot = Foot;
|
|
10988
11196
|
|
|
10989
11197
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
10990
|
-
import { Fragment as Fragment14, jsx as
|
|
10991
|
-
var CollapsibleRow =
|
|
11198
|
+
import { Fragment as Fragment14, jsx as jsx265, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
11199
|
+
var CollapsibleRow = forwardRef73(
|
|
10992
11200
|
({
|
|
10993
11201
|
type: _type,
|
|
10994
11202
|
className,
|
|
@@ -11029,33 +11237,33 @@ var CollapsibleRow = forwardRef72(
|
|
|
11029
11237
|
const collapsedRenderedChildren = isCollapsed && collapsedHeaderValues.length > 0 ? collapsedChildren.map(function(child, index) {
|
|
11030
11238
|
const id = derivativeIdGenerator(prefix3, index.toString());
|
|
11031
11239
|
collapsibleIds.push(id);
|
|
11032
|
-
return /* @__PURE__ */
|
|
11033
|
-
/* @__PURE__ */
|
|
11240
|
+
return /* @__PURE__ */ jsxs68(Fragment13, { children: [
|
|
11241
|
+
/* @__PURE__ */ jsx265(DescriptionListTerm, { children: collapsedHeaderValues[index].content }),
|
|
11034
11242
|
isValidElement9(child) && cloneElement8(child, {
|
|
11035
11243
|
collapsibleProps: { isCollapsibleChild: true }
|
|
11036
11244
|
})
|
|
11037
11245
|
] }, `DL-${index}`);
|
|
11038
11246
|
}) : null;
|
|
11039
|
-
const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */
|
|
11247
|
+
const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsx265(Row, { ...rowProps(), children: /* @__PURE__ */ jsx265(Cell, { colSpan: definingColumnIndex.length + 1, children: /* @__PURE__ */ jsx265(DescriptionList, { children: collapsedRenderedChildren }) }) }) : null;
|
|
11040
11248
|
const definingColumnCells = childrenArray.slice().filter((column2, index) => definingColumnIndex.indexOf(index) > -1).sort((a3, b) => {
|
|
11041
11249
|
return definingColumnIndex.indexOf(childrenArray.indexOf(a3)) - definingColumnIndex.indexOf(childrenArray.indexOf(b));
|
|
11042
11250
|
});
|
|
11043
11251
|
const headerRow = () => {
|
|
11044
11252
|
if (type !== "head" || !isCollapsed) return null;
|
|
11045
|
-
return /* @__PURE__ */
|
|
11253
|
+
return /* @__PURE__ */ jsx265(Row, { ref, ...rowProps(), children: /* @__PURE__ */ jsxs68(Fragment14, { children: [
|
|
11046
11254
|
definingColumnCells,
|
|
11047
|
-
/* @__PURE__ */
|
|
11255
|
+
/* @__PURE__ */ jsxs68(Table2.Cell, { type: "head", layout: "center", children: [
|
|
11048
11256
|
"Utvid",
|
|
11049
|
-
/* @__PURE__ */
|
|
11257
|
+
/* @__PURE__ */ jsx265(VisuallyHidden, { as: "span", children: "raden" })
|
|
11050
11258
|
] })
|
|
11051
11259
|
] }) });
|
|
11052
11260
|
};
|
|
11053
11261
|
const idList = spaceSeparatedIdListGenerator(collapsibleIds);
|
|
11054
11262
|
const rowWithChevron = () => {
|
|
11055
11263
|
if (type !== "body" || !isCollapsed) return null;
|
|
11056
|
-
return /* @__PURE__ */
|
|
11264
|
+
return /* @__PURE__ */ jsxs68(Row, { ref, ...rowProps(!childrenCollapsed && true), children: [
|
|
11057
11265
|
definingColumnCells,
|
|
11058
|
-
/* @__PURE__ */
|
|
11266
|
+
/* @__PURE__ */ jsx265(Table2.Cell, { children: /* @__PURE__ */ jsx265(
|
|
11059
11267
|
"button",
|
|
11060
11268
|
{
|
|
11061
11269
|
onClick: () => setChildrenCollapsed(!childrenCollapsed),
|
|
@@ -11067,7 +11275,7 @@ var CollapsibleRow = forwardRef72(
|
|
|
11067
11275
|
utilStyles_default["remove-button-styling"],
|
|
11068
11276
|
focusable
|
|
11069
11277
|
),
|
|
11070
|
-
children: /* @__PURE__ */
|
|
11278
|
+
children: /* @__PURE__ */ jsx265(
|
|
11071
11279
|
AnimatedChevronUpDown,
|
|
11072
11280
|
{
|
|
11073
11281
|
isUp: childrenCollapsed ? false : true,
|
|
@@ -11079,28 +11287,28 @@ var CollapsibleRow = forwardRef72(
|
|
|
11079
11287
|
) })
|
|
11080
11288
|
] });
|
|
11081
11289
|
};
|
|
11082
|
-
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */
|
|
11290
|
+
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsxs68(Fragment14, { children: [
|
|
11083
11291
|
headerRow(),
|
|
11084
|
-
type === "body" && /* @__PURE__ */
|
|
11292
|
+
type === "body" && /* @__PURE__ */ jsxs68(Fragment14, { children: [
|
|
11085
11293
|
rowWithChevron(),
|
|
11086
11294
|
childrenCollapsed ? null : collapsedRows
|
|
11087
11295
|
] })
|
|
11088
|
-
] }) : /* @__PURE__ */
|
|
11296
|
+
] }) : /* @__PURE__ */ jsx265(Row, { ref, ...rowProps(), children });
|
|
11089
11297
|
}
|
|
11090
11298
|
);
|
|
11091
11299
|
CollapsibleRow.displayName = "CollapsibleTable.Row";
|
|
11092
11300
|
|
|
11093
11301
|
// src/components/Table/collapsible/CollapsibleTable.tsx
|
|
11094
|
-
import { forwardRef as
|
|
11095
|
-
import { jsx as
|
|
11096
|
-
var CollapsibleTable =
|
|
11302
|
+
import { forwardRef as forwardRef74 } from "react";
|
|
11303
|
+
import { jsx as jsx266 } from "react/jsx-runtime";
|
|
11304
|
+
var CollapsibleTable = forwardRef74((props, ref) => {
|
|
11097
11305
|
const {
|
|
11098
11306
|
isCollapsed,
|
|
11099
11307
|
headerValues,
|
|
11100
11308
|
definingColumnIndex = [0],
|
|
11101
11309
|
...rest
|
|
11102
11310
|
} = props;
|
|
11103
|
-
return /* @__PURE__ */
|
|
11311
|
+
return /* @__PURE__ */ jsx266(
|
|
11104
11312
|
CollapsibleTableContext.Provider,
|
|
11105
11313
|
{
|
|
11106
11314
|
value: {
|
|
@@ -11108,7 +11316,7 @@ var CollapsibleTable = forwardRef73((props, ref) => {
|
|
|
11108
11316
|
headerValues,
|
|
11109
11317
|
definingColumnIndex
|
|
11110
11318
|
},
|
|
11111
|
-
children: /* @__PURE__ */
|
|
11319
|
+
children: /* @__PURE__ */ jsx266(Table2, { ref, ...rest })
|
|
11112
11320
|
}
|
|
11113
11321
|
);
|
|
11114
11322
|
});
|
|
@@ -11120,9 +11328,9 @@ CollapsibleTable2.Row = CollapsibleRow;
|
|
|
11120
11328
|
|
|
11121
11329
|
// src/components/Tabs/Tabs.tsx
|
|
11122
11330
|
import {
|
|
11123
|
-
forwardRef as
|
|
11331
|
+
forwardRef as forwardRef75,
|
|
11124
11332
|
useEffect as useEffect25,
|
|
11125
|
-
useId as
|
|
11333
|
+
useId as useId23,
|
|
11126
11334
|
useRef as useRef29,
|
|
11127
11335
|
useState as useState27
|
|
11128
11336
|
} from "react";
|
|
@@ -11156,8 +11364,8 @@ var Tabs_default = {
|
|
|
11156
11364
|
};
|
|
11157
11365
|
|
|
11158
11366
|
// src/components/Tabs/Tabs.tsx
|
|
11159
|
-
import { jsx as
|
|
11160
|
-
var Tabs =
|
|
11367
|
+
import { jsx as jsx267 } from "react/jsx-runtime";
|
|
11368
|
+
var Tabs = forwardRef75((props, ref) => {
|
|
11161
11369
|
const {
|
|
11162
11370
|
id,
|
|
11163
11371
|
activeTab,
|
|
@@ -11169,7 +11377,7 @@ var Tabs = forwardRef74((props, ref) => {
|
|
|
11169
11377
|
htmlProps,
|
|
11170
11378
|
...rest
|
|
11171
11379
|
} = props;
|
|
11172
|
-
const generatedId =
|
|
11380
|
+
const generatedId = useId23();
|
|
11173
11381
|
const uniqueId = id != null ? id : `${generatedId}-tabs`;
|
|
11174
11382
|
const [thisActiveTab, setActiveTab] = useState27(activeTab != null ? activeTab : 0);
|
|
11175
11383
|
const [hasTabFocus, setHasTabFocus] = useState27(false);
|
|
@@ -11188,7 +11396,7 @@ var Tabs = forwardRef74((props, ref) => {
|
|
|
11188
11396
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11189
11397
|
["--dds-tabs-width"]: width
|
|
11190
11398
|
};
|
|
11191
|
-
return /* @__PURE__ */
|
|
11399
|
+
return /* @__PURE__ */ jsx267(
|
|
11192
11400
|
TabsContext.Provider,
|
|
11193
11401
|
{
|
|
11194
11402
|
value: {
|
|
@@ -11201,7 +11409,7 @@ var Tabs = forwardRef74((props, ref) => {
|
|
|
11201
11409
|
setHasTabFocus,
|
|
11202
11410
|
tabContentDirection
|
|
11203
11411
|
},
|
|
11204
|
-
children: /* @__PURE__ */
|
|
11412
|
+
children: /* @__PURE__ */ jsx267(
|
|
11205
11413
|
"div",
|
|
11206
11414
|
{
|
|
11207
11415
|
ref,
|
|
@@ -11222,7 +11430,7 @@ Tabs.displayName = "Tabs";
|
|
|
11222
11430
|
|
|
11223
11431
|
// src/components/Tabs/Tab.tsx
|
|
11224
11432
|
import {
|
|
11225
|
-
forwardRef as
|
|
11433
|
+
forwardRef as forwardRef76,
|
|
11226
11434
|
useCallback as useCallback7,
|
|
11227
11435
|
useEffect as useEffect26,
|
|
11228
11436
|
useRef as useRef30
|
|
@@ -11234,13 +11442,13 @@ import {
|
|
|
11234
11442
|
useContext as useContext13,
|
|
11235
11443
|
useLayoutEffect as useLayoutEffect2
|
|
11236
11444
|
} from "react";
|
|
11237
|
-
import { jsx as
|
|
11445
|
+
import { jsx as jsx268 } from "react/jsx-runtime";
|
|
11238
11446
|
var TabContext = createContext10(null);
|
|
11239
11447
|
function TabWidthContextProvider({
|
|
11240
11448
|
children,
|
|
11241
11449
|
onChangeWidths
|
|
11242
11450
|
}) {
|
|
11243
|
-
return /* @__PURE__ */
|
|
11451
|
+
return /* @__PURE__ */ jsx268(
|
|
11244
11452
|
TabContext.Provider,
|
|
11245
11453
|
{
|
|
11246
11454
|
value: {
|
|
@@ -11272,8 +11480,8 @@ function useSetTabWidth(index, width) {
|
|
|
11272
11480
|
}
|
|
11273
11481
|
|
|
11274
11482
|
// src/components/Tabs/Tab.tsx
|
|
11275
|
-
import { jsx as
|
|
11276
|
-
var Tab =
|
|
11483
|
+
import { jsx as jsx269, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
11484
|
+
var Tab = forwardRef76((props, ref) => {
|
|
11277
11485
|
const {
|
|
11278
11486
|
active = false,
|
|
11279
11487
|
icon: icon2,
|
|
@@ -11312,7 +11520,7 @@ var Tab = forwardRef75((props, ref) => {
|
|
|
11312
11520
|
handleSelect();
|
|
11313
11521
|
onKeyDown && onKeyDown(e);
|
|
11314
11522
|
};
|
|
11315
|
-
return /* @__PURE__ */
|
|
11523
|
+
return /* @__PURE__ */ jsxs69(
|
|
11316
11524
|
"button",
|
|
11317
11525
|
{
|
|
11318
11526
|
...getBaseHTMLProps(
|
|
@@ -11335,8 +11543,8 @@ var Tab = forwardRef75((props, ref) => {
|
|
|
11335
11543
|
onKeyDown: handleOnKeyDown,
|
|
11336
11544
|
tabIndex: focus ? 0 : -1,
|
|
11337
11545
|
children: [
|
|
11338
|
-
icon2 && /* @__PURE__ */
|
|
11339
|
-
/* @__PURE__ */
|
|
11546
|
+
icon2 && /* @__PURE__ */ jsx269(Icon, { icon: icon2, iconSize: "inherit" }),
|
|
11547
|
+
/* @__PURE__ */ jsx269("span", { children })
|
|
11340
11548
|
]
|
|
11341
11549
|
}
|
|
11342
11550
|
);
|
|
@@ -11347,12 +11555,12 @@ Tab.displayName = "Tab";
|
|
|
11347
11555
|
import {
|
|
11348
11556
|
Children as Children6,
|
|
11349
11557
|
cloneElement as cloneElement9,
|
|
11350
|
-
forwardRef as
|
|
11558
|
+
forwardRef as forwardRef77,
|
|
11351
11559
|
isValidElement as isValidElement10,
|
|
11352
11560
|
useState as useState28
|
|
11353
11561
|
} from "react";
|
|
11354
|
-
import { jsx as
|
|
11355
|
-
var TabList =
|
|
11562
|
+
import { jsx as jsx270 } from "react/jsx-runtime";
|
|
11563
|
+
var TabList = forwardRef77(
|
|
11356
11564
|
({ children, id, style, onFocus, ...rest }, ref) => {
|
|
11357
11565
|
const {
|
|
11358
11566
|
activeTab,
|
|
@@ -11395,7 +11603,7 @@ var TabList = forwardRef76(
|
|
|
11395
11603
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11396
11604
|
["--dds-tab-widths"]: widths.join(" ")
|
|
11397
11605
|
};
|
|
11398
|
-
return /* @__PURE__ */
|
|
11606
|
+
return /* @__PURE__ */ jsx270(TabWidthContextProvider, { onChangeWidths: setWidths, children: /* @__PURE__ */ jsx270(
|
|
11399
11607
|
"div",
|
|
11400
11608
|
{
|
|
11401
11609
|
...rest,
|
|
@@ -11421,11 +11629,11 @@ var TabList = forwardRef76(
|
|
|
11421
11629
|
TabList.displayName = "TabList";
|
|
11422
11630
|
|
|
11423
11631
|
// src/components/Tabs/TabPanel.tsx
|
|
11424
|
-
import { forwardRef as
|
|
11425
|
-
import { jsx as
|
|
11426
|
-
var TabPanel =
|
|
11632
|
+
import { forwardRef as forwardRef78 } from "react";
|
|
11633
|
+
import { jsx as jsx271 } from "react/jsx-runtime";
|
|
11634
|
+
var TabPanel = forwardRef78(
|
|
11427
11635
|
({ active = false, children, id, className, htmlProps, ...rest }, ref) => {
|
|
11428
|
-
return /* @__PURE__ */
|
|
11636
|
+
return /* @__PURE__ */ jsx271(
|
|
11429
11637
|
"div",
|
|
11430
11638
|
{
|
|
11431
11639
|
...getBaseHTMLProps(
|
|
@@ -11453,11 +11661,11 @@ TabPanel.displayName = "TabPanel";
|
|
|
11453
11661
|
import {
|
|
11454
11662
|
Children as Children7,
|
|
11455
11663
|
cloneElement as cloneElement10,
|
|
11456
|
-
forwardRef as
|
|
11664
|
+
forwardRef as forwardRef79,
|
|
11457
11665
|
isValidElement as isValidElement11
|
|
11458
11666
|
} from "react";
|
|
11459
|
-
import { jsx as
|
|
11460
|
-
var TabPanels =
|
|
11667
|
+
import { jsx as jsx272 } from "react/jsx-runtime";
|
|
11668
|
+
var TabPanels = forwardRef79(
|
|
11461
11669
|
({ children, ...rest }, ref) => {
|
|
11462
11670
|
const { activeTab, tabsId, tabPanelsRef } = useTabsContext();
|
|
11463
11671
|
const combinedRef = useCombinedRef(ref, tabPanelsRef);
|
|
@@ -11470,13 +11678,13 @@ var TabPanels = forwardRef78(
|
|
|
11470
11678
|
"aria-expanded": active
|
|
11471
11679
|
});
|
|
11472
11680
|
});
|
|
11473
|
-
return /* @__PURE__ */
|
|
11681
|
+
return /* @__PURE__ */ jsx272("div", { ref: combinedRef, ...rest, children: panelChildren });
|
|
11474
11682
|
}
|
|
11475
11683
|
);
|
|
11476
11684
|
TabPanels.displayName = "TabPanels";
|
|
11477
11685
|
|
|
11478
11686
|
// src/components/Tag/Tag.tsx
|
|
11479
|
-
import { forwardRef as
|
|
11687
|
+
import { forwardRef as forwardRef80 } from "react";
|
|
11480
11688
|
|
|
11481
11689
|
// src/components/Tag/Tag.module.css
|
|
11482
11690
|
var Tag_default = {
|
|
@@ -11495,7 +11703,7 @@ var Tag_default = {
|
|
|
11495
11703
|
};
|
|
11496
11704
|
|
|
11497
11705
|
// src/components/Tag/Tag.tsx
|
|
11498
|
-
import { jsx as
|
|
11706
|
+
import { jsx as jsx273, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
11499
11707
|
var purposeVariants3 = {
|
|
11500
11708
|
info: {
|
|
11501
11709
|
icon: InfoIcon
|
|
@@ -11513,7 +11721,7 @@ var purposeVariants3 = {
|
|
|
11513
11721
|
icon: void 0
|
|
11514
11722
|
}
|
|
11515
11723
|
};
|
|
11516
|
-
var Tag =
|
|
11724
|
+
var Tag = forwardRef80((props, ref) => {
|
|
11517
11725
|
const {
|
|
11518
11726
|
text,
|
|
11519
11727
|
purpose = "default",
|
|
@@ -11526,7 +11734,7 @@ var Tag = forwardRef79((props, ref) => {
|
|
|
11526
11734
|
...rest
|
|
11527
11735
|
} = props;
|
|
11528
11736
|
const icon2 = purposeVariants3[purpose].icon;
|
|
11529
|
-
return /* @__PURE__ */
|
|
11737
|
+
return /* @__PURE__ */ jsxs70(
|
|
11530
11738
|
TextOverflowEllipsisWrapper,
|
|
11531
11739
|
{
|
|
11532
11740
|
...getBaseHTMLProps(
|
|
@@ -11543,8 +11751,8 @@ var Tag = forwardRef79((props, ref) => {
|
|
|
11543
11751
|
),
|
|
11544
11752
|
ref,
|
|
11545
11753
|
children: [
|
|
11546
|
-
withIcon && icon2 && /* @__PURE__ */
|
|
11547
|
-
/* @__PURE__ */
|
|
11754
|
+
withIcon && icon2 && /* @__PURE__ */ jsx273(Icon, { icon: icon2, iconSize: "small" }),
|
|
11755
|
+
/* @__PURE__ */ jsx273(TextOverflowEllipsisInner, { children: children != null ? children : text })
|
|
11548
11756
|
]
|
|
11549
11757
|
}
|
|
11550
11758
|
);
|
|
@@ -11554,69 +11762,40 @@ Tag.displayName = "Tag";
|
|
|
11554
11762
|
// src/components/TextInput/TextInput.tsx
|
|
11555
11763
|
import { ddsTokens as ddsTokens16 } from "@norges-domstoler/dds-design-tokens";
|
|
11556
11764
|
import {
|
|
11557
|
-
forwardRef as
|
|
11558
|
-
useId as
|
|
11765
|
+
forwardRef as forwardRef81,
|
|
11766
|
+
useId as useId24,
|
|
11559
11767
|
useLayoutEffect as useLayoutEffect3,
|
|
11560
11768
|
useRef as useRef31,
|
|
11561
11769
|
useState as useState29
|
|
11562
11770
|
} from "react";
|
|
11563
11771
|
|
|
11564
|
-
// src/components/TextInput/CharCounter.tsx
|
|
11565
|
-
import { useId as useId22 } from "react";
|
|
11566
|
-
|
|
11567
11772
|
// src/components/TextInput/TextInput.module.css
|
|
11568
11773
|
var TextInput_default = {
|
|
11569
11774
|
"container--medium": "TextInput_container--medium",
|
|
11570
11775
|
"container--tiny": "TextInput_container--tiny",
|
|
11571
11776
|
"affix-container": "TextInput_affix-container",
|
|
11777
|
+
"input-width": "TextInput_input-width",
|
|
11572
11778
|
input: "TextInput_input",
|
|
11573
11779
|
"with-icon--medium": "TextInput_with-icon--medium",
|
|
11574
11780
|
"with-icon--small": "TextInput_with-icon--small",
|
|
11575
11781
|
"with-icon--tiny": "TextInput_with-icon--tiny",
|
|
11782
|
+
"input--extended": "TextInput_input--extended",
|
|
11576
11783
|
icon: "TextInput_icon",
|
|
11577
11784
|
"icon--medium": "TextInput_icon--medium",
|
|
11578
11785
|
"icon--small": "TextInput_icon--small",
|
|
11579
11786
|
"icon--tiny": "TextInput_icon--tiny",
|
|
11787
|
+
label: "TextInput_label",
|
|
11580
11788
|
affix: "TextInput_affix",
|
|
11581
11789
|
prefix: "TextInput_prefix",
|
|
11582
11790
|
suffix: "TextInput_suffix",
|
|
11583
11791
|
"prefix--readonly": "TextInput_prefix--readonly",
|
|
11584
11792
|
"suffix--readonly": "TextInput_suffix--readonly",
|
|
11585
|
-
"message-container": "TextInput_message-container"
|
|
11586
|
-
"char-counter": "TextInput_char-counter"
|
|
11793
|
+
"message-container": "TextInput_message-container"
|
|
11587
11794
|
};
|
|
11588
11795
|
|
|
11589
|
-
// src/components/TextInput/CharCounter.tsx
|
|
11590
|
-
import { jsxs as jsxs69 } from "react/jsx-runtime";
|
|
11591
|
-
function CharCounter(props) {
|
|
11592
|
-
const { current, max, id, className, htmlProps, ...rest } = props;
|
|
11593
|
-
const generatedId = useId22();
|
|
11594
|
-
const uniqueId = id != null ? id : `${generatedId}-characterCounter`;
|
|
11595
|
-
return /* @__PURE__ */ jsxs69(
|
|
11596
|
-
Typography,
|
|
11597
|
-
{
|
|
11598
|
-
...getBaseHTMLProps(
|
|
11599
|
-
uniqueId,
|
|
11600
|
-
cn(className, TextInput_default["char-counter"]),
|
|
11601
|
-
htmlProps,
|
|
11602
|
-
rest
|
|
11603
|
-
),
|
|
11604
|
-
as: "div",
|
|
11605
|
-
typographyType: "supportingStyleHelperText01",
|
|
11606
|
-
"aria-label": `${current} av ${max} tegn skrevet`,
|
|
11607
|
-
children: [
|
|
11608
|
-
current,
|
|
11609
|
-
"/",
|
|
11610
|
-
max
|
|
11611
|
-
]
|
|
11612
|
-
}
|
|
11613
|
-
);
|
|
11614
|
-
}
|
|
11615
|
-
var CharCounter_default = CharCounter;
|
|
11616
|
-
|
|
11617
11796
|
// src/components/TextInput/TextInput.tsx
|
|
11618
|
-
import { jsx as
|
|
11619
|
-
var TextInput =
|
|
11797
|
+
import { jsx as jsx274, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
11798
|
+
var TextInput = forwardRef81(
|
|
11620
11799
|
({
|
|
11621
11800
|
label,
|
|
11622
11801
|
disabled,
|
|
@@ -11663,7 +11842,7 @@ var TextInput = forwardRef80(
|
|
|
11663
11842
|
onChange(event);
|
|
11664
11843
|
}
|
|
11665
11844
|
};
|
|
11666
|
-
const generatedId =
|
|
11845
|
+
const generatedId = useId24();
|
|
11667
11846
|
const uniqueId = id != null ? id : `${generatedId}-textInput`;
|
|
11668
11847
|
const hasErrorMessage = !!errorMessage;
|
|
11669
11848
|
const hasTip = !!tip;
|
|
@@ -11671,7 +11850,6 @@ var TextInput = forwardRef80(
|
|
|
11671
11850
|
const hasMessage = hasErrorMessage || hasTip || !!maxLength;
|
|
11672
11851
|
const hasIcon = !!icon2;
|
|
11673
11852
|
const hasAffix = !!(prefix3 != null ? prefix3 : suffix);
|
|
11674
|
-
const hasCharCounter = !!maxLength && Number.isInteger(maxLength) && maxLength > 0 && withCharacterCounter;
|
|
11675
11853
|
const characterCounterId = derivativeIdGenerator(
|
|
11676
11854
|
uniqueId,
|
|
11677
11855
|
"characterCounter"
|
|
@@ -11679,6 +11857,10 @@ var TextInput = forwardRef80(
|
|
|
11679
11857
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
11680
11858
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
11681
11859
|
const widthCn = componentSize === "tiny" ? componentSize : "medium";
|
|
11860
|
+
const styleVariables = {
|
|
11861
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11862
|
+
["--dds-textinput-width"]: width ? width : componentSize === "tiny" ? "210px" : "var(--dds-input-default-width)"
|
|
11863
|
+
};
|
|
11682
11864
|
const generalInputProps = {
|
|
11683
11865
|
id: uniqueId,
|
|
11684
11866
|
hasErrorMessage,
|
|
@@ -11704,72 +11886,91 @@ var TextInput = forwardRef80(
|
|
|
11704
11886
|
const suffixPaddingInlineEnd = readOnly && suffixLength ? suffixLength + "px" : suffixLength ? ddsTokens16.DdsSpacingX1NumberPx + suffixLength + "px" : void 0;
|
|
11705
11887
|
let extendedInput = null;
|
|
11706
11888
|
if (hasIcon) {
|
|
11707
|
-
extendedInput = /* @__PURE__ */
|
|
11708
|
-
|
|
11709
|
-
|
|
11710
|
-
|
|
11711
|
-
|
|
11712
|
-
|
|
11713
|
-
|
|
11714
|
-
|
|
11715
|
-
|
|
11716
|
-
|
|
11717
|
-
|
|
11718
|
-
|
|
11719
|
-
|
|
11720
|
-
|
|
11721
|
-
|
|
11722
|
-
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11726
|
-
|
|
11727
|
-
|
|
11889
|
+
extendedInput = /* @__PURE__ */ jsxs71(
|
|
11890
|
+
"div",
|
|
11891
|
+
{
|
|
11892
|
+
className: cn(TextInput_default["input-width"], Input_default["input-group"]),
|
|
11893
|
+
style: styleVariables,
|
|
11894
|
+
children: [
|
|
11895
|
+
/* @__PURE__ */ jsx274(
|
|
11896
|
+
Icon,
|
|
11897
|
+
{
|
|
11898
|
+
icon: icon2,
|
|
11899
|
+
iconSize: getFormInputIconSize(componentSize),
|
|
11900
|
+
className: cn(TextInput_default.icon, TextInput_default[`icon--${componentSize}`])
|
|
11901
|
+
}
|
|
11902
|
+
),
|
|
11903
|
+
/* @__PURE__ */ jsx274(
|
|
11904
|
+
StatefulInput,
|
|
11905
|
+
{
|
|
11906
|
+
ref,
|
|
11907
|
+
onChange: onChangeHandler,
|
|
11908
|
+
type,
|
|
11909
|
+
componentSize,
|
|
11910
|
+
className: cn(
|
|
11911
|
+
TextInput_default.input,
|
|
11912
|
+
TextInput_default[`with-icon--${componentSize}`],
|
|
11913
|
+
TextInput_default["input--extended"]
|
|
11914
|
+
),
|
|
11915
|
+
...generalInputProps
|
|
11916
|
+
}
|
|
11917
|
+
)
|
|
11918
|
+
]
|
|
11919
|
+
}
|
|
11920
|
+
);
|
|
11728
11921
|
} else if (hasAffix) {
|
|
11729
|
-
extendedInput = /* @__PURE__ */
|
|
11730
|
-
|
|
11731
|
-
|
|
11732
|
-
|
|
11733
|
-
|
|
11734
|
-
|
|
11735
|
-
|
|
11736
|
-
|
|
11737
|
-
|
|
11738
|
-
|
|
11922
|
+
extendedInput = /* @__PURE__ */ jsxs71(
|
|
11923
|
+
"div",
|
|
11924
|
+
{
|
|
11925
|
+
className: cn(TextInput_default["affix-container"], TextInput_default["input-width"]),
|
|
11926
|
+
style: styleVariables,
|
|
11927
|
+
children: [
|
|
11928
|
+
prefix3 && /* @__PURE__ */ jsx274(
|
|
11929
|
+
"span",
|
|
11930
|
+
{
|
|
11931
|
+
ref: prefixRef,
|
|
11932
|
+
"aria-hidden": true,
|
|
11933
|
+
className: cn(
|
|
11934
|
+
TextInput_default.affix,
|
|
11935
|
+
TextInput_default.prefix,
|
|
11936
|
+
readOnly && TextInput_default["prefix--readonly"]
|
|
11937
|
+
),
|
|
11938
|
+
children: prefix3
|
|
11939
|
+
}
|
|
11739
11940
|
),
|
|
11740
|
-
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
|
|
11748
|
-
|
|
11749
|
-
|
|
11750
|
-
|
|
11751
|
-
|
|
11752
|
-
|
|
11753
|
-
|
|
11754
|
-
}
|
|
11755
|
-
}
|
|
11756
|
-
),
|
|
11757
|
-
suffix && /* @__PURE__ */ jsx271(
|
|
11758
|
-
"span",
|
|
11759
|
-
{
|
|
11760
|
-
ref: suffixRef,
|
|
11761
|
-
"aria-hidden": true,
|
|
11762
|
-
className: cn(
|
|
11763
|
-
TextInput_default.affix,
|
|
11764
|
-
TextInput_default.suffix,
|
|
11765
|
-
readOnly && TextInput_default["suffix--readonly"]
|
|
11941
|
+
/* @__PURE__ */ jsx274(
|
|
11942
|
+
StatefulInput,
|
|
11943
|
+
{
|
|
11944
|
+
ref,
|
|
11945
|
+
onChange: onChangeHandler,
|
|
11946
|
+
type,
|
|
11947
|
+
componentSize,
|
|
11948
|
+
...generalInputProps,
|
|
11949
|
+
style: {
|
|
11950
|
+
paddingInlineStart: preffixPaddingInlineStart,
|
|
11951
|
+
paddingInlineEnd: suffixPaddingInlineEnd
|
|
11952
|
+
},
|
|
11953
|
+
className: TextInput_default["input--extended"]
|
|
11954
|
+
}
|
|
11766
11955
|
),
|
|
11767
|
-
|
|
11768
|
-
|
|
11769
|
-
|
|
11770
|
-
|
|
11956
|
+
suffix && /* @__PURE__ */ jsx274(
|
|
11957
|
+
"span",
|
|
11958
|
+
{
|
|
11959
|
+
ref: suffixRef,
|
|
11960
|
+
"aria-hidden": true,
|
|
11961
|
+
className: cn(
|
|
11962
|
+
TextInput_default.affix,
|
|
11963
|
+
TextInput_default.suffix,
|
|
11964
|
+
readOnly && TextInput_default["suffix--readonly"]
|
|
11965
|
+
),
|
|
11966
|
+
children: suffix
|
|
11967
|
+
}
|
|
11968
|
+
)
|
|
11969
|
+
]
|
|
11970
|
+
}
|
|
11971
|
+
);
|
|
11771
11972
|
}
|
|
11772
|
-
return /* @__PURE__ */
|
|
11973
|
+
return /* @__PURE__ */ jsxs71(
|
|
11773
11974
|
"div",
|
|
11774
11975
|
{
|
|
11775
11976
|
className: cn(
|
|
@@ -11777,28 +11978,36 @@ var TextInput = forwardRef80(
|
|
|
11777
11978
|
Input_default.container,
|
|
11778
11979
|
TextInput_default[`container--${widthCn}`]
|
|
11779
11980
|
),
|
|
11780
|
-
style
|
|
11981
|
+
style,
|
|
11781
11982
|
children: [
|
|
11782
|
-
hasLabel && /* @__PURE__ */
|
|
11783
|
-
|
|
11983
|
+
hasLabel && /* @__PURE__ */ jsx274(
|
|
11984
|
+
Label,
|
|
11985
|
+
{
|
|
11986
|
+
htmlFor: uniqueId,
|
|
11987
|
+
showRequiredStyling,
|
|
11988
|
+
className: TextInput_default.label,
|
|
11989
|
+
children: label
|
|
11990
|
+
}
|
|
11991
|
+
),
|
|
11992
|
+
extendedInput ? extendedInput : /* @__PURE__ */ jsx274(
|
|
11784
11993
|
StatefulInput,
|
|
11785
11994
|
{
|
|
11786
11995
|
ref,
|
|
11787
11996
|
onChange: onChangeHandler,
|
|
11788
11997
|
type,
|
|
11789
11998
|
componentSize,
|
|
11790
|
-
...generalInputProps
|
|
11999
|
+
...generalInputProps,
|
|
12000
|
+
style: styleVariables,
|
|
12001
|
+
className: TextInput_default["input-width"]
|
|
11791
12002
|
}
|
|
11792
12003
|
),
|
|
11793
|
-
hasMessage && /* @__PURE__ */
|
|
12004
|
+
hasMessage && /* @__PURE__ */ jsxs71("div", { className: TextInput_default["message-container"], children: [
|
|
11794
12005
|
renderInputMessage(tip, tipId, errorMessage, errorMessageId),
|
|
11795
|
-
|
|
11796
|
-
|
|
11797
|
-
|
|
11798
|
-
|
|
11799
|
-
|
|
11800
|
-
max: maxLength
|
|
11801
|
-
}
|
|
12006
|
+
renderCharCounter(
|
|
12007
|
+
characterCounterId,
|
|
12008
|
+
withCharacterCounter,
|
|
12009
|
+
text.length,
|
|
12010
|
+
maxLength
|
|
11802
12011
|
)
|
|
11803
12012
|
] })
|
|
11804
12013
|
]
|
|
@@ -11809,7 +12018,7 @@ var TextInput = forwardRef80(
|
|
|
11809
12018
|
TextInput.displayName = "TextInput";
|
|
11810
12019
|
|
|
11811
12020
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
11812
|
-
import { useId as
|
|
12021
|
+
import { useId as useId25, useState as useState30 } from "react";
|
|
11813
12022
|
|
|
11814
12023
|
// src/components/ToggleBar/ToggleBar.context.tsx
|
|
11815
12024
|
import { createContext as createContext11, useContext as useContext14 } from "react";
|
|
@@ -11835,7 +12044,7 @@ var ToggleBar_default = {
|
|
|
11835
12044
|
};
|
|
11836
12045
|
|
|
11837
12046
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
11838
|
-
import { jsx as
|
|
12047
|
+
import { jsx as jsx275, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
11839
12048
|
var ToggleBar = (props) => {
|
|
11840
12049
|
const {
|
|
11841
12050
|
children,
|
|
@@ -11850,7 +12059,7 @@ var ToggleBar = (props) => {
|
|
|
11850
12059
|
id,
|
|
11851
12060
|
...rest
|
|
11852
12061
|
} = props;
|
|
11853
|
-
const generatedId =
|
|
12062
|
+
const generatedId = useId25();
|
|
11854
12063
|
const uniqueId = id != null ? id : `${generatedId}-ToggleBar`;
|
|
11855
12064
|
const [groupValue, setGroupValue] = useState30(value);
|
|
11856
12065
|
const handleChange = combineHandlers(
|
|
@@ -11858,7 +12067,7 @@ var ToggleBar = (props) => {
|
|
|
11858
12067
|
(e) => onChange && onChange(e, e.target.value)
|
|
11859
12068
|
);
|
|
11860
12069
|
const labelId = label && `${uniqueId}-label`;
|
|
11861
|
-
return /* @__PURE__ */
|
|
12070
|
+
return /* @__PURE__ */ jsx275(
|
|
11862
12071
|
ToggleBarContext.Provider,
|
|
11863
12072
|
{
|
|
11864
12073
|
value: {
|
|
@@ -11867,7 +12076,7 @@ var ToggleBar = (props) => {
|
|
|
11867
12076
|
name,
|
|
11868
12077
|
value: groupValue
|
|
11869
12078
|
},
|
|
11870
|
-
children: /* @__PURE__ */
|
|
12079
|
+
children: /* @__PURE__ */ jsxs72(
|
|
11871
12080
|
"div",
|
|
11872
12081
|
{
|
|
11873
12082
|
...getBaseHTMLProps(
|
|
@@ -11880,8 +12089,8 @@ var ToggleBar = (props) => {
|
|
|
11880
12089
|
role: "radiogroup",
|
|
11881
12090
|
"aria-labelledby": labelId != null ? labelId : htmlProps == null ? void 0 : htmlProps["aria-labelledby"],
|
|
11882
12091
|
children: [
|
|
11883
|
-
label && /* @__PURE__ */
|
|
11884
|
-
/* @__PURE__ */
|
|
12092
|
+
label && /* @__PURE__ */ jsx275(Label, { id: labelId, children: label }),
|
|
12093
|
+
/* @__PURE__ */ jsx275("div", { className: ToggleBar_default.bar, children })
|
|
11885
12094
|
]
|
|
11886
12095
|
}
|
|
11887
12096
|
)
|
|
@@ -11892,10 +12101,10 @@ ToggleBar.displayName = "ToggleBar";
|
|
|
11892
12101
|
|
|
11893
12102
|
// src/components/ToggleBar/ToggleRadio.tsx
|
|
11894
12103
|
import {
|
|
11895
|
-
forwardRef as
|
|
11896
|
-
useId as
|
|
12104
|
+
forwardRef as forwardRef82,
|
|
12105
|
+
useId as useId26
|
|
11897
12106
|
} from "react";
|
|
11898
|
-
import { jsx as
|
|
12107
|
+
import { jsx as jsx276, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
11899
12108
|
var typographyTypes5 = {
|
|
11900
12109
|
large: "bodySans04",
|
|
11901
12110
|
medium: "bodySans02",
|
|
@@ -11912,7 +12121,7 @@ var calculateChecked = (value, group, checked) => {
|
|
|
11912
12121
|
}
|
|
11913
12122
|
return !!value;
|
|
11914
12123
|
};
|
|
11915
|
-
var ToggleRadio =
|
|
12124
|
+
var ToggleRadio = forwardRef82(
|
|
11916
12125
|
(props, ref) => {
|
|
11917
12126
|
const {
|
|
11918
12127
|
value,
|
|
@@ -11928,7 +12137,7 @@ var ToggleRadio = forwardRef81(
|
|
|
11928
12137
|
id,
|
|
11929
12138
|
...rest
|
|
11930
12139
|
} = props;
|
|
11931
|
-
const generatedId =
|
|
12140
|
+
const generatedId = useId26();
|
|
11932
12141
|
const uniqueId = id != null ? id : `${generatedId}-ToggleRadio`;
|
|
11933
12142
|
const group = useToggleBarContext();
|
|
11934
12143
|
const handleChange = (event) => {
|
|
@@ -11936,8 +12145,8 @@ var ToggleRadio = forwardRef81(
|
|
|
11936
12145
|
(group == null ? void 0 : group.onChange) && group.onChange(event);
|
|
11937
12146
|
};
|
|
11938
12147
|
const contentTypeCn = label ? "with-text" : "just-icon";
|
|
11939
|
-
return /* @__PURE__ */
|
|
11940
|
-
/* @__PURE__ */
|
|
12148
|
+
return /* @__PURE__ */ jsxs73("label", { htmlFor: uniqueId, className: ToggleBar_default.label, children: [
|
|
12149
|
+
/* @__PURE__ */ jsx276(
|
|
11941
12150
|
"input",
|
|
11942
12151
|
{
|
|
11943
12152
|
...getBaseHTMLProps(
|
|
@@ -11960,7 +12169,7 @@ var ToggleRadio = forwardRef81(
|
|
|
11960
12169
|
"aria-labelledby": ariaLabelledBy
|
|
11961
12170
|
}
|
|
11962
12171
|
),
|
|
11963
|
-
/* @__PURE__ */
|
|
12172
|
+
/* @__PURE__ */ jsxs73(
|
|
11964
12173
|
Typography,
|
|
11965
12174
|
{
|
|
11966
12175
|
as: "span",
|
|
@@ -11971,8 +12180,8 @@ var ToggleRadio = forwardRef81(
|
|
|
11971
12180
|
focus_default["focus-styled-sibling"]
|
|
11972
12181
|
),
|
|
11973
12182
|
children: [
|
|
11974
|
-
icon2 && /* @__PURE__ */
|
|
11975
|
-
label && /* @__PURE__ */
|
|
12183
|
+
icon2 && /* @__PURE__ */ jsx276(Icon, { icon: icon2, iconSize: "inherit" }),
|
|
12184
|
+
label && /* @__PURE__ */ jsx276("span", { children: label })
|
|
11976
12185
|
]
|
|
11977
12186
|
}
|
|
11978
12187
|
)
|
|
@@ -11982,7 +12191,7 @@ var ToggleRadio = forwardRef81(
|
|
|
11982
12191
|
ToggleRadio.displayName = "ToggleRadio";
|
|
11983
12192
|
|
|
11984
12193
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
11985
|
-
import { forwardRef as
|
|
12194
|
+
import { forwardRef as forwardRef83, useId as useId27 } from "react";
|
|
11986
12195
|
|
|
11987
12196
|
// src/components/ToggleButton/ToggleButton.module.css
|
|
11988
12197
|
var ToggleButton_default = {
|
|
@@ -11995,13 +12204,13 @@ var ToggleButton_default = {
|
|
|
11995
12204
|
};
|
|
11996
12205
|
|
|
11997
12206
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
11998
|
-
import { jsx as
|
|
11999
|
-
var ToggleButton =
|
|
12207
|
+
import { jsx as jsx277, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
12208
|
+
var ToggleButton = forwardRef83(
|
|
12000
12209
|
({ id, label, icon: icon2, className, htmlProps, ...rest }, ref) => {
|
|
12001
|
-
const generatedId =
|
|
12210
|
+
const generatedId = useId27();
|
|
12002
12211
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
12003
|
-
return /* @__PURE__ */
|
|
12004
|
-
/* @__PURE__ */
|
|
12212
|
+
return /* @__PURE__ */ jsxs74("label", { htmlFor: uniqueId, className: ToggleButton_default.container, children: [
|
|
12213
|
+
/* @__PURE__ */ jsx277(
|
|
12005
12214
|
"input",
|
|
12006
12215
|
{
|
|
12007
12216
|
...getBaseHTMLProps(
|
|
@@ -12018,7 +12227,7 @@ var ToggleButton = forwardRef82(
|
|
|
12018
12227
|
type: "checkbox"
|
|
12019
12228
|
}
|
|
12020
12229
|
),
|
|
12021
|
-
/* @__PURE__ */
|
|
12230
|
+
/* @__PURE__ */ jsxs74(
|
|
12022
12231
|
"span",
|
|
12023
12232
|
{
|
|
12024
12233
|
className: cn(
|
|
@@ -12027,7 +12236,7 @@ var ToggleButton = forwardRef82(
|
|
|
12027
12236
|
focus_default["focus-styled-sibling"]
|
|
12028
12237
|
),
|
|
12029
12238
|
children: [
|
|
12030
|
-
icon2 && /* @__PURE__ */
|
|
12239
|
+
icon2 && /* @__PURE__ */ jsx277(Icon, { icon: icon2, iconSize: "inherit" }),
|
|
12031
12240
|
" ",
|
|
12032
12241
|
label
|
|
12033
12242
|
]
|
|
@@ -12039,8 +12248,8 @@ var ToggleButton = forwardRef82(
|
|
|
12039
12248
|
ToggleButton.displayName = "ToggleButton";
|
|
12040
12249
|
|
|
12041
12250
|
// src/components/ToggleButton/ToggleButtonGroup.tsx
|
|
12042
|
-
import { useId as
|
|
12043
|
-
import { jsx as
|
|
12251
|
+
import { useId as useId28 } from "react";
|
|
12252
|
+
import { jsx as jsx278, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
12044
12253
|
var ToggleButtonGroup = (props) => {
|
|
12045
12254
|
const {
|
|
12046
12255
|
children,
|
|
@@ -12052,9 +12261,9 @@ var ToggleButtonGroup = (props) => {
|
|
|
12052
12261
|
htmlProps,
|
|
12053
12262
|
...rest
|
|
12054
12263
|
} = props;
|
|
12055
|
-
const generatedId =
|
|
12264
|
+
const generatedId = useId28();
|
|
12056
12265
|
const uniqueLabelId = labelId != null ? labelId : `${generatedId}-ToggleButtonGroupLabel`;
|
|
12057
|
-
return /* @__PURE__ */
|
|
12266
|
+
return /* @__PURE__ */ jsxs75(
|
|
12058
12267
|
"div",
|
|
12059
12268
|
{
|
|
12060
12269
|
...getBaseHTMLProps(
|
|
@@ -12066,7 +12275,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
12066
12275
|
role: "group",
|
|
12067
12276
|
"aria-labelledby": label ? uniqueLabelId : void 0,
|
|
12068
12277
|
children: [
|
|
12069
|
-
!!label && /* @__PURE__ */
|
|
12278
|
+
!!label && /* @__PURE__ */ jsx278(
|
|
12070
12279
|
Typography,
|
|
12071
12280
|
{
|
|
12072
12281
|
as: "span",
|
|
@@ -12075,7 +12284,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
12075
12284
|
children: label
|
|
12076
12285
|
}
|
|
12077
12286
|
),
|
|
12078
|
-
/* @__PURE__ */
|
|
12287
|
+
/* @__PURE__ */ jsx278("div", { className: cn(ToggleButton_default.group, ToggleButton_default[`group--${direction}`]), children })
|
|
12079
12288
|
]
|
|
12080
12289
|
}
|
|
12081
12290
|
);
|
|
@@ -12116,6 +12325,7 @@ export {
|
|
|
12116
12325
|
CardAccordionBody,
|
|
12117
12326
|
CardAccordionHeader,
|
|
12118
12327
|
CaringIcon,
|
|
12328
|
+
CharCounter,
|
|
12119
12329
|
ChatIcon,
|
|
12120
12330
|
CheckCircledIcon,
|
|
12121
12331
|
CheckIcon,
|
|
@@ -12244,6 +12454,8 @@ export {
|
|
|
12244
12454
|
ModalBody,
|
|
12245
12455
|
MoreHorizontalIcon,
|
|
12246
12456
|
MoreVerticalIcon,
|
|
12457
|
+
NativeSelect,
|
|
12458
|
+
NativeSelectPlaceholder,
|
|
12247
12459
|
NotarialIcon,
|
|
12248
12460
|
NotificationsIcon,
|
|
12249
12461
|
NotificationsOffIcon,
|
|
@@ -12339,6 +12551,7 @@ export {
|
|
|
12339
12551
|
VisibilityOnIcon,
|
|
12340
12552
|
VisuallyHidden,
|
|
12341
12553
|
WarningIcon,
|
|
12554
|
+
WebexIcon,
|
|
12342
12555
|
XIcon,
|
|
12343
12556
|
ZoomInIcon,
|
|
12344
12557
|
ZoomOutIcon,
|
|
@@ -12383,6 +12596,7 @@ export {
|
|
|
12383
12596
|
purposeVariants,
|
|
12384
12597
|
removeButtonStyling,
|
|
12385
12598
|
removeListStyling,
|
|
12599
|
+
renderCharCounter,
|
|
12386
12600
|
renderInputMessage,
|
|
12387
12601
|
scrollbarStyling,
|
|
12388
12602
|
selection,
|