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
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = void 0;
6
+ exports.default = exports.Confirm = void 0;
7
7
 
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
 
@@ -39,10 +39,10 @@ const Confirm = ({
39
39
  "aria-label": ariaLabel,
40
40
  open,
41
41
  children,
42
- cancelButtonDestructive,
43
- confirmButtonDestructive,
44
- cancelButtonType,
45
- confirmButtonType,
42
+ cancelButtonDestructive = false,
43
+ confirmButtonDestructive = false,
44
+ cancelButtonType = "secondary",
45
+ confirmButtonType = "primary",
46
46
  cancelButtonIconType,
47
47
  cancelButtonIconPosition,
48
48
  confirmButtonIconType,
@@ -57,6 +57,8 @@ const Confirm = ({
57
57
  iconType,
58
58
  subtitle,
59
59
  title,
60
+ size = "extra-small",
61
+ showCloseIcon = false,
60
62
  ...rest
61
63
  }) => {
62
64
  const l = (0, _useLocale.default)();
@@ -134,123 +136,54 @@ const Confirm = ({
134
136
  subtitle: subtitle,
135
137
  title: getTitle(),
136
138
  "data-component": "confirm",
137
- role: "alertdialog"
139
+ role: "alertdialog",
140
+ size: size,
141
+ showCloseIcon: showCloseIcon
138
142
  }, ariaProps, rest), children, /*#__PURE__*/_react.default.createElement(_confirm.StyledConfirmButtons, null, renderCancelButton(), renderConfirmButton()));
139
143
  };
140
144
 
141
- Confirm.defaultProps = {
142
- size: "extra-small",
143
- showCloseIcon: false,
144
- cancelButtonDestructive: false,
145
- confirmButtonDestructive: false,
146
- iconType: null,
147
- cancelButtonType: "secondary",
148
- confirmButtonType: "primary"
149
- };
145
+ exports.Confirm = Confirm;
150
146
  Confirm.propTypes = {
151
- /** Prop to specify the aria-describedby property of the component */
152
147
  "aria-describedby": _propTypes.default.string,
153
-
154
- /**
155
- * Prop to specify the aria-label of the component.
156
- * To be used only when the title prop is not defined, and the component is not labelled by any internal element.
157
- */
158
148
  "aria-label": _propTypes.default.string,
159
-
160
- /**
161
- * Prop to specify the aria-labeledby property of the component
162
- * To be used when the title prop is a custom React Node,
163
- * or the component is labelled by an internal element other than the title.
164
- */
165
149
  "aria-labelledby": _propTypes.default.string,
166
-
167
- /** Confirm content */
168
- children: _propTypes.default.node,
169
-
170
- /** Controls the open state of the component */
171
- open: _propTypes.default.bool.isRequired,
172
-
173
- /** A custom close event handler */
174
- onCancel: _propTypes.default.func,
175
-
176
- /** Determines if the Esc Key closes the Confirm */
177
- disableEscKey: _propTypes.default.bool,
178
-
179
- /** Allows developers to specify a specific height for the Confirm. */
180
- height: _propTypes.default.string,
181
-
182
- /** Title displayed at top of component */
183
- title: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]),
184
-
185
- /** Subtitle displayed at top of component */
186
- subtitle: _propTypes.default.string,
187
-
188
- /** Size of component */
189
- size: _propTypes.default.oneOf(["auto", "extra-small", "small", "medium-small", "medium", "medium-large", "large", "extra-large"]),
190
-
191
- /** Determines if the close icon is shown */
192
- showCloseIcon: _propTypes.default.bool,
193
-
194
- /** Optional reference to an element meant to be focused on open */
195
- focusFirstElement: _propTypes.default.shape({
196
- current: _propTypes.default.any
150
+ "cancelButtonDestructive": _propTypes.default.bool,
151
+ "cancelButtonIconPosition": _propTypes.default.oneOf(["after", "before"]),
152
+ "cancelButtonIconType": _propTypes.default.oneOf(["add", "admin", "alert_on", "alert", "analysis", "arrow_down", "arrow_left_boxed", "arrow_left_right_small", "arrow_left_small", "arrow_left", "arrow_right_small", "arrow_right", "arrow_up", "arrow", "attach", "bank", "basket_with_squares", "basket", "bin", "block_arrow_right", "blocked_square", "blocked", "bold", "box_arrow_left", "boxed_shapes", "bulk_destroy", "bullet_list_dotted", "bullet_list_numbers", "bullet_list", "business", "calendar_today", "calendar", "call", "camera", "card_view", "caret_down", "caret_large_down", "caret_large_left", "caret_large_right", "caret_large_up", "caret_left", "caret_right", "caret_up", "cart", "chart_bar", "chart_line", "chart_pie", "chat_notes", "chat", "chevron_down_thick", "chevron_down", "chevron_left_thick", "chevron_left", "chevron_right_thick", "chevron_right", "chevron_up_thick", "chevron_up", "circle_with_dots", "circles_connection", "clock", "close", "coins", "collaborate", "computer_clock", "connect", "contacts", "copy", "create", "credit_card_slash", "credit_card", "cross_circle", "cross", "csv", "delete", "delivery", "disconnect", "disputed", "document_right_align", "document_tick", "document_vertical_lines", "download", "draft", "drag_vertical", "drag", "dropdown", "duplicate", "edit", "edited", "ellipsis_horizontal", "ellipsis_vertical", "email_switch", "email", "entry", "envelope_dollar", "envelope_euro", "error_square", "error", "euro", "expand", "factory", "favourite_lined", "favourite", "fax", "feedback", "file_excel", "file_generic", "file_image", "file_pdf", "file_word", "files_leaning", "filter_new", "filter", "fit_height", "fit_width", "flag", "folder", "gift", "go", "graph", "grid", "help", "hide", "home", "image", "in_progress", "in_transit", "individual", "info", "italic", "key", "ledger_arrow_left", "ledger_arrow_right", "ledger", "lightbulb_off", "lightbulb_on", "link", "list_view", "location", "locked", "logout", "lookup", "marker", "message", "minus_large", "minus", "mobile", "money_bag", "none", "old_warning", "palm_tree", "pause_circle", "pause", "pdf", "people_switch", "people", "person_info", "person_tick", "person", "phone", "piggy_bank", "play_circle", "play", "plus_large", "plus", "pound", "print", "progress", "progressed", "question_hollow", "question_mark", "question", "refresh_clock", "refresh", "remove", "sage_coin", "save", "scan", "search", "services", "settings_old", "settings", "share", "shop", "sort_down", "sort_up", "spanner", "split_container", "split", "square_dot", "squares_nine", "stacked_boxes", "stacked_squares", "submitted", "sync", "tag", "talk", "three_boxes", "tick_circle", "tick_thick", "tick", "true_tick", "u_turn_left", "u_turn_right", "undo", "unlocked", "upload", "uploaded", "video", "view", "warning"]),
153
+ "cancelButtonType": _propTypes.default.oneOf(["darkBackground", "dashed", "primary", "secondary", "tertiary"]),
154
+ "cancelLabel": _propTypes.default.string,
155
+ "children": _propTypes.default.node,
156
+ "confirmButtonDestructive": _propTypes.default.bool,
157
+ "confirmButtonIconPosition": _propTypes.default.oneOf(["after", "before"]),
158
+ "confirmButtonIconType": _propTypes.default.oneOf(["add", "admin", "alert_on", "alert", "analysis", "arrow_down", "arrow_left_boxed", "arrow_left_right_small", "arrow_left_small", "arrow_left", "arrow_right_small", "arrow_right", "arrow_up", "arrow", "attach", "bank", "basket_with_squares", "basket", "bin", "block_arrow_right", "blocked_square", "blocked", "bold", "box_arrow_left", "boxed_shapes", "bulk_destroy", "bullet_list_dotted", "bullet_list_numbers", "bullet_list", "business", "calendar_today", "calendar", "call", "camera", "card_view", "caret_down", "caret_large_down", "caret_large_left", "caret_large_right", "caret_large_up", "caret_left", "caret_right", "caret_up", "cart", "chart_bar", "chart_line", "chart_pie", "chat_notes", "chat", "chevron_down_thick", "chevron_down", "chevron_left_thick", "chevron_left", "chevron_right_thick", "chevron_right", "chevron_up_thick", "chevron_up", "circle_with_dots", "circles_connection", "clock", "close", "coins", "collaborate", "computer_clock", "connect", "contacts", "copy", "create", "credit_card_slash", "credit_card", "cross_circle", "cross", "csv", "delete", "delivery", "disconnect", "disputed", "document_right_align", "document_tick", "document_vertical_lines", "download", "draft", "drag_vertical", "drag", "dropdown", "duplicate", "edit", "edited", "ellipsis_horizontal", "ellipsis_vertical", "email_switch", "email", "entry", "envelope_dollar", "envelope_euro", "error_square", "error", "euro", "expand", "factory", "favourite_lined", "favourite", "fax", "feedback", "file_excel", "file_generic", "file_image", "file_pdf", "file_word", "files_leaning", "filter_new", "filter", "fit_height", "fit_width", "flag", "folder", "gift", "go", "graph", "grid", "help", "hide", "home", "image", "in_progress", "in_transit", "individual", "info", "italic", "key", "ledger_arrow_left", "ledger_arrow_right", "ledger", "lightbulb_off", "lightbulb_on", "link", "list_view", "location", "locked", "logout", "lookup", "marker", "message", "minus_large", "minus", "mobile", "money_bag", "none", "old_warning", "palm_tree", "pause_circle", "pause", "pdf", "people_switch", "people", "person_info", "person_tick", "person", "phone", "piggy_bank", "play_circle", "play", "plus_large", "plus", "pound", "print", "progress", "progressed", "question_hollow", "question_mark", "question", "refresh_clock", "refresh", "remove", "sage_coin", "save", "scan", "search", "services", "settings_old", "settings", "share", "shop", "sort_down", "sort_up", "spanner", "split_container", "split", "square_dot", "squares_nine", "stacked_boxes", "stacked_squares", "submitted", "sync", "tag", "talk", "three_boxes", "tick_circle", "tick_thick", "tick", "true_tick", "u_turn_left", "u_turn_right", "undo", "unlocked", "upload", "uploaded", "video", "view", "warning"]),
159
+ "confirmButtonType": _propTypes.default.oneOf(["darkBackground", "dashed", "primary", "secondary", "tertiary"]),
160
+ "confirmLabel": _propTypes.default.string,
161
+ "data-component": _propTypes.default.string,
162
+ "data-element": _propTypes.default.string,
163
+ "data-role": _propTypes.default.string,
164
+ "disableAutoFocus": _propTypes.default.bool,
165
+ "disableCancel": _propTypes.default.bool,
166
+ "disableConfirm": _propTypes.default.bool,
167
+ "disableEscKey": _propTypes.default.bool,
168
+ "focusFirstElement": _propTypes.default.shape({
169
+ "current": _propTypes.default.oneOfType([_propTypes.default.oneOf([null]), function (props, propName) {
170
+ if (props[propName] == null) {
171
+ return new Error("Prop '" + propName + "' is required but wasn't specified");
172
+ } else if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
173
+ return new Error("Expected prop '" + propName + "' to be of type Element");
174
+ }
175
+ }]).isRequired
197
176
  }),
198
-
199
- /** Disables auto focus functionality on child elements */
200
- disableAutoFocus: _propTypes.default.bool,
201
-
202
- /** A custom event handler when a confirmation takes place */
203
- onConfirm: _propTypes.default.func.isRequired,
204
-
205
- /** Customise the confirm button label */
206
- confirmLabel: _propTypes.default.string,
207
-
208
- /** Customise the cancel button label */
209
- cancelLabel: _propTypes.default.string,
210
-
211
- /** Apply destructive style to the cancel button */
212
- cancelButtonDestructive: _propTypes.default.bool,
213
-
214
- /** Apply destructive style to the confirm button */
215
- confirmButtonDestructive: _propTypes.default.bool,
216
-
217
- /** Defines a cancel button Icon position related to the children: "before" | "after" */
218
- cancelButtonIconPosition: _propTypes.default.oneOf(["before", "after"]),
219
-
220
- /**
221
- * <a href="https://brand.sage.com/d/NdbrveWvNheA/foundations#/icons/icons" target="_blank">List of supported icons</a>
222
- *
223
- * Defines an Icon type within the cancel button (see Icon for options)
224
- * */
225
- cancelButtonIconType: _propTypes.default.string,
226
-
227
- /** Defines a confirm button Icon position related to the children: "before" | "after" */
228
- confirmButtonIconPosition: _propTypes.default.oneOf(["before", "after"]),
229
-
230
- /**
231
- * <a href="https://brand.sage.com/d/NdbrveWvNheA/foundations#/icons/icons" target="_blank">List of supported icons</a>
232
- *
233
- * Defines an Icon type within the confirm button (see Icon for options)
234
- * */
235
- confirmButtonIconType: _propTypes.default.string,
236
-
237
- /** Defines an Icon type within the button (see Icon for options) */
238
- iconType: _propTypes.default.oneOf(["error", "warning"]),
239
-
240
- /** Makes cancel button disabled */
241
- disableCancel: _propTypes.default.bool,
242
-
243
- /** Makes confirm button disabled */
244
- disableConfirm: _propTypes.default.bool,
245
-
246
- /** Color variants for new business themes: "primary" | "secondary" | "tertiary" | "dashed" | "darkBackground" */
247
- cancelButtonType: _propTypes.default.oneOf(["primary", "secondary", "tertiary", "dashed", "darkBackground"]),
248
-
249
- /** Color variants for new business themes: "primary" | "secondary" | "tertiary" | "dashed" | "darkBackground" */
250
- confirmButtonType: _propTypes.default.oneOf(["primary", "secondary", "tertiary", "dashed", "darkBackground"]),
251
-
252
- /** Adds isLoading state into confirm button */
253
- isLoadingConfirm: _propTypes.default.bool
177
+ "height": _propTypes.default.string,
178
+ "iconType": _propTypes.default.oneOf(["error", "warning"]),
179
+ "isLoadingConfirm": _propTypes.default.bool,
180
+ "onCancel": _propTypes.default.func,
181
+ "onConfirm": _propTypes.default.func.isRequired,
182
+ "open": _propTypes.default.bool.isRequired,
183
+ "showCloseIcon": _propTypes.default.bool,
184
+ "size": _propTypes.default.oneOf(["auto", "extra-large", "extra-small", "large", "medium-large", "medium-small", "medium", "small"]),
185
+ "subtitle": _propTypes.default.string,
186
+ "title": _propTypes.default.node
254
187
  };
