@digigov/react-core 0.15.0 → 0.15.3
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/AccordionSectionSummary/index.d.ts +2 -1
- package/AccordionSectionSummary/index.js +6 -2
- package/AccordionSectionSummaryHeading/index.js +24 -2
- package/ArrowIcon/index.js +1 -1
- package/BurgerIcon/index.js +1 -1
- package/CHANGELOG.md +26 -1
- package/CardAction/index.js +1 -1
- package/CardHeading/index.js +1 -1
- package/CardText/index.js +1 -1
- package/CaretIcon/index.js +1 -1
- package/CheckIcon/index.js +1 -1
- package/CloseIcon/index.js +1 -1
- package/Field/index.d.ts +3 -3
- package/Field/index.js +17 -9
- package/FieldsetLegend/index.d.ts +1 -1
- package/Form/__snapshots__/index.test.tsx.snap +23 -0
- package/Form/index.d.ts +11 -0
- package/Form/index.js +38 -0
- package/Form/index.test.d.ts +1 -0
- package/Form/index.test.js +23 -0
- package/LabelTitle/index.d.ts +1 -1
- package/MoreVertIcon/index.js +1 -1
- package/Radio/index.d.ts +5 -1
- package/Radio/index.js +3 -2
- package/SummaryList/index.d.ts +7 -1
- package/SummaryList/index.js +4 -2
- package/UncheckIcon/index.js +1 -1
- package/es/AccordionSectionSummary/index.js +6 -2
- package/es/AccordionSectionSummaryHeading/index.js +16 -2
- package/es/ArrowIcon/index.js +1 -1
- package/es/BurgerIcon/index.js +1 -1
- package/es/CardAction/index.js +1 -1
- package/es/CardHeading/index.js +1 -1
- package/es/CardText/index.js +1 -1
- package/es/CaretIcon/index.js +1 -1
- package/es/CheckIcon/index.js +1 -1
- package/es/CloseIcon/index.js +1 -1
- package/es/Field/index.js +17 -8
- package/es/Form/__snapshots__/index.test.tsx.snap +23 -0
- package/es/Form/index.js +23 -0
- package/es/Form/index.test.js +17 -0
- package/es/MoreVertIcon/index.js +1 -1
- package/es/Radio/index.js +3 -2
- package/es/SummaryList/index.js +4 -2
- package/es/UncheckIcon/index.js +1 -1
- package/es/registry.js +12 -10
- package/esm/AccordionSectionSummary/index.js +6 -2
- package/esm/AccordionSectionSummaryHeading/index.js +16 -2
- package/esm/ArrowIcon/index.js +1 -1
- package/esm/BurgerIcon/index.js +1 -1
- package/esm/CardAction/index.js +1 -1
- package/esm/CardHeading/index.js +1 -1
- package/esm/CardText/index.js +1 -1
- package/esm/CaretIcon/index.js +1 -1
- package/esm/CheckIcon/index.js +1 -1
- package/esm/CloseIcon/index.js +1 -1
- package/esm/Field/index.js +17 -8
- package/esm/Form/__snapshots__/index.test.tsx.snap +23 -0
- package/esm/Form/index.js +23 -0
- package/esm/Form/index.test.js +17 -0
- package/esm/MoreVertIcon/index.js +1 -1
- package/esm/Radio/index.js +3 -2
- package/esm/SummaryList/index.js +4 -2
- package/esm/UncheckIcon/index.js +1 -1
- package/esm/index.js +1 -1
- package/esm/registry.js +12 -10
- package/package.json +2 -2
- package/registry.d.ts +6 -5
- package/registry.js +15 -12
package/SummaryList/index.d.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare type DlElementAttributes = JSX.IntrinsicElements['dl'];
|
|
3
3
|
export interface SummaryListProps extends DlElementAttributes {
|
|
4
|
+
/**
|
|
5
|
+
* border is optional.
|
|
6
|
+
* By default, SummaryList has borders. You can remove borders by using border prop.
|
|
7
|
+
* By default is true
|
|
8
|
+
*/
|
|
9
|
+
border?: boolean;
|
|
4
10
|
}
|
|
5
11
|
/**
|
|
6
12
|
* SummaryList used as a table with summary informations.
|
|
7
13
|
* It must contain a list of SummaryListItem components.
|
|
8
14
|
*/
|
|
9
|
-
export declare const SummaryList: React.ForwardRefExoticComponent<Pick<SummaryListProps, "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDListElement>>;
|
|
15
|
+
export declare const SummaryList: React.ForwardRefExoticComponent<Pick<SummaryListProps, "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" | "border"> & React.RefAttributes<HTMLDListElement>>;
|
|
10
16
|
export default SummaryList;
|
package/SummaryList/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
|
|
16
16
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
17
|
|
|
18
|
-
var _excluded = ["className", "children"];
|
|
18
|
+
var _excluded = ["className", "border", "children"];
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* SummaryList used as a table with summary informations.
|
|
@@ -23,11 +23,13 @@ var _excluded = ["className", "children"];
|
|
|
23
23
|
*/
|
|
24
24
|
var SummaryList = /*#__PURE__*/_react["default"].forwardRef(function SummaryList(_ref, ref) {
|
|
25
25
|
var className = _ref.className,
|
|
26
|
+
_ref$border = _ref.border,
|
|
27
|
+
border = _ref$border === void 0 ? true : _ref$border,
|
|
26
28
|
children = _ref.children,
|
|
27
29
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
28
30
|
return /*#__PURE__*/_react["default"].createElement("dl", (0, _extends2["default"])({
|
|
29
31
|
ref: ref,
|
|
30
|
-
className: (0, _clsx["default"])(className, true && 'govgr-summary-list')
|
|
32
|
+
className: (0, _clsx["default"])(className, !border && 'govgr-summary-list--no-border', true && 'govgr-summary-list')
|
|
31
33
|
}, props), children);
|
|
32
34
|
});
|
|
33
35
|
|
package/UncheckIcon/index.js
CHANGED
|
@@ -34,7 +34,7 @@ var UnCheckIcon = /*#__PURE__*/_react["default"].forwardRef(function UnCheckIcon
|
|
|
34
34
|
return /*#__PURE__*/_react["default"].createElement(_SvgIcon["default"], (0, _extends2["default"])({
|
|
35
35
|
size: size,
|
|
36
36
|
variant: variant,
|
|
37
|
-
className: (0, _clsx["default"])(className
|
|
37
|
+
className: (0, _clsx["default"])(className, true && 'govgr-svg-icon--check'),
|
|
38
38
|
ref: ref
|
|
39
39
|
}, props), _ref2);
|
|
40
40
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["className", "children"];
|
|
3
|
+
var _excluded = ["className", "ariaLevel", "children"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
|
|
@@ -9,12 +9,16 @@ import clsx from 'clsx';
|
|
|
9
9
|
*/
|
|
10
10
|
export var AccordionSectionSummary = /*#__PURE__*/React.forwardRef(function AccordionSectionSummary(_ref, ref) {
|
|
11
11
|
var className = _ref.className,
|
|
12
|
+
_ref$ariaLevel = _ref.ariaLevel,
|
|
13
|
+
ariaLevel = _ref$ariaLevel === void 0 ? 2 : _ref$ariaLevel,
|
|
12
14
|
children = _ref.children,
|
|
13
15
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
16
|
|
|
15
17
|
return /*#__PURE__*/React.createElement("summary", _extends({
|
|
16
18
|
ref: ref,
|
|
17
|
-
className: clsx(className, true && 'govgr-accordion__section-summary')
|
|
19
|
+
className: clsx(className, true && 'govgr-accordion__section-summary'),
|
|
20
|
+
role: "heading",
|
|
21
|
+
"aria-level": ariaLevel
|
|
18
22
|
}, props), children);
|
|
19
23
|
});
|
|
20
24
|
export default AccordionSectionSummary;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
var _excluded = ["className", "children"];
|
|
4
|
-
import React from 'react';
|
|
5
|
+
import React, { useState } from 'react';
|
|
5
6
|
import clsx from 'clsx';
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -12,10 +13,23 @@ export var AccordionSectionSummaryHeading = /*#__PURE__*/React.forwardRef(functi
|
|
|
12
13
|
children = _ref.children,
|
|
13
14
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
15
|
|
|
16
|
+
var toggleExpanded = function toggleExpanded() {
|
|
17
|
+
setExpanded(!isExpanded);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
var _useState = useState(false),
|
|
21
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
22
|
+
isExpanded = _useState2[0],
|
|
23
|
+
setExpanded = _useState2[1];
|
|
24
|
+
|
|
15
25
|
return /*#__PURE__*/React.createElement("h2", _extends({
|
|
16
26
|
ref: ref,
|
|
17
27
|
className: clsx(className, true && 'govgr-accordion__section-heading')
|
|
18
|
-
}, props
|
|
28
|
+
}, props, {
|
|
29
|
+
role: "button",
|
|
30
|
+
"aria-expanded": isExpanded,
|
|
31
|
+
onClick: toggleExpanded
|
|
32
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
19
33
|
className: clsx(true && 'govgr-accordion__section-button')
|
|
20
34
|
}, children));
|
|
21
35
|
});
|
package/es/ArrowIcon/index.js
CHANGED
|
@@ -36,7 +36,7 @@ export var ArrowIcon = /*#__PURE__*/React.forwardRef(function ArrowIcon(_ref, re
|
|
|
36
36
|
return /*#__PURE__*/React.createElement(SvgIcon, _extends({
|
|
37
37
|
size: size,
|
|
38
38
|
variant: variant,
|
|
39
|
-
className: clsx(direction === 'right' && 'govgr-arrow--right', direction === 'left' && 'govgr-arrow--left', direction === 'down' && 'govgr-arrow--down', direction === 'up' && 'govgr-arrow--up'
|
|
39
|
+
className: clsx(className, direction === 'right' && 'govgr-arrow--right', direction === 'left' && 'govgr-arrow--left', direction === 'down' && 'govgr-arrow--down', direction === 'up' && 'govgr-arrow--up'),
|
|
40
40
|
ref: ref
|
|
41
41
|
}, props), direction === 'left' && _ref2, direction === 'right' && _ref3, direction === 'up' && _ref4, direction === 'down' && _ref5);
|
|
42
42
|
});
|
package/es/BurgerIcon/index.js
CHANGED
|
@@ -38,7 +38,7 @@ export var BurgerIcon = /*#__PURE__*/React.forwardRef(function BurgerIcon(_ref,
|
|
|
38
38
|
return /*#__PURE__*/React.createElement(SvgIcon, _extends({
|
|
39
39
|
variant: variant,
|
|
40
40
|
size: size,
|
|
41
|
-
className: clsx(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',
|
|
41
|
+
className: clsx(className, 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', true && 'govgr-burger-icon'),
|
|
42
42
|
ref: ref
|
|
43
43
|
}, props), _ref2, _ref3, _ref4);
|
|
44
44
|
});
|
package/es/CardAction/index.js
CHANGED
|
@@ -16,7 +16,7 @@ export var CardAction = /*#__PURE__*/React.forwardRef(function CardText(_ref, re
|
|
|
16
16
|
|
|
17
17
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
18
18
|
ref: ref,
|
|
19
|
-
className: clsx(className
|
|
19
|
+
className: clsx(className, true && 'govgr-card__action')
|
|
20
20
|
}, props), children);
|
|
21
21
|
});
|
|
22
22
|
export default CardAction;
|
package/es/CardHeading/index.js
CHANGED
|
@@ -17,7 +17,7 @@ export var CardHeading = /*#__PURE__*/React.forwardRef(function CardHeading(_ref
|
|
|
17
17
|
ref: ref,
|
|
18
18
|
role: "heading",
|
|
19
19
|
"aria-level": 2,
|
|
20
|
-
className: clsx(className
|
|
20
|
+
className: clsx(className, true && 'govgr-card__heading')
|
|
21
21
|
}, props), children);
|
|
22
22
|
});
|
|
23
23
|
export default CardHeading;
|
package/es/CardText/index.js
CHANGED
|
@@ -15,7 +15,7 @@ export var CardText = /*#__PURE__*/React.forwardRef(function CardText(_ref, ref)
|
|
|
15
15
|
|
|
16
16
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
17
17
|
ref: ref,
|
|
18
|
-
className: clsx(className
|
|
18
|
+
className: clsx(className, true && 'govgr-card__text')
|
|
19
19
|
}, props), children);
|
|
20
20
|
});
|
|
21
21
|
export default CardText;
|
package/es/CaretIcon/index.js
CHANGED
|
@@ -36,7 +36,7 @@ export var CaretIcon = /*#__PURE__*/React.forwardRef(function CaretIcon(_ref, re
|
|
|
36
36
|
return /*#__PURE__*/React.createElement(SvgIcon, _extends({
|
|
37
37
|
size: size,
|
|
38
38
|
variant: variant,
|
|
39
|
-
className: clsx(direction === 'right' && 'govgr-caret--right', direction === 'left' && 'govgr-caret--left', direction === 'down' && 'govgr-caret--down', direction === 'up' && 'govgr-caret--up'
|
|
39
|
+
className: clsx(className, direction === 'right' && 'govgr-caret--right', direction === 'left' && 'govgr-caret--left', direction === 'down' && 'govgr-caret--down', direction === 'up' && 'govgr-caret--up'),
|
|
40
40
|
ref: ref
|
|
41
41
|
}, props), direction === 'left' && _ref2, direction === 'right' && _ref3, direction === 'up' && _ref4, direction === 'down' && _ref5);
|
|
42
42
|
});
|
package/es/CheckIcon/index.js
CHANGED
|
@@ -21,7 +21,7 @@ export var CheckIcon = /*#__PURE__*/React.forwardRef(function CheckIcon(_ref, re
|
|
|
21
21
|
return /*#__PURE__*/React.createElement(SvgIcon, _extends({
|
|
22
22
|
size: size,
|
|
23
23
|
variant: variant,
|
|
24
|
-
className: clsx(className
|
|
24
|
+
className: clsx(className, true && 'govgr-svg-icon--check'),
|
|
25
25
|
ref: ref
|
|
26
26
|
}, props), _ref2);
|
|
27
27
|
});
|
package/es/CloseIcon/index.js
CHANGED
|
@@ -22,7 +22,7 @@ export var CloseIcon = /*#__PURE__*/React.forwardRef(function CloseIcon(_ref, re
|
|
|
22
22
|
return /*#__PURE__*/React.createElement(SvgIcon, _extends({
|
|
23
23
|
size: size,
|
|
24
24
|
variant: variant,
|
|
25
|
-
className: clsx(className
|
|
25
|
+
className: clsx(className, true && 'govgr-close-icon'),
|
|
26
26
|
ref: ref
|
|
27
27
|
}, props), _ref2);
|
|
28
28
|
});
|
package/es/Field/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["error", "className", "children"];
|
|
4
1
|
import React from 'react';
|
|
5
2
|
import clsx from 'clsx';
|
|
3
|
+
import Grid from '@digigov/react-core/Grid';
|
|
6
4
|
|
|
7
5
|
/**
|
|
8
6
|
* Field component wraps form components such as Checkbox TextInput TextArea etc.
|
|
@@ -11,11 +9,22 @@ export var Field = /*#__PURE__*/React.forwardRef(function Field(_ref, ref) {
|
|
|
11
9
|
var error = _ref.error,
|
|
12
10
|
className = _ref.className,
|
|
13
11
|
children = _ref.children,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
_ref$xs = _ref.xs,
|
|
13
|
+
xs = _ref$xs === void 0 ? 12 : _ref$xs,
|
|
14
|
+
_ref$md = _ref.md,
|
|
15
|
+
md = _ref$md === void 0 ? 12 : _ref$md,
|
|
16
|
+
_ref$lg = _ref.lg,
|
|
17
|
+
lg = _ref$lg === void 0 ? 12 : _ref$lg,
|
|
18
|
+
_ref$xl = _ref.xl,
|
|
19
|
+
xl = _ref$xl === void 0 ? 12 : _ref$xl;
|
|
20
|
+
return /*#__PURE__*/React.createElement(Grid, {
|
|
17
21
|
ref: ref,
|
|
18
|
-
className: clsx(className, error === true && 'govgr-field__error', true && 'govgr-field')
|
|
19
|
-
|
|
22
|
+
className: clsx(className, error === true && 'govgr-field__error', true && 'govgr-field'),
|
|
23
|
+
item: true,
|
|
24
|
+
xs: xs,
|
|
25
|
+
md: md,
|
|
26
|
+
lg: lg,
|
|
27
|
+
xl: xl
|
|
28
|
+
}, children);
|
|
20
29
|
});
|
|
21
30
|
export default Field;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the Form with grid props 1`] = `
|
|
4
|
+
<ForwardRef(Form)
|
|
5
|
+
grid={true}
|
|
6
|
+
>
|
|
7
|
+
<form
|
|
8
|
+
className="govgr-form govgr-grid"
|
|
9
|
+
>
|
|
10
|
+
hello
|
|
11
|
+
</form>
|
|
12
|
+
</ForwardRef(Form)>
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
exports[`renders the Form with no props 1`] = `
|
|
16
|
+
<ForwardRef(Form)>
|
|
17
|
+
<form
|
|
18
|
+
className="govgr-form"
|
|
19
|
+
>
|
|
20
|
+
hello
|
|
21
|
+
</form>
|
|
22
|
+
</ForwardRef(Form)>
|
|
23
|
+
`;
|
package/es/Form/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["className", "children", "grid"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Use this inside the Content component for additional content
|
|
9
|
+
* that will be shown on the left one third of the page
|
|
10
|
+
*/
|
|
11
|
+
export var Form = /*#__PURE__*/React.forwardRef(function Form(_ref, ref) {
|
|
12
|
+
var className = _ref.className,
|
|
13
|
+
children = _ref.children,
|
|
14
|
+
_ref$grid = _ref.grid,
|
|
15
|
+
grid = _ref$grid === void 0 ? false : _ref$grid,
|
|
16
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
|
|
18
|
+
return /*#__PURE__*/React.createElement("form", _extends({
|
|
19
|
+
ref: ref,
|
|
20
|
+
className: clsx(className, true && 'govgr-form', grid && 'govgr-grid')
|
|
21
|
+
}, props), children);
|
|
22
|
+
});
|
|
23
|
+
export default Form;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
import Form from '@digigov/react-core/Form';
|
|
4
|
+
|
|
5
|
+
var _ref = /*#__PURE__*/React.createElement(Form, null, "hello");
|
|
6
|
+
|
|
7
|
+
it('renders the Form with no props', function () {
|
|
8
|
+
expect(mount(_ref)).toMatchSnapshot();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
var _ref2 = /*#__PURE__*/React.createElement(Form, {
|
|
12
|
+
grid: true
|
|
13
|
+
}, "hello");
|
|
14
|
+
|
|
15
|
+
it('renders the Form with grid props', function () {
|
|
16
|
+
expect(mount(_ref2)).toMatchSnapshot();
|
|
17
|
+
});
|
package/es/MoreVertIcon/index.js
CHANGED
|
@@ -35,7 +35,7 @@ export var MoreVertIcon = /*#__PURE__*/React.forwardRef(function MoreVertIcon(_r
|
|
|
35
35
|
return /*#__PURE__*/React.createElement(SvgIcon, _extends({
|
|
36
36
|
size: size,
|
|
37
37
|
variant: variant,
|
|
38
|
-
className: clsx(className
|
|
38
|
+
className: clsx(className, true && 'govgr-svg-icon--check'),
|
|
39
39
|
ref: ref
|
|
40
40
|
}, props), _ref2, _ref3, _ref4);
|
|
41
41
|
});
|
package/es/Radio/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["className", "children"];
|
|
3
|
+
var _excluded = ["className", "children", "inline"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
|
|
@@ -11,11 +11,12 @@ import clsx from 'clsx';
|
|
|
11
11
|
export var Radio = /*#__PURE__*/React.forwardRef(function Radio(_ref, ref) {
|
|
12
12
|
var className = _ref.className,
|
|
13
13
|
children = _ref.children,
|
|
14
|
+
inline = _ref.inline,
|
|
14
15
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
15
16
|
|
|
16
17
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
17
18
|
ref: ref,
|
|
18
|
-
className: clsx(className, true && 'govgr-radios')
|
|
19
|
+
className: clsx(className, inline === true && 'govgr-radios--inline', true && 'govgr-radios')
|
|
19
20
|
}, props), children);
|
|
20
21
|
});
|
|
21
22
|
export default Radio;
|
package/es/SummaryList/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["className", "children"];
|
|
3
|
+
var _excluded = ["className", "border", "children"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
|
|
@@ -10,12 +10,14 @@ import clsx from 'clsx';
|
|
|
10
10
|
*/
|
|
11
11
|
export var SummaryList = /*#__PURE__*/React.forwardRef(function SummaryList(_ref, ref) {
|
|
12
12
|
var className = _ref.className,
|
|
13
|
+
_ref$border = _ref.border,
|
|
14
|
+
border = _ref$border === void 0 ? true : _ref$border,
|
|
13
15
|
children = _ref.children,
|
|
14
16
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
15
17
|
|
|
16
18
|
return /*#__PURE__*/React.createElement("dl", _extends({
|
|
17
19
|
ref: ref,
|
|
18
|
-
className: clsx(className, true && 'govgr-summary-list')
|
|
20
|
+
className: clsx(className, !border && 'govgr-summary-list--no-border', true && 'govgr-summary-list')
|
|
19
21
|
}, props), children);
|
|
20
22
|
});
|
|
21
23
|
export default SummaryList;
|
package/es/UncheckIcon/index.js
CHANGED
|
@@ -21,7 +21,7 @@ export var UnCheckIcon = /*#__PURE__*/React.forwardRef(function UnCheckIcon(_ref
|
|
|
21
21
|
return /*#__PURE__*/React.createElement(SvgIcon, _extends({
|
|
22
22
|
size: size,
|
|
23
23
|
variant: variant,
|
|
24
|
-
className: clsx(className
|
|
24
|
+
className: clsx(className, true && 'govgr-svg-icon--check'),
|
|
25
25
|
ref: ref
|
|
26
26
|
}, props), _ref2);
|
|
27
27
|
});
|
package/es/registry.js
CHANGED
|
@@ -2,10 +2,10 @@ import * as _digigov_react_core from '@digigov/react-core';
|
|
|
2
2
|
import * as _digigov_react_core_Accordion from '@digigov/react-core/Accordion';
|
|
3
3
|
import * as _digigov_react_core_AccordionControls from '@digigov/react-core/AccordionControls';
|
|
4
4
|
import * as _digigov_react_core_AccordionSection from '@digigov/react-core/AccordionSection';
|
|
5
|
-
import * as
|
|
5
|
+
import * as _digigov_react_core_AccordionSectionHeader from '@digigov/react-core/AccordionSectionHeader';
|
|
6
6
|
import * as _digigov_react_core_AccordionSectionSummary from '@digigov/react-core/AccordionSectionSummary';
|
|
7
|
+
import * as _digigov_react_core_AccordionSectionContent from '@digigov/react-core/AccordionSectionContent';
|
|
7
8
|
import * as _digigov_react_core_AccordionSectionSummaryHeading from '@digigov/react-core/AccordionSectionSummaryHeading';
|
|
8
|
-
import * as _digigov_react_core_AccordionSectionHeader from '@digigov/react-core/AccordionSectionHeader';
|
|
9
9
|
import * as _digigov_react_core_ArrowIcon from '@digigov/react-core/ArrowIcon';
|
|
10
10
|
import * as _digigov_react_core_Aside from '@digigov/react-core/Aside';
|
|
11
11
|
import * as _digigov_react_core_BackLink from '@digigov/react-core/BackLink';
|
|
@@ -42,8 +42,8 @@ import * as _digigov_react_core_DetailsSummary from '@digigov/react-core/Details
|
|
|
42
42
|
import * as _digigov_react_core_ErrorMessage from '@digigov/react-core/ErrorMessage';
|
|
43
43
|
import * as _digigov_react_core_ErrorSummary from '@digigov/react-core/ErrorSummary';
|
|
44
44
|
import * as _digigov_react_core_Field from '@digigov/react-core/Field';
|
|
45
|
-
import * as _digigov_react_core_Fieldset from '@digigov/react-core/Fieldset';
|
|
46
45
|
import * as _digigov_react_core_FieldsetLegend from '@digigov/react-core/FieldsetLegend';
|
|
46
|
+
import * as _digigov_react_core_Fieldset from '@digigov/react-core/Fieldset';
|
|
47
47
|
import * as _digigov_react_core_FileUpload from '@digigov/react-core/FileUpload';
|
|
48
48
|
import * as _digigov_react_core_Footer from '@digigov/react-core/Footer';
|
|
49
49
|
import * as _digigov_react_core_FooterContainer from '@digigov/react-core/FooterContainer';
|
|
@@ -58,9 +58,9 @@ import * as _digigov_react_core_FooterList from '@digigov/react-core/FooterList'
|
|
|
58
58
|
import * as _digigov_react_core_FooterListItem from '@digigov/react-core/FooterListItem';
|
|
59
59
|
import * as _digigov_react_core_FooterMeta from '@digigov/react-core/FooterMeta';
|
|
60
60
|
import * as _digigov_react_core_FooterMetaItem from '@digigov/react-core/FooterMetaItem';
|
|
61
|
-
import * as _digigov_react_core_FooterNavigation from '@digigov/react-core/FooterNavigation';
|
|
62
|
-
import * as _digigov_react_core_FooterSection from '@digigov/react-core/FooterSection';
|
|
63
61
|
import * as _digigov_react_core_GovGRFooter from '@digigov/react-core/GovGRFooter';
|
|
62
|
+
import * as _digigov_react_core_FooterSection from '@digigov/react-core/FooterSection';
|
|
63
|
+
import * as _digigov_react_core_FooterNavigation from '@digigov/react-core/FooterNavigation';
|
|
64
64
|
import * as _digigov_react_core_GovGRLogo from '@digigov/react-core/GovGRLogo';
|
|
65
65
|
import * as _digigov_react_core_Grid from '@digigov/react-core/Grid';
|
|
66
66
|
import * as _digigov_react_core_Header from '@digigov/react-core/Header';
|
|
@@ -114,6 +114,7 @@ import * as _digigov_react_core_SectionBreak from '@digigov/react-core/SectionBr
|
|
|
114
114
|
import * as _digigov_react_core_Select from '@digigov/react-core/Select';
|
|
115
115
|
import * as _digigov_react_core_SelectOption from '@digigov/react-core/SelectOption';
|
|
116
116
|
import * as _digigov_react_core_ServiceBadge from '@digigov/react-core/ServiceBadge';
|
|
117
|
+
import * as _digigov_react_core_SkipLink from '@digigov/react-core/SkipLink';
|
|
117
118
|
import * as _digigov_react_core_SummaryList from '@digigov/react-core/SummaryList';
|
|
118
119
|
import * as _digigov_react_core_SummaryListItem from '@digigov/react-core/SummaryListItem';
|
|
119
120
|
import * as _digigov_react_core_SummaryListItemAction from '@digigov/react-core/SummaryListItemAction';
|
|
@@ -158,10 +159,10 @@ export default {
|
|
|
158
159
|
'@digigov/react-core/Accordion': lazyImport(_digigov_react_core_Accordion),
|
|
159
160
|
'@digigov/react-core/AccordionControls': lazyImport(_digigov_react_core_AccordionControls),
|
|
160
161
|
'@digigov/react-core/AccordionSection': lazyImport(_digigov_react_core_AccordionSection),
|
|
161
|
-
'@digigov/react-core/
|
|
162
|
+
'@digigov/react-core/AccordionSectionHeader': lazyImport(_digigov_react_core_AccordionSectionHeader),
|
|
162
163
|
'@digigov/react-core/AccordionSectionSummary': lazyImport(_digigov_react_core_AccordionSectionSummary),
|
|
164
|
+
'@digigov/react-core/AccordionSectionContent': lazyImport(_digigov_react_core_AccordionSectionContent),
|
|
163
165
|
'@digigov/react-core/AccordionSectionSummaryHeading': lazyImport(_digigov_react_core_AccordionSectionSummaryHeading),
|
|
164
|
-
'@digigov/react-core/AccordionSectionHeader': lazyImport(_digigov_react_core_AccordionSectionHeader),
|
|
165
166
|
'@digigov/react-core/ArrowIcon': lazyImport(_digigov_react_core_ArrowIcon),
|
|
166
167
|
'@digigov/react-core/Aside': lazyImport(_digigov_react_core_Aside),
|
|
167
168
|
'@digigov/react-core/BackLink': lazyImport(_digigov_react_core_BackLink),
|
|
@@ -198,8 +199,8 @@ export default {
|
|
|
198
199
|
'@digigov/react-core/ErrorMessage': lazyImport(_digigov_react_core_ErrorMessage),
|
|
199
200
|
'@digigov/react-core/ErrorSummary': lazyImport(_digigov_react_core_ErrorSummary),
|
|
200
201
|
'@digigov/react-core/Field': lazyImport(_digigov_react_core_Field),
|
|
201
|
-
'@digigov/react-core/Fieldset': lazyImport(_digigov_react_core_Fieldset),
|
|
202
202
|
'@digigov/react-core/FieldsetLegend': lazyImport(_digigov_react_core_FieldsetLegend),
|
|
203
|
+
'@digigov/react-core/Fieldset': lazyImport(_digigov_react_core_Fieldset),
|
|
203
204
|
'@digigov/react-core/FileUpload': lazyImport(_digigov_react_core_FileUpload),
|
|
204
205
|
'@digigov/react-core/Footer': lazyImport(_digigov_react_core_Footer),
|
|
205
206
|
'@digigov/react-core/FooterContainer': lazyImport(_digigov_react_core_FooterContainer),
|
|
@@ -214,9 +215,9 @@ export default {
|
|
|
214
215
|
'@digigov/react-core/FooterListItem': lazyImport(_digigov_react_core_FooterListItem),
|
|
215
216
|
'@digigov/react-core/FooterMeta': lazyImport(_digigov_react_core_FooterMeta),
|
|
216
217
|
'@digigov/react-core/FooterMetaItem': lazyImport(_digigov_react_core_FooterMetaItem),
|
|
217
|
-
'@digigov/react-core/FooterNavigation': lazyImport(_digigov_react_core_FooterNavigation),
|
|
218
|
-
'@digigov/react-core/FooterSection': lazyImport(_digigov_react_core_FooterSection),
|
|
219
218
|
'@digigov/react-core/GovGRFooter': lazyImport(_digigov_react_core_GovGRFooter),
|
|
219
|
+
'@digigov/react-core/FooterSection': lazyImport(_digigov_react_core_FooterSection),
|
|
220
|
+
'@digigov/react-core/FooterNavigation': lazyImport(_digigov_react_core_FooterNavigation),
|
|
220
221
|
'@digigov/react-core/GovGRLogo': lazyImport(_digigov_react_core_GovGRLogo),
|
|
221
222
|
'@digigov/react-core/Grid': lazyImport(_digigov_react_core_Grid),
|
|
222
223
|
'@digigov/react-core/Header': lazyImport(_digigov_react_core_Header),
|
|
@@ -270,6 +271,7 @@ export default {
|
|
|
270
271
|
'@digigov/react-core/Select': lazyImport(_digigov_react_core_Select),
|
|
271
272
|
'@digigov/react-core/SelectOption': lazyImport(_digigov_react_core_SelectOption),
|
|
272
273
|
'@digigov/react-core/ServiceBadge': lazyImport(_digigov_react_core_ServiceBadge),
|
|
274
|
+
'@digigov/react-core/SkipLink': lazyImport(_digigov_react_core_SkipLink),
|
|
273
275
|
'@digigov/react-core/SummaryList': lazyImport(_digigov_react_core_SummaryList),
|
|
274
276
|
'@digigov/react-core/SummaryListItem': lazyImport(_digigov_react_core_SummaryListItem),
|
|
275
277
|
'@digigov/react-core/SummaryListItemAction': lazyImport(_digigov_react_core_SummaryListItemAction),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["className", "children"];
|
|
3
|
+
var _excluded = ["className", "ariaLevel", "children"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
|
|
@@ -9,12 +9,16 @@ import clsx from 'clsx';
|
|
|
9
9
|
*/
|
|
10
10
|
export var AccordionSectionSummary = /*#__PURE__*/React.forwardRef(function AccordionSectionSummary(_ref, ref) {
|
|
11
11
|
var className = _ref.className,
|
|
12
|
+
_ref$ariaLevel = _ref.ariaLevel,
|
|
13
|
+
ariaLevel = _ref$ariaLevel === void 0 ? 2 : _ref$ariaLevel,
|
|
12
14
|
children = _ref.children,
|
|
13
15
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
16
|
|
|
15
17
|
return /*#__PURE__*/React.createElement("summary", _extends({
|
|
16
18
|
ref: ref,
|
|
17
|
-
className: clsx(className, true && 'govgr-accordion__section-summary')
|
|
19
|
+
className: clsx(className, true && 'govgr-accordion__section-summary'),
|
|
20
|
+
role: "heading",
|
|
21
|
+
"aria-level": ariaLevel
|
|
18
22
|
}, props), children);
|
|
19
23
|
});
|
|
20
24
|
export default AccordionSectionSummary;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
var _excluded = ["className", "children"];
|
|
4
|
-
import React from 'react';
|
|
5
|
+
import React, { useState } from 'react';
|
|
5
6
|
import clsx from 'clsx';
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -12,10 +13,23 @@ export var AccordionSectionSummaryHeading = /*#__PURE__*/React.forwardRef(functi
|
|
|
12
13
|
children = _ref.children,
|
|
13
14
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
15
|
|
|
16
|
+
var toggleExpanded = function toggleExpanded() {
|
|
17
|
+
setExpanded(!isExpanded);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
var _useState = useState(false),
|
|
21
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
22
|
+
isExpanded = _useState2[0],
|
|
23
|
+
setExpanded = _useState2[1];
|
|
24
|
+
|
|
15
25
|
return /*#__PURE__*/React.createElement("h2", _extends({
|
|
16
26
|
ref: ref,
|
|
17
27
|
className: clsx(className, true && 'govgr-accordion__section-heading')
|
|
18
|
-
}, props
|
|
28
|
+
}, props, {
|
|
29
|
+
role: "button",
|
|
30
|
+
"aria-expanded": isExpanded,
|
|
31
|
+
onClick: toggleExpanded
|
|
32
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
19
33
|
className: clsx(true && 'govgr-accordion__section-button')
|
|
20
34
|
}, children));
|
|
21
35
|
});
|
package/esm/ArrowIcon/index.js
CHANGED
|
@@ -36,7 +36,7 @@ export var ArrowIcon = /*#__PURE__*/React.forwardRef(function ArrowIcon(_ref, re
|
|
|
36
36
|
return /*#__PURE__*/React.createElement(SvgIcon, _extends({
|
|
37
37
|
size: size,
|
|
38
38
|
variant: variant,
|
|
39
|
-
className: clsx(direction === 'right' && 'govgr-arrow--right', direction === 'left' && 'govgr-arrow--left', direction === 'down' && 'govgr-arrow--down', direction === 'up' && 'govgr-arrow--up'
|
|
39
|
+
className: clsx(className, direction === 'right' && 'govgr-arrow--right', direction === 'left' && 'govgr-arrow--left', direction === 'down' && 'govgr-arrow--down', direction === 'up' && 'govgr-arrow--up'),
|
|
40
40
|
ref: ref
|
|
41
41
|
}, props), direction === 'left' && _ref2, direction === 'right' && _ref3, direction === 'up' && _ref4, direction === 'down' && _ref5);
|
|
42
42
|
});
|
package/esm/BurgerIcon/index.js
CHANGED
|
@@ -38,7 +38,7 @@ export var BurgerIcon = /*#__PURE__*/React.forwardRef(function BurgerIcon(_ref,
|
|
|
38
38
|
return /*#__PURE__*/React.createElement(SvgIcon, _extends({
|
|
39
39
|
variant: variant,
|
|
40
40
|
size: size,
|
|
41
|
-
className: clsx(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',
|
|
41
|
+
className: clsx(className, 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', true && 'govgr-burger-icon'),
|
|
42
42
|
ref: ref
|
|
43
43
|
}, props), _ref2, _ref3, _ref4);
|
|
44
44
|
});
|
package/esm/CardAction/index.js
CHANGED
|
@@ -16,7 +16,7 @@ export var CardAction = /*#__PURE__*/React.forwardRef(function CardText(_ref, re
|
|
|
16
16
|
|
|
17
17
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
18
18
|
ref: ref,
|
|
19
|
-
className: clsx(className
|
|
19
|
+
className: clsx(className, true && 'govgr-card__action')
|
|
20
20
|
}, props), children);
|
|
21
21
|
});
|
|
22
22
|
export default CardAction;
|
package/esm/CardHeading/index.js
CHANGED
|
@@ -17,7 +17,7 @@ export var CardHeading = /*#__PURE__*/React.forwardRef(function CardHeading(_ref
|
|
|
17
17
|
ref: ref,
|
|
18
18
|
role: "heading",
|
|
19
19
|
"aria-level": 2,
|
|
20
|
-
className: clsx(className
|
|
20
|
+
className: clsx(className, true && 'govgr-card__heading')
|
|
21
21
|
}, props), children);
|
|
22
22
|
});
|
|
23
23
|
export default CardHeading;
|
package/esm/CardText/index.js
CHANGED
|
@@ -15,7 +15,7 @@ export var CardText = /*#__PURE__*/React.forwardRef(function CardText(_ref, ref)
|
|
|
15
15
|
|
|
16
16
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
17
17
|
ref: ref,
|
|
18
|
-
className: clsx(className
|
|
18
|
+
className: clsx(className, true && 'govgr-card__text')
|
|
19
19
|
}, props), children);
|
|
20
20
|
});
|
|
21
21
|
export default CardText;
|
package/esm/CaretIcon/index.js
CHANGED
|
@@ -36,7 +36,7 @@ export var CaretIcon = /*#__PURE__*/React.forwardRef(function CaretIcon(_ref, re
|
|
|
36
36
|
return /*#__PURE__*/React.createElement(SvgIcon, _extends({
|
|
37
37
|
size: size,
|
|
38
38
|
variant: variant,
|
|
39
|
-
className: clsx(direction === 'right' && 'govgr-caret--right', direction === 'left' && 'govgr-caret--left', direction === 'down' && 'govgr-caret--down', direction === 'up' && 'govgr-caret--up'
|
|
39
|
+
className: clsx(className, direction === 'right' && 'govgr-caret--right', direction === 'left' && 'govgr-caret--left', direction === 'down' && 'govgr-caret--down', direction === 'up' && 'govgr-caret--up'),
|
|
40
40
|
ref: ref
|
|
41
41
|
}, props), direction === 'left' && _ref2, direction === 'right' && _ref3, direction === 'up' && _ref4, direction === 'down' && _ref5);
|
|
42
42
|
});
|
package/esm/CheckIcon/index.js
CHANGED
|
@@ -21,7 +21,7 @@ export var CheckIcon = /*#__PURE__*/React.forwardRef(function CheckIcon(_ref, re
|
|
|
21
21
|
return /*#__PURE__*/React.createElement(SvgIcon, _extends({
|
|
22
22
|
size: size,
|
|
23
23
|
variant: variant,
|
|
24
|
-
className: clsx(className
|
|
24
|
+
className: clsx(className, true && 'govgr-svg-icon--check'),
|
|
25
25
|
ref: ref
|
|
26
26
|
}, props), _ref2);
|
|
27
27
|
});
|