@fattureincloud/fic-design-system 0.4.0 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +332 -0
  2. package/dist/components/badge/index.d.ts +3 -0
  3. package/dist/components/buttons/button/Button.d.ts +2 -2
  4. package/dist/components/form/checkbox/components/Input.d.ts +1 -1
  5. package/dist/components/form/checkbox/components/Label.d.ts +1 -1
  6. package/dist/components/form/checkbox/utils.d.ts +2 -2
  7. package/dist/components/form/common/types.d.ts +1 -1
  8. package/dist/components/form/inputText/components/InputElement.d.ts +2 -2
  9. package/dist/components/form/inputText/components/utils.d.ts +1 -1
  10. package/dist/components/form/label/Label.d.ts +2 -2
  11. package/dist/components/form/select/Select.d.ts +4 -4
  12. package/dist/components/form/select/SelectWrapper.d.ts +1 -1
  13. package/dist/components/form/select/components/ClearIndicator.d.ts +1 -1
  14. package/dist/components/form/select/components/Control.d.ts +1 -1
  15. package/dist/components/form/select/components/DropdownIndicator.d.ts +1 -1
  16. package/dist/components/form/select/components/MenuList.d.ts +1 -1
  17. package/dist/components/form/select/components/Option.d.ts +3 -3
  18. package/dist/components/form/select/components/Placeholder.d.ts +1 -1
  19. package/dist/components/form/select/components.d.ts +2 -1
  20. package/dist/components/form/select/hooks/useSelectThemeStyles.d.ts +3 -2
  21. package/dist/components/form/select/hooks/useSelectValue.d.ts +6 -6
  22. package/dist/components/form/select/index.d.ts +3 -1
  23. package/dist/components/form/select/select.stories.d.ts +2 -1
  24. package/dist/components/form/select/types.d.ts +5 -5
  25. package/dist/components/form/select/utils.d.ts +1 -1
  26. package/dist/components/form/textArea/components/TextAreaElement.d.ts +2 -2
  27. package/dist/components/form/textArea/components/utils.d.ts +1 -1
  28. package/dist/components/groupedList/index.d.ts +2 -1
  29. package/dist/components/microTag/index.d.ts +2 -2
  30. package/dist/components/tag/index.d.ts +2 -1
  31. package/dist/index.d.ts +6 -6
  32. package/dist/index.esm.js +2 -2
  33. package/dist/index.esm.js.map +1 -1
  34. package/dist/index.js +1 -1
  35. package/dist/index.js.map +1 -1
  36. package/package.json +7 -5
