@fluentui/react-input 0.0.0-nightlyca6ef2bc8e20220105.1

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.
Files changed (58) hide show
  1. package/CHANGELOG.json +1044 -0
  2. package/CHANGELOG.md +429 -0
  3. package/LICENSE +15 -0
  4. package/README.md +5 -0
  5. package/Spec-styling.md +125 -0
  6. package/Spec-variants.md +99 -0
  7. package/Spec.md +262 -0
  8. package/dist/react-input.d.ts +123 -0
  9. package/lib/Input.d.ts +1 -0
  10. package/lib/Input.js +2 -0
  11. package/lib/Input.js.map +1 -0
  12. package/lib/components/Input/Input.d.ts +8 -0
  13. package/lib/components/Input/Input.js +17 -0
  14. package/lib/components/Input/Input.js.map +1 -0
  15. package/lib/components/Input/Input.types.d.ts +84 -0
  16. package/lib/components/Input/Input.types.js +2 -0
  17. package/lib/components/Input/Input.types.js.map +1 -0
  18. package/lib/components/Input/index.d.ts +5 -0
  19. package/lib/components/Input/index.js +6 -0
  20. package/lib/components/Input/index.js.map +1 -0
  21. package/lib/components/Input/renderInput.d.ts +5 -0
  22. package/lib/components/Input/renderInput.js +18 -0
  23. package/lib/components/Input/renderInput.js.map +1 -0
  24. package/lib/components/Input/useInput.d.ts +12 -0
  25. package/lib/components/Input/useInput.js +64 -0
  26. package/lib/components/Input/useInput.js.map +1 -0
  27. package/lib/components/Input/useInputStyles.d.ts +6 -0
  28. package/lib/components/Input/useInputStyles.js +296 -0
  29. package/lib/components/Input/useInputStyles.js.map +1 -0
  30. package/lib/index.d.ts +1 -0
  31. package/lib/index.js +2 -0
  32. package/lib/index.js.map +1 -0
  33. package/lib/tsdoc-metadata.json +11 -0
  34. package/lib-commonjs/Input.d.ts +1 -0
  35. package/lib-commonjs/Input.js +10 -0
  36. package/lib-commonjs/Input.js.map +1 -0
  37. package/lib-commonjs/components/Input/Input.d.ts +8 -0
  38. package/lib-commonjs/components/Input/Input.js +28 -0
  39. package/lib-commonjs/components/Input/Input.js.map +1 -0
  40. package/lib-commonjs/components/Input/Input.types.d.ts +84 -0
  41. package/lib-commonjs/components/Input/Input.types.js +6 -0
  42. package/lib-commonjs/components/Input/Input.types.js.map +1 -0
  43. package/lib-commonjs/components/Input/index.d.ts +5 -0
  44. package/lib-commonjs/components/Input/index.js +18 -0
  45. package/lib-commonjs/components/Input/index.js.map +1 -0
  46. package/lib-commonjs/components/Input/renderInput.d.ts +5 -0
  47. package/lib-commonjs/components/Input/renderInput.js +29 -0
  48. package/lib-commonjs/components/Input/renderInput.js.map +1 -0
  49. package/lib-commonjs/components/Input/useInput.d.ts +12 -0
  50. package/lib-commonjs/components/Input/useInput.js +74 -0
  51. package/lib-commonjs/components/Input/useInput.js.map +1 -0
  52. package/lib-commonjs/components/Input/useInputStyles.d.ts +6 -0
  53. package/lib-commonjs/components/Input/useInputStyles.js +306 -0
  54. package/lib-commonjs/components/Input/useInputStyles.js.map +1 -0
  55. package/lib-commonjs/index.d.ts +1 -0
  56. package/lib-commonjs/index.js +10 -0
  57. package/lib-commonjs/index.js.map +1 -0
  58. package/package.json +65 -0
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { getSlots } from '@fluentui/react-utilities';
3
+ /**
4
+ * Render the final JSX of Input
5
+ */
6
+
7
+ export const renderInput = state => {
8
+ const {
9
+ slots,
10
+ slotProps
11
+ } = getSlots(state, ['input', 'contentBefore', 'contentAfter', 'root']);
12
+ return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
13
+ }, /*#__PURE__*/React.createElement(slots.contentBefore, { ...slotProps.contentBefore
14
+ }), /*#__PURE__*/React.createElement(slots.input, { ...slotProps.input
15
+ }), /*#__PURE__*/React.createElement(slots.contentAfter, { ...slotProps.contentAfter
16
+ }));
17
+ };
18
+ //# sourceMappingURL=renderInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Input/renderInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,WAAW,GAAI,KAAD,IAAsB;AAC/C,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAa,KAAb,EAAoB,CAAC,OAAD,EAAU,eAAV,EAA2B,cAA3B,EAA2C,MAA3C,CAApB,CAArC;AACA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,aAAP,EAAoB,EAAA,GAAK,SAAS,CAAC;AAAf,GAApB,CADF,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CAFF,eAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,YAAP,EAAmB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAnB,CAHF,CADF;AAOD,CATM","sourceRoot":""}
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import type { InputProps, InputState } from './Input.types';
3
+ /**
4
+ * Create the state required to render Input.
5
+ *
6
+ * The returned state can be modified with hooks such as useInputStyles,
7
+ * before being passed to renderInput.
8
+ *
9
+ * @param props - props from this instance of Input
10
+ * @param ref - reference to `<input>` element of Input
11
+ */
12
+ export declare const useInput: (props: InputProps, ref: React.Ref<HTMLInputElement>) => InputState;
@@ -0,0 +1,64 @@
1
+ import { getPartitionedNativeProps, resolveShorthand, useControllableState, useEventCallback } from '@fluentui/react-utilities';
2
+ /**
3
+ * Create the state required to render Input.
4
+ *
5
+ * The returned state can be modified with hooks such as useInputStyles,
6
+ * before being passed to renderInput.
7
+ *
8
+ * @param props - props from this instance of Input
9
+ * @param ref - reference to `<input>` element of Input
10
+ */
11
+
12
+ export const useInput = (props, ref) => {
13
+ const {
14
+ size = 'medium',
15
+ appearance = 'outline',
16
+ inline = false,
17
+ onChange
18
+ } = props;
19
+ const [value, setValue] = useControllableState({
20
+ state: props.value,
21
+ defaultState: props.defaultValue,
22
+ initialState: undefined
23
+ });
24
+ const nativeProps = getPartitionedNativeProps({
25
+ props,
26
+ primarySlotTagName: 'input',
27
+ excludedPropNames: ['size', 'onChange', 'value', 'defaultValue']
28
+ });
29
+ const state = {
30
+ size,
31
+ appearance,
32
+ inline,
33
+ components: {
34
+ root: 'span',
35
+ input: 'input',
36
+ contentBefore: 'span',
37
+ contentAfter: 'span'
38
+ },
39
+ input: resolveShorthand(props.input, {
40
+ required: true,
41
+ defaultProps: {
42
+ type: 'text',
43
+ ref,
44
+ ...nativeProps.primary
45
+ }
46
+ }),
47
+ contentAfter: resolveShorthand(props.contentAfter),
48
+ contentBefore: resolveShorthand(props.contentBefore),
49
+ root: resolveShorthand(props.root, {
50
+ required: true,
51
+ defaultProps: nativeProps.root
52
+ })
53
+ };
54
+ state.input.value = value;
55
+ state.input.onChange = useEventCallback(ev => {
56
+ const newValue = ev.target.value;
57
+ onChange === null || onChange === void 0 ? void 0 : onChange(ev, {
58
+ value: newValue
59
+ });
60
+ setValue(newValue);
61
+ });
62
+ return state;
63
+ };
64
+ //# sourceMappingURL=useInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Input/useInput.ts"],"names":[],"mappings":"AACA,SACE,yBADF,EAEE,gBAFF,EAGE,oBAHF,EAIE,gBAJF,QAKO,2BALP;AAQA;;;;;;;;AAQG;;AACH,OAAO,MAAM,QAAQ,GAAG,CAAC,KAAD,EAAoB,GAApB,KAAoE;AAC1F,QAAM;AAAE,IAAA,IAAI,GAAG,QAAT;AAAmB,IAAA,UAAU,GAAG,SAAhC;AAA2C,IAAA,MAAM,GAAG,KAApD;AAA2D,IAAA;AAA3D,MAAwE,KAA9E;AAEA,QAAM,CAAC,KAAD,EAAQ,QAAR,IAAoB,oBAAoB,CAAC;AAC7C,IAAA,KAAK,EAAE,KAAK,CAAC,KADgC;AA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,KAAA,IAAR,IAAA,QAAQ,KAAA,KAAA,CAAR,GAAQ,KAAA,CAAR,GAAA,QAAQ,CAAG,EAAH,EAAO;AAAE,MAAA,KAAK,EAAE;AAAT,KAAP,CAAR;AACA,IAAA,QAAQ,CAAC,QAAD,CAAR;AACD,GAJsC,CAAvC;AAMA,SAAO,KAAP;AACD,CAjDM","sourceRoot":""}
@@ -0,0 +1,6 @@
1
+ import type { InputState } from './Input.types';
2
+ export declare const inputClassName = "fui-Input";
3
+ /**
4
+ * Apply styling to the Input slots based on the state
5
+ */
6
+ export declare const useInputStyles: (state: InputState) => InputState;
@@ -0,0 +1,296 @@
1
+ import { __styles, mergeClasses, shorthands } from '@fluentui/react-make-styles';
2
+ export const inputClassName = 'fui-Input'; // TODO(sharing) use theme values once available
3
+
4
+ const horizontalSpacing = {
5
+ xxs: '2px',
6
+ xs: '4px',
7
+ sNudge: '6px',
8
+ s: '8px',
9
+ mNudge: '10px',
10
+ m: '12px'
11
+ };
12
+ const motionDurations = {
13
+ ultraFast: '0.05s',
14
+ normal: '0.2s'
15
+ };
16
+ const motionCurves = {
17
+ accelerateMid: 'cubic-bezier(0.7,0,1,0.5)',
18
+ decelerateMid: 'cubic-bezier(0.1,0.9,0.2,1)'
19
+ };
20
+ const contentSizes = {
21
+ // TODO(sharing) shouldn't these be in the theme?
22
+ body1: theme => ({
23
+ fontSize: theme.fontSizeBase300,
24
+ lineHeight: theme.lineHeightBase300
25
+ }),
26
+ caption1: theme => ({
27
+ fontSize: theme.fontSizeBase200,
28
+ lineHeight: theme.lineHeightBase200
29
+ }),
30
+ // eslint-disable-next-line @typescript-eslint/naming-convention
31
+ 400: theme => ({
32
+ fontSize: theme.fontSizeBase400,
33
+ lineHeight: theme.lineHeightBase400
34
+ })
35
+ }; // TODO(sharing) should these be shared somewhere?
36
+
37
+ const fieldHeights = {
38
+ small: '24px',
39
+ medium: '32px',
40
+ large: '40px'
41
+ };
42
+
43
+ const useRootStyles = /*#__PURE__*/__styles({
44
+ "base": {
45
+ "mc9l5x": "f22iagw",
46
+ "Bt984gj": "f122n59",
47
+ "Eh141a": "flvyvdh",
48
+ "i8kkvl": "f16mnhsx",
49
+ "Belr9w4": "fbi42co",
50
+ "Bahqtrf": "fk6fouc",
51
+ "Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
52
+ "Beyfa6y": ["f16jpd5f", "f1aa9q02"],
53
+ "B7oj6ja": ["f1jar5jt", "fyu767a"],
54
+ "Btl43ni": ["fyu767a", "f1jar5jt"],
55
+ "qhf8xq": "f10pi13n",
56
+ "B7ck84d": "f1ewtqcl"
57
+ },
58
+ "interactive": {
59
+ "oqd9ik": "ffdc0f3",
60
+ "Bs6t6z0": "fqc6z8f",
61
+ "Hdbjpj": "f11ef69",
62
+ "jc51t6": ["f383sj6", "fpmdmpy"],
63
+ "Bj55yzk": "fqmzrrm",
64
+ "cnmfks": ["fpmdmpy", "f383sj6"],
65
+ "mpb1vu": "f1iv82i4",
66
+ "B9nohqn": ["f1j2a01o", "fvxed1z"],
67
+ "frdscb": ["fvxed1z", "f1j2a01o"],
68
+ "B3zxwmv": "f1gw3il9",
69
+ "J4s2b0": "fd0py6g",
70
+ "Bk8j60v": "f1ta67ae",
71
+ "B5pt6m4": "fabrkco",
72
+ "xn0juu": "f1lmmjng",
73
+ "wbfbqe": "fopw4to",
74
+ "mafdb0": "f1dw3w9y",
75
+ "s1xtto": "f1n2ytmg",
76
+ "Hbcoss": "fnqdfvx",
77
+ "lq1u8j": "fbqc2tv",
78
+ "B37x0ls": "fvvig05",
79
+ "H8rp7s": "f1nwpqpa",
80
+ "uvoyur": "f1e6xsgv"
81
+ },
82
+ "small": {
83
+ "sshi5w": "f1pha7fy",
84
+ "z8tnut": "f1g0x7ka",
85
+ "z189sj": ["f1sgzk6v", "f1bg5zqg"],
86
+ "Byoj8tv": "f1qch9an",
87
+ "uwmqm3": ["f1bg5zqg", "f1sgzk6v"],
88
+ "Be2twd7": "fy9rknc",
89
+ "Bg96gwp": "fwrc4pm"
90
+ },
91
+ "medium": {
92
+ "sshi5w": "f1nxs5xn",
93
+ "z8tnut": "f1g0x7ka",
94
+ "z189sj": ["f81rol6", "frdkuqy"],
95
+ "Byoj8tv": "f1qch9an",
96
+ "uwmqm3": ["frdkuqy", "f81rol6"],
97
+ "Be2twd7": "fkhj508",
98
+ "Bg96gwp": "f1i3iumi"
99
+ },
100
+ "large": {
101
+ "sshi5w": "f1w5jphr",
102
+ "z8tnut": "f1g0x7ka",
103
+ "z189sj": ["f11qrl6u", "fjlbh76"],
104
+ "Byoj8tv": "f1qch9an",
105
+ "uwmqm3": ["fjlbh76", "f11qrl6u"],
106
+ "Be2twd7": "fod5ikn",
107
+ "Bg96gwp": "faaz57k",
108
+ "i8kkvl": "fgfbwa2",
109
+ "Belr9w4": "f1y3hx6l"
110
+ },
111
+ "inline": {
112
+ "mc9l5x": "ftuwxu6"
113
+ },
114
+ "outline": {
115
+ "De3pzq": "fxugw4r",
116
+ "B4j52fo": "f5ogflp",
117
+ "Bekrc4i": ["f1hqa2wf", "finvdd3"],
118
+ "Bn0qgzm": "f1f09k3d",
119
+ "ibv6hh": ["finvdd3", "f1hqa2wf"],
120
+ "icvyot": "fzkkow9",
121
+ "vrafjx": ["fcdblym", "fjik90z"],
122
+ "oivjwe": "fg706s2",
123
+ "wvpqe5": ["fjik90z", "fcdblym"],
124
+ "g2u3we": "fj3muxo",
125
+ "h3c5rm": ["f1akhkt", "f1lxtadh"],
126
+ "B9xav0g": "f1c1zstj",
127
+ "zhjwy3": ["f1lxtadh", "f1akhkt"]
128
+ },
129
+ "outlineInteractive": {
130
+ "Bgoe8wy": "fvcxoqz",
131
+ "Bwzppfd": ["f1ub3y4t", "f1m52nbi"],
132
+ "oetu4i": "f1l4zc64",
133
+ "gg5e9n": ["f1m52nbi", "f1ub3y4t"],
134
+ "Drbcw7": "f8vnjqi",
135
+ "udz0bu": ["fz1etlk", "f1hc16gm"],
136
+ "Be8ivqh": "f1klwx88",
137
+ "ofdepl": ["f1hc16gm", "fz1etlk"]
138
+ },
139
+ "underline": {
140
+ "De3pzq": "f1c21dwh",
141
+ "Bbmb7ep": ["f1krrbdw", "f1deotkl"],
142
+ "Beyfa6y": ["f1deotkl", "f1krrbdw"],
143
+ "B7oj6ja": ["f10ostut", "f1ozlkrg"],
144
+ "Btl43ni": ["f1ozlkrg", "f10ostut"],
145
+ "Bn0qgzm": "f1f09k3d",
146
+ "oivjwe": "fg706s2",
147
+ "B9xav0g": "f1c1zstj"
148
+ },
149
+ "underlineInteractive": {
150
+ "oetu4i": "f1l4zc64",
151
+ "Be8ivqh": "f1klwx88",
152
+ "frdscb": ["fqvcdsd", "f9cg6ix"],
153
+ "B9nohqn": ["f9cg6ix", "fqvcdsd"],
154
+ "B1dhsta": ["f1pvm60u", "f179ivkp"],
155
+ "Bjdmjzx": ["f179ivkp", "f1pvm60u"]
156
+ },
157
+ "filled": {
158
+ "E5pizo": "fyed02w",
159
+ "B4j52fo": "f5ogflp",
160
+ "Bekrc4i": ["f1hqa2wf", "finvdd3"],
161
+ "Bn0qgzm": "f1f09k3d",
162
+ "ibv6hh": ["finvdd3", "f1hqa2wf"],
163
+ "icvyot": "fzkkow9",
164
+ "vrafjx": ["fcdblym", "fjik90z"],
165
+ "oivjwe": "fg706s2",
166
+ "wvpqe5": ["fjik90z", "fcdblym"],
167
+ "g2u3we": "fghlq4f",
168
+ "h3c5rm": ["f1gn591s", "fjscplz"],
169
+ "B9xav0g": "fb073pr",
170
+ "zhjwy3": ["fjscplz", "f1gn591s"]
171
+ },
172
+ "filledInteractive": {
173
+ "q7v0qe": "ftmjh5b",
174
+ "kmh5ft": ["f17blpuu", "fsrcdbj"],
175
+ "nagaa4": "f1tpwn32",
176
+ "B1yhkcb": ["fsrcdbj", "f17blpuu"]
177
+ },
178
+ "filledDarker": {
179
+ "De3pzq": "f16xq7d1"
180
+ },
181
+ "filledLighter": {
182
+ "De3pzq": "fxugw4r"
183
+ },
184
+ "disabled": {
185
+ "Bceei9c": "fdrzuqr",
186
+ "B4j52fo": "f5ogflp",
187
+ "Bekrc4i": ["f1hqa2wf", "finvdd3"],
188
+ "Bn0qgzm": "f1f09k3d",
189
+ "ibv6hh": ["finvdd3", "f1hqa2wf"],
190
+ "icvyot": "fzkkow9",
191
+ "vrafjx": ["fcdblym", "fjik90z"],
192
+ "oivjwe": "fg706s2",
193
+ "wvpqe5": ["fjik90z", "fcdblym"],
194
+ "g2u3we": "f1jj8ep1",
195
+ "h3c5rm": ["f15xbau", "fy0fskl"],
196
+ "B9xav0g": "f4ikngz",
197
+ "zhjwy3": ["fy0fskl", "f15xbau"],
198
+ "Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
199
+ "Beyfa6y": ["f16jpd5f", "f1aa9q02"],
200
+ "B7oj6ja": ["f1jar5jt", "fyu767a"],
201
+ "Btl43ni": ["fyu767a", "f1jar5jt"]
202
+ }
203
+ }, {
204
+ "d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".flvyvdh{-webkit-box-flex-wrap:nowrap;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;}", ".f16mnhsx{-webkit-column-gap:2px;column-gap:2px;}", ".fbi42co{row-gap:2px;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f10pi13n{position:relative;}", ".f1ewtqcl{box-sizing:border-box;}", ".ffdc0f3:after{box-sizing:border-box;}", ".fqc6z8f:after{content:\"\";}", ".f11ef69:after{position:absolute;}", ".f383sj6:after{left:-1px;}", ".fpmdmpy:after{right:-1px;}", ".fqmzrrm:after{bottom:-1px;}", ".f1iv82i4:after{height:-webkit-max(2px, var(--borderRadiusMedium));height:-moz-max(2px, var(--borderRadiusMedium));height:max(2px, var(--borderRadiusMedium));}", ".f1j2a01o:after{border-bottom-left-radius:var(--borderRadiusMedium);}", ".fvxed1z:after{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f1gw3il9:after{border-bottom-width:2px;}", ".fd0py6g:after{border-bottom-style:solid;}", ".f1ta67ae:after{border-bottom-color:var(--colorCompoundBrandStroke);}", ".fabrkco:after{-webkit-clip-path:inset(calc(100% - 2px) 0 0 0);clip-path:inset(calc(100% - 2px) 0 0 0);}", ".f1lmmjng:after{-webkit-transform:scaleX(0);-moz-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);}", ".fopw4to:after{transition-property:transform;}", ".f1dw3w9y:after{transition-duration:0.05s;}", ".f1n2ytmg:after{transition-delay:cubic-bezier(0.7,0,1,0.5);}", ".f1pha7fy{min-height:24px;}", ".f1g0x7ka{padding-top:0;}", ".f1sgzk6v{padding-right:6px;}", ".f1bg5zqg{padding-left:6px;}", ".f1qch9an{padding-bottom:0;}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".f1nxs5xn{min-height:32px;}", ".f81rol6{padding-right:10px;}", ".frdkuqy{padding-left:10px;}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1w5jphr{min-height:40px;}", ".f11qrl6u{padding-right:12px;}", ".fjlbh76{padding-left:12px;}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".fgfbwa2{-webkit-column-gap:6px;column-gap:6px;}", ".f1y3hx6l{row-gap:6px;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f5ogflp{border-top-width:1px;}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".f1f09k3d{border-bottom-width:1px;}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fj3muxo{border-top-color:var(--colorNeutralStroke1);}", ".f1akhkt{border-right-color:var(--colorNeutralStroke1);}", ".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}", ".f1c1zstj{border-bottom-color:var(--colorNeutralStrokeAccessible);}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".f1krrbdw{border-bottom-right-radius:0;}", ".f1deotkl{border-bottom-left-radius:0;}", ".f10ostut{border-top-right-radius:0;}", ".f1ozlkrg{border-top-left-radius:0;}", ".fqvcdsd:after{border-bottom-right-radius:0;}", ".f9cg6ix:after{border-bottom-left-radius:0;}", ".f1pvm60u:after{border-top-right-radius:0;}", ".f179ivkp:after{border-top-left-radius:0;}", ".fyed02w{box-shadow:var(--shadow2);}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}", ".f16xq7d1{background-color:var(--colorNeutralBackground3);}", ".fdrzuqr{cursor:not-allowed;}", ".f1jj8ep1{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f15xbau{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fy0fskl{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f4ikngz{border-bottom-color:var(--colorNeutralStrokeDisabled);}"],
205
+ "w": [".fnqdfvx:focus-within:after{-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1);}", ".fbqc2tv:focus-within:after{transition-property:transform;}", ".fvvig05:focus-within:after{transition-duration:0.2s;}", ".f1nwpqpa:focus-within:after{transition-delay:cubic-bezier(0.1,0.9,0.2,1);}", ".f1e6xsgv:focus-within:active:after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}"],
206
+ "h": [".fvcxoqz:hover{border-top-color:var(--colorNeutralStroke1Hover);}", ".f1ub3y4t:hover{border-right-color:var(--colorNeutralStroke1Hover);}", ".f1m52nbi:hover{border-left-color:var(--colorNeutralStroke1Hover);}", ".f1l4zc64:hover{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}", ".ftmjh5b:hover,.ftmjh5b:focus-within{border-top-color:var(--colorTransparentStrokeInteractive);}", ".f17blpuu:hover,.f17blpuu:focus-within{border-right-color:var(--colorTransparentStrokeInteractive);}", ".fsrcdbj:hover,:focus-within{border-left-color:var(--colorTransparentStrokeInteractive);}", ".f1tpwn32:hover,.f1tpwn32:focus-within{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".fsrcdbj:hover,.fsrcdbj:focus-within{border-left-color:var(--colorTransparentStrokeInteractive);}", ".f17blpuu:hover,:focus-within{border-right-color:var(--colorTransparentStrokeInteractive);}"],
207
+ "a": [".f8vnjqi:active,.f8vnjqi:focus-within{border-top-color:var(--colorNeutralStroke1Pressed);}", ".fz1etlk:active,.fz1etlk:focus-within{border-right-color:var(--colorNeutralStroke1Pressed);}", ".f1hc16gm:active,:focus-within{border-left-color:var(--colorNeutralStroke1Pressed);}", ".f1klwx88:active,.f1klwx88:focus-within{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f1hc16gm:active,.f1hc16gm:focus-within{border-left-color:var(--colorNeutralStroke1Pressed);}", ".fz1etlk:active,:focus-within{border-right-color:var(--colorNeutralStroke1Pressed);}"]
208
+ });
209
+
210
+ const useInputElementStyles = /*#__PURE__*/__styles({
211
+ "base": {
212
+ "B7ck84d": "f1ewtqcl",
213
+ "Bh6795r": "fqerorx",
214
+ "icvyot": "f1ern45e",
215
+ "vrafjx": ["f1n71otn", "f1deefiw"],
216
+ "oivjwe": "f1h8hb77",
217
+ "wvpqe5": ["f1deefiw", "f1n71otn"],
218
+ "z8tnut": "f1g0x7ka",
219
+ "z189sj": ["f12huiiw", "f161knb0"],
220
+ "Byoj8tv": "f1qch9an",
221
+ "uwmqm3": ["f161knb0", "f12huiiw"],
222
+ "sj55zd": "f19n0e5",
223
+ "De3pzq": "f3rmtva",
224
+ "yvdlaj": "fwyc1cq",
225
+ "B3o7kgh": "f13ta7ih",
226
+ "B486eqv": "f2hkw1w"
227
+ },
228
+ "small": {
229
+ "Be2twd7": "fy9rknc",
230
+ "Bg96gwp": "fwrc4pm"
231
+ },
232
+ "medium": {
233
+ "Be2twd7": "fkhj508",
234
+ "Bg96gwp": "f1i3iumi"
235
+ },
236
+ "large": {
237
+ "Be2twd7": "fod5ikn",
238
+ "Bg96gwp": "faaz57k",
239
+ "z8tnut": "f1g0x7ka",
240
+ "z189sj": ["f1sgzk6v", "f1bg5zqg"],
241
+ "Byoj8tv": "f1qch9an",
242
+ "uwmqm3": ["f1bg5zqg", "f1sgzk6v"]
243
+ },
244
+ "disabled": {
245
+ "sj55zd": "f1s2aq7o",
246
+ "De3pzq": "f1c21dwh",
247
+ "Bceei9c": "fdrzuqr",
248
+ "yvdlaj": "fahhnxm"
249
+ }
250
+ }, {
251
+ "d": [".f1ewtqcl{box-sizing:border-box;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1ern45e{border-top-style:none;}", ".f1n71otn{border-right-style:none;}", ".f1deefiw{border-left-style:none;}", ".f1h8hb77{border-bottom-style:none;}", ".f1g0x7ka{padding-top:0;}", ".f12huiiw{padding-right:2px;}", ".f161knb0{padding-left:2px;}", ".f1qch9an{padding-bottom:0;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f3rmtva{background-color:transparent;}", ".fwyc1cq::-webkit-input-placeholder{color:var(--colorNeutralForeground4);}", ".fwyc1cq::-moz-placeholder{color:var(--colorNeutralForeground4);}", ".f13ta7ih::-webkit-input-placeholder{opacity:1;}", ".f13ta7ih::-moz-placeholder{opacity:1;}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".f1sgzk6v{padding-right:6px;}", ".f1bg5zqg{padding-left:6px;}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".fdrzuqr{cursor:not-allowed;}", ".fahhnxm::-webkit-input-placeholder{color:var(--colorNeutralForegroundDisabled);}", ".fahhnxm::-moz-placeholder{color:var(--colorNeutralForegroundDisabled);}"],
252
+ "i": [".f2hkw1w:focus-visible{outline-style:none;}"]
253
+ });
254
+
255
+ const useContentStyles = /*#__PURE__*/__styles({
256
+ "base": {
257
+ "B7ck84d": "f1ewtqcl",
258
+ "sj55zd": "f11d4kpn",
259
+ "clhimo": "fyuhxbn"
260
+ },
261
+ "disabled": {
262
+ "sj55zd": "f1s2aq7o"
263
+ }
264
+ }, {
265
+ "d": [".f1ewtqcl{box-sizing:border-box;}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".fyuhxbn>svg{display:block;}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}"]
266
+ });
267
+ /**
268
+ * Apply styling to the Input slots based on the state
269
+ */
270
+
271
+
272
+ export const useInputStyles = state => {
273
+ const {
274
+ size,
275
+ appearance
276
+ } = state;
277
+ const disabled = state.input.disabled;
278
+ const filled = appearance.startsWith('filled');
279
+ const rootStyles = useRootStyles();
280
+ const inputStyles = useInputElementStyles();
281
+ const contentStyles = useContentStyles();
282
+ state.root.className = mergeClasses(inputClassName, rootStyles.base, rootStyles[size], rootStyles[appearance], !disabled && rootStyles.interactive, !disabled && appearance === 'outline' && rootStyles.outlineInteractive, !disabled && appearance === 'underline' && rootStyles.underlineInteractive, !disabled && filled && rootStyles.filledInteractive, state.inline && rootStyles.inline, filled && rootStyles.filled, disabled && rootStyles.disabled, state.root.className);
283
+ state.input.className = mergeClasses(inputStyles.base, inputStyles[size], disabled && inputStyles.disabled, state.input.className);
284
+ const contentClasses = [contentStyles.base, disabled && contentStyles.disabled];
285
+
286
+ if (state.contentBefore) {
287
+ state.contentBefore.className = mergeClasses(...contentClasses, state.contentBefore.className);
288
+ }
289
+
290
+ if (state.contentAfter) {
291
+ state.contentAfter.className = mergeClasses(...contentClasses, state.contentAfter.className);
292
+ }
293
+
294
+ return state;
295
+ };
296
+ //# sourceMappingURL=useInputStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Input/useInputStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,6BAArD;AAIA,OAAO,MAAM,cAAc,GAAG,WAAvB,C,CAEP;;AACA,MAAM,iBAAiB,GAAG;AACxB,EAAA,GAAG,EAAE,KADmB;AAExB,EAAA,EAAE,EAAE,KAFoB;AAGxB,EAAA,MAAM,EAAE,KAHgB;AAIxB,EAAA,CAAC,EAAE,KAJqB;AAKxB,EAAA,MAAM,EAAE,MALgB;AAMxB,EAAA,CAAC,EAAE;AANqB,CAA1B;AAQA,MAAM,eAAe,GAAG;AACtB,EAAA,SAAS,EAAE,OADW;AAEtB,EAAA,MAAM,EAAE;AAFc,CAAxB;AAIA,MAAM,YAAY,GAAG;AACnB,EAAA,aAAa,EAAE,2BADI;AAEnB,EAAA,aAAa,EAAE;AAFI,CAArB;AAIA,MAAM,YAAY,GAAG;AACnB;AACA,EAAA,KAAK,EAAG,KAAD,KAAmB;AACxB,IAAA,QAAQ,EAAE,KAAK,CAAC,eADQ;AAExB,IAAA,UAAU,EAAE,KAAK,CAAC;AAFM,GAAnB,CAFY;AAMnB,EAAA,QAAQ,EAAG,KAAD,KAAmB;AAC3B,IAAA,QAAQ,EAAE,KAAK,CAAC,eADW;AAE3B,IAAA,UAAU,EAAE,KAAK,CAAC;AAFS,GAAnB,CANS;AAUnB;AACA,O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,UAAU,CAAC,MATM,EAUjC,MAAM,IAAI,UAAU,CAAC,MAVY,EAWjC,QAAQ,IAAI,UAAU,CAAC,QAXU,EAYjC,KAAK,CAAC,IAAN,CAAW,SAZsB,CAAnC;AAeA,EAAA,KAAK,CAAC,KAAN,CAAY,SAAZ,GAAwB,YAAY,CAClC,WAAW,CAAC,IADsB,EAElC,WAAW,CAAC,IAAD,CAFuB,EAGlC,QAAQ,IAAI,WAAW,CAAC,QAHU,EAIlC,KAAK,CAAC,KAAN,CAAY,SAJsB,CAApC;AAOA,QAAM,cAAc,GAAG,CAAC,aAAa,CAAC,IAAf,EAAqB,QAAQ,IAAI,aAAa,CAAC,QAA/C,CAAvB;;AACA,MAAI,KAAK,CAAC,aAAV,EAAyB;AACvB,IAAA,KAAK,CAAC,aAAN,CAAoB,SAApB,GAAgC,YAAY,CAAC,GAAG,cAAJ,EAAoB,KAAK,CAAC,aAAN,CAAoB,SAAxC,CAA5C;AACD;;AACD,MAAI,KAAK,CAAC,YAAV,EAAwB;AACtB,IAAA,KAAK,CAAC,YAAN,CAAmB,SAAnB,GAA+B,YAAY,CAAC,GAAG,cAAJ,EAAoB,KAAK,CAAC,YAAN,CAAmB,SAAvC,CAA3C;AACD;;AAED,SAAO,KAAP;AACD,CAxCM","sourceRoot":""}
package/lib/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './Input';
package/lib/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './Input';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
@@ -0,0 +1,11 @@
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "7.18.1"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1 @@
1
+ export * from './components/Input/index';
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./components/Input/index"), exports);
10
+ //# sourceMappingURL=Input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Input.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourceRoot":""}
@@ -0,0 +1,8 @@
1
+ import type { InputProps } from './Input.types';
2
+ import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
+ /**
4
+ * The Input component allows people to enter and edit text.
5
+ *
6
+ * ⚠️ **This component is still in alpha (unstable) status. APIs may change before the final release.**
7
+ */
8
+ export declare const Input: ForwardRefComponent<InputProps>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Input = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const useInput_1 = /*#__PURE__*/require("./useInput");
11
+
12
+ const renderInput_1 = /*#__PURE__*/require("./renderInput");
13
+
14
+ const useInputStyles_1 = /*#__PURE__*/require("./useInputStyles");
15
+ /**
16
+ * The Input component allows people to enter and edit text.
17
+ *
18
+ * ⚠️ **This component is still in alpha (unstable) status. APIs may change before the final release.**
19
+ */
20
+
21
+
22
+ exports.Input = /*#__PURE__*/React.forwardRef((props, ref) => {
23
+ const state = useInput_1.useInput(props, ref);
24
+ useInputStyles_1.useInputStyles(state);
25
+ return renderInput_1.renderInput(state);
26
+ });
27
+ exports.Input.displayName = 'Input';
28
+ //# sourceMappingURL=Input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,UAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;AAIA;;;;AAIG;;;AACU,OAAA,CAAA,KAAA,gBAAyC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACpF,QAAM,KAAK,GAAG,UAAA,CAAA,QAAA,CAAS,KAAT,EAAgB,GAAhB,CAAd;AAEA,EAAA,gBAAA,CAAA,cAAA,CAAe,KAAf;AACA,SAAO,aAAA,CAAA,WAAA,CAAY,KAAZ,CAAP;AACD,CALqD,CAAzC;AAOb,OAAA,CAAA,KAAA,CAAM,WAAN,GAAoB,OAApB","sourceRoot":""}
@@ -0,0 +1,84 @@
1
+ import * as React from 'react';
2
+ import type { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';
3
+ export declare type InputSlots = {
4
+ /**
5
+ * Wrapper element which visually appears to be the input and is used for borders, focus styling, etc.
6
+ * (A wrapper is needed to properly position `contentBefore` and `contentAfter` relative to `input`.)
7
+ *
8
+ * The root slot receives the `className` and `style` specified directly on the `<Input>`.
9
+ * All other top-level native props will be applied to the primary slot, `input`.
10
+ */
11
+ root: IntrinsicShorthandProps<'span'>;
12
+ /**
13
+ * The actual `<input>` element. `type="text"` will be automatically applied unless overridden.
14
+ *
15
+ * This is the "primary" slot, so native props specified directly on the `<Input>` will go here
16
+ * (except `className` and `style`, which go to the `root` slot). The top-level `ref` will
17
+ * also go here.
18
+ */
19
+ input: IntrinsicShorthandProps<'input'>;
20
+ /** Element before the input text, within the input border */
21
+ contentBefore?: IntrinsicShorthandProps<'span'>;
22
+ /** Element after the input text, within the input border */
23
+ contentAfter?: IntrinsicShorthandProps<'span'>;
24
+ };
25
+ export declare type InputProps = Omit<ComponentProps<InputSlots, 'input'>, 'children' | 'defaultValue' | 'onChange' | 'size' | 'type' | 'value'> & {
26
+ /** Input can't have children. */
27
+ children?: never;
28
+ /**
29
+ * Size of the input (changes the font size and spacing).
30
+ * @default 'medium'
31
+ */
32
+ size?: 'small' | 'medium' | 'large';
33
+ /**
34
+ * If true, the input will have inline display, allowing it be used within text content.
35
+ * If false (the default), the input will have block display.
36
+ */
37
+ inline?: boolean;
38
+ /**
39
+ * Controls the colors and borders of the input.
40
+ * @default 'outline'
41
+ */
42
+ appearance?: 'outline' | 'underline' | 'filledDarker' | 'filledLighter';
43
+ /**
44
+ * Default value of the input. Provide this if the input should be an uncontrolled component
45
+ * which tracks its current state internally; otherwise, use `value`.
46
+ *
47
+ * (This prop is mutually exclusive with `value`.)
48
+ */
49
+ defaultValue?: string;
50
+ /**
51
+ * Current value of the input. Provide this if the input is a controlled component where you
52
+ * are maintaining its current state; otherwise, use `defaultValue`.
53
+ *
54
+ * (This prop is mutually exclusive with `defaultValue`.)
55
+ */
56
+ value?: string;
57
+ /**
58
+ * Called when the user changes the input's value.
59
+ */
60
+ onChange?: (ev: React.FormEvent<HTMLInputElement>, data: InputOnChangeData) => void;
61
+ /**
62
+ * An input can have different text-based [types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input#input_types)
63
+ * based on the type of value the user will enter.
64
+ *
65
+ * Note that no custom styling is currently applied for alternative types, and some types may
66
+ * activate browser-default styling which does not match the Fluent design language.
67
+ *
68
+ * (For non-text-based types such as `button` or `checkbox`, use the appropriate component or an
69
+ * `<input>` element instead.)
70
+ * @default 'text'
71
+ */
72
+ type?: 'text' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'date' | 'datetime-local' | 'month' | 'number' | 'time' | 'week';
73
+ };
74
+ /**
75
+ * State used in rendering Input.
76
+ */
77
+ export declare type InputState = Required<Pick<InputProps, 'appearance' | 'inline' | 'size'>> & ComponentState<InputSlots>;
78
+ /**
79
+ * Data passed to the `onChange` callback when a user changes the input's value.
80
+ */
81
+ export declare type InputOnChangeData = {
82
+ /** Updated input value from the user */
83
+ value: string;
84
+ };
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=Input.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
@@ -0,0 +1,5 @@
1
+ export * from './Input';
2
+ export * from './Input.types';
3
+ export * from './renderInput';
4
+ export * from './useInput';
5
+ export * from './useInputStyles';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./Input"), exports);
10
+
11
+ tslib_1.__exportStar(require("./Input.types"), exports);
12
+
13
+ tslib_1.__exportStar(require("./renderInput"), exports);
14
+
15
+ tslib_1.__exportStar(require("./useInput"), exports);
16
+
17
+ tslib_1.__exportStar(require("./useInputStyles"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Input/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA","sourceRoot":""}
@@ -0,0 +1,5 @@
1
+ import type { InputState } from './Input.types';
2
+ /**
3
+ * Render the final JSX of Input
4
+ */
5
+ export declare const renderInput: (state: InputState) => JSX.Element;