@nation-a/ui 0.9.2 → 0.10.1

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.
@@ -1604,6 +1604,50 @@ html:not(#\#),body:not(#\#) {
1604
1604
  color: currentcolor;
1605
1605
  }
1606
1606
 
1607
+ .min-w_6:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
1608
+ min-width: var(--sizes-6);
1609
+ }
1610
+
1611
+ .min-h_6:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
1612
+ min-height: var(--sizes-6);
1613
+ }
1614
+
1615
+ .max-w_328px:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
1616
+ max-width: 328px;
1617
+ }
1618
+
1619
+ .ov-wrap_anywhere:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
1620
+ overflow-wrap: anywhere;
1621
+ }
1622
+
1623
+ .c_content\.neutralInverse\.bold:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
1624
+ color: var(--colors-content-neutral-inverse-bold);
1625
+ }
1626
+
1627
+ .bx-sh_overlay:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
1628
+ box-shadow: var(--shadows-overlay);
1629
+ }
1630
+
1631
+ .anim_fadeIn_0\.25s_ease-out:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
1632
+ animation: fadeIn 0.25s ease-out;
1633
+ }
1634
+
1635
+ .trf_translateY\(20px\):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
1636
+ transform: translateY(20px);
1637
+ }
1638
+
1639
+ .trs_transform_0\.25s_ease-out:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
1640
+ transition: transform 0.25s ease-out;
1641
+ }
1642
+
1643
+ .trs_opacity_0\.2s_ease:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
1644
+ transition: opacity 0.2s ease;
1645
+ }
1646
+
1647
+ .td_underline:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
1648
+ text-decoration: underline;
1649
+ }
1650
+
1607
1651
  .ai_center:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
1608
1652
  align-items: center;
1609
1653
  }
@@ -2111,6 +2155,26 @@ html:not(#\#),body:not(#\#) {
2111
2155
  font-family: var(--fonts-noto-sans);
2112
2156
  }
2113
2157
 
2158
+ .bg-c_background\.neutralInverse\.default:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
2159
+ background-color: var(--colors-background-neutral-inverse-default);
2160
+ }
2161
+
2162
+ .font-style_body\.md:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
2163
+ font-style: body.md;
2164
+ }
2165
+
2166
+ .pr_4:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
2167
+ padding-right: var(--spacing-4);
2168
+ }
2169
+
2170
+ .pl_3:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
2171
+ padding-left: var(--spacing-3);
2172
+ }
2173
+
2174
+ .ml_2:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
2175
+ margin-left: var(--spacing-2);
2176
+ }
2177
+
2114
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 {
2115
2179
  flex-flow: column;
2116
2180
  }
@@ -2287,6 +2351,22 @@ html:not(#\#),body:not(#\#) {
2287
2351
  background: var(--colors-background-neutral-selected);
2288
2352
  }
2289
2353
 
