@wistia/ui 0.8.14 → 0.8.15

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.mts CHANGED
@@ -598,6 +598,7 @@ type Gap = {
598
598
  column: Spacings;
599
599
  row: Spacings;
600
600
  };
601
+ type ResponsiveGap = ResponsiveObject<Gap | Spacings>;
601
602
  type FlexModeType = 'equal' | 'fluid' | 'grow' | 'initial' | 'rigid';
602
603
  declare const DEFAULT_ELEMENT$1 = "div";
603
604
  /**
@@ -614,17 +615,18 @@ type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
614
615
  /**
615
616
  * Specifies how the browser distributes space between and around
616
617
  * items along the cross-axis of their container; has no effect on
617
- * single line flexible boxes
618
+ * single line flexible boxes. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
618
619
  */
619
- alignContent?: AlignContentType;
620
+ alignContent?: AlignContentType | ResponsiveObject<AlignContentType>;
620
621
  /**
621
622
  * Specifies how the browser distributes space between and around
622
623
  * items along the cross-axis of their container; the difference
623
624
  * to the alignContent prop is that alignItems specifies the
624
625
  * alignment of the items within the current container's line,
625
- * whereas alignContent specifies the alignment of the lines themselves
626
+ * whereas alignContent specifies the alignment of the lines themselves.
627
+ * Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
626
628
  */
627
- alignItems?: AlignItemsType;
629
+ alignItems?: AlignItemsType | ResponsiveObject<AlignItemsType>;
628
630
  /**
629
631
  * Specifies how the browser aligns items of the current line, overriding the
630
632
  * alignItems value of parent; if any of the item's cross-axis margin is set to auto,
@@ -646,18 +648,19 @@ type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
646
648
  */
647
649
  children?: ReactNode;
648
650
  /**
649
- * Specifies the main axis of the container
651
+ * Specifies the main axis of the container. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
650
652
  */
651
- direction?: DirectionType;
653
+ direction?: DirectionType | ResponsiveObject<DirectionType>;
652
654
  /**
653
655
  * Specifies whether the width and/or height should fill the container.
656
+ * Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
654
657
  *
655
658
  * *Note: Cannot be used with height/width props when setting the corresponding dimension.*
656
659
  *
657
660
  * For example, `fill="vertical"` or `fill={true}` cannot be used with the `height` prop,
658
661
  * and `fill="horizontal"` or `fill={true}` cannot be used with the `width` prop.
659
662
  */
660
- fill?: FillType;
663
+ fill?: FillType | ResponsiveObject<FillType>;
661
664
  /**
662
665
  * Specifies whether the width and/or height should fill the viewport.
663
666
  *
@@ -678,9 +681,13 @@ type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
678
681
  */
679
682
  flexMode?: FlexModeType;
680
683
  /**
681
- * Specifies the gaps (gutters) between rows and columns
684
+ * Specifies the gaps (gutters) between rows and columns.
685
+ * Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
686
+ *
687
+ * Can be either a single spacing value that applies to both row and column gaps,
688
+ * or an object specifying different values for row and column gaps.
682
689
  */
683
- gap?: Gap | Spacings;
690
+ gap?: Gap | ResponsiveGap | Spacings;
684
691
  /**
685
692
  * Specifies what amount of space inside the flex container the item should take up
686
693
  *
@@ -706,9 +713,9 @@ type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
706
713
  inline?: boolean;
707
714
  /**
708
715
  * Specifies how the browser distributes space between and around
709
- * items along the main axis of their container
716
+ * items along the main axis of their container. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
710
717
  */
711
- justifyContent?: JustifyContentType;
718
+ justifyContent?: JustifyContentType | ResponsiveObject<JustifyContentType>;
712
719
  /**
713
720
  * Specifies the order used to lay out an item in its container. Items within the same
714
721
  * container are rendered in ascending order according to their order values.
@@ -760,7 +767,7 @@ declare const Breadcrumbs: {
760
767
 
761
768
  type BreadcrumbProps = ButtonAsLinkProps & {
762
769
  /**
763
- * An [Icon](../?path=/docs/components-icon--docs) to show at the beginning of the breadcrumb
770
+ * An [Icon]() to show at the beginning of the breadcrumb
764
771
  */
