@wistia/ui 0.18.0-beta.852523a6.1e31df4 → 0.18.0-beta.89fb236c.e8cb4a9

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.852523a6.1e31df4
3
+ * @license @wistia/ui v0.18.0-beta.89fb236c.e8cb4a9
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -11775,6 +11775,7 @@ var StyledInputContainer = import_styled_components62.styled.div`
11775
11775
  position: relative;
11776
11776
  ${inputStyles};
11777
11777
  width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
11778
+ height: ${({ $fullHeight, $isMultiline }) => $fullHeight && $isMultiline ? "100%" : "auto"};
11778
11779
 
11779
11780
  input,
11780
11781
  textarea {
@@ -11786,32 +11787,48 @@ var StyledInputContainer = import_styled_components62.styled.div`
11786
11787
  --wui-input-line-height: var(--wui-typography-body-3-line-height);
11787
11788
 
11788
11789
  border-radius: var(--wui-input-multiline-border-radius);
11790
+ height: ${({ $fullHeight }) => $fullHeight ? "100%" : "auto"};
11791
+
11792
+ /* override height calculations when fullHeight is enabled */
11793
+ ${({ $fullHeight }) => $fullHeight && `
11794
+ &[rows='1'],
11795
+ &[rows='2'],
11796
+ &[rows='3'],
11797
+ &[rows='4'],
11798
+ &[rows='5'],
11799
+ &:not([rows]) {
11800
+ height: 100%;
11801
+ resize: none;
11802
+ }
11803
+ `}
11789
11804
 
11790
- /* height based on rows attribute (1-5) */
11791
- &[rows='1'] {
11792
- height: ${calculateTextareaHeight(1)};
11793
- }
11805
+ /* height based on rows attribute (1-5) - only when fullHeight is not enabled */
11806
+ ${({ $fullHeight }) => !$fullHeight && `
11807
+ &[rows='1'] {
11808
+ height: ${calculateTextareaHeight(1)};
11809
+ }
11794
11810
 
11795
- &[rows='2'] {
11796
- height: ${calculateTextareaHeight(2)};
11797
- }
11811
+ &[rows='2'] {
11812
+ height: ${calculateTextareaHeight(2)};
11813
+ }
11798
11814
 
11799
- &[rows='3'] {
11800
- height: ${calculateTextareaHeight(3)};
11801
- }
11815
+ &[rows='3'] {
11816
+ height: ${calculateTextareaHeight(3)};
11817
+ }
11802
11818
 
11803
- &[rows='4'] {
11804
- height: ${calculateTextareaHeight(4)};
11805
- }
11819
+ &[rows='4'] {
11820
+ height: ${calculateTextareaHeight(4)};
11821
+ }
11806
11822
 
11807
- &[rows='5'] {
11808
- height: ${calculateTextareaHeight(5)};
11809
- }
11823
+ &[rows='5'] {
11824
+ height: ${calculateTextareaHeight(5)};
11825
+ }
11810
11826
 
11811
- /* make sure textareas without a rows attribute are not tiny */
11812
- &:not([rows]) {
11813
- height: ${calculateTextareaHeight(5)};
11814
- }
11827
+ /* make sure textareas without a rows attribute are not tiny */
11828
+ &:not([rows]) {
11829
+ height: ${calculateTextareaHeight(5)};
11830
+ }
11831
+ `}
11815
11832
  }
11816
11833
 
11817
11834
  [type='search'] {
@@ -11866,6 +11883,7 @@ var StyledInputContainer = import_styled_components62.styled.div`
11866
11883
  var Input = (0, import_react47.forwardRef)(
11867
11884
  ({
11868
11885
  fullWidth = true,
11886
+ fullHeight = false,
11869
11887
  monospace = false,
11870
11888
  type = "text",
11871
11889
  autoSelect = false,
@@ -11905,7 +11923,9 @@ var Input = (0, import_react47.forwardRef)(
11905
11923
  return /* @__PURE__ */ (0, import_jsx_runtime249.jsxs)(
11906
11924
  StyledInputContainer,
11907
11925
  {
11926
+ $fullHeight: fullHeight,
11908
11927
  $fullWidth: fullWidth,
11928
+ $isMultiline: type === "multiline",
11909
11929
  $monospace: monospace,
11910
11930
  "data-wui-input-container": true,
11911
11931
  children: [
@@ -15016,6 +15036,7 @@ var FormField = ({
15016
15036
  id: computedId,
15017
15037
  label: isIntegratedLabel ? label : void 0,
15018
15038
  "aria-describedby": ariaDescribedby,
15039
+ "aria-invalid": (0, import_type_guards49.isNotNil)(computedError),
15019
15040
  ...props
15020
15041
  };
15021
15042
  if ((0, import_type_guards49.isUndefined)(value) && (0, import_type_guards49.isNotUndefined)(defaultValue)) {
@@ -15037,8 +15058,7 @@ var FormField = ({
15037
15058
  childProps = {
15038
15059
  ...childProps,
15039
15060
  name: computedName,
15040
- onChange: handleChange,
15041
- "aria-invalid": (0, import_type_guards49.isNotNil)(error)
15061
+ onChange: handleChange
15042
15062
  };
15043
15063
  }
15044
15064
  import_react73.Children.only(children);