@bigtablet/design-system 1.0.1 → 1.1.2
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/client.d.ts +14 -0
- package/dist/client.js +32 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.js +3722 -17
- package/package.json +9 -7
- package/dist/index.cjs +0 -523
- package/dist/index.d.cts +0 -146
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react_toastify from 'react-toastify';
|
|
3
|
+
|
|
4
|
+
declare const ToastProvider: () => react_jsx_runtime.JSX.Element;
|
|
5
|
+
|
|
6
|
+
declare const useToast: () => {
|
|
7
|
+
success: (msg: string) => react_toastify.Id;
|
|
8
|
+
error: (msg: string) => react_toastify.Id;
|
|
9
|
+
warning: (msg: string) => react_toastify.Id;
|
|
10
|
+
info: (msg: string) => react_toastify.Id;
|
|
11
|
+
message: (msg: string) => react_toastify.Id;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { ToastProvider, useToast };
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ToastContainer, Slide, toast } from 'react-toastify';
|
|
2
|
+
import 'react-toastify/dist/ReactToastify.css';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
// src/ui/feedback/toast/index.tsx
|
|
6
|
+
var ToastProvider = () => /* @__PURE__ */ jsx(
|
|
7
|
+
ToastContainer,
|
|
8
|
+
{
|
|
9
|
+
position: "top-right",
|
|
10
|
+
autoClose: 2e3,
|
|
11
|
+
hideProgressBar: false,
|
|
12
|
+
newestOnTop: false,
|
|
13
|
+
closeOnClick: true,
|
|
14
|
+
rtl: false,
|
|
15
|
+
pauseOnFocusLoss: true,
|
|
16
|
+
draggable: true,
|
|
17
|
+
pauseOnHover: true,
|
|
18
|
+
theme: "light",
|
|
19
|
+
transition: Slide
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
var useToast = () => {
|
|
23
|
+
return {
|
|
24
|
+
success: (msg) => toast.success(msg),
|
|
25
|
+
error: (msg) => toast.error(msg),
|
|
26
|
+
warning: (msg) => toast.warning(msg),
|
|
27
|
+
info: (msg) => toast.info(msg),
|
|
28
|
+
message: (msg) => toast(msg)
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { ToastProvider, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ declare const Loading: ({ size }: {
|
|
|
24
24
|
}) => react_jsx_runtime.JSX.Element;
|
|
25
25
|
|
|
26
26
|
declare const ToastProvider: () => react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
27
28
|
declare const useToast: () => {
|
|
28
29
|
success: (msg: string) => react_toastify.Id;
|
|
29
30
|
error: (msg: string) => react_toastify.Id;
|
|
@@ -92,12 +93,9 @@ interface SelectProps {
|
|
|
92
93
|
id?: string;
|
|
93
94
|
label?: string;
|
|
94
95
|
placeholder?: string;
|
|
95
|
-
/** options 목록 */
|
|
96
96
|
options: SelectOption[];
|
|
97
|
-
/** 값 제어(컨트롤드) */
|
|
98
97
|
value?: string | null;
|
|
99
98
|
onChange?: (value: string | null, option?: SelectOption | null) => void;
|
|
100
|
-
/** 언컨트롤드 기본값 */
|
|
101
99
|
defaultValue?: string | null;
|
|
102
100
|
disabled?: boolean;
|
|
103
101
|
size?: SelectSize;
|
|
@@ -116,23 +114,25 @@ interface PaginationProps {
|
|
|
116
114
|
declare const Pagination: ({ page, total, onChange, siblingCount }: PaginationProps) => react_jsx_runtime.JSX.Element;
|
|
117
115
|
|
|
118
116
|
interface SidebarItem {
|
|
119
|
-
|
|
117
|
+
href: string;
|
|
120
118
|
label: React.ReactNode;
|
|
121
119
|
icon?: React.ComponentType<{
|
|
122
120
|
size?: number;
|
|
123
121
|
}>;
|
|
124
122
|
}
|
|
123
|
+
type MatchMode = "startsWith" | "exact";
|
|
125
124
|
interface SidebarProps {
|
|
126
125
|
items?: SidebarItem[];
|
|
127
|
-
|
|
128
|
-
onItemSelect?: (
|
|
126
|
+
activePath?: string;
|
|
127
|
+
onItemSelect?: (href: string) => void;
|
|
129
128
|
width?: number;
|
|
130
129
|
collapsible?: boolean;
|
|
131
130
|
defaultCollapsed?: boolean;
|
|
132
131
|
className?: string;
|
|
133
132
|
style?: React.CSSProperties;
|
|
133
|
+
match?: MatchMode;
|
|
134
134
|
}
|
|
135
|
-
declare const Sidebar: ({ items,
|
|
135
|
+
declare const Sidebar: ({ items, activePath, onItemSelect, width, collapsible, defaultCollapsed, className, style, match, }: SidebarProps) => react_jsx_runtime.JSX.Element;
|
|
136
136
|
|
|
137
137
|
interface ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
138
138
|
open: boolean;
|