carbon-react 115.0.2 → 116.0.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/esm/__internal__/radio-button-mapper/radio-button-mapper.component.d.ts +1 -1
- package/esm/components/tile-select/__internal__/accordion/accordion.component.d.ts +10 -0
- package/esm/components/tile-select/__internal__/accordion/accordion.component.js +317 -9
- package/esm/components/tile-select/__internal__/accordion/accordion.style.d.ts +3 -0
- package/esm/components/tile-select/__internal__/accordion/index.d.ts +1 -0
- package/esm/components/tile-select/index.d.ts +4 -2
- package/esm/components/tile-select/index.js +2 -2
- package/esm/components/tile-select/tile-select-group.component.d.ts +25 -0
- package/esm/components/tile-select/tile-select-group.component.js +184 -59
- package/esm/components/tile-select/tile-select.component.d.ts +58 -0
- package/esm/components/tile-select/tile-select.component.js +192 -100
- package/esm/components/tile-select/tile-select.style.d.ts +36 -0
- package/lib/__internal__/radio-button-mapper/radio-button-mapper.component.d.ts +1 -1
- package/lib/components/tile-select/__internal__/accordion/accordion.component.d.ts +10 -0
- package/lib/components/tile-select/__internal__/accordion/accordion.component.js +316 -8
- package/lib/components/tile-select/__internal__/accordion/accordion.style.d.ts +3 -0
- package/lib/components/tile-select/__internal__/accordion/index.d.ts +1 -0
- package/lib/components/tile-select/index.d.ts +4 -2
- package/lib/components/tile-select/index.js +4 -4
- package/lib/components/tile-select/tile-select-group.component.d.ts +25 -0
- package/lib/components/tile-select/tile-select-group.component.js +188 -68
- package/lib/components/tile-select/tile-select.component.d.ts +58 -0
- package/lib/components/tile-select/tile-select.component.js +192 -105
- package/lib/components/tile-select/tile-select.style.d.ts +36 -0
- package/package.json +1 -1
- package/esm/components/tile-select/__internal__/accordion/accordion.d.ts +0 -13
- package/esm/components/tile-select/tile-select-group.d.ts +0 -27
- package/esm/components/tile-select/tile-select.d.ts +0 -51
- package/lib/components/tile-select/__internal__/accordion/accordion.d.ts +0 -13
- package/lib/components/tile-select/tile-select-group.d.ts +0 -27
- package/lib/components/tile-select/tile-select.d.ts +0 -51
|
@@ -15,7 +15,7 @@ export interface RadioButtonMapperProps extends InputEvents {
|
|
|
15
15
|
/** Specifies the name prop to be applied to each button in the group */
|
|
16
16
|
name: string;
|
|
17
17
|
/** Value of the selected RadioButton */
|
|
18
|
-
value?: string;
|
|
18
|
+
value?: string | null;
|
|
19
19
|
}
|
|
20
20
|
export interface MappedChildProps {
|
|
21
21
|
defaultChecked?: boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SpaceProps } from "styled-system";
|
|
3
|
+
export interface AccordionProps extends SpaceProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
expanded?: boolean;
|
|
6
|
+
contentId?: string;
|
|
7
|
+
controlId?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const Accordion: ({ children, expanded, contentId, controlId, }: AccordionProps) => JSX.Element;
|
|
10
|
+
export default Accordion;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useRef, useState } from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { StyledContentContainer, StyledContent } from "./accordion.style";
|
|
4
4
|
import useResizeObserver from "../../../../hooks/__internal__/useResizeObserver";
|
|
@@ -12,11 +12,11 @@ const Accordion = ({
|
|
|
12
12
|
const [contentHeight, setContentHeight] = useState(0);
|
|
13
13
|
const contentRef = useRef(null);
|
|
14
14
|
useResizeObserver(contentRef, () => {
|
|
15
|
-
|
|
15
|
+
// istanbul ignore else
|
|
16
|
+
if (contentRef.current) {
|
|
17
|
+
setContentHeight(contentRef.current.scrollHeight);
|
|
18
|
+
}
|
|
16
19
|
});
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
setContentHeight(contentRef.current.scrollHeight);
|
|
19
|
-
}, [contentRef]);
|
|
20
20
|
return /*#__PURE__*/React.createElement(StyledContentContainer, {
|
|
21
21
|
"aria-expanded": expanded,
|
|
22
22
|
isExpanded: expanded,
|
|
@@ -31,9 +31,317 @@ const Accordion = ({
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
Accordion.propTypes = {
|
|
34
|
-
children: PropTypes.node
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
"children": PropTypes.node,
|
|
35
|
+
"contentId": PropTypes.string,
|
|
36
|
+
"controlId": PropTypes.string,
|
|
37
|
+
"expanded": PropTypes.bool,
|
|
38
|
+
"m": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
39
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
40
|
+
"description": PropTypes.string,
|
|
41
|
+
"toString": PropTypes.func.isRequired,
|
|
42
|
+
"valueOf": PropTypes.func.isRequired
|
|
43
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
44
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
45
|
+
"description": PropTypes.string,
|
|
46
|
+
"toString": PropTypes.func.isRequired,
|
|
47
|
+
"valueOf": PropTypes.func.isRequired
|
|
48
|
+
}), PropTypes.string]),
|
|
49
|
+
"margin": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
50
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
51
|
+
"description": PropTypes.string,
|
|
52
|
+
"toString": PropTypes.func.isRequired,
|
|
53
|
+
"valueOf": PropTypes.func.isRequired
|
|
54
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
55
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
56
|
+
"description": PropTypes.string,
|
|
57
|
+
"toString": PropTypes.func.isRequired,
|
|
58
|
+
"valueOf": PropTypes.func.isRequired
|
|
59
|
+
}), PropTypes.string]),
|
|
60
|
+
"marginBottom": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
61
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
62
|
+
"description": PropTypes.string,
|
|
63
|
+
"toString": PropTypes.func.isRequired,
|
|
64
|
+
"valueOf": PropTypes.func.isRequired
|
|
65
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
66
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
67
|
+
"description": PropTypes.string,
|
|
68
|
+
"toString": PropTypes.func.isRequired,
|
|
69
|
+
"valueOf": PropTypes.func.isRequired
|
|
70
|
+
}), PropTypes.string]),
|
|
71
|
+
"marginLeft": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
72
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
73
|
+
"description": PropTypes.string,
|
|
74
|
+
"toString": PropTypes.func.isRequired,
|
|
75
|
+
"valueOf": PropTypes.func.isRequired
|
|
76
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
77
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
78
|
+
"description": PropTypes.string,
|
|
79
|
+
"toString": PropTypes.func.isRequired,
|
|
80
|
+
"valueOf": PropTypes.func.isRequired
|
|
81
|
+
}), PropTypes.string]),
|
|
82
|
+
"marginRight": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
83
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
84
|
+
"description": PropTypes.string,
|
|
85
|
+
"toString": PropTypes.func.isRequired,
|
|
86
|
+
"valueOf": PropTypes.func.isRequired
|
|
87
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
88
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
89
|
+
"description": PropTypes.string,
|
|
90
|
+
"toString": PropTypes.func.isRequired,
|
|
91
|
+
"valueOf": PropTypes.func.isRequired
|
|
92
|
+
}), PropTypes.string]),
|
|
93
|
+
"marginTop": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
94
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
95
|
+
"description": PropTypes.string,
|
|
96
|
+
"toString": PropTypes.func.isRequired,
|
|
97
|
+
"valueOf": PropTypes.func.isRequired
|
|
98
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
99
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
100
|
+
"description": PropTypes.string,
|
|
101
|
+
"toString": PropTypes.func.isRequired,
|
|
102
|
+
"valueOf": PropTypes.func.isRequired
|
|
103
|
+
}), PropTypes.string]),
|
|
104
|
+
"marginX": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
105
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
106
|
+
"description": PropTypes.string,
|
|
107
|
+
"toString": PropTypes.func.isRequired,
|
|
108
|
+
"valueOf": PropTypes.func.isRequired
|
|
109
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
110
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
111
|
+
"description": PropTypes.string,
|
|
112
|
+
"toString": PropTypes.func.isRequired,
|
|
113
|
+
"valueOf": PropTypes.func.isRequired
|
|
114
|
+
}), PropTypes.string]),
|
|
115
|
+
"marginY": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
116
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
117
|
+
"description": PropTypes.string,
|
|
118
|
+
"toString": PropTypes.func.isRequired,
|
|
119
|
+
"valueOf": PropTypes.func.isRequired
|
|
120
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
121
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
122
|
+
"description": PropTypes.string,
|
|
123
|
+
"toString": PropTypes.func.isRequired,
|
|
124
|
+
"valueOf": PropTypes.func.isRequired
|
|
125
|
+
}), PropTypes.string]),
|
|
126
|
+
"mb": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
127
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
128
|
+
"description": PropTypes.string,
|
|
129
|
+
"toString": PropTypes.func.isRequired,
|
|
130
|
+
"valueOf": PropTypes.func.isRequired
|
|
131
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
132
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
133
|
+
"description": PropTypes.string,
|
|
134
|
+
"toString": PropTypes.func.isRequired,
|
|
135
|
+
"valueOf": PropTypes.func.isRequired
|
|
136
|
+
}), PropTypes.string]),
|
|
137
|
+
"ml": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
138
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
139
|
+
"description": PropTypes.string,
|
|
140
|
+
"toString": PropTypes.func.isRequired,
|
|
141
|
+
"valueOf": PropTypes.func.isRequired
|
|
142
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
143
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
144
|
+
"description": PropTypes.string,
|
|
145
|
+
"toString": PropTypes.func.isRequired,
|
|
146
|
+
"valueOf": PropTypes.func.isRequired
|
|
147
|
+
}), PropTypes.string]),
|
|
148
|
+
"mr": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
149
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
150
|
+
"description": PropTypes.string,
|
|
151
|
+
"toString": PropTypes.func.isRequired,
|
|
152
|
+
"valueOf": PropTypes.func.isRequired
|
|
153
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
154
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
155
|
+
"description": PropTypes.string,
|
|
156
|
+
"toString": PropTypes.func.isRequired,
|
|
157
|
+
"valueOf": PropTypes.func.isRequired
|
|
158
|
+
}), PropTypes.string]),
|
|
159
|
+
"mt": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
160
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
161
|
+
"description": PropTypes.string,
|
|
162
|
+
"toString": PropTypes.func.isRequired,
|
|
163
|
+
"valueOf": PropTypes.func.isRequired
|
|
164
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
165
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
166
|
+
"description": PropTypes.string,
|
|
167
|
+
"toString": PropTypes.func.isRequired,
|
|
168
|
+
"valueOf": PropTypes.func.isRequired
|
|
169
|
+
}), PropTypes.string]),
|
|
170
|
+
"mx": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
171
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
172
|
+
"description": PropTypes.string,
|
|
173
|
+
"toString": PropTypes.func.isRequired,
|
|
174
|
+
"valueOf": PropTypes.func.isRequired
|
|
175
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
176
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
177
|
+
"description": PropTypes.string,
|
|
178
|
+
"toString": PropTypes.func.isRequired,
|
|
179
|
+
"valueOf": PropTypes.func.isRequired
|
|
180
|
+
}), PropTypes.string]),
|
|
181
|
+
"my": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
182
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
183
|
+
"description": PropTypes.string,
|
|
184
|
+
"toString": PropTypes.func.isRequired,
|
|
185
|
+
"valueOf": PropTypes.func.isRequired
|
|
186
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
187
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
188
|
+
"description": PropTypes.string,
|
|
189
|
+
"toString": PropTypes.func.isRequired,
|
|
190
|
+
"valueOf": PropTypes.func.isRequired
|
|
191
|
+
}), PropTypes.string]),
|
|
192
|
+
"p": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
193
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
194
|
+
"description": PropTypes.string,
|
|
195
|
+
"toString": PropTypes.func.isRequired,
|
|
196
|
+
"valueOf": PropTypes.func.isRequired
|
|
197
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
198
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
199
|
+
"description": PropTypes.string,
|
|
200
|
+
"toString": PropTypes.func.isRequired,
|
|
201
|
+
"valueOf": PropTypes.func.isRequired
|
|
202
|
+
}), PropTypes.string]),
|
|
203
|
+
"padding": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
204
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
205
|
+
"description": PropTypes.string,
|
|
206
|
+
"toString": PropTypes.func.isRequired,
|
|
207
|
+
"valueOf": PropTypes.func.isRequired
|
|
208
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
209
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
210
|
+
"description": PropTypes.string,
|
|
211
|
+
"toString": PropTypes.func.isRequired,
|
|
212
|
+
"valueOf": PropTypes.func.isRequired
|
|
213
|
+
}), PropTypes.string]),
|
|
214
|
+
"paddingBottom": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
215
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
216
|
+
"description": PropTypes.string,
|
|
217
|
+
"toString": PropTypes.func.isRequired,
|
|
218
|
+
"valueOf": PropTypes.func.isRequired
|
|
219
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
220
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
221
|
+
"description": PropTypes.string,
|
|
222
|
+
"toString": PropTypes.func.isRequired,
|
|
223
|
+
"valueOf": PropTypes.func.isRequired
|
|
224
|
+
}), PropTypes.string]),
|
|
225
|
+
"paddingLeft": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
226
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
227
|
+
"description": PropTypes.string,
|
|
228
|
+
"toString": PropTypes.func.isRequired,
|
|
229
|
+
"valueOf": PropTypes.func.isRequired
|
|
230
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
231
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
232
|
+
"description": PropTypes.string,
|
|
233
|
+
"toString": PropTypes.func.isRequired,
|
|
234
|
+
"valueOf": PropTypes.func.isRequired
|
|
235
|
+
}), PropTypes.string]),
|
|
236
|
+
"paddingRight": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
237
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
238
|
+
"description": PropTypes.string,
|
|
239
|
+
"toString": PropTypes.func.isRequired,
|
|
240
|
+
"valueOf": PropTypes.func.isRequired
|
|
241
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
242
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
243
|
+
"description": PropTypes.string,
|
|
244
|
+
"toString": PropTypes.func.isRequired,
|
|
245
|
+
"valueOf": PropTypes.func.isRequired
|
|
246
|
+
}), PropTypes.string]),
|
|
247
|
+
"paddingTop": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
248
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
249
|
+
"description": PropTypes.string,
|
|
250
|
+
"toString": PropTypes.func.isRequired,
|
|
251
|
+
"valueOf": PropTypes.func.isRequired
|
|
252
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
253
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
254
|
+
"description": PropTypes.string,
|
|
255
|
+
"toString": PropTypes.func.isRequired,
|
|
256
|
+
"valueOf": PropTypes.func.isRequired
|
|
257
|
+
}), PropTypes.string]),
|
|
258
|
+
"paddingX": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
259
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
260
|
+
"description": PropTypes.string,
|
|
261
|
+
"toString": PropTypes.func.isRequired,
|
|
262
|
+
"valueOf": PropTypes.func.isRequired
|
|
263
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
264
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
265
|
+
"description": PropTypes.string,
|
|
266
|
+
"toString": PropTypes.func.isRequired,
|
|
267
|
+
"valueOf": PropTypes.func.isRequired
|
|
268
|
+
}), PropTypes.string]),
|
|
269
|
+
"paddingY": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
270
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
271
|
+
"description": PropTypes.string,
|
|
272
|
+
"toString": PropTypes.func.isRequired,
|
|
273
|
+
"valueOf": PropTypes.func.isRequired
|
|
274
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
275
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
276
|
+
"description": PropTypes.string,
|
|
277
|
+
"toString": PropTypes.func.isRequired,
|
|
278
|
+
"valueOf": PropTypes.func.isRequired
|
|
279
|
+
}), PropTypes.string]),
|
|
280
|
+
"pb": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
281
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
282
|
+
"description": PropTypes.string,
|
|
283
|
+
"toString": PropTypes.func.isRequired,
|
|
284
|
+
"valueOf": PropTypes.func.isRequired
|
|
285
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
286
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
287
|
+
"description": PropTypes.string,
|
|
288
|
+
"toString": PropTypes.func.isRequired,
|
|
289
|
+
"valueOf": PropTypes.func.isRequired
|
|
290
|
+
}), PropTypes.string]),
|
|
291
|
+
"pl": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
292
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
293
|
+
"description": PropTypes.string,
|
|
294
|
+
"toString": PropTypes.func.isRequired,
|
|
295
|
+
"valueOf": PropTypes.func.isRequired
|
|
296
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
297
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
298
|
+
"description": PropTypes.string,
|
|
299
|
+
"toString": PropTypes.func.isRequired,
|
|
300
|
+
"valueOf": PropTypes.func.isRequired
|
|
301
|
+
}), PropTypes.string]),
|
|
302
|
+
"pr": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
303
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
304
|
+
"description": PropTypes.string,
|
|
305
|
+
"toString": PropTypes.func.isRequired,
|
|
306
|
+
"valueOf": PropTypes.func.isRequired
|
|
307
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
308
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
309
|
+
"description": PropTypes.string,
|
|
310
|
+
"toString": PropTypes.func.isRequired,
|
|
311
|
+
"valueOf": PropTypes.func.isRequired
|
|
312
|
+
}), PropTypes.string]),
|
|
313
|
+
"pt": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
314
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
315
|
+
"description": PropTypes.string,
|
|
316
|
+
"toString": PropTypes.func.isRequired,
|
|
317
|
+
"valueOf": PropTypes.func.isRequired
|
|
318
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
319
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
320
|
+
"description": PropTypes.string,
|
|
321
|
+
"toString": PropTypes.func.isRequired,
|
|
322
|
+
"valueOf": PropTypes.func.isRequired
|
|
323
|
+
}), PropTypes.string]),
|
|
324
|
+
"px": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
325
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
326
|
+
"description": PropTypes.string,
|
|
327
|
+
"toString": PropTypes.func.isRequired,
|
|
328
|
+
"valueOf": PropTypes.func.isRequired
|
|
329
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
330
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
331
|
+
"description": PropTypes.string,
|
|
332
|
+
"toString": PropTypes.func.isRequired,
|
|
333
|
+
"valueOf": PropTypes.func.isRequired
|
|
334
|
+
}), PropTypes.string]),
|
|
335
|
+
"py": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
336
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
337
|
+
"description": PropTypes.string,
|
|
338
|
+
"toString": PropTypes.func.isRequired,
|
|
339
|
+
"valueOf": PropTypes.func.isRequired
|
|
340
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
341
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
342
|
+
"description": PropTypes.string,
|
|
343
|
+
"toString": PropTypes.func.isRequired,
|
|
344
|
+
"valueOf": PropTypes.func.isRequired
|
|
345
|
+
}), PropTypes.string])
|
|
38
346
|
};
|
|
39
347
|
export default Accordion;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const StyledContentContainer: import("styled-components").StyledComponent<"div", any, import("../../../accordion/accordion.style").StyledAccordionContentContainerProps, never>;
|
|
2
|
+
declare const StyledContent: import("styled-components").StyledComponent<"div", any, import("../../../accordion/accordion.style").StyledAccordionContentProps, never>;
|
|
3
|
+
export { StyledContentContainer, StyledContent };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./accordion.component";
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export { TileSelect } from "./tile-select";
|
|
2
|
-
export {
|
|
1
|
+
export { default as TileSelect } from "./tile-select.component";
|
|
2
|
+
export type { TileSelectProps, TileSelectDeselectEvent, } from "./tile-select.component";
|
|
3
|
+
export { default as TileSelectGroup } from "./tile-select-group.component";
|
|
4
|
+
export type { TileSelectGroupProps } from "./tile-select-group.component";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as TileSelect } from "./tile-select.component
|
|
2
|
-
export { default as TileSelectGroup } from "./tile-select-group.component
|
|
1
|
+
export { default as TileSelect } from "./tile-select.component";
|
|
2
|
+
export { default as TileSelectGroup } from "./tile-select-group.component";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MarginProps } from "styled-system";
|
|
3
|
+
import { TileSelectDeselectEvent } from "./tile-select.component";
|
|
4
|
+
export interface TileSelectGroupProps extends MarginProps {
|
|
5
|
+
/** The TileSelect components to be rendered in the group */
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/** The content for the TileSelectGroup Legend */
|
|
8
|
+
legend?: string;
|
|
9
|
+
/** Description to be rendered below the legend */
|
|
10
|
+
description?: string;
|
|
11
|
+
/** The currently selected value - only for single select mode. */
|
|
12
|
+
value?: string | null;
|
|
13
|
+
/** The name to apply to the input - only for single select mode. */
|
|
14
|
+
name: string;
|
|
15
|
+
/** A callback triggered when one of tiles is selected - only for single select mode. */
|
|
16
|
+
onChange?: (ev: React.ChangeEvent<HTMLInputElement> | TileSelectDeselectEvent) => void;
|
|
17
|
+
/** A callback triggered when one of tiles is blurred - only for single select mode. */
|
|
18
|
+
onBlur?: (ev: React.FocusEvent<HTMLInputElement>) => void;
|
|
19
|
+
/** When passed as true TileSelectGroup serves only visual purpose */
|
|
20
|
+
/** It wraps TileSelects in fieldset element and renders the legend and description props content */
|
|
21
|
+
/** onChange, onBlur, value, checked and name props are meant to be passed individually on each of the TileSelects */
|
|
22
|
+
multiSelect?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const TileSelectGroup: ({ children, name, legend, description, onChange, onBlur, value, multiSelect, ...rest }: TileSelectGroupProps) => JSX.Element;
|
|
25
|
+
export default TileSelectGroup;
|