@brightlocal/ui-components 0.1.2 → 0.1.4

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 (281) hide show
  1. package/dist/accordion.cjs +1 -1
  2. package/dist/accordion.d.ts +74 -4
  3. package/dist/accordion.d.ts.map +1 -1
  4. package/dist/accordion.js +100 -105
  5. package/dist/alert-dialog.cjs +1 -1
  6. package/dist/alert-dialog.d.ts +30 -10
  7. package/dist/alert-dialog.d.ts.map +1 -1
  8. package/dist/alert-dialog.js +129 -132
  9. package/dist/alert.cjs +1 -1
  10. package/dist/alert.d.ts +22 -1
  11. package/dist/alert.d.ts.map +1 -1
  12. package/dist/alert.js +1 -1
  13. package/dist/aspect-ratio.cjs +1 -1
  14. package/dist/aspect-ratio.d.ts +11 -1
  15. package/dist/aspect-ratio.d.ts.map +1 -1
  16. package/dist/aspect-ratio.js +16 -20
  17. package/dist/avatar.cjs +1 -1
  18. package/dist/avatar.d.ts +43 -3
  19. package/dist/avatar.d.ts.map +1 -1
  20. package/dist/avatar.js +18 -16
  21. package/dist/badge.cjs +1 -1
  22. package/dist/badge.d.ts +24 -9
  23. package/dist/badge.d.ts.map +1 -1
  24. package/dist/badge.js +34 -32
  25. package/dist/blocks/data-table.cjs +1 -1
  26. package/dist/blocks/data-table.d.ts.map +1 -1
  27. package/dist/blocks/data-table.js +177 -170
  28. package/dist/blocks/sidebar.cjs +1 -1
  29. package/dist/blocks/sidebar.d.ts +38 -307
  30. package/dist/blocks/sidebar.d.ts.map +1 -1
  31. package/dist/blocks/sidebar.js +411 -508
  32. package/dist/breadcrumb.cjs +1 -1
  33. package/dist/breadcrumb.d.ts +63 -8
  34. package/dist/breadcrumb.d.ts.map +1 -1
  35. package/dist/breadcrumb.js +97 -93
  36. package/dist/button.cjs +1 -1
  37. package/dist/button.d.ts +17 -45
  38. package/dist/button.d.ts.map +1 -1
  39. package/dist/button.js +49 -50
  40. package/dist/calendar.cjs +1 -1
  41. package/dist/calendar.d.ts +16 -1
  42. package/dist/calendar.d.ts.map +1 -1
  43. package/dist/calendar.js +31 -29
  44. package/dist/card.cjs +1 -1
  45. package/dist/card.d.ts +58 -18
  46. package/dist/card.d.ts.map +1 -1
  47. package/dist/card.js +60 -51
  48. package/dist/carousel.cjs +1 -1
  49. package/dist/carousel.d.ts +99 -9
  50. package/dist/carousel.d.ts.map +1 -1
  51. package/dist/carousel.js +142 -128
  52. package/dist/centred-layout.cjs +1 -1
  53. package/dist/centred-layout.d.ts +18 -15
  54. package/dist/centred-layout.d.ts.map +1 -1
  55. package/dist/centred-layout.js +44 -33
  56. package/dist/chart.cjs +4 -4
  57. package/dist/chart.d.ts +70 -7
  58. package/dist/chart.d.ts.map +1 -1
  59. package/dist/chart.js +71 -66
  60. package/dist/checkbox.cjs +1 -1
  61. package/dist/checkbox.d.ts +9 -5
  62. package/dist/checkbox.d.ts.map +1 -1
  63. package/dist/checkbox.js +61 -82
  64. package/dist/collapsible.cjs +1 -1
  65. package/dist/collapsible.d.ts +65 -8
  66. package/dist/collapsible.d.ts.map +1 -1
  67. package/dist/collapsible.js +41 -55
  68. package/dist/combobox.cjs +1 -1
  69. package/dist/combobox.d.ts +28 -18
  70. package/dist/combobox.d.ts.map +1 -1
  71. package/dist/combobox.js +191 -160
  72. package/dist/command.cjs +1 -1
  73. package/dist/command.d.ts +115 -9
  74. package/dist/command.d.ts.map +1 -1
  75. package/dist/command.js +176 -152
  76. package/dist/context-menu.cjs +1 -1
  77. package/dist/context-menu.d.ts +188 -20
  78. package/dist/context-menu.d.ts.map +1 -1
  79. package/dist/context-menu.js +120 -122
  80. package/dist/date-picker.cjs +1 -1
  81. package/dist/date-picker.d.ts +75 -9
  82. package/dist/date-picker.d.ts.map +1 -1
  83. package/dist/date-picker.js +221 -82
  84. package/dist/description.cjs +1 -0
  85. package/dist/description.d.ts +37 -0
  86. package/dist/description.d.ts.map +1 -0
  87. package/dist/description.js +25 -0
  88. package/dist/dialog.cjs +1 -1
  89. package/dist/dialog.d.ts +73 -9
  90. package/dist/dialog.d.ts.map +1 -1
  91. package/dist/dialog.js +103 -112
  92. package/dist/drawer.cjs +1 -1
  93. package/dist/drawer.d.ts +92 -0
  94. package/dist/drawer.d.ts.map +1 -1
  95. package/dist/drawer.js +67 -52
  96. package/dist/dropdown-menu.cjs +1 -1
  97. package/dist/dropdown-menu.d.ts +95 -11
  98. package/dist/dropdown-menu.d.ts.map +1 -1
  99. package/dist/dropdown-menu.js +146 -106
  100. package/dist/field.cjs +1 -1
  101. package/dist/field.d.ts +26 -6
  102. package/dist/field.d.ts.map +1 -1
  103. package/dist/field.js +55 -53
  104. package/dist/global-layout.cjs +1 -1
  105. package/dist/global-layout.d.ts +27 -17
  106. package/dist/global-layout.d.ts.map +1 -1
  107. package/dist/global-layout.js +86 -79
  108. package/dist/hover-card.cjs +1 -1
  109. package/dist/hover-card.d.ts +36 -6
  110. package/dist/hover-card.d.ts.map +1 -1
  111. package/dist/hover-card.js +44 -42
  112. package/dist/index.cjs +1 -1
  113. package/dist/index.d.ts +1 -1
  114. package/dist/index.d.ts.map +1 -1
  115. package/dist/index.js +367 -386
  116. package/dist/input-group.cjs +1 -1
  117. package/dist/input-group.d.ts +21 -2
  118. package/dist/input-group.d.ts.map +1 -1
  119. package/dist/input-group.js +51 -41
  120. package/dist/input-otp.cjs +1 -1
  121. package/dist/input-otp.js +1 -1
  122. package/dist/input-password.cjs +1 -1
  123. package/dist/input-password.d.ts.map +1 -1
  124. package/dist/input-password.js +25 -26
  125. package/dist/input.cjs +1 -1
  126. package/dist/input.d.ts +38 -24
  127. package/dist/input.d.ts.map +1 -1
  128. package/dist/input.js +68 -136
  129. package/dist/label.cjs +1 -1
  130. package/dist/label.d.ts +20 -1
  131. package/dist/label.d.ts.map +1 -1
  132. package/dist/label.js +31 -18
  133. package/dist/link.cjs +1 -1
  134. package/dist/link.js +1 -1
  135. package/dist/logo.cjs +1 -1
  136. package/dist/logo.d.ts +9 -4
  137. package/dist/logo.d.ts.map +1 -1
  138. package/dist/logo.js +20 -21
  139. package/dist/menubar.cjs +1 -1
  140. package/dist/menubar.d.ts +43 -6
  141. package/dist/menubar.d.ts.map +1 -1
  142. package/dist/menubar.js +100 -78
  143. package/dist/navigation-menu.cjs +1 -1
  144. package/dist/navigation-menu.d.ts +6 -54
  145. package/dist/navigation-menu.d.ts.map +1 -1
  146. package/dist/navigation-menu.js +73 -84
  147. package/dist/pagination.cjs +1 -1
  148. package/dist/pagination.d.ts +8 -10
  149. package/dist/pagination.d.ts.map +1 -1
  150. package/dist/pagination.js +78 -86
  151. package/dist/popover.cjs +1 -1
  152. package/dist/popover.d.ts +59 -4
  153. package/dist/popover.d.ts.map +1 -1
  154. package/dist/popover.js +42 -34
  155. package/dist/progress.cjs +1 -1
  156. package/dist/progress.d.ts +9 -2
  157. package/dist/progress.d.ts.map +1 -1
  158. package/dist/progress.js +71 -59
  159. package/dist/radio-group.cjs +1 -1
  160. package/dist/radio-group.d.ts +33 -10
  161. package/dist/radio-group.d.ts.map +1 -1
  162. package/dist/radio-group.js +56 -66
  163. package/dist/rating.d.ts +4 -0
  164. package/dist/rating.d.ts.map +1 -1
  165. package/dist/resizable.cjs +1 -1
  166. package/dist/resizable.d.ts +58 -6
  167. package/dist/resizable.d.ts.map +1 -1
  168. package/dist/resizable.js +38 -37
  169. package/dist/scroll-area.cjs +1 -1
  170. package/dist/scroll-area.d.ts +46 -5
  171. package/dist/scroll-area.d.ts.map +1 -1
  172. package/dist/scroll-area.js +42 -38
  173. package/dist/select.cjs +1 -1
  174. package/dist/select.d.ts +30 -0
  175. package/dist/select.d.ts.map +1 -1
  176. package/dist/select.js +64 -54
  177. package/dist/separator.cjs +1 -1
  178. package/dist/separator.d.ts +52 -5
  179. package/dist/separator.d.ts.map +1 -1
  180. package/dist/separator.js +45 -35
  181. package/dist/sheet.cjs +1 -1
  182. package/dist/sheet.d.ts +85 -19
  183. package/dist/sheet.d.ts.map +1 -1
  184. package/dist/sheet.js +117 -115
  185. package/dist/skeleton.cjs +1 -1
  186. package/dist/skeleton.d.ts +24 -2
  187. package/dist/skeleton.d.ts.map +1 -1
  188. package/dist/skeleton.js +15 -9
  189. package/dist/slider.cjs +1 -1
  190. package/dist/slider.d.ts +18 -4
  191. package/dist/slider.d.ts.map +1 -1
  192. package/dist/slider.js +72 -66
  193. package/dist/sonner.cjs +1 -1
  194. package/dist/sonner.d.ts +21 -22
  195. package/dist/sonner.d.ts.map +1 -1
  196. package/dist/sonner.js +46 -48
  197. package/dist/split-layout.d.ts +4 -1
  198. package/dist/split-layout.d.ts.map +1 -1
  199. package/dist/switch.cjs +1 -1
  200. package/dist/switch.d.ts +2 -12
  201. package/dist/switch.d.ts.map +1 -1
  202. package/dist/switch.js +37 -41
  203. package/dist/table.cjs +1 -1
  204. package/dist/table.d.ts +16 -12
  205. package/dist/table.d.ts.map +1 -1
  206. package/dist/table.js +56 -58
  207. package/dist/tabs.d.ts +27 -3
  208. package/dist/tabs.d.ts.map +1 -1
  209. package/dist/toggle-group.cjs +1 -1
  210. package/dist/toggle-group.d.ts +57 -7
  211. package/dist/toggle-group.d.ts.map +1 -1
  212. package/dist/toggle-group.js +60 -67
  213. package/dist/toggle.cjs +1 -1
  214. package/dist/toggle.d.ts +12 -26
  215. package/dist/toggle.d.ts.map +1 -1
  216. package/dist/toggle.js +16 -20
  217. package/package.json +9 -3
  218. package/src/blocks/data-table.tsx +43 -33
  219. package/src/blocks/sidebar.tsx +158 -541
  220. package/src/components/accordion.tsx +164 -78
  221. package/src/components/alert-dialog.tsx +156 -111
  222. package/src/components/alert.tsx +27 -14
  223. package/src/components/aspect-ratio.tsx +25 -16
  224. package/src/components/avatar.tsx +56 -8
  225. package/src/components/badge.tsx +65 -42
  226. package/src/components/breadcrumb.tsx +159 -83
  227. package/src/components/button.tsx +42 -63
  228. package/src/components/calendar.tsx +22 -6
  229. package/src/components/card.tsx +92 -40
  230. package/src/components/carousel.tsx +240 -115
  231. package/src/components/centred-layout.tsx +68 -49
  232. package/src/components/chart.tsx +118 -47
  233. package/src/components/checkbox.tsx +43 -79
  234. package/src/components/collapsible.tsx +95 -26
  235. package/src/components/combobox.tsx +243 -153
  236. package/src/components/command.tsx +295 -121
  237. package/src/components/context-menu.tsx +279 -82
  238. package/src/components/date-picker.tsx +282 -31
  239. package/src/components/description.tsx +60 -0
  240. package/src/components/dialog.tsx +163 -87
  241. package/src/components/drawer.tsx +76 -2
  242. package/src/components/dropdown-menu.tsx +143 -37
  243. package/src/components/field.tsx +38 -11
  244. package/src/components/global-layout.tsx +116 -77
  245. package/src/components/hover-card.tsx +54 -14
  246. package/src/components/input-group.tsx +56 -18
  247. package/src/components/input-otp.tsx +1 -1
  248. package/src/components/input-password.tsx +4 -5
  249. package/src/components/input.tsx +93 -186
  250. package/src/components/label.tsx +56 -15
  251. package/src/components/link.tsx +1 -1
  252. package/src/components/logo.tsx +12 -7
  253. package/src/components/menubar.tsx +61 -5
  254. package/src/components/navigation-menu.tsx +37 -99
  255. package/src/components/pagination.tsx +13 -19
  256. package/src/components/popover.tsx +103 -20
  257. package/src/components/progress.tsx +82 -60
  258. package/src/components/radio-group.tsx +44 -25
  259. package/src/components/rating.tsx +4 -0
  260. package/src/components/resizable.tsx +88 -38
  261. package/src/components/scroll-area.tsx +123 -56
  262. package/src/components/select.tsx +22 -2
  263. package/src/components/separator.tsx +101 -24
  264. package/src/components/sheet.tsx +186 -90
  265. package/src/components/skeleton.tsx +40 -10
  266. package/src/components/slider.tsx +83 -57
  267. package/src/components/sonner.tsx +34 -34
  268. package/src/components/split-layout.tsx +4 -1
  269. package/src/components/switch.figma.tsx +7 -11
  270. package/src/components/switch.tsx +9 -19
  271. package/src/components/table.tsx +23 -18
  272. package/src/components/tabs.tsx +27 -3
  273. package/src/components/toggle-group.tsx +115 -86
  274. package/src/components/toggle.figma.tsx +13 -19
  275. package/src/components/toggle.tsx +20 -34
  276. package/src/index.ts +1 -1
  277. package/dist/input-base.cjs +0 -1
  278. package/dist/input-base.d.ts +0 -28
  279. package/dist/input-base.d.ts.map +0 -1
  280. package/dist/input-base.js +0 -56
  281. package/src/components/input-base.tsx +0 -86
