@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.
- package/dist/CoachForm.css +1 -1
- package/dist/CoachForm.js +20266 -23806
- package/dist/Stack.js +2211 -2808
- package/dist/Switch.js +87 -128
- package/dist/ToggleGroup.js +5000 -6188
- 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 +10 -61
- package/dist/chatbotV2/index.js +56 -442
- 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 +1 -9
- package/dist/index.js +23 -24
- 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 +15 -15
- package/dist/main.js +5 -5
- 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 +8 -11
- package/dist/shadcn/index.js +4869 -6296
- package/dist/stateDiagram-FKZM4ZOC.js +34 -34
- package/dist/stateDiagram-v2-4FDKWEC3.js +6 -6
- package/dist/timeline-definition-IT6M3QCI.js +54 -54
- package/dist/xychartDiagram-PRI3JC2R.js +32 -32
- package/package.json +1 -1
- package/dist/Accordion.js +0 -402
- package/dist/index2.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a1 as a, bv as gi, ad as Xt, aJ as Wt, aB as xi, aw as St, av as Nt, au as di, ac as fi, ah as Yt, a3 as pi, a4 as mi, ag as yi, a5 as bi, a6 as Ai, an as wi, az as Ci, ae as Si } from "./CoachForm.js";
|
|
2
2
|
import "./redux-toolkit.modern.js";
|
|
3
3
|
import { i as _i } from "./init.js";
|
|
4
4
|
import { o as ki } from "./ordinal.js";
|
|
@@ -173,7 +173,7 @@ var bt = function() {
|
|
|
173
173
|
return V = d.pop() || T.lex() || Mt, typeof V != "number" && (V instanceof Array && (d = V, V = d.pop()), V = u.symbols_[V] || V), V;
|
|
174
174
|
}
|
|
175
175
|
a(Vt, "lex");
|
|
176
|
-
for (var M, H, B, pt,
|
|
176
|
+
for (var M, H, B, pt, q = {}, ct, F, Bt, ut; ; ) {
|
|
177
177
|
if (H = x[x.length - 1], this.defaultActions[H] ? B = this.defaultActions[H] : ((M === null || typeof M > "u") && (M = Vt()), B = at[H] && at[H][M]), typeof B > "u" || !B.length || !B[0]) {
|
|
178
178
|
var mt = "";
|
|
179
179
|
ut = [];
|
|
@@ -196,15 +196,15 @@ Expecting ` + ut.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : mt =
|
|
|
196
196
|
x.push(M), w.push(T.yytext), r.push(T.yylloc), x.push(B[1]), M = null, It = T.yyleng, f = T.yytext, lt = T.yylineno, ft = T.yylloc;
|
|
197
197
|
break;
|
|
198
198
|
case 2:
|
|
199
|
-
if (F = this.productions_[B[1]][1],
|
|
199
|
+
if (F = this.productions_[B[1]][1], q.$ = w[w.length - F], q._$ = {
|
|
200
200
|
first_line: r[r.length - (F || 1)].first_line,
|
|
201
201
|
last_line: r[r.length - 1].last_line,
|
|
202
202
|
first_column: r[r.length - (F || 1)].first_column,
|
|
203
203
|
last_column: r[r.length - 1].last_column
|
|
204
|
-
}, ci && (
|
|
204
|
+
}, ci && (q._$.range = [
|
|
205
205
|
r[r.length - (F || 1)].range[0],
|
|
206
206
|
r[r.length - 1].range[1]
|
|
207
|
-
]), pt = this.performAction.apply(
|
|
207
|
+
]), pt = this.performAction.apply(q, [
|
|
208
208
|
f,
|
|
209
209
|
It,
|
|
210
210
|
lt,
|
|
@@ -214,7 +214,7 @@ Expecting ` + ut.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : mt =
|
|
|
214
214
|
r
|
|
215
215
|
].concat(li)), typeof pt < "u")
|
|
216
216
|
return pt;
|
|
217
|
-
F && (x = x.slice(0, -1 * F * 2), w = w.slice(0, -1 * F), r = r.slice(0, -1 * F)), x.push(this.productions_[B[1]][0]), w.push(
|
|
217
|
+
F && (x = x.slice(0, -1 * F * 2), w = w.slice(0, -1 * F), r = r.slice(0, -1 * F)), x.push(this.productions_[B[1]][0]), w.push(q.$), r.push(q._$), Bt = at[x[x.length - 2]][x[x.length - 1]], x.push(Bt);
|
|
218
218
|
break;
|
|
219
219
|
case 3:
|
|
220
220
|
return !0;
|
|
@@ -516,11 +516,11 @@ function _t(e) {
|
|
|
516
516
|
return e.type === "band";
|
|
517
517
|
}
|
|
518
518
|
a(_t, "isBandAxisData");
|
|
519
|
-
function
|
|
519
|
+
function G(e) {
|
|
520
520
|
return e.type === "linear";
|
|
521
521
|
}
|
|
522
|
-
a(
|
|
523
|
-
var
|
|
522
|
+
a(G, "isLinearAxisData");
|
|
523
|
+
var j, Ht = (j = class {
|
|
524
524
|
constructor(t) {
|
|
525
525
|
this.parentGroup = t;
|
|
526
526
|
}
|
|
@@ -540,7 +540,7 @@ var q, Ht = (q = class {
|
|
|
540
540
|
}
|
|
541
541
|
return n.remove(), s;
|
|
542
542
|
}
|
|
543
|
-
}, a(
|
|
543
|
+
}, a(j, "TextDimensionCalculatorWithFont"), j), Ot = 0.7, Ft = 0.2, Q, Ut = (Q = class {
|
|
544
544
|
constructor(t, i, s, n) {
|
|
545
545
|
this.axisConfig = t, this.title = i, this.textDimensionCalculator = s, this.axisThemeConfig = n, this.boundingRect = { x: 0, y: 0, width: 0, height: 0 }, this.axisPosition = "left", this.showTitle = !1, this.showLabel = !1, this.showTick = !1, this.showAxisLine = !1, this.outerPadding = 0, this.titleTextHeight = 0, this.labelTextHeight = 0, this.range = [0, 10], this.boundingRect = { x: 0, y: 0, width: 0, height: 0 }, this.axisPosition = "left";
|
|
546
546
|
}
|
|
@@ -809,7 +809,7 @@ var q, Ht = (q = class {
|
|
|
809
809
|
getScaleValue(t) {
|
|
810
810
|
return this.scale(t) ?? this.getRange()[0];
|
|
811
811
|
}
|
|
812
|
-
}, a(K, "BandAxis"), K),
|
|
812
|
+
}, a(K, "BandAxis"), K), J, vi = (J = class extends Ut {
|
|
813
813
|
constructor(t, i, s, n, o) {
|
|
814
814
|
super(t, n, o, i), this.domain = s, this.scale = zt().domain(this.domain).range(this.getRange());
|
|
815
815
|
}
|
|
@@ -823,7 +823,7 @@ var q, Ht = (q = class {
|
|
|
823
823
|
getScaleValue(t) {
|
|
824
824
|
return this.scale(t);
|
|
825
825
|
}
|
|
826
|
-
}, a(
|
|
826
|
+
}, a(J, "LinearAxis"), J);
|
|
827
827
|
function wt(e, t, i, s) {
|
|
828
828
|
const n = new Ht(s);
|
|
829
829
|
return _t(e) ? new Di(
|
|
@@ -841,7 +841,7 @@ function wt(e, t, i, s) {
|
|
|
841
841
|
);
|
|
842
842
|
}
|
|
843
843
|
a(wt, "getAxis");
|
|
844
|
-
var
|
|
844
|
+
var Z, Pi = (Z = class {
|
|
845
845
|
constructor(t, i, s, n) {
|
|
846
846
|
this.textDimensionCalculator = t, this.chartConfig = i, this.chartData = s, this.chartThemeConfig = n, this.boundingRect = {
|
|
847
847
|
x: 0,
|
|
@@ -882,7 +882,7 @@ var J, Pi = (J = class {
|
|
|
882
882
|
]
|
|
883
883
|
}), t;
|
|
884
884
|
}
|
|
885
|
-
}, a(
|
|
885
|
+
}, a(Z, "ChartTitle"), Z);
|
|
886
886
|
function $t(e, t, i, s) {
|
|
887
887
|
const n = new Ht(s);
|
|
888
888
|
return new Pi(n, e, t, i);
|
|
@@ -1007,15 +1007,15 @@ var tt, Li = (tt = class {
|
|
|
1007
1007
|
return t;
|
|
1008
1008
|
}
|
|
1009
1009
|
}, a(et, "BasePlot"), et);
|
|
1010
|
-
function
|
|
1010
|
+
function qt(e, t, i) {
|
|
1011
1011
|
return new Ii(e, t, i);
|
|
1012
1012
|
}
|
|
1013
|
-
a(
|
|
1013
|
+
a(qt, "getPlotComponent");
|
|
1014
1014
|
var st, Mi = (st = class {
|
|
1015
1015
|
constructor(t, i, s, n) {
|
|
1016
1016
|
this.chartConfig = t, this.chartData = i, this.componentStore = {
|
|
1017
1017
|
title: $t(t, i, s, n),
|
|
1018
|
-
plot:
|
|
1018
|
+
plot: qt(t, i, s),
|
|
1019
1019
|
xAxis: wt(
|
|
1020
1020
|
i.xAxis,
|
|
1021
1021
|
t.xAxis,
|
|
@@ -1097,7 +1097,7 @@ var st, Mi = (st = class {
|
|
|
1097
1097
|
static build(t, i, s, n) {
|
|
1098
1098
|
return new Mi(t, i, s, n).getDrawableElement();
|
|
1099
1099
|
}
|
|
1100
|
-
}, a(nt, "XYChartBuilder"), nt), rt = 0,
|
|
1100
|
+
}, a(nt, "XYChartBuilder"), nt), rt = 0, Gt, ot = Tt(), ht = Rt(), A = Dt(), Ct = ht.plotColorPalette.split(",").map((e) => e.trim()), gt = !1, kt = !1;
|
|
1101
1101
|
function Rt() {
|
|
1102
1102
|
const e = xi(), t = St();
|
|
1103
1103
|
return Nt(e.xyChart, t.themeVariables.xyChart);
|
|
@@ -1134,10 +1134,10 @@ function xt(e) {
|
|
|
1134
1134
|
return fi(e.trim(), t);
|
|
1135
1135
|
}
|
|
1136
1136
|
a(xt, "textSanitizer");
|
|
1137
|
-
function
|
|
1138
|
-
|
|
1137
|
+
function jt(e) {
|
|
1138
|
+
Gt = e;
|
|
1139
1139
|
}
|
|
1140
|
-
a(
|
|
1140
|
+
a(jt, "setTmpSVGG");
|
|
1141
1141
|
function Qt(e) {
|
|
1142
1142
|
e === "horizontal" ? ot.chartOrientation = "horizontal" : ot.chartOrientation = "vertical";
|
|
1143
1143
|
}
|
|
@@ -1150,24 +1150,24 @@ function vt(e, t) {
|
|
|
1150
1150
|
A.xAxis = { type: "linear", title: A.xAxis.title, min: e, max: t }, gt = !0;
|
|
1151
1151
|
}
|
|
1152
1152
|
a(vt, "setXAxisRangeData");
|
|
1153
|
-
function
|
|
1153
|
+
function Jt(e) {
|
|
1154
1154
|
A.xAxis = {
|
|
1155
1155
|
type: "band",
|
|
1156
1156
|
title: A.xAxis.title,
|
|
1157
1157
|
categories: e.map((t) => xt(t.text))
|
|
1158
1158
|
}, gt = !0;
|
|
1159
1159
|
}
|
|
1160
|
-
a(
|
|
1161
|
-
function
|
|
1160
|
+
a(Jt, "setXAxisBand");
|
|
1161
|
+
function Zt(e) {
|
|
1162
1162
|
A.yAxis.title = xt(e.text);
|
|
1163
1163
|
}
|
|
1164
|
-
a(
|
|
1164
|
+
a(Zt, "setYAxisTitle");
|
|
1165
1165
|
function ti(e, t) {
|
|
1166
1166
|
A.yAxis = { type: "linear", title: A.yAxis.title, min: e, max: t }, kt = !0;
|
|
1167
1167
|
}
|
|
1168
1168
|
a(ti, "setYAxisRangeData");
|
|
1169
1169
|
function ii(e) {
|
|
1170
|
-
const t = Math.min(...e), i = Math.max(...e), s =
|
|
1170
|
+
const t = Math.min(...e), i = Math.max(...e), s = G(A.yAxis) ? A.yAxis.min : 1 / 0, n = G(A.yAxis) ? A.yAxis.max : -1 / 0;
|
|
1171
1171
|
A.yAxis = {
|
|
1172
1172
|
type: "linear",
|
|
1173
1173
|
title: A.yAxis.title,
|
|
@@ -1181,10 +1181,10 @@ function Pt(e) {
|
|
|
1181
1181
|
if (e.length === 0)
|
|
1182
1182
|
return t;
|
|
1183
1183
|
if (!gt) {
|
|
1184
|
-
const i =
|
|
1184
|
+
const i = G(A.xAxis) ? A.xAxis.min : 1 / 0, s = G(A.xAxis) ? A.xAxis.max : -1 / 0;
|
|
1185
1185
|
vt(Math.min(i, 1), Math.max(s, e.length));
|
|
1186
1186
|
}
|
|
1187
|
-
if (kt || ii(e), _t(A.xAxis) && (t = A.xAxis.categories.map((i, s) => [i, e[s]])),
|
|
1187
|
+
if (kt || ii(e), _t(A.xAxis) && (t = A.xAxis.categories.map((i, s) => [i, e[s]])), G(A.xAxis)) {
|
|
1188
1188
|
const i = A.xAxis.min, s = A.xAxis.max, n = (s - i) / (e.length - 1), o = [];
|
|
1189
1189
|
for (let g = i; g <= s; g += n)
|
|
1190
1190
|
o.push(`${g}`);
|
|
@@ -1219,7 +1219,7 @@ a(si, "setBarData");
|
|
|
1219
1219
|
function ni() {
|
|
1220
1220
|
if (A.plots.length === 0)
|
|
1221
1221
|
throw Error("No Plot to render, please provide a plot with some data");
|
|
1222
|
-
return A.title = Yt(), Vi.build(ot, A, ht,
|
|
1222
|
+
return A.title = Yt(), Vi.build(ot, A, ht, Gt);
|
|
1223
1223
|
}
|
|
1224
1224
|
a(ni, "getDrawableElem");
|
|
1225
1225
|
function ai() {
|
|
@@ -1248,12 +1248,12 @@ var Bi = /* @__PURE__ */ a(function() {
|
|
|
1248
1248
|
setOrientation: Qt,
|
|
1249
1249
|
setXAxisTitle: Kt,
|
|
1250
1250
|
setXAxisRangeData: vt,
|
|
1251
|
-
setXAxisBand:
|
|
1252
|
-
setYAxisTitle:
|
|
1251
|
+
setXAxisBand: Jt,
|
|
1252
|
+
setYAxisTitle: Zt,
|
|
1253
1253
|
setYAxisRangeData: ti,
|
|
1254
1254
|
setLineData: ei,
|
|
1255
1255
|
setBarData: si,
|
|
1256
|
-
setTmpSVGG:
|
|
1256
|
+
setTmpSVGG: jt,
|
|
1257
1257
|
getChartThemeConfig: ai,
|
|
1258
1258
|
getChartConfig: ri,
|
|
1259
1259
|
getXYChartData: oi
|
package/package.json
CHANGED
package/dist/Accordion.js
DELETED
|
@@ -1,402 +0,0 @@
|
|
|
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
|
-
};
|