@caffeinebounce/ui 0.62.2 → 0.63.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 +1 -1
- package/dist/blog.js +8 -6
- package/dist/blog.mjs +3 -1
- package/dist/charts.d.cts +1 -1
- package/dist/charts.d.ts +1 -1
- package/dist/{chunk-6DVWMJ3H.mjs → chunk-2EFVMX6V.mjs} +4 -3
- package/dist/chunk-33JR5SYE.js +1 -0
- package/dist/{chunk-OZZWDIOY.js → chunk-375DECW4.js} +32 -31
- package/dist/chunk-3NDB4YPC.js +1 -0
- package/dist/{chunk-PZRI43EZ.js → chunk-46JYKBRX.js} +0 -43
- package/dist/chunk-5D55OVD5.js +75 -0
- package/dist/chunk-5RW4PYZ6.js +1 -0
- package/dist/chunk-5THF4YP6.mjs +1 -0
- package/dist/{chunk-JORVSG52.js → chunk-663CFAHS.js} +212 -269
- package/dist/chunk-6BUBNZPG.mjs +1 -0
- package/dist/chunk-6HKJDV43.mjs +48 -0
- package/dist/chunk-6NCRGHV3.mjs +64 -0
- package/dist/{chunk-OLAAXLXY.mjs → chunk-6QAKQG57.mjs} +5 -4
- package/dist/chunk-72JGQ7IJ.mjs +1 -0
- package/dist/{chunk-N6AFNFZR.mjs → chunk-7ERVZXIN.mjs} +215 -270
- package/dist/chunk-7IKHZKAC.js +1 -0
- package/dist/chunk-APFEP5B7.mjs +100 -0
- package/dist/chunk-C3OADNSG.js +348 -0
- package/dist/{chunk-RVEFPVZF.mjs → chunk-C57MX3BG.mjs} +1 -0
- package/dist/{chunk-CC4KUIKC.js → chunk-DH5Z3ETN.js} +67 -45
- package/dist/chunk-DYWZ23QT.mjs +90 -0
- package/dist/{chunk-KRRIRS6A.mjs → chunk-E67IR6HU.mjs} +31 -9
- package/dist/{chunk-D3QXPL47.mjs → chunk-EXQSWHLD.mjs} +7 -6
- package/dist/{chunk-ZOA7B32D.js → chunk-F35KL6TX.js} +10 -9
- package/dist/{chunk-YSLD2HLP.mjs → chunk-FFJC66KO.mjs} +2 -1
- package/dist/chunk-FRRS2YZH.mjs +1 -0
- package/dist/chunk-G5TQWWQA.mjs +1 -0
- package/dist/{chunk-MPZFPU4X.js → chunk-GMBLPQ3I.js} +4 -3
- package/dist/chunk-IJFPPLQW.js +50 -0
- package/dist/chunk-J6OLBSZR.js +1 -0
- package/dist/chunk-KGGQ5NZV.js +1 -0
- package/dist/chunk-KHCC5UKW.mjs +1 -0
- package/dist/{chunk-BMFQG6RA.mjs → chunk-KJIX6V32.mjs} +108 -1885
- package/dist/chunk-LABHD4PU.js +109 -0
- package/dist/chunk-LQCVRWVF.js +1 -0
- package/dist/{chunk-GAIQJCAZ.js → chunk-LT5VD4KR.js} +150 -1953
- package/dist/{chunk-7DHKQODW.mjs → chunk-LTLCIRZY.mjs} +257 -474
- package/dist/chunk-N5BHXWR3.mjs +34 -0
- package/dist/chunk-OCO3Z5YA.js +37 -0
- package/dist/chunk-OFQLWSUR.mjs +1 -0
- package/dist/chunk-OIJ7XMDV.mjs +71 -0
- package/dist/chunk-ORBH4IBC.mjs +316 -0
- package/dist/{chunk-C4UT5V3P.js → chunk-OWHI5VGJ.js} +1 -0
- package/dist/chunk-OWWOAYIY.js +2652 -0
- package/dist/chunk-PFHOXDSW.mjs +10 -0
- package/dist/chunk-Q52ZEL62.mjs +1 -0
- package/dist/chunk-QRS7DJGS.js +103 -0
- package/dist/chunk-R26Y7LGJ.js +1 -0
- package/dist/{chunk-BFWX5GJZ.mjs → chunk-R3X4B4JJ.mjs} +56 -8
- package/dist/chunk-RBUYW6QQ.js +1 -0
- package/dist/chunk-RM7ACPTM.mjs +2601 -0
- package/dist/chunk-RODSGPBB.mjs +75 -0
- package/dist/chunk-SORWLKOK.js +1 -0
- package/dist/{chunk-T6ZBA6VJ.js → chunk-UHAV34YX.js} +9 -8
- package/dist/{chunk-GUSTCU2W.mjs → chunk-ULANYJ7Y.mjs} +1 -59
- package/dist/chunk-ULDE7QSN.js +70 -0
- package/dist/chunk-UT36VNVZ.mjs +47 -0
- package/dist/chunk-UY3H4PKB.js +71 -0
- package/dist/{chunk-KB7UXIQZ.mjs → chunk-VIVWFQG5.mjs} +3 -1
- package/dist/{chunk-ESZ7CBA2.js → chunk-VKBJ3SGT.js} +7 -5
- package/dist/{chunk-UM7WMXIU.js → chunk-W3YOQ5ZD.js} +265 -505
- package/dist/chunk-WOITB4JL.js +1 -0
- package/dist/{chunk-E42B4GSB.js → chunk-XGJL6DLV.js} +58 -7
- package/dist/chunk-YKZEKJMZ.mjs +1 -0
- package/dist/chunk-YRIBFIQ5.js +116 -0
- package/dist/chunk-ZFLZA7UP.mjs +1 -0
- package/dist/chunk-ZKUIUE7W.mjs +1 -0
- package/dist/chunk-ZWWJ3RRA.js +15 -0
- package/dist/data-grid.d.cts +241 -0
- package/dist/data-grid.d.ts +241 -0
- package/dist/data-grid.js +6486 -0
- package/dist/data-grid.mjs +6459 -0
- package/dist/data-table-CDQBo-Ve.d.ts +818 -0
- package/dist/data-table-jLzt6plY.d.cts +818 -0
- package/dist/data-table.d.cts +8 -42
- package/dist/data-table.d.ts +8 -42
- package/dist/data-table.js +61 -187
- package/dist/data-table.mjs +11 -5
- package/dist/finance.d.cts +534 -0
- package/dist/finance.d.ts +534 -0
- package/dist/finance.js +188 -0
- package/dist/finance.mjs +15 -0
- package/dist/forms.js +9 -6
- package/dist/forms.mjs +7 -4
- package/dist/{hooks-B2jU1GVT.d.ts → hooks-A55E0fgf.d.ts} +3 -2
- package/dist/{hooks-8ORd7T1A.d.cts → hooks-Bys_AZPI.d.cts} +3 -2
- package/dist/hooks.d.cts +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +26 -23
- package/dist/hooks.mjs +6 -3
- package/dist/index.d.cts +536 -665
- package/dist/index.d.ts +536 -665
- package/dist/index.js +3830 -3408
- package/dist/index.mjs +2068 -1767
- package/dist/layouts.js +26 -25
- package/dist/layouts.mjs +5 -4
- package/dist/marketing-3d.js +1 -0
- package/dist/marketing-3d.mjs +1 -0
- package/dist/marketing.js +75 -74
- package/dist/marketing.mjs +5 -4
- package/dist/media.js +1 -0
- package/dist/media.mjs +1 -0
- package/dist/navigation.js +29 -28
- package/dist/navigation.mjs +7 -6
- package/dist/primitives.d.cts +72 -109
- package/dist/primitives.d.ts +72 -109
- package/dist/primitives.js +78 -72
- package/dist/primitives.mjs +8 -6
- package/dist/settings.js +9 -9
- package/dist/settings.mjs +4 -4
- package/package.json +21 -4
- package/dist/UnifiedTableControls-CG299y9h.d.ts +0 -1233
- package/dist/UnifiedTableControls-CIjRpNhy.d.cts +0 -1233
- package/dist/chunk-GMBGWOCR.mjs +0 -48
- package/dist/chunk-HBLKVQIQ.mjs +0 -23
- package/dist/chunk-HMAMMC72.js +0 -26
- package/dist/chunk-MVYRNJA6.js +0 -74
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from './chunk-IMKLN273.mjs';
|
|
3
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function Popover({
|
|
7
|
+
...props
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
10
|
+
}
|
|
11
|
+
function PopoverTrigger({
|
|
12
|
+
...props
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
15
|
+
}
|
|
16
|
+
function PopoverContent({
|
|
17
|
+
className,
|
|
18
|
+
align = "center",
|
|
19
|
+
sideOffset = 4,
|
|
20
|
+
...props
|
|
21
|
+
}) {
|
|
22
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
23
|
+
PopoverPrimitive.Content,
|
|
24
|
+
{
|
|
25
|
+
"data-slot": "popover-content",
|
|
26
|
+
align,
|
|
27
|
+
sideOffset,
|
|
28
|
+
className: cn(
|
|
29
|
+
"z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
30
|
+
className
|
|
31
|
+
),
|
|
32
|
+
...props
|
|
33
|
+
}
|
|
34
|
+
) });
|
|
35
|
+
}
|
|
36
|
+
function PopoverAnchor({
|
|
37
|
+
...props
|
|
38
|
+
}) {
|
|
39
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
40
|
+
}
|
|
41
|
+
function PopoverHeader({ className, ...props }) {
|
|
42
|
+
return /* @__PURE__ */ jsx(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
"data-slot": "popover-header",
|
|
46
|
+
className: cn("flex flex-col gap-1 text-sm", className),
|
|
47
|
+
...props
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
function PopoverTitle({ className, ...props }) {
|
|
52
|
+
return /* @__PURE__ */ jsx(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
"data-slot": "popover-title",
|
|
56
|
+
className: cn("font-medium", className),
|
|
57
|
+
...props
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
function PopoverDescription({
|
|
62
|
+
className,
|
|
63
|
+
...props
|
|
64
|
+
}) {
|
|
65
|
+
return /* @__PURE__ */ jsx(
|
|
66
|
+
"p",
|
|
67
|
+
{
|
|
68
|
+
"data-slot": "popover-description",
|
|
69
|
+
className: cn("text-muted-foreground", className),
|
|
70
|
+
...props
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };
|
package/dist/chunk-SORWLKOK.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
'use strict';
|
|
2
3
|
|
|
3
|
-
var chunkEYJJQVV4_js = require('./chunk-EYJJQVV4.js');
|
|
4
4
|
var chunkJAE45W2T_js = require('./chunk-JAE45W2T.js');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkOWHI5VGJ_js = require('./chunk-OWHI5VGJ.js');
|
|
6
|
+
var chunkEYJJQVV4_js = require('./chunk-EYJJQVV4.js');
|
|
7
7
|
var chunk6TGV2DNP_js = require('./chunk-6TGV2DNP.js');
|
|
8
|
+
var chunkLQCVRWVF_js = require('./chunk-LQCVRWVF.js');
|
|
8
9
|
var chunkADIDI7AJ_js = require('./chunk-ADIDI7AJ.js');
|
|
9
10
|
var React = require('react');
|
|
10
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -2673,7 +2674,7 @@ function CTAWithDashedGridLines({
|
|
|
2673
2674
|
quoteRole = "Side projects builder",
|
|
2674
2675
|
className
|
|
2675
2676
|
}) {
|
|
2676
|
-
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: chunkADIDI7AJ_js.cn("py-16 md:py-24", className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2677
|
+
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: chunkADIDI7AJ_js.cn("py-16 md:py-24", className), children: /* @__PURE__ */ jsxRuntime.jsx(chunkOWHI5VGJ_js.Container, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2677
2678
|
"div",
|
|
2678
2679
|
{
|
|
2679
2680
|
className: "relative rounded-box bg-background",
|
|
@@ -2970,7 +2971,7 @@ function EditorialHero({
|
|
|
2970
2971
|
}
|
|
2971
2972
|
);
|
|
2972
2973
|
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: chunkADIDI7AJ_js.cn("w-full", className), "data-slot": "editorial-hero", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2973
|
-
|
|
2974
|
+
chunkOWHI5VGJ_js.Container,
|
|
2974
2975
|
{
|
|
2975
2976
|
className: chunkADIDI7AJ_js.cn(
|
|
2976
2977
|
"grid gap-8 lg:grid-cols-[minmax(0,1.05fr)_minmax(0,0.95fr)] lg:items-stretch",
|
|
@@ -4396,7 +4397,7 @@ function HeroSection({
|
|
|
4396
4397
|
}
|
|
4397
4398
|
) }),
|
|
4398
4399
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4399
|
-
|
|
4400
|
+
chunkOWHI5VGJ_js.Container,
|
|
4400
4401
|
{
|
|
4401
4402
|
className: chunkADIDI7AJ_js.cn(
|
|
4402
4403
|
"relative z-10 flex flex-1",
|
|
@@ -5352,7 +5353,7 @@ function MediaTextHero({
|
|
|
5352
5353
|
"data-slot": "media-text-hero",
|
|
5353
5354
|
style: heroStyle,
|
|
5354
5355
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5355
|
-
|
|
5356
|
+
chunkOWHI5VGJ_js.Container,
|
|
5356
5357
|
{
|
|
5357
5358
|
className: chunkADIDI7AJ_js.cn(
|
|
5358
5359
|
"mt-[var(--media-text-hero-mobile-top-inset)] grid w-full gap-12 md:mt-0 md:items-center md:gap-16",
|
|
@@ -5871,7 +5872,7 @@ function SectionShell({
|
|
|
5871
5872
|
className
|
|
5872
5873
|
),
|
|
5873
5874
|
"data-slot": "section-shell",
|
|
5874
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5875
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkOWHI5VGJ_js.Container, { size: containerSize, children: [
|
|
5875
5876
|
(eyebrow || heading || intro) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5876
5877
|
"div",
|
|
5877
5878
|
{
|
|
@@ -2,64 +2,6 @@ import { cn } from './chunk-IMKLN273.mjs';
|
|
|
2
2
|
import { cva } from 'class-variance-authority';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
-
var alertVariants = cva(
|
|
6
|
-
"relative w-full rounded-box border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
7
|
-
{
|
|
8
|
-
variants: {
|
|
9
|
-
variant: {
|
|
10
|
-
default: "bg-card text-card-foreground",
|
|
11
|
-
destructive: "border-destructive text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
defaultVariants: {
|
|
15
|
-
variant: "default"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
function Alert({
|
|
20
|
-
className,
|
|
21
|
-
variant,
|
|
22
|
-
...props
|
|
23
|
-
}) {
|
|
24
|
-
return /* @__PURE__ */ jsx(
|
|
25
|
-
"div",
|
|
26
|
-
{
|
|
27
|
-
"data-slot": "alert",
|
|
28
|
-
role: "alert",
|
|
29
|
-
className: cn(alertVariants({ variant }), className),
|
|
30
|
-
...props
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
function AlertTitle({ className, ...props }) {
|
|
35
|
-
return /* @__PURE__ */ jsx(
|
|
36
|
-
"div",
|
|
37
|
-
{
|
|
38
|
-
"data-slot": "alert-title",
|
|
39
|
-
className: cn(
|
|
40
|
-
"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
|
|
41
|
-
className
|
|
42
|
-
),
|
|
43
|
-
...props
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
function AlertDescription({
|
|
48
|
-
className,
|
|
49
|
-
...props
|
|
50
|
-
}) {
|
|
51
|
-
return /* @__PURE__ */ jsx(
|
|
52
|
-
"div",
|
|
53
|
-
{
|
|
54
|
-
"data-slot": "alert-description",
|
|
55
|
-
className: cn(
|
|
56
|
-
"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
|
|
57
|
-
className
|
|
58
|
-
),
|
|
59
|
-
...props
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
5
|
var badgeVariants = cva(
|
|
64
6
|
"inline-flex items-center border font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
65
7
|
{
|
|
@@ -102,4 +44,4 @@ function Badge({ className, variant, shape, size, ...props }) {
|
|
|
102
44
|
);
|
|
103
45
|
}
|
|
104
46
|
|
|
105
|
-
export {
|
|
47
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkADIDI7AJ_js = require('./chunk-ADIDI7AJ.js');
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var React = require('react');
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n.default = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
26
|
+
|
|
27
|
+
function Skeleton({ className, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
"data-slot": "skeleton",
|
|
32
|
+
className: chunkADIDI7AJ_js.cn("bg-accent animate-pulse rounded-box", className),
|
|
33
|
+
...props
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
function useCallbackRef(callback) {
|
|
38
|
+
const callbackRef = React__namespace.useRef(callback);
|
|
39
|
+
React__namespace.useEffect(() => {
|
|
40
|
+
callbackRef.current = callback;
|
|
41
|
+
});
|
|
42
|
+
return React__namespace.useMemo(
|
|
43
|
+
() => ((...args) => callbackRef.current?.(...args)),
|
|
44
|
+
[]
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// src/hooks/use-debounced-callback.ts
|
|
49
|
+
function useDebouncedCallback(callback, delay) {
|
|
50
|
+
const handleCallback = useCallbackRef(callback);
|
|
51
|
+
const debounceTimerRef = React__namespace.useRef(0);
|
|
52
|
+
React__namespace.useEffect(
|
|
53
|
+
() => () => window.clearTimeout(debounceTimerRef.current),
|
|
54
|
+
[]
|
|
55
|
+
);
|
|
56
|
+
const setValue = React__namespace.useCallback(
|
|
57
|
+
(...args) => {
|
|
58
|
+
window.clearTimeout(debounceTimerRef.current);
|
|
59
|
+
debounceTimerRef.current = window.setTimeout(
|
|
60
|
+
() => handleCallback(...args),
|
|
61
|
+
delay
|
|
62
|
+
);
|
|
63
|
+
},
|
|
64
|
+
[handleCallback, delay]
|
|
65
|
+
);
|
|
66
|
+
return setValue;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
exports.Skeleton = Skeleton;
|
|
70
|
+
exports.useDebouncedCallback = useDebouncedCallback;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { cn } from './chunk-IMKLN273.mjs';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
function Skeleton({ className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
"div",
|
|
8
|
+
{
|
|
9
|
+
"data-slot": "skeleton",
|
|
10
|
+
className: cn("bg-accent animate-pulse rounded-box", className),
|
|
11
|
+
...props
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
function useCallbackRef(callback) {
|
|
16
|
+
const callbackRef = React.useRef(callback);
|
|
17
|
+
React.useEffect(() => {
|
|
18
|
+
callbackRef.current = callback;
|
|
19
|
+
});
|
|
20
|
+
return React.useMemo(
|
|
21
|
+
() => ((...args) => callbackRef.current?.(...args)),
|
|
22
|
+
[]
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// src/hooks/use-debounced-callback.ts
|
|
27
|
+
function useDebouncedCallback(callback, delay) {
|
|
28
|
+
const handleCallback = useCallbackRef(callback);
|
|
29
|
+
const debounceTimerRef = React.useRef(0);
|
|
30
|
+
React.useEffect(
|
|
31
|
+
() => () => window.clearTimeout(debounceTimerRef.current),
|
|
32
|
+
[]
|
|
33
|
+
);
|
|
34
|
+
const setValue = React.useCallback(
|
|
35
|
+
(...args) => {
|
|
36
|
+
window.clearTimeout(debounceTimerRef.current);
|
|
37
|
+
debounceTimerRef.current = window.setTimeout(
|
|
38
|
+
() => handleCallback(...args),
|
|
39
|
+
delay
|
|
40
|
+
);
|
|
41
|
+
},
|
|
42
|
+
[handleCallback, delay]
|
|
43
|
+
);
|
|
44
|
+
return setValue;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { Skeleton, useDebouncedCallback };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var chunkADIDI7AJ_js = require('./chunk-ADIDI7AJ.js');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
7
|
+
var lucideReact = require('lucide-react');
|
|
8
|
+
|
|
9
|
+
function _interopNamespace(e) {
|
|
10
|
+
if (e && e.__esModule) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
28
|
+
|
|
29
|
+
function Textarea({ className, ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
31
|
+
"textarea",
|
|
32
|
+
{
|
|
33
|
+
"data-slot": "textarea",
|
|
34
|
+
className: chunkADIDI7AJ_js.cn(
|
|
35
|
+
"border-input placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full min-w-0 max-w-full rounded-box border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm break-words [overflow-wrap:anywhere]",
|
|
36
|
+
className
|
|
37
|
+
),
|
|
38
|
+
...props
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
function Checkbox({
|
|
43
|
+
className,
|
|
44
|
+
...props
|
|
45
|
+
}) {
|
|
46
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
47
|
+
CheckboxPrimitive__namespace.Root,
|
|
48
|
+
{
|
|
49
|
+
"data-slot": "checkbox",
|
|
50
|
+
className: chunkADIDI7AJ_js.cn(
|
|
51
|
+
"peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary",
|
|
52
|
+
className
|
|
53
|
+
),
|
|
54
|
+
...props,
|
|
55
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
56
|
+
CheckboxPrimitive__namespace.Indicator,
|
|
57
|
+
{
|
|
58
|
+
"data-slot": "checkbox-indicator",
|
|
59
|
+
className: "grid place-content-center text-current transition-none",
|
|
60
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "size-3.5" })
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
function BooleanCheckbox(props) {
|
|
67
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { ...props });
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
exports.BooleanCheckbox = BooleanCheckbox;
|
|
71
|
+
exports.Textarea = Textarea;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { excelColumnName, buildSpreadsheetWorkbookXml, downloadExcelXml } from './chunk-OIJ7XMDV.mjs';
|
|
3
|
+
import { flattenStatementForExport } from './chunk-LTLCIRZY.mjs';
|
|
2
4
|
import { useEffect, useCallback, useMemo, useState, useRef } from 'react';
|
|
3
5
|
import { endOfMonth, parseISO, startOfMonth, format } from 'date-fns';
|
|
4
6
|
import { toast as toast$1 } from 'sonner';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
'use strict';
|
|
2
3
|
|
|
3
|
-
var
|
|
4
|
+
var chunk5D55OVD5_js = require('./chunk-5D55OVD5.js');
|
|
5
|
+
var chunkW3YOQ5ZD_js = require('./chunk-W3YOQ5ZD.js');
|
|
4
6
|
var react = require('react');
|
|
5
7
|
var dateFns = require('date-fns');
|
|
6
8
|
var sonner = require('sonner');
|
|
@@ -586,7 +588,7 @@ function useStatementExport({
|
|
|
586
588
|
}) {
|
|
587
589
|
return react.useCallback(
|
|
588
590
|
(format2) => {
|
|
589
|
-
const { rows: flat, periodKeys } =
|
|
591
|
+
const { rows: flat, periodKeys } = chunkW3YOQ5ZD_js.flattenStatementForExport(
|
|
590
592
|
entries,
|
|
591
593
|
config,
|
|
592
594
|
timeUnit,
|
|
@@ -626,7 +628,7 @@ function useStatementExport({
|
|
|
626
628
|
})),
|
|
627
629
|
...flat.map((row, rowIndex) => {
|
|
628
630
|
const excelRow = rowStart + rowIndex;
|
|
629
|
-
const totalFormula = `SUM(${
|
|
631
|
+
const totalFormula = `SUM(${chunk5D55OVD5_js.excelColumnName(firstValueColumn)}${excelRow}:${chunk5D55OVD5_js.excelColumnName(lastValueColumn)}${excelRow})`;
|
|
630
632
|
const periodCells = periodKeys.map(
|
|
631
633
|
(periodKey) => ({
|
|
632
634
|
value: Number(row[periodKey] ?? 0),
|
|
@@ -646,11 +648,11 @@ function useStatementExport({
|
|
|
646
648
|
];
|
|
647
649
|
})
|
|
648
650
|
];
|
|
649
|
-
const xml =
|
|
651
|
+
const xml = chunk5D55OVD5_js.buildSpreadsheetWorkbookXml({
|
|
650
652
|
worksheetName,
|
|
651
653
|
rows
|
|
652
654
|
});
|
|
653
|
-
|
|
655
|
+
chunk5D55OVD5_js.downloadExcelXml(xml, filename);
|
|
654
656
|
},
|
|
655
657
|
[
|
|
656
658
|
config,
|