@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
package/jest.config.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
transform: { '^.+\\.tsx?$': 'ts-jest' },
|
|
3
|
+
moduleNameMapper: { '\\.(css|less)$': '<rootDir>/styleMock.js' },
|
|
4
|
+
setupFilesAfterEnv: ['<rootDir>/setupTests.js'],
|
|
5
|
+
testEnvironment: 'jsdom',
|
|
6
|
+
collectCoverage: true,
|
|
7
|
+
coverageReporters: ['json', 'html']
|
|
8
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { IconName } from '../../util/DynamicIcons';
|
|
3
|
+
import '../../tailwind.css';
|
|
4
|
+
export interface ButtonProps {
|
|
5
|
+
/**
|
|
6
|
+
* Is this the principal call to action on the page?
|
|
7
|
+
*/
|
|
8
|
+
type?: 'primary' | 'secondary' | 'alternative';
|
|
9
|
+
/**
|
|
10
|
+
* How large should the button be?
|
|
11
|
+
*/
|
|
12
|
+
size?: 'sm' | 'base' | 'lg';
|
|
13
|
+
/**
|
|
14
|
+
* Button contents
|
|
15
|
+
*/
|
|
16
|
+
label: string;
|
|
17
|
+
/**
|
|
18
|
+
* An optional icon
|
|
19
|
+
*/
|
|
20
|
+
icon?: IconName;
|
|
21
|
+
/**
|
|
22
|
+
* Optional click handler
|
|
23
|
+
*/
|
|
24
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Primary UI component for user interaction
|
|
28
|
+
*/
|
|
29
|
+
export declare const Button: FC<ButtonProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { ButtonProps } from './Button';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Primary: Story<ButtonProps>;
|
|
7
|
+
export declare const Secondary: Story<ButtonProps>;
|
|
8
|
+
export declare const Alternative: Story<ButtonProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Button';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface CheckboxProps {
|
|
3
|
+
/** Checkbox label */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Checkbox ID */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Disabled state */
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
/** Check state */
|
|
10
|
+
isChecked?: boolean;
|
|
11
|
+
/** If field is required */
|
|
12
|
+
isRequired?: boolean;
|
|
13
|
+
/** Error state */
|
|
14
|
+
isError?: boolean;
|
|
15
|
+
/** Message or description */
|
|
16
|
+
message?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Comment */
|
|
19
|
+
export declare const Checkbox: FC<CheckboxProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { CheckboxProps } from './Checkbox';
|
|
4
|
+
declare const _default: Meta<import('@storybook/react').Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const AllVariations: Story<CheckboxProps>;
|
|
7
|
+
export declare const Default: Story<CheckboxProps>;
|
|
8
|
+
export declare const Description: Story<CheckboxProps>;
|
|
9
|
+
export declare const Required: Story<CheckboxProps>;
|
|
10
|
+
export declare const Checked: Story<CheckboxProps>;
|
|
11
|
+
export declare const ErrorState: Story<CheckboxProps>;
|
|
12
|
+
export declare const Disabled: Story<CheckboxProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Checkbox';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export declare type ComboboxItemProps = {
|
|
3
|
+
value: string;
|
|
4
|
+
};
|
|
5
|
+
export interface ComboboxProps {
|
|
6
|
+
/** Label */
|
|
7
|
+
label?: string;
|
|
8
|
+
/** ID */
|
|
9
|
+
id: string;
|
|
10
|
+
/** Array of items to display */
|
|
11
|
+
items: ComboboxItemProps[];
|
|
12
|
+
/** Placeholder */
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
/** Callback to trigger on change */
|
|
15
|
+
onChange?(value: string): void;
|
|
16
|
+
/** Select disabled state */
|
|
17
|
+
isDisabled?: boolean;
|
|
18
|
+
/** Select error state */
|
|
19
|
+
isError?: boolean;
|
|
20
|
+
/** Select required state */
|
|
21
|
+
isRequired?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** Comment */
|
|
24
|
+
export declare const Combobox: FC<ComboboxProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { ComboboxProps } from './Combobox';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const AllVariations: Story<ComboboxProps>;
|
|
7
|
+
export declare const Default: Story<ComboboxProps>;
|
|
8
|
+
export declare const Label: Story<ComboboxProps>;
|
|
9
|
+
export declare const Disabled: Story<ComboboxProps>;
|
|
10
|
+
export declare const Required: Story<ComboboxProps>;
|
|
11
|
+
export declare const Error: Story<ComboboxProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Combobox';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { DatePickerProps } from './DatePicker';
|
|
4
|
+
declare const _default: Meta<import('@storybook/react').Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const DatePickerComponent: Story<DatePickerProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DatePicker';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IconName } from '../../util/DynamicIcons';
|
|
3
|
+
export declare type ItemProp = {
|
|
4
|
+
icon?: IconName;
|
|
5
|
+
label: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
onClick?(): void;
|
|
8
|
+
isEmphasized?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export interface DropdownProps {
|
|
11
|
+
/** Prop comment */
|
|
12
|
+
items: ItemProp[][];
|
|
13
|
+
}
|
|
14
|
+
/** Comment */
|
|
15
|
+
export declare const Dropdown: FC<DropdownProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { DropdownProps } from './Dropdown';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Default: Story<DropdownProps>;
|
|
7
|
+
export declare const Icon: Story<DropdownProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Dropdown';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type Type = 'text' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'url' | 'date' | 'datetime-local' | 'month' | 'time' | 'week' | 'currency';
|
|
3
|
+
export interface BaseFieldProps {
|
|
4
|
+
/** Input type*/
|
|
5
|
+
type: Type;
|
|
6
|
+
/** Input ID */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Input Name */
|
|
9
|
+
name: string;
|
|
10
|
+
/** placeholder for the input */
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/** Disabled state */
|
|
13
|
+
isDisabled?: boolean;
|
|
14
|
+
/** Set default value */
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
/** Max length of input character */
|
|
17
|
+
maxLength?: number;
|
|
18
|
+
/** Input style classes */
|
|
19
|
+
inputStyles?: string;
|
|
20
|
+
/** Callback on change */
|
|
21
|
+
onChange?(value: string): void;
|
|
22
|
+
/** Callback on onFocus */
|
|
23
|
+
onFocus?(): void;
|
|
24
|
+
/** Callback on onBlur */
|
|
25
|
+
onBlur?(): void;
|
|
26
|
+
/** Callback to get the value for the immediate parent component */
|
|
27
|
+
onValueChange?(value: string): void;
|
|
28
|
+
}
|
|
29
|
+
declare const _BaseField: React.ForwardRefExoticComponent<BaseFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
30
|
+
export { _BaseField as BaseField };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { BaseFieldProps } from './BaseField';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const BaseFieldComponent: Story<BaseFieldProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './BaseField';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface CheckboxProps {
|
|
3
|
+
/** Checkbox label */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Checkbox ID */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Disabled state */
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
/** Check state */
|
|
10
|
+
isChecked?: boolean;
|
|
11
|
+
/** If field is required */
|
|
12
|
+
isRequired?: boolean;
|
|
13
|
+
/** Error state */
|
|
14
|
+
isError?: boolean;
|
|
15
|
+
/** Message or description */
|
|
16
|
+
message?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Comment */
|
|
19
|
+
export declare const Checkbox: FC<CheckboxProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { CheckboxProps } from './Checkbox';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const AllVariations: Story<CheckboxProps>;
|
|
7
|
+
export declare const Default: Story<CheckboxProps>;
|
|
8
|
+
export declare const Description: Story<CheckboxProps>;
|
|
9
|
+
export declare const Required: Story<CheckboxProps>;
|
|
10
|
+
export declare const Checked: Story<CheckboxProps>;
|
|
11
|
+
export declare const ErrorState: Story<CheckboxProps>;
|
|
12
|
+
export declare const Disabled: Story<CheckboxProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Checkbox';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface InputCounterProps {
|
|
3
|
+
/** Counter limit */
|
|
4
|
+
limit: number;
|
|
5
|
+
/** Counter current number */
|
|
6
|
+
current: number;
|
|
7
|
+
}
|
|
8
|
+
/** Primary UI component for user interaction */
|
|
9
|
+
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,16 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IconName } from '../../../util/DynamicIcons';
|
|
3
|
+
export interface InputCtaProps {
|
|
4
|
+
/** Icon name */
|
|
5
|
+
icon?: IconName;
|
|
6
|
+
/** CTA label */
|
|
7
|
+
ctaLabel?: string;
|
|
8
|
+
/** Alignment */
|
|
9
|
+
align: 'left' | 'right';
|
|
10
|
+
/** Show the CTA without Background color and a border seperator */
|
|
11
|
+
isClear?: boolean;
|
|
12
|
+
/** Onclick callback */
|
|
13
|
+
onClickHandler?(): void;
|
|
14
|
+
}
|
|
15
|
+
/** Comment */
|
|
16
|
+
export declare const InputCta: FC<InputCtaProps>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { InputCtaProps } from './InputCta';
|
|
4
|
+
declare const _default: Meta<import('@storybook/react').Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const InputCtaComponent: Story<InputCtaProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InputCta';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface InputLabelProps {
|
|
3
|
+
/** Prop comment */
|
|
4
|
+
isPlaceholder?: boolean;
|
|
5
|
+
id: string;
|
|
6
|
+
isRequired?: boolean;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
isError?: boolean;
|
|
9
|
+
isActive?: boolean;
|
|
10
|
+
isFocused?: boolean;
|
|
11
|
+
label?: string;
|
|
12
|
+
}
|
|
13
|
+
/** Comment */
|
|
14
|
+
export declare const InputLabel: FC<InputLabelProps>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { InputLabelProps } from './InputLabel';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const InputLabelComponent: Story<InputLabelProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InputLabel';
|
|
@@ -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,33 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import '../../../tailwind.css';
|
|
3
|
+
declare type Type = 'text' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'url' | 'date' | 'datetime-local' | 'month' | 'time' | 'week' | 'currency';
|
|
4
|
+
export interface TextInputProps {
|
|
5
|
+
/** Input type*/
|
|
6
|
+
type: Type;
|
|
7
|
+
/** Input ID */
|
|
8
|
+
id: string;
|
|
9
|
+
/** Input Name */
|
|
10
|
+
name: string;
|
|
11
|
+
/** Label for the input */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Force the focus state on the input */
|
|
14
|
+
isFocused?: boolean;
|
|
15
|
+
/** Error state */
|
|
16
|
+
isError?: boolean;
|
|
17
|
+
/** If field is required */
|
|
18
|
+
isRequired?: boolean;
|
|
19
|
+
/** Disabled state */
|
|
20
|
+
isDisabled?: boolean;
|
|
21
|
+
/** Set default value */
|
|
22
|
+
defaultValue?: string;
|
|
23
|
+
/** Message shown under the text field */
|
|
24
|
+
message?: string;
|
|
25
|
+
/** Input character counter */
|
|
26
|
+
isShowCounter?: boolean;
|
|
27
|
+
/** Max length of input character */
|
|
28
|
+
maxLength?: number;
|
|
29
|
+
/** Callback on change */
|
|
30
|
+
onChange?(value: string): void;
|
|
31
|
+
}
|
|
32
|
+
export declare const TextInput: FC<TextInputProps>;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
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 AllVariations: Story<TextInputProps>;
|
|
7
|
+
export declare const Default: Story<TextInputProps>;
|
|
8
|
+
export declare const Message: Story<TextInputProps>;
|
|
9
|
+
export declare const Counter: Story<TextInputProps>;
|
|
10
|
+
export declare const Required: Story<TextInputProps>;
|
|
11
|
+
export declare const Error: Story<TextInputProps>;
|
|
12
|
+
export declare const Disabled: Story<TextInputProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TextInput';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IconName } from '../../../../util/DynamicIcons';
|
|
3
|
+
export interface InputCtaProps {
|
|
4
|
+
/** Icon name */
|
|
5
|
+
icon?: IconName;
|
|
6
|
+
/** CTA label */
|
|
7
|
+
ctaLabel?: string;
|
|
8
|
+
/** Alignment */
|
|
9
|
+
align: 'left' | 'right';
|
|
10
|
+
/** Show the CTA without Background color and a border seperator */
|
|
11
|
+
isClear?: boolean;
|
|
12
|
+
/** Onclick callback */
|
|
13
|
+
onClickHandler?(): void;
|
|
14
|
+
}
|
|
15
|
+
/** Comment */
|
|
16
|
+
export declare const InputCta: FC<InputCtaProps>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react/types-6-0';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { InputCtaProps } from './InputCta';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const InputCtaComponent: Story<InputCtaProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InputCta';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IconName } from '../../../util/DynamicIcons';
|
|
3
|
+
import '../../../tailwind.css';
|
|
4
|
+
export declare type Type = 'text' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'url' | 'date' | 'datetime-local' | 'month' | 'time' | 'week' | 'currency';
|
|
5
|
+
export interface TextInputAddonProps {
|
|
6
|
+
/** Input type*/
|
|
7
|
+
type: Type;
|
|
8
|
+
/** Input ID */
|
|
9
|
+
id: string;
|
|
10
|
+
/** Input Name */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Label for the input */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** placeholder for the input */
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
/** Force the focus state on the input */
|
|
17
|
+
isFocused?: boolean;
|
|
18
|
+
/** Error state */
|
|
19
|
+
isError?: boolean;
|
|
20
|
+
/** If field is required */
|
|
21
|
+
isRequired?: boolean;
|
|
22
|
+
/** Disabled state */
|
|
23
|
+
isDisabled?: boolean;
|
|
24
|
+
/** Set default value */
|
|
25
|
+
defaultValue?: string;
|
|
26
|
+
/** Message shown under the text field */
|
|
27
|
+
message?: string;
|
|
28
|
+
/** Input character counter */
|
|
29
|
+
isShowCounter?: boolean;
|
|
30
|
+
/** Max length of input character */
|
|
31
|
+
maxLength?: number;
|
|
32
|
+
/** Leading icon displayed within the input */
|
|
33
|
+
leadIcon?: IconName;
|
|
34
|
+
/** Trailing icon displayed within the input */
|
|
35
|
+
trailIcon?: IconName;
|
|
36
|
+
/** Icon within the input field */
|
|
37
|
+
inlineIcon?: IconName;
|
|
38
|
+
/** Trailing label for the input CTA */
|
|
39
|
+
trailLabel?: string;
|
|
40
|
+
/** Leading label for input CTA */
|
|
41
|
+
leadLabel?: string;
|
|
42
|
+
/** Remove bg and border from CTA */
|
|
43
|
+
clearCta?: 'left' | 'right' | 'both' | 'none';
|
|
44
|
+
/** Callback on change */
|
|
45
|
+
onChange?(value: string): void;
|
|
46
|
+
/** Callback on Cta click */
|
|
47
|
+
onCtaClick?(): void;
|
|
48
|
+
}
|
|
49
|
+
export declare const TextInputAddon: FC<TextInputAddonProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
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 AllVariations: Story<TextInputAddonProps>;
|
|
7
|
+
export declare const Default: Story<TextInputAddonProps>;
|
|
8
|
+
export declare const LeadIcon: Story<TextInputAddonProps>;
|
|
9
|
+
export declare const TrailAction: Story<TextInputAddonProps>;
|
|
10
|
+
export declare const TrailAndLeadIcons: Story<TextInputAddonProps>;
|
|
11
|
+
export declare const TrailIcon: Story<TextInputAddonProps>;
|
|
12
|
+
export declare const LeadLabel: Story<TextInputAddonProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TextInputAddon';
|