@norges-domstoler/dds-components 0.0.0-dev-20240402105918 → 0.0.0-dev-20240404072551
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 +23 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3594,6 +3594,26 @@ var getAppearanceAndPurposeStyling = (appearance, purpose) => {
|
|
|
3594
3594
|
return css6`
|
|
3595
3595
|
background-color: ${appearances2[appearance].purpose[purpose].base.backgroundColor};
|
|
3596
3596
|
border-color: ${appearances2[appearance].purpose[purpose].base.borderColor};
|
|
3597
|
+
`;
|
|
3598
|
+
case "ghost":
|
|
3599
|
+
return css6`
|
|
3600
|
+
background-color: ${appearances2.ghost.base.backgroundColor};
|
|
3601
|
+
border-color: ${appearances2.ghost.purpose[purpose].base.borderColor};
|
|
3602
|
+
`;
|
|
3603
|
+
case "borderless":
|
|
3604
|
+
return css6`
|
|
3605
|
+
background-color: ${appearances2.borderless.base.backgroundColor};
|
|
3606
|
+
border-color: ${appearances2.borderless.base.borderColor};
|
|
3607
|
+
text-decoration: ${appearances2.borderless.base.textDecoration};
|
|
3608
|
+
text-decoration-color: ${appearances2.borderless.base.textDecorationColor};
|
|
3609
|
+
`;
|
|
3610
|
+
}
|
|
3611
|
+
};
|
|
3612
|
+
var getAppearanceAndPurposeStateStyling = (appearance, purpose) => {
|
|
3613
|
+
switch (appearance) {
|
|
3614
|
+
case "filled":
|
|
3615
|
+
case "rounded":
|
|
3616
|
+
return css6`
|
|
3597
3617
|
&:hover {
|
|
3598
3618
|
background-color: ${appearances2[appearance].purpose[purpose].hover.backgroundColor};
|
|
3599
3619
|
border-color: ${appearances2[appearance].purpose[purpose].hover.borderColor};
|
|
@@ -3605,8 +3625,6 @@ var getAppearanceAndPurposeStyling = (appearance, purpose) => {
|
|
|
3605
3625
|
`;
|
|
3606
3626
|
case "ghost":
|
|
3607
3627
|
return css6`
|
|
3608
|
-
background-color: ${appearances2.ghost.base.backgroundColor};
|
|
3609
|
-
border-color: ${appearances2.ghost.purpose[purpose].base.borderColor};
|
|
3610
3628
|
&:hover {
|
|
3611
3629
|
color: ${appearances2.ghost.purpose[purpose].hover.color};
|
|
3612
3630
|
border-color: ${appearances2.ghost.purpose[purpose].hover.borderColor};
|
|
@@ -3620,10 +3638,6 @@ var getAppearanceAndPurposeStyling = (appearance, purpose) => {
|
|
|
3620
3638
|
`;
|
|
3621
3639
|
case "borderless":
|
|
3622
3640
|
return css6`
|
|
3623
|
-
background-color: ${appearances2.borderless.base.backgroundColor};
|
|
3624
|
-
border-color: ${appearances2.borderless.base.borderColor};
|
|
3625
|
-
text-decoration: ${appearances2.borderless.base.textDecoration};
|
|
3626
|
-
text-decoration-color: ${appearances2.borderless.base.textDecorationColor};
|
|
3627
3641
|
&:hover {
|
|
3628
3642
|
color: ${appearances2.borderless.purpose[purpose].hover.color};
|
|
3629
3643
|
text-decoration-color: ${appearances2.borderless.purpose[purpose].hover.textDecorationColor};
|
|
@@ -3678,8 +3692,9 @@ var ButtonWrapper = styled13.button.withConfig({
|
|
|
3678
3692
|
color: ${appearances2[appearance].purpose[purpose].base.color};
|
|
3679
3693
|
${getAppearanceAndPurposeStyling(appearance, purpose)}
|
|
3680
3694
|
`}
|
|
3695
|
+
${({ appearance, purpose, isLoading }) => !isLoading && getAppearanceAndPurposeStateStyling(appearance, purpose)}
|
|
3681
3696
|
|
|
3682
|
-
${({ hasIcon, hasLabel, appearance, purpose }) => hasIcon && !hasLabel && appearance === "borderless" && css6`
|
|
3697
|
+
${({ hasIcon, hasLabel, appearance, purpose, isLoading }) => hasIcon && !hasLabel && !isLoading && appearance === "borderless" && css6`
|
|
3683
3698
|
&:hover {
|
|
3684
3699
|
border-color: ${appearances2[appearance].purpose[purpose].icon.hover.borderColor};
|
|
3685
3700
|
box-shadow: ${appearances2[appearance].purpose[purpose].icon.hover.boxShadow};
|
|
@@ -3689,7 +3704,7 @@ var ButtonWrapper = styled13.button.withConfig({
|
|
|
3689
3704
|
box-shadow: ${appearances2[appearance].purpose[purpose].icon.active.boxShadow};
|
|
3690
3705
|
}
|
|
3691
3706
|
`}
|
|
3692
|
-
|
|
3707
|
+
${({ hasIcon, hasLabel, size: size2 }) => hasIcon && hasLabel && css6`
|
|
3693
3708
|
gap: ${sizes2[size2].textAndIcon.gap};
|
|
3694
3709
|
`}
|
|
3695
3710
|
|