@digigov/react-core 0.6.4 → 0.6.5
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/CHANGELOG.md +9 -1
- package/List/index.d.ts +1 -1
- package/List/index.js +2 -1
- package/TableDataCell/index.d.ts +1 -1
- package/TableHeaderCell/index.d.ts +1 -1
- package/es/List/index.js +2 -1
- package/es/index.js +0 -3
- package/esm/List/index.js +2 -1
- package/esm/index.js +1 -4
- package/index.d.ts +0 -3
- package/index.js +0 -24
- package/package.json +2 -2
- package/Dropdown/__snapshots__/index.test.tsx.snap +0 -144
- package/Dropdown/index.d.ts +0 -30
- package/Dropdown/index.js +0 -42
- package/Dropdown/index.test.d.ts +0 -1
- package/Dropdown/index.test.js +0 -101
- package/DropdownButton/__snapshots__/index.test.tsx.snap +0 -375
- package/DropdownButton/index.d.ts +0 -28
- package/DropdownButton/index.js +0 -47
- package/DropdownButton/index.test.d.ts +0 -1
- package/DropdownButton/index.test.js +0 -195
- package/DropdownContent/__snapshots__/index.test.tsx.snap +0 -11
- package/DropdownContent/index.d.ts +0 -9
- package/DropdownContent/index.js +0 -35
- package/DropdownContent/index.test.d.ts +0 -1
- package/DropdownContent/index.test.js +0 -15
- package/es/Dropdown/__snapshots__/index.test.tsx.snap +0 -144
- package/es/Dropdown/index.js +0 -27
- package/es/Dropdown/index.test.js +0 -95
- package/es/DropdownButton/__snapshots__/index.test.tsx.snap +0 -375
- package/es/DropdownButton/index.js +0 -31
- package/es/DropdownButton/index.test.js +0 -189
- package/es/DropdownContent/__snapshots__/index.test.tsx.snap +0 -11
- package/es/DropdownContent/index.js +0 -20
- package/es/DropdownContent/index.test.js +0 -9
- package/esm/Dropdown/__snapshots__/index.test.tsx.snap +0 -144
- package/esm/Dropdown/index.js +0 -27
- package/esm/Dropdown/index.test.js +0 -95
- package/esm/DropdownButton/__snapshots__/index.test.tsx.snap +0 -375
- package/esm/DropdownButton/index.js +0 -31
- package/esm/DropdownButton/index.test.js +0 -189
- package/esm/DropdownContent/__snapshots__/index.test.tsx.snap +0 -11
- package/esm/DropdownContent/index.js +0 -20
- package/esm/DropdownContent/index.test.js +0 -9
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { mount } from 'enzyme';
|
|
3
|
-
import DropdownButton from '@digigov/react-core/DropdownButton';
|
|
4
|
-
|
|
5
|
-
var _ref = /*#__PURE__*/React.createElement(DropdownButton, null, "hello");
|
|
6
|
-
|
|
7
|
-
it('renders the DropdownButton with no props', function () {
|
|
8
|
-
expect(mount(_ref)).toMatchSnapshot();
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
var _ref2 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
12
|
-
color: "primary"
|
|
13
|
-
}, "hello");
|
|
14
|
-
|
|
15
|
-
it('renders the DropdownButton with color=primary', function () {
|
|
16
|
-
expect(mount(_ref2)).toMatchSnapshot();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
var _ref3 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
20
|
-
color: "secondary"
|
|
21
|
-
}, "hello");
|
|
22
|
-
|
|
23
|
-
it('renders the DropdownButton with color=secondary', function () {
|
|
24
|
-
expect(mount(_ref3)).toMatchSnapshot();
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
var _ref4 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
28
|
-
variant: "button"
|
|
29
|
-
}, "hello");
|
|
30
|
-
|
|
31
|
-
it('renders the DropdownButton with variant=button', function () {
|
|
32
|
-
expect(mount(_ref4)).toMatchSnapshot();
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
var _ref5 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
36
|
-
variant: "link"
|
|
37
|
-
}, "hello");
|
|
38
|
-
|
|
39
|
-
it('renders the DropdownButton with variant=link', function () {
|
|
40
|
-
expect(mount(_ref5)).toMatchSnapshot();
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
var _ref6 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
44
|
-
arrow: false
|
|
45
|
-
}, "hello");
|
|
46
|
-
|
|
47
|
-
it('renders the DropdownButton with arrow=false', function () {
|
|
48
|
-
expect(mount(_ref6)).toMatchSnapshot();
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
var _ref7 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
52
|
-
arrow: true
|
|
53
|
-
}, "hello");
|
|
54
|
-
|
|
55
|
-
it('renders the DropdownButton with arrow=true', function () {
|
|
56
|
-
expect(mount(_ref7)).toMatchSnapshot();
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
var _ref8 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
60
|
-
color: "primary",
|
|
61
|
-
variant: "button"
|
|
62
|
-
}, "hello");
|
|
63
|
-
|
|
64
|
-
it('renders the DropdownButton with color=primary and variant="button"', function () {
|
|
65
|
-
expect(mount(_ref8)).toMatchSnapshot();
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
var _ref9 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
69
|
-
color: "primary",
|
|
70
|
-
variant: "link"
|
|
71
|
-
}, "hello");
|
|
72
|
-
|
|
73
|
-
it('renders the DropdownButton with color=primary and variant="link"', function () {
|
|
74
|
-
expect(mount(_ref9)).toMatchSnapshot();
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
var _ref10 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
78
|
-
color: "primary",
|
|
79
|
-
arrow: false
|
|
80
|
-
}, "hello");
|
|
81
|
-
|
|
82
|
-
it('renders the DropdownButton with color=primary and arrow={false}', function () {
|
|
83
|
-
expect(mount(_ref10)).toMatchSnapshot();
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
var _ref11 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
87
|
-
color: "primary",
|
|
88
|
-
arrow: true
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
it('renders the DropdownButton with color=primary and arrow={true}', function () {
|
|
92
|
-
expect(mount(_ref11)).toMatchSnapshot();
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
var _ref12 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
96
|
-
color: "secondary",
|
|
97
|
-
variant: "button"
|
|
98
|
-
}, "hello");
|
|
99
|
-
|
|
100
|
-
it('renders the DropdownButton with color=secondary and variant="button"', function () {
|
|
101
|
-
expect(mount(_ref12)).toMatchSnapshot();
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
var _ref13 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
105
|
-
color: "secondary",
|
|
106
|
-
variant: "link"
|
|
107
|
-
}, "hello");
|
|
108
|
-
|
|
109
|
-
it('renders the DropdownButton with color=primary and variant="link"', function () {
|
|
110
|
-
expect(mount(_ref13)).toMatchSnapshot();
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
var _ref14 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
114
|
-
color: "secondary",
|
|
115
|
-
arrow: false
|
|
116
|
-
}, "hello");
|
|
117
|
-
|
|
118
|
-
it('renders the DropdownButton with color=secondary and arrow={false}', function () {
|
|
119
|
-
expect(mount(_ref14)).toMatchSnapshot();
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
var _ref15 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
123
|
-
color: "secondary",
|
|
124
|
-
arrow: true
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
it('renders the DropdownButton with color=secondary and arrow={true}', function () {
|
|
128
|
-
expect(mount(_ref15)).toMatchSnapshot();
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
var _ref16 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
132
|
-
color: "primary",
|
|
133
|
-
variant: "button",
|
|
134
|
-
arrow: false
|
|
135
|
-
}, "hello");
|
|
136
|
-
|
|
137
|
-
it('renders the DropdownButton with color=primary variant="button" and arrow={false}', function () {
|
|
138
|
-
expect(mount(_ref16)).toMatchSnapshot();
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
var _ref17 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
142
|
-
color: "primary",
|
|
143
|
-
variant: "button",
|
|
144
|
-
arrow: true
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
it('renders the DropdownButton with color=primary variant="button" arrow={true}', function () {
|
|
148
|
-
expect(mount(_ref17)).toMatchSnapshot();
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
var _ref18 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
152
|
-
color: "primary",
|
|
153
|
-
variant: "link",
|
|
154
|
-
arrow: true
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
it('renders the DropdownButton with color=primary variant="link" arrow={true}', function () {
|
|
158
|
-
expect(mount(_ref18)).toMatchSnapshot();
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
var _ref19 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
162
|
-
color: "primary",
|
|
163
|
-
variant: "link",
|
|
164
|
-
arrow: false
|
|
165
|
-
}, "hello");
|
|
166
|
-
|
|
167
|
-
it('renders the DropdownButton with color=primary variant="link" arrow={false}', function () {
|
|
168
|
-
expect(mount(_ref19)).toMatchSnapshot();
|
|
169
|
-
});
|
|
170
|
-
|
|
171
|
-
var _ref20 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
172
|
-
color: "warning",
|
|
173
|
-
variant: "link",
|
|
174
|
-
arrow: false
|
|
175
|
-
}, "hello");
|
|
176
|
-
|
|
177
|
-
it('renders the DropdownButton with color=warning variant="button" arrow={false}', function () {
|
|
178
|
-
expect(mount(_ref20)).toMatchSnapshot();
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
var _ref21 = /*#__PURE__*/React.createElement(DropdownButton, {
|
|
182
|
-
color: "warning",
|
|
183
|
-
variant: "link",
|
|
184
|
-
arrow: true
|
|
185
|
-
}, "hello");
|
|
186
|
-
|
|
187
|
-
it('renders the DropdownButton with color=warning variant="button" arrow={true}', function () {
|
|
188
|
-
expect(mount(_ref21)).toMatchSnapshot();
|
|
189
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
* You should use DropdownContent component inside Dropdown component.
|
|
9
|
-
*/
|
|
10
|
-
export var DropdownContent = /*#__PURE__*/React.forwardRef(function DropdownContent(_ref, ref) {
|
|
11
|
-
var className = _ref.className,
|
|
12
|
-
children = _ref.children,
|
|
13
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
-
|
|
15
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
16
|
-
ref: ref,
|
|
17
|
-
className: clsx(className, true && 'govgr-dropdown__content')
|
|
18
|
-
}, props), children);
|
|
19
|
-
});
|
|
20
|
-
export default DropdownContent;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { mount } from 'enzyme';
|
|
3
|
-
import DropdownContent from '@digigov/react-core/DropdownContent';
|
|
4
|
-
|
|
5
|
-
var _ref = /*#__PURE__*/React.createElement(DropdownContent, null, "hello");
|
|
6
|
-
|
|
7
|
-
it('renders the DropdownContent with no props', function () {
|
|
8
|
-
expect(mount(_ref)).toMatchSnapshot();
|
|
9
|
-
});
|