@alfadocs/ui-kit 1.70.0 → 1.71.1

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.
Files changed (73) hide show
  1. package/dist/_chunks/auth-form-parts-DHv6LVV2.js +98 -0
  2. package/dist/_chunks/{forgot-password-form-Dqi7R-NL.js → forgot-password-form-BGPc8TGr.js} +2 -2
  3. package/dist/_chunks/header-settings-CAC0Yl0t.js +516 -0
  4. package/dist/_chunks/login-dev-card-CWpoTuVY.js +332 -0
  5. package/dist/_chunks/{marketplace-app-shell-CcLQ0Dn-.js → marketplace-app-shell-BeWm-Efp.js} +2 -2
  6. package/dist/agent-catalog.json +9 -1
  7. package/dist/agent-i18n/en.json +1 -0
  8. package/dist/components/header-settings/index.js +1 -1
  9. package/dist/i18n/locales/ar.d.ts +1 -0
  10. package/dist/i18n/locales/ar.js +1 -0
  11. package/dist/i18n/locales/de.d.ts +1 -0
  12. package/dist/i18n/locales/de.js +1 -0
  13. package/dist/i18n/locales/el.d.ts +1 -0
  14. package/dist/i18n/locales/el.js +1 -0
  15. package/dist/i18n/locales/en.d.ts +1 -0
  16. package/dist/i18n/locales/en.js +1 -0
  17. package/dist/i18n/locales/es.d.ts +1 -0
  18. package/dist/i18n/locales/es.js +1 -0
  19. package/dist/i18n/locales/fr.d.ts +1 -0
  20. package/dist/i18n/locales/fr.js +1 -0
  21. package/dist/i18n/locales/hi.d.ts +1 -0
  22. package/dist/i18n/locales/hi.js +1 -0
  23. package/dist/i18n/locales/it.d.ts +1 -0
  24. package/dist/i18n/locales/it.js +1 -0
  25. package/dist/i18n/locales/ja.d.ts +1 -0
  26. package/dist/i18n/locales/ja.js +1 -0
  27. package/dist/i18n/locales/nl.d.ts +1 -0
  28. package/dist/i18n/locales/nl.js +1 -0
  29. package/dist/i18n/locales/pl.d.ts +1 -0
  30. package/dist/i18n/locales/pl.js +1 -0
  31. package/dist/i18n/locales/pt.d.ts +1 -0
  32. package/dist/i18n/locales/pt.js +1 -0
  33. package/dist/i18n/locales/ro.d.ts +1 -0
  34. package/dist/i18n/locales/ro.js +1 -0
  35. package/dist/i18n/locales/ru.d.ts +1 -0
  36. package/dist/i18n/locales/ru.js +1 -0
  37. package/dist/i18n/locales/sq.d.ts +1 -0
  38. package/dist/i18n/locales/sq.js +1 -0
  39. package/dist/i18n/locales/sv.d.ts +1 -0
  40. package/dist/i18n/locales/sv.js +1 -0
  41. package/dist/i18n/locales/tr.d.ts +1 -0
  42. package/dist/i18n/locales/tr.js +1 -0
  43. package/dist/i18n/locales/zh.d.ts +1 -0
  44. package/dist/i18n/locales/zh.js +1 -0
  45. package/dist/index.js +3 -3
  46. package/dist/locales/ar.json +1 -0
  47. package/dist/locales/de.json +1 -0
  48. package/dist/locales/el.json +1 -0
  49. package/dist/locales/en.json +1 -0
  50. package/dist/locales/es.json +1 -0
  51. package/dist/locales/fr.json +1 -0
  52. package/dist/locales/hi.json +1 -0
  53. package/dist/locales/it.json +1 -0
  54. package/dist/locales/ja.json +1 -0
  55. package/dist/locales/nl.json +1 -0
  56. package/dist/locales/pl.json +1 -0
  57. package/dist/locales/pt.json +1 -0
  58. package/dist/locales/ro.json +1 -0
  59. package/dist/locales/ru.json +1 -0
  60. package/dist/locales/sq.json +1 -0
  61. package/dist/locales/sv.json +1 -0
  62. package/dist/locales/tr.json +1 -0
  63. package/dist/locales/zh.json +1 -0
  64. package/dist/patterns/_shared/auth-form-parts.d.ts +4 -3
  65. package/dist/patterns/forgot-password-form/index.js +1 -1
  66. package/dist/patterns/login-form/index.js +1 -1
  67. package/dist/patterns/login-form/login-form.d.ts +6 -2
  68. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  69. package/dist/tokens.css +1 -1
  70. package/package.json +1 -1
  71. package/dist/_chunks/auth-form-parts-B40zvD-a.js +0 -86
  72. package/dist/_chunks/header-settings-DlUbvAUx.js +0 -306
  73. package/dist/_chunks/login-dev-card-vEL-o5wq.js +0 -309
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit",
3
- "version": "1.70.0",
3
+ "version": "1.71.1",
4
4
  "type": "module",
