@digigov/react-core 0.9.0 → 0.10.2

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.
@@ -9,6 +9,7 @@ export interface AccordionSectionProps extends DivElementAttributes {
9
9
  }
10
10
  /**
11
11
  * AccordionSection should be inside the Accordion component.
12
+ *
12
13
  * Inside this component must place the AccordionSectionHeader and the AccordionSectionContent components.
13
14
  */
14
15
  export declare const AccordionSection: React.ForwardRefExoticComponent<Pick<AccordionSectionProps, "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "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" | "open"> & React.RefAttributes<HTMLDivElement>>;
@@ -19,6 +19,7 @@ var _excluded = ["className", "children"];
19
19
 
20
20
  /**
21
21
  * AccordionSection should be inside the Accordion component.
22
+ *
22
23
  * Inside this component must place the AccordionSectionHeader and the AccordionSectionContent components.
23
24
  */
24
25
  // eslint-disable-next-line react/display-name
package/CHANGELOG.md CHANGED
@@ -1,6 +1,23 @@
1
1
  # Change Log - @digigov/react-core
2
2
 
3
- This log was last generated on Thu, 17 Mar 2022 10:24:06 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 18 Apr 2022 13:00:33 GMT and should not be manually modified.
4
+
5
+ ## 0.10.2
6
+ Mon, 18 Apr 2022 13:00:33 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 0.10.1
11
+ Thu, 14 Apr 2022 12:32:51 GMT
12
+
13
+ _Version update only_
14
+
15
+ ## 0.10.0
16
+ Wed, 30 Mar 2022 12:28:30 GMT
17
+
18
+ ### Minor changes
19
+
20
+ - Add `fontSize` property in Hint, update tests
4
21
 
5
22
  ## 0.9.0
6
23
  Thu, 17 Mar 2022 10:24:06 GMT
@@ -1,5 +1,41 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`renders the Hint with fontSize=14 1`] = `
4
+ <ForwardRef(Hint)
5
+ fontSize="14"
6
+ >
7
+ <p
8
+ className="govgr-!-font-size-14 govgr-hint"
9
+ >
10
+ hello
11
+ </p>
12
+ </ForwardRef(Hint)>
13
+ `;
14
+
15
+ exports[`renders the Hint with fontSize=16 1`] = `
16
+ <ForwardRef(Hint)
17
+ fontSize="16"
18
+ >
19
+ <p
20
+ className="govgr-!-font-size-16 govgr-hint"
21
+ >
22
+ hello
23
+ </p>
24
+ </ForwardRef(Hint)>
25
+ `;
26
+
27
+ exports[`renders the Hint with fontSize=24 1`] = `
28
+ <ForwardRef(Hint)
29
+ fontSize="24"
30
+ >
31
+ <p
32
+ className="govgr-!-font-size-24 govgr-hint"
33
+ >
34
+ hello
35
+ </p>
36
+ </ForwardRef(Hint)>
37
+ `;
38
+
3
39
  exports[`renders the Hint with no props 1`] = `
4
40
  <ForwardRef(Hint)>
5
41
  <p
package/Hint/index.d.ts CHANGED
@@ -1,9 +1,14 @@
1
1
  import React from 'react';
2
2
  declare type PElementAttributes = JSX.IntrinsicElements['p'];
3
3
  export interface HintProps extends PElementAttributes {
4
+ /**
5
+ * fontSize is optional.
6
+ * You can add this fontSize override prop in order to change the font size.
7
+ */
8
+ fontSize?: '14' | '16' | '24';
4
9
  }
5
10
  /**
6
11
  * Hint component can be used in form pages and it gives an extra hint description to the form.
7
12
  */
8
- export declare const Hint: React.ForwardRefExoticComponent<Pick<HintProps, "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "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"> & React.RefAttributes<HTMLParagraphElement>>;
13
+ export declare const Hint: React.ForwardRefExoticComponent<Pick<HintProps, "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "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" | "fontSize"> & React.RefAttributes<HTMLParagraphElement>>;
9
14
  export default Hint;
package/Hint/index.js CHANGED
@@ -15,18 +15,19 @@ var _react = _interopRequireDefault(require("react"));
15
15
 
16
16
  var _clsx = _interopRequireDefault(require("clsx"));
17
17
 
18
- var _excluded = ["className", "children"];
18
+ var _excluded = ["fontSize", "className", "children"];
19
19
 
20
20
  /**
21
21
  * Hint component can be used in form pages and it gives an extra hint description to the form.
22
22
  */
23
23
  var Hint = /*#__PURE__*/_react["default"].forwardRef(function Hint(_ref, ref) {
24
- var className = _ref.className,
24
+ var fontSize = _ref.fontSize,
25
+ className = _ref.className,
25
26
  children = _ref.children,
26
27
  props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
27
28
  return /*#__PURE__*/_react["default"].createElement("p", (0, _extends2["default"])({
28
29
  ref: ref,
29
- className: (0, _clsx["default"])(className, true && 'govgr-hint')
30
+ className: (0, _clsx["default"])(className, fontSize === '14' && 'govgr-!-font-size-14', fontSize === '16' && 'govgr-!-font-size-16', fontSize === '24' && 'govgr-!-font-size-24', true && 'govgr-hint')
30
31
  }, props), children);
31
32
  });
32
33
 
@@ -12,4 +12,28 @@ var _ref = /*#__PURE__*/_react["default"].createElement(_Hint["default"], null,
12
12
 
13
13
  it('renders the Hint with no props', function () {
14
14
  expect((0, _enzyme.mount)(_ref)).toMatchSnapshot();
15
+ });
16
+
17
+ var _ref2 = /*#__PURE__*/_react["default"].createElement(_Hint["default"], {
18
+ fontSize: "14"
19
+ }, "hello");
20
+
21
+ it('renders the Hint with fontSize=14', function () {
22
+ expect((0, _enzyme.mount)(_ref2)).toMatchSnapshot();
23
+ });
24
+
25
+ var _ref3 = /*#__PURE__*/_react["default"].createElement(_Hint["default"], {
26
+ fontSize: "16"
27
+ }, "hello");
28
+
29
+ it('renders the Hint with fontSize=16', function () {
30
+ expect((0, _enzyme.mount)(_ref3)).toMatchSnapshot();
31
+ });
32
+
33
+ var _ref4 = /*#__PURE__*/_react["default"].createElement(_Hint["default"], {
34
+ fontSize: "24"
35
+ }, "hello");
36
+
37
+ it('renders the Hint with fontSize=24', function () {
38
+ expect((0, _enzyme.mount)(_ref4)).toMatchSnapshot();
15
39
  });
@@ -6,6 +6,7 @@ import clsx from 'clsx';
6
6
 
7
7
  /**
8
8
  * AccordionSection should be inside the Accordion component.
9
+ *
9
10
  * Inside this component must place the AccordionSectionHeader and the AccordionSectionContent components.
10
11
  */
11
12
  // eslint-disable-next-line react/display-name
@@ -1,5 +1,41 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`renders the Hint with fontSize=14 1`] = `
4
+ <ForwardRef(Hint)
5
+ fontSize="14"
6
+ >
7
+ <p
8
+ className="govgr-!-font-size-14 govgr-hint"
9
+ >
10
+ hello
11
+ </p>
12
+ </ForwardRef(Hint)>
13
+ `;
14
+
15
+ exports[`renders the Hint with fontSize=16 1`] = `
16
+ <ForwardRef(Hint)
17
+ fontSize="16"
18
+ >
19
+ <p
20
+ className="govgr-!-font-size-16 govgr-hint"
21
+ >
22
+ hello
23
+ </p>
24
+ </ForwardRef(Hint)>
25
+ `;
26
+
27
+ exports[`renders the Hint with fontSize=24 1`] = `
28
+ <ForwardRef(Hint)
29
+ fontSize="24"
30
+ >
31
+ <p
32
+ className="govgr-!-font-size-24 govgr-hint"
33
+ >
34
+ hello
35
+ </p>
36
+ </ForwardRef(Hint)>
37
+ `;
38
+
3
39
  exports[`renders the Hint with no props 1`] = `
