@digigov/react-core 1.0.0-266e80f3 → 1.0.0-3bfc7d37

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 (82) hide show
  1. package/Blockquote/__snapshots__/index.test.tsx.snap +17 -0
  2. package/Blockquote/index.d.ts +8 -1
  3. package/Blockquote/index.js +3 -2
  4. package/Blockquote/index.test.js +8 -0
  5. package/Card/__snapshots__/index.test.tsx.snap +21 -0
  6. package/Card/index.d.ts +8 -1
  7. package/Card/index.js +3 -2
  8. package/Card/index.test.js +23 -15
  9. package/KitchenSinkCard/index.d.ts +1 -1
  10. package/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
  11. package/RadioItem/index.d.ts +4 -4
  12. package/RadioItem/index.js +3 -3
  13. package/RadioItem/index.test.js +4 -4
  14. package/StepNav/__snapshots__/index.test.tsx.snap +17 -0
  15. package/StepNav/index.d.ts +8 -1
  16. package/StepNav/index.js +3 -2
  17. package/StepNav/index.test.js +8 -0
  18. package/TaskList/__snapshots__/index.test.tsx.snap +17 -0
  19. package/TaskList/index.d.ts +8 -1
  20. package/TaskList/index.js +3 -2
  21. package/TaskList/index.test.js +8 -0
  22. package/Timeline/__snapshots__/index.test.tsx.snap +17 -0
  23. package/Timeline/index.d.ts +2 -2
  24. package/Timeline/index.js +2 -3
  25. package/Timeline/index.test.js +8 -0
  26. package/es/Blockquote/__snapshots__/index.test.tsx.snap +17 -0
  27. package/es/Blockquote/index.js +3 -2
  28. package/es/Blockquote/index.test.js +8 -0
  29. package/es/Card/__snapshots__/index.test.tsx.snap +21 -0
  30. package/es/Card/index.js +3 -2
  31. package/es/Card/index.test.js +23 -15
  32. package/es/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
  33. package/es/RadioItem/index.js +3 -3
  34. package/es/RadioItem/index.test.js +4 -4
  35. package/es/StepNav/__snapshots__/index.test.tsx.snap +17 -0
  36. package/es/StepNav/index.js +3 -2
  37. package/es/StepNav/index.test.js +8 -0
  38. package/es/TaskList/__snapshots__/index.test.tsx.snap +17 -0
  39. package/es/TaskList/index.js +3 -2
  40. package/es/TaskList/index.test.js +8 -0
  41. package/es/Timeline/__snapshots__/index.test.tsx.snap +17 -0
  42. package/es/Timeline/index.js +2 -3
  43. package/es/Timeline/index.test.js +8 -0
  44. package/esm/Blockquote/__snapshots__/index.test.tsx.snap +17 -0
  45. package/esm/Blockquote/index.js +3 -2
  46. package/esm/Blockquote/index.test.js +8 -0
  47. package/esm/Card/__snapshots__/index.test.tsx.snap +21 -0
  48. package/esm/Card/index.js +3 -2
  49. package/esm/Card/index.test.js +23 -15
  50. package/esm/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
  51. package/esm/RadioItem/index.js +3 -3
  52. package/esm/RadioItem/index.test.js +4 -4
  53. package/esm/StepNav/__snapshots__/index.test.tsx.snap +17 -0
  54. package/esm/StepNav/index.js +3 -2
  55. package/esm/StepNav/index.test.js +8 -0
  56. package/esm/TaskList/__snapshots__/index.test.tsx.snap +17 -0
  57. package/esm/TaskList/index.js +3 -2
  58. package/esm/TaskList/index.test.js +8 -0
  59. package/esm/Timeline/__snapshots__/index.test.tsx.snap +17 -0
  60. package/esm/Timeline/index.js +2 -3
  61. package/esm/Timeline/index.test.js +8 -0
  62. package/esm/index.js +1 -1
  63. package/package.json +3 -3
  64. package/src/Blockquote/__snapshots__/index.test.tsx.snap +17 -0
  65. package/src/Blockquote/index.test.tsx +4 -0
  66. package/src/Blockquote/index.tsx +11 -2
  67. package/src/Card/__snapshots__/index.test.tsx.snap +21 -0
  68. package/src/Card/index.test.tsx +3 -0
  69. package/src/Card/index.tsx +9 -1
  70. package/src/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
  71. package/src/RadioItem/index.test.tsx +4 -4
  72. package/src/RadioItem/index.tsx +5 -5
  73. package/src/StepNav/__snapshots__/index.test.tsx.snap +17 -0
  74. package/src/StepNav/index.test.tsx +4 -0
  75. package/src/StepNav/index.tsx +11 -2
  76. package/src/TaskList/__snapshots__/index.test.tsx.snap +17 -0
  77. package/src/TaskList/index.test.tsx +4 -0
  78. package/src/TaskList/index.tsx +11 -2
  79. package/src/Timeline/__snapshots__/index.test.tsx.snap +17 -0
  80. package/src/Timeline/index.test.tsx +4 -0
  81. package/src/Timeline/index.tsx +4 -4
  82. package/src/registry.js +2 -1
