@brightlocal/ui-components 0.1.2 → 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 (236) 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 +177 -170
  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/package.json +8 -2
  184. package/src/blocks/data-table.tsx +42 -32
  185. package/src/blocks/sidebar.tsx +4 -12
  186. package/src/components/accordion.tsx +163 -77
  187. package/src/components/alert-dialog.tsx +156 -111
  188. package/src/components/alert.tsx +26 -13
  189. package/src/components/aspect-ratio.tsx +25 -16
  190. package/src/components/avatar.tsx +56 -8
  191. package/src/components/badge.tsx +65 -42
  192. package/src/components/breadcrumb.tsx +158 -82
  193. package/src/components/button.tsx +41 -62
  194. package/src/components/calendar.tsx +16 -2
  195. package/src/components/card.tsx +92 -40
  196. package/src/components/carousel.tsx +240 -115
  197. package/src/components/centred-layout.tsx +67 -35
  198. package/src/components/chart.tsx +118 -47
  199. package/src/components/checkbox.tsx +42 -78
  200. package/src/components/collapsible.tsx +95 -26
  201. package/src/components/combobox.tsx +242 -144
  202. package/src/components/command.tsx +295 -121
  203. package/src/components/context-menu.tsx +278 -81
  204. package/src/components/date-picker.tsx +281 -30
  205. package/src/components/description.tsx +60 -0
  206. package/src/components/dialog.tsx +162 -86
  207. package/src/components/drawer.tsx +76 -2
  208. package/src/components/dropdown-menu.tsx +143 -37
  209. package/src/components/field.tsx +36 -11
  210. package/src/components/global-layout.tsx +116 -77
  211. package/src/components/hover-card.tsx +54 -14
  212. package/src/components/input-group.tsx +56 -18
  213. package/src/components/input-password.tsx +3 -4
  214. package/src/components/input.tsx +93 -186
  215. package/src/components/label.tsx +56 -15
  216. package/src/components/logo.tsx +3 -0
  217. package/src/components/menubar.tsx +58 -4
  218. package/src/components/popover.tsx +103 -20
  219. package/src/components/progress.tsx +82 -60
  220. package/src/components/radio-group.tsx +40 -0
  221. package/src/components/rating.tsx +4 -0
  222. package/src/components/resizable.tsx +119 -31
  223. package/src/components/scroll-area.tsx +123 -56
  224. package/src/components/select.tsx +21 -1
  225. package/src/components/separator.tsx +97 -20
  226. package/src/components/sheet.tsx +180 -79
  227. package/src/components/skeleton.tsx +40 -10
  228. package/src/components/slider.tsx +83 -57
  229. package/src/components/sonner.tsx +10 -7
  230. package/src/components/split-layout.tsx +4 -1
  231. package/src/index.ts +1 -1
  232. package/dist/input-base.cjs +0 -1
  233. package/dist/input-base.d.ts +0 -28
  234. package/dist/input-base.d.ts.map +0 -1
  235. package/dist/input-base.js +0 -56
  236. package/src/components/input-base.tsx +0 -86
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/components/calendar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,SAAS,EAGT,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAI1B,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG;IAC3C;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC3B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AASF,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,EACH,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,2CAqCxC;AAED,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,UAAU,EACV,eAAsB,EACtB,cAAkB,EAClB,aAAa,EACb,UAAiB,EACjB,QAAQ,EACR,UAAU,EACV,aAAa,EACb,UAAU,EACV,UAAU,EACV,GAAG,KAAK,EACT,EAAE,aAAa,2CAoIf;kBAjJQ,QAAQ;;;AAqJjB,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/components/calendar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,SAAS,EAGT,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAI1B;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG;IAC3C;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC3B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAUF;;;GAGG;AACH,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,EACH,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,2CAqCxC;AAED;;;;GAIG;AACH,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,UAAU,EACV,eAAsB,EACtB,cAAkB,EAClB,aAAa,EACb,UAAiB,EACjB,QAAQ,EACR,UAAU,EACV,aAAa,EACb,UAAU,EACV,UAAU,EACV,GAAG,KAAK,EACT,EAAE,aAAa,2CAqIf;kBAlJQ,QAAQ;;;AAsJjB,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC"}
package/dist/calendar.js CHANGED
@@ -1,13 +1,14 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import * as g from "react";
2
+ import * as f from "react";
3
3
  import { ChevronLeft as _, ChevronRight as v, ChevronDown as k } from "lucide-react";
