@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.js
CHANGED
|
@@ -7392,7 +7392,21 @@ function useControllableState(props) {
|
|
|
7392
7392
|
|
|
7393
7393
|
// src/components/FavStar/FavStar.tsx
|
|
7394
7394
|
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
7395
|
-
var TRANSITION_SPEED = "0.
|
|
7395
|
+
var TRANSITION_SPEED = "0.2s";
|
|
7396
|
+
var StyledIcon3 = (0, import_styled_components47.default)(Icon)`
|
|
7397
|
+
color: currentColor;
|
|
7398
|
+
position: absolute;
|
|
7399
|
+
top: 0;
|
|
7400
|
+
bottom: 0;
|
|
7401
|
+
left: 0;
|
|
7402
|
+
right: 0;
|
|
7403
|
+
opacity: ${({ $opacity = 1 }) => $opacity};
|
|
7404
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
7405
|
+
transition:
|
|
7406
|
+
opacity ${TRANSITION_SPEED},
|
|
7407
|
+
transform ${TRANSITION_SPEED};
|
|
7408
|
+
}
|
|
7409
|
+
`;
|
|
7396
7410
|
var Container5 = import_styled_components47.default.label`
|
|
7397
7411
|
position: relative;
|
|
7398
7412
|
cursor: pointer;
|
|
@@ -7401,16 +7415,14 @@ var Container5 = import_styled_components47.default.label`
|
|
|
7401
7415
|
|
|
7402
7416
|
&:has(${HiddenInput}:focus-visible) {
|
|
7403
7417
|
${focusVisible}
|
|
7404
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
7405
|
-
transition: ${focusVisibleTransitionValue};
|
|
7406
|
-
}
|
|
7407
7418
|
}
|
|
7408
7419
|
|
|
7409
7420
|
@media (prefers-reduced-motion: no-preference) {
|
|
7410
7421
|
transition:
|
|
7411
7422
|
${TRANSITION_SPEED} color,
|
|
7412
7423
|
${TRANSITION_SPEED} background-color,
|
|
7413
|
-
${TRANSITION_SPEED} transform
|
|
7424
|
+
${TRANSITION_SPEED} transform,
|
|
7425
|
+
${focusVisibleTransitionValue};
|
|
7414
7426
|
}
|
|
7415
7427
|
|
|
7416
7428
|
${({ size: size2 }) => getVariantStyle(size2)}
|
|
@@ -7427,7 +7439,9 @@ var Container5 = import_styled_components47.default.label`
|
|
|
7427
7439
|
}
|
|
7428
7440
|
|
|
7429
7441
|
&:active {
|
|
7430
|
-
|
|
7442
|
+
${StyledIcon3} {
|
|
7443
|
+
transform: scale(0.75);
|
|
7444
|
+
}
|
|
7431
7445
|
}
|
|
7432
7446
|
`;
|
|
7433
7447
|
function getVariantStyle(size2, variant) {
|
|
@@ -7437,16 +7451,6 @@ function getVariantStyle(size2, variant) {
|
|
|
7437
7451
|
border-radius: ${favStarTokens(size2, variant).borderRadius};
|
|
7438
7452
|
`;
|
|
7439
7453
|
}
|
|
7440
|
-
var StyledIcon3 = (0, import_styled_components47.default)(Icon)`
|
|
7441
|
-
color: currentColor;
|
|
7442
|
-
position: absolute;
|
|
7443
|
-
top: 0;
|
|
7444
|
-
bottom: 0;
|
|
7445
|
-
left: 0;
|
|
7446
|
-
right: 0;
|
|
7447
|
-
transition: ${TRANSITION_SPEED} opacity;
|
|
7448
|
-
opacity: ${({ $opacity = 1 }) => $opacity};
|
|
7449
|
-
`;
|
|
7450
7454
|
var FavStar = (0, import_react55.forwardRef)(
|
|
7451
7455
|
({
|
|
7452
7456
|
id,
|
|
@@ -11127,12 +11131,27 @@ var itemNumber = {
|
|
|
11127
11131
|
size: "1.75rem",
|
|
11128
11132
|
borderWidth: "2px",
|
|
11129
11133
|
iconSize: "small",
|
|
11130
|
-
|
|
11134
|
+
activeIncomplete: {
|
|
11131
11135
|
borderColor: colors27.DdsColorInteractiveBase,
|
|
11132
11136
|
color: colors27.DdsColorNeutralsWhite,
|
|
11133
|
-
backgroundColor: colors27.DdsColorInteractiveBase
|
|
11137
|
+
backgroundColor: colors27.DdsColorInteractiveBase,
|
|
11138
|
+
hover: {
|
|
11139
|
+
borderColor: colors27.DdsColorInteractiveBase,
|
|
11140
|
+
color: colors27.DdsColorNeutralsWhite,
|
|
11141
|
+
backgroundColor: colors27.DdsColorInteractiveBase
|
|
11142
|
+
}
|
|
11143
|
+
},
|
|
11144
|
+
activeCompleted: {
|
|
11145
|
+
borderColor: colors27.DdsColorInteractiveBase,
|
|
11146
|
+
color: colors27.DdsColorNeutralsWhite,
|
|
11147
|
+
backgroundColor: colors27.DdsColorInteractiveBase,
|
|
11148
|
+
hover: {
|
|
11149
|
+
borderColor: colors27.DdsColorInteractiveDark,
|
|
11150
|
+
color: colors27.DdsColorNeutralsWhite,
|
|
11151
|
+
backgroundColor: colors27.DdsColorInteractiveDark
|
|
11152
|
+
}
|
|
11134
11153
|
},
|
|
11135
|
-
|
|
11154
|
+
inactiveCompleted: {
|
|
11136
11155
|
borderColor: colors27.DdsColorInteractiveBase,
|
|
11137
11156
|
color: colors27.DdsColorNeutralsWhite,
|
|
11138
11157
|
backgroundColor: colors27.DdsColorInteractiveBase,
|
|
@@ -11142,7 +11161,7 @@ var itemNumber = {
|
|
|
11142
11161
|
backgroundColor: colors27.DdsColorInteractiveDark
|
|
11143
11162
|
}
|
|
11144
11163
|
},
|
|
11145
|
-
|
|
11164
|
+
inactiveIncomplete: {
|
|
11146
11165
|
borderColor: colors27.DdsColorInteractiveBase,
|
|
11147
11166
|
color: colors27.DdsColorInteractiveBase,
|
|
11148
11167
|
backgroundColor: colors27.DdsColorNeutralsWhite,
|
|
@@ -11160,20 +11179,41 @@ var itemNumber = {
|
|
|
11160
11179
|
};
|
|
11161
11180
|
var itemText = {
|
|
11162
11181
|
textDecoration: "underline",
|
|
11163
|
-
|
|
11164
|
-
color: colors27.
|
|
11165
|
-
textDecorationColor:
|
|
11182
|
+
activeCompleted: {
|
|
11183
|
+
color: colors27.DdsColorInteractiveBase,
|
|
11184
|
+
textDecorationColor: "transparent",
|
|
11185
|
+
hover: {
|
|
11186
|
+
color: colors27.DdsColorInteractiveBase,
|
|
11187
|
+
textDecorationColor: "transparent"
|
|
11188
|
+
}
|
|
11166
11189
|
},
|
|
11167
|
-
|
|
11168
|
-
color: colors27.
|
|
11190
|
+
activeIncomplete: {
|
|
11191
|
+
color: colors27.DdsColorInteractiveBase,
|
|
11169
11192
|
textDecorationColor: "transparent",
|
|
11170
11193
|
hover: {
|
|
11171
|
-
|
|
11194
|
+
color: colors27.DdsColorInteractiveBase,
|
|
11195
|
+
textDecorationColor: "transparent"
|
|
11196
|
+
}
|
|
11197
|
+
},
|
|
11198
|
+
inactiveIncomplete: {
|
|
11199
|
+
color: colors27.DdsColorNeutralsGray7,
|
|
11200
|
+
textDecorationColor: colors27.DdsColorNeutralsGray7,
|
|
11201
|
+
hover: {
|
|
11202
|
+
color: colors27.DdsColorInteractiveBase,
|
|
11203
|
+
textDecorationColor: colors27.DdsColorInteractiveBase
|
|
11204
|
+
}
|
|
11205
|
+
},
|
|
11206
|
+
inactiveCompleted: {
|
|
11207
|
+
color: colors27.DdsColorNeutralsGray7,
|
|
11208
|
+
textDecorationColor: colors27.DdsColorNeutralsGray7,
|
|
11209
|
+
hover: {
|
|
11210
|
+
color: colors27.DdsColorInteractiveBase,
|
|
11211
|
+
textDecorationColor: colors27.DdsColorInteractiveBase
|
|
11172
11212
|
}
|
|
11173
11213
|
},
|
|
11174
11214
|
disabled: {
|
|
11175
11215
|
color: colors27.DdsColorNeutralsGray6,
|
|
11176
|
-
|
|
11216
|
+
textDecorationColor: "transparent"
|
|
11177
11217
|
}
|
|
11178
11218
|
};
|
|
11179
11219
|
var progressTrackerTokens = {
|
|
@@ -11221,40 +11261,11 @@ var ItemNumber = import_styled_components73.default.div`
|
|
|
11221
11261
|
${getFontStyling(typographyTypes4.number)}
|
|
11222
11262
|
font-weight: 600;
|
|
11223
11263
|
|
|
11224
|
-
${({ $state: state }) =>
|
|
11225
|
-
|
|
11226
|
-
|
|
11227
|
-
|
|
11228
|
-
|
|
11229
|
-
color: ${itemNumber2.active.color};
|
|
11230
|
-
background-color: ${itemNumber2.active.backgroundColor};
|
|
11231
|
-
`;
|
|
11232
|
-
case "activeCompleted":
|
|
11233
|
-
return import_styled_components73.css`
|
|
11234
|
-
border-color: ${itemNumber2.completed.borderColor};
|
|
11235
|
-
color: ${itemNumber2.completed.color};
|
|
11236
|
-
background-color: ${itemNumber2.completed.backgroundColor};
|
|
11237
|
-
`;
|
|
11238
|
-
case "inactiveCompleted":
|
|
11239
|
-
return import_styled_components73.css`
|
|
11240
|
-
border-color: ${itemNumber2.completed.borderColor};
|
|
11241
|
-
color: ${itemNumber2.completed.color};
|
|
11242
|
-
background-color: ${itemNumber2.completed.backgroundColor};
|
|
11243
|
-
`;
|
|
11244
|
-
case "inactiveIncomplete":
|
|
11245
|
-
return import_styled_components73.css`
|
|
11246
|
-
border-color: ${itemNumber2.inactive.borderColor};
|
|
11247
|
-
color: ${itemNumber2.inactive.color};
|
|
11248
|
-
background-color: ${itemNumber2.inactive.backgroundColor};
|
|
11249
|
-
`;
|
|
11250
|
-
case "disabled":
|
|
11251
|
-
return import_styled_components73.css`
|
|
11252
|
-
border-color: ${itemNumber2.disabled.borderColor};
|
|
11253
|
-
color: ${itemNumber2.disabled.color};
|
|
11254
|
-
background-color: ${itemNumber2.disabled.backgroundColor};
|
|
11255
|
-
`;
|
|
11256
|
-
}
|
|
11257
|
-
}}
|
|
11264
|
+
${({ $state: state }) => state && import_styled_components73.css`
|
|
11265
|
+
border-color: ${itemNumber2[state].borderColor};
|
|
11266
|
+
color: ${itemNumber2[state].color};
|
|
11267
|
+
background-color: ${itemNumber2[state].backgroundColor};
|
|
11268
|
+
`}
|
|
11258
11269
|
`;
|
|
11259
11270
|
var ItemText = import_styled_components73.default.div`
|
|
11260
11271
|
${getFontStyling(typographyTypes4.label)}
|
|
@@ -11262,27 +11273,10 @@ var ItemText = import_styled_components73.default.div`
|
|
|
11262
11273
|
text-decoration: ${itemText2.textDecoration};
|
|
11263
11274
|
transition: text-decoration-color 0.2s;
|
|
11264
11275
|
|
|
11265
|
-
${({ $state: state }) =>
|
|
11266
|
-
|
|
11267
|
-
|
|
11268
|
-
|
|
11269
|
-
return import_styled_components73.css`
|
|
11270
|
-
color: ${itemText2.active.color};
|
|
11271
|
-
text-decoration-color: ${itemText2.active.textDecorationColor};
|
|
11272
|
-
`;
|
|
11273
|
-
case "inactiveCompleted":
|
|
11274
|
-
case "inactiveIncomplete":
|
|
11275
|
-
return import_styled_components73.css`
|
|
11276
|
-
color: ${itemText2.inactive.color};
|
|
11277
|
-
text-decoration-color: ${itemText2.inactive.textDecorationColor};
|
|
11278
|
-
`;
|
|
11279
|
-
case "disabled":
|
|
11280
|
-
return import_styled_components73.css`
|
|
11281
|
-
color: ${itemText2.disabled.color};
|
|
11282
|
-
text-decoration: ${itemText2.disabled.textDecoration};
|
|
11283
|
-
`;
|
|
11284
|
-
}
|
|
11285
|
-
}};
|
|
11276
|
+
${({ $state: state }) => state && import_styled_components73.css`
|
|
11277
|
+
color: ${itemText2[state].color};
|
|
11278
|
+
text-decoration-color: ${itemText2[state].textDecorationColor};
|
|
11279
|
+
`};
|
|
11286
11280
|
`;
|
|
11287
11281
|
var ItemContentWrapper = import_styled_components73.default.button`
|
|
11288
11282
|
background: none;
|
|
@@ -11297,12 +11291,21 @@ var ItemContentWrapper = import_styled_components73.default.button`
|
|
|
11297
11291
|
gap: ${itemContentWrapper2.gap};
|
|
11298
11292
|
transition: ${focusVisibleTransitionValue};
|
|
11299
11293
|
|
|
11300
|
-
|
|
11294
|
+
&:focus-visible,
|
|
11295
|
+
&.focus-visible {
|
|
11301
11296
|
${focusVisible}
|
|
11302
11297
|
}
|
|
11303
11298
|
|
|
11304
11299
|
${({ $state: state }) => state !== "disabled" && import_styled_components73.css`
|
|
11305
11300
|
cursor: pointer;
|
|
11301
|
+
&:hover > ${ItemText} {
|
|
11302
|
+
color: ${itemText2[state].hover.color};
|
|
11303
|
+
text-decoration-color: ${itemText2[state].hover.textDecorationColor};
|
|
11304
|
+
}
|
|
11305
|
+
&:hover > ${ItemNumber} {
|
|
11306
|
+
background-color: ${itemNumber2[state].hover.backgroundColor};
|
|
11307
|
+
border-color: ${itemNumber2[state].hover.borderColor};
|
|
11308
|
+
}
|
|
11306
11309
|
`}
|
|
11307
11310
|
`;
|
|
11308
11311
|
var getVisuallyHiddenText = (active, completed, index) => `${index + 1}, ${active ? "" : "Trinn, "}${completed ? "Ferdig, " : "Ikke ferdig, "}`;
|