@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.
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.d.ts +74 -4
- package/dist/accordion.d.ts.map +1 -1
- package/dist/accordion.js +100 -105
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.d.ts +30 -10
- package/dist/alert-dialog.d.ts.map +1 -1
- package/dist/alert-dialog.js +129 -132
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts +22 -1
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.js +1 -1
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.d.ts +11 -1
- package/dist/aspect-ratio.d.ts.map +1 -1
- package/dist/aspect-ratio.js +16 -20
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.d.ts +43 -3
- package/dist/avatar.d.ts.map +1 -1
- package/dist/avatar.js +18 -16
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts +24 -9
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +34 -32
- package/dist/blocks/data-table.cjs +1 -1
- package/dist/blocks/data-table.d.ts.map +1 -1
- package/dist/blocks/data-table.js +177 -170
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts +38 -307
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +411 -508
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.d.ts +63 -8
- package/dist/breadcrumb.d.ts.map +1 -1
- package/dist/breadcrumb.js +97 -93
- package/dist/button.cjs +1 -1
- package/dist/button.d.ts +17 -45
- package/dist/button.d.ts.map +1 -1
- package/dist/button.js +49 -50
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts +16 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +31 -29
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +58 -18
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +60 -51
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.d.ts +99 -9
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.js +142 -128
- package/dist/centred-layout.cjs +1 -1
- package/dist/centred-layout.d.ts +18 -15
- package/dist/centred-layout.d.ts.map +1 -1
- package/dist/centred-layout.js +44 -33
- package/dist/chart.cjs +4 -4
- package/dist/chart.d.ts +70 -7
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +71 -66
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.d.ts +9 -5
- package/dist/checkbox.d.ts.map +1 -1
- package/dist/checkbox.js +61 -82
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.d.ts +65 -8
- package/dist/collapsible.d.ts.map +1 -1
- package/dist/collapsible.js +41 -55
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.d.ts +28 -18
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +191 -160
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +115 -9
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +176 -152
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts +188 -20
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.js +120 -122
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.d.ts +75 -9
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.js +221 -82
- package/dist/description.cjs +1 -0
- package/dist/description.d.ts +37 -0
- package/dist/description.d.ts.map +1 -0
- package/dist/description.js +25 -0
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.d.ts +73 -9
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.js +103 -112
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.d.ts +92 -0
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.js +67 -52
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts +95 -11
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.js +146 -106
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts +26 -6
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +55 -53
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +27 -17
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +86 -79
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.d.ts +36 -6
- package/dist/hover-card.d.ts.map +1 -1
- package/dist/hover-card.js +44 -42
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +367 -386
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.d.ts +21 -2
- package/dist/input-group.d.ts.map +1 -1
- package/dist/input-group.js +51 -41
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +1 -1
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.d.ts.map +1 -1
- package/dist/input-password.js +25 -26
- package/dist/input.cjs +1 -1
- package/dist/input.d.ts +38 -24
- package/dist/input.d.ts.map +1 -1
- package/dist/input.js +68 -136
- package/dist/label.cjs +1 -1
- package/dist/label.d.ts +20 -1
- package/dist/label.d.ts.map +1 -1
- package/dist/label.js +31 -18
- package/dist/link.cjs +1 -1
- package/dist/link.js +1 -1
- package/dist/logo.cjs +1 -1
- package/dist/logo.d.ts +9 -4
- package/dist/logo.d.ts.map +1 -1
- package/dist/logo.js +20 -21
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts +43 -6
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +100 -78
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.d.ts +6 -54
- package/dist/navigation-menu.d.ts.map +1 -1
- package/dist/navigation-menu.js +73 -84
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +8 -10
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +78 -86
- package/dist/popover.cjs +1 -1
- package/dist/popover.d.ts +59 -4
- package/dist/popover.d.ts.map +1 -1
- package/dist/popover.js +42 -34
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts +9 -2
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +71 -59
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.d.ts +33 -10
- package/dist/radio-group.d.ts.map +1 -1
- package/dist/radio-group.js +56 -66
- package/dist/rating.d.ts +4 -0
- package/dist/rating.d.ts.map +1 -1
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.d.ts +58 -6
- package/dist/resizable.d.ts.map +1 -1
- package/dist/resizable.js +38 -37
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.d.ts +46 -5
- package/dist/scroll-area.d.ts.map +1 -1
- package/dist/scroll-area.js +42 -38
- package/dist/select.cjs +1 -1
- package/dist/select.d.ts +30 -0
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +64 -54
- package/dist/separator.cjs +1 -1
- package/dist/separator.d.ts +52 -5
- package/dist/separator.d.ts.map +1 -1
- package/dist/separator.js +45 -35
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +85 -19
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +117 -115
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +24 -2
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +15 -9
- package/dist/slider.cjs +1 -1
- package/dist/slider.d.ts +18 -4
- package/dist/slider.d.ts.map +1 -1
- package/dist/slider.js +72 -66
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts +21 -22
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.js +46 -48
- package/dist/split-layout.d.ts +4 -1
- package/dist/split-layout.d.ts.map +1 -1
- package/dist/switch.cjs +1 -1
- package/dist/switch.d.ts +2 -12
- package/dist/switch.d.ts.map +1 -1
- package/dist/switch.js +37 -41
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +16 -12
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +56 -58
- package/dist/tabs.d.ts +27 -3
- package/dist/tabs.d.ts.map +1 -1
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.d.ts +57 -7
- package/dist/toggle-group.d.ts.map +1 -1
- package/dist/toggle-group.js +60 -67
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.d.ts +12 -26
- package/dist/toggle.d.ts.map +1 -1
- package/dist/toggle.js +16 -20
- package/package.json +9 -3
- package/src/blocks/data-table.tsx +43 -33
- package/src/blocks/sidebar.tsx +158 -541
- package/src/components/accordion.tsx +164 -78
- package/src/components/alert-dialog.tsx +156 -111
- package/src/components/alert.tsx +27 -14
- package/src/components/aspect-ratio.tsx +25 -16
- package/src/components/avatar.tsx +56 -8
- package/src/components/badge.tsx +65 -42
- package/src/components/breadcrumb.tsx +159 -83
- package/src/components/button.tsx +42 -63
- package/src/components/calendar.tsx +22 -6
- package/src/components/card.tsx +92 -40
- package/src/components/carousel.tsx +240 -115
- package/src/components/centred-layout.tsx +68 -49
- package/src/components/chart.tsx +118 -47
- package/src/components/checkbox.tsx +43 -79
- package/src/components/collapsible.tsx +95 -26
- package/src/components/combobox.tsx +243 -153
- package/src/components/command.tsx +295 -121
- package/src/components/context-menu.tsx +279 -82
- package/src/components/date-picker.tsx +282 -31
- package/src/components/description.tsx +60 -0
- package/src/components/dialog.tsx +163 -87
- package/src/components/drawer.tsx +76 -2
- package/src/components/dropdown-menu.tsx +143 -37
- package/src/components/field.tsx +38 -11
- package/src/components/global-layout.tsx +116 -77
- package/src/components/hover-card.tsx +54 -14
- package/src/components/input-group.tsx +56 -18
- package/src/components/input-otp.tsx +1 -1
- package/src/components/input-password.tsx +4 -5
- package/src/components/input.tsx +93 -186
- package/src/components/label.tsx +56 -15
- package/src/components/link.tsx +1 -1
- package/src/components/logo.tsx +12 -7
- package/src/components/menubar.tsx +61 -5
- package/src/components/navigation-menu.tsx +37 -99
- package/src/components/pagination.tsx +13 -19
- package/src/components/popover.tsx +103 -20
- package/src/components/progress.tsx +82 -60
- package/src/components/radio-group.tsx +44 -25
- package/src/components/rating.tsx +4 -0
- package/src/components/resizable.tsx +88 -38
- package/src/components/scroll-area.tsx +123 -56
- package/src/components/select.tsx +22 -2
- package/src/components/separator.tsx +101 -24
- package/src/components/sheet.tsx +186 -90
- package/src/components/skeleton.tsx +40 -10
- package/src/components/slider.tsx +83 -57
- package/src/components/sonner.tsx +34 -34
- package/src/components/split-layout.tsx +4 -1
- package/src/components/switch.figma.tsx +7 -11
- package/src/components/switch.tsx +9 -19
- package/src/components/table.tsx +23 -18
- package/src/components/tabs.tsx +27 -3
- package/src/components/toggle-group.tsx +115 -86
- package/src/components/toggle.figma.tsx +13 -19
- package/src/components/toggle.tsx +20 -34
- package/src/index.ts +1 -1
- package/dist/input-base.cjs +0 -1
- package/dist/input-base.d.ts +0 -28
- package/dist/input-base.d.ts.map +0 -1
- package/dist/input-base.js +0 -56
- package/src/components/input-base.tsx +0 -86
package/dist/calendar.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { DayButton, DayPickerProps } from 'react-day-picker';
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Calendar component
|
|
5
|
+
*/
|
|
3
6
|
export type CalendarProps = DayPickerProps & {
|
|
4
7
|
/**
|
|
5
8
|
* Number of months to display (1-3)
|
|
@@ -19,7 +22,19 @@ export type CalendarProps = DayPickerProps & {
|
|
|
19
22
|
*/
|
|
20
23
|
trackingLabel?: string;
|
|
21
24
|
};
|
|
22
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Custom day button component for the Calendar.
|
|
27
|
+
* Renders individual day cells with proper styling and selection states.
|
|
28
|
+
*/
|
|
29
|
+
declare const CalendarDayButton: {
|
|
30
|
+
({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
displayName: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Calendar component for date and range selection.
|
|
35
|
+
* Supports single date, multiple dates, and date range selection modes.
|
|
36
|
+
* Built on top of react-day-picker with custom styling and navigation.
|
|
37
|
+
*/
|
|
23
38
|
declare function Calendar({ className, classNames, showOutsideDays, numberOfMonths, captionLayout, fixedWeeks, dataHook, trackingEl, trackingLabel, components, formatters, ...props }: CalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
24
39
|
declare namespace Calendar {
|
|
25
40
|
var displayName: string;
|
package/dist/calendar.d.ts.map
CHANGED
|
@@ -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;
|
|
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,QAAA,MAAM,iBAAiB;8CAKpB,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC;;CAqCxC,CAAC;AAIF;;;;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,20 +1,20 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import * as g from "react";
|
|
3
|
-
import { ChevronLeft as
|
|
4
|
-
import { getDefaultClassNames as m, DayPicker as
|
|
3
|
+
import { ChevronLeft as v, ChevronRight as k, ChevronDown as N } from "@brightlocal/icons";
|
|
4
|
+
import { getDefaultClassNames as m, DayPicker as C } from "react-day-picker";
|
|
5
5
|
import { cn as e } from "@brightlocal/ui-components/lib/utils";
|
|
6
6
|
const f = e(
|
|
7
|
-
"inline-flex items-center justify-center rounded-md
|
|
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
|
|
11
|
-
)
|
|
12
|
-
function z({
|
|
11
|
+
"h-8 w-8 p-0"
|
|
12
|
+
), p = ({
|
|
13
13
|
className: s,
|
|
14
14
|
day: l,
|
|
15
15
|
modifiers: r,
|
|
16
16
|
...u
|
|
17
|
-
}) {
|
|
17
|
+
}) => {
|
|
18
18
|
const n = m(), d = g.useRef(null);
|
|
19
19
|
return g.useEffect(() => {
|
|
20
20
|
r.focused && d.current?.focus();
|
|
@@ -43,24 +43,25 @@ function z({
|
|
|
43
43
|
...u
|
|
44
44
|
}
|
|
45
45
|
);
|
|
46
|
-
}
|
|
47
|
-
|
|
46
|
+
};
|
|
47
|
+
p.displayName = "CalendarDayButton";
|
|
48
|
+
function z({
|
|
48
49
|
className: s,
|
|
49
50
|
classNames: l,
|
|
50
51
|
showOutsideDays: r = !0,
|
|
51
52
|
numberOfMonths: u = 1,
|
|
52
53
|
captionLayout: n,
|
|
53
54
|
fixedWeeks: d = !0,
|
|
54
|
-
dataHook:
|
|
55
|
-
trackingEl:
|
|
56
|
-
trackingLabel:
|
|
57
|
-
components:
|
|
58
|
-
formatters:
|
|
59
|
-
...
|
|
55
|
+
dataHook: x,
|
|
56
|
+
trackingEl: h,
|
|
57
|
+
trackingLabel: b,
|
|
58
|
+
components: w,
|
|
59
|
+
formatters: y,
|
|
60
|
+
..._
|
|
60
61
|
}) {
|
|
61
62
|
const t = m();
|
|
62
63
|
return /* @__PURE__ */ a(
|
|
63
|
-
|
|
64
|
+
C,
|
|
64
65
|
{
|
|
65
66
|
captionLayout: n,
|
|
66
67
|
className: e(
|
|
@@ -149,43 +150,44 @@ function C({
|
|
|
149
150
|
className: c,
|
|
150
151
|
...i
|
|
151
152
|
}) => o === "left" ? /* @__PURE__ */ a(
|
|
152
|
-
|
|
153
|
+
v,
|
|
153
154
|
{
|
|
154
155
|
className: e("size-4", c),
|
|
155
156
|
...i
|
|
156
157
|
}
|
|
157
158
|
) : o === "right" ? /* @__PURE__ */ a(
|
|
158
|
-
|
|
159
|
+
k,
|
|
159
160
|
{
|
|
160
161
|
className: e("size-4", c),
|
|
161
162
|
...i
|
|
162
163
|
}
|
|
163
164
|
) : /* @__PURE__ */ a(
|
|
164
|
-
|
|
165
|
+
N,
|
|
165
166
|
{
|
|
166
167
|
className: e("size-4", c),
|
|
167
168
|
...i
|
|
168
169
|
}
|
|
169
170
|
),
|
|
170
|
-
DayButton:
|
|
171
|
-
...
|
|
171
|
+
DayButton: p,
|
|
172
|
+
...w
|
|
172
173
|
},
|
|
173
|
-
"data-hook":
|
|
174
|
-
"data-
|
|
175
|
-
"data-tracking-
|
|
174
|
+
"data-hook": x,
|
|
175
|
+
"data-slot": "calendar",
|
|
176
|
+
"data-tracking-el": h,
|
|
177
|
+
"data-tracking-label": b,
|
|
176
178
|
fixedWeeks: d,
|
|
177
179
|
formatters: {
|
|
178
180
|
formatMonthDropdown: (o) => o.toLocaleString("default", { month: "short" }),
|
|
179
|
-
...
|
|
181
|
+
...y
|
|
180
182
|
},
|
|
181
183
|
numberOfMonths: u,
|
|
182
184
|
showOutsideDays: r,
|
|
183
|
-
...
|
|
185
|
+
..._
|
|
184
186
|
}
|
|
185
187
|
);
|
|
186
188
|
}
|
|
187
|
-
|
|
189
|
+
z.displayName = "Calendar";
|
|
188
190
|
export {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
+
z as Calendar,
|
|
192
|
+
p as CalendarDayButton
|
|
191
193
|
};
|
package/dist/card.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
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
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
package/dist/card.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA+B/B;;GAEG;AACH,KAAK,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC7C;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,QAAQ,CAAC;IAC/C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,IAAI,+FAwBT,CAAC;AAIF;;GAEG;AACH,KAAK,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IACzD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;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
|
|
2
|
-
import * as
|
|
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
|
|
5
|
-
|
|
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 =
|
|
29
|
+
), m = e.forwardRef(
|
|
32
30
|
({
|
|
33
31
|
className: r,
|
|
34
32
|
variant: a = "default",
|
|
35
|
-
dataHook:
|
|
36
|
-
trackingEl:
|
|
33
|
+
dataHook: t,
|
|
34
|
+
trackingEl: s,
|
|
37
35
|
trackingLabel: n,
|
|
38
|
-
...
|
|
39
|
-
}, c) => /* @__PURE__ */
|
|
36
|
+
...i
|
|
37
|
+
}, c) => /* @__PURE__ */ d(
|
|
40
38
|
"div",
|
|
41
39
|
{
|
|
42
40
|
ref: c,
|
|
43
|
-
className:
|
|
44
|
-
"data-hook":
|
|
41
|
+
className: o(f({ variant: a }), r),
|
|
42
|
+
"data-hook": t,
|
|
45
43
|
"data-slot": "card",
|
|
46
|
-
"data-tracking-el":
|
|
44
|
+
"data-tracking-el": s || `card-${a}`,
|
|
47
45
|
"data-tracking-label": n,
|
|
48
|
-
...
|
|
46
|
+
...i
|
|
49
47
|
}
|
|
50
48
|
)
|
|
51
49
|
);
|
|
52
50
|
m.displayName = "Card";
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
const p = e.forwardRef(
|
|
52
|
+
({ className: r, ...a }, t) => /* @__PURE__ */ d(
|
|
55
53
|
"div",
|
|
56
54
|
{
|
|
57
|
-
|
|
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
|
-
|
|
67
|
-
|
|
63
|
+
)
|
|
64
|
+
);
|
|
65
|
+
p.displayName = "CardHeader";
|
|
66
|
+
const g = e.forwardRef(
|
|
67
|
+
({ className: r, ...a }, t) => /* @__PURE__ */ d(
|
|
68
68
|
"div",
|
|
69
69
|
{
|
|
70
|
-
|
|
70
|
+
ref: t,
|
|
71
|
+
className: o("heading-sm", r),
|
|
71
72
|
"data-slot": "card-title",
|
|
72
73
|
...a
|
|
73
74
|
}
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
)
|
|
76
|
+
);
|
|
77
|
+
g.displayName = "CardTitle";
|
|
78
|
+
const u = e.forwardRef(
|
|
79
|
+
({ className: r, ...a }, t) => /* @__PURE__ */ d(
|
|
78
80
|
"div",
|
|
79
81
|
{
|
|
80
|
-
|
|
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
|
-
|
|
90
|
-
|
|
90
|
+
)
|
|
91
|
+
);
|
|
92
|
+
u.displayName = "CardDescription";
|
|
93
|
+
const C = e.forwardRef(
|
|
94
|
+
({ className: r, ...a }, t) => /* @__PURE__ */ d(
|
|
91
95
|
"div",
|
|
92
96
|
{
|
|
93
|
-
|
|
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
|
-
|
|
103
|
-
|
|
105
|
+
)
|
|
106
|
+
);
|
|
107
|
+
C.displayName = "CardAction";
|
|
108
|
+
const x = e.forwardRef(
|
|
109
|
+
({ className: r, ...a }, t) => /* @__PURE__ */ d(
|
|
104
110
|
"div",
|
|
105
111
|
{
|
|
106
|
-
|
|
112
|
+
ref: t,
|
|
113
|
+
className: o("px-8", r),
|
|
107
114
|
"data-slot": "card-content",
|
|
108
115
|
...a
|
|
109
116
|
}
|
|
110
|
-
)
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
117
|
+
)
|
|
118
|
+
);
|
|
119
|
+
x.displayName = "CardContent";
|
|
120
|
+
const N = e.forwardRef(
|
|
121
|
+
({ className: r, ...a }, t) => /* @__PURE__ */ d(
|
|
114
122
|
"div",
|
|
115
123
|
{
|
|
116
|
-
|
|
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
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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
|
|
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;
|
package/dist/carousel.d.ts
CHANGED
|
@@ -1,21 +1,111 @@
|
|
|
1
1
|
import { default as useEmblaCarousel, UseEmblaCarouselType } from 'embla-carousel-react';
|
|
2
|
-
import {
|
|
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
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
declare
|
|
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
|
package/dist/carousel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../src/components/carousel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../src/components/carousel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,gBAAgB,EAAE,EACvB,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAE7E,KAAK,WAAW,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;AAC3C,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AACjE,KAAK,eAAe,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAChD,KAAK,cAAc,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAE/C;;GAEG;AACH,UAAU,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACzD;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB;;;OAGG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;CACrC;AA2BD;;;GAGG;AACH,QAAA,MAAM,QAAQ,mGAyGb,CAAC;AAIF;;GAEG;AACH,QAAA,MAAM,eAAe,mKAwBnB,CAAC;AAIH;;GAEG;AACH,QAAA,MAAM,YAAY,mKAoBhB,CAAC;AAIH;;GAEG;AACH,UAAU,qBAAsB,SAAQ,IAAI,CAC1C,WAAW,EACX,SAAS,GAAG,MAAM,GAAG,UAAU,CAChC;IACC;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACjC;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,QAA8B,EAC9B,GAAG,KAAK,EACT,EAAE,qBAAqB,2CAyBvB;kBA/BQ,gBAAgB;;;AAmCzB;;GAEG;AACH,UAAU,iBAAkB,SAAQ,IAAI,CACtC,WAAW,EACX,SAAS,GAAG,MAAM,GAAG,UAAU,CAChC;IACC;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACjC;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,QAA0B,EAC1B,GAAG,KAAK,EACT,EAAE,iBAAiB,2CAyBnB;kBA/BQ,YAAY;;;AAmCrB,OAAO,EACL,KAAK,WAAW,EAChB,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,YAAY,GACb,CAAC;AAEF,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,CAAC"}
|