@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.cjs 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
  *
@@ -7337,6 +7337,7 @@ var body1TextStyle = import_styled_components36.css`
7337
7337
  --font-size: var(--wui-typography-body-1-size);
7338
7338
  --font-weight: var(--wui-typography-body-1-weight);
7339
7339
  --line-height: var(--wui-typography-body-1-line-height);
7340
+ --paragraph-spacing: var(--wui-typography-body-1-paragraph-spacing);
7340
7341
  ${bodyBoldStyles}
7341
7342
  `;
7342
7343
  var body2TextStyle = import_styled_components36.css`
@@ -7344,6 +7345,7 @@ var body2TextStyle = import_styled_components36.css`
7344
7345
  --font-size: var(--wui-typography-body-2-size);
7345
7346
  --font-weight: var(--wui-typography-body-2-weight);
7346
7347
  --line-height: var(--wui-typography-body-2-line-height);
7348
+ --paragraph-spacing: var(--wui-typography-body-2-paragraph-spacing);
7347
7349
  ${bodyBoldStyles}
7348
7350
  `;
7349
7351
  var body3TextStyle = import_styled_components36.css`
@@ -7351,6 +7353,7 @@ var body3TextStyle = import_styled_components36.css`
7351
7353
  --font-size: var(--wui-typography-body-3-size);
7352
7354
  --font-weight: var(--wui-typography-body-3-weight);
7353
7355
  --line-height: var(--wui-typography-body-3-line-height);
7356
+ --paragraph-spacing: var(--wui-typography-body-3-paragraph-spacing);
7354
7357
  ${bodyBoldStyles}
7355
7358
  `;
7356
7359
  var body4TextStyle = import_styled_components36.css`
@@ -7358,6 +7361,7 @@ var body4TextStyle = import_styled_components36.css`
7358
7361
  --font-size: var(--wui-typography-body-4-size);
7359
7362
  --font-weight: var(--wui-typography-body-4-weight);
7360
7363
  --line-height: var(--wui-typography-body-4-line-height);
7364
+ --paragraph-spacing: var(--wui-typography-body-4-paragraph-spacing);
7361
7365
  ${bodyBoldStyles}
7362
7366
  `;
7363
7367
  var label1TextStyle = import_styled_components36.css`
@@ -7418,6 +7422,23 @@ var variantStyleMap2 = {
7418
7422
  label3: label3TextStyle,
7419
7423
  label4: label4TextStyle
7420
7424
  };
7425
+ var bodyElement = "p";
7426
+ var labelElement = "span";
7427
+ var DEFAULT_ELEMENT3 = bodyElement;
7428
+ var variantElementMap2 = {
7429
+ body1: DEFAULT_ELEMENT3,
7430
+ body2: DEFAULT_ELEMENT3,
7431
+ body3: DEFAULT_ELEMENT3,
7432
+ body4: DEFAULT_ELEMENT3,
7433
+ body1Mono: DEFAULT_ELEMENT3,
7434
+ body2Mono: DEFAULT_ELEMENT3,
7435
+ body3Mono: DEFAULT_ELEMENT3,
7436
+ body4Mono: DEFAULT_ELEMENT3,
7437
+ label1: labelElement,
7438
+ label2: labelElement,
7439
+ label3: labelElement,
7440
+ label4: labelElement
7441
+ };
7421
7442
  var StyledText = import_styled_components36.default.div`
7422
7443
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
7423
7444
  --text-color: ${({ $prominence, $disabled }) => {
@@ -7456,9 +7477,12 @@ var StyledText = import_styled_components36.default.div`
7456
7477
  `}
7457
7478
  ${({ as }) => as === "p" && import_styled_components36.css`
7458
7479
  display: block;
7480
+
7481
+ + p {
7482
+ margin-top: var(--paragraph-spacing, var(--wui-space-04));
7483
+ }
7459
7484
  `}
7460
7485
  `;
7461
- var DEFAULT_ELEMENT3 = "div";
7462
7486
  var TextComponent = (0, import_react20.forwardRef)(
7463
7487
  ({
7464
7488
  align = "left",
@@ -7484,7 +7508,7 @@ var TextComponent = (0, import_react20.forwardRef)(
7484
7508
  $preventUserSelect: preventUserSelect,
7485
7509
  $prominence: prominence,
7486
7510
  $variant: variant,
7487
- as: renderAs ?? DEFAULT_ELEMENT3,
7511
+ as: renderAs ?? variantElementMap2[variant],
7488
7512
  ...otherProps
7489
7513
  }
7490
7514
  );