@digigov/react-core 0.21.0 → 0.22.0

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 (87) hide show
  1. package/AccessibilityIcon/__snapshots__/index.test.tsx.snap +626 -0
  2. package/AccessibilityIcon/index.d.ts +15 -0
  3. package/AccessibilityIcon/index.js +52 -0
  4. package/AccessibilityIcon/index.test.d.ts +1 -0
  5. package/AccessibilityIcon/index.test.js +137 -0
  6. package/AccessibilityTextIcon/__snapshots__/index.test.tsx.snap +511 -0
  7. package/AccessibilityTextIcon/index.d.ts +15 -0
  8. package/AccessibilityTextIcon/index.js +34 -0
  9. package/AccessibilityTextIcon/index.test.d.ts +1 -0
  10. package/AccessibilityTextIcon/index.test.js +129 -0
  11. package/CHANGELOG.md +21 -1
  12. package/CheckboxItem/__snapshots__/index.test.tsx.snap +68 -0
  13. package/CheckboxItem/index.d.ts +5 -0
  14. package/CheckboxItem/index.js +6 -3
  15. package/CheckboxItem/index.test.js +18 -0
  16. package/DetailsSummary/index.d.ts +2 -1
  17. package/DetailsSummary/index.js +4 -3
  18. package/FieldContainer/index.js +10 -3
  19. package/Nav/index.d.ts +16 -1
  20. package/Nav/index.js +8 -2
  21. package/RadioItem/__snapshots__/index.test.tsx.snap +70 -0
  22. package/RadioItem/index.d.ts +5 -0
  23. package/RadioItem/index.js +6 -3
  24. package/RadioItem/index.test.js +18 -0
  25. package/SectionBreak/index.d.ts +1 -1
  26. package/SectionBreak/index.js +4 -2
  27. package/SvgIcon/index.d.ts +1 -1
  28. package/es/AccessibilityIcon/__snapshots__/index.test.tsx.snap +626 -0
  29. package/es/AccessibilityIcon/index.js +36 -0
  30. package/es/AccessibilityIcon/index.test.js +131 -0
  31. package/es/AccessibilityTextIcon/__snapshots__/index.test.tsx.snap +511 -0
  32. package/es/AccessibilityTextIcon/index.js +21 -0
  33. package/es/AccessibilityTextIcon/index.test.js +123 -0
  34. package/es/CheckboxItem/__snapshots__/index.test.tsx.snap +68 -0
  35. package/es/CheckboxItem/index.js +6 -3
  36. package/es/CheckboxItem/index.test.js +18 -0
  37. package/es/DetailsSummary/index.js +4 -3
  38. package/es/FieldContainer/index.js +8 -3
  39. package/es/Nav/index.js +8 -2
  40. package/es/RadioItem/__snapshots__/index.test.tsx.snap +70 -0
  41. package/es/RadioItem/index.js +6 -3
  42. package/es/RadioItem/index.test.js +18 -0
  43. package/es/SectionBreak/index.js +4 -2
  44. package/es/index.js +2 -0
  45. package/es/registry.js +4 -0
  46. package/esm/AccessibilityIcon/__snapshots__/index.test.tsx.snap +626 -0
  47. package/esm/AccessibilityIcon/index.js +36 -0
  48. package/esm/AccessibilityIcon/index.test.js +131 -0
  49. package/esm/AccessibilityTextIcon/__snapshots__/index.test.tsx.snap +511 -0
  50. package/esm/AccessibilityTextIcon/index.js +21 -0
  51. package/esm/AccessibilityTextIcon/index.test.js +123 -0
  52. package/esm/CheckboxItem/__snapshots__/index.test.tsx.snap +68 -0
  53. package/esm/CheckboxItem/index.js +6 -3
  54. package/esm/CheckboxItem/index.test.js +18 -0
  55. package/esm/DetailsSummary/index.js +4 -3
  56. package/esm/FieldContainer/index.js +8 -3
  57. package/esm/Nav/index.js +8 -2
  58. package/esm/RadioItem/__snapshots__/index.test.tsx.snap +70 -0
  59. package/esm/RadioItem/index.js +6 -3
  60. package/esm/RadioItem/index.test.js +18 -0
  61. package/esm/SectionBreak/index.js +4 -2
  62. package/esm/index.js +3 -1
  63. package/esm/registry.js +4 -0
  64. package/index.d.ts +2 -0
  65. package/index.js +26 -0
  66. package/package.json +2 -2
  67. package/registry.d.ts +2 -0
  68. package/registry.js +6 -0
  69. package/src/AccessibilityIcon/__snapshots__/index.test.tsx.snap +626 -0
  70. package/src/AccessibilityIcon/index.test.tsx +53 -0
  71. package/src/AccessibilityIcon/index.tsx +41 -0
  72. package/src/AccessibilityTextIcon/__snapshots__/index.test.tsx.snap +511 -0
  73. package/src/AccessibilityTextIcon/index.test.tsx +50 -0
  74. package/src/AccessibilityTextIcon/index.tsx +28 -0
  75. package/src/CheckboxItem/__snapshots__/index.test.tsx.snap +68 -0
  76. package/src/CheckboxItem/index.test.tsx +14 -0
  77. package/src/CheckboxItem/index.tsx +11 -1
  78. package/src/DetailsSummary/index.tsx +8 -2
  79. package/src/FieldContainer/index.tsx +2 -1
  80. package/src/Nav/index.tsx +29 -2
  81. package/src/RadioItem/__snapshots__/index.test.tsx.snap +70 -0
  82. package/src/RadioItem/index.test.tsx +14 -0
  83. package/src/RadioItem/index.tsx +11 -1
  84. package/src/SectionBreak/index.tsx +5 -2
  85. package/src/SvgIcon/index.tsx +1 -1
  86. package/src/index.ts +2 -0
  87. package/src/registry.js +4 -0
