@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,129 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _react = _interopRequireDefault(require("react"));
6
+
7
+ var _enzyme = require("enzyme");
8
+
9
+ var _AccessibilityTextIcon = _interopRequireDefault(require("@digigov/react-core/AccessibilityTextIcon"));
10
+
11
+ var _ref = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], null);
12
+
13
+ it('renders the AccessibilityTextIcon with no props', function () {
14
+ expect((0, _enzyme.mount)(_ref)).toMatchSnapshot();
15
+ });
16
+
17
+ var _ref2 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
18
+ size: "s"
19
+ });
20
+
21
+ it('renders the AccessibilityTextIcon with prop size=s', function () {
22
+ expect((0, _enzyme.mount)(_ref2)).toMatchSnapshot();
23
+ });
24
+
25
+ var _ref3 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
26
+ size: "m"
27
+ });
28
+
29
+ it('renders the AccessibilityTextIcon with prop size=m', function () {
30
+ expect((0, _enzyme.mount)(_ref3)).toMatchSnapshot();
31
+ });
32
+
33
+ var _ref4 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
34
+ size: "l"
35
+ });
36
+
37
+ it('renders the AccessibilityTextIcon with prop size=l', function () {
38
+ expect((0, _enzyme.mount)(_ref4)).toMatchSnapshot();
39
+ });
40
+
41
+ var _ref5 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
42
+ size: "xl"
43
+ });
44
+
45
+ it('renders the AccessibilityTextIcon with prop size=xl', function () {
46
+ expect((0, _enzyme.mount)(_ref5)).toMatchSnapshot();
47
+ });
48
+
49
+ var _ref6 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
50
+ variant: "dark"
51
+ });
52
+
53
+ it('renders the AccessibilityTextIcon with prop variant=dark', function () {
54
+ expect((0, _enzyme.mount)(_ref6)).toMatchSnapshot();
55
+ });
56
+
57
+ var _ref7 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
58
+ variant: "light"
59
+ });
60
+
61
+ it('renders the AccessibilityTextIcon with prop variant=light', function () {
62
+ expect((0, _enzyme.mount)(_ref7)).toMatchSnapshot();
63
+ });
64
+
65
+ var _ref8 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
66
+ variant: "gray"
67
+ });
68
+
69
+ it('renders the AccessibilityTextIcon with prop variant=gray', function () {
70
+ expect((0, _enzyme.mount)(_ref8)).toMatchSnapshot();
71
+ });
72
+
73
+ var _ref9 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
74
+ variant: "primary"
75
+ });
76
+
77
+ it('renders the AccessibilityTextIcon with prop variant=primary', function () {
78
+ expect((0, _enzyme.mount)(_ref9)).toMatchSnapshot();
79
+ });
80
+
81
+ var _ref10 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
82
+ variant: "success"
83
+ });
84
+
85
+ it('renders the AccessibilityTextIcon with prop variant=success', function () {
86
+ expect((0, _enzyme.mount)(_ref10)).toMatchSnapshot();
87
+ });
88
+
89
+ var _ref11 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
90
+ variant: "warning"
91
+ });
92
+
93
+ it('renders the AccessibilityTextIcon with prop variant=warning', function () {
94
+ expect((0, _enzyme.mount)(_ref11)).toMatchSnapshot();
95
+ });
96
+
97
+ var _ref12 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
98
+ variant: "error"
99
+ });
100
+
101
+ it('renders the AccessibilityTextIcon with prop variant=error', function () {
102
+ expect((0, _enzyme.mount)(_ref12)).toMatchSnapshot();
103
+ });
104
+
105
+ var _ref13 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
106
+ variant: "focus"
107
+ });
108
+
109
+ it('renders the AccessibilityTextIcon with prop variant=focus', function () {
110
+ expect((0, _enzyme.mount)(_ref13)).toMatchSnapshot();
111
+ });
112
+
113
+ var _ref14 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
114
+ variant: "warning",
115
+ size: "s"
116
+ });
117
+
118
+ it('renders the AccessibilityTextIcon with prop variant=warning and size=s', function () {
119
+ expect((0, _enzyme.mount)(_ref14)).toMatchSnapshot();
120
+ });
121
+
122
+ var _ref15 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
123
+ variant: "warning",
124
+ size: "xl"
125
+ });
126
+
127
+ it('renders the AccessibilityTextIcon with prop variant=error and size= xl', function () {
128
+ expect((0, _enzyme.mount)(_ref15)).toMatchSnapshot();
129
+ });
package/CHANGELOG.md CHANGED
@@ -1,6 +1,26 @@
1
1
  # Change Log - @digigov/react-core