4
4
  import { getDefaultClassNames as m, DayPicker as N } from "react-day-picker";
5
5
  import { cn as e } from "@brightlocal/ui-components/lib/utils";
6
- const f = e(
7
- "inline-flex items-center justify-center rounded-md bg-background",
6
+ const g = e(
7
+ "inline-flex items-center justify-center rounded-md",
8
+ "text-muted-foreground hover:text-foreground",
8
9
  "hover:bg-accent hover:text-accent-foreground",
9
10
  "focus-visible:outline-none focus-visible:shadow-default",
10
- "h-8 w-8 p-0 opacity-50 hover:opacity-100"
11
+ "h-8 w-8 p-0"
11
12
  );
12
13
  function z({
13
14
  className: s,
@@ -15,8 +16,8 @@ function z({
15
16
  modifiers: r,
16
17
  ...u
17
18
  }) {
18
- const n = m(), d = g.useRef(null);
19
- return g.useEffect(() => {
19
+ const n = m(), d = f.useRef(null);
20
+ return f.useEffect(() => {
20
21
  r.focused && d.current?.focus();
21
22
  }, [r.focused]), /* @__PURE__ */ a(
22
23
  "button",
@@ -100,8 +101,8 @@ function C({
100
101
  "absolute top-3 left-3 right-3 flex items-center justify-between z-10",
101
102
  t.nav
102
103
  ),
103
- button_previous: e(f, t.button_previous),
104
- button_next: e(f, t.button_next),
104
+ button_previous: e(g, t.button_previous),
105
+ button_next: e(g, t.button_next),
105
106
  month_grid: e(
106
107
  "w-full border-collapse flex flex-col",
107
108
  t.month_grid
@@ -171,6 +172,7 @@ function C({
171
172
  ...b
172
173
  },
173
174
  "data-hook": p,
175
+ "data-slot": "calendar",
174
176
  "data-tracking-el": x,
175
177
  "data-tracking-label": h,
176
178
  fixedWeeks: d,
package/dist/card.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),u=require("react"),f=require("class-variance-authority"),e=require("@brightlocal/ui-components/lib/utils");function g(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return r.default=t,Object.freeze(r)}const p=g(u);var d=(t=>(t.DEFAULT="default",t.TRANSPARENT="transparent",t.BORDER="border",t))(d||{});const m=f.cva(["flex","flex-col","gap-8","rounded-[14px]","py-8","transition-colors"],{variants:{variant:{default:["bg-card","text-card-foreground","border","border-card-border"],transparent:["bg-transparent","text-foreground"],border:["bg-transparent","text-foreground","border","border-border"]}},defaultVariants:{variant:"default"}}),s=p.forwardRef(({className:t,variant:r="default",dataHook:n,trackingEl:o,trackingLabel:c,...i},l)=>a.jsx("div",{ref:l,className:e.cn(m({variant:r}),t),"data-hook":n,"data-slot":"card","data-tracking-el":o||`card-${r}`,"data-tracking-label":c,...i}));s.displayName="Card";function b({className:t,...r}){return a.jsx("div",{className:e.cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-8 has-data-[slot=card-action]:grid-cols-[1fr_auto]",t),"data-slot":"card-header",...r})}function x({className:t,...r}){return a.jsx("div",{className:e.cn("heading-sm",t),"data-slot":"card-title",...r})}function C({className:t,...r}){return a.jsx("div",{className:e.cn("text-muted-foreground text-sm leading-normal font-normal",t),"data-slot":"card-description",...r})}function j({className:t,...r}){return a.jsx("div",{className:e.cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end",t),"data-slot":"card-action",...r})}function v({className:t,...r}){return a.jsx("div",{className:e.cn("px-8",t),"data-slot":"card-content",...r})}function N({className:t,...r}){return a.jsx("div",{className:e.cn("flex items-center px-8",t),"data-slot":"card-footer",...r})}exports.Card=s;exports.CardAction=j;exports.CardContent=v;exports.CardDescription=C;exports.CardFooter=N;exports.CardHeader=b;exports.CardTitle=x;exports.CardVariant=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("react"),b=require("class-variance-authority"),d=require("@brightlocal/ui-components/lib/utils");function y(a){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:()=>a[t]})}}return r.default=a,Object.freeze(r)}const o=y(x),N=b.cva(["flex","flex-col","gap-8","rounded-[14px]","py-8","transition-colors"],{variants:{variant:{default:["bg-card","text-card-foreground","border","border-card-border"],transparent:["bg-transparent","text-foreground"],border:["bg-transparent","text-foreground","border","border-border"]}},defaultVariants:{variant:"default"}}),n=o.forwardRef(({className:a,variant:r="default",dataHook:t,trackingEl:s,trackingLabel:m,...C},g)=>e.jsx("div",{ref:g,className:d.cn(N({variant:r}),a),"data-hook":t,"data-slot":"card","data-tracking-el":s||`card-${r}`,"data-tracking-label":m,...C}));n.displayName="Card";const c=o.forwardRef(({className:a,...r},t)=>e.jsx("div",{ref:t,className:d.cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-8 has-data-[slot=card-action]:grid-cols-[1fr_auto]",a),"data-slot":"card-header",...r}));c.displayName="CardHeader";const i=o.forwardRef(({className:a,...r},t)=>e.jsx("div",{ref:t,className:d.cn("heading-sm",a),"data-slot":"card-title",...r}));i.displayName="CardTitle";const l=o.forwardRef(({className:a,...r},t)=>e.jsx("div",{ref:t,className:d.cn("text-muted-foreground text-sm leading-normal font-normal",a),"data-slot":"card-description",...r}));l.displayName="CardDescription";const f=o.forwardRef(({className:a,...r},t)=>e.jsx("div",{ref:t,className:d.cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end",a),"data-slot":"card-action",...r}));f.displayName="CardAction";const u=o.forwardRef(({className:a,...r},t)=>e.jsx("div",{ref:t,className:d.cn("px-8",a),"data-slot":"card-content",...r}));u.displayName="CardContent";const p=o.forwardRef(({className:a,...r},t)=>e.jsx("div",{ref:t,className:d.cn("flex items-center px-8",a),"data-slot":"card-footer",...r}));p.displayName="CardFooter";exports.Card=n;exports.CardAction=f;exports.CardContent=u;exports.CardDescription=l;exports.CardFooter=p;exports.CardHeader=c;exports.CardTitle=i;
package/dist/card.d.ts CHANGED
@@ -1,28 +1,68 @@
1
1
  import * as React from "react";
2
2
  /**
3
- * Available card visual variants
4
- */
5
- export declare enum CardVariant {
6
- /** Default card with background, border */
7
- DEFAULT = "default",
8
- /** Transparent card with no background or border */
9
- TRANSPARENT = "transparent",
10
- /** Card with border only, no background or shadow */
11
- BORDER = "border"
12
- }
3
+ * Props for the Card component
4
+ */
13
5
  type CardProps = React.ComponentProps<"div"> & {
14
- variant?: CardVariant;
6
+ /**
7
+ * Visual style variant of the card
8
+ * @default "default"
9
+ */
10
+ variant?: "default" | "transparent" | "border";
11
+ /**
12
+ * Data hook for automated testing (required)
13
+ */
15
14
  dataHook: string;
15
+ /**
16
+ * Tracking element identifier for analytics
17
+ */
16
18
  trackingEl?: string;
19
+ /**
20
+ * Tracking label for analytics context
21
+ */
17
22
  trackingLabel?: string;
18
23
  };
24
+ /**
25
+ * Container component for grouping related content with visual separation.
26
+ * Supports multiple visual variants for different contexts.
27
+ */
19
28
  declare const Card: React.ForwardRefExoticComponent<Omit<CardProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
- declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
21
- declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
22
- declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
23
- declare function CardAction({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
24
- declare function CardContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
25
- declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
29
+ /**
30
+ * Props for Card sub-components
31
+ */
32
+ type CardSubComponentProps = React.ComponentProps<"div"> & {
33
+ /**
34
+ * Additional CSS classes to apply
35
+ */
36
+ className?: string;
37
+ /**
38
+ * Content to render inside the component
39
+ */
40
+ children?: React.ReactNode;
41
+ };
42
+ /**
43
+ * Header section of the Card containing title and description.
44
+ */
45
+ declare const CardHeader: React.ForwardRefExoticComponent<Omit<CardSubComponentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
46
+ /**
47
+ * Title element within the Card header.
48
+ */
49
+ declare const CardTitle: React.ForwardRefExoticComponent<Omit<CardSubComponentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
50
+ /**
51
+ * Description text within the Card header.
52
+ */
53
+ declare const CardDescription: React.ForwardRefExoticComponent<Omit<CardSubComponentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
54
+ /**
55
+ * Action area within the Card header for buttons or controls.
56
+ */
57
+ declare const CardAction: React.ForwardRefExoticComponent<Omit<CardSubComponentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
58
+ /**
59
+ * Main content area of the Card.
60
+ */
61
+ declare const CardContent: React.ForwardRefExoticComponent<Omit<CardSubComponentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
62
+ /**
63
+ * Footer section of the Card for actions or metadata.
64
+ */
65
+ declare const CardFooter: React.ForwardRefExoticComponent<Omit<CardSubComponentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
26
66
  export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
27
- export type { CardProps };
67
+ export type { CardProps, CardSubComponentProps };
28
68
  //# sourceMappingURL=card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;GAEG;AACH,oBAAY,WAAW;IACrB,2CAA2C;IAC3C,OAAO,YAAY;IACnB,oDAAoD;IACpD,WAAW,gBAAgB;IAC3B,qDAAqD;IACrD,MAAM,WAAW;CAClB;AA4BD,KAAK,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC7C,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,QAAA,MAAM,IAAI,+FAwBT,CAAC;AAIF,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQtE;AAED,iBAAS,eAAe,CAAC,E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AAEF;;GAEG;AACH,QAAA,MAAM,UAAU,2GAYf,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,SAAS,2GASd,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,eAAe,2GAYpB,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,UAAU,2GAYf,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,WAAW,2GAShB,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,UAAU,2GASf,CAAC;AAGF,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,GACZ,CAAC;AAEF,YAAY,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC"}
package/dist/card.js CHANGED
@@ -1,9 +1,8 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import * as i from "react";
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import * as e from "react";
3
3
  import { cva as l } from "class-variance-authority";
4
- import { cn as e } from "@brightlocal/ui-components/lib/utils";
5
- var f = /* @__PURE__ */ ((r) => (r.DEFAULT = "default", r.TRANSPARENT = "transparent", r.BORDER = "border", r))(f || {});
6
- const u = l(
4
+ import { cn as o } from "@brightlocal/ui-components/lib/utils";
5
+ const f = l(
7
6
  ["flex", "flex-col", "gap-8", "rounded-[14px]", "py-8", "transition-colors"],
8
7
  {
9
8
  variants: {
@@ -25,107 +24,117 @@ const u = l(
25
24
  },
26
25
  defaultVariants: {
27
26
  variant: "default"
28
- /* DEFAULT */
29
27
  }
30
28
  }
31
- ), m = i.forwardRef(
29
+ ), m = e.forwardRef(
32
30
  ({
33
31
  className: r,
34
32
  variant: a = "default",
35
- dataHook: o,
36
- trackingEl: d,
33
+ dataHook: t,
34
+ trackingEl: s,
37
35
  trackingLabel: n,
38
- ...s
39
- }, c) => /* @__PURE__ */ t(
36
+ ...i
37
+ }, c) => /* @__PURE__ */ d(
40
38
  "div",
41
39
  {
42
40
  ref: c,
43
- className: e(u({ variant: a }), r),
44
- "data-hook": o,
41
+ className: o(f({ variant: a }), r),
42
+ "data-hook": t,
45
43
  "data-slot": "card",
46
- "data-tracking-el": d || `card-${a}`,
44
+ "data-tracking-el": s || `card-${a}`,
47
45
  "data-tracking-label": n,
48
- ...s
46
+ ...i
49
47
  }
50
48
  )
51
49
  );
52
50
  m.displayName = "Card";
53
- function b({ className: r, ...a }) {
54
- return /* @__PURE__ */ t(
51
+ const p = e.forwardRef(
52
+ ({ className: r, ...a }, t) => /* @__PURE__ */ d(
55
53
  "div",
56
54
  {
57
- className: e(
55
+ ref: t,
56
+ className: o(
58
57
  "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-8 has-data-[slot=card-action]:grid-cols-[1fr_auto]",
59
58
  r
60
59
  ),
61
60
  "data-slot": "card-header",
62
61
  ...a
63
62
  }
64
- );
65
- }
66
- function v({ className: r, ...a }) {
67
- return /* @__PURE__ */ t(
63
+ )
64
+ );
65
+ p.displayName = "CardHeader";
66
+ const g = e.forwardRef(
67
+ ({ className: r, ...a }, t) => /* @__PURE__ */ d(
68
68
  "div",
69
69
  {
70
- className: e("heading-sm", r),
70
+ ref: t,
71
+ className: o("heading-sm", r),
71
72
  "data-slot": "card-title",
72
73
  ...a
73
74
  }
74
- );
75
- }
76
- function N({ className: r, ...a }) {
77
- return /* @__PURE__ */ t(
75
+ )
76
+ );
77
+ g.displayName = "CardTitle";
78
+ const u = e.forwardRef(
79
+ ({ className: r, ...a }, t) => /* @__PURE__ */ d(
78
80
  "div",
79
81
  {
80
- className: e(
82
+ ref: t,
83
+ className: o(
81
84
  "text-muted-foreground text-sm leading-normal font-normal",
82
85
  r
83
86
  ),
84
87
  "data-slot": "card-description",
85
88
  ...a
86
89
  }
87
- );
88
- }
89
- function C({ className: r, ...a }) {
90
- return /* @__PURE__ */ t(
90
+ )
91
+ );
92
+ u.displayName = "CardDescription";
93
+ const C = e.forwardRef(
94
+ ({ className: r, ...a }, t) => /* @__PURE__ */ d(
91
95
  "div",
92
96
  {
93
- className: e(
97
+ ref: t,
98
+ className: o(
94
99
  "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
95
100
  r
96
101
  ),
97
102
  "data-slot": "card-action",
98
103
  ...a
99
104
  }
100
- );
101
- }
102
- function R({ className: r, ...a }) {
103
- return /* @__PURE__ */ t(
105
+ )
106
+ );
107
+ C.displayName = "CardAction";
108
+ const x = e.forwardRef(
109
+ ({ className: r, ...a }, t) => /* @__PURE__ */ d(
104
110
  "div",
105
111
  {
106
- className: e("px-8", r),
112
+ ref: t,
113
+ className: o("px-8", r),
107
114
  "data-slot": "card-content",
108
115
  ...a
109
116
  }
110
- );
111
- }
112
- function h({ className: r, ...a }) {
113
- return /* @__PURE__ */ t(
117
+ )
118
+ );
119
+ x.displayName = "CardContent";
120
+ const N = e.forwardRef(
121
+ ({ className: r, ...a }, t) => /* @__PURE__ */ d(
114
122
  "div",
115
123
  {
116
- className: e("flex items-center px-8", r),
124
+ ref: t,
125
+ className: o("flex items-center px-8", r),
117
126
  "data-slot": "card-footer",
118
127
  ...a
119
128
  }
120
- );
121
- }
129
+ )
130
+ );
131
+ N.displayName = "CardFooter";
122
132
  export {
123
133
  m as Card,
124
134
  C as CardAction,
125
- R as CardContent,
126
- N as CardDescription,
127
- h as CardFooter,
128
- b as CardHeader,
129
- v as CardTitle,
130
- f as CardVariant
135
+ x as CardContent,
136
+ u as CardDescription,
137
+ N as CardFooter,
138
+ p as CardHeader,
139
+ g as CardTitle
131
140
  };
package/dist/carousel.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),P=require("react"),k=require("embla-carousel-react"),m=require("lucide-react"),i=require("@brightlocal/ui-components/lib/utils"),u=require("@brightlocal/ui-components/button");function O(e){const r=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(r,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const s=O(P),p=s.createContext(null);function h(){const e=s.useContext(p);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function R({orientation:e="horizontal",opts:r,setApi:t,plugins:l,className:f,children:d,...x}){const[C,o]=k({...r,axis:e==="horizontal"?"x":"y"},l),[N,S]=s.useState(!1),[j,y]=s.useState(!1),c=s.useCallback(a=>{a&&(S(a.canScrollPrev()),y(a.canScrollNext()))},[]),v=s.useCallback(()=>{o?.scrollPrev()},[o]),b=s.useCallback(()=>{o?.scrollNext()},[o]),w=s.useCallback(a=>{const g=e==="horizontal"?"ArrowLeft":"ArrowUp",z=e==="horizontal"?"ArrowRight":"ArrowDown";a.key===g?(a.preventDefault(),v()):a.key===z&&(a.preventDefault(),b())},[e,v,b]);return s.useEffect(()=>{!o||!t||t(o)},[o,t]),s.useEffect(()=>{if(o)return c(o),o.on("reInit",c),o.on("select",c),()=>{o?.off("reInit",c),o?.off("select",c)}},[o,c]),n.jsx(p.Provider,{value:{carouselRef:C,api:o,opts:r,orientation:e||(r?.axis==="y"?"vertical":"horizontal"),scrollPrev:v,scrollNext:b,canScrollPrev:N,canScrollNext:j},children:n.jsx("div",{"aria-roledescription":"carousel",className:i.cn("relative",f),"data-slot":"carousel",role:"region",onKeyDownCapture:w,...x,children:d})})}function D({className:e,...r}){const{carouselRef:t,orientation:l}=h();return n.jsx("div",{ref:t,className:i.cn("overflow-hidden",l==="vertical"&&"h-[400px]"),"data-slot":"carousel-content",children:n.jsx("div",{className:i.cn("flex gap-4",l==="horizontal"?"":"h-full flex-col",e),...r})})}function q({className:e,...r}){const{orientation:t}=h();return n.jsx("div",{"aria-roledescription":"slide",className:i.cn("min-w-0 shrink-0 grow-0 basis-full",t==="horizontal"?"pl-1":"pt-1",e),"data-slot":"carousel-item",role:"group",...r})}function B({className:e,variant:r=u.ButtonVariant.OUTLINE,size:t=u.ButtonSize.SM,dataHook:l="carousel-previous",...f}){const{orientation:d,scrollPrev:x,canScrollPrev:C}=h();return n.jsxs(u.Button,{className:i.cn("absolute size-8 rounded-full",d==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),"data-slot":"carousel-previous",dataHook:l,disabled:!C,size:t,variant:r,onClick:x,...f,children:[n.jsx(m.ArrowLeft,{}),n.jsx("span",{className:"sr-only",children:"Previous slide"})]})}function E({className:e,variant:r=u.ButtonVariant.OUTLINE,size:t=u.ButtonSize.SM,dataHook:l="carousel-next",...f}){const{orientation:d,scrollNext:x,canScrollNext:C}=h();return n.jsxs(u.Button,{className:i.cn("absolute size-8 rounded-full",d==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),"data-slot":"carousel-next",dataHook:l,disabled:!C,size:t,variant:r,onClick:x,...f,children:[n.jsx(m.ArrowRight,{}),n.jsx("span",{className:"sr-only",children:"Next slide"})]})}exports.Carousel=R;exports.CarouselContent=D;exports.CarouselItem=q;exports.CarouselNext=E;exports.CarouselPrevious=B;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),K=require("react"),_=require("embla-carousel-react"),N=require("@brightlocal/icons"),f=require("@brightlocal/ui-components/lib/utils"),h=require("@brightlocal/ui-components/button");function B(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const l=B(K),p=l.createContext(null);function C(){const e=l.useContext(p);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const y=l.forwardRef(({orientation:e="horizontal",opts:r,setApi:t,plugins:a,className:u,children:n,dataHook:d,trackingEl:x,trackingLabel:P,...S},k)=>{const[R,o]=_({...r,axis:e==="horizontal"?"x":"y"},a),[z,O]=l.useState(!1),[D,q]=l.useState(!1),i=l.useCallback(c=>{c&&(O(c.canScrollPrev()),q(c.canScrollNext()))},[]),m=l.useCallback(()=>{o?.scrollPrev()},[o]),v=l.useCallback(()=>{o?.scrollNext()},[o]),I=l.useCallback(c=>{const A=e==="horizontal"?"ArrowLeft":"ArrowUp",E=e==="horizontal"?"ArrowRight":"ArrowDown";c.key===A?(c.preventDefault(),m()):c.key===E&&(c.preventDefault(),v())},[e,m,v]);return l.useEffect(()=>{!o||!t||t(o)},[o,t]),l.useEffect(()=>{if(o)return i(o),o.on("reInit",i),o.on("select",i),()=>{o?.off("reInit",i),o?.off("select",i)}},[o,i]),s.jsx(p.Provider,{value:{carouselRef:R,api:o,opts:r,orientation:e||(r?.axis==="y"?"vertical":"horizontal"),scrollPrev:m,scrollNext:v,canScrollPrev:z,canScrollNext:D},children:s.jsx("div",{ref:k,"aria-roledescription":"carousel",className:f.cn("relative",u),"data-hook":d,"data-slot":"carousel","data-tracking-el":x,"data-tracking-label":P,role:"region",onKeyDownCapture:I,...S,children:n})})});y.displayName="Carousel";const b=l.forwardRef(({className:e,...r},t)=>{const{carouselRef:a,orientation:u}=C(),n=u==="vertical";return s.jsx("div",{ref:a,className:f.cn("overflow-hidden",n&&"w-full",e),"data-slot":"carousel-content",children:s.jsx("div",{ref:t,className:f.cn("flex",n?"-mt-4 h-full w-full flex-col":"-ml-4"),...r})})});b.displayName="CarouselContent";const w=l.forwardRef(({className:e,...r},t)=>{const{orientation:a}=C();return s.jsx("div",{ref:t,"aria-roledescription":"slide",className:f.cn("min-w-0 shrink-0 grow-0 basis-full",a==="horizontal"?"pl-4":"w-full pt-4",e),"data-slot":"carousel-item",role:"group",...r})});w.displayName="CarouselItem";function j({className:e,variant:r="outline",size:t="default",dataHook:a="carousel-previous",...u}){const{orientation:n,scrollPrev:d,canScrollPrev:x}=C();return s.jsxs(h.Button,{iconOnly:!0,className:f.cn("absolute",n==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),"data-slot":"carousel-previous",dataHook:a,disabled:!x,size:t,variant:r,onClick:d,...u,children:[s.jsx(N.ArrowLeft,{}),s.jsx("span",{className:"sr-only",children:"Previous slide"})]})}j.displayName="CarouselPrevious";function g({className:e,variant:r="outline",size:t="default",dataHook:a="carousel-next",...u}){const{orientation:n,scrollNext:d,canScrollNext:x}=C();return s.jsxs(h.Button,{iconOnly:!0,className:f.cn("absolute",n==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),"data-slot":"carousel-next",dataHook:a,disabled:!x,size:t,variant:r,onClick:d,...u,children:[s.jsx(N.ArrowRight,{}),s.jsx("span",{className:"sr-only",children:"Next slide"})]})}g.displayName="CarouselNext";exports.Carousel=y;exports.CarouselContent=b;exports.CarouselItem=w;exports.CarouselNext=g;exports.CarouselPrevious=j;
@@ -1,21 +1,111 @@
1
1
  import { default as useEmblaCarousel, UseEmblaCarouselType } from 'embla-carousel-react';
2
- import { Button } from '../button';
2
+ import { ButtonProps } from '../button';
3
3
  import * as React from "react";
4
4
  type CarouselApi = UseEmblaCarouselType[1];
5
5
  type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
6
6
  type CarouselOptions = UseCarouselParameters[0];
7
7
  type CarouselPlugin = UseCarouselParameters[1];
8
- type CarouselProps = {
8
+ /**
9
+ * Props for the Carousel component.
10
+ */
11
+ interface CarouselProps extends React.ComponentProps<"div"> {
12
+ /**
13
+ * Data hook for automated testing (required)
14
+ */
15
+ dataHook: string;
16
+ /**
17
+ * Tracking element identifier for analytics
18
+ */
19
+ trackingEl?: string;
20
+ /**
21
+ * Tracking label for analytics context
22
+ */
23
+ trackingLabel?: string;
24
+ /**
25
+ * Embla carousel options
26
+ */
9
27
  opts?: CarouselOptions;
28
+ /**
29
+ * Embla carousel plugins
30
+ */
10
31
  plugins?: CarouselPlugin;
32
+ /**
33
+ * Carousel orientation
34
+ * @default "horizontal"
35
+ */
11
36
  orientation?: "horizontal" | "vertical";
37
+ /**
38
+ * Callback to receive the carousel API instance
39
+ */
12
40
  setApi?: (api: CarouselApi) => void;
13
- };
14
- declare function Carousel({ orientation, opts, setApi, plugins, className, children, ...props }: React.ComponentProps<"div"> & CarouselProps): import("react/jsx-runtime").JSX.Element;
15
- declare function CarouselContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
16
- declare function CarouselItem({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
17
- declare function CarouselPrevious({ className, variant, size, dataHook, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
18
- declare function CarouselNext({ className, variant, size, dataHook, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
41
+ }
42
+ /**
43
+ * Carousel component for displaying a scrollable series of content.
44
+ * Built on Embla Carousel for smooth touch-enabled sliding.
45
+ */
46
+ declare const Carousel: React.ForwardRefExoticComponent<Omit<CarouselProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
47
+ /**
48
+ * Container for carousel items with overflow handling.
49
+ */
50
+ declare const CarouselContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
51
+ /**
52
+ * Individual slide item within the carousel.
53
+ */
54
+ declare const CarouselItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
55
+ /**
56
+ * Props for CarouselPrevious component.
57
+ */
58
+ interface CarouselPreviousProps extends Omit<ButtonProps, "variant" | "size" | "dataHook"> {
59
+ /**
60
+ * Visual style variant of the button
61
+ * @default "outline"
62
+ */
63
+ variant?: ButtonProps["variant"];
64
+ /**
65
+ * Size variant of the button
66
+ * @default "default"
67
+ */
68
+ size?: ButtonProps["size"];
69
+ /**
70
+ * Data hook for automated testing
71
+ * @default "carousel-previous"
72
+ */
73
+ dataHook?: string;
74
+ }
75
+ /**
76
+ * Button to navigate to the previous slide.
77
+ */
78
+ declare function CarouselPrevious({ className, variant, size, dataHook, ...props }: CarouselPreviousProps): import("react/jsx-runtime").JSX.Element;
79
+ declare namespace CarouselPrevious {
80
+ var displayName: string;
81
+ }
82
+ /**
83
+ * Props for CarouselNext component.
84
+ */
85
+ interface CarouselNextProps extends Omit<ButtonProps, "variant" | "size" | "dataHook"> {
86
+ /**
87
+ * Visual style variant of the button
88
+ * @default "outline"
89
+ */
90
+ variant?: ButtonProps["variant"];
91
+ /**
92
+ * Size variant of the button
93
+ * @default "default"
94
+ */
95
+ size?: ButtonProps["size"];
96
+ /**
97
+ * Data hook for automated testing
98
+ * @default "carousel-next"
99
+ */
100
+ dataHook?: string;
101
+ }
102
+ /**
103
+ * Button to navigate to the next slide.
104
+ */
105
+ declare function CarouselNext({ className, variant, size, dataHook, ...props }: CarouselNextProps): import("react/jsx-runtime").JSX.Element;
106
+ declare namespace CarouselNext {
107
+ var displayName: string;
108
+ }
19
109
  export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, };
20
- export type { CarouselProps };
110
+ export type { CarouselProps, CarouselPreviousProps, CarouselNextProps };
21
111
  //# sourceMappingURL=carousel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../src/components/carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,gBAAgB,EAAE,EACvB,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EACL,MAAM,EAGP,MAAM,mCAAmC,CAAC;AAE3C,KAAK,WAAW,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;AAC3C,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AACjE,KAAK,eAAe,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