@wistia/ui 0.18.0-beta.80cfc750.f949e60 → 0.18.0-beta.8cfd0d52.ccf3429

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.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.18.0-beta.80cfc750.f949e60
3
+ * @license @wistia/ui v0.18.0-beta.8cfd0d52.ccf3429
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -118,11 +118,6 @@ var globalStyleAdjustmentsCss = css`
118
118
  font-size: inherit;
119
119
  }
120
120
 
121
- /* Make sure textareas without a rows attribute are not tiny */
122
- textarea:not([rows]) {
123
- min-height: 10em;
124
- }
125
-
126
121
  /* Anything that has been anchored to should have extra scroll margin */
127
122
  &:target {
128
123
  scroll-margin-block: 5ex;
@@ -11600,6 +11595,7 @@ var inputStyles = css30`
11600
11595
  }
11601
11596
  }
11602
11597
  `;
11598
+ var calculateTextareaHeight = (rows = 1) => `calc((var(--wui-input-line-height) * ${rows}) + (var(--wui-input-vertical-padding) * 2));`;
11603
11599
  var StyledInputContainer = styled44.div`
11604
11600
  display: inline-flex;
11605
11601
  position: relative;
@@ -11613,9 +11609,35 @@ var StyledInputContainer = styled44.div`
11613
11609
  }
11614
11610
 
11615
11611
  textarea {
11612
+ --wui-input-line-height: var(--wui-typography-body-3-line-height);
11613
+
11616
11614
  border-radius: var(--wui-input-multiline-border-radius);
11617
11615
 
11618
- --wui-input-line-height: var(--wui-typography-body-3-line-height);
11616
+ /* height based on rows attribute (1-5) */
11617
+ &[rows='1'] {
11618
+ height: ${calculateTextareaHeight(1)};
11619
+ }
11620
+
11621
+ &[rows='2'] {
11622
+ height: ${calculateTextareaHeight(2)};
11623
+ }
11624
+
11625
+ &[rows='3'] {
11626
+ height: ${calculateTextareaHeight(3)};
11627
+ }
11628
+
11629
+ &[rows='4'] {
11630
+ height: ${calculateTextareaHeight(4)};
11631
+ }
11632
+
11633
+ &[rows='5'] {
11634
+ height: ${calculateTextareaHeight(5)};
11635
+ }
11636
+
11637
+ /* make sure textareas without a rows attribute are not tiny */
11638
+ &:not([rows]) {
11639
+ height: ${calculateTextareaHeight(3)};
11640
+ }
11619
11641
  }
11620
11642
 
11621
11643
  [type='search'] {