@fattureincloud/fic-design-system 0.4.25 → 0.4.26

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