@nipsys/shadcn-lsd 0.2.3 → 0.2.5

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.
Files changed (128) hide show
  1. package/dist/Autocomplete-DI2nShZk.js +216 -0
  2. package/dist/{Badge-DHID7w-D.js → Badge-SDsdES93.js} +43 -48
  3. package/dist/{Button-DoTpV6G1.js → Button-CCXyUaSw.js} +37 -46
  4. package/dist/{ButtonGroup-BgylmC1j.js → ButtonGroup-WtMRnYIq.js} +7 -7
  5. package/dist/{Input-W8QqFI1v.js → Input-BNaFAHs9.js} +46 -45
  6. package/dist/{Label-BEM-ZJXI.js → Label-CjkQmoNz.js} +8 -8
  7. package/dist/{ScrollBar-CyKMm83e.js → ScrollBar-Cuog8lP4.js} +31 -31
  8. package/dist/SidebarContext-CNUkvXwD.js +107 -0
  9. package/dist/Toggle-DZIHuZXk.js +34 -0
  10. package/dist/assets/style.css +1 -1
  11. package/dist/components/ui/accordion/AccordionContent.js +16 -16
  12. package/dist/components/ui/accordion/__tests__/accordion-content.test.js +1 -1
  13. package/dist/components/ui/alert-dialog/AlertDialogAction.js +1 -1
  14. package/dist/components/ui/alert-dialog/AlertDialogCancel.js +1 -1
  15. package/dist/components/ui/alert-dialog/AlertDialogContent.js +11 -11
  16. package/dist/components/ui/alert-dialog/AlertDialogFooter.js +5 -5
  17. package/dist/components/ui/alert-dialog/AlertDialogHeader.js +7 -7
  18. package/dist/components/ui/alert-dialog/__tests__/alert-dialog-action.test.js +1 -1
  19. package/dist/components/ui/alert-dialog/__tests__/alert-dialog-cancel.test.js +1 -1
  20. package/dist/components/ui/alert-dialog/__tests__/alert-dialog-content.test.js +2 -2
  21. package/dist/components/ui/alert-dialog/__tests__/alert-dialog-description.test.js +1 -1
  22. package/dist/components/ui/alert-dialog/__tests__/alert-dialog-footer.test.js +8 -8
  23. package/dist/components/ui/alert-dialog/__tests__/alert-dialog-header.test.js +2 -2
  24. package/dist/components/ui/alert-dialog/__tests__/alert-dialog-overlay.test.js +1 -1
  25. package/dist/components/ui/alert-dialog/__tests__/alert-dialog-title.test.js +1 -1
  26. package/dist/components/ui/alert-dialog/__tests__/alert-dialog-trigger.test.js +1 -1
  27. package/dist/components/ui/autocomplete/Autocomplete.js +1 -1
  28. package/dist/components/ui/autocomplete/__tests__/autocomplete.test.js +1 -1
  29. package/dist/components/ui/badge/Badge.js +1 -1
  30. package/dist/components/ui/badge/badge.test.js +112 -112
  31. package/dist/components/ui/badge/types.d.ts +1 -1
  32. package/dist/components/ui/button/Button.js +1 -1
  33. package/dist/components/ui/button/button.test.js +98 -94
  34. package/dist/components/ui/button/types.d.ts +1 -1
  35. package/dist/components/ui/button-group/ButtonGroup.js +1 -1
  36. package/dist/components/ui/button-group/ButtonGroupText.js +11 -11
  37. package/dist/components/ui/button-group/__tests__/button-group-separator.test.js +1 -1
  38. package/dist/components/ui/button-group/__tests__/button-group-text.test.js +14 -14
  39. package/dist/components/ui/button-group/__tests__/button-group.test.js +1 -1
  40. package/dist/components/ui/card/CardContent.js +9 -6
  41. package/dist/components/ui/card/CardFooter.js +8 -8
  42. package/dist/components/ui/card/CardHeader.js +9 -9
  43. package/dist/components/ui/card/__tests__/card-content.test.js +19 -19
  44. package/dist/components/ui/card/__tests__/card-footer.test.js +20 -20
  45. package/dist/components/ui/card/__tests__/card-header.test.js +9 -9
  46. package/dist/components/ui/checkbox/Checkbox.js +2 -2
  47. package/dist/components/ui/checkbox/checkbox.test.js +3 -3
  48. package/dist/components/ui/command/CommandDialog.js +18 -18
  49. package/dist/components/ui/command/CommandEmpty.js +5 -5
  50. package/dist/components/ui/command/CommandGroup.js +7 -7
  51. package/dist/components/ui/command/CommandInput.js +14 -14
  52. package/dist/components/ui/command/CommandItem.js +7 -7
  53. package/dist/components/ui/command/CommandList.js +9 -9
  54. package/dist/components/ui/command/CommandSeparator.js +13 -10
  55. package/dist/components/ui/command/__tests__/command-empty.test.js +16 -16
  56. package/dist/components/ui/command/__tests__/command-group.test.js +13 -13
  57. package/dist/components/ui/command/__tests__/command-input.test.js +29 -29
  58. package/dist/components/ui/command/__tests__/command-item.test.js +19 -19
  59. package/dist/components/ui/command/__tests__/command-list.test.js +12 -12
  60. package/dist/components/ui/command/__tests__/command-separator.test.js +19 -19
  61. package/dist/components/ui/dialog/DialogContent.js +10 -10
  62. package/dist/components/ui/dialog/DialogFooter.js +6 -6
  63. package/dist/components/ui/dialog/DialogHeader.js +9 -9
  64. package/dist/components/ui/dialog/__tests__/dialog-content.test.js +1 -1
  65. package/dist/components/ui/dialog/__tests__/dialog-footer.test.js +7 -7
  66. package/dist/components/ui/dialog/__tests__/dialog-header.test.js +1 -1
  67. package/dist/components/ui/input/Input.js +1 -1
  68. package/dist/components/ui/input/input.test.js +5 -5
  69. package/dist/components/ui/label/Label.js +1 -1
  70. package/dist/components/ui/label/label.test.js +2 -2
  71. package/dist/components/ui/menubar/Menubar.js +1 -1
  72. package/dist/components/ui/menubar/MenubarCheckboxItem.js +18 -18
  73. package/dist/components/ui/menubar/MenubarContent.js +1 -1
  74. package/dist/components/ui/menubar/MenubarItem.js +1 -1
  75. package/dist/components/ui/menubar/MenubarLabel.js +1 -1
  76. package/dist/components/ui/menubar/MenubarRadioItem.js +14 -14
  77. package/dist/components/ui/menubar/MenubarSeparator.js +1 -1
  78. package/dist/components/ui/menubar/MenubarSubContent.js +1 -1
  79. package/dist/components/ui/menubar/MenubarSubTrigger.js +16 -16
  80. package/dist/components/ui/menubar/MenubarTrigger.js +1 -1
  81. package/dist/components/ui/menubar/__tests__/menubar-trigger.test.js +26 -26
  82. package/dist/components/ui/menubar/__tests__/menubar.test.js +15 -15
  83. package/dist/components/ui/popover/PopoverContent.js +5 -5
  84. package/dist/components/ui/popover/__tests__/popover-content.test.js +1 -1
  85. package/dist/components/ui/progress/Progress.js +41 -41
  86. package/dist/components/ui/progress/progress.test.js +10 -10
  87. package/dist/components/ui/scroll-area/ScrollArea.js +1 -1
  88. package/dist/components/ui/scroll-area/ScrollBar.js +1 -1
  89. package/dist/components/ui/select/SelectContent.js +11 -11
  90. package/dist/components/ui/select/SelectItem.js +13 -13
  91. package/dist/components/ui/select/SelectLabel.js +9 -9
  92. package/dist/components/ui/select/SelectScrollDownButton.js +12 -12
  93. package/dist/components/ui/select/SelectScrollUpButton.js +13 -13
  94. package/dist/components/ui/select/SelectSeparator.js +11 -11
  95. package/dist/components/ui/select/SelectTrigger.js +12 -12
  96. package/dist/components/ui/sheet/SheetContent.js +16 -16
  97. package/dist/components/ui/sheet/SheetFooter.js +9 -9
  98. package/dist/components/ui/sheet/SheetHeader.js +10 -7
  99. package/dist/components/ui/sheet/__tests__/sheet-footer.test.js +10 -10
  100. package/dist/components/ui/sheet/__tests__/sheet-header.test.js +9 -9
  101. package/dist/components/ui/sidebar/Sidebar.js +6 -6
  102. package/dist/components/ui/sidebar/SidebarContent.js +62 -53
  103. package/dist/components/ui/sidebar/SidebarContext.js +1 -1
  104. package/dist/components/ui/sidebar/SidebarGroup.js +24 -24
  105. package/dist/components/ui/sidebar/SidebarMenu.js +82 -82
  106. package/dist/components/ui/sidebar/__tests__/sidebar-content.test.js +1 -1
  107. package/dist/components/ui/sidebar/__tests__/sidebar-group.test.js +3 -3
  108. package/dist/components/ui/sidebar/__tests__/sidebar-menu.test.js +3 -3
  109. package/dist/components/ui/sidebar/__tests__/sidebar.test.js +20 -20
  110. package/dist/components/ui/switch/Switch.js +35 -35
  111. package/dist/components/ui/switch/switch.test.js +20 -20
  112. package/dist/components/ui/tabs/Tabs.js +1 -1
  113. package/dist/components/ui/tabs/TabsList.js +1 -1
  114. package/dist/components/ui/tabs/TabsTrigger.js +1 -1
  115. package/dist/components/ui/tabs/__tests__/tabs-trigger.test.js +3 -3
  116. package/dist/components/ui/tabs/__tests__/tabs.test.js +44 -44
  117. package/dist/components/ui/toggle/Toggle.js +1 -1
  118. package/dist/components/ui/toggle/toggle.test.js +85 -73
  119. package/dist/components/ui/toggle-group/ToggleGroupItem.js +1 -1
  120. package/dist/components/ui/toggle-group/__tests__/toggle-group.test.js +3 -3
  121. package/dist/main.js +9 -9
  122. package/dist/{types-ClTXXuXM.js → types-D4rgriAV.js} +7 -7
  123. package/dist/types-DsORryJJ.js +69 -0
  124. package/package.json +1 -1
  125. package/dist/Autocomplete-3wLa9P4X.js +0 -216
  126. package/dist/SidebarContext-CRh-DPz_.js +0 -107
  127. package/dist/Toggle-DOc92BjI.js +0 -34
  128. package/dist/types-BSbBWG9A.js +0 -69