4
40
  <ForwardRef(Hint)>
5
41
  <p
package/es/Hint/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", "children"];
3
+ var _excluded = ["fontSize", "className", "children"];
4
4
  import React from 'react';
5
5
  import clsx from 'clsx';
6
6
 
@@ -8,13 +8,14 @@ import clsx from 'clsx';
8
8
  * Hint component can be used in form pages and it gives an extra hint description to the form.
9
9
  */
10
10
  export var Hint = /*#__PURE__*/React.forwardRef(function Hint(_ref, ref) {
11
- var className = _ref.className,
11
+ var fontSize = _ref.fontSize,
12
+ className = _ref.className,
12
13
  children = _ref.children,
13
14
  props = _objectWithoutProperties(_ref, _excluded);
14
15
 
15
16
  return /*#__PURE__*/React.createElement("p", _extends({
16
17
  ref: ref,
17
- className: clsx(className, true && 'govgr-hint')
18
+ className: clsx(className, fontSize === '14' && 'govgr-!-font-size-14', fontSize === '16' && 'govgr-!-font-size-16', fontSize === '24' && 'govgr-!-font-size-24', true && 'govgr-hint')
18
19
  }, props), children);
19
20
  });
20
21
  export default Hint;
@@ -6,4 +6,28 @@ var _ref = /*#__PURE__*/React.createElement(Hint, null, "hello");
6
6
 
7
7
  it('renders the Hint with no props', function () {
8
8
  expect(mount(_ref)).toMatchSnapshot();
9
+ });
10
+
11
+ var _ref2 = /*#__PURE__*/React.createElement(Hint, {
12
+ fontSize: "14"
13
+ }, "hello");
14
+
15
+ it('renders the Hint with fontSize=14', function () {
16
+ expect(mount(_ref2)).toMatchSnapshot();
17
+ });
18
+
19
+ var _ref3 = /*#__PURE__*/React.createElement(Hint, {
20
+ fontSize: "16"
21
+ }, "hello");
22
+
23
+ it('renders the Hint with fontSize=16', function () {
24
+ expect(mount(_ref3)).toMatchSnapshot();
25
+ });
26
+
27
+ var _ref4 = /*#__PURE__*/React.createElement(Hint, {
28
+ fontSize: "24"
29
+ }, "hello");
30
+
31
+ it('renders the Hint with fontSize=24', function () {
32
+ expect(mount(_ref4)).toMatchSnapshot();
9
33
  });
