@brightlocal/ui-components 0.1.1 → 0.1.3

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 (244) 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.d.ts +22 -1
  10. package/dist/alert.d.ts.map +1 -1
  11. package/dist/aspect-ratio.cjs +1 -1
  12. package/dist/aspect-ratio.d.ts +11 -1
  13. package/dist/aspect-ratio.d.ts.map +1 -1
  14. package/dist/aspect-ratio.js +16 -20
  15. package/dist/avatar.cjs +1 -1
  16. package/dist/avatar.d.ts +43 -3
  17. package/dist/avatar.d.ts.map +1 -1
  18. package/dist/avatar.js +18 -16
  19. package/dist/badge.cjs +1 -1
  20. package/dist/badge.d.ts +24 -9
  21. package/dist/badge.d.ts.map +1 -1
  22. package/dist/badge.js +34 -32
  23. package/dist/blocks/data-table.cjs +1 -1
  24. package/dist/blocks/data-table.d.ts.map +1 -1
  25. package/dist/blocks/data-table.js +209 -202
  26. package/dist/blocks/sidebar.cjs +1 -1
  27. package/dist/blocks/sidebar.d.ts +1 -1
  28. package/dist/blocks/sidebar.d.ts.map +1 -1
  29. package/dist/blocks/sidebar.js +154 -154
  30. package/dist/breadcrumb.cjs +1 -1
  31. package/dist/breadcrumb.d.ts +63 -8
  32. package/dist/breadcrumb.d.ts.map +1 -1
  33. package/dist/breadcrumb.js +97 -93
  34. package/dist/button.cjs +1 -1
  35. package/dist/button.d.ts +17 -45
  36. package/dist/button.d.ts.map +1 -1
  37. package/dist/button.js +49 -50
  38. package/dist/calendar.cjs +1 -1
  39. package/dist/calendar.d.ts +12 -0
  40. package/dist/calendar.d.ts.map +1 -1
  41. package/dist/calendar.js +10 -8
  42. package/dist/card.cjs +1 -1
  43. package/dist/card.d.ts +58 -18
  44. package/dist/card.d.ts.map +1 -1
  45. package/dist/card.js +60 -51
  46. package/dist/carousel.cjs +1 -1
  47. package/dist/carousel.d.ts +99 -9
  48. package/dist/carousel.d.ts.map +1 -1
  49. package/dist/carousel.js +142 -128
  50. package/dist/centred-layout.cjs +1 -1
  51. package/dist/centred-layout.d.ts +18 -2
  52. package/dist/centred-layout.d.ts.map +1 -1
  53. package/dist/centred-layout.js +46 -33
  54. package/dist/chart.cjs +4 -4
  55. package/dist/chart.d.ts +70 -7
  56. package/dist/chart.d.ts.map +1 -1
  57. package/dist/chart.js +71 -66
  58. package/dist/checkbox.cjs +1 -1
  59. package/dist/checkbox.d.ts +9 -5
  60. package/dist/checkbox.d.ts.map +1 -1
  61. package/dist/checkbox.js +61 -82
  62. package/dist/collapsible.cjs +1 -1
  63. package/dist/collapsible.d.ts +65 -8
  64. package/dist/collapsible.d.ts.map +1 -1
  65. package/dist/collapsible.js +41 -55
  66. package/dist/combobox.cjs +1 -1
  67. package/dist/combobox.d.ts +29 -11
  68. package/dist/combobox.d.ts.map +1 -1
  69. package/dist/combobox.js +193 -159
  70. package/dist/command.cjs +1 -1
  71. package/dist/command.d.ts +115 -9
  72. package/dist/command.d.ts.map +1 -1
  73. package/dist/command.js +176 -152
  74. package/dist/context-menu.cjs +1 -1
  75. package/dist/context-menu.d.ts +188 -20
  76. package/dist/context-menu.d.ts.map +1 -1
  77. package/dist/context-menu.js +119 -121
  78. package/dist/date-picker.cjs +1 -1
  79. package/dist/date-picker.d.ts +75 -9
  80. package/dist/date-picker.d.ts.map +1 -1
  81. package/dist/date-picker.js +220 -81
  82. package/dist/description.cjs +1 -0
  83. package/dist/description.d.ts +37 -0
  84. package/dist/description.d.ts.map +1 -0
  85. package/dist/description.js +25 -0
  86. package/dist/dialog.cjs +1 -1
  87. package/dist/dialog.d.ts +73 -9
  88. package/dist/dialog.d.ts.map +1 -1
  89. package/dist/dialog.js +103 -112
  90. package/dist/drawer.cjs +1 -1
  91. package/dist/drawer.d.ts +92 -0
  92. package/dist/drawer.d.ts.map +1 -1
  93. package/dist/drawer.js +67 -52
  94. package/dist/dropdown-menu.cjs +1 -1
  95. package/dist/dropdown-menu.d.ts +95 -11
  96. package/dist/dropdown-menu.d.ts.map +1 -1
  97. package/dist/dropdown-menu.js +146 -106
  98. package/dist/field.cjs +1 -1
  99. package/dist/field.d.ts +23 -6
  100. package/dist/field.d.ts.map +1 -1
  101. package/dist/field.js +54 -53
  102. package/dist/global-layout.cjs +1 -1
  103. package/dist/global-layout.d.ts +27 -17
  104. package/dist/global-layout.d.ts.map +1 -1
  105. package/dist/global-layout.js +86 -79
  106. package/dist/hover-card.cjs +1 -1
  107. package/dist/hover-card.d.ts +36 -6
  108. package/dist/hover-card.d.ts.map +1 -1
  109. package/dist/hover-card.js +44 -42
  110. package/dist/index.cjs +1 -1
  111. package/dist/index.d.ts +1 -1
  112. package/dist/index.d.ts.map +1 -1
  113. package/dist/index.js +383 -387
  114. package/dist/input-group.cjs +1 -1
  115. package/dist/input-group.d.ts +21 -2
  116. package/dist/input-group.d.ts.map +1 -1
  117. package/dist/input-group.js +51 -41
  118. package/dist/input-password.cjs +1 -1
  119. package/dist/input-password.d.ts.map +1 -1
  120. package/dist/input-password.js +24 -25
  121. package/dist/input.cjs +1 -1
  122. package/dist/input.d.ts +38 -24
  123. package/dist/input.d.ts.map +1 -1
  124. package/dist/input.js +68 -136
  125. package/dist/label.cjs +1 -1
  126. package/dist/label.d.ts +20 -1
  127. package/dist/label.d.ts.map +1 -1
  128. package/dist/label.js +31 -18
  129. package/dist/logo.cjs +1 -1
  130. package/dist/logo.d.ts +3 -0
  131. package/dist/logo.d.ts.map +1 -1
  132. package/dist/logo.js +12 -10
  133. package/dist/menubar.cjs +1 -1
  134. package/dist/menubar.d.ts +40 -6
  135. package/dist/menubar.d.ts.map +1 -1
  136. package/dist/menubar.js +97 -76
  137. package/dist/popover.cjs +1 -1
  138. package/dist/popover.d.ts +59 -4
  139. package/dist/popover.d.ts.map +1 -1
  140. package/dist/popover.js +42 -34
  141. package/dist/progress.cjs +1 -1
  142. package/dist/progress.d.ts +9 -2
  143. package/dist/progress.d.ts.map +1 -1
  144. package/dist/progress.js +71 -59
  145. package/dist/radio-group.d.ts +40 -0
  146. package/dist/radio-group.d.ts.map +1 -1
  147. package/dist/rating.d.ts +4 -0
  148. package/dist/rating.d.ts.map +1 -1
  149. package/dist/resizable.cjs +1 -1
  150. package/dist/resizable.d.ts +65 -4
  151. package/dist/resizable.d.ts.map +1 -1
  152. package/dist/resizable.js +53 -36
  153. package/dist/scroll-area.cjs +1 -1
  154. package/dist/scroll-area.d.ts +46 -5
  155. package/dist/scroll-area.d.ts.map +1 -1
  156. package/dist/scroll-area.js +42 -38
  157. package/dist/select.cjs +1 -1
  158. package/dist/select.d.ts +30 -0
  159. package/dist/select.d.ts.map +1 -1
  160. package/dist/select.js +64 -54
  161. package/dist/separator.cjs +1 -1
  162. package/dist/separator.d.ts +49 -2
  163. package/dist/separator.d.ts.map +1 -1
  164. package/dist/separator.js +48 -36
  165. package/dist/sheet.cjs +1 -1
  166. package/dist/sheet.d.ts +80 -9
  167. package/dist/sheet.d.ts.map +1 -1
  168. package/dist/sheet.js +117 -113
  169. package/dist/skeleton.cjs +1 -1
  170. package/dist/skeleton.d.ts +24 -2
  171. package/dist/skeleton.d.ts.map +1 -1
  172. package/dist/skeleton.js +15 -9
  173. package/dist/slider.cjs +1 -1
  174. package/dist/slider.d.ts +18 -4
  175. package/dist/slider.d.ts.map +1 -1
  176. package/dist/slider.js +72 -66
  177. package/dist/sonner.cjs +1 -1
  178. package/dist/sonner.d.ts +4 -2
  179. package/dist/sonner.d.ts.map +1 -1
  180. package/dist/sonner.js +29 -28
  181. package/dist/split-layout.d.ts +4 -1
  182. package/dist/split-layout.d.ts.map +1 -1
  183. package/dist/table.cjs +1 -1
  184. package/dist/table.js +1 -1
  185. package/dist/toggle-group.cjs +1 -1
  186. package/dist/toggle-group.d.ts +3 -1
  187. package/dist/toggle-group.d.ts.map +1 -1
  188. package/dist/toggle-group.js +38 -36
  189. package/package.json +8 -2
  190. package/src/blocks/data-table.tsx +42 -32
  191. package/src/blocks/sidebar.tsx +4 -12
  192. package/src/components/accordion.tsx +163 -77
  193. package/src/components/alert-dialog.tsx +156 -111
  194. package/src/components/alert.tsx +26 -13
  195. package/src/components/aspect-ratio.tsx +25 -16
  196. package/src/components/avatar.tsx +56 -8
  197. package/src/components/badge.tsx +65 -42
  198. package/src/components/breadcrumb.tsx +158 -82
  199. package/src/components/button.tsx +41 -62
  200. package/src/components/calendar.tsx +16 -2
  201. package/src/components/card.tsx +92 -40
  202. package/src/components/carousel.tsx +240 -115
  203. package/src/components/centred-layout.tsx +67 -35
  204. package/src/components/chart.tsx +118 -47
  205. package/src/components/checkbox.tsx +42 -78
  206. package/src/components/collapsible.tsx +95 -26
  207. package/src/components/combobox.tsx +242 -144
  208. package/src/components/command.tsx +295 -121
  209. package/src/components/context-menu.tsx +278 -81
  210. package/src/components/date-picker.tsx +281 -30
  211. package/src/components/description.tsx +60 -0
  212. package/src/components/dialog.tsx +162 -86
  213. package/src/components/drawer.tsx +76 -2
  214. package/src/components/dropdown-menu.tsx +143 -37
  215. package/src/components/field.tsx +36 -11
  216. package/src/components/global-layout.tsx +116 -77
  217. package/src/components/hover-card.tsx +54 -14
  218. package/src/components/input-group.tsx +56 -18
  219. package/src/components/input-password.tsx +3 -4
  220. package/src/components/input.tsx +93 -186
  221. package/src/components/label.tsx +56 -15
  222. package/src/components/logo.tsx +3 -0
  223. package/src/components/menubar.tsx +58 -4
  224. package/src/components/popover.tsx +103 -20
  225. package/src/components/progress.tsx +82 -60
  226. package/src/components/radio-group.tsx +40 -0
  227. package/src/components/rating.tsx +4 -1
  228. package/src/components/resizable.tsx +119 -31
  229. package/src/components/scroll-area.tsx +123 -56
  230. package/src/components/select.tsx +21 -1
  231. package/src/components/separator.tsx +97 -20
  232. package/src/components/sheet.tsx +180 -79
  233. package/src/components/skeleton.tsx +40 -10
  234. package/src/components/slider.tsx +83 -57
  235. package/src/components/sonner.tsx +10 -7
  236. package/src/components/split-layout.tsx +4 -1
  237. package/src/components/table.tsx +1 -1
  238. package/src/components/toggle-group.tsx +4 -0
  239. package/src/index.ts +1 -1
  240. package/dist/input-base.cjs +0 -1
  241. package/dist/input-base.d.ts +0 -28
  242. package/dist/input-base.d.ts.map +0 -1
  243. package/dist/input-base.js +0 -56
  244. package/src/components/input-base.tsx +0 -86
