@fattureincloud/fic-design-system 0.4.24 → 0.4.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. package/CHANGELOG.md +508 -0
  2. package/dist/common/components/Label.d.ts +3 -0
  3. package/dist/common/types/label.d.ts +12 -0
  4. package/dist/common/utils/label.d.ts +5 -0
  5. package/dist/components/dropdown/DropdownImpl.d.ts +1 -1
  6. package/dist/components/dropdown/components/DefaultDropdown.d.ts +3 -13
  7. package/dist/components/dropdown/components/DefaultTrigger.d.ts +2 -4
  8. package/dist/components/dropdown/components/Item.d.ts +1 -4
  9. package/dist/components/dropdown/dropdownPalette.d.ts +14 -0
  10. package/dist/components/dropdown/types.d.ts +22 -3
  11. package/dist/components/dropdown/utils.d.ts +1 -1
  12. package/dist/components/form/checkbox/Checkbox.d.ts +12 -14
  13. package/dist/components/form/checkbox/checkbox.stories.d.ts +1 -1
  14. package/dist/components/form/checkbox/checkboxPalette.d.ts +1 -14
  15. package/dist/components/form/checkbox/hooks/useCheckboxValue.d.ts +3 -3
  16. package/dist/components/form/checkbox/index.d.ts +4 -5
  17. package/dist/components/form/checkbox/styled.d.ts +3 -0
  18. package/dist/components/form/checkbox/types.d.ts +45 -8
  19. package/dist/components/form/checkbox/utils.d.ts +5 -16
  20. package/dist/components/form/common/components/ClickableWrapper.d.ts +2 -0
  21. package/dist/components/form/common/components/HiddenInput.d.ts +2 -0
  22. package/dist/components/form/inputText/InputText.d.ts +2 -2
  23. package/dist/components/form/radio/Radio.d.ts +14 -0
  24. package/dist/components/form/radio/hooks/useRadioValue.d.ts +10 -0
  25. package/dist/components/form/radio/index.d.ts +4 -0
  26. package/dist/components/form/radio/radio.stories.d.ts +6 -0
  27. package/dist/components/form/radio/radioPalette.d.ts +3 -0
  28. package/dist/components/form/radio/styled.d.ts +3 -0
  29. package/dist/components/form/radio/types.d.ts +53 -0
  30. package/dist/components/form/radio/utils.d.ts +8 -0
  31. package/dist/components/form/radioGroup/RadioGroup.d.ts +13 -0
  32. package/dist/components/form/radioGroup/index.d.ts +2 -0
  33. package/dist/components/form/radioGroup/radioGroup.stories.d.ts +5 -0
  34. package/dist/components/form/radioGroup/styled.d.ts +2 -0
  35. package/dist/components/form/radioGroup/types.d.ts +16 -0
  36. package/dist/components/inlineMessage/InlineMessage.d.ts +22 -0
  37. package/dist/components/inlineMessage/index.d.ts +3 -0
  38. package/dist/components/inlineMessage/inlineMessage.stories.d.ts +5 -0
  39. package/dist/components/inlineMessage/inlineMessagePalette.d.ts +3 -0
  40. package/dist/components/inlineMessage/styled.d.ts +11 -0
  41. package/dist/components/inlineMessage/types.d.ts +45 -0
  42. package/dist/components/inlineMessage/utils.d.ts +3 -0
  43. package/dist/components/modals/types.d.ts +2 -0
  44. package/dist/components/toast/Toast.d.ts +2 -0
  45. package/dist/components/toast/components/{toastContent.d.ts → ToastContent.d.ts} +10 -13
  46. package/dist/components/toast/index.d.ts +2 -1
  47. package/dist/components/toast/styled.d.ts +9 -0
  48. package/dist/components/toast/toast.stories.d.ts +3 -4
  49. package/dist/components/toast/toastPalette.d.ts +3 -0
  50. package/dist/components/toast/types.d.ts +50 -0
  51. package/dist/components/toast/utils.d.ts +3 -0
  52. package/dist/index.d.ts +6 -6
  53. package/dist/index.esm.js +5 -5
  54. package/dist/index.esm.js.map +1 -1
  55. package/dist/index.js +4 -4
  56. package/dist/index.js.map +1 -1
  57. package/dist/styles/theme.d.ts +6 -0
  58. package/package.json +1 -1
  59. package/dist/components/form/datepicker/StyledDatePicker.d.ts +0 -1
  60. package/dist/components/form/datepicker/hooks/useDatePickerValues.d.ts +0 -13
  61. package/dist/components/form/select/components/Placeholder.d.ts +0 -4
  62. package/dist/components/table/components/ActionsCell.d.ts +0 -10
  63. package/dist/components/table/components/SortIndicator.d.ts +0 -6
  64. package/dist/components/table/components/TableBody.d.ts +0 -14
  65. package/dist/components/table/components/TableFoot.d.ts +0 -2
  66. package/dist/components/table/components/TableHeader.d.ts +0 -7
  67. package/dist/components/table/components/tableBody/TableBodyLoader.d.ts +0 -7
  68. package/dist/components/table/components/tableBody/styled.d.ts +0 -3
  69. package/dist/components/toast/toast.d.ts +0 -2
