@agility/plenum-ui 1.1.4 → 1.1.61

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.
Files changed (124) hide show
  1. package/coverage/Forms/TextInputSelect/InputSelect/InputSelect.tsx.html +204 -0
  2. package/coverage/Forms/TextInputSelect/InputSelect/index.html +155 -0
  3. package/coverage/Select/Select.tsx.html +264 -0
  4. package/coverage/Select/index.html +153 -0
  5. package/coverage/Select.tsx.html +261 -0
  6. package/coverage/agility-component-lib-react/index.html +116 -0
  7. package/coverage/agility-component-lib-react/src/components/Button/Button.tsx.html +343 -0
  8. package/coverage/agility-component-lib-react/src/components/Button/index.html +116 -0
  9. package/coverage/agility-component-lib-react/src/components/Checkbox/Checkbox.tsx.html +235 -0
  10. package/coverage/agility-component-lib-react/src/components/Checkbox/index.html +156 -0
  11. package/coverage/agility-component-lib-react/src/components/Forms/BaseField/BaseField.tsx.html +406 -0
  12. package/coverage/agility-component-lib-react/src/components/Forms/BaseField/index.html +116 -0
  13. package/coverage/agility-component-lib-react/src/components/Forms/Checkbox/Checkbox.tsx.html +283 -0
  14. package/coverage/agility-component-lib-react/src/components/Forms/Checkbox/index.html +116 -0
  15. package/coverage/agility-component-lib-react/src/components/Forms/InputCounter/InputCounter.tsx.html +139 -0
  16. package/coverage/agility-component-lib-react/src/components/Forms/InputCounter/index.html +116 -0
  17. package/coverage/agility-component-lib-react/src/components/Forms/InputLabel/InputLabel.tsx.html +211 -0
  18. package/coverage/agility-component-lib-react/src/components/Forms/InputLabel/index.html +131 -0
  19. package/coverage/agility-component-lib-react/src/components/Forms/InputLabel/index.ts.html +94 -0
  20. package/coverage/agility-component-lib-react/src/components/Forms/Radio/Radio.tsx.html +271 -0
  21. package/coverage/agility-component-lib-react/src/components/Forms/Radio/index.html +116 -0
  22. package/coverage/agility-component-lib-react/src/components/Forms/Select/Select.tsx.html +337 -0
  23. package/coverage/agility-component-lib-react/src/components/Forms/Select/index.html +116 -0
  24. package/coverage/agility-component-lib-react/src/components/Forms/TextInputAddon/InputCta/InputCta.tsx.html +271 -0
  25. package/coverage/agility-component-lib-react/src/components/Forms/TextInputAddon/InputCta/index.html +116 -0
  26. package/coverage/agility-component-lib-react/src/components/Forms/TextInputSelect/InputSelect/InputSelect.tsx.html +217 -0
  27. package/coverage/agility-component-lib-react/src/components/Forms/TextInputSelect/InputSelect/index.html +116 -0
  28. package/coverage/agility-component-lib-react/src/components/Radio/Radio.tsx.html +243 -0
  29. package/coverage/agility-component-lib-react/src/components/Radio/index.html +156 -0
  30. package/coverage/agility-component-lib-react/src/components/Switch/Switch.tsx.html +214 -0
  31. package/coverage/agility-component-lib-react/src/components/Switch/index.html +116 -0
  32. package/coverage/agility-component-lib-react/src/util/DynamicIcons.tsx.html +151 -0
  33. package/coverage/agility-component-lib-react/src/util/Loader.tsx.html +139 -0
  34. package/coverage/agility-component-lib-react/src/util/index.html +131 -0
  35. package/coverage/agility-component-lib-react/styleMock.js.html +91 -0
  36. package/coverage/base.css +224 -0
  37. package/coverage/block-navigation.js +87 -0
  38. package/coverage/clover.xml +145 -0
  39. package/coverage/coverage-final.json +5 -0
  40. package/coverage/favicon.png +0 -0
  41. package/coverage/index.html +146 -0
  42. package/coverage/lcov-report/agility-component-lib-react/index.html +153 -0
  43. package/coverage/lcov-report/agility-component-lib-react/src/components/Button/Button.tsx.html +255 -0
  44. package/coverage/lcov-report/agility-component-lib-react/src/components/Button/index.html +156 -0
  45. package/coverage/lcov-report/agility-component-lib-react/src/components/Checkbox/Checkbox.tsx.html +235 -0
  46. package/coverage/lcov-report/agility-component-lib-react/src/components/Checkbox/index.html +156 -0
  47. package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/BaseField/BaseField.tsx.html +330 -0
  48. package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/BaseField/index.html +158 -0
  49. package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/InputCounter/InputCounter.tsx.html +147 -0
  50. package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/InputCounter/index.html +158 -0
  51. package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/TextInputAddon/InputCta/InputCta.tsx.html +258 -0
  52. package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/TextInputAddon/InputCta/index.html +159 -0
  53. package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/TextInputSelect/InputSelect/InputSelect.tsx.html +210 -0
  54. package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/TextInputSelect/InputSelect/index.html +159 -0
  55. package/coverage/lcov-report/agility-component-lib-react/src/components/Radio/Radio.tsx.html +243 -0
  56. package/coverage/lcov-report/agility-component-lib-react/src/components/Radio/index.html +156 -0
  57. package/coverage/lcov-report/agility-component-lib-react/src/components/Switch/Switch.tsx.html +225 -0
  58. package/coverage/lcov-report/agility-component-lib-react/src/components/Switch/index.html +156 -0
  59. package/coverage/lcov-report/agility-component-lib-react/src/util/DynamicIcons.tsx.html +137 -0
  60. package/coverage/lcov-report/agility-component-lib-react/src/util/index.html +155 -0
  61. package/coverage/lcov-report/agility-component-lib-react/styleMock.js.html +90 -0
  62. package/coverage/lcov-report/base.css +354 -0
  63. package/coverage/lcov-report/block-navigation.js +82 -0
  64. package/coverage/lcov-report/favicon.png +0 -0
  65. package/coverage/lcov-report/index.html +385 -0
  66. package/coverage/lcov-report/prettify.css +101 -0
  67. package/coverage/lcov-report/prettify.js +955 -0
  68. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  69. package/coverage/lcov-report/sorter.js +189 -0
  70. package/coverage/lcov.info +267 -0
  71. package/coverage/prettify.css +1 -0
  72. package/coverage/prettify.js +2 -0
  73. package/coverage/sort-arrow-sprite.png +0 -0
  74. package/coverage/sorter.js +196 -0
  75. package/lib/components/Avatar/Avatar.d.ts +27 -0
  76. package/lib/components/Avatar/Avatar.stories.d.ts +6 -0
  77. package/lib/components/Avatar/Avatar.test.d.ts +1 -0
  78. package/lib/components/Avatar/index.d.ts +1 -0
  79. package/lib/components/Checkbox/Checkbox.d.ts +19 -0
  80. package/lib/components/Checkbox/Checkbox.stories.d.ts +12 -0
  81. package/lib/components/Checkbox/Checkbox.test.d.ts +1 -0
  82. package/lib/components/Checkbox/index.d.ts +1 -0
  83. package/lib/components/DatePicker/DatePicker.d.ts +7 -0
  84. package/lib/components/DatePicker/DatePicker.stories.d.ts +6 -0
  85. package/lib/components/DatePicker/DatePicker.test.d.ts +1 -0
  86. package/lib/components/DatePicker/index.d.ts +1 -0
  87. package/lib/components/Dropdown/Dropdown.stories.d.ts +2 -0
  88. package/lib/components/Forms/Checkbox/Checkbox.d.ts +3 -1
  89. package/lib/components/Forms/Checkbox/Checkbox.stories.d.ts +1 -0
  90. package/lib/components/Forms/InputCta/InputCta.d.ts +16 -0
  91. package/lib/components/Forms/InputCta/InputCta.stories.d.ts +6 -0
  92. package/lib/components/Forms/InputCta/InputCta.test.d.ts +1 -0
  93. package/lib/components/Forms/InputCta/index.d.ts +1 -0
  94. package/lib/components/Forms/Radio/Radio.d.ts +4 -2
  95. package/lib/components/InputCounter/InputCounter.d.ts +16 -0
  96. package/lib/components/InputCounter/InputCounter.stories.d.ts +6 -0
  97. package/lib/components/InputCounter/InputCounter.test.d.ts +1 -0
  98. package/lib/components/InputCounter/index.d.ts +1 -0
  99. package/lib/components/Radio/Radio.d.ts +21 -0
  100. package/lib/components/Radio/Radio.stories.d.ts +12 -0
  101. package/lib/components/Radio/Radio.test.d.ts +1 -0
  102. package/lib/components/Radio/index.d.ts +1 -0
  103. package/lib/components/Select/Select.d.ts +25 -0
  104. package/lib/components/Select/Select.stories.d.ts +11 -0
  105. package/lib/components/Select/Select.test.d.ts +1 -0
  106. package/lib/components/Select/index.d.ts +1 -0
  107. package/lib/components/TextInput/TextInput.d.ts +46 -0
  108. package/lib/components/TextInput/TextInput.stories.d.ts +10 -0
  109. package/lib/components/TextInput/index.d.ts +1 -0
  110. package/lib/components/TextInputAddon/TextInputAddon.d.ts +51 -0
  111. package/lib/components/TextInputAddon/TextInputAddon.stories.d.ts +6 -0
  112. package/lib/components/TextInputAddon/index.d.ts +1 -0
  113. package/lib/components/TreeView/TreeItem/TreeItem.d.ts +11 -2
  114. package/lib/components/TreeView/TreeItem/TreeItem.stories.d.ts +4 -1
  115. package/lib/components/TreeView/context.d.ts +5 -8
  116. package/lib/components/TreeView/sampleData.d.ts +5 -5
  117. package/lib/components/TreeView/types/tree.types.d.ts +21 -0
  118. package/lib/index.d.ts +1 -0
  119. package/lib/index.esm.js +68 -10
  120. package/lib/index.esm.js.map +1 -1
  121. package/lib/index.js +68 -9
  122. package/lib/index.js.map +1 -1
  123. package/package.json +1 -1
  124. package/yarn-error.log +12463 -0
