laif-ds 0.1.31 → 0.1.33

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.
Files changed (52) hide show
  1. package/dist/components/ui/accordion.js +2 -7
  2. package/dist/components/ui/alert-dialog.js +10 -37
  3. package/dist/components/ui/alert.js +1 -5
  4. package/dist/components/ui/app-multiple-select-dropdown.js +120 -116
  5. package/dist/components/ui/app-select.js +9 -1
  6. package/dist/components/ui/app-sidebar.js +9 -23
  7. package/dist/components/ui/aspect-ratio.js +1 -3
  8. package/dist/components/ui/async-select.js +80 -64
  9. package/dist/components/ui/audio-visualizer.js +3 -2
  10. package/dist/components/ui/button.js +45 -5
  11. package/dist/components/ui/card.js +7 -2
  12. package/dist/components/ui/charts/circular.js +1 -1
  13. package/dist/components/ui/chat-message.js +34 -16
  14. package/dist/components/ui/chat.js +4 -4
  15. package/dist/components/ui/command.js +1 -1
  16. package/dist/components/ui/data-cross-table.js +32 -8
  17. package/dist/components/ui/data-table.js +45 -44
  18. package/dist/components/ui/date-picker.js +2 -2
  19. package/dist/components/ui/dropdown-menu.js +7 -7
  20. package/dist/components/ui/file-preview.js +9 -9
  21. package/dist/components/ui/gantt/components/Chart/Bars/Bars.js +25 -3
  22. package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarItem/BarItem.js +32 -13
  23. package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsItems/BarItems.js +7 -1
  24. package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsRow.js +6 -1
  25. package/dist/components/ui/gantt/components/Chart/Chart.js +19 -3
  26. package/dist/components/ui/gantt/components/Chart/Scale/Scale.js +80 -71
  27. package/dist/components/ui/gantt/components/Chart/Tree/Tree.js +72 -54
  28. package/dist/components/ui/gantt/components/Controls/Controls.js +4 -2
  29. package/dist/components/ui/gantt/hooks/useGanttCalculate.js +11 -1
  30. package/dist/components/ui/gantt/utils/getWholeWidth.js +4 -1
  31. package/dist/components/ui/gantt/utils/transformData.js +7 -4
  32. package/dist/components/ui/input-selector.js +5 -2
  33. package/dist/components/ui/input.js +41 -46
  34. package/dist/components/ui/interrupt-prompt.js +2 -2
  35. package/dist/components/ui/markdown-renderer.js +2 -2
  36. package/dist/components/ui/message-input.js +12 -10
  37. package/dist/components/ui/multiple-selector.js +44 -31
  38. package/dist/components/ui/prompt-suggestions.js +2 -2
  39. package/dist/components/ui/resizable.js +1 -1
  40. package/dist/components/ui/select.js +6 -10
  41. package/dist/components/ui/sidebar.js +27 -19
  42. package/dist/components/ui/slider.js +103 -89
  43. package/dist/components/ui/table-skeleton.js +29 -11
  44. package/dist/components/ui/table.js +4 -1
  45. package/dist/components/ui/tabs.js +1 -1
  46. package/dist/components/ui/theme-switcher.js +2 -7
  47. package/dist/components/ui/typing-indicator.js +4 -4
  48. package/dist/components/ui/typo.js +1 -8
  49. package/dist/hooks/use-mobile.js +3 -1
  50. package/dist/index.d.ts +7 -7
  51. package/dist/styles.css +1 -1
  52. package/package.json +3 -1
@@ -9,78 +9,87 @@ import { getScaleItems as G } from "../../../utils/getScaleItems.js";
9
9
  import { GanttDimensions as p } from "../../../enums/GanttDimensions.js";
10
10
  import { GanttDimensionsSettings as L } from "../../../constants/DimensionsSettings.js";
11
11
  import { GanttConsts as m } from "../../../constants/GanttConsts.js";