@@ -6,6 +6,7 @@ import clsx from 'clsx';
6
6
 
7
7
  /**
8
8
  * AccordionSection should be inside the Accordion component.
9
+ *
9
10
  * Inside this component must place the AccordionSectionHeader and the AccordionSectionContent components.
10
11
  */
11
12
  // eslint-disable-next-line react/display-name
@@ -1,5 +1,41 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`renders the Hint with fontSize=14 1`] = `
4
+ <ForwardRef(Hint)
5
+ fontSize="14"
6
+ >
7
+ <p
8
+ className="govgr-!-font-size-14 govgr-hint"
9
+ >
10
+ hello
11
+ </p>
12
+ </ForwardRef(Hint)>
13
+ `;
14
+
15
+ exports[`renders the Hint with fontSize=16 1`] = `
16
+ <ForwardRef(Hint)
17
+ fontSize="16"
18
+ >
19
+ <p
20
+ className="govgr-!-font-size-16 govgr-hint"
21
+ >
22
+ hello
23
+ </p>
24
+ </ForwardRef(Hint)>
25
+ `;
26
+
27
+ exports[`renders the Hint with fontSize=24 1`] = `
28
+ <ForwardRef(Hint)
29
+ fontSize="24"
30
+ >
31
+ <p
32
+ className="govgr-!-font-size-24 govgr-hint"
33
+ >
34
+ hello
35
+ </p>
36
+ </ForwardRef(Hint)>
37
+ `;
38
+
3
39
  exports[`renders the Hint with no props 1`] = `
4
40
  <ForwardRef(Hint)>
5
41
  <p
package/esm/Hint/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", "children"];
3
+ var _excluded = ["fontSize", "className", "children"];
4
4
  import React from 'react';
5
5
  import clsx from 'clsx';
6
6
 
@@ -8,13 +8,14 @@ import clsx from 'clsx';
8
8
  * Hint component can be used in form pages and it gives an extra hint description to the form.
9
9
  */
10
10
  export var Hint = /*#__PURE__*/React.forwardRef(function Hint(_ref, ref) {
11
- var className = _ref.className,
11
+ var fontSize = _ref.fontSize,
12
+ className = _ref.className,
12
13
  children = _ref.children,
13
14
  props = _objectWithoutProperties(_ref, _excluded);
14
15
 
15
16
  return /*#__PURE__*/React.createElement("p", _extends({
16
17
  ref: ref,
17
- className: clsx(className, true && 'govgr-hint')
18
+ className: clsx(className, fontSize === '14' && 'govgr-!-font-size-14', fontSize === '16' && 'govgr-!-font-size-16', fontSize === '24' && 'govgr-!-font-size-24', true && 'govgr-hint')
18
19
  }, props), children);
19
20
  });
20
21
  export default Hint;
@@ -6,4 +6,28 @@ var _ref = /*#__PURE__*/React.createElement(Hint, null, "hello");
6
6
 
7
7
  it('renders the Hint with no props', function () {
8
8
  expect(mount(_ref)).toMatchSnapshot();
9
+ });
10
+
11
+ var _ref2 = /*#__PURE__*/React.createElement(Hint, {
12
+ fontSize: "14"
13
+ }, "hello");
14
+
15
+ it('renders the Hint with fontSize=14', function () {
16
+ expect(mount(_ref2)).toMatchSnapshot();
17
+ });
18
+
19
+ var _ref3 = /*#__PURE__*/React.createElement(Hint, {
20
+ fontSize: "16"
21
+ }, "hello");
22
+
23
+ it('renders the Hint with fontSize=16', function () {
24
+ expect(mount(_ref3)).toMatchSnapshot();
25
+ });
26
+
27
+ var _ref4 = /*#__PURE__*/React.createElement(Hint, {
28
+ fontSize: "24"
29
+ }, "hello");
30
+
31
+ it('renders the Hint with fontSize=24', function () {
32
+ expect(mount(_ref4)).toMatchSnapshot();
9
33
  });
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Digigov v0.9.0
1
+ /** @license Digigov v0.10.2
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digigov/react-core",
3
- "version": "0.9.0",
3
+ "version": "0.10.2",
4
4
  "description": "@digigov react core components",
5
5
  "author": "GRNET Developers <devs@lists.grnet.gr>",
6
6
  "license": "MIT",
@@ -11,7 +11,7 @@
11
11
  "directory": "dist"
12
12
  },
13
13
  "peerDependencies": {
14
- "@digigov/css": "0.17.0",
14
+ "@digigov/css": "0.20.1",
15
15
  "clsx": "1.1.1",
16
16
  "react": "16.14.0",
17
17
  "react-dom": "16.14.0"