255
188
  var _default = Confirm;
256
189
  exports.default = _default;
@@ -0,0 +1 @@
1
+ export declare const CONFIRM_SIZES: string[];
@@ -0,0 +1,5 @@
1
+ import { ConfirmProps } from ".";
2
+ export declare const StyledConfirmButtons: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const StyledConfirmHeading: import("styled-components").StyledComponent<"div", any, {
4
+ type: ConfirmProps["iconType"];
5
+ }, never>;
@@ -7,8 +7,6 @@ exports.StyledConfirmHeading = exports.StyledConfirmButtons = void 0;
7
7
 
8
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
9
 
10
- var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
10
  var _icon = _interopRequireDefault(require("../icon/icon.style"));
13
11
 
14
12
  var _heading = require("../heading/heading.style");
@@ -48,7 +46,4 @@ const StyledConfirmHeading = _styledComponents.default.div`
48
46
  `}
49
47
  }
50
48
  `;
51
- exports.StyledConfirmHeading = StyledConfirmHeading;
52
- StyledConfirmHeading.propTypes = {
53
- type: _propTypes.default.oneOf(["error", "warning"])
54
- };
49
+ exports.StyledConfirmHeading = StyledConfirmHeading;
@@ -1 +1,2 @@
1
- export { default } from "./confirm";
1
+ export { default } from "./confirm.component";
2
+ export type { ConfirmProps } from "./confirm.component";
@@ -83,7 +83,7 @@ const StyledDialog = _styledComponents.default.div`
83
83
  }
