@wistia/ui 0.21.1 → 0.21.2-beta.527f4090.c8c7b4e
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 +119 -24
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/package.json +15 -16
package/dist/index.d.ts
CHANGED
|
@@ -351,6 +351,8 @@ type BaseButtonProps = {
|
|
|
351
351
|
rightIcon?: ReactNode | undefined;
|
|
352
352
|
/**
|
|
353
353
|
* The size of button to display. Can be used as a [responsive prop](/docs/ui-docs-responsive-props--docs)
|
|
354
|
+
*
|
|
355
|
+
* @type ResponsiveObject<'lg' | 'md' | 'sm' | 'xl'>
|
|
354
356
|
*/
|
|
355
357
|
size?: ButtonSizes | ResponsiveObject<ButtonSizes>;
|
|
356
358
|
/**
|
|
@@ -614,11 +616,11 @@ declare const Avatar: {
|
|
|
614
616
|
type BadgeVariants = 'default' | 'outline';
|
|
615
617
|
type BadgeProps = ComponentPropsWithoutRef<'div'> & {
|
|
616
618
|
/**
|
|
617
|
-
* Sets the [color scheme](
|
|
619
|
+
* Sets the [color scheme](/docs/color-schemes)
|
|
618
620
|
*/
|
|
619
621
|
colorScheme?: ColorSchemeTypes;
|
|
620
622
|
/**
|
|
621
|
-
* Optional `Icon` component to use. Must be an instance of [Icon](
|
|
623
|
+
* Optional `Icon` component to use. Must be an instance of [Icon](/docs/components/Icon)
|
|
622
624
|
*/
|
|
623
625
|
icon?: JSX.Element | undefined;
|
|
624
626
|
/**
|
|
@@ -635,11 +637,11 @@ type BadgeProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
635
637
|
*/
|
|
636
638
|
declare const Badge: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
637
639
|
/**
|
|
638
|
-
* Sets the [color scheme](
|
|
640
|
+
* Sets the [color scheme](/docs/color-schemes)
|
|
639
641
|
*/
|
|
640
642
|
colorScheme?: ColorSchemeTypes;
|
|
641
643
|
/**
|
|
642
|
-
* Optional `Icon` component to use. Must be an instance of [Icon](
|
|
644
|
+
* Optional `Icon` component to use. Must be an instance of [Icon](/docs/components/Icon)
|
|
643
645
|
*/
|
|
644
646
|
icon?: JSX.Element | undefined;
|
|
645
647
|
/**
|
|
@@ -750,7 +752,8 @@ type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
|
|
|
750
752
|
/**
|
|
751
753
|
* Specifies how the browser distributes space between and around
|
|
752
754
|
* items along the cross-axis of their container; has no effect on
|
|
753
|
-
* single line flexible boxes. Can be a [responsive prop](/docs/
|
|
755
|
+
* single line flexible boxes. Can be a [responsive prop](/docs/responsive-props).
|
|
756
|
+
* @type ResponsiveObject<"center" | "flex-end" | "flex-start" | "space-around" | "space-between" | "stretch">
|
|
754
757
|
*/
|
|
755
758
|
alignContent?: AlignContentType | ResponsiveObject<AlignContentType>;
|
|
756
759
|
/**
|
|
@@ -759,23 +762,28 @@ type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
|
|
|
759
762
|
* to the alignContent prop is that alignItems specifies the
|
|
760
763
|
* alignment of the items within the current container's line,
|
|
761
764
|
* whereas alignContent specifies the alignment of the lines themselves.
|
|
762
|
-
* Can be a [responsive prop](/docs/
|
|
765
|
+
* Can be a [responsive prop](/docs/responsive-props).
|
|
766
|
+
* @type ResponsiveObject<"baseline" | "center" | "flex-end" | "flex-start" | "stretch">
|
|
763
767
|
*/
|
|
764
768
|
alignItems?: AlignItemsType | ResponsiveObject<AlignItemsType>;
|
|
765
769
|
/**
|
|
766
770
|
* Specifies how the browser aligns items of the current line, overriding the
|
|
767
771
|
* alignItems value of parent; if any of the item's cross-axis margin is set to auto,
|
|
768
|
-
* then alignSelf is ignored. Can be a [responsive prop](/docs/
|
|
772
|
+
* then alignSelf is ignored. Can be a [responsive prop](/docs/responsive-props).
|
|
769
773
|
*
|
|
770
774
|
* *Note: only works for nested `<Box />`*
|
|
775
|
+
*
|
|
776
|
+
* @type ResponsiveObject<'auto' | 'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch'>
|
|
771
777
|
*/
|
|
772
778
|
alignSelf?: AlignSelfType | ResponsiveObject<AlignSelfType>;
|
|
773
779
|
/**
|
|
774
|
-
* Specifies the initial main size of an item. Can be a [responsive prop](/docs/
|
|
780
|
+
* Specifies the initial main size of an item. Can be a [responsive prop](/docs/responsive-props).
|
|
775
781
|
*
|
|
776
782
|
* *Note: Cannot be used with `flexMode` prop.*
|
|
777
783
|
*
|
|
778
784
|
* *Note: only works for nested `<Box />`*
|
|
785
|
+
* @type ResponsiveObject<'string'>
|
|
786
|
+
|
|
779
787
|
*/
|
|
780
788
|
basis?: ResponsiveObject<string> | string;
|
|
781
789
|
/**
|
|
@@ -783,17 +791,19 @@ type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
|
|
|
783
791
|
*/
|
|
784
792
|
children?: ReactNode;
|
|
785
793
|
/**
|
|
786
|
-
* Specifies the main axis of the container. Can be a [responsive prop](/docs/
|
|
794
|
+
* Specifies the main axis of the container. Can be a [responsive prop](/docs/responsive-props).
|
|
795
|
+
* @type ResponsiveObject<'column-reverse' | 'column' | 'row-reverse' | 'row'>
|
|
787
796
|
*/
|
|
788
797
|
direction?: DirectionType | ResponsiveObject<DirectionType>;
|
|
789
798
|
/**
|
|
790
799
|
* Specifies whether the width and/or height should fill the container.
|
|
791
|
-
* Can be a [responsive prop](/docs/
|
|
800
|
+
* Can be a [responsive prop](/docs/responsive-props).
|
|
792
801
|
*
|
|
793
802
|
* *Note: Cannot be used with height/width props when setting the corresponding dimension.*
|
|
794
803
|
*
|
|
795
804
|
* For example, `fill="vertical"` or `fill={true}` cannot be used with the `height` prop,
|
|
796
805
|
* and `fill="horizontal"` or `fill={true}` cannot be used with the `width` prop.
|
|
806
|
+
* @type ResponsiveObject<boolean | 'horizontal' | 'vertical'>
|
|
797
807
|
*/
|
|
798
808
|
fill?: FillType | ResponsiveObject<FillType>;
|
|
799
809
|
/**
|
|
@@ -803,49 +813,58 @@ type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
|
|
|
803
813
|
*
|
|
804
814
|
* For example, `fillViewport="vertical"` or `fillViewport={true}` cannot be used with the `height` prop,
|
|
805
815
|
* and `fillViewport="horizontal"` or `fillViewport={true}` cannot be used with the `width` prop.
|
|
816
|
+
* @type boolean | 'horizontal' | 'vertical'
|
|
806
817
|
*/
|
|
807
818
|
fillViewport?: FillType;
|
|
808
819
|
/**
|
|
809
|
-
* Predefined `flex` behavior patterns. Can be a [responsive prop](/docs/
|
|
820
|
+
* Predefined `flex` behavior patterns. Can be a [responsive prop](/docs/responsive-props).
|
|
810
821
|
*
|
|
811
822
|
* - `grow`: fills available space (`flex: 1 0 0`)
|
|
812
823
|
* - `initial`: default behavior (`flex: 0 1 auto`)
|
|
813
824
|
* - `equal`: equal space distribution (`flex: 1`)
|
|
814
825
|
* - `rigid`: fixed size (`flex: 0 0 auto`)
|
|
815
826
|
* - `fluid`: responsive (`flex: 1 1 auto`)
|
|
827
|
+
*
|
|
828
|
+
* @type ResponsiveObject<'equal' | 'fluid' | 'grow' | 'initial' | 'rigid'>
|
|
816
829
|
*/
|
|
817
830
|
flexMode?: FlexModeType | ResponsiveObject<FlexModeType>;
|
|
818
831
|
/**
|
|
819
832
|
* Specifies the gaps (gutters) between rows and columns.
|
|
820
|
-
* Can be a [responsive prop](/docs/
|
|
833
|
+
* Can be a [responsive prop](/docs/responsive-props).
|
|
821
834
|
*
|
|
822
835
|
* Can be either a single spacing value that applies to both row and column gaps,
|
|
823
836
|
* or an object specifying different values for row and column gaps.
|
|
837
|
+
*
|
|
838
|
+
* @type ResponsiveObject<Spacings | { row: Spacings; column: Spacings }>
|
|
824
839
|
*/
|
|
825
840
|
gap?: Gap$1 | ResponsiveGap$1 | Spacings;
|
|
826
841
|
/**
|
|
827
842
|
* Specifies what amount of space inside the flex container the item should take up.
|
|
828
|
-
* Can be a [responsive prop](/docs/
|
|
843
|
+
* Can be a [responsive prop](/docs/responsive-props).
|
|
829
844
|
*
|
|
830
845
|
* *Note: Cannot be used with `flexMode` prop.*
|
|
831
846
|
*
|
|
832
847
|
* *Note: only works for nested `<Box />`*
|
|
848
|
+
* @type ResponsiveObject<number | string>
|
|
833
849
|
*/
|
|
834
850
|
grow?: ResponsiveObject<number | string> | number | string;
|
|
835
851
|
/**
|
|
836
|
-
* Specifies the height of the box. Can be a [responsive prop](/docs/
|
|
852
|
+
* Specifies the height of the box. Can be a [responsive prop](/docs/responsive-props).
|
|
837
853
|
*
|
|
838
854
|
* *Note: Cannot be used with fill="vertical" or fillViewport="vertical"*
|
|
855
|
+
* @type ResponsiveObject<string>
|
|
839
856
|
*/
|
|
840
857
|
height?: ResponsiveObject<string> | string;
|
|
841
858
|
/**
|
|
842
859
|
* Make Layout behave like an inline element but still lay out its content according to flexbox model.
|
|
843
|
-
* Can be a [responsive prop](/docs/
|
|
860
|
+
* Can be a [responsive prop](/docs/responsive-props).
|
|
861
|
+
* @type ResponsiveObject<boolean>
|
|
844
862
|
*/
|
|
845
863
|
inline?: ResponsiveObject<boolean> | boolean;
|
|
846
864
|
/**
|
|
847
865
|
* Specifies how the browser distributes space between and around
|
|
848
|
-
* items along the main axis of their container. Can be a [responsive prop](/docs/
|
|
866
|
+
* items along the main axis of their container. Can be a [responsive prop](/docs/responsive-props).
|
|
867
|
+
* @type ResponsiveObject<'center' | 'flex-end' | 'flex-start' | 'space-around' | 'space-between' | 'space-evenly'>
|
|
849
868
|
*/
|
|
850
869
|
justifyContent?: JustifyContentType | ResponsiveObject<JustifyContentType>;
|
|
851
870
|
/**
|
|
@@ -859,22 +878,25 @@ type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
|
|
|
859
878
|
renderAs?: ElementType;
|
|
860
879
|
/**
|
|
861
880
|
* Specifies how items will shrink inside the container when the default size of
|
|
862
|
-
* items is larger than their container. Can be a [responsive prop](/docs/
|
|
881
|
+
* items is larger than their container. Can be a [responsive prop](/docs/responsive-props).
|
|
863
882
|
*
|
|
864
883
|
* *Note: Cannot be used with `flexMode` prop.*
|
|
865
884
|
*
|
|
866
885
|
* *Note: only works for nested `<Box />`*
|
|
886
|
+
* @type ResponsiveObject<number>
|
|
867
887
|
*/
|
|
868
888
|
shrink?: ResponsiveObject<number> | number;
|
|
869
889
|
/**
|
|
870
890
|
* Specifies whether items are forced into a single line or can be wrapped onto multiple lines.
|
|
871
|
-
* Can be a [responsive prop](/docs/
|
|
891
|
+
* Can be a [responsive prop](/docs/responsive-props).
|
|
892
|
+
* @type ResponsiveObject<boolean>
|
|
872
893
|
*/
|
|
873
894
|
wrapItems?: ResponsiveObject<boolean> | boolean;
|
|
874
895
|
/**
|
|
875
|
-
* Specifies the width of the box. Can be a [responsive prop](/docs/
|
|
896
|
+
* Specifies the width of the box. Can be a [responsive prop](/docs/responsive-props).
|
|
876
897
|
*
|
|
877
898
|
* *Note: Cannot be used with fill="horizontal" or fillViewport="horizontal"*
|
|
899
|
+
* @type ResponsiveObject<string>
|
|
878
900
|
*/
|
|
879
901
|
width?: ResponsiveObject<string> | string;
|
|
880
902
|
};
|
|
@@ -935,6 +957,8 @@ type ButtonGroupProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
935
957
|
collapseOnSmallScreens?: boolean;
|
|
936
958
|
/**
|
|
937
959
|
* The size of the buttons in the group. Setting this will override the size of any UI button passed in as a child.
|
|
960
|
+
*
|
|
961
|
+
* @type ResponsiveObject<'lg' | 'md' | 'sm' | 'xl' | 'natural'>
|
|
938
962
|
*/
|
|
939
963
|
buttonSize?: ButtonGroupButtonSize | ResponsiveObject<ButtonGroupButtonSize>;
|
|
940
964
|
};
|
|
@@ -1488,6 +1512,10 @@ declare const CollapsibleContent: ({ clamp, children }: CollapsibleContentProps)
|
|
|
1488
1512
|
type ColorGridProps = PropsWithChildren & {
|
|
1489
1513
|
label?: string;
|
|
1490
1514
|
};
|
|
1515
|
+
/**
|
|
1516
|
+
* Displays color options as a wrapped grid of swatches. Use `ColorGridOption`
|
|
1517
|
+
* as children and pass an optional `label` for a heading.
|
|
1518
|
+
*/
|
|
1491
1519
|
declare const ColorGrid: {
|
|
1492
1520
|
({ children, label }: ColorGridProps): JSX.Element;
|
|
1493
1521
|
displayName: string;
|
|
@@ -1505,12 +1533,21 @@ type ColorPickerOption = {
|
|
|
1505
1533
|
};
|
|
1506
1534
|
|
|
1507
1535
|
type ColorGridOptionProps = ColorPickerOption;
|
|
1536
|
+
/**
|
|
1537
|
+
* A single selectable color swatch for use inside a `ColorGrid`. Renders as
|
|
1538
|
+
* a radio item with a tooltip showing the color's name or hex code.
|
|
1539
|
+
*/
|
|
1508
1540
|
declare const ColorGridOption: {
|
|
1509
1541
|
({ value: rawValue, name }: ColorGridOptionProps): JSX.Element;
|
|
1510
1542
|
displayName: string;
|
|
1511
1543
|
};
|
|
1512
1544
|
|
|
1513
1545
|
type ColorListProps = PropsWithChildren;
|
|
1546
|
+
/**
|
|
1547
|
+
* Displays color options as a vertical list of labeled rows. Use
|
|
1548
|
+
* `ColorListGroup` to organize options into labeled sections, and
|
|
1549
|
+
* `ColorListOption` for individual items.
|
|
1550
|
+
*/
|
|
1514
1551
|
declare const ColorList: {
|
|
1515
1552
|
({ children }: ColorListProps): JSX.Element;
|
|
1516
1553
|
displayName: string;
|
|
@@ -1519,12 +1556,19 @@ declare const ColorList: {
|
|
|
1519
1556
|
type ColorListGroupProps = PropsWithChildren<{
|
|
1520
1557
|
label: string;
|
|
1521
1558
|
}>;
|
|
1559
|
+
/**
|
|
1560
|
+
* Groups `ColorListOption` items under a labeled heading within a `ColorList`.
|
|
1561
|
+
*/
|
|
1522
1562
|
declare const ColorListGroup: {
|
|
1523
1563
|
({ label, children }: ColorListGroupProps): JSX.Element;
|
|
1524
1564
|
displayName: string;
|
|
1525
1565
|
};
|
|
1526
1566
|
|
|
1527
1567
|
type ColorListOptionProps = ColorPickerOption;
|
|
1568
|
+
/**
|
|
1569
|
+
* A single selectable row for use inside a `ColorList`. Displays a color
|
|
1570
|
+
* swatch alongside the color's name (if provided) or hex code.
|
|
1571
|
+
*/
|
|
1528
1572
|
declare const ColorListOption: {
|
|
1529
1573
|
({ value: rawValue, name }: ColorListOptionProps): JSX.Element;
|
|
1530
1574
|
displayName: string;
|
|
@@ -1553,10 +1597,13 @@ type ColorPickerProps = PropsWithChildren<{
|
|
|
1553
1597
|
value: string;
|
|
1554
1598
|
}>;
|
|
1555
1599
|
/**
|
|
1556
|
-
*
|
|
1557
|
-
*
|
|
1558
|
-
*
|
|
1559
|
-
*
|
|
1600
|
+
* A composable color picker built from low-level building blocks. Choose the
|
|
1601
|
+
* parts you need, leave out the ones you don't, and include any custom UI
|
|
1602
|
+
* alongside its subcomponents.
|
|
1603
|
+
*
|
|
1604
|
+
* For most use cases in the Wistia app, prefer the pre-composed ColorPicker
|
|
1605
|
+
* at `~/components/ColorPicker`, which assembles these primitives with
|
|
1606
|
+
* sensible defaults (brand colors, contrast controls, popover/inline modes).
|
|
1560
1607
|
*/
|
|
1561
1608
|
declare const ColorPicker: {
|
|
1562
1609
|
({ children, colorForComparison, minimumContrastRatio, opacityForContrastCalculation, onValueChange, value, }: ColorPickerProps): JSX.Element;
|
|
@@ -1564,23 +1611,42 @@ declare const ColorPicker: {
|
|
|
1564
1611
|
};
|
|
1565
1612
|
|
|
1566
1613
|
type ColorPickerPopoverContentProps = PropsWithChildren;
|
|
1614
|
+
/**
|
|
1615
|
+
* The popover panel that opens when the `ColorPickerTrigger` is activated.
|
|
1616
|
+
* Use `ColorPickerSection` to organize content within it.
|
|
1617
|
+
*/
|
|
1567
1618
|
declare const ColorPickerPopoverContent: {
|
|
1568
1619
|
({ children, }: ColorPickerPopoverContentProps): JSX.Element;
|
|
1569
1620
|
displayName: string;
|
|
1570
1621
|
};
|
|
1571
1622
|
|
|
1572
1623
|
type ColorPickerSectionProps = PropsWithChildren;
|
|
1624
|
+
/**
|
|
1625
|
+
* A padded section for grouping related controls within a
|
|
1626
|
+
* `ColorPickerPopoverContent`. Provides consistent spacing between sections.
|
|
1627
|
+
*/
|
|
1573
1628
|
declare const ColorPickerSection: {
|
|
1574
1629
|
({ children }: ColorPickerSectionProps): JSX.Element;
|
|
1575
1630
|
displayName: string;
|
|
1576
1631
|
};
|
|
1577
1632
|
|
|
1578
1633
|
type ColorPickerTriggerProps = PropsWithChildren;
|
|
1634
|
+
/**
|
|
1635
|
+
* The button that toggles the color picker popover open and closed. By default
|
|
1636
|
+
* it renders a swatch and hex label for the current color; pass custom children
|
|
1637
|
+
* to replace that content.
|
|
1638
|
+
*/
|
|
1579
1639
|
declare const ColorPickerTrigger: react.ForwardRefExoticComponent<{
|
|
1580
1640
|
children?: react.ReactNode | undefined;
|
|
1581
1641
|
} & react.RefAttributes<HTMLButtonElement>>;
|
|
1582
1642
|
|
|
1583
1643
|
type ContrastControlsProps = object;
|
|
1644
|
+
/**
|
|
1645
|
+
* Displays a preview of the selected color against the comparison color, the
|
|
1646
|
+
* WCAG contrast ratio, and a toggle switch for enforcing minimum contrast.
|
|
1647
|
+
* Relies on `colorForComparison` and `minimumContrastRatio` set on the parent
|
|
1648
|
+
* `ColorPicker`.
|
|
1649
|
+
*/
|
|
1584
1650
|
declare const ContrastControls: {
|
|
1585
1651
|
(props: ContrastControlsProps): JSX.Element;
|
|
1586
1652
|
displayName: string;
|
|
@@ -1592,12 +1658,22 @@ type HexColorInputProps = {
|
|
|
1592
1658
|
*/
|
|
1593
1659
|
autoFocus?: boolean;
|
|
1594
1660
|
};
|
|
1661
|
+
/**
|
|
1662
|
+
* A text input for entering hex color codes directly. Validates input to
|
|
1663
|
+
* allow only hex characters, normalizes pasted values, and supports arrow-key
|
|
1664
|
+
* nudging of saturation. Auto-focuses by default for quick paste workflows.
|
|
1665
|
+
*/
|
|
1595
1666
|
declare const HexColorInput: {
|
|
1596
1667
|
({ autoFocus }: HexColorInputProps): JSX.Element;
|
|
1597
1668
|
displayName: string;
|
|
1598
1669
|
};
|
|
1599
1670
|
|
|
1600
1671
|
type HueSliderProps = object;
|
|
1672
|
+
/**
|
|
1673
|
+
* A horizontal slider for adjusting the hue of the current color, rendered
|
|
1674
|
+
* over a spectrum gradient. The thumb color reflects the currently selected
|
|
1675
|
+
* hue, saturation, and value.
|
|
1676
|
+
*/
|
|
1601
1677
|
declare const HueSlider: {
|
|
1602
1678
|
(props: HueSliderProps): JSX.Element;
|
|
1603
1679
|
displayName: string;
|
|
@@ -1606,12 +1682,22 @@ declare const HueSlider: {
|
|
|
1606
1682
|
type SaturationAndValuePickerProps = {
|
|
1607
1683
|
dataTestId?: string;
|
|
1608
1684
|
};
|
|
1685
|
+
/**
|
|
1686
|
+
* A 2D picking area for adjusting saturation (x-axis) and brightness/value
|
|
1687
|
+
* (y-axis) of the current color. Supports click, drag, and keyboard arrow
|
|
1688
|
+
* navigation. When contrast enforcement is enabled, a contrast boundary curve
|
|
1689
|
+
* is drawn on the canvas.
|
|
1690
|
+
*/
|
|
1609
1691
|
declare const SaturationAndValuePicker: {
|
|
1610
1692
|
({ dataTestId, }: SaturationAndValuePickerProps): JSX.Element;
|
|
1611
1693
|
displayName: string;
|
|
1612
1694
|
};
|
|
1613
1695
|
|
|
1614
1696
|
type ValueNameOrHexCodeProps = object;
|
|
1697
|
+
/**
|
|
1698
|
+
* Displays the name of the current color (if it matches a known color name)
|
|
1699
|
+
* or its hex code. Reads the current value from ColorPicker context.
|
|
1700
|
+
*/
|
|
1615
1701
|
declare const ValueNameOrHexCode: {
|
|
1616
1702
|
(props: ValueNameOrHexCodeProps): JSX.Element;
|
|
1617
1703
|
displayName: string;
|
|
@@ -1625,6 +1711,10 @@ type ColorSwatchProps = PropsWithChildren<{
|
|
|
1625
1711
|
}>;
|
|
1626
1712
|
|
|
1627
1713
|
type ValueSwatchProps = Pick<ColorSwatchProps, 'diameterPx'>;
|
|
1714
|
+
/**
|
|
1715
|
+
* Renders a circular color swatch filled with the current color from
|
|
1716
|
+
* ColorPicker context. Accepts an optional `diameterPx` to control size.
|
|
1717
|
+
*/
|
|
1628
1718
|
declare const ValueSwatch: {
|
|
1629
1719
|
({ diameterPx, }: ValueSwatchProps): JSX.Element;
|
|
1630
1720
|
displayName: string;
|
|
@@ -2657,12 +2747,17 @@ type PreviewCardProps = ContentProps$1 & {
|
|
|
2657
2747
|
*/
|
|
2658
2748
|
closeDelay?: number;
|
|
2659
2749
|
colorScheme?: ColorSchemeTypes;
|
|
2750
|
+
/**
|
|
2751
|
+
* @ignore
|
|
2752
|
+
* Force the preview card to be open without user interaction (for debugging and CI)
|
|
2753
|
+
*/
|
|
2754
|
+
forceOpen?: boolean;
|
|
2660
2755
|
};
|
|
2661
2756
|
/**
|
|
2662
2757
|
* Preview cards reveal content on hover. **Everything in the card must also exist at the destination**—never put information only in the preview. This pattern is for sighted-only, so treat the card as a preview, not a source of truth.
|
|
2663
2758
|
*/
|
|
2664
2759
|
declare const PreviewCard: {
|
|
2665
|
-
({ children, trigger, maxWidth, maxHeight, unstyled, paddingSize, openDelay, closeDelay, colorScheme, ...props }: PreviewCardProps): JSX.Element;
|
|
2760
|
+
({ children, trigger, maxWidth, maxHeight, unstyled, paddingSize, openDelay, closeDelay, colorScheme, forceOpen, ...props }: PreviewCardProps): JSX.Element;
|
|
2666
2761
|
displayName: string;
|
|
2667
2762
|
};
|
|
2668
2763
|
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.21.
|
|
3
|
+
* @license @wistia/ui v0.21.2-beta.527f4090.c8c7b4e
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2026, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -8053,7 +8053,7 @@ var iconSizeMap = {
|
|
|
8053
8053
|
xxl: "48"
|
|
8054
8054
|
};
|
|
8055
8055
|
var iconInlineStyle = css18`
|
|
8056
|
-
[data-wui-icon-inline] {
|
|
8056
|
+
& > [data-wui-icon-inline] {
|
|
8057
8057
|
--wui-icon-inline-size: 0.8em;
|
|
8058
8058
|
--wui-icon-inline-offset: 0.05em;
|
|
8059
8059
|
--wui-icon-vertical-align: none;
|
|
@@ -8153,6 +8153,7 @@ var StyledLink = styled5.a`
|
|
|
8153
8153
|
display: inline-flex;
|
|
8154
8154
|
align-items: baseline;
|
|
8155
8155
|
gap: var(--wui-space-01);
|
|
8156
|
+
${iconInlineStyle}
|
|
8156
8157
|
|
|
8157
8158
|
&:hover {
|
|
8158
8159
|
text-decoration: ${({ $underline }) => $underline === "hover" || $underline === "always" ? "underline" : "none"};
|
|
@@ -16064,17 +16065,23 @@ var PreviewCard = ({
|
|
|
16064
16065
|
openDelay = 700,
|
|
16065
16066
|
closeDelay = 300,
|
|
16066
16067
|
colorScheme = "inherit",
|
|
16068
|
+
forceOpen,
|
|
16067
16069
|
...props
|
|
16068
16070
|
}) => {
|
|
16069
16071
|
const style = {
|
|
16070
16072
|
"--wui-preview-card-max-width": maxWidth,
|
|
16071
16073
|
"--wui-preview-card-max-height": maxHeight
|
|
16072
16074
|
};
|
|
16075
|
+
const rootProps = {};
|
|
16076
|
+
if (forceOpen === true) {
|
|
16077
|
+
rootProps.open = true;
|
|
16078
|
+
}
|
|
16073
16079
|
return /* @__PURE__ */ jsxs49(
|
|
16074
16080
|
Root2,
|
|
16075
16081
|
{
|
|
16076
16082
|
closeDelay,
|
|
16077
16083
|
openDelay,
|
|
16084
|
+
...rootProps,
|
|
16078
16085
|
children: [
|
|
16079
16086
|
/* @__PURE__ */ jsx313(Trigger2, { asChild: true, children: trigger }),
|
|
16080
16087
|
/* @__PURE__ */ jsx313(Portal, { children: /* @__PURE__ */ jsx313(
|