package/CHANGELOG.md ADDED
@@ -0,0 +1,508 @@
1
+ # Changelog
2
+
3
+ ## v0.4.27 - 24/08/2022
4
+
5
+ ### 💥 Breaking
6
+
7
+ - RadioButton replaced with Radio
8
+ - RadioButtonGroup replaced with RadioGroup
9
+
10
+ ### 🚀 Added
11
+
12
+ - RadioGroup selection handled
13
+ - Radio palette
14
+ - InlineMessage palette
15
+ - InlineMessage action button
16
+
17
+ ### 🐛 Bug Fix
18
+
19
+ - Fix Toast icon graphical appearance
20
+
21
+ ### 💅 Enhancement
22
+
23
+ - InlineMessageType and ToastType exported enums
24
+
25
+ ## v0.4.26 - 16/08/2022
26
+
27
+ - Aggiunte props `emptyState` e `isDisabled` in Dropdown
28
+ - Rimossa prop `isSmall` da Dropdown
29
+
30
+ ## v0.4.25 - 11/08/2022
31
+
32
+ - Aggiunte prop su modale per nascondere backdrop e poter modificare lo stile del portal
33
+
34
+ ## v0.4.24 - 10/08/2022
35
+
36
+ - Implementata possibilità di poter passare prop hideAfterSeconds sul tooltip
37
+
38
+ ## v0.4.23 - 09/08/2022
39
+
40
+ - Implementata possibilità di poter usare un tooltip nel componente InputText
41
+ - Implementata possibilità di poter usare un tooltip nel componente Tabs
42
+
43
+ ## v0.4.22 - 02/08/2022
44
+
45
+ - Fixato placeholder nel componente DatePicker, che ora prende il valore dalle props oppure assume quello del giorno corrente
46
+ - I giorni non selezionabili del DatePicker ora si distinguono per colore
47
+ - Piccolo fix grafico alle voci della sidebar che contengono un badge
48
+
49
+ ## v0.4.21 - 26/07/2022
50
+
51
+ - Refactor component Toast
52
+
53
+ ## v0.4.20 - 13/07/2022
54
+
55
+ - Bugfix di useUpDownKeyNavigation, premendo ENTER venivano intercettati altri comportamenti in altri componenti
56
+
57
+ ## v0.4.19 - 28/06/2022
58
+
59
+ - Aggiunta la possibilità di usare le frecce per selezionare una riga nella Table o un'opzione nel Dropdown
60
+ - Aggiunto export del componente Spinner
61
+
62
+ ## v0.4.18
63
+
64
+ - Rimossa prop disabled dal componente Select perché ridondante
65
+
66
+ ## v0.4.17
67
+
68
+ - Fixato l'hook useFormattedDate del componente DatePicker
69
+
70
+ ## v0.4.16 - 18/05/2022
71
+
72
+ ### 🚀 Added
73
+
74
+ - Implementata prop "fixedHeight" in componente FileUploader
75
+
76
+ ### 🚀 Bugfix
77
+
78
+ - Modificato il border bottom dell’header in maniera che sia più chiaro, sistemato le icone di ordinamento
79
+ - Fixato stile Dropdown
80
+ - Fixato font in storybook usando "Inter UI"
81
+
82
+ ## v0.4.15 - 17/05/2022
83
+
84
+ ### 🚀 Bugfix
85
+
86
+ - Fixed style "min-height" if prop isSmall is true on component ConfirmationModal
87
+
88
+ ## v0.4.14 - 12/05/2022
89
+
90
+ ### 🚀 Added
91
+
92
+ - Added new prop pageSize on component Table
93
+
94
+ ## v0.4.13 - 05/05/2022
95
+
96
+ ### 🚀 Added
97
+
98
+ - Added new prop maxFileSize on component FileUploader
99
+
100
+ ### 🐛 Bug Fix
101
+
102
+ - Fix placeholder in Select component style bug
103
+
104
+ ## v0.4.12 - 03/05/2022
105
+
106
+ ### 🐛 Bug Fix
107
+
108
+ - Fix placeholder in Select component, the cursor was at the end of the placeholder
109
+ - Fix Table LoadingCell
110
+
111
+ ## v0.4.11 - 12/04/2022
112
+
113
+ ### 🐛 Bug Fix
114
+
115
+ - Fix text color to 900 in component InlineMessage
116
+
117
+ ## v.0.4.10 - 08/04/2022
118
+
119
+ ### 🚀 Added
120
+
121
+ - Added new component DatePicker
122
+ - Added new features in component Table
123
+ - Added backgroundColor in palette for component FileUploader and fixed file type mappings to manage "p7m" extension
124
+
125
+ ## v0.4.9 - 23/02/2022
126
+
127
+ ### 🐛 Bug Fix
128
+
129
+ - Fix FontAwesome version
130
+
131
+ ## v0.4.8 - 23/02/2022
132
+
133
+ ### 🐛 Bug Fix
134
+
135
+ - Downgrade FontAwesome to v5 due to browser compatibility issues
136
+
137
+ ## v0.4.7 - 22/02/2022
138
+
139
+ ### 🚀 Added
140
+
141
+ - Add new FileUploader component
142
+ - Add new Table component
143
+
144
+ ### 🐛 Bug Fix
145
+
146
+ - Fix appearance of multiline (long) Select Options
147
+
148
+ ## v0.4.6 - 15/02/2022
149
+
150
+ ### 🚀 Added
151
+
152
+ - Add `customHeader` and `customFooter` props to Modal
153
+ - Add `isPrefilled` prop to InputText, TextArea and Select components
154
+ - Add `isTransparent` prop to Select and InputText components
155
+ - Add `customStyles` prop to Select component
156
+ - Add UnitDropdown to InputText
157
+ - Add `ref` prop to InputText component
158
+ - Add Select `simpleValue` prop and `useSelectSimpleValue` hook
159
+
160
+ ### 🐛 Bug Fix
161
+
162
+ - Fix Accordion graphical appearance (CSS)
163
+
164
+ ### 💅 Enhancement
165
+
166
+ - Add `JSX.Element` to label prop type in form components
167
+ - Remove up and down arrows on `input[type=number]`
168
+
169
+ ## v0.4.5 - 08/02/2022
170
+
171
+ - Update FontAwesome to v6.0.0 (Downgraded to v5 in v0.4.8)
172
+
173
+ ## v0.4.4 - 25/01/2022
174
+
175
+ ### 🐛 Bug Fix
176
+
177
+ - Move SidebarItem Dropdown on the left in Safari
178
+
179
+ ## v0.4.3 - 21/01/2022
180
+
181
+ ### 🐛 Bug Fix
182
+
183
+ - Remove the Checkbox `Label` tag when prop `text` is missing
184
+
185
+ ### 💅 Enhancement
186
+
187
+ - Change Button `text` prop from `string | JSX.Element` to `ReactText | JSX.Element`
188
+
189
+ ## v0.4.2 - 19/01/2022
190
+
191
+ ### 🐛 Bug Fix
192
+
193
+ - Fix Dropdown content appearance animation in Safari (animation removed)
194
+ - Fix absent Select typings
195
+ - Fix Select Option multiline appearance
196
+
197
+ ### 💅 Enhancement
198
+
199
+ - Change all occurrences of `isDisabled` prop to `disabled` for "form" components
200
+
201
+ ## v0.4.1 - 14/01/2022
202
+
203
+ ### 🐛 Bug Fix
204
+
205
+ - Fix a bug during the update of SidebarItem
206
+
207
+ ## v0.4.0 - 15/12/2021
208
+
209
+ ### 💅 Enhancement
210
+
211
+ - Update Storybook to v6
212
+ - Update Rollup to v2
213
+ - Change build configs
214
+
215
+ ## v0.3.24 - 13/12/2021
216
+
217
+ ### 🐛 Bug Fix
218
+
219
+ - Add preventDefault on Dropdown trigger click
220
+
221
+ ## v0.3.23 - 13/12/2021
222
+
223
+ ### 💅 Enhancement
224
+
225
+ - Add href and cmd/ctrl+click on SidebarItem
226
+
227
+ ## v0.3.22 - 30/11/2021
228
+
229
+ ### 🐛 Bug Fix
230
+
231
+ - Move `lint-staged` to devDependencies
232
+
233
+ ## v0.3.21 - 29/11/2021
234
+
235
+ ### 🐛 Bug Fix
236
+
237
+ - Fix bug with Select usage
238
+
239
+ ## v0.3.20 - 22/11/2021
240
+
241
+ ### 🚀 Added
242
+
243
+ - TextArea:
244
+ - Add isResizable prop
245
+ - Add characters counter
246
+ - Add new `Select` components (`Select`, `CreatableSelect`, `AsyncSelect`, `AsyncCreatableSelect`)
247
+
248
+ ### 💅 Enhancement
249
+
250
+ - `InputHelper`'s prop `message` changed type from `string` to `ReactChild`
251
+ - Add `className` to TextArea wrapper
252
+ - Remove `margin-bottom: 1em` from `InputText` and `TextArea` components
253
+ - Update styled-components to v5
254
+ - Add styled-components to `peerDependencies`
255
+
256
+ ### 🐛 Bug Fix
257
+
258
+ - The cursor hovering an Icon will be `pointer` only if the icon has an `onClick` event
259
+ - Fix Tabs component glitch
260
+
261
+ ## v0.3.19 - 02/11/2021
262
+
263
+ ### 🚀 Added
264
+
265
+ - Add SidebarItem customization through `CustomSidebarItemProps` prop
266
+ - Add exports for `SidebarItemProps`
267
+
268
+ ### 💅 Enhancement
269
+
270
+ - Remove deprecated `alignRight` props from Dropdown component
271
+ - The `text` prop in Badge is now a `ReactText`
272
+ - Button `type=text` now supports icons and hover/active state
273
+
274
+ ### 🐛 Bug Fix
275
+
276
+ - Fix click on SidebarItem's Dropdown
277
+
278
+ ## v0.3.18 - 20/10/2021
279
+
280
+ ### 🚀 Added
281
+
282
+ - Add new InputText component
283
+ - Add new InputHelper component
284
+ - Add new TextArea component
285
+
286
+ ### 💅 Enhancement
287
+
288
+ - Add `isDisabled` prop to Icon component
289
+
290
+ ### 🐛 Bug Fix
291
+
292
+ - Close the Tooltip dropdown on click outside
293
+ - Better mobile event handling on Tooltip component (close on scroll page)
294
+ - Add a maximum width to the tooltip dropdown
295
+
296
+ ## v0.3.17 - 06/10/2021
297
+
298
+ ### 🚀 Added
299
+
300
+ - Added new `Stepper` component
301
+ - Added prop `forceOpenDropdown` on SidebarItem component
302
+
303
+ ## v0.3.16 - 29/09/2021
304
+
305
+ ### 🚀 Added
306
+
307
+ - Add new `forceOpen` prop to Dropdown
308
+
309
+ ### 💅 Enhancement
310
+
311
+ - Change SidebarItem height from 40px to 44px
312
+
313
+ ### 🐛 Bug Fix
314
+
315
+ - Fix Tooltip's arrow color
316
+
317
+ ## v0.3.15 - 21/09/2021
318
+
319
+ ### 🚀 Added
320
+
321
+ - Add new SidebarItem component
322
+
323
+ ## v0.3.14 - 02/09/2021
324
+
325
+ ### 🚀 Added
326
+
327
+ - Added new Tooltip component
328
+
329
+ ### 💅 Enhancement
330
+
331
+ - Add `triggerStyles` Dropdown prop
332
+ - Add new `IconBackground` component to support circle background behind icons
333
+
334
+ ## v0.3.13 - 19/08/2021
335
+
336
+ - Add `link` to DropdownItem `type`
337
+
338
+ ## v0.3.12 - 19/08/2021
339
+
340
+ ### 💅 Enhancement
341
+
342
+ - Merged Dropdown interfaces `ContentOption` and `ItemProps` in `DropdownItemProps`
343
+ - Add a part of DropdownPalette
344
+
345
+ ### 🐛 Bug Fix
346
+
347
+ - Add `e.stopPropagation()` on Dropdown trigger click
348
+
349
+ ## v0.3.11 - 16/08/2021
350
+
351
+ ### 💅 Enhancement
352
+
353
+ - DropdownItems doesn't highlight without an `onClick` prop anymore
354
+ - Changed DropdownItems' shortcuts style
355
+
356
+ ## v0.3.10 - 28/07/2021
357
+
358
+ ### 🐛 Bug Fix
359
+
360
+ - Export checkboxPalette interface
361
+ - Added boolean-only support for Checkbox component
362
+
363
+ ### 💅 Enhancement
364
+
365
+ - Change onClick prop type for Checkbox component
366
+
367
+ ## v0.3.9 - 28/07/2021
368
+
369
+ ### 💅 Enhancement
370
+
371
+ - Added boolean values support to Checkbox
372
+
373
+ ### 🐛 Bug Fix
374
+
375
+ - Fix CustomSizeModal width on small screens
376
+
377
+ ## v0.3.8 - 26/07/2021
378
+
379
+ ### 🚀 Added
380
+
381
+ - Added new Checkbox component with Checkbox Palette
382
+
383
+ ### 🐛 Bug Fix
384
+
385
+ - Increased Toast z-index to make it visible while a modal is open
386
+
387
+ ## v0.3.7 - 25/06/2021
388
+
389
+ ### 🚀 Added
390
+
391
+ - Added MicroTag palette
392
+ - Added Icon palette
393
+
394
+ ### 💅 Enhancement
395
+
396
+ - Refactor Palette structure
397
+ - Remove base palette part
398
+ - Use "transparent" css value instead of palette.base.transparent
399
+
400
+ ## v0.3.6 - 04/06/2021
401
+
402
+ ### 💅 Enhancement
403
+
404
+ - Change project linting rules
405
+
406
+ ## v0.3.5 - 03/06/2021
407
+
408
+ ### 🚀 Added
409
+
410
+ - Add export for `closeDropdownType`
411
+
412
+ ### 💅 Enhancement
413
+
414
+ - Remove Dropdown padding with custom content
415
+
416
+ ## v0.3.4 - 26/05/2021
417
+
418
+ ### 🚀 Added
419
+
420
+ - isDisabled prop on IconButton
421
+ - IconButton default types (defaultColor, defaultType) in iconButtonPalette
422
+ - Add `href` and `target` props on Button component
423
+
424
+ ### 💅 Enhancement
425
+
426
+ - Fix buttons appearance on small screens
427
+
428
+ ## v0.3.2 - 19/05/2021
429
+
430
+ ### 🚀 Added
431
+
432
+ - Add fullWidth prop on Button
433
+
434
+ ### 💅 Enhancement
435
+
436
+ - Fix default buttonPalette colors
437
+ - Align iconButton palette names to Button's one
438
+
439
+ ## v0.3.1 - 18/05/2021
440
+
441
+ ### 🚀 Added
442
+
443
+ - New useDebounceClick hook
444
+ - Add new theme object manual configuration
445
+ - Add palette configuration object for:
446
+ - Tag
447
+ - Button
448
+ - IconButton
449
+
450
+ ### 💅 Enhancement
451
+
452
+ - Switch default palette to DIC's palette
453
+ - Button component redone from scratch
454
+ - TextButton merged with Button (type='text')
455
+ - IconButton component redone from scratch
456
+ - Refactor Tag component
457
+
458
+ ## v0.2.9 - 05/05/2021
459
+
460
+ ### 💅 Enhancement
461
+
462
+ - The first render of the "not scrollable" Tabs component now
463
+ shows the scrollable version instead of an empty row with a dropdown
464
+ - Split Tabs component in ScrollableTabs and DropdownTabs
465
+
466
+ ### 🐛 Bug Fix
467
+
468
+ - Actually use the lateralPadding prop in Tabs component
469
+
470
+ ## v0.2.8 - 30/04/2021
471
+
472
+ ### 🐛 Bug Fix
473
+
474
+ - Fixed Dropdowns in Internet Explorer
475
+
476
+ ## v0.2.7 - 07/04/2021
477
+
478
+ ### 🐛 Bug Fix
479
+
480
+ - Fixed dropdown menu openings on Internet Explorer
481
+
482
+ ## v0.2.6 - 10/03/2021
483
+
484
+ ### 🐛 Bug Fix
485
+
486
+ - Change Tag component "style" prop to "tagStyle" to prevent TypeScript error
487
+
488
+ ## v0.2.5 - 04/03/2021
489
+
490
+ ### 💅 Enhancement
491
+
492
+ - Hide Tabs scrollbar if there's enough space for the elements
493
+
494
+ ### 🐛 Bug Fix
495
+
496
+ - Force Tabs component to have height: 100% (prevent component/sidebar overlap)
497
+
498
+ ## v0.2.4 - 03/03/2021
499
+
500
+ ### 🐛 Bug Fix
501
+
502
+ - Fixed Button appearance with empty text
503
+
504
+ ## v0.2.3 - 23/02/2021
505
+
506
+ ### 🐛 Bug Fix
507
+
508
+ - Fixed an error in Tabs causing the page overflow in scrollable mode
@@ -0,0 +1,3 @@
1
+ import { LabelProps, MappedLabelProps } from '../types/label';
2
+ declare const Label: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, MappedLabelProps & LabelProps, keyof MappedLabelProps>;
3
+ export default Label;
@@ -0,0 +1,12 @@
1
+ import { paletteColor } from '../../styles/types';
2
+ export interface LabelProps {
3
+ large?: boolean;
4
+ disabled?: boolean;
5
+ hasError: boolean;
6
+ }
7
+ export interface MappedLabelProps {
8
+ fontSize: string;
9
+ cursor: string;
10
+ color: paletteColor;
11
+ opacity: number;
12
+ }
@@ -0,0 +1,5 @@
1
+ import { DefaultTheme } from 'styled-components';
2
+ import { LabelProps, MappedLabelProps } from '../types/label';
3
+ export declare const getLabelStyle: ({ disabled, large, theme, hasError, }: LabelProps & {
4
+ theme: DefaultTheme;
5
+ }) => MappedLabelProps;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { DropdownProps } from './types';
3
- declare const DropdownImpl: ({ className, content, fullWidth, maxWidth, minWidthAsTrigger, placement, renderContent, renderTrigger, triggerStyles, title, forceOpen, disableArrowNavigation, maxHeight, isSmall, }: DropdownProps) => JSX.Element;
3
+ declare const DropdownImpl: ({ className, content, fullWidth, maxWidth, maxHeight, minWidthAsTrigger, placement, renderContent, renderTrigger, triggerStyles, title, forceOpen, disableArrowNavigation, isDisabled, emptyState, }: DropdownProps) => JSX.Element;
4
4
  export default DropdownImpl;