84
84
 
85
85
  ${_form.StyledFormFooter}.sticky {
86
- ${_formStyleUtils.calculateWidthValue};
86
+ ${_formStyleUtils.calculateWidthValue}
87
87
  ${props => (0, _formStyleUtils.calculateFormSpacingValues)(props, false)}
88
88
  }
89
89
 
@@ -0,0 +1,7 @@
1
+ declare type StyledContentProps = {
2
+ hasHeader: boolean;
3
+ hasStickyFooter: boolean;
4
+ disableContentPadding?: boolean;
5
+ };
6
+ declare const StyledContent: import("styled-components").StyledComponent<"div", any, StyledContentProps, never>;
7
+ export default StyledContent;
@@ -0,0 +1,55 @@
1
+ import React from "react";
2
+ import { ModalProps } from "../modal";
3
+ export interface DialogFullScreenProps extends ModalProps {
4
+ /** Prop to specify the aria-describedby property of the DialogFullscreen component */
5
+ "aria-describedby"?: string;
6
+ /**
7
+ * Prop to specify the aria-label of the DialogFullscreen component.
8
+ * To be used only when the title prop is not defined, and the component is not labelled by any internal element.
9
+ */
10
+ "aria-label"?: string;
11
+ /**
12
+ * Prop to specify the aria-labelledby property of the DialogFullscreen component
13
+ * To be used when the title prop is a custom React Node,
14
+ * or the component is labelled by an internal element other than the title.
15
+ */
16
+ "aria-labelledby"?: string;
17
+ /** Child elements */
18
+ children?: React.ReactNode;
19
+ /** Reference to the scrollable content element */
20
+ contentRef?: React.ForwardedRef<HTMLDivElement>;
21
+ /** Disables auto focus functionality on child elements */
22
+ disableAutoFocus?: boolean;
23
+ /** remove padding from content */
24
+ disableContentPadding?: boolean;
25
+ /** Optional reference to an element meant to be focused on open */
26
+ focusFirstElement?: React.MutableRefObject<HTMLElement | null>;
27
+ /**
28
+ * Function to replace focus trap
29
+ * @ignore
30
+ * @private
31
+ */
32
+ bespokeFocusTrap?: (ev: KeyboardEvent, firstElement?: HTMLElement, lastElement?: HTMLElement) => void;
33
+ /** Container for components to be displayed in the header */
34
+ headerChildren?: React.ReactNode;
35
+ /** Adds Help tooltip to Header */
36
+ help?: string;
37
+ /** For legacy styling when used with Pages component. Do not use this unless using Pages within a DialogFullScreen */
38
+ pagesStyling?: boolean;
39
+ /** Determines if the close icon is shown */
40
+ showCloseIcon?: boolean;
41
+ /** Subtitle displayed at top of dialog */
42
+ subtitle?: string;
43
+ /** Title displayed at top of dialog */
44
+ title?: React.ReactNode;
45
+ /** The ARIA role to be applied to the DialogFullscreen container */
46
+ role?: string;
47
+ /** an optional array of refs to containers whose content should also be reachable by tabbing from the dialog */
48
+ focusableContainers?: React.MutableRefObject<HTMLElement | null>[];
49
+ /** Optional selector to identify the focusable elements, if not provided a default selector is used */
50
+ focusableSelectors?: string;
51
+ /** A custom close event handler */
52
+ onCancel?: (ev: React.KeyboardEvent<HTMLElement> | React.MouseEvent<HTMLButtonElement>) => void;
53
+ }
54
+ export declare const DialogFullScreen: ({ "aria-describedby": ariaDescribedBy, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, disableAutoFocus, focusFirstElement, bespokeFocusTrap, open, children, title, subtitle, pagesStyling, headerChildren, showCloseIcon, disableContentPadding, disableEscKey, onCancel, contentRef, help, role, focusableContainers, focusableSelectors, ...rest }: DialogFullScreenProps) => JSX.Element;
55
+ export default DialogFullScreen;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = void 0;
6
+ exports.default = exports.DialogFullScreen = void 0;
7
7
 
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
 
