@alfadocs/ui-kit 1.11.0 → 1.12.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/_chunks/actions-cell-renderer-DnSLrgQD.js +1945 -0
- package/dist/_chunks/{anamnesis-summary-rows-d44s_whc.js → anamnesis-summary-rows-BfhxWPO3.js} +1421 -1418
- package/dist/_chunks/appointment-timeline-DCn0Jx55.js +403 -0
- package/dist/_chunks/{balance-badge-cell-C_Qz76x7.js → balance-badge-cell-7L6nzB29.js} +317 -290
- package/dist/_chunks/{chart-Bkr1Sh4o.js → chart-C6eHTxkO.js} +2 -2
- package/dist/_chunks/{control-room-rail-Cj2iX9h_.js → control-room-rail-iO_BCaq1.js} +2 -2
- package/dist/_chunks/{editable-currency-cell-renderer-zLf_bXvL.js → editable-currency-cell-renderer-B7TVZ5ZJ.js} +2 -2
- package/dist/_chunks/{face-scheme-BfDi4YkW.js → face-scheme-CZaKm6fG.js} +2 -2
- package/dist/_chunks/{file-manager-Df6hyUYg.js → file-manager-C0y7HBAN.js} +3 -3
- package/dist/_chunks/{header-settings-CVC_davE.js → header-settings-J-ZCAfir.js} +2 -2
- package/dist/_chunks/{icon-button-group-D6SVMteH.js → icon-button-group-VCCod3Hz.js} +154 -145
- package/dist/_chunks/{link-cell-renderer-Cp2MSlJl.js → link-cell-renderer-CenJx-_7.js} +197 -181
- package/dist/_chunks/{marketplace-app-shell-Chfdia7m.js → marketplace-app-shell-DDQXQ8hX.js} +2 -2
- package/dist/_chunks/{notes-panel-e9cJWVRg.js → notes-panel-CymneXtl.js} +93 -91
- package/dist/_chunks/{signature-request-CW30B77U.js → signature-request-DVDTKLjM.js} +2 -2
- package/dist/_chunks/{theme-toggle-DuMhQNFS.js → theme-toggle-uEwoKjl3.js} +2 -2
- package/dist/_chunks/{tool-rail-CHyUmulN.js → tool-rail-8Scslq3X.js} +2 -2
- package/dist/_chunks/{whatsapp-button-Ca9towA4.js → whatsapp-button-CuFIHJzG.js} +27 -19
- package/dist/agent-catalog.json +2 -2
- package/dist/agent-i18n/en.json +1 -1
- package/dist/components/appointment-card/appointment-card.d.ts +1 -1
- package/dist/components/appointment-timeline/appointment-timeline.d.ts +8 -0
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/data-table/cell-renderers/actions-cell-renderer.d.ts +7 -0
- package/dist/components/data-table/filters/date-range-filter.d.ts +22 -0
- package/dist/components/data-table/index.js +3 -3
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +6 -0
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tool-rail/tool-rail.d.ts +1 -1
- package/dist/components/whatsapp-button/index.js +1 -1
- package/dist/host-compat.css +7 -1
- package/dist/index.js +16 -16
- package/dist/patterns/anamnesis/anamnesis-config.d.ts +18 -7
- package/dist/patterns/anamnesis/anamnesis-types.d.ts +8 -0
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/actions-cell-renderer-xfSYiTXQ.js +0 -1887
- package/dist/_chunks/appointment-timeline-0mwtpErq.js +0 -388
|
@@ -8,7 +8,7 @@ import { u as Ge, g as ve, a as Ue, r as We } from "./apexcharts-theme-B_AxGC_h.
|
|
|
8
8
|
import { u as je } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
9
9
|
import { u as Ke } from "./registry-DvAUVLHh.js";
|
|
10
10
|
import { I as Ve } from "./icon-button-DA2CAGHZ.js";
|
|
11
|
-
import { I as Ye } from "./icon-button-group-
|
|
11
|
+
import { I as Ye } from "./icon-button-group-VCCod3Hz.js";
|
|
12
12
|
import { c as N } from "./createLucideIcon-DhHxpK9K.js";
|
|
13
13
|
/**
|
|
14
14
|
* @license lucide-react v1.22.0 - ISC
|
|
@@ -702,4 +702,4 @@ export {
|
|
|
702
702
|
nt as a,
|
|
703
703
|
it as c
|
|
704
704
|
};
|
|
705
|
-
//# sourceMappingURL=chart-
|
|
705
|
+
//# sourceMappingURL=chart-C6eHTxkO.js.map
|
|
@@ -3,7 +3,7 @@ import { useState as _, useCallback as g, useMemo as T, useRef as B, useContext
|
|
|
3
3
|
import { useTranslation as po } from "react-i18next";
|
|
4
4
|
import { I as G } from "./icon-button-DA2CAGHZ.js";
|
|
5
5
|
import { a as fo } from "./panel-header-D313n_9-.js";
|
|
6
|
-
import { T as mo } from "./tool-rail-
|
|
6
|
+
import { T as mo } from "./tool-rail-8Scslq3X.js";
|
|
7
7
|
import { u as go } from "./use-persistent-state-nZwZAnE9.js";
|
|
8
8
|
import { S as Ro } from "./star-Bf9L2Uot.js";
|
|
9
9
|
import { X as vo } from "./x-B5YnXwCz.js";
|
|
@@ -334,4 +334,4 @@ export {
|
|
|
334
334
|
Ho as d,
|
|
335
335
|
Ko as u
|
|
336
336
|
};
|
|
337
|
-
//# sourceMappingURL=control-room-rail-
|
|
337
|
+
//# sourceMappingURL=control-room-rail-iO_BCaq1.js.map
|
|
@@ -3,7 +3,7 @@ import { jsx as i, jsxs as L } from "react/jsx-runtime";
|
|
|
3
3
|
import { T as P } from "./tag-3wgkwwDB.js";
|
|
4
4
|
import { useTranslation as x } from "react-i18next";
|
|
5
5
|
import { I as S } from "./icon-button-DA2CAGHZ.js";
|
|
6
|
-
import { I as V } from "./icon-button-group-
|
|
6
|
+
import { I as V } from "./icon-button-group-VCCod3Hz.js";
|
|
7
7
|
import { A as $, a as H } from "./arrow-up-BYvcvTkB.js";
|
|
8
8
|
import { S as G } from "./square-check-big-dj0o8yA3.js";
|
|
9
9
|
import { S as O } from "./square-DASBRZ0U.js";
|
|
@@ -409,4 +409,4 @@ export {
|
|
|
409
409
|
ge as r,
|
|
410
410
|
me as u
|
|
411
411
|
};
|
|
412
|
-
//# sourceMappingURL=editable-currency-cell-renderer-
|
|
412
|
+
//# sourceMappingURL=editable-currency-cell-renderer-B7TVZ5ZJ.js.map
|
|
@@ -9,7 +9,7 @@ import { B as P } from "./button-nJaPh_HC.js";
|
|
|
9
9
|
import { I as Ze } from "./icon-button-DA2CAGHZ.js";
|
|
10
10
|
import { B as es } from "./button-group-CaxRJsNG.js";
|
|
11
11
|
import { C as ts } from "./combobox-DiMLItyu.js";
|
|
12
|
-
import { I as vn } from "./icon-button-group-
|
|
12
|
+
import { I as vn } from "./icon-button-group-VCCod3Hz.js";
|
|
13
13
|
import { T as Ar } from "./text-input-CUvCb6ST.js";
|
|
14
14
|
import { C as Oe } from "./card-DPmk26CL.js";
|
|
15
15
|
import { S as Tt } from "./separator-CYU_bGFn.js";
|
|
@@ -3137,4 +3137,4 @@ export {
|
|
|
3137
3137
|
Nn as t,
|
|
3138
3138
|
Kr as u
|
|
3139
3139
|
};
|
|
3140
|
-
//# sourceMappingURL=face-scheme-
|
|
3140
|
+
//# sourceMappingURL=face-scheme-CZaKm6fG.js.map
|
|
@@ -16,7 +16,7 @@ import { F as Nt, a as Tt } from "./file-Cwe9VC1A.js";
|
|
|
16
16
|
import { F as Ft } from "./file-text-5yv6r2ls.js";
|
|
17
17
|
import { F as At } from "./file-spreadsheet-DmwyfV4O.js";
|
|
18
18
|
import { C as Dt } from "./chevron-right-I9AeSxH2.js";
|
|
19
|
-
import { A as Rt, d as It, D as Te } from "./actions-cell-renderer-
|
|
19
|
+
import { A as Rt, d as It, D as Te } from "./actions-cell-renderer-DnSLrgQD.js";
|
|
20
20
|
import { B as $e } from "./badge-sTusUqZD.js";
|
|
21
21
|
import { D as Ge } from "./download-CfYKJO_j.js";
|
|
22
22
|
import { P as zt } from "./pen-line-D0De5zdl.js";
|
|
@@ -24,7 +24,7 @@ import { S as Ue } from "./share-2-B49jcW2I.js";
|
|
|
24
24
|
import { P as Ye } from "./pencil-B1sKKyuT.js";
|
|
25
25
|
import { T as Ze } from "./trash-2-uumy3fy1.js";
|
|
26
26
|
import { I as Q } from "./icon-button-DA2CAGHZ.js";
|
|
27
|
-
import { I as _t } from "./icon-button-group-
|
|
27
|
+
import { I as _t } from "./icon-button-group-VCCod3Hz.js";
|
|
28
28
|
import { U as Xe } from "./upload-BfT2hzMg.js";
|
|
29
29
|
import { P as Lt } from "./plus-DzMQ_c6b.js";
|
|
30
30
|
/**
|
|
@@ -1756,4 +1756,4 @@ export {
|
|
|
1756
1756
|
yn as F,
|
|
1757
1757
|
Gt as f
|
|
1758
1758
|
};
|
|
1759
|
-
//# sourceMappingURL=file-manager-
|
|
1759
|
+
//# sourceMappingURL=file-manager-C0y7HBAN.js.map
|
|
@@ -3,7 +3,7 @@ import { forwardRef as I, useRef as c, useImperativeHandle as C, useCallback as
|
|
|
3
3
|
import { c as _ } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as K } from "react-i18next";
|
|
5
5
|
import { I as l } from "./icon-button-DA2CAGHZ.js";
|
|
6
|
-
import { I as M } from "./icon-button-group-
|
|
6
|
+
import { I as M } from "./icon-button-group-VCCod3Hz.js";
|
|
7
7
|
import { D as r } from "./dropdown-menu-DU-Hrf33.js";
|
|
8
8
|
import { S as N } from "./switch-OILsBLWo.js";
|
|
9
9
|
import { c as S, a as j, L as H } from "./locale-picker-BvbVjDQ-.js";
|
|
@@ -332,4 +332,4 @@ J.displayName = "HeaderSettings";
|
|
|
332
332
|
export {
|
|
333
333
|
J as H
|
|
334
334
|
};
|
|
335
|
-
//# sourceMappingURL=header-settings-
|
|
335
|
+
//# sourceMappingURL=header-settings-J-ZCAfir.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { I as
|
|
6
|
-
import { D as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { E as
|
|
10
|
-
const
|
|
1
|
+
import { jsx as a, jsxs as T } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Se, useState as W, useCallback as H, useRef as F, Children as be, isValidElement as _, useEffect as ve, cloneElement as ye } from "react";
|
|
3
|
+
import { c as Be } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as Ke } from "react-i18next";
|
|
5
|
+
import { I as he } from "./icon-button-DA2CAGHZ.js";
|
|
6
|
+
import { D as k } from "./dropdown-menu-DU-Hrf33.js";
|
|
7
|
+
import { u as Pe } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
8
|
+
import { u as Te } from "./use-priority-overflow-c9SjxZkZ.js";
|
|
9
|
+
import { E as we } from "./ellipsis-dRo9ouSU.js";
|
|
10
|
+
const ke = Be(
|
|
11
11
|
[
|
|
12
12
|
"ds:inline-flex ds:isolate",
|
|
13
13
|
// Hairline border around the group unifies the children into one
|
|
@@ -52,16 +52,16 @@ const ye = ze(
|
|
|
52
52
|
orientation: "horizontal"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
),
|
|
56
|
-
(d,
|
|
55
|
+
), Ie = "ds:absolute ds:start-0 ds:top-0 ds:invisible ds:pointer-events-none", _e = Se(
|
|
56
|
+
(d, y) => {
|
|
57
57
|
const {
|
|
58
58
|
size: m,
|
|
59
|
-
orientation:
|
|
59
|
+
orientation: c = "horizontal",
|
|
60
60
|
role: i = "group",
|
|
61
61
|
mode: n = "momentary",
|
|
62
62
|
disabled: q = !1,
|
|
63
63
|
intent: S = "outline",
|
|
64
|
-
overflow:
|
|
64
|
+
overflow: Ce = "none",
|
|
65
65
|
className: J,
|
|
66
66
|
children: Q,
|
|
67
67
|
"aria-label": X,
|
|
@@ -69,11 +69,11 @@ const ye = ze(
|
|
|
69
69
|
// Controlled-value props are consumed via `props as …` below; strip them
|
|
70
70
|
// here so they never spread onto the root <div> (React would warn that
|
|
71
71
|
// `onValueChange` is an unknown DOM event handler).
|
|
72
|
-
value:
|
|
73
|
-
defaultValue:
|
|
74
|
-
onValueChange:
|
|
72
|
+
value: Me,
|
|
73
|
+
defaultValue: Oe,
|
|
74
|
+
onValueChange: $e,
|
|
75
75
|
...Z
|
|
76
|
-
} = d, { t:
|
|
76
|
+
} = d, { t: Re } = Ke(), h = Ce === "menu" && c !== "vertical", [ee, oe] = W(
|
|
77
77
|
() => n === "toggle-single" ? d.defaultValue ?? "" : n === "toggle-multi" ? d.defaultValue ?? [] : ""
|
|
78
78
|
), g = (() => {
|
|
79
79
|
if (n === "toggle-single") {
|
|
@@ -85,7 +85,7 @@ const ye = ze(
|
|
|
85
85
|
return e.value !== void 0 ? e.value : ee;
|
|
86
86
|
}
|
|
87
87
|
return "";
|
|
88
|
-
})(),
|
|
88
|
+
})(), I = H(
|
|
89
89
|
(e) => {
|
|
90
90
|
var o, r;
|
|
91
91
|
if (n === "toggle-single") {
|
|
@@ -97,194 +97,203 @@ const ye = ze(
|
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
[n, d]
|
|
100
|
-
), b = i === "toolbar" || i === "radiogroup",
|
|
100
|
+
), b = i === "toolbar" || i === "radiogroup", x = F([]), [v, A] = W(0), te = H(
|
|
101
101
|
(e, o) => {
|
|
102
|
-
|
|
102
|
+
x.current[e] = o;
|
|
103
103
|
},
|
|
104
104
|
[]
|
|
105
|
-
), re =
|
|
106
|
-
|
|
105
|
+
), re = F(null), [G, xe] = W(!1);
|
|
106
|
+
Pe(() => {
|
|
107
107
|
if (typeof window > "u") return;
|
|
108
108
|
const e = re.current;
|
|
109
109
|
if (!e) return;
|
|
110
110
|
const o = window.getComputedStyle(e).direction;
|
|
111
|
-
|
|
111
|
+
xe(o === "rtl");
|
|
112
112
|
}, []);
|
|
113
|
-
const
|
|
113
|
+
const M = H(
|
|
114
114
|
(e) => {
|
|
115
|
-
var
|
|
115
|
+
var P;
|
|
116
116
|
if (!b) return;
|
|
117
|
-
const o =
|
|
117
|
+
const o = x.current.filter(Boolean).length;
|
|
118
118
|
if (o === 0) return;
|
|
119
|
-
const r =
|
|
119
|
+
const r = c === "vertical" ? "ArrowDown" : G ? "ArrowLeft" : "ArrowRight", t = c === "vertical" ? "ArrowUp" : G ? "ArrowRight" : "ArrowLeft";
|
|
120
120
|
let s = null;
|
|
121
|
-
if (e.key === r ? s = (
|
|
122
|
-
const
|
|
123
|
-
let
|
|
124
|
-
for (;
|
|
125
|
-
const f =
|
|
121
|
+
if (e.key === r ? s = (v + 1) % o : e.key === t ? s = (v - 1 + o) % o : e.key === "Home" ? s = 0 : e.key === "End" && (s = o - 1), s === null) return;
|
|
122
|
+
const N = o;
|
|
123
|
+
let R = 0, u = s;
|
|
124
|
+
for (; R < N; ) {
|
|
125
|
+
const f = x.current[u];
|
|
126
126
|
if (f && f.getAttribute("aria-disabled") !== "true" && !f.disabled)
|
|
127
127
|
break;
|
|
128
|
-
|
|
128
|
+
u = e.key === t || e.key === "End" ? (u - 1 + o) % o : (u + 1) % o, R += 1;
|
|
129
129
|
}
|
|
130
|
-
if (e.preventDefault(),
|
|
131
|
-
const f = se.current[
|
|
130
|
+
if (e.preventDefault(), A(u), (P = x.current[u]) == null || P.focus(), i === "radiogroup" && n === "toggle-single") {
|
|
131
|
+
const f = se.current[u];
|
|
132
132
|
if (f && typeof f == "object" && "props" in f) {
|
|
133
|
-
const
|
|
134
|
-
|
|
133
|
+
const j = f.props.value;
|
|
134
|
+
j && j !== g && I(j);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
138
|
[
|
|
139
139
|
b,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
c,
|
|
141
|
+
G,
|
|
142
|
+
v,
|
|
143
143
|
i,
|
|
144
144
|
n,
|
|
145
|
-
|
|
145
|
+
I,
|
|
146
146
|
g
|
|
147
147
|
]
|
|
148
|
-
),
|
|
148
|
+
), D = h ? be.toArray(Q).filter(_) : [], B = (e) => {
|
|
149
149
|
const o = e.props["aria-label"];
|
|
150
150
|
return typeof o == "string" ? o : typeof e.props.tooltip == "string" ? e.props.tooltip : null;
|
|
151
151
|
};
|
|
152
|
-
|
|
153
|
-
const
|
|
152
|
+
F(!1);
|
|
153
|
+
const Ae = D.map((e) => {
|
|
154
154
|
const o = e.props["data-overflow-pin"] !== void 0, r = B(e) !== null;
|
|
155
155
|
return o || !r;
|
|
156
|
-
}), { containerRef:
|
|
157
|
-
enabled:
|
|
158
|
-
count:
|
|
159
|
-
pinned:
|
|
160
|
-
}), ie =
|
|
161
|
-
|
|
162
|
-
const se =
|
|
163
|
-
se.current =
|
|
164
|
-
const
|
|
165
|
-
(e) =>
|
|
156
|
+
}), { containerRef: De, fullRowRef: Ve, triggerProbeRef: Le, visible: ne, overflowing: V } = Te({
|
|
157
|
+
enabled: h,
|
|
158
|
+
count: D.length,
|
|
159
|
+
pinned: Ae
|
|
160
|
+
}), ie = F(null), w = h ? D.filter((e, o) => ne[o]) : be.toArray(Q);
|
|
161
|
+
h && (x.current.length = w.length + (V ? 1 : 0));
|
|
162
|
+
const se = F([]);
|
|
163
|
+
se.current = w;
|
|
164
|
+
const O = i === "radiogroup" && n === "toggle-single" ? w.findIndex(
|
|
165
|
+
(e) => _(e) && e.props.value === g
|
|
166
166
|
) : -1;
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}, [
|
|
170
|
-
const
|
|
171
|
-
|
|
167
|
+
ve(() => {
|
|
168
|
+
O >= 0 && A(O);
|
|
169
|
+
}, [O]);
|
|
170
|
+
const C = w.length;
|
|
171
|
+
ve(() => {
|
|
172
172
|
var o;
|
|
173
|
-
if (!b || !
|
|
174
|
-
const e =
|
|
175
|
-
e > 0 &&
|
|
173
|
+
if (!b || !h) return;
|
|
174
|
+
const e = C + (V ? 1 : 0);
|
|
175
|
+
e > 0 && v >= e && (A(e - 1), document.activeElement === document.body && ((o = ie.current) == null || o.focus()));
|
|
176
176
|
}, [
|
|
177
177
|
b,
|
|
178
|
-
|
|
178
|
+
h,
|
|
179
|
+
C,
|
|
179
180
|
V,
|
|
180
|
-
|
|
181
|
-
h
|
|
181
|
+
v
|
|
182
182
|
]);
|
|
183
|
-
const ae =
|
|
184
|
-
if (!
|
|
183
|
+
const ae = (e) => {
|
|
184
|
+
if (!_(e)) return !1;
|
|
185
|
+
const o = e.props;
|
|
186
|
+
return o.disabled === !0 || o.loading === !0;
|
|
187
|
+
}, le = w.findIndex((e) => !ae(e)), de = ae(w[v]) ? le !== -1 ? le : (
|
|
188
|
+
/* Every visible child is disabled: the overflow trigger is the
|
|
189
|
+
only thing left that can hold focus. Without this the group
|
|
190
|
+
has no tab stop at all and the menu is unreachable. */
|
|
191
|
+
V ? C : v
|
|
192
|
+
) : v, ce = w.map((e, o) => {
|
|
193
|
+
if (!_(e))
|
|
185
194
|
return e;
|
|
186
|
-
const r = e, t = r.props.value, { ariaPressed: s, ariaChecked:
|
|
195
|
+
const r = e, t = r.props.value, { ariaPressed: s, ariaChecked: N } = Ge(
|
|
187
196
|
n,
|
|
188
197
|
i,
|
|
189
198
|
t,
|
|
190
199
|
g
|
|
191
|
-
),
|
|
192
|
-
var l,
|
|
193
|
-
if (
|
|
200
|
+
), R = q === !0, u = r.props.disabled === !0, P = (p) => {
|
|
201
|
+
var l, z;
|
|
202
|
+
if (R) {
|
|
194
203
|
p.preventDefault(), p.stopPropagation();
|
|
195
204
|
return;
|
|
196
205
|
}
|
|
197
|
-
if ((
|
|
206
|
+
if ((z = (l = r.props).onClick) == null || z.call(l, p), !p.defaultPrevented && t) {
|
|
198
207
|
if (n === "toggle-single") {
|
|
199
208
|
if (g === t) return;
|
|
200
|
-
|
|
209
|
+
I(t);
|
|
201
210
|
} else if (n === "toggle-multi") {
|
|
202
|
-
const
|
|
203
|
-
|
|
211
|
+
const U = g, ze = U.includes(t) ? U.filter((Fe) => Fe !== t) : [...U, t];
|
|
212
|
+
I(ze);
|
|
204
213
|
}
|
|
205
214
|
}
|
|
206
215
|
}, f = (p) => {
|
|
207
216
|
te(o, p);
|
|
208
217
|
const l = r.ref;
|
|
209
218
|
typeof l == "function" ? l(p) : l != null && typeof l == "object" && (l.current = p);
|
|
210
|
-
},
|
|
219
|
+
}, j = R && !u ? !0 : void 0, Ne = n !== "momentary" || R, je = {
|
|
211
220
|
intent: r.props.intent ?? S,
|
|
212
221
|
size: r.props.size ?? m,
|
|
213
|
-
disabled:
|
|
214
|
-
"aria-disabled":
|
|
215
|
-
onClick:
|
|
222
|
+
disabled: u,
|
|
223
|
+
"aria-disabled": j,
|
|
224
|
+
onClick: Ne ? P : r.props.onClick,
|
|
216
225
|
"aria-pressed": s,
|
|
217
|
-
"aria-checked":
|
|
226
|
+
"aria-checked": N,
|
|
218
227
|
// When the group is a radiogroup, children must be `role="radio"`
|
|
219
228
|
// so screen readers announce them as radio buttons and so
|
|
220
229
|
// `getByRole('radio')` works in tests. The button element is
|
|
221
230
|
// re-purposed as a radio; `aria-checked` above carries the state.
|
|
222
231
|
role: i === "radiogroup" ? "radio" : void 0,
|
|
223
|
-
tabIndex: b ? o ===
|
|
232
|
+
tabIndex: b ? o === de ? 0 : -1 : void 0,
|
|
224
233
|
onFocus: (p) => {
|
|
225
|
-
var l,
|
|
226
|
-
b &&
|
|
234
|
+
var l, z;
|
|
235
|
+
b && A(o), (z = (l = r.props).onFocus) == null || z.call(l, p);
|
|
227
236
|
},
|
|
228
237
|
ref: f
|
|
229
238
|
};
|
|
230
|
-
return
|
|
231
|
-
}),
|
|
232
|
-
re.current = e, typeof
|
|
239
|
+
return ye(r, je);
|
|
240
|
+
}), ue = (e) => {
|
|
241
|
+
re.current = e, typeof y == "function" ? y(e) : y && typeof y == "object" && (y.current = e);
|
|
233
242
|
};
|
|
234
|
-
if (!
|
|
243
|
+
if (!h)
|
|
235
244
|
return /* @__PURE__ */ a(
|
|
236
245
|
"div",
|
|
237
246
|
{
|
|
238
|
-
ref:
|
|
247
|
+
ref: ue,
|
|
239
248
|
role: i,
|
|
240
249
|
"aria-label": X,
|
|
241
250
|
"aria-labelledby": Y,
|
|
242
|
-
"aria-orientation": i === "toolbar" ?
|
|
243
|
-
onKeyDown:
|
|
244
|
-
className:
|
|
251
|
+
"aria-orientation": i === "toolbar" ? c : void 0,
|
|
252
|
+
onKeyDown: M,
|
|
253
|
+
className: ke({ orientation: c, className: J }),
|
|
245
254
|
"data-component": "icon-button-group",
|
|
246
255
|
...Z,
|
|
247
|
-
children:
|
|
256
|
+
children: ce
|
|
248
257
|
}
|
|
249
258
|
);
|
|
250
|
-
const
|
|
251
|
-
let
|
|
252
|
-
n === "toggle-single" ?
|
|
253
|
-
|
|
259
|
+
const fe = Re("buttonGroup.more", "More options"), L = q === !0, $ = D.map((e, o) => ({ childEl: e, i: o })).filter(({ i: e }) => !ne[e]);
|
|
260
|
+
let K = null;
|
|
261
|
+
n === "toggle-single" ? K = /* @__PURE__ */ a(
|
|
262
|
+
k.RadioGroup,
|
|
254
263
|
{
|
|
255
264
|
value: g,
|
|
256
265
|
onValueChange: (e) => {
|
|
257
|
-
!
|
|
266
|
+
!L && e !== g && I(e);
|
|
258
267
|
},
|
|
259
|
-
children:
|
|
260
|
-
|
|
268
|
+
children: $.map(({ childEl: e, i: o }) => /* @__PURE__ */ a(
|
|
269
|
+
k.RadioItem,
|
|
261
270
|
{
|
|
262
271
|
value: e.props.value ?? "",
|
|
263
|
-
disabled:
|
|
272
|
+
disabled: L || e.props.disabled === !0,
|
|
264
273
|
children: B(e)
|
|
265
274
|
},
|
|
266
275
|
e.key ?? o
|
|
267
276
|
))
|
|
268
277
|
}
|
|
269
|
-
) : n === "toggle-multi" ?
|
|
278
|
+
) : n === "toggle-multi" ? K = $.map(({ childEl: e, i: o }) => {
|
|
270
279
|
const r = e.props.value, t = g, s = r ? t.includes(r) : !1;
|
|
271
280
|
return /* @__PURE__ */ a(
|
|
272
|
-
|
|
281
|
+
k.CheckboxItem,
|
|
273
282
|
{
|
|
274
283
|
checked: s,
|
|
275
|
-
disabled:
|
|
284
|
+
disabled: L || e.props.disabled === !0,
|
|
276
285
|
onCheckedChange: () => {
|
|
277
|
-
|
|
286
|
+
L || !r || I(s ? t.filter((N) => N !== r) : [...t, r]);
|
|
278
287
|
},
|
|
279
288
|
children: B(e)
|
|
280
289
|
},
|
|
281
290
|
e.key ?? o
|
|
282
291
|
);
|
|
283
|
-
}) :
|
|
284
|
-
|
|
292
|
+
}) : K = $.map(({ childEl: e, i: o }) => /* @__PURE__ */ a(
|
|
293
|
+
k.Item,
|
|
285
294
|
{
|
|
286
295
|
startIcon: e.props.icon,
|
|
287
|
-
disabled:
|
|
296
|
+
disabled: L || e.props.disabled === !0,
|
|
288
297
|
onSelect: (r) => {
|
|
289
298
|
var t, s;
|
|
290
299
|
(s = (t = e.props).onClick) == null || s.call(
|
|
@@ -296,57 +305,57 @@ const ye = ze(
|
|
|
296
305
|
},
|
|
297
306
|
e.key ?? o
|
|
298
307
|
));
|
|
299
|
-
const
|
|
300
|
-
/* @__PURE__ */ a(
|
|
301
|
-
|
|
308
|
+
const pe = V ? /* @__PURE__ */ T(k.Root, { children: [
|
|
309
|
+
/* @__PURE__ */ a(k.Trigger, { asChild: !0, children: /* @__PURE__ */ a(
|
|
310
|
+
he,
|
|
302
311
|
{
|
|
303
|
-
icon: /* @__PURE__ */ a(
|
|
312
|
+
icon: /* @__PURE__ */ a(we, {}),
|
|
304
313
|
intent: S,
|
|
305
314
|
size: m,
|
|
306
|
-
"aria-label":
|
|
315
|
+
"aria-label": fe,
|
|
307
316
|
ref: (e) => {
|
|
308
|
-
ie.current = e, te(
|
|
317
|
+
ie.current = e, te(C, e);
|
|
309
318
|
},
|
|
310
|
-
tabIndex: b ?
|
|
311
|
-
onFocus: b ? () =>
|
|
319
|
+
tabIndex: b ? de === C ? 0 : -1 : void 0,
|
|
320
|
+
onFocus: b ? () => A(C) : void 0
|
|
312
321
|
}
|
|
313
322
|
) }),
|
|
314
|
-
/* @__PURE__ */ a(
|
|
315
|
-
] }) : null,
|
|
323
|
+
/* @__PURE__ */ a(k.Content, { align: "end", children: K })
|
|
324
|
+
] }) : null, ge = ke({ orientation: c }), E = i !== "radiogroup", me = /* @__PURE__ */ T(
|
|
316
325
|
"div",
|
|
317
326
|
{
|
|
318
327
|
role: i,
|
|
319
328
|
"aria-label": X,
|
|
320
329
|
"aria-labelledby": Y,
|
|
321
|
-
"aria-orientation": i === "toolbar" ?
|
|
322
|
-
onKeyDown:
|
|
323
|
-
className: `${
|
|
330
|
+
"aria-orientation": i === "toolbar" ? c : void 0,
|
|
331
|
+
onKeyDown: E ? M : void 0,
|
|
332
|
+
className: `${ge} ds:max-w-full`,
|
|
324
333
|
children: [
|
|
325
|
-
|
|
326
|
-
|
|
334
|
+
ce,
|
|
335
|
+
E ? pe : null
|
|
327
336
|
]
|
|
328
337
|
}
|
|
329
338
|
);
|
|
330
339
|
return /* @__PURE__ */ a(
|
|
331
340
|
"div",
|
|
332
341
|
{
|
|
333
|
-
ref:
|
|
342
|
+
ref: ue,
|
|
334
343
|
"data-component": "icon-button-group",
|
|
335
344
|
className: [
|
|
336
345
|
"ds:relative ds:block ds:w-full ds:min-w-0 ds:overflow-x-clip",
|
|
337
346
|
J ?? ""
|
|
338
347
|
].join(" ").trim(),
|
|
339
348
|
...Z,
|
|
340
|
-
children: /* @__PURE__ */
|
|
349
|
+
children: /* @__PURE__ */ T("div", { ref: De, className: "ds:block ds:w-full ds:min-w-0", children: [
|
|
341
350
|
/* @__PURE__ */ a(
|
|
342
351
|
"div",
|
|
343
352
|
{
|
|
344
|
-
ref:
|
|
353
|
+
ref: Ve,
|
|
345
354
|
"aria-hidden": "true",
|
|
346
355
|
inert: !0,
|
|
347
|
-
className: `${
|
|
348
|
-
children:
|
|
349
|
-
(e, o) =>
|
|
356
|
+
className: `${Ie} ${ge}`,
|
|
357
|
+
children: D.map(
|
|
358
|
+
(e, o) => ye(e, {
|
|
350
359
|
key: e.key ?? o,
|
|
351
360
|
intent: e.props.intent ?? S,
|
|
352
361
|
size: e.props.size ?? m,
|
|
@@ -359,32 +368,32 @@ const ye = ze(
|
|
|
359
368
|
/* @__PURE__ */ a(
|
|
360
369
|
"span",
|
|
361
370
|
{
|
|
362
|
-
ref:
|
|
371
|
+
ref: Le,
|
|
363
372
|
"aria-hidden": "true",
|
|
364
373
|
inert: !0,
|
|
365
|
-
className:
|
|
374
|
+
className: Ie,
|
|
366
375
|
children: /* @__PURE__ */ a(
|
|
367
|
-
|
|
376
|
+
he,
|
|
368
377
|
{
|
|
369
|
-
icon: /* @__PURE__ */ a(
|
|
378
|
+
icon: /* @__PURE__ */ a(we, {}),
|
|
370
379
|
intent: S,
|
|
371
380
|
size: m,
|
|
372
|
-
"aria-label":
|
|
381
|
+
"aria-label": fe,
|
|
373
382
|
tabIndex: -1
|
|
374
383
|
}
|
|
375
384
|
)
|
|
376
385
|
}
|
|
377
386
|
),
|
|
378
|
-
|
|
387
|
+
E ? me : (
|
|
379
388
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions -- non-focusable wrapper; arrow-key roving bubbles up from the focusable IconButtons in the strip and the overflow trigger
|
|
380
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ T(
|
|
381
390
|
"div",
|
|
382
391
|
{
|
|
383
392
|
className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
384
|
-
onKeyDown:
|
|
393
|
+
onKeyDown: M,
|
|
385
394
|
children: [
|
|
386
|
-
|
|
387
|
-
|
|
395
|
+
me,
|
|
396
|
+
pe
|
|
388
397
|
]
|
|
389
398
|
}
|
|
390
399
|
)
|
|
@@ -394,13 +403,13 @@ const ye = ze(
|
|
|
394
403
|
);
|
|
395
404
|
}
|
|
396
405
|
);
|
|
397
|
-
|
|
398
|
-
function
|
|
406
|
+
_e.displayName = "IconButtonGroup";
|
|
407
|
+
function Ge(d, y, m, c) {
|
|
399
408
|
if (d === "momentary" || !m) return {};
|
|
400
|
-
const i = d === "toggle-multi" ?
|
|
401
|
-
return
|
|
409
|
+
const i = d === "toggle-multi" ? c.includes(m) : c === m;
|
|
410
|
+
return y === "radiogroup" ? { ariaChecked: i } : { ariaPressed: i };
|
|
402
411
|
}
|
|
403
412
|
export {
|
|
404
|
-
|
|
413
|
+
_e as I
|
|
405
414
|
};
|
|
406
|
-
//# sourceMappingURL=icon-button-group-
|
|
415
|
+
//# sourceMappingURL=icon-button-group-VCCod3Hz.js.map
|