@bigbinary/neeto-molecules 1.12.1 → 1.13.0
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/AdaptiveInput.js +84 -0
- package/dist/AdaptiveInput.js.map +1 -0
- package/dist/FloatingActionMenu.js +81 -94
- package/dist/FloatingActionMenu.js.map +1 -1
- package/dist/NeetoWidget.js +35 -45
- package/dist/NeetoWidget.js.map +1 -1
- package/dist/cjs/AdaptiveInput.js +94 -0
- package/dist/cjs/AdaptiveInput.js.map +1 -0
- package/dist/cjs/FloatingActionMenu.js +79 -92
- package/dist/cjs/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/NeetoWidget.js +35 -45
- package/dist/cjs/NeetoWidget.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +10 -7
- package/types/AdaptiveInput.d.ts +51 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TextareaProps } from "@bigbinary/neetoui";
|
|
3
|
+
export interface AdaptiveInputProps extends TextareaProps {
|
|
4
|
+
label: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
size: "small" | "medium" | "large";
|
|
7
|
+
required?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
suffix?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface FormikAdaptiveInputProps extends AdaptiveInputProps {
|
|
12
|
+
name: string;
|
|
13
|
+
}
|
|
14
|
+
export
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* An input component that dynamically adjusts between single-line and multi-line
|
|
18
|
+
*
|
|
19
|
+
* input based on content length.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
*
|
|
23
|
+
* import { AdaptiveInput } from "@bigbinary/neeto-molecules/AdaptiveInput";
|
|
24
|
+
*
|
|
25
|
+
* const Description = () => (
|
|
26
|
+
* <div className="flex-grow">
|
|
27
|
+
* <AdaptiveInput required label="Description" />
|
|
28
|
+
* </div>
|
|
29
|
+
* );
|
|
30
|
+
* @endexample
|
|
31
|
+
* The AdaptiveInput component wrapped in Formik.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
*
|
|
35
|
+
* import { FormikAdaptiveInput } from "@bigbinary/neeto-molecules/AdaptiveInput";
|
|
36
|
+
* import { Form } from "@bigbinary/neetoui/formik";
|
|
37
|
+
*
|
|
38
|
+
* const App = () => (
|
|
39
|
+
* <Form
|
|
40
|
+
* formikProps={{
|
|
41
|
+
* initialValues: { description: "Sample description" },
|
|
42
|
+
* validationSchema: yup.string().required(),
|
|
43
|
+
* }}
|
|
44
|
+
* >
|
|
45
|
+
* <FormikAdaptiveInput required name="description" />
|
|
46
|
+
* </Form>
|
|
47
|
+
* );
|
|
48
|
+
* @endexample
|
|
49
|
+
*/
|
|
50
|
+
const AdaptiveInput: React.ForwardRefExoticComponent<AdaptiveInputProps>;
|
|
51
|
+
export const FormikAdaptiveInput: React.ForwardRefExoticComponent<FormikAdaptiveInputProps>;
|