@sarunyu/system-one 4.2.0 → 4.2.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.
package/dist/index.cjs CHANGED
@@ -3430,25 +3430,46 @@ const ALERT_CONFIG = {
3430
3430
  titleColor: "var(--accent-orange)",
3431
3431
  background: "https://www.figma.com/api/mcp/asset/f4ca68ad-5732-4124-9ff4-cfb69330cc02",
3432
3432
  layers: [
3433
- { inset: "12.5%", src: "https://www.figma.com/api/mcp/asset/7052a092-a432-4e8c-b559-6b51d28d878f" },
3434
- { inset: "22.5%", src: "https://www.figma.com/api/mcp/asset/a291a1b2-06c8-455c-8e21-29755aa05c57" },
3435
- { inset: "28.57% 30.71% 32.86% 30.71%", src: "https://www.figma.com/api/mcp/asset/a22c7520-55fe-4003-ba78-65dab40b9e23" }
3433
+ {
3434
+ inset: "12.5%",
3435
+ src: "https://www.figma.com/api/mcp/asset/7052a092-a432-4e8c-b559-6b51d28d878f"
3436
+ },
3437
+ {
3438
+ inset: "22.5%",
3439
+ src: "https://www.figma.com/api/mcp/asset/a291a1b2-06c8-455c-8e21-29755aa05c57"
3440
+ },
3441
+ {
3442
+ inset: "28.57% 30.71% 32.86% 30.71%",
3443
+ src: "https://www.figma.com/api/mcp/asset/a22c7520-55fe-4003-ba78-65dab40b9e23"
3444
+ }
3436
3445
  ]
3437
3446
  },
3438
3447
  success: {
3439
3448
  titleColor: "var(--success)",
3440
3449
  background: "https://www.figma.com/api/mcp/asset/2a865e6f-8a92-4496-88b5-71ac99e2c385",
3441
3450
  layers: [
3442
- { inset: "12.77%", src: "https://www.figma.com/api/mcp/asset/5878ce35-4f9a-4203-97a8-70a2f17b182c" },
3443
- { inset: "22.55%", src: "https://www.figma.com/api/mcp/asset/cea74180-b261-4db7-8712-6d32c4ccdeaf" }
3451
+ {
3452
+ inset: "12.77%",
3453
+ src: "https://www.figma.com/api/mcp/asset/5878ce35-4f9a-4203-97a8-70a2f17b182c"
3454
+ },
3455
+ {
3456
+ inset: "22.55%",
3457
+ src: "https://www.figma.com/api/mcp/asset/cea74180-b261-4db7-8712-6d32c4ccdeaf"
3458
+ }
3444
3459
  ]
3445
3460
  },
3446
3461
  danger: {
3447
3462
  titleColor: "var(--destructive)",
3448
3463
  background: "https://www.figma.com/api/mcp/asset/c7a65595-684e-4a04-b7fd-d443951f680a",
3449
3464
  layers: [
3450
- { inset: "12.77%", src: "https://www.figma.com/api/mcp/asset/10090345-ae32-4fc4-aff6-cba04ea93700" },
3451
- { inset: "22.55%", src: "https://www.figma.com/api/mcp/asset/3aa1156e-e48b-411f-ab98-93e1da98ecc1" }
3465
+ {
3466
+ inset: "12.77%",
3467
+ src: "https://www.figma.com/api/mcp/asset/10090345-ae32-4fc4-aff6-cba04ea93700"
3468
+ },
3469
+ {
3470
+ inset: "22.55%",
3471
+ src: "https://www.figma.com/api/mcp/asset/3aa1156e-e48b-411f-ab98-93e1da98ecc1"
3472
+ }
3452
3473
  ]
3453
3474
  }
3454
3475
  };
