@box/blueprint-web 12.129.0 → 12.130.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/dist/lib-esm/button/button.d.ts +6 -2
- package/dist/lib-esm/button/button.js +8 -3
- package/dist/lib-esm/button/types.d.ts +10 -3
- package/dist/lib-esm/empty-state/empty-state.d.ts +6 -2
- package/dist/lib-esm/guided-tooltip/guided-tooltip-footer.d.ts +12 -4
- package/dist/lib-esm/guided-tooltip/guided-tooltip.d.ts +12 -4
- package/dist/lib-esm/index.css +249 -217
- package/dist/lib-esm/modal/alert-modal.d.ts +12 -4
- package/dist/lib-esm/modal/modal-footer.d.ts +12 -4
- package/dist/lib-esm/modal/modal.d.ts +12 -4
- package/dist/lib-esm/primitives/base-button/base-button.js +13 -19
- package/dist/lib-esm/primitives/base-button/base-button.module.js +1 -1
- package/dist/lib-esm/primitives/base-button/types.d.ts +2 -1
- package/dist/lib-esm/primitives/base-button/utils.d.ts +5 -1
- package/dist/lib-esm/primitives/base-button/utils.js +21 -1
- package/dist/lib-esm/side-panel/side-panel-footer.d.ts +12 -4
- package/dist/lib-esm/side-panel/side-panel.d.ts +12 -4
- package/dist/lib-esm/util-components/base-grid-list-item/base-grid-list-item.module.js +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export declare const Button: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
2
2
|
children?: string | string[];
|
|
3
|
-
icon?: import("
|
|
3
|
+
icon?: import("./types").SvgIconComponent;
|
|
4
|
+
endIcon?: import("./types").SvgIconComponent;
|
|
5
|
+
startIcon?: import("./types").SvgIconComponent;
|
|
4
6
|
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof import("../primitives/base-button").Loading, never>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
5
7
|
children?: string | string[];
|
|
6
|
-
icon?: import("
|
|
8
|
+
icon?: import("./types").SvgIconComponent;
|
|
9
|
+
endIcon?: import("./types").SvgIconComponent;
|
|
10
|
+
startIcon?: import("./types").SvgIconComponent;
|
|
7
11
|
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -6,15 +6,20 @@ const Button = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
6
6
|
const {
|
|
7
7
|
children,
|
|
8
8
|
icon,
|
|
9
|
+
endIcon,
|
|
10
|
+
startIcon,
|
|
9
11
|
...rest
|
|
10
12
|
} = props;
|
|
13
|
+
const effectiveIcon = endIcon ?? icon;
|
|
11
14
|
return jsxs(BaseButton, {
|
|
12
15
|
ref: forwardedRef,
|
|
13
16
|
...rest,
|
|
14
|
-
children: [
|
|
17
|
+
children: [startIcon ? jsx(BaseButton.Icon, {
|
|
18
|
+
icon: startIcon
|
|
19
|
+
}) : null, children ? jsx(BaseButton.Label, {
|
|
15
20
|
children: children
|
|
16
|
-
}) : null,
|
|
17
|
-
icon:
|
|
21
|
+
}) : null, effectiveIcon ? jsx(BaseButton.Icon, {
|
|
22
|
+
icon: effectiveIcon
|
|
18
23
|
}) : null]
|
|
19
24
|
});
|
|
20
25
|
});
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { type FunctionComponent, type PropsWithChildren, type SVGProps } from 'react';
|
|
2
2
|
import { type BaseButtonProps } from '../primitives/base-button';
|
|
3
|
+
export type SvgIconComponent = FunctionComponent<PropsWithChildren<SVGProps<SVGSVGElement>>>;
|
|
3
4
|
export type ButtonProps = BaseButtonProps & {
|
|
4
5
|
children?: string | string[];
|
|
5
|
-
/** Icon that will be placed after the children text.
|
|
6
|
-
*
|
|
7
|
-
|
|
6
|
+
/** Icon that will be placed after the children text (or icon-only when no children).
|
|
7
|
+
* Note: When creating an icon-only button aria-label must also be provided.
|
|
8
|
+
* @deprecated Use endIcon instead. */
|
|
9
|
+
icon?: SvgIconComponent;
|
|
10
|
+
/** Icon that will be placed after the children text (or icon-only when no children).
|
|
11
|
+
* Note: When creating an icon-only button aria-label must also be provided. */
|
|
12
|
+
endIcon?: SvgIconComponent;
|
|
13
|
+
/** Icon that will be placed before the children text. */
|
|
14
|
+
startIcon?: SvgIconComponent;
|
|
8
15
|
};
|
|
@@ -11,10 +11,14 @@ export declare const EmptyState: import("react").ForwardRefExoticComponent<Empty
|
|
|
11
11
|
*/
|
|
12
12
|
PrimaryAction: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
13
13
|
children?: string | string[];
|
|
14
|
-
icon?: import("
|
|
14
|
+
icon?: import("../button/types").SvgIconComponent;
|
|
15
|
+
endIcon?: import("../button/types").SvgIconComponent;
|
|
16
|
+
startIcon?: import("../button/types").SvgIconComponent;
|
|
15
17
|
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof import("../primitives/base-button").Loading, never>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
16
18
|
children?: string | string[];
|
|
17
|
-
icon?: import("
|
|
19
|
+
icon?: import("../button/types").SvgIconComponent;
|
|
20
|
+
endIcon?: import("../button/types").SvgIconComponent;
|
|
21
|
+
startIcon?: import("../button/types").SvgIconComponent;
|
|
18
22
|
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
19
23
|
/**
|
|
20
24
|
* The component that displays a secondary action.
|
|
@@ -11,17 +11,25 @@ export declare const GuidedTooltipFooter: (({ children, className, ...rest }: Gu
|
|
|
11
11
|
ActionsContainer: ({ children, className, ...rest }: GuidedTooltipActionsContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
PrimaryAction: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
13
13
|
children?: string | string[];
|
|
14
|
-
icon?: import("
|
|
14
|
+
icon?: import("../button/types").SvgIconComponent;
|
|
15
|
+
endIcon?: import("../button/types").SvgIconComponent;
|
|
16
|
+
startIcon?: import("../button/types").SvgIconComponent;
|
|
15
17
|
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof import("../primitives/base-button").Loading, never>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
16
18
|
children?: string | string[];
|
|
17
|
-
icon?: import("
|
|
19
|
+
icon?: import("../button/types").SvgIconComponent;
|
|
20
|
+
endIcon?: import("../button/types").SvgIconComponent;
|
|
21
|
+
startIcon?: import("../button/types").SvgIconComponent;
|
|
18
22
|
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
19
23
|
SecondaryAction: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
20
24
|
children?: string | string[];
|
|
21
|
-
icon?: import("
|
|
25
|
+
icon?: import("../button/types").SvgIconComponent;
|
|
26
|
+
endIcon?: import("../button/types").SvgIconComponent;
|
|
27
|
+
startIcon?: import("../button/types").SvgIconComponent;
|
|
22
28
|
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof import("../primitives/base-button").Loading, never>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
23
29
|
children?: string | string[];
|
|
24
|
-
icon?: import("
|
|
30
|
+
icon?: import("../button/types").SvgIconComponent;
|
|
31
|
+
endIcon?: import("../button/types").SvgIconComponent;
|
|
32
|
+
startIcon?: import("../button/types").SvgIconComponent;
|
|
25
33
|
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
26
34
|
StepsIndicator: ({ children, className, ...rest }: GuidedTooltipStepsIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
35
|
};
|
|
@@ -5,17 +5,25 @@ export declare const GuidedTooltip: (({ children, onOpenChange, open, container,
|
|
|
5
5
|
ActionsContainer: ({ children, className, ...rest }: import("./types").GuidedTooltipActionsContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
PrimaryAction: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
7
7
|
children?: string | string[];
|
|
8
|
-
icon?: import("
|
|
8
|
+
icon?: import("../button/types").SvgIconComponent;
|
|
9
|
+
endIcon?: import("../button/types").SvgIconComponent;
|
|
10
|
+
startIcon?: import("../button/types").SvgIconComponent;
|
|
9
11
|
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof import("../primitives/base-button").Loading, never>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
10
12
|
children?: string | string[];
|
|
11
|
-
icon?: import("
|
|
13
|
+
icon?: import("../button/types").SvgIconComponent;
|
|
14
|
+
endIcon?: import("../button/types").SvgIconComponent;
|
|
15
|
+
startIcon?: import("../button/types").SvgIconComponent;
|
|
12
16
|
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
17
|
SecondaryAction: import("react").ForwardRefExoticComponent<(Omit<import("../primitives/base-button").BaseButtonInterface & Required<Pick<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
14
18
|
children?: string | string[];
|
|
15
|
-
icon?: import("
|
|
19
|
+
icon?: import("../button/types").SvgIconComponent;
|
|
20
|
+
endIcon?: import("../button/types").SvgIconComponent;
|
|
21
|
+
startIcon?: import("../button/types").SvgIconComponent;
|
|
16
22
|
}, "ref"> | Omit<import("../primitives/base-button").BaseButtonInterface & Partial<Record<keyof import("../primitives/base-button").Loading, never>> & Omit<import("../primitives/base-button").Loading, keyof import("../primitives/base-button").Loading> & {
|
|
17
23
|
children?: string | string[];
|
|
18
|
-
icon?: import("
|
|
24
|
+
icon?: import("../button/types").SvgIconComponent;
|
|
25
|
+
endIcon?: import("../button/types").SvgIconComponent;
|
|
26
|
+
startIcon?: import("../button/types").SvgIconComponent;
|
|
19
27
|
}, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
20
28
|
StepsIndicator: ({ children, className, ...rest }: import("./types").GuidedTooltipStepsIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
29
|
};
|