rgm-design-system 2.1.0 → 2.1.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
@@ -12,7 +12,7 @@ import { cjk as Jt } from "@streamdown/cjk";
12
12
  import { math as Qt } from "@streamdown/math";
13
13
  import { GripVerticalIcon as pt, CornerDownRightIcon as ea, PencilLineIcon as ta, Trash2Icon as ft, ArrowUpIcon as aa, ChevronDownIcon as Y, MoreHorizontal as ra, ChevronRight as na, ChevronLeftIcon as gt, ChevronRightIcon as ae, ArrowRight as oa, ArrowLeft as ia, CheckIcon as re, XIcon as ne, SearchIcon as sa, CircleIcon as De, MinusIcon as la, MoreHorizontalIcon as Te, ChevronUpIcon as bt, PanelLeftIcon as da, Loader2Icon as ht, OctagonXIcon as ca, TriangleAlertIcon as ua, InfoIcon as ma, CircleCheckIcon as pa, GitBranchIcon as fa, TrendingUpIcon as vt, BookmarkIcon as xt, DatabaseIcon as ga, Table2Icon as ba, SlidersHorizontalIcon as ha, ListIcon as va, FilterIcon as xa, Code2Icon as wa, CopyIcon as wt, MenuIcon as ya, PlusIcon as yt, SettingsIcon as Na, Maximize2Icon as za, Clock3Icon as ka, PencilIcon as Ca } from "lucide-react";
14
14
  import { cva as B } from "class-variance-authority";
15
- import { Slot as V, Accordion as te, AlertDialog as X, AspectRatio as _a, Avatar as Ge, Separator as Ia, Checkbox as tt, Collapsible as Oe, Dialog as R, ContextMenu as j, Direction as Nt, DropdownMenu as $, Label as Sa, HoverCard as we, Menubar as L, NavigationMenu as J, Popover as pe, Progress as at, RadioGroup as Le, ScrollArea as me, Select as O, Tooltip as ie, Slider as ve, Switch as rt, Tabs as Me, Toggle as Da, ToggleGroup as zt } from "radix-ui";
15
+ import { Slot as V, Accordion as te, AlertDialog as X, AspectRatio as _a, Avatar as Ge, Separator as Ia, Checkbox as tt, Collapsible as Oe, Dialog as R, ContextMenu as j, Direction as Nt, DropdownMenu as $, Label as Sa, HoverCard as we, Menubar as L, NavigationMenu as J, Popover as me, Progress as at, RadioGroup as Le, ScrollArea as ue, Select as O, Tooltip as pe, Slider as ve, Switch as rt, Tabs as Me, Toggle as Da, ToggleGroup as zt } from "radix-ui";
16
16
  import { getDefaultClassNames as kt, DayPicker as Ta } from "react-day-picker";
17
17
  import Ma from "embla-carousel-react";
18
18
  import * as Be from "recharts";
@@ -24,7 +24,7 @@ import { OTPInput as $a, OTPInputContext as La } from "input-otp";
24
24
  import * as He from "react-resizable-panels";
25
25
  import { useTheme as Ea } from "next-themes";
26
26
  import { Toaster as Fa } from "sonner";
27
- import { useReducedMotion as Ct, motion as ue, AnimatePresence as Ga } from "motion/react";
27
+ import { useReducedMotion as Ct, motion as ce, AnimatePresence as Ga } from "motion/react";
28
28
  function r(...e) {
29
29
  return Wt(Ut(e));
30
30
  }
@@ -494,7 +494,7 @@ const Wa = "rounded-xl border border-input bg-card px-3 py-2 shadow-xs focus-wit
494
494
  placeholder: S = "Ask anything...",
495
495
  onKeyDown: A,
496
496
  "aria-label": H = "Chat message",