@@ -1,14 +1,4 @@
1
- import React from 'react';
2
- import { DropdownItemProps, DropdownProps } from '../types';
3
- interface Props {
4
- closeDropdown: () => void;
5
- componentId: string;
6
- content: DropdownItemProps[];
7
- disableArrowNavigation: boolean;
8
- fullWidth: DropdownProps['fullWidth'];
9
- maxWidth: DropdownProps['maxWidth'];
10
- rowHasFocus: boolean;
11
- setHighlightedItem: React.Dispatch<React.SetStateAction<number>>;
12
- }
13
- declare const DefaultDropdown: ({ closeDropdown, componentId, content, fullWidth, maxWidth, rowHasFocus, setHighlightedItem, }: Props) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { DefaultDropdownProps } from '../types';
3
+ declare const DefaultDropdown: ({ closeDropdown, componentId, content, fullWidth, maxWidth, rowHasFocus, setHighlightedItem, emptyState, }: DefaultDropdownProps) => JSX.Element;
14
4
  export default DefaultDropdown;
@@ -1,6 +1,4 @@
1
1
  /// <reference types="react" />
2
- export interface DropdownTriggerProps {
3
- title: string;
4
- }
5
- declare const DefaultTrigger: ({ title }: DropdownTriggerProps) => JSX.Element;
2
+ import { DropdownTriggerProps } from '../types';
3
+ declare const DefaultTrigger: ({ title, isDisabled }: DropdownTriggerProps) => JSX.Element;
6
4
  export default DefaultTrigger;