@@ -45,7 +45,7 @@ const DialogFullScreen = ({
45
45
  "aria-describedby": ariaDescribedBy,
46
46
  "aria-label": ariaLabel,
47
47
  "aria-labelledby": ariaLabelledBy,
48
- disableAutoFocus,
48
+ disableAutoFocus = false,
49
49
  focusFirstElement,
50
50
  bespokeFocusTrap,
51
51
  open,
@@ -54,7 +54,7 @@ const DialogFullScreen = ({
54
54
  subtitle,
55
55
  pagesStyling,
56
56
  headerChildren,
57
- showCloseIcon,
57
+ showCloseIcon = true,
58
58
  disableContentPadding,
59
59
  disableEscKey,
60
60
  onCancel,
@@ -141,90 +141,55 @@ const DialogFullScreen = ({
141
141
  }, children))));
142
142
  };
143
143
 
144
- DialogFullScreen.defaultProps = {
145
- showCloseIcon: true,
146
- disableAutoFocus: false
147
- };
144
+ exports.DialogFullScreen = DialogFullScreen;
148
145
  DialogFullScreen.propTypes = {
149
- /** Prop to specify the aria-describedby property of the DialogFullscreen component */
150
146
  "aria-describedby": _propTypes.default.string,
151
-
152
- /**
153
- * Prop to specify the aria-label of the DialogFullscreen component.
154
- * To be used only when the title prop is not defined, and the component is not labelled by any internal element.
155
- */
156
147
  "aria-label": _propTypes.default.string,
157
-
158
- /**
159
- * Prop to specify the aria-labelledby property of the DialogFullscreen component
160
- * To be used when the title prop is a custom React Node,
161
- * or the component is labelled by an internal element other than the title.
162
- */
163
148
  "aria-labelledby": _propTypes.default.string,
164
-
165
- /** Controls the open state of the component */
166
- open: _propTypes.default.bool.isRequired,
167
-
168
- /** A custom close event handler */
169
- onCancel: _propTypes.default.func,
170
-
171
- /** Optional reference to an element meant to be focused on open */
172
- focusFirstElement: _propTypes.default.shape({
173
- current: _propTypes.default.any
174
- }),
175
-
176
- /** Disables auto focus functionality on child elements */
177
- disableAutoFocus: _propTypes.default.bool,
178
-
179
- /**
180
- * Function to replace focus trap
181
- * @ignore
182
- * @private
183
- */
184
- bespokeFocusTrap: _propTypes.default.func,
185
-
186
- /** Determines if the Esc Key closes the Dialog */
187
- disableEscKey: _propTypes.default.bool,
188
-
189
- /** Adds Help tooltip to Header */
190
- help: _propTypes.default.string,
191
-
192
- /** remove padding from content */
193
- disableContentPadding: _propTypes.default.bool,
194
-
195
- /** Child elements */
196
- children: _propTypes.default.node,
197
-
198
- /** Title displayed at top of dialog */
199
- title: _propTypes.default.node,
200
-
201
- /** Subtitle displayed at top of dialog */
202
- subtitle: _propTypes.default.string,
203
-
204
- /** Determines if the close icon is shown */
205
- showCloseIcon: _propTypes.default.bool,
206
-
207
- /** Container for components to be displayed in the header */
208
- headerChildren: _propTypes.default.node,
209
-
210
- /** For legacy styling when used with Pages component. Do not use this unless using Pages within a DialogFullScreen */
211
- pagesStyling: _propTypes.default.bool,
212
-
213
- /** Reference to the scrollable content element */
214
- contentRef: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.shape({
215
- current: _propTypes.default.instanceOf(Element)
149
+ "ariaRole": _propTypes.default.string,
150
+ "bespokeFocusTrap": _propTypes.default.func,
151
+ "children": _propTypes.default.node,
152
+ "className": _propTypes.default.string,
153
+ "contentRef": _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.shape({
154
+ "current": _propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.object]).isRequired
216
155
  })]),
