@sakaniui/react 0.3.27 → 0.3.28

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.mjs CHANGED
@@ -3480,16 +3480,16 @@ var X = {
3480
3480
  children: r
3481
3481
  })
3482
3482
  ]
3483
- }), Z = {
3483
+ }), ri = {
3484
3484
  search: "_search_1airw_2",
3485
3485
  search__icon: "_search__icon_1airw_25",
3486
3486
  search__input: "_search__input_1airw_26",
3487
3487
  search__placeholder: "_search__placeholder_1airw_38",
3488
3488
  search__kbd: "_search__kbd_1airw_39",
3489
3489
  collapsed: "_collapsed_1airw_53"
3490
- }, ri = ({ type: e = "field", placeholder: t = "Search…", collapsed: n, value: r, onChange: i, onClick: a }) => n ? /* @__PURE__ */ O("button", {
3490
+ }, ii = ({ type: e = "field", placeholder: t = "Search…", collapsed: n, value: r, onChange: i, onClick: a }) => n ? /* @__PURE__ */ O("button", {
3491
3491
  type: "button",
3492
- className: Z.collapsed,
3492
+ className: ri.collapsed,
3493
3493
  onClick: a,
3494
3494
  "aria-label": "Search",
3495
3495
  children: /* @__PURE__ */ O(st, {
@@ -3498,48 +3498,48 @@ var X = {
3498
3498
  })
3499
3499
  }) : e === "command" ? /* @__PURE__ */ k("button", {
3500
3500
  type: "button",
3501
- className: Z.search,
3501
+ className: ri.search,
3502
3502
  onClick: a,
3503
3503
  children: [
3504
3504
  /* @__PURE__ */ O(st, {
3505
3505
  size: 16,
3506
3506
  strokeWidth: E(16),
3507
- className: Z.search__icon
3507
+ className: ri.search__icon
3508
3508
  }),
3509
3509
  /* @__PURE__ */ O("span", {
3510
- className: Z.search__placeholder,
3510
+ className: ri.search__placeholder,
3511
3511
  children: t
3512
3512
  }),
3513
3513
  /* @__PURE__ */ O("kbd", {
3514
- className: Z.search__kbd,
3514
+ className: ri.search__kbd,
3515
3515
  children: "⌘K"
3516
3516
  })
3517
3517
  ]
3518
3518
  }) : /* @__PURE__ */ k("div", {
3519
- className: Z.search,
3519
+ className: ri.search,
3520
3520
  children: [/* @__PURE__ */ O(st, {
3521
3521
  size: 16,
3522
3522
  strokeWidth: E(16),
3523
- className: Z.search__icon
3523
+ className: ri.search__icon
3524
3524
  }), /* @__PURE__ */ O("input", {
3525
- className: Z.search__input,
3525
+ className: ri.search__input,
3526
3526
  placeholder: t,
3527
3527
  value: r,
3528
3528
  onChange: (e) => i?.(e.target.value)
3529
3529
  })]
3530
- }), ii = {
3530
+ }), ai = {
3531
3531
  spinner: "_spinner_14r00_3",
3532
3532
  "spinner--sm": "_spinner--sm_14r00_12",
3533
3533
  "spinner--md": "_spinner--md_14r00_13",
3534
3534
  "spinner--lg": "_spinner--lg_14r00_14",
3535
3535
  spinner__svg: "_spinner__svg_14r00_17",
3536
3536
  "spinner-rotate": "_spinner-rotate_14r00_1"
3537
- }, ai = ({ size: e = "md", label: t = "Loading...", className: n }) => /* @__PURE__ */ O("span", {
3537
+ }, oi = ({ size: e = "md", label: t = "Loading...", className: n }) => /* @__PURE__ */ O("span", {
3538
3538
  role: "status",
3539
3539
  "aria-label": t,
3540
3540
  className: [
3541
- ii.spinner,
3542
- ii[`spinner--${e}`],
3541
+ ai.spinner,
3542
+ ai[`spinner--${e}`],
3543
3543
  n ?? ""
3544
3544
  ].filter(Boolean).join(" "),
3545
3545
  children: /* @__PURE__ */ k("svg", {
@@ -3549,7 +3549,7 @@ var X = {
3549
3549
  strokeWidth: 2.5,
3550
3550
  strokeLinecap: "round",
3551
3551
  "aria-hidden": "true",
3552
- className: ii.spinner__svg,
3552
+ className: ai.spinner__svg,
3553
3553
  children: [/* @__PURE__ */ O("circle", {
3554
3554
  cx: 12,
3555
3555
  cy: 12,
@@ -3557,10 +3557,10 @@ var X = {
3557
3557
  opacity: .2
3558
3558
  }), /* @__PURE__ */ O("path", {
3559
3559
  d: "M12 3a9 9 0 0 1 9 9",
3560
- className: ii.spinner__arc
3560
+ className: ai.spinner__arc
3561
3561
  })]
3562
3562
  })
3563
- }), Q = {
3563
+ }), Z = {
3564
3564
  card: "_card_u5kvg_4",
3565
3565
  "card--featured": "_card--featured_u5kvg_24",
3566
3566
  card__head: "_card__head_u5kvg_26",
@@ -3573,19 +3573,19 @@ var X = {
3573
3573
  "card--trend-up": "_card--trend-up_u5kvg_68",
3574
3574
  "card--trend-down": "_card--trend-down_u5kvg_69",
3575
3575
  card__description: "_card__description_u5kvg_72"
3576
- }, oi = {
3576
+ }, si = {
3577
3577
  up: ut,
3578
3578
  down: lt,
3579
3579
  flat: tt
3580
- }, si = {
3580
+ }, ci = {
3581
3581
  up: "success",
3582
3582
  down: "danger",
3583
3583
  flat: "neutral"
3584
- }, ci = ({ data: e }) => {
3584
+ }, li = ({ data: e }) => {
3585
3585
  if (e.length < 2) return null;
3586
3586
  let t = Math.min(...e), n = Math.max(...e) - t || 1;
3587
3587
  return /* @__PURE__ */ O("svg", {
3588
- className: li,
3588
+ className: ui,
3589
3589
  viewBox: "0 0 100 32",
3590
3590
  preserveAspectRatio: "none",
3591
3591
  "aria-hidden": "true",
@@ -3598,21 +3598,21 @@ var X = {
3598
3598
  strokeLinecap: "round"
3599
3599
  })
3600
3600
  });
3601
- }, li = Q.card__sparkline, ui = ({ title: e, value: t, description: n, sparkline: r, delta: i, trend: a = "up", badgeVariant: o, variant: s = "minimal", icon: c, showMenu: l, onMenu: u, className: d }) => {
3602
- let f = oi[a], p = (s === "icon" || s === "featured") && c;
3601
+ }, ui = Z.card__sparkline, di = ({ title: e, value: t, description: n, sparkline: r, delta: i, trend: a = "up", badgeVariant: o, variant: s = "minimal", icon: c, showMenu: l, onMenu: u, className: d }) => {
3602
+ let f = si[a], p = (s === "icon" || s === "featured") && c;
3603
3603
  return /* @__PURE__ */ k("div", {
3604
3604
  className: [
3605
- Q.card,
3606
- Q[`card--${s}`],
3607
- Q[`card--trend-${a}`],
3605
+ Z.card,
3606
+ Z[`card--${s}`],
3607
+ Z[`card--trend-${a}`],
3608
3608
  d ?? ""
3609
3609
  ].filter(Boolean).join(" "),
3610
3610
  children: [
3611
3611
  /* @__PURE__ */ k("div", {
3612
- className: Q.card__head,
3612
+ className: Z.card__head,
3613
3613
  children: [
3614
3614
  p && /* @__PURE__ */ O("span", {
3615
- className: Q.card__icon,
3615
+ className: Z.card__icon,
3616
3616
  "aria-hidden": "true",
3617
3617
  children: /* @__PURE__ */ O(c, {
3618
3618
  size: 18,
@@ -3620,12 +3620,12 @@ var X = {
3620
3620
  })
3621
3621
  }),
3622
3622
  /* @__PURE__ */ O("span", {
3623
- className: Q.card__title,
3623
+ className: Z.card__title,
3624
3624
  children: e
3625
3625
  }),
3626
3626
  l && /* @__PURE__ */ O("button", {
3627
3627
  type: "button",
3628
- className: Q.card__menu,
3628
+ className: Z.card__menu,
3629
3629
  onClick: u,
3630
3630
  "aria-label": "More options",
3631
3631
  children: /* @__PURE__ */ O(nt, {
@@ -3636,27 +3636,27 @@ var X = {
3636
3636
  ]
3637
3637
  }),
3638
3638
  /* @__PURE__ */ O("div", {
3639
- className: Q.card__value,
3639
+ className: Z.card__value,
3640
3640
  children: t
3641
3641
  }),
3642
- r && /* @__PURE__ */ O(ci, { data: r }),
3642
+ r && /* @__PURE__ */ O(li, { data: r }),
3643
3643
  (i || n) && /* @__PURE__ */ k("div", {
3644
- className: Q.card__meta,
3644
+ className: Z.card__meta,
3645
3645
  children: [i && /* @__PURE__ */ O(C, {
3646
- variant: o ?? si[a],
3646
+ variant: o ?? ci[a],
3647
3647
  leftIcon: /* @__PURE__ */ O(f, {
3648
3648
  size: 12,
3649
3649
  strokeWidth: 2
3650
3650
  }),
3651
3651
  children: i
3652
3652
  }), n && /* @__PURE__ */ O("p", {
3653
- className: Q.card__description,
3653
+ className: Z.card__description,
3654
3654
  children: n
3655
3655
  })]
3656
3656
  })
3657
3657
  ]
3658
3658
  });
3659
- }, $ = {
3659
+ }, Q = {
3660
3660
  stepper: "_stepper_kxw14_3",
3661
3661
  "stepper--horizontal": "_stepper--horizontal_kxw14_4",
3662
3662
  "stepper--vertical": "_stepper--vertical_kxw14_5",
@@ -3677,41 +3677,41 @@ var X = {
3677
3677
  "connector--horizontal": "_connector--horizontal_kxw14_47",
3678
3678
  "connector--vertical": "_connector--vertical_kxw14_48",
3679
3679
  "connector--filled": "_connector--filled_kxw14_49"
3680
- }, di = ({ index: e, state: t, label: n, description: r, orientation: i = "horizontal" }) => /* @__PURE__ */ k("div", {
3681
- className: [$.step, $[`step--${i}`]].join(" "),
3680
+ }, fi = ({ index: e, state: t, label: n, description: r, orientation: i = "horizontal" }) => /* @__PURE__ */ k("div", {
3681
+ className: [Q.step, Q[`step--${i}`]].join(" "),
3682
3682
  children: [/* @__PURE__ */ O("span", {
3683
- className: [$.circle, $[`circle--${t}`]].join(" "),
3683
+ className: [Q.circle, Q[`circle--${t}`]].join(" "),
3684
3684
  "aria-hidden": "true",
3685
3685
  children: t === "completed" ? /* @__PURE__ */ O(Ge, {
3686
3686
  size: 14,
3687
3687
  strokeWidth: E(14)
3688
3688
  }) : /* @__PURE__ */ O("span", {
3689
- className: $.circle__num,
3689
+ className: Q.circle__num,
3690
3690
  children: e + 1
3691
3691
  })
3692
3692
  }), /* @__PURE__ */ k("span", {
3693
- className: $.step__text,
3693
+ className: Q.step__text,
3694
3694
  children: [/* @__PURE__ */ O("span", {
3695
3695
  className: [
3696
- $.step__label,
3697
- t === "current" ? $["step__label--current"] : "",
3698
- t === "upcoming" ? $["step__label--upcoming"] : ""
3696
+ Q.step__label,
3697
+ t === "current" ? Q["step__label--current"] : "",
3698
+ t === "upcoming" ? Q["step__label--upcoming"] : ""
3699
3699
  ].filter(Boolean).join(" "),
3700
3700
  children: n
3701
3701
  }), r && /* @__PURE__ */ O("span", {
3702
- className: $.step__desc,
3702
+ className: Q.step__desc,
3703
3703
  children: r
3704
3704
  })]
3705
3705
  })]
3706
- }), fi = ({ steps: e, current: t, orientation: n = "horizontal", className: r }) => {
3706
+ }), pi = ({ steps: e, current: t, orientation: n = "horizontal", className: r }) => {
3707
3707
  let i = (e) => e < t ? "completed" : e === t ? "current" : "upcoming";
3708
3708
  return /* @__PURE__ */ O("div", {
3709
3709
  className: [
3710
- $.stepper,
3711
- $[`stepper--${n}`],
3710
+ Q.stepper,
3711
+ Q[`stepper--${n}`],
3712
3712
  r ?? ""
3713
3713
  ].filter(Boolean).join(" "),
3714
- children: e.map((r, a) => /* @__PURE__ */ k(D.Fragment, { children: [/* @__PURE__ */ O(di, {
3714
+ children: e.map((r, a) => /* @__PURE__ */ k(D.Fragment, { children: [/* @__PURE__ */ O(fi, {
3715
3715
  index: a,
3716
3716
  state: i(a),
3717
3717
  label: r.label,
@@ -3719,46 +3719,59 @@ var X = {
3719
3719
  orientation: n
3720
3720
  }), a < e.length - 1 && /* @__PURE__ */ O("span", {
3721
3721
  className: [
3722
- $.connector,
3723
- $[`connector--${n}`],
3724
- a < t ? $["connector--filled"] : ""
3722
+ Q.connector,
3723
+ Q[`connector--${n}`],
3724
+ a < t ? Q["connector--filled"] : ""
3725
3725
  ].filter(Boolean).join(" "),
3726
3726
  "aria-hidden": "true"
3727
3727
  })] }, a))
3728
3728
  });
3729
- }, pi = {
3730
- wrapper: "_wrapper_k5grn_3",
3731
- "wrapper--disabled": "_wrapper--disabled_k5grn_11",
3732
- input: "_input_k5grn_13",
3733
- track: "_track_k5grn_15",
3734
- thumb: "_thumb_k5grn_28",
3735
- label: "_label_k5grn_55"
3736
- }, mi = D.forwardRef(({ label: e, disabled: t, id: n, className: r, ...i }, a) => {
3737
- let o = D.useId(), s = n ?? o;
3729
+ }, $ = {
3730
+ wrapper: "_wrapper_1xxik_3",
3731
+ "wrapper--disabled": "_wrapper--disabled_1xxik_11",
3732
+ input: "_input_1xxik_13",
3733
+ track: "_track_1xxik_15",
3734
+ thumb: "_thumb_1xxik_28",
3735
+ label: "_label_1xxik_55",
3736
+ "wrapper--withDescription": "_wrapper--withDescription_1xxik_60",
3737
+ text: "_text_1xxik_61",
3738
+ description: "_description_1xxik_63"
3739
+ }, mi = D.forwardRef(({ label: e, description: t, disabled: n, id: r, className: i, ...a }, o) => {
3740
+ let s = D.useId(), c = r ?? s;
3738
3741
  return /* @__PURE__ */ k("label", {
3739
- htmlFor: s,
3742
+ htmlFor: c,
3740
3743
  className: [
3741
- pi.wrapper,
3742
- t ? pi["wrapper--disabled"] : "",
3743
- r ?? ""
3744
+ $.wrapper,
3745
+ t ? $["wrapper--withDescription"] : "",
3746
+ n ? $["wrapper--disabled"] : "",
3747
+ i ?? ""
3744
3748
  ].filter(Boolean).join(" "),
3745
3749
  children: [
3746
3750
  /* @__PURE__ */ O("input", {
3747
- ref: a,
3748
- id: s,
3751
+ ref: o,
3752
+ id: c,
3749
3753
  type: "checkbox",
3750
3754
  role: "switch",
3751
- disabled: t,
3752
- className: pi.input,
3753
- ...i
3755
+ disabled: n,
3756
+ className: $.input,
3757
+ ...a
3754
3758
  }),
3755
3759
  /* @__PURE__ */ O("span", {
3756
- className: pi.track,
3760
+ className: $.track,
3757
3761
  "aria-hidden": "true",
3758
- children: /* @__PURE__ */ O("span", { className: pi.thumb })
3762
+ children: /* @__PURE__ */ O("span", { className: $.thumb })
3759
3763
  }),
3760
- e && /* @__PURE__ */ O("span", {
3761
- className: pi.label,
3764
+ t ? /* @__PURE__ */ k("span", {
3765
+ className: $.text,
3766
+ children: [e && /* @__PURE__ */ O("span", {
3767
+ className: $.label,
3768
+ children: e
3769
+ }), /* @__PURE__ */ O("span", {
3770
+ className: $.description,
3771
+ children: t
3772
+ })]
3773
+ }) : e && /* @__PURE__ */ O("span", {
3774
+ className: $.label,
3762
3775
  children: e
3763
3776
  })
3764
3777
  ]
@@ -3968,4 +3981,4 @@ var _i = {
3968
3981
  ]
3969
3982
  });
3970
3983
  //#endregion
3971
- export { ce as Accordion, de as AccordionItem, oe as ActivityFeed, ye as ActivityFeedHighlight, h as Alert, zt as Announcement, Wn as AreaChart, Pe as Avatar, m as AvatarGroup, he as AvatarUpload, C as Badge, Oe as Balance, on as BarChart, _n as BlogBlockquote, yn as BlogFeatureText, xn as BlogImage, l as BlogListingCard, o as BlogListingFeaturedCard, i as BoardCard, Gn as BoardColumn, Ie as Breadcrumb, w as Button, Xn as Calendar, Zn as Card, r as CardMetaItem, u as CartItem, y as ChatComposer, Le as Checkbox, d as CheckoutSteps, Ut as CodeSnippet, S as ColorSwatch, Qn as Combobox, T as ConversationItem, Ee as DEFAULT_CHECKOUT_STEPS, Me as Divider, tr as DonutChart, Re as EmptyState, Kt as Expenses, g as FeaturedIcon, nr as FileUpload, Fe as FilterChip, Cn as FirstPageHeading, sr as FunnelChart, ur as HeatmapChart, b as HoverGroup, we as IconButton, Yt as InlineHint, re as Input, ge as JobListing, fr as Kbd, mr as Label, vr as LineChart, Ae as Link, Tn as List, br as ListItem, p as LocationDot, On as Marquee, Sr as Menu, Cr as MenuDivider, Tr as MenuItem, fe as MessageBubble, An as Metric, jn as MobileNavigationMenu, le as Modal, e as NotificationItem, pe as Pagination, Nr as PieChart, Pn as PlaceholderLogo, Pr as Popover, x as PriceDisplay, ee as ProductCard, n as ProductGallery, Fn as ProfileCard, Se as Progress, Xt as ProgressItem, _ as ProgressStat, te as QuantitySelector, Wr as RadarChart, Qr as RadialChart, $r as Radio, Qt as RichSeparator, Ln as RichTextHeading, zn as RichTextParagraph, t as SectionHeading, be as SegmentedControl, Te as Select, ue as Sidebar, se as SidebarDivider, ei as SidebarFooter, Ne as SidebarGroupLabel, ve as SidebarHeader, ae as SidebarItem, ni as SidebarPromo, ri as SidebarSearch, ke as SidebarSubItem, ze as SizeSelector, Ce as Skeleton, ie as Slider, ne as SpendingBalance, ai as Spinner, v as StarRating, ui as StatCard, fi as Stepper, di as StepperStep, cn as StockMarket, f as StockStatus, Vn as SubFeature, mi as Switch, me as Table, De as Tabs, dn as Tags, _e as TeamCard, gi as Textarea, mn as Ticker, yi as Toast, xe as Tooltip, je as TopBar, xi as TopBarMobile, gn as Transactions, c as WishlistButton, s as getContrastColor, E as iconStrokeWidth, a as useHoverHighlight };
3984
+ export { ce as Accordion, de as AccordionItem, oe as ActivityFeed, ye as ActivityFeedHighlight, h as Alert, zt as Announcement, Wn as AreaChart, Pe as Avatar, m as AvatarGroup, he as AvatarUpload, C as Badge, Oe as Balance, on as BarChart, _n as BlogBlockquote, yn as BlogFeatureText, xn as BlogImage, l as BlogListingCard, o as BlogListingFeaturedCard, i as BoardCard, Gn as BoardColumn, Ie as Breadcrumb, w as Button, Xn as Calendar, Zn as Card, r as CardMetaItem, u as CartItem, y as ChatComposer, Le as Checkbox, d as CheckoutSteps, Ut as CodeSnippet, S as ColorSwatch, Qn as Combobox, T as ConversationItem, Ee as DEFAULT_CHECKOUT_STEPS, Me as Divider, tr as DonutChart, Re as EmptyState, Kt as Expenses, g as FeaturedIcon, nr as FileUpload, Fe as FilterChip, Cn as FirstPageHeading, sr as FunnelChart, ur as HeatmapChart, b as HoverGroup, we as IconButton, Yt as InlineHint, re as Input, ge as JobListing, fr as Kbd, mr as Label, vr as LineChart, Ae as Link, Tn as List, br as ListItem, p as LocationDot, On as Marquee, Sr as Menu, Cr as MenuDivider, Tr as MenuItem, fe as MessageBubble, An as Metric, jn as MobileNavigationMenu, le as Modal, e as NotificationItem, pe as Pagination, Nr as PieChart, Pn as PlaceholderLogo, Pr as Popover, x as PriceDisplay, ee as ProductCard, n as ProductGallery, Fn as ProfileCard, Se as Progress, Xt as ProgressItem, _ as ProgressStat, te as QuantitySelector, Wr as RadarChart, Qr as RadialChart, $r as Radio, Qt as RichSeparator, Ln as RichTextHeading, zn as RichTextParagraph, t as SectionHeading, be as SegmentedControl, Te as Select, ue as Sidebar, se as SidebarDivider, ei as SidebarFooter, Ne as SidebarGroupLabel, ve as SidebarHeader, ae as SidebarItem, ni as SidebarPromo, ii as SidebarSearch, ke as SidebarSubItem, ze as SizeSelector, Ce as Skeleton, ie as Slider, ne as SpendingBalance, oi as Spinner, v as StarRating, di as StatCard, pi as Stepper, fi as StepperStep, cn as StockMarket, f as StockStatus, Vn as SubFeature, mi as Switch, me as Table, De as Tabs, dn as Tags, _e as TeamCard, gi as Textarea, mn as Ticker, yi as Toast, xe as Tooltip, je as TopBar, xi as TopBarMobile, gn as Transactions, c as WishlistButton, s as getContrastColor, E as iconStrokeWidth, a as useHoverHighlight };