@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.
Files changed (222) hide show
  1. package/AccessibilityMenuHeaderButton/index.d.ts +1 -1
  2. package/BottomInfo/__snapshots__/index.test.tsx.snap +7 -2
  3. package/BottomInfoContainer/__snapshots__/index.test.tsx.snap +7 -2
  4. package/Button/__snapshots__/index.test.tsx.snap +18 -0
  5. package/Button/index.d.ts +8 -1
  6. package/Button/index.js +3 -2
  7. package/Button/index.test.js +17 -9
  8. package/Checkbox/__snapshots__/index.test.tsx.snap +76 -0
  9. package/Checkbox/index.d.ts +8 -1
  10. package/Checkbox/index.js +3 -2
  11. package/Checkbox/index.test.js +8 -0
  12. package/CloseButton/__snapshots__/index.test.tsx.snap +53 -0
  13. package/CloseButton/index.d.ts +7 -1
  14. package/CloseButton/index.js +4 -3
  15. package/CloseButton/index.test.js +8 -0
  16. package/Container/__snapshots__/index.test.tsx.snap +14 -4
  17. package/CopyToClipboardContainer/__snapshots__/index.spec.tsx.snap +21 -0
  18. package/CopyToClipboardContainer/index.d.ts +9 -1
  19. package/CopyToClipboardContainer/index.js +3 -2
  20. package/CopyToClipboardContainer/index.spec.js +8 -0
  21. package/DateInputContainer/__snapshots__/index.test.tsx.snap +17 -0
  22. package/DateInputContainer/index.d.ts +8 -1
  23. package/DateInputContainer/index.js +4 -3
  24. package/DateInputContainer/index.test.js +8 -0
  25. package/ErrorSummary/__snapshots__/index.test.tsx.snap +39 -0
  26. package/ErrorSummary/index.d.ts +8 -1
  27. package/ErrorSummary/index.js +4 -2
  28. package/ErrorSummary/index.test.js +8 -0
  29. package/ImageLogo/__snapshots__/index.test.tsx.snap +5 -3
  30. package/ModalContainer/index.d.ts +8 -1
  31. package/ModalContainer/index.js +3 -2
  32. package/Nav/__snapshots__/index.test.tsx.snap +91 -4
  33. package/Nav/index.d.ts +30 -15
  34. package/Nav/index.js +18 -9
  35. package/Nav/index.test.js +42 -0
  36. package/NavListItemAction/index.d.ts +1 -1
  37. package/NavListItemButton/index.d.ts +1 -1
  38. package/NavMenuContainer/__snapshots__/index.test.tsx.snap +104 -0
  39. package/NavMenuContainer/index.test.js +24 -0
  40. package/NotificationBannerContainer/__snapshots__/index.test.tsx.snap +23 -0
  41. package/NotificationBannerContainer/index.d.ts +8 -1
  42. package/NotificationBannerContainer/index.js +3 -2
  43. package/NotificationBannerContainer/index.test.js +8 -0
  44. package/RadioContainer/__snapshots__/index.test.tsx.snap +17 -0
  45. package/RadioContainer/index.d.ts +8 -1
  46. package/RadioContainer/index.js +5 -4
  47. package/RadioContainer/index.test.js +8 -0
  48. package/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
  49. package/SearchButton/index.d.ts +1 -1
  50. package/SelectContainer/__snapshots__/index.test.tsx.snap +17 -0
  51. package/SelectContainer/index.d.ts +8 -1
  52. package/SelectContainer/index.js +4 -3
  53. package/SelectContainer/index.test.js +9 -1
  54. package/SingleCharacterInput/index.d.ts +1 -1
  55. package/StepNav/__snapshots__/index.test.tsx.snap +2 -2
  56. package/Tabs/index.d.ts +2 -1
  57. package/Tabs/index.js +4 -3
  58. package/TaskList/__snapshots__/index.test.tsx.snap +2 -2
  59. package/TextArea/__snapshots__/index.test.tsx.snap +19 -0
  60. package/TextArea/index.d.ts +8 -1
  61. package/TextArea/index.js +6 -5
  62. package/TextArea/index.test.js +8 -0
  63. package/TextInput/__snapshots__/index.test.tsx.snap +17 -0
  64. package/TextInput/index.d.ts +8 -1
  65. package/TextInput/index.js +3 -2
  66. package/TextInput/index.test.js +91 -83
  67. package/WarningText/__snapshots__/index.test.tsx.snap +31 -0
  68. package/WarningText/index.d.ts +8 -1
  69. package/WarningText/index.js +3 -2
  70. package/WarningText/index.test.js +8 -0
  71. package/es/BottomInfo/__snapshots__/index.test.tsx.snap +7 -2
  72. package/es/BottomInfoContainer/__snapshots__/index.test.tsx.snap +7 -2
  73. package/es/Button/__snapshots__/index.test.tsx.snap +18 -0
  74. package/es/Button/index.js +3 -2
  75. package/es/Button/index.test.js +17 -9
  76. package/es/Checkbox/__snapshots__/index.test.tsx.snap +76 -0
  77. package/es/Checkbox/index.js +3 -2
  78. package/es/Checkbox/index.test.js +8 -0
  79. package/es/CloseButton/__snapshots__/index.test.tsx.snap +53 -0
  80. package/es/CloseButton/index.js +4 -3
  81. package/es/CloseButton/index.test.js +8 -0
  82. package/es/Container/__snapshots__/index.test.tsx.snap +14 -4
  83. package/es/CopyToClipboardContainer/__snapshots__/index.spec.tsx.snap +21 -0
  84. package/es/CopyToClipboardContainer/index.js +3 -2
  85. package/es/CopyToClipboardContainer/index.spec.js +8 -0
  86. package/es/DateInputContainer/__snapshots__/index.test.tsx.snap +17 -0
  87. package/es/DateInputContainer/index.js +4 -3
  88. package/es/DateInputContainer/index.test.js +8 -0
  89. package/es/ErrorSummary/__snapshots__/index.test.tsx.snap +39 -0
  90. package/es/ErrorSummary/index.js +4 -2
  91. package/es/ErrorSummary/index.test.js +8 -0
  92. package/es/ImageLogo/__snapshots__/index.test.tsx.snap +5 -3
  93. package/es/ModalContainer/index.js +3 -2
  94. package/es/Nav/__snapshots__/index.test.tsx.snap +91 -4
  95. package/es/Nav/index.js +17 -9
  96. package/es/Nav/index.test.js +42 -0
  97. package/es/NavMenuContainer/__snapshots__/index.test.tsx.snap +104 -0
  98. package/es/NavMenuContainer/index.test.js +24 -0
  99. package/es/NotificationBannerContainer/__snapshots__/index.test.tsx.snap +23 -0
  100. package/es/NotificationBannerContainer/index.js +3 -2
  101. package/es/NotificationBannerContainer/index.test.js +8 -0
  102. package/es/RadioContainer/__snapshots__/index.test.tsx.snap +17 -0
  103. package/es/RadioContainer/index.js +5 -4
  104. package/es/RadioContainer/index.test.js +8 -0
  105. package/es/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
  106. package/es/SelectContainer/__snapshots__/index.test.tsx.snap +17 -0
  107. package/es/SelectContainer/index.js +4 -3
  108. package/es/SelectContainer/index.test.js +9 -1
  109. package/es/StepNav/__snapshots__/index.test.tsx.snap +2 -2
  110. package/es/Tabs/index.js +4 -3
  111. package/es/TaskList/__snapshots__/index.test.tsx.snap +2 -2
  112. package/es/TextArea/__snapshots__/index.test.tsx.snap +19 -0
  113. package/es/TextArea/index.js +6 -5
  114. package/es/TextArea/index.test.js +8 -0
  115. package/es/TextInput/__snapshots__/index.test.tsx.snap +17 -0
  116. package/es/TextInput/index.js +3 -2
  117. package/es/TextInput/index.test.js +91 -83
  118. package/es/WarningText/__snapshots__/index.test.tsx.snap +31 -0
  119. package/es/WarningText/index.js +3 -2
  120. package/es/WarningText/index.test.js +8 -0
  121. package/esm/BottomInfo/__snapshots__/index.test.tsx.snap +7 -2
  122. package/esm/BottomInfoContainer/__snapshots__/index.test.tsx.snap +7 -2
  123. package/esm/Button/__snapshots__/index.test.tsx.snap +18 -0
  124. package/esm/Button/index.js +3 -2
  125. package/esm/Button/index.test.js +17 -9
  126. package/esm/Checkbox/__snapshots__/index.test.tsx.snap +76 -0
  127. package/esm/Checkbox/index.js +3 -2
  128. package/esm/Checkbox/index.test.js +8 -0
  129. package/esm/CloseButton/__snapshots__/index.test.tsx.snap +53 -0
  130. package/esm/CloseButton/index.js +4 -3
  131. package/esm/CloseButton/index.test.js +8 -0
  132. package/esm/Container/__snapshots__/index.test.tsx.snap +14 -4
  133. package/esm/CopyToClipboardContainer/__snapshots__/index.spec.tsx.snap +21 -0
  134. package/esm/CopyToClipboardContainer/index.js +3 -2
  135. package/esm/CopyToClipboardContainer/index.spec.js +8 -0
  136. package/esm/DateInputContainer/__snapshots__/index.test.tsx.snap +17 -0
  137. package/esm/DateInputContainer/index.js +4 -3
  138. package/esm/DateInputContainer/index.test.js +8 -0
  139. package/esm/ErrorSummary/__snapshots__/index.test.tsx.snap +39 -0
  140. package/esm/ErrorSummary/index.js +4 -2
  141. package/esm/ErrorSummary/index.test.js +8 -0
  142. package/esm/ImageLogo/__snapshots__/index.test.tsx.snap +5 -3
  143. package/esm/ModalContainer/index.js +3 -2
  144. package/esm/Nav/__snapshots__/index.test.tsx.snap +91 -4
  145. package/esm/Nav/index.js +17 -9
  146. package/esm/Nav/index.test.js +42 -0
  147. package/esm/NavMenuContainer/__snapshots__/index.test.tsx.snap +104 -0
  148. package/esm/NavMenuContainer/index.test.js +24 -0
  149. package/esm/NotificationBannerContainer/__snapshots__/index.test.tsx.snap +23 -0
  150. package/esm/NotificationBannerContainer/index.js +3 -2
  151. package/esm/NotificationBannerContainer/index.test.js +8 -0
  152. package/esm/RadioContainer/__snapshots__/index.test.tsx.snap +17 -0
  153. package/esm/RadioContainer/index.js +5 -4
  154. package/esm/RadioContainer/index.test.js +8 -0
  155. package/esm/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
  156. package/esm/SelectContainer/__snapshots__/index.test.tsx.snap +17 -0
  157. package/esm/SelectContainer/index.js +4 -3
  158. package/esm/SelectContainer/index.test.js +9 -1
  159. package/esm/StepNav/__snapshots__/index.test.tsx.snap +2 -2
  160. package/esm/Tabs/index.js +4 -3
  161. package/esm/TaskList/__snapshots__/index.test.tsx.snap +2 -2
  162. package/esm/TextArea/__snapshots__/index.test.tsx.snap +19 -0
  163. package/esm/TextArea/index.js +6 -5
  164. package/esm/TextArea/index.test.js +8 -0
  165. package/esm/TextInput/__snapshots__/index.test.tsx.snap +17 -0
  166. package/esm/TextInput/index.js +3 -2
  167. package/esm/TextInput/index.test.js +91 -83
  168. package/esm/WarningText/__snapshots__/index.test.tsx.snap +31 -0
  169. package/esm/WarningText/index.js +3 -2
  170. package/esm/WarningText/index.test.js +8 -0
  171. package/esm/index.js +1 -1
  172. package/package.json +3 -3
  173. package/src/BottomInfo/__snapshots__/index.test.tsx.snap +7 -2
  174. package/src/BottomInfoContainer/__snapshots__/index.test.tsx.snap +7 -2
  175. package/src/Button/__snapshots__/index.test.tsx.snap +18 -0
  176. package/src/Button/index.test.tsx +3 -0
  177. package/src/Button/index.tsx +9 -0
  178. package/src/Checkbox/__snapshots__/index.test.tsx.snap +76 -0
  179. package/src/Checkbox/index.test.tsx +10 -0
  180. package/src/Checkbox/index.tsx +9 -1
  181. package/src/CloseButton/__snapshots__/index.test.tsx.snap +53 -0
  182. package/src/CloseButton/index.test.tsx +3 -0
  183. package/src/CloseButton/index.tsx +10 -3
  184. package/src/Container/__snapshots__/index.test.tsx.snap +14 -4
  185. package/src/CopyToClipboardContainer/__snapshots__/index.spec.tsx.snap +21 -0
  186. package/src/CopyToClipboardContainer/index.spec.tsx +8 -2
  187. package/src/CopyToClipboardContainer/index.tsx +10 -1
  188. package/src/DateInputContainer/__snapshots__/index.test.tsx.snap +17 -0
  189. package/src/DateInputContainer/index.test.tsx +5 -0
  190. package/src/DateInputContainer/index.tsx +11 -2
  191. package/src/ErrorSummary/__snapshots__/index.test.tsx.snap +39 -0
  192. package/src/ErrorSummary/index.test.tsx +4 -0
  193. package/src/ErrorSummary/index.tsx +12 -5
  194. package/src/ImageLogo/__snapshots__/index.test.tsx.snap +5 -3
  195. package/src/ModalContainer/index.tsx +9 -1
  196. package/src/Nav/__snapshots__/index.test.tsx.snap +91 -4
  197. package/src/Nav/index.test.tsx +15 -0
  198. package/src/Nav/index.tsx +53 -20
  199. package/src/NavMenuContainer/__snapshots__/index.test.tsx.snap +104 -0
  200. package/src/NavMenuContainer/index.test.tsx +9 -0
  201. package/src/NotificationBannerContainer/__snapshots__/index.test.tsx.snap +23 -0
  202. package/src/NotificationBannerContainer/index.test.tsx +7 -0
  203. package/src/NotificationBannerContainer/index.tsx +9 -1
  204. package/src/RadioContainer/__snapshots__/index.test.tsx.snap +17 -0
  205. package/src/RadioContainer/index.test.tsx +3 -0
  206. package/src/RadioContainer/index.tsx +9 -1
  207. package/src/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
  208. package/src/SelectContainer/__snapshots__/index.test.tsx.snap +17 -0
  209. package/src/SelectContainer/index.test.tsx +5 -0
  210. package/src/SelectContainer/index.tsx +11 -2
  211. package/src/StepNav/__snapshots__/index.test.tsx.snap +2 -2
  212. package/src/Tabs/index.tsx +5 -2
  213. package/src/TaskList/__snapshots__/index.test.tsx.snap +2 -2
  214. package/src/TextArea/__snapshots__/index.test.tsx.snap +19 -0
  215. package/src/TextArea/index.test.tsx +3 -0
  216. package/src/TextArea/index.tsx +11 -2
  217. package/src/TextInput/__snapshots__/index.test.tsx.snap +17 -0
  218. package/src/TextInput/index.test.tsx +3 -0
  219. package/src/TextInput/index.tsx +9 -0
  220. package/src/WarningText/__snapshots__/index.test.tsx.snap +31 -0
  221. package/src/WarningText/index.test.tsx +3 -0
  222. package/src/WarningText/index.tsx +9 -1
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["name", "rows", "error", "className", "children"];
3
+ var _excluded = ["name", "rows", "error", "dense", "className", "children"];
4
4
  import React from 'react';
