@box/blueprint-web 12.110.1 → 12.111.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/breadcrumb/breadcrumb-dropdown.d.ts +10 -0
- package/dist/lib-esm/breadcrumb/breadcrumb-dropdown.js +44 -0
- package/dist/lib-esm/breadcrumb/breadcrumb.js +31 -82
- package/dist/lib-esm/breadcrumb/breadcrumb.module.js +1 -1
- package/dist/lib-esm/index.css +196 -191
- package/dist/lib-esm/primitives/base-button/base-button-icon.js +6 -2
- package/dist/lib-esm/primitives/base-button/utils.js +2 -2
- package/dist/lib-esm/select/select.js +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Crumb } from './types';
|
|
2
|
+
interface BreadcrumbDropdownProps {
|
|
3
|
+
crumbsToRender: Crumb[];
|
|
4
|
+
iconButton: React.ReactNode;
|
|
5
|
+
listRef?: React.RefObject<HTMLLIElement>;
|
|
6
|
+
onPageLinkClick: (id: string) => void;
|
|
7
|
+
size: 'xsmall' | 'small' | 'medium' | 'large';
|
|
8
|
+
}
|
|
9
|
+
export declare function BreadcrumbDropdown({ crumbsToRender, iconButton, onPageLinkClick, size, listRef, }: BreadcrumbDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useCallback } from 'react';
|
|
3
|
+
import { PointerRight } from '@box/blueprint-web-assets/icons/Fill';
|
|
4
|
+
import { DropdownMenu } from '../primitives/dropdown-menu/index.js';
|
|
5
|
+
import { Text } from '../text/text.js';
|
|
6
|
+
import { getSeparatorSize } from './utils.js';
|
|
7
|
+
import styles from './breadcrumb.module.js';
|
|
8
|
+
|
|
9
|
+
function BreadcrumbDropdown({
|
|
10
|
+
crumbsToRender,
|
|
11
|
+
iconButton,
|
|
12
|
+
onPageLinkClick,
|
|
13
|
+
size,
|
|
14
|
+
listRef
|
|
15
|
+
}) {
|
|
16
|
+
const handlePageLinkClick = useCallback(crumbId => () => {
|
|
17
|
+
onPageLinkClick(crumbId);
|
|
18
|
+
}, [onPageLinkClick]);
|
|
19
|
+
return jsxs("li", {
|
|
20
|
+
ref: listRef,
|
|
21
|
+
className: styles.pageLink,
|
|
22
|
+
children: [jsxs(DropdownMenu.Root, {
|
|
23
|
+
children: [jsx(DropdownMenu.Trigger, {
|
|
24
|
+
children: iconButton
|
|
25
|
+
}), jsx(DropdownMenu.Content, {
|
|
26
|
+
align: "start",
|
|
27
|
+
className: styles.dropdownContent,
|
|
28
|
+
children: crumbsToRender.map(crumb => jsx(DropdownMenu.Item, {
|
|
29
|
+
onSelect: handlePageLinkClick(crumb.id),
|
|
30
|
+
children: jsx(Text, {
|
|
31
|
+
as: "span",
|
|
32
|
+
children: crumb.name
|
|
33
|
+
})
|
|
34
|
+
}, crumb.id))
|
|
35
|
+
})]
|
|
36
|
+
}), jsx(PointerRight, {
|
|
37
|
+
height: getSeparatorSize(size),
|
|
38
|
+
role: "presentation",
|
|
39
|
+
width: getSeparatorSize(size)
|
|
40
|
+
})]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { BreadcrumbDropdown };
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { forwardRef,
|
|
2
|
+
import { forwardRef, useRef } from 'react';
|
|
3
3
|
import { FolderTree, PointerRight } from '@box/blueprint-web-assets/icons/Fill';
|
|
4
4
|
import { Ellipsis } from '@box/blueprint-web-assets/icons/Medium';
|
|
5
5
|
import { Home } from '@box/blueprint-web-assets/icons/MediumFilled';
|
|
6
6
|
import noop from 'lodash/noop';
|
|
7
|
-
import { DropdownMenu } from '../primitives/dropdown-menu/index.js';
|
|
8
7
|
import { IconButton } from '../primitives/icon-button/icon-button.js';
|
|
9
|
-
import { Text } from '../text/text.js';
|
|
10
8
|
import { useBreakpoint, Breakpoint } from '../utils/useBreakpoint.js';
|
|
9
|
+
import { BreadcrumbDropdown } from './breadcrumb-dropdown.js';
|
|
11
10
|
import { PageLink } from './page-link.js';
|
|
12
11
|
import { useFolderTreeTruncation } from './useFolderTreeTruncation.js';
|
|
13
|
-
import styles from './breadcrumb.module.js';
|
|
14
12
|
import { getSeparatorSize } from './utils.js';
|
|
13
|
+
import styles from './breadcrumb.module.js';
|
|
15
14
|
|
|
16
15
|
const Breadcrumb = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
17
16
|
const {
|
|
@@ -27,9 +26,6 @@ const Breadcrumb = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
27
26
|
onPageLinkClick = noop,
|
|
28
27
|
...rest
|
|
29
28
|
} = props;
|
|
30
|
-
const handlePageLinkClick = useCallback(crumbId => () => {
|
|
31
|
-
onPageLinkClick(crumbId);
|
|
32
|
-
}, [onPageLinkClick]);
|
|
33
29
|
// Responsive detection: mobile/tablet takes priority over consumer-controlled truncationMethod
|
|
34
30
|
const breakpoint = useBreakpoint();
|
|
35
31
|
const isMobile = isResponsiveEnabled || breakpoint <= Breakpoint.Medium;
|
|
@@ -69,30 +65,15 @@ const Breadcrumb = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
69
65
|
width: getSeparatorSize(size)
|
|
70
66
|
})]
|
|
71
67
|
}), isMobile && crumbs && currentPage && jsxs(Fragment, {
|
|
72
|
-
children: [ancestorCrumbs.length > 0 &&
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}), jsx(DropdownMenu.Content, {
|
|
82
|
-
align: "start",
|
|
83
|
-
children: ancestorCrumbs.map(crumb => jsx(DropdownMenu.Item, {
|
|
84
|
-
onSelect: handlePageLinkClick(crumb.id),
|
|
85
|
-
children: jsx(Text, {
|
|
86
|
-
as: "span",
|
|
87
|
-
children: crumb.name
|
|
88
|
-
})
|
|
89
|
-
}, crumb.id))
|
|
90
|
-
})]
|
|
91
|
-
}), jsx(PointerRight, {
|
|
92
|
-
height: getSeparatorSize(size),
|
|
93
|
-
role: "presentation",
|
|
94
|
-
width: getSeparatorSize(size)
|
|
95
|
-
})]
|
|
68
|
+
children: [ancestorCrumbs.length > 0 && jsx(BreadcrumbDropdown, {
|
|
69
|
+
crumbsToRender: ancestorCrumbs,
|
|
70
|
+
iconButton: jsx(IconButton, {
|
|
71
|
+
"aria-label": truncatedLinksIconAriaLabel,
|
|
72
|
+
icon: FolderTree,
|
|
73
|
+
size: "small"
|
|
74
|
+
}),
|
|
75
|
+
onPageLinkClick: onPageLinkClick,
|
|
76
|
+
size: size
|
|
96
77
|
}), jsx(PageLink, {
|
|
97
78
|
crumb: currentPage,
|
|
98
79
|
isInteractive: isInteractive,
|
|
@@ -107,32 +88,15 @@ const Breadcrumb = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
107
88
|
isLast: false,
|
|
108
89
|
onPageLinkClick: onPageLinkClick,
|
|
109
90
|
size: size
|
|
110
|
-
}),
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}), jsx(DropdownMenu.Content, {
|
|
120
|
-
align: "start",
|
|
121
|
-
children: crumbs.slice(1, crumbs.length - 2).map(crumb => {
|
|
122
|
-
return jsx(DropdownMenu.Item, {
|
|
123
|
-
onSelect: handlePageLinkClick(crumb.id),
|
|
124
|
-
children: jsx(Text, {
|
|
125
|
-
as: "span",
|
|
126
|
-
children: crumb.name
|
|
127
|
-
})
|
|
128
|
-
}, crumb.id);
|
|
129
|
-
})
|
|
130
|
-
})]
|
|
131
|
-
}), jsx(PointerRight, {
|
|
132
|
-
height: getSeparatorSize(size),
|
|
133
|
-
role: "presentation",
|
|
134
|
-
width: getSeparatorSize(size)
|
|
135
|
-
})]
|
|
91
|
+
}), jsx(BreadcrumbDropdown, {
|
|
92
|
+
crumbsToRender: crumbs.slice(1, crumbs.length - 2),
|
|
93
|
+
iconButton: jsx(IconButton, {
|
|
94
|
+
"aria-label": truncatedLinksIconAriaLabel,
|
|
95
|
+
icon: Ellipsis,
|
|
96
|
+
size: "small"
|
|
97
|
+
}),
|
|
98
|
+
onPageLinkClick: onPageLinkClick,
|
|
99
|
+
size: size
|
|
136
100
|
}), jsx(PageLink, {
|
|
137
101
|
crumb: crumbs[crumbs.length - 2],
|
|
138
102
|
isInteractive: isInteractive,
|
|
@@ -147,31 +111,16 @@ const Breadcrumb = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
147
111
|
size: size
|
|
148
112
|
})]
|
|
149
113
|
}), shouldUseFolderTreeTruncation && jsxs(Fragment, {
|
|
150
|
-
children: [
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}), jsx(DropdownMenu.Content, {
|
|
161
|
-
align: "start",
|
|
162
|
-
children: hiddenCrumbs.map(crumb => jsx(DropdownMenu.Item, {
|
|
163
|
-
onSelect: handlePageLinkClick(crumb.id),
|
|
164
|
-
children: jsx(Text, {
|
|
165
|
-
as: "span",
|
|
166
|
-
children: crumb.name
|
|
167
|
-
})
|
|
168
|
-
}, crumb.id))
|
|
169
|
-
})]
|
|
170
|
-
}), jsx(PointerRight, {
|
|
171
|
-
height: getSeparatorSize(size),
|
|
172
|
-
role: "presentation",
|
|
173
|
-
width: getSeparatorSize(size)
|
|
174
|
-
})]
|
|
114
|
+
children: [jsx(BreadcrumbDropdown, {
|
|
115
|
+
crumbsToRender: hiddenCrumbs,
|
|
116
|
+
iconButton: jsx(IconButton, {
|
|
117
|
+
"aria-label": truncatedLinksIconAriaLabel,
|
|
118
|
+
icon: FolderTree,
|
|
119
|
+
size: "small"
|
|
120
|
+
}),
|
|
121
|
+
listRef: iconButtonRef,
|
|
122
|
+
onPageLinkClick: onPageLinkClick,
|
|
123
|
+
size: size
|
|
175
124
|
}), visibleCrumbs.map((crumb, index) => jsx(PageLink, {
|
|
176
125
|
crumb: crumb,
|
|
177
126
|
isInteractive: isInteractive,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"container":"bp_breadcrumb_module_container--
|
|
2
|
+
var styles = {"container":"bp_breadcrumb_module_container--ee92d","breadcrumb":"bp_breadcrumb_module_breadcrumb--ee92d","pageLink":"bp_breadcrumb_module_pageLink--ee92d","linkWithHover":"bp_breadcrumb_module_linkWithHover--ee92d","dropdownContent":"bp_breadcrumb_module_dropdownContent--ee92d"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
package/dist/lib-esm/index.css
CHANGED
|
@@ -1856,6 +1856,156 @@
|
|
|
1856
1856
|
.bp_base_badge_module_numericBadgeMoreDigits--99ee9{
|
|
1857
1857
|
padding:1px 3px;
|
|
1858
1858
|
}
|
|
1859
|
+
.bp_icon_button_module_iconButton--3acef[data-modern=false]{
|
|
1860
|
+
--icon-button-radius:var(--radius-2);
|
|
1861
|
+
--icon-button-surface-disabled:var(--surface-cta-surface-icon-disabled);
|
|
1862
|
+
--icon-button-gray:var(--gray-50);
|
|
1863
|
+
--icon-button-border:var(--border-2);
|
|
1864
|
+
--icon-button-outline:var(--outline-focus-on-light);
|
|
1865
|
+
--icon-button-surface:var(--surface-cta-surface-icon);
|
|
1866
|
+
--icon-button-icon:var(--icon-cta-icon);
|
|
1867
|
+
--icon-button-surface-hover:var(--surface-cta-surface-icon-hover);
|
|
1868
|
+
--icon-button-icon-hover:var(--icon-cta-icon-hover);
|
|
1869
|
+
--icon-button-surface-pressed:var(--surface-cta-surface-icon-pressed);
|
|
1870
|
+
--icon-button-icon-pressed:var(--icon-cta-icon-pressed);
|
|
1871
|
+
--icon-button-icon-on-color:var(--icon-cta-icon-on-color);
|
|
1872
|
+
--icon-button-icon-on-color-hover:var(--icon-cta-icon-on-color-hover);
|
|
1873
|
+
--icon-button-icon-on-color-pressed:var(--icon-cta-icon-on-color-pressed);
|
|
1874
|
+
--icon-button-surface-utility:var(--surface-cta-surface-icon-utility);
|
|
1875
|
+
--icon-button-icon-utility:var(--icon-cta-icon-utility);
|
|
1876
|
+
--icon-button-surface-utility-hover:var(--surface-cta-surface-icon-utility-hover);
|
|
1877
|
+
--icon-button-icon-utility-hover:var(--icon-cta-icon-utility-hover);
|
|
1878
|
+
--icon-button-surface-utility-pressed:var(--surface-cta-surface-icon-utility-pressed);
|
|
1879
|
+
--icon-button-icon-utility-pressed:var(--icon-cta-icon-utility-pressed);
|
|
1880
|
+
--icon-button-size-large:var(--size-10);
|
|
1881
|
+
--icon-button-size-small:var(--size-8);
|
|
1882
|
+
--icon-button-size-x-small:var(--size-6);
|
|
1883
|
+
}
|
|
1884
|
+
|
|
1885
|
+
.bp_icon_button_module_iconButton--3acef[data-modern=true]{
|
|
1886
|
+
--icon-button-radius:var(--bp-radius-10);
|
|
1887
|
+
--icon-button-surface-disabled:var(--bp-surface-cta-surface-icon);
|
|
1888
|
+
--icon-button-gray:var(--bp-gray-50);
|
|
1889
|
+
--icon-button-border:var(--bp-border-02);
|
|
1890
|
+
--icon-button-outline:var(--bp-outline-focus-on-light);
|
|
1891
|
+
--icon-button-surface:var(--bp-surface-cta-surface-icon);
|
|
1892
|
+
--icon-button-icon:var(--bp-icon-cta-icon);
|
|
1893
|
+
--icon-button-surface-hover:var(--bp-surface-cta-surface-icon-hover);
|
|
1894
|
+
--icon-button-icon-hover:var(--bp-icon-cta-icon-hover);
|
|
1895
|
+
--icon-button-surface-pressed:var(--bp-surface-cta-surface-icon-pressed);
|
|
1896
|
+
--icon-button-icon-pressed:var(--bp-icon-cta-icon-pressed);
|
|
1897
|
+
--icon-button-icon-high-contrast:var(--bp-icon-cta-icon-high-contrast);
|
|
1898
|
+
--icon-button-icon-high-contrast-hover:var(--bp-icon-cta-icon-high-contrast-hover);
|
|
1899
|
+
--icon-button-icon-high-contrast-pressed:var(--bp-icon-cta-icon-high-contrast-pressed);
|
|
1900
|
+
--icon-button-surface-utility:var(--bp-surface-cta-surface-icon-utility);
|
|
1901
|
+
--icon-button-icon-utility:var(--bp-icon-cta-icon-utility);
|
|
1902
|
+
--icon-button-surface-utility-hover:var(--bp-surface-cta-surface-icon-utility-hover);
|
|
1903
|
+
--icon-button-icon-utility-hover:var(--bp-icon-cta-icon-utility-hover);
|
|
1904
|
+
--icon-button-surface-utility-pressed:var(--bp-surface-cta-surface-icon-utility-pressed);
|
|
1905
|
+
--icon-button-icon-utility-pressed:var(--bp-icon-cta-icon-utility-pressed);
|
|
1906
|
+
--icon-button-size-large:var(--bp-size-100);
|
|
1907
|
+
--icon-button-size-small:var(--bp-size-080);
|
|
1908
|
+
--icon-button-size-x-small:var(--bp-size-060);
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
.bp_icon_button_module_iconButton--3acef{
|
|
1912
|
+
align-items:center;
|
|
1913
|
+
border-radius:var(--icon-button-radius);
|
|
1914
|
+
border-style:none;
|
|
1915
|
+
cursor:pointer;
|
|
1916
|
+
display:flex;
|
|
1917
|
+
flex-shrink:0;
|
|
1918
|
+
justify-content:center;
|
|
1919
|
+
padding:0;
|
|
1920
|
+
}
|
|
1921
|
+
.bp_icon_button_module_iconButton--3acef[aria-disabled=true]{
|
|
1922
|
+
background:var(--icon-button-surface-disabled);
|
|
1923
|
+
opacity:.3;
|
|
1924
|
+
}
|
|
1925
|
+
.bp_icon_button_module_iconButton--3acef[aria-disabled=true] .bp_icon_button_module_icon--3acef *{
|
|
1926
|
+
fill:var(--icon-button-gray);
|
|
1927
|
+
}
|
|
1928
|
+
.bp_icon_button_module_iconButton--3acef:focus-visible{
|
|
1929
|
+
outline:none;
|
|
1930
|
+
}
|
|
1931
|
+
.bp_icon_button_module_iconButton--3acef[data-focus-visible]{
|
|
1932
|
+
outline:var(--icon-button-border) solid var(--icon-button-outline);
|
|
1933
|
+
}
|
|
1934
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef{
|
|
1935
|
+
background:var(--icon-button-surface);
|
|
1936
|
+
}
|
|
1937
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef .bp_icon_button_module_icon--3acef *{
|
|
1938
|
+
fill:var(--icon-button-icon);
|
|
1939
|
+
}
|
|
1940
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef:hover,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef[data-focus-visible]{
|
|
1941
|
+
background:var(--icon-button-surface-hover);
|
|
1942
|
+
}
|
|
1943
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef:hover .bp_icon_button_module_icon--3acef *,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef[data-focus-visible] .bp_icon_button_module_icon--3acef *{
|
|
1944
|
+
fill:var(--icon-button-icon-hover);
|
|
1945
|
+
}
|
|
1946
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef:active,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef[data-active]{
|
|
1947
|
+
background:var(--icon-button-surface-pressed);
|
|
1948
|
+
}
|
|
1949
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef:active .bp_icon_button_module_icon--3acef *,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef[data-active] .bp_icon_button_module_icon--3acef *{
|
|
1950
|
+
fill:var(--icon-button-icon-pressed);
|
|
1951
|
+
}
|
|
1952
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_icon-logo--3acef{
|
|
1953
|
+
background:var(--icon-button-surface);
|
|
1954
|
+
}
|
|
1955
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_icon-logo--3acef:hover,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_icon-logo--3acef[data-focus-visible]{
|
|
1956
|
+
background:var(--icon-button-surface-hover);
|
|
1957
|
+
}
|
|
1958
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_icon-logo--3acef:active,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_icon-logo--3acef[data-active]{
|
|
1959
|
+
background:var(--icon-button-surface-pressed);
|
|
1960
|
+
}
|
|
1961
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef{
|
|
1962
|
+
background:var(--icon-button-surface);
|
|
1963
|
+
}
|
|
1964
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef .bp_icon_button_module_icon--3acef *{
|
|
1965
|
+
fill:var(--icon-button-icon-high-contrast);
|
|
1966
|
+
}
|
|
1967
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef:hover,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef[data-focus-visible]{
|
|
1968
|
+
background:var(--icon-button-surface-hover);
|
|
1969
|
+
}
|
|
1970
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef:hover .bp_icon_button_module_icon--3acef *,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef[data-focus-visible] .bp_icon_button_module_icon--3acef *{
|
|
1971
|
+
fill:var(--icon-button-icon-high-contrast-hover);
|
|
1972
|
+
}
|
|
1973
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef:active,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef[data-active]{
|
|
1974
|
+
background:var(--icon-button-surface-pressed);
|
|
1975
|
+
}
|
|
1976
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef:active .bp_icon_button_module_icon--3acef *,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef[data-active] .bp_icon_button_module_icon--3acef *{
|
|
1977
|
+
fill:var(--icon-button-icon-high-contrast-pressed);
|
|
1978
|
+
}
|
|
1979
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef{
|
|
1980
|
+
background:var(--icon-button-surface-utility);
|
|
1981
|
+
}
|
|
1982
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef .bp_icon_button_module_icon--3acef *{
|
|
1983
|
+
fill:var(--icon-button-icon-utility);
|
|
1984
|
+
}
|
|
1985
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef:hover,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef[data-focus-visible]{
|
|
1986
|
+
background:var(--icon-button-surface-utility-hover);
|
|
1987
|
+
}
|
|
1988
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef:hover .bp_icon_button_module_icon--3acef *,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef[data-focus-visible] .bp_icon_button_module_icon--3acef *{
|
|
1989
|
+
fill:var(--icon-button-icon-utility-hover);
|
|
1990
|
+
}
|
|
1991
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef:active,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef[data-active]{
|
|
1992
|
+
background:var(--icon-button-surface-utility-pressed);
|
|
1993
|
+
}
|
|
1994
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef:active .bp_icon_button_module_icon--3acef *,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef[data-active] .bp_icon_button_module_icon--3acef *{
|
|
1995
|
+
fill:var(--icon-button-icon-utility-pressed);
|
|
1996
|
+
}
|
|
1997
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_large--3acef{
|
|
1998
|
+
height:var(--icon-button-size-large);
|
|
1999
|
+
width:var(--icon-button-size-large);
|
|
2000
|
+
}
|
|
2001
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small--3acef{
|
|
2002
|
+
height:var(--icon-button-size-small);
|
|
2003
|
+
width:var(--icon-button-size-small);
|
|
2004
|
+
}
|
|
2005
|
+
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_x-small--3acef{
|
|
2006
|
+
height:var(--icon-button-size-x-small);
|
|
2007
|
+
width:var(--icon-button-size-x-small);
|
|
2008
|
+
}
|
|
1859
2009
|
.bp_dropdown_menu_module_content--a649a[data-modern=false]{
|
|
1860
2010
|
--dropdown-menu-radius:var(--radius-3);
|
|
1861
2011
|
--dropdown-menu-padding:var(--space-3);
|
|
@@ -2086,156 +2236,6 @@
|
|
|
2086
2236
|
.bp_dropdown_menu_module_menuCloseButton--a649a{
|
|
2087
2237
|
grid-area:close;
|
|
2088
2238
|
}
|
|
2089
|
-
.bp_icon_button_module_iconButton--3acef[data-modern=false]{
|
|
2090
|
-
--icon-button-radius:var(--radius-2);
|
|
2091
|
-
--icon-button-surface-disabled:var(--surface-cta-surface-icon-disabled);
|
|
2092
|
-
--icon-button-gray:var(--gray-50);
|
|
2093
|
-
--icon-button-border:var(--border-2);
|
|
2094
|
-
--icon-button-outline:var(--outline-focus-on-light);
|
|
2095
|
-
--icon-button-surface:var(--surface-cta-surface-icon);
|
|
2096
|
-
--icon-button-icon:var(--icon-cta-icon);
|
|
2097
|
-
--icon-button-surface-hover:var(--surface-cta-surface-icon-hover);
|
|
2098
|
-
--icon-button-icon-hover:var(--icon-cta-icon-hover);
|
|
2099
|
-
--icon-button-surface-pressed:var(--surface-cta-surface-icon-pressed);
|
|
2100
|
-
--icon-button-icon-pressed:var(--icon-cta-icon-pressed);
|
|
2101
|
-
--icon-button-icon-on-color:var(--icon-cta-icon-on-color);
|
|
2102
|
-
--icon-button-icon-on-color-hover:var(--icon-cta-icon-on-color-hover);
|
|
2103
|
-
--icon-button-icon-on-color-pressed:var(--icon-cta-icon-on-color-pressed);
|
|
2104
|
-
--icon-button-surface-utility:var(--surface-cta-surface-icon-utility);
|
|
2105
|
-
--icon-button-icon-utility:var(--icon-cta-icon-utility);
|
|
2106
|
-
--icon-button-surface-utility-hover:var(--surface-cta-surface-icon-utility-hover);
|
|
2107
|
-
--icon-button-icon-utility-hover:var(--icon-cta-icon-utility-hover);
|
|
2108
|
-
--icon-button-surface-utility-pressed:var(--surface-cta-surface-icon-utility-pressed);
|
|
2109
|
-
--icon-button-icon-utility-pressed:var(--icon-cta-icon-utility-pressed);
|
|
2110
|
-
--icon-button-size-large:var(--size-10);
|
|
2111
|
-
--icon-button-size-small:var(--size-8);
|
|
2112
|
-
--icon-button-size-x-small:var(--size-6);
|
|
2113
|
-
}
|
|
2114
|
-
|
|
2115
|
-
.bp_icon_button_module_iconButton--3acef[data-modern=true]{
|
|
2116
|
-
--icon-button-radius:var(--bp-radius-10);
|
|
2117
|
-
--icon-button-surface-disabled:var(--bp-surface-cta-surface-icon);
|
|
2118
|
-
--icon-button-gray:var(--bp-gray-50);
|
|
2119
|
-
--icon-button-border:var(--bp-border-02);
|
|
2120
|
-
--icon-button-outline:var(--bp-outline-focus-on-light);
|
|
2121
|
-
--icon-button-surface:var(--bp-surface-cta-surface-icon);
|
|
2122
|
-
--icon-button-icon:var(--bp-icon-cta-icon);
|
|
2123
|
-
--icon-button-surface-hover:var(--bp-surface-cta-surface-icon-hover);
|
|
2124
|
-
--icon-button-icon-hover:var(--bp-icon-cta-icon-hover);
|
|
2125
|
-
--icon-button-surface-pressed:var(--bp-surface-cta-surface-icon-pressed);
|
|
2126
|
-
--icon-button-icon-pressed:var(--bp-icon-cta-icon-pressed);
|
|
2127
|
-
--icon-button-icon-high-contrast:var(--bp-icon-cta-icon-high-contrast);
|
|
2128
|
-
--icon-button-icon-high-contrast-hover:var(--bp-icon-cta-icon-high-contrast-hover);
|
|
2129
|
-
--icon-button-icon-high-contrast-pressed:var(--bp-icon-cta-icon-high-contrast-pressed);
|
|
2130
|
-
--icon-button-surface-utility:var(--bp-surface-cta-surface-icon-utility);
|
|
2131
|
-
--icon-button-icon-utility:var(--bp-icon-cta-icon-utility);
|
|
2132
|
-
--icon-button-surface-utility-hover:var(--bp-surface-cta-surface-icon-utility-hover);
|
|
2133
|
-
--icon-button-icon-utility-hover:var(--bp-icon-cta-icon-utility-hover);
|
|
2134
|
-
--icon-button-surface-utility-pressed:var(--bp-surface-cta-surface-icon-utility-pressed);
|
|
2135
|
-
--icon-button-icon-utility-pressed:var(--bp-icon-cta-icon-utility-pressed);
|
|
2136
|
-
--icon-button-size-large:var(--bp-size-100);
|
|
2137
|
-
--icon-button-size-small:var(--bp-size-080);
|
|
2138
|
-
--icon-button-size-x-small:var(--bp-size-060);
|
|
2139
|
-
}
|
|
2140
|
-
|
|
2141
|
-
.bp_icon_button_module_iconButton--3acef{
|
|
2142
|
-
align-items:center;
|
|
2143
|
-
border-radius:var(--icon-button-radius);
|
|
2144
|
-
border-style:none;
|
|
2145
|
-
cursor:pointer;
|
|
2146
|
-
display:flex;
|
|
2147
|
-
flex-shrink:0;
|
|
2148
|
-
justify-content:center;
|
|
2149
|
-
padding:0;
|
|
2150
|
-
}
|
|
2151
|
-
.bp_icon_button_module_iconButton--3acef[aria-disabled=true]{
|
|
2152
|
-
background:var(--icon-button-surface-disabled);
|
|
2153
|
-
opacity:.3;
|
|
2154
|
-
}
|
|
2155
|
-
.bp_icon_button_module_iconButton--3acef[aria-disabled=true] .bp_icon_button_module_icon--3acef *{
|
|
2156
|
-
fill:var(--icon-button-gray);
|
|
2157
|
-
}
|
|
2158
|
-
.bp_icon_button_module_iconButton--3acef:focus-visible{
|
|
2159
|
-
outline:none;
|
|
2160
|
-
}
|
|
2161
|
-
.bp_icon_button_module_iconButton--3acef[data-focus-visible]{
|
|
2162
|
-
outline:var(--icon-button-border) solid var(--icon-button-outline);
|
|
2163
|
-
}
|
|
2164
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef{
|
|
2165
|
-
background:var(--icon-button-surface);
|
|
2166
|
-
}
|
|
2167
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef .bp_icon_button_module_icon--3acef *{
|
|
2168
|
-
fill:var(--icon-button-icon);
|
|
2169
|
-
}
|
|
2170
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef:hover,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef[data-focus-visible]{
|
|
2171
|
-
background:var(--icon-button-surface-hover);
|
|
2172
|
-
}
|
|
2173
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef:hover .bp_icon_button_module_icon--3acef *,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef[data-focus-visible] .bp_icon_button_module_icon--3acef *{
|
|
2174
|
-
fill:var(--icon-button-icon-hover);
|
|
2175
|
-
}
|
|
2176
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef:active,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef[data-active]{
|
|
2177
|
-
background:var(--icon-button-surface-pressed);
|
|
2178
|
-
}
|
|
2179
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef:active .bp_icon_button_module_icon--3acef *,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_default--3acef[data-active] .bp_icon_button_module_icon--3acef *{
|
|
2180
|
-
fill:var(--icon-button-icon-pressed);
|
|
2181
|
-
}
|
|
2182
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_icon-logo--3acef{
|
|
2183
|
-
background:var(--icon-button-surface);
|
|
2184
|
-
}
|
|
2185
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_icon-logo--3acef:hover,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_icon-logo--3acef[data-focus-visible]{
|
|
2186
|
-
background:var(--icon-button-surface-hover);
|
|
2187
|
-
}
|
|
2188
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_icon-logo--3acef:active,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_icon-logo--3acef[data-active]{
|
|
2189
|
-
background:var(--icon-button-surface-pressed);
|
|
2190
|
-
}
|
|
2191
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef{
|
|
2192
|
-
background:var(--icon-button-surface);
|
|
2193
|
-
}
|
|
2194
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef .bp_icon_button_module_icon--3acef *{
|
|
2195
|
-
fill:var(--icon-button-icon-high-contrast);
|
|
2196
|
-
}
|
|
2197
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef:hover,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef[data-focus-visible]{
|
|
2198
|
-
background:var(--icon-button-surface-hover);
|
|
2199
|
-
}
|
|
2200
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef:hover .bp_icon_button_module_icon--3acef *,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef[data-focus-visible] .bp_icon_button_module_icon--3acef *{
|
|
2201
|
-
fill:var(--icon-button-icon-high-contrast-hover);
|
|
2202
|
-
}
|
|
2203
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef:active,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef[data-active]{
|
|
2204
|
-
background:var(--icon-button-surface-pressed);
|
|
2205
|
-
}
|
|
2206
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef:active .bp_icon_button_module_icon--3acef *,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_high-contrast--3acef[data-active] .bp_icon_button_module_icon--3acef *{
|
|
2207
|
-
fill:var(--icon-button-icon-high-contrast-pressed);
|
|
2208
|
-
}
|
|
2209
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef{
|
|
2210
|
-
background:var(--icon-button-surface-utility);
|
|
2211
|
-
}
|
|
2212
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef .bp_icon_button_module_icon--3acef *{
|
|
2213
|
-
fill:var(--icon-button-icon-utility);
|
|
2214
|
-
}
|
|
2215
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef:hover,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef[data-focus-visible]{
|
|
2216
|
-
background:var(--icon-button-surface-utility-hover);
|
|
2217
|
-
}
|
|
2218
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef:hover .bp_icon_button_module_icon--3acef *,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef[data-focus-visible] .bp_icon_button_module_icon--3acef *{
|
|
2219
|
-
fill:var(--icon-button-icon-utility-hover);
|
|
2220
|
-
}
|
|
2221
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef:active,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef[data-active]{
|
|
2222
|
-
background:var(--icon-button-surface-utility-pressed);
|
|
2223
|
-
}
|
|
2224
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef:active .bp_icon_button_module_icon--3acef *,.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small-utility--3acef[data-active] .bp_icon_button_module_icon--3acef *{
|
|
2225
|
-
fill:var(--icon-button-icon-utility-pressed);
|
|
2226
|
-
}
|
|
2227
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_large--3acef{
|
|
2228
|
-
height:var(--icon-button-size-large);
|
|
2229
|
-
width:var(--icon-button-size-large);
|
|
2230
|
-
}
|
|
2231
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_small--3acef{
|
|
2232
|
-
height:var(--icon-button-size-small);
|
|
2233
|
-
width:var(--icon-button-size-small);
|
|
2234
|
-
}
|
|
2235
|
-
.bp_icon_button_module_iconButton--3acef.bp_icon_button_module_x-small--3acef{
|
|
2236
|
-
height:var(--icon-button-size-x-small);
|
|
2237
|
-
width:var(--icon-button-size-x-small);
|
|
2238
|
-
}
|
|
2239
2239
|
.bp_divider_module_divider--2f437{
|
|
2240
2240
|
background-color:var(--border-divider-border);
|
|
2241
2241
|
border:none;
|
|
@@ -2340,6 +2340,52 @@
|
|
|
2340
2340
|
.bp_menu_item_sections_module_menuItemSideContent--1d762.bp_menu_item_sections_module_textOnLightSecondary--1d762{
|
|
2341
2341
|
color:var(--menu-item-text-color);
|
|
2342
2342
|
}
|
|
2343
|
+
.bp_breadcrumb_module_container--ee92d{
|
|
2344
|
+
height:var(--bp-size-060);
|
|
2345
|
+
width:100%;
|
|
2346
|
+
}
|
|
2347
|
+
.bp_breadcrumb_module_container--ee92d .bp_breadcrumb_module_breadcrumb--ee92d{
|
|
2348
|
+
align-items:center;
|
|
2349
|
+
display:flex;
|
|
2350
|
+
flex-wrap:nowrap;
|
|
2351
|
+
gap:var(--bp-size-010);
|
|
2352
|
+
height:100%;
|
|
2353
|
+
list-style:none;
|
|
2354
|
+
margin:0;
|
|
2355
|
+
overflow:hidden;
|
|
2356
|
+
padding:0;
|
|
2357
|
+
}
|
|
2358
|
+
.bp_breadcrumb_module_container--ee92d .bp_breadcrumb_module_pageLink--ee92d{
|
|
2359
|
+
align-items:center;
|
|
2360
|
+
display:flex;
|
|
2361
|
+
flex-shrink:0;
|
|
2362
|
+
gap:var(--bp-size-010);
|
|
2363
|
+
white-space:nowrap;
|
|
2364
|
+
}
|
|
2365
|
+
|
|
2366
|
+
.bp_breadcrumb_module_linkWithHover--ee92d{
|
|
2367
|
+
cursor:pointer;
|
|
2368
|
+
position:relative;
|
|
2369
|
+
}
|
|
2370
|
+
.bp_breadcrumb_module_linkWithHover--ee92d::after{
|
|
2371
|
+
background-color:var(--bp-text-text-on-light-secondary);
|
|
2372
|
+
bottom:0;
|
|
2373
|
+
content:"";
|
|
2374
|
+
height:1px;
|
|
2375
|
+
left:0;
|
|
2376
|
+
position:absolute;
|
|
2377
|
+
transform:scaleX(0);
|
|
2378
|
+
transform-origin:center;
|
|
2379
|
+
transition:transform var(--animation-duration-2) var(--animation-easing-ease-base);
|
|
2380
|
+
width:100%;
|
|
2381
|
+
}
|
|
2382
|
+
.bp_breadcrumb_module_linkWithHover--ee92d:hover::after{
|
|
2383
|
+
transform:scaleX(1);
|
|
2384
|
+
}
|
|
2385
|
+
|
|
2386
|
+
.bp_breadcrumb_module_dropdownContent--ee92d{
|
|
2387
|
+
--blueprint-web-dropdown-menu-max-height:calc(var(--bp-size-300)*2);
|
|
2388
|
+
}
|
|
2343
2389
|
.bp_link_module_link--f81f2{
|
|
2344
2390
|
color:var(--text-cta-link);
|
|
2345
2391
|
}
|
|
@@ -2404,47 +2450,6 @@
|
|
|
2404
2450
|
text-decoration-thickness:auto;
|
|
2405
2451
|
text-underline-offset:auto;
|
|
2406
2452
|
}
|
|
2407
|
-
.bp_breadcrumb_module_container--bac4c{
|
|
2408
|
-
height:var(--bp-size-060);
|
|
2409
|
-
width:100%;
|
|
2410
|
-
}
|
|
2411
|
-
.bp_breadcrumb_module_container--bac4c .bp_breadcrumb_module_breadcrumb--bac4c{
|
|
2412
|
-
align-items:center;
|
|
2413
|
-
display:flex;
|
|
2414
|
-
flex-wrap:nowrap;
|
|
2415
|
-
gap:var(--bp-size-010);
|
|
2416
|
-
height:100%;
|
|
2417
|
-
list-style:none;
|
|
2418
|
-
margin:0;
|
|
2419
|
-
overflow:hidden;
|
|
2420
|
-
padding:0;
|
|
2421
|
-
}
|
|
2422
|
-
.bp_breadcrumb_module_container--bac4c .bp_breadcrumb_module_pageLink--bac4c{
|
|
2423
|
-
align-items:center;
|
|
2424
|
-
display:flex;
|
|
2425
|
-
flex-shrink:0;
|
|
2426
|
-
gap:var(--bp-size-010);
|
|
2427
|
-
white-space:nowrap;
|
|
2428
|
-
}
|
|
2429
|
-
|
|
2430
|
-
.bp_breadcrumb_module_linkWithHover--bac4c{
|
|
2431
|
-
position:relative;
|
|
2432
|
-
}
|
|
2433
|
-
.bp_breadcrumb_module_linkWithHover--bac4c::after{
|
|
2434
|
-
background-color:var(--bp-text-text-on-light-secondary);
|
|
2435
|
-
bottom:0;
|
|
2436
|
-
content:"";
|
|
2437
|
-
height:1px;
|
|
2438
|
-
left:0;
|
|
2439
|
-
position:absolute;
|
|
2440
|
-
transform:scaleX(0);
|
|
2441
|
-
transform-origin:center;
|
|
2442
|
-
transition:transform var(--animation-duration-2) var(--animation-easing-ease-base);
|
|
2443
|
-
width:100%;
|
|
2444
|
-
}
|
|
2445
|
-
.bp_breadcrumb_module_linkWithHover--bac4c:hover::after{
|
|
2446
|
-
transform:scaleX(1);
|
|
2447
|
-
}
|
|
2448
2453
|
.bp_button_wrapper_module_buttonWrapper--b0897{
|
|
2449
2454
|
all:unset;
|
|
2450
2455
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { forwardRef, useCallback, createElement } from 'react';
|
|
4
|
+
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
4
5
|
import { useBaseButtonContext } from './base-button-context.js';
|
|
5
6
|
import styles from './base-button.module.js';
|
|
6
7
|
import { buttonVariantToIconColorMap, getIconSize } from './utils.js';
|
|
@@ -17,6 +18,9 @@ const BaseButtonIcon = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
17
18
|
buttonType,
|
|
18
19
|
ariaLabel
|
|
19
20
|
} = useBaseButtonContext();
|
|
21
|
+
const {
|
|
22
|
+
enableModernizedComponents
|
|
23
|
+
} = useBlueprintModernization();
|
|
20
24
|
const isIconOnly = buttonType === 'icon-only';
|
|
21
25
|
const renderIcon = useCallback(() => {
|
|
22
26
|
if (!icon) {
|
|
@@ -28,12 +32,12 @@ const BaseButtonIcon = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
28
32
|
return null;
|
|
29
33
|
}
|
|
30
34
|
return /*#__PURE__*/createElement(icon, {
|
|
31
|
-
...getIconSize(size, isIconOnly),
|
|
35
|
+
...getIconSize(size, isIconOnly, enableModernizedComponents),
|
|
32
36
|
color: loading ? 'transparent' : buttonVariantToIconColorMap[variant],
|
|
33
37
|
role: 'presentation',
|
|
34
38
|
...iconProps
|
|
35
39
|
});
|
|
36
|
-
}, [icon, isIconOnly, ariaLabel, size, loading, variant, iconProps]);
|
|
40
|
+
}, [icon, isIconOnly, ariaLabel, size, loading, variant, iconProps, enableModernizedComponents]);
|
|
37
41
|
return jsx("span", {
|
|
38
42
|
ref: forwardedRef,
|
|
39
43
|
className: clsx(styles.icon, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IconIconOnLight, TextCtaLink, IconIconOnDark, bpSize050, bpSize040,
|
|
1
|
+
import { IconIconOnLight, TextCtaLink, IconIconOnDark, bpSize050, bpSize040, Size5, Size4, Size3 } from '@box/blueprint-web-assets/tokens/tokens';
|
|
2
2
|
|
|
3
3
|
const getIconSize = (buttonSize, isIconButton, enableModernizedComponents = false) => {
|
|
4
4
|
const isLarge = buttonSize === 'large';
|
|
@@ -6,7 +6,7 @@ const getIconSize = (buttonSize, isIconButton, enableModernizedComponents = fals
|
|
|
6
6
|
if (enableModernizedComponents && isIconButton) {
|
|
7
7
|
size = isLarge ? bpSize050 : bpSize040;
|
|
8
8
|
} else if (enableModernizedComponents && !isIconButton) {
|
|
9
|
-
size = isLarge ?
|
|
9
|
+
size = isLarge ? bpSize050 : bpSize040;
|
|
10
10
|
} else if (!enableModernizedComponents && isIconButton) {
|
|
11
11
|
size = isLarge ? Size5 : Size4;
|
|
12
12
|
} else {
|
|
@@ -75,7 +75,7 @@ const Root = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
75
75
|
onValueChange,
|
|
76
76
|
onOpenChange: handleOnChange
|
|
77
77
|
};
|
|
78
|
-
const Label = useLabelable(label, selectId);
|
|
78
|
+
const Label = useLabelable(label, selectId, required);
|
|
79
79
|
const inlineErrorId = useUniqueId('inline-error-');
|
|
80
80
|
const ariaDescribedBy = clsx(triggerProps['aria-describedby'], {
|
|
81
81
|
[inlineErrorId]: hasError
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/blueprint-web",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.111.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"publishConfig": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@ariakit/react": "0.4.15",
|
|
49
49
|
"@ariakit/react-core": "0.4.15",
|
|
50
|
-
"@box/blueprint-web-assets": "^4.
|
|
50
|
+
"@box/blueprint-web-assets": "^4.90.0",
|
|
51
51
|
"@internationalized/date": "^3.7.0",
|
|
52
52
|
"@radix-ui/react-accordion": "1.1.2",
|
|
53
53
|
"@radix-ui/react-checkbox": "1.0.4",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"type-fest": "^3.2.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@box/storybook-utils": "^0.14.
|
|
80
|
+
"@box/storybook-utils": "^0.14.42",
|
|
81
81
|
"@types/react": "^18.0.0",
|
|
82
82
|
"@types/react-dom": "^18.0.0",
|
|
83
83
|
"react": "^18.3.0",
|