@iit/precision-ui 0.6.0 → 0.7.1

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 (135) hide show
  1. package/dist/components/ArticlePreviewTag.d.ts +11 -0
  2. package/dist/components/ArticlePreviewTag.d.ts.map +1 -0
  3. package/dist/components/cards/AdvantageWithAccordion.d.ts +12 -0
  4. package/dist/components/cards/AdvantageWithAccordion.d.ts.map +1 -0
  5. package/dist/components/cards/Connect.d.ts +19 -0
  6. package/dist/components/cards/Connect.d.ts.map +1 -0
  7. package/dist/components/cards/Doc.d.ts +11 -0
  8. package/dist/components/cards/Doc.d.ts.map +1 -0
  9. package/dist/components/cards/FAQ.d.ts +14 -0
  10. package/dist/components/cards/FAQ.d.ts.map +1 -0
  11. package/dist/components/cards/License.d.ts +10 -0
  12. package/dist/components/cards/License.d.ts.map +1 -0
  13. package/dist/components/cards/Package.d.ts +28 -0
  14. package/dist/components/cards/Package.d.ts.map +1 -0
  15. package/dist/components/pieces/ShowMoreAccordionTrigger.d.ts +8 -0
  16. package/dist/components/pieces/ShowMoreAccordionTrigger.d.ts.map +1 -0
  17. package/dist/components/ui/TagLink.d.ts +14 -0
  18. package/dist/components/ui/TagLink.d.ts.map +1 -0
  19. package/dist/components/ui/accordion.d.ts +15 -0
  20. package/dist/components/ui/accordion.d.ts.map +1 -0
  21. package/dist/components/ui/tabs.d.ts +8 -0
  22. package/dist/components/ui/tabs.d.ts.map +1 -0
  23. package/dist/icons/comet.svg +5 -0
  24. package/dist/index.d.ts +38 -11
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.es.js +112 -63
  27. package/dist/index.es.js.map +1 -1
  28. package/dist/index.es10.js +1 -1
  29. package/dist/index.es11.js +1 -1
  30. package/dist/index.es12.js +1 -1
  31. package/dist/index.es13.js +79 -24
  32. package/dist/index.es13.js.map +1 -1
  33. package/dist/index.es14.js +83 -26
  34. package/dist/index.es14.js.map +1 -1
  35. package/dist/index.es15.js +19 -19
  36. package/dist/index.es15.js.map +1 -1
  37. package/dist/index.es16.js +28 -25
  38. package/dist/index.es16.js.map +1 -1
  39. package/dist/index.es17.js +24 -69
  40. package/dist/index.es17.js.map +1 -1
  41. package/dist/index.es18.js +22 -32
  42. package/dist/index.es18.js.map +1 -1
  43. package/dist/index.es19.js +72 -31
  44. package/dist/index.es19.js.map +1 -1
  45. package/dist/index.es2.js +1 -1
  46. package/dist/index.es20.js +24 -19
  47. package/dist/index.es20.js.map +1 -1
  48. package/dist/index.es21.js +30 -26
  49. package/dist/index.es21.js.map +1 -1
  50. package/dist/index.es22.js +25 -205
  51. package/dist/index.es22.js.map +1 -1
  52. package/dist/index.es23.js +17 -50
  53. package/dist/index.es23.js.map +1 -1
  54. package/dist/index.es24.js +40 -52
  55. package/dist/index.es24.js.map +1 -1
  56. package/dist/index.es25.js +30 -54
  57. package/dist/index.es25.js.map +1 -1
  58. package/dist/index.es26.js +52 -18
  59. package/dist/index.es26.js.map +1 -1
  60. package/dist/index.es27.js +14 -19
  61. package/dist/index.es27.js.map +1 -1
  62. package/dist/index.es28.js +6 -91
  63. package/dist/index.es28.js.map +1 -1
  64. package/dist/index.es29.js +53 -90
  65. package/dist/index.es29.js.map +1 -1
  66. package/dist/index.es3.js +2 -2
  67. package/dist/index.es30.js +25 -31
  68. package/dist/index.es30.js.map +1 -1
  69. package/dist/index.es31.js +97 -6
  70. package/dist/index.es31.js.map +1 -1
  71. package/dist/index.es32.js +55 -21
  72. package/dist/index.es32.js.map +1 -1
  73. package/dist/index.es33.js +90 -18
  74. package/dist/index.es33.js.map +1 -1
  75. package/dist/index.es34.js +96 -18
  76. package/dist/index.es34.js.map +1 -1
  77. package/dist/index.es35.js +11 -9
  78. package/dist/index.es35.js.map +1 -1
  79. package/dist/index.es36.js +42 -82
  80. package/dist/index.es36.js.map +1 -1
  81. package/dist/index.es37.js +23 -18
  82. package/dist/index.es37.js.map +1 -1
  83. package/dist/index.es38.js +36 -43
  84. package/dist/index.es38.js.map +1 -1
  85. package/dist/index.es39.js +24 -49
  86. package/dist/index.es39.js.map +1 -1
  87. package/dist/index.es4.js +1 -1
  88. package/dist/index.es40.js +205 -34
  89. package/dist/index.es40.js.map +1 -1
  90. package/dist/index.es41.js +46 -50
  91. package/dist/index.es41.js.map +1 -1
  92. package/dist/index.es42.js +47 -81
  93. package/dist/index.es42.js.map +1 -1
  94. package/dist/index.es43.js +60 -97
  95. package/dist/index.es43.js.map +1 -1
  96. package/dist/index.es44.js +19 -26
  97. package/dist/index.es44.js.map +1 -1
  98. package/dist/index.es45.js +17 -45
  99. package/dist/index.es45.js.map +1 -1
  100. package/dist/index.es46.js +75 -226
  101. package/dist/index.es46.js.map +1 -1
  102. package/dist/index.es47.js +90 -16
  103. package/dist/index.es47.js.map +1 -1
  104. package/dist/index.es48.js +33 -4
  105. package/dist/index.es48.js.map +1 -1
  106. package/dist/index.es49.js +80 -0
  107. package/dist/index.es49.js.map +1 -0
  108. package/dist/index.es5.js +1 -1
  109. package/dist/index.es50.js +46 -0
  110. package/dist/index.es50.js.map +1 -0
  111. package/dist/index.es51.js +14 -0
  112. package/dist/index.es51.js.map +1 -0
  113. package/dist/index.es52.js +9 -0
  114. package/dist/index.es52.js.map +1 -0
  115. package/dist/index.es53.js +25 -0
  116. package/dist/index.es53.js.map +1 -0
  117. package/dist/index.es54.js +23 -0
  118. package/dist/index.es54.js.map +1 -0
  119. package/dist/index.es55.js +23 -0
  120. package/dist/index.es55.js.map +1 -0
  121. package/dist/index.es56.js +50 -0
  122. package/dist/index.es56.js.map +1 -0
  123. package/dist/index.es57.js +30 -0
  124. package/dist/index.es57.js.map +1 -0
  125. package/dist/index.es58.js +19 -0
  126. package/dist/index.es58.js.map +1 -0
  127. package/dist/index.es59.js +245 -0
  128. package/dist/index.es59.js.map +1 -0
  129. package/dist/index.es6.js +1 -1
  130. package/dist/index.es60.js +7 -0
  131. package/dist/index.es60.js.map +1 -0
  132. package/dist/index.es7.js +1 -1
  133. package/dist/index.es8.js +1 -1
  134. package/dist/styles.css +206 -0
  135. package/package.json +5 -3