package/CHANGELOG.md ADDED
@@ -0,0 +1,332 @@
1
+ # Changelog
2
+
3
+ ## v0.4.3 - 21/01/2022
4
+
5
+ ### 🐛 Bug Fix
6
+
7
+ - Remove the Checkbox `Label` tag when prop `text` is missing
8
+
9
+ ### 💅 Enhancement
10
+
11
+ - Change Button `text` prop from `string | JSX.Element` to `ReactText | JSX.Element`
12
+
13
+ ## v0.4.2 - 19/01/2022
14
+
15
+ ### 🐛 Bug Fix
16
+
17
+ - Fix Dropdown content appearance animation in Safari (animation removed)
18
+ - Fix absent Select typings
19
+ - Fix Select Option multiline appearance
20
+
21
+ ### 💅 Enhancement
22
+
23
+ - Change all occurrences of `isDisabled` prop to `disabled` for "form" components
24
+
25
+ ## v0.4.1 - 14/01/2022
26
+
27
+ ### 🐛 Bug Fix
28
+
29
+ - Fix a bug during the update of SidebarItem
30
+
31
+ ## v0.4.0 - 15/12/2021
32
+
33
+ ### 💅 Enhancement
34
+
35
+ - Update Storybook to v6
36
+ - Update Rollup to v2
37
+ - Change build configs
38
+
39
+ ## v0.3.24 - 13/12/2021
40
+
41
+ ### 🐛 Bug Fix
42
+
43
+ - Add preventDefault on Dropdown trigger click
44
+
45
+ ## v0.3.23 - 13/12/2021
46
+
47
+ ### 💅 Enhancement
48
+
49
+ - Add href and cmd/ctrl+click on SidebarItem
50
+
51
+ ## v0.3.22 - 30/11/2021
52
+
53
+ ### 🐛 Bug Fix
54
+
55
+ - Move `lint-staged` to devDependencies
56
+
57
+ ## v0.3.21 - 29/11/2021
58
+
59
+ ### 🐛 Bug Fix
60
+
61
+ - Fix bug with Select usage
62
+
63
+ ## v0.3.20 - 22/11/2021
64
+
65
+ ### 🚀 Added
66
+
67
+ - TextArea:
68
+ - Add isResizable prop
69
+ - Add characters counter
70
+ - Add new `Select` components (`Select`, `CreatableSelect`, `AsyncSelect`, `AsyncCreatableSelect`)
71
+
72
+ ### 💅 Enhancement
73
+
74
+ - `InputHelper`'s prop `message` changed type from `string` to `ReactChild`
75
+ - Add `className` to TextArea wrapper
76
+ - Remove `margin-bottom: 1em` from `InputText` and `TextArea` components
77
+ - Update styled-components to v5
78
+ - Add styled-components to `peerDependencies`
79
+
80
+ ### 🐛 Bug Fix
81
+
82
+ - The cursor hovering an Icon will be `pointer` only if the icon has an `onClick` event
83
+ - Fix Tabs component glitch
84
+
85
+ ## v0.3.19 - 02/11/2021
86
+
87
+ ### 🚀 Added
88
+
89
+ - Add SidebarItem customization through `CustomSidebarItemProps` prop
90
+ - Add exports for `SidebarItemProps`
91
+
92
+ ### 💅 Enhancement
93
+
94
+ - Remove deprecated `alignRight` props from Dropdown component
95
+ - The `text` prop in Badge is now a `ReactText`
96
+ - Button `type=text` now supports icons and hover/active state
97
+
98
+ ### 🐛 Bug Fix
99
+
100
+ - Fix click on SidebarItem's Dropdown
101
+
102
+ ## v0.3.18 - 20/10/2021
103
+
104
+ ### 🚀 Added
105
+
106
+ - Add new InputText component
107
+ - Add new InputHelper component
108
+ - Add new TextArea component
109
+
110
+ ### 💅 Enhancement
111
+
112
+ - Add `isDisabled` prop to Icon component
113
+
114
+ ### 🐛 Bug Fix
115
+
116
+ - Close the Tooltip dropdown on click outside
117
+ - Better mobile event handling on Tooltip component (close on scroll page)
118
+ - Add a maximum width to the tooltip dropdown
119
+
120
+ ## v0.3.17 - 06/10/2021
121
+
122
+ ### 🚀 Added
123
+
124
+ - Added new `Stepper` component
125
+ - Added prop `forceOpenDropdown` on SidebarItem component
126
+
127
+ ## v0.3.16 - 29/09/2021
128
+
129
+ ### 🚀 Added
130
+
131
+ - Add new `forceOpen` prop to Dropdown
132
+
133
+ ### 💅 Enhancement
134
+
135
+ - Change SidebarItem height from 40px to 44px
136
+
137
+ ### 🐛 Bug Fix
138
+
139
+ - Fix Tooltip's arrow color
140
+
141
+ ## v0.3.15 - 21/09/2021
142
+
143
+ ### 🚀 Added
144
+
145
+ - Add new SidebarItem component
146
+
147
+ ## v0.3.14 - 02/09/2021
148
+
149
+ ### 🚀 Added
150
+
151
+ - Added new Tooltip component
152
+
153
+ ### 💅 Enhancement
154
+
155
+ - Add `triggerStyles` Dropdown prop
156
+ - Add new `IconBackground` component to support circle background behind icons
157
+
158
+ ## v0.3.13 - 19/08/2021
159
+
160
+ - Add `link` to DropdownItem `type`
161
+
162
+ ## v0.3.12 - 19/08/2021
163
+
164
+ ### 💅 Enhancement
165
+
166
+ - Merged Dropdown interfaces `ContentOption` and `ItemProps` in `DropdownItemProps`
167
+ - Add a part of DropdownPalette
168
+
169
+ ### 🐛 Bug Fix
170
+
171
+ - Add `e.stopPropagation()` on Dropdown trigger click
172
+
173
+ ## v0.3.11 - 16/08/2021
174
+
175
+ ### 💅 Enhancement
176
+
177
+ - DropdownItems doesn't highlight without an `onClick` prop anymore
178
+ - Changed DropdownItems' shortcuts style
179
+
180
+ ## v0.3.10 - 28/07/2021
181
+
182
+ ### 🐛 Bug Fix
183
+
184
+ - Export checkboxPalette interface
185
+ - Added boolean-only support for Checkbox component
186
+
187
+ ### 💅 Enhancement
188
+
189
+ - Change onClick prop type for Checkbox component
190
+
191
+ ## v0.3.9 - 28/07/2021
192
+
193
+ ### 💅 Enhancement
194
+
195
+ - Added boolean values support to Checkbox
196
+
197
+ ### 🐛 Bug Fix
198
+
199
+ - Fix CustomSizeModal width on small screens
200
+
201
+ ## v0.3.8 - 26/07/2021
202
+
203
+ ### 🚀 Added
204
+
205
+ - Added new Checkbox component with Checkbox Palette
206
+
207
+ ### 🐛 Bug Fix
208
+
209
+ - Increased Toast z-index to make it visible while a modal is open
210
+
211
+ ## v0.3.7 - 25/06/2021
212
+
213
+ ### 🚀 Added
214
+
215
+ - Added MicroTag palette
216
+ - Added Icon palette
217
+
218
+ ### 💅 Enhancement
219
+
220
+ - Refactor Palette structure
221
+ - Remove base palette part
222
+ - Use "transparent" css value instead of palette.base.transparent
223
+
224
+ ## v0.3.6 - 04/06/2021
225
+
226
+ ### 💅 Enhancement
227
+
228
+ - Change project linting rules
229
+
230
+ ## v0.3.5 - 03/06/2021
231
+
232
+ ### 🚀 Added
233
+
234
+ - Add export for `closeDropdownType`
235
+
236
+ ### 💅 Enhancement
237
+
238
+ - Remove Dropdown padding with custom content
239
+
240
+ ## v0.3.4 - 26/05/2021
241
+
242
+ ### 🚀 Added
243
+
244
+ - isDisabled prop on IconButton
245
+ - IconButton default types (defaultColor, defaultType) in iconButtonPalette
246
+ - Add `href` and `target` props on Button component
247
+
248
+ ### 💅 Enhancement
249
+
250
+ - Fix buttons appearance on small screens
251
+
252
+ ## v0.3.2 - 19/05/2021
253
+
254
+ ### 🚀 Added
255
+
256
+ - Add fullWidth prop on Button
257
+
258
+ ### 💅 Enhancement
259
+
260
+ - Fix default buttonPalette colors
261
+ - Align iconButton palette names to Button's one
262
+
263
+ ## v0.3.1 - 18/05/2021
264
+
265
+ ### 🚀 Added
266
+
267
+ - New useDebounceClick hook
268
+ - Add new theme object manual configuration
269
+ - Add palette configuration object for:
270
+ - Tag
271
+ - Button
272
+ - IconButton
273
+
274
+ ### 💅 Enhancement
275
+
276
+ - Switch default palette to DIC's palette
277
+ - Button component redone from scratch
278
+ - TextButton merged with Button (type='text')
279
+ - IconButton component redone from scratch
280
+ - Refactor Tag component
281
+
282
+ ## v0.2.9 - 05/05/2021
283
+
284
+ ### 💅 Enhancement
285
+
286
+ - The first render of the "not scrollable" Tabs component now
287
+ shows the scrollable version instead of an empty row with a dropdown
288
+ - Split Tabs component in ScrollableTabs and DropdownTabs
289
+
290
+ ### 🐛 Bug Fix
291
+
292
+ - Actually use the lateralPadding prop in Tabs component
293
+
294
+ ## v0.2.8 - 30/04/2021
295
+
296
+ ### 🐛 Bug Fix
297
+
298
+ - Fixed Dropdowns in Internet Explorer
299
+
300
+ ## v0.2.7 - 07/04/2021
301
+
302
+ ### 🐛 Bug Fix
303
+
304
+ - Fixed dropdown menu openings on Internet Explorer
305
+
306
+ ## v0.2.6 - 10/03/2021
307
+
308
+ ### 🐛 Bug Fix
309
+
310
+ - Change Tag component "style" prop to "tagStyle" to prevent TypeScript error
311
+
312
+ ## v0.2.5 - 04/03/2021
313
+
314
+ ### 💅 Enhancement
315
+
316
+ - Hide Tabs scrollbar if there's enough space for the elements
317
+
318
+ ### 🐛 Bug Fix
319
+
320
+ - Force Tabs component to have height: 100% (prevent component/sidebar overlap)
321
+
322
+ ## v0.2.4 - 03/03/2021
323
+
324
+ ### 🐛 Bug Fix
325
+
326
+ - Fixed Button appearance with empty text
327
+
328
+ ## v0.2.3 - 23/02/2021
329
+
330
+ ### 🐛 Bug Fix
331
+
332
+ - Fixed an error in Tabs causing the page overflow in scrollable mode
@@ -0,0 +1,3 @@
1
+ import { Badge } from './Badge';
2
+ import { BadgeProps } from './types';
3
+ export { Badge, BadgeProps };
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import { ReactText } from 'react';
2
2
  import { IconProps } from '../../icon';