5
5
  "description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe.",
6
6
  "license": "BUSL-1.1",
@@ -1,86 +0,0 @@
1
- import { jsxs as m, jsx as r, Fragment as v } from "react/jsx-runtime";
2
- import { useEffect as f, forwardRef as h } from "react";
3
- import { c as l } from "./index-D2ZczOXr.js";
4
- import { useTranslation as g } from "react-i18next";
5
- import { A as c } from "./alert-9kEwDza3.js";
6
- import { i as u } from "./is-development-CLUAnsU7.js";
7
- import { a as p } from "./safe-href-5dbsfbQn.js";
8
- import { B as b } from "./use-registration-submit-eWAECgUC.js";
9
- const x = "Alfadocs", w = l(
10
- "ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-xs)]",
11
- {
12
- variants: {
13
- centred: { true: "ds:items-center ds:text-center", false: "" }
14
- },
15
- defaultVariants: { centred: !0 }
16
- }
17
- ), A = l(
18
- "ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]"
19
- ), N = l(
20
- 'type-body-sm ds:relative ds:self-center ds:rounded-[var(--radius-sm)] ds:underline ds:underline-offset-4 ds:text-[var(--foreground)] ds:before:absolute ds:before:inset-x-0 ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[""] ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]'
21
- );
22
- function S({ href: s, action: e, children: t }) {
23
- return /* @__PURE__ */ r("a", { href: s, "data-action": e, className: N(), children: t });
24
- }
25
- function V({
26
- id: s,
27
- title: e,
28
- description: t,
29
- level: a,
30
- showLogo: o,
31
- logoMotion: d
32
- }) {
33
- const i = `h${a}`;
34
- return /* @__PURE__ */ m("div", { className: w({ centred: o }), children: [
35
- o && /* @__PURE__ */ r(b, { motion: d, label: x }),
36
- /* @__PURE__ */ r(i, { id: s, className: "type-title-card", children: e }),
37
- t && /* @__PURE__ */ r("p", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: t })
38
- ] });
39
- }
40
- const y = h(
41
- ({ id: s, announce: e, children: t }, a) => /* @__PURE__ */ r(
42
- c,
43
- {
44
- ref: a,
45
- id: s,
46
- variant: "error",
47
- announce: e,
48
- tabIndex: -1,
49
- "data-field": "form",
50
- className: A(),
51
- children: /* @__PURE__ */ r(c.Description, { children: t })
52
- }
53
- )
54
- );
55
- y.displayName = "AuthFormMessage";
56
- function C(s, e, t, a) {
57
- const o = new Set(Object.values(t ?? {})), d = e ? Object.entries(a ?? {}) : [], i = d.filter(([n]) => o.has(n)).map(([n]) => n).join(", ");
58
- return f(() => {
59
- i && u() && console.warn(
60
- `${s}: hiddenFields "${i}" is also named in fieldNames and was left out. The form's own field wins.`
61
- );
62
- }, [i, s]), d.filter(([n]) => !o.has(n));
63
- }
64
- function D(s, e, t) {
65
- const a = e && t && p(t) ? t : void 0, o = t ? e ? a ? void 0 : "`action` is not a path or an address on this origin and was left out. The form posts to the current address." : "`action` does nothing without `fieldNames`: only a native form post has an address." : void 0;
66
- return f(() => {
67
- o && u() && console.warn(`${s}: ${o}`);
68
- }, [s, o]), a;
69
- }
70
- function H({ fields: s }) {
71
- return /* @__PURE__ */ r(v, { children: s.map(([e, t]) => /* @__PURE__ */ r("input", { type: "hidden", name: e, value: t }, e)) });
72
- }
73
- function O({ busy: s }) {
74
- const { t: e } = g("ui");
75
- return /* @__PURE__ */ r("p", { role: "status", className: "ds:sr-only", children: s ? e("chat.message.status.sending") : "" });
76
- }
77
- export {
78
- V as A,
79
- H as E,
80
- C as a,
81
- y as b,
82
- O as c,
83
- S as d,
84
- D as u
85
- };
86
- //# sourceMappingURL=auth-form-parts-B40zvD-a.js.map
@@ -1,306 +0,0 @@
1
- import { jsx as s, jsxs as h } from "react/jsx-runtime";
2
- import { forwardRef as E, useRef as p, useImperativeHandle as I, useCallback as R, useMemo as K } from "react";
3
- import { c as _ } from "./index-D2ZczOXr.js";
4
- import { useTranslation as T } from "react-i18next";
5
- import { I as H } from "./icon-button-C_1TgRiK.js";
6
- import { D as n } from "./dropdown-menu-D1we7oAY.js";
7
- import { u as O, c as g, L as P, a as j } from "./locale-picker-CeveTnDK.js";
8
- import { u as x } from "./use-locale-BExNy9Dl.js";
9
- import { u as N } from "./use-theme-CAuo6EYT.js";
10
- import { u as D } from "./registry-DvAUVLHh.js";
11
- import { u as M } from "./length-token-DwMnGEYT.js";
12
- import { S as F } from "./settings-d25ju_6L.js";
13
- const V = {
14
- id: "header-settings",
15
- // Each setter persists a single preference value (locale / theme /
16
- // accessibility) — `set_value` semantics, not an ephemeral view switch.
17
- capabilities: ["set_value"],
18
- // Read-back for all three setters. None of these preferences is
19
- // recoverable from the DOM — `useTheme` resolves preference + OS into
20
- // a single applied class, so `theme: 'system'` and `theme: 'light'`
21
- // both paint `.theme-light` — and `set_locale` swallows unknown tags.
22
- // Without these slots an agent cannot distinguish "switched to
23
- // Italian" from "the tag was dropped on the floor". All four are UI
24
- // preferences: no PHI, no patient-identifiable data (§7).
25
- state: {
26
- locale: {
27
- type: "string",
28
- descriptionKey: "ui.agent.headerSettings.state.locale",
29
- description: 'Active IETF language tag (e.g. "en", "it", "ar"). Read after `set_locale` to confirm the switch landed — an unknown tag is silently dropped and leaves this unchanged.',
30
- read: (e) => e.getLocale()
31
- },
32
- theme: {
33
- type: "'light' | 'dark' | 'system'",
34
- descriptionKey: "ui.agent.headerSettings.state.theme",
35
- description: "Stored base-theme preference. `'system'` means no override is set and the OS decides — read `resolvedTheme` for what is actually painted.",
36
- read: (e) => e.getTheme()
37
- },
38
- accessibility: {
39
- type: "'default' | 'accessible' | 'system'",
40
- descriptionKey: "ui.agent.headerSettings.state.accessibility",
41
- description: "Stored AAA-contrast preference. `'system'` means no override is set and `prefers-contrast` decides.",
42
- read: (e) => e.getAccessibility()
43
- },
44
- resolvedTheme: {
45
- type: "'light' | 'dark' | 'light-accessible' | 'dark-accessible'",
46
- descriptionKey: "ui.agent.headerSettings.state.resolvedTheme",
47
- description: 'The theme actually applied to the document once preference and OS signals resolve. This is what makes a `set_theme("system")` or `set_accessibility("system")` write verifiable.',
48
- read: (e) => e.getResolvedTheme()
49
- }
50
- },
51
- actions: {
52
- set_locale: {
53
- safety: "write",
54
- argsType: "{ locale: string }",
55
- argsSchema: {
56
- type: "object",
57
- properties: {
58
- locale: {
59
- type: "string",
60
- description: 'IETF language tag (e.g. "en", "it", "ar"). Unknown tags are silently dropped.'
61
- }
62
- },
63
- required: ["locale"]
64
- },
65
- idempotent: !0,
66
- descriptionKey: "ui.agent.headerSettings.actions.setLocale",
67
- description: "Switch the active locale to the given IETF tag. Unknown tags are silently dropped — read the `locale` state slot afterwards to confirm.",
68
- errors: [
69
- "Silently ignored when the tag names a locale the kit ships no bundle for — `locale` is unchanged."
70
- ],
71
- examples: [{ args: { locale: "it" }, note: "Switch to Italian." }],
72
- invoke: (e, a) => {
73
- e.setLocale(a.locale);
74
- }
75
- },
76
- set_theme: {
77
- safety: "write",
78
- argsType: '{ theme: "light" | "dark" | "system" }',
79
- argsSchema: {
80
- type: "object",
81
- properties: { theme: { enum: ["light", "dark", "system"] } },
82
- required: ["theme"]
83
- },
84
- idempotent: !0,
85
- descriptionKey: "ui.agent.headerSettings.actions.setTheme",
86
- description: "Switch the theme preference. Verify with the `theme` slot (the stored preference) and `resolvedTheme` (what is actually painted).",
87
- examples: [
88
- { args: { theme: "dark" }, note: "Switch to the dark theme." }
89
- ],
90
- invoke: (e, a) => {
91
- e.setTheme(a.theme);
92
- }
93
- },
94
- set_accessibility: {
95
- safety: "write",
96
- argsType: '{ accessibility: "default" | "accessible" | "system" }',
97
- argsSchema: {
98
- type: "object",
99
- properties: {
100
- accessibility: {
101
- enum: ["default", "accessible", "system"],
102
- description: "`'system'` clears the override and follows `prefers-contrast`."
103
- }
104
- },
105
- required: ["accessibility"]
106
- },
107
- idempotent: !0,
108
- descriptionKey: "ui.agent.headerSettings.actions.setAccessibility",
109
- description: "Switch the accessibility preference. Verify with the `accessibility` slot (the stored preference) and `resolvedTheme` (what is actually painted).",
110
- examples: [
111
- {
112
- args: { accessibility: "accessible" },
113
- note: "Enable the AAA-accessible profile."
114
- }
115
- ],
116
- invoke: (e, a) => {
117
- e.setAccessibility(a.accessibility);
118
- }
119
- }
120
- },
121
- domHooks: {
122
- root: {
123
- attr: "data-component",
124
- value: "header-settings",
125
- description: "Marks the HeaderSettings wrapper."
126
- },
127
- instanceId: {
128
- attr: "data-component-id",
129
- sourceProp: "id",
130
- description: "Sourced from the id prop (forwarded via HTMLAttributes)."
131
- }
132
- }
133
- };
134
- function q(e, a) {
135
- if (!(typeof window > "u"))
136
- try {
137
- window.localStorage.setItem(e, a);
138
- } catch {
139
- }
140
- }
141
- function z(e) {
142
- if (typeof document > "u") return;
143
- const a = document.documentElement;
144
- a.lang = e, a.dir = g[e].dir;
145
- }
146
- const U = _("ds:inline-flex ds:items-center", {
147
- variants: {
148
- align: {
149
- start: "",
150
- end: ""
151
- }
152
- },
153
- defaultVariants: { align: "end" }
154
- }), W = "ds:w-[var(--popover-size-md)]";
155
- function B(e) {
156
- return Object.prototype.hasOwnProperty.call(g, e);
157
- }
158
- function G({ locale: e }) {
159
- const { t: a } = T("ui"), o = g[B(e) ? e : "en"], m = (t) => {
160
- var r;
161
- t.target === t.currentTarget && ((r = t.currentTarget.querySelector("input")) == null || r.focus({ preventScroll: !0 }));
162
- }, u = (t) => {
163
- const r = t.target;
164
- if (r instanceof HTMLInputElement) {
165
- if (t.nativeEvent.isComposing) {
166
- t.stopPropagation();
167
- return;
168
- }
169
- t.key !== "ArrowLeft" && t.key !== "ArrowRight" || (r.selectionStart !== 0 || r.selectionEnd !== 0) && t.stopPropagation();
170
- }
171
- };
172
- return /* @__PURE__ */ h(n.Sub, { children: [
173
- /* @__PURE__ */ s(n.SubTrigger, { "aria-haspopup": "dialog", "data-value": o.code, children: /* @__PURE__ */ h("span", { className: "ds:flex ds:min-w-0 ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
174
- /* @__PURE__ */ s("span", { className: "ds:truncate", children: a("navigation.headerSettings.language.label") }),
175
- /* @__PURE__ */ s(
176
- "span",
177
- {
178
- lang: o.code,
179
- className: "ds:shrink-0 ds:text-[color:var(--muted-foreground)] ds:[[data-highlighted]_&]:text-current",
180
- children: o.nativeName
181
- }
182
- )
183
- ] }) }),
184
- /* @__PURE__ */ s(
185
- n.SubContent,
186
- {
187
- role: "dialog",
188
- "aria-orientation": void 0,
189
- className: W,
190
- onFocus: m,
191
- onKeyDownCapture: u,
192
- onEscapeKeyDown: (t) => {
193
- t.isComposing && t.preventDefault();
194
- },
195
- children: /* @__PURE__ */ s(j.SearchList, {})
196
- }
197
- )
198
- ] });
199
- }
200
- const Y = E(
201
- (e, a) => {
202
- const {
203
- align: o = "end",
204
- size: m = "md",
205
- disabled: u = !1,
206
- className: t,
207
- id: r,
208
- ...k
209
- } = e, { t: c } = T("ui"), l = N(), { locale: y, setLocale: b } = x();
210
- O();
211
- const f = p(null);
212
- I(a, () => f.current, []);
213
- const S = R(
214
- (i) => {
215
- b(i), z(i), q(P, i);
216
- },
217
- [b]
218
- ), w = p(S);
219
- w.current = S;
220
- const v = p(y);
221
- v.current = y;
222
- const d = p(l);
223
- d.current = l;
224
- const A = K(
225
- () => ({
226
- setLocale: (i) => {
227
- Object.prototype.hasOwnProperty.call(g, i) && w.current(i);
228
- },
229
- setTheme: (i) => d.current.setTheme(i),
230
- setAccessibility: (i) => d.current.setAccessibility(i),
231
- // Read-back. None of the three preferences is recoverable from
232
- // the DOM: `useTheme` resolves preference + OS into one applied
233
- // class, so `theme: 'system'` and `theme: 'light'` both paint
234
- // `.theme-light`. Without these an agent cannot tell a switch
235
- // that landed from one that was dropped.
236
- getLocale: () => v.current,
237
- getTheme: () => d.current.theme,
238
- getAccessibility: () => d.current.accessibility,
239
- getResolvedTheme: () => d.current.resolvedTheme
240
- }),
241
- []
242
- );
243
- D(V, A, r);
244
- const L = l.accessibility === "accessible", C = M("--spacing-lg", f, 24);
245
- return /* @__PURE__ */ s(
246
- "div",
247
- {
248
- ref: f,
249
- "data-component": "header-settings",
250
- "data-component-id": r,
251
- className: U({ align: o, className: t }),
252
- ...k,
253
- children: /* @__PURE__ */ h(n.Root, { children: [
254
- /* @__PURE__ */ s(n.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
255
- H,
256
- {
257
- size: m,
258
- disabled: u,
259
- icon: /* @__PURE__ */ s(F, { "aria-hidden": !0 }),
260
- "aria-label": c("navigation.headerSettings.trigger")
261
- }
262
- ) }),
263
- /* @__PURE__ */ h(n.Content, { align: o, collisionPadding: C, children: [
264
- /* @__PURE__ */ s(G, { locale: y }),
265
- /* @__PURE__ */ s(n.Separator, {}),
266
- /* @__PURE__ */ s(
267
- n.ChoiceSub,
268
- {
269
- label: c("navigation.headerSettings.appearance.label"),
270
- value: l.theme,
271
- onValueChange: l.setTheme,
272
- options: [
273
- {
274
- value: "light",
275
- label: c("navigation.headerSettings.appearance.light")
276
- },
277
- {
278
- value: "dark",
279
- label: c("navigation.headerSettings.appearance.dark")
280
- },
281
- {
282
- value: "system",
283
- label: c("navigation.headerSettings.appearance.system")
284
- }
285
- ]
286
- }
287
- ),
288
- /* @__PURE__ */ s(
289
- n.SwitchItem,
290
- {
291
- checked: L,
292
- onCheckedChange: (i) => l.setAccessibility(i ? "accessible" : "default"),
293
- children: c("navigation.headerSettings.appearance.accessible")
294
- }
295
- )
296
- ] })
297
- ] })
298
- }
299
- );
300
- }
301
- );
302
- Y.displayName = "HeaderSettings";
303
- export {
304
- Y as H
305
- };
306
- //# sourceMappingURL=header-settings-DlUbvAUx.js.map