@digigov/react-core 0.3.1 → 0.5.1
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.
- package/Button/index.d.ts +5 -1
- package/Button/index.js +4 -2
- package/CHANGELOG.md +36 -1
- package/CallToAction/index.js +11 -4
- package/Card/__snapshots__/index.test.tsx.snap +21 -5
- package/Card/index.d.ts +4 -3
- package/Card/index.js +4 -3
- package/Card/index.test.js +10 -2
- package/CheckboxConditional/__snapshots__/index.test.tsx.snap +2 -11
- package/CheckboxConditional/index.d.ts +1 -1
- package/CheckboxConditional/index.js +2 -6
- package/CheckboxItem/__snapshots__/index.test.tsx.snap +14 -14
- package/CheckboxItem/index.d.ts +5 -5
- package/CheckboxItem/index.js +6 -6
- package/Container/index.d.ts +10 -2
- package/Container/index.js +9 -5
- package/DateInputItem/__snapshots__/index.test.tsx.snap +37 -13
- package/DateInputItem/index.d.ts +12 -2
- package/DateInputItem/index.js +7 -4
- package/DateInputItem/index.test.js +9 -0
- package/Field/__snapshots__/index.test.tsx.snap +35 -0
- package/Field/index.d.ts +13 -0
- package/{FormGroup → Field}/index.js +6 -6
- package/{FormGroup → Field}/index.test.d.ts +0 -0
- package/Field/index.test.js +31 -0
- package/FieldsetLegend/__snapshots__/index.test.tsx.snap +102 -876
- package/FieldsetLegend/index.d.ts +4 -4
- package/FieldsetLegend/index.js +9 -8
- package/FieldsetLegend/index.test.js +48 -144
- package/FileUpload/index.d.ts +3 -3
- package/FileUpload/index.js +3 -3
- package/FooterImage/index.d.ts +1 -1
- package/GovGRLogo/index.js +1 -1
- package/Grid/index.d.ts +1 -1
- package/Header/index.js +1 -1
- package/HellenicRepublicLogo/index.d.ts +1 -1
- package/Hidden/index.d.ts +17 -0
- package/Hidden/index.js +47 -0
- package/Hidden/index.test.d.ts +1 -0
- package/Hidden/index.test.js +49 -0
- package/Label/index.d.ts +1 -6
- package/Label/index.js +3 -5
- package/LabelTitle/__snapshots__/index.test.tsx.snap +133 -0
- package/LabelTitle/index.d.ts +19 -0
- package/LabelTitle/index.js +41 -0
- package/LabelTitle/index.test.d.ts +1 -0
- package/LabelTitle/index.test.js +91 -0
- package/Masthead/index.js +3 -7
- package/RadioConditional/__snapshots__/index.test.tsx.snap +39 -0
- package/RadioConditional/index.d.ts +15 -0
- package/RadioConditional/index.js +42 -0
- package/RadioConditional/index.test.d.ts +1 -0
- package/RadioConditional/index.test.js +23 -0
- package/RadioItem/__snapshots__/index.test.tsx.snap +20 -20
- package/RadioItem/index.d.ts +5 -5
- package/RadioItem/index.js +6 -6
- package/Select/index.d.ts +1 -1
- package/Table/index.d.ts +1 -1
- package/TextArea/index.d.ts +1 -1
- package/TextInput/index.d.ts +1 -1
- package/es/Button/index.js +4 -2
- package/es/CallToAction/index.js +11 -4
- package/es/Card/__snapshots__/index.test.tsx.snap +21 -5
- package/es/Card/index.js +4 -3
- package/es/Card/index.test.js +10 -2
- package/es/CheckboxConditional/__snapshots__/index.test.tsx.snap +2 -11
- package/es/CheckboxConditional/index.js +2 -6
- package/es/CheckboxItem/__snapshots__/index.test.tsx.snap +14 -14
- package/es/CheckboxItem/index.js +6 -6
- package/es/Container/index.js +9 -5
- package/es/DateInputItem/__snapshots__/index.test.tsx.snap +37 -13
- package/es/DateInputItem/index.js +7 -4
- package/es/DateInputItem/index.test.js +9 -0
- package/es/Field/__snapshots__/index.test.tsx.snap +35 -0
- package/es/{FormGroup → Field}/index.js +4 -4
- package/es/Field/index.test.js +25 -0
- package/es/FieldsetLegend/__snapshots__/index.test.tsx.snap +102 -876
- package/es/FieldsetLegend/index.js +9 -8
- package/es/FieldsetLegend/index.test.js +48 -139
- package/es/FileUpload/index.js +3 -3
- package/es/GovGRLogo/index.js +1 -1
- package/es/Header/index.js +1 -1
- package/es/Hidden/index.js +32 -0
- package/es/Hidden/index.test.js +43 -0
- package/es/Label/index.js +3 -5
- package/es/LabelTitle/__snapshots__/index.test.tsx.snap +133 -0
- package/es/LabelTitle/index.js +26 -0
- package/es/LabelTitle/index.test.js +85 -0
- package/es/Masthead/index.js +2 -7
- package/es/RadioConditional/__snapshots__/index.test.tsx.snap +39 -0
- package/es/RadioConditional/index.js +27 -0
- package/es/RadioConditional/index.test.js +17 -0
- package/es/RadioItem/__snapshots__/index.test.tsx.snap +20 -20
- package/es/RadioItem/index.js +6 -6
- package/es/index.js +4 -1
- package/esm/Button/index.js +4 -2
- package/esm/CallToAction/index.js +11 -4
- package/esm/Card/__snapshots__/index.test.tsx.snap +21 -5
- package/esm/Card/index.js +4 -3
- package/esm/Card/index.test.js +10 -2
- package/esm/CheckboxConditional/__snapshots__/index.test.tsx.snap +2 -11
- package/esm/CheckboxConditional/index.js +2 -6
- package/esm/CheckboxItem/__snapshots__/index.test.tsx.snap +14 -14
- package/esm/CheckboxItem/index.js +6 -6
- package/esm/Container/index.js +9 -5
- package/esm/DateInputItem/__snapshots__/index.test.tsx.snap +37 -13
- package/esm/DateInputItem/index.js +7 -4
- package/esm/DateInputItem/index.test.js +9 -0
- package/esm/Field/__snapshots__/index.test.tsx.snap +35 -0
- package/esm/{FormGroup → Field}/index.js +4 -4
- package/esm/Field/index.test.js +25 -0
- package/esm/FieldsetLegend/__snapshots__/index.test.tsx.snap +102 -876
- package/esm/FieldsetLegend/index.js +9 -8
- package/esm/FieldsetLegend/index.test.js +48 -139
- package/esm/FileUpload/index.js +3 -3
- package/esm/GovGRLogo/index.js +1 -1
- package/esm/Header/index.js +1 -1
- package/esm/Hidden/index.js +32 -0
- package/esm/Hidden/index.test.js +43 -0
- package/esm/Label/index.js +3 -5
- package/esm/LabelTitle/__snapshots__/index.test.tsx.snap +133 -0
- package/esm/LabelTitle/index.js +26 -0
- package/esm/LabelTitle/index.test.js +85 -0
- package/esm/Masthead/index.js +2 -7
- package/esm/RadioConditional/__snapshots__/index.test.tsx.snap +39 -0
- package/esm/RadioConditional/index.js +27 -0
- package/esm/RadioConditional/index.test.js +17 -0
- package/esm/RadioItem/__snapshots__/index.test.tsx.snap +20 -20
- package/esm/RadioItem/index.js +6 -6
- package/esm/index.js +5 -2
- package/index.d.ts +4 -1
- package/index.js +31 -7
- package/package.json +2 -2
- package/FormGroup/__snapshots__/index.test.tsx.snap +0 -35
- package/FormGroup/index.d.ts +0 -13
- package/FormGroup/index.test.js +0 -31
- package/es/FormGroup/__snapshots__/index.test.tsx.snap +0 -35
- package/es/FormGroup/index.test.js +0 -25
- package/esm/FormGroup/__snapshots__/index.test.tsx.snap +0 -35
- package/esm/FormGroup/index.test.js +0 -25
package/Button/index.d.ts
CHANGED
|
@@ -13,9 +13,13 @@ export interface ButtonProps extends ButtonElementAttributes {
|
|
|
13
13
|
* disabled is optional.
|
|
14
14
|
*/
|
|
15
15
|
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* variant is optional.
|
|
18
|
+
*/
|
|
19
|
+
variant?: 'link' | 'button';
|
|
16
20
|
}
|
|
17
21
|
/**
|
|
18
22
|
* Use the Button component to help users carry out an action.
|
|
19
23
|
*/
|
|
20
|
-
export declare const Button: React.ForwardRefExoticComponent<Pick<ButtonProps, "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" | "form" | "type" | "value" | "disabled" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name"> & React.RefAttributes<HTMLButtonElement>>;
|
|
24
|
+
export declare const Button: React.ForwardRefExoticComponent<Pick<ButtonProps, "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" | "form" | "type" | "value" | "variant" | "disabled" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name"> & React.RefAttributes<HTMLButtonElement>>;
|
|
21
25
|
export default Button;
|
package/Button/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
|
|
16
16
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
17
|
|
|
18
|
-
var _excluded = ["color", "disabled", "className", "children"];
|
|
18
|
+
var _excluded = ["color", "variant", "disabled", "className", "children"];
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Use the Button component to help users carry out an action.
|
|
@@ -23,6 +23,8 @@ var _excluded = ["color", "disabled", "className", "children"];
|
|
|
23
23
|
var Button = /*#__PURE__*/_react["default"].forwardRef(function Button(_ref, ref) {
|
|
24
24
|
var _ref$color = _ref.color,
|
|
25
25
|
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
26
|
+
_ref$variant = _ref.variant,
|
|
27
|
+
variant = _ref$variant === void 0 ? 'button' : _ref$variant,
|
|
26
28
|
disabled = _ref.disabled,
|
|
27
29
|
className = _ref.className,
|
|
28
30
|
children = _ref.children,
|
|
@@ -30,7 +32,7 @@ var Button = /*#__PURE__*/_react["default"].forwardRef(function Button(_ref, ref
|
|
|
30
32
|
return /*#__PURE__*/_react["default"].createElement("button", (0, _extends2["default"])({
|
|
31
33
|
disabled: disabled,
|
|
32
34
|
ref: ref,
|
|
33
|
-
className: (0, _clsx["default"])(className, color === 'secondary' && 'govgr-btn-secondary', color === 'primary' && 'govgr-btn-primary', color === 'warning' && 'govgr-btn-warning', disabled === true && 'govgr-btn-disabled',
|
|
35
|
+
className: (0, _clsx["default"])(className, variant === 'button' && [color === 'secondary' && 'govgr-btn-secondary', color === 'primary' && 'govgr-btn-primary', color === 'warning' && 'govgr-btn-warning', disabled === true && 'govgr-btn-disabled', 'govgr-btn'], variant === 'link' && 'govgr-link')
|
|
34
36
|
}, props), children);
|
|
35
37
|
});
|
|
36
38
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,41 @@
|
|
|
1
1
|
# Change Log - @digigov/react-core
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 02 Feb 2022 15:44:29 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.5.1
|
|
6
|
+
Wed, 02 Feb 2022 15:44:29 GMT
|
|
7
|
+
|
|
8
|
+
### Patches
|
|
9
|
+
|
|
10
|
+
- fix input tag, ref and props in react core components
|
|
11
|
+
- fix package.json inconsistencies by running cli-lab verify-and-update-local-package-versions
|
|
12
|
+
|
|
13
|
+
## 0.5.0
|
|
14
|
+
Tue, 01 Feb 2022 15:38:26 GMT
|
|
15
|
+
|
|
16
|
+
### Minor changes
|
|
17
|
+
|
|
18
|
+
- implement Hidden component
|
|
19
|
+
|
|
20
|
+
### Patches
|
|
21
|
+
|
|
22
|
+
- Add the missing `govgr-header-link` className in GovGRLogo
|
|
23
|
+
|
|
24
|
+
## 0.4.1
|
|
25
|
+
Thu, 20 Jan 2022 10:45:21 GMT
|
|
26
|
+
|
|
27
|
+
### Patches
|
|
28
|
+
|
|
29
|
+
- Add 'variant' prop to Button to enable activation of 'govgr-link' class on demand
|
|
30
|
+
- put input tag inside label tag in form react components
|
|
31
|
+
|
|
32
|
+
## 0.4.0
|
|
33
|
+
Mon, 17 Jan 2022 14:50:34 GMT
|
|
34
|
+
|
|
35
|
+
### Minor changes
|
|
36
|
+
|
|
37
|
+
- Add new feature in Card component and fix spacing
|
|
38
|
+
- Add `fullWidth` prop to Container and CallToAction now uses an SVG arrow icon
|
|
4
39
|
|
|
5
40
|
## 0.3.1
|
|
6
41
|
Thu, 30 Dec 2021 14:56:45 GMT
|
package/CallToAction/index.js
CHANGED
|
@@ -19,6 +19,15 @@ var _ButtonLink = _interopRequireDefault(require("@digigov/react-core/ButtonLink
|
|
|
19
19
|
|
|
20
20
|
var _excluded = ["className", "children"];
|
|
21
21
|
|
|
22
|
+
var _ref2 = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
23
|
+
className: "govgr-btn-cta__arrow",
|
|
24
|
+
focusable: "false",
|
|
25
|
+
viewBox: "0 0 24 24",
|
|
26
|
+
"aria-hidden": "true"
|
|
27
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
28
|
+
d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
|
|
29
|
+
}));
|
|
30
|
+
|
|
22
31
|
/**
|
|
23
32
|
* Use this button for the main call to action on your service’s start page.
|
|
24
33
|
*/
|
|
@@ -28,10 +37,8 @@ var CallToAction = /*#__PURE__*/_react["default"].forwardRef(function CallToActi
|
|
|
28
37
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
29
38
|
return /*#__PURE__*/_react["default"].createElement(_ButtonLink["default"], (0, _extends2["default"])({
|
|
30
39
|
ref: ref,
|
|
31
|
-
className: (0, _clsx["default"])(className, true &&
|
|
32
|
-
}, props), children,
|
|
33
|
-
className: (0, _clsx["default"])(className, true && 'right-arrow')
|
|
34
|
-
}));
|
|
40
|
+
className: (0, _clsx["default"])(className, true && 'govgr-btn-cta')
|
|
41
|
+
}, props), children, _ref2);
|
|
35
42
|
});
|
|
36
43
|
|
|
37
44
|
exports.CallToAction = CallToAction;
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`renders the Card with
|
|
3
|
+
exports[`renders the Card with no props 1`] = `
|
|
4
|
+
<ForwardRef(Card)>
|
|
5
|
+
<div
|
|
6
|
+
className="govgr-card"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
className="govgr-card__body"
|
|
10
|
+
>
|
|
11
|
+
hello
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</ForwardRef(Card)>
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
exports[`renders the Card with variant="border" props 1`] = `
|
|
4
18
|
<ForwardRef(Card)
|
|
5
|
-
border
|
|
19
|
+
variant="border"
|
|
6
20
|
>
|
|
7
21
|
<div
|
|
8
22
|
className="govgr-card--border govgr-card"
|
|
@@ -16,10 +30,12 @@ exports[`renders the Card with border props 1`] = `
|
|
|
16
30
|
</ForwardRef(Card)>
|
|
17
31
|
`;
|
|
18
32
|
|
|
19
|
-
exports[`renders the Card with
|
|
20
|
-
<ForwardRef(Card)
|
|
33
|
+
exports[`renders the Card with variant="divider" props 1`] = `
|
|
34
|
+
<ForwardRef(Card)
|
|
35
|
+
variant="divider"
|
|
36
|
+
>
|
|
21
37
|
<div
|
|
22
|
-
className="govgr-card"
|
|
38
|
+
className="govgr-card--divider govgr-card"
|
|
23
39
|
>
|
|
24
40
|
<div
|
|
25
41
|
className="govgr-card__body"
|
package/Card/index.d.ts
CHANGED
|
@@ -3,14 +3,15 @@ declare type DivElementAttributes = JSX.IntrinsicElements['div'];
|
|
|
3
3
|
export interface CardProps extends DivElementAttributes {
|
|
4
4
|
/**
|
|
5
5
|
* By default, we recommend using Cards without border style. Card border increases the contrast to its background.
|
|
6
|
-
*
|
|
6
|
+
* divider
|
|
7
|
+
* `variant` property is optional.
|
|
7
8
|
*/
|
|
8
|
-
|
|
9
|
+
variant?: "border" | "divider";
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
11
12
|
* Cards can be used to divide and organise interface content for better understandability and readability.
|
|
12
13
|
* Cards can help your users to scan through vast amounts of information quicker.
|
|
13
14
|
* Use Card as parent component to wrap CardHeading, CardText and CartAction components
|
|
14
15
|
*/
|
|
15
|
-
export declare const Card: React.ForwardRefExoticComponent<Pick<CardProps, "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" | "
|
|
16
|
+
export declare const Card: React.ForwardRefExoticComponent<Pick<CardProps, "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" | "variant"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
17
|
export default Card;
|
package/Card/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
|
|
16
16
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
17
|
|
|
18
|
-
var _excluded = ["
|
|
18
|
+
var _excluded = ["variant", "style", "className", "children"];
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Cards can be used to divide and organise interface content for better understandability and readability.
|
|
@@ -23,13 +23,14 @@ var _excluded = ["border", "className", "children"];
|
|
|
23
23
|
* Use Card as parent component to wrap CardHeading, CardText and CartAction components
|
|
24
24
|
*/
|
|
25
25
|
var Card = /*#__PURE__*/_react["default"].forwardRef(function Card(_ref, ref) {
|
|
26
|
-
var
|
|
26
|
+
var variant = _ref.variant,
|
|
27
|
+
style = _ref.style,
|
|
27
28
|
className = _ref.className,
|
|
28
29
|
children = _ref.children,
|
|
29
30
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
30
31
|
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
31
32
|
ref: ref,
|
|
32
|
-
className: (0, _clsx["default"])(className,
|
|
33
|
+
className: (0, _clsx["default"])(className, variant === "divider" && 'govgr-card--divider', variant === "border" && 'govgr-card--border', true && 'govgr-card')
|
|
33
34
|
}, props), /*#__PURE__*/_react["default"].createElement("div", {
|
|
34
35
|
className: (0, _clsx["default"])(true && 'govgr-card__body')
|
|
35
36
|
}, children));
|
package/Card/index.test.js
CHANGED
|
@@ -15,9 +15,17 @@ it('renders the Card with no props', function () {
|
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
var _ref2 = /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
18
|
-
|
|
18
|
+
variant: "border"
|
|
19
19
|
}, "hello");
|
|
20
20
|
|
|
21
|
-
it('renders the Card with border props', function () {
|
|
21
|
+
it('renders the Card with variant="border" props', function () {
|
|
22
22
|
expect((0, _enzyme.mount)(_ref2)).toMatchSnapshot();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
var _ref3 = /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
26
|
+
variant: "divider"
|
|
27
|
+
}, "hello");
|
|
28
|
+
|
|
29
|
+
it('renders the Card with variant="divider" props', function () {
|
|
30
|
+
expect((0, _enzyme.mount)(_ref3)).toMatchSnapshot();
|
|
23
31
|
});
|
|
@@ -8,18 +8,13 @@ exports[`renders the Blockquote with name prop 1`] = `
|
|
|
8
8
|
className="govgr-checkboxes__conditional"
|
|
9
9
|
>
|
|
10
10
|
<div
|
|
11
|
-
className="govgr-
|
|
11
|
+
className="govgr-field"
|
|
12
12
|
>
|
|
13
13
|
<label
|
|
14
14
|
className="govgr-label"
|
|
15
15
|
>
|
|
16
16
|
hello
|
|
17
17
|
</label>
|
|
18
|
-
<input
|
|
19
|
-
className="govgr-input govgr-!-width-one-third"
|
|
20
|
-
name="some-name"
|
|
21
|
-
type="text"
|
|
22
|
-
/>
|
|
23
18
|
</div>
|
|
24
19
|
</div>
|
|
25
20
|
</ForwardRef(CheckboxConditional)>
|
|
@@ -31,17 +26,13 @@ exports[`renders the Blockquote with no props 1`] = `
|
|
|
31
26
|
className="govgr-checkboxes__conditional"
|
|
32
27
|
>
|
|
33
28
|
<div
|
|
34
|
-
className="govgr-
|
|
29
|
+
className="govgr-field"
|
|
35
30
|
>
|
|
36
31
|
<label
|
|
37
32
|
className="govgr-label"
|
|
38
33
|
>
|
|
39
34
|
hello
|
|
40
35
|
</label>
|
|
41
|
-
<input
|
|
42
|
-
className="govgr-input govgr-!-width-one-third"
|
|
43
|
-
type="text"
|
|
44
|
-
/>
|
|
45
36
|
</div>
|
|
46
37
|
</div>
|
|
47
38
|
</ForwardRef(CheckboxConditional)>
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
declare type DivElementAttributes = JSX.IntrinsicElements['div'];
|
|
3
3
|
export interface CheckboxConditionalProps extends DivElementAttributes {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Name property is optional and it contains a single value which describes the name of the <input> element.
|
|
6
6
|
*/
|
|
7
7
|
name?: string;
|
|
8
8
|
}
|
|
@@ -31,14 +31,10 @@ var CheckboxConditional = /*#__PURE__*/_react["default"].forwardRef(function Che
|
|
|
31
31
|
ref: ref,
|
|
32
32
|
className: (0, _clsx["default"])(className, true && 'govgr-checkboxes__conditional')
|
|
33
33
|
}, props), /*#__PURE__*/_react["default"].createElement("div", {
|
|
34
|
-
className: (0, _clsx["default"])(true && 'govgr-
|
|
34
|
+
className: (0, _clsx["default"])(true && 'govgr-field')
|
|
35
35
|
}, /*#__PURE__*/_react["default"].createElement("label", {
|
|
36
36
|
className: (0, _clsx["default"])(true && 'govgr-label')
|
|
37
|
-
}, children)
|
|
38
|
-
type: "text",
|
|
39
|
-
name: name,
|
|
40
|
-
className: (0, _clsx["default"])(true && 'govgr-input govgr-!-width-one-third')
|
|
41
|
-
})));
|
|
37
|
+
}, children)));
|
|
42
38
|
});
|
|
43
39
|
|
|
44
40
|
exports.CheckboxConditional = CheckboxConditional;
|
|
@@ -7,15 +7,15 @@ exports[`renders the CheckboxItem with \`name\` prop 1`] = `
|
|
|
7
7
|
<div
|
|
8
8
|
className="govgr-checkboxes__item"
|
|
9
9
|
>
|
|
10
|
-
<input
|
|
11
|
-
className="govgr-checkboxes__input"
|
|
12
|
-
name="example"
|
|
13
|
-
type="checkbox"
|
|
14
|
-
/>
|
|
15
10
|
<label
|
|
16
11
|
className="govgr-label govgr-checkboxes__label"
|
|
17
12
|
>
|
|
18
13
|
hello
|
|
14
|
+
<input
|
|
15
|
+
className="govgr-checkboxes__input"
|
|
16
|
+
name="example"
|
|
17
|
+
type="checkbox"
|
|
18
|
+
/>
|
|
19
19
|
</label>
|
|
20
20
|
</div>
|
|
21
21
|
</ForwardRef(CheckboxItem)>
|
|
@@ -28,15 +28,15 @@ exports[`renders the CheckboxItem with \`value\` prop 1`] = `
|
|
|
28
28
|
<div
|
|
29
29
|
className="govgr-checkboxes__item"
|
|
30
30
|
>
|
|
31
|
-
<input
|
|
32
|
-
className="govgr-checkboxes__input"
|
|
33
|
-
type="checkbox"
|
|
34
|
-
value="example"
|
|
35
|
-
/>
|
|
36
31
|
<label
|
|
37
32
|
className="govgr-label govgr-checkboxes__label"
|
|
38
33
|
>
|
|
39
34
|
hello
|
|
35
|
+
<input
|
|
36
|
+
className="govgr-checkboxes__input"
|
|
37
|
+
type="checkbox"
|
|
38
|
+
value="example"
|
|
39
|
+
/>
|
|
40
40
|
</label>
|
|
41
41
|
</div>
|
|
42
42
|
</ForwardRef(CheckboxItem)>
|
|
@@ -47,14 +47,14 @@ exports[`renders the CheckboxItem with no props 1`] = `
|
|
|
47
47
|
<div
|
|
48
48
|
className="govgr-checkboxes__item"
|
|
49
49
|
>
|
|
50
|
-
<input
|
|
51
|
-
className="govgr-checkboxes__input"
|
|
52
|
-
type="checkbox"
|
|
53
|
-
/>
|
|
54
50
|
<label
|
|
55
51
|
className="govgr-label govgr-checkboxes__label"
|
|
56
52
|
>
|
|
57
53
|
hello
|
|
54
|
+
<input
|
|
55
|
+
className="govgr-checkboxes__input"
|
|
56
|
+
type="checkbox"
|
|
57
|
+
/>
|
|
58
58
|
</label>
|
|
59
59
|
</div>
|
|
60
60
|
</ForwardRef(CheckboxItem)>
|
package/CheckboxItem/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare type
|
|
3
|
-
export interface CheckboxItemProps extends
|
|
2
|
+
declare type InputElementAttributes = JSX.IntrinsicElements['input'];
|
|
3
|
+
export interface CheckboxItemProps extends InputElementAttributes {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Name property is optional and it contains a single value which describes the name of the <input> element.
|
|
6
6
|
*/
|
|
7
7
|
name?: string;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Value property is optional and it specifies the value of an <input> element.
|
|
10
10
|
*/
|
|
11
11
|
value?: string;
|
|
12
12
|
}
|
|
@@ -15,5 +15,5 @@ export interface CheckboxItemProps extends DivElementAttributes {
|
|
|
15
15
|
* CheckboxItem component allows the user to select one or more checkboxes
|
|
16
16
|
* CheckboxItem must be used inside Checkbox component
|
|
17
17
|
*/
|
|
18
|
-
export declare const CheckboxItem: React.ForwardRefExoticComponent<Pick<CheckboxItemProps, "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" | "value" | "name"> & React.RefAttributes<
|
|
18
|
+
export declare const CheckboxItem: React.ForwardRefExoticComponent<Pick<CheckboxItemProps, "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" | "form" | "pattern" | "list" | "step" | "type" | "value" | "disabled" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "readOnly" | "required" | "size" | "src" | "width"> & React.RefAttributes<HTMLInputElement>>;
|
|
19
19
|
export default CheckboxItem;
|
package/CheckboxItem/index.js
CHANGED
|
@@ -28,17 +28,17 @@ var CheckboxItem = /*#__PURE__*/_react["default"].forwardRef(function CheckboxIt
|
|
|
28
28
|
className = _ref.className,
|
|
29
29
|
children = _ref.children,
|
|
30
30
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
31
|
-
return /*#__PURE__*/_react["default"].createElement("div",
|
|
32
|
-
ref: ref,
|
|
31
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
33
32
|
className: (0, _clsx["default"])(className, true && 'govgr-checkboxes__item')
|
|
34
|
-
},
|
|
33
|
+
}, /*#__PURE__*/_react["default"].createElement("label", {
|
|
34
|
+
className: (0, _clsx["default"])(true && 'govgr-label govgr-checkboxes__label')
|
|
35
|
+
}, children, /*#__PURE__*/_react["default"].createElement("input", (0, _extends2["default"])({
|
|
36
|
+
ref: ref,
|
|
35
37
|
type: "checkbox",
|
|
36
38
|
name: name,
|
|
37
39
|
value: value,
|
|
38
40
|
className: (0, _clsx["default"])(true && 'govgr-checkboxes__input')
|
|
39
|
-
}
|
|
40
|
-
className: (0, _clsx["default"])(true && 'govgr-label govgr-checkboxes__label')
|
|
41
|
-
}, children));
|
|
41
|
+
}, props))));
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
exports.CheckboxItem = CheckboxItem;
|
package/Container/index.d.ts
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare type DivElementAttributes = JSX.IntrinsicElements['div'];
|
|
3
3
|
export interface ContainerProps extends DivElementAttributes {
|
|
4
|
+
/**
|
|
5
|
+
* cols is optional. Set to false if you don't need 3 columns layout.
|
|
6
|
+
*/
|
|
7
|
+
cols?: true | false;
|
|
8
|
+
/**
|
|
9
|
+
* fullWidth is optional. Set to true if you need a full width layout.
|
|
10
|
+
*/
|
|
11
|
+
fullWidth?: true | false;
|
|
4
12
|
}
|
|
5
13
|
/**
|
|
6
|
-
* Container
|
|
14
|
+
* Use Container as a wrapper.
|
|
7
15
|
*/
|
|
8
|
-
export declare const Container: React.ForwardRefExoticComponent<Pick<ContainerProps, "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<HTMLDivElement>>;
|
|
16
|
+
export declare const Container: React.ForwardRefExoticComponent<Pick<ContainerProps, "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" | "cols" | "fullWidth"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
17
|
export default Container;
|
package/Container/index.js
CHANGED
|
@@ -15,20 +15,24 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
|
|
16
16
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
17
|
|
|
18
|
-
var _excluded = ["className", "children"];
|
|
18
|
+
var _excluded = ["cols", "fullWidth", "className", "children"];
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
* Container
|
|
21
|
+
* Use Container as a wrapper.
|
|
22
22
|
*/
|
|
23
23
|
var Container = /*#__PURE__*/_react["default"].forwardRef(function Container(_ref, ref) {
|
|
24
|
-
var
|
|
24
|
+
var _ref$cols = _ref.cols,
|
|
25
|
+
cols = _ref$cols === void 0 ? true : _ref$cols,
|
|
26
|
+
_ref$fullWidth = _ref.fullWidth,
|
|
27
|
+
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
|
28
|
+
className = _ref.className,
|
|
25
29
|
children = _ref.children,
|
|
26
30
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
27
31
|
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
28
32
|
ref: ref,
|
|
29
|
-
className: (0, _clsx["default"])(className,
|
|
33
|
+
className: (0, _clsx["default"])(className, !fullWidth && 'govgr-width-container', fullWidth && 'govgr-full-width-container')
|
|
30
34
|
}, props), /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
31
|
-
className: (0, _clsx["default"])(
|
|
35
|
+
className: (0, _clsx["default"])(cols && 'govgr-main-wrapper')
|
|
32
36
|
}, props), children));
|
|
33
37
|
});
|
|
34
38
|
|