carbon-react 115.0.1 → 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.
Files changed (41) hide show
  1. package/esm/__internal__/radio-button-mapper/radio-button-mapper.component.d.ts +1 -1
  2. package/esm/components/multi-action-button/multi-action-button.component.d.ts +1 -1
  3. package/esm/components/multi-action-button/multi-action-button.component.js +13 -3
  4. package/esm/components/pages/pages.component.d.ts +0 -2
  5. package/esm/components/pages/pages.component.js +0 -1
  6. package/esm/components/split-button/split-button.component.js +2 -2
  7. package/esm/components/tile-select/__internal__/accordion/accordion.component.d.ts +10 -0
  8. package/esm/components/tile-select/__internal__/accordion/accordion.component.js +317 -9
  9. package/esm/components/tile-select/__internal__/accordion/accordion.style.d.ts +3 -0
  10. package/esm/components/tile-select/__internal__/accordion/index.d.ts +1 -0
  11. package/esm/components/tile-select/index.d.ts +4 -2
  12. package/esm/components/tile-select/index.js +2 -2
  13. package/esm/components/tile-select/tile-select-group.component.d.ts +25 -0
  14. package/esm/components/tile-select/tile-select-group.component.js +184 -59
  15. package/esm/components/tile-select/tile-select.component.d.ts +58 -0
  16. package/esm/components/tile-select/tile-select.component.js +192 -100
  17. package/esm/components/tile-select/tile-select.style.d.ts +36 -0
  18. package/lib/__internal__/radio-button-mapper/radio-button-mapper.component.d.ts +1 -1
  19. package/lib/components/multi-action-button/multi-action-button.component.d.ts +1 -1
  20. package/lib/components/multi-action-button/multi-action-button.component.js +13 -3
  21. package/lib/components/pages/pages.component.d.ts +0 -2
  22. package/lib/components/pages/pages.component.js +0 -1
  23. package/lib/components/split-button/split-button.component.js +2 -2
  24. package/lib/components/tile-select/__internal__/accordion/accordion.component.d.ts +10 -0
  25. package/lib/components/tile-select/__internal__/accordion/accordion.component.js +316 -8
  26. package/lib/components/tile-select/__internal__/accordion/accordion.style.d.ts +3 -0
  27. package/lib/components/tile-select/__internal__/accordion/index.d.ts +1 -0
  28. package/lib/components/tile-select/index.d.ts +4 -2
  29. package/lib/components/tile-select/index.js +4 -4
  30. package/lib/components/tile-select/tile-select-group.component.d.ts +25 -0
  31. package/lib/components/tile-select/tile-select-group.component.js +188 -68
  32. package/lib/components/tile-select/tile-select.component.d.ts +58 -0
  33. package/lib/components/tile-select/tile-select.component.js +192 -105
  34. package/lib/components/tile-select/tile-select.style.d.ts +36 -0
  35. package/package.json +1 -1
  36. package/esm/components/tile-select/__internal__/accordion/accordion.d.ts +0 -13
  37. package/esm/components/tile-select/tile-select-group.d.ts +0 -27
  38. package/esm/components/tile-select/tile-select.d.ts +0 -51
  39. package/lib/components/tile-select/__internal__/accordion/accordion.d.ts +0 -13
  40. package/lib/components/tile-select/tile-select-group.d.ts +0 -27
  41. 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;
@@ -7,5 +7,5 @@ export interface MultiActionButtonProps extends WidthProps, Omit<SplitButtonProp
7
7
  /** Second text child, renders under main text, only when size is "large" */
8
8
  subtext?: string;
9
9
  }
10
- export declare const MultiActionButton: ({ align, disabled, buttonType, size, children, text, subtext, width, "data-element": dataElement, "data-role": dataRole, ...rest }: MultiActionButtonProps) => JSX.Element;
10
+ export declare const MultiActionButton: ({ align, disabled, buttonType, size, children, text, subtext, width, onClick, "data-element": dataElement, "data-role": dataRole, ...rest }: MultiActionButtonProps) => JSX.Element;
11
11
  export default MultiActionButton;
