@norges-domstoler/dds-components 21.12.0 → 21.14.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 +34 -23
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +10 -12
- package/dist/index.d.ts +10 -12
- package/dist/index.js +754 -671
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +683 -600
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -312,6 +312,7 @@ var BACKGROUNDS = [
|
|
|
312
312
|
"surface-info-strong",
|
|
313
313
|
"surface-paper-default",
|
|
314
314
|
"surface-notification",
|
|
315
|
+
"surface-field-disabled",
|
|
315
316
|
"brand-primary-default",
|
|
316
317
|
"brand-primary-subtle",
|
|
317
318
|
"brand-primary-medium",
|
|
@@ -379,6 +380,8 @@ var readOnlyKeyDownHandler = (type, readOnly, onKeyDown) => {
|
|
|
379
380
|
evt.preventDefault();
|
|
380
381
|
} else if (type === "selectionControl" && evt.key === " ") {
|
|
381
382
|
evt.preventDefault();
|
|
383
|
+
} else if (type === "file" && (evt.key === " " || evt.key === "Enter")) {
|
|
384
|
+
evt.preventDefault();
|
|
382
385
|
}
|
|
383
386
|
} else onKeyDown == null ? void 0 : onKeyDown(evt);
|
|
384
387
|
};
|
|
@@ -2888,8 +2891,8 @@ function useTranslation() {
|
|
|
2888
2891
|
const t = (text) => text[lang];
|
|
2889
2892
|
return { t, lang };
|
|
2890
2893
|
}
|
|
2891
|
-
function createTexts(
|
|
2892
|
-
return
|
|
2894
|
+
function createTexts(texts27) {
|
|
2895
|
+
return texts27;
|
|
2893
2896
|
}
|
|
2894
2897
|
|
|
2895
2898
|
// src/DdsProvider/DdsProvider.tsx
|
|
@@ -4760,34 +4763,38 @@ var Label2 = ({
|
|
|
4760
4763
|
}
|
|
4761
4764
|
);
|
|
4762
4765
|
};
|
|
4763
|
-
var
|
|
4766
|
+
var renderGroupLabel = ({
|
|
4764
4767
|
id,
|
|
4765
|
-
|
|
4768
|
+
showRequiredStyling,
|
|
4766
4769
|
readOnly,
|
|
4767
|
-
|
|
4770
|
+
label
|
|
4768
4771
|
}) => {
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
readOnly
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4772
|
+
const hasLabel = !!label;
|
|
4773
|
+
if (hasLabel)
|
|
4774
|
+
return /* @__PURE__ */ jsxs32(
|
|
4775
|
+
Typography,
|
|
4776
|
+
{
|
|
4777
|
+
as: "span",
|
|
4778
|
+
typographyType: "labelMedium",
|
|
4779
|
+
id,
|
|
4780
|
+
className: readOnly ? Label_default["read-only"] : void 0,
|
|
4781
|
+
withMargins: true,
|
|
4782
|
+
children: [
|
|
4783
|
+
readOnly && /* @__PURE__ */ jsx210(
|
|
4784
|
+
Icon,
|
|
4785
|
+
{
|
|
4786
|
+
icon: LockIcon,
|
|
4787
|
+
className: Label_default["read-only__icon"],
|
|
4788
|
+
iconSize: "small"
|
|
4789
|
+
}
|
|
4790
|
+
),
|
|
4791
|
+
label,
|
|
4792
|
+
" ",
|
|
4793
|
+
showRequiredStyling && /* @__PURE__ */ jsx210(RequiredMarker, {})
|
|
4794
|
+
]
|
|
4795
|
+
}
|
|
4796
|
+
);
|
|
4797
|
+
else return null;
|
|
4791
4798
|
};
|
|
4792
4799
|
|
|
4793
4800
|
// src/components/SelectionControl/SelectionControl.utils.tsx
|
|
@@ -4965,7 +4972,7 @@ var CheckboxGroup = (props) => {
|
|
|
4965
4972
|
const generatedId = useId5();
|
|
4966
4973
|
const uniqueGroupId = groupId != null ? groupId : `${generatedId}-checkboxGroup`;
|
|
4967
4974
|
const hasErrorMessage = !!errorMessage;
|
|
4968
|
-
const
|
|
4975
|
+
const showRequiredStyling = required || convertBooleanishToBoolean(ariaRequired);
|
|
4969
4976
|
const errorMessageId = derivativeIdGenerator(uniqueGroupId, "errorMessage");
|
|
4970
4977
|
const tipId = derivativeIdGenerator(uniqueGroupId, "tip");
|
|
4971
4978
|
const contextProps = {
|
|
@@ -4986,15 +4993,12 @@ var CheckboxGroup = (props) => {
|
|
|
4986
4993
|
rest
|
|
4987
4994
|
),
|
|
4988
4995
|
children: [
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
children: label
|
|
4996
|
-
}
|
|
4997
|
-
) : null,
|
|
4996
|
+
renderGroupLabel({
|
|
4997
|
+
label,
|
|
4998
|
+
id: uniqueGroupId,
|
|
4999
|
+
readOnly,
|
|
5000
|
+
showRequiredStyling
|
|
5001
|
+
}),
|
|
4998
5002
|
renderInputMessage(tip, tipId),
|
|
4999
5003
|
/* @__PURE__ */ jsx213(CheckboxGroupContext, { value: { ...contextProps }, children: /* @__PURE__ */ jsx213(
|
|
5000
5004
|
"div",
|
|
@@ -5157,7 +5161,7 @@ var RadioButtonGroup = ({
|
|
|
5157
5161
|
onChange
|
|
5158
5162
|
});
|
|
5159
5163
|
const hasErrorMessage = !!errorMessage;
|
|
5160
|
-
const
|
|
5164
|
+
const showRequiredStyling = required || convertBooleanishToBoolean(ariaRequired);
|
|
5161
5165
|
const tipId = tip && `${uniqueGroupId}-tip`;
|
|
5162
5166
|
const errorMessageId = errorMessage && `${uniqueGroupId}-errorMessage`;
|
|
5163
5167
|
const contextProps = {
|
|
@@ -5181,15 +5185,12 @@ var RadioButtonGroup = ({
|
|
|
5181
5185
|
rest
|
|
5182
5186
|
),
|
|
5183
5187
|
children: [
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
children: label
|
|
5191
|
-
}
|
|
5192
|
-
) : null,
|
|
5188
|
+
renderGroupLabel({
|
|
5189
|
+
label,
|
|
5190
|
+
id: uniqueGroupId,
|
|
5191
|
+
readOnly,
|
|
5192
|
+
showRequiredStyling
|
|
5193
|
+
}),
|
|
5193
5194
|
renderInputMessage(tip, tipId),
|
|
5194
5195
|
/* @__PURE__ */ jsx215(RadioButtonGroupContext, { value: { ...contextProps }, children: /* @__PURE__ */ jsx215(
|
|
5195
5196
|
"div",
|
|
@@ -5643,7 +5644,12 @@ var DateInput_default = {
|
|
|
5643
5644
|
};
|
|
5644
5645
|
|
|
5645
5646
|
// src/components/date-inputs/DatePicker/constants.ts
|
|
5646
|
-
var
|
|
5647
|
+
var LOCALE = {
|
|
5648
|
+
nb: "nb-NO",
|
|
5649
|
+
no: "no-NO",
|
|
5650
|
+
nn: "nn-NO",
|
|
5651
|
+
en: "en-GB"
|
|
5652
|
+
};
|
|
5647
5653
|
var timezone = "Europe/Oslo";
|
|
5648
5654
|
|
|
5649
5655
|
// src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
|
|
@@ -5887,12 +5893,12 @@ var CalendarPopoverContent = ({
|
|
|
5887
5893
|
import { jsx as jsx226, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
5888
5894
|
function CalendarGrid({ state, ...props }) {
|
|
5889
5895
|
const { t } = useTranslation();
|
|
5890
|
-
const { locale
|
|
5896
|
+
const { locale } = useLocale();
|
|
5891
5897
|
const {
|
|
5892
5898
|
gridProps: { onKeyDown, ...gridProps },
|
|
5893
5899
|
headerProps
|
|
5894
5900
|
} = useCalendarGrid(props, state);
|
|
5895
|
-
const weeksInMonth = getWeeksInMonth(state.visibleRange.start,
|
|
5901
|
+
const weeksInMonth = getWeeksInMonth(state.visibleRange.start, locale);
|
|
5896
5902
|
const weekDays = [
|
|
5897
5903
|
{ short: t(texts5.mo), full: t(texts5.monday) },
|
|
5898
5904
|
{ short: t(texts5.tu), full: t(texts5.tuesday) },
|
|
@@ -6074,11 +6080,11 @@ function createCalendar(identifier) {
|
|
|
6074
6080
|
}
|
|
6075
6081
|
function Calendar(props) {
|
|
6076
6082
|
const { t } = useTranslation();
|
|
6077
|
-
const { locale
|
|
6083
|
+
const { locale } = useLocale2();
|
|
6078
6084
|
const state = useCalendarState({
|
|
6079
6085
|
...props,
|
|
6080
6086
|
createCalendar,
|
|
6081
|
-
locale
|
|
6087
|
+
locale
|
|
6082
6088
|
});
|
|
6083
6089
|
const {
|
|
6084
6090
|
calendarProps,
|
|
@@ -6222,6 +6228,39 @@ function CalendarButton({
|
|
|
6222
6228
|
);
|
|
6223
6229
|
}
|
|
6224
6230
|
|
|
6231
|
+
// src/components/date-inputs/DatePicker/DateField/DateField.utils.tsx
|
|
6232
|
+
function formatDateFieldSegments(segments) {
|
|
6233
|
+
const daySegment = segments.find((segment) => segment.type === "day");
|
|
6234
|
+
const monthSegment = segments.find((segment) => segment.type === "month");
|
|
6235
|
+
const yearSegment = segments.find((segment) => segment.type === "year");
|
|
6236
|
+
const separatorSegment = segments.find((segment) => segment.type === "literal");
|
|
6237
|
+
if (!daySegment || !monthSegment || !yearSegment || !separatorSegment) {
|
|
6238
|
+
throw new Error("Invalid date field segments");
|
|
6239
|
+
}
|
|
6240
|
+
const formattedDaySegment = {
|
|
6241
|
+
...daySegment,
|
|
6242
|
+
text: daySegment.text.padStart(2, "0"),
|
|
6243
|
+
placeholder: "dd"
|
|
6244
|
+
};
|
|
6245
|
+
const formattedMonthSegment = {
|
|
6246
|
+
...monthSegment,
|
|
6247
|
+
text: monthSegment.text.padStart(2, "0"),
|
|
6248
|
+
placeholder: "mm"
|
|
6249
|
+
};
|
|
6250
|
+
const formattedYearSegment = {
|
|
6251
|
+
...yearSegment,
|
|
6252
|
+
placeholder: "\xE5\xE5\xE5\xE5"
|
|
6253
|
+
};
|
|
6254
|
+
const formattedSeparatorSegment = { ...separatorSegment, text: "." };
|
|
6255
|
+
return [
|
|
6256
|
+
formattedDaySegment,
|
|
6257
|
+
formattedSeparatorSegment,
|
|
6258
|
+
formattedMonthSegment,
|
|
6259
|
+
formattedSeparatorSegment,
|
|
6260
|
+
formattedYearSegment
|
|
6261
|
+
];
|
|
6262
|
+
}
|
|
6263
|
+
|
|
6225
6264
|
// src/components/date-inputs/DatePicker/DateField/DateSegment.tsx
|
|
6226
6265
|
import { useDateSegment } from "@react-aria/datepicker";
|
|
6227
6266
|
import { useRef as useRef14 } from "react";
|
|
@@ -6236,7 +6275,6 @@ function DateSegment({
|
|
|
6236
6275
|
state,
|
|
6237
6276
|
componentSize
|
|
6238
6277
|
}) {
|
|
6239
|
-
var _a;
|
|
6240
6278
|
const ref = useRef14(null);
|
|
6241
6279
|
const { segmentProps } = useDateSegment(segment, state, ref);
|
|
6242
6280
|
return /* @__PURE__ */ jsxs45(
|
|
@@ -6266,7 +6304,7 @@ function DateSegment({
|
|
|
6266
6304
|
children: segment.placeholder
|
|
6267
6305
|
}
|
|
6268
6306
|
),
|
|
6269
|
-
segment.isPlaceholder ? "" : segment.text
|
|
6307
|
+
segment.isPlaceholder ? "" : segment.text
|
|
6270
6308
|
]
|
|
6271
6309
|
}
|
|
6272
6310
|
);
|
|
@@ -6307,7 +6345,6 @@ var Input_default = {
|
|
|
6307
6345
|
"input--small": "Input_input--small",
|
|
6308
6346
|
"input--xsmall": "Input_input--xsmall",
|
|
6309
6347
|
"input--with-affix": "Input_input--with-affix",
|
|
6310
|
-
label: "Input_label",
|
|
6311
6348
|
"input-group__absolute-element": "Input_input-group__absolute-element"
|
|
6312
6349
|
};
|
|
6313
6350
|
|
|
@@ -6361,8 +6398,18 @@ function getInputWidth(width, defaultW) {
|
|
|
6361
6398
|
return width != null ? width : fallback;
|
|
6362
6399
|
}
|
|
6363
6400
|
|
|
6401
|
+
// src/components/Typography/Label/Label.utils.tsx
|
|
6402
|
+
import { jsx as jsx233 } from "react/jsx-runtime";
|
|
6403
|
+
function renderLabel(props) {
|
|
6404
|
+
const { label, ...rest } = props;
|
|
6405
|
+
const hasLabel = !!label;
|
|
6406
|
+
if (hasLabel)
|
|
6407
|
+
return /* @__PURE__ */ jsx233(Label, { ...rest, withMargins: true, children: label });
|
|
6408
|
+
return null;
|
|
6409
|
+
}
|
|
6410
|
+
|
|
6364
6411
|
// src/components/date-inputs/common/DateInput.tsx
|
|
6365
|
-
import { jsx as
|
|
6412
|
+
import { jsx as jsx234, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
6366
6413
|
function DateInput({
|
|
6367
6414
|
errorMessage,
|
|
6368
6415
|
tip,
|
|
@@ -6388,7 +6435,6 @@ function DateInput({
|
|
|
6388
6435
|
var _a;
|
|
6389
6436
|
const hasErrorMessage = !!errorMessage;
|
|
6390
6437
|
const hasTip = !!tip;
|
|
6391
|
-
const hasLabel = props.label != null;
|
|
6392
6438
|
const hasMessage = hasErrorMessage || hasTip;
|
|
6393
6439
|
const { isOpen } = useContext12(CalendarPopoverContext);
|
|
6394
6440
|
return /* @__PURE__ */ jsxs46(
|
|
@@ -6398,16 +6444,12 @@ function DateInput({
|
|
|
6398
6444
|
className: cn(className, Input_default.container),
|
|
6399
6445
|
ref,
|
|
6400
6446
|
children: [
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
readOnly,
|
|
6408
|
-
children: props.label
|
|
6409
|
-
}
|
|
6410
|
-
),
|
|
6447
|
+
renderLabel({
|
|
6448
|
+
...labelProps,
|
|
6449
|
+
label: props.label,
|
|
6450
|
+
showRequiredStyling: required,
|
|
6451
|
+
readOnly
|
|
6452
|
+
}),
|
|
6411
6453
|
/* @__PURE__ */ jsxs46(
|
|
6412
6454
|
Box,
|
|
6413
6455
|
{
|
|
@@ -6431,7 +6473,7 @@ function DateInput({
|
|
|
6431
6473
|
),
|
|
6432
6474
|
children: [
|
|
6433
6475
|
button,
|
|
6434
|
-
/* @__PURE__ */
|
|
6476
|
+
/* @__PURE__ */ jsx234(
|
|
6435
6477
|
"div",
|
|
6436
6478
|
{
|
|
6437
6479
|
...fieldProps,
|
|
@@ -6444,7 +6486,7 @@ function DateInput({
|
|
|
6444
6486
|
]
|
|
6445
6487
|
}
|
|
6446
6488
|
),
|
|
6447
|
-
hasMessage && /* @__PURE__ */
|
|
6489
|
+
hasMessage && /* @__PURE__ */ jsx234(
|
|
6448
6490
|
InputMessage,
|
|
6449
6491
|
{
|
|
6450
6492
|
messageType: hasErrorMessage ? "error" : "tip",
|
|
@@ -6458,7 +6500,7 @@ function DateInput({
|
|
|
6458
6500
|
DateInput.displayName = "DateInput";
|
|
6459
6501
|
|
|
6460
6502
|
// src/components/date-inputs/DatePicker/DateField/DateField.tsx
|
|
6461
|
-
import { jsx as
|
|
6503
|
+
import { jsx as jsx235 } from "react/jsx-runtime";
|
|
6462
6504
|
function DateField({
|
|
6463
6505
|
componentSize = "medium",
|
|
6464
6506
|
buttonProps,
|
|
@@ -6467,11 +6509,11 @@ function DateField({
|
|
|
6467
6509
|
clearable,
|
|
6468
6510
|
...props
|
|
6469
6511
|
}) {
|
|
6470
|
-
const { locale
|
|
6512
|
+
const { locale } = useLocale3();
|
|
6471
6513
|
const { t } = useTranslation();
|
|
6472
6514
|
const state = useDateFieldState({
|
|
6473
6515
|
...props,
|
|
6474
|
-
locale
|
|
6516
|
+
locale,
|
|
6475
6517
|
createCalendar: createCalendar2
|
|
6476
6518
|
});
|
|
6477
6519
|
const internalRef = useRef15(null);
|
|
@@ -6486,7 +6528,8 @@ function DateField({
|
|
|
6486
6528
|
const clearDate = () => {
|
|
6487
6529
|
state.setValue(null);
|
|
6488
6530
|
};
|
|
6489
|
-
|
|
6531
|
+
const formattedSegments = formatDateFieldSegments(state.segments);
|
|
6532
|
+
return /* @__PURE__ */ jsx235(
|
|
6490
6533
|
DateInput,
|
|
6491
6534
|
{
|
|
6492
6535
|
...props,
|
|
@@ -6499,7 +6542,7 @@ function DateField({
|
|
|
6499
6542
|
ref,
|
|
6500
6543
|
internalRef,
|
|
6501
6544
|
readOnly: props.isReadOnly,
|
|
6502
|
-
prefix: /* @__PURE__ */
|
|
6545
|
+
prefix: /* @__PURE__ */ jsx235(
|
|
6503
6546
|
CalendarButton,
|
|
6504
6547
|
{
|
|
6505
6548
|
componentSize,
|
|
@@ -6508,7 +6551,7 @@ function DateField({
|
|
|
6508
6551
|
isDisabled: disabled || props.isReadOnly
|
|
6509
6552
|
}
|
|
6510
6553
|
),
|
|
6511
|
-
suffix: showClearButton && /* @__PURE__ */
|
|
6554
|
+
suffix: showClearButton && /* @__PURE__ */ jsx235(
|
|
6512
6555
|
ClearButton,
|
|
6513
6556
|
{
|
|
6514
6557
|
absolute: false,
|
|
@@ -6524,7 +6567,7 @@ function DateField({
|
|
|
6524
6567
|
),
|
|
6525
6568
|
labelProps,
|
|
6526
6569
|
fieldProps,
|
|
6527
|
-
children:
|
|
6570
|
+
children: formattedSegments.map((segment, i) => /* @__PURE__ */ jsx235(
|
|
6528
6571
|
DateSegment,
|
|
6529
6572
|
{
|
|
6530
6573
|
"aria-readonly": props.isReadOnly,
|
|
@@ -6569,7 +6612,7 @@ function createDOMRef(ref) {
|
|
|
6569
6612
|
}
|
|
6570
6613
|
|
|
6571
6614
|
// src/components/date-inputs/DatePicker/DatePicker.tsx
|
|
6572
|
-
import { jsx as
|
|
6615
|
+
import { jsx as jsx236, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
6573
6616
|
var refIsFocusable = (ref) => {
|
|
6574
6617
|
return typeof ref === "object" && ref !== null && "focus" in ref;
|
|
6575
6618
|
};
|
|
@@ -6585,6 +6628,10 @@ function DatePicker({
|
|
|
6585
6628
|
ref,
|
|
6586
6629
|
...props
|
|
6587
6630
|
}) {
|
|
6631
|
+
const lang = useLanguage();
|
|
6632
|
+
if (!lang) {
|
|
6633
|
+
throw new Error("DatePicker must be used within a DdsProvider");
|
|
6634
|
+
}
|
|
6588
6635
|
const state = useDatePickerState(props);
|
|
6589
6636
|
const domRef = useFocusManagerRef(ref && refIsFocusable(ref) ? ref : null);
|
|
6590
6637
|
const internalRef = useRef17(null);
|
|
@@ -6594,14 +6641,14 @@ function DatePicker({
|
|
|
6594
6641
|
state,
|
|
6595
6642
|
internalRef
|
|
6596
6643
|
);
|
|
6597
|
-
return /* @__PURE__ */
|
|
6644
|
+
return /* @__PURE__ */ jsx236(I18nProvider, { locale: LOCALE[lang], children: /* @__PURE__ */ jsxs47(
|
|
6598
6645
|
CalendarPopover,
|
|
6599
6646
|
{
|
|
6600
6647
|
isOpen: state.isOpen,
|
|
6601
6648
|
onClose: state.close,
|
|
6602
6649
|
showWeekNumbers,
|
|
6603
6650
|
children: [
|
|
6604
|
-
/* @__PURE__ */
|
|
6651
|
+
/* @__PURE__ */ jsx236(CalendarPopoverAnchor, { children: /* @__PURE__ */ jsx236(
|
|
6605
6652
|
DateField,
|
|
6606
6653
|
{
|
|
6607
6654
|
...fieldProps,
|
|
@@ -6617,7 +6664,7 @@ function DatePicker({
|
|
|
6617
6664
|
clearable
|
|
6618
6665
|
}
|
|
6619
6666
|
) }),
|
|
6620
|
-
/* @__PURE__ */
|
|
6667
|
+
/* @__PURE__ */ jsx236(CalendarPopoverContent, { smallScreenBreakpoint, children: /* @__PURE__ */ jsx236(Calendar, { ...calendarProps }) })
|
|
6621
6668
|
]
|
|
6622
6669
|
}
|
|
6623
6670
|
) });
|
|
@@ -6628,17 +6675,21 @@ DatePicker.displayName = "DatePicker";
|
|
|
6628
6675
|
import { useTimeField } from "@react-aria/datepicker";
|
|
6629
6676
|
import { useTimeFieldState } from "@react-stately/datepicker";
|
|
6630
6677
|
import { useRef as useRef18 } from "react";
|
|
6631
|
-
import { jsx as
|
|
6678
|
+
import { jsx as jsx237 } from "react/jsx-runtime";
|
|
6632
6679
|
function TimePicker({
|
|
6633
6680
|
componentSize = "medium",
|
|
6634
6681
|
width,
|
|
6635
6682
|
ref,
|
|
6636
6683
|
...props
|
|
6637
6684
|
}) {
|
|
6685
|
+
const lang = useLanguage();
|
|
6686
|
+
if (!lang) {
|
|
6687
|
+
throw new Error("DatePicker must be used within a DdsProvider");
|
|
6688
|
+
}
|
|
6638
6689
|
const internalRef = useRef18(null);
|
|
6639
6690
|
const state = useTimeFieldState({
|
|
6640
6691
|
...props,
|
|
6641
|
-
locale
|
|
6692
|
+
locale: LOCALE[lang]
|
|
6642
6693
|
});
|
|
6643
6694
|
const { labelProps, fieldProps } = useTimeField(
|
|
6644
6695
|
{ ...props, hideTimeZone: true, granularity: "hour" },
|
|
@@ -6647,7 +6698,7 @@ function TimePicker({
|
|
|
6647
6698
|
);
|
|
6648
6699
|
const iconSize = componentSize === "xsmall" ? "small" : "medium";
|
|
6649
6700
|
const disabled = props.isDisabled || !!fieldProps["aria-disabled"];
|
|
6650
|
-
return /* @__PURE__ */
|
|
6701
|
+
return /* @__PURE__ */ jsx237(
|
|
6651
6702
|
DateInput,
|
|
6652
6703
|
{
|
|
6653
6704
|
...props,
|
|
@@ -6660,7 +6711,7 @@ function TimePicker({
|
|
|
6660
6711
|
readOnly: props.isReadOnly,
|
|
6661
6712
|
labelProps,
|
|
6662
6713
|
fieldProps,
|
|
6663
|
-
prefix: /* @__PURE__ */
|
|
6714
|
+
prefix: /* @__PURE__ */ jsx237(
|
|
6664
6715
|
Icon,
|
|
6665
6716
|
{
|
|
6666
6717
|
icon: TimeIcon,
|
|
@@ -6672,7 +6723,7 @@ function TimePicker({
|
|
|
6672
6723
|
)
|
|
6673
6724
|
}
|
|
6674
6725
|
),
|
|
6675
|
-
children: state.segments.map((segment, i) => /* @__PURE__ */
|
|
6726
|
+
children: state.segments.map((segment, i) => /* @__PURE__ */ jsx237(
|
|
6676
6727
|
DateSegment,
|
|
6677
6728
|
{
|
|
6678
6729
|
componentSize,
|
|
@@ -6731,7 +6782,7 @@ var DescriptionList_default = {
|
|
|
6731
6782
|
};
|
|
6732
6783
|
|
|
6733
6784
|
// src/components/DescriptionList/DescriptionList.tsx
|
|
6734
|
-
import { jsx as
|
|
6785
|
+
import { jsx as jsx238 } from "react/jsx-runtime";
|
|
6735
6786
|
var DescriptionList = ({
|
|
6736
6787
|
appearance = "default",
|
|
6737
6788
|
direction = "column",
|
|
@@ -6740,7 +6791,7 @@ var DescriptionList = ({
|
|
|
6740
6791
|
className,
|
|
6741
6792
|
htmlProps,
|
|
6742
6793
|
...rest
|
|
6743
|
-
}) => /* @__PURE__ */
|
|
6794
|
+
}) => /* @__PURE__ */ jsx238(
|
|
6744
6795
|
VStack,
|
|
6745
6796
|
{
|
|
6746
6797
|
as: "dl",
|
|
@@ -6765,14 +6816,14 @@ var DescriptionList = ({
|
|
|
6765
6816
|
DescriptionList.displayName = "DescriptionList";
|
|
6766
6817
|
|
|
6767
6818
|
// src/components/DescriptionList/DescriptionListTerm.tsx
|
|
6768
|
-
import { jsx as
|
|
6819
|
+
import { jsx as jsx239 } from "react/jsx-runtime";
|
|
6769
6820
|
var DescriptionListTerm = (props) => {
|
|
6770
|
-
return /* @__PURE__ */
|
|
6821
|
+
return /* @__PURE__ */ jsx239("dt", { ...props });
|
|
6771
6822
|
};
|
|
6772
6823
|
DescriptionListTerm.displayName = "DescriptionListTerm";
|
|
6773
6824
|
|
|
6774
6825
|
// src/components/DescriptionList/DescriptionListDesc.tsx
|
|
6775
|
-
import { jsx as
|
|
6826
|
+
import { jsx as jsx240, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
6776
6827
|
var DescriptionListDesc = ({
|
|
6777
6828
|
children,
|
|
6778
6829
|
icon,
|
|
@@ -6781,14 +6832,14 @@ var DescriptionListDesc = ({
|
|
|
6781
6832
|
htmlProps,
|
|
6782
6833
|
...rest
|
|
6783
6834
|
}) => /* @__PURE__ */ jsxs48("dd", { ...getBaseHTMLProps(id, cn(className, DescriptionList_default.desc), htmlProps, rest), children: [
|
|
6784
|
-
icon && /* @__PURE__ */
|
|
6835
|
+
icon && /* @__PURE__ */ jsx240(Icon, { icon }),
|
|
6785
6836
|
" ",
|
|
6786
6837
|
children
|
|
6787
6838
|
] });
|
|
6788
6839
|
DescriptionListDesc.displayName = "DescriptionListDesc";
|
|
6789
6840
|
|
|
6790
6841
|
// src/components/DescriptionList/DescriptionListGroup.tsx
|
|
6791
|
-
import { jsx as
|
|
6842
|
+
import { jsx as jsx241 } from "react/jsx-runtime";
|
|
6792
6843
|
var DescriptionListGroup = ({
|
|
6793
6844
|
children,
|
|
6794
6845
|
margin,
|
|
@@ -6798,7 +6849,7 @@ var DescriptionListGroup = ({
|
|
|
6798
6849
|
className,
|
|
6799
6850
|
htmlProps,
|
|
6800
6851
|
...rest
|
|
6801
|
-
}) => /* @__PURE__ */
|
|
6852
|
+
}) => /* @__PURE__ */ jsx241(
|
|
6802
6853
|
"div",
|
|
6803
6854
|
{
|
|
6804
6855
|
...getBaseHTMLProps(id, cn(className, DescriptionList_default.group), htmlProps, rest),
|
|
@@ -6816,10 +6867,10 @@ var DetailList_default = {
|
|
|
6816
6867
|
"list--striped": "DetailList_list--striped",
|
|
6817
6868
|
"list--striped-with-bp": "DetailList_list--striped-with-bp",
|
|
6818
6869
|
"list--small": "DetailList_list--small",
|
|
6819
|
-
cell: "DetailList_cell",
|
|
6820
6870
|
"list--medium": "DetailList_list--medium",
|
|
6821
6871
|
"list--large": "DetailList_list--large",
|
|
6822
6872
|
column: "DetailList_column",
|
|
6873
|
+
cell: "DetailList_cell",
|
|
6823
6874
|
term: "DetailList_term"
|
|
6824
6875
|
};
|
|
6825
6876
|
|
|
@@ -6829,7 +6880,7 @@ var DetailListContext = createContext10({});
|
|
|
6829
6880
|
var useDetailListContext = () => useContext13(DetailListContext);
|
|
6830
6881
|
|
|
6831
6882
|
// src/components/DetailList/DetailList.tsx
|
|
6832
|
-
import { jsx as
|
|
6883
|
+
import { jsx as jsx242 } from "react/jsx-runtime";
|
|
6833
6884
|
var DetailList = ({
|
|
6834
6885
|
id,
|
|
6835
6886
|
className,
|
|
@@ -6839,7 +6890,7 @@ var DetailList = ({
|
|
|
6839
6890
|
size: size2 = "medium",
|
|
6840
6891
|
smallScreenBreakpoint,
|
|
6841
6892
|
...rest
|
|
6842
|
-
}) => /* @__PURE__ */
|
|
6893
|
+
}) => /* @__PURE__ */ jsx242(DetailListContext, { value: { smallScreenBreakpoint }, children: /* @__PURE__ */ jsx242(
|
|
6843
6894
|
"dl",
|
|
6844
6895
|
{
|
|
6845
6896
|
...getBaseHTMLProps(
|
|
@@ -6860,17 +6911,17 @@ var DetailList = ({
|
|
|
6860
6911
|
DetailList.displayName = "DetailList";
|
|
6861
6912
|
|
|
6862
6913
|
// src/components/DetailList/DetailListDesc.tsx
|
|
6863
|
-
import { jsx as
|
|
6864
|
-
var DetailListDesc = ({ className, ...rest }) => /* @__PURE__ */
|
|
6914
|
+
import { jsx as jsx243 } from "react/jsx-runtime";
|
|
6915
|
+
var DetailListDesc = ({ className, ...rest }) => /* @__PURE__ */ jsx243("dd", { className: cn(className, DetailList_default.cell), ...rest });
|
|
6865
6916
|
DetailListDesc.displayName = "DetailListDesc";
|
|
6866
6917
|
|
|
6867
6918
|
// src/components/DetailList/DetailListRow.tsx
|
|
6868
|
-
import { Fragment as Fragment5, jsx as
|
|
6919
|
+
import { Fragment as Fragment5, jsx as jsx244, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
6869
6920
|
var DetailListRow = ({ className, ...rest }) => {
|
|
6870
6921
|
const { smallScreenBreakpoint: bp } = useDetailListContext();
|
|
6871
6922
|
const hasBp = !!bp;
|
|
6872
6923
|
return /* @__PURE__ */ jsxs49(Fragment5, { children: [
|
|
6873
|
-
/* @__PURE__ */
|
|
6924
|
+
/* @__PURE__ */ jsx244(
|
|
6874
6925
|
Box,
|
|
6875
6926
|
{
|
|
6876
6927
|
display: "table-row",
|
|
@@ -6879,7 +6930,7 @@ var DetailListRow = ({ className, ...rest }) => {
|
|
|
6879
6930
|
...rest
|
|
6880
6931
|
}
|
|
6881
6932
|
),
|
|
6882
|
-
hasBp && /* @__PURE__ */
|
|
6933
|
+
hasBp && /* @__PURE__ */ jsx244(
|
|
6883
6934
|
Box,
|
|
6884
6935
|
{
|
|
6885
6936
|
display: "flex",
|
|
@@ -6894,8 +6945,8 @@ var DetailListRow = ({ className, ...rest }) => {
|
|
|
6894
6945
|
DetailListRow.displayName = "DetailListRow";
|
|
6895
6946
|
|
|
6896
6947
|
// src/components/DetailList/DetailListTerm.tsx
|
|
6897
|
-
import { jsx as
|
|
6898
|
-
var DetailListTerm = ({ className, ...rest }) => /* @__PURE__ */
|
|
6948
|
+
import { jsx as jsx245 } from "react/jsx-runtime";
|
|
6949
|
+
var DetailListTerm = ({ className, ...rest }) => /* @__PURE__ */ jsx245("dt", { className: cn(className, DetailList_default.cell, DetailList_default.term), ...rest });
|
|
6899
6950
|
DetailListTerm.displayName = "DetailListTerm";
|
|
6900
6951
|
|
|
6901
6952
|
// src/components/Drawer/Drawer.tsx
|
|
@@ -6926,7 +6977,7 @@ var DrawerContext = createContext11({});
|
|
|
6926
6977
|
var useDrawerContext = () => useContext14(DrawerContext);
|
|
6927
6978
|
|
|
6928
6979
|
// src/components/Drawer/Drawer.tsx
|
|
6929
|
-
import { jsx as
|
|
6980
|
+
import { jsx as jsx246, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
6930
6981
|
var DRAWER_SIZES = createSizes("small", "medium", "large");
|
|
6931
6982
|
var Drawer = ({
|
|
6932
6983
|
children,
|
|
@@ -7031,8 +7082,8 @@ var Drawer = ({
|
|
|
7031
7082
|
paddingInline: "var(--dds-drawer-content-container-padding)",
|
|
7032
7083
|
className: Drawer_default["drawer-header"],
|
|
7033
7084
|
children: [
|
|
7034
|
-
hasHeader && /* @__PURE__ */
|
|
7035
|
-
/* @__PURE__ */
|
|
7085
|
+
hasHeader && /* @__PURE__ */ jsx246("div", { id: headerId, children: typeof header === "string" ? /* @__PURE__ */ jsx246(Heading, { level: 2, typographyType: "headingLarge", children: header }) : header }),
|
|
7086
|
+
/* @__PURE__ */ jsx246(
|
|
7036
7087
|
Button,
|
|
7037
7088
|
{
|
|
7038
7089
|
className: cn(Drawer_default["button--close"]),
|
|
@@ -7047,7 +7098,7 @@ var Drawer = ({
|
|
|
7047
7098
|
]
|
|
7048
7099
|
}
|
|
7049
7100
|
),
|
|
7050
|
-
/* @__PURE__ */
|
|
7101
|
+
/* @__PURE__ */ jsx246(
|
|
7051
7102
|
VStack,
|
|
7052
7103
|
{
|
|
7053
7104
|
gap: "x1",
|
|
@@ -7059,7 +7110,7 @@ var Drawer = ({
|
|
|
7059
7110
|
]
|
|
7060
7111
|
}
|
|
7061
7112
|
);
|
|
7062
|
-
const component = withBackdrop ? /* @__PURE__ */
|
|
7113
|
+
const component = withBackdrop ? /* @__PURE__ */ jsx246(
|
|
7063
7114
|
Backdrop,
|
|
7064
7115
|
{
|
|
7065
7116
|
zIndex: "drawer",
|
|
@@ -7082,7 +7133,7 @@ import {
|
|
|
7082
7133
|
useRef as useRef20,
|
|
7083
7134
|
useState as useState13
|
|
7084
7135
|
} from "react";
|
|
7085
|
-
import { jsx as
|
|
7136
|
+
import { jsx as jsx247 } from "react/jsx-runtime";
|
|
7086
7137
|
var DrawerGroup = ({
|
|
7087
7138
|
children,
|
|
7088
7139
|
isInitiallyOpen,
|
|
@@ -7126,7 +7177,7 @@ var DrawerGroup = ({
|
|
|
7126
7177
|
onClick: handleOpen
|
|
7127
7178
|
}) : child);
|
|
7128
7179
|
});
|
|
7129
|
-
return /* @__PURE__ */
|
|
7180
|
+
return /* @__PURE__ */ jsx247(
|
|
7130
7181
|
DrawerContext,
|
|
7131
7182
|
{
|
|
7132
7183
|
value: {
|
|
@@ -7142,14 +7193,14 @@ var DrawerGroup = ({
|
|
|
7142
7193
|
DrawerGroup.displayName = "DrawerGroup";
|
|
7143
7194
|
|
|
7144
7195
|
// src/components/EmptyContent/EmptyContent.tsx
|
|
7145
|
-
import { jsx as
|
|
7196
|
+
import { jsx as jsx248, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
7146
7197
|
function EmptyContent({
|
|
7147
7198
|
headerText,
|
|
7148
7199
|
message,
|
|
7149
7200
|
headerHeadingLevel = 2,
|
|
7150
7201
|
...rest
|
|
7151
7202
|
}) {
|
|
7152
|
-
return /* @__PURE__ */
|
|
7203
|
+
return /* @__PURE__ */ jsx248(
|
|
7153
7204
|
Paper,
|
|
7154
7205
|
{
|
|
7155
7206
|
display: "flex",
|
|
@@ -7163,8 +7214,8 @@ function EmptyContent({
|
|
|
7163
7214
|
borderRadius: "surface",
|
|
7164
7215
|
...rest,
|
|
7165
7216
|
children: /* @__PURE__ */ jsxs51(VStack, { maxWidth: "70ch", gap: "x1", textAlign: "center", children: [
|
|
7166
|
-
headerText && /* @__PURE__ */
|
|
7167
|
-
/* @__PURE__ */
|
|
7217
|
+
headerText && /* @__PURE__ */ jsx248(Heading, { level: headerHeadingLevel, typographyType: "headingMedium", children: headerText }),
|
|
7218
|
+
/* @__PURE__ */ jsx248(Paragraph, { color: "text-medium", children: message })
|
|
7168
7219
|
] })
|
|
7169
7220
|
}
|
|
7170
7221
|
);
|
|
@@ -7184,7 +7235,7 @@ var FavStar_default = {
|
|
|
7184
7235
|
};
|
|
7185
7236
|
|
|
7186
7237
|
// src/components/FavStar/FavStar.tsx
|
|
7187
|
-
import { jsx as
|
|
7238
|
+
import { jsx as jsx249, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
7188
7239
|
var FAVSTAR_SIZES = createSizes("medium", "large");
|
|
7189
7240
|
var FavStar = ({
|
|
7190
7241
|
id,
|
|
@@ -7222,7 +7273,7 @@ var FavStar = ({
|
|
|
7222
7273
|
style,
|
|
7223
7274
|
htmlFor: id != null ? id : generatedId,
|
|
7224
7275
|
children: [
|
|
7225
|
-
/* @__PURE__ */
|
|
7276
|
+
/* @__PURE__ */ jsx249(
|
|
7226
7277
|
HiddenInput,
|
|
7227
7278
|
{
|
|
7228
7279
|
...props,
|
|
@@ -7233,8 +7284,8 @@ var FavStar = ({
|
|
|
7233
7284
|
"aria-label": (_a = props["aria-label"]) != null ? _a : t(texts8.favourite)
|
|
7234
7285
|
}
|
|
7235
7286
|
),
|
|
7236
|
-
/* @__PURE__ */
|
|
7237
|
-
/* @__PURE__ */
|
|
7287
|
+
/* @__PURE__ */ jsx249(Icon, { iconSize: size2, icon: StarIcon, className: FavStar_default.icon }),
|
|
7288
|
+
/* @__PURE__ */ jsx249(
|
|
7238
7289
|
Icon,
|
|
7239
7290
|
{
|
|
7240
7291
|
iconSize: size2,
|
|
@@ -7292,7 +7343,7 @@ var CharCounter_default = {
|
|
|
7292
7343
|
};
|
|
7293
7344
|
|
|
7294
7345
|
// src/components/helpers/CharCounter/CharCounter.tsx
|
|
7295
|
-
import { jsx as
|
|
7346
|
+
import { jsx as jsx250, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
7296
7347
|
function CharCounter(props) {
|
|
7297
7348
|
const { t } = useTranslation();
|
|
7298
7349
|
const { current, max, id } = props;
|
|
@@ -7312,14 +7363,14 @@ function CharCounter(props) {
|
|
|
7312
7363
|
"/",
|
|
7313
7364
|
max
|
|
7314
7365
|
] }),
|
|
7315
|
-
/* @__PURE__ */
|
|
7366
|
+
/* @__PURE__ */ jsx250(VisuallyHidden, { children: t(texts9.charsWritten(current, max, max - current)) })
|
|
7316
7367
|
]
|
|
7317
7368
|
}
|
|
7318
7369
|
);
|
|
7319
7370
|
}
|
|
7320
7371
|
var renderCharCounter = (id, isShown, textLength, maxLength) => {
|
|
7321
7372
|
if (!!maxLength && Number.isInteger(maxLength) && maxLength > 0 && isShown)
|
|
7322
|
-
return /* @__PURE__ */
|
|
7373
|
+
return /* @__PURE__ */ jsx250(CharCounter, { id, max: maxLength, current: textLength });
|
|
7323
7374
|
};
|
|
7324
7375
|
var texts9 = createTexts({
|
|
7325
7376
|
charsWritten: (current, max, remain) => ({
|
|
@@ -7331,7 +7382,7 @@ var texts9 = createTexts({
|
|
|
7331
7382
|
});
|
|
7332
7383
|
|
|
7333
7384
|
// src/components/TextArea/TextArea.tsx
|
|
7334
|
-
import { jsx as
|
|
7385
|
+
import { jsx as jsx251, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
7335
7386
|
var TextArea = ({
|
|
7336
7387
|
id,
|
|
7337
7388
|
value,
|
|
@@ -7372,7 +7423,6 @@ var TextArea = ({
|
|
|
7372
7423
|
};
|
|
7373
7424
|
const hasErrorMessage = !!errorMessage;
|
|
7374
7425
|
const hasMessage = hasErrorMessage || !!tip;
|
|
7375
|
-
const hasLabel = !!label;
|
|
7376
7426
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
7377
7427
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
7378
7428
|
const characterCounterId = derivativeIdGenerator(
|
|
@@ -7382,17 +7432,8 @@ var TextArea = ({
|
|
|
7382
7432
|
const showRequiredStyling = required || !!ariaRequired;
|
|
7383
7433
|
const inputWidth = getInputWidth(width);
|
|
7384
7434
|
return /* @__PURE__ */ jsxs54("div", { className: cn(className, Input_default.container), style: { ...style }, children: [
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
{
|
|
7388
|
-
showRequiredStyling,
|
|
7389
|
-
htmlFor: uniqueId,
|
|
7390
|
-
className: Input_default.label,
|
|
7391
|
-
readOnly,
|
|
7392
|
-
children: label
|
|
7393
|
-
}
|
|
7394
|
-
),
|
|
7395
|
-
/* @__PURE__ */ jsx250(
|
|
7435
|
+
renderLabel({ label, htmlFor: uniqueId, readOnly, showRequiredStyling }),
|
|
7436
|
+
/* @__PURE__ */ jsx251(
|
|
7396
7437
|
Box,
|
|
7397
7438
|
{
|
|
7398
7439
|
as: "textarea",
|
|
@@ -7450,7 +7491,7 @@ TextArea.displayName = "TextArea";
|
|
|
7450
7491
|
var getIconSize = (layout) => layout === "vertical" ? "large" : "medium";
|
|
7451
7492
|
|
|
7452
7493
|
// src/components/Feedback/CommentComponent.tsx
|
|
7453
|
-
import { jsx as
|
|
7494
|
+
import { jsx as jsx252, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
7454
7495
|
var CommentComponent = ({
|
|
7455
7496
|
layout,
|
|
7456
7497
|
rating,
|
|
@@ -7466,7 +7507,7 @@ var CommentComponent = ({
|
|
|
7466
7507
|
const { t } = useTranslation();
|
|
7467
7508
|
return /* @__PURE__ */ jsxs55(VStack, { gap: "x1", children: [
|
|
7468
7509
|
/* @__PURE__ */ jsxs55("span", { className: Feedback_default["rating-submitted-title"], children: [
|
|
7469
|
-
/* @__PURE__ */
|
|
7510
|
+
/* @__PURE__ */ jsx252(
|
|
7470
7511
|
Icon,
|
|
7471
7512
|
{
|
|
7472
7513
|
icon: rating === "positive" ? ThumbUpFilledIcon : ThumbDownFilledIcon,
|
|
@@ -7479,7 +7520,7 @@ var CommentComponent = ({
|
|
|
7479
7520
|
" "
|
|
7480
7521
|
] })
|
|
7481
7522
|
] }),
|
|
7482
|
-
/* @__PURE__ */
|
|
7523
|
+
/* @__PURE__ */ jsx252(
|
|
7483
7524
|
TextArea,
|
|
7484
7525
|
{
|
|
7485
7526
|
value: feedbackText,
|
|
@@ -7488,7 +7529,7 @@ var CommentComponent = ({
|
|
|
7488
7529
|
tip: textAreaTip
|
|
7489
7530
|
}
|
|
7490
7531
|
),
|
|
7491
|
-
/* @__PURE__ */
|
|
7532
|
+
/* @__PURE__ */ jsx252(
|
|
7492
7533
|
Button,
|
|
7493
7534
|
{
|
|
7494
7535
|
purpose: "secondary",
|
|
@@ -7528,7 +7569,7 @@ var Tooltip_default = {
|
|
|
7528
7569
|
};
|
|
7529
7570
|
|
|
7530
7571
|
// src/components/Tooltip/Tooltip.tsx
|
|
7531
|
-
import { jsx as
|
|
7572
|
+
import { jsx as jsx253, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
7532
7573
|
var Tooltip = ({
|
|
7533
7574
|
text,
|
|
7534
7575
|
placement = "bottom",
|
|
@@ -7651,15 +7692,15 @@ var Tooltip = ({
|
|
|
7651
7692
|
),
|
|
7652
7693
|
children: [
|
|
7653
7694
|
text,
|
|
7654
|
-
/* @__PURE__ */
|
|
7655
|
-
/* @__PURE__ */
|
|
7695
|
+
/* @__PURE__ */ jsx253("div", { ref: setArrowElement, style: positionStyles.arrow, children: /* @__PURE__ */ jsxs56("svg", { width: "36", height: "9", children: [
|
|
7696
|
+
/* @__PURE__ */ jsx253(
|
|
7656
7697
|
"path",
|
|
7657
7698
|
{
|
|
7658
7699
|
d: "M16.586 6.586L10 0h16.154a.373.373 0 00-.263.11l-6.477 6.476a2 2 0 01-2.828 0z",
|
|
7659
7700
|
className: Tooltip_default["svg-arrow__background"]
|
|
7660
7701
|
}
|
|
7661
7702
|
),
|
|
7662
|
-
/* @__PURE__ */
|
|
7703
|
+
/* @__PURE__ */ jsx253(
|
|
7663
7704
|
"path",
|
|
7664
7705
|
{
|
|
7665
7706
|
fillRule: "evenodd",
|
|
@@ -7679,7 +7720,7 @@ var Tooltip = ({
|
|
|
7679
7720
|
Tooltip.displayName = "Tooltip";
|
|
7680
7721
|
|
|
7681
7722
|
// src/components/Feedback/RatingComponent.tsx
|
|
7682
|
-
import { jsx as
|
|
7723
|
+
import { jsx as jsx254, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
7683
7724
|
var RatingComponent = ({
|
|
7684
7725
|
layout,
|
|
7685
7726
|
ratingLabel,
|
|
@@ -7689,7 +7730,7 @@ var RatingComponent = ({
|
|
|
7689
7730
|
handleRatingChange
|
|
7690
7731
|
}) => {
|
|
7691
7732
|
const { t } = useTranslation();
|
|
7692
|
-
const button = (rating, layout2, tooltip) => /* @__PURE__ */
|
|
7733
|
+
const button = (rating, layout2, tooltip) => /* @__PURE__ */ jsx254(
|
|
7693
7734
|
InlineIconButton,
|
|
7694
7735
|
{
|
|
7695
7736
|
"aria-label": tooltip,
|
|
@@ -7707,10 +7748,10 @@ var RatingComponent = ({
|
|
|
7707
7748
|
Feedback_default[`rating-container--${layout}`]
|
|
7708
7749
|
),
|
|
7709
7750
|
children: [
|
|
7710
|
-
/* @__PURE__ */
|
|
7711
|
-
loading ? /* @__PURE__ */
|
|
7712
|
-
/* @__PURE__ */
|
|
7713
|
-
/* @__PURE__ */
|
|
7751
|
+
/* @__PURE__ */ jsx254("h2", { className: typographyStyles_default["label-medium"], children: ratingLabel }),
|
|
7752
|
+
loading ? /* @__PURE__ */ jsx254(Spinner, { tooltip: t(texts11.uploadingFeedback) }) : /* @__PURE__ */ jsxs57(HStack, { gap: "x1", children: [
|
|
7753
|
+
/* @__PURE__ */ jsx254(Tooltip, { text: thumbUpTooltip, children: button("positive", layout, thumbUpTooltip) }),
|
|
7754
|
+
/* @__PURE__ */ jsx254(Tooltip, { text: thumbDownTooltip, children: /* @__PURE__ */ jsx254("div", { children: button("negative", layout, thumbDownTooltip) }) })
|
|
7714
7755
|
] })
|
|
7715
7756
|
]
|
|
7716
7757
|
}
|
|
@@ -7726,7 +7767,7 @@ var texts11 = createTexts({
|
|
|
7726
7767
|
});
|
|
7727
7768
|
|
|
7728
7769
|
// src/components/Feedback/Feedback.tsx
|
|
7729
|
-
import { jsx as
|
|
7770
|
+
import { jsx as jsx255 } from "react/jsx-runtime";
|
|
7730
7771
|
var Feedback = ({
|
|
7731
7772
|
layout = "vertical",
|
|
7732
7773
|
ratingLabel,
|
|
@@ -7781,7 +7822,7 @@ var Feedback = ({
|
|
|
7781
7822
|
if (isSubmittedProp === void 0) setIsFeedbackSubmitted(true);
|
|
7782
7823
|
};
|
|
7783
7824
|
if (rating === null && !isFeedbackSubmitted) {
|
|
7784
|
-
return /* @__PURE__ */
|
|
7825
|
+
return /* @__PURE__ */ jsx255(
|
|
7785
7826
|
RatingComponent,
|
|
7786
7827
|
{
|
|
7787
7828
|
layout,
|
|
@@ -7794,7 +7835,7 @@ var Feedback = ({
|
|
|
7794
7835
|
);
|
|
7795
7836
|
}
|
|
7796
7837
|
if (!feedbackTextAreaExcluded && !isFeedbackSubmitted) {
|
|
7797
|
-
return /* @__PURE__ */
|
|
7838
|
+
return /* @__PURE__ */ jsx255(
|
|
7798
7839
|
CommentComponent,
|
|
7799
7840
|
{
|
|
7800
7841
|
layout,
|
|
@@ -7810,7 +7851,7 @@ var Feedback = ({
|
|
|
7810
7851
|
}
|
|
7811
7852
|
);
|
|
7812
7853
|
}
|
|
7813
|
-
return /* @__PURE__ */
|
|
7854
|
+
return /* @__PURE__ */ jsx255(Paragraph, { children: tSubmittedTitle });
|
|
7814
7855
|
};
|
|
7815
7856
|
var texts12 = createTexts({
|
|
7816
7857
|
ratingQuestion: {
|
|
@@ -7855,13 +7896,13 @@ var texts12 = createTexts({
|
|
|
7855
7896
|
var container = "Fieldset_container";
|
|
7856
7897
|
|
|
7857
7898
|
// src/components/Fieldset/Fieldset.tsx
|
|
7858
|
-
import { jsx as
|
|
7899
|
+
import { jsx as jsx256 } from "react/jsx-runtime";
|
|
7859
7900
|
var Fieldset = ({
|
|
7860
7901
|
id,
|
|
7861
7902
|
className,
|
|
7862
7903
|
htmlProps,
|
|
7863
7904
|
...rest
|
|
7864
|
-
}) => /* @__PURE__ */
|
|
7905
|
+
}) => /* @__PURE__ */ jsx256(
|
|
7865
7906
|
"fieldset",
|
|
7866
7907
|
{
|
|
7867
7908
|
...getBaseHTMLProps(id, cn(className, container), htmlProps, rest)
|
|
@@ -7870,27 +7911,27 @@ var Fieldset = ({
|
|
|
7870
7911
|
Fieldset.displayName = "Fieldset";
|
|
7871
7912
|
|
|
7872
7913
|
// src/components/Fieldset/FieldsetGroup.tsx
|
|
7873
|
-
import { jsx as
|
|
7914
|
+
import { jsx as jsx257 } from "react/jsx-runtime";
|
|
7874
7915
|
var FieldsetGroup = ({
|
|
7875
7916
|
id,
|
|
7876
7917
|
className,
|
|
7877
7918
|
htmlProps,
|
|
7878
7919
|
...rest
|
|
7879
|
-
}) => /* @__PURE__ */
|
|
7920
|
+
}) => /* @__PURE__ */ jsx257(VStack, { gap: "x1.5", ...getBaseHTMLProps(id, className, htmlProps, rest) });
|
|
7880
7921
|
FieldsetGroup.displayName = "FieldsetGroup";
|
|
7881
7922
|
|
|
7882
7923
|
// src/components/FileUploader/FileUploader.tsx
|
|
7883
7924
|
import { useId as useId14 } from "react";
|
|
7884
7925
|
|
|
7885
7926
|
// src/components/FileUploader/ErrorList.tsx
|
|
7886
|
-
import { jsx as
|
|
7927
|
+
import { jsx as jsx258 } from "react/jsx-runtime";
|
|
7887
7928
|
var ErrorList = (props) => {
|
|
7888
7929
|
const { errors } = props;
|
|
7889
7930
|
if (errors.length < 1) {
|
|
7890
7931
|
return null;
|
|
7891
7932
|
}
|
|
7892
7933
|
if (errors.length === 1) {
|
|
7893
|
-
return /* @__PURE__ */
|
|
7934
|
+
return /* @__PURE__ */ jsx258(
|
|
7894
7935
|
InputMessage,
|
|
7895
7936
|
{
|
|
7896
7937
|
id: errors[0].id,
|
|
@@ -7899,8 +7940,8 @@ var ErrorList = (props) => {
|
|
|
7899
7940
|
}
|
|
7900
7941
|
);
|
|
7901
7942
|
}
|
|
7902
|
-
return /* @__PURE__ */
|
|
7903
|
-
return /* @__PURE__ */
|
|
7943
|
+
return /* @__PURE__ */ jsx258(StylelessList, { children: errors.map(({ id, message }) => {
|
|
7944
|
+
return /* @__PURE__ */ jsx258("li", { children: /* @__PURE__ */ jsx258(
|
|
7904
7945
|
InputMessage,
|
|
7905
7946
|
{
|
|
7906
7947
|
id,
|
|
@@ -7917,22 +7958,31 @@ var FileUploader_default = {
|
|
|
7917
7958
|
"input-container": "FileUploader_input-container",
|
|
7918
7959
|
"input-container--with-errors": "FileUploader_input-container--with-errors",
|
|
7919
7960
|
"input-container--drag-active": "FileUploader_input-container--drag-active",
|
|
7920
|
-
"input-container--no-drag-zone": "FileUploader_input-container--no-drag-zone",
|
|
7921
7961
|
"file--invalid": "FileUploader_file--invalid",
|
|
7922
7962
|
"file__icon--invalid": "FileUploader_file__icon--invalid",
|
|
7923
7963
|
"file__icon--valid": "FileUploader_file__icon--valid",
|
|
7924
|
-
file__name: "FileUploader_file__name"
|
|
7964
|
+
file__name: "FileUploader_file__name",
|
|
7965
|
+
"readonly--file-list": "FileUploader_readonly--file-list"
|
|
7925
7966
|
};
|
|
7926
7967
|
|
|
7927
7968
|
// src/components/FileUploader/File.tsx
|
|
7928
|
-
import { jsx as
|
|
7969
|
+
import { Fragment as Fragment6, jsx as jsx259, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
7929
7970
|
var File = (props) => {
|
|
7930
7971
|
const { t } = useTranslation();
|
|
7931
|
-
const {
|
|
7972
|
+
const {
|
|
7973
|
+
parentId,
|
|
7974
|
+
index,
|
|
7975
|
+
file: stateFile,
|
|
7976
|
+
removeFile,
|
|
7977
|
+
isValid,
|
|
7978
|
+
disabled,
|
|
7979
|
+
readOnly
|
|
7980
|
+
} = props;
|
|
7932
7981
|
const errorsList = stateFile.errors.map((e, errorIndex) => ({
|
|
7933
7982
|
id: derivativeIdGenerator(parentId, `file-${index}-error-${errorIndex}`),
|
|
7934
7983
|
message: e
|
|
7935
7984
|
}));
|
|
7985
|
+
const inactive = disabled || readOnly;
|
|
7936
7986
|
return /* @__PURE__ */ jsxs58("li", { children: [
|
|
7937
7987
|
/* @__PURE__ */ jsxs58(
|
|
7938
7988
|
Paper,
|
|
@@ -7943,46 +7993,50 @@ var File = (props) => {
|
|
|
7943
7993
|
gap: "x0.75",
|
|
7944
7994
|
marginBlock: "x0.5 0",
|
|
7945
7995
|
padding: "x0.5 x1",
|
|
7946
|
-
border: isValid ? "border-default" : "border-danger",
|
|
7947
|
-
background: "surface-subtle",
|
|
7996
|
+
border: disabled ? "border-subtle" : isValid ? "border-default" : "border-danger",
|
|
7997
|
+
background: inactive ? "surface-field-disabled" : "surface-subtle",
|
|
7948
7998
|
className: cn(!isValid && FileUploader_default["file--invalid"]),
|
|
7949
7999
|
children: [
|
|
7950
|
-
/* @__PURE__ */
|
|
7951
|
-
|
|
8000
|
+
/* @__PURE__ */ jsx259(
|
|
8001
|
+
Typography,
|
|
7952
8002
|
{
|
|
7953
|
-
|
|
8003
|
+
as: "span",
|
|
8004
|
+
color: disabled ? "text-subtle" : readOnly ? "text-medium" : void 0,
|
|
8005
|
+
className: cn(FileUploader_default.file__name),
|
|
7954
8006
|
children: stateFile.file.name
|
|
7955
8007
|
}
|
|
7956
8008
|
),
|
|
7957
|
-
/* @__PURE__ */
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
7962
|
-
|
|
7963
|
-
),
|
|
7964
|
-
/* @__PURE__ */ jsx258(
|
|
7965
|
-
Button,
|
|
7966
|
-
{
|
|
7967
|
-
size: "small",
|
|
7968
|
-
purpose: "tertiary",
|
|
7969
|
-
type: "button",
|
|
7970
|
-
onClick: removeFile,
|
|
7971
|
-
icon: CloseIcon,
|
|
7972
|
-
htmlProps: {
|
|
7973
|
-
"aria-label": t(texts13.removeFile(stateFile.file.name)),
|
|
7974
|
-
"aria-invalid": !isValid ? true : void 0,
|
|
7975
|
-
"aria-errormessage": !isValid ? t(texts13.invalidFile) : void 0,
|
|
7976
|
-
"aria-describedby": spaceSeparatedIdListGenerator(
|
|
7977
|
-
errorsList.map((e) => e.id)
|
|
7978
|
-
)
|
|
8009
|
+
!inactive && /* @__PURE__ */ jsxs58(Fragment6, { children: [
|
|
8010
|
+
/* @__PURE__ */ jsx259(
|
|
8011
|
+
Icon,
|
|
8012
|
+
{
|
|
8013
|
+
icon: isValid ? CheckCircledIcon : ErrorIcon,
|
|
8014
|
+
className: FileUploader_default[`file__icon--${isValid ? "valid" : "invalid"}`]
|
|
7979
8015
|
}
|
|
7980
|
-
|
|
7981
|
-
|
|
8016
|
+
),
|
|
8017
|
+
/* @__PURE__ */ jsx259(
|
|
8018
|
+
Button,
|
|
8019
|
+
{
|
|
8020
|
+
size: "small",
|
|
8021
|
+
purpose: "tertiary",
|
|
8022
|
+
type: "button",
|
|
8023
|
+
onClick: removeFile,
|
|
8024
|
+
icon: CloseIcon,
|
|
8025
|
+
htmlProps: {
|
|
8026
|
+
"aria-label": t(texts13.removeFile(stateFile.file.name)),
|
|
8027
|
+
"aria-invalid": !isValid ? true : void 0,
|
|
8028
|
+
"aria-errormessage": !isValid ? t(texts13.invalidFile) : void 0,
|
|
8029
|
+
"aria-describedby": spaceSeparatedIdListGenerator(
|
|
8030
|
+
errorsList.map((e) => e.id)
|
|
8031
|
+
)
|
|
8032
|
+
}
|
|
8033
|
+
}
|
|
8034
|
+
)
|
|
8035
|
+
] })
|
|
7982
8036
|
]
|
|
7983
8037
|
}
|
|
7984
8038
|
),
|
|
7985
|
-
/* @__PURE__ */
|
|
8039
|
+
/* @__PURE__ */ jsx259(ErrorList, { errors: errorsList })
|
|
7986
8040
|
] });
|
|
7987
8041
|
};
|
|
7988
8042
|
var texts13 = createTexts({
|
|
@@ -8079,14 +8133,12 @@ var isEventWithFiles = (event) => {
|
|
|
8079
8133
|
var isFileAccepted = (file, accept) => {
|
|
8080
8134
|
return accept !== void 0 ? isAccepted(file, accept) : true;
|
|
8081
8135
|
};
|
|
8082
|
-
var getTooManyFilesErrorMessage = (maxFiles) => `For mange filer, maks ${maxFiles}stk`;
|
|
8083
|
-
var getInvalidFileTypeErrorMessage = () => "Ugyldig filtype";
|
|
8084
8136
|
|
|
8085
8137
|
// src/components/FileUploader/useFileUploader.ts
|
|
8086
|
-
var calcRootErrors = (files, maxFiles, errorMessage) => {
|
|
8138
|
+
var calcRootErrors = (maxFilesErrorMessage, files, maxFiles, errorMessage) => {
|
|
8087
8139
|
const errors = [];
|
|
8088
8140
|
if (maxFiles && maxFiles >= 1 && files.length > maxFiles) {
|
|
8089
|
-
errors.push(
|
|
8141
|
+
errors.push(maxFilesErrorMessage + maxFiles);
|
|
8090
8142
|
}
|
|
8091
8143
|
if (errorMessage) {
|
|
8092
8144
|
errors.push(errorMessage);
|
|
@@ -8098,11 +8150,14 @@ var useFileUploader = (props) => {
|
|
|
8098
8150
|
initialFiles,
|
|
8099
8151
|
value,
|
|
8100
8152
|
onChange,
|
|
8153
|
+
onKeyDown,
|
|
8101
8154
|
accept,
|
|
8102
8155
|
maxFiles,
|
|
8103
8156
|
disabled,
|
|
8157
|
+
readOnly,
|
|
8104
8158
|
errorMessage
|
|
8105
8159
|
} = props;
|
|
8160
|
+
const { t } = useTranslation();
|
|
8106
8161
|
const rootRef = useRef23(null);
|
|
8107
8162
|
const inputRef = useRef23(null);
|
|
8108
8163
|
const buttonRef = useRef23(null);
|
|
@@ -8120,6 +8175,7 @@ var useFileUploader = (props) => {
|
|
|
8120
8175
|
isFileDialogActive: false,
|
|
8121
8176
|
isDragActive: false,
|
|
8122
8177
|
rootErrors: calcRootErrors(
|
|
8178
|
+
t(texts14.invalidFileAmount),
|
|
8123
8179
|
initialFileUploaderFiles,
|
|
8124
8180
|
maxFiles,
|
|
8125
8181
|
errorMessage
|
|
@@ -8132,7 +8188,7 @@ var useFileUploader = (props) => {
|
|
|
8132
8188
|
const accepted = isFileAccepted(file, accept);
|
|
8133
8189
|
return {
|
|
8134
8190
|
file,
|
|
8135
|
-
errors: accepted ? [] : [
|
|
8191
|
+
errors: accepted ? [] : [t(texts14.invalidFileType)]
|
|
8136
8192
|
};
|
|
8137
8193
|
});
|
|
8138
8194
|
dispatch({
|
|
@@ -8144,7 +8200,12 @@ var useFileUploader = (props) => {
|
|
|
8144
8200
|
useEffect23(() => {
|
|
8145
8201
|
dispatch({
|
|
8146
8202
|
type: "setRootErrors",
|
|
8147
|
-
payload: calcRootErrors(
|
|
8203
|
+
payload: calcRootErrors(
|
|
8204
|
+
t(texts14.invalidFileAmount),
|
|
8205
|
+
stateFiles,
|
|
8206
|
+
maxFiles,
|
|
8207
|
+
errorMessage
|
|
8208
|
+
)
|
|
8148
8209
|
});
|
|
8149
8210
|
}, [dispatch, stateFiles, maxFiles, errorMessage]);
|
|
8150
8211
|
const onRootFocus = useCallback6(
|
|
@@ -8194,7 +8255,7 @@ var useFileUploader = (props) => {
|
|
|
8194
8255
|
const accepted = isFileAccepted(file, accept);
|
|
8195
8256
|
return {
|
|
8196
8257
|
file,
|
|
8197
|
-
errors: accepted ? [] : [
|
|
8258
|
+
errors: accepted ? [] : [t(texts14.invalidFileType)]
|
|
8198
8259
|
};
|
|
8199
8260
|
}).concat(stateFiles);
|
|
8200
8261
|
onChange(newFiles.map((f) => f.file));
|
|
@@ -8266,10 +8327,13 @@ var useFileUploader = (props) => {
|
|
|
8266
8327
|
const getInputProps = useCallback6(
|
|
8267
8328
|
() => ({
|
|
8268
8329
|
type: "file",
|
|
8269
|
-
|
|
8270
|
-
tabIndex: -1,
|
|
8330
|
+
tabIndex: readOnly ? void 0 : -1,
|
|
8271
8331
|
ref: inputRef,
|
|
8272
|
-
|
|
8332
|
+
disabled,
|
|
8333
|
+
"aria-hidden": readOnly ? void 0 : true,
|
|
8334
|
+
onChange: readOnlyChangeHandler(readOnly, setFiles),
|
|
8335
|
+
onKeyDown: readOnlyKeyDownHandler("file", readOnly, onKeyDown),
|
|
8336
|
+
readOnly,
|
|
8273
8337
|
multiple: !maxFiles || maxFiles > 1,
|
|
8274
8338
|
...accept ? { accept: accept.join(",") } : {}
|
|
8275
8339
|
}),
|
|
@@ -8283,9 +8347,23 @@ var useFileUploader = (props) => {
|
|
|
8283
8347
|
removeFile
|
|
8284
8348
|
};
|
|
8285
8349
|
};
|
|
8350
|
+
var texts14 = createTexts({
|
|
8351
|
+
invalidFileType: {
|
|
8352
|
+
nb: "Ugyldig filtype",
|
|
8353
|
+
no: "Ugyldig filtype",
|
|
8354
|
+
nn: "Ugyldig filtype",
|
|
8355
|
+
en: "Invalid file type"
|
|
8356
|
+
},
|
|
8357
|
+
invalidFileAmount: {
|
|
8358
|
+
nb: "For mange filer. Maksimalt antall er ",
|
|
8359
|
+
no: "For mange filer. Maksimalt antall er ",
|
|
8360
|
+
nn: "For mange filer. Maksimalt antall er ",
|
|
8361
|
+
en: "Too many files. The maximum allowed is "
|
|
8362
|
+
}
|
|
8363
|
+
});
|
|
8286
8364
|
|
|
8287
8365
|
// src/components/FileUploader/FileUploader.tsx
|
|
8288
|
-
import { jsx as
|
|
8366
|
+
import { jsx as jsx260, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
8289
8367
|
var FileUploader = (props) => {
|
|
8290
8368
|
const {
|
|
8291
8369
|
id,
|
|
@@ -8300,7 +8378,9 @@ var FileUploader = (props) => {
|
|
|
8300
8378
|
accept,
|
|
8301
8379
|
maxFiles,
|
|
8302
8380
|
disabled,
|
|
8381
|
+
readOnly,
|
|
8303
8382
|
onChange,
|
|
8383
|
+
onKeyDown,
|
|
8304
8384
|
width = "var(--dds-input-default-width)",
|
|
8305
8385
|
errorMessage,
|
|
8306
8386
|
hideFileList,
|
|
@@ -8308,7 +8388,7 @@ var FileUploader = (props) => {
|
|
|
8308
8388
|
...rest
|
|
8309
8389
|
} = props;
|
|
8310
8390
|
const { t } = useTranslation();
|
|
8311
|
-
const tDropAreaLabel = dropAreaLabel != null ? dropAreaLabel : t(
|
|
8391
|
+
const tDropAreaLabel = dropAreaLabel != null ? dropAreaLabel : t(texts15.dragAndDropOr);
|
|
8312
8392
|
const generatedId = useId14();
|
|
8313
8393
|
const uniqueId = id != null ? id : `${generatedId}-fileUploader`;
|
|
8314
8394
|
const {
|
|
@@ -8324,25 +8404,31 @@ var FileUploader = (props) => {
|
|
|
8324
8404
|
onChange,
|
|
8325
8405
|
accept,
|
|
8326
8406
|
disabled,
|
|
8407
|
+
readOnly,
|
|
8327
8408
|
maxFiles,
|
|
8328
|
-
errorMessage
|
|
8409
|
+
errorMessage,
|
|
8410
|
+
onKeyDown
|
|
8329
8411
|
});
|
|
8330
8412
|
const hasLabel = label !== void 0;
|
|
8331
8413
|
const hasTip = tip !== void 0;
|
|
8332
8414
|
const hasRootErrors = rootErrors.length > 0;
|
|
8333
|
-
const
|
|
8415
|
+
const inactive = disabled || readOnly;
|
|
8334
8416
|
const labelId = derivativeIdGenerator(uniqueId, "label");
|
|
8335
8417
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
8336
8418
|
const buttonId = derivativeIdGenerator(uniqueId, "button");
|
|
8337
8419
|
const inputId = derivativeIdGenerator(uniqueId, "input");
|
|
8338
|
-
const
|
|
8420
|
+
const fileListId = derivativeIdGenerator(uniqueId, "file-list");
|
|
8421
|
+
const fileListNameId = derivativeIdGenerator(uniqueId, "file-list-name");
|
|
8422
|
+
const fileListElements = stateFiles.map((stateFile, index) => /* @__PURE__ */ jsx260(
|
|
8339
8423
|
File,
|
|
8340
8424
|
{
|
|
8341
8425
|
parentId: uniqueId,
|
|
8342
8426
|
index,
|
|
8343
8427
|
file: stateFile,
|
|
8344
8428
|
isValid: stateFile.errors.length === 0,
|
|
8345
|
-
removeFile: () => removeFile(stateFile)
|
|
8429
|
+
removeFile: () => removeFile(stateFile),
|
|
8430
|
+
disabled,
|
|
8431
|
+
readOnly
|
|
8346
8432
|
},
|
|
8347
8433
|
stateFile.file.name
|
|
8348
8434
|
));
|
|
@@ -8350,7 +8436,7 @@ var FileUploader = (props) => {
|
|
|
8350
8436
|
id: derivativeIdGenerator(uniqueId, `error-${index}`),
|
|
8351
8437
|
message: e
|
|
8352
8438
|
}));
|
|
8353
|
-
const button = /* @__PURE__ */
|
|
8439
|
+
const button = /* @__PURE__ */ jsx260(
|
|
8354
8440
|
Button,
|
|
8355
8441
|
{
|
|
8356
8442
|
...getButtonProps(),
|
|
@@ -8370,6 +8456,16 @@ var FileUploader = (props) => {
|
|
|
8370
8456
|
children: btnLabel
|
|
8371
8457
|
}
|
|
8372
8458
|
);
|
|
8459
|
+
const input = /* @__PURE__ */ jsx260(
|
|
8460
|
+
HiddenInput,
|
|
8461
|
+
{
|
|
8462
|
+
...getInputProps(),
|
|
8463
|
+
className: cn(readOnly && focus_default["focusable-sibling"]),
|
|
8464
|
+
id: inputId,
|
|
8465
|
+
"data-testid": "file-uploader-input",
|
|
8466
|
+
"aria-describedby": fileListId
|
|
8467
|
+
}
|
|
8468
|
+
);
|
|
8373
8469
|
return /* @__PURE__ */ jsxs59(
|
|
8374
8470
|
Box,
|
|
8375
8471
|
{
|
|
@@ -8378,17 +8474,15 @@ var FileUploader = (props) => {
|
|
|
8378
8474
|
width,
|
|
8379
8475
|
...rest,
|
|
8380
8476
|
children: [
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
8384
|
-
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
hasTip && /* @__PURE__ */ jsx259(InputMessage, { id: tipId, message: tip, messageType: "tip" }),
|
|
8391
|
-
withDragAndDrop ? /* @__PURE__ */ jsxs59(
|
|
8477
|
+
renderLabel({
|
|
8478
|
+
label,
|
|
8479
|
+
id: labelId,
|
|
8480
|
+
showRequiredStyling: required,
|
|
8481
|
+
htmlFor: inputId,
|
|
8482
|
+
readOnly
|
|
8483
|
+
}),
|
|
8484
|
+
hasTip && /* @__PURE__ */ jsx260(InputMessage, { id: tipId, message: tip, messageType: "tip" }),
|
|
8485
|
+
inactive ? input : withDragAndDrop ? /* @__PURE__ */ jsxs59(
|
|
8392
8486
|
VStack,
|
|
8393
8487
|
{
|
|
8394
8488
|
gap: "x1",
|
|
@@ -8400,31 +8494,45 @@ var FileUploader = (props) => {
|
|
|
8400
8494
|
isDragActive && FileUploader_default["input-container--drag-active"]
|
|
8401
8495
|
),
|
|
8402
8496
|
children: [
|
|
8403
|
-
|
|
8404
|
-
"input",
|
|
8405
|
-
{
|
|
8406
|
-
...getInputProps(),
|
|
8407
|
-
id: inputId,
|
|
8408
|
-
"data-testid": "file-uploader-input"
|
|
8409
|
-
}
|
|
8410
|
-
),
|
|
8497
|
+
input,
|
|
8411
8498
|
tDropAreaLabel,
|
|
8412
|
-
/* @__PURE__ */
|
|
8499
|
+
/* @__PURE__ */ jsx260(VisuallyHidden, { children: t(texts15.uploadFileWithButton) }),
|
|
8413
8500
|
button
|
|
8414
8501
|
]
|
|
8415
8502
|
}
|
|
8416
|
-
) : /* @__PURE__ */ jsxs59(
|
|
8417
|
-
|
|
8503
|
+
) : /* @__PURE__ */ jsxs59(Box, { padding: "x 0", children: [
|
|
8504
|
+
input,
|
|
8418
8505
|
button
|
|
8419
8506
|
] }),
|
|
8420
|
-
/* @__PURE__ */
|
|
8421
|
-
!hideFileList && /* @__PURE__ */
|
|
8507
|
+
/* @__PURE__ */ jsx260(ErrorList, { errors: rootErrorsList }),
|
|
8508
|
+
!hideFileList && /* @__PURE__ */ jsxs59(
|
|
8509
|
+
"div",
|
|
8510
|
+
{
|
|
8511
|
+
id: fileListId,
|
|
8512
|
+
className: cn(
|
|
8513
|
+
readOnly && focus_default["focus-styled-sibling"],
|
|
8514
|
+
readOnly && FileUploader_default["readonly--file-list"]
|
|
8515
|
+
),
|
|
8516
|
+
children: [
|
|
8517
|
+
/* @__PURE__ */ jsx260(VisuallyHidden, { id: fileListNameId, children: t(texts15.uploadedFiles) }),
|
|
8518
|
+
inactive && fileListElements.length === 0 ? /* @__PURE__ */ jsx260(
|
|
8519
|
+
Typography,
|
|
8520
|
+
{
|
|
8521
|
+
italic: true,
|
|
8522
|
+
as: "span",
|
|
8523
|
+
color: disabled ? "text-subtle" : "text-medium",
|
|
8524
|
+
children: t(texts15.noFiles)
|
|
8525
|
+
}
|
|
8526
|
+
) : /* @__PURE__ */ jsx260(StylelessList, { "aria-labelledby": fileListNameId, children: fileListElements })
|
|
8527
|
+
]
|
|
8528
|
+
}
|
|
8529
|
+
)
|
|
8422
8530
|
]
|
|
8423
8531
|
}
|
|
8424
8532
|
);
|
|
8425
8533
|
};
|
|
8426
8534
|
FileUploader.displayName = "FileUploader";
|
|
8427
|
-
var
|
|
8535
|
+
var texts15 = createTexts({
|
|
8428
8536
|
dragAndDropOr: {
|
|
8429
8537
|
nb: "Dra og slipp filer her eller",
|
|
8430
8538
|
no: "Dra og slipp filer her eller",
|
|
@@ -8436,6 +8544,18 @@ var texts14 = createTexts({
|
|
|
8436
8544
|
no: "last opp en fil med den p\xE5f\xF8lgende knappen",
|
|
8437
8545
|
nn: "last opp ei fil med den p\xE5f\xF8lgjande knappen",
|
|
8438
8546
|
en: "upload using the following button"
|
|
8547
|
+
},
|
|
8548
|
+
noFiles: {
|
|
8549
|
+
nb: "Ingen filer.",
|
|
8550
|
+
no: "Ingen filer.",
|
|
8551
|
+
nn: "Ingen filer.",
|
|
8552
|
+
en: "No files."
|
|
8553
|
+
},
|
|
8554
|
+
uploadedFiles: {
|
|
8555
|
+
nb: "Opplastede filer",
|
|
8556
|
+
no: "Opplastede filer",
|
|
8557
|
+
nn: "Opplasta filer",
|
|
8558
|
+
en: "Uploaded files"
|
|
8439
8559
|
}
|
|
8440
8560
|
});
|
|
8441
8561
|
|
|
@@ -8450,25 +8570,25 @@ var Footer_default = {
|
|
|
8450
8570
|
};
|
|
8451
8571
|
|
|
8452
8572
|
// src/components/Footer/Footer.tsx
|
|
8453
|
-
import { jsx as
|
|
8454
|
-
var Footer = ({ className, ...rest }) => /* @__PURE__ */
|
|
8573
|
+
import { jsx as jsx261 } from "react/jsx-runtime";
|
|
8574
|
+
var Footer = ({ className, ...rest }) => /* @__PURE__ */ jsx261(Contrast, { as: "footer", className: cn(className, Footer_default.container), ...rest });
|
|
8455
8575
|
|
|
8456
8576
|
// src/components/Footer/FooterListHeader.tsx
|
|
8457
|
-
import { jsx as
|
|
8458
|
-
var FooterListHeader = (props) => /* @__PURE__ */
|
|
8577
|
+
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
8578
|
+
var FooterListHeader = (props) => /* @__PURE__ */ jsx262(Heading, { level: 2, typographyType: "headingSmall", ...props });
|
|
8459
8579
|
|
|
8460
8580
|
// src/components/Footer/norges_domstoler_logo.svg
|
|
8461
8581
|
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';
|
|
8462
8582
|
|
|
8463
8583
|
// src/components/Footer/FooterLogo.tsx
|
|
8464
|
-
import { jsx as
|
|
8584
|
+
import { jsx as jsx263 } from "react/jsx-runtime";
|
|
8465
8585
|
var FooterLogo = ({ hideBreakpoint, ...rest }) => {
|
|
8466
|
-
return /* @__PURE__ */
|
|
8586
|
+
return /* @__PURE__ */ jsx263(
|
|
8467
8587
|
Box,
|
|
8468
8588
|
{
|
|
8469
8589
|
hideBelow: hideBreakpoint ? hideBreakpoint : void 0,
|
|
8470
8590
|
width: "fit-content",
|
|
8471
|
-
children: /* @__PURE__ */
|
|
8591
|
+
children: /* @__PURE__ */ jsx263(
|
|
8472
8592
|
"img",
|
|
8473
8593
|
{
|
|
8474
8594
|
height: 80,
|
|
@@ -8483,33 +8603,33 @@ var FooterLogo = ({ hideBreakpoint, ...rest }) => {
|
|
|
8483
8603
|
};
|
|
8484
8604
|
|
|
8485
8605
|
// src/components/Footer/FooterList.tsx
|
|
8486
|
-
import { jsx as
|
|
8487
|
-
var FooterList = ({ className, ...rest }) => /* @__PURE__ */
|
|
8606
|
+
import { jsx as jsx264 } from "react/jsx-runtime";
|
|
8607
|
+
var FooterList = ({ className, ...rest }) => /* @__PURE__ */ jsx264(StylelessList, { className: cn(className, Footer_default.list), ...rest });
|
|
8488
8608
|
|
|
8489
8609
|
// src/components/Footer/FooterSocialsList.tsx
|
|
8490
|
-
import { jsx as
|
|
8610
|
+
import { jsx as jsx265 } from "react/jsx-runtime";
|
|
8491
8611
|
var FooterSocialsList = ({
|
|
8492
8612
|
className,
|
|
8493
8613
|
...rest
|
|
8494
|
-
}) => /* @__PURE__ */
|
|
8614
|
+
}) => /* @__PURE__ */ jsx265(StylelessList, { className: cn(className, Footer_default["socials-list"]), ...rest });
|
|
8495
8615
|
|
|
8496
8616
|
// src/components/Footer/FooterSocialsGroup.tsx
|
|
8497
|
-
import { jsx as
|
|
8617
|
+
import { jsx as jsx266 } from "react/jsx-runtime";
|
|
8498
8618
|
var FooterSocialsGroup = ({
|
|
8499
8619
|
className,
|
|
8500
8620
|
...rest
|
|
8501
|
-
}) => /* @__PURE__ */
|
|
8621
|
+
}) => /* @__PURE__ */ jsx266("div", { className: cn(className, Footer_default["socials-group"]), ...rest });
|
|
8502
8622
|
|
|
8503
8623
|
// src/components/Footer/FooterListGroup.tsx
|
|
8504
|
-
import { jsx as
|
|
8624
|
+
import { jsx as jsx267 } from "react/jsx-runtime";
|
|
8505
8625
|
var FooterListGroup = ({
|
|
8506
8626
|
className,
|
|
8507
8627
|
...rest
|
|
8508
|
-
}) => /* @__PURE__ */
|
|
8628
|
+
}) => /* @__PURE__ */ jsx267("div", { className: cn(className, Footer_default["list-group"]), ...rest });
|
|
8509
8629
|
|
|
8510
8630
|
// src/components/Footer/FooterLeft.tsx
|
|
8511
|
-
import { jsx as
|
|
8512
|
-
var FooterLeft = ({ className, ...rest }) => /* @__PURE__ */
|
|
8631
|
+
import { jsx as jsx268 } from "react/jsx-runtime";
|
|
8632
|
+
var FooterLeft = ({ className, ...rest }) => /* @__PURE__ */ jsx268("div", { className: cn(className, Footer_default["left"]), ...rest });
|
|
8513
8633
|
|
|
8514
8634
|
// src/components/GlobalMessage/GlobalMessage.tsx
|
|
8515
8635
|
import { useState as useState17 } from "react";
|
|
@@ -8526,7 +8646,7 @@ var GlobalMessage_default = {
|
|
|
8526
8646
|
};
|
|
8527
8647
|
|
|
8528
8648
|
// src/components/GlobalMessage/GlobalMessage.tsx
|
|
8529
|
-
import { jsx as
|
|
8649
|
+
import { jsx as jsx269, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
8530
8650
|
var icons = {
|
|
8531
8651
|
info: InfoIcon,
|
|
8532
8652
|
danger: ErrorIcon,
|
|
@@ -8565,12 +8685,12 @@ var GlobalMessage = ({
|
|
|
8565
8685
|
{
|
|
8566
8686
|
className: cn(GlobalMessage_default.content, closable && GlobalMessage_default["content--closable"]),
|
|
8567
8687
|
children: [
|
|
8568
|
-
/* @__PURE__ */
|
|
8569
|
-
children != null ? children : /* @__PURE__ */
|
|
8688
|
+
/* @__PURE__ */ jsx269(Icon, { icon: icons[purpose], className: GlobalMessage_default.icon }),
|
|
8689
|
+
children != null ? children : /* @__PURE__ */ jsx269("span", { children: message })
|
|
8570
8690
|
]
|
|
8571
8691
|
}
|
|
8572
8692
|
),
|
|
8573
|
-
closable && /* @__PURE__ */
|
|
8693
|
+
closable && /* @__PURE__ */ jsx269(
|
|
8574
8694
|
Button,
|
|
8575
8695
|
{
|
|
8576
8696
|
icon: CloseIcon,
|
|
@@ -8595,12 +8715,12 @@ var InlineButton_default = {
|
|
|
8595
8715
|
};
|
|
8596
8716
|
|
|
8597
8717
|
// src/components/InlineButton/InlineButton.tsx
|
|
8598
|
-
import { jsx as
|
|
8718
|
+
import { jsx as jsx270 } from "react/jsx-runtime";
|
|
8599
8719
|
var InlineButton = ({
|
|
8600
8720
|
className,
|
|
8601
8721
|
color,
|
|
8602
8722
|
...rest
|
|
8603
|
-
}) => /* @__PURE__ */
|
|
8723
|
+
}) => /* @__PURE__ */ jsx270(
|
|
8604
8724
|
StylelessButton,
|
|
8605
8725
|
{
|
|
8606
8726
|
className: cn(
|
|
@@ -8623,7 +8743,7 @@ import {
|
|
|
8623
8743
|
useContext as useContext16,
|
|
8624
8744
|
useState as useState18
|
|
8625
8745
|
} from "react";
|
|
8626
|
-
import { jsx as
|
|
8746
|
+
import { jsx as jsx271 } from "react/jsx-runtime";
|
|
8627
8747
|
var InlineEditContext = createContext12(
|
|
8628
8748
|
{}
|
|
8629
8749
|
);
|
|
@@ -8667,7 +8787,7 @@ var InlineEditContextProvider = (props) => {
|
|
|
8667
8787
|
useOnKeyDown(["Enter"], () => onExitHandler());
|
|
8668
8788
|
useOnKeyDown(["Escape"], () => onExitHandler());
|
|
8669
8789
|
useOnClickOutside(inputRef == null ? void 0 : inputRef.current, () => onExitHandler());
|
|
8670
|
-
return /* @__PURE__ */
|
|
8790
|
+
return /* @__PURE__ */ jsx271(
|
|
8671
8791
|
InlineEditContext,
|
|
8672
8792
|
{
|
|
8673
8793
|
value: {
|
|
@@ -8706,11 +8826,11 @@ import { jsxs as jsxs61 } from "react/jsx-runtime";
|
|
|
8706
8826
|
var inlineEditVisuallyHidden = (id, clearable) => {
|
|
8707
8827
|
const { t } = useTranslation();
|
|
8708
8828
|
return /* @__PURE__ */ jsxs61(VisuallyHidden, { id, children: [
|
|
8709
|
-
t(
|
|
8710
|
-
!clearable && t(
|
|
8829
|
+
t(texts16.inlineEditInfo),
|
|
8830
|
+
!clearable && t(texts16.notClearable)
|
|
8711
8831
|
] });
|
|
8712
8832
|
};
|
|
8713
|
-
var
|
|
8833
|
+
var texts16 = createTexts({
|
|
8714
8834
|
inlineEditInfo: {
|
|
8715
8835
|
nb: "Escape, Enter eller Tab for \xE5 lagre.",
|
|
8716
8836
|
no: "Escape, Enter eller Tab for \xE5 lagre.",
|
|
@@ -8771,7 +8891,7 @@ function createClearChangeEvent(elementId) {
|
|
|
8771
8891
|
}
|
|
8772
8892
|
|
|
8773
8893
|
// src/components/InlineEdit/InlineField.tsx
|
|
8774
|
-
import { Fragment as
|
|
8894
|
+
import { Fragment as Fragment7, jsx as jsx272, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
8775
8895
|
function InlineField(props) {
|
|
8776
8896
|
const {
|
|
8777
8897
|
elementType,
|
|
@@ -8817,7 +8937,7 @@ function InlineField(props) {
|
|
|
8817
8937
|
const cnArgs = [hasErrorState, !isEditing && !hideIcon];
|
|
8818
8938
|
const iconSize = "small";
|
|
8819
8939
|
function makeIcon(icon, className2) {
|
|
8820
|
-
return /* @__PURE__ */
|
|
8940
|
+
return /* @__PURE__ */ jsx272(
|
|
8821
8941
|
Icon,
|
|
8822
8942
|
{
|
|
8823
8943
|
iconSize,
|
|
@@ -8832,7 +8952,7 @@ function InlineField(props) {
|
|
|
8832
8952
|
const renderElement = () => {
|
|
8833
8953
|
switch (elementType) {
|
|
8834
8954
|
case "input":
|
|
8835
|
-
return /* @__PURE__ */
|
|
8955
|
+
return /* @__PURE__ */ jsx272(
|
|
8836
8956
|
"input",
|
|
8837
8957
|
{
|
|
8838
8958
|
...rest,
|
|
@@ -8842,7 +8962,7 @@ function InlineField(props) {
|
|
|
8842
8962
|
}
|
|
8843
8963
|
);
|
|
8844
8964
|
case "textarea":
|
|
8845
|
-
return /* @__PURE__ */
|
|
8965
|
+
return /* @__PURE__ */ jsx272(
|
|
8846
8966
|
"textarea",
|
|
8847
8967
|
{
|
|
8848
8968
|
...rest,
|
|
@@ -8852,8 +8972,8 @@ function InlineField(props) {
|
|
|
8852
8972
|
}
|
|
8853
8973
|
);
|
|
8854
8974
|
case "select":
|
|
8855
|
-
return /* @__PURE__ */ jsxs62(
|
|
8856
|
-
/* @__PURE__ */
|
|
8975
|
+
return /* @__PURE__ */ jsxs62(Fragment7, { children: [
|
|
8976
|
+
/* @__PURE__ */ jsx272(
|
|
8857
8977
|
"select",
|
|
8858
8978
|
{
|
|
8859
8979
|
...rest,
|
|
@@ -8862,7 +8982,7 @@ function InlineField(props) {
|
|
|
8862
8982
|
className: cn(className, ...inlineSelectCns(...cnArgs, hasValue))
|
|
8863
8983
|
}
|
|
8864
8984
|
),
|
|
8865
|
-
hasValue && emptiable && /* @__PURE__ */
|
|
8985
|
+
hasValue && emptiable && /* @__PURE__ */ jsx272(
|
|
8866
8986
|
ClearButton,
|
|
8867
8987
|
{
|
|
8868
8988
|
"aria-label": t(commonTexts.clearSelect),
|
|
@@ -8888,7 +9008,7 @@ function InlineField(props) {
|
|
|
8888
9008
|
}
|
|
8889
9009
|
|
|
8890
9010
|
// src/components/InlineEdit/InlineEditTextArea/InlineEditTextArea.tsx
|
|
8891
|
-
import { jsx as
|
|
9011
|
+
import { jsx as jsx273 } from "react/jsx-runtime";
|
|
8892
9012
|
var InlineEditTextArea = ({
|
|
8893
9013
|
onSetValue,
|
|
8894
9014
|
emptiable,
|
|
@@ -8901,7 +9021,7 @@ var InlineEditTextArea = ({
|
|
|
8901
9021
|
}) => {
|
|
8902
9022
|
const textareaRef = useRef25(null);
|
|
8903
9023
|
const combinedRef = useCombinedRef(ref, textareaRef);
|
|
8904
|
-
return /* @__PURE__ */
|
|
9024
|
+
return /* @__PURE__ */ jsx273(
|
|
8905
9025
|
InlineEditContextProvider,
|
|
8906
9026
|
{
|
|
8907
9027
|
onSetValue,
|
|
@@ -8911,14 +9031,14 @@ var InlineEditTextArea = ({
|
|
|
8911
9031
|
onFocus,
|
|
8912
9032
|
onChange,
|
|
8913
9033
|
onBlur,
|
|
8914
|
-
children: /* @__PURE__ */
|
|
9034
|
+
children: /* @__PURE__ */ jsx273(InlineField, { elementType: "textarea", ...rest, ref: combinedRef })
|
|
8915
9035
|
}
|
|
8916
9036
|
);
|
|
8917
9037
|
};
|
|
8918
9038
|
|
|
8919
9039
|
// src/components/InlineEdit/InlineEditInput/InlineEditInput.tsx
|
|
8920
9040
|
import { useRef as useRef26 } from "react";
|
|
8921
|
-
import { jsx as
|
|
9041
|
+
import { jsx as jsx274 } from "react/jsx-runtime";
|
|
8922
9042
|
var InlineEditInput = ({
|
|
8923
9043
|
onSetValue,
|
|
8924
9044
|
emptiable,
|
|
@@ -8931,7 +9051,7 @@ var InlineEditInput = ({
|
|
|
8931
9051
|
}) => {
|
|
8932
9052
|
const inputRef = useRef26(null);
|
|
8933
9053
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
8934
|
-
return /* @__PURE__ */
|
|
9054
|
+
return /* @__PURE__ */ jsx274(
|
|
8935
9055
|
InlineEditContextProvider,
|
|
8936
9056
|
{
|
|
8937
9057
|
onSetValue,
|
|
@@ -8941,14 +9061,14 @@ var InlineEditInput = ({
|
|
|
8941
9061
|
onFocus,
|
|
8942
9062
|
onChange,
|
|
8943
9063
|
onBlur,
|
|
8944
|
-
children: /* @__PURE__ */
|
|
9064
|
+
children: /* @__PURE__ */ jsx274(InlineField, { elementType: "input", ...rest, ref: combinedRef })
|
|
8945
9065
|
}
|
|
8946
9066
|
);
|
|
8947
9067
|
};
|
|
8948
9068
|
|
|
8949
9069
|
// src/components/InlineEdit/InlineEditSelect/InlineEditSelect.tsx
|
|
8950
9070
|
import { useRef as useRef27 } from "react";
|
|
8951
|
-
import { jsx as
|
|
9071
|
+
import { jsx as jsx275 } from "react/jsx-runtime";
|
|
8952
9072
|
var InlineEditSelect = ({
|
|
8953
9073
|
onSetValue,
|
|
8954
9074
|
emptiable,
|
|
@@ -8961,7 +9081,7 @@ var InlineEditSelect = ({
|
|
|
8961
9081
|
}) => {
|
|
8962
9082
|
const inputRef = useRef27(null);
|
|
8963
9083
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
8964
|
-
return /* @__PURE__ */
|
|
9084
|
+
return /* @__PURE__ */ jsx275(
|
|
8965
9085
|
InlineEditContextProvider,
|
|
8966
9086
|
{
|
|
8967
9087
|
onSetValue,
|
|
@@ -8971,7 +9091,7 @@ var InlineEditSelect = ({
|
|
|
8971
9091
|
onFocus,
|
|
8972
9092
|
onChange,
|
|
8973
9093
|
onBlur,
|
|
8974
|
-
children: /* @__PURE__ */
|
|
9094
|
+
children: /* @__PURE__ */ jsx275(InlineField, { elementType: "select", ...rest, ref: combinedRef })
|
|
8975
9095
|
}
|
|
8976
9096
|
);
|
|
8977
9097
|
};
|
|
@@ -8993,8 +9113,8 @@ var InternalHeader_default = {
|
|
|
8993
9113
|
};
|
|
8994
9114
|
|
|
8995
9115
|
// src/components/InternalHeader/NavigationItem.tsx
|
|
8996
|
-
import { jsx as
|
|
8997
|
-
var NavigationItem = ({ isCurrent, ...rest }) => /* @__PURE__ */
|
|
9116
|
+
import { jsx as jsx276 } from "react/jsx-runtime";
|
|
9117
|
+
var NavigationItem = ({ isCurrent, ...rest }) => /* @__PURE__ */ jsx276(
|
|
8998
9118
|
"a",
|
|
8999
9119
|
{
|
|
9000
9120
|
...rest,
|
|
@@ -9009,7 +9129,7 @@ var NavigationItem = ({ isCurrent, ...rest }) => /* @__PURE__ */ jsx275(
|
|
|
9009
9129
|
);
|
|
9010
9130
|
|
|
9011
9131
|
// src/components/InternalHeader/InternalHeader.tsx
|
|
9012
|
-
import { jsx as
|
|
9132
|
+
import { jsx as jsx277, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
9013
9133
|
import { createElement as createElement2 } from "react";
|
|
9014
9134
|
var InternalHeader = (props) => {
|
|
9015
9135
|
const {
|
|
@@ -9039,7 +9159,7 @@ var InternalHeader = (props) => {
|
|
|
9039
9159
|
const hasContextMenuElements = !!contextMenuItems && contextMenuItems.length > 0;
|
|
9040
9160
|
const hasSmallScreenBreakpoint = !!smallScreenBreakpoint;
|
|
9041
9161
|
const hasNavInContextMenu = hasSmallScreenBreakpoint && hasNavigationElements;
|
|
9042
|
-
const navigation = hasNavigationElements ? /* @__PURE__ */
|
|
9162
|
+
const navigation = hasNavigationElements ? /* @__PURE__ */ jsx277("nav", { "aria-label": t(texts17.siteNavigation), children: /* @__PURE__ */ jsx277(
|
|
9043
9163
|
ShowHide,
|
|
9044
9164
|
{
|
|
9045
9165
|
as: StylelessList,
|
|
@@ -9048,7 +9168,7 @@ var InternalHeader = (props) => {
|
|
|
9048
9168
|
children: navItems.map((item, i) => {
|
|
9049
9169
|
const { href, ...rest2 } = item;
|
|
9050
9170
|
const isCurrent = href === currentPage;
|
|
9051
|
-
return /* @__PURE__ */
|
|
9171
|
+
return /* @__PURE__ */ jsx277("li", { className: InternalHeader_default["nav-list__item"], children: /* @__PURE__ */ jsx277(
|
|
9052
9172
|
NavigationItem,
|
|
9053
9173
|
{
|
|
9054
9174
|
href,
|
|
@@ -9080,7 +9200,7 @@ var InternalHeader = (props) => {
|
|
|
9080
9200
|
rest
|
|
9081
9201
|
),
|
|
9082
9202
|
children: [
|
|
9083
|
-
/* @__PURE__ */
|
|
9203
|
+
/* @__PURE__ */ jsx277(Typography, { typographyType: "headingSmall", bold: true, as: "span", children: applicationHref ? /* @__PURE__ */ jsx277(
|
|
9084
9204
|
"a",
|
|
9085
9205
|
{
|
|
9086
9206
|
href: applicationHref,
|
|
@@ -9089,42 +9209,42 @@ var InternalHeader = (props) => {
|
|
|
9089
9209
|
children: applicationName
|
|
9090
9210
|
}
|
|
9091
9211
|
) : applicationName }),
|
|
9092
|
-
/* @__PURE__ */
|
|
9093
|
-
(hasContextMenu || navigation !== null) && /* @__PURE__ */
|
|
9212
|
+
/* @__PURE__ */ jsx277(Typography, { typographyType: "bodyMedium", as: "span", children: applicationDesc }),
|
|
9213
|
+
(hasContextMenu || navigation !== null) && /* @__PURE__ */ jsx277("div", { className: InternalHeader_default["bar-separator"] }),
|
|
9094
9214
|
navigation,
|
|
9095
|
-
hasContextMenu && /* @__PURE__ */
|
|
9215
|
+
hasContextMenu && /* @__PURE__ */ jsx277(
|
|
9096
9216
|
ShowHide,
|
|
9097
9217
|
{
|
|
9098
9218
|
showBelow: !hasContextMenuLargeScreen && hasSmallScreenBreakpoint ? smallScreenBreakpoint : void 0,
|
|
9099
9219
|
className: cn(InternalHeader_default["context-menu-group"]),
|
|
9100
9220
|
children: /* @__PURE__ */ jsxs63(OverflowMenuGroup, { children: [
|
|
9101
|
-
/* @__PURE__ */
|
|
9221
|
+
/* @__PURE__ */ jsx277(
|
|
9102
9222
|
Button,
|
|
9103
9223
|
{
|
|
9104
9224
|
icon: hasNavInContextMenu ? MenuIcon : MoreVerticalIcon,
|
|
9105
9225
|
purpose: "tertiary",
|
|
9106
|
-
"aria-label": t(
|
|
9226
|
+
"aria-label": t(texts17.openMenu)
|
|
9107
9227
|
}
|
|
9108
9228
|
),
|
|
9109
9229
|
/* @__PURE__ */ jsxs63(OverflowMenu, { className: InternalHeader_default["context-menu"], children: [
|
|
9110
|
-
user && /* @__PURE__ */
|
|
9111
|
-
hasNavInContextMenu && /* @__PURE__ */
|
|
9230
|
+
user && /* @__PURE__ */ jsx277(OverflowMenuList, { children: user.href ? /* @__PURE__ */ jsx277(OverflowMenuLink, { icon: PersonIcon, ...user }) : /* @__PURE__ */ jsx277(OverflowMenuSpan, { icon: PersonIcon, ...user }) }),
|
|
9231
|
+
hasNavInContextMenu && /* @__PURE__ */ jsx277(
|
|
9112
9232
|
ShowHide,
|
|
9113
9233
|
{
|
|
9114
9234
|
as: "nav",
|
|
9115
|
-
"aria-label": t(
|
|
9235
|
+
"aria-label": t(texts17.siteNavigation),
|
|
9116
9236
|
showBelow: smallScreenBreakpoint,
|
|
9117
|
-
children: /* @__PURE__ */
|
|
9237
|
+
children: /* @__PURE__ */ jsx277(OverflowMenuList, { children: navItems.map((item, i) => /* @__PURE__ */ createElement2(OverflowMenuLink, { ...item, key: `nav-${i}` })) })
|
|
9118
9238
|
}
|
|
9119
9239
|
),
|
|
9120
|
-
hasNavInContextMenu && hasContextMenuElements && /* @__PURE__ */
|
|
9240
|
+
hasNavInContextMenu && hasContextMenuElements && /* @__PURE__ */ jsx277(
|
|
9121
9241
|
ShowHide,
|
|
9122
9242
|
{
|
|
9123
9243
|
as: OverflowMenuDivider,
|
|
9124
9244
|
showBelow: smallScreenBreakpoint
|
|
9125
9245
|
}
|
|
9126
9246
|
),
|
|
9127
|
-
hasContextMenuElements && /* @__PURE__ */
|
|
9247
|
+
hasContextMenuElements && /* @__PURE__ */ jsx277(OverflowMenuList, { children: contextMenuItems.map((item, i) => {
|
|
9128
9248
|
return item.href ? /* @__PURE__ */ createElement2(
|
|
9129
9249
|
OverflowMenuLink,
|
|
9130
9250
|
{
|
|
@@ -9148,7 +9268,7 @@ var InternalHeader = (props) => {
|
|
|
9148
9268
|
);
|
|
9149
9269
|
};
|
|
9150
9270
|
InternalHeader.displayName = "InternalHeader";
|
|
9151
|
-
var
|
|
9271
|
+
var texts17 = createTexts({
|
|
9152
9272
|
openMenu: {
|
|
9153
9273
|
nb: "\xC5pne meny",
|
|
9154
9274
|
no: "\xC5pne meny",
|
|
@@ -9173,7 +9293,7 @@ var List_default = {
|
|
|
9173
9293
|
};
|
|
9174
9294
|
|
|
9175
9295
|
// src/components/List/List.tsx
|
|
9176
|
-
import { jsx as
|
|
9296
|
+
import { jsx as jsx278 } from "react/jsx-runtime";
|
|
9177
9297
|
var List = ({
|
|
9178
9298
|
listType = "unordered",
|
|
9179
9299
|
typographyType = "inherit",
|
|
@@ -9184,7 +9304,7 @@ var List = ({
|
|
|
9184
9304
|
...rest
|
|
9185
9305
|
}) => {
|
|
9186
9306
|
const List2 = listType === "ordered" ? "ol" : "ul";
|
|
9187
|
-
return /* @__PURE__ */
|
|
9307
|
+
return /* @__PURE__ */ jsx278(
|
|
9188
9308
|
List2,
|
|
9189
9309
|
{
|
|
9190
9310
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
@@ -9200,8 +9320,8 @@ var List = ({
|
|
|
9200
9320
|
List.displayName = "List";
|
|
9201
9321
|
|
|
9202
9322
|
// src/components/List/ListItem.tsx
|
|
9203
|
-
import { jsx as
|
|
9204
|
-
var ListItem = ({ className, ...rest }) => /* @__PURE__ */
|
|
9323
|
+
import { jsx as jsx279 } from "react/jsx-runtime";
|
|
9324
|
+
var ListItem = ({ className, ...rest }) => /* @__PURE__ */ jsx279("li", { ...rest, className: cn(className, List_default.li) });
|
|
9205
9325
|
ListItem.displayName = "ListItem";
|
|
9206
9326
|
|
|
9207
9327
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
@@ -9226,7 +9346,7 @@ var LocalMessage_default = {
|
|
|
9226
9346
|
};
|
|
9227
9347
|
|
|
9228
9348
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
9229
|
-
import { Fragment as
|
|
9349
|
+
import { Fragment as Fragment8, jsx as jsx280, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
9230
9350
|
var icons2 = {
|
|
9231
9351
|
info: InfoIcon,
|
|
9232
9352
|
danger: ErrorIcon,
|
|
@@ -9250,7 +9370,7 @@ var LocalMessage = ({
|
|
|
9250
9370
|
const { t } = useTranslation();
|
|
9251
9371
|
const [isClosed, setClosed] = useState20(false);
|
|
9252
9372
|
if (isClosed) {
|
|
9253
|
-
return /* @__PURE__ */
|
|
9373
|
+
return /* @__PURE__ */ jsx280(Fragment8, {});
|
|
9254
9374
|
}
|
|
9255
9375
|
return /* @__PURE__ */ jsxs64(
|
|
9256
9376
|
Box,
|
|
@@ -9273,15 +9393,15 @@ var LocalMessage = ({
|
|
|
9273
9393
|
padding: "x0.75 x0.75 x0.75 x0.5",
|
|
9274
9394
|
gap: "x0.5",
|
|
9275
9395
|
children: [
|
|
9276
|
-
/* @__PURE__ */
|
|
9396
|
+
/* @__PURE__ */ jsx280(
|
|
9277
9397
|
Icon,
|
|
9278
9398
|
{
|
|
9279
9399
|
icon: icons2[purpose],
|
|
9280
9400
|
className: cn(LocalMessage_default.icon, LocalMessage_default.container__icon)
|
|
9281
9401
|
}
|
|
9282
9402
|
),
|
|
9283
|
-
/* @__PURE__ */
|
|
9284
|
-
closable && /* @__PURE__ */
|
|
9403
|
+
/* @__PURE__ */ jsx280("div", { className: LocalMessage_default.container__text, children: children != null ? children : /* @__PURE__ */ jsx280("span", { children: message }) }),
|
|
9404
|
+
closable && /* @__PURE__ */ jsx280(
|
|
9285
9405
|
Button,
|
|
9286
9406
|
{
|
|
9287
9407
|
icon: CloseIcon,
|
|
@@ -9321,7 +9441,7 @@ var Modal_default = {
|
|
|
9321
9441
|
};
|
|
9322
9442
|
|
|
9323
9443
|
// src/components/Modal/Modal.tsx
|
|
9324
|
-
import { jsx as
|
|
9444
|
+
import { jsx as jsx281, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
9325
9445
|
var Modal = ({
|
|
9326
9446
|
isOpen = false,
|
|
9327
9447
|
parentElement,
|
|
@@ -9372,7 +9492,7 @@ var Modal = ({
|
|
|
9372
9492
|
useOnKeyDown(["Escape", "Esc"], () => handleClose());
|
|
9373
9493
|
const hasTransitionedIn = useMountTransition(isOpen, 200);
|
|
9374
9494
|
return (isOpen || hasTransitionedIn) && portalTarget ? createPortal3(
|
|
9375
|
-
/* @__PURE__ */
|
|
9495
|
+
/* @__PURE__ */ jsx281(
|
|
9376
9496
|
Backdrop,
|
|
9377
9497
|
{
|
|
9378
9498
|
zIndex: "modal",
|
|
@@ -9416,8 +9536,8 @@ var Modal = ({
|
|
|
9416
9536
|
width: "100%",
|
|
9417
9537
|
className: Modal_default["header-container"],
|
|
9418
9538
|
children: [
|
|
9419
|
-
!!header && /* @__PURE__ */
|
|
9420
|
-
onClose && /* @__PURE__ */
|
|
9539
|
+
!!header && /* @__PURE__ */ jsx281("div", { id: headerId, children: typeof header === "string" ? /* @__PURE__ */ jsx281(Heading, { level: 2, typographyType: "headingLarge", children: header }) : header }),
|
|
9540
|
+
onClose && /* @__PURE__ */ jsx281(
|
|
9421
9541
|
Button,
|
|
9422
9542
|
{
|
|
9423
9543
|
size: "small",
|
|
@@ -9431,7 +9551,7 @@ var Modal = ({
|
|
|
9431
9551
|
]
|
|
9432
9552
|
}
|
|
9433
9553
|
),
|
|
9434
|
-
/* @__PURE__ */
|
|
9554
|
+
/* @__PURE__ */ jsx281(Box, { display: "grid", gap: "x1", children })
|
|
9435
9555
|
]
|
|
9436
9556
|
}
|
|
9437
9557
|
)
|
|
@@ -9443,7 +9563,7 @@ var Modal = ({
|
|
|
9443
9563
|
Modal.displayName = "Modal";
|
|
9444
9564
|
|
|
9445
9565
|
// src/components/Modal/ModalBody.tsx
|
|
9446
|
-
import { jsx as
|
|
9566
|
+
import { jsx as jsx282 } from "react/jsx-runtime";
|
|
9447
9567
|
var ModalBody = ({
|
|
9448
9568
|
children,
|
|
9449
9569
|
id,
|
|
@@ -9453,7 +9573,7 @@ var ModalBody = ({
|
|
|
9453
9573
|
height,
|
|
9454
9574
|
...rest
|
|
9455
9575
|
}) => {
|
|
9456
|
-
return /* @__PURE__ */
|
|
9576
|
+
return /* @__PURE__ */ jsx282(
|
|
9457
9577
|
"div",
|
|
9458
9578
|
{
|
|
9459
9579
|
...getBaseHTMLProps(
|
|
@@ -9475,8 +9595,8 @@ var ModalBody = ({
|
|
|
9475
9595
|
ModalBody.displayName = "ModalBody";
|
|
9476
9596
|
|
|
9477
9597
|
// src/components/Modal/ModalActions.tsx
|
|
9478
|
-
import { jsx as
|
|
9479
|
-
var ModalActions = (props) => /* @__PURE__ */
|
|
9598
|
+
import { jsx as jsx283 } from "react/jsx-runtime";
|
|
9599
|
+
var ModalActions = (props) => /* @__PURE__ */ jsx283(Box, { display: "flex", flexWrap: "wrap", gap: "x1", ...props });
|
|
9480
9600
|
ModalActions.displayName = "ModalActions";
|
|
9481
9601
|
|
|
9482
9602
|
// src/components/Pagination/Pagination.tsx
|
|
@@ -9815,7 +9935,7 @@ import React from "react";
|
|
|
9815
9935
|
import {
|
|
9816
9936
|
components
|
|
9817
9937
|
} from "react-select";
|
|
9818
|
-
import { jsx as
|
|
9938
|
+
import { jsx as jsx284, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
9819
9939
|
var {
|
|
9820
9940
|
Option,
|
|
9821
9941
|
NoOptionsMessage,
|
|
@@ -9840,29 +9960,29 @@ var DDSOption = ({
|
|
|
9840
9960
|
componentSize,
|
|
9841
9961
|
...props
|
|
9842
9962
|
}) => /* @__PURE__ */ jsxs66(Option, { ...props, children: [
|
|
9843
|
-
props.isSelected && /* @__PURE__ */
|
|
9963
|
+
props.isSelected && /* @__PURE__ */ jsx284(Icon, { icon: CheckIcon, iconSize: getFormInputIconSize(componentSize) }),
|
|
9844
9964
|
props.children
|
|
9845
9965
|
] });
|
|
9846
|
-
var CustomOption = (props) => /* @__PURE__ */
|
|
9966
|
+
var CustomOption = (props) => /* @__PURE__ */ jsx284(Option, { ...props, children: React.createElement(props.customElement, props) });
|
|
9847
9967
|
var CustomSingleValue = ({
|
|
9848
9968
|
id,
|
|
9849
9969
|
Element,
|
|
9850
9970
|
...props
|
|
9851
|
-
}) => /* @__PURE__ */
|
|
9852
|
-
var DDSNoOptionsMessage = (props) => /* @__PURE__ */
|
|
9971
|
+
}) => /* @__PURE__ */ jsx284(SingleValue, { ...props, children: /* @__PURE__ */ jsx284("div", { id, className: Select_default["inner-single-value"], children: Element ? /* @__PURE__ */ jsx284(Element, { ...props }) : props.children }) });
|
|
9972
|
+
var DDSNoOptionsMessage = (props) => /* @__PURE__ */ jsx284(NoOptionsMessage, { ...props, children: "Ingen treff" });
|
|
9853
9973
|
var DDSClearIndicator = ({
|
|
9854
9974
|
size: size2,
|
|
9855
9975
|
...props
|
|
9856
|
-
}) => /* @__PURE__ */
|
|
9857
|
-
var DDSMultiValueRemove = (props) => /* @__PURE__ */
|
|
9976
|
+
}) => /* @__PURE__ */ jsx284(ClearIndicator, { ...props, children: /* @__PURE__ */ jsx284(Icon, { icon: CloseSmallIcon, iconSize: getIndicatorIconSize(size2) }) });
|
|
9977
|
+
var DDSMultiValueRemove = (props) => /* @__PURE__ */ jsx284(MultiValueRemove, { ...props, children: /* @__PURE__ */ jsx284(Icon, { icon: CloseSmallIcon, iconSize: "small" }) });
|
|
9858
9978
|
var DDSDropdownIndicator = (props) => {
|
|
9859
9979
|
const { className, componentSize, ...rest } = props;
|
|
9860
|
-
return /* @__PURE__ */
|
|
9980
|
+
return /* @__PURE__ */ jsx284(
|
|
9861
9981
|
DropdownIndicator,
|
|
9862
9982
|
{
|
|
9863
9983
|
...rest,
|
|
9864
9984
|
className: cn(className, Select_default["dropdown-indicator"]),
|
|
9865
|
-
children: /* @__PURE__ */
|
|
9985
|
+
children: /* @__PURE__ */ jsx284(
|
|
9866
9986
|
Icon,
|
|
9867
9987
|
{
|
|
9868
9988
|
icon: ChevronDownIcon,
|
|
@@ -9876,7 +9996,7 @@ var DDSInput = ({
|
|
|
9876
9996
|
ariaInvalid,
|
|
9877
9997
|
ariaDescribedby,
|
|
9878
9998
|
...props
|
|
9879
|
-
}) => /* @__PURE__ */
|
|
9999
|
+
}) => /* @__PURE__ */ jsx284(
|
|
9880
10000
|
Input2,
|
|
9881
10001
|
{
|
|
9882
10002
|
...props,
|
|
@@ -9910,7 +10030,7 @@ function DDSControl(props) {
|
|
|
9910
10030
|
readOnly && Select_default["control--readonly"]
|
|
9911
10031
|
),
|
|
9912
10032
|
children: [
|
|
9913
|
-
icon && /* @__PURE__ */
|
|
10033
|
+
icon && /* @__PURE__ */ jsx284(
|
|
9914
10034
|
Icon,
|
|
9915
10035
|
{
|
|
9916
10036
|
icon,
|
|
@@ -9928,14 +10048,13 @@ function DDSControl(props) {
|
|
|
9928
10048
|
}
|
|
9929
10049
|
|
|
9930
10050
|
// src/components/Select/Select.tsx
|
|
9931
|
-
import { jsx as
|
|
10051
|
+
import { jsx as jsx285, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
9932
10052
|
function Select({
|
|
9933
10053
|
id,
|
|
9934
10054
|
label,
|
|
9935
10055
|
componentSize = "medium",
|
|
9936
10056
|
errorMessage,
|
|
9937
10057
|
tip,
|
|
9938
|
-
required,
|
|
9939
10058
|
"aria-required": ariaRequired,
|
|
9940
10059
|
readOnly,
|
|
9941
10060
|
options,
|
|
@@ -9968,10 +10087,9 @@ function Select({
|
|
|
9968
10087
|
const generatedId = useId17();
|
|
9969
10088
|
const uniqueId = id != null ? id : `${generatedId}-select`;
|
|
9970
10089
|
const singleValueId = !isMulti ? `${uniqueId}-singleValue` : void 0;
|
|
9971
|
-
const hasLabel = !!label;
|
|
9972
10090
|
const hasErrorMessage = !!errorMessage;
|
|
9973
10091
|
const hasIcon = !!icon;
|
|
9974
|
-
const showRequiredStyling = !!(required || ariaRequired);
|
|
10092
|
+
const showRequiredStyling = !!(rest.required || ariaRequired);
|
|
9975
10093
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
9976
10094
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
9977
10095
|
const inputWidth = getInputWidth(
|
|
@@ -9979,7 +10097,7 @@ function Select({
|
|
|
9979
10097
|
componentSize === "xsmall" && "var(--dds-input-default-width-xsmall)"
|
|
9980
10098
|
);
|
|
9981
10099
|
const customInput = useCallback7(
|
|
9982
|
-
(props) => /* @__PURE__ */
|
|
10100
|
+
(props) => /* @__PURE__ */ jsx285(
|
|
9983
10101
|
DDSInput,
|
|
9984
10102
|
{
|
|
9985
10103
|
...props,
|
|
@@ -9997,7 +10115,7 @@ function Select({
|
|
|
9997
10115
|
[]
|
|
9998
10116
|
);
|
|
9999
10117
|
const customSingleValue = useCallback7(
|
|
10000
|
-
(props) => /* @__PURE__ */
|
|
10118
|
+
(props) => /* @__PURE__ */ jsx285(
|
|
10001
10119
|
CustomSingleValue,
|
|
10002
10120
|
{
|
|
10003
10121
|
...props,
|
|
@@ -10008,15 +10126,15 @@ function Select({
|
|
|
10008
10126
|
[]
|
|
10009
10127
|
);
|
|
10010
10128
|
const customClearIndicator = useCallback7(
|
|
10011
|
-
(props) => /* @__PURE__ */
|
|
10129
|
+
(props) => /* @__PURE__ */ jsx285(DDSClearIndicator, { ...props, size: componentSize }),
|
|
10012
10130
|
[componentSize]
|
|
10013
10131
|
);
|
|
10014
10132
|
const customDropdownIndicator = useCallback7(
|
|
10015
|
-
(props) => /* @__PURE__ */
|
|
10133
|
+
(props) => /* @__PURE__ */ jsx285(DDSDropdownIndicator, { ...props, componentSize }),
|
|
10016
10134
|
[componentSize]
|
|
10017
10135
|
);
|
|
10018
10136
|
const customControl = useCallback7(
|
|
10019
|
-
(props) => /* @__PURE__ */
|
|
10137
|
+
(props) => /* @__PURE__ */ jsx285(
|
|
10020
10138
|
DDSControl,
|
|
10021
10139
|
{
|
|
10022
10140
|
...props,
|
|
@@ -10031,9 +10149,9 @@ function Select({
|
|
|
10031
10149
|
const customOptionComponent = useCallback7(
|
|
10032
10150
|
(props) => {
|
|
10033
10151
|
if (customOptionElement) {
|
|
10034
|
-
return /* @__PURE__ */
|
|
10152
|
+
return /* @__PURE__ */ jsx285(CustomOption, { ...props, customElement: customOptionElement });
|
|
10035
10153
|
} else {
|
|
10036
|
-
return /* @__PURE__ */
|
|
10154
|
+
return /* @__PURE__ */ jsx285(DDSOption, { ...props, componentSize });
|
|
10037
10155
|
}
|
|
10038
10156
|
},
|
|
10039
10157
|
[customOptionElement, componentSize]
|
|
@@ -10073,7 +10191,6 @@ function Select({
|
|
|
10073
10191
|
Control: customControl
|
|
10074
10192
|
},
|
|
10075
10193
|
"aria-invalid": hasErrorMessage ? true : void 0,
|
|
10076
|
-
required,
|
|
10077
10194
|
onKeyDown: readOnlyKeyDownHandler("select", readOnly, onKeyDown),
|
|
10078
10195
|
openMenuOnClick: readOnly ? false : openMenuOnClick ? openMenuOnClick : void 0,
|
|
10079
10196
|
...rest
|
|
@@ -10091,17 +10208,13 @@ function Select({
|
|
|
10091
10208
|
),
|
|
10092
10209
|
style,
|
|
10093
10210
|
children: [
|
|
10094
|
-
|
|
10095
|
-
|
|
10096
|
-
|
|
10097
|
-
|
|
10098
|
-
|
|
10099
|
-
|
|
10100
|
-
|
|
10101
|
-
children: label
|
|
10102
|
-
}
|
|
10103
|
-
),
|
|
10104
|
-
/* @__PURE__ */ jsx284(ReactSelect, { ...reactSelectProps, ref }),
|
|
10211
|
+
renderLabel({
|
|
10212
|
+
label,
|
|
10213
|
+
htmlFor: uniqueId,
|
|
10214
|
+
showRequiredStyling,
|
|
10215
|
+
readOnly
|
|
10216
|
+
}),
|
|
10217
|
+
/* @__PURE__ */ jsx285(ReactSelect, { ...reactSelectProps, ref }),
|
|
10105
10218
|
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
10106
10219
|
]
|
|
10107
10220
|
}
|
|
@@ -10128,7 +10241,7 @@ var NativeSelect_default = {
|
|
|
10128
10241
|
};
|
|
10129
10242
|
|
|
10130
10243
|
// src/components/Select/NativeSelect/NativeSelect.tsx
|
|
10131
|
-
import { jsx as
|
|
10244
|
+
import { jsx as jsx286, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
10132
10245
|
var NativeSelect = ({
|
|
10133
10246
|
ref,
|
|
10134
10247
|
id,
|
|
@@ -10176,7 +10289,6 @@ var NativeSelect = ({
|
|
|
10176
10289
|
const uniqueId = id != null ? id : `${generatedId}-native-select`;
|
|
10177
10290
|
const hasErrorMessage = !!errorMessage;
|
|
10178
10291
|
const hasTip = !!tip;
|
|
10179
|
-
const hasLabel = !!label;
|
|
10180
10292
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
10181
10293
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
10182
10294
|
const showRequiredStyling = !!(required || ariaRequired);
|
|
@@ -10196,18 +10308,14 @@ var NativeSelect = ({
|
|
|
10196
10308
|
const iconSize = componentSize === "medium" ? "medium" : "small";
|
|
10197
10309
|
const showClearButton = clearable && hasValue && !readOnly && !rest.disabled;
|
|
10198
10310
|
return /* @__PURE__ */ jsxs68("div", { className, style, children: [
|
|
10199
|
-
|
|
10200
|
-
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
|
|
10205
|
-
readOnly,
|
|
10206
|
-
children: label
|
|
10207
|
-
}
|
|
10208
|
-
),
|
|
10311
|
+
renderLabel({
|
|
10312
|
+
label,
|
|
10313
|
+
htmlFor: uniqueId,
|
|
10314
|
+
showRequiredStyling,
|
|
10315
|
+
readOnly
|
|
10316
|
+
}),
|
|
10209
10317
|
/* @__PURE__ */ jsxs68(Box, { position: "relative", width: inputWidth, children: [
|
|
10210
|
-
/* @__PURE__ */
|
|
10318
|
+
/* @__PURE__ */ jsx286(
|
|
10211
10319
|
"select",
|
|
10212
10320
|
{
|
|
10213
10321
|
ref: useCombinedRef(ref, selectRef),
|
|
@@ -10241,7 +10349,7 @@ var NativeSelect = ({
|
|
|
10241
10349
|
children
|
|
10242
10350
|
}
|
|
10243
10351
|
),
|
|
10244
|
-
showClearButton && /* @__PURE__ */
|
|
10352
|
+
showClearButton && /* @__PURE__ */ jsx286(
|
|
10245
10353
|
ClearButton,
|
|
10246
10354
|
{
|
|
10247
10355
|
"aria-label": t(commonTexts.clearSelect),
|
|
@@ -10250,7 +10358,7 @@ var NativeSelect = ({
|
|
|
10250
10358
|
className: NativeSelect_default[`clear-button--${iconSize}`]
|
|
10251
10359
|
}
|
|
10252
10360
|
),
|
|
10253
|
-
!multiple && /* @__PURE__ */
|
|
10361
|
+
!multiple && /* @__PURE__ */ jsx286(
|
|
10254
10362
|
Icon,
|
|
10255
10363
|
{
|
|
10256
10364
|
icon: ChevronDownIcon,
|
|
@@ -10266,14 +10374,14 @@ var NativeSelectPlaceholder = ({
|
|
|
10266
10374
|
children = "-- Velg fra listen --",
|
|
10267
10375
|
value,
|
|
10268
10376
|
...rest
|
|
10269
|
-
}) => /* @__PURE__ */
|
|
10377
|
+
}) => /* @__PURE__ */ jsx286("option", { value: value != null ? value : "", selected: true, ...rest, children });
|
|
10270
10378
|
NativeSelectPlaceholder.displayName = "NativeSelectPlaceholder";
|
|
10271
10379
|
|
|
10272
10380
|
// src/components/Select/utils.ts
|
|
10273
10381
|
var createSelectOptions = (...args) => args.map((v) => ({ label: v, value: v }));
|
|
10274
10382
|
|
|
10275
10383
|
// src/components/Pagination/Pagination.tsx
|
|
10276
|
-
import { jsx as
|
|
10384
|
+
import { jsx as jsx287, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
10277
10385
|
var Pagination = ({
|
|
10278
10386
|
itemsAmount,
|
|
10279
10387
|
defaultItemsPerPage = 10,
|
|
@@ -10317,7 +10425,7 @@ var Pagination = ({
|
|
|
10317
10425
|
};
|
|
10318
10426
|
const listItems = items.length > 0 ? items.map((item, i) => {
|
|
10319
10427
|
const isActive = item === activePage;
|
|
10320
|
-
return /* @__PURE__ */
|
|
10428
|
+
return /* @__PURE__ */ jsx287("li", { className: Pagination_default.list__item, children: item !== "truncator" && typeof item === "number" ? /* @__PURE__ */ jsx287(
|
|
10321
10429
|
Button,
|
|
10322
10430
|
{
|
|
10323
10431
|
purpose: isActive ? "primary" : "secondary",
|
|
@@ -10325,10 +10433,10 @@ var Pagination = ({
|
|
|
10325
10433
|
onClick: (event) => {
|
|
10326
10434
|
onPageChange(event, item);
|
|
10327
10435
|
},
|
|
10328
|
-
"aria-label": isActive ? t(
|
|
10436
|
+
"aria-label": isActive ? t(texts18.currentPage(item)) : t(texts18.page(item)),
|
|
10329
10437
|
children: item
|
|
10330
10438
|
}
|
|
10331
|
-
) : /* @__PURE__ */
|
|
10439
|
+
) : /* @__PURE__ */ jsx287(
|
|
10332
10440
|
Icon,
|
|
10333
10441
|
{
|
|
10334
10442
|
icon: MoreHorizontalIcon,
|
|
@@ -10336,7 +10444,7 @@ var Pagination = ({
|
|
|
10336
10444
|
}
|
|
10337
10445
|
) }, `pagination-item-${i}`);
|
|
10338
10446
|
}) : void 0;
|
|
10339
|
-
const previousPageButton = /* @__PURE__ */
|
|
10447
|
+
const previousPageButton = /* @__PURE__ */ jsx287(
|
|
10340
10448
|
Button,
|
|
10341
10449
|
{
|
|
10342
10450
|
purpose: "secondary",
|
|
@@ -10345,10 +10453,10 @@ var Pagination = ({
|
|
|
10345
10453
|
onClick: (event) => {
|
|
10346
10454
|
onPageChange(event, activePage - 1);
|
|
10347
10455
|
},
|
|
10348
|
-
"aria-label": t(
|
|
10456
|
+
"aria-label": t(texts18.previousPage)
|
|
10349
10457
|
}
|
|
10350
10458
|
);
|
|
10351
|
-
const nextPageButton = /* @__PURE__ */
|
|
10459
|
+
const nextPageButton = /* @__PURE__ */ jsx287(
|
|
10352
10460
|
Button,
|
|
10353
10461
|
{
|
|
10354
10462
|
purpose: "secondary",
|
|
@@ -10357,7 +10465,7 @@ var Pagination = ({
|
|
|
10357
10465
|
onClick: (event) => {
|
|
10358
10466
|
onPageChange(event, activePage + 1);
|
|
10359
10467
|
},
|
|
10360
|
-
"aria-label": t(
|
|
10468
|
+
"aria-label": t(texts18.nextPage)
|
|
10361
10469
|
}
|
|
10362
10470
|
);
|
|
10363
10471
|
const isOnFirstPage = activePage === 1;
|
|
@@ -10367,7 +10475,7 @@ var Pagination = ({
|
|
|
10367
10475
|
{
|
|
10368
10476
|
as: "nav",
|
|
10369
10477
|
ref,
|
|
10370
|
-
"aria-label": t(
|
|
10478
|
+
"aria-label": t(texts18.pagination),
|
|
10371
10479
|
display: "flex",
|
|
10372
10480
|
alignItems: "center",
|
|
10373
10481
|
...!withSelect && !withCounter && {
|
|
@@ -10381,7 +10489,7 @@ var Pagination = ({
|
|
|
10381
10489
|
hideBelow: smallScreenBreakpoint,
|
|
10382
10490
|
className: Pagination_default.list,
|
|
10383
10491
|
children: [
|
|
10384
|
-
/* @__PURE__ */
|
|
10492
|
+
/* @__PURE__ */ jsx287(
|
|
10385
10493
|
"li",
|
|
10386
10494
|
{
|
|
10387
10495
|
className: cn(
|
|
@@ -10393,7 +10501,7 @@ var Pagination = ({
|
|
|
10393
10501
|
}
|
|
10394
10502
|
),
|
|
10395
10503
|
listItems,
|
|
10396
|
-
/* @__PURE__ */
|
|
10504
|
+
/* @__PURE__ */ jsx287(
|
|
10397
10505
|
"li",
|
|
10398
10506
|
{
|
|
10399
10507
|
className: cn(
|
|
@@ -10414,7 +10522,7 @@ var Pagination = ({
|
|
|
10414
10522
|
showBelow: smallScreenBreakpoint,
|
|
10415
10523
|
className: Pagination_default.list,
|
|
10416
10524
|
children: [
|
|
10417
|
-
/* @__PURE__ */
|
|
10525
|
+
/* @__PURE__ */ jsx287(
|
|
10418
10526
|
"li",
|
|
10419
10527
|
{
|
|
10420
10528
|
className: cn(
|
|
@@ -10422,7 +10530,7 @@ var Pagination = ({
|
|
|
10422
10530
|
isOnFirstPage && Pagination_default["list__item--hidden"]
|
|
10423
10531
|
),
|
|
10424
10532
|
"aria-hidden": isOnFirstPage,
|
|
10425
|
-
children: /* @__PURE__ */
|
|
10533
|
+
children: /* @__PURE__ */ jsx287(
|
|
10426
10534
|
Button,
|
|
10427
10535
|
{
|
|
10428
10536
|
purpose: "secondary",
|
|
@@ -10431,12 +10539,12 @@ var Pagination = ({
|
|
|
10431
10539
|
onClick: (event) => {
|
|
10432
10540
|
onPageChange(event, 1);
|
|
10433
10541
|
},
|
|
10434
|
-
"aria-label": t(
|
|
10542
|
+
"aria-label": t(texts18.firstPage)
|
|
10435
10543
|
}
|
|
10436
10544
|
)
|
|
10437
10545
|
}
|
|
10438
10546
|
),
|
|
10439
|
-
/* @__PURE__ */
|
|
10547
|
+
/* @__PURE__ */ jsx287(
|
|
10440
10548
|
"li",
|
|
10441
10549
|
{
|
|
10442
10550
|
className: cn(
|
|
@@ -10447,7 +10555,7 @@ var Pagination = ({
|
|
|
10447
10555
|
children: previousPageButton
|
|
10448
10556
|
}
|
|
10449
10557
|
),
|
|
10450
|
-
/* @__PURE__ */
|
|
10558
|
+
/* @__PURE__ */ jsx287("li", { className: Pagination_default.list__item, children: /* @__PURE__ */ jsx287(
|
|
10451
10559
|
Button,
|
|
10452
10560
|
{
|
|
10453
10561
|
size: "small",
|
|
@@ -10457,7 +10565,7 @@ var Pagination = ({
|
|
|
10457
10565
|
children: activePage
|
|
10458
10566
|
}
|
|
10459
10567
|
) }),
|
|
10460
|
-
/* @__PURE__ */
|
|
10568
|
+
/* @__PURE__ */ jsx287(
|
|
10461
10569
|
"li",
|
|
10462
10570
|
{
|
|
10463
10571
|
className: cn(
|
|
@@ -10468,7 +10576,7 @@ var Pagination = ({
|
|
|
10468
10576
|
children: nextPageButton
|
|
10469
10577
|
}
|
|
10470
10578
|
),
|
|
10471
|
-
/* @__PURE__ */
|
|
10579
|
+
/* @__PURE__ */ jsx287(
|
|
10472
10580
|
"li",
|
|
10473
10581
|
{
|
|
10474
10582
|
className: cn(
|
|
@@ -10476,7 +10584,7 @@ var Pagination = ({
|
|
|
10476
10584
|
isOnLastPage && Pagination_default["list__item--hidden"]
|
|
10477
10585
|
),
|
|
10478
10586
|
"aria-hidden": isOnLastPage,
|
|
10479
|
-
children: /* @__PURE__ */
|
|
10587
|
+
children: /* @__PURE__ */ jsx287(
|
|
10480
10588
|
Button,
|
|
10481
10589
|
{
|
|
10482
10590
|
purpose: "secondary",
|
|
@@ -10485,7 +10593,7 @@ var Pagination = ({
|
|
|
10485
10593
|
onClick: (event) => {
|
|
10486
10594
|
onPageChange(event, pagesLength);
|
|
10487
10595
|
},
|
|
10488
|
-
"aria-label": t(
|
|
10596
|
+
"aria-label": t(texts18.lastPage)
|
|
10489
10597
|
}
|
|
10490
10598
|
)
|
|
10491
10599
|
}
|
|
@@ -10510,7 +10618,7 @@ var Pagination = ({
|
|
|
10510
10618
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
10511
10619
|
children: [
|
|
10512
10620
|
/* @__PURE__ */ jsxs69("div", { className: Pagination_default.indicators, children: [
|
|
10513
|
-
withSelect && /* @__PURE__ */
|
|
10621
|
+
withSelect && /* @__PURE__ */ jsx287(
|
|
10514
10622
|
Select,
|
|
10515
10623
|
{
|
|
10516
10624
|
options: selectOptions,
|
|
@@ -10523,11 +10631,11 @@ var Pagination = ({
|
|
|
10523
10631
|
isClearable: false,
|
|
10524
10632
|
onChange: handleSelectChange,
|
|
10525
10633
|
componentSize: "small",
|
|
10526
|
-
"aria-label": t(
|
|
10634
|
+
"aria-label": t(texts18.itemsPerPage)
|
|
10527
10635
|
}
|
|
10528
10636
|
),
|
|
10529
|
-
withCounter && /* @__PURE__ */
|
|
10530
|
-
|
|
10637
|
+
withCounter && /* @__PURE__ */ jsx287(Paragraph, { children: t(
|
|
10638
|
+
texts18.showsAmountOfTotalItems(
|
|
10531
10639
|
activePageFirstItem,
|
|
10532
10640
|
activePageLastItem,
|
|
10533
10641
|
itemsAmount
|
|
@@ -10540,7 +10648,7 @@ var Pagination = ({
|
|
|
10540
10648
|
);
|
|
10541
10649
|
};
|
|
10542
10650
|
Pagination.displayName = "Pagination";
|
|
10543
|
-
var
|
|
10651
|
+
var texts18 = createTexts({
|
|
10544
10652
|
pagination: {
|
|
10545
10653
|
nb: "Paginering",
|
|
10546
10654
|
no: "Paginering",
|
|
@@ -10684,12 +10792,12 @@ var COUNTRIES = {
|
|
|
10684
10792
|
CO: { name: "Colombia", id: "CO", dialCode: "+57" },
|
|
10685
10793
|
KM: { name: "Komorene (\u202B\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631\u202C\u200E)", id: "KM", dialCode: "+269" },
|
|
10686
10794
|
CD: {
|
|
10687
|
-
name: "Kongo
|
|
10795
|
+
name: "Kongo, den demokratiske republikken (R\xE9publique d\xE9mocratique du Congo)",
|
|
10688
10796
|
id: "CD",
|
|
10689
10797
|
dialCode: "+243"
|
|
10690
10798
|
},
|
|
10691
10799
|
CG: {
|
|
10692
|
-
name: "Kongo (
|
|
10800
|
+
name: "Kongo, republikken (R\xE9publique du Congo)",
|
|
10693
10801
|
id: "CG",
|
|
10694
10802
|
dialCode: "+242"
|
|
10695
10803
|
},
|
|
@@ -10767,7 +10875,7 @@ var COUNTRIES = {
|
|
|
10767
10875
|
IR: { name: "Iran (\u202B\u0627\u06CC\u0631\u0627\u0646\u202C\u200E)", id: "IR", dialCode: "+98" },
|
|
10768
10876
|
IQ: { name: "Irak (\u202B\u0627\u0644\u0639\u0631\u0627\u0642\u202C\u200E)", id: "IQ", dialCode: "+964" },
|
|
10769
10877
|
IE: { name: "Irland (\xC9ire)", id: "IE", dialCode: "+353" },
|
|
10770
|
-
IM: { name: "Isle of Man", id: "IM", dialCode: "+44" },
|
|
10878
|
+
IM: { name: "Man (Isle of Man)", id: "IM", dialCode: "+44" },
|
|
10771
10879
|
IL: { name: "Israel (\u202B\u05D9\u05E9\u05E8\u05D0\u05DC\u202C\u200E)", id: "IL", dialCode: "+972" },
|
|
10772
10880
|
IT: { name: "Italia", id: "IT", dialCode: "+39" },
|
|
10773
10881
|
JM: { name: "Jamaica", id: "JM", dialCode: "+1" },
|
|
@@ -10791,7 +10899,7 @@ var COUNTRIES = {
|
|
|
10791
10899
|
LU: { name: "Luxembourg", id: "LU", dialCode: "+352" },
|
|
10792
10900
|
MO: { name: "Macao (\u6FB3\u9580)", id: "MO", dialCode: "+853" },
|
|
10793
10901
|
MK: {
|
|
10794
|
-
name: "Nord-Makedonia (
|
|
10902
|
+
name: "Nord-Makedonia (\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430)",
|
|
10795
10903
|
id: "MK",
|
|
10796
10904
|
dialCode: "+389"
|
|
10797
10905
|
},
|
|
@@ -10880,7 +10988,7 @@ var COUNTRIES = {
|
|
|
10880
10988
|
},
|
|
10881
10989
|
LC: { name: "Saint Lucia", id: "LC", dialCode: "+1758" },
|
|
10882
10990
|
MF: {
|
|
10883
|
-
name: "Saint
|
|
10991
|
+
name: "Saint-Martin (Collectivit\xE9 de Saint-Martin)",
|
|
10884
10992
|
id: "MF",
|
|
10885
10993
|
dialCode: "+590"
|
|
10886
10994
|
},
|
|
@@ -11004,7 +11112,7 @@ var PhoneInput_default = {
|
|
|
11004
11112
|
};
|
|
11005
11113
|
|
|
11006
11114
|
// src/components/PhoneInput/PhoneInput.tsx
|
|
11007
|
-
import { jsx as
|
|
11115
|
+
import { jsx as jsx288, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
11008
11116
|
var prioritizedCountries = [
|
|
11009
11117
|
COUNTRIES.NO,
|
|
11010
11118
|
COUNTRIES.SE,
|
|
@@ -11063,8 +11171,8 @@ var PhoneInput = ({
|
|
|
11063
11171
|
}) => {
|
|
11064
11172
|
var _a;
|
|
11065
11173
|
const { t } = useTranslation();
|
|
11066
|
-
const tGroupLabel = groupLabel != null ? groupLabel : t(
|
|
11067
|
-
const tSelectLabel = selectLabel != null ? selectLabel : t(
|
|
11174
|
+
const tGroupLabel = groupLabel != null ? groupLabel : t(texts19.countryCodeAndPhoneNumber);
|
|
11175
|
+
const tSelectLabel = selectLabel != null ? selectLabel : t(texts19.countryCode);
|
|
11068
11176
|
const generatedId = useId19();
|
|
11069
11177
|
const uniqueId = (_a = props.id) != null ? _a : generatedId;
|
|
11070
11178
|
const phoneInputId = `${uniqueId}-phone-input`;
|
|
@@ -11072,7 +11180,6 @@ var PhoneInput = ({
|
|
|
11072
11180
|
const selectId = `${uniqueId}-country-code`;
|
|
11073
11181
|
const hasErrorMessage = !!errorMessage;
|
|
11074
11182
|
const hasTip = !!tip;
|
|
11075
|
-
const hasLabel = !!label;
|
|
11076
11183
|
const hasMessage = hasErrorMessage || hasTip;
|
|
11077
11184
|
const tipId = derivativeIdGenerator(phoneInputId, "tip");
|
|
11078
11185
|
const errorMessageId = derivativeIdGenerator(phoneInputId, "errorMessage");
|
|
@@ -11143,16 +11250,12 @@ var PhoneInput = ({
|
|
|
11143
11250
|
const bp = props.smallScreenBreakpoint;
|
|
11144
11251
|
const widthDefault = componentSize === "xsmall" && "var(--dds-input-default-width-xsmall)";
|
|
11145
11252
|
return /* @__PURE__ */ jsxs70("div", { className: cn(className, Input_default.container), style, children: [
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
readOnly,
|
|
11153
|
-
children: label
|
|
11154
|
-
}
|
|
11155
|
-
),
|
|
11253
|
+
renderLabel({
|
|
11254
|
+
label,
|
|
11255
|
+
htmlFor: phoneNumberId,
|
|
11256
|
+
showRequiredStyling,
|
|
11257
|
+
readOnly
|
|
11258
|
+
}),
|
|
11156
11259
|
/* @__PURE__ */ jsxs70(
|
|
11157
11260
|
Box,
|
|
11158
11261
|
{
|
|
@@ -11166,8 +11269,8 @@ var PhoneInput = ({
|
|
|
11166
11269
|
role: "group",
|
|
11167
11270
|
"aria-label": tGroupLabel,
|
|
11168
11271
|
children: [
|
|
11169
|
-
/* @__PURE__ */
|
|
11170
|
-
/* @__PURE__ */
|
|
11272
|
+
/* @__PURE__ */ jsx288("label", { className: utilStyles_default["visually-hidden"], htmlFor: selectId, children: tSelectLabel }),
|
|
11273
|
+
/* @__PURE__ */ jsx288(
|
|
11171
11274
|
NativeSelect,
|
|
11172
11275
|
{
|
|
11173
11276
|
width: styleUpToBreakpoint(
|
|
@@ -11188,11 +11291,11 @@ var PhoneInput = ({
|
|
|
11188
11291
|
hasTip ? tipId : void 0,
|
|
11189
11292
|
ariaDescribedby
|
|
11190
11293
|
]),
|
|
11191
|
-
children: countryOptions.map((item, index) => /* @__PURE__ */
|
|
11294
|
+
children: countryOptions.map((item, index) => /* @__PURE__ */ jsx288("option", { value: item.countryCode, children: item.label }, index))
|
|
11192
11295
|
}
|
|
11193
11296
|
),
|
|
11194
11297
|
/* @__PURE__ */ jsxs70(Box, { width: "100%", className: Input_default["input-group"], children: [
|
|
11195
|
-
/* @__PURE__ */
|
|
11298
|
+
/* @__PURE__ */ jsx288(
|
|
11196
11299
|
"span",
|
|
11197
11300
|
{
|
|
11198
11301
|
className: cn(
|
|
@@ -11204,7 +11307,7 @@ var PhoneInput = ({
|
|
|
11204
11307
|
children: callingCode
|
|
11205
11308
|
}
|
|
11206
11309
|
),
|
|
11207
|
-
/* @__PURE__ */
|
|
11310
|
+
/* @__PURE__ */ jsx288(
|
|
11208
11311
|
Box,
|
|
11209
11312
|
{
|
|
11210
11313
|
as: StatefulInput,
|
|
@@ -11242,7 +11345,7 @@ var getCallingCode = (s) => {
|
|
|
11242
11345
|
var _a;
|
|
11243
11346
|
return (_a = s.substring(s.indexOf("+"), s.length)) != null ? _a : "";
|
|
11244
11347
|
};
|
|
11245
|
-
var
|
|
11348
|
+
var texts19 = createTexts({
|
|
11246
11349
|
countryCode: {
|
|
11247
11350
|
nb: "Landskode",
|
|
11248
11351
|
no: "Landskode",
|
|
@@ -11282,7 +11385,7 @@ var PopoverContext = createContext13({});
|
|
|
11282
11385
|
var usePopoverContext = () => useContext19(PopoverContext);
|
|
11283
11386
|
|
|
11284
11387
|
// src/components/Popover/Popover.tsx
|
|
11285
|
-
import { jsx as
|
|
11388
|
+
import { jsx as jsx289, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
11286
11389
|
var Popover = ({
|
|
11287
11390
|
id,
|
|
11288
11391
|
header,
|
|
@@ -11401,15 +11504,15 @@ var Popover = ({
|
|
|
11401
11504
|
elevation: 3,
|
|
11402
11505
|
border: "border-subtle",
|
|
11403
11506
|
children: [
|
|
11404
|
-
header && /* @__PURE__ */
|
|
11405
|
-
/* @__PURE__ */
|
|
11507
|
+
header && /* @__PURE__ */ jsx289("div", { className: Popover_default.header, children: typeof header === "string" ? /* @__PURE__ */ jsx289(Heading, { level: 2, typographyType: "headingMedium", children: header }) : header }),
|
|
11508
|
+
/* @__PURE__ */ jsx289(
|
|
11406
11509
|
"div",
|
|
11407
11510
|
{
|
|
11408
11511
|
className: !hasTitle && withCloseButton ? Popover_default["content--closable--no-header"] : "",
|
|
11409
11512
|
children
|
|
11410
11513
|
}
|
|
11411
11514
|
),
|
|
11412
|
-
withCloseButton && /* @__PURE__ */
|
|
11515
|
+
withCloseButton && /* @__PURE__ */ jsx289(
|
|
11413
11516
|
Button,
|
|
11414
11517
|
{
|
|
11415
11518
|
icon: CloseIcon,
|
|
@@ -11436,7 +11539,7 @@ import {
|
|
|
11436
11539
|
useRef as useRef31,
|
|
11437
11540
|
useState as useState24
|
|
11438
11541
|
} from "react";
|
|
11439
|
-
import { jsx as
|
|
11542
|
+
import { jsx as jsx290 } from "react/jsx-runtime";
|
|
11440
11543
|
var PopoverGroup = ({
|
|
11441
11544
|
isOpen: propIsOpen,
|
|
11442
11545
|
setIsOpen: propSetIsOpen,
|
|
@@ -11497,7 +11600,7 @@ var PopoverGroup = ({
|
|
|
11497
11600
|
ref: combinedAnchorRef
|
|
11498
11601
|
}) : child);
|
|
11499
11602
|
});
|
|
11500
|
-
return /* @__PURE__ */
|
|
11603
|
+
return /* @__PURE__ */ jsx290(
|
|
11501
11604
|
PopoverContext,
|
|
11502
11605
|
{
|
|
11503
11606
|
value: {
|
|
@@ -11555,7 +11658,7 @@ var ProgressTracker_default = {
|
|
|
11555
11658
|
|
|
11556
11659
|
// src/components/ProgressTracker/ProgressTrackerItem.tsx
|
|
11557
11660
|
import { useMemo as useMemo2 } from "react";
|
|
11558
|
-
import { Fragment as
|
|
11661
|
+
import { Fragment as Fragment9, jsx as jsx291, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
11559
11662
|
var toItemState = (active, completed, disabled) => {
|
|
11560
11663
|
if (disabled) {
|
|
11561
11664
|
return "disabled";
|
|
@@ -11587,6 +11690,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11587
11690
|
...rest
|
|
11588
11691
|
} = props;
|
|
11589
11692
|
const { t } = useTranslation();
|
|
11693
|
+
const stepNumber = index + 1;
|
|
11590
11694
|
const { activeStep, handleStepChange, direction } = useProgressTrackerContext();
|
|
11591
11695
|
const active = activeStep === index;
|
|
11592
11696
|
const itemState = toItemState(active, completed, disabled);
|
|
@@ -11598,20 +11702,20 @@ var ProgressTrackerItem = (props) => {
|
|
|
11598
11702
|
};
|
|
11599
11703
|
const stepNumberContent = useMemo2(() => {
|
|
11600
11704
|
if (completed) {
|
|
11601
|
-
return /* @__PURE__ */
|
|
11705
|
+
return /* @__PURE__ */ jsx291(Icon, { icon: CheckIcon, iconSize: "small" });
|
|
11602
11706
|
}
|
|
11603
11707
|
if (icon !== void 0) {
|
|
11604
|
-
return /* @__PURE__ */
|
|
11708
|
+
return /* @__PURE__ */ jsx291(Icon, { icon, iconSize: "small" });
|
|
11605
11709
|
}
|
|
11606
|
-
return
|
|
11710
|
+
return stepNumber;
|
|
11607
11711
|
}, [completed, icon, index]);
|
|
11608
11712
|
function getTextColor2() {
|
|
11609
11713
|
if (disabled) return "text-subtle";
|
|
11610
11714
|
if (active) return "text-action-resting";
|
|
11611
11715
|
}
|
|
11612
11716
|
const isInactiveLink = disabled || active;
|
|
11613
|
-
const stepContent = /* @__PURE__ */ jsxs72(
|
|
11614
|
-
/* @__PURE__ */
|
|
11717
|
+
const stepContent = /* @__PURE__ */ jsxs72(Fragment9, { children: [
|
|
11718
|
+
/* @__PURE__ */ jsx291(
|
|
11615
11719
|
Box,
|
|
11616
11720
|
{
|
|
11617
11721
|
display: "flex",
|
|
@@ -11626,7 +11730,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11626
11730
|
children: stepNumberContent
|
|
11627
11731
|
}
|
|
11628
11732
|
),
|
|
11629
|
-
/* @__PURE__ */
|
|
11733
|
+
/* @__PURE__ */ jsx291(
|
|
11630
11734
|
Typography,
|
|
11631
11735
|
{
|
|
11632
11736
|
as: "div",
|
|
@@ -11636,22 +11740,19 @@ var ProgressTrackerItem = (props) => {
|
|
|
11636
11740
|
isInactiveLink && ProgressTracker_default["item-text--inactive-link"]
|
|
11637
11741
|
),
|
|
11638
11742
|
color: getTextColor2(),
|
|
11639
|
-
children
|
|
11640
|
-
/* @__PURE__ */ jsx290(VisuallyHidden, { children: t(texts19.stepTextBefore(index + 1)) }),
|
|
11641
|
-
children,
|
|
11642
|
-
/* @__PURE__ */ jsx290(VisuallyHidden, { children: completed ? t(texts19.completed) : t(texts19.uncompleted) })
|
|
11643
|
-
]
|
|
11743
|
+
children
|
|
11644
11744
|
}
|
|
11645
11745
|
)
|
|
11646
11746
|
] });
|
|
11647
|
-
|
|
11747
|
+
const ariaLabel = props["aria-label"] ? props["aria-label"] : `${children}, ${stepNumber}. ${completed ? t(texts20.completed) : t(texts20.uncompleted)}`;
|
|
11748
|
+
return /* @__PURE__ */ jsx291(
|
|
11648
11749
|
Box,
|
|
11649
11750
|
{
|
|
11650
11751
|
as: "li",
|
|
11651
11752
|
display: direction === "row" ? "flex" : void 0,
|
|
11652
11753
|
"aria-current": active ? "step" : void 0,
|
|
11653
11754
|
className: cn(ProgressTracker_default["list-item"], ProgressTracker_default[`list-item--${direction}`]),
|
|
11654
|
-
children: handleStepChange ? /* @__PURE__ */
|
|
11755
|
+
children: handleStepChange ? /* @__PURE__ */ jsx291(
|
|
11655
11756
|
Box,
|
|
11656
11757
|
{
|
|
11657
11758
|
as: StylelessButton,
|
|
@@ -11670,11 +11771,12 @@ var ProgressTrackerItem = (props) => {
|
|
|
11670
11771
|
htmlProps,
|
|
11671
11772
|
rest
|
|
11672
11773
|
),
|
|
11774
|
+
"aria-label": ariaLabel,
|
|
11673
11775
|
onClick: () => handleClick(),
|
|
11674
11776
|
disabled,
|
|
11675
11777
|
children: stepContent
|
|
11676
11778
|
}
|
|
11677
|
-
) : /* @__PURE__ */
|
|
11779
|
+
) : /* @__PURE__ */ jsx291(
|
|
11678
11780
|
"div",
|
|
11679
11781
|
{
|
|
11680
11782
|
...getBaseHTMLProps(
|
|
@@ -11683,6 +11785,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11683
11785
|
htmlProps,
|
|
11684
11786
|
rest
|
|
11685
11787
|
),
|
|
11788
|
+
"aria-label": ariaLabel,
|
|
11686
11789
|
children: stepContent
|
|
11687
11790
|
}
|
|
11688
11791
|
)
|
|
@@ -11690,29 +11793,23 @@ var ProgressTrackerItem = (props) => {
|
|
|
11690
11793
|
);
|
|
11691
11794
|
};
|
|
11692
11795
|
ProgressTrackerItem.displayName = "ProgressTracker.Item";
|
|
11693
|
-
var
|
|
11694
|
-
stepTextBefore: (index) => ({
|
|
11695
|
-
nb: `${index}. trinn, `,
|
|
11696
|
-
no: `${index}. trinn, `,
|
|
11697
|
-
nn: `${index}. trinn, `,
|
|
11698
|
-
en: `${index}. step, `
|
|
11699
|
-
}),
|
|
11796
|
+
var texts20 = createTexts({
|
|
11700
11797
|
uncompleted: {
|
|
11701
|
-
nb: "
|
|
11702
|
-
no: "
|
|
11703
|
-
nn: "
|
|
11704
|
-
en: "uncompleted"
|
|
11798
|
+
nb: "trinn ikke ferdig",
|
|
11799
|
+
no: "trinn ikke ferdig",
|
|
11800
|
+
nn: "trinn ikkje ferdig",
|
|
11801
|
+
en: "step uncompleted"
|
|
11705
11802
|
},
|
|
11706
11803
|
completed: {
|
|
11707
|
-
nb: "
|
|
11708
|
-
no: "
|
|
11709
|
-
nn: "
|
|
11710
|
-
en: "
|
|
11804
|
+
nb: "trinn ferdig",
|
|
11805
|
+
no: "trinn ferdig",
|
|
11806
|
+
nn: "trinn ferdig",
|
|
11807
|
+
en: "step completed"
|
|
11711
11808
|
}
|
|
11712
11809
|
});
|
|
11713
11810
|
|
|
11714
11811
|
// src/components/ProgressTracker/ProgressTracker.tsx
|
|
11715
|
-
import { jsx as
|
|
11812
|
+
import { jsx as jsx292 } from "react/jsx-runtime";
|
|
11716
11813
|
var ProgressTracker = (() => {
|
|
11717
11814
|
const Res = ({
|
|
11718
11815
|
id,
|
|
@@ -11742,7 +11839,7 @@ var ProgressTracker = (() => {
|
|
|
11742
11839
|
}, [children]);
|
|
11743
11840
|
const isRow = direction === "row";
|
|
11744
11841
|
const { "aria-label": ariaLabel } = htmlProps;
|
|
11745
|
-
return /* @__PURE__ */
|
|
11842
|
+
return /* @__PURE__ */ jsx292(
|
|
11746
11843
|
ProgressTrackerContext,
|
|
11747
11844
|
{
|
|
11748
11845
|
value: {
|
|
@@ -11750,12 +11847,12 @@ var ProgressTracker = (() => {
|
|
|
11750
11847
|
handleStepChange: handleChange,
|
|
11751
11848
|
direction
|
|
11752
11849
|
},
|
|
11753
|
-
children: /* @__PURE__ */
|
|
11850
|
+
children: /* @__PURE__ */ jsx292(
|
|
11754
11851
|
"nav",
|
|
11755
11852
|
{
|
|
11756
|
-
"aria-label": ariaLabel != null ? ariaLabel : t(
|
|
11853
|
+
"aria-label": ariaLabel != null ? ariaLabel : t(texts21.stepProgression),
|
|
11757
11854
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
11758
|
-
children: /* @__PURE__ */
|
|
11855
|
+
children: /* @__PURE__ */ jsx292(
|
|
11759
11856
|
Box,
|
|
11760
11857
|
{
|
|
11761
11858
|
as: StylelessOList,
|
|
@@ -11791,7 +11888,7 @@ function passIndexPropToProgressTrackerItem(children) {
|
|
|
11791
11888
|
})
|
|
11792
11889
|
);
|
|
11793
11890
|
}
|
|
11794
|
-
var
|
|
11891
|
+
var texts21 = createTexts({
|
|
11795
11892
|
stepProgression: {
|
|
11796
11893
|
nb: "Stegprogresjon",
|
|
11797
11894
|
no: "Stegprogresjon",
|
|
@@ -11814,7 +11911,7 @@ var ProgressBar_default = {
|
|
|
11814
11911
|
};
|
|
11815
11912
|
|
|
11816
11913
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
11817
|
-
import { jsx as
|
|
11914
|
+
import { jsx as jsx293, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
11818
11915
|
var PROGRESS_BAR_SIZES = createSizes("small", "medium");
|
|
11819
11916
|
var ProgressBar = ({
|
|
11820
11917
|
label,
|
|
@@ -11834,7 +11931,6 @@ var ProgressBar = ({
|
|
|
11834
11931
|
const uniqueId = id != null ? id : `${generatedId}-searchInput`;
|
|
11835
11932
|
const hasErrorMessage = !!errorMessage;
|
|
11836
11933
|
const hasTip = !!tip;
|
|
11837
|
-
const hasLabel = !!label;
|
|
11838
11934
|
const hasValidMax = !!max && max > 0;
|
|
11839
11935
|
const hasValidValue = !!value && value > 0 && (max !== void 0 && value <= max || max === void 0 && value <= 1);
|
|
11840
11936
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
@@ -11842,8 +11938,8 @@ var ProgressBar = ({
|
|
|
11842
11938
|
const fillPrecentage = hasValidValue && value / (max != null ? max : 1) * 100 + "%";
|
|
11843
11939
|
const isIndeterminate = !hasValidValue && !hasErrorMessage;
|
|
11844
11940
|
return /* @__PURE__ */ jsxs73(Box, { width: "100%", className, style, children: [
|
|
11845
|
-
|
|
11846
|
-
/* @__PURE__ */
|
|
11941
|
+
renderLabel({ label, htmlFor: uniqueId }),
|
|
11942
|
+
/* @__PURE__ */ jsx293(
|
|
11847
11943
|
"progress",
|
|
11848
11944
|
{
|
|
11849
11945
|
id: uniqueId,
|
|
@@ -11859,13 +11955,13 @@ var ProgressBar = ({
|
|
|
11859
11955
|
children: fillPrecentage
|
|
11860
11956
|
}
|
|
11861
11957
|
),
|
|
11862
|
-
/* @__PURE__ */
|
|
11958
|
+
/* @__PURE__ */ jsx293(
|
|
11863
11959
|
Box,
|
|
11864
11960
|
{
|
|
11865
11961
|
width: getInputWidth(width),
|
|
11866
11962
|
height: size2 === "small" ? "x0.75" : "x1.5",
|
|
11867
11963
|
className: cn(ProgressBar_default.progress),
|
|
11868
|
-
children: /* @__PURE__ */
|
|
11964
|
+
children: /* @__PURE__ */ jsx293(
|
|
11869
11965
|
Box,
|
|
11870
11966
|
{
|
|
11871
11967
|
height: "100%",
|
|
@@ -11920,7 +12016,7 @@ var typographyTypes2 = {
|
|
|
11920
12016
|
|
|
11921
12017
|
// src/components/Search/SearchSuggestionItem.tsx
|
|
11922
12018
|
import { useEffect as useEffect29, useRef as useRef32 } from "react";
|
|
11923
|
-
import { jsx as
|
|
12019
|
+
import { jsx as jsx294 } from "react/jsx-runtime";
|
|
11924
12020
|
var SearchSuggestionItem = ({
|
|
11925
12021
|
focus,
|
|
11926
12022
|
className,
|
|
@@ -11935,7 +12031,7 @@ var SearchSuggestionItem = ({
|
|
|
11935
12031
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
11936
12032
|
}
|
|
11937
12033
|
}, [focus]);
|
|
11938
|
-
return /* @__PURE__ */
|
|
12034
|
+
return /* @__PURE__ */ jsx294(
|
|
11939
12035
|
StylelessButton,
|
|
11940
12036
|
{
|
|
11941
12037
|
ref: combinedRef,
|
|
@@ -11953,7 +12049,7 @@ var SearchSuggestionItem = ({
|
|
|
11953
12049
|
SearchSuggestionItem.displayName = "SearchSuggestionItem";
|
|
11954
12050
|
|
|
11955
12051
|
// src/components/Search/SearchSuggestions.tsx
|
|
11956
|
-
import { jsx as
|
|
12052
|
+
import { jsx as jsx295, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
11957
12053
|
var SearchSuggestions = ({
|
|
11958
12054
|
id,
|
|
11959
12055
|
searchId,
|
|
@@ -11997,7 +12093,7 @@ var SearchSuggestions = ({
|
|
|
11997
12093
|
overflowY: "scroll",
|
|
11998
12094
|
marginBlock: "x0.25 0",
|
|
11999
12095
|
children: [
|
|
12000
|
-
/* @__PURE__ */
|
|
12096
|
+
/* @__PURE__ */ jsx295(
|
|
12001
12097
|
Box,
|
|
12002
12098
|
{
|
|
12003
12099
|
as: "h2",
|
|
@@ -12007,13 +12103,13 @@ var SearchSuggestions = ({
|
|
|
12007
12103
|
children: "S\xF8keforslag"
|
|
12008
12104
|
}
|
|
12009
12105
|
),
|
|
12010
|
-
/* @__PURE__ */
|
|
12011
|
-
return /* @__PURE__ */
|
|
12106
|
+
/* @__PURE__ */ jsx295(StylelessList, { role: "listbox", "aria-labelledby": suggestionsHeaderId, children: suggestionsToRender.map((suggestion, index) => {
|
|
12107
|
+
return /* @__PURE__ */ jsx295("li", { role: "option", children: /* @__PURE__ */ jsx295(
|
|
12012
12108
|
SearchSuggestionItem,
|
|
12013
12109
|
{
|
|
12014
12110
|
index,
|
|
12015
12111
|
focus: focus === index && showSuggestions,
|
|
12016
|
-
"aria-label": t(
|
|
12112
|
+
"aria-label": t(texts22.search(suggestion)),
|
|
12017
12113
|
onClick: onSuggestionClick,
|
|
12018
12114
|
"aria-setsize": suggestionsToRender.length,
|
|
12019
12115
|
"aria-posinset": index,
|
|
@@ -12027,7 +12123,7 @@ var SearchSuggestions = ({
|
|
|
12027
12123
|
);
|
|
12028
12124
|
};
|
|
12029
12125
|
SearchSuggestions.displayName = "SearchSuggestions";
|
|
12030
|
-
var
|
|
12126
|
+
var texts22 = createTexts({
|
|
12031
12127
|
search: (suggestion) => ({
|
|
12032
12128
|
no: `${suggestion} s\xF8k`,
|
|
12033
12129
|
nb: `${suggestion} s\xF8k`,
|
|
@@ -12037,7 +12133,7 @@ var texts21 = createTexts({
|
|
|
12037
12133
|
});
|
|
12038
12134
|
|
|
12039
12135
|
// src/components/Search/Search.tsx
|
|
12040
|
-
import { Fragment as
|
|
12136
|
+
import { Fragment as Fragment10, jsx as jsx296, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
12041
12137
|
var getIconSize2 = (size2) => {
|
|
12042
12138
|
switch (size2) {
|
|
12043
12139
|
case "large":
|
|
@@ -12086,7 +12182,6 @@ var Search = ({
|
|
|
12086
12182
|
var _a;
|
|
12087
12183
|
const generatedId = useId23();
|
|
12088
12184
|
const uniqueId = id != null ? id : `${generatedId}-searchInput`;
|
|
12089
|
-
const hasLabel = !!label;
|
|
12090
12185
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
12091
12186
|
const suggestionsId = derivativeIdGenerator(uniqueId, "suggestions");
|
|
12092
12187
|
const suggestionsDescriptionId = derivativeIdGenerator(
|
|
@@ -12121,7 +12216,7 @@ var Search = ({
|
|
|
12121
12216
|
width: !showSearchButton ? width : void 0,
|
|
12122
12217
|
className: !showSearchButton ? className : void 0,
|
|
12123
12218
|
children: [
|
|
12124
|
-
showIcon && /* @__PURE__ */
|
|
12219
|
+
showIcon && /* @__PURE__ */ jsx296(
|
|
12125
12220
|
Icon,
|
|
12126
12221
|
{
|
|
12127
12222
|
icon: SearchIcon,
|
|
@@ -12132,7 +12227,7 @@ var Search = ({
|
|
|
12132
12227
|
)
|
|
12133
12228
|
}
|
|
12134
12229
|
),
|
|
12135
|
-
/* @__PURE__ */
|
|
12230
|
+
/* @__PURE__ */ jsx296(
|
|
12136
12231
|
Box,
|
|
12137
12232
|
{
|
|
12138
12233
|
as: Input,
|
|
@@ -12161,8 +12256,8 @@ var Search = ({
|
|
|
12161
12256
|
)
|
|
12162
12257
|
}
|
|
12163
12258
|
),
|
|
12164
|
-
hasSuggestions && /* @__PURE__ */ jsxs75(
|
|
12165
|
-
/* @__PURE__ */
|
|
12259
|
+
hasSuggestions && /* @__PURE__ */ jsxs75(Fragment10, { children: [
|
|
12260
|
+
/* @__PURE__ */ jsx296(
|
|
12166
12261
|
SearchSuggestions,
|
|
12167
12262
|
{
|
|
12168
12263
|
id: suggestionsId,
|
|
@@ -12174,13 +12269,13 @@ var Search = ({
|
|
|
12174
12269
|
componentSize
|
|
12175
12270
|
}
|
|
12176
12271
|
),
|
|
12177
|
-
/* @__PURE__ */
|
|
12272
|
+
/* @__PURE__ */ jsx296(VisuallyHidden, { id: suggestionsDescriptionId, children: t(texts23.useArrowKeys) })
|
|
12178
12273
|
] }),
|
|
12179
|
-
hasValue && /* @__PURE__ */
|
|
12274
|
+
hasValue && /* @__PURE__ */ jsx296(
|
|
12180
12275
|
ClearButton,
|
|
12181
12276
|
{
|
|
12182
12277
|
size: getIconSize2(componentSize),
|
|
12183
|
-
"aria-label": t(
|
|
12278
|
+
"aria-label": t(texts23.clearSearch),
|
|
12184
12279
|
onClick: clearInput,
|
|
12185
12280
|
className: Search_default["clear-button"]
|
|
12186
12281
|
}
|
|
@@ -12188,8 +12283,8 @@ var Search = ({
|
|
|
12188
12283
|
]
|
|
12189
12284
|
}
|
|
12190
12285
|
);
|
|
12191
|
-
return /* @__PURE__ */ jsxs75(
|
|
12192
|
-
|
|
12286
|
+
return /* @__PURE__ */ jsxs75("div", { children: [
|
|
12287
|
+
renderLabel({ htmlFor: uniqueId, label }),
|
|
12193
12288
|
/* @__PURE__ */ jsxs75("div", { children: [
|
|
12194
12289
|
showSearchButton ? /* @__PURE__ */ jsxs75(
|
|
12195
12290
|
Grid,
|
|
@@ -12203,13 +12298,13 @@ var Search = ({
|
|
|
12203
12298
|
style,
|
|
12204
12299
|
children: [
|
|
12205
12300
|
inputGroup,
|
|
12206
|
-
/* @__PURE__ */
|
|
12301
|
+
/* @__PURE__ */ jsx296(
|
|
12207
12302
|
Button,
|
|
12208
12303
|
{
|
|
12209
12304
|
size: componentSize,
|
|
12210
12305
|
onClick,
|
|
12211
12306
|
...otherButtonProps,
|
|
12212
|
-
children: buttonLabel != null ? buttonLabel : t(
|
|
12307
|
+
children: buttonLabel != null ? buttonLabel : t(texts23.search)
|
|
12213
12308
|
}
|
|
12214
12309
|
)
|
|
12215
12310
|
]
|
|
@@ -12220,7 +12315,7 @@ var Search = ({
|
|
|
12220
12315
|
] });
|
|
12221
12316
|
};
|
|
12222
12317
|
Search.displayName = "Search";
|
|
12223
|
-
var
|
|
12318
|
+
var texts23 = createTexts({
|
|
12224
12319
|
clearSearch: {
|
|
12225
12320
|
nb: "T\xF8m s\xF8k",
|
|
12226
12321
|
no: "T\xF8m s\xF8k",
|
|
@@ -12247,7 +12342,7 @@ import {
|
|
|
12247
12342
|
useRef as useRef33,
|
|
12248
12343
|
useState as useState27
|
|
12249
12344
|
} from "react";
|
|
12250
|
-
import { jsx as
|
|
12345
|
+
import { jsx as jsx297 } from "react/jsx-runtime";
|
|
12251
12346
|
var SearchAutocompleteWrapper = (props) => {
|
|
12252
12347
|
const {
|
|
12253
12348
|
value,
|
|
@@ -12323,7 +12418,7 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
12323
12418
|
inputValue,
|
|
12324
12419
|
onSugggestionClick: handleSuggestionClick
|
|
12325
12420
|
};
|
|
12326
|
-
return /* @__PURE__ */
|
|
12421
|
+
return /* @__PURE__ */ jsx297(AutocompleteSearchContext, { value: contextProps, children });
|
|
12327
12422
|
};
|
|
12328
12423
|
SearchAutocompleteWrapper.displayName = "SearchAutocompleteWrapper";
|
|
12329
12424
|
|
|
@@ -12339,7 +12434,7 @@ var Skeleton_default = {
|
|
|
12339
12434
|
};
|
|
12340
12435
|
|
|
12341
12436
|
// src/components/Skeleton/Skeleton.tsx
|
|
12342
|
-
import { jsx as
|
|
12437
|
+
import { jsx as jsx298 } from "react/jsx-runtime";
|
|
12343
12438
|
var Skeleton = ({
|
|
12344
12439
|
width,
|
|
12345
12440
|
height,
|
|
@@ -12349,7 +12444,7 @@ var Skeleton = ({
|
|
|
12349
12444
|
ref,
|
|
12350
12445
|
...rest
|
|
12351
12446
|
}) => {
|
|
12352
|
-
return /* @__PURE__ */
|
|
12447
|
+
return /* @__PURE__ */ jsx298(
|
|
12353
12448
|
Box,
|
|
12354
12449
|
{
|
|
12355
12450
|
width,
|
|
@@ -12369,7 +12464,7 @@ var SkipToContent_default = {
|
|
|
12369
12464
|
};
|
|
12370
12465
|
|
|
12371
12466
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
12372
|
-
import { jsx as
|
|
12467
|
+
import { jsx as jsx299 } from "react/jsx-runtime";
|
|
12373
12468
|
var SkipToContent = ({
|
|
12374
12469
|
text = "Til hovedinnhold",
|
|
12375
12470
|
top = 0,
|
|
@@ -12379,12 +12474,12 @@ var SkipToContent = ({
|
|
|
12379
12474
|
...rest
|
|
12380
12475
|
}) => {
|
|
12381
12476
|
const { className: htmlPropsClassName, style, ...restHtmlProps } = htmlProps;
|
|
12382
|
-
return /* @__PURE__ */
|
|
12477
|
+
return /* @__PURE__ */ jsx299(
|
|
12383
12478
|
Contrast,
|
|
12384
12479
|
{
|
|
12385
12480
|
className: cn(className, htmlPropsClassName, SkipToContent_default.wrapper),
|
|
12386
12481
|
style: { ...style, top },
|
|
12387
|
-
children: /* @__PURE__ */
|
|
12482
|
+
children: /* @__PURE__ */ jsx299(Link, { ...getBaseHTMLProps(id, restHtmlProps, rest), children: text })
|
|
12388
12483
|
}
|
|
12389
12484
|
);
|
|
12390
12485
|
};
|
|
@@ -12402,7 +12497,7 @@ var SplitButton_default = {
|
|
|
12402
12497
|
};
|
|
12403
12498
|
|
|
12404
12499
|
// src/components/SplitButton/SplitButton.tsx
|
|
12405
|
-
import { jsx as
|
|
12500
|
+
import { jsx as jsx300, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
12406
12501
|
var SplitButton = ({
|
|
12407
12502
|
size: size2,
|
|
12408
12503
|
primaryAction,
|
|
@@ -12418,7 +12513,7 @@ var SplitButton = ({
|
|
|
12418
12513
|
size: size2
|
|
12419
12514
|
};
|
|
12420
12515
|
return /* @__PURE__ */ jsxs76("div", { className: cn(className, SplitButton_default.container), ...rest, children: [
|
|
12421
|
-
/* @__PURE__ */
|
|
12516
|
+
/* @__PURE__ */ jsx300(
|
|
12422
12517
|
Button,
|
|
12423
12518
|
{
|
|
12424
12519
|
...buttonStyleProps,
|
|
@@ -12428,12 +12523,12 @@ var SplitButton = ({
|
|
|
12428
12523
|
}
|
|
12429
12524
|
),
|
|
12430
12525
|
/* @__PURE__ */ jsxs76(OverflowMenuGroup, { isOpen, setIsOpen, children: [
|
|
12431
|
-
/* @__PURE__ */
|
|
12526
|
+
/* @__PURE__ */ jsx300(
|
|
12432
12527
|
Button,
|
|
12433
12528
|
{
|
|
12434
12529
|
...buttonStyleProps,
|
|
12435
12530
|
icon: isOpen ? ChevronUpIcon : ChevronDownIcon,
|
|
12436
|
-
"aria-label": t(
|
|
12531
|
+
"aria-label": t(texts24.moreActions),
|
|
12437
12532
|
purpose,
|
|
12438
12533
|
className: cn(
|
|
12439
12534
|
SplitButton_default.option,
|
|
@@ -12442,12 +12537,12 @@ var SplitButton = ({
|
|
|
12442
12537
|
type: "button"
|
|
12443
12538
|
}
|
|
12444
12539
|
),
|
|
12445
|
-
/* @__PURE__ */
|
|
12540
|
+
/* @__PURE__ */ jsx300(OverflowMenu, { placement: "bottom-end", children: /* @__PURE__ */ jsx300(OverflowMenuList, { children: secondaryActions.map((item, index) => /* @__PURE__ */ jsx300(OverflowMenuButton, { ...item, children: item.children }, index)) }) })
|
|
12446
12541
|
] })
|
|
12447
12542
|
] });
|
|
12448
12543
|
};
|
|
12449
12544
|
SplitButton.displayName = "SplitButton";
|
|
12450
|
-
var
|
|
12545
|
+
var texts24 = createTexts({
|
|
12451
12546
|
moreActions: {
|
|
12452
12547
|
nb: "Flere handlinger",
|
|
12453
12548
|
no: "Flere handlinger",
|
|
@@ -12459,7 +12554,7 @@ var texts23 = createTexts({
|
|
|
12459
12554
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
12460
12555
|
import {
|
|
12461
12556
|
Children as Children4,
|
|
12462
|
-
Fragment as
|
|
12557
|
+
Fragment as Fragment11,
|
|
12463
12558
|
cloneElement as cloneElement6,
|
|
12464
12559
|
isValidElement as isValidElement6,
|
|
12465
12560
|
useEffect as useEffect32,
|
|
@@ -12475,14 +12570,14 @@ var CollapsibleTableContext = createContext16({
|
|
|
12475
12570
|
var useCollapsibleTableContext = () => useContext23(CollapsibleTableContext);
|
|
12476
12571
|
|
|
12477
12572
|
// src/components/Table/normal/Body.tsx
|
|
12478
|
-
import { jsx as
|
|
12479
|
-
var Body = (props) => /* @__PURE__ */
|
|
12573
|
+
import { jsx as jsx301 } from "react/jsx-runtime";
|
|
12574
|
+
var Body = (props) => /* @__PURE__ */ jsx301("tbody", { ...props });
|
|
12480
12575
|
Body.displayName = "Table.Body";
|
|
12481
12576
|
|
|
12482
12577
|
// src/components/Table/normal/Head.tsx
|
|
12483
12578
|
import { createContext as createContext17, useContext as useContext24 } from "react";
|
|
12484
|
-
import { jsx as
|
|
12485
|
-
var Head = ({ children, ...rest }) => /* @__PURE__ */
|
|
12579
|
+
import { jsx as jsx302 } from "react/jsx-runtime";
|
|
12580
|
+
var Head = ({ children, ...rest }) => /* @__PURE__ */ jsx302("thead", { ...rest, children: /* @__PURE__ */ jsx302(HeadContext, { value: true, children }) });
|
|
12486
12581
|
var HeadContext = createContext17(false);
|
|
12487
12582
|
function useIsInTableHead() {
|
|
12488
12583
|
const isInTableHead = useContext24(HeadContext);
|
|
@@ -12515,7 +12610,7 @@ var Table_default = {
|
|
|
12515
12610
|
};
|
|
12516
12611
|
|
|
12517
12612
|
// src/components/Table/normal/Cell.tsx
|
|
12518
|
-
import { jsx as
|
|
12613
|
+
import { jsx as jsx303 } from "react/jsx-runtime";
|
|
12519
12614
|
var Cell = ({
|
|
12520
12615
|
children,
|
|
12521
12616
|
type: _type,
|
|
@@ -12528,7 +12623,7 @@ var Cell = ({
|
|
|
12528
12623
|
const type = _type != null ? _type : isInHead ? "head" : "data";
|
|
12529
12624
|
const { isCollapsibleChild } = collapsibleProps != null ? collapsibleProps : {};
|
|
12530
12625
|
const isComplexLayout = layout === "text and icon";
|
|
12531
|
-
return isCollapsibleChild ? /* @__PURE__ */
|
|
12626
|
+
return isCollapsibleChild ? /* @__PURE__ */ jsx303(DescriptionListDesc, { children }) : type === "head" ? /* @__PURE__ */ jsx303(
|
|
12532
12627
|
"th",
|
|
12533
12628
|
{
|
|
12534
12629
|
...rest,
|
|
@@ -12537,26 +12632,26 @@ var Cell = ({
|
|
|
12537
12632
|
!isComplexLayout && Table_default[`cell--${layout}`],
|
|
12538
12633
|
Table_default["cell--head"]
|
|
12539
12634
|
),
|
|
12540
|
-
children: isComplexLayout ? /* @__PURE__ */
|
|
12635
|
+
children: isComplexLayout ? /* @__PURE__ */ jsx303("div", { className: Table_default.cell__inner, children }) : children
|
|
12541
12636
|
}
|
|
12542
|
-
) : /* @__PURE__ */
|
|
12637
|
+
) : /* @__PURE__ */ jsx303(
|
|
12543
12638
|
"td",
|
|
12544
12639
|
{
|
|
12545
12640
|
...rest,
|
|
12546
12641
|
className: cn(className, !isComplexLayout && Table_default[`cell--${layout}`]),
|
|
12547
|
-
children: isComplexLayout ? /* @__PURE__ */
|
|
12642
|
+
children: isComplexLayout ? /* @__PURE__ */ jsx303("div", { className: Table_default.cell__inner, children }) : children
|
|
12548
12643
|
}
|
|
12549
12644
|
);
|
|
12550
12645
|
};
|
|
12551
12646
|
Cell.displayName = "Table.Cell";
|
|
12552
12647
|
|
|
12553
12648
|
// src/components/Table/normal/Foot.tsx
|
|
12554
|
-
import { jsx as
|
|
12555
|
-
var Foot = (props) => /* @__PURE__ */
|
|
12649
|
+
import { jsx as jsx304 } from "react/jsx-runtime";
|
|
12650
|
+
var Foot = (props) => /* @__PURE__ */ jsx304("tfoot", { ...props });
|
|
12556
12651
|
Foot.displayName = "Table.Foot";
|
|
12557
12652
|
|
|
12558
12653
|
// src/components/Table/normal/Row.tsx
|
|
12559
|
-
import { jsx as
|
|
12654
|
+
import { jsx as jsx305 } from "react/jsx-runtime";
|
|
12560
12655
|
var Row = ({
|
|
12561
12656
|
type: _type,
|
|
12562
12657
|
mode = "normal",
|
|
@@ -12567,7 +12662,7 @@ var Row = ({
|
|
|
12567
12662
|
}) => {
|
|
12568
12663
|
const isInHeader = useIsInTableHead();
|
|
12569
12664
|
const type = _type != null ? _type : isInHeader ? "head" : "body";
|
|
12570
|
-
return /* @__PURE__ */
|
|
12665
|
+
return /* @__PURE__ */ jsx305(
|
|
12571
12666
|
"tr",
|
|
12572
12667
|
{
|
|
12573
12668
|
className: cn(
|
|
@@ -12587,12 +12682,12 @@ var Row = ({
|
|
|
12587
12682
|
Row.displayName = "Table.Row";
|
|
12588
12683
|
|
|
12589
12684
|
// src/components/Table/normal/SortCell.tsx
|
|
12590
|
-
import { jsx as
|
|
12685
|
+
import { jsx as jsx306, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
12591
12686
|
var makeSortIcon = (isSorted, sortOrder) => {
|
|
12592
12687
|
if (!isSorted || !sortOrder) {
|
|
12593
|
-
return /* @__PURE__ */
|
|
12688
|
+
return /* @__PURE__ */ jsx306(Icon, { icon: UnfoldMoreIcon, iconSize: "inherit" });
|
|
12594
12689
|
}
|
|
12595
|
-
return sortOrder === "ascending" ? /* @__PURE__ */
|
|
12690
|
+
return sortOrder === "ascending" ? /* @__PURE__ */ jsx306(Icon, { icon: ChevronDownIcon, iconSize: "inherit" }) : /* @__PURE__ */ jsx306(Icon, { icon: ChevronUpIcon, iconSize: "inherit" });
|
|
12596
12691
|
};
|
|
12597
12692
|
var SortCell = ({
|
|
12598
12693
|
isSorted,
|
|
@@ -12602,7 +12697,7 @@ var SortCell = ({
|
|
|
12602
12697
|
...rest
|
|
12603
12698
|
}) => {
|
|
12604
12699
|
const { t } = useTranslation();
|
|
12605
|
-
return /* @__PURE__ */
|
|
12700
|
+
return /* @__PURE__ */ jsx306(
|
|
12606
12701
|
Cell,
|
|
12607
12702
|
{
|
|
12608
12703
|
type: "head",
|
|
@@ -12612,7 +12707,7 @@ var SortCell = ({
|
|
|
12612
12707
|
StylelessButton,
|
|
12613
12708
|
{
|
|
12614
12709
|
onClick,
|
|
12615
|
-
"aria-description": t(
|
|
12710
|
+
"aria-description": t(texts25.changeSort),
|
|
12616
12711
|
className: cn(Table_default["sort-button"], focusable),
|
|
12617
12712
|
children: [
|
|
12618
12713
|
children,
|
|
@@ -12625,7 +12720,7 @@ var SortCell = ({
|
|
|
12625
12720
|
);
|
|
12626
12721
|
};
|
|
12627
12722
|
SortCell.displayName = "Table.SortCell";
|
|
12628
|
-
var
|
|
12723
|
+
var texts25 = createTexts({
|
|
12629
12724
|
changeSort: {
|
|
12630
12725
|
nb: "Aktiver for \xE5 endre sorteringsrekkef\xF8lge",
|
|
12631
12726
|
no: "Aktiver for \xE5 endre sorteringsrekkef\xF8lge",
|
|
@@ -12635,7 +12730,7 @@ var texts24 = createTexts({
|
|
|
12635
12730
|
});
|
|
12636
12731
|
|
|
12637
12732
|
// src/components/Table/normal/Table.tsx
|
|
12638
|
-
import { jsx as
|
|
12733
|
+
import { jsx as jsx307 } from "react/jsx-runtime";
|
|
12639
12734
|
var Table = ({
|
|
12640
12735
|
size: size2 = "medium",
|
|
12641
12736
|
stickyHeader,
|
|
@@ -12643,7 +12738,7 @@ var Table = ({
|
|
|
12643
12738
|
className,
|
|
12644
12739
|
children,
|
|
12645
12740
|
...rest
|
|
12646
|
-
}) => /* @__PURE__ */
|
|
12741
|
+
}) => /* @__PURE__ */ jsx307(
|
|
12647
12742
|
"table",
|
|
12648
12743
|
{
|
|
12649
12744
|
...rest,
|
|
@@ -12667,7 +12762,7 @@ import {
|
|
|
12667
12762
|
useRef as useRef34,
|
|
12668
12763
|
useState as useState29
|
|
12669
12764
|
} from "react";
|
|
12670
|
-
import { jsx as
|
|
12765
|
+
import { jsx as jsx308 } from "react/jsx-runtime";
|
|
12671
12766
|
var TableWrapper = ({ className, ...rest }) => {
|
|
12672
12767
|
const themeContext = useContext25(ThemeContext);
|
|
12673
12768
|
const container2 = themeContext == null ? void 0 : themeContext.el;
|
|
@@ -12692,7 +12787,7 @@ var TableWrapper = ({ className, ...rest }) => {
|
|
|
12692
12787
|
window.addEventListener("resize", handleResize);
|
|
12693
12788
|
return () => window.removeEventListener("resize", handleResize);
|
|
12694
12789
|
});
|
|
12695
|
-
return /* @__PURE__ */
|
|
12790
|
+
return /* @__PURE__ */ jsx308(
|
|
12696
12791
|
"div",
|
|
12697
12792
|
{
|
|
12698
12793
|
ref: wrapperRef,
|
|
@@ -12719,7 +12814,7 @@ Table2.Row = Row;
|
|
|
12719
12814
|
Table2.Foot = Foot;
|
|
12720
12815
|
|
|
12721
12816
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
12722
|
-
import { Fragment as
|
|
12817
|
+
import { Fragment as Fragment12, jsx as jsx309, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
12723
12818
|
var CollapsibleRow = ({
|
|
12724
12819
|
type: _type,
|
|
12725
12820
|
className,
|
|
@@ -12762,24 +12857,24 @@ var CollapsibleRow = ({
|
|
|
12762
12857
|
const collapsedRenderedChildren = isCollapsed && collapsedHeaderValues.length > 0 ? collapsedChildren.map(function(child, index) {
|
|
12763
12858
|
const id = derivativeIdGenerator(prefix2, index.toString());
|
|
12764
12859
|
collapsibleIds.push(id);
|
|
12765
|
-
return /* @__PURE__ */ jsxs78(
|
|
12766
|
-
/* @__PURE__ */
|
|
12860
|
+
return /* @__PURE__ */ jsxs78(Fragment11, { children: [
|
|
12861
|
+
/* @__PURE__ */ jsx309(DescriptionListTerm, { children: collapsedHeaderValues[index].content }),
|
|
12767
12862
|
isValidElement6(child) && cloneElement6(child, {
|
|
12768
12863
|
collapsibleProps: { isCollapsibleChild: true }
|
|
12769
12864
|
})
|
|
12770
12865
|
] }, `DL-${index}`);
|
|
12771
12866
|
}) : null;
|
|
12772
|
-
const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */
|
|
12867
|
+
const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsx309(Row, { ...rowProps(), children: /* @__PURE__ */ jsx309(Cell, { colSpan: definingColumnIndex.length + 1, children: /* @__PURE__ */ jsx309(DescriptionList, { children: collapsedRenderedChildren }) }) }) : null;
|
|
12773
12868
|
const definingColumnCells = childrenArray.slice().filter((column, index) => definingColumnIndex.indexOf(index) > -1).sort((a, b) => {
|
|
12774
12869
|
return definingColumnIndex.indexOf(childrenArray.indexOf(a)) - definingColumnIndex.indexOf(childrenArray.indexOf(b));
|
|
12775
12870
|
});
|
|
12776
12871
|
const headerRow = () => {
|
|
12777
12872
|
if (type !== "head" || !isCollapsed) return null;
|
|
12778
|
-
return /* @__PURE__ */
|
|
12873
|
+
return /* @__PURE__ */ jsx309(Row, { ref, ...rowProps(), children: /* @__PURE__ */ jsxs78(Fragment12, { children: [
|
|
12779
12874
|
definingColumnCells,
|
|
12780
12875
|
/* @__PURE__ */ jsxs78(Table2.Cell, { type: "head", layout: "center", children: [
|
|
12781
|
-
t(
|
|
12782
|
-
/* @__PURE__ */
|
|
12876
|
+
t(texts26.expand),
|
|
12877
|
+
/* @__PURE__ */ jsx309(VisuallyHidden, { children: t(texts26.row) })
|
|
12783
12878
|
] })
|
|
12784
12879
|
] }) });
|
|
12785
12880
|
};
|
|
@@ -12788,14 +12883,14 @@ var CollapsibleRow = ({
|
|
|
12788
12883
|
if (type !== "body" || !isCollapsed) return null;
|
|
12789
12884
|
return /* @__PURE__ */ jsxs78(Row, { ref, ...rowProps(!childrenCollapsed && true), children: [
|
|
12790
12885
|
definingColumnCells,
|
|
12791
|
-
/* @__PURE__ */
|
|
12886
|
+
/* @__PURE__ */ jsx309(Table2.Cell, { children: /* @__PURE__ */ jsx309(
|
|
12792
12887
|
StylelessButton,
|
|
12793
12888
|
{
|
|
12794
12889
|
onClick: () => setChildrenCollapsed(!childrenCollapsed),
|
|
12795
12890
|
"aria-expanded": !childrenCollapsed,
|
|
12796
12891
|
"aria-controls": idList,
|
|
12797
12892
|
className: cn(Table_default["collapse-button"], focusable),
|
|
12798
|
-
children: /* @__PURE__ */
|
|
12893
|
+
children: /* @__PURE__ */ jsx309(
|
|
12799
12894
|
AnimatedChevronUpDown,
|
|
12800
12895
|
{
|
|
12801
12896
|
isUp: childrenCollapsed ? false : true,
|
|
@@ -12807,16 +12902,16 @@ var CollapsibleRow = ({
|
|
|
12807
12902
|
) })
|
|
12808
12903
|
] });
|
|
12809
12904
|
};
|
|
12810
|
-
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsxs78(
|
|
12905
|
+
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsxs78(Fragment12, { children: [
|
|
12811
12906
|
headerRow(),
|
|
12812
|
-
type === "body" && /* @__PURE__ */ jsxs78(
|
|
12907
|
+
type === "body" && /* @__PURE__ */ jsxs78(Fragment12, { children: [
|
|
12813
12908
|
rowWithChevron(),
|
|
12814
12909
|
childrenCollapsed ? null : collapsedRows
|
|
12815
12910
|
] })
|
|
12816
|
-
] }) : /* @__PURE__ */
|
|
12911
|
+
] }) : /* @__PURE__ */ jsx309(Row, { ref, ...rowProps(), children });
|
|
12817
12912
|
};
|
|
12818
12913
|
CollapsibleRow.displayName = "CollapsibleTable.Row";
|
|
12819
|
-
var
|
|
12914
|
+
var texts26 = createTexts({
|
|
12820
12915
|
expand: {
|
|
12821
12916
|
nb: "Utvid",
|
|
12822
12917
|
no: "Utvid",
|
|
@@ -12832,14 +12927,14 @@ var texts25 = createTexts({
|
|
|
12832
12927
|
});
|
|
12833
12928
|
|
|
12834
12929
|
// src/components/Table/collapsible/CollapsibleTable.tsx
|
|
12835
|
-
import { jsx as
|
|
12930
|
+
import { jsx as jsx310 } from "react/jsx-runtime";
|
|
12836
12931
|
var CollapsibleTable = ({
|
|
12837
12932
|
isCollapsed,
|
|
12838
12933
|
headerValues,
|
|
12839
12934
|
definingColumnIndex = [0],
|
|
12840
12935
|
...rest
|
|
12841
12936
|
}) => {
|
|
12842
|
-
return /* @__PURE__ */
|
|
12937
|
+
return /* @__PURE__ */ jsx310(
|
|
12843
12938
|
CollapsibleTableContext,
|
|
12844
12939
|
{
|
|
12845
12940
|
value: {
|
|
@@ -12847,7 +12942,7 @@ var CollapsibleTable = ({
|
|
|
12847
12942
|
headerValues,
|
|
12848
12943
|
definingColumnIndex
|
|
12849
12944
|
},
|
|
12850
|
-
children: /* @__PURE__ */
|
|
12945
|
+
children: /* @__PURE__ */ jsx310(Table2, { ...rest })
|
|
12851
12946
|
}
|
|
12852
12947
|
);
|
|
12853
12948
|
};
|
|
@@ -12897,13 +12992,13 @@ import {
|
|
|
12897
12992
|
useContext as useContext27,
|
|
12898
12993
|
useLayoutEffect as useLayoutEffect3
|
|
12899
12994
|
} from "react";
|
|
12900
|
-
import { jsx as
|
|
12995
|
+
import { jsx as jsx311 } from "react/jsx-runtime";
|
|
12901
12996
|
var TabContext = createContext19(null);
|
|
12902
12997
|
function TabWidthContextProvider({
|
|
12903
12998
|
children,
|
|
12904
12999
|
onChangeWidths
|
|
12905
13000
|
}) {
|
|
12906
|
-
return /* @__PURE__ */
|
|
13001
|
+
return /* @__PURE__ */ jsx311(
|
|
12907
13002
|
TabContext,
|
|
12908
13003
|
{
|
|
12909
13004
|
value: {
|
|
@@ -12935,7 +13030,7 @@ function useSetTabWidth(index, width) {
|
|
|
12935
13030
|
}
|
|
12936
13031
|
|
|
12937
13032
|
// src/components/Tabs/AddTabButton.tsx
|
|
12938
|
-
import { jsx as
|
|
13033
|
+
import { jsx as jsx312, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
12939
13034
|
var AddTabButton = ({
|
|
12940
13035
|
ref,
|
|
12941
13036
|
children,
|
|
@@ -12961,8 +13056,8 @@ var AddTabButton = ({
|
|
|
12961
13056
|
focus_default["focusable--inset"]
|
|
12962
13057
|
),
|
|
12963
13058
|
children: [
|
|
12964
|
-
/* @__PURE__ */
|
|
12965
|
-
/* @__PURE__ */
|
|
13059
|
+
/* @__PURE__ */ jsx312(Icon, { icon: PlusIcon, iconSize: "inherit" }),
|
|
13060
|
+
/* @__PURE__ */ jsx312("span", { children })
|
|
12966
13061
|
]
|
|
12967
13062
|
}
|
|
12968
13063
|
);
|
|
@@ -12971,7 +13066,7 @@ AddTabButton.displayName = "AddTabButton";
|
|
|
12971
13066
|
|
|
12972
13067
|
// src/components/Tabs/Tabs.tsx
|
|
12973
13068
|
import { useEffect as useEffect33, useId as useId24, useRef as useRef36, useState as useState31 } from "react";
|
|
12974
|
-
import { jsx as
|
|
13069
|
+
import { jsx as jsx313 } from "react/jsx-runtime";
|
|
12975
13070
|
var TABS_SIZES = createSizes("small", "medium");
|
|
12976
13071
|
var Tabs = ({
|
|
12977
13072
|
id,
|
|
@@ -13001,7 +13096,7 @@ var Tabs = ({
|
|
|
13001
13096
|
setActiveTab(activeTab);
|
|
13002
13097
|
}
|
|
13003
13098
|
}, [activeTab, thisActiveTab]);
|
|
13004
|
-
return /* @__PURE__ */
|
|
13099
|
+
return /* @__PURE__ */ jsx313(
|
|
13005
13100
|
TabsContext,
|
|
13006
13101
|
{
|
|
13007
13102
|
value: {
|
|
@@ -13016,7 +13111,7 @@ var Tabs = ({
|
|
|
13016
13111
|
tabContentDirection,
|
|
13017
13112
|
addTabButtonProps
|
|
13018
13113
|
},
|
|
13019
|
-
children: /* @__PURE__ */
|
|
13114
|
+
children: /* @__PURE__ */ jsx313(
|
|
13020
13115
|
Box,
|
|
13021
13116
|
{
|
|
13022
13117
|
...getBaseHTMLProps(uniqueId, className, htmlProps, rest),
|
|
@@ -13035,7 +13130,7 @@ import {
|
|
|
13035
13130
|
useEffect as useEffect34,
|
|
13036
13131
|
useRef as useRef37
|
|
13037
13132
|
} from "react";
|
|
13038
|
-
import { jsx as
|
|
13133
|
+
import { jsx as jsx314, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
13039
13134
|
var Tab = ({
|
|
13040
13135
|
active = false,
|
|
13041
13136
|
icon,
|
|
@@ -13101,8 +13196,8 @@ var Tab = ({
|
|
|
13101
13196
|
onKeyDown: handleOnKeyDown,
|
|
13102
13197
|
tabIndex: focus ? 0 : -1,
|
|
13103
13198
|
children: [
|
|
13104
|
-
icon && /* @__PURE__ */
|
|
13105
|
-
/* @__PURE__ */
|
|
13199
|
+
icon && /* @__PURE__ */ jsx314(Icon, { icon, iconSize: "inherit" }),
|
|
13200
|
+
/* @__PURE__ */ jsx314("span", { children })
|
|
13106
13201
|
]
|
|
13107
13202
|
}
|
|
13108
13203
|
);
|
|
@@ -13116,7 +13211,7 @@ import {
|
|
|
13116
13211
|
isValidElement as isValidElement7,
|
|
13117
13212
|
useState as useState32
|
|
13118
13213
|
} from "react";
|
|
13119
|
-
import { jsx as
|
|
13214
|
+
import { jsx as jsx315, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
13120
13215
|
var TabList = ({
|
|
13121
13216
|
children,
|
|
13122
13217
|
id,
|
|
@@ -13174,7 +13269,7 @@ var TabList = ({
|
|
|
13174
13269
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13175
13270
|
["--dds-tab-widths"]: widths.join(" ")
|
|
13176
13271
|
};
|
|
13177
|
-
return /* @__PURE__ */
|
|
13272
|
+
return /* @__PURE__ */ jsx315(TabWidthContextProvider, { onChangeWidths: setWidths, children: /* @__PURE__ */ jsxs81(
|
|
13178
13273
|
"div",
|
|
13179
13274
|
{
|
|
13180
13275
|
...rest,
|
|
@@ -13194,7 +13289,7 @@ var TabList = ({
|
|
|
13194
13289
|
style: { ...style, ...customWidths },
|
|
13195
13290
|
children: [
|
|
13196
13291
|
tabListChildren,
|
|
13197
|
-
hasButton && /* @__PURE__ */
|
|
13292
|
+
hasButton && /* @__PURE__ */ jsx315(
|
|
13198
13293
|
AddTabButton,
|
|
13199
13294
|
{
|
|
13200
13295
|
index: tabListChildren ? tabListChildren.length : 0,
|
|
@@ -13208,7 +13303,7 @@ var TabList = ({
|
|
|
13208
13303
|
TabList.displayName = "TabList";
|
|
13209
13304
|
|
|
13210
13305
|
// src/components/Tabs/TabPanel.tsx
|
|
13211
|
-
import { jsx as
|
|
13306
|
+
import { jsx as jsx316 } from "react/jsx-runtime";
|
|
13212
13307
|
var TabPanel = ({
|
|
13213
13308
|
active = false,
|
|
13214
13309
|
children,
|
|
@@ -13217,7 +13312,7 @@ var TabPanel = ({
|
|
|
13217
13312
|
htmlProps,
|
|
13218
13313
|
padding = "x0.25",
|
|
13219
13314
|
...rest
|
|
13220
|
-
}) => /* @__PURE__ */
|
|
13315
|
+
}) => /* @__PURE__ */ jsx316(
|
|
13221
13316
|
Box,
|
|
13222
13317
|
{
|
|
13223
13318
|
padding,
|
|
@@ -13236,7 +13331,7 @@ import {
|
|
|
13236
13331
|
cloneElement as cloneElement8,
|
|
13237
13332
|
isValidElement as isValidElement8
|
|
13238
13333
|
} from "react";
|
|
13239
|
-
import { jsx as
|
|
13334
|
+
import { jsx as jsx317 } from "react/jsx-runtime";
|
|
13240
13335
|
var TabPanels = ({ children, ref, ...rest }) => {
|
|
13241
13336
|
const { activeTab, tabsId, tabPanelsRef } = useTabsContext();
|
|
13242
13337
|
const combinedRef = useCombinedRef(ref, tabPanelsRef);
|
|
@@ -13251,7 +13346,7 @@ var TabPanels = ({ children, ref, ...rest }) => {
|
|
|
13251
13346
|
}
|
|
13252
13347
|
});
|
|
13253
13348
|
});
|
|
13254
|
-
return /* @__PURE__ */
|
|
13349
|
+
return /* @__PURE__ */ jsx317(Box, { ref: combinedRef, ...rest, children: panelChildren });
|
|
13255
13350
|
};
|
|
13256
13351
|
TabPanels.displayName = "TabPanels";
|
|
13257
13352
|
|
|
@@ -13272,7 +13367,7 @@ var Tag_default = {
|
|
|
13272
13367
|
};
|
|
13273
13368
|
|
|
13274
13369
|
// src/components/Tag/Tag.tsx
|
|
13275
|
-
import { jsx as
|
|
13370
|
+
import { jsx as jsx318, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
13276
13371
|
var icons3 = {
|
|
13277
13372
|
info: InfoIcon,
|
|
13278
13373
|
danger: ErrorIcon,
|
|
@@ -13308,8 +13403,8 @@ var Tag = ({
|
|
|
13308
13403
|
rest
|
|
13309
13404
|
),
|
|
13310
13405
|
children: [
|
|
13311
|
-
withIcon && icon && /* @__PURE__ */
|
|
13312
|
-
/* @__PURE__ */
|
|
13406
|
+
withIcon && icon && /* @__PURE__ */ jsx318(Icon, { icon, iconSize: "small" }),
|
|
13407
|
+
/* @__PURE__ */ jsx318(TextOverflowEllipsisInner, { children: children != null ? children : text })
|
|
13313
13408
|
]
|
|
13314
13409
|
}
|
|
13315
13410
|
);
|
|
@@ -13339,7 +13434,7 @@ var TextInput_default = {
|
|
|
13339
13434
|
};
|
|
13340
13435
|
|
|
13341
13436
|
// src/components/TextInput/TextInput.tsx
|
|
13342
|
-
import { jsx as
|
|
13437
|
+
import { jsx as jsx319, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
13343
13438
|
var TextInput = ({
|
|
13344
13439
|
label,
|
|
13345
13440
|
disabled,
|
|
@@ -13391,7 +13486,6 @@ var TextInput = ({
|
|
|
13391
13486
|
const uniqueId = id != null ? id : `${generatedId}-textInput`;
|
|
13392
13487
|
const hasErrorMessage = !!errorMessage;
|
|
13393
13488
|
const hasTip = !!tip;
|
|
13394
|
-
const hasLabel = !!label;
|
|
13395
13489
|
const hasMessage = hasErrorMessage || hasTip;
|
|
13396
13490
|
const hasBottomContainer = hasErrorMessage || hasTip || !!maxLength;
|
|
13397
13491
|
const hasIcon = !!icon;
|
|
@@ -13435,7 +13529,7 @@ var TextInput = ({
|
|
|
13435
13529
|
let extendedInput = null;
|
|
13436
13530
|
if (hasIcon) {
|
|
13437
13531
|
extendedInput = /* @__PURE__ */ jsxs83(Box, { className: Input_default["input-group"], width: inputWidth, children: [
|
|
13438
|
-
/* @__PURE__ */
|
|
13532
|
+
/* @__PURE__ */ jsx319(
|
|
13439
13533
|
Icon,
|
|
13440
13534
|
{
|
|
13441
13535
|
icon,
|
|
@@ -13446,7 +13540,7 @@ var TextInput = ({
|
|
|
13446
13540
|
)
|
|
13447
13541
|
}
|
|
13448
13542
|
),
|
|
13449
|
-
/* @__PURE__ */
|
|
13543
|
+
/* @__PURE__ */ jsx319(
|
|
13450
13544
|
StatefulInput,
|
|
13451
13545
|
{
|
|
13452
13546
|
className: cn(
|
|
@@ -13467,7 +13561,7 @@ var TextInput = ({
|
|
|
13467
13561
|
alignItems: "center",
|
|
13468
13562
|
width: inputWidth,
|
|
13469
13563
|
children: [
|
|
13470
|
-
prefix2 && /* @__PURE__ */
|
|
13564
|
+
prefix2 && /* @__PURE__ */ jsx319(
|
|
13471
13565
|
"span",
|
|
13472
13566
|
{
|
|
13473
13567
|
ref: prefixRef,
|
|
@@ -13480,7 +13574,7 @@ var TextInput = ({
|
|
|
13480
13574
|
children: prefix2
|
|
13481
13575
|
}
|
|
13482
13576
|
),
|
|
13483
|
-
/* @__PURE__ */
|
|
13577
|
+
/* @__PURE__ */ jsx319(
|
|
13484
13578
|
StatefulInput,
|
|
13485
13579
|
{
|
|
13486
13580
|
style: {
|
|
@@ -13491,7 +13585,7 @@ var TextInput = ({
|
|
|
13491
13585
|
...generalInputProps
|
|
13492
13586
|
}
|
|
13493
13587
|
),
|
|
13494
|
-
suffix && /* @__PURE__ */
|
|
13588
|
+
suffix && /* @__PURE__ */ jsx319(
|
|
13495
13589
|
"span",
|
|
13496
13590
|
{
|
|
13497
13591
|
ref: suffixRef,
|
|
@@ -13520,18 +13614,8 @@ var TextInput = ({
|
|
|
13520
13614
|
),
|
|
13521
13615
|
style,
|
|
13522
13616
|
children: [
|
|
13523
|
-
|
|
13524
|
-
|
|
13525
|
-
{
|
|
13526
|
-
as: Label,
|
|
13527
|
-
display: "block",
|
|
13528
|
-
htmlFor: uniqueId,
|
|
13529
|
-
showRequiredStyling,
|
|
13530
|
-
readOnly,
|
|
13531
|
-
children: label
|
|
13532
|
-
}
|
|
13533
|
-
),
|
|
13534
|
-
extendedInput ? extendedInput : /* @__PURE__ */ jsx318(Box, { as: StatefulInput, width: inputWidth, ...generalInputProps }),
|
|
13617
|
+
renderLabel({ label, htmlFor: uniqueId, showRequiredStyling, readOnly }),
|
|
13618
|
+
extendedInput ? extendedInput : /* @__PURE__ */ jsx319(Box, { as: StatefulInput, width: inputWidth, ...generalInputProps }),
|
|
13535
13619
|
hasBottomContainer && /* @__PURE__ */ jsxs83(
|
|
13536
13620
|
Box,
|
|
13537
13621
|
{
|
|
@@ -13575,7 +13659,7 @@ var Toggle_default = {
|
|
|
13575
13659
|
};
|
|
13576
13660
|
|
|
13577
13661
|
// src/components/Toggle/Toggle.tsx
|
|
13578
|
-
import { jsx as
|
|
13662
|
+
import { jsx as jsx320, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
13579
13663
|
var TOGGLE_SIZES = createSizes("medium", "large");
|
|
13580
13664
|
var Toggle = ({
|
|
13581
13665
|
id,
|
|
@@ -13612,7 +13696,7 @@ var Toggle = ({
|
|
|
13612
13696
|
readOnly && Toggle_default["label--read-only"]
|
|
13613
13697
|
),
|
|
13614
13698
|
children: [
|
|
13615
|
-
/* @__PURE__ */
|
|
13699
|
+
/* @__PURE__ */ jsx320(
|
|
13616
13700
|
HiddenInput,
|
|
13617
13701
|
{
|
|
13618
13702
|
...getBaseHTMLProps(
|
|
@@ -13635,7 +13719,7 @@ var Toggle = ({
|
|
|
13635
13719
|
onClick: readOnlyClickHandler(readOnly || isLoading, htmlProps.onClick)
|
|
13636
13720
|
}
|
|
13637
13721
|
),
|
|
13638
|
-
/* @__PURE__ */
|
|
13722
|
+
/* @__PURE__ */ jsx320("span", { className: cn(Toggle_default.track, focus_default["focus-styled-sibling"]), children: /* @__PURE__ */ jsx320("span", { className: Toggle_default.thumb, children: isLoading ? /* @__PURE__ */ jsx320(Spinner, { size: `var(--dds-icon-size-${size2})` }) : /* @__PURE__ */ jsx320(
|
|
13639
13723
|
Icon,
|
|
13640
13724
|
{
|
|
13641
13725
|
className: Toggle_default.checkmark,
|
|
@@ -13644,7 +13728,7 @@ var Toggle = ({
|
|
|
13644
13728
|
}
|
|
13645
13729
|
) }) }),
|
|
13646
13730
|
/* @__PURE__ */ jsxs84("span", { className: cn(readOnly && Toggle_default["labeltext--readonly"]), children: [
|
|
13647
|
-
readOnly && /* @__PURE__ */
|
|
13731
|
+
readOnly && /* @__PURE__ */ jsx320(
|
|
13648
13732
|
Icon,
|
|
13649
13733
|
{
|
|
13650
13734
|
icon: LockIcon,
|
|
@@ -13654,7 +13738,7 @@ var Toggle = ({
|
|
|
13654
13738
|
),
|
|
13655
13739
|
children,
|
|
13656
13740
|
" ",
|
|
13657
|
-
isLoading && /* @__PURE__ */
|
|
13741
|
+
isLoading && /* @__PURE__ */ jsx320(VisuallyHidden, { children: t(commonTexts.loading) })
|
|
13658
13742
|
] })
|
|
13659
13743
|
]
|
|
13660
13744
|
}
|
|
@@ -13688,7 +13772,7 @@ var ToggleBar_default = {
|
|
|
13688
13772
|
};
|
|
13689
13773
|
|
|
13690
13774
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
13691
|
-
import { jsx as
|
|
13775
|
+
import { jsx as jsx321, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
13692
13776
|
var ToggleBar = (props) => {
|
|
13693
13777
|
const {
|
|
13694
13778
|
children,
|
|
@@ -13711,7 +13795,7 @@ var ToggleBar = (props) => {
|
|
|
13711
13795
|
(e) => onChange && onChange(e, e.target.value)
|
|
13712
13796
|
);
|
|
13713
13797
|
const labelId = label && `${uniqueId}-label`;
|
|
13714
|
-
return /* @__PURE__ */
|
|
13798
|
+
return /* @__PURE__ */ jsx321(
|
|
13715
13799
|
ToggleBarContext,
|
|
13716
13800
|
{
|
|
13717
13801
|
value: {
|
|
@@ -13729,8 +13813,8 @@ var ToggleBar = (props) => {
|
|
|
13729
13813
|
role: "radiogroup",
|
|
13730
13814
|
"aria-labelledby": labelId != null ? labelId : htmlProps == null ? void 0 : htmlProps["aria-labelledby"],
|
|
13731
13815
|
children: [
|
|
13732
|
-
label && /* @__PURE__ */
|
|
13733
|
-
/* @__PURE__ */
|
|
13816
|
+
label && /* @__PURE__ */ jsx321(Typography, { id: labelId, as: "span", typographyType: "labelMedium", children: label }),
|
|
13817
|
+
/* @__PURE__ */ jsx321("div", { className: ToggleBar_default.bar, children })
|
|
13734
13818
|
]
|
|
13735
13819
|
}
|
|
13736
13820
|
)
|
|
@@ -13741,7 +13825,7 @@ ToggleBar.displayName = "ToggleBar";
|
|
|
13741
13825
|
|
|
13742
13826
|
// src/components/ToggleBar/ToggleRadio.tsx
|
|
13743
13827
|
import { useId as useId28 } from "react";
|
|
13744
|
-
import { jsx as
|
|
13828
|
+
import { jsx as jsx322, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
13745
13829
|
var typographyTypes3 = {
|
|
13746
13830
|
large: "bodyLarge",
|
|
13747
13831
|
medium: "bodyMedium",
|
|
@@ -13782,7 +13866,7 @@ var ToggleRadio = ({
|
|
|
13782
13866
|
};
|
|
13783
13867
|
const contentTypeCn = label ? "with-text" : "just-icon";
|
|
13784
13868
|
return /* @__PURE__ */ jsxs86("label", { htmlFor: uniqueId, className: ToggleBar_default.label, children: [
|
|
13785
|
-
/* @__PURE__ */
|
|
13869
|
+
/* @__PURE__ */ jsx322(
|
|
13786
13870
|
HiddenInput,
|
|
13787
13871
|
{
|
|
13788
13872
|
...getBaseHTMLProps(
|
|
@@ -13811,8 +13895,8 @@ var ToggleRadio = ({
|
|
|
13811
13895
|
focus_default["focus-styled-sibling"]
|
|
13812
13896
|
),
|
|
13813
13897
|
children: [
|
|
13814
|
-
icon && /* @__PURE__ */
|
|
13815
|
-
label && /* @__PURE__ */
|
|
13898
|
+
icon && /* @__PURE__ */ jsx322(Icon, { icon, iconSize: "inherit" }),
|
|
13899
|
+
label && /* @__PURE__ */ jsx322("span", { children: label })
|
|
13816
13900
|
]
|
|
13817
13901
|
}
|
|
13818
13902
|
)
|
|
@@ -13832,7 +13916,7 @@ var ToggleButton_default = {
|
|
|
13832
13916
|
};
|
|
13833
13917
|
|
|
13834
13918
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
13835
|
-
import { jsx as
|
|
13919
|
+
import { jsx as jsx323, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
13836
13920
|
var ToggleButton = ({
|
|
13837
13921
|
id,
|
|
13838
13922
|
label,
|
|
@@ -13846,7 +13930,7 @@ var ToggleButton = ({
|
|
|
13846
13930
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
13847
13931
|
const hasIcon = !!icon;
|
|
13848
13932
|
return /* @__PURE__ */ jsxs87(Box, { as: "label", htmlFor: uniqueId, width: "fit-content", children: [
|
|
13849
|
-
/* @__PURE__ */
|
|
13933
|
+
/* @__PURE__ */ jsx323(
|
|
13850
13934
|
HiddenInput,
|
|
13851
13935
|
{
|
|
13852
13936
|
...getBaseHTMLProps(
|
|
@@ -13869,7 +13953,7 @@ var ToggleButton = ({
|
|
|
13869
13953
|
focus_default["focus-styled-sibling"]
|
|
13870
13954
|
),
|
|
13871
13955
|
children: [
|
|
13872
|
-
hasIcon && /* @__PURE__ */
|
|
13956
|
+
hasIcon && /* @__PURE__ */ jsx323(Icon, { icon, iconSize: "inherit" }),
|
|
13873
13957
|
" ",
|
|
13874
13958
|
label
|
|
13875
13959
|
]
|
|
@@ -13881,7 +13965,7 @@ ToggleButton.displayName = "ToggleButton";
|
|
|
13881
13965
|
|
|
13882
13966
|
// src/components/ToggleButton/ToggleButtonGroup.tsx
|
|
13883
13967
|
import { useId as useId30 } from "react";
|
|
13884
|
-
import { jsx as
|
|
13968
|
+
import { jsx as jsx324, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
13885
13969
|
var ToggleButtonGroup = (props) => {
|
|
13886
13970
|
const {
|
|
13887
13971
|
children,
|
|
@@ -13896,15 +13980,14 @@ var ToggleButtonGroup = (props) => {
|
|
|
13896
13980
|
const generatedId = useId30();
|
|
13897
13981
|
const uniqueLabelId = labelId != null ? labelId : `${generatedId}-ToggleButtonGroupLabel`;
|
|
13898
13982
|
return /* @__PURE__ */ jsxs88(
|
|
13899
|
-
|
|
13983
|
+
"div",
|
|
13900
13984
|
{
|
|
13901
|
-
gap: "x0.5",
|
|
13902
13985
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
13903
13986
|
role: "group",
|
|
13904
13987
|
"aria-labelledby": label ? uniqueLabelId : void 0,
|
|
13905
13988
|
children: [
|
|
13906
|
-
|
|
13907
|
-
/* @__PURE__ */
|
|
13989
|
+
renderGroupLabel({ label, id: uniqueLabelId }),
|
|
13990
|
+
/* @__PURE__ */ jsx324(Box, { display: "flex", flexWrap: "wrap", gap: "x0.75", flexDirection: direction, children })
|
|
13908
13991
|
]
|
|
13909
13992
|
}
|
|
13910
13993
|
);
|