@wistia/ui 0.18.0-beta.c3ba0640.3c7bbc3 → 0.18.0-beta.d5accfdd.0ddbbc0

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.18.0-beta.c3ba0640.3c7bbc3
3
+ * @license @wistia/ui v0.18.0-beta.d5accfdd.0ddbbc0
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -307,11 +307,6 @@ var globalStyleAdjustmentsCss = import_styled_components.css`
307
307
  font-size: inherit;
308
308
  }
309
309
 
310
- /* Make sure textareas without a rows attribute are not tiny */
311
- textarea:not([rows]) {
312
- min-height: 10em;
313
- }
314
-
315
310
  /* Anything that has been anchored to should have extra scroll margin */
316
311
  &:target {
317
312
  scroll-margin-block: 5ex;
@@ -11774,6 +11769,7 @@ var inputStyles = import_styled_components62.css`
11774
11769
  }
11775
11770
  }
11776
11771
  `;
11772
+ var calculateTextareaHeight = (rows = 1) => `calc((var(--wui-input-line-height) * ${rows}) + (var(--wui-input-vertical-padding) * 2));`;
11777
11773
  var StyledInputContainer = import_styled_components62.styled.div`
11778
11774
  display: inline-flex;
11779
11775
  position: relative;
@@ -11787,9 +11783,35 @@ var StyledInputContainer = import_styled_components62.styled.div`
11787
11783
  }
11788
11784
 
11789
11785
  textarea {
11786
+ --wui-input-line-height: var(--wui-typography-body-3-line-height);
11787
+
11790
11788
  border-radius: var(--wui-input-multiline-border-radius);
11791
11789
 
11792
- --wui-input-line-height: var(--wui-typography-body-3-line-height);
11790
+ /* height based on rows attribute (1-5) */
11791
+ &[rows='1'] {
11792
+ height: ${calculateTextareaHeight(1)};
11793
+ }
11794
+
11795
+ &[rows='2'] {
11796
+ height: ${calculateTextareaHeight(2)};
11797
+ }
11798
+
11799
+ &[rows='3'] {
11800
+ height: ${calculateTextareaHeight(3)};
11801
+ }
11802
+
11803
+ &[rows='4'] {
11804
+ height: ${calculateTextareaHeight(4)};
11805
+ }
11806
+
11807
+ &[rows='5'] {
11808
+ height: ${calculateTextareaHeight(5)};
11809
+ }
11810
+
11811
+ /* make sure textareas without a rows attribute are not tiny */
11812
+ &:not([rows]) {
11813
+ height: ${calculateTextareaHeight(5)};
11814
+ }
11793
11815
  }
11794
11816
 
11795
11817
  [type='search'] {
@@ -14191,6 +14213,10 @@ var StyledInput = (0, import_styled_components81.styled)(Input)`
14191
14213
  min-height: unset;
14192
14214
  }
14193
14215
 
