@box/blueprint-web 16.6.5 → 16.7.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/dist/lib-esm/accordion/accordion.module.js +1 -1
- package/dist/lib-esm/actionable-inline-notice/actionable-inline-notice.js +2 -0
- package/dist/lib-esm/actionable-inline-notice/types.d.ts +2 -0
- package/dist/lib-esm/avatar/avatar.module.js +1 -1
- package/dist/lib-esm/badge/base-badge.module.js +1 -1
- package/dist/lib-esm/card-tooltip/card-tooltip.module.js +1 -1
- package/dist/lib-esm/checkbox/checkbox.module.js +1 -1
- package/dist/lib-esm/collapsible/collapsible-section.module.js +1 -1
- package/dist/lib-esm/combobox/combobox.module.js +1 -1
- package/dist/lib-esm/combobox-group/combobox-group.module.js +1 -1
- package/dist/lib-esm/content-card/content-card.module.js +1 -1
- package/dist/lib-esm/date-picker/date-picker.module.js +1 -1
- package/dist/lib-esm/elemental-breadcrumb/constants.d.ts +47 -0
- package/dist/lib-esm/elemental-breadcrumb/constants.js +53 -0
- package/dist/lib-esm/elemental-breadcrumb/elemental-breadcrumb.d.ts +2 -0
- package/dist/lib-esm/elemental-breadcrumb/elemental-breadcrumb.js +134 -0
- package/dist/lib-esm/elemental-breadcrumb/elemental-breadcrumb.module.js +4 -0
- package/dist/lib-esm/elemental-breadcrumb/index.d.ts +2 -0
- package/dist/lib-esm/elemental-breadcrumb/types.d.ts +57 -0
- package/dist/lib-esm/empty-state/empty-state.module.js +1 -1
- package/dist/lib-esm/guided-tooltip/guided-tooltip.module.js +1 -1
- package/dist/lib-esm/icon-dual-state-button/icon-dual-state-button.module.js +1 -1
- package/dist/lib-esm/icon-toggle-button/icon-toggle-button.module.js +1 -1
- package/dist/lib-esm/index.css +3500 -2038
- package/dist/lib-esm/index.d.ts +1 -0
- package/dist/lib-esm/index.js +2 -1
- package/dist/lib-esm/inline-notice/inline-notice.d.ts +3 -1
- package/dist/lib-esm/inline-notice/inline-notice.js +2 -0
- package/dist/lib-esm/inline-table/inline-table.module.js +1 -1
- package/dist/lib-esm/inline-trigger-button/inline-trigger-button.module.js +1 -1
- package/dist/lib-esm/input-chip/input-chip.module.js +1 -1
- package/dist/lib-esm/list-item/main.module.js +1 -1
- package/dist/lib-esm/modal/modal.module.js +1 -1
- package/dist/lib-esm/navigation-menu/navigation-menu.module.js +1 -1
- package/dist/lib-esm/page/index.d.ts +2 -2
- package/dist/lib-esm/page/index.js +2 -2
- package/dist/lib-esm/page/page-context.d.ts +2 -0
- package/dist/lib-esm/page/page-context.js +1 -0
- package/dist/lib-esm/page/page-global-header-search-container.js +4 -2
- package/dist/lib-esm/page/page-portal.d.ts +12 -0
- package/dist/lib-esm/page/page-portal.js +13 -1
- package/dist/lib-esm/primitives/base-button/base-button.module.js +1 -1
- package/dist/lib-esm/primitives/base-inline-notice/base-inline-notice.js +2 -0
- package/dist/lib-esm/primitives/base-inline-notice/base-inline-notice.module.js +1 -1
- package/dist/lib-esm/primitives/base-inline-notice/types.d.ts +2 -0
- package/dist/lib-esm/primitives/base-text-input/base-text-input.module.js +1 -1
- package/dist/lib-esm/primitives/calendar/calendar.module.js +1 -1
- package/dist/lib-esm/primitives/chips/chip.module.js +1 -1
- package/dist/lib-esm/primitives/context-menu/context-menu.module.js +1 -1
- package/dist/lib-esm/primitives/dropdown-menu/dropdown-menu.module.js +1 -1
- package/dist/lib-esm/primitives/inline-error/inline-error.module.js +1 -1
- package/dist/lib-esm/primitives/link/link.module.js +1 -1
- package/dist/lib-esm/primitives/menu-combobox/menu-combobox.module.js +1 -1
- package/dist/lib-esm/primitives/notification/notification.module.js +1 -1
- package/dist/lib-esm/primitives/page-header/page-header.module.js +1 -1
- package/dist/lib-esm/primitives/popover/popover.module.js +1 -1
- package/dist/lib-esm/primitives/select-menu-grid/select-menu-grid-option.module.js +1 -1
- package/dist/lib-esm/primitives/tabs/tabs.module.js +1 -1
- package/dist/lib-esm/radio-group/radio-group.module.js +1 -1
- package/dist/lib-esm/search-input/search.module.js +1 -1
- package/dist/lib-esm/select/select.module.js +1 -1
- package/dist/lib-esm/side-panel/side-panel.module.js +1 -1
- package/dist/lib-esm/status/status.module.js +1 -1
- package/dist/lib-esm/switch/switch.module.js +1 -1
- package/dist/lib-esm/text/text.module.js +1 -1
- package/dist/lib-esm/text-area/text-area-autosize/text-area-autosize.module.js +1 -1
- package/dist/lib-esm/text-area/text-area.module.js +1 -1
- package/dist/lib-esm/text-button/text-button.module.js +1 -1
- package/dist/lib-esm/text-toggle-button/text-toggle-button.module.js +1 -1
- package/dist/lib-esm/time-picker/time-picker.module.js +1 -1
- package/dist/lib-esm/toolbar/toolbar.module.js +1 -1
- package/dist/lib-esm/tooltip/tooltip.module.js +1 -1
- package/dist/lib-esm/trigger-button/trigger-button.module.js +1 -1
- package/dist/lib-esm/util-components/base-grid-list-item/base-grid-list-item.module.js +1 -1
- package/dist/lib-esm/util-components/interactive-icon/interactive-icon.module.js +1 -1
- package/dist/lib-esm/util-components/legend/legend.module.js +1 -1
- package/dist/lib-esm/util-components/menu-item-sections/menu-item-sections.module.js +1 -1
- package/dist/lib-esm/util-components/search-term-string/search-term-string.module.js +1 -1
- package/dist/lib-esm/util-components/text-with-info-badge/text-with-info-badge.module.js +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"accordionItem":"bp_accordion_module_accordionItem--
|
|
2
|
+
var styles = {"accordionItem":"bp_accordion_module_accordionItem--71779","accordionContent":"bp_accordion_module_accordionContent--71779","accordionContentLayout":"bp_accordion_module_accordionContentLayout--71779","accordion":"bp_accordion_module_accordion--71779","accordionContentWrapper":"bp_accordion_module_accordionContentWrapper--71779","accordionInlineErrorWrapper":"bp_accordion_module_accordionInlineErrorWrapper--71779","highlighted":"bp_accordion_module_highlighted--71779","accordionFixedContent":"bp_accordion_module_accordionFixedContent--71779","accordionHeader":"bp_accordion_module_accordionHeader--71779","accordionTitleGroup":"bp_accordion_module_accordionTitleGroup--71779","accordionStartElement":"bp_accordion_module_accordionStartElement--71779","accordionStartElementFramed":"bp_accordion_module_accordionStartElementFramed--71779","accordionStartElementFramedDefault":"bp_accordion_module_accordionStartElementFramedDefault--71779","accordionStartElementFramedBox":"bp_accordion_module_accordionStartElementFramedBox--71779","accordionStartElementFramedForms":"bp_accordion_module_accordionStartElementFramedForms--71779","accordionStartElementFramedDocgen":"bp_accordion_module_accordionStartElementFramedDocgen--71779","accordionStartElementFramedSign":"bp_accordion_module_accordionStartElementFramedSign--71779","accordionTitleContent":"bp_accordion_module_accordionTitleContent--71779","accordionTitleText":"bp_accordion_module_accordionTitleText--71779","accordionSubtitle":"bp_accordion_module_accordionSubtitle--71779","accordionSubtitleIcon":"bp_accordion_module_accordionSubtitleIcon--71779","accordionSubtitleText":"bp_accordion_module_accordionSubtitleText--71779","accordionEndText":"bp_accordion_module_accordionEndText--71779","accordionHeaderInfoSlot":"bp_accordion_module_accordionHeaderInfoSlot--71779","accordionSlot":"bp_accordion_module_accordionSlot--71779","accordionChevronWrapper":"bp_accordion_module_accordionChevronWrapper--71779","accordionTriggerIcon":"bp_accordion_module_accordionTriggerIcon--71779","accordionIconWrapper":"bp_accordion_module_accordionIconWrapper--71779","bgOnly":"bp_accordion_module_bgOnly--71779","withIcon":"bp_accordion_module_withIcon--71779","accordionTrigger":"bp_accordion_module_accordionTrigger--71779","disabled":"bp_accordion_module_disabled--71779","accordionHeaderContainer":"bp_accordion_module_accordionHeaderContainer--71779"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -6,6 +6,7 @@ const ActionableInlineNotice = /*#__PURE__*/forwardRef(function ActionableInline
|
|
|
6
6
|
const {
|
|
7
7
|
backgroundColor = 'backgroundBlue',
|
|
8
8
|
children,
|
|
9
|
+
enableContainerQueryLayout,
|
|
9
10
|
icon,
|
|
10
11
|
iconAriaLabel,
|
|
11
12
|
text,
|
|
@@ -14,6 +15,7 @@ const ActionableInlineNotice = /*#__PURE__*/forwardRef(function ActionableInline
|
|
|
14
15
|
return jsxs(BaseInlineNotice, {
|
|
15
16
|
ref: forwardedRef,
|
|
16
17
|
backgroundColor: backgroundColor,
|
|
18
|
+
enableContainerQueryLayout: enableContainerQueryLayout,
|
|
17
19
|
children: [jsxs(BaseInlineNotice.ContentContainer, {
|
|
18
20
|
children: [icon && iconAriaLabel && jsx(BaseInlineNotice.Icon, {
|
|
19
21
|
icon: icon,
|
|
@@ -10,6 +10,8 @@ export type ActionableInlineNoticeProps = {
|
|
|
10
10
|
text: string;
|
|
11
11
|
/** Optional children buttons for the inline notice CTA. Specify either PrimaryAction OR both TertiaryAction and PrimaryAction. */
|
|
12
12
|
children?: ReactElement<ButtonProps>;
|
|
13
|
+
/** Enables container-width-based action stacking. Defaults to false to preserve legacy viewport-based behavior. */
|
|
14
|
+
enableContainerQueryLayout?: boolean;
|
|
13
15
|
/** Optional title for the inner text of the notice */
|
|
14
16
|
title?: string;
|
|
15
17
|
} & RequireAllOrNone<Icon, keyof Icon>;
|
|
@@ -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--d13eb","xsmall":"bp_avatar_module_xsmall--d13eb","length-1":"bp_avatar_module_length-1--d13eb","text":"bp_avatar_module_text--d13eb","length-2":"bp_avatar_module_length-2--d13eb","small":"bp_avatar_module_small--d13eb","medium":"bp_avatar_module_medium--d13eb","large":"bp_avatar_module_large--d13eb","length-3":"bp_avatar_module_length-3--d13eb","length-4":"bp_avatar_module_length-4--d13eb","xlarge":"bp_avatar_module_xlarge--d13eb","xxlarge":"bp_avatar_module_xxlarge--d13eb","badge":"bp_avatar_module_badge--d13eb","image":"bp_avatar_module_image--d13eb","loading":"bp_avatar_module_loading--d13eb","anonymousAvatar":"bp_avatar_module_anonymousAvatar--d13eb","iconContainer":"bp_avatar_module_iconContainer--d13eb"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -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--321ea","badge":"bp_base_badge_module_badge--321ea","smallSizeBadge":"bp_base_badge_module_smallSizeBadge--321ea","mediumSizeBadge":"bp_base_badge_module_mediumSizeBadge--321ea","largeSizeBadge":"bp_base_badge_module_largeSizeBadge--321ea","xlargeSizeBadge":"bp_base_badge_module_xlargeSizeBadge--321ea","xxlargeSizeBadge":"bp_base_badge_module_xxlargeSizeBadge--321ea","iconBadge":"bp_base_badge_module_iconBadge--321ea","interactiveWrapper":"bp_base_badge_module_interactiveWrapper--321ea","statusBadge":"bp_base_badge_module_statusBadge--321ea","numericBadge":"bp_base_badge_module_numericBadge--321ea","numericBadgeSingleDigit":"bp_base_badge_module_numericBadgeSingleDigit--321ea","numericBadgeMoreDigits":"bp_base_badge_module_numericBadgeMoreDigits--321ea"};
|
|
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--78f26","checkbox":"bp_checkbox_module_checkbox--78f26","indicator":"bp_checkbox_module_indicator--78f26","label":"bp_checkbox_module_label--78f26","description":"bp_checkbox_module_description--78f26","disabled":"bp_checkbox_module_disabled--78f26"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -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--f155a","collapsibleSectionHeaderRow":"bp_collapsible_section_module_collapsibleSectionHeaderRow--f155a","collapsibleSectionHeader":"bp_collapsible_section_module_collapsibleSectionHeader--f155a","collapsibleSectionHeaderArrow":"bp_collapsible_section_module_collapsibleSectionHeaderArrow--f155a","collapsibleSectionContent":"bp_collapsible_section_module_collapsibleSectionContent--f155a","collapsibleSectionBody":"bp_collapsible_section_module_collapsibleSectionBody--f155a"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -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--a019e","label":"bp_combobox_module_label--a019e","textInput":"bp_combobox_module_textInput--a019e","popover":"bp_combobox_module_popover--a019e","disabled":"bp_combobox_module_disabled--a019e","hiddenLabel":"bp_combobox_module_hiddenLabel--a019e","comboboxContainer":"bp_combobox_module_comboboxContainer--a019e","comboboxContainerInner":"bp_combobox_module_comboboxContainerInner--a019e","withChips":"bp_combobox_module_withChips--a019e","error":"bp_combobox_module_error--a019e","withComboboxButtons":"bp_combobox_module_withComboboxButtons--a019e","withInlineErrorAndEndButton":"bp_combobox_module_withInlineErrorAndEndButton--a019e","textInputWrapper":"bp_combobox_module_textInputWrapper--a019e","comboboxButtons":"bp_combobox_module_comboboxButtons--a019e","inlineErrorIcon":"bp_combobox_module_inlineErrorIcon--a019e","inlineError":"bp_combobox_module_inlineError--a019e","popoverInner":"bp_combobox_module_popoverInner--a019e","option":"bp_combobox_module_option--a019e","indicator":"bp_combobox_module_indicator--a019e","indicatorIcon":"bp_combobox_module_indicatorIcon--a019e","optionWithIndicator":"bp_combobox_module_optionWithIndicator--a019e","loadingIndicator":"bp_combobox_module_loadingIndicator--a019e"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"container":"bp_combobox_group_module_container--
|
|
2
|
+
var styles = {"container":"bp_combobox_group_module_container--20913","trailing":"bp_combobox_group_module_trailing--20913","leading":"bp_combobox_group_module_leading--20913","label":"bp_combobox_group_module_label--20913","comboboxContainer":"bp_combobox_group_module_comboboxContainer--20913","comboboxGroupcontainer":"bp_combobox_group_module_comboboxGroupcontainer--20913","disabled":"bp_combobox_group_module_disabled--20913","errorCombobox":"bp_combobox_group_module_errorCombobox--20913","errorSelect":"bp_combobox_group_module_errorSelect--20913","selectHasFocus":"bp_combobox_group_module_selectHasFocus--20913","comboboxHasFocus":"bp_combobox_group_module_comboboxHasFocus--20913"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"card":"bp_content_card_module_card--
|
|
2
|
+
var styles = {"card":"bp_content_card_module_card--2a9ea","ghostCard":"bp_content_card_module_ghostCard--2a9ea","cardContent":"bp_content_card_module_cardContent--2a9ea","cardTitle":"bp_content_card_module_cardTitle--2a9ea","cardTitleText":"bp_content_card_module_cardTitleText--2a9ea","cardBody":"bp_content_card_module_cardBody--2a9ea","cardBodyText":"bp_content_card_module_cardBodyText--2a9ea","cardIcon":"bp_content_card_module_cardIcon--2a9ea","cardBackground":"bp_content_card_module_cardBackground--2a9ea","image":"bp_content_card_module_image--2a9ea","iconGhost":"bp_content_card_module_iconGhost--2a9ea","titleGhost":"bp_content_card_module_titleGhost--2a9ea","bodyGhost":"bp_content_card_module_bodyGhost--2a9ea","pillGhostContainer":"bp_content_card_module_pillGhostContainer--2a9ea","pillGhost":"bp_content_card_module_pillGhost--2a9ea"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"datePicker":"bp_date_picker_module_datePicker--
|
|
2
|
+
var styles = {"datePicker":"bp_date_picker_module_datePicker--55c8c","label":"bp_date_picker_module_label--55c8c","group":"bp_date_picker_module_group--55c8c","disabled":"bp_date_picker_module_disabled--55c8c","groupContainer":"bp_date_picker_module_groupContainer--55c8c","error":"bp_date_picker_module_error--55c8c","groupContainerInput":"bp_date_picker_module_groupContainerInput--55c8c","groupContainerInputSegment":"bp_date_picker_module_groupContainerInputSegment--55c8c","button":"bp_date_picker_module_button--55c8c","clear":"bp_date_picker_module_clear--55c8c","inlineError":"bp_date_picker_module_inlineError--55c8c","datePickerPopoverContent":"bp_date_picker_module_datePickerPopoverContent--55c8c"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal geometry for ElementalBreadcrumb — path `d` strings exported verbatim
|
|
3
|
+
* from Figma (Elemental breadcrumb node 670:45540, file xZ1gAXsZ1rEAEGwv1whhel).
|
|
4
|
+
* The silhouettes are baked vector paths (12px rounded outer corners + a rounded
|
|
5
|
+
* chevron apex), NOT parametric rectangles, so they are copied as-is. They feed
|
|
6
|
+
* the SVG `viewBox` (unitless px); CSS box sizes convert to rem in the SCSS module.
|
|
7
|
+
*
|
|
8
|
+
* These are implementation details of this one component (not part of the public
|
|
9
|
+
* `@box/blueprint-web` surface), so they live here rather than in `types.ts`.
|
|
10
|
+
*
|
|
11
|
+
* Composition: the trailing (current) step is a plain rounded-right rectangle
|
|
12
|
+
* that sits BEHIND the leading (back) step. The leading step is rounded on the
|
|
13
|
+
* left with a chevron POINT on the right; it overlaps the trailing rectangle so
|
|
14
|
+
* the point reads as an interlocking seam.
|
|
15
|
+
*/
|
|
16
|
+
export declare const STEP_H = 40;
|
|
17
|
+
/** Leading (back) step art: 56×40. Rounded-left corners; chevron POINT on the right. */
|
|
18
|
+
export declare const LEADING_W = 56;
|
|
19
|
+
/** Trailing (current) step art: 54×40. Plain rounded-right rectangle, square left edge. */
|
|
20
|
+
export declare const TRAILING_W = 54;
|
|
21
|
+
/** Leading step fill: rounded-left corners, SHARP chevron point at (56,20). */
|
|
22
|
+
export declare const LEADING_PATH = "M40 0H12C5.37259 0 0 5.37258 0 12V28C0 34.6274 5.37259 40 12 40H40L56 20L40 0Z";
|
|
23
|
+
/** Leading step hairline stroke (inside-stroke, inset 0.5px), SHARP apex at (55.36,20). */
|
|
24
|
+
export declare const LEADING_STROKE_PATH = "M12 0.5C5.64873 0.5 0.5 5.64873 0.5 12V28C0.5 34.3513 5.64873 39.5 12 39.5H39.7598L55.3597 20L39.7598 0.5H12Z";
|
|
25
|
+
/** Trailing step fill: plain rounded-right rectangle with a square left edge (viewBox 54). */
|
|
26
|
+
export declare const TRAILING_PATH = "M0 0H42C48.6274 0 54 5.37258 54 12V28C54 34.6274 48.6274 40 42 40H0V0Z";
|
|
27
|
+
/** SVG <linearGradient> handle coords per direction. */
|
|
28
|
+
export declare const GRADIENT_COORDS: {
|
|
29
|
+
readonly vertical: {
|
|
30
|
+
readonly x1: 0;
|
|
31
|
+
readonly y1: 0;
|
|
32
|
+
readonly x2: 0;
|
|
33
|
+
readonly y2: 1;
|
|
34
|
+
};
|
|
35
|
+
readonly horizontal: {
|
|
36
|
+
readonly x1: 0;
|
|
37
|
+
readonly y1: 0;
|
|
38
|
+
readonly x2: 1;
|
|
39
|
+
readonly y2: 0;
|
|
40
|
+
};
|
|
41
|
+
readonly diagonal: {
|
|
42
|
+
readonly x1: 0;
|
|
43
|
+
readonly y1: 0;
|
|
44
|
+
readonly x2: 1;
|
|
45
|
+
readonly y2: 1;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal geometry for ElementalBreadcrumb — path `d` strings exported verbatim
|
|
3
|
+
* from Figma (Elemental breadcrumb node 670:45540, file xZ1gAXsZ1rEAEGwv1whhel).
|
|
4
|
+
* The silhouettes are baked vector paths (12px rounded outer corners + a rounded
|
|
5
|
+
* chevron apex), NOT parametric rectangles, so they are copied as-is. They feed
|
|
6
|
+
* the SVG `viewBox` (unitless px); CSS box sizes convert to rem in the SCSS module.
|
|
7
|
+
*
|
|
8
|
+
* These are implementation details of this one component (not part of the public
|
|
9
|
+
* `@box/blueprint-web` surface), so they live here rather than in `types.ts`.
|
|
10
|
+
*
|
|
11
|
+
* Composition: the trailing (current) step is a plain rounded-right rectangle
|
|
12
|
+
* that sits BEHIND the leading (back) step. The leading step is rounded on the
|
|
13
|
+
* left with a chevron POINT on the right; it overlaps the trailing rectangle so
|
|
14
|
+
* the point reads as an interlocking seam.
|
|
15
|
+
*/
|
|
16
|
+
const STEP_H = 40;
|
|
17
|
+
/** Leading (back) step art: 56×40. Rounded-left corners; chevron POINT on the right. */
|
|
18
|
+
const LEADING_W = 56;
|
|
19
|
+
/** Trailing (current) step art: 54×40. Plain rounded-right rectangle, square left edge. */
|
|
20
|
+
const TRAILING_W = 54;
|
|
21
|
+
// Leading step: rounded-left with a chevron POINT on the right. Figma's own export
|
|
22
|
+
// rounds the apex (a cubic Bézier), leaving a ~2px notch where the point meets the
|
|
23
|
+
// trailing step. We replace that curve with a SHARP vertex at the apex (56,20 for the
|
|
24
|
+
// fill; ~55.36,20 for the inside-stroke) so the silhouette runs solid through the corner.
|
|
25
|
+
/** Leading step fill: rounded-left corners, SHARP chevron point at (56,20). */
|
|
26
|
+
const LEADING_PATH = 'M40 0H12C5.37259 0 0 5.37258 0 12V28C0 34.6274 5.37259 40 12 40H40L56 20L40 0Z';
|
|
27
|
+
/** Leading step hairline stroke (inside-stroke, inset 0.5px), SHARP apex at (55.36,20). */
|
|
28
|
+
const LEADING_STROKE_PATH = 'M12 0.5C5.64873 0.5 0.5 5.64873 0.5 12V28C0.5 34.3513 5.64873 39.5 12 39.5H39.7598L55.3597 20L39.7598 0.5H12Z';
|
|
29
|
+
/** Trailing step fill: plain rounded-right rectangle with a square left edge (viewBox 54). */
|
|
30
|
+
const TRAILING_PATH = 'M0 0H42C48.6274 0 54 5.37258 54 12V28C54 34.6274 48.6274 40 42 40H0V0Z';
|
|
31
|
+
/** SVG <linearGradient> handle coords per direction. */
|
|
32
|
+
const GRADIENT_COORDS = {
|
|
33
|
+
vertical: {
|
|
34
|
+
x1: 0,
|
|
35
|
+
y1: 0,
|
|
36
|
+
x2: 0,
|
|
37
|
+
y2: 1
|
|
38
|
+
},
|
|
39
|
+
horizontal: {
|
|
40
|
+
x1: 0,
|
|
41
|
+
y1: 0,
|
|
42
|
+
x2: 1,
|
|
43
|
+
y2: 0
|
|
44
|
+
},
|
|
45
|
+
diagonal: {
|
|
46
|
+
x1: 0,
|
|
47
|
+
y1: 0,
|
|
48
|
+
x2: 1,
|
|
49
|
+
y2: 1
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export { GRADIENT_COORDS, LEADING_PATH, LEADING_STROKE_PATH, LEADING_W, STEP_H, TRAILING_PATH, TRAILING_W };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { bpIconIconOnDark, bpSize060, bpIconIconOnLightSecondary } from '@box/blueprint-web-assets/tokens/tokens';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { forwardRef, useId, createElement } from 'react';
|
|
5
|
+
import { VisuallyHidden } from '../visually-hidden/visually-hidden.js';
|
|
6
|
+
import { LEADING_PATH, LEADING_STROKE_PATH, TRAILING_PATH, GRADIENT_COORDS, LEADING_W, STEP_H, TRAILING_W } from './constants.js';
|
|
7
|
+
import styles from './elemental-breadcrumb.module.js';
|
|
8
|
+
|
|
9
|
+
// The leading chevron apex is a SHARP point at the art's right edge (x = LEADING_W).
|
|
10
|
+
// It must map flush to the box's right edge so the point stays sharp and butts against
|
|
11
|
+
// the trailing step — so DON'T pad the right side. Pad only left/top/bottom by 1px so the
|
|
12
|
+
// 1px inside hairline stroke isn't clipped by the SVG's overflow box.
|
|
13
|
+
// (`preserveAspectRatio="none"` stretches viewBox → box, so any right padding would pull
|
|
14
|
+
// the apex inward and let edge antialiasing round it off.)
|
|
15
|
+
const LEADING_VIEW_BOX = `-1 -1 ${LEADING_W + 1} ${STEP_H + 2}`;
|
|
16
|
+
const TRAILING_VIEW_BOX = `-1 -1 ${TRAILING_W + 2} ${STEP_H + 2}`;
|
|
17
|
+
const renderCurrentStepPaint = (fill, gradientId) => {
|
|
18
|
+
if (fill.type === 'solid') {
|
|
19
|
+
return {
|
|
20
|
+
paint: fill.color,
|
|
21
|
+
defs: null
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
const {
|
|
25
|
+
x1,
|
|
26
|
+
y1,
|
|
27
|
+
x2,
|
|
28
|
+
y2
|
|
29
|
+
} = GRADIENT_COORDS[fill.direction ?? 'vertical'];
|
|
30
|
+
const lastStopIndex = fill.stops.length - 1;
|
|
31
|
+
return {
|
|
32
|
+
paint: `url(#${gradientId})`,
|
|
33
|
+
defs: jsx("linearGradient", {
|
|
34
|
+
id: gradientId,
|
|
35
|
+
x1: x1,
|
|
36
|
+
x2: x2,
|
|
37
|
+
y1: y1,
|
|
38
|
+
y2: y2,
|
|
39
|
+
children: fill.stops.map((stopColor, index) =>
|
|
40
|
+
// Key by index: `stops` may legitimately repeat a color, so the color alone is not unique.
|
|
41
|
+
jsx("stop", {
|
|
42
|
+
offset: index / lastStopIndex,
|
|
43
|
+
stopColor: stopColor
|
|
44
|
+
}, `${index}-${stopColor}`))
|
|
45
|
+
})
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
const ElementalBreadcrumb = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
49
|
+
const {
|
|
50
|
+
navAriaLabel,
|
|
51
|
+
backAriaLabel,
|
|
52
|
+
currentStepLabel,
|
|
53
|
+
backIcon,
|
|
54
|
+
currentIcon,
|
|
55
|
+
currentStepFill,
|
|
56
|
+
currentIconColor = bpIconIconOnDark,
|
|
57
|
+
onBack,
|
|
58
|
+
className,
|
|
59
|
+
...rest
|
|
60
|
+
} = props;
|
|
61
|
+
const gradientId = useId();
|
|
62
|
+
const {
|
|
63
|
+
paint,
|
|
64
|
+
defs
|
|
65
|
+
} = renderCurrentStepPaint(currentStepFill, gradientId);
|
|
66
|
+
const backIconElement = /*#__PURE__*/createElement(backIcon, {
|
|
67
|
+
'aria-hidden': true,
|
|
68
|
+
className: clsx(styles.icon, styles.leadingIcon),
|
|
69
|
+
color: bpIconIconOnLightSecondary,
|
|
70
|
+
height: bpSize060,
|
|
71
|
+
width: bpSize060
|
|
72
|
+
});
|
|
73
|
+
const currentIconElement = /*#__PURE__*/createElement(currentIcon, {
|
|
74
|
+
'aria-hidden': true,
|
|
75
|
+
className: clsx(styles.icon, styles.trailingIcon),
|
|
76
|
+
color: currentIconColor,
|
|
77
|
+
height: bpSize060,
|
|
78
|
+
width: bpSize060
|
|
79
|
+
});
|
|
80
|
+
return jsx("nav", {
|
|
81
|
+
ref: forwardedRef,
|
|
82
|
+
"aria-label": navAriaLabel,
|
|
83
|
+
className: clsx(styles.nav, className),
|
|
84
|
+
...rest,
|
|
85
|
+
children: jsxs("ol", {
|
|
86
|
+
className: styles.list,
|
|
87
|
+
children: [jsx("li", {
|
|
88
|
+
className: clsx(styles.step, styles.leadingStep),
|
|
89
|
+
children: jsxs("button", {
|
|
90
|
+
"aria-label": backAriaLabel,
|
|
91
|
+
className: styles.backButton,
|
|
92
|
+
onClick: onBack,
|
|
93
|
+
type: "button",
|
|
94
|
+
children: [jsxs("svg", {
|
|
95
|
+
"aria-hidden": "true",
|
|
96
|
+
className: styles.shape,
|
|
97
|
+
preserveAspectRatio: "none",
|
|
98
|
+
viewBox: LEADING_VIEW_BOX,
|
|
99
|
+
children: [jsx("path", {
|
|
100
|
+
className: styles.leadingShape,
|
|
101
|
+
d: LEADING_PATH
|
|
102
|
+
}), jsx("path", {
|
|
103
|
+
className: styles.leadingStroke,
|
|
104
|
+
d: LEADING_STROKE_PATH,
|
|
105
|
+
fill: "none",
|
|
106
|
+
strokeWidth: 1,
|
|
107
|
+
vectorEffect: "non-scaling-stroke"
|
|
108
|
+
})]
|
|
109
|
+
}), backIconElement]
|
|
110
|
+
})
|
|
111
|
+
}), jsxs("li", {
|
|
112
|
+
"aria-current": "page",
|
|
113
|
+
className: clsx(styles.step, styles.trailingStep),
|
|
114
|
+
children: [jsxs("svg", {
|
|
115
|
+
"aria-hidden": "true",
|
|
116
|
+
className: styles.shape,
|
|
117
|
+
preserveAspectRatio: "none",
|
|
118
|
+
viewBox: TRAILING_VIEW_BOX,
|
|
119
|
+
children: [defs && jsx("defs", {
|
|
120
|
+
children: defs
|
|
121
|
+
}), jsx("path", {
|
|
122
|
+
d: TRAILING_PATH,
|
|
123
|
+
fill: paint
|
|
124
|
+
})]
|
|
125
|
+
}), currentIconElement, jsx(VisuallyHidden, {
|
|
126
|
+
children: currentStepLabel
|
|
127
|
+
})]
|
|
128
|
+
})]
|
|
129
|
+
})
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
ElementalBreadcrumb.displayName = 'ElementalBreadcrumb';
|
|
133
|
+
|
|
134
|
+
export { ElementalBreadcrumb };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import '../index.css';
|
|
2
|
+
var styles = {"nav":"bp_elemental_breadcrumb_module_nav--06561","list":"bp_elemental_breadcrumb_module_list--06561","step":"bp_elemental_breadcrumb_module_step--06561","leadingStep":"bp_elemental_breadcrumb_module_leadingStep--06561","trailingStep":"bp_elemental_breadcrumb_module_trailingStep--06561","shape":"bp_elemental_breadcrumb_module_shape--06561","leadingShape":"bp_elemental_breadcrumb_module_leadingShape--06561","leadingStroke":"bp_elemental_breadcrumb_module_leadingStroke--06561","backButton":"bp_elemental_breadcrumb_module_backButton--06561","icon":"bp_elemental_breadcrumb_module_icon--06561","leadingIcon":"bp_elemental_breadcrumb_module_leadingIcon--06561","trailingIcon":"bp_elemental_breadcrumb_module_trailingIcon--06561"};
|
|
3
|
+
|
|
4
|
+
export { styles as default };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type ComponentProps, type FunctionComponent, type PropsWithChildren, type SVGProps } from 'react';
|
|
2
|
+
type BlueprintIcon = FunctionComponent<PropsWithChildren<SVGProps<SVGSVGElement>>>;
|
|
3
|
+
/**
|
|
4
|
+
* Fill for the current (trailing, product) step. Each product supplies its own
|
|
5
|
+
* brand fill — the component bakes in no colors. Modeled as a discriminated
|
|
6
|
+
* union because products differ in BOTH fill type AND gradient direction:
|
|
7
|
+
* - Extract: diagonal gradient #FE03DC → #2784FA
|
|
8
|
+
* - Forms: SOLID #20A56E (no gradient)
|
|
9
|
+
* - Automate: vertical gradient #F34936 → #F27621
|
|
10
|
+
*
|
|
11
|
+
* Values are rendered as SVG paint (a solid `fill` or an SVG `<linearGradient>`
|
|
12
|
+
* built from `stops`), NOT as a CSS `linear-gradient()` string — an SVG `fill`
|
|
13
|
+
* cannot consume one.
|
|
14
|
+
*/
|
|
15
|
+
export type CurrentStepFill = {
|
|
16
|
+
type: 'solid';
|
|
17
|
+
color: string;
|
|
18
|
+
} | {
|
|
19
|
+
type: 'gradient';
|
|
20
|
+
/** 2+ gradient stops in paint order. Typed as a non-empty pair to keep offsets well-defined. */
|
|
21
|
+
stops: [string, string, ...string[]];
|
|
22
|
+
/**
|
|
23
|
+
* Gradient axis. Maps to SVG <linearGradient> handle coords.
|
|
24
|
+
* @default 'vertical'
|
|
25
|
+
*/
|
|
26
|
+
direction?: 'vertical' | 'horizontal' | 'diagonal';
|
|
27
|
+
};
|
|
28
|
+
export type ElementalBreadcrumbProps = Omit<ComponentProps<'nav'>, 'aria-label'> & {
|
|
29
|
+
/** Accessible label for the <nav> landmark. e.g. "Breadcrumb". Required — Blueprint is globalization-agnostic. */
|
|
30
|
+
navAriaLabel: string;
|
|
31
|
+
/**
|
|
32
|
+
* Accessible label for the interactive leading (back) step. REQUIRED — the
|
|
33
|
+
* component never derives it. The consumer must pass a meaningful, context-
|
|
34
|
+
* specific label that names where the back step leads (e.g. "Go back to apps",
|
|
35
|
+
* "Go back to Documents"), because the leading step only renders an icon and
|
|
36
|
+
* has no visible text. Blueprint is globalization-agnostic, so this is a plain
|
|
37
|
+
* (already-localized) string, not an i18n key.
|
|
38
|
+
*/
|
|
39
|
+
backAriaLabel: string;
|
|
40
|
+
/** Accessible name for the current (trailing, non-interactive) step. e.g. "Extract Agent". */
|
|
41
|
+
currentStepLabel: string;
|
|
42
|
+
/** Icon rendered inside the leading (back) step. */
|
|
43
|
+
backIcon: BlueprintIcon;
|
|
44
|
+
/** Icon rendered inside the trailing (current) step. */
|
|
45
|
+
currentIcon: BlueprintIcon;
|
|
46
|
+
/** Product-specific fill for the current step (solid or gradient). See CurrentStepFill. */
|
|
47
|
+
currentStepFill: CurrentStepFill;
|
|
48
|
+
/**
|
|
49
|
+
* Icon color on the current step. Choose for contrast against
|
|
50
|
+
* `currentStepFill` (consumer's responsibility — axe checks in tests).
|
|
51
|
+
* @default '#fff'
|
|
52
|
+
*/
|
|
53
|
+
currentIconColor?: string;
|
|
54
|
+
/** Invoked when the user activates the leading step (behaves as a back button). */
|
|
55
|
+
onBack: () => void;
|
|
56
|
+
};
|
|
57
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"emptyState":"bp_empty_state_module_emptyState--
|
|
2
|
+
var styles = {"emptyState":"bp_empty_state_module_emptyState--2f4c7","illustration":"bp_empty_state_module_illustration--2f4c7","body":"bp_empty_state_module_body--2f4c7","heading":"bp_empty_state_module_heading--2f4c7","button":"bp_empty_state_module_button--2f4c7","small":"bp_empty_state_module_small--2f4c7"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"content":"bp_guided_tooltip_module_content--
|
|
2
|
+
var styles = {"content":"bp_guided_tooltip_module_content--39841","body":"bp_guided_tooltip_module_body--39841","noTitle":"bp_guided_tooltip_module_noTitle--39841","title":"bp_guided_tooltip_module_title--39841","footer":"bp_guided_tooltip_module_footer--39841","actionButtons":"bp_guided_tooltip_module_actionButtons--39841","stepsIndicator":"bp_guided_tooltip_module_stepsIndicator--39841","closeButton":"bp_guided_tooltip_module_closeButton--39841","arrow":"bp_guided_tooltip_module_arrow--39841","icon":"bp_guided_tooltip_module_icon--39841","illustration":"bp_guided_tooltip_module_illustration--39841"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"iconDualStateButton":"bp_icon_dual_state_button_module_iconDualStateButton--
|
|
2
|
+
var styles = {"iconDualStateButton":"bp_icon_dual_state_button_module_iconDualStateButton--665c1","pressed":"bp_icon_dual_state_button_module_pressed--665c1","xsmallButton":"bp_icon_dual_state_button_module_xsmallButton--665c1","smallButton":"bp_icon_dual_state_button_module_smallButton--665c1"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"iconToggleButton":"bp_icon_toggle_button_module_iconToggleButton--
|
|
2
|
+
var styles = {"iconToggleButton":"bp_icon_toggle_button_module_iconToggleButton--a4b41","high-contrast":"bp_icon_toggle_button_module_high-contrast--a4b41","icon":"bp_icon_toggle_button_module_icon--a4b41","default":"bp_icon_toggle_button_module_default--a4b41","medium":"bp_icon_toggle_button_module_medium--a4b41","small":"bp_icon_toggle_button_module_small--a4b41","x-small":"bp_icon_toggle_button_module_x-small--a4b41"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|