@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 CHANGED
@@ -1,17 +1,40 @@
1
1
  # Agility CMS Component Library for React
2
2
 
3
- ## PRE-RELEASE!
3
+ ## Features
4
4
 
5
- ## Commands
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
- Run storybook
21
+ Using npm:
14
22
 
23
+ ```bash
24
+ $ npm install @agility/plenum-ui
15
25
  ```
16
- yarn start-tw & yarn storybook
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
+ ```
@@ -14,6 +14,8 @@ export interface CheckboxProps {
14
14
  isError?: boolean;
15
15
  /** Message or description */
16
16
  message?: string;
17
+ /** Callback on input change */
18
+ onChange?(value: string): void;
17
19
  }
18
20
  /** Comment */
19
21
  export declare const Checkbox: FC<CheckboxProps>;
@@ -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 SelectOptions = {
2
+ export declare type SimpleSelectOptions = {
3
3
  label: string;
4
4
  value: string;
5
5
  };
6
- export interface SelectProps {
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: SelectOptions[];
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<SelectProps>;
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 { SelectProps } from './Select';
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<SelectProps>;
7
- export declare const Base: Story<SelectProps>;
8
- export declare const Label: Story<SelectProps>;
9
- export declare const Disabled: Story<SelectProps>;
10
- export declare const Required: Story<SelectProps>;
11
- export declare const Error: Story<SelectProps>;
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
- export declare type Type = 'text' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'url' | 'date' | 'datetime-local' | 'month' | 'time' | 'week' | 'currency';
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 {};
@@ -4,6 +4,8 @@ export interface SwitchProps {
4
4
  onChange(value: boolean): void;
5
5
  /** default state */
6
6
  defaultValue?: boolean;
7
+ /** size state */
8
+ size?: 'sm' | 'md' | 'lg';
7
9
  }
8
10
  /** Comment */
9
11
  export declare const Switch: FC<SwitchProps>;
@@ -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 SwitchComponent: Story<SwitchProps>;
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>;
@@ -11,6 +11,7 @@ export interface TreeViewProps {
11
11
  /** Prop comment */
12
12
  treeData: NodeModel<DataProps>[];
13
13
  CustomNode: JSXElementConstructor<TreeItemProps>;
14
+ initialOpen: boolean | [number | string];
14
15
  }
15
16
  export interface DataProps {
16
17
  type: string;
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';