@digigov/react-core 1.0.0-8ae63a77 → 1.0.0-8bbf3ef2
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/AccessibilityMenuHeaderButton/index.d.ts +1 -1
- package/BottomInfo/__snapshots__/index.test.tsx.snap +7 -2
- package/BottomInfoContainer/__snapshots__/index.test.tsx.snap +7 -2
- package/Button/__snapshots__/index.test.tsx.snap +18 -0
- package/Button/index.d.ts +8 -1
- package/Button/index.js +3 -2
- package/Button/index.test.js +17 -9
- package/Checkbox/__snapshots__/index.test.tsx.snap +76 -0
- package/Checkbox/index.d.ts +8 -1
- package/Checkbox/index.js +3 -2
- package/Checkbox/index.test.js +8 -0
- package/CloseButton/__snapshots__/index.test.tsx.snap +53 -0
- package/CloseButton/index.d.ts +7 -1
- package/CloseButton/index.js +4 -3
- package/CloseButton/index.test.js +8 -0
- package/Container/__snapshots__/index.test.tsx.snap +14 -4
- package/CopyToClipboardContainer/__snapshots__/index.spec.tsx.snap +21 -0
- package/CopyToClipboardContainer/index.d.ts +9 -1
- package/CopyToClipboardContainer/index.js +3 -2
- package/CopyToClipboardContainer/index.spec.js +8 -0
- package/DateInputContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/DateInputContainer/index.d.ts +8 -1
- package/DateInputContainer/index.js +4 -3
- package/DateInputContainer/index.test.js +8 -0
- package/ErrorSummary/__snapshots__/index.test.tsx.snap +39 -0
- package/ErrorSummary/index.d.ts +8 -1
- package/ErrorSummary/index.js +4 -2
- package/ErrorSummary/index.test.js +8 -0
- package/ImageLogo/__snapshots__/index.test.tsx.snap +5 -3
- package/ModalContainer/index.d.ts +8 -1
- package/ModalContainer/index.js +3 -2
- package/Nav/__snapshots__/index.test.tsx.snap +91 -4
- package/Nav/index.d.ts +30 -15
- package/Nav/index.js +18 -9
- package/Nav/index.test.js +42 -0
- package/NavListItemAction/index.d.ts +1 -1
- package/NavListItemButton/index.d.ts +1 -1
- package/NavMenuContainer/__snapshots__/index.test.tsx.snap +104 -0
- package/NavMenuContainer/index.test.js +24 -0
- package/NotificationBannerContainer/__snapshots__/index.test.tsx.snap +23 -0
- package/NotificationBannerContainer/index.d.ts +8 -1
- package/NotificationBannerContainer/index.js +3 -2
- package/NotificationBannerContainer/index.test.js +8 -0
- package/RadioContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/RadioContainer/index.d.ts +8 -1
- package/RadioContainer/index.js +5 -4
- package/RadioContainer/index.test.js +8 -0
- package/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
- package/SearchButton/index.d.ts +1 -1
- package/SelectContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/SelectContainer/index.d.ts +8 -1
- package/SelectContainer/index.js +4 -3
- package/SelectContainer/index.test.js +9 -1
- package/SingleCharacterInput/index.d.ts +1 -1
- package/StepNav/__snapshots__/index.test.tsx.snap +2 -2
- package/Tabs/index.d.ts +2 -1
- package/Tabs/index.js +4 -3
- package/TaskList/__snapshots__/index.test.tsx.snap +2 -2
- package/TextArea/__snapshots__/index.test.tsx.snap +19 -0
- package/TextArea/index.d.ts +8 -1
- package/TextArea/index.js +6 -5
- package/TextArea/index.test.js +8 -0
- package/TextInput/__snapshots__/index.test.tsx.snap +17 -0
- package/TextInput/index.d.ts +8 -1
- package/TextInput/index.js +3 -2
- package/TextInput/index.test.js +91 -83
- package/WarningText/__snapshots__/index.test.tsx.snap +31 -0
- package/WarningText/index.d.ts +8 -1
- package/WarningText/index.js +3 -2
- package/WarningText/index.test.js +8 -0
- package/es/BottomInfo/__snapshots__/index.test.tsx.snap +7 -2
- package/es/BottomInfoContainer/__snapshots__/index.test.tsx.snap +7 -2
- package/es/Button/__snapshots__/index.test.tsx.snap +18 -0
- package/es/Button/index.js +3 -2
- package/es/Button/index.test.js +17 -9
- package/es/Checkbox/__snapshots__/index.test.tsx.snap +76 -0
- package/es/Checkbox/index.js +3 -2
- package/es/Checkbox/index.test.js +8 -0
- package/es/CloseButton/__snapshots__/index.test.tsx.snap +53 -0
- package/es/CloseButton/index.js +4 -3
- package/es/CloseButton/index.test.js +8 -0
- package/es/Container/__snapshots__/index.test.tsx.snap +14 -4
- package/es/CopyToClipboardContainer/__snapshots__/index.spec.tsx.snap +21 -0
- package/es/CopyToClipboardContainer/index.js +3 -2
- package/es/CopyToClipboardContainer/index.spec.js +8 -0
- package/es/DateInputContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/es/DateInputContainer/index.js +4 -3
- package/es/DateInputContainer/index.test.js +8 -0
- package/es/ErrorSummary/__snapshots__/index.test.tsx.snap +39 -0
- package/es/ErrorSummary/index.js +4 -2
- package/es/ErrorSummary/index.test.js +8 -0
- package/es/ImageLogo/__snapshots__/index.test.tsx.snap +5 -3
- package/es/ModalContainer/index.js +3 -2
- package/es/Nav/__snapshots__/index.test.tsx.snap +91 -4
- package/es/Nav/index.js +17 -9
- package/es/Nav/index.test.js +42 -0
- package/es/NavMenuContainer/__snapshots__/index.test.tsx.snap +104 -0
- package/es/NavMenuContainer/index.test.js +24 -0
- package/es/NotificationBannerContainer/__snapshots__/index.test.tsx.snap +23 -0
- package/es/NotificationBannerContainer/index.js +3 -2
- package/es/NotificationBannerContainer/index.test.js +8 -0
- package/es/RadioContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/es/RadioContainer/index.js +5 -4
- package/es/RadioContainer/index.test.js +8 -0
- package/es/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
- package/es/SelectContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/es/SelectContainer/index.js +4 -3
- package/es/SelectContainer/index.test.js +9 -1
- package/es/StepNav/__snapshots__/index.test.tsx.snap +2 -2
- package/es/Tabs/index.js +4 -3
- package/es/TaskList/__snapshots__/index.test.tsx.snap +2 -2
- package/es/TextArea/__snapshots__/index.test.tsx.snap +19 -0
- package/es/TextArea/index.js +6 -5
- package/es/TextArea/index.test.js +8 -0
- package/es/TextInput/__snapshots__/index.test.tsx.snap +17 -0
- package/es/TextInput/index.js +3 -2
- package/es/TextInput/index.test.js +91 -83
- package/es/WarningText/__snapshots__/index.test.tsx.snap +31 -0
- package/es/WarningText/index.js +3 -2
- package/es/WarningText/index.test.js +8 -0
- package/esm/BottomInfo/__snapshots__/index.test.tsx.snap +7 -2
- package/esm/BottomInfoContainer/__snapshots__/index.test.tsx.snap +7 -2
- package/esm/Button/__snapshots__/index.test.tsx.snap +18 -0
- package/esm/Button/index.js +3 -2
- package/esm/Button/index.test.js +17 -9
- package/esm/Checkbox/__snapshots__/index.test.tsx.snap +76 -0
- package/esm/Checkbox/index.js +3 -2
- package/esm/Checkbox/index.test.js +8 -0
- package/esm/CloseButton/__snapshots__/index.test.tsx.snap +53 -0
- package/esm/CloseButton/index.js +4 -3
- package/esm/CloseButton/index.test.js +8 -0
- package/esm/Container/__snapshots__/index.test.tsx.snap +14 -4
- package/esm/CopyToClipboardContainer/__snapshots__/index.spec.tsx.snap +21 -0
- package/esm/CopyToClipboardContainer/index.js +3 -2
- package/esm/CopyToClipboardContainer/index.spec.js +8 -0
- package/esm/DateInputContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/esm/DateInputContainer/index.js +4 -3
- package/esm/DateInputContainer/index.test.js +8 -0
- package/esm/ErrorSummary/__snapshots__/index.test.tsx.snap +39 -0
- package/esm/ErrorSummary/index.js +4 -2
- package/esm/ErrorSummary/index.test.js +8 -0
- package/esm/ImageLogo/__snapshots__/index.test.tsx.snap +5 -3
- package/esm/ModalContainer/index.js +3 -2
- package/esm/Nav/__snapshots__/index.test.tsx.snap +91 -4
- package/esm/Nav/index.js +17 -9
- package/esm/Nav/index.test.js +42 -0
- package/esm/NavMenuContainer/__snapshots__/index.test.tsx.snap +104 -0
- package/esm/NavMenuContainer/index.test.js +24 -0
- package/esm/NotificationBannerContainer/__snapshots__/index.test.tsx.snap +23 -0
- package/esm/NotificationBannerContainer/index.js +3 -2
- package/esm/NotificationBannerContainer/index.test.js +8 -0
- package/esm/RadioContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/esm/RadioContainer/index.js +5 -4
- package/esm/RadioContainer/index.test.js +8 -0
- package/esm/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
- package/esm/SelectContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/esm/SelectContainer/index.js +4 -3
- package/esm/SelectContainer/index.test.js +9 -1
- package/esm/StepNav/__snapshots__/index.test.tsx.snap +2 -2
- package/esm/Tabs/index.js +4 -3
- package/esm/TaskList/__snapshots__/index.test.tsx.snap +2 -2
- package/esm/TextArea/__snapshots__/index.test.tsx.snap +19 -0
- package/esm/TextArea/index.js +6 -5
- package/esm/TextArea/index.test.js +8 -0
- package/esm/TextInput/__snapshots__/index.test.tsx.snap +17 -0
- package/esm/TextInput/index.js +3 -2
- package/esm/TextInput/index.test.js +91 -83
- package/esm/WarningText/__snapshots__/index.test.tsx.snap +31 -0
- package/esm/WarningText/index.js +3 -2
- package/esm/WarningText/index.test.js +8 -0
- package/esm/index.js +1 -1
- package/package.json +3 -3
- package/src/BottomInfo/__snapshots__/index.test.tsx.snap +7 -2
- package/src/BottomInfoContainer/__snapshots__/index.test.tsx.snap +7 -2
- package/src/Button/__snapshots__/index.test.tsx.snap +18 -0
- package/src/Button/index.test.tsx +3 -0
- package/src/Button/index.tsx +9 -0
- package/src/Checkbox/__snapshots__/index.test.tsx.snap +76 -0
- package/src/Checkbox/index.test.tsx +10 -0
- package/src/Checkbox/index.tsx +9 -1
- package/src/CloseButton/__snapshots__/index.test.tsx.snap +53 -0
- package/src/CloseButton/index.test.tsx +3 -0
- package/src/CloseButton/index.tsx +10 -3
- package/src/Container/__snapshots__/index.test.tsx.snap +14 -4
- package/src/CopyToClipboardContainer/__snapshots__/index.spec.tsx.snap +21 -0
- package/src/CopyToClipboardContainer/index.spec.tsx +8 -2
- package/src/CopyToClipboardContainer/index.tsx +10 -1
- package/src/DateInputContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/src/DateInputContainer/index.test.tsx +5 -0
- package/src/DateInputContainer/index.tsx +11 -2
- package/src/ErrorSummary/__snapshots__/index.test.tsx.snap +39 -0
- package/src/ErrorSummary/index.test.tsx +4 -0
- package/src/ErrorSummary/index.tsx +12 -5
- package/src/ImageLogo/__snapshots__/index.test.tsx.snap +5 -3
- package/src/ModalContainer/index.tsx +9 -1
- package/src/Nav/__snapshots__/index.test.tsx.snap +91 -4
- package/src/Nav/index.test.tsx +15 -0
- package/src/Nav/index.tsx +53 -20
- package/src/NavMenuContainer/__snapshots__/index.test.tsx.snap +104 -0
- package/src/NavMenuContainer/index.test.tsx +9 -0
- package/src/NotificationBannerContainer/__snapshots__/index.test.tsx.snap +23 -0
- package/src/NotificationBannerContainer/index.test.tsx +7 -0
- package/src/NotificationBannerContainer/index.tsx +9 -1
- package/src/RadioContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/src/RadioContainer/index.test.tsx +3 -0
- package/src/RadioContainer/index.tsx +9 -1
- package/src/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
- package/src/SelectContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/src/SelectContainer/index.test.tsx +5 -0
- package/src/SelectContainer/index.tsx +11 -2
- package/src/StepNav/__snapshots__/index.test.tsx.snap +2 -2
- package/src/Tabs/index.tsx +5 -2
- package/src/TaskList/__snapshots__/index.test.tsx.snap +2 -2
- package/src/TextArea/__snapshots__/index.test.tsx.snap +19 -0
- package/src/TextArea/index.test.tsx +3 -0
- package/src/TextArea/index.tsx +11 -2
- package/src/TextInput/__snapshots__/index.test.tsx.snap +17 -0
- package/src/TextInput/index.test.tsx +3 -0
- package/src/TextInput/index.tsx +9 -0
- package/src/WarningText/__snapshots__/index.test.tsx.snap +31 -0
- package/src/WarningText/index.test.tsx +3 -0
- package/src/WarningText/index.tsx +9 -1
package/TextInput/index.test.js
CHANGED
|
@@ -15,367 +15,375 @@ it('renders the TextInput with no props', function () {
|
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
var _ref2 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
18
|
-
|
|
18
|
+
dense: true
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
it('renders the TextInput with
|
|
21
|
+
it('renders the TextInput with dense prop', function () {
|
|
22
22
|
expect((0, _enzyme.mount)(_ref2)).toMatchSnapshot();
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
var _ref3 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
26
|
-
maxWidth: "
|
|
26
|
+
maxWidth: "2-char"
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
it('renders the TextInput with maxWidth="
|
|
29
|
+
it('renders the TextInput with maxWidth="2-char"', function () {
|
|
30
30
|
expect((0, _enzyme.mount)(_ref3)).toMatchSnapshot();
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
var _ref4 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
34
|
-
maxWidth: "
|
|
34
|
+
maxWidth: "3-char"
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
it('renders the TextInput with maxWidth="
|
|
37
|
+
it('renders the TextInput with maxWidth="3-char"', function () {
|
|
38
38
|
expect((0, _enzyme.mount)(_ref4)).toMatchSnapshot();
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
var _ref5 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
42
|
-
maxWidth: "
|
|
42
|
+
maxWidth: "4-char"
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
-
it('renders the TextInput with maxWidth="
|
|
45
|
+
it('renders the TextInput with maxWidth="4-char"', function () {
|
|
46
46
|
expect((0, _enzyme.mount)(_ref5)).toMatchSnapshot();
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
var _ref6 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
50
|
-
maxWidth: "
|
|
50
|
+
maxWidth: "5-char"
|
|
51
51
|
});
|
|
52
52
|
|
|
53
|
-
it('renders the TextInput with maxWidth="
|
|
53
|
+
it('renders the TextInput with maxWidth="5-char"', function () {
|
|
54
54
|
expect((0, _enzyme.mount)(_ref6)).toMatchSnapshot();
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
var _ref7 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
58
|
-
maxWidth: "
|
|
58
|
+
maxWidth: "10-char"
|
|
59
59
|
});
|
|
60
60
|
|
|
61
|
-
it('renders the TextInput with maxWidth="
|
|
61
|
+
it('renders the TextInput with maxWidth="10-char"', function () {
|
|
62
62
|
expect((0, _enzyme.mount)(_ref7)).toMatchSnapshot();
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
var _ref8 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
66
|
-
|
|
66
|
+
maxWidth: "20-char"
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
-
it('renders the TextInput with
|
|
69
|
+
it('renders the TextInput with maxWidth="20-char"', function () {
|
|
70
70
|
expect((0, _enzyme.mount)(_ref8)).toMatchSnapshot();
|
|
71
71
|
});
|
|
72
72
|
|
|
73
73
|
var _ref9 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
74
|
-
width: '
|
|
74
|
+
width: '25%'
|
|
75
75
|
});
|
|
76
76
|
|
|
77
|
-
it('renders the TextInput with width=one-
|
|
77
|
+
it('renders the TextInput with width=one-quarter', function () {
|
|
78
78
|
expect((0, _enzyme.mount)(_ref9)).toMatchSnapshot();
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
var _ref10 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
82
|
-
width: '
|
|
82
|
+
width: '33.3%'
|
|
83
83
|
});
|
|
84
84
|
|
|
85
|
-
it('renders the TextInput with width=one-
|
|
85
|
+
it('renders the TextInput with width=one-third', function () {
|
|
86
86
|
expect((0, _enzyme.mount)(_ref10)).toMatchSnapshot();
|
|
87
87
|
});
|
|
88
88
|
|
|
89
89
|
var _ref11 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
90
|
-
width: '
|
|
90
|
+
width: '50%'
|
|
91
91
|
});
|
|
92
92
|
|
|
93
|
-
it('renders the TextInput with width=
|
|
93
|
+
it('renders the TextInput with width=one-half', function () {
|
|
94
94
|
expect((0, _enzyme.mount)(_ref11)).toMatchSnapshot();
|
|
95
95
|
});
|
|
96
96
|
|
|
97
97
|
var _ref12 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
98
|
-
width: '
|
|
98
|
+
width: '66.6%'
|
|
99
99
|
});
|
|
100
100
|
|
|
101
|
-
it('renders the TextInput with width=
|
|
101
|
+
it('renders the TextInput with width=two-thirds', function () {
|
|
102
102
|
expect((0, _enzyme.mount)(_ref12)).toMatchSnapshot();
|
|
103
103
|
});
|
|
104
104
|
|
|
105
105
|
var _ref13 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
106
|
-
width: '
|
|
106
|
+
width: '75%'
|
|
107
107
|
});
|
|
108
108
|
|
|
109
|
-
it('renders the TextInput with width=
|
|
109
|
+
it('renders the TextInput with width=three-quarters', function () {
|
|
110
110
|
expect((0, _enzyme.mount)(_ref13)).toMatchSnapshot();
|
|
111
111
|
});
|
|
112
112
|
|
|
113
113
|
var _ref14 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
114
|
+
width: 'full'
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
it('renders the TextInput with width=full', function () {
|
|
118
|
+
expect((0, _enzyme.mount)(_ref14)).toMatchSnapshot();
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
var _ref15 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
114
122
|
maxWidth: "2-char",
|
|
115
123
|
width: '25%'
|
|
116
124
|
});
|
|
117
125
|
|
|
118
126
|
it('renders the TextInput with maxWidth="2-char" and with width=one-quarter', function () {
|
|
119
|
-
expect((0, _enzyme.mount)(
|
|
127
|
+
expect((0, _enzyme.mount)(_ref15)).toMatchSnapshot();
|
|
120
128
|
});
|
|
121
129
|
|
|
122
|
-
var
|
|
130
|
+
var _ref16 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
123
131
|
maxWidth: "3-char",
|
|
124
132
|
width: '25%'
|
|
125
133
|
});
|
|
126
134
|
|
|
127
135
|
it('renders the TextInput with maxWidth="3-char" and with width=one-quarter', function () {
|
|
128
|
-
expect((0, _enzyme.mount)(
|
|
136
|
+
expect((0, _enzyme.mount)(_ref16)).toMatchSnapshot();
|
|
129
137
|
});
|
|
130
138
|
|
|
131
|
-
var
|
|
139
|
+
var _ref17 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
132
140
|
maxWidth: "4-char",
|
|
133
141
|
width: '25%'
|
|
134
142
|
});
|
|
135
143
|
|
|
136
144
|
it('renders the TextInput with maxWidth="4-char" and with width=one-quarter', function () {
|
|
137
|
-
expect((0, _enzyme.mount)(
|
|
145
|
+
expect((0, _enzyme.mount)(_ref17)).toMatchSnapshot();
|
|
138
146
|
});
|
|
139
147
|
|
|
140
|
-
var
|
|
148
|
+
var _ref18 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
141
149
|
maxWidth: "5-char",
|
|
142
150
|
width: '25%'
|
|
143
151
|
});
|
|
144
152
|
|
|
145
153
|
it('renders the TextInput with with maxWidth="5-char" with width=one-quarter', function () {
|
|
146
|
-
expect((0, _enzyme.mount)(
|
|
154
|
+
expect((0, _enzyme.mount)(_ref18)).toMatchSnapshot();
|
|
147
155
|
});
|
|
148
156
|
|
|
149
|
-
var
|
|
157
|
+
var _ref19 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
150
158
|
maxWidth: "20-char",
|
|
151
159
|
width: '25%'
|
|
152
160
|
});
|
|
153
161
|
|
|
154
162
|
it('renders the TextInput with maxWidth="20-char" and with width=one-quarter', function () {
|
|
155
|
-
expect((0, _enzyme.mount)(
|
|
163
|
+
expect((0, _enzyme.mount)(_ref19)).toMatchSnapshot();
|
|
156
164
|
});
|
|
157
165
|
|
|
158
|
-
var
|
|
166
|
+
var _ref20 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
159
167
|
maxWidth: "2-char",
|
|
160
168
|
width: '33.3%'
|
|
161
169
|
});
|
|
162
170
|
|
|
163
171
|
it('renders the TextInput with maxWidth="2-char" and with width=one-third', function () {
|
|
164
|
-
expect((0, _enzyme.mount)(
|
|
172
|
+
expect((0, _enzyme.mount)(_ref20)).toMatchSnapshot();
|
|
165
173
|
});
|
|
166
174
|
|
|
167
|
-
var
|
|
175
|
+
var _ref21 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
168
176
|
maxWidth: "3-char",
|
|
169
177
|
width: '33.3%'
|
|
170
178
|
});
|
|
171
179
|
|
|
172
180
|
it('renders the TextInput with maxWidth="3-char" and with width=one-third', function () {
|
|
173
|
-
expect((0, _enzyme.mount)(
|
|
181
|
+
expect((0, _enzyme.mount)(_ref21)).toMatchSnapshot();
|
|
174
182
|
});
|
|
175
183
|
|
|
176
|
-
var
|
|
184
|
+
var _ref22 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
177
185
|
maxWidth: "4-char",
|
|
178
186
|
width: '33.3%'
|
|
179
187
|
});
|
|
180
188
|
|
|
181
189
|
it('renders the TextInput with maxWidth="4-char" and with width=one-third', function () {
|
|
182
|
-
expect((0, _enzyme.mount)(
|
|
190
|
+
expect((0, _enzyme.mount)(_ref22)).toMatchSnapshot();
|
|
183
191
|
});
|
|
184
192
|
|
|
185
|
-
var
|
|
193
|
+
var _ref23 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
186
194
|
maxWidth: "5-char",
|
|
187
195
|
width: '33.3%'
|
|
188
196
|
});
|
|
189
197
|
|
|
190
198
|
it('renders the TextInput with with maxWidth="5-char" with width=one-third', function () {
|
|
191
|
-
expect((0, _enzyme.mount)(
|
|
199
|
+
expect((0, _enzyme.mount)(_ref23)).toMatchSnapshot();
|
|
192
200
|
});
|
|
193
201
|
|
|
194
|
-
var
|
|
202
|
+
var _ref24 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
195
203
|
maxWidth: "20-char",
|
|
196
204
|
width: '33.3%'
|
|
197
205
|
});
|
|
198
206
|
|
|
199
207
|
it('renders the TextInput with maxWidth="20-char" and with width=one-third', function () {
|
|
200
|
-
expect((0, _enzyme.mount)(
|
|
208
|
+
expect((0, _enzyme.mount)(_ref24)).toMatchSnapshot();
|
|
201
209
|
});
|
|
202
210
|
|
|
203
|
-
var
|
|
211
|
+
var _ref25 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
204
212
|
maxWidth: "2-char",
|
|
205
213
|
width: '50%'
|
|
206
214
|
});
|
|
207
215
|
|
|
208
216
|
it('renders the TextInput with maxWidth="2-char" and with width=one-half', function () {
|
|
209
|
-
expect((0, _enzyme.mount)(
|
|
217
|
+
expect((0, _enzyme.mount)(_ref25)).toMatchSnapshot();
|
|
210
218
|
});
|
|
211
219
|
|
|
212
|
-
var
|
|
220
|
+
var _ref26 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
213
221
|
maxWidth: "3-char",
|
|
214
222
|
width: '50%'
|
|
215
223
|
});
|
|
216
224
|
|
|
217
225
|
it('renders the TextInput with maxWidth="3-char" and with width=one-half', function () {
|
|
218
|
-
expect((0, _enzyme.mount)(
|
|
226
|
+
expect((0, _enzyme.mount)(_ref26)).toMatchSnapshot();
|
|
219
227
|
});
|
|
220
228
|
|
|
221
|
-
var
|
|
229
|
+
var _ref27 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
222
230
|
maxWidth: "4-char",
|
|
223
231
|
width: '50%'
|
|
224
232
|
});
|
|
225
233
|
|
|
226
234
|
it('renders the TextInput with maxWidth="4-char" and with width=one-half', function () {
|
|
227
|
-
expect((0, _enzyme.mount)(
|
|
235
|
+
expect((0, _enzyme.mount)(_ref27)).toMatchSnapshot();
|
|
228
236
|
});
|
|
229
237
|
|
|
230
|
-
var
|
|
238
|
+
var _ref28 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
231
239
|
maxWidth: "5-char",
|
|
232
240
|
width: '50%'
|
|
233
241
|
});
|
|
234
242
|
|
|
235
243
|
it('renders the TextInput with with maxWidth="5-char" with width=one-half', function () {
|
|
236
|
-
expect((0, _enzyme.mount)(
|
|
244
|
+
expect((0, _enzyme.mount)(_ref28)).toMatchSnapshot();
|
|
237
245
|
});
|
|
238
246
|
|
|
239
|
-
var
|
|
247
|
+
var _ref29 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
240
248
|
maxWidth: "20-char",
|
|
241
249
|
width: '50%'
|
|
242
250
|
});
|
|
243
251
|
|
|
244
252
|
it('renders the TextInput with maxWidth="20-char" and with width=one-half', function () {
|
|
245
|
-
expect((0, _enzyme.mount)(
|
|
253
|
+
expect((0, _enzyme.mount)(_ref29)).toMatchSnapshot();
|
|
246
254
|
});
|
|
247
255
|
|
|
248
|
-
var
|
|
256
|
+
var _ref30 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
249
257
|
maxWidth: "2-char",
|
|
250
258
|
width: '66.6%'
|
|
251
259
|
});
|
|
252
260
|
|
|
253
261
|
it('renders the TextInput with maxWidth="2-char" and with width=two-thirds', function () {
|
|
254
|
-
expect((0, _enzyme.mount)(
|
|
262
|
+
expect((0, _enzyme.mount)(_ref30)).toMatchSnapshot();
|
|
255
263
|
});
|
|
256
264
|
|
|
257
|
-
var
|
|
265
|
+
var _ref31 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
258
266
|
maxWidth: "3-char",
|
|
259
267
|
width: '66.6%'
|
|
260
268
|
});
|
|
261
269
|
|
|
262
270
|
it('renders the TextInput with maxWidth="3-char" and with width=two-thirds', function () {
|
|
263
|
-
expect((0, _enzyme.mount)(
|
|
271
|
+
expect((0, _enzyme.mount)(_ref31)).toMatchSnapshot();
|
|
264
272
|
});
|
|
265
273
|
|
|
266
|
-
var
|
|
274
|
+
var _ref32 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
267
275
|
maxWidth: "4-char",
|
|
268
276
|
width: '66.6%'
|
|
269
277
|
});
|
|
270
278
|
|
|
271
279
|
it('renders the TextInput with maxWidth="4-char" and with width=two-thirds', function () {
|
|
272
|
-
expect((0, _enzyme.mount)(
|
|
280
|
+
expect((0, _enzyme.mount)(_ref32)).toMatchSnapshot();
|
|
273
281
|
});
|
|
274
282
|
|
|
275
|
-
var
|
|
283
|
+
var _ref33 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
276
284
|
maxWidth: "5-char",
|
|
277
285
|
width: '66.6%'
|
|
278
286
|
});
|
|
279
287
|
|
|
280
288
|
it('renders the TextInput with with maxWidth="5-char" with width=two-thirds', function () {
|
|
281
|
-
expect((0, _enzyme.mount)(
|
|
289
|
+
expect((0, _enzyme.mount)(_ref33)).toMatchSnapshot();
|
|
282
290
|
});
|
|
283
291
|
|
|
284
|
-
var
|
|
292
|
+
var _ref34 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
285
293
|
maxWidth: "20-char",
|
|
286
294
|
width: '66.6%'
|
|
287
295
|
});
|
|
288
296
|
|
|
289
297
|
it('renders the TextInput with maxWidth="20-char" and with width=two-thirds', function () {
|
|
290
|
-
expect((0, _enzyme.mount)(
|
|
298
|
+
expect((0, _enzyme.mount)(_ref34)).toMatchSnapshot();
|
|
291
299
|
});
|
|
292
300
|
|
|
293
|
-
var
|
|
301
|
+
var _ref35 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
294
302
|
maxWidth: "2-char",
|
|
295
303
|
width: '75%'
|
|
296
304
|
});
|
|
297
305
|
|
|
298
306
|
it('renders the TextInput with maxWidth="2-char" and with width=three-quarters', function () {
|
|
299
|
-
expect((0, _enzyme.mount)(
|
|
307
|
+
expect((0, _enzyme.mount)(_ref35)).toMatchSnapshot();
|
|
300
308
|
});
|
|
301
309
|
|
|
302
|
-
var
|
|
310
|
+
var _ref36 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
303
311
|
maxWidth: "3-char",
|
|
304
312
|
width: '75%'
|
|
305
313
|
});
|
|
306
314
|
|
|
307
315
|
it('renders the TextInput with maxWidth="3-char" and with width=three-quarters', function () {
|
|
308
|
-
expect((0, _enzyme.mount)(
|
|
316
|
+
expect((0, _enzyme.mount)(_ref36)).toMatchSnapshot();
|
|
309
317
|
});
|
|
310
318
|
|
|
311
|
-
var
|
|
319
|
+
var _ref37 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
312
320
|
maxWidth: "4-char",
|
|
313
321
|
width: '75%'
|
|
314
322
|
});
|
|
315
323
|
|
|
316
324
|
it('renders the TextInput with maxWidth="4-char" and with width=three-quarters', function () {
|
|
317
|
-
expect((0, _enzyme.mount)(
|
|
325
|
+
expect((0, _enzyme.mount)(_ref37)).toMatchSnapshot();
|
|
318
326
|
});
|
|
319
327
|
|
|
320
|
-
var
|
|
328
|
+
var _ref38 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
321
329
|
maxWidth: "5-char",
|
|
322
330
|
width: '75%'
|
|
323
331
|
});
|
|
324
332
|
|
|
325
333
|
it('renders the TextInput with with maxWidth="5-char" with width=three-quarters', function () {
|
|
326
|
-
expect((0, _enzyme.mount)(
|
|
334
|
+
expect((0, _enzyme.mount)(_ref38)).toMatchSnapshot();
|
|
327
335
|
});
|
|
328
336
|
|
|
329
|
-
var
|
|
337
|
+
var _ref39 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
330
338
|
maxWidth: "20-char",
|
|
331
339
|
width: '75%'
|
|
332
340
|
});
|
|
333
341
|
|
|
334
342
|
it('renders the TextInput with maxWidth="20-char" and with width=three-quarters', function () {
|
|
335
|
-
expect((0, _enzyme.mount)(
|
|
343
|
+
expect((0, _enzyme.mount)(_ref39)).toMatchSnapshot();
|
|
336
344
|
});
|
|
337
345
|
|
|
338
|
-
var
|
|
346
|
+
var _ref40 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
339
347
|
maxWidth: "2-char",
|
|
340
348
|
width: 'full'
|
|
341
349
|
});
|
|
342
350
|
|
|
343
351
|
it('renders the TextInput with maxWidth="2-char" and with width=full', function () {
|
|
344
|
-
expect((0, _enzyme.mount)(
|
|
352
|
+
expect((0, _enzyme.mount)(_ref40)).toMatchSnapshot();
|
|
345
353
|
});
|
|
346
354
|
|
|
347
|
-
var
|
|
355
|
+
var _ref41 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
348
356
|
maxWidth: "3-char",
|
|
349
357
|
width: 'full'
|
|
350
358
|
});
|
|
351
359
|
|
|
352
360
|
it('renders the TextInput with maxWidth="3-char" and with width=full', function () {
|
|
353
|
-
expect((0, _enzyme.mount)(
|
|
361
|
+
expect((0, _enzyme.mount)(_ref41)).toMatchSnapshot();
|
|
354
362
|
});
|
|
355
363
|
|
|
356
|
-
var
|
|
364
|
+
var _ref42 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
357
365
|
maxWidth: "4-char",
|
|
358
366
|
width: 'full'
|
|
359
367
|
});
|
|
360
368
|
|
|
361
369
|
it('renders the TextInput with maxWidth="4-char" and with width=full', function () {
|
|
362
|
-
expect((0, _enzyme.mount)(
|
|
370
|
+
expect((0, _enzyme.mount)(_ref42)).toMatchSnapshot();
|
|
363
371
|
});
|
|
364
372
|
|
|
365
|
-
var
|
|
373
|
+
var _ref43 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
366
374
|
maxWidth: "5-char",
|
|
367
375
|
width: 'full'
|
|
368
376
|
});
|
|
369
377
|
|
|
370
378
|
it('renders the TextInput with with maxWidth="5-char" with width=full', function () {
|
|
371
|
-
expect((0, _enzyme.mount)(
|
|
379
|
+
expect((0, _enzyme.mount)(_ref43)).toMatchSnapshot();
|
|
372
380
|
});
|
|
373
381
|
|
|
374
|
-
var
|
|
382
|
+
var _ref44 = /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
375
383
|
maxWidth: "20-char",
|
|
376
384
|
width: 'full'
|
|
377
385
|
});
|
|
378
386
|
|
|
379
387
|
it('renders the TextInput with maxWidth="20-char" and with width=full', function () {
|
|
380
|
-
expect((0, _enzyme.mount)(
|
|
388
|
+
expect((0, _enzyme.mount)(_ref44)).toMatchSnapshot();
|
|
381
389
|
});
|
|
@@ -31,6 +31,37 @@ exports[`renders the WarningText with assistive text 1`] = `
|
|
|
31
31
|
</ForwardRef(WarningText)>
|
|
32
32
|
`;
|
|
33
33
|
|
|
34
|
+
exports[`renders the WarningText with dense=true 1`] = `
|
|
35
|
+
<ForwardRef(WarningText)
|
|
36
|
+
dense={true}
|
|
37
|
+
>
|
|
38
|
+
<ForwardRef(Base)
|
|
39
|
+
as="div"
|
|
40
|
+
className="govgr-warning-text--dense govgr-warning-text"
|
|
41
|
+
>
|
|
42
|
+
<div
|
|
43
|
+
className="govgr-warning-text--dense govgr-warning-text"
|
|
44
|
+
>
|
|
45
|
+
<span
|
|
46
|
+
className="govgr-warning-text__icon"
|
|
47
|
+
>
|
|
48
|
+
!
|
|
49
|
+
</span>
|
|
50
|
+
<strong
|
|
51
|
+
className="govgr-warning-text__text"
|
|
52
|
+
>
|
|
53
|
+
<span
|
|
54
|
+
className="govgr-warning-text__assistive"
|
|
55
|
+
>
|
|
56
|
+
Προσοχή
|
|
57
|
+
</span>
|
|
58
|
+
hello
|
|
59
|
+
</strong>
|
|
60
|
+
</div>
|
|
61
|
+
</ForwardRef(Base)>
|
|
62
|
+
</ForwardRef(WarningText)>
|
|
63
|
+
`;
|
|
64
|
+
|
|
34
65
|
exports[`renders the WarningText with no props 1`] = `
|
|
35
66
|
<ForwardRef(WarningText)>
|
|
36
67
|
<ForwardRef(Base)
|
package/WarningText/index.d.ts
CHANGED
|
@@ -7,11 +7,18 @@ export interface WarningTextProps extends BaseProps<'div'> {
|
|
|
7
7
|
* assistiveText is used to provide a textual warning for assistive technologies like screen readers.
|
|
8
8
|
*/
|
|
9
9
|
assistiveText?: string;
|
|
10
|
+
/**
|
|
11
|
+
* dense is optional.
|
|
12
|
+
* @value true WarningText will be dense.
|
|
13
|
+
* @value false
|
|
14
|
+
* @default false
|
|
15
|
+
* */
|
|
16
|
+
dense?: boolean;
|
|
10
17
|
}
|
|
11
18
|
/**
|
|
12
19
|
* WarningText.
|
|
13
20
|
* Use the WarningText component when you need to warn users about something important.
|
|
14
21
|
* The component is used with a text inside it.
|
|
15
22
|
*/
|
|
16
|
-
export declare const WarningText: React.ForwardRefExoticComponent<Pick<WarningTextProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "assistiveText"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export declare const WarningText: React.ForwardRefExoticComponent<Pick<WarningTextProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "dense" | "assistiveText"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
24
|
export default WarningText;
|
package/WarningText/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
17
17
|
|
|
18
18
|
var _Base = _interopRequireDefault(require("@digigov/react-core/Base"));
|
|
19
19
|
|
|
20
|
-
var _excluded = ["className", "assistiveText", "children"];
|
|
20
|
+
var _excluded = ["className", "assistiveText", "dense", "children"];
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* WarningText.
|
|
@@ -28,12 +28,13 @@ var WarningText = /*#__PURE__*/_react["default"].forwardRef(function WarningText
|
|
|
28
28
|
var className = _ref.className,
|
|
29
29
|
_ref$assistiveText = _ref.assistiveText,
|
|
30
30
|
assistiveText = _ref$assistiveText === void 0 ? 'Προσοχή' : _ref$assistiveText,
|
|
31
|
+
dense = _ref.dense,
|
|
31
32
|
children = _ref.children,
|
|
32
33
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
33
34
|
return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
|
|
34
35
|
as: "div",
|
|
35
36
|
ref: ref,
|
|
36
|
-
className: (0, _clsx["default"])(className, true && 'govgr-warning-text')
|
|
37
|
+
className: (0, _clsx["default"])(className, dense && 'govgr-warning-text--dense', true && 'govgr-warning-text')
|
|
37
38
|
}, props), /*#__PURE__*/_react["default"].createElement("span", {
|
|
38
39
|
className: (0, _clsx["default"])(true && 'govgr-warning-text__icon')
|
|
39
40
|
}, "!"), /*#__PURE__*/_react["default"].createElement("strong", {
|
|
@@ -20,4 +20,12 @@ var _ref2 = /*#__PURE__*/_react["default"].createElement(_WarningText["default"]
|
|
|
20
20
|
|
|
21
21
|
it('renders the WarningText with assistive text', function () {
|
|
22
22
|
expect((0, _enzyme.mount)(_ref2)).toMatchSnapshot();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
var _ref3 = /*#__PURE__*/_react["default"].createElement(_WarningText["default"], {
|
|
26
|
+
dense: true
|
|
27
|
+
}, "hello");
|
|
28
|
+
|
|
29
|
+
it('renders the WarningText with dense=true', function () {
|
|
30
|
+
expect((0, _enzyme.mount)(_ref3)).toMatchSnapshot();
|
|
23
31
|
});
|
|
@@ -8,13 +8,18 @@ exports[`renders the BottomInfo with no props 1`] = `
|
|
|
8
8
|
<ForwardRef(Grid)
|
|
9
9
|
className="govgr-bottom-info govgr-container"
|
|
10
10
|
container={true}
|
|
11
|
+
spacing={
|
|
12
|
+
Object {
|
|
13
|
+
"sm": 12,
|
|
14
|
+
}
|
|
15
|
+
}
|
|
11
16
|
>
|
|
12
17
|
<ForwardRef(Base)
|
|
13
18
|
as="div"
|
|
14
|
-
className="govgr-bottom-info govgr-container govgr-grid"
|
|
19
|
+
className="govgr-bottom-info govgr-container govgr-gap-sm-12 govgr-grid"
|
|
15
20
|
>
|
|
16
21
|
<div
|
|
17
|
-
className="govgr-bottom-info govgr-container govgr-grid"
|
|
22
|
+
className="govgr-bottom-info govgr-container govgr-gap-sm-12 govgr-grid"
|
|
18
23
|
>
|
|
19
24
|
hello
|
|
20
25
|
</div>
|
|
@@ -8,13 +8,18 @@ exports[`renders the BottomInfoContainer with no props 1`] = `
|
|
|
8
8
|
<ForwardRef(Grid)
|
|
9
9
|
className="govgr-bottom-info__container govgr-container"
|
|
10
10
|
container={true}
|
|
11
|
+
spacing={
|
|
12
|
+
Object {
|
|
13
|
+
"sm": 12,
|
|
14
|
+
}
|
|
15
|
+
}
|
|
11
16
|
>
|
|
12
17
|
<ForwardRef(Base)
|
|
13
18
|
as="div"
|
|
14
|
-
className="govgr-bottom-info__container govgr-container govgr-grid"
|
|
19
|
+
className="govgr-bottom-info__container govgr-container govgr-gap-sm-12 govgr-grid"
|
|
15
20
|
>
|
|
16
21
|
<div
|
|
17
|
-
className="govgr-bottom-info__container govgr-container govgr-grid"
|
|
22
|
+
className="govgr-bottom-info__container govgr-container govgr-gap-sm-12 govgr-grid"
|
|
18
23
|
>
|
|
19
24
|
hello
|
|
20
25
|
</div>
|
|
@@ -137,6 +137,24 @@ exports[`renders the Button with color=warning with disabled=true 1`] = `
|
|
|
137
137
|
</ForwardRef(Button)>
|
|
138
138
|
`;
|
|
139
139
|
|
|
140
|
+
exports[`renders the Button with dense=true 1`] = `
|
|
141
|
+
<ForwardRef(Button)
|
|
142
|
+
dense={true}
|
|
143
|
+
>
|
|
144
|
+
<ForwardRef(Base)
|
|
145
|
+
as="button"
|
|
146
|
+
className="govgr-btn-primary govgr-btn govgr-btn--dense"
|
|
147
|
+
printHidden={true}
|
|
148
|
+
>
|
|
149
|
+
<button
|
|
150
|
+
className="govgr-btn-primary govgr-btn govgr-btn--dense govgr-print-hidden"
|
|
151
|
+
>
|
|
152
|
+
hello
|
|
153
|
+
</button>
|
|
154
|
+
</ForwardRef(Base)>
|
|
155
|
+
</ForwardRef(Button)>
|
|
156
|
+
`;
|
|
157
|
+
|
|
140
158
|
exports[`renders the Button with disabled=false 1`] = `
|
|
141
159
|
<ForwardRef(Button)
|
|
142
160
|
disabled={false}
|