2
2
 
3
- This log was last generated on Thu, 02 Mar 2023 11:33:41 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 03 Apr 2023 11:13:15 GMT and should not be manually modified.
4
+
5
+ ## 0.22.0
6
+ Mon, 03 Apr 2023 11:13:15 GMT
7
+
8
+ ### Minor changes
9
+
10
+ - Create AccessibilityIcon
11
+
12
+ ### Patches
13
+
14
+ - add hidden prop in Nav
15
+ - make SectionBreak visible and size small by default
16
+ - Add size prop at DetailsSummary
17
+
18
+ ## 0.21.1
19
+ Mon, 13 Mar 2023 10:21:39 GMT
20
+
21
+ ### Patches
22
+
23
+ - add disabled prop and corresponding class for CheckboxItem and RadioItem components
4
24
 
5
25
  ## 0.21.0
6
26
  Thu, 02 Mar 2023 11:33:41 GMT
@@ -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)>
@@ -9,6 +9,11 @@ export interface CheckboxItemProps extends BaseProps<'input'> {
9
9
  * Value property is optional and it specifies the value of an <input> element.
10
10
  */
11
11
  value?: string;
12
+ /**
13
+ * disabled prop disables the checkbox input.
14
+ * disabled property is optional and it is false by default.
15
+ */
16
+ disabled?: boolean;
12
17
  }
13
18
  /**
14
19
  * Details for the CheckboxItem.
@@ -17,7 +17,7 @@ var _Base = _interopRequireDefault(require("@digigov/react-core/Base"));
17
17
 
18
18
  var _clsx = _interopRequireDefault(require("clsx"));
19
19
 
20
- var _excluded = ["name", "value", "className", "children"];
20
+ var _excluded = ["name", "value", "className", "disabled", "children"];
21
21
 
22
22
  /**
23
23
  * Details for the CheckboxItem.
@@ -28,19 +28,22 @@ var CheckboxItem = /*#__PURE__*/_react["default"].forwardRef(function CheckboxIt
28
28
  var name = _ref.name,
29
29
  value = _ref.value,
30
30
  className = _ref.className,
31
+ _ref$disabled = _ref.disabled,
32
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
31
33
  children = _ref.children,
32
34
  props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
33
35
  return /*#__PURE__*/_react["default"].createElement("div", {
34
36
  className: (0, _clsx["default"])(className, true && 'govgr-checkboxes__item')
35
37
  }, /*#__PURE__*/_react["default"].createElement("label", {
36
- className: (0, _clsx["default"])(true && 'govgr-label govgr-checkboxes__label')
38
+ className: (0, _clsx["default"])(disabled === true && 'govgr-checkboxes__label--disabled', true && 'govgr-label govgr-checkboxes__label')
37
39
  }, children, /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
38
40
  as: "input",
39
41
  ref: ref,
40
42
  type: "checkbox",
41
43
  name: name,
42
44
  value: value,
43
- className: (0, _clsx["default"])(true && 'govgr-checkboxes__input')
45
+ className: (0, _clsx["default"])(true && 'govgr-checkboxes__input'),
46
+ disabled: disabled
44
47
  }, props))));