@@ -0,0 +1,123 @@
1
+ import React from 'react';
2
+ import { mount } from 'enzyme';
3
+ import AccessibilityTextIcon from '@digigov/react-core/AccessibilityTextIcon';
4
+
5
+ var _ref = /*#__PURE__*/React.createElement(AccessibilityTextIcon, null);
6
+
7
+ it('renders the AccessibilityTextIcon with no props', function () {
8
+ expect(mount(_ref)).toMatchSnapshot();
9
+ });
10
+
11
+ var _ref2 = /*#__PURE__*/React.createElement(AccessibilityTextIcon, {
12
+ size: "s"
13
+ });
14
+
15
+ it('renders the AccessibilityTextIcon with prop size=s', function () {
16
+ expect(mount(_ref2)).toMatchSnapshot();
17
+ });
18
+
19
+ var _ref3 = /*#__PURE__*/React.createElement(AccessibilityTextIcon, {
20
+ size: "m"
21
+ });
22
+
23
+ it('renders the AccessibilityTextIcon with prop size=m', function () {
24
+ expect(mount(_ref3)).toMatchSnapshot();
25
+ });
26
+
27
+ var _ref4 = /*#__PURE__*/React.createElement(AccessibilityTextIcon, {
28
+ size: "l"
29
+ });
30
+
31
+ it('renders the AccessibilityTextIcon with prop size=l', function () {
32
+ expect(mount(_ref4)).toMatchSnapshot();
33
+ });
34
+
35
+ var _ref5 = /*#__PURE__*/React.createElement(AccessibilityTextIcon, {
36
+ size: "xl"
37
+ });
38
+
39
+ it('renders the AccessibilityTextIcon with prop size=xl', function () {
40
+ expect(mount(_ref5)).toMatchSnapshot();
41
+ });
42
+
43
+ var _ref6 = /*#__PURE__*/React.createElement(AccessibilityTextIcon, {
44
+ variant: "dark"
45
+ });
46
+
47
+ it('renders the AccessibilityTextIcon with prop variant=dark', function () {
48
+ expect(mount(_ref6)).toMatchSnapshot();
49
+ });
50
+
51
+ var _ref7 = /*#__PURE__*/React.createElement(AccessibilityTextIcon, {
52
+ variant: "light"
53
+ });
54
+
55
+ it('renders the AccessibilityTextIcon with prop variant=light', function () {
56
+ expect(mount(_ref7)).toMatchSnapshot();
57
+ });
58
+
59
+ var _ref8 = /*#__PURE__*/React.createElement(AccessibilityTextIcon, {
60
+ variant: "gray"
61
+ });
62
+
63
+ it('renders the AccessibilityTextIcon with prop variant=gray', function () {
64
+ expect(mount(_ref8)).toMatchSnapshot();
65
+ });
66
+
67
+ var _ref9 = /*#__PURE__*/React.createElement(AccessibilityTextIcon, {
68
+ variant: "primary"
69
+ });
70
+
71
+ it('renders the AccessibilityTextIcon with prop variant=primary', function () {
72
+ expect(mount(_ref9)).toMatchSnapshot();
73
+ });
74
+
75
+ var _ref10 = /*#__PURE__*/React.createElement(AccessibilityTextIcon, {
76
+ variant: "success"
77
+ });
78
+
79
+ it('renders the AccessibilityTextIcon with prop variant=success', function () {
80
+ expect(mount(_ref10)).toMatchSnapshot();
81
+ });
82
+
83
+ var _ref11 = /*#__PURE__*/React.createElement(AccessibilityTextIcon, {
84
+ variant: "warning"
85
+ });
86
+
87
+ it('renders the AccessibilityTextIcon with prop variant=warning', function () {
88
+ expect(mount(_ref11)).toMatchSnapshot();
89
+ });
90
+
91
+ var _ref12 = /*#__PURE__*/React.createElement(AccessibilityTextIcon, {
92
+ variant: "error"
93
+ });
94
+
95
+ it('renders the AccessibilityTextIcon with prop variant=error', function () {
96
+ expect(mount(_ref12)).toMatchSnapshot();
97
+ });
98
+
99
+ var _ref13 = /*#__PURE__*/React.createElement(AccessibilityTextIcon, {
100
+ variant: "focus"
101
+ });
102
+
103
+ it('renders the AccessibilityTextIcon with prop variant=focus', function () {
104
+ expect(mount(_ref13)).toMatchSnapshot();
105
+ });
106
+
107
+ var _ref14 = /*#__PURE__*/React.createElement(AccessibilityTextIcon, {
108
+ variant: "warning",
109
+ size: "s"
110
+ });
111
+
112
+ it('renders the AccessibilityTextIcon with prop variant=warning and size=s', function () {
113
+ expect(mount(_ref14)).toMatchSnapshot();
114
+ });
115
+
116
+ var _ref15 = /*#__PURE__*/React.createElement(AccessibilityTextIcon, {
117
+ variant: "warning",
118
+ size: "xl"
119
+ });
120
+
121
+ it('renders the AccessibilityTextIcon with prop variant=error and size= xl', function () {
122
+ expect(mount(_ref15)).toMatchSnapshot();
123
+ });
@@ -1,5 +1,33 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`renders the CheckboxItem with \`disabled\` prop 1`] = `
4
+ <ForwardRef(CheckboxItem)
5
+ disabled={true}
6
+ >
7
+ <div
8
+ className="govgr-checkboxes__item"
9
+ >
10
+ <label
11
+ className="govgr-checkboxes__label--disabled govgr-label govgr-checkboxes__label"
12
+ >
13
+ hello
14
+ <ForwardRef(Base)
15
+ as="input"
16
+ className="govgr-checkboxes__input"
17
+ disabled={true}
18
+ type="checkbox"
19
+ >
20
+ <input
21
+ className="govgr-checkboxes__input"
22
+ disabled={true}
23
+ type="checkbox"
24
+ />
25
+ </ForwardRef(Base)>
26
+ </label>
27
+ </div>
28
+ </ForwardRef(CheckboxItem)>
29
+ `;
30
+
3
31
  exports[`renders the CheckboxItem with \`name\` prop 1`] = `
4
32
  <ForwardRef(CheckboxItem)
5
33
  name="example"
@@ -14,13 +42,49 @@ exports[`renders the CheckboxItem with \`name\` prop 1`] = `
14
42
  <ForwardRef(Base)
15
43
  as="input"
16
44
  className="govgr-checkboxes__input"
45
+ disabled={false}
46
+ name="example"
47
+ type="checkbox"
48
+ >
49
+ <input
50
+ className="govgr-checkboxes__input"
51
+ disabled={false}
52
+ name="example"
53
+ type="checkbox"
54
+ />
55
+ </ForwardRef(Base)>
56
+ </label>
57
+ </div>
58
+ </ForwardRef(CheckboxItem)>
59
+ `;
60
+
61
+ exports[`renders the CheckboxItem with \`value\` \`name\` and \`disabled\` props 1`] = `
62
+ <ForwardRef(CheckboxItem)
63
+ disabled={true}
64
+ name="example"
65
+ value="example"
66
+ >
67
+ <div
68
+ className="govgr-checkboxes__item"
69
+ >
70
+ <label
71
+ className="govgr-checkboxes__label--disabled govgr-label govgr-checkboxes__label"
72
+ >
73
+ hello
74
+ <ForwardRef(Base)
75
+ as="input"
76
+ className="govgr-checkboxes__input"
77
+ disabled={true}
17
78
  name="example"
18
79
  type="checkbox"
80
+ value="example"
19
81
  >
20
82
  <input
21
83
  className="govgr-checkboxes__input"
84
+ disabled={true}
22
85
  name="example"
23
86
  type="checkbox"
87
+ value="example"
24
88
  />
25
89
  </ForwardRef(Base)>
26
90
  </label>
@@ -42,11 +106,13 @@ exports[`renders the CheckboxItem with \`value\` prop 1`] = `
42
106
  <ForwardRef(Base)
43
107
  as="input"
44
108
  className="govgr-checkboxes__input"
109
+ disabled={false}
45
110
  type="checkbox"
46
111
  value="example"
47
112
  >
48
113
  <input
49
114
  className="govgr-checkboxes__input"
115
+ disabled={false}
50
116
  type="checkbox"
51
117
  value="example"
52
118
  />
@@ -68,10 +134,12 @@ exports[`renders the CheckboxItem with no props 1`] = `
68
134
  <ForwardRef(Base)
