@alea-design/ui 0.2.0 → 0.3.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.
- package/README.md +2 -2
- package/dist/components/accordion/Accordion.js +29 -0
- package/dist/components/ai/AI.d.ts +5 -1
- package/dist/components/ai/AI.js +187 -0
- package/dist/components/app/AppParts.d.ts +16 -4
- package/dist/components/app/AppParts.js +134 -0
- package/dist/components/button/Button.d.ts +1 -1
- package/dist/components/button/Button.js +137 -0
- package/dist/components/button/Groups.d.ts +1 -1
- package/dist/components/button/Groups.js +112 -0
- package/dist/components/card/Card.d.ts +3 -2
- package/dist/components/card/Card.js +47 -0
- package/dist/components/chat/Chat.d.ts +4 -2
- package/dist/components/chat/Chat.js +275 -0
- package/dist/components/choice/Choice.js +69 -0
- package/dist/components/color/Color.d.ts +3 -3
- package/dist/components/color/Color.js +98 -0
- package/dist/components/combobox/Autocomplete.d.ts +5 -5
- package/dist/components/combobox/Autocomplete.js +126 -0
- package/dist/components/combobox/ComboBox.d.ts +4 -4
- package/dist/components/combobox/ComboBox.js +112 -0
- package/dist/components/combobox/Highlight.js +50 -0
- package/dist/components/command/CommandPalette.d.ts +10 -3
- package/dist/components/command/CommandPalette.js +56 -0
- package/dist/components/content/Content.d.ts +1 -1
- package/dist/components/content/Content.js +125 -0
- package/dist/components/data/Data.js +79 -0
- package/dist/components/date/Date.js +109 -0
- package/dist/components/display/Display.d.ts +5 -3
- package/dist/components/display/Display.js +89 -0
- package/dist/components/display/Display2.d.ts +3 -1
- package/dist/components/display/Display2.js +75 -0
- package/dist/components/emoji/EmojiPicker.js +52 -0
- package/dist/components/emoji/emoji-data.js +27 -0
- package/dist/components/extras/CodeSteps.d.ts +1 -0
- package/dist/components/extras/CodeSteps.js +19 -0
- package/dist/components/extras/Extras.d.ts +1 -1
- package/dist/components/extras/Extras.js +116 -0
- package/dist/components/feedback/Feedback.d.ts +11 -8
- package/dist/components/feedback/Feedback.js +185 -0
- package/dist/components/feedback/Spinner.js +18 -0
- package/dist/components/feedback/Status.d.ts +6 -2
- package/dist/components/feedback/Status.js +48 -0
- package/dist/components/field/Field.d.ts +1 -1
- package/dist/components/field/Field.js +187 -0
- package/dist/components/field/FieldLoading.d.ts +1 -1
- package/dist/components/field/FieldLoading.js +18 -0
- package/dist/components/filter/FilterBar.js +96 -0
- package/dist/components/form/Form.d.ts +5 -5
- package/dist/components/form/Form.js +53 -0
- package/dist/components/icon/Icon.d.ts +2 -2
- package/dist/components/icon/Icon.js +66 -0
- package/dist/components/icon/icon-cells.js +39 -0
- package/dist/components/icon/icon-contexts.d.ts +1 -1
- package/dist/components/icon/icon-contexts.js +38 -0
- package/dist/components/icon/icon-names.d.ts +1 -1
- package/dist/components/icon/icon-names.js +376 -0
- package/dist/components/layout/Bento.d.ts +1 -1
- package/dist/components/layout/Bento.js +38 -0
- package/dist/components/layout/Layout.d.ts +1 -1
- package/dist/components/layout/Layout.js +54 -0
- package/dist/components/layout/Layout2.d.ts +36 -6
- package/dist/components/layout/Layout2.js +105 -0
- package/dist/components/layout/Layout3.js +35 -0
- package/dist/components/layout/Responsive.d.ts +1 -1
- package/dist/components/layout/Responsive.js +32 -0
- package/dist/components/list/List.d.ts +3 -2
- package/dist/components/list/List.js +82 -0
- package/dist/components/list/Lists2.d.ts +6 -4
- package/dist/components/list/Lists2.js +60 -0
- package/dist/components/media/Media.d.ts +8 -4
- package/dist/components/media/Media.js +188 -0
- package/dist/components/menu/Menu.d.ts +23 -12
- package/dist/components/menu/Menu.js +68 -0
- package/dist/components/more/More.d.ts +7 -7
- package/dist/components/more/More.js +182 -0
- package/dist/components/navigation/Navbar.d.ts +1 -1
- package/dist/components/navigation/Navbar.js +27 -0
- package/dist/components/navigation/Navigation.js +121 -0
- package/dist/components/navigation/Navigation2.d.ts +6 -2
- package/dist/components/navigation/Navigation2.js +355 -0
- package/dist/components/overlay/Drawer.d.ts +11 -6
- package/dist/components/overlay/Drawer.js +39 -0
- package/dist/components/overlay/Modal.d.ts +6 -3
- package/dist/components/overlay/Modal.js +27 -0
- package/dist/components/overlay/Overlay.d.ts +14 -9
- package/dist/components/overlay/Overlay.js +76 -0
- package/dist/components/overlay/Sheet.d.ts +11 -5
- package/dist/components/overlay/Sheet.js +52 -0
- package/dist/components/page/Page.d.ts +5 -5
- package/dist/components/page/Page.js +132 -0
- package/dist/components/page/PageParts.d.ts +5 -5
- package/dist/components/page/PageParts.js +109 -0
- package/dist/components/picker/Picker.d.ts +11 -11
- package/dist/components/picker/Picker.js +294 -0
- package/dist/components/picker/Wheel.js +132 -0
- package/dist/components/rating/Rating.d.ts +2 -1
- package/dist/components/rating/Rating.js +66 -0
- package/dist/components/select/Select.d.ts +8 -6
- package/dist/components/select/Select.js +146 -0
- package/dist/components/shell/AppShell.d.ts +3 -3
- package/dist/components/shell/AppShell.js +56 -0
- package/dist/components/shell/AppSidebar.d.ts +5 -5
- package/dist/components/shell/AppSidebar.js +62 -0
- package/dist/components/slider/Slider.d.ts +2 -1
- package/dist/components/slider/Slider.js +36 -0
- package/dist/components/surface/Surface.d.ts +16 -0
- package/dist/components/surface/Surface.js +7 -0
- package/dist/components/table/Table.d.ts +4 -3
- package/dist/components/table/Table.js +58 -0
- package/dist/components/tabs/Tabs.d.ts +1 -0
- package/dist/components/tabs/Tabs.js +120 -0
- package/dist/components/theme/Theme.d.ts +11 -6
- package/dist/components/theme/Theme.js +186 -0
- package/dist/components/theme/lens.js +104 -0
- package/dist/components/tree/Tree.js +303 -0
- package/dist/components/typography/Typography.js +43 -0
- package/dist/components/upload/Upload.js +71 -0
- package/dist/components/work/Ops.js +24 -0
- package/dist/components/work/Work.d.ts +4 -2
- package/dist/components/work/Work.js +241 -0
- package/dist/css/accordion.css +1 -0
- package/dist/css/ai.css +1 -0
- package/dist/css/app.css +1 -0
- package/dist/css/base.css +1 -0
- package/dist/css/button.css +1 -0
- package/dist/css/card.css +1 -0
- package/dist/css/chat.css +1 -0
- package/dist/css/choice.css +1 -0
- package/dist/css/color.css +1 -0
- package/dist/css/combobox.css +1 -0
- package/dist/css/command.css +1 -0
- package/dist/css/content.css +1 -0
- package/dist/css/data.css +1 -0
- package/dist/css/date.css +1 -0
- package/dist/css/display.css +1 -0
- package/dist/css/emoji.css +1 -0
- package/dist/css/extras.css +1 -0
- package/dist/css/feedback.css +1 -0
- package/dist/css/field.css +1 -0
- package/dist/css/filter.css +1 -0
- package/dist/css/form.css +1 -0
- package/dist/css/groups.json +346 -0
- package/dist/css/icon.css +1 -0
- package/dist/css/layout.css +1 -0
- package/dist/css/list.css +1 -0
- package/dist/css/media.css +1 -0
- package/dist/css/menu.css +1 -0
- package/dist/css/more.css +1 -0
- package/dist/css/navigation.css +1 -0
- package/dist/css/overlay.css +1 -0
- package/dist/css/page.css +1 -0
- package/dist/css/picker.css +1 -0
- package/dist/css/rating.css +1 -0
- package/dist/css/select.css +1 -0
- package/dist/css/shell.css +1 -0
- package/dist/css/slider.css +1 -0
- package/dist/css/surface.css +1 -0
- package/dist/css/table.css +1 -0
- package/dist/css/tabs.css +1 -0
- package/dist/css/tree.css +1 -0
- package/dist/css/typography.css +1 -0
- package/dist/css/upload.css +1 -0
- package/dist/css/work.css +1 -0
- package/dist/i18n/strings.js +842 -0
- package/dist/index.d.ts +71 -70
- package/dist/index.js +398 -7436
- package/dist/styles.css +1 -1
- package/dist/utils/Blueprint.js +131 -0
- package/dist/utils/DotField.js +32 -0
- package/dist/utils/attr.d.ts +1 -1
- package/dist/utils/attr.js +18 -0
- package/dist/utils/blueprintScene.js +161 -0
- package/dist/utils/controlled.js +11 -0
- package/dist/utils/cx.js +11 -0
- package/dist/utils/inert.js +9 -0
- package/dist/utils/refs.d.ts +3 -0
- package/dist/utils/refs.js +11 -0
- package/dist/utils/responsive.js +12 -0
- package/dist/utils/scrollEdges.js +31 -0
- package/dist/utils/space.js +10 -0
- package/dist/utils/vocabulary.d.ts +6 -0
- package/dist/utils/vocabulary.js +17 -0
- package/package.json +12 -8
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as l, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { useState as w } from "react";
|
|
4
|
+
import { useLocale as P, TextField as S, Label as I, TextArea as L } from "react-aria-components";
|
|
5
|
+
import { X as g, Lock as k } from "lucide-react";
|
|
6
|
+
import { cx as f } from "../../utils/cx.js";
|
|
7
|
+
import { Avatar as x } from "../display/Display.js";
|
|
8
|
+
import { IconButton as b, Button as y } from "../button/Button.js";
|
|
9
|
+
import { useStrings as p } from "../../i18n/strings.js";
|
|
10
|
+
function O({ name: i, src: m, secondary: s, tertiary: t, status: c, size: e = "md", textPosition: d = "after", end: n, className: o }) {
|
|
11
|
+
const r = { sm: "xs", md: "md", lg: "lg", xl: "xl" }[e];
|
|
12
|
+
return /* @__PURE__ */ l("div", { className: f("alea-persona", o), "data-size": e, "data-text": d, children: [
|
|
13
|
+
/* @__PURE__ */ a(x, { name: i, src: m, size: r, status: c }),
|
|
14
|
+
/* @__PURE__ */ l("div", { className: "alea-persona-text", children: [
|
|
15
|
+
/* @__PURE__ */ a("span", { className: "alea-persona-name", children: i }),
|
|
16
|
+
s && e !== "sm" && /* @__PURE__ */ a("span", { className: "alea-persona-secondary", children: s }),
|
|
17
|
+
t && (e === "lg" || e === "xl") && /* @__PURE__ */ a("span", { className: "alea-persona-tertiary", children: t })
|
|
18
|
+
] }),
|
|
19
|
+
n && /* @__PURE__ */ a("div", { className: "alea-persona-end", children: n })
|
|
20
|
+
] });
|
|
21
|
+
}
|
|
22
|
+
function D(i, m) {
|
|
23
|
+
const s = (i.getTime() - Date.now()) / 1e3, t = new Intl.RelativeTimeFormat(m, { numeric: "auto" }), c = [["second", 60], ["minute", 60], ["hour", 24], ["day", 7], ["week", 4.35], ["month", 12], ["year", 1 / 0]];
|
|
24
|
+
let e = s;
|
|
25
|
+
for (const [d, n] of c) {
|
|
26
|
+
if (Math.abs(e) < n) return t.format(Math.round(e), d);
|
|
27
|
+
e /= n;
|
|
28
|
+
}
|
|
29
|
+
return t.format(Math.round(e), "year");
|
|
30
|
+
}
|
|
31
|
+
function R({ author: i, avatarSrc: m, time: s, children: t, actions: c, badge: e, isEdited: d, restricted: n, isHighlighted: o, state: r, errorMessage: N, replies: u, headingLevel: v, className: h }) {
|
|
32
|
+
const z = p(), { locale: C } = P(), T = v ? `h${v}` : "span";
|
|
33
|
+
return /* @__PURE__ */ l("article", { className: f("alea-comment", h), "data-highlighted": o || void 0, "data-state": r, "aria-busy": r === "saving" || void 0, children: [
|
|
34
|
+
/* @__PURE__ */ a(x, { name: i, src: m, size: "sm" }),
|
|
35
|
+
/* @__PURE__ */ l("div", { className: "alea-comment-main", children: [
|
|
36
|
+
/* @__PURE__ */ l("header", { className: "alea-comment-head", children: [
|
|
37
|
+
/* @__PURE__ */ a(T, { className: "alea-comment-author", children: i }),
|
|
38
|
+
e && /* @__PURE__ */ a("span", { className: "alea-comment-badge", children: e }),
|
|
39
|
+
s && (s instanceof Date ? /* @__PURE__ */ a("time", { className: "alea-comment-time", dateTime: s.toISOString(), title: s.toLocaleString(), children: D(s, C) }) : /* @__PURE__ */ a("span", { className: "alea-comment-time", children: s })),
|
|
40
|
+
d && /* @__PURE__ */ l("span", { className: "alea-comment-time", children: [
|
|
41
|
+
"· ",
|
|
42
|
+
z.edited
|
|
43
|
+
] }),
|
|
44
|
+
n && /* @__PURE__ */ l("span", { className: "alea-comment-restricted", children: [
|
|
45
|
+
/* @__PURE__ */ a(k, { size: 12, "aria-hidden": "true" }),
|
|
46
|
+
" ",
|
|
47
|
+
n
|
|
48
|
+
] })
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ a("div", { className: "alea-comment-body", children: t }),
|
|
51
|
+
r === "failed" && N && /* @__PURE__ */ a("p", { className: "alea-comment-error", role: "alert", children: N }),
|
|
52
|
+
c && /* @__PURE__ */ a("div", { className: "alea-comment-actions", children: c }),
|
|
53
|
+
u && /* @__PURE__ */ a("div", { className: "alea-comment-replies", children: u })
|
|
54
|
+
] })
|
|
55
|
+
] });
|
|
56
|
+
}
|
|
57
|
+
function X({ onSubmit: i, author: m, avatarSrc: s, placeholder: t, label: c, submitLabel: e, onCancel: d, isSubmitting: n, className: o }) {
|
|
58
|
+
const r = p(), [N, u] = w(""), v = () => {
|
|
59
|
+
const h = N.trim();
|
|
60
|
+
!h || n || (i(h), u(""));
|
|
61
|
+
};
|
|
62
|
+
return /* @__PURE__ */ l("div", { className: f("alea-comment-composer", o), children: [
|
|
63
|
+
m && /* @__PURE__ */ a(x, { name: m, src: s, size: "sm" }),
|
|
64
|
+
/* @__PURE__ */ l(S, { className: "alea-comment-field", value: N, onChange: u, "aria-label": c ?? r.comment, children: [
|
|
65
|
+
/* @__PURE__ */ a(I, { className: "alea-visually-hidden", children: c ?? r.comment }),
|
|
66
|
+
/* @__PURE__ */ a(
|
|
67
|
+
L,
|
|
68
|
+
{
|
|
69
|
+
className: "alea-comment-input",
|
|
70
|
+
placeholder: t ?? r.addComment,
|
|
71
|
+
rows: 1,
|
|
72
|
+
style: { fieldSizing: "content" },
|
|
73
|
+
onKeyDown: (h) => {
|
|
74
|
+
h.key === "Enter" && (h.metaKey || h.ctrlKey) && (h.preventDefault(), v());
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
/* @__PURE__ */ l("div", { className: "alea-comment-composer-actions", children: [
|
|
79
|
+
d && /* @__PURE__ */ a(y, { size: "sm", variant: "text", onPress: d, children: r.cancel }),
|
|
80
|
+
/* @__PURE__ */ a(y, { size: "sm", onPress: v, isDisabled: !N.trim(), isLoading: n, shortcut: "⌘↵", children: e ?? r.comment })
|
|
81
|
+
] })
|
|
82
|
+
] })
|
|
83
|
+
] });
|
|
84
|
+
}
|
|
85
|
+
function q({ media: i, title: m, children: s, primaryAction: t, secondaryAction: c, onDismiss: e, layout: d = "horizontal", headingLevel: n = 3, className: o }) {
|
|
86
|
+
const r = p(), N = `h${n}`;
|
|
87
|
+
return /* @__PURE__ */ l("section", { className: f("alea-media-card", o), "data-layout": d, children: [
|
|
88
|
+
/* @__PURE__ */ l("div", { className: "alea-card-inner", children: [
|
|
89
|
+
/* @__PURE__ */ a("div", { className: "alea-media-card-media", children: i }),
|
|
90
|
+
/* @__PURE__ */ l("div", { className: "alea-media-card-body", children: [
|
|
91
|
+
/* @__PURE__ */ a(N, { className: "alea-media-card-title", children: m }),
|
|
92
|
+
s && /* @__PURE__ */ a("div", { className: "alea-media-card-text", children: s }),
|
|
93
|
+
(t || c) && /* @__PURE__ */ l("div", { className: "alea-media-card-actions", children: [
|
|
94
|
+
t,
|
|
95
|
+
c
|
|
96
|
+
] })
|
|
97
|
+
] })
|
|
98
|
+
] }),
|
|
99
|
+
e && /* @__PURE__ */ a(b, { "aria-label": r.dismiss, size: "sm", variant: "text", className: "alea-card-dismiss", onPress: e, children: /* @__PURE__ */ a(g, {}) })
|
|
100
|
+
] });
|
|
101
|
+
}
|
|
102
|
+
function G({ title: i, children: m, illustration: s, primaryAction: t, secondaryAction: c, onDismiss: e, headingLevel: d = 3, className: n }) {
|
|
103
|
+
const o = p(), r = `h${d}`;
|
|
104
|
+
return /* @__PURE__ */ l("section", { className: f("alea-callout-card", n), children: [
|
|
105
|
+
/* @__PURE__ */ l("div", { className: "alea-card-inner", children: [
|
|
106
|
+
/* @__PURE__ */ l("div", { className: "alea-callout-card-body", children: [
|
|
107
|
+
/* @__PURE__ */ a(r, { className: "alea-media-card-title", children: i }),
|
|
108
|
+
m && /* @__PURE__ */ a("div", { className: "alea-media-card-text", children: m }),
|
|
109
|
+
(t || c) && /* @__PURE__ */ l("div", { className: "alea-media-card-actions", children: [
|
|
110
|
+
t,
|
|
111
|
+
c
|
|
112
|
+
] })
|
|
113
|
+
] }),
|
|
114
|
+
s && /* @__PURE__ */ a("div", { className: "alea-callout-card-art", "aria-hidden": "true", children: s })
|
|
115
|
+
] }),
|
|
116
|
+
e && /* @__PURE__ */ a(b, { "aria-label": o.dismiss, size: "sm", variant: "text", className: "alea-card-dismiss", onPress: e, children: /* @__PURE__ */ a(g, {}) })
|
|
117
|
+
] });
|
|
118
|
+
}
|
|
119
|
+
export {
|
|
120
|
+
G as CalloutCard,
|
|
121
|
+
R as Comment,
|
|
122
|
+
X as CommentComposer,
|
|
123
|
+
q as MediaCard,
|
|
124
|
+
O as Persona
|
|
125
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import { createElement as A, useState as C, useRef as k, useEffect as z } from "react";
|
|
4
|
+
import { Inbox as g, ServerCrash as E, Lock as I, SearchX as M, CircleAlert as D, CircleCheck as R, TrendingUp as T, TrendingDown as j } from "lucide-react";
|
|
5
|
+
import { cx as f } from "../../utils/cx.js";
|
|
6
|
+
function _({ items: i, columns: a = 2, layout: d = "stacked", bordered: r, size: o, title: s, extra: c, labelWidth: m, className: h, style: u, ...p }) {
|
|
7
|
+
const l = /* @__PURE__ */ e("dl", { className: "alea-descriptions", "data-columns": a, "data-layout": d, "data-bordered": r || void 0, "data-size": o, style: m ? { "--alea-desc-label": m } : void 0, children: i.map((t, N) => /* @__PURE__ */ n("div", { className: "alea-desc-item", "data-wide": t.wide || void 0, "data-span": t.span && t.span > 1 ? t.span : void 0, children: [
|
|
8
|
+
/* @__PURE__ */ e("dt", { children: t.label }),
|
|
9
|
+
/* @__PURE__ */ e("dd", { children: t.value })
|
|
10
|
+
] }, N)) });
|
|
11
|
+
return !s && !c ? /* @__PURE__ */ e("div", { ...p, style: u, className: f("alea-descriptions-wrap", h), children: l }) : /* @__PURE__ */ n("section", { ...p, style: u, className: f("alea-descriptions-wrap", h), children: [
|
|
12
|
+
/* @__PURE__ */ n("header", { className: "alea-descriptions-head", children: [
|
|
13
|
+
s && /* @__PURE__ */ e("h3", { className: "alea-descriptions-title", children: s }),
|
|
14
|
+
c && /* @__PURE__ */ e("div", { className: "alea-descriptions-extra", children: c })
|
|
15
|
+
] }),
|
|
16
|
+
l
|
|
17
|
+
] });
|
|
18
|
+
}
|
|
19
|
+
function B({ label: i, value: a, formatOptions: d, delta: r, higherIsBetter: o = !0, animate: s, prefix: c, suffix: m, className: h, ...u }) {
|
|
20
|
+
const [p, l] = C(s ? 0 : a), t = k(0);
|
|
21
|
+
z(() => {
|
|
22
|
+
var y;
|
|
23
|
+
if (!s || typeof window > "u" || (y = window.matchMedia) != null && y.call(window, "(prefers-reduced-motion: reduce)").matches) {
|
|
24
|
+
l(a);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const S = performance.now(), x = 900, w = (F) => {
|
|
28
|
+
const b = Math.min(1, (F - S) / x);
|
|
29
|
+
l(a * (1 - Math.pow(1 - b, 3))), b < 1 && (t.current = requestAnimationFrame(w));
|
|
30
|
+
};
|
|
31
|
+
return t.current = requestAnimationFrame(w), () => cancelAnimationFrame(t.current);
|
|
32
|
+
}, [a, s]);
|
|
33
|
+
const N = new Intl.NumberFormat(void 0, d), v = r === void 0 ? null : r >= 0 === o;
|
|
34
|
+
return /* @__PURE__ */ n("div", { ...u, className: f("alea-stat", h), children: [
|
|
35
|
+
/* @__PURE__ */ e("div", { className: "alea-stat-label", children: i }),
|
|
36
|
+
/* @__PURE__ */ n("div", { className: "alea-stat-value", children: [
|
|
37
|
+
/* @__PURE__ */ n("span", { "aria-hidden": "true", children: [
|
|
38
|
+
c,
|
|
39
|
+
N.format(s ? Math.round(p * 100) / 100 : a),
|
|
40
|
+
m
|
|
41
|
+
] }),
|
|
42
|
+
/* @__PURE__ */ e("span", { className: "alea-visually-hidden", children: N.format(a) })
|
|
43
|
+
] }),
|
|
44
|
+
r !== void 0 && /* @__PURE__ */ n("div", { className: "alea-stat-delta", "data-good": v ? !0 : void 0, "data-bad": v === !1 ? !0 : void 0, children: [
|
|
45
|
+
r >= 0 ? /* @__PURE__ */ e(T, { size: 14, "aria-hidden": "true" }) : /* @__PURE__ */ e(j, { size: 14, "aria-hidden": "true" }),
|
|
46
|
+
/* @__PURE__ */ n("span", { children: [
|
|
47
|
+
r >= 0 ? "+" : "",
|
|
48
|
+
new Intl.NumberFormat(void 0, { style: "percent", maximumFractionDigits: 1 }).format(r)
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ n("span", { className: "alea-visually-hidden", children: [
|
|
51
|
+
r >= 0 ? "up" : "down",
|
|
52
|
+
" from before"
|
|
53
|
+
] })
|
|
54
|
+
] })
|
|
55
|
+
] });
|
|
56
|
+
}
|
|
57
|
+
function q({ title: i, description: a, icon: d, illustration: r, action: o, secondaryAction: s, footer: c, size: m, variant: h, headingAs: u = "h3", className: p, ...l }) {
|
|
58
|
+
return /* @__PURE__ */ n("div", { ...l, className: f("alea-empty", p), "data-size": m, "data-variant": h, children: [
|
|
59
|
+
/* @__PURE__ */ e("span", { className: r ? "alea-empty-art" : "alea-empty-icon", "aria-hidden": "true", children: d ?? /* @__PURE__ */ e(g, {}) }),
|
|
60
|
+
A(u, { className: "alea-empty-title" }, i),
|
|
61
|
+
a && /* @__PURE__ */ e("p", { className: "alea-empty-text", children: a }),
|
|
62
|
+
(o || s) && /* @__PURE__ */ n("div", { className: "alea-empty-action", children: [
|
|
63
|
+
o,
|
|
64
|
+
s
|
|
65
|
+
] }),
|
|
66
|
+
c && /* @__PURE__ */ e("p", { className: "alea-empty-footer", children: c })
|
|
67
|
+
] });
|
|
68
|
+
}
|
|
69
|
+
const L = { success: R, error: D, 404: M, 403: I, 500: E, info: g };
|
|
70
|
+
function H({ status: i, className: a, ...d }) {
|
|
71
|
+
const r = L[i];
|
|
72
|
+
return /* @__PURE__ */ e(q, { ...d, headingAs: d.headingAs ?? "h2", icon: /* @__PURE__ */ e(r, {}), className: f("alea-result", a), "data-status": i });
|
|
73
|
+
}
|
|
74
|
+
export {
|
|
75
|
+
_ as Descriptions,
|
|
76
|
+
q as EmptyState,
|
|
77
|
+
H as Result,
|
|
78
|
+
B as Statistic
|
|
79
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as i, jsx as a, Fragment as P } from "react/jsx-runtime";
|
|
3
|
+
import { Calendar as S, DateField as $, DatePicker as G, Group as R, Button as o, Dialog as b, DateRangePicker as x, DateInput as g, DateSegment as v, RangeCalendar as z, TimeField as H, CalendarMonthPicker as T, CalendarYearPicker as B, Heading as j, CalendarGrid as A, CalendarGridHeader as E, CalendarHeaderCell as I, CalendarGridBody as Y, CalendarCell as _ } from "react-aria-components";
|
|
4
|
+
import { CalendarDays as k, ChevronLeft as J, ChevronRight as K } from "lucide-react";
|
|
5
|
+
import { withBase as d } from "../../utils/cx.js";
|
|
6
|
+
import { Label as O, Description as Q, FieldError as U } from "../field/Field.js";
|
|
7
|
+
import { Popover as w } from "../overlay/Overlay.js";
|
|
8
|
+
import { FieldSpinner as m, loadingAttrs as u } from "../field/FieldLoading.js";
|
|
9
|
+
import { useStrings as y } from "../../i18n/strings.js";
|
|
10
|
+
function F({ pickers: r }) {
|
|
11
|
+
return /* @__PURE__ */ i("header", { className: "alea-cal-head", children: [
|
|
12
|
+
/* @__PURE__ */ a(o, { slot: "previous", className: "alea-cal-nav alea-focus-ring", children: /* @__PURE__ */ a(J, { size: 16 }) }),
|
|
13
|
+
r ? /* @__PURE__ */ i("div", { className: "alea-cal-pickers", children: [
|
|
14
|
+
/* @__PURE__ */ a(T, { children: (l) => /* @__PURE__ */ a("select", { className: "alea-cal-select alea-focus-ring", "aria-label": l["aria-label"], value: String(l.value), onChange: (e) => l.onChange(Number(e.target.value)), children: l.items.map((e) => /* @__PURE__ */ a("option", { value: e.id, children: e.formatted }, e.id)) }) }),
|
|
15
|
+
/* @__PURE__ */ a(B, { children: (l) => /* @__PURE__ */ a("select", { className: "alea-cal-select alea-focus-ring", "aria-label": l["aria-label"], value: String(l.value), onChange: (e) => l.onChange(Number(e.target.value)), children: l.items.map((e) => /* @__PURE__ */ a("option", { value: e.id, children: e.formatted }, e.id)) }) })
|
|
16
|
+
] }) : /* @__PURE__ */ a(j, { className: "alea-cal-title" }),
|
|
17
|
+
/* @__PURE__ */ a(o, { slot: "next", className: "alea-cal-nav alea-focus-ring", children: /* @__PURE__ */ a(K, { size: 16 }) })
|
|
18
|
+
] });
|
|
19
|
+
}
|
|
20
|
+
function D({ offset: r = 0 }) {
|
|
21
|
+
return /* @__PURE__ */ i(A, { className: "alea-cal-grid", weekdayStyle: "short", offset: r ? { months: r } : void 0, children: [
|
|
22
|
+
/* @__PURE__ */ a(E, { children: (l) => /* @__PURE__ */ a(I, { className: "alea-cal-weekday", children: l }) }),
|
|
23
|
+
/* @__PURE__ */ a(Y, { children: (l) => /* @__PURE__ */ a(_, { date: l, className: "alea-cal-cell alea-focus-ring" }) })
|
|
24
|
+
] });
|
|
25
|
+
}
|
|
26
|
+
const q = ({ count: r }) => r > 1 ? /* @__PURE__ */ a("div", { className: "alea-cal-months", children: Array.from({ length: r }, (l, e) => /* @__PURE__ */ a(D, { offset: e }, e)) }) : /* @__PURE__ */ a(D, {});
|
|
27
|
+
function V({ className: r, pickers: l, visibleMonths: e = 1, ...n }) {
|
|
28
|
+
return /* @__PURE__ */ i(S, { ...n, visibleDuration: e > 1 ? { months: e } : n.visibleDuration, className: d("alea-calendar", r), "data-months": e > 1 ? e : void 0, children: [
|
|
29
|
+
/* @__PURE__ */ a(F, { pickers: l }),
|
|
30
|
+
/* @__PURE__ */ a(q, { count: e })
|
|
31
|
+
] });
|
|
32
|
+
}
|
|
33
|
+
function W({ className: r, pickers: l, visibleMonths: e = 1, ...n }) {
|
|
34
|
+
return /* @__PURE__ */ i(z, { ...n, visibleDuration: e > 1 ? { months: e } : n.visibleDuration, className: d("alea-calendar alea-range-calendar", r), "data-months": e > 1 ? e : void 0, children: [
|
|
35
|
+
/* @__PURE__ */ a(F, { pickers: l }),
|
|
36
|
+
/* @__PURE__ */ a(q, { count: e })
|
|
37
|
+
] });
|
|
38
|
+
}
|
|
39
|
+
function h({ label: r, isRequired: l }) {
|
|
40
|
+
return r ? /* @__PURE__ */ i(O, { children: [
|
|
41
|
+
r,
|
|
42
|
+
l && /* @__PURE__ */ a("span", { className: "alea-label-required", "aria-hidden": "true", children: " *" })
|
|
43
|
+
] }) : null;
|
|
44
|
+
}
|
|
45
|
+
function N({ description: r, errorMessage: l }) {
|
|
46
|
+
return /* @__PURE__ */ i(P, { children: [
|
|
47
|
+
r && /* @__PURE__ */ a(Q, { children: r }),
|
|
48
|
+
/* @__PURE__ */ a(U, { children: l })
|
|
49
|
+
] });
|
|
50
|
+
}
|
|
51
|
+
function C() {
|
|
52
|
+
return /* @__PURE__ */ a(g, { className: "alea-date-input", children: (r) => /* @__PURE__ */ a(v, { segment: r, className: "alea-date-segment" }) });
|
|
53
|
+
}
|
|
54
|
+
function na({ label: r, description: l, errorMessage: e, isLoading: n, className: t, ...c }) {
|
|
55
|
+
return /* @__PURE__ */ i($, { ...c, className: d("alea-field", t), ...u(n), children: [
|
|
56
|
+
/* @__PURE__ */ a(h, { label: r, isRequired: c.isRequired }),
|
|
57
|
+
/* @__PURE__ */ i("div", { className: "alea-input-wrap alea-date-wrap", "aria-busy": n || void 0, children: [
|
|
58
|
+
/* @__PURE__ */ a(C, {}),
|
|
59
|
+
n && /* @__PURE__ */ a(m, {})
|
|
60
|
+
] }),
|
|
61
|
+
/* @__PURE__ */ a(N, { description: l, errorMessage: e })
|
|
62
|
+
] });
|
|
63
|
+
}
|
|
64
|
+
function ia({ label: r, description: l, errorMessage: e, isLoading: n, className: t, ...c }) {
|
|
65
|
+
return /* @__PURE__ */ i(H, { ...c, className: d("alea-field", t), ...u(n), children: [
|
|
66
|
+
/* @__PURE__ */ a(h, { label: r, isRequired: c.isRequired }),
|
|
67
|
+
/* @__PURE__ */ i("div", { className: "alea-input-wrap alea-date-wrap", "aria-busy": n || void 0, children: [
|
|
68
|
+
/* @__PURE__ */ a(C, {}),
|
|
69
|
+
n && /* @__PURE__ */ a(m, {})
|
|
70
|
+
] }),
|
|
71
|
+
/* @__PURE__ */ a(N, { description: l, errorMessage: e })
|
|
72
|
+
] });
|
|
73
|
+
}
|
|
74
|
+
function ta({ motion: r, label: l, description: e, errorMessage: n, isLoading: t, className: c, ...s }) {
|
|
75
|
+
const f = y();
|
|
76
|
+
return /* @__PURE__ */ i(G, { ...s, className: d("alea-field", c), ...u(t), children: [
|
|
77
|
+
/* @__PURE__ */ a(h, { label: l, isRequired: s.isRequired }),
|
|
78
|
+
/* @__PURE__ */ i(R, { className: "alea-input-wrap alea-date-wrap", "aria-busy": t || void 0, children: [
|
|
79
|
+
/* @__PURE__ */ a(C, {}),
|
|
80
|
+
t && /* @__PURE__ */ a(m, {}),
|
|
81
|
+
/* @__PURE__ */ a(o, { className: "alea-input-clear alea-focus-ring", "aria-label": f.openCalendar, children: /* @__PURE__ */ a(k, { size: 16 }) })
|
|
82
|
+
] }),
|
|
83
|
+
/* @__PURE__ */ a(N, { description: e, errorMessage: n }),
|
|
84
|
+
/* @__PURE__ */ a(w, { className: "alea-popover alea-cal-popover", placement: "bottom start", motion: r, children: /* @__PURE__ */ a(b, { className: "alea-cal-dialog", children: /* @__PURE__ */ a(V, {}) }) })
|
|
85
|
+
] });
|
|
86
|
+
}
|
|
87
|
+
function ca({ motion: r, label: l, description: e, errorMessage: n, isLoading: t, className: c, ...s }) {
|
|
88
|
+
const f = y();
|
|
89
|
+
return /* @__PURE__ */ i(x, { ...s, className: d("alea-field", c), ...u(t), children: [
|
|
90
|
+
/* @__PURE__ */ a(h, { label: l, isRequired: s.isRequired }),
|
|
91
|
+
/* @__PURE__ */ i(R, { className: "alea-input-wrap alea-date-wrap", "aria-busy": t || void 0, children: [
|
|
92
|
+
/* @__PURE__ */ a(g, { slot: "start", className: "alea-date-input", children: (p) => /* @__PURE__ */ a(v, { segment: p, className: "alea-date-segment" }) }),
|
|
93
|
+
/* @__PURE__ */ a("span", { className: "alea-date-dash", "aria-hidden": "true", children: "to" }),
|
|
94
|
+
/* @__PURE__ */ a(g, { slot: "end", className: "alea-date-input", children: (p) => /* @__PURE__ */ a(v, { segment: p, className: "alea-date-segment" }) }),
|
|
95
|
+
t && /* @__PURE__ */ a(m, {}),
|
|
96
|
+
/* @__PURE__ */ a(o, { className: "alea-input-clear alea-focus-ring", "aria-label": f.openCalendar, children: /* @__PURE__ */ a(k, { size: 16 }) })
|
|
97
|
+
] }),
|
|
98
|
+
/* @__PURE__ */ a(N, { description: e, errorMessage: n }),
|
|
99
|
+
/* @__PURE__ */ a(w, { className: "alea-popover alea-cal-popover", placement: "bottom start", motion: r, children: /* @__PURE__ */ a(b, { className: "alea-cal-dialog", children: /* @__PURE__ */ a(W, {}) }) })
|
|
100
|
+
] });
|
|
101
|
+
}
|
|
102
|
+
export {
|
|
103
|
+
V as Calendar,
|
|
104
|
+
na as DateField,
|
|
105
|
+
ta as DatePicker,
|
|
106
|
+
ca as DateRangePicker,
|
|
107
|
+
W as RangeCalendar,
|
|
108
|
+
ia as TimeField
|
|
109
|
+
};
|
|
@@ -37,8 +37,10 @@ export interface CountBadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
37
37
|
max?: number;
|
|
38
38
|
/** Name for screen readers, e.g. "unread messages". */
|
|
39
39
|
label?: string;
|
|
40
|
-
/** Color of the bubble
|
|
40
|
+
/** Color of the bubble: accent (default), neutral, success, warning, danger or info. */
|
|
41
41
|
tone?: Tone;
|
|
42
|
+
/** solid (default, the tone's solid fill), soft (tinted, like a soft Badge) or outline (a 1 px ring in the tone's text color). */
|
|
43
|
+
appearance?: 'solid' | 'soft' | 'outline';
|
|
42
44
|
/** Shows 0 instead of hiding the bubble. */
|
|
43
45
|
showZero?: boolean;
|
|
44
46
|
/** Only a dot, without the number (screen readers still hear the count). */
|
|
@@ -46,8 +48,8 @@ export interface CountBadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
46
48
|
/** sm (16 px) or md (20 px, default). */
|
|
47
49
|
size?: 'sm' | 'md';
|
|
48
50
|
}
|
|
49
|
-
/** A number bubble for notifications. Hidden at zero unless showZero. */
|
|
50
|
-
export declare function CountBadge({ count, max, label, tone, showZero, dot, size, className, ...props }: CountBadgeProps): import("react").JSX.Element | null;
|
|
51
|
+
/** A number bubble for notifications: six tones, solid, soft or outline like Badge. Hidden at zero unless showZero. */
|
|
52
|
+
export declare function CountBadge({ count, max, label, tone, appearance, showZero, dot, size, className, ...props }: CountBadgeProps): import("react").JSX.Element | null;
|
|
51
53
|
export interface TagGroupProps<T extends object> extends Omit<RACTagGroupProps, 'children'> {
|
|
52
54
|
/** The visible label for the group. */
|
|
53
55
|
label?: ReactNode;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as m, jsx as r, Fragment as T } from "react/jsx-runtime";
|
|
3
|
+
import { useState as k, useRef as f, useEffect as h, useContext as C, createContext as y } from "react";
|
|
4
|
+
import { Tag as S, Button as $, TagGroup as z, Label as B, TagList as E } from "react-aria-components";
|
|
5
|
+
import { X as G, ChevronLeft as j, ChevronRight as I } from "lucide-react";
|
|
6
|
+
import { useScrollEdges as L } from "../../utils/scrollEdges.js";
|
|
7
|
+
import { cx as g, withBase as A } from "../../utils/cx.js";
|
|
8
|
+
import { chipIcon as v } from "../icon/icon-contexts.js";
|
|
9
|
+
import { useStrings as b } from "../../i18n/strings.js";
|
|
10
|
+
function R({ tone: a = "neutral", appearance: e = "soft", dot: t, icon: l, size: n = "md", shape: s, className: i, children: d, ...o }) {
|
|
11
|
+
return /* @__PURE__ */ m("span", { ...o, className: g("alea-badge", i), "data-tone": a, "data-appearance": e, "data-size": n, "data-shape": s, children: [
|
|
12
|
+
t && /* @__PURE__ */ r("span", { className: "alea-badge-dot", "data-pulse": t === "pulse" || void 0, "aria-hidden": "true" }),
|
|
13
|
+
l && /* @__PURE__ */ r("span", { className: "alea-badge-icon", "aria-hidden": "true", ...v("badge", e, a), children: l }),
|
|
14
|
+
d
|
|
15
|
+
] });
|
|
16
|
+
}
|
|
17
|
+
const M = Object.fromEntries([
|
|
18
|
+
...["published", "paid", "active", "done", "complete", "completed", "live", "delivered", "fulfilled", "shipped", "healthy", "operational", "online", "approved", "resolved", "in stock", "connected", "verified", "enabled", "succeeded", "ready"].map((a) => [a, "success"]),
|
|
19
|
+
...["draft", "pending", "scheduled", "review", "in review", "processing", "trial", "low stock", "degraded", "on hold", "unfulfilled", "due", "monitoring", "in progress", "queued", "building", "partially paid", "investigating"].map((a) => [a, "warning"]),
|
|
20
|
+
...["failed", "error", "canceled", "cancelled", "refunded", "out of stock", "down", "blocked", "overdue", "rejected", "expired", "firing", "rolled back", "disconnected"].map((a) => [a, "danger"]),
|
|
21
|
+
...["open", "todo", "new", "running", "invited"].map((a) => [a, "info"])
|
|
22
|
+
]);
|
|
23
|
+
function J({ status: a, tones: e, tone: t, size: l = "sm", dot: n = !0, ...s }) {
|
|
24
|
+
const i = a.trim().toLowerCase(), d = t ?? (e == null ? void 0 : e[i]) ?? M[i] ?? "neutral";
|
|
25
|
+
return /* @__PURE__ */ r(R, { ...s, size: l, dot: n, tone: d, children: a });
|
|
26
|
+
}
|
|
27
|
+
function K({ count: a, max: e = 99, label: t, tone: l = "accent", appearance: n = "solid", showZero: s, dot: i, size: d, className: o, ...c }) {
|
|
28
|
+
const u = f(!0);
|
|
29
|
+
return h(() => {
|
|
30
|
+
u.current = !1;
|
|
31
|
+
}, []), a <= 0 && !s ? null : /* @__PURE__ */ r("span", { ...c, className: g("alea-count", o), "data-tone": l, "data-appearance": n === "solid" ? void 0 : n, "data-dot": i || void 0, "data-size": d, role: t || i ? "img" : void 0, "aria-label": t || i ? `${a}${t ? ` ${t}` : ""}` : void 0, children: !i && /* @__PURE__ */ r("span", { className: u.current ? void 0 : "alea-badge-pop", "aria-hidden": t ? !0 : void 0, children: a > e ? `${e}+` : a }, a) });
|
|
32
|
+
}
|
|
33
|
+
const N = y({ current: !1 });
|
|
34
|
+
function Q({ label: a, items: e, children: t, renderEmptyState: l, overflow: n = "wrap", className: s, ...i }) {
|
|
35
|
+
const d = f(null), o = f(!1);
|
|
36
|
+
h(() => (o.current = !0, () => {
|
|
37
|
+
o.current = !1;
|
|
38
|
+
}), []);
|
|
39
|
+
const { edges: c, scroll: u } = L(d, ".alea-tag-list", n === "scroll");
|
|
40
|
+
return /* @__PURE__ */ r(N.Provider, { value: o, children: /* @__PURE__ */ m(z, { ...i, ref: d, "data-overflow": n, "data-overflow-start": c.start || void 0, "data-overflow-end": c.end || void 0, className: g("alea-tag-group", s), children: [
|
|
41
|
+
a && /* @__PURE__ */ r(B, { className: "alea-label", children: a }),
|
|
42
|
+
/* @__PURE__ */ m("div", { className: "alea-tag-scroller", children: [
|
|
43
|
+
c.start && /* @__PURE__ */ r("button", { type: "button", tabIndex: -1, "aria-hidden": "true", className: "alea-tab-scroll", "data-side": "start", onClick: () => u(-1), children: /* @__PURE__ */ r(j, { size: 16 }) }),
|
|
44
|
+
/* @__PURE__ */ r(E, { items: e, renderEmptyState: l, className: "alea-tag-list", children: t }),
|
|
45
|
+
c.end && /* @__PURE__ */ r("button", { type: "button", tabIndex: -1, "aria-hidden": "true", className: "alea-tab-scroll", "data-side": "end", onClick: () => u(1), children: /* @__PURE__ */ r(I, { size: 16 }) })
|
|
46
|
+
] })
|
|
47
|
+
] }) });
|
|
48
|
+
}
|
|
49
|
+
function W({ tone: a = "neutral", appearance: e, size: t, icon: l, children: n, className: s, ...i }) {
|
|
50
|
+
const d = b(), o = i.textValue ?? (typeof n == "string" ? n : void 0), c = C(N), u = f(c.current).current;
|
|
51
|
+
return /* @__PURE__ */ r(S, { ...i, textValue: o, "data-added": u || void 0, "data-tone": a, "data-appearance": e, "data-size": t, className: A("alea-tag alea-focus-ring", s), children: (p) => /* @__PURE__ */ m(T, { children: [
|
|
52
|
+
l && /* @__PURE__ */ r("span", { className: "alea-tag-icon", "aria-hidden": "true", ...v("tag", e, a, p.isSelected), children: l }),
|
|
53
|
+
typeof n == "function" ? n(p) : n,
|
|
54
|
+
p.allowsRemoving && /* @__PURE__ */ r($, { slot: "remove", className: "alea-tag-remove", "aria-label": d.remove, children: /* @__PURE__ */ r(G, { size: 12 }) })
|
|
55
|
+
] }) });
|
|
56
|
+
}
|
|
57
|
+
function O(a) {
|
|
58
|
+
var t;
|
|
59
|
+
const e = a.trim().split(/\s+/).filter(Boolean);
|
|
60
|
+
return ((((t = e[0]) == null ? void 0 : t[0]) || "") + (e.length > 1 ? e[e.length - 1][0] : "")).toUpperCase() || "?";
|
|
61
|
+
}
|
|
62
|
+
function U({ src: a, name: e, size: t = "md", status: l, shape: n = "circle", fallback: s, ring: i, count: d, className: o, style: c, ...u }) {
|
|
63
|
+
const [p, w] = k(!1), x = a && !p;
|
|
64
|
+
return /* @__PURE__ */ m("span", { ...u, className: g("alea-avatar", o), "data-size": t, "data-shape": n, "data-ring": i === !0 ? "accent" : i || void 0, role: "img", "aria-label": e + (l ? ` (${l})` : "") + (d ? `, ${d}` : ""), style: c, children: [
|
|
65
|
+
x ? /* @__PURE__ */ r("img", { src: a, alt: "", onError: () => w(!0) }) : s ? /* @__PURE__ */ r("span", { className: "alea-avatar-fallback", "aria-hidden": "true", children: s }) : /* @__PURE__ */ r("span", { className: "alea-avatar-initials", "aria-hidden": "true", "data-initials": O(e) }),
|
|
66
|
+
l && /* @__PURE__ */ r("span", { className: "alea-avatar-status", "data-status": l, "aria-hidden": "true" }),
|
|
67
|
+
d ? /* @__PURE__ */ r("span", { className: "alea-avatar-count", "aria-hidden": "true", children: d > 99 ? "99+" : d }) : null
|
|
68
|
+
] });
|
|
69
|
+
}
|
|
70
|
+
function Y({ people: a, max: e = 4, size: t = "md", fan: l, spacing: n, className: s, ...i }) {
|
|
71
|
+
const d = b(), o = a.slice(0, e), c = a.length - o.length;
|
|
72
|
+
return /* @__PURE__ */ m("div", { ...i, className: g("alea-avatar-group", s), "data-fan": l || void 0, "data-spacing": n, role: "group", "aria-label": d.people(a.length), children: [
|
|
73
|
+
o.map((u) => /* @__PURE__ */ r(U, { name: u.name, src: u.src, size: t }, u.name)),
|
|
74
|
+
c > 0 && /* @__PURE__ */ r("span", { className: "alea-avatar alea-avatar-more", "data-size": t, role: "img", "aria-label": d.andMore(c), children: /* @__PURE__ */ m("span", { "aria-hidden": "true", children: [
|
|
75
|
+
"+",
|
|
76
|
+
c
|
|
77
|
+
] }) })
|
|
78
|
+
] });
|
|
79
|
+
}
|
|
80
|
+
export {
|
|
81
|
+
U as Avatar,
|
|
82
|
+
Y as AvatarGroup,
|
|
83
|
+
R as Badge,
|
|
84
|
+
K as CountBadge,
|
|
85
|
+
M as STATUS_TONES,
|
|
86
|
+
J as StatusBadge,
|
|
87
|
+
W as Tag,
|
|
88
|
+
Q as TagGroup
|
|
89
|
+
};
|
|
@@ -6,6 +6,8 @@ export interface IconTileProps {
|
|
|
6
6
|
/** The color. Default accent. */
|
|
7
7
|
tone?: Tone;
|
|
8
8
|
/** soft (a tinted square, default), solid (filled, for a brand mark) or gradient (the accent gradient, for a product's logo mark). */
|
|
9
|
+
appearance?: 'soft' | 'solid' | 'gradient';
|
|
10
|
+
/** @deprecated Use appearance. */
|
|
9
11
|
variant?: 'soft' | 'solid' | 'gradient';
|
|
10
12
|
/** xs (20 px, beside a name in a menu), sm (28 px, a logo in a navbar), md (40 px, default) or lg (48 px). */
|
|
11
13
|
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
@@ -14,7 +16,7 @@ export interface IconTileProps {
|
|
|
14
16
|
className?: string;
|
|
15
17
|
}
|
|
16
18
|
/** An icon in a tinted square: the face of a feature card, a collection, an integration, or an app's mark. */
|
|
17
|
-
export declare function IconTile({ icon, tone, variant, size, shape, className }: IconTileProps): import("react").JSX.Element;
|
|
19
|
+
export declare function IconTile({ icon, tone, appearance, variant: oldVariant, size, shape, className }: IconTileProps): import("react").JSX.Element;
|
|
18
20
|
export interface PaymentCardProps {
|
|
19
21
|
/** The name on the card. */
|
|
20
22
|
holder: string;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as e, jsx as a, Fragment as y } from "react/jsx-runtime";
|
|
3
|
+
import { ArrowDownLeft as f, ArrowUpRight as v, Snowflake as u } from "lucide-react";
|
|
4
|
+
import { cx as o } from "../../utils/cx.js";
|
|
5
|
+
import { useLocale as b, Link as g } from "react-aria-components";
|
|
6
|
+
import { useStrings as w } from "../../i18n/strings.js";
|
|
7
|
+
import { renamed as z } from "../../utils/vocabulary.js";
|
|
8
|
+
function S({ icon: n, tone: l = "accent", appearance: c, variant: s, size: i = "md", shape: r = "square", className: t }) {
|
|
9
|
+
const d = z("IconTile", "variant", s, "appearance", c) ?? "soft";
|
|
10
|
+
return /* @__PURE__ */ a("span", { className: o("alea-icon-tile", t), "data-tone": l, "data-variant": d, "data-size": i, "data-shape": r, "aria-hidden": "true", children: n });
|
|
11
|
+
}
|
|
12
|
+
function j({ holder: n, last4: l, kind: c, expiry: s, brand: i, frozen: r, tone: t = "accent", href: d, className: m }) {
|
|
13
|
+
const h = w(), N = h.paymentCard(c, n, l, !!r);
|
|
14
|
+
if (!d)
|
|
15
|
+
return /* @__PURE__ */ e("div", { className: o("alea-payment-card", m), "data-tone": t, "data-frozen": r || void 0, role: "img", "aria-label": N, children: [
|
|
16
|
+
/* @__PURE__ */ e("span", { className: "alea-payment-card-top", "aria-hidden": "true", children: [
|
|
17
|
+
/* @__PURE__ */ a("span", { className: "alea-payment-card-brand", children: i }),
|
|
18
|
+
/* @__PURE__ */ a("span", { className: "alea-payment-card-kind", children: r ? /* @__PURE__ */ a(u, { size: 16 }) : c })
|
|
19
|
+
] }),
|
|
20
|
+
/* @__PURE__ */ e("span", { className: "alea-payment-card-number", "aria-hidden": "true", children: [
|
|
21
|
+
"•••• •••• •••• ",
|
|
22
|
+
l
|
|
23
|
+
] }),
|
|
24
|
+
/* @__PURE__ */ e("span", { className: "alea-payment-card-bottom", "aria-hidden": "true", children: [
|
|
25
|
+
/* @__PURE__ */ a("span", { children: n }),
|
|
26
|
+
s && /* @__PURE__ */ a("span", { children: s })
|
|
27
|
+
] })
|
|
28
|
+
] });
|
|
29
|
+
const p = h.paymentCardParts;
|
|
30
|
+
return /* @__PURE__ */ e(g, { className: o("alea-payment-card alea-focus-ring", m), "data-tone": t, "data-frozen": r || void 0, href: d, children: [
|
|
31
|
+
/* @__PURE__ */ e("span", { className: "alea-payment-card-top", children: [
|
|
32
|
+
/* @__PURE__ */ a("span", { className: "alea-payment-card-brand", children: i }),
|
|
33
|
+
/* @__PURE__ */ e("span", { className: "alea-payment-card-kind", children: [
|
|
34
|
+
r ? /* @__PURE__ */ e(y, { children: [
|
|
35
|
+
/* @__PURE__ */ a(u, { size: 16, "aria-hidden": "true" }),
|
|
36
|
+
/* @__PURE__ */ a("span", { className: "alea-visually-hidden", children: p.frozen })
|
|
37
|
+
] }) : c,
|
|
38
|
+
/* @__PURE__ */ e("span", { className: "alea-visually-hidden", children: [
|
|
39
|
+
" ",
|
|
40
|
+
p.card
|
|
41
|
+
] })
|
|
42
|
+
] })
|
|
43
|
+
] }),
|
|
44
|
+
/* @__PURE__ */ e("span", { className: "alea-payment-card-number", children: [
|
|
45
|
+
/* @__PURE__ */ a("span", { "aria-hidden": "true", children: "•••• •••• •••• " }),
|
|
46
|
+
/* @__PURE__ */ e("span", { className: "alea-visually-hidden", children: [
|
|
47
|
+
p.ending,
|
|
48
|
+
" "
|
|
49
|
+
] }),
|
|
50
|
+
l
|
|
51
|
+
] }),
|
|
52
|
+
/* @__PURE__ */ e("span", { className: "alea-payment-card-bottom", children: [
|
|
53
|
+
/* @__PURE__ */ e("span", { children: [
|
|
54
|
+
/* @__PURE__ */ a("span", { className: "alea-visually-hidden", children: ", " }),
|
|
55
|
+
n
|
|
56
|
+
] }),
|
|
57
|
+
s && /* @__PURE__ */ e("span", { children: [
|
|
58
|
+
/* @__PURE__ */ a("span", { className: "alea-visually-hidden", children: ", " }),
|
|
59
|
+
s
|
|
60
|
+
] })
|
|
61
|
+
] })
|
|
62
|
+
] });
|
|
63
|
+
}
|
|
64
|
+
function k({ value: n, currency: l = "USD", icon: c, colorIn: s = !0, formatOptions: i, className: r }) {
|
|
65
|
+
const { locale: t } = b(), d = new Intl.NumberFormat(t, { style: "currency", currency: l, signDisplay: "exceptZero", ...i }).format(n), m = n > 0 ? "in" : n < 0 ? "out" : "zero";
|
|
66
|
+
return /* @__PURE__ */ e("span", { className: o("alea-amount", r), "data-dir": m, "data-color": s || void 0, children: [
|
|
67
|
+
c && m !== "zero" && /* @__PURE__ */ a("span", { className: "alea-amount-icon", "aria-hidden": "true", children: m === "in" ? /* @__PURE__ */ a(f, {}) : /* @__PURE__ */ a(v, {}) }),
|
|
68
|
+
/* @__PURE__ */ a("span", { className: "alea-amount-value", children: d })
|
|
69
|
+
] });
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
k as Amount,
|
|
73
|
+
S as IconTile,
|
|
74
|
+
j as PaymentCard
|
|
75
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as g, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { useState as f, useRef as $, useMemo as y } from "react";
|
|
4
|
+
import { ListBox as q, ListBoxSection as B, Header as J, ListBoxItem as A } from "react-aria-components";
|
|
5
|
+
import { cx as F } from "../../utils/cx.js";
|
|
6
|
+
import { SearchField as R } from "../field/Field.js";
|
|
7
|
+
import { useStrings as T } from "../../i18n/strings.js";
|
|
8
|
+
import { EMOJI as u, EMOJI_CATEGORIES as E } from "./emoji-data.js";
|
|
9
|
+
const N = "alea-emoji-recent", V = () => {
|
|
10
|
+
try {
|
|
11
|
+
return JSON.parse(localStorage.getItem(N) || "[]").slice(0, 16);
|
|
12
|
+
} catch {
|
|
13
|
+
return [];
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
function Q({ onSelect: C, showRecent: l = !0, columns: S = 8, height: b = 280, autoFocusSearch: x = !0, className: I }) {
|
|
17
|
+
const i = T(), k = i.langCode === "es", [n, p] = f(""), [c, v] = f(() => l ? V() : []), j = $(null), m = (e) => k ? e.es : e.en, d = y(() => new Map(u.map((e) => [e.emoji, e])), []), h = y(() => {
|
|
18
|
+
const e = n.trim().toLowerCase();
|
|
19
|
+
if (e)
|
|
20
|
+
return [{ id: "results", title: "", items: u.filter((s) => s.en.includes(e) || s.es.toLowerCase().includes(e) || s.emoji === e) }];
|
|
21
|
+
const t = [], r = c.map((o) => d.get(o)).filter(Boolean);
|
|
22
|
+
l && r.length && t.push({ id: "recent", title: i.emojiCategories.recent, items: r.map((o) => ({ ...o, category: "recent" })) });
|
|
23
|
+
for (const o of E) t.push({ id: o.id, title: i.emojiCategories[o.id], items: u.filter((s) => s.category === o.id) });
|
|
24
|
+
return t;
|
|
25
|
+
}, [n, c, d, l, i]), L = (e) => {
|
|
26
|
+
const t = String(e).split(":").pop(), r = d.get(t);
|
|
27
|
+
if (C(t, r ? m(r) : t), l) {
|
|
28
|
+
const o = [t, ...c.filter((s) => s !== t)].slice(0, 16);
|
|
29
|
+
v(o);
|
|
30
|
+
try {
|
|
31
|
+
localStorage.setItem(N, JSON.stringify(o));
|
|
32
|
+
} catch {
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}, M = (e) => {
|
|
36
|
+
p(""), requestAnimationFrame(() => {
|
|
37
|
+
var t, r;
|
|
38
|
+
return (r = (t = j.current) == null ? void 0 : t.querySelector(`[data-section="${e}"]`)) == null ? void 0 : r.scrollIntoView({ block: "start" });
|
|
39
|
+
});
|
|
40
|
+
}, O = h.every((e) => !e.items.length);
|
|
41
|
+
return /* @__PURE__ */ g("div", { className: F("alea-emoji", I), style: { "--alea-emoji-cols": S }, children: [
|
|
42
|
+
/* @__PURE__ */ a(R, { "aria-label": i.searchEmoji, placeholder: i.searchEmoji, value: n, onChange: p, size: "sm", autoFocus: x }),
|
|
43
|
+
!n && /* @__PURE__ */ a("div", { className: "alea-emoji-cats", role: "group", "aria-label": i.pickEmoji, children: E.map((e) => /* @__PURE__ */ a("button", { type: "button", className: "alea-emoji-cat alea-focus-ring", "aria-label": i.emojiCategories[e.id], title: i.emojiCategories[e.id], onClick: () => M(e.id), children: /* @__PURE__ */ a("span", { "aria-hidden": "true", children: e.icon }) }, e.id)) }),
|
|
44
|
+
/* @__PURE__ */ a("div", { ref: j, className: "alea-emoji-scroll", style: { height: b }, children: O ? /* @__PURE__ */ a("p", { className: "alea-emoji-empty", role: "status", children: i.noEmoji }) : /* @__PURE__ */ a(q, { "aria-label": i.pickEmoji, layout: "grid", selectionMode: "none", onAction: L, className: "alea-emoji-grid", children: h.map((e) => /* @__PURE__ */ g(B, { id: e.id, className: "alea-emoji-section", "data-section": e.id, children: [
|
|
45
|
+
e.title && /* @__PURE__ */ a(J, { className: "alea-emoji-header", children: e.title }),
|
|
46
|
+
e.items.map((t) => /* @__PURE__ */ a(A, { id: `${e.id}:${t.emoji}`, textValue: m(t), "aria-label": m(t), className: "alea-emoji-item", children: /* @__PURE__ */ a("span", { "aria-hidden": "true", children: t.emoji }) }, `${e.id}:${t.emoji}`))
|
|
47
|
+
] }, e.id)) }) })
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
Q as EmojiPicker
|
|
52
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const e = {
|
|
3
|
+
smileys: "😀|grinning face|cara sonriente;😃|big smile|sonrisa grande;😄|smile with eyes|sonrisa con ojos;😁|beaming face|cara radiante;😆|laughing|riendo;😅|sweat smile|sonrisa nerviosa;🤣|rolling on the floor laughing|muerto de risa;😂|tears of joy|lágrimas de risa;🙂|slight smile|sonrisa leve;🙃|upside down face|cara al revés;😉|wink|guiño;😊|blush|sonrojado;😇|halo|angelito;🥰|smiling with hearts|enamorado;😍|heart eyes|ojos de corazón;🤩|star struck|deslumbrado;😘|blowing a kiss|lanzando un beso;😋|yum|delicioso;😛|tongue out|lengua afuera;😜|winking tongue|guiño con lengua;🤪|zany|loco;🤗|hug|abrazo;🤭|hand over mouth|mano en la boca;🤔|thinking|pensando;🤨|raised eyebrow|ceja levantada;😐|neutral|neutral;😑|expressionless|sin expresión;😶|no mouth|sin boca;😏|smirk|sonrisa pícara;😒|unamused|aburrido;🙄|eye roll|ojos en blanco;😬|grimace|mueca;😌|relieved|aliviado;😔|pensive|pensativo;😪|sleepy|con sueño;😴|sleeping|durmiendo;😷|mask|mascarilla;🤒|thermometer|termómetro;🤯|mind blown|cabeza explotando;🥳|party face|cara de fiesta;😎|sunglasses|lentes de sol;🤓|nerd|nerd;🧐|monocle|monóculo;😕|confused|confundido;😟|worried|preocupado;😮|open mouth|boca abierta;😲|astonished|asombrado;🥺|pleading|suplicante;😢|crying|llorando;😭|sobbing|llanto;😱|scream|grito;😤|huffing|resoplando;😡|angry|enojado;🤬|cursing|insultando;💀|skull|calavera;💩|poop|caca;🤡|clown|payaso;👻|ghost|fantasma;👽|alien|extraterrestre;🤖|robot|robot",
|
|
4
|
+
people: "👋|wave|saludo;🤚|raised back of hand|dorso de la mano;✋|raised hand|mano levantada;👌|ok hand|ok;🤌|pinched fingers|dedos juntos;✌️|victory|victoria;🤞|crossed fingers|dedos cruzados;🤟|love you gesture|te quiero;🤘|rock on|rock;👈|point left|señal a la izquierda;👉|point right|señal a la derecha;👆|point up|señal arriba;👇|point down|señal abajo;👍|thumbs up|pulgar arriba;👎|thumbs down|pulgar abajo;✊|raised fist|puño;👏|clap|aplauso;🙌|raised hands|manos arriba;🫶|heart hands|manos de corazón;👐|open hands|manos abiertas;🤝|handshake|apretón de manos;🙏|folded hands|manos juntas;💪|flexed biceps|bíceps;🧠|brain|cerebro;👀|eyes|ojos;👁️|eye|ojo;👶|baby|bebé;🧒|child|niño;🧑|person|persona;👩|woman|mujer;👨|man|hombre;🧓|older person|persona mayor;🧑💻|technologist|programador;🧑🎨|artist|artista;🧑🏫|teacher|profesor;🧑⚕️|health worker|médico;🧑🚀|astronaut|astronauta;🦸|superhero|superhéroe;🧙|mage|mago;🙋|raising hand|levantando la mano;🤷|shrug|encogerse de hombros;🤦|facepalm|mano en la cara;🙇|bowing|reverencia;💃|dancing|bailando;🏃|running|corriendo;🧘|yoga|yoga",
|
|
5
|
+
nature: "🐶|dog|perro;🐱|cat|gato;🐭|mouse|ratón;🐰|rabbit|conejo;🦊|fox|zorro;🐻|bear|oso;🐼|panda|panda;🐨|koala|koala;🐯|tiger|tigre;🦁|lion|león;🐮|cow|vaca;🐷|pig|cerdo;🐸|frog|rana;🐵|monkey|mono;🐔|chicken|gallina;🐧|penguin|pingüino;🐦|bird|pájaro;🦄|unicorn|unicornio;🐝|bee|abeja;🦋|butterfly|mariposa;🐢|turtle|tortuga;🐙|octopus|pulpo;🐬|dolphin|delfín;🐳|whale|ballena;🌵|cactus|cactus;🌲|evergreen tree|pino;🌴|palm tree|palmera;🌱|seedling|brote;🌿|herb|hierba;🍀|four leaf clover|trébol;🍁|maple leaf|hoja de arce;🌸|cherry blossom|flor de cerezo;🌻|sunflower|girasol;🌹|rose|rosa;🌷|tulip|tulipán;🌞|sun with face|sol;🌙|crescent moon|luna;⭐|star|estrella;🌈|rainbow|arcoíris;☁️|cloud|nube;⚡|lightning|rayo;❄️|snowflake|copo de nieve;🔥|fire|fuego;💧|droplet|gota;🌊|wave|ola",
|
|
6
|
+
food: "🍎|apple|manzana;🍊|orange|naranja;🍋|lemon|limón;🍌|banana|banana;🍉|watermelon|sandía;🍇|grapes|uvas;🍓|strawberry|fresa;🍒|cherries|cerezas;🍑|peach|durazno;🥭|mango|mango;🍍|pineapple|piña;🥑|avocado|aguacate;🍅|tomato|tomate;🌽|corn|maíz;🥕|carrot|zanahoria;🥐|croissant|cruasán;🍞|bread|pan;🧀|cheese|queso;🥚|egg|huevo;🥓|bacon|tocino;🍔|burger|hamburguesa;🍟|fries|papas fritas;🍕|pizza|pizza;🌮|taco|taco;🌯|burrito|burrito;🫓|arepa|arepa;🍣|sushi|sushi;🍜|noodles|fideos;🍝|spaghetti|espagueti;🍦|ice cream|helado;🍩|donut|dona;🍪|cookie|galleta;🎂|birthday cake|pastel de cumpleaños;🍫|chocolate|chocolate;🍿|popcorn|palomitas;☕|coffee|café;🍵|tea|té;🧃|juice box|jugo;🍺|beer|cerveza;🍷|wine|vino;🥂|cheers|brindis;🍾|champagne|champán",
|
|
7
|
+
activities: "⚽|soccer|fútbol;🏀|basketball|baloncesto;🏈|football|fútbol americano;⚾|baseball|béisbol;🎾|tennis|tenis;🏐|volleyball|voleibol;🏓|ping pong|ping pong;🥊|boxing|boxeo;🏆|trophy|trofeo;🥇|gold medal|medalla de oro;🥈|silver medal|medalla de plata;🥉|bronze medal|medalla de bronce;🎯|bullseye|diana;🎮|video game|videojuego;🕹️|joystick|joystick;🎲|dice|dado;♟️|chess|ajedrez;🧩|puzzle|rompecabezas;🎨|palette|paleta;🎭|theater|teatro;🎬|clapper|claqueta;🎤|microphone|micrófono;🎧|headphones|audífonos;🎸|guitar|guitarra;🎹|piano|piano;🥁|drum|tambor;🎉|party popper|cotillón;🎊|confetti|confeti;🎈|balloon|globo;🎁|gift|regalo;🎄|christmas tree|árbol de navidad;🎃|pumpkin|calabaza",
|
|
8
|
+
travel: "🚗|car|carro;🚕|taxi|taxi;🚌|bus|autobús;🚲|bicycle|bicicleta;🛴|scooter|patineta;🏍️|motorcycle|moto;🚆|train|tren;🚇|metro|metro;✈️|airplane|avión;🚀|rocket|cohete;🛸|ufo|ovni;⛵|sailboat|velero;🚢|ship|barco;⛽|fuel|gasolina;🚦|traffic light|semáforo;🗺️|map|mapa;🧭|compass|brújula;🏔️|mountain|montaña;🏖️|beach|playa;🏝️|island|isla;🏕️|camping|campamento;🏠|house|casa;🏢|office building|oficina;🏫|school|escuela;🏥|hospital|hospital;🏦|bank|banco;🏰|castle|castillo;🗽|statue of liberty|estatua de la libertad;🌉|bridge|puente;🌃|night city|ciudad de noche;🎡|ferris wheel|rueda de la fortuna",
|
|
9
|
+
objects: "💻|laptop|laptop;🖥️|desktop|computadora;⌨️|keyboard|teclado;🖱️|mouse|mouse;📱|phone|teléfono;☎️|telephone|teléfono fijo;📷|camera|cámara;🎥|movie camera|cámara de cine;📺|tv|televisor;💡|light bulb|bombilla;🔦|flashlight|linterna;📚|books|libros;📖|open book|libro abierto;📝|memo|nota;✏️|pencil|lápiz;🖊️|pen|bolígrafo;📌|pushpin|chincheta;📎|paperclip|clip;✂️|scissors|tijeras;🗂️|dividers|separadores;📁|folder|carpeta;📅|calendar|calendario;📈|chart up|gráfico subiendo;📉|chart down|gráfico bajando;📊|bar chart|gráfico de barras;🔒|locked|candado;🔑|key|llave;🔨|hammer|martillo;🛠️|tools|herramientas;⚙️|gear|engranaje;🧪|test tube|tubo de ensayo;🔬|microscope|microscopio;💊|pill|pastilla;💰|money bag|bolsa de dinero;💳|credit card|tarjeta;📦|package|paquete;✉️|envelope|sobre;📮|mailbox|buzón;🔔|bell|campana;📣|megaphone|megáfono;⏰|alarm clock|despertador;⌛|hourglass|reloj de arena",
|
|
10
|
+
symbols: "❤️|red heart|corazón rojo;🧡|orange heart|corazón naranja;💛|yellow heart|corazón amarillo;💚|green heart|corazón verde;💙|blue heart|corazón azul;💜|purple heart|corazón morado;🖤|black heart|corazón negro;🤍|white heart|corazón blanco;💔|broken heart|corazón roto;💯|hundred points|cien;✅|check mark|marca de verificación;☑️|check box|casilla marcada;✔️|check|visto;❌|cross mark|equis;⚠️|warning|advertencia;⛔|no entry|prohibido;🚫|prohibited|prohibido;❓|question|pregunta;❗|exclamation|exclamación;💬|speech bubble|globo de diálogo;💭|thought bubble|globo de pensamiento;🔴|red circle|círculo rojo;🟠|orange circle|círculo naranja;🟡|yellow circle|círculo amarillo;🟢|green circle|círculo verde;🔵|blue circle|círculo azul;🟣|purple circle|círculo morado;⬆️|up arrow|flecha arriba;⬇️|down arrow|flecha abajo;➡️|right arrow|flecha derecha;⬅️|left arrow|flecha izquierda;🔄|counterclockwise arrows|recargar;➕|plus|más;➖|minus|menos;✨|sparkles|destellos;⭐|star|estrella;🆕|new|nuevo;🆗|ok button|botón ok;🔝|top|arriba"
|
|
11
|
+
}, l = Object.keys(e).flatMap((a) => e[a].split(";").map((o) => {
|
|
12
|
+
const [r, n, i] = o.split("|");
|
|
13
|
+
return { emoji: r, en: n, es: i, category: a };
|
|
14
|
+
})), s = [
|
|
15
|
+
{ id: "smileys", icon: "😀" },
|
|
16
|
+
{ id: "people", icon: "👋" },
|
|
17
|
+
{ id: "nature", icon: "🌿" },
|
|
18
|
+
{ id: "food", icon: "🍕" },
|
|
19
|
+
{ id: "activities", icon: "⚽" },
|
|
20
|
+
{ id: "travel", icon: "✈️" },
|
|
21
|
+
{ id: "objects", icon: "💡" },
|
|
22
|
+
{ id: "symbols", icon: "❤️" }
|
|
23
|
+
];
|
|
24
|
+
export {
|
|
25
|
+
l as EMOJI,
|
|
26
|
+
s as EMOJI_CATEGORIES
|
|
27
|
+
};
|