@fattureincloud/fic-design-system 0.4.19 → 0.4.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. package/CHANGELOG.md +468 -0
  2. package/dist/common/components/Spinner.d.ts +1 -0
  3. package/dist/components/dropdown/DropdownImpl.d.ts +1 -0
  4. package/dist/components/dropdown/components/DefaultTrigger.d.ts +1 -0
  5. package/dist/components/dropdown/components/Item.d.ts +1 -0
  6. package/dist/components/floatingBadge/withBadge.d.ts +1 -0
  7. package/dist/components/form/datepicker/DatePicker.d.ts +10 -3
  8. package/dist/components/form/datepicker/DatePickerImpl.d.ts +2 -23
  9. package/dist/components/form/datepicker/components/CustomButton.d.ts +1 -0
  10. package/dist/components/form/datepicker/components/DatePickerHeader.d.ts +1 -0
  11. package/dist/components/form/datepicker/components/MonthPicker.d.ts +1 -0
  12. package/dist/components/form/datepicker/components/YearPicker.d.ts +1 -0
  13. package/dist/components/form/datepicker/components/hooks/useDatePickerHeaderShowLogic.d.ts +2 -2
  14. package/dist/components/form/datepicker/datePickerPalette.d.ts +5 -5
  15. package/dist/components/form/datepicker/datepicker.stories.d.ts +1 -1
  16. package/dist/components/form/datepicker/index.d.ts +5 -5
  17. package/dist/components/form/datepicker/styled.d.ts +3 -0
  18. package/dist/components/form/datepicker/types.d.ts +28 -3
  19. package/dist/components/form/fileUploader/FileUploader.d.ts +1 -0
  20. package/dist/components/form/inputText/components/StatusIcon.d.ts +1 -0
  21. package/dist/components/form/inputText/components/UnitDropdown.d.ts +1 -0
  22. package/dist/components/form/inputText/components/unitDropdown/UnitDropdownTrigger.d.ts +1 -0
  23. package/dist/components/form/select/Select.d.ts +1 -0
  24. package/dist/components/form/select/components/ClearIndicator.d.ts +1 -0
  25. package/dist/components/form/select/components/Control.d.ts +1 -0
  26. package/dist/components/form/select/components/DropdownIndicator.d.ts +1 -0
  27. package/dist/components/form/select/components/FooterActions.d.ts +1 -0
  28. package/dist/components/form/select/components/MenuList.d.ts +1 -0
  29. package/dist/components/form/select/components/Option.d.ts +1 -0
  30. package/dist/components/form/textArea/TextArea.d.ts +1 -0
  31. package/dist/components/form/textArea/components/CharCounter.d.ts +1 -0
  32. package/dist/components/form/textArea/components/TextAreaElement.d.ts +1 -0
  33. package/dist/components/icon/Icon.d.ts +1 -0
  34. package/dist/components/layout/sidebarItem/components/SidebarItemDropdown.d.ts +1 -0
  35. package/dist/components/microTag/MicroTag.d.ts +1 -0
  36. package/dist/components/stepper/Stepper.d.ts +1 -0
  37. package/dist/components/stepper/components/StepItem.d.ts +1 -0
  38. package/dist/components/table/components/Pagination.d.ts +1 -0
  39. package/dist/components/table/components/SelectedRowsCount.d.ts +1 -0
  40. package/dist/components/table/components/actions/DropdownActions.d.ts +1 -0
  41. package/dist/components/table/components/actions/PrimaryAction.d.ts +1 -0
  42. package/dist/components/table/components/checkboxes/Cell.d.ts +1 -0
  43. package/dist/components/table/components/checkboxes/Header.d.ts +1 -0
  44. package/dist/components/table/components/loadingCell/LoadingCell.d.ts +1 -0
  45. package/dist/components/table/components/pagination/PaginationButtons.d.ts +1 -0
  46. package/dist/components/table/components/tableHeader/SortIndicator.d.ts +1 -0
  47. package/dist/components/table/components/tableHeader/TableHeader.d.ts +1 -0
  48. package/dist/components/table/stories/components/CustomPerson.d.ts +1 -0
  49. package/dist/components/table/stories/components/Role.d.ts +1 -0
  50. package/dist/components/tabs/dropdownTabs/TabsDropdown.d.ts +1 -0
  51. package/dist/components/tabs/dropdownTabs/TabsDropdownTrigger.d.ts +1 -0
  52. package/dist/components/tabs/dropdownTabs.d.ts +1 -0
  53. package/dist/components/tabs/scrollableTabs.d.ts +1 -0
  54. package/dist/components/toast/Toast.d.ts +2 -0
  55. package/dist/components/toast/components/ToastContent.d.ts +17 -0
  56. package/dist/components/toast/index.d.ts +2 -3
  57. package/dist/components/toast/typings/toast.d.ts +2 -0
  58. package/dist/index.esm.js +5 -5
  59. package/dist/index.esm.js.map +1 -1
  60. package/dist/index.js +2 -2
  61. package/dist/index.js.map +1 -1
  62. package/package.json +1 -1
  63. package/dist/components/form/datepicker/StyledDatePicker.d.ts +0 -1
  64. package/dist/components/form/datepicker/hooks/useDatePickerValues.d.ts +0 -13
  65. package/dist/components/form/select/components/Placeholder.d.ts +0 -4
  66. package/dist/components/table/components/ActionsCell.d.ts +0 -10
  67. package/dist/components/table/components/SortIndicator.d.ts +0 -6
  68. package/dist/components/table/components/TableBody.d.ts +0 -14
  69. package/dist/components/table/components/TableFoot.d.ts +0 -2
  70. package/dist/components/table/components/TableHeader.d.ts +0 -7
  71. package/dist/components/table/components/tableBody/TableBodyLoader.d.ts +0 -7
  72. package/dist/components/table/components/tableBody/styled.d.ts +0 -3
  73. package/dist/components/toast/components/toastContent.d.ts +0 -8
  74. package/dist/components/toast/toast.d.ts +0 -9
