@saasflare/ui 2.0.0 → 3.0.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/README.md +85 -45
- package/dist/{button-B2DR7obe.d.mts → button-DUQJ0X7e.d.mts} +0 -23
- package/dist/{button-B2DR7obe.d.ts → button-DUQJ0X7e.d.ts} +0 -23
- package/dist/chunk-7UGPCRZ6.mjs +130 -0
- package/dist/chunk-CWW36RYE.js +59 -0
- package/dist/chunk-JOVJRQO3.js +0 -1
- package/dist/{chunk-TU6BBAA7.js → chunk-OYH6LQWR.js} +33 -65
- package/dist/{chunk-OT4ZNLTB.mjs → chunk-QWLQV6FS.mjs} +2 -24
- package/dist/chunk-S26666D6.mjs +0 -1
- package/dist/chunk-VQQ6MF5I.js +161 -0
- package/dist/chunk-W53NTFPB.mjs +28 -0
- package/dist/dialog-CwyBJeNl.d.mts +22 -0
- package/dist/dialog-CwyBJeNl.d.ts +22 -0
- package/dist/entries/calendar.d.mts +13 -0
- package/dist/entries/calendar.d.ts +13 -0
- package/dist/entries/calendar.js +211 -0
- package/dist/entries/calendar.mjs +188 -0
- package/dist/entries/carousel.d.mts +1 -1
- package/dist/entries/carousel.d.ts +1 -1
- package/dist/entries/carousel.js +4 -3
- package/dist/entries/carousel.mjs +2 -1
- package/dist/entries/command.d.mts +21 -0
- package/dist/entries/command.d.ts +21 -0
- package/dist/entries/command.js +172 -0
- package/dist/entries/command.mjs +162 -0
- package/dist/entries/drawer.d.mts +16 -0
- package/dist/entries/drawer.d.ts +16 -0
- package/dist/entries/drawer.js +124 -0
- package/dist/entries/drawer.mjs +113 -0
- package/dist/entries/input-otp.d.mts +14 -0
- package/dist/entries/input-otp.d.ts +14 -0
- package/dist/entries/input-otp.js +89 -0
- package/dist/entries/input-otp.mjs +64 -0
- package/dist/entries/resizable.d.mts +10 -0
- package/dist/entries/resizable.d.ts +10 -0
- package/dist/entries/resizable.js +69 -0
- package/dist/entries/resizable.mjs +45 -0
- package/dist/index.d.mts +12 -103
- package/dist/index.d.ts +12 -103
- package/dist/index.js +1265 -832
- package/dist/index.mjs +1172 -740
- package/package.json +36 -12
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var chunkOYH6LQWR_js = require('../chunk-OYH6LQWR.js');
|
|
5
|
+
require('../chunk-CWW36RYE.js');
|
|
6
|
+
var chunkJOVJRQO3_js = require('../chunk-JOVJRQO3.js');
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var lucideReact = require('lucide-react');
|
|
9
|
+
var reactDayPicker = require('react-day-picker');
|
|
10
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
11
|
+
|
|
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
|
+
|
|
30
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
31
|
+
|
|
32
|
+
function Calendar({
|
|
33
|
+
className,
|
|
34
|
+
classNames,
|
|
35
|
+
showOutsideDays = true,
|
|
36
|
+
captionLayout = "label",
|
|
37
|
+
buttonVariant = "ghost",
|
|
38
|
+
formatters,
|
|
39
|
+
components,
|
|
40
|
+
...props
|
|
41
|
+
}) {
|
|
42
|
+
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
43
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
44
|
+
reactDayPicker.DayPicker,
|
|
45
|
+
{
|
|
46
|
+
showOutsideDays,
|
|
47
|
+
className: chunkJOVJRQO3_js.cn(
|
|
48
|
+
"group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
49
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
50
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
51
|
+
className
|
|
52
|
+
),
|
|
53
|
+
captionLayout,
|
|
54
|
+
formatters: {
|
|
55
|
+
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
|
|
56
|
+
...formatters
|
|
57
|
+
},
|
|
58
|
+
classNames: {
|
|
59
|
+
root: chunkJOVJRQO3_js.cn("w-fit", defaultClassNames.root),
|
|
60
|
+
months: chunkJOVJRQO3_js.cn(
|
|
61
|
+
"relative flex flex-col gap-4 md:flex-row",
|
|
62
|
+
defaultClassNames.months
|
|
63
|
+
),
|
|
64
|
+
month: chunkJOVJRQO3_js.cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
65
|
+
nav: chunkJOVJRQO3_js.cn(
|
|
66
|
+
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
67
|
+
defaultClassNames.nav
|
|
68
|
+
),
|
|
69
|
+
button_previous: chunkJOVJRQO3_js.cn(
|
|
70
|
+
chunkOYH6LQWR_js.buttonVariants({ variant: buttonVariant }),
|
|
71
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
72
|
+
defaultClassNames.button_previous
|
|
73
|
+
),
|
|
74
|
+
button_next: chunkJOVJRQO3_js.cn(
|
|
75
|
+
chunkOYH6LQWR_js.buttonVariants({ variant: buttonVariant }),
|
|
76
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
77
|
+
defaultClassNames.button_next
|
|
78
|
+
),
|
|
79
|
+
month_caption: chunkJOVJRQO3_js.cn(
|
|
80
|
+
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
|
|
81
|
+
defaultClassNames.month_caption
|
|
82
|
+
),
|
|
83
|
+
dropdowns: chunkJOVJRQO3_js.cn(
|
|
84
|
+
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
85
|
+
defaultClassNames.dropdowns
|
|
86
|
+
),
|
|
87
|
+
dropdown_root: chunkJOVJRQO3_js.cn(
|
|
88
|
+
"relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",
|
|
89
|
+
defaultClassNames.dropdown_root
|
|
90
|
+
),
|
|
91
|
+
dropdown: chunkJOVJRQO3_js.cn(
|
|
92
|
+
"absolute inset-0 bg-popover opacity-0",
|
|
93
|
+
defaultClassNames.dropdown
|
|
94
|
+
),
|
|
95
|
+
caption_label: chunkJOVJRQO3_js.cn(
|
|
96
|
+
"font-medium select-none",
|
|
97
|
+
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
|
+
defaultClassNames.caption_label
|
|
99
|
+
),
|
|
100
|
+
table: "w-full border-collapse",
|
|
101
|
+
weekdays: chunkJOVJRQO3_js.cn("flex", defaultClassNames.weekdays),
|
|
102
|
+
weekday: chunkJOVJRQO3_js.cn(
|
|
103
|
+
"flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none",
|
|
104
|
+
defaultClassNames.weekday
|
|
105
|
+
),
|
|
106
|
+
week: chunkJOVJRQO3_js.cn("mt-2 flex w-full", defaultClassNames.week),
|
|
107
|
+
week_number_header: chunkJOVJRQO3_js.cn(
|
|
108
|
+
"w-(--cell-size) select-none",
|
|
109
|
+
defaultClassNames.week_number_header
|
|
110
|
+
),
|
|
111
|
+
week_number: chunkJOVJRQO3_js.cn(
|
|
112
|
+
"text-[0.8rem] text-muted-foreground select-none",
|
|
113
|
+
defaultClassNames.week_number
|
|
114
|
+
),
|
|
115
|
+
day: chunkJOVJRQO3_js.cn(
|
|
116
|
+
"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
|
+
props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md",
|
|
118
|
+
defaultClassNames.day
|
|
119
|
+
),
|
|
120
|
+
range_start: chunkJOVJRQO3_js.cn(
|
|
121
|
+
"rounded-l-md bg-accent",
|
|
122
|
+
defaultClassNames.range_start
|
|
123
|
+
),
|
|
124
|
+
range_middle: chunkJOVJRQO3_js.cn("rounded-none", defaultClassNames.range_middle),
|
|
125
|
+
range_end: chunkJOVJRQO3_js.cn("rounded-r-md bg-accent", defaultClassNames.range_end),
|
|
126
|
+
today: chunkJOVJRQO3_js.cn(
|
|
127
|
+
"rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none",
|
|
128
|
+
defaultClassNames.today
|
|
129
|
+
),
|
|
130
|
+
outside: chunkJOVJRQO3_js.cn(
|
|
131
|
+
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
132
|
+
defaultClassNames.outside
|
|
133
|
+
),
|
|
134
|
+
disabled: chunkJOVJRQO3_js.cn(
|
|
135
|
+
"text-muted-foreground opacity-50",
|
|
136
|
+
defaultClassNames.disabled
|
|
137
|
+
),
|
|
138
|
+
hidden: chunkJOVJRQO3_js.cn("invisible", defaultClassNames.hidden),
|
|
139
|
+
...classNames
|
|
140
|
+
},
|
|
141
|
+
components: {
|
|
142
|
+
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
143
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
144
|
+
"div",
|
|
145
|
+
{
|
|
146
|
+
"data-slot": "calendar",
|
|
147
|
+
ref: rootRef,
|
|
148
|
+
className: chunkJOVJRQO3_js.cn(className2),
|
|
149
|
+
...props2
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
},
|
|
153
|
+
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
154
|
+
if (orientation === "left") {
|
|
155
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, { className: chunkJOVJRQO3_js.cn("size-4", className2), ...props2 });
|
|
156
|
+
}
|
|
157
|
+
if (orientation === "right") {
|
|
158
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
159
|
+
lucideReact.ChevronRightIcon,
|
|
160
|
+
{
|
|
161
|
+
className: chunkJOVJRQO3_js.cn("size-4", className2),
|
|
162
|
+
...props2
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: chunkJOVJRQO3_js.cn("size-4", className2), ...props2 });
|
|
167
|
+
},
|
|
168
|
+
DayButton: CalendarDayButton,
|
|
169
|
+
WeekNumber: ({ children, ...props2 }) => {
|
|
170
|
+
return /* @__PURE__ */ jsxRuntime.jsx("td", { ...props2, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
171
|
+
},
|
|
172
|
+
...components
|
|
173
|
+
},
|
|
174
|
+
...props
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
function CalendarDayButton({
|
|
179
|
+
className,
|
|
180
|
+
day,
|
|
181
|
+
modifiers,
|
|
182
|
+
...props
|
|
183
|
+
}) {
|
|
184
|
+
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
185
|
+
const ref = React__namespace.useRef(null);
|
|
186
|
+
React__namespace.useEffect(() => {
|
|
187
|
+
if (modifiers.focused) ref.current?.focus();
|
|
188
|
+
}, [modifiers.focused]);
|
|
189
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
190
|
+
chunkOYH6LQWR_js.Button,
|
|
191
|
+
{
|
|
192
|
+
ref,
|
|
193
|
+
variant: "ghost",
|
|
194
|
+
size: "icon",
|
|
195
|
+
"data-day": day.date.toLocaleDateString(),
|
|
196
|
+
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
197
|
+
"data-range-start": modifiers.range_start,
|
|
198
|
+
"data-range-end": modifiers.range_end,
|
|
199
|
+
"data-range-middle": modifiers.range_middle,
|
|
200
|
+
className: chunkJOVJRQO3_js.cn(
|
|
201
|
+
"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
|
+
defaultClassNames.day,
|
|
203
|
+
className
|
|
204
|
+
),
|
|
205
|
+
...props
|
|
206
|
+
}
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
exports.Calendar = Calendar;
|
|
211
|
+
exports.CalendarDayButton = CalendarDayButton;
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { buttonVariants, Button } from '../chunk-QWLQV6FS.mjs';
|
|
3
|
+
import '../chunk-W53NTFPB.mjs';
|
|
4
|
+
import { cn } from '../chunk-S26666D6.mjs';
|
|
5
|
+
import * as React from 'react';
|
|
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
|
+
...props
|
|
19
|
+
}) {
|
|
20
|
+
const defaultClassNames = getDefaultClassNames();
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
DayPicker,
|
|
23
|
+
{
|
|
24
|
+
showOutsideDays,
|
|
25
|
+
className: cn(
|
|
26
|
+
"group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
27
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
28
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
29
|
+
className
|
|
30
|
+
),
|
|
31
|
+
captionLayout,
|
|
32
|
+
formatters: {
|
|
33
|
+
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
|
|
34
|
+
...formatters
|
|
35
|
+
},
|
|
36
|
+
classNames: {
|
|
37
|
+
root: cn("w-fit", defaultClassNames.root),
|
|
38
|
+
months: cn(
|
|
39
|
+
"relative flex flex-col gap-4 md:flex-row",
|
|
40
|
+
defaultClassNames.months
|
|
41
|
+
),
|
|
42
|
+
month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
43
|
+
nav: cn(
|
|
44
|
+
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
45
|
+
defaultClassNames.nav
|
|
46
|
+
),
|
|
47
|
+
button_previous: cn(
|
|
48
|
+
buttonVariants({ variant: buttonVariant }),
|
|
49
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
50
|
+
defaultClassNames.button_previous
|
|
51
|
+
),
|
|
52
|
+
button_next: cn(
|
|
53
|
+
buttonVariants({ variant: buttonVariant }),
|
|
54
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
55
|
+
defaultClassNames.button_next
|
|
56
|
+
),
|
|
57
|
+
month_caption: cn(
|
|
58
|
+
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
|
|
59
|
+
defaultClassNames.month_caption
|
|
60
|
+
),
|
|
61
|
+
dropdowns: cn(
|
|
62
|
+
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
63
|
+
defaultClassNames.dropdowns
|
|
64
|
+
),
|
|
65
|
+
dropdown_root: cn(
|
|
66
|
+
"relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",
|
|
67
|
+
defaultClassNames.dropdown_root
|
|
68
|
+
),
|
|
69
|
+
dropdown: cn(
|
|
70
|
+
"absolute inset-0 bg-popover opacity-0",
|
|
71
|
+
defaultClassNames.dropdown
|
|
72
|
+
),
|
|
73
|
+
caption_label: cn(
|
|
74
|
+
"font-medium select-none",
|
|
75
|
+
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",
|
|
76
|
+
defaultClassNames.caption_label
|
|
77
|
+
),
|
|
78
|
+
table: "w-full border-collapse",
|
|
79
|
+
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
80
|
+
weekday: cn(
|
|
81
|
+
"flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none",
|
|
82
|
+
defaultClassNames.weekday
|
|
83
|
+
),
|
|
84
|
+
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
85
|
+
week_number_header: cn(
|
|
86
|
+
"w-(--cell-size) select-none",
|
|
87
|
+
defaultClassNames.week_number_header
|
|
88
|
+
),
|
|
89
|
+
week_number: cn(
|
|
90
|
+
"text-[0.8rem] text-muted-foreground select-none",
|
|
91
|
+
defaultClassNames.week_number
|
|
92
|
+
),
|
|
93
|
+
day: cn(
|
|
94
|
+
"group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md",
|
|
95
|
+
props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md",
|
|
96
|
+
defaultClassNames.day
|
|
97
|
+
),
|
|
98
|
+
range_start: cn(
|
|
99
|
+
"rounded-l-md bg-accent",
|
|
100
|
+
defaultClassNames.range_start
|
|
101
|
+
),
|
|
102
|
+
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
103
|
+
range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
|
|
104
|
+
today: cn(
|
|
105
|
+
"rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none",
|
|
106
|
+
defaultClassNames.today
|
|
107
|
+
),
|
|
108
|
+
outside: cn(
|
|
109
|
+
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
110
|
+
defaultClassNames.outside
|
|
111
|
+
),
|
|
112
|
+
disabled: cn(
|
|
113
|
+
"text-muted-foreground opacity-50",
|
|
114
|
+
defaultClassNames.disabled
|
|
115
|
+
),
|
|
116
|
+
hidden: cn("invisible", defaultClassNames.hidden),
|
|
117
|
+
...classNames
|
|
118
|
+
},
|
|
119
|
+
components: {
|
|
120
|
+
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
121
|
+
return /* @__PURE__ */ jsx(
|
|
122
|
+
"div",
|
|
123
|
+
{
|
|
124
|
+
"data-slot": "calendar",
|
|
125
|
+
ref: rootRef,
|
|
126
|
+
className: cn(className2),
|
|
127
|
+
...props2
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
},
|
|
131
|
+
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
132
|
+
if (orientation === "left") {
|
|
133
|
+
return /* @__PURE__ */ jsx(ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
|
|
134
|
+
}
|
|
135
|
+
if (orientation === "right") {
|
|
136
|
+
return /* @__PURE__ */ jsx(
|
|
137
|
+
ChevronRightIcon,
|
|
138
|
+
{
|
|
139
|
+
className: cn("size-4", className2),
|
|
140
|
+
...props2
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
return /* @__PURE__ */ jsx(ChevronDownIcon, { className: cn("size-4", className2), ...props2 });
|
|
145
|
+
},
|
|
146
|
+
DayButton: CalendarDayButton,
|
|
147
|
+
WeekNumber: ({ children, ...props2 }) => {
|
|
148
|
+
return /* @__PURE__ */ jsx("td", { ...props2, children: /* @__PURE__ */ jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
149
|
+
},
|
|
150
|
+
...components
|
|
151
|
+
},
|
|
152
|
+
...props
|
|
153
|
+
}
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
function CalendarDayButton({
|
|
157
|
+
className,
|
|
158
|
+
day,
|
|
159
|
+
modifiers,
|
|
160
|
+
...props
|
|
161
|
+
}) {
|
|
162
|
+
const defaultClassNames = getDefaultClassNames();
|
|
163
|
+
const ref = React.useRef(null);
|
|
164
|
+
React.useEffect(() => {
|
|
165
|
+
if (modifiers.focused) ref.current?.focus();
|
|
166
|
+
}, [modifiers.focused]);
|
|
167
|
+
return /* @__PURE__ */ jsx(
|
|
168
|
+
Button,
|
|
169
|
+
{
|
|
170
|
+
ref,
|
|
171
|
+
variant: "ghost",
|
|
172
|
+
size: "icon",
|
|
173
|
+
"data-day": day.date.toLocaleDateString(),
|
|
174
|
+
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
175
|
+
"data-range-start": modifiers.range_start,
|
|
176
|
+
"data-range-end": modifiers.range_end,
|
|
177
|
+
"data-range-middle": modifiers.range_middle,
|
|
178
|
+
className: cn(
|
|
179
|
+
"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",
|
|
180
|
+
defaultClassNames.day,
|
|
181
|
+
className
|
|
182
|
+
),
|
|
183
|
+
...props
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export { Calendar, CalendarDayButton };
|
|
@@ -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 useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
|
|
4
|
-
import { B as Button } from '../button-
|
|
4
|
+
import { B as Button } from '../button-DUQJ0X7e.mjs';
|
|
5
5
|
import 'class-variance-authority/types';
|
|
6
6
|
import 'class-variance-authority';
|
|
7
7
|
|
|
@@ -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 useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
|
|
4
|
-
import { B as Button } from '../button-
|
|
4
|
+
import { B as Button } from '../button-DUQJ0X7e.js';
|
|
5
5
|
import 'class-variance-authority/types';
|
|
6
6
|
import 'class-variance-authority';
|
|
7
7
|
|
package/dist/entries/carousel.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkOYH6LQWR_js = require('../chunk-OYH6LQWR.js');
|
|
5
|
+
require('../chunk-CWW36RYE.js');
|
|
5
6
|
var chunkJOVJRQO3_js = require('../chunk-JOVJRQO3.js');
|
|
6
7
|
var React = require('react');
|
|
7
8
|
var useEmblaCarousel = require('embla-carousel-react');
|
|
@@ -168,7 +169,7 @@ function CarouselPrevious({
|
|
|
168
169
|
}) {
|
|
169
170
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
170
171
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
171
|
-
|
|
172
|
+
chunkOYH6LQWR_js.Button,
|
|
172
173
|
{
|
|
173
174
|
"data-slot": "carousel-previous",
|
|
174
175
|
variant,
|
|
@@ -196,7 +197,7 @@ function CarouselNext({
|
|
|
196
197
|
}) {
|
|
197
198
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
198
199
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
199
|
-
|
|
200
|
+
chunkOYH6LQWR_js.Button,
|
|
200
201
|
{
|
|
201
202
|
"data-slot": "carousel-next",
|
|
202
203
|
variant,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Button } from '../chunk-
|
|
2
|
+
import { Button } from '../chunk-QWLQV6FS.mjs';
|
|
3
|
+
import '../chunk-W53NTFPB.mjs';
|
|
3
4
|
import { cn } from '../chunk-S26666D6.mjs';
|
|
4
5
|
import * as React from 'react';
|
|
5
6
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Command as Command$1 } from 'cmdk';
|
|
4
|
+
import { D as Dialog } from '../dialog-CwyBJeNl.mjs';
|
|
5
|
+
import '@radix-ui/react-dialog';
|
|
6
|
+
|
|
7
|
+
declare function Command({ className, ...props }: React.ComponentProps<typeof Command$1>): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function CommandDialog({ title, description, children, className, ...props }: React.ComponentProps<typeof Dialog> & {
|
|
9
|
+
title?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
}): react_jsx_runtime.JSX.Element;
|
|
13
|
+
declare function CommandInput({ className, ...props }: React.ComponentProps<typeof Command$1.Input>): react_jsx_runtime.JSX.Element;
|
|
14
|
+
declare function CommandList({ className, ...props }: React.ComponentProps<typeof Command$1.List>): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function CommandEmpty({ ...props }: React.ComponentProps<typeof Command$1.Empty>): react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof Command$1.Group>): react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof Command$1.Separator>): react_jsx_runtime.JSX.Element;
|
|
18
|
+
declare function CommandItem({ className, ...props }: React.ComponentProps<typeof Command$1.Item>): react_jsx_runtime.JSX.Element;
|
|
19
|
+
declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
20
|
+
|
|
21
|
+
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Command as Command$1 } from 'cmdk';
|
|
4
|
+
import { D as Dialog } from '../dialog-CwyBJeNl.js';
|
|
5
|
+
import '@radix-ui/react-dialog';
|
|
6
|
+
|
|
7
|
+
declare function Command({ className, ...props }: React.ComponentProps<typeof Command$1>): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function CommandDialog({ title, description, children, className, ...props }: React.ComponentProps<typeof Dialog> & {
|
|
9
|
+
title?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
}): react_jsx_runtime.JSX.Element;
|
|
13
|
+
declare function CommandInput({ className, ...props }: React.ComponentProps<typeof Command$1.Input>): react_jsx_runtime.JSX.Element;
|
|
14
|
+
declare function CommandList({ className, ...props }: React.ComponentProps<typeof Command$1.List>): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function CommandEmpty({ ...props }: React.ComponentProps<typeof Command$1.Empty>): react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof Command$1.Group>): react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof Command$1.Separator>): react_jsx_runtime.JSX.Element;
|
|
18
|
+
declare function CommandItem({ className, ...props }: React.ComponentProps<typeof Command$1.Item>): react_jsx_runtime.JSX.Element;
|
|
19
|
+
declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
20
|
+
|
|
21
|
+
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var chunkVQQ6MF5I_js = require('../chunk-VQQ6MF5I.js');
|
|
5
|
+
require('../chunk-CWW36RYE.js');
|
|
6
|
+
var chunkJOVJRQO3_js = require('../chunk-JOVJRQO3.js');
|
|
7
|
+
var cmdk = require('cmdk');
|
|
8
|
+
var lucideReact = require('lucide-react');
|
|
9
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
+
|
|
11
|
+
function Command({
|
|
12
|
+
className,
|
|
13
|
+
...props
|
|
14
|
+
}) {
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16
|
+
cmdk.Command,
|
|
17
|
+
{
|
|
18
|
+
"data-slot": "command",
|
|
19
|
+
className: chunkJOVJRQO3_js.cn(
|
|
20
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
21
|
+
className
|
|
22
|
+
),
|
|
23
|
+
...props
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
function CommandDialog({
|
|
28
|
+
title = "Command Palette",
|
|
29
|
+
description = "Search for a command to run...",
|
|
30
|
+
children,
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}) {
|
|
34
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkVQQ6MF5I_js.Dialog, { ...props, children: [
|
|
35
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkVQQ6MF5I_js.DialogHeader, { className: "sr-only", children: [
|
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkVQQ6MF5I_js.DialogTitle, { children: title }),
|
|
37
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkVQQ6MF5I_js.DialogDescription, { children: description })
|
|
38
|
+
] }),
|
|
39
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40
|
+
chunkVQQ6MF5I_js.DialogContent,
|
|
41
|
+
{
|
|
42
|
+
className: chunkJOVJRQO3_js.cn("overflow-hidden p-0", className),
|
|
43
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Command, { className: "**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children })
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
] });
|
|
47
|
+
}
|
|
48
|
+
function CommandInput({
|
|
49
|
+
className,
|
|
50
|
+
...props
|
|
51
|
+
}) {
|
|
52
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
"data-slot": "command-input-wrapper",
|
|
56
|
+
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
|
|
59
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
60
|
+
cmdk.Command.Input,
|
|
61
|
+
{
|
|
62
|
+
"data-slot": "command-input",
|
|
63
|
+
className: chunkJOVJRQO3_js.cn(
|
|
64
|
+
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
65
|
+
className
|
|
66
|
+
),
|
|
67
|
+
...props
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
function CommandList({
|
|
75
|
+
className,
|
|
76
|
+
...props
|
|
77
|
+
}) {
|
|
78
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
79
|
+
cmdk.Command.List,
|
|
80
|
+
{
|
|
81
|
+
"data-slot": "command-list",
|
|
82
|
+
className: chunkJOVJRQO3_js.cn(
|
|
83
|
+
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
84
|
+
className
|
|
85
|
+
),
|
|
86
|
+
...props
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
function CommandEmpty({
|
|
91
|
+
...props
|
|
92
|
+
}) {
|
|
93
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
94
|
+
cmdk.Command.Empty,
|
|
95
|
+
{
|
|
96
|
+
"data-slot": "command-empty",
|
|
97
|
+
className: "py-6 text-center text-sm",
|
|
98
|
+
...props
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
function CommandGroup({
|
|
103
|
+
className,
|
|
104
|
+
...props
|
|
105
|
+
}) {
|
|
106
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
107
|
+
cmdk.Command.Group,
|
|
108
|
+
{
|
|
109
|
+
"data-slot": "command-group",
|
|
110
|
+
className: chunkJOVJRQO3_js.cn(
|
|
111
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
112
|
+
className
|
|
113
|
+
),
|
|
114
|
+
...props
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
function CommandSeparator({
|
|
119
|
+
className,
|
|
120
|
+
...props
|
|
121
|
+
}) {
|
|
122
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
123
|
+
cmdk.Command.Separator,
|
|
124
|
+
{
|
|
125
|
+
"data-slot": "command-separator",
|
|
126
|
+
className: chunkJOVJRQO3_js.cn("-mx-1 h-px bg-border", className),
|
|
127
|
+
...props
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
function CommandItem({
|
|
132
|
+
className,
|
|
133
|
+
...props
|
|
134
|
+
}) {
|
|
135
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
136
|
+
cmdk.Command.Item,
|
|
137
|
+
{
|
|
138
|
+
"data-slot": "command-item",
|
|
139
|
+
className: chunkJOVJRQO3_js.cn(
|
|
140
|
+
"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
141
|
+
className
|
|
142
|
+
),
|
|
143
|
+
...props
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
function CommandShortcut({
|
|
148
|
+
className,
|
|
149
|
+
...props
|
|
150
|
+
}) {
|
|
151
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
152
|
+
"span",
|
|
153
|
+
{
|
|
154
|
+
"data-slot": "command-shortcut",
|
|
155
|
+
className: chunkJOVJRQO3_js.cn(
|
|
156
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
157
|
+
className
|
|
158
|
+
),
|
|
159
|
+
...props
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
exports.Command = Command;
|
|
165
|
+
exports.CommandDialog = CommandDialog;
|
|
166
|
+
exports.CommandEmpty = CommandEmpty;
|
|
167
|
+
exports.CommandGroup = CommandGroup;
|
|
168
|
+
exports.CommandInput = CommandInput;
|
|
169
|
+
exports.CommandItem = CommandItem;
|
|
170
|
+
exports.CommandList = CommandList;
|
|
171
|
+
exports.CommandSeparator = CommandSeparator;
|
|
172
|
+
exports.CommandShortcut = CommandShortcut;
|