69
135
  as="input"
70
136
  className="govgr-checkboxes__input"
137
+ disabled={false}
71
138
  type="checkbox"
72
139
  >
73
140
  <input
74
141
  className="govgr-checkboxes__input"
142
+ disabled={false}
75
143
  type="checkbox"
76
144
  />
77
145
  </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 = ["name", "value", "className", "children"];
3
+ var _excluded = ["name", "value", "className", "disabled", "children"];
4
4
  import React from 'react';
5
5
  import Base from '@digigov/react-core/Base';
6
6
  import clsx from 'clsx';
@@ -14,20 +14,23 @@ export var CheckboxItem = /*#__PURE__*/React.forwardRef(function CheckboxItem(_r
14
14
  var name = _ref.name,
15
15
  value = _ref.value,
16
16
  className = _ref.className,
17
+ _ref$disabled = _ref.disabled,
18
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
17
19
  children = _ref.children,
18
20
  props = _objectWithoutProperties(_ref, _excluded);
19
21
 
20
22
  return /*#__PURE__*/React.createElement("div", {
21
23
  className: clsx(className, true && 'govgr-checkboxes__item')
22
24
  }, /*#__PURE__*/React.createElement("label", {
23
- className: clsx(true && 'govgr-label govgr-checkboxes__label')
25
+ className: clsx(disabled === true && 'govgr-checkboxes__label--disabled', true && 'govgr-label govgr-checkboxes__label')
24
26
  }, children, /*#__PURE__*/React.createElement(Base, _extends({
25
27
  as: "input",
26
28
  ref: ref,
27
29
  type: "checkbox",
28
30
  name: name,
29
31
  value: value,
30
- className: clsx(true && 'govgr-checkboxes__input')
32
+ className: clsx(true && 'govgr-checkboxes__input'),
33
+ disabled: disabled
31
34
  }, props))));
32
35
  });
