@norges-domstoler/dds-components 0.0.0-dev-20250925095128 → 0.0.0-dev-20250926114347
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 +15 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -21
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -11949,6 +11949,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11949
11949
|
...rest
|
|
11950
11950
|
} = props;
|
|
11951
11951
|
const { t } = useTranslation();
|
|
11952
|
+
const stepNumber = index + 1;
|
|
11952
11953
|
const { activeStep, handleStepChange, direction } = useProgressTrackerContext();
|
|
11953
11954
|
const active = activeStep === index;
|
|
11954
11955
|
const itemState = toItemState(active, completed, disabled);
|
|
@@ -11965,7 +11966,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11965
11966
|
if (icon !== void 0) {
|
|
11966
11967
|
return /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(Icon, { icon, iconSize: "small" });
|
|
11967
11968
|
}
|
|
11968
|
-
return
|
|
11969
|
+
return stepNumber;
|
|
11969
11970
|
}, [completed, icon, index]);
|
|
11970
11971
|
function getTextColor2() {
|
|
11971
11972
|
if (disabled) return "text-subtle";
|
|
@@ -11988,7 +11989,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11988
11989
|
children: stepNumberContent
|
|
11989
11990
|
}
|
|
11990
11991
|
),
|
|
11991
|
-
/* @__PURE__ */ (0, import_jsx_runtime292.
|
|
11992
|
+
/* @__PURE__ */ (0, import_jsx_runtime292.jsx)(
|
|
11992
11993
|
Typography,
|
|
11993
11994
|
{
|
|
11994
11995
|
as: "div",
|
|
@@ -11998,14 +11999,11 @@ var ProgressTrackerItem = (props) => {
|
|
|
11998
11999
|
isInactiveLink && ProgressTracker_default["item-text--inactive-link"]
|
|
11999
12000
|
),
|
|
12000
12001
|
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
|
-
]
|
|
12002
|
+
children
|
|
12006
12003
|
}
|
|
12007
12004
|
)
|
|
12008
12005
|
] });
|
|
12006
|
+
const ariaLabel = props["aria-label"] ? props["aria-label"] : `${children}, ${stepNumber}. ${completed ? t(texts20.completed) : t(texts20.uncompleted)}`;
|
|
12009
12007
|
return /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(
|
|
12010
12008
|
Box,
|
|
12011
12009
|
{
|
|
@@ -12032,6 +12030,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
12032
12030
|
htmlProps,
|
|
12033
12031
|
rest
|
|
12034
12032
|
),
|
|
12033
|
+
"aria-label": ariaLabel,
|
|
12035
12034
|
onClick: () => handleClick(),
|
|
12036
12035
|
disabled,
|
|
12037
12036
|
children: stepContent
|
|
@@ -12045,6 +12044,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
12045
12044
|
htmlProps,
|
|
12046
12045
|
rest
|
|
12047
12046
|
),
|
|
12047
|
+
"aria-label": ariaLabel,
|
|
12048
12048
|
children: stepContent
|
|
12049
12049
|
}
|
|
12050
12050
|
)
|
|
@@ -12053,23 +12053,17 @@ var ProgressTrackerItem = (props) => {
|
|
|
12053
12053
|
};
|
|
12054
12054
|
ProgressTrackerItem.displayName = "ProgressTracker.Item";
|
|
12055
12055
|
var texts20 = createTexts({
|
|
12056
|
-
stepTextBefore: (index) => ({
|
|
12057
|
-
nb: `${index}. trinn, `,
|
|
12058
|
-
no: `${index}. trinn, `,
|
|
12059
|
-
nn: `${index}. trinn, `,
|
|
12060
|
-
en: `${index}. step, `
|
|
12061
|
-
}),
|
|
12062
12056
|
uncompleted: {
|
|
12063
|
-
nb: "
|
|
12064
|
-
no: "
|
|
12065
|
-
nn: "
|
|
12066
|
-
en: "uncompleted"
|
|
12057
|
+
nb: "trinn ikke ferdig",
|
|
12058
|
+
no: "trinn ikke ferdig",
|
|
12059
|
+
nn: "trinn ikkje ferdig",
|
|
12060
|
+
en: "step uncompleted"
|
|
12067
12061
|
},
|
|
12068
12062
|
completed: {
|
|
12069
|
-
nb: "
|
|
12070
|
-
no: "
|
|
12071
|
-
nn: "
|
|
12072
|
-
en: "
|
|
12063
|
+
nb: "trinn ferdig",
|
|
12064
|
+
no: "trinn ferdig",
|
|
12065
|
+
nn: "trinn ferdig",
|
|
12066
|
+
en: "step completed"
|
|
12073
12067
|
}
|
|
12074
12068
|
});
|
|
12075
12069
|
|