@@ -0,0 +1,27 @@
1
+ import { FC } from 'react';
2
+ export interface AvatarProps {
3
+ /**
4
+ * source url for the avatar
5
+ */
6
+ src?: string;
7
+ /**
8
+ * Initials we use as fallback if no src is passed
9
+ */
10
+ initials?: string;
11
+ /**
12
+ * optional status
13
+ */
14
+ status?: 'offline' | 'online' | 'busy';
15
+ /**
16
+ * avatar picture size (also affects status indicator)
17
+ */
18
+ size?: 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
19
+ /**
20
+ * avatar img alt
21
+ */
22
+ alt?: string;
23
+ }
24
+ /**
25
+ * Avatar component that shows profile image or name initials of the user
26
+ */
27
+ export declare const Avatar: FC<AvatarProps>;
@@ -0,0 +1,6 @@
1
+ import { Meta } from '@storybook/react/types-6-0';
2
+ import { Story } from '@storybook/react';
3
+ import { AvatarProps } from './Avatar';
4
+ declare const _default: Meta<import("@storybook/react").Args>;
5
+ export default _default;
6
+ export declare const AvatarIcon: Story<AvatarProps>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Avatar';
@@ -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,7 @@
1
+ import { FC } from 'react';
2
+ export interface DatePickerProps {
3
+ /** Prop comment */
4
+ prop: string;
5
+ }
6
+ /** Comment */
7
+ export declare const DatePicker: FC<DatePickerProps>;
@@ -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';
@@ -3,5 +3,7 @@ import { Story } from '@storybook/react';
3
3
  import { DropdownProps } from './Dropdown';
