carbon-react 111.15.0 → 111.17.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 (71) hide show
  1. package/esm/components/confirm/confirm.component.d.ts +37 -0
  2. package/esm/components/confirm/confirm.component.js +46 -113
  3. package/esm/components/confirm/confirm.config.d.ts +1 -0
  4. package/esm/components/confirm/confirm.style.d.ts +5 -0
  5. package/esm/components/confirm/confirm.style.js +1 -5
  6. package/esm/components/confirm/index.d.ts +2 -1
  7. package/esm/components/dialog/dialog.style.js +1 -1
  8. package/esm/components/dialog-full-screen/content.style.d.ts +7 -0
  9. package/esm/components/dialog-full-screen/dialog-full-screen.component.d.ts +55 -0
  10. package/esm/components/dialog-full-screen/dialog-full-screen.component.js +45 -80
  11. package/esm/components/dialog-full-screen/dialog-full-screen.style.d.ts +4 -0
  12. package/esm/components/dialog-full-screen/index.d.ts +2 -1
  13. package/esm/components/form/form.component.d.ts +4 -2
  14. package/esm/components/form/form.component.js +165 -6
  15. package/esm/components/form/form.style.js +6 -1
  16. package/esm/components/modal/modal.component.d.ts +2 -1
  17. package/esm/components/modal/modal.component.js +3 -0
  18. package/esm/components/sidebar/__internal__/sidebar-header/sidebar-header.component.d.ts +8 -2
  19. package/esm/components/sidebar/__internal__/sidebar-header/sidebar-header.component.js +168 -6
  20. package/esm/components/sidebar/__internal__/sidebar-header/sidebar-header.style.d.ts +4 -2
  21. package/esm/components/sidebar/__internal__/sidebar-header/sidebar-header.style.js +24 -4
  22. package/esm/components/sidebar/sidebar.component.d.ts +2 -0
  23. package/esm/components/sidebar/sidebar.component.js +162 -3
  24. package/esm/components/tile/tile-footer/tile-footer.component.js +3 -5
  25. package/esm/components/tile/tile-footer/tile-footer.d.ts +1 -1
  26. package/esm/components/tile/tile-footer/tile-footer.style.js +15 -1
  27. package/esm/components/tile/tile.component.js +10 -3
  28. package/esm/components/tile/tile.d.ts +15 -0
  29. package/esm/components/tile/tile.style.js +30 -3
  30. package/esm/style/design-tokens/debug-theme.util.d.ts +15 -1
  31. package/esm/style/themes/sage/index.d.ts +15 -1
  32. package/esm/style/utils/form-style-utils.d.ts +4 -2
  33. package/esm/style/utils/form-style-utils.js +7 -2
  34. package/lib/components/confirm/confirm.component.d.ts +37 -0
  35. package/lib/components/confirm/confirm.component.js +47 -114
  36. package/lib/components/confirm/confirm.config.d.ts +1 -0
  37. package/lib/components/confirm/confirm.style.d.ts +5 -0
  38. package/lib/components/confirm/confirm.style.js +1 -6
  39. package/lib/components/confirm/index.d.ts +2 -1
  40. package/lib/components/dialog/dialog.style.js +1 -1
  41. package/lib/components/dialog-full-screen/content.style.d.ts +7 -0
  42. package/lib/components/dialog-full-screen/dialog-full-screen.component.d.ts +55 -0
  43. package/lib/components/dialog-full-screen/dialog-full-screen.component.js +46 -81
  44. package/lib/components/dialog-full-screen/dialog-full-screen.style.d.ts +4 -0
  45. package/lib/components/dialog-full-screen/index.d.ts +2 -1
  46. package/lib/components/form/form.component.d.ts +4 -2
  47. package/lib/components/form/form.component.js +165 -6
  48. package/lib/components/form/form.style.js +5 -0
  49. package/lib/components/modal/modal.component.d.ts +2 -1
  50. package/lib/components/modal/modal.component.js +3 -0
  51. package/lib/components/sidebar/__internal__/sidebar-header/sidebar-header.component.d.ts +8 -2
  52. package/lib/components/sidebar/__internal__/sidebar-header/sidebar-header.component.js +167 -5
  53. package/lib/components/sidebar/__internal__/sidebar-header/sidebar-header.style.d.ts +4 -2
  54. package/lib/components/sidebar/__internal__/sidebar-header/sidebar-header.style.js +31 -4
  55. package/lib/components/sidebar/sidebar.component.d.ts +2 -0
  56. package/lib/components/sidebar/sidebar.component.js +161 -2
  57. package/lib/components/tile/tile-footer/tile-footer.component.js +4 -3
  58. package/lib/components/tile/tile-footer/tile-footer.d.ts +1 -1
  59. package/lib/components/tile/tile-footer/tile-footer.style.js +14 -1
  60. package/lib/components/tile/tile.component.js +12 -2
  61. package/lib/components/tile/tile.d.ts +15 -0
  62. package/lib/components/tile/tile.style.js +29 -3
  63. package/lib/style/design-tokens/debug-theme.util.d.ts +15 -1
  64. package/lib/style/themes/sage/index.d.ts +15 -1
  65. package/lib/style/utils/form-style-utils.d.ts +4 -2
  66. package/lib/style/utils/form-style-utils.js +7 -2
  67. package/package.json +3 -3
  68. package/esm/components/confirm/confirm.d.ts +0 -50
  69. package/esm/components/dialog-full-screen/dialog-full-screen.d.ts +0 -52
  70. package/lib/components/confirm/confirm.d.ts +0 -50
  71. package/lib/components/dialog-full-screen/dialog-full-screen.d.ts +0 -52
