@norges-domstoler/dds-components 7.0.0 → 7.0.1
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/cjs/components/Checkbox/CheckboxGroup.stories.d.ts +5 -0
- package/dist/cjs/components/InputMessage/InputMessage.tokens.d.ts +0 -1
- package/dist/cjs/components/Select/Select.tokens.d.ts +4 -0
- package/dist/cjs/index.js +31 -33
- package/dist/components/Checkbox/CheckboxGroup.stories.d.ts +5 -0
- package/dist/components/InputMessage/InputMessage.js +1 -1
- package/dist/components/InputMessage/InputMessage.tokens.d.ts +0 -1
- package/dist/components/InputMessage/InputMessage.tokens.js +1 -2
- package/dist/components/Select/Select.styles.js +5 -2
- package/dist/components/Select/Select.tokens.d.ts +4 -0
- package/dist/components/Select/Select.tokens.js +4 -0
- package/dist/components/TextInput/CharCounter.js +1 -2
- package/dist/components/Typography/Typography.utils.js +1 -1
- package/package.json +29 -30
- package/dist/cjs/components/TextInput/CharCounter.tokens.d.ts +0 -4
- package/dist/components/TextInput/CharCounter.tokens.d.ts +0 -4
- package/dist/components/TextInput/CharCounter.tokens.js +0 -11
package/dist/cjs/index.js
CHANGED
|
@@ -3179,7 +3179,7 @@ var getMarginStyling = function getMarginStyling(typographyType, element, withMa
|
|
|
3179
3179
|
return withMargins ? styled.css(["", " margin-top:", ";margin-bottom:", ";", ""], isInlineElement(element) && element !== 'a' && styled.css(["display:block;"]), typographyTokens.typographyType[typographyType].margins.marginTop, typographyTokens.typographyType[typographyType].margins.marginBottom, styled.css(["padding-top:", ";"], typographyTokens.typographyType[typographyType].margins.paddingTop)) : styled.css(["margin:0;"]);
|
|
3180
3180
|
};
|
|
3181
3181
|
var getAnchorStyling = function getAnchorStyling(external, interactionStyling, typographyType, withMargins) {
|
|
3182
|
-
return styled.css(["", " width:fit-content;text-decoration:underline;@media (prefers-reduced-motion:no-preference){transition:", ";}", " &:hover{color:", ";", "}", " &:focus-visible,&.focus-visible,&:focus-visible::selection,&.focus-visible::selection{", "}"], typographyType ? styled.css(["", ";
|
|
3182
|
+
return styled.css(["", " color:", ";width:fit-content;text-decoration:underline;@media (prefers-reduced-motion:no-preference){transition:", ";}", " &:hover{color:", ";", "}", " &:focus-visible,&.focus-visible,&:focus-visible::selection,&.focus-visible::selection{", "}"], typographyType ? styled.css(["", ";", ""], typographyTokens.typographyType[typographyType].base.font, getMarginStyling(typographyType, 'a', withMargins)) : styled.css(["font:inherit;", ""], getMarginStyling('a', 'a', withMargins)), typographyTokens.typographyType.a.base.color, focusVisibleLinkTransitionValue, external && styled.css(["display:inline-flex;align-items:center;gap:", ";"], typographyTokens.typographyType.a.base.gap), typographyTokens.typographyType.a.hover.color, interactionStyling && interactionStyling.hover && styled.css(["", ""], interactionStyling.hover), interactionStyling && interactionStyling.active && styled.css(["&:active{", "}"], interactionStyling.active), focusVisibleLink);
|
|
3183
3183
|
};
|
|
3184
3184
|
|
|
3185
3185
|
var combineHandlers = function combineHandlers(handler1, handler2) {
|
|
@@ -4086,8 +4086,7 @@ var colors$b = ddsDesignTokens.ddsBaseTokens.colors,
|
|
|
4086
4086
|
spacing$e = ddsDesignTokens.ddsBaseTokens.spacing;
|
|
4087
4087
|
var message = {
|
|
4088
4088
|
tip: {
|
|
4089
|
-
backgroundColor: colors$b.DdsColorNeutralsWhite
|
|
4090
|
-
padding: "".concat(spacing$e.SizesDdsSpacingLocalX025, " 0")
|
|
4089
|
+
backgroundColor: colors$b.DdsColorNeutralsWhite
|
|
4091
4090
|
},
|
|
4092
4091
|
error: {
|
|
4093
4092
|
padding: "".concat(spacing$e.SizesDdsSpacingLocalX025, " ").concat(spacing$e.SizesDdsSpacingLocalX05),
|
|
@@ -4109,7 +4108,7 @@ var InputMessageWrapper = styled__default["default"].div.withConfig({
|
|
|
4109
4108
|
componentId: "sc-c954fy-0"
|
|
4110
4109
|
})(["display:flex;width:fit-content;word-break:break-word;max-width:100%;", " svg{margin-top:", ";}"], function (_ref) {
|
|
4111
4110
|
var messageType = _ref.messageType;
|
|
4112
|
-
return messageType === 'tip' ? styled.css(["background-color:", ";
|
|
4111
|
+
return messageType === 'tip' ? styled.css(["background-color:", ";"], inputMessageTokens.message.tip.backgroundColor) : messageType === 'error' ? styled.css(["color:", ";background-color:", ";padding:", ";gap:", ";"], inputMessageTokens.message.error.color, inputMessageTokens.message.error.backgroundColor, inputMessageTokens.message.error.padding, inputMessageTokens.message.error.gap) : '';
|
|
4113
4112
|
}, inputMessageTokens.icon.marginTop);
|
|
4114
4113
|
var InputMessage = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
4115
4114
|
var message = props.message,
|
|
@@ -4139,19 +4138,19 @@ var InputMessage = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4139
4138
|
}));
|
|
4140
4139
|
});
|
|
4141
4140
|
|
|
4142
|
-
var Spacing$
|
|
4141
|
+
var Spacing$i = ddsDesignTokens.ddsBaseTokens.spacing;
|
|
4143
4142
|
var groupContainerRowBase = {
|
|
4144
|
-
gap: Spacing$
|
|
4143
|
+
gap: Spacing$i.SizesDdsSpacingLocalX075
|
|
4145
4144
|
};
|
|
4146
4145
|
var groupContainerColumnBase = {
|
|
4147
|
-
gap: Spacing$
|
|
4146
|
+
gap: Spacing$i.SizesDdsSpacingLocalX05
|
|
4148
4147
|
};
|
|
4149
4148
|
var containerBase$5 = {
|
|
4150
|
-
gap: Spacing$
|
|
4149
|
+
gap: Spacing$i.SizesDdsSpacingLocalX0125
|
|
4151
4150
|
};
|
|
4152
4151
|
var radioButtonGroupTokens = {
|
|
4153
4152
|
label: {
|
|
4154
|
-
spaceLeft: Spacing$
|
|
4153
|
+
spaceLeft: Spacing$i.SizesDdsSpacingLocalX025
|
|
4155
4154
|
},
|
|
4156
4155
|
container: {
|
|
4157
4156
|
base: containerBase$5
|
|
@@ -4424,7 +4423,7 @@ var CheckboxGroup = function CheckboxGroup(props) {
|
|
|
4424
4423
|
|
|
4425
4424
|
var Colors$d = ddsDesignTokens.ddsBaseTokens.colors,
|
|
4426
4425
|
Border$9 = ddsDesignTokens.ddsBaseTokens.border,
|
|
4427
|
-
Spacing$
|
|
4426
|
+
Spacing$h = ddsDesignTokens.ddsBaseTokens.spacing,
|
|
4428
4427
|
FontPackages$9 = ddsDesignTokens.ddsBaseTokens.fontPackages,
|
|
4429
4428
|
BorderRadius$4 = ddsDesignTokens.ddsBaseTokens.borderRadius,
|
|
4430
4429
|
OuterShadow$4 = ddsDesignTokens.ddsBaseTokens.outerShadow;
|
|
@@ -4432,50 +4431,50 @@ var iconSizeTinyPx = calculateHeightWithLineHeight(FontPackages$9.supportingStyl
|
|
|
4432
4431
|
var iconSizeSmallPx = calculateHeightWithLineHeight(FontPackages$9.body_sans_01.numbers.lineHeightNumber, FontPackages$9.body_sans_01.numbers.fontSizeNumber);
|
|
4433
4432
|
var iconSizeMediumPx = calculateHeightWithLineHeight(FontPackages$9.body_sans_02.numbers.lineHeightNumber, FontPackages$9.body_sans_02.numbers.fontSizeNumber);
|
|
4434
4433
|
var iconSizeLargePx = calculateHeightWithLineHeight(FontPackages$9.body_sans_04.numbers.lineHeightNumber, FontPackages$9.body_sans_04.numbers.fontSizeNumber);
|
|
4435
|
-
var svgOffset = Spacing$
|
|
4434
|
+
var svgOffset = Spacing$h.SizesDdsSpacingLocalX0125NumberPx;
|
|
4436
4435
|
var justIconSmallBase = {
|
|
4437
4436
|
fontSize: "".concat(iconSizeSmallPx + svgOffset, "px"),
|
|
4438
|
-
padding: Spacing$
|
|
4437
|
+
padding: Spacing$h.SizesDdsSpacingLocalX05
|
|
4439
4438
|
};
|
|
4440
4439
|
var justIconWrapperSmallBase = {
|
|
4441
4440
|
height: "".concat(iconSizeSmallPx, "px"),
|
|
4442
4441
|
width: "".concat(iconSizeSmallPx, "px")
|
|
4443
4442
|
};
|
|
4444
4443
|
var textSmallBase = Object.assign(Object.assign({}, FontPackages$9.body_sans_01.base), {
|
|
4445
|
-
padding: "".concat(Spacing$
|
|
4444
|
+
padding: "".concat(Spacing$h.SizesDdsSpacingLocalX05, " ").concat(Spacing$h.SizesDdsSpacingLocalX1NumberPx - 2, "px")
|
|
4446
4445
|
});
|
|
4447
4446
|
var justIconMediumBase = {
|
|
4448
4447
|
fontSize: "".concat(iconSizeMediumPx + svgOffset, "px"),
|
|
4449
|
-
padding: Spacing$
|
|
4448
|
+
padding: Spacing$h.SizesDdsSpacingLocalX075
|
|
4450
4449
|
};
|
|
4451
4450
|
var justIconWrapperMediumBase = {
|
|
4452
4451
|
height: "".concat(iconSizeMediumPx, "px"),
|
|
4453
4452
|
width: "".concat(iconSizeMediumPx, "px")
|
|
4454
4453
|
};
|
|
4455
4454
|
var textMediumBase = Object.assign(Object.assign({}, FontPackages$9.body_sans_02.base), {
|
|
4456
|
-
padding: "".concat(Spacing$
|
|
4455
|
+
padding: "".concat(Spacing$h.SizesDdsSpacingLocalX075, " ").concat(Spacing$h.SizesDdsSpacingLocalX15NumberPx - 2, "px")
|
|
4457
4456
|
});
|
|
4458
4457
|
var justIconLargeBase = {
|
|
4459
4458
|
fontSize: "".concat(iconSizeLargePx + svgOffset, "px"),
|
|
4460
|
-
padding: Spacing$
|
|
4459
|
+
padding: Spacing$h.SizesDdsSpacingLocalX1
|
|
4461
4460
|
};
|
|
4462
4461
|
var justIconWrapperLargeBase = {
|
|
4463
4462
|
height: "".concat(iconSizeLargePx, "px"),
|
|
4464
4463
|
width: "".concat(iconSizeLargePx, "px")
|
|
4465
4464
|
};
|
|
4466
4465
|
var textLargeBase = Object.assign(Object.assign({}, FontPackages$9.body_sans_04.base), {
|
|
4467
|
-
padding: "".concat(Spacing$
|
|
4466
|
+
padding: "".concat(Spacing$h.SizesDdsSpacingLocalX1, " ").concat(Spacing$h.SizesDdsSpacingLocalX2NumberPx - 2, "px")
|
|
4468
4467
|
});
|
|
4469
4468
|
var justIconTinyBase = {
|
|
4470
4469
|
fontSize: "".concat(iconSizeTinyPx + svgOffset, "px"),
|
|
4471
|
-
padding: Spacing$
|
|
4470
|
+
padding: Spacing$h.SizesDdsSpacingLocalX025
|
|
4472
4471
|
};
|
|
4473
4472
|
var justIconWrapperTinyBase = {
|
|
4474
4473
|
height: "".concat(iconSizeTinyPx, "px"),
|
|
4475
4474
|
width: "".concat(iconSizeTinyPx, "px")
|
|
4476
4475
|
};
|
|
4477
4476
|
var textTinyBase = Object.assign(Object.assign({}, FontPackages$9.supportingStyle_tiny_01.base), {
|
|
4478
|
-
padding: "".concat(Spacing$
|
|
4477
|
+
padding: "".concat(Spacing$h.SizesDdsSpacingLocalX025, " ").concat(Spacing$h.SizesDdsSpacingLocalX075)
|
|
4479
4478
|
});
|
|
4480
4479
|
var buttonBase$1 = {
|
|
4481
4480
|
border: "".concat(Border$9.BordersDdsBorderStyleLightStrokeWeight, " solid")
|
|
@@ -4693,7 +4692,7 @@ var buttonTokens = {
|
|
|
4693
4692
|
text: {
|
|
4694
4693
|
base: textSmallBase
|
|
4695
4694
|
},
|
|
4696
|
-
iconWithTextMargin: Spacing$
|
|
4695
|
+
iconWithTextMargin: Spacing$h.SizesDdsSpacingLocalX05
|
|
4697
4696
|
},
|
|
4698
4697
|
medium: {
|
|
4699
4698
|
justIcon: {
|
|
@@ -4705,7 +4704,7 @@ var buttonTokens = {
|
|
|
4705
4704
|
text: {
|
|
4706
4705
|
base: textMediumBase
|
|
4707
4706
|
},
|
|
4708
|
-
iconWithTextMargin: Spacing$
|
|
4707
|
+
iconWithTextMargin: Spacing$h.SizesDdsSpacingLocalX075
|
|
4709
4708
|
},
|
|
4710
4709
|
large: {
|
|
4711
4710
|
justIcon: {
|
|
@@ -4717,7 +4716,7 @@ var buttonTokens = {
|
|
|
4717
4716
|
text: {
|
|
4718
4717
|
base: textLargeBase
|
|
4719
4718
|
},
|
|
4720
|
-
iconWithTextMargin: Spacing$
|
|
4719
|
+
iconWithTextMargin: Spacing$h.SizesDdsSpacingLocalX1
|
|
4721
4720
|
},
|
|
4722
4721
|
tiny: {
|
|
4723
4722
|
justIcon: {
|
|
@@ -4729,7 +4728,7 @@ var buttonTokens = {
|
|
|
4729
4728
|
text: {
|
|
4730
4729
|
base: textTinyBase
|
|
4731
4730
|
},
|
|
4732
|
-
iconWithTextMargin: Spacing$
|
|
4731
|
+
iconWithTextMargin: Spacing$h.SizesDdsSpacingLocalX05
|
|
4733
4732
|
}
|
|
4734
4733
|
},
|
|
4735
4734
|
appearance: {
|
|
@@ -5085,18 +5084,10 @@ var Button$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
5085
5084
|
}));
|
|
5086
5085
|
});
|
|
5087
5086
|
|
|
5088
|
-
var Spacing$h = ddsDesignTokens.ddsBaseTokens.spacing;
|
|
5089
|
-
var charCounterBase = {
|
|
5090
|
-
padding: "".concat(Spacing$h.SizesDdsSpacingLocalX025, " ").concat(Spacing$h.SizesDdsSpacingLocalX05)
|
|
5091
|
-
};
|
|
5092
|
-
var charCounterTokens = {
|
|
5093
|
-
base: charCounterBase
|
|
5094
|
-
};
|
|
5095
|
-
|
|
5096
5087
|
var Wrapper$6 = styled__default["default"](Typography).withConfig({
|
|
5097
5088
|
displayName: "CharCounter__Wrapper",
|
|
5098
5089
|
componentId: "sc-qty1z2-0"
|
|
5099
|
-
})(["margin-left:auto;"
|
|
5090
|
+
})(["margin-left:auto;"]);
|
|
5100
5091
|
|
|
5101
5092
|
function CharCounter(props) {
|
|
5102
5093
|
var current = props.current,
|
|
@@ -5728,6 +5719,10 @@ var option = {
|
|
|
5728
5719
|
color: textDefault$4.textColor,
|
|
5729
5720
|
backgroundColor: colors$8.DdsColorInteractiveLightest
|
|
5730
5721
|
},
|
|
5722
|
+
focus: {
|
|
5723
|
+
color: textDefault$4.textColor,
|
|
5724
|
+
backgroundColor: colors$8.DdsColorInteractiveLightest
|
|
5725
|
+
},
|
|
5731
5726
|
selected: Object.assign({
|
|
5732
5727
|
backgroundColor: colors$8.DdsColorNeutralsWhite
|
|
5733
5728
|
}, fontPackages$7.body_sans_02.base),
|
|
@@ -5997,7 +5992,10 @@ var getCustomStyles = function getCustomStyles() {
|
|
|
5997
5992
|
}
|
|
5998
5993
|
}), state.isSelected && {
|
|
5999
5994
|
backgroundColor: _option.selected.backgroundColor
|
|
6000
|
-
}), state.isFocused &&
|
|
5995
|
+
}), state.isFocused && {
|
|
5996
|
+
color: _option.focus.color,
|
|
5997
|
+
backgroundColor: _option.focus.backgroundColor
|
|
5998
|
+
});
|
|
6001
5999
|
},
|
|
6002
6000
|
noOptionsMessage: function noOptionsMessage() {
|
|
6003
6001
|
return Object.assign({
|
|
@@ -15,7 +15,7 @@ var InputMessageWrapper = styled.div.withConfig({
|
|
|
15
15
|
componentId: "sc-c954fy-0"
|
|
16
16
|
})(["display:flex;width:fit-content;word-break:break-word;max-width:100%;", " svg{margin-top:", ";}"], function (_ref) {
|
|
17
17
|
var messageType = _ref.messageType;
|
|
18
|
-
return messageType === 'tip' ? css(["background-color:", ";
|
|
18
|
+
return messageType === 'tip' ? css(["background-color:", ";"], inputMessageTokens.message.tip.backgroundColor) : messageType === 'error' ? css(["color:", ";background-color:", ";padding:", ";gap:", ";"], inputMessageTokens.message.error.color, inputMessageTokens.message.error.backgroundColor, inputMessageTokens.message.error.padding, inputMessageTokens.message.error.gap) : '';
|
|
19
19
|
}, inputMessageTokens.icon.marginTop);
|
|
20
20
|
var InputMessage = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
21
21
|
var message = props.message,
|
|
@@ -4,8 +4,7 @@ var colors = ddsBaseTokens.colors,
|
|
|
4
4
|
spacing = ddsBaseTokens.spacing;
|
|
5
5
|
var message = {
|
|
6
6
|
tip: {
|
|
7
|
-
backgroundColor: colors.DdsColorNeutralsWhite
|
|
8
|
-
padding: "".concat(spacing.SizesDdsSpacingLocalX025, " 0")
|
|
7
|
+
backgroundColor: colors.DdsColorNeutralsWhite
|
|
9
8
|
},
|
|
10
9
|
error: {
|
|
11
10
|
padding: "".concat(spacing.SizesDdsSpacingLocalX025, " ").concat(spacing.SizesDdsSpacingLocalX05),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
|
-
import
|
|
2
|
+
import '../../helpers/styling/focusVisible.js';
|
|
3
3
|
import { hoverDangerInputfield, hoverInputfield } from '../../helpers/styling/hover.js';
|
|
4
4
|
import { focusInputfield } from '../../helpers/styling/focus.js';
|
|
5
5
|
import { dangerInputfield } from '../../helpers/styling/danger.js';
|
|
@@ -199,7 +199,10 @@ var getCustomStyles = function getCustomStyles() {
|
|
|
199
199
|
}
|
|
200
200
|
}), state.isSelected && {
|
|
201
201
|
backgroundColor: _option.selected.backgroundColor
|
|
202
|
-
}), state.isFocused &&
|
|
202
|
+
}), state.isFocused && {
|
|
203
|
+
color: _option.focus.color,
|
|
204
|
+
backgroundColor: _option.focus.backgroundColor
|
|
205
|
+
});
|
|
203
206
|
},
|
|
204
207
|
noOptionsMessage: function noOptionsMessage() {
|
|
205
208
|
return Object.assign({
|
|
@@ -112,6 +112,10 @@ var option = {
|
|
|
112
112
|
color: textDefault.textColor,
|
|
113
113
|
backgroundColor: colors.DdsColorInteractiveLightest
|
|
114
114
|
},
|
|
115
|
+
focus: {
|
|
116
|
+
color: textDefault.textColor,
|
|
117
|
+
backgroundColor: colors.DdsColorInteractiveLightest
|
|
118
|
+
},
|
|
115
119
|
selected: Object.assign({
|
|
116
120
|
backgroundColor: colors.DdsColorNeutralsWhite
|
|
117
121
|
}, fontPackages.body_sans_02.base),
|
|
@@ -5,12 +5,11 @@ import styled from 'styled-components';
|
|
|
5
5
|
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
6
6
|
import { Typography } from '../Typography/Typography/Typography.js';
|
|
7
7
|
import '../Typography/Link/Link.js';
|
|
8
|
-
import { charCounterTokens } from './CharCounter.tokens.js';
|
|
9
8
|
|
|
10
9
|
var Wrapper = styled(Typography).withConfig({
|
|
11
10
|
displayName: "CharCounter__Wrapper",
|
|
12
11
|
componentId: "sc-qty1z2-0"
|
|
13
|
-
})(["margin-left:auto;"
|
|
12
|
+
})(["margin-left:auto;"]);
|
|
14
13
|
|
|
15
14
|
function CharCounter(props) {
|
|
16
15
|
var current = props.current,
|
|
@@ -64,7 +64,7 @@ var getMarginStyling = function getMarginStyling(typographyType, element, withMa
|
|
|
64
64
|
return withMargins ? css(["", " margin-top:", ";margin-bottom:", ";", ""], isInlineElement(element) && element !== 'a' && css(["display:block;"]), typographyTokens.typographyType[typographyType].margins.marginTop, typographyTokens.typographyType[typographyType].margins.marginBottom, css(["padding-top:", ";"], typographyTokens.typographyType[typographyType].margins.paddingTop)) : css(["margin:0;"]);
|
|
65
65
|
};
|
|
66
66
|
var getAnchorStyling = function getAnchorStyling(external, interactionStyling, typographyType, withMargins) {
|
|
67
|
-
return css(["", " width:fit-content;text-decoration:underline;@media (prefers-reduced-motion:no-preference){transition:", ";}", " &:hover{color:", ";", "}", " &:focus-visible,&.focus-visible,&:focus-visible::selection,&.focus-visible::selection{", "}"], typographyType ? css(["", ";
|
|
67
|
+
return css(["", " color:", ";width:fit-content;text-decoration:underline;@media (prefers-reduced-motion:no-preference){transition:", ";}", " &:hover{color:", ";", "}", " &:focus-visible,&.focus-visible,&:focus-visible::selection,&.focus-visible::selection{", "}"], typographyType ? css(["", ";", ""], typographyTokens.typographyType[typographyType].base.font, getMarginStyling(typographyType, 'a', withMargins)) : css(["font:inherit;", ""], getMarginStyling('a', 'a', withMargins)), typographyTokens.typographyType.a.base.color, focusVisibleLinkTransitionValue, external && css(["display:inline-flex;align-items:center;gap:", ";"], typographyTokens.typographyType.a.base.gap), typographyTokens.typographyType.a.hover.color, interactionStyling && interactionStyling.hover && css(["", ""], interactionStyling.hover), interactionStyling && interactionStyling.active && css(["&:active{", "}"], interactionStyling.active), focusVisibleLink);
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
export { getAdditionalFontStyle, getAnchorStyling, getElementType, getMarginStyling, inlineElements, isInlineElement };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@norges-domstoler/dds-components",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "React components used in Elsa - domstolenes designsystem",
|
|
5
5
|
"author": "Elsa team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"test:watch": "jest --watch",
|
|
25
25
|
"build": "rollup -c",
|
|
26
26
|
"build:watch": "rollup -c -w",
|
|
27
|
-
"storybook": "start-storybook -p 6006
|
|
27
|
+
"storybook": "start-storybook -p 6006",
|
|
28
28
|
"build-storybook": "build-storybook -o docs",
|
|
29
29
|
"lint": "eslint --ext=jsx,ts,tsx src",
|
|
30
30
|
"prettier": "prettier --write .",
|
|
@@ -47,49 +47,47 @@
|
|
|
47
47
|
"elsa"
|
|
48
48
|
],
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@babel/core": "^7.
|
|
51
|
-
"@babel/preset-env": "^7.
|
|
50
|
+
"@babel/core": "^7.19.1",
|
|
51
|
+
"@babel/preset-env": "^7.19.1",
|
|
52
52
|
"@babel/preset-react": "^7.18.6",
|
|
53
53
|
"@mdx-js/react": "^2.1.3",
|
|
54
54
|
"@rollup/plugin-babel": "^5.3.1",
|
|
55
55
|
"@rollup/plugin-commonjs": "^22.0.2",
|
|
56
56
|
"@rollup/plugin-image": "^2.1.1",
|
|
57
57
|
"@rollup/plugin-node-resolve": "^14.1.0",
|
|
58
|
-
"@storybook/addon-
|
|
59
|
-
"@storybook/
|
|
60
|
-
"@storybook/addon-links": "^6.5.10",
|
|
61
|
-
"@storybook/addons": "^6.5.10",
|
|
58
|
+
"@storybook/addon-essentials": "^6.5.12",
|
|
59
|
+
"@storybook/addons": "^6.5.12",
|
|
62
60
|
"@storybook/mdx2-csf": "^0.0.3",
|
|
63
|
-
"@storybook/react": "^6.5.
|
|
64
|
-
"@storybook/theming": "^6.5.
|
|
61
|
+
"@storybook/react": "^6.5.12",
|
|
62
|
+
"@storybook/theming": "^6.5.12",
|
|
65
63
|
"@testing-library/jest-dom": "^5.16.5",
|
|
66
|
-
"@testing-library/react": "^13.
|
|
64
|
+
"@testing-library/react": "^13.4.0",
|
|
67
65
|
"@testing-library/user-event": "^14.4.3",
|
|
68
|
-
"@types/jest": "^
|
|
69
|
-
"@types/react": "^18.0.
|
|
66
|
+
"@types/jest": "^29.0.3",
|
|
67
|
+
"@types/react": "^18.0.21",
|
|
70
68
|
"@types/react-dom": "^18.0.6",
|
|
71
69
|
"@types/styled-components": "^5.1.26",
|
|
72
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
73
|
-
"@typescript-eslint/parser": "^5.
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
|
71
|
+
"@typescript-eslint/parser": "^5.38.1",
|
|
74
72
|
"babel-loader": "^8.2.5",
|
|
75
73
|
"babel-plugin-styled-components": "^2.0.7",
|
|
76
|
-
"concurrently": "^7.
|
|
77
|
-
"eslint": "^8.
|
|
74
|
+
"concurrently": "^7.4.0",
|
|
75
|
+
"eslint": "^8.24.0",
|
|
78
76
|
"eslint-config-prettier": "^8.5.0",
|
|
79
77
|
"eslint-plugin-prettier": "^4.2.1",
|
|
80
|
-
"eslint-plugin-react": "^7.
|
|
78
|
+
"eslint-plugin-react": "^7.31.8",
|
|
81
79
|
"eslint-plugin-storybook": "^0.6.4",
|
|
82
|
-
"jest": "^
|
|
83
|
-
"jest-environment-jsdom": "^29.0.
|
|
80
|
+
"jest": "^29.0.3",
|
|
81
|
+
"jest-environment-jsdom": "^29.0.3",
|
|
84
82
|
"react": "^18.2.0",
|
|
85
83
|
"react-dom": "^18.2.0",
|
|
86
|
-
"rollup": "^2.
|
|
84
|
+
"rollup": "^2.79.1",
|
|
87
85
|
"rollup-plugin-copy": "^3.4.0",
|
|
88
86
|
"rollup-plugin-import-css": "^3.0.3",
|
|
89
|
-
"rollup-plugin-sass": "^1.
|
|
87
|
+
"rollup-plugin-sass": "^1.12.16",
|
|
90
88
|
"rollup-plugin-typescript2": "^0.34.0",
|
|
91
|
-
"ts-jest": "^
|
|
92
|
-
"typescript": "^4.
|
|
89
|
+
"ts-jest": "^29.0.2",
|
|
90
|
+
"typescript": "^4.8.3"
|
|
93
91
|
},
|
|
94
92
|
"peerDependencies": {
|
|
95
93
|
"@norges-domstoler/dds-design-tokens": "^3.0.0",
|
|
@@ -103,16 +101,17 @@
|
|
|
103
101
|
"setupFilesAfterEnv": [
|
|
104
102
|
"<rootDir>/src/setupTests.ts"
|
|
105
103
|
],
|
|
106
|
-
"globals": {
|
|
107
|
-
"ts-jest": {
|
|
108
|
-
"tsconfig": "tsconfig.json"
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
104
|
"moduleNameMapper": {
|
|
112
105
|
"\\.css$": "<rootDir>/__mocks__/styleMock.js"
|
|
113
106
|
},
|
|
114
107
|
"transform": {
|
|
115
|
-
"\\.svg$": "<rootDir>/svgTransform.js"
|
|
108
|
+
"\\.svg$": "<rootDir>/svgTransform.js",
|
|
109
|
+
"^.+\\.tsx?$": [
|
|
110
|
+
"ts-jest",
|
|
111
|
+
{
|
|
112
|
+
"tsconfig": "tsconfig.json"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
116
115
|
}
|
|
117
116
|
},
|
|
118
117
|
"dependencies": {
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
-
|
|
3
|
-
var Spacing = ddsBaseTokens.spacing;
|
|
4
|
-
var charCounterBase = {
|
|
5
|
-
padding: "".concat(Spacing.SizesDdsSpacingLocalX025, " ").concat(Spacing.SizesDdsSpacingLocalX05)
|
|
6
|
-
};
|
|
7
|
-
var charCounterTokens = {
|
|
8
|
-
base: charCounterBase
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export { charCounterTokens };
|