@exem-ui/react 0.3.4-next.20261006051232 → 0.3.4-next.20261013005830

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.d.mts CHANGED
@@ -1126,6 +1126,12 @@ type ToastInput = string | ToastOptions;
1126
1126
  * toast.info('정보');
1127
1127
  * toast.warning('경고');
1128
1128
  *
1129
+ * // 텍스트 버튼 (문구 오른쪽 한 줄)
1130
+ * toast.success({
1131
+ * title: '저장 완료',
1132
+ * action: { label: '되돌리기', onClick: () => handleUndo() },
1133
+ * });
1134
+ *
1129
1135
  * // title + description + action
1130
1136
  * toast.success({
1131
1137
  * title: '저장 완료',
package/dist/index.d.ts CHANGED
@@ -1126,6 +1126,12 @@ type ToastInput = string | ToastOptions;
1126
1126
  * toast.info('정보');
1127
1127
  * toast.warning('경고');
1128
1128
  *
1129
+ * // 텍스트 버튼 (문구 오른쪽 한 줄)
1130
+ * toast.success({
1131
+ * title: '저장 완료',
1132
+ * action: { label: '되돌리기', onClick: () => handleUndo() },
1133
+ * });
1134
+ *
1129
1135
  * // title + description + action
1130
1136
  * toast.success({
1131
1137
  * title: '저장 완료',
package/dist/index.js CHANGED
@@ -2257,7 +2257,7 @@ Toaster.Container = React__namespace.forwardRef(
2257
2257
  {
2258
2258
  ref,
2259
2259
  className: utils.cn(
2260
- "flex items-center gap-3 rounded-medium border border-border-primary bg-component-toast py-[10px] pl-3 pr-4 text-mono-light shadow-strong",
2260
+ "flex items-center gap-2 rounded-medium border border-border-primary bg-component-toast py-[10px] pl-3 pr-4 text-mono-light shadow-strong",
2261
2261
  "h-10 w-auto min-w-0 max-w-none",
2262
2262
  className
2263
2263
  ),
@@ -2324,7 +2324,8 @@ Toaster.Action = React__namespace.forwardRef(
2324
2324
  "flex h-7 min-h-[28px] w-auto min-w-[28px] shrink-0 items-center justify-center",
2325
2325
  "rounded-small bg-transparent px-0 py-0",
2326
2326
  "border-0 transition-colors",
2327
- "hover:bg-solid-primary-hovered",
2327
+ // Toast는 테마와 무관하게 어두운 배경이라 hover 배경도 고정 (solid-primary-hovered는 다크에서 밝아짐)
2328
+ "hover:bg-gray-07",
2328
2329
  "whitespace-nowrap",
2329
2330
  "cursor-pointer",
2330
2331
  "text-body-2",
@@ -2403,40 +2404,41 @@ function ToastContent({
2403
2404
  action,
2404
2405
  close
2405
2406
  }) {
2406
- const hasExtra = description || action;
2407
- if (hasExtra) {
2407
+ const closeButton = close && /* @__PURE__ */ jsxRuntime.jsx(
2408
+ Toaster.Action,
2409
+ {
2410
+ className: "rounded-medium",
2411
+ altText: "\uB2EB\uAE30",
2412
+ onClick: () => sonner.toast.dismiss(id)
2413
+ }
2414
+ );
2415
+ const renderAction = (className) => action && /* @__PURE__ */ jsxRuntime.jsx(
2416
+ Toaster.Action,
2417
+ {
2418
+ className: utils.cn("font-medium text-sky-04", className),
2419
+ onClick: () => {
2420
+ action.onClick();
2421
+ sonner.toast.dismiss(id);
2422
+ },
2423
+ children: action.label
2424
+ }
2425
+ );
2426
+ if (description) {
2408
2427
  return /* @__PURE__ */ jsxRuntime.jsxs(Toaster.Container, { className: "h-auto min-h-12 flex-col items-start gap-1 py-3", children: [
2409
2428
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center gap-2", children: [
2410
2429
  icon && /* @__PURE__ */ jsxRuntime.jsx(Toaster.Icon, { children: icon }),
2411
2430
  /* @__PURE__ */ jsxRuntime.jsx(Toaster.Title, { children: title }),
2412
- close && /* @__PURE__ */ jsxRuntime.jsx(Toaster.Action, { className: "rounded-medium", onClick: () => sonner.toast.dismiss(id) })
2413
- ] }),
2414
- description && /* @__PURE__ */ jsxRuntime.jsx(Toaster.Description, { children: description }),
2415
- action && /* @__PURE__ */ jsxRuntime.jsx(
2416
- Toaster.Action,
2417
- {
2418
- className: "mt-1 text-text-info hover:text-text-info-hovered",
2419
- onClick: () => {
2420
- action.onClick();
2421
- sonner.toast.dismiss(id);
2422
- },
2423
- children: action.label
2424
- }
2425
- )
2426
- ] });
2427
- }
2428
- if (close) {
2429
- return /* @__PURE__ */ jsxRuntime.jsxs(Toaster.Container, { className: "py-1.5 pr-1.5", children: [
2430
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 items-center gap-2 overflow-hidden", children: [
2431
- icon && /* @__PURE__ */ jsxRuntime.jsx(Toaster.Icon, { children: icon }),
2432
- /* @__PURE__ */ jsxRuntime.jsx(Toaster.Title, { children: title })
2431
+ closeButton
2433
2432
  ] }),
2434
- /* @__PURE__ */ jsxRuntime.jsx(Toaster.Action, { className: "rounded-medium", onClick: () => sonner.toast.dismiss(id) })
2433
+ /* @__PURE__ */ jsxRuntime.jsx(Toaster.Description, { children: description }),
2434
+ renderAction("mt-1")
2435
2435
  ] });
2436
2436
  }
2437
- return /* @__PURE__ */ jsxRuntime.jsxs(Toaster.Container, { children: [
2437
+ return /* @__PURE__ */ jsxRuntime.jsxs(Toaster.Container, { className: utils.cn((action || close) && "py-1.5 pr-1.5"), children: [
2438
2438
  icon && /* @__PURE__ */ jsxRuntime.jsx(Toaster.Icon, { children: icon }),
2439
- /* @__PURE__ */ jsxRuntime.jsx(Toaster.Title, { children: title })
2439
+ /* @__PURE__ */ jsxRuntime.jsx(Toaster.Title, { children: title }),
2440
+ renderAction("rounded-medium px-2"),
2441
+ closeButton
2440
2442
  ] });
2441
2443
  }
2442
2444
  function createToast(input, options, icon) {
package/dist/index.mjs CHANGED
@@ -2232,7 +2232,7 @@ Toaster.Container = React.forwardRef(
2232
2232
  {
2233
2233
  ref,
2234
2234
  className: cn(
2235
- "flex items-center gap-3 rounded-medium border border-border-primary bg-component-toast py-[10px] pl-3 pr-4 text-mono-light shadow-strong",
2235
+ "flex items-center gap-2 rounded-medium border border-border-primary bg-component-toast py-[10px] pl-3 pr-4 text-mono-light shadow-strong",
2236
2236
  "h-10 w-auto min-w-0 max-w-none",
2237
2237
  className
2238
2238
  ),
@@ -2299,7 +2299,8 @@ Toaster.Action = React.forwardRef(
2299
2299
  "flex h-7 min-h-[28px] w-auto min-w-[28px] shrink-0 items-center justify-center",
2300
2300
  "rounded-small bg-transparent px-0 py-0",
2301
2301
  "border-0 transition-colors",
2302
- "hover:bg-solid-primary-hovered",
2302
+ // Toast는 테마와 무관하게 어두운 배경이라 hover 배경도 고정 (solid-primary-hovered는 다크에서 밝아짐)
2303
+ "hover:bg-gray-07",
2303
2304
  "whitespace-nowrap",
2304
2305
  "cursor-pointer",
2305
2306
  "text-body-2",
@@ -2378,40 +2379,41 @@ function ToastContent({
2378
2379
  action,
2379
2380
  close
2380
2381
  }) {
2381
- const hasExtra = description || action;
2382
- if (hasExtra) {
2382
+ const closeButton = close && /* @__PURE__ */ jsx(
2383
+ Toaster.Action,
2384
+ {
2385
+ className: "rounded-medium",
2386
+ altText: "\uB2EB\uAE30",
2387
+ onClick: () => toast$1.dismiss(id)
2388
+ }
2389
+ );
2390
+ const renderAction = (className) => action && /* @__PURE__ */ jsx(
2391
+ Toaster.Action,
2392
+ {
2393
+ className: cn("font-medium text-sky-04", className),
2394
+ onClick: () => {
2395
+ action.onClick();
2396
+ toast$1.dismiss(id);
2397
+ },
2398
+ children: action.label
2399
+ }
2400
+ );
2401
+ if (description) {
2383
2402
  return /* @__PURE__ */ jsxs(Toaster.Container, { className: "h-auto min-h-12 flex-col items-start gap-1 py-3", children: [
2384
2403
  /* @__PURE__ */ jsxs("div", { className: "flex w-full items-center gap-2", children: [
2385
2404
  icon && /* @__PURE__ */ jsx(Toaster.Icon, { children: icon }),
2386
2405
  /* @__PURE__ */ jsx(Toaster.Title, { children: title }),
2387
- close && /* @__PURE__ */ jsx(Toaster.Action, { className: "rounded-medium", onClick: () => toast$1.dismiss(id) })
2388
- ] }),
2389
- description && /* @__PURE__ */ jsx(Toaster.Description, { children: description }),
2390
- action && /* @__PURE__ */ jsx(
2391
- Toaster.Action,
2392
- {
2393
- className: "mt-1 text-text-info hover:text-text-info-hovered",
2394
- onClick: () => {
2395
- action.onClick();
2396
- toast$1.dismiss(id);
2397
- },
2398
- children: action.label
2399
- }
2400
- )
2401
- ] });
2402
- }
2403
- if (close) {
2404
- return /* @__PURE__ */ jsxs(Toaster.Container, { className: "py-1.5 pr-1.5", children: [
2405
- /* @__PURE__ */ jsxs("div", { className: "flex flex-1 items-center gap-2 overflow-hidden", children: [
2406
- icon && /* @__PURE__ */ jsx(Toaster.Icon, { children: icon }),
2407
- /* @__PURE__ */ jsx(Toaster.Title, { children: title })
2406
+ closeButton
2408
2407
  ] }),
2409
- /* @__PURE__ */ jsx(Toaster.Action, { className: "rounded-medium", onClick: () => toast$1.dismiss(id) })
2408
+ /* @__PURE__ */ jsx(Toaster.Description, { children: description }),
2409
+ renderAction("mt-1")
2410
2410
  ] });
2411
2411
  }
2412
- return /* @__PURE__ */ jsxs(Toaster.Container, { children: [
2412
+ return /* @__PURE__ */ jsxs(Toaster.Container, { className: cn((action || close) && "py-1.5 pr-1.5"), children: [
2413
2413
  icon && /* @__PURE__ */ jsx(Toaster.Icon, { children: icon }),
2414
- /* @__PURE__ */ jsx(Toaster.Title, { children: title })
2414
+ /* @__PURE__ */ jsx(Toaster.Title, { children: title }),
2415
+ renderAction("rounded-medium px-2"),
2416
+ closeButton
2415
2417
  ] });
2416
2418
  }
2417
2419
  function createToast(input, options, icon) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exem-ui/react",
3
- "version": "0.3.4-next.20261006051232",
3
+ "version": "0.3.4-next.20261013005830",
4
4
  "description": "Exem Design System - React Components",
5
5
  "author": "Exem Design Team",
6
6
  "license": "Apache-2.0",
@@ -100,7 +100,7 @@
100
100
  "tailwind-merge": "^3.3.1",
101
101
  "tailwind-scrollbar-hide": "^4.0.0",
102
102
  "tiny-invariant": "^1.3.3",
103
- "@exem-ui/core": "0.3.3-next.20261006051232"
103
+ "@exem-ui/core": "0.3.3-next.20261013005830"
104
104
  },
105
105
  "devDependencies": {
106
106
  "@eslint/js": "^9.15.0",
@@ -136,7 +136,7 @@
136
136
  "tsup": "^8.5.0",
137
137
  "typescript": "^5.8.2",
138
138
  "typescript-eslint": "^8.16.0",
139
- "@exem-ui/tailwindcss3": "0.3.2-next.20261006051232"
139
+ "@exem-ui/tailwindcss3": "0.3.2-next.20261013005830"
140
140
  },
141
141
  "scripts": {
142
142
  "generate": "node scripts/generate-icons.js",