@alfadocs/ui-kit 1.26.1 → 1.27.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/{calendar-workspace-DWW5ZtQ0.js → calendar-workspace-Cs4hNB40.js} +2 -2
- package/dist/_chunks/{signature-request-CwlAmVLw.js → signature-request-C-IsbkPf.js} +2 -2
- package/dist/_chunks/{whatsapp-button-CuFIHJzG.js → whatsapp-button-Ai4YAVkl.js} +104 -47
- package/dist/agent-catalog.json +1 -1
- package/dist/components/whatsapp-button/index.js +1 -1
- package/dist/components/whatsapp-button/whatsapp-button.d.ts +11 -0
- package/dist/index.js +3 -3
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
|
@@ -26,7 +26,7 @@ import { T as ji } from "./text-input-CUvCb6ST.js";
|
|
|
26
26
|
import { T as ss } from "./text-area-Bt3p7Pt0.js";
|
|
27
27
|
import { N as Ka } from "./number-input-Cgu2TtA8.js";
|
|
28
28
|
import { T as qi } from "./time-picker-D0RS391l.js";
|
|
29
|
-
import { a as Yi, W as Qi } from "./whatsapp-button-
|
|
29
|
+
import { a as Yi, W as Qi } from "./whatsapp-button-Ai4YAVkl.js";
|
|
30
30
|
import { A as Xi } from "./appointment-card-Dzr3GeVz.js";
|
|
31
31
|
import { B as bn } from "./badge-sTusUqZD.js";
|
|
32
32
|
import { D as Zi } from "./data-table-DB5BiVQ0.js";
|
|
@@ -7503,4 +7503,4 @@ export {
|
|
|
7503
7503
|
El as r,
|
|
7504
7504
|
Cn as u
|
|
7505
7505
|
};
|
|
7506
|
-
//# sourceMappingURL=calendar-workspace-
|
|
7506
|
+
//# sourceMappingURL=calendar-workspace-Cs4hNB40.js.map
|
|
@@ -5,7 +5,7 @@ import { D as m } from "./dialog-UbKJCi1X.js";
|
|
|
5
5
|
import { B as z } from "./button-nJaPh_HC.js";
|
|
6
6
|
import { I as xe } from "./icon-button-DA2CAGHZ.js";
|
|
7
7
|
import { C as Y } from "./checkbox-BuZ1u__2.js";
|
|
8
|
-
import { a as Re } from "./whatsapp-button-
|
|
8
|
+
import { a as Re } from "./whatsapp-button-Ai4YAVkl.js";
|
|
9
9
|
import { S as Z } from "./select-Bi8zril7.js";
|
|
10
10
|
import { S as be } from "./switch-OILsBLWo.js";
|
|
11
11
|
import { A as _ } from "./alert-CiJT540z.js";
|
|
@@ -414,4 +414,4 @@ Me.displayName = "SignatureRequestModal";
|
|
|
414
414
|
export {
|
|
415
415
|
Me as S
|
|
416
416
|
};
|
|
417
|
-
//# sourceMappingURL=signature-request-
|
|
417
|
+
//# sourceMappingURL=signature-request-C-IsbkPf.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
function
|
|
2
|
+
import { forwardRef as B, useMemo as A } from "react";
|
|
3
|
+
import { c as p } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as C } from "react-i18next";
|
|
5
|
+
function h({
|
|
6
6
|
className: a
|
|
7
7
|
}) {
|
|
8
8
|
return /* @__PURE__ */ r(
|
|
@@ -17,7 +17,7 @@ function u({
|
|
|
17
17
|
}
|
|
18
18
|
);
|
|
19
19
|
}
|
|
20
|
-
const
|
|
20
|
+
const j = p(
|
|
21
21
|
[
|
|
22
22
|
// `position` is provided by `positionVariants` below — `static`
|
|
23
23
|
// sets `ds:relative` (so the pseudo-element touch-target anchors),
|
|
@@ -119,7 +119,7 @@ const k = m(
|
|
|
119
119
|
size: "md"
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
),
|
|
122
|
+
), k = p("", {
|
|
123
123
|
variants: {
|
|
124
124
|
position: {
|
|
125
125
|
// `relative` so the `::before` pseudo touch-target (defined in
|
|
@@ -137,36 +137,92 @@ const k = m(
|
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
139
|
defaultVariants: { position: "static" }
|
|
140
|
-
})
|
|
141
|
-
|
|
140
|
+
}), N = p("", {
|
|
141
|
+
variants: {
|
|
142
|
+
collapseLabelBelow: {
|
|
143
|
+
sm: "ds:max-sm:gap-0 ds:max-sm:p-0 ds:max-sm:min-h-0 ds:max-sm:rounded-full ds:max-sm:shadow-[var(--shadow-lg)]",
|
|
144
|
+
md: "ds:max-md:gap-0 ds:max-md:p-0 ds:max-md:min-h-0 ds:max-md:rounded-full ds:max-md:shadow-[var(--shadow-lg)]"
|
|
145
|
+
},
|
|
146
|
+
size: {
|
|
147
|
+
sm: "",
|
|
148
|
+
md: "",
|
|
149
|
+
lg: ""
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
compoundVariants: [
|
|
153
|
+
// Mirrors the `fab` size ladder above. The `sm` circle keeps the
|
|
154
|
+
// pseudo touch-target the `pill sm` compound already paints below
|
|
155
|
+
// the `sm:` breakpoint, so 40px still hits 44/48px on a phone.
|
|
156
|
+
{
|
|
157
|
+
collapseLabelBelow: "sm",
|
|
158
|
+
size: "sm",
|
|
159
|
+
class: "ds:max-sm:h-10 ds:max-sm:w-10 ds:max-sm:[&_svg]:size-5"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
collapseLabelBelow: "sm",
|
|
163
|
+
size: "md",
|
|
164
|
+
class: "ds:max-sm:h-14 ds:max-sm:w-14 ds:max-sm:[&_svg]:size-7"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
collapseLabelBelow: "sm",
|
|
168
|
+
size: "lg",
|
|
169
|
+
class: "ds:max-sm:h-16 ds:max-sm:w-16 ds:max-sm:[&_svg]:size-8"
|
|
170
|
+
},
|
|
171
|
+
// The `pill sm` pseudo touch-target only paints below `sm:`, so a
|
|
172
|
+
// 40px circle collapsed at `md` would sit under the target minimum
|
|
173
|
+
// between the two breakpoints. Size that one circle to the minimum
|
|
174
|
+
// itself (44px, 48px in the accessible themes) instead.
|
|
175
|
+
{
|
|
176
|
+
collapseLabelBelow: "md",
|
|
177
|
+
size: "sm",
|
|
178
|
+
class: "ds:max-md:h-[var(--min-target-size)] ds:max-md:w-[var(--min-target-size)] ds:max-md:[&_svg]:size-5"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
collapseLabelBelow: "md",
|
|
182
|
+
size: "md",
|
|
183
|
+
class: "ds:max-md:h-14 ds:max-md:w-14 ds:max-md:[&_svg]:size-7"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
collapseLabelBelow: "md",
|
|
187
|
+
size: "lg",
|
|
188
|
+
class: "ds:max-md:h-16 ds:max-md:w-16 ds:max-md:[&_svg]:size-8"
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
}), V = {
|
|
192
|
+
sm: "ds:max-sm:sr-only",
|
|
193
|
+
md: "ds:max-md:sr-only"
|
|
194
|
+
};
|
|
195
|
+
function $(a, o) {
|
|
142
196
|
const s = a.replace(/\D/g, "");
|
|
143
197
|
if (s.length === 0)
|
|
144
198
|
return null;
|
|
145
|
-
const
|
|
146
|
-
return
|
|
199
|
+
const l = `https://wa.me/${s}`;
|
|
200
|
+
return o ? `${l}?text=${encodeURIComponent(o)}` : l;
|
|
147
201
|
}
|
|
148
|
-
const
|
|
202
|
+
const T = B(
|
|
149
203
|
({
|
|
150
204
|
phoneNumber: a,
|
|
151
|
-
message:
|
|
205
|
+
message: o,
|
|
152
206
|
variant: s = "pill",
|
|
153
|
-
size:
|
|
154
|
-
position:
|
|
155
|
-
label:
|
|
207
|
+
size: l = "md",
|
|
208
|
+
position: u,
|
|
209
|
+
label: x,
|
|
156
210
|
tone: w = "standard",
|
|
157
|
-
|
|
211
|
+
collapseLabelBelow: z,
|
|
212
|
+
className: _,
|
|
158
213
|
...i
|
|
159
|
-
},
|
|
160
|
-
const { t:
|
|
161
|
-
() =>
|
|
162
|
-
[a,
|
|
163
|
-
), e =
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
214
|
+
}, y) => {
|
|
215
|
+
const { t: v } = C(), f = A(
|
|
216
|
+
() => $(a, o),
|
|
217
|
+
[a, o]
|
|
218
|
+
), e = x ?? v(s === "fab" ? "whatsApp.fabLabel" : w === "question" ? "whatsApp.questionPrompt" : "whatsApp.label"), n = s === "pill" ? z : void 0, L = [
|
|
219
|
+
j({ variant: s, size: l }),
|
|
220
|
+
k({ position: u }),
|
|
221
|
+
n ? N({ collapseLabelBelow: n, size: l }) : "",
|
|
222
|
+
_
|
|
223
|
+
].filter(Boolean).join(" "), t = f === null, b = {
|
|
224
|
+
ref: y,
|
|
225
|
+
...t ? {} : {
|
|
170
226
|
href: f,
|
|
171
227
|
target: "_blank",
|
|
172
228
|
rel: "noopener noreferrer"
|
|
@@ -178,39 +234,40 @@ const L = _(
|
|
|
178
234
|
/* `tabIndex` too: an <a> without href is not focusable, and
|
|
179
235
|
`aria-disabled` presupposes something focus CAN reach — otherwise
|
|
180
236
|
the reason the control is disabled never reaches a keyboard. */
|
|
181
|
-
...
|
|
182
|
-
"aria-disabled":
|
|
237
|
+
...t ? { role: "link", tabIndex: 0 } : {},
|
|
238
|
+
"aria-disabled": t ? !0 : void 0,
|
|
183
239
|
"data-component": "whatsapp-button",
|
|
184
240
|
"data-variant": s,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
241
|
+
"data-collapse-label-below": n,
|
|
242
|
+
onClick: (m) => {
|
|
243
|
+
var g;
|
|
244
|
+
t && m.preventDefault(), (g = i.onClick) == null || g.call(i, m);
|
|
188
245
|
},
|
|
189
|
-
className:
|
|
190
|
-
},
|
|
246
|
+
className: L
|
|
247
|
+
}, d = t ? null : v("link.opensInNewTab", "Opens in a new tab");
|
|
191
248
|
if (s === "fab") {
|
|
192
|
-
const
|
|
193
|
-
return /* @__PURE__ */ c("a", { ...i, ...
|
|
194
|
-
/* @__PURE__ */ r(
|
|
249
|
+
const m = typeof e == "string" ? d ? `${e} — ${d}` : e : void 0;
|
|
250
|
+
return /* @__PURE__ */ c("a", { ...i, ...b, "aria-label": m, children: [
|
|
251
|
+
/* @__PURE__ */ r(h, {}),
|
|
195
252
|
typeof e != "string" ? /* @__PURE__ */ c("span", { className: "ds:sr-only", children: [
|
|
196
253
|
e,
|
|
197
|
-
|
|
254
|
+
d ? ` — ${d}` : null
|
|
198
255
|
] }) : null
|
|
199
256
|
] });
|
|
200
257
|
}
|
|
201
|
-
return /* @__PURE__ */ c("a", { ...i, ...
|
|
202
|
-
/* @__PURE__ */ r(
|
|
203
|
-
/* @__PURE__ */ r("span", { children: e }),
|
|
204
|
-
|
|
258
|
+
return /* @__PURE__ */ c("a", { ...i, ...b, children: [
|
|
259
|
+
/* @__PURE__ */ r(h, {}),
|
|
260
|
+
/* @__PURE__ */ r("span", { className: n ? V[n] : void 0, children: e }),
|
|
261
|
+
d ? /* @__PURE__ */ c("span", { className: "ds:sr-only", children: [
|
|
205
262
|
" — ",
|
|
206
|
-
|
|
263
|
+
d
|
|
207
264
|
] }) : null
|
|
208
265
|
] });
|
|
209
266
|
}
|
|
210
267
|
);
|
|
211
|
-
|
|
268
|
+
T.displayName = "WhatsAppButton";
|
|
212
269
|
export {
|
|
213
|
-
|
|
214
|
-
|
|
270
|
+
T as W,
|
|
271
|
+
h as a
|
|
215
272
|
};
|
|
216
|
-
//# sourceMappingURL=whatsapp-button-
|
|
273
|
+
//# sourceMappingURL=whatsapp-button-Ai4YAVkl.js.map
|
package/dist/agent-catalog.json
CHANGED
|
@@ -42,6 +42,17 @@ export interface WhatsAppButtonProps extends Omit<AnchorHTMLAttributes<HTMLAncho
|
|
|
42
42
|
* glyph-only and its `aria-label` stays concise via `fabLabel`.
|
|
43
43
|
*/
|
|
44
44
|
tone?: 'standard' | 'question';
|
|
45
|
+
/**
|
|
46
|
+
* Pill only. Below the named Tailwind breakpoint the pill becomes a
|
|
47
|
+
* glyph-only circle (the `fab` chrome of the same `size`) and the
|
|
48
|
+
* label moves to screen-reader-only text, so the accessible name is
|
|
49
|
+
* unchanged. Pure CSS, so server render and first paint agree.
|
|
50
|
+
* Use it where the pill's copy earns its space on desktop but would
|
|
51
|
+
* crowd a phone: the booking site's practice page passes `"sm"`.
|
|
52
|
+
*
|
|
53
|
+
* Ignored for `variant="fab"`, which is glyph-only already.
|
|
54
|
+
*/
|
|
55
|
+
collapseLabelBelow?: 'sm' | 'md';
|
|
45
56
|
}
|
|
46
57
|
export declare const WhatsAppButton: import("react").ForwardRefExoticComponent<WhatsAppButtonProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
47
58
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -219,14 +219,14 @@ import { T as Rg, t as _g, r as bg } from "./_chunks/tooth-scheme-C9jssOmy.js";
|
|
|
219
219
|
import { C as Dg, a as hg, b as Og, c as Fg, d as Lg, e as Mg, F as yg, f as kg, g as Bg, h as Gg, I as vg, P as Hg, i as wg, S as Ug, j as Vg, k as Wg, l as Kg, m as Yg, n as Xg, T as qg, o as zg, p as jg, q as Qg, r as Jg, s as Zg, t as $g, u as aS, v as eS, w as sS, x as rS, y as oS, z as tS, A as nS, B as iS, D as pS, E as mS, G as lS, H as dS, J as AS, K as cS, L as fS, M as gS, N as SS, O as CS, Q as TS, R as xS, U as uS, V as PS, W as IS, X as ES, Y as RS, Z as _S, _ as bS, $ as NS } from "./_chunks/tooth-data-DR8Kdnup.js";
|
|
220
220
|
import { C as hS, D as OS, T as FS, t as LS, a as MS } from "./_chunks/tooth-finding-palette-vqC-D2Ye.js";
|
|
221
221
|
import { T as kS } from "./_chunks/transaction-chip-DJCstquX.js";
|
|
222
|
-
import { W as GS, a as vS } from "./_chunks/whatsapp-button-
|
|
222
|
+
import { W as GS, a as vS } from "./_chunks/whatsapp-button-Ai4YAVkl.js";
|
|
223
223
|
import { C as wS, W as US, a as VS, b as WS, c as KS, i as YS, l as XS, m as qS, r as zS, w as jS, d as QS, e as JS, f as ZS } from "./_chunks/workflow-map-dNzJjBWG.js";
|
|
224
224
|
import { A as aC, a as eC, b as sC, c as rC } from "./_chunks/alia-sidebar-BWcWZivN.js";
|
|
225
225
|
import { A as tC, a as nC, L as iC, P as pC, S as mC, T as lC, b as dC, c as AC, d as cC, e as fC, f as gC, g as SC, h as CC, i as TC, j as xC, k as uC, l as PC, m as IC, n as EC, o as RC, p as _C, r as bC, q as NC, s as DC, t as hC, u as OC } from "./_chunks/anamnesis-summary-rows-DwjqZgR5.js";
|
|
226
|
-
import { C as LC, a as MC, b as yC, D as kC, c as BC, S as GC, V as vC, W as HC, d as wC, i as UC, m as VC, r as WC, u as KC, e as YC, f as XC } from "./_chunks/calendar-workspace-
|
|
226
|
+
import { C as LC, a as MC, b as yC, D as kC, c as BC, S as GC, V as vC, W as HC, d as wC, i as UC, m as VC, r as WC, u as KC, e as YC, f as XC } from "./_chunks/calendar-workspace-Cs4hNB40.js";
|
|
227
227
|
import { C as zC, M as jC, P as QC } from "./_chunks/marketplace-app-shell-C4AjQmvz.js";
|
|
228
228
|
import { P as ZC } from "./_chunks/payment-automation-upsell-DwQW2fRp.js";
|
|
229
|
-
import { S as aT } from "./_chunks/signature-request-
|
|
229
|
+
import { S as aT } from "./_chunks/signature-request-C-IsbkPf.js";
|
|
230
230
|
import { D as sT, d as rT } from "./_chunks/dependent-selector-cJlJFAKD.js";
|
|
231
231
|
import { D as tT, d as nT } from "./_chunks/document-preview-CDb-n_W7.js";
|
|
232
232
|
import { D as pT, d as mT } from "./_chunks/document-scanner-C5Vrbu21.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as s, a as r, b as E, D as P, c as t, S, V as A, W as C, d, i as o, m as D, r as i, u as n, e as W, f as _ } from "../../_chunks/calendar-workspace-
|
|
1
|
+
import { C as s, a as r, b as E, D as P, c as t, S, V as A, W as C, d, i as o, m as D, r as i, u as n, e as W, f as _ } from "../../_chunks/calendar-workspace-Cs4hNB40.js";
|
|
2
2
|
export {
|
|
3
3
|
s as CALENDAR_PREFERENCE_KEYS,
|
|
4
4
|
r as CalendarDataProvider,
|