4
4
  declare const _default: Meta<import("@storybook/react").Args>;
5
5
  export default _default;
6
+ export declare const AllVariations: Story<DropdownProps>;
6
7
  export declare const Default: Story<DropdownProps>;
7
8
  export declare const Icon: Story<DropdownProps>;
9
+ export declare const Label: Story<DropdownProps>;
@@ -6,6 +6,8 @@ export interface CheckboxProps {
6
6
  id: string;
7
7
  /** Disabled state */
8
8
  isDisabled?: boolean;
9
+ /** value */
10
+ value?: string;
9
11
  /** Check state */
10
12
  isChecked?: boolean;
11
13
  /** If field is required */
@@ -15,7 +17,7 @@ export interface CheckboxProps {
15
17
  /** Message or description */
16
18
  message?: string;
17
19
  /** Callback on input change */
18
- onChange?(checked: boolean): void;
20
+ onChange?(value: string, isChecked: boolean): void;
19
21
  }
20
22
  /** Comment */
21
23
  export declare const Checkbox: FC<CheckboxProps>;
@@ -10,3 +10,4 @@ export declare const Required: Story<CheckboxProps>;
10
10
  export declare const Checked: Story<CheckboxProps>;
11
11
  export declare const ErrorState: Story<CheckboxProps>;
12
12
  export declare const Disabled: Story<CheckboxProps>;
13
+ export declare const Events: Story<CheckboxProps>;
@@ -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';
@@ -16,10 +16,12 @@ export interface RadioProps {
16
16
  isError?: boolean;
17
17
  /** Message or description */
18
18
  message?: string;
19
+ /** value */
20
+ value?: string;
19
21
  /** Callback on input change */
20
- onChange?(value: string): void;
22
+ onChange?(value: string, isChecked: boolean): void;
21
23
  /** Callback on click */
22
- onClick?(value: string): void;
24
+ onClick?(value: string, isChecked: boolean): void;
23
25
  }
24
26
  /** Comment */
25
27
  export declare const Radio: FC<RadioProps>;
@@ -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,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';
@@ -1,7 +1,16 @@
1
1
  import { FC } from 'react';
2
+ import { TreeItemChildrenProps } from '../types/tree.types';
2
3
  export interface TreeItemProps {
3
- /** Prop comment */
4
- prop: string;
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;
5
14
  }
6
15
  /** Comment */
7
16
  export declare const TreeItem: FC<TreeItemProps>;
@@ -3,4 +3,7 @@ import { Story } from '@storybook/react';
3
3
  import { TreeItemProps } from './TreeItem';
4
4
  declare const _default: Meta<import("@storybook/react").Args>;
5
5
  export default _default;
6
- export declare const TreeItemComponent: Story<TreeItemProps>;
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>;
@@ -1,12 +1,9 @@
1
- import React, { Dispatch, SetStateAction } from 'react';
2
- export interface TreeViewContextProps {
3
- isOpen: boolean;
4
- setIsOpen: Dispatch<SetStateAction<boolean>>;
5
- }
1
+ import React, { ComponentType } from 'react';
2
+ import { TreeViewContextProps } from "./types/tree.types";
6
3
  export interface TreeViewProviderProps {
7
- children?: JSX.Element | HTMLDivElement;
4
+ children?: JSX.Element | HTMLDivElement | ComponentType;
8
5
  }
9
- declare const TreeViewContext: React.Context<Partial<TreeViewContextProps | null>>;
6
+ declare const TreeViewContext: React.Context<TreeViewContextProps | null>;
10
7
  declare const TreeViewProvider: ({ children }: TreeViewProviderProps) => JSX.Element;
11
- export declare const useTreeViewContext: () => Partial<TreeViewContextProps | null>;
8
+ export declare const useTreeViewContext: () => TreeViewContextProps | null;
12
9
  export { TreeViewContext, TreeViewProvider };
@@ -11,7 +11,7 @@ export declare const data: ({
11
11
  galleryFolderID: number;
12
12
  assetID: number;
13
13
  folderID: number;
14
- children: null;
14
+ childNodes: null;
15
15
  } | {
16
16
  key: string;
17
17
  type: string;
@@ -25,7 +25,7 @@ export declare const data: ({
25
25
  galleryFolderID: number;
26
26
  assetID: number;
27
27
  folderID: number;
28
- children: ({
28
+ childNodes: ({
29
29
  key: string;
30
30
  type: string;
31
31
  title: string;
@@ -38,7 +38,7 @@ export declare const data: ({
38
38
  galleryFolderID: number;
39
39
  assetID: number;
40
40
  folderID: number;
41
- children: {
41
+ childNodes: {
42
42
  key: string;
43
43
  type: string;
44
44
  title: string;
@@ -51,7 +51,7 @@ export declare const data: ({
51
51
  galleryFolderID: number;
52
52
  assetID: number;
53
53
  folderID: number;
54
- children: null;
54
+ childNodes: null;
55
55
  }[];
56
56
  } | {
57
57
  key: string;
@@ -66,6 +66,6 @@ export declare const data: ({
66
66
  galleryFolderID: number;
67
67
  assetID: number;
68
68
  folderID: number;
69
- children: null;
69
+ childNodes: null;
70
70
  })[];
71
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
+ }
package/lib/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export * from './components/Combobox';
3
3
  export * from './components/Dropdown';
4
4
  export * from './components/Switch';
5
5
  export * from './components/TreeView';
6
+ export * from './components/Avatar';
6
7
  export * from './components/Forms/TextInput';
7
8
  export * from './components/Forms/TextInputAddon';
8
9
  export * from './components/Forms/TextInputSelect';