@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.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
  };
@@ -3457,26 +3478,35 @@ function Modal({
3457
3478
  "div",
3458
3479
  {
3459
3480
  className: cn(
3460
- "max-w-full overflow-hidden border border-border bg-background",
3481
+ "w-auto overflow-hidden border border-border bg-background",
3461
3482
  isAlert ? "w-[343px] rounded-2xl" : "rounded-xl",
3462
- isContent ? "w-[343px]" : isAlert ? void 0 : "w-[375px]",
3483
+ isContent ? "min-w-[343px] max-w-[500px] " : isAlert ? void 0 : "min-w-[375px] max-w-[500px]",
3463
3484
  className
3464
3485
  ),
3465
3486
  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
- ] }),
3487
+ /* @__PURE__ */ jsxs(
3488
+ "div",
3489
+ {
3490
+ className: cn(
3491
+ "flex items-center px-4 pt-4",
3492
+ isAlert ? "justify-end" : "justify-between gap-4"
3493
+ ),
3494
+ children: [
3495
+ !isAlert ? /* @__PURE__ */ jsx("p", { className: "text-[18px] leading-7 font-bold text-foreground", children: title }) : null,
3496
+ showClose ? /* @__PURE__ */ jsx(
3497
+ Button,
3498
+ {
3499
+ "aria-label": "Close dialog",
3500
+ className: "h-5 w-5 shrink-0 rounded-none text-subtle-text",
3501
+ onClick: onClose,
3502
+ size: "icon-xs",
3503
+ variant: "plain-black",
3504
+ children: /* @__PURE__ */ jsx(X, { size: 20, weight: "regular" })
3505
+ }
3506
+ ) : null
3507
+ ]
3508
+ }
3509
+ ),
3480
3510
  /* @__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
3511
  actionLayout !== "none" ? /* @__PURE__ */ jsx("div", { className: "px-4 pb-4", children: /* @__PURE__ */ jsx(
3482
3512
  ModalActions,
@@ -3501,11 +3531,40 @@ function AlertBody({
3501
3531
  }) {
3502
3532
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4 text-center", children: [
3503
3533
  /* @__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))
3534
+ /* @__PURE__ */ jsx(
3535
+ "img",
3536
+ {
3537
+ alt: "",
3538
+ className: "absolute inset-0 size-full",
3539
+ src: config.background
3540
+ }
3541
+ ),
3542
+ config.layers.map((layer) => /* @__PURE__ */ jsx(
3543
+ "div",
3544
+ {
3545
+ className: "absolute",
3546
+ style: { inset: layer.inset },
3547
+ children: /* @__PURE__ */ jsx(
3548
+ "img",
3549
+ {
3550
+ alt: "",
3551
+ className: "absolute inset-0 size-full",
3552
+ src: layer.src
3553
+ }
3554
+ )
3555
+ },
3556
+ layer.src
3557
+ ))
3506
3558
  ] }),
3507
3559
  /* @__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 }),
3560
+ /* @__PURE__ */ jsx(
3561
+ "p",
3562
+ {
3563
+ className: "text-[18px] leading-7 font-bold",
3564
+ style: { color: config.titleColor },
3565
+ children: title
3566
+ }
3567
+ ),
3509
3568
  /* @__PURE__ */ jsx("p", { className: "text-sm leading-5 text-muted-foreground", children: description })
3510
3569
  ] })
3511
3570
  ] });
@@ -3535,8 +3594,26 @@ function ModalActions({
3535
3594
  const containerClass = isContent ? cn("flex gap-4", isDesktop ? "justify-end" : "flex-col") : "flex items-center gap-4";
3536
3595
  const buttonClass = isContent ? isDesktop ? void 0 : "w-full" : "min-w-0 flex-1";
3537
3596
  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 })
3597
+ /* @__PURE__ */ jsx(
3598
+ Button,
3599
+ {
3600
+ className: buttonClass,
3601
+ onClick: onSecondaryClick,
3602
+ size: "xl",
3603
+ variant: "outline",
3604
+ children: secondaryLabel
3605
+ }
3606
+ ),
3607
+ /* @__PURE__ */ jsx(
3608
+ Button,
3609
+ {
3610
+ className: buttonClass,
3611
+ onClick: onPrimaryClick,
3612
+ size: "xl",
3613
+ variant: "primary",
3614
+ children: primaryLabel
3615
+ }
3616
+ )
3540
3617
  ] });
3541
3618
  }
3542
3619
  const OptionList = forwardRef(