2354
+ .\[\&\[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(#\#) {
2355
+ animation: slide-in 0.4s cubic-bezier(0.05, 0.7, 0.1, 1.0);
2356
+ }
2357
+
2358
+ .\[\&\[data-state\=\"open\"\]\]\:trf_translateY\(0px\)[data-state="open"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
2359
+ transform: translateY(0px);
2360
+ }
2361
+
2362
+ .\[\&\[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(#\#) {
2363
+ animation: slide-out 0.2s cubic-bezier(0.3, 0.0, 0.8, 0.15);
2364
+ }
2365
+
2366
+ .\[\&\[data-state\=\"closed\"\]\]\:trf_translateY\(64px\)[data-state="closed"]:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
2367
+ transform: translateY(64px);
2368
+ }
2369
+
2290
2370
  :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 {
2291
2371
  align-items: center;
2292
2372
  }
@@ -2631,6 +2711,10 @@ html:not(#\#),body:not(#\#) {
2631
2711
  border-color: var(--colors-border-neutral-default);
2632
2712
  }
2633
2713
 
2714
+ .\[\&\:hover\]\:op_0\.8:hover:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) {
2715
+ opacity: 0.8;
2716
+ }
2717
+
2634
2718
  .group:is(:disabled, [disabled], [data-disabled]):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) .placeholder\:groupDisabled\:c_content\.static\.white\.disabled::placeholder, .group:is(:disabled, [disabled], [data-disabled]):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) .placeholder\:groupDisabled\:c_content\.static\.white\.disabled[data-placeholder] {
2635
2719
  color: var(--colors-content-static-white-disabled);
2636
2720
  }
@@ -0,0 +1,9 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { default as Toast } from './index';
3
+ declare const meta: Meta<typeof Toast>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Toast>;
6
+ export declare const DefaultToast: Story;
7
+ export declare const ToastWithAction: Story;
8
+ export declare const ToastWithLink: Story;
9
+ export declare const ToastWithCustomDuration: Story;
@@ -0,0 +1,29 @@
1
+ import { Assign } from '@ark-ui/react';
2
+ import { Toast as ArkToast } from '@ark-ui/react/toast';
3
+ import { ComponentProps, HTMLStyledProps } from 'styled-system/types';
4
+ import { default as React } from 'react';
5
+ export type ToastProps = ComponentProps<typeof Root>;
6
+ type ToastRecipeVariants = {
7
+ width?: 'full' | 'fit';
8
+ asLink?: boolean;
9
+ };
10
+ type RootProps = Assign<HTMLStyledProps<'div'>, ArkToast.RootProps> & ToastRecipeVariants;
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
+ };
29
+ export default Toast;
@@ -0,0 +1,24 @@
1
+ export type ToastVariantProps = keyof typeof toastRecipe.variantMap;
2
+ export declare const toastRecipe: import('../../../styled-system/types').SlotRecipeRuntimeFn<"title" | "description" | "group" | "content" | "icon" | "closeTrigger" | "root" | "actionTrigger", {
3
+ width: {
4
+ full: {
5
+ root: {
6
+ width: "100%";
7
+ justifyContent: "space-between";
8
+ };
9
+ };
10
+ fit: {
11
+ root: {
12
+ width: "fit-content";
13
+ };
14
+ };
15
+ };
16
+ asLink: {
17
+ true: {
18
+ actionTrigger: {
19
+ textDecoration: "underline";
20
+ cursor: "pointer";
21
+ };
22
+ };
23
+ };
24
+ }>;
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * 토스트 UI 렌더링을 담당하는 컴포넌트
4
+ * 앱의 루트 레벨(_app.tsx)에 배치 필수!
5
+ */
6
+ export declare const ToastProvider: ({ children }: {
7
+ children: ReactNode;
8
+ }) => import("react/jsx-runtime").JSX.Element;
9
+ export default ToastProvider;
@@ -0,0 +1 @@
1
+ export { default as ToastProvider } from './ToastProvider';
@@ -1,2 +1,4 @@
1
1
  export * from './components';
2
2
  export * from './theme';
3
+ export * from './contexts';
4
+ export * from './utils';
@@ -0,0 +1 @@
1
+ export { default as toast } from './toast';
@@ -0,0 +1,53 @@
1
+ import { default as React } from 'react';
2
+ /**
3
+ * Toast 유틸리티
4
+ * 실제 토스트 렌더링은 ToastProvider에서 담당
5
+ */
6
+ declare const toast: {
7
+ queue: Array<{
8
+ description: string;
9
+ action?: {
10
+ label: string;
11
+ onClick?: () => void;
12
+ };
13
+ icon?: React.ReactNode;
14
+ asLink?: boolean;
15
+ href?: string;
16
+ duration?: number;
17
+ }>;
18
+ _getQueue: () => {
19
+ description: string;
20
+ action?: {
21
+ label: string;
22
+ onClick?: () => void;
23
+ };
24
+ icon?: React.ReactNode;
25
+ asLink?: boolean;
26
+ href?: string;
27
+ duration?: number;
28
+ }[];
29
+ show: (message: string, options?: {
30
+ icon?: React.ReactNode;
31
+ actionLabel?: string;
32
+ onActionClick?: () => void;
33
+ asLink?: boolean;
34
+ duration?: number;
35
+ }) => void;
36
+ success: (message: string, options?: {
37
+ icon?: React.ReactNode;
38
+ duration?: number;
39
+ }) => void;
40
+ error: (message: string, options?: {
41
+ icon?: React.ReactNode;
42
+ duration?: number;
43
+ }) => void;
44
+ warning: (message: string, options?: {
45
+ icon?: React.ReactNode;
46
+ duration?: number;
47
+ }) => void;
48
+ info: (message: string, options?: {
49
+ icon?: React.ReactNode;
50
+ duration?: number;
51
+ }) => void;
52
+ };
53
+ export default toast;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nation-a/ui",
3
- "version": "0.9.2",
3
+ "version": "0.10.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -16,7 +16,7 @@
16
16
  "@react-spring/web": "^9.7.5",
17
17
  "react": "^18.3.1",
18
18
  "react-dom": "^18.3.1",
19
- "@nation-a/icons": "0.1.0",
19
+ "@nation-a/icons": "0.2.0",
20
20
  "@nation-a/tokens": "0.2.1"
21
21
  },
22
22
  "devDependencies": {