@agility/plenum-ui 1.0.0 → 1.0.3
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 +31 -8
- package/lib/components/Forms/Checkbox/Checkbox.d.ts +2 -0
- package/lib/components/Forms/Radio/Radio.d.ts +4 -0
- package/lib/components/Forms/Select/Select.d.ts +4 -4
- package/lib/components/Forms/Select/Select.stories.d.ts +7 -7
- package/lib/components/Forms/TextInputSelect/TextInputSelect.d.ts +2 -1
- package/lib/components/Switch/Switch.d.ts +2 -0
- package/lib/components/Switch/Switch.stories.d.ts +4 -1
- package/lib/components/TreeView/TreeView.d.ts +1 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.esm.js +6764 -21
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +6772 -19
- package/lib/index.js.map +1 -1
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -1,17 +1,40 @@
|
|
|
1
1
|
# Agility CMS Component Library for React
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Features
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- Button | [view](https://plenum-ui.vercel.app/?path=/story/plenum-ui-components-button)
|
|
6
|
+
- Combobox | [view](https://plenum-ui.vercel.app/?path=/story/plenum-ui-components-combobox--all-variations)
|
|
7
|
+
- Dropdown | [view](https://plenum-ui.vercel.app/?path=/story/plenum-ui-components-dropdown--default)
|
|
8
|
+
- Switch | [view](https://plenum-ui.vercel.app/?path=/story/plenum-ui-components-atoms--switch-component)
|
|
9
|
+
- TreeView | [view](https://plenum-ui.vercel.app/?path=/story/plenum-ui-components-treeview-v2--tree-view-component)
|
|
10
|
+
- TextInput | [view](https://plenum-ui.vercel.app/?path=/story/plenum-ui-components-textinput--all-variations)
|
|
11
|
+
- TextInputAddon | [view](https://plenum-ui.vercel.app/?path=/story/plenum-ui-components-textinputaddon--all-variations)
|
|
12
|
+
- TextInputSelect | [view](https://plenum-ui.vercel.app/?path=/story/plenum-ui-components-textinputselect--all-variations)
|
|
13
|
+
- Radio | [view](https://plenum-ui.vercel.app/?path=/story/plenum-ui-components-radio--all-variations)
|
|
14
|
+
- Checkbox | [view](https://plenum-ui.vercel.app/?path=/story/plenum-ui-components-checkbox--all-variations)
|
|
15
|
+
- Textarea | [view](https://plenum-ui.vercel.app/?path=/story/plenum-ui-components-textarea--all-variations)
|
|
16
|
+
- Select | [view](https://plenum-ui.vercel.app/?path=/story/plenum-ui-components-select--all-variations)
|
|
6
17
|
|
|
7
|
-
Build for distribution
|
|
8
18
|
|
|
9
|
-
|
|
10
|
-
yarn build
|
|
11
|
-
```
|
|
19
|
+
## Installing
|
|
12
20
|
|
|
13
|
-
|
|
21
|
+
Using npm:
|
|
14
22
|
|
|
23
|
+
```bash
|
|
24
|
+
$ npm install @agility/plenum-ui
|
|
15
25
|
```
|
|
16
|
-
|
|
26
|
+
|
|
27
|
+
Using yarn:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
$ yarn add @agility/plenum-ui
|
|
17
31
|
```
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Usage
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
import { Button } from '@agility/plenum-ui';
|
|
38
|
+
|
|
39
|
+
<Button label='Primary' type='primary' size='base' icon='BellIcon'>
|
|
40
|
+
```
|
|
@@ -16,6 +16,10 @@ export interface RadioProps {
|
|
|
16
16
|
isError?: boolean;
|
|
17
17
|
/** Message or description */
|
|
18
18
|
message?: string;
|
|
19
|
+
/** Callback on input change */
|
|
20
|
+
onChange?(value: string): void;
|
|
21
|
+
/** Callback on click */
|
|
22
|
+
onClick?(value: string): void;
|
|
19
23
|
}
|
|
20
24
|
/** Comment */
|
|
21
25
|
export declare const Radio: FC<RadioProps>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
export declare type
|
|
2
|
+
export declare type SimpleSelectOptions = {
|
|
3
3
|
label: string;
|
|
4
4
|
value: string;
|
|
5
5
|
};
|
|
6
|
-
export interface
|
|
6
|
+
export interface SimpleSelectProps {
|
|
7
7
|
/** Label */
|
|
8
8
|
label?: string;
|
|
9
9
|
/** Select ID prop */
|
|
@@ -11,7 +11,7 @@ export interface SelectProps {
|
|
|
11
11
|
/** Select name prop */
|
|
12
12
|
name: string;
|
|
13
13
|
/** List of options to display in the select menu */
|
|
14
|
-
options:
|
|
14
|
+
options: SimpleSelectOptions[];
|
|
15
15
|
/** Select name prop */
|
|
16
16
|
onChange?(value: string): void;
|
|
17
17
|
/** Select disabled state */
|
|
@@ -22,4 +22,4 @@ export interface SelectProps {
|
|
|
22
22
|
isRequired?: boolean;
|
|
23
23
|
}
|
|
24
24
|
/** Comment */
|
|
25
|
-
export declare const Select: FC<
|
|
25
|
+
export declare const Select: FC<SimpleSelectProps>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Meta } from '@storybook/react/types-6-0';
|
|
2
2
|
import { Story } from '@storybook/react';
|
|
3
|
-
import {
|
|
3
|
+
import { SimpleSelectProps } from './Select';
|
|
4
4
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const AllVariations: Story<
|
|
7
|
-
export declare const Base: Story<
|
|
8
|
-
export declare const Label: Story<
|
|
9
|
-
export declare const Disabled: Story<
|
|
10
|
-
export declare const Required: Story<
|
|
11
|
-
export declare const Error: Story<
|
|
6
|
+
export declare const AllVariations: Story<SimpleSelectProps>;
|
|
7
|
+
export declare const Base: Story<SimpleSelectProps>;
|
|
8
|
+
export declare const Label: Story<SimpleSelectProps>;
|
|
9
|
+
export declare const Disabled: Story<SimpleSelectProps>;
|
|
10
|
+
export declare const Required: Story<SimpleSelectProps>;
|
|
11
|
+
export declare const Error: Story<SimpleSelectProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import '../../../tailwind.css';
|
|
3
|
-
|
|
3
|
+
declare type Type = 'text' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'url' | 'date' | 'datetime-local' | 'month' | 'time' | 'week' | 'currency';
|
|
4
4
|
export declare type SelectOptions = {
|
|
5
5
|
label: string;
|
|
6
6
|
value: string;
|
|
@@ -44,3 +44,4 @@ export interface TextInputSelectProps {
|
|
|
44
44
|
onSelectOption?(value: string): void;
|
|
45
45
|
}
|
|
46
46
|
export declare const TextInputSelect: FC<TextInputSelectProps>;
|
|
47
|
+
export {};
|
|
@@ -3,4 +3,7 @@ import { Story } from '@storybook/react';
|
|
|
3
3
|
import { SwitchProps } from './Switch';
|
|
4
4
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const AllVariations: Story<SwitchProps>;
|
|
7
|
+
export declare const SwitchComponentSm: Story<SwitchProps>;
|
|
8
|
+
export declare const SwitchComponentMd: Story<SwitchProps>;
|
|
9
|
+
export declare const SwitchComponentLg: Story<SwitchProps>;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
export * from './components/Button';
|
|
2
|
+
export * from './components/Combobox';
|
|
3
|
+
export * from './components/Dropdown';
|
|
4
|
+
export * from './components/Switch';
|
|
5
|
+
export * from './components/TreeView';
|
|
2
6
|
export * from './components/Forms/TextInput';
|
|
3
7
|
export * from './components/Forms/TextInputAddon';
|
|
8
|
+
export * from './components/Forms/TextInputSelect';
|
|
9
|
+
export * from './components/Forms/Radio';
|
|
10
|
+
export * from './components/Forms/Textarea';
|
|
11
|
+
export * from './components/Forms/Select';
|
|
12
|
+
export * from './components/Forms/Checkbox';
|