freemium-ui 1.0.334 → 2.0.0-beta.0

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.
Files changed (105) hide show
  1. package/.husky/pre-commit +5 -0
  2. package/README.md +26 -51
  3. package/lib/index.d.ts +833 -0
  4. package/lib/index.esm.js +833 -42
  5. package/lib/index.js +833 -0
  6. package/package.json +94 -87
  7. package/rollup.config.mjs +47 -0
  8. package/.github/workflows/security.yml +0 -52
  9. package/lib/index.cjs.js +0 -28
  10. package/lib/types/components/Alert/Alert.d.ts +0 -17
  11. package/lib/types/components/Alert/index.d.ts +0 -1
  12. package/lib/types/components/BoxedRadio/boxedRadio.d.ts +0 -9
  13. package/lib/types/components/BoxedRadio/boxedRadioContext.d.ts +0 -7
  14. package/lib/types/components/BoxedRadio/boxedRadioGroup.d.ts +0 -2
  15. package/lib/types/components/BoxedRadio/index.d.ts +0 -2
  16. package/lib/types/components/Button/Buttons.d.ts +0 -19
  17. package/lib/types/components/Button/index.d.ts +0 -1
  18. package/lib/types/components/ButtonDropdown/ButtonDropdown.d.ts +0 -20
  19. package/lib/types/components/ButtonDropdown/index.d.ts +0 -1
  20. package/lib/types/components/Checkbox/Checkbox.d.ts +0 -13
  21. package/lib/types/components/Checkbox/index.d.ts +0 -1
  22. package/lib/types/components/Confirmation/Confirmation.d.ts +0 -38
  23. package/lib/types/components/Confirmation/index.d.ts +0 -2
  24. package/lib/types/components/Confirmation/useConfirmation.d.ts +0 -10
  25. package/lib/types/components/ControlledTable/ControlledTable.d.ts +0 -50
  26. package/lib/types/components/ControlledTable/index.d.ts +0 -1
  27. package/lib/types/components/CssBaseLine/index.d.ts +0 -1
  28. package/lib/types/components/Drawer/Drawer.d.ts +0 -17
  29. package/lib/types/components/Drawer/index.d.ts +0 -2
  30. package/lib/types/components/Drawer/styles.d.ts +0 -6
  31. package/lib/types/components/Dropdown/DropdownButton.d.ts +0 -14
  32. package/lib/types/components/Dropdown/DropdownInput.d.ts +0 -4
  33. package/lib/types/components/Dropdown/DropdownMenu.d.ts +0 -4
  34. package/lib/types/components/Dropdown/index.d.ts +0 -30
  35. package/lib/types/components/Dropdown/styles.d.ts +0 -7
  36. package/lib/types/components/Dropdown/withDownshift.d.ts +0 -8
  37. package/lib/types/components/Icons/Icons.d.ts +0 -20
  38. package/lib/types/components/Icons/index.d.ts +0 -1
  39. package/lib/types/components/Input/Input.d.ts +0 -57
  40. package/lib/types/components/Input/index.d.ts +0 -1
  41. package/lib/types/components/Loader/Loader.d.ts +0 -8
  42. package/lib/types/components/Loader/index.d.ts +0 -1
  43. package/lib/types/components/Menu/Menu.d.ts +0 -20
  44. package/lib/types/components/Menu/index.d.ts +0 -1
  45. package/lib/types/components/Modal/Modal.d.ts +0 -13
  46. package/lib/types/components/Modal/index.d.ts +0 -3
  47. package/lib/types/components/Modal/styles.d.ts +0 -12
  48. package/lib/types/components/Modal/use-modal.d.ts +0 -10
  49. package/lib/types/components/MultiSelectDropdown/MultiSelectDropdown.d.ts +0 -32
  50. package/lib/types/components/MultiSelectDropdown/index.d.ts +0 -1
  51. package/lib/types/components/Pickers/DatePicker.d.ts +0 -4
  52. package/lib/types/components/Pickers/DateRangePicker.d.ts +0 -4
  53. package/lib/types/components/Pickers/DateTimePicker.d.ts +0 -4
  54. package/lib/types/components/Pickers/TimePicker.d.ts +0 -4
  55. package/lib/types/components/Pickers/index.d.ts +0 -4
  56. package/lib/types/components/Pickers/styles.d.ts +0 -4
  57. package/lib/types/components/Pickers/types.d.ts +0 -29
  58. package/lib/types/components/Popover/Popover.d.ts +0 -21
  59. package/lib/types/components/Popover/index.d.ts +0 -1
  60. package/lib/types/components/Radio/Radio.d.ts +0 -9
  61. package/lib/types/components/Radio/index.d.ts +0 -1
  62. package/lib/types/components/RestTable/RestTable.d.ts +0 -19
  63. package/lib/types/components/RestTable/index.d.ts +0 -1
  64. package/lib/types/components/Table/Table.d.ts +0 -56
  65. package/lib/types/components/Table/index.d.ts +0 -1
  66. package/lib/types/components/Tabs/Tabs.d.ts +0 -20
  67. package/lib/types/components/Tabs/index.d.ts +0 -1
  68. package/lib/types/components/Tag/Tag.d.ts +0 -7
  69. package/lib/types/components/Tag/index.d.ts +0 -1
  70. package/lib/types/components/ThemeProvider/index.d.ts +0 -12
  71. package/lib/types/components/Toast/Toast.d.ts +0 -14
  72. package/lib/types/components/Toast/index.d.ts +0 -3
  73. package/lib/types/components/Toggle/Toggle.d.ts +0 -15
  74. package/lib/types/components/Toggle/index.d.ts +0 -1
  75. package/lib/types/components/Tooltip/Tooltip.d.ts +0 -24
  76. package/lib/types/components/Tooltip/index.d.ts +0 -1
  77. package/lib/types/components/Transition/Transition.d.ts +0 -14
  78. package/lib/types/components/Transition/fade.d.ts +0 -6
  79. package/lib/types/components/Transition/index.d.ts +0 -4
  80. package/lib/types/components/Transition/slide-fade.d.ts +0 -13
  81. package/lib/types/components/Transition/slide.d.ts +0 -11
  82. package/lib/types/components/UiProvider/UiProvider.d.ts +0 -2
  83. package/lib/types/components/UiProvider/index.d.ts +0 -1
  84. package/lib/types/components/use-toasts/index.d.ts +0 -1
  85. package/lib/types/components/use-toasts/toast-container.d.ts +0 -8
  86. package/lib/types/components/use-toasts/toast-item.d.ts +0 -15
  87. package/lib/types/components/use-toasts/use-toast.d.ts +0 -17
  88. package/lib/types/index.d.ts +0 -30
  89. package/lib/types/theme/default/colors.d.ts +0 -3
  90. package/lib/types/theme/default/index.d.ts +0 -7
  91. package/lib/types/theme/default/palette.d.ts +0 -3
  92. package/lib/types/theme/default/typography.d.ts +0 -3
  93. package/lib/types/theme/freshstatus/colors.d.ts +0 -3
  94. package/lib/types/theme/freshstatus/index.d.ts +0 -7
  95. package/lib/types/theme/freshstatus/palette.d.ts +0 -3
  96. package/lib/types/theme/freshstatus/typography.d.ts +0 -3
  97. package/lib/types/theme/index.d.ts +0 -352
  98. package/lib/types/theme/shared.d.ts +0 -2
  99. package/lib/types/utils/date.d.ts +0 -7
  100. package/lib/types/utils/index.d.ts +0 -1
  101. package/lib/types/utils/use-current-state.d.ts +0 -4
  102. package/lib/types/utils/use-portal.d.ts +0 -2
  103. package/lib/types/utils/use-ssr.d.ts +0 -6
  104. package/lib/types/utils/use-ui-context.d.ts +0 -11
  105. package/lib/types/utils/with-defaults.d.ts +0 -3