package/CHANGELOG.md ADDED
@@ -0,0 +1,468 @@
1
+ # Changelog
2
+
3
+ ## v0.4.22 - 02/08/2022
4
+
5
+ - Fixato placeholder nel componente DatePicker, che ora prende il valore dalle props oppure assume quello del giorno corrente
6
+ - I giorni non selezionabili del DatePicker ora si distinguono per colore
7
+ - Piccolo fix grafico alle voci della sidebar che contengono un badge
8
+
9
+ ## v0.4.21 - 26/07/2022
10
+
11
+ - Refactor component Toast
12
+
13
+ ## v0.4.20 - 13/07/2022
14
+
15
+ - Bugfix di useUpDownKeyNavigation, premendo ENTER venivano intercettati altri comportamenti in altri componenti
16
+
17
+ ## v0.4.19 - 28/06/2022
18
+
19
+ - Aggiunta la possibilità di usare le frecce per selezionare una riga nella Table o un'opzione nel Dropdown
20
+ - Aggiunto export del componente Spinner
21
+
22
+ ## v0.4.18
23
+
24
+ - Rimossa prop disabled dal componente Select perché ridondante
25
+
26
+ ## v0.4.17
27
+
28
+ - Fixato l'hook useFormattedDate del componente DatePicker
29
+
30
+ ## v0.4.16 - 18/05/2022
31
+
32
+ ### 🚀 Added
33
+
34
+ - Implementata prop "fixedHeight" in componente FileUploader
35
+
36
+ ### 🚀 Bugfix
37
+
38
+ - Modificato il border bottom dell’header in maniera che sia più chiaro, sistemato le icone di ordinamento
39
+ - Fixato stile Dropdown
40
+ - Fixato font in storybook usando "Inter UI"
41
+
42
+ ## v0.4.15 - 17/05/2022
43
+
44
+ ### 🚀 Bugfix
45
+
46
+ - Fixed style "min-height" if prop isSmall is true on component ConfirmationModal
47
+
48
+ ## v0.4.14 - 12/05/2022
49
+
50
+ ### 🚀 Added
51
+
52
+ - Added new prop pageSize on component Table
53
+
54
+ ## v0.4.13 - 05/05/2022
55
+
56
+ ### 🚀 Added
57
+
58
+ - Added new prop maxFileSize on component FileUploader
59
+
60
+ ### 🐛 Bug Fix
61
+
62
+ - Fix placeholder in Select component style bug
63
+
64
+ ## v0.4.12 - 03/05/2022
65
+
66
+ ### 🐛 Bug Fix
67
+
68
+ - Fix placeholder in Select component, the cursor was at the end of the placeholder
69
+ - Fix Table LoadingCell
70
+
71
+ ## v0.4.11 - 12/04/2022
72
+
73
+ ### 🐛 Bug Fix
74
+
75
+ - Fix text color to 900 in component InlineMessage
76
+
77
+ ## v.0.4.10 - 08/04/2022
78
+
79
+ ### 🚀 Added
80
+
81
+ - Added new component DatePicker
82
+ - Added new features in component Table
83
+ - Added backgroundColor in palette for component FileUploader and fixed file type mappings to manage "p7m" extension
84
+
85
+ ## v0.4.9 - 23/02/2022
86
+
87
+ ### 🐛 Bug Fix
88
+
89
+ - Fix FontAwesome version
90
+
91
+ ## v0.4.8 - 23/02/2022
92
+
93
+ ### 🐛 Bug Fix
94
+
95
+ - Downgrade FontAwesome to v5 due to browser compatibility issues
96
+
97
+ ## v0.4.7 - 22/02/2022
98
+
99
+ ### 🚀 Added
100
+
101
+ - Add new FileUploader component
102
+ - Add new Table component
103
+
104
+ ### 🐛 Bug Fix
105
+
106
+ - Fix appearance of multiline (long) Select Options
107
+
108
+ ## v0.4.6 - 15/02/2022
109
+
110
+ ### 🚀 Added
111
+
112
+ - Add `customHeader` and `customFooter` props to Modal
113
+ - Add `isPrefilled` prop to InputText, TextArea and Select components
114
+ - Add `isTransparent` prop to Select and InputText components
115
+ - Add `customStyles` prop to Select component
116
+ - Add UnitDropdown to InputText
117
+ - Add `ref` prop to InputText component
118
+ - Add Select `simpleValue` prop and `useSelectSimpleValue` hook
119
+
120
+ ### 🐛 Bug Fix
121
+
122
+ - Fix Accordion graphical appearance (CSS)
123
+
124
+ ### 💅 Enhancement
125
+
126
+ - Add `JSX.Element` to label prop type in form components
127
+ - Remove up and down arrows on `input[type=number]`
128
+
129
+ ## v0.4.5 - 08/02/2022
130
+
131
+ - Update FontAwesome to v6.0.0 (Downgraded to v5 in v0.4.8)
132
+
133
+ ## v0.4.4 - 25/01/2022
134
+
135
+ ### 🐛 Bug Fix
136
+
137
+ - Move SidebarItem Dropdown on the left in Safari
138
+
139
+ ## v0.4.3 - 21/01/2022
140
+
141
+ ### 🐛 Bug Fix
142
+
143
+ - Remove the Checkbox `Label` tag when prop `text` is missing
144
+
145
+ ### 💅 Enhancement
146
+
147
+ - Change Button `text` prop from `string | JSX.Element` to `ReactText | JSX.Element`
148
+
149
+ ## v0.4.2 - 19/01/2022
150
+
151
+ ### 🐛 Bug Fix
152
+
153
+ - Fix Dropdown content appearance animation in Safari (animation removed)
154
+ - Fix absent Select typings
155
+ - Fix Select Option multiline appearance
156
+
157
+ ### 💅 Enhancement
158
+
159
+ - Change all occurrences of `isDisabled` prop to `disabled` for "form" components
160
+
161
+ ## v0.4.1 - 14/01/2022
162
+
163
+ ### 🐛 Bug Fix
164
+
165
+ - Fix a bug during the update of SidebarItem
166
+
167
+ ## v0.4.0 - 15/12/2021
168
+
169
+ ### 💅 Enhancement
170
+
171
+ - Update Storybook to v6
172
+ - Update Rollup to v2
173
+ - Change build configs
174
+
175
+ ## v0.3.24 - 13/12/2021
176
+
177
+ ### 🐛 Bug Fix
178
+
179
+ - Add preventDefault on Dropdown trigger click
180
+
181
+ ## v0.3.23 - 13/12/2021
182
+
183
+ ### 💅 Enhancement
184
+
185
+ - Add href and cmd/ctrl+click on SidebarItem
186
+
187
+ ## v0.3.22 - 30/11/2021
188
+
189
+ ### 🐛 Bug Fix
190
+
191
+ - Move `lint-staged` to devDependencies
192
+
193
+ ## v0.3.21 - 29/11/2021
194
+
195
+ ### 🐛 Bug Fix
196
+
197
+ - Fix bug with Select usage
198
+
199
+ ## v0.3.20 - 22/11/2021
200
+
201
+ ### 🚀 Added
202
+
203
+ - TextArea:
204
+ - Add isResizable prop
205
+ - Add characters counter
206
+ - Add new `Select` components (`Select`, `CreatableSelect`, `AsyncSelect`, `AsyncCreatableSelect`)
207
+
208
+ ### 💅 Enhancement
209
+
210
+ - `InputHelper`'s prop `message` changed type from `string` to `ReactChild`
211
+ - Add `className` to TextArea wrapper
212
+ - Remove `margin-bottom: 1em` from `InputText` and `TextArea` components
213
+ - Update styled-components to v5
214
+ - Add styled-components to `peerDependencies`
215
+
216
+ ### 🐛 Bug Fix
217
+
218
+ - The cursor hovering an Icon will be `pointer` only if the icon has an `onClick` event
219
+ - Fix Tabs component glitch
220
+
221
+ ## v0.3.19 - 02/11/2021
222
+
223
+ ### 🚀 Added
224
+
225
+ - Add SidebarItem customization through `CustomSidebarItemProps` prop
226
+ - Add exports for `SidebarItemProps`
227
+
228
+ ### 💅 Enhancement
229
+
230
+ - Remove deprecated `alignRight` props from Dropdown component
231
+ - The `text` prop in Badge is now a `ReactText`
232
+ - Button `type=text` now supports icons and hover/active state
233
+
234
+ ### 🐛 Bug Fix
235
+
236
+ - Fix click on SidebarItem's Dropdown
237
+
238
+ ## v0.3.18 - 20/10/2021
239
+
240
+ ### 🚀 Added
241
+
242
+ - Add new InputText component
243
+ - Add new InputHelper component
244
+ - Add new TextArea component
245
+
246
+ ### 💅 Enhancement
247
+
248
+ - Add `isDisabled` prop to Icon component
249
+
250
+ ### 🐛 Bug Fix
251
+
252
+ - Close the Tooltip dropdown on click outside
253
+ - Better mobile event handling on Tooltip component (close on scroll page)
254
+ - Add a maximum width to the tooltip dropdown
255
+
256
+ ## v0.3.17 - 06/10/2021
257
+
258
+ ### 🚀 Added
259
+
260
+ - Added new `Stepper` component
261
+ - Added prop `forceOpenDropdown` on SidebarItem component
262
+
263
+ ## v0.3.16 - 29/09/2021
264
+
265
+ ### 🚀 Added
266
+
267
+ - Add new `forceOpen` prop to Dropdown
268
+
269
+ ### 💅 Enhancement
270
+
271
+ - Change SidebarItem height from 40px to 44px
272
+
273
+ ### 🐛 Bug Fix
274
+
275
+ - Fix Tooltip's arrow color
276
+
277
+ ## v0.3.15 - 21/09/2021
278
+
279
+ ### 🚀 Added
280
+
281
+ - Add new SidebarItem component
282
+
283
+ ## v0.3.14 - 02/09/2021
284
+
285
+ ### 🚀 Added
286
+
287
+ - Added new Tooltip component
288
+
289
+ ### 💅 Enhancement
290
+
291
+ - Add `triggerStyles` Dropdown prop
292
+ - Add new `IconBackground` component to support circle background behind icons
293
+
294
+ ## v0.3.13 - 19/08/2021
295
+
296
+ - Add `link` to DropdownItem `type`
297
+
298
+ ## v0.3.12 - 19/08/2021
299
+
300
+ ### 💅 Enhancement
301
+
302
+ - Merged Dropdown interfaces `ContentOption` and `ItemProps` in `DropdownItemProps`
303
+ - Add a part of DropdownPalette
304
+
305
+ ### 🐛 Bug Fix
306
+
307
+ - Add `e.stopPropagation()` on Dropdown trigger click
308
+
309
+ ## v0.3.11 - 16/08/2021
310
+
311
+ ### 💅 Enhancement
312
+
313
+ - DropdownItems doesn't highlight without an `onClick` prop anymore
314
+ - Changed DropdownItems' shortcuts style
315
+
316
+ ## v0.3.10 - 28/07/2021
317
+
318
+ ### 🐛 Bug Fix
319
+
320
+ - Export checkboxPalette interface
321
+ - Added boolean-only support for Checkbox component
322
+
323
+ ### 💅 Enhancement
324
+
325
+ - Change onClick prop type for Checkbox component
326
+
327
+ ## v0.3.9 - 28/07/2021
328
+
329
+ ### 💅 Enhancement
330
+
331
+ - Added boolean values support to Checkbox
332
+
333
+ ### 🐛 Bug Fix
334
+
335
+ - Fix CustomSizeModal width on small screens
336
+
337
+ ## v0.3.8 - 26/07/2021
338
+
339
+ ### 🚀 Added
340
+
341
+ - Added new Checkbox component with Checkbox Palette
342
+
343
+ ### 🐛 Bug Fix
344
+
345
+ - Increased Toast z-index to make it visible while a modal is open
346
+
347
+ ## v0.3.7 - 25/06/2021
348
+
349
+ ### 🚀 Added
350
+
351
+ - Added MicroTag palette
352
+ - Added Icon palette
353
+
354
+ ### 💅 Enhancement
355
+
356
+ - Refactor Palette structure
357
+ - Remove base palette part
358
+ - Use "transparent" css value instead of palette.base.transparent
359
+
360
+ ## v0.3.6 - 04/06/2021
361
+
362
+ ### 💅 Enhancement
363
+
364
+ - Change project linting rules
365
+
366
+ ## v0.3.5 - 03/06/2021
367
+
368
+ ### 🚀 Added
369
+
370
+ - Add export for `closeDropdownType`
371
+
372
+ ### 💅 Enhancement
373
+
374
+ - Remove Dropdown padding with custom content
375
+
376
+ ## v0.3.4 - 26/05/2021
377
+
378
+ ### 🚀 Added
379
+
380
+ - isDisabled prop on IconButton
381
+ - IconButton default types (defaultColor, defaultType) in iconButtonPalette
382
+ - Add `href` and `target` props on Button component
383
+
384
+ ### 💅 Enhancement
385
+
386
+ - Fix buttons appearance on small screens
387
+
388
+ ## v0.3.2 - 19/05/2021
389
+
390
+ ### 🚀 Added
391
+
392
+ - Add fullWidth prop on Button
393
+
394
+ ### 💅 Enhancement
395
+
396
+ - Fix default buttonPalette colors
397
+ - Align iconButton palette names to Button's one
398
+
399
+ ## v0.3.1 - 18/05/2021
400
+
401
+ ### 🚀 Added
402
+
403
+ - New useDebounceClick hook
404
+ - Add new theme object manual configuration
405
+ - Add palette configuration object for:
406
+ - Tag
407
+ - Button
408
+ - IconButton
409
+
410
+ ### 💅 Enhancement
411
+
412
+ - Switch default palette to DIC's palette
413
+ - Button component redone from scratch
414
+ - TextButton merged with Button (type='text')
415
+ - IconButton component redone from scratch
416
+ - Refactor Tag component
417
+
418
+ ## v0.2.9 - 05/05/2021
419
+
420
+ ### 💅 Enhancement
421
+
422
+ - The first render of the "not scrollable" Tabs component now
423
+ shows the scrollable version instead of an empty row with a dropdown
424
+ - Split Tabs component in ScrollableTabs and DropdownTabs
425
+
426
+ ### 🐛 Bug Fix
427
+
428
+ - Actually use the lateralPadding prop in Tabs component
429
+
430
+ ## v0.2.8 - 30/04/2021
431
+
432
+ ### 🐛 Bug Fix
433
+
434
+ - Fixed Dropdowns in Internet Explorer
435
+
436
+ ## v0.2.7 - 07/04/2021
437
+
438
+ ### 🐛 Bug Fix
439
+
440
+ - Fixed dropdown menu openings on Internet Explorer
441
+
442
+ ## v0.2.6 - 10/03/2021
443
+
444
+ ### 🐛 Bug Fix
445
+
446
+ - Change Tag component "style" prop to "tagStyle" to prevent TypeScript error
447
+
448
+ ## v0.2.5 - 04/03/2021
449
+
450
+ ### 💅 Enhancement
451
+
452
+ - Hide Tabs scrollbar if there's enough space for the elements
453
+
454
+ ### 🐛 Bug Fix
455
+
456
+ - Force Tabs component to have height: 100% (prevent component/sidebar overlap)
457
+
458
+ ## v0.2.4 - 03/03/2021
459
+
460
+ ### 🐛 Bug Fix
461
+
462
+ - Fixed Button appearance with empty text
463
+
464
+ ## v0.2.3 - 23/02/2021
465
+
466
+ ### 🐛 Bug Fix
467
+
468
+ - Fixed an error in Tabs causing the page overflow in scrollable mode
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface Props {
2
3
  className?: string;
3
4
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DropdownProps } from './types';
2
3
  declare const DropdownImpl: ({ className, content, fullWidth, maxWidth, minWidthAsTrigger, placement, renderContent, renderTrigger, triggerStyles, title, forceOpen, disableArrowNavigation, maxHeight, isSmall, }: DropdownProps) => JSX.Element;