@@ -1,5 +1,22 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`renders the TaskList with dense prop 1`] = `
4
+ <ForwardRef(TaskList)
5
+ dense={true}
6
+ >
7
+ <ForwardRef(Base)
8
+ as="ol"
9
+ className="govgr-task--dense govgr-task-list"
10
+ >
11
+ <ol
12
+ className="govgr-task--dense govgr-task-list"
13
+ >
14
+ hello
15
+ </ol>
16
+ </ForwardRef(Base)>
17
+ </ForwardRef(TaskList)>
18
+ `;
19
+
3
20
  exports[`renders the TaskList with no prop 1`] = `
4
21
  <ForwardRef(TaskList)>
5
22
  <ForwardRef(Base)
@@ -1,10 +1,17 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
3
  export interface TaskListProps extends BaseProps<'ol'> {
4
+ /**
5
+ * dense is optional.
6
+ * @value true TaskList will be dense.
7
+ * @value false
8
+ * @default false
9
+ * */
10
+ dense?: boolean;
4
11
  }
5
12
  /**
6
13
  * TaskList component is used for listing items.
7
14
  * This component must contain TaskListItem component.
8
15
  */
9
- export declare const TaskList: React.ForwardRefExoticComponent<Pick<TaskListProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "type" | "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" | "reversed" | "start" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLOListElement>>;
16
+ export declare const TaskList: React.ForwardRefExoticComponent<Pick<TaskListProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "type" | "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" | "reversed" | "start" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "dense"> & React.RefAttributes<HTMLOListElement>>;
10
17
  export default TaskList;
package/TaskList/index.js CHANGED
@@ -17,7 +17,7 @@ var _clsx = _interopRequireDefault(require("clsx"));
17
17
 
18
18
  var _Base = _interopRequireDefault(require("@digigov/react-core/Base"));
19
19
 
20
- var _excluded = ["className", "children"];
20
+ var _excluded = ["className", "dense", "children"];
21
21
 
22
22
  /**
23
23
  * TaskList component is used for listing items.
@@ -25,12 +25,13 @@ var _excluded = ["className", "children"];
25
25
  */
26
26
  var TaskList = /*#__PURE__*/_react["default"].forwardRef(function TaskList(_ref, ref) {
27
27
  var className = _ref.className,
28
+ dense = _ref.dense,
28
29
  children = _ref.children,
29
30
  props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
30
31
  return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
31
32
  as: "ol",
32
33
  ref: ref,
33
- className: (0, _clsx["default"])(className, true && 'govgr-task-list')
34
+ className: (0, _clsx["default"])(className, dense && 'govgr-task-list--dense', true && 'govgr-task-list')
34
35
  }, props), children);
35
36
  });
36
37
 
@@ -12,4 +12,12 @@ var _ref = /*#__PURE__*/_react["default"].createElement(_TaskList["default"], nu
12
12
 
13
13
  it('renders the TaskList with no prop', function () {
14
14
  expect((0, _enzyme.mount)(_ref)).toMatchSnapshot();
15
+ });
16
+
17
+ var _ref2 = /*#__PURE__*/_react["default"].createElement(_TaskList["default"], {
18
+ dense: true
19
+ }, "hello");
20
+
21
+ it('renders the TaskList with dense prop', function () {
22
+ expect((0, _enzyme.mount)(_ref2)).toMatchSnapshot();
15
23
  });
@@ -1,5 +1,22 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`renders the Timeline with dense prop 1`] = `
4
+ <ForwardRef(Timeline)
5
+ dense={true}
6
+ >
7
+ <ForwardRef(Base)
8
+ as="ol"
9
+ className="govgr-timeline--dense govgr-timeline"
10
+ >
11
+ <ol
12
+ className="govgr-timeline--dense govgr-timeline"
13
+ >
14
+ hello
15
+ </ol>
16
+ </ForwardRef(Base)>
17
+ </ForwardRef(Timeline)>
18
+ `;
19
+
3
20
  exports[`renders the Timeline with no prop 1`] = `
