carbon-react 110.6.1 → 110.7.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__/checkable-input/checkable-input.component.js +1 -0
- package/esm/__internal__/input/input.component.js +1 -0
- package/esm/components/accordion/accordion-group/accordion-group.component.js +1 -0
- package/esm/components/alert/alert.component.d.ts +1 -1
- package/esm/components/alert/alert.component.js +9 -4
- package/esm/components/alert/index.d.ts +1 -1
- package/esm/components/dialog/dialog.component.d.ts +59 -0
- package/esm/components/dialog/dialog.component.js +52 -84
- package/esm/components/dialog/dialog.config.d.ts +5 -0
- package/esm/components/dialog/dialog.style.d.ts +25 -0
- package/esm/components/dialog/index.d.ts +2 -1
- package/esm/components/dialog/index.js +1 -1
- package/esm/components/dismissible-box/dismissible-box.component.js +40 -0
- package/esm/components/form/__internal__/form-summary.component.js +16 -9
- package/esm/components/form/__internal__/form-summary.d.ts +2 -0
- package/esm/components/form/__internal__/form-summary.style.js +11 -2
- package/esm/components/form/form.component.js +23 -4
- package/esm/components/form/form.config.d.ts +1 -0
- package/esm/components/form/form.d.ts +2 -0
- package/esm/components/form/form.style.d.ts +6 -0
- package/esm/components/form/form.style.js +17 -3
- package/esm/components/global-header/global-header.component.js +16 -0
- package/esm/components/grid/grid-container/grid-container.component.js +25 -0
- package/esm/components/grid/grid-item/grid-item.component.js +13 -0
- package/esm/components/image/image.component.js +30 -0
- package/esm/components/modal/modal.component.d.ts +2 -0
- package/esm/components/modal/modal.component.js +1 -0
- package/esm/components/multi-action-button/multi-action-button.component.js +1 -0
- package/esm/components/navigation-bar/navigation-bar.component.js +16 -0
- package/esm/components/search/search.style.d.ts +4 -0
- package/esm/components/split-button/split-button.component.js +1 -0
- package/esm/components/textarea/textarea.style.d.ts +3 -0
- package/esm/components/textbox/textbox.component.js +1 -0
- package/lib/__internal__/checkable-input/checkable-input.component.js +1 -0
- package/lib/__internal__/input/input.component.js +1 -0
- package/lib/components/accordion/accordion-group/accordion-group.component.js +1 -0
- package/lib/components/alert/alert.component.d.ts +1 -1
- package/lib/components/alert/alert.component.js +9 -4
- package/lib/components/alert/index.d.ts +1 -1
- package/lib/components/dialog/dialog.component.d.ts +59 -0
- package/lib/components/dialog/dialog.component.js +53 -85
- package/lib/components/dialog/dialog.config.d.ts +5 -0
- package/lib/components/dialog/dialog.style.d.ts +25 -0
- package/lib/components/dialog/index.d.ts +2 -1
- package/lib/components/dialog/index.js +2 -2
- package/lib/components/dismissible-box/dismissible-box.component.js +40 -0
- package/lib/components/form/__internal__/form-summary.component.js +16 -9
- package/lib/components/form/__internal__/form-summary.d.ts +2 -0
- package/lib/components/form/__internal__/form-summary.style.js +11 -2
- package/lib/components/form/form.component.js +22 -3
- package/lib/components/form/form.config.d.ts +1 -0
- package/lib/components/form/form.d.ts +2 -0
- package/lib/components/form/form.style.d.ts +6 -0
- package/lib/components/form/form.style.js +19 -4
- package/lib/components/global-header/global-header.component.js +16 -0
- package/lib/components/grid/grid-container/grid-container.component.js +25 -0
- package/lib/components/grid/grid-item/grid-item.component.js +13 -0
- package/lib/components/image/image.component.js +30 -0
- package/lib/components/modal/modal.component.d.ts +2 -0
- package/lib/components/modal/modal.component.js +1 -0
- package/lib/components/multi-action-button/multi-action-button.component.js +1 -0
- package/lib/components/navigation-bar/navigation-bar.component.js +16 -0
- package/lib/components/search/search.style.d.ts +4 -0
- package/lib/components/split-button/split-button.component.js +1 -0
- package/lib/components/textarea/textarea.style.d.ts +3 -0
- package/lib/components/textbox/textbox.component.js +1 -0
- package/package.json +4 -9
- package/esm/components/dialog/dialog.d.ts +0 -68
- package/lib/components/dialog/dialog.d.ts +0 -68
|
@@ -29,6 +29,7 @@ NavigationBar.propTypes = {
|
|
|
29
29
|
"alignContent": PropTypes.oneOfType([PropTypes.oneOf(["-moz-initial", "baseline", "center", "end", "flex-end", "flex-start", "inherit", "initial", "normal", "revert", "space-around", "space-between", "space-evenly", "start", "stretch", "unset"]), PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(["-moz-initial", "baseline", "center", "end", "flex-end", "flex-start", "inherit", "initial", "normal", "revert", "space-around", "space-between", "space-evenly", "start", "stretch", "unset", null]), PropTypes.shape({
|
|
30
30
|
"__@iterator": PropTypes.func.isRequired,
|
|
31
31
|
"anchor": PropTypes.func.isRequired,
|
|
32
|
+
"at": PropTypes.func.isRequired,
|
|
32
33
|
"big": PropTypes.func.isRequired,
|
|
33
34
|
"blink": PropTypes.func.isRequired,
|
|
34
35
|
"bold": PropTypes.func.isRequired,
|
|
@@ -78,6 +79,7 @@ NavigationBar.propTypes = {
|
|
|
78
79
|
})])), PropTypes.object, PropTypes.shape({
|
|
79
80
|
"__@iterator": PropTypes.func.isRequired,
|
|
80
81
|
"anchor": PropTypes.func.isRequired,
|
|
82
|
+
"at": PropTypes.func.isRequired,
|
|
81
83
|
"big": PropTypes.func.isRequired,
|
|
82
84
|
"blink": PropTypes.func.isRequired,
|
|
83
85
|
"bold": PropTypes.func.isRequired,
|
|
@@ -128,6 +130,7 @@ NavigationBar.propTypes = {
|
|
|
128
130
|
"alignItems": PropTypes.oneOfType([PropTypes.oneOf(["-moz-initial", "baseline", "center", "end", "flex-end", "flex-start", "inherit", "initial", "normal", "revert", "self-end", "self-start", "start", "stretch", "unset"]), PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(["-moz-initial", "baseline", "center", "end", "flex-end", "flex-start", "inherit", "initial", "normal", "revert", "self-end", "self-start", "start", "stretch", "unset", null]), PropTypes.shape({
|
|
129
131
|
"__@iterator": PropTypes.func.isRequired,
|
|
130
132
|
"anchor": PropTypes.func.isRequired,
|
|
133
|
+
"at": PropTypes.func.isRequired,
|
|
131
134
|
"big": PropTypes.func.isRequired,
|
|
132
135
|
"blink": PropTypes.func.isRequired,
|
|
133
136
|
"bold": PropTypes.func.isRequired,
|
|
@@ -177,6 +180,7 @@ NavigationBar.propTypes = {
|
|
|
177
180
|
})])), PropTypes.object, PropTypes.shape({
|
|
178
181
|
"__@iterator": PropTypes.func.isRequired,
|
|
179
182
|
"anchor": PropTypes.func.isRequired,
|
|
183
|
+
"at": PropTypes.func.isRequired,
|
|
180
184
|
"big": PropTypes.func.isRequired,
|
|
181
185
|
"blink": PropTypes.func.isRequired,
|
|
182
186
|
"bold": PropTypes.func.isRequired,
|
|
@@ -227,6 +231,7 @@ NavigationBar.propTypes = {
|
|
|
227
231
|
"alignSelf": PropTypes.oneOfType([PropTypes.oneOf(["-moz-initial", "auto", "baseline", "center", "end", "flex-end", "flex-start", "inherit", "initial", "normal", "revert", "self-end", "self-start", "start", "stretch", "unset"]), PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(["-moz-initial", "auto", "baseline", "center", "end", "flex-end", "flex-start", "inherit", "initial", "normal", "revert", "self-end", "self-start", "start", "stretch", "unset", null]), PropTypes.shape({
|
|
228
232
|
"__@iterator": PropTypes.func.isRequired,
|
|
229
233
|
"anchor": PropTypes.func.isRequired,
|
|
234
|
+
"at": PropTypes.func.isRequired,
|
|
230
235
|
"big": PropTypes.func.isRequired,
|
|
231
236
|
"blink": PropTypes.func.isRequired,
|
|
232
237
|
"bold": PropTypes.func.isRequired,
|
|
@@ -276,6 +281,7 @@ NavigationBar.propTypes = {
|
|
|
276
281
|
})])), PropTypes.object, PropTypes.shape({
|
|
277
282
|
"__@iterator": PropTypes.func.isRequired,
|
|
278
283
|
"anchor": PropTypes.func.isRequired,
|
|
284
|
+
"at": PropTypes.func.isRequired,
|
|
279
285
|
"big": PropTypes.func.isRequired,
|
|
280
286
|
"blink": PropTypes.func.isRequired,
|
|
281
287
|
"bold": PropTypes.func.isRequired,
|
|
@@ -328,6 +334,7 @@ NavigationBar.propTypes = {
|
|
|
328
334
|
"flex": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
329
335
|
"__@iterator": PropTypes.func.isRequired,
|
|
330
336
|
"anchor": PropTypes.func.isRequired,
|
|
337
|
+
"at": PropTypes.func.isRequired,
|
|
331
338
|
"big": PropTypes.func.isRequired,
|
|
332
339
|
"blink": PropTypes.func.isRequired,
|
|
333
340
|
"bold": PropTypes.func.isRequired,
|
|
@@ -377,6 +384,7 @@ NavigationBar.propTypes = {
|
|
|
377
384
|
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
378
385
|
"__@iterator": PropTypes.func.isRequired,
|
|
379
386
|
"anchor": PropTypes.func.isRequired,
|
|
387
|
+
"at": PropTypes.func.isRequired,
|
|
380
388
|
"big": PropTypes.func.isRequired,
|
|
381
389
|
"blink": PropTypes.func.isRequired,
|
|
382
390
|
"bold": PropTypes.func.isRequired,
|
|
@@ -427,6 +435,7 @@ NavigationBar.propTypes = {
|
|
|
427
435
|
"flexBasis": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
428
436
|
"__@iterator": PropTypes.func.isRequired,
|
|
429
437
|
"anchor": PropTypes.func.isRequired,
|
|
438
|
+
"at": PropTypes.func.isRequired,
|
|
430
439
|
"big": PropTypes.func.isRequired,
|
|
431
440
|
"blink": PropTypes.func.isRequired,
|
|
432
441
|
"bold": PropTypes.func.isRequired,
|
|
@@ -476,6 +485,7 @@ NavigationBar.propTypes = {
|
|
|
476
485
|
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
477
486
|
"__@iterator": PropTypes.func.isRequired,
|
|
478
487
|
"anchor": PropTypes.func.isRequired,
|
|
488
|
+
"at": PropTypes.func.isRequired,
|
|
479
489
|
"big": PropTypes.func.isRequired,
|
|
480
490
|
"blink": PropTypes.func.isRequired,
|
|
481
491
|
"bold": PropTypes.func.isRequired,
|
|
@@ -559,6 +569,7 @@ NavigationBar.propTypes = {
|
|
|
559
569
|
"justifyContent": PropTypes.oneOfType([PropTypes.oneOf(["-moz-initial", "center", "end", "flex-end", "flex-start", "inherit", "initial", "left", "normal", "revert", "right", "space-around", "space-between", "space-evenly", "start", "stretch", "unset"]), PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(["-moz-initial", "center", "end", "flex-end", "flex-start", "inherit", "initial", "left", "normal", "revert", "right", "space-around", "space-between", "space-evenly", "start", "stretch", "unset", null]), PropTypes.shape({
|
|
560
570
|
"__@iterator": PropTypes.func.isRequired,
|
|
561
571
|
"anchor": PropTypes.func.isRequired,
|
|
572
|
+
"at": PropTypes.func.isRequired,
|
|
562
573
|
"big": PropTypes.func.isRequired,
|
|
563
574
|
"blink": PropTypes.func.isRequired,
|
|
564
575
|
"bold": PropTypes.func.isRequired,
|
|
@@ -608,6 +619,7 @@ NavigationBar.propTypes = {
|
|
|
608
619
|
})])), PropTypes.object, PropTypes.shape({
|
|
609
620
|
"__@iterator": PropTypes.func.isRequired,
|
|
610
621
|
"anchor": PropTypes.func.isRequired,
|
|
622
|
+
"at": PropTypes.func.isRequired,
|
|
611
623
|
"big": PropTypes.func.isRequired,
|
|
612
624
|
"blink": PropTypes.func.isRequired,
|
|
613
625
|
"bold": PropTypes.func.isRequired,
|
|
@@ -658,6 +670,7 @@ NavigationBar.propTypes = {
|
|
|
658
670
|
"justifyItems": PropTypes.oneOfType([PropTypes.oneOf(["-moz-initial", "baseline", "center", "end", "flex-end", "flex-start", "inherit", "initial", "left", "legacy", "normal", "revert", "right", "self-end", "self-start", "start", "stretch", "unset"]), PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(["-moz-initial", "baseline", "center", "end", "flex-end", "flex-start", "inherit", "initial", "left", "legacy", "normal", "revert", "right", "self-end", "self-start", "start", "stretch", "unset", null]), PropTypes.shape({
|
|
659
671
|
"__@iterator": PropTypes.func.isRequired,
|
|
660
672
|
"anchor": PropTypes.func.isRequired,
|
|
673
|
+
"at": PropTypes.func.isRequired,
|
|
661
674
|
"big": PropTypes.func.isRequired,
|
|
662
675
|
"blink": PropTypes.func.isRequired,
|
|
663
676
|
"bold": PropTypes.func.isRequired,
|
|
@@ -707,6 +720,7 @@ NavigationBar.propTypes = {
|
|
|
707
720
|
})])), PropTypes.object, PropTypes.shape({
|
|
708
721
|
"__@iterator": PropTypes.func.isRequired,
|
|
709
722
|
"anchor": PropTypes.func.isRequired,
|
|
723
|
+
"at": PropTypes.func.isRequired,
|
|
710
724
|
"big": PropTypes.func.isRequired,
|
|
711
725
|
"blink": PropTypes.func.isRequired,
|
|
712
726
|
"bold": PropTypes.func.isRequired,
|
|
@@ -757,6 +771,7 @@ NavigationBar.propTypes = {
|
|
|
757
771
|
"justifySelf": PropTypes.oneOfType([PropTypes.oneOf(["-moz-initial", "auto", "baseline", "center", "end", "flex-end", "flex-start", "inherit", "initial", "left", "normal", "revert", "right", "self-end", "self-start", "start", "stretch", "unset"]), PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(["-moz-initial", "auto", "baseline", "center", "end", "flex-end", "flex-start", "inherit", "initial", "left", "normal", "revert", "right", "self-end", "self-start", "start", "stretch", "unset", null]), PropTypes.shape({
|
|
758
772
|
"__@iterator": PropTypes.func.isRequired,
|
|
759
773
|
"anchor": PropTypes.func.isRequired,
|
|
774
|
+
"at": PropTypes.func.isRequired,
|
|
760
775
|
"big": PropTypes.func.isRequired,
|
|
761
776
|
"blink": PropTypes.func.isRequired,
|
|
762
777
|
"bold": PropTypes.func.isRequired,
|
|
@@ -806,6 +821,7 @@ NavigationBar.propTypes = {
|
|
|
806
821
|
})])), PropTypes.object, PropTypes.shape({
|
|
807
822
|
"__@iterator": PropTypes.func.isRequired,
|
|
808
823
|
"anchor": PropTypes.func.isRequired,
|
|
824
|
+
"at": PropTypes.func.isRequired,
|
|
809
825
|
"big": PropTypes.func.isRequired,
|
|
810
826
|
"blink": PropTypes.func.isRequired,
|
|
811
827
|
"bold": PropTypes.func.isRequired,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export default StyledSearch;
|
|
2
|
+
export const StyledSearchButton: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export const StyledButtonIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
declare const StyledSearch: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -600,6 +600,7 @@ SplitButton.propTypes = {
|
|
|
600
600
|
"role": PropTypes.oneOfType([PropTypes.oneOf(["alert", "alertdialog", "application", "article", "banner", "button", "cell", "checkbox", "columnheader", "combobox", "complementary", "contentinfo", "definition", "dialog", "directory", "document", "feed", "figure", "form", "grid", "gridcell", "group", "heading", "img", "link", "list", "listbox", "listitem", "log", "main", "marquee", "math", "menu", "menubar", "menuitem", "menuitemcheckbox", "menuitemradio", "navigation", "none", "note", "option", "presentation", "progressbar", "radio", "radiogroup", "region", "row", "rowgroup", "rowheader", "scrollbar", "search", "searchbox", "separator", "slider", "spinbutton", "status", "switch", "tab", "table", "tablist", "tabpanel", "term", "textbox", "timer", "toolbar", "tooltip", "tree", "treegrid", "treeitem"]), PropTypes.shape({
|
|
601
601
|
"__@iterator": PropTypes.func.isRequired,
|
|
602
602
|
"anchor": PropTypes.func.isRequired,
|
|
603
|
+
"at": PropTypes.func.isRequired,
|
|
603
604
|
"big": PropTypes.func.isRequired,
|
|
604
605
|
"blink": PropTypes.func.isRequired,
|
|
605
606
|
"bold": PropTypes.func.isRequired,
|
|
@@ -646,6 +646,7 @@ Textbox.propTypes = {
|
|
|
646
646
|
"role": PropTypes.oneOfType([PropTypes.oneOf(["alert", "alertdialog", "application", "article", "banner", "button", "cell", "checkbox", "columnheader", "combobox", "complementary", "contentinfo", "definition", "dialog", "directory", "document", "feed", "figure", "form", "grid", "gridcell", "group", "heading", "img", "link", "list", "listbox", "listitem", "log", "main", "marquee", "math", "menu", "menubar", "menuitem", "menuitemcheckbox", "menuitemradio", "navigation", "none", "note", "option", "presentation", "progressbar", "radio", "radiogroup", "region", "row", "rowgroup", "rowheader", "scrollbar", "search", "searchbox", "separator", "slider", "spinbutton", "status", "switch", "tab", "table", "tablist", "tabpanel", "term", "textbox", "timer", "toolbar", "tooltip", "tree", "treegrid", "treeitem"]), PropTypes.shape({
|
|
647
647
|
"__@iterator": PropTypes.func.isRequired,
|
|
648
648
|
"anchor": PropTypes.func.isRequired,
|
|
649
|
+
"at": PropTypes.func.isRequired,
|
|
649
650
|
"big": PropTypes.func.isRequired,
|
|
650
651
|
"blink": PropTypes.func.isRequired,
|
|
651
652
|
"bold": PropTypes.func.isRequired,
|
|
@@ -420,6 +420,7 @@ CheckableInput.propTypes = {
|
|
|
420
420
|
"role": _propTypes.default.oneOfType([_propTypes.default.oneOf(["alert", "alertdialog", "application", "article", "banner", "button", "cell", "checkbox", "columnheader", "combobox", "complementary", "contentinfo", "definition", "dialog", "directory", "document", "feed", "figure", "form", "grid", "gridcell", "group", "heading", "img", "link", "list", "listbox", "listitem", "log", "main", "marquee", "math", "menu", "menubar", "menuitem", "menuitemcheckbox", "menuitemradio", "navigation", "none", "note", "option", "presentation", "progressbar", "radio", "radiogroup", "region", "row", "rowgroup", "rowheader", "scrollbar", "search", "searchbox", "separator", "slider", "spinbutton", "status", "switch", "tab", "table", "tablist", "tabpanel", "term", "textbox", "timer", "toolbar", "tooltip", "tree", "treegrid", "treeitem"]), _propTypes.default.shape({
|
|
421
421
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
422
422
|
"anchor": _propTypes.default.func.isRequired,
|
|
423
|
+
"at": _propTypes.default.func.isRequired,
|
|
423
424
|
"big": _propTypes.default.func.isRequired,
|
|
424
425
|
"blink": _propTypes.default.func.isRequired,
|
|
425
426
|
"bold": _propTypes.default.func.isRequired,
|
|
@@ -451,6 +451,7 @@ Input.propTypes = {
|
|
|
451
451
|
"role": _propTypes.default.oneOfType([_propTypes.default.oneOf(["alert", "alertdialog", "application", "article", "banner", "button", "cell", "checkbox", "columnheader", "combobox", "complementary", "contentinfo", "definition", "dialog", "directory", "document", "feed", "figure", "form", "grid", "gridcell", "group", "heading", "img", "link", "list", "listbox", "listitem", "log", "main", "marquee", "math", "menu", "menubar", "menuitem", "menuitemcheckbox", "menuitemradio", "navigation", "none", "note", "option", "presentation", "progressbar", "radio", "radiogroup", "region", "row", "rowgroup", "rowheader", "scrollbar", "search", "searchbox", "separator", "slider", "spinbutton", "status", "switch", "tab", "table", "tablist", "tabpanel", "term", "textbox", "timer", "toolbar", "tooltip", "tree", "treegrid", "treeitem"]), _propTypes.default.shape({
|
|
452
452
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
453
453
|
"anchor": _propTypes.default.func.isRequired,
|
|
454
|
+
"at": _propTypes.default.func.isRequired,
|
|
454
455
|
"big": _propTypes.default.func.isRequired,
|
|
455
456
|
"blink": _propTypes.default.func.isRequired,
|
|
456
457
|
"bold": _propTypes.default.func.isRequired,
|
|
@@ -92,6 +92,7 @@ AccordionGroup.propTypes = {
|
|
|
92
92
|
"children": _propTypes.default.oneOfType([_propTypes.default.element, _propTypes.default.shape({
|
|
93
93
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
94
94
|
"__@unscopables": _propTypes.default.func.isRequired,
|
|
95
|
+
"at": _propTypes.default.func.isRequired,
|
|
95
96
|
"concat": _propTypes.default.func.isRequired,
|
|
96
97
|
"copyWithin": _propTypes.default.func.isRequired,
|
|
97
98
|
"entries": _propTypes.default.func.isRequired,
|
|
@@ -31,34 +31,39 @@ Alert.propTypes = {
|
|
|
31
31
|
"aria-label": _propTypes.default.string,
|
|
32
32
|
"aria-labelledby": _propTypes.default.string,
|
|
33
33
|
"ariaRole": _propTypes.default.string,
|
|
34
|
+
"bespokeFocusTrap": _propTypes.default.func,
|
|
34
35
|
"children": _propTypes.default.node,
|
|
36
|
+
"className": _propTypes.default.string,
|
|
35
37
|
"contentPadding": _propTypes.default.shape({
|
|
36
38
|
"p": _propTypes.default.oneOf([0, 1, 2, 3, 4, 5, 6, 7, 8]),
|
|
37
39
|
"px": _propTypes.default.oneOf([0, 1, 2, 3, 4, 5, 6, 7, 8]),
|
|
38
40
|
"py": _propTypes.default.oneOf([0, 1, 2, 3, 4, 5, 6, 7, 8])
|
|
39
41
|
}),
|
|
42
|
+
"data-component": _propTypes.default.string,
|
|
43
|
+
"data-element": _propTypes.default.string,
|
|
44
|
+
"data-role": _propTypes.default.string,
|
|
40
45
|
"disableAutoFocus": _propTypes.default.bool,
|
|
41
46
|
"disableClose": _propTypes.default.bool,
|
|
42
47
|
"disableEscKey": _propTypes.default.bool,
|
|
43
48
|
"disableFocusTrap": _propTypes.default.bool,
|
|
44
49
|
"enableBackgroundUI": _propTypes.default.bool,
|
|
45
50
|
"focusableContainers": _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
46
|
-
"current": function (props, propName) {
|
|
51
|
+
"current": _propTypes.default.oneOfType([_propTypes.default.oneOf([null]), function (props, propName) {
|
|
47
52
|
if (props[propName] == null) {
|
|
48
53
|
return new Error("Prop '" + propName + "' is required but wasn't specified");
|
|
49
54
|
} else if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
50
55
|
return new Error("Expected prop '" + propName + "' to be of type Element");
|
|
51
56
|
}
|
|
52
|
-
}
|
|
57
|
+
}]).isRequired
|
|
53
58
|
})),
|
|
54
59
|
"focusFirstElement": _propTypes.default.shape({
|
|
55
|
-
"current": function (props, propName) {
|
|
60
|
+
"current": _propTypes.default.oneOfType([_propTypes.default.oneOf([null]), function (props, propName) {
|
|
56
61
|
if (props[propName] == null) {
|
|
57
62
|
return new Error("Prop '" + propName + "' is required but wasn't specified");
|
|
58
63
|
} else if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
59
64
|
return new Error("Expected prop '" + propName + "' to be of type Element");
|
|
60
65
|
}
|
|
61
|
-
}
|
|
66
|
+
}]).isRequired
|
|
62
67
|
}),
|
|
63
68
|
"height": _propTypes.default.string,
|
|
64
69
|
"help": _propTypes.default.string,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from "./alert.component";
|
|
2
|
-
export type { DialogProps as AlertProps } from "../dialog
|
|
2
|
+
export type { DialogProps as AlertProps } from "../dialog";
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ModalProps } from "../modal";
|
|
3
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
|
|
4
|
+
declare type PaddingValues = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
5
|
+
export interface ContentPaddingInterface {
|
|
6
|
+
p?: PaddingValues;
|
|
7
|
+
py?: PaddingValues;
|
|
8
|
+
px?: PaddingValues;
|
|
9
|
+
}
|
|
10
|
+
declare type DialogSizes = "auto" | "extra-small" | "small" | "medium-small" | "medium" | "medium-large" | "large" | "extra-large";
|
|
11
|
+
export interface DialogProps extends ModalProps, TagProps {
|
|
12
|
+
/** Custom class name */
|
|
13
|
+
className?: string;
|
|
14
|
+
/** Prop to specify the aria-describedby property of the Dialog component */
|
|
15
|
+
"aria-describedby"?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Prop to specify the aria-label of the Dialog component.
|
|
18
|
+
* To be used only when the title prop is not defined, and the component is not labelled by any internal element.
|
|
19
|
+
*/
|
|
20
|
+
"aria-label"?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Prop to specify the aria-labelledby property of the Dialog component
|
|
23
|
+
* To be used when the title prop is a custom React Node,
|
|
24
|
+
* or the component is labelled by an internal element other than the title.
|
|
25
|
+
*/
|
|
26
|
+
"aria-labelledby"?: string;
|
|
27
|
+
disableAutoFocus?: boolean;
|
|
28
|
+
disableFocusTrap?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Function to replace focus trap
|
|
31
|
+
* @ignore
|
|
32
|
+
* @private
|
|
33
|
+
*/
|
|
34
|
+
bespokeFocusTrap?: (ev: KeyboardEvent, firstElement?: HTMLElement, lastElement?: HTMLElement) => void;
|
|
35
|
+
/** Optional reference to an element meant to be focused on open */
|
|
36
|
+
focusFirstElement?: React.MutableRefObject<HTMLElement | null>;
|
|
37
|
+
/** Allows developers to specify a specific height for the dialog. */
|
|
38
|
+
height?: string;
|
|
39
|
+
/** Adds Help tooltip to Header */
|
|
40
|
+
help?: string;
|
|
41
|
+
/** A custom close event handler */
|
|
42
|
+
onCancel?: (ev: React.KeyboardEvent<HTMLElement> | React.MouseEvent<HTMLButtonElement>) => void;
|
|
43
|
+
/** Determines if the close icon is shown */
|
|
44
|
+
showCloseIcon?: boolean;
|
|
45
|
+
/** Size of dialog, default size is 750px */
|
|
46
|
+
size?: DialogSizes;
|
|
47
|
+
/** Subtitle displayed at top of dialog */
|
|
48
|
+
subtitle?: string;
|
|
49
|
+
/** Title displayed at top of dialog */
|
|
50
|
+
title?: React.ReactNode;
|
|
51
|
+
/** The ARIA role to be applied to the Dialog container */
|
|
52
|
+
role?: string;
|
|
53
|
+
/** Padding to be set on the Dialog content */
|
|
54
|
+
contentPadding?: ContentPaddingInterface;
|
|
55
|
+
/** an optional array of refs to containers whose content should also be reachable by tabbing from the dialog */
|
|
56
|
+
focusableContainers?: React.MutableRefObject<HTMLElement | null>[];
|
|
57
|
+
}
|
|
58
|
+
export declare const Dialog: ({ className, children, open, height, size, title, disableEscKey, subtitle, disableAutoFocus, focusFirstElement, onCancel, showCloseIcon, bespokeFocusTrap, disableClose, help, role, contentPadding, focusableContainers, ...rest }: DialogProps) => JSX.Element;
|
|
59
|
+
export default Dialog;
|
|
@@ -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.Dialog = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
@@ -42,14 +42,14 @@ const Dialog = ({
|
|
|
42
42
|
children,
|
|
43
43
|
open,
|
|
44
44
|
height,
|
|
45
|
-
size,
|
|
45
|
+
size = "medium",
|
|
46
46
|
title,
|
|
47
47
|
disableEscKey,
|
|
48
48
|
subtitle,
|
|
49
|
-
disableAutoFocus,
|
|
49
|
+
disableAutoFocus = false,
|
|
50
50
|
focusFirstElement,
|
|
51
51
|
onCancel,
|
|
52
|
-
showCloseIcon,
|
|
52
|
+
showCloseIcon = true,
|
|
53
53
|
bespokeFocusTrap,
|
|
54
54
|
disableClose,
|
|
55
55
|
help,
|
|
@@ -70,6 +70,11 @@ const Dialog = ({
|
|
|
70
70
|
current: subtitleId
|
|
71
71
|
} = (0, _react.useRef)((0, _guid.default)());
|
|
72
72
|
const centerDialog = (0, _react.useCallback)(() => {
|
|
73
|
+
/* istanbul ignore if */
|
|
74
|
+
if (!dialogRef.current) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
73
78
|
const {
|
|
74
79
|
width: dialogWidth,
|
|
75
80
|
height: dialogHeight
|
|
@@ -197,93 +202,56 @@ const Dialog = ({
|
|
|
197
202
|
}, contentPadding), children)))));
|
|
198
203
|
};
|
|
199
204
|
|
|
205
|
+
exports.Dialog = Dialog;
|
|
200
206
|
Dialog.propTypes = {
|
|
201
|
-
/** Prop to specify the aria-describedby property of the Dialog component */
|
|
202
207
|
"aria-describedby": _propTypes.default.string,
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Prop to specify the aria-label of the Dialog component.
|
|
206
|
-
* To be used only when the title prop is not defined, and the component is not labelled by any internal element.
|
|
207
|
-
*/
|
|
208
208
|
"aria-label": _propTypes.default.string,
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Prop to specify the aria-labelledby property of the Dialog component
|
|
212
|
-
* To be used when the title prop is a custom React Node,
|
|
213
|
-
* or the component is labelled by an internal element other than the title.
|
|
214
|
-
*/
|
|
215
209
|
"aria-labelledby": _propTypes.default.string,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
children: _propTypes.default.node,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
open: _propTypes.default.bool.isRequired,
|
|
225
|
-
|
|
226
|
-
/** A custom close event handler */
|
|
227
|
-
onCancel: _propTypes.default.func,
|
|
228
|
-
|
|
229
|
-
/** Determines if the Esc Key closes the Dialog */
|
|
230
|
-
disableEscKey: _propTypes.default.bool,
|
|
231
|
-
|
|
232
|
-
/** Determines if the Dialog can be closed */
|
|
233
|
-
disableClose: _propTypes.default.bool,
|
|
234
|
-
|
|
235
|
-
/** Allows developers to specify a specific height for the dialog. */
|
|
236
|
-
height: _propTypes.default.string,
|
|
237
|
-
|
|
238
|
-
/** Adds Help tooltip to Header */
|
|
239
|
-
help: _propTypes.default.string,
|
|
240
|
-
|
|
241
|
-
/** Title displayed at top of dialog */
|
|
242
|
-
title: _propTypes.default.node,
|
|
243
|
-
|
|
244
|
-
/** Subtitle displayed at top of dialog */
|
|
245
|
-
subtitle: _propTypes.default.string,
|
|
246
|
-
|
|
247
|
-
/** Size of dialog, default size is 750px */
|
|
248
|
-
size: _propTypes.default.oneOf(["auto", "extra-small", "small", "medium-small", "medium", "medium-large", "large", "extra-large"]),
|
|
249
|
-
|
|
250
|
-
/** Determines if the close icon is shown */
|
|
251
|
-
showCloseIcon: _propTypes.default.bool,
|
|
252
|
-
|
|
253
|
-
/** Optional reference to an element meant to be focused on open */
|
|
254
|
-
focusFirstElement: _propTypes.default.shape({
|
|
255
|
-
current: _propTypes.default.any
|
|
210
|
+
"ariaRole": _propTypes.default.string,
|
|
211
|
+
"bespokeFocusTrap": _propTypes.default.func,
|
|
212
|
+
"children": _propTypes.default.node,
|
|
213
|
+
"className": _propTypes.default.string,
|
|
214
|
+
"contentPadding": _propTypes.default.shape({
|
|
215
|
+
"p": _propTypes.default.oneOf([0, 1, 2, 3, 4, 5, 6, 7, 8]),
|
|
216
|
+
"px": _propTypes.default.oneOf([0, 1, 2, 3, 4, 5, 6, 7, 8]),
|
|
217
|
+
"py": _propTypes.default.oneOf([0, 1, 2, 3, 4, 5, 6, 7, 8])
|
|
256
218
|
}),
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
219
|
+
"data-component": _propTypes.default.string,
|
|
220
|
+
"data-element": _propTypes.default.string,
|
|
221
|
+
"data-role": _propTypes.default.string,
|
|
222
|
+
"disableAutoFocus": _propTypes.default.bool,
|
|
223
|
+
"disableClose": _propTypes.default.bool,
|
|
224
|
+
"disableEscKey": _propTypes.default.bool,
|
|
225
|
+
"disableFocusTrap": _propTypes.default.bool,
|
|
226
|
+
"enableBackgroundUI": _propTypes.default.bool,
|
|
227
|
+
"focusableContainers": _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
228
|
+
"current": _propTypes.default.oneOfType([_propTypes.default.oneOf([null]), function (props, propName) {
|
|
229
|
+
if (props[propName] == null) {
|
|
230
|
+
return new Error("Prop '" + propName + "' is required but wasn't specified");
|
|
231
|
+
} else if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
232
|
+
return new Error("Expected prop '" + propName + "' to be of type Element");
|
|
233
|
+
}
|
|
234
|
+
}]).isRequired
|
|
235
|
+
})),
|
|
236
|
+
"focusFirstElement": _propTypes.default.shape({
|
|
237
|
+
"current": _propTypes.default.oneOfType([_propTypes.default.oneOf([null]), function (props, propName) {
|
|
238
|
+
if (props[propName] == null) {
|
|
239
|
+
return new Error("Prop '" + propName + "' is required but wasn't specified");
|
|
240
|
+
} else if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
241
|
+
return new Error("Expected prop '" + propName + "' to be of type Element");
|
|
242
|
+
}
|
|
243
|
+
}]).isRequired
|
|
276
244
|
}),
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
245
|
+
"height": _propTypes.default.string,
|
|
246
|
+
"help": _propTypes.default.string,
|
|
247
|
+
"onCancel": _propTypes.default.func,
|
|
248
|
+
"open": _propTypes.default.bool.isRequired,
|
|
249
|
+
"role": _propTypes.default.string,
|
|
250
|
+
"showCloseIcon": _propTypes.default.bool,
|
|
251
|
+
"size": _propTypes.default.oneOf(["auto", "extra-large", "extra-small", "large", "medium-large", "medium-small", "medium", "small"]),
|
|
252
|
+
"subtitle": _propTypes.default.string,
|
|
253
|
+
"timeout": _propTypes.default.number,
|
|
254
|
+
"title": _propTypes.default.node
|
|
287
255
|
};
|
|
288
256
|
var _default = Dialog;
|
|
289
257
|
exports.default = _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ContentPaddingInterface } from "./dialog.component";
|
|
2
|
+
declare const dialogSizes: {
|
|
3
|
+
auto: string;
|
|
4
|
+
"extra-small": string;
|
|
5
|
+
small: string;
|
|
6
|
+
"medium-small": string;
|
|
7
|
+
medium: string;
|
|
8
|
+
"medium-large": string;
|
|
9
|
+
large: string;
|
|
10
|
+
"extra-large": string;
|
|
11
|
+
};
|
|
12
|
+
declare type DialogStyleProps = {
|
|
13
|
+
topMargin: number;
|
|
14
|
+
size?: keyof typeof dialogSizes;
|
|
15
|
+
dialogHeight?: string;
|
|
16
|
+
};
|
|
17
|
+
declare const DialogStyle: import("styled-components").StyledComponent<"div", any, DialogStyleProps & ContentPaddingInterface, never>;
|
|
18
|
+
declare type DialogTitleStyleProps = {
|
|
19
|
+
showCloseIcon?: boolean;
|
|
20
|
+
hasSubtitle?: boolean;
|
|
21
|
+
};
|
|
22
|
+
declare const DialogTitleStyle: import("styled-components").StyledComponent<"div", any, DialogTitleStyleProps, never>;
|
|
23
|
+
declare const DialogContentStyle: import("styled-components").StyledComponent<"div", any, ContentPaddingInterface, never>;
|
|
24
|
+
declare const DialogInnerContentStyle: import("styled-components").StyledComponent<"div", any, ContentPaddingInterface, never>;
|
|
25
|
+
export { DialogStyle, DialogTitleStyle, DialogContentStyle, DialogInnerContentStyle, };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default } from "./dialog";
|
|
1
|
+
export { default } from "./dialog.component";
|
|
2
|
+
export type { DialogProps } from "./dialog.component";
|
|
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _dialog.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _dialog = _interopRequireDefault(require("./dialog.component"));
|
|
14
14
|
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|