@fattureincloud/fic-design-system 0.4.25 → 0.4.28

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