@wistia/ui 0.26.15 → 0.26.16-beta.0bf8829e.f85ac40
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.d.ts +17 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +57 -50
- package/dist/index.js.map +1 -1
- package/package.json +26 -31
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.26.
|
|
3
|
+
* @license @wistia/ui v0.26.16-beta.0bf8829e.f85ac40
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2026, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -1636,12 +1636,10 @@ const isEventTargetSupported = (eventTarget) => Boolean(typeof eventTarget === "
|
|
|
1636
1636
|
const useEvent = (eventName, eventHandler, eventTarget = typeof document !== "undefined" ? window : void 0, eventOptions = {}) => {
|
|
1637
1637
|
const savedEventHandler = useRef(void 0);
|
|
1638
1638
|
const savedEventOptions = useRef(void 0);
|
|
1639
|
-
|
|
1639
|
+
useLayoutEffect(() => {
|
|
1640
1640
|
savedEventHandler.current = eventHandler;
|
|
1641
|
-
}, [eventHandler]);
|
|
1642
|
-
useEffect(() => {
|
|
1643
1641
|
savedEventOptions.current = eventOptions;
|
|
1644
|
-
}
|
|
1642
|
+
});
|
|
1645
1643
|
useEffect(() => {
|
|
1646
1644
|
const target = isValidRef(eventTarget) ? eventTarget.current : eventTarget;
|
|
1647
1645
|
if (!eventName || !isEventTargetSupported(target)) return;
|
|
@@ -2153,7 +2151,7 @@ const buttonBaseStyles = css`
|
|
|
2153
2151
|
|
|
2154
2152
|
/* This ensure that the icon is the corect color when the style is solid or the button is disabled */
|
|
2155
2153
|
&& {
|
|
2156
|
-
svg {
|
|
2154
|
+
& svg {
|
|
2157
2155
|
color: var(--button-color-icon);
|
|
2158
2156
|
width: var(--button-icon-size);
|
|
2159
2157
|
height: var(--button-icon-size);
|
|
@@ -5569,7 +5567,7 @@ const StyledLink = styled.a`
|
|
|
5569
5567
|
}
|
|
5570
5568
|
|
|
5571
5569
|
&& {
|
|
5572
|
-
svg {
|
|
5570
|
+
& svg {
|
|
5573
5571
|
width: 14px;
|
|
5574
5572
|
height: 14px;
|
|
5575
5573
|
flex: 0 0 14px;
|
|
@@ -5800,7 +5798,7 @@ const StyledActionButton = styled(Button)`
|
|
|
5800
5798
|
cursor: not-allowed;
|
|
5801
5799
|
|
|
5802
5800
|
&& {
|
|
5803
|
-
svg {
|
|
5801
|
+
& svg {
|
|
5804
5802
|
color: var(--wui-color-icon-disabled);
|
|
5805
5803
|
}
|
|
5806
5804
|
}
|
|
@@ -5814,7 +5812,7 @@ const StyledMainIcon = styled.div`
|
|
|
5814
5812
|
transition: color var(--wui-motion-duration-02) var(--wui-motion-ease);
|
|
5815
5813
|
|
|
5816
5814
|
&& {
|
|
5817
|
-
svg {
|
|
5815
|
+
& svg {
|
|
5818
5816
|
width: 24px;
|
|
5819
5817
|
height: 24px;
|
|
5820
5818
|
flex: 0 0 24px;
|
|
@@ -5843,7 +5841,7 @@ const StyledSecondaryIcon = styled.div`
|
|
|
5843
5841
|
`};
|
|
5844
5842
|
|
|
5845
5843
|
&& {
|
|
5846
|
-
svg {
|
|
5844
|
+
& svg {
|
|
5847
5845
|
width: 24px;
|
|
5848
5846
|
height: 24px;
|
|
5849
5847
|
flex: 0 0 24px;
|
|
@@ -6059,9 +6057,11 @@ const chooseColorScheme = (name) => {
|
|
|
6059
6057
|
*/
|
|
6060
6058
|
const Avatar = ({ imageUrl, heightAndWidth, name, size = "md", onImageLoad, ...props }) => {
|
|
6061
6059
|
const [imageLoadState, setImageLoadState] = useState("loading");
|
|
6062
|
-
|
|
6060
|
+
const [prevImageUrl, setPrevImageUrl] = useState(imageUrl);
|
|
6061
|
+
if (imageUrl !== prevImageUrl) {
|
|
6062
|
+
setPrevImageUrl(imageUrl);
|
|
6063
6063
|
setImageLoadState("loading");
|
|
6064
|
-
}
|
|
6064
|
+
}
|
|
6065
6065
|
const handleImageLoad = () => {
|
|
6066
6066
|
setImageLoadState("loaded");
|
|
6067
6067
|
onImageLoad?.({
|
|
@@ -6114,7 +6114,7 @@ const StyledBadge = styled.div`
|
|
|
6114
6114
|
|
|
6115
6115
|
/* Icon component size and color */
|
|
6116
6116
|
&& {
|
|
6117
|
-
svg {
|
|
6117
|
+
& svg {
|
|
6118
6118
|
color: var(--wui-color-icon);
|
|
6119
6119
|
height: 12px;
|
|
6120
6120
|
width: 12px;
|
|
@@ -7103,11 +7103,12 @@ const FormContext = createContext({
|
|
|
7103
7103
|
formId: "NO_FORM",
|
|
7104
7104
|
labelPosition: "block"
|
|
7105
7105
|
});
|
|
7106
|
+
const DEFAULT_VALUES = {};
|
|
7106
7107
|
/**
|
|
7107
7108
|
* For creating forms. It provides a context for the form fields to access the form state and validation.
|
|
7108
7109
|
* It also provides a way to handle form submission and validation. It is built around [React 19's form APIs](https://react.dev/reference/react-dom/components/form).
|
|
7109
7110
|
*/
|
|
7110
|
-
const Form = ({ children, action, values =
|
|
7111
|
+
const Form = ({ children, action, values = DEFAULT_VALUES, labelPosition = "block", validate, fullWidth = false, ref: forwardedRef, ...props }) => {
|
|
7111
7112
|
const [errors, setErrors] = useState({});
|
|
7112
7113
|
const [hasSubmitted, setHasSubmitted] = useState(false);
|
|
7113
7114
|
const innerRef = useRef(null);
|
|
@@ -7261,7 +7262,7 @@ const StyledCheckboxWrapper = styled.div`
|
|
|
7261
7262
|
}
|
|
7262
7263
|
|
|
7263
7264
|
&:has(input:focus-visible) {
|
|
7264
|
-
[data-wui-faux-input='true'] {
|
|
7265
|
+
& [data-wui-faux-input='true'] {
|
|
7265
7266
|
--wui-checkbox-outline-color: var(--wui-color-focus-ring);
|
|
7266
7267
|
}
|
|
7267
7268
|
}
|
|
@@ -7423,7 +7424,7 @@ const StyledTrigger$1 = styled(Collapsible$1.Trigger)`
|
|
|
7423
7424
|
}
|
|
7424
7425
|
|
|
7425
7426
|
&[aria-expanded='true'] {
|
|
7426
|
-
[data-wui-collapsible-icon] {
|
|
7427
|
+
& [data-wui-collapsible-icon] {
|
|
7427
7428
|
&[data-wui-collapsible-icon-rotate='90'] {
|
|
7428
7429
|
transform: rotate(90deg);
|
|
7429
7430
|
}
|
|
@@ -8135,7 +8136,6 @@ const StyledTooltipArrow = styled.svg`
|
|
|
8135
8136
|
${arrowEdgeCss}
|
|
8136
8137
|
`;
|
|
8137
8138
|
const VISUAL_OFFSET = 6;
|
|
8138
|
-
const ARROW_EXTENSION = 6;
|
|
8139
8139
|
/**
|
|
8140
8140
|
* Tooltips are a way to provide additional information or context to a user when they hover or focus an element.
|
|
8141
8141
|
* For elements that are not interactive, consider using a [Popover](/components/Popover) instead.
|
|
@@ -8154,7 +8154,7 @@ const Tooltip = ({ delay = 500, direction = "top", content, children, forceOpen,
|
|
|
8154
8154
|
...container != null ? { container } : {},
|
|
8155
8155
|
children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
|
|
8156
8156
|
side: direction,
|
|
8157
|
-
sideOffset: hideArrow ? VISUAL_OFFSET :
|
|
8157
|
+
sideOffset: hideArrow ? VISUAL_OFFSET : 12,
|
|
8158
8158
|
style: { zIndex: "var(--wui-zindex-tooltip)" },
|
|
8159
8159
|
children: /* @__PURE__ */ jsxs(StyledPopup$5, {
|
|
8160
8160
|
role: "tooltip",
|
|
@@ -9423,7 +9423,7 @@ const SaturationAndValuePicker = ({ dataTestId }) => {
|
|
|
9423
9423
|
}
|
|
9424
9424
|
if (event.key === "ArrowLeft") {
|
|
9425
9425
|
event.preventDefault();
|
|
9426
|
-
nudgeHsv("s",
|
|
9426
|
+
nudgeHsv("s", -.02);
|
|
9427
9427
|
return;
|
|
9428
9428
|
}
|
|
9429
9429
|
if (event.key === "ArrowUp") {
|
|
@@ -9433,7 +9433,7 @@ const SaturationAndValuePicker = ({ dataTestId }) => {
|
|
|
9433
9433
|
}
|
|
9434
9434
|
if (event.key === "ArrowDown") {
|
|
9435
9435
|
event.preventDefault();
|
|
9436
|
-
nudgeHsv("v",
|
|
9436
|
+
nudgeHsv("v", -.02);
|
|
9437
9437
|
}
|
|
9438
9438
|
}, [nudgeHsv]);
|
|
9439
9439
|
const onWindowMouseMove = useCallback((event) => {
|
|
@@ -9731,7 +9731,7 @@ const ComboboxPopover = styled(Ariakit.ComboboxPopover)`
|
|
|
9731
9731
|
display: flex;
|
|
9732
9732
|
flex-direction: column;
|
|
9733
9733
|
overflow: auto;
|
|
9734
|
-
overscroll-behavior: contain;
|
|
9734
|
+
overscroll-behavior: contain; /* stylelint-disable-line plugin/use-baseline */
|
|
9735
9735
|
margin-top: var(--wui-space-02);
|
|
9736
9736
|
|
|
9737
9737
|
&[aria-busy='true'] {
|
|
@@ -9956,10 +9956,11 @@ const MenuPopup = styled(Menu$1.Popup)`
|
|
|
9956
9956
|
${menuContentCss}
|
|
9957
9957
|
min-width: var(--anchor-width);
|
|
9958
9958
|
`;
|
|
9959
|
+
const DEFAULT_TRIGGER_PROPS = {};
|
|
9959
9960
|
/**
|
|
9960
9961
|
* Displays a menu to the users with a set of actions.
|
|
9961
9962
|
*/
|
|
9962
|
-
const Menu = ({ align = "start", children, disabled = false, compact = false, trigger, label, isOpen, side = "bottom", triggerProps =
|
|
9963
|
+
const Menu = ({ align = "start", children, disabled = false, compact = false, trigger, label, isOpen, side = "bottom", triggerProps = DEFAULT_TRIGGER_PROPS, onOpenChange, ref, ...props }) => {
|
|
9963
9964
|
const contextValue = useMemo(() => ({ compact }), [compact]);
|
|
9964
9965
|
const handleOpenChange = useCallback((nextOpen, eventDetails) => {
|
|
9965
9966
|
if (nextOpen !== isOpen) {
|
|
@@ -10014,7 +10015,8 @@ const ContextMenuPopup = styled(Menu$1.Popup)`
|
|
|
10014
10015
|
* 1. By providing a `triggerRef`, which will render the menu when the referenced element is right-clicked.
|
|
10015
10016
|
* 2. By providing a `position` prop, which will render the menu at the specified coordinates.
|
|
10016
10017
|
*/
|
|
10017
|
-
const
|
|
10018
|
+
const NOOP$4 = () => null;
|
|
10019
|
+
const ContextMenu = ({ position, triggerRef, children, side = "bottom", onRequestClose = NOOP$4, compact = false }) => {
|
|
10018
10020
|
const [isRightClicked, setIsRightClicked] = useState(false);
|
|
10019
10021
|
const [menuPosition, setMenuPosition] = useState(position ?? {
|
|
10020
10022
|
x: 0,
|
|
@@ -10151,7 +10153,7 @@ const StyledDataCard = styled.div`
|
|
|
10151
10153
|
--wui-data-card-text: var(--wui-color-text-button);
|
|
10152
10154
|
--wui-data-card-background: var(--wui-color-bg-surface-secondary-hover);
|
|
10153
10155
|
|
|
10154
|
-
[data-wui-data-card-hover-icon] {
|
|
10156
|
+
& [data-wui-data-card-hover-icon] {
|
|
10155
10157
|
opacity: 1;
|
|
10156
10158
|
transform: translateX(0);
|
|
10157
10159
|
}
|
|
@@ -11975,12 +11977,8 @@ const StyledFeatureCard = styled.div`
|
|
|
11975
11977
|
const FeatureCard = ({ bodyText, colorScheme = "inherit", headingText, icon, image, onClose, orientation = "horizontal", primaryAction, prominence = "primary", secondaryAction, ...props }) => {
|
|
11976
11978
|
const [containerRef, { width }] = useElementObserver();
|
|
11977
11979
|
const [contentRef, { height: contentHeight }] = useElementObserver();
|
|
11978
|
-
const
|
|
11979
|
-
const
|
|
11980
|
-
useEffect(() => {
|
|
11981
|
-
setIsSmallContainer(width <= (orientation === "vertical" ? VERTICAL_BREAKPOINT_WIDTH : 600));
|
|
11982
|
-
if (orientation === "auto") setIsVerticalLayout(width <= 600);
|
|
11983
|
-
}, [width, orientation]);
|
|
11980
|
+
const isSmallContainer = width <= (orientation === "vertical" ? VERTICAL_BREAKPOINT_WIDTH : 600);
|
|
11981
|
+
const isVerticalLayout = orientation === "vertical" || orientation === "auto" && width <= 600;
|
|
11984
11982
|
const shouldShowImage = isNotNil(image) && (isVerticalLayout || width >= MIN_IMAGE_WIDTH);
|
|
11985
11983
|
const iconPosition = useMemo(() => {
|
|
11986
11984
|
if (isNil(icon)) return "none";
|
|
@@ -13830,7 +13828,7 @@ const StyledLeftIconContainer = styled.div`
|
|
|
13830
13828
|
width: var(--menu-item-left-icon-size);
|
|
13831
13829
|
|
|
13832
13830
|
&& {
|
|
13833
|
-
svg {
|
|
13831
|
+
& svg {
|
|
13834
13832
|
height: var(--menu-item-left-icon-size);
|
|
13835
13833
|
width: var(--menu-item-left-icon-size);
|
|
13836
13834
|
flex: 0 0 var(--menu-item-left-icon-size);
|
|
@@ -13842,7 +13840,7 @@ const StyledRightIconContainer = styled.div`
|
|
|
13842
13840
|
width: var(--menu-item-right-icon-size);
|
|
13843
13841
|
|
|
13844
13842
|
&& {
|
|
13845
|
-
svg {
|
|
13843
|
+
& svg {
|
|
13846
13844
|
height: var(--menu-item-right-icon-size);
|
|
13847
13845
|
width: var(--menu-item-right-icon-size);
|
|
13848
13846
|
flex: 0 0 var(--menu-item-right-icon-size);
|
|
@@ -13943,7 +13941,8 @@ const SubMenuTrigger = ({ icon, ...props }) => {
|
|
|
13943
13941
|
})
|
|
13944
13942
|
});
|
|
13945
13943
|
};
|
|
13946
|
-
const
|
|
13944
|
+
const NOOP$3 = () => null;
|
|
13945
|
+
const SubMenu = ({ label, description, children, onOpenChange = NOOP$3, ...props }) => {
|
|
13947
13946
|
const { isSmAndUp } = useMq();
|
|
13948
13947
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
13949
13948
|
const { compact } = useMenuContext();
|
|
@@ -13968,7 +13967,8 @@ const SubMenu = ({ label, description, children, onOpenChange = () => null, ...p
|
|
|
13968
13967
|
SubMenu.displayName = "SubMenu_UI";
|
|
13969
13968
|
//#endregion
|
|
13970
13969
|
//#region src/components/Menu/MenuItem.tsx
|
|
13971
|
-
const
|
|
13970
|
+
const NOOP$2 = () => null;
|
|
13971
|
+
const MenuItem = ({ onSelect = NOOP$2, closeOnClick = true, ref, ...props }) => {
|
|
13972
13972
|
return /* @__PURE__ */ jsx(Menu$1.Item, {
|
|
13973
13973
|
closeOnClick,
|
|
13974
13974
|
nativeButton: isNil(props.href),
|
|
@@ -13991,10 +13991,11 @@ const MenuRadioGroup = ({ children, ...props }) => {
|
|
|
13991
13991
|
MenuRadioGroup.displayName = "MenuRadioGroup_UI";
|
|
13992
13992
|
//#endregion
|
|
13993
13993
|
//#region src/components/Menu/RadioMenuItem.tsx
|
|
13994
|
-
const
|
|
13994
|
+
const DEFAULT_INDICATOR = /* @__PURE__ */ jsx(Icon, {
|
|
13995
13995
|
size: "sm",
|
|
13996
13996
|
type: "checkmark"
|
|
13997
|
-
})
|
|
13997
|
+
});
|
|
13998
|
+
const RadioMenuItem = ({ onSelect, value, indicator = DEFAULT_INDICATOR, ...props }) => {
|
|
13998
13999
|
const extraProps = onSelect ? { onClick: onSelect } : {};
|
|
13999
14000
|
return /* @__PURE__ */ jsx(Menu$1.RadioItem, {
|
|
14000
14001
|
closeOnClick: true,
|
|
@@ -14041,7 +14042,8 @@ const CheckboxIndicator = ({ checked, ...props }) => {
|
|
|
14041
14042
|
})]
|
|
14042
14043
|
});
|
|
14043
14044
|
};
|
|
14044
|
-
const
|
|
14045
|
+
const NOOP$1 = () => null;
|
|
14046
|
+
const CheckboxMenuItem = ({ onSelect = NOOP$1, checked, onCheckedChange, ...props }) => {
|
|
14045
14047
|
return /* @__PURE__ */ jsx(Menu$1.CheckboxItem, {
|
|
14046
14048
|
checked,
|
|
14047
14049
|
closeOnClick: false,
|
|
@@ -14845,7 +14847,7 @@ const StyledCard = styled.label`
|
|
|
14845
14847
|
|
|
14846
14848
|
&:has([data-wui-radio-card-image]) {
|
|
14847
14849
|
&:has(input:disabled) {
|
|
14848
|
-
[data-wui-radio-card-image] {
|
|
14850
|
+
& [data-wui-radio-card-image] {
|
|
14849
14851
|
filter: grayscale(100%);
|
|
14850
14852
|
}
|
|
14851
14853
|
}
|
|
@@ -15276,7 +15278,7 @@ const segmentedControlItemStyles = css`
|
|
|
15276
15278
|
cursor: default;
|
|
15277
15279
|
transition: none;
|
|
15278
15280
|
|
|
15279
|
-
svg path {
|
|
15281
|
+
& svg path {
|
|
15280
15282
|
fill: var(--wui-color-icon-selected);
|
|
15281
15283
|
}
|
|
15282
15284
|
|
|
@@ -15290,7 +15292,7 @@ const segmentedControlItemStyles = css`
|
|
|
15290
15292
|
cursor: not-allowed;
|
|
15291
15293
|
color: var(--wui-color-text-disabled);
|
|
15292
15294
|
|
|
15293
|
-
svg path {
|
|
15295
|
+
& svg path {
|
|
15294
15296
|
fill: var(--wui-color-icon-disabled);
|
|
15295
15297
|
}
|
|
15296
15298
|
|
|
@@ -15403,7 +15405,7 @@ const StyledPopup = styled(Select$1.Popup)`
|
|
|
15403
15405
|
--wui-select-option-bg-hover: var(--wui-color-bg-surface-hover);
|
|
15404
15406
|
|
|
15405
15407
|
overflow: auto;
|
|
15406
|
-
overscroll-behavior: none; /* prevent inertia bounce when scrolling to top and bottom */
|
|
15408
|
+
overscroll-behavior: none; /* stylelint-disable-line plugin/use-baseline -- prevent inertia bounce when scrolling to top and bottom */
|
|
15407
15409
|
scrollbar-width: none; /* hide scrollbar in firefox */
|
|
15408
15410
|
|
|
15409
15411
|
&::-webkit-scrollbar {
|
|
@@ -15483,10 +15485,11 @@ const collectItemLabels = (children) => Children.toArray(children).flatMap((chil
|
|
|
15483
15485
|
if (childChildren !== void 0 && childChildren !== null) return collectItemLabels(childChildren);
|
|
15484
15486
|
return [];
|
|
15485
15487
|
});
|
|
15488
|
+
const NOOP = () => null;
|
|
15486
15489
|
/**
|
|
15487
15490
|
* Display a list of options and choose one of them. Replacement for the native Select HTML element.
|
|
15488
15491
|
*/
|
|
15489
|
-
const Select = ({ colorScheme = "inherit", children, onOpenChange =
|
|
15492
|
+
const Select = ({ colorScheme = "inherit", children, onOpenChange = NOOP, onChange = NOOP, placeholder = "Select...", fullWidth = false, forceOpen = false, showScrollArrows = false, disabled, name, value, "aria-invalid": ariaInvalid, ref: forwardedRef, ...props }) => {
|
|
15490
15493
|
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
15491
15494
|
const rootProps = {
|
|
15492
15495
|
disabled,
|
|
@@ -15859,7 +15862,8 @@ const StyledSliderThumb = styled(Slider$1.Thumb)`
|
|
|
15859
15862
|
outline-width: 2px;
|
|
15860
15863
|
}
|
|
15861
15864
|
`;
|
|
15862
|
-
const
|
|
15865
|
+
const DEFAULT_INITIAL_VALUE = [0];
|
|
15866
|
+
const Slider = ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, disabled = false, initialValue = DEFAULT_INITIAL_VALUE, max = 100, min = 0, onChange, onValueCommitted, step = 1, value, "data-testid": dataTestId = "ui-slider", ...otherProps }) => {
|
|
15863
15867
|
if (!(isNonEmptyString(ariaLabel) || isNonEmptyString(ariaLabelledby))) throw new Error("UI Slider: Sliders should have an accessible name. Add a label using the aria-label or aria-labelledby prop.");
|
|
15864
15868
|
const values = value ?? initialValue;
|
|
15865
15869
|
const handleValueChange = (newValue) => {
|
|
@@ -15897,23 +15901,25 @@ const StyledSplitButton = styled.span`
|
|
|
15897
15901
|
white-space: nowrap;
|
|
15898
15902
|
|
|
15899
15903
|
&:has(:nth-child(2)) {
|
|
15900
|
-
> [data-wui-button='true']:first-child {
|
|
15904
|
+
& > [data-wui-button='true']:first-child {
|
|
15901
15905
|
border-top-right-radius: 0;
|
|
15902
15906
|
border-bottom-right-radius: 0;
|
|
15903
15907
|
padding-right: 0;
|
|
15904
15908
|
}
|
|
15905
15909
|
|
|
15906
|
-
> [data-wui-button='true']:not(:first-child) {
|
|
15910
|
+
& > [data-wui-button='true']:not(:first-child) {
|
|
15907
15911
|
border-top-left-radius: 0;
|
|
15908
15912
|
border-bottom-left-radius: 0;
|
|
15909
15913
|
display: inline-flex;
|
|
15910
15914
|
}
|
|
15911
15915
|
}
|
|
15912
15916
|
`;
|
|
15917
|
+
const DEFAULT_MENU_ICON = /* @__PURE__ */ jsx(Icon, { type: "caret-down" });
|
|
15918
|
+
const DEFAULT_MENU_PROPS = {};
|
|
15913
15919
|
/**
|
|
15914
15920
|
* A SplitButton is an extension of [Button](/components/Button) that adds a menu to the right hand side of the button.
|
|
15915
15921
|
*/
|
|
15916
|
-
const SplitButton = ({ children, menuLabel = "Select an option", menuIcon =
|
|
15922
|
+
const SplitButton = ({ children, menuLabel = "Select an option", menuIcon = DEFAULT_MENU_ICON, menuItems, disabled = false, colorScheme = "inherit", variant = "solid", secondaryAction, size = "md", unstyled = false, menuProps = DEFAULT_MENU_PROPS, ...props }) => {
|
|
15917
15923
|
return /* @__PURE__ */ jsxs(StyledSplitButton, {
|
|
15918
15924
|
$colorScheme: colorScheme,
|
|
15919
15925
|
children: [
|
|
@@ -16221,7 +16227,7 @@ const StyledThumbnailBadge = styled.div`
|
|
|
16221
16227
|
width: 12px;
|
|
16222
16228
|
flex: 0 0 12px;
|
|
16223
16229
|
|
|
16224
|
-
path {
|
|
16230
|
+
& path {
|
|
16225
16231
|
color: var(--wui-color-icon-on-fill);
|
|
16226
16232
|
}
|
|
16227
16233
|
}
|
|
@@ -16523,12 +16529,13 @@ const StyledThumbnailCollage = styled.div`
|
|
|
16523
16529
|
width: 100%;
|
|
16524
16530
|
}
|
|
16525
16531
|
`;
|
|
16532
|
+
const DEFAULT_CHILDREN = [];
|
|
16526
16533
|
/**
|
|
16527
16534
|
* A `ThumbnailCollage` is a component that displays multiple `Thumbnail` components in a responsive grid layout.
|
|
16528
16535
|
* It supports up to 3 thumbnails arranged in different configurations based on the number of children provided.
|
|
16529
16536
|
* If no thumbnails are provided, it displays a fallback thumbnail with a gradient background.
|
|
16530
16537
|
*/
|
|
16531
|
-
const ThumbnailCollage = ({ children =
|
|
16538
|
+
const ThumbnailCollage = ({ children = DEFAULT_CHILDREN, gradientBackground = "defaultMidOne", ...props }) => {
|
|
16532
16539
|
const thumbnailArray = Children.toArray(children);
|
|
16533
16540
|
const truncatedThumbnails = thumbnailArray.slice(0, 3);
|
|
16534
16541
|
const thumbnails = isNonEmptyArray(thumbnailArray) ? truncatedThumbnails.map((child) => {
|
|
@@ -16581,7 +16588,7 @@ const WistiaLogoComponent = styled.svg`
|
|
|
16581
16588
|
max-width: 100%;
|
|
16582
16589
|
|
|
16583
16590
|
&:hover {
|
|
16584
|
-
path {
|
|
16591
|
+
& path {
|
|
16585
16592
|
${({ $hoverColor }) => $hoverColor !== void 0 ? `fill: ${$hoverColor}` : null};
|
|
16586
16593
|
}
|
|
16587
16594
|
}
|
|
@@ -16646,6 +16653,6 @@ const WistiaLogo = ({ description, height = 100, hoverColor, href, iconOnly = fa
|
|
|
16646
16653
|
};
|
|
16647
16654
|
WistiaLogo.displayName = "WistiaLogo_UI";
|
|
16648
16655
|
//#endregion
|
|
16649
|
-
export { ActionButton, Avatar, Badge, Banner, Box, Breadcrumb, Breadcrumbs, Button, ButtonGroup, Card, Center, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, Collapsible, CollapsibleContent, CollapsibleTrigger, CollapsibleTriggerIcon, ColorGrid, ColorGridOption, ColorList, ColorListGroup, ColorListOption, ColorPicker, ColorPickerPopoverContent, ColorPickerSection, ColorPickerTrigger, ColorSchemeWrapper, Combobox, ComboboxOption, ContextMenu, ContrastControls, CustomizableThemeWrapper, DataCard, DataCardHoverArrow, DataCardTrend, DataCards, DataList, DataListItem, DataListItemLabel, DataListItemValue, DatePicker, Divider, EditableHeading, EditableText, EditableTextCancelButton, EditableTextContext, EditableTextDisplay, EditableTextInput, EditableTextLabel, EditableTextRoot, EditableTextSubmitButton, EditableTextTrigger, Ellipsis, FeatureCard, FeatureCardImage, FileAmountLimitValidator, FileSizeValidator, FileTypeValidator, FilterMenu, FilterMenuItem, Form, FormErrorSummary, FormField, FormGroup, Grid, Heading, HexColorInput, HueSlider, Icon, IconButton, Image, ImageDimensionsValidator, Input, InputClickToCopy, InputDuration, InputPassword, KeyboardShortcut, Label, Link, List, ListItem, Mark, Markdown, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Meter, Modal, ModalCallout, ModalCallouts, PersistentFileAmountLimitValidator, Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverCloseButton, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger, PreviewCard, ProgressBar, Radio, RadioCard, RadioCardImage, RadioGroup, RadioMenuItem, SaturationAndValuePicker, ScreenReaderOnly, ScrollArea, SegmentedControl, SegmentedControlItem, Select, SelectOption, SelectOptionGroup, Sidebar, SidebarButton, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarSearchInput, SidebarTitle, Slider, SplitButton, Stack, SubMenu, Switch, Table, TableBody, TableCell, TableFoot, TableHead, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, Text, Thumbnail, ThumbnailBadge, ThumbnailCollage, Tooltip, UIProvider, ValueNameOrHexCode, ValueSwatch, WistiaLogo, buildTimeDuration, calculateContrast, coerceToBoolean, colorSchemeOptions, copyToClipboard, dateOnlyISOString, dateOnlyString, dateOnlyStringForSentence, dateOnlyStringNumeric, dateTime, dateTimeRounded, dateTimeString, dateTimeStringForSentence, dateTimeToDate, dateTimeToISO, dateToDateTime, dateUTCOffset, dayOfWeekString, getBackgroundGradient, getSemiRandomBackgroundGradient, iconSizeMap, isKeyboardKey, isUrl, mediaDurationString, mergeRefs, millisecondsToDurationISOString, monthDayStringNumeric, mq, parseDateString, sessionDurationString, stripExtension, timeAgoString, timeOnlyString, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useKeyPress, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize, validateWithYup };
|
|
16656
|
+
export { ActionButton, Avatar, Badge, Banner, Box, Breadcrumb, Breadcrumbs, Button, ButtonGroup, Card, Center, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, Collapsible, CollapsibleContent, CollapsibleTrigger, CollapsibleTriggerIcon, ColorGrid, ColorGridOption, ColorList, ColorListGroup, ColorListOption, ColorPicker, ColorPickerPopoverContent, ColorPickerSection, ColorPickerTrigger, ColorSchemeWrapper, Combobox, ComboboxOption, ContextMenu, ContrastControls, ContrastEnforcerSwitch, ContrastIndicator, ContrastPreview, CustomizableThemeWrapper, DataCard, DataCardHoverArrow, DataCardTrend, DataCards, DataList, DataListItem, DataListItemLabel, DataListItemValue, DatePicker, Divider, EditableHeading, EditableText, EditableTextCancelButton, EditableTextContext, EditableTextDisplay, EditableTextInput, EditableTextLabel, EditableTextRoot, EditableTextSubmitButton, EditableTextTrigger, Ellipsis, FeatureCard, FeatureCardImage, FileAmountLimitValidator, FileSizeValidator, FileTypeValidator, FilterMenu, FilterMenuItem, Form, FormErrorSummary, FormField, FormGroup, Grid, Heading, HexColorInput, HueSlider, Icon, IconButton, Image, ImageDimensionsValidator, Input, InputClickToCopy, InputDuration, InputPassword, KeyboardShortcut, Label, Link, List, ListItem, Mark, Markdown, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Meter, Modal, ModalCallout, ModalCallouts, PersistentFileAmountLimitValidator, Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverCloseButton, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger, PreviewCard, ProgressBar, Radio, RadioCard, RadioCardImage, RadioGroup, RadioMenuItem, SaturationAndValuePicker, ScreenReaderOnly, ScrollArea, SegmentedControl, SegmentedControlItem, Select, SelectOption, SelectOptionGroup, Sidebar, SidebarButton, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarSearchInput, SidebarTitle, Slider, SplitButton, Stack, SubMenu, Switch, Table, TableBody, TableCell, TableFoot, TableHead, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, Text, Thumbnail, ThumbnailBadge, ThumbnailCollage, Tooltip, UIProvider, ValueNameOrHexCode, ValueSwatch, WistiaLogo, buildTimeDuration, calculateContrast, coerceToBoolean, colorSchemeOptions, copyToClipboard, dateOnlyISOString, dateOnlyString, dateOnlyStringForSentence, dateOnlyStringNumeric, dateTime, dateTimeRounded, dateTimeString, dateTimeStringForSentence, dateTimeToDate, dateTimeToISO, dateToDateTime, dateUTCOffset, dayOfWeekString, getBackgroundGradient, getSemiRandomBackgroundGradient, iconSizeMap, isKeyboardKey, isUrl, mediaDurationString, mergeRefs, millisecondsToDurationISOString, monthDayStringNumeric, mq, parseDateString, sessionDurationString, stripExtension, timeAgoString, timeOnlyString, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useKeyPress, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize, validateWithYup };
|
|
16650
16657
|
|
|
16651
16658
|
//# sourceMappingURL=index.js.map
|