@norges-domstoler/dds-components 0.0.0-dev-20240402105918 → 0.0.0-dev-20240404104453
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 +30 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3920,6 +3920,26 @@ var getAppearanceAndPurposeStyling = (appearance, purpose) => {
|
|
|
3920
3920
|
return import_styled_components15.css`
|
|
3921
3921
|
background-color: ${appearances2[appearance].purpose[purpose].base.backgroundColor};
|
|
3922
3922
|
border-color: ${appearances2[appearance].purpose[purpose].base.borderColor};
|
|
3923
|
+
`;
|
|
3924
|
+
case "ghost":
|
|
3925
|
+
return import_styled_components15.css`
|
|
3926
|
+
background-color: ${appearances2.ghost.base.backgroundColor};
|
|
3927
|
+
border-color: ${appearances2.ghost.purpose[purpose].base.borderColor};
|
|
3928
|
+
`;
|
|
3929
|
+
case "borderless":
|
|
3930
|
+
return import_styled_components15.css`
|
|
3931
|
+
background-color: ${appearances2.borderless.base.backgroundColor};
|
|
3932
|
+
border-color: ${appearances2.borderless.base.borderColor};
|
|
3933
|
+
text-decoration: ${appearances2.borderless.base.textDecoration};
|
|
3934
|
+
text-decoration-color: ${appearances2.borderless.base.textDecorationColor};
|
|
3935
|
+
`;
|
|
3936
|
+
}
|
|
3937
|
+
};
|
|
3938
|
+
var getAppearanceAndPurposeStateStyling = (appearance, purpose) => {
|
|
3939
|
+
switch (appearance) {
|
|
3940
|
+
case "filled":
|
|
3941
|
+
case "rounded":
|
|
3942
|
+
return import_styled_components15.css`
|
|
3923
3943
|
&:hover {
|
|
3924
3944
|
background-color: ${appearances2[appearance].purpose[purpose].hover.backgroundColor};
|
|
3925
3945
|
border-color: ${appearances2[appearance].purpose[purpose].hover.borderColor};
|
|
@@ -3931,8 +3951,6 @@ var getAppearanceAndPurposeStyling = (appearance, purpose) => {
|
|
|
3931
3951
|
`;
|
|
3932
3952
|
case "ghost":
|
|
3933
3953
|
return import_styled_components15.css`
|
|
3934
|
-
background-color: ${appearances2.ghost.base.backgroundColor};
|
|
3935
|
-
border-color: ${appearances2.ghost.purpose[purpose].base.borderColor};
|
|
3936
3954
|
&:hover {
|
|
3937
3955
|
color: ${appearances2.ghost.purpose[purpose].hover.color};
|
|
3938
3956
|
border-color: ${appearances2.ghost.purpose[purpose].hover.borderColor};
|
|
@@ -3946,10 +3964,6 @@ var getAppearanceAndPurposeStyling = (appearance, purpose) => {
|
|
|
3946
3964
|
`;
|
|
3947
3965
|
case "borderless":
|
|
3948
3966
|
return import_styled_components15.css`
|
|
3949
|
-
background-color: ${appearances2.borderless.base.backgroundColor};
|
|
3950
|
-
border-color: ${appearances2.borderless.base.borderColor};
|
|
3951
|
-
text-decoration: ${appearances2.borderless.base.textDecoration};
|
|
3952
|
-
text-decoration-color: ${appearances2.borderless.base.textDecorationColor};
|
|
3953
3967
|
&:hover {
|
|
3954
3968
|
color: ${appearances2.borderless.purpose[purpose].hover.color};
|
|
3955
3969
|
text-decoration-color: ${appearances2.borderless.purpose[purpose].hover.textDecorationColor};
|
|
@@ -4004,8 +4018,9 @@ var ButtonWrapper = import_styled_components15.default.button.withConfig({
|
|
|
4004
4018
|
color: ${appearances2[appearance].purpose[purpose].base.color};
|
|
4005
4019
|
${getAppearanceAndPurposeStyling(appearance, purpose)}
|
|
4006
4020
|
`}
|
|
4021
|
+
${({ appearance, purpose, isLoading }) => !isLoading && getAppearanceAndPurposeStateStyling(appearance, purpose)}
|
|
4007
4022
|
|
|
4008
|
-
${({ hasIcon, hasLabel, appearance, purpose }) => hasIcon && !hasLabel && appearance === "borderless" && import_styled_components15.css`
|
|
4023
|
+
${({ hasIcon, hasLabel, appearance, purpose, isLoading }) => hasIcon && !hasLabel && !isLoading && appearance === "borderless" && import_styled_components15.css`
|
|
4009
4024
|
&:hover {
|
|
4010
4025
|
border-color: ${appearances2[appearance].purpose[purpose].icon.hover.borderColor};
|
|
4011
4026
|
box-shadow: ${appearances2[appearance].purpose[purpose].icon.hover.boxShadow};
|
|
@@ -4015,7 +4030,7 @@ var ButtonWrapper = import_styled_components15.default.button.withConfig({
|
|
|
4015
4030
|
box-shadow: ${appearances2[appearance].purpose[purpose].icon.active.boxShadow};
|
|
4016
4031
|
}
|
|
4017
4032
|
`}
|
|
4018
|
-
|
|
4033
|
+
${({ hasIcon, hasLabel, size: size2 }) => hasIcon && hasLabel && import_styled_components15.css`
|
|
4019
4034
|
gap: ${sizes2[size2].textAndIcon.gap};
|
|
4020
4035
|
`}
|
|
4021
4036
|
|
|
@@ -12373,7 +12388,7 @@ var Container13 = import_styled_components81.default.label`
|
|
|
12373
12388
|
}
|
|
12374
12389
|
}
|
|
12375
12390
|
|
|
12376
|
-
|
|
12391
|
+
input:enabled:focus-visible ~ ${CustomSelectionControl} {
|
|
12377
12392
|
${focusVisible}
|
|
12378
12393
|
@media (prefers-reduced-motion: no-preference) {
|
|
12379
12394
|
transition: ${focusVisibleTransitionValue};
|
|
@@ -12405,17 +12420,19 @@ var Container13 = import_styled_components81.default.label`
|
|
|
12405
12420
|
}
|
|
12406
12421
|
|
|
12407
12422
|
${({ $error }) => $error && import_styled_components81.css`
|
|
12408
|
-
&:hover
|
|
12423
|
+
&:hover
|
|
12424
|
+
input:enabled:not(:focus-visible):not(:checked)
|
|
12425
|
+
~ ${CustomSelectionControl} {
|
|
12409
12426
|
background-color: ${selectionControl2.hover.danger.backgroundColor};
|
|
12410
12427
|
box-shadow: ${selectionControl2.hover.danger.boxShadow};
|
|
12411
12428
|
border-color: ${selectionControl2.hover.danger.borderColor};
|
|
12412
12429
|
}
|
|
12413
|
-
input
|
|
12430
|
+
input:not(:focus-visible)
|
|
12414
12431
|
~ ${CustomSelectionControl},
|
|
12415
|
-
input:checked:enabled
|
|
12432
|
+
input:checked:enabled:not(:focus-visible)
|
|
12416
12433
|
~ ${CustomSelectionControl},
|
|
12417
12434
|
&:hover
|
|
12418
|
-
input:checked:enabled
|
|
12435
|
+
input:checked:enabled:not(:focus-visible)
|
|
12419
12436
|
~ ${CustomSelectionControl} {
|
|
12420
12437
|
box-shadow: ${selectionControl2.danger.boxShadow};
|
|
12421
12438
|
border-color: ${selectionControl2.danger.borderColor};
|