@agility/plenum-ui 2.0.0-rc4 → 2.0.0-rc5
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/README.md +1 -1
- package/dist/index.d.ts +70 -2
- package/dist/index.js +190 -67
- package/dist/index.js.map +4 -4
- package/dist/lib/tailwind.css +63510 -0
- package/dist/types/stories/molecules/inputs/InputCounter/InputCounter.d.ts +10 -0
- package/dist/types/stories/molecules/inputs/InputCounter/index.d.ts +2 -0
- package/dist/types/stories/molecules/inputs/TextInput/TextInput.d.ts +39 -0
- package/dist/types/stories/molecules/inputs/TextInput/index.d.ts +4 -0
- package/dist/types/stories/molecules/inputs/index.d.ts +3 -2
- package/package.json +2 -2
- package/stories/Introduction.mdx +1 -1
- package/stories/molecules/inputs/TextInput/index.tsx +4 -2
- package/stories/molecules/inputs/index.ts +14 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
export interface IInputCounterProps {
|
|
3
|
+
/** Counter limit */
|
|
4
|
+
limit: number | undefined;
|
|
5
|
+
/** Counter current number */
|
|
6
|
+
current: number;
|
|
7
|
+
}
|
|
8
|
+
/** Primary UI component for user interaction */
|
|
9
|
+
declare const InputCounter: FC<IInputCounterProps>;
|
|
10
|
+
export default InputCounter;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AcceptedInputTypes } from "../InputField";
|
|
3
|
+
export interface ITextInputProps {
|
|
4
|
+
/** Input type*/
|
|
5
|
+
type: AcceptedInputTypes;
|
|
6
|
+
/** Input ID */
|
|
7
|
+
id?: string;
|
|
8
|
+
/** Input Name */
|
|
9
|
+
name?: string;
|
|
10
|
+
/** Label for the input */
|
|
11
|
+
label?: string;
|
|
12
|
+
/** Force the focus state on the input */
|
|
13
|
+
isFocused?: boolean;
|
|
14
|
+
/** Error state */
|
|
15
|
+
isError?: boolean;
|
|
16
|
+
/** If field is required */
|
|
17
|
+
isRequired?: boolean;
|
|
18
|
+
/** Disabled state */
|
|
19
|
+
isDisabled?: boolean;
|
|
20
|
+
/** Readonly state */
|
|
21
|
+
isReadonly?: boolean;
|
|
22
|
+
/** Set default value */
|
|
23
|
+
defaultValue?: string;
|
|
24
|
+
/** Message shown under the text field */
|
|
25
|
+
message?: string;
|
|
26
|
+
/** Input character counter */
|
|
27
|
+
isShowCounter?: boolean;
|
|
28
|
+
/** Max length of input character */
|
|
29
|
+
maxLength?: number;
|
|
30
|
+
/** Callback on change */
|
|
31
|
+
onChange(value: string): void;
|
|
32
|
+
/** input value */
|
|
33
|
+
value: string;
|
|
34
|
+
/**Placeholder input text*/
|
|
35
|
+
placeholder?: string;
|
|
36
|
+
className?: string;
|
|
37
|
+
}
|
|
38
|
+
declare const _TextInput: React.ForwardRefExoticComponent<ITextInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
39
|
+
export default _TextInput;
|
|
@@ -6,6 +6,7 @@ import NestedInputButton, { INestedInputButtonProps } from "./NestedInputButton"
|
|
|
6
6
|
import Radio, { IRadioProps } from "./radio";
|
|
7
7
|
import Select, { ISelectProps } from "./select";
|
|
8
8
|
import TextAreaField, { ITextAreaFieldProps } from "./textArea";
|
|
9
|
+
import TextInput, { ITextInputProps } from "./TextInput";
|
|
9
10
|
import ToggleSwitch, { IToggleSwitchProps } from "./toggleSwitch";
|
|
10
|
-
export type { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextAreaFieldProps, IToggleSwitchProps, AcceptedInputTypes };
|
|
11
|
-
export { Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, TextAreaField, ToggleSwitch };
|
|
11
|
+
export type { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextAreaFieldProps, ITextInputProps, IToggleSwitchProps, AcceptedInputTypes };
|
|
12
|
+
export { Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, TextAreaField, ToggleSwitch, TextInput };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agility/plenum-ui",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-rc5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"storybook:tw": "tailwindcss -o ./lib/tailwind.css -w ",
|
|
18
18
|
"storybook": "npm-run-all -p \"storybook:*\" ",
|
|
19
19
|
"dev": "yarn storybook",
|
|
20
|
-
"build:tw": "tailwindcss -o ./lib/tailwind.css",
|
|
20
|
+
"build:tw": "tailwindcss -o ./dist/lib/tailwind.css",
|
|
21
21
|
"build:tsc": "yarn node build.js",
|
|
22
22
|
"prepare": "yarn build",
|
|
23
23
|
"build": "npm run clean && npm-run-all -s \"build:*\" ",
|
package/stories/Introduction.mdx
CHANGED
|
@@ -143,7 +143,7 @@ In your app entry point (i.e. \`_app.tsx\`), import the \`globals.css\` file fro
|
|
|
143
143
|
|
|
144
144
|
```jsx
|
|
145
145
|
import "<RELATIVE_PATH>/globals.css";
|
|
146
|
-
import "@agility/plenum-ui/lib/tailwind.css";
|
|
146
|
+
import "@agility/plenum-ui/dist/lib/tailwind.css";
|
|
147
147
|
```
|
|
148
148
|
|
|
149
149
|
Make sure to add any additional styles before these two import statements to prevent overwriting the Plenum styling.
|
|
@@ -6,6 +6,7 @@ import NestedInputButton, { INestedInputButtonProps } from "./NestedInputButton"
|
|
|
6
6
|
import Radio, { IRadioProps } from "./radio"
|
|
7
7
|
import Select, { ISelectProps } from "./select"
|
|
8
8
|
import TextAreaField, { ITextAreaFieldProps } from "./textArea"
|
|
9
|
+
import TextInput, { ITextInputProps } from "./TextInput"
|
|
9
10
|
import ToggleSwitch, { IToggleSwitchProps } from "./toggleSwitch"
|
|
10
11
|
|
|
11
12
|
export type {
|
|
@@ -17,8 +18,20 @@ export type {
|
|
|
17
18
|
IRadioProps,
|
|
18
19
|
ISelectProps,
|
|
19
20
|
ITextAreaFieldProps,
|
|
21
|
+
ITextInputProps,
|
|
20
22
|
IToggleSwitchProps,
|
|
21
23
|
AcceptedInputTypes
|
|
22
24
|
}
|
|
23
25
|
|
|
24
|
-
export {
|
|
26
|
+
export {
|
|
27
|
+
Checkbox,
|
|
28
|
+
Combobox,
|
|
29
|
+
InputField,
|
|
30
|
+
InputLabel,
|
|
31
|
+
NestedInputButton,
|
|
32
|
+
Radio,
|
|
33
|
+
Select,
|
|
34
|
+
TextAreaField,
|
|
35
|
+
ToggleSwitch,
|
|
36
|
+
TextInput
|
|
37
|
+
}
|