@alfadocs/ui-kit 1.39.0 → 1.40.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/{ai-consent-banner-DvtaM3yg.js → ai-consent-banner-D7I2U-cz.js} +37 -36
- package/dist/_chunks/{booking-Dn3jvv3K.js → booking-D43ASl8y.js} +1109 -1103
- package/dist/_chunks/{calendar-workspace-B-fUbm62.js → calendar-workspace-SN23GsXX.js} +2154 -2148
- package/dist/_chunks/{notes-panel-CAD1Ytcj.js → notes-panel-CmTqIWlS.js} +76 -73
- package/dist/_chunks/{rich-text-editor-C6fE-uP4.js → rich-text-editor-BJ1-Lkao.js} +1023 -931
- package/dist/agent-catalog.json +1 -1
- package/dist/components/ai-consent-banner/ai-consent-banner.d.ts +9 -0
- package/dist/components/ai-consent-banner/index.d.ts +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/booking/booking-types.d.ts +6 -0
- package/dist/components/booking/cascade.d.ts +6 -0
- package/dist/components/booking/index.js +1 -1
- package/dist/components/notes-panel/index.d.ts +1 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +8 -1
- package/dist/components/rich-text-editor/index.d.ts +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +48 -0
- package/dist/i18n/locales/ar.d.ts +13 -11
- package/dist/i18n/locales/ar.js +14 -12
- package/dist/i18n/locales/de.d.ts +13 -11
- package/dist/i18n/locales/de.js +14 -12
- package/dist/i18n/locales/el.d.ts +13 -11
- package/dist/i18n/locales/el.js +14 -12
- package/dist/i18n/locales/en.d.ts +2 -0
- package/dist/i18n/locales/en.js +3 -1
- package/dist/i18n/locales/es.d.ts +13 -11
- package/dist/i18n/locales/es.js +14 -12
- package/dist/i18n/locales/fr.d.ts +13 -11
- package/dist/i18n/locales/fr.js +14 -12
- package/dist/i18n/locales/hi.d.ts +13 -11
- package/dist/i18n/locales/hi.js +14 -12
- package/dist/i18n/locales/it.d.ts +13 -11
- package/dist/i18n/locales/it.js +14 -12
- package/dist/i18n/locales/ja.d.ts +13 -11
- package/dist/i18n/locales/ja.js +14 -12
- package/dist/i18n/locales/nl.d.ts +13 -11
- package/dist/i18n/locales/nl.js +14 -12
- package/dist/i18n/locales/pl.d.ts +13 -11
- package/dist/i18n/locales/pl.js +14 -12
- package/dist/i18n/locales/pt.d.ts +13 -11
- package/dist/i18n/locales/pt.js +14 -12
- package/dist/i18n/locales/ro.d.ts +13 -11
- package/dist/i18n/locales/ro.js +14 -12
- package/dist/i18n/locales/ru.d.ts +13 -11
- package/dist/i18n/locales/ru.js +14 -12
- package/dist/i18n/locales/sq.d.ts +13 -11
- package/dist/i18n/locales/sq.js +14 -12
- package/dist/i18n/locales/sv.d.ts +13 -11
- package/dist/i18n/locales/sv.js +14 -12
- package/dist/i18n/locales/tr.d.ts +13 -11
- package/dist/i18n/locales/tr.js +14 -12
- package/dist/i18n/locales/zh.d.ts +13 -11
- package/dist/i18n/locales/zh.js +14 -12
- package/dist/index.js +5 -5
- package/dist/locales/ar.json +14 -12
- package/dist/locales/de.json +14 -12
- package/dist/locales/el.json +14 -12
- package/dist/locales/en.json +3 -1
- package/dist/locales/es.json +14 -12
- package/dist/locales/fr.json +14 -12
- package/dist/locales/hi.json +14 -12
- package/dist/locales/it.json +14 -12
- package/dist/locales/ja.json +14 -12
- package/dist/locales/nl.json +14 -12
- package/dist/locales/pl.json +14 -12
- package/dist/locales/pt.json +14 -12
- package/dist/locales/ro.json +14 -12
- package/dist/locales/ru.json +14 -12
- package/dist/locales/sq.json +14 -12
- package/dist/locales/sv.json +14 -12
- package/dist/locales/tr.json +14 -12
- package/dist/locales/zh.json +14 -12
- package/dist/patterns/calendar/calendar.journey.d.ts +9 -1
- package/dist/patterns/calendar/calendar.sheets.d.ts +6 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsxs as r, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
2
|
+
import { forwardRef as k, useState as q, useRef as I, useMemo as L } from "react";
|
|
3
|
+
import { c as R } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as w } from "react-i18next";
|
|
5
5
|
import { A as d } from "./alert-CiQ5Pa3Q.js";
|
|
6
|
-
import { B as
|
|
7
|
-
import { B as
|
|
8
|
-
import { C as
|
|
9
|
-
import { S as
|
|
10
|
-
import { T as
|
|
11
|
-
import { u as
|
|
12
|
-
const
|
|
6
|
+
import { B as T } from "./badge-BudgzTe_.js";
|
|
7
|
+
import { B as V } from "./button-CaUe1uyd.js";
|
|
8
|
+
import { C as j } from "./checkbox-CZkipDn7.js";
|
|
9
|
+
import { S as z } from "./spinner-hbwuKwMf.js";
|
|
10
|
+
import { T as G } from "./timestamp-BV2lC-wV.js";
|
|
11
|
+
import { u as K } from "./registry-DvAUVLHh.js";
|
|
12
|
+
const M = {
|
|
13
13
|
id: "ai-consent-banner",
|
|
14
14
|
capabilities: [],
|
|
15
15
|
state: {
|
|
@@ -39,7 +39,7 @@ const K = {
|
|
|
39
39
|
description: "Sourced from the id prop. Required to address a specific banner from the agent."
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
},
|
|
42
|
+
}, P = R("ds:w-full ds:text-[color:var(--foreground)]", {
|
|
43
43
|
variants: {
|
|
44
44
|
state: {
|
|
45
45
|
granted: "",
|
|
@@ -54,7 +54,7 @@ const K = {
|
|
|
54
54
|
function u(a, s) {
|
|
55
55
|
return s ? "pending" : a ? "granted" : "required";
|
|
56
56
|
}
|
|
57
|
-
const
|
|
57
|
+
const D = k(
|
|
58
58
|
({
|
|
59
59
|
id: a,
|
|
60
60
|
granted: s,
|
|
@@ -63,29 +63,30 @@ const P = N(
|
|
|
63
63
|
canGrant: f = !0,
|
|
64
64
|
pending: c = !1,
|
|
65
65
|
onGrantConsent: g,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
headingLevel: h = 5,
|
|
67
|
+
"aria-label": v,
|
|
68
|
+
className: b,
|
|
69
|
+
...C
|
|
70
|
+
}, B) => {
|
|
71
|
+
const { t: e } = w(), t = u(s, c), [o, y] = q(!1), p = I(o);
|
|
71
72
|
p.current = o;
|
|
72
|
-
const
|
|
73
|
+
const A = L(
|
|
73
74
|
() => ({
|
|
74
75
|
getState: () => u(s, c),
|
|
75
76
|
isArmed: () => p.current
|
|
76
77
|
}),
|
|
77
78
|
[s, c]
|
|
78
79
|
);
|
|
79
|
-
|
|
80
|
-
const
|
|
80
|
+
K(M, A, a);
|
|
81
|
+
const x = v ?? e("aiConsentBanner.regionLabel", "AI assistance consent"), S = t === "granted" ? "success" : "info";
|
|
81
82
|
let i;
|
|
82
83
|
return t === "granted" ? i = /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
83
84
|
/* @__PURE__ */ r("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
84
|
-
/* @__PURE__ */ n(
|
|
85
|
+
/* @__PURE__ */ n(T, { variant: "success", children: e("aiConsentBanner.badge.granted", "Consent granted") }),
|
|
85
86
|
l !== void 0 ? /* @__PURE__ */ r("span", { className: "type-body-sm ds:text-[color:var(--muted-foreground)]", children: [
|
|
86
87
|
e("aiConsentBanner.grantedAtPrefix", "Granted"),
|
|
87
88
|
" ",
|
|
88
|
-
/* @__PURE__ */ n(
|
|
89
|
+
/* @__PURE__ */ n(G, { value: l, format: "relative", shape: "inline" })
|
|
89
90
|
] }) : null
|
|
90
91
|
] }),
|
|
91
92
|
m ? /* @__PURE__ */ n("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: e("aiConsentBanner.grantedBy", {
|
|
@@ -94,7 +95,7 @@ const P = N(
|
|
|
94
95
|
}) }) : null
|
|
95
96
|
] }) : t === "pending" ? i = /* @__PURE__ */ r("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
96
97
|
/* @__PURE__ */ n(
|
|
97
|
-
|
|
98
|
+
z,
|
|
98
99
|
{
|
|
99
100
|
variant: "pulse",
|
|
100
101
|
size: "sm",
|
|
@@ -104,10 +105,10 @@ const P = N(
|
|
|
104
105
|
/* @__PURE__ */ n("span", { className: "type-body-sm ds:text-[color:var(--muted-foreground)]", children: e("aiConsentBanner.pendingLabel", "Saving consent…") })
|
|
105
106
|
] }) : i = f ? /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
106
107
|
/* @__PURE__ */ n(
|
|
107
|
-
|
|
108
|
+
j,
|
|
108
109
|
{
|
|
109
110
|
checked: o,
|
|
110
|
-
onCheckedChange: (
|
|
111
|
+
onCheckedChange: (N) => y(N === !0),
|
|
111
112
|
label: e(
|
|
112
113
|
"aiConsentBanner.confirmLabel",
|
|
113
114
|
"I confirm consent has been obtained for AI assistance."
|
|
@@ -115,7 +116,7 @@ const P = N(
|
|
|
115
116
|
}
|
|
116
117
|
),
|
|
117
118
|
/* @__PURE__ */ n(d.Action, { children: /* @__PURE__ */ n(
|
|
118
|
-
|
|
119
|
+
V,
|
|
119
120
|
{
|
|
120
121
|
intent: "primary",
|
|
121
122
|
size: "sm",
|
|
@@ -130,23 +131,23 @@ const P = N(
|
|
|
130
131
|
) }), /* @__PURE__ */ n(
|
|
131
132
|
"div",
|
|
132
133
|
{
|
|
133
|
-
ref:
|
|
134
|
+
ref: B,
|
|
134
135
|
role: "region",
|
|
135
|
-
"aria-label":
|
|
136
|
+
"aria-label": x,
|
|
136
137
|
"aria-busy": t === "pending" ? !0 : void 0,
|
|
137
138
|
"data-component": "ai-consent-banner",
|
|
138
139
|
"data-component-id": a,
|
|
139
140
|
"data-state": t,
|
|
140
141
|
id: a,
|
|
141
|
-
className:
|
|
142
|
-
...
|
|
142
|
+
className: P({ state: t, className: b }),
|
|
143
|
+
...C,
|
|
143
144
|
children: /* @__PURE__ */ r(
|
|
144
145
|
d,
|
|
145
146
|
{
|
|
146
|
-
variant:
|
|
147
|
+
variant: S,
|
|
147
148
|
icon: t === "pending" ? null : void 0,
|
|
148
149
|
children: [
|
|
149
|
-
/* @__PURE__ */ n(d.Title, { children: e("aiConsentBanner.title", "AI assistance consent") }),
|
|
150
|
+
/* @__PURE__ */ n(d.Title, { as: `h${h}`, children: e("aiConsentBanner.title", "AI assistance consent") }),
|
|
150
151
|
/* @__PURE__ */ n(d.Description, { children: t === "granted" ? e(
|
|
151
152
|
"aiConsentBanner.description.granted",
|
|
152
153
|
"AI assistance is enabled for this record."
|
|
@@ -162,9 +163,9 @@ const P = N(
|
|
|
162
163
|
);
|
|
163
164
|
}
|
|
164
165
|
);
|
|
165
|
-
|
|
166
|
+
D.displayName = "AiConsentBanner";
|
|
166
167
|
export {
|
|
167
|
-
|
|
168
|
-
|
|
168
|
+
D as A,
|
|
169
|
+
M as a
|
|
169
170
|
};
|
|
170
|
-
//# sourceMappingURL=ai-consent-banner-
|
|
171
|
+
//# sourceMappingURL=ai-consent-banner-D7I2U-cz.js.map
|