@@ -1,8 +1,8 @@
1
- import { jsxs as b, jsx as s } from "react/jsx-runtime";
2
- import * as i from "react";
1
+ import { jsxs as p, jsx as e } from "react/jsx-runtime";
2
+ import * as c from "react";
3
3
  import { c as l } from "./utils-DtaLkIY8.js";
4
- function p(e) {
5
- switch (e) {
4
+ function b(s) {
5
+ switch (s) {
6
6
  case "xs":
7
7
  return "lsd:text-xs file:lsd:text-xs";
8
8
  case "sm":
@@ -17,24 +17,25 @@ function p(e) {
17
17
  return "lsd:text-base file:lsd:text-base";
18
18
  }
19
19
  }
20
- function g(e) {
21
- switch (e) {
20
+ function g(s) {
21
+ const t = "lsd:py-[var(--lsd-spacing-small)]";
22
+ switch (s) {
22
23
  case "xs":
23
- return "lsd:py-1";
24
+ return "lsd:py-[var(--lsd-spacing-smallest)]";
24
25
  case "sm":
25
- return "lsd:py-2";
26
+ return "lsd:py-[var(--lsd-spacing-smaller)]";
26
27
  case "md":
27
- return "lsd:py-3";
28
+ return t;
28
29
  case "lg":
29
- return "lsd:py-4";
30
+ return "lsd:py-[var(--lsd-spacing-base)]";
30
31
  case "xl":
31
- return "lsd:py-5";
32
+ return "lsd:py-[var(--lsd-spacing-large)]";
32
33
  default:
33
- return "lsd:py-3";
34
+ return t;
34
35
  }
35
36
  }
36
- function y(e) {
37
- switch (e) {
37
+ function h(s) {
38
+ switch (s) {
38
39
  case "xs":
39
40
  return "lsd:text-xs";
40
41
  case "sm":
@@ -49,71 +50,71 @@ function y(e) {
49
50
  return "lsd:text-sm";
50
51
  }
51
52
  }
52
- const h = i.forwardRef(
53
+ const y = c.forwardRef(
53
54
  ({
54
- className: e,
55
- variant: c = "underlined",
56
- size: t = "md",
57
- label: d,
58
- supportingText: r,
59
- error: a,
55
+ className: s,
56
+ variant: t = "underlined",
57
+ size: d = "md",
58
+ label: r,
59
+ supportingText: a,
60
+ error: n,
60
61
  id: x,
61
62
  type: o,
62
63
  ...u
63
- }, f) => {
64
- const m = i.useId(), n = x || m;
65
- return /* @__PURE__ */ b("div", { className: l("lsd:flex lsd:flex-col lsd:box-border", e), children: [
66
- d && /* @__PURE__ */ s(
64
+ }, m) => {
65
+ const f = c.useId(), i = x || f;
66
+ return /* @__PURE__ */ p("div", { className: l("lsd:flex lsd:flex-col lsd:box-border", s), children: [
67
+ r && /* @__PURE__ */ e(
67
68
  "label",
68
69
  {
69
- htmlFor: n,
70
- className: l("lsd:font-medium", y(t)),
71
- children: d
70
+ htmlFor: i,
71
+ className: l("lsd:font-medium", h(d)),
72
+ children: r
72
73
  }
73
74
  ),
74
- /* @__PURE__ */ s(
75
+ /* @__PURE__ */ e(
75
76
  "div",
76
77
  {
77
78
  className: l(
78
79
  "lsd:flex lsd:items-center lsd:justify-between",
79
- c === "outlined" ? "lsd:border lsd:border-lsd-border" : "lsd:border lsd:border-transparent lsd:border-b-lsd-border",
80
- a && "lsd:border-lsd-destructive"
80
+ t === "outlined" ? "lsd:border lsd:border-lsd-border" : "lsd:border lsd:border-transparent lsd:border-b-lsd-border",
81
+ n && "lsd:border-lsd-destructive"
81
82
  ),
82
- children: /* @__PURE__ */ s(
83
+ children: /* @__PURE__ */ e(
83
84
  "input",
84
85
  {
85
- ref: f,
86
+ ref: m,
86
87
  type: o,
87
- id: n,
88
+ id: i,
88
89
  className: l(
89
90
  "file:lsd:text-lsd-text-primary placeholder:lsd:text-lsd-text-primary placeholder:lsd:opacity-30 selection:lsd:bg-lsd-primary selection:lsd:text-lsd-surface lsd:border-none lsd:outline-none lsd:bg-transparent lsd:text-lsd-text-primary lsd:w-full lsd:h-full file:lsd:inline-flex file:lsd:h-7 file:lsd:border-0 file:lsd:bg-transparent file:lsd:font-medium lsd:disabled:pointer-events-none lsd:disabled:cursor-not-allowed lsd:disabled:opacity-34",
90
- "focus-visible:lsd:outline-none lsd:px-4",
91
- p(t),
92
- g(t)
91
+ "focus-visible:lsd:outline-none lsd:px-(--lsd-spacing-base)",
92
+ b(d),
93
+ g(d)
93
94
  ),
94
95
  ...u
95
96
  }
96
97
  )
97
98
  }
98
99
  ),
99
- r && /* @__PURE__ */ s("div", { className: "lsd:pt-1.5 lsd:w-fit", children: /* @__PURE__ */ s(
100
+ a && /* @__PURE__ */ e("div", { className: "lsd:pt-(--lsd-spacing-smaller) lsd:w-fit", children: /* @__PURE__ */ e(
100
101
  "p",
101
102
  {
102
103
  className: l(
103
104
  "lsd:text-sm",
104
- t === "lg" ? "lsd:text-base" : "lsd:text-sm",
105
- a && "lsd:text-lsd-destructive"
105
+ d === "lg" ? "lsd:text-base" : "lsd:text-sm",
106
+ n && "lsd:text-lsd-destructive"
106
107
  ),
107
- children: r
108
+ children: a
108
109
  }
109
110
  ) })
110
111
  ] });
111
112
  }
112
113
  );
113
- h.displayName = "Input";
114
+ y.displayName = "Input";
114
115
  export {
115
- h as I,
116
- p as a,
116
+ y as I,
117
+ b as a,
117
118
  g as b,
118
- y as g
119
+ h as g
119
120
  };
@@ -3,20 +3,20 @@ import * as d from "react";
3
3
  import { P as o } from "./index-CDPBTubN.js";
4
4
  import { c as i } from "./utils-DtaLkIY8.js";
5
5
  import { c as n } from "./index-D69Iqk5J.js";
6
- var m = "Label", s = d.forwardRef((t, a) => /* @__PURE__ */ l(
6
+ var m = "Label", s = d.forwardRef((a, t) => /* @__PURE__ */ l(
7
7
  o.label,
8
8
  {
9
- ...t,
10
- ref: a,
9
+ ...a,
10
+ ref: t,
11
11
  onMouseDown: (e) => {
12
- e.target.closest("button, input, select, textarea") || (t.onMouseDown?.(e), !e.defaultPrevented && e.detail > 1 && e.preventDefault());
12
+ e.target.closest("button, input, select, textarea") || (a.onMouseDown?.(e), !e.defaultPrevented && e.detail > 1 && e.preventDefault());
13
13
  }
14
14
  }
15
15
  ));
16
16
  s.displayName = m;
17
17
  var c = s;
18
18
  const u = n(
19
- "lsd:flex lsd:items-center lsd:gap-2 lsd:select-none lsd:group-data-[disabled=true]:pointer-events-none lsd:group-data-[disabled=true]:opacity-50 lsd:peer-disabled:cursor-not-allowed lsd:peer-disabled:opacity-50",
19
+ "lsd:flex lsd:items-center lsd:gap-[var(--lsd-spacing-smaller)] lsd:select-none lsd:group-data-[disabled=true]:pointer-events-none lsd:group-data-[disabled=true]:opacity-50 lsd:peer-disabled:cursor-not-allowed lsd:peer-disabled:opacity-50",
20
20
  {
21
21
  variants: {
22
22
  variant: {
@@ -35,17 +35,17 @@ const u = n(
35
35
  }
36
36
  }
37
37
  );
38
- function g({ className: t, variant: a, size: e, ...r }) {
38
+ function x({ className: a, variant: t, size: e, ...r }) {
39
39
  return /* @__PURE__ */ l(
40
40
  c,
41
41
  {
42
42
  "data-slot": "label",
43
- className: i(u({ variant: a, size: e }), t),
43
+ className: i(u({ variant: t, size: e }), a),
44
44
  ...r
45
45
  }
46
46
  );
47
47
  }
48
48
  export {
49
- g as L,
49
+ x as L,
50
50
  u as l
51
51
  };
@@ -19,7 +19,7 @@ var V = "ScrollArea", [j] = ae(V), [he, p] = j(V), q = c.forwardRef(
19
19
  dir: o,
20
20
  scrollHideDelay: n = 600,
21
21
  ...s
22
- } = e, [a, i] = c.useState(null), [f, d] = c.useState(null), [b, u] = c.useState(null), [S, w] = c.useState(null), [x, M] = c.useState(null), [P, _] = c.useState(0), [U, D] = c.useState(0), [W, y] = c.useState(!1), [H, N] = c.useState(!1), m = A(t, (E) => i(E)), v = ie(o);
22
+ } = e, [a, i] = c.useState(null), [f, d] = c.useState(null), [b, u] = c.useState(null), [m, w] = c.useState(null), [x, M] = c.useState(null), [P, _] = c.useState(0), [U, D] = c.useState(0), [W, y] = c.useState(!1), [H, N] = c.useState(!1), S = A(t, (E) => i(E)), v = ie(o);
23
23
  return /* @__PURE__ */ h(
24
24
  he,
25
25
  {
@@ -32,7 +32,7 @@ var V = "ScrollArea", [j] = ae(V), [he, p] = j(V), q = c.forwardRef(
32
32
  onViewportChange: d,
33
33
  content: b,
34
34
  onContentChange: u,
35
- scrollbarX: S,
35
+ scrollbarX: m,
36
36
  onScrollbarXChange: w,
37
37
  scrollbarXEnabled: W,
38
38
  onScrollbarXEnabledChange: y,
@@ -47,7 +47,7 @@ var V = "ScrollArea", [j] = ae(V), [he, p] = j(V), q = c.forwardRef(
47
47
  {
48
48
  dir: v,
49
49
  ...s,
50
- ref: m,
50
+ ref: S,
51
51
  style: {
52
52
  position: "relative",
53
53
  // Pass corner sizes as CSS vars to reduce re-renders of context consumers
@@ -109,7 +109,7 @@ var g = "ScrollAreaScrollbar", J = c.forwardRef(
109
109
  const { forceMount: r, ...l } = e, o = p(g, e.__scopeScrollArea), { onScrollbarXEnabledChange: n, onScrollbarYEnabledChange: s } = o, a = e.orientation === "horizontal";
110
110
  return c.useEffect(() => (a ? n(!0) : s(!0), () => {
111
111
  a ? n(!1) : s(!1);
112
- }), [a, n, s]), o.type === "hover" ? /* @__PURE__ */ h(be, { ...l, ref: t, forceMount: r }) : o.type === "scroll" ? /* @__PURE__ */ h(Se, { ...l, ref: t, forceMount: r }) : o.type === "auto" ? /* @__PURE__ */ h(K, { ...l, ref: t, forceMount: r }) : o.type === "always" ? /* @__PURE__ */ h(B, { ...l, ref: t }) : null;
112
+ }), [a, n, s]), o.type === "hover" ? /* @__PURE__ */ h(be, { ...l, ref: t, forceMount: r }) : o.type === "scroll" ? /* @__PURE__ */ h(me, { ...l, ref: t, forceMount: r }) : o.type === "auto" ? /* @__PURE__ */ h(K, { ...l, ref: t, forceMount: r }) : o.type === "always" ? /* @__PURE__ */ h(B, { ...l, ref: t }) : null;
113
113
  }
114
114
  );
115
115
  J.displayName = g;
@@ -136,7 +136,7 @@ var be = c.forwardRef((e, t) => {
136
136
  ref: t
137
137
  }
138
138
  ) });
139
- }), Se = c.forwardRef((e, t) => {
139
+ }), me = c.forwardRef((e, t) => {
140
140
  const { forceMount: r, ...l } = e, o = p(g, e.__scopeScrollArea), n = e.orientation === "horizontal", s = Y(() => i("SCROLL_END"), 100), [a, i] = fe("hidden", {
141
141
  hidden: {
142
142
  SCROLL: "scrolling"
@@ -165,8 +165,8 @@ var be = c.forwardRef((e, t) => {
165
165
  if (f) {
166
166
  let b = f[d];
167
167
  const u = () => {
168
- const S = f[d];
169
- b !== S && (i("SCROLL"), s()), b = S;
168
+ const m = f[d];
169
+ b !== m && (i("SCROLL"), s()), b = m;
170
170
  };
171
171
  return f.addEventListener("scroll", u), () => f.removeEventListener("scroll", u);
172
172
  }
@@ -209,18 +209,18 @@ var be = c.forwardRef((e, t) => {
209
209
  onThumbPointerUp: () => s.current = 0,
210
210
  onThumbPointerDown: (u) => s.current = u
211
211
  };
212
- function b(u, S) {
213
- return Pe(u, s.current, a, S);
212
+ function b(u, m) {
213
+ return Pe(u, s.current, a, m);
214
214
  }
215
215
  return r === "horizontal" ? /* @__PURE__ */ h(
216
- me,
216
+ Se,
217
217
  {
218
218
  ...d,
219
219
  ref: t,
220
220
  onThumbPositionChange: () => {
221
221
  if (o.viewport && n.current) {
222
- const u = o.viewport.scrollLeft, S = F(u, a, o.dir);
223
- n.current.style.transform = `translate3d(${S}px, 0, 0)`;
222
+ const u = o.viewport.scrollLeft, m = F(u, a, o.dir);
223
+ n.current.style.transform = `translate3d(${m}px, 0, 0)`;
224
224
  }
225
225
  },
226
226
  onWheelScroll: (u) => {
@@ -237,8 +237,8 @@ var be = c.forwardRef((e, t) => {
237
237
  ref: t,
238
238
  onThumbPositionChange: () => {
239
239
  if (o.viewport && n.current) {
240
- const u = o.viewport.scrollTop, S = F(u, a);
241
- n.current.style.transform = `translate3d(0, ${S}px, 0)`;
240
+ const u = o.viewport.scrollTop, m = F(u, a);
241
+ n.current.style.transform = `translate3d(0, ${m}px, 0)`;
242
242
  }
243
243
  },
244
244
  onWheelScroll: (u) => {
@@ -249,7 +249,7 @@ var be = c.forwardRef((e, t) => {
249
249
  }
250
250
  }
251
251
  ) : null;
252
- }), me = c.forwardRef((e, t) => {
252
+ }), Se = c.forwardRef((e, t) => {
253
253
  const { sizes: r, onSizesChange: l, ...o } = e, n = p(g, e.__scopeScrollArea), [s, a] = c.useState(), i = c.useRef(null), f = A(t, i, n.onScrollbarXChange);
254
254
  return c.useEffect(() => {
255
255
  i.current && a(getComputedStyle(i.current));
@@ -341,20 +341,20 @@ var be = c.forwardRef((e, t) => {
341
341
  onWheelScroll: d,
342
342
  onResize: b,
343
343
  ...u
344
- } = e, S = p(g, r), [w, x] = c.useState(null), M = A(t, (m) => x(m)), P = c.useRef(null), _ = c.useRef(""), U = S.viewport, D = l.content - l.viewport, W = C(d), y = C(i), H = Y(b, 10);
345
- function N(m) {
344
+ } = e, m = p(g, r), [w, x] = c.useState(null), M = A(t, (S) => x(S)), P = c.useRef(null), _ = c.useRef(""), U = m.viewport, D = l.content - l.viewport, W = C(d), y = C(i), H = Y(b, 10);
345
+ function N(S) {
346
346
  if (P.current) {
347
- const v = m.clientX - P.current.left, E = m.clientY - P.current.top;
347
+ const v = S.clientX - P.current.left, E = S.clientY - P.current.top;
348
348
  f({ x: v, y: E });
349
349
  }
350
350
  }
351
351
  return c.useEffect(() => {
352
- const m = (v) => {
352
+ const S = (v) => {
353
353
  const E = v.target;
354
354
  w?.contains(E) && W(v, D);
355
355
  };
356
- return document.addEventListener("wheel", m, { passive: !1 }), () => document.removeEventListener("wheel", m, { passive: !1 });
357
- }, [U, w, D, W]), c.useEffect(y, [l, y]), T(w, H), T(S.content, H), /* @__PURE__ */ h(
356
+ return document.addEventListener("wheel", S, { passive: !1 }), () => document.removeEventListener("wheel", S, { passive: !1 });
357
+ }, [U, w, D, W]), c.useEffect(y, [l, y]), T(w, H), T(m.content, H), /* @__PURE__ */ h(
358
358
  ve,
359
359
  {
360
360
  scope: r,
@@ -370,13 +370,13 @@ var be = c.forwardRef((e, t) => {
370
370
  ...u,
371
371
  ref: M,
372
372
  style: { position: "absolute", ...u.style },
373
- onPointerDown: R(e.onPointerDown, (m) => {
374
- m.button === 0 && (m.target.setPointerCapture(m.pointerId), P.current = w.getBoundingClientRect(), _.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", S.viewport && (S.viewport.style.scrollBehavior = "auto"), N(m));
373
+ onPointerDown: R(e.onPointerDown, (S) => {
374
+ S.button === 0 && (S.target.setPointerCapture(S.pointerId), P.current = w.getBoundingClientRect(), _.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), N(S));
375
375
  }),
376
376
  onPointerMove: R(e.onPointerMove, N),
377
- onPointerUp: R(e.onPointerUp, (m) => {
378
- const v = m.target;
379
- v.hasPointerCapture(m.pointerId) && v.releasePointerCapture(m.pointerId), document.body.style.webkitUserSelect = _.current, S.viewport && (S.viewport.style.scrollBehavior = ""), P.current = null;
377
+ onPointerUp: R(e.onPointerUp, (S) => {
378
+ const v = S.target;
379
+ v.hasPointerCapture(S.pointerId) && v.releasePointerCapture(S.pointerId), document.body.style.webkitUserSelect = _.current, m.viewport && (m.viewport.style.scrollBehavior = ""), P.current = null;
380
380
  })
381
381
  }
382
382
  )
@@ -400,8 +400,8 @@ var be = c.forwardRef((e, t) => {
400
400
  if (b) {
401
401
  const u = () => {
402
402
  if (d(), !f.current) {
403
- const S = Ce(b, a);
404
- f.current = S, a();
403
+ const m = Ce(b, a);
404
+ f.current = m, a();
405
405
  }
406
406
  };
407
407
  return a(), b.addEventListener("scroll", u), () => b.removeEventListener("scroll", u);
@@ -418,7 +418,7 @@ var be = c.forwardRef((e, t) => {
418
418
  ...l
419
419
  },
420
420
  onPointerDownCapture: R(e.onPointerDownCapture, (b) => {
421
- const S = b.target.getBoundingClientRect(), w = b.clientX - S.left, x = b.clientY - S.top;
421
+ const m = b.target.getBoundingClientRect(), w = b.clientX - m.left, x = b.clientY - m.top;
422
422
  s.onThumbPointerDown({ x: w, y: x });
423
423
  }),
424
424
  onPointerUp: R(e.onPointerUp, s.onThumbPointerUp)
@@ -529,8 +529,8 @@ function Oe({
529
529
  orientation: t,
530
530
  className: ue(
531
531
  "lsd:flex lsd:touch-none lsd:p-px lsd:transition-colors lsd:select-none",
532
- t === "vertical" && "lsd:h-full lsd:w-2.5 lsd:border-l lsd:border-l-transparent",
533
- t === "horizontal" && "lsd:h-2.5 lsd:flex-col lsd:border-t lsd:border-t-transparent",
532
+ t === "vertical" && "lsd:h-full lsd:w-(--lsd-spacing-small) lsd:border-l lsd:border-l-transparent",
533
+ t === "horizontal" && "lsd:h-(--lsd-spacing-small) lsd:flex-col lsd:border-t lsd:border-t-transparent",
534
534
  e
535
535
  ),
536
536
  ...r,
@@ -0,0 +1,107 @@
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import * as s from "react";
3
+ import { c as E } from "./utils-DtaLkIY8.js";
4
+ import { TooltipProvider as I } from "./components/ui/tooltip/TooltipProvider.js";
5
+ import { c as y } from "./index-D69Iqk5J.js";
6
+ const b = 768;
7
+ function D() {
8
+ const [a, r] = s.useState(
9
+ void 0
10
+ );
11
+ return s.useEffect(() => {
12
+ const d = window.matchMedia(`(max-width: ${b - 1}px)`), i = () => {
13
+ r(window.innerWidth < b);
14
+ };
15
+ return d.addEventListener("change", i), r(window.innerWidth < b), () => d.removeEventListener("change", i);
16
+ }, []), !!a;
17
+ }
18
+ const k = "16rem", T = "18rem", A = "3rem", M = "b", L = y(
19
+ "peer/menu-button lsd:flex lsd:w-full lsd:items-center lsd:gap-(--lsd-spacing-smaller) lsd:overflow-hidden lsd:rounded-md lsd:p-(--lsd-spacing-smaller) lsd:text-left lsd:text-sm lsd:outline-hidden ring-sidebar-ring lsd:transition-[width,height,padding] lsd:hover:bg-sidebar-accent lsd:hover:text-sidebar-accent-foreground lsd:focus-visible:ring-2 lsd:active:bg-sidebar-accent lsd:active:text-sidebar-accent-foreground lsd:disabled:pointer-events-none lsd:disabled:opacity-50 lsd:group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-lsd:disabled:pointer-events-none aria-lsd:disabled:opacity-50 lsd:data-[active=true]:bg-sidebar-accent lsd:data-[active=true]:font-medium lsd:data-[active=true]:text-sidebar-accent-foreground lsd:data-[state=open]:hover:bg-sidebar-accent lsd:data-[state=open]:hover:text-sidebar-accent-foreground lsd:group-data-[collapsible=icon]:size-8! lsd:group-data-[collapsible=icon]:p-(--lsd-spacing-smaller)! lsd:[&>span:last-child]:truncate lsd:[&>svg]:size-(--lsd-spacing-base) lsd:[&>svg]:shrink-0 lsd:hover:underline lsd:focus:underline",
20
+ {
21
+ variants: {
22
+ variant: {
23
+ default: "lsd:hover:bg-sidebar-accent lsd:hover:text-sidebar-accent-foreground",
24
+ outline: "lsd:bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] lsd:hover:bg-sidebar-accent lsd:hover:text-sidebar-accent-foreground lsd:hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
25
+ },
26
+ size: {
27
+ default: "lsd:h-8 lsd:text-sm",
28
+ sm: "lsd:h-(--lsd-spacing-largest) lsd:text-xs",
29
+ lg: "lsd:h-12 lsd:text-sm lsd:group-data-[collapsible=icon]:p-0!"
30
+ }
31
+ },
32
+ defaultVariants: {
33
+ variant: "default",
34
+ size: "default"
35
+ }
36
+ }
37
+ ), m = s.createContext(
38
+ null
39
+ );
40
+ function K() {
41
+ const a = s.useContext(m);
42
+ if (!a)
43
+ throw new Error("useSidebar must be used within a SidebarProvider.");
44
+ return a;
45
+ }
46
+ function W({
47
+ defaultOpen: a = !0,
48
+ open: r,
49
+ onOpenChange: d,
50
+ className: i,
51
+ style: f,
52
+ children: v,
53
+ ...w
54
+ }) {
55
+ const o = D(), [p, h] = s.useState(!1), [x, _] = s.useState(a), n = r ?? x, l = s.useCallback(
56
+ (e) => {
57
+ const t = typeof e == "function" ? e(n) : e;
58
+ d ? d(t) : _(t);
59
+ },
60
+ [d, n]
61
+ ), c = s.useCallback(() => o ? h((e) => !e) : l((e) => !e), [o, l]);
62
+ s.useEffect(() => {
63
+ const e = (t) => {
64
+ t.key === M && (t.metaKey || t.ctrlKey) && (t.preventDefault(), c());
65
+ };
66
+ return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
67
+ }, [c]);
68
+ const g = n ? "expanded" : "collapsed", S = s.useMemo(
69
+ () => ({
70
+ state: g,
71
+ open: n,
72
+ setOpen: l,
73
+ isMobile: o,
74
+ openMobile: p,
75
+ setOpenMobile: h,
76
+ toggleSidebar: c
77
+ }),
78
+ [g, n, l, o, p, c]
79
+ );
80
+ return /* @__PURE__ */ u(m.Provider, { value: S, children: /* @__PURE__ */ u(I, { delayDuration: 0, children: /* @__PURE__ */ u(
81
+ "div",
82
+ {
83
+ "data-slot": "sidebar-wrapper",
84
+ style: {
85
+ "--sidebar-width": "16rem",
86
+ "--sidebar-width-icon": "3rem",
87
+ ...f
88
+ },
89
+ className: E(
90
+ "lsd:group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar lsd:flex lsd:min-h-svh lsd:w-full",
91
+ i
92
+ ),
93
+ ...w,
94
+ children: v
95
+ }
96
+ ) }) });
97
+ }
98
+ export {
99
+ M as S,
100
+ k as a,
101
+ A as b,
102
+ T as c,
103
+ W as d,
104
+ m as e,
105
+ L as s,
106
+ K as u
107
+ };
@@ -0,0 +1,34 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { R as e } from "./index-yX7K5Wk9.js";
3
+ import * as t from "react";
4
+ import { c as i } from "./utils-DtaLkIY8.js";
5
+ import { c as o } from "./index-D69Iqk5J.js";
6
+ const n = o(
7
+ "lsd:inline-flex lsd:items-center lsd:justify-center lsd:border lsd:transition-colors lsd:bg-transparent lsd:text-lsd-text-primary lsd:border-lsd-border lsd:hover:underline lsd:cursor-pointer lsd:disabled:opacity-34 lsd:disabled:cursor-not-allowed lsd:disabled:no-underline lsd:data-[state=on]:bg-lsd-primary lsd:data-[state=on]:text-lsd-surface",
8
+ {
9
+ variants: {
10
+ size: {
11
+ sm: "lsd:h-8 lsd:min-w-8 lsd:px-[var(--lsd-spacing-smaller)] lsd:py-[var(--lsd-spacing-smaller)] lsd:text-[0.75rem]",
12
+ md: "lsd:h-10 lsd:min-w-10 lsd:px-[var(--lsd-spacing-small)] lsd:py-[var(--lsd-spacing-smaller)]",
13
+ lg: "lsd:h-12 lsd:min-w-12 lsd:px-[var(--lsd-spacing-base)] lsd:py-[var(--lsd-spacing-small)] lsd:text-[0.875rem]"
14
+ }
15
+ },
16
+ defaultVariants: {
17
+ size: "md"
18
+ }
19
+ }
20
+ ), m = t.forwardRef(
21
+ ({ className: s, size: l, ...d }, a) => /* @__PURE__ */ r(
22
+ e,
23
+ {
24
+ ref: a,
25
+ className: i(n({ size: l }), s),
26
+ ...d
27
+ }
28
+ )
29
+ );
30
+ m.displayName = "Toggle";
31
+ export {
32
+ m as T,
33
+ n as t
34
+ };