5
5
  import clsx from 'clsx';
6
6
  import Base from '@digigov/react-core/Base';
@@ -11,19 +11,20 @@ import Base from '@digigov/react-core/Base';
11
11
  */
12
12
  export var TextArea = /*#__PURE__*/React.forwardRef(function TextArea(_ref, ref) {
13
13
  var name = _ref.name,
14
- _ref$rows = _ref.rows,
15
- rows = _ref$rows === void 0 ? 6 : _ref$rows,
14
+ rows = _ref.rows,
16
15
  error = _ref.error,
16
+ dense = _ref.dense,
17
17
  className = _ref.className,
18
18
  children = _ref.children,
19
19
  props = _objectWithoutProperties(_ref, _excluded);
20
20
 
21
+ var defaultRows = dense ? 3 : 6;
21
22
  return /*#__PURE__*/React.createElement(Base, _extends({
22
23
  as: "textarea",
23
24
  name: name,
24
- rows: rows,
25
+ rows: rows || defaultRows,
25
26
  ref: ref,
26
- className: clsx(className, error && 'govgr-input--error', true && 'govgr-textarea')
27
+ className: clsx(className, dense && 'govgr-textarea--dense', error && 'govgr-input--error', true && 'govgr-textarea')
27
28
  }, props), children);
28
29
  });
