carbon-react 105.1.1 → 106.0.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__/tooltip-provider/index.d.ts +19 -24
- package/esm/__internal__/tooltip-provider/index.js +1 -11
- package/esm/__internal__/utils/helpers/browser/index.d.ts +15 -1
- package/esm/__internal__/utils/helpers/browser/index.js +33 -1
- package/esm/__internal__/utils/helpers/browser-type-check/index.d.ts +7 -1
- package/esm/__internal__/utils/helpers/browser-type-check/index.js +8 -1
- package/esm/__internal__/utils/helpers/events/composedPath.d.ts +1 -1
- package/esm/__internal__/utils/helpers/events/events.d.ts +132 -31
- package/esm/__internal__/utils/helpers/events/events.js +10 -125
- package/esm/__internal__/utils/helpers/guid/index.d.ts +5 -0
- package/esm/__internal__/utils/helpers/guid/{guid.js → index.js} +0 -2
- package/esm/__internal__/utils/helpers/tags/tags-specs/tags-specs.d.ts +4 -2
- package/esm/__internal__/utils/helpers/tags/tags-specs/tags-specs.js +2 -1
- package/esm/__internal__/utils/helpers/tags/tags.d.ts +10 -6
- package/esm/__internal__/utils/helpers/tags/tags.js +2 -6
- package/esm/__internal__/utils/helpers/useUniqueId/index.d.ts +2 -0
- package/esm/__internal__/utils/helpers/useUniqueId/index.js +7 -0
- package/esm/__internal__/utils/logger/index.d.ts +5 -1
- package/esm/__internal__/utils/logger/index.js +25 -1
- package/esm/__spec_helper__/mock-match-media.d.ts +3 -1
- package/esm/components/app-wrapper/app-wrapper.component.d.ts +4 -0
- package/esm/components/app-wrapper/app-wrapper.component.js +5 -3
- package/esm/components/badge/badge.style.d.ts +4 -2
- package/esm/components/button/button-types.style.d.ts +1 -2
- package/esm/components/button/button-types.style.js +3 -1
- package/esm/components/button/button.component.d.ts +67 -36
- package/esm/components/button/button.component.js +3314 -165
- package/esm/components/button/button.config.d.ts +4 -3
- package/esm/components/button/button.style.d.ts +6 -8
- package/esm/components/button/button.style.js +51 -95
- package/esm/components/button/index.d.ts +2 -2
- package/esm/components/confirm/confirm.component.js +1 -1
- package/esm/components/dialog/dialog.component.js +1 -1
- package/esm/components/dialog-full-screen/dialog-full-screen.component.js +1 -1
- package/esm/components/duelling-picklist/picklist-group/picklist-group.style.d.ts +1 -2
- package/esm/components/duelling-picklist/picklist-item/picklist-item.style.d.ts +1 -2
- package/esm/components/fieldset/fieldset.component.d.ts +6 -1
- package/esm/components/fieldset/fieldset.component.js +14 -15
- package/esm/components/heading/heading.component.d.ts +5 -0
- package/esm/components/icon/index.d.ts +1 -0
- package/esm/components/multi-action-button/multi-action-button.component.d.ts +3 -1
- package/esm/components/multi-action-button/multi-action-button.component.js +7 -5
- package/esm/components/multi-action-button/multi-action-button.d.ts +4 -2
- package/esm/components/multi-step-wizard/multi-step-wizard.d.ts +22 -0
- package/esm/components/multi-step-wizard/step/step.d.ts +6 -0
- package/esm/components/multi-step-wizard/step/step.style.d.ts +4 -2
- package/esm/components/portrait/portrait-initials.component.js +1 -1
- package/esm/components/radio-button/radio-button-svg.component.js +29 -16
- package/esm/components/scrollable-list/scrollable-list.component.d.ts +8 -0
- package/esm/components/select/option/index.d.ts +1 -1
- package/esm/components/select/select-list/select-list.component.js +1 -1
- package/esm/components/select/select-textbox/select-textbox.component.js +1 -1
- package/esm/components/split-button/split-button-toggle.style.d.ts +2 -6
- package/esm/components/split-button/split-button.component.d.ts +3 -1
- package/esm/components/split-button/split-button.component.js +7 -4
- package/esm/components/split-button/split-button.d.ts +5 -2
- package/esm/components/textbox/textbox.component.d.ts +1 -2
- package/esm/components/textbox/textbox.component.js +7 -6
- package/esm/components/tooltip/index.d.ts +2 -1
- package/esm/components/tooltip/tooltip-pointer.style.d.ts +10 -1
- package/esm/components/tooltip/tooltip-pointer.style.js +5 -12
- package/esm/components/tooltip/tooltip.component.d.ts +33 -2
- package/esm/components/tooltip/tooltip.component.js +255 -110
- package/esm/components/tooltip/tooltip.config.d.ts +2 -1
- package/esm/components/tooltip/tooltip.style.d.ts +7 -2
- package/esm/components/tooltip/tooltip.style.js +7 -21
- package/esm/components/typography/typography.component.d.ts +1 -1
- package/esm/hooks/__internal__/useCharacterCount/index.d.ts +1 -2
- package/esm/hooks/__internal__/useCharacterCount/index.js +1 -18
- package/esm/hooks/__internal__/useCharacterCount/useCharacterCount.d.ts +3 -0
- package/esm/hooks/__internal__/useCharacterCount/useCharacterCount.js +24 -0
- package/esm/hooks/__internal__/useInputAccessibility/index.d.ts +1 -24
- package/esm/hooks/__internal__/useInputAccessibility/useInputAccessibility.d.ts +11 -11
- package/esm/hooks/__internal__/useInputAccessibility/useInputAccessibility.js +1 -3
- package/esm/hooks/__internal__/useIsAboveBreakpoint/index.d.ts +1 -1
- package/esm/hooks/__internal__/useIsAboveBreakpoint/index.js +1 -6
- package/esm/hooks/__internal__/useIsAboveBreakpoint/useIsAboveBreakpoint.d.ts +1 -0
- package/esm/hooks/__internal__/useIsAboveBreakpoint/useIsAboveBreakpoint.js +6 -0
- package/esm/hooks/__internal__/useLocale/index.d.ts +1 -1
- package/esm/hooks/__internal__/useLocale/index.js +1 -5
- package/esm/hooks/__internal__/useLocale/useLocale.d.ts +1 -0
- package/esm/hooks/__internal__/useLocale/useLocale.js +5 -0
- package/esm/hooks/__internal__/useResizeObserver/index.d.ts +1 -10
- package/esm/hooks/__internal__/useResizeObserver/index.js +1 -23
- package/esm/hooks/__internal__/useResizeObserver/useResizeObserver.d.ts +8 -0
- package/esm/hooks/__internal__/useResizeObserver/useResizeObserver.js +29 -0
- package/esm/hooks/__internal__/useScrollBlock/index.d.ts +1 -4
- package/esm/hooks/__internal__/useScrollBlock/scroll-block-manager.d.ts +23 -9
- package/esm/hooks/__internal__/useScrollBlock/scroll-block-manager.js +24 -12
- package/esm/hooks/__internal__/useScrollBlock/useScrollBlock.d.ts +2 -2
- package/esm/hooks/__internal__/useScrollBlock/useScrollBlock.js +3 -5
- package/esm/hooks/useMediaQuery/index.d.ts +1 -1
- package/esm/hooks/useMediaQuery/index.js +1 -19
- package/esm/hooks/useMediaQuery/useMediaQuery.d.ts +1 -0
- package/esm/hooks/useMediaQuery/useMediaQuery.js +19 -0
- package/esm/locales/en-gb.d.ts +3 -5
- package/esm/locales/en-gb.js +5 -4
- package/esm/locales/index.d.ts +1 -1
- package/esm/locales/index.js +2 -0
- package/esm/locales/locale.d.ts +99 -105
- package/esm/locales/locale.js +1 -0
- package/esm/locales/pl-pl.d.ts +3 -5
- package/esm/locales/pl-pl.js +5 -4
- package/esm/style/{fonts → assets}/carbon-icons-webfont.woff +0 -0
- package/esm/style/fonts.css +30 -0
- package/esm/style/global-style.js +1 -1
- package/esm/style/themes/base/base-theme.config.d.ts +17 -8
- package/esm/style/themes/sage/index.d.ts +17 -8
- package/lib/__internal__/tooltip-provider/index.d.ts +19 -24
- package/lib/__internal__/tooltip-provider/index.js +2 -13
- package/lib/__internal__/utils/helpers/browser/index.d.ts +15 -1
- package/lib/__internal__/utils/helpers/browser/index.js +33 -8
- package/lib/__internal__/utils/helpers/browser-type-check/index.d.ts +7 -1
- package/lib/__internal__/utils/helpers/browser-type-check/index.js +10 -21
- package/lib/__internal__/utils/helpers/events/composedPath.d.ts +1 -1
- package/lib/__internal__/utils/helpers/events/events.d.ts +132 -31
- package/lib/__internal__/utils/helpers/events/events.js +10 -125
- package/lib/__internal__/utils/helpers/guid/index.d.ts +5 -0
- package/lib/__internal__/utils/helpers/guid/{guid.js → index.js} +0 -2
- package/lib/__internal__/utils/helpers/guid/package.json +5 -2
- package/lib/__internal__/utils/helpers/tags/tags-specs/tags-specs.d.ts +4 -2
- package/lib/__internal__/utils/helpers/tags/tags-specs/tags-specs.js +2 -1
- package/lib/__internal__/utils/helpers/tags/tags.d.ts +10 -6
- package/lib/__internal__/utils/helpers/tags/tags.js +2 -6
- package/lib/__internal__/utils/helpers/useUniqueId/index.d.ts +2 -0
- package/lib/__internal__/utils/helpers/useUniqueId/index.js +20 -0
- package/lib/__internal__/utils/helpers/useUniqueId/package.json +6 -0
- package/lib/__internal__/utils/logger/index.d.ts +5 -1
- package/lib/__internal__/utils/logger/index.js +26 -8
- package/lib/__spec_helper__/mock-match-media.d.ts +3 -1
- package/lib/components/app-wrapper/app-wrapper.component.d.ts +4 -0
- package/lib/components/app-wrapper/app-wrapper.component.js +5 -4
- package/lib/components/badge/badge.style.d.ts +4 -2
- package/lib/components/button/button-types.style.d.ts +1 -2
- package/lib/components/button/button-types.style.js +0 -1
- package/lib/components/button/button.component.d.ts +67 -36
- package/lib/components/button/button.component.js +3381 -172
- package/lib/components/button/button.config.d.ts +4 -3
- package/lib/components/button/button.style.d.ts +6 -8
- package/lib/components/button/button.style.js +52 -101
- package/lib/components/button/index.d.ts +2 -2
- package/lib/components/confirm/confirm.component.js +1 -1
- package/lib/components/dialog/dialog.component.js +1 -1
- package/lib/components/dialog-full-screen/dialog-full-screen.component.js +1 -1
- package/lib/components/duelling-picklist/picklist-group/picklist-group.style.d.ts +1 -2
- package/lib/components/duelling-picklist/picklist-item/picklist-item.style.d.ts +1 -2
- package/lib/components/fieldset/fieldset.component.d.ts +6 -1
- package/lib/components/fieldset/fieldset.component.js +14 -16
- package/lib/components/heading/heading.component.d.ts +5 -0
- package/lib/components/icon/index.d.ts +1 -0
- package/lib/components/multi-action-button/multi-action-button.component.d.ts +3 -1
- package/lib/components/multi-action-button/multi-action-button.component.js +6 -4
- package/lib/components/multi-action-button/multi-action-button.d.ts +4 -2
- package/lib/components/multi-step-wizard/multi-step-wizard.d.ts +22 -0
- package/lib/components/multi-step-wizard/step/step.d.ts +6 -0
- package/lib/components/multi-step-wizard/step/step.style.d.ts +4 -2
- package/lib/components/portrait/portrait-initials.component.js +1 -1
- package/lib/components/radio-button/radio-button-svg.component.js +38 -20
- package/lib/components/scrollable-list/scrollable-list.component.d.ts +8 -0
- package/lib/components/select/option/index.d.ts +1 -1
- package/lib/components/select/select-list/select-list.component.js +1 -1
- package/lib/components/select/select-textbox/select-textbox.component.js +1 -1
- package/lib/components/split-button/split-button-toggle.style.d.ts +2 -6
- package/lib/components/split-button/split-button.component.d.ts +3 -1
- package/lib/components/split-button/split-button.component.js +6 -3
- package/lib/components/split-button/split-button.d.ts +5 -2
- package/lib/components/textbox/textbox.component.d.ts +1 -2
- package/lib/components/textbox/textbox.component.js +7 -8
- package/lib/components/tooltip/index.d.ts +2 -1
- package/lib/components/tooltip/tooltip-pointer.style.d.ts +10 -1
- package/lib/components/tooltip/tooltip-pointer.style.js +7 -15
- package/lib/components/tooltip/tooltip.component.d.ts +33 -2
- package/lib/components/tooltip/tooltip.component.js +221 -130
- package/lib/components/tooltip/tooltip.config.d.ts +2 -1
- package/lib/components/tooltip/tooltip.style.d.ts +7 -2
- package/lib/components/tooltip/tooltip.style.js +7 -22
- package/lib/components/typography/typography.component.d.ts +1 -1
- package/lib/components/vertical-divider/vertical-divider.component.js +3 -0
- package/lib/hooks/__internal__/useCharacterCount/index.d.ts +1 -2
- package/lib/hooks/__internal__/useCharacterCount/index.js +8 -27
- package/lib/hooks/__internal__/useCharacterCount/useCharacterCount.d.ts +3 -0
- package/lib/hooks/__internal__/useCharacterCount/useCharacterCount.js +40 -0
- package/lib/hooks/__internal__/useInputAccessibility/index.d.ts +1 -24
- package/lib/hooks/__internal__/useInputAccessibility/useInputAccessibility.d.ts +11 -11
- package/lib/hooks/__internal__/useInputAccessibility/useInputAccessibility.js +1 -3
- package/lib/hooks/__internal__/useIsAboveBreakpoint/index.d.ts +1 -1
- package/lib/hooks/__internal__/useIsAboveBreakpoint/index.js +8 -9
- package/lib/hooks/__internal__/useIsAboveBreakpoint/useIsAboveBreakpoint.d.ts +1 -0
- package/lib/hooks/__internal__/useIsAboveBreakpoint/useIsAboveBreakpoint.js +16 -0
- package/lib/hooks/__internal__/useLocale/index.d.ts +1 -1
- package/lib/hooks/__internal__/useLocale/index.js +8 -9
- package/lib/hooks/__internal__/useLocale/useLocale.d.ts +1 -0
- package/lib/hooks/__internal__/useLocale/useLocale.js +16 -0
- package/lib/hooks/__internal__/useResizeObserver/index.d.ts +1 -10
- package/lib/hooks/__internal__/useResizeObserver/index.js +8 -24
- package/lib/hooks/__internal__/useResizeObserver/useResizeObserver.d.ts +8 -0
- package/lib/hooks/__internal__/useResizeObserver/useResizeObserver.js +37 -0
- package/lib/hooks/__internal__/useScrollBlock/index.d.ts +1 -4
- package/lib/hooks/__internal__/useScrollBlock/scroll-block-manager.d.ts +23 -9
- package/lib/hooks/__internal__/useScrollBlock/scroll-block-manager.js +24 -12
- package/lib/hooks/__internal__/useScrollBlock/useScrollBlock.d.ts +2 -2
- package/lib/hooks/__internal__/useScrollBlock/useScrollBlock.js +3 -5
- package/lib/hooks/useMediaQuery/index.d.ts +1 -1
- package/lib/hooks/useMediaQuery/index.js +8 -25
- package/lib/hooks/useMediaQuery/useMediaQuery.d.ts +1 -0
- package/lib/hooks/useMediaQuery/useMediaQuery.js +32 -0
- package/lib/locales/en-gb.d.ts +3 -5
- package/lib/locales/en-gb.js +2 -1
- package/lib/locales/index.d.ts +1 -1
- package/lib/locales/index.js +23 -0
- package/lib/locales/locale.d.ts +99 -105
- package/lib/locales/locale.js +5 -0
- package/lib/{__internal__/utils/ether → locales}/package.json +1 -1
- package/lib/locales/pl-pl.d.ts +3 -5
- package/lib/locales/pl-pl.js +2 -1
- package/lib/style/{fonts → assets}/carbon-icons-webfont.woff +0 -0
- package/lib/style/fonts.css +30 -0
- package/lib/style/global-style.js +1 -1
- package/lib/style/themes/base/base-theme.config.d.ts +17 -8
- package/lib/style/themes/sage/index.d.ts +17 -8
- package/package.json +10 -5
- package/esm/__internal__/utils/ether/ether.d.ts +0 -19
- package/esm/__internal__/utils/ether/ether.js +0 -29
- package/esm/__internal__/utils/ether/index.d.ts +0 -1
- package/esm/__internal__/utils/ether/index.js +0 -1
- package/esm/__internal__/utils/helpers/browser/browser.d.ts +0 -17
- package/esm/__internal__/utils/helpers/browser/browser.js +0 -198
- package/esm/__internal__/utils/helpers/browser-type-check/browser-type-check.d.ts +0 -7
- package/esm/__internal__/utils/helpers/browser-type-check/browser-type-check.js +0 -14
- package/esm/__internal__/utils/helpers/guid/__spec__.d.ts +0 -1
- package/esm/__internal__/utils/helpers/guid/__spec__.js +0 -10
- package/esm/__internal__/utils/helpers/guid/guid.d.ts +0 -2
- package/esm/__internal__/utils/helpers/guid/package.json +0 -3
- package/esm/__internal__/utils/helpers/immutable/__spec__.d.ts +0 -1
- package/esm/__internal__/utils/helpers/immutable/__spec__.js +0 -117
- package/esm/__internal__/utils/helpers/immutable/immutable.d.ts +0 -4
- package/esm/__internal__/utils/helpers/immutable/immutable.js +0 -36
- package/esm/__internal__/utils/helpers/immutable/package.json +0 -4
- package/esm/__internal__/utils/helpers/with-unique-id-props/index.d.ts +0 -1
- package/esm/__internal__/utils/helpers/with-unique-id-props/index.js +0 -1
- package/esm/__internal__/utils/helpers/with-unique-id-props/with-unique-id-props.hoc.d.ts +0 -7
- package/esm/__internal__/utils/helpers/with-unique-id-props/with-unique-id-props.hoc.js +0 -82
- package/esm/__internal__/utils/logger/logger.d.ts +0 -9
- package/esm/__internal__/utils/logger/logger.js +0 -71
- package/esm/components/button/button.d.ts +0 -85
- package/esm/components/tooltip/tooltip.d.ts +0 -40
- package/lib/__internal__/utils/ether/ether.d.ts +0 -19
- package/lib/__internal__/utils/ether/ether.js +0 -33
- package/lib/__internal__/utils/ether/index.d.ts +0 -1
- package/lib/__internal__/utils/ether/index.js +0 -18
- package/lib/__internal__/utils/helpers/browser/browser.d.ts +0 -17
- package/lib/__internal__/utils/helpers/browser/browser.js +0 -213
- package/lib/__internal__/utils/helpers/browser-type-check/browser-type-check.d.ts +0 -7
- package/lib/__internal__/utils/helpers/browser-type-check/browser-type-check.js +0 -26
- package/lib/__internal__/utils/helpers/guid/__spec__.d.ts +0 -1
- package/lib/__internal__/utils/helpers/guid/__spec__.js +0 -15
- package/lib/__internal__/utils/helpers/guid/guid.d.ts +0 -2
- package/lib/__internal__/utils/helpers/immutable/__spec__.d.ts +0 -1
- package/lib/__internal__/utils/helpers/immutable/__spec__.js +0 -135
- package/lib/__internal__/utils/helpers/immutable/immutable.d.ts +0 -4
- package/lib/__internal__/utils/helpers/immutable/immutable.js +0 -46
- package/lib/__internal__/utils/helpers/immutable/package.json +0 -4
- package/lib/__internal__/utils/helpers/with-unique-id-props/index.d.ts +0 -1
- package/lib/__internal__/utils/helpers/with-unique-id-props/index.js +0 -15
- package/lib/__internal__/utils/helpers/with-unique-id-props/package.json +0 -6
- package/lib/__internal__/utils/helpers/with-unique-id-props/with-unique-id-props.hoc.d.ts +0 -7
- package/lib/__internal__/utils/helpers/with-unique-id-props/with-unique-id-props.hoc.js +0 -96
- package/lib/__internal__/utils/logger/logger.d.ts +0 -9
- package/lib/__internal__/utils/logger/logger.js +0 -78
- package/lib/components/button/button.d.ts +0 -85
- package/lib/components/tooltip/tooltip.d.ts +0 -40
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export const
|
|
3
|
-
export const
|
|
1
|
+
import { ButtonTypes } from "./button.component";
|
|
2
|
+
export declare const BUTTON_VARIANTS: ButtonTypes[];
|
|
3
|
+
export declare const BUTTON_SIZES: string[];
|
|
4
|
+
export declare const BUTTON_ICON_POSITIONS: string[];
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
declare const StyledButton: import("styled-components").StyledComponent<"button", any, {
|
|
4
|
-
iconOnly
|
|
5
|
-
disabled: any;
|
|
6
|
-
buttonType: any;
|
|
7
|
-
size: any;
|
|
8
|
-
destructive: any;
|
|
1
|
+
import { SpaceProps } from "styled-system";
|
|
2
|
+
import { ButtonProps } from "./button.component";
|
|
3
|
+
declare const StyledButton: import("styled-components").StyledComponent<"button", any, SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & Omit<ButtonProps, "as"> & {
|
|
4
|
+
iconOnly?: boolean | undefined;
|
|
9
5
|
}, never>;
|
|
6
|
+
export declare const StyledButtonSubtext: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
7
|
+
export default StyledButton;
|
|
@@ -1,65 +1,10 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import { space } from "styled-system";
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
import propTypes from "@styled-system/prop-types";
|
|
5
3
|
import BaseTheme from "../../style/themes/base";
|
|
6
4
|
import buttonTypes from "./button-types.style";
|
|
7
5
|
import StyledIcon from "../icon/icon.style";
|
|
8
|
-
import { BUTTON_ICON_POSITIONS, BUTTON_SIZES, BUTTON_VARIANTS } from "./button.config";
|
|
9
|
-
import { ICONS } from "../icon/icon-config";
|
|
10
|
-
const StyledButton = styled.button`
|
|
11
|
-
${space}
|
|
12
|
-
${({
|
|
13
|
-
disabled,
|
|
14
|
-
noWrap
|
|
15
|
-
}) => css`
|
|
16
|
-
align-items: center;
|
|
17
|
-
cursor: ${disabled ? "not-allowed" : "pointer"};
|
|
18
|
-
display: inline-flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
flex-flow: wrap;
|
|
21
|
-
border-radius: 0;
|
|
22
|
-
|
|
23
|
-
${noWrap && css`
|
|
24
|
-
white-space: nowrap;
|
|
25
|
-
`}
|
|
26
|
-
justify-content: center;
|
|
27
|
-
vertical-align: middle;
|
|
28
|
-
outline-offset: 0;
|
|
29
|
-
${stylingForType}
|
|
30
|
-
`}
|
|
31
|
-
|
|
32
|
-
${({
|
|
33
|
-
fullWidth
|
|
34
|
-
}) => fullWidth && css`
|
|
35
|
-
width: 100%;
|
|
36
|
-
`}
|
|
37
6
|
|
|
38
|
-
|
|
39
|
-
iconOnly,
|
|
40
|
-
iconPosition
|
|
41
|
-
}) => css`
|
|
42
|
-
${StyledIcon} {
|
|
43
|
-
margin-left: ${!iconOnly && iconPosition === "after" ? "var(--spacing100)" : "0px"};
|
|
44
|
-
margin-right: ${!iconOnly && iconPosition === "before" ? "var(--spacing100)" : "0px"};
|
|
45
|
-
margin-bottom: ${iconOnly ? "1px" : "0px"};
|
|
46
|
-
height: ${additionalIconStyle};
|
|
47
|
-
svg {
|
|
48
|
-
margin-top: 0;
|
|
49
|
-
}
|
|
50
|
-
${iconOnly && "margin-left: auto; margin-right: auto"}
|
|
51
|
-
}
|
|
52
|
-
`}
|
|
53
|
-
`;
|
|
54
|
-
export const StyledButtonSubtext = styled.span`
|
|
55
|
-
font-size: 14px;
|
|
56
|
-
font-weight: 400;
|
|
57
|
-
display: block;
|
|
58
|
-
`;
|
|
59
|
-
|
|
60
|
-
function additionalIconStyle({
|
|
61
|
-
iconType
|
|
62
|
-
}) {
|
|
7
|
+
function additionalIconStyle(iconType) {
|
|
63
8
|
if (iconType === "services") return "6px";
|
|
64
9
|
return "16px";
|
|
65
10
|
}
|
|
@@ -89,7 +34,7 @@ function stylingForIconOnly(size) {
|
|
|
89
34
|
function stylingForType({
|
|
90
35
|
iconOnly,
|
|
91
36
|
disabled,
|
|
92
|
-
buttonType,
|
|
37
|
+
buttonType = "secondary",
|
|
93
38
|
size,
|
|
94
39
|
destructive
|
|
95
40
|
}) {
|
|
@@ -122,46 +67,57 @@ function stylingForType({
|
|
|
122
67
|
`;
|
|
123
68
|
}
|
|
124
69
|
|
|
125
|
-
StyledButton
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
/** The text the button displays */
|
|
138
|
-
children: PropTypes.node.isRequired,
|
|
139
|
-
|
|
140
|
-
/** Apply destructive style to the button */
|
|
141
|
-
destructive: PropTypes.bool,
|
|
142
|
-
|
|
143
|
-
/** Apply disabled state to the button */
|
|
144
|
-
disabled: PropTypes.bool,
|
|
145
|
-
|
|
146
|
-
/** Apply fullWidth style to the button */
|
|
147
|
-
fullWidth: PropTypes.bool,
|
|
148
|
-
|
|
149
|
-
/** Apply iconOnly to display button with the icon only */
|
|
150
|
-
iconOnly: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
151
|
-
|
|
152
|
-
/** Defines an Icon position within the button */
|
|
153
|
-
iconPosition: PropTypes.oneOf([...BUTTON_ICON_POSITIONS, ""]),
|
|
154
|
-
|
|
155
|
-
/** Defines an Icon type within the button (see Icon for options) */
|
|
156
|
-
iconType: PropTypes.oneOf([...ICONS, ""]),
|
|
70
|
+
const StyledButton = styled.button`
|
|
71
|
+
${space}
|
|
72
|
+
${({
|
|
73
|
+
disabled,
|
|
74
|
+
noWrap
|
|
75
|
+
}) => css`
|
|
76
|
+
align-items: center;
|
|
77
|
+
cursor: ${disabled ? "not-allowed" : "pointer"};
|
|
78
|
+
display: inline-flex;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
flex-flow: wrap;
|
|
81
|
+
border-radius: 0;
|
|
157
82
|
|
|
158
|
-
|
|
159
|
-
|
|
83
|
+
${noWrap && css`
|
|
84
|
+
white-space: nowrap;
|
|
85
|
+
`}
|
|
86
|
+
justify-content: center;
|
|
87
|
+
vertical-align: middle;
|
|
88
|
+
outline-offset: 0;
|
|
89
|
+
${stylingForType}
|
|
90
|
+
`}
|
|
160
91
|
|
|
161
|
-
|
|
162
|
-
|
|
92
|
+
${({
|
|
93
|
+
fullWidth
|
|
94
|
+
}) => fullWidth && css`
|
|
95
|
+
width: 100%;
|
|
96
|
+
`}
|
|
163
97
|
|
|
164
|
-
|
|
165
|
-
|
|
98
|
+
${({
|
|
99
|
+
iconOnly,
|
|
100
|
+
iconPosition,
|
|
101
|
+
iconType
|
|
102
|
+
}) => css`
|
|
103
|
+
${StyledIcon} {
|
|
104
|
+
margin-left: ${!iconOnly && iconPosition === "after" ? "var(--spacing100)" : "0px"};
|
|
105
|
+
margin-right: ${!iconOnly && iconPosition === "before" ? "var(--spacing100)" : "0px"};
|
|
106
|
+
margin-bottom: ${iconOnly ? "1px" : "0px"};
|
|
107
|
+
height: ${additionalIconStyle(iconType)};
|
|
108
|
+
svg {
|
|
109
|
+
margin-top: 0;
|
|
110
|
+
}
|
|
111
|
+
${iconOnly && "margin-left: auto; margin-right: auto"}
|
|
112
|
+
}
|
|
113
|
+
`}
|
|
114
|
+
`;
|
|
115
|
+
export const StyledButtonSubtext = styled.span`
|
|
116
|
+
font-size: 14px;
|
|
117
|
+
font-weight: 400;
|
|
118
|
+
display: block;
|
|
119
|
+
`;
|
|
120
|
+
StyledButton.defaultProps = {
|
|
121
|
+
theme: BaseTheme
|
|
166
122
|
};
|
|
167
123
|
export default StyledButton;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from "./button";
|
|
2
|
-
export
|
|
1
|
+
export { default, ButtonWithForwardRef } from "./button.component";
|
|
2
|
+
export type { ButtonProps } from "./button.component";
|
|
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2
2
|
|
|
3
3
|
import React, { useRef } from "react";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
|
-
import createGuid from "../../__internal__/utils/helpers/guid
|
|
5
|
+
import createGuid from "../../__internal__/utils/helpers/guid";
|
|
6
6
|
import Logger from "../../__internal__/utils/logger";
|
|
7
7
|
import Heading from "../heading";
|
|
8
8
|
import Dialog from "../dialog";
|
|
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2
2
|
|
|
3
3
|
import React, { useRef, useEffect, useLayoutEffect, useCallback } from "react";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
|
-
import createGuid from "../../__internal__/utils/helpers/guid
|
|
5
|
+
import createGuid from "../../__internal__/utils/helpers/guid";
|
|
6
6
|
import Modal from "../modal";
|
|
7
7
|
import Heading from "../heading";
|
|
8
8
|
import useResizeObserver from "../../hooks/__internal__/useResizeObserver";
|
|
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2
2
|
|
|
3
3
|
import React, { useRef } from "react";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
|
-
import createGuid from "../../__internal__/utils/helpers/guid
|
|
5
|
+
import createGuid from "../../__internal__/utils/helpers/guid";
|
|
6
6
|
import Modal from "../modal";
|
|
7
7
|
import Heading from "../heading";
|
|
8
8
|
import FullScreenHeading from "../../__internal__/full-screen-heading";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export const StyledGroupWrapper: import("styled-components").StyledComponent<"li", any, {}, never>;
|
|
2
2
|
export const StyledPicklistGroupUl: import("styled-components").StyledComponent<"ul", any, {}, never>;
|
|
3
3
|
export const StyledPicklistGroup: import("styled-components").StyledComponent<"li", any, {}, never>;
|
|
4
|
-
export const StyledGroupButton: import("styled-components").StyledComponent<
|
|
5
|
-
import { ButtonWithForwardRef } from "../../button/button";
|
|
4
|
+
export const StyledGroupButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../button").ButtonProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export const StyledPicklistItem: import("styled-components").StyledComponent<"li", any, {}, never>;
|
|
2
|
-
export const StyledButton: import("styled-components").StyledComponent<
|
|
2
|
+
export const StyledButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../button").ButtonProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
3
3
|
export const StyledLockIcon: import("styled-components").StyledComponent<typeof Icon, any, {}, never>;
|
|
4
|
-
import { ButtonWithForwardRef } from "../../button/button";
|
|
5
4
|
import Icon from "../../icon";
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
export default Fieldset;
|
|
2
|
-
declare function Fieldset(
|
|
2
|
+
declare function Fieldset({ children, inline, legend, ...rest }: {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
children: any;
|
|
5
|
+
inline: any;
|
|
6
|
+
legend: any;
|
|
7
|
+
}): JSX.Element;
|
|
3
8
|
declare namespace Fieldset {
|
|
4
9
|
namespace propTypes {
|
|
5
10
|
const children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
@@ -3,39 +3,38 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
5
|
import styledSystemPropTypes from "@styled-system/prop-types";
|
|
6
|
-
import { validProps } from "../../__internal__/utils/ether";
|
|
7
6
|
import tagComponent from "../../__internal__/utils/helpers/tags/tags";
|
|
8
7
|
import { filterStyledSystemMarginProps } from "../../style/utils";
|
|
9
8
|
import { FieldsetStyle, LegendContainerStyle, FieldsetContentStyle } from "./fieldset.style";
|
|
10
9
|
import { NewValidationContext } from "../carbon-provider/carbon-provider.component";
|
|
11
10
|
const marginPropTypes = filterStyledSystemMarginProps(styledSystemPropTypes.space);
|
|
12
11
|
|
|
13
|
-
const Fieldset =
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
const Fieldset = ({
|
|
13
|
+
children,
|
|
14
|
+
inline,
|
|
15
|
+
legend,
|
|
16
|
+
...rest
|
|
17
|
+
}) => {
|
|
18
|
+
const getLegend = () => {
|
|
19
|
+
if (!legend) return null;
|
|
16
20
|
return /*#__PURE__*/React.createElement(LegendContainerStyle, {
|
|
17
|
-
inline:
|
|
21
|
+
inline: inline,
|
|
18
22
|
"data-component": "legend-style"
|
|
19
23
|
}, /*#__PURE__*/React.createElement("legend", {
|
|
20
24
|
"data-element": "legend"
|
|
21
|
-
},
|
|
25
|
+
}, legend));
|
|
22
26
|
};
|
|
23
27
|
|
|
24
|
-
const { ...safeProps
|
|
25
|
-
} = validProps({
|
|
26
|
-
propTypes: Fieldset.propTypes,
|
|
27
|
-
props
|
|
28
|
-
});
|
|
29
28
|
return /*#__PURE__*/React.createElement(NewValidationContext.Provider, {
|
|
30
29
|
value: {
|
|
31
30
|
validationRedesignOptIn: false
|
|
32
31
|
}
|
|
33
|
-
}, /*#__PURE__*/React.createElement(FieldsetStyle, _extends({}, tagComponent("fieldset",
|
|
32
|
+
}, /*#__PURE__*/React.createElement(FieldsetStyle, _extends({}, tagComponent("fieldset", rest), rest, {
|
|
34
33
|
m: 0
|
|
35
|
-
}, filterStyledSystemMarginProps(
|
|
34
|
+
}, filterStyledSystemMarginProps(rest)), /*#__PURE__*/React.createElement(FieldsetContentStyle, {
|
|
36
35
|
"data-component": "fieldset-style",
|
|
37
|
-
inline:
|
|
38
|
-
},
|
|
36
|
+
inline: inline
|
|
37
|
+
}, getLegend(), children)));
|
|
39
38
|
};
|
|
40
39
|
|
|
41
40
|
Fieldset.propTypes = {
|
|
@@ -44,6 +44,11 @@ declare class Heading extends React.Component<any, any, any> {
|
|
|
44
44
|
* @return {Object} JSX
|
|
45
45
|
*/
|
|
46
46
|
get pills(): Object;
|
|
47
|
+
/**
|
|
48
|
+
* @method render
|
|
49
|
+
* @return {Object} JSX
|
|
50
|
+
*/
|
|
51
|
+
render(): Object;
|
|
47
52
|
}
|
|
48
53
|
declare namespace Heading {
|
|
49
54
|
namespace propTypes {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default MultiActionButton;
|
|
2
|
-
declare function MultiActionButton({ align, disabled, as, buttonType, size, children, text, subtext, ...rest }: {
|
|
2
|
+
declare function MultiActionButton({ align, disabled, as, buttonType, size, children, text, subtext, "data-element": dataElement, "data-role": dataRole, ...rest }: {
|
|
3
3
|
[x: string]: any;
|
|
4
4
|
align?: string | undefined;
|
|
5
5
|
disabled: any;
|
|
@@ -9,6 +9,8 @@ declare function MultiActionButton({ align, disabled, as, buttonType, size, chil
|
|
|
9
9
|
children: any;
|
|
10
10
|
text: any;
|
|
11
11
|
subtext: any;
|
|
12
|
+
"data-element": any;
|
|
13
|
+
"data-role": any;
|
|
12
14
|
}): JSX.Element;
|
|
13
15
|
declare namespace MultiActionButton {
|
|
14
16
|
const propTypes: {
|
|
@@ -7,7 +7,7 @@ import { StyledMultiActionButton, StyledButtonChildrenContainer } from "./multi-
|
|
|
7
7
|
import Button, { ButtonWithForwardRef } from "../button";
|
|
8
8
|
import Events from "../../__internal__/utils/helpers/events";
|
|
9
9
|
import Popover from "../../__internal__/popover";
|
|
10
|
-
import { filterStyledSystemMarginProps } from "../../style/utils";
|
|
10
|
+
import { filterStyledSystemMarginProps, filterOutStyledSystemSpacingProps } from "../../style/utils";
|
|
11
11
|
import { defaultFocusableSelectors } from "../../__internal__/focus-trap/focus-trap-utils";
|
|
12
12
|
import Logger from "../../__internal__/utils/logger";
|
|
13
13
|
const marginPropTypes = filterStyledSystemMarginProps(styledSystemPropTypes.space);
|
|
@@ -22,6 +22,8 @@ const MultiActionButton = ({
|
|
|
22
22
|
children,
|
|
23
23
|
text,
|
|
24
24
|
subtext,
|
|
25
|
+
"data-element": dataElement,
|
|
26
|
+
"data-role": dataRole,
|
|
25
27
|
...rest
|
|
26
28
|
}) => {
|
|
27
29
|
if (!deprecatedWarnTriggered && as) {
|
|
@@ -133,7 +135,6 @@ const MultiActionButton = ({
|
|
|
133
135
|
disabled,
|
|
134
136
|
displayed: showAdditionalButtons,
|
|
135
137
|
onTouchStart: showButtons,
|
|
136
|
-
onClick: rest.onClick,
|
|
137
138
|
onFocus: focusMainButton,
|
|
138
139
|
onBlur: () => {
|
|
139
140
|
isMainButtonFocused.current = false;
|
|
@@ -141,7 +142,8 @@ const MultiActionButton = ({
|
|
|
141
142
|
onKeyDown: handleMainButtonKeyDown,
|
|
142
143
|
buttonType: buttonType || as,
|
|
143
144
|
size,
|
|
144
|
-
subtext
|
|
145
|
+
subtext,
|
|
146
|
+
...filterOutStyledSystemSpacingProps(rest)
|
|
145
147
|
};
|
|
146
148
|
|
|
147
149
|
if (!disabled) {
|
|
@@ -185,8 +187,8 @@ const MultiActionButton = ({
|
|
|
185
187
|
onMouseLeave: hideButtons,
|
|
186
188
|
ref: ref,
|
|
187
189
|
"data-component": "multi-action-button",
|
|
188
|
-
"data-element":
|
|
189
|
-
"data-role":
|
|
190
|
+
"data-element": dataElement,
|
|
191
|
+
"data-role": dataRole,
|
|
190
192
|
align: align,
|
|
191
193
|
displayed: showAdditionalButtons
|
|
192
194
|
}, filterStyledSystemMarginProps(rest)), /*#__PURE__*/React.createElement(Button, _extends({
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { SplitButtonProps } from "../split-button";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
export interface MultiActionButtonProps extends SplitButtonProps {
|
|
4
4
|
/** Button type: "primary" | "secondary" | "tertiary" */
|
|
5
5
|
buttonType?: "primary" | "secondary" | "tertiary";
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
declare function MultiActionButton(props: MultiActionButtonProps): JSX.Element;
|
|
9
|
+
|
|
8
10
|
export default MultiActionButton;
|
|
@@ -8,6 +8,21 @@ declare class MultiStepWizard extends React.Component<any, any, any> {
|
|
|
8
8
|
* @return {void}
|
|
9
9
|
*/
|
|
10
10
|
getChildContext(): void;
|
|
11
|
+
/**
|
|
12
|
+
* A lifecycle method that is called before initial render.
|
|
13
|
+
* Can set up state of component without causing a re-render.
|
|
14
|
+
*
|
|
15
|
+
* @method componentWillMount
|
|
16
|
+
*/
|
|
17
|
+
UNSAFE_componentWillMount(): void;
|
|
18
|
+
/**
|
|
19
|
+
* A lifecycle method to update the currentStep state when a new valid value has been specified.
|
|
20
|
+
*
|
|
21
|
+
* @method componentWillReceiveProps
|
|
22
|
+
* @param {Object} props The new props passed down to the component
|
|
23
|
+
* @return {void}
|
|
24
|
+
*/
|
|
25
|
+
UNSAFE_componentWillReceiveProps(nextProps: any): void;
|
|
11
26
|
/**
|
|
12
27
|
* Validate step props
|
|
13
28
|
*
|
|
@@ -50,6 +65,13 @@ declare class MultiStepWizard extends React.Component<any, any, any> {
|
|
|
50
65
|
* @return {Object} JSX
|
|
51
66
|
*/
|
|
52
67
|
get wizardStepsHTML(): Object;
|
|
68
|
+
/**
|
|
69
|
+
* Renders the component.
|
|
70
|
+
*
|
|
71
|
+
* @method render
|
|
72
|
+
* @return {Object} JSX
|
|
73
|
+
*/
|
|
74
|
+
render(): Object;
|
|
53
75
|
}
|
|
54
76
|
declare namespace MultiStepWizard {
|
|
55
77
|
namespace propTypes {
|
|
@@ -124,6 +124,12 @@ declare class Step extends React.Component<any, any, any> {
|
|
|
124
124
|
* @return {String}
|
|
125
125
|
*/
|
|
126
126
|
get mainClasses(): string;
|
|
127
|
+
/**
|
|
128
|
+
* Renders the component.
|
|
129
|
+
*
|
|
130
|
+
* @method render
|
|
131
|
+
*/
|
|
132
|
+
render(): JSX.Element;
|
|
127
133
|
}
|
|
128
134
|
declare namespace Step {
|
|
129
135
|
namespace propTypes {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export const StyledStep: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
2
|
export const StyledStepContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export const StyledStepButton: import("styled-components").StyledComponent<
|
|
3
|
+
export const StyledStepButton: import("styled-components").StyledComponent<{
|
|
4
|
+
({ size, subtext, as, children, forwardRef, "aria-label": ariaLabel, disabled, destructive, buttonType: buttonTypeProp, iconType, iconPosition, href, m, px, noWrap, target, rel, iconTooltipMessage, iconTooltipPosition, fullWidth, ...rest }: import("../../button").ButtonProps): JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
}, any, {}, never>;
|
|
4
7
|
export const StyledStepIndicatorBar: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
8
|
export const StyledStepIndicatorBackground: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
9
|
export const StyledStepIndicatorIconContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
10
|
export const StepIndicatorIconPlaceholder: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
11
|
export const StepIndicatorIconContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
12
|
export const StyledStepIndicatorIcon: import("styled-components").StyledComponent<typeof Icon, any, {}, never>;
|
|
10
|
-
import Button from "../../button";
|
|
11
13
|
import Icon from "../../icon";
|
|
@@ -40,7 +40,7 @@ const PortraitInitials = ({
|
|
|
40
40
|
canvas.height = dimensions; // Select a font family to support different language characters
|
|
41
41
|
// like Arial
|
|
42
42
|
|
|
43
|
-
context.font = `${Math.round(canvas.width / 2.4)}px
|
|
43
|
+
context.font = `${Math.round(canvas.width / 2.4)}px "Sage UI", Arial`;
|
|
44
44
|
context.textAlign = "center"; // Setup background and front color
|
|
45
45
|
|
|
46
46
|
context.fillStyle = tokens[bgColor];
|
|
@@ -1,22 +1,35 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
2
3
|
import StyledCheckableInputSvgWrapper from "../../__internal__/checkable-input/checkable-input-svg-wrapper.style";
|
|
3
4
|
|
|
4
5
|
const RadioButtonSvg = () => {
|
|
5
|
-
return /*#__PURE__*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
6
|
+
return /*#__PURE__*/ React.createElement(
|
|
7
|
+
StyledCheckableInputSvgWrapper,
|
|
8
|
+
null,
|
|
9
|
+
/*#__PURE__*/ React.createElement(
|
|
10
|
+
"svg",
|
|
11
|
+
{
|
|
12
|
+
focusable: "false",
|
|
13
|
+
viewBox: "0 0 15 15",
|
|
14
|
+
},
|
|
15
|
+
/*#__PURE__*/ React.createElement(
|
|
16
|
+
"g",
|
|
17
|
+
{
|
|
18
|
+
stroke: "none",
|
|
19
|
+
strokeWidth: "1",
|
|
20
|
+
fill: "none",
|
|
21
|
+
fillRule: "evenodd",
|
|
22
|
+
},
|
|
23
|
+
/*#__PURE__*/ React.createElement("circle", {
|
|
24
|
+
className: "radio-button-check",
|
|
25
|
+
fill: "#FFFFFF",
|
|
26
|
+
cx: "7.5",
|
|
27
|
+
cy: "7.5",
|
|
28
|
+
r: "5",
|
|
29
|
+
})
|
|
30
|
+
)
|
|
31
|
+
)
|
|
32
|
+
);
|
|
20
33
|
};
|
|
21
34
|
|
|
22
|
-
export default /*#__PURE__*/React.memo(RadioButtonSvg, () => true);
|
|
35
|
+
export default /*#__PURE__*/ React.memo(RadioButtonSvg, () => true);
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
export default ScrollableList;
|
|
2
2
|
declare class ScrollableList extends React.Component<any, any, any> {
|
|
3
3
|
constructor(props: any);
|
|
4
|
+
state: {
|
|
5
|
+
selectedItem: number;
|
|
6
|
+
};
|
|
4
7
|
blockOptionsHover: boolean;
|
|
5
8
|
scrollBox: React.RefObject<any>;
|
|
9
|
+
UNSAFE_componentWillReceiveProps(nextProps: any): void;
|
|
10
|
+
componentDidUpdate(prevProps: any): void;
|
|
11
|
+
componentDidMount(): void;
|
|
12
|
+
componentWillUnmount(): void;
|
|
6
13
|
updateScroll(item: any): void;
|
|
7
14
|
setScrollTop({ item, children, listHeight, itemHeight }: {
|
|
8
15
|
item: any;
|
|
@@ -28,6 +35,7 @@ declare class ScrollableList extends React.Component<any, any, any> {
|
|
|
28
35
|
};
|
|
29
36
|
}) => void;
|
|
30
37
|
handleKeyDown: (e: any) => void;
|
|
38
|
+
render(): JSX.Element;
|
|
31
39
|
}
|
|
32
40
|
declare namespace ScrollableList {
|
|
33
41
|
namespace propTypes {
|
|
@@ -4,7 +4,7 @@ export interface OptionProps {
|
|
|
4
4
|
/** The option's visible text, displayed within <Textbox> of <Select>, and used for filtering */
|
|
5
5
|
text: string;
|
|
6
6
|
/** Optional: alternative rendered content, displayed within <SelectList> of <Select> (eg: an icon, an image, etc) */
|
|
7
|
-
children?: React.
|
|
7
|
+
children?: React.ReactNode;
|
|
8
8
|
/** The option's invisible internal value */
|
|
9
9
|
value: string | Record<string, unknown>;
|
|
10
10
|
/** MultiSelect only - custom Pill border color - provide any color from palette or any valid css color value. */
|
|
@@ -13,7 +13,7 @@ import ListActionButton from "../list-action-button/list-action-button.component
|
|
|
13
13
|
import StyledSelectListContainer from "./select-list-container.style";
|
|
14
14
|
import Loader from "../../loader";
|
|
15
15
|
import Option from "../option/option.component";
|
|
16
|
-
import guid from "../../../__internal__/utils/helpers/guid
|
|
16
|
+
import guid from "../../../__internal__/utils/helpers/guid";
|
|
17
17
|
import SelectListContext from "../__internal__/select-list-context";
|
|
18
18
|
const fixedPopoverModifiers = [{
|
|
19
19
|
name: "offset",
|
|
@@ -5,7 +5,7 @@ import PropTypes from "prop-types";
|
|
|
5
5
|
import { createPopper } from "@popperjs/core";
|
|
6
6
|
import Textbox from "../../textbox";
|
|
7
7
|
import SelectText from "../__internal__/select-text/select-text.component";
|
|
8
|
-
import guid from "../../../__internal__/utils/helpers/guid
|
|
8
|
+
import guid from "../../../__internal__/utils/helpers/guid";
|
|
9
9
|
import useLocale from "../../../hooks/__internal__/useLocale";
|
|
10
10
|
import useResizeObserver from "../../../hooks/__internal__/useResizeObserver";
|
|
11
11
|
const modifiers = [{
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
export default StyledSplitButtonToggle;
|
|
2
|
-
declare const StyledSplitButtonToggle: import("styled-components").StyledComponent<"button", any, {
|
|
3
|
-
iconOnly
|
|
4
|
-
disabled: any;
|
|
5
|
-
buttonType: any;
|
|
6
|
-
size: any;
|
|
7
|
-
destructive: any;
|
|
2
|
+
declare const StyledSplitButtonToggle: import("styled-components").StyledComponent<"button", any, import("styled-system").SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & Omit<import("../button").ButtonProps, "as"> & {
|
|
3
|
+
iconOnly?: boolean | undefined;
|
|
8
4
|
}, never>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default SplitButton;
|
|
2
|
-
declare function SplitButton({ align, as, buttonType, children, disabled, iconPosition, iconType, onClick, size, subtext, text, ...rest }: {
|
|
2
|
+
declare function SplitButton({ align, as, buttonType, children, disabled, iconPosition, iconType, onClick, size, subtext, text, "data-element": dataElement, "data-role": dataRole, ...rest }: {
|
|
3
3
|
[x: string]: any;
|
|
4
4
|
align?: string | undefined;
|
|
5
5
|
as: any;
|
|
@@ -12,6 +12,8 @@ declare function SplitButton({ align, as, buttonType, children, disabled, iconPo
|
|
|
12
12
|
size?: string | undefined;
|
|
13
13
|
subtext: any;
|
|
14
14
|
text: any;
|
|
15
|
+
"data-element": any;
|
|
16
|
+
"data-role": any;
|
|
15
17
|
}): JSX.Element;
|
|
16
18
|
declare namespace SplitButton {
|
|
17
19
|
const propTypes: {
|