@tmlmobilidade/ui 0.0.4 → 20250124.1545.56
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/dist/cjs/index.js +400 -310
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/common/index.d.ts +1 -0
- package/dist/cjs/types/src/components/index.d.ts +0 -1
- package/dist/cjs/types/src/hooks/toast.d.ts +64 -0
- package/dist/cjs/types/src/index.d.ts +1 -0
- package/dist/esm/index.js +398 -313
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/common/index.d.ts +1 -0
- package/dist/esm/types/src/components/index.d.ts +0 -1
- package/dist/esm/types/src/hooks/toast.d.ts +64 -0
- package/dist/esm/types/src/index.d.ts +1 -0
- package/dist/index.d.ts +57 -32
- package/dist/styles.css +400 -460
- package/package.json +87 -86
- package/dist/cjs/types/src/components/authentication/LoginForm/index.d.ts +0 -45
- package/dist/cjs/types/src/components/authentication/LoginForm/use-login.d.ts +0 -8
- package/dist/cjs/types/src/components/authentication/index.d.ts +0 -1
- package/dist/esm/types/src/components/authentication/LoginForm/index.d.ts +0 -45
- package/dist/esm/types/src/components/authentication/LoginForm/use-login.d.ts +0 -8
- package/dist/esm/types/src/components/authentication/index.d.ts +0 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { NotificationData } from '@mantine/notifications';
|
|
2
|
+
export interface ToastProps extends NotificationData {
|
|
3
|
+
type?: 'error' | 'info' | 'success' | 'warning';
|
|
4
|
+
}
|
|
5
|
+
export interface ToastPromiseParams {
|
|
6
|
+
error?: string;
|
|
7
|
+
pending?: string;
|
|
8
|
+
success?: string;
|
|
9
|
+
}
|
|
10
|
+
declare class Toast {
|
|
11
|
+
/**
|
|
12
|
+
* Hides all toasts
|
|
13
|
+
*/
|
|
14
|
+
clean(): void;
|
|
15
|
+
/**
|
|
16
|
+
* Shows an error toast
|
|
17
|
+
* @param props - The toast props
|
|
18
|
+
*/
|
|
19
|
+
error(props: Omit<ToastProps, 'type'>): string;
|
|
20
|
+
/**
|
|
21
|
+
* Hides specific toast
|
|
22
|
+
* @param id - The toast id
|
|
23
|
+
*/
|
|
24
|
+
hide(id: string): void;
|
|
25
|
+
/**
|
|
26
|
+
* Shows an info toast
|
|
27
|
+
* @param props - The toast props
|
|
28
|
+
*/
|
|
29
|
+
info(props: Omit<ToastProps, 'type'>): string;
|
|
30
|
+
/**
|
|
31
|
+
* Shows a loading toast
|
|
32
|
+
* @param props - The toast props
|
|
33
|
+
*/
|
|
34
|
+
loading(props: Omit<ToastProps, 'loading' | 'type'>): string;
|
|
35
|
+
/**
|
|
36
|
+
* Promise wrapper for toast
|
|
37
|
+
* @param promise - The promise to be wrapped
|
|
38
|
+
* @param statusMessages - The status messages for the promise
|
|
39
|
+
*/
|
|
40
|
+
promise<T>(promise: (() => Promise<T>) | Promise<T>, { error, pending, success }: ToastPromiseParams): void;
|
|
41
|
+
/**
|
|
42
|
+
* Shows a toast
|
|
43
|
+
* @param props - The toast props
|
|
44
|
+
*/
|
|
45
|
+
show(props: ToastProps): string;
|
|
46
|
+
/**
|
|
47
|
+
* Shows a success toast
|
|
48
|
+
* @param props - The toast props
|
|
49
|
+
*/
|
|
50
|
+
success(props: Omit<ToastProps, 'type'>): string;
|
|
51
|
+
/**
|
|
52
|
+
* Updates a toast given its id
|
|
53
|
+
* @param id - The toast id
|
|
54
|
+
* @param props - The toast props
|
|
55
|
+
*/
|
|
56
|
+
update(id: string, props: ToastProps): void;
|
|
57
|
+
/**
|
|
58
|
+
* Shows a warning toast
|
|
59
|
+
* @param props - The toast props
|
|
60
|
+
*/
|
|
61
|
+
warning(props: Omit<ToastProps, 'type'>): string;
|
|
62
|
+
}
|
|
63
|
+
export declare const useToast: Toast;
|
|
64
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, SegmentedControlProps as SegmentedControlProps$1, TextInputProps as TextInputProps$1, PasswordInputProps as PasswordInputProps$1, TextareaProps, ComboboxProps, BadgeProps as BadgeProps$1, TooltipProps as TooltipProps$1, SwitchProps as SwitchProps$1, SliderProps as SliderProps$1, ActionIconProps as ActionIconProps$1, MenuProps as MenuProps$1, MenuTargetProps as MenuTargetProps$1, MenuDropdownProps as MenuDropdownProps$1, MenuItemProps as MenuItemProps$1, MenuDividerProps as MenuDividerProps$1, MenuLabelProps as MenuLabelProps$1 } from '@mantine/core';
|
|
3
3
|
import React$1 from 'react';
|
|
4
|
+
import { NotificationData } from '@mantine/notifications';
|
|
4
5
|
export * from '@mantine/hooks';
|
|
5
6
|
|
|
6
7
|
interface ButtonProps extends ButtonProps$1 {
|
|
@@ -94,6 +95,12 @@ declare namespace Menu {
|
|
|
94
95
|
var Label: (props: MenuLabelProps) => react_jsx_runtime.JSX.Element;
|
|
95
96
|
}
|
|
96
97
|
|
|
98
|
+
declare function CMIcon(): react_jsx_runtime.JSX.Element;
|
|
99
|
+
declare function CMLogo(): react_jsx_runtime.JSX.Element;
|
|
100
|
+
declare function TMLogoLight(): react_jsx_runtime.JSX.Element;
|
|
101
|
+
declare function TMLogoDark(): react_jsx_runtime.JSX.Element;
|
|
102
|
+
declare function TMLogo(): react_jsx_runtime.JSX.Element;
|
|
103
|
+
|
|
97
104
|
interface Props$1 extends React.HTMLAttributes<HTMLDivElement> {
|
|
98
105
|
columns?: 'a' | 'aab' | 'ab' | 'abb' | 'abc' | 'abcd';
|
|
99
106
|
hAlign?: 'center' | 'end' | 'start';
|
|
@@ -329,51 +336,69 @@ declare function Themer({ dark, light }: {
|
|
|
329
336
|
light: React.ReactNode;
|
|
330
337
|
}): react_jsx_runtime.JSX.Element;
|
|
331
338
|
|
|
332
|
-
|
|
339
|
+
declare function useScreenSize(): "mobile" | "tablet" | "desktop" | undefined;
|
|
340
|
+
|
|
341
|
+
interface ToastProps extends NotificationData {
|
|
342
|
+
type?: 'error' | 'info' | 'success' | 'warning';
|
|
343
|
+
}
|
|
344
|
+
interface ToastPromiseParams {
|
|
345
|
+
error?: string;
|
|
346
|
+
pending?: string;
|
|
347
|
+
success?: string;
|
|
348
|
+
}
|
|
349
|
+
declare class Toast {
|
|
350
|
+
/**
|
|
351
|
+
* Hides all toasts
|
|
352
|
+
*/
|
|
353
|
+
clean(): void;
|
|
333
354
|
/**
|
|
334
|
-
*
|
|
355
|
+
* Shows an error toast
|
|
356
|
+
* @param props - The toast props
|
|
335
357
|
*/
|
|
336
|
-
|
|
358
|
+
error(props: Omit<ToastProps, 'type'>): string;
|
|
337
359
|
/**
|
|
338
|
-
*
|
|
360
|
+
* Hides specific toast
|
|
361
|
+
* @param id - The toast id
|
|
339
362
|
*/
|
|
340
|
-
|
|
363
|
+
hide(id: string): void;
|
|
341
364
|
/**
|
|
342
|
-
*
|
|
343
|
-
* @
|
|
365
|
+
* Shows an info toast
|
|
366
|
+
* @param props - The toast props
|
|
344
367
|
*/
|
|
345
|
-
|
|
368
|
+
info(props: Omit<ToastProps, 'type'>): string;
|
|
346
369
|
/**
|
|
347
|
-
*
|
|
348
|
-
* @
|
|
370
|
+
* Shows a loading toast
|
|
371
|
+
* @param props - The toast props
|
|
372
|
+
*/
|
|
373
|
+
loading(props: Omit<ToastProps, 'loading' | 'type'>): string;
|
|
374
|
+
/**
|
|
375
|
+
* Promise wrapper for toast
|
|
376
|
+
* @param promise - The promise to be wrapped
|
|
377
|
+
* @param statusMessages - The status messages for the promise
|
|
378
|
+
*/
|
|
379
|
+
promise<T>(promise: (() => Promise<T>) | Promise<T>, { error, pending, success }: ToastPromiseParams): void;
|
|
380
|
+
/**
|
|
381
|
+
* Shows a toast
|
|
382
|
+
* @param props - The toast props
|
|
349
383
|
*/
|
|
350
|
-
|
|
384
|
+
show(props: ToastProps): string;
|
|
351
385
|
/**
|
|
352
|
-
*
|
|
386
|
+
* Shows a success toast
|
|
387
|
+
* @param props - The toast props
|
|
353
388
|
*/
|
|
354
|
-
|
|
389
|
+
success(props: Omit<ToastProps, 'type'>): string;
|
|
355
390
|
/**
|
|
356
|
-
*
|
|
391
|
+
* Updates a toast given its id
|
|
392
|
+
* @param id - The toast id
|
|
393
|
+
* @param props - The toast props
|
|
357
394
|
*/
|
|
358
|
-
|
|
395
|
+
update(id: string, props: ToastProps): void;
|
|
359
396
|
/**
|
|
360
|
-
*
|
|
397
|
+
* Shows a warning toast
|
|
398
|
+
* @param props - The toast props
|
|
361
399
|
*/
|
|
362
|
-
|
|
363
|
-
root?: string;
|
|
364
|
-
header?: string;
|
|
365
|
-
headerContent?: string;
|
|
366
|
-
headerTitle?: string;
|
|
367
|
-
headerDescription?: string;
|
|
368
|
-
headerImage?: string;
|
|
369
|
-
form?: string;
|
|
370
|
-
formFooter?: string;
|
|
371
|
-
formFooterLinks?: string;
|
|
372
|
-
formButton?: string;
|
|
373
|
-
};
|
|
400
|
+
warning(props: Omit<ToastProps, 'type'>): string;
|
|
374
401
|
}
|
|
375
|
-
declare
|
|
376
|
-
|
|
377
|
-
declare function useScreenSize(): "mobile" | "tablet" | "desktop" | undefined;
|
|
402
|
+
declare const useToast: Toast;
|
|
378
403
|
|
|
379
|
-
export { ActionIcon, Badge, Component$4 as Button, Checkbox, Component as Combobox, DataTable, type DataTableColumn, type DataTableColumnProps, type DataTableHeaderProps, type DataTableProps, type DataTableRowProps, type DataTableSearchProps, type DataTableTitleProps, Grid,
|
|
404
|
+
export { ActionIcon, Badge, Component$4 as Button, CMIcon, CMLogo, Checkbox, Component as Combobox, DataTable, type DataTableColumn, type DataTableColumnProps, type DataTableHeaderProps, type DataTableProps, type DataTableRowProps, type DataTableSearchProps, type DataTableTitleProps, Grid, Menu, Component$2 as PasswordInput, Section, SegmentedControl, Sidebar, Slider, Spacer, Surface, Switch, TMLogo, TMLogoDark, TMLogoLight, Component$1 as TextArea, Component$3 as TextInput, ThemeDark, ThemeLight, ThemeProvider, ThemeSwitcher, Themer, type ToastPromiseParams, type ToastProps, Tooltip, useScreenSize, useTheme, useToast };
|