@fattureincloud/fic-design-system 0.4.21 → 0.4.22
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +468 -0
- package/dist/components/form/datepicker/DatePicker.d.ts +9 -3
- package/dist/components/form/datepicker/DatePickerImpl.d.ts +2 -23
- package/dist/components/form/datepicker/components/hooks/useDatePickerHeaderShowLogic.d.ts +2 -2
- package/dist/components/form/datepicker/datePickerPalette.d.ts +5 -5
- package/dist/components/form/datepicker/datepicker.stories.d.ts +1 -1
- package/dist/components/form/datepicker/index.d.ts +5 -5
- package/dist/components/form/datepicker/styled.d.ts +3 -0
- package/dist/components/form/datepicker/types.d.ts +28 -3
- package/dist/components/toast/{toast.d.ts → Toast.d.ts} +0 -0
- package/dist/components/toast/components/{toastContent.d.ts → ToastContent.d.ts} +0 -0
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/form/datepicker/StyledDatePicker.d.ts +0 -1
- package/dist/components/form/datepicker/hooks/useDatePickerValues.d.ts +0 -13
- package/dist/components/form/select/components/Placeholder.d.ts +0 -4
- package/dist/components/table/components/ActionsCell.d.ts +0 -10
- package/dist/components/table/components/SortIndicator.d.ts +0 -6
- package/dist/components/table/components/TableBody.d.ts +0 -14
- package/dist/components/table/components/TableFoot.d.ts +0 -2
- package/dist/components/table/components/TableHeader.d.ts +0 -7
- package/dist/components/table/components/tableBody/TableBodyLoader.d.ts +0 -7
- package/dist/components/table/components/tableBody/styled.d.ts +0 -3
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,6 +1,12 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import {
|
3
|
-
|
4
|
-
|
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
|
+
*/
|
5
11
|
declare const DatePicker: (props: DatePickerProps) => JSX.Element;
|
6
12
|
export default DatePicker;
|
@@ -1,25 +1,4 @@
|
|
1
|
-
|
2
|
-
import {
|
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,7 +1,7 @@
|
|
1
|
-
import {
|
1
|
+
import { DatePickerStatus } from '../../types';
|
2
2
|
import { DatePickerHeaderProps } from '../DatePickerHeader';
|
3
3
|
interface ReturnType {
|
4
|
-
status:
|
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
|
3
|
+
declare type ItemStatus = 'normal' | 'active' | 'normalHover' | 'activeHover' | 'disabled';
|
4
4
|
declare type DayPalette = {
|
5
5
|
borderRadius: string;
|
6
6
|
today: {
|
7
|
-
[k in
|
7
|
+
[k in Exclude<ItemStatus, 'disabled'>]: colorsPalette;
|
8
8
|
};
|
9
9
|
inMonth: {
|
10
|
-
[k in
|
10
|
+
[k in ItemStatus]: colorsPalette;
|
11
11
|
};
|
12
12
|
outMonth: {
|
13
|
-
[k in Exclude<
|
13
|
+
[k in Exclude<ItemStatus, 'active' | 'activeHover' | 'disabled'>]: colorsPalette;
|
14
14
|
};
|
15
15
|
};
|
16
16
|
declare type ItemStatusPalette = {
|
17
|
-
[k in
|
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 './
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
export {
|
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
|
-
|
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
|
4
|
-
export declare type DateFormats = [
|
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;
|
File without changes
|
File without changes
|