@@ -1,12 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { DropdownItemProps } from '../types';
2
+ import { DropdownItemProps, StyledItemProps } from '../types';
3
3
  import { DropdownItemStyles } from '../utils';
4
4
  declare const Item: ({ active, className, componentId, icon, isDisabled, onClick, rowHasFocus, shortcut, text, ...rest }: DropdownItemProps & {
5
5
  componentId?: string | undefined;
6
6
  rowHasFocus?: boolean | undefined;
7
7
  }) => JSX.Element;
8
- export interface StyledItemProps extends Pick<DropdownItemProps, 'fullWidth' | 'maxWidth' | 'active' | 'isDisabled' | 'type'> {
9
- rowHasFocus: boolean;
10
- }
11
8
  export declare const StyledItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, DropdownItemStyles & StyledItemProps, keyof DropdownItemStyles>;
12
9
  export default Item;
@@ -11,8 +11,22 @@ interface ItemPalette {
11
11
  active: ItemColors;
12
12
  notActive: NotActiveItemPalette;
13
13
  }
14
+ interface TitlePalette {
15
+ color: paletteColor;
16
+ }
17
+ interface SeparatorPalette {
18
+ color: paletteColor;
19
+ }
20
+ interface ShortcutPalette {
21
+ color: paletteColor;
22
+ }
14
23
  export interface DropdownPalette {
24
+ color: paletteColor;
25
+ backgroundColor: paletteColor;
15
26
  items: ItemPalette;
27
+ title: TitlePalette;
28
+ separator: SeparatorPalette;
29
+ shortcut: ShortcutPalette;
16
30
  }