29
30
  export default TextArea;
@@ -46,4 +46,12 @@ var _ref6 = /*#__PURE__*/React.createElement(TextArea, {
46
46
 
47
47
  it('renders the TextArea with rows=8', function () {
48
48
  expect(mount(_ref6)).toMatchSnapshot();
49
+ });
50
+
51
+ var _ref7 = /*#__PURE__*/React.createElement(TextArea, {
52
+ dense: true
53
+ }, "hello");
54
+
55
+ it('renders the TextArea with dense prop', function () {
56
+ expect(mount(_ref7)).toMatchSnapshot();
49
57
  });
@@ -108,6 +108,23 @@ exports[`renders the TextInput with with maxWidth="5-char" with width=two-third
108
108
  </ForwardRef(TextInput)>
109
109
  `;
110
110
 
111
+ exports[`renders the TextInput with dense prop 1`] = `
112
+ <ForwardRef(TextInput)
113
+ dense={true}
114
+ >
115
+ <ForwardRef(Base)
116
+ as="input"
117
+ className="govgr-input--dense govgr-input"
118
+ type="text"
119
+ >
120
+ <input
121
+ className="govgr-input--dense govgr-input"
122
+ type="text"
123
+ />
124
+ </ForwardRef(Base)>
125
+ </ForwardRef(TextInput)>
126
+ `;
127
+
111
128
  exports[`renders the TextInput with maxWidth="2-char" 1`] = `
112
129
  <ForwardRef(TextInput)
113
130
  maxWidth="2-char"
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["type", "maxWidth", "width", "error", "className", "children"];
3
+ var _excluded = ["type", "maxWidth", "width", "error", "dense", "className", "children"];
4
4
  import React from 'react';
5
5
  import clsx from 'clsx';
6
6
  import Base from '@digigov/react-core/Base';
@@ -15,6 +15,7 @@ export var TextInput = /*#__PURE__*/React.forwardRef(function TextInput(_ref, re
15
15
  maxWidth = _ref.maxWidth,
16
16
  width = _ref.width,
17
17
  error = _ref.error,
18
+ dense = _ref.dense,
18
19
  className = _ref.className,
19
20
  children = _ref.children,
20
21
  props = _objectWithoutProperties(_ref, _excluded);
@@ -23,7 +24,7 @@ export var TextInput = /*#__PURE__*/React.forwardRef(function TextInput(_ref, re
23
24
  as: "input",
24
25
  type: type,
25
26
  ref: ref,
26
- className: clsx(className, maxWidth !== undefined && "govgr-input--width-".concat(maxWidth), width === '33.3%' && 'govgr-!-width-one-third', width === '66.6%' && 'govgr-!-width-two-thirds', width === '25%' && 'govgr-!-width-one-quarter', width === '50%' && 'govgr-!-width-one-half', width === '75%' && 'govgr-!-width-three-quarters', error && 'govgr-input--error', true && 'govgr-input')
27
+ className: clsx(className, maxWidth !== undefined && "govgr-input--width-".concat(maxWidth), width === '33.3%' && 'govgr-!-width-one-third', width === '66.6%' && 'govgr-!-width-two-thirds', width === '25%' && 'govgr-!-width-one-quarter', width === '50%' && 'govgr-!-width-one-half', width === '75%' && 'govgr-!-width-three-quarters', error && 'govgr-input--error', dense && 'govgr-input--dense', true && 'govgr-input')
27
28
  }, props), children);
28
29
  });
29
30
  export default TextInput;
@@ -9,367 +9,375 @@ it('renders the TextInput with no props', function () {
9
9
  });
10
10
 
11
11
  var _ref2 = /*#__PURE__*/React.createElement(TextInput, {
12
- maxWidth: "2-char"
12
+ dense: true
13
13
  });
14
14
 
15
- it('renders the TextInput with maxWidth="2-char"', function () {
15
+ it('renders the TextInput with dense prop', function () {
16
16
  expect(mount(_ref2)).toMatchSnapshot();
17
17
  });
18
18
 
19
19
  var _ref3 = /*#__PURE__*/React.createElement(TextInput, {
20
- maxWidth: "3-char"
20
+ maxWidth: "2-char"
21
21
  });
22
22
 
23
- it('renders the TextInput with maxWidth="3-char"', function () {
23
+ it('renders the TextInput with maxWidth="2-char"', function () {
24
24
  expect(mount(_ref3)).toMatchSnapshot();
25
25
  });
26
26
 
27
27
  var _ref4 = /*#__PURE__*/React.createElement(TextInput, {
28
- maxWidth: "4-char"
28
+ maxWidth: "3-char"
29
29
  });
30
30
 
31
- it('renders the TextInput with maxWidth="4-char"', function () {
31
+ it('renders the TextInput with maxWidth="3-char"', function () {
32
32
  expect(mount(_ref4)).toMatchSnapshot();
33
33
  });
34
34
 
35
35
  var _ref5 = /*#__PURE__*/React.createElement(TextInput, {
36
- maxWidth: "5-char"
36
+ maxWidth: "4-char"
37
37
  });
38
38
 
39
- it('renders the TextInput with maxWidth="5-char"', function () {
39
+ it('renders the TextInput with maxWidth="4-char"', function () {
40
40
  expect(mount(_ref5)).toMatchSnapshot();
41
41
  });
42
42
 
43
43
  var _ref6 = /*#__PURE__*/React.createElement(TextInput, {
44
- maxWidth: "10-char"
44
+ maxWidth: "5-char"
45
45
  });
46
46
 
47
- it('renders the TextInput with maxWidth="10-char"', function () {
47
+ it('renders the TextInput with maxWidth="5-char"', function () {
48
48
  expect(mount(_ref6)).toMatchSnapshot();
49
49
  });
50
50
 
51
51
  var _ref7 = /*#__PURE__*/React.createElement(TextInput, {
52
- maxWidth: "20-char"
52
+ maxWidth: "10-char"
53
53
  });
54
54
 
55
- it('renders the TextInput with maxWidth="20-char"', function () {
55
+ it('renders the TextInput with maxWidth="10-char"', function () {
56
56
  expect(mount(_ref7)).toMatchSnapshot();
57
57
  });
58
58
 
59
59
  var _ref8 = /*#__PURE__*/React.createElement(TextInput, {
60
- width: '25%'
60
+ maxWidth: "20-char"
61
61
  });
62
62
 
63
- it('renders the TextInput with width=one-quarter', function () {
63
+ it('renders the TextInput with maxWidth="20-char"', function () {
64
64
  expect(mount(_ref8)).toMatchSnapshot();
65
65
  });
66
66
 
67
67
  var _ref9 = /*#__PURE__*/React.createElement(TextInput, {
68
- width: '33.3%'
68
+ width: '25%'
69
69
  });
70
70
 
71
- it('renders the TextInput with width=one-third', function () {
71
+ it('renders the TextInput with width=one-quarter', function () {
72
72
  expect(mount(_ref9)).toMatchSnapshot();
73
73
  });
74
74
 
75
75
  var _ref10 = /*#__PURE__*/React.createElement(TextInput, {
76
- width: '50%'
76
+ width: '33.3%'
77
77
  });
78
78
 
79
- it('renders the TextInput with width=one-half', function () {
79
+ it('renders the TextInput with width=one-third', function () {
80
80
  expect(mount(_ref10)).toMatchSnapshot();
81
81
  });
82
82
 
83
83
  var _ref11 = /*#__PURE__*/React.createElement(TextInput, {
84
- width: '66.6%'
84
+ width: '50%'
85
85
  });
86
86
 
87
- it('renders the TextInput with width=two-thirds', function () {
87
+ it('renders the TextInput with width=one-half', function () {
88
88
  expect(mount(_ref11)).toMatchSnapshot();
89
89
  });
90
90
 
91
91
  var _ref12 = /*#__PURE__*/React.createElement(TextInput, {
92
- width: '75%'
92
+ width: '66.6%'
93
93
  });
94
94
 
95
- it('renders the TextInput with width=three-quarters', function () {
95
+ it('renders the TextInput with width=two-thirds', function () {
96
96
  expect(mount(_ref12)).toMatchSnapshot();
97
97
  });
98
98
 
99
99
  var _ref13 = /*#__PURE__*/React.createElement(TextInput, {
100
- width: 'full'
100
+ width: '75%'
101
101
  });
102
102
 
103
- it('renders the TextInput with width=full', function () {
103
+ it('renders the TextInput with width=three-quarters', function () {
104
104
  expect(mount(_ref13)).toMatchSnapshot();
105
105
  });
106
106
 
107
107
  var _ref14 = /*#__PURE__*/React.createElement(TextInput, {
108
+ width: 'full'
109
+ });
110
+
111
+ it('renders the TextInput with width=full', function () {
112
+ expect(mount(_ref14)).toMatchSnapshot();
113
+ });
114
+
115
+ var _ref15 = /*#__PURE__*/React.createElement(TextInput, {
108
116
  maxWidth: "2-char",
109
117
  width: '25%'
110
118
  });
111
119
 
112
120
  it('renders the TextInput with maxWidth="2-char" and with width=one-quarter', function () {
113
- expect(mount(_ref14)).toMatchSnapshot();
121
+ expect(mount(_ref15)).toMatchSnapshot();
114
122
  });
115
123
 
116
- var _ref15 = /*#__PURE__*/React.createElement(TextInput, {
124
+ var _ref16 = /*#__PURE__*/React.createElement(TextInput, {
117
125
  maxWidth: "3-char",
118
126
  width: '25%'
119
127
  });
120
128
 
121
129
  it('renders the TextInput with maxWidth="3-char" and with width=one-quarter', function () {
122
- expect(mount(_ref15)).toMatchSnapshot();
130
+ expect(mount(_ref16)).toMatchSnapshot();
123
131
  });
124
132
 
125
- var _ref16 = /*#__PURE__*/React.createElement(TextInput, {
133
+ var _ref17 = /*#__PURE__*/React.createElement(TextInput, {
126
134
  maxWidth: "4-char",
127
135
  width: '25%'
128
136
  });
129
137
 
130
138
  it('renders the TextInput with maxWidth="4-char" and with width=one-quarter', function () {
131
- expect(mount(_ref16)).toMatchSnapshot();
139
+ expect(mount(_ref17)).toMatchSnapshot();
132
140
  });
133
141
 
134
- var _ref17 = /*#__PURE__*/React.createElement(TextInput, {
142
+ var _ref18 = /*#__PURE__*/React.createElement(TextInput, {
135
143
  maxWidth: "5-char",
136
144
  width: '25%'
137
145
  });
138
146
 
139
147
  it('renders the TextInput with with maxWidth="5-char" with width=one-quarter', function () {
140
- expect(mount(_ref17)).toMatchSnapshot();
148
+ expect(mount(_ref18)).toMatchSnapshot();
141
149
  });
142
150
 
143
- var _ref18 = /*#__PURE__*/React.createElement(TextInput, {
151
+ var _ref19 = /*#__PURE__*/React.createElement(TextInput, {
144
152
  maxWidth: "20-char",
145
153
  width: '25%'
146
154
  });
147
155
 
148
156
  it('renders the TextInput with maxWidth="20-char" and with width=one-quarter', function () {
149
- expect(mount(_ref18)).toMatchSnapshot();
157
+ expect(mount(_ref19)).toMatchSnapshot();
150
158
  });
151
159
 
152
- var _ref19 = /*#__PURE__*/React.createElement(TextInput, {
160
+ var _ref20 = /*#__PURE__*/React.createElement(TextInput, {
153
161
  maxWidth: "2-char",
154
162
  width: '33.3%'
155
163
  });
156
164
 
157
165
  it('renders the TextInput with maxWidth="2-char" and with width=one-third', function () {
158
- expect(mount(_ref19)).toMatchSnapshot();
166
+ expect(mount(_ref20)).toMatchSnapshot();
159
167
  });
160
168
 
161
- var _ref20 = /*#__PURE__*/React.createElement(TextInput, {
169
+ var _ref21 = /*#__PURE__*/React.createElement(TextInput, {
162
170
  maxWidth: "3-char",
163
171
  width: '33.3%'
164
172
  });
165
173
 
166
174
  it('renders the TextInput with maxWidth="3-char" and with width=one-third', function () {
167
- expect(mount(_ref20)).toMatchSnapshot();
175
+ expect(mount(_ref21)).toMatchSnapshot();
168
176
  });
169
177
 
170
- var _ref21 = /*#__PURE__*/React.createElement(TextInput, {
178
+ var _ref22 = /*#__PURE__*/React.createElement(TextInput, {
171
179
  maxWidth: "4-char",
172
180
  width: '33.3%'
173
181
  });
174
182
 
175
183
  it('renders the TextInput with maxWidth="4-char" and with width=one-third', function () {
176
- expect(mount(_ref21)).toMatchSnapshot();
184
+ expect(mount(_ref22)).toMatchSnapshot();
177
185
  });
178
186
 
179
- var _ref22 = /*#__PURE__*/React.createElement(TextInput, {
187
+ var _ref23 = /*#__PURE__*/React.createElement(TextInput, {
180
188
  maxWidth: "5-char",
181
189
  width: '33.3%'
182
190
  });
183
191
 
184
192
  it('renders the TextInput with with maxWidth="5-char" with width=one-third', function () {
185
- expect(mount(_ref22)).toMatchSnapshot();
193
+ expect(mount(_ref23)).toMatchSnapshot();
186
194
  });
187
195
 
188
- var _ref23 = /*#__PURE__*/React.createElement(TextInput, {
196
+ var _ref24 = /*#__PURE__*/React.createElement(TextInput, {
189
197
  maxWidth: "20-char",
190
198
  width: '33.3%'
191
199
  });
192
200
 
193
201
  it('renders the TextInput with maxWidth="20-char" and with width=one-third', function () {
194
- expect(mount(_ref23)).toMatchSnapshot();
202
+ expect(mount(_ref24)).toMatchSnapshot();
195
203
  });
196
204
 
197
- var _ref24 = /*#__PURE__*/React.createElement(TextInput, {
205
+ var _ref25 = /*#__PURE__*/React.createElement(TextInput, {
198
206
  maxWidth: "2-char",
199
207
  width: '50%'
200
208
  });
201
209
 
202
210
  it('renders the TextInput with maxWidth="2-char" and with width=one-half', function () {
203
- expect(mount(_ref24)).toMatchSnapshot();
211
+ expect(mount(_ref25)).toMatchSnapshot();
204
212
  });
205
213
 
206
- var _ref25 = /*#__PURE__*/React.createElement(TextInput, {
214
+ var _ref26 = /*#__PURE__*/React.createElement(TextInput, {
207
215
  maxWidth: "3-char",
208
216
  width: '50%'
209
217
  });
210
218
 
211
219
  it('renders the TextInput with maxWidth="3-char" and with width=one-half', function () {
212
- expect(mount(_ref25)).toMatchSnapshot();
220
+ expect(mount(_ref26)).toMatchSnapshot();
213
221
  });
214
222
 
215
- var _ref26 = /*#__PURE__*/React.createElement(TextInput, {
223
+ var _ref27 = /*#__PURE__*/React.createElement(TextInput, {
216
224
  maxWidth: "4-char",
217
225
  width: '50%'
218
226
  });
219
227
 
220
228
  it('renders the TextInput with maxWidth="4-char" and with width=one-half', function () {
221
- expect(mount(_ref26)).toMatchSnapshot();
229
+ expect(mount(_ref27)).toMatchSnapshot();
222
230
  });
223
231
 
224
- var _ref27 = /*#__PURE__*/React.createElement(TextInput, {
232
+ var _ref28 = /*#__PURE__*/React.createElement(TextInput, {
225
233
  maxWidth: "5-char",
226
234
  width: '50%'
227
235
  });
228
236
 
229
237
  it('renders the TextInput with with maxWidth="5-char" with width=one-half', function () {
230
- expect(mount(_ref27)).toMatchSnapshot();
238
+ expect(mount(_ref28)).toMatchSnapshot();
231
239
  });
232
240
 
233
- var _ref28 = /*#__PURE__*/React.createElement(TextInput, {
241
+ var _ref29 = /*#__PURE__*/React.createElement(TextInput, {
234
242
  maxWidth: "20-char",
235
243
  width: '50%'
236
244
  });
237
245
 
238
246
  it('renders the TextInput with maxWidth="20-char" and with width=one-half', function () {
239
- expect(mount(_ref28)).toMatchSnapshot();
247
+ expect(mount(_ref29)).toMatchSnapshot();
240
248
  });
241
249
 
242
- var _ref29 = /*#__PURE__*/React.createElement(TextInput, {
250
+ var _ref30 = /*#__PURE__*/React.createElement(TextInput, {
243
251
  maxWidth: "2-char",
244
252
  width: '66.6%'
245
253
  });
246
254
 
247
255
  it('renders the TextInput with maxWidth="2-char" and with width=two-thirds', function () {
248
- expect(mount(_ref29)).toMatchSnapshot();
256
+ expect(mount(_ref30)).toMatchSnapshot();
249
257
  });
250
258
 
251
- var _ref30 = /*#__PURE__*/React.createElement(TextInput, {
259
+ var _ref31 = /*#__PURE__*/React.createElement(TextInput, {
252
260
  maxWidth: "3-char",
253
261
  width: '66.6%'
254
262
  });
255
263
 
256
264
  it('renders the TextInput with maxWidth="3-char" and with width=two-thirds', function () {
257
- expect(mount(_ref30)).toMatchSnapshot();
265
+ expect(mount(_ref31)).toMatchSnapshot();
258
266
  });
259
267
 
260
- var _ref31 = /*#__PURE__*/React.createElement(TextInput, {
268
+ var _ref32 = /*#__PURE__*/React.createElement(TextInput, {
261
269
  maxWidth: "4-char",
262
270
  width: '66.6%'
263
271
  });
264
272
 
265
273
  it('renders the TextInput with maxWidth="4-char" and with width=two-thirds', function () {
266
- expect(mount(_ref31)).toMatchSnapshot();
274
+ expect(mount(_ref32)).toMatchSnapshot();
267
275
  });
268
276
 
269
- var _ref32 = /*#__PURE__*/React.createElement(TextInput, {
277
+ var _ref33 = /*#__PURE__*/React.createElement(TextInput, {
270
278
  maxWidth: "5-char",
271
279
  width: '66.6%'
272
280
  });
273
281
 
274
282
  it('renders the TextInput with with maxWidth="5-char" with width=two-thirds', function () {
275
- expect(mount(_ref32)).toMatchSnapshot();
283
+ expect(mount(_ref33)).toMatchSnapshot();
276
284
  });
277
285
 
278
- var _ref33 = /*#__PURE__*/React.createElement(TextInput, {
286
+ var _ref34 = /*#__PURE__*/React.createElement(TextInput, {
279
287
  maxWidth: "20-char",
280
288
  width: '66.6%'
281
289
  });
282
290
 
283
291
  it('renders the TextInput with maxWidth="20-char" and with width=two-thirds', function () {
284
- expect(mount(_ref33)).toMatchSnapshot();
292
+ expect(mount(_ref34)).toMatchSnapshot();
285
293
  });
286
294
 
287
- var _ref34 = /*#__PURE__*/React.createElement(TextInput, {
295
+ var _ref35 = /*#__PURE__*/React.createElement(TextInput, {
288
296
  maxWidth: "2-char",
289
297
  width: '75%'
290
298
  });
291
299
 
292
300
  it('renders the TextInput with maxWidth="2-char" and with width=three-quarters', function () {
293
- expect(mount(_ref34)).toMatchSnapshot();
301
+ expect(mount(_ref35)).toMatchSnapshot();
294
302
  });
295
303
 
296
- var _ref35 = /*#__PURE__*/React.createElement(TextInput, {
304
+ var _ref36 = /*#__PURE__*/React.createElement(TextInput, {
297
305
  maxWidth: "3-char",
298
306
  width: '75%'
299
307
  });
300
308
 
301
309
  it('renders the TextInput with maxWidth="3-char" and with width=three-quarters', function () {
302
- expect(mount(_ref35)).toMatchSnapshot();
310
+ expect(mount(_ref36)).toMatchSnapshot();
303
311
  });
304
312
 
305
- var _ref36 = /*#__PURE__*/React.createElement(TextInput, {
313
+ var _ref37 = /*#__PURE__*/React.createElement(TextInput, {
306
314
  maxWidth: "4-char",
307
315
  width: '75%'
308
316
  });
309
317
 
310
318
  it('renders the TextInput with maxWidth="4-char" and with width=three-quarters', function () {
311
- expect(mount(_ref36)).toMatchSnapshot();
319
+ expect(mount(_ref37)).toMatchSnapshot();
312
320
  });
313
321
 
314
- var _ref37 = /*#__PURE__*/React.createElement(TextInput, {
322
+ var _ref38 = /*#__PURE__*/React.createElement(TextInput, {
315
323
  maxWidth: "5-char",
316
324
  width: '75%'
317
325
  });
318
326
 
319
327
  it('renders the TextInput with with maxWidth="5-char" with width=three-quarters', function () {
320
- expect(mount(_ref37)).toMatchSnapshot();
328
+ expect(mount(_ref38)).toMatchSnapshot();
321
329
  });
322
330
 
323
- var _ref38 = /*#__PURE__*/React.createElement(TextInput, {
331
+ var _ref39 = /*#__PURE__*/React.createElement(TextInput, {
324
332
  maxWidth: "20-char",
325
333
  width: '75%'
326
334
  });
327
335
 
328
336
  it('renders the TextInput with maxWidth="20-char" and with width=three-quarters', function () {
329
- expect(mount(_ref38)).toMatchSnapshot();
337
+ expect(mount(_ref39)).toMatchSnapshot();
330
338
  });
331
339
 
332
- var _ref39 = /*#__PURE__*/React.createElement(TextInput, {
340
+ var _ref40 = /*#__PURE__*/React.createElement(TextInput, {
333
341
  maxWidth: "2-char",
334
342
  width: 'full'
335
343
  });
336
344
 
337
345
  it('renders the TextInput with maxWidth="2-char" and with width=full', function () {
338
- expect(mount(_ref39)).toMatchSnapshot();
346
+ expect(mount(_ref40)).toMatchSnapshot();
339
347
  });
340
348
 
341
- var _ref40 = /*#__PURE__*/React.createElement(TextInput, {
349
+ var _ref41 = /*#__PURE__*/React.createElement(TextInput, {
342
350
  maxWidth: "3-char",
343
351
  width: 'full'
344
352
  });
345
353
 
346
354
  it('renders the TextInput with maxWidth="3-char" and with width=full', function () {
347
- expect(mount(_ref40)).toMatchSnapshot();
355
+ expect(mount(_ref41)).toMatchSnapshot();
348
356
  });
349
357
 
350
- var _ref41 = /*#__PURE__*/React.createElement(TextInput, {
358
+ var _ref42 = /*#__PURE__*/React.createElement(TextInput, {
351
359
  maxWidth: "4-char",
352
360
  width: 'full'
353
361
  });
354
362
 
355
363
  it('renders the TextInput with maxWidth="4-char" and with width=full', function () {
356
- expect(mount(_ref41)).toMatchSnapshot();
364
+ expect(mount(_ref42)).toMatchSnapshot();
357
365
  });
358
366
 
359
- var _ref42 = /*#__PURE__*/React.createElement(TextInput, {
367
+ var _ref43 = /*#__PURE__*/React.createElement(TextInput, {
360
368
  maxWidth: "5-char",
361
369
  width: 'full'
362
370
  });
363
371
 
364
372
  it('renders the TextInput with with maxWidth="5-char" with width=full', function () {
365
- expect(mount(_ref42)).toMatchSnapshot();
373
+ expect(mount(_ref43)).toMatchSnapshot();
366
374
  });
367
375
 
368
- var _ref43 = /*#__PURE__*/React.createElement(TextInput, {
376
+ var _ref44 = /*#__PURE__*/React.createElement(TextInput, {
369
377
  maxWidth: "20-char",
370
378
  width: 'full'
371
379
  });
372
380
 
373
381
  it('renders the TextInput with maxWidth="20-char" and with width=full', function () {
374
- expect(mount(_ref43)).toMatchSnapshot();
382
+ expect(mount(_ref44)).toMatchSnapshot();
375
383
  });
@@ -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)
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["className", "assistiveText", "children"];
3
+ var _excluded = ["className", "assistiveText", "dense", "children"];
4
4
  import React from 'react';
5
5
  import clsx from 'clsx';
6
6
  import Base from '@digigov/react-core/Base';
@@ -14,13 +14,14 @@ export var WarningText = /*#__PURE__*/React.forwardRef(function WarningText(_ref
14
14
  var className = _ref.className,
15
15
  _ref$assistiveText = _ref.assistiveText,
16
16
  assistiveText = _ref$assistiveText === void 0 ? 'Προσοχή' : _ref$assistiveText,
17
+ dense = _ref.dense,
17
18
  children = _ref.children,
18
19
  props = _objectWithoutProperties(_ref, _excluded);
19
20
 
20
21
  return /*#__PURE__*/React.createElement(Base, _extends({
21
22
  as: "div",
22
23
  ref: ref,
23
- className: clsx(className, true && 'govgr-warning-text')
24
+ className: clsx(className, dense && 'govgr-warning-text--dense', true && 'govgr-warning-text')
24
25
  }, props), /*#__PURE__*/React.createElement("span", {
25
26
  className: clsx(true && 'govgr-warning-text__icon')
26
27
  }, "!"), /*#__PURE__*/React.createElement("strong", {
@@ -14,4 +14,12 @@ var _ref2 = /*#__PURE__*/React.createElement(WarningText, {
14
14
 
15
15
  it('renders the WarningText with assistive text', function () {
16
16
  expect(mount(_ref2)).toMatchSnapshot();
17
+ });
18
+
19
+ var _ref3 = /*#__PURE__*/React.createElement(WarningText, {
20
+ dense: true
21
+ }, "hello");
22
+
23
+ it('renders the WarningText with dense=true', function () {
24
+ expect(mount(_ref3)).toMatchSnapshot();
17
25
  });
@@ -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>