@saasflare/ui 3.0.2 → 3.1.1
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/button-0Bdl7Nqm.d.ts +87 -0
- package/dist/button-Brb4BhPO.d.mts +87 -0
- package/dist/{chunk-XXT4HKND.js → chunk-4BOMMZEY.js} +20 -13
- package/dist/{chunk-YAE5VBWJ.js → chunk-D5LKWKG7.js} +96 -152
- package/dist/chunk-DNLCSV5M.js +151 -0
- package/dist/{chunk-W53NTFPB.mjs → chunk-EJHYM2HP.mjs} +7 -16
- package/dist/chunk-FT66KYRN.js +30 -0
- package/dist/{chunk-2DNKXA5A.mjs → chunk-RW2S3KNB.mjs} +14 -7
- package/dist/chunk-WPOOC2FX.mjs +128 -0
- package/dist/{chunk-ORB66UYT.mjs → chunk-WRONFPRI.mjs} +66 -121
- package/dist/{dialog-CwyBJeNl.d.mts → dialog-BmY55WSX.d.ts} +4 -1
- package/dist/{dialog-CwyBJeNl.d.ts → dialog-CcaHMAsS.d.mts} +4 -1
- package/dist/entries/calendar.d.mts +5 -3
- package/dist/entries/calendar.d.ts +5 -3
- package/dist/entries/calendar.js +44 -36
- package/dist/entries/calendar.mjs +11 -3
- package/dist/entries/carousel.d.mts +4 -3
- package/dist/entries/carousel.d.ts +4 -3
- package/dist/entries/carousel.js +18 -11
- package/dist/entries/carousel.mjs +11 -4
- package/dist/entries/chart.d.mts +4 -2
- package/dist/entries/chart.d.ts +4 -2
- package/dist/entries/chart.js +17 -10
- package/dist/entries/chart.mjs +8 -1
- package/dist/entries/command.d.mts +5 -2
- package/dist/entries/command.d.ts +5 -2
- package/dist/entries/command.js +25 -18
- package/dist/entries/command.mjs +12 -5
- package/dist/entries/drawer.d.mts +4 -1
- package/dist/entries/drawer.d.ts +4 -1
- package/dist/entries/drawer.js +15 -8
- package/dist/entries/drawer.mjs +9 -2
- package/dist/entries/input-otp.d.mts +4 -2
- package/dist/entries/input-otp.d.ts +4 -2
- package/dist/entries/input-otp.js +13 -6
- package/dist/entries/input-otp.mjs +10 -3
- package/dist/entries/resizable.d.mts +3 -1
- package/dist/entries/resizable.d.ts +3 -1
- package/dist/entries/resizable.js +12 -5
- package/dist/entries/resizable.mjs +10 -3
- package/dist/index.d.mts +181 -79
- package/dist/index.d.ts +181 -79
- package/dist/index.js +807 -476
- package/dist/index.mjs +498 -171
- package/dist/{button-DUQJ0X7e.d.mts → use-saasflare-props-NrM2Glmp.d.mts} +1 -86
- package/dist/{button-DUQJ0X7e.d.ts → use-saasflare-props-NrM2Glmp.d.ts} +1 -86
- package/package.json +1 -1
- package/styles/theme.css +1 -1
- package/dist/chunk-BIU2MD4T.mjs +0 -56
- package/dist/chunk-CWW36RYE.js +0 -59
- package/dist/chunk-M3ICCPCU.js +0 -60
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { DayPicker, DayButton } from 'react-day-picker';
|
|
4
|
-
import {
|
|
4
|
+
import { c as SaasflareComponentProps } from '../use-saasflare-props-NrM2Glmp.js';
|
|
5
|
+
import { B as Button } from '../button-0Bdl7Nqm.js';
|
|
5
6
|
import 'class-variance-authority/types';
|
|
6
7
|
import 'class-variance-authority';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
type CalendarProps = React.ComponentProps<typeof DayPicker> & SaasflareComponentProps & {
|
|
9
10
|
buttonVariant?: React.ComponentProps<typeof Button>["variant"];
|
|
10
|
-
}
|
|
11
|
+
};
|
|
12
|
+
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, surface, radius, animated, ...props }: CalendarProps): react_jsx_runtime.JSX.Element;
|
|
11
13
|
declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): react_jsx_runtime.JSX.Element;
|
|
12
14
|
|
|
13
15
|
export { Calendar, CalendarDayButton };
|
package/dist/entries/calendar.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
6
|
-
var
|
|
4
|
+
var chunkDNLCSV5M_js = require('../chunk-DNLCSV5M.js');
|
|
5
|
+
require('../chunk-FT66KYRN.js');
|
|
6
|
+
var chunkD5LKWKG7_js = require('../chunk-D5LKWKG7.js');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var lucideReact = require('lucide-react');
|
|
9
9
|
var reactDayPicker = require('react-day-picker');
|
|
@@ -37,14 +37,22 @@ function Calendar({
|
|
|
37
37
|
buttonVariant = "ghost",
|
|
38
38
|
formatters,
|
|
39
39
|
components,
|
|
40
|
+
surface,
|
|
41
|
+
radius,
|
|
42
|
+
animated,
|
|
40
43
|
...props
|
|
41
44
|
}) {
|
|
45
|
+
const sf = chunkD5LKWKG7_js.useSaasflareProps({ surface, radius, animated });
|
|
42
46
|
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
43
47
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
44
48
|
reactDayPicker.DayPicker,
|
|
45
49
|
{
|
|
50
|
+
"data-slot": "calendar",
|
|
51
|
+
"data-surface": sf.surface,
|
|
52
|
+
"data-radius": sf.radius,
|
|
53
|
+
"data-animated": String(sf.animated),
|
|
46
54
|
showOutsideDays,
|
|
47
|
-
className:
|
|
55
|
+
className: chunkD5LKWKG7_js.cn(
|
|
48
56
|
"group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
49
57
|
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
50
58
|
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
@@ -56,86 +64,86 @@ function Calendar({
|
|
|
56
64
|
...formatters
|
|
57
65
|
},
|
|
58
66
|
classNames: {
|
|
59
|
-
root:
|
|
60
|
-
months:
|
|
67
|
+
root: chunkD5LKWKG7_js.cn("w-fit", defaultClassNames.root),
|
|
68
|
+
months: chunkD5LKWKG7_js.cn(
|
|
61
69
|
"relative flex flex-col gap-4 md:flex-row",
|
|
62
70
|
defaultClassNames.months
|
|
63
71
|
),
|
|
64
|
-
month:
|
|
65
|
-
nav:
|
|
72
|
+
month: chunkD5LKWKG7_js.cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
73
|
+
nav: chunkD5LKWKG7_js.cn(
|
|
66
74
|
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
67
75
|
defaultClassNames.nav
|
|
68
76
|
),
|
|
69
|
-
button_previous:
|
|
70
|
-
|
|
77
|
+
button_previous: chunkD5LKWKG7_js.cn(
|
|
78
|
+
chunkDNLCSV5M_js.buttonVariants({ variant: buttonVariant }),
|
|
71
79
|
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
72
80
|
defaultClassNames.button_previous
|
|
73
81
|
),
|
|
74
|
-
button_next:
|
|
75
|
-
|
|
82
|
+
button_next: chunkD5LKWKG7_js.cn(
|
|
83
|
+
chunkDNLCSV5M_js.buttonVariants({ variant: buttonVariant }),
|
|
76
84
|
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
77
85
|
defaultClassNames.button_next
|
|
78
86
|
),
|
|
79
|
-
month_caption:
|
|
87
|
+
month_caption: chunkD5LKWKG7_js.cn(
|
|
80
88
|
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
|
|
81
89
|
defaultClassNames.month_caption
|
|
82
90
|
),
|
|
83
|
-
dropdowns:
|
|
91
|
+
dropdowns: chunkD5LKWKG7_js.cn(
|
|
84
92
|
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
85
93
|
defaultClassNames.dropdowns
|
|
86
94
|
),
|
|
87
|
-
dropdown_root:
|
|
95
|
+
dropdown_root: chunkD5LKWKG7_js.cn(
|
|
88
96
|
"relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",
|
|
89
97
|
defaultClassNames.dropdown_root
|
|
90
98
|
),
|
|
91
|
-
dropdown:
|
|
99
|
+
dropdown: chunkD5LKWKG7_js.cn(
|
|
92
100
|
"absolute inset-0 bg-popover opacity-0",
|
|
93
101
|
defaultClassNames.dropdown
|
|
94
102
|
),
|
|
95
|
-
caption_label:
|
|
103
|
+
caption_label: chunkD5LKWKG7_js.cn(
|
|
96
104
|
"font-medium select-none",
|
|
97
105
|
captionLayout === "label" ? "text-sm" : "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
|
|
98
106
|
defaultClassNames.caption_label
|
|
99
107
|
),
|
|
100
108
|
table: "w-full border-collapse",
|
|
101
|
-
weekdays:
|
|
102
|
-
weekday:
|
|
109
|
+
weekdays: chunkD5LKWKG7_js.cn("flex", defaultClassNames.weekdays),
|
|
110
|
+
weekday: chunkD5LKWKG7_js.cn(
|
|
103
111
|
"flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none",
|
|
104
112
|
defaultClassNames.weekday
|
|
105
113
|
),
|
|
106
|
-
week:
|
|
107
|
-
week_number_header:
|
|
114
|
+
week: chunkD5LKWKG7_js.cn("mt-2 flex w-full", defaultClassNames.week),
|
|
115
|
+
week_number_header: chunkD5LKWKG7_js.cn(
|
|
108
116
|
"w-(--cell-size) select-none",
|
|
109
117
|
defaultClassNames.week_number_header
|
|
110
118
|
),
|
|
111
|
-
week_number:
|
|
119
|
+
week_number: chunkD5LKWKG7_js.cn(
|
|
112
120
|
"text-[0.8rem] text-muted-foreground select-none",
|
|
113
121
|
defaultClassNames.week_number
|
|
114
122
|
),
|
|
115
|
-
day:
|
|
123
|
+
day: chunkD5LKWKG7_js.cn(
|
|
116
124
|
"group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md",
|
|
117
125
|
props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md",
|
|
118
126
|
defaultClassNames.day
|
|
119
127
|
),
|
|
120
|
-
range_start:
|
|
128
|
+
range_start: chunkD5LKWKG7_js.cn(
|
|
121
129
|
"rounded-l-md bg-accent",
|
|
122
130
|
defaultClassNames.range_start
|
|
123
131
|
),
|
|
124
|
-
range_middle:
|
|
125
|
-
range_end:
|
|
126
|
-
today:
|
|
132
|
+
range_middle: chunkD5LKWKG7_js.cn("rounded-none", defaultClassNames.range_middle),
|
|
133
|
+
range_end: chunkD5LKWKG7_js.cn("rounded-r-md bg-accent", defaultClassNames.range_end),
|
|
134
|
+
today: chunkD5LKWKG7_js.cn(
|
|
127
135
|
"rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none",
|
|
128
136
|
defaultClassNames.today
|
|
129
137
|
),
|
|
130
|
-
outside:
|
|
138
|
+
outside: chunkD5LKWKG7_js.cn(
|
|
131
139
|
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
132
140
|
defaultClassNames.outside
|
|
133
141
|
),
|
|
134
|
-
disabled:
|
|
142
|
+
disabled: chunkD5LKWKG7_js.cn(
|
|
135
143
|
"text-muted-foreground opacity-50",
|
|
136
144
|
defaultClassNames.disabled
|
|
137
145
|
),
|
|
138
|
-
hidden:
|
|
146
|
+
hidden: chunkD5LKWKG7_js.cn("invisible", defaultClassNames.hidden),
|
|
139
147
|
...classNames
|
|
140
148
|
},
|
|
141
149
|
components: {
|
|
@@ -145,25 +153,25 @@ function Calendar({
|
|
|
145
153
|
{
|
|
146
154
|
"data-slot": "calendar",
|
|
147
155
|
ref: rootRef,
|
|
148
|
-
className:
|
|
156
|
+
className: chunkD5LKWKG7_js.cn(className2),
|
|
149
157
|
...props2
|
|
150
158
|
}
|
|
151
159
|
);
|
|
152
160
|
},
|
|
153
161
|
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
154
162
|
if (orientation === "left") {
|
|
155
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, { className:
|
|
163
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, { className: chunkD5LKWKG7_js.cn("size-4", className2), ...props2 });
|
|
156
164
|
}
|
|
157
165
|
if (orientation === "right") {
|
|
158
166
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
159
167
|
lucideReact.ChevronRightIcon,
|
|
160
168
|
{
|
|
161
|
-
className:
|
|
169
|
+
className: chunkD5LKWKG7_js.cn("size-4", className2),
|
|
162
170
|
...props2
|
|
163
171
|
}
|
|
164
172
|
);
|
|
165
173
|
}
|
|
166
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className:
|
|
174
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: chunkD5LKWKG7_js.cn("size-4", className2), ...props2 });
|
|
167
175
|
},
|
|
168
176
|
DayButton: CalendarDayButton,
|
|
169
177
|
WeekNumber: ({ children, ...props2 }) => {
|
|
@@ -187,7 +195,7 @@ function CalendarDayButton({
|
|
|
187
195
|
if (modifiers.focused) ref.current?.focus();
|
|
188
196
|
}, [modifiers.focused]);
|
|
189
197
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
190
|
-
|
|
198
|
+
chunkDNLCSV5M_js.Button,
|
|
191
199
|
{
|
|
192
200
|
ref,
|
|
193
201
|
variant: "ghost",
|
|
@@ -197,7 +205,7 @@ function CalendarDayButton({
|
|
|
197
205
|
"data-range-start": modifiers.range_start,
|
|
198
206
|
"data-range-end": modifiers.range_end,
|
|
199
207
|
"data-range-middle": modifiers.range_middle,
|
|
200
|
-
className:
|
|
208
|
+
className: chunkD5LKWKG7_js.cn(
|
|
201
209
|
"flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70",
|
|
202
210
|
defaultClassNames.day,
|
|
203
211
|
className
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { buttonVariants, Button } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import { cn } from '../chunk-
|
|
2
|
+
import { buttonVariants, Button } from '../chunk-WPOOC2FX.mjs';
|
|
3
|
+
import '../chunk-EJHYM2HP.mjs';
|
|
4
|
+
import { useSaasflareProps, cn } from '../chunk-WRONFPRI.mjs';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon } from 'lucide-react';
|
|
7
7
|
import { getDefaultClassNames, DayPicker } from 'react-day-picker';
|
|
@@ -15,12 +15,20 @@ function Calendar({
|
|
|
15
15
|
buttonVariant = "ghost",
|
|
16
16
|
formatters,
|
|
17
17
|
components,
|
|
18
|
+
surface,
|
|
19
|
+
radius,
|
|
20
|
+
animated,
|
|
18
21
|
...props
|
|
19
22
|
}) {
|
|
23
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
20
24
|
const defaultClassNames = getDefaultClassNames();
|
|
21
25
|
return /* @__PURE__ */ jsx(
|
|
22
26
|
DayPicker,
|
|
23
27
|
{
|
|
28
|
+
"data-slot": "calendar",
|
|
29
|
+
"data-surface": sf.surface,
|
|
30
|
+
"data-radius": sf.radius,
|
|
31
|
+
"data-animated": String(sf.animated),
|
|
24
32
|
showOutsideDays,
|
|
25
33
|
className: cn(
|
|
26
34
|
"group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
|
|
4
|
-
import {
|
|
4
|
+
import { c as SaasflareComponentProps } from '../use-saasflare-props-NrM2Glmp.mjs';
|
|
5
|
+
import { B as Button } from '../button-Brb4BhPO.mjs';
|
|
5
6
|
import 'class-variance-authority/types';
|
|
6
7
|
import 'class-variance-authority';
|
|
7
8
|
|
|
@@ -9,13 +10,13 @@ type CarouselApi = UseEmblaCarouselType[1];
|
|
|
9
10
|
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
10
11
|
type CarouselOptions = UseCarouselParameters[0];
|
|
11
12
|
type CarouselPlugin = UseCarouselParameters[1];
|
|
12
|
-
type CarouselProps = {
|
|
13
|
+
type CarouselProps = SaasflareComponentProps & {
|
|
13
14
|
opts?: CarouselOptions;
|
|
14
15
|
plugins?: CarouselPlugin;
|
|
15
16
|
orientation?: "horizontal" | "vertical";
|
|
16
17
|
setApi?: (api: CarouselApi) => void;
|
|
17
18
|
};
|
|
18
|
-
declare function Carousel({ orientation, opts, setApi, plugins, className, children, ...props }: React.ComponentProps<"div"> & CarouselProps): react_jsx_runtime.JSX.Element;
|
|
19
|
+
declare function Carousel({ orientation, opts, setApi, plugins, className, children, surface, radius, animated, ...props }: Omit<React.ComponentProps<"div">, keyof SaasflareComponentProps> & CarouselProps): react_jsx_runtime.JSX.Element;
|
|
19
20
|
declare function CarouselContent({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
20
21
|
declare function CarouselItem({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
21
22
|
declare function CarouselPrevious({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
|
|
4
|
-
import {
|
|
4
|
+
import { c as SaasflareComponentProps } from '../use-saasflare-props-NrM2Glmp.js';
|
|
5
|
+
import { B as Button } from '../button-0Bdl7Nqm.js';
|
|
5
6
|
import 'class-variance-authority/types';
|
|
6
7
|
import 'class-variance-authority';
|
|
7
8
|
|
|
@@ -9,13 +10,13 @@ type CarouselApi = UseEmblaCarouselType[1];
|
|
|
9
10
|
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
10
11
|
type CarouselOptions = UseCarouselParameters[0];
|
|
11
12
|
type CarouselPlugin = UseCarouselParameters[1];
|
|
12
|
-
type CarouselProps = {
|
|
13
|
+
type CarouselProps = SaasflareComponentProps & {
|
|
13
14
|
opts?: CarouselOptions;
|
|
14
15
|
plugins?: CarouselPlugin;
|
|
15
16
|
orientation?: "horizontal" | "vertical";
|
|
16
17
|
setApi?: (api: CarouselApi) => void;
|
|
17
18
|
};
|
|
18
|
-
declare function Carousel({ orientation, opts, setApi, plugins, className, children, ...props }: React.ComponentProps<"div"> & CarouselProps): react_jsx_runtime.JSX.Element;
|
|
19
|
+
declare function Carousel({ orientation, opts, setApi, plugins, className, children, surface, radius, animated, ...props }: Omit<React.ComponentProps<"div">, keyof SaasflareComponentProps> & CarouselProps): react_jsx_runtime.JSX.Element;
|
|
19
20
|
declare function CarouselContent({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
20
21
|
declare function CarouselItem({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
21
22
|
declare function CarouselPrevious({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
|
package/dist/entries/carousel.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
6
|
-
var
|
|
4
|
+
var chunkDNLCSV5M_js = require('../chunk-DNLCSV5M.js');
|
|
5
|
+
require('../chunk-FT66KYRN.js');
|
|
6
|
+
var chunkD5LKWKG7_js = require('../chunk-D5LKWKG7.js');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var useEmblaCarousel = require('embla-carousel-react');
|
|
9
9
|
var lucideReact = require('lucide-react');
|
|
@@ -47,8 +47,12 @@ function Carousel({
|
|
|
47
47
|
plugins,
|
|
48
48
|
className,
|
|
49
49
|
children,
|
|
50
|
+
surface,
|
|
51
|
+
radius,
|
|
52
|
+
animated,
|
|
50
53
|
...props
|
|
51
54
|
}) {
|
|
55
|
+
const sf = chunkD5LKWKG7_js.useSaasflareProps({ surface, radius, animated });
|
|
52
56
|
const [carouselRef, api] = useEmblaCarousel__default.default(
|
|
53
57
|
{
|
|
54
58
|
...opts,
|
|
@@ -110,12 +114,15 @@ function Carousel({
|
|
|
110
114
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
111
115
|
"div",
|
|
112
116
|
{
|
|
117
|
+
...props,
|
|
113
118
|
onKeyDownCapture: handleKeyDown,
|
|
114
|
-
className:
|
|
119
|
+
className: chunkD5LKWKG7_js.cn("relative", className),
|
|
115
120
|
role: "region",
|
|
116
121
|
"aria-roledescription": "carousel",
|
|
117
122
|
"data-slot": "carousel",
|
|
118
|
-
|
|
123
|
+
"data-surface": sf.surface,
|
|
124
|
+
"data-radius": sf.radius,
|
|
125
|
+
"data-animated": String(sf.animated),
|
|
119
126
|
children
|
|
120
127
|
}
|
|
121
128
|
)
|
|
@@ -133,7 +140,7 @@ function CarouselContent({ className, ...props }) {
|
|
|
133
140
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
134
141
|
"div",
|
|
135
142
|
{
|
|
136
|
-
className:
|
|
143
|
+
className: chunkD5LKWKG7_js.cn(
|
|
137
144
|
"flex",
|
|
138
145
|
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
139
146
|
className
|
|
@@ -152,7 +159,7 @@ function CarouselItem({ className, ...props }) {
|
|
|
152
159
|
role: "group",
|
|
153
160
|
"aria-roledescription": "slide",
|
|
154
161
|
"data-slot": "carousel-item",
|
|
155
|
-
className:
|
|
162
|
+
className: chunkD5LKWKG7_js.cn(
|
|
156
163
|
"min-w-0 shrink-0 grow-0 basis-full",
|
|
157
164
|
orientation === "horizontal" ? "pl-4" : "pt-4",
|
|
158
165
|
className
|
|
@@ -169,12 +176,12 @@ function CarouselPrevious({
|
|
|
169
176
|
}) {
|
|
170
177
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
171
178
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
172
|
-
|
|
179
|
+
chunkDNLCSV5M_js.Button,
|
|
173
180
|
{
|
|
174
181
|
"data-slot": "carousel-previous",
|
|
175
182
|
variant,
|
|
176
183
|
size,
|
|
177
|
-
className:
|
|
184
|
+
className: chunkD5LKWKG7_js.cn(
|
|
178
185
|
"absolute size-8 rounded-full",
|
|
179
186
|
orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
180
187
|
className
|
|
@@ -197,12 +204,12 @@ function CarouselNext({
|
|
|
197
204
|
}) {
|
|
198
205
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
199
206
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
200
|
-
|
|
207
|
+
chunkDNLCSV5M_js.Button,
|
|
201
208
|
{
|
|
202
209
|
"data-slot": "carousel-next",
|
|
203
210
|
variant,
|
|
204
211
|
size,
|
|
205
|
-
className:
|
|
212
|
+
className: chunkD5LKWKG7_js.cn(
|
|
206
213
|
"absolute size-8 rounded-full",
|
|
207
214
|
orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
208
215
|
className
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Button } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import { cn } from '../chunk-
|
|
2
|
+
import { Button } from '../chunk-WPOOC2FX.mjs';
|
|
3
|
+
import '../chunk-EJHYM2HP.mjs';
|
|
4
|
+
import { useSaasflareProps, cn } from '../chunk-WRONFPRI.mjs';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
7
7
|
import { ArrowLeft, ArrowRight } from 'lucide-react';
|
|
@@ -22,8 +22,12 @@ function Carousel({
|
|
|
22
22
|
plugins,
|
|
23
23
|
className,
|
|
24
24
|
children,
|
|
25
|
+
surface,
|
|
26
|
+
radius,
|
|
27
|
+
animated,
|
|
25
28
|
...props
|
|
26
29
|
}) {
|
|
30
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
27
31
|
const [carouselRef, api] = useEmblaCarousel(
|
|
28
32
|
{
|
|
29
33
|
...opts,
|
|
@@ -85,12 +89,15 @@ function Carousel({
|
|
|
85
89
|
children: /* @__PURE__ */ jsx(
|
|
86
90
|
"div",
|
|
87
91
|
{
|
|
92
|
+
...props,
|
|
88
93
|
onKeyDownCapture: handleKeyDown,
|
|
89
94
|
className: cn("relative", className),
|
|
90
95
|
role: "region",
|
|
91
96
|
"aria-roledescription": "carousel",
|
|
92
97
|
"data-slot": "carousel",
|
|
93
|
-
|
|
98
|
+
"data-surface": sf.surface,
|
|
99
|
+
"data-radius": sf.radius,
|
|
100
|
+
"data-animated": String(sf.animated),
|
|
94
101
|
children
|
|
95
102
|
}
|
|
96
103
|
)
|
package/dist/entries/chart.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import * as RechartsPrimitive from 'recharts';
|
|
4
|
+
import { c as SaasflareComponentProps } from '../use-saasflare-props-NrM2Glmp.mjs';
|
|
4
5
|
|
|
5
6
|
declare const THEMES: {
|
|
6
7
|
readonly light: "";
|
|
@@ -18,10 +19,11 @@ type ChartConfig = {
|
|
|
18
19
|
theme: Record<keyof typeof THEMES, string>;
|
|
19
20
|
});
|
|
20
21
|
};
|
|
21
|
-
|
|
22
|
+
interface ChartContainerProps extends Omit<React.ComponentProps<"div">, keyof SaasflareComponentProps>, SaasflareComponentProps {
|
|
22
23
|
config: ChartConfig;
|
|
23
24
|
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
|
|
24
|
-
}
|
|
25
|
+
}
|
|
26
|
+
declare function ChartContainer({ id, className, children, config, surface, radius, animated, ...props }: ChartContainerProps): react_jsx_runtime.JSX.Element;
|
|
25
27
|
declare const ChartStyle: ({ id, config }: {
|
|
26
28
|
id: string;
|
|
27
29
|
config: ChartConfig;
|
package/dist/entries/chart.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import * as RechartsPrimitive from 'recharts';
|
|
4
|
+
import { c as SaasflareComponentProps } from '../use-saasflare-props-NrM2Glmp.js';
|
|
4
5
|
|
|
5
6
|
declare const THEMES: {
|
|
6
7
|
readonly light: "";
|
|
@@ -18,10 +19,11 @@ type ChartConfig = {
|
|
|
18
19
|
theme: Record<keyof typeof THEMES, string>;
|
|
19
20
|
});
|
|
20
21
|
};
|
|
21
|
-
|
|
22
|
+
interface ChartContainerProps extends Omit<React.ComponentProps<"div">, keyof SaasflareComponentProps>, SaasflareComponentProps {
|
|
22
23
|
config: ChartConfig;
|
|
23
24
|
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
|
|
24
|
-
}
|
|
25
|
+
}
|
|
26
|
+
declare function ChartContainer({ id, className, children, config, surface, radius, animated, ...props }: ChartContainerProps): react_jsx_runtime.JSX.Element;
|
|
25
27
|
declare const ChartStyle: ({ id, config }: {
|
|
26
28
|
id: string;
|
|
27
29
|
config: ChartConfig;
|
package/dist/entries/chart.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkD5LKWKG7_js = require('../chunk-D5LKWKG7.js');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var RechartsPrimitive = require('recharts');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -41,16 +41,23 @@ function ChartContainer({
|
|
|
41
41
|
className,
|
|
42
42
|
children,
|
|
43
43
|
config,
|
|
44
|
+
surface,
|
|
45
|
+
radius,
|
|
46
|
+
animated,
|
|
44
47
|
...props
|
|
45
48
|
}) {
|
|
49
|
+
const sf = chunkD5LKWKG7_js.useSaasflareProps({ surface, radius, animated });
|
|
46
50
|
const uniqueId = React__namespace.useId();
|
|
47
51
|
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
48
52
|
return /* @__PURE__ */ jsxRuntime.jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
49
53
|
"div",
|
|
50
54
|
{
|
|
55
|
+
"data-surface": sf.surface,
|
|
56
|
+
"data-radius": sf.radius,
|
|
57
|
+
"data-animated": String(sf.animated),
|
|
51
58
|
"data-slot": "chart",
|
|
52
59
|
"data-chart": chartId,
|
|
53
|
-
className:
|
|
60
|
+
className: chunkD5LKWKG7_js.cn(
|
|
54
61
|
"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
|
|
55
62
|
className
|
|
56
63
|
),
|
|
@@ -113,12 +120,12 @@ function ChartTooltipContent({
|
|
|
113
120
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
114
121
|
const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
|
|
115
122
|
if (labelFormatter) {
|
|
116
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
123
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkD5LKWKG7_js.cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
|
|
117
124
|
}
|
|
118
125
|
if (!value) {
|
|
119
126
|
return null;
|
|
120
127
|
}
|
|
121
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
128
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkD5LKWKG7_js.cn("font-medium", labelClassName), children: value });
|
|
122
129
|
}, [
|
|
123
130
|
label,
|
|
124
131
|
labelFormatter,
|
|
@@ -135,7 +142,7 @@ function ChartTooltipContent({
|
|
|
135
142
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
136
143
|
"div",
|
|
137
144
|
{
|
|
138
|
-
className:
|
|
145
|
+
className: chunkD5LKWKG7_js.cn(
|
|
139
146
|
"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",
|
|
140
147
|
className
|
|
141
148
|
),
|
|
@@ -148,7 +155,7 @@ function ChartTooltipContent({
|
|
|
148
155
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
149
156
|
"div",
|
|
150
157
|
{
|
|
151
|
-
className:
|
|
158
|
+
className: chunkD5LKWKG7_js.cn(
|
|
152
159
|
"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
|
|
153
160
|
indicator === "dot" && "items-center"
|
|
154
161
|
),
|
|
@@ -156,7 +163,7 @@ function ChartTooltipContent({
|
|
|
156
163
|
itemConfig?.icon ? /* @__PURE__ */ jsxRuntime.jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsxRuntime.jsx(
|
|
157
164
|
"div",
|
|
158
165
|
{
|
|
159
|
-
className:
|
|
166
|
+
className: chunkD5LKWKG7_js.cn(
|
|
160
167
|
"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
|
|
161
168
|
{
|
|
162
169
|
"h-2.5 w-2.5": indicator === "dot",
|
|
@@ -174,7 +181,7 @@ function ChartTooltipContent({
|
|
|
174
181
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
175
182
|
"div",
|
|
176
183
|
{
|
|
177
|
-
className:
|
|
184
|
+
className: chunkD5LKWKG7_js.cn(
|
|
178
185
|
"flex flex-1 justify-between leading-none",
|
|
179
186
|
nestLabel ? "items-end" : "items-center"
|
|
180
187
|
),
|
|
@@ -211,7 +218,7 @@ function ChartLegendContent({
|
|
|
211
218
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
212
219
|
"div",
|
|
213
220
|
{
|
|
214
|
-
className:
|
|
221
|
+
className: chunkD5LKWKG7_js.cn(
|
|
215
222
|
"flex items-center justify-center gap-4",
|
|
216
223
|
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
217
224
|
className
|
|
@@ -222,7 +229,7 @@ function ChartLegendContent({
|
|
|
222
229
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
223
230
|
"div",
|
|
224
231
|
{
|
|
225
|
-
className:
|
|
232
|
+
className: chunkD5LKWKG7_js.cn(
|
|
226
233
|
"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"
|
|
227
234
|
),
|
|
228
235
|
children: [
|
package/dist/entries/chart.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from '../chunk-
|
|
2
|
+
import { useSaasflareProps, cn } from '../chunk-WRONFPRI.mjs';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as RechartsPrimitive from 'recharts';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -18,13 +18,20 @@ function ChartContainer({
|
|
|
18
18
|
className,
|
|
19
19
|
children,
|
|
20
20
|
config,
|
|
21
|
+
surface,
|
|
22
|
+
radius,
|
|
23
|
+
animated,
|
|
21
24
|
...props
|
|
22
25
|
}) {
|
|
26
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
23
27
|
const uniqueId = React.useId();
|
|
24
28
|
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
25
29
|
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
26
30
|
"div",
|
|
27
31
|
{
|
|
32
|
+
"data-surface": sf.surface,
|
|
33
|
+
"data-radius": sf.radius,
|
|
34
|
+
"data-animated": String(sf.animated),
|
|
28
35
|
"data-slot": "chart",
|
|
29
36
|
"data-chart": chartId,
|
|
30
37
|
className: cn(
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Command as Command$1 } from 'cmdk';
|
|
4
|
-
import {
|
|
4
|
+
import { c as SaasflareComponentProps } from '../use-saasflare-props-NrM2Glmp.mjs';
|
|
5
|
+
import { D as Dialog } from '../dialog-CcaHMAsS.mjs';
|
|
5
6
|
import '@radix-ui/react-dialog';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
interface CommandProps extends Omit<React.ComponentProps<typeof Command$1>, keyof SaasflareComponentProps>, SaasflareComponentProps {
|
|
9
|
+
}
|
|
10
|
+
declare function Command({ className, surface, radius, animated, ...props }: CommandProps): react_jsx_runtime.JSX.Element;
|
|
8
11
|
declare function CommandDialog({ title, description, children, className, ...props }: React.ComponentProps<typeof Dialog> & {
|
|
9
12
|
title?: string;
|
|
10
13
|
description?: string;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Command as Command$1 } from 'cmdk';
|
|
4
|
-
import {
|
|
4
|
+
import { c as SaasflareComponentProps } from '../use-saasflare-props-NrM2Glmp.js';
|
|
5
|
+
import { D as Dialog } from '../dialog-BmY55WSX.js';
|
|
5
6
|
import '@radix-ui/react-dialog';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
interface CommandProps extends Omit<React.ComponentProps<typeof Command$1>, keyof SaasflareComponentProps>, SaasflareComponentProps {
|
|
9
|
+
}
|
|
10
|
+
declare function Command({ className, surface, radius, animated, ...props }: CommandProps): react_jsx_runtime.JSX.Element;
|
|
8
11
|
declare function CommandDialog({ title, description, children, className, ...props }: React.ComponentProps<typeof Dialog> & {
|
|
9
12
|
title?: string;
|
|
10
13
|
description?: string;
|