@box/blueprint-web 12.31.0 → 12.32.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
CHANGED
|
@@ -7115,52 +7115,76 @@ div[data-radix-popper-content-wrapper]:has([role=menu]):has([data-state=open]):h
|
|
|
7115
7115
|
width:-moz-fit-content;
|
|
7116
7116
|
width:fit-content;
|
|
7117
7117
|
}
|
|
7118
|
-
.bp_styles_module_splitButton--
|
|
7118
|
+
.bp_styles_module_splitButton--f7401[data-modern=false]{
|
|
7119
|
+
--split-button-left-width:100%;
|
|
7120
|
+
--split-button-left-gap-margin-inline-end:calc(var(--space-05)/2);
|
|
7121
|
+
--split-button-left-skip-right-border-border-inline-end-color:#0000;
|
|
7122
|
+
--split-button-left-skip-right-border-focus-visible-border-inline-end-color:var(--border-cta-border-secondary-hover);
|
|
7123
|
+
--split-button-right-element-padding:0 var(--size-4);
|
|
7124
|
+
--split-button-right-svg-width:var(--size-3);
|
|
7125
|
+
--split-button-right-svg-height:var(--size-3);
|
|
7126
|
+
}
|
|
7127
|
+
|
|
7128
|
+
.bp_styles_module_splitButton--f7401[data-modern=true]{
|
|
7129
|
+
--split-button-left-width:100%;
|
|
7130
|
+
--split-button-left-gap-margin-inline-end:calc(var(--bp-space-005)/2);
|
|
7131
|
+
--split-button-left-skip-right-border-border-inline-end-color:#0000;
|
|
7132
|
+
--split-button-left-skip-right-border-focus-visible-border-inline-end-color:var(--bp-border-cta-border-secondary-hover);
|
|
7133
|
+
--split-button-right-element-padding:var(--bp-size-030) var(--bp-size-040) var(--bp-size-030) var(--bp-size-030);
|
|
7134
|
+
--split-button-right-svg-width:var(--bp-size-030);
|
|
7135
|
+
--split-button-right-svg-height:var(--bp-size-030);
|
|
7136
|
+
}
|
|
7137
|
+
|
|
7138
|
+
.bp_styles_module_dropdown--f7401[data-modern=false],.bp_styles_module_dropdown--f7401[data-modern=true]{
|
|
7139
|
+
--split-button-dropdown-min-width:160px;
|
|
7140
|
+
}
|
|
7141
|
+
|
|
7142
|
+
.bp_styles_module_splitButton--f7401{
|
|
7119
7143
|
display:inline-flex;
|
|
7120
7144
|
position:relative;
|
|
7121
7145
|
}
|
|
7122
|
-
.bp_styles_module_splitButton--
|
|
7146
|
+
.bp_styles_module_splitButton--f7401 .bp_styles_module_splitButtonLeft--f7401{
|
|
7123
7147
|
border-bottom-right-radius:0;
|
|
7124
7148
|
border-top-right-radius:0;
|
|
7125
|
-
width:
|
|
7149
|
+
width:var(--split-button-left-width);
|
|
7126
7150
|
}
|
|
7127
|
-
.bp_styles_module_splitButton--
|
|
7128
|
-
margin-inline-end:
|
|
7151
|
+
.bp_styles_module_splitButton--f7401 .bp_styles_module_splitButtonLeft--f7401.bp_styles_module_gap--f7401{
|
|
7152
|
+
margin-inline-end:var(--split-button-left-gap-margin-inline-end);
|
|
7129
7153
|
}
|
|
7130
|
-
.bp_styles_module_splitButton--
|
|
7154
|
+
.bp_styles_module_splitButton--f7401 .bp_styles_module_splitButtonLeft--f7401:focus-visible{
|
|
7131
7155
|
z-index:1;
|
|
7132
7156
|
}
|
|
7133
|
-
.bp_styles_module_splitButton--
|
|
7134
|
-
border-inline-end-color
|
|
7157
|
+
.bp_styles_module_splitButton--f7401 .bp_styles_module_splitButtonLeft--f7401.bp_styles_module_skipRightBorder--f7401{
|
|
7158
|
+
border-inline-end-color:var(--split-button-left-skip-right-border-border-inline-end-color) !important;
|
|
7135
7159
|
}
|
|
7136
|
-
.bp_styles_module_splitButton--
|
|
7137
|
-
border-inline-end-color:var(--border-
|
|
7160
|
+
.bp_styles_module_splitButton--f7401 .bp_styles_module_splitButtonLeft--f7401.bp_styles_module_skipRightBorder--f7401:focus-visible{
|
|
7161
|
+
border-inline-end-color:var(--split-button-left-skip-right-border-focus-visible-border-inline-end-color) !important;
|
|
7138
7162
|
}
|
|
7139
|
-
.bp_styles_module_splitButton--
|
|
7163
|
+
.bp_styles_module_splitButton--f7401 .bp_styles_module_loadingButton--f7401{
|
|
7140
7164
|
width:100%;
|
|
7141
7165
|
}
|
|
7142
|
-
.bp_styles_module_splitButton--
|
|
7166
|
+
.bp_styles_module_splitButton--f7401 .bp_styles_module_splitButtonRight--f7401{
|
|
7143
7167
|
border-end-start-radius:0;
|
|
7144
7168
|
border-start-start-radius:0;
|
|
7145
|
-
padding:
|
|
7169
|
+
padding:var(--split-button-right-element-padding) !important;
|
|
7146
7170
|
}
|
|
7147
|
-
.bp_styles_module_splitButton--
|
|
7148
|
-
height:var(--
|
|
7149
|
-
width:var(--
|
|
7171
|
+
.bp_styles_module_splitButton--f7401 .bp_styles_module_splitButtonRight--f7401 svg{
|
|
7172
|
+
height:var(--split-button-right-svg-height);
|
|
7173
|
+
width:var(--split-button-right-svg-width);
|
|
7150
7174
|
}
|
|
7151
|
-
.bp_styles_module_splitButton--
|
|
7175
|
+
.bp_styles_module_splitButton--f7401 .bp_styles_module_splitButtonRight--f7401:focus-visible{
|
|
7152
7176
|
z-index:1;
|
|
7153
7177
|
}
|
|
7154
7178
|
|
|
7155
|
-
.bp_styles_module_invisible--
|
|
7179
|
+
.bp_styles_module_invisible--f7401{
|
|
7156
7180
|
left:0;
|
|
7157
7181
|
position:absolute;
|
|
7158
7182
|
top:0;
|
|
7159
7183
|
visibility:hidden;
|
|
7160
7184
|
}
|
|
7161
7185
|
|
|
7162
|
-
.bp_styles_module_dropdown--
|
|
7163
|
-
min-width:
|
|
7186
|
+
.bp_styles_module_dropdown--f7401{
|
|
7187
|
+
min-width:var(--split-button-dropdown-min-width);
|
|
7164
7188
|
}
|
|
7165
7189
|
|
|
7166
7190
|
.bp_switch_module_option--1f7a2{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { forwardRef, useState, useRef, useCallback } from 'react';
|
|
4
|
+
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
4
5
|
import { Button } from '../button/button.js';
|
|
5
6
|
import { DropdownMenu } from '../primitives/dropdown-menu/index.js';
|
|
6
7
|
import { useControllableState } from '../utils/useControllableState.js';
|
|
@@ -44,6 +45,9 @@ const SplitButton = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
44
45
|
onChange: onOpenChange,
|
|
45
46
|
defaultProp: defaultOpen
|
|
46
47
|
});
|
|
48
|
+
const {
|
|
49
|
+
enableModernizedComponents
|
|
50
|
+
} = useBlueprintModernization();
|
|
47
51
|
const localLeftRef = useRef(null);
|
|
48
52
|
const onLeftButtonMountCallback = useCallback(button => {
|
|
49
53
|
if (button?.offsetWidth) {
|
|
@@ -83,6 +87,7 @@ const SplitButton = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
83
87
|
open: open,
|
|
84
88
|
children: [jsxs("span", {
|
|
85
89
|
className: styles.splitButton,
|
|
90
|
+
"data-modern": enableModernizedComponents,
|
|
86
91
|
children: [jsx(Button, {
|
|
87
92
|
...rest,
|
|
88
93
|
ref: onLeftButtonMountCallback,
|
|
@@ -110,6 +115,7 @@ const SplitButton = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
110
115
|
}), jsx(DropdownMenu.Content, {
|
|
111
116
|
className: styles.dropdown,
|
|
112
117
|
container: container,
|
|
118
|
+
"data-modern": enableModernizedComponents,
|
|
113
119
|
...alignOpts,
|
|
114
120
|
children: children
|
|
115
121
|
})]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"splitButton":"bp_styles_module_splitButton--
|
|
2
|
+
var styles = {"splitButton":"bp_styles_module_splitButton--f7401","dropdown":"bp_styles_module_dropdown--f7401","splitButtonLeft":"bp_styles_module_splitButtonLeft--f7401","gap":"bp_styles_module_gap--f7401","skipRightBorder":"bp_styles_module_skipRightBorder--f7401","loadingButton":"bp_styles_module_loadingButton--f7401","splitButtonRight":"bp_styles_module_splitButtonRight--f7401","invisible":"bp_styles_module_invisible--f7401"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|