package/dist/select.js CHANGED
@@ -1,54 +1,57 @@
1
- import { jsx as e, jsxs as f } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as p } from "react/jsx-runtime";
2
2
  import * as u from "react";
3
3
  import * as r from "@radix-ui/react-select";
4
- import { CheckIcon as N, ChevronDownIcon as h, ChevronUpIcon as z } from "lucide-react";
5
- import { cva as I } from "class-variance-authority";
4
+ import { CheckIcon as k, ChevronDownIcon as h, ChevronUpIcon as C } from "@brightlocal/icons";
5
+ import { cva as T } from "class-variance-authority";
6
6
  import { cn as n } from "@brightlocal/ui-components/lib/utils";
7
- import { Label as k } from "@brightlocal/ui-components/label";
8
- function R({
7
+ import { Label as _ } from "@brightlocal/ui-components/label";
8
+ function j({
9
9
  label: t,
10
10
  description: a,
11
11
  optional: s,
12
- placeholder: l,
12
+ placeholder: i,
13
13
  children: o,
14
14
  "aria-label": d,
15
15
  ...m
16
16
  }) {
17
- const c = u.useId(), p = `${c}-label`, x = `${c}-description`, g = a, S = t || g, b = {
18
- placeholder: l,
17
+ const c = u.useId(), f = `${c}-label`, N = `${c}-description`, g = a, w = t || g, b = {
18
+ placeholder: i,
19
19
  "aria-required": s ? void 0 : !0,
20
20
  "aria-label": d
21
- }, w = {
21
+ }, I = {
22
22
  ...b,
23
23
  id: c
24
- }, v = (i, y) => u.isValidElement(i) && i.type === _ ? u.cloneElement(
25
- i,
26
- y
27
- ) : i;
28
- return S ? /* @__PURE__ */ f("div", { className: "flex flex-col gap-2", children: [
29
- t && /* @__PURE__ */ e(k, { htmlFor: c, id: p, optional: s, children: t }),
24
+ }, v = (l, z) => u.isValidElement(l) && l.type === x ? u.cloneElement(
25
+ l,
26
+ z
27
+ ) : l;
28
+ return w ? /* @__PURE__ */ p("div", { className: "flex flex-col gap-2", children: [
29
+ t && /* @__PURE__ */ e(_, { htmlFor: c, id: f, optional: s, children: t }),
30
30
  /* @__PURE__ */ e(r.Root, { "data-slot": "select", ...m, children: u.Children.map(
31
31
  o,
32
- (i) => v(i, w)
32
+ (l) => v(l, I)
33
33
  ) }),
34
- g && /* @__PURE__ */ e("p", { className: "text-muted-foreground text-sm", id: x, children: g })
34
+ g && /* @__PURE__ */ e("p", { className: "text-muted-foreground text-sm", id: N, children: g })
35
35
  ] }) : /* @__PURE__ */ e(r.Root, { "data-slot": "select", ...m, children: u.Children.map(
36
36
  o,
37
- (i) => v(i, b)
37
+ (l) => v(l, b)
38
38
  ) });
39
39
  }
40
- function D(t) {
40
+ j.displayName = "Select";
41
+ function B(t) {
41
42
  return /* @__PURE__ */ e(r.Group, { "data-slot": "select-group", ...t });
42
43
  }
43
- function E(t) {
44
+ B.displayName = "SelectGroup";
45
+ function V(t) {
44
46
  return /* @__PURE__ */ e(r.Value, { "data-slot": "select-value", ...t });
45
47
  }
46
- const C = I([
48
+ V.displayName = "SelectValue";
49
+ const q = T([
47
50
  // Base layout
48
51
  "relative flex w-full h-9 items-center justify-between gap-2",
49
52
  "px-3 py-2",
50
53
  // Base appearance
51
- "border border-border rounded-lg outline-none transition-all",
54
+ "border border-border rounded-sm outline-none transition-all",
52
55
  "bg-neutral-50 border-neutral-300",
53
56
  "dark:bg-white/5 dark:border-white/15",
54
57
  // Typography
@@ -69,23 +72,23 @@ const C = I([
69
72
  "[&_svg:not([class*='size-'])]:size-4",
70
73
  "[&_svg:not([class*='text-'])]:text-muted-foreground"
71
74
  ]);
72
- function _({
75
+ function x({
73
76
  className: t,
74
77
  children: a,
75
78
  placeholder: s,
76
- dataHook: l,
79
+ dataHook: i,
77
80
  ...o
78
81
  }) {
79
- const d = o["aria-invalid"] === !0 || o["aria-invalid"] === "true", m = o["aria-required"] === !0 || o["aria-required"] === "true", c = o["aria-label"] || s || "Select an option", p = d ? "border-destructive dark:border-destructive focus-visible:border-destructive focus-visible:shadow-destructive" : "";
80
- return /* @__PURE__ */ f(
82
+ const d = o["aria-invalid"] === !0 || o["aria-invalid"] === "true", m = o["aria-required"] === !0 || o["aria-required"] === "true", c = o["aria-label"] || s || "Select an option", f = d ? "border-destructive dark:border-destructive focus-visible:border-destructive focus-visible:shadow-destructive" : "";
83
+ return /* @__PURE__ */ p(
81
84
  r.Trigger,
82
85
  {
83
86
  ...o,
84
87
  "aria-invalid": d ? "true" : void 0,
85
88
  "aria-label": c,
86
89
  "aria-required": m ? "true" : void 0,
87
- className: n(C(), p, t),
88
- "data-hook": l,
90
+ className: n(q(), f, t),
91
+ "data-hook": i,
89
92
  "data-slot": "select-trigger",
90
93
  children: [
91
94
  a,
@@ -94,11 +97,12 @@ function _({
94
97
  }
95
98
  );
96
99
  }
97
- function U({
100
+ x.displayName = "SelectTrigger";
101
+ function L({
98
102
  className: t,
99
103
  children: a,
100
104
  position: s = "popper",
101
- ...l
105
+ ...i
102
106
  }) {
103
107
  const o = n(
104
108
  // Base appearance
@@ -123,15 +127,15 @@ function U({
123
127
  "data-[side=right]:translate-x-1",
124
128
  "data-[side=top]:-translate-y-1"
125
129
  );
126
- return /* @__PURE__ */ e(r.Portal, { children: /* @__PURE__ */ f(
130
+ return /* @__PURE__ */ e(r.Portal, { children: /* @__PURE__ */ p(
127
131
  r.Content,
128
132
  {
129
133
  className: n(o, d, t),
130
134
  "data-slot": "select-content",
131
135
  position: s,
132
- ...l,
136
+ ...i,
133
137
  children: [
134
- /* @__PURE__ */ e(T, {}),
138
+ /* @__PURE__ */ e(S, {}),
135
139
  /* @__PURE__ */ e(
136
140
  r.Viewport,
137
141
  {
@@ -142,12 +146,13 @@ function U({
142
146
  children: a
143
147
  }
144
148
  ),
145
- /* @__PURE__ */ e(j, {})
149
+ /* @__PURE__ */ e(y, {})
146
150
  ]
147
151
  }
148
152
  ) });
149
153
  }
150
- function G({
154
+ L.displayName = "SelectContent";
155
+ function D({
151
156
  className: t,
152
157
  ...a
153
158
  }) {
@@ -163,12 +168,13 @@ function G({
163
168
  }
164
169
  );
165
170
  }
166
- function $({
171
+ D.displayName = "SelectLabel";
172
+ function P({
167
173
  className: t,
168
174
  children: a,
169
175
  ...s
170
176
  }) {
171
- const l = n(
177
+ const i = n(
172
178
  // Base layout
173
179
  "relative flex w-full cursor-default select-none items-center gap-2",
174
180
  "rounded py-1.5 pl-2 pr-8",
@@ -185,20 +191,21 @@ function $({
185
191
  "[&_svg:not([class*='size-'])]:size-4",
186
192
  "[&_svg:not([class*='text-'])]:text-foreground"
187
193
  );
188
- return /* @__PURE__ */ f(
194
+ return /* @__PURE__ */ p(
189
195
  r.Item,
190
196
  {
191
- className: n(l, t),
197
+ className: n(i, t),
192
198
  "data-slot": "select-item",
193
199
  ...s,
194
200
  children: [
195
- /* @__PURE__ */ e("span", { className: "absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ e(r.ItemIndicator, { children: /* @__PURE__ */ e(N, { className: "size-4" }) }) }),
201
+ /* @__PURE__ */ e("span", { className: "absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ e(r.ItemIndicator, { children: /* @__PURE__ */ e(k, { className: "size-4" }) }) }),
196
202
  /* @__PURE__ */ e(r.ItemText, { children: a })
197
203
  ]
198
204
  }
199
205
  );
200
206
  }
201
- function F({
207
+ P.displayName = "SelectItem";
208
+ function R({
202
209
  className: t,
203
210
  ...a
204
211
  }) {
@@ -211,7 +218,8 @@ function F({
211
218
  }
212
219
  );
213
220
  }
214
- function T({
221
+ R.displayName = "SelectSeparator";
222
+ function S({
215
223
  className: t,
216
224
  ...a
217
225
  }) {
@@ -224,11 +232,12 @@ function T({
224
232
  ),
225
233
  "data-slot": "select-scroll-up-button",
226
234
  ...a,
227
- children: /* @__PURE__ */ e(z, { className: "size-4" })
235
+ children: /* @__PURE__ */ e(C, { className: "size-4" })
228
236
  }
229
237
  );
230
238
  }
231
- function j({
239
+ S.displayName = "SelectScrollUpButton";
240
+ function y({
232
241
  className: t,
233
242
  ...a
234
243
  }) {
@@ -245,15 +254,16 @@ function j({
245
254
  }
246
255
  );
247
256
  }
257
+ y.displayName = "SelectScrollDownButton";
248
258
  export {
249
- R as Select,
250
- U as SelectContent,
251
- D as SelectGroup,
252
- $ as SelectItem,
253
- G as SelectLabel,
254
- j as SelectScrollDownButton,
255
- T as SelectScrollUpButton,
256
- F as SelectSeparator,
257
- _ as SelectTrigger,
258
- E as SelectValue
259
+ j as Select,
260
+ L as SelectContent,
261
+ B as SelectGroup,
262
+ P as SelectItem,
263
+ D as SelectLabel,
264
+ y as SelectScrollDownButton,
265
+ S as SelectScrollUpButton,
266
+ R as SelectSeparator,
267
+ x as SelectTrigger,
268
+ V as SelectValue
259
269
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),l=require("@radix-ui/react-separator"),i=require("@brightlocal/ui-components/lib/utils");function c(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const u=c(l);var s=(t=>(t.HORIZONTAL="horizontal",t.VERTICAL="vertical",t))(s||{});function n({className:t,orientation:e="horizontal",decorative:r=!0,...o}){return a.jsx(u.Root,{className:i.cn("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),"data-slot":"separator-root",decorative:r,orientation:e,...o})}function p({className:t,children:e}){return a.jsxs("div",{className:i.cn("flex items-center gap-2",t),"data-slot":"separator-with-text",children:[a.jsx(n,{className:"flex-1"}),a.jsx("span",{className:"text-sidebar-foreground shrink-0 text-sm leading-none font-medium whitespace-nowrap",children:e}),a.jsx(n,{className:"flex-1"})]})}exports.Separator=n;exports.SeparatorOrientation=s;exports.SeparatorWithText=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),m=require("react"),x=require("@radix-ui/react-separator"),l=require("@brightlocal/ui-components/lib/utils");function c(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(a,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return a.default=t,Object.freeze(a)}const d=c(m),g=c(x),n=d.forwardRef(({className:t,orientation:a="horizontal",decorative:e=!0,dataHook:r,trackingEl:i,trackingLabel:s,...u},f)=>o.jsx(g.Root,{ref:f,className:l.cn("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),"data-hook":r,"data-slot":"separator","data-tracking-el":i,"data-tracking-label":s,decorative:e,orientation:a,...u}));n.displayName="Separator";const p=d.forwardRef(({className:t,children:a,dataHook:e,trackingEl:r,trackingLabel:i},s)=>o.jsxs("div",{ref:s,className:l.cn("flex items-center gap-2",t),"data-hook":e,"data-slot":"separator-with-text","data-tracking-el":r,"data-tracking-label":i,children:[o.jsx(n,{className:"flex-1"}),o.jsx("span",{className:"text-sidebar-foreground shrink-0 text-sm leading-none font-medium whitespace-nowrap",children:a}),o.jsx(n,{className:"flex-1"})]}));p.displayName="SeparatorWithText";exports.Separator=n;exports.SeparatorWithText=p;
@@ -1,14 +1,61 @@
1
1
  import * as React from "react";
2
2
  import * as SeparatorPrimitive from "@radix-ui/react-separator";
3
- export declare enum SeparatorOrientation {
4
- HORIZONTAL = "horizontal",
5
- VERTICAL = "vertical"
3
+ /**
4
+ * Orientation variants for Separator
5
+ */
6
+ export type SeparatorOrientation = "horizontal" | "vertical";
7
+ /**
8
+ * Props for the Separator component.
9
+ */
10
+ interface SeparatorProps extends React.ComponentProps<typeof SeparatorPrimitive.Root> {
11
+ /**
12
+ * Data hook for automated testing
13
+ */
14
+ dataHook?: string;
15
+ /**
16
+ * Tracking element identifier for analytics
17
+ */
18
+ trackingEl?: string;
19
+ /**
20
+ * Tracking label for analytics context
21
+ */
22
+ trackingLabel?: string;
6
23
  }
7
- declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
24
+ /**
25
+ * Separator visually divides content using a horizontal or vertical line.
26
+ * Built on Radix UI Separator primitive.
27
+ */
28
+ declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
29
+ /**
30
+ * Props for the SeparatorWithText component.
31
+ */
8
32
  interface SeparatorWithTextProps {
33
+ /**
34
+ * Additional CSS classes
35
+ */
9
36
  className?: string;
37
+ /**
38
+ * Text content to display between separators
39
+ */
10
40
  children: React.ReactNode;
41
+ /**
42
+ * Data hook for automated testing
43
+ */
44
+ dataHook?: string;
45
+ /**
46
+ * Tracking element identifier for analytics
47
+ */
48
+ trackingEl?: string;
49
+ /**
50
+ * Tracking label for analytics context
51
+ */
52
+ trackingLabel?: string;
11
53
  }
12
- declare function SeparatorWithText({ className, children }: SeparatorWithTextProps): import("react/jsx-runtime").JSX.Element;
54
+ /**
55
+ * SeparatorWithText displays a horizontal separator with centered text.
56
+ * Commonly used for "OR" dividers in forms.
57
+ */
58
+ declare const SeparatorWithText: React.ForwardRefExoticComponent<SeparatorWithTextProps & React.RefAttributes<HTMLDivElement>>;
13
59
  export { Separator, SeparatorWithText };
60
+ export type { SeparatorProps, SeparatorWithTextProps };
14
61
  //# sourceMappingURL=separator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAIhE,oBAAY,oBAAoB;IAC9B,UAAU,eAAe;IACzB,QAAQ,aAAa;CACtB;AAED,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,WAA6C,EAC7C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AAS,EAAE,iBAAiB,EAAE,CAAC;AAExC,YAAY,EAAE,cAAc,EAAE,sBAAsB,EAAE,CAAC"}
package/dist/separator.js CHANGED
@@ -1,43 +1,53 @@
1
- import { jsx as a, jsxs as s } from "react/jsx-runtime";
2
- import * as l from "@radix-ui/react-separator";
3
- import { cn as o } from "@brightlocal/ui-components/lib/utils";
4
- var m = /* @__PURE__ */ ((t) => (t.HORIZONTAL = "horizontal", t.VERTICAL = "vertical", t))(m || {});
5
- function e({
6
- className: t,
7
- orientation: r = "horizontal",
8
- decorative: i = !0,
9
- ...n
10
- }) {
11
- return /* @__PURE__ */ a(
12
- l.Root,
1
+ import { jsx as a, jsxs as c } from "react/jsx-runtime";
2
+ import * as l from "react";
3
+ import * as f from "@radix-ui/react-separator";
4
+ import { cn as d } from "@brightlocal/ui-components/lib/utils";
5
+ const s = l.forwardRef(
6
+ ({
7
+ className: t,
8
+ orientation: r = "horizontal",
9
+ decorative: e = !0,
10
+ dataHook: o,
11
+ trackingEl: i,
12
+ trackingLabel: n,
13
+ ...m
14
+ }, p) => /* @__PURE__ */ a(
15
+ f.Root,
13
16
  {
14
- className: o(
17
+ ref: p,
18
+ className: d(
15
19
  "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
16
20
  t
17
21
  ),
18
- "data-slot": "separator-root",
19
- decorative: i,
22
+ "data-hook": o,
23
+ "data-slot": "separator",
24
+ "data-tracking-el": i,
25
+ "data-tracking-label": n,
26
+ decorative: e,
20
27
  orientation: r,
21
- ...n
28
+ ...m
22
29
  }
23
- );
24
- }
25
- function d({ className: t, children: r }) {
26
- return /* @__PURE__ */ s(
27
- "div",
28
- {
29
- className: o("flex items-center gap-2", t),
30
- "data-slot": "separator-with-text",
31
- children: [
32
- /* @__PURE__ */ a(e, { className: "flex-1" }),
33
- /* @__PURE__ */ a("span", { className: "text-sidebar-foreground shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: r }),
34
- /* @__PURE__ */ a(e, { className: "flex-1" })
35
- ]
36
- }
37
- );
38
- }
30
+ )
31
+ );
32
+ s.displayName = "Separator";
33
+ const h = l.forwardRef(({ className: t, children: r, dataHook: e, trackingEl: o, trackingLabel: i }, n) => /* @__PURE__ */ c(
34
+ "div",
35
+ {
36
+ ref: n,
37
+ className: d("flex items-center gap-2", t),
38
+ "data-hook": e,
39
+ "data-slot": "separator-with-text",
40
+ "data-tracking-el": o,
41
+ "data-tracking-label": i,
42
+ children: [
43
+ /* @__PURE__ */ a(s, { className: "flex-1" }),
44
+ /* @__PURE__ */ a("span", { className: "text-sidebar-foreground shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: r }),
45
+ /* @__PURE__ */ a(s, { className: "flex-1" })
46
+ ]
47
+ }
48
+ ));
49
+ h.displayName = "SeparatorWithText";
39
50
  export {
40
- e as Separator,
41
- m as SeparatorOrientation,
42
- d as SeparatorWithText
51
+ s as Separator,
52
+ h as SeparatorWithText
43
53
  };
package/dist/sheet.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),c=require("@radix-ui/react-dialog"),u=require("class-variance-authority"),f=require("lucide-react"),n=require("@brightlocal/ui-components/lib/utils");function h(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const r=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,r.get?r:{enumerable:!0,get:()=>t[s]})}}return e.default=t,Object.freeze(e)}const a=h(c);var i=(t=>(t.TOP="top",t.RIGHT="right",t.BOTTOM="bottom",t.LEFT="left",t))(i||{});const g=u.cva(["bg-background","data-[state=open]:animate-in","data-[state=closed]:animate-out","fixed","z-50","flex","flex-col","gap-4","p-6","shadow-lg","transition","ease-in-out","data-[state=closed]:duration-300","data-[state=open]:duration-500"],{variants:{side:{top:["data-[state=closed]:slide-out-to-top","data-[state=open]:slide-in-from-top","inset-x-0","top-0","h-auto","border-b"],right:["data-[state=closed]:slide-out-to-right","data-[state=open]:slide-in-from-right","inset-y-0","right-0","h-full","w-3/4","border-l","sm:max-w-sm"],bottom:["data-[state=closed]:slide-out-to-bottom","data-[state=open]:slide-in-from-bottom","inset-x-0","bottom-0","h-auto","border-t"],left:["data-[state=closed]:slide-out-to-left","data-[state=open]:slide-in-from-left","inset-y-0","left-0","h-full","w-3/4","border-r","sm:max-w-sm"]}},defaultVariants:{side:"right"}});function m({...t}){return o.jsx(a.Root,{"data-slot":"sheet",modal:!0,...t})}function p({...t}){return o.jsx(a.Trigger,{"data-slot":"sheet-trigger",...t})}function x({...t}){return o.jsx(a.Close,{"data-slot":"sheet-close",...t})}function l({...t}){return o.jsx(a.Portal,{"data-slot":"sheet-portal",...t})}function d({className:t,...e}){return o.jsx(a.Overlay,{className:n.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),"data-slot":"sheet-overlay",...e})}function b({className:t,children:e,side:s,...r}){return o.jsxs(l,{children:[o.jsx(d,{}),o.jsxs(a.Content,{className:n.cn(g({side:s}),t),"data-slot":"sheet-content",...r,children:[e,o.jsxs(a.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[o.jsx(f.XIcon,{}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function j({className:t,...e}){return o.jsx("div",{className:n.cn("flex flex-col gap-2 text-center sm:text-left",t),"data-slot":"sheet-header",...e})}function S({className:t,...e}){return o.jsx("div",{className:n.cn("mt-auto flex flex-col gap-2 sm:flex-row sm:justify-end",t),"data-slot":"sheet-footer",...e})}function v({className:t,...e}){return o.jsx(a.Title,{className:n.cn("text-foreground text-lg font-semibold",t),"data-slot":"sheet-title",...e})}function y({className:t,...e}){return o.jsx(a.Description,{className:n.cn("text-muted-foreground text-sm",t),"data-slot":"sheet-description",...e})}exports.Sheet=m;exports.SheetClose=x;exports.SheetContent=b;exports.SheetDescription=y;exports.SheetFooter=S;exports.SheetHeader=j;exports.SheetOverlay=d;exports.SheetPortal=l;exports.SheetSide=i;exports.SheetTitle=v;exports.SheetTrigger=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),N=require("react"),w=require("@radix-ui/react-dialog"),R=require("class-variance-authority"),C=require("@brightlocal/icons"),n=require("@brightlocal/ui-components/lib/utils");function c(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const r=c(N),s=c(w),O=R.cva(["bg-background","data-[state=open]:animate-in","data-[state=closed]:animate-out","fixed","z-50","flex","flex-col","gap-4","p-6","shadow-lg","transition","ease-in-out","data-[state=closed]:duration-300","data-[state=open]:duration-500"],{variants:{side:{top:["data-[state=closed]:slide-out-to-top","data-[state=open]:slide-in-from-top","inset-x-0","top-0","h-auto","border-b"],right:["data-[state=closed]:slide-out-to-right","data-[state=open]:slide-in-from-right","inset-y-0","right-0","h-full","w-3/4","border-l","sm:max-w-sm"],bottom:["data-[state=closed]:slide-out-to-bottom","data-[state=open]:slide-in-from-bottom","inset-x-0","bottom-0","h-auto","border-t"],left:["data-[state=closed]:slide-out-to-left","data-[state=open]:slide-in-from-left","inset-y-0","left-0","h-full","w-3/4","border-r","sm:max-w-sm"]}},defaultVariants:{side:"right"}});function f({...e}){return o.jsx(s.Root,{"data-slot":"sheet",modal:!0,...e})}f.displayName="Sheet";const h=r.forwardRef(({dataHook:e,...t},a)=>o.jsx(s.Trigger,{ref:a,"data-hook":e,"data-slot":"sheet-trigger",...t}));h.displayName="SheetTrigger";const u=r.forwardRef(({...e},t)=>o.jsx(s.Close,{ref:t,"data-slot":"sheet-close",...e}));u.displayName="SheetClose";function l({...e}){return o.jsx(s.Portal,{"data-slot":"sheet-portal",...e})}l.displayName="SheetPortal";const d=r.forwardRef(({className:e,...t},a)=>o.jsx(s.Overlay,{ref:a,className:n.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),"data-slot":"sheet-overlay",...t}));d.displayName="SheetOverlay";const m=r.forwardRef(({className:e,children:t,side:a,dataHook:i,trackingEl:y,trackingLabel:b,...j},v)=>o.jsxs(l,{children:[o.jsx(d,{}),o.jsxs(s.Content,{ref:v,className:n.cn(O({side:a}),e),"data-hook":i,"data-slot":"sheet-content","data-tracking-el":y,"data-tracking-label":b,...j,children:[t,o.jsxs(s.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[o.jsx(C.XIcon,{}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));m.displayName="SheetContent";const p=r.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:n.cn("flex flex-col gap-2 text-center sm:text-left",e),"data-slot":"sheet-header",...t}));p.displayName="SheetHeader";const g=r.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:n.cn("mt-auto flex flex-col gap-2 sm:flex-row sm:justify-end",e),"data-slot":"sheet-footer",...t}));g.displayName="SheetFooter";const x=r.forwardRef(({className:e,...t},a)=>o.jsx(s.Title,{ref:a,className:n.cn("text-foreground text-lg font-semibold",e),"data-slot":"sheet-title",...t}));x.displayName="SheetTitle";const S=r.forwardRef(({className:e,...t},a)=>o.jsx(s.Description,{ref:a,className:n.cn("text-muted-foreground text-sm",e),"data-slot":"sheet-description",...t}));S.displayName="SheetDescription";exports.Sheet=f;exports.SheetClose=u;exports.SheetContent=m;exports.SheetDescription=S;exports.SheetFooter=g;exports.SheetHeader=p;exports.SheetOverlay=d;exports.SheetPortal=l;exports.SheetTitle=x;exports.SheetTrigger=h;
package/dist/sheet.d.ts CHANGED
@@ -3,36 +3,102 @@ import * as React from "react";
3
3
  import * as SheetPrimitive from "@radix-ui/react-dialog";
4
4
  /**
5
5
  * Available sheet side variants
6
+ * - top: Sheet slides in from the top
7
+ * - right: Sheet slides in from the right (default)
8
+ * - bottom: Sheet slides in from the bottom
9
+ * - left: Sheet slides in from the left
6
10
  */
7
- export declare enum SheetSide {
8
- /** Sheet slides in from the top */
9
- TOP = "top",
10
- /** Sheet slides in from the right (default) */
11
- RIGHT = "right",
12
- /** Sheet slides in from the bottom */
13
- BOTTOM = "bottom",
14
- /** Sheet slides in from the left */
15
- LEFT = "left"
16
- }
11
+ export type SheetSide = "top" | "right" | "bottom" | "left";
17
12
  declare const sheetContentVariants: (props?: ({
18
13
  side?: "left" | "right" | "top" | "bottom" | null | undefined;
19
14
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
15
+ /**
16
+ * Sheet root component that provides context for the sheet dialog.
17
+ * Wraps the Radix UI Dialog primitive with modal behavior enabled by default.
18
+ */
20
19
  declare function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
21
- declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
22
- declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
20
+ declare namespace Sheet {
21
+ var displayName: string;
22
+ }
23
+ /**
24
+ * Props for SheetTrigger component
25
+ */
26
+ interface SheetTriggerProps extends React.ComponentProps<typeof SheetPrimitive.Trigger> {
27
+ /**
28
+ * Data hook for automated testing
29
+ */
30
+ dataHook?: string;
31
+ }
32
+ /**
33
+ * Sheet trigger button that opens the sheet when clicked.
34
+ * Use with asChild prop to merge with your own button component.
35
+ */
36
+ declare const SheetTrigger: React.ForwardRefExoticComponent<Omit<SheetTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
37
+ /**
38
+ * Sheet close button that closes the sheet when clicked.
39
+ * Use with asChild prop to merge with your own button component.
40
+ */
41
+ declare const SheetClose: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
42
+ /**
43
+ * Sheet portal that renders content in a React portal.
44
+ * Used internally by SheetContent.
45
+ */
23
46
  declare function SheetPortal({ ...props }: React.ComponentProps<typeof SheetPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
24
- declare function SheetOverlay({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
47
+ declare namespace SheetPortal {
48
+ var displayName: string;
49
+ }
50
+ /**
51
+ * Sheet overlay that appears behind the sheet content.
52
+ * Provides a semi-transparent backdrop with fade animation.
53
+ */
54
+ declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
55
+ /**
56
+ * Props for the SheetContent component
57
+ */
25
58
  interface SheetContentProps extends React.ComponentProps<typeof SheetPrimitive.Content>, VariantProps<typeof sheetContentVariants> {
26
59
  /**
27
60
  * Side from which the sheet slides in
61
+ * @default "right"
28
62
  */
29
63
  side?: SheetSide;
64
+ /**
65
+ * Data hook for automated testing
66
+ */
67
+ dataHook?: string;
68
+ /**
69
+ * Tracking element identifier for analytics
70
+ */
71
+ trackingEl?: string;
72
+ /**
73
+ * Tracking label for analytics context
74
+ */
75
+ trackingLabel?: string;
30
76
  }
31
- declare function SheetContent({ className, children, side, ...props }: SheetContentProps): import("react/jsx-runtime").JSX.Element;
32
- declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
33
- declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
34
- declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
35
- declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
77
+ /**
78
+ * Sheet content container that slides in from the specified side.
79
+ * Includes an overlay backdrop and close button.
80
+ */
81
+ declare const SheetContent: React.ForwardRefExoticComponent<Omit<SheetContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
82
+ /**
83
+ * Sheet header section for title and description.
84
+ * Centers text on mobile, left-aligns on larger screens.
85
+ */
86
+ declare const SheetHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
87
+ /**
88
+ * Sheet footer section for actions and buttons.
89
+ * Stacks buttons on mobile, aligns to end on larger screens.
90
+ */
91
+ declare const SheetFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
92
+ /**
93
+ * Sheet title component for the main heading.
94
+ * Should be used within SheetHeader.
95
+ */
96
+ declare const SheetTitle: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
97
+ /**
98
+ * Sheet description component for additional context.
99
+ * Should be used within SheetHeader below SheetTitle.
100
+ */
101
+ declare const SheetDescription: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
36
102
  export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, };
37
- export type { SheetContentProps };
103
+ export type { SheetContentProps, SheetTriggerProps };
38
104
  //# sourceMappingURL=sheet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/components/sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE;;GAEG;AACH,oBAAY,SAAS;IACnB,mCAAmC;IACnC,GAAG,QAAQ;IACX,+CAA+C;IAC/C,KAAK,UAAU;IACf,sCAAsC;IACtC,MAAM,WAAW;IACjB,oCAAoC;IACpC,IAAI,SAAS;CACd;AAED,QAAA,MAAM,oBAAoB;;8EA8DzB,CAAC;AAEF,iBAAS,KAAK,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,2CAE5E;AAED,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,OAAO,CAAC,2CAErD;AAED,iBAAS,UAAU,CAAC,EAClB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,KAAK,CAAC,2CAEnD;AAED,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,MAAM,CAAC,2CAEpD;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAA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