33
36
  export default CheckboxItem;
@@ -22,4 +22,22 @@ var _ref3 = /*#__PURE__*/React.createElement(CheckboxItem, {
22
22
 
23
23
  it('renders the CheckboxItem with `value` prop', function () {
24
24
  expect(mount(_ref3)).toMatchSnapshot();
25
+ });
26
+
27
+ var _ref4 = /*#__PURE__*/React.createElement(CheckboxItem, {
28
+ disabled: true
29
+ }, "hello");
30
+
31
+ it('renders the CheckboxItem with `disabled` prop', function () {
32
+ expect(mount(_ref4)).toMatchSnapshot();
33
+ });
34
+
35
+ var _ref5 = /*#__PURE__*/React.createElement(CheckboxItem, {
36
+ value: "example",
37
+ name: "example",
38
+ disabled: true
39
+ }, "hello");
40
+
41
+ it('renders the CheckboxItem with `value` `name` and `disabled` props', function () {
42
+ expect(mount(_ref5)).toMatchSnapshot();
25
43
  });
@@ -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", "children"];
3
+ var _excluded = ["size", "className", "children"];
4
4
  import React from 'react';
5
5
  import Base from '@digigov/react-core/Base';
6
6
  import clsx from 'clsx';
@@ -9,14 +9,15 @@ import clsx from 'clsx';
9
9
  * Use this inside Details.DetailsSummary will be the text to click on.
10
10
  */
11
11
  export var DetailsSummary = /*#__PURE__*/React.forwardRef(function DetailsSummary(_ref, ref) {
12
- var className = _ref.className,
12
+ var size = _ref.size,
13
+ className = _ref.className,
13
14
  children = _ref.children,
14
15
  props = _objectWithoutProperties(_ref, _excluded);
15
16
 
16
17
  return /*#__PURE__*/React.createElement(Base, _extends({
17
18
  as: "summary",
18
19
  ref: ref,
19
- className: clsx(className, true && 'govgr-details__summary')
20
+ className: clsx(className, size === 'l' && 'govgr-details__summary--l', true && 'govgr-details__summary')
20
21
  }, props), children);
21
22
  });
22
23
  export default DetailsSummary;
@@ -1,3 +1,6 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["error", "className", "children", "xs", "md", "lg", "xl"];
1
4
  import React from 'react';
2
5
  import clsx from 'clsx';
3
6
  import Grid from '@digigov/react-core/Grid';
@@ -16,8 +19,10 @@ export var FieldContainer = /*#__PURE__*/React.forwardRef(function FieldContaine
16
19
  _ref$lg = _ref.lg,
17
20
  lg = _ref$lg === void 0 ? 12 : _ref$lg,
18
21
  _ref$xl = _ref.xl,
19
- xl = _ref$xl === void 0 ? 12 : _ref$xl;
20
- return /*#__PURE__*/React.createElement(Grid, {
22
+ xl = _ref$xl === void 0 ? 12 : _ref$xl,
23
+ props = _objectWithoutProperties(_ref, _excluded);
24
+
25
+ return /*#__PURE__*/React.createElement(Grid, _extends({
21
26
  ref: ref,
22
27
  className: clsx(className, error === true && 'govgr-field__error', true && 'govgr-field'),
23
28
  item: true,
@@ -25,6 +30,6 @@ export var FieldContainer = /*#__PURE__*/React.forwardRef(function FieldContaine
25
30
  md: md,
26
31
  lg: lg,
27
32
  xl: xl
28
- }, children);
33
+ }, props), children);
29
34
  });
30
35
  export default FieldContainer;
package/es/Nav/index.js CHANGED
@@ -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", "open", "layout", "children"];
3
+ var _excluded = ["className", "open", "layout", "hidden", "fixed", "border", "children"];
4
4
  import React from 'react';
5
5
  import Base from '@digigov/react-core/Base';
6
6
  import clsx from 'clsx';
@@ -15,13 +15,19 @@ export var Nav = /*#__PURE__*/React.forwardRef(function Nav(_ref, ref) {
15
15
  open = _ref$open === void 0 ? false : _ref$open,
16
16
  _ref$layout = _ref.layout,
17
17
  layout = _ref$layout === void 0 ? 'horizontal' : _ref$layout,
18
+ _ref$hidden = _ref.hidden,
19
+ hidden = _ref$hidden === void 0 ? false : _ref$hidden,
20
+ _ref$fixed = _ref.fixed,
21
+ fixed = _ref$fixed === void 0 ? true : _ref$fixed,
22
+ _ref$border = _ref.border,
23
+ border = _ref$border === void 0 ? true : _ref$border,
18
24
  children = _ref.children,
19
25
  props = _objectWithoutProperties(_ref, _excluded);
20
26
 
21
27
  return /*#__PURE__*/React.createElement(Base, _extends({
22
28
  as: "nav",
23
29
  ref: ref,
24
- className: clsx(className, layout === 'horizontal' && 'govgr-nav-horizontal--border', true && 'govgr-horizontal-nav', open && 'govgr-horizontal-nav--open')
30
+ className: clsx(className, layout === 'horizontal' && 'govgr-horizontal-nav--order', border && 'govgr-nav-horizontal--border', hidden && 'govgr-horizontal-nav--hidden', fixed && 'govgr-nav-horizontal--fixed', true && 'govgr-horizontal-nav', open && 'govgr-horizontal-nav--open')
25
31
  }, props), children);
26
32
  });
27
33
  export default Nav;
@@ -14,11 +14,13 @@ exports[`renders the RadioItem value props 1`] = `
14
14
  <ForwardRef(Base)
15
15
  as="input"
16
16
  className="govgr-radios__input"
17
+ disabled={false}
17
18
  type="radio"
18
19
  value="someValue"
19
20
  >
20
21
  <input
21
22
  className="govgr-radios__input"
23
+ disabled={false}
22
24
  type="radio"
23
25
  value="someValue"
24
26
  />
@@ -28,6 +30,34 @@ exports[`renders the RadioItem value props 1`] = `
28
30
  </ForwardRef(RadioItem)>
29
31
  `;
30
32
 
33
+ exports[`renders the RadioItem with disabled prop 1`] = `
34
+ <ForwardRef(RadioItem)
35
+ disabled={true}
36
+ >
37
+ <div
38
+ className="govgr-radios__item"
39
+ >
40
+ <label
41
+ className="govgr-radios__label--disabled govgr-label govgr-radios__label"
42
+ >
43
+ hello
44
+ <ForwardRef(Base)
45
+ as="input"
46
+ className="govgr-radios__input"
47
+ disabled={true}
48
+ type="radio"
49
+ >
50
+ <input
51
+ className="govgr-radios__input"
52
+ disabled={true}
53
+ type="radio"
54
+ />
55
+ </ForwardRef(Base)>
56
+ </label>
57
+ </div>
58
+ </ForwardRef(RadioItem)>
59
+ `;
60
+
31
61
  exports[`renders the RadioItem with name props 1`] = `
32
62
  <ForwardRef(RadioItem)
33
63
  name="name"
@@ -42,11 +72,13 @@ exports[`renders the RadioItem with name props 1`] = `
42
72
  <ForwardRef(Base)
43
73
  as="input"
44
74
  className="govgr-radios__input"
75
+ disabled={false}
45
76
  name="name"
46
77
  type="radio"
47
78
  >
48
79
  <input
49
80
  className="govgr-radios__input"
81
+ disabled={false}
50
82
  name="name"
51
83
  type="radio"
52
84
  />
@@ -71,12 +103,48 @@ exports[`renders the RadioItem with name and value props 1`] = `
71
103
  <ForwardRef(Base)
72
104
  as="input"
73
105
  className="govgr-radios__input"
106
+ disabled={false}
107
+ name="name"
108
+ type="radio"
109
+ value="someValue"
110
+ >
111
+ <input
112
+ className="govgr-radios__input"
113
+ disabled={false}
114
+ name="name"
115
+ type="radio"
116
+ value="someValue"
117
+ />
118
+ </ForwardRef(Base)>
119
+ </label>
120
+ </div>
121
+ </ForwardRef(RadioItem)>
122
+ `;
123
+
124
+ exports[`renders the RadioItem with name disabled and value props 1`] = `
125
+ <ForwardRef(RadioItem)
126
+ disabled={true}
127
+ name="name"
128
+ value="someValue"
129
+ >
130
+ <div
131
+ className="govgr-radios__item"
132
+ >
133
+ <label
134
+ className="govgr-radios__label--disabled govgr-label govgr-radios__label"
135
+ >
136
+ hello
137
+ <ForwardRef(Base)
138
+ as="input"
139
+ className="govgr-radios__input"
140
+ disabled={true}
74
141
  name="name"
75
142
  type="radio"
76
143
  value="someValue"
77
144
  >
78
145
  <input
79
146
  className="govgr-radios__input"
147
+ disabled={true}
80
148
  name="name"
81
149
  type="radio"
82
150
  value="someValue"
@@ -99,10 +167,12 @@ exports[`renders the RadioItem with no props 1`] = `
99
167
  <ForwardRef(Base)
100
168
  as="input"
101
169
  className="govgr-radios__input"
170
+ disabled={false}
102
171
  type="radio"
103
172
  >
104
173
  <input
105
174
  className="govgr-radios__input"
175
+ disabled={false}
106
176
  type="radio"
107
177
  />
108
178
  </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 = ["name", "value", "className", "children"];
3
+ var _excluded = ["name", "value", "className", "disabled", "children"];
4
4
  import React from 'react';
5
5
  import Base from '@digigov/react-core/Base';
6
6
  import clsx from 'clsx';
@@ -13,20 +13,23 @@ export var RadioItem = /*#__PURE__*/React.forwardRef(function RadioItem(_ref, re
13
13
  var name = _ref.name,
14
14
  value = _ref.value,
15
15
  className = _ref.className,
16
+ _ref$disabled = _ref.disabled,
17
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
16
18
  children = _ref.children,
17
19
  props = _objectWithoutProperties(_ref, _excluded);
18
20
 
19
21
  return /*#__PURE__*/React.createElement("div", {
20
22
  className: clsx(className, true && 'govgr-radios__item')
21
23
  }, /*#__PURE__*/React.createElement("label", {
22
- className: clsx(true && 'govgr-label govgr-radios__label')
24
+ className: clsx(disabled === true && 'govgr-radios__label--disabled', true && 'govgr-label govgr-radios__label')
23
25
  }, children, /*#__PURE__*/React.createElement(Base, _extends({
24
26
  as: "input",
25
27
  ref: ref,
26
28
  type: "radio",
27
29
  name: name,
28
30
  value: value,
29
- className: clsx(true && 'govgr-radios__input')
31
+ className: clsx(true && 'govgr-radios__input'),
32
+ disabled: disabled
30
33
  }, props))));
31
34
  });
32
35
  export default RadioItem;
@@ -31,4 +31,22 @@ var _ref4 = /*#__PURE__*/React.createElement(RadioItem, {
31
31
 
32
32
  it('renders the RadioItem with name and value props', function () {
33
33
  expect(mount(_ref4)).toMatchSnapshot();
34
+ });
35
+
36
+ var _ref5 = /*#__PURE__*/React.createElement(RadioItem, {
37
+ disabled: true
38
+ }, "hello");
39
+
40
+ it('renders the RadioItem with disabled prop', function () {
41
+ expect(mount(_ref5)).toMatchSnapshot();
42
+ });
43
+
44
+ var _ref6 = /*#__PURE__*/React.createElement(RadioItem, {
45
+ name: 'name',
46
+ value: 'someValue',
47
+ disabled: true
48
+ }, "hello");
49
+
50
+ it('renders the RadioItem with name disabled and value props', function () {
51
+ expect(mount(_ref6)).toMatchSnapshot();
34
52
  });
@@ -9,8 +9,10 @@ import clsx from 'clsx';
9
9
  * SectionBreak is used to create a thematic break between sections of content.
10
10
  */
11
11
  export var SectionBreak = /*#__PURE__*/React.forwardRef(function SectionBreak(_ref, ref) {
12
- var visible = _ref.visible,
13
- size = _ref.size,
12
+ var _ref$visible = _ref.visible,
13
+ visible = _ref$visible === void 0 ? true : _ref$visible,
14
+ _ref$size = _ref.size,
15
+ size = _ref$size === void 0 ? 's' : _ref$size,
14
16
  className = _ref.className,
15
17
  props = _objectWithoutProperties(_ref, _excluded);
16
18
 
package/es/index.js CHANGED
@@ -1,3 +1,5 @@
1
+ export * from '@digigov/react-core/AccessibilityIcon';
2
+ export * from '@digigov/react-core/AccessibilityTextIcon';
1
3
  export * from '@digigov/react-core/Accordion';
2
4
  export * from '@digigov/react-core/AccordionControls';
3
5
  export * from '@digigov/react-core/AccordionSection';
package/es/registry.js CHANGED
@@ -1,3 +1,5 @@
1
+ import * as _digigov_react_core_AccessibilityIcon from '@digigov/react-core/AccessibilityIcon';
2
+ import * as _digigov_react_core_AccessibilityTextIcon from '@digigov/react-core/AccessibilityTextIcon';
1
3
  import * as _digigov_react_core_Accordion from '@digigov/react-core/Accordion';
2
4
  import * as _digigov_react_core_AccordionControls from '@digigov/react-core/AccordionControls';
3
5
  import * as _digigov_react_core_AccordionSection from '@digigov/react-core/AccordionSection';
@@ -172,6 +174,8 @@ function lazyImport(pkgImport) {
172
174
  }
173
175
 
174
176
  export default {
177
+ '@digigov/react-core/AccessibilityIcon': lazyImport(_digigov_react_core_AccessibilityIcon),
178
+ '@digigov/react-core/AccessibilityTextIcon': lazyImport(_digigov_react_core_AccessibilityTextIcon),
175
179
  '@digigov/react-core/Accordion': lazyImport(_digigov_react_core_Accordion),
176
180
  '@digigov/react-core/AccordionControls': lazyImport(_digigov_react_core_AccordionControls),
177
181
  '@digigov/react-core/AccordionSection': lazyImport(_digigov_react_core_AccordionSection),