laif-ds 0.2.24 → 0.2.25
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/_virtual/index2.js +5 -2
- package/dist/_virtual/index3.js +2 -5
- package/dist/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/components/ui/date-picker.js +45 -36
- package/dist/index.d.ts +4 -1
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/eventemitter3/index2.js +1 -1
- package/dist/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/node_modules/use-sync-external-store/shim/index.js +1 -1
- package/package.json +1 -1
package/dist/_virtual/index2.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
|
|
3
|
+
import { __require as t } from "../node_modules/eventemitter3/index2.js";
|
|
4
|
+
var r = t();
|
|
5
|
+
const m = /* @__PURE__ */ e(r);
|
|
3
6
|
export {
|
|
4
|
-
|
|
7
|
+
m as default
|
|
5
8
|
};
|
package/dist/_virtual/index3.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import { __require as t } from "../node_modules/eventemitter3/index2.js";
|
|
4
|
-
var r = t();
|
|
5
|
-
const m = /* @__PURE__ */ e(r);
|
|
2
|
+
var e = { exports: {} };
|
|
6
3
|
export {
|
|
7
|
-
|
|
4
|
+
e as __module
|
|
8
5
|
};
|
package/dist/_virtual/index6.js
CHANGED
package/dist/_virtual/index7.js
CHANGED
|
@@ -1,39 +1,48 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import
|
|
4
|
-
import { cn as g } from "../../lib/utils.js";
|
|
5
|
-
import { buttonVariants as x } from "./button.js";
|
|
6
|
-
import { Icon as h } from "./icon.js";
|
|
2
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { buttonVariants as w } from "./button.js";
|
|
7
4
|
import { Calendar as v } from "./calendar.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
import { Icon as y } from "./icon.js";
|
|
6
|
+
import { Popover as C, PopoverTrigger as j, PopoverContent as N } from "./popover.js";
|
|
7
|
+
import { cn as S } from "../../lib/utils.js";
|
|
8
|
+
import * as u from "react";
|
|
9
|
+
import { formatDate as k } from "../../node_modules/date-fns/format.js";
|
|
10
|
+
import { isSameDay as I } from "../../node_modules/date-fns/isSameDay.js";
|
|
11
|
+
function B({
|
|
12
|
+
value: i,
|
|
13
|
+
onChange: s,
|
|
14
|
+
placeholder: p = "Seleziona data",
|
|
15
|
+
dateFormat: g = "PPP",
|
|
16
|
+
className: h,
|
|
17
|
+
buttonVariant: x = "default",
|
|
17
18
|
disabled: t = !1,
|
|
18
|
-
size: o = "default"
|
|
19
|
+
size: o = "default",
|
|
20
|
+
firstDate: d,
|
|
21
|
+
lastDate: f,
|
|
22
|
+
availableDates: m
|
|
19
23
|
}) {
|
|
20
|
-
const [
|
|
21
|
-
|
|
22
|
-
i
|
|
23
|
-
}, [
|
|
24
|
-
const
|
|
25
|
-
|
|
24
|
+
const [n, c] = u.useState(i);
|
|
25
|
+
u.useEffect(() => {
|
|
26
|
+
c(i);
|
|
27
|
+
}, [i]);
|
|
28
|
+
const b = (a) => {
|
|
29
|
+
c(a), s && s(a);
|
|
26
30
|
};
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
let r = [];
|
|
32
|
+
return d && r.push({ before: d }), f && r.push({ after: f }), m?.length && r.push(
|
|
33
|
+
(a) => !m.some(
|
|
34
|
+
(P) => I(P, a)
|
|
35
|
+
)
|
|
36
|
+
), t && (r = [!0]), /* @__PURE__ */ l(C, { open: t ? !1 : void 0, children: [
|
|
37
|
+
/* @__PURE__ */ e(j, { asChild: !0, children: /* @__PURE__ */ e(
|
|
29
38
|
"div",
|
|
30
39
|
{
|
|
31
|
-
className:
|
|
32
|
-
|
|
40
|
+
className: S(
|
|
41
|
+
w({ variant: x, size: o }),
|
|
33
42
|
"border-d-input text-d-foreground hover:bg-d-accent bg-d-input ring-offset-background data-[placeholder]:text-d-muted-foreground focus:ring-d-ring flex items-center justify-between border px-3 py-2 font-normal whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none [&>span]:line-clamp-1",
|
|
34
|
-
!
|
|
43
|
+
!n && "text-d-muted-foreground",
|
|
35
44
|
t && "cursor-not-allowed opacity-50",
|
|
36
|
-
|
|
45
|
+
h,
|
|
37
46
|
o === "sm" && "text-xs",
|
|
38
47
|
o === "lg" && "text-lg"
|
|
39
48
|
),
|
|
@@ -42,30 +51,30 @@ function E({
|
|
|
42
51
|
tabIndex: t ? -1 : 0,
|
|
43
52
|
onClick: t ? void 0 : () => {
|
|
44
53
|
},
|
|
45
|
-
children: /* @__PURE__ */
|
|
54
|
+
children: /* @__PURE__ */ l("div", { className: "flex w-full items-center justify-between gap-2", children: [
|
|
46
55
|
/* @__PURE__ */ e(
|
|
47
|
-
|
|
56
|
+
y,
|
|
48
57
|
{
|
|
49
58
|
name: "Calendar",
|
|
50
59
|
size: o === "default" ? "md" : o === "sm" ? "xs" : "sm"
|
|
51
60
|
}
|
|
52
61
|
),
|
|
53
|
-
|
|
62
|
+
n ? /* @__PURE__ */ e("span", { children: k(n, g) }) : /* @__PURE__ */ e("span", { className: "text-d-muted-foreground", children: p })
|
|
54
63
|
] })
|
|
55
64
|
}
|
|
56
65
|
) }),
|
|
57
|
-
/* @__PURE__ */ e(
|
|
66
|
+
/* @__PURE__ */ e(N, { className: "w-auto p-0", children: /* @__PURE__ */ e(
|
|
58
67
|
v,
|
|
59
68
|
{
|
|
60
69
|
mode: "single",
|
|
61
|
-
selected:
|
|
62
|
-
onSelect:
|
|
63
|
-
|
|
64
|
-
disabled:
|
|
70
|
+
selected: n,
|
|
71
|
+
onSelect: b,
|
|
72
|
+
autoFocus: !0,
|
|
73
|
+
disabled: r
|
|
65
74
|
}
|
|
66
75
|
) })
|
|
67
76
|
] });
|
|
68
77
|
}
|
|
69
78
|
export {
|
|
70
|
-
|
|
79
|
+
B as DatePicker
|
|
71
80
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1005,7 +1005,7 @@ export declare interface DataTableState {
|
|
|
1005
1005
|
computedSorting?: DataTableSorting;
|
|
1006
1006
|
}
|
|
1007
1007
|
|
|
1008
|
-
export declare function DatePicker({ value, onChange, placeholder, dateFormat, className, buttonVariant, disabled, size, }: DatePickerProps): JSX.Element;
|
|
1008
|
+
export declare function DatePicker({ value, onChange, placeholder, dateFormat, className, buttonVariant, disabled, size, firstDate, lastDate, availableDates, }: DatePickerProps): JSX.Element;
|
|
1009
1009
|
|
|
1010
1010
|
declare interface DatePickerProps {
|
|
1011
1011
|
value?: Date;
|
|
@@ -1016,6 +1016,9 @@ declare interface DatePickerProps {
|
|
|
1016
1016
|
buttonVariant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
|
|
1017
1017
|
disabled?: boolean;
|
|
1018
1018
|
size?: "sm" | "default" | "lg";
|
|
1019
|
+
firstDate?: Date;
|
|
1020
|
+
lastDate?: Date;
|
|
1021
|
+
availableDates?: Date[];
|
|
1019
1022
|
}
|
|
1020
1023
|
|
|
1021
1024
|
export declare function Dialog({ ...props }: React_2.ComponentProps<typeof DialogPrimitive.Root>): JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { __module as e } from "../../../_virtual/
|
|
2
|
+
import { __module as e } from "../../../_virtual/index3.js";
|
|
3
3
|
import { __require as i } from "../cjs/use-sync-external-store-shim.production.js";
|
|
4
4
|
import { __require as o } from "../cjs/use-sync-external-store-shim.development.js";
|
|
5
5
|
var r;
|