@norges-domstoler/dds-components 0.0.0-dev-20240222090730 → 0.0.0-dev-20240223095453

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 CHANGED
@@ -11127,12 +11127,17 @@ var itemNumber = {
11127
11127
  size: "1.75rem",
11128
11128
  borderWidth: "2px",
11129
11129
  iconSize: "small",
11130
- active: {
11130
+ activeIncomplete: {
11131
11131
  borderColor: colors27.DdsColorInteractiveBase,
11132
11132
  color: colors27.DdsColorNeutralsWhite,
11133
- backgroundColor: colors27.DdsColorInteractiveBase
11133
+ backgroundColor: colors27.DdsColorInteractiveBase,
11134
+ hover: {
11135
+ borderColor: colors27.DdsColorInteractiveBase,
11136
+ color: colors27.DdsColorNeutralsWhite,
11137
+ backgroundColor: colors27.DdsColorInteractiveBase
11138
+ }
11134
11139
  },
11135
- completed: {
11140
+ activeCompleted: {
11136
11141
  borderColor: colors27.DdsColorInteractiveBase,
11137
11142
  color: colors27.DdsColorNeutralsWhite,
11138
11143
  backgroundColor: colors27.DdsColorInteractiveBase,
@@ -11142,7 +11147,17 @@ var itemNumber = {
11142
11147
  backgroundColor: colors27.DdsColorInteractiveDark
11143
11148
  }
11144
11149
  },
11145
- inactive: {
11150
+ inactiveCompleted: {
11151
+ borderColor: colors27.DdsColorInteractiveBase,
11152
+ color: colors27.DdsColorNeutralsWhite,
11153
+ backgroundColor: colors27.DdsColorInteractiveBase,
11154
+ hover: {
11155
+ borderColor: colors27.DdsColorInteractiveDark,
11156
+ color: colors27.DdsColorNeutralsWhite,
11157
+ backgroundColor: colors27.DdsColorInteractiveDark
11158
+ }
11159
+ },
11160
+ inactiveIncomplete: {
11146
11161
  borderColor: colors27.DdsColorInteractiveBase,
11147
11162
  color: colors27.DdsColorInteractiveBase,
11148
11163
  backgroundColor: colors27.DdsColorNeutralsWhite,
@@ -11160,20 +11175,41 @@ var itemNumber = {
11160
11175
  };
11161
11176
  var itemText = {
11162
11177
  textDecoration: "underline",
11163
- active: {
11164
- color: colors27.DdsColorNeutralsGray9,
11165
- textDecorationColor: colors27.DdsColorNeutralsGray9
11178
+ activeCompleted: {
11179
+ color: colors27.DdsColorInteractiveBase,
11180
+ textDecorationColor: "transparent",
11181
+ hover: {
11182
+ color: colors27.DdsColorInteractiveBase,
11183
+ textDecorationColor: "transparent"
11184
+ }
11166
11185
  },
11167
- inactive: {
11168
- color: colors27.DdsColorNeutralsGray7,
11186
+ activeIncomplete: {
11187
+ color: colors27.DdsColorInteractiveBase,
11169
11188
  textDecorationColor: "transparent",
11170
11189
  hover: {
11171
- textDecorationColor: colors27.DdsColorNeutralsGray7
11190
+ color: colors27.DdsColorInteractiveBase,
11191
+ textDecorationColor: "transparent"
11192
+ }
11193
+ },
11194
+ inactiveIncomplete: {
11195
+ color: colors27.DdsColorNeutralsGray7,
11196
+ textDecorationColor: colors27.DdsColorNeutralsGray7,
11197
+ hover: {
11198
+ color: colors27.DdsColorInteractiveBase,
11199
+ textDecorationColor: colors27.DdsColorInteractiveBase
11200
+ }
11201
+ },
11202
+ inactiveCompleted: {
11203
+ color: colors27.DdsColorNeutralsGray7,
11204
+ textDecorationColor: colors27.DdsColorNeutralsGray7,
11205
+ hover: {
11206
+ color: colors27.DdsColorInteractiveBase,
11207
+ textDecorationColor: colors27.DdsColorInteractiveBase
11172
11208
  }
11173
11209
  },
11174
11210
  disabled: {
11175
11211
  color: colors27.DdsColorNeutralsGray6,
11176
- textDecoration: "none"
11212
+ textDecorationColor: "transparent"
11177
11213
  }
11178
11214
  };
11179
11215
  var progressTrackerTokens = {
@@ -11221,40 +11257,11 @@ var ItemNumber = import_styled_components73.default.div`
11221
11257
  ${getFontStyling(typographyTypes4.number)}
11222
11258
  font-weight: 600;
11223
11259
 
11224
- ${({ $state: state }) => {
11225
- switch (state) {
11226
- case "activeIncomplete":
11227
- return import_styled_components73.css`
11228
- border-color: ${itemNumber2.active.borderColor};
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
- }}
11260
+ ${({ $state: state }) => state && import_styled_components73.css`
11261
+ border-color: ${itemNumber2[state].borderColor};
11262
+ color: ${itemNumber2[state].color};
11263
+ background-color: ${itemNumber2[state].backgroundColor};
11264
+ `}
11258
11265
  `;
11259
11266
  var ItemText = import_styled_components73.default.div`
11260
11267
  ${getFontStyling(typographyTypes4.label)}
@@ -11262,27 +11269,10 @@ var ItemText = import_styled_components73.default.div`
11262
11269
  text-decoration: ${itemText2.textDecoration};
11263
11270
  transition: text-decoration-color 0.2s;
11264
11271
 
11265
- ${({ $state: state }) => {
11266
- switch (state) {
11267
- case "activeCompleted":
11268
- case "activeIncomplete":
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
- }};
11272
+ ${({ $state: state }) => state && import_styled_components73.css`
11273
+ color: ${itemText2[state].color};
11274
+ text-decoration-color: ${itemText2[state].textDecorationColor};
11275
+ `};
11286
11276
  `;
11287
11277
  var ItemContentWrapper = import_styled_components73.default.button`
11288
11278
  background: none;
@@ -11297,12 +11287,21 @@ var ItemContentWrapper = import_styled_components73.default.button`
11297
11287
  gap: ${itemContentWrapper2.gap};
11298
11288
  transition: ${focusVisibleTransitionValue};
11299
11289
 
11300
- :focus-visible {
11290
+ &:focus-visible,
11291
+ &.focus-visible {
11301
11292
  ${focusVisible}
11302
11293
  }
11303
11294
 
11304
11295
  ${({ $state: state }) => state !== "disabled" && import_styled_components73.css`
11305
11296
  cursor: pointer;
11297
+ &:hover > ${ItemText} {
11298
+ color: ${itemText2[state].hover.color};
11299
+ text-decoration-color: ${itemText2[state].hover.textDecorationColor};
11300
+ }
11301
+ &:hover > ${ItemNumber} {
11302
+ background-color: ${itemNumber2[state].hover.backgroundColor};
11303
+ border-color: ${itemNumber2[state].hover.borderColor};
11304
+ }
11306
11305
  `}
11307
11306
  `;
11308
11307
  var getVisuallyHiddenText = (active, completed, index) => `${index + 1}, ${active ? "" : "Trinn, "}${completed ? "Ferdig, " : "Ikke ferdig, "}`;