@wistia/ui 0.14.36 → 0.14.37
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 +78 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +182 -138
- package/dist/index.d.ts +182 -138
- package/dist/index.mjs +80 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -16
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.14.
|
|
3
|
+
* @license @wistia/ui v0.14.37
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -142,6 +142,7 @@ __export(index_exports, {
|
|
|
142
142
|
SelectOption: () => SelectOption,
|
|
143
143
|
SelectOptionGroup: () => SelectOptionGroup,
|
|
144
144
|
Slider: () => Slider,
|
|
145
|
+
SplitButton: () => SplitButton,
|
|
145
146
|
Stack: () => Stack,
|
|
146
147
|
SubMenu: () => SubMenu,
|
|
147
148
|
Switch: () => Switch,
|
|
@@ -7559,6 +7560,7 @@ var Button = (0, import_react23.forwardRef)(
|
|
|
7559
7560
|
type: "button",
|
|
7560
7561
|
...props,
|
|
7561
7562
|
...commonProps,
|
|
7563
|
+
"data-wui-button": true,
|
|
7562
7564
|
children: unstyled ? children : /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
|
|
7563
7565
|
ButtonContent,
|
|
7564
7566
|
{
|
|
@@ -11343,14 +11345,14 @@ var Input = (0, import_react47.forwardRef)(
|
|
|
11343
11345
|
if ((0, import_type_guards35.isNil)(leftIcon) && type === "search") {
|
|
11344
11346
|
leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(Icon, { type: "search" });
|
|
11345
11347
|
}
|
|
11346
|
-
if ((0, import_type_guards35.isNotNil)(leftIconToDisplay)) {
|
|
11348
|
+
if ((0, import_type_guards35.isNotNil)(leftIconToDisplay) && (0, import_react47.isValidElement)(leftIconToDisplay)) {
|
|
11347
11349
|
leftIconToDisplay = (0, import_react47.cloneElement)(leftIconToDisplay, {
|
|
11348
11350
|
size: "md",
|
|
11349
11351
|
className: "wui-input-left-icon"
|
|
11350
11352
|
});
|
|
11351
11353
|
}
|
|
11352
11354
|
let rightIconToDisplay = rightIcon;
|
|
11353
|
-
if ((0, import_type_guards35.isNotNil)(rightIconToDisplay)) {
|
|
11355
|
+
if ((0, import_type_guards35.isNotNil)(rightIconToDisplay) && (0, import_react47.isValidElement)(rightIconToDisplay)) {
|
|
11354
11356
|
rightIconToDisplay = (0, import_react47.cloneElement)(rightIconToDisplay, {
|
|
11355
11357
|
size: "md",
|
|
11356
11358
|
className: "wui-input-right-icon"
|
|
@@ -12823,10 +12825,10 @@ var MenuItemButton = (0, import_react57.forwardRef)(({ children, appearance, com
|
|
|
12823
12825
|
fullWidth: true,
|
|
12824
12826
|
unstyled: true,
|
|
12825
12827
|
children: [
|
|
12826
|
-
props.leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
|
|
12828
|
+
(0, import_type_guards38.isNotNil)(props.leftIcon) ? /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
|
|
12827
12829
|
/* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledLabelAndDescriptionContainer, { children }),
|
|
12828
12830
|
(0, import_type_guards38.isNotNil)(badge) || (0, import_type_guards38.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
|
|
12829
|
-
props.rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
|
|
12831
|
+
(0, import_type_guards38.isNotNil)(props.rightIcon) ? /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
|
|
12830
12832
|
]
|
|
12831
12833
|
}
|
|
12832
12834
|
);
|
|
@@ -17743,6 +17745,76 @@ var WistiaLogo = ({
|
|
|
17743
17745
|
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("a", { href, children: Logo }) : Logo;
|
|
17744
17746
|
};
|
|
17745
17747
|
WistiaLogo.displayName = "WistiaLogo_UI";
|
|
17748
|
+
|
|
17749
|
+
// src/components/SplitButton/SplitButton.tsx
|
|
17750
|
+
var import_styled_components128 = __toESM(require("styled-components"));
|
|
17751
|
+
var import_type_guards75 = require("@wistia/type-guards");
|
|
17752
|
+
var import_jsx_runtime327 = require("react/jsx-runtime");
|
|
17753
|
+
var StyledSplitButton = import_styled_components128.default.span`
|
|
17754
|
+
white-space: nowrap;
|
|
17755
|
+
|
|
17756
|
+
> [data-wui-button='true']:first-child {
|
|
17757
|
+
border-top-right-radius: 0;
|
|
17758
|
+
border-bottom-right-radius: 0;
|
|
17759
|
+
}
|
|
17760
|
+
|
|
17761
|
+
> [data-wui-button='true']:last-child {
|
|
17762
|
+
border-top-left-radius: 0;
|
|
17763
|
+
border-bottom-left-radius: 0;
|
|
17764
|
+
display: inline-flex;
|
|
17765
|
+
}
|
|
17766
|
+
`;
|
|
17767
|
+
var SplitButton = ({
|
|
17768
|
+
children,
|
|
17769
|
+
menuLabel = "Select an option",
|
|
17770
|
+
menuIcon = /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(Icon, { type: "caret-down" }),
|
|
17771
|
+
menuItems,
|
|
17772
|
+
disabled = false,
|
|
17773
|
+
colorScheme = "default",
|
|
17774
|
+
variant = "solid",
|
|
17775
|
+
secondaryAction,
|
|
17776
|
+
size = "md",
|
|
17777
|
+
unstyled = false,
|
|
17778
|
+
menuProps = {},
|
|
17779
|
+
...props
|
|
17780
|
+
}) => {
|
|
17781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)(StyledSplitButton, { children: [
|
|
17782
|
+
/* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
17783
|
+
Button,
|
|
17784
|
+
{
|
|
17785
|
+
colorScheme,
|
|
17786
|
+
disabled,
|
|
17787
|
+
size,
|
|
17788
|
+
unstyled,
|
|
17789
|
+
variant,
|
|
17790
|
+
...props,
|
|
17791
|
+
children
|
|
17792
|
+
}
|
|
17793
|
+
),
|
|
17794
|
+
(0, import_type_guards75.isNotNil)(menuItems) && /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
17795
|
+
Menu,
|
|
17796
|
+
{
|
|
17797
|
+
...menuProps,
|
|
17798
|
+
disabled,
|
|
17799
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
17800
|
+
IconButton,
|
|
17801
|
+
{
|
|
17802
|
+
colorScheme,
|
|
17803
|
+
disabled,
|
|
17804
|
+
label: menuLabel,
|
|
17805
|
+
size,
|
|
17806
|
+
unstyled,
|
|
17807
|
+
variant,
|
|
17808
|
+
children: menuIcon
|
|
17809
|
+
}
|
|
17810
|
+
),
|
|
17811
|
+
children: menuItems
|
|
17812
|
+
}
|
|
17813
|
+
),
|
|
17814
|
+
(0, import_type_guards75.isNotNil)(secondaryAction) && secondaryAction
|
|
17815
|
+
] });
|
|
17816
|
+
};
|
|
17817
|
+
SplitButton.displayName = "SplitButton_UI";
|
|
17746
17818
|
// Annotate the CommonJS export names for ESM import in node:
|
|
17747
17819
|
0 && (module.exports = {
|
|
17748
17820
|
ActionButton,
|
|
@@ -17848,6 +17920,7 @@ WistiaLogo.displayName = "WistiaLogo_UI";
|
|
|
17848
17920
|
SelectOption,
|
|
17849
17921
|
SelectOptionGroup,
|
|
17850
17922
|
Slider,
|
|
17923
|
+
SplitButton,
|
|
17851
17924
|
Stack,
|
|
17852
17925
|
SubMenu,
|
|
17853
17926
|
Switch,
|