4
21
  <ForwardRef(Timeline)>
5
22
  <ForwardRef(Base)
@@ -2,8 +2,8 @@ import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
3
  export interface TimelineProps extends BaseProps<'ol'> {
4
4
  /**
5
- * spaced is optional. Use it to add space between the list items.
6
- * @value true
5
+ * dense is optional.
6
+ * @value true Timeline will be dense.
7
7
  * @value false
8
8
  * @default true
9
9
  */
package/Timeline/index.js CHANGED
@@ -24,15 +24,14 @@ var _excluded = ["dense", "className", "children"];
24
24
  * This component must contain TimelineItem component.
25
25
  */
26
26
  var Timeline = /*#__PURE__*/_react["default"].forwardRef(function Timeline(_ref, ref) {
27
- var _ref$dense = _ref.dense,
28
- dense = _ref$dense === void 0 ? true : _ref$dense,
27
+ var dense = _ref.dense,
29
28
  className = _ref.className,
30
29
  children = _ref.children,
31
30
  props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
32
31
  return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
33
32
  as: "ol",
34
33
  ref: ref,
35
- className: (0, _clsx["default"])(className, !dense && 'govgr-timeline--spaced', true && 'govgr-timeline')
34
+ className: (0, _clsx["default"])(className, dense && 'govgr-timeline--dense', true && 'govgr-timeline')
36
35
  }, props), children);
37
36
  });
38
37
 
