@wistia/ui 0.16.1 → 0.17.0-beta.2d292020.bce855e

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
@@ -1857,7 +1857,7 @@ type TextProps = ComponentPropsWithoutRef<'div'> & {
1857
1857
  * <br />
1858
1858
  * _Note: this only affects block elements_
1859
1859
  */
1860
- truncate?: number;
1860
+ maxLines?: number;
1861
1861
  /**
1862
1862
  * The text style to display
1863
1863
  */
@@ -1952,7 +1952,7 @@ type HeadingProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT> & {
1952
1952
  * <br />
1953
1953
  * _Note: this only affects block elements_
1954
1954
  */
1955
- truncate?: number;
1955
+ maxLines?: number;
1956
1956
  /**
1957
1957
  * The text style to display. This will also affect what element (h1, h2, etc) is rendered, unless the `renderAs` prop is used
1958
1958
  */
@@ -3110,7 +3110,7 @@ type ModalProps = ComponentPropsWithoutRef<'div'> & {
3110
3110
  */
3111
3111
  title: string;
3112
3112
  /**
3113
- * The base width to apply to the Modal
3113
+ * The width of the modal when space allows. On smaller screens, the modal automatically adjusts to fit the available space.
3114
3114
  */
3115
3115
  width?: string;
3116
3116
  };
@@ -3158,7 +3158,7 @@ declare const Modal: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
3158
3158
  */
3159
3159
  title: string;
3160
3160
  /**
3161
- * The base width to apply to the Modal
3161
+ * The width of the modal when space allows. On smaller screens, the modal automatically adjusts to fit the available space.
3162
3162
  */
3163
3163
  width?: string;
3164
3164
  } & react.RefAttributes<HTMLDivElement>>;
package/dist/index.d.ts CHANGED
@@ -1857,7 +1857,7 @@ type TextProps = ComponentPropsWithoutRef<'div'> & {
1857
1857
  * <br />
1858
1858
  * _Note: this only affects block elements_
1859
1859
  */
1860
- truncate?: number;
1860
+ maxLines?: number;
1861
1861
  /**
1862
1862
  * The text style to display
1863
1863
  */
@@ -1952,7 +1952,7 @@ type HeadingProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT> & {
1952
1952
  * <br />
1953
1953
  * _Note: this only affects block elements_
1954
1954
  */
1955
- truncate?: number;
1955
+ maxLines?: number;
1956
1956
  /**
1957
1957
  * The text style to display. This will also affect what element (h1, h2, etc) is rendered, unless the `renderAs` prop is used
1958
1958
  */
@@ -3110,7 +3110,7 @@ type ModalProps = ComponentPropsWithoutRef<'div'> & {
3110
3110
  */
3111
3111
  title: string;
3112
3112
  /**
3113
- * The base width to apply to the Modal
3113
+ * The width of the modal when space allows. On smaller screens, the modal automatically adjusts to fit the available space.
3114
3114
  */
3115
3115
  width?: string;
3116
3116
  };
@@ -3158,7 +3158,7 @@ declare const Modal: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
3158
3158
  */
3159
3159
  title: string;
3160
3160
  /**
3161
- * The base width to apply to the Modal
3161
+ * The width of the modal when space allows. On smaller screens, the modal automatically adjusts to fit the available space.
3162
3162
  */
3163
3163
  width?: string;
3164
3164
  } & react.RefAttributes<HTMLDivElement>>;
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.16.1
3
+ * @license @wistia/ui v0.17.0-beta.2d292020.bce855e
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -8616,11 +8616,11 @@ var StyledHeading = styled12.div`
8616
8616
  line-height: var(--line-height);
8617
8617
  color: var(--text-color);
8618
8618
  ${({ $variant }) => variantStyleMap[$variant]}
8619
- ${({ $truncate }) => {
8620
- if (isNotNil11($truncate)) {
8619
+ ${({ $maxLines }) => {
8620
+ if (isNotNil11($maxLines)) {
8621
8621
  return css21`
8622
8622
  ${ellipsisStyle};
8623
- ${lineClampCss($truncate)};
8623
+ ${lineClampCss($maxLines)};
8624
8624
  `;
8625
8625
  }
8626
8626
  return void 0;
@@ -8657,7 +8657,7 @@ var HeadingComponent = forwardRef6(
8657
8657
  maxChars,
8658
8658
  preventUserSelect = false,
8659
8659
  prominence = "primary",
8660
- truncate,
8660
+ maxLines,
8661
8661
  variant = "heading1",
8662
8662
  renderAs,
8663
8663
  ...props
@@ -8671,9 +8671,9 @@ var HeadingComponent = forwardRef6(
8671
8671
  $colorScheme: colorScheme,
8672
8672
  $disabled: disabled,
8673
8673
  $inline: inline,
8674
+ $maxLines: maxLines,
8674
8675
  $preventUserSelect: preventUserSelect,
8675
8676
  $prominence: prominence,
8676
- $truncate: truncate,
8677
8677
  $variant: variant,
8678
8678
  as: renderAs ?? variantElementMap[variant] ?? DEFAULT_ELEMENT2,
8679
8679
  ...props,
@@ -8841,11 +8841,11 @@ var StyledText = styled13.div`
8841
8841
  font-style: normal;
8842
8842
  margin: 0;
8843
8843
  ${({ $variant }) => variantStyleMap2[$variant]}
8844
- ${({ $truncate }) => {
8845
- if (isNotNil12($truncate)) {
8844
+ ${({ $maxLines }) => {
8845
+ if (isNotNil12($maxLines)) {
8846
8846
  return css22`
8847
8847
  ${ellipsisStyle};
8848
- ${lineClampCss($truncate)};
8848
+ ${lineClampCss($maxLines)};
8849
8849
  `;
8850
8850
  }
8851
8851
  return void 0;
@@ -8880,7 +8880,7 @@ var TextComponent = forwardRef7(
8880
8880
  maxChars,
8881
8881
  preventUserSelect = false,
8882
8882
  prominence = "primary",
8883
- truncate,
8883
+ maxLines,
8884
8884
  variant = "body2",
8885
8885
  renderAs,
8886
8886
  ...props
@@ -8894,9 +8894,9 @@ var TextComponent = forwardRef7(
8894
8894
  $colorScheme: colorScheme,
8895
8895
  $disabled: disabled,
8896
8896
  $inline: inline,
8897
+ $maxLines: maxLines,
8897
8898
  $preventUserSelect: preventUserSelect,
8898
8899
  $prominence: prominence,
8899
- $truncate: truncate,
8900
8900
  $variant: variant,
8901
8901
  as: renderAs ?? variantElementMap2[variant] ?? DEFAULT_ELEMENT3,
8902
8902
  ...props,
@@ -15622,9 +15622,8 @@ var StyledModalContent = styled76(DialogContent)`
15622
15622
  position: fixed;
15623
15623
  top: unset;
15624
15624
  left: unset;
15625
- width: ${({ $width }) => $width ?? DEFAULT_MODAL_WIDTH};
15626
- min-width: ${({ $width }) => $width ?? DEFAULT_MODAL_WIDTH};
15627
- max-width: var(--wui-modal-max-width);
15625
+ width: calc(100vw - var(--wui-space-05) * 2);
15626
+ max-width: ${({ $width }) => $width ?? DEFAULT_MODAL_WIDTH};
15628
15627
  border-radius: var(--wui-border-radius-03);
15629
15628
  animation-duration: var(--wui-motion-duration-03);
15630
15629
  animation-timing-function: var(--wui-motion-ease-out);