@norges-domstoler/dds-components 6.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/Card/Card.stories.d.ts +1 -0
- package/dist/cjs/components/Card/CardAccordion/CardAccordion.d.ts +4 -0
- package/dist/cjs/components/Checkbox/Checkbox.stories.d.ts +1 -0
- package/dist/cjs/components/Checkbox/CheckboxGroup.d.ts +1 -1
- package/dist/cjs/components/Checkbox/CheckboxGroup.stories.d.ts +6 -1
- package/dist/cjs/components/Checkbox/CheckboxGroup.tokens.d.ts +7 -13
- package/dist/cjs/components/Datepicker/Datepicker.stories.d.ts +1 -0
- package/dist/cjs/components/Datepicker/Datepicker.tokens.d.ts +21 -3
- package/dist/cjs/components/InputMessage/InputMessage.tokens.d.ts +11 -9
- package/dist/cjs/components/List/List.tokens.d.ts +0 -4
- package/dist/cjs/components/RadioButton/RadioButtonGroup.d.ts +5 -5
- package/dist/cjs/components/ScrollableContainer/scrollbarStyling.d.ts +1 -1
- package/dist/cjs/components/Search/Search.tokens.d.ts +51 -21
- package/dist/cjs/components/Select/CustomSelect.stories.d.ts +2 -2
- package/dist/cjs/components/Select/MultiSelect.stories.d.ts +2 -1
- package/dist/cjs/components/Select/Select.d.ts +9 -3
- package/dist/cjs/components/Select/Select.stories.d.ts +3 -1
- package/dist/cjs/components/Select/Select.styles.d.ts +6 -5
- package/dist/cjs/components/Select/Select.tokens.d.ts +215 -91
- package/dist/cjs/components/TextInput/TextInput.d.ts +5 -1
- package/dist/cjs/components/TextInput/TextInput.stories.d.ts +3 -0
- package/dist/cjs/components/TextInput/TextInput.styles.d.ts +14 -6
- package/dist/cjs/components/TextInput/TextInput.tokens.d.ts +25 -44
- package/dist/cjs/components/TextInput/TextInput.types.d.ts +3 -0
- package/dist/cjs/components/Typography/Link/Link.d.ts +1 -1
- package/dist/cjs/components/Typography/Link/Link.stories.d.ts +1 -1
- package/dist/cjs/components/Typography/Paragraph/Paragraph.d.ts +1 -1
- package/dist/cjs/components/Typography/Paragraph/Paragraph.stories.d.ts +1 -1
- package/dist/cjs/components/Typography/Typography/Typography.types.d.ts +2 -3
- package/dist/cjs/components/Typography/Typography.tokens.d.ts +3 -89
- package/dist/cjs/helpers/Input/Input.styles.d.ts +3 -5
- package/dist/cjs/helpers/Input/Input.tokens.d.ts +52 -29
- package/dist/cjs/helpers/Input/Input.types.d.ts +4 -6
- package/dist/cjs/helpers/Input/Input.utils.d.ts +3 -0
- package/dist/cjs/helpers/Input/index.d.ts +1 -0
- package/dist/cjs/helpers/SelectionControl/SelectionControl.styles.d.ts +15 -0
- package/dist/cjs/helpers/SelectionControl/SelectionControl.tokens.d.ts +83 -0
- package/dist/cjs/helpers/SelectionControl/SelectionControl.utils.d.ts +2 -0
- package/dist/cjs/helpers/SelectionControl/index.d.ts +3 -0
- package/dist/cjs/helpers/styling/hover.d.ts +0 -2
- package/dist/cjs/hooks/useFloatPosition.d.ts +22 -1
- package/dist/cjs/hooks/useIsMounted.d.ts +2 -0
- package/dist/cjs/index.js +1404 -1534
- package/dist/cjs/test/mocks/ResizeObserver.d.ts +6 -0
- package/dist/components/Card/Card.stories.d.ts +1 -0
- package/dist/components/Card/CardAccordion/CardAccordion.d.ts +4 -0
- package/dist/components/Card/CardAccordion/CardAccordion.js +10 -6
- package/dist/components/Card/CardAccordion/CardAccordionBody.js +41 -15
- package/dist/components/Checkbox/Checkbox.js +13 -6
- package/dist/components/Checkbox/Checkbox.stories.d.ts +1 -0
- package/dist/components/Checkbox/CheckboxGroup.d.ts +1 -1
- package/dist/components/Checkbox/CheckboxGroup.js +26 -23
- package/dist/components/Checkbox/CheckboxGroup.stories.d.ts +6 -1
- package/dist/components/Checkbox/CheckboxGroup.tokens.d.ts +7 -13
- package/dist/components/Checkbox/CheckboxGroup.tokens.js +12 -24
- package/dist/components/Datepicker/Datepicker.js +37 -29
- package/dist/components/Datepicker/Datepicker.stories.d.ts +1 -0
- package/dist/components/Datepicker/Datepicker.tokens.d.ts +21 -3
- package/dist/components/Datepicker/Datepicker.tokens.js +28 -18
- package/dist/components/InputMessage/InputMessage.js +4 -4
- package/dist/components/InputMessage/InputMessage.tokens.d.ts +11 -9
- package/dist/components/InputMessage/InputMessage.tokens.js +15 -21
- package/dist/components/List/List.tokens.d.ts +0 -4
- package/dist/components/List/List.tokens.js +0 -8
- package/dist/components/OverflowMenu/OverflowMenu.js +4 -1
- package/dist/components/Popover/Popover.js +4 -1
- package/dist/components/RadioButton/RadioButton.js +12 -4
- package/dist/components/RadioButton/RadioButtonGroup.d.ts +5 -5
- package/dist/components/RadioButton/RadioButtonGroup.js +11 -9
- package/dist/components/ScrollableContainer/scrollbarStyling.d.ts +1 -1
- package/dist/components/ScrollableContainer/scrollbarStyling.js +2 -1
- package/dist/components/Search/Search.js +32 -11
- package/dist/components/Search/Search.tokens.d.ts +51 -21
- package/dist/components/Search/Search.tokens.js +41 -49
- package/dist/components/Select/CustomSelect.stories.d.ts +2 -2
- package/dist/components/Select/MultiSelect.stories.d.ts +2 -1
- package/dist/components/Select/Select.d.ts +9 -3
- package/dist/components/Select/Select.js +88 -62
- package/dist/components/Select/Select.stories.d.ts +3 -1
- package/dist/components/Select/Select.styles.d.ts +6 -5
- package/dist/components/Select/Select.styles.js +149 -73
- package/dist/components/Select/Select.tokens.d.ts +215 -91
- package/dist/components/Select/Select.tokens.js +171 -279
- package/dist/components/Tabs/Tabs.js +3 -4
- package/dist/components/TextInput/CharCounter.js +1 -2
- package/dist/components/TextInput/TextInput.d.ts +5 -1
- package/dist/components/TextInput/TextInput.js +53 -32
- package/dist/components/TextInput/TextInput.stories.d.ts +3 -0
- package/dist/components/TextInput/TextInput.styles.d.ts +14 -6
- package/dist/components/TextInput/TextInput.styles.js +22 -19
- package/dist/components/TextInput/TextInput.tokens.d.ts +25 -44
- package/dist/components/TextInput/TextInput.tokens.js +35 -41
- package/dist/components/TextInput/TextInput.types.d.ts +3 -0
- package/dist/components/ToggleButton/ToggleButton.tokens.js +5 -4
- package/dist/components/Tooltip/Tooltip.js +3 -1
- package/dist/components/Typography/Link/Link.d.ts +1 -1
- package/dist/components/Typography/Link/Link.stories.d.ts +1 -1
- package/dist/components/Typography/Paragraph/Paragraph.d.ts +1 -1
- package/dist/components/Typography/Paragraph/Paragraph.stories.d.ts +1 -1
- package/dist/components/Typography/Typography/Typography.types.d.ts +2 -3
- package/dist/components/Typography/Typography.tokens.d.ts +3 -89
- package/dist/components/Typography/Typography.tokens.js +16 -72
- package/dist/components/Typography/Typography.utils.js +3 -8
- package/dist/helpers/Input/Input.styles.d.ts +3 -5
- package/dist/helpers/Input/Input.styles.js +20 -28
- package/dist/helpers/Input/Input.tokens.d.ts +52 -29
- package/dist/helpers/Input/Input.tokens.js +36 -54
- package/dist/helpers/Input/Input.types.d.ts +4 -6
- package/dist/helpers/Input/Input.utils.d.ts +3 -0
- package/dist/helpers/Input/Input.utils.js +14 -0
- package/dist/helpers/Input/index.d.ts +1 -0
- package/dist/helpers/SelectionControl/SelectionControl.styles.d.ts +15 -0
- package/dist/helpers/SelectionControl/SelectionControl.styles.js +36 -0
- package/dist/helpers/SelectionControl/SelectionControl.tokens.d.ts +83 -0
- package/dist/helpers/SelectionControl/SelectionControl.tokens.js +100 -0
- package/dist/helpers/SelectionControl/SelectionControl.utils.d.ts +2 -0
- package/dist/helpers/SelectionControl/SelectionControl.utils.js +4 -0
- package/dist/helpers/SelectionControl/index.d.ts +3 -0
- package/dist/helpers/styling/danger.js +1 -1
- package/dist/helpers/styling/focus.js +5 -6
- package/dist/helpers/styling/hover.d.ts +0 -2
- package/dist/helpers/styling/hover.js +2 -4
- package/dist/hooks/useFloatPosition.d.ts +22 -1
- package/dist/hooks/useFloatPosition.js +13 -13
- package/dist/hooks/useIsMounted.d.ts +2 -0
- package/dist/hooks/useIsMounted.js +16 -0
- package/dist/test/mocks/ResizeObserver.d.ts +6 -0
- package/package.json +30 -31
- package/dist/cjs/components/Checkbox/Checkbox.styles.d.ts +0 -5
- package/dist/cjs/components/Checkbox/Checkbox.tokens.d.ts +0 -65
- package/dist/cjs/components/RadioButton/RadioButton.styles.d.ts +0 -5
- package/dist/cjs/components/RadioButton/RadioButton.tokens.d.ts +0 -43
- package/dist/cjs/components/TextInput/CharCounter.tokens.d.ts +0 -4
- package/dist/components/Checkbox/Checkbox.styles.d.ts +0 -5
- package/dist/components/Checkbox/Checkbox.styles.js +0 -38
- package/dist/components/Checkbox/Checkbox.tokens.d.ts +0 -65
- package/dist/components/Checkbox/Checkbox.tokens.js +0 -132
- package/dist/components/RadioButton/RadioButton.styles.d.ts +0 -5
- package/dist/components/RadioButton/RadioButton.styles.js +0 -27
- package/dist/components/RadioButton/RadioButton.tokens.d.ts +0 -43
- package/dist/components/RadioButton/RadioButton.tokens.js +0 -100
- package/dist/components/TextInput/CharCounter.tokens.d.ts +0 -4
- package/dist/components/TextInput/CharCounter.tokens.js +0 -11
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { CSSObject } from 'styled-components';
|
|
2
|
-
export declare const checkboxTokens: {
|
|
3
|
-
checkbox: {
|
|
4
|
-
base: CSSObject;
|
|
5
|
-
spaceLeft: string;
|
|
6
|
-
hover: {
|
|
7
|
-
base: CSSObject;
|
|
8
|
-
};
|
|
9
|
-
disabled: {
|
|
10
|
-
base: CSSObject;
|
|
11
|
-
};
|
|
12
|
-
readOnly: {
|
|
13
|
-
base: CSSObject;
|
|
14
|
-
};
|
|
15
|
-
checked: {
|
|
16
|
-
base: CSSObject;
|
|
17
|
-
hover: {
|
|
18
|
-
base: CSSObject;
|
|
19
|
-
};
|
|
20
|
-
disabled: {
|
|
21
|
-
base: CSSObject;
|
|
22
|
-
};
|
|
23
|
-
readOnly: {
|
|
24
|
-
base: CSSObject;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
indeterminate: {
|
|
28
|
-
base: CSSObject;
|
|
29
|
-
hover: {
|
|
30
|
-
base: CSSObject;
|
|
31
|
-
};
|
|
32
|
-
disabled: {
|
|
33
|
-
base: CSSObject;
|
|
34
|
-
};
|
|
35
|
-
readOnly: {
|
|
36
|
-
base: CSSObject;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
danger: {
|
|
40
|
-
base: CSSObject;
|
|
41
|
-
hover: {
|
|
42
|
-
base: CSSObject;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
checkmark: {
|
|
47
|
-
base: CSSObject;
|
|
48
|
-
color: string;
|
|
49
|
-
indeterminate: {
|
|
50
|
-
base: CSSObject;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
container: {
|
|
54
|
-
base: CSSObject;
|
|
55
|
-
focus: {
|
|
56
|
-
base: CSSObject;
|
|
57
|
-
};
|
|
58
|
-
withLabel: {
|
|
59
|
-
base: CSSObject;
|
|
60
|
-
};
|
|
61
|
-
noLabel: {
|
|
62
|
-
base: CSSObject;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
};
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
-
import 'styled-components';
|
|
3
|
-
import { focusVisible } from '../../helpers/styling/focusVisible.js';
|
|
4
|
-
import { hoverInputfield, hoverDangerInputfield } from '../../helpers/styling/hover.js';
|
|
5
|
-
import '../../helpers/styling/focus.js';
|
|
6
|
-
import { dangerInputfield } from '../../helpers/styling/danger.js';
|
|
7
|
-
import '../../helpers/styling/selection.js';
|
|
8
|
-
|
|
9
|
-
var Colors = ddsBaseTokens.colors,
|
|
10
|
-
Spacing = ddsBaseTokens.spacing,
|
|
11
|
-
FontPackages = ddsBaseTokens.fontPackages,
|
|
12
|
-
BorderRadius = ddsBaseTokens.borderRadius;
|
|
13
|
-
var checkboxBase = {
|
|
14
|
-
border: '1px solid',
|
|
15
|
-
backgroundColor: Colors.DdsColorNeutralsWhite,
|
|
16
|
-
borderColor: Colors.DdsColorNeutralsGray5,
|
|
17
|
-
borderRadius: BorderRadius.RadiiDdsBorderRadius1Radius,
|
|
18
|
-
height: FontPackages.supportingStyle_inputtext_02.base.fontSize,
|
|
19
|
-
width: FontPackages.supportingStyle_inputtext_02.base.fontSize
|
|
20
|
-
};
|
|
21
|
-
var checkboxCheckedBase = {
|
|
22
|
-
borderColor: Colors.DdsColorInteractiveBase,
|
|
23
|
-
backgroundColor: Colors.DdsColorInteractiveBase
|
|
24
|
-
};
|
|
25
|
-
var checkboxDisabledBase = {
|
|
26
|
-
borderColor: Colors.DdsColorNeutralsGray5,
|
|
27
|
-
color: Colors.DdsColorNeutralsGray6
|
|
28
|
-
};
|
|
29
|
-
var checkboxCheckedDisabledBase = {
|
|
30
|
-
borderColor: Colors.DdsColorNeutralsGray6,
|
|
31
|
-
backgroundColor: Colors.DdsColorNeutralsGray6
|
|
32
|
-
};
|
|
33
|
-
var checkboxReadOnlyBase = {
|
|
34
|
-
backgroundColor: 'transparent'
|
|
35
|
-
};
|
|
36
|
-
var checkboxCheckedReadOnlyBase = {
|
|
37
|
-
borderColor: Colors.DdsColorNeutralsGray6,
|
|
38
|
-
backgroundColor: Colors.DdsColorNeutralsGray6
|
|
39
|
-
};
|
|
40
|
-
var checkboxHoverBase = Object.assign({}, hoverInputfield);
|
|
41
|
-
var checkboxCheckedHoverBase = {
|
|
42
|
-
backgroundColor: Colors.DdsColorInteractiveDark,
|
|
43
|
-
boxShadow: "inset 0 0 0 1px ".concat(Colors.DdsColorInteractiveDark),
|
|
44
|
-
borderColor: Colors.DdsColorInteractiveDark
|
|
45
|
-
};
|
|
46
|
-
var checkboxDangerBase = Object.assign({}, dangerInputfield);
|
|
47
|
-
var checkboxDangerHoverBase = Object.assign({}, hoverDangerInputfield);
|
|
48
|
-
var focusBase = Object.assign({}, focusVisible);
|
|
49
|
-
var checkmarkBase = {
|
|
50
|
-
borderWidth: '0 1px 1px 0',
|
|
51
|
-
transform: 'rotate(45deg)',
|
|
52
|
-
left: '35%',
|
|
53
|
-
top: '10%',
|
|
54
|
-
width: '30%',
|
|
55
|
-
height: '65%'
|
|
56
|
-
};
|
|
57
|
-
var checkmarkIndeterminateBase = {
|
|
58
|
-
borderWidth: '1px 0 0 0'
|
|
59
|
-
};
|
|
60
|
-
var containerBase = Object.assign({}, FontPackages.body_sans_02.base);
|
|
61
|
-
var containerWithLabelBase = Object.assign(Object.assign({}, FontPackages.body_sans_02.base), {
|
|
62
|
-
padding: "0 ".concat(Spacing.SizesDdsSpacingLocalX025, " 0 ").concat(FontPackages.supportingStyle_inputtext_02.numbers.fontSizeNumber + Spacing.SizesDdsSpacingLocalX075NumberPx, "px")
|
|
63
|
-
});
|
|
64
|
-
var containerNoLabelBase = {
|
|
65
|
-
padding: "".concat(Spacing.SizesDdsSpacingLocalX075, " ").concat(Spacing.SizesDdsSpacingLocalX0125, " ").concat(Spacing.SizesDdsSpacingLocalX075, " ").concat(Spacing.SizesDdsSpacingLocalX15)
|
|
66
|
-
};
|
|
67
|
-
var checkboxTokens = {
|
|
68
|
-
checkbox: {
|
|
69
|
-
base: checkboxBase,
|
|
70
|
-
spaceLeft: Spacing.SizesDdsSpacingLocalX025,
|
|
71
|
-
hover: {
|
|
72
|
-
base: checkboxHoverBase
|
|
73
|
-
},
|
|
74
|
-
disabled: {
|
|
75
|
-
base: checkboxDisabledBase
|
|
76
|
-
},
|
|
77
|
-
readOnly: {
|
|
78
|
-
base: checkboxReadOnlyBase
|
|
79
|
-
},
|
|
80
|
-
checked: {
|
|
81
|
-
base: checkboxCheckedBase,
|
|
82
|
-
hover: {
|
|
83
|
-
base: checkboxCheckedHoverBase
|
|
84
|
-
},
|
|
85
|
-
disabled: {
|
|
86
|
-
base: checkboxCheckedDisabledBase
|
|
87
|
-
},
|
|
88
|
-
readOnly: {
|
|
89
|
-
base: checkboxCheckedReadOnlyBase
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
indeterminate: {
|
|
93
|
-
base: checkboxCheckedBase,
|
|
94
|
-
hover: {
|
|
95
|
-
base: checkboxCheckedHoverBase
|
|
96
|
-
},
|
|
97
|
-
disabled: {
|
|
98
|
-
base: checkboxCheckedDisabledBase
|
|
99
|
-
},
|
|
100
|
-
readOnly: {
|
|
101
|
-
base: checkboxCheckedReadOnlyBase
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
danger: {
|
|
105
|
-
base: checkboxDangerBase,
|
|
106
|
-
hover: {
|
|
107
|
-
base: checkboxDangerHoverBase
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
checkmark: {
|
|
112
|
-
base: checkmarkBase,
|
|
113
|
-
color: Colors.DdsColorNeutralsWhite,
|
|
114
|
-
indeterminate: {
|
|
115
|
-
base: checkmarkIndeterminateBase
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
container: {
|
|
119
|
-
base: containerBase,
|
|
120
|
-
focus: {
|
|
121
|
-
base: focusBase
|
|
122
|
-
},
|
|
123
|
-
withLabel: {
|
|
124
|
-
base: containerWithLabelBase
|
|
125
|
-
},
|
|
126
|
-
noLabel: {
|
|
127
|
-
base: containerNoLabelBase
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
export { checkboxTokens };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { RadioButtonProps } from './RadioButton.types';
|
|
2
|
-
export declare const CustomRadioButton: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
3
|
-
declare type ContainerProps = Pick<RadioButtonProps, 'error' | 'disabled' | 'readOnly'>;
|
|
4
|
-
export declare const Container: import("styled-components").StyledComponent<"label", any, ContainerProps, never>;
|
|
5
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
|
-
import { radioButtonTokens } from './RadioButton.tokens.js';
|
|
3
|
-
import { focusVisibleTransitionValue } from '../../helpers/styling/focusVisible.js';
|
|
4
|
-
import '../../helpers/styling/hover.js';
|
|
5
|
-
import '../../helpers/styling/focus.js';
|
|
6
|
-
import '../../helpers/styling/danger.js';
|
|
7
|
-
import '../../helpers/styling/selection.js';
|
|
8
|
-
|
|
9
|
-
var CustomRadioButton = styled.span.withConfig({
|
|
10
|
-
displayName: "RadioButtonstyles__CustomRadioButton",
|
|
11
|
-
componentId: "sc-iwypha-0"
|
|
12
|
-
})(["position:absolute;box-sizing:border-box;border-radius:50%;vertical-align:middle;", " left:", ";&:after{content:'';position:absolute;display:none;}"], radioButtonTokens.radioButton.base, radioButtonTokens.radioButton.spaceLeft);
|
|
13
|
-
var Container = styled.label.withConfig({
|
|
14
|
-
displayName: "RadioButtonstyles__Container",
|
|
15
|
-
componentId: "sc-iwypha-1"
|
|
16
|
-
})(["position:relative;display:block;cursor:pointer;user-select:none;width:fit-content;display:flex;align-items:center;", " input:checked ~ ", ":after{display:block;}input ~ ", "{transition:box-shadow 0.2s,background-color 0.2s,border 0.2s;}input:checked ~ ", "{", "}&:hover input:enabled ~ ", "{", "}&:hover input:checked:enabled ~ ", "{", "}&:focus-within{", " transition:", ";}", " ", " ", " ", ":after{border-radius:50%;", "}"], radioButtonTokens.container.base, CustomRadioButton, CustomRadioButton, CustomRadioButton, radioButtonTokens.radioButton.checked.base, CustomRadioButton, radioButtonTokens.radioButton.hover.base, CustomRadioButton, radioButtonTokens.radioButton.checked.hover.base, radioButtonTokens.container.focus.base, focusVisibleTransitionValue, function (_ref) {
|
|
17
|
-
var error = _ref.error;
|
|
18
|
-
return error && css(["input ~ ", "{", "}&:hover input:enabled ~ ", "{", "}"], CustomRadioButton, radioButtonTokens.radioButton.danger.base, CustomRadioButton, radioButtonTokens.radioButton.danger.hover.base);
|
|
19
|
-
}, function (_ref2) {
|
|
20
|
-
var disabled = _ref2.disabled;
|
|
21
|
-
return disabled && css(["cursor:not-allowed;input ~ ", "{", "}input:checked ~ ", "{", "}"], CustomRadioButton, radioButtonTokens.radioButton.disabled.base, CustomRadioButton, radioButtonTokens.radioButton.checked.disabled.base);
|
|
22
|
-
}, function (_ref3) {
|
|
23
|
-
var readOnly = _ref3.readOnly;
|
|
24
|
-
return readOnly && css(["cursor:default;input ~ ", "{", "}input:checked ~ ", "{", "}"], CustomRadioButton, radioButtonTokens.radioButton.readOnly.base, CustomRadioButton, radioButtonTokens.radioButton.checked.readOnly.base);
|
|
25
|
-
}, CustomRadioButton, radioButtonTokens.checkmark.base);
|
|
26
|
-
|
|
27
|
-
export { Container, CustomRadioButton };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { CSSObject } from 'styled-components';
|
|
2
|
-
export declare const radioButtonTokens: {
|
|
3
|
-
radioButton: {
|
|
4
|
-
base: CSSObject;
|
|
5
|
-
spaceLeft: string;
|
|
6
|
-
hover: {
|
|
7
|
-
base: CSSObject;
|
|
8
|
-
};
|
|
9
|
-
disabled: {
|
|
10
|
-
base: CSSObject;
|
|
11
|
-
};
|
|
12
|
-
readOnly: {
|
|
13
|
-
base: CSSObject;
|
|
14
|
-
};
|
|
15
|
-
checked: {
|
|
16
|
-
base: CSSObject;
|
|
17
|
-
hover: {
|
|
18
|
-
base: CSSObject;
|
|
19
|
-
};
|
|
20
|
-
disabled: {
|
|
21
|
-
base: CSSObject;
|
|
22
|
-
};
|
|
23
|
-
readOnly: {
|
|
24
|
-
base: CSSObject;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
danger: {
|
|
28
|
-
base: CSSObject;
|
|
29
|
-
hover: {
|
|
30
|
-
base: CSSObject;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
checkmark: {
|
|
35
|
-
base: CSSObject;
|
|
36
|
-
};
|
|
37
|
-
container: {
|
|
38
|
-
base: CSSObject;
|
|
39
|
-
focus: {
|
|
40
|
-
base: CSSObject;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
-
import 'styled-components';
|
|
3
|
-
import { focusVisible } from '../../helpers/styling/focusVisible.js';
|
|
4
|
-
import { hoverInputfield, hoverDangerInputfield } from '../../helpers/styling/hover.js';
|
|
5
|
-
import '../../helpers/styling/focus.js';
|
|
6
|
-
import { dangerInputfield } from '../../helpers/styling/danger.js';
|
|
7
|
-
import '../../helpers/styling/selection.js';
|
|
8
|
-
|
|
9
|
-
var Colors = ddsBaseTokens.colors,
|
|
10
|
-
Spacing = ddsBaseTokens.spacing,
|
|
11
|
-
FontPackages = ddsBaseTokens.fontPackages;
|
|
12
|
-
var radioButtonBase = {
|
|
13
|
-
border: '1px solid',
|
|
14
|
-
borderColor: Colors.DdsColorNeutralsGray5,
|
|
15
|
-
backgroundColor: Colors.DdsColorNeutralsWhite,
|
|
16
|
-
height: FontPackages.supportingStyle_inputtext_02.numbers.fontSizeNumber,
|
|
17
|
-
width: FontPackages.supportingStyle_inputtext_02.numbers.fontSizeNumber
|
|
18
|
-
};
|
|
19
|
-
var radioButtonHoverBase = Object.assign({}, hoverInputfield);
|
|
20
|
-
var radioButtonDisabledBase = {
|
|
21
|
-
borderColor: Colors.DdsColorNeutralsGray5,
|
|
22
|
-
color: Colors.DdsColorNeutralsGray6
|
|
23
|
-
};
|
|
24
|
-
var radioButtonReadOnlyBase = {
|
|
25
|
-
backgroundColor: 'transparent'
|
|
26
|
-
};
|
|
27
|
-
var radioButtonDangerBase = Object.assign({}, dangerInputfield);
|
|
28
|
-
var radioButtonDangerHoverBase = Object.assign({}, hoverDangerInputfield);
|
|
29
|
-
var radioButtonCheckedBase = {
|
|
30
|
-
backgroundColor: Colors.DdsColorInteractiveBase,
|
|
31
|
-
borderColor: Colors.DdsColorInteractiveBase
|
|
32
|
-
};
|
|
33
|
-
var radioButtonCheckedHoverBase = {
|
|
34
|
-
backgroundColor: Colors.DdsColorInteractiveDark,
|
|
35
|
-
borderColor: Colors.DdsColorInteractiveDark,
|
|
36
|
-
boxShadow: "inset 0 0 0 1px ".concat(Colors.DdsColorInteractiveDark)
|
|
37
|
-
};
|
|
38
|
-
var radioButtonCheckedDisabledBase = {
|
|
39
|
-
borderColor: Colors.DdsColorNeutralsGray6,
|
|
40
|
-
backgroundColor: Colors.DdsColorNeutralsGray6
|
|
41
|
-
};
|
|
42
|
-
var radioButtonCheckedReadOnlyBase = {
|
|
43
|
-
borderColor: Colors.DdsColorNeutralsGray6,
|
|
44
|
-
backgroundColor: Colors.DdsColorNeutralsGray6
|
|
45
|
-
};
|
|
46
|
-
var checkmarkBase = {
|
|
47
|
-
backgroundColor: Colors.DdsColorNeutralsWhite,
|
|
48
|
-
height: Spacing.SizesDdsSpacingLocalX05,
|
|
49
|
-
width: Spacing.SizesDdsSpacingLocalX05,
|
|
50
|
-
left: "calc(50% - ".concat(Spacing.SizesDdsSpacingLocalX05NumberPx / 2, "px)"),
|
|
51
|
-
top: "calc(50% - ".concat(Spacing.SizesDdsSpacingLocalX05NumberPx / 2, "px)")
|
|
52
|
-
};
|
|
53
|
-
var containerBase = {
|
|
54
|
-
padding: "0 ".concat(Spacing.SizesDdsSpacingLocalX025, " 0 ").concat(20 + Spacing.SizesDdsSpacingLocalX075NumberPx, "px")
|
|
55
|
-
};
|
|
56
|
-
var focusBase = Object.assign({}, focusVisible);
|
|
57
|
-
var radioButtonTokens = {
|
|
58
|
-
radioButton: {
|
|
59
|
-
base: radioButtonBase,
|
|
60
|
-
spaceLeft: Spacing.SizesDdsSpacingLocalX025,
|
|
61
|
-
hover: {
|
|
62
|
-
base: radioButtonHoverBase
|
|
63
|
-
},
|
|
64
|
-
disabled: {
|
|
65
|
-
base: radioButtonDisabledBase
|
|
66
|
-
},
|
|
67
|
-
readOnly: {
|
|
68
|
-
base: radioButtonReadOnlyBase
|
|
69
|
-
},
|
|
70
|
-
checked: {
|
|
71
|
-
base: radioButtonCheckedBase,
|
|
72
|
-
hover: {
|
|
73
|
-
base: radioButtonCheckedHoverBase
|
|
74
|
-
},
|
|
75
|
-
disabled: {
|
|
76
|
-
base: radioButtonCheckedDisabledBase
|
|
77
|
-
},
|
|
78
|
-
readOnly: {
|
|
79
|
-
base: radioButtonCheckedReadOnlyBase
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
danger: {
|
|
83
|
-
base: radioButtonDangerBase,
|
|
84
|
-
hover: {
|
|
85
|
-
base: radioButtonDangerHoverBase
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
checkmark: {
|
|
90
|
-
base: checkmarkBase
|
|
91
|
-
},
|
|
92
|
-
container: {
|
|
93
|
-
base: containerBase,
|
|
94
|
-
focus: {
|
|
95
|
-
base: focusBase
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
export { radioButtonTokens };
|
|
@@ -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 };
|