@agility/plenum-ui 2.0.0-rc17 → 2.0.0-rc18
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 +32 -10
- package/dist/index.d.ts +7 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/tailwind.css +0 -41
- package/dist/types/stories/molecules/inputs/textArea/TextArea.d.ts +5 -1
- package/dist/types/stories/organisms/DropdownComponent/DropdownComponent.d.ts +2 -0
- package/package.json +1 -1
- package/stories/molecules/inputs/checkbox/Checkbox.tsx +1 -1
- package/stories/molecules/inputs/textArea/TextArea.stories.ts +1 -1
- package/stories/molecules/inputs/textArea/TextArea.tsx +8 -2
- package/stories/organisms/AnimatedLabelTextArea/AnimatedLabelTextArea.tsx +2 -2
- package/stories/organisms/DropdownComponent/Dropdown.stories.tsx +1 -1
- package/stories/organisms/DropdownComponent/DropdownComponent.tsx +72 -89
package/README.md
CHANGED
|
@@ -58,7 +58,8 @@ import { Component } from '@agility/plenum-ui';
|
|
|
58
58
|
|
|
59
59
|
### Development and Build Scripts
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
|
|
62
|
+
#### Run your development server with Storybook:
|
|
62
63
|
|
|
63
64
|
```bash
|
|
64
65
|
npm run dev
|
|
@@ -66,7 +67,7 @@ npm run dev
|
|
|
66
67
|
yarn dev
|
|
67
68
|
```
|
|
68
69
|
|
|
69
|
-
Build your project:
|
|
70
|
+
#### Build your project:
|
|
70
71
|
|
|
71
72
|
```bash
|
|
72
73
|
npm run build
|
|
@@ -74,7 +75,28 @@ npm run build
|
|
|
74
75
|
yarn build
|
|
75
76
|
```
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
#### Use yarn link to locally test the library in another project:
|
|
79
|
+
|
|
80
|
+
In the Plenum project directory after having run a build, run:
|
|
81
|
+
```bash
|
|
82
|
+
yarn link.
|
|
83
|
+
```
|
|
84
|
+
You should see the following in your terminal:
|
|
85
|
+
```bash
|
|
86
|
+
yarn link v1.22.10
|
|
87
|
+
success Registered "@agility/plenum-ui".
|
|
88
|
+
```
|
|
89
|
+
You can now run
|
|
90
|
+
```bash
|
|
91
|
+
yarn link "@agility/plenum-ui"
|
|
92
|
+
```
|
|
93
|
+
in the projects where you want to consume this package and it will be used instead. It should output a message like
|
|
94
|
+
```bash
|
|
95
|
+
yarn link v1.22.10
|
|
96
|
+
success Using linked package for "@agility/plenum-ui".
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
#### Clean the \`dist\` directory:
|
|
78
100
|
|
|
79
101
|
```bash
|
|
80
102
|
npm run clean
|
|
@@ -82,7 +104,7 @@ npm run clean
|
|
|
82
104
|
yarn clean
|
|
83
105
|
```
|
|
84
106
|
|
|
85
|
-
Lint your project:
|
|
107
|
+
#### Lint your project:
|
|
86
108
|
|
|
87
109
|
```bash
|
|
88
110
|
npm run lint
|
|
@@ -90,7 +112,7 @@ npm run lint
|
|
|
90
112
|
yarn lint
|
|
91
113
|
```
|
|
92
114
|
|
|
93
|
-
Build Tailwind CSS:
|
|
115
|
+
#### Build Tailwind CSS:
|
|
94
116
|
|
|
95
117
|
```bash
|
|
96
118
|
npm run build:tw
|
|
@@ -100,7 +122,7 @@ yarn build:tw
|
|
|
100
122
|
|
|
101
123
|
### Storybook Scripts
|
|
102
124
|
|
|
103
|
-
Build your Storybook:
|
|
125
|
+
#### Build your Storybook:
|
|
104
126
|
|
|
105
127
|
```bash
|
|
106
128
|
npm run build-storybook
|
|
@@ -108,7 +130,7 @@ npm run build-storybook
|
|
|
108
130
|
yarn build-storybook
|
|
109
131
|
```
|
|
110
132
|
|
|
111
|
-
Run your Storybook in development mode:
|
|
133
|
+
#### Run your Storybook in development mode:
|
|
112
134
|
|
|
113
135
|
```bash
|
|
114
136
|
npm run storybook:dev
|
|
@@ -116,7 +138,7 @@ npm run storybook:dev
|
|
|
116
138
|
yarn storybook:dev
|
|
117
139
|
```
|
|
118
140
|
|
|
119
|
-
Generate Tailwind CSS for Storybook and watch for changes:
|
|
141
|
+
#### Generate Tailwind CSS for Storybook and watch for changes:
|
|
120
142
|
|
|
121
143
|
```bash
|
|
122
144
|
npm run storybook:tw
|
|
@@ -124,7 +146,7 @@ npm run storybook:tw
|
|
|
124
146
|
yarn storybook:tw
|
|
125
147
|
```
|
|
126
148
|
|
|
127
|
-
Build specific parts of Storybook:
|
|
149
|
+
#### Build specific parts of Storybook:
|
|
128
150
|
|
|
129
151
|
```bash
|
|
130
152
|
# Build Storybook
|
|
@@ -138,7 +160,7 @@ npm run sb-build:tw
|
|
|
138
160
|
yarn sb-build:tw
|
|
139
161
|
```
|
|
140
162
|
|
|
141
|
-
Compile TypeScript files using custom build script:
|
|
163
|
+
#### Compile TypeScript files using custom build script:
|
|
142
164
|
|
|
143
165
|
```bash
|
|
144
166
|
npm run build:tsc
|
package/dist/index.d.ts
CHANGED
|
@@ -772,13 +772,17 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/select/index' {
|
|
|
772
772
|
}
|
|
773
773
|
declare module '@agility/plenum-ui/stories/molecules/inputs/textArea/TextArea' {
|
|
774
774
|
import React from "react";
|
|
775
|
+
interface ILabelProps extends React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement> {
|
|
776
|
+
display: string;
|
|
777
|
+
htmlFor?: string;
|
|
778
|
+
}
|
|
775
779
|
export interface ITextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange"> {
|
|
776
780
|
/** Input ID */
|
|
777
781
|
id?: string;
|
|
778
782
|
/** Input Name */
|
|
779
783
|
name?: string;
|
|
780
784
|
/** Label for the input */
|
|
781
|
-
label?:
|
|
785
|
+
label?: ILabelProps;
|
|
782
786
|
/** Error state */
|
|
783
787
|
isError?: boolean;
|
|
784
788
|
/** If field is required */
|
|
@@ -945,6 +949,7 @@ declare module '@agility/plenum-ui/stories/organisms/DropdownComponent/DropdownC
|
|
|
945
949
|
activeItemClassname?: ClassNameWithAutocomplete;
|
|
946
950
|
buttonClassname?: ClassNameWithAutocomplete;
|
|
947
951
|
iconClassname?: ClassNameWithAutocomplete;
|
|
952
|
+
iconSpacingClassname?: ClassNameWithAutocomplete;
|
|
948
953
|
placement?: Placement;
|
|
949
954
|
offsetOptions?: Partial<{
|
|
950
955
|
mainAxis: number;
|
|
@@ -959,6 +964,7 @@ declare module '@agility/plenum-ui/stories/organisms/DropdownComponent/DropdownC
|
|
|
959
964
|
activeItemClassname: string;
|
|
960
965
|
buttonClassname: string;
|
|
961
966
|
iconClassname: string;
|
|
967
|
+
iconSpacingClassname: string;
|
|
962
968
|
};
|
|
963
969
|
/** Comment */
|
|
964
970
|
const Dropdown: React.FC<IDropdownProps>;
|