@altimateai/ui-components 0.0.77-beta.3 → 0.0.77-beta.5

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 (64) hide show
  1. package/dist/Accordion.js +402 -0
  2. package/dist/CoachForm.css +1 -1
  3. package/dist/CoachForm.js +21630 -18090
  4. package/dist/Stack.js +2820 -2260
  5. package/dist/Switch.js +128 -87
  6. package/dist/ToggleGroup.js +5956 -4781
  7. package/dist/_basePickBy.js +25 -25
  8. package/dist/_baseUniq.js +122 -122
  9. package/dist/arc.js +36 -36
  10. package/dist/architectureDiagram-VXUJARFQ.js +1 -1
  11. package/dist/assets/icons/index.js +1 -1
  12. package/dist/blockDiagram-VD42YOAC.js +1 -1
  13. package/dist/c4Diagram-YG6GDRKO.js +22 -22
  14. package/dist/channel.js +2 -2
  15. package/dist/chatbotV2/index.d.ts +61 -10
  16. package/dist/chatbotV2/index.js +442 -56
  17. package/dist/chunk-4BX2VUAB.js +1 -1
  18. package/dist/chunk-55IACEB6.js +2 -2
  19. package/dist/chunk-B4BG7PRW.js +1 -1
  20. package/dist/chunk-DI55MBZ5.js +1 -1
  21. package/dist/chunk-FMBD7UC4.js +1 -1
  22. package/dist/chunk-QN33PNHL.js +5 -5
  23. package/dist/chunk-QZHKN3VN.js +1 -1
  24. package/dist/chunk-TZMSLE5B.js +1 -1
  25. package/dist/classDiagram-2ON5EDUG.js +1 -1
  26. package/dist/classDiagram-v2-WZHVMYZB.js +1 -1
  27. package/dist/cose-bilkent-S5V4N54A.js +1 -1
  28. package/dist/dagre-6UL2VRFP.js +58 -58
  29. package/dist/dayjs.min.js +1 -1
  30. package/dist/diagram-PSM6KHXK.js +48 -48
  31. package/dist/diagram-QEK2KX5R.js +26 -26
  32. package/dist/diagram-S2PKOQOG.js +9 -9
  33. package/dist/erDiagram-Q2GNP2WA.js +12 -12
  34. package/dist/flowDiagram-NV44I4VS.js +6 -6
  35. package/dist/ganttDiagram-LVOFAZNH.js +322 -322
  36. package/dist/gitGraphDiagram-NY62KEGX.js +13 -13
  37. package/dist/graph.js +5 -5
  38. package/dist/index.css +1 -1
  39. package/dist/index.d.ts +9 -1
  40. package/dist/index.js +24 -23
  41. package/dist/index2.css +1 -0
  42. package/dist/index2.js +22 -22
  43. package/dist/infoDiagram-F6ZHWCRC.js +14 -14
  44. package/dist/journeyDiagram-XKPGCS4Q.js +1 -1
  45. package/dist/kanban-definition-3W4ZIXB7.js +54 -54
  46. package/dist/layout.js +52 -52
  47. package/dist/lineage/index.js +381 -381
  48. package/dist/main.js +6 -6
  49. package/dist/mermaid-parser.core.js +1 -1
  50. package/dist/mindmap-definition-VGOIOE7T.js +16 -16
  51. package/dist/pieDiagram-ADFJNKIX.js +25 -25
  52. package/dist/quadrantDiagram-AYHSOK5B.js +1 -1
  53. package/dist/redux-toolkit.modern.js +7 -7
  54. package/dist/requirementDiagram-UZGBJVZJ.js +1 -1
  55. package/dist/sankeyDiagram-TZEHDZUN.js +16 -16
  56. package/dist/sequenceDiagram-WL72ISMW.js +28 -28
  57. package/dist/shadcn/index.d.ts +22 -35
  58. package/dist/shadcn/index.js +6232 -4805
  59. package/dist/stateDiagram-FKZM4ZOC.js +34 -34
  60. package/dist/stateDiagram-v2-4FDKWEC3.js +6 -6
  61. package/dist/storybook/Typography.stories.tsx +93 -120
  62. package/dist/timeline-definition-IT6M3QCI.js +54 -54
  63. package/dist/xychartDiagram-PRI3JC2R.js +32 -32
  64. package/package.json +1 -1
