@wistia/ui 0.18.0-beta.8cfd0d52.ccf3429 → 0.18.0-beta.90369b5e.f96f73a
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 +44 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.mjs +44 -21
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2218,6 +2218,10 @@ type InputProps = Omit<InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElemen
|
|
|
2218
2218
|
* If true, the input will fill the width of its parent
|
|
2219
2219
|
*/
|
|
2220
2220
|
fullWidth?: boolean;
|
|
2221
|
+
/**
|
|
2222
|
+
* If true, the input will fill the height of its parent container
|
|
2223
|
+
*/
|
|
2224
|
+
fullHeight?: boolean;
|
|
2221
2225
|
/**
|
|
2222
2226
|
* If true, the input will use a monospace font
|
|
2223
2227
|
*/
|
|
@@ -2255,6 +2259,10 @@ declare const Input: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HT
|
|
|
2255
2259
|
* If true, the input will fill the width of its parent
|
|
2256
2260
|
*/
|
|
2257
2261
|
fullWidth?: boolean;
|
|
2262
|
+
/**
|
|
2263
|
+
* If true, the input will fill the height of its parent container
|
|
2264
|
+
*/
|
|
2265
|
+
fullHeight?: boolean;
|
|
2258
2266
|
/**
|
|
2259
2267
|
* If true, the input will use a monospace font
|
|
2260
2268
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -2218,6 +2218,10 @@ type InputProps = Omit<InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElemen
|
|
|
2218
2218
|
* If true, the input will fill the width of its parent
|
|
2219
2219
|
*/
|
|
2220
2220
|
fullWidth?: boolean;
|
|
2221
|
+
/**
|
|
2222
|
+
* If true, the input will fill the height of its parent container
|
|
2223
|
+
*/
|
|
2224
|
+
fullHeight?: boolean;
|
|
2221
2225
|
/**
|
|
2222
2226
|
* If true, the input will use a monospace font
|
|
2223
2227
|
*/
|
|
@@ -2255,6 +2259,10 @@ declare const Input: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HT
|
|
|
2255
2259
|
* If true, the input will fill the width of its parent
|
|
2256
2260
|
*/
|
|
2257
2261
|
fullWidth?: boolean;
|
|
2262
|
+
/**
|
|
2263
|
+
* If true, the input will fill the height of its parent container
|
|
2264
|
+
*/
|
|
2265
|
+
fullHeight?: boolean;
|
|
2258
2266
|
/**
|
|
2259
2267
|
* If true, the input will use a monospace font
|
|
2260
2268
|
*/
|
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.90369b5e.f96f73a
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -11601,10 +11601,12 @@ var StyledInputContainer = styled44.div`
|
|
|
11601
11601
|
position: relative;
|
|
11602
11602
|
${inputStyles};
|
|
11603
11603
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
11604
|
+
height: ${({ $fullHeight }) => $fullHeight ? "100%" : "auto"};
|
|
11604
11605
|
|
|
11605
11606
|
input,
|
|
11606
11607
|
textarea {
|
|
11607
11608
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
11609
|
+
height: ${({ $fullHeight }) => $fullHeight ? "100%" : "auto"};
|
|
11608
11610
|
${({ $monospace }) => $monospace && "font-family: var(--wui-typography-family-mono);"}
|
|
11609
11611
|
}
|
|
11610
11612
|
|
|
@@ -11613,31 +11615,46 @@ var StyledInputContainer = styled44.div`
|
|
|
11613
11615
|
|
|
11614
11616
|
border-radius: var(--wui-input-multiline-border-radius);
|
|
11615
11617
|
|
|
11616
|
-
/* height
|
|
11617
|
-
|
|
11618
|
-
|
|
11619
|
-
|
|
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
|
+
`}
|
|
11620
11630
|
|
|
11621
|
-
|
|
11622
|
-
|
|
11623
|
-
|
|
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
|
+
}
|
|
11624
11636
|
|
|
11625
|
-
|
|
11626
|
-
|
|
11627
|
-
|
|
11637
|
+
&[rows='2'] {
|
|
11638
|
+
height: ${calculateTextareaHeight(2)};
|
|
11639
|
+
}
|
|
11628
11640
|
|
|
11629
|
-
|
|
11630
|
-
|
|
11631
|
-
|
|
11641
|
+
&[rows='3'] {
|
|
11642
|
+
height: ${calculateTextareaHeight(3)};
|
|
11643
|
+
}
|
|
11632
11644
|
|
|
11633
|
-
|
|
11634
|
-
|
|
11635
|
-
|
|
11645
|
+
&[rows='4'] {
|
|
11646
|
+
height: ${calculateTextareaHeight(4)};
|
|
11647
|
+
}
|
|
11636
11648
|
|
|
11637
|
-
|
|
11638
|
-
|
|
11639
|
-
|
|
11640
|
-
|
|
11649
|
+
&[rows='5'] {
|
|
11650
|
+
height: ${calculateTextareaHeight(5)};
|
|
11651
|
+
}
|
|
11652
|
+
|
|
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,6 +11749,7 @@ var Input = forwardRef15(
|
|
|
11731
11749
|
return /* @__PURE__ */ jsxs30(
|
|
11732
11750
|
StyledInputContainer,
|
|
11733
11751
|
{
|
|
11752
|
+
$fullHeight: fullHeight,
|
|
11734
11753
|
$fullWidth: fullWidth,
|
|
11735
11754
|
$monospace: monospace,
|
|
11736
11755
|
"data-wui-input-container": true,
|
|
@@ -14063,6 +14082,10 @@ var StyledInput = styled62(Input)`
|
|
|
14063
14082
|
min-height: unset;
|
|
14064
14083
|
}
|
|
14065
14084
|
|
|
14085
|
+
&:focus {
|
|
14086
|
+
height: ${({ $height }) => `${$height}px !important`};
|
|
14087
|
+
}
|
|
14088
|
+
|
|
14066
14089
|
&& {
|
|
14067
14090
|
${({ $variant }) => variantStyleMap[$variant]}
|
|
14068
14091
|
/* The input font styles (edit mode) needs the same font styles as Heading */
|