@wistia/ui 0.8.11 → 0.8.13
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 +10 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +20 -9
- package/dist/index.d.ts +20 -9
- package/dist/index.mjs +10 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -800,6 +800,8 @@ declare const ButtonGroup: {
|
|
|
800
800
|
displayName: string;
|
|
801
801
|
};
|
|
802
802
|
|
|
803
|
+
type BorderRadius = 'border-radius-00' | 'border-radius-01' | 'border-radius-02' | 'border-radius-03' | 'border-radius-04' | 'border-radius-05' | 'border-radius-rounded';
|
|
804
|
+
|
|
803
805
|
type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
|
|
804
806
|
/**
|
|
805
807
|
* Content to be rendered inside the Card component
|
|
@@ -822,9 +824,9 @@ type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
|
|
|
822
824
|
*/
|
|
823
825
|
border?: boolean;
|
|
824
826
|
/**
|
|
825
|
-
*
|
|
827
|
+
* Border radius to apply to the Card
|
|
826
828
|
*/
|
|
827
|
-
|
|
829
|
+
borderRadius?: BorderRadius;
|
|
828
830
|
/**
|
|
829
831
|
* Specifies the gaps (gutters) between rows and columns
|
|
830
832
|
*/
|
|
@@ -853,6 +855,10 @@ type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
|
|
|
853
855
|
* @ignore
|
|
854
856
|
*/
|
|
855
857
|
basis?: BoxProps['basis'];
|
|
858
|
+
/**
|
|
859
|
+
* @ignore
|
|
860
|
+
*/
|
|
861
|
+
direction?: BoxProps['direction'];
|
|
856
862
|
/**
|
|
857
863
|
* @ignore
|
|
858
864
|
*/
|
|
@@ -861,6 +867,10 @@ type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
|
|
|
861
867
|
* @ignore
|
|
862
868
|
*/
|
|
863
869
|
fillViewport?: BoxProps['fillViewport'];
|
|
870
|
+
/**
|
|
871
|
+
* @ignore
|
|
872
|
+
*/
|
|
873
|
+
flexMode?: BoxProps['flexMode'];
|
|
864
874
|
/**
|
|
865
875
|
* @ignore
|
|
866
876
|
*/
|
|
@@ -891,7 +901,7 @@ type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
|
|
|
891
901
|
* Cards can be used to visually distinguish content sections. Extends the [Box component.](https://wistia.github.io/vhs/storybook-ui/?path=/docs/components-box--docs)
|
|
892
902
|
*/
|
|
893
903
|
declare const Card: {
|
|
894
|
-
({ children,
|
|
904
|
+
({ children, border, borderRadius, colorScheme, direction, gap, height, paddingSize, prominence, width, ...props }: CardProps): JSX.Element;
|
|
895
905
|
displayName: string;
|
|
896
906
|
};
|
|
897
907
|
|
|
@@ -1612,7 +1622,7 @@ type IconProps = ComponentPropsWithoutRef<'svg'> & {
|
|
|
1612
1622
|
/**
|
|
1613
1623
|
* The size of the icon to display
|
|
1614
1624
|
*/
|
|
1615
|
-
size?: keyof typeof iconSizeMap;
|
|
1625
|
+
size?: ResponsiveObject<keyof typeof iconSizeMap> | keyof typeof iconSizeMap;
|
|
1616
1626
|
/**
|
|
1617
1627
|
* @ignore
|
|
1618
1628
|
*/
|
|
@@ -1665,8 +1675,6 @@ declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
|
1665
1675
|
children: JSX.Element;
|
|
1666
1676
|
} & Omit<ButtonAsLinkProps, "leftIcon" | "rightIcon" | "fullWidth">, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
1667
1677
|
|
|
1668
|
-
type BorderRadius = 'border-radius-01' | 'border-radius-02' | 'border-radius-03' | 'border-radius-04' | 'border-radius-05' | 'border-radius-rounded';
|
|
1669
|
-
|
|
1670
1678
|
type ImageProps = ComponentPropsWithoutRef<'img'> & {
|
|
1671
1679
|
/**
|
|
1672
1680
|
* Accessible text to apply to the image
|
|
@@ -2703,18 +2711,21 @@ type StackProps = {
|
|
|
2703
2711
|
/**
|
|
2704
2712
|
* The gap between each item in the stack. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
|
|
2705
2713
|
* TODO: add link to Spacing docs
|
|
2714
|
+
*
|
|
2706
2715
|
*/
|
|
2707
|
-
gap?: Spacings;
|
|
2716
|
+
gap?: ResponsiveObject<Spacings> | Spacings;
|
|
2708
2717
|
/**
|
|
2709
2718
|
* Vertical is equivalent to `flex-direction: column;`, horizontal is equivalent to `flex-direction: row;`.
|
|
2710
2719
|
* The default behavior is `vertical`. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
|
|
2711
2720
|
*/
|
|
2712
|
-
direction?: 'horizontal' | 'vertical';
|
|
2721
|
+
direction?: ResponsiveObject<'horizontal' | 'vertical'> | 'horizontal' | 'vertical';
|
|
2713
2722
|
/**
|
|
2714
2723
|
* Controls how items are aligned along the cross-axis.
|
|
2715
2724
|
* Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
|
|
2725
|
+
*
|
|
2726
|
+
* @type 'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch' | ResponsiveObject<'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch'>
|
|
2716
2727
|
*/
|
|
2717
|
-
alignItems?: AlignItemsType
|
|
2728
|
+
alignItems?: AlignItemsType | ResponsiveObject<AlignItemsType>;
|
|
2718
2729
|
renderAs?: ElementType;
|
|
2719
2730
|
};
|
|
2720
2731
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -800,6 +800,8 @@ declare const ButtonGroup: {
|
|
|
800
800
|
displayName: string;
|
|
801
801
|
};
|
|
802
802
|
|
|
803
|
+
type BorderRadius = 'border-radius-00' | 'border-radius-01' | 'border-radius-02' | 'border-radius-03' | 'border-radius-04' | 'border-radius-05' | 'border-radius-rounded';
|
|
804
|
+
|
|
803
805
|
type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
|
|
804
806
|
/**
|
|
805
807
|
* Content to be rendered inside the Card component
|
|
@@ -822,9 +824,9 @@ type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
|
|
|
822
824
|
*/
|
|
823
825
|
border?: boolean;
|
|
824
826
|
/**
|
|
825
|
-
*
|
|
827
|
+
* Border radius to apply to the Card
|
|
826
828
|
*/
|
|
827
|
-
|
|
829
|
+
borderRadius?: BorderRadius;
|
|
828
830
|
/**
|
|
829
831
|
* Specifies the gaps (gutters) between rows and columns
|
|
830
832
|
*/
|
|
@@ -853,6 +855,10 @@ type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
|
|
|
853
855
|
* @ignore
|
|
854
856
|
*/
|
|
855
857
|
basis?: BoxProps['basis'];
|
|
858
|
+
/**
|
|
859
|
+
* @ignore
|
|
860
|
+
*/
|
|
861
|
+
direction?: BoxProps['direction'];
|
|
856
862
|
/**
|
|
857
863
|
* @ignore
|
|
858
864
|
*/
|
|
@@ -861,6 +867,10 @@ type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
|
|
|
861
867
|
* @ignore
|
|
862
868
|
*/
|
|
863
869
|
fillViewport?: BoxProps['fillViewport'];
|
|
870
|
+
/**
|
|
871
|
+
* @ignore
|
|
872
|
+
*/
|
|
873
|
+
flexMode?: BoxProps['flexMode'];
|
|
864
874
|
/**
|
|
865
875
|
* @ignore
|
|
866
876
|
*/
|
|
@@ -891,7 +901,7 @@ type CardProps = BoxProps & ComponentPropsWithoutRef<'div'> & {
|
|
|
891
901
|
* Cards can be used to visually distinguish content sections. Extends the [Box component.](https://wistia.github.io/vhs/storybook-ui/?path=/docs/components-box--docs)
|
|
892
902
|
*/
|
|
893
903
|
declare const Card: {
|
|
894
|
-
({ children,
|
|
904
|
+
({ children, border, borderRadius, colorScheme, direction, gap, height, paddingSize, prominence, width, ...props }: CardProps): JSX.Element;
|
|
895
905
|
displayName: string;
|
|
896
906
|
};
|
|
897
907
|
|
|
@@ -1612,7 +1622,7 @@ type IconProps = ComponentPropsWithoutRef<'svg'> & {
|
|
|
1612
1622
|
/**
|
|
1613
1623
|
* The size of the icon to display
|
|
1614
1624
|
*/
|
|
1615
|
-
size?: keyof typeof iconSizeMap;
|
|
1625
|
+
size?: ResponsiveObject<keyof typeof iconSizeMap> | keyof typeof iconSizeMap;
|
|
1616
1626
|
/**
|
|
1617
1627
|
* @ignore
|
|
1618
1628
|
*/
|
|
@@ -1665,8 +1675,6 @@ declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
|
1665
1675
|
children: JSX.Element;
|
|
1666
1676
|
} & Omit<ButtonAsLinkProps, "leftIcon" | "rightIcon" | "fullWidth">, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
1667
1677
|
|
|
1668
|
-
type BorderRadius = 'border-radius-01' | 'border-radius-02' | 'border-radius-03' | 'border-radius-04' | 'border-radius-05' | 'border-radius-rounded';
|
|
1669
|
-
|
|
1670
1678
|
type ImageProps = ComponentPropsWithoutRef<'img'> & {
|
|
1671
1679
|
/**
|
|
1672
1680
|
* Accessible text to apply to the image
|
|
@@ -2703,18 +2711,21 @@ type StackProps = {
|
|
|
2703
2711
|
/**
|
|
2704
2712
|
* The gap between each item in the stack. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
|
|
2705
2713
|
* TODO: add link to Spacing docs
|
|
2714
|
+
*
|
|
2706
2715
|
*/
|
|
2707
|
-
gap?: Spacings;
|
|
2716
|
+
gap?: ResponsiveObject<Spacings> | Spacings;
|
|
2708
2717
|
/**
|
|
2709
2718
|
* Vertical is equivalent to `flex-direction: column;`, horizontal is equivalent to `flex-direction: row;`.
|
|
2710
2719
|
* The default behavior is `vertical`. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
|
|
2711
2720
|
*/
|
|
2712
|
-
direction?: 'horizontal' | 'vertical';
|
|
2721
|
+
direction?: ResponsiveObject<'horizontal' | 'vertical'> | 'horizontal' | 'vertical';
|
|
2713
2722
|
/**
|
|
2714
2723
|
* Controls how items are aligned along the cross-axis.
|
|
2715
2724
|
* Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
|
|
2725
|
+
*
|
|
2726
|
+
* @type 'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch' | ResponsiveObject<'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch'>
|
|
2716
2727
|
*/
|
|
2717
|
-
alignItems?: AlignItemsType
|
|
2728
|
+
alignItems?: AlignItemsType | ResponsiveObject<AlignItemsType>;
|
|
2718
2729
|
renderAs?: ElementType;
|
|
2719
2730
|
};
|
|
2720
2731
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.8.
|
|
3
|
+
* @license @wistia/ui v0.8.13
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -1142,6 +1142,7 @@ var colorAliasTokens = css3`
|
|
|
1142
1142
|
// src/css/designTokens/borderRadius.tsx
|
|
1143
1143
|
import { css as css4 } from "styled-components";
|
|
1144
1144
|
var borderRadiusTokens = css4`
|
|
1145
|
+
--wui-border-radius-00: 0;
|
|
1145
1146
|
--wui-border-radius-01: 4px;
|
|
1146
1147
|
--wui-border-radius-02: 8px;
|
|
1147
1148
|
--wui-border-radius-03: 16px;
|
|
@@ -7914,7 +7915,7 @@ var StyledCard = styled15(Box)`
|
|
|
7914
7915
|
background-color: ${({ $backgroundColor }) => $backgroundColor};
|
|
7915
7916
|
outline: 2px solid ${({ $borderColor }) => $borderColor};
|
|
7916
7917
|
outline-offset: -2px;
|
|
7917
|
-
border-radius: var(--wui
|
|
7918
|
+
border-radius: ${({ $borderRadius }) => `var(--wui-${$borderRadius})`};
|
|
7918
7919
|
display: flex;
|
|
7919
7920
|
height: ${({ $height }) => $height};
|
|
7920
7921
|
width: ${({ $width }) => $width};
|
|
@@ -7935,13 +7936,14 @@ var prominenceMap = {
|
|
|
7935
7936
|
};
|
|
7936
7937
|
var Card = ({
|
|
7937
7938
|
children,
|
|
7938
|
-
paddingSize = "space-04",
|
|
7939
|
-
gap = "space-03",
|
|
7940
|
-
direction = "column",
|
|
7941
|
-
colorScheme = "inherit",
|
|
7942
|
-
prominence = "secondary",
|
|
7943
7939
|
border = false,
|
|
7940
|
+
borderRadius = "border-radius-04",
|
|
7941
|
+
colorScheme = "inherit",
|
|
7942
|
+
direction = "column",
|
|
7943
|
+
gap = "space-03",
|
|
7944
7944
|
height,
|
|
7945
|
+
paddingSize = "space-04",
|
|
7946
|
+
prominence = "secondary",
|
|
7945
7947
|
width,
|
|
7946
7948
|
...props
|
|
7947
7949
|
}) => /* @__PURE__ */ jsx203(
|
|
@@ -7949,6 +7951,7 @@ var Card = ({
|
|
|
7949
7951
|
{
|
|
7950
7952
|
$backgroundColor: prominenceMap[prominence].backgroundColor,
|
|
7951
7953
|
$borderColor: border ? prominenceMap[prominence].borderColor : "transparent",
|
|
7954
|
+
$borderRadius: borderRadius,
|
|
7952
7955
|
$colorScheme: colorScheme,
|
|
7953
7956
|
$height: height,
|
|
7954
7957
|
$paddingSize: paddingSize,
|