@wistia/ui 0.15.5 → 0.15.6-beta.345f06af.e9c3bd3
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/index.cjs +17 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +17 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +18 -15
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.15.
|
|
3
|
+
* @license @wistia/ui v0.15.6-beta.345f06af.e9c3bd3
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -18230,19 +18230,24 @@ WistiaLogo.displayName = "WistiaLogo_UI";
|
|
|
18230
18230
|
// src/components/SplitButton/SplitButton.tsx
|
|
18231
18231
|
var import_styled_components129 = __toESM(require("styled-components"));
|
|
18232
18232
|
var import_type_guards76 = require("@wistia/type-guards");
|
|
18233
|
+
var import_react102 = require("react");
|
|
18233
18234
|
var import_jsx_runtime328 = require("react/jsx-runtime");
|
|
18234
18235
|
var StyledSplitButton = import_styled_components129.default.span`
|
|
18236
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
18235
18237
|
white-space: nowrap;
|
|
18236
18238
|
|
|
18237
|
-
|
|
18238
|
-
|
|
18239
|
-
|
|
18240
|
-
|
|
18239
|
+
&:has(:nth-child(2)) {
|
|
18240
|
+
> [data-wui-button='true']:first-child {
|
|
18241
|
+
border-top-right-radius: 0;
|
|
18242
|
+
border-bottom-right-radius: 0;
|
|
18243
|
+
padding-right: 0;
|
|
18244
|
+
}
|
|
18241
18245
|
|
|
18242
|
-
|
|
18243
|
-
|
|
18244
|
-
|
|
18245
|
-
|
|
18246
|
+
> [data-wui-button='true']:last-child {
|
|
18247
|
+
border-top-left-radius: 0;
|
|
18248
|
+
border-bottom-left-radius: 0;
|
|
18249
|
+
display: inline-flex;
|
|
18250
|
+
}
|
|
18246
18251
|
}
|
|
18247
18252
|
`;
|
|
18248
18253
|
var SplitButton = ({
|
|
@@ -18251,7 +18256,7 @@ var SplitButton = ({
|
|
|
18251
18256
|
menuIcon = /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(Icon, { type: "caret-down" }),
|
|
18252
18257
|
menuItems,
|
|
18253
18258
|
disabled = false,
|
|
18254
|
-
colorScheme = "
|
|
18259
|
+
colorScheme = "inherit",
|
|
18255
18260
|
variant = "solid",
|
|
18256
18261
|
secondaryAction,
|
|
18257
18262
|
size = "md",
|
|
@@ -18259,11 +18264,10 @@ var SplitButton = ({
|
|
|
18259
18264
|
menuProps = {},
|
|
18260
18265
|
...props
|
|
18261
18266
|
}) => {
|
|
18262
|
-
return /* @__PURE__ */ (0, import_jsx_runtime328.jsxs)(StyledSplitButton, { children: [
|
|
18267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime328.jsxs)(StyledSplitButton, { $colorScheme: colorScheme, children: [
|
|
18263
18268
|
/* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
|
|
18264
18269
|
Button,
|
|
18265
18270
|
{
|
|
18266
|
-
colorScheme,
|
|
18267
18271
|
disabled,
|
|
18268
18272
|
size,
|
|
18269
18273
|
unstyled,
|
|
@@ -18280,7 +18284,6 @@ var SplitButton = ({
|
|
|
18280
18284
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
|
|
18281
18285
|
IconButton,
|
|
18282
18286
|
{
|
|
18283
|
-
colorScheme,
|
|
18284
18287
|
disabled,
|
|
18285
18288
|
label: menuLabel,
|
|
18286
18289
|
size,
|
|
@@ -18292,7 +18295,7 @@ var SplitButton = ({
|
|
|
18292
18295
|
children: menuItems
|
|
18293
18296
|
}
|
|
18294
18297
|
),
|
|
18295
|
-
(0, import_type_guards76.isNotNil)(secondaryAction) && secondaryAction
|
|
18298
|
+
(0, import_type_guards76.isNotNil)(secondaryAction) && (0, import_react102.cloneElement)(secondaryAction, { disabled, size, unstyled, variant, colorScheme })
|
|
18296
18299
|
] });
|
|
18297
18300
|
};
|
|
18298
18301
|
SplitButton.displayName = "SplitButton_UI";
|