497
- ...le
497
+ ...se
498
498
  }, ee) {
499
499
  const K = p.useRef(null), x = s !== void 0, [T, I] = p.useState(c), E = x ? s : T, q = E.trim().length > 0 && !C, F = t ?? {
500
500
  disabled: !q,
@@ -514,7 +514,7 @@ const Wa = "rounded-xl border border-input bg-card px-3 py-2 shadow-xs focus-wit
514
514
  function ge() {
515
515
  q && (l == null || l(E), x || I(""));
516
516
  }
517
- function de(P) {
517
+ function le(P) {
518
518
  W(P.content), y == null || y(P), b == null || b(P.id), queueMicrotask(() => {
519
519
  const U = K.current;
520
520
  U == null || U.focus(), U == null || U.setSelectionRange(
@@ -530,7 +530,7 @@ const Wa = "rounded-xl border border-input bg-card px-3 py-2 shadow-xs focus-wit
530
530
  {
531
531
  className: "pb-5",
532
532
  messages: h,
533
- onEditMessage: de,
533
+ onEditMessage: le,
534
534
  onRemoveMessage: b,
535
535
  onReorderMessage: v
536
536
  }
@@ -539,7 +539,7 @@ const Wa = "rounded-xl border border-input bg-card px-3 py-2 shadow-xs focus-wit
539
539
  /* @__PURE__ */ a(
540
540
  Ve,
541
541
  {
542
- ...le,
542
+ ...se,
543
543
  "aria-label": H,
544
544
  className: r(
545
545
  "relative z-10 resize-none overflow-hidden border-0 bg-transparent text-foreground shadow-none outline-none placeholder:text-muted-foreground focus-visible:ring-0 dark:bg-transparent",
@@ -577,7 +577,7 @@ const Wa = "rounded-xl border border-input bg-card px-3 py-2 shadow-xs focus-wit
577
577
  z,
578
578
  {
579
579
  asChild: !0,
580
- className: "mt-3 mb-0 w-full max-w-[50rem] pr-1 text-right font-medium leading-none text-muted-foreground/70",
580
+ className: "mt-3 mb-0 w-full max-w-[50rem] pr-1 text-right text-xs font-medium leading-none text-muted-foreground/70",
581
581
  variant: "small",
582
582
  children: /* @__PURE__ */ a("p", { children: i })
583
583
  }
@@ -1092,7 +1092,7 @@ function mo({
1092
1092
  }
1093
1093
  );
1094
1094
  }
1095
- function se({
1095
+ function ie({
1096
1096
  className: e,
1097
1097
  orientation: t = "horizontal",
1098
1098
  decorative: n = !0,
@@ -1165,7 +1165,7 @@ function go({
1165
1165
  ...n
1166
1166
  }) {
1167
1167
  return /* @__PURE__ */ a(
1168
- se,
1168
+ ie,
1169
1169
  {
1170
1170
  "data-slot": "button-group-separator",
1171
1171
  orientation: t,
@@ -2414,7 +2414,7 @@ function Ce({ className: e, ...t }) {
2414
2414
  "div",
2415
2415
  {
2416
2416
  "data-slot": "dialog-header",
2417
- className: r("flex flex-col gap-2 text-center sm:text-left", e),
2417
+ className: r("flex flex-col gap-2 text-left", e),
2418
2418
  ...t
2419
2419
  }
2420
2420
  );
@@ -3448,7 +3448,7 @@ function rs({
3448
3448
  ),
3449
3449
  ...n,
3450
3450
  children: [
3451
- /* @__PURE__ */ a(se, { className: "absolute inset-0 top-1/2" }),
3451
+ /* @__PURE__ */ a(ie, { className: "absolute inset-0 top-1/2" }),
3452
3452
  e && /* @__PURE__ */ a(
3453
3453
  "span",
3454
3454
  {
@@ -3684,7 +3684,7 @@ function ws({
3684
3684
  ...t
3685
3685
  }) {
3686
3686
  return /* @__PURE__ */ a(
3687
- se,
3687
+ ie,
3688
3688
  {
3689
3689
  "data-slot": "item-separator",
3690
3690
  orientation: "horizontal",
@@ -4417,14 +4417,14 @@ function sl({
4417
4417
  function ll({
4418
4418
  ...e
4419
4419
  }) {
4420
- return /* @__PURE__ */ a(pe.Root, { "data-slot": "popover", ...e });
4420
+ return /* @__PURE__ */ a(me.Root, { "data-slot": "popover", ...e });
4421
4421
  }
4422
4422
  function dl({
4423
4423
  className: e,
4424
4424
  ...t
4425
4425
  }) {
4426
4426
  return /* @__PURE__ */ a(
4427
- pe.Trigger,
4427
+ me.Trigger,
4428
4428
  {
4429
4429
  "data-slot": "popover-trigger",
4430
4430
  className: r("cursor-pointer", e),
@@ -4438,8 +4438,8 @@ function cl({
4438
4438
  sideOffset: n = 4,
4439
4439
  ...o
4440
4440
  }) {
4441
- return /* @__PURE__ */ a(pe.Portal, { children: /* @__PURE__ */ a(
4442
- pe.Content,
4441
+ return /* @__PURE__ */ a(me.Portal, { children: /* @__PURE__ */ a(
4442
+ me.Content,
4443
4443
  {
4444
4444
  "data-slot": "popover-content",
4445
4445
  align: t,
@@ -4455,7 +4455,7 @@ function cl({
4455
4455
  function ul({
4456
4456
  ...e
4457
4457
  }) {
4458
- return /* @__PURE__ */ a(pe.Anchor, { "data-slot": "popover-anchor", ...e });
4458
+ return /* @__PURE__ */ a(me.Anchor, { "data-slot": "popover-anchor", ...e });
4459
4459
  }
4460
4460
  function ml({ className: e, ...t }) {
4461
4461
  return /* @__PURE__ */ a(
@@ -4595,14 +4595,14 @@ function Fe({
4595
4595
  ...n
4596
4596
  }) {
4597
4597
  return /* @__PURE__ */ d(
4598
- me.Root,
4598
+ ue.Root,
4599
4599
  {
4600
4600
  "data-slot": "scroll-area",
4601
4601
  className: r("relative", e),
4602
4602
  ...n,
4603
4603
  children: [
4604
4604
  /* @__PURE__ */ a(
4605
- me.Viewport,
4605
+ ue.Viewport,
4606
4606
  {
4607
4607
  "data-slot": "scroll-area-viewport",
4608
4608
  className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",
@@ -4610,7 +4610,7 @@ function Fe({
4610
4610
  }
4611
4611
  ),
4612
4612
  /* @__PURE__ */ a(Rr, {}),
4613
- /* @__PURE__ */ a(me.Corner, {})
4613
+ /* @__PURE__ */ a(ue.Corner, {})
4614
4614
  ]
4615
4615
  }
4616
4616
  );
@@ -4621,7 +4621,7 @@ function Rr({
4621
4621
  ...n
4622
4622
  }) {
4623
4623
  return /* @__PURE__ */ a(
4624
- me.ScrollAreaScrollbar,
4624
+ ue.ScrollAreaScrollbar,
4625
4625
  {
4626
4626
  "data-slot": "scroll-area-scrollbar",
4627
4627
  orientation: t,
@@ -4633,7 +4633,7 @@ function Rr({
4633
4633
  ),
4634
4634
  ...n,
4635
4635
  children: /* @__PURE__ */ a(
4636
- me.ScrollAreaThumb,
4636
+ ue.ScrollAreaThumb,
4637
4637
  {
4638
4638
  "data-slot": "scroll-area-thumb",
4639
4639
  className: "relative flex-1 rounded-full bg-border"
@@ -4965,11 +4965,11 @@ function lt({ className: e, ...t }) {
4965
4965
  );
4966
4966
  }
4967
4967
  function Ue({
4968
- delayDuration: e = 0,
4968
+ delayDuration: e = 500,
4969
4969
  ...t
4970
4970
  }) {
4971
4971
  return /* @__PURE__ */ a(
4972
- ie.Provider,
4972
+ pe.Provider,
4973
4973
  {
4974
4974
  "data-slot": "tooltip-provider",
4975
4975
  delayDuration: e,
@@ -4980,14 +4980,14 @@ function Ue({
4980
4980
  function We({
4981
4981
  ...e
4982
4982
  }) {
4983
- return /* @__PURE__ */ a(ie.Root, { "data-slot": "tooltip", ...e });
4983
+ return /* @__PURE__ */ a(pe.Root, { "data-slot": "tooltip", ...e });
4984
4984
  }
4985
4985
  function Xe({
4986
4986
  className: e,
4987
4987
  ...t
4988
4988
  }) {
4989
4989
  return /* @__PURE__ */ a(
4990
- ie.Trigger,
4990
+ pe.Trigger,
4991
4991
  {
4992
4992
  "data-slot": "tooltip-trigger",
4993
4993
  className: r("cursor-pointer", e),
@@ -5001,8 +5001,8 @@ function Ze({
5001
5001
  children: n,
5002
5002
  ...o
5003
5003
  }) {
5004
- return /* @__PURE__ */ a(ie.Portal, { children: /* @__PURE__ */ d(
5005
- ie.Content,
5004
+ return /* @__PURE__ */ a(pe.Portal, { children: /* @__PURE__ */ a(
5005
+ pe.Content,
5006
5006
  {
5007
5007
  "data-slot": "tooltip-content",
5008
5008
  sideOffset: t,
@@ -5011,10 +5011,7 @@ function Ze({
5011
5011
  e
5012
5012
  ),
5013
5013
  ...o,
5014
- children: [
5015
- n,
5016
- /* @__PURE__ */ a(ie.Arrow, { className: "z-(--layer-tooltip) size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })
5017
- ]
5014
+ children: n
5018
5015
  }
5019
5016
  ) });
5020
5017
  }
@@ -5059,7 +5056,7 @@ function Tl({
5059
5056
  }),
5060
5057
  [y, N, g, u, l, m, h]
5061
5058
  );
5062
- return /* @__PURE__ */ a(Ot.Provider, { value: b, children: /* @__PURE__ */ a(Ue, { delayDuration: 0, children: /* @__PURE__ */ a(
5059
+ return /* @__PURE__ */ a(Ot.Provider, { value: b, children: /* @__PURE__ */ a(Ue, { children: /* @__PURE__ */ a(
5063
5060
  "div",
5064
5061
  {
5065
5062
  "data-slot": "sidebar-wrapper",
@@ -5269,7 +5266,7 @@ function El({
5269
5266
  ...t
5270
5267
  }) {
5271
5268
  return /* @__PURE__ */ a(
5272
- se,
5269
+ ie,
5273
5270
  {
5274
5271
  "data-slot": "sidebar-separator",
5275
5272
  "data-sidebar": "separator",
@@ -6719,7 +6716,7 @@ function zd({
6719
6716
  recents: S,
6720
6717
  recentDeleteDialogLabels: A,
6721
6718
  recentRenameDialogLabels: H,
6722
- recentsTitle: le = "Recents",
6719
+ recentsTitle: se = "Recents",
6723
6720
  renderRecentAction: ee,
6724
6721
  renderSavedPromptAction: K,
6725
6722
  savedPrompts: x,
@@ -6727,7 +6724,7 @@ function zd({
6727
6724
  savedPromptsTitle: I = "Saved Prompts",
6728
6725
  ...E
6729
6726
  }) {
6730
- const [q, F] = p.useState(null), [W, ge] = p.useState(null), [de, P] = p.useState(""), U = p.useRef(null), Ye = p.useRef(null), ce = {
6727
+ const [q, F] = p.useState(null), [W, ge] = p.useState(null), [le, P] = p.useState(""), U = p.useRef(null), Ye = p.useRef(null), de = {
6731
6728
  title: "Rename conversation",
6732
6729
  description: "Choose a name that will be easy to recognize later.",
6733
6730
  inputLabel: "Conversation name",
@@ -6756,7 +6753,7 @@ function zd({
6756
6753
  "div",
6757
6754
  {
6758
6755
  className: r(
6759
- "flex min-h-0 w-full flex-col gap-3 bg-card text-sm text-card-foreground",
6756
+ "flex min-h-0 w-full flex-col gap-3 bg-card px-2 text-sm text-card-foreground",
6760
6757
  i
6761
6758
  ),
6762
6759
  ...E,
@@ -6774,8 +6771,8 @@ function zd({
6774
6771
  ]
6775
6772
  }
6776
6773
  ),
6777
- /* @__PURE__ */ a(se, {}),
6778
- /* @__PURE__ */ a(Fe, { className: "min-h-0 flex-1", children: /* @__PURE__ */ d("div", { className: "grid gap-4 pr-2", children: [
6774
+ /* @__PURE__ */ a(ie, {}),
6775
+ /* @__PURE__ */ a(Fe, { className: "min-h-0 flex-1", children: /* @__PURE__ */ d("div", { className: "grid gap-4", children: [
6779
6776
  /* @__PURE__ */ a(
6780
6777
  Jr,
6781
6778
  {
@@ -6801,13 +6798,13 @@ function zd({
6801
6798
  title: I
6802
6799
  }
6803
6800
  ),
6804
- /* @__PURE__ */ a(se, {}),
6801
+ /* @__PURE__ */ a(ie, {}),
6805
6802
  /* @__PURE__ */ d("div", { className: "grid gap-2", children: [
6806
6803
  /* @__PURE__ */ a(
6807
6804
  dn,
6808
6805
  {
6809
6806
  icon: /* @__PURE__ */ a(ka, {}),
6810
- title: le
6807
+ title: se
6811
6808
  }
6812
6809
  ),
6813
6810
  S.length > 0 ? /* @__PURE__ */ a("div", { className: "grid gap-1", children: S.map((_) => /* @__PURE__ */ a(
@@ -6871,27 +6868,27 @@ function zd({
6871
6868
  className: "grid gap-4",
6872
6869
  onSubmit: (_) => {
6873
6870
  _.preventDefault();
6874
- const G = de.trim();
6871
+ const G = le.trim();
6875
6872
  !W || !G || (g == null || g(W, G), he());
6876
6873
  },
6877
6874
  children: [
6878
6875
  /* @__PURE__ */ d(Ce, { children: [
6879
- /* @__PURE__ */ a(_e, { children: ce.title }),
6880
- /* @__PURE__ */ a(Ie, { children: ce.description })
6876
+ /* @__PURE__ */ a(_e, { children: de.title }),
6877
+ /* @__PURE__ */ a(Ie, { children: de.description })
6881
6878
  ] }),
6882
6879
  /* @__PURE__ */ a(
6883
6880
  qe,
6884
6881
  {
6885
- "aria-label": ce.inputLabel,
6882
+ "aria-label": de.inputLabel,
6886
6883
  onChange: (_) => P(_.target.value),
6887
6884
  ref: U,
6888
6885
  required: !0,
6889
- value: de
6886
+ value: le
6890
6887
  }
6891
6888
  ),
6892
6889
  /* @__PURE__ */ d(it, { children: [
6893
- /* @__PURE__ */ a(ot, { asChild: !0, children: /* @__PURE__ */ a(k, { type: "button", variant: "outline", children: ce.cancel }) }),
6894
- /* @__PURE__ */ a(k, { disabled: !de.trim(), type: "submit", children: ce.confirm })
6890
+ /* @__PURE__ */ a(ot, { asChild: !0, children: /* @__PURE__ */ a(k, { type: "button", variant: "outline", children: de.cancel }) }),
6891
+ /* @__PURE__ */ a(k, { disabled: !le.trim(), type: "submit", children: de.confirm })
6895
6892
  ] })
6896
6893
  ]
6897
6894
  }
@@ -7026,7 +7023,7 @@ function kd({
7026
7023
  {
7027
7024
  "aria-describedby": void 0,
7028
7025
  className: r(
7029
- "w-3/4 gap-0 bg-card p-3 pt-14 text-card-foreground sm:max-w-sm",
7026
+ "w-3/4 gap-0 bg-card px-0 py-3 text-card-foreground sm:max-w-sm",
7030
7027
  t
7031
7028
  ),
7032
7029
  contained: i,
@@ -7082,7 +7079,7 @@ function Cd({
7082
7079
  ...l,
7083
7080
  children: [
7084
7081
  /* @__PURE__ */ a(
7085
- ue.span,
7082
+ ce.span,
7086
7083
  {
7087
7084
  animate: f ? void 0 : { rotate: 360 },
7088
7085
  className: r(
@@ -7104,7 +7101,7 @@ function Cd({
7104
7101
  transform: `translate(calc(-50% + ${b}px), calc(-50% + ${v}px))`
7105
7102
  },
7106
7103
  children: /* @__PURE__ */ a(
7107
- ue.span,
7104
+ ce.span,
7108
7105
  {
7109
7106
  animate: f ? void 0 : {
7110
7107
  opacity: [0.34, 0.92, 0.48],
@@ -7126,7 +7123,7 @@ function Cd({
7126
7123
  }
7127
7124
  ),
7128
7125
  w ? /* @__PURE__ */ a("span", { className: "relative block h-5 min-w-0 overflow-hidden", children: /* @__PURE__ */ a(Ga, { mode: "popLayout", children: /* @__PURE__ */ a(
7129
- ue.span,
7126
+ ce.span,
7130
7127
  {
7131
7128
  animate: f ? void 0 : { y: 0, opacity: 1 },
7132
7129
  className: r(
@@ -7137,7 +7134,7 @@ function Cd({
7137
7134
  initial: f ? !1 : { y: 10, opacity: 0 },
7138
7135
  transition: f ? void 0 : cn,
7139
7136
  children: /* @__PURE__ */ a(
7140
- ue.span,
7137
+ ce.span,
7141
7138
  {
7142
7139
  animate: f ? void 0 : { opacity: [0.62, 1, 0.7] },
7143
7140
  transition: f ? void 0 : un,
@@ -7201,7 +7198,7 @@ function _d({
7201
7198
  k,
7202
7199
  {
7203
7200
  "aria-label": f.label,
7204
- className: "size-8 text-muted-foreground hover:text-foreground",
7201
+ className: "size-6 text-muted-foreground hover:text-foreground",
7205
7202
  onClick: f.onClick,
7206
7203
  size: "icon",
7207
7204
  type: "button",
@@ -7209,7 +7206,7 @@ function _d({
7209
7206
  children: f.icon
7210
7207
  }
7211
7208
  ) }),
7212
- /* @__PURE__ */ a(Ze, { children: /* @__PURE__ */ a(z, { className: "text-background", variant: "small", children: f.label }) })
7209
+ /* @__PURE__ */ a(Ze, { side: "bottom", children: /* @__PURE__ */ a(z, { className: "text-background", variant: "small", children: f.label }) })
7213
7210
  ] }, f.label))
7214
7211
  }
7215
7212
  ) }) : null
@@ -7313,7 +7310,7 @@ function Id({
7313
7310
  z,
7314
7311
  {
7315
7312
  asChild: !0,
7316
- className: "truncate text-foreground",
7313
+ className: "truncate leading-tight text-foreground",
7317
7314
  variant: "small",
7318
7315
  children: /* @__PURE__ */ d("h1", { children: [
7319
7316
  t,
@@ -7346,7 +7343,7 @@ function Sd({
7346
7343
  }) {
7347
7344
  const u = Ct(), m = !t && !(i === "always" || i === "user" && u), f = pn[o];
7348
7345
  return /* @__PURE__ */ a(
7349
- ue.div,
7346
+ ce.div,
7350
7347
  {
7351
7348
  animate: m ? e ?? f.animate : void 0,
7352
7349
  initial: m ? n ?? f.initial : !1,
@@ -7395,7 +7392,7 @@ function Dd({
7395
7392
  const E = I.indexOf(x), q = E === -1 ? 0 : (E + T + I.length) % I.length;
7396
7393
  A(I[q]);
7397
7394
  }
7398
- function le(x, T) {
7395
+ function se(x, T) {
7399
7396
  if (x.key === "ArrowRight" || x.key === "ArrowDown") {
7400
7397
  x.preventDefault(), H(T, 1);
7401
7398
  return;
@@ -7454,7 +7451,7 @@ function Dd({
7454
7451
  disabled: x.disabled,
7455
7452
  id: E,
7456
7453
  onClick: () => S(x),
7457
- onKeyDown: (F) => le(F, T),
7454
+ onKeyDown: (F) => se(F, T),
7458
7455
  ref: (F) => {
7459
7456
  h.current[T] = F;
7460
7457
  },
@@ -7758,7 +7755,7 @@ export {
7758
7755
  Sl as SelectSeparator,
7759
7756
  kl as SelectTrigger,
7760
7757
  zl as SelectValue,
7761
- se as Separator,
7758
+ ie as Separator,
7762
7759
  Dd as SettingsModal,
7763
7760
  Et as Sheet,
7764
7761
  Lr as SheetClose,