@norges-domstoler/dds-components 0.0.0-dev-20260112090424 → 0.0.0-dev-20260112140706
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.d.mts +1 -7
- package/dist/index.d.ts +1 -7
- package/dist/index.js +7 -48
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -48
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -220,15 +220,9 @@ type ButtonProps<I extends SvgIcon = SvgIcon> = BaseComponentProps<HTMLButtonEle
|
|
|
220
220
|
target?: string;
|
|
221
221
|
} & PickedHTMLAttributes$4, ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
222
222
|
|
|
223
|
-
/**
|
|
224
|
-
* Tekstfarger i kebab-case; camelCase blir deprecated, og kebab-case blir standarden for props som refererer til CSS-variabler.
|
|
225
|
-
* TODO: fjerne cameCase på et tidspunkt.
|
|
226
|
-
*/
|
|
227
223
|
declare const TEXT_COLORS: readonly ["text-on-action", "text-on-inverse", "text-on-status-default", "text-on-status-strong", "text-action-resting", "text-action-hover", "text-action-visited", "text-default", "text-requiredfield", "text-subtle", "text-medium", "text-on-notification", "text-on-primary-default", "text-on-primary-medium", "text-on-primary-subtle", "text-on-primary-strong", "text-on-secondary-default", "text-on-secondary-medium", "text-on-secondary-subtle", "text-on-secondary-strong", "text-on-tertiary-default", "text-on-tertiary-medium", "text-on-tertiary-subtle", "text-on-tertiary-strong", "text-on-data-default", "text-on-data-subtle", "icon-on-action", "icon-on-info-default", "icon-on-success-default", "icon-on-danger-default", "icon-on-warning-default", "icon-on-info-strong", "icon-on-success-strong", "icon-on-danger-strong", "icon-on-warning-strong", "icon-on-inverse", "icon-action-resting", "icon-action-hover", "icon-default", "icon-subtle", "icon-medium"];
|
|
228
|
-
declare const TEXT_COLORS_CAMEL: readonly ["textOnAction", "textOnInverse", "textOnStatusDefault", "textOnStatusStrong", "textActionResting", "textActionHover", "textActionVisited", "textDefault", "textRequiredfield", "textSubtle", "textMedium", "textOnNotification", "iconOnAction", "iconOnInfoDefault", "iconOnSuccessDefault", "iconOnDangerDefault", "iconOnWarningDefault", "iconOnInfoStrong", "iconOnSuccessStrong", "iconOnDangerStrong", "iconOnWarningStrong", "iconOnInverse", "iconActionResting", "iconActionHover", "iconDefault", "iconSubtle", "iconMedium"];
|
|
229
224
|
type DDSTextColor = (typeof TEXT_COLORS)[number];
|
|
230
|
-
type
|
|
231
|
-
type TextColor = DDSTextColor | DDSTextColorCamel | Property.Color;
|
|
225
|
+
type TextColor = DDSTextColor | Property.Color;
|
|
232
226
|
|
|
233
227
|
/**
|
|
234
228
|
* Join class names together.
|
package/dist/index.d.ts
CHANGED
|
@@ -220,15 +220,9 @@ type ButtonProps<I extends SvgIcon = SvgIcon> = BaseComponentProps<HTMLButtonEle
|
|
|
220
220
|
target?: string;
|
|
221
221
|
} & PickedHTMLAttributes$4, ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
222
222
|
|
|
223
|
-
/**
|
|
224
|
-
* Tekstfarger i kebab-case; camelCase blir deprecated, og kebab-case blir standarden for props som refererer til CSS-variabler.
|
|
225
|
-
* TODO: fjerne cameCase på et tidspunkt.
|
|
226
|
-
*/
|
|
227
223
|
declare const TEXT_COLORS: readonly ["text-on-action", "text-on-inverse", "text-on-status-default", "text-on-status-strong", "text-action-resting", "text-action-hover", "text-action-visited", "text-default", "text-requiredfield", "text-subtle", "text-medium", "text-on-notification", "text-on-primary-default", "text-on-primary-medium", "text-on-primary-subtle", "text-on-primary-strong", "text-on-secondary-default", "text-on-secondary-medium", "text-on-secondary-subtle", "text-on-secondary-strong", "text-on-tertiary-default", "text-on-tertiary-medium", "text-on-tertiary-subtle", "text-on-tertiary-strong", "text-on-data-default", "text-on-data-subtle", "icon-on-action", "icon-on-info-default", "icon-on-success-default", "icon-on-danger-default", "icon-on-warning-default", "icon-on-info-strong", "icon-on-success-strong", "icon-on-danger-strong", "icon-on-warning-strong", "icon-on-inverse", "icon-action-resting", "icon-action-hover", "icon-default", "icon-subtle", "icon-medium"];
|
|
228
|
-
declare const TEXT_COLORS_CAMEL: readonly ["textOnAction", "textOnInverse", "textOnStatusDefault", "textOnStatusStrong", "textActionResting", "textActionHover", "textActionVisited", "textDefault", "textRequiredfield", "textSubtle", "textMedium", "textOnNotification", "iconOnAction", "iconOnInfoDefault", "iconOnSuccessDefault", "iconOnDangerDefault", "iconOnWarningDefault", "iconOnInfoStrong", "iconOnSuccessStrong", "iconOnDangerStrong", "iconOnWarningStrong", "iconOnInverse", "iconActionResting", "iconActionHover", "iconDefault", "iconSubtle", "iconMedium"];
|
|
229
224
|
type DDSTextColor = (typeof TEXT_COLORS)[number];
|
|
230
|
-
type
|
|
231
|
-
type TextColor = DDSTextColor | DDSTextColorCamel | Property.Color;
|
|
225
|
+
type TextColor = DDSTextColor | Property.Color;
|
|
232
226
|
|
|
233
227
|
/**
|
|
234
228
|
* Join class names together.
|
package/dist/index.js
CHANGED
|
@@ -600,59 +600,18 @@ var TEXT_COLORS = [
|
|
|
600
600
|
"icon-subtle",
|
|
601
601
|
"icon-medium"
|
|
602
602
|
];
|
|
603
|
-
var
|
|
604
|
-
"textOnAction",
|
|
605
|
-
"textOnInverse",
|
|
606
|
-
"textOnStatusDefault",
|
|
607
|
-
"textOnStatusStrong",
|
|
608
|
-
"textActionResting",
|
|
609
|
-
"textActionHover",
|
|
610
|
-
"textActionVisited",
|
|
611
|
-
"textDefault",
|
|
612
|
-
"textRequiredfield",
|
|
613
|
-
"textSubtle",
|
|
614
|
-
"textMedium",
|
|
615
|
-
"textOnNotification",
|
|
616
|
-
"iconOnAction",
|
|
617
|
-
"iconOnInfoDefault",
|
|
618
|
-
"iconOnSuccessDefault",
|
|
619
|
-
"iconOnDangerDefault",
|
|
620
|
-
"iconOnWarningDefault",
|
|
621
|
-
"iconOnInfoStrong",
|
|
622
|
-
"iconOnSuccessStrong",
|
|
623
|
-
"iconOnDangerStrong",
|
|
624
|
-
"iconOnWarningStrong",
|
|
625
|
-
"iconOnInverse",
|
|
626
|
-
"iconActionResting",
|
|
627
|
-
"iconActionHover",
|
|
628
|
-
"iconDefault",
|
|
629
|
-
"iconSubtle",
|
|
630
|
-
"iconMedium"
|
|
631
|
-
];
|
|
632
|
-
var TEXT_COLOR_VALUES_CAMEL = TEXT_COLORS_CAMEL.reduce(
|
|
633
|
-
(acc, key) => {
|
|
634
|
-
const kebab = key.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
635
|
-
acc[key] = `var(--dds-color-${kebab})`;
|
|
636
|
-
return acc;
|
|
637
|
-
},
|
|
638
|
-
{}
|
|
639
|
-
);
|
|
640
|
-
var TEXT_COLOR_VALUES_KEBAB = TEXT_COLORS.reduce(
|
|
603
|
+
var TEXT_COLOR_VALUES = TEXT_COLORS.reduce(
|
|
641
604
|
(acc, key) => {
|
|
642
605
|
acc[key] = `var(--dds-color-${key})`;
|
|
643
606
|
return acc;
|
|
644
607
|
},
|
|
645
608
|
{}
|
|
646
609
|
);
|
|
647
|
-
var isTextColorCamel = (value) => {
|
|
648
|
-
return typeof value === "string" && TEXT_COLORS_CAMEL.includes(value);
|
|
649
|
-
};
|
|
650
610
|
var isTextColor = (value) => {
|
|
651
611
|
return typeof value === "string" && TEXT_COLORS.includes(value);
|
|
652
612
|
};
|
|
653
613
|
var getTextColor = (color) => {
|
|
654
|
-
if (
|
|
655
|
-
if (isTextColor(color)) return TEXT_COLOR_VALUES_KEBAB[color];
|
|
614
|
+
if (isTextColor(color)) return TEXT_COLOR_VALUES[color];
|
|
656
615
|
return color;
|
|
657
616
|
};
|
|
658
617
|
|
|
@@ -1521,7 +1480,7 @@ var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
|
1521
1480
|
function Spinner(props) {
|
|
1522
1481
|
const {
|
|
1523
1482
|
size: size2 = "var(--dds-size-icon-medium)",
|
|
1524
|
-
color = "
|
|
1483
|
+
color = "icon-action-resting",
|
|
1525
1484
|
tooltip,
|
|
1526
1485
|
id,
|
|
1527
1486
|
className,
|
|
@@ -4467,7 +4426,7 @@ var Button = ({
|
|
|
4467
4426
|
Spinner,
|
|
4468
4427
|
{
|
|
4469
4428
|
size: "var(--dds-size-icon-component)",
|
|
4470
|
-
color: purpose === "primary" || purpose === "danger" ? "
|
|
4429
|
+
color: purpose === "primary" || purpose === "danger" ? "icon-on-action" : "icon-default",
|
|
4471
4430
|
tooltip: spinnerTooltip
|
|
4472
4431
|
}
|
|
4473
4432
|
) })
|
|
@@ -5476,7 +5435,7 @@ var InputMessage = ({
|
|
|
5476
5435
|
{
|
|
5477
5436
|
...tgCommonProps,
|
|
5478
5437
|
typographyType: "bodyShortXsmall",
|
|
5479
|
-
color: "
|
|
5438
|
+
color: "text-subtle"
|
|
5480
5439
|
}
|
|
5481
5440
|
) });
|
|
5482
5441
|
};
|
|
@@ -8032,7 +7991,7 @@ function CharCounter(props) {
|
|
|
8032
7991
|
className: CharCounter_default.container,
|
|
8033
7992
|
as: "div",
|
|
8034
7993
|
typographyType: "bodyShortXsmall",
|
|
8035
|
-
color: "
|
|
7994
|
+
color: "text-subtle",
|
|
8036
7995
|
children: [
|
|
8037
7996
|
/* @__PURE__ */ (0, import_jsx_runtime255.jsxs)("span", { "aria-hidden": true, children: [
|
|
8038
7997
|
current,
|
|
@@ -8188,7 +8147,7 @@ var CommentComponent = ({
|
|
|
8188
8147
|
Icon,
|
|
8189
8148
|
{
|
|
8190
8149
|
icon: rating === "positive" ? ThumbUpFilledIcon : ThumbDownFilledIcon,
|
|
8191
|
-
color: "
|
|
8150
|
+
color: "icon-action-resting",
|
|
8192
8151
|
iconSize: getIconSize(layout)
|
|
8193
8152
|
}
|
|
8194
8153
|
),
|