217
-
218
- /** The ARIA role to be applied to the DialogFullscreen container */
219
- role: _propTypes.default.string,
220
-
221
- /** an optional array of refs to containers whose content should also be reachable by tabbing from the dialog */
222
- focusableContainers: _propTypes.default.arrayOf(_propTypes.default.shape({
223
- current: _propTypes.default.any
156
+ "data-component": _propTypes.default.string,
157
+ "data-element": _propTypes.default.string,
158
+ "data-role": _propTypes.default.string,
159
+ "disableAutoFocus": _propTypes.default.bool,
160
+ "disableClose": _propTypes.default.bool,
161
+ "disableContentPadding": _propTypes.default.bool,
162
+ "disableEscKey": _propTypes.default.bool,
163
+ "enableBackgroundUI": _propTypes.default.bool,
164
+ "focusableContainers": _propTypes.default.arrayOf(_propTypes.default.shape({
165
+ "current": _propTypes.default.oneOfType([_propTypes.default.oneOf([null]), function (props, propName) {
166
+ if (props[propName] == null) {
167
+ return new Error("Prop '" + propName + "' is required but wasn't specified");
168
+ } else if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
169
+ return new Error("Expected prop '" + propName + "' to be of type Element");
170
+ }
171
+ }]).isRequired
224
172
  })),
225
-
226
- /** Optional selector to identify the focusable elements, if not provided a default selector is used */
227
- focusableSelectors: _propTypes.default.string
173
+ "focusableSelectors": _propTypes.default.string,
174
+ "focusFirstElement": _propTypes.default.shape({
175
+ "current": _propTypes.default.oneOfType([_propTypes.default.oneOf([null]), function (props, propName) {
176
+ if (props[propName] == null) {
177
+ return new Error("Prop '" + propName + "' is required but wasn't specified");
178
+ } else if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
179
+ return new Error("Expected prop '" + propName + "' to be of type Element");
180
+ }
181
+ }]).isRequired
182
+ }),
183
+ "headerChildren": _propTypes.default.node,
184
+ "help": _propTypes.default.string,
185
+ "onCancel": _propTypes.default.func,
186
+ "open": _propTypes.default.bool.isRequired,
187
+ "pagesStyling": _propTypes.default.bool,
188
+ "role": _propTypes.default.string,
189
+ "showCloseIcon": _propTypes.default.bool,
190
+ "subtitle": _propTypes.default.string,
191
+ "timeout": _propTypes.default.number,
192
+ "title": _propTypes.default.node
228
193
  };
