@digigov/react-core 0.5.5 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ArrowIcon/__snapshots__/index.test.tsx.snap +83 -0
- package/ArrowIcon/index.d.ts +16 -0
- package/ArrowIcon/index.js +59 -0
- package/ArrowIcon/index.test.d.ts +1 -0
- package/ArrowIcon/index.test.js +39 -0
- package/BackLink/index.d.ts +1 -1
- package/BackLink/index.js +5 -3
- package/BurgerIcon/__snapshots__/index.test.tsx.snap +353 -40
- package/BurgerIcon/index.d.ts +15 -3
- package/BurgerIcon/index.js +31 -12
- package/BurgerIcon/index.test.js +74 -6
- package/Button/index.d.ts +1 -1
- package/ButtonLink/index.d.ts +1 -1
- package/CHANGELOG.md +27 -1
- package/CallToAction/index.d.ts +1 -1
- package/CallToAction/index.js +3 -8
- package/CaretIcon/__snapshots__/index.test.tsx.snap +83 -0
- package/CaretIcon/index.d.ts +16 -0
- package/CaretIcon/index.js +59 -0
- package/CaretIcon/index.test.d.ts +1 -0
- package/CaretIcon/index.test.js +39 -0
- package/CheckIcon/__snapshots__/index.test.tsx.snap +316 -0
- package/CheckIcon/index.d.ts +15 -0
- package/CheckIcon/index.js +44 -0
- package/CheckIcon/index.test.d.ts +1 -0
- package/CheckIcon/index.test.js +129 -0
- package/CheckboxItem/index.d.ts +1 -1
- package/CloseIcon/__snapshots__/index.test.tsx.snap +20 -0
- package/CloseIcon/index.d.ts +16 -0
- package/CloseIcon/index.js +45 -0
- package/CloseIcon/index.test.d.ts +1 -0
- package/CloseIcon/index.test.js +15 -0
- package/DateInputItem/index.d.ts +2 -2
- package/DateInputItem/index.js +5 -5
- package/Fieldset/index.d.ts +1 -1
- package/FieldsetLegend/index.d.ts +1 -1
- package/FileUpload/index.d.ts +1 -1
- package/FooterContainer/index.d.ts +8 -1
- package/FooterContainer/index.js +4 -2
- package/FooterImage/index.d.ts +1 -1
- package/FooterLink/index.d.ts +1 -1
- package/GovGRLogo/index.d.ts +1 -1
- package/Grid/index.d.ts +1 -1
- package/HeaderLogo/index.d.ts +1 -1
- package/HeaderSecondaryLogo/index.d.ts +1 -1
- package/HeaderTitle/index.d.ts +1 -1
- package/HellenicRepublicLogo/index.d.ts +1 -1
- package/LabelTitle/index.d.ts +1 -1
- package/Link/index.d.ts +1 -1
- package/MoreVertIcon/__snapshots__/index.test.tsx.snap +512 -0
- package/MoreVertIcon/index.d.ts +15 -0
- package/MoreVertIcon/index.js +58 -0
- package/MoreVertIcon/index.test.d.ts +1 -0
- package/MoreVertIcon/index.test.js +129 -0
- package/NavHorizontalListItem/index.d.ts +1 -1
- package/NavVerticalItem/index.d.ts +1 -1
- package/NotificationBannerLink/index.d.ts +1 -1
- package/RadioItem/index.d.ts +1 -1
- package/Select/index.d.ts +1 -1
- package/SvgIcon/__snapshots__/index.test.tsx.snap +224 -0
- package/SvgIcon/index.d.ts +20 -0
- package/SvgIcon/index.js +41 -0
- package/SvgIcon/index.test.d.ts +1 -0
- package/SvgIcon/index.test.js +129 -0
- package/TabsListItem/index.d.ts +1 -1
- package/TextArea/index.d.ts +1 -1
- package/TextInput/index.d.ts +1 -1
- package/UncheckIcon/__snapshots__/index.test.tsx.snap +332 -0
- package/UncheckIcon/index.d.ts +15 -0
- package/UncheckIcon/index.js +44 -0
- package/UncheckIcon/index.test.d.ts +1 -0
- package/UncheckIcon/index.test.js +129 -0
- package/es/ArrowIcon/__snapshots__/index.test.tsx.snap +83 -0
- package/es/ArrowIcon/index.js +43 -0
- package/es/ArrowIcon/index.test.js +33 -0
- package/es/BackLink/index.js +4 -3
- package/es/BurgerIcon/__snapshots__/index.test.tsx.snap +353 -40
- package/es/BurgerIcon/index.js +30 -12
- package/es/BurgerIcon/index.test.js +74 -6
- package/es/CallToAction/index.js +2 -8
- package/es/CaretIcon/__snapshots__/index.test.tsx.snap +83 -0
- package/es/CaretIcon/index.js +43 -0
- package/es/CaretIcon/index.test.js +33 -0
- package/es/CheckIcon/__snapshots__/index.test.tsx.snap +316 -0
- package/es/CheckIcon/index.js +28 -0
- package/es/CheckIcon/index.test.js +123 -0
- package/es/CloseIcon/__snapshots__/index.test.tsx.snap +20 -0
- package/es/CloseIcon/index.js +29 -0
- package/es/CloseIcon/index.test.js +9 -0
- package/es/DateInputItem/index.js +5 -5
- package/es/FooterContainer/index.js +4 -2
- package/es/MoreVertIcon/__snapshots__/index.test.tsx.snap +512 -0
- package/es/MoreVertIcon/index.js +42 -0
- package/es/MoreVertIcon/index.test.js +123 -0
- package/es/SvgIcon/__snapshots__/index.test.tsx.snap +224 -0
- package/es/SvgIcon/index.js +26 -0
- package/es/SvgIcon/index.test.js +123 -0
- package/es/UncheckIcon/__snapshots__/index.test.tsx.snap +332 -0
- package/es/UncheckIcon/index.js +28 -0
- package/es/UncheckIcon/index.test.js +123 -0
- package/es/index.js +7 -0
- package/esm/ArrowIcon/__snapshots__/index.test.tsx.snap +83 -0
- package/esm/ArrowIcon/index.js +43 -0
- package/esm/ArrowIcon/index.test.js +33 -0
- package/esm/BackLink/index.js +4 -3
- package/esm/BurgerIcon/__snapshots__/index.test.tsx.snap +353 -40
- package/esm/BurgerIcon/index.js +30 -12
- package/esm/BurgerIcon/index.test.js +74 -6
- package/esm/CallToAction/index.js +2 -8
- package/esm/CaretIcon/__snapshots__/index.test.tsx.snap +83 -0
- package/esm/CaretIcon/index.js +43 -0
- package/esm/CaretIcon/index.test.js +33 -0
- package/esm/CheckIcon/__snapshots__/index.test.tsx.snap +316 -0
- package/esm/CheckIcon/index.js +28 -0
- package/esm/CheckIcon/index.test.js +123 -0
- package/esm/CloseIcon/__snapshots__/index.test.tsx.snap +20 -0
- package/esm/CloseIcon/index.js +29 -0
- package/esm/CloseIcon/index.test.js +9 -0
- package/esm/DateInputItem/index.js +5 -5
- package/esm/FooterContainer/index.js +4 -2
- package/esm/MoreVertIcon/__snapshots__/index.test.tsx.snap +512 -0
- package/esm/MoreVertIcon/index.js +42 -0
- package/esm/MoreVertIcon/index.test.js +123 -0
- package/esm/SvgIcon/__snapshots__/index.test.tsx.snap +224 -0
- package/esm/SvgIcon/index.js +26 -0
- package/esm/SvgIcon/index.test.js +123 -0
- package/esm/UncheckIcon/__snapshots__/index.test.tsx.snap +332 -0
- package/esm/UncheckIcon/index.js +28 -0
- package/esm/UncheckIcon/index.test.js +123 -0
- package/esm/index.js +8 -1
- package/index.d.ts +7 -0
- package/index.js +56 -0
- package/package.json +2 -2
package/BurgerIcon/index.d.ts
CHANGED
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export interface BurgerIconProps extends
|
|
2
|
+
import { SvgIconProps } from '@digigov/react-core/SvgIcon';
|
|
3
|
+
export interface BurgerIconProps extends SvgIconProps {
|
|
4
|
+
/**
|
|
5
|
+
* ref is optional.
|
|
6
|
+
* ref prop declares the reference of the svg icon component.
|
|
7
|
+
* It can be used to to access the DOM element and the React element.
|
|
8
|
+
*/
|
|
9
|
+
ref?: React.Ref<SVGSVGElement>;
|
|
4
10
|
/**
|
|
5
11
|
* active is optional.
|
|
6
12
|
* The default is 'false'.
|
|
7
13
|
* This prop should be 'true' whenever the NavHorizontal is 'active', so whenever the user clicks at the burger menu.
|
|
8
14
|
*/
|
|
9
15
|
active?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* hidden is optional.
|
|
18
|
+
* The default is 's'.
|
|
19
|
+
* It can be used to control the visibility of the icon across screens.
|
|
20
|
+
*/
|
|
21
|
+
hidden?: 's' | 'm' | 'l';
|
|
10
22
|
}
|
|
11
23
|
/**
|
|
12
24
|
* BurgerIcon is used inside the Header component.
|
|
13
25
|
* It should be linked with the NavHorizontal component. It is hidden when the NavHorizontal is visible and vice versa.
|
|
14
26
|
*/
|
|
15
|
-
export declare const BurgerIcon: React.
|
|
27
|
+
export declare const BurgerIcon: React.FC<BurgerIconProps>;
|
|
16
28
|
export default BurgerIcon;
|
package/BurgerIcon/index.js
CHANGED
|
@@ -13,28 +13,47 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
13
13
|
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
15
|
|
|
16
|
+
var _SvgIcon = _interopRequireDefault(require("@digigov/react-core/SvgIcon"));
|
|
17
|
+
|
|
16
18
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
19
|
|
|
18
|
-
var _excluded = ["active", "className"];
|
|
20
|
+
var _excluded = ["variant", "size", "active", "hidden", "className"];
|
|
21
|
+
|
|
22
|
+
var _ref2 = /*#__PURE__*/_react["default"].createElement("rect", {
|
|
23
|
+
id: "govgr-burger-icon__line-1",
|
|
24
|
+
width: "20",
|
|
25
|
+
height: "3.3"
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
var _ref3 = /*#__PURE__*/_react["default"].createElement("rect", {
|
|
29
|
+
id: "govgr-burger-icon__line-2",
|
|
30
|
+
width: "20",
|
|
31
|
+
height: "3.3"
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
var _ref4 = /*#__PURE__*/_react["default"].createElement("rect", {
|
|
35
|
+
id: "govgr-burger-icon__line-3",
|
|
36
|
+
width: "20",
|
|
37
|
+
height: "3.3"
|
|
38
|
+
});
|
|
19
39
|
|
|
20
40
|
/**
|
|
21
41
|
* BurgerIcon is used inside the Header component.
|
|
22
42
|
* It should be linked with the NavHorizontal component. It is hidden when the NavHorizontal is visible and vice versa.
|
|
23
43
|
*/
|
|
24
44
|
var BurgerIcon = /*#__PURE__*/_react["default"].forwardRef(function BurgerIcon(_ref, ref) {
|
|
25
|
-
var
|
|
45
|
+
var variant = _ref.variant,
|
|
46
|
+
size = _ref.size,
|
|
47
|
+
active = _ref.active,
|
|
48
|
+
hidden = _ref.hidden,
|
|
26
49
|
className = _ref.className,
|
|
27
50
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
28
|
-
return /*#__PURE__*/_react["default"].createElement("
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}),
|
|
34
|
-
className: (0, _clsx["default"])(true && 'govgr-burger-menu__line2')
|
|
35
|
-
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
36
|
-
className: (0, _clsx["default"])(true && 'govgr-burger-menu__line3')
|
|
37
|
-
}));
|
|
51
|
+
return /*#__PURE__*/_react["default"].createElement(_SvgIcon["default"], (0, _extends2["default"])({
|
|
52
|
+
variant: variant,
|
|
53
|
+
size: size,
|
|
54
|
+
className: (0, _clsx["default"])(active === true && 'govgr-burger-icon--active', hidden === 's' && 'govgr-burger-icon--hidden-s', hidden === 'm' && 'govgr-burger-icon--hidden-m', hidden === 'l' && 'govgr-burger-icon--hidden-l', className && className, true && 'govgr-burger-icon'),
|
|
55
|
+
ref: ref
|
|
56
|
+
}, props), _ref2, _ref3, _ref4);
|
|
38
57
|
});
|
|
39
58
|
|
|
40
59
|
exports.BurgerIcon = BurgerIcon;
|
package/BurgerIcon/index.test.js
CHANGED
|
@@ -8,7 +8,7 @@ var _enzyme = require("enzyme");
|
|
|
8
8
|
|
|
9
9
|
var _BurgerIcon = _interopRequireDefault(require("@digigov/react-core/BurgerIcon"));
|
|
10
10
|
|
|
11
|
-
var _ref = /*#__PURE__*/_react["default"].createElement(_BurgerIcon["default"], null
|
|
11
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_BurgerIcon["default"], null);
|
|
12
12
|
|
|
13
13
|
it('renders the BurgerIcon with no props', function () {
|
|
14
14
|
expect((0, _enzyme.mount)(_ref)).toMatchSnapshot();
|
|
@@ -16,16 +16,84 @@ it('renders the BurgerIcon with no props', function () {
|
|
|
16
16
|
|
|
17
17
|
var _ref2 = /*#__PURE__*/_react["default"].createElement(_BurgerIcon["default"], {
|
|
18
18
|
active: true
|
|
19
|
-
}
|
|
19
|
+
});
|
|
20
20
|
|
|
21
|
-
it('renders the BurgerIcon with active=true', function () {
|
|
21
|
+
it('renders the BurgerIcon with prop active=true', function () {
|
|
22
22
|
expect((0, _enzyme.mount)(_ref2)).toMatchSnapshot();
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
var _ref3 = /*#__PURE__*/_react["default"].createElement(_BurgerIcon["default"], {
|
|
26
|
-
|
|
27
|
-
}
|
|
26
|
+
variant: "dark"
|
|
27
|
+
});
|
|
28
28
|
|
|
29
|
-
it('renders the BurgerIcon with
|
|
29
|
+
it('renders the BurgerIcon with prop variant=dark', function () {
|
|
30
30
|
expect((0, _enzyme.mount)(_ref3)).toMatchSnapshot();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
var _ref4 = /*#__PURE__*/_react["default"].createElement(_BurgerIcon["default"], {
|
|
34
|
+
variant: "light"
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('renders the BurgerIcon prop variant= "light"', function () {
|
|
38
|
+
expect((0, _enzyme.mount)(_ref4)).toMatchSnapshot();
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
var _ref5 = /*#__PURE__*/_react["default"].createElement(_BurgerIcon["default"], {
|
|
42
|
+
variant: "error"
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it('renders the BurgerIcon prop variant= "error"', function () {
|
|
46
|
+
expect((0, _enzyme.mount)(_ref5)).toMatchSnapshot();
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
var _ref6 = /*#__PURE__*/_react["default"].createElement(_BurgerIcon["default"], {
|
|
50
|
+
hidden: "s"
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it('renders the BurgerIcon prop hidden="s"', function () {
|
|
54
|
+
expect((0, _enzyme.mount)(_ref6)).toMatchSnapshot();
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
var _ref7 = /*#__PURE__*/_react["default"].createElement(_BurgerIcon["default"], {
|
|
58
|
+
hidden: "m"
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it('renders the BurgerIcon prop hidden="m"', function () {
|
|
62
|
+
expect((0, _enzyme.mount)(_ref7)).toMatchSnapshot();
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
var _ref8 = /*#__PURE__*/_react["default"].createElement(_BurgerIcon["default"], {
|
|
66
|
+
hidden: "l"
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it('renders the BurgerIcon prop hidden="l"', function () {
|
|
70
|
+
expect((0, _enzyme.mount)(_ref8)).toMatchSnapshot();
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
var _ref9 = /*#__PURE__*/_react["default"].createElement(_BurgerIcon["default"], {
|
|
74
|
+
active: true,
|
|
75
|
+
hidden: "s",
|
|
76
|
+
variant: "dark"
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it('renders the BurgerIcon with props active hidden="s" and variant="dark"', function () {
|
|
80
|
+
expect((0, _enzyme.mount)(_ref9)).toMatchSnapshot();
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
var _ref10 = /*#__PURE__*/_react["default"].createElement(_BurgerIcon["default"], {
|
|
84
|
+
hidden: "l",
|
|
85
|
+
variant: "success"
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
it('renders the BurgerIcon with props hidden="l" and variant="success"', function () {
|
|
89
|
+
expect((0, _enzyme.mount)(_ref10)).toMatchSnapshot();
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
var _ref11 = /*#__PURE__*/_react["default"].createElement(_BurgerIcon["default"], {
|
|
93
|
+
active: true,
|
|
94
|
+
variant: "light"
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it('renders the BurgerIcon props active hidden="no" variant= "light"', function () {
|
|
98
|
+
expect((0, _enzyme.mount)(_ref11)).toMatchSnapshot();
|
|
31
99
|
});
|
package/Button/index.d.ts
CHANGED
|
@@ -21,5 +21,5 @@ export interface ButtonProps extends ButtonElementAttributes {
|
|
|
21
21
|
/**
|
|
22
22
|
* Use the Button component to help users carry out an action.
|
|
23
23
|
*/
|
|
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" | "
|
|
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" | "variant" | "name" | "type" | "value" | "disabled" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & React.RefAttributes<HTMLButtonElement>>;
|
|
25
25
|
export default Button;
|
package/ButtonLink/index.d.ts
CHANGED
|
@@ -13,5 +13,5 @@ export interface ButtonLinkProps extends LinkElementAttributes {
|
|
|
13
13
|
/**
|
|
14
14
|
* Use the Button component to help users carry out an action.
|
|
15
15
|
*/
|
|
16
|
-
export declare const ButtonLink: React.ForwardRefExoticComponent<Pick<ButtonLinkProps, "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 ButtonLink: React.ForwardRefExoticComponent<Pick<ButtonLinkProps, "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" | "media" | "target" | "type" | "href" | "download" | "hrefLang" | "ping" | "rel" | "referrerPolicy"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
17
17
|
export default ButtonLink;
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
# Change Log - @digigov/react-core
|
|
2
2
|
|
|
3
|
-
This log was last generated on Mon,
|
|
3
|
+
This log was last generated on Mon, 28 Feb 2022 15:04:49 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.6.2
|
|
6
|
+
Mon, 28 Feb 2022 15:04:49 GMT
|
|
7
|
+
|
|
8
|
+
### Patches
|
|
9
|
+
|
|
10
|
+
- Remove href's initial value from NavHorizontalListItem and add prop to NavHorizontal for no bottom border
|
|
11
|
+
- refactor svg icons, create SvgIcon global component
|
|
12
|
+
|
|
13
|
+
## 0.6.1
|
|
14
|
+
Thu, 24 Feb 2022 14:51:06 GMT
|
|
15
|
+
|
|
16
|
+
_Version update only_
|
|
17
|
+
|
|
18
|
+
## 0.6.0
|
|
19
|
+
Wed, 16 Feb 2022 12:49:28 GMT
|
|
20
|
+
|
|
21
|
+
### Minor changes
|
|
22
|
+
|
|
23
|
+
- new react components have been made for the icons: CaretIcon, ArrowIcon, CloseIcon, BurgerIcon, SearchIcon
|
|
24
|
+
- new react core components were added: CheckIcon and UncheckIcon
|
|
25
|
+
|
|
26
|
+
### Patches
|
|
27
|
+
|
|
28
|
+
- add fullwith prop in FooterContainer component to add full with space to the container
|
|
29
|
+
- Fix input props in DateInputItem
|
|
4
30
|
|
|
5
31
|
## 0.5.5
|
|
6
32
|
Mon, 14 Feb 2022 09:56:29 GMT
|
package/CallToAction/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export interface CallToActionProps extends ButtonLinkProps {
|
|
|
6
6
|
/**
|
|
7
7
|
* Use this button for the main call to action on your service’s start page.
|
|
8
8
|
*/
|
|
9
|
-
export declare const CallToAction: React.ForwardRefExoticComponent<Pick<CallToActionProps, "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" | "
|
|
9
|
+
export declare const CallToAction: React.ForwardRefExoticComponent<Pick<CallToActionProps, "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" | "media" | "target" | "type" | "href" | "download" | "hrefLang" | "ping" | "rel" | "referrerPolicy"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
10
10
|
export default CallToAction;
|
package/CallToAction/index.js
CHANGED
|
@@ -17,16 +17,11 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
17
17
|
|
|
18
18
|
var _ButtonLink = _interopRequireDefault(require("@digigov/react-core/ButtonLink"));
|
|
19
19
|
|
|
20
|
+
var _ArrowIcon = _interopRequireDefault(require("@digigov/react-core/ArrowIcon"));
|
|
21
|
+
|
|
20
22
|
var _excluded = ["className", "children"];
|
|
21
23
|
|
|
22
|
-
var _ref2 = /*#__PURE__*/_react["default"].createElement("
|
|
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
|
-
}));
|
|
24
|
+
var _ref2 = /*#__PURE__*/_react["default"].createElement(_ArrowIcon["default"], null);
|
|
30
25
|
|
|
31
26
|
/**
|
|
32
27
|
* Use this button for the main call to action on your service’s start page.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the CaretIcon with direction down prop 1`] = `
|
|
4
|
+
<ForwardRef(CaretIcon)
|
|
5
|
+
direction="down"
|
|
6
|
+
>
|
|
7
|
+
<ForwardRef(SvgIcon)
|
|
8
|
+
className="govgr-caret--down"
|
|
9
|
+
>
|
|
10
|
+
<svg
|
|
11
|
+
aria-hidden="true"
|
|
12
|
+
className="govgr-svg-icon--dark govgr-svg-icon--m govgr-caret--down govgr-svg-icon"
|
|
13
|
+
focusable="false"
|
|
14
|
+
viewBox="0 0 24 24"
|
|
15
|
+
>
|
|
16
|
+
<path
|
|
17
|
+
d="M22,6H2l10,12L22,6z"
|
|
18
|
+
/>
|
|
19
|
+
</svg>
|
|
20
|
+
</ForwardRef(SvgIcon)>
|
|
21
|
+
</ForwardRef(CaretIcon)>
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
exports[`renders the CaretIcon with direction right prop 1`] = `
|
|
25
|
+
<ForwardRef(CaretIcon)
|
|
26
|
+
direction="right"
|
|
27
|
+
>
|
|
28
|
+
<ForwardRef(SvgIcon)
|
|
29
|
+
className="govgr-caret--right"
|
|
30
|
+
>
|
|
31
|
+
<svg
|
|
32
|
+
aria-hidden="true"
|
|
33
|
+
className="govgr-svg-icon--dark govgr-svg-icon--m govgr-caret--right govgr-svg-icon"
|
|
34
|
+
focusable="false"
|
|
35
|
+
viewBox="0 0 24 24"
|
|
36
|
+
>
|
|
37
|
+
<path
|
|
38
|
+
d="M6,2v20l12-10L6,2z"
|
|
39
|
+
/>
|
|
40
|
+
</svg>
|
|
41
|
+
</ForwardRef(SvgIcon)>
|
|
42
|
+
</ForwardRef(CaretIcon)>
|
|
43
|
+
`;
|
|
44
|
+
|
|
45
|
+
exports[`renders the CaretIcon with direction up prop 1`] = `
|
|
46
|
+
<ForwardRef(CaretIcon)
|
|
47
|
+
direction="up"
|
|
48
|
+
>
|
|
49
|
+
<ForwardRef(SvgIcon)
|
|
50
|
+
className="govgr-caret--up"
|
|
51
|
+
>
|
|
52
|
+
<svg
|
|
53
|
+
aria-hidden="true"
|
|
54
|
+
className="govgr-svg-icon--dark govgr-svg-icon--m govgr-caret--up govgr-svg-icon"
|
|
55
|
+
focusable="false"
|
|
56
|
+
viewBox="0 0 24 24"
|
|
57
|
+
>
|
|
58
|
+
<path
|
|
59
|
+
d="M2,18h20L12,6L2,18z"
|
|
60
|
+
/>
|
|
61
|
+
</svg>
|
|
62
|
+
</ForwardRef(SvgIcon)>
|
|
63
|
+
</ForwardRef(CaretIcon)>
|
|
64
|
+
`;
|
|
65
|
+
|
|
66
|
+
exports[`renders the CaretIcon with no props, direction prop is left by default 1`] = `
|
|
67
|
+
<ForwardRef(CaretIcon)>
|
|
68
|
+
<ForwardRef(SvgIcon)
|
|
69
|
+
className="govgr-caret--left"
|
|
70
|
+
>
|
|
71
|
+
<svg
|
|
72
|
+
aria-hidden="true"
|
|
73
|
+
className="govgr-svg-icon--dark govgr-svg-icon--m govgr-caret--left govgr-svg-icon"
|
|
74
|
+
focusable="false"
|
|
75
|
+
viewBox="0 0 24 24"
|
|
76
|
+
>
|
|
77
|
+
<path
|
|
78
|
+
d="M18,22V2L6,12L18,22z"
|
|
79
|
+
/>
|
|
80
|
+
</svg>
|
|
81
|
+
</ForwardRef(SvgIcon)>
|
|
82
|
+
</ForwardRef(CaretIcon)>
|
|
83
|
+
`;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SvgIconProps } from '@digigov/react-core/SvgIcon';
|
|
3
|
+
export interface CaretIconProps extends SvgIconProps {
|
|
4
|
+
ref?: React.Ref<SVGSVGElement>;
|
|
5
|
+
/**
|
|
6
|
+
* direction is optional.
|
|
7
|
+
* direction prop declares the direction of the svg icon.
|
|
8
|
+
*/
|
|
9
|
+
direction?: 'up' | 'right' | 'down' | 'left';
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* CaretIcon component is used to add caret icon.
|
|
13
|
+
* CaretIcon can be used inside other components, for example BackLink component.
|
|
14
|
+
*/
|
|
15
|
+
export declare const CaretIcon: React.FC<CaretIconProps>;
|
|
16
|
+
export default CaretIcon;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = exports.CaretIcon = void 0;
|
|
9
|
+
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
|
+
|
|
16
|
+
var _SvgIcon = _interopRequireDefault(require("@digigov/react-core/SvgIcon"));
|
|
17
|
+
|
|
18
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
19
|
+
|
|
20
|
+
var _excluded = ["size", "variant", "direction", "className"];
|
|
21
|
+
|
|
22
|
+
var _ref2 = /*#__PURE__*/_react["default"].createElement("path", {
|
|
23
|
+
d: "M18,22V2L6,12L18,22z"
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
var _ref3 = /*#__PURE__*/_react["default"].createElement("path", {
|
|
27
|
+
d: "M6,2v20l12-10L6,2z"
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
var _ref4 = /*#__PURE__*/_react["default"].createElement("path", {
|
|
31
|
+
d: "M2,18h20L12,6L2,18z"
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
var _ref5 = /*#__PURE__*/_react["default"].createElement("path", {
|
|
35
|
+
d: "M22,6H2l10,12L22,6z"
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* CaretIcon component is used to add caret icon.
|
|
40
|
+
* CaretIcon can be used inside other components, for example BackLink component.
|
|
41
|
+
*/
|
|
42
|
+
var CaretIcon = /*#__PURE__*/_react["default"].forwardRef(function CaretIcon(_ref, ref) {
|
|
43
|
+
var size = _ref.size,
|
|
44
|
+
variant = _ref.variant,
|
|
45
|
+
_ref$direction = _ref.direction,
|
|
46
|
+
direction = _ref$direction === void 0 ? 'left' : _ref$direction,
|
|
47
|
+
className = _ref.className,
|
|
48
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
49
|
+
return /*#__PURE__*/_react["default"].createElement(_SvgIcon["default"], (0, _extends2["default"])({
|
|
50
|
+
size: size,
|
|
51
|
+
variant: variant,
|
|
52
|
+
className: (0, _clsx["default"])(direction === 'right' && 'govgr-caret--right', direction === 'left' && 'govgr-caret--left', direction === 'down' && 'govgr-caret--down', direction === 'up' && 'govgr-caret--up', className && className),
|
|
53
|
+
ref: ref
|
|
54
|
+
}, props), direction === 'left' && _ref2, direction === 'right' && _ref3, direction === 'up' && _ref4, direction === 'down' && _ref5);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
exports.CaretIcon = CaretIcon;
|
|
58
|
+
var _default = CaretIcon;
|
|
59
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _react = _interopRequireDefault(require("react"));
|
|
6
|
+
|
|
7
|
+
var _enzyme = require("enzyme");
|
|
8
|
+
|
|
9
|
+
var _CaretIcon = _interopRequireDefault(require("@digigov/react-core/CaretIcon"));
|
|
10
|
+
|
|
11
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_CaretIcon["default"], null);
|
|
12
|
+
|
|
13
|
+
it('renders the CaretIcon with no props, direction prop is left by default', function () {
|
|
14
|
+
expect((0, _enzyme.mount)(_ref)).toMatchSnapshot();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
var _ref2 = /*#__PURE__*/_react["default"].createElement(_CaretIcon["default"], {
|
|
18
|
+
direction: "right"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('renders the CaretIcon with direction right prop', function () {
|
|
22
|
+
expect((0, _enzyme.mount)(_ref2)).toMatchSnapshot();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
var _ref3 = /*#__PURE__*/_react["default"].createElement(_CaretIcon["default"], {
|
|
26
|
+
direction: "up"
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('renders the CaretIcon with direction up prop', function () {
|
|
30
|
+
expect((0, _enzyme.mount)(_ref3)).toMatchSnapshot();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
var _ref4 = /*#__PURE__*/_react["default"].createElement(_CaretIcon["default"], {
|
|
34
|
+
direction: "down"
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('renders the CaretIcon with direction down prop', function () {
|
|
38
|
+
expect((0, _enzyme.mount)(_ref4)).toMatchSnapshot();
|
|
39
|
+
});
|