45
48
  });
46
49
 
@@ -28,4 +28,22 @@ var _ref3 = /*#__PURE__*/_react["default"].createElement(_CheckboxItem["default"
28
28
 
29
29
  it('renders the CheckboxItem with `value` prop', function () {
30
30
  expect((0, _enzyme.mount)(_ref3)).toMatchSnapshot();
31
+ });
32
+
33
+ var _ref4 = /*#__PURE__*/_react["default"].createElement(_CheckboxItem["default"], {
34
+ disabled: true
35
+ }, "hello");
36
+
37
+ it('renders the CheckboxItem with `disabled` prop', function () {
38
+ expect((0, _enzyme.mount)(_ref4)).toMatchSnapshot();
39
+ });
40
+
41
+ var _ref5 = /*#__PURE__*/_react["default"].createElement(_CheckboxItem["default"], {
42
+ value: "example",
43
+ name: "example",
44
+ disabled: true
45
+ }, "hello");
46
+
47
+ it('renders the CheckboxItem with `value` `name` and `disabled` props', function () {
48
+ expect((0, _enzyme.mount)(_ref5)).toMatchSnapshot();
31
49
  });
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
3
  export interface DetailsSummaryProps extends BaseProps<'summary'> {
4
+ size?: 'm' | 'l';
4
5
  }
5
6
  /**
6
7
  * Use this inside Details.DetailsSummary will be the text to click on.
7
8
  */
8
- export declare const DetailsSummary: React.ForwardRefExoticComponent<Pick<DetailsSummaryProps, "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" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLElement>>;
9
+ export declare const DetailsSummary: React.ForwardRefExoticComponent<Pick<DetailsSummaryProps, "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" | "size" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLElement>>;
9
10
  export default DetailsSummary;
@@ -17,19 +17,20 @@ var _Base = _interopRequireDefault(require("@digigov/react-core/Base"));
17
17
 
18
18
  var _clsx = _interopRequireDefault(require("clsx"));
19
19
 
20
- var _excluded = ["className", "children"];
20
+ var _excluded = ["size", "className", "children"];
21
21
 
22
22
  /**
23
23
  * Use this inside Details.DetailsSummary will be the text to click on.
24
24
  */
25
25
  var DetailsSummary = /*#__PURE__*/_react["default"].forwardRef(function DetailsSummary(_ref, ref) {
26
- var className = _ref.className,
26
+ var size = _ref.size,
27
+ className = _ref.className,
27
28
  children = _ref.children,
28
29
  props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
29
30
  return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
30
31
  as: "summary",
31
32
  ref: ref,
32
- className: (0, _clsx["default"])(className, true && 'govgr-details__summary')
33
+ className: (0, _clsx["default"])(className, size === 'l' && 'govgr-details__summary--l', true && 'govgr-details__summary')
33
34
  }, props), children);
34
35
  });
35
36
 
@@ -7,12 +7,18 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports["default"] = exports.FieldContainer = void 0;
9
9
 
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
12
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
+
10
14
  var _react = _interopRequireDefault(require("react"));
11
15
 
12
16
  var _clsx = _interopRequireDefault(require("clsx"));
13
17
 
14
18
  var _Grid = _interopRequireDefault(require("@digigov/react-core/Grid"));
15
19
 
20
+ var _excluded = ["error", "className", "children", "xs", "md", "lg", "xl"];
21
+
16
22
  /**
17
23
  * Field component wraps form components such as Checkbox TextInput TextArea etc.
18
24
  */
