@digigov/react-core 0.10.2 → 0.13.0
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/AccordionControls/__snapshots__/index.test.tsx.snap +13 -0
- package/AccordionSection/__snapshots__/index.test.tsx.snap +9 -7
- package/AccordionSectionHeader/__snapshots__/index.test.tsx.snap +2 -2
- package/AccordionSectionHeader/index.d.ts +1 -1
- package/AccordionSectionHeader/index.js +1 -1
- package/AccordionSectionSummary/__snapshots__/index.test.tsx.snap +11 -0
- package/AccordionSectionSummary/index.d.ts +9 -0
- package/AccordionSectionSummary/index.js +35 -0
- package/AccordionSectionSummary/index.test.d.ts +1 -0
- package/AccordionSectionSummary/index.test.js +15 -0
- package/AccordionSectionSummaryHeading/__snapshots__/index.test.tsx.snap +15 -0
- package/AccordionSectionSummaryHeading/index.d.ts +9 -0
- package/AccordionSectionSummaryHeading/index.js +37 -0
- package/AccordionSectionSummaryHeading/index.test.d.ts +1 -0
- package/AccordionSectionSummaryHeading/index.test.js +15 -0
- package/CHANGELOG.md +28 -1
- package/Card/__snapshots__/index.test.tsx.snap +118 -0
- package/Card/index.d.ts +14 -2
- package/Card/index.js +4 -2
- package/Card/index.test.js +65 -3
- package/Grid/index.d.ts +1 -1
- package/Grid/index.js +1 -1
- package/List/__snapshots__/index.test.tsx.snap +15 -15
- package/List/index.d.ts +2 -2
- package/List/index.js +2 -2
- package/PhaseBannerHeaderContainer/__snapshots__/inde.test.tsx.snap +11 -0
- package/PhaseBannerHeaderContainer/inde.test.d.ts +1 -0
- package/PhaseBannerHeaderContainer/inde.test.js +15 -0
- package/PhaseBannerHeaderContainer/index.d.ts +8 -0
- package/PhaseBannerHeaderContainer/index.js +32 -0
- package/TableContainer/__snapshots__/index.test.tsx.snap +23 -0
- package/TableContainer/index.d.ts +13 -0
- package/TableContainer/index.js +37 -0
- package/TableContainer/index.test.d.ts +1 -0
- package/TableContainer/index.test.js +23 -0
- package/es/AccordionControls/__snapshots__/index.test.tsx.snap +13 -0
- package/es/AccordionSection/__snapshots__/index.test.tsx.snap +9 -7
- package/es/AccordionSectionHeader/__snapshots__/index.test.tsx.snap +2 -2
- package/es/AccordionSectionHeader/index.js +1 -1
- package/es/AccordionSectionSummary/__snapshots__/index.test.tsx.snap +11 -0
- package/es/AccordionSectionSummary/index.js +20 -0
- package/es/AccordionSectionSummary/index.test.js +9 -0
- package/es/AccordionSectionSummaryHeading/__snapshots__/index.test.tsx.snap +15 -0
- package/es/AccordionSectionSummaryHeading/index.js +22 -0
- package/es/AccordionSectionSummaryHeading/index.test.js +9 -0
- package/es/Card/__snapshots__/index.test.tsx.snap +118 -0
- package/es/Card/index.js +4 -2
- package/es/Card/index.test.js +65 -3
- package/es/Grid/index.js +1 -1
- package/es/List/__snapshots__/index.test.tsx.snap +15 -15
- package/es/List/index.js +2 -2
- package/es/PhaseBannerHeaderContainer/__snapshots__/inde.test.tsx.snap +11 -0
- package/es/PhaseBannerHeaderContainer/inde.test.js +9 -0
- package/es/PhaseBannerHeaderContainer/index.js +16 -0
- package/es/TableContainer/__snapshots__/index.test.tsx.snap +23 -0
- package/es/TableContainer/index.js +22 -0
- package/es/TableContainer/index.test.js +17 -0
- package/es/index.js +4 -0
- package/esm/AccordionControls/__snapshots__/index.test.tsx.snap +13 -0
- package/esm/AccordionSection/__snapshots__/index.test.tsx.snap +9 -7
- package/esm/AccordionSectionHeader/__snapshots__/index.test.tsx.snap +2 -2
- package/esm/AccordionSectionHeader/index.js +1 -1
- package/esm/AccordionSectionSummary/__snapshots__/index.test.tsx.snap +11 -0
- package/esm/AccordionSectionSummary/index.js +20 -0
- package/esm/AccordionSectionSummary/index.test.js +9 -0
- package/esm/AccordionSectionSummaryHeading/__snapshots__/index.test.tsx.snap +15 -0
- package/esm/AccordionSectionSummaryHeading/index.js +22 -0
- package/esm/AccordionSectionSummaryHeading/index.test.js +9 -0
- package/esm/Card/__snapshots__/index.test.tsx.snap +118 -0
- package/esm/Card/index.js +4 -2
- package/esm/Card/index.test.js +65 -3
- package/esm/Grid/index.js +1 -1
- package/esm/List/__snapshots__/index.test.tsx.snap +15 -15
- package/esm/List/index.js +2 -2
- package/esm/PhaseBannerHeaderContainer/__snapshots__/inde.test.tsx.snap +11 -0
- package/esm/PhaseBannerHeaderContainer/inde.test.js +9 -0
- package/esm/PhaseBannerHeaderContainer/index.js +16 -0
- package/esm/TableContainer/__snapshots__/index.test.tsx.snap +23 -0
- package/esm/TableContainer/index.js +22 -0
- package/esm/TableContainer/index.test.js +17 -0
- package/esm/index.js +5 -1
- package/index.d.ts +4 -0
- package/index.js +32 -0
- package/package.json +2 -2
package/Grid/index.js
CHANGED
|
@@ -37,7 +37,7 @@ var Grid = /*#__PURE__*/_react["default"].forwardRef(function Grid(_ref, ref) {
|
|
|
37
37
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
38
38
|
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
39
39
|
ref: ref,
|
|
40
|
-
className: (0, _clsx["default"])(className, container === true && [inline === true && 'govgr-grid-inline', 'govgr-grid'], container && [spacing === 1 && "govgr-grid__gap-1", spacing === 2 && "govgr-grid__gap-2", spacing === 4 && "govgr-grid__gap-4", spacing === 6 && "govgr-grid__gap-6"], item && [xs === 'auto' && "xs:govgr-grid__col-auto", sm === 'auto' && "sm:govgr-grid__col-auto", md === 'auto' && "md:govgr-grid__col-auto", lg === 'auto' && "lg:govgr-grid__col-auto", xl === 'auto' && "xl:govgr-grid__col-auto", xs === 10 && "xs:govgr-grid__col-span-10", xs === 11 && "xs:govgr-grid__col-span-11", xs === 12 && "xs:govgr-grid__col-span-12", sm === 10 && "sm:govgr-grid__col-span-10", sm === 11 && "sm:govgr-grid__col-span-11", sm === 12 && "sm:govgr-grid__col-span-12", md === 10 && "md:govgr-grid__col-span-10", md === 11 && "md:govgr-grid__col-span-11", md === 12 && "md:govgr-grid__col-span-12", lg === 10 && "lg:govgr-grid__col-span-10", lg === 11 && "lg:govgr-grid__col-span-11", lg === 12 && "lg:govgr-grid__col-span-12", xl === 10 && "xl:govgr-grid__col-span-10", xl === 11 && "xl:govgr-grid__col-span-11", xl === 12 && "xl:govgr-grid__col-span-12", xs === 1 && "xs:govgr-grid__col-span-1", xs === 2 && "xs:govgr-grid__col-span-2", xs === 3 && "xs:govgr-grid__col-span-3", xs === 4 && "xs:govgr-grid__col-span-4", xs === 5 && "xs:govgr-grid__col-span-5", xs === 6 && "xs:govgr-grid__col-span-6", xs === 7 && "xs:govgr-grid__col-span-7", xs === 8 && "xs:govgr-grid__col-span-8", xs === 9 && "xs:govgr-grid__col-span-9", sm === 1 && "sm:govgr-grid__col-span-1", sm === 2 && "sm:govgr-grid__col-span-2", sm === 3 && "sm:govgr-grid__col-span-3", sm === 4 && "sm:govgr-grid__col-span-4", sm === 5 && "sm:govgr-grid__col-span-5", sm === 6 && "sm:govgr-grid__col-span-6", sm === 7 && "sm:govgr-grid__col-span-7", sm === 8 && "sm:govgr-grid__col-span-8", sm === 9 && "sm:govgr-grid__col-span-9", md === 1 && "md:govgr-grid__col-span-1", md === 2 && "md:govgr-grid__col-span-2", md === 3 && "md:govgr-grid__col-span-3", md === 4 && "md:govgr-grid__col-span-4", md === 5 && "md:govgr-grid__col-span-5", md === 6 && "md:govgr-grid__col-span-6", md === 7 && "md:govgr-grid__col-span-7", md === 8 && "md:govgr-grid__col-span-8", md === 9 && "md:govgr-grid__col-span-9", lg === 1 && "lg:govgr-grid__col-span-1", lg === 2 && "lg:govgr-grid__col-span-2", lg === 3 && "lg:govgr-grid__col-span-3", lg === 4 && "lg:govgr-grid__col-span-4", lg === 5 && "lg:govgr-grid__col-span-5", lg === 6 && "lg:govgr-grid__col-span-6", lg === 7 && "lg:govgr-grid__col-span-7", lg === 8 && "lg:govgr-grid__col-span-8", lg === 9 && "lg:govgr-grid__col-span-9", xl === 1 && "xl:govgr-grid__col-span-1", xl === 2 && "xl:govgr-grid__col-span-2", xl === 3 && "xl:govgr-grid__col-span-3", xl === 4 && "xl:govgr-grid__col-span-4", xl === 5 && "xl:govgr-grid__col-span-5", xl === 6 && "xl:govgr-grid__col-span-6", xl === 7 && "xl:govgr-grid__col-span-7", xl === 8 && "xl:govgr-grid__col-span-8", xl === 9 && "xl:govgr-grid__col-span-9"])
|
|
40
|
+
className: (0, _clsx["default"])(className, container === true && [inline === true && 'govgr-grid-inline', 'govgr-grid'], container && [spacing === 10 && "govgr-grid__gap-10", spacing === 12 && "govgr-grid__gap-12", spacing === 1 && "govgr-grid__gap-1", spacing === 2 && "govgr-grid__gap-2", spacing === 4 && "govgr-grid__gap-4", spacing === 6 && "govgr-grid__gap-6", spacing === 8 && "govgr-grid__gap-8"], item && [xs === 'auto' && "xs:govgr-grid__col-auto", sm === 'auto' && "sm:govgr-grid__col-auto", md === 'auto' && "md:govgr-grid__col-auto", lg === 'auto' && "lg:govgr-grid__col-auto", xl === 'auto' && "xl:govgr-grid__col-auto", xs === 10 && "xs:govgr-grid__col-span-10", xs === 11 && "xs:govgr-grid__col-span-11", xs === 12 && "xs:govgr-grid__col-span-12", sm === 10 && "sm:govgr-grid__col-span-10", sm === 11 && "sm:govgr-grid__col-span-11", sm === 12 && "sm:govgr-grid__col-span-12", md === 10 && "md:govgr-grid__col-span-10", md === 11 && "md:govgr-grid__col-span-11", md === 12 && "md:govgr-grid__col-span-12", lg === 10 && "lg:govgr-grid__col-span-10", lg === 11 && "lg:govgr-grid__col-span-11", lg === 12 && "lg:govgr-grid__col-span-12", xl === 10 && "xl:govgr-grid__col-span-10", xl === 11 && "xl:govgr-grid__col-span-11", xl === 12 && "xl:govgr-grid__col-span-12", xs === 1 && "xs:govgr-grid__col-span-1", xs === 2 && "xs:govgr-grid__col-span-2", xs === 3 && "xs:govgr-grid__col-span-3", xs === 4 && "xs:govgr-grid__col-span-4", xs === 5 && "xs:govgr-grid__col-span-5", xs === 6 && "xs:govgr-grid__col-span-6", xs === 7 && "xs:govgr-grid__col-span-7", xs === 8 && "xs:govgr-grid__col-span-8", xs === 9 && "xs:govgr-grid__col-span-9", sm === 1 && "sm:govgr-grid__col-span-1", sm === 2 && "sm:govgr-grid__col-span-2", sm === 3 && "sm:govgr-grid__col-span-3", sm === 4 && "sm:govgr-grid__col-span-4", sm === 5 && "sm:govgr-grid__col-span-5", sm === 6 && "sm:govgr-grid__col-span-6", sm === 7 && "sm:govgr-grid__col-span-7", sm === 8 && "sm:govgr-grid__col-span-8", sm === 9 && "sm:govgr-grid__col-span-9", md === 1 && "md:govgr-grid__col-span-1", md === 2 && "md:govgr-grid__col-span-2", md === 3 && "md:govgr-grid__col-span-3", md === 4 && "md:govgr-grid__col-span-4", md === 5 && "md:govgr-grid__col-span-5", md === 6 && "md:govgr-grid__col-span-6", md === 7 && "md:govgr-grid__col-span-7", md === 8 && "md:govgr-grid__col-span-8", md === 9 && "md:govgr-grid__col-span-9", lg === 1 && "lg:govgr-grid__col-span-1", lg === 2 && "lg:govgr-grid__col-span-2", lg === 3 && "lg:govgr-grid__col-span-3", lg === 4 && "lg:govgr-grid__col-span-4", lg === 5 && "lg:govgr-grid__col-span-5", lg === 6 && "lg:govgr-grid__col-span-6", lg === 7 && "lg:govgr-grid__col-span-7", lg === 8 && "lg:govgr-grid__col-span-8", lg === 9 && "lg:govgr-grid__col-span-9", xl === 1 && "xl:govgr-grid__col-span-1", xl === 2 && "xl:govgr-grid__col-span-2", xl === 3 && "xl:govgr-grid__col-span-3", xl === 4 && "xl:govgr-grid__col-span-4", xl === 5 && "xl:govgr-grid__col-span-5", xl === 6 && "xl:govgr-grid__col-span-6", xl === 7 && "xl:govgr-grid__col-span-7", xl === 8 && "xl:govgr-grid__col-span-8", xl === 9 && "xl:govgr-grid__col-span-9"])
|
|
41
41
|
}, props), children);
|
|
42
42
|
});
|
|
43
43
|
|
|
@@ -4,11 +4,11 @@ exports[`renders the List with listStyle=bullet 1`] = `
|
|
|
4
4
|
<ForwardRef(List)
|
|
5
5
|
listStyle="bullet"
|
|
6
6
|
>
|
|
7
|
-
<
|
|
7
|
+
<ol
|
|
8
8
|
className="govgr-list--bullet govgr-list"
|
|
9
9
|
>
|
|
10
10
|
hello
|
|
11
|
-
</
|
|
11
|
+
</ol>
|
|
12
12
|
</ForwardRef(List)>
|
|
13
13
|
`;
|
|
14
14
|
|
|
@@ -16,7 +16,7 @@ exports[`renders the List with listStyle=bullet 2`] = `
|
|
|
16
16
|
<ForwardRef(List)
|
|
17
17
|
listStyle="bullet"
|
|
18
18
|
>
|
|
19
|
-
<
|
|
19
|
+
<ol
|
|
20
20
|
className="govgr-list--bullet govgr-list"
|
|
21
21
|
>
|
|
22
22
|
<ForwardRef(ListItem)>
|
|
@@ -33,7 +33,7 @@ exports[`renders the List with listStyle=bullet 2`] = `
|
|
|
33
33
|
hello Katerina
|
|
34
34
|
</li>
|
|
35
35
|
</ForwardRef(ListItem)>
|
|
36
|
-
</
|
|
36
|
+
</ol>
|
|
37
37
|
</ForwardRef(List)>
|
|
38
38
|
`;
|
|
39
39
|
|
|
@@ -42,7 +42,7 @@ exports[`renders the List with listStyle=bullet and spaced 1`] = `
|
|
|
42
42
|
listStyle="bullet"
|
|
43
43
|
spaced={true}
|
|
44
44
|
>
|
|
45
|
-
<
|
|
45
|
+
<ol
|
|
46
46
|
className="govgr-list--bullet govgr-list--spaced govgr-list"
|
|
47
47
|
>
|
|
48
48
|
<ForwardRef(ListItem)>
|
|
@@ -59,7 +59,7 @@ exports[`renders the List with listStyle=bullet and spaced 1`] = `
|
|
|
59
59
|
hello Katerina
|
|
60
60
|
</li>
|
|
61
61
|
</ForwardRef(ListItem)>
|
|
62
|
-
</
|
|
62
|
+
</ol>
|
|
63
63
|
</ForwardRef(List)>
|
|
64
64
|
`;
|
|
65
65
|
|
|
@@ -67,11 +67,11 @@ exports[`renders the List with listStyle=number 1`] = `
|
|
|
67
67
|
<ForwardRef(List)
|
|
68
68
|
listStyle="number"
|
|
69
69
|
>
|
|
70
|
-
<
|
|
70
|
+
<ol
|
|
71
71
|
className="govgr-list--number govgr-list"
|
|
72
72
|
>
|
|
73
73
|
hello
|
|
74
|
-
</
|
|
74
|
+
</ol>
|
|
75
75
|
</ForwardRef(List)>
|
|
76
76
|
`;
|
|
77
77
|
|
|
@@ -79,7 +79,7 @@ exports[`renders the List with listStyle=number 2`] = `
|
|
|
79
79
|
<ForwardRef(List)
|
|
80
80
|
listStyle="number"
|
|
81
81
|
>
|
|
82
|
-
<
|
|
82
|
+
<ol
|
|
83
83
|
className="govgr-list--number govgr-list"
|
|
84
84
|
>
|
|
85
85
|
<ForwardRef(ListItem)>
|
|
@@ -96,7 +96,7 @@ exports[`renders the List with listStyle=number 2`] = `
|
|
|
96
96
|
hello Katerina
|
|
97
97
|
</li>
|
|
98
98
|
</ForwardRef(ListItem)>
|
|
99
|
-
</
|
|
99
|
+
</ol>
|
|
100
100
|
</ForwardRef(List)>
|
|
101
101
|
`;
|
|
102
102
|
|
|
@@ -105,7 +105,7 @@ exports[`renders the List with listStyle=number and spaced 1`] = `
|
|
|
105
105
|
listStyle="number"
|
|
106
106
|
spaced={true}
|
|
107
107
|
>
|
|
108
|
-
<
|
|
108
|
+
<ol
|
|
109
109
|
className="govgr-list--number govgr-list--spaced govgr-list"
|
|
110
110
|
>
|
|
111
111
|
<ForwardRef(ListItem)>
|
|
@@ -122,16 +122,16 @@ exports[`renders the List with listStyle=number and spaced 1`] = `
|
|
|
122
122
|
hello Katerina
|
|
123
123
|
</li>
|
|
124
124
|
</ForwardRef(ListItem)>
|
|
125
|
-
</
|
|
125
|
+
</ol>
|
|
126
126
|
</ForwardRef(List)>
|
|
127
127
|
`;
|
|
128
128
|
|
|
129
129
|
exports[`renders the List with no props 1`] = `
|
|
130
130
|
<ForwardRef(List)>
|
|
131
|
-
<
|
|
132
|
-
className="govgr-list"
|
|
131
|
+
<ol
|
|
132
|
+
className="govgr-list--bullet govgr-list"
|
|
133
133
|
>
|
|
134
134
|
hello
|
|
135
|
-
</
|
|
135
|
+
</ol>
|
|
136
136
|
</ForwardRef(List)>
|
|
137
137
|
`;
|
package/List/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare type UlElementAttributes = JSX.IntrinsicElements['
|
|
2
|
+
declare type UlElementAttributes = JSX.IntrinsicElements['ol'];
|
|
3
3
|
export interface ListProps extends UlElementAttributes {
|
|
4
4
|
/**
|
|
5
5
|
* listStyle is optional. By default, the list style is none.
|
|
@@ -14,5 +14,5 @@ export interface ListProps extends UlElementAttributes {
|
|
|
14
14
|
* List component is used for listing items.
|
|
15
15
|
* This component must contain ListItem component.
|
|
16
16
|
*/
|
|
17
|
-
export declare const List: React.ForwardRefExoticComponent<Pick<ListProps, "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" | "listStyle" | "spaced"> & React.RefAttributes<
|
|
17
|
+
export declare const List: React.ForwardRefExoticComponent<Pick<ListProps, "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" | "type" | "reversed" | "start" | "listStyle" | "spaced"> & React.RefAttributes<HTMLOListElement>>;
|
|
18
18
|
export default List;
|
package/List/index.js
CHANGED
|
@@ -23,13 +23,13 @@ var _excluded = ["listStyle", "spaced", "className", "children"];
|
|
|
23
23
|
*/
|
|
24
24
|
var List = /*#__PURE__*/_react["default"].forwardRef(function List(_ref, ref) {
|
|
25
25
|
var _ref$listStyle = _ref.listStyle,
|
|
26
|
-
listStyle = _ref$listStyle === void 0 ? '
|
|
26
|
+
listStyle = _ref$listStyle === void 0 ? 'none' : _ref$listStyle,
|
|
27
27
|
_ref$spaced = _ref.spaced,
|
|
28
28
|
spaced = _ref$spaced === void 0 ? false : _ref$spaced,
|
|
29
29
|
className = _ref.className,
|
|
30
30
|
children = _ref.children,
|
|
31
31
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
32
|
-
return /*#__PURE__*/_react["default"].createElement("
|
|
32
|
+
return /*#__PURE__*/_react["default"].createElement("ol", (0, _extends2["default"])({
|
|
33
33
|
ref: ref,
|
|
34
34
|
className: (0, _clsx["default"])(className, listStyle === 'bullet' && 'govgr-list--bullet', listStyle === 'number' && 'govgr-list--number', spaced === true && 'govgr-list--spaced', true && 'govgr-list')
|
|
35
35
|
}, props), children);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the PhaseBannerHeaderContainer with no props 1`] = `
|
|
4
|
+
<ForwardRef(PhaseBannerHeaderContainer)>
|
|
5
|
+
<div
|
|
6
|
+
className="govgr-phase-banner_header"
|
|
7
|
+
>
|
|
8
|
+
hello
|
|
9
|
+
</div>
|
|
10
|
+
</ForwardRef(PhaseBannerHeaderContainer)>
|
|
11
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
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 _PhaseBannerHeaderContainer = _interopRequireDefault(require("@digigov/react-core/PhaseBannerHeaderContainer"));
|
|
10
|
+
|
|
11
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_PhaseBannerHeaderContainer["default"], null, "hello");
|
|
12
|
+
|
|
13
|
+
it('renders the PhaseBannerHeaderContainer with no props', function () {
|
|
14
|
+
expect((0, _enzyme.mount)(_ref)).toMatchSnapshot();
|
|
15
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type DivElementAttributes = JSX.IntrinsicElements['div'];
|
|
3
|
+
export interface PhaseBannerHeaderContainerProps extends DivElementAttributes {
|
|
4
|
+
tag?: string;
|
|
5
|
+
text?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const PhaseBannerHeaderContainer: React.ForwardRefExoticComponent<Pick<PhaseBannerHeaderContainerProps, "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" | "text" | "tag"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export default PhaseBannerHeaderContainer;
|
|
@@ -0,0 +1,32 @@
|
|
|
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.PhaseBannerHeaderContainer = 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 _clsx = _interopRequireDefault(require("clsx"));
|
|
17
|
+
|
|
18
|
+
var _excluded = ["children"];
|
|
19
|
+
|
|
20
|
+
var PhaseBannerHeaderContainer = /*#__PURE__*/_react["default"].forwardRef(function PhaseBannerHeaderContainer(_ref, ref) {
|
|
21
|
+
var children = _ref.children,
|
|
22
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
23
|
+
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
24
|
+
ref: ref
|
|
25
|
+
}, props, {
|
|
26
|
+
className: (0, _clsx["default"])(true && 'govgr-phase-banner_header')
|
|
27
|
+
}), children);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
exports.PhaseBannerHeaderContainer = PhaseBannerHeaderContainer;
|
|
31
|
+
var _default = PhaseBannerHeaderContainer;
|
|
32
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the TableContainer with border prop 1`] = `
|
|
4
|
+
<ForwardRef(TableContainer)
|
|
5
|
+
border={true}
|
|
6
|
+
>
|
|
7
|
+
<div
|
|
8
|
+
className="govgr-table-container--border govgr-table-container"
|
|
9
|
+
>
|
|
10
|
+
hello
|
|
11
|
+
</div>
|
|
12
|
+
</ForwardRef(TableContainer)>
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
exports[`renders the TableContainer with no props 1`] = `
|
|
16
|
+
<ForwardRef(TableContainer)>
|
|
17
|
+
<div
|
|
18
|
+
className="govgr-table-container"
|
|
19
|
+
>
|
|
20
|
+
hello
|
|
21
|
+
</div>
|
|
22
|
+
</ForwardRef(TableContainer)>
|
|
23
|
+
`;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type DivElementAttributes = JSX.IntrinsicElements['div'];
|
|
3
|
+
export interface TableContainerProps extends DivElementAttributes {
|
|
4
|
+
/**
|
|
5
|
+
* border is optional. Set to true if you need a border for the Table.
|
|
6
|
+
*/
|
|
7
|
+
border?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Use TableContainer as a wrapper for a Table. It is used when the table is wider that the viewport width.
|
|
11
|
+
*/
|
|
12
|
+
export declare const TableContainer: React.ForwardRefExoticComponent<Pick<TableContainerProps, "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<HTMLDivElement>>;
|
|
13
|
+
export default TableContainer;
|
|
@@ -0,0 +1,37 @@
|
|
|
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.TableContainer = 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 _clsx = _interopRequireDefault(require("clsx"));
|
|
17
|
+
|
|
18
|
+
var _excluded = ["border", "className", "children"];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Use TableContainer as a wrapper for a Table. It is used when the table is wider that the viewport width.
|
|
22
|
+
*/
|
|
23
|
+
var TableContainer = /*#__PURE__*/_react["default"].forwardRef(function TableContainer(_ref, ref) {
|
|
24
|
+
var _ref$border = _ref.border,
|
|
25
|
+
border = _ref$border === void 0 ? false : _ref$border,
|
|
26
|
+
className = _ref.className,
|
|
27
|
+
children = _ref.children,
|
|
28
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
29
|
+
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
30
|
+
ref: ref,
|
|
31
|
+
className: (0, _clsx["default"])(className, border && 'govgr-table-container--border', true && 'govgr-table-container')
|
|
32
|
+
}, props), children);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
exports.TableContainer = TableContainer;
|
|
36
|
+
var _default = TableContainer;
|
|
37
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
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 _TableContainer = _interopRequireDefault(require("@digigov/react-core/TableContainer"));
|
|
10
|
+
|
|
11
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_TableContainer["default"], null, "hello");
|
|
12
|
+
|
|
13
|
+
it('renders the TableContainer with no props', function () {
|
|
14
|
+
expect((0, _enzyme.mount)(_ref)).toMatchSnapshot();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
var _ref2 = /*#__PURE__*/_react["default"].createElement(_TableContainer["default"], {
|
|
18
|
+
border: true
|
|
19
|
+
}, "hello");
|
|
20
|
+
|
|
21
|
+
it('renders the TableContainer with border prop', function () {
|
|
22
|
+
expect((0, _enzyme.mount)(_ref2)).toMatchSnapshot();
|
|
23
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the AccordionControls with button 1`] = `
|
|
4
|
+
<ForwardRef(AccordionControls)>
|
|
5
|
+
<div
|
|
6
|
+
className="govgr-accordion__controls"
|
|
7
|
+
>
|
|
8
|
+
<button>
|
|
9
|
+
open all
|
|
10
|
+
</button>
|
|
11
|
+
</div>
|
|
12
|
+
</ForwardRef(AccordionControls)>
|
|
13
|
+
`;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`renders the AccordionSection with no props 1`] = `
|
|
4
4
|
<ForwardRef(AccordionSection)>
|
|
5
|
-
<
|
|
5
|
+
<details
|
|
6
6
|
className="govgr-accordion__section"
|
|
7
7
|
>
|
|
8
8
|
hello
|
|
9
|
-
</
|
|
9
|
+
</details>
|
|
10
10
|
</ForwardRef(AccordionSection)>
|
|
11
11
|
`;
|
|
12
12
|
|
|
@@ -14,11 +14,12 @@ exports[`renders the AccordionSection with open=false 1`] = `
|
|
|
14
14
|
<ForwardRef(AccordionSection)
|
|
15
15
|
open={false}
|
|
16
16
|
>
|
|
17
|
-
<
|
|
17
|
+
<details
|
|
18
18
|
className="govgr-accordion__section"
|
|
19
|
+
open={false}
|
|
19
20
|
>
|
|
20
21
|
hello
|
|
21
|
-
</
|
|
22
|
+
</details>
|
|
22
23
|
</ForwardRef(AccordionSection)>
|
|
23
24
|
`;
|
|
24
25
|
|
|
@@ -26,10 +27,11 @@ exports[`renders the AccordionSection with open=true 1`] = `
|
|
|
26
27
|
<ForwardRef(AccordionSection)
|
|
27
28
|
open={true}
|
|
28
29
|
>
|
|
29
|
-
<
|
|
30
|
-
className="govgr-accordion__section
|
|
30
|
+
<details
|
|
31
|
+
className="govgr-accordion__section"
|
|
32
|
+
open={true}
|
|
31
33
|
>
|
|
32
34
|
hello
|
|
33
|
-
</
|
|
35
|
+
</details>
|
|
34
36
|
</ForwardRef(AccordionSection)>
|
|
35
37
|
`;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`renders the AccordionSectionHeader with no props 1`] = `
|
|
4
4
|
<ForwardRef(AccordionSectionHeader)>
|
|
5
|
-
<
|
|
5
|
+
<summary
|
|
6
6
|
className="govgr-accordion__section-header"
|
|
7
7
|
>
|
|
8
8
|
<h2
|
|
@@ -14,6 +14,6 @@ exports[`renders the AccordionSectionHeader with no props 1`] = `
|
|
|
14
14
|
hello
|
|
15
15
|
</span>
|
|
16
16
|
</h2>
|
|
17
|
-
</
|
|
17
|
+
</summary>
|
|
18
18
|
</ForwardRef(AccordionSectionHeader)>
|
|
19
19
|
`;
|
|
@@ -5,7 +5,7 @@ import React from 'react';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* AccordionSectionHeader
|
|
8
|
+
* AccordionSectionHeader will be deprecated and implemented using AccordionSectionSummary and AccordionSectionSummaryHeading.
|
|
9
9
|
*/
|
|
10
10
|
export var AccordionSectionHeader = /*#__PURE__*/React.forwardRef(function AccordionSectionHeader(_ref, ref) {
|
|
11
11
|
var className = _ref.className,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the AccordionSectionSummary with no props 1`] = `
|
|
4
|
+
<ForwardRef(AccordionSectionSummary)>
|
|
5
|
+
<summary
|
|
6
|
+
className="govgr-accordion__section-summary"
|
|
7
|
+
>
|
|
8
|
+
hello
|
|
9
|
+
</summary>
|
|
10
|
+
</ForwardRef(AccordionSectionSummary)>
|
|
11
|
+
`;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["className", "children"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* AccordionSectionSummary is used as a wrapper component for AccordionSectionSummaryHeading.
|
|
9
|
+
*/
|
|
10
|
+
export var AccordionSectionSummary = /*#__PURE__*/React.forwardRef(function AccordionSectionSummary(_ref, ref) {
|
|
11
|
+
var className = _ref.className,
|
|
12
|
+
children = _ref.children,
|
|
13
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
+
|
|
15
|
+
return /*#__PURE__*/React.createElement("summary", _extends({
|
|
16
|
+
ref: ref,
|
|
17
|
+
className: clsx(className, true && 'govgr-accordion__section-summary')
|
|
18
|
+
}, props), children);
|
|
19
|
+
});
|
|
20
|
+
export default AccordionSectionSummary;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
import AccordionSectionSummary from '@digigov/react-core/AccordionSectionSummary';
|
|
4
|
+
|
|
5
|
+
var _ref = /*#__PURE__*/React.createElement(AccordionSectionSummary, null, "hello");
|
|
6
|
+
|
|
7
|
+
it('renders the AccordionSectionSummary with no props', function () {
|
|
8
|
+
expect(mount(_ref)).toMatchSnapshot();
|
|
9
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the AccordionSectionSummaryHeading with no props 1`] = `
|
|
4
|
+
<ForwardRef(AccordionSectionSummaryHeading)>
|
|
5
|
+
<h2
|
|
6
|
+
className="govgr-accordion__section-heading"
|
|
7
|
+
>
|
|
8
|
+
<span
|
|
9
|
+
className="govgr-accordion__section-button"
|
|
10
|
+
>
|
|
11
|
+
hello
|
|
12
|
+
</span>
|
|
13
|
+
</h2>
|
|
14
|
+
</ForwardRef(AccordionSectionSummaryHeading)>
|
|
15
|
+
`;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["className", "children"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* AccordionSectionSummaryHeading should be placed inside AccordionSectionSummary.
|
|
9
|
+
*/
|
|
10
|
+
export var AccordionSectionSummaryHeading = /*#__PURE__*/React.forwardRef(function AccordionSectionSummaryHeading(_ref, ref) {
|
|
11
|
+
var className = _ref.className,
|
|
12
|
+
children = _ref.children,
|
|
13
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
+
|
|
15
|
+
return /*#__PURE__*/React.createElement("h2", _extends({
|
|
16
|
+
ref: ref,
|
|
17
|
+
className: clsx(className, true && 'govgr-accordion__section-heading')
|
|
18
|
+
}, props), /*#__PURE__*/React.createElement("span", {
|
|
19
|
+
className: clsx(true && 'govgr-accordion__section-button')
|
|
20
|
+
}, children));
|
|
21
|
+
});
|
|
22
|
+
export default AccordionSectionSummaryHeading;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
import AccordionSectionSummaryHeading from '@digigov/react-core/AccordionSectionSummaryHeading';
|
|
4
|
+
|
|
5
|
+
var _ref = /*#__PURE__*/React.createElement(AccordionSectionSummaryHeading, null, "hello");
|
|
6
|
+
|
|
7
|
+
it('renders the AccordionSectionSummaryHeading with no props', function () {
|
|
8
|
+
expect(mount(_ref)).toMatchSnapshot();
|
|
9
|
+
});
|