3
3
  import { WrapperProps } from './types';
4
4
  export interface ButtonProps extends Partial<WrapperProps> {
5
- text?: string | JSX.Element;
5
+ text?: ReactText | JSX.Element;
6
6
  iconLeft?: IconProps;
7
7
  iconRight?: IconProps;
8
8
  isLoading?: boolean;
@@ -1,7 +1,7 @@
1
1
  import { checkboxStatus, CheckboxStyles } from '../types';
2
2
  export interface CheckboxInputProps {
3
3
  value: checkboxStatus;
4
- isDisabled?: boolean;
4
+ disabled?: boolean;
5
5
  large?: boolean;
6
6
  hasError: boolean;
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { MappedLabelProps } from '../types';
2
2
  export interface CheckboxLabelProps {
3
3
  large?: boolean;
4
- isDisabled?: boolean;
4
+ disabled?: boolean;
5
5
  hasError: boolean;
6
6
  }
7
7
  declare const Label: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, MappedLabelProps & CheckboxLabelProps, keyof MappedLabelProps>;
@@ -6,11 +6,11 @@ import { checkboxStatus, CheckboxStyles } from './types';
6
6
  interface InputMapParams extends CheckboxInputProps {
7
7
  theme: DefaultTheme;
8
8
  }
9
- export declare const getInputStyle: ({ theme, value, isDisabled, large, hasError }: InputMapParams) => CheckboxStyles;
9
+ export declare const getInputStyle: ({ theme, value, disabled, large, hasError }: InputMapParams) => CheckboxStyles;
10
10
  interface LabelMapProps extends CheckboxLabelProps {
11
11
  theme: DefaultTheme;
12
12
  }
13
- export declare const getLabelStyle: ({ isDisabled, large, theme, hasError }: LabelMapProps) => {
13
+ export declare const getLabelStyle: ({ disabled, large, theme, hasError }: LabelMapProps) => {
14
14
  fontSize: string;
15
15
  cursor: string;
16
16
  opacity: number;
@@ -7,7 +7,7 @@ export declare const statusesArray: string[];
7
7
  export declare type statusType = typeof statusesArray[number];
8
8
  export interface CommonFormTypes {
9
9
  inputSize?: inputSizeType;
10
- isDisabled?: boolean;
10
+ disabled?: boolean;
11
11
  helper?: InputHelperProps;
12
12
  status?: statusType;
13
13
  }
@@ -1,6 +1,6 @@
1
1
  import { BoxedInputWrapperProps } from '../../common/styles';
2
2
  import { InputElementProps } from '../types';
3
- declare const InputElement: ({ autoFocus, onBlur, onChange, value, placeholder, isDisabled, name, inputSize, leadingIcon, onKeyPress, status, onKeyDown, onKeyUp, inputType, onFocus, className, actionIcon, setValue, }: InputElementProps) => JSX.Element;
4
- export declare type InputTextWrapperProps = Pick<InputElementProps, 'isDisabled' | 'status'>;
3
+ declare const InputElement: ({ autoFocus, onBlur, onChange, value, placeholder, disabled, name, inputSize, leadingIcon, onKeyPress, status, onKeyDown, onKeyUp, inputType, onFocus, className, actionIcon, setValue, }: InputElementProps) => JSX.Element;
4
+ export declare type InputTextWrapperProps = Pick<InputElementProps, 'disabled' | 'status'>;
5
5
  export declare type InputTextStyles = Omit<BoxedInputWrapperProps, 'status'>;
6
6
  export default InputElement;
@@ -3,5 +3,5 @@ import { InputTextStyles, InputTextWrapperProps } from './InputElement';
3
3
  interface GetInputTextParams extends InputTextWrapperProps {
4
4
  theme: DefaultTheme;
5
5
  }
6
- export declare const getInputTextStyles: ({ theme, isDisabled, status }: GetInputTextParams) => InputTextStyles;
6
+ export declare const getInputTextStyles: ({ theme, disabled, status }: GetInputTextParams) => InputTextStyles;
7
7
  export {};
@@ -1,9 +1,9 @@
1
1
  export interface LabelProps extends WrapperProps {
2
2
  label?: string;
3
3
  }
4
- declare const Label: ({ label, isDisabled, required }: LabelProps) => JSX.Element | null;
4
+ declare const Label: ({ label, disabled, required }: LabelProps) => JSX.Element | null;
5
5
  interface WrapperProps {
6
- isDisabled?: boolean;
6
+ disabled?: boolean;
7
7
  required?: boolean;
8
8
  }
9
9
  export default Label;
@@ -1,6 +1,6 @@
1
1
  import { OptionType } from './components/Option';
2
2
  import { AsyncCreatableSelectProps, AsyncSelectProps, CreatableSelectProps, SelectProps } from './types';
3
- export declare const Select: <IsMulti extends boolean = false>(props: SelectProps<IsMulti, import("react-select").Props<OptionType, IsMulti, import("react-select").GroupTypeBase<OptionType>>>) => JSX.Element;
4
- export declare const CreatableSelect: <IsMulti extends boolean = false>(props: CreatableSelectProps<IsMulti>) => JSX.Element;
5
- export declare const AsyncSelect: <IsMulti extends boolean = false>(props: AsyncSelectProps<IsMulti>) => JSX.Element;
6
- export declare const AsyncCreatableSelect: <IsMulti extends boolean = false>(props: AsyncCreatableSelectProps<IsMulti>) => JSX.Element;
3
+ export declare const Select: <O extends OptionType = OptionType, IsMulti extends boolean = false>(props: SelectProps<O, IsMulti, import("react-select").Props<O, IsMulti, import("react-select").GroupTypeBase<O>>>) => JSX.Element;
4
+ export declare const CreatableSelect: <O extends OptionType = OptionType, IsMulti extends boolean = false>(props: CreatableSelectProps<O, IsMulti>) => JSX.Element;
5
+ export declare const AsyncSelect: <O extends OptionType = OptionType, IsMulti extends boolean = false>(props: AsyncSelectProps<O, IsMulti>) => JSX.Element;
6
+ export declare const AsyncCreatableSelect: <O extends OptionType = OptionType, IsMulti extends boolean = false>(props: AsyncCreatableSelectProps<O, IsMulti>) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { BoxedInputWrapperProps } from '../common/styles';
2
2
  import { SelectProps } from './types';
3
- export declare type SelectWrapperProps = Pick<SelectProps, 'isDisabled' | 'status' | 'inputSize'>;
3
+ export declare type SelectWrapperProps = Pick<SelectProps, 'disabled' | 'status' | 'inputSize'>;
4
4
  export declare type SelectStyles = Omit<BoxedInputWrapperProps, 'status'>;
5
5
  export declare const SelectWrapper: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, SelectStyles & SelectWrapperProps, "color" | "background" | "borderColor" | "normalFocused">;
@@ -1,4 +1,4 @@
1
1
  import { IndicatorProps } from 'react-select/src/components/indicators';
2
2
  import { OptionType } from './Option';
3
- declare const ClearIndicator: <IsMulti extends boolean = false>({ isDisabled, clearValue, }: IndicatorProps<OptionType, IsMulti, import("react-select").GroupTypeBase<OptionType>>) => JSX.Element;
3
+ declare const ClearIndicator: <O extends OptionType = OptionType, IsMulti extends boolean = false>({ isDisabled, clearValue, }: IndicatorProps<O, IsMulti, import("react-select").GroupTypeBase<O>>) => JSX.Element;
4
4
  export default ClearIndicator;
@@ -1,4 +1,4 @@
1
1
  import { ControlProps } from 'react-select';
2
2
  import { OptionType } from './Option';
3
- declare const Control: <IsMulti extends boolean = false>({ innerProps: { onMouseDown }, children, }: ControlProps<OptionType, IsMulti, import("react-select").GroupTypeBase<OptionType>>) => JSX.Element;
3
+ declare const Control: <O extends OptionType = OptionType, IsMulti extends boolean = false>({ innerProps: { onMouseDown }, children, }: ControlProps<O, IsMulti, import("react-select").GroupTypeBase<O>>) => JSX.Element;
4
4
  export default Control;
@@ -1,4 +1,4 @@
1
1
  import { IndicatorProps } from 'react-select';
2
2
  import { OptionType } from './Option';
3
- declare const DropdownIndicator: <IsMulti extends boolean = false>({ selectProps, }: IndicatorProps<OptionType, IsMulti, import("react-select").GroupTypeBase<OptionType>>) => JSX.Element;
3
+ declare const DropdownIndicator: <O extends OptionType = OptionType, IsMulti extends boolean = false>({ selectProps, }: IndicatorProps<O, IsMulti, import("react-select").GroupTypeBase<O>>) => JSX.Element;
4
4
  export default DropdownIndicator;
@@ -1,4 +1,4 @@
1
1
  import { MenuListComponentProps } from 'react-select/src/components/Menu';
2
2
  import { OptionType } from './Option';
3
- declare const MenuList: <IsMulti extends boolean = false>(props: MenuListComponentProps<OptionType, IsMulti, import("react-select").GroupTypeBase<OptionType>>) => JSX.Element;
3
+ declare const MenuList: <O extends OptionType = OptionType, IsMulti extends boolean = false>(props: MenuListComponentProps<O, IsMulti, import("react-select").GroupTypeBase<O>>) => JSX.Element;
4
4
  export default MenuList;
@@ -4,10 +4,10 @@ import { IconProps } from '../../../icon';
4
4
  export interface OptionType extends OptionTypeBase {
5
5
  icon?: IconProps;
6
6
  label: string;
7
- value: string;
7
+ value: any;
8
8
  }
9
- interface Props<IsMulti extends boolean = false> extends Omit<OptionProps<OptionType, IsMulti>, 'data'> {
9
+ interface Props<O extends OptionType = OptionType, IsMulti extends boolean = false> extends Omit<OptionProps<O, IsMulti>, 'data'> {
10
10
  data: OptionType;
11
11
  }
12
- declare const Option: <IsMulti extends boolean = false>({ innerProps: { onClick }, data: { label, icon }, }: Props<IsMulti>) => JSX.Element;
12
+ declare const Option: <O extends OptionType = OptionType, IsMulti extends boolean = false>({ innerProps: { onClick }, data: { label, icon }, }: Props<O, IsMulti>) => JSX.Element;
13
13
  export default Option;
@@ -1,4 +1,4 @@
1
1
  import { PlaceholderProps } from 'react-select';
2
2
  import { OptionType } from './Option';
3
- declare const Placeholder: <IsMulti extends boolean = false>({ children, }: PlaceholderProps<OptionType, IsMulti, import("react-select").GroupTypeBase<OptionType>>) => JSX.Element;
3
+ declare const Placeholder: <O extends OptionType = OptionType, IsMulti extends boolean = false>({ children, }: PlaceholderProps<O, IsMulti, import("react-select").GroupTypeBase<O>>) => JSX.Element;
4
4
  export default Placeholder;
@@ -1,2 +1,3 @@
1
+ import { OptionType } from './components/Option';
1
2
  import { SelectProps } from './types';
2
- export declare const getCustomComponents: <IsMulti extends boolean = false>() => Partial<import("react-select/src/components").SelectComponents<import("./components/Option").OptionType, IsMulti, import("react-select").GroupTypeBase<import("./components/Option").OptionType>>> | undefined;
3
+ export declare const getCustomComponents: <O extends OptionType = OptionType, IsMulti extends boolean = false>() => Partial<import("react-select/src/components").SelectComponents<O, IsMulti, import("react-select").GroupTypeBase<O>>> | undefined;
@@ -1,8 +1,9 @@
1
1
  import { statusType } from '../../common/types';
2
+ import { OptionType } from '../components/Option';
2
3
  import { SelectProps } from '../types';
3
4
  interface Props {
4
5
  status: statusType;
5
- isDisabled?: boolean;
6
+ disabled?: boolean;
6
7
  }
7
- declare const useSelectThemeStyles: <IsMulti extends boolean = false>({ status, isDisabled, }: Props) => Partial<import("react-select").Styles<import("../components/Option").OptionType, IsMulti, import("react-select").GroupTypeBase<import("../components/Option").OptionType>>> | undefined;
8
+ declare const useSelectThemeStyles: <O extends OptionType = OptionType, IsMulti extends boolean = false>({ status, disabled, }: Props) => Partial<import("react-select").Styles<O, IsMulti, import("react-select").GroupTypeBase<O>>> | undefined;
8
9
  export default useSelectThemeStyles;
@@ -1,11 +1,11 @@
1
1
  import { Dispatch, SetStateAction } from 'react';
2
2
  import { ValueType } from 'react-select';
3
3
  import { OptionType } from '../components/Option';
4
- declare type valueType<IsMulti extends boolean = false> = ValueType<OptionType, IsMulti>;
5
- declare type ReturnType<IsMulti extends boolean = false> = [
6
- valueType<IsMulti> | undefined,
7
- Dispatch<SetStateAction<valueType<IsMulti> | undefined>>
4
+ declare type valueType<O extends OptionType = OptionType, IsMulti extends boolean = false> = ValueType<O, IsMulti>;
5
+ declare type ReturnType<O extends OptionType = OptionType, IsMulti extends boolean = false> = [
6
+ valueType<O, IsMulti> | undefined,
7
+ Dispatch<SetStateAction<valueType<O, IsMulti> | undefined>>
8
8
  ];
9
- export declare const useSelectValue: (initialValue?: valueType) => ReturnType<false>;
10
- export declare const useSelectMultiValues: (initialValue: valueType<true>) => ReturnType<true>;
9
+ export declare const useSelectValue: <O extends OptionType = OptionType>(initialValue?: O | null) => ReturnType<O, false>;
10
+ export declare const useSelectMultiValues: <O extends OptionType = OptionType>(initialValue: import("react-select").OptionsType<O>) => ReturnType<O, true>;
11
11
  export {};
@@ -1,6 +1,8 @@
1
1
  import { SelectActionsType } from './components/FooterActions';
2
+ import { OptionType } from './components/Option';
2
3
  import { useSelectMultiValues, useSelectValue } from './hooks/useSelectValue';
3
4
  import { AsyncCreatableSelect, AsyncSelect, CreatableSelect, Select } from './Select';
4
5
  import selectPalette, { SelectPalette } from './selectPalette';
5
6
  import { AsyncCreatableSelectProps, AsyncSelectProps, CreatableSelectProps, SelectProps } from './types';
6
- export { Select, CreatableSelect, AsyncSelect, AsyncCreatableSelect, SelectProps, AsyncSelectProps, AsyncCreatableSelectProps, CreatableSelectProps, SelectPalette, selectPalette, SelectActionsType, useSelectValue, useSelectMultiValues, };
7
+ declare type SelectComponentsType<O extends OptionType = OptionType, isMulti extends boolean = false> = Required<SelectProps<O, isMulti>['components']>;
8
+ export { Select, CreatableSelect, AsyncSelect, AsyncCreatableSelect, OptionType, SelectProps, AsyncSelectProps, AsyncCreatableSelectProps, CreatableSelectProps, SelectPalette, selectPalette, SelectActionsType, useSelectValue, useSelectMultiValues, SelectComponentsType, };
@@ -1,6 +1,7 @@
1
1
  import { Meta, Story } from '@storybook/react';
2
+ import { OptionType } from './components/Option';
2
3
  import { SelectProps } from './types';
3
4
  export declare const Single: Story<SelectProps>;
4
- export declare const Multi: Story<SelectProps<true>>;
5
+ export declare const Multi: Story<SelectProps<OptionType, true>>;
5
6
  declare const SelectStories: Meta<SelectProps>;
6
7
  export default SelectStories;
@@ -1,11 +1,11 @@
1
1
  import { Props as AsyncProps } from 'react-select/src/Async';
2
2
  import { Props as AsyncCreatableProps } from 'react-select/src/AsyncCreatable';
3
3
  import { Props as CreatableProps } from 'react-select/src/Creatable';
4
- import { Props as ReactSelectProps } from 'react-select/src/Select';
4
+ import { NamedProps, Props as ReactSelectProps } from 'react-select/src/Select';
5
5
  import { CommonFormTypes } from '../common/types';
6
6
  import { LabelProps } from '../label';
7
7
  import { OptionType } from './components/Option';
8
- export declare type SelectProps<isMulti extends boolean = false, T = ReactSelectProps<OptionType, isMulti>> = CommonFormTypes & LabelProps & T;
9
- export declare type CreatableSelectProps<isMulti extends boolean = false> = SelectProps<isMulti, CreatableProps<OptionType, isMulti>>;
10
- export declare type AsyncSelectProps<isMulti extends boolean = false> = SelectProps<isMulti, AsyncProps<OptionType, isMulti>>;
11
- export declare type AsyncCreatableSelectProps<isMulti extends boolean = false> = SelectProps<isMulti, AsyncCreatableProps<OptionType, isMulti>>;
8
+ export declare type SelectProps<O extends OptionType = OptionType, isMulti extends boolean = false, T = ReactSelectProps<O, isMulti>> = CommonFormTypes & LabelProps & T & NamedProps<O, isMulti>;
9
+ export declare type CreatableSelectProps<O extends OptionType = OptionType, isMulti extends boolean = false> = SelectProps<O, isMulti, CreatableProps<O, isMulti>>;
10
+ export declare type AsyncSelectProps<O extends OptionType = OptionType, isMulti extends boolean = false> = SelectProps<O, isMulti, AsyncProps<O, isMulti>>;
11
+ export declare type AsyncCreatableSelectProps<O extends OptionType = OptionType, isMulti extends boolean = false> = SelectProps<O, isMulti, AsyncCreatableProps<O, isMulti>>;
@@ -3,5 +3,5 @@ import { SelectStyles, SelectWrapperProps } from './SelectWrapper';
3
3
  interface GetSelectParams extends SelectWrapperProps {
4
4
  theme: DefaultTheme;
5
5
  }
6
- export declare const getSelectStyles: ({ theme, isDisabled, status }: GetSelectParams) => SelectStyles;
6
+ export declare const getSelectStyles: ({ theme, disabled, status }: GetSelectParams) => SelectStyles;
7
7
  export {};
@@ -1,6 +1,6 @@
1
1
  import { BoxedInputWrapperProps } from '../../common/styles';
2
2
  import { TextAreaElementProps } from '../types';
3
- declare const TextAreaElement: ({ autoFocus, onBlur, onChange, value, placeholder, isDisabled, name, onKeyPress, status, onKeyDown, onKeyUp, onFocus, className, setValue, initialHeight, maxLength, isResizable, showCounter, }: TextAreaElementProps) => JSX.Element;
4
- export declare type TextAreaWrapperProps = Pick<TextAreaElementProps, 'isDisabled' | 'status' | 'initialHeight' | 'isResizable'>;
3
+ declare const TextAreaElement: ({ autoFocus, onBlur, onChange, value, placeholder, disabled, name, onKeyPress, status, onKeyDown, onKeyUp, onFocus, className, setValue, initialHeight, maxLength, isResizable, showCounter, }: TextAreaElementProps) => JSX.Element;
4
+ export declare type TextAreaWrapperProps = Pick<TextAreaElementProps, 'disabled' | 'status' | 'initialHeight' | 'isResizable'>;
5
5
  export declare type TextAreaStyles = Omit<BoxedInputWrapperProps, 'status'>;
6
6
  export default TextAreaElement;
@@ -3,5 +3,5 @@ import { TextAreaStyles, TextAreaWrapperProps } from './TextAreaElement';
3
3
  interface GetTextAreaParams extends TextAreaWrapperProps {
4
4
  theme: DefaultTheme;
5
5
  }
6
- export declare const getTextAreaStyles: ({ theme, isDisabled, status }: GetTextAreaParams) => TextAreaStyles;
6
+ export declare const getTextAreaStyles: ({ theme, disabled, status }: GetTextAreaParams) => TextAreaStyles;
7
7
  export {};
@@ -1,2 +1,3 @@
1
1
  import GroupedList from './groupedList';
2
- export { GroupedList };
2
+ import { GroupType, ItemType } from './types';
3
+ export { GroupedList, ItemType, GroupType };
@@ -1,3 +1,3 @@
1
- import MicroTag from './MicroTag';
1
+ import MicroTag, { MicroTagProps } from './MicroTag';
2
2
  import microTagPalette, { MicroTagPalette } from './microTagPalette';
3
- export { MicroTag, microTagPalette, MicroTagPalette };
3
+ export { MicroTag, MicroTagProps, microTagPalette, MicroTagPalette };
@@ -1,3 +1,4 @@
1
1
  import { Tag } from './Tag';
2
2
  import tagPalette, { TagPalette } from './tagPalette';
3
- export { Tag, tagPalette, TagPalette };
3
+ import { TagProps } from './types';
4
+ export { Tag, TagProps, tagPalette, TagPalette };