@@ -1,6 +1,6 @@
1
1
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
- import React, { useRef, useCallback, useContext } from "react";
3
+ import React, { useCallback, useContext, useRef } from "react";
4
4
  import PropTypes from "prop-types";
5
5
  import Modal from "../modal";
6
6
  import StyledSidebar from "./sidebar.style";
@@ -35,6 +35,7 @@ const Sidebar = /*#__PURE__*/React.forwardRef(({
35
35
  focusableContainers,
36
36
  focusableSelectors,
37
37
  width,
38
+ headerPadding = {},
38
39
  ...rest
39
40
  }, ref) => {
40
41
  const locale = useLocale();
@@ -82,9 +83,11 @@ const Sidebar = /*#__PURE__*/React.forwardRef(({
82
83
  role: role
83
84
  }, filterStyledSystemPaddingProps(rest), {
84
85
  width: width
85
- }), header && /*#__PURE__*/React.createElement(SidebarHeader, {
86
+ }), header && /*#__PURE__*/React.createElement(SidebarHeader, _extends({
87
+ closeIcon: closeIcon()
88
+ }, headerPadding, {
86
89
  id: headerId
87
- }, header), closeIcon(), /*#__PURE__*/React.createElement(Box, _extends({
90
+ }), header), !header && closeIcon(), /*#__PURE__*/React.createElement(Box, _extends({
88
91
  "data-element": "sidebar-content",
89
92
  pt: "var(--spacing300)",
90
93
  pb: "var(--spacing400)",
@@ -145,6 +148,162 @@ Sidebar.propTypes = {
145
148
  }]).isRequired
146
149
  }),
147
150
  "header": PropTypes.node,
151
+ "headerPadding": PropTypes.shape({
152
+ "p": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
153
+ "__@toStringTag": PropTypes.string.isRequired,
154
+ "description": PropTypes.string,
155
+ "toString": PropTypes.func.isRequired,
156
+ "valueOf": PropTypes.func.isRequired
157
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
158
+ "__@toStringTag": PropTypes.string.isRequired,
159
+ "description": PropTypes.string,
160
+ "toString": PropTypes.func.isRequired,
161
+ "valueOf": PropTypes.func.isRequired
162
+ }), PropTypes.string]),
163
+ "padding": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
164
+ "__@toStringTag": PropTypes.string.isRequired,
165
+ "description": PropTypes.string,
166
+ "toString": PropTypes.func.isRequired,
167
+ "valueOf": PropTypes.func.isRequired
168
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
169
+ "__@toStringTag": PropTypes.string.isRequired,
170
+ "description": PropTypes.string,
171
+ "toString": PropTypes.func.isRequired,
172
+ "valueOf": PropTypes.func.isRequired
173
+ }), PropTypes.string]),
174
+ "paddingBottom": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
175
+ "__@toStringTag": PropTypes.string.isRequired,
176
+ "description": PropTypes.string,
177
+ "toString": PropTypes.func.isRequired,
178
+ "valueOf": PropTypes.func.isRequired
179
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
180
+ "__@toStringTag": PropTypes.string.isRequired,
181
+ "description": PropTypes.string,
182
+ "toString": PropTypes.func.isRequired,
183
+ "valueOf": PropTypes.func.isRequired
184
+ }), PropTypes.string]),
185
+ "paddingLeft": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
186
+ "__@toStringTag": PropTypes.string.isRequired,
187
+ "description": PropTypes.string,
188
+ "toString": PropTypes.func.isRequired,
189
+ "valueOf": PropTypes.func.isRequired
190
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
191
+ "__@toStringTag": PropTypes.string.isRequired,
192
+ "description": PropTypes.string,
193
+ "toString": PropTypes.func.isRequired,
194
+ "valueOf": PropTypes.func.isRequired
195
+ }), PropTypes.string]),
196
+ "paddingRight": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
197
+ "__@toStringTag": PropTypes.string.isRequired,
198
+ "description": PropTypes.string,
199
+ "toString": PropTypes.func.isRequired,
200
+ "valueOf": PropTypes.func.isRequired
201
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
202
+ "__@toStringTag": PropTypes.string.isRequired,
203
+ "description": PropTypes.string,
204
+ "toString": PropTypes.func.isRequired,
205
+ "valueOf": PropTypes.func.isRequired
206
+ }), PropTypes.string]),
207
+ "paddingTop": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
208
+ "__@toStringTag": PropTypes.string.isRequired,
209
+ "description": PropTypes.string,
210
+ "toString": PropTypes.func.isRequired,
211
+ "valueOf": PropTypes.func.isRequired
212
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
213
+ "__@toStringTag": PropTypes.string.isRequired,
214
+ "description": PropTypes.string,
215
+ "toString": PropTypes.func.isRequired,
216
+ "valueOf": PropTypes.func.isRequired
217
+ }), PropTypes.string]),
218
+ "paddingX": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
219
+ "__@toStringTag": PropTypes.string.isRequired,
220
+ "description": PropTypes.string,
221
+ "toString": PropTypes.func.isRequired,
222
+ "valueOf": PropTypes.func.isRequired
223
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
224
+ "__@toStringTag": PropTypes.string.isRequired,
225
+ "description": PropTypes.string,
226
+ "toString": PropTypes.func.isRequired,
227
+ "valueOf": PropTypes.func.isRequired
228
+ }), PropTypes.string]),
229
+ "paddingY": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
230
+ "__@toStringTag": PropTypes.string.isRequired,
231
+ "description": PropTypes.string,
232
+ "toString": PropTypes.func.isRequired,
233
+ "valueOf": PropTypes.func.isRequired
234
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
235
+ "__@toStringTag": PropTypes.string.isRequired,
236
+ "description": PropTypes.string,
237
+ "toString": PropTypes.func.isRequired,
238
+ "valueOf": PropTypes.func.isRequired
239
+ }), PropTypes.string]),
240
+ "pb": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
241
+ "__@toStringTag": PropTypes.string.isRequired,
242
+ "description": PropTypes.string,
243
+ "toString": PropTypes.func.isRequired,
244
+ "valueOf": PropTypes.func.isRequired
245
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
246
+ "__@toStringTag": PropTypes.string.isRequired,
247
+ "description": PropTypes.string,
248
+ "toString": PropTypes.func.isRequired,
249
+ "valueOf": PropTypes.func.isRequired
250
+ }), PropTypes.string]),
251
+ "pl": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
252
+ "__@toStringTag": PropTypes.string.isRequired,
253
+ "description": PropTypes.string,
254
+ "toString": PropTypes.func.isRequired,
255
+ "valueOf": PropTypes.func.isRequired
256
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
257
+ "__@toStringTag": PropTypes.string.isRequired,
258
+ "description": PropTypes.string,
259
+ "toString": PropTypes.func.isRequired,
260
+ "valueOf": PropTypes.func.isRequired
261
+ }), PropTypes.string]),
262
+ "pr": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
263
+ "__@toStringTag": PropTypes.string.isRequired,
264
+ "description": PropTypes.string,
265
+ "toString": PropTypes.func.isRequired,
266
+ "valueOf": PropTypes.func.isRequired
267
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
268
+ "__@toStringTag": PropTypes.string.isRequired,
269
+ "description": PropTypes.string,
270
+ "toString": PropTypes.func.isRequired,
271
+ "valueOf": PropTypes.func.isRequired
272
+ }), PropTypes.string]),
273
+ "pt": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
274
+ "__@toStringTag": PropTypes.string.isRequired,
275
+ "description": PropTypes.string,
276
+ "toString": PropTypes.func.isRequired,
277
+ "valueOf": PropTypes.func.isRequired
278
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
279
+ "__@toStringTag": PropTypes.string.isRequired,
280
+ "description": PropTypes.string,
281
+ "toString": PropTypes.func.isRequired,
282
+ "valueOf": PropTypes.func.isRequired
283
+ }), PropTypes.string]),
284
+ "px": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
285
+ "__@toStringTag": PropTypes.string.isRequired,
286
+ "description": PropTypes.string,
287
+ "toString": PropTypes.func.isRequired,
288
+ "valueOf": PropTypes.func.isRequired
289
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
290
+ "__@toStringTag": PropTypes.string.isRequired,
291
+ "description": PropTypes.string,
292
+ "toString": PropTypes.func.isRequired,
293
+ "valueOf": PropTypes.func.isRequired
294
+ }), PropTypes.string]),
295
+ "py": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
296
+ "__@toStringTag": PropTypes.string.isRequired,
297
+ "description": PropTypes.string,
298
+ "toString": PropTypes.func.isRequired,
299
+ "valueOf": PropTypes.func.isRequired
300
+ }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
301
+ "__@toStringTag": PropTypes.string.isRequired,
302
+ "description": PropTypes.string,
303
+ "toString": PropTypes.func.isRequired,
304
+ "valueOf": PropTypes.func.isRequired
305
+ }), PropTypes.string])
306
+ }),
148
307
  "onCancel": PropTypes.func,
