@digigov/react-core 0.21.1 → 0.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AccessibilityIcon/__snapshots__/index.test.tsx.snap +626 -0
- package/AccessibilityIcon/index.d.ts +15 -0
- package/AccessibilityIcon/index.js +52 -0
- package/AccessibilityIcon/index.test.d.ts +1 -0
- package/AccessibilityIcon/index.test.js +137 -0
- package/AccessibilityTextIcon/__snapshots__/index.test.tsx.snap +511 -0
- package/AccessibilityTextIcon/index.d.ts +15 -0
- package/AccessibilityTextIcon/index.js +34 -0
- package/AccessibilityTextIcon/index.test.d.ts +1 -0
- package/AccessibilityTextIcon/index.test.js +129 -0
- package/CHANGELOG.md +14 -1
- package/DetailsSummary/index.d.ts +2 -1
- package/DetailsSummary/index.js +4 -3
- package/FieldContainer/index.js +10 -3
- package/Nav/index.d.ts +16 -1
- package/Nav/index.js +8 -2
- package/SectionBreak/index.d.ts +1 -1
- package/SectionBreak/index.js +4 -2
- package/SvgIcon/index.d.ts +1 -1
- package/es/AccessibilityIcon/__snapshots__/index.test.tsx.snap +626 -0
- package/es/AccessibilityIcon/index.js +36 -0
- package/es/AccessibilityIcon/index.test.js +131 -0
- package/es/AccessibilityTextIcon/__snapshots__/index.test.tsx.snap +511 -0
- package/es/AccessibilityTextIcon/index.js +21 -0
- package/es/AccessibilityTextIcon/index.test.js +123 -0
- package/es/DetailsSummary/index.js +4 -3
- package/es/FieldContainer/index.js +8 -3
- package/es/Nav/index.js +8 -2
- package/es/SectionBreak/index.js +4 -2
- package/es/index.js +2 -0
- package/es/registry.js +4 -0
- package/esm/AccessibilityIcon/__snapshots__/index.test.tsx.snap +626 -0
- package/esm/AccessibilityIcon/index.js +36 -0
- package/esm/AccessibilityIcon/index.test.js +131 -0
- package/esm/AccessibilityTextIcon/__snapshots__/index.test.tsx.snap +511 -0
- package/esm/AccessibilityTextIcon/index.js +21 -0
- package/esm/AccessibilityTextIcon/index.test.js +123 -0
- package/esm/DetailsSummary/index.js +4 -3
- package/esm/FieldContainer/index.js +8 -3
- package/esm/Nav/index.js +8 -2
- package/esm/SectionBreak/index.js +4 -2
- package/esm/index.js +3 -1
- package/esm/registry.js +4 -0
- package/index.d.ts +2 -0
- package/index.js +26 -0
- package/package.json +2 -2
- package/registry.d.ts +2 -0
- package/registry.js +6 -0
- package/src/AccessibilityIcon/__snapshots__/index.test.tsx.snap +626 -0
- package/src/AccessibilityIcon/index.test.tsx +53 -0
- package/src/AccessibilityIcon/index.tsx +41 -0
- package/src/AccessibilityTextIcon/__snapshots__/index.test.tsx.snap +511 -0
- package/src/AccessibilityTextIcon/index.test.tsx +50 -0
- package/src/AccessibilityTextIcon/index.tsx +28 -0
- package/src/DetailsSummary/index.tsx +8 -2
- package/src/FieldContainer/index.tsx +2 -1
- package/src/Nav/index.tsx +29 -2
- package/src/SectionBreak/index.tsx +5 -2
- package/src/SvgIcon/index.tsx +1 -1
- package/src/index.ts +2 -0
- package/src/registry.js +4 -0
|
@@ -0,0 +1,129 @@
|
|
|
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 _AccessibilityTextIcon = _interopRequireDefault(require("@digigov/react-core/AccessibilityTextIcon"));
|
|
10
|
+
|
|
11
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], null);
|
|
12
|
+
|
|
13
|
+
it('renders the AccessibilityTextIcon with no props', function () {
|
|
14
|
+
expect((0, _enzyme.mount)(_ref)).toMatchSnapshot();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
var _ref2 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
|
|
18
|
+
size: "s"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('renders the AccessibilityTextIcon with prop size=s', function () {
|
|
22
|
+
expect((0, _enzyme.mount)(_ref2)).toMatchSnapshot();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
var _ref3 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
|
|
26
|
+
size: "m"
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('renders the AccessibilityTextIcon with prop size=m', function () {
|
|
30
|
+
expect((0, _enzyme.mount)(_ref3)).toMatchSnapshot();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
var _ref4 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
|
|
34
|
+
size: "l"
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('renders the AccessibilityTextIcon with prop size=l', function () {
|
|
38
|
+
expect((0, _enzyme.mount)(_ref4)).toMatchSnapshot();
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
var _ref5 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
|
|
42
|
+
size: "xl"
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it('renders the AccessibilityTextIcon with prop size=xl', function () {
|
|
46
|
+
expect((0, _enzyme.mount)(_ref5)).toMatchSnapshot();
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
var _ref6 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
|
|
50
|
+
variant: "dark"
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it('renders the AccessibilityTextIcon with prop variant=dark', function () {
|
|
54
|
+
expect((0, _enzyme.mount)(_ref6)).toMatchSnapshot();
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
var _ref7 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
|
|
58
|
+
variant: "light"
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it('renders the AccessibilityTextIcon with prop variant=light', function () {
|
|
62
|
+
expect((0, _enzyme.mount)(_ref7)).toMatchSnapshot();
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
var _ref8 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
|
|
66
|
+
variant: "gray"
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it('renders the AccessibilityTextIcon with prop variant=gray', function () {
|
|
70
|
+
expect((0, _enzyme.mount)(_ref8)).toMatchSnapshot();
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
var _ref9 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
|
|
74
|
+
variant: "primary"
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it('renders the AccessibilityTextIcon with prop variant=primary', function () {
|
|
78
|
+
expect((0, _enzyme.mount)(_ref9)).toMatchSnapshot();
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
var _ref10 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
|
|
82
|
+
variant: "success"
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
it('renders the AccessibilityTextIcon with prop variant=success', function () {
|
|
86
|
+
expect((0, _enzyme.mount)(_ref10)).toMatchSnapshot();
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
var _ref11 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
|
|
90
|
+
variant: "warning"
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
it('renders the AccessibilityTextIcon with prop variant=warning', function () {
|
|
94
|
+
expect((0, _enzyme.mount)(_ref11)).toMatchSnapshot();
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
var _ref12 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
|
|
98
|
+
variant: "error"
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it('renders the AccessibilityTextIcon with prop variant=error', function () {
|
|
102
|
+
expect((0, _enzyme.mount)(_ref12)).toMatchSnapshot();
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
var _ref13 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
|
|
106
|
+
variant: "focus"
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
it('renders the AccessibilityTextIcon with prop variant=focus', function () {
|
|
110
|
+
expect((0, _enzyme.mount)(_ref13)).toMatchSnapshot();
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
var _ref14 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
|
|
114
|
+
variant: "warning",
|
|
115
|
+
size: "s"
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
it('renders the AccessibilityTextIcon with prop variant=warning and size=s', function () {
|
|
119
|
+
expect((0, _enzyme.mount)(_ref14)).toMatchSnapshot();
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
var _ref15 = /*#__PURE__*/_react["default"].createElement(_AccessibilityTextIcon["default"], {
|
|
123
|
+
variant: "warning",
|
|
124
|
+
size: "xl"
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
it('renders the AccessibilityTextIcon with prop variant=error and size= xl', function () {
|
|
128
|
+
expect((0, _enzyme.mount)(_ref15)).toMatchSnapshot();
|
|
129
|
+
});
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
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, 03 Apr 2023 11:13:15 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.22.0
|
|
6
|
+
Mon, 03 Apr 2023 11:13:15 GMT
|
|
7
|
+
|
|
8
|
+
### Minor changes
|
|
9
|
+
|
|
10
|
+
- Create AccessibilityIcon
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- add hidden prop in Nav
|
|
15
|
+
- make SectionBreak visible and size small by default
|
|
16
|
+
- Add size prop at DetailsSummary
|
|
4
17
|
|
|
5
18
|
## 0.21.1
|
|
6
19
|
Mon, 13 Mar 2023 10:21:39 GMT
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
export interface DetailsSummaryProps extends BaseProps<'summary'> {
|
|
4
|
+
size?: 'm' | 'l';
|
|
4
5
|
}
|
|
5
6
|
/**
|
|
6
7
|
* Use this inside Details.DetailsSummary will be the text to click on.
|
|
7
8
|
*/
|
|
8
|
-
export declare const DetailsSummary: React.ForwardRefExoticComponent<Pick<DetailsSummaryProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLElement>>;
|
|
9
|
+
export declare const DetailsSummary: React.ForwardRefExoticComponent<Pick<DetailsSummaryProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "size" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLElement>>;
|
|
9
10
|
export default DetailsSummary;
|
package/DetailsSummary/index.js
CHANGED
|
@@ -17,19 +17,20 @@ var _Base = _interopRequireDefault(require("@digigov/react-core/Base"));
|
|
|
17
17
|
|
|
18
18
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
19
19
|
|
|
20
|
-
var _excluded = ["className", "children"];
|
|
20
|
+
var _excluded = ["size", "className", "children"];
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Use this inside Details.DetailsSummary will be the text to click on.
|
|
24
24
|
*/
|
|
25
25
|
var DetailsSummary = /*#__PURE__*/_react["default"].forwardRef(function DetailsSummary(_ref, ref) {
|
|
26
|
-
var
|
|
26
|
+
var size = _ref.size,
|
|
27
|
+
className = _ref.className,
|
|
27
28
|
children = _ref.children,
|
|
28
29
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
29
30
|
return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
|
|
30
31
|
as: "summary",
|
|
31
32
|
ref: ref,
|
|
32
|
-
className: (0, _clsx["default"])(className, true && 'govgr-details__summary')
|
|
33
|
+
className: (0, _clsx["default"])(className, size === 'l' && 'govgr-details__summary--l', true && 'govgr-details__summary')
|
|
33
34
|
}, props), children);
|
|
34
35
|
});
|
|
35
36
|
|
package/FieldContainer/index.js
CHANGED
|
@@ -7,12 +7,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports["default"] = exports.FieldContainer = void 0;
|
|
9
9
|
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
|
|
10
14
|
var _react = _interopRequireDefault(require("react"));
|
|
11
15
|
|
|
12
16
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
13
17
|
|
|
14
18
|
var _Grid = _interopRequireDefault(require("@digigov/react-core/Grid"));
|
|
15
19
|
|
|
20
|
+
var _excluded = ["error", "className", "children", "xs", "md", "lg", "xl"];
|
|
21
|
+
|
|
16
22
|
/**
|
|
17
23
|
* Field component wraps form components such as Checkbox TextInput TextArea etc.
|
|
18
24
|
*/
|
|
@@ -27,8 +33,9 @@ var FieldContainer = /*#__PURE__*/_react["default"].forwardRef(function FieldCon
|
|
|
27
33
|
_ref$lg = _ref.lg,
|
|
28
34
|
lg = _ref$lg === void 0 ? 12 : _ref$lg,
|
|
29
35
|
_ref$xl = _ref.xl,
|
|
30
|
-
xl = _ref$xl === void 0 ? 12 : _ref$xl
|
|
31
|
-
|
|
36
|
+
xl = _ref$xl === void 0 ? 12 : _ref$xl,
|
|
37
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
38
|
+
return /*#__PURE__*/_react["default"].createElement(_Grid["default"], (0, _extends2["default"])({
|
|
32
39
|
ref: ref,
|
|
33
40
|
className: (0, _clsx["default"])(className, error === true && 'govgr-field__error', true && 'govgr-field'),
|
|
34
41
|
item: true,
|
|
@@ -36,7 +43,7 @@ var FieldContainer = /*#__PURE__*/_react["default"].forwardRef(function FieldCon
|
|
|
36
43
|
md: md,
|
|
37
44
|
lg: lg,
|
|
38
45
|
xl: xl
|
|
39
|
-
}, children);
|
|
46
|
+
}, props), children);
|
|
40
47
|
});
|
|
41
48
|
|
|
42
49
|
exports.FieldContainer = FieldContainer;
|
package/Nav/index.d.ts
CHANGED
|
@@ -12,10 +12,25 @@ export interface NavProps extends BaseProps<'nav'> {
|
|
|
12
12
|
* layout is horizontal by default.
|
|
13
13
|
*/
|
|
14
14
|
layout?: 'vertical' | 'horizontal';
|
|
15
|
+
/**
|
|
16
|
+
* hidden is optional.
|
|
17
|
+
* hidden prop hides the nav element when it is called from a navItem.
|
|
18
|
+
*/
|
|
19
|
+
hidden?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* fixed is optional.
|
|
22
|
+
* fixed prop allows element to be positioned relative to the viewport
|
|
23
|
+
*/
|
|
24
|
+
fixed?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* border is optional.
|
|
27
|
+
* border prop contains border-bottom styling.
|
|
28
|
+
*/
|
|
29
|
+
border?: boolean;
|
|
15
30
|
}
|
|
16
31
|
/**
|
|
17
32
|
* Nav is mainly used under the Header.
|
|
18
33
|
* This is a wrapper for the NavList component.
|
|
19
34
|
*/
|
|
20
|
-
export declare const Nav: React.ForwardRefExoticComponent<Pick<NavProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "open" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "layout"> & React.RefAttributes<HTMLElement>>;
|
|
35
|
+
export declare const Nav: React.ForwardRefExoticComponent<Pick<NavProps, "slot" | "style" | "title" | "as" | "fixed" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "open" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "border" | "layout"> & React.RefAttributes<HTMLElement>>;
|
|
21
36
|
export default Nav;
|
package/Nav/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var _Base = _interopRequireDefault(require("@digigov/react-core/Base"));
|
|
|
17
17
|
|
|
18
18
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
19
19
|
|
|
20
|
-
var _excluded = ["className", "open", "layout", "children"];
|
|
20
|
+
var _excluded = ["className", "open", "layout", "hidden", "fixed", "border", "children"];
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Nav is mainly used under the Header.
|
|
@@ -29,12 +29,18 @@ var Nav = /*#__PURE__*/_react["default"].forwardRef(function Nav(_ref, ref) {
|
|
|
29
29
|
open = _ref$open === void 0 ? false : _ref$open,
|
|
30
30
|
_ref$layout = _ref.layout,
|
|
31
31
|
layout = _ref$layout === void 0 ? 'horizontal' : _ref$layout,
|
|
32
|
+
_ref$hidden = _ref.hidden,
|
|
33
|
+
hidden = _ref$hidden === void 0 ? false : _ref$hidden,
|
|
34
|
+
_ref$fixed = _ref.fixed,
|
|
35
|
+
fixed = _ref$fixed === void 0 ? true : _ref$fixed,
|
|
36
|
+
_ref$border = _ref.border,
|
|
37
|
+
border = _ref$border === void 0 ? true : _ref$border,
|
|
32
38
|
children = _ref.children,
|
|
33
39
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
34
40
|
return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
|
|
35
41
|
as: "nav",
|
|
36
42
|
ref: ref,
|
|
37
|
-
className: (0, _clsx["default"])(className, layout === 'horizontal' && 'govgr-nav-horizontal--border', true && 'govgr-horizontal-nav', open && 'govgr-horizontal-nav--open')
|
|
43
|
+
className: (0, _clsx["default"])(className, layout === 'horizontal' && 'govgr-horizontal-nav--order', border && 'govgr-nav-horizontal--border', hidden && 'govgr-horizontal-nav--hidden', fixed && 'govgr-nav-horizontal--fixed', true && 'govgr-horizontal-nav', open && 'govgr-horizontal-nav--open')
|
|
38
44
|
}, props), children);
|
|
39
45
|
});
|
|
40
46
|
|
package/SectionBreak/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface SectionBreakProps extends BaseProps<'hr'> {
|
|
|
9
9
|
/**
|
|
10
10
|
* size is optional and it is about the different size margins.
|
|
11
11
|
*/
|
|
12
|
-
size?: 'xl' | 'l' | 'm';
|
|
12
|
+
size?: 'xl' | 'l' | 'm' | 's';
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* SectionBreak is used to create a thematic break between sections of content.
|
package/SectionBreak/index.js
CHANGED
|
@@ -23,8 +23,10 @@ var _excluded = ["visible", "size", "className"];
|
|
|
23
23
|
* SectionBreak is used to create a thematic break between sections of content.
|
|
24
24
|
*/
|
|
25
25
|
var SectionBreak = /*#__PURE__*/_react["default"].forwardRef(function SectionBreak(_ref, ref) {
|
|
26
|
-
var visible = _ref.visible,
|
|
27
|
-
|
|
26
|
+
var _ref$visible = _ref.visible,
|
|
27
|
+
visible = _ref$visible === void 0 ? true : _ref$visible,
|
|
28
|
+
_ref$size = _ref.size,
|
|
29
|
+
size = _ref$size === void 0 ? 's' : _ref$size,
|
|
28
30
|
className = _ref.className,
|
|
29
31
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
30
32
|
return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
|
package/SvgIcon/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export interface SvgIconProps extends BaseProps<'svg'> {
|
|
|
5
5
|
* size prop declares the size of the svg icon.
|
|
6
6
|
* size is optional. The default value is 'm'.
|
|
7
7
|
*/
|
|
8
|
-
size?: 's' | 'm' | 'l' | 'xl';
|
|
8
|
+
size?: 's' | 'm' | 'l' | 'xl' | 'xxl';
|
|
9
9
|
/**
|
|
10
10
|
* variant property styles svg icon with Gov.gr palette's basic colors.
|
|
11
11
|
* variant property is optional.
|