@@ -0,0 +1,402 @@
1
+ import { j as a, C as te } from "./index2.js";
2
+ import * as i from "react";
3
+ import f, { useImperativeHandle as re } from "react";
4
+ import { a as N, g as ne, b as B, d as M, e as H, f as ce, P as W, h as le } from "./Stack.js";
5
+ import { c as F, u as ae, R as se, T as ie, C as de } from "./ToggleGroup.js";
6
+ const fe = ({
7
+ textAreaRef: e,
8
+ triggerAutoSize: r,
9
+ maxHeight: o = Number.MAX_SAFE_INTEGER,
10
+ minHeight: t = 0
11
+ }) => {
12
+ const [c, n] = i.useState(!0);
13
+ i.useEffect(() => {
14
+ const l = e.current;
15
+ if (l) {
16
+ c && (l.style.minHeight = `${t + 6}px`, o > t && (l.style.maxHeight = `${o}px`), n(!1)), l.style.height = `${t + 6}px`;
17
+ const d = l.scrollHeight;
18
+ d > o ? l.style.height = `${o}px` : l.style.height = `${d + 6}px`;
19
+ }
20
+ }, [c, o, t, e, r]);
21
+ }, ue = i.forwardRef(
22
+ ({
23
+ maxHeight: e = Number.MAX_SAFE_INTEGER,
24
+ minHeight: r = 52,
25
+ className: o,
26
+ onChange: t,
27
+ value: c,
28
+ ...n
29
+ }, s) => {
30
+ const l = i.useRef(null), [d, u] = i.useState("");
31
+ return fe({
32
+ textAreaRef: l,
33
+ triggerAutoSize: d,
34
+ maxHeight: e,
35
+ minHeight: r
36
+ }), re(s, () => ({
37
+ textArea: l.current,
38
+ focus: () => {
39
+ var p;
40
+ return (p = l == null ? void 0 : l.current) == null ? void 0 : p.focus();
41
+ },
42
+ maxHeight: e,
43
+ minHeight: r
44
+ })), i.useEffect(() => {
45
+ u(c);
46
+ }, [n == null ? void 0 : n.defaultValue, c]), /* @__PURE__ */ a.jsx(
47
+ "textarea",
48
+ {
49
+ ...n,
50
+ value: c,
51
+ ref: l,
52
+ className: N(
53
+ "al-flex al-w-full al-rounded-md al-border al-border-input al-bg-background al-px-3 al-py-2 al-text-sm al-ring-offset-background al-placeholder:al-text-muted-foreground al-focus-visible:al-outline-none al-focus-visible:al-ring-2 al-focus-visible:al-ring-ring al-focus-visible:al-ring-offset-2 al-disabled:al-cursor-not-allowed al-disabled:al-opacity-50",
54
+ o
55
+ ),
56
+ onChange: (p) => {
57
+ u(p.target.value), t == null || t(p);
58
+ }
59
+ }
60
+ );
61
+ }
62
+ );
63
+ ue.displayName = "AutosizeTextarea";
64
+ // @__NO_SIDE_EFFECTS__
65
+ function z(e) {
66
+ const r = /* @__PURE__ */ pe(e), o = i.forwardRef((t, c) => {
67
+ const { children: n, ...s } = t, l = i.Children.toArray(n), d = l.find(xe);
68
+ if (d) {
69
+ const u = d.props.children, p = l.map((A) => A === d ? i.Children.count(u) > 1 ? i.Children.only(null) : i.isValidElement(u) ? u.props.children : null : A);
70
+ return /* @__PURE__ */ a.jsx(r, { ...s, ref: c, children: i.isValidElement(u) ? i.cloneElement(u, void 0, p) : null });
71
+ }
72
+ return /* @__PURE__ */ a.jsx(r, { ...s, ref: c, children: n });
73
+ });
74
+ return o.displayName = `${e}.Slot`, o;
75
+ }
76
+ // @__NO_SIDE_EFFECTS__
77
+ function pe(e) {
78
+ const r = i.forwardRef((o, t) => {
79
+ const { children: c, ...n } = o;
80
+ if (i.isValidElement(c)) {
81
+ const s = Ce(c), l = Ae(n, c.props);
82
+ return c.type !== i.Fragment && (l.ref = t ? ne(t, s) : s), i.cloneElement(c, l);
83
+ }
84
+ return i.Children.count(c) > 1 ? i.Children.only(null) : null;
85
+ });
86
+ return r.displayName = `${e}.SlotClone`, r;
87
+ }
88
+ var me = Symbol("radix.slottable");
89
+ function xe(e) {
90
+ return i.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === me;
91
+ }
92
+ function Ae(e, r) {
93
+ const o = { ...r };
94
+ for (const t in r) {
95
+ const c = e[t], n = r[t];
96
+ /^on[A-Z]/.test(t) ? c && n ? o[t] = (...l) => {
97
+ const d = n(...l);
98
+ return c(...l), d;
99
+ } : c && (o[t] = c) : t === "style" ? o[t] = { ...c, ...n } : t === "className" && (o[t] = [c, n].filter(Boolean).join(" "));
100
+ }
101
+ return { ...e, ...o };
102
+ }
103
+ function Ce(e) {
104
+ var t, c;
105
+ let r = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, o = r && "isReactWarning" in r && r.isReactWarning;
106
+ return o ? e.ref : (r = (c = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : c.get, o = r && "isReactWarning" in r && r.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
107
+ }
108
+ function ve(e) {
109
+ const r = e + "CollectionProvider", [o, t] = B(r), [c, n] = o(
110
+ r,
111
+ { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
112
+ ), s = (v) => {
113
+ const { scope: x, children: b } = v, m = f.useRef(null), C = f.useRef(/* @__PURE__ */ new Map()).current;
114
+ return /* @__PURE__ */ a.jsx(c, { scope: x, itemMap: C, collectionRef: m, children: b });
115
+ };
116
+ s.displayName = r;
117
+ const l = e + "CollectionSlot", d = /* @__PURE__ */ z(l), u = f.forwardRef(
118
+ (v, x) => {
119
+ const { scope: b, children: m } = v, C = n(l, b), g = M(x, C.collectionRef);
120
+ return /* @__PURE__ */ a.jsx(d, { ref: g, children: m });
121
+ }
122
+ );
123
+ u.displayName = l;
124
+ const p = e + "CollectionItemSlot", A = "data-radix-collection-item", _ = /* @__PURE__ */ z(p), h = f.forwardRef(
125
+ (v, x) => {
126
+ const { scope: b, children: m, ...C } = v, g = f.useRef(null), y = M(x, g), R = n(p, b);
127
+ return f.useEffect(() => (R.itemMap.set(g, { ref: g, ...C }), () => void R.itemMap.delete(g))), /* @__PURE__ */ a.jsx(_, { [A]: "", ref: y, children: m });
128
+ }
129
+ );
130
+ h.displayName = p;
131
+ function j(v) {
132
+ const x = n(e + "CollectionConsumer", v);
133
+ return f.useCallback(() => {
134
+ const m = x.collectionRef.current;
135
+ if (!m) return [];
136
+ const C = Array.from(m.querySelectorAll(`[${A}]`));
137
+ return Array.from(x.itemMap.values()).sort(
138
+ (R, P) => C.indexOf(R.ref.current) - C.indexOf(P.ref.current)
139
+ );
140
+ }, [x.collectionRef, x.itemMap]);
141
+ }
142
+ return [
143
+ { Provider: s, Slot: u, ItemSlot: h },
144
+ j,
145
+ t
146
+ ];
147
+ }
148
+ var I = "Accordion", ge = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [D, Ie, be] = ve(I), [S, ze] = B(I, [
149
+ be,
150
+ F
151
+ ]), V = F(), G = f.forwardRef(
152
+ (e, r) => {
153
+ const { type: o, ...t } = e, c = t, n = t;
154
+ return /* @__PURE__ */ a.jsx(D.Provider, { scope: e.__scopeAccordion, children: o === "multiple" ? /* @__PURE__ */ a.jsx(_e, { ...n, ref: r }) : /* @__PURE__ */ a.jsx(ye, { ...c, ref: r }) });
155
+ }
156
+ );
157
+ G.displayName = I;
158
+ var [K, Re] = S(I), [U, he] = S(
159
+ I,
160
+ { collapsible: !1 }
161
+ ), ye = f.forwardRef(
162
+ (e, r) => {
163
+ const {
164
+ value: o,
165
+ defaultValue: t,
166
+ onValueChange: c = () => {
167
+ },
168
+ collapsible: n = !1,
169
+ ...s
170
+ } = e, [l, d] = H({
171
+ prop: o,
172
+ defaultProp: t ?? "",
173
+ onChange: c,
174
+ caller: I
175
+ });
176
+ return /* @__PURE__ */ a.jsx(
177
+ K,
178
+ {
179
+ scope: e.__scopeAccordion,
180
+ value: f.useMemo(() => l ? [l] : [], [l]),
181
+ onItemOpen: d,
182
+ onItemClose: f.useCallback(() => n && d(""), [n, d]),
183
+ children: /* @__PURE__ */ a.jsx(U, { scope: e.__scopeAccordion, collapsible: n, children: /* @__PURE__ */ a.jsx(X, { ...s, ref: r }) })
184
+ }
185
+ );
186
+ }
187
+ ), _e = f.forwardRef((e, r) => {
188
+ const {
189
+ value: o,
190
+ defaultValue: t,
191
+ onValueChange: c = () => {
192
+ },
193
+ ...n
194
+ } = e, [s, l] = H({
195
+ prop: o,
196
+ defaultProp: t ?? [],
197
+ onChange: c,
198
+ caller: I
199
+ }), d = f.useCallback(
200
+ (p) => l((A = []) => [...A, p]),
201
+ [l]
202
+ ), u = f.useCallback(
203
+ (p) => l((A = []) => A.filter((_) => _ !== p)),
204
+ [l]
205
+ );
206
+ return /* @__PURE__ */ a.jsx(
207
+ K,
208
+ {
209
+ scope: e.__scopeAccordion,
210
+ value: s,
211
+ onItemOpen: d,
212
+ onItemClose: u,
213
+ children: /* @__PURE__ */ a.jsx(U, { scope: e.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ a.jsx(X, { ...n, ref: r }) })
214
+ }
215
+ );
216
+ }), [Ee, w] = S(I), X = f.forwardRef(
217
+ (e, r) => {
218
+ const { __scopeAccordion: o, disabled: t, dir: c, orientation: n = "vertical", ...s } = e, l = f.useRef(null), d = M(l, r), u = Ie(o), A = ae(c) === "ltr", _ = ce(e.onKeyDown, (h) => {
219
+ var $;
220
+ if (!ge.includes(h.key)) return;
221
+ const j = h.target, v = u().filter((T) => {
222
+ var L;
223
+ return !((L = T.ref.current) != null && L.disabled);
224
+ }), x = v.findIndex((T) => T.ref.current === j), b = v.length;
225
+ if (x === -1) return;
226
+ h.preventDefault();
227
+ let m = x;
228
+ const C = 0, g = b - 1, y = () => {
229
+ m = x + 1, m > g && (m = C);
230
+ }, R = () => {
231
+ m = x - 1, m < C && (m = g);
232
+ };
233
+ switch (h.key) {
234
+ case "Home":
235
+ m = C;
236
+ break;
237
+ case "End":
238
+ m = g;
239
+ break;
240
+ case "ArrowRight":
241
+ n === "horizontal" && (A ? y() : R());
242
+ break;
243
+ case "ArrowDown":
244
+ n === "vertical" && y();
245
+ break;
246
+ case "ArrowLeft":
247
+ n === "horizontal" && (A ? R() : y());
248
+ break;
249
+ case "ArrowUp":
250
+ n === "vertical" && R();
251
+ break;
252
+ }
253
+ const P = m % b;
254
+ ($ = v[P].ref.current) == null || $.focus();
255
+ });
256
+ return /* @__PURE__ */ a.jsx(
257
+ Ee,
258
+ {
259
+ scope: o,
260
+ disabled: t,
261
+ direction: c,
262
+ orientation: n,
263
+ children: /* @__PURE__ */ a.jsx(D.Slot, { scope: o, children: /* @__PURE__ */ a.jsx(
264
+ W.div,
265
+ {
266
+ ...s,
267
+ "data-orientation": n,
268
+ ref: d,
269
+ onKeyDown: t ? void 0 : _
270
+ }
271
+ ) })
272
+ }
273
+ );
274
+ }
275
+ ), E = "AccordionItem", [Ne, k] = S(E), q = f.forwardRef(
276
+ (e, r) => {
277
+ const { __scopeAccordion: o, value: t, ...c } = e, n = w(E, o), s = Re(E, o), l = V(o), d = le(), u = t && s.value.includes(t) || !1, p = n.disabled || e.disabled;
278
+ return /* @__PURE__ */ a.jsx(
279
+ Ne,
280
+ {
281
+ scope: o,
282
+ open: u,
283
+ disabled: p,
284
+ triggerId: d,
285
+ children: /* @__PURE__ */ a.jsx(
286
+ se,
287
+ {
288
+ "data-orientation": n.orientation,
289
+ "data-state": oe(u),
290
+ ...l,
291
+ ...c,
292
+ ref: r,
293
+ disabled: p,
294
+ open: u,
295
+ onOpenChange: (A) => {
296
+ A ? s.onItemOpen(t) : s.onItemClose(t);
297
+ }
298
+ }
299
+ )
300
+ }
301
+ );
302
+ }
303
+ );
304
+ q.displayName = E;
305
+ var Y = "AccordionHeader", Z = f.forwardRef(
306
+ (e, r) => {
307
+ const { __scopeAccordion: o, ...t } = e, c = w(I, o), n = k(Y, o);
308
+ return /* @__PURE__ */ a.jsx(
309
+ W.h3,
310
+ {
311
+ "data-orientation": c.orientation,
312
+ "data-state": oe(n.open),
313
+ "data-disabled": n.disabled ? "" : void 0,
314
+ ...t,
315
+ ref: r
316
+ }
317
+ );
318
+ }
319
+ );
320
+ Z.displayName = Y;
321
+ var O = "AccordionTrigger", J = f.forwardRef(
322
+ (e, r) => {
323
+ const { __scopeAccordion: o, ...t } = e, c = w(I, o), n = k(O, o), s = he(O, o), l = V(o);
324
+ return /* @__PURE__ */ a.jsx(D.ItemSlot, { scope: o, children: /* @__PURE__ */ a.jsx(
325
+ ie,
326
+ {
327
+ "aria-disabled": n.open && !s.collapsible || void 0,
328
+ "data-orientation": c.orientation,
329
+ id: n.triggerId,
330
+ ...l,
331
+ ...t,
332
+ ref: r
333
+ }
334
+ ) });
335
+ }
336
+ );
337
+ J.displayName = O;
338
+ var Q = "AccordionContent", ee = f.forwardRef(
339
+ (e, r) => {
340
+ const { __scopeAccordion: o, ...t } = e, c = w(I, o), n = k(Q, o), s = V(o);
341
+ return /* @__PURE__ */ a.jsx(
342
+ de,
343
+ {
344
+ role: "region",
345
+ "aria-labelledby": n.triggerId,
346
+ "data-orientation": c.orientation,
347
+ ...s,
348
+ ...t,
349
+ ref: r,
350
+ style: {
351
+ "--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
352
+ "--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
353
+ ...e.style
354
+ }
355
+ }
356
+ );
357
+ }
358
+ );
359
+ ee.displayName = Q;
360
+ function oe(e) {
361
+ return e ? "open" : "closed";
362
+ }
363
+ var Se = G, we = q, je = Z, Pe = J, Te = ee;
364
+ const Be = Se, Me = i.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ a.jsx(we, { ref: o, className: N("al-border-b", e), ...r }));
365
+ Me.displayName = "AccordionItem";
366
+ const Oe = i.forwardRef(({ className: e, children: r, ...o }, t) => /* @__PURE__ */ a.jsx(je, { className: "al-flex", children: /* @__PURE__ */ a.jsxs(
367
+ Pe,
368
+ {
369
+ ref: t,
370
+ className: N(
371
+ "al-flex al-flex-1 al-items-center al-justify-between al-py-4 al-font-medium al-transition-all hover:al-underline [&[data-state=open]>svg]:al-rotate-180",
372
+ e
373
+ ),
374
+ ...o,
375
+ children: [
376
+ r,
377
+ /* @__PURE__ */ a.jsx(te, { className: "al-h-4 al-w-4 al-shrink-0 al-transition-transform al-duration-200" })
378
+ ]
379
+ }
380
+ ) }));
381
+ Oe.displayName = "AccordionTrigger";
382
+ const De = i.forwardRef(({ className: e, children: r, ...o }, t) => /* @__PURE__ */ a.jsx(
383
+ Te,
384
+ {
385
+ ref: t,
386
+ className: N(
387
+ "al-overflow-hidden al-text-sm al-transition-all data-[state=closed]:al-animate-accordion-up data-[state=open]:al-animate-accordion-down",
388
+ e
389
+ ),
390
+ ...o,
391
+ children: /* @__PURE__ */ a.jsx("div", { className: "al-pb-4 al-pt-0", children: r })
392
+ }
393
+ ));
394
+ De.displayName = "AccordionContent";
395
+ export {
396
+ Be as A,
397
+ Me as a,
398
+ Oe as b,
399
+ De as c,
400
+ ue as d,
401
+ fe as u
402
+ };
@@ -1 +1 @@
1
- ._loadingBtn_gadec_1 .spinner-border{width:1rem;height:1rem;margin-top:.15rem;border-width:2px}.react-markdown table{border-spacing:0!important;border-collapse:collapse!important;border-color:inherit!important;display:block!important;margin:0 auto!important;width:100%!important;max-width:100%!important;overflow:auto!important}.react-markdown tbody,.react-markdown td,.react-markdown tfoot,.react-markdown th,.react-markdown thead,.react-markdown tr{border-color:inherit!important;border-style:solid!important;border-width:2px!important;padding:.5rem;text-align:left!important}._citations_1olrc_1{background:#17b26a1a;color:#17b26a;padding:.5rem 1rem;border-radius:2rem;align-items:center}._citations_1olrc_1 ul{margin:0}._citations_1olrc_1 button,._citations_1olrc_1 a{text-decoration:none;border-radius:50%;border:none;padding:4px 5px;margin-top:-1px}
1
+ ._loadingBtn_gadec_1 .spinner-border{width:1rem;height:1rem;margin-top:.15rem;border-width:2px}.react-markdown table{border-spacing:0!important;border-collapse:collapse!important;border-color:inherit!important;display:block!important;margin:0 auto!important;width:100%!important;max-width:100%!important;overflow:auto!important}.react-markdown tbody,.react-markdown td,.react-markdown tfoot,.react-markdown th,.react-markdown thead,.react-markdown tr{border-color:inherit!important;border-style:solid!important;border-width:2px!important;padding:.5rem;text-align:left!important}