149
308
  "open": PropTypes.bool.isRequired,
150
309
  "p": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
@@ -6,8 +6,7 @@ import styledSystemPropTypes from "@styled-system/prop-types";
6
6
  import StyledTileFooter from "./tile-footer.style";
7
7
  import { filterStyledSystemPaddingProps } from "../../../style/utils";
8
8
  const paddingPropTypes = filterStyledSystemPaddingProps(styledSystemPropTypes.space);
9
-
10
- const TileFooter = ({
9
+ export const TileFooter = ({
11
10
  variant,
12
11
  children,
13
12
  ...props
@@ -17,11 +16,10 @@ const TileFooter = ({
17
16
  variant: variant
18
17
  }, props), children);
19
18
  };
20
-
21
19
  TileFooter.propTypes = { ...paddingPropTypes,
22
20
 
23
- /** set which background color variant should be used */
24
- variant: PropTypes.oneOf(["default", "transparent"]),
21
+ /** Sets which background color variant should be used */
22
+ variant: PropTypes.oneOf(["default", "black", "transparent"]),
25
23
  children: PropTypes.node
26
24
  };
27
25
  export default TileFooter;
@@ -3,7 +3,7 @@ import { PaddingProps } from "styled-system";
3
3
 
4
4
  export interface TileFooterProps extends PaddingProps {
5
5
  /** set which background color variant should be used */
6
- variant?: "default" | "transparent";
6
+ variant?: "default" | "black" | "transparent";
7
7
  }
8
8
 
9
9
  declare function TileFooter(
@@ -1,13 +1,27 @@
1
1
  import styled, { css } from "styled-components";
2
2
  import { padding } from "styled-system";
3
3
  import { baseTheme } from "../../../style/themes";
4
+
5
+ const getBackgroundColor = variant => {
6
+ switch (variant) {
7
+ case "transparent":
8
+ return "transparent";
9
+
10
+ case "black":
11
+ return "var(--colorsUtilityYin100)";
12
+
13
+ default:
14
+ return "var(--colorsUtilityMajor100)";
15
+ }
16
+ };
17
+
4
18
  const StyledTileFooter = styled.div`
5
19
  ${padding}
6
20
 
7
21
  ${({
8
22
  variant
9
23
  }) => css`
10
- background: ${variant === "transparent" ? "transparent" : "var(--colorsUtilityMajor025)"};
24
+ background: ${getBackgroundColor(variant)};
11
25
  border-top: 1px solid var(--colorsUtilityMajor100);
12
26
  `}
13
27
  `;
@@ -4,8 +4,7 @@ import React from "react";
4
4
  import PropTypes from "prop-types";
5
5
  import propTypes from "@styled-system/prop-types";
6
6
  import { StyledTile, TileContent } from "./tile.style.js";
7
-
8
- const Tile = ({
7
+ export const Tile = ({
9
8
  variant = "tile",
10
9
  p = 3,
11
10
  children,
@@ -48,6 +47,8 @@ const Tile = ({
48
47
  p: p
49
48
  }, props), wrappedChildren);
50
49
  };
50
+ /** TODO: When we convert this to typescript, dynamically pull the border tokens for borderWidth
51
+ * See how the Box component does this with boxShadows for an example */
51
52
 
52
53
  Tile.propTypes = {
53
54
  /** Styled system spacing props */
@@ -72,6 +73,12 @@ Tile.propTypes = {
72
73
  * Set a percentage-based width for the whole Tile component, relative to its parent.
73
74
  * If unset or zero, this will default to 100%.
74
75
  */
75
- width: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
76
+ width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
77
+
78
+ /** Sets the border width by using these design tokens */
79
+ borderWidth: PropTypes.oneOf(["borderWidth000", "borderWidth100", "borderWidth200", "borderWidth300", "borderWidth400"]),
80
+
81
+ /** Sets the border variant that should be used */
82
+ borderVariant: PropTypes.oneOf(["default", "selected", "positive", "negative", "caution", "info"])
76
83
  };
77
84
  export default Tile;
@@ -24,6 +24,21 @@ export interface TileProps extends SpaceProps {
24
24
  * If unset or zero, this will default to 100%.
25
25
  */
26
26
  width?: string | number;
27
+ /** Sets the border width by using these design tokens */
28
+ borderWidth?:
29
+ | "borderWidth000"
30
+ | "borderWidth100"
31
+ | "borderWidth200"
32
+ | "borderWidth300"
33
+ | "borderWidth400";
34
+ /** Sets the border variant that should be used */
35
+ borderVariant?:
36
+ | "default"
37
+ | "selected"
38
+ | "positive"
39
+ | "negative"
40
+ | "caution"
41
+ | "info";
27
42
  }
28
43
 
29
44
  declare function Tile(props: TileProps): JSX.Element;
@@ -3,6 +3,29 @@ import PropTypes from "prop-types";
3
3
  import { space } from "styled-system";
4
4
  import baseTheme from "../../style/themes/base";
5
5
  import computeWidth from "../../style/utils/width";
6
+
7
+ const getBorderColor = borderVariant => {
8
+ switch (borderVariant) {
9
+ case "selected":
10
+ return "var(--colorsUtilityYin100)";
11
+
12
+ case "positive":
13
+ return "var(--colorsSemanticPositive500)";
14
+
15
+ case "negative":
16
+ return "var(--colorsSemanticNegative500)";
17
+
18
+ case "caution":
19
+ return "var(--colorsSemanticCaution500)";
20
+
21
+ case "info":
22
+ return "var(--colorsSemanticInfo500)";
23
+
24
+ default:
25
+ return "var(--colorsUtilityMajor100)";
26
+ }
27
+ };
28
+
6
29
  const TileContent = styled.div`
7
30
  ${({
8
31
  isHorizontal,
@@ -59,12 +82,14 @@ const StyledTile = styled.div`
59
82
  ${({
60
83
  isHorizontal,
61
84
  tileTheme,
62
- width
85
+ width,
86
+ borderWidth = "borderWidth100",
87
+ borderVariant
63
88
  }) => css`
64
89
  ${space}
65
90
 
66
91
  box-sizing: border-box;
67
- border: 1px solid var(--colorsUtilityMajor100);
92
+ border: var(--${borderWidth}) solid ${getBorderColor(borderVariant)};
68
93
 
69
94
  ${tileTheme === "tile" && css`
70
95
  background-color: var(--colorsUtilityYang100);
@@ -99,7 +124,9 @@ StyledTile.propTypes = {
99
124
  orientation: PropTypes.string,
100
125
  padding: PropTypes.string,
101
126
  tileTheme: PropTypes.string,
102
- width: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
127
+ width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
128
+ borderWidth: PropTypes.string,
129
+ borderVariant: PropTypes.string
103
130
  };
104
131
  StyledTile.defaultProps = {
105
132
  theme: baseTheme
@@ -16,6 +16,7 @@ declare const _default: {
16
16
  colorsUtilityMajor050: string;
17
17
  colorsUtilityMajor075: string;
18
18
  colorsUtilityMajorTransparent: string;
19
+ colorsUtilityYin100: string;
19
20
  colorsUtilityYin030: string;
20
21
  colorsUtilityYin055: string;
21
22
  colorsUtilityYin065: string;
@@ -117,6 +118,7 @@ declare const _default: {
117
118
  colorsSemanticInfoYang100: string;
118
119
  colorsLogo: string;
119
120
  colorsTransparent: string;
121
+ colorsYin100: string;
120
122
  colorsYin030: string;
121
123
  colorsYin055: string;
122
124
  colorsYin065: string;
@@ -301,13 +303,25 @@ declare const _default: {
301
303
  fontFamiliesIos: string;
302
304
  fontFamiliesAndroid: string;
303
305
  fontFamiliesOther: string;
306
+ borderRadius100: string;
307
+ borderRadius200: string;
308
+ borderRadius300: string;
309
+ borderRadius400: string;
304
310
  borderRadiusCircle: string;
311
+ borderRadius025: string;
312
+ borderRadius050: string;
313
+ borderRadius000: string;
305
314
  typographyAccordionTitleM: string;
315
+ typographyAccordionTitleS: string;
306
316
  typographyAccordionSubtitleM: string;
317
+ typographyAccordionSubtitleS: string;
307
318
  typographyAccordionParagraphM: string;
319
+ typographyAccordionParagraphS: string;
308
320
  typographyActionPopoverMenuItemM: string;
309
321
  typographyAnchorNavLabelM: string;
310
322
  typographyBadgeLabelM: string;
323
+ typographyBreadcrumbSeparatorM: string;
324
+ typographyBreadcrumbCurrentPageM: string;
311
325
  typographyButtonLabelS: string;
312
326
  typographyButtonLabelM: string;
313
327
  typographyButtonLabelL: string;
@@ -327,7 +341,7 @@ declare const _default: {
327
341
  typographyDialogTitleL: string;
328
342
  typographyDialogTitleXl: string;
329
343
  typographyDialogTitleXxl: string;
330
- typographyDialogSubtitle: string;
344
+ typographyDialogSubtitleM: string;
331
345
  typographyDialogParagraphXs: string;
332
346
  typographyDialogParagraphS: string;
333
347
  typographyDialogParagraphMs: string;
@@ -16,6 +16,7 @@ declare var _default: {
16
16
  colorsUtilityMajor050: string;
17
17
  colorsUtilityMajor075: string;
18
18
  colorsUtilityMajorTransparent: string;
19
+ colorsUtilityYin100: string;
19
20
  colorsUtilityYin030: string;
20
21
  colorsUtilityYin055: string;
21
22
  colorsUtilityYin065: string;
@@ -117,6 +118,7 @@ declare var _default: {
117
118
  colorsSemanticInfoYang100: string;
118
119
  colorsLogo: string;
119
120
  colorsTransparent: string;
121
+ colorsYin100: string;
120
122
  colorsYin030: string;
121
123
  colorsYin055: string;
122
124
  colorsYin065: string;
@@ -301,13 +303,25 @@ declare var _default: {
301
303
  fontFamiliesIos: string;
302
304
  fontFamiliesAndroid: string;
303
305
  fontFamiliesOther: string;
306
+ borderRadius100: string;
307
+ borderRadius200: string;
308
+ borderRadius300: string;
309
+ borderRadius400: string;
304
310
  borderRadiusCircle: string;
311
+ borderRadius025: string;
312
+ borderRadius050: string;
313
+ borderRadius000: string;
305
314
  typographyAccordionTitleM: string;
315
+ typographyAccordionTitleS: string;
306
316
  typographyAccordionSubtitleM: string;
317
+ typographyAccordionSubtitleS: string;
307
318
  typographyAccordionParagraphM: string;
319
+ typographyAccordionParagraphS: string;
308
320
  typographyActionPopoverMenuItemM: string;
309
321
  typographyAnchorNavLabelM: string;
310
322
  typographyBadgeLabelM: string;
323
+ typographyBreadcrumbSeparatorM: string;
324
+ typographyBreadcrumbCurrentPageM: string;
311
325
  typographyButtonLabelS: string;
312
326
  typographyButtonLabelM: string;
313
327
  typographyButtonLabelL: string;
@@ -327,7 +341,7 @@ declare var _default: {
327
341
  typographyDialogTitleL: string;
328
342
  typographyDialogTitleXl: string;
329
343
  typographyDialogTitleXxl: string;
330
- typographyDialogSubtitle: string;
344
+ typographyDialogSubtitleM: string;
331
345
  typographyDialogParagraphXs: string;
332
346
  typographyDialogParagraphS: string;
333
347
  typographyDialogParagraphMs: string;
@@ -10,9 +10,11 @@ export declare const calculateFormSpacingValues: (props: PaddingProps, isFormCon
10
10
  "margin-left": string;
11
11
  "margin-right": string;
12
12
  } | {
13
+ ":not(.padded)"?: {
14
+ "padding-left": string;
15
+ "padding-right": string;
16
+ } | undefined;
13
17
  "margin-bottom": string;
14
- "padding-left": string | undefined;
15
- "padding-right": string | undefined;
16
18
  "margin-left": string;
17
19
  "margin-right": string;
18
20
  };
@@ -92,8 +92,13 @@ export const calculateFormSpacingValues = (props, isFormContent, containerCompon
92
92
  "padding-right": spacingRightValue
93
93
  } : {
94
94
  "margin-bottom": setNegativeValue(spacingBottomValue),
95
- "padding-left": isSidebar ? SIDEBAR_LEFT_PADDING : undefined,
96
- "padding-right": isSidebar ? SIDEBAR_RIGHT_PADDING : undefined
95
+ ...(isSidebar && {
96
+ // if footer already has custom padding do not set
97
+ ":not(.padded)": {
98
+ "padding-left": SIDEBAR_LEFT_PADDING,
99
+ "padding-right": SIDEBAR_RIGHT_PADDING
100
+ }
101
+ })
97
102
  })
98
103
  };
99
104
  };
@@ -0,0 +1,37 @@
1
+ import React from "react";
2
+ import { DialogProps } from "../dialog";
3
+ import { IconType } from "../icon";
4
+ export interface ConfirmProps extends Omit<DialogProps, "className" | "disableFocusTrap" | "bespokeFocusTrap" | "focusableSelectors" | "help" | "role" | "contentPadding" | "focusableContainers" | "ariaRole" | "timeout" | "enableBackgroundUI" | "disableClose"> {
5
+ /** Color variants for new business themes: "primary" | "secondary" | "tertiary" | "dashed" | "darkBackground" */
6
+ cancelButtonType?: "primary" | "secondary" | "tertiary" | "dashed" | "darkBackground";
7
+ /** Color variants for new business themes: "primary" | "secondary" | "tertiary" | "dashed" | "darkBackground" */
8
+ confirmButtonType?: "primary" | "secondary" | "tertiary" | "dashed" | "darkBackground";
9
+ /** Customise the cancel button label */
10
+ cancelLabel?: string;
11
+ /** Customise the confirm button label */
12
+ confirmLabel?: string;
13
+ /** Apply destructive style to the cancel button */
14
+ cancelButtonDestructive?: boolean;
15
+ /** Apply destructive style to the confirm button */
16
+ confirmButtonDestructive?: boolean;
17
+ /** Defines a cancel button Icon position related to the children: "before" | "after" */
18
+ cancelButtonIconPosition?: "before" | "after";
19
+ /** Defines an Icon type within the cancel button (see Icon for options) */
20
+ cancelButtonIconType?: IconType;
21
+ /** Defines a cancel button Icon position related to the children: "before" | "after" */
22
+ confirmButtonIconPosition?: "before" | "after";
23
+ /** Defines an Icon type within the confirm button (see Icon for options) */
24
+ confirmButtonIconType?: IconType;
25
+ /** Makes cancel button disabled */
26
+ disableCancel?: boolean;
27
+ /** Makes confirm button disabled */
28
+ disableConfirm?: boolean;
29
+ /** Defines an Icon type within the button (see Icon for options) */
30
+ iconType?: "error" | "warning";
31
+ /** Adds isLoading state into confirm button */
32
+ isLoadingConfirm?: boolean;
33
+ /** A custom event handler when a confirmation takes place */
34
+ onConfirm: (ev: React.MouseEvent<HTMLButtonElement>) => void;
35
+ }
36
+ export declare const Confirm: ({ "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-label": ariaLabel, open, children, cancelButtonDestructive, confirmButtonDestructive, cancelButtonType, confirmButtonType, cancelButtonIconType, cancelButtonIconPosition, confirmButtonIconType, confirmButtonIconPosition, cancelLabel, onCancel, disableCancel, onConfirm, isLoadingConfirm, disableConfirm, confirmLabel, iconType, subtitle, title, size, showCloseIcon, ...rest }: ConfirmProps) => JSX.Element;
37
+ export default Confirm;