@norges-domstoler/dds-components 0.0.0-dev-20250925095128 → 0.0.0-dev-20250929080131
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.js +18 -25
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -25
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -10177,7 +10177,7 @@ var getCustomStyles = (size2, hasError, hasIcon, isReadOnly) => ({
|
|
|
10177
10177
|
cursor: "pointer",
|
|
10178
10178
|
display: "flex",
|
|
10179
10179
|
alignItems: "center",
|
|
10180
|
-
gap: "var(--dds-spacing-x0-
|
|
10180
|
+
gap: "var(--dds-spacing-x0-25)",
|
|
10181
10181
|
padding: "var(--dds-spacing-x0-75)",
|
|
10182
10182
|
backgroundColor: "var(--dds-color-surface-default)",
|
|
10183
10183
|
...typography.option[size2],
|
|
@@ -10243,10 +10243,9 @@ var getIndicatorIconSize = (componentSize) => {
|
|
|
10243
10243
|
}
|
|
10244
10244
|
};
|
|
10245
10245
|
var DDSOption = ({
|
|
10246
|
-
componentSize,
|
|
10247
10246
|
...props
|
|
10248
10247
|
}) => /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(Option, { ...props, children: [
|
|
10249
|
-
props.isSelected && /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(Icon, { icon: CheckIcon, iconSize:
|
|
10248
|
+
props.isSelected && /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(Icon, { icon: CheckIcon, iconSize: "small" }),
|
|
10250
10249
|
props.children
|
|
10251
10250
|
] });
|
|
10252
10251
|
var CustomOption = (props) => /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(Option, { ...props, children: import_react70.default.createElement(props.customElement, props) });
|
|
@@ -10437,7 +10436,7 @@ function Select({
|
|
|
10437
10436
|
if (customOptionElement) {
|
|
10438
10437
|
return /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(CustomOption, { ...props, customElement: customOptionElement });
|
|
10439
10438
|
} else {
|
|
10440
|
-
return /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(DDSOption, { ...props
|
|
10439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(DDSOption, { ...props });
|
|
10441
10440
|
}
|
|
10442
10441
|
},
|
|
10443
10442
|
[customOptionElement, componentSize]
|
|
@@ -11949,6 +11948,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11949
11948
|
...rest
|
|
11950
11949
|
} = props;
|
|
11951
11950
|
const { t } = useTranslation();
|
|
11951
|
+
const stepNumber = index + 1;
|
|
11952
11952
|
const { activeStep, handleStepChange, direction } = useProgressTrackerContext();
|
|
11953
11953
|
const active = activeStep === index;
|
|
11954
11954
|
const itemState = toItemState(active, completed, disabled);
|
|
@@ -11965,7 +11965,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11965
11965
|
if (icon !== void 0) {
|
|
11966
11966
|
return /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(Icon, { icon, iconSize: "small" });
|
|
11967
11967
|
}
|
|
11968
|
-
return
|
|
11968
|
+
return stepNumber;
|
|
11969
11969
|
}, [completed, icon, index]);
|
|
11970
11970
|
function getTextColor2() {
|
|
11971
11971
|
if (disabled) return "text-subtle";
|
|
@@ -11988,7 +11988,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11988
11988
|
children: stepNumberContent
|
|
11989
11989
|
}
|
|
11990
11990
|
),
|
|
11991
|
-
/* @__PURE__ */ (0, import_jsx_runtime292.
|
|
11991
|
+
/* @__PURE__ */ (0, import_jsx_runtime292.jsx)(
|
|
11992
11992
|
Typography,
|
|
11993
11993
|
{
|
|
11994
11994
|
as: "div",
|
|
@@ -11998,14 +11998,11 @@ var ProgressTrackerItem = (props) => {
|
|
|
11998
11998
|
isInactiveLink && ProgressTracker_default["item-text--inactive-link"]
|
|
11999
11999
|
),
|
|
12000
12000
|
color: getTextColor2(),
|
|
12001
|
-
children
|
|
12002
|
-
/* @__PURE__ */ (0, import_jsx_runtime292.jsx)(VisuallyHidden, { children: t(texts20.stepTextBefore(index + 1)) }),
|
|
12003
|
-
children,
|
|
12004
|
-
/* @__PURE__ */ (0, import_jsx_runtime292.jsx)(VisuallyHidden, { children: completed ? t(texts20.completed) : t(texts20.uncompleted) })
|
|
12005
|
-
]
|
|
12001
|
+
children
|
|
12006
12002
|
}
|
|
12007
12003
|
)
|
|
12008
12004
|
] });
|
|
12005
|
+
const ariaLabel = props["aria-label"] ? props["aria-label"] : `${children}, ${stepNumber}. ${completed ? t(texts20.completed) : t(texts20.uncompleted)}`;
|
|
12009
12006
|
return /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(
|
|
12010
12007
|
Box,
|
|
12011
12008
|
{
|
|
@@ -12032,6 +12029,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
12032
12029
|
htmlProps,
|
|
12033
12030
|
rest
|
|
12034
12031
|
),
|
|
12032
|
+
"aria-label": ariaLabel,
|
|
12035
12033
|
onClick: () => handleClick(),
|
|
12036
12034
|
disabled,
|
|
12037
12035
|
children: stepContent
|
|
@@ -12045,6 +12043,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
12045
12043
|
htmlProps,
|
|
12046
12044
|
rest
|
|
12047
12045
|
),
|
|
12046
|
+
"aria-label": ariaLabel,
|
|
12048
12047
|
children: stepContent
|
|
12049
12048
|
}
|
|
12050
12049
|
)
|
|
@@ -12053,23 +12052,17 @@ var ProgressTrackerItem = (props) => {
|
|
|
12053
12052
|
};
|
|
12054
12053
|
ProgressTrackerItem.displayName = "ProgressTracker.Item";
|
|
12055
12054
|
var texts20 = createTexts({
|
|
12056
|
-
stepTextBefore: (index) => ({
|
|
12057
|
-
nb: `${index}. trinn, `,
|
|
12058
|
-
no: `${index}. trinn, `,
|
|
12059
|
-
nn: `${index}. trinn, `,
|
|
12060
|
-
en: `${index}. step, `
|
|
12061
|
-
}),
|
|
12062
12055
|
uncompleted: {
|
|
12063
|
-
nb: "
|
|
12064
|
-
no: "
|
|
12065
|
-
nn: "
|
|
12066
|
-
en: "uncompleted"
|
|
12056
|
+
nb: "trinn ikke ferdig",
|
|
12057
|
+
no: "trinn ikke ferdig",
|
|
12058
|
+
nn: "trinn ikkje ferdig",
|
|
12059
|
+
en: "step uncompleted"
|
|
12067
12060
|
},
|
|
12068
12061
|
completed: {
|
|
12069
|
-
nb: "
|
|
12070
|
-
no: "
|
|
12071
|
-
nn: "
|
|
12072
|
-
en: "
|
|
12062
|
+
nb: "trinn ferdig",
|
|
12063
|
+
no: "trinn ferdig",
|
|
12064
|
+
nn: "trinn ferdig",
|
|
12065
|
+
en: "step completed"
|
|
12073
12066
|
}
|
|
12074
12067
|
});
|
|
12075
12068
|
|