@sarunyu/system-one 4.2.0 → 4.2.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/index.js CHANGED
@@ -3411,25 +3411,46 @@ const ALERT_CONFIG = {
3411
3411
  titleColor: "var(--accent-orange)",
3412
3412
  background: "https://www.figma.com/api/mcp/asset/f4ca68ad-5732-4124-9ff4-cfb69330cc02",
3413
3413
  layers: [
3414
- { inset: "12.5%", src: "https://www.figma.com/api/mcp/asset/7052a092-a432-4e8c-b559-6b51d28d878f" },
3415
- { inset: "22.5%", src: "https://www.figma.com/api/mcp/asset/a291a1b2-06c8-455c-8e21-29755aa05c57" },
3416
- { inset: "28.57% 30.71% 32.86% 30.71%", src: "https://www.figma.com/api/mcp/asset/a22c7520-55fe-4003-ba78-65dab40b9e23" }
3414
+ {
3415
+ inset: "12.5%",
3416
+ src: "https://www.figma.com/api/mcp/asset/7052a092-a432-4e8c-b559-6b51d28d878f"
3417
+ },
3418
+ {
3419
+ inset: "22.5%",
3420
+ src: "https://www.figma.com/api/mcp/asset/a291a1b2-06c8-455c-8e21-29755aa05c57"
3421
+ },
3422
+ {
3423
+ inset: "28.57% 30.71% 32.86% 30.71%",
3424
+ src: "https://www.figma.com/api/mcp/asset/a22c7520-55fe-4003-ba78-65dab40b9e23"
3425
+ }
3417
3426
  ]
3418
3427
  },
3419
3428
  success: {
3420
3429
  titleColor: "var(--success)",
3421
3430
  background: "https://www.figma.com/api/mcp/asset/2a865e6f-8a92-4496-88b5-71ac99e2c385",
3422
3431
  layers: [
3423
- { inset: "12.77%", src: "https://www.figma.com/api/mcp/asset/5878ce35-4f9a-4203-97a8-70a2f17b182c" },
3424
- { inset: "22.55%", src: "https://www.figma.com/api/mcp/asset/cea74180-b261-4db7-8712-6d32c4ccdeaf" }
3432
+ {
3433
+ inset: "12.77%",
3434
+ src: "https://www.figma.com/api/mcp/asset/5878ce35-4f9a-4203-97a8-70a2f17b182c"
3435
+ },
3436
+ {
3437
+ inset: "22.55%",
3438
+ src: "https://www.figma.com/api/mcp/asset/cea74180-b261-4db7-8712-6d32c4ccdeaf"
3439
+ }
3425
3440
  ]
3426
3441
  },
3427
3442
  danger: {
3428
3443
  titleColor: "var(--destructive)",
3429
3444
  background: "https://www.figma.com/api/mcp/asset/c7a65595-684e-4a04-b7fd-d443951f680a",
3430
3445
  layers: [
3431
- { inset: "12.77%", src: "https://www.figma.com/api/mcp/asset/10090345-ae32-4fc4-aff6-cba04ea93700" },
3432
- { inset: "22.55%", src: "https://www.figma.com/api/mcp/asset/3aa1156e-e48b-411f-ab98-93e1da98ecc1" }
3446
+ {
3447
+ inset: "12.77%",
3448
+ src: "https://www.figma.com/api/mcp/asset/10090345-ae32-4fc4-aff6-cba04ea93700"
3449
+ },
3450
+ {
3451
+ inset: "22.55%",
3452
+ src: "https://www.figma.com/api/mcp/asset/3aa1156e-e48b-411f-ab98-93e1da98ecc1"
3453
+ }
3433
3454
  ]
3434
3455
  }
3435
3456
  };
