@saasflare/ui 3.1.1 → 3.2.0
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/README.md +68 -2
- package/dist/{button-0Bdl7Nqm.d.ts → button-BA7OcXqy.d.mts} +12 -17
- package/dist/{button-Brb4BhPO.d.mts → button-Bfg2Tnvx.d.ts} +12 -17
- package/dist/{chunk-D5LKWKG7.js → chunk-2GOPD64T.js} +117 -89
- package/dist/{chunk-WPOOC2FX.mjs → chunk-2ONA6OMO.mjs} +33 -44
- package/dist/{chunk-RW2S3KNB.mjs → chunk-5C65JNGY.mjs} +7 -6
- package/dist/{chunk-DNLCSV5M.js → chunk-7UD3SGPP.js} +32 -43
- package/dist/chunk-GI6VN7XU.mjs +2143 -0
- package/dist/{chunk-FT66KYRN.js → chunk-ITALEYDI.js} +2 -2
- package/dist/{chunk-4BOMMZEY.js → chunk-JC7EIEGI.js} +14 -13
- package/dist/chunk-N65HIOBD.js +234 -0
- package/dist/{chunk-EJHYM2HP.mjs → chunk-OZAWULTM.mjs} +1 -1
- package/dist/chunk-R3AVBLJ3.js +2207 -0
- package/dist/{chunk-WRONFPRI.mjs → chunk-RMQBB72G.mjs} +118 -91
- package/dist/chunk-XNDTCYSO.mjs +211 -0
- package/dist/{dialog-BmY55WSX.d.ts → dialog-CZRwrqDa.d.ts} +2 -2
- package/dist/{dialog-CcaHMAsS.d.mts → dialog-Cr0becOL.d.mts} +2 -2
- package/dist/entries/calendar.d.mts +3 -3
- package/dist/entries/calendar.d.ts +3 -3
- package/dist/entries/calendar.js +13 -214
- package/dist/entries/calendar.mjs +5 -196
- package/dist/entries/carousel.d.mts +3 -3
- package/dist/entries/carousel.d.ts +3 -3
- package/dist/entries/carousel.js +17 -14
- package/dist/entries/carousel.mjs +10 -7
- package/dist/entries/chart.d.mts +1 -1
- package/dist/entries/chart.d.ts +1 -1
- package/dist/entries/chart.js +11 -11
- package/dist/entries/chart.mjs +1 -1
- package/dist/entries/command.d.mts +3 -3
- package/dist/entries/command.d.ts +3 -3
- package/dist/entries/command.js +21 -19
- package/dist/entries/command.mjs +8 -6
- package/dist/entries/drawer.d.mts +1 -1
- package/dist/entries/drawer.d.ts +1 -1
- package/dist/entries/drawer.js +9 -9
- package/dist/entries/drawer.mjs +2 -2
- package/dist/entries/input-otp.d.mts +2 -2
- package/dist/entries/input-otp.d.ts +2 -2
- package/dist/entries/input-otp.js +10 -8
- package/dist/entries/input-otp.mjs +6 -4
- package/dist/entries/resizable.d.mts +3 -2
- package/dist/entries/resizable.d.ts +3 -2
- package/dist/entries/resizable.js +8 -6
- package/dist/entries/resizable.mjs +6 -4
- package/dist/index.d.mts +974 -31
- package/dist/index.d.ts +974 -31
- package/dist/index.js +2994 -556
- package/dist/index.mjs +2488 -201
- package/dist/{use-saasflare-props-NrM2Glmp.d.ts → use-saasflare-props-BrjMhU0U.d.mts} +53 -4
- package/dist/{use-saasflare-props-NrM2Glmp.d.mts → use-saasflare-props-BrjMhU0U.d.ts} +53 -4
- package/package.json +4 -3
- package/styles/aurora.css +47 -0
- package/styles/palettes.css +487 -3
- package/styles/surfaces.css +89 -10
- package/styles/theme.css +41 -19
package/dist/entries/calendar.js
CHANGED
|
@@ -1,219 +1,18 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
'use strict';
|
|
3
2
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var reactDayPicker = require('react-day-picker');
|
|
10
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
3
|
+
var chunkN65HIOBD_js = require('../chunk-N65HIOBD.js');
|
|
4
|
+
require('../chunk-7UD3SGPP.js');
|
|
5
|
+
require('../chunk-ITALEYDI.js');
|
|
6
|
+
require('../chunk-R3AVBLJ3.js');
|
|
7
|
+
require('../chunk-2GOPD64T.js');
|
|
11
8
|
|
|
12
|
-
function _interopNamespace(e) {
|
|
13
|
-
if (e && e.__esModule) return e;
|
|
14
|
-
var n = Object.create(null);
|
|
15
|
-
if (e) {
|
|
16
|
-
Object.keys(e).forEach(function (k) {
|
|
17
|
-
if (k !== 'default') {
|
|
18
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
19
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () { return e[k]; }
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
n.default = e;
|
|
27
|
-
return Object.freeze(n);
|
|
28
|
-
}
|
|
29
9
|
|
|
30
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
31
10
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
surface,
|
|
41
|
-
radius,
|
|
42
|
-
animated,
|
|
43
|
-
...props
|
|
44
|
-
}) {
|
|
45
|
-
const sf = chunkD5LKWKG7_js.useSaasflareProps({ surface, radius, animated });
|
|
46
|
-
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
47
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
48
|
-
reactDayPicker.DayPicker,
|
|
49
|
-
{
|
|
50
|
-
"data-slot": "calendar",
|
|
51
|
-
"data-surface": sf.surface,
|
|
52
|
-
"data-radius": sf.radius,
|
|
53
|
-
"data-animated": String(sf.animated),
|
|
54
|
-
showOutsideDays,
|
|
55
|
-
className: chunkD5LKWKG7_js.cn(
|
|
56
|
-
"group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
57
|
-
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
58
|
-
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
59
|
-
className
|
|
60
|
-
),
|
|
61
|
-
captionLayout,
|
|
62
|
-
formatters: {
|
|
63
|
-
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
|
|
64
|
-
...formatters
|
|
65
|
-
},
|
|
66
|
-
classNames: {
|
|
67
|
-
root: chunkD5LKWKG7_js.cn("w-fit", defaultClassNames.root),
|
|
68
|
-
months: chunkD5LKWKG7_js.cn(
|
|
69
|
-
"relative flex flex-col gap-4 md:flex-row",
|
|
70
|
-
defaultClassNames.months
|
|
71
|
-
),
|
|
72
|
-
month: chunkD5LKWKG7_js.cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
73
|
-
nav: chunkD5LKWKG7_js.cn(
|
|
74
|
-
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
75
|
-
defaultClassNames.nav
|
|
76
|
-
),
|
|
77
|
-
button_previous: chunkD5LKWKG7_js.cn(
|
|
78
|
-
chunkDNLCSV5M_js.buttonVariants({ variant: buttonVariant }),
|
|
79
|
-
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
80
|
-
defaultClassNames.button_previous
|
|
81
|
-
),
|
|
82
|
-
button_next: chunkD5LKWKG7_js.cn(
|
|
83
|
-
chunkDNLCSV5M_js.buttonVariants({ variant: buttonVariant }),
|
|
84
|
-
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
85
|
-
defaultClassNames.button_next
|
|
86
|
-
),
|
|
87
|
-
month_caption: chunkD5LKWKG7_js.cn(
|
|
88
|
-
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
|
|
89
|
-
defaultClassNames.month_caption
|
|
90
|
-
),
|
|
91
|
-
dropdowns: chunkD5LKWKG7_js.cn(
|
|
92
|
-
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
93
|
-
defaultClassNames.dropdowns
|
|
94
|
-
),
|
|
95
|
-
dropdown_root: chunkD5LKWKG7_js.cn(
|
|
96
|
-
"relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",
|
|
97
|
-
defaultClassNames.dropdown_root
|
|
98
|
-
),
|
|
99
|
-
dropdown: chunkD5LKWKG7_js.cn(
|
|
100
|
-
"absolute inset-0 bg-popover opacity-0",
|
|
101
|
-
defaultClassNames.dropdown
|
|
102
|
-
),
|
|
103
|
-
caption_label: chunkD5LKWKG7_js.cn(
|
|
104
|
-
"font-medium select-none",
|
|
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",
|
|
106
|
-
defaultClassNames.caption_label
|
|
107
|
-
),
|
|
108
|
-
table: "w-full border-collapse",
|
|
109
|
-
weekdays: chunkD5LKWKG7_js.cn("flex", defaultClassNames.weekdays),
|
|
110
|
-
weekday: chunkD5LKWKG7_js.cn(
|
|
111
|
-
"flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none",
|
|
112
|
-
defaultClassNames.weekday
|
|
113
|
-
),
|
|
114
|
-
week: chunkD5LKWKG7_js.cn("mt-2 flex w-full", defaultClassNames.week),
|
|
115
|
-
week_number_header: chunkD5LKWKG7_js.cn(
|
|
116
|
-
"w-(--cell-size) select-none",
|
|
117
|
-
defaultClassNames.week_number_header
|
|
118
|
-
),
|
|
119
|
-
week_number: chunkD5LKWKG7_js.cn(
|
|
120
|
-
"text-[0.8rem] text-muted-foreground select-none",
|
|
121
|
-
defaultClassNames.week_number
|
|
122
|
-
),
|
|
123
|
-
day: chunkD5LKWKG7_js.cn(
|
|
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",
|
|
125
|
-
props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md",
|
|
126
|
-
defaultClassNames.day
|
|
127
|
-
),
|
|
128
|
-
range_start: chunkD5LKWKG7_js.cn(
|
|
129
|
-
"rounded-l-md bg-accent",
|
|
130
|
-
defaultClassNames.range_start
|
|
131
|
-
),
|
|
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(
|
|
135
|
-
"rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none",
|
|
136
|
-
defaultClassNames.today
|
|
137
|
-
),
|
|
138
|
-
outside: chunkD5LKWKG7_js.cn(
|
|
139
|
-
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
140
|
-
defaultClassNames.outside
|
|
141
|
-
),
|
|
142
|
-
disabled: chunkD5LKWKG7_js.cn(
|
|
143
|
-
"text-muted-foreground opacity-50",
|
|
144
|
-
defaultClassNames.disabled
|
|
145
|
-
),
|
|
146
|
-
hidden: chunkD5LKWKG7_js.cn("invisible", defaultClassNames.hidden),
|
|
147
|
-
...classNames
|
|
148
|
-
},
|
|
149
|
-
components: {
|
|
150
|
-
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
151
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
152
|
-
"div",
|
|
153
|
-
{
|
|
154
|
-
"data-slot": "calendar",
|
|
155
|
-
ref: rootRef,
|
|
156
|
-
className: chunkD5LKWKG7_js.cn(className2),
|
|
157
|
-
...props2
|
|
158
|
-
}
|
|
159
|
-
);
|
|
160
|
-
},
|
|
161
|
-
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
162
|
-
if (orientation === "left") {
|
|
163
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, { className: chunkD5LKWKG7_js.cn("size-4", className2), ...props2 });
|
|
164
|
-
}
|
|
165
|
-
if (orientation === "right") {
|
|
166
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
167
|
-
lucideReact.ChevronRightIcon,
|
|
168
|
-
{
|
|
169
|
-
className: chunkD5LKWKG7_js.cn("size-4", className2),
|
|
170
|
-
...props2
|
|
171
|
-
}
|
|
172
|
-
);
|
|
173
|
-
}
|
|
174
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: chunkD5LKWKG7_js.cn("size-4", className2), ...props2 });
|
|
175
|
-
},
|
|
176
|
-
DayButton: CalendarDayButton,
|
|
177
|
-
WeekNumber: ({ children, ...props2 }) => {
|
|
178
|
-
return /* @__PURE__ */ jsxRuntime.jsx("td", { ...props2, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
179
|
-
},
|
|
180
|
-
...components
|
|
181
|
-
},
|
|
182
|
-
...props
|
|
183
|
-
}
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
function CalendarDayButton({
|
|
187
|
-
className,
|
|
188
|
-
day,
|
|
189
|
-
modifiers,
|
|
190
|
-
...props
|
|
191
|
-
}) {
|
|
192
|
-
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
193
|
-
const ref = React__namespace.useRef(null);
|
|
194
|
-
React__namespace.useEffect(() => {
|
|
195
|
-
if (modifiers.focused) ref.current?.focus();
|
|
196
|
-
}, [modifiers.focused]);
|
|
197
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
198
|
-
chunkDNLCSV5M_js.Button,
|
|
199
|
-
{
|
|
200
|
-
ref,
|
|
201
|
-
variant: "ghost",
|
|
202
|
-
size: "icon",
|
|
203
|
-
"data-day": day.date.toLocaleDateString(),
|
|
204
|
-
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
205
|
-
"data-range-start": modifiers.range_start,
|
|
206
|
-
"data-range-end": modifiers.range_end,
|
|
207
|
-
"data-range-middle": modifiers.range_middle,
|
|
208
|
-
className: chunkD5LKWKG7_js.cn(
|
|
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",
|
|
210
|
-
defaultClassNames.day,
|
|
211
|
-
className
|
|
212
|
-
),
|
|
213
|
-
...props
|
|
214
|
-
}
|
|
215
|
-
);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
exports.Calendar = Calendar;
|
|
219
|
-
exports.CalendarDayButton = CalendarDayButton;
|
|
11
|
+
Object.defineProperty(exports, "Calendar", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkN65HIOBD_js.Calendar; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "CalendarDayButton", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkN65HIOBD_js.CalendarDayButton; }
|
|
18
|
+
});
|
|
@@ -1,196 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon } from 'lucide-react';
|
|
7
|
-
import { getDefaultClassNames, DayPicker } from 'react-day-picker';
|
|
8
|
-
import { jsx } from 'react/jsx-runtime';
|
|
9
|
-
|
|
10
|
-
function Calendar({
|
|
11
|
-
className,
|
|
12
|
-
classNames,
|
|
13
|
-
showOutsideDays = true,
|
|
14
|
-
captionLayout = "label",
|
|
15
|
-
buttonVariant = "ghost",
|
|
16
|
-
formatters,
|
|
17
|
-
components,
|
|
18
|
-
surface,
|
|
19
|
-
radius,
|
|
20
|
-
animated,
|
|
21
|
-
...props
|
|
22
|
-
}) {
|
|
23
|
-
const sf = useSaasflareProps({ surface, radius, animated });
|
|
24
|
-
const defaultClassNames = getDefaultClassNames();
|
|
25
|
-
return /* @__PURE__ */ jsx(
|
|
26
|
-
DayPicker,
|
|
27
|
-
{
|
|
28
|
-
"data-slot": "calendar",
|
|
29
|
-
"data-surface": sf.surface,
|
|
30
|
-
"data-radius": sf.radius,
|
|
31
|
-
"data-animated": String(sf.animated),
|
|
32
|
-
showOutsideDays,
|
|
33
|
-
className: cn(
|
|
34
|
-
"group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
35
|
-
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
36
|
-
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
37
|
-
className
|
|
38
|
-
),
|
|
39
|
-
captionLayout,
|
|
40
|
-
formatters: {
|
|
41
|
-
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
|
|
42
|
-
...formatters
|
|
43
|
-
},
|
|
44
|
-
classNames: {
|
|
45
|
-
root: cn("w-fit", defaultClassNames.root),
|
|
46
|
-
months: cn(
|
|
47
|
-
"relative flex flex-col gap-4 md:flex-row",
|
|
48
|
-
defaultClassNames.months
|
|
49
|
-
),
|
|
50
|
-
month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
51
|
-
nav: cn(
|
|
52
|
-
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
53
|
-
defaultClassNames.nav
|
|
54
|
-
),
|
|
55
|
-
button_previous: cn(
|
|
56
|
-
buttonVariants({ variant: buttonVariant }),
|
|
57
|
-
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
58
|
-
defaultClassNames.button_previous
|
|
59
|
-
),
|
|
60
|
-
button_next: cn(
|
|
61
|
-
buttonVariants({ variant: buttonVariant }),
|
|
62
|
-
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
63
|
-
defaultClassNames.button_next
|
|
64
|
-
),
|
|
65
|
-
month_caption: cn(
|
|
66
|
-
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
|
|
67
|
-
defaultClassNames.month_caption
|
|
68
|
-
),
|
|
69
|
-
dropdowns: cn(
|
|
70
|
-
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
71
|
-
defaultClassNames.dropdowns
|
|
72
|
-
),
|
|
73
|
-
dropdown_root: cn(
|
|
74
|
-
"relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",
|
|
75
|
-
defaultClassNames.dropdown_root
|
|
76
|
-
),
|
|
77
|
-
dropdown: cn(
|
|
78
|
-
"absolute inset-0 bg-popover opacity-0",
|
|
79
|
-
defaultClassNames.dropdown
|
|
80
|
-
),
|
|
81
|
-
caption_label: cn(
|
|
82
|
-
"font-medium select-none",
|
|
83
|
-
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",
|
|
84
|
-
defaultClassNames.caption_label
|
|
85
|
-
),
|
|
86
|
-
table: "w-full border-collapse",
|
|
87
|
-
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
88
|
-
weekday: cn(
|
|
89
|
-
"flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none",
|
|
90
|
-
defaultClassNames.weekday
|
|
91
|
-
),
|
|
92
|
-
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
93
|
-
week_number_header: cn(
|
|
94
|
-
"w-(--cell-size) select-none",
|
|
95
|
-
defaultClassNames.week_number_header
|
|
96
|
-
),
|
|
97
|
-
week_number: cn(
|
|
98
|
-
"text-[0.8rem] text-muted-foreground select-none",
|
|
99
|
-
defaultClassNames.week_number
|
|
100
|
-
),
|
|
101
|
-
day: cn(
|
|
102
|
-
"group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md",
|
|
103
|
-
props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md",
|
|
104
|
-
defaultClassNames.day
|
|
105
|
-
),
|
|
106
|
-
range_start: cn(
|
|
107
|
-
"rounded-l-md bg-accent",
|
|
108
|
-
defaultClassNames.range_start
|
|
109
|
-
),
|
|
110
|
-
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
111
|
-
range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
|
|
112
|
-
today: cn(
|
|
113
|
-
"rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none",
|
|
114
|
-
defaultClassNames.today
|
|
115
|
-
),
|
|
116
|
-
outside: cn(
|
|
117
|
-
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
118
|
-
defaultClassNames.outside
|
|
119
|
-
),
|
|
120
|
-
disabled: cn(
|
|
121
|
-
"text-muted-foreground opacity-50",
|
|
122
|
-
defaultClassNames.disabled
|
|
123
|
-
),
|
|
124
|
-
hidden: cn("invisible", defaultClassNames.hidden),
|
|
125
|
-
...classNames
|
|
126
|
-
},
|
|
127
|
-
components: {
|
|
128
|
-
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
129
|
-
return /* @__PURE__ */ jsx(
|
|
130
|
-
"div",
|
|
131
|
-
{
|
|
132
|
-
"data-slot": "calendar",
|
|
133
|
-
ref: rootRef,
|
|
134
|
-
className: cn(className2),
|
|
135
|
-
...props2
|
|
136
|
-
}
|
|
137
|
-
);
|
|
138
|
-
},
|
|
139
|
-
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
140
|
-
if (orientation === "left") {
|
|
141
|
-
return /* @__PURE__ */ jsx(ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
|
|
142
|
-
}
|
|
143
|
-
if (orientation === "right") {
|
|
144
|
-
return /* @__PURE__ */ jsx(
|
|
145
|
-
ChevronRightIcon,
|
|
146
|
-
{
|
|
147
|
-
className: cn("size-4", className2),
|
|
148
|
-
...props2
|
|
149
|
-
}
|
|
150
|
-
);
|
|
151
|
-
}
|
|
152
|
-
return /* @__PURE__ */ jsx(ChevronDownIcon, { className: cn("size-4", className2), ...props2 });
|
|
153
|
-
},
|
|
154
|
-
DayButton: CalendarDayButton,
|
|
155
|
-
WeekNumber: ({ children, ...props2 }) => {
|
|
156
|
-
return /* @__PURE__ */ jsx("td", { ...props2, children: /* @__PURE__ */ jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
157
|
-
},
|
|
158
|
-
...components
|
|
159
|
-
},
|
|
160
|
-
...props
|
|
161
|
-
}
|
|
162
|
-
);
|
|
163
|
-
}
|
|
164
|
-
function CalendarDayButton({
|
|
165
|
-
className,
|
|
166
|
-
day,
|
|
167
|
-
modifiers,
|
|
168
|
-
...props
|
|
169
|
-
}) {
|
|
170
|
-
const defaultClassNames = getDefaultClassNames();
|
|
171
|
-
const ref = React.useRef(null);
|
|
172
|
-
React.useEffect(() => {
|
|
173
|
-
if (modifiers.focused) ref.current?.focus();
|
|
174
|
-
}, [modifiers.focused]);
|
|
175
|
-
return /* @__PURE__ */ jsx(
|
|
176
|
-
Button,
|
|
177
|
-
{
|
|
178
|
-
ref,
|
|
179
|
-
variant: "ghost",
|
|
180
|
-
size: "icon",
|
|
181
|
-
"data-day": day.date.toLocaleDateString(),
|
|
182
|
-
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
183
|
-
"data-range-start": modifiers.range_start,
|
|
184
|
-
"data-range-end": modifiers.range_end,
|
|
185
|
-
"data-range-middle": modifiers.range_middle,
|
|
186
|
-
className: cn(
|
|
187
|
-
"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",
|
|
188
|
-
defaultClassNames.day,
|
|
189
|
-
className
|
|
190
|
-
),
|
|
191
|
-
...props
|
|
192
|
-
}
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
export { Calendar, CalendarDayButton };
|
|
1
|
+
export { Calendar, CalendarDayButton } from '../chunk-XNDTCYSO.mjs';
|
|
2
|
+
import '../chunk-2ONA6OMO.mjs';
|
|
3
|
+
import '../chunk-OZAWULTM.mjs';
|
|
4
|
+
import '../chunk-GI6VN7XU.mjs';
|
|
5
|
+
import '../chunk-RMQBB72G.mjs';
|
|
@@ -1,8 +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 {
|
|
5
|
-
import { B as Button } from '../button-
|
|
4
|
+
import { d as SaasflareComponentProps } from '../use-saasflare-props-BrjMhU0U.mjs';
|
|
5
|
+
import { B as Button } from '../button-BA7OcXqy.mjs';
|
|
6
6
|
import 'class-variance-authority/types';
|
|
7
7
|
import 'class-variance-authority';
|
|
8
8
|
|
|
@@ -16,7 +16,7 @@ type CarouselProps = SaasflareComponentProps & {
|
|
|
16
16
|
orientation?: "horizontal" | "vertical";
|
|
17
17
|
setApi?: (api: CarouselApi) => void;
|
|
18
18
|
};
|
|
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
|
+
declare function Carousel({ orientation, opts, setApi, plugins, className, children, surface, radius, animated, iconWeight, ...props }: Omit<React.ComponentProps<"div">, keyof SaasflareComponentProps> & CarouselProps): react_jsx_runtime.JSX.Element;
|
|
20
20
|
declare function CarouselContent({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
21
21
|
declare function CarouselItem({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
22
22
|
declare function CarouselPrevious({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
|
|
@@ -1,8 +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 {
|
|
5
|
-
import { B as Button } from '../button-
|
|
4
|
+
import { d as SaasflareComponentProps } from '../use-saasflare-props-BrjMhU0U.js';
|
|
5
|
+
import { B as Button } from '../button-Bfg2Tnvx.js';
|
|
6
6
|
import 'class-variance-authority/types';
|
|
7
7
|
import 'class-variance-authority';
|
|
8
8
|
|
|
@@ -16,7 +16,7 @@ type CarouselProps = SaasflareComponentProps & {
|
|
|
16
16
|
orientation?: "horizontal" | "vertical";
|
|
17
17
|
setApi?: (api: CarouselApi) => void;
|
|
18
18
|
};
|
|
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
|
+
declare function Carousel({ orientation, opts, setApi, plugins, className, children, surface, radius, animated, iconWeight, ...props }: Omit<React.ComponentProps<"div">, keyof SaasflareComponentProps> & CarouselProps): react_jsx_runtime.JSX.Element;
|
|
20
20
|
declare function CarouselContent({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
21
21
|
declare function CarouselItem({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
22
22
|
declare function CarouselPrevious({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
|
package/dist/entries/carousel.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
6
|
-
var
|
|
4
|
+
var chunk7UD3SGPP_js = require('../chunk-7UD3SGPP.js');
|
|
5
|
+
require('../chunk-ITALEYDI.js');
|
|
6
|
+
var chunkR3AVBLJ3_js = require('../chunk-R3AVBLJ3.js');
|
|
7
|
+
var chunk2GOPD64T_js = require('../chunk-2GOPD64T.js');
|
|
7
8
|
var React = require('react');
|
|
8
9
|
var useEmblaCarousel = require('embla-carousel-react');
|
|
9
|
-
var lucideReact = require('lucide-react');
|
|
10
10
|
var jsxRuntime = require('react/jsx-runtime');
|
|
11
11
|
|
|
12
12
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -50,9 +50,10 @@ function Carousel({
|
|
|
50
50
|
surface,
|
|
51
51
|
radius,
|
|
52
52
|
animated,
|
|
53
|
+
iconWeight,
|
|
53
54
|
...props
|
|
54
55
|
}) {
|
|
55
|
-
const sf =
|
|
56
|
+
const sf = chunk2GOPD64T_js.useSaasflareProps({ surface, radius, animated, iconWeight });
|
|
56
57
|
const [carouselRef, api] = useEmblaCarousel__default.default(
|
|
57
58
|
{
|
|
58
59
|
...opts,
|
|
@@ -116,7 +117,7 @@ function Carousel({
|
|
|
116
117
|
{
|
|
117
118
|
...props,
|
|
118
119
|
onKeyDownCapture: handleKeyDown,
|
|
119
|
-
className:
|
|
120
|
+
className: chunk2GOPD64T_js.cn("relative", className),
|
|
120
121
|
role: "region",
|
|
121
122
|
"aria-roledescription": "carousel",
|
|
122
123
|
"data-slot": "carousel",
|
|
@@ -140,7 +141,7 @@ function CarouselContent({ className, ...props }) {
|
|
|
140
141
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
141
142
|
"div",
|
|
142
143
|
{
|
|
143
|
-
className:
|
|
144
|
+
className: chunk2GOPD64T_js.cn(
|
|
144
145
|
"flex",
|
|
145
146
|
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
146
147
|
className
|
|
@@ -159,7 +160,7 @@ function CarouselItem({ className, ...props }) {
|
|
|
159
160
|
role: "group",
|
|
160
161
|
"aria-roledescription": "slide",
|
|
161
162
|
"data-slot": "carousel-item",
|
|
162
|
-
className:
|
|
163
|
+
className: chunk2GOPD64T_js.cn(
|
|
163
164
|
"min-w-0 shrink-0 grow-0 basis-full",
|
|
164
165
|
orientation === "horizontal" ? "pl-4" : "pt-4",
|
|
165
166
|
className
|
|
@@ -174,14 +175,15 @@ function CarouselPrevious({
|
|
|
174
175
|
size = "icon",
|
|
175
176
|
...props
|
|
176
177
|
}) {
|
|
178
|
+
const sf = chunk2GOPD64T_js.useSaasflareProps();
|
|
177
179
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
178
180
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
179
|
-
|
|
181
|
+
chunk7UD3SGPP_js.Button,
|
|
180
182
|
{
|
|
181
183
|
"data-slot": "carousel-previous",
|
|
182
184
|
variant,
|
|
183
185
|
size,
|
|
184
|
-
className:
|
|
186
|
+
className: chunk2GOPD64T_js.cn(
|
|
185
187
|
"absolute size-8 rounded-full",
|
|
186
188
|
orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
187
189
|
className
|
|
@@ -190,7 +192,7 @@ function CarouselPrevious({
|
|
|
190
192
|
onClick: scrollPrev,
|
|
191
193
|
...props,
|
|
192
194
|
children: [
|
|
193
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
195
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkR3AVBLJ3_js.ArrowLeftIcon, { weight: sf.iconWeight }),
|
|
194
196
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Previous slide" })
|
|
195
197
|
]
|
|
196
198
|
}
|
|
@@ -202,14 +204,15 @@ function CarouselNext({
|
|
|
202
204
|
size = "icon",
|
|
203
205
|
...props
|
|
204
206
|
}) {
|
|
207
|
+
const sf = chunk2GOPD64T_js.useSaasflareProps();
|
|
205
208
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
206
209
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
207
|
-
|
|
210
|
+
chunk7UD3SGPP_js.Button,
|
|
208
211
|
{
|
|
209
212
|
"data-slot": "carousel-next",
|
|
210
213
|
variant,
|
|
211
214
|
size,
|
|
212
|
-
className:
|
|
215
|
+
className: chunk2GOPD64T_js.cn(
|
|
213
216
|
"absolute size-8 rounded-full",
|
|
214
217
|
orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
215
218
|
className
|
|
@@ -218,7 +221,7 @@ function CarouselNext({
|
|
|
218
221
|
onClick: scrollNext,
|
|
219
222
|
...props,
|
|
220
223
|
children: [
|
|
221
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
224
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkR3AVBLJ3_js.ArrowRightIcon, { weight: sf.iconWeight }),
|
|
222
225
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Next slide" })
|
|
223
226
|
]
|
|
224
227
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Button } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import {
|
|
2
|
+
import { Button } from '../chunk-2ONA6OMO.mjs';
|
|
3
|
+
import '../chunk-OZAWULTM.mjs';
|
|
4
|
+
import { ArrowLeftIcon, ArrowRightIcon } from '../chunk-GI6VN7XU.mjs';
|
|
5
|
+
import { useSaasflareProps, cn } from '../chunk-RMQBB72G.mjs';
|
|
5
6
|
import * as React from 'react';
|
|
6
7
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
7
|
-
import { ArrowLeft, ArrowRight } from 'lucide-react';
|
|
8
8
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
10
|
var CarouselContext = React.createContext(null);
|
|
@@ -25,9 +25,10 @@ function Carousel({
|
|
|
25
25
|
surface,
|
|
26
26
|
radius,
|
|
27
27
|
animated,
|
|
28
|
+
iconWeight,
|
|
28
29
|
...props
|
|
29
30
|
}) {
|
|
30
|
-
const sf = useSaasflareProps({ surface, radius, animated });
|
|
31
|
+
const sf = useSaasflareProps({ surface, radius, animated, iconWeight });
|
|
31
32
|
const [carouselRef, api] = useEmblaCarousel(
|
|
32
33
|
{
|
|
33
34
|
...opts,
|
|
@@ -149,6 +150,7 @@ function CarouselPrevious({
|
|
|
149
150
|
size = "icon",
|
|
150
151
|
...props
|
|
151
152
|
}) {
|
|
153
|
+
const sf = useSaasflareProps();
|
|
152
154
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
153
155
|
return /* @__PURE__ */ jsxs(
|
|
154
156
|
Button,
|
|
@@ -165,7 +167,7 @@ function CarouselPrevious({
|
|
|
165
167
|
onClick: scrollPrev,
|
|
166
168
|
...props,
|
|
167
169
|
children: [
|
|
168
|
-
/* @__PURE__ */ jsx(
|
|
170
|
+
/* @__PURE__ */ jsx(ArrowLeftIcon, { weight: sf.iconWeight }),
|
|
169
171
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous slide" })
|
|
170
172
|
]
|
|
171
173
|
}
|
|
@@ -177,6 +179,7 @@ function CarouselNext({
|
|
|
177
179
|
size = "icon",
|
|
178
180
|
...props
|
|
179
181
|
}) {
|
|
182
|
+
const sf = useSaasflareProps();
|
|
180
183
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
181
184
|
return /* @__PURE__ */ jsxs(
|
|
182
185
|
Button,
|
|
@@ -193,7 +196,7 @@ function CarouselNext({
|
|
|
193
196
|
onClick: scrollNext,
|
|
194
197
|
...props,
|
|
195
198
|
children: [
|
|
196
|
-
/* @__PURE__ */ jsx(
|
|
199
|
+
/* @__PURE__ */ jsx(ArrowRightIcon, { weight: sf.iconWeight }),
|
|
197
200
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next slide" })
|
|
198
201
|
]
|
|
199
202
|
}
|
package/dist/entries/chart.d.mts
CHANGED
|
@@ -1,7 +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 {
|
|
4
|
+
import { d as SaasflareComponentProps } from '../use-saasflare-props-BrjMhU0U.mjs';
|
|
5
5
|
|
|
6
6
|
declare const THEMES: {
|
|
7
7
|
readonly light: "";
|
package/dist/entries/chart.d.ts
CHANGED
|
@@ -1,7 +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 {
|
|
4
|
+
import { d as SaasflareComponentProps } from '../use-saasflare-props-BrjMhU0U.js';
|
|
5
5
|
|
|
6
6
|
declare const THEMES: {
|
|
7
7
|
readonly light: "";
|