@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.
- package/dist/Accordion.js +402 -0
- package/dist/CoachForm.css +1 -1
- package/dist/CoachForm.js +21630 -18090
- package/dist/Stack.js +2820 -2260
- package/dist/Switch.js +128 -87
- package/dist/ToggleGroup.js +5956 -4781
- package/dist/_basePickBy.js +25 -25
- package/dist/_baseUniq.js +122 -122
- package/dist/arc.js +36 -36
- package/dist/architectureDiagram-VXUJARFQ.js +1 -1
- package/dist/assets/icons/index.js +1 -1
- package/dist/blockDiagram-VD42YOAC.js +1 -1
- package/dist/c4Diagram-YG6GDRKO.js +22 -22
- package/dist/channel.js +2 -2
- package/dist/chatbotV2/index.d.ts +61 -10
- package/dist/chatbotV2/index.js +442 -56
- package/dist/chunk-4BX2VUAB.js +1 -1
- package/dist/chunk-55IACEB6.js +2 -2
- package/dist/chunk-B4BG7PRW.js +1 -1
- package/dist/chunk-DI55MBZ5.js +1 -1
- package/dist/chunk-FMBD7UC4.js +1 -1
- package/dist/chunk-QN33PNHL.js +5 -5
- package/dist/chunk-QZHKN3VN.js +1 -1
- package/dist/chunk-TZMSLE5B.js +1 -1
- package/dist/classDiagram-2ON5EDUG.js +1 -1
- package/dist/classDiagram-v2-WZHVMYZB.js +1 -1
- package/dist/cose-bilkent-S5V4N54A.js +1 -1
- package/dist/dagre-6UL2VRFP.js +58 -58
- package/dist/dayjs.min.js +1 -1
- package/dist/diagram-PSM6KHXK.js +48 -48
- package/dist/diagram-QEK2KX5R.js +26 -26
- package/dist/diagram-S2PKOQOG.js +9 -9
- package/dist/erDiagram-Q2GNP2WA.js +12 -12
- package/dist/flowDiagram-NV44I4VS.js +6 -6
- package/dist/ganttDiagram-LVOFAZNH.js +322 -322
- package/dist/gitGraphDiagram-NY62KEGX.js +13 -13
- package/dist/graph.js +5 -5
- package/dist/index.css +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +24 -23
- package/dist/index2.css +1 -0
- package/dist/index2.js +22 -22
- package/dist/infoDiagram-F6ZHWCRC.js +14 -14
- package/dist/journeyDiagram-XKPGCS4Q.js +1 -1
- package/dist/kanban-definition-3W4ZIXB7.js +54 -54
- package/dist/layout.js +52 -52
- package/dist/lineage/index.js +381 -381
- package/dist/main.js +6 -6
- package/dist/mermaid-parser.core.js +1 -1
- package/dist/mindmap-definition-VGOIOE7T.js +16 -16
- package/dist/pieDiagram-ADFJNKIX.js +25 -25
- package/dist/quadrantDiagram-AYHSOK5B.js +1 -1
- package/dist/redux-toolkit.modern.js +7 -7
- package/dist/requirementDiagram-UZGBJVZJ.js +1 -1
- package/dist/sankeyDiagram-TZEHDZUN.js +16 -16
- package/dist/sequenceDiagram-WL72ISMW.js +28 -28
- package/dist/shadcn/index.d.ts +22 -35
- package/dist/shadcn/index.js +6232 -4805
- package/dist/stateDiagram-FKZM4ZOC.js +34 -34
- package/dist/stateDiagram-v2-4FDKWEC3.js +6 -6
- package/dist/storybook/Typography.stories.tsx +93 -120
- package/dist/timeline-definition-IT6M3QCI.js +54 -54
- package/dist/xychartDiagram-PRI3JC2R.js +32 -32
- package/package.json +1 -1
package/dist/Switch.js
CHANGED
|
@@ -1,128 +1,169 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as l } from "./index2.js";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
(e,
|
|
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:
|
|
8
|
-
name:
|
|
9
|
-
checked:
|
|
33
|
+
__scopeSwitch: r,
|
|
34
|
+
name: n,
|
|
35
|
+
checked: o,
|
|
10
36
|
defaultChecked: u,
|
|
11
37
|
required: i,
|
|
12
|
-
disabled:
|
|
13
|
-
value:
|
|
14
|
-
onCheckedChange:
|
|
15
|
-
form:
|
|
16
|
-
...
|
|
17
|
-
} = e, [
|
|
18
|
-
prop:
|
|
19
|
-
defaultProp: u,
|
|
20
|
-
onChange:
|
|
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__ */
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
|
|
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":
|
|
55
|
+
"aria-checked": b,
|
|
29
56
|
"aria-required": i,
|
|
30
|
-
"data-state":
|
|
31
|
-
"data-disabled":
|
|
32
|
-
disabled:
|
|
33
|
-
value:
|
|
34
|
-
...
|
|
35
|
-
ref:
|
|
36
|
-
onClick:
|
|
37
|
-
|
|
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
|
-
|
|
42
|
-
|
|
68
|
+
k && /* @__PURE__ */ l.jsx(
|
|
69
|
+
z,
|
|
43
70
|
{
|
|
44
|
-
control:
|
|
45
|
-
bubbles: !
|
|
46
|
-
name:
|
|
47
|
-
value:
|
|
48
|
-
checked:
|
|
71
|
+
control: p,
|
|
72
|
+
bubbles: !g.current,
|
|
73
|
+
name: n,
|
|
74
|
+
value: c,
|
|
75
|
+
checked: b,
|
|
49
76
|
required: i,
|
|
50
|
-
disabled:
|
|
51
|
-
form:
|
|
77
|
+
disabled: a,
|
|
78
|
+
form: f,
|
|
52
79
|
style: { transform: "translateX(-100%)" }
|
|
53
80
|
}
|
|
54
81
|
)
|
|
55
82
|
] });
|
|
56
83
|
}
|
|
57
84
|
);
|
|
58
|
-
|
|
59
|
-
var
|
|
60
|
-
(e,
|
|
61
|
-
const { __scopeSwitch:
|
|
62
|
-
return /* @__PURE__ */
|
|
63
|
-
|
|
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":
|
|
66
|
-
"data-disabled":
|
|
67
|
-
...
|
|
68
|
-
ref:
|
|
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
|
-
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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
|
-
|
|
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
|
|
106
|
-
const
|
|
107
|
-
|
|
146
|
+
var j = R, D = E;
|
|
147
|
+
const F = s.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ l.jsx(
|
|
148
|
+
j,
|
|
108
149
|
{
|
|
109
|
-
className:
|
|
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
|
-
...
|
|
114
|
-
ref:
|
|
115
|
-
children: /* @__PURE__ */
|
|
116
|
-
|
|
154
|
+
...t,
|
|
155
|
+
ref: r,
|
|
156
|
+
children: /* @__PURE__ */ l.jsx(
|
|
157
|
+
D,
|
|
117
158
|
{
|
|
118
|
-
className:
|
|
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
|
-
|
|
166
|
+
F.displayName = j.displayName;
|
|
126
167
|
export {
|
|
127
|
-
|
|
168
|
+
F as S
|
|
128
169
|
};
|