package/dist/progress.js CHANGED
@@ -1,64 +1,76 @@
1
- import { jsx as r, jsxs as g } from "react/jsx-runtime";
2
- import * as p from "react";
3
- import * as t from "@radix-ui/react-progress";
4
- import { motion as u } from "framer-motion";
5
- import { cn as h } from "@brightlocal/ui-components/lib/utils";
6
- function w({
7
- className: o,
8
- value: l,
9
- dataHook: n,
10
- trackingEl: d,
11
- trackingLabel: m,
12
- ariaLabel: f = "Progress",
13
- label: a,
14
- ...c
15
- }) {
16
- const e = p.useId(), s = !!a, i = /* @__PURE__ */ r(
17
- t.Root,
18
- {
19
- "aria-label": s ? void 0 : f,
20
- "aria-labelledby": s ? e : void 0,
21
- className: h(
22
- "relative h-2 w-full overflow-hidden rounded-full",
23
- "bg-primary/20",
24
- o
25
- ),
26
- "data-hook": n,
27
- "data-slot": "progress",
28
- "data-tracking-el": d,
29
- "data-tracking-label": m,
30
- ...c,
31
- children: /* @__PURE__ */ r(t.Indicator, { asChild: !0, children: /* @__PURE__ */ r(
32
- u.div,
33
- {
34
- animate: {
35
- transform: `translateX(-${100 - (l || 0)}%)`
36
- },
37
- className: "h-full w-full flex-1 bg-green-400",
38
- "data-slot": "progress-indicator",
39
- initial: !1,
40
- transition: {
41
- type: "spring",
42
- stiffness: 80,
43
- damping: 20,
44
- mass: 1
1
+ import { jsx as r, jsxs as u } from "react/jsx-runtime";
2
+ import * as o from "react";
3
+ import * as i from "@radix-ui/react-progress";
4
+ import { motion as h } from "framer-motion";
5
+ import { cn as b } from "@brightlocal/ui-components/lib/utils";
6
+ const v = o.forwardRef(
7
+ ({
8
+ className: l,
9
+ value: n,
10
+ dataHook: d,
11
+ trackingEl: m,
12
+ trackingLabel: f,
13
+ ariaLabel: p = "Progress",
14
+ label: a,
15
+ ...c
16
+ }, g) => {
17
+ const s = o.useId(), e = !!a, t = /* @__PURE__ */ r(
18
+ i.Root,
19
+ {
20
+ ref: g,
21
+ "aria-label": e ? void 0 : p,
22
+ "aria-labelledby": e ? s : void 0,
23
+ className: b(
24
+ "relative h-2 w-full overflow-hidden rounded-full",
25
+ "bg-primary/20",
26
+ l
27
+ ),
28
+ "data-hook": d,
29
+ "data-slot": "progress",
30
+ "data-tracking-el": m,
31
+ "data-tracking-label": f,
32
+ ...c,
33
+ children: /* @__PURE__ */ r(i.Indicator, { asChild: !0, children: /* @__PURE__ */ r(
34
+ h.div,
35
+ {
36
+ animate: {
37
+ transform: `translateX(-${100 - (n || 0)}%)`
38
+ },
39
+ className: "h-full w-full flex-1 bg-green-400",
40
+ "data-slot": "progress-indicator",
41
+ initial: !1,
42
+ transition: {
43
+ type: "spring",
44
+ stiffness: 80,
45
+ damping: 20,
46
+ mass: 1
47
+ }
45
48
  }
46
- }
47
- ) })
48
- }
49
- );
50
- return a ? /* @__PURE__ */ g("div", { className: "flex w-full items-center gap-2", children: [
51
- /* @__PURE__ */ r(
52
- "span",
49
+ ) })
50
+ }
51
+ );
52
+ return a ? /* @__PURE__ */ u(
53
+ "div",
53
54
  {
54
- className: "text-foreground text-sm leading-normal font-medium",
55
- id: e,
56
- children: a
55
+ className: "flex w-full items-center gap-2",
56
+ "data-slot": "progress-wrapper",
57
+ children: [
58
+ /* @__PURE__ */ r(
59
+ "span",
60
+ {
61
+ className: "text-foreground text-sm leading-normal font-medium",
62
+ "data-slot": "progress-label",
63
+ id: s,
64
+ children: a
65
+ }
66
+ ),
67
+ t
68
+ ]
57
69
  }
58
- ),
59
- i
60
- ] }) : i;
61
- }
70
+ ) : t;
71
+ }
72
+ );
73
+ v.displayName = "Progress";
62
74
  export {
63
- w as Progress
75
+ v as Progress
64
76
  };
@@ -7,23 +7,63 @@ declare const radioGroupVariants: (props?: ({
7
7
  declare const radioGroupItemVariants: (props?: ({
8
8
  variant?: "default" | "box" | "boxIconVertical" | "boxIconHorizontal" | null | undefined;
9
9
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
10
+ /**
11
+ * Visual style variants for the radio group component.
12
+ */
10
13
  declare enum RadioGroupVariant {
14
+ /** Standard radio group with minimal styling */
11
15
  DEFAULT = "default",
16
+ /** Radio items wrapped in styled card containers */
12
17
  BOX = "box",
18
+ /** Radio items with icons displayed vertically above the label */
13
19
  BOX_ICON_VERTICAL = "boxIconVertical",
20
+ /** Radio items with icons displayed horizontally to the left */
14
21
  BOX_ICON_HORIZONTAL = "boxIconHorizontal"
15
22
  }
23
+ /**
24
+ * Props for the RadioGroup component.
25
+ */
16
26
  interface RadioGroupProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>, VariantProps<typeof radioGroupVariants> {
27
+ /**
28
+ * Data hook for automated testing (required)
29
+ */
17
30
  dataHook: string;
31
+ /**
32
+ * Tracking element identifier for analytics
33
+ */
18
34
  trackingEl?: string;
35
+ /**
36
+ * Tracking label for analytics context
37
+ */
19
38
  trackingLabel?: string;
20
39
  }
40
+ /**
41
+ * Props for the RadioGroupItem component.
42
+ */
21
43
  interface RadioGroupItemProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, VariantProps<typeof radioGroupItemVariants> {
44
+ /**
45
+ * Label text displayed next to the radio button
46
+ */
22
47
  label?: React.ReactNode;
48
+ /**
49
+ * Description text displayed below the label
50
+ */
23
51
  description?: React.ReactNode;
52
+ /**
53
+ * Icon displayed for box icon variants
54
+ */
24
55
  icon?: React.ReactNode;
56
+ /**
57
+ * Data hook for automated testing (required)
58
+ */
25
59
  dataHook: string;
60
+ /**
61
+ * Tracking element identifier for analytics
62
+ */
26
63
  trackingEl?: string;
64
+ /**
65
+ * Tracking label for analytics context
66
+ */
27
67
  trackingLabel?: string;
28
68
  }
29
69
  declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/components/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAOlE,QAAA,MAAM,kBAAkB;;8EAYtB,CAAC;AAEH,QAAA,MAAM,sBAAsB;;8EAiC3B,CAAC;AA6DF,aAAK,iBAAiB;IACpB,OAAO,YAAY;IACnB,GAAG,QAAQ;IACX,iBAAiB,oBAAoB;IACrC,mBAAmB,sBAAsB;CAC1C;AAMD,UAAU,eACR,SACE,KAAK,CAAC,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,EAC/D,YAAY,CAAC,OAAO,kBAAkB,CAAC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,mBACR,SACE,KAAK,CAAC,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,EAC/D,YAAY,CAAC,OAAO,sBAAsB,CAAC;IAC7C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAUD,QAAA,MAAM,UAAU,wFAgCf,CAAC;AAKF,QAAA,MAAM,cAAc,+FA6EnB,CAAC;AAKF,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC;AACzD,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/components/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAOlE,QAAA,MAAM,kBAAkB;;8EAYtB,CAAC;AAEH,QAAA,MAAM,sBAAsB;;8EAiC3B,CAAC;AA6DF;;GAEG;AACH,aAAK,iBAAiB;IACpB,gDAAgD;IAChD,OAAO,YAAY;IACnB,oDAAoD;IACpD,GAAG,QAAQ;IACX,kEAAkE;IAClE,iBAAiB,oBAAoB;IACrC,gEAAgE;IAChE,mBAAmB,sBAAsB;CAC1C;AAMD;;GAEG;AACH,UAAU,eACR,SACE,KAAK,CAAC,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,EAC/D,YAAY,CAAC,OAAO,kBAAkB,CAAC;IACzC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,UAAU,mBACR,SACE,KAAK,CAAC,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,EAC/D,YAAY,CAAC,OAAO,sBAAsB,CAAC;IAC7C;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAUD,QAAA,MAAM,UAAU,wFAgCf,CAAC;AAKF,QAAA,MAAM,cAAc,+FA6EnB,CAAC;AAKF,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC;AACzD,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,CAAC"}
package/dist/rating.d.ts CHANGED
@@ -1,4 +1,8 @@
1
1
  import * as React from "react";
2
+ /**
3
+ * Rating component displays a star-based rating indicator.
4
+ * Supports full and half-star values for precise rating display.
5
+ */
2
6
  export interface RatingProps extends React.HTMLAttributes<HTMLDivElement> {
3
7
  /**
4
8
  * The rating value (0-5, supports 0.5 increments)
@@ -1 +1 @@
1
- {"version":3,"file":"rating.d.ts","sourceRoot":"","sources":["../../src/components/rating.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACvE;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,MAAM,oFAyDX,CAAC;AAIF,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"rating.d.ts","sourceRoot":"","sources":["../../src/components/rating.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACvE;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,MAAM,oFAyDX,CAAC;AAIF,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("lucide-react"),d=require("react-resizable-panels"),n=require("@brightlocal/ui-components/lib/utils");function u(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const i=u(d),f=({className:e,...a})=>r.jsx(i.PanelGroup,{className:n.cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),"data-slot":"resizable-panel-group",...a}),p=({...e})=>r.jsx(i.Panel,{"data-slot":"resizable-panel",...e}),b=({withHandle:e,className:a,dataHook:t,trackingEl:l,trackingLabel:o,...s})=>r.jsx(i.PanelResizeHandle,{className:n.cn("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-none data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",a),"data-hook":t,"data-slot":"resizable-handle","data-tracking-el":l,"data-tracking-label":o,...s,children:e&&r.jsx("div",{className:"border-border bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:r.jsx(c.GripVertical,{className:"h-2.5 w-2.5"})})});exports.ResizableHandle=b;exports.ResizablePanel=p;exports.ResizablePanelGroup=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),b=require("react"),g=require("lucide-react"),v=require("react-resizable-panels"),s=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 r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const d=c(b),o=c(v),u=d.forwardRef(({className:e,dataHook:t,trackingEl:a,trackingLabel:r,...l},n)=>i.jsx(o.PanelGroup,{ref:n,className:s.cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),"data-hook":t,"data-slot":"resizable-panel-group","data-tracking-el":a,"data-tracking-label":r,...l}));u.displayName="ResizablePanelGroup";const f=d.forwardRef(({dataHook:e,trackingEl:t,trackingLabel:a,...r},l)=>i.jsx(o.Panel,{ref:l,"data-hook":e,"data-slot":"resizable-panel","data-tracking-el":t,"data-tracking-label":a,...r}));f.displayName="ResizablePanel";function p({withHandle:e,className:t,dataHook:a,trackingEl:r,trackingLabel:l,...n}){return i.jsx(o.PanelResizeHandle,{className:s.cn("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-none data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),"data-hook":a,"data-slot":"resizable-handle","data-tracking-el":r,"data-tracking-label":l,...n,children:e&&i.jsx("div",{className:"border-border bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:i.jsx(g.GripVertical,{className:"h-2.5 w-2.5"})})})}p.displayName="ResizableHandle";exports.ResizableHandle=p;exports.ResizablePanel=f;exports.ResizablePanelGroup=u;
@@ -1,14 +1,75 @@
1
1
  import * as React from "react";
2
2
  import * as ResizablePrimitive from "react-resizable-panels";
3
- declare const ResizablePanelGroup: ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => import("react/jsx-runtime").JSX.Element;
4
- declare const ResizablePanel: ({ ...props }: React.ComponentProps<typeof ResizablePrimitive.Panel>) => import("react/jsx-runtime").JSX.Element;
3
+ /**
4
+ * Props for the ResizablePanelGroup component.
5
+ */
6
+ interface ResizablePanelGroupProps extends React.ComponentProps<typeof ResizablePrimitive.PanelGroup> {
7
+ /**
8
+ * Data hook for automated testing
9
+ */
10
+ dataHook?: string;
11
+ /**
12
+ * Tracking element identifier for analytics
13
+ */
14
+ trackingEl?: string;
15
+ /**
16
+ * Tracking label for analytics context
17
+ */
18
+ trackingLabel?: string;
19
+ }
20
+ /**
21
+ * Container for resizable panels. Manages layout direction and panel sizing.
22
+ */
23
+ declare const ResizablePanelGroup: React.ForwardRefExoticComponent<Omit<ResizablePanelGroupProps, "ref"> & React.RefAttributes<ResizablePrimitive.ImperativePanelGroupHandle>>;
24
+ /**
25
+ * Props for the ResizablePanel component.
26
+ */
27
+ interface ResizablePanelProps extends React.ComponentProps<typeof ResizablePrimitive.Panel> {
28
+ /**
29
+ * Data hook for automated testing
30
+ */
31
+ dataHook?: string;
32
+ /**
33
+ * Tracking element identifier for analytics
34
+ */
35
+ trackingEl?: string;
36
+ /**
37
+ * Tracking label for analytics context
38
+ */
39
+ trackingLabel?: string;
40
+ }
41
+ /**
42
+ * Individual resizable panel within a panel group.
43
+ */
44
+ declare const ResizablePanel: React.ForwardRefExoticComponent<Omit<ResizablePanelProps, "ref"> & React.RefAttributes<ResizablePrimitive.ImperativePanelHandle>>;
45
+ /**
46
+ * Props for the ResizableHandle component.
47
+ */
5
48
  interface ResizableHandleProps extends React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> {
49
+ /**
50
+ * Show a visible drag handle indicator
51
+ */
6
52
  withHandle?: boolean;
53
+ /**
54
+ * Data hook for automated testing
55
+ */
7
56
  dataHook?: string;
57
+ /**
58
+ * Tracking element identifier for analytics
59
+ */
8
60
  trackingEl?: string;
61
+ /**
62
+ * Tracking label for analytics context
63
+ */
9
64
  trackingLabel?: string;
10
65
  }
11
- declare const ResizableHandle: ({ withHandle, className, dataHook, trackingEl, trackingLabel, ...props }: ResizableHandleProps) => import("react/jsx-runtime").JSX.Element;
66
+ /**
67
+ * Draggable handle between resizable panels.
68
+ */
69
+ declare function ResizableHandle({ withHandle, className, dataHook, trackingEl, trackingLabel, ...props }: ResizableHandleProps): import("react/jsx-runtime").JSX.Element;
70
+ declare namespace ResizableHandle {
71
+ var displayName: string;
72
+ }
12
73
  export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
13
- export type { ResizableHandleProps };
74
+ export type { ResizablePanelGroupProps, ResizablePanelProps, ResizableHandleProps, };
14
75
  //# sourceMappingURL=resizable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../src/components/resizable.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAI7D,QAAA,MAAM,mBAAmB,GAAI,yBAG1B,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,UAAU,CAAC,4CAS5D,CAAC;AAEF,QAAA,MAAM,cAAc,GAAI,cAErB,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,KAAK,CAAC,4CAEvD,CAAC;AAEF,UAAU,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CACzD,OAAO,kBAAkB,CAAC,iBAAiB,CAC5C;IACC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,eAAe,GAAI,0EAOtB,oBAAoB,4CAkBtB,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC;AAEhE,YAAY,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../src/components/resizable.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAI7D;;GAEG;AACH,UAAU,wBAAyB,SAAQ,KAAK,CAAC,cAAc,CAC7D,OAAO,kBAAkB,CAAC,UAAU,CACrC;IACC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,QAAA,MAAM,mBAAmB,6IAgBvB,CAAC;AAIH;;GAEG;AACH,UAAU,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CACxD,OAAO,kBAAkB,CAAC,KAAK,CAChC;IACC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,QAAA,MAAM,cAAc,mIAYlB,CAAC;AAIH;;GAEG;AACH,UAAU,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CACzD,OAAO,kBAAkB,CAAC,iBAAiB,CAC5C;IACC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,iBAAS,eAAe,CAAC,EACvB,UAAU,EACV,SAAS,EACT,QAAQ,EACR,UAAU,EACV,aAAa,EACb,GAAG,KAAK,EACT,EAAE,oBAAoB,2CAoBtB;kBA3BQ,eAAe;;;AA+BxB,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC;AAEhE,YAAY,EACV,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,GACrB,CAAC"}
package/dist/resizable.js CHANGED
@@ -1,46 +1,63 @@
1
- import { jsx as a } from "react/jsx-runtime";
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import * as d from "react";
2
3
  import { GripVertical as c } from "lucide-react";
3
- import * as t from "react-resizable-panels";
4
- import { cn as l } from "@brightlocal/ui-components/lib/utils";
5
- const u = ({
6
- className: e,
7
- ...r
8
- }) => /* @__PURE__ */ a(
9
- t.PanelGroup,
4
+ import * as n from "react-resizable-panels";
5
+ import { cn as s } from "@brightlocal/ui-components/lib/utils";
6
+ const f = d.forwardRef(({ className: a, dataHook: e, trackingEl: r, trackingLabel: t, ...l }, o) => /* @__PURE__ */ i(
7
+ n.PanelGroup,
10
8
  {
11
- className: l(
9
+ ref: o,
10
+ className: s(
12
11
  "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
13
- e
12
+ a
14
13
  ),
14
+ "data-hook": e,
15
15
  "data-slot": "resizable-panel-group",
16
- ...r
16
+ "data-tracking-el": r,
17
+ "data-tracking-label": t,
18
+ ...l
17
19
  }
18
- ), b = ({
19
- ...e
20
- }) => /* @__PURE__ */ a(t.Panel, { "data-slot": "resizable-panel", ...e }), g = ({
21
- withHandle: e,
22
- className: r,
23
- dataHook: i,
24
- trackingEl: o,
25
- trackingLabel: n,
26
- ...s
27
- }) => /* @__PURE__ */ a(
28
- t.PanelResizeHandle,
20
+ ));
21
+ f.displayName = "ResizablePanelGroup";
22
+ const p = d.forwardRef(({ dataHook: a, trackingEl: e, trackingLabel: r, ...t }, l) => /* @__PURE__ */ i(
23
+ n.Panel,
29
24
  {
30
- className: l(
31
- "bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-none data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
32
- r
33
- ),
34
- "data-hook": i,
35
- "data-slot": "resizable-handle",
36
- "data-tracking-el": o,
37
- "data-tracking-label": n,
38
- ...s,
39
- children: e && /* @__PURE__ */ a("div", { className: "border-border bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ a(c, { className: "h-2.5 w-2.5" }) })
25
+ ref: l,
26
+ "data-hook": a,
27
+ "data-slot": "resizable-panel",
28
+ "data-tracking-el": e,
29
+ "data-tracking-label": r,
30
+ ...t
40
31
  }
41
- );
32
+ ));
33
+ p.displayName = "ResizablePanel";
34
+ function u({
35
+ withHandle: a,
36
+ className: e,
37
+ dataHook: r,
38
+ trackingEl: t,
39
+ trackingLabel: l,
40
+ ...o
41
+ }) {
42
+ return /* @__PURE__ */ i(
43
+ n.PanelResizeHandle,
44
+ {
45
+ className: s(
46
+ "bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-none data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
47
+ e
48
+ ),
49
+ "data-hook": r,
50
+ "data-slot": "resizable-handle",
51
+ "data-tracking-el": t,
52
+ "data-tracking-label": l,
53
+ ...o,
54
+ children: a && /* @__PURE__ */ i("div", { className: "border-border bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ i(c, { className: "h-2.5 w-2.5" }) })
55
+ }
56
+ );
57
+ }
58
+ u.displayName = "ResizableHandle";
42
59
  export {
43
- g as ResizableHandle,
44
- b as ResizablePanel,
45
- u as ResizablePanelGroup
60
+ u as ResizableHandle,
61
+ p as ResizablePanel,
62
+ f as ResizablePanelGroup
46
63
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("@radix-ui/react-scroll-area"),c=require("@brightlocal/ui-components/lib/utils");function d(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const o=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(r,l,o.get?o:{enumerable:!0,get:()=>e[l]})}}return r.default=e,Object.freeze(r)}const a=d(u);function b({className:e,children:r,dataHook:l,trackingEl:o,trackingLabel:s,...i}){return t.jsxs(a.Root,{className:c.cn("relative",e),"data-hook":l,"data-slot":"scroll-area","data-tracking-el":o,"data-tracking-label":s,...i,children:[t.jsx(a.Viewport,{className:"focus-visible:shadow-default size-full rounded-[inherit] p-1 transition-[color,box-shadow] outline-none","data-slot":"scroll-area-viewport",tabIndex:0,children:r}),t.jsx(n,{}),t.jsx(a.Corner,{})]})}function n({className:e,orientation:r="vertical",...l}){return t.jsx(a.ScrollAreaScrollbar,{className:c.cn("flex touch-none p-px transition-colors select-none",r==="vertical"&&"h-full w-2.5 border-l border-l-transparent",r==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),"data-slot":"scroll-area-scrollbar",orientation:r,...l,children:t.jsx(a.ScrollAreaThumb,{className:"bg-border relative flex-1 rounded-full","data-slot":"scroll-area-thumb"})})}exports.ScrollArea=b;exports.ScrollBar=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),m=require("react"),p=require("@radix-ui/react-scroll-area"),d=require("@brightlocal/ui-components/lib/utils");function u(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,l.get?l:{enumerable:!0,get:()=>e[a]})}}return r.default=e,Object.freeze(r)}const b=u(m),o=u(p),f=b.forwardRef(({className:e,children:r,dataHook:a,trackingEl:l,trackingLabel:c,...s},n)=>t.jsxs(o.Root,{ref:n,className:d.cn("relative",e),"data-hook":a,"data-slot":"scroll-area","data-tracking-el":l,"data-tracking-label":c,...s,children:[t.jsx(o.Viewport,{className:"focus-visible:shadow-default size-full rounded-[inherit] p-1 transition-[color,box-shadow] outline-none","data-slot":"scroll-area-viewport",tabIndex:0,children:r}),t.jsx(i,{}),t.jsx(o.Corner,{})]}));f.displayName="ScrollArea";const i=b.forwardRef(({className:e,orientation:r="vertical",dataHook:a,trackingEl:l,trackingLabel:c,...s},n)=>t.jsx(o.ScrollAreaScrollbar,{ref:n,className:d.cn("flex touch-none p-px transition-colors select-none",r==="vertical"&&"h-full w-2.5 border-l border-l-transparent",r==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),"data-hook":a,"data-slot":"scroll-area-scrollbar","data-tracking-el":l,"data-tracking-label":c,orientation:r,...s,children:t.jsx(o.ScrollAreaThumb,{className:"bg-border relative flex-1 rounded-full","data-slot":"scroll-area-thumb"})}));i.displayName="ScrollBar";exports.ScrollArea=f;exports.ScrollBar=i;
@@ -1,12 +1,53 @@
1
1
  import * as React from "react";
2
2
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
3
- type ScrollAreaProps = React.ComponentProps<typeof ScrollAreaPrimitive.Root> & {
3
+ /**
4
+ * Props for the ScrollArea component.
5
+ */
6
+ interface ScrollAreaProps extends React.ComponentProps<typeof ScrollAreaPrimitive.Root> {
7
+ /**
8
+ * Data hook for automated testing (required)
9
+ */
4
10
  dataHook: string;
11
+ /**
12
+ * Tracking element identifier for analytics
13
+ */
5
14
  trackingEl?: string;
15
+ /**
16
+ * Tracking label for analytics context
17
+ */
6
18
  trackingLabel?: string;
7
- };
8
- declare function ScrollArea({ className, children, dataHook, trackingEl, trackingLabel, ...props }: ScrollAreaProps): import("react/jsx-runtime").JSX.Element;
9
- declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): import("react/jsx-runtime").JSX.Element;
19
+ }
20
+ /**
21
+ * ScrollArea provides a styled scrollable viewport with custom scrollbars.
22
+ * Built on Radix UI ScrollArea primitive.
23
+ */
24
+ declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
25
+ /**
26
+ * Props for the ScrollBar component.
27
+ */
28
+ interface ScrollBarProps extends React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar> {
29
+ /**
30
+ * Data hook for automated testing
31
+ */
32
+ dataHook?: string;
33
+ /**
34
+ * Tracking element identifier for analytics
35
+ */
36
+ trackingEl?: string;
37
+ /**
38
+ * Tracking label for analytics context
39
+ */
40
+ trackingLabel?: string;
41
+ /**
42
+ * The orientation of the scrollbar
43
+ * @default "vertical"
44
+ */
45
+ orientation?: "vertical" | "horizontal";
46
+ }
47
+ /**
48
+ * ScrollBar provides a styled scrollbar for ScrollArea.
49
+ */
50
+ declare const ScrollBar: React.ForwardRefExoticComponent<Omit<ScrollBarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
51
  export { ScrollArea, ScrollBar };
11
- export type { ScrollAreaProps };
52
+ export type { ScrollAreaProps, ScrollBarProps };
12
53
  //# sourceMappingURL=scroll-area.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../src/components/scroll-area.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAGnE,KAAK,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,GAAG;IAC7E,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,aAAa,EACb,GAAG,KAAK,EACT,EAAE,eAAe,2CAqBjB;AAED,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,WAAwB,EACxB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,mBAAmB,CAAC,2CAqBtE;AAED,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;AAEjC,YAAY,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../src/components/scroll-area.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAGnE;;GAEG;AACH,UAAU,eAAgB,SAAQ,KAAK,CAAC,cAAc,CACpD,OAAO,mBAAmB,CAAC,IAAI,CAChC;IACC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,QAAA,MAAM,UAAU,qGA8Bf,CAAC;AAIF;;GAEG;AACH,UAAU,cAAe,SAAQ,KAAK,CAAC,cAAc,CACnD,OAAO,mBAAmB,CAAC,mBAAmB,CAC/C;IACC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;CACzC;AAED;;GAEG;AACH,QAAA,MAAM,SAAS,oGAwCd,CAAC;AAIF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;AAEjC,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC"}
@@ -1,26 +1,21 @@
1
- import { jsxs as i, jsx as l } from "react/jsx-runtime";
2
- import * as a from "@radix-ui/react-scroll-area";
3
- import { cn as t } from "@brightlocal/ui-components/lib/utils";
4
- function f({
5
- className: o,
6
- children: r,
7
- dataHook: e,
8
- trackingEl: s,
9
- trackingLabel: c,
10
- ...n
11
- }) {
12
- return /* @__PURE__ */ i(
13
- a.Root,
1
+ import { jsxs as f, jsx as a } from "react/jsx-runtime";
2
+ import * as i from "react";
3
+ import * as l from "@radix-ui/react-scroll-area";
4
+ import { cn as n } from "@brightlocal/ui-components/lib/utils";
5
+ const b = i.forwardRef(
6
+ ({ className: o, children: r, dataHook: e, trackingEl: t, trackingLabel: s, ...c }, d) => /* @__PURE__ */ f(
7
+ l.Root,
14
8
  {
15
- className: t("relative", o),
9
+ ref: d,
10
+ className: n("relative", o),
16
11
  "data-hook": e,
17
12
  "data-slot": "scroll-area",
18
- "data-tracking-el": s,
19
- "data-tracking-label": c,
20
- ...n,
13
+ "data-tracking-el": t,
14
+ "data-tracking-label": s,
15
+ ...c,
21
16
  children: [
22
- /* @__PURE__ */ l(
23
- a.Viewport,
17
+ /* @__PURE__ */ a(
18
+ l.Viewport,
24
19
  {
25
20
  className: "focus-visible:shadow-default size-full rounded-[inherit] p-1 transition-[color,box-shadow] outline-none",
26
21
  "data-slot": "scroll-area-viewport",
@@ -28,40 +23,49 @@ function f({
28
23
  children: r
29
24
  }
30
25
  ),
31
- /* @__PURE__ */ l(d, {}),
32
- /* @__PURE__ */ l(a.Corner, {})
26
+ /* @__PURE__ */ a(m, {}),
27
+ /* @__PURE__ */ a(l.Corner, {})
33
28
  ]
34
29
  }
35
- );
36
- }
37
- function d({
38
- className: o,
39
- orientation: r = "vertical",
40
- ...e
41
- }) {
42
- return /* @__PURE__ */ l(
43
- a.ScrollAreaScrollbar,
30
+ )
31
+ );
32
+ b.displayName = "ScrollArea";
33
+ const m = i.forwardRef(
34
+ ({
35
+ className: o,
36
+ orientation: r = "vertical",
37
+ dataHook: e,
38
+ trackingEl: t,
39
+ trackingLabel: s,
40
+ ...c
41
+ }, d) => /* @__PURE__ */ a(
42
+ l.ScrollAreaScrollbar,
44
43
  {
45
- className: t(
44
+ ref: d,
45
+ className: n(
46
46
  "flex touch-none p-px transition-colors select-none",
47
47
  r === "vertical" && "h-full w-2.5 border-l border-l-transparent",
48
48
  r === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
49
49
  o
50
50
  ),
51
+ "data-hook": e,
51
52
  "data-slot": "scroll-area-scrollbar",
53
+ "data-tracking-el": t,
54
+ "data-tracking-label": s,
52
55
  orientation: r,
53
- ...e,
54
- children: /* @__PURE__ */ l(
55
- a.ScrollAreaThumb,
56
+ ...c,
57
+ children: /* @__PURE__ */ a(
58
+ l.ScrollAreaThumb,
56
59
  {
57
60
  className: "bg-border relative flex-1 rounded-full",
58
61
  "data-slot": "scroll-area-thumb"
59
62
  }
60
63
  )
61
64
  }
62
- );
63
- }
65
+ )
66
+ );
67
+ m.displayName = "ScrollBar";
64
68
  export {
65
- f as ScrollArea,
66
- d as ScrollBar
69
+ b as ScrollArea,
70
+ m as ScrollBar
67
71
  };