@box/blueprint-web 7.13.1 → 7.17.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/lib-esm/accordion/accordion.d.ts +4 -5
- package/lib-esm/accordion/accordion.module.js +1 -1
- package/lib-esm/avatar/avatar.d.ts +4 -4
- package/lib-esm/avatar/avatar.module.js +1 -1
- package/lib-esm/avatar/consts.d.ts +4 -3
- package/lib-esm/avatar/types.d.ts +3 -2
- package/lib-esm/badge/base-badge.d.ts +5 -4
- package/lib-esm/badge/base-badge.module.js +1 -1
- package/lib-esm/badge/icon-badge.d.ts +2 -3
- package/lib-esm/badge/icon-badge.js +29 -33
- package/lib-esm/badge/numeric-badge.d.ts +7 -3
- package/lib-esm/badge/numeric-badge.js +15 -12
- package/lib-esm/badge/status-badge.d.ts +4 -5
- package/lib-esm/badge/status-badge.js +4 -10
- package/lib-esm/badge/types.d.ts +4 -3
- package/lib-esm/badge/utils/useSingleChildCheck.d.ts +2 -0
- package/lib-esm/badge/utils/useSingleChildCheck.js +12 -0
- package/lib-esm/card/card.module.js +1 -1
- package/lib-esm/card-tooltip/card-tooltip.d.ts +1 -2
- package/lib-esm/card-tooltip/card-tooltip.module.js +1 -1
- package/lib-esm/checkbox/checkbox.module.js +1 -1
- package/lib-esm/checkbox/types.d.ts +2 -3
- package/lib-esm/collapsible/collapsible-section.d.ts +2 -7
- package/lib-esm/collapsible/collapsible-section.module.js +1 -1
- package/lib-esm/combobox/chips-group.d.ts +1 -2
- package/lib-esm/combobox/combobox.d.ts +1 -1
- package/lib-esm/combobox/combobox.module.js +1 -1
- package/lib-esm/combobox/types.d.ts +2 -2
- package/lib-esm/content-card/content-card-body.d.ts +2 -1
- package/lib-esm/content-card/content-card-footer.d.ts +2 -1
- package/lib-esm/content-card/content-card-image.d.ts +2 -3
- package/lib-esm/content-card/content-card-title.d.ts +2 -1
- package/lib-esm/content-card/content-card.d.ts +5 -7
- package/lib-esm/content-card/content-card.module.js +1 -1
- package/lib-esm/data-table/cell/sticky-cell.d.ts +5 -3
- package/lib-esm/data-table/cell/sticky-cell.module.js +1 -1
- package/lib-esm/data-table/data-table.d.ts +1 -1
- package/lib-esm/data-table/data-table.module.js +1 -1
- package/lib-esm/data-table/index.d.ts +1 -1
- package/lib-esm/date-picker/date-picker.module.js +1 -1
- package/lib-esm/divider/divider.d.ts +2 -5
- package/lib-esm/divider/divider.module.js +1 -1
- package/lib-esm/empty-state/empty-state.d.ts +2 -1
- package/lib-esm/empty-state/empty-state.module.js +1 -1
- package/lib-esm/ghost/ghost.d.ts +1 -1
- package/lib-esm/ghost/ghost.module.js +1 -1
- package/lib-esm/grid-list-item/index.d.ts +1 -1
- package/lib-esm/guided-tooltip/guided-tooltip-body.d.ts +1 -1
- package/lib-esm/guided-tooltip/guided-tooltip-footer.d.ts +4 -4
- package/lib-esm/guided-tooltip/guided-tooltip-icon.d.ts +1 -2
- package/lib-esm/guided-tooltip/guided-tooltip-illustration.d.ts +1 -2
- package/lib-esm/guided-tooltip/guided-tooltip-title.d.ts +1 -2
- package/lib-esm/guided-tooltip/guided-tooltip.d.ts +8 -8
- package/lib-esm/guided-tooltip/guided-tooltip.module.js +1 -1
- package/lib-esm/index.css +857 -845
- package/lib-esm/inline-notice/inline-notice.d.ts +1 -1
- package/lib-esm/inline-table/inline-table.d.ts +4 -4
- package/lib-esm/large-list-item/index.d.ts +1 -1
- package/lib-esm/list-item/cell/action-cell.d.ts +3 -2
- package/lib-esm/list-item/cell/action-cell.js +1 -1
- package/lib-esm/list-item/index.d.ts +7 -5
- package/lib-esm/list-item/list-item.d.ts +7 -5
- package/lib-esm/list-item/row.d.ts +1 -1
- package/lib-esm/list-item/table-body.d.ts +1 -1
- package/lib-esm/list-item/table-column.d.ts +3 -1
- package/lib-esm/list-item/table-header.d.ts +1 -1
- package/lib-esm/loading-indicator/loading-indicator.d.ts +1 -1
- package/lib-esm/loading-indicator/loading-indicator.module.js +1 -1
- package/lib-esm/modal/modal.d.ts +1 -1
- package/lib-esm/modal/modal.module.js +1 -1
- package/lib-esm/navigation-menu/index.d.ts +2 -2
- package/lib-esm/navigation-menu/navigation-menu-link.d.ts +2 -1
- package/lib-esm/navigation-menu/navigation-menu-root.d.ts +1 -2
- package/lib-esm/navigation-menu/navigation-menu.module.js +1 -1
- package/lib-esm/page-section/page-section.module.js +1 -1
- package/lib-esm/password-input/password-input.module.js +1 -1
- package/lib-esm/primitives/base-button/base-button-icon.d.ts +2 -6
- package/lib-esm/primitives/base-button/base-button-label.d.ts +2 -5
- package/lib-esm/primitives/base-button/base-button.module.js +1 -1
- package/lib-esm/primitives/base-button/index.d.ts +2 -11
- package/lib-esm/primitives/base-inline-notice/base-inline-notice-icon.d.ts +2 -6
- package/lib-esm/primitives/base-inline-notice/base-inline-notice.module.js +1 -1
- package/lib-esm/primitives/base-inline-notice/index.d.ts +1 -6
- package/lib-esm/primitives/base-text-input/base-text-input.d.ts +2 -12
- package/lib-esm/primitives/base-text-input/base-text-input.module.js +1 -1
- package/lib-esm/primitives/calendar/calendar.module.js +1 -1
- package/lib-esm/primitives/chips/chip-label.d.ts +2 -3
- package/lib-esm/primitives/chips/chip-status.d.ts +2 -3
- package/lib-esm/primitives/chips/chip.module.js +1 -1
- package/lib-esm/primitives/chips/filter-chip/index.d.ts +2 -6
- package/lib-esm/primitives/context-menu/context-menu-item.d.ts +2 -2
- package/lib-esm/primitives/context-menu/context-menu-menu-root.d.ts +1 -2
- package/lib-esm/primitives/context-menu/context-menu-sub-menu-root.d.ts +1 -2
- package/lib-esm/primitives/context-menu/context-menu-sub-menu-trigger.d.ts +2 -2
- package/lib-esm/primitives/context-menu/context-menu.module.js +1 -1
- package/lib-esm/primitives/context-menu/index.d.ts +6 -6
- package/lib-esm/primitives/date-i18n-provider/date-i18n-provider.d.ts +1 -1
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-root.d.ts +1 -2
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-sub-menu-root.d.ts +1 -2
- package/lib-esm/primitives/dropdown-menu/dropdown-menu-sub-menu-trigger.d.ts +2 -2
- package/lib-esm/primitives/dropdown-menu/dropdown-menu.module.js +1 -1
- package/lib-esm/primitives/dropdown-menu/index.d.ts +4 -4
- package/lib-esm/primitives/icon-button/icon-button.module.js +1 -1
- package/lib-esm/primitives/icon-button/types.d.ts +2 -2
- package/lib-esm/primitives/inline-error/inline-error.module.js +1 -1
- package/lib-esm/primitives/link/link.d.ts +2 -1
- package/lib-esm/primitives/link/link.module.js +1 -1
- package/lib-esm/primitives/notification/index.d.ts +2 -2
- package/lib-esm/primitives/notification/notification-button.d.ts +1 -2
- package/lib-esm/primitives/notification/notification-provider.d.ts +1 -1
- package/lib-esm/primitives/notification/notification.module.js +1 -1
- package/lib-esm/primitives/notification/private-notification-element.d.ts +1 -1
- package/lib-esm/primitives/page-header/page-header.d.ts +6 -6
- package/lib-esm/primitives/page-header/page-header.module.js +1 -1
- package/lib-esm/primitives/popover/index.d.ts +1 -1
- package/lib-esm/primitives/popover/popover-content-container.js +12 -1
- package/lib-esm/primitives/popover/popover-focus-utils.d.ts +1 -0
- package/lib-esm/primitives/popover/popover-focus-utils.js +55 -0
- package/lib-esm/primitives/popover/popover-root.d.ts +1 -2
- package/lib-esm/primitives/popover/popover.module.js +1 -1
- package/lib-esm/primitives/select-menu-grid/select-menu-grid.d.ts +2 -8
- package/lib-esm/primitives/tabs/content-switch-tab.d.ts +2 -7
- package/lib-esm/primitives/tabs/default-tab.d.ts +2 -7
- package/lib-esm/primitives/tabs/index.d.ts +3 -6
- package/lib-esm/primitives/tabs/tab-list.d.ts +2 -4
- package/lib-esm/primitives/tabs/tab.d.ts +1 -2
- package/lib-esm/primitives/tabs/tabs.d.ts +1 -2
- package/lib-esm/primitives/tabs/tabs.module.js +1 -1
- package/lib-esm/radio-group/radio-group.module.js +1 -1
- package/lib-esm/search-input/search-input.d.ts +2 -2
- package/lib-esm/search-input/search.module.js +1 -1
- package/lib-esm/select/select.module.js +1 -1
- package/lib-esm/side-panel/side-panel-overlay.d.ts +2 -4
- package/lib-esm/side-panel/side-panel.d.ts +2 -4
- package/lib-esm/side-panel/side-panel.module.js +1 -1
- package/lib-esm/slider/slider-incrementer.d.ts +1 -2
- package/lib-esm/slider/slider-incrementer.module.js +1 -1
- package/lib-esm/slider/slider-range.module.js +1 -1
- package/lib-esm/slider/slider.d.ts +1 -1
- package/lib-esm/slider/slider.module.js +1 -1
- package/lib-esm/small-list-item/index.d.ts +1 -1
- package/lib-esm/status/status.module.js +1 -1
- package/lib-esm/switch/switch-legend.d.ts +1 -2
- package/lib-esm/switch/switch.module.js +1 -1
- package/lib-esm/switch/types.d.ts +2 -3
- package/lib-esm/text/text.module.js +1 -1
- package/lib-esm/text-area/text-area-autosize/text-area-autosize.d.ts +2 -8
- package/lib-esm/text-area/text-area-autosize/text-area-autosize.module.js +1 -1
- package/lib-esm/text-area/text-area.module.js +1 -1
- package/lib-esm/text-button/text-button.module.js +1 -1
- package/lib-esm/text-input/text-input.module.js +1 -1
- package/lib-esm/text-toggle-button/text-toggle-button.module.js +1 -1
- package/lib-esm/toolbar/toolbar.module.js +1 -1
- package/lib-esm/tooltip/tooltip.d.ts +2 -2
- package/lib-esm/tooltip/tooltip.module.js +1 -1
- package/lib-esm/tooltip/types.d.ts +2 -1
- package/lib-esm/util-components/base-grid-list-item/base-grid-list-item.d.ts +2 -2
- package/lib-esm/util-components/base-grid-list-item/base-grid-list-item.module.js +1 -1
- package/lib-esm/util-components/base-grid-list-item/base-grid-list.d.ts +1 -3
- package/lib-esm/util-components/base-grid-list-item/index.d.ts +2 -4
- package/lib-esm/util-components/base-grid-list-item/static-grid-list-item.d.ts +4 -2
- package/lib-esm/util-components/base-grid-list-item/static-grid-list-item.js +3 -3
- package/lib-esm/util-components/base-grid-list-item/static-grid-list.d.ts +2 -2
- package/lib-esm/util-components/base-grid-list-item/static-grid-list.js +3 -3
- package/lib-esm/util-components/base-grid-list-item/types.d.ts +16 -11
- package/lib-esm/util-components/base-grid-list-item/utils/rac-button.d.ts +6 -4
- package/lib-esm/util-components/base-grid-list-item/utils/rac-tooltip.d.ts +1 -1
- package/lib-esm/util-components/focus-trap/focus-trap.d.ts +1 -2
- package/lib-esm/util-components/interactive-icon/interactive-icon.module.js +1 -1
- package/lib-esm/util-components/legend/legend.d.ts +1 -2
- package/lib-esm/util-components/legend/legend.module.js +1 -1
- package/lib-esm/util-components/list-checkbox/list-checkbox.d.ts +5 -1
- package/lib-esm/util-components/menu-item-sections/menu-item-sections.d.ts +2 -2
- package/lib-esm/util-components/menu-item-sections/menu-item-sections.module.js +1 -1
- package/lib-esm/util-components/search-term-string/search-term-string.d.ts +1 -2
- package/lib-esm/util-components/search-term-string/search-term-string.module.js +1 -1
- package/lib-esm/util-components/text-with-info-badge/text-with-info-badge.d.ts +1 -2
- package/lib-esm/util-components/text-with-info-badge/text-with-info-badge.module.js +1 -1
- package/lib-esm/utils/useFullTextTooltip.d.ts +1 -1
- package/package.json +18 -10
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type AccordionItemProps, type AccordionProps } from './types';
|
|
3
2
|
/**
|
|
4
3
|
* The root component that contains all the parts of a accordion.
|
|
@@ -10,11 +9,11 @@ import { type AccordionItemProps, type AccordionProps } from './types';
|
|
|
10
9
|
* <Accordion.Item value="item-3" title="Item 3"><div>3rd item </div></Accordion.Item>
|
|
11
10
|
* </Accordion>
|
|
12
11
|
*/
|
|
13
|
-
export declare const Root: (props: AccordionProps) => JSX.Element;
|
|
14
|
-
export declare const Item: (props: AccordionItemProps) => JSX.Element;
|
|
15
|
-
export declare const Accordion: ((props: AccordionProps) => JSX.Element) & {
|
|
12
|
+
export declare const Root: (props: AccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const Item: (props: AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const Accordion: ((props: AccordionProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
16
15
|
/**
|
|
17
16
|
* The component that displays a Accordion item.
|
|
18
17
|
*/
|
|
19
|
-
Item: (props: AccordionItemProps) => JSX.Element;
|
|
18
|
+
Item: (props: AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
19
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"accordionContent":"bp_accordion_module_accordionContent--
|
|
2
|
+
var styles = {"accordionContent":"bp_accordion_module_accordionContent--53bdb","slideDown":"bp_accordion_module_slideDown--53bdb","slideUp":"bp_accordion_module_slideUp--53bdb","accordionContentWrapper":"bp_accordion_module_accordionContentWrapper--53bdb","accordionItem":"bp_accordion_module_accordionItem--53bdb","accordionFixedContent":"bp_accordion_module_accordionFixedContent--53bdb","accordionHeader":"bp_accordion_module_accordionHeader--53bdb","accordionHeaderTrigger":"bp_accordion_module_accordionHeaderTrigger--53bdb","accordionStatus":"bp_accordion_module_accordionStatus--53bdb","accordionTrigger":"bp_accordion_module_accordionTrigger--53bdb","accordionTriggerIcon":"bp_accordion_module_accordionTriggerIcon--53bdb"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -4,27 +4,27 @@ export declare const Avatar: import("react").ForwardRefExoticComponent<(Omit<Omi
|
|
|
4
4
|
} & {
|
|
5
5
|
anonymous?: boolean | undefined;
|
|
6
6
|
children?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
7
|
-
size?:
|
|
7
|
+
size?: "small" | "medium" | "large" | "xlarge" | undefined;
|
|
8
8
|
text?: string | undefined;
|
|
9
9
|
} & Required<Pick<import("./types").Image, keyof import("./types").Image>> & Omit<import("./types").Image, keyof import("./types").Image> & Required<Pick<import("./types").WithColor, "color">> & Partial<Record<"colorIndex", never>> & Omit<import("./types").WithColor, keyof import("./types").WithColor>, "ref"> | Omit<Omit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
|
|
10
10
|
ref?: ((instance: HTMLImageElement | null) => void) | import("react").RefObject<HTMLImageElement> | null | undefined;
|
|
11
11
|
} & {
|
|
12
12
|
anonymous?: boolean | undefined;
|
|
13
13
|
children?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
14
|
-
size?:
|
|
14
|
+
size?: "small" | "medium" | "large" | "xlarge" | undefined;
|
|
15
15
|
text?: string | undefined;
|
|
16
16
|
} & Required<Pick<import("./types").Image, keyof import("./types").Image>> & Omit<import("./types").Image, keyof import("./types").Image> & Required<Pick<import("./types").WithColor, "colorIndex">> & Partial<Record<"color", never>> & Omit<import("./types").WithColor, keyof import("./types").WithColor>, "ref"> | Omit<Omit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
|
|
17
17
|
ref?: ((instance: HTMLImageElement | null) => void) | import("react").RefObject<HTMLImageElement> | null | undefined;
|
|
18
18
|
} & {
|
|
19
19
|
anonymous?: boolean | undefined;
|
|
20
20
|
children?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
21
|
-
size?:
|
|
21
|
+
size?: "small" | "medium" | "large" | "xlarge" | undefined;
|
|
22
22
|
text?: string | undefined;
|
|
23
23
|
} & Partial<Record<keyof import("./types").Image, never>> & Omit<import("./types").Image, keyof import("./types").Image> & Required<Pick<import("./types").WithColor, "color">> & Partial<Record<"colorIndex", never>> & Omit<import("./types").WithColor, keyof import("./types").WithColor>, "ref"> | Omit<Omit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
|
|
24
24
|
ref?: ((instance: HTMLImageElement | null) => void) | import("react").RefObject<HTMLImageElement> | null | undefined;
|
|
25
25
|
} & {
|
|
26
26
|
anonymous?: boolean | undefined;
|
|
27
27
|
children?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
28
|
-
size?:
|
|
28
|
+
size?: "small" | "medium" | "large" | "xlarge" | undefined;
|
|
29
29
|
text?: string | undefined;
|
|
30
30
|
} & Partial<Record<keyof import("./types").Image, never>> & Omit<import("./types").Image, keyof import("./types").Image> & Required<Pick<import("./types").WithColor, "colorIndex">> & Partial<Record<"color", never>> & Omit<import("./types").WithColor, keyof import("./types").WithColor>, "ref">) & import("react").RefAttributes<HTMLImageElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"avatar":"bp_avatar_module_avatar--
|
|
2
|
+
var styles = {"avatar":"bp_avatar_module_avatar--adfaf","badge":"bp_avatar_module_badge--adfaf","text":"bp_avatar_module_text--adfaf","small":"bp_avatar_module_small--adfaf","length-1":"bp_avatar_module_length-1--adfaf","length-2":"bp_avatar_module_length-2--adfaf","medium":"bp_avatar_module_medium--adfaf","large":"bp_avatar_module_large--adfaf","length-3":"bp_avatar_module_length-3--adfaf","length-4":"bp_avatar_module_length-4--adfaf","xlarge":"bp_avatar_module_xlarge--adfaf","image":"bp_avatar_module_image--adfaf","loading":"bp_avatar_module_loading--adfaf","anonymousAvatar":"bp_avatar_module_anonymousAvatar--adfaf","svg":"bp_avatar_module_svg--adfaf"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type Color, type
|
|
2
|
-
export declare const anonymousAvatarSizes: Record<
|
|
3
|
-
export declare const
|
|
1
|
+
import { type Color, type AvatarSize } from './types';
|
|
2
|
+
export declare const anonymousAvatarSizes: Record<AvatarSize, string>;
|
|
3
|
+
export declare const AvatarSizes: readonly ["small", "medium", "large", "xlarge"];
|
|
4
|
+
export declare const badgeSizes: Record<AvatarSize, string>;
|
|
4
5
|
export declare const colorsMap: Record<string, Color>;
|
|
5
6
|
export declare const colors: string[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type BoxBlue50, type DarkBlue50, type GreenLight50, type Grimace50, type LightBlue50, type Orange50, type PurpleRain50, type WatermelonRed50, type Yellorange50, type Yellow50 } from '@box/blueprint-web-assets/tokens/tokens';
|
|
2
2
|
import { type ReactElement } from 'react';
|
|
3
3
|
import { type RequireAllOrNone, type RequireExactlyOne } from 'type-fest';
|
|
4
|
-
|
|
4
|
+
import { type AvatarSizes } from './consts';
|
|
5
|
+
export type AvatarSize = (typeof AvatarSizes)[number];
|
|
5
6
|
export type Color = typeof BoxBlue50 | typeof DarkBlue50 | typeof Yellow50 | typeof GreenLight50 | typeof Yellorange50 | typeof LightBlue50 | typeof WatermelonRed50 | typeof PurpleRain50 | typeof Orange50 | typeof Grimace50;
|
|
6
7
|
export interface Image {
|
|
7
8
|
/** The image to display. When the image is loading or if it fails to load, the fallback is displayed.
|
|
@@ -25,7 +26,7 @@ export type AvatarProps = React.ComponentPropsWithRef<'img'> & {
|
|
|
25
26
|
/** The badge */
|
|
26
27
|
children?: ReactElement;
|
|
27
28
|
/** The size of the avatar */
|
|
28
|
-
size?:
|
|
29
|
+
size?: AvatarSize;
|
|
29
30
|
/** The text to display, e.g. the user initial or the number of users editing the document.
|
|
30
31
|
* Numbers can be formatted with formatNumber() that is exposed along with the Avatar component.
|
|
31
32
|
*/
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type BadgeProps } from './types';
|
|
3
|
-
export type BaseBadgeProps = BadgeProps & {
|
|
4
|
-
/** The color of the badge background */
|
|
3
|
+
export type BaseBadgeProps = Omit<BadgeProps, 'children'> & {
|
|
4
|
+
/** The color of the badge background. */
|
|
5
5
|
backgroundColor: string;
|
|
6
6
|
className?: string;
|
|
7
|
+
/** The child element to display in the badge: string for NumericBadge and svg for IconBadge). */
|
|
8
|
+
children?: React.ReactElement;
|
|
7
9
|
};
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const BaseBadge: ({ backgroundColor, className, children, size, offset }: BaseBadgeProps) => JSX.Element;
|
|
10
|
+
export declare const BaseBadge: ({ backgroundColor, className, children, size, offset }: BaseBadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"badgeContainer":"bp_base_badge_module_badgeContainer--
|
|
2
|
+
var styles = {"badgeContainer":"bp_base_badge_module_badgeContainer--59217","badge":"bp_base_badge_module_badge--59217","smallSizeBadge":"bp_base_badge_module_smallSizeBadge--59217","mediumSizeBadge":"bp_base_badge_module_mediumSizeBadge--59217","largeSizeBadge":"bp_base_badge_module_largeSizeBadge--59217","xlargeSizeBadge":"bp_base_badge_module_xlargeSizeBadge--59217","iconBadge":"bp_base_badge_module_iconBadge--59217","statusBadge":"bp_base_badge_module_statusBadge--59217","numericBadge":"bp_base_badge_module_numericBadge--59217","numericBadgeSingleDigit":"bp_base_badge_module_numericBadgeSingleDigit--59217","numericBadgeMoreDigits":"bp_base_badge_module_numericBadgeMoreDigits--59217"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type BadgeProps } from './types';
|
|
3
2
|
export interface IconBadgeProps extends BadgeProps {
|
|
4
|
-
/** The variant of the icon badge */
|
|
3
|
+
/** The variant of the icon badge. */
|
|
5
4
|
variant: 'file-pdf' | 'file-docs' | 'file-sheets' | 'file-image' | 'file-canvas' | 'file-pages' | 'file-keynote' | 'file-boxnote' | 'file-video' | 'folder-external' | 'folder-shared' | 'action-relay' | 'action-mention' | 'action-task' | 'action-taskapproval' | 'action-annotation' | 'action-performed-completed' | 'action-performed-rejected' | 'collaborator-external' | 'collaborator-admin' | 'collaborator-coadmin' | 'content-pin' | 'content-collection' | 'content-offline' | 'content-progress';
|
|
6
5
|
}
|
|
7
6
|
export declare const IconBadgeVariants: ("file-pdf" | "file-docs" | "file-sheets" | "file-image" | "file-canvas" | "file-pages" | "file-keynote" | "file-boxnote" | "file-video" | "folder-external" | "folder-shared" | "action-relay" | "action-mention" | "action-task" | "action-taskapproval" | "action-annotation" | "action-performed-completed" | "action-performed-rejected" | "collaborator-external" | "collaborator-admin" | "collaborator-coadmin" | "content-pin" | "content-collection" | "content-offline" | "content-progress")[];
|
|
8
|
-
export declare const IconBadge: (props: IconBadgeProps) => JSX.Element;
|
|
7
|
+
export declare const IconBadge: (props: IconBadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,123 +1,124 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { FilePdf, FileDocs, FileSheets, FileImage, FileCanvas, FilePages, FileKeynote, FileBoxNote, FileVideo, FolderExternal, FolderShared, Relay, EllipsisBubble, Task, ApprovalTask, Annotation, Checkmark, XMark, GlobeBadge, Star, Pin, Arrow, CheckmarkUnderline, Loader } from '@box/blueprint-web-assets/icons/Fill';
|
|
3
|
-
import { GrayWhite,
|
|
4
|
-
import {
|
|
3
|
+
import { SurfaceBadgePdfSurface, GrayWhite, SurfaceBadgeDocsSurface, SurfaceBadgeSheetsSurface, SurfaceBadgeImageSurface, SurfaceBadgeCanvasSurface, SurfaceBadgePagesSurface, SurfaceBadgeKeynoteSurface, SurfaceBadgeBoxnoteSurface, Gray100, SurfaceBadgeVideoSurface, SurfaceBadgeFolderexternalSurface, SurfaceBadgeFoldersharedSurface, SurfaceBadgeRelaySurface, SurfaceBadgeMentionSurface, SurfaceBadgeTaskSurface, SurfaceBadgeTaskapprovalSurface, SurfaceBadgeAnnotationSurface, SurfaceBadgeCompletedSurface, SurfaceBadgeRejectedSurface, SurfaceBadgeExternalSurface, SurfaceBadgeAdminSurface, SurfaceBadgeCoadminSurface, SurfaceBadgePinSurface, Gray80, SurfaceBadgeCollectionSurface, SurfaceBadgeOfflineSurface, SurfaceBadgeProgressSurface } from '@box/blueprint-web-assets/tokens/tokens';
|
|
4
|
+
import { createElement } from 'react';
|
|
5
5
|
import { BaseBadge } from './base-badge.js';
|
|
6
6
|
import styles from './base-badge.module.js';
|
|
7
|
+
import { useSingleChildCheck } from './utils/useSingleChildCheck.js';
|
|
7
8
|
|
|
8
9
|
const badgeVariantToIconProps = {
|
|
9
10
|
'file-pdf': {
|
|
10
|
-
backgroundColor:
|
|
11
|
+
backgroundColor: SurfaceBadgePdfSurface,
|
|
11
12
|
icon: FilePdf,
|
|
12
13
|
iconColor: GrayWhite
|
|
13
14
|
},
|
|
14
15
|
'file-docs': {
|
|
15
|
-
backgroundColor:
|
|
16
|
+
backgroundColor: SurfaceBadgeDocsSurface,
|
|
16
17
|
icon: FileDocs,
|
|
17
18
|
iconColor: GrayWhite
|
|
18
19
|
},
|
|
19
20
|
'file-sheets': {
|
|
20
|
-
backgroundColor:
|
|
21
|
+
backgroundColor: SurfaceBadgeSheetsSurface,
|
|
21
22
|
icon: FileSheets,
|
|
22
23
|
iconColor: GrayWhite
|
|
23
24
|
},
|
|
24
25
|
'file-image': {
|
|
25
|
-
backgroundColor:
|
|
26
|
+
backgroundColor: SurfaceBadgeImageSurface,
|
|
26
27
|
icon: FileImage,
|
|
27
28
|
iconColor: GrayWhite
|
|
28
29
|
},
|
|
29
30
|
'file-canvas': {
|
|
30
|
-
backgroundColor:
|
|
31
|
+
backgroundColor: SurfaceBadgeCanvasSurface,
|
|
31
32
|
icon: FileCanvas,
|
|
32
33
|
iconColor: GrayWhite
|
|
33
34
|
},
|
|
34
35
|
'file-pages': {
|
|
35
|
-
backgroundColor:
|
|
36
|
+
backgroundColor: SurfaceBadgePagesSurface,
|
|
36
37
|
icon: FilePages,
|
|
37
38
|
iconColor: GrayWhite
|
|
38
39
|
},
|
|
39
40
|
'file-keynote': {
|
|
40
|
-
backgroundColor:
|
|
41
|
+
backgroundColor: SurfaceBadgeKeynoteSurface,
|
|
41
42
|
icon: FileKeynote,
|
|
42
43
|
iconColor: GrayWhite
|
|
43
44
|
},
|
|
44
45
|
'file-boxnote': {
|
|
45
|
-
backgroundColor:
|
|
46
|
+
backgroundColor: SurfaceBadgeBoxnoteSurface,
|
|
46
47
|
icon: FileBoxNote,
|
|
47
48
|
iconColor: Gray100
|
|
48
49
|
},
|
|
49
50
|
'file-video': {
|
|
50
|
-
backgroundColor:
|
|
51
|
+
backgroundColor: SurfaceBadgeVideoSurface,
|
|
51
52
|
icon: FileVideo,
|
|
52
53
|
iconColor: GrayWhite
|
|
53
54
|
},
|
|
54
55
|
'folder-external': {
|
|
55
|
-
backgroundColor:
|
|
56
|
+
backgroundColor: SurfaceBadgeFolderexternalSurface,
|
|
56
57
|
icon: FolderExternal,
|
|
57
58
|
iconColor: GrayWhite
|
|
58
59
|
},
|
|
59
60
|
'folder-shared': {
|
|
60
|
-
backgroundColor:
|
|
61
|
+
backgroundColor: SurfaceBadgeFoldersharedSurface,
|
|
61
62
|
icon: FolderShared,
|
|
62
63
|
iconColor: GrayWhite
|
|
63
64
|
},
|
|
64
65
|
'action-relay': {
|
|
65
|
-
backgroundColor:
|
|
66
|
+
backgroundColor: SurfaceBadgeRelaySurface,
|
|
66
67
|
icon: Relay,
|
|
67
68
|
iconColor: GrayWhite
|
|
68
69
|
},
|
|
69
70
|
'action-mention': {
|
|
70
|
-
backgroundColor:
|
|
71
|
+
backgroundColor: SurfaceBadgeMentionSurface,
|
|
71
72
|
icon: EllipsisBubble,
|
|
72
73
|
iconColor: GrayWhite
|
|
73
74
|
},
|
|
74
75
|
'action-task': {
|
|
75
|
-
backgroundColor:
|
|
76
|
+
backgroundColor: SurfaceBadgeTaskSurface,
|
|
76
77
|
icon: Task,
|
|
77
78
|
iconColor: GrayWhite
|
|
78
79
|
},
|
|
79
80
|
'action-taskapproval': {
|
|
80
|
-
backgroundColor:
|
|
81
|
+
backgroundColor: SurfaceBadgeTaskapprovalSurface,
|
|
81
82
|
icon: ApprovalTask,
|
|
82
83
|
iconColor: GrayWhite
|
|
83
84
|
},
|
|
84
85
|
'action-annotation': {
|
|
85
|
-
backgroundColor:
|
|
86
|
+
backgroundColor: SurfaceBadgeAnnotationSurface,
|
|
86
87
|
icon: Annotation,
|
|
87
88
|
iconColor: GrayWhite
|
|
88
89
|
},
|
|
89
90
|
'action-performed-completed': {
|
|
90
|
-
backgroundColor:
|
|
91
|
+
backgroundColor: SurfaceBadgeCompletedSurface,
|
|
91
92
|
icon: Checkmark,
|
|
92
93
|
iconColor: GrayWhite
|
|
93
94
|
},
|
|
94
95
|
'action-performed-rejected': {
|
|
95
|
-
backgroundColor:
|
|
96
|
+
backgroundColor: SurfaceBadgeRejectedSurface,
|
|
96
97
|
icon: XMark,
|
|
97
98
|
iconColor: GrayWhite
|
|
98
99
|
},
|
|
99
100
|
'collaborator-external': {
|
|
100
|
-
backgroundColor:
|
|
101
|
+
backgroundColor: SurfaceBadgeExternalSurface,
|
|
101
102
|
icon: GlobeBadge,
|
|
102
103
|
iconColor: GrayWhite
|
|
103
104
|
},
|
|
104
105
|
'collaborator-admin': {
|
|
105
|
-
backgroundColor:
|
|
106
|
+
backgroundColor: SurfaceBadgeAdminSurface,
|
|
106
107
|
icon: Star,
|
|
107
108
|
iconColor: GrayWhite
|
|
108
109
|
},
|
|
109
110
|
'collaborator-coadmin': {
|
|
110
|
-
backgroundColor:
|
|
111
|
+
backgroundColor: SurfaceBadgeCoadminSurface,
|
|
111
112
|
icon: Star,
|
|
112
113
|
iconColor: GrayWhite
|
|
113
114
|
},
|
|
114
115
|
'content-pin': {
|
|
115
|
-
backgroundColor:
|
|
116
|
+
backgroundColor: SurfaceBadgePinSurface,
|
|
116
117
|
icon: Pin,
|
|
117
118
|
iconColor: Gray80
|
|
118
119
|
},
|
|
119
120
|
'content-collection': {
|
|
120
|
-
backgroundColor:
|
|
121
|
+
backgroundColor: SurfaceBadgeCollectionSurface,
|
|
121
122
|
icon: Arrow,
|
|
122
123
|
iconColor: Gray80,
|
|
123
124
|
iconStyle: {
|
|
@@ -125,12 +126,12 @@ const badgeVariantToIconProps = {
|
|
|
125
126
|
}
|
|
126
127
|
},
|
|
127
128
|
'content-offline': {
|
|
128
|
-
backgroundColor:
|
|
129
|
+
backgroundColor: SurfaceBadgeOfflineSurface,
|
|
129
130
|
icon: CheckmarkUnderline,
|
|
130
131
|
iconColor: GrayWhite
|
|
131
132
|
},
|
|
132
133
|
'content-progress': {
|
|
133
|
-
backgroundColor:
|
|
134
|
+
backgroundColor: SurfaceBadgeProgressSurface,
|
|
134
135
|
icon: Loader,
|
|
135
136
|
iconColor: GrayWhite
|
|
136
137
|
}
|
|
@@ -155,12 +156,7 @@ const IconBadge = props => {
|
|
|
155
156
|
iconStyle
|
|
156
157
|
} = badgeVariantToIconProps[variant];
|
|
157
158
|
const iconSize = badgeSizeToIconSize[size];
|
|
158
|
-
|
|
159
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
160
|
-
// eslint-disable-next-line no-console
|
|
161
|
-
console.error('IconBadge component requires exactly one child');
|
|
162
|
-
}
|
|
163
|
-
}
|
|
159
|
+
useSingleChildCheck(children);
|
|
164
160
|
return jsxs("div", {
|
|
165
161
|
className: styles.badgeContainer,
|
|
166
162
|
children: [children, jsx(BaseBadge, {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type BadgeProps } from './types';
|
|
3
|
-
export interface NumericBadgeProps extends Omit<BadgeProps, 'size'> {
|
|
4
|
-
/** The numeric value to inform users of the total count */
|
|
3
|
+
export interface NumericBadgeProps extends Omit<BadgeProps, 'size' | 'children'> {
|
|
4
|
+
/** The numeric value to inform users of the total count. */
|
|
5
5
|
value: string;
|
|
6
|
+
/** Accepts exactly a single child component. Badge will be displayed over the child. */
|
|
7
|
+
children?: React.ReactElement;
|
|
8
|
+
/** The render prop must be passed in the case of a deeply nested child (e.g., the child is wrapped by a tooltip). */
|
|
9
|
+
render?(ariaDescribedBy: string, ref?: React.Ref<unknown>): React.ReactElement;
|
|
6
10
|
}
|
|
7
|
-
export declare const NumericBadge: React.ForwardRefExoticComponent<NumericBadgeProps & React.RefAttributes<
|
|
11
|
+
export declare const NumericBadge: React.ForwardRefExoticComponent<NumericBadgeProps & React.RefAttributes<unknown>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { WatermelonRed110 } from '@box/blueprint-web-assets/tokens/tokens';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
import
|
|
4
|
+
import { forwardRef, Children, cloneElement } from 'react';
|
|
5
5
|
import { Text } from '../text/text.js';
|
|
6
6
|
import { useUniqueId } from '../utils/useUniqueId.js';
|
|
7
7
|
import { BaseBadge } from './base-badge.js';
|
|
@@ -11,22 +11,25 @@ const NumericBadge = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
11
11
|
const {
|
|
12
12
|
value,
|
|
13
13
|
children,
|
|
14
|
-
offset
|
|
14
|
+
offset,
|
|
15
|
+
render
|
|
15
16
|
} = props;
|
|
16
17
|
const valueId = useUniqueId('numeric-badge-value');
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
// In the case of a deeply nested child (e.g., the child is wrapped by a tooltip), the render prop must be passed instead of children to correctly apply aria-describedby.
|
|
19
|
+
let badgeChild;
|
|
20
|
+
if (render) {
|
|
21
|
+
const renderedChild = render(valueId, forwardedRef);
|
|
22
|
+
badgeChild = Children.only(renderedChild);
|
|
23
|
+
} else if (children) {
|
|
24
|
+
const firstChild = Children.only(children);
|
|
25
|
+
badgeChild = /*#__PURE__*/cloneElement(firstChild, {
|
|
26
|
+
ref: forwardedRef,
|
|
27
|
+
'aria-describedby': valueId
|
|
28
|
+
});
|
|
22
29
|
}
|
|
23
|
-
const child = Children.only(children);
|
|
24
30
|
return jsxs("div", {
|
|
25
31
|
className: styles.badgeContainer,
|
|
26
|
-
children: [
|
|
27
|
-
ref: forwardedRef,
|
|
28
|
-
'aria-describedby': valueId
|
|
29
|
-
}), jsx(BaseBadge, {
|
|
32
|
+
children: [badgeChild, jsx(BaseBadge, {
|
|
30
33
|
backgroundColor: WatermelonRed110,
|
|
31
34
|
className: clsx({
|
|
32
35
|
[styles.numericBadge]: true,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type BadgeProps } from './types';
|
|
2
|
+
export declare const StatusBadgeVariants: readonly ["online"];
|
|
3
3
|
export interface StatusBadgeProps extends BadgeProps {
|
|
4
|
-
/** The variant for the status */
|
|
5
|
-
variant:
|
|
4
|
+
/** The variant for the status. */
|
|
5
|
+
variant: (typeof StatusBadgeVariants)[number];
|
|
6
6
|
}
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const StatusBadge: (props: StatusBadgeProps) => JSX.Element;
|
|
7
|
+
export declare const StatusBadge: (props: StatusBadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import { Children } from 'react';
|
|
2
|
+
import { SurfaceBadgeOnlineSurface } from '@box/blueprint-web-assets/tokens/tokens';
|
|
4
3
|
import { BaseBadge } from './base-badge.js';
|
|
5
4
|
import styles from './base-badge.module.js';
|
|
5
|
+
import { useSingleChildCheck } from './utils/useSingleChildCheck.js';
|
|
6
6
|
|
|
7
7
|
const variantToBaseBadgeProp = {
|
|
8
8
|
online: {
|
|
9
|
-
backgroundColor:
|
|
10
|
-
children: null
|
|
9
|
+
backgroundColor: SurfaceBadgeOnlineSurface
|
|
11
10
|
}
|
|
12
11
|
};
|
|
13
12
|
const StatusBadge = props => {
|
|
@@ -17,12 +16,7 @@ const StatusBadge = props => {
|
|
|
17
16
|
children,
|
|
18
17
|
offset
|
|
19
18
|
} = props;
|
|
20
|
-
|
|
21
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
22
|
-
// eslint-disable-next-line no-console
|
|
23
|
-
console.error('StatusBadge component requires exactly one child');
|
|
24
|
-
}
|
|
25
|
-
}
|
|
19
|
+
useSingleChildCheck(children);
|
|
26
20
|
return jsxs("div", {
|
|
27
21
|
className: styles.badgeContainer,
|
|
28
22
|
children: [children, jsx(BaseBadge, {
|
package/lib-esm/badge/types.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export declare const BadgeSizes: readonly ["small", "medium", "large", "xlarge"];
|
|
2
3
|
export interface BadgeProps {
|
|
3
4
|
/** Accepts exactly a single child component. Badge will be displayed over the child. */
|
|
4
|
-
children: React.
|
|
5
|
+
children: React.ReactElement;
|
|
5
6
|
/** The size of the badge */
|
|
6
|
-
size:
|
|
7
|
+
size: (typeof BadgeSizes)[number];
|
|
7
8
|
/** The offset in pixels from the default position of the badge. Accepts positive and negative integers. */
|
|
8
9
|
offset?: {
|
|
9
10
|
top?: number;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
const useSingleChildCheck = children => {
|
|
4
|
+
if (React__default.Children.count(children) !== 1) {
|
|
5
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6
|
+
// eslint-disable-next-line no-console
|
|
7
|
+
console.error('Component requires exactly one child');
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { useSingleChildCheck };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"card":"bp_card_module_card--
|
|
2
|
+
var styles = {"card":"bp_card_module_card--4ccca","dropshadow-1":"bp_card_module_dropshadow-1--4ccca","dropshadow-3":"bp_card_module_dropshadow-3--4ccca"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type CardTooltipProps } from './types';
|
|
3
2
|
/**
|
|
4
3
|
* Temporary component that displays Card styled tooltip.
|
|
@@ -10,4 +9,4 @@ import { type CardTooltipProps } from './types';
|
|
|
10
9
|
* **IMPORTANT (2)**: Must wrap interactive component/element (such as: HTMLInputElement, HTMLAnchorElement, HTMLTextAreaElement, etc. [list of focusable elements](https://allyjs.io/data-tables/focusable.html))
|
|
11
10
|
*
|
|
12
11
|
*/
|
|
13
|
-
export declare const CardTooltip: (props: CardTooltipProps) => JSX.Element;
|
|
12
|
+
export declare const CardTooltip: (props: CardTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"content":"bp_card_tooltip_module_content--
|
|
2
|
+
var styles = {"content":"bp_card_tooltip_module_content--61386","card":"bp_card_tooltip_module_card--61386","slideDownAndFade":"bp_card_tooltip_module_slideDownAndFade--61386","slideLeftAndFade":"bp_card_tooltip_module_slideLeftAndFade--61386","slideUpAndFade":"bp_card_tooltip_module_slideUpAndFade--61386","slideRightAndFade":"bp_card_tooltip_module_slideRightAndFade--61386"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"option":"bp_checkbox_module_option--
|
|
2
|
+
var styles = {"option":"bp_checkbox_module_option--bf663","checkbox":"bp_checkbox_module_checkbox--bf663","indicator":"bp_checkbox_module_indicator--bf663","label":"bp_checkbox_module_label--bf663","description":"bp_checkbox_module_description--bf663","disabled":"bp_checkbox_module_disabled--bf663"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -2,13 +2,13 @@ import { type CheckboxProps } from '@radix-ui/react-checkbox';
|
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
3
|
import { type RequireAllOrNone } from 'type-fest';
|
|
4
4
|
import { type StyledText } from '../utils/commonTypes';
|
|
5
|
-
interface DescriptionInfo {
|
|
5
|
+
export interface DescriptionInfo {
|
|
6
6
|
/** Additional text to aid in use. It will appear inside info icon tooltip in the description. */
|
|
7
7
|
descriptionInfoText?: StyledText;
|
|
8
8
|
/** aria-label for the description badge button. */
|
|
9
9
|
descriptionInfoBadgeAriaLabel?: string;
|
|
10
10
|
}
|
|
11
|
-
interface LabelInfo {
|
|
11
|
+
export interface LabelInfo {
|
|
12
12
|
/** Additional text to aid in use. It will appear inside info icon tooltip in the label. */
|
|
13
13
|
labelInfoText?: StyledText;
|
|
14
14
|
/** aria-label for the label badge button. */
|
|
@@ -29,4 +29,3 @@ export type CheckboxItemProps = {
|
|
|
29
29
|
/** Event handler called when the checked state of the checkbox changes. */
|
|
30
30
|
onCheckedChange: (checked: CheckedState) => void;
|
|
31
31
|
} & Omit<CheckboxProps, 'onCheckedChange'> & RequireAllOrNone<LabelInfo, keyof LabelInfo> & RequireAllOrNone<DescriptionInfo, keyof DescriptionInfo>;
|
|
32
|
-
export {};
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
2
|
+
import { type CollapsibleSectionProps } from './types';
|
|
3
3
|
type CollapsibleSectionSlotName = 'header' | 'content';
|
|
4
|
-
export declare const CollapsibleSection: import("react").ForwardRefExoticComponent<Omit<
|
|
5
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
6
|
-
} & {
|
|
7
|
-
openSectionButtonAriaLabel: string;
|
|
8
|
-
closeSectionButtonAriaLabel: string;
|
|
9
|
-
}, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
4
|
+
export declare const CollapsibleSection: import("react").ForwardRefExoticComponent<Omit<CollapsibleSectionProps, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
10
5
|
Slot: (props: {
|
|
11
6
|
name: CollapsibleSectionSlotName;
|
|
12
7
|
children: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"collapsibleSection":"bp_collapsible_section_module_collapsibleSection--
|
|
2
|
+
var styles = {"collapsibleSection":"bp_collapsible_section_module_collapsibleSection--9458c","collapsibleSectionHeader":"bp_collapsible_section_module_collapsibleSectionHeader--9458c","collapsibleSectionHeaderArrow":"bp_collapsible_section_module_collapsibleSectionHeaderArrow--9458c","collapsibleSectionContent":"bp_collapsible_section_module_collapsibleSectionContent--9458c","slideDown":"bp_collapsible_section_module_slideDown--9458c","slideUp":"bp_collapsible_section_module_slideUp--9458c","collapsibleSectionBody":"bp_collapsible_section_module_collapsibleSectionBody--9458c"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { type ForwardedRef } from 'react';
|
|
2
2
|
import { type ComboboxOptionProps, type ComboboxProps, type OptionValue } from './types';
|
|
3
|
-
declare const RootInner: <Multiple extends boolean, FreeInput extends boolean, T extends OptionValue>({ as, ...props }: ComboboxProps<Multiple, FreeInput, T>, ref: ForwardedRef<HTMLInputElement | HTMLTextAreaElement>) => JSX.Element;
|
|
3
|
+
declare const RootInner: <Multiple extends boolean, FreeInput extends boolean, T extends OptionValue>({ as, ...props }: ComboboxProps<Multiple, FreeInput, T>, ref: ForwardedRef<HTMLInputElement | HTMLTextAreaElement>) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export declare const Root: <Multiple extends boolean, FreeInput extends boolean, T extends OptionValue>(props: ComboboxProps<Multiple, FreeInput, T> & {
|
|
5
5
|
ref?: React.ForwardedRef<HTMLInputElement> | undefined;
|
|
6
6
|
}) => ReturnType<typeof RootInner>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"container":"bp_combobox_module_container--
|
|
2
|
+
var styles = {"container":"bp_combobox_module_container--65f3f","disabled":"bp_combobox_module_disabled--65f3f","label":"bp_combobox_module_label--65f3f","hiddenLabel":"bp_combobox_module_hiddenLabel--65f3f","comboboxContainer":"bp_combobox_module_comboboxContainer--65f3f","error":"bp_combobox_module_error--65f3f","textInputWrapper":"bp_combobox_module_textInputWrapper--65f3f","textInput":"bp_combobox_module_textInput--65f3f","errorIcon":"bp_combobox_module_errorIcon--65f3f","withChipsGroup":"bp_combobox_module_withChipsGroup--65f3f","inlineError":"bp_combobox_module_inlineError--65f3f","popover":"bp_combobox_module_popover--65f3f","option":"bp_combobox_module_option--65f3f","indicator":"bp_combobox_module_indicator--65f3f","indicatorIcon":"bp_combobox_module_indicatorIcon--65f3f","optionWithIndicator":"bp_combobox_module_optionWithIndicator--65f3f","loadingIndicator":"bp_combobox_module_loadingIndicator--65f3f","noResultOption":"bp_combobox_module_noResultOption--65f3f"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { type SelectRendererProps } from '@ariakit/react-core/select/select-renderer';
|
|
3
2
|
import { type SelectItemProps } from '@ariakit/react-core/select/select-item';
|
|
3
|
+
import { type SelectRendererProps } from '@ariakit/react-core/select/select-renderer';
|
|
4
4
|
import { type TextAreaProps } from '../text-area/types';
|
|
5
5
|
export type OptionValue = {
|
|
6
6
|
value: string;
|
|
@@ -183,7 +183,7 @@ export type ConditionalComboboxProps = ComboboxTextArea | {
|
|
|
183
183
|
as: 'input';
|
|
184
184
|
};
|
|
185
185
|
export type ComboboxProps<Multiple extends boolean, FreeInput extends boolean, T extends OptionValue> = ComboboxBaseProps<Multiple, FreeInput, T> & ConditionalComboboxProps;
|
|
186
|
-
export interface ComboboxOptionProps extends Pick<SelectItemProps, 'hideOnClick'> {
|
|
186
|
+
export interface ComboboxOptionProps extends Pick<SelectItemProps, 'hideOnClick' | 'onClick'> {
|
|
187
187
|
/**
|
|
188
188
|
* The content to render for the combobox option.
|
|
189
189
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type ElementTypes } from '../text/types';
|
|
3
|
-
|
|
3
|
+
import { type ContentCardBodyProps } from './types';
|
|
4
|
+
export declare const ContentCardBody: import("react").ForwardRefExoticComponent<Omit<ContentCardBodyProps, "ref"> & import("react").RefAttributes<ElementTypes>>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { type ContentCardFooterProps } from './types';
|
|
3
|
+
export declare const ContentCardFooter: import("react").ForwardRefExoticComponent<Omit<ContentCardFooterProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|