laif-ds 0.2.71 → 0.2.73

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.
@@ -1,231 +1,248 @@
1
1
  "use client";
2
- import { jsxs as m, jsx as s } from "react/jsx-runtime";
3
- import { designTokens as i } from "../design-tokens.js";
4
- import { TimePickerColumn as M } from "./app-time-picker.js";
5
- import { Calendar as V } from "./calendar.js";
6
- import { Icon as q } from "./icon.js";
7
- import { Label as de } from "./label.js";
8
- import { Popover as ce, PopoverTrigger as me, PopoverContent as ue } from "./popover.js";
9
- import { cn as E } from "../../lib/utils.js";
2
+ import { jsxs as l, jsx as o } from "react/jsx-runtime";
3
+ import { designTokens as r } from "../design-tokens.js";
4
+ import { Calendar as L } from "./calendar.js";
5
+ import { Icon as X } from "./icon.js";
6
+ import { Label as ue } from "./label.js";
7
+ import { Popover as fe, PopoverTrigger as he, PopoverContent as ge } from "./popover.js";
8
+ import { cn as B } from "../../lib/utils.js";
10
9
  import * as f from "react";
11
- import { useCallback as L, useMemo as p, useEffect as fe } from "react";
12
- import { it as he } from "../../node_modules/date-fns/locale/it.js";
13
- import { formatDate as w } from "../../node_modules/date-fns/format.js";
14
- import { isSameDay as ge } from "../../node_modules/date-fns/isSameDay.js";
15
- function Pe(t) {
10
+ import { useCallback as G, useMemo as p, useEffect as ve } from "react";
11
+ import { TimePickerColumn as k } from "./app-time-picker.js";
12
+ import { it as be } from "../../node_modules/date-fns/locale/it.js";
13
+ import { formatDate as H } from "../../node_modules/date-fns/format.js";
14
+ import { isSameDay as Ce } from "../../node_modules/date-fns/isSameDay.js";
15
+ const J = (t) => {
16
+ if (!Number.isFinite(t)) return 1;
17
+ const x = Math.trunc(t);
18
+ return Math.min(59, Math.max(1, x));
19
+ };
20
+ function Oe(t) {
16
21
  const {
17
- placeholder: X = "Seleziona data",
18
- dateFormat: B,
19
- className: G,
20
- disabled: l = !1,
22
+ placeholder: x = "Seleziona data",
23
+ dateFormat: K,
24
+ className: Q,
25
+ disabled: d = !1,
21
26
  size: h = "default",
22
- firstDate: N,
23
- lastDate: S,
24
- availableDates: H,
25
- locale: u = he,
27
+ firstDate: P,
28
+ lastDate: z,
29
+ availableDates: O,
30
+ locale: u = be,
26
31
  initialCalendarMonth: g,
27
- customCalendarProps: P,
28
- label: k,
29
- labelClassName: J,
30
- wrpClassName: K,
31
- id: Q,
32
- "data-testid": U,
33
- minDate: O,
34
- maxDate: z,
35
- numberOfMonths: W,
36
- clearable: Y = !1,
37
- onClear: I
38
- } = t, o = t.mode === "range", C = !o && t.showTime === !0, T = !o && t.withSeconds === !0, x = B ?? (C ? T ? "dd/MM/yyyy HH:mm:ss" : "dd/MM/yyyy HH:mm" : "dd/MM/yyyy"), [n, b] = f.useState(
39
- o ? void 0 : t.value
40
- ), [r, y] = f.useState(
41
- o ? t.value : void 0
42
- ), [F, v] = f.useState(
32
+ customCalendarProps: F,
33
+ label: I,
34
+ labelClassName: U,
35
+ wrpClassName: W,
36
+ id: Y,
37
+ "data-testid": Z,
38
+ minDate: T,
39
+ maxDate: j,
40
+ numberOfMonths: $,
41
+ clearable: ee = !1,
42
+ onClear: A
43
+ } = t, n = t.mode === "range", v = !n && t.showTime === !0, w = !n && t.withSeconds === !0, M = n ? 1 : J(t.minuteStep), y = n ? 1 : J(t.secondStep), D = K ?? (v ? w ? "dd/MM/yyyy HH:mm:ss" : "dd/MM/yyyy HH:mm" : "dd/MM/yyyy"), [s, b] = f.useState(
44
+ n ? void 0 : t.value
45
+ ), [i, N] = f.useState(
46
+ n ? t.value : void 0
47
+ ), [R, C] = f.useState(
43
48
  g
44
- ), [j, A] = f.useState(!1), Z = (e) => {
49
+ ), [_, V] = f.useState(!1), te = (e) => {
45
50
  const a = e ? new Date(e) : void 0;
46
- C && a && n && a.setHours(
47
- n.getHours(),
48
- n.getMinutes(),
49
- n.getSeconds()
50
- ), b(a), a && v(a), !o && t.onChange && t.onChange(a), !C && a && A(!1);
51
- }, $ = L(() => {
52
- o ? (y(void 0), t.onChange && t.onChange(void 0)) : (b(void 0), t.onChange && t.onChange(void 0)), I?.();
53
- }, [o, t.onChange, I]), ee = n?.getHours(), te = n?.getMinutes(), ae = n?.getSeconds(), oe = p(
51
+ v && a && s && a.setHours(
52
+ s.getHours(),
53
+ s.getMinutes(),
54
+ s.getSeconds()
55
+ ), b(a), a && C(a), !n && t.onChange && t.onChange(a), !v && a && V(!1);
56
+ }, ae = G(() => {
57
+ n ? (N(void 0), t.onChange && t.onChange(void 0)) : (b(void 0), t.onChange && t.onChange(void 0)), A?.();
58
+ }, [n, t.onChange, A]), ne = s?.getHours(), oe = s?.getMinutes(), se = s?.getSeconds(), ie = p(
54
59
  () => Array.from({ length: 24 }, (e, a) => a),
55
60
  []
56
- ), ne = p(
57
- () => Array.from({ length: 60 }, (e, a) => a),
58
- []
59
- ), se = p(
60
- () => Array.from({ length: 60 }, (e, a) => a),
61
- []
62
- ), D = L(
61
+ ), re = p(
62
+ () => Array.from(
63
+ { length: Math.floor(59 / M) + 1 },
64
+ (e, a) => a * M
65
+ ),
66
+ [M]
67
+ ), le = p(
68
+ () => Array.from(
69
+ { length: Math.floor(59 / y) + 1 },
70
+ (e, a) => a * y
71
+ ),
72
+ [y]
73
+ ), S = G(
63
74
  (e, a) => {
64
- const c = n ? new Date(n) : /* @__PURE__ */ new Date();
65
- n || c.setHours(0, 0, 0, 0), e === "hour" ? c.setHours(a) : e === "minute" ? c.setMinutes(a) : e === "second" && c.setSeconds(a), b(c), !o && t.onChange && t.onChange(c);
75
+ const m = s ? new Date(s) : /* @__PURE__ */ new Date();
76
+ s || m.setHours(0, 0, 0, 0), e === "hour" ? m.setHours(a) : e === "minute" ? m.setMinutes(a) : e === "second" && m.setSeconds(a), b(m), !n && t.onChange && t.onChange(m);
66
77
  },
67
- [n, o, t.onChange]
68
- ), re = (e) => {
69
- y(e), e?.from && v(e.from), o && t.onChange && t.onChange(e);
78
+ [s, n, t.onChange]
79
+ ), de = (e) => {
80
+ N(e), e?.from && C(e.from), n && t.onChange && t.onChange(e);
70
81
  };
71
- let d = [];
72
- N && d.push({ before: N }), S && d.push({ after: S }), H?.length && d.push(
73
- (e) => !H.some(
74
- (a) => ge(a, e)
82
+ let c = [];
83
+ P && c.push({ before: P }), z && c.push({ after: z }), O?.length && c.push(
84
+ (e) => !O.some(
85
+ (a) => Ce(a, e)
75
86
  )
76
- ), l && (d = [!0]), fe(() => {
77
- if (o) {
78
- y(t.value);
87
+ ), d && (c = [!0]), ve(() => {
88
+ if (n) {
89
+ N(t.value);
79
90
  const e = t.value?.from;
80
- v(e ?? g);
91
+ C(e ?? g);
81
92
  } else
82
- b(t.value), v(
93
+ b(t.value), C(
83
94
  t.value ?? g
84
95
  );
85
- }, [t.value, o, g]);
86
- const ie = f.useId(), R = Q ?? ie, _ = o ? !!r?.from : !!n, le = () => o && r ? /* @__PURE__ */ m("span", { children: [
87
- r.from && w(r.from, x, { locale: u }),
88
- r.from && r.to && " - ",
89
- r.to && w(r.to, x, { locale: u })
90
- ] }) : !o && n ? /* @__PURE__ */ s("span", { children: w(n, x, { locale: u }) }) : /* @__PURE__ */ s("span", { className: "text-d-muted-foreground", children: X });
91
- return /* @__PURE__ */ m("div", { className: E("flex flex-col gap-1.5", K), children: [
92
- k && /* @__PURE__ */ s(de, { htmlFor: R, className: J, children: k }),
93
- /* @__PURE__ */ m(
94
- ce,
95
- {
96
- open: l ? !1 : j,
97
- onOpenChange: A,
98
- modal: !0,
99
- children: [
100
- /* @__PURE__ */ s(me, { asChild: !0, children: /* @__PURE__ */ m(
101
- "div",
102
- {
103
- id: R,
104
- "data-testid": U,
105
- className: E(
106
- i.input.base,
107
- i.radius.default,
108
- i.text.base,
109
- i.interaction.disabled,
110
- "flex items-center gap-2 font-normal whitespace-nowrap [&>span]:line-clamp-1",
111
- i.focusRing,
112
- j && i.activeRing,
113
- "hover:border-d-ring cursor-pointer transition-colors",
114
- !_ && "text-d-muted-foreground",
115
- l && "cursor-not-allowed opacity-50",
116
- h === "default" && i.sizes.default,
117
- h === "sm" && i.sizes.sm,
118
- h === "lg" && i.sizes.lg,
119
- G
120
- ),
121
- "aria-disabled": l,
122
- role: "button",
123
- tabIndex: l ? -1 : 0,
124
- onClick: l ? void 0 : () => {
125
- },
126
- children: [
127
- /* @__PURE__ */ s(q, { name: "Calendar", size: h === "lg" ? "sm" : "xs" }),
128
- /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: le() }),
129
- Y && _ && /* @__PURE__ */ s(
130
- "div",
96
+ }, [t.value, n, g]);
97
+ const ce = f.useId(), q = Y ?? ce, E = n ? !!i?.from : !!s, me = () => n && i ? /* @__PURE__ */ l("span", { children: [
98
+ i.from && H(i.from, D, { locale: u }),
99
+ i.from && i.to && " - ",
100
+ i.to && H(i.to, D, { locale: u })
101
+ ] }) : !n && s ? /* @__PURE__ */ o("span", { children: H(s, D, { locale: u }) }) : /* @__PURE__ */ o("span", { className: "text-d-muted-foreground", children: x });
102
+ return /* @__PURE__ */ l("div", { className: B("flex flex-col gap-1.5", W), children: [
103
+ I && /* @__PURE__ */ o(ue, { htmlFor: q, className: U, children: I }),
104
+ /* @__PURE__ */ l(fe, { open: d ? !1 : _, onOpenChange: V, modal: !0, children: [
105
+ /* @__PURE__ */ o(he, { asChild: !0, children: /* @__PURE__ */ l(
106
+ "div",
107
+ {
108
+ id: q,
109
+ "data-testid": Z,
110
+ className: B(
111
+ r.input.base,
112
+ r.radius.default,
113
+ r.text.base,
114
+ r.interaction.disabled,
115
+ "flex items-center gap-2 font-normal whitespace-nowrap [&>span]:line-clamp-1",
116
+ r.focusRing,
117
+ _ && r.activeRing,
118
+ "hover:border-d-ring cursor-pointer transition-colors",
119
+ !E && "text-d-muted-foreground",
120
+ d && "cursor-not-allowed opacity-50",
121
+ h === "default" && r.sizes.default,
122
+ h === "sm" && r.sizes.sm,
123
+ h === "lg" && r.sizes.lg,
124
+ Q
125
+ ),
126
+ "aria-disabled": d,
127
+ role: "button",
128
+ tabIndex: d ? -1 : 0,
129
+ onClick: d ? void 0 : () => {
130
+ },
131
+ children: [
132
+ /* @__PURE__ */ o(X, { name: "Calendar", size: h === "lg" ? "sm" : "xs" }),
133
+ /* @__PURE__ */ o("div", { className: "min-w-0 flex-1", children: me() }),
134
+ ee && E && /* @__PURE__ */ o(
135
+ "div",
136
+ {
137
+ role: "button",
138
+ className: "bg-d-accent hover:bg-d-accent/80 border-d-border flex shrink-0 cursor-pointer items-center justify-center rounded-full border p-1 transition-colors",
139
+ onClick: (e) => {
140
+ e.stopPropagation(), e.preventDefault(), ae();
141
+ },
142
+ onMouseDown: (e) => e.preventDefault(),
143
+ "aria-label": "Clear selection",
144
+ children: /* @__PURE__ */ o(
145
+ X,
131
146
  {
132
- role: "button",
133
- className: "bg-d-accent hover:bg-d-accent/80 border-d-border flex shrink-0 cursor-pointer items-center justify-center rounded-full border p-1 transition-colors",
134
- onClick: (e) => {
135
- e.stopPropagation(), e.preventDefault(), $();
136
- },
137
- onMouseDown: (e) => e.preventDefault(),
138
- "aria-label": "Clear selection",
139
- children: /* @__PURE__ */ s(
140
- q,
141
- {
142
- name: "X",
143
- size: "xs",
144
- className: "!text-d-foreground opacity-50"
145
- }
146
- )
147
+ name: "X",
148
+ size: "xs",
149
+ className: "!text-d-foreground opacity-50"
147
150
  }
148
151
  )
149
- ]
150
- }
151
- ) }),
152
- " ",
153
- /* @__PURE__ */ m(
154
- ue,
155
- {
156
- className: "flex min-h-0 w-auto flex-row p-0 shadow",
157
- align: "start",
158
- children: [
159
- o ? /* @__PURE__ */ s(
160
- V,
152
+ }
153
+ )
154
+ ]
155
+ }
156
+ ) }),
157
+ " ",
158
+ /* @__PURE__ */ l(
159
+ ge,
160
+ {
161
+ className: "flex max-h-[500px] min-h-0 w-auto flex-row p-0 shadow",
162
+ align: "start",
163
+ children: [
164
+ n ? /* @__PURE__ */ o(
165
+ L,
166
+ {
167
+ ...F || {},
168
+ mode: "range",
169
+ selected: i,
170
+ onSelect: de,
171
+ autoFocus: !0,
172
+ disabled: c,
173
+ locale: u,
174
+ defaultMonth: R,
175
+ numberOfMonths: $ ?? 1,
176
+ minDate: T,
177
+ maxDate: j
178
+ }
179
+ ) : /* @__PURE__ */ o(
180
+ L,
181
+ {
182
+ ...F || {},
183
+ mode: "single",
184
+ selected: s,
185
+ onSelect: te,
186
+ autoFocus: !0,
187
+ disabled: c,
188
+ locale: u,
189
+ defaultMonth: R,
190
+ minDate: T,
191
+ maxDate: j
192
+ }
193
+ ),
194
+ v && /* @__PURE__ */ l("div", { className: "border-d-border/50 relative flex shrink-0 flex-row overflow-hidden border-l", children: [
195
+ /* @__PURE__ */ l(
196
+ "div",
197
+ {
198
+ className: "invisible flex h-0 flex-row overflow-hidden opacity-0 select-none",
199
+ "aria-hidden": "true",
200
+ children: [
201
+ /* @__PURE__ */ o("div", { className: "w-12 shrink-0 sm:w-14" }),
202
+ /* @__PURE__ */ o("div", { className: "w-12 shrink-0 sm:w-14" }),
203
+ w && /* @__PURE__ */ o("div", { className: "w-12 shrink-0 sm:w-14" })
204
+ ]
205
+ }
206
+ ),
207
+ /* @__PURE__ */ l("div", { className: "absolute inset-0 flex h-full w-full flex-row overflow-y-auto", children: [
208
+ /* @__PURE__ */ o(
209
+ k,
161
210
  {
162
- ...P || {},
163
- mode: "range",
164
- selected: r,
165
- onSelect: re,
166
- autoFocus: !0,
167
- disabled: d,
168
- locale: u,
169
- defaultMonth: F,
170
- numberOfMonths: W ?? 1,
171
- minDate: O,
172
- maxDate: z
211
+ type: "hour",
212
+ value: ne,
213
+ options: ie,
214
+ onChange: (e) => S("hour", e),
215
+ className: "flex flex-1"
173
216
  }
174
- ) : /* @__PURE__ */ s(
175
- V,
217
+ ),
218
+ /* @__PURE__ */ o(
219
+ k,
176
220
  {
177
- ...P || {},
178
- mode: "single",
179
- selected: n,
180
- onSelect: Z,
181
- autoFocus: !0,
182
- disabled: d,
183
- locale: u,
184
- defaultMonth: F,
185
- minDate: O,
186
- maxDate: z
221
+ type: "minute",
222
+ value: oe,
223
+ options: re,
224
+ onChange: (e) => S("minute", e),
225
+ className: "flex flex-1"
187
226
  }
188
227
  ),
189
- C && /* @__PURE__ */ m("div", { className: "border-d-border/50 flex max-h-[300px] min-h-0 flex-1 flex-row border-l", children: [
190
- /* @__PURE__ */ s(
191
- M,
192
- {
193
- type: "hour",
194
- value: ee,
195
- options: oe,
196
- onChange: (e) => D("hour", e),
197
- className: "flex flex-1"
198
- }
199
- ),
200
- /* @__PURE__ */ s(
201
- M,
202
- {
203
- type: "minute",
204
- value: te,
205
- options: ne,
206
- onChange: (e) => D("minute", e),
207
- className: "flex flex-1"
208
- }
209
- ),
210
- T && /* @__PURE__ */ s(
211
- M,
212
- {
213
- type: "second",
214
- value: ae,
215
- options: se,
216
- onChange: (e) => D("second", e),
217
- className: "flex flex-1"
218
- }
219
- )
220
- ] })
221
- ]
222
- }
223
- )
224
- ]
225
- }
226
- )
228
+ w && /* @__PURE__ */ o(
229
+ k,
230
+ {
231
+ type: "second",
232
+ value: se,
233
+ options: le,
234
+ onChange: (e) => S("second", e),
235
+ className: "flex flex-1"
236
+ }
237
+ )
238
+ ] })
239
+ ] })
240
+ ]
241
+ }
242
+ )
243
+ ] })
227
244
  ] });
228
245
  }
229
246
  export {
230
- Pe as DatePicker
247
+ Oe as DatePicker
231
248
  };
@@ -1,130 +1,131 @@
1
1
  "use client";
2
2
  import { jsxs as i, jsx as a } from "react/jsx-runtime";
3
- import * as s from "react";
4
- import { Root as x, Group as N, Portal as l, RadioGroup as y, Sub as v, Trigger as R, CheckboxItem as m, ItemIndicator as c, Content as p, Item as u, Label as f, RadioItem as b, Separator as g, SubContent as w, SubTrigger as h } from "../../node_modules/@radix-ui/react-dropdown-menu/dist/index.js";
3
+ import { Root as v, Group as h, Portal as c, RadioGroup as N, Sub as y, Trigger as R, CheckboxItem as l, ItemIndicator as m, Content as p, Item as u, Label as f, RadioItem as b, Separator as g, SubContent as w, SubTrigger as x } from "../../node_modules/@radix-ui/react-dropdown-menu/dist/index.js";
4
+ import * as n from "react";
5
5
  import { cn as r } from "../../lib/utils.js";
6
6
  import D from "../../node_modules/lucide-react/dist/esm/icons/check.js";
7
7
  import M from "../../node_modules/lucide-react/dist/esm/icons/circle.js";
8
8
  import S from "../../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
9
- const H = x, J = R, K = N, O = l, Q = v, U = y, I = s.forwardRef(({ className: e, inset: o, children: t, ...n }, d) => /* @__PURE__ */ i(
10
- h,
9
+ const H = v, J = R, K = h, O = c, Q = y, U = N, I = n.forwardRef(({ className: e, inset: t, children: o, ...d }, s) => /* @__PURE__ */ i(
10
+ x,
11
11
  {
12
- ref: d,
12
+ ref: s,
13
13
  className: r(
14
- "focus:bg-accent data-[state=open]:bg-accent flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
15
- o && "pl-8",
14
+ "focus:bg-d-accent data-[state=open]:bg-d-accent flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
15
+ t && "pl-8",
16
16
  e
17
17
  ),
18
- ...n,
18
+ ...d,
19
19
  children: [
20
- t,
20
+ o,
21
21
  /* @__PURE__ */ a(S, { className: "ml-auto" })
22
22
  ]
23
23
  }
24
24
  ));
25
- I.displayName = h.displayName;
26
- const C = s.forwardRef(({ className: e, ...o }, t) => /* @__PURE__ */ a(
25
+ I.displayName = x.displayName;
26
+ const C = n.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a(
27
27
  w,
28
28
  {
29
- ref: t,
29
+ ref: o,
30
30
  className: r(
31
- "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 border-d-border z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg",
31
+ "bg-d-popover text-d-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 border-d-border z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg",
32
32
  e
33
33
  ),
34
- ...o
34
+ ...t
35
35
  }
36
36
  ));
37
37
  C.displayName = w.displayName;
38
- const z = s.forwardRef(({ className: e, sideOffset: o = 4, ...t }, n) => /* @__PURE__ */ a(l, { children: /* @__PURE__ */ a(
38
+ const z = n.forwardRef(({ className: e, sideOffset: t = 4, ...o }, d) => /* @__PURE__ */ a(c, { children: /* @__PURE__ */ a(
39
39
  p,
40
40
  {
41
- ref: n,
42
- sideOffset: o,
41
+ ref: d,
42
+ sideOffset: t,
43
43
  className: r(
44
- "bg-popover text-popover-foreground border-d-border z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
44
+ "bg-d-popover text-d-popover-foreground border-d-border z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
45
45
  "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 origin-[--radix-dropdown-menu-content-transform-origin]",
46
46
  e
47
47
  ),
48
- ...t
48
+ ...o
49
49
  }
50
50
  ) }));
51
51
  z.displayName = p.displayName;
52
- const k = s.forwardRef(({ className: e, inset: o, ...t }, n) => /* @__PURE__ */ a(
52
+ const k = n.forwardRef(({ className: e, inset: t, variant: o = "default", ...d }, s) => /* @__PURE__ */ a(
53
53
  u,
54
54
  {
55
- ref: n,
55
+ ref: s,
56
+ "data-variant": o,
56
57
  className: r(
57
- "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
58
- o && "pl-8",
58
+ "focus:bg-d-accent focus:text-d-accent-foreground data-[variant=destructive]:text-d-destructive data-[variant=destructive]:focus:bg-d-destructive/10 data-[variant=destructive]:focus:text-d-destructive data-[variant=destructive]:*:[svg]:!text-d-destructive relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
59
+ t && "pl-8",
59
60
  e
60
61
  ),
61
- ...t
62
+ ...d
62
63
  }
63
64
  ));
64
65
  k.displayName = u.displayName;
65
- const G = s.forwardRef(({ className: e, children: o, checked: t, ...n }, d) => /* @__PURE__ */ i(
66
- m,
66
+ const G = n.forwardRef(({ className: e, children: t, checked: o, ...d }, s) => /* @__PURE__ */ i(
67
+ l,
67
68
  {
68
- ref: d,
69
+ ref: s,
69
70
  className: r(
70
- "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
71
+ "focus:bg-d-accent focus:text-d-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
71
72
  e
72
73
  ),
73
- checked: t,
74
- ...n,
74
+ checked: o,
75
+ ...d,
75
76
  children: [
76
- /* @__PURE__ */ a("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a(c, { children: /* @__PURE__ */ a(D, { className: "h-4 w-4" }) }) }),
77
- o
77
+ /* @__PURE__ */ a("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a(m, { children: /* @__PURE__ */ a(D, { className: "h-4 w-4" }) }) }),
78
+ t
78
79
  ]
79
80
  }
80
81
  ));
81
- G.displayName = m.displayName;
82
- const T = s.forwardRef(({ className: e, children: o, ...t }, n) => /* @__PURE__ */ i(
82
+ G.displayName = l.displayName;
83
+ const T = n.forwardRef(({ className: e, children: t, ...o }, d) => /* @__PURE__ */ i(
83
84
  b,
84
85
  {
85
- ref: n,
86
+ ref: d,
86
87
  className: r(
87
- "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
88
+ "focus:bg-d-accent focus:text-d-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
88
89
  e
89
90
  ),
90
- ...t,
91
+ ...o,
91
92
  children: [
92
- /* @__PURE__ */ a("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a(c, { children: /* @__PURE__ */ a(M, { className: "h-2 w-2 fill-current" }) }) }),
93
- o
93
+ /* @__PURE__ */ a("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a(m, { children: /* @__PURE__ */ a(M, { className: "h-2 w-2 fill-current" }) }) }),
94
+ t
94
95
  ]
95
96
  }
96
97
  ));
97
98
  T.displayName = b.displayName;
98
- const j = s.forwardRef(({ className: e, inset: o, ...t }, n) => /* @__PURE__ */ a(
99
+ const j = n.forwardRef(({ className: e, inset: t, ...o }, d) => /* @__PURE__ */ a(
99
100
  f,
100
101
  {
101
- ref: n,
102
+ ref: d,
102
103
  className: r(
103
104
  "px-2 py-1.5 text-sm font-semibold",
104
- o && "pl-8",
105
+ t && "pl-8",
105
106
  e
106
107
  ),
107
- ...t
108
+ ...o
108
109
  }
109
110
  ));
110
111
  j.displayName = f.displayName;
111
- const L = s.forwardRef(({ className: e, ...o }, t) => /* @__PURE__ */ a(
112
+ const L = n.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a(
112
113
  g,
113
114
  {
114
- ref: t,
115
- className: r("bg-muted -mx-1 my-1 h-px", e),
116
- ...o
115
+ ref: o,
116
+ className: r("bg-d-border -mx-1 my-1 h-px", e),
117
+ ...t
117
118
  }
118
119
  ));
119
120
  L.displayName = g.displayName;
120
121
  const P = ({
121
122
  className: e,
122
- ...o
123
+ ...t
123
124
  }) => /* @__PURE__ */ a(
124
125
  "span",
125
126
  {
126
127
  className: r("ml-auto text-xs tracking-widest opacity-60", e),
127
- ...o
128
+ ...t
128
129
  }
129
130
  );
130
131
  P.displayName = "DropdownMenuShortcut";