@alfadocs/ui-kit 0.18.2 → 0.20.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/_commonjsHelpers-DaMA6jEr.js +9 -0
- package/dist/_chunks/{ai-prompt-input-B-w5Rx3V.js → ai-prompt-input-B5MdixzR.js} +2 -2
- package/dist/_chunks/{leo-sidebar-DIsiTju3.js → alia-sidebar-Bof6TlFx.js} +211 -211
- package/dist/_chunks/{chat-message-g3lxpXM_.js → chat-message-ChOnwqf_.js} +5 -5
- package/dist/_chunks/editable-currency-cell-renderer-CqMs0Y8L.js +1590 -0
- package/dist/_chunks/email-input-DvJ_kPKL.js +396 -0
- package/dist/_chunks/exceljs.min-DUJ-5CGx.js +23045 -0
- package/dist/_chunks/file-spreadsheet-zUkY8rJ2.js +25 -0
- package/dist/_chunks/{file-upload-nMh-1jDD.js → file-upload-DxAQprcU.js} +103 -122
- package/dist/_chunks/html2canvas.esm-dgT_1dIT.js +4872 -0
- package/dist/_chunks/{index-CFoBa86t.js → index-BcMWc8W2.js} +2 -2
- package/dist/_chunks/index.es-B8zMZ1wV.js +6694 -0
- package/dist/_chunks/jspdf.es.min-DaapWjR1.js +10007 -0
- package/dist/_chunks/jspdf.plugin.autotable-CSiDNyPn.js +1088 -0
- package/dist/_chunks/{map-view-DVP-Kp9l.js → map-view-CcwycFQX.js} +2 -2
- package/dist/_chunks/{purify.es-DpIUMBYC.js → purify.es-Cm3utOpm.js} +2 -2
- package/dist/_chunks/{rich-text-editor-C7TCIlQO.js → rich-text-editor-J-wAz9eN.js} +22 -22
- package/dist/_chunks/{suggestion-chip-C4Jz0LrM.js → suggestion-chip-C4kxWUIs.js} +2 -2
- package/dist/_chunks/{use-password-requirements-BOgFsoIe.js → use-password-requirements-C9vKBSVn.js} +92 -81
- package/dist/agent-catalog.json +31 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/app-frame/app-frame.d.ts +1 -1
- package/dist/components/chat-container/chat-container.d.ts +1 -1
- package/dist/components/chat-message/chat-message.d.ts +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/data-table/cell-renderers/editable-currency-cell-renderer.d.ts +23 -0
- package/dist/components/data-table/cell-renderers/editable-text-cell-renderer.d.ts +11 -0
- package/dist/components/data-table/cell-renderers/image-cell-renderer.d.ts +19 -0
- package/dist/components/data-table/cell-renderers/toggle-cell-renderer.d.ts +15 -3
- package/dist/components/data-table/data-table.d.ts +30 -3
- package/dist/components/data-table/filters/date-range-filter.d.ts +22 -0
- package/dist/components/data-table/index.d.ts +9 -2
- package/dist/components/data-table/index.js +18 -13
- package/dist/components/data-table/toolbar.d.ts +80 -1
- package/dist/components/email-input/email-input.agent.d.ts +13 -0
- package/dist/components/email-input/email-input.d.ts +28 -0
- package/dist/components/email-input/index.d.ts +5 -0
- package/dist/components/email-input/index.js +6 -0
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/password-input/index.js +1 -1
- package/dist/components/password-input/use-password-requirements.d.ts +9 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/suggestion-chip/index.js +1 -1
- package/dist/i18n/config.js +59 -9
- package/dist/i18n/resources.d.ts +59 -9
- package/dist/index.js +464 -456
- package/dist/locales/de.json +7 -3
- package/dist/locales/en.json +26 -3
- package/dist/locales/it.json +26 -3
- package/dist/patterns/alia-assistant/alia-chat-surface.d.ts +3 -0
- package/dist/patterns/alia-assistant/alia-embedded.d.ts +13 -0
- package/dist/patterns/{leo-assistant/leo-popout.d.ts → alia-assistant/alia-popout.d.ts} +4 -4
- package/dist/patterns/{leo-assistant/leo-sidebar.d.ts → alia-assistant/alia-sidebar.d.ts} +10 -10
- package/dist/patterns/{leo-assistant/leo-types.d.ts → alia-assistant/alia-types.d.ts} +23 -23
- package/dist/patterns/alia-assistant/index.d.ts +20 -0
- package/dist/patterns/alia-assistant/index.js +8 -0
- package/dist/patterns/patient-shell/patient-shell.d.ts +1 -1
- package/dist/safe-html/index.js +6 -6
- package/dist/tokens.css +1 -1
- package/package.json +14 -5
- package/dist/_chunks/_commonjsHelpers-C6fGbg64.js +0 -7
- package/dist/_chunks/balance-cell-renderer-DJB6WDPe.js +0 -1015
- package/dist/patterns/leo-assistant/index.d.ts +0 -20
- package/dist/patterns/leo-assistant/index.js +0 -8
- package/dist/patterns/leo-assistant/leo-chat-surface.d.ts +0 -3
- package/dist/patterns/leo-assistant/leo-embedded.d.ts +0 -13
|
@@ -4,7 +4,7 @@ import P, { useMemo as N, useContext as B, useEffect as E, useLayoutEffect as X,
|
|
|
4
4
|
import { c as ne } from "./index-D2ZczOXr.js";
|
|
5
5
|
import { useTranslation as Be } from "react-i18next";
|
|
6
6
|
import { createPortal as de } from "react-dom";
|
|
7
|
-
import { g as nn } from "./_commonjsHelpers-
|
|
7
|
+
import { g as nn } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
8
8
|
import { B as tn } from "./button-DD_0Xdmr.js";
|
|
9
9
|
import { u as on } from "./registry-C9nwlNyL.js";
|
|
10
10
|
import { M as rn } from "./map-pin-B8STOPMJ.js";
|
|
@@ -1939,4 +1939,4 @@ Zt.displayName = "MapView";
|
|
|
1939
1939
|
export {
|
|
1940
1940
|
Zt as M
|
|
1941
1941
|
};
|
|
1942
|
-
//# sourceMappingURL=map-view-
|
|
1942
|
+
//# sourceMappingURL=map-view-CcwycFQX.js.map
|
|
@@ -9,11 +9,11 @@ import ue from "@tiptap/extension-table-row";
|
|
|
9
9
|
import me from "@tiptap/extension-table-cell";
|
|
10
10
|
import fe from "@tiptap/extension-table-header";
|
|
11
11
|
import { Markdown as he } from "tiptap-markdown";
|
|
12
|
-
import
|
|
12
|
+
import be from "./purify.es-Cm3utOpm.js";
|
|
13
13
|
import { c as S } from "./index-D2ZczOXr.js";
|
|
14
14
|
import { useTranslation as U } from "react-i18next";
|
|
15
15
|
import * as z from "@radix-ui/react-dialog";
|
|
16
|
-
import { u as
|
|
16
|
+
import { u as pe } from "./registry-C9nwlNyL.js";
|
|
17
17
|
import { s as ge } from "./safe-image-src-DstKgCo7.js";
|
|
18
18
|
import { X as ve } from "./x-CCcI3eJp.js";
|
|
19
19
|
import { C as ke } from "./chevron-down-BX_NP2Yh.js";
|
|
@@ -229,7 +229,7 @@ const Fe = [
|
|
|
229
229
|
]
|
|
230
230
|
};
|
|
231
231
|
function I(a) {
|
|
232
|
-
return
|
|
232
|
+
return be.sanitize(a, Ze);
|
|
233
233
|
}
|
|
234
234
|
const Ue = S(
|
|
235
235
|
"tiptap-theme-alfadocs ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"
|
|
@@ -564,9 +564,9 @@ const We = se(
|
|
|
564
564
|
},
|
|
565
565
|
onUpdate({ editor: s }) {
|
|
566
566
|
L.current && (C.current && clearTimeout(C.current), C.current = setTimeout(() => {
|
|
567
|
-
var d,
|
|
568
|
-
const t = s.getHTML(), f = ((
|
|
569
|
-
(
|
|
567
|
+
var d, b, p;
|
|
568
|
+
const t = s.getHTML(), f = ((b = (d = s.storage.markdown) == null ? void 0 : d.getMarkdown) == null ? void 0 : b.call(d)) ?? "";
|
|
569
|
+
(p = L.current) == null || p.call(L, { html: t, markdown: f });
|
|
570
570
|
}, 100));
|
|
571
571
|
}
|
|
572
572
|
});
|
|
@@ -602,7 +602,7 @@ const We = se(
|
|
|
602
602
|
}),
|
|
603
603
|
[e]
|
|
604
604
|
);
|
|
605
|
-
ie(A, () => E, [E]),
|
|
605
|
+
ie(A, () => E, [E]), pe(Pe, E, a);
|
|
606
606
|
const V = B([]), [T, K] = H(0), q = j(() => Xe[R], [R]), J = _(
|
|
607
607
|
(s) => (t) => {
|
|
608
608
|
V.current[s] = t;
|
|
@@ -647,7 +647,7 @@ const We = se(
|
|
|
647
647
|
onFocus: () => K(t),
|
|
648
648
|
onKeyDown: Z
|
|
649
649
|
}, d = (n, x) => G({ pressed: n, disabled: x });
|
|
650
|
-
function
|
|
650
|
+
function b(n) {
|
|
651
651
|
return /* @__PURE__ */ r(
|
|
652
652
|
"button",
|
|
653
653
|
{
|
|
@@ -667,7 +667,7 @@ const We = se(
|
|
|
667
667
|
}
|
|
668
668
|
);
|
|
669
669
|
}
|
|
670
|
-
function
|
|
670
|
+
function p(n) {
|
|
671
671
|
return /* @__PURE__ */ r(
|
|
672
672
|
"button",
|
|
673
673
|
{
|
|
@@ -692,7 +692,7 @@ const We = se(
|
|
|
692
692
|
}
|
|
693
693
|
switch (s) {
|
|
694
694
|
case "bold":
|
|
695
|
-
return
|
|
695
|
+
return b({
|
|
696
696
|
label: o("editor.bold"),
|
|
697
697
|
pressed: e.isActive("bold"),
|
|
698
698
|
disabled: i,
|
|
@@ -707,7 +707,7 @@ const We = se(
|
|
|
707
707
|
)
|
|
708
708
|
});
|
|
709
709
|
case "italic":
|
|
710
|
-
return
|
|
710
|
+
return b({
|
|
711
711
|
label: o("editor.italic"),
|
|
712
712
|
pressed: e.isActive("italic"),
|
|
713
713
|
disabled: i,
|
|
@@ -722,7 +722,7 @@ const We = se(
|
|
|
722
722
|
)
|
|
723
723
|
});
|
|
724
724
|
case "link":
|
|
725
|
-
return
|
|
725
|
+
return p({
|
|
726
726
|
label: o("editor.link.insert"),
|
|
727
727
|
disabled: i,
|
|
728
728
|
shortcut: "Control+K Meta+K",
|
|
@@ -750,7 +750,7 @@ const We = se(
|
|
|
750
750
|
}
|
|
751
751
|
);
|
|
752
752
|
case "bulletList":
|
|
753
|
-
return
|
|
753
|
+
return b({
|
|
754
754
|
label: o("editor.list.bullet"),
|
|
755
755
|
pressed: e.isActive("bulletList"),
|
|
756
756
|
disabled: i,
|
|
@@ -764,7 +764,7 @@ const We = se(
|
|
|
764
764
|
)
|
|
765
765
|
});
|
|
766
766
|
case "orderedList":
|
|
767
|
-
return
|
|
767
|
+
return b({
|
|
768
768
|
label: o("editor.list.ordered"),
|
|
769
769
|
pressed: e.isActive("orderedList"),
|
|
770
770
|
disabled: i,
|
|
@@ -778,7 +778,7 @@ const We = se(
|
|
|
778
778
|
)
|
|
779
779
|
});
|
|
780
780
|
case "quote":
|
|
781
|
-
return
|
|
781
|
+
return b({
|
|
782
782
|
label: o("editor.quote"),
|
|
783
783
|
pressed: e.isActive("blockquote"),
|
|
784
784
|
disabled: i,
|
|
@@ -792,7 +792,7 @@ const We = se(
|
|
|
792
792
|
)
|
|
793
793
|
});
|
|
794
794
|
case "image":
|
|
795
|
-
return
|
|
795
|
+
return p({
|
|
796
796
|
label: o("editor.image.insert"),
|
|
797
797
|
disabled: i,
|
|
798
798
|
onActivate: O,
|
|
@@ -805,7 +805,7 @@ const We = se(
|
|
|
805
805
|
)
|
|
806
806
|
});
|
|
807
807
|
case "table":
|
|
808
|
-
return
|
|
808
|
+
return p({
|
|
809
809
|
label: o("editor.table.insert"),
|
|
810
810
|
disabled: i,
|
|
811
811
|
onActivate: () => e.chain().focus().insertTable({ rows: 3, cols: 3, withHeaderRow: !0 }).run(),
|
|
@@ -818,7 +818,7 @@ const We = se(
|
|
|
818
818
|
)
|
|
819
819
|
});
|
|
820
820
|
case "codeBlock":
|
|
821
|
-
return
|
|
821
|
+
return b({
|
|
822
822
|
label: o("editor.codeBlock"),
|
|
823
823
|
pressed: e.isActive("codeBlock"),
|
|
824
824
|
disabled: i,
|
|
@@ -832,7 +832,7 @@ const We = se(
|
|
|
832
832
|
)
|
|
833
833
|
});
|
|
834
834
|
case "horizontalRule":
|
|
835
|
-
return
|
|
835
|
+
return p({
|
|
836
836
|
label: o("editor.horizontalRule"),
|
|
837
837
|
disabled: i,
|
|
838
838
|
onActivate: () => e.chain().focus().setHorizontalRule().run(),
|
|
@@ -845,7 +845,7 @@ const We = se(
|
|
|
845
845
|
)
|
|
846
846
|
});
|
|
847
847
|
case "undo":
|
|
848
|
-
return
|
|
848
|
+
return p({
|
|
849
849
|
label: o("editor.undo"),
|
|
850
850
|
disabled: i || !e.can().undo(),
|
|
851
851
|
shortcut: "Control+Z Meta+Z",
|
|
@@ -859,7 +859,7 @@ const We = se(
|
|
|
859
859
|
)
|
|
860
860
|
});
|
|
861
861
|
case "redo":
|
|
862
|
-
return
|
|
862
|
+
return p({
|
|
863
863
|
label: o("editor.redo"),
|
|
864
864
|
disabled: i || !e.can().redo(),
|
|
865
865
|
shortcut: "Control+Shift+Z Meta+Shift+Z",
|
|
@@ -928,4 +928,4 @@ export {
|
|
|
928
928
|
G as t,
|
|
929
929
|
Ue as w
|
|
930
930
|
};
|
|
931
|
-
//# sourceMappingURL=rich-text-editor-
|
|
931
|
+
//# sourceMappingURL=rich-text-editor-J-wAz9eN.js.map
|
|
@@ -5,7 +5,7 @@ import { useTranslation as J } from "react-i18next";
|
|
|
5
5
|
const Q = q(
|
|
6
6
|
[
|
|
7
7
|
// `max-w-full` keeps a chip from blowing past its container when the
|
|
8
|
-
// label is long and the container is narrow (e.g. a 22rem
|
|
8
|
+
// label is long and the container is narrow (e.g. a 22rem Alia sidebar
|
|
9
9
|
// dock). Labels wrap onto multiple lines via `whitespace-normal` +
|
|
10
10
|
// `break-words` so the full text stays legible — rounded pills grow
|
|
11
11
|
// taller rather than hiding content behind an ellipsis.
|
|
@@ -164,4 +164,4 @@ export {
|
|
|
164
164
|
X as S,
|
|
165
165
|
W as a
|
|
166
166
|
};
|
|
167
|
-
//# sourceMappingURL=suggestion-chip-
|
|
167
|
+
//# sourceMappingURL=suggestion-chip-C4kxWUIs.js.map
|
package/dist/_chunks/{use-password-requirements-BOgFsoIe.js → use-password-requirements-C9vKBSVn.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as g, jsx as
|
|
2
|
-
import { forwardRef as ts, useRef as as, useState as C, useEffect as is, useCallback as p, useMemo as
|
|
3
|
-
import { c as
|
|
1
|
+
import { jsxs as g, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as ts, useRef as as, useState as C, useEffect as is, useCallback as p, useMemo as L } from "react";
|
|
3
|
+
import { c as I } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as W } from "react-i18next";
|
|
5
5
|
import { T as rs } from "./text-input-CakysYnD.js";
|
|
6
6
|
import { u as ns } from "./form-field-context-B3APVHKx.js";
|
|
@@ -100,7 +100,7 @@ const fs = [
|
|
|
100
100
|
sm: "ds:size-4",
|
|
101
101
|
md: "ds:size-[18px]",
|
|
102
102
|
lg: "ds:size-5"
|
|
103
|
-
}, bs =
|
|
103
|
+
}, bs = I(
|
|
104
104
|
[
|
|
105
105
|
"ds:absolute ds:inset-y-0 ds:end-0 ds:ps-2 ds:pe-3",
|
|
106
106
|
"ds:inline-flex ds:items-center ds:justify-center",
|
|
@@ -114,9 +114,9 @@ const fs = [
|
|
|
114
114
|
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
115
115
|
"ds:disabled:cursor-not-allowed ds:disabled:opacity-50"
|
|
116
116
|
].join(" ")
|
|
117
|
-
), vs =
|
|
117
|
+
), vs = I(
|
|
118
118
|
"ds:h-1 ds:w-full ds:overflow-hidden ds:rounded-[var(--radius-full)] ds:bg-muted"
|
|
119
|
-
), ys =
|
|
119
|
+
), ys = I(
|
|
120
120
|
[
|
|
121
121
|
"ds:h-full ds:rounded-[var(--radius-full)]",
|
|
122
122
|
"ds:transition-all ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
|
|
@@ -137,7 +137,7 @@ const fs = [
|
|
|
137
137
|
1: "fair",
|
|
138
138
|
2: "good",
|
|
139
139
|
3: "strong"
|
|
140
|
-
}, ks =
|
|
140
|
+
}, ks = I(
|
|
141
141
|
"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-meta",
|
|
142
142
|
{
|
|
143
143
|
variants: {
|
|
@@ -157,128 +157,128 @@ const fs = [
|
|
|
157
157
|
deriveStrength: u = !1,
|
|
158
158
|
autoComplete: w,
|
|
159
159
|
size: h = "md",
|
|
160
|
-
disabled:
|
|
161
|
-
name:
|
|
162
|
-
id:
|
|
163
|
-
onKeyDown:
|
|
164
|
-
onKeyUp:
|
|
165
|
-
onBlur:
|
|
166
|
-
onInput:
|
|
160
|
+
disabled: b,
|
|
161
|
+
name: o,
|
|
162
|
+
id: t,
|
|
163
|
+
onKeyDown: v,
|
|
164
|
+
onKeyUp: y,
|
|
165
|
+
onBlur: x,
|
|
166
|
+
onInput: k,
|
|
167
167
|
defaultValue: T,
|
|
168
168
|
value: m,
|
|
169
169
|
className: $,
|
|
170
170
|
...B
|
|
171
171
|
}, G) => {
|
|
172
|
-
const { t: f } = W(), M = ns().disabled ||
|
|
172
|
+
const { t: f } = W(), M = ns().disabled || b, N = as(null), J = os(G, N), [c, j] = C(!1), [Q, A] = C(!1), [_, H] = C(() => typeof m == "string" ? m : typeof T == "string" ? T : "");
|
|
173
173
|
is(() => {
|
|
174
174
|
typeof m == "string" && H(m);
|
|
175
175
|
}, [m]);
|
|
176
176
|
const X = p(
|
|
177
177
|
(s) => {
|
|
178
|
-
H(s.currentTarget.value),
|
|
178
|
+
H(s.currentTarget.value), k == null || k(s);
|
|
179
179
|
},
|
|
180
|
-
[
|
|
180
|
+
[k]
|
|
181
181
|
), z = p((s) => {
|
|
182
182
|
var R;
|
|
183
|
-
const
|
|
184
|
-
if (!
|
|
185
|
-
const
|
|
186
|
-
|
|
183
|
+
const a = N.current;
|
|
184
|
+
if (!a) return;
|
|
185
|
+
const O = Object.getPrototypeOf(a), P = (R = Object.getOwnPropertyDescriptor(O, "value")) == null ? void 0 : R.set;
|
|
186
|
+
P == null || P.call(a, s), a.dispatchEvent(new Event("input", { bubbles: !0 })), a.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
187
187
|
}, []), Y = p(() => {
|
|
188
188
|
j((s) => {
|
|
189
|
-
const
|
|
190
|
-
return e == null || e(
|
|
189
|
+
const a = !s;
|
|
190
|
+
return e == null || e(a), a;
|
|
191
191
|
});
|
|
192
|
-
}, [e]),
|
|
192
|
+
}, [e]), V = p((s) => {
|
|
193
193
|
typeof s.getModifierState == "function" && A(s.getModifierState("CapsLock"));
|
|
194
194
|
}, []), Z = p(
|
|
195
195
|
(s) => {
|
|
196
|
-
|
|
196
|
+
V(s), v == null || v(s);
|
|
197
197
|
},
|
|
198
|
-
[
|
|
199
|
-
),
|
|
198
|
+
[V, v]
|
|
199
|
+
), q = p(
|
|
200
200
|
(s) => {
|
|
201
|
-
|
|
201
|
+
V(s), y == null || y(s);
|
|
202
202
|
},
|
|
203
|
-
[
|
|
204
|
-
),
|
|
203
|
+
[V, y]
|
|
204
|
+
), D = p(
|
|
205
205
|
(s) => {
|
|
206
|
-
A(!1),
|
|
206
|
+
A(!1), x == null || x(s);
|
|
207
207
|
},
|
|
208
|
-
[
|
|
209
|
-
), U =
|
|
208
|
+
[x]
|
|
209
|
+
), U = L(
|
|
210
210
|
() => ({
|
|
211
211
|
getValue: () => {
|
|
212
212
|
var s;
|
|
213
|
-
return ((s =
|
|
213
|
+
return ((s = N.current) == null ? void 0 : s.value) ?? "";
|
|
214
214
|
},
|
|
215
215
|
setValue: (s) => z(s),
|
|
216
216
|
clear: () => z(""),
|
|
217
217
|
focus: () => {
|
|
218
218
|
var s;
|
|
219
|
-
return (s =
|
|
219
|
+
return (s = N.current) == null ? void 0 : s.focus();
|
|
220
220
|
},
|
|
221
221
|
isRevealed: () => c,
|
|
222
222
|
toggleVisibility: () => {
|
|
223
223
|
j((s) => {
|
|
224
|
-
const
|
|
225
|
-
return e == null || e(
|
|
224
|
+
const a = !s;
|
|
225
|
+
return e == null || e(a), a;
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
228
|
}),
|
|
229
229
|
[e, c, z]
|
|
230
230
|
);
|
|
231
|
-
ds(hs, U,
|
|
231
|
+
ds(hs, U, t);
|
|
232
232
|
const F = ws[h], ss = f(
|
|
233
233
|
c ? "inputs.password.toggleHide" : "inputs.password.toggleShow",
|
|
234
234
|
c ? "Hide password" : "Show password"
|
|
235
|
-
),
|
|
235
|
+
), d = L(
|
|
236
236
|
() => (l == null ? void 0 : l.map((s) => ({
|
|
237
237
|
...s,
|
|
238
238
|
met: s.test(_)
|
|
239
239
|
}))) ?? null,
|
|
240
240
|
[l, _]
|
|
241
|
-
), es =
|
|
242
|
-
if (!u || !(
|
|
243
|
-
const s =
|
|
244
|
-
return Math.min(3, Math.floor(s /
|
|
245
|
-
}, [u,
|
|
246
|
-
`inputs.password.strength.${
|
|
247
|
-
|
|
241
|
+
), es = L(() => {
|
|
242
|
+
if (!u || !(d != null && d.length)) return 0;
|
|
243
|
+
const s = d.filter((O) => O.met).length, a = d.length;
|
|
244
|
+
return Math.min(3, Math.floor(s / a * 4));
|
|
245
|
+
}, [u, d]), E = n !== void 0 ? n : u ? es : 0, S = xs[E], K = f(
|
|
246
|
+
`inputs.password.strength.${S}`,
|
|
247
|
+
S.charAt(0).toUpperCase() + S.slice(1)
|
|
248
248
|
);
|
|
249
249
|
return /* @__PURE__ */ g(
|
|
250
250
|
"div",
|
|
251
251
|
{
|
|
252
252
|
"data-component": "password-input",
|
|
253
|
-
"data-component-id":
|
|
253
|
+
"data-component-id": t,
|
|
254
254
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
255
255
|
children: [
|
|
256
256
|
/* @__PURE__ */ g("div", { className: "ds:relative", children: [
|
|
257
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ i(
|
|
258
258
|
rs,
|
|
259
259
|
{
|
|
260
260
|
ref: J,
|
|
261
|
-
id:
|
|
261
|
+
id: t,
|
|
262
262
|
type: c ? "text" : "password",
|
|
263
263
|
autoComplete: w ?? "current-password",
|
|
264
|
-
name:
|
|
264
|
+
name: o ?? "password",
|
|
265
265
|
spellCheck: !1,
|
|
266
266
|
autoCapitalize: "none",
|
|
267
267
|
autoCorrect: "off",
|
|
268
268
|
size: h,
|
|
269
269
|
disabled: M,
|
|
270
270
|
onKeyDown: Z,
|
|
271
|
-
onKeyUp:
|
|
272
|
-
onBlur:
|
|
271
|
+
onKeyUp: q,
|
|
272
|
+
onBlur: D,
|
|
273
273
|
onInput: X,
|
|
274
274
|
value: m,
|
|
275
275
|
defaultValue: T,
|
|
276
|
-
endAdornment: /* @__PURE__ */
|
|
276
|
+
endAdornment: /* @__PURE__ */ i("span", { "aria-hidden": "true", className: "ds:block ds:size-4" }),
|
|
277
277
|
className: $,
|
|
278
278
|
...B
|
|
279
279
|
}
|
|
280
280
|
),
|
|
281
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ i(
|
|
282
282
|
"button",
|
|
283
283
|
{
|
|
284
284
|
type: "button",
|
|
@@ -287,11 +287,11 @@ const fs = [
|
|
|
287
287
|
disabled: M,
|
|
288
288
|
onClick: Y,
|
|
289
289
|
className: bs(),
|
|
290
|
-
children: c ? /* @__PURE__ */
|
|
290
|
+
children: c ? /* @__PURE__ */ i(ls, { "aria-hidden": "true", className: F }) : /* @__PURE__ */ i(gs, { "aria-hidden": "true", className: F })
|
|
291
291
|
}
|
|
292
292
|
)
|
|
293
293
|
] }),
|
|
294
|
-
|
|
294
|
+
d && d.length > 0 ? (
|
|
295
295
|
// `role="list"` / `role="listitem"` are set explicitly even
|
|
296
296
|
// though they're the implicit roles on <ul>/<li> — Safari
|
|
297
297
|
// VoiceOver strips the implicit list role when CSS sets
|
|
@@ -305,14 +305,14 @@ const fs = [
|
|
|
305
305
|
// alone wouldn't trigger an announcement — the sr-only span
|
|
306
306
|
// is the load-bearing piece for AT users.
|
|
307
307
|
// eslint-disable-next-line jsx-a11y/no-redundant-roles
|
|
308
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ i(
|
|
309
309
|
"ul",
|
|
310
310
|
{
|
|
311
311
|
role: "list",
|
|
312
312
|
"aria-live": "polite",
|
|
313
313
|
"data-component": "password-requirements",
|
|
314
314
|
className: "ds:list-none ds:m-0 ds:p-0 ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
|
|
315
|
-
children:
|
|
315
|
+
children: d.map((s) => (
|
|
316
316
|
// eslint-disable-next-line jsx-a11y/no-redundant-roles
|
|
317
317
|
/* @__PURE__ */ g(
|
|
318
318
|
"li",
|
|
@@ -321,20 +321,20 @@ const fs = [
|
|
|
321
321
|
"data-state": s.met ? "met" : "unmet",
|
|
322
322
|
className: ks({ met: s.met }),
|
|
323
323
|
children: [
|
|
324
|
-
s.met ? /* @__PURE__ */
|
|
324
|
+
s.met ? /* @__PURE__ */ i(
|
|
325
325
|
ps,
|
|
326
326
|
{
|
|
327
327
|
"aria-hidden": "true",
|
|
328
328
|
className: "ds:size-3.5 ds:text-success ds:shrink-0"
|
|
329
329
|
}
|
|
330
|
-
) : /* @__PURE__ */
|
|
330
|
+
) : /* @__PURE__ */ i(
|
|
331
331
|
us,
|
|
332
332
|
{
|
|
333
333
|
"aria-hidden": "true",
|
|
334
334
|
className: "ds:size-3.5 ds:shrink-0"
|
|
335
335
|
}
|
|
336
336
|
),
|
|
337
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ i("span", { children: s.label }),
|
|
338
338
|
/* @__PURE__ */ g("span", { className: "ds:sr-only", children: [
|
|
339
339
|
" — ",
|
|
340
340
|
s.met ? f("inputs.password.requirements.met", "met") : f("inputs.password.requirements.unmet", "not yet met")
|
|
@@ -354,13 +354,13 @@ const fs = [
|
|
|
354
354
|
"aria-live": "polite",
|
|
355
355
|
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-meta ds:text-warning",
|
|
356
356
|
children: [
|
|
357
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ i(ms, { "aria-hidden": "true", className: "ds:size-3.5" }),
|
|
358
358
|
f("inputs.password.capsLock", "Caps Lock is on")
|
|
359
359
|
]
|
|
360
360
|
}
|
|
361
361
|
) : null,
|
|
362
362
|
r ? /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
363
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ i(
|
|
364
364
|
"div",
|
|
365
365
|
{
|
|
366
366
|
role: "progressbar",
|
|
@@ -373,7 +373,7 @@ const fs = [
|
|
|
373
373
|
),
|
|
374
374
|
"aria-valuetext": K,
|
|
375
375
|
className: vs(),
|
|
376
|
-
children: /* @__PURE__ */
|
|
376
|
+
children: /* @__PURE__ */ i(
|
|
377
377
|
"div",
|
|
378
378
|
{
|
|
379
379
|
className: ys({ level: E })
|
|
@@ -381,7 +381,7 @@ const fs = [
|
|
|
381
381
|
)
|
|
382
382
|
}
|
|
383
383
|
),
|
|
384
|
-
/* @__PURE__ */
|
|
384
|
+
/* @__PURE__ */ i(
|
|
385
385
|
"span",
|
|
386
386
|
{
|
|
387
387
|
"aria-hidden": "true",
|
|
@@ -397,47 +397,58 @@ const fs = [
|
|
|
397
397
|
);
|
|
398
398
|
Ns.displayName = "PasswordInput";
|
|
399
399
|
function Hs(e = {}) {
|
|
400
|
-
const { t: r } = W(), { minLength: n, uppercase: l, lowercase: u, digit: w, symbol: h } = e;
|
|
401
|
-
return
|
|
402
|
-
const
|
|
403
|
-
return typeof n == "number" && n > 0 &&
|
|
400
|
+
const { t: r } = W(), { minLength: n, uppercase: l, lowercase: u, digit: w, symbol: h, noSpaces: b } = e;
|
|
401
|
+
return L(() => {
|
|
402
|
+
const o = [];
|
|
403
|
+
return typeof n == "number" && n > 0 && o.push({
|
|
404
404
|
id: "length",
|
|
405
405
|
label: r("inputs.password.requirements.length", {
|
|
406
406
|
count: n,
|
|
407
407
|
defaultValue: `At least ${n} characters`
|
|
408
408
|
}),
|
|
409
|
-
test: (
|
|
410
|
-
}), l &&
|
|
409
|
+
test: (t) => t.length >= n
|
|
410
|
+
}), l && o.push({
|
|
411
411
|
id: "uppercase",
|
|
412
412
|
label: r(
|
|
413
413
|
"inputs.password.requirements.uppercase",
|
|
414
414
|
"One uppercase letter"
|
|
415
415
|
),
|
|
416
|
-
test: (
|
|
417
|
-
}), u &&
|
|
416
|
+
test: (t) => new RegExp("\\p{Lu}", "u").test(t)
|
|
417
|
+
}), u && o.push({
|
|
418
418
|
id: "lowercase",
|
|
419
419
|
label: r(
|
|
420
420
|
"inputs.password.requirements.lowercase",
|
|
421
421
|
"One lowercase letter"
|
|
422
422
|
),
|
|
423
|
-
test: (
|
|
424
|
-
}), w &&
|
|
423
|
+
test: (t) => new RegExp("\\p{Ll}", "u").test(t)
|
|
424
|
+
}), w && o.push({
|
|
425
425
|
id: "digit",
|
|
426
426
|
label: r("inputs.password.requirements.digit", "One number"),
|
|
427
|
-
test: (
|
|
428
|
-
}), h &&
|
|
427
|
+
test: (t) => new RegExp("\\p{Nd}", "u").test(t)
|
|
428
|
+
}), h && o.push({
|
|
429
429
|
id: "symbol",
|
|
430
430
|
label: r("inputs.password.requirements.symbol", "One symbol"),
|
|
431
431
|
// Anything that isn't a letter, number, or whitespace counts.
|
|
432
432
|
// `\p{L}` + `\p{N}` keep this Unicode-aware so non-Latin
|
|
433
433
|
// alphabets (Arabic, Chinese, …) aren't mis-classified as
|
|
434
434
|
// symbols.
|
|
435
|
-
test: (
|
|
436
|
-
}),
|
|
437
|
-
|
|
435
|
+
test: (t) => /[^\p{L}\p{N}\s]/u.test(t)
|
|
436
|
+
}), b && o.push({
|
|
437
|
+
id: "no-spaces",
|
|
438
|
+
label: r("inputs.password.requirements.noSpaces", "No spaces"),
|
|
439
|
+
// `\s` covers ASCII space + tab + newline. The explicit
|
|
440
|
+
// U+00A0 (non-breaking space) and U+202F (narrow no-break
|
|
441
|
+
// space) catch the two paste-time characters credential
|
|
442
|
+
// managers and rich-text editors most often inject without
|
|
443
|
+
// the user noticing — those are NOT always in `\s`.
|
|
444
|
+
// Authored via hex escapes (not literal characters) so the
|
|
445
|
+
// source file passes `no-irregular-whitespace`.
|
|
446
|
+
test: (t) => !/[\s\u00A0\u202F]/.test(t)
|
|
447
|
+
}), o;
|
|
448
|
+
}, [r, n, l, u, w, h, b]);
|
|
438
449
|
}
|
|
439
450
|
export {
|
|
440
451
|
Ns as P,
|
|
441
452
|
Hs as u
|
|
442
453
|
};
|
|
443
|
-
//# sourceMappingURL=use-password-requirements-
|
|
454
|
+
//# sourceMappingURL=use-password-requirements-C9vKBSVn.js.map
|
package/dist/agent-catalog.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"packageVersion": "0.
|
|
3
|
+
"packageVersion": "0.20.0",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"kind": "component",
|
|
@@ -1430,6 +1430,36 @@
|
|
|
1430
1430
|
}
|
|
1431
1431
|
}
|
|
1432
1432
|
},
|
|
1433
|
+
{
|
|
1434
|
+
"kind": "component",
|
|
1435
|
+
"id": "email-input",
|
|
1436
|
+
"capabilities": [],
|
|
1437
|
+
"state": [
|
|
1438
|
+
{
|
|
1439
|
+
"name": "value",
|
|
1440
|
+
"type": "string",
|
|
1441
|
+
"description": "The current email address typed into the field."
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
"name": "isValid",
|
|
1445
|
+
"type": "boolean",
|
|
1446
|
+
"description": "True when the value is non-empty AND parses as a valid email per RFC 5322."
|
|
1447
|
+
}
|
|
1448
|
+
],
|
|
1449
|
+
"actions": [],
|
|
1450
|
+
"domHooks": {
|
|
1451
|
+
"root": {
|
|
1452
|
+
"attr": "data-component",
|
|
1453
|
+
"value": "email-input",
|
|
1454
|
+
"description": "Marks the EmailInput wrapper. The inline error element carries `role=\"alert\"` when validation fails."
|
|
1455
|
+
},
|
|
1456
|
+
"instanceId": {
|
|
1457
|
+
"attr": "data-component-id",
|
|
1458
|
+
"sourceProp": "id",
|
|
1459
|
+
"description": "Sourced from the id prop, when provided."
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
},
|
|
1433
1463
|
{
|
|
1434
1464
|
"kind": "component",
|
|
1435
1465
|
"id": "empty-state",
|
|
@@ -10,7 +10,7 @@ export interface AppFrameProps extends Omit<HTMLAttributes<HTMLDivElement>, 'chi
|
|
|
10
10
|
sidebar: ReactNode;
|
|
11
11
|
/** Main content — rendered inside a `<main>` landmark. */
|
|
12
12
|
children: ReactNode;
|
|
13
|
-
/** Optional inline-end docked panel (typically `<
|
|
13
|
+
/** Optional inline-end docked panel (typically `<AliaSidebar />`) sharing the same row as the main region on ≥ md viewports. Hidden on narrow viewports — consumers should flip to an overlay/popout mode there. */
|
|
14
14
|
endSidebar?: ReactNode;
|
|
15
15
|
/** Optional block-end footer — renders full-width below the sidebar + main row. */
|
|
16
16
|
footer?: ReactNode;
|
|
@@ -28,7 +28,7 @@ export interface ChatContainerProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
28
28
|
* away from the newest message. Defaults to `false` because the
|
|
29
29
|
* affordance is only useful in long-form chat surfaces (fullscreen
|
|
30
30
|
* assistants, dedicated messaging views); in compact docks — e.g. the
|
|
31
|
-
*
|
|
31
|
+
* Alia side-panel — conversations rarely exceed one screen and the FAB
|
|
32
32
|
* just adds visual noise. Turn on for fullscreen chat surfaces.
|
|
33
33
|
*/
|
|
34
34
|
showScrollToLatest?: boolean;
|