17
31
  declare const dropdownPalette: DropdownPalette;
18
32
  export default dropdownPalette;
@@ -14,14 +14,15 @@ export declare type DropdownProps = {
14
14
  triggerStyles?: CSSProperties;
15
15
  content?: DropdownItemProps[];
16
16
  renderContent?: renderContentType;
17
- maxWidth?: string;
17
+ maxWidth?: string | number;
18
+ maxHeight?: string | number;
18
19
  fullWidth?: boolean;
19
20
  placement?: Placement;
20
21
  minWidthAsTrigger?: boolean;
21
22
  forceOpen?: boolean;
22
23
  disableArrowNavigation?: boolean;
23
- isSmall?: boolean;
24
- maxHeight?: number;
24
+ isDisabled?: boolean;
25
+ emptyState?: JSX.Element;
25
26
  };
26
27
  export declare type DropdownItemType = 'default' | 'danger' | 'success' | 'warning' | 'link';
27
28
  export interface DropdownItemProps {
@@ -54,3 +55,21 @@ export interface Dropdown {
54
55
  UserListItem: React.FC<UserListItemProps>;
55
56
  Title: React.FC<TitleProps>;
56
57
  }
58
+ export interface DefaultDropdownProps {
59
+ closeDropdown: () => void;
60
+ componentId: string;
61
+ content: DropdownItemProps[];
62
+ disableArrowNavigation: boolean;
63
+ fullWidth: DropdownProps['fullWidth'];
64
+ maxWidth: DropdownProps['maxWidth'];
65
+ rowHasFocus: boolean;
66
+ setHighlightedItem: React.Dispatch<React.SetStateAction<number>>;
67
+ emptyState?: JSX.Element;
68
+ }
69
+ export interface DropdownTriggerProps {
70
+ title: string;
71
+ isDisabled?: boolean;
72
+ }
73
+ export interface StyledItemProps extends Pick<DropdownItemProps, 'fullWidth' | 'maxWidth' | 'active' | 'isDisabled' | 'type'> {
74
+ rowHasFocus: boolean;
75
+ }
@@ -1,6 +1,6 @@
1
1
  import { DefaultTheme } from 'styled-components';
2
2
  import { paletteColor } from '../../styles/types';
3
- import { StyledItemProps } from './components/Item';
3
+ import { StyledItemProps } from './types';
4
4
  interface GetDropdownItemStylesParams extends StyledItemProps {
5
5
  theme: DefaultTheme;
6
6
  }
@@ -1,16 +1,14 @@
1
- import { ChangeEvent, InputHTMLAttributes } from 'react';
2
- import { InputHelperProps } from '../inputHelper';
3
- import { CheckboxInputProps } from './components/Input';
4
- import { CheckboxLabelProps } from './components/Label';
5
- interface CheckboxImplProps extends Omit<CheckboxInputProps, 'hasError'>, Omit<CheckboxLabelProps, 'hasError'> {
6
- onClick?: (e: ChangeEvent<HTMLInputElement>) => void;
7
- text?: string;
8
- helper?: InputHelperProps;
9
- className?: string;
10
- onChange?: InputHTMLAttributes<HTMLInputElement>['onChange'];
11
- }
12
- export interface CheckboxProps extends Omit<CheckboxImplProps, 'value'> {
13
- value: CheckboxImplProps['value'] | boolean;
14
- }
1
+ /// <reference types="react" />
2
+ import { CheckboxProps } from './types';
3
+ /**
4
+ * Component Props:
5
+ * @param {string} className To support styled-components customization
6
+ * @param {boolean} disabled Checkbox interaction disabled
7
+ * @param {InputHelperProps} helper Render an error form box when necessary
8
+ * @param {boolean} large Improve Checkbox size
9
+ * @param {function} onClick Callback called on component click
10
+ * @param {string} text Component label text
11
+ * @param {CheckboxStatus} value Checkbox status
12
+ */
15
13
  declare const Checkbox: ({ value, ...rest }: CheckboxProps) => JSX.Element;
16
14
  export default Checkbox;
@@ -1,5 +1,5 @@
1
1
  import { Meta, Story } from '@storybook/react';
2
- import { CheckboxProps } from './Checkbox';
2
+ import { CheckboxProps } from './types';
3
3
  export declare const WithStatus: Story<CheckboxProps>;
4
4
  export declare const WithBoolean: Story<CheckboxProps>;
5
5
  declare const CheckboxStories: Meta<CheckboxProps>;