@@ -19,6 +19,7 @@ const MultiActionButton = ({
19
19
  text,
20
20
  subtext,
21
21
  width,
22
+ onClick,
22
23
  "data-element": dataElement,
23
24
  "data-role": dataRole,
24
25
  ...rest
@@ -85,11 +86,23 @@ const MultiActionButton = ({
85
86
  }
86
87
  };
87
88
 
89
+ const handleInsideClick = useClickAwayListener(hideButtons);
90
+
91
+ const handleClick = ev => {
92
+ showButtons();
93
+ handleInsideClick();
94
+
95
+ if (onClick) {
96
+ onClick(ev);
97
+ }
98
+ };
99
+
88
100
  const mainButtonProps = {
89
101
  disabled,
90
102
  displayed: showAdditionalButtons,
91
103
  onTouchStart: showButtons,
92
104
  onKeyDown: handleMainButtonKeyDown,
105
+ onClick: handleClick,
93
106
  buttonType,
94
107
  size,
95
108
  subtext,
@@ -112,16 +125,13 @@ const MultiActionButton = ({
112
125
  onKeyDown: handleKeyDown
113
126
  }, childrenWithProps()));
114
127
 
115
- const handleClick = useClickAwayListener(hideButtons);
116
128
  const hideButtonsIfTriggerNotFocused = useCallback(() => {
117
129
  if (buttonRef.current === document.activeElement) return;
118
130
  setShowAdditionalButtons(false);
119
131
  }, []);
120
132
  const marginProps = filterStyledSystemMarginProps(rest);
121
133
  return /*#__PURE__*/React.createElement(StyledMultiActionButton, _extends({
122
- "aria-haspopup": "true",
123
134
  onMouseLeave: hideButtonsIfTriggerNotFocused,
124
- onClick: handleClick,
125
135
  ref: ref,
126
136
  "data-component": "multi-action-button",
127
137
  "data-element": dataElement,
@@ -2,8 +2,6 @@ import React from "react";
2
2
  import Page from "./page";
3
3
  import { ThemeObject } from "../../style/themes/base";
4
4
  export interface PagesProps {
5
- /** [legacy] Custom className */
6
- className?: string;
7
5
  /** The selected tab on page load */
8
6
  initialpageIndex?: number | string;
9
7
  /** The current page's index */
@@ -86,7 +86,6 @@ const Pages = ({
86
86
 
87
87
  Pages.propTypes = {
88
88
  "children": PropTypes.node,
89
- "className": PropTypes.string,
90
89
  "initialpageIndex": PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
91
90
  "pageIndex": PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
92
91
  "theme": PropTypes.shape({
@@ -95,7 +95,8 @@ const SplitButton = ({
95
95
  buttonType,
96
96
  size,
97
97
  ...(!disabled && {
98
- onMouseEnter: showButtons
98
+ onMouseEnter: showButtons,
99
+ onClick: showButtons
99
100
  })
100
101
  };
101
102
 
@@ -175,7 +176,6 @@ const SplitButton = ({
175
176
  const handleClick = useClickAwayListener(hideButtons);
176
177
  const marginProps = filterStyledSystemMarginProps(rest);
177
178
  return /*#__PURE__*/React.createElement(StyledSplitButton, _extends({
178
- "aria-haspopup": "true",
179
179
  onMouseLeave: hideButtonsIfTriggerNotFocused,
180
180
  onClick: handleClick,
181
181
  ref: splitButtonNode
@@ -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, { useEffect, useRef, useState } from "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
- setContentHeight(contentRef.current.scrollHeight);
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.isRequired,
35
- expanded: PropTypes.bool,
36
- contentId: PropTypes.string,
37
- controlId: PropTypes.string
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 { TileSelectGroup } from "./tile-select-group";
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.js";
2
- export { default as TileSelectGroup } from "./tile-select-group.component.js";
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;