@@ -12,4 +12,12 @@ var _ref = /*#__PURE__*/_react["default"].createElement(_Timeline["default"], nu
12
12
 
13
13
  it('renders the Timeline with no prop', function () {
14
14
  expect((0, _enzyme.mount)(_ref)).toMatchSnapshot();
15
+ });
16
+
17
+ var _ref2 = /*#__PURE__*/_react["default"].createElement(_Timeline["default"], {
18
+ dense: true
19
+ }, "hello");
20
+
21
+ it('renders the Timeline with dense prop', function () {
22
+ expect((0, _enzyme.mount)(_ref2)).toMatchSnapshot();
15
23
  });
@@ -1,5 +1,22 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`renders the Blockquote with dense props 1`] = `
4
+ <ForwardRef(Blockquote)
5
+ dense={true}
6
+ >
7
+ <ForwardRef(Base)
8
+ as="blockquote"
9
+ className="govgr-blockquote--dense govgr-blockquote"
10
+ >
11
+ <blockquote
12
+ className="govgr-blockquote--dense govgr-blockquote"
13
+ >
14
+ hello
15
+ </blockquote>
16
+ </ForwardRef(Base)>
17
+ </ForwardRef(Blockquote)>
18
+ `;
19
+
3
20
  exports[`renders the Blockquote with no props 1`] = `
4
21
  <ForwardRef(Blockquote)>
5
22
  <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", "children"];
3
+ var _excluded = ["className", "dense", "children"];
4
4
  import React from 'react';
5
5
  import clsx from 'clsx';
6
6
  import Base from '@digigov/react-core/Base';
@@ -10,13 +10,14 @@ import Base from '@digigov/react-core/Base';
10
10
  */
11
11
  export var Blockquote = /*#__PURE__*/React.forwardRef(function Blockquote(_ref, ref) {
12
12
  var className = _ref.className,
13
+ dense = _ref.dense,
13
14
  children = _ref.children,
14
15
  props = _objectWithoutProperties(_ref, _excluded);
15
16
 
16
17
  return /*#__PURE__*/React.createElement(Base, _extends({
17
18
  as: "blockquote",
18
19
  ref: ref,
19
- className: clsx(className, true && 'govgr-blockquote')
20
+ className: clsx(className, dense && 'govgr-blockquote--dense', true && 'govgr-blockquote')
20
21
  }, props), children);
21
22
  });
22
23
  export default Blockquote;
@@ -6,4 +6,12 @@ var _ref = /*#__PURE__*/React.createElement(Blockquote, null, "hello");
6
6
 
7
7
  it('renders the Blockquote with no props', function () {
8
8
  expect(mount(_ref)).toMatchSnapshot();
9
+ });
10
+
11
+ var _ref2 = /*#__PURE__*/React.createElement(Blockquote, {
12
+ dense: true
13
+ }, "hello");
14
+
15
+ it('renders the Blockquote with dense props', function () {
16
+ expect(mount(_ref2)).toMatchSnapshot();
9
17
  });
@@ -21,6 +21,27 @@ exports[`renders the Card with callToActon props 1`] = `
21
21
  </ForwardRef(Card)>
22
22
  `;
23
23
 
24
+ exports[`renders the Card with dense props 1`] = `
25
+ <ForwardRef(Card)
26
+ dense={true}
27
+ >
28
+ <ForwardRef(Base)
29
+ as="div"
30
+ className="govgr-card--dense govgr-card"
31
+ >
32
+ <div
33
+ className="govgr-card--dense govgr-card"
34
+ >
35
+ <div
36
+ className="govgr-card__body"
37
+ >
38
+ hello
39
+ </div>
40
+ </div>
41
+ </ForwardRef(Base)>
42
+ </ForwardRef(Card)>
43
+ `;
44
+
24
45
  exports[`renders the Card with no props 1`] = `
25
46
  <ForwardRef(Card)>
26
47
  <ForwardRef(Base)
package/es/Card/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 = ["variant", "borderColor", "callToAction", "className", "children"];
3
+ var _excluded = ["variant", "borderColor", "callToAction", "dense", "className", "children"];
4
4
  import React from 'react';
5
5
  import clsx from 'clsx';
6
6
  import Base from '@digigov/react-core/Base';
