@norges-domstoler/dds-components 0.0.0-dev-20240220131547 → 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.d.mts CHANGED
@@ -3030,6 +3030,10 @@ type TagProps = BaseComponentPropsWithChildren<HTMLSpanElement, {
3030
3030
  * Formål med status eller kategorisering. Påvirker styling.
3031
3031
  * */
3032
3032
  purpose?: TagPurpose;
3033
+ /**
3034
+ * Variant med sterkere visuelt uttrykk. Hver `purpose` har en sterk variant.
3035
+ */
3036
+ strong?: boolean;
3033
3037
  /**
3034
3038
  * Om `<Tag>` skal ha et ikon til venstre for teksten. Tags med `purpose="default"` har aldri ikon.
3035
3039
  * @default false
@@ -3049,6 +3053,10 @@ declare const Tag: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes<HTM
3049
3053
  * Formål med status eller kategorisering. Påvirker styling.
3050
3054
  * */
3051
3055
  purpose?: TagPurpose | undefined;
3056
+ /**
3057
+ * Variant med sterkere visuelt uttrykk. Hver `purpose` har en sterk variant.
3058
+ */
3059
+ strong?: boolean | undefined;
3052
3060
  /**
3053
3061
  * Om `<Tag>` skal ha et ikon til venstre for teksten. Tags med `purpose="default"` har aldri ikon.
3054
3062
  * @default false
package/dist/index.d.ts CHANGED
@@ -3030,6 +3030,10 @@ type TagProps = BaseComponentPropsWithChildren<HTMLSpanElement, {
3030
3030
  * Formål med status eller kategorisering. Påvirker styling.
3031
3031
  * */
3032
3032
  purpose?: TagPurpose;
3033
+ /**
3034
+ * Variant med sterkere visuelt uttrykk. Hver `purpose` har en sterk variant.
3035
+ */
3036
+ strong?: boolean;
3033
3037
  /**
3034
3038
  * Om `<Tag>` skal ha et ikon til venstre for teksten. Tags med `purpose="default"` har aldri ikon.
3035
3039
  * @default false
@@ -3049,6 +3053,10 @@ declare const Tag: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes<HTM
3049
3053
  * Formål med status eller kategorisering. Påvirker styling.
3050
3054
  * */
3051
3055
  purpose?: TagPurpose | undefined;
3056
+ /**
3057
+ * Variant med sterkere visuelt uttrykk. Hver `purpose` har en sterk variant.
3058
+ */
3059
+ strong?: boolean | undefined;
3052
3060
  /**
3053
3061
  * Om `<Tag>` skal ha et ikon til venstre for teksten. Tags med `purpose="default"` har aldri ikon.
3054
3062
  * @default false
package/dist/index.js CHANGED
@@ -9638,23 +9638,23 @@ var container9 = {
9638
9638
  },
9639
9639
  purpose: {
9640
9640
  info: {
9641
- borderColor: colors24.DdsColorInfoLighter,
9641
+ borderColor: colors24.DdsColorInfoBase,
9642
9642
  backgroundColor: colors24.DdsColorInfoLightest
9643
9643
  },
9644
9644
  warning: {
9645
- borderColor: colors24.DdsColorWarningLighter,
9645
+ borderColor: colors24.DdsColorWarningBase,
9646
9646
  backgroundColor: colors24.DdsColorWarningLightest
9647
9647
  },
9648
9648
  danger: {
9649
- borderColor: colors24.DdsColorDangerLighter,
9649
+ borderColor: colors24.DdsColorDangerBase,
9650
9650
  backgroundColor: colors24.DdsColorDangerLightest
9651
9651
  },
9652
9652
  success: {
9653
- borderColor: colors24.DdsColorSuccessLighter,
9653
+ borderColor: colors24.DdsColorSuccessBase,
9654
9654
  backgroundColor: colors24.DdsColorSuccessLightest
9655
9655
  },
9656
9656
  tips: {
9657
- borderColor: colors24.DdsColorPrimaryLighter,
9657
+ borderColor: colors24.DdsColorPrimaryBase,
9658
9658
  backgroundColor: colors24.DdsColorPrimaryLightest
9659
9659
  },
9660
9660
  confidential: {
@@ -11127,12 +11127,27 @@ var itemNumber = {
11127
11127
  size: "1.75rem",
11128
11128
  borderWidth: "2px",
11129
11129
  iconSize: "small",
11130
- active: {
11130
+ activeIncomplete: {
11131
+ borderColor: colors27.DdsColorInteractiveBase,
11132
+ color: colors27.DdsColorNeutralsWhite,
11133
+ backgroundColor: colors27.DdsColorInteractiveBase,
11134
+ hover: {
11135
+ borderColor: colors27.DdsColorInteractiveBase,
11136
+ color: colors27.DdsColorNeutralsWhite,
11137
+ backgroundColor: colors27.DdsColorInteractiveBase
11138
+ }
11139
+ },
11140
+ activeCompleted: {
11131
11141
  borderColor: colors27.DdsColorInteractiveBase,
11132
11142
  color: colors27.DdsColorNeutralsWhite,
11133
- backgroundColor: colors27.DdsColorInteractiveBase
11143
+ backgroundColor: colors27.DdsColorInteractiveBase,
11144
+ hover: {
11145
+ borderColor: colors27.DdsColorInteractiveDark,
11146
+ color: colors27.DdsColorNeutralsWhite,
11147
+ backgroundColor: colors27.DdsColorInteractiveDark
11148
+ }
11134
11149
  },
11135
- completed: {
11150
+ inactiveCompleted: {
11136
11151
  borderColor: colors27.DdsColorInteractiveBase,
11137
11152
  color: colors27.DdsColorNeutralsWhite,
11138
11153
  backgroundColor: colors27.DdsColorInteractiveBase,
@@ -11142,7 +11157,7 @@ var itemNumber = {
11142
11157
  backgroundColor: colors27.DdsColorInteractiveDark
11143
11158
  }
11144
11159
  },
11145
- inactive: {
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, "}`;
@@ -13707,49 +13706,93 @@ var typographyType5 = "bodySans01";
13707
13706
  var wrapper7 = {
13708
13707
  border: "1px solid",
13709
13708
  borderRadius: borderRadius10.RadiiDdsBorderRadius1Radius,
13710
- padding: `${spacing37.SizesDdsSpacingX0125} ${spacing37.SizesDdsSpacingX025}`,
13709
+ padding: `${spacing37.SizesDdsSpacingX0125} ${spacing37.SizesDdsSpacingX05}`,
13711
13710
  icon: {
13712
13711
  padding: [
13713
13712
  spacing37.SizesDdsSpacingX0125,
13714
- spacing37.SizesDdsSpacingX025,
13713
+ spacing37.SizesDdsSpacingX05,
13715
13714
  spacing37.SizesDdsSpacingX0125,
13716
- spacing37.SizesDdsSpacingX0125
13715
+ spacing37.SizesDdsSpacingX025
13717
13716
  ].join(" "),
13718
- gap: spacing37.SizesDdsSpacingX0125,
13717
+ gap: spacing37.SizesDdsSpacingX025,
13719
13718
  size: "small"
13720
13719
  },
13721
13720
  purpose: {
13722
13721
  default: {
13723
- backgroundColor: colors33.DdsColorNeutralsGray1,
13724
- borderColor: colors33.DdsColorNeutralsGray3,
13725
- icon: void 0
13722
+ icon: void 0,
13723
+ base: {
13724
+ backgroundColor: colors33.DdsColorNeutralsGray1,
13725
+ borderColor: colors33.DdsColorNeutralsGray3,
13726
+ icon: void 0
13727
+ },
13728
+ strong: {
13729
+ backgroundColor: colors33.DdsColorNeutralsGray3,
13730
+ borderColor: colors33.DdsColorNeutralsGray3,
13731
+ icon: void 0
13732
+ }
13726
13733
  },
13727
13734
  success: {
13728
- ...localMessageTokens.container.purpose.success,
13729
- icon: {
13730
- icon: CheckCircledIcon,
13731
- color: colors33.DdsColorSuccessDarkest
13735
+ icon: CheckCircledIcon,
13736
+ base: {
13737
+ ...localMessageTokens.container.purpose.success,
13738
+ icon: {
13739
+ color: colors33.DdsColorSuccessDarkest
13740
+ }
13741
+ },
13742
+ strong: {
13743
+ backgroundColor: colors33.DdsColorSuccessLight,
13744
+ borderColor: colors33.DdsColorSuccessLight,
13745
+ icon: {
13746
+ color: colors33.DdsColorNeutralsGray9
13747
+ }
13732
13748
  }
13733
13749
  },
13734
13750
  danger: {
13735
- ...localMessageTokens.container.purpose.danger,
13736
- icon: {
13737
- icon: ErrorIcon,
13738
- color: colors33.DdsColorDangerDarkest
13751
+ icon: ErrorIcon,
13752
+ base: {
13753
+ ...localMessageTokens.container.purpose.danger,
13754
+ icon: {
13755
+ color: colors33.DdsColorDangerDarkest
13756
+ }
13757
+ },
13758
+ strong: {
13759
+ backgroundColor: colors33.DdsColorDangerLight,
13760
+ borderColor: colors33.DdsColorDangerLight,
13761
+ icon: {
13762
+ color: colors33.DdsColorNeutralsGray9
13763
+ }
13739
13764
  }
13740
13765
  },
13741
13766
  warning: {
13742
- ...localMessageTokens.container.purpose.warning,
13743
- icon: {
13744
- icon: WarningIcon,
13745
- color: colors33.DdsColorWarningDarkest
13767
+ icon: WarningIcon,
13768
+ base: {
13769
+ ...localMessageTokens.container.purpose.warning,
13770
+ icon: {
13771
+ color: colors33.DdsColorWarningDarkest
13772
+ }
13773
+ },
13774
+ strong: {
13775
+ backgroundColor: colors33.DdsColorWarningLight,
13776
+ borderColor: colors33.DdsColorWarningLight,
13777
+ icon: {
13778
+ color: colors33.DdsColorNeutralsGray9
13779
+ }
13746
13780
  }
13747
13781
  },
13748
13782
  info: {
13749
- ...localMessageTokens.container.purpose.info,
13750
- icon: {
13751
- icon: InfoIcon,
13752
- color: colors33.DdsColorInfoDarkest
13783
+ icon: InfoIcon,
13784
+ base: {
13785
+ ...localMessageTokens.container.purpose.info,
13786
+ icon: {
13787
+ color: colors33.DdsColorInfoDarkest
13788
+ }
13789
+ },
13790
+ strong: {
13791
+ backgroundColor: colors33.DdsColorInfoLight,
13792
+ borderColor: colors33.DdsColorInfoLight,
13793
+ icon: {
13794
+ color: colors33.DdsColorNeutralsGray9
13795
+ }
13753
13796
  }
13754
13797
  }
13755
13798
  }
@@ -13769,21 +13812,22 @@ var Wrapper7 = (0, import_styled_components94.default)(TextOverflowEllipsisWrapp
13769
13812
  border-radius: ${wrapper8.borderRadius};
13770
13813
  padding: ${({ $withIcon }) => $withIcon ? wrapper8.icon.padding : wrapper8.padding};
13771
13814
  ${getFontStyling(typographyType5)}
13772
- ${({ $purpose }) => import_styled_components94.css`
13773
- background-color: ${wrapper8.purpose[$purpose].backgroundColor};
13774
- border-color: ${wrapper8.purpose[$purpose].borderColor};
13815
+ ${({ $purpose, $strong }) => import_styled_components94.css`
13816
+ background-color: ${wrapper8.purpose[$purpose][$strong ? "strong" : "base"].backgroundColor};
13817
+ border-color: ${wrapper8.purpose[$purpose][$strong ? "strong" : "base"].borderColor};
13775
13818
  `}
13776
13819
  `;
13777
13820
  var StyledIcon5 = (0, import_styled_components94.default)(Icon)`
13778
- color: ${({ $purpose }) => {
13821
+ color: ${({ $purpose, $strong }) => {
13779
13822
  var _a;
13780
- return (_a = wrapper8.purpose[$purpose].icon) == null ? void 0 : _a.color;
13823
+ return (_a = wrapper8.purpose[$purpose][$strong ? "strong" : "base"].icon) == null ? void 0 : _a.color;
13781
13824
  }};
13782
13825
  `;
13783
13826
  var Tag = (0, import_react114.forwardRef)((props, ref) => {
13784
13827
  const {
13785
13828
  text,
13786
13829
  purpose = "default",
13830
+ strong,
13787
13831
  id,
13788
13832
  className,
13789
13833
  children,
@@ -13798,13 +13842,15 @@ var Tag = (0, import_react114.forwardRef)((props, ref) => {
13798
13842
  ...getBaseHTMLProps(id, className, htmlProps, rest),
13799
13843
  ref,
13800
13844
  $purpose: purpose,
13845
+ $strong: strong,
13801
13846
  $withIcon: Boolean(withIcon && icon12),
13802
13847
  children: [
13803
13848
  withIcon && icon12 && /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
13804
13849
  StyledIcon5,
13805
13850
  {
13806
13851
  $purpose: purpose,
13807
- icon: icon12.icon,
13852
+ $strong: strong,
13853
+ icon: icon12,
13808
13854
  iconSize: tagTokens.wrapper.icon.size
13809
13855
  }
13810
13856
  ),