@@ -1,352 +0,0 @@
1
- export interface FreemiumUIThemesLayout {
2
- gap: string;
3
- gapNegative: string;
4
- gapHalf: string;
5
- gapHalfNegative: string;
6
- gapQuarter: string;
7
- gapQuarterNegative: string;
8
- pageMargin: string;
9
- pageWidth: string;
10
- pageWidthWithMargin: string;
11
- radius: string;
12
- }
13
- export interface FreemiumUIThemesPalette {
14
- jade: string;
15
- celery: string;
16
- candlelight: string;
17
- sunrise: string;
18
- scotchMist: string;
19
- pearlLusta: string;
20
- dodger: string;
21
- amethyst: string;
22
- permission: string;
23
- ferrari: string;
24
- mintCream: string;
25
- athens: string;
26
- smoke: string;
27
- porcelain: string;
28
- zircon: string;
29
- chateau: string;
30
- raven: string;
31
- elephant: string;
32
- rhino: string;
33
- jungle: string;
34
- azure: string;
35
- skylight: string;
36
- clara: string;
37
- casablanca: string;
38
- transparent: string;
39
- passion: string;
40
- peach: string;
41
- babylon: string;
42
- coral: string;
43
- black: string;
44
- white: string;
45
- E900: string;
46
- E800: string;
47
- E700: string;
48
- E600: string;
49
- E500: string;
50
- E400: string;
51
- E300: string;
52
- S900: string;
53
- S800: string;
54
- S700: string;
55
- S600: string;
56
- S500: string;
57
- S400: string;
58
- S300: string;
59
- S200: string;
60
- S100: string;
61
- S75: string;
62
- S50: string;
63
- S25: string;
64
- S10: string;
65
- }
66
- declare type HeadingType = {
67
- fontSize: string;
68
- lineHeight: string;
69
- margin: string;
70
- };
71
- declare type FontType = {
72
- fontSize?: string;
73
- lineHeight?: string;
74
- margin?: string;
75
- padding?: string;
76
- fontWeight?: string | 400 | 500 | 600 | 700 | 800;
77
- letterSpacing?: string;
78
- };
79
- interface TableType extends FontType {
80
- header?: FontType;
81
- body?: FontType;
82
- }
83
- interface MenuType extends FontType {
84
- menuItem?: FontType;
85
- }
86
- export interface FreemiumUITypography {
87
- fontFamily: string;
88
- headings: {
89
- h1: HeadingType;
90
- h2: HeadingType;
91
- h3: HeadingType;
92
- h4: HeadingType;
93
- h5: HeadingType;
94
- };
95
- text: {
96
- regular: FontType;
97
- semiBold: FontType;
98
- bold: FontType;
99
- };
100
- body: {
101
- regular: FontType;
102
- regularBold: FontType;
103
- secondary: FontType;
104
- secondaryBold: FontType;
105
- dropdown: FontType;
106
- label: FontType;
107
- anchor: {
108
- light: FontType;
109
- bold: FontType;
110
- };
111
- requiredLabel: FontType;
112
- tagText: FontType;
113
- errorText: {
114
- fontSize: string;
115
- };
116
- };
117
- input: {
118
- text: FontType;
119
- textarea: FontType;
120
- disabled: FontType;
121
- label: FontType;
122
- error: FontType;
123
- };
124
- tabs: FontType;
125
- table: TableType;
126
- menu: MenuType;
127
- }
128
- declare type DefaultColorsType = {
129
- primary: string;
130
- secondary: string;
131
- hover?: string;
132
- disabled?: string;
133
- active?: string;
134
- selected?: string;
135
- error?: string;
136
- light?: string;
137
- };
138
- declare type GradientColorsType = {
139
- from: string;
140
- to: string;
141
- };
142
- declare type BasicTextType = {
143
- color?: string;
144
- background?: string;
145
- };
146
- declare type ButtonColorsType = {
147
- backgroundColor: string;
148
- backgroundGradient: GradientColorsType;
149
- hover: string;
150
- borderColor: string;
151
- color: string;
152
- disabled: {
153
- borderColor: string;
154
- backgroundGradient: GradientColorsType;
155
- color: string;
156
- };
157
- active: {
158
- borderColor: string;
159
- backgroundColor: string;
160
- };
161
- };
162
- declare type InputColorsType = {
163
- borderColor: string;
164
- hoverBorderColor: string;
165
- };
166
- declare type AppStatesColorType = {
167
- error: string;
168
- warning: string;
169
- info: string;
170
- success: string;
171
- neutral?: string;
172
- };
173
- export interface FreemiumUIAllColors {
174
- body: {
175
- background: DefaultColorsType;
176
- };
177
- primary: string;
178
- link: string;
179
- white: string;
180
- black: string;
181
- text: {
182
- primary: string;
183
- secondary: string;
184
- light: string;
185
- disabled: string;
186
- placeholder: string;
187
- error: string;
188
- success: string;
189
- label: string;
190
- warning: string;
191
- extraLight: string;
192
- link: string;
193
- };
194
- toolTip: {
195
- normal: string;
196
- success: string;
197
- error: string;
198
- ferrari: string;
199
- black: string;
200
- };
201
- label: {
202
- primary: string;
203
- };
204
- success: BasicTextType;
205
- warning: BasicTextType;
206
- info: BasicTextType;
207
- error: BasicTextType;
208
- icon: DefaultColorsType;
209
- border: DefaultColorsType;
210
- background: DefaultColorsType;
211
- layout: {
212
- asidePane: string;
213
- };
214
- errorText: {
215
- primary: string;
216
- };
217
- components: {
218
- menu: {
219
- background?: string;
220
- color?: string;
221
- menuItem: {
222
- background?: string;
223
- color: string;
224
- hover: BasicTextType;
225
- selected: BasicTextType;
226
- disabled: BasicTextType;
227
- };
228
- };
229
- table: {
230
- header: {
231
- background: string;
232
- text: string;
233
- };
234
- body: {
235
- background: string;
236
- text: string;
237
- selected: string;
238
- hover: string;
239
- };
240
- };
241
- alert: {
242
- background: string;
243
- };
244
- input: {
245
- primary: InputColorsType;
246
- };
247
- toggle: {
248
- backgroundColorOn: string;
249
- backgroundColorOff: string;
250
- borderColor: string;
251
- };
252
- checkbox: {
253
- backgroundColor: string;
254
- borderColor: string;
255
- hoverBorderColor: string;
256
- };
257
- radio: {
258
- hoverBorderColor: string;
259
- backgroundColor: string;
260
- borderColor: string;
261
- };
262
- button: {
263
- primary: ButtonColorsType;
264
- secondary: ButtonColorsType;
265
- danger: ButtonColorsType;
266
- link: ButtonColorsType;
267
- buttonGroup: {
268
- normal: string;
269
- };
270
- };
271
- inlineMessage: AppStatesColorType;
272
- inlineBanner: {
273
- border: AppStatesColorType;
274
- background: AppStatesColorType;
275
- };
276
- panel: {
277
- gradientStart: string;
278
- gradientEnd: string;
279
- border: string;
280
- background: string;
281
- level: {
282
- warning: {
283
- backgroundColor: string;
284
- borderColor: string;
285
- };
286
- danger: {
287
- backgroundColor: string;
288
- borderColor: string;
289
- };
290
- };
291
- };
292
- confirmModal: {
293
- background: string;
294
- border: string;
295
- };
296
- modal: {
297
- overlayBackground: string;
298
- };
299
- tag: {
300
- background: AppStatesColorType;
301
- border: AppStatesColorType;
302
- color: AppStatesColorType;
303
- };
304
- railNavigation: {
305
- backgroundColor: string;
306
- activeColor: string;
307
- };
308
- listCard: {
309
- borderLeft: string;
310
- highlight: string;
311
- background: string;
312
- };
313
- tabs: {
314
- selectedBorderColor: string;
315
- selectedColor: string;
316
- color: string;
317
- hoverBg: string;
318
- disabledBg: string;
319
- disabledColor: string;
320
- };
321
- tooltip: {
322
- backgroundColor: string;
323
- };
324
- accordion: {
325
- header: {
326
- borderColor: string;
327
- };
328
- section: {
329
- background: string;
330
- borderColor: string;
331
- };
332
- };
333
- toast: {
334
- success: string;
335
- error: string;
336
- loading: string;
337
- warning: string;
338
- };
339
- };
340
- pseudo: {
341
- focus: string;
342
- hover: string;
343
- highlight: string;
344
- };
345
- }
346
- export default interface FreemiumUIThemes {
347
- palette: FreemiumUIThemesPalette;
348
- colors: FreemiumUIAllColors;
349
- layout: FreemiumUIThemesLayout;
350
- typography: FreemiumUITypography;
351
- }
352
- export {};
@@ -1,2 +0,0 @@
1
- import { FreemiumUIThemesLayout } from './index';
2
- export declare const layout: FreemiumUIThemesLayout;
@@ -1,7 +0,0 @@
1
- declare const _default: {
2
- isBeforeDay: (aDate: any, anotherDate: any) => boolean;
3
- isInclusivelyAfterDay: (aDate: any, anotherDate: any) => boolean;
4
- isToday: (millis: any) => boolean | undefined;
5
- getCurrentMillis: () => number;
6
- };
7
- export default _default;
@@ -1 +0,0 @@
1
- export declare const getId: () => string;
@@ -1,4 +0,0 @@
1
- import { Dispatch, MutableRefObject, SetStateAction } from 'react';
2
- export declare type CurrentStateType<S> = [S, Dispatch<SetStateAction<S>>, MutableRefObject<S>];
3
- declare const useCurrentState: <S>(initialState: S | (() => S)) => CurrentStateType<S>;
4
- export default useCurrentState;
@@ -1,2 +0,0 @@
1
- declare const usePortal: (selectId?: string) => HTMLElement | null;
2
- export default usePortal;
@@ -1,6 +0,0 @@
1
- export declare type SSRState = {
2
- isBrowser: boolean;
3
- isServer: boolean;
4
- };
5
- declare const useSSR: () => SSRState;
6
- export default useSSR;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { ToastWithID } from '../components/use-toasts/toast-container';
3
- export declare type UpdateToastsFunction<T> = (fn: (toasts: Array<T>) => Array<T>) => any;
4
- export interface UiContextParams {
5
- toasts: Array<ToastWithID>;
6
- toastHovering: boolean;
7
- updateToasts: UpdateToastsFunction<ToastWithID>;
8
- updateToastHoverStatus: Function;
9
- }
10
- export declare const UIContent: React.Context<UiContextParams>;
11
- export declare const useUIContext: () => UiContextParams;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const withDefaults: <P, DP>(component: React.ComponentType<P>, defaultProps: DP) => React.ComponentType<Partial<DP> & Pick<P, Exclude<keyof P, keyof DP>>>;
3
- export default withDefaults;