@alfadocs/ui-kit 1.147.1 → 1.148.0
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/{appointment-details-panel.history-eqPMKmW0.js → appointment-details-panel.history-BxNqcA-r.js} +109 -110
- package/dist/_chunks/{appointment-timeline-D5qbZ7in.js → appointment-timeline-CuZW-CGT.js} +2 -2
- package/dist/_chunks/{bill-line-table-DnkFqMnM.js → bill-line-table-B8Cc2pTH.js} +2 -2
- package/dist/_chunks/button-group-CHQD8GJ0.js +449 -0
- package/dist/_chunks/{calendar-appointment-editor-dialog-sY-k0GGW.js → calendar-appointment-editor-dialog-Cz8F2H4M.js} +6 -6
- package/dist/_chunks/{calendar-waiting-list-panel-Bm7NAZdk.js → calendar-waiting-list-panel-C4T85b4q.js} +3 -3
- package/dist/_chunks/{calendar.sheets-CCvdZF-R.js → calendar.sheets-DsgPdycU.js} +4 -4
- package/dist/_chunks/{data-grid-CujX-2tF.js → data-grid-CkzbCZSo.js} +486 -476
- package/dist/_chunks/{default-tabs-CqP1uWdx.js → default-tabs-C45FVzsG.js} +3 -3
- package/dist/_chunks/editable-description-BsSjLnSx.js +193 -0
- package/dist/_chunks/{editable-description.agent-Bm_LBV2j.js → editable-description.agent-zyyR_hxB.js} +2 -2
- package/dist/_chunks/{face-scheme-ByYeboH9.js → face-scheme-BC2whb1S.js} +2 -2
- package/dist/_chunks/{invoice-upload-list-srvWy5_d.js → invoice-upload-list-BReimsvV.js} +3 -3
- package/dist/_chunks/{notes-panel-C9aB1Cma.js → notes-panel-BHMnLbEH.js} +2 -2
- package/dist/_chunks/prescription-history-CQuJmd4H.js +1846 -0
- package/dist/_chunks/{rich-text-editor-CJXc5GgH.js → rich-text-editor-BAcJq1PO.js} +445 -437
- package/dist/_chunks/{tasks-panel-DsjfS_k5.js → tasks-panel-DufAoAxG.js} +2 -2
- package/dist/_chunks/{toolbar-z_6tE7zG.js → toolbar-B9oh9XY9.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-Dod21IxM.js → use-appointment-details-read-kYp-gfhb.js} +417 -422
- package/dist/agent-catalog.json +2 -2
- package/dist/appointment-editor-panel/index.js +1 -1
- package/dist/browser-support.js +1 -1
- package/dist/calendar-action-buttons/index.js +1 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.history.d.ts +4 -6
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/bill-line-table/index.js +1 -1
- package/dist/components/bill-table/index.js +1 -1
- package/dist/components/button-group/button-group.d.ts +2 -1
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/data-grid/data-grid.variants.d.ts +7 -1
- package/dist/components/data-grid/index.js +2 -2
- package/dist/components/editable-description/editable-description.d.ts +2 -1
- package/dist/components/editable-description/index.js +2 -2
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/invoice-upload-list/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/find-free-slots-panel/index.js +1 -1
- package/dist/host-compat.css +7 -1
- package/dist/i18n/locales/ar.d.ts +0 -1
- package/dist/i18n/locales/ar.js +1 -2
- package/dist/i18n/locales/de.d.ts +0 -1
- package/dist/i18n/locales/de.js +1 -2
- package/dist/i18n/locales/el.d.ts +0 -1
- package/dist/i18n/locales/el.js +1 -2
- package/dist/i18n/locales/en.d.ts +0 -1
- package/dist/i18n/locales/en.js +1 -2
- package/dist/i18n/locales/es.d.ts +0 -1
- package/dist/i18n/locales/es.js +1 -2
- package/dist/i18n/locales/fr.d.ts +0 -1
- package/dist/i18n/locales/fr.js +1 -2
- package/dist/i18n/locales/hi.d.ts +0 -1
- package/dist/i18n/locales/hi.js +1 -2
- package/dist/i18n/locales/it.d.ts +0 -1
- package/dist/i18n/locales/it.js +1 -2
- package/dist/i18n/locales/ja.d.ts +0 -1
- package/dist/i18n/locales/ja.js +1 -2
- package/dist/i18n/locales/nl.d.ts +0 -1
- package/dist/i18n/locales/nl.js +1 -2
- package/dist/i18n/locales/pl.d.ts +0 -1
- package/dist/i18n/locales/pl.js +1 -2
- package/dist/i18n/locales/pt.d.ts +0 -1
- package/dist/i18n/locales/pt.js +1 -2
- package/dist/i18n/locales/ro.d.ts +0 -1
- package/dist/i18n/locales/ro.js +1 -2
- package/dist/i18n/locales/ru.d.ts +0 -1
- package/dist/i18n/locales/ru.js +1 -2
- package/dist/i18n/locales/sq.d.ts +0 -1
- package/dist/i18n/locales/sq.js +1 -2
- package/dist/i18n/locales/sv.d.ts +0 -1
- package/dist/i18n/locales/sv.js +1 -2
- package/dist/i18n/locales/tr.d.ts +0 -1
- package/dist/i18n/locales/tr.js +1 -2
- package/dist/i18n/locales/zh.d.ts +0 -1
- package/dist/i18n/locales/zh.js +1 -2
- package/dist/index.js +17 -17
- package/dist/locales/ar.json +1 -2
- package/dist/locales/de.json +1 -2
- package/dist/locales/el.json +1 -2
- package/dist/locales/en.json +1 -2
- package/dist/locales/es.json +1 -2
- package/dist/locales/fr.json +1 -2
- package/dist/locales/hi.json +1 -2
- package/dist/locales/it.json +1 -2
- package/dist/locales/ja.json +1 -2
- package/dist/locales/nl.json +1 -2
- package/dist/locales/pl.json +1 -2
- package/dist/locales/pt.json +1 -2
- package/dist/locales/ro.json +1 -2
- package/dist/locales/ru.json +1 -2
- package/dist/locales/sq.json +1 -2
- package/dist/locales/sv.json +1 -2
- package/dist/locales/tr.json +1 -2
- package/dist/locales/zh.json +1 -2
- package/dist/online-bookings-panel/index.js +1 -1
- package/dist/patterns/calendar/index.js +2 -2
- package/dist/patterns/prescription/index.d.ts +1 -1
- package/dist/patterns/prescription/index.js +1 -1
- package/dist/patterns/prescription/prescription-history.d.ts +28 -0
- package/dist/tokens.css +1 -1
- package/dist/waiting-list-panel/index.js +2 -2
- package/package.json +1 -1
- package/dist/_chunks/button-group-N60L3HMa.js +0 -408
- package/dist/_chunks/editable-description-BQauSuCG.js +0 -142
- package/dist/_chunks/prescription-history-CFs3JMIE.js +0 -1773
|
@@ -4,8 +4,8 @@ import { useTranslation as K } from "react-i18next";
|
|
|
4
4
|
import { d as s, b as L } from "../_chunks/toast-Cgmh1cvj.js";
|
|
5
5
|
import { a as M } from "../_chunks/tooltip-uEBdD1-5.js";
|
|
6
6
|
import { C as Q } from "../_chunks/calendar-editor-guard-9fShhNIA.js";
|
|
7
|
-
import { S as V } from "../_chunks/calendar.sheets-
|
|
8
|
-
import { W as X } from "../_chunks/calendar-waiting-list-panel-
|
|
7
|
+
import { S as V } from "../_chunks/calendar.sheets-DsgPdycU.js";
|
|
8
|
+
import { W as X } from "../_chunks/calendar-waiting-list-panel-C4T85b4q.js";
|
|
9
9
|
import { P as Y } from "../_chunks/privacy-mask-zVh0ntm0.js";
|
|
10
10
|
import { H as Z } from "../_chunks/hourglass-BEAzW1wE.js";
|
|
11
11
|
const q = { open: () => {
|
package/package.json
CHANGED
|
@@ -1,408 +0,0 @@
|
|
|
1
|
-
import { jsx as a, jsxs as S } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as Se, useRef as L, useState as pe, useCallback as j, Children as M, isValidElement as P, useEffect as Le, cloneElement as B } from "react";
|
|
3
|
-
import { c as Ae } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as Te } from "react-i18next";
|
|
5
|
-
import { I as ce } from "./icon-button-u9VMQn3x.js";
|
|
6
|
-
import { D as d } from "./dropdown-menu-Bm1KALnk.js";
|
|
7
|
-
import { T as $e } from "./tooltip-uEBdD1-5.js";
|
|
8
|
-
import { u as Fe } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
9
|
-
import { u as Ne } from "./use-priority-overflow-Cdmb5EiR.js";
|
|
10
|
-
import { E as de } from "./ellipsis-dRo9ouSU.js";
|
|
11
|
-
function _(y) {
|
|
12
|
-
y && (y.inert = !0);
|
|
13
|
-
}
|
|
14
|
-
const fe = Ae(
|
|
15
|
-
"ds:inline-flex ds:isolate ds:[&>*]:relative ds:[&>*:focus-visible]:z-10",
|
|
16
|
-
{
|
|
17
|
-
variants: {
|
|
18
|
-
orientation: {
|
|
19
|
-
horizontal: [
|
|
20
|
-
"ds:flex-row",
|
|
21
|
-
"ds:[&>*:not(:first-child)]:rounded-s-none",
|
|
22
|
-
"ds:[&>*:not(:last-child)]:rounded-e-none",
|
|
23
|
-
"ds:[&>*:not(:first-child)]:-ms-px"
|
|
24
|
-
].join(" "),
|
|
25
|
-
vertical: [
|
|
26
|
-
"ds:flex-col",
|
|
27
|
-
"ds:[&>*:not(:first-child)]:rounded-t-none",
|
|
28
|
-
"ds:[&>*:not(:last-child)]:rounded-b-none",
|
|
29
|
-
"ds:[&>*:not(:first-child)]:-mt-px"
|
|
30
|
-
].join(" ")
|
|
31
|
-
},
|
|
32
|
-
separator: {
|
|
33
|
-
true: "",
|
|
34
|
-
false: ""
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
compoundVariants: [
|
|
38
|
-
{
|
|
39
|
-
orientation: "horizontal",
|
|
40
|
-
separator: !0,
|
|
41
|
-
class: "ds:[&>*:not(:last-child)]:border-e ds:[&>*:not(:last-child)]:border-border"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
orientation: "vertical",
|
|
45
|
-
separator: !0,
|
|
46
|
-
class: "ds:[&>*:not(:last-child)]:border-b ds:[&>*:not(:last-child)]:border-border"
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
defaultVariants: {
|
|
50
|
-
orientation: "horizontal",
|
|
51
|
-
separator: !1
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
), U = "ds:absolute ds:start-0 ds:top-0 ds:invisible ds:pointer-events-none", je = Se(
|
|
55
|
-
({
|
|
56
|
-
className: y,
|
|
57
|
-
orientation: g = "horizontal",
|
|
58
|
-
separator: q = !1,
|
|
59
|
-
toolbar: k = !1,
|
|
60
|
-
intent: I = "outline",
|
|
61
|
-
background: h = "transparent",
|
|
62
|
-
size: f,
|
|
63
|
-
label: be,
|
|
64
|
-
overflow: me = "none",
|
|
65
|
-
collapseToIcons: D = !1,
|
|
66
|
-
children: z,
|
|
67
|
-
...H
|
|
68
|
-
}, R) => {
|
|
69
|
-
const { t: G } = Te("ui"), W = be ?? G("buttonGroup.label", "Button group"), J = G("buttonGroup.more", "More options"), we = G("link.opensInNewTab", "Opens in a new tab"), b = me === "menu" && g !== "vertical", m = k, v = L([]), [w, x] = pe(0), Q = L(null), [K, ge] = pe(!1);
|
|
70
|
-
Fe(() => {
|
|
71
|
-
if (typeof window > "u") return;
|
|
72
|
-
const t = Q.current;
|
|
73
|
-
t && ge(window.getComputedStyle(t).direction === "rtl");
|
|
74
|
-
}, []);
|
|
75
|
-
const X = j(
|
|
76
|
-
(t) => {
|
|
77
|
-
var s;
|
|
78
|
-
if (!m) return;
|
|
79
|
-
const e = v.current.filter(Boolean).length;
|
|
80
|
-
if (e === 0) return;
|
|
81
|
-
const n = g === "vertical" ? "ArrowDown" : K ? "ArrowLeft" : "ArrowRight", o = g === "vertical" ? "ArrowUp" : K ? "ArrowRight" : "ArrowLeft";
|
|
82
|
-
let r = null;
|
|
83
|
-
if (t.key === n ? r = (w + 1) % e : t.key === o ? r = (w - 1 + e) % e : t.key === "Home" ? r = 0 : t.key === "End" && (r = e - 1), r === null) return;
|
|
84
|
-
const i = e;
|
|
85
|
-
let l = 0, u = r;
|
|
86
|
-
for (; l < i; ) {
|
|
87
|
-
const p = v.current[u];
|
|
88
|
-
if (p && p.getAttribute("aria-disabled") !== "true" && !p.disabled)
|
|
89
|
-
break;
|
|
90
|
-
u = t.key === o || t.key === "End" ? (u - 1 + e) % e : (u + 1) % e, l += 1;
|
|
91
|
-
}
|
|
92
|
-
t.preventDefault(), x(u), (s = v.current[u]) == null || s.focus();
|
|
93
|
-
},
|
|
94
|
-
[m, g, K, w]
|
|
95
|
-
), c = b ? M.toArray(z).filter(P) : [], A = (t) => {
|
|
96
|
-
const e = t.props.children;
|
|
97
|
-
return !t.props.asChild || !P(e) || typeof e.props.href != "string" ? null : {
|
|
98
|
-
label: typeof e.props.children == "string" ? e.props.children : typeof e.props["aria-label"] == "string" ? e.props["aria-label"] : null,
|
|
99
|
-
element: e,
|
|
100
|
-
newTab: e.props.target === "_blank"
|
|
101
|
-
};
|
|
102
|
-
}, T = (t) => {
|
|
103
|
-
var n;
|
|
104
|
-
if (typeof t.props.children == "string") return t.props.children;
|
|
105
|
-
const e = t.props["aria-label"];
|
|
106
|
-
return typeof e == "string" ? e : ((n = A(t)) == null ? void 0 : n.label) ?? null;
|
|
107
|
-
};
|
|
108
|
-
L(!1);
|
|
109
|
-
const Y = c.map(
|
|
110
|
-
(t) => T(t) !== null
|
|
111
|
-
), ve = c.map((t, e) => {
|
|
112
|
-
var u;
|
|
113
|
-
const { props: n } = t, o = (((u = n.overflowItems) == null ? void 0 : u.length) ?? 0) > 0, r = typeof n.onClick == "function" || A(t) !== null || o, i = n["aria-haspopup"], l = n["aria-expanded"] !== void 0 || n["aria-pressed"] !== void 0 || i !== void 0 && i !== !1 && i !== "false" && !o;
|
|
114
|
-
return Y[e] && r && !l && n["data-overflow-pin"] !== "always";
|
|
115
|
-
}), ye = c.map((t, e) => {
|
|
116
|
-
const n = t.props["data-overflow-pin"] !== void 0, o = Y[e];
|
|
117
|
-
return n || !o;
|
|
118
|
-
}), {
|
|
119
|
-
containerRef: ke,
|
|
120
|
-
fullRowRef: Z,
|
|
121
|
-
iconRowRef: E,
|
|
122
|
-
triggerProbeRef: ee,
|
|
123
|
-
stage: Ie,
|
|
124
|
-
visible: $,
|
|
125
|
-
overflowing: F
|
|
126
|
-
} = Ne({
|
|
127
|
-
enabled: b,
|
|
128
|
-
count: c.length,
|
|
129
|
-
twoStage: D,
|
|
130
|
-
pinned: ye,
|
|
131
|
-
movable: ve
|
|
132
|
-
}), he = j(
|
|
133
|
-
(t) => {
|
|
134
|
-
_(t), Z(t);
|
|
135
|
-
},
|
|
136
|
-
[Z]
|
|
137
|
-
), Re = j(
|
|
138
|
-
(t) => {
|
|
139
|
-
_(t), E(t);
|
|
140
|
-
},
|
|
141
|
-
[E]
|
|
142
|
-
), xe = j(
|
|
143
|
-
(t) => {
|
|
144
|
-
_(t), ee(t);
|
|
145
|
-
},
|
|
146
|
-
[ee]
|
|
147
|
-
), te = L(null), ne = L(null), N = b ? $.filter(Boolean).length : M.count(z);
|
|
148
|
-
Le(() => {
|
|
149
|
-
var e;
|
|
150
|
-
if (!m || !b) return;
|
|
151
|
-
const t = N + (F ? 1 : 0);
|
|
152
|
-
t > 0 && w >= t && (x(t - 1), document.activeElement === document.body && ((e = te.current) == null || e.focus()));
|
|
153
|
-
}, [
|
|
154
|
-
m,
|
|
155
|
-
b,
|
|
156
|
-
N,
|
|
157
|
-
F,
|
|
158
|
-
w
|
|
159
|
-
]);
|
|
160
|
-
const oe = (t, e) => (n) => {
|
|
161
|
-
v.current[e] = n;
|
|
162
|
-
const o = t.ref;
|
|
163
|
-
typeof o == "function" ? o(n) : o != null && typeof o == "object" && (o.current = n);
|
|
164
|
-
}, Ce = b ? null : M.map(z, (t, e) => {
|
|
165
|
-
if (!P(t)) return t;
|
|
166
|
-
const n = t, o = {
|
|
167
|
-
intent: n.props.intent ?? I,
|
|
168
|
-
background: n.props.background ?? h,
|
|
169
|
-
...f ? { size: n.props.size ?? f } : null
|
|
170
|
-
};
|
|
171
|
-
return m && (o.tabIndex = e === w ? 0 : -1, o.onFocus = (r) => {
|
|
172
|
-
var i, l;
|
|
173
|
-
x(e), (l = (i = n.props).onFocus) == null || l.call(i, r);
|
|
174
|
-
}, o.ref = oe(n, e)), B(
|
|
175
|
-
n,
|
|
176
|
-
o
|
|
177
|
-
);
|
|
178
|
-
});
|
|
179
|
-
let re = null, se = null, ae = null;
|
|
180
|
-
if (b) {
|
|
181
|
-
v.current.length = N + (F ? 1 : 0);
|
|
182
|
-
let t = -1;
|
|
183
|
-
re = c.map((e, n) => {
|
|
184
|
-
if (!$[n]) return null;
|
|
185
|
-
t += 1;
|
|
186
|
-
const o = t, r = {
|
|
187
|
-
intent: e.props.intent ?? I,
|
|
188
|
-
background: e.props.background ?? h,
|
|
189
|
-
...f ? { size: e.props.size ?? f } : null
|
|
190
|
-
};
|
|
191
|
-
D && Ie === "icons" && e.props.children && (e.props.startIcon || e.props.endIcon) && (r.hideLabel = !0), m && (r.tabIndex = o === w ? 0 : -1, r.onFocus = (p) => {
|
|
192
|
-
var C, ue;
|
|
193
|
-
x(o), (ue = (C = e.props).onFocus) == null || ue.call(C, p);
|
|
194
|
-
}, r.ref = oe(e, o));
|
|
195
|
-
const i = r.hideLabel === !0, l = B(
|
|
196
|
-
e,
|
|
197
|
-
r
|
|
198
|
-
), u = e.props["data-overflow-tip"] === !1 || e.props["data-overflow-tip"] === "false", s = i && !u ? T(e) : null;
|
|
199
|
-
return s ? /* @__PURE__ */ a($e, { label: s, children: l }, e.key ?? n) : l;
|
|
200
|
-
}), se = c.map((e, n) => {
|
|
201
|
-
if ($[n]) return null;
|
|
202
|
-
const o = T(e);
|
|
203
|
-
if (o === null) return null;
|
|
204
|
-
const r = e.props.disabled === !0 || e.props.loading === !0, i = e.props["data-action"], l = e.props.overflowItems;
|
|
205
|
-
if (l && l.length > 0)
|
|
206
|
-
return /* @__PURE__ */ S(d.Sub, { children: [
|
|
207
|
-
/* @__PURE__ */ a(
|
|
208
|
-
d.SubTrigger,
|
|
209
|
-
{
|
|
210
|
-
startIcon: e.props.startIcon,
|
|
211
|
-
disabled: r,
|
|
212
|
-
"data-action": i,
|
|
213
|
-
children: o
|
|
214
|
-
}
|
|
215
|
-
),
|
|
216
|
-
/* @__PURE__ */ a(d.SubContent, { children: l.map((s, p) => /* @__PURE__ */ a(
|
|
217
|
-
d.Item,
|
|
218
|
-
{
|
|
219
|
-
startIcon: s.icon,
|
|
220
|
-
disabled: s.disabled,
|
|
221
|
-
"data-action": s.action,
|
|
222
|
-
onSelect: () => s.onSelect(),
|
|
223
|
-
children: s.label
|
|
224
|
-
},
|
|
225
|
-
`${p}-${s.label}`
|
|
226
|
-
)) })
|
|
227
|
-
] }, e.key ?? n);
|
|
228
|
-
const u = A(e);
|
|
229
|
-
return u ? /* @__PURE__ */ a(
|
|
230
|
-
d.Item,
|
|
231
|
-
{
|
|
232
|
-
startIcon: e.props.startIcon,
|
|
233
|
-
disabled: r,
|
|
234
|
-
"data-action": i,
|
|
235
|
-
"aria-label": u.newTab ? `${o}, ${we}` : void 0,
|
|
236
|
-
onSelect: () => {
|
|
237
|
-
var s, p;
|
|
238
|
-
(p = (s = ne.current) == null ? void 0 : s.querySelector(
|
|
239
|
-
`[data-link-index="${n}"] [href]`
|
|
240
|
-
)) == null || p.click();
|
|
241
|
-
},
|
|
242
|
-
children: o
|
|
243
|
-
},
|
|
244
|
-
e.key ?? n
|
|
245
|
-
) : /* @__PURE__ */ a(
|
|
246
|
-
d.Item,
|
|
247
|
-
{
|
|
248
|
-
startIcon: e.props.startIcon,
|
|
249
|
-
disabled: r,
|
|
250
|
-
"data-action": i,
|
|
251
|
-
onSelect: (s) => {
|
|
252
|
-
var p, C;
|
|
253
|
-
(C = (p = e.props).onClick) == null || C.call(
|
|
254
|
-
p,
|
|
255
|
-
s
|
|
256
|
-
);
|
|
257
|
-
},
|
|
258
|
-
children: o
|
|
259
|
-
},
|
|
260
|
-
e.key ?? n
|
|
261
|
-
);
|
|
262
|
-
}), ae = c.map((e, n) => {
|
|
263
|
-
var i;
|
|
264
|
-
if ($[n] || T(e) === null) return null;
|
|
265
|
-
const o = A(e);
|
|
266
|
-
if (!o || (((i = e.props.overflowItems) == null ? void 0 : i.length) ?? 0) > 0)
|
|
267
|
-
return null;
|
|
268
|
-
const r = o.element.props.onClick;
|
|
269
|
-
return /* @__PURE__ */ a("span", { "data-link-index": n, children: B(o.element, {
|
|
270
|
-
onClick: (l) => {
|
|
271
|
-
var u, s;
|
|
272
|
-
typeof r == "function" && r(l), (s = (u = e.props).onClick) == null || s.call(
|
|
273
|
-
u,
|
|
274
|
-
l
|
|
275
|
-
);
|
|
276
|
-
},
|
|
277
|
-
/* No query may land on this hidden copy. */
|
|
278
|
-
id: void 0,
|
|
279
|
-
"data-action": void 0
|
|
280
|
-
}) }, e.key ?? n);
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
const ie = (t) => {
|
|
284
|
-
Q.current = t, typeof R == "function" ? R(t) : R && typeof R == "object" && (R.current = t);
|
|
285
|
-
};
|
|
286
|
-
if (!b)
|
|
287
|
-
return /* @__PURE__ */ a(
|
|
288
|
-
"div",
|
|
289
|
-
{
|
|
290
|
-
ref: ie,
|
|
291
|
-
role: k ? "toolbar" : "group",
|
|
292
|
-
"aria-label": W,
|
|
293
|
-
"aria-orientation": k ? g ?? "horizontal" : void 0,
|
|
294
|
-
"data-component": "button-group",
|
|
295
|
-
onKeyDown: X,
|
|
296
|
-
className: fe({ orientation: g, separator: q, className: y }),
|
|
297
|
-
...H,
|
|
298
|
-
children: Ce
|
|
299
|
-
}
|
|
300
|
-
);
|
|
301
|
-
const O = fe({ orientation: g, separator: q }), V = N, le = (t, e, n) => B(t, {
|
|
302
|
-
key: t.key ?? e,
|
|
303
|
-
intent: t.props.intent ?? I,
|
|
304
|
-
background: t.props.background ?? h,
|
|
305
|
-
...f ? { size: t.props.size ?? f } : null,
|
|
306
|
-
tabIndex: -1,
|
|
307
|
-
// Same rule as the live strip: icon-only children never hideLabel.
|
|
308
|
-
...n && t.props.children && (t.props.startIcon || t.props.endIcon) ? { hideLabel: !0 } : null,
|
|
309
|
-
/* The hook belongs to the live child alone: a query for it must
|
|
310
|
-
never land on an inert copy. */
|
|
311
|
-
"data-action": void 0,
|
|
312
|
-
ref: null
|
|
313
|
-
});
|
|
314
|
-
return /* @__PURE__ */ a(
|
|
315
|
-
"div",
|
|
316
|
-
{
|
|
317
|
-
ref: ie,
|
|
318
|
-
"data-component": "button-group",
|
|
319
|
-
className: [
|
|
320
|
-
"ds:relative ds:block ds:w-full ds:min-w-0 ds:overflow-x-clip",
|
|
321
|
-
y ?? ""
|
|
322
|
-
].join(" ").trim(),
|
|
323
|
-
...H,
|
|
324
|
-
children: /* @__PURE__ */ S("div", { ref: ke, className: "ds:block ds:w-full ds:min-w-0", children: [
|
|
325
|
-
/* @__PURE__ */ a(
|
|
326
|
-
"div",
|
|
327
|
-
{
|
|
328
|
-
ref: he,
|
|
329
|
-
"aria-hidden": "true",
|
|
330
|
-
inert: !0,
|
|
331
|
-
className: `${U} ${O}`,
|
|
332
|
-
children: c.map((t, e) => le(t, e, !1))
|
|
333
|
-
}
|
|
334
|
-
),
|
|
335
|
-
D ? /* @__PURE__ */ a(
|
|
336
|
-
"div",
|
|
337
|
-
{
|
|
338
|
-
ref: Re,
|
|
339
|
-
"aria-hidden": "true",
|
|
340
|
-
inert: !0,
|
|
341
|
-
className: `${U} ${O}`,
|
|
342
|
-
children: c.map((t, e) => le(t, e, !0))
|
|
343
|
-
}
|
|
344
|
-
) : null,
|
|
345
|
-
/* @__PURE__ */ a(
|
|
346
|
-
"span",
|
|
347
|
-
{
|
|
348
|
-
ref: xe,
|
|
349
|
-
"aria-hidden": "true",
|
|
350
|
-
inert: !0,
|
|
351
|
-
className: U,
|
|
352
|
-
children: /* @__PURE__ */ a(
|
|
353
|
-
ce,
|
|
354
|
-
{
|
|
355
|
-
icon: /* @__PURE__ */ a(de, {}),
|
|
356
|
-
intent: I,
|
|
357
|
-
background: h,
|
|
358
|
-
size: f,
|
|
359
|
-
"aria-label": J,
|
|
360
|
-
tabIndex: -1
|
|
361
|
-
}
|
|
362
|
-
)
|
|
363
|
-
}
|
|
364
|
-
),
|
|
365
|
-
/* @__PURE__ */ S(
|
|
366
|
-
"div",
|
|
367
|
-
{
|
|
368
|
-
role: k ? "toolbar" : "group",
|
|
369
|
-
"aria-label": W,
|
|
370
|
-
"aria-orientation": k ? "horizontal" : void 0,
|
|
371
|
-
onKeyDown: X,
|
|
372
|
-
className: `${O} ds:max-w-full ds:align-top ds:[&>[data-component=button]]:shrink ds:[&>[data-component=button]]:min-w-0`,
|
|
373
|
-
children: [
|
|
374
|
-
re,
|
|
375
|
-
F ? /* @__PURE__ */ S(d.Root, { children: [
|
|
376
|
-
/* @__PURE__ */ a(d.Trigger, { asChild: !0, children: /* @__PURE__ */ a(
|
|
377
|
-
ce,
|
|
378
|
-
{
|
|
379
|
-
icon: /* @__PURE__ */ a(de, {}),
|
|
380
|
-
intent: I,
|
|
381
|
-
background: h,
|
|
382
|
-
size: f,
|
|
383
|
-
"aria-label": J,
|
|
384
|
-
ref: (t) => {
|
|
385
|
-
te.current = t, v.current[V] = t;
|
|
386
|
-
},
|
|
387
|
-
tabIndex: m ? w === V ? 0 : -1 : void 0,
|
|
388
|
-
onFocus: m ? () => x(V) : void 0
|
|
389
|
-
}
|
|
390
|
-
) }),
|
|
391
|
-
/* @__PURE__ */ S(d.Content, { align: "end", children: [
|
|
392
|
-
se,
|
|
393
|
-
/* @__PURE__ */ a("div", { ref: ne, hidden: !0, children: ae })
|
|
394
|
-
] })
|
|
395
|
-
] }) : null
|
|
396
|
-
]
|
|
397
|
-
}
|
|
398
|
-
)
|
|
399
|
-
] })
|
|
400
|
-
}
|
|
401
|
-
);
|
|
402
|
-
}
|
|
403
|
-
);
|
|
404
|
-
je.displayName = "ButtonGroup";
|
|
405
|
-
export {
|
|
406
|
-
je as B
|
|
407
|
-
};
|
|
408
|
-
//# sourceMappingURL=button-group-N60L3HMa.js.map
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { jsx as s, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as z, useState as I, useRef as T, useMemo as V } from "react";
|
|
3
|
-
import { c as i } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as L } from "react-i18next";
|
|
5
|
-
import { B as M } from "./button-Dp4j9ygh.js";
|
|
6
|
-
import { I as _ } from "./icon-button-u9VMQn3x.js";
|
|
7
|
-
import { C as $, S as R } from "./skeleton-tTWJpvAq.js";
|
|
8
|
-
import { P as A } from "./pencil-B1sKKyuT.js";
|
|
9
|
-
const x = i(
|
|
10
|
-
"ds:flex ds:min-w-0 ds:items-start ds:gap-[var(--spacing-xs)]"
|
|
11
|
-
), b = i(
|
|
12
|
-
[
|
|
13
|
-
"ds:m-0 ds:flex ds:min-w-0 ds:flex-1 ds:list-none ds:flex-col ds:p-0",
|
|
14
|
-
"ds:gap-[var(--spacing-2xs)]"
|
|
15
|
-
].join(" ")
|
|
16
|
-
), O = ["80%", "60%", "66%"], P = i(
|
|
17
|
-
"ds:m-0 ds:min-w-0 ds:flex-1 type-body-sm ds:text-[color:var(--muted-foreground)]"
|
|
18
|
-
), v = i(
|
|
19
|
-
"ds:flex ds:items-start ds:gap-[var(--spacing-xs)] type-body-sm ds:text-[color:var(--foreground)]"
|
|
20
|
-
), N = i(
|
|
21
|
-
[
|
|
22
|
-
"ds:mt-[var(--spacing-sm)] ds:size-[var(--spacing-xs)] ds:shrink-0 ds:self-start",
|
|
23
|
-
"ds:rounded-[var(--radius-full)] ds:bg-[color:var(--border)]"
|
|
24
|
-
].join(" ")
|
|
25
|
-
), G = z(
|
|
26
|
-
({
|
|
27
|
-
value: c,
|
|
28
|
-
maxLines: r = 3,
|
|
29
|
-
loading: d = !1,
|
|
30
|
-
onEdit: m,
|
|
31
|
-
editButtonRef: y,
|
|
32
|
-
emptyLabel: w,
|
|
33
|
-
editLabel: D,
|
|
34
|
-
seeMoreLabel: E,
|
|
35
|
-
showLessLabel: k,
|
|
36
|
-
className: p,
|
|
37
|
-
...f
|
|
38
|
-
}, u) => {
|
|
39
|
-
const { t: n } = L("ui"), [o, C] = I(!1), h = T(!1);
|
|
40
|
-
d && (h.current = !0);
|
|
41
|
-
const j = h.current ? $ : "", a = V(
|
|
42
|
-
() => (c ?? "").split(/\r?\n/).map((e) => e.trim()).filter(Boolean),
|
|
43
|
-
[c]
|
|
44
|
-
), B = Math.max(0, a.length - r), S = o ? a : a.slice(0, r), g = D ?? n("editableDescription.edit");
|
|
45
|
-
return d && a.length === 0 ? /* @__PURE__ */ s(
|
|
46
|
-
"div",
|
|
47
|
-
{
|
|
48
|
-
...f,
|
|
49
|
-
ref: u,
|
|
50
|
-
"data-component": "editable-description",
|
|
51
|
-
"data-loading": "",
|
|
52
|
-
"aria-busy": "true",
|
|
53
|
-
className: [x(), p].filter(Boolean).join(" "),
|
|
54
|
-
children: /* @__PURE__ */ s("ul", { "aria-hidden": "true", className: b(), children: O.slice(0, Math.max(1, r)).map(
|
|
55
|
-
(e, l) => /* @__PURE__ */ t("li", { className: v(), children: [
|
|
56
|
-
/* @__PURE__ */ s("span", { className: N() }),
|
|
57
|
-
/* @__PURE__ */ s(
|
|
58
|
-
R,
|
|
59
|
-
{
|
|
60
|
-
variant: "text",
|
|
61
|
-
size: "sm",
|
|
62
|
-
stagger: l,
|
|
63
|
-
width: e,
|
|
64
|
-
className: "ds:mt-[var(--spacing-xs)]"
|
|
65
|
-
}
|
|
66
|
-
)
|
|
67
|
-
] }, e)
|
|
68
|
-
) })
|
|
69
|
-
}
|
|
70
|
-
) : /* @__PURE__ */ t(
|
|
71
|
-
"div",
|
|
72
|
-
{
|
|
73
|
-
...f,
|
|
74
|
-
ref: u,
|
|
75
|
-
"data-component": "editable-description",
|
|
76
|
-
"data-empty": a.length === 0 ? "" : void 0,
|
|
77
|
-
"aria-busy": d || void 0,
|
|
78
|
-
className: [x(), p].filter(Boolean).join(" "),
|
|
79
|
-
children: [
|
|
80
|
-
a.length === 0 ? /* @__PURE__ */ s("p", { "data-editable-description-empty": "", className: P(), children: w ?? n("editableDescription.empty") }) : /* @__PURE__ */ t("ul", { className: `${b()} ${j}`.trim(), children: [
|
|
81
|
-
S.map((e, l) => /* @__PURE__ */ t(
|
|
82
|
-
"li",
|
|
83
|
-
{
|
|
84
|
-
"data-editable-description-line": "",
|
|
85
|
-
className: v(),
|
|
86
|
-
children: [
|
|
87
|
-
/* @__PURE__ */ s("span", { "aria-hidden": "true", className: N() }),
|
|
88
|
-
/* @__PURE__ */ s("span", { className: "ds:min-w-0 ds:[overflow-wrap:anywhere]", children: e })
|
|
89
|
-
]
|
|
90
|
-
},
|
|
91
|
-
`${l}-${e}`
|
|
92
|
-
)),
|
|
93
|
-
B > 0 ? (
|
|
94
|
-
// An ITEM of the list, aligned with the text rather than the
|
|
95
|
-
// dots, so opening it does not shift the column.
|
|
96
|
-
/* @__PURE__ */ t("li", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-xs)]", children: [
|
|
97
|
-
/* @__PURE__ */ s(
|
|
98
|
-
"span",
|
|
99
|
-
{
|
|
100
|
-
"aria-hidden": "true",
|
|
101
|
-
className: "ds:size-[var(--spacing-xs)] ds:shrink-0"
|
|
102
|
-
}
|
|
103
|
-
),
|
|
104
|
-
/* @__PURE__ */ s(
|
|
105
|
-
M,
|
|
106
|
-
{
|
|
107
|
-
intent: "link",
|
|
108
|
-
size: "sm",
|
|
109
|
-
"data-editable-description-toggle": "",
|
|
110
|
-
className: "ds:!ps-0 ds:!pe-0",
|
|
111
|
-
"aria-expanded": o,
|
|
112
|
-
onClick: () => C((e) => !e),
|
|
113
|
-
children: o ? k ?? n("editableDescription.showLess") : E ?? n("editableDescription.seeMore")
|
|
114
|
-
}
|
|
115
|
-
)
|
|
116
|
-
] })
|
|
117
|
-
) : null
|
|
118
|
-
] }),
|
|
119
|
-
m ? /* @__PURE__ */ s(
|
|
120
|
-
_,
|
|
121
|
-
{
|
|
122
|
-
ref: y,
|
|
123
|
-
icon: /* @__PURE__ */ s(A, { "aria-hidden": "true" }),
|
|
124
|
-
intent: "ghost",
|
|
125
|
-
size: "sm",
|
|
126
|
-
className: "ds:-mt-[var(--spacing-sm)] ds:shrink-0",
|
|
127
|
-
"aria-label": g,
|
|
128
|
-
tooltip: g,
|
|
129
|
-
"data-editable-description-edit": "",
|
|
130
|
-
onClick: m
|
|
131
|
-
}
|
|
132
|
-
) : null
|
|
133
|
-
]
|
|
134
|
-
}
|
|
135
|
-
);
|
|
136
|
-
}
|
|
137
|
-
);
|
|
138
|
-
G.displayName = "EditableDescription";
|
|
139
|
-
export {
|
|
140
|
-
G as E
|
|
141
|
-
};
|
|
142
|
-
//# sourceMappingURL=editable-description-BQauSuCG.js.map
|