carbon-react 155.3.1 → 155.4.1
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__/focus-trap/focus-trap-utils.d.ts +1 -1
- package/esm/__internal__/i18n-context/index.d.ts +1 -2
- package/esm/__internal__/input-icon-toggle/input-icon-toggle.style.d.ts +1 -2
- package/esm/__internal__/utils/helpers/events/events.d.ts +1 -1
- package/esm/__spec_helper__/mock-match-media.d.ts +0 -1
- package/esm/components/accordion/accordion.style.d.ts +0 -1
- package/esm/components/action-popover/__internal__/action-popover.context.d.ts +0 -1
- package/esm/components/action-popover/action-popover.style.d.ts +0 -1
- package/esm/components/adaptive-sidebar/adaptive-sidebar.style.d.ts +3 -3
- package/esm/components/advanced-color-picker/advanced-color-picker.style.d.ts +0 -1
- package/esm/components/badge/badge.style.d.ts +0 -1
- package/esm/components/box/box.style.d.ts +5 -5
- package/esm/components/breadcrumbs/__internal__/breadcrumbs.context.d.ts +0 -1
- package/esm/components/breadcrumbs/crumb/crumb.style.d.ts +0 -1
- package/esm/components/button/button.style.d.ts +1 -1
- package/esm/components/button-minor/button-minor.style.d.ts +0 -1
- package/esm/components/button-toggle/button-toggle-group/__internal__/button-toggle-group.context.d.ts +0 -1
- package/esm/components/card/__internal__/card.context.d.ts +0 -1
- package/esm/components/card/card-footer/card-footer.style.d.ts +1 -1
- package/esm/components/checkbox/checkbox-group/checkbox-group.style.d.ts +2 -2
- package/esm/components/date/date.component.js +1 -1
- package/esm/components/definition-list/__internal__/dl.context.d.ts +0 -1
- package/esm/components/detail/detail.style.d.ts +0 -1
- package/esm/components/dialog/dialog.style.d.ts +2 -2
- package/esm/components/dialog-full-screen/dialog-full-screen.style.d.ts +1 -1
- package/esm/components/dismissible-box/dismissible-box.style.d.ts +0 -1
- package/esm/components/drawer/drawer.style.d.ts +1 -2
- package/esm/components/duelling-picklist/duelling-picklist.style.d.ts +1 -1
- package/esm/components/duelling-picklist/picklist/picklist.style.d.ts +5 -5
- package/esm/components/duelling-picklist/picklist-group/picklist-group.style.d.ts +0 -1
- package/esm/components/duelling-picklist/picklist-item/picklist-item.style.d.ts +1 -2
- package/esm/components/flat-table/__internal__/flat-table.context.d.ts +0 -1
- package/esm/components/flat-table/__internal__/strict-flat-table.context.d.ts +0 -1
- package/esm/components/flat-table/__internal__/use-table-cell.d.ts +2 -3
- package/esm/components/flat-table/flat-table-cell/flat-table-cell.style.d.ts +1 -1
- package/esm/components/flat-table/flat-table-row-header/flat-table-row-header.style.d.ts +4 -4
- package/esm/components/flat-table/flat-table.style.d.ts +5 -5
- package/esm/components/flat-table/sort/sort.style.d.ts +0 -1
- package/esm/components/form/form.component.d.ts +5 -1
- package/esm/components/form/form.component.js +1 -1
- package/esm/components/form/form.style.d.ts +4 -2
- package/esm/components/form/form.style.js +1 -1
- package/esm/components/heading/heading.component.js +1 -1
- package/esm/components/heading/heading.style.d.ts +0 -1
- package/esm/components/image/image.style.d.ts +1 -2
- package/esm/components/link-preview/link-preview.style.d.ts +1 -1
- package/esm/components/loader-spinner/loader-spinner.style.d.ts +0 -1
- package/esm/components/loader-star/loader-star.style.d.ts +0 -1
- package/esm/components/menu/__internal__/menu.context.d.ts +0 -1
- package/esm/components/menu/__internal__/strict-menu.context.d.ts +0 -1
- package/esm/components/menu/menu-item/menu-item.style.d.ts +0 -1
- package/esm/components/menu/menu-segment-title/menu-segment-title.style.d.ts +1 -1
- package/esm/components/menu/menu.types.d.ts +0 -1
- package/esm/components/modal/modal.style.d.ts +1 -1
- package/esm/components/navigation-bar/navigation-bar.style.d.ts +5 -5
- package/esm/components/note/note.style.d.ts +1 -1
- package/esm/components/number/number.component.js +1 -1
- package/esm/components/numeral-date/numeral-date.style.d.ts +1 -2
- package/esm/components/pager/pager.style.d.ts +0 -1
- package/esm/components/password/password.style.d.ts +0 -1
- package/esm/components/pill/pill.style.d.ts +1 -1
- package/esm/components/pod/pod.style.d.ts +0 -1
- package/esm/components/popover-container/popover-container.component.js +1 -1
- package/esm/components/popover-container/popover-container.style.d.ts +0 -1
- package/esm/components/portrait/__internal__/get-colors.d.ts +7 -1
- package/esm/components/profile/profile.style.d.ts +0 -1
- package/esm/components/radio-button/radio-button-group/radio-button-group.style.d.ts +2 -2
- package/esm/components/radio-button/radio-button.style.d.ts +1 -1
- package/esm/components/select/__internal__/utils/is-expected-option.d.ts +0 -1
- package/esm/components/sidebar/__internal__/sidebar-header/index.d.ts +1 -0
- package/esm/components/sidebar/__internal__/sidebar-header/index.js +1 -1
- package/esm/components/sidebar/__internal__/sidebar-header/sidebar-header.component.d.ts +14 -1
- package/esm/components/sidebar/__internal__/sidebar-header/sidebar-header.component.js +1 -1
- package/esm/components/sidebar/__internal__/sidebar-header/sidebar-header.style.d.ts +6 -1
- package/esm/components/sidebar/__internal__/sidebar-header/sidebar-header.style.js +1 -1
- package/esm/components/sidebar/sidebar.component.d.ts +6 -0
- package/esm/components/sidebar/sidebar.component.js +1 -1
- package/esm/components/simple-color-picker/simple-color/simple-color.style.d.ts +0 -1
- package/esm/components/split-button/split-button-toggle.style.d.ts +2 -2
- package/esm/components/step-flow/__internal__/step-flow.context.d.ts +0 -1
- package/esm/components/step-sequence/__internal__/step-sequence.context.d.ts +0 -1
- package/esm/components/tabs/__internal__/tab-title/tab-title.style.d.ts +6 -5
- package/esm/components/tabs/tab/tab.style.d.ts +1 -1
- package/esm/components/text-editor/__internal__/helpers.js +1 -1
- package/esm/components/text-editor/__internal__/plugins/LinkPreviewer/link-previewer.component.d.ts +1 -1
- package/esm/components/text-editor/__internal__/plugins/Toolbar/toolbar.style.d.ts +1 -2
- package/esm/components/text-editor/__internal__/read-only-rte.component.js +1 -1
- package/esm/components/text-editor/text-editor.component.js +1 -1
- package/esm/components/text-editor/text-editor.context.d.ts +1 -1
- package/esm/components/tile/__internal__/compute-content-padding.js +1 -1
- package/esm/components/tile/__internal__/tile.context.d.ts +0 -1
- package/esm/components/tile/tile.style.d.ts +1 -1
- package/esm/components/tile-select/tile-select.style.d.ts +7 -8
- package/esm/components/time/time.style.d.ts +0 -1
- package/esm/components/toast/toast.style.d.ts +7 -8
- package/esm/components/tooltip/tooltip.component.js +1 -1
- package/esm/components/vertical-menu/__internal__/vertical-menu.context.d.ts +0 -1
- package/esm/components/vertical-menu/responsive-vertical-menu/__internal__/depth.context.d.ts +1 -1
- package/esm/components/vertical-menu/responsive-vertical-menu/__internal__/focus.context.js +1 -1
- package/esm/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-item/responsive-vertical-menu-item.component.js +1 -1
- package/esm/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-item/responsive-vertical-menu-item.style.d.ts +5 -6
- package/esm/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu.context.js +1 -1
- package/esm/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu.style.d.ts +0 -1
- package/esm/components/vertical-menu/vertical-menu-item/vertical-menu-item.component.d.ts +1 -1
- package/esm/components/vertical-menu/vertical-menu.style.d.ts +10 -11
- package/esm/hooks/__internal__/useChildButtons/useChildButtons.d.ts +1 -2
- package/esm/hooks/__internal__/useFocusPortalContent/useFocusPortalContent.d.ts +1 -1
- package/esm/hooks/__internal__/useInputAccessibility/useInputAccessibility.d.ts +0 -1
- package/esm/hooks/__internal__/useLocale/useLocale.d.ts +1 -1
- package/esm/hooks/__internal__/useModalAria/useModalAria.d.ts +0 -1
- package/esm/style/utils/add-focus-styling.js +1 -1
- package/lib/__internal__/focus-trap/focus-trap-utils.d.ts +1 -1
- package/lib/__internal__/i18n-context/index.d.ts +1 -2
- package/lib/__internal__/input-icon-toggle/input-icon-toggle.style.d.ts +1 -2
- package/lib/__internal__/utils/helpers/events/events.d.ts +1 -1
- package/lib/__spec_helper__/mock-match-media.d.ts +0 -1
- package/lib/components/accordion/accordion.style.d.ts +0 -1
- package/lib/components/action-popover/__internal__/action-popover.context.d.ts +0 -1
- package/lib/components/action-popover/action-popover.style.d.ts +0 -1
- package/lib/components/adaptive-sidebar/adaptive-sidebar.style.d.ts +3 -3
- package/lib/components/advanced-color-picker/advanced-color-picker.style.d.ts +0 -1
- package/lib/components/badge/badge.style.d.ts +0 -1
- package/lib/components/box/box.style.d.ts +5 -5
- package/lib/components/breadcrumbs/__internal__/breadcrumbs.context.d.ts +0 -1
- package/lib/components/breadcrumbs/crumb/crumb.style.d.ts +0 -1
- package/lib/components/button/button.style.d.ts +1 -1
- package/lib/components/button-minor/button-minor.style.d.ts +0 -1
- package/lib/components/button-toggle/button-toggle-group/__internal__/button-toggle-group.context.d.ts +0 -1
- package/lib/components/card/__internal__/card.context.d.ts +0 -1
- package/lib/components/card/card-footer/card-footer.style.d.ts +1 -1
- package/lib/components/checkbox/checkbox-group/checkbox-group.style.d.ts +2 -2
- package/lib/components/definition-list/__internal__/dl.context.d.ts +0 -1
- package/lib/components/detail/detail.style.d.ts +0 -1
- package/lib/components/dialog/dialog.style.d.ts +2 -2
- package/lib/components/dialog-full-screen/dialog-full-screen.style.d.ts +1 -1
- package/lib/components/dismissible-box/dismissible-box.style.d.ts +0 -1
- package/lib/components/drawer/drawer.style.d.ts +1 -2
- package/lib/components/duelling-picklist/duelling-picklist.style.d.ts +1 -1
- package/lib/components/duelling-picklist/picklist/picklist.style.d.ts +5 -5
- package/lib/components/duelling-picklist/picklist-group/picklist-group.style.d.ts +0 -1
- package/lib/components/duelling-picklist/picklist-item/picklist-item.style.d.ts +1 -2
- package/lib/components/flat-table/__internal__/flat-table.context.d.ts +0 -1
- package/lib/components/flat-table/__internal__/strict-flat-table.context.d.ts +0 -1
- package/lib/components/flat-table/__internal__/use-table-cell.d.ts +2 -3
- package/lib/components/flat-table/flat-table-cell/flat-table-cell.style.d.ts +1 -1
- package/lib/components/flat-table/flat-table-row-header/flat-table-row-header.style.d.ts +4 -4
- package/lib/components/flat-table/flat-table.style.d.ts +5 -5
- package/lib/components/flat-table/sort/sort.style.d.ts +0 -1
- package/lib/components/form/form.component.d.ts +5 -1
- package/lib/components/form/form.component.js +1 -1
- package/lib/components/form/form.style.d.ts +4 -2
- package/lib/components/form/form.style.js +1 -1
- package/lib/components/heading/heading.style.d.ts +0 -1
- package/lib/components/image/image.style.d.ts +1 -2
- package/lib/components/link-preview/link-preview.style.d.ts +1 -1
- package/lib/components/loader-spinner/loader-spinner.style.d.ts +0 -1
- package/lib/components/loader-star/loader-star.style.d.ts +0 -1
- package/lib/components/menu/__internal__/menu.context.d.ts +0 -1
- package/lib/components/menu/__internal__/strict-menu.context.d.ts +0 -1
- package/lib/components/menu/menu-item/menu-item.style.d.ts +0 -1
- package/lib/components/menu/menu-segment-title/menu-segment-title.style.d.ts +1 -1
- package/lib/components/menu/menu.types.d.ts +0 -1
- package/lib/components/modal/modal.style.d.ts +1 -1
- package/lib/components/navigation-bar/navigation-bar.style.d.ts +5 -5
- package/lib/components/note/note.style.d.ts +1 -1
- package/lib/components/numeral-date/numeral-date.style.d.ts +1 -2
- package/lib/components/pager/pager.style.d.ts +0 -1
- package/lib/components/password/password.style.d.ts +0 -1
- package/lib/components/pill/pill.style.d.ts +1 -1
- package/lib/components/pod/pod.style.d.ts +0 -1
- package/lib/components/popover-container/popover-container.style.d.ts +0 -1
- package/lib/components/portrait/__internal__/get-colors.d.ts +7 -1
- package/lib/components/profile/profile.style.d.ts +0 -1
- package/lib/components/radio-button/radio-button-group/radio-button-group.style.d.ts +2 -2
- package/lib/components/radio-button/radio-button.style.d.ts +1 -1
- package/lib/components/select/__internal__/utils/is-expected-option.d.ts +0 -1
- package/lib/components/sidebar/__internal__/sidebar-header/index.d.ts +1 -0
- package/lib/components/sidebar/__internal__/sidebar-header/index.js +1 -1
- package/lib/components/sidebar/__internal__/sidebar-header/sidebar-header.component.d.ts +14 -1
- package/lib/components/sidebar/__internal__/sidebar-header/sidebar-header.component.js +1 -1
- package/lib/components/sidebar/__internal__/sidebar-header/sidebar-header.style.d.ts +6 -1
- package/lib/components/sidebar/__internal__/sidebar-header/sidebar-header.style.js +1 -1
- package/lib/components/sidebar/sidebar.component.d.ts +6 -0
- package/lib/components/sidebar/sidebar.component.js +1 -1
- package/lib/components/simple-color-picker/simple-color/simple-color.style.d.ts +0 -1
- package/lib/components/split-button/split-button-toggle.style.d.ts +2 -2
- package/lib/components/step-flow/__internal__/step-flow.context.d.ts +0 -1
- package/lib/components/step-sequence/__internal__/step-sequence.context.d.ts +0 -1
- package/lib/components/tabs/__internal__/tab-title/tab-title.style.d.ts +6 -5
- package/lib/components/tabs/tab/tab.style.d.ts +1 -1
- package/lib/components/text-editor/__internal__/plugins/LinkPreviewer/link-previewer.component.d.ts +1 -1
- package/lib/components/text-editor/__internal__/plugins/Toolbar/toolbar.style.d.ts +1 -2
- package/lib/components/text-editor/text-editor.context.d.ts +1 -1
- package/lib/components/tile/__internal__/tile.context.d.ts +0 -1
- package/lib/components/tile/tile.style.d.ts +1 -1
- package/lib/components/tile-select/tile-select.style.d.ts +7 -8
- package/lib/components/time/time.style.d.ts +0 -1
- package/lib/components/toast/toast.style.d.ts +7 -8
- package/lib/components/vertical-menu/__internal__/vertical-menu.context.d.ts +0 -1
- package/lib/components/vertical-menu/responsive-vertical-menu/__internal__/depth.context.d.ts +1 -1
- package/lib/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-item/responsive-vertical-menu-item.style.d.ts +5 -6
- package/lib/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu.style.d.ts +0 -1
- package/lib/components/vertical-menu/vertical-menu-item/vertical-menu-item.component.d.ts +1 -1
- package/lib/components/vertical-menu/vertical-menu.style.d.ts +10 -11
- package/lib/hooks/__internal__/useChildButtons/useChildButtons.d.ts +1 -2
- package/lib/hooks/__internal__/useFocusPortalContent/useFocusPortalContent.d.ts +1 -1
- package/lib/hooks/__internal__/useInputAccessibility/useInputAccessibility.d.ts +0 -1
- package/lib/hooks/__internal__/useLocale/useLocale.d.ts +1 -1
- package/lib/hooks/__internal__/useModalAria/useModalAria.d.ts +0 -1
- package/lib/style/utils/add-focus-styling.js +1 -1
- package/package.json +13 -4
|
@@ -3,5 +3,5 @@ declare const defaultFocusableSelectors = "button:not([disabled]), [href], input
|
|
|
3
3
|
declare const setElementFocus: (element: HTMLElement) => void;
|
|
4
4
|
declare const getNextElement: (element: HTMLElement, focusableElements: HTMLElement[], shiftKey: boolean) => HTMLElement | undefined;
|
|
5
5
|
declare const onTabGuardFocus: (trapWrappers: RefObject<HTMLElement>[], focusableSelectors: string | undefined, position: "top" | "bottom") => (guardWrapperRef: RefObject<HTMLElement>) => () => void;
|
|
6
|
-
declare const trapFunction: (ev: KeyboardEvent, defaultFocusableElements: HTMLElement[], isWrapperFocused: boolean, focusableSelectors?: string, bespokeTrap?: (
|
|
6
|
+
declare const trapFunction: (ev: KeyboardEvent, defaultFocusableElements: HTMLElement[], isWrapperFocused: boolean, focusableSelectors?: string, bespokeTrap?: (event: KeyboardEvent, firstElement?: HTMLElement, lastElement?: HTMLElement) => void) => void;
|
|
7
7
|
export { defaultFocusableSelectors, getNextElement, setElementFocus, onTabGuardFocus, trapFunction, };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ValidationProps } from "../validations";
|
|
3
2
|
export interface InputIconToggleStyleProps extends ValidationProps {
|
|
4
3
|
size?: "small" | "medium" | "large";
|
|
@@ -9,6 +8,6 @@ export interface InputIconToggleStyleProps extends ValidationProps {
|
|
|
9
8
|
declare const InputIconToggleStyle: import("styled-components").StyledComponent<"span", any, {
|
|
10
9
|
onKeyDown: (event: React.KeyboardEvent<HTMLSpanElement>) => void | import("react").KeyboardEvent<HTMLSpanElement>;
|
|
11
10
|
} & InputIconToggleStyleProps & {
|
|
12
|
-
tabIndex?: number
|
|
11
|
+
tabIndex?: number;
|
|
13
12
|
}, "onKeyDown">;
|
|
14
13
|
export default InputIconToggleStyle;
|
|
@@ -17,7 +17,7 @@ declare const Events: {
|
|
|
17
17
|
/**
|
|
18
18
|
* Determines if event is a keyboard event
|
|
19
19
|
*/
|
|
20
|
-
isKeyboardEvent: (ev: React.SyntheticEvent | Event) => ev is React.KeyboardEvent
|
|
20
|
+
isKeyboardEvent: (ev: React.SyntheticEvent | Event) => ev is React.KeyboardEvent | KeyboardEvent;
|
|
21
21
|
/**
|
|
22
22
|
* Determines if a number key along the top of the keyboard or a number key on the
|
|
23
23
|
* keypad is pressed
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { MarginProps, PaddingProps } from "styled-system";
|
|
3
2
|
import { SidebarProps } from "../sidebar";
|
|
4
3
|
import { AdaptiveSidebarProps } from "./adaptive-sidebar.component";
|
|
5
|
-
|
|
4
|
+
type StyledAdaptiveSidebarProps = Pick<AdaptiveSidebarProps, "backgroundColor" | "borderColor" | "height" | "width"> & MarginProps & PaddingProps & {
|
|
6
5
|
tabIndex: number;
|
|
7
|
-
}
|
|
6
|
+
};
|
|
7
|
+
declare const StyledAdaptiveSidebar: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../box").BoxProps & import("react").RefAttributes<HTMLDivElement>>, any, StyledAdaptiveSidebarProps, never>;
|
|
8
8
|
interface StyledSidebarProps extends SidebarProps {
|
|
9
9
|
backgroundColor: "app" | "black" | "white";
|
|
10
10
|
}
|
|
@@ -3,10 +3,10 @@ declare const StyledBox: import("styled-components").StyledComponent<"div", any,
|
|
|
3
3
|
theme: object;
|
|
4
4
|
} & BoxProps & {
|
|
5
5
|
cssProps?: {
|
|
6
|
-
color?: string
|
|
7
|
-
opacity?: string
|
|
8
|
-
height?: string
|
|
9
|
-
width?: string
|
|
10
|
-
}
|
|
6
|
+
color?: string;
|
|
7
|
+
opacity?: string;
|
|
8
|
+
height?: string;
|
|
9
|
+
width?: string;
|
|
10
|
+
};
|
|
11
11
|
}, "theme">;
|
|
12
12
|
export default StyledBox;
|
|
@@ -3,7 +3,7 @@ import { ButtonProps } from "./button.component";
|
|
|
3
3
|
declare const StyledButton: import("styled-components").StyledComponent<"button", any, {
|
|
4
4
|
theme: object;
|
|
5
5
|
} & SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & Omit<ButtonProps, "buttonType"> & {
|
|
6
|
-
iconOnly?: boolean
|
|
6
|
+
iconOnly?: boolean;
|
|
7
7
|
buttonType: Required<ButtonProps>["buttonType"];
|
|
8
8
|
}, "theme">;
|
|
9
9
|
export declare const StyledButtonSubtext: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ButtonMinorProps } from "./button-minor.component";
|
|
3
2
|
declare const StyledButtonMinor: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../button").ButtonProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>, any, ButtonMinorProps, never>;
|
|
4
3
|
export default StyledButtonMinor;
|
|
@@ -2,5 +2,5 @@ import { SpaceProps } from "styled-system";
|
|
|
2
2
|
import { CardContextProps } from "../__internal__/card.context";
|
|
3
3
|
import { CardFooterProps } from "./card-footer.component";
|
|
4
4
|
export type StyledCardFooterProps = SpaceProps & Required<Pick<CardFooterProps, "variant">> & Pick<CardContextProps, "roundness" | "spacing">;
|
|
5
|
-
declare const StyledCardFooter: import("styled-components").StyledComponent<"div", any,
|
|
5
|
+
declare const StyledCardFooter: import("styled-components").StyledComponent<"div", any, StyledCardFooterProps, never>;
|
|
6
6
|
export default StyledCardFooter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import r,{useRef as n,useMemo as o,useContext as a,useState as l,useCallback as i,useEffect as u}from"react";import{isValidLocaleDate as s,
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import r,{useRef as n,useMemo as o,useContext as a,useState as l,useCallback as i,useEffect as u}from"react";import{isValidLocaleDate as s,parseISODate as c,parseDate as p,checkISOFormatAndLength as d,findMatchedFormatAndValue as m,isDateValid as f,additionalYears as b,formattedValue as y,getSeparator as v,formatToISO as g}from"./__internal__/utils.js";import O from"../../hooks/__internal__/useLocale/useLocale.js";import _ from"../../__internal__/utils/helpers/events/events.js";import"../../style/utils/filter-styled-system-padding-props.js";import P from"../../style/utils/filter-styled-system-margin-props.js";import j from"../../style/utils/filter-out-styled-system-spacing-props.js";import k from"./__internal__/date-formats/index.js";import h from"./date.style.js";import{Textbox as w}from"../textbox/textbox.component.js";import{DatePicker as D}from"./__internal__/date-picker/date-picker.component.js";import x from"../date-range/__internal__/date-range.context.js";import L from"../../hooks/__internal__/useClickAwayListener/useClickAwayListener.js";import C from"../../__internal__/utils/helpers/guid/index.js";import B from"../../__internal__/utils/helpers/tags/tags.js";function W(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){W(e,t,r[t])}))}return e}function A(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}const M=r.forwardRef(((r,W)=>{var{adaptiveLabelBreakpoint:M,allowEmptyValue:S,autoFocus:I,"data-element":E,"data-role":T,disabled:V,disablePortal:K=!0,helpAriaLabel:z,labelInline:R,minDate:N,maxDate:q,onBlur:G,onChange:$,onClick:H,onFocus:J,onKeyDown:Q,pickerProps:U,readOnly:X,size:Y="medium",tooltipPosition:Z,value:ee,inputWidth:te,labelWidth:re,maxWidth:ne,inputName:oe,onPickerClose:ae,onPickerOpen:le,dateFormatOverride:ie,datePickerAriaLabel:ue,datePickerAriaLabelledBy:se,validationMessagePositionTop:ce=!0}=r,pe=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(r,["adaptiveLabelBreakpoint","allowEmptyValue","autoFocus","data-element","data-role","disabled","disablePortal","helpAriaLabel","labelInline","minDate","maxDate","onBlur","onChange","onClick","onFocus","onKeyDown","pickerProps","readOnly","size","tooltipPosition","value","inputWidth","labelWidth","maxWidth","inputName","onPickerClose","onPickerOpen","dateFormatOverride","datePickerAriaLabel","datePickerAriaLabelledBy","validationMessagePositionTop"]);const de=n(null),me=n(null),fe=n(null),be=n(!1),ye=n(!1),ve=n(!1),ge=O(),{dateFnsLocale:Oe,dateFormatOverride:_e}=ge.date,{format:Pe,formats:je}=o((()=>k(Oe(),ie||_e)),[Oe,_e,ie]),{inputRefMap:ke,setInputRefMap:he,validationMessagePositionTop:we}=a(x),[De,xe]=l(!1),[Le,Ce]=l((()=>{if(s(ee,Oe()))return d(ee)?c(ee):p(Pe,ee)})),Be=n(!0),We=n(C()),Fe=null!=we?we:ce,Ae=e=>S&&!e.length?e:null,Me=e=>{const{id:t,name:r}=e.target,[n,o]=m(e.target.value,je),a="blur"===e.type?y(Pe,Le):e.target.value,l=f(p(n,o))?g(...b(n,o)):Ae(e.target.value);return{target:A(F({},r&&{name:r},t&&{id:t}),{value:{formattedValue:a,rawValue:l}})}},Se=L((()=>{var e,t;De&&(be.current=!0,null===(e=fe.current)||void 0===e||e.focus(),ye.current=!1,null===(t=fe.current)||void 0===t||t.blur(),xe(!1),null==ae||ae(),be.current=!1)}),"mousedown"),Ie=e=>{H&&H(e)},Ee=i((e=>{var t;fe.current=e,me.current=null==e?void 0:e.parentElement,W&&("function"==typeof W?W(e):W.current=e),oe&&(null==ke||null===(t=ke[oe])||void 0===t?void 0:t.setOpen)!==xe&&(null==he||he({[oe]:{isBlurBlocked:ye,setOpen:xe}}))}),[oe,ke,he,W]);u((()=>{const[e,t]=m(ee,je);e&&t&&f(p(e,t))?Ce(p(...b(e,t))):d(ee)&&Be.current?Ce(c(ee)):Ce(void 0)}),[ee,je]);const Te=P(pe);return e(h,A(F(A(F({ref:de,role:"presentation",size:Y,labelInline:R},Te),{applyDateRangeStyling:!!ke,maxWidth:ne,inputWidth:te}),B("date",{"data-element":E,"data-role":T})),{children:[t(w,A(F({},j(pe)),{"data-component":"date-input",value:(()=>{if(d(ee)&&Be.current)return y(Pe,c(ee));const e=v(ee),t=v(Pe),r=()=>ee.split("").map((r=>r===e?t:r)).join("");if(Be.current&&e!==t&&f(p(Pe,r()))){Be.current=!1;const[e,t]=m(r(),je);return y(Pe,p(...b(e,t)))}return ee})(),onBlur:e=>{if(V||X)return;let t;if(f(Le)){t=Me(e);const r=d(ee)?y(Pe,c(ee)):ee,[,n]=m(r,je);y(Pe,Le)!==n&&$(t)}else{const{id:r,name:n}=e.target;t={target:A(F({},n&&{name:n},r&&{id:r}),{value:{formattedValue:e.target.value,rawValue:Ae(e.target.value)}})}}ye.current||G&&G(t)},onChange:e=>{Be.current=!1,$(Me(e))},onClick:Ie,onFocus:e=>{V||X||(ye.current=!1,J&&J(e))},onKeyDown:e=>{if(Q&&Q(e),De&&_.isTabKey(e)){if(_.isShiftKey(e))xe(!1),null==ae||ae();else if(!K){var t,r;e.preventDefault(),null===(r=document)||void 0===r||null===(t=r.querySelector(`[id="${We.current}"]`))||void 0===t||t.focus()}be.current=!1}},iconOnClick:Ie,onMouseDown:()=>{Se(),he&&(ye.current=!0),De||null==le||le()},iconOnMouseDown:()=>{ye.current=!0,be.current=!0,Se(),De?(xe(!1),null==ae||ae()):(xe(!0),null==le||le())},inputIcon:"calendar",labelInline:R,ref:Ee,adaptiveLabelBreakpoint:M,tooltipPosition:Z,helpAriaLabel:z,autoFocus:I,size:Y,disabled:V,readOnly:X,inputWidth:te,labelWidth:re,maxWidth:ne,m:0,validationMessagePositionTop:Fe})),t(D,{disablePortal:K,inputElement:me,pickerProps:U,selectedDays:Le,onDayClick:(e,t)=>{var r;Ce(e),$(Me(A(F({},t),{target:A(F({},t.target),{value:y(Pe,e)})}))),ve.current=!0,null===(r=fe.current)||void 0===r||r.focus(),xe(!1)},minDate:N,maxDate:q,pickerMouseDown:()=>{ye.current=!0,Se()},open:De,setOpen:xe,pickerTabGuardId:We.current,onPickerClose:ae,ariaLabel:ue,ariaLabelledBy:se})]}))}));export{M as DateInput,M as default};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { DlProps } from "../dl.component";
|
|
3
2
|
declare const DlProvider: import("react").Provider<Required<Pick<DlProps, "dtTextAlign" | "ddTextAlign" | "asSingleColumn">> | null>, useDlContext: () => Required<Pick<DlProps, "dtTextAlign" | "ddTextAlign" | "asSingleColumn">>;
|
|
4
3
|
export { DlProvider, useDlContext };
|
|
@@ -3,9 +3,9 @@ declare const DialogPositioner: import("styled-components").StyledComponent<"div
|
|
|
3
3
|
theme: object;
|
|
4
4
|
}, "theme">;
|
|
5
5
|
declare const StyledDialog: import("styled-components").StyledComponent<"div", any, Required<Pick<DialogProps, "size">> & {
|
|
6
|
-
dialogHeight?: string
|
|
6
|
+
dialogHeight?: string;
|
|
7
7
|
backgroundColor: string;
|
|
8
|
-
highlightVariant?: string
|
|
8
|
+
highlightVariant?: string;
|
|
9
9
|
} & ContentPaddingInterface, never>;
|
|
10
10
|
type StyledDialogTitleProps = {
|
|
11
11
|
showCloseIcon?: boolean;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare const StyledSidebarHeader: import("styled-components").StyledComponent<"div", any, {
|
|
3
|
-
isExpanded?: boolean
|
|
2
|
+
isExpanded?: boolean;
|
|
4
3
|
}, never>;
|
|
5
4
|
declare const StyledSidebarTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
5
|
declare const StyledDrawerChildren: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const StyledDuellingPicklistOverlay: import("styled-components").StyledComponent<"div", any, {
|
|
2
2
|
theme: object;
|
|
3
3
|
} & {
|
|
4
|
-
disabled?: boolean
|
|
4
|
+
disabled?: boolean;
|
|
5
5
|
}, "theme">;
|
|
6
6
|
declare const StyledDuellingPicklist: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
7
|
declare const StyledLabelContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -2,11 +2,11 @@ declare const StyledPicklist: import("styled-components").StyledComponent<"div",
|
|
|
2
2
|
theme: object;
|
|
3
3
|
} & import("../../box").BoxProps & {
|
|
4
4
|
cssProps?: {
|
|
5
|
-
color?: string
|
|
6
|
-
opacity?: string
|
|
7
|
-
height?: string
|
|
8
|
-
width?: string
|
|
9
|
-
}
|
|
5
|
+
color?: string;
|
|
6
|
+
opacity?: string;
|
|
7
|
+
height?: string;
|
|
8
|
+
width?: string;
|
|
9
|
+
};
|
|
10
10
|
} & {
|
|
11
11
|
as: string;
|
|
12
12
|
}, "theme" | "as">;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare const StyledPicklistItem: import("styled-components").StyledComponent<"li", any, {
|
|
3
|
-
locked?: boolean
|
|
2
|
+
locked?: boolean;
|
|
4
3
|
}, never>;
|
|
5
4
|
declare const StyledButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../button").ButtonProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>, any, {}, never>;
|
|
6
5
|
declare const StyledLockIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../icon").IconProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare const _default: (id: string) => {
|
|
3
2
|
expandable: boolean | undefined;
|
|
4
3
|
leftPosition: number;
|
|
5
4
|
rightPosition: number;
|
|
6
5
|
makeCellSticky: boolean;
|
|
7
|
-
onClick: ((ev?:
|
|
8
|
-
onKeyDown: ((ev:
|
|
6
|
+
onClick: ((ev?: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
7
|
+
onKeyDown: ((ev: React.KeyboardEvent<HTMLElement>) => void) | undefined;
|
|
9
8
|
isFirstCell: boolean;
|
|
10
9
|
isExpandableCell: boolean | undefined;
|
|
11
10
|
tabIndex: number;
|
|
@@ -12,6 +12,6 @@ declare const StyledFlatTableCell: import("styled-components").StyledComponent<"
|
|
|
12
12
|
theme: object;
|
|
13
13
|
} & StyledFlatTableCellProps, "theme">;
|
|
14
14
|
declare const StyledCellContent: import("styled-components").StyledComponent<"div", any, {
|
|
15
|
-
expandable?: boolean
|
|
15
|
+
expandable?: boolean;
|
|
16
16
|
}, never>;
|
|
17
17
|
export { StyledFlatTableCell, StyledCellContent };
|
|
@@ -4,11 +4,11 @@ declare const StyledFlatTableRowHeader: import("styled-components").StyledCompon
|
|
|
4
4
|
} & {
|
|
5
5
|
"data-sticky-align": "left" | "right" | undefined;
|
|
6
6
|
} & FlatTableRowHeaderProps & {
|
|
7
|
-
expandable?: boolean
|
|
8
|
-
leftPosition?: number
|
|
9
|
-
rightPosition?: number
|
|
7
|
+
expandable?: boolean;
|
|
8
|
+
leftPosition?: number;
|
|
9
|
+
rightPosition?: number;
|
|
10
10
|
}, "theme" | "data-sticky-align">;
|
|
11
11
|
declare const StyledFlatTableRowHeaderContent: import("styled-components").StyledComponent<"div", any, {
|
|
12
|
-
expandable?: boolean
|
|
12
|
+
expandable?: boolean;
|
|
13
13
|
}, never>;
|
|
14
14
|
export { StyledFlatTableRowHeader, StyledFlatTableRowHeaderContent };
|
|
@@ -16,11 +16,11 @@ declare const StyledFlatTableWrapper: import("styled-components").StyledComponen
|
|
|
16
16
|
theme: object;
|
|
17
17
|
} & import("../box").BoxProps & {
|
|
18
18
|
cssProps?: {
|
|
19
|
-
color?: string
|
|
20
|
-
opacity?: string
|
|
21
|
-
height?: string
|
|
22
|
-
width?: string
|
|
23
|
-
}
|
|
19
|
+
color?: string;
|
|
20
|
+
opacity?: string;
|
|
21
|
+
height?: string;
|
|
22
|
+
width?: string;
|
|
23
|
+
};
|
|
24
24
|
} & StyledFlatTableWrapperProps, "theme">;
|
|
25
25
|
declare const StyledFlatTableFooter: import("styled-components").StyledComponent<"div", any, {
|
|
26
26
|
theme: object;
|
|
@@ -21,8 +21,12 @@ export interface FormProps extends SpaceProps, TagProps {
|
|
|
21
21
|
rightSideButtons?: React.ReactNode;
|
|
22
22
|
/** Save button to be rendered */
|
|
23
23
|
saveButton?: React.ReactNode;
|
|
24
|
+
/** Custom content to render in the form's footer */
|
|
25
|
+
footerChildren?: React.ReactNode;
|
|
24
26
|
/** Enables the sticky footer. */
|
|
25
27
|
stickyFooter?: boolean;
|
|
28
|
+
/** Background variant for the sticky footer. */
|
|
29
|
+
stickyFooterVariant?: "light" | "grey";
|
|
26
30
|
/** The total number of warnings present in the form */
|
|
27
31
|
warningCount?: number;
|
|
28
32
|
/** Height of the form (any valid CSS value) */
|
|
@@ -33,7 +37,7 @@ export interface FormProps extends SpaceProps, TagProps {
|
|
|
33
37
|
footerPadding?: PaddingProps;
|
|
34
38
|
}
|
|
35
39
|
export declare const Form: {
|
|
36
|
-
({ children, saveButton, leftSideButtons, rightSideButtons, errorCount, warningCount, onSubmit, buttonAlignment, stickyFooter, fieldSpacing, noValidate, height, fullWidthButtons, footerPadding, ...rest }: FormProps): React.JSX.Element;
|
|
40
|
+
({ children, saveButton, leftSideButtons, rightSideButtons, errorCount, warningCount, onSubmit, buttonAlignment, footerChildren, stickyFooter, stickyFooterVariant, fieldSpacing, noValidate, height, fullWidthButtons, footerPadding, ...rest }: FormProps): React.JSX.Element;
|
|
37
41
|
displayName: string;
|
|
38
42
|
};
|
|
39
43
|
export default Form;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useRef as
|
|
1
|
+
import{jsxs as t,jsx as e,Fragment as r}from"react/jsx-runtime";import{useRef as o,useContext as n}from"react";import i from"../../__internal__/utils/helpers/tags/tags.js";import l from"./__internal__/form-summary.component.js";import{StyledForm as a,StyledFormContent as c,StyledFormFooter as f,StyledLeftButtons as u,StyledRightButtons as s}from"./form.style.js";import{formSpacing as m}from"./form.config.js";import d from"../modal/__internal__/modal.context.js";function b(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){b(t,e,r[e])}))}return t}function g(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):function(t){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e.push.apply(e,r)}return e}(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})),t}const y=b=>{var{children:y,saveButton:h,leftSideButtons:O,rightSideButtons:j,errorCount:S,warningCount:P,onSubmit:w,buttonAlignment:k="right",footerChildren:_,stickyFooter:v,stickyFooterVariant:F="light",fieldSpacing:B=3,noValidate:C=!0,height:x,fullWidthButtons:V=!1,footerPadding:A={}}=b,I=function(t,e){if(null==t)return{};var r,o,n=function(t,e){if(null==t)return{};var r,o,n={},i=Object.keys(t);for(o=0;o<i.length;o++)r=i[o],e.indexOf(r)>=0||(n[r]=t[r]);return n}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}(b,["children","saveButton","leftSideButtons","rightSideButtons","errorCount","warningCount","onSubmit","buttonAlignment","footerChildren","stickyFooter","stickyFooterVariant","fieldSpacing","noValidate","height","fullWidthButtons","footerPadding"]);const D=o(null),W=o(null),{isInModal:E}=n(d),M=!!(_||h||O||j||S||P);return t(a,g(p({ref:D,className:v?"sticky":"",stickyFooter:v,onSubmit:w,"data-component":"form",noValidate:C,height:x,isInModal:E},I,i("form",I)),{children:[e(c,{"data-element":"form-content","data-role":"form-content",stickyFooter:v,tabIndex:-1,isInModal:E,fieldSpacing:m[B],children:y}),M&&e(f,g(p(g(p({"data-element":"form-footer","data-role":"form-footer",ref:W,hasFooterChildren:!!_,stickyFooter:v},v&&{stickyFooterVariant:F}),{buttonAlignment:k,fullWidthButtons:V}),A),{children:_||t(r,{children:[O&&e(u,{"data-role":"form-left-buttons",buttonAlignment:k,children:O}),e(l,{fullWidth:V,errorCount:S,warningCount:P,children:h}),j&&e(s,{"data-role":"form-right-buttons",buttonAlignment:k,children:j})]})}))]}))};y.displayName="Form";export{y as Form,y as default};
|
|
@@ -6,7 +6,9 @@ interface StyledFormContentProps {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const StyledFormContent: import("styled-components").StyledComponent<"div", any, StyledFormContentProps, never>;
|
|
8
8
|
interface StyledFormFooterProps {
|
|
9
|
+
hasFooterChildren?: boolean;
|
|
9
10
|
stickyFooter?: boolean;
|
|
11
|
+
stickyFooterVariant?: "light" | "grey";
|
|
10
12
|
fullWidthButtons?: boolean;
|
|
11
13
|
buttonAlignment?: FormButtonAlignment;
|
|
12
14
|
}
|
|
@@ -20,9 +22,9 @@ export declare const StyledForm: import("styled-components").StyledComponent<"fo
|
|
|
20
22
|
theme: object;
|
|
21
23
|
} & StyledFormProps, "theme">;
|
|
22
24
|
export declare const StyledRightButtons: import("styled-components").StyledComponent<"div", any, {
|
|
23
|
-
buttonAlignment?:
|
|
25
|
+
buttonAlignment?: FormButtonAlignment;
|
|
24
26
|
}, never>;
|
|
25
27
|
export declare const StyledLeftButtons: import("styled-components").StyledComponent<"div", any, {
|
|
26
|
-
buttonAlignment?:
|
|
28
|
+
buttonAlignment?: FormButtonAlignment;
|
|
27
29
|
}, never>;
|
|
28
30
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t,{css as
|
|
1
|
+
import t,{css as o}from"styled-components";import{padding as i,space as e}from"styled-system";import l from"../../__internal__/form-field/form-field.style.js";import s from"../../style/themes/apply-base-theme.js";import r from"../inline-inputs/inline-inputs.style.js";import n from"../select/select.style.js";import{StyledSelectMultiSelect as a}from"../select/multi-select/multi-select.style.js";import m from"../switch/switch.style.js";const d=t.div.withConfig({displayName:"form.style__StyledFormContent",componentId:"sc-a81d1b22-0"})((({stickyFooter:t,isInModal:i})=>t&&i&&o(["flex-grow:1;min-height:0;overflow-y:auto;"])),(({fieldSpacing:t})=>t&&o(["--fieldSpacing:",";","{margin-top:var(--spacing000);}"," ",","," ",","," ",","," ","{margin-bottom:var(--spacing000);}"],t,l,r,l,r,n,r,a,m,l))),p=t.div.attrs(s).withConfig({displayName:"form.style__StyledFormFooter",componentId:"sc-a81d1b22-1"})([""," "," "," ",""],(({hasFooterChildren:t})=>!t&&o(["align-items:center;display:flex;flex-wrap:wrap;gap:var(--sizing200);"])),(({buttonAlignment:t})=>"right"===t&&o(["justify-content:flex-end;"])),(({stickyFooter:t,stickyFooterVariant:i,fullWidthButtons:e})=>o([""," "," ",""],!t&&o(["margin-top:48px;"]),t&&o(["background-color:",";box-shadow:var(--boxShadow150);box-sizing:border-box;"," padding:16px 32px;width:100%;z-index:1000;position:sticky;bottom:0;"],"light"===i?"var(--colorsUtilityYang100)":"var(--colorsUtilityMajor025)","grey"===i&&"border-top: 1px solid var(--colorsUtilityMajor050);"),e&&o(["flex-direction:column;align-items:stretch;"]))),i),f=t.form.attrs(s).withConfig({displayName:"form.style__StyledForm",componentId:"sc-a81d1b22-2"})([""," "," ",""],e,(({height:t})=>t&&o(["height:",";"],t)),(({stickyFooter:t,isInModal:i})=>t&&o(["display:flex;flex-direction:column;position:relative;",""],i&&o(["flex-grow:1;min-height:0;height:100%;"])))),c=t.div.withConfig({displayName:"form.style__StyledRightButtons",componentId:"sc-a81d1b22-3"})(["display:flex;gap:var(--sizing200);",""],(({buttonAlignment:t})=>"left"===t&&"flex-grow: 1;")),g=t.div.withConfig({displayName:"form.style__StyledLeftButtons",componentId:"sc-a81d1b22-4"})(["display:flex;justify-content:flex-end;gap:var(--sizing200);",""],(({buttonAlignment:t})=>"right"===t&&"flex-grow: 1;"));export{f as StyledForm,d as StyledFormContent,p as StyledFormFooter,g as StyledLeftButtons,c as StyledRightButtons};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import"react";import"../../style/utils/filter-styled-system-padding-props.js";import r from"../../style/utils/filter-styled-system-margin-props.js";import n from"../../__internal__/utils/helpers/tags/tags.js";import{StyledHeading as i,StyledHeader as a,StyledHeaderContent as l,StyledHeadingTitle as o,StyledSeparator as c,StyledDivider as s,
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import"react";import"../../style/utils/filter-styled-system-padding-props.js";import r from"../../style/utils/filter-styled-system-margin-props.js";import n from"../../__internal__/utils/helpers/tags/tags.js";import{StyledHeading as i,StyledHeader as a,StyledHeaderContent as l,StyledHeadingTitle as o,StyledSeparator as c,StyledDivider as s,StyledHeadingBackButton as d,StyledHeadingIcon as p,StyledSubHeader as u,StyledHeaderHelp as b,StyledHeadingPills as h}from"./heading.style.js";import f from"../../hooks/__internal__/useLocale/useLocale.js";function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){y(e,t,r[t])}))}return e}function g(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}const O=y=>{var{children:O,backLink:j,divider:k=!0,help:v,helpAriaLabel:P,helpLink:w,pills:L,separator:_=!1,subheader:S,subtitleId:D,headingType:I="h1",title:x,titleId:A}=y,E=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(y,["children","backLink","divider","help","helpAriaLabel","helpLink","pills","separator","subheader","subtitleId","headingType","title","titleId"]);const T=f(),B=r(E);return x?e(i,g(m({},n("heading",E),B),{children:[e(a,{"data-element":"header-container",divider:k,subheader:!!S,hasBackLink:!!j,children:[j&&(()=>{const e="string"==typeof j?{href:j}:{onClick:j};return t(d,g(m({"aria-label":T.heading.backLinkAriaLabel(),"data-element":"back","data-role":"heading-back-button",onMouseDown:e=>e.currentTarget.focus({preventScroll:!0})},e),{children:t(p,{type:"chevron_left"})}))})(),e(l,{children:[t(o,{withMargin:!!L||!!v,variant:I,"data-element":"title",id:A,children:x}),(v||w)&&t(b,{"data-element":"help",tooltipPosition:"right",href:w,ariaLabel:P,children:v}),L&&t(h,{"data-element":"pills","data-role":"heading-pills-container",children:L})]}),_&&t(c,{"data-role":"heading-separator"}),S&&t(u,{"data-element":"subtitle","data-role":"subtitle",id:D,hasBackLink:!!j,hasSeparator:_,children:S})]}),k&&t(s,{"data-element":"divider","data-role":"heading-divider"}),O]})):null};export{O as Heading,O as default};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { MarginProps, BackgroundProps, LayoutProps, PaddingProps } from "styled-system";
|
|
3
2
|
import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
|
|
4
3
|
export type PositionProps = "absolute" | "fixed" | "relative" | "static" | "sticky";
|
|
@@ -39,5 +38,5 @@ declare const StyledImage: import("styled-components").StyledComponent<"div", an
|
|
|
39
38
|
backgroundPosition: import("styled-system").ResponsiveValue<import("csstype").Property.BackgroundPosition<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>;
|
|
40
39
|
backgroundRepeat: import("styled-system").ResponsiveValue<import("csstype").Property.BackgroundRepeat, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>;
|
|
41
40
|
backgroundSize: import("styled-system").ResponsiveValue<import("csstype").Property.BackgroundSize<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>;
|
|
42
|
-
} & StyledImageProps, "theme" | "
|
|
41
|
+
} & StyledImageProps, "theme" | "children" | "hidden" | "src" | "as" | "left" | "right" | "position" | "bottom" | "top" | "backgroundSize" | "backgroundPosition" | "backgroundRepeat">;
|
|
43
42
|
export { StyledImage };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const StyledLinkPreview: import("styled-components").StyledComponent<"a", any, {
|
|
2
2
|
theme: object;
|
|
3
3
|
} & {
|
|
4
|
-
as?: "a" | "div"
|
|
4
|
+
as?: "a" | "div";
|
|
5
5
|
}, "theme">;
|
|
6
6
|
declare const StyledCloseIconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
7
|
declare const StyledPreviewWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { LoaderSpinnerProps } from "./loader-spinner.component";
|
|
3
2
|
export declare const StyledSpinnerWrapper: import("styled-components").StyledComponent<"div", any, Pick<LoaderSpinnerProps, "size">, never>;
|
|
4
3
|
export declare const StyledLabel: import("styled-components").StyledComponent<{
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { LoaderStarProps } from "./loader-star.component";
|
|
3
2
|
export declare const StyledLoaderStarWrapper: import("styled-components").StyledComponent<"div", any, LoaderStarProps, never>;
|
|
4
3
|
export declare const StyledLabel: import("styled-components").StyledComponent<{
|
|
@@ -7,7 +7,7 @@ interface StyledTitleProps {
|
|
|
7
7
|
}
|
|
8
8
|
declare const StyledTitle: import("styled-components").StyledComponent<"h2", any, StyledTitleProps, never>;
|
|
9
9
|
declare const StyledSegmentChildren: import("styled-components").StyledComponent<"ul", any, {
|
|
10
|
-
variant?: VariantType
|
|
10
|
+
variant?: VariantType;
|
|
11
11
|
menuType: MenuType;
|
|
12
12
|
}, never>;
|
|
13
13
|
export { StyledTitle, StyledSegmentChildren };
|
|
@@ -6,6 +6,6 @@ declare const StyledModalBackground: import("styled-components").StyledComponent
|
|
|
6
6
|
declare const StyledModal: import("styled-components").StyledComponent<"div", any, {
|
|
7
7
|
theme: object;
|
|
8
8
|
} & TransitionProps & {
|
|
9
|
-
topModalOverride?: boolean
|
|
9
|
+
topModalOverride?: boolean;
|
|
10
10
|
}, "theme">;
|
|
11
11
|
export { StyledModal, StyledModalBackground };
|