@@ -14,6 +14,7 @@ export var Card = /*#__PURE__*/React.forwardRef(function Card(_ref, ref) {
14
14
  var variant = _ref.variant,
15
15
  borderColor = _ref.borderColor,
16
16
  callToAction = _ref.callToAction,
17
+ dense = _ref.dense,
17
18
  className = _ref.className,
18
19
  children = _ref.children,
19
20
  props = _objectWithoutProperties(_ref, _excluded);
@@ -21,7 +22,7 @@ export var Card = /*#__PURE__*/React.forwardRef(function Card(_ref, ref) {
21
22
  return /*#__PURE__*/React.createElement(Base, _extends({
22
23
  as: "div",
23
24
  ref: ref,
24
- className: clsx(className, variant === 'border-top' && 'govgr-card--border-top', borderColor === 'light' && 'govgr-card--border-light', borderColor === 'dark' && 'govgr-card--border-dark', variant === 'divider' && 'govgr-card--divider', variant === 'border' && 'govgr-card--border', callToAction && 'govgr-card--cta', true && 'govgr-card')
25
+ className: clsx(className, variant === 'border-top' && 'govgr-card--border-top', borderColor === 'light' && 'govgr-card--border-light', borderColor === 'dark' && 'govgr-card--border-dark', variant === 'divider' && 'govgr-card--divider', variant === 'border' && 'govgr-card--border', callToAction && 'govgr-card--cta', dense && 'govgr-card--dense', true && 'govgr-card')
25
26
  }, props), /*#__PURE__*/React.createElement("div", {
26
27
  className: clsx(true && 'govgr-card__body')
27
28
  }, children));
@@ -17,71 +17,79 @@ it('renders the Card with callToActon props', function () {
17
17
  });
18
18
 
19
19
  var _ref3 = /*#__PURE__*/React.createElement(Card, {
20
- variant: "border"
20
+ dense: true
21
21
  }, "hello");
22
22
 
23
- it('renders the Card with variant="border" props', function () {
23
+ it('renders the Card with dense props', function () {
24
24
  expect(mount(_ref3)).toMatchSnapshot();
25
25
  });
26
26
 
27
27
  var _ref4 = /*#__PURE__*/React.createElement(Card, {
28
- variant: "divider"
28
+ variant: "border"
29
29
  }, "hello");
30
30
 
31
- it('renders the Card with variant="divider" props', function () {
31
+ it('renders the Card with variant="border" props', function () {
32
32
  expect(mount(_ref4)).toMatchSnapshot();
33
33
  });
34
34
 
35
35
  var _ref5 = /*#__PURE__*/React.createElement(Card, {
36
- variant: "border-top"
36
+ variant: "divider"
37
37
  }, "hello");
38
38
 
39
- it('renders the Card with variant="border-top" props', function () {
39
+ it('renders the Card with variant="divider" props', function () {
40
40
  expect(mount(_ref5)).toMatchSnapshot();
41
41
  });
42
42
 
43
43
  var _ref6 = /*#__PURE__*/React.createElement(Card, {
44
+ variant: "border-top"
45
+ }, "hello");
46
+
47
+ it('renders the Card with variant="border-top" props', function () {
48
+ expect(mount(_ref6)).toMatchSnapshot();
49
+ });
50
+
51
+ var _ref7 = /*#__PURE__*/React.createElement(Card, {
44
52
  variant: "border",
45
53
  borderColor: "dark"
46
54
  }, "hello");
47
55
 
48
56
  it('renders the Card with variant="border" and borderColor="dark" props', function () {
49
- expect(mount(_ref6)).toMatchSnapshot();
57
+ expect(mount(_ref7)).toMatchSnapshot();
50
58
  });
51
59
 
52
- var _ref7 = /*#__PURE__*/React.createElement(Card, {
60
+ var _ref8 = /*#__PURE__*/React.createElement(Card, {
53
61
  variant: "border",
54
62
  borderColor: "light"
55
63
  }, "hello");
56
64
 
57
65
  it('renders the Card with variant="border" and borderColor="light" props', function () {
58
- expect(mount(_ref7)).toMatchSnapshot();
66
+ expect(mount(_ref8)).toMatchSnapshot();
59
67
  });
60
68
 
61
- var _ref8 = /*#__PURE__*/React.createElement(Card, {
69
+ var _ref9 = /*#__PURE__*/React.createElement(Card, {
62
70
  variant: "border-top",
63
71
  borderColor: "dark"
64
72
  }, "hello");
65
73
 
66
74
  it('renders the Card with variant="border-top" and borderColor="dark" props', function () {
67
- expect(mount(_ref8)).toMatchSnapshot();
75
+ expect(mount(_ref9)).toMatchSnapshot();
68
76
  });
69
77
 
70
- var _ref9 = /*#__PURE__*/React.createElement(Card, {
78
+ var _ref10 = /*#__PURE__*/React.createElement(Card, {
71
79
  variant: "border-top",
72
80
  borderColor: "light"
73
81
  }, "hello");
74
82
 
75
83
  it('renders the Card with variant="border-top" and borderColor="light" props', function () {
76
- expect(mount(_ref9)).toMatchSnapshot();
84
+ expect(mount(_ref10)).toMatchSnapshot();
77
85
  });
78
86
 
79
- var _ref10 = /*#__PURE__*/React.createElement(Card, {
87
+ var _ref11 = /*#__PURE__*/React.createElement(Card, {
80
88
  variant: "border-top",
81
89
  borderColor: "dark",
82
90
  callToAction: true
83
91
  }, "hello");
84
92
 
85
93
  it('renders the Card with variant="border-top" and borderColor="dark" callToAction props', function () {
86
- expect(mount(_ref10)).toMatchSnapshot();
94
+ expect(mount(_ref11)).toMatchSnapshot();
87
95
  });
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports[`renders the RadioItem \`divider\` props 1`] = `
4
4
  <ForwardRef(RadioItem)
5
- divider="ή"
5
+ dividerText="ή"
6
6
  >
7
7
  <ForwardRef(ChoiceDividerText)>
8
8
  <ForwardRef(Base)
@@ -91,7 +91,7 @@ exports[`renders the RadioItem value props 1`] = `
91
91
  exports[`renders the RadioItem with \`name\`, \`disabled\`, \`divider\` and \`value\` props 1`] = `
92
92
  <ForwardRef(RadioItem)
93
93
  disabled={true}
94
- divider="ή"
94
+ dividerText="ή"
95
95
  name="name"
96
96
  value="someValue"
97
97
  >
@@ -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 = ["divider", "name", "value", "className", "disabled", "children"];
3
+ var _excluded = ["dividerText", "name", "value", "className", "disabled", "children"];
4
4
  import React from 'react';
5
5
  import clsx from 'clsx';
6
6
  import Base from '@digigov/react-core/Base';
@@ -12,7 +12,7 @@ import LabelContainer from '@digigov/react-core/LabelContainer';
12
12
  * RadioItem component must be included inside Radio component, as a children component.
13
13
  */
14
14
  export var RadioItem = /*#__PURE__*/React.forwardRef(function RadioItem(_ref, ref) {
15
- var divider = _ref.divider,
15
+ var dividerText = _ref.dividerText,
16
16
  name = _ref.name,
17
17
  value = _ref.value,
18
18
  className = _ref.className,
@@ -21,7 +21,7 @@ export var RadioItem = /*#__PURE__*/React.forwardRef(function RadioItem(_ref, re
21
21
  children = _ref.children,
22
22
  props = _objectWithoutProperties(_ref, _excluded);
23
23
 
24
- return /*#__PURE__*/React.createElement(React.Fragment, null, divider && /*#__PURE__*/React.createElement(ChoiceDividerText, null, divider), /*#__PURE__*/React.createElement("div", {
24
+ return /*#__PURE__*/React.createElement(React.Fragment, null, dividerText && /*#__PURE__*/React.createElement(ChoiceDividerText, null, dividerText), /*#__PURE__*/React.createElement("div", {
25
25
  className: clsx(className, true && 'govgr-radios__item')
26
26
  }, /*#__PURE__*/React.createElement(LabelContainer, {
27
27
  className: clsx(disabled && 'govgr-radios__label--disabled', true && 'govgr-radios__label')
@@ -25,10 +25,10 @@ it('renders the RadioItem value props', function () {
25
25
  });
26
26
 
27
27
  var _ref4 = /*#__PURE__*/React.createElement(RadioItem, {
28
- divider: 'ή'
28
+ dividerText: 'ή'
29
29
  }, "hello");
30
30
 
31
- it('renders the RadioItem `divider` props', function () {
31
+ it('renders the RadioItem `dividerText` props', function () {
32
32
  expect(mount(_ref4)).toMatchSnapshot();
33
33
  });
34
34
 
@@ -62,10 +62,10 @@ it('renders the RadioItem with name disabled and value props', function () {
62
62
  var _ref8 = /*#__PURE__*/React.createElement(RadioItem, {
63
63
  name: 'name',
64
64
  value: 'someValue',
65
- divider: 'ή',
65
+ dividerText: 'ή',
66
66
  disabled: true
67
67
  }, "hello");
68
68
 
69
- it('renders the RadioItem with `name`, `disabled`, `divider` and `value` props', function () {
69
+ it('renders the RadioItem with `name`, `disabled`, `dividerText` and `value` props', function () {
70
70
  expect(mount(_ref8)).toMatchSnapshot();
71
71
  });
@@ -1,5 +1,22 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`renders the StepNav with dense props 1`] = `
4
+ <ForwardRef(StepNav)
5
+ dense={true}
6
+ >
7
+ <ForwardRef(Base)
8
+ as="div"
9
+ className="govgr-step--dense govgr-step-nav"
10
+ >
11
+ <div
12
+ className="govgr-step--dense govgr-step-nav"
13
+ >
14
+ hello
15
+ </div>
16
+ </ForwardRef(Base)>
17
+ </ForwardRef(StepNav)>
18
+ `;
19
+
3
20
  exports[`renders the StepNav with no props 1`] = `
4
21
  <ForwardRef(StepNav)>
5
22
  <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", "children"];
3
+ var _excluded = ["className", "dense", "children"];
4
4
  import React from 'react';
5
5
  import clsx from 'clsx';
6
6
  import Base from '@digigov/react-core/Base';
@@ -11,13 +11,14 @@ import Base from '@digigov/react-core/Base';
11
11
  */
12
12
  export var StepNav = /*#__PURE__*/React.forwardRef(function StepNav(_ref, ref) {
13
13
  var className = _ref.className,
14
+ dense = _ref.dense,
14
15
  children = _ref.children,
15
16
  props = _objectWithoutProperties(_ref, _excluded);
16
17
 
17
18
  return /*#__PURE__*/React.createElement(Base, _extends({
18
19
  as: "div",
19
20
  ref: ref,
20
- className: clsx(className, true && 'govgr-step-nav')
21
+ className: clsx(className, dense && 'govgr-step-nav--dense', true && 'govgr-step-nav')
21
22
  }, props), children);
22
23
  });
23
24
  export default StepNav;
@@ -6,4 +6,12 @@ var _ref = /*#__PURE__*/React.createElement(StepNav, null, "hello");
6
6
 
7
7
  it('renders the StepNav with no props', function () {
8
8
  expect(mount(_ref)).toMatchSnapshot();
9
+ });
10
+
11
+ var _ref2 = /*#__PURE__*/React.createElement(StepNav, {
12
+ dense: true
13
+ }, "hello");
14
+
15
+ it('renders the StepNav with dense props', function () {
16
+ expect(mount(_ref2)).toMatchSnapshot();
9
17
  });
@@ -1,5 +1,22 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`renders the TaskList with dense prop 1`] = `
4
+ <ForwardRef(TaskList)
5
+ dense={true}
6
+ >
7
+ <ForwardRef(Base)
8
+ as="ol"
9
+ className="govgr-task--dense govgr-task-list"
10
+ >
11
+ <ol
12
+ className="govgr-task--dense govgr-task-list"
13
+ >
14
+ hello
15
+ </ol>
16
+ </ForwardRef(Base)>
17
+ </ForwardRef(TaskList)>
18
+ `;
19
+
3
20
  exports[`renders the TaskList with no prop 1`] = `
4
21
  <ForwardRef(TaskList)>
5
22
  <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", "children"];
3
+ var _excluded = ["className", "dense", "children"];
4
4
  import React from 'react';
5
5
  import clsx from 'clsx';
6
6
  import Base from '@digigov/react-core/Base';
@@ -11,13 +11,14 @@ import Base from '@digigov/react-core/Base';
11
11
  */
12
12
  export var TaskList = /*#__PURE__*/React.forwardRef(function TaskList(_ref, ref) {
13
13
  var className = _ref.className,
14
+ dense = _ref.dense,
14
15
  children = _ref.children,
15
16
  props = _objectWithoutProperties(_ref, _excluded);
16
17
 
17
18
  return /*#__PURE__*/React.createElement(Base, _extends({
18
19
  as: "ol",
19
20
  ref: ref,
20
- className: clsx(className, true && 'govgr-task-list')
21
+ className: clsx(className, dense && 'govgr-task-list--dense', true && 'govgr-task-list')
21
22
  }, props), children);
22
23
  });
23
24
  export default TaskList;
@@ -6,4 +6,12 @@ var _ref = /*#__PURE__*/React.createElement(TaskList, null, "hello");
6
6
 
7
7
  it('renders the TaskList with no prop', function () {
8
8
  expect(mount(_ref)).toMatchSnapshot();
9
+ });
10
+
11
+ var _ref2 = /*#__PURE__*/React.createElement(TaskList, {
12
+ dense: true
13
+ }, "hello");
14
+
15
+ it('renders the TaskList with dense prop', function () {
16
+ expect(mount(_ref2)).toMatchSnapshot();
9
17
  });
@@ -1,5 +1,22 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`renders the Timeline with dense prop 1`] = `
4
+ <ForwardRef(Timeline)
5
+ dense={true}
6
+ >
7
+ <ForwardRef(Base)
8
+ as="ol"
9
+ className="govgr-timeline--dense govgr-timeline"
10
+ >
11
+ <ol
12
+ className="govgr-timeline--dense govgr-timeline"
13
+ >
14
+ hello
15
+ </ol>
16
+ </ForwardRef(Base)>
17
+ </ForwardRef(Timeline)>
18
+ `;
19
+
3
20
  exports[`renders the Timeline with no prop 1`] = `
4
21
  <ForwardRef(Timeline)>
5
22
  <ForwardRef(Base)
@@ -10,8 +10,7 @@ import Base from '@digigov/react-core/Base';
10
10
  * This component must contain TimelineItem component.
11
11
  */
12
12
  export var Timeline = /*#__PURE__*/React.forwardRef(function Timeline(_ref, ref) {
13
- var _ref$dense = _ref.dense,
14
- dense = _ref$dense === void 0 ? true : _ref$dense,
13
+ var dense = _ref.dense,
15
14
  className = _ref.className,
16
15
  children = _ref.children,
17
16
  props = _objectWithoutProperties(_ref, _excluded);
@@ -19,7 +18,7 @@ export var Timeline = /*#__PURE__*/React.forwardRef(function Timeline(_ref, ref)
19
18
  return /*#__PURE__*/React.createElement(Base, _extends({
20
19
  as: "ol",
21
20
  ref: ref,
22
- className: clsx(className, !dense && 'govgr-timeline--spaced', true && 'govgr-timeline')
21
+ className: clsx(className, dense && 'govgr-timeline--dense', true && 'govgr-timeline')
23
22
  }, props), children);
24
23
  });
25
24
  export default Timeline;
@@ -6,4 +6,12 @@ var _ref = /*#__PURE__*/React.createElement(Timeline, null, "hello");
6
6
 
7
7
  it('renders the Timeline with no prop', function () {
8
8
  expect(mount(_ref)).toMatchSnapshot();
9
+ });
10
+
11
+ var _ref2 = /*#__PURE__*/React.createElement(Timeline, {
12
+ dense: true
13
+ }, "hello");
14
+
15
+ it('renders the Timeline with dense prop', function () {
16
+ expect(mount(_ref2)).toMatchSnapshot();
9
17
  });