@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.
- package/Blockquote/__snapshots__/index.test.tsx.snap +17 -0
- package/Blockquote/index.d.ts +8 -1
- package/Blockquote/index.js +3 -2
- package/Blockquote/index.test.js +8 -0
- package/Card/__snapshots__/index.test.tsx.snap +21 -0
- package/Card/index.d.ts +8 -1
- package/Card/index.js +3 -2
- package/Card/index.test.js +23 -15
- package/KitchenSinkCard/index.d.ts +1 -1
- package/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
- package/RadioItem/index.d.ts +4 -4
- package/RadioItem/index.js +3 -3
- package/RadioItem/index.test.js +4 -4
- package/StepNav/__snapshots__/index.test.tsx.snap +17 -0
- package/StepNav/index.d.ts +8 -1
- package/StepNav/index.js +3 -2
- package/StepNav/index.test.js +8 -0
- package/TaskList/__snapshots__/index.test.tsx.snap +17 -0
- package/TaskList/index.d.ts +8 -1
- package/TaskList/index.js +3 -2
- package/TaskList/index.test.js +8 -0
- package/Timeline/__snapshots__/index.test.tsx.snap +17 -0
- package/Timeline/index.d.ts +2 -2
- package/Timeline/index.js +2 -3
- package/Timeline/index.test.js +8 -0
- package/es/Blockquote/__snapshots__/index.test.tsx.snap +17 -0
- package/es/Blockquote/index.js +3 -2
- package/es/Blockquote/index.test.js +8 -0
- package/es/Card/__snapshots__/index.test.tsx.snap +21 -0
- package/es/Card/index.js +3 -2
- package/es/Card/index.test.js +23 -15
- package/es/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
- package/es/RadioItem/index.js +3 -3
- package/es/RadioItem/index.test.js +4 -4
- package/es/StepNav/__snapshots__/index.test.tsx.snap +17 -0
- package/es/StepNav/index.js +3 -2
- package/es/StepNav/index.test.js +8 -0
- package/es/TaskList/__snapshots__/index.test.tsx.snap +17 -0
- package/es/TaskList/index.js +3 -2
- package/es/TaskList/index.test.js +8 -0
- package/es/Timeline/__snapshots__/index.test.tsx.snap +17 -0
- package/es/Timeline/index.js +2 -3
- package/es/Timeline/index.test.js +8 -0
- package/esm/Blockquote/__snapshots__/index.test.tsx.snap +17 -0
- package/esm/Blockquote/index.js +3 -2
- package/esm/Blockquote/index.test.js +8 -0
- package/esm/Card/__snapshots__/index.test.tsx.snap +21 -0
- package/esm/Card/index.js +3 -2
- package/esm/Card/index.test.js +23 -15
- package/esm/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
- package/esm/RadioItem/index.js +3 -3
- package/esm/RadioItem/index.test.js +4 -4
- package/esm/StepNav/__snapshots__/index.test.tsx.snap +17 -0
- package/esm/StepNav/index.js +3 -2
- package/esm/StepNav/index.test.js +8 -0
- package/esm/TaskList/__snapshots__/index.test.tsx.snap +17 -0
- package/esm/TaskList/index.js +3 -2
- package/esm/TaskList/index.test.js +8 -0
- package/esm/Timeline/__snapshots__/index.test.tsx.snap +17 -0
- package/esm/Timeline/index.js +2 -3
- package/esm/Timeline/index.test.js +8 -0
- package/esm/index.js +1 -1
- package/package.json +3 -3
- package/src/Blockquote/__snapshots__/index.test.tsx.snap +17 -0
- package/src/Blockquote/index.test.tsx +4 -0
- package/src/Blockquote/index.tsx +11 -2
- package/src/Card/__snapshots__/index.test.tsx.snap +21 -0
- package/src/Card/index.test.tsx +3 -0
- package/src/Card/index.tsx +9 -1
- package/src/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
- package/src/RadioItem/index.test.tsx +4 -4
- package/src/RadioItem/index.tsx +5 -5
- package/src/StepNav/__snapshots__/index.test.tsx.snap +17 -0
- package/src/StepNav/index.test.tsx +4 -0
- package/src/StepNav/index.tsx +11 -2
- package/src/TaskList/__snapshots__/index.test.tsx.snap +17 -0
- package/src/TaskList/index.test.tsx +4 -0
- package/src/TaskList/index.tsx +11 -2
- package/src/Timeline/__snapshots__/index.test.tsx.snap +17 -0
- package/src/Timeline/index.test.tsx +4 -0
- package/src/Timeline/index.tsx +4 -4
- 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 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)
|
package/Blockquote/index.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
export interface BlockquoteProps extends BaseProps<'blockquote'> {
|
|
4
|
+
/**
|
|
5
|
+
* dense is optional.
|
|
6
|
+
* @value true Blockquote will be dense.
|
|
7
|
+
* @value false
|
|
8
|
+
* @default false
|
|
9
|
+
* */
|
|
10
|
+
dense?: boolean;
|
|
4
11
|
}
|
|
5
12
|
/**
|
|
6
13
|
* Use Blockquote to differentiate a block of text from the content that surrounds it.
|
|
7
14
|
*/
|
|
8
|
-
export declare const Blockquote: React.ForwardRefExoticComponent<Pick<BlockquoteProps, "cite" | "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLElement>>;
|
|
15
|
+
export declare const Blockquote: React.ForwardRefExoticComponent<Pick<BlockquoteProps, "cite" | "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "dense"> & React.RefAttributes<HTMLElement>>;
|
|
9
16
|
export default Blockquote;
|
package/Blockquote/index.js
CHANGED
|
@@ -17,19 +17,20 @@ 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
|
* Use Blockquote to differentiate a block of text from the content that surrounds it.
|
|
24
24
|
*/
|
|
25
25
|
var Blockquote = /*#__PURE__*/_react["default"].forwardRef(function Blockquote(_ref, ref) {
|
|
26
26
|
var className = _ref.className,
|
|
27
|
+
dense = _ref.dense,
|
|
27
28
|
children = _ref.children,
|
|
28
29
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
29
30
|
return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
|
|
30
31
|
as: "blockquote",
|
|
31
32
|
ref: ref,
|
|
32
|
-
className: (0, _clsx["default"])(className, true && 'govgr-blockquote')
|
|
33
|
+
className: (0, _clsx["default"])(className, dense && 'govgr-blockquote--dense', true && 'govgr-blockquote')
|
|
33
34
|
}, props), children);
|
|
34
35
|
});
|
|
35
36
|
|
package/Blockquote/index.test.js
CHANGED
|
@@ -12,4 +12,12 @@ var _ref = /*#__PURE__*/_react["default"].createElement(_Blockquote["default"],
|
|
|
12
12
|
|
|
13
13
|
it('renders the Blockquote with no props', function () {
|
|
14
14
|
expect((0, _enzyme.mount)(_ref)).toMatchSnapshot();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
var _ref2 = /*#__PURE__*/_react["default"].createElement(_Blockquote["default"], {
|
|
18
|
+
dense: true
|
|
19
|
+
}, "hello");
|
|
20
|
+
|
|
21
|
+
it('renders the Blockquote with dense props', function () {
|
|
22
|
+
expect((0, _enzyme.mount)(_ref2)).toMatchSnapshot();
|
|
15
23
|
});
|
|
@@ -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/Card/index.d.ts
CHANGED
|
@@ -26,11 +26,18 @@ export interface CardProps extends BaseProps<'div'> {
|
|
|
26
26
|
* @value false
|
|
27
27
|
*/
|
|
28
28
|
callToAction?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* dense is optional.
|
|
31
|
+
* @value true Card will be dense.
|
|
32
|
+
* @value false
|
|
33
|
+
* @default false
|
|
34
|
+
* */
|
|
35
|
+
dense?: boolean;
|
|
29
36
|
}
|
|
30
37
|
/**
|
|
31
38
|
* Cards can be used to divide and organise interface content for better understandability and readability.
|
|
32
39
|
* Cards can help your users to scan through vast amounts of information quicker.
|
|
33
40
|
* Use Card as parent component to wrap CardHeading, CardContent and CartAction components
|
|
34
41
|
*/
|
|
35
|
-
export declare const Card: React.ForwardRefExoticComponent<Pick<CardProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "variant" | "borderColor" | "callToAction"> & React.RefAttributes<HTMLDivElement>>;
|
|
42
|
+
export declare const Card: React.ForwardRefExoticComponent<Pick<CardProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "dense" | "variant" | "borderColor" | "callToAction"> & React.RefAttributes<HTMLDivElement>>;
|
|
36
43
|
export default Card;
|
package/Card/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 = ["variant", "borderColor", "callToAction", "className", "children"];
|
|
20
|
+
var _excluded = ["variant", "borderColor", "callToAction", "dense", "className", "children"];
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Cards can be used to divide and organise interface content for better understandability and readability.
|
|
@@ -28,13 +28,14 @@ var Card = /*#__PURE__*/_react["default"].forwardRef(function Card(_ref, ref) {
|
|
|
28
28
|
var variant = _ref.variant,
|
|
29
29
|
borderColor = _ref.borderColor,
|
|
30
30
|
callToAction = _ref.callToAction,
|
|
31
|
+
dense = _ref.dense,
|
|
31
32
|
className = _ref.className,
|
|
32
33
|
children = _ref.children,
|
|
33
34
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
34
35
|
return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
|
|
35
36
|
as: "div",
|
|
36
37
|
ref: ref,
|
|
37
|
-
className: (0, _clsx["default"])(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')
|
|
38
|
+
className: (0, _clsx["default"])(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')
|
|
38
39
|
}, props), /*#__PURE__*/_react["default"].createElement("div", {
|
|
39
40
|
className: (0, _clsx["default"])(true && 'govgr-card__body')
|
|
40
41
|
}, children));
|
package/Card/index.test.js
CHANGED
|
@@ -23,71 +23,79 @@ it('renders the Card with callToActon props', function () {
|
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
var _ref3 = /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
26
|
-
|
|
26
|
+
dense: true
|
|
27
27
|
}, "hello");
|
|
28
28
|
|
|
29
|
-
it('renders the Card with
|
|
29
|
+
it('renders the Card with dense props', function () {
|
|
30
30
|
expect((0, _enzyme.mount)(_ref3)).toMatchSnapshot();
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
var _ref4 = /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
34
|
-
variant: "
|
|
34
|
+
variant: "border"
|
|
35
35
|
}, "hello");
|
|
36
36
|
|
|
37
|
-
it('renders the Card with variant="
|
|
37
|
+
it('renders the Card with variant="border" props', function () {
|
|
38
38
|
expect((0, _enzyme.mount)(_ref4)).toMatchSnapshot();
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
var _ref5 = /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
42
|
-
variant: "
|
|
42
|
+
variant: "divider"
|
|
43
43
|
}, "hello");
|
|
44
44
|
|
|
45
|
-
it('renders the Card with variant="
|
|
45
|
+
it('renders the Card with variant="divider" props', function () {
|
|
46
46
|
expect((0, _enzyme.mount)(_ref5)).toMatchSnapshot();
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
var _ref6 = /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
50
|
+
variant: "border-top"
|
|
51
|
+
}, "hello");
|
|
52
|
+
|
|
53
|
+
it('renders the Card with variant="border-top" props', function () {
|
|
54
|
+
expect((0, _enzyme.mount)(_ref6)).toMatchSnapshot();
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
var _ref7 = /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
50
58
|
variant: "border",
|
|
51
59
|
borderColor: "dark"
|
|
52
60
|
}, "hello");
|
|
53
61
|
|
|
54
62
|
it('renders the Card with variant="border" and borderColor="dark" props', function () {
|
|
55
|
-
expect((0, _enzyme.mount)(
|
|
63
|
+
expect((0, _enzyme.mount)(_ref7)).toMatchSnapshot();
|
|
56
64
|
});
|
|
57
65
|
|
|
58
|
-
var
|
|
66
|
+
var _ref8 = /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
59
67
|
variant: "border",
|
|
60
68
|
borderColor: "light"
|
|
61
69
|
}, "hello");
|
|
62
70
|
|
|
63
71
|
it('renders the Card with variant="border" and borderColor="light" props', function () {
|
|
64
|
-
expect((0, _enzyme.mount)(
|
|
72
|
+
expect((0, _enzyme.mount)(_ref8)).toMatchSnapshot();
|
|
65
73
|
});
|
|
66
74
|
|
|
67
|
-
var
|
|
75
|
+
var _ref9 = /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
68
76
|
variant: "border-top",
|
|
69
77
|
borderColor: "dark"
|
|
70
78
|
}, "hello");
|
|
71
79
|
|
|
72
80
|
it('renders the Card with variant="border-top" and borderColor="dark" props', function () {
|
|
73
|
-
expect((0, _enzyme.mount)(
|
|
81
|
+
expect((0, _enzyme.mount)(_ref9)).toMatchSnapshot();
|
|
74
82
|
});
|
|
75
83
|
|
|
76
|
-
var
|
|
84
|
+
var _ref10 = /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
77
85
|
variant: "border-top",
|
|
78
86
|
borderColor: "light"
|
|
79
87
|
}, "hello");
|
|
80
88
|
|
|
81
89
|
it('renders the Card with variant="border-top" and borderColor="light" props', function () {
|
|
82
|
-
expect((0, _enzyme.mount)(
|
|
90
|
+
expect((0, _enzyme.mount)(_ref10)).toMatchSnapshot();
|
|
83
91
|
});
|
|
84
92
|
|
|
85
|
-
var
|
|
93
|
+
var _ref11 = /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
86
94
|
variant: "border-top",
|
|
87
95
|
borderColor: "dark",
|
|
88
96
|
callToAction: true
|
|
89
97
|
}, "hello");
|
|
90
98
|
|
|
91
99
|
it('renders the Card with variant="border-top" and borderColor="dark" callToAction props', function () {
|
|
92
|
-
expect((0, _enzyme.mount)(
|
|
100
|
+
expect((0, _enzyme.mount)(_ref11)).toMatchSnapshot();
|
|
93
101
|
});
|
|
@@ -2,4 +2,4 @@ import React from 'react';
|
|
|
2
2
|
import { CardProps } from '@digigov/react-core/Card';
|
|
3
3
|
export interface KitchenSinkCardProps extends CardProps {
|
|
4
4
|
}
|
|
5
|
-
export declare const KitchenSinkCard: React.ForwardRefExoticComponent<Pick<KitchenSinkCardProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "variant" | "borderColor" | "callToAction"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export declare const KitchenSinkCard: React.ForwardRefExoticComponent<Pick<KitchenSinkCardProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "dense" | "variant" | "borderColor" | "callToAction"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`renders the RadioItem \`divider\` props 1`] = `
|
|
4
4
|
<ForwardRef(RadioItem)
|
|
5
|
-
|
|
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
|
-
|
|
94
|
+
dividerText="ή"
|
|
95
95
|
name="name"
|
|
96
96
|
value="someValue"
|
|
97
97
|
>
|
package/RadioItem/index.d.ts
CHANGED
|
@@ -2,15 +2,15 @@ import React from 'react';
|
|
|
2
2
|
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
export interface RadioItemProps extends BaseProps<'input'> {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* Add this prop to add a choice
|
|
5
|
+
* dividerText is optional.
|
|
6
|
+
* Add this prop to add a choice dividerText on top of a radio item.
|
|
7
7
|
* The string is the text that it will appear above this radio item.
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
dividerText?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* RadioItem component is used for display radio buttons.
|
|
13
13
|
* RadioItem component must be included inside Radio component, as a children component.
|
|
14
14
|
*/
|
|
15
|
-
export declare const RadioItem: React.ForwardRefExoticComponent<Pick<RadioItemProps, "form" | "slot" | "style" | "title" | "pattern" | "as" | "className" | "color" | "height" | "id" | "lang" | "max" | "min" | "name" | "type" | "width" | "role" | "tabIndex" | "crossOrigin" | "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" | "alt" | "src" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "autoComplete" | "accept" | "capture" | "checked" | "list" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required" | "size" | "step" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "
|
|
15
|
+
export declare const RadioItem: React.ForwardRefExoticComponent<Pick<RadioItemProps, "form" | "slot" | "style" | "title" | "pattern" | "as" | "className" | "color" | "height" | "id" | "lang" | "max" | "min" | "name" | "type" | "width" | "role" | "tabIndex" | "crossOrigin" | "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" | "alt" | "src" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "autoComplete" | "accept" | "capture" | "checked" | "list" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required" | "size" | "step" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "dividerText"> & React.RefAttributes<HTMLInputElement>>;
|
|
16
16
|
export default RadioItem;
|
package/RadioItem/index.js
CHANGED
|
@@ -21,14 +21,14 @@ var _ChoiceDividerText = _interopRequireDefault(require("@digigov/react-core/Cho
|
|
|
21
21
|
|
|
22
22
|
var _LabelContainer = _interopRequireDefault(require("@digigov/react-core/LabelContainer"));
|
|
23
23
|
|
|
24
|
-
var _excluded = ["
|
|
24
|
+
var _excluded = ["dividerText", "name", "value", "className", "disabled", "children"];
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* RadioItem component is used for display radio buttons.
|
|
28
28
|
* RadioItem component must be included inside Radio component, as a children component.
|
|
29
29
|
*/
|
|
30
30
|
var RadioItem = /*#__PURE__*/_react["default"].forwardRef(function RadioItem(_ref, ref) {
|
|
31
|
-
var
|
|
31
|
+
var dividerText = _ref.dividerText,
|
|
32
32
|
name = _ref.name,
|
|
33
33
|
value = _ref.value,
|
|
34
34
|
className = _ref.className,
|
|
@@ -36,7 +36,7 @@ var RadioItem = /*#__PURE__*/_react["default"].forwardRef(function RadioItem(_re
|
|
|
36
36
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
37
37
|
children = _ref.children,
|
|
38
38
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
39
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null,
|
|
39
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, dividerText && /*#__PURE__*/_react["default"].createElement(_ChoiceDividerText["default"], null, dividerText), /*#__PURE__*/_react["default"].createElement("div", {
|
|
40
40
|
className: (0, _clsx["default"])(className, true && 'govgr-radios__item')
|
|
41
41
|
}, /*#__PURE__*/_react["default"].createElement(_LabelContainer["default"], {
|
|
42
42
|
className: (0, _clsx["default"])(disabled && 'govgr-radios__label--disabled', true && 'govgr-radios__label')
|
package/RadioItem/index.test.js
CHANGED
|
@@ -31,10 +31,10 @@ it('renders the RadioItem value props', function () {
|
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
var _ref4 = /*#__PURE__*/_react["default"].createElement(_RadioItem["default"], {
|
|
34
|
-
|
|
34
|
+
dividerText: 'ή'
|
|
35
35
|
}, "hello");
|
|
36
36
|
|
|
37
|
-
it('renders the RadioItem `
|
|
37
|
+
it('renders the RadioItem `dividerText` props', function () {
|
|
38
38
|
expect((0, _enzyme.mount)(_ref4)).toMatchSnapshot();
|
|
39
39
|
});
|
|
40
40
|
|
|
@@ -68,10 +68,10 @@ it('renders the RadioItem with name disabled and value props', function () {
|
|
|
68
68
|
var _ref8 = /*#__PURE__*/_react["default"].createElement(_RadioItem["default"], {
|
|
69
69
|
name: 'name',
|
|
70
70
|
value: 'someValue',
|
|
71
|
-
|
|
71
|
+
dividerText: 'ή',
|
|
72
72
|
disabled: true
|
|
73
73
|
}, "hello");
|
|
74
74
|
|
|
75
|
-
it('renders the RadioItem with `name`, `disabled`, `
|
|
75
|
+
it('renders the RadioItem with `name`, `disabled`, `dividerText` and `value` props', function () {
|
|
76
76
|
expect((0, _enzyme.mount)(_ref8)).toMatchSnapshot();
|
|
77
77
|
});
|
|
@@ -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)
|
package/StepNav/index.d.ts
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
export interface StepNavProps extends BaseProps<'div'> {
|
|
4
|
+
/**
|
|
5
|
+
* dense is optional.
|
|
6
|
+
* @value true StepNav will be dense.
|
|
7
|
+
* @value false
|
|
8
|
+
* @default false
|
|
9
|
+
* */
|
|
10
|
+
dense?: boolean;
|
|
4
11
|
}
|
|
5
12
|
/**
|
|
6
13
|
* StepNav contains the content or any other element for step-by-step implementation.
|
|
7
14
|
* Use StepNav as wrapper component.
|
|
8
15
|
*/
|
|
9
|
-
export declare const StepNav: React.ForwardRefExoticComponent<Pick<StepNavProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export declare const StepNav: React.ForwardRefExoticComponent<Pick<StepNavProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "dense"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
17
|
export default StepNav;
|
package/StepNav/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
|
* StepNav contains the content or any other element for step-by-step implementation.
|
|
@@ -25,12 +25,13 @@ var _excluded = ["className", "children"];
|
|
|
25
25
|
*/
|
|
26
26
|
var StepNav = /*#__PURE__*/_react["default"].forwardRef(function StepNav(_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: "div",
|
|
32
33
|
ref: ref,
|
|
33
|
-
className: (0, _clsx["default"])(className, true && 'govgr-step-nav')
|
|
34
|
+
className: (0, _clsx["default"])(className, dense && 'govgr-step-nav--dense', true && 'govgr-step-nav')
|
|
34
35
|
}, props), children);
|
|
35
36
|
});
|
|
36
37
|
|
package/StepNav/index.test.js
CHANGED
|
@@ -12,4 +12,12 @@ var _ref = /*#__PURE__*/_react["default"].createElement(_StepNav["default"], nul
|
|
|
12
12
|
|
|
13
13
|
it('renders the StepNav with no props', function () {
|
|
14
14
|
expect((0, _enzyme.mount)(_ref)).toMatchSnapshot();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
var _ref2 = /*#__PURE__*/_react["default"].createElement(_StepNav["default"], {
|
|
18
|
+
dense: true
|
|
19
|
+
}, "hello");
|
|
20
|
+
|
|
21
|
+
it('renders the StepNav with dense props', function () {
|
|
22
|
+
expect((0, _enzyme.mount)(_ref2)).toMatchSnapshot();
|
|
15
23
|
});
|