765
772
  icon?: ButtonAsLinkProps['leftIcon'];
766
773
  /**
package/dist/index.d.ts CHANGED
@@ -598,6 +598,7 @@ type Gap = {
598
598
  column: Spacings;
599
599
  row: Spacings;
600
600
  };
601
+ type ResponsiveGap = ResponsiveObject<Gap | Spacings>;
601
602
  type FlexModeType = 'equal' | 'fluid' | 'grow' | 'initial' | 'rigid';
602
603
  declare const DEFAULT_ELEMENT$1 = "div";
603
604
  /**
@@ -614,17 +615,18 @@ type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
614
615
  /**
615
616
  * Specifies how the browser distributes space between and around
616
617
  * items along the cross-axis of their container; has no effect on
617
- * single line flexible boxes
618
+ * single line flexible boxes. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
618
619
  */
619
- alignContent?: AlignContentType;
620
+ alignContent?: AlignContentType | ResponsiveObject<AlignContentType>;
620
621
  /**
621
622
  * Specifies how the browser distributes space between and around
622
623
  * items along the cross-axis of their container; the difference
623
624
  * to the alignContent prop is that alignItems specifies the
624
625
  * alignment of the items within the current container's line,
625
- * whereas alignContent specifies the alignment of the lines themselves
626
+ * whereas alignContent specifies the alignment of the lines themselves.
627
+ * Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
626
628
  */
627
- alignItems?: AlignItemsType;
629
+ alignItems?: AlignItemsType | ResponsiveObject<AlignItemsType>;
628
630
  /**
629
631
  * Specifies how the browser aligns items of the current line, overriding the
630
632
  * alignItems value of parent; if any of the item's cross-axis margin is set to auto,
@@ -646,18 +648,19 @@ type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
646
648
  */
647
649
  children?: ReactNode;
648
650
  /**
649
- * Specifies the main axis of the container
651
+ * Specifies the main axis of the container. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
650
652
  */
651
- direction?: DirectionType;
653
+ direction?: DirectionType | ResponsiveObject<DirectionType>;
652
654
  /**
653
655
  * Specifies whether the width and/or height should fill the container.
656
+ * Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
654
657
  *
655
658
  * *Note: Cannot be used with height/width props when setting the corresponding dimension.*
656
659
  *
657
660
  * For example, `fill="vertical"` or `fill={true}` cannot be used with the `height` prop,
658
661
  * and `fill="horizontal"` or `fill={true}` cannot be used with the `width` prop.
659
662
  */
660
- fill?: FillType;
663
+ fill?: FillType | ResponsiveObject<FillType>;
661
664
  /**
662
665
  * Specifies whether the width and/or height should fill the viewport.
663
666
  *
@@ -678,9 +681,13 @@ type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
678
681
  */
679
682
  flexMode?: FlexModeType;
680
683
  /**
681
- * Specifies the gaps (gutters) between rows and columns
684
+ * Specifies the gaps (gutters) between rows and columns.
685
+ * Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
686
+ *
687
+ * Can be either a single spacing value that applies to both row and column gaps,
688
+ * or an object specifying different values for row and column gaps.
682
689
  */
683
- gap?: Gap | Spacings;
690
+ gap?: Gap | ResponsiveGap | Spacings;
684
691
  /**
685
692
  * Specifies what amount of space inside the flex container the item should take up
686
693
  *
@@ -706,9 +713,9 @@ type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
706
713
  inline?: boolean;
707
714
  /**
708
715
  * Specifies how the browser distributes space between and around
709
- * items along the main axis of their container
716
+ * items along the main axis of their container. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
710
717
  */
