freemium-ui 1.0.136 → 1.0.140
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/lib/index.cjs.js +451 -18672
- package/lib/index.esm.js +451 -18607
- package/lib/types/components/Alert/Alert.d.ts +17 -0
- package/lib/types/components/Alert/index.d.ts +1 -0
- package/lib/types/components/BoxedRadio/boxedRadio.d.ts +8 -0
- package/lib/types/components/BoxedRadio/boxedRadioContext.d.ts +7 -0
- package/lib/types/components/BoxedRadio/boxedRadioGroup.d.ts +2 -0
- package/lib/types/components/BoxedRadio/index.d.ts +2 -0
- package/lib/types/components/Button/Buttons.d.ts +24 -0
- package/lib/types/components/Button/index.d.ts +1 -0
- package/lib/types/components/ButtonDropdown/ButtonDropdown.d.ts +19 -0
- package/lib/types/components/ButtonDropdown/index.d.ts +1 -0
- package/lib/types/components/Checkbox/Checkbox.d.ts +17 -0
- package/lib/types/components/Checkbox/index.d.ts +1 -0
- package/lib/types/components/Confirmation/Confirmation.d.ts +33 -0
- package/lib/types/components/Confirmation/index.d.ts +2 -0
- package/lib/types/components/Confirmation/useConfirmation.d.ts +10 -0
- package/lib/types/components/CssBaseLine/index.d.ts +1 -0
- package/lib/types/components/DatePicker/DatePicker.d.ts +14 -0
- package/lib/types/components/DatePicker/index.d.ts +1 -0
- package/lib/types/components/DateRangePicker/DateRangePicker.d.ts +16 -0
- package/lib/types/components/DateRangePicker/index.d.ts +1 -0
- package/lib/types/components/Drawer/Drawer.d.ts +16 -0
- package/lib/types/components/Drawer/index.d.ts +2 -0
- package/lib/types/components/Drawer/styles.d.ts +6 -0
- package/lib/types/components/Dropdown/DropdownButton.d.ts +14 -0
- package/lib/types/components/Dropdown/DropdownInput.d.ts +4 -0
- package/lib/types/components/Dropdown/DropdownMenu.d.ts +4 -0
- package/lib/types/components/Dropdown/index.d.ts +23 -0
- package/lib/types/components/Dropdown/withDownshift.d.ts +8 -0
- package/lib/types/components/Icons/Icons.d.ts +20 -0
- package/lib/types/components/Icons/index.d.ts +1 -0
- package/lib/types/components/Input/Input.d.ts +48 -0
- package/lib/types/components/Input/index.d.ts +1 -0
- package/lib/types/components/Loader/index.d.ts +1 -0
- package/lib/types/components/Loader/loader.d.ts +8 -0
- package/lib/types/components/Menu/Menu.d.ts +17 -0
- package/lib/types/components/Menu/index.d.ts +1 -0
- package/lib/types/components/Modal/Modal.d.ts +11 -0
- package/lib/types/components/Modal/index.d.ts +3 -0
- package/lib/types/components/Modal/styles.d.ts +12 -0
- package/lib/types/components/Modal/use-modal.d.ts +10 -0
- package/lib/types/components/MultiSelectDropdown/MultiSelectDropdown.d.ts +19 -0
- package/lib/types/components/MultiSelectDropdown/index.d.ts +1 -0
- package/lib/types/components/Popover/Popover.d.ts +20 -0
- package/lib/types/components/Popover/index.d.ts +1 -0
- package/lib/types/components/Radio/Radio.d.ts +13 -0
- package/lib/types/components/Radio/index.d.ts +1 -0
- package/lib/types/components/RestTable/RestTable.d.ts +38 -0
- package/lib/types/components/RestTable/index.d.ts +1 -0
- package/lib/types/components/Table/Table.d.ts +129 -0
- package/lib/types/components/Table/index.d.ts +1 -0
- package/lib/types/components/Tabs/Tabs.d.ts +16 -0
- package/lib/types/components/Tabs/index.d.ts +1 -0
- package/lib/types/components/Tag/Tag.d.ts +7 -0
- package/lib/types/components/Tag/index.d.ts +1 -0
- package/lib/types/components/ThemeProvider/index.d.ts +12 -0
- package/lib/types/components/Toast/Toast.d.ts +14 -0
- package/lib/types/components/Toast/index.d.ts +3 -0
- package/lib/types/components/Toggle/Toggle.d.ts +15 -0
- package/lib/types/components/Toggle/index.d.ts +1 -0
- package/lib/types/components/Tooltip/Tooltip.d.ts +15 -0
- package/lib/types/components/Tooltip/index.d.ts +1 -0
- package/lib/types/components/Tooltip/tooltip-old.d.ts +14 -0
- package/lib/types/components/Transition/Transition.d.ts +14 -0
- package/lib/types/components/Transition/fade.d.ts +6 -0
- package/lib/types/components/Transition/index.d.ts +4 -0
- package/lib/types/components/Transition/slide-fade.d.ts +13 -0
- package/lib/types/components/Transition/slide.d.ts +11 -0
- package/lib/types/components/UiProvider/UiProvider.d.ts +2 -0
- package/lib/types/components/UiProvider/index.d.ts +1 -0
- package/lib/types/components/use-toasts/index.d.ts +1 -0
- package/lib/types/components/use-toasts/toast-container.d.ts +8 -0
- package/lib/types/components/use-toasts/toast-item.d.ts +15 -0
- package/lib/types/components/use-toasts/use-toast.d.ts +15 -0
- package/lib/types/index.d.ts +28 -29
- package/lib/types/theme/default/colors.d.ts +3 -0
- package/lib/types/theme/default/index.d.ts +7 -0
- package/lib/types/theme/default/palette.d.ts +3 -0
- package/lib/types/theme/default/typography.d.ts +3 -0
- package/lib/types/theme/freshstatus/colors.d.ts +3 -0
- package/lib/types/theme/freshstatus/index.d.ts +7 -0
- package/lib/types/theme/freshstatus/palette.d.ts +3 -0
- package/lib/types/theme/freshstatus/typography.d.ts +3 -0
- package/lib/types/theme/index.d.ts +352 -0
- package/lib/types/theme/shared.d.ts +2 -0
- package/lib/types/utils/date.d.ts +7 -0
- package/lib/types/utils/index.d.ts +1 -0
- package/lib/types/utils/use-current-state.d.ts +4 -0
- package/lib/types/utils/use-portal.d.ts +2 -0
- package/lib/types/utils/use-ssr.d.ts +6 -0
- package/lib/types/utils/use-ui-context.d.ts +11 -0
- package/lib/types/utils/with-defaults.d.ts +3 -0
- package/package.json +4 -2
|
@@ -0,0 +1,352 @@
|
|
|
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 {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getId: () => string;
|
|
@@ -0,0 +1,4 @@
|
|
|
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;
|
|
@@ -0,0 +1,11 @@
|
|
|
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "freemium-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.140",
|
|
4
4
|
"description": "React Ui Components for Freemium Apps",
|
|
5
5
|
"main": "lib/index.cjs.js",
|
|
6
6
|
"module": "lib/index.esm.js",
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"start": "webpack-dev-server --config webpack.config.js",
|
|
16
16
|
"build:dev": "webpack --config webpack.config.js",
|
|
17
17
|
"build": "rollup -c rollup.config.ts",
|
|
18
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
18
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
19
|
+
"prepublishOnly": "yarn run build"
|
|
19
20
|
},
|
|
20
21
|
"repository": {
|
|
21
22
|
"type": "git",
|
|
@@ -94,6 +95,7 @@
|
|
|
94
95
|
"react-docgen-typescript-loader": "3.7.1",
|
|
95
96
|
"react-dom": "^16.13.1",
|
|
96
97
|
"rollup": "2.18.0",
|
|
98
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
97
99
|
"rollup-plugin-typescript2": "0.27.1",
|
|
98
100
|
"style-loader": "^1.2.1",
|
|
99
101
|
"styled-components": "^5.1.1",
|