@@ -3451,32 +3472,42 @@ function Modal({
3451
3472
  }) {
3452
3473
  const isContent = variant === "content";
3453
3474
  const isAlert = variant === "alert";
3475
+ const isDialog = variant === "dialog";
3454
3476
  const isDesktop = responsive === "desktop";
3455
3477
  const alert = ALERT_CONFIG[alertStatus];
3456
3478
  return /* @__PURE__ */ jsxs(
3457
3479
  "div",
3458
3480
  {
3459
3481
  className: cn(
3460
- "max-w-full overflow-hidden border border-border bg-background",
3482
+ "w-auto overflow-hidden border border-border bg-background",
3461
3483
  isAlert ? "w-[343px] rounded-2xl" : "rounded-xl",
3462
- isContent ? "w-[343px]" : isAlert ? void 0 : "w-[375px]",
3484
+ isContent ? "min-w-[343px] max-w-[500px] " : isAlert ? void 0 : isDialog && "min-w-[375px] max-w-[500px]",
3463
3485
  className
3464
3486
  ),
3465
3487
  children: [
3466
- /* @__PURE__ */ jsxs("div", { className: cn("flex items-center px-4 pt-4", isAlert ? "justify-end" : "justify-between gap-4"), children: [
3467
- !isAlert ? /* @__PURE__ */ jsx("p", { className: "text-[18px] leading-7 font-bold text-foreground", children: title }) : null,
3468
- showClose ? /* @__PURE__ */ jsx(
3469
- Button,
3470
- {
3471
- "aria-label": "Close dialog",
3472
- className: "h-5 w-5 shrink-0 rounded-none text-subtle-text",
3473
- onClick: onClose,
3474
- size: "icon-xs",
3475
- variant: "plain-black",
3476
- children: /* @__PURE__ */ jsx(X, { size: 20, weight: "regular" })
3477
- }
3478
- ) : null
3479
- ] }),
3488
+ /* @__PURE__ */ jsxs(
3489
+ "div",
3490
+ {
3491
+ className: cn(
3492
+ "flex items-center px-4 pt-4",
3493
+ isAlert ? "justify-end" : "justify-between gap-4"
3494
+ ),
3495
+ children: [
3496
+ !isAlert ? /* @__PURE__ */ jsx("p", { className: "text-[18px] leading-7 font-bold text-foreground", children: title }) : null,
3497
+ showClose ? /* @__PURE__ */ jsx(
3498
+ Button,
3499
+ {
3500
+ "aria-label": "Close dialog",
3501
+ className: "h-5 w-5 shrink-0 rounded-none text-subtle-text",
3502
+ onClick: onClose,
3503
+ size: "icon-xs",
3504
+ variant: "plain-black",
3505
+ children: /* @__PURE__ */ jsx(X, { size: 20, weight: "regular" })
3506
+ }
3507
+ ) : null
3508
+ ]
3509
+ }
3510
+ ),
3480
3511
  /* @__PURE__ */ jsx("div", { className: cn("px-4 pb-6", isAlert ? "pt-0" : "pt-4"), children: isAlert ? /* @__PURE__ */ jsx(AlertBody, { config: alert, title, description }) : isContent ? /* @__PURE__ */ jsx("div", { className: "w-full", children: children ?? null }) : children ?? /* @__PURE__ */ jsx("p", { className: "text-sm leading-5 text-muted-foreground", children: description }) }),
3481
3512
  actionLayout !== "none" ? /* @__PURE__ */ jsx("div", { className: "px-4 pb-4", children: /* @__PURE__ */ jsx(
3482
3513
  ModalActions,
@@ -3501,11 +3532,40 @@ function AlertBody({
3501
3532
  }) {
3502
3533
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4 text-center", children: [
3503
3534
  /* @__PURE__ */ jsxs("div", { className: "relative size-[100px]", children: [
3504
- /* @__PURE__ */ jsx("img", { alt: "", className: "absolute inset-0 size-full", src: config.background }),
3505
- config.layers.map((layer) => /* @__PURE__ */ jsx("div", { className: "absolute", style: { inset: layer.inset }, children: /* @__PURE__ */ jsx("img", { alt: "", className: "absolute inset-0 size-full", src: layer.src }) }, layer.src))
3535
+ /* @__PURE__ */ jsx(
3536
+ "img",
3537
+ {
3538
+ alt: "",
3539
+ className: "absolute inset-0 size-full",
3540
+ src: config.background
3541
+ }
3542
+ ),
3543
+ config.layers.map((layer) => /* @__PURE__ */ jsx(
3544
+ "div",
3545
+ {
3546
+ className: "absolute",
3547
+ style: { inset: layer.inset },
3548
+ children: /* @__PURE__ */ jsx(
3549
+ "img",
3550
+ {
3551
+ alt: "",
3552
+ className: "absolute inset-0 size-full",
3553
+ src: layer.src
3554
+ }
3555
+ )
3556
+ },
3557
+ layer.src
3558
+ ))
3506
3559
  ] }),
3507
3560
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
3508
- /* @__PURE__ */ jsx("p", { className: "text-[18px] leading-7 font-bold", style: { color: config.titleColor }, children: title }),
3561
+ /* @__PURE__ */ jsx(
3562
+ "p",
3563
+ {
3564
+ className: "text-[18px] leading-7 font-bold",
3565
+ style: { color: config.titleColor },
3566
+ children: title
3567
+ }
3568
+ ),
3509
3569
  /* @__PURE__ */ jsx("p", { className: "text-sm leading-5 text-muted-foreground", children: description })
3510
3570
  ] })
3511
3571
  ] });
@@ -3535,8 +3595,26 @@ function ModalActions({
3535
3595
  const containerClass = isContent ? cn("flex gap-4", isDesktop ? "justify-end" : "flex-col") : "flex items-center gap-4";
3536
3596
  const buttonClass = isContent ? isDesktop ? void 0 : "w-full" : "min-w-0 flex-1";
3537
3597
  return /* @__PURE__ */ jsxs("div", { className: containerClass, children: [
3538
- /* @__PURE__ */ jsx(Button, { className: buttonClass, onClick: onSecondaryClick, size: "xl", variant: "outline", children: secondaryLabel }),
3539
- /* @__PURE__ */ jsx(Button, { className: buttonClass, onClick: onPrimaryClick, size: "xl", variant: "primary", children: primaryLabel })
3598
+ /* @__PURE__ */ jsx(
3599
+ Button,
3600
+ {
3601
+ className: buttonClass,
3602
+ onClick: onSecondaryClick,
3603
+ size: "xl",
3604
+ variant: "outline",
3605
+ children: secondaryLabel
3606
+ }
3607
+ ),
3608
+ /* @__PURE__ */ jsx(
3609
+ Button,
3610
+ {
3611
+ className: buttonClass,
3612
+ onClick: onPrimaryClick,
3613
+ size: "xl",
3614
+ variant: "primary",
3615
+ children: primaryLabel
3616
+ }
3617
+ )
3540
3618
  ] });
3541
3619
  }
3542
3620
  const OptionList = forwardRef(