3
4
  export default DropdownImpl;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface DropdownTriggerProps {
2
3
  title: string;
3
4
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DropdownItemProps } from '../types';
2
3
  import { DropdownItemStyles } from '../utils';
3
4
  declare const Item: ({ active, className, componentId, icon, isDisabled, onClick, rowHasFocus, shortcut, text, ...rest }: DropdownItemProps & {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { WithBadgeProps } from './types';
2
3
  declare const WithBadge: (props: WithBadgeProps) => JSX.Element;
3
4
  export default WithBadge;
@@ -1,5 +1,12 @@
1
- import { LabelProps } from '../label';
2
- import { DatePickerImplProps } from './DatePickerImpl';
3
- export declare type DatePickerProps = LabelProps & DatePickerImplProps;
1
+ /// <reference types="react" />
2
+ import { DatePickerProps } from './types';
3
+ /**
4
+ * Component Props:
5
+ * @param {Date | null} date selected date
6
+ * @param {function} placeholderText text to show as placeholder
7
+ * @param {string|ReactNode} minDate minimum selectable date
8
+ * @param {string|ReactNode} maxDate maximum selectable date
9
+ * @others ReactDatePickerProps
10
+ */
4
11
  declare const DatePicker: (props: DatePickerProps) => JSX.Element;
5
12
  export default DatePicker;
@@ -1,25 +1,4 @@
1
- import { Dispatch, ReactChild, SetStateAction } from 'react';
2
- import { ReactDatePickerProps } from 'react-datepicker';
3
- import { CommonFormTypes } from '../common/types';
4
- export declare type RenderCustomFooterType = (props: RenderCustomFooterProps) => ReactChild;
5
- export declare type CustomButtonProps = {
6
- text: string;
7
- onClick: (props: RenderCustomFooterProps) => void;
8
- };
9
- export interface DatePickerImplProps extends Omit<ReactDatePickerProps, 'onChange'>, CommonFormTypes {
10
- date: Date | null;
11
- setDate: Dispatch<SetStateAction<Date | null>>;
12
- allowMonthView?: boolean;
13
- allowYearView?: boolean;
14
- yearsDisplayed?: number;
15
- hasTodayButton?: boolean;
16
- customButtons?: CustomButtonProps[];
17
- renderCustomFooter?: RenderCustomFooterType;
18
- isPrefilled?: boolean;
19
- }
20
- export interface RenderCustomFooterProps extends DatePickerImplProps {
21
- isOpen: boolean;
22
- setIsOpen: Dispatch<SetStateAction<boolean>>;
23
- }
1
+ /// <reference types="react" />
2
+ import { DatePickerImplProps } from './types';
24
3
  declare const DatePickerImpl: (props: DatePickerImplProps) => JSX.Element;
25
4
  export default DatePickerImpl;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface Props {
2
3
  onClick: () => void;
3
4
  selected?: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ReactDatePickerCustomHeaderProps } from 'react-datepicker';
2
3
  export interface DatePickerHeaderProps extends ReactDatePickerCustomHeaderProps {
3
4
  allowMonthView: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ReactDatePickerCustomHeaderProps } from 'react-datepicker';
2
3
  declare type Props = Pick<ReactDatePickerCustomHeaderProps, 'changeMonth' | 'date'>;
3
4
  declare const MonthPicker: ({ changeMonth, date }: Props) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ReactDatePickerCustomHeaderProps } from 'react-datepicker';
2
3
  interface Props extends Pick<ReactDatePickerCustomHeaderProps, 'date' | 'changeYear'> {
3
4
  yearsDisplayed: number;
@@ -1,7 +1,7 @@
1
- import { datePickerStatus } from '../../types';
1
+ import { DatePickerStatus } from '../../types';
2
2
  import { DatePickerHeaderProps } from '../DatePickerHeader';
3
3
  interface ReturnType {
4
- status: datePickerStatus;
4
+ status: DatePickerStatus;
5
5
  title: string;
6
6
  leftArrowOnClick: () => void;
7
7
  leftArrowIsDisabled: boolean;
@@ -1,20 +1,20 @@
1
1
  import { colorsPalette } from '../../../common/types/colorsPalette';
2
2
  import { paletteColor } from '../../../styles/types';
3
- declare type itemStatus = 'normal' | 'active' | 'normalHover' | 'activeHover';
3
+ declare type ItemStatus = 'normal' | 'active' | 'normalHover' | 'activeHover' | 'disabled';
4
4
  declare type DayPalette = {
5
5
  borderRadius: string;
6
6
  today: {
7
- [k in itemStatus]: colorsPalette;
7
+ [k in Exclude<ItemStatus, 'disabled'>]: colorsPalette;
8
8
  };
9
9
  inMonth: {
10
- [k in itemStatus]: colorsPalette;
10
+ [k in ItemStatus]: colorsPalette;
11
11
  };
12
12
  outMonth: {
13
- [k in Exclude<itemStatus, 'active' | 'activeHover'>]: colorsPalette;
13
+ [k in Exclude<ItemStatus, 'active' | 'activeHover' | 'disabled'>]: colorsPalette;
14
14
  };
15
15
  };
16
16
  declare type ItemStatusPalette = {
17
- [k in itemStatus]: colorsPalette;
17
+ [k in ItemStatus]: colorsPalette;
18
18
  };
19
19
  interface ItemPalette extends ItemStatusPalette {
20
20
  borderRadius: string;
@@ -1,5 +1,5 @@
1
1
  import { Meta, Story } from '@storybook/react';
2
- import { DatePickerProps } from './DatePicker';
2
+ import { DatePickerProps } from './types';
3
3
  export declare const Normal: Story<DatePickerProps>;
4
4
  export declare const WithCustomButton: Story<DatePickerProps>;
5
5
  declare const DatePickerStories: Meta<DatePickerProps>;
@@ -1,5 +1,5 @@
1
- import DatePicker, { DatePickerProps } from './DatePicker';
2
- import datePickerPalette, { DatePickerPalette } from './datePickerPalette';
3
- import useFormattedDate from './hooks/useFormattedDate';
4
- import { timeConversionOptions } from './utils';
5
- export { datePickerPalette, DatePickerProps, DatePickerPalette, DatePicker, useFormattedDate, timeConversionOptions };
1
+ export { default as DatePicker } from './DatePicker';
2
+ export { default as datePickerPalette, DatePickerPalette } from './datePickerPalette';
3
+ export { default as useFormattedDate } from './hooks/useFormattedDate';
4
+ export { DatePickerProps } from './types';
5
+ export { timeConversionOptions } from './utils';
@@ -0,0 +1,3 @@
1
+ export declare const StyledDatePicker: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const FooterWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const SelectedOption: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -1,4 +1,29 @@
1
- export declare type datePickerStatus = 'dayPicker' | 'monthPicker' | 'yearPicker';
1
+ import { Dispatch, ReactChild, SetStateAction } from 'react';
2
+ import { ReactDatePickerProps } from 'react-datepicker';
3
+ import { CommonFormTypes } from '../common/types';
4
+ import { LabelProps } from '../label';
5
+ export declare type DatePickerStatus = 'dayPicker' | 'monthPicker' | 'yearPicker';
2
6
  export declare const dateFormatsArray: [string, ...string[]];
3
- export declare type dateFormat = typeof dateFormatsArray[number];
4
- export declare type DateFormats = [dateFormat, ...dateFormat[]];
7
+ export declare type DateFormat = typeof dateFormatsArray[number];
8
+ export declare type DateFormats = [DateFormat, ...DateFormat[]];
9
+ export declare type RenderCustomFooterType = (props: RenderCustomFooterProps) => ReactChild;
10
+ export declare type CustomButtonProps = {
11
+ text: string;
12
+ onClick: (props: RenderCustomFooterProps) => void;
13
+ };
14
+ export interface RenderCustomFooterProps extends DatePickerImplProps {
15
+ isOpen: boolean;
16
+ setIsOpen: Dispatch<SetStateAction<boolean>>;
17
+ }
18
+ export interface DatePickerImplProps extends Omit<ReactDatePickerProps, 'onChange'>, CommonFormTypes {
19
+ date: Date | null;
20
+ setDate: Dispatch<SetStateAction<Date | null>>;
21
+ allowMonthView?: boolean;
22
+ allowYearView?: boolean;
23
+ yearsDisplayed?: number;
24
+ hasTodayButton?: boolean;
25
+ customButtons?: CustomButtonProps[];
26
+ renderCustomFooter?: RenderCustomFooterType;
27
+ isPrefilled?: boolean;
28
+ }
29
+ export declare type DatePickerProps = LabelProps & DatePickerImplProps;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FileRejection } from 'react-dropzone';
2
3
  import { CustomPalette, FileType, FileUploaderSize, FileUploaderStatus } from './types';
3
4
  export declare type fileUploaderOnDrop = (acceptedFiles: File[], rejectedFiles: FileRejection[]) => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { statusType } from '../../common/types';
2
3
  interface Props {
3
4
  status: statusType;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DropdownProps } from '../../../dropdown/types';
2
3
  import { Unit } from './unitDropdown/UnitDropdownTrigger';
3
4
  export interface UnitDropdownProps extends Pick<DropdownProps, 'renderContent' | 'placement' | 'className' | 'triggerStyles' | 'content' | 'maxWidth' | 'minWidthAsTrigger' | 'forceOpen'> {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface Unit {
2
3
  name: string;
3
4
  shortName?: string;