12
- const R = C(({ width: W, wrapRef: f }, y) => {
13
- const { scaleDates: s, setScaleDates: d, setScaleRenderState: h, settings: t } = O(w), e = F(y), l = M(null), N = M(null), Y = u(
14
- (n) => {
15
- const i = c.unix(s[n]);
16
- return t.dimension === p.DAY ? i.daysInMonth() * t.stepWidth : t.scaleStepItems * t.stepWidth;
17
- },
18
- [s, t.dimension, t.scaleStepItems, t.stepWidth]
19
- ), E = u(
20
- ({ scrollOffset: n }) => {
21
- var r, a, S, I, g;
22
- const i = L[t.dimension].unitOfTime;
23
- if (n < m.MIN_SCROLL_OFFSET) {
24
- const x = c.unix(s[0]).subtract(1, i);
25
- let D = t.scaleStepItems * t.stepWidth;
26
- t.dimension === p.DAY && (D = x.daysInMonth() * t.stepWidth), d([x.unix(), ...s]), (r = f.current) == null || r.scrollTo({ left: n + D }), (a = e == null ? void 0 : e.current) == null || a.resetAfterIndex(0);
12
+ const R = C(
13
+ ({ width: W, wrapRef: f }, y) => {
14
+ const { scaleDates: s, setScaleDates: d, setScaleRenderState: h, settings: t } = O(w), e = F(y), l = M(null), N = M(null), Y = u(
15
+ (n) => {
16
+ const i = c.unix(s[n]);
17
+ return t.dimension === p.DAY ? i.daysInMonth() * t.stepWidth : t.scaleStepItems * t.stepWidth;
18
+ },
19
+ [
20
+ s,
21
+ t.dimension,
22
+ t.scaleStepItems,
23
+ t.stepWidth
24
+ ]
25
+ ), E = u(
26
+ ({ scrollOffset: n }) => {
27
+ var r, a, S, I, g;
28
+ const i = L[t.dimension].unitOfTime;
29
+ if (n < m.MIN_SCROLL_OFFSET) {
30
+ const x = c.unix(s[0]).subtract(1, i);
31
+ let D = t.scaleStepItems * t.stepWidth;
32
+ t.dimension === p.DAY && (D = x.daysInMonth() * t.stepWidth), d([x.unix(), ...s]), (r = f.current) == null || r.scrollTo({ left: n + D }), (a = e == null ? void 0 : e.current) == null || a.resetAfterIndex(0);
33
+ }
34
+ (((S = l.current) == null ? void 0 : S.scrollWidth) || 0) - (((I = l.current) == null ? void 0 : I.clientWidth) || 0) - n - m.TREE_WIDTH < m.MIN_SCROLL_OFFSET && (d([
35
+ ...s,
36
+ c.unix(s[s.length - 1]).add(1, i).unix()
37
+ ]), (g = e == null ? void 0 : e.current) == null || g.resetAfterIndex(0));
38
+ },
39
+ [
40
+ e,
41
+ s,
42
+ d,
43
+ t.dimension,
44
+ t.scaleStepItems,
45
+ t.stepWidth,
46
+ f
47
+ ]
48
+ ), T = u(
49
+ (n) => {
50
+ h(n);
51
+ },
52
+ [h]
53
+ );
54
+ return _(() => {
55
+ var n;
56
+ (n = e == null ? void 0 : e.current) == null || n.resetAfterIndex(0);
57
+ }, [e, t.dimension]), /* @__PURE__ */ o("div", { className: "gantt-scale-wrap", children: /* @__PURE__ */ o(
58
+ v,
59
+ {
60
+ className: "gantt-scale-list",
61
+ layout: "horizontal",
62
+ width: W,
63
+ height: m.HEADER_HEIGHT,
64
+ itemCount: s.length,
65
+ itemSize: Y,
66
+ itemData: s,
67
+ ref: e,
68
+ outerRef: l,
69
+ innerRef: N,
70
+ initialScrollOffset: t.initialScrollOffset,
71
+ onScroll: E,
72
+ onItemsRendered: T,
73
+ children: ({ style: n, index: i, data: r }) => /* @__PURE__ */ A("div", { className: "gantt-scale-item", style: n, children: [
74
+ /* @__PURE__ */ o("div", { className: "gantt-scale-title", children: c.unix(r[i]).format(
75
+ t.dimension === p.DAY ? "MMMM, YYYY" : "ddd, D MMMM, YY"
76
+ ) }),
77
+ /* @__PURE__ */ o("div", { className: "gantt-scale-steps", children: G(t.dimension, r[i]).map(
78
+ (a) => /* @__PURE__ */ o(
79
+ "div",
80
+ {
81
+ className: "gantt-scale-step",
82
+ style: { width: t.stepWidth },
83
+ children: a
84
+ },
85
+ a
86
+ )
87
+ ) })
88
+ ] })
27
89
  }
28
- (((S = l.current) == null ? void 0 : S.scrollWidth) || 0) - (((I = l.current) == null ? void 0 : I.clientWidth) || 0) - n - m.TREE_WIDTH < m.MIN_SCROLL_OFFSET && (d([
29
- ...s,
30
- c.unix(s[s.length - 1]).add(1, i).unix()
31
- ]), (g = e == null ? void 0 : e.current) == null || g.resetAfterIndex(0));
32
- },
33
- [
34
- e,
35
- s,
36
- d,
37
- t.dimension,
38
- t.scaleStepItems,
39
- t.stepWidth,
40
- f
41
- ]
42
- ), T = u(
43
- (n) => {
44
- h(n);
45
- },
46
- [h]
47
- );
48
- return _(() => {
49
- var n;
50
- (n = e == null ? void 0 : e.current) == null || n.resetAfterIndex(0);
51
- }, [e, t.dimension]), /* @__PURE__ */ o("div", { className: "gantt-scale-wrap", children: /* @__PURE__ */ o(
52
- v,
53
- {
54
- className: "gantt-scale-list",
55
- layout: "horizontal",
56
- width: W,
57
- height: m.HEADER_HEIGHT,
58
- itemCount: s.length,
59
- itemSize: Y,
60
- itemData: s,
61
- ref: e,
62
- outerRef: l,
63
- innerRef: N,
64
- initialScrollOffset: t.initialScrollOffset,
65
- onScroll: E,
66
- onItemsRendered: T,
67
- children: ({ style: n, index: i, data: r }) => /* @__PURE__ */ A("div", { className: "gantt-scale-item", style: n, children: [
68
- /* @__PURE__ */ o("div", { className: "gantt-scale-title", children: c.unix(r[i]).format(
69
- t.dimension === p.DAY ? "MMMM, YYYY" : "ddd, D MMMM, YY"
70
- ) }),
71
- /* @__PURE__ */ o("div", { className: "gantt-scale-steps", children: G(t.dimension, r[i]).map((a) => /* @__PURE__ */ o(
72
- "div",
73
- {
74
- className: "gantt-scale-step",
75
- style: { width: t.stepWidth },
76
- children: a
77
- },
78
- a
79
- )) })
80
- ] })
81
- }
82
- ) });
83
- });
90
+ ) });
91
+ }
92
+ );
84
93
  R.displayName = "Scale";
85
94
  export {
86
95
  R as default
@@ -5,66 +5,84 @@ import { VariableSizeList as E } from "../../../../../../node_modules/react-wind
5
5
  import { MinusSquareOutlined as y } from "../../../assets/icons/MinusSquareOutlined.js";
6
6
  import { PlusSquareOutlined as T } from "../../../assets/icons/PlusSquareOutlined.js";
7
7
  import { GanttConsts as i } from "../../../constants/GanttConsts.js";
8
- const b = g(({ height: c, data: s, setData: l, treeTitle: m = "Attività" }, p) => {
9
- const o = f(() => {
10
- const r = [];
11
- for (const e of s)
12
- e.hasOwnProperty("expanded") && !e.expanded && r.push(e.key);
13
- return s.filter((e) => !e.parentsKeys.some((n) => r.includes(n)));
14
- }, [s]), u = h(
15
- (r) => {
16
- const e = [...s], t = e.find((n) => n.key === r);
17
- t != null && t.hasOwnProperty("expanded") && (t.expanded = !t.expanded), l(e);
18
- },
19
- [s, l]
20
- );
21
- return /* @__PURE__ */ a(
22
- "div",
23
- {
24
- className: "gantt-tree-wrap bg-d-background",
25
- style: {
26
- width: i.TREE_WIDTH,
27
- marginTop: -i.HEADER_HEIGHT
8
+ const b = g(
9
+ ({ height: c, data: s, setData: l, treeTitle: m = "Attività" }, p) => {
10
+ const o = f(() => {
11
+ const r = [];
12
+ for (const e of s)
13
+ e.hasOwnProperty("expanded") && !e.expanded && r.push(e.key);
14
+ return s.filter((e) => !e.parentsKeys.some(
15
+ (n) => r.includes(n)
16
+ ));
17
+ }, [s]), u = h(
18
+ (r) => {
19
+ const e = [...s], t = e.find((n) => n.key === r);
20
+ t != null && t.hasOwnProperty("expanded") && (t.expanded = !t.expanded), l(e);
28
21
  },
29
- children: /* @__PURE__ */ a(
30
- E,
31
- {
32
- ref: p,
33
- className: "gantt-tree-list bg-d-background",
34
- layout: "vertical",
35
- width: "100%",
36
- height: c,
37
- itemCount: o.length,
38
- itemSize: () => i.ROW_HEIGHT,
39
- itemData: o,
40
- innerElementType: ({ children: r, props: e }) => /* @__PURE__ */ d("div", { style: { height: o.length * i.ROW_HEIGHT }, ...e, children: [
41
- /* @__PURE__ */ a("div", { className: "gantt-tree-title bg-d-background", style: { height: i.HEADER_HEIGHT }, children: m }),
42
- /* @__PURE__ */ a("div", { className: "gantt-tree-inner-wrap", children: r })
43
- ] }),
44
- children: ({ style: r, index: e, data: t }) => {
45
- const n = t[e];
46
- return /* @__PURE__ */ d(
47
- "button",
22
+ [s, l]
23
+ );
24
+ return /* @__PURE__ */ a(
25
+ "div",
26
+ {
27
+ className: "gantt-tree-wrap bg-d-background",
28
+ style: {
29
+ width: i.TREE_WIDTH,
30
+ marginTop: -i.HEADER_HEIGHT
31
+ },
32
+ children: /* @__PURE__ */ a(
33
+ E,
34
+ {
35
+ ref: p,
36
+ className: "gantt-tree-list bg-d-background",
37
+ layout: "vertical",
38
+ width: "100%",
39
+ height: c,
40
+ itemCount: o.length,
41
+ itemSize: () => i.ROW_HEIGHT,
42
+ itemData: o,
43
+ innerElementType: ({ children: r, props: e }) => /* @__PURE__ */ d(
44
+ "div",
48
45
  {
49
- className: "gantt-tree-list-item bg-d-background text-foreground",
50
- style: {
51
- ...r,
52
- backgroundColor: e % 2 === 0 ? "var(--d-background)" : "var(--d-secondary)",
53
- paddingLeft: i.LEAF_TITLE_PADDING_LEFT + n.level * i.LEAF_CHILDREN_PADDING_LEFT
54
- },
55
- onClick: () => u(n.key),
46
+ style: { height: o.length * i.ROW_HEIGHT },
47
+ ...e,
56
48
  children: [
57
- n.hasOwnProperty("expanded") ? n.expanded ? /* @__PURE__ */ a(y, { className: "gantt-tree-icon" }) : /* @__PURE__ */ a(T, { className: "gantt-tree-icon" }) : null,
58
- /* @__PURE__ */ a("div", { children: t[e].title })
49
+ /* @__PURE__ */ a(
50
+ "div",
51
+ {
52
+ className: "gantt-tree-title bg-d-background",
53
+ style: { height: i.HEADER_HEIGHT },
54
+ children: m
55
+ }
56
+ ),
57
+ /* @__PURE__ */ a("div", { className: "gantt-tree-inner-wrap", children: r })
59
58
  ]
60
59
  }
61
- );
60
+ ),
61
+ children: ({ style: r, index: e, data: t }) => {
62
+ const n = t[e];
63
+ return /* @__PURE__ */ d(
64
+ "button",
65
+ {
66
+ className: "gantt-tree-list-item bg-d-background text-foreground",
67
+ style: {
68
+ ...r,
69
+ backgroundColor: e % 2 === 0 ? "var(--d-background)" : "var(--d-secondary)",
70
+ paddingLeft: i.LEAF_TITLE_PADDING_LEFT + n.level * i.LEAF_CHILDREN_PADDING_LEFT
71
+ },
72
+ onClick: () => u(n.key),
73
+ children: [
74
+ n.hasOwnProperty("expanded") ? n.expanded ? /* @__PURE__ */ a(y, { className: "gantt-tree-icon" }) : /* @__PURE__ */ a(T, { className: "gantt-tree-icon" }) : null,
75
+ /* @__PURE__ */ a("div", { children: t[e].title })
76
+ ]
77
+ }
78
+ );
79
+ }
62
80
  }
63
- }
64
- )
65
- }
66
- );
67
- });
81
+ )
82
+ }
83
+ );
84
+ }
85
+ );
68
86
  b.displayName = "Tree";
69
87
  export {
70
88
  b as default
@@ -13,7 +13,9 @@ import { GanttDimensionsSettings as o } from "../../constants/DimensionsSettings
13
13
  import { DragStepOptions as u } from "../../constants/DragStepOptions.js";
14
14
  const Y = ({ className: D }) => {
15
15
  const { calculate: s } = L(), { settings: a, setSettings: p, currentDate: j } = y(B), [z, c] = h(a.dimension), [t, m] = h(
16
- Object.keys(o).findIndex((e) => e === a.dimension)
16
+ Object.keys(o).findIndex(
17
+ (e) => e === a.dimension
18
+ )
17
19
  ), l = f(() => Object.keys(o).map((e, i) => ({
18
20
  label: o[e].label,
19
21
  value: e,
@@ -46,7 +48,7 @@ const Y = ({ className: D }) => {
46
48
  },
47
49
  [p, a]
48
50
  );
49
- return /* @__PURE__ */ d("div", { className: P("flex items-center gap-2 p-4 border-b", D), children: [
51
+ return /* @__PURE__ */ d("div", { className: P("flex items-center gap-2 border-b p-4", D), children: [
50
52
  /* @__PURE__ */ n(
51
53
  g,
52
54
  {
@@ -10,7 +10,17 @@ const P = () => {
10
10
  return { calculate: d(
11
11
  (s) => {
12
12
  var l;
13
- const { stepWidth: S, itemsCount: p, scaleStepItems: g, secondsInPixel: n, unitOfTime: m } = O[s], c = z(e, p, m), i = C(s, c, e), f = x[t.dragStepSize].seconds / n;
13
+ const {
14
+ stepWidth: S,
15
+ itemsCount: p,
16
+ scaleStepItems: g,
17
+ secondsInPixel: n,
18
+ unitOfTime: m
19
+ } = O[s], c = z(e, p, m), i = C(
20
+ s,
21
+ c,
22
+ e
23
+ ), f = x[t.dragStepSize].seconds / n;
14
24
  o({
15
25
  stepWidth: S,
16
26
  initialScrollOffset: i,
@@ -1,7 +1,10 @@
1
1
  "use client";
2
2
  import m from "../../../../_virtual/dayjs.min.js";
3
3
  import { GanttDimensions as u } from "../enums/GanttDimensions.js";
4
- const h = (n, t, o, r) => t === u.DAY ? r * n.reduce((e, i) => e + m.unix(i).daysInMonth(), 0) : n.length * o * r;
4
+ const h = (n, t, o, r) => t === u.DAY ? r * n.reduce(
5
+ (e, i) => e + m.unix(i).daysInMonth(),
6
+ 0
7
+ ) : n.length * o * r;
5
8
  export {
6
9
  h as getWholeWidth
7
10
  };
@@ -5,10 +5,13 @@ const g = (e, u = !0, o = 0, d = 0, t = []) => e.reduce((l, r) => {
5
5
  var h;
6
6
  const c = d + l.length;
7
7
  if ((h = r == null ? void 0 : r.children) != null && h.length) {
8
- const f = g(r.children, u, o + 1, c + 1, [
9
- ...t,
10
- r.key
11
- ]);
8
+ const f = g(
9
+ r.children,
10
+ u,
11
+ o + 1,
12
+ c + 1,
13
+ [...t, r.key]
14
+ );
12
15
  return [
13
16
  ...l,
14
17
  {
@@ -46,7 +46,10 @@ function V({
46
46
  initial: "initial",
47
47
  animate: "animate",
48
48
  exit: "exit",
49
- className: r("flex w-full flex-col items-center justify-center gap-8", v),
49
+ className: r(
50
+ "flex w-full flex-col items-center justify-center gap-8",
51
+ v
52
+ ),
50
53
  children: /* @__PURE__ */ N(
51
54
  l.div,
52
55
  {
@@ -85,7 +88,7 @@ function V({
85
88
  animate: "animate",
86
89
  exit: "exit",
87
90
  className: r(
88
- "text-2xl font-medium text-d-foreground dark:text-d-foreground",
91
+ "text-d-foreground dark:text-d-foreground text-2xl font-medium",
89
92
  y
90
93
  ),
91
94
  children: e
@@ -19,52 +19,47 @@ const b = x(
19
19
  size: "default"
20
20
  }
21
21
  }
22
- ), h = c.forwardRef(({
23
- className: o,
24
- type: l,
25
- label: r,
26
- labelClassName: m,
27
- id: p,
28
- iconLeft: i,
29
- iconRight: s,
30
- size: t,
31
- ...u
32
- }, f) => {
33
- const n = p || (r ? `input-${Math.random().toString(36).substring(2, 9)}` : void 0);
34
- return /* @__PURE__ */ a("div", { className: "space-y-1.5", children: [
35
- r && /* @__PURE__ */ e(
36
- v,
37
- {
38
- htmlFor: n,
39
- className: m,
40
- children: r
41
- }
42
- ),
43
- /* @__PURE__ */ a("div", { className: "relative", children: [
44
- i && /* @__PURE__ */ e("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-d-muted-foreground pointer-events-none", children: /* @__PURE__ */ e(d, { name: i, size: t === "lg" ? "sm" : "xs" }) }),
45
- /* @__PURE__ */ e(
46
- "input",
47
- {
48
- id: n,
49
- type: l,
50
- "data-slot": "input",
51
- className: g(
52
- b({ size: t }),
53
- "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
54
- "aria-invalid:ring-d-destructive/20 dark:aria-invalid:ring-d-destructive/40 aria-invalid:border-d-destructive",
55
- "shadow-sm",
56
- i ? t !== "lg" ? "pl-9" : "pl-10" : "",
57
- s ? t !== "lg" ? "pr-9" : "pr-10" : "",
58
- o
59
- ),
60
- ref: f,
61
- ...u
62
- }
63
- ),
64
- s && /* @__PURE__ */ e("div", { className: "absolute right-3 top-1/2 -translate-y-1/2 text-d-muted-foreground pointer-events-none", children: /* @__PURE__ */ e(d, { name: s, size: t === "lg" ? "sm" : "xs" }) })
65
- ] })
66
- ] });
67
- });
22
+ ), h = c.forwardRef(
23
+ ({
24
+ className: o,
25
+ type: l,
26
+ label: r,
27
+ labelClassName: m,
28
+ id: p,
29
+ iconLeft: i,
30
+ iconRight: s,
31
+ size: t,
32
+ ...u
33
+ }, f) => {
34
+ const n = p || (r ? `input-${Math.random().toString(36).substring(2, 9)}` : void 0);
35
+ return /* @__PURE__ */ a("div", { className: "space-y-1.5", children: [
36
+ r && /* @__PURE__ */ e(v, { htmlFor: n, className: m, children: r }),
37
+ /* @__PURE__ */ a("div", { className: "relative", children: [
38
+ i && /* @__PURE__ */ e("div", { className: "text-d-muted-foreground pointer-events-none absolute top-1/2 left-3 -translate-y-1/2", children: /* @__PURE__ */ e(d, { name: i, size: t === "lg" ? "sm" : "xs" }) }),
39
+ /* @__PURE__ */ e(
40
+ "input",
41
+ {
42
+ id: n,
43
+ type: l,
44
+ "data-slot": "input",
45
+ className: g(
46
+ b({ size: t }),
47
+ "focus-visible:ring-ring focus-visible:ring-1 focus-visible:outline-none",
48
+ "aria-invalid:ring-d-destructive/20 dark:aria-invalid:ring-d-destructive/40 aria-invalid:border-d-destructive",
49
+ "shadow-sm",
50
+ i ? t !== "lg" ? "pl-9" : "pl-10" : "",
51
+ s ? t !== "lg" ? "pr-9" : "pr-10" : "",
52
+ o
53
+ ),
54
+ ref: f,
55
+ ...u
56
+ }
57
+ ),
58
+ s && /* @__PURE__ */ e("div", { className: "text-d-muted-foreground pointer-events-none absolute top-1/2 right-3 -translate-y-1/2", children: /* @__PURE__ */ e(d, { name: s, size: t === "lg" ? "sm" : "xs" }) })
59
+ ] })
60
+ ] });
61
+ }
62
+ );
68
63
  h.displayName = "Input";
69
64
  export {
70
65
  h as Input,
@@ -16,13 +16,13 @@ function m({ isOpen: t, close: r }) {
16
16
  }
17
17
  },
18
18
  exit: { top: 0, filter: "blur(5px)" },
19
- className: "absolute left-1/2 flex -translate-x-1/2 overflow-hidden whitespace-nowrap rounded-full border bg-d-background py-1 text-center text-sm text-d-secondary-foreground",
19
+ className: "bg-d-background text-d-secondary-foreground absolute left-1/2 flex -translate-x-1/2 overflow-hidden rounded-full border py-1 text-center text-sm whitespace-nowrap",
20
20
  children: [
21
21
  /* @__PURE__ */ e("span", { className: "ml-2.5", children: "Press Enter again to interrupt" }),
22
22
  /* @__PURE__ */ e(
23
23
  "button",
24
24
  {
25
- className: "ml-1 mr-2.5 flex items-center",
25
+ className: "mr-2.5 ml-1 flex items-center",
26
26
  type: "button",
27
27
  onClick: r,
28
28
  "aria-label": "Close",
@@ -58,7 +58,7 @@ const w = ({
58
58
  children: /* @__PURE__ */ t(h, { language: n, className: a, children: d })
59
59
  }
60
60
  ),
61
- /* @__PURE__ */ t("div", { className: "invisible absolute right-2 top-2 flex space-x-1 rounded-lg p-1 opacity-0 transition-all duration-200 group-hover/code:visible group-hover/code:opacity-100", children: /* @__PURE__ */ t(k, { content: d, copyMessage: "Copied code to clipboard" }) })
61
+ /* @__PURE__ */ t("div", { className: "invisible absolute top-2 right-2 flex space-x-1 rounded-lg p-1 opacity-0 transition-all duration-200 group-hover/code:visible group-hover/code:opacity-100", children: /* @__PURE__ */ t(k, { content: d, copyMessage: "Copied code to clipboard" }) })
62
62
  ] });
63
63
  };
64
64
  function s(e) {
@@ -86,7 +86,7 @@ const C = {
86
86
  "code",
87
87
  {
88
88
  className: g(
89
- "font-mono [:not(pre)>&]:rounded-md [:not(pre)>&]:bg-d-background/50 [:not(pre)>&]:px-1 [:not(pre)>&]:py-0.5"
89
+ "[:not(pre)>&]:bg-d-background/50 font-mono [:not(pre)>&]:rounded-md [:not(pre)>&]:px-1 [:not(pre)>&]:py-0.5"
90
90
  ),
91
91
  ...i,
92
92
  children: e
@@ -87,7 +87,9 @@ function ne({
87
87
  (c = t.currentTarget.form) == null || c.requestSubmit();
88
88
  }
89
89
  o == null || o(t);
90
- }, b = Y(null), [J, Q] = y(0);
90
+ }, b = Y(
91
+ null
92
+ ), [J, Q] = y(0);
91
93
  C(() => {
92
94
  b.current && Q(b.current.offsetHeight);
93
95
  }, [r.value]);
@@ -129,14 +131,14 @@ function ne({
129
131
  onPaste: B,
130
132
  onKeyDown: W,
131
133
  className: R(
132
- "z-10 w-full grow resize-none rounded-xl border border-d-input bg-d-background p-3 pr-24 text-sm ring-offset-d-background transition-[border] placeholder:text-d-secondary-foreground focus-visible:border-d-primary focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
134
+ "border-d-input bg-d-background ring-offset-d-background placeholder:text-d-secondary-foreground focus-visible:border-d-primary z-10 w-full grow resize-none rounded-xl border p-3 pr-24 text-sm transition-[border] focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
133
135
  z && "pb-16",
134
136
  l
135
137
  ),
136
138
  ...r.allowAttachments ? I(r, ["allowAttachments", "files", "setFiles"]) : I(r, ["allowAttachments"])
137
139
  }
138
140
  ),
139
- r.allowAttachments && /* @__PURE__ */ e("div", { className: "absolute inset-x-3 bottom-2 z-20 overflow-x-scroll py-3 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", children: /* @__PURE__ */ e("div", { className: "flex space-x-3", children: /* @__PURE__ */ e(v, { mode: "popLayout", children: (S = r.files) == null ? void 0 : S.map((t) => /* @__PURE__ */ e(
141
+ r.allowAttachments && /* @__PURE__ */ e("div", { className: "absolute inset-x-3 bottom-2 z-20 overflow-x-scroll py-3 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", children: /* @__PURE__ */ e("div", { className: "flex space-x-3", children: /* @__PURE__ */ e(v, { mode: "popLayout", children: (S = r.files) == null ? void 0 : S.map((t) => /* @__PURE__ */ e(
140
142
  K,
141
143
  {
142
144
  file: t,
@@ -153,7 +155,7 @@ function ne({
153
155
  t.name + String(t.lastModified)
154
156
  )) }) }) })
155
157
  ] }) }),
156
- /* @__PURE__ */ d("div", { className: "absolute right-3 top-3 z-20 flex gap-2", children: [
158
+ /* @__PURE__ */ d("div", { className: "absolute top-3 right-3 z-20 flex gap-2", children: [
157
159
  r.allowAttachments && /* @__PURE__ */ e(
158
160
  p,
159
161
  {
@@ -223,7 +225,7 @@ function le({ isDragging: a }) {
223
225
  return /* @__PURE__ */ e(v, { children: a && /* @__PURE__ */ d(
224
226
  x.div,
225
227
  {
226
- className: "pointer-events-none absolute inset-0 z-20 flex items-center justify-center space-x-2 rounded-xl border border-dashed border-d-border bg-d-background text-sm text-d-secondary-foreground",
228
+ className: "border-d-border bg-d-background text-d-secondary-foreground pointer-events-none absolute inset-0 z-20 flex items-center justify-center space-x-2 rounded-xl border border-dashed text-sm",
227
229
  initial: { opacity: 0 },
228
230
  animate: { opacity: 1 },
229
231
  exit: { opacity: 0 },
@@ -255,18 +257,18 @@ function se() {
255
257
  return /* @__PURE__ */ d(
256
258
  x.div,
257
259
  {
258
- className: "flex h-full w-full flex-col items-center justify-center rounded-xl bg-d-background/80 backdrop-blur-sm",
260
+ className: "bg-d-background/80 flex h-full w-full flex-col items-center justify-center rounded-xl backdrop-blur-sm",
259
261
  initial: { opacity: 0 },
260
262
  animate: { opacity: 1 },
261
263
  exit: { opacity: 0 },
262
264
  transition: { duration: 0.2 },
263
265
  children: [
264
266
  /* @__PURE__ */ d("div", { className: "relative", children: [
265
- /* @__PURE__ */ e(ae, { className: "h-8 w-8 animate-spin text-d-primary" }),
267
+ /* @__PURE__ */ e(ae, { className: "text-d-primary h-8 w-8 animate-spin" }),
266
268
  /* @__PURE__ */ e(
267
269
  x.div,
268
270
  {
269
- className: "absolute inset-0 h-8 w-8 animate-pulse rounded-full bg-d-primary/20",
271
+ className: "bg-d-primary/20 absolute inset-0 h-8 w-8 animate-pulse rounded-full",
270
272
  initial: { scale: 0.8, opacity: 0 },
271
273
  animate: { scale: 1.2, opacity: 1 },
272
274
  transition: {
@@ -278,7 +280,7 @@ function se() {
278
280
  }
279
281
  )
280
282
  ] }),
281
- /* @__PURE__ */ e("p", { className: "mt-4 text-sm font-medium text-d-secondary-foreground", children: "Transcribing audio..." })
283
+ /* @__PURE__ */ e("p", { className: "text-d-secondary-foreground mt-4 text-sm font-medium", children: "Transcribing audio..." })
282
284
  ]
283
285
  }
284
286
  );
@@ -297,7 +299,7 @@ function ce({ isVisible: a, onStopRecording: l }) {
297
299
  }
298
300
  },
299
301
  exit: { top: 0, filter: "blur(5px)" },
300
- className: "absolute left-1/2 flex -translate-x-1/2 cursor-pointer overflow-hidden whitespace-nowrap rounded-full border bg-d-background py-1 text-center text-sm text-d-secondary-foreground",
302
+ className: "bg-d-background text-d-secondary-foreground absolute left-1/2 flex -translate-x-1/2 cursor-pointer overflow-hidden rounded-full border py-1 text-center text-sm whitespace-nowrap",
301
303
  onClick: l,
302
304
  children: /* @__PURE__ */ d("span", { className: "mx-2.5 flex items-center", children: [
303
305
  /* @__PURE__ */ e(ie, { className: "mr-2 h-3 w-3" }),