229
194
  var _default = DialogFullScreen;
230
195
  exports.default = _default;
@@ -0,0 +1,4 @@
1
+ declare const StyledDialogFullScreen: import("styled-components").StyledComponent<"div", any, {
2
+ pagesStyling?: boolean | undefined;
3
+ }, never>;
4
+ export default StyledDialogFullScreen;
@@ -1 +1,2 @@
1
- export { default } from "./dialog-full-screen";
1
+ export { default } from "./dialog-full-screen.component";
2
+ export type { DialogFullScreenProps } from "./dialog-full-screen.component";
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { SpaceProps } from "styled-system";
2
+ import { SpaceProps, PaddingProps } from "styled-system";
3
3
  import { FormButtonAlignment } from "./form.config";
4
4
  export interface FormProps extends SpaceProps {
5
5
  /** Alignment of buttons */
@@ -28,9 +28,11 @@ export interface FormProps extends SpaceProps {
28
28
  height?: string;
29
29
  /** Applies styling for full width buttons. Please note that you will still need to pass the `fullWidth` prop to the button you compose */
30
30
  fullWidthButtons?: boolean;
31
+ /** Padding to be set on the form footer */
32
+ footerPadding?: PaddingProps;
31
33
  }
32
34
  export declare const Form: {
33
- ({ children, saveButton, leftSideButtons, rightSideButtons, errorCount, warningCount, onSubmit, buttonAlignment, stickyFooter, fieldSpacing, noValidate, height, fullWidthButtons, ...rest }: FormProps): JSX.Element;
35
+ ({ children, saveButton, leftSideButtons, rightSideButtons, errorCount, warningCount, onSubmit, buttonAlignment, stickyFooter, fieldSpacing, noValidate, height, fullWidthButtons, footerPadding, ...rest }: FormProps): JSX.Element;
34
36
  displayName: string;
35
37
  };
36
38
  export default Form;