@@ -1,245 +1,94 @@
1
- import e from "react";
2
- import D from "embla-carousel-react";
3
- import { ChevronLeft as j, ChevronRight as B } from "lucide-react";
4
- import { cn as i } from "./index.es31.js";
5
- import { Slot as K } from "@radix-ui/react-slot";
6
- import { cva as L } from "class-variance-authority";
7
- const V = L(
8
- "inline-flex items-center justify-center whitespace-nowrap rounded-full typo_variant_button ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed border-none",
9
- {
10
- variants: {
11
- variant: {
12
- default: "bg-white text-navy hover:bg-navy-opacity-4",
13
- destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
14
- outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
15
- ghost: "hover:bg-accent hover:text-accent-foreground",
16
- link: "text-primary underline-offset-4 hover:underline"
17
- },
18
- size: {
19
- default: "h-10 px-4 py-2",
20
- sm: "h-9 rounded-md px-3",
21
- lg: "h-11 rounded-md px-8",
22
- icon: "h-10 w-10"
23
- }
24
- },
25
- defaultVariants: {
26
- // variant: "default",
27
- // size: "default",
28
- }
29
- }
30
- ), g = e.forwardRef(
31
- ({ className: r, variant: o, size: l, asChild: a = !1, ...s }, u) => {
32
- const c = a ? K : "button";
33
- return /* @__PURE__ */ e.createElement(
34
- c,
35
- {
36
- className: i(V({ variant: o, size: l }), r),
37
- ref: u,
38
- ...s
39
- }
40
- );
41
- }
42
- );
43
- g.displayName = "Button";
44
- const x = e.createContext(null);
45
- function h() {
46
- const r = e.useContext(x);
47
- if (!r)
48
- throw new Error("useCarousel must be used within a <Carousel />");
49
- return r;
50
- }
51
- const $ = e.forwardRef(
52
- ({
53
- orientation: r = "horizontal",
54
- opts: o,
55
- setApi: l,
56
- plugins: a,
57
- className: s,
58
- children: u,
59
- hideControlsOnDesktop: c = !1,
60
- variant: d = "default",
61
- ...C
62
- }, N) => {
63
- const [E, t] = D(
64
- {
65
- ...o,
66
- axis: r === "horizontal" ? "x" : "y"
67
- },
68
- a
69
- ), [S, P] = e.useState(!1), [k, R] = e.useState(!1), [z, _] = e.useState(0), m = e.useCallback(() => {
70
- if (!t)
71
- return;
72
- const n = t.scrollProgress();
73
- console.log("progress", n), _(n * 100);
74
- }, [t]), f = e.useCallback(
75
- (n) => {
76
- n && (P(n.canScrollPrev()), R(n.canScrollNext()), m());
77
- },
78
- [m]
79
- ), v = e.useCallback(() => {
80
- t?.scrollPrev();
81
- }, [t]), b = e.useCallback(() => {
82
- t?.scrollNext();
83
- }, [t]), I = e.useCallback(
84
- (n) => {
85
- n.key === "ArrowLeft" ? (n.preventDefault(), v()) : n.key === "ArrowRight" && (n.preventDefault(), b());
86
- },
87
- [v, b]
88
- );
89
- e.useEffect(() => {
90
- !t || !l || l(t);
91
- }, [t, l]), e.useEffect(() => {
92
- if (t)
93
- return f(t), t.on("reInit", f), t.on("select", f), t.on("scroll", m), () => {
94
- t?.off("reInit", f), t?.off("select", f), t?.off("scroll", m);
95
- };
96
- }, [t, f, m]);
97
- const p = i(
98
- "relative left-auto top-auto right-auto translate-y-0 border border-solid rounded-lg bg-transparent hover:rounded-[24px] transition-all duration-200 h-10 w-10",
99
- d === "white" ? "hover:bg-whitish border-whitish-opacity-32" : "hover:bg-navy hover:text-white border-navy-opacity-32"
100
- );
101
- return /* @__PURE__ */ e.createElement(
102
- x.Provider,
103
- {
104
- value: {
105
- carouselRef: E,
106
- api: t,
107
- opts: o,
108
- orientation: r || (o?.axis === "y" ? "vertical" : "horizontal"),
109
- scrollPrev: v,
110
- scrollNext: b,
111
- canScrollPrev: S,
112
- canScrollNext: k
113
- }
114
- },
115
- /* @__PURE__ */ e.createElement(
116
- "div",
117
- {
118
- ref: N,
119
- onKeyDownCapture: I,
120
- className: i("relative", s),
121
- role: "region",
122
- "aria-roledescription": "carousel",
123
- ...C
124
- },
125
- u,
126
- /* @__PURE__ */ e.createElement(
127
- "div",
128
- {
129
- className: i(
130
- "relative w-full mt-8 rounded-full overflow-hidden md:max-w-2xl mx-auto",
131
- c ? "lg:hidden" : "",
132
- d === "white" ? "bg-whitish-opacity-16 h-0.5" : "bg-gray-300 h-0.5"
133
- )
134
- },
135
- /* @__PURE__ */ e.createElement(
136
- "div",
137
- {
138
- className: i(
139
- "absolute top-0 left-0 h-full w-full rounded-full transition-transform duration-0",
140
- d === "white" ? "bg-whitish" : "bg-navy"
141
- ),
142
- style: {
143
- transform: `translateX(${z - 100}%)`
144
- }
145
- }
146
- )
147
- ),
148
- /* @__PURE__ */ e.createElement(
149
- "div",
150
- {
151
- className: `embla__controls max-w-sm mx-auto mt-6 flex justify-center gap-4 ${c ? "lg:hidden" : ""}`
152
- },
153
- /* @__PURE__ */ e.createElement("div", { className: "embla__buttons space-x-2" }, /* @__PURE__ */ e.createElement(w, { className: p }), /* @__PURE__ */ e.createElement(y, { className: p }))
154
- )
155
- )
156
- );
157
- }
158
- );
159
- $.displayName = "Carousel";
160
- const X = e.forwardRef(({ className: r, ...o }, l) => {
161
- const { carouselRef: a, orientation: s } = h();
162
- return /* @__PURE__ */ e.createElement("div", { ref: a, className: "overflow-hidden" }, /* @__PURE__ */ e.createElement(
163
- "div",
1
+ import * as e from "react";
2
+ import { FormProvider as f, Controller as F, useFormContext as u } from "react-hook-form";
3
+ import { Label as p } from "./index.es17.js";
4
+ import { Slot as I } from "@radix-ui/react-slot";
5
+ import { cn as a } from "./index.es52.js";
6
+ const R = f, c = e.createContext(
7
+ {}
8
+ ), $ = ({
9
+ ...t
10
+ }) => /* @__PURE__ */ e.createElement(c.Provider, { value: { name: t.name } }, /* @__PURE__ */ e.createElement(F, { ...t })), i = () => {
11
+ const t = e.useContext(c), o = e.useContext(l), { getFieldState: r, formState: m } = u(), n = r(t.name, m);
12
+ if (!t)
13
+ throw new Error("useFormField should be used within <FormField>");
14
+ const { id: s } = o;
15
+ return {
16
+ id: s,
17
+ name: t.name,
18
+ formItemId: `${s}-form-item`,
19
+ formDescriptionId: `${s}-form-item-description`,
20
+ formMessageId: `${s}-form-item-message`,
21
+ ...n
22
+ };
23
+ }, l = e.createContext(
24
+ {}
25
+ ), x = e.forwardRef(({ className: t, ...o }, r) => {
26
+ const m = e.useId();
27
+ return /* @__PURE__ */ e.createElement(l.Provider, { value: { id: m } }, /* @__PURE__ */ e.createElement("div", { ref: r, className: a("space-y-2", t), ...o }));
28
+ });
29
+ x.displayName = "FormItem";
30
+ const C = e.forwardRef(({ className: t, ...o }, r) => {
31
+ const { error: m, formItemId: n } = i();
32
+ return /* @__PURE__ */ e.createElement(
33
+ p,
164
34
  {
165
- ref: l,
166
- className: i(
167
- "flex",
168
- s === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
169
- r
170
- ),
35
+ ref: r,
36
+ className: a(m && "text-destructive", t),
37
+ htmlFor: n,
171
38
  ...o
172
39
  }
173
- ));
40
+ );
174
41
  });
175
- X.displayName = "CarouselContent";
176
- const q = e.forwardRef(({ className: r, ...o }, l) => {
177
- const { orientation: a } = h();
42
+ C.displayName = "FormLabel";
43
+ const g = e.forwardRef(({ ...t }, o) => {
44
+ const { error: r, formItemId: m, formDescriptionId: n, formMessageId: s } = i();
178
45
  return /* @__PURE__ */ e.createElement(
179
- "div",
46
+ I,
180
47
  {
181
- ref: l,
182
- role: "group",
183
- "aria-roledescription": "slide",
184
- className: i(
185
- "min-w-0 shrink-0 grow-0 basis-full",
186
- a === "horizontal" ? "pl-4" : "pt-4",
187
- r
188
- ),
189
- ...o
48
+ ref: o,
49
+ id: m,
50
+ "aria-describedby": r ? `${n} ${s}` : `${n}`,
51
+ "aria-invalid": !!r,
52
+ ...t
190
53
  }
191
54
  );
192
55
  });
193
- q.displayName = "CarouselItem";
194
- const w = e.forwardRef(({ className: r, variant: o = "outline", size: l = "icon", ...a }, s) => {
195
- const { orientation: u, scrollPrev: c, canScrollPrev: d } = h();
56
+ g.displayName = "FormControl";
57
+ const v = e.forwardRef(({ className: t, ...o }, r) => {
58
+ const { formDescriptionId: m } = i();
196
59
  return /* @__PURE__ */ e.createElement(
197
- g,
60
+ "p",
198
61
  {
199
- ref: s,
200
- variant: o,
201
- size: l,
202
- className: i(
203
- "absolute h-8 w-8 rounded-full",
204
- u === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
205
- r
206
- ),
207
- disabled: !d,
208
- onClick: c,
209
- ...a
210
- },
211
- /* @__PURE__ */ e.createElement(j, { className: "h-5 w-5" }),
212
- /* @__PURE__ */ e.createElement("span", { className: "sr-only" }, "Previous slide")
62
+ ref: r,
63
+ id: m,
64
+ className: a("text-sm text-muted-foreground", t),
65
+ ...o
66
+ }
213
67
  );
214
68
  });
215
- w.displayName = "CarouselPrevious";
216
- const y = e.forwardRef(({ className: r, variant: o = "outline", size: l = "icon", ...a }, s) => {
217
- const { orientation: u, scrollNext: c, canScrollNext: d } = h();
218
- return /* @__PURE__ */ e.createElement(
219
- g,
69
+ v.displayName = "FormDescription";
70
+ const E = e.forwardRef(({ className: t, children: o, ...r }, m) => {
71
+ const { error: n, formMessageId: s } = i(), d = n ? String(n?.message) : o;
72
+ return d ? /* @__PURE__ */ e.createElement(
73
+ "p",
220
74
  {
221
- ref: s,
222
- variant: o,
223
- size: l,
224
- className: i(
225
- "absolute h-8 w-8 rounded-full",
226
- u === "horizontal" ? "-right-12 top-1/2 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
227
- r
228
- ),
229
- disabled: !d,
230
- onClick: c,
231
- ...a
75
+ ref: m,
76
+ id: s,
77
+ className: a("text-sm font-medium text-destructive", t),
78
+ ...r
232
79
  },
233
- /* @__PURE__ */ e.createElement(B, { className: "h-5 w-5" }),
234
- /* @__PURE__ */ e.createElement("span", { className: "sr-only" }, "Next slide")
235
- );
80
+ d
81
+ ) : null;
236
82
  });
237
- y.displayName = "CarouselNext";
83
+ E.displayName = "FormMessage";
238
84
  export {
239
- $ as Carousel,
240
- X as CarouselContent,
241
- q as CarouselItem,
242
- y as CarouselNext,
243
- w as CarouselPrevious
85
+ R as Form,
86
+ g as FormControl,
87
+ v as FormDescription,
88
+ $ as FormField,
89
+ x as FormItem,
90
+ C as FormLabel,
91
+ E as FormMessage,
92
+ i as useFormField
244
93
  };
245
94
  //# sourceMappingURL=index.es46.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es46.js","sources":["../src/components/ui/carousel.tsx"],"sourcesContent":["import React from 'react'\r\nimport useEmblaCarousel, {\r\n type UseEmblaCarouselType,\r\n} from 'embla-carousel-react'\r\nimport { ChevronLeft, ChevronRight } from 'lucide-react'\r\n\r\nimport { cn } from '@/lib/utils/cn'\r\n// import { Button } from './button'\r\n\r\n// Button here to reuse\r\nimport { Slot } from '@radix-ui/react-slot'\r\nimport { cva, type VariantProps } from 'class-variance-authority'\r\n\r\nconst buttonVariants = cva(\r\n 'inline-flex items-center justify-center whitespace-nowrap rounded-full typo_variant_button ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed border-none',\r\n {\r\n variants: {\r\n variant: {\r\n default: 'bg-white text-navy hover:bg-navy-opacity-4',\r\n destructive:\r\n 'bg-destructive text-destructive-foreground hover:bg-destructive/90',\r\n outline:\r\n 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',\r\n ghost: 'hover:bg-accent hover:text-accent-foreground',\r\n link: 'text-primary underline-offset-4 hover:underline',\r\n },\r\n size: {\r\n default: 'h-10 px-4 py-2',\r\n sm: 'h-9 rounded-md px-3',\r\n lg: 'h-11 rounded-md px-8',\r\n icon: 'h-10 w-10',\r\n },\r\n },\r\n defaultVariants: {\r\n // variant: \"default\",\r\n // size: \"default\",\r\n },\r\n }\r\n)\r\n\r\nexport interface ButtonProps\r\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\r\n VariantProps<typeof buttonVariants> {\r\n asChild?: boolean\r\n}\r\n\r\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\r\n ({ className, variant, size, asChild = false, ...props }, ref) => {\r\n const Comp = asChild ? Slot : 'button'\r\n return (\r\n <Comp\r\n className={cn(buttonVariants({ variant, size }), className)}\r\n ref={ref}\r\n {...props}\r\n />\r\n )\r\n }\r\n)\r\nButton.displayName = 'Button'\r\n\r\n// end of Button\r\n\r\ntype CarouselApi = UseEmblaCarouselType[1]\r\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>\r\ntype CarouselOptions = UseCarouselParameters[0]\r\ntype CarouselPlugin = UseCarouselParameters[1]\r\n\r\ntype CarouselProps = {\r\n opts?: CarouselOptions\r\n plugins?: CarouselPlugin\r\n orientation?: 'horizontal' | 'vertical'\r\n setApi?: (api: CarouselApi) => void\r\n}\r\n\r\ntype CarouselContextProps = {\r\n carouselRef: ReturnType<typeof useEmblaCarousel>[0]\r\n api: ReturnType<typeof useEmblaCarousel>[1]\r\n scrollPrev: () => void\r\n scrollNext: () => void\r\n canScrollPrev: boolean\r\n canScrollNext: boolean\r\n} & CarouselProps\r\n\r\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null)\r\n\r\nfunction useCarousel() {\r\n const context = React.useContext(CarouselContext)\r\n\r\n if (!context) {\r\n throw new Error('useCarousel must be used within a <Carousel />')\r\n }\r\n\r\n return context\r\n}\r\n\r\ninterface CustomProps {\r\n hideControlsOnDesktop?: boolean\r\n variant?: \"default\" | \"white\";\r\n}\r\n\r\nconst Carousel = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes<HTMLDivElement> & CarouselProps & CustomProps\r\n>(\r\n (\r\n {\r\n orientation = 'horizontal',\r\n opts,\r\n setApi,\r\n plugins,\r\n className,\r\n children,\r\n hideControlsOnDesktop = false,\r\n variant = \"default\",\r\n ...props\r\n },\r\n ref\r\n ) => {\r\n const [carouselRef, api] = useEmblaCarousel(\r\n {\r\n ...opts,\r\n axis: orientation === 'horizontal' ? 'x' : 'y',\r\n },\r\n plugins\r\n )\r\n const [canScrollPrev, setCanScrollPrev] = React.useState(false)\r\n const [canScrollNext, setCanScrollNext] = React.useState(false)\r\n const [scrollProgress, setScrollProgress] = React.useState(0)\r\n\r\n const onScroll = React.useCallback(() => {\r\n if (!api) return\r\n const progress = api.scrollProgress()\r\n console.log('progress', progress)\r\n setScrollProgress(progress * 100) // Convert to percentage\r\n }, [api])\r\n\r\n const onSelect = React.useCallback(\r\n (api: CarouselApi) => {\r\n if (!api) return\r\n setCanScrollPrev(api.canScrollPrev())\r\n setCanScrollNext(api.canScrollNext())\r\n onScroll() // Update scroll progress when selection changes\r\n },\r\n [onScroll]\r\n )\r\n\r\n const scrollPrev = React.useCallback(() => {\r\n api?.scrollPrev()\r\n }, [api])\r\n\r\n const scrollNext = React.useCallback(() => {\r\n api?.scrollNext()\r\n }, [api])\r\n\r\n const handleKeyDown = React.useCallback(\r\n (event: React.KeyboardEvent<HTMLDivElement>) => {\r\n if (event.key === 'ArrowLeft') {\r\n event.preventDefault()\r\n scrollPrev()\r\n } else if (event.key === 'ArrowRight') {\r\n event.preventDefault()\r\n scrollNext()\r\n }\r\n },\r\n [scrollPrev, scrollNext]\r\n )\r\n\r\n React.useEffect(() => {\r\n if (!api || !setApi) return\r\n setApi(api)\r\n }, [api, setApi])\r\n\r\n React.useEffect(() => {\r\n if (!api) return\r\n onSelect(api)\r\n api.on('reInit', onSelect)\r\n api.on('select', onSelect)\r\n api.on('scroll', onScroll) // Update on scroll events\r\n\r\n return () => {\r\n api?.off('reInit', onSelect)\r\n api?.off('select', onSelect)\r\n api?.off('scroll', onScroll)\r\n }\r\n }, [api, onSelect, onScroll])\r\n\r\n // const { selectedIndex, scrollSnaps, onDotButtonClick } = useDotButton(api)\r\n\r\n const buttonClasses = cn(\r\n \"relative left-auto top-auto right-auto translate-y-0 border border-solid rounded-lg bg-transparent hover:rounded-[24px] transition-all duration-200 h-10 w-10\",\r\n variant === \"white\"\r\n ? \"hover:bg-whitish border-whitish-opacity-32\"\r\n : \"hover:bg-navy hover:text-white border-navy-opacity-32\"\r\n );\r\n\r\n return (\r\n <CarouselContext.Provider\r\n value={{\r\n carouselRef,\r\n api: api,\r\n opts,\r\n orientation:\r\n orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),\r\n scrollPrev,\r\n scrollNext,\r\n canScrollPrev,\r\n canScrollNext,\r\n }}\r\n >\r\n <div\r\n ref={ref}\r\n onKeyDownCapture={handleKeyDown}\r\n className={cn('relative', className)}\r\n role=\"region\"\r\n aria-roledescription=\"carousel\"\r\n {...props}\r\n >\r\n {children}\r\n\r\n {/* Scroll Progress Indicator */}\r\n <div\r\n className={cn(\r\n \"relative w-full mt-8 rounded-full overflow-hidden md:max-w-2xl mx-auto\",\r\n hideControlsOnDesktop ? \"lg:hidden\" : \"\",\r\n variant === \"white\"\r\n ? \"bg-whitish-opacity-16 h-0.5\"\r\n : \"bg-gray-300 h-0.5\"\r\n )}\r\n >\r\n <div\r\n className={cn(\r\n \"absolute top-0 left-0 h-full w-full rounded-full transition-transform duration-0\",\r\n variant === \"white\" ? \"bg-whitish\" : \"bg-navy\"\r\n )}\r\n style={{\r\n transform: `translateX(${scrollProgress - 100}%)`,\r\n }}\r\n ></div>\r\n </div>\r\n\r\n <div\r\n className={`embla__controls max-w-sm mx-auto mt-6 flex justify-center gap-4 ${\r\n hideControlsOnDesktop ? 'lg:hidden' : ''\r\n }`}\r\n >\r\n <div className=\"embla__buttons space-x-2\">\r\n <CarouselPrevious className={buttonClasses} />\r\n <CarouselNext className={buttonClasses} />\r\n </div>\r\n\r\n {/* <div className=\"embla__progress\">\r\n <div\r\n className=\"embla__progress__bar\"\r\n style={{ transform: `translate3d(${scrollProgress}%,0px,0px)` }}\r\n />\r\n </div> */}\r\n </div>\r\n\r\n {/* Dots: not used */}\r\n {/* <div className=\"embla__controls\">\r\n <div className=\"embla__buttons\">\r\n <CarouselPrevious className=\"relative left-auto top-auto right-auto translate-y-0\" />\r\n <CarouselNext className=\"relative left-auto top-auto right-auto translate-y-0\" />\r\n </div>\r\n\r\n <div className=\"embla__dots\">\r\n {scrollSnaps.map((_, index) => (\r\n <DotButton\r\n key={index}\r\n onClick={() => onDotButtonClick(index)}\r\n className={\"embla__dot\".concat(\r\n index === selectedIndex ? \" embla__dot--selected\" : \"\"\r\n )}\r\n />\r\n ))}\r\n </div>\r\n </div> */}\r\n </div>\r\n </CarouselContext.Provider>\r\n )\r\n }\r\n)\r\nCarousel.displayName = 'Carousel'\r\n\r\nconst CarouselContent = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes<HTMLDivElement>\r\n>(({ className, ...props }, ref) => {\r\n const { carouselRef, orientation } = useCarousel()\r\n\r\n return (\r\n <div ref={carouselRef} className=\"overflow-hidden\">\r\n <div\r\n ref={ref}\r\n className={cn(\r\n 'flex',\r\n orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col',\r\n className\r\n )}\r\n {...props}\r\n />\r\n </div>\r\n )\r\n})\r\nCarouselContent.displayName = 'CarouselContent'\r\n\r\nconst CarouselItem = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes<HTMLDivElement>\r\n>(({ className, ...props }, ref) => {\r\n const { orientation } = useCarousel()\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n role=\"group\"\r\n aria-roledescription=\"slide\"\r\n className={cn(\r\n 'min-w-0 shrink-0 grow-0 basis-full',\r\n orientation === 'horizontal' ? 'pl-4' : 'pt-4',\r\n className\r\n )}\r\n {...props}\r\n />\r\n )\r\n})\r\nCarouselItem.displayName = 'CarouselItem'\r\n\r\nconst CarouselPrevious = React.forwardRef<\r\n HTMLButtonElement,\r\n React.ComponentProps<typeof Button>\r\n>(({ className, variant = 'outline', size = 'icon', ...props }, ref) => {\r\n const { orientation, scrollPrev, canScrollPrev } = useCarousel()\r\n\r\n return (\r\n <Button\r\n ref={ref}\r\n variant={variant}\r\n size={size}\r\n className={cn(\r\n 'absolute h-8 w-8 rounded-full',\r\n orientation === 'horizontal'\r\n ? '-left-12 top-1/2 -translate-y-1/2'\r\n : '-top-12 left-1/2 -translate-x-1/2 rotate-90',\r\n className\r\n )}\r\n disabled={!canScrollPrev}\r\n onClick={scrollPrev}\r\n {...props}\r\n >\r\n <ChevronLeft className=\"h-5 w-5\" />\r\n <span className=\"sr-only\">Previous slide</span>\r\n </Button>\r\n )\r\n})\r\nCarouselPrevious.displayName = 'CarouselPrevious'\r\n\r\nconst CarouselNext = React.forwardRef<\r\n HTMLButtonElement,\r\n React.ComponentProps<typeof Button>\r\n>(({ className, variant = 'outline', size = 'icon', ...props }, ref) => {\r\n const { orientation, scrollNext, canScrollNext } = useCarousel()\r\n\r\n return (\r\n <Button\r\n ref={ref}\r\n variant={variant}\r\n size={size}\r\n className={cn(\r\n 'absolute h-8 w-8 rounded-full',\r\n orientation === 'horizontal'\r\n ? '-right-12 top-1/2 -translate-y-1/2'\r\n : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',\r\n className\r\n )}\r\n disabled={!canScrollNext}\r\n onClick={scrollNext}\r\n {...props}\r\n >\r\n <ChevronRight className=\"h-5 w-5\" />\r\n <span className=\"sr-only\">Next slide</span>\r\n </Button>\r\n )\r\n})\r\nCarouselNext.displayName = 'CarouselNext'\r\n\r\nexport {\r\n type CarouselApi,\r\n Carousel,\r\n CarouselContent,\r\n CarouselItem,\r\n CarouselPrevious,\r\n CarouselNext,\r\n}\r\n"],"names":["buttonVariants","cva","Button","React","className","variant","size","asChild","props","ref","Comp","Slot","cn","CarouselContext","useCarousel","context","Carousel","orientation","opts","setApi","plugins","children","hideControlsOnDesktop","carouselRef","api","useEmblaCarousel","canScrollPrev","setCanScrollPrev","canScrollNext","setCanScrollNext","scrollProgress","setScrollProgress","onScroll","progress","onSelect","scrollPrev","scrollNext","handleKeyDown","event","buttonClasses","CarouselPrevious","CarouselNext","CarouselContent","CarouselItem","ChevronLeft","ChevronRight"],"mappings":";;;;;;AAaA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.tsx"],"sourcesContent":["import * as LabelPrimitive from '@radix-ui/react-label'\nimport * as React from 'react'\n\nimport {\n Controller,\n ControllerProps,\n FieldPath,\n FieldValues,\n FormProvider,\n useFormContext,\n} from 'react-hook-form'\nimport { Label, labelVariants } from '@/components/ui/label'\n\nimport { Slot } from '@radix-ui/react-slot'\nimport { VariantProps } from 'class-variance-authority'\nimport { cn } from '@/lib/utils/cn'\n\nconst Form = FormProvider\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n> = {\n name: TName\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>(\n {} as FormFieldContextValue\n)\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n )\n}\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext)\n const itemContext = React.useContext(FormItemContext)\n const { getFieldState, formState } = useFormContext()\n\n const fieldState = getFieldState(fieldContext.name, formState)\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>')\n }\n\n const { id } = itemContext\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n }\n}\n\ntype FormItemContextValue = {\n id: string\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue>(\n {} as FormItemContextValue\n)\n\nconst FormItem = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const id = React.useId()\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n )\n})\nFormItem.displayName = 'FormItem'\n\nconst FormLabel = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField()\n\n return (\n <Label\n ref={ref}\n className={cn(error && 'text-destructive', className)}\n htmlFor={formItemId}\n {...props}\n />\n )\n})\nFormLabel.displayName = 'FormLabel'\n\nconst FormControl = React.forwardRef<\n React.ElementRef<typeof Slot>,\n React.ComponentPropsWithoutRef<typeof Slot>\n>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField()\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={\n !error\n ? `${formDescriptionId}`\n : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={!!error}\n {...props}\n />\n )\n})\nFormControl.displayName = 'FormControl'\n\nconst FormDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField()\n\n return (\n <p\n ref={ref}\n id={formDescriptionId}\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n )\n})\nFormDescription.displayName = 'FormDescription'\n\nconst FormMessage = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, children, ...props }, ref) => {\n const { error, formMessageId } = useFormField()\n const body = error ? String(error?.message) : children\n\n if (!body) {\n return null\n }\n\n return (\n <p\n ref={ref}\n id={formMessageId}\n className={cn('text-sm font-medium text-destructive', className)}\n {...props}\n >\n {body}\n </p>\n )\n})\nFormMessage.displayName = 'FormMessage'\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n}\n"],"names":["Form","FormProvider","FormFieldContext","React","FormField","props","Controller","useFormField","fieldContext","itemContext","FormItemContext","getFieldState","formState","useFormContext","fieldState","id","FormItem","className","ref","cn","FormLabel","error","form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,GAAO,OAAO,IAAIS;AAE9C,SAAKC,IAKH,gBAAA5B,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAe;AAAA,MACA,IAAIQ;AAAA,MACJ,WAAWP,EAAG,wCAAwCF,CAAS;AAAA,MAC9D,GAAGZ;AAAA,IAAA;AAAA,IAEH0B;AAAA,EAAA,IAVI;AAaX,CAAC;AACDF,EAAY,cAAc;"}
@@ -1,19 +1,93 @@
1
- import t from "react";
2
- import a from "./index.es27.js";
3
- import { getAdapter as o } from "./index.es9.js";
4
- import i from "./index.es48.js";
5
- const l = ({ title: e, href: r }) => {
6
- const m = o("LinkWrapper");
7
- return r ? /* @__PURE__ */ t.createElement(a, { variant: "small-body", className: "text-whitish-opacity-32" }, /* @__PURE__ */ t.createElement(
8
- m,
9
- {
10
- href: r,
11
- className: "breadcrumb hover:text-whitish-opacity-60 duration-200"
12
- },
13
- i(e, 55)
14
- )) : /* @__PURE__ */ t.createElement(a, { variant: "link", className: "text-whitish breadcrumb" }, i(e, 55));
15
- };
1
+ import * as a from "@radix-ui/react-dialog";
2
+ import * as e from "react";
3
+ import { ScrollArea as i } from "./index.es48.js";
4
+ import { X as d } from "lucide-react";
5
+ import { cn as l } from "./index.es52.js";
6
+ const D = a.Root, v = a.Trigger, c = a.Portal, E = a.Close, n = e.forwardRef(({ className: t, ...o }, s) => /* @__PURE__ */ e.createElement(
7
+ a.Overlay,
8
+ {
9
+ ref: s,
10
+ className: l(
11
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
12
+ t
13
+ ),
14
+ ...o
15
+ }
16
+ ));
17
+ n.displayName = a.Overlay.displayName;
18
+ const m = e.forwardRef(({ className: t, children: o, ...s }, r) => /* @__PURE__ */ e.createElement(c, null, /* @__PURE__ */ e.createElement(n, null), /* @__PURE__ */ e.createElement(
19
+ a.Content,
20
+ {
21
+ ref: r,
22
+ className: l(
23
+ "fixed left-[50%] top-[50%] z-50 grid max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg overflow-hidden max-h-[calc(100dvh-0.75rem)] w-[calc(100dvw-0.75rem)] p-0",
24
+ t
25
+ ),
26
+ ...s
27
+ },
28
+ /* @__PURE__ */ e.createElement(i, { className: "max-h-[calc(100dvh-1rem)]" }, /* @__PURE__ */ e.createElement("div", { className: "p-6" }, o)),
29
+ /* @__PURE__ */ e.createElement(a.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground" }, /* @__PURE__ */ e.createElement(d, { className: "h-4 w-4" }), /* @__PURE__ */ e.createElement("span", { className: "sr-only" }, "Close"))
30
+ )));
31
+ m.displayName = a.Content.displayName;
32
+ const f = ({
33
+ className: t,
34
+ ...o
35
+ }) => /* @__PURE__ */ e.createElement(
36
+ "div",
37
+ {
38
+ className: l(
39
+ "flex flex-col space-y-1.5 text-center sm:text-left",
40
+ t
41
+ ),
42
+ ...o
43
+ }
44
+ );
45
+ f.displayName = "DialogHeader";
46
+ const p = ({
47
+ className: t,
48
+ ...o
49
+ }) => /* @__PURE__ */ e.createElement(
50
+ "div",
51
+ {
52
+ className: l(
53
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
54
+ t
55
+ ),
56
+ ...o
57
+ }
58
+ );
59
+ p.displayName = "DialogFooter";
60
+ const g = e.forwardRef(({ className: t, ...o }, s) => /* @__PURE__ */ e.createElement(
61
+ a.Title,
62
+ {
63
+ ref: s,
64
+ className: l(
65
+ "text-lg font-semibold leading-none tracking-tight",
66
+ t
67
+ ),
68
+ ...o
69
+ }
70
+ ));
71
+ g.displayName = a.Title.displayName;
72
+ const u = e.forwardRef(({ className: t, ...o }, s) => /* @__PURE__ */ e.createElement(
73
+ a.Description,
74
+ {
75
+ ref: s,
76
+ className: l("text-sm text-muted-foreground", t),
77
+ ...o
78
+ }
79
+ ));
80
+ u.displayName = a.Description.displayName;
16
81
  export {
17
- l as default
82
+ D as Dialog,
83
+ E as DialogClose,
84
+ m as DialogContent,
85
+ u as DialogDescription,
86
+ p as DialogFooter,
87
+ f as DialogHeader,
88
+ n as DialogOverlay,
89
+ c as DialogPortal,
90
+ g as DialogTitle,
91
+ v as DialogTrigger
18
92
  };
19
93
  //# sourceMappingURL=index.es47.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es47.js","sources":["../src/components/breadcrumbs/Breadcrumb.tsx"],"sourcesContent":["import React from 'react'\r\nimport Text from '../core/typography/Text'\r\nimport { getAdapter } from '@/Adapters'\r\nimport truncateText from '@/lib/utils/truncateText'\r\n\r\nexport interface BreadcrumbProps {\r\n title: string\r\n href?: string\r\n}\r\n\r\nconst Breadcrumb: React.FC<BreadcrumbProps> = ({ title, href }) => {\r\n const LinkWrapper = getAdapter('LinkWrapper')\r\n\r\n if (!href)\r\n return (\r\n <Text variant=\"link\" className=\"text-whitish breadcrumb\">\r\n {truncateText(title, 55)}\r\n </Text>\r\n )\r\n\r\n return (\r\n <Text variant=\"small-body\" className=\"text-whitish-opacity-32\">\r\n <LinkWrapper\r\n href={href}\r\n className=\"breadcrumb hover:text-whitish-opacity-60 duration-200\"\r\n >\r\n {truncateText(title, 55)}\r\n </LinkWrapper>\r\n </Text>\r\n )\r\n}\r\n\r\nexport default Breadcrumb\r\n"],"names":["Breadcrumb","title","href","LinkWrapper","getAdapter","React","Text","truncateText"],"mappings":";;;;AAUA,MAAMA,IAAwC,CAAC,EAAE,OAAAC,GAAO,MAAAC,QAAW;AAC3D,QAAAC,IAAcC,EAAW,aAAa;AAE5C,SAAKF,IAQFG,gBAAAA,EAAA,cAAAC,GAAA,EAAK,SAAQ,cAAa,WAAU,6BACnCD,gBAAAA,EAAA;AAAA,IAACF;AAAA,IAAA;AAAA,MACC,MAAAD;AAAA,MACA,WAAU;AAAA,IAAA;AAAA,IAETK,EAAaN,GAAO,EAAE;AAAA,EAAA,CAE3B,IAbEI,gBAAAA,EAAA,cAACC,KAAK,SAAQ,QAAO,WAAU,0BAC5B,GAAAC,EAAaN,GAAO,EAAE,CACzB;AAaN;"}
1
+ {"version":3,"file":"index.es47.js","sources":["../src/components/ui/dialog.tsx"],"sourcesContent":["import * as DialogPrimitive from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { ScrollArea } from './scroll-area'\nimport { X } from 'lucide-react'\nimport { cn } from '@/lib/utils/cn'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg overflow-hidden max-h-[calc(100dvh-0.75rem)] w-[calc(100dvw-0.75rem)] p-0',\n className\n )}\n {...props}\n >\n <ScrollArea className=\"max-h-[calc(100dvh-1rem)]\">\n <div className=\"p-6\">{children}</div>\n </ScrollArea>\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n 'flex flex-col space-y-1.5 text-center sm:text-left',\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n 'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n 'text-lg font-semibold leading-none tracking-tight',\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],"names":["Dialog","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","React","className","props","ref","cn","DialogContent","children","ScrollArea","X","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;;AAOA,MAAMA,IAASC,EAAgB,MAEzBC,IAAgBD,EAAgB,SAEhCE,IAAeF,EAAgB,QAE/BG,IAAcH,EAAgB,OAE9BI,IAAgBC,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1B,gBAAAH,EAAA;AAAA,EAACL,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAQ;AAAA,IACA,WAAWC;AAAA,MACT;AAAA,MACAH;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAc,cAAcJ,EAAgB,QAAQ;AAEpD,MAAMU,IAAgBL,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,UAAAK,GAAU,GAAGJ,EAAA,GAASC,MACpC,gBAAAH,EAAA,cAACH,GACC,MAAA,gBAAAG,EAAA,cAACD,OAAc,GACf,gBAAAC,EAAA;AAAA,EAACL,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAQ;AAAA,IACA,WAAWC;AAAA,MACT;AAAA,MACAH;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AAAA,EAEJ,gBAAAF,EAAA,cA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,CACD;AACDU,EAAkB,cAAcjB,EAAgB,YAAY;"}
@@ -1,7 +1,36 @@
1
- function u(r, n) {
2
- return r ? r.length <= n ? r : r.slice(0, n) + "..." : "";
3
- }
1
+ import * as e from "react";
2
+ import * as r from "@radix-ui/react-scroll-area";
3
+ import { cn as c } from "./index.es52.js";
4
+ const m = e.forwardRef(({ className: a, children: l, ...o }, t) => /* @__PURE__ */ e.createElement(
5
+ r.Root,
6
+ {
7
+ ref: t,
8
+ className: c("relative overflow-hidden", a),
9
+ ...o
10
+ },
11
+ /* @__PURE__ */ e.createElement(r.Viewport, { className: "h-full w-full rounded-[inherit]" }, l),
12
+ /* @__PURE__ */ e.createElement(n, null),
13
+ /* @__PURE__ */ e.createElement(r.Corner, null)
14
+ ));
15
+ m.displayName = r.Root.displayName;
16
+ const n = e.forwardRef(({ className: a, orientation: l = "vertical", ...o }, t) => /* @__PURE__ */ e.createElement(
17
+ r.ScrollAreaScrollbar,
18
+ {
19
+ ref: t,
20
+ orientation: l,
21
+ className: c(
22
+ "flex touch-none select-none transition-colors",
23
+ l === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
24
+ l === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
25
+ a
26
+ ),
27
+ ...o
28
+ },
29
+ /* @__PURE__ */ e.createElement(r.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
30
+ ));
31
+ n.displayName = r.ScrollAreaScrollbar.displayName;
4
32
  export {
5
- u as default
33
+ m as ScrollArea,
34
+ n as ScrollBar
6
35
  };
7
36
  //# sourceMappingURL=index.es48.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es48.js","sources":["../src/lib/utils/truncateText.ts"],"sourcesContent":["function truncateText(text: string, maxLength: number): string {\r\n if (!text) return ''\r\n if (text.length <= maxLength) {\r\n return text\r\n }\r\n return text.slice(0, maxLength) + '...'\r\n}\r\n\r\nexport default truncateText\r\n"],"names":["truncateText","text","maxLength"],"mappings":"AAAA,SAASA,EAAaC,GAAcC,GAA2B;AAC7D,SAAKD,IACDA,EAAK,UAAUC,IACVD,IAEFA,EAAK,MAAM,GAAGC,CAAS,IAAI,QAJhB;AAKpB;"}
1
+ {"version":3,"file":"index.es48.js","sources":["../src/components/ui/scroll-area.tsx"],"sourcesContent":["import * as React from 'react'\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area'\n\nimport { cn } from '@/lib/utils/cn'\n\nconst ScrollArea = React.forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={cn('relative overflow-hidden', className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport className=\"h-full w-full rounded-[inherit]\">\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n))\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName\n\nconst ScrollBar = React.forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(({ className, orientation = 'vertical', ...props }, ref) => (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n 'flex touch-none select-none transition-colors',\n orientation === 'vertical' &&\n 'h-full w-2.5 border-l border-l-transparent p-[1px]',\n orientation === 'horizontal' &&\n 'h-2.5 flex-col border-t border-t-transparent p-[1px]',\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"relative flex-1 rounded-full bg-border\" />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n))\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName\n\nexport { ScrollArea, ScrollBar }\n"],"names":["ScrollArea","React","className","children","props","ref","ScrollAreaPrimitive","cn","ScrollBar","orientation"],"mappings":";;;AAKM,MAAAA,IAAaC,EAAM,WAGvB,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,EAAM,GAAGC,MACpC,gBAAAJ,EAAA;AAAA,EAACK,EAAoB;AAAA,EAApB;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE,EAAG,4BAA4BL,CAAS;AAAA,IAClD,GAAGE;AAAA,EAAA;AAAA,kCAEHE,EAAoB,UAApB,EAA6B,WAAU,qCACrCH,CACH;AAAA,kCACCK,GAAU,IAAA;AAAA,EACX,gBAAAP,EAAA,cAACK,EAAoB,QAApB,IAA2B;AAC9B,CACD;AACDN,EAAW,cAAcM,EAAoB,KAAK;AAE5C,MAAAE,IAAYP,EAAM,WAGtB,CAAC,EAAE,WAAAC,GAAW,aAAAO,IAAc,YAAY,GAAGL,EAAM,GAAGC,MACpD,gBAAAJ,EAAA;AAAA,EAACK,EAAoB;AAAA,EAApB;AAAA,IACC,KAAAD;AAAA,IACA,aAAAI;AAAA,IACA,WAAWF;AAAA,MACT;AAAA,MACAE,MAAgB,cACd;AAAA,MACFA,MAAgB,gBACd;AAAA,MACFP;AAAA,IACF;AAAA,IACC,GAAGE;AAAA,EAAA;AAAA,EAEH,gBAAAH,EAAA,cAAAK,EAAoB,iBAApB,EAAoC,WAAU,0CAAyC;AAC1F,CACD;AACDE,EAAU,cAAcF,EAAoB,oBAAoB;"}