@@ -3476,26 +3497,35 @@ function Modal({
3476
3497
  "div",
3477
3498
  {
3478
3499
  className: cn(
3479
- "max-w-full overflow-hidden border border-border bg-background",
3500
+ "w-auto overflow-hidden border border-border bg-background",
3480
3501
  isAlert ? "w-[343px] rounded-2xl" : "rounded-xl",
3481
- isContent ? "w-[343px]" : isAlert ? void 0 : "w-[375px]",
3502
+ isContent ? "min-w-[343px] max-w-[500px] " : isAlert ? void 0 : "min-w-[375px] max-w-[500px]",
3482
3503
  className
3483
3504
  ),
3484
3505
  children: [
3485
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center px-4 pt-4", isAlert ? "justify-end" : "justify-between gap-4"), children: [
3486
- !isAlert ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[18px] leading-7 font-bold text-foreground", children: title }) : null,
3487
- showClose ? /* @__PURE__ */ jsxRuntime.jsx(
3488
- Button,
3489
- {
3490
- "aria-label": "Close dialog",
3491
- className: "h-5 w-5 shrink-0 rounded-none text-subtle-text",
3492
- onClick: onClose,
3493
- size: "icon-xs",
3494
- variant: "plain-black",
3495
- children: /* @__PURE__ */ jsxRuntime.jsx(react.X, { size: 20, weight: "regular" })
3496
- }
3497
- ) : null
3498
- ] }),
3506
+ /* @__PURE__ */ jsxRuntime.jsxs(
3507
+ "div",
3508
+ {
3509
+ className: cn(
3510
+ "flex items-center px-4 pt-4",
3511
+ isAlert ? "justify-end" : "justify-between gap-4"
3512
+ ),
3513
+ children: [
3514
+ !isAlert ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[18px] leading-7 font-bold text-foreground", children: title }) : null,
3515
+ showClose ? /* @__PURE__ */ jsxRuntime.jsx(
3516
+ Button,
3517
+ {
3518
+ "aria-label": "Close dialog",
3519
+ className: "h-5 w-5 shrink-0 rounded-none text-subtle-text",
3520
+ onClick: onClose,
3521
+ size: "icon-xs",
3522
+ variant: "plain-black",
3523
+ children: /* @__PURE__ */ jsxRuntime.jsx(react.X, { size: 20, weight: "regular" })
3524
+ }
3525
+ ) : null
3526
+ ]
3527
+ }
3528
+ ),
3499
3529
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("px-4 pb-6", isAlert ? "pt-0" : "pt-4"), children: isAlert ? /* @__PURE__ */ jsxRuntime.jsx(AlertBody, { config: alert, title, description }) : isContent ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full", children: children ?? null }) : children ?? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm leading-5 text-muted-foreground", children: description }) }),
3500
3530
  actionLayout !== "none" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 pb-4", children: /* @__PURE__ */ jsxRuntime.jsx(
3501
3531
  ModalActions,
@@ -3520,11 +3550,40 @@ function AlertBody({
3520
3550
  }) {
3521
3551
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-4 text-center", children: [
3522
3552
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative size-[100px]", children: [
3523
- /* @__PURE__ */ jsxRuntime.jsx("img", { alt: "", className: "absolute inset-0 size-full", src: config.background }),
3524
- config.layers.map((layer) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute", style: { inset: layer.inset }, children: /* @__PURE__ */ jsxRuntime.jsx("img", { alt: "", className: "absolute inset-0 size-full", src: layer.src }) }, layer.src))
3553
+ /* @__PURE__ */ jsxRuntime.jsx(
3554
+ "img",
3555
+ {
3556
+ alt: "",
3557
+ className: "absolute inset-0 size-full",
3558
+ src: config.background
3559
+ }
3560
+ ),
3561
+ config.layers.map((layer) => /* @__PURE__ */ jsxRuntime.jsx(
3562
+ "div",
3563
+ {
3564
+ className: "absolute",
3565
+ style: { inset: layer.inset },
3566
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3567
+ "img",
3568
+ {
3569
+ alt: "",
3570
+ className: "absolute inset-0 size-full",
3571
+ src: layer.src
3572
+ }
3573
+ )
3574
+ },
3575
+ layer.src
3576
+ ))
3525
3577
  ] }),
3526
3578
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2", children: [
3527
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[18px] leading-7 font-bold", style: { color: config.titleColor }, children: title }),
3579
+ /* @__PURE__ */ jsxRuntime.jsx(
3580
+ "p",
3581
+ {
3582
+ className: "text-[18px] leading-7 font-bold",
3583
+ style: { color: config.titleColor },
3584
+ children: title
3585
+ }
3586
+ ),
3528
3587
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm leading-5 text-muted-foreground", children: description })
3529
3588
  ] })
3530
3589
  ] });
@@ -3554,8 +3613,26 @@ function ModalActions({
3554
3613
  const containerClass = isContent ? cn("flex gap-4", isDesktop ? "justify-end" : "flex-col") : "flex items-center gap-4";
3555
3614
  const buttonClass = isContent ? isDesktop ? void 0 : "w-full" : "min-w-0 flex-1";
3556
3615
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: containerClass, children: [
3557
- /* @__PURE__ */ jsxRuntime.jsx(Button, { className: buttonClass, onClick: onSecondaryClick, size: "xl", variant: "outline", children: secondaryLabel }),
3558
- /* @__PURE__ */ jsxRuntime.jsx(Button, { className: buttonClass, onClick: onPrimaryClick, size: "xl", variant: "primary", children: primaryLabel })
3616
+ /* @__PURE__ */ jsxRuntime.jsx(
3617
+ Button,
3618
+ {
3619
+ className: buttonClass,
3620
+ onClick: onSecondaryClick,
3621
+ size: "xl",
3622
+ variant: "outline",
3623
+ children: secondaryLabel
3624
+ }
3625
+ ),
3626
+ /* @__PURE__ */ jsxRuntime.jsx(
3627
+ Button,
3628
+ {
3629
+ className: buttonClass,
3630
+ onClick: onPrimaryClick,
3631
+ size: "xl",
3632
+ variant: "primary",
3633
+ children: primaryLabel
3634
+ }
3635
+ )
3559
3636
  ] });
3560
3637
  }
3561
3638
  const OptionList = React.forwardRef(