@box/blueprint-web 12.62.0 → 12.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib-esm/index.css +126 -48
- package/dist/lib-esm/primitives/context-menu/context-menu-menu-content.js +6 -0
- package/dist/lib-esm/primitives/context-menu/context-menu-menu-header.js +5 -0
- package/dist/lib-esm/primitives/context-menu/context-menu-sub-menu-content.js +6 -0
- package/dist/lib-esm/primitives/context-menu/context-menu.module.js +1 -1
- package/dist/lib-esm/util-components/menu-item-sections/menu-item-sections.js +24 -13
- package/dist/lib-esm/util-components/menu-item-sections/menu-item-sections.module.js +1 -1
- package/package.json +1 -1
package/dist/lib-esm/index.css
CHANGED
|
@@ -4232,12 +4232,28 @@
|
|
|
4232
4232
|
height:var(--border-1);
|
|
4233
4233
|
margin-block:0;
|
|
4234
4234
|
}
|
|
4235
|
-
.bp_menu_item_sections_module_menuItemMainContent--
|
|
4235
|
+
.bp_menu_item_sections_module_menuItemMainContent--d8163[data-modern=false]{
|
|
4236
|
+
--menu-item-text-color:var(--text-text-on-light);
|
|
4237
|
+
}
|
|
4238
|
+
|
|
4239
|
+
.bp_menu_item_sections_module_menuItemMainContent--d8163[data-modern=true]{
|
|
4240
|
+
--menu-item-text-color:var(--bp-text-text-on-light);
|
|
4241
|
+
}
|
|
4242
|
+
|
|
4243
|
+
.bp_menu_item_sections_module_menuItemSideContent--d8163[data-modern=false]{
|
|
4244
|
+
--menu-item-text-color:var(--text-text-on-light-secondary);
|
|
4245
|
+
}
|
|
4246
|
+
|
|
4247
|
+
.bp_menu_item_sections_module_menuItemSideContent--d8163[data-modern=true]{
|
|
4248
|
+
--menu-item-text-color:var(--bp-text-text-on-light-secondary);
|
|
4249
|
+
}
|
|
4250
|
+
|
|
4251
|
+
.bp_menu_item_sections_module_menuItemMainContent--d8163{
|
|
4236
4252
|
display:flex;
|
|
4237
4253
|
flex:1;
|
|
4238
4254
|
flex-direction:column;
|
|
4239
4255
|
}
|
|
4240
|
-
.bp_menu_item_sections_module_menuItemMainContent--
|
|
4256
|
+
.bp_menu_item_sections_module_menuItemMainContent--d8163 .bp_menu_item_sections_module_label--d8163{
|
|
4241
4257
|
font-family:var(--body-default-font-family);
|
|
4242
4258
|
font-size:var(--body-default-font-size);
|
|
4243
4259
|
font-weight:var(--body-default-font-weight);
|
|
@@ -4247,7 +4263,7 @@
|
|
|
4247
4263
|
text-decoration:var(--body-default-text-decoration);
|
|
4248
4264
|
text-transform:var(--body-default-text-case);
|
|
4249
4265
|
}
|
|
4250
|
-
.bp_menu_item_sections_module_menuItemMainContent--
|
|
4266
|
+
.bp_menu_item_sections_module_menuItemMainContent--d8163 .bp_menu_item_sections_module_label--d8163.bp_menu_item_sections_module_bold--d8163{
|
|
4251
4267
|
font-family:var(--body-default-bold-font-family);
|
|
4252
4268
|
font-size:var(--body-default-bold-font-size);
|
|
4253
4269
|
font-weight:var(--body-default-bold-font-weight);
|
|
@@ -4257,11 +4273,11 @@
|
|
|
4257
4273
|
text-decoration:var(--body-default-bold-text-decoration);
|
|
4258
4274
|
text-transform:var(--body-default-bold-text-case);
|
|
4259
4275
|
}
|
|
4260
|
-
.bp_menu_item_sections_module_menuItemMainContent--
|
|
4261
|
-
color:var(--
|
|
4276
|
+
.bp_menu_item_sections_module_menuItemMainContent--d8163 .bp_menu_item_sections_module_description--d8163{
|
|
4277
|
+
color:var(--menu-item-text-color);
|
|
4262
4278
|
}
|
|
4263
4279
|
|
|
4264
|
-
.bp_menu_item_sections_module_menuItemMainContent--
|
|
4280
|
+
.bp_menu_item_sections_module_menuItemMainContent--d8163 .bp_menu_item_sections_module_description--d8163,.bp_menu_item_sections_module_menuItemSideContent--d8163{
|
|
4265
4281
|
font-family:var(--body-default-font-family);
|
|
4266
4282
|
font-size:var(--body-default-font-size);
|
|
4267
4283
|
font-weight:var(--body-default-font-weight);
|
|
@@ -4272,12 +4288,12 @@
|
|
|
4272
4288
|
text-transform:var(--body-default-text-case);
|
|
4273
4289
|
}
|
|
4274
4290
|
|
|
4275
|
-
.bp_menu_item_sections_module_menuItemSideContent--
|
|
4291
|
+
.bp_menu_item_sections_module_menuItemSideContent--d8163{
|
|
4276
4292
|
align-items:center;
|
|
4277
4293
|
display:flex;
|
|
4278
4294
|
}
|
|
4279
|
-
.bp_menu_item_sections_module_menuItemSideContent--
|
|
4280
|
-
color:var(--
|
|
4295
|
+
.bp_menu_item_sections_module_menuItemSideContent--d8163.bp_menu_item_sections_module_textOnLightSecondary--d8163{
|
|
4296
|
+
color:var(--menu-item-text-color);
|
|
4281
4297
|
}
|
|
4282
4298
|
|
|
4283
4299
|
.bp_sticky_cell_module_stickyCell--98a29{
|
|
@@ -6963,18 +6979,81 @@ table.bp_inline_table_module_inlineTable--14908[data-modern=true] td:last-child,
|
|
|
6963
6979
|
}
|
|
6964
6980
|
}
|
|
6965
6981
|
|
|
6966
|
-
.bp_context_menu_module_menuBlock--
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6982
|
+
.bp_context_menu_module_menuBlock--e8e64[data-modern=false]{
|
|
6983
|
+
--context-menu-block-min-width:var(--blueprint-web-context-menu-min-width, 160px);
|
|
6984
|
+
--context-menu-block-max-width:var(--blueprint-web-context-menu-max-width);
|
|
6985
|
+
--context-menu-block-max-height:var(
|
|
6986
|
+
--blueprint-web-context-menu-max-height,
|
|
6987
|
+
var(--radix-context-menu-content-available-height)
|
|
6988
|
+
);
|
|
6989
|
+
--context-menu-block-padding:var(--space-3);
|
|
6990
|
+
--context-menu-block-background-color:var(--surface-menu-surface);
|
|
6991
|
+
--context-menu-block-backdrop-filter:none;
|
|
6992
|
+
--context-menu-block-radius:var(--radius-3);
|
|
6993
|
+
--context-menu-block-border:var(--border-1) solid var(--border-card-border);
|
|
6994
|
+
--context-menu-block-shadow:var(--dropshadow-3);
|
|
6995
|
+
--context-menu-item-gap:var(--space-4);
|
|
6996
|
+
--context-menu-background-color:var(--surface-menu-surface);
|
|
6997
|
+
--context-menu-fullscreen-content-padding:var(--space-3);
|
|
6998
|
+
--context-menu-item-radius:var(--radius-3);
|
|
6999
|
+
--context-menu-item-border:var(--border-2) solid #0000;
|
|
7000
|
+
--context-menu-item-background-color-hover:var(--surface-menu-surface-focus);
|
|
7001
|
+
--context-menu-item-background-color-pressed:var(--surface-menu-surface-focus);
|
|
7002
|
+
--context-menu-item-focus-border:var(--border-2) solid var(--outline-focus-on-light);
|
|
7003
|
+
--context-menu-item-padding:var(--space-2);
|
|
7004
|
+
--context-menu-items-separator-margin:var(--space-2);
|
|
7005
|
+
}
|
|
7006
|
+
|
|
7007
|
+
.bp_context_menu_module_menuBlock--e8e64[data-modern=true]{
|
|
7008
|
+
--context-menu-block-min-width:var(--blueprint-web-context-menu-min-width, 160px);
|
|
7009
|
+
--context-menu-block-max-width:var(--blueprint-web-context-menu-max-width);
|
|
7010
|
+
--context-menu-block-max-height:var(
|
|
7011
|
+
--blueprint-web-context-menu-max-height,
|
|
7012
|
+
var(--radix-context-menu-content-available-height)
|
|
7013
|
+
);
|
|
7014
|
+
--context-menu-block-padding:var(--bp-space-030);
|
|
7015
|
+
--context-menu-block-background-color:var(--bp-surface-menu-surface-dropdown);
|
|
7016
|
+
--context-menu-block-backdrop-filter:blur(16px);
|
|
7017
|
+
--context-menu-block-radius:var(--bp-radius-10);
|
|
7018
|
+
--context-menu-block-border:var(--bp-border-01) solid var(--bp-border-menu-border);
|
|
7019
|
+
--context-menu-block-shadow:var(--dropshadow-2);
|
|
7020
|
+
--context-menu-item-gap:var(--bp-space-030);
|
|
7021
|
+
--context-menu-background-color:#0000;
|
|
7022
|
+
--context-menu-fullscreen-content-padding:var(--bp-space-030);
|
|
7023
|
+
--context-menu-item-radius:var(--bp-radius-06);
|
|
7024
|
+
--context-menu-item-border:var(--bp-border-02) solid #0000;
|
|
7025
|
+
--context-menu-item-background-color-hover:var(--bp-surface-menu-item-surface-hover);
|
|
7026
|
+
--context-menu-item-background-color-pressed:var(--bp-surface-menu-item-surface-pressed);
|
|
7027
|
+
--context-menu-item-focus-border:var(--bp-border-02) solid var(--bp-outline-focus-on-light);
|
|
7028
|
+
--context-menu-item-padding:var(--bp-space-020);
|
|
7029
|
+
--context-menu-items-separator-margin:var(--bp-space-020);
|
|
7030
|
+
}
|
|
7031
|
+
|
|
7032
|
+
.bp_context_menu_module_menuHeader--e8e64[data-modern=false]{
|
|
7033
|
+
--context-menu-header-padding:var(--space-3);
|
|
7034
|
+
--context-menu-header-gap:var(--space-2);
|
|
7035
|
+
--context-menu-header-shadow:var(--dropshadow-1);
|
|
7036
|
+
}
|
|
7037
|
+
|
|
7038
|
+
.bp_context_menu_module_menuHeader--e8e64[data-modern=true]{
|
|
7039
|
+
--context-menu-header-padding:var(--bp-space-030) var(--bp-space-040);
|
|
7040
|
+
--context-menu-header-gap:var(--bp-space-030);
|
|
7041
|
+
--context-menu-header-shadow:var(--dropshadow-1);
|
|
7042
|
+
}
|
|
7043
|
+
|
|
7044
|
+
.bp_context_menu_module_menuBlock--e8e64{
|
|
7045
|
+
backdrop-filter:var(--context-menu-block-backdrop-filter);
|
|
7046
|
+
background-color:var(--context-menu-block-background-color);
|
|
7047
|
+
border:var(--context-menu-block-border);
|
|
7048
|
+
border-radius:var(--context-menu-block-radius);
|
|
7049
|
+
box-shadow:var(--context-menu-block-shadow);
|
|
6971
7050
|
box-sizing:border-box;
|
|
6972
|
-
max-height:var(--
|
|
6973
|
-
max-width:var(--
|
|
6974
|
-
min-width:var(--
|
|
6975
|
-
padding:var(--
|
|
7051
|
+
max-height:var(--context-menu-block-max-height);
|
|
7052
|
+
max-width:var(--context-menu-block-max-width);
|
|
7053
|
+
min-width:var(--context-menu-block-min-width);
|
|
7054
|
+
padding:var(--context-menu-block-padding);
|
|
6976
7055
|
}
|
|
6977
|
-
.bp_context_menu_module_menuBlock--
|
|
7056
|
+
.bp_context_menu_module_menuBlock--e8e64[data-menu-fullscreen=true]{
|
|
6978
7057
|
border:unset;
|
|
6979
7058
|
border-radius:unset;
|
|
6980
7059
|
display:flex;
|
|
@@ -6987,41 +7066,40 @@ table.bp_inline_table_module_inlineTable--14908[data-modern=true] td:last-child,
|
|
|
6987
7066
|
position:relative;
|
|
6988
7067
|
width:100vw;
|
|
6989
7068
|
}
|
|
6990
|
-
.bp_context_menu_module_menuBlock--
|
|
7069
|
+
.bp_context_menu_module_menuBlock--e8e64[data-menu-fullscreen=true] .bp_context_menu_module_fullScreenContent--e8e64{
|
|
6991
7070
|
overflow-y:auto;
|
|
6992
|
-
padding:var(--
|
|
7071
|
+
padding:var(--context-menu-fullscreen-content-padding);
|
|
6993
7072
|
}
|
|
6994
|
-
.bp_context_menu_module_menuBlock--
|
|
6995
|
-
margin
|
|
6996
|
-
margin-inline:var(--space-2);
|
|
7073
|
+
.bp_context_menu_module_menuBlock--e8e64 .bp_context_menu_module_menuItemsSeparator--e8e64{
|
|
7074
|
+
margin:var(--context-menu-items-separator-margin);
|
|
6997
7075
|
}
|
|
6998
|
-
.bp_context_menu_module_menuBlock--
|
|
7076
|
+
.bp_context_menu_module_menuBlock--e8e64 .bp_context_menu_module_menuItem--e8e64{
|
|
6999
7077
|
align-items:center;
|
|
7000
|
-
background-color:var(--
|
|
7001
|
-
border:var(--border
|
|
7002
|
-
border-radius:var(--radius
|
|
7078
|
+
background-color:var(--context-menu-background-color);
|
|
7079
|
+
border:var(--context-menu-item-border);
|
|
7080
|
+
border-radius:var(--context-menu-item-radius);
|
|
7003
7081
|
cursor:pointer;
|
|
7004
7082
|
display:flex;
|
|
7005
|
-
gap:var(--
|
|
7083
|
+
gap:var(--context-menu-item-gap);
|
|
7006
7084
|
outline:none;
|
|
7007
|
-
padding-block:var(--
|
|
7008
|
-
padding-inline:var(--
|
|
7085
|
+
padding-block:var(--context-menu-item-padding);
|
|
7086
|
+
padding-inline:var(--context-menu-item-padding);
|
|
7009
7087
|
position:relative;
|
|
7010
7088
|
}
|
|
7011
|
-
.bp_context_menu_module_menuBlock--
|
|
7089
|
+
.bp_context_menu_module_menuBlock--e8e64 .bp_context_menu_module_menuItem--e8e64[data-disabled]{
|
|
7012
7090
|
opacity:60%;
|
|
7013
7091
|
pointer-events:none;
|
|
7014
7092
|
}
|
|
7015
|
-
.bp_context_menu_module_menuBlock--
|
|
7016
|
-
background-color:var(--
|
|
7017
|
-
border:var(--
|
|
7093
|
+
.bp_context_menu_module_menuBlock--e8e64 .bp_context_menu_module_menuItem--e8e64[data-highlighted]:not(:hover){
|
|
7094
|
+
background-color:var(--context-menu-item-background-color-hover);
|
|
7095
|
+
border:var(--context-menu-item-focus-border);
|
|
7018
7096
|
}
|
|
7019
|
-
.bp_context_menu_module_menuBlock--
|
|
7020
|
-
background-color:var(--
|
|
7021
|
-
border:var(--border
|
|
7097
|
+
.bp_context_menu_module_menuBlock--e8e64 .bp_context_menu_module_menuItem--e8e64:active{
|
|
7098
|
+
background-color:var(--context-menu-item-background-color-pressed);
|
|
7099
|
+
border:var(--context-menu-item-border);
|
|
7022
7100
|
}
|
|
7023
|
-
.bp_context_menu_module_menuBlock--
|
|
7024
|
-
background-color:var(--
|
|
7101
|
+
.bp_context_menu_module_menuBlock--e8e64 .bp_context_menu_module_menuItem--e8e64:hover{
|
|
7102
|
+
background-color:var(--context-menu-item-background-color-hover);
|
|
7025
7103
|
}
|
|
7026
7104
|
div[data-radix-popper-content-wrapper]:has([role=menu]):has([data-state=open]):has([data-menu-fullscreen=true]){
|
|
7027
7105
|
height:100%;
|
|
@@ -7029,29 +7107,29 @@ div[data-radix-popper-content-wrapper]:has([role=menu]):has([data-state=open]):h
|
|
|
7029
7107
|
width:100%;
|
|
7030
7108
|
}
|
|
7031
7109
|
|
|
7032
|
-
.bp_context_menu_module_menuHeader--
|
|
7110
|
+
.bp_context_menu_module_menuHeader--e8e64{
|
|
7033
7111
|
align-items:center;
|
|
7034
|
-
box-shadow:var(--
|
|
7112
|
+
box-shadow:var(--context-menu-header-shadow);
|
|
7035
7113
|
display:grid;
|
|
7036
|
-
gap:var(--
|
|
7114
|
+
gap:var(--context-menu-header-gap);
|
|
7037
7115
|
grid-template-areas:"submenu-close content close";
|
|
7038
7116
|
grid-template-columns:auto minmax(0, 1fr) auto;
|
|
7039
|
-
padding:var(--
|
|
7117
|
+
padding:var(--context-menu-header-padding);
|
|
7040
7118
|
}
|
|
7041
7119
|
|
|
7042
|
-
.bp_context_menu_module_headerTextContent--
|
|
7120
|
+
.bp_context_menu_module_headerTextContent--e8e64{
|
|
7043
7121
|
display:grid;
|
|
7044
7122
|
}
|
|
7045
7123
|
|
|
7046
|
-
.bp_context_menu_module_submenuCloseButton--
|
|
7124
|
+
.bp_context_menu_module_submenuCloseButton--e8e64{
|
|
7047
7125
|
grid-area:submenu-close;
|
|
7048
7126
|
}
|
|
7049
7127
|
|
|
7050
|
-
.bp_context_menu_module_menuCloseButton--
|
|
7128
|
+
.bp_context_menu_module_menuCloseButton--e8e64{
|
|
7051
7129
|
grid-area:close;
|
|
7052
7130
|
}
|
|
7053
7131
|
|
|
7054
|
-
.bp_context_menu_module_ellipsis--
|
|
7132
|
+
.bp_context_menu_module_ellipsis--e8e64{
|
|
7055
7133
|
overflow:hidden;
|
|
7056
7134
|
text-overflow:ellipsis;
|
|
7057
7135
|
white-space:nowrap;
|
|
@@ -2,6 +2,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as ContextMenuPrimitve from '@radix-ui/react-context-menu';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { forwardRef, Children, isValidElement } from 'react';
|
|
5
|
+
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
5
6
|
import { useFullScreenContextMenu } from '../menu-utils/responsiveness/FullScreenContextMenuContext.js';
|
|
6
7
|
import { ContextMenuHeader } from './context-menu-menu-header.js';
|
|
7
8
|
import styles from './context-menu.module.js';
|
|
@@ -32,6 +33,9 @@ const ContextMenuMenuContent = /*#__PURE__*/forwardRef((props, forwardedRef) =>
|
|
|
32
33
|
className,
|
|
33
34
|
...rest
|
|
34
35
|
} = props;
|
|
36
|
+
const {
|
|
37
|
+
enableModernizedComponents
|
|
38
|
+
} = useBlueprintModernization();
|
|
35
39
|
const {
|
|
36
40
|
isMenuFullScreenEnabled
|
|
37
41
|
} = useFullScreenContextMenu();
|
|
@@ -47,6 +51,7 @@ const ContextMenuMenuContent = /*#__PURE__*/forwardRef((props, forwardedRef) =>
|
|
|
47
51
|
ref: forwardedRef,
|
|
48
52
|
className: clsx(styles.menuBlock, className),
|
|
49
53
|
"data-menu-fullscreen": true,
|
|
54
|
+
"data-modern": enableModernizedComponents,
|
|
50
55
|
children: [Header, jsx("div", {
|
|
51
56
|
className: styles.fullScreenContent,
|
|
52
57
|
children: OtherChildren
|
|
@@ -60,6 +65,7 @@ const ContextMenuMenuContent = /*#__PURE__*/forwardRef((props, forwardedRef) =>
|
|
|
60
65
|
...rest,
|
|
61
66
|
ref: forwardedRef,
|
|
62
67
|
className: clsx(styles.menuBlock, className),
|
|
68
|
+
"data-modern": enableModernizedComponents,
|
|
63
69
|
children: children
|
|
64
70
|
})
|
|
65
71
|
});
|
|
@@ -2,6 +2,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import { XMark, PointerChevronLeft } from '@box/blueprint-web-assets/icons/Fill';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { forwardRef, useCallback } from 'react';
|
|
5
|
+
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
5
6
|
import { Text } from '../../text/text.js';
|
|
6
7
|
import { composeEventHandlers } from '../../utils/composeEventHandlers.js';
|
|
7
8
|
import { IconButton } from '../icon-button/icon-button.js';
|
|
@@ -55,9 +56,13 @@ const MenuHeaderPrimitive = ({
|
|
|
55
56
|
className,
|
|
56
57
|
...rest
|
|
57
58
|
}) => {
|
|
59
|
+
const {
|
|
60
|
+
enableModernizedComponents
|
|
61
|
+
} = useBlueprintModernization();
|
|
58
62
|
return jsx("div", {
|
|
59
63
|
...rest,
|
|
60
64
|
className: clsx(styles.menuHeader, className),
|
|
65
|
+
"data-modern": enableModernizedComponents,
|
|
61
66
|
role: "presentation",
|
|
62
67
|
children: children
|
|
63
68
|
});
|
|
@@ -2,6 +2,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as ContextMenuPrimitve from '@radix-ui/react-context-menu';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { forwardRef, useCallback } from 'react';
|
|
5
|
+
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
5
6
|
import { useFullScreenContextMenu } from '../menu-utils/responsiveness/FullScreenContextMenuContext.js';
|
|
6
7
|
import { sortMenuChildren } from './context-menu-menu-content.js';
|
|
7
8
|
import styles from './context-menu.module.js';
|
|
@@ -19,6 +20,9 @@ const ContextMenuSubMenuContent = /*#__PURE__*/forwardRef((props, forwardedRef)
|
|
|
19
20
|
className,
|
|
20
21
|
...rest
|
|
21
22
|
} = props;
|
|
23
|
+
const {
|
|
24
|
+
enableModernizedComponents
|
|
25
|
+
} = useBlueprintModernization();
|
|
22
26
|
const {
|
|
23
27
|
isMenuFullScreenEnabled
|
|
24
28
|
} = useFullScreenContextMenu();
|
|
@@ -36,6 +40,7 @@ const ContextMenuSubMenuContent = /*#__PURE__*/forwardRef((props, forwardedRef)
|
|
|
36
40
|
alignOffset: alignOffsetPx,
|
|
37
41
|
className: clsx(styles.menuBlock, className),
|
|
38
42
|
"data-menu-fullscreen": true,
|
|
43
|
+
"data-modern": enableModernizedComponents,
|
|
39
44
|
// Prevents submenu from closing, when detects focus outside submenu in fullscreen mode,
|
|
40
45
|
// while mouse is moving over submenu.
|
|
41
46
|
onFocusOutside: preventDefault,
|
|
@@ -54,6 +59,7 @@ const ContextMenuSubMenuContent = /*#__PURE__*/forwardRef((props, forwardedRef)
|
|
|
54
59
|
ref: forwardedRef,
|
|
55
60
|
alignOffset: alignOffsetPx,
|
|
56
61
|
className: clsx(styles.menuBlock, className),
|
|
62
|
+
"data-modern": enableModernizedComponents,
|
|
57
63
|
sideOffset: sideOffsetPx,
|
|
58
64
|
children: children
|
|
59
65
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../index.css';
|
|
2
|
-
var styles = {"menuBlock":"bp_context_menu_module_menuBlock--
|
|
2
|
+
var styles = {"menuBlock":"bp_context_menu_module_menuBlock--e8e64","menuHeader":"bp_context_menu_module_menuHeader--e8e64","fullScreenContent":"bp_context_menu_module_fullScreenContent--e8e64","menuItemsSeparator":"bp_context_menu_module_menuItemsSeparator--e8e64","menuItem":"bp_context_menu_module_menuItem--e8e64","headerTextContent":"bp_context_menu_module_headerTextContent--e8e64","submenuCloseButton":"bp_context_menu_module_submenuCloseButton--e8e64","menuCloseButton":"bp_context_menu_module_menuCloseButton--e8e64","ellipsis":"bp_context_menu_module_ellipsis--e8e64"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
+
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
3
4
|
import styles from './menu-item-sections.module.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -10,11 +11,15 @@ const MenuItemSideContent = ({
|
|
|
10
11
|
className,
|
|
11
12
|
...rest
|
|
12
13
|
}) => {
|
|
14
|
+
const {
|
|
15
|
+
enableModernizedComponents
|
|
16
|
+
} = useBlueprintModernization();
|
|
13
17
|
return jsx("div", {
|
|
14
18
|
...rest,
|
|
15
19
|
className: clsx(styles.menuItemSideContent, {
|
|
16
20
|
[styles.textOnLightSecondary]: typeof children === 'string'
|
|
17
21
|
}, className),
|
|
22
|
+
"data-modern": enableModernizedComponents,
|
|
18
23
|
children: children
|
|
19
24
|
});
|
|
20
25
|
};
|
|
@@ -26,18 +31,24 @@ const MenuItemMainContent = ({
|
|
|
26
31
|
label,
|
|
27
32
|
description,
|
|
28
33
|
...rest
|
|
29
|
-
}) =>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
}) => {
|
|
35
|
+
const {
|
|
36
|
+
enableModernizedComponents
|
|
37
|
+
} = useBlueprintModernization();
|
|
38
|
+
return jsxs("div", {
|
|
39
|
+
...rest,
|
|
40
|
+
className: clsx(styles.menuItemMainContent, className),
|
|
41
|
+
"data-modern": enableModernizedComponents,
|
|
42
|
+
children: [jsx("span", {
|
|
43
|
+
className: clsx(styles.label, {
|
|
44
|
+
[styles.bold]: Boolean(description)
|
|
45
|
+
}),
|
|
46
|
+
children: label
|
|
47
|
+
}), description ? jsx("span", {
|
|
48
|
+
className: styles.description,
|
|
49
|
+
children: description
|
|
50
|
+
}) : null]
|
|
51
|
+
});
|
|
52
|
+
};
|
|
42
53
|
|
|
43
54
|
export { MenuItemMainContent, MenuItemSideContent };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../index.css';
|
|
2
|
-
var styles = {"menuItemMainContent":"bp_menu_item_sections_module_menuItemMainContent--
|
|
2
|
+
var styles = {"menuItemMainContent":"bp_menu_item_sections_module_menuItemMainContent--d8163","menuItemSideContent":"bp_menu_item_sections_module_menuItemSideContent--d8163","label":"bp_menu_item_sections_module_label--d8163","bold":"bp_menu_item_sections_module_bold--d8163","description":"bp_menu_item_sections_module_description--d8163","textOnLightSecondary":"bp_menu_item_sections_module_textOnLightSecondary--d8163"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|