@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
package/dist/Switch.js CHANGED
@@ -1,128 +1,169 @@
1
- import { j as o } from "./index2.js";
1
+ import { j as l } from "./index2.js";
2
2
  import * as s from "react";
3
- import { a as _, u as H, b as I, P as g, d as M, e as B, f as q, g as S } from "./Stack.js";
4
- var v = "Switch", [z, X] = _(v), [A, O] = z(v), x = s.forwardRef(
5
- (e, a) => {
3
+ import { u as A, b as T, d as y, e as H, P as C, f as I, a as x } from "./Stack.js";
4
+ function M(e) {
5
+ const t = s.useRef({ value: e, previous: e });
6
+ return s.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
7
+ }
8
+ function O(e) {
9
+ const [t, r] = s.useState(void 0);
10
+ return A(() => {
11
+ if (e) {
12
+ r({ width: e.offsetWidth, height: e.offsetHeight });
13
+ const n = new ResizeObserver((o) => {
14
+ if (!Array.isArray(o) || !o.length)
15
+ return;
16
+ const u = o[0];
17
+ let i, a;
18
+ if ("borderBoxSize" in u) {
19
+ const c = u.borderBoxSize, d = Array.isArray(c) ? c[0] : c;
20
+ i = d.inlineSize, a = d.blockSize;
21
+ } else
22
+ i = e.offsetWidth, a = e.offsetHeight;
23
+ r({ width: i, height: a });
24
+ });
25
+ return n.observe(e, { box: "border-box" }), () => n.unobserve(e);
26
+ } else
27
+ r(void 0);
28
+ }, [e]), t;
29
+ }
30
+ var S = "Switch", [L, G] = T(S), [U, W] = L(S), R = s.forwardRef(
31
+ (e, t) => {
6
32
  const {
7
- __scopeSwitch: t,
8
- name: r,
9
- checked: n,
33
+ __scopeSwitch: r,
34
+ name: n,
35
+ checked: o,
10
36
  defaultChecked: u,
11
37
  required: i,
12
- disabled: c,
13
- value: l = "on",
14
- onCheckedChange: b,
15
- form: m,
16
- ...p
17
- } = e, [d, j] = s.useState(null), E = H(a, (f) => j(f)), k = s.useRef(!1), w = d ? m || !!d.closest("form") : !0, [h = !1, N] = I({
18
- prop: n,
19
- defaultProp: u,
20
- onChange: b
38
+ disabled: a,
39
+ value: c = "on",
40
+ onCheckedChange: d,
41
+ form: f,
42
+ ...w
43
+ } = e, [p, h] = s.useState(null), m = y(t, (v) => h(v)), g = s.useRef(!1), k = p ? f || !!p.closest("form") : !0, [b, _] = H({
44
+ prop: o,
45
+ defaultProp: u ?? !1,
46
+ onChange: d,
47
+ caller: S
21
48
  });
22
- return /* @__PURE__ */ o.jsxs(A, { scope: t, checked: h, disabled: c, children: [
23
- /* @__PURE__ */ o.jsx(
24
- g.button,
49
+ return /* @__PURE__ */ l.jsxs(U, { scope: r, checked: b, disabled: a, children: [
50
+ /* @__PURE__ */ l.jsx(
51
+ C.button,
25
52
  {
26
53
  type: "button",
27
54
  role: "switch",
28
- "aria-checked": h,
55
+ "aria-checked": b,
29
56
  "aria-required": i,
30
- "data-state": P(h),
31
- "data-disabled": c ? "" : void 0,
32
- disabled: c,
33
- value: l,
34
- ...p,
35
- ref: E,
36
- onClick: M(e.onClick, (f) => {
37
- N((T) => !T), w && (k.current = f.isPropagationStopped(), k.current || f.stopPropagation());
57
+ "data-state": N(b),
58
+ "data-disabled": a ? "" : void 0,
59
+ disabled: a,
60
+ value: c,
61
+ ...w,
62
+ ref: m,
63
+ onClick: I(e.onClick, (v) => {
64
+ _((B) => !B), k && (g.current = v.isPropagationStopped(), g.current || v.stopPropagation());
38
65
  })
39
66
  }
40
67
  ),
41
- w && /* @__PURE__ */ o.jsx(
42
- D,
68
+ k && /* @__PURE__ */ l.jsx(
69
+ z,
43
70
  {
44
- control: d,
45
- bubbles: !k.current,
46
- name: r,
47
- value: l,
48
- checked: h,
71
+ control: p,
72
+ bubbles: !g.current,
73
+ name: n,
74
+ value: c,
75
+ checked: b,
49
76
  required: i,
50
- disabled: c,
51
- form: m,
77
+ disabled: a,
78
+ form: f,
52
79
  style: { transform: "translateX(-100%)" }
53
80
  }
54
81
  )
55
82
  ] });
56
83
  }
57
84
  );
58
- x.displayName = v;
59
- var C = "SwitchThumb", y = s.forwardRef(
60
- (e, a) => {
61
- const { __scopeSwitch: t, ...r } = e, n = O(C, t);
62
- return /* @__PURE__ */ o.jsx(
63
- g.span,
85
+ R.displayName = S;
86
+ var P = "SwitchThumb", E = s.forwardRef(
87
+ (e, t) => {
88
+ const { __scopeSwitch: r, ...n } = e, o = W(P, r);
89
+ return /* @__PURE__ */ l.jsx(
90
+ C.span,
64
91
  {
65
- "data-state": P(n.checked),
66
- "data-disabled": n.disabled ? "" : void 0,
67
- ...r,
68
- ref: a
92
+ "data-state": N(o.checked),
93
+ "data-disabled": o.disabled ? "" : void 0,
94
+ ...n,
95
+ ref: t
69
96
  }
70
97
  );
71
98
  }
72
99
  );
73
- y.displayName = C;
74
- var D = (e) => {
75
- const { control: a, checked: t, bubbles: r = !0, ...n } = e, u = s.useRef(null), i = B(t), c = q(a);
76
- return s.useEffect(() => {
77
- const l = u.current, b = window.HTMLInputElement.prototype, p = Object.getOwnPropertyDescriptor(b, "checked").set;
78
- if (i !== t && p) {
79
- const d = new Event("click", { bubbles: r });
80
- p.call(l, t), l.dispatchEvent(d);
81
- }
82
- }, [i, t, r]), /* @__PURE__ */ o.jsx(
83
- "input",
84
- {
85
- type: "checkbox",
86
- "aria-hidden": !0,
87
- defaultChecked: t,
88
- ...n,
89
- tabIndex: -1,
90
- ref: u,
91
- style: {
92
- ...e.style,
93
- ...c,
94
- position: "absolute",
95
- pointerEvents: "none",
96
- opacity: 0,
97
- margin: 0
100
+ E.displayName = P;
101
+ var q = "SwitchBubbleInput", z = s.forwardRef(
102
+ ({
103
+ __scopeSwitch: e,
104
+ control: t,
105
+ checked: r,
106
+ bubbles: n = !0,
107
+ ...o
108
+ }, u) => {
109
+ const i = s.useRef(null), a = y(i, u), c = M(r), d = O(t);
110
+ return s.useEffect(() => {
111
+ const f = i.current;
112
+ if (!f) return;
113
+ const w = window.HTMLInputElement.prototype, h = Object.getOwnPropertyDescriptor(
114
+ w,
115
+ "checked"
116
+ ).set;
117
+ if (c !== r && h) {
118
+ const m = new Event("click", { bubbles: n });
119
+ h.call(f, r), f.dispatchEvent(m);
98
120
  }
99
- }
100
- );
101
- };
102
- function P(e) {
121
+ }, [c, r, n]), /* @__PURE__ */ l.jsx(
122
+ "input",
123
+ {
124
+ type: "checkbox",
125
+ "aria-hidden": !0,
126
+ defaultChecked: r,
127
+ ...o,
128
+ tabIndex: -1,
129
+ ref: a,
130
+ style: {
131
+ ...o.style,
132
+ ...d,
133
+ position: "absolute",
134
+ pointerEvents: "none",
135
+ opacity: 0,
136
+ margin: 0
137
+ }
138
+ }
139
+ );
140
+ }
141
+ );
142
+ z.displayName = q;
143
+ function N(e) {
103
144
  return e ? "checked" : "unchecked";
104
145
  }
105
- var R = x, F = y;
106
- const L = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o.jsx(
107
- R,
146
+ var j = R, D = E;
147
+ const F = s.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ l.jsx(
148
+ j,
108
149
  {
109
- className: S(
150
+ className: x(
110
151
  "al-peer al-inline-flex al-h-6 al-w-11 al-shrink-0 al-cursor-pointer al-items-center al-rounded-full al-border-2 al-border-transparent al-transition-colors focus-visible:al-outline-none focus-visible:al-ring-2 focus-visible:al-ring-ring focus-visible:al-ring-offset-2 focus-visible:al-ring-offset-background disabled:al-cursor-not-allowed disabled:al-opacity-50 data-[state=checked]:al-bg-primary data-[state=unchecked]:al-bg-input",
111
152
  e
112
153
  ),
113
- ...a,
114
- ref: t,
115
- children: /* @__PURE__ */ o.jsx(
116
- F,
154
+ ...t,
155
+ ref: r,
156
+ children: /* @__PURE__ */ l.jsx(
157
+ D,
117
158
  {
118
- className: S(
159
+ className: x(
119
160
  "al-pointer-events-none al-block al-h-5 al-w-5 al-rounded-full al-bg-background al-shadow-lg al-ring-0 al-transition-transform data-[state=checked]:al-translate-x-5 data-[state=unchecked]:al-translate-x-0"
120
161
  )
121
162
  }
122
163
  )
123
164
  }
124
165
  ));
125
- L.displayName = R.displayName;
166
+ F.displayName = j.displayName;
126
167
  export {
127
- L as S
168
+ F as S
128
169
  };