@wistia/ui 0.20.10 → 0.20.12-beta.33651784.d797269
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 +18 -1
- package/dist/index.js +24 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,15 @@ type UIProviderProps = {
|
|
|
21
21
|
};
|
|
22
22
|
declare const UIProvider: ({ children }: UIProviderProps) => react_jsx_runtime.JSX.Element;
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Converts a boolean string value `value` into a boolean. If passed
|
|
26
|
+
* something other than 'true' or 'false' will coerce value to boolean.
|
|
27
|
+
*
|
|
28
|
+
* @param {*} value - a value of any type
|
|
29
|
+
* @returns {boolean} - that value as a boolean
|
|
30
|
+
*/
|
|
31
|
+
declare const coerceToBoolean: (value: unknown) => boolean;
|
|
32
|
+
|
|
24
33
|
/**
|
|
25
34
|
* Copies a string to user's clipboard for easy pasting in another location
|
|
26
35
|
*
|
|
@@ -3868,6 +3877,14 @@ type StackProps = {
|
|
|
3868
3877
|
* @type 'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch' | ResponsiveObject<'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch'>
|
|
3869
3878
|
*/
|
|
3870
3879
|
alignItems?: AlignItemsType | ResponsiveObject<AlignItemsType>;
|
|
3880
|
+
/**
|
|
3881
|
+
* Padding to apply to the stack container. Use `x` for horizontal (left/right) padding and `y` for vertical (top/bottom) padding.
|
|
3882
|
+
* Each value can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
|
|
3883
|
+
*/
|
|
3884
|
+
padding?: {
|
|
3885
|
+
x?: ResponsiveObject<Spacings> | Spacings;
|
|
3886
|
+
y?: ResponsiveObject<Spacings> | Spacings;
|
|
3887
|
+
};
|
|
3871
3888
|
renderAs?: ElementType;
|
|
3872
3889
|
};
|
|
3873
3890
|
/**
|
|
@@ -4427,4 +4444,4 @@ declare const CustomizableThemeWrapper: {
|
|
|
4427
4444
|
displayName: string;
|
|
4428
4445
|
};
|
|
4429
4446
|
|
|
4430
|
-
export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Banner, BannerImage, type BannerProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, CollapsibleTriggerIcon, ColorGrid, ColorGridOption, type ColorGridOptionProps, type ColorGridProps, ColorList, ColorListGroup, type ColorListGroupProps, ColorListOption, type ColorListOptionProps, type ColorListProps, ColorPicker, ColorPickerPopoverContent, type ColorPickerPopoverContentProps, type ColorPickerProps, ColorPickerSection, type ColorPickerSectionProps, ColorPickerTrigger, type ColorPickerTriggerProps, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Combobox, ComboboxOption, type ComboboxOptionProps, type ComboboxProps, ContextMenu, type ContextMenuProps, ContrastControls, CustomizableThemeWrapper, type CustomizableThemeWrapperProps, DataCard, DataCardHoverArrow, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, DataList, DataListItem, DataListItemLabel, DataListItemValue, type DataListProps, Divider, EditableHeading, type EditableHeadingProps, EditableText, EditableTextCancelButton, EditableTextContext, EditableTextDisplay, EditableTextInput, EditableTextLabel, type EditableTextProps, EditableTextRoot, type EditableTextRootProps, EditableTextSubmitButton, EditableTextTrigger, Ellipsis, type EllipsisProps, FilterMenu, FilterMenuItem, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Grid, type GridProps, Heading, type HeadingProps, HexColorInput, type HexColorInputProps, HueSlider, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, InputPassword, type InputPasswordProps, type InputProps, type KeyboardKeys, KeyboardShortcut, Label, type LabelProps, Link, type LinkProps, List, ListItem, type ListItemProps, type ListProps, Mark, type MarkProps, Markdown, type MarkdownProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, ModalCallout, ModalCallouts, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioCard, RadioCardImage, type RadioCardImageProps, type RadioCardProps, RadioGroup, RadioMenuItem, type RadioProps, SaturationAndValuePicker, ScreenReaderOnly, ScrollArea, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Slider, type SliderProps, SplitButton, type SplitButtonProps, Stack, SubMenu, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFoot, type TableFootProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseActiveMqReturnType, type UseIsHoveredReturnType, type UseMqReturnType, type UseToastProps, ValueNameOrHexCode, ValueSwatch, WistiaLogo, calculateContrast, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize, validateWithYup };
|
|
4447
|
+
export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Banner, BannerImage, type BannerProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, CollapsibleTriggerIcon, ColorGrid, ColorGridOption, type ColorGridOptionProps, type ColorGridProps, ColorList, ColorListGroup, type ColorListGroupProps, ColorListOption, type ColorListOptionProps, type ColorListProps, ColorPicker, ColorPickerPopoverContent, type ColorPickerPopoverContentProps, type ColorPickerProps, ColorPickerSection, type ColorPickerSectionProps, ColorPickerTrigger, type ColorPickerTriggerProps, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Combobox, ComboboxOption, type ComboboxOptionProps, type ComboboxProps, ContextMenu, type ContextMenuProps, ContrastControls, CustomizableThemeWrapper, type CustomizableThemeWrapperProps, DataCard, DataCardHoverArrow, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, DataList, DataListItem, DataListItemLabel, DataListItemValue, type DataListProps, Divider, EditableHeading, type EditableHeadingProps, EditableText, EditableTextCancelButton, EditableTextContext, EditableTextDisplay, EditableTextInput, EditableTextLabel, type EditableTextProps, EditableTextRoot, type EditableTextRootProps, EditableTextSubmitButton, EditableTextTrigger, Ellipsis, type EllipsisProps, FilterMenu, FilterMenuItem, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Grid, type GridProps, Heading, type HeadingProps, HexColorInput, type HexColorInputProps, HueSlider, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, InputPassword, type InputPasswordProps, type InputProps, type KeyboardKeys, KeyboardShortcut, Label, type LabelProps, Link, type LinkProps, List, ListItem, type ListItemProps, type ListProps, Mark, type MarkProps, Markdown, type MarkdownProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, ModalCallout, ModalCallouts, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioCard, RadioCardImage, type RadioCardImageProps, type RadioCardProps, RadioGroup, RadioMenuItem, type RadioProps, SaturationAndValuePicker, ScreenReaderOnly, ScrollArea, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Slider, type SliderProps, SplitButton, type SplitButtonProps, Stack, SubMenu, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFoot, type TableFootProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseActiveMqReturnType, type UseIsHoveredReturnType, type UseMqReturnType, type UseToastProps, ValueNameOrHexCode, ValueSwatch, WistiaLogo, calculateContrast, coerceToBoolean, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize, validateWithYup };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.20.
|
|
3
|
+
* @license @wistia/ui v0.20.12-beta.33651784.d797269
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2026, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -2001,6 +2001,14 @@ var UIProvider = ({ children }) => {
|
|
|
2001
2001
|
] }) }) });
|
|
2002
2002
|
};
|
|
2003
2003
|
|
|
2004
|
+
// src/helpers/coerceToBoolean/coerceToBoolean.ts
|
|
2005
|
+
var coerceToBoolean = (value) => {
|
|
2006
|
+
if (value === "true" || value === "false") {
|
|
2007
|
+
return value === "true";
|
|
2008
|
+
}
|
|
2009
|
+
return Boolean(value);
|
|
2010
|
+
};
|
|
2011
|
+
|
|
2004
2012
|
// src/helpers/copyToClipboard/copyToClipboard.ts
|
|
2005
2013
|
import { isNil } from "@wistia/type-guards";
|
|
2006
2014
|
var copyToClipboard = async (textToCopy) => {
|
|
@@ -10042,12 +10050,23 @@ var StyledStack = styled26.div`
|
|
|
10042
10050
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
10043
10051
|
gap: ${({ $gap }) => `var(--wui-${$gap})`};
|
|
10044
10052
|
align-items: ${({ $alignItems }) => $alignItems};
|
|
10053
|
+
${({ $paddingX }) => $paddingX && `padding-left: var(--wui-${$paddingX}); padding-right: var(--wui-${$paddingX});`}
|
|
10054
|
+
${({ $paddingY }) => $paddingY && `padding-top: var(--wui-${$paddingY}); padding-bottom: var(--wui-${$paddingY});`}
|
|
10045
10055
|
`;
|
|
10046
10056
|
var StackComponent = forwardRef10(
|
|
10047
|
-
({
|
|
10057
|
+
({
|
|
10058
|
+
renderAs,
|
|
10059
|
+
direction = "vertical",
|
|
10060
|
+
gap = "space-02",
|
|
10061
|
+
alignItems = "stretch",
|
|
10062
|
+
padding,
|
|
10063
|
+
...props
|
|
10064
|
+
}, ref) => {
|
|
10048
10065
|
const responsiveGap = useResponsiveProp(gap);
|
|
10049
10066
|
const responsiveDirection = useResponsiveProp(direction);
|
|
10050
10067
|
const responsiveAlignItems = useResponsiveProp(alignItems);
|
|
10068
|
+
const responsivePaddingX = useResponsiveProp(padding?.x);
|
|
10069
|
+
const responsivePaddingY = useResponsiveProp(padding?.y);
|
|
10051
10070
|
return /* @__PURE__ */ jsx240(
|
|
10052
10071
|
StyledStack,
|
|
10053
10072
|
{
|
|
@@ -10055,6 +10074,8 @@ var StackComponent = forwardRef10(
|
|
|
10055
10074
|
$alignItems: responsiveAlignItems,
|
|
10056
10075
|
$direction: responsiveDirection,
|
|
10057
10076
|
$gap: responsiveGap,
|
|
10077
|
+
$paddingX: responsivePaddingX,
|
|
10078
|
+
$paddingY: responsivePaddingY,
|
|
10058
10079
|
as: renderAs ?? DEFAULT_ELEMENT4,
|
|
10059
10080
|
...props
|
|
10060
10081
|
}
|
|
@@ -19388,6 +19409,7 @@ export {
|
|
|
19388
19409
|
ValueSwatch,
|
|
19389
19410
|
WistiaLogo,
|
|
19390
19411
|
calculateContrast,
|
|
19412
|
+
coerceToBoolean,
|
|
19391
19413
|
colorSchemeOptions,
|
|
19392
19414
|
copyToClipboard,
|
|
19393
19415
|
dateTime,
|