@norges-domstoler/dds-components 21.3.1 → 21.5.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 +116 -26
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +73 -65
- package/dist/index.d.ts +73 -65
- package/dist/index.js +1065 -965
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +754 -656
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -8
package/dist/index.mjs
CHANGED
|
@@ -46,7 +46,30 @@ var typographyStyles_default = {
|
|
|
46
46
|
"text-color--default": "typographyStyles_text-color--default",
|
|
47
47
|
"text-color--medium": "typographyStyles_text-color--medium",
|
|
48
48
|
"text-color--subtle": "typographyStyles_text-color--subtle",
|
|
49
|
-
"text-color--
|
|
49
|
+
"text-color--requiredfield": "typographyStyles_text-color--requiredfield",
|
|
50
|
+
"text-color--action-resting": "typographyStyles_text-color--action-resting",
|
|
51
|
+
"text-color--action-hover": "typographyStyles_text-color--action-hover",
|
|
52
|
+
"text-color--action-visited": "typographyStyles_text-color--action-visited",
|
|
53
|
+
"text-color--on-action": "typographyStyles_text-color--on-action",
|
|
54
|
+
"text-color--on-status-default": "typographyStyles_text-color--on-status-default",
|
|
55
|
+
"text-color--on-status-strong": "typographyStyles_text-color--on-status-strong",
|
|
56
|
+
"text-color--on-notification": "typographyStyles_text-color--on-notification",
|
|
57
|
+
"text-color--on-inverse": "typographyStyles_text-color--on-inverse",
|
|
58
|
+
"icon-color--default": "typographyStyles_icon-color--default",
|
|
59
|
+
"icon-color--medium": "typographyStyles_icon-color--medium",
|
|
60
|
+
"icon-color--subtle": "typographyStyles_icon-color--subtle",
|
|
61
|
+
"icon-color--on-action": "typographyStyles_icon-color--on-action",
|
|
62
|
+
"icon-color--action-resting": "typographyStyles_icon-color--action-resting",
|
|
63
|
+
"icon-color--action-hover": "typographyStyles_icon-color--action-hover",
|
|
64
|
+
"icon-color--on-info-default": "typographyStyles_icon-color--on-info-default",
|
|
65
|
+
"icon-color--on-info-strong": "typographyStyles_icon-color--on-info-strong",
|
|
66
|
+
"icon-color--on-success-default": "typographyStyles_icon-color--on-success-default",
|
|
67
|
+
"icon-color--on-success-strong": "typographyStyles_icon-color--on-success-strong",
|
|
68
|
+
"icon-color--on-danger-default": "typographyStyles_icon-color--on-danger-default",
|
|
69
|
+
"icon-color--on-danger-strong": "typographyStyles_icon-color--on-danger-strong",
|
|
70
|
+
"icon-color--on-warning-default": "typographyStyles_icon-color--on-warning-default",
|
|
71
|
+
"icon-color--on-warning-strong": "typographyStyles_icon-color--on-warning-strong",
|
|
72
|
+
"icon-color--on-inverse": "typographyStyles_icon-color--on-inverse"
|
|
50
73
|
};
|
|
51
74
|
|
|
52
75
|
// src/components/helpers/styling/utilStyles.module.css
|
|
@@ -101,36 +124,36 @@ var Backdrop_default = {
|
|
|
101
124
|
};
|
|
102
125
|
|
|
103
126
|
// src/utils/color.tsx
|
|
104
|
-
var
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
var
|
|
127
|
+
var TEXT_COLORS = [
|
|
128
|
+
"text-on-action",
|
|
129
|
+
"text-on-inverse",
|
|
130
|
+
"text-on-status-default",
|
|
131
|
+
"text-on-status-strong",
|
|
132
|
+
"text-action-resting",
|
|
133
|
+
"text-action-hover",
|
|
134
|
+
"text-action-visited",
|
|
135
|
+
"text-default",
|
|
136
|
+
"text-requiredfield",
|
|
137
|
+
"text-subtle",
|
|
138
|
+
"text-medium",
|
|
139
|
+
"text-on-notification",
|
|
140
|
+
"icon-on-action",
|
|
141
|
+
"icon-on-info-default",
|
|
142
|
+
"icon-on-success-default",
|
|
143
|
+
"icon-on-danger-default",
|
|
144
|
+
"icon-on-warning-default",
|
|
145
|
+
"icon-on-info-strong",
|
|
146
|
+
"icon-on-success-strong",
|
|
147
|
+
"icon-on-danger-strong",
|
|
148
|
+
"icon-on-warning-strong",
|
|
149
|
+
"icon-on-inverse",
|
|
150
|
+
"icon-action-resting",
|
|
151
|
+
"icon-action-hover",
|
|
152
|
+
"icon-default",
|
|
153
|
+
"icon-subtle",
|
|
154
|
+
"icon-medium"
|
|
155
|
+
];
|
|
156
|
+
var TEXT_COLORS_CAMEL = [
|
|
134
157
|
"textOnAction",
|
|
135
158
|
"textOnInverse",
|
|
136
159
|
"textOnStatusDefault",
|
|
@@ -159,11 +182,30 @@ var textColorsArray = [
|
|
|
159
182
|
"iconSubtle",
|
|
160
183
|
"iconMedium"
|
|
161
184
|
];
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
185
|
+
var TEXT_COLOR_VALUES_CAMEL = TEXT_COLORS_CAMEL.reduce(
|
|
186
|
+
(acc, key) => {
|
|
187
|
+
const kebab = key.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
188
|
+
acc[key] = `var(--dds-color-${kebab})`;
|
|
189
|
+
return acc;
|
|
190
|
+
},
|
|
191
|
+
{}
|
|
192
|
+
);
|
|
193
|
+
var TEXT_COLOR_VALUES_KEBAB = TEXT_COLORS.reduce(
|
|
194
|
+
(acc, key) => {
|
|
195
|
+
acc[key] = `var(--dds-color-${key})`;
|
|
196
|
+
return acc;
|
|
197
|
+
},
|
|
198
|
+
{}
|
|
199
|
+
);
|
|
200
|
+
var isTextColorCamel = (value) => {
|
|
201
|
+
return typeof value === "string" && TEXT_COLORS_CAMEL.includes(value);
|
|
202
|
+
};
|
|
203
|
+
var isTextColor = (value) => {
|
|
204
|
+
return typeof value === "string" && TEXT_COLORS.includes(value);
|
|
205
|
+
};
|
|
165
206
|
var getTextColor = (color) => {
|
|
166
|
-
if (
|
|
207
|
+
if (isTextColorCamel(color)) return TEXT_COLOR_VALUES_CAMEL[color];
|
|
208
|
+
if (isTextColor(color)) return TEXT_COLOR_VALUES_KEBAB[color];
|
|
167
209
|
return color;
|
|
168
210
|
};
|
|
169
211
|
|
|
@@ -659,6 +701,12 @@ var isInlineElement = (as) => inlineElements.indexOf(as) !== -1;
|
|
|
659
701
|
function getTypographyCn(value) {
|
|
660
702
|
return convertCamelToHyphen(value);
|
|
661
703
|
}
|
|
704
|
+
var getColorCn = (color) => {
|
|
705
|
+
if (!isTextColor(color)) return null;
|
|
706
|
+
const [prefix2] = color.split("-", 1);
|
|
707
|
+
const key = `${prefix2}-color--${color.slice(prefix2.length + 1)}`;
|
|
708
|
+
return typographyStyles_default[key] || null;
|
|
709
|
+
};
|
|
662
710
|
|
|
663
711
|
// src/components/Icon/Icon.tsx
|
|
664
712
|
var getSize = (iconSize) => {
|
|
@@ -2030,6 +2078,7 @@ var Typography = (props) => {
|
|
|
2030
2078
|
id,
|
|
2031
2079
|
cn(
|
|
2032
2080
|
className,
|
|
2081
|
+
getColorCn(color),
|
|
2033
2082
|
Typography_default.container,
|
|
2034
2083
|
externalLinkProp && typographyStyles_default["a--external"],
|
|
2035
2084
|
typographyStyles_default[typographyCn],
|
|
@@ -2048,7 +2097,7 @@ var Typography = (props) => {
|
|
|
2048
2097
|
style: {
|
|
2049
2098
|
...htmlPropsStyle,
|
|
2050
2099
|
...style,
|
|
2051
|
-
color: color && getTextColor(color)
|
|
2100
|
+
color: color && !isTextColor(color) ? getTextColor(color) : void 0
|
|
2052
2101
|
},
|
|
2053
2102
|
rel: relProp,
|
|
2054
2103
|
target: targetProp,
|
|
@@ -2195,15 +2244,18 @@ import { jsx as jsx173, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
|
2195
2244
|
var Link = ({
|
|
2196
2245
|
id,
|
|
2197
2246
|
className,
|
|
2198
|
-
htmlProps,
|
|
2247
|
+
htmlProps = {},
|
|
2199
2248
|
children,
|
|
2200
2249
|
typographyType,
|
|
2201
2250
|
withMargins,
|
|
2202
2251
|
withVisited,
|
|
2203
2252
|
external,
|
|
2204
2253
|
target,
|
|
2254
|
+
style,
|
|
2255
|
+
color,
|
|
2205
2256
|
...rest
|
|
2206
2257
|
}) => {
|
|
2258
|
+
const { style: htmlPropsStyle, ...restHtmlProps } = htmlProps;
|
|
2207
2259
|
return /* @__PURE__ */ jsxs22(
|
|
2208
2260
|
"a",
|
|
2209
2261
|
{
|
|
@@ -2216,14 +2268,20 @@ var Link = ({
|
|
|
2216
2268
|
withVisited && typographyStyles_default["a--visited"],
|
|
2217
2269
|
typographyType && typographyStyles_default[getTypographyCn(typographyType)],
|
|
2218
2270
|
typographyType && withMargins && typographyStyles_default[`${getTypographyCn(typographyType)}--margins`],
|
|
2219
|
-
focusable
|
|
2271
|
+
focusable,
|
|
2272
|
+
getColorCn(color)
|
|
2220
2273
|
),
|
|
2221
|
-
|
|
2274
|
+
restHtmlProps,
|
|
2222
2275
|
rest
|
|
2223
2276
|
),
|
|
2224
2277
|
...rest,
|
|
2225
2278
|
rel: "noopener noreferer",
|
|
2226
2279
|
target: external ? "_blank" : target,
|
|
2280
|
+
style: {
|
|
2281
|
+
...htmlPropsStyle,
|
|
2282
|
+
...style,
|
|
2283
|
+
color: color && !isTextColor(color) ? getTextColor(color) : void 0
|
|
2284
|
+
},
|
|
2227
2285
|
children: [
|
|
2228
2286
|
children,
|
|
2229
2287
|
external && /* @__PURE__ */ jsx173(Icon, { iconSize: "inherit", icon: OpenExternalIcon })
|
|
@@ -2661,10 +2719,27 @@ var getLiteralScreenSize = (screenSize) => {
|
|
|
2661
2719
|
}
|
|
2662
2720
|
};
|
|
2663
2721
|
|
|
2664
|
-
// src/components/helpers/
|
|
2722
|
+
// src/components/helpers/StylelessButton/StylelessButton.tsx
|
|
2665
2723
|
import { jsx as jsx176 } from "react/jsx-runtime";
|
|
2666
|
-
var
|
|
2667
|
-
|
|
2724
|
+
var StylelessButton = ({
|
|
2725
|
+
className,
|
|
2726
|
+
...rest
|
|
2727
|
+
}) => /* @__PURE__ */ jsx176(
|
|
2728
|
+
"button",
|
|
2729
|
+
{
|
|
2730
|
+
...rest,
|
|
2731
|
+
className: cn(
|
|
2732
|
+
className,
|
|
2733
|
+
utilStyles_default["remove-button-styling"],
|
|
2734
|
+
utilStyles_default["normalize-button"]
|
|
2735
|
+
)
|
|
2736
|
+
}
|
|
2737
|
+
);
|
|
2738
|
+
|
|
2739
|
+
// src/components/helpers/StylelessList/StylelessList.tsx
|
|
2740
|
+
import { jsx as jsx177 } from "react/jsx-runtime";
|
|
2741
|
+
var StylelessList = ({ className, ...rest }) => /* @__PURE__ */ jsx177("ul", { ...rest, className: cn(className, utilStyles_default["remove-list-styling"]) });
|
|
2742
|
+
var StylelessOList = ({ className, ...rest }) => /* @__PURE__ */ jsx177("ol", { ...rest, className: cn(className, utilStyles_default["remove-list-styling"]) });
|
|
2668
2743
|
|
|
2669
2744
|
// src/components/helpers/styling/utils.ts
|
|
2670
2745
|
var outlineOffset = "var(--dds-spacing-x0-125)";
|
|
@@ -2859,7 +2934,7 @@ var display_default = {
|
|
|
2859
2934
|
};
|
|
2860
2935
|
|
|
2861
2936
|
// src/components/layout/ShowHide/ShowHide.tsx
|
|
2862
|
-
import { jsx as
|
|
2937
|
+
import { jsx as jsx178 } from "react/jsx-runtime";
|
|
2863
2938
|
var ShowHide = ({
|
|
2864
2939
|
hideBelow,
|
|
2865
2940
|
showBelow,
|
|
@@ -2867,7 +2942,7 @@ var ShowHide = ({
|
|
|
2867
2942
|
htmlProps,
|
|
2868
2943
|
id,
|
|
2869
2944
|
...rest
|
|
2870
|
-
}) => /* @__PURE__ */
|
|
2945
|
+
}) => /* @__PURE__ */ jsx178(
|
|
2871
2946
|
ElementAs,
|
|
2872
2947
|
{
|
|
2873
2948
|
...getBaseHTMLProps(
|
|
@@ -2885,7 +2960,7 @@ var ShowHide = ({
|
|
|
2885
2960
|
ShowHide.displayName = "ShowHide";
|
|
2886
2961
|
|
|
2887
2962
|
// src/components/layout/Box/Box.tsx
|
|
2888
|
-
import { jsx as
|
|
2963
|
+
import { jsx as jsx179 } from "react/jsx-runtime";
|
|
2889
2964
|
var Box = ({
|
|
2890
2965
|
id,
|
|
2891
2966
|
className,
|
|
@@ -2961,7 +3036,7 @@ var Box = ({
|
|
|
2961
3036
|
...getResponsiveCSSProperties(flexBasis, "r", "basis"),
|
|
2962
3037
|
...getResponsiveCSSProperties(flexFlow, "r", "flow")
|
|
2963
3038
|
};
|
|
2964
|
-
return /* @__PURE__ */
|
|
3039
|
+
return /* @__PURE__ */ jsx179(
|
|
2965
3040
|
ShowHide,
|
|
2966
3041
|
{
|
|
2967
3042
|
...getBaseHTMLProps(
|
|
@@ -3023,7 +3098,7 @@ var Grid_default = {
|
|
|
3023
3098
|
};
|
|
3024
3099
|
|
|
3025
3100
|
// src/components/layout/Grid/Grid.tsx
|
|
3026
|
-
import { jsx as
|
|
3101
|
+
import { jsx as jsx180 } from "react/jsx-runtime";
|
|
3027
3102
|
var Grid = ({
|
|
3028
3103
|
id,
|
|
3029
3104
|
className,
|
|
@@ -3060,7 +3135,7 @@ var Grid = ({
|
|
|
3060
3135
|
"grid-template-columns"
|
|
3061
3136
|
)
|
|
3062
3137
|
};
|
|
3063
|
-
return /* @__PURE__ */
|
|
3138
|
+
return /* @__PURE__ */ jsx180(
|
|
3064
3139
|
Box,
|
|
3065
3140
|
{
|
|
3066
3141
|
display: "grid",
|
|
@@ -3080,7 +3155,7 @@ var Grid = ({
|
|
|
3080
3155
|
Grid.displayName = "Grid";
|
|
3081
3156
|
|
|
3082
3157
|
// src/components/layout/Grid/GridChild.tsx
|
|
3083
|
-
import { jsx as
|
|
3158
|
+
import { jsx as jsx181 } from "react/jsx-runtime";
|
|
3084
3159
|
var GridChild = ({
|
|
3085
3160
|
id,
|
|
3086
3161
|
className,
|
|
@@ -3096,7 +3171,7 @@ var GridChild = ({
|
|
|
3096
3171
|
...getResponsiveCSSProperties(justifySelf, "r", "j-self"),
|
|
3097
3172
|
...getResponsiveCSSProperties(columnsOccupied, "r", "grid-column")
|
|
3098
3173
|
};
|
|
3099
|
-
return /* @__PURE__ */
|
|
3174
|
+
return /* @__PURE__ */ jsx181(
|
|
3100
3175
|
Box,
|
|
3101
3176
|
{
|
|
3102
3177
|
...getBaseHTMLProps(
|
|
@@ -3137,7 +3212,7 @@ var Paper_default = {
|
|
|
3137
3212
|
};
|
|
3138
3213
|
|
|
3139
3214
|
// src/components/layout/Paper/Paper.tsx
|
|
3140
|
-
import { jsx as
|
|
3215
|
+
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
3141
3216
|
var Paper = ({
|
|
3142
3217
|
id,
|
|
3143
3218
|
elevation,
|
|
@@ -3153,7 +3228,7 @@ var Paper = ({
|
|
|
3153
3228
|
...getResponsiveCSSProperties(background, "paper-background"),
|
|
3154
3229
|
...getResponsiveCSSProperties(border, "paper-border")
|
|
3155
3230
|
};
|
|
3156
|
-
return /* @__PURE__ */
|
|
3231
|
+
return /* @__PURE__ */ jsx182(
|
|
3157
3232
|
Box,
|
|
3158
3233
|
{
|
|
3159
3234
|
...getBaseHTMLProps(
|
|
@@ -3175,14 +3250,14 @@ var Paper = ({
|
|
|
3175
3250
|
};
|
|
3176
3251
|
|
|
3177
3252
|
// src/components/layout/Stack/VStack/VStack.tsx
|
|
3178
|
-
import { jsx as
|
|
3253
|
+
import { jsx as jsx183 } from "react/jsx-runtime";
|
|
3179
3254
|
var VStack = ({
|
|
3180
3255
|
id,
|
|
3181
3256
|
className,
|
|
3182
3257
|
htmlProps,
|
|
3183
3258
|
...rest
|
|
3184
3259
|
}) => {
|
|
3185
|
-
return /* @__PURE__ */
|
|
3260
|
+
return /* @__PURE__ */ jsx183(
|
|
3186
3261
|
Box,
|
|
3187
3262
|
{
|
|
3188
3263
|
display: "flex",
|
|
@@ -3194,14 +3269,14 @@ var VStack = ({
|
|
|
3194
3269
|
VStack.displayName = "VStack";
|
|
3195
3270
|
|
|
3196
3271
|
// src/components/layout/Stack/HStack/HStack.tsx
|
|
3197
|
-
import { jsx as
|
|
3272
|
+
import { jsx as jsx184 } from "react/jsx-runtime";
|
|
3198
3273
|
var HStack = ({
|
|
3199
3274
|
id,
|
|
3200
3275
|
className,
|
|
3201
3276
|
htmlProps,
|
|
3202
3277
|
...rest
|
|
3203
3278
|
}) => {
|
|
3204
|
-
return /* @__PURE__ */
|
|
3279
|
+
return /* @__PURE__ */ jsx184(
|
|
3205
3280
|
Box,
|
|
3206
3281
|
{
|
|
3207
3282
|
display: "flex",
|
|
@@ -3319,13 +3394,13 @@ import {
|
|
|
3319
3394
|
createContext,
|
|
3320
3395
|
useContext
|
|
3321
3396
|
} from "react";
|
|
3322
|
-
import { jsx as
|
|
3397
|
+
import { jsx as jsx185 } from "react/jsx-runtime";
|
|
3323
3398
|
var AccordionContext = createContext({});
|
|
3324
3399
|
var AccordionContextProvider = ({
|
|
3325
3400
|
children,
|
|
3326
3401
|
...values
|
|
3327
3402
|
}) => {
|
|
3328
|
-
return /* @__PURE__ */
|
|
3403
|
+
return /* @__PURE__ */ jsx185(AccordionContext, { value: values, children });
|
|
3329
3404
|
};
|
|
3330
3405
|
var useAccordionContext = () => {
|
|
3331
3406
|
const context = useContext(AccordionContext);
|
|
@@ -3338,7 +3413,7 @@ var useAccordionContext = () => {
|
|
|
3338
3413
|
};
|
|
3339
3414
|
|
|
3340
3415
|
// src/components/Accordion/Accordion.tsx
|
|
3341
|
-
import { jsx as
|
|
3416
|
+
import { jsx as jsx186 } from "react/jsx-runtime";
|
|
3342
3417
|
var Accordion = ({
|
|
3343
3418
|
isExpanded = false,
|
|
3344
3419
|
onChange,
|
|
@@ -3356,7 +3431,7 @@ var Accordion = ({
|
|
|
3356
3431
|
headerProps,
|
|
3357
3432
|
bodyProps
|
|
3358
3433
|
} = useAccordion({ initiallyExpanded: isExpanded, onChange, id });
|
|
3359
|
-
return /* @__PURE__ */
|
|
3434
|
+
return /* @__PURE__ */ jsx186(
|
|
3360
3435
|
"div",
|
|
3361
3436
|
{
|
|
3362
3437
|
...getBaseHTMLProps(
|
|
@@ -3365,7 +3440,7 @@ var Accordion = ({
|
|
|
3365
3440
|
htmlProps,
|
|
3366
3441
|
rest
|
|
3367
3442
|
),
|
|
3368
|
-
children: /* @__PURE__ */
|
|
3443
|
+
children: /* @__PURE__ */ jsx186(
|
|
3369
3444
|
AccordionContextProvider,
|
|
3370
3445
|
{
|
|
3371
3446
|
headerProps,
|
|
@@ -3382,7 +3457,7 @@ var Accordion = ({
|
|
|
3382
3457
|
Accordion.displayName = "Accordion";
|
|
3383
3458
|
|
|
3384
3459
|
// src/components/Accordion/AccordionHeader.tsx
|
|
3385
|
-
import { jsx as
|
|
3460
|
+
import { jsx as jsx187, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3386
3461
|
var AccordionHeader = ({
|
|
3387
3462
|
children,
|
|
3388
3463
|
className,
|
|
@@ -3396,7 +3471,7 @@ var AccordionHeader = ({
|
|
|
3396
3471
|
return /* @__PURE__ */ jsxs24(
|
|
3397
3472
|
Box,
|
|
3398
3473
|
{
|
|
3399
|
-
as:
|
|
3474
|
+
as: StylelessButton,
|
|
3400
3475
|
padding: "x1 x1.5 x1 x1",
|
|
3401
3476
|
...getBaseHTMLProps(
|
|
3402
3477
|
id,
|
|
@@ -3404,8 +3479,6 @@ var AccordionHeader = ({
|
|
|
3404
3479
|
className,
|
|
3405
3480
|
Accordion_default["header-button"],
|
|
3406
3481
|
AccordionBase_default["header-button"],
|
|
3407
|
-
utilStyles_default["normalize-button"],
|
|
3408
|
-
utilStyles_default["remove-button-styling"],
|
|
3409
3482
|
focusable,
|
|
3410
3483
|
AccordionBase_default["header-container"]
|
|
3411
3484
|
),
|
|
@@ -3414,13 +3487,13 @@ var AccordionHeader = ({
|
|
|
3414
3487
|
),
|
|
3415
3488
|
...restHeaderProps,
|
|
3416
3489
|
children: [
|
|
3417
|
-
/* @__PURE__ */
|
|
3490
|
+
/* @__PURE__ */ jsx187(
|
|
3418
3491
|
Box,
|
|
3419
3492
|
{
|
|
3420
3493
|
as: "span",
|
|
3421
3494
|
marginInline: "x0 x0.5",
|
|
3422
3495
|
className: AccordionBase_default.header__chevron,
|
|
3423
|
-
children: /* @__PURE__ */
|
|
3496
|
+
children: /* @__PURE__ */ jsx187(
|
|
3424
3497
|
AnimatedChevronUpDown,
|
|
3425
3498
|
{
|
|
3426
3499
|
width: "var(--dds-icon-size-medium)",
|
|
@@ -3430,7 +3503,7 @@ var AccordionHeader = ({
|
|
|
3430
3503
|
)
|
|
3431
3504
|
}
|
|
3432
3505
|
),
|
|
3433
|
-
/* @__PURE__ */
|
|
3506
|
+
/* @__PURE__ */ jsx187(
|
|
3434
3507
|
"div",
|
|
3435
3508
|
{
|
|
3436
3509
|
className: cn(
|
|
@@ -3448,7 +3521,7 @@ var AccordionHeader = ({
|
|
|
3448
3521
|
AccordionHeader.displayName = "AccordionHeader";
|
|
3449
3522
|
|
|
3450
3523
|
// src/components/Accordion/AccordionBody.tsx
|
|
3451
|
-
import { jsx as
|
|
3524
|
+
import { jsx as jsx188 } from "react/jsx-runtime";
|
|
3452
3525
|
var AccordionBody = ({
|
|
3453
3526
|
children,
|
|
3454
3527
|
className,
|
|
@@ -3466,7 +3539,7 @@ var AccordionBody = ({
|
|
|
3466
3539
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3467
3540
|
["--dds-card-accordion-body-height"]: height + "px"
|
|
3468
3541
|
};
|
|
3469
|
-
return /* @__PURE__ */
|
|
3542
|
+
return /* @__PURE__ */ jsx188(
|
|
3470
3543
|
"div",
|
|
3471
3544
|
{
|
|
3472
3545
|
...getBaseHTMLProps(
|
|
@@ -3477,7 +3550,7 @@ var AccordionBody = ({
|
|
|
3477
3550
|
),
|
|
3478
3551
|
...restBodyProps,
|
|
3479
3552
|
style: { ...htmlProps == null ? void 0 : htmlProps.style, ...styleVariables },
|
|
3480
|
-
children: /* @__PURE__ */
|
|
3553
|
+
children: /* @__PURE__ */ jsx188(Box, { ref: bodyContentRef, padding: "x0.5 x1.5 x2 x1", children })
|
|
3481
3554
|
}
|
|
3482
3555
|
);
|
|
3483
3556
|
};
|
|
@@ -3489,25 +3562,25 @@ var BackLink_default = {
|
|
|
3489
3562
|
};
|
|
3490
3563
|
|
|
3491
3564
|
// src/components/BackLink/BackLink.tsx
|
|
3492
|
-
import { jsx as
|
|
3565
|
+
import { jsx as jsx189, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3493
3566
|
var BackLink = ({ label, ref, ...rest }) => {
|
|
3494
|
-
return /* @__PURE__ */
|
|
3495
|
-
/* @__PURE__ */
|
|
3567
|
+
return /* @__PURE__ */ jsx189("nav", { ref, "aria-label": "G\xE5 tilbake", children: /* @__PURE__ */ jsxs25(Link, { ...rest, children: [
|
|
3568
|
+
/* @__PURE__ */ jsx189(Icon, { icon: ArrowLeftIcon, iconSize: "inherit", className: BackLink_default.icon }),
|
|
3496
3569
|
label
|
|
3497
3570
|
] }) });
|
|
3498
3571
|
};
|
|
3499
3572
|
BackLink.displayName = "BackLink";
|
|
3500
3573
|
|
|
3501
3574
|
// src/components/Breadcrumbs/Breadcrumb.tsx
|
|
3502
|
-
import { jsx as
|
|
3575
|
+
import { jsx as jsx190 } from "react/jsx-runtime";
|
|
3503
3576
|
var isAnchorTypographyProps = (props) => {
|
|
3504
3577
|
return props.href != void 0;
|
|
3505
3578
|
};
|
|
3506
3579
|
var Breadcrumb = ({ children, ref, ...rest }) => {
|
|
3507
3580
|
if (isAnchorTypographyProps(rest)) {
|
|
3508
|
-
return /* @__PURE__ */
|
|
3581
|
+
return /* @__PURE__ */ jsx190(Link, { ref, htmlProps: rest, children });
|
|
3509
3582
|
}
|
|
3510
|
-
return /* @__PURE__ */
|
|
3583
|
+
return /* @__PURE__ */ jsx190("span", { ref, ...rest, children });
|
|
3511
3584
|
};
|
|
3512
3585
|
Breadcrumb.displayName = "Breadcrumb";
|
|
3513
3586
|
|
|
@@ -3560,7 +3633,7 @@ var Spinner_default = {
|
|
|
3560
3633
|
};
|
|
3561
3634
|
|
|
3562
3635
|
// src/components/Spinner/Spinner.tsx
|
|
3563
|
-
import { jsx as
|
|
3636
|
+
import { jsx as jsx191, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3564
3637
|
function Spinner(props) {
|
|
3565
3638
|
const {
|
|
3566
3639
|
size: size2 = "var(--dds-icon-size-medium)",
|
|
@@ -3590,8 +3663,8 @@ function Spinner(props) {
|
|
|
3590
3663
|
height: size2
|
|
3591
3664
|
},
|
|
3592
3665
|
children: [
|
|
3593
|
-
/* @__PURE__ */
|
|
3594
|
-
/* @__PURE__ */
|
|
3666
|
+
/* @__PURE__ */ jsx191("title", { id: uniqueId, children: tooltip }),
|
|
3667
|
+
/* @__PURE__ */ jsx191(
|
|
3595
3668
|
"circle",
|
|
3596
3669
|
{
|
|
3597
3670
|
className: cn(Spinner_default.circle),
|
|
@@ -3613,7 +3686,7 @@ function Spinner(props) {
|
|
|
3613
3686
|
Spinner.displayName = "Spinner";
|
|
3614
3687
|
|
|
3615
3688
|
// src/components/Button/Button.tsx
|
|
3616
|
-
import { Fragment, jsx as
|
|
3689
|
+
import { Fragment, jsx as jsx192, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3617
3690
|
var Button = ({
|
|
3618
3691
|
children,
|
|
3619
3692
|
purpose = "primary",
|
|
@@ -3655,7 +3728,7 @@ var Button = ({
|
|
|
3655
3728
|
typographyStyles_default[`body-${size2}`],
|
|
3656
3729
|
focusable
|
|
3657
3730
|
);
|
|
3658
|
-
const iconElement = hasIcon && /* @__PURE__ */
|
|
3731
|
+
const iconElement = hasIcon && /* @__PURE__ */ jsx192(
|
|
3659
3732
|
Icon,
|
|
3660
3733
|
{
|
|
3661
3734
|
icon,
|
|
@@ -3666,11 +3739,11 @@ var Button = ({
|
|
|
3666
3739
|
const content = /* @__PURE__ */ jsxs27(Fragment, { children: [
|
|
3667
3740
|
hasLabel && /* @__PURE__ */ jsxs27(Fragment, { children: [
|
|
3668
3741
|
iconPosition === "left" && iconElement,
|
|
3669
|
-
/* @__PURE__ */
|
|
3742
|
+
/* @__PURE__ */ jsx192("span", { "aria-hidden": loading, className: cn(loading && invisible), children }),
|
|
3670
3743
|
iconPosition === "right" && iconElement
|
|
3671
3744
|
] }),
|
|
3672
3745
|
isIconButton && iconElement,
|
|
3673
|
-
loading && /* @__PURE__ */
|
|
3746
|
+
loading && /* @__PURE__ */ jsx192("span", { className: cn(!noContent && Button_default["spinner-wrapper--absolute"]), children: /* @__PURE__ */ jsx192(
|
|
3674
3747
|
Spinner,
|
|
3675
3748
|
{
|
|
3676
3749
|
size: "calc(var(--dds-font-lineheight-x1) * 1em)",
|
|
@@ -3681,7 +3754,7 @@ var Button = ({
|
|
|
3681
3754
|
) })
|
|
3682
3755
|
] });
|
|
3683
3756
|
if (!href)
|
|
3684
|
-
return /* @__PURE__ */
|
|
3757
|
+
return /* @__PURE__ */ jsx192(
|
|
3685
3758
|
"button",
|
|
3686
3759
|
{
|
|
3687
3760
|
ref,
|
|
@@ -3694,7 +3767,7 @@ var Button = ({
|
|
|
3694
3767
|
}
|
|
3695
3768
|
);
|
|
3696
3769
|
else if (href)
|
|
3697
|
-
return /* @__PURE__ */
|
|
3770
|
+
return /* @__PURE__ */ jsx192(
|
|
3698
3771
|
"a",
|
|
3699
3772
|
{
|
|
3700
3773
|
ref,
|
|
@@ -3730,7 +3803,7 @@ import {
|
|
|
3730
3803
|
useEffect as useEffect12,
|
|
3731
3804
|
useState as useState6
|
|
3732
3805
|
} from "react";
|
|
3733
|
-
import { jsx as
|
|
3806
|
+
import { jsx as jsx193 } from "react/jsx-runtime";
|
|
3734
3807
|
var OverflowMenuContext = createContext3({
|
|
3735
3808
|
isOpen: false,
|
|
3736
3809
|
registerItem: () => null,
|
|
@@ -3748,7 +3821,7 @@ function OverflowMenuContextProvider({
|
|
|
3748
3821
|
var _a, _b;
|
|
3749
3822
|
(_b = (_a = items[focusIndex]) == null ? void 0 : _a.current) == null ? void 0 : _b.focus();
|
|
3750
3823
|
}, [focusIndex]);
|
|
3751
|
-
return /* @__PURE__ */
|
|
3824
|
+
return /* @__PURE__ */ jsx193(
|
|
3752
3825
|
OverflowMenuContext,
|
|
3753
3826
|
{
|
|
3754
3827
|
value: {
|
|
@@ -3778,7 +3851,7 @@ var OverflowMenu_default = {
|
|
|
3778
3851
|
};
|
|
3779
3852
|
|
|
3780
3853
|
// src/components/OverflowMenu/OverflowMenu.tsx
|
|
3781
|
-
import { jsx as
|
|
3854
|
+
import { jsx as jsx194 } from "react/jsx-runtime";
|
|
3782
3855
|
var OverflowMenu = ({
|
|
3783
3856
|
placement = "bottom-end",
|
|
3784
3857
|
offset = 2,
|
|
@@ -3793,7 +3866,7 @@ var OverflowMenu = ({
|
|
|
3793
3866
|
}, [placement, offset]);
|
|
3794
3867
|
const { style = {}, ...restHTMLProps } = htmlProps;
|
|
3795
3868
|
const openCn = isOpen ? "open" : "closed";
|
|
3796
|
-
return /* @__PURE__ */
|
|
3869
|
+
return /* @__PURE__ */ jsx194(
|
|
3797
3870
|
Paper,
|
|
3798
3871
|
{
|
|
3799
3872
|
overflowY: "auto",
|
|
@@ -3824,7 +3897,7 @@ OverflowMenu.displayName = "OverflowMenu";
|
|
|
3824
3897
|
|
|
3825
3898
|
// src/components/OverflowMenu/components/OverflowMenuButton.tsx
|
|
3826
3899
|
import { useEffect as useEffect14, useRef as useRef6, useState as useState7 } from "react";
|
|
3827
|
-
import { jsx as
|
|
3900
|
+
import { jsx as jsx195, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3828
3901
|
var OverflowMenuButton = ({
|
|
3829
3902
|
id,
|
|
3830
3903
|
icon,
|
|
@@ -3863,7 +3936,7 @@ var OverflowMenuButton = ({
|
|
|
3863
3936
|
onClose == null ? void 0 : onClose();
|
|
3864
3937
|
}
|
|
3865
3938
|
};
|
|
3866
|
-
return /* @__PURE__ */
|
|
3939
|
+
return /* @__PURE__ */ jsx195("li", { children: /* @__PURE__ */ jsxs28(
|
|
3867
3940
|
"button",
|
|
3868
3941
|
{
|
|
3869
3942
|
ref: combinedRef,
|
|
@@ -3883,14 +3956,14 @@ var OverflowMenuButton = ({
|
|
|
3883
3956
|
...rest,
|
|
3884
3957
|
tabIndex: focusedRef === itemRef ? 0 : -1,
|
|
3885
3958
|
children: [
|
|
3886
|
-
isLoading && /* @__PURE__ */
|
|
3959
|
+
isLoading && /* @__PURE__ */ jsx195("span", { className: cn(utilStyles_default["center-absolute"]), children: /* @__PURE__ */ jsx195(
|
|
3887
3960
|
Spinner,
|
|
3888
3961
|
{
|
|
3889
3962
|
size: "var(--dds-icon-size-medium)",
|
|
3890
3963
|
tooltip: loadingTooltip
|
|
3891
3964
|
}
|
|
3892
3965
|
) }),
|
|
3893
|
-
icon && /* @__PURE__ */
|
|
3966
|
+
icon && /* @__PURE__ */ jsx195(
|
|
3894
3967
|
Icon,
|
|
3895
3968
|
{
|
|
3896
3969
|
className: cn(isLoading && invisible),
|
|
@@ -3898,7 +3971,7 @@ var OverflowMenuButton = ({
|
|
|
3898
3971
|
icon
|
|
3899
3972
|
}
|
|
3900
3973
|
),
|
|
3901
|
-
/* @__PURE__ */
|
|
3974
|
+
/* @__PURE__ */ jsx195("span", { className: cn(isLoading && invisible), children })
|
|
3902
3975
|
]
|
|
3903
3976
|
}
|
|
3904
3977
|
) });
|
|
@@ -3907,7 +3980,7 @@ OverflowMenuButton.displayName = "OverflowMenuButton";
|
|
|
3907
3980
|
|
|
3908
3981
|
// src/components/OverflowMenu/components/OverflowMenuLink.tsx
|
|
3909
3982
|
import { useEffect as useEffect15, useRef as useRef7 } from "react";
|
|
3910
|
-
import { jsx as
|
|
3983
|
+
import { jsx as jsx196, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3911
3984
|
var OverflowMenuLink = ({
|
|
3912
3985
|
id,
|
|
3913
3986
|
href,
|
|
@@ -3926,7 +3999,7 @@ var OverflowMenuLink = ({
|
|
|
3926
3999
|
registerItem(itemRef);
|
|
3927
4000
|
return () => unregisterItem(itemRef);
|
|
3928
4001
|
}, []);
|
|
3929
|
-
return /* @__PURE__ */
|
|
4002
|
+
return /* @__PURE__ */ jsx196("li", { children: /* @__PURE__ */ jsxs29(
|
|
3930
4003
|
"a",
|
|
3931
4004
|
{
|
|
3932
4005
|
ref: combinedRef,
|
|
@@ -3948,7 +4021,7 @@ var OverflowMenuLink = ({
|
|
|
3948
4021
|
...rest,
|
|
3949
4022
|
tabIndex: focusedRef === itemRef ? 0 : -1,
|
|
3950
4023
|
children: [
|
|
3951
|
-
icon && /* @__PURE__ */
|
|
4024
|
+
icon && /* @__PURE__ */ jsx196(Icon, { iconSize: "inherit", icon }),
|
|
3952
4025
|
children
|
|
3953
4026
|
]
|
|
3954
4027
|
}
|
|
@@ -3965,7 +4038,7 @@ var Divider_default = {
|
|
|
3965
4038
|
};
|
|
3966
4039
|
|
|
3967
4040
|
// src/components/Divider/Divider.tsx
|
|
3968
|
-
import { jsx as
|
|
4041
|
+
import { jsx as jsx197 } from "react/jsx-runtime";
|
|
3969
4042
|
var Divider = ({
|
|
3970
4043
|
color = "default",
|
|
3971
4044
|
id,
|
|
@@ -3973,7 +4046,7 @@ var Divider = ({
|
|
|
3973
4046
|
htmlProps,
|
|
3974
4047
|
...rest
|
|
3975
4048
|
}) => {
|
|
3976
|
-
return /* @__PURE__ */
|
|
4049
|
+
return /* @__PURE__ */ jsx197(
|
|
3977
4050
|
"hr",
|
|
3978
4051
|
{
|
|
3979
4052
|
...getBaseHTMLProps(
|
|
@@ -3987,14 +4060,14 @@ var Divider = ({
|
|
|
3987
4060
|
};
|
|
3988
4061
|
|
|
3989
4062
|
// src/components/OverflowMenu/components/OverflowMenuDivider.tsx
|
|
3990
|
-
import { jsx as
|
|
4063
|
+
import { jsx as jsx198 } from "react/jsx-runtime";
|
|
3991
4064
|
var OverflowMenuDivider = ({
|
|
3992
4065
|
id,
|
|
3993
4066
|
className,
|
|
3994
4067
|
htmlProps,
|
|
3995
4068
|
...rest
|
|
3996
4069
|
}) => {
|
|
3997
|
-
return /* @__PURE__ */
|
|
4070
|
+
return /* @__PURE__ */ jsx198(
|
|
3998
4071
|
Box,
|
|
3999
4072
|
{
|
|
4000
4073
|
as: Divider,
|
|
@@ -4008,18 +4081,18 @@ var OverflowMenuDivider = ({
|
|
|
4008
4081
|
OverflowMenuDivider.displayName = "OverflowMenuDivider";
|
|
4009
4082
|
|
|
4010
4083
|
// src/components/OverflowMenu/components/OverflowMenuList.tsx
|
|
4011
|
-
import { jsx as
|
|
4012
|
-
var OverflowMenuList = (props) => /* @__PURE__ */
|
|
4084
|
+
import { jsx as jsx199 } from "react/jsx-runtime";
|
|
4085
|
+
var OverflowMenuList = (props) => /* @__PURE__ */ jsx199(StylelessList, { ...props });
|
|
4013
4086
|
|
|
4014
4087
|
// src/components/OverflowMenu/components/OverflowMenuSpan.tsx
|
|
4015
|
-
import { jsx as
|
|
4088
|
+
import { jsx as jsx200, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4016
4089
|
var OverflowMenuSpan = ({
|
|
4017
4090
|
icon,
|
|
4018
4091
|
children,
|
|
4019
4092
|
className,
|
|
4020
4093
|
purpose = "default",
|
|
4021
4094
|
...rest
|
|
4022
|
-
}) => /* @__PURE__ */
|
|
4095
|
+
}) => /* @__PURE__ */ jsx200("li", { children: /* @__PURE__ */ jsxs30(
|
|
4023
4096
|
"span",
|
|
4024
4097
|
{
|
|
4025
4098
|
className: cn(
|
|
@@ -4030,7 +4103,7 @@ var OverflowMenuSpan = ({
|
|
|
4030
4103
|
),
|
|
4031
4104
|
...rest,
|
|
4032
4105
|
children: [
|
|
4033
|
-
icon && /* @__PURE__ */
|
|
4106
|
+
icon && /* @__PURE__ */ jsx200(Icon, { iconSize: "inherit", icon }),
|
|
4034
4107
|
children
|
|
4035
4108
|
]
|
|
4036
4109
|
}
|
|
@@ -4038,11 +4111,11 @@ var OverflowMenuSpan = ({
|
|
|
4038
4111
|
OverflowMenuSpan.displayName = "OverflowMenuSpan";
|
|
4039
4112
|
|
|
4040
4113
|
// src/components/OverflowMenu/components/OverflowMenuListHeader.tsx
|
|
4041
|
-
import { jsx as
|
|
4114
|
+
import { jsx as jsx201 } from "react/jsx-runtime";
|
|
4042
4115
|
var OverflowMenuListHeader = ({
|
|
4043
4116
|
className,
|
|
4044
4117
|
...rest
|
|
4045
|
-
}) => /* @__PURE__ */
|
|
4118
|
+
}) => /* @__PURE__ */ jsx201(
|
|
4046
4119
|
Box,
|
|
4047
4120
|
{
|
|
4048
4121
|
as: "h2",
|
|
@@ -4063,7 +4136,7 @@ import {
|
|
|
4063
4136
|
useRef as useRef8,
|
|
4064
4137
|
useState as useState8
|
|
4065
4138
|
} from "react";
|
|
4066
|
-
import { jsx as
|
|
4139
|
+
import { jsx as jsx202 } from "react/jsx-runtime";
|
|
4067
4140
|
var OverflowMenuGroup = ({
|
|
4068
4141
|
children,
|
|
4069
4142
|
onClose,
|
|
@@ -4124,7 +4197,7 @@ var OverflowMenuGroup = ({
|
|
|
4124
4197
|
ref: combinedAnchorRef
|
|
4125
4198
|
}) : child);
|
|
4126
4199
|
});
|
|
4127
|
-
return /* @__PURE__ */
|
|
4200
|
+
return /* @__PURE__ */ jsx202(
|
|
4128
4201
|
OverflowMenuContextProvider,
|
|
4129
4202
|
{
|
|
4130
4203
|
isOpen,
|
|
@@ -4140,7 +4213,7 @@ var OverflowMenuGroup = ({
|
|
|
4140
4213
|
OverflowMenuGroup.displayName = "OverflowMenuGroup";
|
|
4141
4214
|
|
|
4142
4215
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
4143
|
-
import { Fragment as Fragment2, jsx as
|
|
4216
|
+
import { Fragment as Fragment2, jsx as jsx203, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4144
4217
|
var Breadcrumbs = ({
|
|
4145
4218
|
children,
|
|
4146
4219
|
smallScreenBreakpoint,
|
|
@@ -4149,7 +4222,7 @@ var Breadcrumbs = ({
|
|
|
4149
4222
|
htmlProps,
|
|
4150
4223
|
...rest
|
|
4151
4224
|
}) => {
|
|
4152
|
-
const chevronIcon = /* @__PURE__ */
|
|
4225
|
+
const chevronIcon = /* @__PURE__ */ jsx203(
|
|
4153
4226
|
Icon,
|
|
4154
4227
|
{
|
|
4155
4228
|
className: cn(Breadcrumbs_default.icon),
|
|
@@ -4181,17 +4254,17 @@ var Breadcrumbs = ({
|
|
|
4181
4254
|
const breadcrumbChildrenTruncated = childrenArray.length > 2 ? childrenArray.slice(1, childrenArray.length - 1).map((item, index) => {
|
|
4182
4255
|
if (isValidElement2(item)) {
|
|
4183
4256
|
if (isAnchorTypographyProps(item.props)) {
|
|
4184
|
-
return /* @__PURE__ */
|
|
4257
|
+
return /* @__PURE__ */ jsx203(OverflowMenuLink, { href: item.props.href, children: item.props.children }, index);
|
|
4185
4258
|
} else
|
|
4186
|
-
return /* @__PURE__ */
|
|
4259
|
+
return /* @__PURE__ */ jsx203(OverflowMenuSpan, { children: item.props.children }, index);
|
|
4187
4260
|
}
|
|
4188
4261
|
}) : [];
|
|
4189
4262
|
const breadcrumbChildrenSmallScreen = /* @__PURE__ */ jsxs31(Fragment2, { children: [
|
|
4190
|
-
/* @__PURE__ */
|
|
4263
|
+
/* @__PURE__ */ jsx203(HStack, { ...responsiveLiProps, children: childrenArray[0] }),
|
|
4191
4264
|
breadcrumbChildrenTruncated.length > 0 && /* @__PURE__ */ jsxs31(HStack, { ...responsiveLiProps, children: [
|
|
4192
4265
|
chevronIcon,
|
|
4193
4266
|
/* @__PURE__ */ jsxs31(OverflowMenuGroup, { children: [
|
|
4194
|
-
/* @__PURE__ */
|
|
4267
|
+
/* @__PURE__ */ jsx203(
|
|
4195
4268
|
Button,
|
|
4196
4269
|
{
|
|
4197
4270
|
size: "xsmall",
|
|
@@ -4200,7 +4273,7 @@ var Breadcrumbs = ({
|
|
|
4200
4273
|
"aria-label": `Vis br\xF8dsmulesti br\xF8dsmule 2 ${breadcrumbChildrenTruncated.length > 1 && `til ${breadcrumbChildren.length - 1}`}`
|
|
4201
4274
|
}
|
|
4202
4275
|
),
|
|
4203
|
-
/* @__PURE__ */
|
|
4276
|
+
/* @__PURE__ */ jsx203(OverflowMenu, { children: /* @__PURE__ */ jsx203(OverflowMenuList, { children: breadcrumbChildrenTruncated }) })
|
|
4204
4277
|
] })
|
|
4205
4278
|
] }),
|
|
4206
4279
|
/* @__PURE__ */ jsxs31(HStack, { ...responsiveLiProps, children: [
|
|
@@ -4221,7 +4294,7 @@ var Breadcrumbs = ({
|
|
|
4221
4294
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
4222
4295
|
"aria-label": "br\xF8dsmulesti",
|
|
4223
4296
|
children: [
|
|
4224
|
-
/* @__PURE__ */
|
|
4297
|
+
/* @__PURE__ */ jsx203(
|
|
4225
4298
|
HStack,
|
|
4226
4299
|
{
|
|
4227
4300
|
...responsiveListProps,
|
|
@@ -4229,7 +4302,7 @@ var Breadcrumbs = ({
|
|
|
4229
4302
|
children: breadcrumbChildren
|
|
4230
4303
|
}
|
|
4231
4304
|
),
|
|
4232
|
-
hasSmallScreenBreakpoint && /* @__PURE__ */
|
|
4305
|
+
hasSmallScreenBreakpoint && /* @__PURE__ */ jsx203(HStack, { ...responsiveListProps, showBelow: smallScreenBreakpoint, children: breadcrumbChildrenSmallScreen })
|
|
4233
4306
|
]
|
|
4234
4307
|
}
|
|
4235
4308
|
);
|
|
@@ -4244,7 +4317,7 @@ var ButtonGroup_default = {
|
|
|
4244
4317
|
};
|
|
4245
4318
|
|
|
4246
4319
|
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
4247
|
-
import { jsx as
|
|
4320
|
+
import { jsx as jsx204 } from "react/jsx-runtime";
|
|
4248
4321
|
var ButtonGroup = ({
|
|
4249
4322
|
children,
|
|
4250
4323
|
id,
|
|
@@ -4254,7 +4327,7 @@ var ButtonGroup = ({
|
|
|
4254
4327
|
buttonSize = "medium",
|
|
4255
4328
|
role = "group",
|
|
4256
4329
|
...rest
|
|
4257
|
-
}) => /* @__PURE__ */
|
|
4330
|
+
}) => /* @__PURE__ */ jsx204(ButtonGroupContext, { value: { size: buttonSize, purpose: "secondary" }, children: /* @__PURE__ */ jsx204(
|
|
4258
4331
|
"div",
|
|
4259
4332
|
{
|
|
4260
4333
|
role,
|
|
@@ -4280,7 +4353,7 @@ var Card_default = {
|
|
|
4280
4353
|
};
|
|
4281
4354
|
|
|
4282
4355
|
// src/components/Card/Card.tsx
|
|
4283
|
-
import { jsx as
|
|
4356
|
+
import { jsx as jsx205 } from "react/jsx-runtime";
|
|
4284
4357
|
var Card = (props) => {
|
|
4285
4358
|
const {
|
|
4286
4359
|
appearance = "filled",
|
|
@@ -4299,7 +4372,7 @@ var Card = (props) => {
|
|
|
4299
4372
|
);
|
|
4300
4373
|
if (cardType === "navigation") {
|
|
4301
4374
|
const { href, target } = props;
|
|
4302
|
-
return /* @__PURE__ */
|
|
4375
|
+
return /* @__PURE__ */ jsx205(
|
|
4303
4376
|
"a",
|
|
4304
4377
|
{
|
|
4305
4378
|
...getBaseHTMLProps(
|
|
@@ -4314,7 +4387,7 @@ var Card = (props) => {
|
|
|
4314
4387
|
}
|
|
4315
4388
|
);
|
|
4316
4389
|
}
|
|
4317
|
-
return /* @__PURE__ */
|
|
4390
|
+
return /* @__PURE__ */ jsx205("div", { ...getBaseHTMLProps(id, classNames, htmlProps, rest), ref: cardRef });
|
|
4318
4391
|
};
|
|
4319
4392
|
Card.displayName = "Card";
|
|
4320
4393
|
|
|
@@ -4329,7 +4402,7 @@ var CardExpandable_default = {
|
|
|
4329
4402
|
};
|
|
4330
4403
|
|
|
4331
4404
|
// src/components/Card/CardExpandable/CardExpandable.tsx
|
|
4332
|
-
import { jsx as
|
|
4405
|
+
import { jsx as jsx206 } from "react/jsx-runtime";
|
|
4333
4406
|
var CardExpandable = ({
|
|
4334
4407
|
isExpanded = false,
|
|
4335
4408
|
onChange,
|
|
@@ -4347,7 +4420,7 @@ var CardExpandable = ({
|
|
|
4347
4420
|
headerProps,
|
|
4348
4421
|
bodyProps
|
|
4349
4422
|
} = useAccordion({ initiallyExpanded: isExpanded, onChange, id });
|
|
4350
|
-
return /* @__PURE__ */
|
|
4423
|
+
return /* @__PURE__ */ jsx206(
|
|
4351
4424
|
"div",
|
|
4352
4425
|
{
|
|
4353
4426
|
...getBaseHTMLProps(
|
|
@@ -4356,7 +4429,7 @@ var CardExpandable = ({
|
|
|
4356
4429
|
htmlProps,
|
|
4357
4430
|
rest
|
|
4358
4431
|
),
|
|
4359
|
-
children: /* @__PURE__ */
|
|
4432
|
+
children: /* @__PURE__ */ jsx206(
|
|
4360
4433
|
AccordionContextProvider,
|
|
4361
4434
|
{
|
|
4362
4435
|
headerProps,
|
|
@@ -4373,7 +4446,7 @@ var CardExpandable = ({
|
|
|
4373
4446
|
CardExpandable.displayName = "CardExpandable";
|
|
4374
4447
|
|
|
4375
4448
|
// src/components/Card/CardExpandable/CardExpandableHeader.tsx
|
|
4376
|
-
import { jsx as
|
|
4449
|
+
import { jsx as jsx207, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4377
4450
|
var CardExpandableHeader = ({
|
|
4378
4451
|
children,
|
|
4379
4452
|
className,
|
|
@@ -4389,8 +4462,8 @@ var CardExpandableHeader = ({
|
|
|
4389
4462
|
["--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)"
|
|
4390
4463
|
};
|
|
4391
4464
|
const { id, ...restHeaderProps } = headerProps != null ? headerProps : {};
|
|
4392
|
-
return /* @__PURE__ */
|
|
4393
|
-
|
|
4465
|
+
return /* @__PURE__ */ jsx207(
|
|
4466
|
+
StylelessButton,
|
|
4394
4467
|
{
|
|
4395
4468
|
...getBaseHTMLProps(
|
|
4396
4469
|
id,
|
|
@@ -4398,8 +4471,6 @@ var CardExpandableHeader = ({
|
|
|
4398
4471
|
className,
|
|
4399
4472
|
CardExpandable_default["header-button"],
|
|
4400
4473
|
AccordionBase_default["header-button"],
|
|
4401
|
-
utilStyles_default["normalize-button"],
|
|
4402
|
-
utilStyles_default["remove-button-styling"],
|
|
4403
4474
|
focusable
|
|
4404
4475
|
),
|
|
4405
4476
|
htmlProps,
|
|
@@ -4418,15 +4489,15 @@ var CardExpandableHeader = ({
|
|
|
4418
4489
|
bold && typographyStyles_default.bold
|
|
4419
4490
|
),
|
|
4420
4491
|
children: [
|
|
4421
|
-
/* @__PURE__ */
|
|
4422
|
-
/* @__PURE__ */
|
|
4492
|
+
/* @__PURE__ */ jsx207("div", { className: AccordionBase_default.header__content, children }),
|
|
4493
|
+
/* @__PURE__ */ jsx207(
|
|
4423
4494
|
"span",
|
|
4424
4495
|
{
|
|
4425
4496
|
className: cn(
|
|
4426
4497
|
AccordionBase_default.header__chevron,
|
|
4427
4498
|
CardExpandable_default["header-container__chevron"]
|
|
4428
4499
|
),
|
|
4429
|
-
children: /* @__PURE__ */
|
|
4500
|
+
children: /* @__PURE__ */ jsx207(
|
|
4430
4501
|
AnimatedChevronUpDown,
|
|
4431
4502
|
{
|
|
4432
4503
|
width: "var(--dds-icon-size-medium)",
|
|
@@ -4445,7 +4516,7 @@ var CardExpandableHeader = ({
|
|
|
4445
4516
|
CardExpandableHeader.displayName = "CardExpandableHeader";
|
|
4446
4517
|
|
|
4447
4518
|
// src/components/Card/CardExpandable/CardExpandableBody.tsx
|
|
4448
|
-
import { jsx as
|
|
4519
|
+
import { jsx as jsx208 } from "react/jsx-runtime";
|
|
4449
4520
|
var CardExpandableBody = ({
|
|
4450
4521
|
children,
|
|
4451
4522
|
className,
|
|
@@ -4468,7 +4539,7 @@ var CardExpandableBody = ({
|
|
|
4468
4539
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4469
4540
|
["--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)"
|
|
4470
4541
|
};
|
|
4471
|
-
return /* @__PURE__ */
|
|
4542
|
+
return /* @__PURE__ */ jsx208(
|
|
4472
4543
|
"div",
|
|
4473
4544
|
{
|
|
4474
4545
|
...getBaseHTMLProps(
|
|
@@ -4479,7 +4550,7 @@ var CardExpandableBody = ({
|
|
|
4479
4550
|
),
|
|
4480
4551
|
...restBodyProps,
|
|
4481
4552
|
style: { ...htmlProps == null ? void 0 : htmlProps.style, ...styleVariables },
|
|
4482
|
-
children: /* @__PURE__ */
|
|
4553
|
+
children: /* @__PURE__ */ jsx208(
|
|
4483
4554
|
"div",
|
|
4484
4555
|
{
|
|
4485
4556
|
ref: bodyContentRef,
|
|
@@ -4518,12 +4589,12 @@ var SelectionControl_default = {
|
|
|
4518
4589
|
};
|
|
4519
4590
|
|
|
4520
4591
|
// src/components/SelectionControl/SelectionControl.styles.tsx
|
|
4521
|
-
import { jsx as
|
|
4592
|
+
import { jsx as jsx209, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4522
4593
|
var SelectionControl = ({
|
|
4523
4594
|
controlType,
|
|
4524
4595
|
className,
|
|
4525
4596
|
...rest
|
|
4526
|
-
}) => /* @__PURE__ */
|
|
4597
|
+
}) => /* @__PURE__ */ jsx209(
|
|
4527
4598
|
"span",
|
|
4528
4599
|
{
|
|
4529
4600
|
className: cn(
|
|
@@ -4541,7 +4612,7 @@ var Label2 = ({
|
|
|
4541
4612
|
className,
|
|
4542
4613
|
...rest
|
|
4543
4614
|
}) => {
|
|
4544
|
-
return /* @__PURE__ */
|
|
4615
|
+
return /* @__PURE__ */ jsx209(
|
|
4545
4616
|
Box,
|
|
4546
4617
|
{
|
|
4547
4618
|
as: "label",
|
|
@@ -4576,7 +4647,7 @@ var GroupLabel = ({
|
|
|
4576
4647
|
id,
|
|
4577
4648
|
className: readOnly ? Label_default["read-only"] : void 0,
|
|
4578
4649
|
children: [
|
|
4579
|
-
readOnly && /* @__PURE__ */
|
|
4650
|
+
readOnly && /* @__PURE__ */ jsx209(
|
|
4580
4651
|
Icon,
|
|
4581
4652
|
{
|
|
4582
4653
|
icon: LockIcon,
|
|
@@ -4586,7 +4657,7 @@ var GroupLabel = ({
|
|
|
4586
4657
|
),
|
|
4587
4658
|
children,
|
|
4588
4659
|
" ",
|
|
4589
|
-
showRequiredMarker && /* @__PURE__ */
|
|
4660
|
+
showRequiredMarker && /* @__PURE__ */ jsx209(RequiredMarker, {})
|
|
4590
4661
|
]
|
|
4591
4662
|
}
|
|
4592
4663
|
);
|
|
@@ -4602,7 +4673,7 @@ var selectionControlTypographyProps = {
|
|
|
4602
4673
|
};
|
|
4603
4674
|
|
|
4604
4675
|
// src/components/SelectionControl/Checkbox/Checkbox.tsx
|
|
4605
|
-
import { jsx as
|
|
4676
|
+
import { jsx as jsx210, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4606
4677
|
var Checkbox = ({
|
|
4607
4678
|
id,
|
|
4608
4679
|
name,
|
|
@@ -4636,7 +4707,7 @@ var Checkbox = ({
|
|
|
4636
4707
|
className: cn(className, htmlPropsClassName),
|
|
4637
4708
|
style,
|
|
4638
4709
|
children: [
|
|
4639
|
-
/* @__PURE__ */
|
|
4710
|
+
/* @__PURE__ */ jsx210(
|
|
4640
4711
|
"input",
|
|
4641
4712
|
{
|
|
4642
4713
|
...getBaseHTMLProps(uniqueId, restHtmlProps, rest),
|
|
@@ -4665,14 +4736,14 @@ var Checkbox = ({
|
|
|
4665
4736
|
onClick: readOnlyClickHandler(isReadOnly, htmlProps.onClick)
|
|
4666
4737
|
}
|
|
4667
4738
|
),
|
|
4668
|
-
/* @__PURE__ */
|
|
4739
|
+
/* @__PURE__ */ jsx210(
|
|
4669
4740
|
SelectionControl,
|
|
4670
4741
|
{
|
|
4671
4742
|
controlType: "checkbox",
|
|
4672
4743
|
className: focus_default["focus-styled-sibling"]
|
|
4673
4744
|
}
|
|
4674
4745
|
),
|
|
4675
|
-
hasChildren ? children : hasLabel ? /* @__PURE__ */
|
|
4746
|
+
hasChildren ? children : hasLabel ? /* @__PURE__ */ jsx210(Typography, { ...selectionControlTypographyProps, children: label }) : null
|
|
4676
4747
|
]
|
|
4677
4748
|
}
|
|
4678
4749
|
);
|
|
@@ -4701,7 +4772,7 @@ var InputMessage_default = {
|
|
|
4701
4772
|
};
|
|
4702
4773
|
|
|
4703
4774
|
// src/components/InputMessage/InputMessage.tsx
|
|
4704
|
-
import { Fragment as Fragment3, jsx as
|
|
4775
|
+
import { Fragment as Fragment3, jsx as jsx211, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4705
4776
|
var InputMessage = ({
|
|
4706
4777
|
message,
|
|
4707
4778
|
messageType,
|
|
@@ -4721,8 +4792,8 @@ var InputMessage = ({
|
|
|
4721
4792
|
rest
|
|
4722
4793
|
),
|
|
4723
4794
|
children: [
|
|
4724
|
-
isError && /* @__PURE__ */
|
|
4725
|
-
/* @__PURE__ */
|
|
4795
|
+
isError && /* @__PURE__ */ jsx211(Icon, { icon: ErrorIcon, iconSize: "small", className: InputMessage_default.icon }),
|
|
4796
|
+
/* @__PURE__ */ jsx211(
|
|
4726
4797
|
Typography,
|
|
4727
4798
|
{
|
|
4728
4799
|
typographyType: isError ? "bodySmall" : "bodyXsmall",
|
|
@@ -4737,7 +4808,7 @@ var InputMessage = ({
|
|
|
4737
4808
|
};
|
|
4738
4809
|
InputMessage.displayName = "InputMessage";
|
|
4739
4810
|
var renderInputMessage = (tip, tipId, errorMessage, errorMessageId) => /* @__PURE__ */ jsxs35(Fragment3, { children: [
|
|
4740
|
-
errorMessage && errorMessageId && /* @__PURE__ */
|
|
4811
|
+
errorMessage && errorMessageId && /* @__PURE__ */ jsx211(
|
|
4741
4812
|
InputMessage,
|
|
4742
4813
|
{
|
|
4743
4814
|
message: errorMessage,
|
|
@@ -4745,11 +4816,11 @@ var renderInputMessage = (tip, tipId, errorMessage, errorMessageId) => /* @__PUR
|
|
|
4745
4816
|
id: errorMessageId
|
|
4746
4817
|
}
|
|
4747
4818
|
),
|
|
4748
|
-
tip && tipId && !errorMessage && /* @__PURE__ */
|
|
4819
|
+
tip && tipId && !errorMessage && /* @__PURE__ */ jsx211(InputMessage, { message: tip, messageType: "tip", id: tipId })
|
|
4749
4820
|
] });
|
|
4750
4821
|
|
|
4751
4822
|
// src/components/SelectionControl/Checkbox/CheckboxGroup.tsx
|
|
4752
|
-
import { jsx as
|
|
4823
|
+
import { jsx as jsx212, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4753
4824
|
var CheckboxGroup = (props) => {
|
|
4754
4825
|
const {
|
|
4755
4826
|
label,
|
|
@@ -4791,7 +4862,7 @@ var CheckboxGroup = (props) => {
|
|
|
4791
4862
|
rest
|
|
4792
4863
|
),
|
|
4793
4864
|
children: [
|
|
4794
|
-
label !== void 0 ? /* @__PURE__ */
|
|
4865
|
+
label !== void 0 ? /* @__PURE__ */ jsx212(
|
|
4795
4866
|
GroupLabel,
|
|
4796
4867
|
{
|
|
4797
4868
|
id: uniqueGroupId,
|
|
@@ -4801,7 +4872,7 @@ var CheckboxGroup = (props) => {
|
|
|
4801
4872
|
}
|
|
4802
4873
|
) : null,
|
|
4803
4874
|
renderInputMessage(tip, tipId),
|
|
4804
|
-
/* @__PURE__ */
|
|
4875
|
+
/* @__PURE__ */ jsx212(CheckboxGroupContext, { value: { ...contextProps }, children: /* @__PURE__ */ jsx212(
|
|
4805
4876
|
"div",
|
|
4806
4877
|
{
|
|
4807
4878
|
role: "group",
|
|
@@ -4829,7 +4900,7 @@ var useRadioButtonGroup = () => {
|
|
|
4829
4900
|
};
|
|
4830
4901
|
|
|
4831
4902
|
// src/components/SelectionControl/RadioButton/RadioButton.tsx
|
|
4832
|
-
import { jsx as
|
|
4903
|
+
import { jsx as jsx213, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4833
4904
|
var getIsChecked = ({
|
|
4834
4905
|
value,
|
|
4835
4906
|
groupValue,
|
|
@@ -4894,7 +4965,7 @@ var RadioButton = ({
|
|
|
4894
4965
|
htmlFor: uniqueId,
|
|
4895
4966
|
controlType: "radio",
|
|
4896
4967
|
children: [
|
|
4897
|
-
/* @__PURE__ */
|
|
4968
|
+
/* @__PURE__ */ jsx213(
|
|
4898
4969
|
"input",
|
|
4899
4970
|
{
|
|
4900
4971
|
...getBaseHTMLProps(uniqueId, restHtmlProps, rest),
|
|
@@ -4920,14 +4991,14 @@ var RadioButton = ({
|
|
|
4920
4991
|
onClick: readOnlyClickHandler(isReadOnly, htmlProps.onClick)
|
|
4921
4992
|
}
|
|
4922
4993
|
),
|
|
4923
|
-
/* @__PURE__ */
|
|
4994
|
+
/* @__PURE__ */ jsx213(
|
|
4924
4995
|
SelectionControl,
|
|
4925
4996
|
{
|
|
4926
4997
|
controlType: "radio",
|
|
4927
4998
|
className: focus_default["focus-styled-sibling"]
|
|
4928
4999
|
}
|
|
4929
5000
|
),
|
|
4930
|
-
hasChildren ? children : hasLabel ? /* @__PURE__ */
|
|
5001
|
+
hasChildren ? children : hasLabel ? /* @__PURE__ */ jsx213(Typography, { ...selectionControlTypographyProps, children: label }) : null
|
|
4931
5002
|
]
|
|
4932
5003
|
}
|
|
4933
5004
|
);
|
|
@@ -4995,7 +5066,7 @@ function useControllableGroupState(props) {
|
|
|
4995
5066
|
}
|
|
4996
5067
|
|
|
4997
5068
|
// src/components/SelectionControl/RadioButton/RadioButtonGroup.tsx
|
|
4998
|
-
import { jsx as
|
|
5069
|
+
import { jsx as jsx214, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
4999
5070
|
var RadioButtonGroup = ({
|
|
5000
5071
|
name,
|
|
5001
5072
|
label,
|
|
@@ -5048,7 +5119,7 @@ var RadioButtonGroup = ({
|
|
|
5048
5119
|
rest
|
|
5049
5120
|
),
|
|
5050
5121
|
children: [
|
|
5051
|
-
label !== void 0 ? /* @__PURE__ */
|
|
5122
|
+
label !== void 0 ? /* @__PURE__ */ jsx214(
|
|
5052
5123
|
GroupLabel,
|
|
5053
5124
|
{
|
|
5054
5125
|
id: uniqueGroupId,
|
|
@@ -5058,7 +5129,7 @@ var RadioButtonGroup = ({
|
|
|
5058
5129
|
}
|
|
5059
5130
|
) : null,
|
|
5060
5131
|
renderInputMessage(tip, tipId),
|
|
5061
|
-
/* @__PURE__ */
|
|
5132
|
+
/* @__PURE__ */ jsx214(RadioButtonGroupContext, { value: { ...contextProps }, children: /* @__PURE__ */ jsx214(
|
|
5062
5133
|
"div",
|
|
5063
5134
|
{
|
|
5064
5135
|
role: "radiogroup",
|
|
@@ -5082,7 +5153,7 @@ var CardSelectableContext = createContext6({});
|
|
|
5082
5153
|
var useCardSelectableContext = () => useContext6(CardSelectableContext);
|
|
5083
5154
|
|
|
5084
5155
|
// src/components/Card/CardSelectionControl/CardSelectable.tsx
|
|
5085
|
-
import { jsx as
|
|
5156
|
+
import { jsx as jsx215 } from "react/jsx-runtime";
|
|
5086
5157
|
var CardSelectable = (props) => {
|
|
5087
5158
|
const {
|
|
5088
5159
|
appearance = "filled",
|
|
@@ -5152,13 +5223,13 @@ Provide \`cardType\` either via a parent <CardSelectableGroup> or directly on th
|
|
|
5152
5223
|
error,
|
|
5153
5224
|
"aria-describedby": spaceSeparatedIdListGenerator([tipId, ariaDescribedby])
|
|
5154
5225
|
};
|
|
5155
|
-
return cardType === "radio" ? /* @__PURE__ */
|
|
5226
|
+
return cardType === "radio" ? /* @__PURE__ */ jsx215(RadioButton, { ...sharedProps, ...radioContextProps }) : cardType === "checkbox" ? /* @__PURE__ */ jsx215(Checkbox, { ...sharedProps }) : null;
|
|
5156
5227
|
};
|
|
5157
5228
|
CardSelectable.displayName = "CardSelectable";
|
|
5158
5229
|
|
|
5159
5230
|
// src/components/Card/CardSelectionControl/CardSelectableGroup.tsx
|
|
5160
5231
|
import { useId as useId9 } from "react";
|
|
5161
|
-
import { jsx as
|
|
5232
|
+
import { jsx as jsx216, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
5162
5233
|
var CardSelectableGroup = ({
|
|
5163
5234
|
name,
|
|
5164
5235
|
cardType,
|
|
@@ -5202,7 +5273,7 @@ var CardSelectableGroup = ({
|
|
|
5202
5273
|
cardType,
|
|
5203
5274
|
tipId
|
|
5204
5275
|
};
|
|
5205
|
-
const mainContent = /* @__PURE__ */
|
|
5276
|
+
const mainContent = /* @__PURE__ */ jsx216(
|
|
5206
5277
|
Box,
|
|
5207
5278
|
{
|
|
5208
5279
|
...getBaseHTMLProps(
|
|
@@ -5214,7 +5285,7 @@ var CardSelectableGroup = ({
|
|
|
5214
5285
|
role: cardType === "radio" ? "radiogroup" : "group",
|
|
5215
5286
|
"aria-describedby": spaceSeparatedIdListGenerator([tipId, ariaDescribedby]),
|
|
5216
5287
|
"aria-errormessage": errorMessageId,
|
|
5217
|
-
children: /* @__PURE__ */
|
|
5288
|
+
children: /* @__PURE__ */ jsx216(CardSelectableContext, { value: generalContextProps, children: cardType === "radio" ? /* @__PURE__ */ jsx216(RadioButtonGroupContext, { value: contextProps, children }) : cardType === "checkbox" ? /* @__PURE__ */ jsx216(CheckboxGroupContext, { value: contextProps, children }) : null })
|
|
5218
5289
|
}
|
|
5219
5290
|
);
|
|
5220
5291
|
return hasErrorMessage ? /* @__PURE__ */ jsxs39("div", { children: [
|
|
@@ -5233,7 +5304,7 @@ var Chip_default = {
|
|
|
5233
5304
|
};
|
|
5234
5305
|
|
|
5235
5306
|
// src/components/Chip/Chip.tsx
|
|
5236
|
-
import { jsx as
|
|
5307
|
+
import { jsx as jsx217, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
5237
5308
|
var Chip = ({
|
|
5238
5309
|
text,
|
|
5239
5310
|
onClose,
|
|
@@ -5258,8 +5329,8 @@ var Chip = ({
|
|
|
5258
5329
|
rest
|
|
5259
5330
|
),
|
|
5260
5331
|
children: [
|
|
5261
|
-
/* @__PURE__ */
|
|
5262
|
-
/* @__PURE__ */
|
|
5332
|
+
/* @__PURE__ */ jsx217(TextOverflowEllipsisInner, { className: cn(typographyStyles_default["body-small"]), children: text }),
|
|
5333
|
+
/* @__PURE__ */ jsx217(
|
|
5263
5334
|
Button,
|
|
5264
5335
|
{
|
|
5265
5336
|
size: "xsmall",
|
|
@@ -5277,10 +5348,10 @@ Chip.displayName = "Chip";
|
|
|
5277
5348
|
|
|
5278
5349
|
// src/components/Chip/ChipGroup.tsx
|
|
5279
5350
|
import { Children as Children2 } from "react";
|
|
5280
|
-
import { jsx as
|
|
5351
|
+
import { jsx as jsx218 } from "react/jsx-runtime";
|
|
5281
5352
|
var ChipGroup = ({ children, ...rest }) => {
|
|
5282
5353
|
const childrenArray = Children2.toArray(children);
|
|
5283
|
-
return /* @__PURE__ */
|
|
5354
|
+
return /* @__PURE__ */ jsx218(HStack, { as: StylelessList, ...rest, gap: "x0.75", children: childrenArray.map((item, index) => /* @__PURE__ */ jsx218("li", { children: item }, `chip-${index}`)) });
|
|
5284
5355
|
};
|
|
5285
5356
|
ChipGroup.displayName = "ChipGroup";
|
|
5286
5357
|
|
|
@@ -5290,13 +5361,13 @@ var Contrast_default = {
|
|
|
5290
5361
|
};
|
|
5291
5362
|
|
|
5292
5363
|
// src/components/Contrast/Contrast.tsx
|
|
5293
|
-
import { jsx as
|
|
5364
|
+
import { jsx as jsx219 } from "react/jsx-runtime";
|
|
5294
5365
|
var Contrast = ({
|
|
5295
5366
|
className,
|
|
5296
5367
|
as = "div",
|
|
5297
5368
|
...rest
|
|
5298
5369
|
}) => {
|
|
5299
|
-
return /* @__PURE__ */
|
|
5370
|
+
return /* @__PURE__ */ jsx219(
|
|
5300
5371
|
ElementAs,
|
|
5301
5372
|
{
|
|
5302
5373
|
as,
|
|
@@ -5306,13 +5377,16 @@ var Contrast = ({
|
|
|
5306
5377
|
);
|
|
5307
5378
|
};
|
|
5308
5379
|
|
|
5380
|
+
// src/components/CookieBanner/CookieBanner.tsx
|
|
5381
|
+
import { useState as useState11 } from "react";
|
|
5382
|
+
|
|
5309
5383
|
// src/components/CookieBanner/CookieBanner.module.css
|
|
5310
5384
|
var CookieBanner_default = {
|
|
5311
5385
|
"checkbox-label": "CookieBanner_checkbox-label"
|
|
5312
5386
|
};
|
|
5313
5387
|
|
|
5314
5388
|
// src/components/CookieBanner/CookieBannerCheckbox.tsx
|
|
5315
|
-
import { jsx as
|
|
5389
|
+
import { jsx as jsx220, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
5316
5390
|
function CookieBannerCheckbox({
|
|
5317
5391
|
headerText,
|
|
5318
5392
|
description,
|
|
@@ -5321,7 +5395,7 @@ function CookieBannerCheckbox({
|
|
|
5321
5395
|
htmlProps,
|
|
5322
5396
|
...rest
|
|
5323
5397
|
}) {
|
|
5324
|
-
return /* @__PURE__ */
|
|
5398
|
+
return /* @__PURE__ */ jsx220(
|
|
5325
5399
|
Checkbox,
|
|
5326
5400
|
{
|
|
5327
5401
|
...getBaseHTMLProps(
|
|
@@ -5331,7 +5405,7 @@ function CookieBannerCheckbox({
|
|
|
5331
5405
|
rest
|
|
5332
5406
|
),
|
|
5333
5407
|
children: /* @__PURE__ */ jsxs41(VStack, { gap: "x0.5", children: [
|
|
5334
|
-
/* @__PURE__ */
|
|
5408
|
+
/* @__PURE__ */ jsx220(Typography, { as: "span", typographyType: "headingSmall", children: headerText }),
|
|
5335
5409
|
/* @__PURE__ */ jsxs41(Typography, { as: "span", children: [
|
|
5336
5410
|
" ",
|
|
5337
5411
|
description,
|
|
@@ -5344,7 +5418,8 @@ function CookieBannerCheckbox({
|
|
|
5344
5418
|
CookieBannerCheckbox.displayName = "CookieBannerCheckbox";
|
|
5345
5419
|
|
|
5346
5420
|
// src/components/CookieBanner/CookieBanner.tsx
|
|
5347
|
-
import { jsx as
|
|
5421
|
+
import { jsx as jsx221, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
5422
|
+
import { createElement } from "react";
|
|
5348
5423
|
function CookieBanner({
|
|
5349
5424
|
headerText,
|
|
5350
5425
|
description,
|
|
@@ -5357,9 +5432,13 @@ function CookieBanner({
|
|
|
5357
5432
|
maxHeight = "calc(100vh - 100px)",
|
|
5358
5433
|
width = "fit-content",
|
|
5359
5434
|
children,
|
|
5435
|
+
collapsedBreakpoint,
|
|
5360
5436
|
...rest
|
|
5361
5437
|
}) {
|
|
5362
|
-
|
|
5438
|
+
const hasBp = !!collapsedBreakpoint;
|
|
5439
|
+
const [isCollapsedOnBreakpoint, setIsCollapsedOnBreakpoint] = useState11(hasBp);
|
|
5440
|
+
const heading = headerText ? /* @__PURE__ */ jsx221(Heading, { level: 2, typographyType: "headingMedium", children: headerText }) : "";
|
|
5441
|
+
return /* @__PURE__ */ jsx221(
|
|
5363
5442
|
Paper,
|
|
5364
5443
|
{
|
|
5365
5444
|
...getBaseHTMLProps(
|
|
@@ -5376,17 +5455,40 @@ function CookieBanner({
|
|
|
5376
5455
|
border: "border-default",
|
|
5377
5456
|
background: "brand-tertiary-medium",
|
|
5378
5457
|
children: /* @__PURE__ */ jsxs42(VStack, { maxWidth: "70ch", gap: "x1", children: [
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5458
|
+
hasBp && isCollapsedOnBreakpoint ? /* @__PURE__ */ jsxs42(HStack, { alignItems: "center", justifyContent: "space-between", gap: "x1", children: [
|
|
5459
|
+
heading,
|
|
5460
|
+
/* @__PURE__ */ jsx221(
|
|
5461
|
+
ShowHide,
|
|
5462
|
+
{
|
|
5463
|
+
as: Button,
|
|
5464
|
+
showBelow: collapsedBreakpoint,
|
|
5465
|
+
"aria-label": "Utvid samtykke for bruk av informasjonskapsler",
|
|
5466
|
+
purpose: "tertiary",
|
|
5467
|
+
icon: ExpandIcon,
|
|
5468
|
+
onClick: () => setIsCollapsedOnBreakpoint(false),
|
|
5469
|
+
"aria-expanded": "false"
|
|
5470
|
+
}
|
|
5471
|
+
)
|
|
5472
|
+
] }) : heading,
|
|
5473
|
+
/* @__PURE__ */ jsxs42(
|
|
5474
|
+
VStack,
|
|
5385
5475
|
{
|
|
5386
|
-
gap:
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5476
|
+
gap: "x1",
|
|
5477
|
+
hideBelow: isCollapsedOnBreakpoint ? collapsedBreakpoint : void 0,
|
|
5478
|
+
children: [
|
|
5479
|
+
children,
|
|
5480
|
+
description && /* @__PURE__ */ jsx221("div", { children: description }),
|
|
5481
|
+
checkboxes && /* @__PURE__ */ jsx221(VStack, { gap: "x1", children: checkboxes.map((props, index) => /* @__PURE__ */ createElement(CookieBannerCheckbox, { ...props, key: index })) }),
|
|
5482
|
+
buttons && /* @__PURE__ */ jsx221(
|
|
5483
|
+
HStack,
|
|
5484
|
+
{
|
|
5485
|
+
gap: applyResponsiveStyle("x1", "sm", "x1.5"),
|
|
5486
|
+
flexWrap: "wrap",
|
|
5487
|
+
paddingBlock: "x0.25 0",
|
|
5488
|
+
children: buttons.map((props) => /* @__PURE__ */ jsx221(Button, { ...props, size: "medium", purpose: "secondary" }))
|
|
5489
|
+
}
|
|
5490
|
+
)
|
|
5491
|
+
]
|
|
5390
5492
|
}
|
|
5391
5493
|
)
|
|
5392
5494
|
] })
|
|
@@ -5459,7 +5561,7 @@ var locale = "no-NO";
|
|
|
5459
5561
|
var timezone = "Europe/Oslo";
|
|
5460
5562
|
|
|
5461
5563
|
// src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
|
|
5462
|
-
import { jsx as
|
|
5564
|
+
import { jsx as jsx222 } from "react/jsx-runtime";
|
|
5463
5565
|
function CalendarCell({ date, state, onClose }) {
|
|
5464
5566
|
const ref = useRef10(null);
|
|
5465
5567
|
const {
|
|
@@ -5472,7 +5574,7 @@ function CalendarCell({ date, state, onClose }) {
|
|
|
5472
5574
|
isUnavailable
|
|
5473
5575
|
} = useCalendarCell({ date }, state, ref);
|
|
5474
5576
|
if (isDisabled) {
|
|
5475
|
-
return /* @__PURE__ */
|
|
5577
|
+
return /* @__PURE__ */ jsx222("td", { ...cellProps });
|
|
5476
5578
|
}
|
|
5477
5579
|
const variant = isSelected ? "selected" : isUnavailable || isDisabled ? "unavailable" : "default";
|
|
5478
5580
|
const closeOnKeyboardBlurForward = (event) => {
|
|
@@ -5480,7 +5582,7 @@ function CalendarCell({ date, state, onClose }) {
|
|
|
5480
5582
|
onClose();
|
|
5481
5583
|
}
|
|
5482
5584
|
};
|
|
5483
|
-
return /* @__PURE__ */
|
|
5585
|
+
return /* @__PURE__ */ jsx222("td", { ...cellProps, children: /* @__PURE__ */ jsx222(
|
|
5484
5586
|
"button",
|
|
5485
5587
|
{
|
|
5486
5588
|
...buttonProps,
|
|
@@ -5503,14 +5605,27 @@ function CalendarCell({ date, state, onClose }) {
|
|
|
5503
5605
|
CalendarCell.displayName = "CalendarCell";
|
|
5504
5606
|
|
|
5505
5607
|
// src/components/VisuallyHidden/VisuallyHidden.tsx
|
|
5506
|
-
import { jsx as
|
|
5507
|
-
var VisuallyHidden = (
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5608
|
+
import { jsx as jsx223 } from "react/jsx-runtime";
|
|
5609
|
+
var VisuallyHidden = ({
|
|
5610
|
+
id,
|
|
5611
|
+
as: asProp,
|
|
5612
|
+
className,
|
|
5613
|
+
htmlProps,
|
|
5614
|
+
...rest
|
|
5615
|
+
}) => {
|
|
5616
|
+
const as = asProp != null ? asProp : "span";
|
|
5617
|
+
return /* @__PURE__ */ jsx223(
|
|
5618
|
+
ElementAs,
|
|
5619
|
+
{
|
|
5620
|
+
as,
|
|
5621
|
+
...getBaseHTMLProps(
|
|
5622
|
+
id,
|
|
5623
|
+
cn(className, utilStyles_default["visually-hidden"]),
|
|
5624
|
+
htmlProps,
|
|
5625
|
+
rest
|
|
5626
|
+
)
|
|
5627
|
+
}
|
|
5628
|
+
);
|
|
5514
5629
|
};
|
|
5515
5630
|
VisuallyHidden.displayName = "VisuallyHidden";
|
|
5516
5631
|
|
|
@@ -5569,7 +5684,7 @@ import {
|
|
|
5569
5684
|
useContext as useContext7,
|
|
5570
5685
|
useEffect as useEffect17,
|
|
5571
5686
|
useRef as useRef11,
|
|
5572
|
-
useState as
|
|
5687
|
+
useState as useState12
|
|
5573
5688
|
} from "react";
|
|
5574
5689
|
|
|
5575
5690
|
// src/components/ThemeProvider/ThemeProvider.module.css
|
|
@@ -5579,7 +5694,7 @@ var ThemeProvider_default = {
|
|
|
5579
5694
|
};
|
|
5580
5695
|
|
|
5581
5696
|
// src/components/ThemeProvider/ThemeProvider.tsx
|
|
5582
|
-
import { jsx as
|
|
5697
|
+
import { jsx as jsx224 } from "react/jsx-runtime";
|
|
5583
5698
|
var defaultTheme = "core";
|
|
5584
5699
|
var ThemeContext = createContext7(
|
|
5585
5700
|
void 0
|
|
@@ -5589,11 +5704,11 @@ function ThemeProvider({
|
|
|
5589
5704
|
children
|
|
5590
5705
|
}) {
|
|
5591
5706
|
const themeRef = useRef11(null);
|
|
5592
|
-
const [element, setElement] =
|
|
5707
|
+
const [element, setElement] = useState12(null);
|
|
5593
5708
|
useEffect17(() => {
|
|
5594
5709
|
setElement(themeRef.current);
|
|
5595
5710
|
}, []);
|
|
5596
|
-
return /* @__PURE__ */
|
|
5711
|
+
return /* @__PURE__ */ jsx224(
|
|
5597
5712
|
"div",
|
|
5598
5713
|
{
|
|
5599
5714
|
ref: themeRef,
|
|
@@ -5603,7 +5718,7 @@ function ThemeProvider({
|
|
|
5603
5718
|
ThemeProvider_default["global-styles"],
|
|
5604
5719
|
"dds-themed"
|
|
5605
5720
|
),
|
|
5606
|
-
children: /* @__PURE__ */
|
|
5721
|
+
children: /* @__PURE__ */ jsx224(ThemeContext, { value: { theme, el: element }, children })
|
|
5607
5722
|
}
|
|
5608
5723
|
);
|
|
5609
5724
|
}
|
|
@@ -5618,7 +5733,7 @@ function useTheme() {
|
|
|
5618
5733
|
}
|
|
5619
5734
|
|
|
5620
5735
|
// src/components/date-inputs/DatePicker/CalendarPopover.tsx
|
|
5621
|
-
import { Fragment as Fragment4, jsx as
|
|
5736
|
+
import { Fragment as Fragment4, jsx as jsx225, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
5622
5737
|
var CalendarPopoverContext = createContext8({
|
|
5623
5738
|
anchorRef: null,
|
|
5624
5739
|
closeButtonRef: null,
|
|
@@ -5634,7 +5749,7 @@ var CalendarPopover = ({
|
|
|
5634
5749
|
const anchorRef = useRef12(null);
|
|
5635
5750
|
const closeButtonRef = useRef12(null);
|
|
5636
5751
|
useOnKeyDown("Escape", onClose);
|
|
5637
|
-
return /* @__PURE__ */
|
|
5752
|
+
return /* @__PURE__ */ jsx225(
|
|
5638
5753
|
CalendarPopoverContext,
|
|
5639
5754
|
{
|
|
5640
5755
|
value: { anchorRef, closeButtonRef, onClose, ...props },
|
|
@@ -5646,7 +5761,7 @@ var CalendarPopoverAnchor = ({
|
|
|
5646
5761
|
children
|
|
5647
5762
|
}) => {
|
|
5648
5763
|
const { anchorRef } = useContext8(CalendarPopoverContext);
|
|
5649
|
-
return /* @__PURE__ */
|
|
5764
|
+
return /* @__PURE__ */ jsx225("div", { ref: anchorRef != null ? anchorRef : void 0, children });
|
|
5650
5765
|
};
|
|
5651
5766
|
var CalendarPopoverContent = ({
|
|
5652
5767
|
children,
|
|
@@ -5699,14 +5814,14 @@ var CalendarPopoverContent = ({
|
|
|
5699
5814
|
};
|
|
5700
5815
|
return /* @__PURE__ */ jsxs43(Fragment4, { children: [
|
|
5701
5816
|
portalTarget && hasBreakpoint && createPortal(
|
|
5702
|
-
/* @__PURE__ */
|
|
5817
|
+
/* @__PURE__ */ jsx225(ShowHide, { showBelow: smallScreenBreakpoint, children: /* @__PURE__ */ jsx225(Backdrop, { zIndex: "modal", isMounted, children: /* @__PURE__ */ jsxs43(
|
|
5703
5818
|
Paper,
|
|
5704
5819
|
{
|
|
5705
5820
|
ref: modalRef,
|
|
5706
5821
|
className: cn(DateInput_default.popover, className),
|
|
5707
5822
|
...paperStyleProps,
|
|
5708
5823
|
children: [
|
|
5709
|
-
/* @__PURE__ */
|
|
5824
|
+
/* @__PURE__ */ jsx225("div", { className: DateInput_default["modal-close-button-wrapper"], children: /* @__PURE__ */ jsx225(
|
|
5710
5825
|
Button,
|
|
5711
5826
|
{
|
|
5712
5827
|
ref: closeButtonRef,
|
|
@@ -5724,7 +5839,7 @@ var CalendarPopoverContent = ({
|
|
|
5724
5839
|
) }) }),
|
|
5725
5840
|
portalTarget
|
|
5726
5841
|
),
|
|
5727
|
-
/* @__PURE__ */
|
|
5842
|
+
/* @__PURE__ */ jsx225(
|
|
5728
5843
|
Paper,
|
|
5729
5844
|
{
|
|
5730
5845
|
ref: combinedRef,
|
|
@@ -5739,7 +5854,7 @@ var CalendarPopoverContent = ({
|
|
|
5739
5854
|
};
|
|
5740
5855
|
|
|
5741
5856
|
// src/components/date-inputs/DatePicker/Calendar/CalendarGrid.tsx
|
|
5742
|
-
import { jsx as
|
|
5857
|
+
import { jsx as jsx226, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
5743
5858
|
function CalendarGrid({ state, ...props }) {
|
|
5744
5859
|
const { locale: locale2 } = useLocale();
|
|
5745
5860
|
const {
|
|
@@ -5765,25 +5880,25 @@ function CalendarGrid({ state, ...props }) {
|
|
|
5765
5880
|
},
|
|
5766
5881
|
cellPadding: "0",
|
|
5767
5882
|
children: [
|
|
5768
|
-
/* @__PURE__ */
|
|
5883
|
+
/* @__PURE__ */ jsx226("thead", { ...headerProps, children: /* @__PURE__ */ jsxs44("tr", { children: [
|
|
5769
5884
|
showWeekNumbers && /* @__PURE__ */ jsxs44(
|
|
5770
5885
|
"th",
|
|
5771
5886
|
{
|
|
5772
5887
|
className: cn(DateInput_default["calendar__grid-element"], ...typographyCn),
|
|
5773
5888
|
children: [
|
|
5774
5889
|
"# ",
|
|
5775
|
-
/* @__PURE__ */
|
|
5890
|
+
/* @__PURE__ */ jsx226(VisuallyHidden, { children: "Ukenummer" })
|
|
5776
5891
|
]
|
|
5777
5892
|
}
|
|
5778
5893
|
),
|
|
5779
|
-
weekDays.map((day, index) => /* @__PURE__ */
|
|
5894
|
+
weekDays.map((day, index) => /* @__PURE__ */ jsx226("th", { className: cn(...typographyCn), children: day }, index))
|
|
5780
5895
|
] }) }),
|
|
5781
|
-
/* @__PURE__ */
|
|
5896
|
+
/* @__PURE__ */ jsx226("tbody", { children: [...new Array(weeksInMonth).keys()].map((weekIndex) => {
|
|
5782
5897
|
const datesInWeek = state.getDatesInWeek(weekIndex);
|
|
5783
5898
|
const firstExistingDay = datesInWeek.find(Boolean);
|
|
5784
5899
|
const weekNumber = firstExistingDay ? getWeekNumber(firstExistingDay) : "";
|
|
5785
5900
|
return /* @__PURE__ */ jsxs44("tr", { children: [
|
|
5786
|
-
showWeekNumbers && /* @__PURE__ */
|
|
5901
|
+
showWeekNumbers && /* @__PURE__ */ jsx226(
|
|
5787
5902
|
"td",
|
|
5788
5903
|
{
|
|
5789
5904
|
className: cn(
|
|
@@ -5795,7 +5910,7 @@ function CalendarGrid({ state, ...props }) {
|
|
|
5795
5910
|
}
|
|
5796
5911
|
),
|
|
5797
5912
|
datesInWeek.map(
|
|
5798
|
-
(date, i) => date ? /* @__PURE__ */
|
|
5913
|
+
(date, i) => date ? /* @__PURE__ */ jsx226(
|
|
5799
5914
|
CalendarCell,
|
|
5800
5915
|
{
|
|
5801
5916
|
state,
|
|
@@ -5803,7 +5918,7 @@ function CalendarGrid({ state, ...props }) {
|
|
|
5803
5918
|
onClose
|
|
5804
5919
|
},
|
|
5805
5920
|
i
|
|
5806
|
-
) : /* @__PURE__ */
|
|
5921
|
+
) : /* @__PURE__ */ jsx226("td", {}, i)
|
|
5807
5922
|
)
|
|
5808
5923
|
] }, weekIndex);
|
|
5809
5924
|
}) })
|
|
@@ -5814,7 +5929,7 @@ function CalendarGrid({ state, ...props }) {
|
|
|
5814
5929
|
CalendarGrid.displayName = "CalendarGrid";
|
|
5815
5930
|
|
|
5816
5931
|
// src/components/date-inputs/DatePicker/Calendar/Calendar.tsx
|
|
5817
|
-
import { jsx as
|
|
5932
|
+
import { jsx as jsx227, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
5818
5933
|
function createCalendar(identifier) {
|
|
5819
5934
|
switch (identifier) {
|
|
5820
5935
|
case "gregory":
|
|
@@ -5847,7 +5962,7 @@ function Calendar(props) {
|
|
|
5847
5962
|
};
|
|
5848
5963
|
return /* @__PURE__ */ jsxs45("div", { ...calendarProps, className: DateInput_default.calendar, children: [
|
|
5849
5964
|
/* @__PURE__ */ jsxs45(HStack, { justifyContent: "space-between", alignItems: "center", children: [
|
|
5850
|
-
/* @__PURE__ */
|
|
5965
|
+
/* @__PURE__ */ jsx227(
|
|
5851
5966
|
Button,
|
|
5852
5967
|
{
|
|
5853
5968
|
type: "button",
|
|
@@ -5860,7 +5975,7 @@ function Calendar(props) {
|
|
|
5860
5975
|
className: DateInput_default["calendar__month-button"]
|
|
5861
5976
|
}
|
|
5862
5977
|
),
|
|
5863
|
-
/* @__PURE__ */
|
|
5978
|
+
/* @__PURE__ */ jsx227(
|
|
5864
5979
|
Heading,
|
|
5865
5980
|
{
|
|
5866
5981
|
level: 2,
|
|
@@ -5869,7 +5984,7 @@ function Calendar(props) {
|
|
|
5869
5984
|
children: title
|
|
5870
5985
|
}
|
|
5871
5986
|
),
|
|
5872
|
-
/* @__PURE__ */
|
|
5987
|
+
/* @__PURE__ */ jsx227(
|
|
5873
5988
|
Button,
|
|
5874
5989
|
{
|
|
5875
5990
|
type: "button",
|
|
@@ -5882,7 +5997,7 @@ function Calendar(props) {
|
|
|
5882
5997
|
}
|
|
5883
5998
|
)
|
|
5884
5999
|
] }),
|
|
5885
|
-
/* @__PURE__ */
|
|
6000
|
+
/* @__PURE__ */ jsx227(CalendarGrid, { state })
|
|
5886
6001
|
] });
|
|
5887
6002
|
}
|
|
5888
6003
|
Calendar.displayName = "Calendar";
|
|
@@ -5907,7 +6022,7 @@ import { useRef as useRef15 } from "react";
|
|
|
5907
6022
|
// src/components/date-inputs/DatePicker/DateField/CalendarButton.tsx
|
|
5908
6023
|
import { useButton } from "@react-aria/button";
|
|
5909
6024
|
import { useRef as useRef13 } from "react";
|
|
5910
|
-
import { jsx as
|
|
6025
|
+
import { jsx as jsx228 } from "react/jsx-runtime";
|
|
5911
6026
|
function CalendarButton({
|
|
5912
6027
|
componentSize,
|
|
5913
6028
|
isReadOnly,
|
|
@@ -5916,7 +6031,7 @@ function CalendarButton({
|
|
|
5916
6031
|
const ref = useRef13(null);
|
|
5917
6032
|
const { buttonProps } = useButton(props, ref);
|
|
5918
6033
|
const size2 = componentSize === "xsmall" ? "small" : "medium";
|
|
5919
|
-
return /* @__PURE__ */
|
|
6034
|
+
return /* @__PURE__ */ jsx228(
|
|
5920
6035
|
"button",
|
|
5921
6036
|
{
|
|
5922
6037
|
...buttonProps,
|
|
@@ -5931,7 +6046,7 @@ function CalendarButton({
|
|
|
5931
6046
|
!props.isDisabled && focusable,
|
|
5932
6047
|
props.isDisabled && "disabled"
|
|
5933
6048
|
),
|
|
5934
|
-
children: /* @__PURE__ */
|
|
6049
|
+
children: /* @__PURE__ */ jsx228(Icon, { icon: CalendarIcon, iconSize: size2 })
|
|
5935
6050
|
}
|
|
5936
6051
|
);
|
|
5937
6052
|
}
|
|
@@ -5939,7 +6054,7 @@ function CalendarButton({
|
|
|
5939
6054
|
// src/components/date-inputs/DatePicker/DateField/DateSegment.tsx
|
|
5940
6055
|
import { useDateSegment } from "@react-aria/datepicker";
|
|
5941
6056
|
import { useRef as useRef14 } from "react";
|
|
5942
|
-
import { jsx as
|
|
6057
|
+
import { jsx as jsx229, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
5943
6058
|
var typographyTypes = {
|
|
5944
6059
|
medium: "bodyMedium",
|
|
5945
6060
|
small: "bodySmall",
|
|
@@ -5968,7 +6083,7 @@ function DateSegment({
|
|
|
5968
6083
|
minWidth: segment.maxValue != null ? String(segment.maxValue).length + "ch" : void 0
|
|
5969
6084
|
},
|
|
5970
6085
|
children: [
|
|
5971
|
-
/* @__PURE__ */
|
|
6086
|
+
/* @__PURE__ */ jsx229(
|
|
5972
6087
|
"span",
|
|
5973
6088
|
{
|
|
5974
6089
|
"aria-hidden": "true",
|
|
@@ -5989,7 +6104,7 @@ DateSegment.displayName = "DateSegment";
|
|
|
5989
6104
|
|
|
5990
6105
|
// src/components/date-inputs/common/DateInput.tsx
|
|
5991
6106
|
import { useContext as useContext11 } from "react";
|
|
5992
|
-
import { jsx as
|
|
6107
|
+
import { jsx as jsx230, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
5993
6108
|
function DateInput({
|
|
5994
6109
|
errorMessage,
|
|
5995
6110
|
tip,
|
|
@@ -6023,7 +6138,7 @@ function DateInput({
|
|
|
6023
6138
|
className: cn(className, Input_default.container),
|
|
6024
6139
|
ref,
|
|
6025
6140
|
children: [
|
|
6026
|
-
hasLabel && /* @__PURE__ */
|
|
6141
|
+
hasLabel && /* @__PURE__ */ jsx230(
|
|
6027
6142
|
Label,
|
|
6028
6143
|
{
|
|
6029
6144
|
...labelProps,
|
|
@@ -6058,11 +6173,11 @@ function DateInput({
|
|
|
6058
6173
|
),
|
|
6059
6174
|
children: [
|
|
6060
6175
|
button,
|
|
6061
|
-
/* @__PURE__ */
|
|
6176
|
+
/* @__PURE__ */ jsx230("div", { className: DateInput_default["date-segment-container"], children })
|
|
6062
6177
|
]
|
|
6063
6178
|
}
|
|
6064
6179
|
),
|
|
6065
|
-
hasMessage && /* @__PURE__ */
|
|
6180
|
+
hasMessage && /* @__PURE__ */ jsx230(
|
|
6066
6181
|
InputMessage,
|
|
6067
6182
|
{
|
|
6068
6183
|
messageType: hasErrorMessage ? "error" : "tip",
|
|
@@ -6076,7 +6191,7 @@ function DateInput({
|
|
|
6076
6191
|
DateInput.displayName = "DateInput";
|
|
6077
6192
|
|
|
6078
6193
|
// src/components/date-inputs/DatePicker/DateField/DateField.tsx
|
|
6079
|
-
import { jsx as
|
|
6194
|
+
import { jsx as jsx231 } from "react/jsx-runtime";
|
|
6080
6195
|
function DateField({
|
|
6081
6196
|
componentSize = "medium",
|
|
6082
6197
|
buttonProps,
|
|
@@ -6093,7 +6208,7 @@ function DateField({
|
|
|
6093
6208
|
const internalRef = useRef15(null);
|
|
6094
6209
|
const { labelProps, fieldProps } = useDateField(props, state, internalRef);
|
|
6095
6210
|
const disabled = props.isDisabled || !!fieldProps["aria-disabled"];
|
|
6096
|
-
return /* @__PURE__ */
|
|
6211
|
+
return /* @__PURE__ */ jsx231(
|
|
6097
6212
|
DateInput,
|
|
6098
6213
|
{
|
|
6099
6214
|
...props,
|
|
@@ -6105,7 +6220,7 @@ function DateField({
|
|
|
6105
6220
|
ref,
|
|
6106
6221
|
internalRef,
|
|
6107
6222
|
readOnly: props.isReadOnly,
|
|
6108
|
-
prefix: /* @__PURE__ */
|
|
6223
|
+
prefix: /* @__PURE__ */ jsx231(
|
|
6109
6224
|
CalendarButton,
|
|
6110
6225
|
{
|
|
6111
6226
|
componentSize,
|
|
@@ -6116,7 +6231,7 @@ function DateField({
|
|
|
6116
6231
|
),
|
|
6117
6232
|
labelProps,
|
|
6118
6233
|
fieldProps,
|
|
6119
|
-
children: state.segments.map((segment, i) => /* @__PURE__ */
|
|
6234
|
+
children: state.segments.map((segment, i) => /* @__PURE__ */ jsx231(
|
|
6120
6235
|
DateSegment,
|
|
6121
6236
|
{
|
|
6122
6237
|
"aria-readonly": props.isReadOnly,
|
|
@@ -6153,7 +6268,7 @@ function createDOMRef(ref) {
|
|
|
6153
6268
|
}
|
|
6154
6269
|
|
|
6155
6270
|
// src/components/date-inputs/DatePicker/DatePicker.tsx
|
|
6156
|
-
import { jsx as
|
|
6271
|
+
import { jsx as jsx232, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
6157
6272
|
var refIsFocusable = (ref) => {
|
|
6158
6273
|
return typeof ref === "object" && ref !== null && "focus" in ref;
|
|
6159
6274
|
};
|
|
@@ -6177,14 +6292,14 @@ function DatePicker({
|
|
|
6177
6292
|
state,
|
|
6178
6293
|
internalRef
|
|
6179
6294
|
);
|
|
6180
|
-
return /* @__PURE__ */
|
|
6295
|
+
return /* @__PURE__ */ jsx232(I18nProvider, { locale, children: /* @__PURE__ */ jsxs48(
|
|
6181
6296
|
CalendarPopover,
|
|
6182
6297
|
{
|
|
6183
6298
|
isOpen: state.isOpen,
|
|
6184
6299
|
onClose: state.close,
|
|
6185
6300
|
showWeekNumbers,
|
|
6186
6301
|
children: [
|
|
6187
|
-
/* @__PURE__ */
|
|
6302
|
+
/* @__PURE__ */ jsx232(CalendarPopoverAnchor, { children: /* @__PURE__ */ jsx232(
|
|
6188
6303
|
DateField,
|
|
6189
6304
|
{
|
|
6190
6305
|
...fieldProps,
|
|
@@ -6199,7 +6314,7 @@ function DatePicker({
|
|
|
6199
6314
|
width
|
|
6200
6315
|
}
|
|
6201
6316
|
) }),
|
|
6202
|
-
/* @__PURE__ */
|
|
6317
|
+
/* @__PURE__ */ jsx232(CalendarPopoverContent, { smallScreenBreakpoint, children: /* @__PURE__ */ jsx232(Calendar, { ...calendarProps }) })
|
|
6203
6318
|
]
|
|
6204
6319
|
}
|
|
6205
6320
|
) });
|
|
@@ -6210,7 +6325,7 @@ DatePicker.displayName = "DatePicker";
|
|
|
6210
6325
|
import { useTimeField } from "@react-aria/datepicker";
|
|
6211
6326
|
import { useTimeFieldState } from "@react-stately/datepicker";
|
|
6212
6327
|
import { useRef as useRef18 } from "react";
|
|
6213
|
-
import { jsx as
|
|
6328
|
+
import { jsx as jsx233 } from "react/jsx-runtime";
|
|
6214
6329
|
function TimePicker({
|
|
6215
6330
|
componentSize = "medium",
|
|
6216
6331
|
width,
|
|
@@ -6229,7 +6344,7 @@ function TimePicker({
|
|
|
6229
6344
|
);
|
|
6230
6345
|
const iconSize = componentSize === "xsmall" ? "small" : "medium";
|
|
6231
6346
|
const disabled = props.isDisabled || !!fieldProps["aria-disabled"];
|
|
6232
|
-
return /* @__PURE__ */
|
|
6347
|
+
return /* @__PURE__ */ jsx233(
|
|
6233
6348
|
DateInput,
|
|
6234
6349
|
{
|
|
6235
6350
|
...props,
|
|
@@ -6242,7 +6357,7 @@ function TimePicker({
|
|
|
6242
6357
|
readOnly: props.isReadOnly,
|
|
6243
6358
|
labelProps,
|
|
6244
6359
|
fieldProps,
|
|
6245
|
-
prefix: /* @__PURE__ */
|
|
6360
|
+
prefix: /* @__PURE__ */ jsx233(
|
|
6246
6361
|
"span",
|
|
6247
6362
|
{
|
|
6248
6363
|
className: cn(
|
|
@@ -6251,10 +6366,10 @@ function TimePicker({
|
|
|
6251
6366
|
props.isReadOnly && DateInput_default["icon-wrapper--readonly"],
|
|
6252
6367
|
DateInput_default[`icon-wrapper--${iconSize}`]
|
|
6253
6368
|
),
|
|
6254
|
-
children: /* @__PURE__ */
|
|
6369
|
+
children: /* @__PURE__ */ jsx233(Icon, { icon: TimeIcon, iconSize })
|
|
6255
6370
|
}
|
|
6256
6371
|
),
|
|
6257
|
-
children: state.segments.map((segment, i) => /* @__PURE__ */
|
|
6372
|
+
children: state.segments.map((segment, i) => /* @__PURE__ */ jsx233(
|
|
6258
6373
|
DateSegment,
|
|
6259
6374
|
{
|
|
6260
6375
|
componentSize,
|
|
@@ -6313,7 +6428,7 @@ var DescriptionList_default = {
|
|
|
6313
6428
|
};
|
|
6314
6429
|
|
|
6315
6430
|
// src/components/DescriptionList/DescriptionList.tsx
|
|
6316
|
-
import { jsx as
|
|
6431
|
+
import { jsx as jsx234 } from "react/jsx-runtime";
|
|
6317
6432
|
var DescriptionList = ({
|
|
6318
6433
|
appearance = "default",
|
|
6319
6434
|
direction = "column",
|
|
@@ -6322,7 +6437,7 @@ var DescriptionList = ({
|
|
|
6322
6437
|
className,
|
|
6323
6438
|
htmlProps,
|
|
6324
6439
|
...rest
|
|
6325
|
-
}) => /* @__PURE__ */
|
|
6440
|
+
}) => /* @__PURE__ */ jsx234(
|
|
6326
6441
|
VStack,
|
|
6327
6442
|
{
|
|
6328
6443
|
as: "dl",
|
|
@@ -6347,14 +6462,14 @@ var DescriptionList = ({
|
|
|
6347
6462
|
DescriptionList.displayName = "DescriptionList";
|
|
6348
6463
|
|
|
6349
6464
|
// src/components/DescriptionList/DescriptionListTerm.tsx
|
|
6350
|
-
import { jsx as
|
|
6465
|
+
import { jsx as jsx235 } from "react/jsx-runtime";
|
|
6351
6466
|
var DescriptionListTerm = (props) => {
|
|
6352
|
-
return /* @__PURE__ */
|
|
6467
|
+
return /* @__PURE__ */ jsx235("dt", { ...props });
|
|
6353
6468
|
};
|
|
6354
6469
|
DescriptionListTerm.displayName = "DescriptionListTerm";
|
|
6355
6470
|
|
|
6356
6471
|
// src/components/DescriptionList/DescriptionListDesc.tsx
|
|
6357
|
-
import { jsx as
|
|
6472
|
+
import { jsx as jsx236, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
6358
6473
|
var DescriptionListDesc = ({
|
|
6359
6474
|
children,
|
|
6360
6475
|
icon,
|
|
@@ -6363,14 +6478,14 @@ var DescriptionListDesc = ({
|
|
|
6363
6478
|
htmlProps,
|
|
6364
6479
|
...rest
|
|
6365
6480
|
}) => /* @__PURE__ */ jsxs49("dd", { ...getBaseHTMLProps(id, cn(className, DescriptionList_default.desc), htmlProps, rest), children: [
|
|
6366
|
-
icon && /* @__PURE__ */
|
|
6481
|
+
icon && /* @__PURE__ */ jsx236(Icon, { icon }),
|
|
6367
6482
|
" ",
|
|
6368
6483
|
children
|
|
6369
6484
|
] });
|
|
6370
6485
|
DescriptionListDesc.displayName = "DescriptionListDesc";
|
|
6371
6486
|
|
|
6372
6487
|
// src/components/DescriptionList/DescriptionListGroup.tsx
|
|
6373
|
-
import { jsx as
|
|
6488
|
+
import { jsx as jsx237 } from "react/jsx-runtime";
|
|
6374
6489
|
var DescriptionListGroup = ({
|
|
6375
6490
|
children,
|
|
6376
6491
|
margin,
|
|
@@ -6380,7 +6495,7 @@ var DescriptionListGroup = ({
|
|
|
6380
6495
|
className,
|
|
6381
6496
|
htmlProps,
|
|
6382
6497
|
...rest
|
|
6383
|
-
}) => /* @__PURE__ */
|
|
6498
|
+
}) => /* @__PURE__ */ jsx237(
|
|
6384
6499
|
"div",
|
|
6385
6500
|
{
|
|
6386
6501
|
...getBaseHTMLProps(id, cn(className, DescriptionList_default.group), htmlProps, rest),
|
|
@@ -6411,7 +6526,7 @@ var DetailListContext = createContext9({});
|
|
|
6411
6526
|
var useDetailListContext = () => useContext12(DetailListContext);
|
|
6412
6527
|
|
|
6413
6528
|
// src/components/DetailList/DetailList.tsx
|
|
6414
|
-
import { jsx as
|
|
6529
|
+
import { jsx as jsx238 } from "react/jsx-runtime";
|
|
6415
6530
|
var DetailList = ({
|
|
6416
6531
|
id,
|
|
6417
6532
|
className,
|
|
@@ -6421,7 +6536,7 @@ var DetailList = ({
|
|
|
6421
6536
|
size: size2 = "medium",
|
|
6422
6537
|
smallScreenBreakpoint,
|
|
6423
6538
|
...rest
|
|
6424
|
-
}) => /* @__PURE__ */
|
|
6539
|
+
}) => /* @__PURE__ */ jsx238(DetailListContext, { value: { smallScreenBreakpoint }, children: /* @__PURE__ */ jsx238(
|
|
6425
6540
|
"dl",
|
|
6426
6541
|
{
|
|
6427
6542
|
...getBaseHTMLProps(
|
|
@@ -6442,17 +6557,17 @@ var DetailList = ({
|
|
|
6442
6557
|
DetailList.displayName = "DetailList";
|
|
6443
6558
|
|
|
6444
6559
|
// src/components/DetailList/DetailListDesc.tsx
|
|
6445
|
-
import { jsx as
|
|
6446
|
-
var DetailListDesc = ({ className, ...rest }) => /* @__PURE__ */
|
|
6560
|
+
import { jsx as jsx239 } from "react/jsx-runtime";
|
|
6561
|
+
var DetailListDesc = ({ className, ...rest }) => /* @__PURE__ */ jsx239("dd", { className: cn(className, DetailList_default.cell), ...rest });
|
|
6447
6562
|
DetailListDesc.displayName = "DetailListDesc";
|
|
6448
6563
|
|
|
6449
6564
|
// src/components/DetailList/DetailListRow.tsx
|
|
6450
|
-
import { Fragment as Fragment5, jsx as
|
|
6565
|
+
import { Fragment as Fragment5, jsx as jsx240, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
6451
6566
|
var DetailListRow = ({ className, ...rest }) => {
|
|
6452
6567
|
const { smallScreenBreakpoint: bp } = useDetailListContext();
|
|
6453
6568
|
const hasBp = !!bp;
|
|
6454
6569
|
return /* @__PURE__ */ jsxs50(Fragment5, { children: [
|
|
6455
|
-
/* @__PURE__ */
|
|
6570
|
+
/* @__PURE__ */ jsx240(
|
|
6456
6571
|
Box,
|
|
6457
6572
|
{
|
|
6458
6573
|
display: "table-row",
|
|
@@ -6461,7 +6576,7 @@ var DetailListRow = ({ className, ...rest }) => {
|
|
|
6461
6576
|
...rest
|
|
6462
6577
|
}
|
|
6463
6578
|
),
|
|
6464
|
-
hasBp && /* @__PURE__ */
|
|
6579
|
+
hasBp && /* @__PURE__ */ jsx240(
|
|
6465
6580
|
Box,
|
|
6466
6581
|
{
|
|
6467
6582
|
display: "flex",
|
|
@@ -6476,8 +6591,8 @@ var DetailListRow = ({ className, ...rest }) => {
|
|
|
6476
6591
|
DetailListRow.displayName = "DetailListRow";
|
|
6477
6592
|
|
|
6478
6593
|
// src/components/DetailList/DetailListTerm.tsx
|
|
6479
|
-
import { jsx as
|
|
6480
|
-
var DetailListTerm = ({ className, ...rest }) => /* @__PURE__ */
|
|
6594
|
+
import { jsx as jsx241 } from "react/jsx-runtime";
|
|
6595
|
+
var DetailListTerm = ({ className, ...rest }) => /* @__PURE__ */ jsx241("dt", { className: cn(className, DetailList_default.cell, DetailList_default.term), ...rest });
|
|
6481
6596
|
DetailListTerm.displayName = "DetailListTerm";
|
|
6482
6597
|
|
|
6483
6598
|
// src/components/Drawer/Drawer.tsx
|
|
@@ -6508,7 +6623,7 @@ var DrawerContext = createContext10({});
|
|
|
6508
6623
|
var useDrawerContext = () => useContext13(DrawerContext);
|
|
6509
6624
|
|
|
6510
6625
|
// src/components/Drawer/Drawer.tsx
|
|
6511
|
-
import { jsx as
|
|
6626
|
+
import { jsx as jsx242, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
6512
6627
|
var Drawer = ({
|
|
6513
6628
|
children,
|
|
6514
6629
|
header,
|
|
@@ -6611,8 +6726,8 @@ var Drawer = ({
|
|
|
6611
6726
|
paddingInline: "var(--dds-drawer-content-container-padding)",
|
|
6612
6727
|
className: Drawer_default["drawer-header"],
|
|
6613
6728
|
children: [
|
|
6614
|
-
hasHeader && /* @__PURE__ */
|
|
6615
|
-
/* @__PURE__ */
|
|
6729
|
+
hasHeader && /* @__PURE__ */ jsx242("div", { id: headerId, children: typeof header === "string" ? /* @__PURE__ */ jsx242(Heading, { level: 2, typographyType: "headingLarge", children: header }) : header }),
|
|
6730
|
+
/* @__PURE__ */ jsx242(
|
|
6616
6731
|
Button,
|
|
6617
6732
|
{
|
|
6618
6733
|
className: cn(Drawer_default["button--close"]),
|
|
@@ -6627,7 +6742,7 @@ var Drawer = ({
|
|
|
6627
6742
|
]
|
|
6628
6743
|
}
|
|
6629
6744
|
),
|
|
6630
|
-
/* @__PURE__ */
|
|
6745
|
+
/* @__PURE__ */ jsx242(
|
|
6631
6746
|
VStack,
|
|
6632
6747
|
{
|
|
6633
6748
|
gap: "x1",
|
|
@@ -6639,7 +6754,7 @@ var Drawer = ({
|
|
|
6639
6754
|
]
|
|
6640
6755
|
}
|
|
6641
6756
|
);
|
|
6642
|
-
const component = withBackdrop ? /* @__PURE__ */
|
|
6757
|
+
const component = withBackdrop ? /* @__PURE__ */ jsx242(
|
|
6643
6758
|
Backdrop,
|
|
6644
6759
|
{
|
|
6645
6760
|
zIndex: "drawer",
|
|
@@ -6660,9 +6775,9 @@ import {
|
|
|
6660
6775
|
isValidElement as isValidElement3,
|
|
6661
6776
|
useId as useId10,
|
|
6662
6777
|
useRef as useRef20,
|
|
6663
|
-
useState as
|
|
6778
|
+
useState as useState13
|
|
6664
6779
|
} from "react";
|
|
6665
|
-
import { jsx as
|
|
6780
|
+
import { jsx as jsx243 } from "react/jsx-runtime";
|
|
6666
6781
|
var DrawerGroup = ({
|
|
6667
6782
|
children,
|
|
6668
6783
|
isInitiallyOpen,
|
|
@@ -6672,7 +6787,7 @@ var DrawerGroup = ({
|
|
|
6672
6787
|
onOpen,
|
|
6673
6788
|
onClose
|
|
6674
6789
|
}) => {
|
|
6675
|
-
const [internalIsOpen, internalSetIsOpen] =
|
|
6790
|
+
const [internalIsOpen, internalSetIsOpen] = useState13(isInitiallyOpen);
|
|
6676
6791
|
const [isOpen, setIsOpen] = [
|
|
6677
6792
|
propIsOpen != null ? propIsOpen : internalIsOpen,
|
|
6678
6793
|
propSetIsOpen != null ? propSetIsOpen : internalSetIsOpen
|
|
@@ -6706,7 +6821,7 @@ var DrawerGroup = ({
|
|
|
6706
6821
|
onClick: handleOpen
|
|
6707
6822
|
}) : child);
|
|
6708
6823
|
});
|
|
6709
|
-
return /* @__PURE__ */
|
|
6824
|
+
return /* @__PURE__ */ jsx243(
|
|
6710
6825
|
DrawerContext,
|
|
6711
6826
|
{
|
|
6712
6827
|
value: {
|
|
@@ -6727,14 +6842,14 @@ var EmptyContent_default = {
|
|
|
6727
6842
|
};
|
|
6728
6843
|
|
|
6729
6844
|
// src/components/EmptyContent/EmptyContent.tsx
|
|
6730
|
-
import { jsx as
|
|
6845
|
+
import { jsx as jsx244, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
6731
6846
|
function EmptyContent({
|
|
6732
6847
|
headerText,
|
|
6733
6848
|
message,
|
|
6734
6849
|
headerHeadingLevel = 2,
|
|
6735
6850
|
...rest
|
|
6736
6851
|
}) {
|
|
6737
|
-
return /* @__PURE__ */
|
|
6852
|
+
return /* @__PURE__ */ jsx244(
|
|
6738
6853
|
Paper,
|
|
6739
6854
|
{
|
|
6740
6855
|
display: "flex",
|
|
@@ -6748,8 +6863,8 @@ function EmptyContent({
|
|
|
6748
6863
|
borderRadius: "0",
|
|
6749
6864
|
...rest,
|
|
6750
6865
|
children: /* @__PURE__ */ jsxs52(VStack, { maxWidth: "70ch", gap: "x1", textAlign: "center", children: [
|
|
6751
|
-
headerText && /* @__PURE__ */
|
|
6752
|
-
/* @__PURE__ */
|
|
6866
|
+
headerText && /* @__PURE__ */ jsx244(Heading, { level: headerHeadingLevel, typographyType: "headingMedium", children: headerText }),
|
|
6867
|
+
/* @__PURE__ */ jsx244(Paragraph, { className: EmptyContent_default.message, children: message })
|
|
6753
6868
|
] })
|
|
6754
6869
|
}
|
|
6755
6870
|
);
|
|
@@ -6769,7 +6884,7 @@ var FavStar_default = {
|
|
|
6769
6884
|
};
|
|
6770
6885
|
|
|
6771
6886
|
// src/components/FavStar/FavStar.tsx
|
|
6772
|
-
import { jsx as
|
|
6887
|
+
import { jsx as jsx245, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
6773
6888
|
var FavStar = ({
|
|
6774
6889
|
id,
|
|
6775
6890
|
className,
|
|
@@ -6805,7 +6920,7 @@ var FavStar = ({
|
|
|
6805
6920
|
style,
|
|
6806
6921
|
htmlFor: id != null ? id : generatedId,
|
|
6807
6922
|
children: [
|
|
6808
|
-
/* @__PURE__ */
|
|
6923
|
+
/* @__PURE__ */ jsx245(
|
|
6809
6924
|
"input",
|
|
6810
6925
|
{
|
|
6811
6926
|
...props,
|
|
@@ -6817,8 +6932,8 @@ var FavStar = ({
|
|
|
6817
6932
|
className: utilStyles_default["hide-input"]
|
|
6818
6933
|
}
|
|
6819
6934
|
),
|
|
6820
|
-
/* @__PURE__ */
|
|
6821
|
-
/* @__PURE__ */
|
|
6935
|
+
/* @__PURE__ */ jsx245(Icon, { iconSize: size2, icon: StarIcon, className: FavStar_default.icon }),
|
|
6936
|
+
/* @__PURE__ */ jsx245(
|
|
6822
6937
|
Icon,
|
|
6823
6938
|
{
|
|
6824
6939
|
iconSize: size2,
|
|
@@ -6833,7 +6948,7 @@ var FavStar = ({
|
|
|
6833
6948
|
FavStar.displayName = "FavStar";
|
|
6834
6949
|
|
|
6835
6950
|
// src/components/Feedback/Feedback.tsx
|
|
6836
|
-
import { useEffect as useEffect22, useState as
|
|
6951
|
+
import { useEffect as useEffect22, useState as useState16 } from "react";
|
|
6837
6952
|
|
|
6838
6953
|
// src/components/Feedback/Feedback.module.css
|
|
6839
6954
|
var Feedback_default = {
|
|
@@ -6851,7 +6966,7 @@ import {
|
|
|
6851
6966
|
useEffect as useEffect20,
|
|
6852
6967
|
useId as useId12,
|
|
6853
6968
|
useRef as useRef21,
|
|
6854
|
-
useState as
|
|
6969
|
+
useState as useState14
|
|
6855
6970
|
} from "react";
|
|
6856
6971
|
|
|
6857
6972
|
// src/components/TextArea/TextArea.module.css
|
|
@@ -6860,7 +6975,7 @@ var TextArea_default = {
|
|
|
6860
6975
|
};
|
|
6861
6976
|
|
|
6862
6977
|
// src/components/TextArea/TextArea.tsx
|
|
6863
|
-
import { jsx as
|
|
6978
|
+
import { jsx as jsx246, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
6864
6979
|
var TextArea = ({
|
|
6865
6980
|
id,
|
|
6866
6981
|
value,
|
|
@@ -6885,7 +7000,7 @@ var TextArea = ({
|
|
|
6885
7000
|
const uniqueId = id != null ? id : `${generatedId}-textArea`;
|
|
6886
7001
|
const textAreaRef = useRef21(null);
|
|
6887
7002
|
const multiRef = useCombinedRef(ref, textAreaRef);
|
|
6888
|
-
const [text, setText] =
|
|
7003
|
+
const [text, setText] = useState14(getDefaultText(value, defaultValue));
|
|
6889
7004
|
useEffect20(() => {
|
|
6890
7005
|
if (textAreaRef == null ? void 0 : textAreaRef.current) {
|
|
6891
7006
|
textAreaRef.current.style.height = `${textAreaRef.current.scrollHeight + 2}px`;
|
|
@@ -6909,7 +7024,7 @@ var TextArea = ({
|
|
|
6909
7024
|
const showRequiredStyling = required || !!ariaRequired;
|
|
6910
7025
|
const inputWidth = getInputWidth(width);
|
|
6911
7026
|
return /* @__PURE__ */ jsxs54("div", { className: cn(className, Input_default.container), style: { ...style }, children: [
|
|
6912
|
-
hasLabel && /* @__PURE__ */
|
|
7027
|
+
hasLabel && /* @__PURE__ */ jsx246(
|
|
6913
7028
|
Label,
|
|
6914
7029
|
{
|
|
6915
7030
|
showRequiredStyling,
|
|
@@ -6919,7 +7034,7 @@ var TextArea = ({
|
|
|
6919
7034
|
children: label
|
|
6920
7035
|
}
|
|
6921
7036
|
),
|
|
6922
|
-
/* @__PURE__ */
|
|
7037
|
+
/* @__PURE__ */ jsx246(
|
|
6923
7038
|
Box,
|
|
6924
7039
|
{
|
|
6925
7040
|
as: "textarea",
|
|
@@ -6974,16 +7089,16 @@ var TextArea = ({
|
|
|
6974
7089
|
TextArea.displayName = "TextArea";
|
|
6975
7090
|
|
|
6976
7091
|
// src/components/Feedback/utils.tsx
|
|
6977
|
-
import { jsx as
|
|
7092
|
+
import { jsx as jsx247 } from "react/jsx-runtime";
|
|
6978
7093
|
var getIconSize = (layout) => layout === "vertical" ? "large" : "medium";
|
|
6979
|
-
var ThumbIcon = ({ rating, layout, type }) => type === "comment" ? /* @__PURE__ */
|
|
7094
|
+
var ThumbIcon = ({ rating, layout, type }) => type === "comment" ? /* @__PURE__ */ jsx247(
|
|
6980
7095
|
Icon,
|
|
6981
7096
|
{
|
|
6982
7097
|
icon: rating === "positive" ? ThumbUpFilledIcon : ThumbDownFilledIcon,
|
|
6983
7098
|
color: "iconActionResting",
|
|
6984
7099
|
iconSize: getIconSize(layout)
|
|
6985
7100
|
}
|
|
6986
|
-
) : /* @__PURE__ */
|
|
7101
|
+
) : /* @__PURE__ */ jsx247(
|
|
6987
7102
|
Icon,
|
|
6988
7103
|
{
|
|
6989
7104
|
icon: rating === "positive" ? ThumbUpIcon : ThumbDownIcon,
|
|
@@ -6993,7 +7108,7 @@ var ThumbIcon = ({ rating, layout, type }) => type === "comment" ? /* @__PURE__
|
|
|
6993
7108
|
);
|
|
6994
7109
|
|
|
6995
7110
|
// src/components/Feedback/CommentComponent.tsx
|
|
6996
|
-
import { jsx as
|
|
7111
|
+
import { jsx as jsx248, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
6997
7112
|
var CommentComponent = ({
|
|
6998
7113
|
layout,
|
|
6999
7114
|
rating,
|
|
@@ -7014,7 +7129,7 @@ var CommentComponent = ({
|
|
|
7014
7129
|
" "
|
|
7015
7130
|
] })
|
|
7016
7131
|
] }),
|
|
7017
|
-
/* @__PURE__ */
|
|
7132
|
+
/* @__PURE__ */ jsx248(
|
|
7018
7133
|
TextArea,
|
|
7019
7134
|
{
|
|
7020
7135
|
value: feedbackText,
|
|
@@ -7023,7 +7138,7 @@ var CommentComponent = ({
|
|
|
7023
7138
|
tip: textAreaTip
|
|
7024
7139
|
}
|
|
7025
7140
|
),
|
|
7026
|
-
/* @__PURE__ */
|
|
7141
|
+
/* @__PURE__ */ jsx248(
|
|
7027
7142
|
Button,
|
|
7028
7143
|
{
|
|
7029
7144
|
purpose: "secondary",
|
|
@@ -7043,7 +7158,7 @@ import {
|
|
|
7043
7158
|
useEffect as useEffect21,
|
|
7044
7159
|
useId as useId13,
|
|
7045
7160
|
useRef as useRef22,
|
|
7046
|
-
useState as
|
|
7161
|
+
useState as useState15
|
|
7047
7162
|
} from "react";
|
|
7048
7163
|
|
|
7049
7164
|
// src/components/Tooltip/Tooltip.module.css
|
|
@@ -7055,7 +7170,7 @@ var Tooltip_default = {
|
|
|
7055
7170
|
};
|
|
7056
7171
|
|
|
7057
7172
|
// src/components/Tooltip/Tooltip.tsx
|
|
7058
|
-
import { jsx as
|
|
7173
|
+
import { jsx as jsx249, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
7059
7174
|
var Tooltip = ({
|
|
7060
7175
|
text,
|
|
7061
7176
|
placement = "bottom",
|
|
@@ -7073,9 +7188,9 @@ var Tooltip = ({
|
|
|
7073
7188
|
}) => {
|
|
7074
7189
|
const generatedId = useId13();
|
|
7075
7190
|
const uniqueTooltipId = tooltipId != null ? tooltipId : `${generatedId}-tooltip`;
|
|
7076
|
-
const [open, setOpen] =
|
|
7077
|
-
const [inView, setInView] =
|
|
7078
|
-
const [arrowElement, setArrowElement] =
|
|
7191
|
+
const [open, setOpen] = useState15(false);
|
|
7192
|
+
const [inView, setInView] = useState15(false);
|
|
7193
|
+
const [arrowElement, setArrowElement] = useState15(null);
|
|
7079
7194
|
const { refs, styles: positionStyles } = useFloatPosition(arrowElement, {
|
|
7080
7195
|
placement
|
|
7081
7196
|
});
|
|
@@ -7169,15 +7284,15 @@ var Tooltip = ({
|
|
|
7169
7284
|
),
|
|
7170
7285
|
children: [
|
|
7171
7286
|
text,
|
|
7172
|
-
/* @__PURE__ */
|
|
7173
|
-
/* @__PURE__ */
|
|
7287
|
+
/* @__PURE__ */ jsx249("div", { ref: setArrowElement, style: positionStyles.arrow, children: /* @__PURE__ */ jsxs56("svg", { width: "36", height: "9", children: [
|
|
7288
|
+
/* @__PURE__ */ jsx249(
|
|
7174
7289
|
"path",
|
|
7175
7290
|
{
|
|
7176
7291
|
d: "M16.586 6.586L10 0h16.154a.373.373 0 00-.263.11l-6.477 6.476a2 2 0 01-2.828 0z",
|
|
7177
7292
|
className: Tooltip_default["svg-arrow__background"]
|
|
7178
7293
|
}
|
|
7179
7294
|
),
|
|
7180
|
-
/* @__PURE__ */
|
|
7295
|
+
/* @__PURE__ */ jsx249(
|
|
7181
7296
|
"path",
|
|
7182
7297
|
{
|
|
7183
7298
|
fillRule: "evenodd",
|
|
@@ -7197,7 +7312,7 @@ var Tooltip = ({
|
|
|
7197
7312
|
Tooltip.displayName = "Tooltip";
|
|
7198
7313
|
|
|
7199
7314
|
// src/components/Feedback/RatingComponent.tsx
|
|
7200
|
-
import { jsx as
|
|
7315
|
+
import { jsx as jsx250, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
7201
7316
|
var RatingComponent = ({
|
|
7202
7317
|
layout,
|
|
7203
7318
|
ratingLabel,
|
|
@@ -7206,17 +7321,12 @@ var RatingComponent = ({
|
|
|
7206
7321
|
thumbDownTooltip,
|
|
7207
7322
|
handleRatingChange
|
|
7208
7323
|
}) => {
|
|
7209
|
-
const button = (rating, layout2, tooltip) => /* @__PURE__ */
|
|
7210
|
-
|
|
7324
|
+
const button = (rating, layout2, tooltip) => /* @__PURE__ */ jsx250(
|
|
7325
|
+
StylelessButton,
|
|
7211
7326
|
{
|
|
7212
7327
|
"aria-label": tooltip,
|
|
7213
7328
|
onClick: () => handleRatingChange(rating),
|
|
7214
|
-
className: cn(
|
|
7215
|
-
utilStyles_default["remove-button-styling"],
|
|
7216
|
-
Feedback_default.button,
|
|
7217
|
-
Feedback_default[`button--${layout2}`],
|
|
7218
|
-
focusable
|
|
7219
|
-
),
|
|
7329
|
+
className: cn(Feedback_default.button, Feedback_default[`button--${layout2}`], focusable),
|
|
7220
7330
|
children: ThumbIcon({ rating, layout: layout2, type: "rating" })
|
|
7221
7331
|
}
|
|
7222
7332
|
);
|
|
@@ -7228,10 +7338,10 @@ var RatingComponent = ({
|
|
|
7228
7338
|
Feedback_default[`rating-container--${layout}`]
|
|
7229
7339
|
),
|
|
7230
7340
|
children: [
|
|
7231
|
-
/* @__PURE__ */
|
|
7232
|
-
loading ? /* @__PURE__ */
|
|
7233
|
-
/* @__PURE__ */
|
|
7234
|
-
/* @__PURE__ */
|
|
7341
|
+
/* @__PURE__ */ jsx250("h2", { className: typographyStyles_default["label-medium"], children: ratingLabel }),
|
|
7342
|
+
loading ? /* @__PURE__ */ jsx250(Spinner, { tooltip: "Laster opp tilbakemelding ..." }) : /* @__PURE__ */ jsxs57(HStack, { gap: "x1", children: [
|
|
7343
|
+
/* @__PURE__ */ jsx250(Tooltip, { text: thumbUpTooltip, children: button("positive", layout, thumbUpTooltip) }),
|
|
7344
|
+
/* @__PURE__ */ jsx250(Tooltip, { text: thumbDownTooltip, children: /* @__PURE__ */ jsx250("div", { children: button("negative", layout, thumbDownTooltip) }) })
|
|
7235
7345
|
] })
|
|
7236
7346
|
]
|
|
7237
7347
|
}
|
|
@@ -7239,7 +7349,7 @@ var RatingComponent = ({
|
|
|
7239
7349
|
};
|
|
7240
7350
|
|
|
7241
7351
|
// src/components/Feedback/Feedback.tsx
|
|
7242
|
-
import { jsx as
|
|
7352
|
+
import { jsx as jsx251 } from "react/jsx-runtime";
|
|
7243
7353
|
var Feedback = ({
|
|
7244
7354
|
layout = "vertical",
|
|
7245
7355
|
ratingLabel = "Hva syns du om tjenesten?",
|
|
@@ -7259,9 +7369,9 @@ var Feedback = ({
|
|
|
7259
7369
|
onFeedbackTextChange,
|
|
7260
7370
|
onSubmit
|
|
7261
7371
|
}) => {
|
|
7262
|
-
const [rating, setRating] =
|
|
7263
|
-
const [feedbackText, setFeedbackText] =
|
|
7264
|
-
const [isFeedbackSubmitted, setIsFeedbackSubmitted] =
|
|
7372
|
+
const [rating, setRating] = useState16(null);
|
|
7373
|
+
const [feedbackText, setFeedbackText] = useState16();
|
|
7374
|
+
const [isFeedbackSubmitted, setIsFeedbackSubmitted] = useState16(false);
|
|
7265
7375
|
useEffect22(() => {
|
|
7266
7376
|
ratingProp !== void 0 && setRating(ratingProp);
|
|
7267
7377
|
}, [ratingProp]);
|
|
@@ -7285,7 +7395,7 @@ var Feedback = ({
|
|
|
7285
7395
|
isSubmittedProp === void 0 && setIsFeedbackSubmitted(true);
|
|
7286
7396
|
};
|
|
7287
7397
|
if (rating === null && !isFeedbackSubmitted) {
|
|
7288
|
-
return /* @__PURE__ */
|
|
7398
|
+
return /* @__PURE__ */ jsx251(
|
|
7289
7399
|
RatingComponent,
|
|
7290
7400
|
{
|
|
7291
7401
|
layout,
|
|
@@ -7298,7 +7408,7 @@ var Feedback = ({
|
|
|
7298
7408
|
);
|
|
7299
7409
|
}
|
|
7300
7410
|
if (!feedbackTextAreaExcluded && !isFeedbackSubmitted) {
|
|
7301
|
-
return /* @__PURE__ */
|
|
7411
|
+
return /* @__PURE__ */ jsx251(
|
|
7302
7412
|
CommentComponent,
|
|
7303
7413
|
{
|
|
7304
7414
|
layout,
|
|
@@ -7314,20 +7424,20 @@ var Feedback = ({
|
|
|
7314
7424
|
}
|
|
7315
7425
|
);
|
|
7316
7426
|
}
|
|
7317
|
-
return /* @__PURE__ */
|
|
7427
|
+
return /* @__PURE__ */ jsx251(Paragraph, { children: submittedTitle });
|
|
7318
7428
|
};
|
|
7319
7429
|
|
|
7320
7430
|
// src/components/Fieldset/Fieldset.module.css
|
|
7321
7431
|
var container = "Fieldset_container";
|
|
7322
7432
|
|
|
7323
7433
|
// src/components/Fieldset/Fieldset.tsx
|
|
7324
|
-
import { jsx as
|
|
7434
|
+
import { jsx as jsx252 } from "react/jsx-runtime";
|
|
7325
7435
|
var Fieldset = ({
|
|
7326
7436
|
id,
|
|
7327
7437
|
className,
|
|
7328
7438
|
htmlProps,
|
|
7329
7439
|
...rest
|
|
7330
|
-
}) => /* @__PURE__ */
|
|
7440
|
+
}) => /* @__PURE__ */ jsx252(
|
|
7331
7441
|
"fieldset",
|
|
7332
7442
|
{
|
|
7333
7443
|
...getBaseHTMLProps(id, cn(className, container), htmlProps, rest)
|
|
@@ -7336,27 +7446,27 @@ var Fieldset = ({
|
|
|
7336
7446
|
Fieldset.displayName = "Fieldset";
|
|
7337
7447
|
|
|
7338
7448
|
// src/components/Fieldset/FieldsetGroup.tsx
|
|
7339
|
-
import { jsx as
|
|
7449
|
+
import { jsx as jsx253 } from "react/jsx-runtime";
|
|
7340
7450
|
var FieldsetGroup = ({
|
|
7341
7451
|
id,
|
|
7342
7452
|
className,
|
|
7343
7453
|
htmlProps,
|
|
7344
7454
|
...rest
|
|
7345
|
-
}) => /* @__PURE__ */
|
|
7455
|
+
}) => /* @__PURE__ */ jsx253(VStack, { gap: "x1.5", ...getBaseHTMLProps(id, className, htmlProps, rest) });
|
|
7346
7456
|
FieldsetGroup.displayName = "FieldsetGroup";
|
|
7347
7457
|
|
|
7348
7458
|
// src/components/FileUploader/FileUploader.tsx
|
|
7349
7459
|
import { useId as useId14 } from "react";
|
|
7350
7460
|
|
|
7351
7461
|
// src/components/FileUploader/ErrorList.tsx
|
|
7352
|
-
import { jsx as
|
|
7462
|
+
import { jsx as jsx254 } from "react/jsx-runtime";
|
|
7353
7463
|
var ErrorList = (props) => {
|
|
7354
7464
|
const { errors } = props;
|
|
7355
7465
|
if (errors.length < 1) {
|
|
7356
7466
|
return null;
|
|
7357
7467
|
}
|
|
7358
7468
|
if (errors.length === 1) {
|
|
7359
|
-
return /* @__PURE__ */
|
|
7469
|
+
return /* @__PURE__ */ jsx254(
|
|
7360
7470
|
InputMessage,
|
|
7361
7471
|
{
|
|
7362
7472
|
id: errors[0].id,
|
|
@@ -7365,8 +7475,8 @@ var ErrorList = (props) => {
|
|
|
7365
7475
|
}
|
|
7366
7476
|
);
|
|
7367
7477
|
}
|
|
7368
|
-
return /* @__PURE__ */
|
|
7369
|
-
return /* @__PURE__ */
|
|
7478
|
+
return /* @__PURE__ */ jsx254(StylelessList, { children: errors.map(({ id, message }) => {
|
|
7479
|
+
return /* @__PURE__ */ jsx254("li", { children: /* @__PURE__ */ jsx254(
|
|
7370
7480
|
InputMessage,
|
|
7371
7481
|
{
|
|
7372
7482
|
id,
|
|
@@ -7391,7 +7501,7 @@ var FileUploader_default = {
|
|
|
7391
7501
|
};
|
|
7392
7502
|
|
|
7393
7503
|
// src/components/FileUploader/File.tsx
|
|
7394
|
-
import { jsx as
|
|
7504
|
+
import { jsx as jsx255, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
7395
7505
|
var File = (props) => {
|
|
7396
7506
|
const { parentId, index, file: stateFile, removeFile, isValid } = props;
|
|
7397
7507
|
const errorsList = stateFile.errors.map((e, errorIndex) => ({
|
|
@@ -7412,21 +7522,21 @@ var File = (props) => {
|
|
|
7412
7522
|
background: "surface-subtle",
|
|
7413
7523
|
className: cn(!isValid && FileUploader_default["file--invalid"]),
|
|
7414
7524
|
children: [
|
|
7415
|
-
/* @__PURE__ */
|
|
7525
|
+
/* @__PURE__ */ jsx255(
|
|
7416
7526
|
"span",
|
|
7417
7527
|
{
|
|
7418
7528
|
className: cn(FileUploader_default.file__name, typographyStyles_default["body-medium"]),
|
|
7419
7529
|
children: stateFile.file.name
|
|
7420
7530
|
}
|
|
7421
7531
|
),
|
|
7422
|
-
/* @__PURE__ */
|
|
7532
|
+
/* @__PURE__ */ jsx255(
|
|
7423
7533
|
Icon,
|
|
7424
7534
|
{
|
|
7425
7535
|
icon: isValid ? CheckCircledIcon : ErrorIcon,
|
|
7426
7536
|
className: FileUploader_default[`file__icon--${isValid ? "valid" : "invalid"}`]
|
|
7427
7537
|
}
|
|
7428
7538
|
),
|
|
7429
|
-
/* @__PURE__ */
|
|
7539
|
+
/* @__PURE__ */ jsx255(
|
|
7430
7540
|
Button,
|
|
7431
7541
|
{
|
|
7432
7542
|
size: "small",
|
|
@@ -7447,7 +7557,7 @@ var File = (props) => {
|
|
|
7447
7557
|
]
|
|
7448
7558
|
}
|
|
7449
7559
|
),
|
|
7450
|
-
/* @__PURE__ */
|
|
7560
|
+
/* @__PURE__ */ jsx255(ErrorList, { errors: errorsList })
|
|
7451
7561
|
] });
|
|
7452
7562
|
};
|
|
7453
7563
|
|
|
@@ -7739,7 +7849,7 @@ var useFileUploader = (props) => {
|
|
|
7739
7849
|
};
|
|
7740
7850
|
|
|
7741
7851
|
// src/components/FileUploader/FileUploader.tsx
|
|
7742
|
-
import { jsx as
|
|
7852
|
+
import { jsx as jsx256, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
7743
7853
|
var FileUploader = (props) => {
|
|
7744
7854
|
const {
|
|
7745
7855
|
id,
|
|
@@ -7787,7 +7897,7 @@ var FileUploader = (props) => {
|
|
|
7787
7897
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
7788
7898
|
const buttonId = derivativeIdGenerator(uniqueId, "button");
|
|
7789
7899
|
const inputId = derivativeIdGenerator(uniqueId, "input");
|
|
7790
|
-
const fileListElements = stateFiles.map((stateFile, index) => /* @__PURE__ */
|
|
7900
|
+
const fileListElements = stateFiles.map((stateFile, index) => /* @__PURE__ */ jsx256(
|
|
7791
7901
|
File,
|
|
7792
7902
|
{
|
|
7793
7903
|
parentId: uniqueId,
|
|
@@ -7802,7 +7912,7 @@ var FileUploader = (props) => {
|
|
|
7802
7912
|
id: derivativeIdGenerator(uniqueId, `error-${index}`),
|
|
7803
7913
|
message: e
|
|
7804
7914
|
}));
|
|
7805
|
-
const button = /* @__PURE__ */
|
|
7915
|
+
const button = /* @__PURE__ */ jsx256(
|
|
7806
7916
|
Button,
|
|
7807
7917
|
{
|
|
7808
7918
|
...getButtonProps(),
|
|
@@ -7830,7 +7940,7 @@ var FileUploader = (props) => {
|
|
|
7830
7940
|
width,
|
|
7831
7941
|
...rest,
|
|
7832
7942
|
children: [
|
|
7833
|
-
hasLabel && /* @__PURE__ */
|
|
7943
|
+
hasLabel && /* @__PURE__ */ jsx256(
|
|
7834
7944
|
Label,
|
|
7835
7945
|
{
|
|
7836
7946
|
id: labelId,
|
|
@@ -7839,7 +7949,7 @@ var FileUploader = (props) => {
|
|
|
7839
7949
|
children: label
|
|
7840
7950
|
}
|
|
7841
7951
|
),
|
|
7842
|
-
hasTip && /* @__PURE__ */
|
|
7952
|
+
hasTip && /* @__PURE__ */ jsx256(InputMessage, { id: tipId, message: tip, messageType: "tip" }),
|
|
7843
7953
|
withDragAndDrop ? /* @__PURE__ */ jsxs59(
|
|
7844
7954
|
VStack,
|
|
7845
7955
|
{
|
|
@@ -7852,7 +7962,7 @@ var FileUploader = (props) => {
|
|
|
7852
7962
|
isDragActive && FileUploader_default["input-container--drag-active"]
|
|
7853
7963
|
),
|
|
7854
7964
|
children: [
|
|
7855
|
-
/* @__PURE__ */
|
|
7965
|
+
/* @__PURE__ */ jsx256(
|
|
7856
7966
|
"input",
|
|
7857
7967
|
{
|
|
7858
7968
|
...getInputProps(),
|
|
@@ -7861,16 +7971,16 @@ var FileUploader = (props) => {
|
|
|
7861
7971
|
}
|
|
7862
7972
|
),
|
|
7863
7973
|
dropAreaLabel,
|
|
7864
|
-
/* @__PURE__ */
|
|
7974
|
+
/* @__PURE__ */ jsx256(VisuallyHidden, { children: "velg fil med p\xE5f\xF8lgende knapp" }),
|
|
7865
7975
|
button
|
|
7866
7976
|
]
|
|
7867
7977
|
}
|
|
7868
7978
|
) : /* @__PURE__ */ jsxs59("div", { className: FileUploader_default["input-container--no-drag-zone"], children: [
|
|
7869
|
-
/* @__PURE__ */
|
|
7979
|
+
/* @__PURE__ */ jsx256("input", { ...getInputProps(), id: inputId }),
|
|
7870
7980
|
button
|
|
7871
7981
|
] }),
|
|
7872
|
-
/* @__PURE__ */
|
|
7873
|
-
!hideFileList && /* @__PURE__ */
|
|
7982
|
+
/* @__PURE__ */ jsx256(ErrorList, { errors: rootErrorsList }),
|
|
7983
|
+
!hideFileList && /* @__PURE__ */ jsx256(StylelessList, { children: fileListElements })
|
|
7874
7984
|
]
|
|
7875
7985
|
}
|
|
7876
7986
|
);
|
|
@@ -7888,25 +7998,25 @@ var Footer_default = {
|
|
|
7888
7998
|
};
|
|
7889
7999
|
|
|
7890
8000
|
// src/components/Footer/Footer.tsx
|
|
7891
|
-
import { jsx as
|
|
7892
|
-
var Footer = ({ className, ...rest }) => /* @__PURE__ */
|
|
8001
|
+
import { jsx as jsx257 } from "react/jsx-runtime";
|
|
8002
|
+
var Footer = ({ className, ...rest }) => /* @__PURE__ */ jsx257(Contrast, { as: "footer", className: cn(className, Footer_default.container), ...rest });
|
|
7893
8003
|
|
|
7894
8004
|
// src/components/Footer/FooterListHeader.tsx
|
|
7895
|
-
import { jsx as
|
|
7896
|
-
var FooterListHeader = (props) => /* @__PURE__ */
|
|
8005
|
+
import { jsx as jsx258 } from "react/jsx-runtime";
|
|
8006
|
+
var FooterListHeader = (props) => /* @__PURE__ */ jsx258(Heading, { level: 2, typographyType: "headingSmall", ...props });
|
|
7897
8007
|
|
|
7898
8008
|
// src/components/Footer/norges_domstoler_logo.svg
|
|
7899
8009
|
var norges_domstoler_logo_default = 'data:image/svg+xml,<svg width="151" height="80" viewBox="0 0 151 80" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="Logo" clip-path="url(%23clip0_18254_1882)">%0A<path id="Vector" d="M0 19.5721V0.38501H3.50998L9.51314 13.2128C10.169 14.6541 10.6734 16.1596 11.0182 17.7051H11.1848C10.9502 16.2655 10.8311 14.8093 10.8287 13.3507V0.38501H13.0174V19.5721H9.51314L3.50998 6.77306C2.84978 5.3389 2.34334 3.83883 1.99914 2.29798H1.83829C2.07013 3.73991 2.18921 5.19772 2.19446 6.65817V19.5721H0Z" fill="white"/>%0A<path id="Vector_2" d="M19.2848 17.4063C17.9942 15.7059 17.3489 13.2299 17.3489 9.97846C17.3489 6.72699 17.9942 4.25104 19.2848 2.55062C20.5716 0.850208 22.4118 0 24.8054 0C27.199 0 29.0488 0.844463 30.3548 2.53339C31.6416 4.25679 32.2907 6.70401 32.2907 10.0014C32.2907 13.2989 31.6416 15.7461 30.3548 17.4695C29.068 19.1929 27.2182 20.0029 24.8054 20.0029C22.3927 20.0029 20.5716 19.101 19.2848 17.4063ZM21.3357 4.05572C20.6003 5.31955 20.2308 7.29379 20.2269 9.97846C20.2231 12.6631 20.5927 14.6355 21.3357 15.8954C21.6776 16.4998 22.1813 16.9969 22.7902 17.3307C23.3991 17.6646 24.089 17.8221 24.7825 17.7854C25.4832 17.8288 26.182 17.6747 26.7994 17.3406C27.4169 17.0064 27.9282 16.5058 28.2752 15.8954C29.0143 14.6355 29.3858 12.6631 29.3897 9.97846C29.3935 7.29379 29.0297 5.31955 28.2982 4.05572C27.9502 3.44633 27.4387 2.9464 26.8215 2.61242C26.2042 2.27844 25.5059 2.12372 24.8054 2.16573C24.1083 2.12541 23.4138 2.28107 22.8006 2.6151C22.1874 2.94912 21.6799 3.44817 21.3357 4.05572Z" fill="white"/>%0A<path id="Vector_3" d="M48.594 15.5968C48.8111 16.9446 49.1318 18.2737 49.5534 19.5721H46.5317C46.4288 19.2619 46.3463 18.9453 46.2847 18.6243C46.21 18.2681 46.1238 17.7856 46.0376 17.1709C45.9515 16.5562 45.8825 16.1254 45.8423 15.8668C45.5513 13.9903 45.1415 12.7207 44.613 12.0581C44.0845 11.3956 43.2151 11.0681 42.0049 11.0758H39.1326V19.5721H36.4556V0.38501H43.0045C44.7968 0.38501 46.1813 0.815859 47.1693 1.6833C47.6677 2.13766 48.0592 2.69689 48.3154 3.32072C48.5717 3.94454 48.6865 4.61743 48.6515 5.29094C48.6898 5.93617 48.5867 6.58197 48.3496 7.18326C48.1125 7.78455 47.7469 8.32682 47.2785 8.7722C46.2192 9.64565 44.8691 10.0868 43.4985 10.0073H42.7287V10.1681L43.5272 10.1969C44.1017 10.2313 44.4866 10.2658 44.7566 10.2945C45.102 10.3329 45.4427 10.4061 45.7734 10.5128C46.1234 10.601 46.4442 10.7792 46.704 11.0298C46.968 11.3147 47.2064 11.6223 47.4164 11.949C47.7076 12.4082 47.9301 12.9075 48.077 13.4311C48.2551 14.0343 48.4332 14.7581 48.594 15.5968ZM39.167 9.09964H42.43C42.8862 9.13106 43.3441 9.06822 43.775 8.91503C44.2059 8.76184 44.6006 8.52159 44.9347 8.20922C45.241 7.86617 45.4755 7.4653 45.6245 7.03021C45.7734 6.59512 45.8338 6.13462 45.8021 5.67583C45.8021 3.48138 44.6781 2.38415 42.43 2.38415H39.167V9.09964Z" fill="white"/>%0A<path id="Vector_4" d="M63.8634 6.27892C63.8374 5.16647 63.448 4.0931 62.7547 3.22277C62.4351 2.8708 62.0419 2.59361 61.6031 2.41091C61.1642 2.22821 60.6904 2.14451 60.2155 2.16575C59.518 2.12433 58.8231 2.28288 58.2125 2.62276C57.6019 2.96264 57.1011 3.46974 56.7688 4.08447C56.0334 5.36744 55.6658 7.33211 55.6658 9.97848C55.6658 12.6248 56.0315 14.5933 56.763 15.884C57.0847 16.4915 57.5726 16.995 58.1697 17.3358C58.7668 17.6765 59.4484 17.8404 60.1351 17.8084C62.8581 17.8084 64.2196 15.974 64.2196 12.3051V11.6214H59.9168V9.64529H66.7415V19.572H64.5757V17.6246C64.5824 16.3521 64.6552 15.0808 64.794 13.8159H64.6274C64.4283 15.9338 63.9132 17.4867 63.0821 18.4748C62.2491 19.4629 61.0198 19.9512 59.3941 19.9512C58.4312 19.9882 57.4753 19.7741 56.6202 19.3299C55.7651 18.8857 55.0403 18.2268 54.5169 17.4178C53.3679 15.7289 52.7935 13.2759 52.7935 10.0589C52.7935 6.77296 53.4292 4.28361 54.7007 2.59086C55.9722 0.898101 57.8009 0.0344883 60.1868 2.04411e-05C61.7689 -0.0690547 63.3242 0.425623 64.5757 1.39597C65.1677 1.92295 65.6473 2.56392 65.9859 3.28052C66.3244 3.99712 66.515 4.77464 66.5461 5.56659L63.8634 6.27892Z" fill="white"/>%0A<path id="Vector_5" d="M74.824 17.5673H82.8034V19.5721H72.1125V0.38501H82.6368V2.38415H74.824V8.66305H82.0048V10.6622H74.824V17.5673Z" fill="white"/>%0A<path id="Vector_6" d="M93.0633 19.9512C90.9953 19.9512 89.3695 19.4342 88.1804 18.3887C87.5786 17.8382 87.1032 17.164 86.7869 16.4123C86.4705 15.6606 86.3207 14.8493 86.3478 14.0342L89.0421 13.2645C89.1876 16.3283 90.5491 17.8602 93.1265 17.8602C94.0518 17.9146 94.9669 17.6422 95.7116 17.0904C96.0388 16.8086 96.2951 16.4538 96.4598 16.0546C96.6245 15.6554 96.6929 15.2231 96.6595 14.7925C96.6595 13.3334 95.838 12.284 94.195 11.6445L91.0699 10.3806C88.4159 9.32362 87.0908 7.55236 87.0947 5.06684C87.054 4.35555 87.1815 3.64468 87.467 2.99192C87.7524 2.33915 88.1878 1.76287 88.7376 1.30984C90.0484 0.449859 91.5818 -0.00830078 93.1495 -0.00830078C94.7172 -0.00830078 96.2507 0.449859 97.5614 1.30984C98.139 1.77201 98.6034 2.36008 98.919 3.02914C99.2346 3.6982 99.3931 4.43055 99.3825 5.17024L96.7801 5.9113C96.6155 3.36451 95.4014 2.09302 93.138 2.09685C92.2848 2.02806 91.4347 2.26195 90.7368 2.75749C90.4435 3.00371 90.2126 3.31574 90.0629 3.66814C89.9131 4.02055 89.8488 4.40335 89.8751 4.78535C89.835 5.48253 90.0539 6.16994 90.4897 6.71555C91.0398 7.27423 91.7096 7.70051 92.4487 7.96214L95.3612 9.15703C98.042 10.2294 99.3825 12.0006 99.3825 14.4708C99.4281 15.2308 99.2996 15.9911 99.0069 16.694C98.7143 17.3968 98.2651 18.0236 97.6935 18.5266C96.602 19.4802 95.051 19.9512 93.0633 19.9512Z" fill="white"/>%0A<path id="Vector_7" d="M5.2104 35.4617C7.95251 35.4617 9.98037 36.308 11.294 38.0008C12.6076 39.6936 13.2644 42.045 13.2644 45.0552C13.2644 48.0884 12.6076 50.4456 11.294 52.1269C9.98037 53.8082 7.95251 54.6488 5.2104 54.6488H0V35.4617H5.2104ZM4.96338 52.6497C6.97401 52.6497 8.3757 52.0063 9.17995 50.7195C9.9842 49.4327 10.3863 47.5427 10.3863 45.0552C10.3863 42.5678 9.9842 40.6836 9.17995 39.3968C8.3757 38.11 6.97401 37.4666 4.96338 37.4666H2.71148V52.6497H4.96338Z" fill="white"/>%0A<path id="Vector_8" d="M18.5954 52.4831C17.3047 50.7903 16.6594 48.3144 16.6594 45.0552C16.6594 41.7961 17.3047 39.3202 18.5954 37.6274C19.8898 35.9308 21.732 35.0825 24.1217 35.0825C26.5115 35.0825 28.3613 35.927 29.6711 37.6159C30.954 39.3048 31.5955 41.7846 31.5955 45.0552C31.5955 48.3259 30.9521 50.8152 29.6653 52.5233C28.3823 54.1969 26.5364 55.0337 24.1275 55.0337C21.7185 55.0337 19.8745 54.1835 18.5954 52.4831ZM20.6807 39.1382C19.9147 40.3944 19.5317 42.3667 19.5317 45.0552C19.5317 47.7437 19.9147 49.718 20.6807 50.978C21.0254 51.5787 21.5302 52.0719 22.1388 52.4025C22.7474 52.7332 23.4359 52.8884 24.1275 52.8507C24.8279 52.8921 25.5259 52.7371 26.143 52.4031C26.7601 52.0692 27.2717 51.5697 27.6202 50.9607C28.3555 49.7084 28.7232 47.7399 28.7232 45.0552C28.7232 42.3706 28.3536 40.3982 27.6145 39.1382C27.2674 38.5293 26.7569 38.0296 26.1407 37.6956C25.5245 37.3616 24.8271 37.2067 24.1275 37.2483C23.434 37.2116 22.7441 37.3691 22.1352 37.703C21.5264 38.0368 21.0226 38.5339 20.6807 39.1382Z" fill="white"/>%0A<path id="Vector_9" d="M35.7661 54.6488V35.4617H39.7414L42.8148 46.1237C43.5024 48.2936 43.9079 50.5429 44.0212 52.8163H44.2337C44.2993 50.5424 44.6861 48.2893 45.3827 46.1237L48.5939 35.4617H52.2762V54.6488H49.6911V43.7684C49.6911 41.5223 49.7773 39.414 49.9382 37.4493H49.7486C49.4555 39.2625 49.0527 41.0562 48.5422 42.8206L45.0954 54.6603H42.6827L39.121 42.5965C38.6304 40.9144 38.2467 39.2029 37.9721 37.4723H37.7767C37.9261 39.2417 38.0008 41.2638 38.0008 43.5272V54.6488H35.7661Z" fill="white"/>%0A<path id="Vector_10" d="M63.2314 55.0338C61.171 55.0338 59.5452 54.513 58.3542 53.4713C57.7505 52.9221 57.2734 52.2482 56.9559 51.4963C56.6385 50.7444 56.4884 49.9325 56.5159 49.1168L59.1699 48.3471C59.3155 51.4109 60.6769 52.9428 63.2544 52.9428C64.1809 52.9928 65.0963 52.7208 65.8452 52.173C66.1703 51.8898 66.4248 51.5346 66.5883 51.1356C66.7519 50.7367 66.82 50.3051 66.7873 49.8751C66.7873 48.416 65.9659 47.3647 64.3229 46.7213L61.1978 45.4632C58.5476 44.3986 57.2225 42.6254 57.2225 40.1437C57.1827 39.4334 57.3107 38.7236 57.5962 38.0719C57.8816 37.4202 58.3164 36.8449 58.8655 36.3924C60.1497 35.4549 61.7185 34.9902 63.3061 35.0769C64.8757 35.0068 66.4227 35.4705 67.695 36.3924C68.2714 36.8566 68.7344 37.4461 69.0489 38.116C69.3635 38.7859 69.5213 39.5186 69.5103 40.2586L66.9022 40.9997C66.7414 38.4605 65.5273 37.1909 63.2601 37.1909C62.4071 37.1241 61.5576 37.3578 60.8589 37.8516C60.5656 38.0978 60.3347 38.4098 60.185 38.7622C60.0352 39.1146 59.9709 39.4974 59.9972 39.8794C59.9571 40.5766 60.176 41.264 60.6118 41.8096C61.1632 42.3762 61.8346 42.812 62.5765 43.085L65.535 44.2339C68.2158 45.3139 69.5563 47.0871 69.5563 49.5534C69.6008 50.3128 69.4725 51.0723 69.181 51.7748C68.8894 52.4773 68.4422 53.1045 67.8731 53.6092C66.7529 54.5743 65.2076 55.0338 63.2314 55.0338Z" fill="white"/>%0A<path id="Vector_11" d="M85.8997 35.4617V37.6274H80.6376V54.6488H77.9491V37.6274H72.687V35.4617H85.8997Z" fill="white"/>%0A<path id="Vector_12" d="M90.4092 52.4831C89.1148 50.7903 88.4675 48.3144 88.4675 45.0552C88.4675 41.7961 89.1128 39.3202 90.4035 37.6274C91.6903 35.9308 93.5305 35.0825 95.9241 35.0825C98.3177 35.0825 100.167 35.927 101.473 37.6159C102.76 39.3048 103.404 41.7942 103.404 45.084C103.404 48.3737 102.76 50.8631 101.473 52.552C100.19 54.2065 98.3445 55.0337 95.9356 55.0337C93.5267 55.0337 91.6845 54.1835 90.4092 52.4831ZM92.4888 39.1382C91.7228 40.3944 91.3399 42.3667 91.3399 45.0552C91.3399 47.7437 91.7228 49.718 92.4888 50.978C92.866 51.5576 93.382 52.034 93.9899 52.3637C94.5978 52.6934 95.2785 52.8661 95.97 52.8661C96.6616 52.8661 97.3423 52.6934 97.9502 52.3637C98.5581 52.034 99.0741 51.5576 99.4513 50.978C100.171 49.7141 100.531 47.7399 100.531 45.0552C100.531 42.3706 100.162 40.3982 99.4226 39.1382C99.0454 38.5586 98.5294 38.0823 97.9215 37.7525C97.3136 37.4228 96.6329 37.2501 95.9413 37.2501C95.2497 37.2501 94.5691 37.4228 93.9612 37.7525C93.3532 38.0823 92.8373 38.5586 92.4601 39.1382H92.4888Z" fill="white"/>%0A<path id="Vector_13" d="M107.58 35.4617H110.297V52.4831H117.915V54.6488H107.574L107.58 35.4617Z" fill="white"/>%0A<path id="Vector_14" d="M124.544 52.6497H132.518V54.6488H121.833V35.4617H132.357V37.4666H124.544V43.7397H131.725V45.7446H124.544V52.6497Z" fill="white"/>%0A<path id="Vector_15" d="M149.321 50.6735C149.534 52.022 149.855 53.3513 150.28 54.6488H147.264C147.163 54.3399 147.081 54.0253 147.017 53.7067C146.942 53.3505 146.862 52.8622 146.77 52.2533C146.678 51.6444 146.615 51.2078 146.581 50.9493C146.289 49.0688 145.878 47.7993 145.345 47.1405C144.817 46.4857 143.949 46.1525 142.743 46.1525H139.871V54.6488H137.154V35.4617H143.731C145.52 35.4617 146.908 35.8963 147.896 36.7657C148.392 37.2209 148.781 37.7807 149.034 38.4047C149.288 39.0286 149.399 39.701 149.361 40.3733C149.394 41.0129 149.289 41.6521 149.052 42.247C148.815 42.8419 148.452 43.3786 147.988 43.8201C146.93 44.6951 145.579 45.1365 144.208 45.0552H143.438V45.2218H144.231C144.805 45.2563 145.19 45.285 145.466 45.3137C145.811 45.3579 146.151 45.4309 146.483 45.532C146.833 45.6236 147.153 45.8036 147.413 46.0548C147.676 46.3411 147.914 46.6485 148.126 46.9739C148.422 47.451 148.645 47.97 148.786 48.5135C148.982 49.1167 149.154 49.8348 149.321 50.6735ZM139.894 44.1821H143.151C143.608 44.2136 144.067 44.1508 144.499 43.9976C144.931 43.8445 145.326 43.6042 145.661 43.2916C146.273 42.5923 146.583 41.6795 146.523 40.7525C146.523 38.5638 145.403 37.4666 143.151 37.4666H139.894V44.1821Z" fill="white"/>%0A<path id="Vector_16" d="M150.389 75.0137H0V80H150.389V75.0137Z" fill="white"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_18254_1882">%0A<rect width="150.389" height="80" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';
|
|
7900
8010
|
|
|
7901
8011
|
// src/components/Footer/FooterLogo.tsx
|
|
7902
|
-
import { jsx as
|
|
8012
|
+
import { jsx as jsx259 } from "react/jsx-runtime";
|
|
7903
8013
|
var FooterLogo = ({ hideBreakpoint, ...rest }) => {
|
|
7904
|
-
return /* @__PURE__ */
|
|
8014
|
+
return /* @__PURE__ */ jsx259(
|
|
7905
8015
|
Box,
|
|
7906
8016
|
{
|
|
7907
8017
|
hideBelow: hideBreakpoint ? hideBreakpoint : void 0,
|
|
7908
8018
|
width: "fit-content",
|
|
7909
|
-
children: /* @__PURE__ */
|
|
8019
|
+
children: /* @__PURE__ */ jsx259(
|
|
7910
8020
|
"img",
|
|
7911
8021
|
{
|
|
7912
8022
|
height: 80,
|
|
@@ -7921,36 +8031,36 @@ var FooterLogo = ({ hideBreakpoint, ...rest }) => {
|
|
|
7921
8031
|
};
|
|
7922
8032
|
|
|
7923
8033
|
// src/components/Footer/FooterList.tsx
|
|
7924
|
-
import { jsx as
|
|
7925
|
-
var FooterList = ({ className, ...rest }) => /* @__PURE__ */
|
|
8034
|
+
import { jsx as jsx260 } from "react/jsx-runtime";
|
|
8035
|
+
var FooterList = ({ className, ...rest }) => /* @__PURE__ */ jsx260(StylelessList, { className: cn(className, Footer_default.list), ...rest });
|
|
7926
8036
|
|
|
7927
8037
|
// src/components/Footer/FooterSocialsList.tsx
|
|
7928
|
-
import { jsx as
|
|
8038
|
+
import { jsx as jsx261 } from "react/jsx-runtime";
|
|
7929
8039
|
var FooterSocialsList = ({
|
|
7930
8040
|
className,
|
|
7931
8041
|
...rest
|
|
7932
|
-
}) => /* @__PURE__ */
|
|
8042
|
+
}) => /* @__PURE__ */ jsx261(StylelessList, { className: cn(className, Footer_default["socials-list"]), ...rest });
|
|
7933
8043
|
|
|
7934
8044
|
// src/components/Footer/FooterSocialsGroup.tsx
|
|
7935
|
-
import { jsx as
|
|
8045
|
+
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
7936
8046
|
var FooterSocialsGroup = ({
|
|
7937
8047
|
className,
|
|
7938
8048
|
...rest
|
|
7939
|
-
}) => /* @__PURE__ */
|
|
8049
|
+
}) => /* @__PURE__ */ jsx262("div", { className: cn(className, Footer_default["socials-group"]), ...rest });
|
|
7940
8050
|
|
|
7941
8051
|
// src/components/Footer/FooterListGroup.tsx
|
|
7942
|
-
import { jsx as
|
|
8052
|
+
import { jsx as jsx263 } from "react/jsx-runtime";
|
|
7943
8053
|
var FooterListGroup = ({
|
|
7944
8054
|
className,
|
|
7945
8055
|
...rest
|
|
7946
|
-
}) => /* @__PURE__ */
|
|
8056
|
+
}) => /* @__PURE__ */ jsx263("div", { className: cn(className, Footer_default["list-group"]), ...rest });
|
|
7947
8057
|
|
|
7948
8058
|
// src/components/Footer/FooterLeft.tsx
|
|
7949
|
-
import { jsx as
|
|
7950
|
-
var FooterLeft = ({ className, ...rest }) => /* @__PURE__ */
|
|
8059
|
+
import { jsx as jsx264 } from "react/jsx-runtime";
|
|
8060
|
+
var FooterLeft = ({ className, ...rest }) => /* @__PURE__ */ jsx264("div", { className: cn(className, Footer_default["left"]), ...rest });
|
|
7951
8061
|
|
|
7952
8062
|
// src/components/GlobalMessage/GlobalMessage.tsx
|
|
7953
|
-
import { useState as
|
|
8063
|
+
import { useState as useState17 } from "react";
|
|
7954
8064
|
|
|
7955
8065
|
// src/components/GlobalMessage/GlobalMessage.module.css
|
|
7956
8066
|
var GlobalMessage_default = {
|
|
@@ -7964,7 +8074,7 @@ var GlobalMessage_default = {
|
|
|
7964
8074
|
};
|
|
7965
8075
|
|
|
7966
8076
|
// src/components/GlobalMessage/GlobalMessage.tsx
|
|
7967
|
-
import { jsx as
|
|
8077
|
+
import { jsx as jsx265, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
7968
8078
|
var icons = {
|
|
7969
8079
|
info: InfoIcon,
|
|
7970
8080
|
danger: ErrorIcon,
|
|
@@ -7981,7 +8091,7 @@ var GlobalMessage = ({
|
|
|
7981
8091
|
htmlProps,
|
|
7982
8092
|
...rest
|
|
7983
8093
|
}) => {
|
|
7984
|
-
const [isClosed, setClosed] =
|
|
8094
|
+
const [isClosed, setClosed] = useState17(false);
|
|
7985
8095
|
return !isClosed ? /* @__PURE__ */ jsxs60(
|
|
7986
8096
|
"div",
|
|
7987
8097
|
{
|
|
@@ -8002,12 +8112,12 @@ var GlobalMessage = ({
|
|
|
8002
8112
|
{
|
|
8003
8113
|
className: cn(GlobalMessage_default.content, closable && GlobalMessage_default["content--closable"]),
|
|
8004
8114
|
children: [
|
|
8005
|
-
/* @__PURE__ */
|
|
8006
|
-
children != null ? children : /* @__PURE__ */
|
|
8115
|
+
/* @__PURE__ */ jsx265(Icon, { icon: icons[purpose], className: GlobalMessage_default.icon }),
|
|
8116
|
+
children != null ? children : /* @__PURE__ */ jsx265("span", { children: message })
|
|
8007
8117
|
]
|
|
8008
8118
|
}
|
|
8009
8119
|
),
|
|
8010
|
-
closable && /* @__PURE__ */
|
|
8120
|
+
closable && /* @__PURE__ */ jsx265(
|
|
8011
8121
|
Button,
|
|
8012
8122
|
{
|
|
8013
8123
|
icon: CloseIcon,
|
|
@@ -8032,14 +8142,12 @@ var InlineButton_default = {
|
|
|
8032
8142
|
};
|
|
8033
8143
|
|
|
8034
8144
|
// src/components/InlineButton/InlineButton.tsx
|
|
8035
|
-
import { jsx as
|
|
8036
|
-
var InlineButton = ({ className, ...rest }) => /* @__PURE__ */
|
|
8037
|
-
|
|
8145
|
+
import { jsx as jsx266 } from "react/jsx-runtime";
|
|
8146
|
+
var InlineButton = ({ className, ...rest }) => /* @__PURE__ */ jsx266(
|
|
8147
|
+
StylelessButton,
|
|
8038
8148
|
{
|
|
8039
8149
|
className: cn(
|
|
8040
8150
|
className,
|
|
8041
|
-
utilStyles_default["normalize-button"],
|
|
8042
|
-
utilStyles_default["remove-button-styling"],
|
|
8043
8151
|
focus_default.focusable,
|
|
8044
8152
|
typographyStyles_default.a,
|
|
8045
8153
|
InlineButton_default.button
|
|
@@ -8055,9 +8163,9 @@ import { useRef as useRef25 } from "react";
|
|
|
8055
8163
|
import {
|
|
8056
8164
|
createContext as createContext11,
|
|
8057
8165
|
useContext as useContext15,
|
|
8058
|
-
useState as
|
|
8166
|
+
useState as useState18
|
|
8059
8167
|
} from "react";
|
|
8060
|
-
import { jsx as
|
|
8168
|
+
import { jsx as jsx267 } from "react/jsx-runtime";
|
|
8061
8169
|
var InlineEditContext = createContext11(
|
|
8062
8170
|
{}
|
|
8063
8171
|
);
|
|
@@ -8073,8 +8181,8 @@ var InlineEditContextProvider = (props) => {
|
|
|
8073
8181
|
inputRef,
|
|
8074
8182
|
children
|
|
8075
8183
|
} = props;
|
|
8076
|
-
const [editingValue, setEditingValue] =
|
|
8077
|
-
const [isEditing, setIsEditing] =
|
|
8184
|
+
const [editingValue, setEditingValue] = useState18(value != null ? value : "");
|
|
8185
|
+
const [isEditing, setIsEditing] = useState18(false);
|
|
8078
8186
|
const onChangeHandler = (e) => {
|
|
8079
8187
|
setEditingValue(e.target.value);
|
|
8080
8188
|
onChange == null ? void 0 : onChange(e);
|
|
@@ -8101,7 +8209,7 @@ var InlineEditContextProvider = (props) => {
|
|
|
8101
8209
|
useOnKeyDown(["Enter"], () => onExitHandler());
|
|
8102
8210
|
useOnKeyDown(["Escape"], () => onExitHandler());
|
|
8103
8211
|
useOnClickOutside(inputRef == null ? void 0 : inputRef.current, () => onExitHandler());
|
|
8104
|
-
return /* @__PURE__ */
|
|
8212
|
+
return /* @__PURE__ */ jsx267(
|
|
8105
8213
|
InlineEditContext,
|
|
8106
8214
|
{
|
|
8107
8215
|
value: {
|
|
@@ -8131,14 +8239,14 @@ var InlineEdit_default = {
|
|
|
8131
8239
|
|
|
8132
8240
|
// src/components/InlineEdit/InlineEdit.utils.tsx
|
|
8133
8241
|
import { jsxs as jsxs61 } from "react/jsx-runtime";
|
|
8134
|
-
var inlineEditVisuallyHidden = (id, emptiable) => /* @__PURE__ */ jsxs61(VisuallyHidden, { id,
|
|
8242
|
+
var inlineEditVisuallyHidden = (id, emptiable) => /* @__PURE__ */ jsxs61(VisuallyHidden, { id, children: [
|
|
8135
8243
|
"Escape, Enter eller Tab for \xE5 lagre.",
|
|
8136
8244
|
" ",
|
|
8137
8245
|
!emptiable && "Inputfeltet er ikke t\xF8mmbar."
|
|
8138
8246
|
] });
|
|
8139
8247
|
|
|
8140
8248
|
// src/components/InlineEdit/InlineTextArea.tsx
|
|
8141
|
-
import { jsx as
|
|
8249
|
+
import { jsx as jsx268, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
8142
8250
|
var InlineTextArea = ({
|
|
8143
8251
|
id,
|
|
8144
8252
|
error,
|
|
@@ -8161,7 +8269,7 @@ var InlineTextArea = ({
|
|
|
8161
8269
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
8162
8270
|
return /* @__PURE__ */ jsxs62(Box, { position: "relative", width, children: [
|
|
8163
8271
|
/* @__PURE__ */ jsxs62("div", { className: Input_default["input-group"], children: [
|
|
8164
|
-
!isEditing && !hideIcon && /* @__PURE__ */
|
|
8272
|
+
!isEditing && !hideIcon && /* @__PURE__ */ jsx268(
|
|
8165
8273
|
"span",
|
|
8166
8274
|
{
|
|
8167
8275
|
onClick: () => {
|
|
@@ -8169,10 +8277,10 @@ var InlineTextArea = ({
|
|
|
8169
8277
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
8170
8278
|
},
|
|
8171
8279
|
className: InlineEdit_default["icon-wrapper"],
|
|
8172
|
-
children: /* @__PURE__ */
|
|
8280
|
+
children: /* @__PURE__ */ jsx268(Icon, { icon: EditIcon, iconSize: "small" })
|
|
8173
8281
|
}
|
|
8174
8282
|
),
|
|
8175
|
-
/* @__PURE__ */
|
|
8283
|
+
/* @__PURE__ */ jsx268(
|
|
8176
8284
|
"textarea",
|
|
8177
8285
|
{
|
|
8178
8286
|
...rest,
|
|
@@ -8207,7 +8315,7 @@ var InlineTextArea = ({
|
|
|
8207
8315
|
InlineTextArea.displayName = "InlineTextArea";
|
|
8208
8316
|
|
|
8209
8317
|
// src/components/InlineEdit/InlineEditTextArea.tsx
|
|
8210
|
-
import { jsx as
|
|
8318
|
+
import { jsx as jsx269 } from "react/jsx-runtime";
|
|
8211
8319
|
var InlineEditTextArea = ({
|
|
8212
8320
|
onSetValue,
|
|
8213
8321
|
emptiable,
|
|
@@ -8220,7 +8328,7 @@ var InlineEditTextArea = ({
|
|
|
8220
8328
|
}) => {
|
|
8221
8329
|
const textareaRef = useRef25(null);
|
|
8222
8330
|
const combinedRef = useCombinedRef(ref, textareaRef);
|
|
8223
|
-
return /* @__PURE__ */
|
|
8331
|
+
return /* @__PURE__ */ jsx269(
|
|
8224
8332
|
InlineEditContextProvider,
|
|
8225
8333
|
{
|
|
8226
8334
|
onSetValue,
|
|
@@ -8230,7 +8338,7 @@ var InlineEditTextArea = ({
|
|
|
8230
8338
|
onFocus,
|
|
8231
8339
|
onChange,
|
|
8232
8340
|
onBlur,
|
|
8233
|
-
children: /* @__PURE__ */
|
|
8341
|
+
children: /* @__PURE__ */ jsx269(InlineTextArea, { ref: combinedRef, ...rest })
|
|
8234
8342
|
}
|
|
8235
8343
|
);
|
|
8236
8344
|
};
|
|
@@ -8240,7 +8348,7 @@ import { useRef as useRef27 } from "react";
|
|
|
8240
8348
|
|
|
8241
8349
|
// src/components/InlineEdit/InlineInput.tsx
|
|
8242
8350
|
import { useId as useId16, useRef as useRef26 } from "react";
|
|
8243
|
-
import { jsx as
|
|
8351
|
+
import { jsx as jsx270, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
8244
8352
|
var InlineInput = ({
|
|
8245
8353
|
id,
|
|
8246
8354
|
error,
|
|
@@ -8263,7 +8371,7 @@ var InlineInput = ({
|
|
|
8263
8371
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
8264
8372
|
return /* @__PURE__ */ jsxs63(Box, { position: "relative", width, children: [
|
|
8265
8373
|
/* @__PURE__ */ jsxs63("div", { className: Input_default["input-group"], children: [
|
|
8266
|
-
!isEditing && !hideIcon && /* @__PURE__ */
|
|
8374
|
+
!isEditing && !hideIcon && /* @__PURE__ */ jsx270(
|
|
8267
8375
|
"span",
|
|
8268
8376
|
{
|
|
8269
8377
|
onClick: () => {
|
|
@@ -8271,10 +8379,10 @@ var InlineInput = ({
|
|
|
8271
8379
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
8272
8380
|
},
|
|
8273
8381
|
className: InlineEdit_default["icon-wrapper"],
|
|
8274
|
-
children: /* @__PURE__ */
|
|
8382
|
+
children: /* @__PURE__ */ jsx270(Icon, { icon: EditIcon, iconSize: "small" })
|
|
8275
8383
|
}
|
|
8276
8384
|
),
|
|
8277
|
-
/* @__PURE__ */
|
|
8385
|
+
/* @__PURE__ */ jsx270(
|
|
8278
8386
|
"input",
|
|
8279
8387
|
{
|
|
8280
8388
|
...rest,
|
|
@@ -8307,7 +8415,7 @@ var InlineInput = ({
|
|
|
8307
8415
|
InlineInput.displayName = "InlineInput";
|
|
8308
8416
|
|
|
8309
8417
|
// src/components/InlineEdit/InlineEditInput.tsx
|
|
8310
|
-
import { jsx as
|
|
8418
|
+
import { jsx as jsx271 } from "react/jsx-runtime";
|
|
8311
8419
|
var InlineEditInput = ({
|
|
8312
8420
|
onSetValue,
|
|
8313
8421
|
emptiable,
|
|
@@ -8320,7 +8428,7 @@ var InlineEditInput = ({
|
|
|
8320
8428
|
}) => {
|
|
8321
8429
|
const inputRef = useRef27(null);
|
|
8322
8430
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
8323
|
-
return /* @__PURE__ */
|
|
8431
|
+
return /* @__PURE__ */ jsx271(
|
|
8324
8432
|
InlineEditContextProvider,
|
|
8325
8433
|
{
|
|
8326
8434
|
onSetValue,
|
|
@@ -8330,13 +8438,13 @@ var InlineEditInput = ({
|
|
|
8330
8438
|
onFocus,
|
|
8331
8439
|
onChange,
|
|
8332
8440
|
onBlur,
|
|
8333
|
-
children: /* @__PURE__ */
|
|
8441
|
+
children: /* @__PURE__ */ jsx271(InlineInput, { ...rest, ref: combinedRef })
|
|
8334
8442
|
}
|
|
8335
8443
|
);
|
|
8336
8444
|
};
|
|
8337
8445
|
|
|
8338
8446
|
// src/components/InternalHeader/InternalHeader.tsx
|
|
8339
|
-
import { useState as
|
|
8447
|
+
import { useState as useState19 } from "react";
|
|
8340
8448
|
|
|
8341
8449
|
// src/components/InternalHeader/InternalHeader.module.css
|
|
8342
8450
|
var InternalHeader_default = {
|
|
@@ -8352,8 +8460,8 @@ var InternalHeader_default = {
|
|
|
8352
8460
|
};
|
|
8353
8461
|
|
|
8354
8462
|
// src/components/InternalHeader/NavigationItem.tsx
|
|
8355
|
-
import { jsx as
|
|
8356
|
-
var NavigationItem = ({ isCurrent, ...rest }) => /* @__PURE__ */
|
|
8463
|
+
import { jsx as jsx272 } from "react/jsx-runtime";
|
|
8464
|
+
var NavigationItem = ({ isCurrent, ...rest }) => /* @__PURE__ */ jsx272(
|
|
8357
8465
|
"a",
|
|
8358
8466
|
{
|
|
8359
8467
|
...rest,
|
|
@@ -8368,7 +8476,7 @@ var NavigationItem = ({ isCurrent, ...rest }) => /* @__PURE__ */ jsx271(
|
|
|
8368
8476
|
);
|
|
8369
8477
|
|
|
8370
8478
|
// src/components/InternalHeader/InternalHeader.tsx
|
|
8371
|
-
import { jsx as
|
|
8479
|
+
import { jsx as jsx273, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
8372
8480
|
var InternalHeader = (props) => {
|
|
8373
8481
|
const {
|
|
8374
8482
|
applicationDesc,
|
|
@@ -8385,7 +8493,7 @@ var InternalHeader = (props) => {
|
|
|
8385
8493
|
htmlProps,
|
|
8386
8494
|
...rest
|
|
8387
8495
|
} = props;
|
|
8388
|
-
const [currentPage, setCurrentPage] =
|
|
8496
|
+
const [currentPage, setCurrentPage] = useState19(
|
|
8389
8497
|
currentPageHref
|
|
8390
8498
|
);
|
|
8391
8499
|
const handleCurrentPageChange = (href) => {
|
|
@@ -8396,7 +8504,7 @@ var InternalHeader = (props) => {
|
|
|
8396
8504
|
const hasContextMenuElements = !!contextMenuItems && contextMenuItems.length > 0;
|
|
8397
8505
|
const hasSmallScreenBreakpoint = !!smallScreenBreakpoint;
|
|
8398
8506
|
const hasNavInContextMenu = hasSmallScreenBreakpoint && hasNavigationElements;
|
|
8399
|
-
const navigation = hasNavigationElements ? /* @__PURE__ */
|
|
8507
|
+
const navigation = hasNavigationElements ? /* @__PURE__ */ jsx273("nav", { "aria-label": "sidenavigasjon", children: /* @__PURE__ */ jsx273(
|
|
8400
8508
|
ShowHide,
|
|
8401
8509
|
{
|
|
8402
8510
|
as: StylelessList,
|
|
@@ -8405,7 +8513,7 @@ var InternalHeader = (props) => {
|
|
|
8405
8513
|
children: navItems.map((item, index) => {
|
|
8406
8514
|
const { href, ...rest2 } = item;
|
|
8407
8515
|
const isCurrent = href === currentPage;
|
|
8408
|
-
return /* @__PURE__ */
|
|
8516
|
+
return /* @__PURE__ */ jsx273("li", { className: InternalHeader_default["nav-list__item"], children: /* @__PURE__ */ jsx273(
|
|
8409
8517
|
NavigationItem,
|
|
8410
8518
|
{
|
|
8411
8519
|
href,
|
|
@@ -8437,7 +8545,7 @@ var InternalHeader = (props) => {
|
|
|
8437
8545
|
rest
|
|
8438
8546
|
),
|
|
8439
8547
|
children: [
|
|
8440
|
-
/* @__PURE__ */
|
|
8548
|
+
/* @__PURE__ */ jsx273(Typography, { typographyType: "headingSmall", bold: true, as: "span", children: applicationHref ? /* @__PURE__ */ jsx273(
|
|
8441
8549
|
"a",
|
|
8442
8550
|
{
|
|
8443
8551
|
href: applicationHref,
|
|
@@ -8446,16 +8554,16 @@ var InternalHeader = (props) => {
|
|
|
8446
8554
|
children: applicationName
|
|
8447
8555
|
}
|
|
8448
8556
|
) : applicationName }),
|
|
8449
|
-
/* @__PURE__ */
|
|
8450
|
-
(hasContextMenu || navigation !== null) && /* @__PURE__ */
|
|
8557
|
+
/* @__PURE__ */ jsx273(Typography, { typographyType: "bodyMedium", as: "span", children: applicationDesc }),
|
|
8558
|
+
(hasContextMenu || navigation !== null) && /* @__PURE__ */ jsx273("div", { className: InternalHeader_default["bar-separator"] }),
|
|
8451
8559
|
navigation,
|
|
8452
|
-
hasContextMenu && /* @__PURE__ */
|
|
8560
|
+
hasContextMenu && /* @__PURE__ */ jsx273(
|
|
8453
8561
|
ShowHide,
|
|
8454
8562
|
{
|
|
8455
8563
|
showBelow: !hasContextMenuLargeScreen && hasSmallScreenBreakpoint ? smallScreenBreakpoint : void 0,
|
|
8456
8564
|
className: cn(InternalHeader_default["context-menu-group"]),
|
|
8457
8565
|
children: /* @__PURE__ */ jsxs64(OverflowMenuGroup, { children: [
|
|
8458
|
-
/* @__PURE__ */
|
|
8566
|
+
/* @__PURE__ */ jsx273(
|
|
8459
8567
|
Button,
|
|
8460
8568
|
{
|
|
8461
8569
|
icon: hasNavInContextMenu ? MenuIcon : MoreVerticalIcon,
|
|
@@ -8464,25 +8572,25 @@ var InternalHeader = (props) => {
|
|
|
8464
8572
|
}
|
|
8465
8573
|
),
|
|
8466
8574
|
/* @__PURE__ */ jsxs64(OverflowMenu, { className: InternalHeader_default["context-menu"], children: [
|
|
8467
|
-
user && /* @__PURE__ */
|
|
8468
|
-
hasNavInContextMenu && /* @__PURE__ */
|
|
8575
|
+
user && /* @__PURE__ */ jsx273(OverflowMenuList, { children: user.href ? /* @__PURE__ */ jsx273(OverflowMenuLink, { icon: PersonIcon, ...user }) : /* @__PURE__ */ jsx273(OverflowMenuSpan, { icon: PersonIcon, ...user }) }),
|
|
8576
|
+
hasNavInContextMenu && /* @__PURE__ */ jsx273(
|
|
8469
8577
|
ShowHide,
|
|
8470
8578
|
{
|
|
8471
8579
|
as: "nav",
|
|
8472
8580
|
"aria-label": "sidenavigasjon",
|
|
8473
8581
|
showBelow: smallScreenBreakpoint,
|
|
8474
|
-
children: /* @__PURE__ */
|
|
8582
|
+
children: /* @__PURE__ */ jsx273(OverflowMenuList, { children: navItems.map((item) => /* @__PURE__ */ jsx273(OverflowMenuLink, { ...item })) })
|
|
8475
8583
|
}
|
|
8476
8584
|
),
|
|
8477
|
-
hasNavInContextMenu && hasContextMenuElements && /* @__PURE__ */
|
|
8585
|
+
hasNavInContextMenu && hasContextMenuElements && /* @__PURE__ */ jsx273(
|
|
8478
8586
|
ShowHide,
|
|
8479
8587
|
{
|
|
8480
8588
|
as: OverflowMenuDivider,
|
|
8481
8589
|
showBelow: smallScreenBreakpoint
|
|
8482
8590
|
}
|
|
8483
8591
|
),
|
|
8484
|
-
hasContextMenuElements && /* @__PURE__ */
|
|
8485
|
-
return item.href ? /* @__PURE__ */
|
|
8592
|
+
hasContextMenuElements && /* @__PURE__ */ jsx273(OverflowMenuList, { children: contextMenuItems.map((item) => {
|
|
8593
|
+
return item.href ? /* @__PURE__ */ jsx273(OverflowMenuLink, { ...item }) : /* @__PURE__ */ jsx273(
|
|
8486
8594
|
OverflowMenuButton,
|
|
8487
8595
|
{
|
|
8488
8596
|
...item
|
|
@@ -8509,7 +8617,7 @@ var List_default = {
|
|
|
8509
8617
|
};
|
|
8510
8618
|
|
|
8511
8619
|
// src/components/List/List.tsx
|
|
8512
|
-
import { jsx as
|
|
8620
|
+
import { jsx as jsx274 } from "react/jsx-runtime";
|
|
8513
8621
|
var List = ({
|
|
8514
8622
|
listType = "unordered",
|
|
8515
8623
|
typographyType = "inherit",
|
|
@@ -8520,7 +8628,7 @@ var List = ({
|
|
|
8520
8628
|
...rest
|
|
8521
8629
|
}) => {
|
|
8522
8630
|
const List2 = listType === "ordered" ? "ol" : "ul";
|
|
8523
|
-
return /* @__PURE__ */
|
|
8631
|
+
return /* @__PURE__ */ jsx274(
|
|
8524
8632
|
List2,
|
|
8525
8633
|
{
|
|
8526
8634
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
@@ -8536,12 +8644,12 @@ var List = ({
|
|
|
8536
8644
|
List.displayName = "List";
|
|
8537
8645
|
|
|
8538
8646
|
// src/components/List/ListItem.tsx
|
|
8539
|
-
import { jsx as
|
|
8540
|
-
var ListItem = ({ className, ...rest }) => /* @__PURE__ */
|
|
8647
|
+
import { jsx as jsx275 } from "react/jsx-runtime";
|
|
8648
|
+
var ListItem = ({ className, ...rest }) => /* @__PURE__ */ jsx275("li", { ...rest, className: cn(className, List_default.li) });
|
|
8541
8649
|
ListItem.displayName = "ListItem";
|
|
8542
8650
|
|
|
8543
8651
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
8544
|
-
import { useState as
|
|
8652
|
+
import { useState as useState20 } from "react";
|
|
8545
8653
|
|
|
8546
8654
|
// src/components/LocalMessage/LocalMessage.module.css
|
|
8547
8655
|
var LocalMessage_default = {
|
|
@@ -8562,7 +8670,7 @@ var LocalMessage_default = {
|
|
|
8562
8670
|
};
|
|
8563
8671
|
|
|
8564
8672
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
8565
|
-
import { Fragment as Fragment6, jsx as
|
|
8673
|
+
import { Fragment as Fragment6, jsx as jsx276, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
8566
8674
|
var icons2 = {
|
|
8567
8675
|
info: InfoIcon,
|
|
8568
8676
|
danger: ErrorIcon,
|
|
@@ -8583,9 +8691,9 @@ var LocalMessage = ({
|
|
|
8583
8691
|
htmlProps,
|
|
8584
8692
|
...rest
|
|
8585
8693
|
}) => {
|
|
8586
|
-
const [isClosed, setClosed] =
|
|
8694
|
+
const [isClosed, setClosed] = useState20(false);
|
|
8587
8695
|
if (isClosed) {
|
|
8588
|
-
return /* @__PURE__ */
|
|
8696
|
+
return /* @__PURE__ */ jsx276(Fragment6, {});
|
|
8589
8697
|
}
|
|
8590
8698
|
return /* @__PURE__ */ jsxs65(
|
|
8591
8699
|
Box,
|
|
@@ -8608,15 +8716,15 @@ var LocalMessage = ({
|
|
|
8608
8716
|
padding: "x0.75 x0.75 x0.75 x0.5",
|
|
8609
8717
|
gap: "x0.5",
|
|
8610
8718
|
children: [
|
|
8611
|
-
/* @__PURE__ */
|
|
8719
|
+
/* @__PURE__ */ jsx276(
|
|
8612
8720
|
Icon,
|
|
8613
8721
|
{
|
|
8614
8722
|
icon: icons2[purpose],
|
|
8615
8723
|
className: cn(LocalMessage_default.icon, LocalMessage_default.container__icon)
|
|
8616
8724
|
}
|
|
8617
8725
|
),
|
|
8618
|
-
/* @__PURE__ */
|
|
8619
|
-
closable && /* @__PURE__ */
|
|
8726
|
+
/* @__PURE__ */ jsx276("div", { className: LocalMessage_default.container__text, children: children != null ? children : /* @__PURE__ */ jsx276("span", { children: message }) }),
|
|
8727
|
+
closable && /* @__PURE__ */ jsx276(
|
|
8620
8728
|
Button,
|
|
8621
8729
|
{
|
|
8622
8730
|
icon: CloseIcon,
|
|
@@ -8656,7 +8764,7 @@ var Modal_default = {
|
|
|
8656
8764
|
};
|
|
8657
8765
|
|
|
8658
8766
|
// src/components/Modal/Modal.tsx
|
|
8659
|
-
import { jsx as
|
|
8767
|
+
import { jsx as jsx277, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
8660
8768
|
var Modal = ({
|
|
8661
8769
|
isOpen = false,
|
|
8662
8770
|
parentElement,
|
|
@@ -8706,7 +8814,7 @@ var Modal = ({
|
|
|
8706
8814
|
useOnKeyDown(["Escape", "Esc"], () => handleClose());
|
|
8707
8815
|
const hasTransitionedIn = useMountTransition(isOpen, 200);
|
|
8708
8816
|
return (isOpen || hasTransitionedIn) && portalTarget ? createPortal3(
|
|
8709
|
-
/* @__PURE__ */
|
|
8817
|
+
/* @__PURE__ */ jsx277(
|
|
8710
8818
|
Backdrop,
|
|
8711
8819
|
{
|
|
8712
8820
|
zIndex: "modal",
|
|
@@ -8750,8 +8858,8 @@ var Modal = ({
|
|
|
8750
8858
|
width: "100%",
|
|
8751
8859
|
className: Modal_default["header-container"],
|
|
8752
8860
|
children: [
|
|
8753
|
-
!!header && /* @__PURE__ */
|
|
8754
|
-
onClose && /* @__PURE__ */
|
|
8861
|
+
!!header && /* @__PURE__ */ jsx277("div", { id: headerId, children: typeof header === "string" ? /* @__PURE__ */ jsx277(Heading, { level: 2, typographyType: "headingLarge", children: header }) : header }),
|
|
8862
|
+
onClose && /* @__PURE__ */ jsx277(
|
|
8755
8863
|
Button,
|
|
8756
8864
|
{
|
|
8757
8865
|
size: "small",
|
|
@@ -8765,7 +8873,7 @@ var Modal = ({
|
|
|
8765
8873
|
]
|
|
8766
8874
|
}
|
|
8767
8875
|
),
|
|
8768
|
-
/* @__PURE__ */
|
|
8876
|
+
/* @__PURE__ */ jsx277(Box, { display: "grid", gap: "x1", children })
|
|
8769
8877
|
]
|
|
8770
8878
|
}
|
|
8771
8879
|
)
|
|
@@ -8777,7 +8885,7 @@ var Modal = ({
|
|
|
8777
8885
|
Modal.displayName = "Modal";
|
|
8778
8886
|
|
|
8779
8887
|
// src/components/Modal/ModalBody.tsx
|
|
8780
|
-
import { jsx as
|
|
8888
|
+
import { jsx as jsx278 } from "react/jsx-runtime";
|
|
8781
8889
|
var ModalBody = ({
|
|
8782
8890
|
children,
|
|
8783
8891
|
id,
|
|
@@ -8787,7 +8895,7 @@ var ModalBody = ({
|
|
|
8787
8895
|
height,
|
|
8788
8896
|
...rest
|
|
8789
8897
|
}) => {
|
|
8790
|
-
return /* @__PURE__ */
|
|
8898
|
+
return /* @__PURE__ */ jsx278(
|
|
8791
8899
|
"div",
|
|
8792
8900
|
{
|
|
8793
8901
|
...getBaseHTMLProps(
|
|
@@ -8809,12 +8917,12 @@ var ModalBody = ({
|
|
|
8809
8917
|
ModalBody.displayName = "ModalBody";
|
|
8810
8918
|
|
|
8811
8919
|
// src/components/Modal/ModalActions.tsx
|
|
8812
|
-
import { jsx as
|
|
8813
|
-
var ModalActions = (props) => /* @__PURE__ */
|
|
8920
|
+
import { jsx as jsx279 } from "react/jsx-runtime";
|
|
8921
|
+
var ModalActions = (props) => /* @__PURE__ */ jsx279(Box, { display: "flex", flexWrap: "wrap", gap: "x1", ...props });
|
|
8814
8922
|
ModalActions.displayName = "ModalActions";
|
|
8815
8923
|
|
|
8816
8924
|
// src/components/Pagination/Pagination.tsx
|
|
8817
|
-
import { useState as
|
|
8925
|
+
import { useState as useState21 } from "react";
|
|
8818
8926
|
|
|
8819
8927
|
// src/components/Pagination/Pagination.module.css
|
|
8820
8928
|
var Pagination_default = {
|
|
@@ -9147,7 +9255,7 @@ var getCustomStyles = (size2, hasError, hasIcon, isReadOnly) => ({
|
|
|
9147
9255
|
import {
|
|
9148
9256
|
components
|
|
9149
9257
|
} from "react-select";
|
|
9150
|
-
import { jsx as
|
|
9258
|
+
import { jsx as jsx280, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
9151
9259
|
var {
|
|
9152
9260
|
Option,
|
|
9153
9261
|
NoOptionsMessage,
|
|
@@ -9169,26 +9277,26 @@ var getIndicatorIconSize = (componentSize) => {
|
|
|
9169
9277
|
}
|
|
9170
9278
|
};
|
|
9171
9279
|
var DDSOption = (props, componentSize) => /* @__PURE__ */ jsxs67(Option, { ...props, children: [
|
|
9172
|
-
props.isSelected && /* @__PURE__ */
|
|
9280
|
+
props.isSelected && /* @__PURE__ */ jsx280(Icon, { icon: CheckIcon, iconSize: getFormInputIconSize(componentSize) }),
|
|
9173
9281
|
props.children
|
|
9174
9282
|
] });
|
|
9175
|
-
var CustomOption = (props, Element) => /* @__PURE__ */
|
|
9176
|
-
var CustomSingleValue = (props, id, Element) => /* @__PURE__ */
|
|
9177
|
-
var DDSNoOptionsMessage = (props) => /* @__PURE__ */
|
|
9178
|
-
var DDSClearIndicator = (props, size2) => /* @__PURE__ */
|
|
9179
|
-
var DDSMultiValueRemove = (props) => /* @__PURE__ */
|
|
9283
|
+
var CustomOption = (props, Element) => /* @__PURE__ */ jsx280(Option, { ...props, children: /* @__PURE__ */ jsx280(Element, { ...props }) });
|
|
9284
|
+
var CustomSingleValue = (props, id, Element) => /* @__PURE__ */ jsx280(SingleValue, { ...props, children: /* @__PURE__ */ jsx280("div", { id, className: Select_default["inner-single-value"], children: Element ? /* @__PURE__ */ jsx280(Element, { ...props }) : props.children }) });
|
|
9285
|
+
var DDSNoOptionsMessage = (props) => /* @__PURE__ */ jsx280(NoOptionsMessage, { ...props, children: "Ingen treff" });
|
|
9286
|
+
var DDSClearIndicator = (props, size2) => /* @__PURE__ */ jsx280(ClearIndicator, { ...props, children: /* @__PURE__ */ jsx280(Icon, { icon: CloseSmallIcon, iconSize: getIndicatorIconSize(size2) }) });
|
|
9287
|
+
var DDSMultiValueRemove = (props) => /* @__PURE__ */ jsx280(MultiValueRemove, { ...props, children: /* @__PURE__ */ jsx280(Icon, { icon: CloseSmallIcon, iconSize: "small" }) });
|
|
9180
9288
|
var DDSDropdownIndicator = (props, size2) => {
|
|
9181
9289
|
const { className, ...rest } = props;
|
|
9182
|
-
return /* @__PURE__ */
|
|
9290
|
+
return /* @__PURE__ */ jsx280(
|
|
9183
9291
|
DropdownIndicator,
|
|
9184
9292
|
{
|
|
9185
9293
|
...rest,
|
|
9186
9294
|
className: cn(className, Select_default["dropdown-indicator"]),
|
|
9187
|
-
children: /* @__PURE__ */
|
|
9295
|
+
children: /* @__PURE__ */ jsx280(Icon, { icon: ChevronDownIcon, iconSize: getIndicatorIconSize(size2) })
|
|
9188
9296
|
}
|
|
9189
9297
|
);
|
|
9190
9298
|
};
|
|
9191
|
-
var DDSInput = (props, ariaInvalid, ariaDescribedby) => /* @__PURE__ */
|
|
9299
|
+
var DDSInput = (props, ariaInvalid, ariaDescribedby) => /* @__PURE__ */ jsx280(
|
|
9192
9300
|
Input2,
|
|
9193
9301
|
{
|
|
9194
9302
|
...props,
|
|
@@ -9198,7 +9306,7 @@ var DDSInput = (props, ariaInvalid, ariaDescribedby) => /* @__PURE__ */ jsx279(
|
|
|
9198
9306
|
);
|
|
9199
9307
|
var DDSControl = (props, componentSize, readOnly, icon, dataTestId) => {
|
|
9200
9308
|
const { className, ...rest } = props;
|
|
9201
|
-
return /* @__PURE__ */
|
|
9309
|
+
return /* @__PURE__ */ jsx280("div", { "data-testid": dataTestId ? dataTestId + "-control" : void 0, children: /* @__PURE__ */ jsxs67(
|
|
9202
9310
|
Control,
|
|
9203
9311
|
{
|
|
9204
9312
|
...rest,
|
|
@@ -9209,7 +9317,7 @@ var DDSControl = (props, componentSize, readOnly, icon, dataTestId) => {
|
|
|
9209
9317
|
readOnly && Select_default["control--readonly"]
|
|
9210
9318
|
),
|
|
9211
9319
|
children: [
|
|
9212
|
-
icon && /* @__PURE__ */
|
|
9320
|
+
icon && /* @__PURE__ */ jsx280(
|
|
9213
9321
|
Icon,
|
|
9214
9322
|
{
|
|
9215
9323
|
icon,
|
|
@@ -9227,7 +9335,7 @@ var DDSControl = (props, componentSize, readOnly, icon, dataTestId) => {
|
|
|
9227
9335
|
};
|
|
9228
9336
|
|
|
9229
9337
|
// src/components/Select/Select.tsx
|
|
9230
|
-
import { jsx as
|
|
9338
|
+
import { jsx as jsx281, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
9231
9339
|
function Select({
|
|
9232
9340
|
id,
|
|
9233
9341
|
label,
|
|
@@ -9340,7 +9448,7 @@ function Select({
|
|
|
9340
9448
|
),
|
|
9341
9449
|
style,
|
|
9342
9450
|
children: [
|
|
9343
|
-
hasLabel && /* @__PURE__ */
|
|
9451
|
+
hasLabel && /* @__PURE__ */ jsx281(
|
|
9344
9452
|
Label,
|
|
9345
9453
|
{
|
|
9346
9454
|
htmlFor: uniqueId,
|
|
@@ -9350,7 +9458,7 @@ function Select({
|
|
|
9350
9458
|
children: label
|
|
9351
9459
|
}
|
|
9352
9460
|
),
|
|
9353
|
-
/* @__PURE__ */
|
|
9461
|
+
/* @__PURE__ */ jsx281(ReactSelect, { ...reactSelectProps, ref }),
|
|
9354
9462
|
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
9355
9463
|
]
|
|
9356
9464
|
}
|
|
@@ -9373,7 +9481,7 @@ var NativeSelect_default = {
|
|
|
9373
9481
|
};
|
|
9374
9482
|
|
|
9375
9483
|
// src/components/Select/NativeSelect/NativeSelect.tsx
|
|
9376
|
-
import { jsx as
|
|
9484
|
+
import { jsx as jsx282, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
9377
9485
|
var NativeSelect = ({
|
|
9378
9486
|
id,
|
|
9379
9487
|
children,
|
|
@@ -9406,7 +9514,7 @@ var NativeSelect = ({
|
|
|
9406
9514
|
componentSize === "xsmall" && "var(--dds-input-default-width-xsmall)"
|
|
9407
9515
|
);
|
|
9408
9516
|
return /* @__PURE__ */ jsxs69("div", { className, style, children: [
|
|
9409
|
-
hasLabel && /* @__PURE__ */
|
|
9517
|
+
hasLabel && /* @__PURE__ */ jsx282(
|
|
9410
9518
|
Label,
|
|
9411
9519
|
{
|
|
9412
9520
|
className: Input_default.label,
|
|
@@ -9417,7 +9525,7 @@ var NativeSelect = ({
|
|
|
9417
9525
|
}
|
|
9418
9526
|
),
|
|
9419
9527
|
/* @__PURE__ */ jsxs69(Box, { position: "relative", width: inputWidth, children: [
|
|
9420
|
-
/* @__PURE__ */
|
|
9528
|
+
/* @__PURE__ */ jsx282(
|
|
9421
9529
|
"select",
|
|
9422
9530
|
{
|
|
9423
9531
|
id: uniqueId,
|
|
@@ -9448,7 +9556,7 @@ var NativeSelect = ({
|
|
|
9448
9556
|
children
|
|
9449
9557
|
}
|
|
9450
9558
|
),
|
|
9451
|
-
!multiple && /* @__PURE__ */
|
|
9559
|
+
!multiple && /* @__PURE__ */ jsx282(
|
|
9452
9560
|
Icon,
|
|
9453
9561
|
{
|
|
9454
9562
|
icon: ChevronDownIcon,
|
|
@@ -9464,14 +9572,14 @@ var NativeSelectPlaceholder = ({
|
|
|
9464
9572
|
children = "-- Velg fra listen --",
|
|
9465
9573
|
value,
|
|
9466
9574
|
...rest
|
|
9467
|
-
}) => /* @__PURE__ */
|
|
9575
|
+
}) => /* @__PURE__ */ jsx282("option", { value: value != null ? value : "", selected: true, ...rest, children });
|
|
9468
9576
|
NativeSelectPlaceholder.displayName = "NativeSelectPlaceholder";
|
|
9469
9577
|
|
|
9470
9578
|
// src/components/Select/utils.ts
|
|
9471
9579
|
var createSelectOptions = (...args) => args.map((v) => ({ label: v, value: v }));
|
|
9472
9580
|
|
|
9473
9581
|
// src/components/Pagination/Pagination.tsx
|
|
9474
|
-
import { jsx as
|
|
9582
|
+
import { jsx as jsx283, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
9475
9583
|
var Pagination = ({
|
|
9476
9584
|
itemsAmount,
|
|
9477
9585
|
defaultItemsPerPage = 10,
|
|
@@ -9494,8 +9602,8 @@ var Pagination = ({
|
|
|
9494
9602
|
ref,
|
|
9495
9603
|
...rest
|
|
9496
9604
|
}) => {
|
|
9497
|
-
const [activePage, setActivePage] =
|
|
9498
|
-
const [itemsPerPage, setItemsPerPage] =
|
|
9605
|
+
const [activePage, setActivePage] = useState21(defaultActivePage);
|
|
9606
|
+
const [itemsPerPage, setItemsPerPage] = useState21(defaultItemsPerPage);
|
|
9499
9607
|
const pagesLength = Math.ceil(itemsAmount / itemsPerPage);
|
|
9500
9608
|
const items = PaginationGenerator(pagesLength, activePage);
|
|
9501
9609
|
const onPageChange = (event, page) => {
|
|
@@ -9514,7 +9622,7 @@ var Pagination = ({
|
|
|
9514
9622
|
};
|
|
9515
9623
|
const listItems = items.length > 0 ? items.map((item, i) => {
|
|
9516
9624
|
const isActive = item === activePage;
|
|
9517
|
-
return /* @__PURE__ */
|
|
9625
|
+
return /* @__PURE__ */ jsx283("li", { className: Pagination_default.list__item, children: item !== "truncator" && typeof item === "number" ? /* @__PURE__ */ jsx283(
|
|
9518
9626
|
Button,
|
|
9519
9627
|
{
|
|
9520
9628
|
purpose: isActive ? "primary" : "secondary",
|
|
@@ -9525,7 +9633,7 @@ var Pagination = ({
|
|
|
9525
9633
|
"aria-label": isActive ? `N\xE5v\xE6rende side (side ${item})` : `G\xE5 til side ${item}`,
|
|
9526
9634
|
children: item
|
|
9527
9635
|
}
|
|
9528
|
-
) : /* @__PURE__ */
|
|
9636
|
+
) : /* @__PURE__ */ jsx283(
|
|
9529
9637
|
Icon,
|
|
9530
9638
|
{
|
|
9531
9639
|
icon: MoreHorizontalIcon,
|
|
@@ -9533,7 +9641,7 @@ var Pagination = ({
|
|
|
9533
9641
|
}
|
|
9534
9642
|
) }, `pagination-item-${i}`);
|
|
9535
9643
|
}) : void 0;
|
|
9536
|
-
const previousPageButton = /* @__PURE__ */
|
|
9644
|
+
const previousPageButton = /* @__PURE__ */ jsx283(
|
|
9537
9645
|
Button,
|
|
9538
9646
|
{
|
|
9539
9647
|
purpose: "secondary",
|
|
@@ -9545,7 +9653,7 @@ var Pagination = ({
|
|
|
9545
9653
|
"aria-label": "G\xE5 til forrige siden"
|
|
9546
9654
|
}
|
|
9547
9655
|
);
|
|
9548
|
-
const nextPageButton = /* @__PURE__ */
|
|
9656
|
+
const nextPageButton = /* @__PURE__ */ jsx283(
|
|
9549
9657
|
Button,
|
|
9550
9658
|
{
|
|
9551
9659
|
purpose: "secondary",
|
|
@@ -9578,7 +9686,7 @@ var Pagination = ({
|
|
|
9578
9686
|
hideBelow: smallScreenBreakpoint,
|
|
9579
9687
|
className: Pagination_default.list,
|
|
9580
9688
|
children: [
|
|
9581
|
-
/* @__PURE__ */
|
|
9689
|
+
/* @__PURE__ */ jsx283(
|
|
9582
9690
|
"li",
|
|
9583
9691
|
{
|
|
9584
9692
|
className: cn(
|
|
@@ -9590,7 +9698,7 @@ var Pagination = ({
|
|
|
9590
9698
|
}
|
|
9591
9699
|
),
|
|
9592
9700
|
listItems,
|
|
9593
|
-
/* @__PURE__ */
|
|
9701
|
+
/* @__PURE__ */ jsx283(
|
|
9594
9702
|
"li",
|
|
9595
9703
|
{
|
|
9596
9704
|
className: cn(
|
|
@@ -9611,7 +9719,7 @@ var Pagination = ({
|
|
|
9611
9719
|
showBelow: smallScreenBreakpoint,
|
|
9612
9720
|
className: Pagination_default.list,
|
|
9613
9721
|
children: [
|
|
9614
|
-
/* @__PURE__ */
|
|
9722
|
+
/* @__PURE__ */ jsx283(
|
|
9615
9723
|
"li",
|
|
9616
9724
|
{
|
|
9617
9725
|
className: cn(
|
|
@@ -9619,7 +9727,7 @@ var Pagination = ({
|
|
|
9619
9727
|
isOnFirstPage && Pagination_default["list__item--hidden"]
|
|
9620
9728
|
),
|
|
9621
9729
|
"aria-hidden": isOnFirstPage,
|
|
9622
|
-
children: /* @__PURE__ */
|
|
9730
|
+
children: /* @__PURE__ */ jsx283(
|
|
9623
9731
|
Button,
|
|
9624
9732
|
{
|
|
9625
9733
|
purpose: "secondary",
|
|
@@ -9633,7 +9741,7 @@ var Pagination = ({
|
|
|
9633
9741
|
)
|
|
9634
9742
|
}
|
|
9635
9743
|
),
|
|
9636
|
-
/* @__PURE__ */
|
|
9744
|
+
/* @__PURE__ */ jsx283(
|
|
9637
9745
|
"li",
|
|
9638
9746
|
{
|
|
9639
9747
|
className: cn(
|
|
@@ -9644,7 +9752,7 @@ var Pagination = ({
|
|
|
9644
9752
|
children: previousPageButton
|
|
9645
9753
|
}
|
|
9646
9754
|
),
|
|
9647
|
-
/* @__PURE__ */
|
|
9755
|
+
/* @__PURE__ */ jsx283("li", { className: Pagination_default.list__item, children: /* @__PURE__ */ jsx283(
|
|
9648
9756
|
Button,
|
|
9649
9757
|
{
|
|
9650
9758
|
size: "small",
|
|
@@ -9654,7 +9762,7 @@ var Pagination = ({
|
|
|
9654
9762
|
children: activePage
|
|
9655
9763
|
}
|
|
9656
9764
|
) }),
|
|
9657
|
-
/* @__PURE__ */
|
|
9765
|
+
/* @__PURE__ */ jsx283(
|
|
9658
9766
|
"li",
|
|
9659
9767
|
{
|
|
9660
9768
|
className: cn(
|
|
@@ -9665,7 +9773,7 @@ var Pagination = ({
|
|
|
9665
9773
|
children: nextPageButton
|
|
9666
9774
|
}
|
|
9667
9775
|
),
|
|
9668
|
-
/* @__PURE__ */
|
|
9776
|
+
/* @__PURE__ */ jsx283(
|
|
9669
9777
|
"li",
|
|
9670
9778
|
{
|
|
9671
9779
|
className: cn(
|
|
@@ -9673,7 +9781,7 @@ var Pagination = ({
|
|
|
9673
9781
|
isOnLastPage && Pagination_default["list__item--hidden"]
|
|
9674
9782
|
),
|
|
9675
9783
|
"aria-hidden": isOnLastPage,
|
|
9676
|
-
children: /* @__PURE__ */
|
|
9784
|
+
children: /* @__PURE__ */ jsx283(
|
|
9677
9785
|
Button,
|
|
9678
9786
|
{
|
|
9679
9787
|
purpose: "secondary",
|
|
@@ -9707,7 +9815,7 @@ var Pagination = ({
|
|
|
9707
9815
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
9708
9816
|
children: [
|
|
9709
9817
|
/* @__PURE__ */ jsxs70("div", { className: Pagination_default.indicators, children: [
|
|
9710
|
-
withSelect && /* @__PURE__ */
|
|
9818
|
+
withSelect && /* @__PURE__ */ jsx283(
|
|
9711
9819
|
Select,
|
|
9712
9820
|
{
|
|
9713
9821
|
options: selectOptions,
|
|
@@ -9745,7 +9853,7 @@ import {
|
|
|
9745
9853
|
useId as useId20,
|
|
9746
9854
|
useLayoutEffect as useLayoutEffect2,
|
|
9747
9855
|
useRef as useRef29,
|
|
9748
|
-
useState as
|
|
9856
|
+
useState as useState22
|
|
9749
9857
|
} from "react";
|
|
9750
9858
|
|
|
9751
9859
|
// src/components/PhoneInput/constants.ts
|
|
@@ -10146,7 +10254,7 @@ var PhoneInput_default = {
|
|
|
10146
10254
|
};
|
|
10147
10255
|
|
|
10148
10256
|
// src/components/PhoneInput/PhoneInput.tsx
|
|
10149
|
-
import { jsx as
|
|
10257
|
+
import { jsx as jsx284, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
10150
10258
|
var prioritizedCountries = [
|
|
10151
10259
|
COUNTRIES.NO,
|
|
10152
10260
|
COUNTRIES.SE,
|
|
@@ -10215,16 +10323,16 @@ var PhoneInput = ({
|
|
|
10215
10323
|
const hasMessage = hasErrorMessage || hasTip;
|
|
10216
10324
|
const tipId = derivativeIdGenerator(phoneInputId, "tip");
|
|
10217
10325
|
const errorMessageId = derivativeIdGenerator(phoneInputId, "errorMessage");
|
|
10218
|
-
const [callingCode, setCallingCode] =
|
|
10219
|
-
const [selectedCountryCodeText, setSelectedCountryCodeText] =
|
|
10220
|
-
const [internalValue, setInternalValue] =
|
|
10326
|
+
const [callingCode, setCallingCode] = useState22("");
|
|
10327
|
+
const [selectedCountryCodeText, setSelectedCountryCodeText] = useState22("");
|
|
10328
|
+
const [internalValue, setInternalValue] = useState22(
|
|
10221
10329
|
defaultValue != null ? defaultValue : {
|
|
10222
10330
|
countryCode: "",
|
|
10223
10331
|
phoneNumber: ""
|
|
10224
10332
|
}
|
|
10225
10333
|
);
|
|
10226
10334
|
const isControlled = value !== void 0;
|
|
10227
|
-
const [callingCodeWidth, setCallingCodeWidth] =
|
|
10335
|
+
const [callingCodeWidth, setCallingCodeWidth] = useState22(0);
|
|
10228
10336
|
const callingCodeRef = useRef29(null);
|
|
10229
10337
|
useLayoutEffect2(() => {
|
|
10230
10338
|
if (callingCodeRef.current) {
|
|
@@ -10282,7 +10390,7 @@ var PhoneInput = ({
|
|
|
10282
10390
|
const bp = props.smallScreenBreakpoint;
|
|
10283
10391
|
const widthDefault = componentSize === "xsmall" && "var(--dds-input-default-width-xsmall)";
|
|
10284
10392
|
return /* @__PURE__ */ jsxs71("div", { className: cn(className, Input_default.container), style, children: [
|
|
10285
|
-
hasLabel && /* @__PURE__ */
|
|
10393
|
+
hasLabel && /* @__PURE__ */ jsx284(
|
|
10286
10394
|
Label,
|
|
10287
10395
|
{
|
|
10288
10396
|
htmlFor: phoneNumberId,
|
|
@@ -10305,8 +10413,8 @@ var PhoneInput = ({
|
|
|
10305
10413
|
role: "group",
|
|
10306
10414
|
"aria-label": groupLabel,
|
|
10307
10415
|
children: [
|
|
10308
|
-
/* @__PURE__ */
|
|
10309
|
-
/* @__PURE__ */
|
|
10416
|
+
/* @__PURE__ */ jsx284("label", { className: utilStyles_default["visually-hidden"], htmlFor: selectId, children: selectLabel }),
|
|
10417
|
+
/* @__PURE__ */ jsx284(
|
|
10310
10418
|
NativeSelect,
|
|
10311
10419
|
{
|
|
10312
10420
|
width: applyResponsiveStyle(
|
|
@@ -10327,11 +10435,11 @@ var PhoneInput = ({
|
|
|
10327
10435
|
hasTip ? tipId : void 0,
|
|
10328
10436
|
ariaDescribedby
|
|
10329
10437
|
]),
|
|
10330
|
-
children: countryOptions.map((item, index) => /* @__PURE__ */
|
|
10438
|
+
children: countryOptions.map((item, index) => /* @__PURE__ */ jsx284("option", { value: item.countryCode, children: item.label }, index))
|
|
10331
10439
|
}
|
|
10332
10440
|
),
|
|
10333
10441
|
/* @__PURE__ */ jsxs71(Box, { width: "100%", className: Input_default["input-group"], children: [
|
|
10334
|
-
/* @__PURE__ */
|
|
10442
|
+
/* @__PURE__ */ jsx284(
|
|
10335
10443
|
"span",
|
|
10336
10444
|
{
|
|
10337
10445
|
className: cn(
|
|
@@ -10343,7 +10451,7 @@ var PhoneInput = ({
|
|
|
10343
10451
|
children: callingCode
|
|
10344
10452
|
}
|
|
10345
10453
|
),
|
|
10346
|
-
/* @__PURE__ */
|
|
10454
|
+
/* @__PURE__ */ jsx284(
|
|
10347
10455
|
Box,
|
|
10348
10456
|
{
|
|
10349
10457
|
as: StatefulInput,
|
|
@@ -10407,7 +10515,7 @@ var PopoverContext = createContext12({});
|
|
|
10407
10515
|
var usePopoverContext = () => useContext18(PopoverContext);
|
|
10408
10516
|
|
|
10409
10517
|
// src/components/Popover/Popover.tsx
|
|
10410
|
-
import { jsx as
|
|
10518
|
+
import { jsx as jsx285, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
10411
10519
|
var Popover = ({
|
|
10412
10520
|
id,
|
|
10413
10521
|
header,
|
|
@@ -10525,15 +10633,15 @@ var Popover = ({
|
|
|
10525
10633
|
elevation: 3,
|
|
10526
10634
|
border: "border-subtle",
|
|
10527
10635
|
children: [
|
|
10528
|
-
header && /* @__PURE__ */
|
|
10529
|
-
/* @__PURE__ */
|
|
10636
|
+
header && /* @__PURE__ */ jsx285("div", { className: Popover_default.header, children: typeof header === "string" ? /* @__PURE__ */ jsx285(Heading, { level: 2, typographyType: "headingMedium", children: header }) : header }),
|
|
10637
|
+
/* @__PURE__ */ jsx285(
|
|
10530
10638
|
"div",
|
|
10531
10639
|
{
|
|
10532
10640
|
className: !hasTitle && withCloseButton ? Popover_default["content--closable--no-header"] : "",
|
|
10533
10641
|
children
|
|
10534
10642
|
}
|
|
10535
10643
|
),
|
|
10536
|
-
withCloseButton && /* @__PURE__ */
|
|
10644
|
+
withCloseButton && /* @__PURE__ */ jsx285(
|
|
10537
10645
|
Button,
|
|
10538
10646
|
{
|
|
10539
10647
|
icon: CloseIcon,
|
|
@@ -10558,9 +10666,9 @@ import {
|
|
|
10558
10666
|
isValidElement as isValidElement4,
|
|
10559
10667
|
useId as useId22,
|
|
10560
10668
|
useRef as useRef30,
|
|
10561
|
-
useState as
|
|
10669
|
+
useState as useState23
|
|
10562
10670
|
} from "react";
|
|
10563
|
-
import { jsx as
|
|
10671
|
+
import { jsx as jsx286 } from "react/jsx-runtime";
|
|
10564
10672
|
var PopoverGroup = ({
|
|
10565
10673
|
isOpen: propIsOpen,
|
|
10566
10674
|
setIsOpen: propSetIsOpen,
|
|
@@ -10571,12 +10679,12 @@ var PopoverGroup = ({
|
|
|
10571
10679
|
popoverId
|
|
10572
10680
|
}) => {
|
|
10573
10681
|
var _a;
|
|
10574
|
-
const [internalIsOpen, internalSetIsOpen] =
|
|
10682
|
+
const [internalIsOpen, internalSetIsOpen] = useState23(isInitiallyOpen);
|
|
10575
10683
|
const open = propIsOpen != null ? propIsOpen : internalIsOpen;
|
|
10576
10684
|
const setOpen = propSetIsOpen != null ? propSetIsOpen : internalSetIsOpen;
|
|
10577
10685
|
const generatedId = useId22();
|
|
10578
10686
|
const uniquePopoverId = popoverId != null ? popoverId : `${generatedId}-popover`;
|
|
10579
|
-
const [floatOptions, setFloatOptions] =
|
|
10687
|
+
const [floatOptions, setFloatOptions] = useState23();
|
|
10580
10688
|
const { refs, styles: positionStyles } = useFloatPosition(null, floatOptions);
|
|
10581
10689
|
const handleClose = () => {
|
|
10582
10690
|
setOpen(false);
|
|
@@ -10621,7 +10729,7 @@ var PopoverGroup = ({
|
|
|
10621
10729
|
ref: combinedAnchorRef
|
|
10622
10730
|
}) : child);
|
|
10623
10731
|
});
|
|
10624
|
-
return /* @__PURE__ */
|
|
10732
|
+
return /* @__PURE__ */ jsx286(
|
|
10625
10733
|
PopoverContext,
|
|
10626
10734
|
{
|
|
10627
10735
|
value: {
|
|
@@ -10646,7 +10754,7 @@ import {
|
|
|
10646
10754
|
isValidElement as isValidElement5,
|
|
10647
10755
|
useEffect as useEffect27,
|
|
10648
10756
|
useMemo as useMemo3,
|
|
10649
|
-
useState as
|
|
10757
|
+
useState as useState24
|
|
10650
10758
|
} from "react";
|
|
10651
10759
|
|
|
10652
10760
|
// src/components/ProgressTracker/ProgressTracker.context.tsx
|
|
@@ -10683,7 +10791,7 @@ var ProgressTracker_default = {
|
|
|
10683
10791
|
|
|
10684
10792
|
// src/components/ProgressTracker/ProgressTrackerItem.tsx
|
|
10685
10793
|
import { useMemo as useMemo2 } from "react";
|
|
10686
|
-
import { Fragment as Fragment7, jsx as
|
|
10794
|
+
import { Fragment as Fragment7, jsx as jsx287, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
10687
10795
|
var toItemState = (active, completed, disabled) => {
|
|
10688
10796
|
if (disabled) {
|
|
10689
10797
|
return "disabled";
|
|
@@ -10727,15 +10835,15 @@ var ProgressTrackerItem = (props) => {
|
|
|
10727
10835
|
};
|
|
10728
10836
|
const stepNumberContent = useMemo2(() => {
|
|
10729
10837
|
if (completed) {
|
|
10730
|
-
return /* @__PURE__ */
|
|
10838
|
+
return /* @__PURE__ */ jsx287(Icon, { icon: CheckIcon, iconSize: "small" });
|
|
10731
10839
|
}
|
|
10732
10840
|
if (icon !== void 0) {
|
|
10733
|
-
return /* @__PURE__ */
|
|
10841
|
+
return /* @__PURE__ */ jsx287(Icon, { icon, iconSize: "small" });
|
|
10734
10842
|
}
|
|
10735
10843
|
return index + 1;
|
|
10736
10844
|
}, [completed, icon, index]);
|
|
10737
10845
|
const stepContent = /* @__PURE__ */ jsxs73(Fragment7, { children: [
|
|
10738
|
-
/* @__PURE__ */
|
|
10846
|
+
/* @__PURE__ */ jsx287(
|
|
10739
10847
|
Box,
|
|
10740
10848
|
{
|
|
10741
10849
|
display: "flex",
|
|
@@ -10759,21 +10867,21 @@ var ProgressTrackerItem = (props) => {
|
|
|
10759
10867
|
typographyStyles_default["body-medium"]
|
|
10760
10868
|
),
|
|
10761
10869
|
children: [
|
|
10762
|
-
/* @__PURE__ */
|
|
10870
|
+
/* @__PURE__ */ jsx287(VisuallyHidden, { children: getVisuallyHiddenTextBefore(index) }),
|
|
10763
10871
|
children,
|
|
10764
|
-
/* @__PURE__ */
|
|
10872
|
+
/* @__PURE__ */ jsx287(VisuallyHidden, { children: getVisuallyHiddenTextAfter(completed) })
|
|
10765
10873
|
]
|
|
10766
10874
|
}
|
|
10767
10875
|
)
|
|
10768
10876
|
] });
|
|
10769
|
-
return /* @__PURE__ */
|
|
10877
|
+
return /* @__PURE__ */ jsx287(
|
|
10770
10878
|
Box,
|
|
10771
10879
|
{
|
|
10772
10880
|
as: "li",
|
|
10773
10881
|
display: direction === "row" ? "flex" : void 0,
|
|
10774
10882
|
"aria-current": active ? "step" : void 0,
|
|
10775
10883
|
className: cn(ProgressTracker_default["list-item"], ProgressTracker_default[`list-item--${direction}`]),
|
|
10776
|
-
children: handleStepChange ? /* @__PURE__ */
|
|
10884
|
+
children: handleStepChange ? /* @__PURE__ */ jsx287(
|
|
10777
10885
|
"button",
|
|
10778
10886
|
{
|
|
10779
10887
|
...getBaseHTMLProps(
|
|
@@ -10786,7 +10894,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
10786
10894
|
disabled,
|
|
10787
10895
|
children: stepContent
|
|
10788
10896
|
}
|
|
10789
|
-
) : /* @__PURE__ */
|
|
10897
|
+
) : /* @__PURE__ */ jsx287(
|
|
10790
10898
|
"div",
|
|
10791
10899
|
{
|
|
10792
10900
|
...getBaseHTMLProps(
|
|
@@ -10804,7 +10912,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
10804
10912
|
ProgressTrackerItem.displayName = "ProgressTracker.Item";
|
|
10805
10913
|
|
|
10806
10914
|
// src/components/ProgressTracker/ProgressTracker.tsx
|
|
10807
|
-
import { jsx as
|
|
10915
|
+
import { jsx as jsx288 } from "react/jsx-runtime";
|
|
10808
10916
|
var ProgressTracker = (() => {
|
|
10809
10917
|
const Res = ({
|
|
10810
10918
|
id,
|
|
@@ -10816,7 +10924,7 @@ var ProgressTracker = (() => {
|
|
|
10816
10924
|
htmlProps = {},
|
|
10817
10925
|
...rest
|
|
10818
10926
|
}) => {
|
|
10819
|
-
const [thisActiveStep, setActiveStep] =
|
|
10927
|
+
const [thisActiveStep, setActiveStep] = useState24(activeStep);
|
|
10820
10928
|
const handleChange = (step) => {
|
|
10821
10929
|
setActiveStep(step);
|
|
10822
10930
|
onStepChange && onStepChange(step);
|
|
@@ -10833,7 +10941,7 @@ var ProgressTracker = (() => {
|
|
|
10833
10941
|
}, [children]);
|
|
10834
10942
|
const isRow = direction === "row";
|
|
10835
10943
|
const { "aria-label": ariaLabel } = htmlProps;
|
|
10836
|
-
return /* @__PURE__ */
|
|
10944
|
+
return /* @__PURE__ */ jsx288(
|
|
10837
10945
|
ProgressTrackerContext,
|
|
10838
10946
|
{
|
|
10839
10947
|
value: {
|
|
@@ -10841,12 +10949,12 @@ var ProgressTracker = (() => {
|
|
|
10841
10949
|
handleStepChange: handleChange,
|
|
10842
10950
|
direction
|
|
10843
10951
|
},
|
|
10844
|
-
children: /* @__PURE__ */
|
|
10952
|
+
children: /* @__PURE__ */ jsx288(
|
|
10845
10953
|
"nav",
|
|
10846
10954
|
{
|
|
10847
10955
|
"aria-label": ariaLabel != null ? ariaLabel : "stegprogresjon",
|
|
10848
10956
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
10849
|
-
children: /* @__PURE__ */
|
|
10957
|
+
children: /* @__PURE__ */ jsx288(
|
|
10850
10958
|
Box,
|
|
10851
10959
|
{
|
|
10852
10960
|
as: StylelessOList,
|
|
@@ -10897,7 +11005,7 @@ var ProgressBar_default = {
|
|
|
10897
11005
|
};
|
|
10898
11006
|
|
|
10899
11007
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
10900
|
-
import { jsx as
|
|
11008
|
+
import { jsx as jsx289, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
10901
11009
|
var ProgressBar = ({
|
|
10902
11010
|
label,
|
|
10903
11011
|
tip,
|
|
@@ -10924,8 +11032,8 @@ var ProgressBar = ({
|
|
|
10924
11032
|
const fillPrecentage = hasValidValue && value / (max != null ? max : 1) * 100 + "%";
|
|
10925
11033
|
const isIndeterminate = !hasValidValue && !hasErrorMessage;
|
|
10926
11034
|
return /* @__PURE__ */ jsxs74(Box, { width: "100%", className, style, children: [
|
|
10927
|
-
hasLabel ? /* @__PURE__ */
|
|
10928
|
-
/* @__PURE__ */
|
|
11035
|
+
hasLabel ? /* @__PURE__ */ jsx289(Label, { htmlFor: uniqueId, children: label }) : void 0,
|
|
11036
|
+
/* @__PURE__ */ jsx289(
|
|
10929
11037
|
"progress",
|
|
10930
11038
|
{
|
|
10931
11039
|
id: uniqueId,
|
|
@@ -10941,13 +11049,13 @@ var ProgressBar = ({
|
|
|
10941
11049
|
children: fillPrecentage
|
|
10942
11050
|
}
|
|
10943
11051
|
),
|
|
10944
|
-
/* @__PURE__ */
|
|
11052
|
+
/* @__PURE__ */ jsx289(
|
|
10945
11053
|
Box,
|
|
10946
11054
|
{
|
|
10947
11055
|
width: getInputWidth(width),
|
|
10948
11056
|
height: size2 === "small" ? "x0.75" : "x1.5",
|
|
10949
11057
|
className: cn(ProgressBar_default.progress),
|
|
10950
|
-
children: /* @__PURE__ */
|
|
11058
|
+
children: /* @__PURE__ */ jsx289(
|
|
10951
11059
|
Box,
|
|
10952
11060
|
{
|
|
10953
11061
|
height: "100%",
|
|
@@ -10970,7 +11078,7 @@ ProgressBar.displayName = "ProgressBar";
|
|
|
10970
11078
|
// src/components/Search/Search.tsx
|
|
10971
11079
|
import {
|
|
10972
11080
|
useId as useId24,
|
|
10973
|
-
useState as
|
|
11081
|
+
useState as useState25
|
|
10974
11082
|
} from "react";
|
|
10975
11083
|
|
|
10976
11084
|
// src/components/Search/AutocompleteSearch.context.tsx
|
|
@@ -11025,7 +11133,7 @@ function createEmptyChangeEvent(inputElementId) {
|
|
|
11025
11133
|
|
|
11026
11134
|
// src/components/Search/SearchSuggestionItem.tsx
|
|
11027
11135
|
import { useEffect as useEffect28, useRef as useRef31 } from "react";
|
|
11028
|
-
import { jsx as
|
|
11136
|
+
import { jsx as jsx290 } from "react/jsx-runtime";
|
|
11029
11137
|
var SearchSuggestionItem = ({
|
|
11030
11138
|
focus,
|
|
11031
11139
|
className,
|
|
@@ -11040,16 +11148,15 @@ var SearchSuggestionItem = ({
|
|
|
11040
11148
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
11041
11149
|
}
|
|
11042
11150
|
}, [focus]);
|
|
11043
|
-
return /* @__PURE__ */
|
|
11044
|
-
|
|
11151
|
+
return /* @__PURE__ */ jsx290(
|
|
11152
|
+
StylelessButton,
|
|
11045
11153
|
{
|
|
11046
11154
|
ref: combinedRef,
|
|
11047
11155
|
className: cn(
|
|
11048
11156
|
className,
|
|
11049
11157
|
OverflowMenu_default.list__item,
|
|
11050
11158
|
OverflowMenu_default["list__item--link"],
|
|
11051
|
-
focus_default["focusable--inset"]
|
|
11052
|
-
utilStyles_default["normalize-button"]
|
|
11159
|
+
focus_default["focusable--inset"]
|
|
11053
11160
|
),
|
|
11054
11161
|
...rest,
|
|
11055
11162
|
tabIndex: focus ? 0 : -1
|
|
@@ -11059,7 +11166,7 @@ var SearchSuggestionItem = ({
|
|
|
11059
11166
|
SearchSuggestionItem.displayName = "SearchSuggestionItem";
|
|
11060
11167
|
|
|
11061
11168
|
// src/components/Search/SearchSuggestions.tsx
|
|
11062
|
-
import { jsx as
|
|
11169
|
+
import { jsx as jsx291, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
11063
11170
|
var SearchSuggestions = ({
|
|
11064
11171
|
id,
|
|
11065
11172
|
searchId,
|
|
@@ -11102,7 +11209,7 @@ var SearchSuggestions = ({
|
|
|
11102
11209
|
overflowY: "scroll",
|
|
11103
11210
|
marginBlock: "x0.25 0",
|
|
11104
11211
|
children: [
|
|
11105
|
-
/* @__PURE__ */
|
|
11212
|
+
/* @__PURE__ */ jsx291(
|
|
11106
11213
|
Box,
|
|
11107
11214
|
{
|
|
11108
11215
|
as: "h2",
|
|
@@ -11112,8 +11219,8 @@ var SearchSuggestions = ({
|
|
|
11112
11219
|
children: "S\xF8keforslag"
|
|
11113
11220
|
}
|
|
11114
11221
|
),
|
|
11115
|
-
/* @__PURE__ */
|
|
11116
|
-
return /* @__PURE__ */
|
|
11222
|
+
/* @__PURE__ */ jsx291(StylelessList, { role: "listbox", "aria-labelledby": suggestionsHeaderId, children: suggestionsToRender.map((suggestion, index) => {
|
|
11223
|
+
return /* @__PURE__ */ jsx291("li", { role: "option", children: /* @__PURE__ */ jsx291(
|
|
11117
11224
|
SearchSuggestionItem,
|
|
11118
11225
|
{
|
|
11119
11226
|
index,
|
|
@@ -11134,7 +11241,7 @@ var SearchSuggestions = ({
|
|
|
11134
11241
|
SearchSuggestions.displayName = "SearchSuggestions";
|
|
11135
11242
|
|
|
11136
11243
|
// src/components/Search/Search.tsx
|
|
11137
|
-
import { Fragment as Fragment8, jsx as
|
|
11244
|
+
import { Fragment as Fragment8, jsx as jsx292, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
11138
11245
|
var getIconSize2 = (size2) => {
|
|
11139
11246
|
switch (size2) {
|
|
11140
11247
|
case "large":
|
|
@@ -11190,7 +11297,7 @@ var Search = ({
|
|
|
11190
11297
|
uniqueId,
|
|
11191
11298
|
"suggestions-description"
|
|
11192
11299
|
);
|
|
11193
|
-
const [hasValue, setHasValue] =
|
|
11300
|
+
const [hasValue, setHasValue] = useState25(!!value);
|
|
11194
11301
|
const context = useAutocompleteSearch();
|
|
11195
11302
|
const combinedRef = context.inputRef ? useCombinedRef(context.inputRef, ref) : ref;
|
|
11196
11303
|
const handleChange = (e) => {
|
|
@@ -11216,7 +11323,7 @@ var Search = ({
|
|
|
11216
11323
|
width: !showSearchButton ? width : void 0,
|
|
11217
11324
|
className: !showSearchButton ? className : void 0,
|
|
11218
11325
|
children: [
|
|
11219
|
-
showIcon && /* @__PURE__ */
|
|
11326
|
+
showIcon && /* @__PURE__ */ jsx292(
|
|
11220
11327
|
Icon,
|
|
11221
11328
|
{
|
|
11222
11329
|
icon: SearchIcon,
|
|
@@ -11227,7 +11334,7 @@ var Search = ({
|
|
|
11227
11334
|
)
|
|
11228
11335
|
}
|
|
11229
11336
|
),
|
|
11230
|
-
/* @__PURE__ */
|
|
11337
|
+
/* @__PURE__ */ jsx292(
|
|
11231
11338
|
Box,
|
|
11232
11339
|
{
|
|
11233
11340
|
as: Input,
|
|
@@ -11257,7 +11364,7 @@ var Search = ({
|
|
|
11257
11364
|
}
|
|
11258
11365
|
),
|
|
11259
11366
|
hasSuggestions && /* @__PURE__ */ jsxs76(Fragment8, { children: [
|
|
11260
|
-
/* @__PURE__ */
|
|
11367
|
+
/* @__PURE__ */ jsx292(
|
|
11261
11368
|
SearchSuggestions,
|
|
11262
11369
|
{
|
|
11263
11370
|
id: suggestionsId,
|
|
@@ -11269,9 +11376,9 @@ var Search = ({
|
|
|
11269
11376
|
componentSize
|
|
11270
11377
|
}
|
|
11271
11378
|
),
|
|
11272
|
-
/* @__PURE__ */
|
|
11379
|
+
/* @__PURE__ */ jsx292(VisuallyHidden, { id: suggestionsDescriptionId, children: "Bla i s\xF8keforslag med piltaster n\xE5r listen er utvidet." })
|
|
11273
11380
|
] }),
|
|
11274
|
-
hasValue && /* @__PURE__ */
|
|
11381
|
+
hasValue && /* @__PURE__ */ jsx292(
|
|
11275
11382
|
Button,
|
|
11276
11383
|
{
|
|
11277
11384
|
icon: CloseSmallIcon,
|
|
@@ -11286,7 +11393,7 @@ var Search = ({
|
|
|
11286
11393
|
}
|
|
11287
11394
|
);
|
|
11288
11395
|
return /* @__PURE__ */ jsxs76(VStack, { gap: "x0.125", children: [
|
|
11289
|
-
hasLabel && /* @__PURE__ */
|
|
11396
|
+
hasLabel && /* @__PURE__ */ jsx292(Label, { htmlFor: uniqueId, children: label }),
|
|
11290
11397
|
/* @__PURE__ */ jsxs76("div", { children: [
|
|
11291
11398
|
showSearchButton ? /* @__PURE__ */ jsxs76(
|
|
11292
11399
|
Grid,
|
|
@@ -11300,7 +11407,7 @@ var Search = ({
|
|
|
11300
11407
|
style,
|
|
11301
11408
|
children: [
|
|
11302
11409
|
inputGroup,
|
|
11303
|
-
/* @__PURE__ */
|
|
11410
|
+
/* @__PURE__ */ jsx292(
|
|
11304
11411
|
Button,
|
|
11305
11412
|
{
|
|
11306
11413
|
size: componentSize,
|
|
@@ -11322,9 +11429,9 @@ Search.displayName = "Search";
|
|
|
11322
11429
|
import {
|
|
11323
11430
|
useEffect as useEffect29,
|
|
11324
11431
|
useRef as useRef32,
|
|
11325
|
-
useState as
|
|
11432
|
+
useState as useState26
|
|
11326
11433
|
} from "react";
|
|
11327
|
-
import { jsx as
|
|
11434
|
+
import { jsx as jsx293 } from "react/jsx-runtime";
|
|
11328
11435
|
var SearchAutocompleteWrapper = (props) => {
|
|
11329
11436
|
const {
|
|
11330
11437
|
value,
|
|
@@ -11335,9 +11442,9 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
11335
11442
|
onSuggestionSelection,
|
|
11336
11443
|
children
|
|
11337
11444
|
} = props;
|
|
11338
|
-
const [inputValue, setInputValue] =
|
|
11339
|
-
const [suggestions, setSuggestions] =
|
|
11340
|
-
const [showSuggestions, setShowSuggestions] =
|
|
11445
|
+
const [inputValue, setInputValue] = useState26(value != null ? value : "");
|
|
11446
|
+
const [suggestions, setSuggestions] = useState26([]);
|
|
11447
|
+
const [showSuggestions, setShowSuggestions] = useState26(false);
|
|
11341
11448
|
const closeSuggestions = () => showSuggestions === true && setShowSuggestions(false);
|
|
11342
11449
|
const openSuggestions = () => showSuggestions === false && setShowSuggestions(true);
|
|
11343
11450
|
useEffect29(() => {
|
|
@@ -11400,7 +11507,7 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
11400
11507
|
inputValue,
|
|
11401
11508
|
onSugggestionClick: handleSuggestionClick
|
|
11402
11509
|
};
|
|
11403
|
-
return /* @__PURE__ */
|
|
11510
|
+
return /* @__PURE__ */ jsx293(AutocompleteSearchContext, { value: contextProps, children });
|
|
11404
11511
|
};
|
|
11405
11512
|
SearchAutocompleteWrapper.displayName = "SearchAutocompleteWrapper";
|
|
11406
11513
|
|
|
@@ -11416,7 +11523,7 @@ var Skeleton_default = {
|
|
|
11416
11523
|
};
|
|
11417
11524
|
|
|
11418
11525
|
// src/components/Skeleton/Skeleton.tsx
|
|
11419
|
-
import { jsx as
|
|
11526
|
+
import { jsx as jsx294 } from "react/jsx-runtime";
|
|
11420
11527
|
var Skeleton = ({
|
|
11421
11528
|
width,
|
|
11422
11529
|
height,
|
|
@@ -11426,7 +11533,7 @@ var Skeleton = ({
|
|
|
11426
11533
|
ref,
|
|
11427
11534
|
...rest
|
|
11428
11535
|
}) => {
|
|
11429
|
-
return /* @__PURE__ */
|
|
11536
|
+
return /* @__PURE__ */ jsx294(
|
|
11430
11537
|
Box,
|
|
11431
11538
|
{
|
|
11432
11539
|
width,
|
|
@@ -11446,7 +11553,7 @@ var SkipToContent_default = {
|
|
|
11446
11553
|
};
|
|
11447
11554
|
|
|
11448
11555
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
11449
|
-
import { jsx as
|
|
11556
|
+
import { jsx as jsx295 } from "react/jsx-runtime";
|
|
11450
11557
|
var SkipToContent = ({
|
|
11451
11558
|
text = "Til hovedinnhold",
|
|
11452
11559
|
top = 0,
|
|
@@ -11456,19 +11563,19 @@ var SkipToContent = ({
|
|
|
11456
11563
|
...rest
|
|
11457
11564
|
}) => {
|
|
11458
11565
|
const { className: htmlPropsClassName, style, ...restHtmlProps } = htmlProps;
|
|
11459
|
-
return /* @__PURE__ */
|
|
11566
|
+
return /* @__PURE__ */ jsx295(
|
|
11460
11567
|
Contrast,
|
|
11461
11568
|
{
|
|
11462
11569
|
className: cn(className, htmlPropsClassName, SkipToContent_default.wrapper),
|
|
11463
11570
|
style: { ...style, top },
|
|
11464
|
-
children: /* @__PURE__ */
|
|
11571
|
+
children: /* @__PURE__ */ jsx295(Link, { ...getBaseHTMLProps(id, restHtmlProps, rest), children: text })
|
|
11465
11572
|
}
|
|
11466
11573
|
);
|
|
11467
11574
|
};
|
|
11468
11575
|
SkipToContent.displayName = "SkipToContent";
|
|
11469
11576
|
|
|
11470
11577
|
// src/components/SplitButton/SplitButton.tsx
|
|
11471
|
-
import { useState as
|
|
11578
|
+
import { useState as useState27 } from "react";
|
|
11472
11579
|
|
|
11473
11580
|
// src/components/SplitButton/SplitButton.module.css
|
|
11474
11581
|
var SplitButton_default = {
|
|
@@ -11479,7 +11586,7 @@ var SplitButton_default = {
|
|
|
11479
11586
|
};
|
|
11480
11587
|
|
|
11481
11588
|
// src/components/SplitButton/SplitButton.tsx
|
|
11482
|
-
import { jsx as
|
|
11589
|
+
import { jsx as jsx296, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
11483
11590
|
var SplitButton = ({
|
|
11484
11591
|
size: size2,
|
|
11485
11592
|
primaryAction,
|
|
@@ -11488,13 +11595,13 @@ var SplitButton = ({
|
|
|
11488
11595
|
className,
|
|
11489
11596
|
...rest
|
|
11490
11597
|
}) => {
|
|
11491
|
-
const [isOpen, setIsOpen] =
|
|
11598
|
+
const [isOpen, setIsOpen] = useState27(false);
|
|
11492
11599
|
const buttonStyleProps = {
|
|
11493
11600
|
purpose,
|
|
11494
11601
|
size: size2
|
|
11495
11602
|
};
|
|
11496
11603
|
return /* @__PURE__ */ jsxs77("div", { className: cn(className, SplitButton_default.container), ...rest, children: [
|
|
11497
|
-
/* @__PURE__ */
|
|
11604
|
+
/* @__PURE__ */ jsx296(
|
|
11498
11605
|
Button,
|
|
11499
11606
|
{
|
|
11500
11607
|
...buttonStyleProps,
|
|
@@ -11504,7 +11611,7 @@ var SplitButton = ({
|
|
|
11504
11611
|
}
|
|
11505
11612
|
),
|
|
11506
11613
|
/* @__PURE__ */ jsxs77(OverflowMenuGroup, { isOpen, setIsOpen, children: [
|
|
11507
|
-
/* @__PURE__ */
|
|
11614
|
+
/* @__PURE__ */ jsx296(
|
|
11508
11615
|
Button,
|
|
11509
11616
|
{
|
|
11510
11617
|
...buttonStyleProps,
|
|
@@ -11518,7 +11625,7 @@ var SplitButton = ({
|
|
|
11518
11625
|
type: "button"
|
|
11519
11626
|
}
|
|
11520
11627
|
),
|
|
11521
|
-
/* @__PURE__ */
|
|
11628
|
+
/* @__PURE__ */ jsx296(OverflowMenu, { placement: "bottom-end", children: /* @__PURE__ */ jsx296(OverflowMenuList, { children: secondaryActions.map((item, index) => /* @__PURE__ */ jsx296(OverflowMenuButton, { ...item, children: item.children }, index)) }) })
|
|
11522
11629
|
] })
|
|
11523
11630
|
] });
|
|
11524
11631
|
};
|
|
@@ -11531,7 +11638,7 @@ import {
|
|
|
11531
11638
|
cloneElement as cloneElement6,
|
|
11532
11639
|
isValidElement as isValidElement6,
|
|
11533
11640
|
useEffect as useEffect31,
|
|
11534
|
-
useState as
|
|
11641
|
+
useState as useState29
|
|
11535
11642
|
} from "react";
|
|
11536
11643
|
|
|
11537
11644
|
// src/components/Table/collapsible/Table.context.tsx
|
|
@@ -11543,14 +11650,14 @@ var CollapsibleTableContext = createContext15({
|
|
|
11543
11650
|
var useCollapsibleTableContext = () => useContext22(CollapsibleTableContext);
|
|
11544
11651
|
|
|
11545
11652
|
// src/components/Table/normal/Body.tsx
|
|
11546
|
-
import { jsx as
|
|
11547
|
-
var Body = (props) => /* @__PURE__ */
|
|
11653
|
+
import { jsx as jsx297 } from "react/jsx-runtime";
|
|
11654
|
+
var Body = (props) => /* @__PURE__ */ jsx297("tbody", { ...props });
|
|
11548
11655
|
Body.displayName = "Table.Body";
|
|
11549
11656
|
|
|
11550
11657
|
// src/components/Table/normal/Head.tsx
|
|
11551
11658
|
import { createContext as createContext16, useContext as useContext23 } from "react";
|
|
11552
|
-
import { jsx as
|
|
11553
|
-
var Head = ({ children, ...rest }) => /* @__PURE__ */
|
|
11659
|
+
import { jsx as jsx298 } from "react/jsx-runtime";
|
|
11660
|
+
var Head = ({ children, ...rest }) => /* @__PURE__ */ jsx298("thead", { ...rest, children: /* @__PURE__ */ jsx298(HeadContext, { value: true, children }) });
|
|
11554
11661
|
var HeadContext = createContext16(false);
|
|
11555
11662
|
function useIsInTableHead() {
|
|
11556
11663
|
const isInTableHead = useContext23(HeadContext);
|
|
@@ -11583,7 +11690,7 @@ var Table_default = {
|
|
|
11583
11690
|
};
|
|
11584
11691
|
|
|
11585
11692
|
// src/components/Table/normal/Cell.tsx
|
|
11586
|
-
import { jsx as
|
|
11693
|
+
import { jsx as jsx299 } from "react/jsx-runtime";
|
|
11587
11694
|
var Cell = ({
|
|
11588
11695
|
children,
|
|
11589
11696
|
type: _type,
|
|
@@ -11596,7 +11703,7 @@ var Cell = ({
|
|
|
11596
11703
|
const type = _type != null ? _type : isInHead ? "head" : "data";
|
|
11597
11704
|
const { isCollapsibleChild } = collapsibleProps != null ? collapsibleProps : {};
|
|
11598
11705
|
const isComplexLayout = layout === "text and icon";
|
|
11599
|
-
return isCollapsibleChild ? /* @__PURE__ */
|
|
11706
|
+
return isCollapsibleChild ? /* @__PURE__ */ jsx299(DescriptionListDesc, { children }) : type === "head" ? /* @__PURE__ */ jsx299(
|
|
11600
11707
|
"th",
|
|
11601
11708
|
{
|
|
11602
11709
|
...rest,
|
|
@@ -11605,26 +11712,26 @@ var Cell = ({
|
|
|
11605
11712
|
!isComplexLayout && Table_default[`cell--${layout}`],
|
|
11606
11713
|
Table_default["cell--head"]
|
|
11607
11714
|
),
|
|
11608
|
-
children: isComplexLayout ? /* @__PURE__ */
|
|
11715
|
+
children: isComplexLayout ? /* @__PURE__ */ jsx299("div", { className: Table_default.cell__inner, children }) : children
|
|
11609
11716
|
}
|
|
11610
|
-
) : /* @__PURE__ */
|
|
11717
|
+
) : /* @__PURE__ */ jsx299(
|
|
11611
11718
|
"td",
|
|
11612
11719
|
{
|
|
11613
11720
|
...rest,
|
|
11614
11721
|
className: cn(className, !isComplexLayout && Table_default[`cell--${layout}`]),
|
|
11615
|
-
children: isComplexLayout ? /* @__PURE__ */
|
|
11722
|
+
children: isComplexLayout ? /* @__PURE__ */ jsx299("div", { className: Table_default.cell__inner, children }) : children
|
|
11616
11723
|
}
|
|
11617
11724
|
);
|
|
11618
11725
|
};
|
|
11619
11726
|
Cell.displayName = "Table.Cell";
|
|
11620
11727
|
|
|
11621
11728
|
// src/components/Table/normal/Foot.tsx
|
|
11622
|
-
import { jsx as
|
|
11623
|
-
var Foot = (props) => /* @__PURE__ */
|
|
11729
|
+
import { jsx as jsx300 } from "react/jsx-runtime";
|
|
11730
|
+
var Foot = (props) => /* @__PURE__ */ jsx300("tfoot", { ...props });
|
|
11624
11731
|
Foot.displayName = "Table.Foot";
|
|
11625
11732
|
|
|
11626
11733
|
// src/components/Table/normal/Row.tsx
|
|
11627
|
-
import { jsx as
|
|
11734
|
+
import { jsx as jsx301 } from "react/jsx-runtime";
|
|
11628
11735
|
var Row = ({
|
|
11629
11736
|
type: _type,
|
|
11630
11737
|
mode = "normal",
|
|
@@ -11635,7 +11742,7 @@ var Row = ({
|
|
|
11635
11742
|
}) => {
|
|
11636
11743
|
const isInHeader = useIsInTableHead();
|
|
11637
11744
|
const type = _type != null ? _type : isInHeader ? "head" : "body";
|
|
11638
|
-
return /* @__PURE__ */
|
|
11745
|
+
return /* @__PURE__ */ jsx301(
|
|
11639
11746
|
"tr",
|
|
11640
11747
|
{
|
|
11641
11748
|
className: cn(
|
|
@@ -11655,12 +11762,12 @@ var Row = ({
|
|
|
11655
11762
|
Row.displayName = "Table.Row";
|
|
11656
11763
|
|
|
11657
11764
|
// src/components/Table/normal/SortCell.tsx
|
|
11658
|
-
import { jsx as
|
|
11765
|
+
import { jsx as jsx302, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
11659
11766
|
var makeSortIcon = (isSorted, sortOrder) => {
|
|
11660
11767
|
if (!isSorted || !sortOrder) {
|
|
11661
|
-
return /* @__PURE__ */
|
|
11768
|
+
return /* @__PURE__ */ jsx302(Icon, { icon: UnfoldMoreIcon, iconSize: "inherit" });
|
|
11662
11769
|
}
|
|
11663
|
-
return sortOrder === "ascending" ? /* @__PURE__ */
|
|
11770
|
+
return sortOrder === "ascending" ? /* @__PURE__ */ jsx302(Icon, { icon: ChevronDownIcon, iconSize: "inherit" }) : /* @__PURE__ */ jsx302(Icon, { icon: ChevronUpIcon, iconSize: "inherit" });
|
|
11664
11771
|
};
|
|
11665
11772
|
var SortCell = ({
|
|
11666
11773
|
isSorted,
|
|
@@ -11668,23 +11775,18 @@ var SortCell = ({
|
|
|
11668
11775
|
onClick,
|
|
11669
11776
|
children,
|
|
11670
11777
|
...rest
|
|
11671
|
-
}) => /* @__PURE__ */
|
|
11778
|
+
}) => /* @__PURE__ */ jsx302(
|
|
11672
11779
|
Cell,
|
|
11673
11780
|
{
|
|
11674
11781
|
type: "head",
|
|
11675
11782
|
"aria-sort": isSorted && sortOrder ? sortOrder : void 0,
|
|
11676
11783
|
...rest,
|
|
11677
11784
|
children: /* @__PURE__ */ jsxs78(
|
|
11678
|
-
|
|
11785
|
+
StylelessButton,
|
|
11679
11786
|
{
|
|
11680
11787
|
onClick,
|
|
11681
11788
|
"aria-description": "Aktiver for \xE5 endre sorteringsrekkef\xF8lge",
|
|
11682
|
-
className: cn(
|
|
11683
|
-
utilStyles_default["normalize-button"],
|
|
11684
|
-
utilStyles_default["remove-button-styling"],
|
|
11685
|
-
Table_default["sort-button"],
|
|
11686
|
-
focusable
|
|
11687
|
-
),
|
|
11789
|
+
className: cn(Table_default["sort-button"], focusable),
|
|
11688
11790
|
children: [
|
|
11689
11791
|
children,
|
|
11690
11792
|
" ",
|
|
@@ -11697,7 +11799,7 @@ var SortCell = ({
|
|
|
11697
11799
|
SortCell.displayName = "Table.SortCell";
|
|
11698
11800
|
|
|
11699
11801
|
// src/components/Table/normal/Table.tsx
|
|
11700
|
-
import { jsx as
|
|
11802
|
+
import { jsx as jsx303 } from "react/jsx-runtime";
|
|
11701
11803
|
var Table = ({
|
|
11702
11804
|
size: size2 = "medium",
|
|
11703
11805
|
stickyHeader,
|
|
@@ -11705,7 +11807,7 @@ var Table = ({
|
|
|
11705
11807
|
className,
|
|
11706
11808
|
children,
|
|
11707
11809
|
...rest
|
|
11708
|
-
}) => /* @__PURE__ */
|
|
11810
|
+
}) => /* @__PURE__ */ jsx303(
|
|
11709
11811
|
"table",
|
|
11710
11812
|
{
|
|
11711
11813
|
...rest,
|
|
@@ -11727,15 +11829,15 @@ import {
|
|
|
11727
11829
|
useContext as useContext24,
|
|
11728
11830
|
useEffect as useEffect30,
|
|
11729
11831
|
useRef as useRef33,
|
|
11730
|
-
useState as
|
|
11832
|
+
useState as useState28
|
|
11731
11833
|
} from "react";
|
|
11732
|
-
import { jsx as
|
|
11834
|
+
import { jsx as jsx304 } from "react/jsx-runtime";
|
|
11733
11835
|
var TableWrapper = ({ className, ...rest }) => {
|
|
11734
11836
|
const themeContext = useContext24(ThemeContext);
|
|
11735
11837
|
const container2 = themeContext == null ? void 0 : themeContext.el;
|
|
11736
11838
|
const containerWidth = container2 ? container2.clientWidth : 0;
|
|
11737
|
-
const [overflowX, setOverflowX] =
|
|
11738
|
-
const [themeContainerWidth, setThemeContainerWidth] =
|
|
11839
|
+
const [overflowX, setOverflowX] = useState28(false);
|
|
11840
|
+
const [themeContainerWidth, setThemeContainerWidth] = useState28(containerWidth);
|
|
11739
11841
|
function isOverflowingX(event) {
|
|
11740
11842
|
return event.offsetWidth < event.scrollWidth;
|
|
11741
11843
|
}
|
|
@@ -11754,7 +11856,7 @@ var TableWrapper = ({ className, ...rest }) => {
|
|
|
11754
11856
|
window.addEventListener("resize", handleResize);
|
|
11755
11857
|
return () => window.removeEventListener("resize", handleResize);
|
|
11756
11858
|
});
|
|
11757
|
-
return /* @__PURE__ */
|
|
11859
|
+
return /* @__PURE__ */ jsx304(
|
|
11758
11860
|
"div",
|
|
11759
11861
|
{
|
|
11760
11862
|
ref: wrapperRef,
|
|
@@ -11781,7 +11883,7 @@ Table2.Row = Row;
|
|
|
11781
11883
|
Table2.Foot = Foot;
|
|
11782
11884
|
|
|
11783
11885
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
11784
|
-
import { Fragment as Fragment10, jsx as
|
|
11886
|
+
import { Fragment as Fragment10, jsx as jsx305, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
11785
11887
|
var CollapsibleRow = ({
|
|
11786
11888
|
type: _type,
|
|
11787
11889
|
className,
|
|
@@ -11795,7 +11897,7 @@ var CollapsibleRow = ({
|
|
|
11795
11897
|
const isInHead = useIsInTableHead();
|
|
11796
11898
|
const type = _type != null ? _type : isInHead ? "head" : "body";
|
|
11797
11899
|
const { isCollapsed, headerValues, definingColumnIndex } = useCollapsibleTableContext();
|
|
11798
|
-
const [childrenCollapsed, setChildrenCollapsed] =
|
|
11900
|
+
const [childrenCollapsed, setChildrenCollapsed] = useState29(true);
|
|
11799
11901
|
useEffect31(() => {
|
|
11800
11902
|
!isCollapsed && setChildrenCollapsed(true);
|
|
11801
11903
|
}, [isCollapsed]);
|
|
@@ -11824,23 +11926,23 @@ var CollapsibleRow = ({
|
|
|
11824
11926
|
const id = derivativeIdGenerator(prefix2, index.toString());
|
|
11825
11927
|
collapsibleIds.push(id);
|
|
11826
11928
|
return /* @__PURE__ */ jsxs79(Fragment9, { children: [
|
|
11827
|
-
/* @__PURE__ */
|
|
11929
|
+
/* @__PURE__ */ jsx305(DescriptionListTerm, { children: collapsedHeaderValues[index].content }),
|
|
11828
11930
|
isValidElement6(child) && cloneElement6(child, {
|
|
11829
11931
|
collapsibleProps: { isCollapsibleChild: true }
|
|
11830
11932
|
})
|
|
11831
11933
|
] }, `DL-${index}`);
|
|
11832
11934
|
}) : null;
|
|
11833
|
-
const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */
|
|
11935
|
+
const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsx305(Row, { ...rowProps(), children: /* @__PURE__ */ jsx305(Cell, { colSpan: definingColumnIndex.length + 1, children: /* @__PURE__ */ jsx305(DescriptionList, { children: collapsedRenderedChildren }) }) }) : null;
|
|
11834
11936
|
const definingColumnCells = childrenArray.slice().filter((column, index) => definingColumnIndex.indexOf(index) > -1).sort((a, b) => {
|
|
11835
11937
|
return definingColumnIndex.indexOf(childrenArray.indexOf(a)) - definingColumnIndex.indexOf(childrenArray.indexOf(b));
|
|
11836
11938
|
});
|
|
11837
11939
|
const headerRow = () => {
|
|
11838
11940
|
if (type !== "head" || !isCollapsed) return null;
|
|
11839
|
-
return /* @__PURE__ */
|
|
11941
|
+
return /* @__PURE__ */ jsx305(Row, { ref, ...rowProps(), children: /* @__PURE__ */ jsxs79(Fragment10, { children: [
|
|
11840
11942
|
definingColumnCells,
|
|
11841
11943
|
/* @__PURE__ */ jsxs79(Table2.Cell, { type: "head", layout: "center", children: [
|
|
11842
11944
|
"Utvid",
|
|
11843
|
-
/* @__PURE__ */
|
|
11945
|
+
/* @__PURE__ */ jsx305(VisuallyHidden, { children: "raden" })
|
|
11844
11946
|
] })
|
|
11845
11947
|
] }) });
|
|
11846
11948
|
};
|
|
@@ -11849,19 +11951,14 @@ var CollapsibleRow = ({
|
|
|
11849
11951
|
if (type !== "body" || !isCollapsed) return null;
|
|
11850
11952
|
return /* @__PURE__ */ jsxs79(Row, { ref, ...rowProps(!childrenCollapsed && true), children: [
|
|
11851
11953
|
definingColumnCells,
|
|
11852
|
-
/* @__PURE__ */
|
|
11853
|
-
|
|
11954
|
+
/* @__PURE__ */ jsx305(Table2.Cell, { children: /* @__PURE__ */ jsx305(
|
|
11955
|
+
StylelessButton,
|
|
11854
11956
|
{
|
|
11855
11957
|
onClick: () => setChildrenCollapsed(!childrenCollapsed),
|
|
11856
11958
|
"aria-expanded": !childrenCollapsed,
|
|
11857
11959
|
"aria-controls": idList,
|
|
11858
|
-
className: cn(
|
|
11859
|
-
|
|
11860
|
-
utilStyles_default["normalize-button"],
|
|
11861
|
-
utilStyles_default["remove-button-styling"],
|
|
11862
|
-
focusable
|
|
11863
|
-
),
|
|
11864
|
-
children: /* @__PURE__ */ jsx304(
|
|
11960
|
+
className: cn(Table_default["collapse-button"], focusable),
|
|
11961
|
+
children: /* @__PURE__ */ jsx305(
|
|
11865
11962
|
AnimatedChevronUpDown,
|
|
11866
11963
|
{
|
|
11867
11964
|
isUp: childrenCollapsed ? false : true,
|
|
@@ -11879,19 +11976,19 @@ var CollapsibleRow = ({
|
|
|
11879
11976
|
rowWithChevron(),
|
|
11880
11977
|
childrenCollapsed ? null : collapsedRows
|
|
11881
11978
|
] })
|
|
11882
|
-
] }) : /* @__PURE__ */
|
|
11979
|
+
] }) : /* @__PURE__ */ jsx305(Row, { ref, ...rowProps(), children });
|
|
11883
11980
|
};
|
|
11884
11981
|
CollapsibleRow.displayName = "CollapsibleTable.Row";
|
|
11885
11982
|
|
|
11886
11983
|
// src/components/Table/collapsible/CollapsibleTable.tsx
|
|
11887
|
-
import { jsx as
|
|
11984
|
+
import { jsx as jsx306 } from "react/jsx-runtime";
|
|
11888
11985
|
var CollapsibleTable = ({
|
|
11889
11986
|
isCollapsed,
|
|
11890
11987
|
headerValues,
|
|
11891
11988
|
definingColumnIndex = [0],
|
|
11892
11989
|
...rest
|
|
11893
11990
|
}) => {
|
|
11894
|
-
return /* @__PURE__ */
|
|
11991
|
+
return /* @__PURE__ */ jsx306(
|
|
11895
11992
|
CollapsibleTableContext,
|
|
11896
11993
|
{
|
|
11897
11994
|
value: {
|
|
@@ -11899,7 +11996,7 @@ var CollapsibleTable = ({
|
|
|
11899
11996
|
headerValues,
|
|
11900
11997
|
definingColumnIndex
|
|
11901
11998
|
},
|
|
11902
|
-
children: /* @__PURE__ */
|
|
11999
|
+
children: /* @__PURE__ */ jsx306(Table2, { ...rest })
|
|
11903
12000
|
}
|
|
11904
12001
|
);
|
|
11905
12002
|
};
|
|
@@ -11950,13 +12047,13 @@ import {
|
|
|
11950
12047
|
useContext as useContext26,
|
|
11951
12048
|
useLayoutEffect as useLayoutEffect3
|
|
11952
12049
|
} from "react";
|
|
11953
|
-
import { jsx as
|
|
12050
|
+
import { jsx as jsx307 } from "react/jsx-runtime";
|
|
11954
12051
|
var TabContext = createContext18(null);
|
|
11955
12052
|
function TabWidthContextProvider({
|
|
11956
12053
|
children,
|
|
11957
12054
|
onChangeWidths
|
|
11958
12055
|
}) {
|
|
11959
|
-
return /* @__PURE__ */
|
|
12056
|
+
return /* @__PURE__ */ jsx307(
|
|
11960
12057
|
TabContext,
|
|
11961
12058
|
{
|
|
11962
12059
|
value: {
|
|
@@ -11988,7 +12085,7 @@ function useSetTabWidth(index, width) {
|
|
|
11988
12085
|
}
|
|
11989
12086
|
|
|
11990
12087
|
// src/components/Tabs/AddTabButton.tsx
|
|
11991
|
-
import { jsx as
|
|
12088
|
+
import { jsx as jsx308, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
11992
12089
|
var AddTabButton = ({
|
|
11993
12090
|
ref,
|
|
11994
12091
|
children,
|
|
@@ -12014,8 +12111,8 @@ var AddTabButton = ({
|
|
|
12014
12111
|
focus_default["focusable--inset"]
|
|
12015
12112
|
),
|
|
12016
12113
|
children: [
|
|
12017
|
-
/* @__PURE__ */
|
|
12018
|
-
/* @__PURE__ */
|
|
12114
|
+
/* @__PURE__ */ jsx308(Icon, { icon: PlusIcon, iconSize: "inherit" }),
|
|
12115
|
+
/* @__PURE__ */ jsx308("span", { children })
|
|
12019
12116
|
]
|
|
12020
12117
|
}
|
|
12021
12118
|
);
|
|
@@ -12023,8 +12120,8 @@ var AddTabButton = ({
|
|
|
12023
12120
|
AddTabButton.displayName = "AddTabButton";
|
|
12024
12121
|
|
|
12025
12122
|
// src/components/Tabs/Tabs.tsx
|
|
12026
|
-
import { useEffect as useEffect32, useId as useId25, useRef as useRef35, useState as
|
|
12027
|
-
import { jsx as
|
|
12123
|
+
import { useEffect as useEffect32, useId as useId25, useRef as useRef35, useState as useState30 } from "react";
|
|
12124
|
+
import { jsx as jsx309 } from "react/jsx-runtime";
|
|
12028
12125
|
var Tabs = ({
|
|
12029
12126
|
id,
|
|
12030
12127
|
activeTab,
|
|
@@ -12040,8 +12137,8 @@ var Tabs = ({
|
|
|
12040
12137
|
}) => {
|
|
12041
12138
|
const generatedId = useId25();
|
|
12042
12139
|
const uniqueId = id != null ? id : `${generatedId}-tabs`;
|
|
12043
|
-
const [thisActiveTab, setActiveTab] =
|
|
12044
|
-
const [hasTabFocus, setHasTabFocus] =
|
|
12140
|
+
const [thisActiveTab, setActiveTab] = useState30(activeTab != null ? activeTab : 0);
|
|
12141
|
+
const [hasTabFocus, setHasTabFocus] = useState30(false);
|
|
12045
12142
|
const tabListRef = useRef35(null);
|
|
12046
12143
|
const tabPanelsRef = useRef35(null);
|
|
12047
12144
|
const handleTabChange = (index) => {
|
|
@@ -12053,7 +12150,7 @@ var Tabs = ({
|
|
|
12053
12150
|
setActiveTab(activeTab);
|
|
12054
12151
|
}
|
|
12055
12152
|
}, [activeTab, thisActiveTab]);
|
|
12056
|
-
return /* @__PURE__ */
|
|
12153
|
+
return /* @__PURE__ */ jsx309(
|
|
12057
12154
|
TabsContext,
|
|
12058
12155
|
{
|
|
12059
12156
|
value: {
|
|
@@ -12068,7 +12165,7 @@ var Tabs = ({
|
|
|
12068
12165
|
tabContentDirection,
|
|
12069
12166
|
addTabButtonProps
|
|
12070
12167
|
},
|
|
12071
|
-
children: /* @__PURE__ */
|
|
12168
|
+
children: /* @__PURE__ */ jsx309(
|
|
12072
12169
|
Box,
|
|
12073
12170
|
{
|
|
12074
12171
|
...getBaseHTMLProps(
|
|
@@ -12092,7 +12189,7 @@ import {
|
|
|
12092
12189
|
useEffect as useEffect33,
|
|
12093
12190
|
useRef as useRef36
|
|
12094
12191
|
} from "react";
|
|
12095
|
-
import { jsx as
|
|
12192
|
+
import { jsx as jsx310, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
12096
12193
|
var Tab = ({
|
|
12097
12194
|
active = false,
|
|
12098
12195
|
icon,
|
|
@@ -12158,8 +12255,8 @@ var Tab = ({
|
|
|
12158
12255
|
onKeyDown: handleOnKeyDown,
|
|
12159
12256
|
tabIndex: focus ? 0 : -1,
|
|
12160
12257
|
children: [
|
|
12161
|
-
icon && /* @__PURE__ */
|
|
12162
|
-
/* @__PURE__ */
|
|
12258
|
+
icon && /* @__PURE__ */ jsx310(Icon, { icon, iconSize: "inherit" }),
|
|
12259
|
+
/* @__PURE__ */ jsx310("span", { children })
|
|
12163
12260
|
]
|
|
12164
12261
|
}
|
|
12165
12262
|
);
|
|
@@ -12171,9 +12268,9 @@ import {
|
|
|
12171
12268
|
Children as Children5,
|
|
12172
12269
|
cloneElement as cloneElement7,
|
|
12173
12270
|
isValidElement as isValidElement7,
|
|
12174
|
-
useState as
|
|
12271
|
+
useState as useState31
|
|
12175
12272
|
} from "react";
|
|
12176
|
-
import { jsx as
|
|
12273
|
+
import { jsx as jsx311, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
12177
12274
|
var TabList = ({
|
|
12178
12275
|
children,
|
|
12179
12276
|
id,
|
|
@@ -12213,7 +12310,7 @@ var TabList = ({
|
|
|
12213
12310
|
onClick: combineHandlers(handleThisTabChange, child.props.onClick)
|
|
12214
12311
|
});
|
|
12215
12312
|
}) : [];
|
|
12216
|
-
const [widths, setWidths] =
|
|
12313
|
+
const [widths, setWidths] = useState31([]);
|
|
12217
12314
|
const handleOnFocus = (event) => {
|
|
12218
12315
|
setHasTabFocus(true);
|
|
12219
12316
|
onFocus && onFocus(event);
|
|
@@ -12231,7 +12328,7 @@ var TabList = ({
|
|
|
12231
12328
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12232
12329
|
["--dds-tab-widths"]: widths.join(" ")
|
|
12233
12330
|
};
|
|
12234
|
-
return /* @__PURE__ */
|
|
12331
|
+
return /* @__PURE__ */ jsx311(TabWidthContextProvider, { onChangeWidths: setWidths, children: /* @__PURE__ */ jsxs82(
|
|
12235
12332
|
"div",
|
|
12236
12333
|
{
|
|
12237
12334
|
...rest,
|
|
@@ -12251,7 +12348,7 @@ var TabList = ({
|
|
|
12251
12348
|
style: { ...style, ...customWidths },
|
|
12252
12349
|
children: [
|
|
12253
12350
|
tabListChildren,
|
|
12254
|
-
hasButton && /* @__PURE__ */
|
|
12351
|
+
hasButton && /* @__PURE__ */ jsx311(
|
|
12255
12352
|
AddTabButton,
|
|
12256
12353
|
{
|
|
12257
12354
|
index: tabListChildren ? tabListChildren.length : 0,
|
|
@@ -12265,7 +12362,7 @@ var TabList = ({
|
|
|
12265
12362
|
TabList.displayName = "TabList";
|
|
12266
12363
|
|
|
12267
12364
|
// src/components/Tabs/TabPanel.tsx
|
|
12268
|
-
import { jsx as
|
|
12365
|
+
import { jsx as jsx312 } from "react/jsx-runtime";
|
|
12269
12366
|
var TabPanel = ({
|
|
12270
12367
|
active = false,
|
|
12271
12368
|
children,
|
|
@@ -12273,7 +12370,7 @@ var TabPanel = ({
|
|
|
12273
12370
|
className,
|
|
12274
12371
|
htmlProps,
|
|
12275
12372
|
...rest
|
|
12276
|
-
}) => /* @__PURE__ */
|
|
12373
|
+
}) => /* @__PURE__ */ jsx312(
|
|
12277
12374
|
Box,
|
|
12278
12375
|
{
|
|
12279
12376
|
padding: "x0.25",
|
|
@@ -12292,7 +12389,7 @@ import {
|
|
|
12292
12389
|
cloneElement as cloneElement8,
|
|
12293
12390
|
isValidElement as isValidElement8
|
|
12294
12391
|
} from "react";
|
|
12295
|
-
import { jsx as
|
|
12392
|
+
import { jsx as jsx313 } from "react/jsx-runtime";
|
|
12296
12393
|
var TabPanels = ({ children, ref, ...rest }) => {
|
|
12297
12394
|
const { activeTab, tabsId, tabPanelsRef } = useTabsContext();
|
|
12298
12395
|
const combinedRef = useCombinedRef(ref, tabPanelsRef);
|
|
@@ -12307,7 +12404,7 @@ var TabPanels = ({ children, ref, ...rest }) => {
|
|
|
12307
12404
|
}
|
|
12308
12405
|
});
|
|
12309
12406
|
});
|
|
12310
|
-
return /* @__PURE__ */
|
|
12407
|
+
return /* @__PURE__ */ jsx313("div", { ref: combinedRef, ...rest, children: panelChildren });
|
|
12311
12408
|
};
|
|
12312
12409
|
TabPanels.displayName = "TabPanels";
|
|
12313
12410
|
|
|
@@ -12328,7 +12425,7 @@ var Tag_default = {
|
|
|
12328
12425
|
};
|
|
12329
12426
|
|
|
12330
12427
|
// src/components/Tag/Tag.tsx
|
|
12331
|
-
import { jsx as
|
|
12428
|
+
import { jsx as jsx314, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
12332
12429
|
var icons3 = {
|
|
12333
12430
|
info: InfoIcon,
|
|
12334
12431
|
danger: ErrorIcon,
|
|
@@ -12364,8 +12461,8 @@ var Tag = ({
|
|
|
12364
12461
|
rest
|
|
12365
12462
|
),
|
|
12366
12463
|
children: [
|
|
12367
|
-
withIcon && icon && /* @__PURE__ */
|
|
12368
|
-
/* @__PURE__ */
|
|
12464
|
+
withIcon && icon && /* @__PURE__ */ jsx314(Icon, { icon, iconSize: "small" }),
|
|
12465
|
+
/* @__PURE__ */ jsx314(TextOverflowEllipsisInner, { children: children != null ? children : text })
|
|
12369
12466
|
]
|
|
12370
12467
|
}
|
|
12371
12468
|
);
|
|
@@ -12373,14 +12470,13 @@ var Tag = ({
|
|
|
12373
12470
|
Tag.displayName = "Tag";
|
|
12374
12471
|
|
|
12375
12472
|
// src/components/TextInput/TextInput.tsx
|
|
12376
|
-
import { useId as useId26, useLayoutEffect as useLayoutEffect4, useRef as useRef37, useState as
|
|
12473
|
+
import { useId as useId26, useLayoutEffect as useLayoutEffect4, useRef as useRef37, useState as useState32 } from "react";
|
|
12377
12474
|
|
|
12378
12475
|
// src/components/TextInput/TextInput.module.css
|
|
12379
12476
|
var TextInput_default = {
|
|
12380
12477
|
container: "TextInput_container",
|
|
12381
12478
|
"container--readonly": "TextInput_container--readonly",
|
|
12382
12479
|
"container--disabled": "TextInput_container--disabled",
|
|
12383
|
-
"input-width": "TextInput_input-width",
|
|
12384
12480
|
input: "TextInput_input",
|
|
12385
12481
|
"with-icon--medium": "TextInput_with-icon--medium",
|
|
12386
12482
|
"with-icon--small": "TextInput_with-icon--small",
|
|
@@ -12396,7 +12492,7 @@ var TextInput_default = {
|
|
|
12396
12492
|
};
|
|
12397
12493
|
|
|
12398
12494
|
// src/components/TextInput/TextInput.tsx
|
|
12399
|
-
import { jsx as
|
|
12495
|
+
import { jsx as jsx315, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
12400
12496
|
var TextInput = ({
|
|
12401
12497
|
label,
|
|
12402
12498
|
disabled,
|
|
@@ -12423,11 +12519,11 @@ var TextInput = ({
|
|
|
12423
12519
|
ref,
|
|
12424
12520
|
...rest
|
|
12425
12521
|
}) => {
|
|
12426
|
-
const [text, setText] =
|
|
12522
|
+
const [text, setText] = useState32(getDefaultText(value, defaultValue));
|
|
12427
12523
|
const prefixRef = useRef37(null);
|
|
12428
12524
|
const suffixRef = useRef37(null);
|
|
12429
|
-
const [prefixLength, setPrefixLength] =
|
|
12430
|
-
const [suffixLength, setSuffixLength] =
|
|
12525
|
+
const [prefixLength, setPrefixLength] = useState32(0);
|
|
12526
|
+
const [suffixLength, setSuffixLength] = useState32(0);
|
|
12431
12527
|
useLayoutEffect4(() => {
|
|
12432
12528
|
if (prefixRef.current) {
|
|
12433
12529
|
setPrefixLength(prefixRef.current.offsetWidth);
|
|
@@ -12490,7 +12586,7 @@ var TextInput = ({
|
|
|
12490
12586
|
let extendedInput = null;
|
|
12491
12587
|
if (hasIcon) {
|
|
12492
12588
|
extendedInput = /* @__PURE__ */ jsxs84(Box, { className: Input_default["input-group"], width: inputWidth, children: [
|
|
12493
|
-
/* @__PURE__ */
|
|
12589
|
+
/* @__PURE__ */ jsx315(
|
|
12494
12590
|
Icon,
|
|
12495
12591
|
{
|
|
12496
12592
|
icon,
|
|
@@ -12501,7 +12597,7 @@ var TextInput = ({
|
|
|
12501
12597
|
)
|
|
12502
12598
|
}
|
|
12503
12599
|
),
|
|
12504
|
-
/* @__PURE__ */
|
|
12600
|
+
/* @__PURE__ */ jsx315(
|
|
12505
12601
|
StatefulInput,
|
|
12506
12602
|
{
|
|
12507
12603
|
className: cn(
|
|
@@ -12522,7 +12618,7 @@ var TextInput = ({
|
|
|
12522
12618
|
alignItems: "center",
|
|
12523
12619
|
width: inputWidth,
|
|
12524
12620
|
children: [
|
|
12525
|
-
prefix2 && /* @__PURE__ */
|
|
12621
|
+
prefix2 && /* @__PURE__ */ jsx315(
|
|
12526
12622
|
"span",
|
|
12527
12623
|
{
|
|
12528
12624
|
ref: prefixRef,
|
|
@@ -12535,7 +12631,7 @@ var TextInput = ({
|
|
|
12535
12631
|
children: prefix2
|
|
12536
12632
|
}
|
|
12537
12633
|
),
|
|
12538
|
-
/* @__PURE__ */
|
|
12634
|
+
/* @__PURE__ */ jsx315(
|
|
12539
12635
|
StatefulInput,
|
|
12540
12636
|
{
|
|
12541
12637
|
style: {
|
|
@@ -12546,7 +12642,7 @@ var TextInput = ({
|
|
|
12546
12642
|
...generalInputProps
|
|
12547
12643
|
}
|
|
12548
12644
|
),
|
|
12549
|
-
suffix && /* @__PURE__ */
|
|
12645
|
+
suffix && /* @__PURE__ */ jsx315(
|
|
12550
12646
|
"span",
|
|
12551
12647
|
{
|
|
12552
12648
|
ref: suffixRef,
|
|
@@ -12575,7 +12671,7 @@ var TextInput = ({
|
|
|
12575
12671
|
),
|
|
12576
12672
|
style,
|
|
12577
12673
|
children: [
|
|
12578
|
-
hasLabel && /* @__PURE__ */
|
|
12674
|
+
hasLabel && /* @__PURE__ */ jsx315(
|
|
12579
12675
|
Box,
|
|
12580
12676
|
{
|
|
12581
12677
|
as: Label,
|
|
@@ -12586,7 +12682,7 @@ var TextInput = ({
|
|
|
12586
12682
|
children: label
|
|
12587
12683
|
}
|
|
12588
12684
|
),
|
|
12589
|
-
extendedInput ? extendedInput : /* @__PURE__ */
|
|
12685
|
+
extendedInput ? extendedInput : /* @__PURE__ */ jsx315(Box, { as: StatefulInput, width: inputWidth, ...generalInputProps }),
|
|
12590
12686
|
hasBottomContainer && /* @__PURE__ */ jsxs84(
|
|
12591
12687
|
Box,
|
|
12592
12688
|
{
|
|
@@ -12630,7 +12726,7 @@ var Toggle_default = {
|
|
|
12630
12726
|
};
|
|
12631
12727
|
|
|
12632
12728
|
// src/components/Toggle/Toggle.tsx
|
|
12633
|
-
import { jsx as
|
|
12729
|
+
import { jsx as jsx316, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
12634
12730
|
var Toggle = ({
|
|
12635
12731
|
id,
|
|
12636
12732
|
children,
|
|
@@ -12665,7 +12761,7 @@ var Toggle = ({
|
|
|
12665
12761
|
readOnly && Toggle_default["label--read-only"]
|
|
12666
12762
|
),
|
|
12667
12763
|
children: [
|
|
12668
|
-
/* @__PURE__ */
|
|
12764
|
+
/* @__PURE__ */ jsx316(
|
|
12669
12765
|
"input",
|
|
12670
12766
|
{
|
|
12671
12767
|
...getBaseHTMLProps(
|
|
@@ -12692,7 +12788,7 @@ var Toggle = ({
|
|
|
12692
12788
|
onClick: readOnlyClickHandler(readOnly || isLoading, htmlProps.onClick)
|
|
12693
12789
|
}
|
|
12694
12790
|
),
|
|
12695
|
-
/* @__PURE__ */
|
|
12791
|
+
/* @__PURE__ */ jsx316("span", { className: cn(Toggle_default.track, focus_default["focus-styled-sibling"]), children: /* @__PURE__ */ jsx316("span", { className: Toggle_default.thumb, children: isLoading ? /* @__PURE__ */ jsx316(Spinner, { size: `var(--dds-icon-size-${size2})` }) : /* @__PURE__ */ jsx316(
|
|
12696
12792
|
Icon,
|
|
12697
12793
|
{
|
|
12698
12794
|
className: Toggle_default.checkmark,
|
|
@@ -12701,7 +12797,7 @@ var Toggle = ({
|
|
|
12701
12797
|
}
|
|
12702
12798
|
) }) }),
|
|
12703
12799
|
/* @__PURE__ */ jsxs85("span", { className: cn(readOnly && Toggle_default["labeltext--readonly"]), children: [
|
|
12704
|
-
readOnly && /* @__PURE__ */
|
|
12800
|
+
readOnly && /* @__PURE__ */ jsx316(
|
|
12705
12801
|
Icon,
|
|
12706
12802
|
{
|
|
12707
12803
|
icon: LockIcon,
|
|
@@ -12711,7 +12807,7 @@ var Toggle = ({
|
|
|
12711
12807
|
),
|
|
12712
12808
|
children,
|
|
12713
12809
|
" ",
|
|
12714
|
-
isLoading && /* @__PURE__ */
|
|
12810
|
+
isLoading && /* @__PURE__ */ jsx316(VisuallyHidden, { children: "Innlastning p\xE5g\xE5r" })
|
|
12715
12811
|
] })
|
|
12716
12812
|
]
|
|
12717
12813
|
}
|
|
@@ -12720,7 +12816,7 @@ var Toggle = ({
|
|
|
12720
12816
|
Toggle.displayName = "Toggle";
|
|
12721
12817
|
|
|
12722
12818
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
12723
|
-
import { useId as useId28, useState as
|
|
12819
|
+
import { useId as useId28, useState as useState33 } from "react";
|
|
12724
12820
|
|
|
12725
12821
|
// src/components/ToggleBar/ToggleBar.context.tsx
|
|
12726
12822
|
import { createContext as createContext19, useContext as useContext27 } from "react";
|
|
@@ -12745,7 +12841,7 @@ var ToggleBar_default = {
|
|
|
12745
12841
|
};
|
|
12746
12842
|
|
|
12747
12843
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
12748
|
-
import { jsx as
|
|
12844
|
+
import { jsx as jsx317, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
12749
12845
|
var ToggleBar = (props) => {
|
|
12750
12846
|
const {
|
|
12751
12847
|
children,
|
|
@@ -12762,13 +12858,13 @@ var ToggleBar = (props) => {
|
|
|
12762
12858
|
} = props;
|
|
12763
12859
|
const generatedId = useId28();
|
|
12764
12860
|
const uniqueId = id != null ? id : `${generatedId}-ToggleBar`;
|
|
12765
|
-
const [groupValue, setGroupValue] =
|
|
12861
|
+
const [groupValue, setGroupValue] = useState33(value);
|
|
12766
12862
|
const handleChange = combineHandlers(
|
|
12767
12863
|
(e) => setGroupValue(e.target.value),
|
|
12768
12864
|
(e) => onChange && onChange(e, e.target.value)
|
|
12769
12865
|
);
|
|
12770
12866
|
const labelId = label && `${uniqueId}-label`;
|
|
12771
|
-
return /* @__PURE__ */
|
|
12867
|
+
return /* @__PURE__ */ jsx317(
|
|
12772
12868
|
ToggleBarContext,
|
|
12773
12869
|
{
|
|
12774
12870
|
value: {
|
|
@@ -12786,8 +12882,8 @@ var ToggleBar = (props) => {
|
|
|
12786
12882
|
role: "radiogroup",
|
|
12787
12883
|
"aria-labelledby": labelId != null ? labelId : htmlProps == null ? void 0 : htmlProps["aria-labelledby"],
|
|
12788
12884
|
children: [
|
|
12789
|
-
label && /* @__PURE__ */
|
|
12790
|
-
/* @__PURE__ */
|
|
12885
|
+
label && /* @__PURE__ */ jsx317(Typography, { id: labelId, as: "span", typographyType: "labelMedium", children: label }),
|
|
12886
|
+
/* @__PURE__ */ jsx317("div", { className: ToggleBar_default.bar, children })
|
|
12791
12887
|
]
|
|
12792
12888
|
}
|
|
12793
12889
|
)
|
|
@@ -12798,7 +12894,7 @@ ToggleBar.displayName = "ToggleBar";
|
|
|
12798
12894
|
|
|
12799
12895
|
// src/components/ToggleBar/ToggleRadio.tsx
|
|
12800
12896
|
import { useId as useId29 } from "react";
|
|
12801
|
-
import { jsx as
|
|
12897
|
+
import { jsx as jsx318, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
12802
12898
|
var typographyTypes3 = {
|
|
12803
12899
|
large: "bodyLarge",
|
|
12804
12900
|
medium: "bodyMedium",
|
|
@@ -12838,7 +12934,7 @@ var ToggleRadio = ({
|
|
|
12838
12934
|
};
|
|
12839
12935
|
const contentTypeCn = label ? "with-text" : "just-icon";
|
|
12840
12936
|
return /* @__PURE__ */ jsxs87("label", { htmlFor: uniqueId, className: ToggleBar_default.label, children: [
|
|
12841
|
-
/* @__PURE__ */
|
|
12937
|
+
/* @__PURE__ */ jsx318(
|
|
12842
12938
|
"input",
|
|
12843
12939
|
{
|
|
12844
12940
|
...getBaseHTMLProps(
|
|
@@ -12871,8 +12967,8 @@ var ToggleRadio = ({
|
|
|
12871
12967
|
focus_default["focus-styled-sibling"]
|
|
12872
12968
|
),
|
|
12873
12969
|
children: [
|
|
12874
|
-
icon && /* @__PURE__ */
|
|
12875
|
-
label && /* @__PURE__ */
|
|
12970
|
+
icon && /* @__PURE__ */ jsx318(Icon, { icon, iconSize: "inherit" }),
|
|
12971
|
+
label && /* @__PURE__ */ jsx318("span", { children: label })
|
|
12876
12972
|
]
|
|
12877
12973
|
}
|
|
12878
12974
|
)
|
|
@@ -12892,7 +12988,7 @@ var ToggleButton_default = {
|
|
|
12892
12988
|
};
|
|
12893
12989
|
|
|
12894
12990
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
12895
|
-
import { jsx as
|
|
12991
|
+
import { jsx as jsx319, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
12896
12992
|
var ToggleButton = ({
|
|
12897
12993
|
id,
|
|
12898
12994
|
label,
|
|
@@ -12906,7 +13002,7 @@ var ToggleButton = ({
|
|
|
12906
13002
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
12907
13003
|
const hasIcon = !!icon;
|
|
12908
13004
|
return /* @__PURE__ */ jsxs88(Box, { as: "label", htmlFor: uniqueId, width: "fit-content", children: [
|
|
12909
|
-
/* @__PURE__ */
|
|
13005
|
+
/* @__PURE__ */ jsx319(
|
|
12910
13006
|
"input",
|
|
12911
13007
|
{
|
|
12912
13008
|
...getBaseHTMLProps(
|
|
@@ -12933,7 +13029,7 @@ var ToggleButton = ({
|
|
|
12933
13029
|
focus_default["focus-styled-sibling"]
|
|
12934
13030
|
),
|
|
12935
13031
|
children: [
|
|
12936
|
-
hasIcon && /* @__PURE__ */
|
|
13032
|
+
hasIcon && /* @__PURE__ */ jsx319(Icon, { icon, iconSize: "inherit" }),
|
|
12937
13033
|
" ",
|
|
12938
13034
|
label
|
|
12939
13035
|
]
|
|
@@ -12945,7 +13041,7 @@ ToggleButton.displayName = "ToggleButton";
|
|
|
12945
13041
|
|
|
12946
13042
|
// src/components/ToggleButton/ToggleButtonGroup.tsx
|
|
12947
13043
|
import { useId as useId31 } from "react";
|
|
12948
|
-
import { jsx as
|
|
13044
|
+
import { jsx as jsx320, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
12949
13045
|
var ToggleButtonGroup = (props) => {
|
|
12950
13046
|
const {
|
|
12951
13047
|
children,
|
|
@@ -12967,8 +13063,8 @@ var ToggleButtonGroup = (props) => {
|
|
|
12967
13063
|
role: "group",
|
|
12968
13064
|
"aria-labelledby": label ? uniqueLabelId : void 0,
|
|
12969
13065
|
children: [
|
|
12970
|
-
!!label && /* @__PURE__ */
|
|
12971
|
-
/* @__PURE__ */
|
|
13066
|
+
!!label && /* @__PURE__ */ jsx320(Typography, { as: "span", typographyType: "labelMedium", id: uniqueLabelId, children: label }),
|
|
13067
|
+
/* @__PURE__ */ jsx320(Box, { display: "flex", flexWrap: "wrap", gap: "x0.75", flexDirection: direction, children })
|
|
12972
13068
|
]
|
|
12973
13069
|
}
|
|
12974
13070
|
);
|
|
@@ -13226,6 +13322,7 @@ export {
|
|
|
13226
13322
|
StarHalfFilled,
|
|
13227
13323
|
StarIcon,
|
|
13228
13324
|
StatefulInput,
|
|
13325
|
+
StylelessButton,
|
|
13229
13326
|
StylelessList,
|
|
13230
13327
|
StylelessOList,
|
|
13231
13328
|
SvgWrapper,
|
|
@@ -13292,6 +13389,7 @@ export {
|
|
|
13292
13389
|
focusVisibleInset,
|
|
13293
13390
|
focusVisibleTransitionValue,
|
|
13294
13391
|
getBaseHTMLProps,
|
|
13392
|
+
getColorCn,
|
|
13295
13393
|
getDefaultText,
|
|
13296
13394
|
getElementType,
|
|
13297
13395
|
getInputWidth,
|