@nation-a/ui 0.11.4 → 0.11.7
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/index.cjs +1274 -2101
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1266 -2093
- package/dist/index.js.map +1 -1
- package/dist/styled-system/styles.css +10 -46
- package/dist/types/components/Toast/index.d.ts +48 -26
- package/dist/types/components/Toast/toast.recipe.d.ts +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/contexts/index.d.ts +1 -1
- package/dist/types/utils/index.d.ts +1 -1
- package/package.json +2 -1
- package/dist/types/contexts/ToastProvider.d.ts +0 -9
- package/dist/types/hooks/useBottomSheet.d.ts +0 -20
- package/dist/types/utils/toast.d.ts +0 -57
|
@@ -1616,14 +1616,6 @@ html:not(#\#),body:not(#\#) {
|
|
|
1616
1616
|
color: currentcolor;
|
|
1617
1617
|
}
|
|
1618
1618
|
|
|
1619
|
-
.min-w_6:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1620
|
-
min-width: var(--sizes-6);
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
|
-
.min-h_6:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1624
|
-
min-height: var(--sizes-6);
|
|
1625
|
-
}
|
|
1626
|
-
|
|
1627
1619
|
.max-w_328px:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1628
1620
|
max-width: 328px;
|
|
1629
1621
|
}
|
|
@@ -1636,24 +1628,20 @@ html:not(#\#),body:not(#\#) {
|
|
|
1636
1628
|
color: var(--colors-content-neutral-inverse-bold);
|
|
1637
1629
|
}
|
|
1638
1630
|
|
|
1639
|
-
.
|
|
1640
|
-
|
|
1631
|
+
.px_3:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1632
|
+
padding-inline: var(--spacing-3);
|
|
1641
1633
|
}
|
|
1642
1634
|
|
|
1643
|
-
.
|
|
1644
|
-
|
|
1645
|
-
}
|
|
1646
|
-
|
|
1647
|
-
.trs_transform_0\.25s_ease-out:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1648
|
-
transition: transform 0.25s ease-out;
|
|
1635
|
+
.td_underline:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1636
|
+
text-decoration: underline;
|
|
1649
1637
|
}
|
|
1650
1638
|
|
|
1651
|
-
.
|
|
1652
|
-
|
|
1639
|
+
.min-w_6:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1640
|
+
min-width: var(--sizes-6);
|
|
1653
1641
|
}
|
|
1654
1642
|
|
|
1655
|
-
.
|
|
1656
|
-
|
|
1643
|
+
.min-h_6:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
1644
|
+
min-height: var(--sizes-6);
|
|
1657
1645
|
}
|
|
1658
1646
|
|
|
1659
1647
|
.ai_center:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
@@ -2183,16 +2171,8 @@ html:not(#\#),body:not(#\#) {
|
|
|
2183
2171
|
font-style: body.md;
|
|
2184
2172
|
}
|
|
2185
2173
|
|
|
2186
|
-
.
|
|
2187
|
-
|
|
2188
|
-
}
|
|
2189
|
-
|
|
2190
|
-
.pl_3:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2191
|
-
padding-left: var(--spacing-3);
|
|
2192
|
-
}
|
|
2193
|
-
|
|
2194
|
-
.ml_2:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2195
|
-
margin-left: var(--spacing-2);
|
|
2174
|
+
.ml_-1:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2175
|
+
margin-left: calc(var(--spacing-1) * -1);
|
|
2196
2176
|
}
|
|
2197
2177
|
|
|
2198
2178
|
:root:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) .light\:flex-flow_column,.light:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) .light\:flex-flow_column,.dark:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) .dark\:flex-flow_column {
|
|
@@ -2375,22 +2355,6 @@ html:not(#\#),body:not(#\#) {
|
|
|
2375
2355
|
background: var(--colors-background-neutral-selected);
|
|
2376
2356
|
}
|
|
2377
2357
|
|
|
2378
|
-
.\[\&\[data-state\=\"open\"\]\]\:anim_slide-in_0\.4s_cubic-bezier\(0\.05\,_0\.7\,_0\.1\,_1\.0\)[data-state="open"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2379
|
-
animation: slide-in 0.4s cubic-bezier(0.05, 0.7, 0.1, 1.0);
|
|
2380
|
-
}
|
|
2381
|
-
|
|
2382
|
-
.\[\&\[data-state\=\"open\"\]\]\:trf_translateY\(0px\)[data-state="open"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2383
|
-
transform: translateY(0px);
|
|
2384
|
-
}
|
|
2385
|
-
|
|
2386
|
-
.\[\&\[data-state\=\"closed\"\]\]\:anim_slide-out_0\.2s_cubic-bezier\(0\.3\,_0\.0\,_0\.8\,_0\.15\)[data-state="closed"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2387
|
-
animation: slide-out 0.2s cubic-bezier(0.3, 0.0, 0.8, 0.15);
|
|
2388
|
-
}
|
|
2389
|
-
|
|
2390
|
-
.\[\&\[data-state\=\"closed\"\]\]\:trf_translateY\(64px\)[data-state="closed"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
|
|
2391
|
-
transform: translateY(64px);
|
|
2392
|
-
}
|
|
2393
|
-
|
|
2394
2358
|
:root:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) .light\:ai_center,.light:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) .light\:ai_center,.dark:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) .dark\:ai_center {
|
|
2395
2359
|
align-items: center;
|
|
2396
2360
|
}
|
|
@@ -1,29 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ToastProps {
|
|
3
|
+
description: string;
|
|
4
|
+
option?: {
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
actionLabel?: string;
|
|
7
|
+
onActionClick?: () => void;
|
|
8
|
+
duration?: number;
|
|
9
|
+
asLink?: boolean;
|
|
10
|
+
disableCloseOnActionClick?: boolean;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
interface ToastComponent extends React.ForwardRefExoticComponent<ToastProps & React.RefAttributes<HTMLDivElement>> {
|
|
14
|
+
Root: typeof Root;
|
|
15
|
+
Content: typeof Content;
|
|
16
|
+
Description: typeof Description;
|
|
17
|
+
Icon: typeof Icon;
|
|
18
|
+
ActionTrigger: typeof ActionTrigger;
|
|
19
|
+
Toaster: typeof Toaster;
|
|
20
|
+
show: (description: ToastProps['description'], option?: ToastProps['option']) => void;
|
|
21
|
+
error: (description: ToastProps['description'], option?: ToastProps['option']) => void;
|
|
22
|
+
}
|
|
23
|
+
declare const Root: import('react').ForwardRefExoticComponent<{
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
className?: string;
|
|
26
|
+
width?: string;
|
|
27
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
28
|
+
declare const Content: import('react').ForwardRefExoticComponent<{
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
className?: string;
|
|
31
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
32
|
+
declare const Description: import('react').ForwardRefExoticComponent<{
|
|
33
|
+
children: ReactNode;
|
|
34
|
+
className?: string;
|
|
35
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
36
|
+
declare const Icon: import('react').ForwardRefExoticComponent<{
|
|
37
|
+
icon?: ReactNode;
|
|
38
|
+
className?: string;
|
|
39
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
40
|
+
declare const ActionTrigger: import('react').ForwardRefExoticComponent<{
|
|
41
|
+
onClick: () => void;
|
|
42
|
+
children: ReactNode;
|
|
43
|
+
className?: string;
|
|
8
44
|
asLink?: boolean;
|
|
45
|
+
} & import('react').RefAttributes<HTMLButtonElement | null>>;
|
|
46
|
+
declare const Toaster: {
|
|
47
|
+
(): import('react').ReactPortal;
|
|
48
|
+
displayName: string;
|
|
9
49
|
};
|
|
10
|
-
|
|
11
|
-
declare const Root: React.ForwardRefExoticComponent<Omit<RootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
type ActionTriggerProps = Assign<HTMLStyledProps<'button'>, ArkToast.ActionTriggerProps> & {
|
|
13
|
-
asLink?: boolean;
|
|
14
|
-
href?: string;
|
|
15
|
-
};
|
|
16
|
-
export declare const ActionTrigger: React.ForwardRefExoticComponent<Omit<ActionTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
-
export declare const Description: React.ForwardRefExoticComponent<Omit<Assign<HTMLStyledProps<"div">, ArkToast.DescriptionProps>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
-
export declare const Content: React.ForwardRefExoticComponent<Omit<HTMLStyledProps<"div">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
export declare const Icon: React.ForwardRefExoticComponent<Omit<HTMLStyledProps<"div">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
-
export { ToastContext as Context, Toaster, createToaster, type ToastContextProps as ContextProps, type ToasterProps, } from '@ark-ui/react/toast';
|
|
21
|
-
declare const Toast: {
|
|
22
|
-
Root: React.ForwardRefExoticComponent<Omit<RootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
-
ActionTrigger: React.ForwardRefExoticComponent<Omit<ActionTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
24
|
-
Content: React.ForwardRefExoticComponent<Omit<HTMLStyledProps<"div">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
-
Description: React.ForwardRefExoticComponent<Omit<Assign<HTMLStyledProps<"div">, ArkToast.DescriptionProps>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
-
Toaster: React.ForwardRefExoticComponent<import('@ark-ui/react').ToasterProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
-
Icon: React.ForwardRefExoticComponent<Omit<HTMLStyledProps<"div">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
-
};
|
|
50
|
+
declare const Toast: ToastComponent;
|
|
29
51
|
export default Toast;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type ToastVariantProps = keyof typeof toastRecipe.variantMap;
|
|
2
|
-
export declare const toastRecipe: import('../../../styled-system/types').SlotRecipeRuntimeFn<"
|
|
2
|
+
export declare const toastRecipe: import('../../../styled-system/types').SlotRecipeRuntimeFn<"description" | "content" | "icon" | "root" | "actionTrigger", {
|
|
3
3
|
width: {
|
|
4
4
|
full: {
|
|
5
5
|
root: {
|
|
@@ -10,4 +10,5 @@ export { Portal, type PortalProps } from '@ark-ui/react';
|
|
|
10
10
|
export { default as Input, type InputProps } from './Input';
|
|
11
11
|
export { default as TextArea, type TextAreaProps } from './TextArea';
|
|
12
12
|
export { default as Tabs, type TabsProps } from './Tabs';
|
|
13
|
+
export { default as Toast, type ToastProps } from './Toast';
|
|
13
14
|
export * from './Layout';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nation-a/ui",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"motion": "^12.6.3",
|
|
19
19
|
"react": "^18.3.1",
|
|
20
20
|
"react-dom": "^18.3.1",
|
|
21
|
+
"react-hot-toast": "^2.5.2",
|
|
21
22
|
"@nation-a/icons": "0.2.0",
|
|
22
23
|
"@nation-a/tokens": "0.2.1"
|
|
23
24
|
},
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
interface BottomSheetHookProps {
|
|
2
|
-
isOpen: boolean;
|
|
3
|
-
onOpen: (() => void) | undefined;
|
|
4
|
-
onClose: (() => void) | undefined;
|
|
5
|
-
snapPercent: {
|
|
6
|
-
min: number;
|
|
7
|
-
max: number | 'INNER_HEIGHT';
|
|
8
|
-
};
|
|
9
|
-
expendOnContentDrag: boolean;
|
|
10
|
-
}
|
|
11
|
-
declare const useBottomSheet: (props: BottomSheetHookProps) => {
|
|
12
|
-
bottomSheetRef: import('react').RefObject<HTMLDivElement>;
|
|
13
|
-
contentRef: import('react').RefObject<HTMLDivElement>;
|
|
14
|
-
snapToMax: () => void;
|
|
15
|
-
snapToMin: () => void;
|
|
16
|
-
springs: {
|
|
17
|
-
transform: import('@react-spring/web').SpringValue<string>;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
export default useBottomSheet;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
type ToastData = {
|
|
3
|
-
description: string;
|
|
4
|
-
action?: {
|
|
5
|
-
label: string;
|
|
6
|
-
onClick?: () => void;
|
|
7
|
-
};
|
|
8
|
-
icon?: React.ReactNode;
|
|
9
|
-
asLink?: boolean;
|
|
10
|
-
href?: string;
|
|
11
|
-
duration?: number;
|
|
12
|
-
};
|
|
13
|
-
type ToastOptions = {
|
|
14
|
-
icon?: React.ReactNode;
|
|
15
|
-
actionLabel?: string;
|
|
16
|
-
onActionClick?: () => void;
|
|
17
|
-
asLink?: boolean;
|
|
18
|
-
duration?: number;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Toast 유틸리티
|
|
22
|
-
* 실제 토스트 렌더링은 ToastProvider에서 담당
|
|
23
|
-
*/
|
|
24
|
-
declare const toast: {
|
|
25
|
-
queue: ToastData[];
|
|
26
|
-
_getQueue: () => ToastData[];
|
|
27
|
-
/**
|
|
28
|
-
* ToastProvider가 준비되었는지 확인하는 상태
|
|
29
|
-
*/
|
|
30
|
-
isReady: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* 대기 중인 토스트 메시지 큐
|
|
33
|
-
*/
|
|
34
|
-
pendingToasts: Array<[string, ToastOptions | undefined]>;
|
|
35
|
-
/**
|
|
36
|
-
* ToastProvider에서 호출하여 준비 상태를 설정
|
|
37
|
-
*/
|
|
38
|
-
_setReady: () => void;
|
|
39
|
-
show: (message: string, options?: ToastOptions) => void;
|
|
40
|
-
success: (message: string, options?: {
|
|
41
|
-
icon?: React.ReactNode;
|
|
42
|
-
duration?: number;
|
|
43
|
-
}) => void;
|
|
44
|
-
error: (message: string, options?: {
|
|
45
|
-
icon?: React.ReactNode;
|
|
46
|
-
duration?: number;
|
|
47
|
-
}) => void;
|
|
48
|
-
warning: (message: string, options?: {
|
|
49
|
-
icon?: React.ReactNode;
|
|
50
|
-
duration?: number;
|
|
51
|
-
}) => void;
|
|
52
|
-
info: (message: string, options?: {
|
|
53
|
-
icon?: React.ReactNode;
|
|
54
|
-
duration?: number;
|
|
55
|
-
}) => void;
|
|
56
|
-
};
|
|
57
|
-
export default toast;
|