@wistia/ui 0.5.5 → 0.5.6

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
@@ -1699,7 +1699,7 @@ type TextProps = ComponentPropsWithoutRef<'div'> & {
1699
1699
  /**
1700
1700
  * Used for rending paragraphs and inline text.
1701
1701
  */
1702
- declare const Text: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, TextProps>) => react.ReactElement | null) & UnknownRecord;
1702
+ declare const Text: (<C extends ElementType = "p">(props: PolymorphicComponentProps<C, TextProps>) => react.ReactElement | null) & UnknownRecord;
1703
1703
 
1704
1704
  type MenuItemLabelProps = {
1705
1705
  /**
package/dist/index.d.ts CHANGED
@@ -1699,7 +1699,7 @@ type TextProps = ComponentPropsWithoutRef<'div'> & {
1699
1699
  /**
1700
1700
  * Used for rending paragraphs and inline text.
1701
1701
  */
1702
- declare const Text: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, TextProps>) => react.ReactElement | null) & UnknownRecord;
1702
+ declare const Text: (<C extends ElementType = "p">(props: PolymorphicComponentProps<C, TextProps>) => react.ReactElement | null) & UnknownRecord;
1703
1703
 
1704
1704
  type MenuItemLabelProps = {
1705
1705
  /**
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.5.5
3
+ * @license @wistia/ui v0.5.6
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -7234,6 +7234,7 @@ var body1TextStyle = css19`
7234
7234
  --font-size: var(--wui-typography-body-1-size);
7235
7235
  --font-weight: var(--wui-typography-body-1-weight);
7236
7236
  --line-height: var(--wui-typography-body-1-line-height);
7237
+ --paragraph-spacing: var(--wui-typography-body-1-paragraph-spacing);
7237
7238
  ${bodyBoldStyles}
7238
7239
  `;
7239
7240
  var body2TextStyle = css19`
@@ -7241,6 +7242,7 @@ var body2TextStyle = css19`
7241
7242
  --font-size: var(--wui-typography-body-2-size);
7242
7243
  --font-weight: var(--wui-typography-body-2-weight);
7243
7244
  --line-height: var(--wui-typography-body-2-line-height);
7245
+ --paragraph-spacing: var(--wui-typography-body-2-paragraph-spacing);
7244
7246
  ${bodyBoldStyles}
7245
7247
  `;
7246
7248
  var body3TextStyle = css19`
@@ -7248,6 +7250,7 @@ var body3TextStyle = css19`
7248
7250
  --font-size: var(--wui-typography-body-3-size);
7249
7251
  --font-weight: var(--wui-typography-body-3-weight);
7250
7252
  --line-height: var(--wui-typography-body-3-line-height);
7253
+ --paragraph-spacing: var(--wui-typography-body-3-paragraph-spacing);
7251
7254
  ${bodyBoldStyles}
7252
7255
  `;
7253
7256
  var body4TextStyle = css19`
@@ -7255,6 +7258,7 @@ var body4TextStyle = css19`
7255
7258
  --font-size: var(--wui-typography-body-4-size);
7256
7259
  --font-weight: var(--wui-typography-body-4-weight);
7257
7260
  --line-height: var(--wui-typography-body-4-line-height);
7261
+ --paragraph-spacing: var(--wui-typography-body-4-paragraph-spacing);
7258
7262
  ${bodyBoldStyles}
7259
7263
  `;
7260
7264
  var label1TextStyle = css19`
@@ -7315,6 +7319,23 @@ var variantStyleMap2 = {
7315
7319
  label3: label3TextStyle,
7316
7320
  label4: label4TextStyle
7317
7321
  };
7322
+ var bodyElement = "p";
7323
+ var labelElement = "span";
7324
+ var DEFAULT_ELEMENT3 = bodyElement;
7325
+ var variantElementMap2 = {
7326
+ body1: DEFAULT_ELEMENT3,
7327
+ body2: DEFAULT_ELEMENT3,
7328
+ body3: DEFAULT_ELEMENT3,
7329
+ body4: DEFAULT_ELEMENT3,
7330
+ body1Mono: DEFAULT_ELEMENT3,
7331
+ body2Mono: DEFAULT_ELEMENT3,
7332
+ body3Mono: DEFAULT_ELEMENT3,
7333
+ body4Mono: DEFAULT_ELEMENT3,
7334
+ label1: labelElement,
7335
+ label2: labelElement,
7336
+ label3: labelElement,
7337
+ label4: labelElement
7338
+ };
7318
7339
  var StyledText = styled21.div`
7319
7340
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
7320
7341
  --text-color: ${({ $prominence, $disabled }) => {
@@ -7353,9 +7374,12 @@ var StyledText = styled21.div`
7353
7374
  `}
7354
7375
  ${({ as }) => as === "p" && css19`
7355
7376
  display: block;
7377
+
7378
+ + p {
7379
+ margin-top: var(--paragraph-spacing, var(--wui-space-04));
7380
+ }
7356
7381
  `}
7357
7382
  `;
7358
- var DEFAULT_ELEMENT3 = "div";
7359
7383
  var TextComponent = forwardRef8(
7360
7384
  ({
7361
7385
  align = "left",
@@ -7381,7 +7405,7 @@ var TextComponent = forwardRef8(
7381
7405
  $preventUserSelect: preventUserSelect,
7382
7406
  $prominence: prominence,
7383
7407
  $variant: variant,
7384
- as: renderAs ?? DEFAULT_ELEMENT3,
7408
+ as: renderAs ?? variantElementMap2[variant],
7385
7409
  ...otherProps
7386
7410
  }
7387
7411
  );