carbon-react 128.0.0 → 128.1.2
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/README.md +1 -1
- package/esm/__spec_helper__/test-utils.d.ts +5 -9
- package/esm/__spec_helper__/test-utils.js +2 -0
- package/esm/components/alert/alert.component.d.ts +1 -1
- package/esm/components/alert/alert.component.js +3 -1
- package/esm/components/button-minor/button-minor.component.d.ts +1 -1
- package/esm/components/button-minor/button-minor.component.js +5 -1
- package/esm/components/checkbox/{checkbox-group.component.d.ts → checkbox-group/checkbox-group.component.d.ts} +1 -1
- package/esm/components/checkbox/{checkbox-group.component.js → checkbox-group/checkbox-group.component.js} +9 -9
- package/esm/components/checkbox/{checkbox-group.style.js → checkbox-group/checkbox-group.style.js} +5 -5
- package/esm/components/checkbox/checkbox.component.js +1 -1
- package/esm/components/checkbox/index.d.ts +2 -2
- package/esm/components/checkbox/index.js +1 -1
- package/esm/components/definition-list/{dd.component.js → dd/dd.component.js} +2 -2
- package/esm/components/definition-list/dl.component.js +13 -11
- package/esm/components/definition-list/{dt.component.js → dt/dt.component.js} +2 -2
- package/esm/components/definition-list/index.d.ts +4 -4
- package/esm/components/definition-list/index.js +2 -2
- package/esm/components/dialog/dialog.component.d.ts +3 -1
- package/esm/components/dialog/dialog.component.js +11 -3
- package/esm/components/dialog-full-screen/dialog-full-screen.component.d.ts +4 -1
- package/esm/components/dialog-full-screen/dialog-full-screen.component.js +7 -3
- package/esm/components/draggable/{internal → __internal__}/drop-target.component.js +1 -1
- package/esm/components/draggable/draggable-container.component.js +2 -2
- package/esm/components/draggable/{draggable-item.component.js → draggable-item/draggable-item.component.js} +1 -1
- package/{lib/components/draggable → esm/components/draggable/draggable-item}/draggable-item.style.d.ts +1 -1
- package/esm/components/draggable/{draggable-item.style.js → draggable-item/draggable-item.style.js} +2 -2
- package/esm/components/draggable/index.d.ts +2 -2
- package/esm/components/draggable/index.js +1 -1
- package/esm/components/duelling-picklist/picklist-placeholder/picklist-placeholder.component.js +5 -3
- package/esm/components/flat-table/flat-table-header/flat-table-header.component.d.ts +0 -3
- package/esm/components/flat-table/flat-table-header/flat-table-header.component.js +1 -4
- package/esm/components/flat-table/sort/sort.component.d.ts +1 -1
- package/esm/components/flat-table/sort/sort.component.js +1 -1
- package/esm/components/hr/hr.component.d.ts +0 -1
- package/esm/components/link/link.component.js +1 -16
- package/esm/components/modal/__internal__/modal-manager.js +2 -2
- package/esm/components/number/number.component.js +10 -1
- package/esm/components/pager/__internal__/pager-navigation.component.d.ts +1 -1
- package/esm/components/pager/pager.component.d.ts +2 -2
- package/esm/components/popover-container/popover-container.component.d.ts +6 -2
- package/esm/components/popover-container/popover-container.component.js +11 -5
- package/esm/components/portal/portal.d.ts +1 -1
- package/esm/components/portal/portal.js +1 -1
- package/esm/components/preview/preview.component.d.ts +1 -0
- package/esm/components/radio-button/index.d.ts +3 -1
- package/esm/components/radio-button/index.js +1 -1
- package/esm/components/radio-button/{radio-button-group.component.d.ts → radio-button-group/radio-button-group.component.d.ts} +1 -1
- package/esm/components/radio-button/{radio-button-group.component.js → radio-button-group/radio-button-group.component.js} +12 -12
- package/esm/components/textbox/textbox.component.d.ts +4 -0
- package/esm/components/textbox/textbox.component.js +8 -4
- package/esm/components/tile/flex-tile-divider/flex-tile-divider.component.d.ts +0 -1
- package/esm/components/tile-select/index.d.ts +2 -2
- package/esm/components/tile-select/index.js +1 -1
- package/{lib/components/tile-select → esm/components/tile-select/tile-select-group}/tile-select-group.component.d.ts +1 -1
- package/esm/components/tile-select/{tile-select-group.component.js → tile-select-group/tile-select-group.component.js} +4 -4
- package/esm/components/toast/toast.component.d.ts +3 -0
- package/esm/components/toast/toast.component.js +10 -3
- package/esm/components/vertical-divider/vertical-divider.component.d.ts +0 -1
- package/esm/components/vertical-menu/index.d.ts +6 -6
- package/esm/components/vertical-menu/index.js +3 -3
- package/{lib/components/vertical-menu → esm/components/vertical-menu/vertical-menu-full-screen}/vertical-menu-full-screen.component.d.ts +1 -1
- package/esm/components/vertical-menu/{vertical-menu-full-screen.component.js → vertical-menu-full-screen/vertical-menu-full-screen.component.js} +10 -10
- package/{lib/components/vertical-menu → esm/components/vertical-menu/vertical-menu-item}/vertical-menu-item.component.d.ts +2 -2
- package/esm/components/vertical-menu/{vertical-menu-item.component.js → vertical-menu-item/vertical-menu-item.component.js} +4 -4
- package/esm/components/vertical-menu/{vertical-menu-trigger.component.d.ts → vertical-menu-trigger/vertical-menu-trigger.component.d.ts} +1 -1
- package/esm/components/vertical-menu/{vertical-menu-trigger.component.js → vertical-menu-trigger/vertical-menu-trigger.component.js} +3 -3
- package/esm/hooks/__internal__/useCharacterCount/useCharacterCount.d.ts +0 -1
- package/esm/hooks/__internal__/useScrollBlock/scroll-block-manager.js +2 -2
- package/esm/locales/__internal__/es-es.d.ts +3 -0
- package/esm/locales/__internal__/es-es.js +193 -0
- package/lib/__spec_helper__/test-utils.d.ts +5 -9
- package/lib/__spec_helper__/test-utils.js +2 -0
- package/lib/components/alert/alert.component.d.ts +1 -1
- package/lib/components/alert/alert.component.js +3 -1
- package/lib/components/button-minor/button-minor.component.d.ts +1 -1
- package/lib/components/button-minor/button-minor.component.js +5 -1
- package/lib/components/checkbox/{checkbox-group.component.d.ts → checkbox-group/checkbox-group.component.d.ts} +1 -1
- package/lib/components/checkbox/{checkbox-group.component.js → checkbox-group/checkbox-group.component.js} +9 -9
- package/lib/components/checkbox/{checkbox-group.style.js → checkbox-group/checkbox-group.style.js} +5 -5
- package/lib/components/checkbox/checkbox.component.js +1 -1
- package/lib/components/checkbox/index.d.ts +2 -2
- package/lib/components/checkbox/index.js +1 -1
- package/lib/components/definition-list/{dd.component.js → dd/dd.component.js} +2 -2
- package/lib/components/definition-list/dl.component.js +13 -11
- package/lib/components/definition-list/{dt.component.js → dt/dt.component.js} +2 -2
- package/lib/components/definition-list/index.d.ts +4 -4
- package/lib/components/definition-list/index.js +2 -2
- package/lib/components/dialog/dialog.component.d.ts +3 -1
- package/lib/components/dialog/dialog.component.js +11 -3
- package/lib/components/dialog-full-screen/dialog-full-screen.component.d.ts +4 -1
- package/lib/components/dialog-full-screen/dialog-full-screen.component.js +7 -3
- package/lib/components/draggable/{internal → __internal__}/drop-target.component.js +1 -1
- package/lib/components/draggable/draggable-container.component.js +2 -2
- package/lib/components/draggable/{draggable-item.component.js → draggable-item/draggable-item.component.js} +1 -1
- package/{esm/components/draggable → lib/components/draggable/draggable-item}/draggable-item.style.d.ts +1 -1
- package/lib/components/draggable/{draggable-item.style.js → draggable-item/draggable-item.style.js} +2 -2
- package/lib/components/draggable/index.d.ts +2 -2
- package/lib/components/draggable/index.js +1 -1
- package/lib/components/duelling-picklist/picklist-placeholder/picklist-placeholder.component.js +5 -3
- package/lib/components/flat-table/flat-table-header/flat-table-header.component.d.ts +0 -3
- package/lib/components/flat-table/flat-table-header/flat-table-header.component.js +1 -4
- package/lib/components/flat-table/sort/sort.component.d.ts +1 -1
- package/lib/components/flat-table/sort/sort.component.js +2 -1
- package/lib/components/hr/hr.component.d.ts +0 -1
- package/lib/components/link/link.component.js +1 -16
- package/lib/components/modal/__internal__/modal-manager.js +2 -2
- package/lib/components/number/number.component.js +10 -1
- package/lib/components/pager/__internal__/pager-navigation.component.d.ts +1 -1
- package/lib/components/pager/pager.component.d.ts +2 -2
- package/lib/components/popover-container/popover-container.component.d.ts +6 -2
- package/lib/components/popover-container/popover-container.component.js +11 -5
- package/lib/components/portal/portal.d.ts +1 -1
- package/lib/components/portal/portal.js +2 -1
- package/lib/components/preview/preview.component.d.ts +1 -0
- package/lib/components/radio-button/index.d.ts +3 -1
- package/lib/components/radio-button/index.js +1 -1
- package/lib/components/radio-button/{radio-button-group.component.d.ts → radio-button-group/radio-button-group.component.d.ts} +1 -1
- package/lib/components/radio-button/{radio-button-group.component.js → radio-button-group/radio-button-group.component.js} +12 -12
- package/lib/components/textbox/textbox.component.d.ts +4 -0
- package/lib/components/textbox/textbox.component.js +9 -5
- package/lib/components/tile/flex-tile-divider/flex-tile-divider.component.d.ts +0 -1
- package/lib/components/tile-select/index.d.ts +2 -2
- package/lib/components/tile-select/index.js +1 -1
- package/{esm/components/tile-select → lib/components/tile-select/tile-select-group}/tile-select-group.component.d.ts +1 -1
- package/lib/components/tile-select/{tile-select-group.component.js → tile-select-group/tile-select-group.component.js} +4 -4
- package/lib/components/toast/toast.component.d.ts +3 -0
- package/lib/components/toast/toast.component.js +10 -3
- package/lib/components/vertical-divider/vertical-divider.component.d.ts +0 -1
- package/lib/components/vertical-menu/index.d.ts +6 -6
- package/lib/components/vertical-menu/index.js +3 -3
- package/{esm/components/vertical-menu → lib/components/vertical-menu/vertical-menu-full-screen}/vertical-menu-full-screen.component.d.ts +1 -1
- package/lib/components/vertical-menu/{vertical-menu-full-screen.component.js → vertical-menu-full-screen/vertical-menu-full-screen.component.js} +10 -10
- package/{esm/components/vertical-menu → lib/components/vertical-menu/vertical-menu-item}/vertical-menu-item.component.d.ts +2 -2
- package/lib/components/vertical-menu/{vertical-menu-item.component.js → vertical-menu-item/vertical-menu-item.component.js} +4 -4
- package/lib/components/vertical-menu/{vertical-menu-trigger.component.d.ts → vertical-menu-trigger/vertical-menu-trigger.component.d.ts} +1 -1
- package/lib/components/vertical-menu/{vertical-menu-trigger.component.js → vertical-menu-trigger/vertical-menu-trigger.component.js} +3 -3
- package/lib/hooks/__internal__/useCharacterCount/useCharacterCount.d.ts +0 -1
- package/lib/hooks/__internal__/useScrollBlock/scroll-block-manager.js +2 -2
- package/lib/locales/__internal__/es-es.d.ts +3 -0
- package/lib/locales/__internal__/es-es.js +199 -0
- package/package.json +30 -26
- package/esm/locales/__internal__/pl-pl.d.ts +0 -5
- package/esm/locales/__internal__/pl-pl.js +0 -231
- package/lib/locales/__internal__/pl-pl.d.ts +0 -5
- package/lib/locales/__internal__/pl-pl.js +0 -237
- /package/esm/components/checkbox/{checkbox-group.style.d.ts → checkbox-group/checkbox-group.style.d.ts} +0 -0
- /package/esm/components/definition-list/{dd.component.d.ts → dd/dd.component.d.ts} +0 -0
- /package/esm/components/definition-list/{dt.component.d.ts → dt/dt.component.d.ts} +0 -0
- /package/esm/components/draggable/{internal → __internal__}/drop-target.component.d.ts +0 -0
- /package/esm/components/draggable/{draggable-item.component.d.ts → draggable-item/draggable-item.component.d.ts} +0 -0
- /package/esm/components/radio-button/{radio-button-group.style.d.ts → radio-button-group/radio-button-group.style.d.ts} +0 -0
- /package/esm/components/radio-button/{radio-button-group.style.js → radio-button-group/radio-button-group.style.js} +0 -0
- /package/esm/components/vertical-menu/{vertical-menu-full-screen.context.d.ts → vertical-menu-full-screen/vertical-menu-full-screen.context.d.ts} +0 -0
- /package/esm/components/vertical-menu/{vertical-menu-full-screen.context.js → vertical-menu-full-screen/vertical-menu-full-screen.context.js} +0 -0
- /package/lib/components/checkbox/{checkbox-group.style.d.ts → checkbox-group/checkbox-group.style.d.ts} +0 -0
- /package/lib/components/definition-list/{dd.component.d.ts → dd/dd.component.d.ts} +0 -0
- /package/lib/components/definition-list/{dt.component.d.ts → dt/dt.component.d.ts} +0 -0
- /package/lib/components/draggable/{internal → __internal__}/drop-target.component.d.ts +0 -0
- /package/lib/components/draggable/{draggable-item.component.d.ts → draggable-item/draggable-item.component.d.ts} +0 -0
- /package/lib/components/radio-button/{radio-button-group.style.d.ts → radio-button-group/radio-button-group.style.d.ts} +0 -0
- /package/lib/components/radio-button/{radio-button-group.style.js → radio-button-group/radio-button-group.style.js} +0 -0
- /package/lib/components/vertical-menu/{vertical-menu-full-screen.context.d.ts → vertical-menu-full-screen/vertical-menu-full-screen.context.d.ts} +0 -0
- /package/lib/components/vertical-menu/{vertical-menu-full-screen.context.js → vertical-menu-full-screen/vertical-menu-full-screen.context.js} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { PaddingProps } from "styled-system";
|
|
3
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
|
|
3
4
|
export interface RenderOpenProps {
|
|
4
5
|
tabIndex: number;
|
|
5
6
|
isOpen?: boolean;
|
|
@@ -18,8 +19,9 @@ export interface RenderCloseProps {
|
|
|
18
19
|
onClick: (ev: React.KeyboardEvent<HTMLElement> | React.MouseEvent<HTMLElement>) => void;
|
|
19
20
|
ref: React.RefObject<HTMLButtonElement>;
|
|
20
21
|
"aria-label": string;
|
|
22
|
+
closeButtonDataProps?: Pick<TagProps, "data-role" | "data-element">;
|
|
21
23
|
}
|
|
22
|
-
export declare const renderClose: ({ "data-element": dataElement, tabIndex, onClick, ref, "aria-label": ariaLabel, }: RenderCloseProps) => React.JSX.Element;
|
|
24
|
+
export declare const renderClose: ({ "data-element": dataElement, tabIndex, onClick, ref, "aria-label": ariaLabel, closeButtonDataProps, }: RenderCloseProps) => React.JSX.Element;
|
|
23
25
|
export interface PopoverContainerProps extends PaddingProps {
|
|
24
26
|
/** A function that will render the open component
|
|
25
27
|
*
|
|
@@ -53,10 +55,12 @@ export interface PopoverContainerProps extends PaddingProps {
|
|
|
53
55
|
openButtonAriaLabel?: string;
|
|
54
56
|
/** Close button aria label */
|
|
55
57
|
closeButtonAriaLabel?: string;
|
|
58
|
+
/** Data tag prop bag for close Button */
|
|
59
|
+
closeButtonDataProps?: Pick<TagProps, "data-role" | "data-element">;
|
|
56
60
|
/** Container aria label */
|
|
57
61
|
containerAriaLabel?: string;
|
|
58
62
|
/** Disables the animation for the component */
|
|
59
63
|
disableAnimation?: boolean;
|
|
60
64
|
}
|
|
61
|
-
export declare const PopoverContainer: ({ children, title, position, open, onOpen, onClose, renderOpenComponent, renderCloseComponent, shouldCoverButton, ariaDescribedBy, openButtonAriaLabel, closeButtonAriaLabel, containerAriaLabel, disableAnimation, ...rest }: PopoverContainerProps) => React.JSX.Element;
|
|
65
|
+
export declare const PopoverContainer: ({ children, title, position, open, onOpen, onClose, renderOpenComponent, renderCloseComponent, shouldCoverButton, ariaDescribedBy, openButtonAriaLabel, closeButtonAriaLabel, containerAriaLabel, closeButtonDataProps, disableAnimation, ...rest }: PopoverContainerProps) => React.JSX.Element;
|
|
62
66
|
export default PopoverContainer;
|
|
@@ -14,6 +14,7 @@ import Events from "../../__internal__/utils/helpers/events";
|
|
|
14
14
|
import FocusTrap from "../../__internal__/focus-trap";
|
|
15
15
|
import { ModalContext } from "../modal";
|
|
16
16
|
import useFocusPortalContent from "../../hooks/__internal__/useFocusPortalContent";
|
|
17
|
+
import tagComponent from "../../__internal__/utils/helpers/tags/tags";
|
|
17
18
|
export const renderOpen = ({
|
|
18
19
|
tabIndex,
|
|
19
20
|
onClick,
|
|
@@ -42,14 +43,17 @@ export const renderClose = ({
|
|
|
42
43
|
tabIndex,
|
|
43
44
|
onClick,
|
|
44
45
|
ref,
|
|
45
|
-
"aria-label": ariaLabel
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
"aria-label": ariaLabel,
|
|
47
|
+
closeButtonDataProps
|
|
48
|
+
}) => /*#__PURE__*/React.createElement(PopoverContainerCloseIcon, _extends({
|
|
48
49
|
tabIndex: tabIndex,
|
|
49
50
|
onClick: onClick,
|
|
50
51
|
ref: ref,
|
|
51
52
|
"aria-label": ariaLabel
|
|
52
|
-
},
|
|
53
|
+
}, tagComponent("close", {
|
|
54
|
+
"data-element": dataElement,
|
|
55
|
+
...closeButtonDataProps
|
|
56
|
+
})), /*#__PURE__*/React.createElement(Icon, {
|
|
53
57
|
type: "close"
|
|
54
58
|
}));
|
|
55
59
|
const popoverMiddleware = [offset(({
|
|
@@ -73,6 +77,7 @@ export const PopoverContainer = ({
|
|
|
73
77
|
openButtonAriaLabel,
|
|
74
78
|
closeButtonAriaLabel = "close",
|
|
75
79
|
containerAriaLabel,
|
|
80
|
+
closeButtonDataProps,
|
|
76
81
|
disableAnimation = false,
|
|
77
82
|
...rest
|
|
78
83
|
}) => {
|
|
@@ -139,7 +144,8 @@ export const PopoverContainer = ({
|
|
|
139
144
|
tabIndex: 0,
|
|
140
145
|
onClick: handleCloseButtonClick,
|
|
141
146
|
ref: closeButtonRef,
|
|
142
|
-
"aria-label": closeButtonAriaLabel
|
|
147
|
+
"aria-label": closeButtonAriaLabel,
|
|
148
|
+
closeButtonDataProps
|
|
143
149
|
};
|
|
144
150
|
const handleClickAway = e => {
|
|
145
151
|
if (!isControlled) setIsOpenInternal(false);
|
|
@@ -19,5 +19,5 @@ export interface PortalProps {
|
|
|
19
19
|
*/
|
|
20
20
|
inertOptOut?: boolean;
|
|
21
21
|
}
|
|
22
|
-
declare const Portal: ({ children, className, id, onReposition, inertOptOut, }: PortalProps) => React.JSX.Element;
|
|
22
|
+
export declare const Portal: ({ children, className, id, onReposition, inertOptOut, }: PortalProps) => React.JSX.Element;
|
|
23
23
|
export default Portal;
|
|
@@ -4,6 +4,7 @@ import { PreviewPlaceholderProps } from "./__internal__/preview-placeholder.comp
|
|
|
4
4
|
export interface PreviewProps extends Partial<Omit<PreviewPlaceholderProps, "index">>, MarginProps {
|
|
5
5
|
/** Children content to render in the component. */
|
|
6
6
|
children?: React.ReactNode;
|
|
7
|
+
/** Provides more control over when in a loading state. */
|
|
7
8
|
loading?: boolean;
|
|
8
9
|
}
|
|
9
10
|
export declare const Preview: ({ children, loading, lines, ...props }: PreviewProps) => React.JSX.Element;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import RadioButton from "./radio-button.component";
|
|
2
|
-
import RadioButtonGroup from "./radio-button-group.component";
|
|
2
|
+
import RadioButtonGroup from "./radio-button-group/radio-button-group.component";
|
|
3
3
|
export { RadioButton, RadioButtonGroup };
|
|
4
4
|
export default RadioButton;
|
|
5
|
+
export type { RadioButtonProps } from "./radio-button.component";
|
|
6
|
+
export type { RadioButtonGroupProps } from "./radio-button-group/radio-button-group.component";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import RadioButton from "./radio-button.component";
|
|
2
|
-
import RadioButtonGroup from "./radio-button-group.component";
|
|
2
|
+
import RadioButtonGroup from "./radio-button-group/radio-button-group.component";
|
|
3
3
|
export { RadioButton, RadioButtonGroup };
|
|
4
4
|
export default RadioButton;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MarginProps } from "styled-system";
|
|
3
|
-
import { ValidationProps } from "
|
|
3
|
+
import { ValidationProps } from "../../../__internal__/validations";
|
|
4
4
|
export interface RadioButtonGroupProps extends ValidationProps, MarginProps {
|
|
5
5
|
/** Breakpoint for adaptive legend (inline labels change to top aligned). Enables the adaptive behaviour when set */
|
|
6
6
|
adaptiveLegendBreakpoint?: number;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
import React, { useContext } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
-
import tagComponent from "
|
|
5
|
-
import Fieldset from "
|
|
6
|
-
import RadioButtonGroupStyle, { StyledHintText } from "
|
|
7
|
-
import RadioButtonMapper from "
|
|
8
|
-
import useIsAboveBreakpoint from "
|
|
9
|
-
import { filterStyledSystemMarginProps } from "
|
|
10
|
-
import { TooltipProvider } from "
|
|
11
|
-
import Logger from "
|
|
12
|
-
import { NewValidationContext } from "
|
|
13
|
-
import ValidationMessage from "
|
|
14
|
-
import Box from "../../
|
|
15
|
-
import { ErrorBorder } from "../../
|
|
4
|
+
import tagComponent from "../../../__internal__/utils/helpers/tags/tags";
|
|
5
|
+
import Fieldset from "../../../__internal__/fieldset";
|
|
6
|
+
import RadioButtonGroupStyle, { StyledHintText } from "../radio-button-group/radio-button-group.style";
|
|
7
|
+
import RadioButtonMapper from "../../../__internal__/radio-button-mapper/radio-button-mapper.component";
|
|
8
|
+
import useIsAboveBreakpoint from "../../../hooks/__internal__/useIsAboveBreakpoint";
|
|
9
|
+
import { filterStyledSystemMarginProps } from "../../../style/utils";
|
|
10
|
+
import { TooltipProvider } from "../../../__internal__/tooltip-provider";
|
|
11
|
+
import Logger from "../../../__internal__/utils/logger";
|
|
12
|
+
import { NewValidationContext } from "../../carbon-provider/carbon-provider.component";
|
|
13
|
+
import ValidationMessage from "../../../__internal__/validation-message/validation-message.component";
|
|
14
|
+
import Box from "../../box";
|
|
15
|
+
import { ErrorBorder } from "../../textbox/textbox.style";
|
|
16
16
|
let deprecateUncontrolledWarnTriggered = false;
|
|
17
17
|
export const RadioButtonGroup = props => {
|
|
18
18
|
const {
|
|
@@ -3,6 +3,10 @@ import { MarginProps } from "styled-system";
|
|
|
3
3
|
import { CommonInputProps } from "../../__internal__/input";
|
|
4
4
|
import { ValidationProps } from "../../__internal__/validations";
|
|
5
5
|
import { IconType } from "../icon";
|
|
6
|
+
export declare const ALIGN_DEFAULT = "left";
|
|
7
|
+
export declare const SIZE_DEFAULT = "medium";
|
|
8
|
+
export declare const LABEL_WIDTH_DEFAULT = 30;
|
|
9
|
+
export declare const LABEL_VALIDATION_DEFAULT = false;
|
|
6
10
|
export interface CommonTextboxProps extends ValidationProps, MarginProps, Omit<CommonInputProps, "size"> {
|
|
7
11
|
/** Prop to specify the aria-labelledby property of the component */
|
|
8
12
|
"aria-labelledby"?: string;
|
|
@@ -18,11 +18,15 @@ import NumeralDateContext from "../numeral-date/numeral-date-context";
|
|
|
18
18
|
import Box from "../box";
|
|
19
19
|
import Logger from "../../__internal__/utils/logger";
|
|
20
20
|
import guid from "../../__internal__/utils/helpers/guid";
|
|
21
|
+
export const ALIGN_DEFAULT = "left";
|
|
22
|
+
export const SIZE_DEFAULT = "medium";
|
|
23
|
+
export const LABEL_WIDTH_DEFAULT = 30;
|
|
24
|
+
export const LABEL_VALIDATION_DEFAULT = false;
|
|
21
25
|
let deprecateInputRefWarnTriggered = false;
|
|
22
26
|
let deprecateUncontrolledWarnTriggered = false;
|
|
23
27
|
const Textbox = /*#__PURE__*/React.forwardRef(({
|
|
24
28
|
"aria-labelledby": ariaLabelledBy,
|
|
25
|
-
align =
|
|
29
|
+
align = ALIGN_DEFAULT,
|
|
26
30
|
autoFocus,
|
|
27
31
|
children,
|
|
28
32
|
disabled,
|
|
@@ -42,7 +46,7 @@ const Textbox = /*#__PURE__*/React.forwardRef(({
|
|
|
42
46
|
info,
|
|
43
47
|
name,
|
|
44
48
|
reverse,
|
|
45
|
-
size =
|
|
49
|
+
size = SIZE_DEFAULT,
|
|
46
50
|
value,
|
|
47
51
|
readOnly,
|
|
48
52
|
placeholder,
|
|
@@ -58,8 +62,8 @@ const Textbox = /*#__PURE__*/React.forwardRef(({
|
|
|
58
62
|
iconOnClick,
|
|
59
63
|
iconOnMouseDown,
|
|
60
64
|
iconTabIndex,
|
|
61
|
-
validationOnLabel =
|
|
62
|
-
labelWidth =
|
|
65
|
+
validationOnLabel = LABEL_VALIDATION_DEFAULT,
|
|
66
|
+
labelWidth = LABEL_WIDTH_DEFAULT,
|
|
63
67
|
inputWidth,
|
|
64
68
|
maxWidth,
|
|
65
69
|
prefix,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as TileSelect } from "./tile-select.component";
|
|
2
2
|
export type { TileSelectProps, TileSelectDeselectEvent, } from "./tile-select.component";
|
|
3
|
-
export { default as TileSelectGroup } from "./tile-select-group.component";
|
|
4
|
-
export type { TileSelectGroupProps } from "./tile-select-group.component";
|
|
3
|
+
export { default as TileSelectGroup } from "./tile-select-group/tile-select-group.component";
|
|
4
|
+
export type { TileSelectGroupProps } from "./tile-select-group/tile-select-group.component";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as TileSelect } from "./tile-select.component";
|
|
2
|
-
export { default as TileSelectGroup } from "./tile-select-group.component";
|
|
2
|
+
export { default as TileSelectGroup } from "./tile-select-group/tile-select-group.component";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MarginProps } from "styled-system";
|
|
3
|
-
import { TileSelectDeselectEvent } from "
|
|
3
|
+
import { TileSelectDeselectEvent } from "../tile-select.component";
|
|
4
4
|
export interface TileSelectGroupProps extends MarginProps {
|
|
5
5
|
/** The TileSelect components to be rendered in the group */
|
|
6
6
|
children: React.ReactNode;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
import React from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
-
import tagComponent from "
|
|
5
|
-
import RadioButtonMapper from "
|
|
6
|
-
import { StyledTileSelectFieldset, StyledGroupDescription } from "
|
|
7
|
-
import { filterStyledSystemMarginProps } from "
|
|
4
|
+
import tagComponent from "../../../__internal__/utils/helpers/tags/tags";
|
|
5
|
+
import RadioButtonMapper from "../../../__internal__/radio-button-mapper/radio-button-mapper.component";
|
|
6
|
+
import { StyledTileSelectFieldset, StyledGroupDescription } from "../tile-select.style";
|
|
7
|
+
import { filterStyledSystemMarginProps } from "../../../style/utils";
|
|
8
8
|
export const TileSelectGroup = ({
|
|
9
9
|
children,
|
|
10
10
|
name,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
|
|
2
3
|
declare type ToastVariants = "error" | "info" | "success" | "warning" | "notice" | "neutral" | "notification";
|
|
3
4
|
declare type AlignOptions = "left" | "center" | "right";
|
|
4
5
|
declare type AlignYOptions = "top" | "center" | "bottom";
|
|
@@ -21,6 +22,8 @@ export interface ToastProps {
|
|
|
21
22
|
open?: boolean;
|
|
22
23
|
/** Callback for when dismissed. */
|
|
23
24
|
onDismiss?: (ev?: KeyboardEvent | React.KeyboardEvent<HTMLButtonElement> | React.MouseEvent<HTMLButtonElement>) => void;
|
|
25
|
+
/** Data tag prop bag for close Button */
|
|
26
|
+
closeButtonDataProps?: Pick<TagProps, "data-role" | "data-element">;
|
|
24
27
|
/** Time for Toast to remain on screen */
|
|
25
28
|
timeout?: string | number;
|
|
26
29
|
/** Centers the Toast on the screen */
|
|
@@ -25,6 +25,7 @@ const Toast = /*#__PURE__*/React.forwardRef(({
|
|
|
25
25
|
timeout,
|
|
26
26
|
variant = "success",
|
|
27
27
|
disableAutoFocus,
|
|
28
|
+
closeButtonDataProps,
|
|
28
29
|
...restProps
|
|
29
30
|
}, ref) => {
|
|
30
31
|
const isNotice = variant === "notice";
|
|
@@ -88,12 +89,14 @@ const Toast = /*#__PURE__*/React.forwardRef(({
|
|
|
88
89
|
}, []);
|
|
89
90
|
function renderCloseIcon() {
|
|
90
91
|
if (!onDismiss) return null;
|
|
91
|
-
return /*#__PURE__*/React.createElement(IconButton, {
|
|
92
|
+
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
92
93
|
"aria-label": locale.toast.ariaLabels.close(),
|
|
93
|
-
"data-element": "close",
|
|
94
94
|
onClick: onDismiss,
|
|
95
95
|
ref: closeIconRef
|
|
96
|
-
},
|
|
96
|
+
}, tagComponent("close", {
|
|
97
|
+
"data-element": "close",
|
|
98
|
+
...closeButtonDataProps
|
|
99
|
+
})), /*#__PURE__*/React.createElement(Icon, {
|
|
97
100
|
type: "close"
|
|
98
101
|
}));
|
|
99
102
|
}
|
|
@@ -164,6 +167,10 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
164
167
|
"alignY": PropTypes.oneOf(["bottom", "center", "top"]),
|
|
165
168
|
"children": PropTypes.node,
|
|
166
169
|
"className": PropTypes.string,
|
|
170
|
+
"closeButtonDataProps": PropTypes.shape({
|
|
171
|
+
"data-element": PropTypes.string,
|
|
172
|
+
"data-role": PropTypes.string
|
|
173
|
+
}),
|
|
167
174
|
"data-component": PropTypes.string,
|
|
168
175
|
"disableAutoFocus": PropTypes.bool,
|
|
169
176
|
"id": PropTypes.string,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { SpaceProps } from "styled-system";
|
|
3
2
|
declare type TintRange = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100;
|
|
4
3
|
export interface VerticalDividerProps extends SpaceProps {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { default as VerticalMenu } from "./vertical-menu.component";
|
|
2
2
|
export type { VerticalMenuProps } from "./vertical-menu.component";
|
|
3
|
-
export { default as VerticalMenuItem } from "./vertical-menu-item.component";
|
|
4
|
-
export type { VerticalMenuItemProps } from "./vertical-menu-item.component";
|
|
5
|
-
export { default as VerticalMenuFullScreen } from "./vertical-menu-full-screen.component";
|
|
6
|
-
export type { VerticalMenuFullScreenProps } from "./vertical-menu-full-screen.component";
|
|
7
|
-
export { default as VerticalMenuTrigger } from "./vertical-menu-trigger.component";
|
|
8
|
-
export type { VerticalMenuTriggerProps } from "./vertical-menu-trigger.component";
|
|
3
|
+
export { default as VerticalMenuItem } from "./vertical-menu-item/vertical-menu-item.component";
|
|
4
|
+
export type { VerticalMenuItemProps } from "./vertical-menu-item/vertical-menu-item.component";
|
|
5
|
+
export { default as VerticalMenuFullScreen } from "./vertical-menu-full-screen/vertical-menu-full-screen.component";
|
|
6
|
+
export type { VerticalMenuFullScreenProps } from "./vertical-menu-full-screen/vertical-menu-full-screen.component";
|
|
7
|
+
export { default as VerticalMenuTrigger } from "./vertical-menu-trigger/vertical-menu-trigger.component";
|
|
8
|
+
export type { VerticalMenuTriggerProps } from "./vertical-menu-trigger/vertical-menu-trigger.component";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as VerticalMenu } from "./vertical-menu.component";
|
|
2
|
-
export { default as VerticalMenuItem } from "./vertical-menu-item.component";
|
|
3
|
-
export { default as VerticalMenuFullScreen } from "./vertical-menu-full-screen.component";
|
|
4
|
-
export { default as VerticalMenuTrigger } from "./vertical-menu-trigger.component";
|
|
2
|
+
export { default as VerticalMenuItem } from "./vertical-menu-item/vertical-menu-item.component";
|
|
3
|
+
export { default as VerticalMenuFullScreen } from "./vertical-menu-full-screen/vertical-menu-full-screen.component";
|
|
4
|
+
export { default as VerticalMenuTrigger } from "./vertical-menu-trigger/vertical-menu-trigger.component";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { TagProps } from "
|
|
2
|
+
import { TagProps } from "../../../__internal__/utils/helpers/tags";
|
|
3
3
|
export interface VerticalMenuFullScreenProps extends TagProps {
|
|
4
4
|
/** An aria-label attribute for the menu */
|
|
5
5
|
"aria-label"?: string;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
import React, { useCallback, useRef } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
-
import tagComponent from "
|
|
5
|
-
import useLocale from "
|
|
6
|
-
import Portal from "
|
|
7
|
-
import FocusTrap from "
|
|
8
|
-
import IconButton from "
|
|
9
|
-
import Icon from "
|
|
10
|
-
import Box from "
|
|
11
|
-
import { StyledList, StyledVerticalMenuFullScreen } from "
|
|
12
|
-
import VerticalMenuFullScreenContext from "
|
|
13
|
-
import Events from "
|
|
4
|
+
import tagComponent from "../../../__internal__/utils/helpers/tags";
|
|
5
|
+
import useLocale from "../../../hooks/__internal__/useLocale";
|
|
6
|
+
import Portal from "../../portal";
|
|
7
|
+
import FocusTrap from "../../../__internal__/focus-trap/focus-trap.component";
|
|
8
|
+
import IconButton from "../../icon-button";
|
|
9
|
+
import Icon from "../../icon";
|
|
10
|
+
import Box from "../../box";
|
|
11
|
+
import { StyledList, StyledVerticalMenuFullScreen } from "../vertical-menu.style";
|
|
12
|
+
import VerticalMenuFullScreenContext from "../vertical-menu-full-screen/vertical-menu-full-screen.context";
|
|
13
|
+
import Events from "../../../__internal__/utils/helpers/events/events";
|
|
14
14
|
export const VerticalMenuFullScreen = ({
|
|
15
15
|
"aria-label": ariaLabel,
|
|
16
16
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { PaddingProps } from "styled-system";
|
|
3
|
-
import { TagProps } from "
|
|
4
|
-
import { IconType } from "
|
|
3
|
+
import { TagProps } from "../../../__internal__/utils/helpers/tags";
|
|
4
|
+
import { IconType } from "../../icon";
|
|
5
5
|
export interface VerticalMenuItemProps<T = React.ElementType> extends PaddingProps, TagProps {
|
|
6
6
|
/** Children of the menu item - another level of VerticalMenuItems */
|
|
7
7
|
children?: React.ReactNode;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
import React, { useState, useContext } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
-
import tagComponent from "
|
|
5
|
-
import { filterStyledSystemPaddingProps } from "
|
|
6
|
-
import VerticalMenuFullScreenContext from "
|
|
7
|
-
import { StyledVerticalMenuItem, StyledTitle, StyledAdornment, StyledList, StyledChevronIcon, StyledTitleIcon } from "
|
|
4
|
+
import tagComponent from "../../../__internal__/utils/helpers/tags";
|
|
5
|
+
import { filterStyledSystemPaddingProps } from "../../../style/utils";
|
|
6
|
+
import VerticalMenuFullScreenContext from "../vertical-menu-full-screen/vertical-menu-full-screen.context";
|
|
7
|
+
import { StyledVerticalMenuItem, StyledTitle, StyledAdornment, StyledList, StyledChevronIcon, StyledTitleIcon } from "../vertical-menu.style";
|
|
8
8
|
const MenuItemContext = /*#__PURE__*/React.createContext({
|
|
9
9
|
level: 0
|
|
10
10
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { PaddingProps } from "styled-system";
|
|
3
|
-
import { TagProps } from "
|
|
3
|
+
import { TagProps } from "../../../__internal__/utils/helpers/tags";
|
|
4
4
|
export interface VerticalMenuTriggerProps extends PaddingProps, TagProps {
|
|
5
5
|
/** Height of the menu trigger */
|
|
6
6
|
height?: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
import React from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
-
import tagComponent from "
|
|
5
|
-
import { filterStyledSystemPaddingProps } from "
|
|
6
|
-
import { StyledVerticalMenuItem, StyledTitle } from "
|
|
4
|
+
import tagComponent from "../../../__internal__/utils/helpers/tags";
|
|
5
|
+
import { filterStyledSystemPaddingProps } from "../../../style/utils";
|
|
6
|
+
import { StyledVerticalMenuItem, StyledTitle } from "../vertical-menu.style";
|
|
7
7
|
export const VerticalMenuTrigger = ({
|
|
8
8
|
height = "40px",
|
|
9
9
|
p = 2,
|
|
@@ -2,8 +2,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
2
2
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
3
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
// TODO: This component can be refactored to remove redundant code
|
|
8
8
|
// once we can confirm that all Sage products use version 105.0.0^
|
|
9
9
|
let ScrollBlockManager = /*#__PURE__*/function () {
|