@@ -27,8 +33,9 @@ var FieldContainer = /*#__PURE__*/_react["default"].forwardRef(function FieldCon
27
33
  _ref$lg = _ref.lg,
28
34
  lg = _ref$lg === void 0 ? 12 : _ref$lg,
29
35
  _ref$xl = _ref.xl,
30
- xl = _ref$xl === void 0 ? 12 : _ref$xl;
31
- return /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
36
+ xl = _ref$xl === void 0 ? 12 : _ref$xl,
37
+ props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
38
+ return /*#__PURE__*/_react["default"].createElement(_Grid["default"], (0, _extends2["default"])({
32
39
  ref: ref,
33
40
  className: (0, _clsx["default"])(className, error === true && 'govgr-field__error', true && 'govgr-field'),
34
41
  item: true,
@@ -36,7 +43,7 @@ var FieldContainer = /*#__PURE__*/_react["default"].forwardRef(function FieldCon
36
43
  md: md,
37
44
  lg: lg,
38
45
  xl: xl
39
- }, children);
46
+ }, props), children);
40
47
  });
41
48
 
42
49
  exports.FieldContainer = FieldContainer;
package/Nav/index.d.ts CHANGED
@@ -12,10 +12,25 @@ export interface NavProps extends BaseProps<'nav'> {
12
12
  * layout is horizontal by default.
13
13
  */
14
14
  layout?: 'vertical' | 'horizontal';
15
+ /**
16
+ * hidden is optional.
17
+ * hidden prop hides the nav element when it is called from a navItem.
18
+ */
19
+ hidden?: boolean;
20
+ /**
21
+ * fixed is optional.
22
+ * fixed prop allows element to be positioned relative to the viewport
23
+ */
24
+ fixed?: boolean;
25
+ /**
26
+ * border is optional.
27
+ * border prop contains border-bottom styling.
28
+ */
29
+ border?: boolean;
15
30
  }
16
31
  /**
17
32
  * Nav is mainly used under the Header.
18
33
  * This is a wrapper for the NavList component.
19
34
  */
20
- export declare const Nav: React.ForwardRefExoticComponent<Pick<NavProps, "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" | "open" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "layout"> & React.RefAttributes<HTMLElement>>;
35
+ export declare const Nav: React.ForwardRefExoticComponent<Pick<NavProps, "slot" | "style" | "title" | "as" | "fixed" | "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" | "open" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "border" | "layout"> & React.RefAttributes<HTMLElement>>;
21
36
  export default Nav;
package/Nav/index.js CHANGED
@@ -17,7 +17,7 @@ var _Base = _interopRequireDefault(require("@digigov/react-core/Base"));
17
17
 
18
18
  var _clsx = _interopRequireDefault(require("clsx"));
19
19
 
20
- var _excluded = ["className", "open", "layout", "children"];
20
+ var _excluded = ["className", "open", "layout", "hidden", "fixed", "border", "children"];
21
21
 
22
22
  /**
23
23
  * Nav is mainly used under the Header.
@@ -29,12 +29,18 @@ var Nav = /*#__PURE__*/_react["default"].forwardRef(function Nav(_ref, ref) {
29
29
  open = _ref$open === void 0 ? false : _ref$open,
30
30
  _ref$layout = _ref.layout,
31
31
  layout = _ref$layout === void 0 ? 'horizontal' : _ref$layout,
32
+ _ref$hidden = _ref.hidden,
33
+ hidden = _ref$hidden === void 0 ? false : _ref$hidden,
34
+ _ref$fixed = _ref.fixed,
35
+ fixed = _ref$fixed === void 0 ? true : _ref$fixed,
36
+ _ref$border = _ref.border,
37
+ border = _ref$border === void 0 ? true : _ref$border,
32
38
  children = _ref.children,
33
39
  props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
34
40
  return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
35
41
  as: "nav",
36
42
  ref: ref,
37
- className: (0, _clsx["default"])(className, layout === 'horizontal' && 'govgr-nav-horizontal--border', true && 'govgr-horizontal-nav', open && 'govgr-horizontal-nav--open')
43
+ className: (0, _clsx["default"])(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')
38
44
  }, props), children);
39
45
  });
40
46
 
@@ -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)>