@norges-domstoler/dds-components 0.0.0-dev-20240222090730 → 0.0.0-dev-20240223112113
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 +86 -83
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +86 -83
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7145,7 +7145,21 @@ function useControllableState(props) {
|
|
|
7145
7145
|
|
|
7146
7146
|
// src/components/FavStar/FavStar.tsx
|
|
7147
7147
|
import { jsx as jsx207, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
7148
|
-
var TRANSITION_SPEED = "0.
|
|
7148
|
+
var TRANSITION_SPEED = "0.2s";
|
|
7149
|
+
var StyledIcon3 = styled45(Icon)`
|
|
7150
|
+
color: currentColor;
|
|
7151
|
+
position: absolute;
|
|
7152
|
+
top: 0;
|
|
7153
|
+
bottom: 0;
|
|
7154
|
+
left: 0;
|
|
7155
|
+
right: 0;
|
|
7156
|
+
opacity: ${({ $opacity = 1 }) => $opacity};
|
|
7157
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
7158
|
+
transition:
|
|
7159
|
+
opacity ${TRANSITION_SPEED},
|
|
7160
|
+
transform ${TRANSITION_SPEED};
|
|
7161
|
+
}
|
|
7162
|
+
`;
|
|
7149
7163
|
var Container5 = styled45.label`
|
|
7150
7164
|
position: relative;
|
|
7151
7165
|
cursor: pointer;
|
|
@@ -7154,16 +7168,14 @@ var Container5 = styled45.label`
|
|
|
7154
7168
|
|
|
7155
7169
|
&:has(${HiddenInput}:focus-visible) {
|
|
7156
7170
|
${focusVisible}
|
|
7157
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
7158
|
-
transition: ${focusVisibleTransitionValue};
|
|
7159
|
-
}
|
|
7160
7171
|
}
|
|
7161
7172
|
|
|
7162
7173
|
@media (prefers-reduced-motion: no-preference) {
|
|
7163
7174
|
transition:
|
|
7164
7175
|
${TRANSITION_SPEED} color,
|
|
7165
7176
|
${TRANSITION_SPEED} background-color,
|
|
7166
|
-
${TRANSITION_SPEED} transform
|
|
7177
|
+
${TRANSITION_SPEED} transform,
|
|
7178
|
+
${focusVisibleTransitionValue};
|
|
7167
7179
|
}
|
|
7168
7180
|
|
|
7169
7181
|
${({ size: size2 }) => getVariantStyle(size2)}
|
|
@@ -7180,7 +7192,9 @@ var Container5 = styled45.label`
|
|
|
7180
7192
|
}
|
|
7181
7193
|
|
|
7182
7194
|
&:active {
|
|
7183
|
-
|
|
7195
|
+
${StyledIcon3} {
|
|
7196
|
+
transform: scale(0.75);
|
|
7197
|
+
}
|
|
7184
7198
|
}
|
|
7185
7199
|
`;
|
|
7186
7200
|
function getVariantStyle(size2, variant) {
|
|
@@ -7190,16 +7204,6 @@ function getVariantStyle(size2, variant) {
|
|
|
7190
7204
|
border-radius: ${favStarTokens(size2, variant).borderRadius};
|
|
7191
7205
|
`;
|
|
7192
7206
|
}
|
|
7193
|
-
var StyledIcon3 = styled45(Icon)`
|
|
7194
|
-
color: currentColor;
|
|
7195
|
-
position: absolute;
|
|
7196
|
-
top: 0;
|
|
7197
|
-
bottom: 0;
|
|
7198
|
-
left: 0;
|
|
7199
|
-
right: 0;
|
|
7200
|
-
transition: ${TRANSITION_SPEED} opacity;
|
|
7201
|
-
opacity: ${({ $opacity = 1 }) => $opacity};
|
|
7202
|
-
`;
|
|
7203
7207
|
var FavStar = forwardRef30(
|
|
7204
7208
|
({
|
|
7205
7209
|
id,
|
|
@@ -10926,12 +10930,27 @@ var itemNumber = {
|
|
|
10926
10930
|
size: "1.75rem",
|
|
10927
10931
|
borderWidth: "2px",
|
|
10928
10932
|
iconSize: "small",
|
|
10929
|
-
|
|
10933
|
+
activeIncomplete: {
|
|
10930
10934
|
borderColor: colors27.DdsColorInteractiveBase,
|
|
10931
10935
|
color: colors27.DdsColorNeutralsWhite,
|
|
10932
|
-
backgroundColor: colors27.DdsColorInteractiveBase
|
|
10936
|
+
backgroundColor: colors27.DdsColorInteractiveBase,
|
|
10937
|
+
hover: {
|
|
10938
|
+
borderColor: colors27.DdsColorInteractiveBase,
|
|
10939
|
+
color: colors27.DdsColorNeutralsWhite,
|
|
10940
|
+
backgroundColor: colors27.DdsColorInteractiveBase
|
|
10941
|
+
}
|
|
10942
|
+
},
|
|
10943
|
+
activeCompleted: {
|
|
10944
|
+
borderColor: colors27.DdsColorInteractiveBase,
|
|
10945
|
+
color: colors27.DdsColorNeutralsWhite,
|
|
10946
|
+
backgroundColor: colors27.DdsColorInteractiveBase,
|
|
10947
|
+
hover: {
|
|
10948
|
+
borderColor: colors27.DdsColorInteractiveDark,
|
|
10949
|
+
color: colors27.DdsColorNeutralsWhite,
|
|
10950
|
+
backgroundColor: colors27.DdsColorInteractiveDark
|
|
10951
|
+
}
|
|
10933
10952
|
},
|
|
10934
|
-
|
|
10953
|
+
inactiveCompleted: {
|
|
10935
10954
|
borderColor: colors27.DdsColorInteractiveBase,
|
|
10936
10955
|
color: colors27.DdsColorNeutralsWhite,
|
|
10937
10956
|
backgroundColor: colors27.DdsColorInteractiveBase,
|
|
@@ -10941,7 +10960,7 @@ var itemNumber = {
|
|
|
10941
10960
|
backgroundColor: colors27.DdsColorInteractiveDark
|
|
10942
10961
|
}
|
|
10943
10962
|
},
|
|
10944
|
-
|
|
10963
|
+
inactiveIncomplete: {
|
|
10945
10964
|
borderColor: colors27.DdsColorInteractiveBase,
|
|
10946
10965
|
color: colors27.DdsColorInteractiveBase,
|
|
10947
10966
|
backgroundColor: colors27.DdsColorNeutralsWhite,
|
|
@@ -10959,20 +10978,41 @@ var itemNumber = {
|
|
|
10959
10978
|
};
|
|
10960
10979
|
var itemText = {
|
|
10961
10980
|
textDecoration: "underline",
|
|
10962
|
-
|
|
10963
|
-
color: colors27.
|
|
10964
|
-
textDecorationColor:
|
|
10981
|
+
activeCompleted: {
|
|
10982
|
+
color: colors27.DdsColorInteractiveBase,
|
|
10983
|
+
textDecorationColor: "transparent",
|
|
10984
|
+
hover: {
|
|
10985
|
+
color: colors27.DdsColorInteractiveBase,
|
|
10986
|
+
textDecorationColor: "transparent"
|
|
10987
|
+
}
|
|
10965
10988
|
},
|
|
10966
|
-
|
|
10967
|
-
color: colors27.
|
|
10989
|
+
activeIncomplete: {
|
|
10990
|
+
color: colors27.DdsColorInteractiveBase,
|
|
10968
10991
|
textDecorationColor: "transparent",
|
|
10969
10992
|
hover: {
|
|
10970
|
-
|
|
10993
|
+
color: colors27.DdsColorInteractiveBase,
|
|
10994
|
+
textDecorationColor: "transparent"
|
|
10995
|
+
}
|
|
10996
|
+
},
|
|
10997
|
+
inactiveIncomplete: {
|
|
10998
|
+
color: colors27.DdsColorNeutralsGray7,
|
|
10999
|
+
textDecorationColor: colors27.DdsColorNeutralsGray7,
|
|
11000
|
+
hover: {
|
|
11001
|
+
color: colors27.DdsColorInteractiveBase,
|
|
11002
|
+
textDecorationColor: colors27.DdsColorInteractiveBase
|
|
11003
|
+
}
|
|
11004
|
+
},
|
|
11005
|
+
inactiveCompleted: {
|
|
11006
|
+
color: colors27.DdsColorNeutralsGray7,
|
|
11007
|
+
textDecorationColor: colors27.DdsColorNeutralsGray7,
|
|
11008
|
+
hover: {
|
|
11009
|
+
color: colors27.DdsColorInteractiveBase,
|
|
11010
|
+
textDecorationColor: colors27.DdsColorInteractiveBase
|
|
10971
11011
|
}
|
|
10972
11012
|
},
|
|
10973
11013
|
disabled: {
|
|
10974
11014
|
color: colors27.DdsColorNeutralsGray6,
|
|
10975
|
-
|
|
11015
|
+
textDecorationColor: "transparent"
|
|
10976
11016
|
}
|
|
10977
11017
|
};
|
|
10978
11018
|
var progressTrackerTokens = {
|
|
@@ -11020,40 +11060,11 @@ var ItemNumber = styled71.div`
|
|
|
11020
11060
|
${getFontStyling(typographyTypes4.number)}
|
|
11021
11061
|
font-weight: 600;
|
|
11022
11062
|
|
|
11023
|
-
${({ $state: state }) =>
|
|
11024
|
-
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
|
|
11028
|
-
color: ${itemNumber2.active.color};
|
|
11029
|
-
background-color: ${itemNumber2.active.backgroundColor};
|
|
11030
|
-
`;
|
|
11031
|
-
case "activeCompleted":
|
|
11032
|
-
return css30`
|
|
11033
|
-
border-color: ${itemNumber2.completed.borderColor};
|
|
11034
|
-
color: ${itemNumber2.completed.color};
|
|
11035
|
-
background-color: ${itemNumber2.completed.backgroundColor};
|
|
11036
|
-
`;
|
|
11037
|
-
case "inactiveCompleted":
|
|
11038
|
-
return css30`
|
|
11039
|
-
border-color: ${itemNumber2.completed.borderColor};
|
|
11040
|
-
color: ${itemNumber2.completed.color};
|
|
11041
|
-
background-color: ${itemNumber2.completed.backgroundColor};
|
|
11042
|
-
`;
|
|
11043
|
-
case "inactiveIncomplete":
|
|
11044
|
-
return css30`
|
|
11045
|
-
border-color: ${itemNumber2.inactive.borderColor};
|
|
11046
|
-
color: ${itemNumber2.inactive.color};
|
|
11047
|
-
background-color: ${itemNumber2.inactive.backgroundColor};
|
|
11048
|
-
`;
|
|
11049
|
-
case "disabled":
|
|
11050
|
-
return css30`
|
|
11051
|
-
border-color: ${itemNumber2.disabled.borderColor};
|
|
11052
|
-
color: ${itemNumber2.disabled.color};
|
|
11053
|
-
background-color: ${itemNumber2.disabled.backgroundColor};
|
|
11054
|
-
`;
|
|
11055
|
-
}
|
|
11056
|
-
}}
|
|
11063
|
+
${({ $state: state }) => state && css30`
|
|
11064
|
+
border-color: ${itemNumber2[state].borderColor};
|
|
11065
|
+
color: ${itemNumber2[state].color};
|
|
11066
|
+
background-color: ${itemNumber2[state].backgroundColor};
|
|
11067
|
+
`}
|
|
11057
11068
|
`;
|
|
11058
11069
|
var ItemText = styled71.div`
|
|
11059
11070
|
${getFontStyling(typographyTypes4.label)}
|
|
@@ -11061,27 +11072,10 @@ var ItemText = styled71.div`
|
|
|
11061
11072
|
text-decoration: ${itemText2.textDecoration};
|
|
11062
11073
|
transition: text-decoration-color 0.2s;
|
|
11063
11074
|
|
|
11064
|
-
${({ $state: state }) =>
|
|
11065
|
-
|
|
11066
|
-
|
|
11067
|
-
|
|
11068
|
-
return css30`
|
|
11069
|
-
color: ${itemText2.active.color};
|
|
11070
|
-
text-decoration-color: ${itemText2.active.textDecorationColor};
|
|
11071
|
-
`;
|
|
11072
|
-
case "inactiveCompleted":
|
|
11073
|
-
case "inactiveIncomplete":
|
|
11074
|
-
return css30`
|
|
11075
|
-
color: ${itemText2.inactive.color};
|
|
11076
|
-
text-decoration-color: ${itemText2.inactive.textDecorationColor};
|
|
11077
|
-
`;
|
|
11078
|
-
case "disabled":
|
|
11079
|
-
return css30`
|
|
11080
|
-
color: ${itemText2.disabled.color};
|
|
11081
|
-
text-decoration: ${itemText2.disabled.textDecoration};
|
|
11082
|
-
`;
|
|
11083
|
-
}
|
|
11084
|
-
}};
|
|
11075
|
+
${({ $state: state }) => state && css30`
|
|
11076
|
+
color: ${itemText2[state].color};
|
|
11077
|
+
text-decoration-color: ${itemText2[state].textDecorationColor};
|
|
11078
|
+
`};
|
|
11085
11079
|
`;
|
|
11086
11080
|
var ItemContentWrapper = styled71.button`
|
|
11087
11081
|
background: none;
|
|
@@ -11096,12 +11090,21 @@ var ItemContentWrapper = styled71.button`
|
|
|
11096
11090
|
gap: ${itemContentWrapper2.gap};
|
|
11097
11091
|
transition: ${focusVisibleTransitionValue};
|
|
11098
11092
|
|
|
11099
|
-
|
|
11093
|
+
&:focus-visible,
|
|
11094
|
+
&.focus-visible {
|
|
11100
11095
|
${focusVisible}
|
|
11101
11096
|
}
|
|
11102
11097
|
|
|
11103
11098
|
${({ $state: state }) => state !== "disabled" && css30`
|
|
11104
11099
|
cursor: pointer;
|
|
11100
|
+
&:hover > ${ItemText} {
|
|
11101
|
+
color: ${itemText2[state].hover.color};
|
|
11102
|
+
text-decoration-color: ${itemText2[state].hover.textDecorationColor};
|
|
11103
|
+
}
|
|
11104
|
+
&:hover > ${ItemNumber} {
|
|
11105
|
+
background-color: ${itemNumber2[state].hover.backgroundColor};
|
|
11106
|
+
border-color: ${itemNumber2[state].hover.borderColor};
|
|
11107
|
+
}
|
|
11105
11108
|
`}
|
|
11106
11109
|
`;
|
|
11107
11110
|
var getVisuallyHiddenText = (active, completed, index) => `${index + 1}, ${active ? "" : "Trinn, "}${completed ? "Ferdig, " : "Ikke ferdig, "}`;
|