carbon-react 110.6.0 → 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/button/button.component.d.ts +3 -3
- package/esm/components/button/button.component.js +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.d.ts +8 -0
- package/esm/components/image/image.component.js +1694 -60
- package/esm/components/image/image.style.d.ts +16 -0
- package/esm/components/image/image.style.js +28 -0
- package/esm/components/image/index.d.ts +2 -1
- 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/button/button.component.d.ts +3 -3
- package/lib/components/button/button.component.js +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.d.ts +8 -0
- package/lib/components/image/image.component.js +1695 -68
- package/lib/components/image/image.style.d.ts +16 -0
- package/lib/components/image/image.style.js +42 -0
- package/lib/components/image/index.d.ts +2 -1
- 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/esm/components/image/image.d.ts +0 -18
- package/lib/components/dialog/dialog.d.ts +0 -68
- package/lib/components/image/image.d.ts +0 -18
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MarginProps, BackgroundProps, LayoutProps } from "styled-system";
|
|
3
|
+
export interface StyledImageProps extends MarginProps, BackgroundProps, LayoutProps {
|
|
4
|
+
/** alt property to display when an img fails to load */
|
|
5
|
+
alt?: string;
|
|
6
|
+
/** any valid file path, passing this will render the component as an img element */
|
|
7
|
+
src?: string;
|
|
8
|
+
/** Children elements, will only render if component is a div element */
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare const StyledImage: import("styled-components").StyledComponent<"div", any, {
|
|
12
|
+
children: import("react").ReactNode;
|
|
13
|
+
src: string | undefined;
|
|
14
|
+
as?: string | undefined;
|
|
15
|
+
} & StyledImageProps, "children" | "as" | "src">;
|
|
16
|
+
export { StyledImage };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledImage = void 0;
|
|
7
|
+
|
|
8
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
+
|
|
10
|
+
var _styledSystem = require("styled-system");
|
|
11
|
+
|
|
12
|
+
var _themes = require("../../style/themes");
|
|
13
|
+
|
|
14
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
15
|
+
|
|
16
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
+
|
|
18
|
+
const StyledImage = _styledComponents.default.div.attrs(({
|
|
19
|
+
src,
|
|
20
|
+
children
|
|
21
|
+
}) => ({ ...(src && {
|
|
22
|
+
as: "img"
|
|
23
|
+
}),
|
|
24
|
+
children: src ? undefined : children,
|
|
25
|
+
src
|
|
26
|
+
}))`
|
|
27
|
+
${_styledSystem.margin}
|
|
28
|
+
${_styledSystem.layout}
|
|
29
|
+
|
|
30
|
+
${({
|
|
31
|
+
as
|
|
32
|
+
}) => as !== "img" && (0, _styledComponents.css)`
|
|
33
|
+
${_styledSystem.background}
|
|
34
|
+
`}
|
|
35
|
+
`;
|
|
36
|
+
exports.StyledImage = StyledImage;
|
|
37
|
+
StyledImage.defaultProps = {
|
|
38
|
+
backgroundPosition: "center",
|
|
39
|
+
backgroundRepeat: "no-repeat",
|
|
40
|
+
backgroundSize: "cover",
|
|
41
|
+
theme: _themes.baseTheme
|
|
42
|
+
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default } from "./image";
|
|
1
|
+
export { default } from "./image.component";
|
|
2
|
+
export type { ImageProps } from "./image.component";
|
|
@@ -6,6 +6,8 @@ export interface ModalContextProps {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const ModalContext: React.Context<ModalContextProps>;
|
|
8
8
|
export interface ModalProps {
|
|
9
|
+
/** Custom class name */
|
|
10
|
+
className?: string;
|
|
9
11
|
/** Modal content */
|
|
10
12
|
children?: React.ReactNode;
|
|
11
13
|
/** The ARIA role to be applied to the modal */
|
|
@@ -122,6 +122,7 @@ const Modal = ({
|
|
|
122
122
|
Modal.propTypes = {
|
|
123
123
|
"ariaRole": _propTypes.default.string,
|
|
124
124
|
"children": _propTypes.default.node,
|
|
125
|
+
"className": _propTypes.default.string,
|
|
125
126
|
"disableClose": _propTypes.default.bool,
|
|
126
127
|
"disableEscKey": _propTypes.default.bool,
|
|
127
128
|
"enableBackgroundUI": _propTypes.default.bool,
|
|
@@ -579,6 +579,7 @@ MultiActionButton.propTypes = {
|
|
|
579
579
|
"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({
|
|
580
580
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
581
581
|
"anchor": _propTypes.default.func.isRequired,
|
|
582
|
+
"at": _propTypes.default.func.isRequired,
|
|
582
583
|
"big": _propTypes.default.func.isRequired,
|
|
583
584
|
"blink": _propTypes.default.func.isRequired,
|
|
584
585
|
"bold": _propTypes.default.func.isRequired,
|
|
@@ -41,6 +41,7 @@ NavigationBar.propTypes = {
|
|
|
41
41
|
"alignContent": _propTypes.default.oneOfType([_propTypes.default.oneOf(["-moz-initial", "baseline", "center", "end", "flex-end", "flex-start", "inherit", "initial", "normal", "revert", "space-around", "space-between", "space-evenly", "start", "stretch", "unset"]), _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.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.default.shape({
|
|
42
42
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
43
43
|
"anchor": _propTypes.default.func.isRequired,
|
|
44
|
+
"at": _propTypes.default.func.isRequired,
|
|
44
45
|
"big": _propTypes.default.func.isRequired,
|
|
45
46
|
"blink": _propTypes.default.func.isRequired,
|
|
46
47
|
"bold": _propTypes.default.func.isRequired,
|
|
@@ -90,6 +91,7 @@ NavigationBar.propTypes = {
|
|
|
90
91
|
})])), _propTypes.default.object, _propTypes.default.shape({
|
|
91
92
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
92
93
|
"anchor": _propTypes.default.func.isRequired,
|
|
94
|
+
"at": _propTypes.default.func.isRequired,
|
|
93
95
|
"big": _propTypes.default.func.isRequired,
|
|
94
96
|
"blink": _propTypes.default.func.isRequired,
|
|
95
97
|
"bold": _propTypes.default.func.isRequired,
|
|
@@ -140,6 +142,7 @@ NavigationBar.propTypes = {
|
|
|
140
142
|
"alignItems": _propTypes.default.oneOfType([_propTypes.default.oneOf(["-moz-initial", "baseline", "center", "end", "flex-end", "flex-start", "inherit", "initial", "normal", "revert", "self-end", "self-start", "start", "stretch", "unset"]), _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(["-moz-initial", "baseline", "center", "end", "flex-end", "flex-start", "inherit", "initial", "normal", "revert", "self-end", "self-start", "start", "stretch", "unset", null]), _propTypes.default.shape({
|
|
141
143
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
142
144
|
"anchor": _propTypes.default.func.isRequired,
|
|
145
|
+
"at": _propTypes.default.func.isRequired,
|
|
143
146
|
"big": _propTypes.default.func.isRequired,
|
|
144
147
|
"blink": _propTypes.default.func.isRequired,
|
|
145
148
|
"bold": _propTypes.default.func.isRequired,
|
|
@@ -189,6 +192,7 @@ NavigationBar.propTypes = {
|
|
|
189
192
|
})])), _propTypes.default.object, _propTypes.default.shape({
|
|
190
193
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
191
194
|
"anchor": _propTypes.default.func.isRequired,
|
|
195
|
+
"at": _propTypes.default.func.isRequired,
|
|
192
196
|
"big": _propTypes.default.func.isRequired,
|
|
193
197
|
"blink": _propTypes.default.func.isRequired,
|
|
194
198
|
"bold": _propTypes.default.func.isRequired,
|
|
@@ -239,6 +243,7 @@ NavigationBar.propTypes = {
|
|
|
239
243
|
"alignSelf": _propTypes.default.oneOfType([_propTypes.default.oneOf(["-moz-initial", "auto", "baseline", "center", "end", "flex-end", "flex-start", "inherit", "initial", "normal", "revert", "self-end", "self-start", "start", "stretch", "unset"]), _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(["-moz-initial", "auto", "baseline", "center", "end", "flex-end", "flex-start", "inherit", "initial", "normal", "revert", "self-end", "self-start", "start", "stretch", "unset", null]), _propTypes.default.shape({
|
|
240
244
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
241
245
|
"anchor": _propTypes.default.func.isRequired,
|
|
246
|
+
"at": _propTypes.default.func.isRequired,
|
|
242
247
|
"big": _propTypes.default.func.isRequired,
|
|
243
248
|
"blink": _propTypes.default.func.isRequired,
|
|
244
249
|
"bold": _propTypes.default.func.isRequired,
|
|
@@ -288,6 +293,7 @@ NavigationBar.propTypes = {
|
|
|
288
293
|
})])), _propTypes.default.object, _propTypes.default.shape({
|
|
289
294
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
290
295
|
"anchor": _propTypes.default.func.isRequired,
|
|
296
|
+
"at": _propTypes.default.func.isRequired,
|
|
291
297
|
"big": _propTypes.default.func.isRequired,
|
|
292
298
|
"blink": _propTypes.default.func.isRequired,
|
|
293
299
|
"bold": _propTypes.default.func.isRequired,
|
|
@@ -340,6 +346,7 @@ NavigationBar.propTypes = {
|
|
|
340
346
|
"flex": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
341
347
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
342
348
|
"anchor": _propTypes.default.func.isRequired,
|
|
349
|
+
"at": _propTypes.default.func.isRequired,
|
|
343
350
|
"big": _propTypes.default.func.isRequired,
|
|
344
351
|
"blink": _propTypes.default.func.isRequired,
|
|
345
352
|
"bold": _propTypes.default.func.isRequired,
|
|
@@ -389,6 +396,7 @@ NavigationBar.propTypes = {
|
|
|
389
396
|
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
390
397
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
391
398
|
"anchor": _propTypes.default.func.isRequired,
|
|
399
|
+
"at": _propTypes.default.func.isRequired,
|
|
392
400
|
"big": _propTypes.default.func.isRequired,
|
|
393
401
|
"blink": _propTypes.default.func.isRequired,
|
|
394
402
|
"bold": _propTypes.default.func.isRequired,
|
|
@@ -439,6 +447,7 @@ NavigationBar.propTypes = {
|
|
|
439
447
|
"flexBasis": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
440
448
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
441
449
|
"anchor": _propTypes.default.func.isRequired,
|
|
450
|
+
"at": _propTypes.default.func.isRequired,
|
|
442
451
|
"big": _propTypes.default.func.isRequired,
|
|
443
452
|
"blink": _propTypes.default.func.isRequired,
|
|
444
453
|
"bold": _propTypes.default.func.isRequired,
|
|
@@ -488,6 +497,7 @@ NavigationBar.propTypes = {
|
|
|
488
497
|
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
489
498
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
490
499
|
"anchor": _propTypes.default.func.isRequired,
|
|
500
|
+
"at": _propTypes.default.func.isRequired,
|
|
491
501
|
"big": _propTypes.default.func.isRequired,
|
|
492
502
|
"blink": _propTypes.default.func.isRequired,
|
|
493
503
|
"bold": _propTypes.default.func.isRequired,
|
|
@@ -571,6 +581,7 @@ NavigationBar.propTypes = {
|
|
|
571
581
|
"justifyContent": _propTypes.default.oneOfType([_propTypes.default.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.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.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.default.shape({
|
|
572
582
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
573
583
|
"anchor": _propTypes.default.func.isRequired,
|
|
584
|
+
"at": _propTypes.default.func.isRequired,
|
|
574
585
|
"big": _propTypes.default.func.isRequired,
|
|
575
586
|
"blink": _propTypes.default.func.isRequired,
|
|
576
587
|
"bold": _propTypes.default.func.isRequired,
|
|
@@ -620,6 +631,7 @@ NavigationBar.propTypes = {
|
|
|
620
631
|
})])), _propTypes.default.object, _propTypes.default.shape({
|
|
621
632
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
622
633
|
"anchor": _propTypes.default.func.isRequired,
|
|
634
|
+
"at": _propTypes.default.func.isRequired,
|
|
623
635
|
"big": _propTypes.default.func.isRequired,
|
|
624
636
|
"blink": _propTypes.default.func.isRequired,
|
|
625
637
|
"bold": _propTypes.default.func.isRequired,
|
|
@@ -670,6 +682,7 @@ NavigationBar.propTypes = {
|
|
|
670
682
|
"justifyItems": _propTypes.default.oneOfType([_propTypes.default.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.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.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.default.shape({
|
|
671
683
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
672
684
|
"anchor": _propTypes.default.func.isRequired,
|
|
685
|
+
"at": _propTypes.default.func.isRequired,
|
|
673
686
|
"big": _propTypes.default.func.isRequired,
|
|
674
687
|
"blink": _propTypes.default.func.isRequired,
|
|
675
688
|
"bold": _propTypes.default.func.isRequired,
|
|
@@ -719,6 +732,7 @@ NavigationBar.propTypes = {
|
|
|
719
732
|
})])), _propTypes.default.object, _propTypes.default.shape({
|
|
720
733
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
721
734
|
"anchor": _propTypes.default.func.isRequired,
|
|
735
|
+
"at": _propTypes.default.func.isRequired,
|
|
722
736
|
"big": _propTypes.default.func.isRequired,
|
|
723
737
|
"blink": _propTypes.default.func.isRequired,
|
|
724
738
|
"bold": _propTypes.default.func.isRequired,
|
|
@@ -769,6 +783,7 @@ NavigationBar.propTypes = {
|
|
|
769
783
|
"justifySelf": _propTypes.default.oneOfType([_propTypes.default.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.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.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.default.shape({
|
|
770
784
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
771
785
|
"anchor": _propTypes.default.func.isRequired,
|
|
786
|
+
"at": _propTypes.default.func.isRequired,
|
|
772
787
|
"big": _propTypes.default.func.isRequired,
|
|
773
788
|
"blink": _propTypes.default.func.isRequired,
|
|
774
789
|
"bold": _propTypes.default.func.isRequired,
|
|
@@ -818,6 +833,7 @@ NavigationBar.propTypes = {
|
|
|
818
833
|
})])), _propTypes.default.object, _propTypes.default.shape({
|
|
819
834
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
820
835
|
"anchor": _propTypes.default.func.isRequired,
|
|
836
|
+
"at": _propTypes.default.func.isRequired,
|
|
821
837
|
"big": _propTypes.default.func.isRequired,
|
|
822
838
|
"blink": _propTypes.default.func.isRequired,
|
|
823
839
|
"bold": _propTypes.default.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>;
|
|
@@ -630,6 +630,7 @@ SplitButton.propTypes = {
|
|
|
630
630
|
"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({
|
|
631
631
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
632
632
|
"anchor": _propTypes.default.func.isRequired,
|
|
633
|
+
"at": _propTypes.default.func.isRequired,
|
|
633
634
|
"big": _propTypes.default.func.isRequired,
|
|
634
635
|
"blink": _propTypes.default.func.isRequired,
|
|
635
636
|
"bold": _propTypes.default.func.isRequired,
|
|
@@ -675,6 +675,7 @@ Textbox.propTypes = {
|
|
|
675
675
|
"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({
|
|
676
676
|
"__@iterator": _propTypes.default.func.isRequired,
|
|
677
677
|
"anchor": _propTypes.default.func.isRequired,
|
|
678
|
+
"at": _propTypes.default.func.isRequired,
|
|
678
679
|
"big": _propTypes.default.func.isRequired,
|
|
679
680
|
"blink": _propTypes.default.func.isRequired,
|
|
680
681
|
"bold": _propTypes.default.func.isRequired,
|
package/package.json
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "carbon-react",
|
|
3
|
-
"version": "110.
|
|
3
|
+
"version": "110.7.0",
|
|
4
4
|
"description": "A library of reusable React components for easily building user interfaces.",
|
|
5
|
-
"engineStrict": true,
|
|
6
|
-
"engines": {
|
|
7
|
-
"npm": "^6.0.0",
|
|
8
|
-
"node": ">=14.16.0"
|
|
9
|
-
},
|
|
10
5
|
"files": [
|
|
11
6
|
"lib",
|
|
12
7
|
"esm",
|
|
@@ -94,7 +89,7 @@
|
|
|
94
89
|
"@types/invariant": "^2.2.35",
|
|
95
90
|
"@types/jest": "^26.0.19",
|
|
96
91
|
"@types/lodash": "^4.14.179",
|
|
97
|
-
"@types/node": "
|
|
92
|
+
"@types/node": "16.11.17",
|
|
98
93
|
"@types/react": "^17.0.2",
|
|
99
94
|
"@types/react-dom": "^17.0.2",
|
|
100
95
|
"@types/react-is": "^17.0.3",
|
|
@@ -117,11 +112,11 @@
|
|
|
117
112
|
"core-js": "^3.20.3",
|
|
118
113
|
"cross-env": "^5.2.0",
|
|
119
114
|
"css-loader": "4.0.0",
|
|
120
|
-
"cypress": "
|
|
115
|
+
"cypress": "10.7.0",
|
|
121
116
|
"cypress-axe": "^1.0.0",
|
|
122
117
|
"cypress-each": "^1.11.0",
|
|
123
118
|
"cypress-plugin-tab": "^1.0.5",
|
|
124
|
-
"cypress-real-events": "^1.7.
|
|
119
|
+
"cypress-real-events": "^1.7.1",
|
|
125
120
|
"cypress-storybook": "^0.5.1",
|
|
126
121
|
"cz-conventional-changelog": "^3.3.0",
|
|
127
122
|
"date-fns-tz": "^1.2.2",
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { ModalProps } from "../modal";
|
|
3
|
-
|
|
4
|
-
type PaddingValues = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
5
|
-
|
|
6
|
-
interface ContentPaddingInterface {
|
|
7
|
-
p?: PaddingValues;
|
|
8
|
-
py?: PaddingValues;
|
|
9
|
-
px?: PaddingValues;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export type DialogSizes =
|
|
13
|
-
| "auto"
|
|
14
|
-
| "extra-small"
|
|
15
|
-
| "small"
|
|
16
|
-
| "medium-small"
|
|
17
|
-
| "medium"
|
|
18
|
-
| "medium-large"
|
|
19
|
-
| "large"
|
|
20
|
-
| "extra-large";
|
|
21
|
-
|
|
22
|
-
export interface DialogProps extends ModalProps {
|
|
23
|
-
/** Prop to specify the aria-describedby property of the Dialog component */
|
|
24
|
-
"aria-describedby"?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Prop to specify the aria-label of the Dialog component.
|
|
27
|
-
* To be used only when the title prop is not defined, and the component is not labelled by any internal element.
|
|
28
|
-
*/
|
|
29
|
-
"aria-label"?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Prop to specify the aria-labelledby property of the Dialog component
|
|
32
|
-
* To be used when the title prop is a custom React Node,
|
|
33
|
-
* or the component is labelled by an internal element other than the title.
|
|
34
|
-
*/
|
|
35
|
-
"aria-labelledby"?: string;
|
|
36
|
-
/* Disables auto focus functionality on child elements */
|
|
37
|
-
disableAutoFocus?: boolean;
|
|
38
|
-
/* Disables the focus trap when the dialog is open */
|
|
39
|
-
disableFocusTrap?: boolean;
|
|
40
|
-
/** Optional reference to an element meant to be focused on open */
|
|
41
|
-
focusFirstElement?: React.MutableRefObject<HTMLElement>;
|
|
42
|
-
/** Allows developers to specify a specific height for the dialog. */
|
|
43
|
-
height?: string;
|
|
44
|
-
/** Adds Help tooltip to Header */
|
|
45
|
-
help?: string;
|
|
46
|
-
/** A custom close event handler */
|
|
47
|
-
onCancel?: (
|
|
48
|
-
ev: React.KeyboardEvent<HTMLElement> | React.MouseEvent<HTMLButtonElement>
|
|
49
|
-
) => void;
|
|
50
|
-
/** Determines if the close icon is shown */
|
|
51
|
-
showCloseIcon?: boolean;
|
|
52
|
-
/** Size of dialog, default size is 750px */
|
|
53
|
-
size?: DialogSizes;
|
|
54
|
-
/** Subtitle displayed at top of dialog */
|
|
55
|
-
subtitle?: string;
|
|
56
|
-
/** Title displayed at top of dialog */
|
|
57
|
-
title?: React.ReactNode;
|
|
58
|
-
/** The ARIA role to be applied to the Dialog container */
|
|
59
|
-
role?: string;
|
|
60
|
-
/** Padding to be set on the Dialog content */
|
|
61
|
-
contentPadding?: ContentPaddingInterface;
|
|
62
|
-
/** an optional array of refs to containers whose content should also be reachable by tabbing from the dialog */
|
|
63
|
-
focusableContainers?: React.MutableRefObject<HTMLElement>[];
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
declare function Dialog(props: DialogProps): JSX.Element;
|
|
67
|
-
|
|
68
|
-
export default Dialog;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { StyledComponentProps } from "styled-components";
|
|
3
|
-
import { MarginProps, BackgroundProps, LayoutProps } from "styled-system";
|
|
4
|
-
|
|
5
|
-
export interface ImageProps extends MarginProps, BackgroundProps, LayoutProps {
|
|
6
|
-
/** any valid file path, passing this will render the component as an img element */
|
|
7
|
-
src?: string;
|
|
8
|
-
/** alt property to display when an img fails to load */
|
|
9
|
-
alt?: string;
|
|
10
|
-
/** Children elements, will only render if component is a div element */
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
declare function Image(
|
|
15
|
-
attrs: StyledComponentProps<"div", Record<string, unknown>, ImageProps, "">
|
|
16
|
-
): JSX.Element;
|
|
17
|
-
|
|
18
|
-
export default Image;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { ModalProps } from "../modal";
|
|
3
|
-
|
|
4
|
-
type PaddingValues = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
5
|
-
|
|
6
|
-
interface ContentPaddingInterface {
|
|
7
|
-
p?: PaddingValues;
|
|
8
|
-
py?: PaddingValues;
|
|
9
|
-
px?: PaddingValues;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export type DialogSizes =
|
|
13
|
-
| "auto"
|
|
14
|
-
| "extra-small"
|
|
15
|
-
| "small"
|
|
16
|
-
| "medium-small"
|
|
17
|
-
| "medium"
|
|
18
|
-
| "medium-large"
|
|
19
|
-
| "large"
|
|
20
|
-
| "extra-large";
|
|
21
|
-
|
|
22
|
-
export interface DialogProps extends ModalProps {
|
|
23
|
-
/** Prop to specify the aria-describedby property of the Dialog component */
|
|
24
|
-
"aria-describedby"?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Prop to specify the aria-label of the Dialog component.
|
|
27
|
-
* To be used only when the title prop is not defined, and the component is not labelled by any internal element.
|
|
28
|
-
*/
|
|
29
|
-
"aria-label"?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Prop to specify the aria-labelledby property of the Dialog component
|
|
32
|
-
* To be used when the title prop is a custom React Node,
|
|
33
|
-
* or the component is labelled by an internal element other than the title.
|
|
34
|
-
*/
|
|
35
|
-
"aria-labelledby"?: string;
|
|
36
|
-
/* Disables auto focus functionality on child elements */
|
|
37
|
-
disableAutoFocus?: boolean;
|
|
38
|
-
/* Disables the focus trap when the dialog is open */
|
|
39
|
-
disableFocusTrap?: boolean;
|
|
40
|
-
/** Optional reference to an element meant to be focused on open */
|
|
41
|
-
focusFirstElement?: React.MutableRefObject<HTMLElement>;
|
|
42
|
-
/** Allows developers to specify a specific height for the dialog. */
|
|
43
|
-
height?: string;
|
|
44
|
-
/** Adds Help tooltip to Header */
|
|
45
|
-
help?: string;
|
|
46
|
-
/** A custom close event handler */
|
|
47
|
-
onCancel?: (
|
|
48
|
-
ev: React.KeyboardEvent<HTMLElement> | React.MouseEvent<HTMLButtonElement>
|
|
49
|
-
) => void;
|
|
50
|
-
/** Determines if the close icon is shown */
|
|
51
|
-
showCloseIcon?: boolean;
|
|
52
|
-
/** Size of dialog, default size is 750px */
|
|
53
|
-
size?: DialogSizes;
|
|
54
|
-
/** Subtitle displayed at top of dialog */
|
|
55
|
-
subtitle?: string;
|
|
56
|
-
/** Title displayed at top of dialog */
|
|
57
|
-
title?: React.ReactNode;
|
|
58
|
-
/** The ARIA role to be applied to the Dialog container */
|
|
59
|
-
role?: string;
|
|
60
|
-
/** Padding to be set on the Dialog content */
|
|
61
|
-
contentPadding?: ContentPaddingInterface;
|
|
62
|
-
/** an optional array of refs to containers whose content should also be reachable by tabbing from the dialog */
|
|
63
|
-
focusableContainers?: React.MutableRefObject<HTMLElement>[];
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
declare function Dialog(props: DialogProps): JSX.Element;
|
|
67
|
-
|
|
68
|
-
export default Dialog;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { StyledComponentProps } from "styled-components";
|
|
3
|
-
import { MarginProps, BackgroundProps, LayoutProps } from "styled-system";
|
|
4
|
-
|
|
5
|
-
export interface ImageProps extends MarginProps, BackgroundProps, LayoutProps {
|
|
6
|
-
/** any valid file path, passing this will render the component as an img element */
|
|
7
|
-
src?: string;
|
|
8
|
-
/** alt property to display when an img fails to load */
|
|
9
|
-
alt?: string;
|
|
10
|
-
/** Children elements, will only render if component is a div element */
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
declare function Image(
|
|
15
|
-
attrs: StyledComponentProps<"div", Record<string, unknown>, ImageProps, "">
|
|
16
|
-
): JSX.Element;
|
|
17
|
-
|
|
18
|
-
export default Image;
|