@altimateai/ui-components 0.0.77-beta.5 → 0.0.77-combobox-beta1

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 (63) hide show
  1. package/dist/CoachForm.css +1 -1
  2. package/dist/CoachForm.js +20266 -23806
  3. package/dist/Stack.js +2211 -2808
  4. package/dist/Switch.js +87 -128
  5. package/dist/ToggleGroup.js +5000 -6188
  6. package/dist/_basePickBy.js +25 -25
  7. package/dist/_baseUniq.js +122 -122
  8. package/dist/arc.js +36 -36
  9. package/dist/architectureDiagram-VXUJARFQ.js +1 -1
  10. package/dist/assets/icons/index.js +1 -1
  11. package/dist/blockDiagram-VD42YOAC.js +1 -1
  12. package/dist/c4Diagram-YG6GDRKO.js +22 -22
  13. package/dist/channel.js +2 -2
  14. package/dist/chatbotV2/index.d.ts +10 -61
  15. package/dist/chatbotV2/index.js +56 -442
  16. package/dist/chunk-4BX2VUAB.js +1 -1
  17. package/dist/chunk-55IACEB6.js +2 -2
  18. package/dist/chunk-B4BG7PRW.js +1 -1
  19. package/dist/chunk-DI55MBZ5.js +1 -1
  20. package/dist/chunk-FMBD7UC4.js +1 -1
  21. package/dist/chunk-QN33PNHL.js +5 -5
  22. package/dist/chunk-QZHKN3VN.js +1 -1
  23. package/dist/chunk-TZMSLE5B.js +1 -1
  24. package/dist/classDiagram-2ON5EDUG.js +1 -1
  25. package/dist/classDiagram-v2-WZHVMYZB.js +1 -1
  26. package/dist/cose-bilkent-S5V4N54A.js +1 -1
  27. package/dist/dagre-6UL2VRFP.js +58 -58
  28. package/dist/dayjs.min.js +1 -1
  29. package/dist/diagram-PSM6KHXK.js +48 -48
  30. package/dist/diagram-QEK2KX5R.js +26 -26
  31. package/dist/diagram-S2PKOQOG.js +9 -9
  32. package/dist/erDiagram-Q2GNP2WA.js +12 -12
  33. package/dist/flowDiagram-NV44I4VS.js +6 -6
  34. package/dist/ganttDiagram-LVOFAZNH.js +322 -322
  35. package/dist/gitGraphDiagram-NY62KEGX.js +13 -13
  36. package/dist/graph.js +5 -5
  37. package/dist/index.css +1 -1
  38. package/dist/index.d.ts +1 -9
  39. package/dist/index.js +23 -24
  40. package/dist/index2.js +22 -22
  41. package/dist/infoDiagram-F6ZHWCRC.js +14 -14
  42. package/dist/journeyDiagram-XKPGCS4Q.js +1 -1
  43. package/dist/kanban-definition-3W4ZIXB7.js +54 -54
  44. package/dist/layout.js +52 -52
  45. package/dist/lineage/index.js +15 -15
  46. package/dist/main.js +5 -5
  47. package/dist/mermaid-parser.core.js +1 -1
  48. package/dist/mindmap-definition-VGOIOE7T.js +16 -16
  49. package/dist/pieDiagram-ADFJNKIX.js +25 -25
  50. package/dist/quadrantDiagram-AYHSOK5B.js +1 -1
  51. package/dist/redux-toolkit.modern.js +7 -7
  52. package/dist/requirementDiagram-UZGBJVZJ.js +1 -1
  53. package/dist/sankeyDiagram-TZEHDZUN.js +16 -16
  54. package/dist/sequenceDiagram-WL72ISMW.js +28 -28
  55. package/dist/shadcn/index.d.ts +8 -11
  56. package/dist/shadcn/index.js +4869 -6296
  57. package/dist/stateDiagram-FKZM4ZOC.js +34 -34
  58. package/dist/stateDiagram-v2-4FDKWEC3.js +6 -6
  59. package/dist/timeline-definition-IT6M3QCI.js +54 -54
  60. package/dist/xychartDiagram-PRI3JC2R.js +32 -32
  61. package/package.json +1 -1
  62. package/dist/Accordion.js +0 -402
  63. package/dist/index2.css +0 -1
package/dist/Switch.js CHANGED
@@ -1,169 +1,128 @@
1
- import { j as l } from "./index2.js";
1
+ import { j as o } from "./index2.js";
2
2
  import * as s from "react";
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) => {
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) => {
32
6
  const {
33
- __scopeSwitch: r,
34
- name: n,
35
- checked: o,
7
+ __scopeSwitch: t,
8
+ name: r,
9
+ checked: n,
36
10
  defaultChecked: u,
37
11
  required: i,
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
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
48
21
  });
49
- return /* @__PURE__ */ l.jsxs(U, { scope: r, checked: b, disabled: a, children: [
50
- /* @__PURE__ */ l.jsx(
51
- C.button,
22
+ return /* @__PURE__ */ o.jsxs(A, { scope: t, checked: h, disabled: c, children: [
23
+ /* @__PURE__ */ o.jsx(
24
+ g.button,
52
25
  {
53
26
  type: "button",
54
27
  role: "switch",
55
- "aria-checked": b,
28
+ "aria-checked": h,
56
29
  "aria-required": i,
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());
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());
65
38
  })
66
39
  }
67
40
  ),
68
- k && /* @__PURE__ */ l.jsx(
69
- z,
41
+ w && /* @__PURE__ */ o.jsx(
42
+ D,
70
43
  {
71
- control: p,
72
- bubbles: !g.current,
73
- name: n,
74
- value: c,
75
- checked: b,
44
+ control: d,
45
+ bubbles: !k.current,
46
+ name: r,
47
+ value: l,
48
+ checked: h,
76
49
  required: i,
77
- disabled: a,
78
- form: f,
50
+ disabled: c,
51
+ form: m,
79
52
  style: { transform: "translateX(-100%)" }
80
53
  }
81
54
  )
82
55
  ] });
83
56
  }
84
57
  );
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,
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,
91
64
  {
92
- "data-state": N(o.checked),
93
- "data-disabled": o.disabled ? "" : void 0,
94
- ...n,
95
- ref: t
65
+ "data-state": P(n.checked),
66
+ "data-disabled": n.disabled ? "" : void 0,
67
+ ...r,
68
+ ref: a
96
69
  }
97
70
  );
98
71
  }
99
72
  );
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);
120
- }
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
- }
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
138
98
  }
139
- );
140
- }
141
- );
142
- z.displayName = q;
143
- function N(e) {
99
+ }
100
+ );
101
+ };
102
+ function P(e) {
144
103
  return e ? "checked" : "unchecked";
145
104
  }
146
- var j = R, D = E;
147
- const F = s.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ l.jsx(
148
- j,
105
+ var R = x, F = y;
106
+ const L = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o.jsx(
107
+ R,
149
108
  {
150
- className: x(
109
+ className: S(
151
110
  "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",
152
111
  e
153
112
  ),
154
- ...t,
155
- ref: r,
156
- children: /* @__PURE__ */ l.jsx(
157
- D,
113
+ ...a,
114
+ ref: t,
115
+ children: /* @__PURE__ */ o.jsx(
116
+ F,
158
117
  {
159
- className: x(
118
+ className: S(
160
119
  "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"
161
120
  )
162
121
  }
163
122
  )
164
123
  }
165
124
  ));
166
- F.displayName = j.displayName;
125
+ L.displayName = R.displayName;
167
126
  export {
168
- F as S
127
+ L as S
169
128
  };