laif-ds 0.2.37 → 0.2.38
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/index3.js +5 -5
- package/dist/_virtual/index4.js +5 -5
- package/dist/_virtual/index5.js +4 -4
- package/dist/components/ui/accordion.js +5 -5
- package/dist/components/ui/alert-dialog.js +6 -6
- package/dist/components/ui/breadcrumb.js +4 -4
- package/dist/components/ui/calendar.js +44 -44
- package/dist/components/ui/context-menu.js +13 -13
- package/dist/components/ui/date-picker.js +62 -54
- package/dist/components/ui/dialog.js +4 -4
- package/dist/components/ui/hover-card.js +4 -4
- package/dist/components/ui/menubar.js +14 -14
- package/dist/components/ui/popover.js +4 -4
- package/dist/components/ui/select.js +13 -13
- package/dist/components/ui/sheet.js +5 -5
- package/dist/components/ui/tabs.js +4 -4
- package/dist/index.d.ts +11 -5
- package/dist/index.js +144 -144
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +4 -4
- package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.js +5 -5
- package/dist/node_modules/@radix-ui/react-context-menu/dist/index.js +12 -12
- package/dist/node_modules/@radix-ui/react-menubar/dist/index.js +14 -14
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/node_modules/vaul/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/_virtual/index3.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getDefaultExportFromCjs as
|
|
3
|
-
import { __require as
|
|
4
|
-
var
|
|
5
|
-
const
|
|
2
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
3
|
+
import { __require as e } from "../node_modules/style-to-js/cjs/index.js";
|
|
4
|
+
var t = e();
|
|
5
|
+
const a = /* @__PURE__ */ r(t);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as default
|
|
8
8
|
};
|
package/dist/_virtual/index4.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getDefaultExportFromCjs as
|
|
3
|
-
import { __require as
|
|
4
|
-
var t =
|
|
5
|
-
const
|
|
2
|
+
import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
|
|
3
|
+
import { __require as r } from "../node_modules/extend/index.js";
|
|
4
|
+
var t = r();
|
|
5
|
+
const x = /* @__PURE__ */ e(t);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
x as default
|
|
8
8
|
};
|
package/dist/_virtual/index5.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
|
|
3
|
-
import { __require as
|
|
4
|
-
var
|
|
5
|
-
const
|
|
3
|
+
import { __require as t } from "../node_modules/eventemitter3/index2.js";
|
|
4
|
+
var r = t();
|
|
5
|
+
const m = /* @__PURE__ */ e(r);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
m as default
|
|
8
8
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
3
|
-
import { Root as i,
|
|
3
|
+
import { Root as i, Content as s, Item as d, Header as c, Trigger as l } from "../../node_modules/@radix-ui/react-accordion/dist/index.js";
|
|
4
4
|
import { cn as r } from "../../lib/utils.js";
|
|
5
5
|
import m from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
6
6
|
function b({ ...e }) {
|
|
@@ -8,7 +8,7 @@ function b({ ...e }) {
|
|
|
8
8
|
}
|
|
9
9
|
function x({ className: e, ...o }) {
|
|
10
10
|
return /* @__PURE__ */ t(
|
|
11
|
-
|
|
11
|
+
d,
|
|
12
12
|
{
|
|
13
13
|
"data-slot": "accordion-item",
|
|
14
14
|
className: r("border-d-border border-b last:border-b-0", e),
|
|
@@ -21,8 +21,8 @@ function v({
|
|
|
21
21
|
children: o,
|
|
22
22
|
...n
|
|
23
23
|
}) {
|
|
24
|
-
return /* @__PURE__ */ t(
|
|
25
|
-
|
|
24
|
+
return /* @__PURE__ */ t(c, { className: "flex", children: /* @__PURE__ */ a(
|
|
25
|
+
l,
|
|
26
26
|
{
|
|
27
27
|
"data-slot": "accordion-trigger",
|
|
28
28
|
className: r(
|
|
@@ -43,7 +43,7 @@ function h({
|
|
|
43
43
|
...n
|
|
44
44
|
}) {
|
|
45
45
|
return /* @__PURE__ */ t(
|
|
46
|
-
|
|
46
|
+
s,
|
|
47
47
|
{
|
|
48
48
|
"data-slot": "accordion-content",
|
|
49
49
|
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
3
|
-
import { Root as n,
|
|
3
|
+
import { Root as n, Action as i, Cancel as s, Content as d, Description as c, Title as g, Trigger as u, Portal as f, Overlay as m } from "../../node_modules/@radix-ui/react-alert-dialog/dist/index.js";
|
|
4
4
|
import { buttonVariants as l } from "./button.js";
|
|
5
5
|
import { cn as o } from "../../lib/utils.js";
|
|
6
6
|
function N({ ...t }) {
|
|
7
7
|
return /* @__PURE__ */ e(n, { "data-slot": "alert-dialog", ...t });
|
|
8
8
|
}
|
|
9
9
|
function y({ ...t }) {
|
|
10
|
-
return /* @__PURE__ */ e(
|
|
10
|
+
return /* @__PURE__ */ e(u, { "data-slot": "alert-dialog-trigger", ...t });
|
|
11
11
|
}
|
|
12
12
|
function p({ ...t }) {
|
|
13
13
|
return /* @__PURE__ */ e(f, { "data-slot": "alert-dialog-portal", ...t });
|
|
@@ -29,7 +29,7 @@ function T({ className: t, ...a }) {
|
|
|
29
29
|
return /* @__PURE__ */ r(p, { children: [
|
|
30
30
|
/* @__PURE__ */ e(x, {}),
|
|
31
31
|
/* @__PURE__ */ e(
|
|
32
|
-
|
|
32
|
+
d,
|
|
33
33
|
{
|
|
34
34
|
"data-slot": "alert-dialog-content",
|
|
35
35
|
className: o(
|
|
@@ -66,7 +66,7 @@ function C({ className: t, ...a }) {
|
|
|
66
66
|
}
|
|
67
67
|
function h({ className: t, ...a }) {
|
|
68
68
|
return /* @__PURE__ */ e(
|
|
69
|
-
|
|
69
|
+
g,
|
|
70
70
|
{
|
|
71
71
|
"data-slot": "alert-dialog-title",
|
|
72
72
|
className: o("text-lg font-semibold", t),
|
|
@@ -89,7 +89,7 @@ function z({
|
|
|
89
89
|
}
|
|
90
90
|
function j({ className: t, ...a }) {
|
|
91
91
|
return /* @__PURE__ */ e(
|
|
92
|
-
|
|
92
|
+
i,
|
|
93
93
|
{
|
|
94
94
|
className: o(l(), t),
|
|
95
95
|
...a
|
|
@@ -98,7 +98,7 @@ function j({ className: t, ...a }) {
|
|
|
98
98
|
}
|
|
99
99
|
function O({ className: t, ...a }) {
|
|
100
100
|
return /* @__PURE__ */ e(
|
|
101
|
-
|
|
101
|
+
s,
|
|
102
102
|
{
|
|
103
103
|
className: o(l({ variant: "ghost" }), t),
|
|
104
104
|
...a
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsx as a, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
import { Root as o } from "../../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
4
4
|
import { cn as t } from "../../lib/utils.js";
|
|
5
|
-
import i from "../../node_modules/lucide-react/dist/esm/icons/
|
|
6
|
-
import l from "../../node_modules/lucide-react/dist/esm/icons/
|
|
5
|
+
import i from "../../node_modules/lucide-react/dist/esm/icons/ellipsis.js";
|
|
6
|
+
import l from "../../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
|
|
7
7
|
function f({ ...r }) {
|
|
8
8
|
return /* @__PURE__ */ a("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...r });
|
|
9
9
|
}
|
|
@@ -70,7 +70,7 @@ function B({
|
|
|
70
70
|
"aria-hidden": "true",
|
|
71
71
|
className: t("[&>svg]:size-3.5", e),
|
|
72
72
|
...s,
|
|
73
|
-
children: r ?? /* @__PURE__ */ a(
|
|
73
|
+
children: r ?? /* @__PURE__ */ a(l, {})
|
|
74
74
|
}
|
|
75
75
|
);
|
|
76
76
|
}
|
|
@@ -87,7 +87,7 @@ function k({
|
|
|
87
87
|
className: t("flex size-9 items-center justify-center", r),
|
|
88
88
|
...e,
|
|
89
89
|
children: [
|
|
90
|
-
/* @__PURE__ */ a(
|
|
90
|
+
/* @__PURE__ */ a(i, { className: "size-4" }),
|
|
91
91
|
/* @__PURE__ */ a("span", { className: "sr-only", children: "More" })
|
|
92
92
|
]
|
|
93
93
|
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as d } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
4
|
-
import { buttonVariants as
|
|
3
|
+
import * as m from "react";
|
|
4
|
+
import { buttonVariants as f, Button as x } from "./button.js";
|
|
5
5
|
import { cn as e } from "../../lib/utils.js";
|
|
6
|
-
import { getDefaultClassNames as
|
|
7
|
-
import { DayPicker as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
function
|
|
12
|
-
className:
|
|
13
|
-
classNames:
|
|
6
|
+
import { getDefaultClassNames as p } from "../../node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js";
|
|
7
|
+
import { DayPicker as b } from "../../node_modules/react-day-picker/dist/esm/DayPicker.js";
|
|
8
|
+
import y from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.js";
|
|
9
|
+
import w from "../../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
|
|
10
|
+
import _ from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
11
|
+
function R({
|
|
12
|
+
className: u,
|
|
13
|
+
classNames: c,
|
|
14
14
|
showOutsideDays: r = !0,
|
|
15
|
-
captionLayout: l = "label",
|
|
16
15
|
buttonVariant: s = "ghost",
|
|
17
|
-
formatters:
|
|
18
|
-
components:
|
|
19
|
-
...
|
|
16
|
+
formatters: i,
|
|
17
|
+
components: l,
|
|
18
|
+
...g
|
|
20
19
|
}) {
|
|
21
|
-
const t =
|
|
20
|
+
const t = p();
|
|
22
21
|
return /* @__PURE__ */ d(
|
|
23
|
-
|
|
22
|
+
b,
|
|
24
23
|
{
|
|
25
24
|
showOutsideDays: r,
|
|
25
|
+
captionLayout: "dropdown",
|
|
26
|
+
reverseYears: !0,
|
|
26
27
|
className: e(
|
|
27
28
|
"bg-d-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
28
29
|
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
29
30
|
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
30
|
-
|
|
31
|
+
u
|
|
31
32
|
),
|
|
32
|
-
captionLayout: l,
|
|
33
33
|
formatters: {
|
|
34
34
|
formatMonthDropdown: (a) => a.toLocaleString("default", { month: "short" }),
|
|
35
|
-
...
|
|
35
|
+
...i
|
|
36
36
|
},
|
|
37
37
|
classNames: {
|
|
38
38
|
root: e("w-fit", t.root),
|
|
@@ -46,12 +46,12 @@ function B({
|
|
|
46
46
|
t.nav
|
|
47
47
|
),
|
|
48
48
|
button_previous: e(
|
|
49
|
-
|
|
49
|
+
f({ variant: s }),
|
|
50
50
|
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
51
51
|
t.button_previous
|
|
52
52
|
),
|
|
53
53
|
button_next: e(
|
|
54
|
-
|
|
54
|
+
f({ variant: s }),
|
|
55
55
|
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
56
56
|
t.button_next
|
|
57
57
|
),
|
|
@@ -70,7 +70,7 @@ function B({
|
|
|
70
70
|
dropdown: e("absolute inset-0 opacity-0", t.dropdown),
|
|
71
71
|
caption_label: e(
|
|
72
72
|
"select-none font-medium",
|
|
73
|
-
|
|
73
|
+
g?.captionLayout === "label" ? "text-sm" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-d-muted-foreground [&>svg]:size-3.5",
|
|
74
74
|
t.caption_label
|
|
75
75
|
),
|
|
76
76
|
table: "w-full border-collapse",
|
|
@@ -111,7 +111,7 @@ function B({
|
|
|
111
111
|
t.disabled
|
|
112
112
|
),
|
|
113
113
|
hidden: e("invisible", t.hidden),
|
|
114
|
-
...
|
|
114
|
+
...c
|
|
115
115
|
},
|
|
116
116
|
components: {
|
|
117
117
|
Root: ({ className: a, rootRef: n, ...o }) => /* @__PURE__ */ d(
|
|
@@ -123,51 +123,51 @@ function B({
|
|
|
123
123
|
...o
|
|
124
124
|
}
|
|
125
125
|
),
|
|
126
|
-
Chevron: ({ className: a, orientation: n, ...o }) => n === "left" ? /* @__PURE__ */ d(
|
|
127
|
-
|
|
126
|
+
Chevron: ({ className: a, orientation: n, ...o }) => n === "left" ? /* @__PURE__ */ d(y, { className: e("size-4", a), ...o }) : n === "right" ? /* @__PURE__ */ d(
|
|
127
|
+
w,
|
|
128
128
|
{
|
|
129
129
|
className: e("size-4", a),
|
|
130
130
|
...o
|
|
131
131
|
}
|
|
132
|
-
) : /* @__PURE__ */ d(
|
|
133
|
-
DayButton:
|
|
132
|
+
) : /* @__PURE__ */ d(_, { className: e("size-4", a), ...o }),
|
|
133
|
+
DayButton: h,
|
|
134
134
|
WeekNumber: ({ children: a, ...n }) => /* @__PURE__ */ d("td", { ...n, children: /* @__PURE__ */ d("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children: a }) }),
|
|
135
|
-
...
|
|
135
|
+
...l
|
|
136
136
|
},
|
|
137
|
-
...
|
|
137
|
+
...g
|
|
138
138
|
}
|
|
139
139
|
);
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
className:
|
|
143
|
-
day:
|
|
141
|
+
function h({
|
|
142
|
+
className: u,
|
|
143
|
+
day: c,
|
|
144
144
|
modifiers: r,
|
|
145
|
-
...
|
|
145
|
+
...s
|
|
146
146
|
}) {
|
|
147
|
-
const
|
|
148
|
-
return
|
|
149
|
-
r.focused &&
|
|
147
|
+
const i = p(), l = m.useRef(null);
|
|
148
|
+
return m.useEffect(() => {
|
|
149
|
+
r.focused && l.current?.focus();
|
|
150
150
|
}, [r.focused]), /* @__PURE__ */ d(
|
|
151
|
-
|
|
151
|
+
x,
|
|
152
152
|
{
|
|
153
|
-
ref:
|
|
153
|
+
ref: l,
|
|
154
154
|
variant: "ghost",
|
|
155
155
|
size: "icon",
|
|
156
|
-
"data-day":
|
|
156
|
+
"data-day": c.date.toLocaleDateString(),
|
|
157
157
|
"data-selected-single": r.selected && !r.range_start && !r.range_end && !r.range_middle,
|
|
158
158
|
"data-range-start": r.range_start,
|
|
159
159
|
"data-range-end": r.range_end,
|
|
160
160
|
"data-range-middle": r.range_middle,
|
|
161
161
|
className: e(
|
|
162
162
|
"data-[selected-single=true]:bg-d-primary data-[selected-single=true]:text-d-primary-foreground data-[range-middle=true]:bg-d-accent data-[range-middle=true]:text-d-accent-foreground data-[range-start=true]:bg-d-primary data-[range-start=true]:text-d-primary-foreground data-[range-end=true]:bg-d-primary data-[range-end=true]:text-d-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-d-ring/50 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:ring-[1px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
i.day,
|
|
164
|
+
u
|
|
165
165
|
),
|
|
166
|
-
...
|
|
166
|
+
...s
|
|
167
167
|
}
|
|
168
168
|
);
|
|
169
169
|
}
|
|
170
170
|
export {
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
R as Calendar,
|
|
172
|
+
h as CalendarDayButton
|
|
173
173
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
3
|
-
import { Root as u,
|
|
3
|
+
import { Root as u, CheckboxItem as c, ItemIndicator as d, Portal as i, Content as l, Group as m, Item as f, Label as x, RadioGroup as p, RadioItem as g, Separator as b, Sub as v, SubContent as h, SubTrigger as C, Trigger as z } from "../../node_modules/@radix-ui/react-context-menu/dist/index.js";
|
|
4
4
|
import { cn as a } from "../../lib/utils.js";
|
|
5
5
|
import M from "../../node_modules/lucide-react/dist/esm/icons/check.js";
|
|
6
6
|
import y from "../../node_modules/lucide-react/dist/esm/icons/circle.js";
|
|
@@ -13,17 +13,17 @@ function G({
|
|
|
13
13
|
function T({
|
|
14
14
|
...t
|
|
15
15
|
}) {
|
|
16
|
-
return /* @__PURE__ */ e(
|
|
16
|
+
return /* @__PURE__ */ e(z, { "data-slot": "context-menu-trigger", ...t });
|
|
17
17
|
}
|
|
18
18
|
function j({
|
|
19
19
|
...t
|
|
20
20
|
}) {
|
|
21
|
-
return /* @__PURE__ */ e(
|
|
21
|
+
return /* @__PURE__ */ e(m, { "data-slot": "context-menu-group", ...t });
|
|
22
22
|
}
|
|
23
23
|
function L({
|
|
24
24
|
...t
|
|
25
25
|
}) {
|
|
26
|
-
return /* @__PURE__ */ e(
|
|
26
|
+
return /* @__PURE__ */ e(i, { "data-slot": "context-menu-portal", ...t });
|
|
27
27
|
}
|
|
28
28
|
function P({
|
|
29
29
|
...t
|
|
@@ -34,7 +34,7 @@ function q({
|
|
|
34
34
|
...t
|
|
35
35
|
}) {
|
|
36
36
|
return /* @__PURE__ */ e(
|
|
37
|
-
|
|
37
|
+
p,
|
|
38
38
|
{
|
|
39
39
|
"data-slot": "context-menu-radio-group",
|
|
40
40
|
...t
|
|
@@ -84,7 +84,7 @@ function D({
|
|
|
84
84
|
className: t,
|
|
85
85
|
...n
|
|
86
86
|
}) {
|
|
87
|
-
return /* @__PURE__ */ e(
|
|
87
|
+
return /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
|
|
88
88
|
l,
|
|
89
89
|
{
|
|
90
90
|
"data-slot": "context-menu-content",
|
|
@@ -103,7 +103,7 @@ function E({
|
|
|
103
103
|
...s
|
|
104
104
|
}) {
|
|
105
105
|
return /* @__PURE__ */ e(
|
|
106
|
-
|
|
106
|
+
f,
|
|
107
107
|
{
|
|
108
108
|
"data-slot": "context-menu-item",
|
|
109
109
|
"data-inset": n,
|
|
@@ -123,7 +123,7 @@ function F({
|
|
|
123
123
|
...s
|
|
124
124
|
}) {
|
|
125
125
|
return /* @__PURE__ */ r(
|
|
126
|
-
|
|
126
|
+
c,
|
|
127
127
|
{
|
|
128
128
|
"data-slot": "context-menu-checkbox-item",
|
|
129
129
|
className: a(
|
|
@@ -133,7 +133,7 @@ function F({
|
|
|
133
133
|
checked: o,
|
|
134
134
|
...s,
|
|
135
135
|
children: [
|
|
136
|
-
/* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(
|
|
136
|
+
/* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(M, { className: "size-4" }) }) }),
|
|
137
137
|
n
|
|
138
138
|
]
|
|
139
139
|
}
|
|
@@ -145,7 +145,7 @@ function H({
|
|
|
145
145
|
...o
|
|
146
146
|
}) {
|
|
147
147
|
return /* @__PURE__ */ r(
|
|
148
|
-
|
|
148
|
+
g,
|
|
149
149
|
{
|
|
150
150
|
"data-slot": "context-menu-radio-item",
|
|
151
151
|
className: a(
|
|
@@ -154,7 +154,7 @@ function H({
|
|
|
154
154
|
),
|
|
155
155
|
...o,
|
|
156
156
|
children: [
|
|
157
|
-
/* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(
|
|
157
|
+
/* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(y, { className: "size-2 fill-current" }) }) }),
|
|
158
158
|
n
|
|
159
159
|
]
|
|
160
160
|
}
|
|
@@ -166,7 +166,7 @@ function J({
|
|
|
166
166
|
...o
|
|
167
167
|
}) {
|
|
168
168
|
return /* @__PURE__ */ e(
|
|
169
|
-
|
|
169
|
+
x,
|
|
170
170
|
{
|
|
171
171
|
"data-slot": "context-menu-label",
|
|
172
172
|
"data-inset": n,
|
|
@@ -183,7 +183,7 @@ function K({
|
|
|
183
183
|
...n
|
|
184
184
|
}) {
|
|
185
185
|
return /* @__PURE__ */ e(
|
|
186
|
-
|
|
186
|
+
b,
|
|
187
187
|
{
|
|
188
188
|
"data-slot": "context-menu-separator",
|
|
189
189
|
className: a("bg-d-border -mx-1 my-1 h-px", t),
|
|
@@ -1,80 +1,88 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { buttonVariants as
|
|
4
|
-
import { Calendar as
|
|
5
|
-
import { Icon as
|
|
6
|
-
import { Popover as
|
|
7
|
-
import { cn as
|
|
8
|
-
import * as
|
|
9
|
-
import { formatDate as
|
|
10
|
-
import { isSameDay as
|
|
11
|
-
function
|
|
12
|
-
value:
|
|
13
|
-
onChange:
|
|
14
|
-
placeholder:
|
|
15
|
-
dateFormat:
|
|
16
|
-
className:
|
|
17
|
-
buttonVariant:
|
|
18
|
-
disabled:
|
|
19
|
-
size:
|
|
20
|
-
firstDate:
|
|
21
|
-
lastDate:
|
|
22
|
-
availableDates:
|
|
2
|
+
import { jsxs as p, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { buttonVariants as j } from "./button.js";
|
|
4
|
+
import { Calendar as M } from "./calendar.js";
|
|
5
|
+
import { Icon as N } from "./icon.js";
|
|
6
|
+
import { Popover as k, PopoverTrigger as I, PopoverContent as E } from "./popover.js";
|
|
7
|
+
import { cn as F } from "../../lib/utils.js";
|
|
8
|
+
import * as s from "react";
|
|
9
|
+
import { formatDate as R } from "../../node_modules/date-fns/format.js";
|
|
10
|
+
import { isSameDay as T } from "../../node_modules/date-fns/isSameDay.js";
|
|
11
|
+
function L({
|
|
12
|
+
value: h,
|
|
13
|
+
onChange: d,
|
|
14
|
+
placeholder: g = "Seleziona data",
|
|
15
|
+
dateFormat: x = "dd/MM/yyyy",
|
|
16
|
+
className: y,
|
|
17
|
+
buttonVariant: b = "default",
|
|
18
|
+
disabled: o = !1,
|
|
19
|
+
size: n = "default",
|
|
20
|
+
firstDate: f,
|
|
21
|
+
lastDate: i,
|
|
22
|
+
availableDates: u,
|
|
23
|
+
locale: v,
|
|
24
|
+
initialCalendarMonth: m,
|
|
25
|
+
customCalendarProps: w
|
|
23
26
|
}) {
|
|
24
|
-
const [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
const [e, c] = s.useState(h), [C, l] = s.useState(
|
|
28
|
+
m
|
|
29
|
+
);
|
|
30
|
+
s.useEffect(() => {
|
|
31
|
+
c(e), l(e || m);
|
|
32
|
+
}, [e]);
|
|
33
|
+
const P = (r) => {
|
|
34
|
+
c(r), r && l(r), d && d(r);
|
|
30
35
|
};
|
|
31
|
-
let
|
|
32
|
-
return
|
|
33
|
-
(
|
|
34
|
-
(
|
|
36
|
+
let a = [];
|
|
37
|
+
return f && a.push({ before: f }), i && a.push({ after: i }), u?.length && a.push(
|
|
38
|
+
(r) => !u.some(
|
|
39
|
+
(S) => T(S, r)
|
|
35
40
|
)
|
|
36
|
-
),
|
|
37
|
-
/* @__PURE__ */
|
|
41
|
+
), o && (a = [!0]), /* @__PURE__ */ p(k, { open: o ? !1 : void 0, children: [
|
|
42
|
+
/* @__PURE__ */ t(I, { asChild: !0, children: /* @__PURE__ */ t(
|
|
38
43
|
"div",
|
|
39
44
|
{
|
|
40
|
-
className:
|
|
41
|
-
|
|
45
|
+
className: F(
|
|
46
|
+
j({ variant: b, size: n }),
|
|
42
47
|
"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",
|
|
43
|
-
!
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
!e && "text-d-muted-foreground",
|
|
49
|
+
o && "cursor-not-allowed opacity-50",
|
|
50
|
+
y,
|
|
51
|
+
n === "sm" && "text-xs",
|
|
52
|
+
n === "lg" && "text-lg"
|
|
48
53
|
),
|
|
49
|
-
"aria-disabled":
|
|
54
|
+
"aria-disabled": o,
|
|
50
55
|
role: "button",
|
|
51
|
-
tabIndex:
|
|
52
|
-
onClick:
|
|
56
|
+
tabIndex: o ? -1 : 0,
|
|
57
|
+
onClick: o ? void 0 : () => {
|
|
53
58
|
},
|
|
54
|
-
children: /* @__PURE__ */
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
|
|
59
|
+
children: /* @__PURE__ */ p("div", { className: "flex w-full items-center justify-between gap-2", children: [
|
|
60
|
+
/* @__PURE__ */ t(
|
|
61
|
+
N,
|
|
57
62
|
{
|
|
58
63
|
name: "Calendar",
|
|
59
|
-
size:
|
|
64
|
+
size: n === "default" ? "md" : n === "sm" ? "xs" : "sm"
|
|
60
65
|
}
|
|
61
66
|
),
|
|
62
|
-
|
|
67
|
+
e ? /* @__PURE__ */ t("span", { children: R(e, x) }) : /* @__PURE__ */ t("span", { className: "text-d-muted-foreground", children: g })
|
|
63
68
|
] })
|
|
64
69
|
}
|
|
65
70
|
) }),
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
|
|
71
|
+
/* @__PURE__ */ t(E, { className: "w-auto p-0", children: /* @__PURE__ */ t(
|
|
72
|
+
M,
|
|
68
73
|
{
|
|
74
|
+
...w,
|
|
69
75
|
mode: "single",
|
|
70
|
-
selected:
|
|
71
|
-
onSelect:
|
|
76
|
+
selected: e,
|
|
77
|
+
onSelect: P,
|
|
72
78
|
autoFocus: !0,
|
|
73
|
-
disabled:
|
|
79
|
+
disabled: a,
|
|
80
|
+
locale: v,
|
|
81
|
+
defaultMonth: C
|
|
74
82
|
}
|
|
75
83
|
) })
|
|
76
84
|
] });
|
|
77
85
|
}
|
|
78
86
|
export {
|
|
79
|
-
|
|
87
|
+
L as DatePicker
|
|
80
88
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as a, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
import { Root as c,
|
|
3
|
+
import { Root as c, Content as g, Close as l, Description as f, Title as u, Trigger as m, Portal as p, Overlay as x } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
4
4
|
import { cn as o } from "../../lib/utils.js";
|
|
5
5
|
import D from "../../node_modules/lucide-react/dist/esm/icons/x.js";
|
|
6
6
|
function C({
|
|
@@ -11,7 +11,7 @@ function C({
|
|
|
11
11
|
function k({
|
|
12
12
|
...t
|
|
13
13
|
}) {
|
|
14
|
-
return /* @__PURE__ */ a(
|
|
14
|
+
return /* @__PURE__ */ a(m, { "data-slot": "dialog-trigger", ...t });
|
|
15
15
|
}
|
|
16
16
|
function v({
|
|
17
17
|
...t
|
|
@@ -54,7 +54,7 @@ function j({
|
|
|
54
54
|
return /* @__PURE__ */ n(v, { "data-slot": "dialog-portal", children: [
|
|
55
55
|
/* @__PURE__ */ a(b, {}),
|
|
56
56
|
/* @__PURE__ */ n(
|
|
57
|
-
|
|
57
|
+
g,
|
|
58
58
|
{
|
|
59
59
|
"data-slot": "dialog-content",
|
|
60
60
|
onPointerDownOutside: (s) => {
|
|
@@ -118,7 +118,7 @@ function F({
|
|
|
118
118
|
...e
|
|
119
119
|
}) {
|
|
120
120
|
return /* @__PURE__ */ a(
|
|
121
|
-
|
|
121
|
+
f,
|
|
122
122
|
{
|
|
123
123
|
"data-slot": "dialog-description",
|
|
124
124
|
className: o("text-d-secondary-foreground text-sm", t),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { Root as d,
|
|
3
|
+
import { Root as d, Portal as n, Content as i, Trigger as s } from "../../node_modules/@radix-ui/react-hover-card/dist/index.js";
|
|
4
4
|
import { cn as m } from "../../lib/utils.js";
|
|
5
5
|
function p({
|
|
6
6
|
...t
|
|
@@ -10,7 +10,7 @@ function p({
|
|
|
10
10
|
function u({
|
|
11
11
|
...t
|
|
12
12
|
}) {
|
|
13
|
-
return /* @__PURE__ */ o(
|
|
13
|
+
return /* @__PURE__ */ o(s, { "data-slot": "hover-d-card-trigger", ...t });
|
|
14
14
|
}
|
|
15
15
|
function g({
|
|
16
16
|
className: t,
|
|
@@ -18,8 +18,8 @@ function g({
|
|
|
18
18
|
sideOffset: r = 4,
|
|
19
19
|
...a
|
|
20
20
|
}) {
|
|
21
|
-
return /* @__PURE__ */ o(
|
|
22
|
-
|
|
21
|
+
return /* @__PURE__ */ o(n, { "data-slot": "hover-d-card-portal", children: /* @__PURE__ */ o(
|
|
22
|
+
i,
|
|
23
23
|
{
|
|
24
24
|
"data-slot": "hover-d-card-content",
|
|
25
25
|
align: e,
|