711
- justifyContent?: JustifyContentType;
718
+ justifyContent?: JustifyContentType | ResponsiveObject<JustifyContentType>;
712
719
  /**
713
720
  * Specifies the order used to lay out an item in its container. Items within the same
714
721
  * container are rendered in ascending order according to their order values.
@@ -760,7 +767,7 @@ declare const Breadcrumbs: {
760
767
 
761
768
  type BreadcrumbProps = ButtonAsLinkProps & {
762
769
  /**
763
- * An [Icon](../?path=/docs/components-icon--docs) to show at the beginning of the breadcrumb
770
+ * An [Icon]() to show at the beginning of the breadcrumb
764
771
  */
765
772
  icon?: ButtonAsLinkProps['leftIcon'];
766
773
  /**
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.8.14
3
+ * @license @wistia/ui v0.8.15
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -7743,8 +7743,14 @@ var BoxComponent = forwardRef5(
7743
7743
  flexMode,
7744
7744
  ...props
7745
7745
  }, ref) => {
7746
+ const responsiveAlignContent = useResponsiveProp(alignContent);
7747
+ const responsiveAlignItems = useResponsiveProp(alignItems);
7748
+ const responsiveDirection = useResponsiveProp(direction);
7749
+ const responsiveFill = useResponsiveProp(fill);
7750
+ const responsiveGap = useResponsiveProp(gap);
7751
+ const responsiveJustifyContent = useResponsiveProp(justifyContent);
7746
7752
  if (isNotUndefined5(height)) {
7747
- if (fill === true || fill === "vertical") {
7753
+ if (responsiveFill === true || responsiveFill === "vertical") {
7748
7754
  throw new Error('Cannot use height prop with fill="vertical" or fill={true}');
7749
7755
  }
7750
7756
  if (fillViewport === true || fillViewport === "vertical") {
@@ -7754,7 +7760,7 @@ var BoxComponent = forwardRef5(
7754
7760
  }
7755
7761
  }
7756
7762
  if (isNotUndefined5(width)) {
7757
- if (fill === true || fill === "horizontal") {
7763
+ if (responsiveFill === true || responsiveFill === "horizontal") {
7758
7764
  throw new Error('Cannot use width prop with fill="horizontal" or fill={true}');
7759
7765
  }
7760
7766
  if (fillViewport === true || fillViewport === "horizontal") {
@@ -7767,19 +7773,19 @@ var BoxComponent = forwardRef5(
7767
7773
  StyledBoxComponent,
7768
7774
  {
7769
7775
  ref,
7770
- $alignContent: alignContent,
7771
- $alignItems: alignItems,
7776
+ $alignContent: responsiveAlignContent,
7777
+ $alignItems: responsiveAlignItems,
7772
7778
  $alignSelf: alignSelf,
7773
7779
  $basis: basis,
7774
- $fillBox: fill,
7780
+ $fillBox: responsiveFill,
7775
7781
  $fillViewport: fillViewport,
7776
- $flexDirection: direction,
7782
+ $flexDirection: responsiveDirection,
7777
7783
  $flexMode: flexMode,
7778
- $gap: gap,
7784
+ $gap: responsiveGap,
7779
7785
  $grow: grow,
7780
7786
  $height: height,
7781
7787
  $inline: inline,
7782
- $justifyContent: justifyContent,
7788
+ $justifyContent: responsiveJustifyContent,
7783
7789
  $order: order,
7784
7790
  $shrink: shrink,
7785
7791
  $width: width,
@@ -11575,7 +11581,7 @@ var SelectOption = forwardRef24(
11575
11581
  );
11576
11582
  }
11577
11583
  );
11578
- SelectOption.displayName = "Option";
11584
+ SelectOption.displayName = "SelectOption";
11579
11585
 
11580
11586
  // src/components/Select/SelectOptionGroup.tsx
11581
11587
  import { Group, Label as Label2 } from "@radix-ui/react-select";