@agility/plenum-ui 1.0.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/.babelrc +14 -0
- package/.editorconfig +9 -0
- package/.eslintrc +13 -0
- package/.github/workflows/test.yml +27 -0
- package/.prettierrc +13 -0
- package/.storybook/Layout.jsx +9 -0
- package/.storybook/main.js +17 -0
- package/.storybook/manager.js +6 -0
- package/.storybook/plenumTheme.js +8 -0
- package/.storybook/preview.js +44 -0
- package/README.md +17 -0
- package/_templates/component/new/component.ejs.t +18 -0
- package/_templates/component/new/component.stories.ejs.t +21 -0
- package/_templates/component/new/component.test.ejs.t +15 -0
- package/_templates/component/new/index.ejs.t +6 -0
- package/_templates/component/new/prompt.js +7 -0
- package/coverage/Forms/TextInputSelect/InputSelect/InputSelect.tsx.html +204 -0
- package/coverage/Forms/TextInputSelect/InputSelect/index.html +155 -0
- package/coverage/Select/Select.tsx.html +264 -0
- package/coverage/Select/index.html +153 -0
- package/coverage/Select.tsx.html +261 -0
- package/coverage/agility-component-lib-react/index.html +116 -0
- package/coverage/agility-component-lib-react/src/components/Button/Button.tsx.html +289 -0
- package/coverage/agility-component-lib-react/src/components/Button/index.html +116 -0
- package/coverage/agility-component-lib-react/src/components/Checkbox/Checkbox.tsx.html +235 -0
- package/coverage/agility-component-lib-react/src/components/Checkbox/index.html +156 -0
- package/coverage/agility-component-lib-react/src/components/Forms/BaseField/BaseField.tsx.html +406 -0
- package/coverage/agility-component-lib-react/src/components/Forms/BaseField/index.html +116 -0
- package/coverage/agility-component-lib-react/src/components/Forms/Checkbox/Checkbox.tsx.html +283 -0
- package/coverage/agility-component-lib-react/src/components/Forms/Checkbox/index.html +116 -0
- package/coverage/agility-component-lib-react/src/components/Forms/InputCounter/InputCounter.tsx.html +139 -0
- package/coverage/agility-component-lib-react/src/components/Forms/InputCounter/index.html +116 -0
- package/coverage/agility-component-lib-react/src/components/Forms/InputLabel/InputLabel.tsx.html +211 -0
- package/coverage/agility-component-lib-react/src/components/Forms/InputLabel/index.html +131 -0
- package/coverage/agility-component-lib-react/src/components/Forms/InputLabel/index.ts.html +94 -0
- package/coverage/agility-component-lib-react/src/components/Forms/Radio/Radio.tsx.html +271 -0
- package/coverage/agility-component-lib-react/src/components/Forms/Radio/index.html +116 -0
- package/coverage/agility-component-lib-react/src/components/Forms/Select/Select.tsx.html +337 -0
- package/coverage/agility-component-lib-react/src/components/Forms/Select/index.html +116 -0
- package/coverage/agility-component-lib-react/src/components/Forms/TextInputAddon/InputCta/InputCta.tsx.html +271 -0
- package/coverage/agility-component-lib-react/src/components/Forms/TextInputAddon/InputCta/index.html +116 -0
- package/coverage/agility-component-lib-react/src/components/Forms/TextInputSelect/InputSelect/InputSelect.tsx.html +217 -0
- package/coverage/agility-component-lib-react/src/components/Forms/TextInputSelect/InputSelect/index.html +116 -0
- package/coverage/agility-component-lib-react/src/components/Radio/Radio.tsx.html +243 -0
- package/coverage/agility-component-lib-react/src/components/Radio/index.html +156 -0
- package/coverage/agility-component-lib-react/src/components/Switch/Switch.tsx.html +214 -0
- package/coverage/agility-component-lib-react/src/components/Switch/index.html +116 -0
- package/coverage/agility-component-lib-react/src/util/DynamicIcons.tsx.html +151 -0
- package/coverage/agility-component-lib-react/src/util/index.html +116 -0
- package/coverage/agility-component-lib-react/styleMock.js.html +91 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/clover.xml +145 -0
- package/coverage/coverage-final.json +14 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +281 -0
- package/coverage/lcov-report/agility-component-lib-react/index.html +153 -0
- package/coverage/lcov-report/agility-component-lib-react/src/components/Button/Button.tsx.html +255 -0
- package/coverage/lcov-report/agility-component-lib-react/src/components/Button/index.html +156 -0
- package/coverage/lcov-report/agility-component-lib-react/src/components/Checkbox/Checkbox.tsx.html +235 -0
- package/coverage/lcov-report/agility-component-lib-react/src/components/Checkbox/index.html +156 -0
- package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/BaseField/BaseField.tsx.html +330 -0
- package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/BaseField/index.html +158 -0
- package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/InputCounter/InputCounter.tsx.html +147 -0
- package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/InputCounter/index.html +158 -0
- package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/TextInputAddon/InputCta/InputCta.tsx.html +258 -0
- package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/TextInputAddon/InputCta/index.html +159 -0
- package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/TextInputSelect/InputSelect/InputSelect.tsx.html +210 -0
- package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/TextInputSelect/InputSelect/index.html +159 -0
- package/coverage/lcov-report/agility-component-lib-react/src/components/Radio/Radio.tsx.html +243 -0
- package/coverage/lcov-report/agility-component-lib-react/src/components/Radio/index.html +156 -0
- package/coverage/lcov-report/agility-component-lib-react/src/components/Switch/Switch.tsx.html +225 -0
- package/coverage/lcov-report/agility-component-lib-react/src/components/Switch/index.html +156 -0
- package/coverage/lcov-report/agility-component-lib-react/src/util/DynamicIcons.tsx.html +137 -0
- package/coverage/lcov-report/agility-component-lib-react/src/util/index.html +155 -0
- package/coverage/lcov-report/agility-component-lib-react/styleMock.js.html +90 -0
- package/coverage/lcov-report/base.css +354 -0
- package/coverage/lcov-report/block-navigation.js +82 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +385 -0
- package/coverage/lcov-report/prettify.css +101 -0
- package/coverage/lcov-report/prettify.js +955 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +189 -0
- package/coverage/lcov.info +267 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +196 -0
- package/jest.config.js +8 -0
- package/lib/common/brandCfg.d.ts +3 -0
- package/lib/common/index.d.ts +3 -0
- package/lib/common/storyCfg.d.ts +5 -0
- package/lib/components/Button/Button.d.ts +29 -0
- package/lib/components/Button/Button.stories.d.ts +8 -0
- package/lib/components/Button/Button.test.d.ts +1 -0
- package/lib/components/Button/index.d.ts +1 -0
- package/lib/components/Checkbox/Checkbox.d.ts +19 -0
- package/lib/components/Checkbox/Checkbox.stories.d.ts +12 -0
- package/lib/components/Checkbox/Checkbox.test.d.ts +1 -0
- package/lib/components/Checkbox/index.d.ts +1 -0
- package/lib/components/Combobox/Combobox.d.ts +24 -0
- package/lib/components/Combobox/Combobox.stories.d.ts +11 -0
- package/lib/components/Combobox/Combobox.test.d.ts +1 -0
- package/lib/components/Combobox/index.d.ts +1 -0
- package/lib/components/DatePicker/DatePicker.d.ts +7 -0
- package/lib/components/DatePicker/DatePicker.stories.d.ts +6 -0
- package/lib/components/DatePicker/DatePicker.test.d.ts +1 -0
- package/lib/components/DatePicker/index.d.ts +1 -0
- package/lib/components/Dropdown/Dropdown.d.ts +15 -0
- package/lib/components/Dropdown/Dropdown.stories.d.ts +7 -0
- package/lib/components/Dropdown/Dropdown.test.d.ts +1 -0
- package/lib/components/Dropdown/data.d.ts +3 -0
- package/lib/components/Dropdown/index.d.ts +1 -0
- package/lib/components/Forms/BaseField/BaseField.d.ts +30 -0
- package/lib/components/Forms/BaseField/BaseField.stories.d.ts +6 -0
- package/lib/components/Forms/BaseField/BaseField.test.d.ts +1 -0
- package/lib/components/Forms/BaseField/index.d.ts +1 -0
- package/lib/components/Forms/Checkbox/Checkbox.d.ts +19 -0
- package/lib/components/Forms/Checkbox/Checkbox.stories.d.ts +12 -0
- package/lib/components/Forms/Checkbox/Checkbox.test.d.ts +1 -0
- package/lib/components/Forms/Checkbox/index.d.ts +1 -0
- package/lib/components/Forms/InputCounter/InputCounter.d.ts +9 -0
- package/lib/components/Forms/InputCounter/InputCounter.stories.d.ts +6 -0
- package/lib/components/Forms/InputCounter/InputCounter.test.d.ts +1 -0
- package/lib/components/Forms/InputCounter/index.d.ts +1 -0
- package/lib/components/Forms/InputCta/InputCta.d.ts +16 -0
- package/lib/components/Forms/InputCta/InputCta.stories.d.ts +6 -0
- package/lib/components/Forms/InputCta/InputCta.test.d.ts +1 -0
- package/lib/components/Forms/InputCta/index.d.ts +1 -0
- package/lib/components/Forms/InputLabel/InputLabel.d.ts +14 -0
- package/lib/components/Forms/InputLabel/InputLabel.stories.d.ts +6 -0
- package/lib/components/Forms/InputLabel/InputLabel.test.d.ts +1 -0
- package/lib/components/Forms/InputLabel/index.d.ts +1 -0
- package/lib/components/Forms/Radio/Radio.d.ts +21 -0
- package/lib/components/Forms/Radio/Radio.stories.d.ts +12 -0
- package/lib/components/Forms/Radio/Radio.test.d.ts +1 -0
- package/lib/components/Forms/Radio/index.d.ts +1 -0
- package/lib/components/Forms/Select/Select.d.ts +25 -0
- package/lib/components/Forms/Select/Select.stories.d.ts +11 -0
- package/lib/components/Forms/Select/Select.test.d.ts +1 -0
- package/lib/components/Forms/Select/index.d.ts +1 -0
- package/lib/components/Forms/TextInput/TextInput.d.ts +33 -0
- package/lib/components/Forms/TextInput/TextInput.stories.d.ts +12 -0
- package/lib/components/Forms/TextInput/index.d.ts +1 -0
- package/lib/components/Forms/TextInputAddon/InputCta/InputCta.d.ts +16 -0
- package/lib/components/Forms/TextInputAddon/InputCta/InputCta.stories.d.ts +6 -0
- package/lib/components/Forms/TextInputAddon/InputCta/InputCta.test.d.ts +1 -0
- package/lib/components/Forms/TextInputAddon/InputCta/index.d.ts +1 -0
- package/lib/components/Forms/TextInputAddon/TextInputAddon.d.ts +49 -0
- package/lib/components/Forms/TextInputAddon/TextInputAddon.stories.d.ts +12 -0
- package/lib/components/Forms/TextInputAddon/index.d.ts +1 -0
- package/lib/components/Forms/TextInputSelect/InputSelect/InputSelect.d.ts +11 -0
- package/lib/components/Forms/TextInputSelect/InputSelect/InputSelect.stories.d.ts +6 -0
- package/lib/components/Forms/TextInputSelect/InputSelect/InputSelect.test.d.ts +1 -0
- package/lib/components/Forms/TextInputSelect/InputSelect/index.d.ts +1 -0
- package/lib/components/Forms/TextInputSelect/TextInputSelect.d.ts +46 -0
- package/lib/components/Forms/TextInputSelect/TextInputSelect.stories.d.ts +8 -0
- package/lib/components/Forms/TextInputSelect/index.d.ts +1 -0
- package/lib/components/Forms/Textarea/Textarea.d.ts +29 -0
- package/lib/components/Forms/Textarea/Textarea.stories.d.ts +12 -0
- package/lib/components/Forms/Textarea/Textarea.test.d.ts +1 -0
- package/lib/components/Forms/Textarea/index.d.ts +1 -0
- package/lib/components/InputCounter/InputCounter.d.ts +16 -0
- package/lib/components/InputCounter/InputCounter.stories.d.ts +6 -0
- package/lib/components/InputCounter/InputCounter.test.d.ts +1 -0
- package/lib/components/InputCounter/index.d.ts +1 -0
- package/lib/components/Radio/Radio.d.ts +21 -0
- package/lib/components/Radio/Radio.stories.d.ts +12 -0
- package/lib/components/Radio/Radio.test.d.ts +1 -0
- package/lib/components/Radio/index.d.ts +1 -0
- package/lib/components/Select/Select.d.ts +25 -0
- package/lib/components/Select/Select.stories.d.ts +11 -0
- package/lib/components/Select/Select.test.d.ts +1 -0
- package/lib/components/Select/index.d.ts +1 -0
- package/lib/components/Switch/Switch.d.ts +9 -0
- package/lib/components/Switch/Switch.stories.d.ts +6 -0
- package/lib/components/Switch/Switch.test.d.ts +1 -0
- package/lib/components/Switch/index.d.ts +1 -0
- package/lib/components/TextInput/TextInput.d.ts +46 -0
- package/lib/components/TextInput/TextInput.stories.d.ts +10 -0
- package/lib/components/TextInput/index.d.ts +1 -0
- package/lib/components/TextInputAddon/TextInputAddon.d.ts +51 -0
- package/lib/components/TextInputAddon/TextInputAddon.stories.d.ts +6 -0
- package/lib/components/TextInputAddon/index.d.ts +1 -0
- package/lib/components/TreeView/TreeItem/TreeItem.d.ts +16 -0
- package/lib/components/TreeView/TreeItem/TreeItem.stories.d.ts +9 -0
- package/lib/components/TreeView/TreeItem/TreeItem.test.d.ts +1 -0
- package/lib/components/TreeView/TreeItem/index.d.ts +1 -0
- package/lib/components/TreeView/TreeView.d.ts +34 -0
- package/lib/components/TreeView/TreeView.stories.d.ts +6 -0
- package/lib/components/TreeView/TreeView.test.d.ts +1 -0
- package/lib/components/TreeView/context.d.ts +9 -0
- package/lib/components/TreeView/index.d.ts +1 -0
- package/lib/components/TreeView/sampleData.d.ts +71 -0
- package/lib/components/TreeView/types/tree.types.d.ts +21 -0
- package/lib/components/TreeView V1/TreeItem/TreeItem.d.ts +16 -0
- package/lib/components/TreeView V1/TreeItem/TreeItem.stories.d.ts +9 -0
- package/lib/components/TreeView V1/TreeItem/TreeItem.test.d.ts +1 -0
- package/lib/components/TreeView V1/TreeItem/index.d.ts +1 -0
- package/lib/components/TreeView V1/TreeView.d.ts +6 -0
- package/lib/components/TreeView V1/TreeView.stories.d.ts +6 -0
- package/lib/components/TreeView V1/TreeView.test.d.ts +1 -0
- package/lib/components/TreeView V1/context.d.ts +9 -0
- package/lib/components/TreeView V1/index.d.ts +1 -0
- package/lib/components/TreeView V1/sampleData.d.ts +71 -0
- package/lib/components/TreeView V1/types/tree.types.d.ts +21 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.esm.js +7228 -0
- package/lib/index.esm.js.map +1 -0
- package/lib/index.js +7256 -0
- package/lib/index.js.map +1 -0
- package/lib/page/TreeNavigation/CustomNode/CustomNode.d.ts +3 -0
- package/lib/page/TreeNavigation/CustomNode/CustomNode.test.d.ts +1 -0
- package/lib/page/TreeNavigation/CustomNode/index.d.ts +1 -0
- package/lib/page/TreeNavigation/TreeNavigation.d.ts +8 -0
- package/lib/page/TreeNavigation/TreeNavigation.stories.d.ts +6 -0
- package/lib/page/TreeNavigation/hooks/useFetch.d.ts +14 -0
- package/lib/page/TreeNavigation/index.d.ts +1 -0
- package/lib/util/DynamicIcons.d.ts +10 -0
- package/package.json +76 -0
- package/postcss.config.js +7 -0
- package/rollup.config.js +37 -0
- package/setupTests.js +6 -0
- package/styleMock.js +2 -0
- package/tailwind.config.js +18 -0
- package/tsconfig.json +23 -0
- package/yarn-error.log +12463 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { SelectOptions } from '..';
|
|
3
|
+
export interface InputSelectProps {
|
|
4
|
+
align: 'left' | 'right';
|
|
5
|
+
/** Show the CTA without Background color and a border seperator */
|
|
6
|
+
inputOptions: SelectOptions[];
|
|
7
|
+
/** Onclick callback */
|
|
8
|
+
onSelectOption?(value: string): void;
|
|
9
|
+
}
|
|
10
|
+
/** Comment */
|
|
11
|
+
export declare const InputSelect: FC<InputSelectProps>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { InputSelectProps } from './InputSelect';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const InputSelectComponent: Story<InputSelectProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InputSelect';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import '../../../tailwind.css';
|
|
3
|
+
export declare type Type = 'text' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'url' | 'date' | 'datetime-local' | 'month' | 'time' | 'week' | 'currency';
|
|
4
|
+
export declare type SelectOptions = {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
};
|
|
8
|
+
export interface TextInputSelectProps {
|
|
9
|
+
/** Input type*/
|
|
10
|
+
type: Type;
|
|
11
|
+
/** Input ID */
|
|
12
|
+
id: string;
|
|
13
|
+
/** Input Name */
|
|
14
|
+
name: string;
|
|
15
|
+
/** Label for the input */
|
|
16
|
+
label?: string;
|
|
17
|
+
/** placeholder for the input */
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
/** Force the focus state on the input */
|
|
20
|
+
isFocused?: boolean;
|
|
21
|
+
/** Error state */
|
|
22
|
+
isError?: boolean;
|
|
23
|
+
/** If field is required */
|
|
24
|
+
isRequired?: boolean;
|
|
25
|
+
/** Disabled state */
|
|
26
|
+
isDisabled?: boolean;
|
|
27
|
+
/** Set default value */
|
|
28
|
+
defaultValue?: string;
|
|
29
|
+
/** Message shown under the text field */
|
|
30
|
+
message?: string;
|
|
31
|
+
/** Input character counter */
|
|
32
|
+
isShowCounter?: boolean;
|
|
33
|
+
/** Max length of input character */
|
|
34
|
+
maxLength?: number;
|
|
35
|
+
/** Select input location */
|
|
36
|
+
selectLocation?: 'left' | 'right';
|
|
37
|
+
/** Prefix */
|
|
38
|
+
prefix?: string;
|
|
39
|
+
/** List of options to show on the select field */
|
|
40
|
+
inputOptions?: SelectOptions[];
|
|
41
|
+
/** Callback on base input */
|
|
42
|
+
onChange?(value: string): void;
|
|
43
|
+
/** Callback on input select field */
|
|
44
|
+
onSelectOption?(value: string): void;
|
|
45
|
+
}
|
|
46
|
+
export declare const TextInputSelect: FC<TextInputSelectProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { TextInputSelectProps } from './TextInputSelect';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const AllVariations: Story<TextInputSelectProps>;
|
|
7
|
+
export declare const LeadSelect: Story<TextInputSelectProps>;
|
|
8
|
+
export declare const TrailSelect: Story<TextInputSelectProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TextInputSelect';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TextareaProps {
|
|
3
|
+
/** Input ID */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Input Name */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Label for the input */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Error state */
|
|
10
|
+
isError?: boolean;
|
|
11
|
+
/** If field is required */
|
|
12
|
+
isRequired?: boolean;
|
|
13
|
+
/** Disabled state */
|
|
14
|
+
isDisabled?: boolean;
|
|
15
|
+
/** Set default value */
|
|
16
|
+
defaultValue?: string;
|
|
17
|
+
/** Message shown under the text field */
|
|
18
|
+
message?: string;
|
|
19
|
+
/** Input character counter */
|
|
20
|
+
isShowCounter?: boolean;
|
|
21
|
+
/** Max length of input character */
|
|
22
|
+
maxLength?: number;
|
|
23
|
+
/** Callback on change */
|
|
24
|
+
onChange?(value: string): void;
|
|
25
|
+
/** Number of rows */
|
|
26
|
+
rows?: number;
|
|
27
|
+
}
|
|
28
|
+
declare const _Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
29
|
+
export { _Textarea as Textarea };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { TextareaProps } from './Textarea';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const AllVariations: Story<TextareaProps>;
|
|
7
|
+
export declare const Default: Story<TextareaProps>;
|
|
8
|
+
export declare const Message: Story<TextareaProps>;
|
|
9
|
+
export declare const Counter: Story<TextareaProps>;
|
|
10
|
+
export declare const Required: Story<TextareaProps>;
|
|
11
|
+
export declare const Error: Story<TextareaProps>;
|
|
12
|
+
export declare const Disabled: Story<TextareaProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Textarea';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import '../../tailwind.css';
|
|
3
|
+
export interface InputCounterProps {
|
|
4
|
+
/**
|
|
5
|
+
* Counter limit
|
|
6
|
+
*/
|
|
7
|
+
limit: number;
|
|
8
|
+
/**
|
|
9
|
+
* String or number to
|
|
10
|
+
*/
|
|
11
|
+
current: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Primary UI component for user interaction
|
|
15
|
+
*/
|
|
16
|
+
export declare const InputCounter: FC<InputCounterProps>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { InputCounterProps } from './InputCounter';
|
|
4
|
+
declare const _default: Meta<import('@storybook/react').Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Counter: Story<InputCounterProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InputCounter';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface RadioProps {
|
|
3
|
+
/** group name */
|
|
4
|
+
name: string;
|
|
5
|
+
/** Radio label */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Radio ID */
|
|
8
|
+
id: string;
|
|
9
|
+
/** Disabled state */
|
|
10
|
+
isDisabled?: boolean;
|
|
11
|
+
/** Check state */
|
|
12
|
+
isChecked?: boolean;
|
|
13
|
+
/** If field is required */
|
|
14
|
+
isRequired?: boolean;
|
|
15
|
+
/** Error state */
|
|
16
|
+
isError?: boolean;
|
|
17
|
+
/** Message or description */
|
|
18
|
+
message?: string;
|
|
19
|
+
}
|
|
20
|
+
/** Comment */
|
|
21
|
+
export declare const Radio: FC<RadioProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { RadioProps } from './Radio';
|
|
4
|
+
declare const _default: Meta<import('@storybook/react').Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const AllVariations: Story<RadioProps>;
|
|
7
|
+
export declare const Default: Story<RadioProps>;
|
|
8
|
+
export declare const Description: Story<RadioProps>;
|
|
9
|
+
export declare const Required: Story<RadioProps>;
|
|
10
|
+
export declare const Checked: Story<RadioProps>;
|
|
11
|
+
export declare const ErrorState: Story<RadioProps>;
|
|
12
|
+
export declare const Disabled: Story<RadioProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Radio';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export declare type SelectOptions = {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
};
|
|
6
|
+
export interface SelectProps {
|
|
7
|
+
/** Label */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Select ID prop */
|
|
10
|
+
id: string;
|
|
11
|
+
/** Select name prop */
|
|
12
|
+
name: string;
|
|
13
|
+
/** List of options to display in the select menu */
|
|
14
|
+
options: SelectOptions[];
|
|
15
|
+
/** Select name prop */
|
|
16
|
+
onChange?(value: string): void;
|
|
17
|
+
/** Select disabled state */
|
|
18
|
+
isDisabled?: boolean;
|
|
19
|
+
/** Select error state */
|
|
20
|
+
isError?: boolean;
|
|
21
|
+
/** Select required state */
|
|
22
|
+
isRequired?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** Comment */
|
|
25
|
+
export declare const Select: FC<SelectProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { SelectProps } from './Select';
|
|
4
|
+
declare const _default: Meta<import('@storybook/react').Args>;
|
|
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>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Select';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { SwitchProps } from './Switch';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const SwitchComponent: Story<SwitchProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Switch';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import '../../tailwind.css';
|
|
3
|
+
declare type Type =
|
|
4
|
+
| 'text'
|
|
5
|
+
| 'email'
|
|
6
|
+
| 'number'
|
|
7
|
+
| 'password'
|
|
8
|
+
| 'search'
|
|
9
|
+
| 'tel'
|
|
10
|
+
| 'url'
|
|
11
|
+
| 'date'
|
|
12
|
+
| 'datetime-local'
|
|
13
|
+
| 'month'
|
|
14
|
+
| 'time'
|
|
15
|
+
| 'week'
|
|
16
|
+
| 'currency';
|
|
17
|
+
export interface TextInputProps {
|
|
18
|
+
/** Input type*/
|
|
19
|
+
type: Type;
|
|
20
|
+
/** Input ID */
|
|
21
|
+
id: string;
|
|
22
|
+
/** Input Name */
|
|
23
|
+
name: string;
|
|
24
|
+
/** Label for the input */
|
|
25
|
+
label: string;
|
|
26
|
+
/** Force the focus state on the input */
|
|
27
|
+
isFocused?: boolean;
|
|
28
|
+
/** Error state */
|
|
29
|
+
isError?: boolean;
|
|
30
|
+
/** If field is required */
|
|
31
|
+
isRequired?: boolean;
|
|
32
|
+
/** Disabled state */
|
|
33
|
+
isDisabled?: boolean;
|
|
34
|
+
/** Set default value */
|
|
35
|
+
defaultValue?: string;
|
|
36
|
+
/** Message shown under the text field */
|
|
37
|
+
message?: string;
|
|
38
|
+
/** Input character counter */
|
|
39
|
+
showCounter?: boolean;
|
|
40
|
+
/** Max length of input character */
|
|
41
|
+
maxLength?: number;
|
|
42
|
+
/** Callback on change */
|
|
43
|
+
onChange?(value: string): void;
|
|
44
|
+
}
|
|
45
|
+
export declare const TextInput: FC<TextInputProps>;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { TextInputProps } from './TextInput';
|
|
4
|
+
declare const _default: Meta<import('@storybook/react').Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Default: Story<TextInputProps>;
|
|
7
|
+
export declare const Counter: Story<TextInputProps>;
|
|
8
|
+
export declare const Required: Story<TextInputProps>;
|
|
9
|
+
export declare const Error: Story<TextInputProps>;
|
|
10
|
+
export declare const Disabled: Story<TextInputProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TextInput';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IconName } from '../../util/DynamicIcons';
|
|
3
|
+
import '../../tailwind.css';
|
|
4
|
+
declare type Type =
|
|
5
|
+
| 'text'
|
|
6
|
+
| 'email'
|
|
7
|
+
| 'number'
|
|
8
|
+
| 'password'
|
|
9
|
+
| 'search'
|
|
10
|
+
| 'tel'
|
|
11
|
+
| 'url'
|
|
12
|
+
| 'date'
|
|
13
|
+
| 'datetime-local'
|
|
14
|
+
| 'month'
|
|
15
|
+
| 'time'
|
|
16
|
+
| 'week'
|
|
17
|
+
| 'currency';
|
|
18
|
+
export interface TextInputAddonProps {
|
|
19
|
+
/** Input type*/
|
|
20
|
+
type: Type;
|
|
21
|
+
/** Input ID */
|
|
22
|
+
id: string;
|
|
23
|
+
/** Input Name */
|
|
24
|
+
name: string;
|
|
25
|
+
/** Label for the input */
|
|
26
|
+
label: string;
|
|
27
|
+
/** placeholder for the input */
|
|
28
|
+
placeholder?: string;
|
|
29
|
+
/** Force the focus state on the input */
|
|
30
|
+
isFocused?: boolean;
|
|
31
|
+
/** Error state */
|
|
32
|
+
isError?: boolean;
|
|
33
|
+
/** If field is required */
|
|
34
|
+
isRequired?: boolean;
|
|
35
|
+
/** Disabled state */
|
|
36
|
+
isDisabled?: boolean;
|
|
37
|
+
/** Set default value */
|
|
38
|
+
defaultValue?: string;
|
|
39
|
+
/** Message shown under the text field */
|
|
40
|
+
message?: string;
|
|
41
|
+
/** Input character counter */
|
|
42
|
+
showCounter?: boolean;
|
|
43
|
+
/** Max length of input character */
|
|
44
|
+
maxLength?: number;
|
|
45
|
+
/** Icon to use in the text field */
|
|
46
|
+
primaryIcon?: IconName;
|
|
47
|
+
/** Callback on change */
|
|
48
|
+
onChange?(value: string): void;
|
|
49
|
+
}
|
|
50
|
+
export declare const TextInputAddon: FC<TextInputAddonProps>;
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { TextInputAddonProps } from './TextInputAddon';
|
|
4
|
+
declare const _default: Meta<import('@storybook/react').Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Default: Story<TextInputAddonProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TextInputAddon';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { TreeItemChildrenProps } from '../types/tree.types';
|
|
3
|
+
export interface TreeItemProps {
|
|
4
|
+
/** Selected or current state */
|
|
5
|
+
isCurrent?: boolean;
|
|
6
|
+
/** title of the tree item */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** If tree item is expanded */
|
|
9
|
+
isExpanded?: boolean;
|
|
10
|
+
/** inner nodes within the tree item */
|
|
11
|
+
childNodes?: Partial<TreeItemChildrenProps[] | null>;
|
|
12
|
+
/** A Check to know if item is a root value */
|
|
13
|
+
isRoot?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** Comment */
|
|
16
|
+
export declare const TreeItem: FC<TreeItemProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { TreeItemProps } from './TreeItem';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Base: Story<TreeItemProps>;
|
|
7
|
+
export declare const Active: Story<TreeItemProps>;
|
|
8
|
+
export declare const Expanded: Story<TreeItemProps>;
|
|
9
|
+
export declare const WithChildren: Story<TreeItemProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TreeItem';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { JSXElementConstructor } from 'react';
|
|
2
|
+
import { NodeModel, TreeMethods } from '@minoru/react-dnd-treeview';
|
|
3
|
+
export interface TreeItemProps {
|
|
4
|
+
node: NodeModel<DataProps>;
|
|
5
|
+
depth: number;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
onToggle: (id: NodeModel['id']) => void;
|
|
8
|
+
onUpdate: (childList: NodeModel<DataProps>[]) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface TreeViewProps {
|
|
11
|
+
/** Prop comment */
|
|
12
|
+
treeData: NodeModel<DataProps>[];
|
|
13
|
+
CustomNode: JSXElementConstructor<TreeItemProps>;
|
|
14
|
+
}
|
|
15
|
+
export interface DataProps {
|
|
16
|
+
type: string;
|
|
17
|
+
lazy: boolean;
|
|
18
|
+
expanded: boolean;
|
|
19
|
+
folder: boolean;
|
|
20
|
+
prefix: string;
|
|
21
|
+
iconclass: string;
|
|
22
|
+
galleryID: number;
|
|
23
|
+
galleryFolderID: number;
|
|
24
|
+
assetID: number;
|
|
25
|
+
folderID: number;
|
|
26
|
+
}
|
|
27
|
+
declare type PlaceHolderProps = {
|
|
28
|
+
node: NodeModel;
|
|
29
|
+
depth: number;
|
|
30
|
+
};
|
|
31
|
+
/** Custom placeholder design */
|
|
32
|
+
export declare const Placeholder: React.FC<PlaceHolderProps>;
|
|
33
|
+
declare const _TreeView: React.ForwardRefExoticComponent<TreeViewProps & React.RefAttributes<TreeMethods>>;
|
|
34
|
+
export { _TreeView as TreeView };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { TreeViewProps } from ".";
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const TreeViewComponent: Story<TreeViewProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { ComponentType } from 'react';
|
|
2
|
+
import { TreeViewContextProps } from "./types/tree.types";
|
|
3
|
+
export interface TreeViewProviderProps {
|
|
4
|
+
children?: JSX.Element | HTMLDivElement | ComponentType;
|
|
5
|
+
}
|
|
6
|
+
declare const TreeViewContext: React.Context<TreeViewContextProps | null>;
|
|
7
|
+
declare const TreeViewProvider: ({ children }: TreeViewProviderProps) => JSX.Element;
|
|
8
|
+
export declare const useTreeViewContext: () => TreeViewContextProps | null;
|
|
9
|
+
export { TreeViewContext, TreeViewProvider };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TreeView';
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export declare const data: ({
|
|
2
|
+
key: string;
|
|
3
|
+
type: string;
|
|
4
|
+
title: string;
|
|
5
|
+
lazy: boolean;
|
|
6
|
+
expanded: boolean;
|
|
7
|
+
folder: boolean;
|
|
8
|
+
prefix: string;
|
|
9
|
+
iconclass: string;
|
|
10
|
+
galleryID: number;
|
|
11
|
+
galleryFolderID: number;
|
|
12
|
+
assetID: number;
|
|
13
|
+
folderID: number;
|
|
14
|
+
childNodes: null;
|
|
15
|
+
} | {
|
|
16
|
+
key: string;
|
|
17
|
+
type: string;
|
|
18
|
+
title: string;
|
|
19
|
+
lazy: boolean;
|
|
20
|
+
expanded: boolean;
|
|
21
|
+
folder: boolean;
|
|
22
|
+
prefix: string;
|
|
23
|
+
iconclass: string;
|
|
24
|
+
galleryID: number;
|
|
25
|
+
galleryFolderID: number;
|
|
26
|
+
assetID: number;
|
|
27
|
+
folderID: number;
|
|
28
|
+
childNodes: ({
|
|
29
|
+
key: string;
|
|
30
|
+
type: string;
|
|
31
|
+
title: string;
|
|
32
|
+
lazy: boolean;
|
|
33
|
+
expanded: boolean;
|
|
34
|
+
folder: boolean;
|
|
35
|
+
prefix: string;
|
|
36
|
+
iconclass: string;
|
|
37
|
+
galleryID: number;
|
|
38
|
+
galleryFolderID: number;
|
|
39
|
+
assetID: number;
|
|
40
|
+
folderID: number;
|
|
41
|
+
childNodes: {
|
|
42
|
+
key: string;
|
|
43
|
+
type: string;
|
|
44
|
+
title: string;
|
|
45
|
+
lazy: boolean;
|
|
46
|
+
expanded: boolean;
|
|
47
|
+
folder: boolean;
|
|
48
|
+
prefix: string;
|
|
49
|
+
iconclass: string;
|
|
50
|
+
galleryID: number;
|
|
51
|
+
galleryFolderID: number;
|
|
52
|
+
assetID: number;
|
|
53
|
+
folderID: number;
|
|
54
|
+
childNodes: null;
|
|
55
|
+
}[];
|
|
56
|
+
} | {
|
|
57
|
+
key: string;
|
|
58
|
+
type: string;
|
|
59
|
+
title: string;
|
|
60
|
+
lazy: boolean;
|
|
61
|
+
expanded: boolean;
|
|
62
|
+
folder: boolean;
|
|
63
|
+
prefix: string;
|
|
64
|
+
iconclass: string;
|
|
65
|
+
galleryID: number;
|
|
66
|
+
galleryFolderID: number;
|
|
67
|
+
assetID: number;
|
|
68
|
+
folderID: number;
|
|
69
|
+
childNodes: null;
|
|
70
|
+
})[];
|
|
71
|
+
})[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
export interface TreeItemChildrenProps {
|
|
3
|
+
key: string;
|
|
4
|
+
type: string;
|
|
5
|
+
title: string;
|
|
6
|
+
lazy: boolean;
|
|
7
|
+
expanded: boolean;
|
|
8
|
+
folder: boolean;
|
|
9
|
+
prefix: string;
|
|
10
|
+
iconclass: string;
|
|
11
|
+
galleryID: number;
|
|
12
|
+
galleryFolderID: number;
|
|
13
|
+
assetID: number;
|
|
14
|
+
folderID: number;
|
|
15
|
+
childNodes?: TreeListProp;
|
|
16
|
+
}
|
|
17
|
+
export declare type TreeListProp = Partial<TreeItemChildrenProps[] | null>;
|
|
18
|
+
export interface TreeViewContextProps {
|
|
19
|
+
treeList: TreeListProp;
|
|
20
|
+
setTreeList: Dispatch<SetStateAction<TreeListProp>>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { TreeItemChildrenProps } from '../types/tree.types';
|
|
3
|
+
export interface TreeItemProps {
|
|
4
|
+
/** Selected or current state */
|
|
5
|
+
isCurrent?: boolean;
|
|
6
|
+
/** title of the tree item */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** If tree item is expanded */
|
|
9
|
+
isExpanded?: boolean;
|
|
10
|
+
/** inner nodes within the tree item */
|
|
11
|
+
childNodes?: Partial<TreeItemChildrenProps[] | null>;
|
|
12
|
+
/** A Check to know if item is a root value */
|
|
13
|
+
isRoot?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** Comment */
|
|
16
|
+
export declare const TreeItem: FC<TreeItemProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { TreeItemProps } from './TreeItem';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Base: Story<TreeItemProps>;
|
|
7
|
+
export declare const Active: Story<TreeItemProps>;
|
|
8
|
+
export declare const Expanded: Story<TreeItemProps>;
|
|
9
|
+
export declare const WithChildren: Story<TreeItemProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TreeItem';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { TreeViewProps } from './TreeView';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const TreeViewComponent: Story<TreeViewProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|