laif-ds 0.1.85 → 0.1.88
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/app-editor.js +58 -58
- package/dist/components/ui/app-multiple-select-dropdown.js +111 -88
- package/dist/components/ui/async-select.js +182 -151
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/checkbox.js +5 -5
- package/dist/components/ui/multiple-selector.js +202 -190
- package/dist/components/ui/navigation-menu.js +2 -2
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/switch.js +5 -5
- package/dist/components/ui/weekly-calendar/appointment-card.js +39 -39
- package/dist/components/ui/weekly-calendar/calendar-header.js +2 -2
- package/dist/components/ui/weekly-calendar/day-column.js +1 -1
- package/dist/index.d.ts +4 -4
- 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/styles.css +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
- package/dist/components/ui/command-portal.js +0 -67
|
@@ -1,93 +1,93 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as l, jsxs as s } from "react/jsx-runtime";
|
|
3
3
|
import { useMemo as n } from "react";
|
|
4
4
|
import c from "../../../_virtual/dayjs.min.js";
|
|
5
5
|
import { useCalendar as b } from "./calendar-context.js";
|
|
6
6
|
import { l as m } from "../../../_virtual/lodash.js";
|
|
7
7
|
import { hexContrast as v, hexToRgba as u, cn as g } from "../../../lib/utils.js";
|
|
8
|
-
import { TooltipProvider as
|
|
8
|
+
import { TooltipProvider as T, Tooltip as N, TooltipTrigger as y, TooltipContent as C } from "../tooltip.js";
|
|
9
9
|
import { Typo as k } from "../typo.js";
|
|
10
|
-
const
|
|
10
|
+
const H = ({ appointment: e }) => {
|
|
11
11
|
const { setSelectedAppointmentId: h } = b(), f = n(() => {
|
|
12
|
-
if (
|
|
12
|
+
if (e.color)
|
|
13
13
|
return {
|
|
14
|
-
backgroundColor: u(
|
|
15
|
-
borderColor: u(
|
|
16
|
-
color: v(
|
|
14
|
+
backgroundColor: u(e.color, 0.75),
|
|
15
|
+
borderColor: u(e.color, 1),
|
|
16
|
+
color: v(e.color),
|
|
17
17
|
backdropFilter: "blur(5px)"
|
|
18
18
|
};
|
|
19
|
-
}, [
|
|
20
|
-
const
|
|
19
|
+
}, [e.color]), o = e.endTime || c(`2000-01-01 ${e.startTime}`).add(1, "hour").format("HH:mm"), x = n(() => {
|
|
20
|
+
const r = c(`2000-01-01 ${e.startTime}`), a = c(`2000-01-01 ${o}`).diff(r, "minute"), i = Math.floor(a / 60), d = a % 60;
|
|
21
21
|
return i === 0 ? `${d}m` : d === 0 ? `${i}h` : `${i}h ${d}m`;
|
|
22
|
-
}, [
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
22
|
+
}, [e.startTime, o]);
|
|
23
|
+
return /* @__PURE__ */ l(T, { delayDuration: 300, children: /* @__PURE__ */ s(N, { children: [
|
|
24
|
+
/* @__PURE__ */ l(y, { asChild: !0, children: /* @__PURE__ */ s(
|
|
25
25
|
"div",
|
|
26
26
|
{
|
|
27
|
-
onClick: (
|
|
28
|
-
|
|
27
|
+
onClick: (r) => {
|
|
28
|
+
r.preventDefault(), r.stopPropagation(), h(e.id);
|
|
29
29
|
},
|
|
30
30
|
style: f,
|
|
31
31
|
className: g(
|
|
32
32
|
"border-d-border flex h-full cursor-pointer flex-col justify-start rounded-r-md border border-l-4 p-2 shadow-md transition-all duration-200 ease-in-out hover:scale-105",
|
|
33
|
-
|
|
33
|
+
e.className
|
|
34
34
|
),
|
|
35
35
|
children: [
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
|
|
36
|
+
/* @__PURE__ */ l("div", { className: "text-sm font-semibold", children: e?.title?.length > 15 ? e?.title?.slice(0, 15) + "..." : e?.title }),
|
|
37
|
+
/* @__PURE__ */ s("div", { className: "text-xs", children: [
|
|
38
|
+
e?.startTime,
|
|
39
39
|
" - ",
|
|
40
|
-
|
|
40
|
+
o
|
|
41
41
|
] }),
|
|
42
|
-
|
|
42
|
+
e?.attributes?.filter((r) => r.showPreview).map((r, t) => /* @__PURE__ */ s(
|
|
43
43
|
"div",
|
|
44
44
|
{
|
|
45
45
|
className: "bg-d-background/30 mt-1 rounded p-1 text-xs",
|
|
46
46
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ l("span", { className: "font-semibold", children: r.key }),
|
|
48
48
|
":",
|
|
49
49
|
" ",
|
|
50
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ l("span", { className: "font-medium", children: r.value })
|
|
51
51
|
]
|
|
52
52
|
},
|
|
53
|
-
|
|
53
|
+
t
|
|
54
54
|
))
|
|
55
55
|
]
|
|
56
56
|
}
|
|
57
57
|
) }),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
/* @__PURE__ */ s(C, { side: "right", variant: "card", children: [
|
|
59
|
+
e?.title && /* @__PURE__ */ s(k, { children: [
|
|
60
|
+
e?.title,
|
|
61
61
|
" (",
|
|
62
62
|
x,
|
|
63
63
|
")"
|
|
64
64
|
] }),
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
|
|
65
|
+
/* @__PURE__ */ s("div", { className: "text-d-accent-foreground", children: [
|
|
66
|
+
e?.startTime,
|
|
67
67
|
" - ",
|
|
68
|
-
|
|
68
|
+
o
|
|
69
69
|
] }),
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ s("div", { className: "mt-2 mb-3.5 flex flex-col", children: [
|
|
71
|
+
/* @__PURE__ */ l("span", { className: "font-medium", children: "Descrizione:" }),
|
|
72
|
+
/* @__PURE__ */ l("span", { className: "text-d-accent-foreground text-xs", children: e?.description || "-" })
|
|
73
73
|
] }),
|
|
74
|
-
|
|
74
|
+
e?.attributes && e.attributes.filter((r) => r.showTooltip).length > 0 && /* @__PURE__ */ l("div", { className: "space-y-1", children: e.attributes.filter((r) => r.showTooltip).map((r, t) => /* @__PURE__ */ s(
|
|
75
75
|
"div",
|
|
76
76
|
{
|
|
77
77
|
className: "flex items-start justify-between gap-4 py-1 text-right",
|
|
78
78
|
children: [
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
m.upperFirst(
|
|
79
|
+
/* @__PURE__ */ s("span", { className: "font-medium", children: [
|
|
80
|
+
m.upperFirst(r.key),
|
|
81
81
|
":"
|
|
82
82
|
] }),
|
|
83
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ l("span", { className: "text-d-accent-foreground max-w-[200px]", children: typeof r.value == "string" ? m.upperFirst(r.value) : r.value })
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
|
-
|
|
87
|
-
)) })
|
|
86
|
+
t
|
|
87
|
+
)) })
|
|
88
88
|
] })
|
|
89
89
|
] }) });
|
|
90
90
|
};
|
|
91
91
|
export {
|
|
92
|
-
|
|
92
|
+
H as AppointmentCard
|
|
93
93
|
};
|
|
@@ -31,8 +31,8 @@ const O = () => {
|
|
|
31
31
|
children: l
|
|
32
32
|
}
|
|
33
33
|
),
|
|
34
|
-
/* @__PURE__ */ e("div", { className: "hover:bg-d-accent
|
|
35
|
-
/* @__PURE__ */ e("div", { className: "hover:bg-d-accent
|
|
34
|
+
/* @__PURE__ */ e("div", { className: "hover:bg-d-accent cursor-pointer rounded-full p-2", children: /* @__PURE__ */ e(s, { onClick: c, name: "ChevronLeft" }) }),
|
|
35
|
+
/* @__PURE__ */ e("div", { className: "hover:bg-d-accent cursor-pointer rounded-full p-2", children: /* @__PURE__ */ e(s, { onClick: m, name: "ChevronRight" }) })
|
|
36
36
|
] }),
|
|
37
37
|
/* @__PURE__ */ r("div", { className: "flex flex-col items-center py-2 text-center leading-tight", children: [
|
|
38
38
|
/* @__PURE__ */ e(a, { variant: "h5", children: g.upperFirst(o.format("MMMM YYYY")) }),
|
|
@@ -47,7 +47,7 @@ const F = ({ date: d, weekdayInfo: h }) => {
|
|
|
47
47
|
"div",
|
|
48
48
|
{
|
|
49
49
|
className: m(
|
|
50
|
-
"bg-d-card border-b-d-border sticky top-0 h-14 border-
|
|
50
|
+
"bg-d-card border-b-d-border sticky top-0 h-14 border-b backdrop-blur-sm",
|
|
51
51
|
"flex items-center pl-3",
|
|
52
52
|
s ? "!border-t-d-primary border-t-3" : "border-d-border"
|
|
53
53
|
),
|
package/dist/index.d.ts
CHANGED
|
@@ -187,7 +187,7 @@ export declare function AspectRatio({ ...props }: AspectRatioProps): JSX.Element
|
|
|
187
187
|
|
|
188
188
|
declare type AspectRatioProps = React.ComponentProps<typeof AspectRatioPrimitive.Root>;
|
|
189
189
|
|
|
190
|
-
export declare function AsyncSelect<T>({ fetcher, preload, filterFn, renderOption, getOptionValue, getDisplayValue, notFound, loadingSkeleton, label, labelClassName, placeholder, value, onChange, disabled, width,
|
|
190
|
+
export declare function AsyncSelect<T>({ fetcher, preload, filterFn, renderOption, getOptionValue, getDisplayValue, notFound, loadingSkeleton, label, labelClassName, placeholder, value, onChange, disabled, width, triggerClassName, noResultsMessage, clearable, size, }: AsyncSelectProps<T>): JSX.Element;
|
|
191
191
|
|
|
192
192
|
declare interface AsyncSelectProps<T> extends VariantProps<typeof asyncSelectTriggerVariants> {
|
|
193
193
|
fetcher: (query?: string) => Promise<T[]>;
|
|
@@ -204,8 +204,7 @@ declare interface AsyncSelectProps<T> extends VariantProps<typeof asyncSelectTri
|
|
|
204
204
|
labelClassName?: string;
|
|
205
205
|
placeholder?: string;
|
|
206
206
|
disabled?: boolean;
|
|
207
|
-
width?: string | number;
|
|
208
|
-
className?: string;
|
|
207
|
+
width?: string | number | "auto";
|
|
209
208
|
triggerClassName?: string;
|
|
210
209
|
noResultsMessage?: string;
|
|
211
210
|
clearable?: boolean;
|
|
@@ -294,8 +293,9 @@ export declare interface CalendarAppointment {
|
|
|
294
293
|
color?: string;
|
|
295
294
|
attributes?: {
|
|
296
295
|
key: string;
|
|
297
|
-
value: default_3.ReactNode;
|
|
296
|
+
value: default_3.ReactNode | string;
|
|
298
297
|
showPreview?: boolean;
|
|
298
|
+
showTooltip?: boolean;
|
|
299
299
|
}[];
|
|
300
300
|
className?: string;
|
|
301
301
|
groupBy?: string;
|
|
@@ -3,7 +3,7 @@ import { stringify as w } from "../../comma-separated-tokens/index.js";
|
|
|
3
3
|
import { ok as u } from "../../devlop/lib/default.js";
|
|
4
4
|
import { svg as m, html as C } from "../../property-information/index.js";
|
|
5
5
|
import { stringify as N } from "../../space-separated-tokens/index.js";
|
|
6
|
-
import S from "../../../_virtual/
|
|
6
|
+
import S from "../../../_virtual/index4.js";
|
|
7
7
|
import { whitespace as j } from "../../hast-util-whitespace/lib/index.js";
|
|
8
8
|
import { name as x } from "../../estree-util-is-identifier-name/lib/index.js";
|
|
9
9
|
import { VFileMessage as h } from "../../vfile-message/lib/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { bail as P } from "../../bail/index.js";
|
|
3
|
-
import y from "../../../_virtual/
|
|
3
|
+
import y from "../../../_virtual/index5.js";
|
|
4
4
|
import z from "../../is-plain-obj/index.js";
|
|
5
5
|
import { CallableInstance as C } from "./callable-instance.js";
|
|
6
6
|
import { trough as A } from "../../trough/lib/index.js";
|
package/dist/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import "tailwindcss";@import "tw-animate-css";:root{--d-radius:6px;--d-background:#fafafa;--d-foreground:#2e2e2e;--d-card:#fafafa;--d-card-foreground:#2e2e2e;--d-popover:#fff;--d-popover-foreground:#2e2e2e;--d-primary:#64c2d1;--d-primary-foreground:#1f1f1f;--d-secondary:#f5f5f5;--d-secondary-foreground:#2e2e2e;--d-muted:#e0e0e0;--d-muted-foreground:#7a7a7a;--d-accent:#
|
|
1
|
+
@import "tailwindcss";@import "tw-animate-css";:root{--d-radius:6px;--d-background:#fafafa;--d-foreground:#2e2e2e;--d-card:#fafafa;--d-card-foreground:#2e2e2e;--d-popover:#fff;--d-popover-foreground:#2e2e2e;--d-primary:#64c2d1;--d-primary-foreground:#1f1f1f;--d-secondary:#f5f5f5;--d-secondary-foreground:#2e2e2e;--d-muted:#e0e0e0;--d-muted-foreground:#7a7a7a;--d-accent:#f4f4f4;--d-accent-foreground:#2e2e2e;--d-destructive:#ec2842;--d-destructive-foreground:#85202d;--d-border:#e0e0e0;--d-input:#fff;--d-ring:#64c2d1;--d-chart-1:#64c2d1;--d-chart-2:#39f283;--d-chart-3:orange;--d-chart-4:orange;--d-chart-5:#eb576a;--d-sidebar:#f5f5f5;--d-sidebar-foreground:#2e2e2e;--d-sidebar-primary:#64c2d1;--d-sidebar-primary-foreground:#1f1f1f;--d-sidebar-accent:#e0e0e066;--d-sidebar-accent-foreground:#2e2e2e;--d-sidebar-border:#e0e0e0;--d-sidebar-ring:#64c2d1}.dark{--d-radius:6px;--d-background:#1f1f1f;--d-foreground:#e0e0e0;--d-card:#1f1f1f;--d-card-foreground:#e0e0e0;--d-popover:#1f1f1f;--d-popover-foreground:#e0e0e0;--d-primary:#64c2d1;--d-primary-foreground:#1f1f1f;--d-secondary:#2e2e2e;--d-secondary-foreground:#e0e0e0;--d-muted:#474747;--d-muted-foreground:#7a7a7a;--d-accent:#474747;--d-accent-foreground:#e0e0e0;--d-destructive:#85202d;--d-destructive-foreground:#e0e0e0;--d-border:#2e2e2e;--d-input:#2e2e2e;--d-ring:#64c2d1;--d-chart-1:#64c2d1;--d-chart-2:#39f283;--d-chart-3:orange;--d-chart-4:orange;--d-chart-5:#eb576a;--d-sidebar:#141414;--d-sidebar-foreground:#e0e0e0;--d-sidebar-primary:#64c2d1;--d-sidebar-primary-foreground:#1f1f1f;--d-sidebar-accent:#47474766;--d-sidebar-accent-foreground:#e0e0e0;--d-sidebar-border:#2e2e2e;--d-sidebar-ring:#64c2d1}.tangerine{--d-background:oklch(0.26 0.03 262.67);--d-foreground:oklch(0.92 0 0);--d-card:oklch(0.31 0.03 268.64);--d-card-foreground:oklch(0.92 0 0);--d-popover:oklch(0.29 0.02 268.4);--d-popover-foreground:oklch(0.92 0 0);--d-primary:oklch(0.64 0.17 36.44);--d-primary-foreground:oklch(1 0 0);--d-secondary:oklch(0.31 0.03 266.71);--d-secondary-foreground:oklch(0.92 0 0);--d-muted:oklch(0.31 0.03 266.71);--d-muted-foreground:oklch(0.72 0 0);--d-accent:oklch(0.34 0.06 267.59);--d-accent-foreground:oklch(0.88 0.06 254.13);--d-destructive:oklch(0.64 0.21 25.33);--d-destructive-foreground:oklch(1 0 0);--d-border:oklch(0.38 0.03 269.73);--d-input:oklch(0.38 0.03 269.73);--d-ring:oklch(0.64 0.17 36.44);--d-chart-1:oklch(0.72 0.06 248.68);--d-chart-2:oklch(0.77 0.09 34.19);--d-chart-3:oklch(0.58 0.08 254.16);--d-chart-4:oklch(0.5 0.08 259.49);--d-chart-5:oklch(0.42 0.1 264.03);--d-sidebar:oklch(0.31 0.03 267.74);--d-sidebar-foreground:oklch(0.92 0 0);--d-sidebar-primary:oklch(0.64 0.17 36.44);--d-sidebar-primary-foreground:oklch(1 0 0);--d-sidebar-accent:oklch(0.34 0.06 267.59);--d-sidebar-accent-foreground:oklch(0.88 0.06 254.13);--d-sidebar-border:oklch(0.38 0.03 269.73);--d-sidebar-ring:oklch(0.64 0.17 36.44);--d-font-sans:Inter,sans-serif;--d-font-serif:Source Serif 4,serif;--d-font-mono:JetBrains Mono,monospace;--d-radius:0.75rem;--d-shadow-2xs:0px 1px 3px 0px #0000000d;--d-shadow-xs:0px 1px 3px 0px #0000000d;--d-shadow-sm:0px 1px 3px 0px #0000001a,0px 1px 2px -1px #0000001a;--d-shadow:0px 1px 3px 0px #0000001a,0px 1px 2px -1px #0000001a;--d-shadow-md:0px 1px 3px 0px #0000001a,0px 2px 4px -1px #0000001a;--d-shadow-lg:0px 1px 3px 0px #0000001a,0px 4px 6px -1px #0000001a;--d-shadow-xl:0px 1px 3px 0px #0000001a,0px 8px 10px -1px #0000001a;--d-shadow-2xl:0px 1px 3px 0px #00000040}.claymorphism{--d-background:#1e1b18;--d-foreground:#e2e8f0;--d-card:#2c2825;--d-card-foreground:#e2e8f0;--d-popover:#2c2825;--d-popover-foreground:#e2e8f0;--d-primary:#818cf8;--d-primary-foreground:#1e1b18;--d-secondary:#3a3633;--d-secondary-foreground:#d1d5db;--d-muted:#2c2825;--d-muted-foreground:#9ca3af;--d-accent:#484441;--d-accent-foreground:#d1d5db;--d-destructive:#ef4444;--d-destructive-foreground:#1e1b18;--d-border:#3a3633;--d-input:#3a3633;--d-ring:#818cf8;--d-chart-1:#818cf8;--d-chart-2:#6366f1;--d-chart-3:#4f46e5;--d-chart-4:#4338ca;--d-chart-5:#3730a3;--d-sidebar:#3a3633;--d-sidebar-foreground:#e2e8f0;--d-sidebar-primary:#818cf8;--d-sidebar-primary-foreground:#1e1b18;--d-sidebar-accent:#484441;--d-sidebar-accent-foreground:#d1d5db;--d-sidebar-border:#3a3633;--d-sidebar-ring:#818cf8;--d-font-sans:Plus Jakarta Sans,sans-serif;--d-font-serif:Lora,serif;--d-font-mono:Roboto Mono,monospace;--d-radius:1.25rem;--d-shadow-2xs:2px 2px 10px 4px #00000017;--d-shadow-xs:2px 2px 10px 4px #00000017;--d-shadow-sm:2px 2px 10px 4px #0000002e,2px 1px 2px 3px #0000002e;--d-shadow:2px 2px 10px 4px #0000002e,2px 1px 2px 3px #0000002e;--d-shadow-md:2px 2px 10px 4px #0000002e,2px 2px 4px 3px #0000002e;--d-shadow-lg:2px 2px 10px 4px #0000002e,2px 4px 6px 3px #0000002e;--d-shadow-xl:2px 2px 10px 4px #0000002e,2px 8px 10px 3px #0000002e;--d-shadow-2xl:2px 2px 10px 4px #00000073}@theme inline{--radius-d-sm:calc(var(--d-radius) - 4px);--radius-d-md:calc(var(--d-radius) - 2px);--radius-d-lg:var(--d-radius);--radius-d-xl:calc(var(--d-radius) + 4px);--color-d-background:var(--d-background);--color-d-foreground:var(--d-foreground);--color-d-card:var(--d-card);--color-d-card-foreground:var(--d-card-foreground);--color-d-popover:var(--d-popover);--color-d-popover-foreground:var(--d-popover-foreground);--color-d-primary:var(--d-primary);--color-d-primary-foreground:var(--d-primary-foreground);--color-d-secondary:var(--d-secondary);--color-d-secondary-foreground:var(--d-secondary-foreground);--color-d-muted:var(--d-muted);--color-d-muted-foreground:var(--d-muted-foreground);--color-d-accent:var(--d-accent);--color-d-accent-foreground:var(--d-accent-foreground);--color-d-destructive:var(--d-destructive);--color-d-border:var(--d-border);--color-d-input:var(--d-input);--color-d-ring:var(--d-ring);--color-d-chart-1:var(--d-chart-1);--color-d-chart-2:var(--d-chart-2);--color-d-chart-3:var(--d-chart-3);--color-d-chart-4:var(--d-chart-4);--color-d-chart-5:var(--d-chart-5);--color-d-sidebar:var(--d-sidebar);--color-d-sidebar-foreground:var(--d-sidebar-foreground);--color-d-sidebar-primary:var(--d-sidebar-primary);--color-d-sidebar-primary-foreground:var(--d-sidebar-primary-foreground);--color-d-sidebar-accent:var(--d-sidebar-accent);--color-d-sidebar-accent-foreground:var(--d-sidebar-accent-foreground);--color-d-sidebar-border:var(--d-sidebar-border);--color-d-sidebar-ring:var(--d-sidebar-ring)}*{outline-color:color-mix(in oklab,var(--d-ring) 50%,#0000)}body{background-color:var(--d-background);color:var(--d-foreground)}
|