@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 +43 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.mjs +43 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2214,6 +2214,11 @@ type InputProps = Omit<InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElemen
|
|
|
2214
2214
|
* Set the disabled state of the input
|
|
2215
2215
|
*/
|
|
2216
2216
|
disabled?: boolean;
|
|
2217
|
+
/**
|
|
2218
|
+
* If true, the input will fill the height of its parent container
|
|
2219
|
+
* _note: only applicable when `type="multiline"`_
|
|
2220
|
+
*/
|
|
2221
|
+
fullHeight?: boolean;
|
|
2217
2222
|
/**
|
|
2218
2223
|
* If true, the input will fill the width of its parent
|
|
2219
2224
|
*/
|
|
@@ -2251,6 +2256,11 @@ declare const Input: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HT
|
|
|
2251
2256
|
* Set the disabled state of the input
|
|
2252
2257
|
*/
|
|
2253
2258
|
disabled?: boolean;
|
|
2259
|
+
/**
|
|
2260
|
+
* If true, the input will fill the height of its parent container
|
|
2261
|
+
* _note: only applicable when `type="multiline"`_
|
|
2262
|
+
*/
|
|
2263
|
+
fullHeight?: boolean;
|
|
2254
2264
|
/**
|
|
2255
2265
|
* If true, the input will fill the width of its parent
|
|
2256
2266
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -2214,6 +2214,11 @@ type InputProps = Omit<InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElemen
|
|
|
2214
2214
|
* Set the disabled state of the input
|
|
2215
2215
|
*/
|
|
2216
2216
|
disabled?: boolean;
|
|
2217
|
+
/**
|
|
2218
|
+
* If true, the input will fill the height of its parent container
|
|
2219
|
+
* _note: only applicable when `type="multiline"`_
|
|
2220
|
+
*/
|
|
2221
|
+
fullHeight?: boolean;
|
|
2217
2222
|
/**
|
|
2218
2223
|
* If true, the input will fill the width of its parent
|
|
2219
2224
|
*/
|
|
@@ -2251,6 +2256,11 @@ declare const Input: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HT
|
|
|
2251
2256
|
* Set the disabled state of the input
|
|
2252
2257
|
*/
|
|
2253
2258
|
disabled?: boolean;
|
|
2259
|
+
/**
|
|
2260
|
+
* If true, the input will fill the height of its parent container
|
|
2261
|
+
* _note: only applicable when `type="multiline"`_
|
|
2262
|
+
*/
|
|
2263
|
+
fullHeight?: boolean;
|
|
2254
2264
|
/**
|
|
2255
2265
|
* If true, the input will fill the width of its parent
|
|
2256
2266
|
*/
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.18.0-beta.
|
|
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
|
*
|
|
@@ -11601,6 +11601,7 @@ var StyledInputContainer = styled44.div`
|
|
|
11601
11601
|
position: relative;
|
|
11602
11602
|
${inputStyles};
|
|
11603
11603
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
11604
|
+
height: ${({ $fullHeight, $isMultiline }) => $fullHeight && $isMultiline ? "100%" : "auto"};
|
|
11604
11605
|
|
|
11605
11606
|
input,
|
|
11606
11607
|
textarea {
|
|
@@ -11612,32 +11613,48 @@ var StyledInputContainer = styled44.div`
|
|
|
11612
11613
|
--wui-input-line-height: var(--wui-typography-body-3-line-height);
|
|
11613
11614
|
|
|
11614
11615
|
border-radius: var(--wui-input-multiline-border-radius);
|
|
11616
|
+
height: ${({ $fullHeight }) => $fullHeight ? "100%" : "auto"};
|
|
11617
|
+
|
|
11618
|
+
/* override height calculations when fullHeight is enabled */
|
|
11619
|
+
${({ $fullHeight }) => $fullHeight && `
|
|
11620
|
+
&[rows='1'],
|
|
11621
|
+
&[rows='2'],
|
|
11622
|
+
&[rows='3'],
|
|
11623
|
+
&[rows='4'],
|
|
11624
|
+
&[rows='5'],
|
|
11625
|
+
&:not([rows]) {
|
|
11626
|
+
height: 100%;
|
|
11627
|
+
resize: none;
|
|
11628
|
+
}
|
|
11629
|
+
`}
|
|
11615
11630
|
|
|
11616
|
-
/* height based on rows attribute (1-5) */
|
|
11617
|
-
|
|
11618
|
-
|
|
11619
|
-
|
|
11631
|
+
/* height based on rows attribute (1-5) - only when fullHeight is not enabled */
|
|
11632
|
+
${({ $fullHeight }) => !$fullHeight && `
|
|
11633
|
+
&[rows='1'] {
|
|
11634
|
+
height: ${calculateTextareaHeight(1)};
|
|
11635
|
+
}
|
|
11620
11636
|
|
|
11621
|
-
|
|
11622
|
-
|
|
11623
|
-
|
|
11637
|
+
&[rows='2'] {
|
|
11638
|
+
height: ${calculateTextareaHeight(2)};
|
|
11639
|
+
}
|
|
11624
11640
|
|
|
11625
|
-
|
|
11626
|
-
|
|
11627
|
-
|
|
11641
|
+
&[rows='3'] {
|
|
11642
|
+
height: ${calculateTextareaHeight(3)};
|
|
11643
|
+
}
|
|
11628
11644
|
|
|
11629
|
-
|
|
11630
|
-
|
|
11631
|
-
|
|
11645
|
+
&[rows='4'] {
|
|
11646
|
+
height: ${calculateTextareaHeight(4)};
|
|
11647
|
+
}
|
|
11632
11648
|
|
|
11633
|
-
|
|
11634
|
-
|
|
11635
|
-
|
|
11649
|
+
&[rows='5'] {
|
|
11650
|
+
height: ${calculateTextareaHeight(5)};
|
|
11651
|
+
}
|
|
11636
11652
|
|
|
11637
|
-
|
|
11638
|
-
|
|
11639
|
-
|
|
11640
|
-
|
|
11653
|
+
/* make sure textareas without a rows attribute are not tiny */
|
|
11654
|
+
&:not([rows]) {
|
|
11655
|
+
height: ${calculateTextareaHeight(5)};
|
|
11656
|
+
}
|
|
11657
|
+
`}
|
|
11641
11658
|
}
|
|
11642
11659
|
|
|
11643
11660
|
[type='search'] {
|
|
@@ -11692,6 +11709,7 @@ var StyledInputContainer = styled44.div`
|
|
|
11692
11709
|
var Input = forwardRef15(
|
|
11693
11710
|
({
|
|
11694
11711
|
fullWidth = true,
|
|
11712
|
+
fullHeight = false,
|
|
11695
11713
|
monospace = false,
|
|
11696
11714
|
type = "text",
|
|
11697
11715
|
autoSelect = false,
|
|
@@ -11731,7 +11749,9 @@ var Input = forwardRef15(
|
|
|
11731
11749
|
return /* @__PURE__ */ jsxs30(
|
|
11732
11750
|
StyledInputContainer,
|
|
11733
11751
|
{
|
|
11752
|
+
$fullHeight: fullHeight,
|
|
11734
11753
|
$fullWidth: fullWidth,
|
|
11754
|
+
$isMultiline: type === "multiline",
|
|
11735
11755
|
$monospace: monospace,
|
|
11736
11756
|
"data-wui-input-container": true,
|
|
11737
11757
|
children: [
|
|
@@ -14866,6 +14886,7 @@ var FormField = ({
|
|
|
14866
14886
|
id: computedId,
|
|
14867
14887
|
label: isIntegratedLabel ? label : void 0,
|
|
14868
14888
|
"aria-describedby": ariaDescribedby,
|
|
14889
|
+
"aria-invalid": isNotNil28(computedError),
|
|
14869
14890
|
...props
|
|
14870
14891
|
};
|
|
14871
14892
|
if (isUndefined4(value) && isNotUndefined12(defaultValue)) {
|
|
@@ -14887,8 +14908,7 @@ var FormField = ({
|
|
|
14887
14908
|
childProps = {
|
|
14888
14909
|
...childProps,
|
|
14889
14910
|
name: computedName,
|
|
14890
|
-
onChange: handleChange
|
|
14891
|
-
"aria-invalid": isNotNil28(error)
|
|
14911
|
+
onChange: handleChange
|
|
14892
14912
|
};
|
|
14893
14913
|
}
|
|
14894
14914
|
Children10.only(children);
|