14216
+ &:focus {
14217
+ height: ${({ $height }) => `${$height}px !important`};
14218
+ }
14219
+
14194
14220
  && {
14195
14221
  ${({ $variant }) => variantStyleMap[$variant]}
14196
14222
  /* The input font styles (edit mode) needs the same font styles as Heading */
@@ -14990,6 +15016,7 @@ var FormField = ({
14990
15016
  id: computedId,
14991
15017
  label: isIntegratedLabel ? label : void 0,
14992
15018
  "aria-describedby": ariaDescribedby,
15019
+ "aria-invalid": (0, import_type_guards49.isNotNil)(computedError),
14993
15020
  ...props
14994
15021
  };
14995
15022
  if ((0, import_type_guards49.isUndefined)(value) && (0, import_type_guards49.isNotUndefined)(defaultValue)) {
@@ -15011,8 +15038,7 @@ var FormField = ({
15011
15038
  childProps = {
15012
15039
  ...childProps,
15013
15040
  name: computedName,
15014
- onChange: handleChange,
15015
- "aria-invalid": (0, import_type_guards49.isNotNil)(error)
15041
+ onChange: handleChange
15016
15042
  };
15017
15043
  }
15018
15044
  import_react73.Children.only(children);
@@ -17678,7 +17704,7 @@ var StyledThumbnailBadge = import_styled_components123.styled.div`
17678
17704
  align-items: center;
17679
17705
  background-color: rgb(0 0 0 / 50%);
17680
17706
  border-radius: var(--wui-border-radius-01);
17681
- bottom: var(--wui-thumbnail-badge-offset);
17707
+ bottom: var(--wui-space-01);
17682
17708
  color: var(--wui-color-text-on-fill);
17683
17709
  display: flex;
17684
17710
  font-size: var(--wui-typography-body-4-size);
@@ -17686,7 +17712,7 @@ var StyledThumbnailBadge = import_styled_components123.styled.div`
17686
17712
  gap: var(--wui-space-01);
17687
17713
  padding: 0 var(--wui-space-01);
17688
17714
  position: absolute;
17689
- right: var(--wui-thumbnail-badge-offset);
17715
+ right: var(--wui-space-01);
17690
17716
  z-index: 1;
17691
17717
 
17692
17718
  svg {
@@ -18011,15 +18037,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
18011
18037
  }
18012
18038
  );
18013
18039
  };
18014
- var StyledThumbnailContainer = import_styled_components126.styled.div`
18015
- container-type: inline-size;
18016
- aspect-ratio: 16 / 9;
18017
- width: ${({ $width }) => $width};
18018
- display: flex;
18019
- `;
18020
18040
  var StyledThumbnail = import_styled_components126.styled.div`
18021
- --wui-thumbnail-badge-offset: var(--wui-space-01);
18022
-
18023
18041
  background-image: ${({ $backgroundUrl }) => (0, import_type_guards74.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
18024
18042
  ${({ $backgroundUrl, $gradientBackground }) => (
18025
18043
  // if we don't have $backgroundUrl show a gradient
@@ -18027,35 +18045,16 @@ var StyledThumbnail = import_styled_components126.styled.div`
18027
18045
  )};
18028
18046
  background-position: center center;
18029
18047
  background-size: cover;
18030
- width: 100%;
18031
18048
  aspect-ratio: 16 / 9;
18049
+ display: flex;
18032
18050
  overflow: hidden;
18033
18051
  position: relative;
18034
- display: flex;
18035
-
18052
+ width: ${({ $width }) => $width};
18036
18053
  ${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
18037
18054
 
18038
18055
  &,
18039
18056
  img {
18040
- border-radius: var(--wui-border-radius-02);
18041
- }
18042
-
18043
- @container (min-width: 200px) {
18044
- &,
18045
- img {
18046
- border-radius: var(--wui-border-radius-03);
18047
- }
18048
-
18049
- --wui-thumbnail-badge-offset: var(--wui-space-02);
18050
- }
18051
-
18052
- @container (min-width: 400px) {
18053
- &,
18054
- img {
18055
- border-radius: var(--wui-border-radius-05);
18056
- }
18057
-
18058
- --wui-thumbnail-badge-offset: var(--wui-space-03);
18057
+ border-radius: calc(8% * (9 / 16)) / 8%;
18059
18058
  }
18060
18059
  `;
18061
18060
  var StoryboardRenderer = ({
@@ -18179,7 +18178,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
18179
18178
  } else {
18180
18179
  thumbnailContent = null;
18181
18180
  }
18182
- return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(StyledThumbnailContainer, { $width: width, children: /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)(
18181
+ return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)(
18183
18182
  StyledThumbnail,
18184
18183
  {
18185
18184
  ref,
@@ -18197,7 +18196,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
18197
18196
  thumbnailContent
18198
18197
  ]
18199
18198
  }
18200
- ) });
18199
+ );
18201
18200
  }
18202
18201
  );
18203
18202
  Thumbnail.displayName = "Thumbnail_UI";