@alfadocs/ui-kit 0.23.0 → 0.25.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/{autocomplete-BxfabhZ8.js → autocomplete-C7xq06bP.js} +40 -40
- package/dist/_chunks/{card-CWzuTLYE.js → card-C353dU-H.js} +21 -13
- package/dist/_chunks/carousel.agent-DnPiqijR.js +1733 -0
- package/dist/_chunks/{contact-card-DTQUMetD.js → contact-card-CjG7c-1q.js} +2 -2
- package/dist/_chunks/description-list-Bsga4IW8.js +309 -0
- package/dist/_chunks/editable-currency-cell-renderer-DJB5MxAI.js +2349 -0
- package/dist/_chunks/locale-picker-BxEUUPW7.js +638 -0
- package/dist/_chunks/{patient-shell-DavGODt9.js → patient-shell-B164drIa.js} +40 -55
- package/dist/_chunks/settings-ca2Yi9R8.js +21 -0
- package/dist/_chunks/sun-Eweh5fvi.js +50 -0
- package/dist/_chunks/{theme-toggle-BswYl0Yp.js → theme-toggle-FrotC2VI.js} +85 -127
- package/dist/_chunks/{timeline-Czeqr3HF.js → timeline-jmd7lfDf.js} +19 -12
- package/dist/_chunks/use-locale-BkCIHujH.js +20 -0
- package/dist/_chunks/use-scroll-to-first-error-BrK7dKB_.js +55 -0
- package/dist/_chunks/{whatsapp-button-CtlLwM3M.js → whatsapp-button-DUjlWGKf.js} +26 -25
- package/dist/_chunks/{workflow-map-712GL-8u.js → workflow-map-BR6txfFX.js} +2 -2
- package/dist/agent-catalog.json +59 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/carousel/carousel.d.ts +21 -0
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/contact-card/index.js +1 -1
- package/dist/components/data-table/filters/number-filter.d.ts +56 -0
- package/dist/components/data-table/filters/text-filter.d.ts +49 -0
- package/dist/components/data-table/index.d.ts +4 -0
- package/dist/components/data-table/index.js +25 -21
- package/dist/components/description-list/description-list.d.ts +40 -0
- package/dist/components/description-list/index.d.ts +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/header-settings/index.js +232 -0
- package/dist/components/locale-picker/index.js +7 -0
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/whatsapp-button/index.js +1 -1
- package/dist/components/whatsapp-button/whatsapp-button.d.ts +14 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/fonts/Lexend-VF-latin-ext.woff2 +0 -0
- package/dist/fonts/Lexend-VF-latin.woff2 +0 -0
- package/dist/fonts/Lexend-VF-vietnamese.woff2 +0 -0
- package/dist/fonts/NotoSansArabic-VF-arabic.woff2 +0 -0
- package/dist/fonts/NotoSansDevanagari-VF-devanagari.woff2 +0 -0
- package/dist/hooks/index.js +29 -28
- package/dist/i18n/config.js +2726 -134
- package/dist/i18n/locales/ar.d.ts +147 -3
- package/dist/i18n/locales/de.d.ts +147 -3
- package/dist/i18n/locales/el.d.ts +147 -3
- package/dist/i18n/locales/es.d.ts +147 -3
- package/dist/i18n/locales/fr.d.ts +147 -3
- package/dist/i18n/locales/hi.d.ts +147 -3
- package/dist/i18n/locales/ja.d.ts +147 -3
- package/dist/i18n/locales/nl.d.ts +147 -3
- package/dist/i18n/locales/pl.d.ts +149 -5
- package/dist/i18n/locales/pt.d.ts +147 -3
- package/dist/i18n/locales/ro.d.ts +147 -3
- package/dist/i18n/locales/ru.d.ts +148 -4
- package/dist/i18n/locales/sq.d.ts +147 -3
- package/dist/i18n/locales/sv.d.ts +147 -3
- package/dist/i18n/locales/tr.d.ts +147 -3
- package/dist/i18n/locales/zh.d.ts +147 -3
- package/dist/i18n/resources.d.ts +294 -6
- package/dist/index.js +512 -507
- package/dist/locales/ar.json +149 -5
- package/dist/locales/de.json +149 -5
- package/dist/locales/el.json +149 -5
- package/dist/locales/en.json +147 -3
- package/dist/locales/es.json +149 -5
- package/dist/locales/fr.json +149 -5
- package/dist/locales/hi.json +149 -5
- package/dist/locales/it.json +147 -3
- package/dist/locales/ja.json +149 -5
- package/dist/locales/nl.json +149 -5
- package/dist/locales/pl.json +151 -7
- package/dist/locales/pt.json +149 -5
- package/dist/locales/ro.json +149 -5
- package/dist/locales/ru.json +150 -6
- package/dist/locales/sq.json +149 -5
- package/dist/locales/sv.json +149 -5
- package/dist/locales/tr.json +149 -5
- package/dist/locales/zh.json +149 -5
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +2 -2
- package/package.json +10 -1
- package/dist/_chunks/carousel.agent-CQPFfppK.js +0 -1696
- package/dist/_chunks/description-list-y7Hk51KI.js +0 -191
- package/dist/_chunks/editable-currency-cell-renderer-1t42gENX.js +0 -1972
- package/dist/_chunks/use-locale-C5rS3Xon.js +0 -71
|
@@ -1,45 +1,30 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as v, useState as I } from "react";
|
|
3
3
|
import { useTranslation as c } from "react-i18next";
|
|
4
|
-
import { A as
|
|
5
|
-
import { I } from "./icon-button-C4CGcYuz.js";
|
|
4
|
+
import { A as L } from "./app-frame-BYx1gcV7.js";
|
|
5
|
+
import { I as w } from "./icon-button-C4CGcYuz.js";
|
|
6
6
|
import { D as n } from "./dropdown-menu-DZxwF23X.js";
|
|
7
|
-
import { H as
|
|
8
|
-
import { L as
|
|
9
|
-
import { S as T, a as
|
|
10
|
-
import { T as
|
|
11
|
-
import { a as
|
|
12
|
-
import { u as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
7
|
+
import { H as k, g as A, f as y, e as H, a as C, c as x, d as B } from "./header-DqmKROIY.js";
|
|
8
|
+
import { L as M } from "./logo-_Z-jLq80.js";
|
|
9
|
+
import { S as T, a as N, h as O, j as P, k as W, i as j } from "./sidebar-DkyC6GvS.js";
|
|
10
|
+
import { T as R } from "./theme-root-BOO73p5t.js";
|
|
11
|
+
import { a as _ } from "./tooltip-DHik5yRI.js";
|
|
12
|
+
import { u as z } from "./use-theme-B1cwAXJR.js";
|
|
13
|
+
import { S as D } from "./settings-ca2Yi9R8.js";
|
|
14
|
+
import { c as q } from "./createLucideIcon-CrFbzy84.js";
|
|
15
|
+
import { L as E } from "./log-out-616hnn2-.js";
|
|
15
16
|
/**
|
|
16
17
|
* @license lucide-react v1.8.0 - ISC
|
|
17
18
|
*
|
|
18
19
|
* This source code is licensed under the ISC license.
|
|
19
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
20
21
|
*/
|
|
21
|
-
const
|
|
22
|
+
const F = [
|
|
22
23
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
23
24
|
["path", { d: "m21 3-7 7", key: "1l2asr" }],
|
|
24
25
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
25
26
|
["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
|
|
26
|
-
],
|
|
27
|
-
/**
|
|
28
|
-
* @license lucide-react v1.8.0 - ISC
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the ISC license.
|
|
31
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/
|
|
33
|
-
const U = [
|
|
34
|
-
[
|
|
35
|
-
"path",
|
|
36
|
-
{
|
|
37
|
-
d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
|
|
38
|
-
key: "1i5ecw"
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
42
|
-
], $ = h("settings", U);
|
|
27
|
+
], U = q("maximize-2", F);
|
|
43
28
|
function G(a) {
|
|
44
29
|
return a > 99 ? "99+" : String(a);
|
|
45
30
|
}
|
|
@@ -60,9 +45,9 @@ function K({
|
|
|
60
45
|
const { t: r } = c();
|
|
61
46
|
return /* @__PURE__ */ i(n.Root, { children: [
|
|
62
47
|
/* @__PURE__ */ e(n.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
63
|
-
|
|
48
|
+
w,
|
|
64
49
|
{
|
|
65
|
-
icon: /* @__PURE__ */ e(
|
|
50
|
+
icon: /* @__PURE__ */ e(D, { "aria-hidden": "true" }),
|
|
66
51
|
"aria-label": r("patientShell.settings.triggerAria"),
|
|
67
52
|
tooltip: r("patientShell.settings.triggerAria"),
|
|
68
53
|
"data-testid": "patient-shell-settings-trigger"
|
|
@@ -72,7 +57,7 @@ function K({
|
|
|
72
57
|
/* @__PURE__ */ e(
|
|
73
58
|
n.Item,
|
|
74
59
|
{
|
|
75
|
-
startIcon: /* @__PURE__ */ e(
|
|
60
|
+
startIcon: /* @__PURE__ */ e(U, { "aria-hidden": "true" }),
|
|
76
61
|
onSelect: t,
|
|
77
62
|
"data-testid": "patient-shell-fullscreen",
|
|
78
63
|
children: r("patientShell.settings.fullscreen")
|
|
@@ -82,7 +67,7 @@ function K({
|
|
|
82
67
|
/* @__PURE__ */ e(
|
|
83
68
|
n.Item,
|
|
84
69
|
{
|
|
85
|
-
startIcon: /* @__PURE__ */ e(
|
|
70
|
+
startIcon: /* @__PURE__ */ e(E, { "aria-hidden": "true" }),
|
|
86
71
|
onSelect: () => {
|
|
87
72
|
typeof window > "u" || J(a) && window.location.assign(a);
|
|
88
73
|
},
|
|
@@ -94,7 +79,7 @@ function K({
|
|
|
94
79
|
] });
|
|
95
80
|
}
|
|
96
81
|
function Q({ menuItems: a }) {
|
|
97
|
-
return /* @__PURE__ */ e(
|
|
82
|
+
return /* @__PURE__ */ e(N, { children: a.map((t) => {
|
|
98
83
|
const r = typeof t.badgeCount == "number" && t.badgeCount > 0 ? t.badgeCount : void 0;
|
|
99
84
|
return /* @__PURE__ */ i(
|
|
100
85
|
O,
|
|
@@ -112,49 +97,49 @@ function Q({ menuItems: a }) {
|
|
|
112
97
|
);
|
|
113
98
|
}) });
|
|
114
99
|
}
|
|
115
|
-
const V =
|
|
100
|
+
const V = v(
|
|
116
101
|
({
|
|
117
102
|
menuItems: a,
|
|
118
103
|
logoutHref: t,
|
|
119
104
|
onToggleFullscreen: r,
|
|
120
|
-
brandLogo:
|
|
121
|
-
brandHref:
|
|
105
|
+
brandLogo: h,
|
|
106
|
+
brandHref: p = "/",
|
|
122
107
|
mainAriaLabel: m,
|
|
123
108
|
sidebarState: o,
|
|
124
|
-
children:
|
|
109
|
+
children: u,
|
|
125
110
|
// `userName` and `userAvatarSrc` are declared on the public API
|
|
126
111
|
// for forward-compatibility (future profile-pill work) — they are
|
|
127
112
|
// intentionally unused today because the legacy patient chrome
|
|
128
113
|
// carries no profile pill.
|
|
129
114
|
userName: X,
|
|
130
115
|
userAvatarSrc: Y
|
|
131
|
-
},
|
|
132
|
-
const { t: s } = c(), { resolvedTheme: d } =
|
|
116
|
+
}, f) => {
|
|
117
|
+
const { t: s } = c(), { resolvedTheme: d } = z(), g = d.startsWith("dark") ? "dark" : "light", S = d.endsWith("-accessible"), [b, l] = I(!1);
|
|
133
118
|
return /* @__PURE__ */ e(
|
|
134
|
-
|
|
119
|
+
R,
|
|
135
120
|
{
|
|
136
|
-
ref:
|
|
137
|
-
theme:
|
|
138
|
-
accessible:
|
|
121
|
+
ref: f,
|
|
122
|
+
theme: g,
|
|
123
|
+
accessible: S,
|
|
139
124
|
className: "ds:contents",
|
|
140
|
-
children: /* @__PURE__ */ e(
|
|
141
|
-
|
|
125
|
+
children: /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(
|
|
126
|
+
L,
|
|
142
127
|
{
|
|
143
128
|
mainAriaLabel: m,
|
|
144
|
-
header: /* @__PURE__ */ i(
|
|
129
|
+
header: /* @__PURE__ */ i(k, { children: [
|
|
145
130
|
/* @__PURE__ */ i(A, { children: [
|
|
146
|
-
/* @__PURE__ */ e(
|
|
147
|
-
/* @__PURE__ */ e(
|
|
131
|
+
/* @__PURE__ */ e(y, { href: "#main-content" }),
|
|
132
|
+
/* @__PURE__ */ e(H, { onMenuOpen: () => l(!0) }),
|
|
148
133
|
/* @__PURE__ */ e(
|
|
149
134
|
C,
|
|
150
135
|
{
|
|
151
|
-
logo:
|
|
152
|
-
href:
|
|
136
|
+
logo: h ?? /* @__PURE__ */ e(M, { variant: "monochrome", size: "md", decorative: !0 }),
|
|
137
|
+
href: p,
|
|
153
138
|
"aria-label": s("patientShell.brand.homeAria")
|
|
154
139
|
}
|
|
155
140
|
)
|
|
156
141
|
] }),
|
|
157
|
-
/* @__PURE__ */ e(
|
|
142
|
+
/* @__PURE__ */ e(x, {}),
|
|
158
143
|
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(
|
|
159
144
|
K,
|
|
160
145
|
{
|
|
@@ -167,14 +152,14 @@ const V = k(
|
|
|
167
152
|
T,
|
|
168
153
|
{
|
|
169
154
|
...o !== void 0 ? { state: o } : { defaultState: "expanded" },
|
|
170
|
-
open:
|
|
155
|
+
open: b,
|
|
171
156
|
onOpenChange: l,
|
|
172
157
|
"aria-label": s("patientShell.sidebar.panelLabel"),
|
|
173
158
|
"data-testid": "patient-shell-sidebar",
|
|
174
159
|
children: /* @__PURE__ */ e(Q, { menuItems: a })
|
|
175
160
|
}
|
|
176
161
|
),
|
|
177
|
-
children:
|
|
162
|
+
children: u
|
|
178
163
|
}
|
|
179
164
|
) })
|
|
180
165
|
}
|
|
@@ -185,4 +170,4 @@ V.displayName = "PatientShell";
|
|
|
185
170
|
export {
|
|
186
171
|
V as P
|
|
187
172
|
};
|
|
188
|
-
//# sourceMappingURL=patient-shell-
|
|
173
|
+
//# sourceMappingURL=patient-shell-B164drIa.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { c } from "./createLucideIcon-CrFbzy84.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v1.8.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const e = [
|
|
9
|
+
[
|
|
10
|
+
"path",
|
|
11
|
+
{
|
|
12
|
+
d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
|
|
13
|
+
key: "1i5ecw"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
17
|
+
], o = c("settings", e);
|
|
18
|
+
export {
|
|
19
|
+
o as S
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=settings-ca2Yi9R8.js.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { c as t } from "./createLucideIcon-CrFbzy84.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v1.8.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const e = [
|
|
9
|
+
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
|
|
10
|
+
["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
|
|
11
|
+
["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
|
|
12
|
+
], y = t("monitor", e);
|
|
13
|
+
/**
|
|
14
|
+
* @license lucide-react v1.8.0 - ISC
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the ISC license.
|
|
17
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/
|
|
19
|
+
const o = [
|
|
20
|
+
[
|
|
21
|
+
"path",
|
|
22
|
+
{
|
|
23
|
+
d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
|
|
24
|
+
key: "kfwtm"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
], a = t("moon", o);
|
|
28
|
+
/**
|
|
29
|
+
* @license lucide-react v1.8.0 - ISC
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the ISC license.
|
|
32
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/
|
|
34
|
+
const c = [
|
|
35
|
+
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
36
|
+
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
37
|
+
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
38
|
+
["path", { d: "m4.93 4.93 1.41 1.41", key: "149t6j" }],
|
|
39
|
+
["path", { d: "m17.66 17.66 1.41 1.41", key: "ptbguv" }],
|
|
40
|
+
["path", { d: "M2 12h2", key: "1t8f8n" }],
|
|
41
|
+
["path", { d: "M20 12h2", key: "1q8mjw" }],
|
|
42
|
+
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
43
|
+
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
44
|
+
], h = t("sun", c);
|
|
45
|
+
export {
|
|
46
|
+
a as M,
|
|
47
|
+
h as S,
|
|
48
|
+
y as a
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=sun-Eweh5fvi.js.map
|
|
@@ -1,57 +1,15 @@
|
|
|
1
|
-
import { jsx as t, jsxs as m, Fragment as
|
|
2
|
-
import { forwardRef as N, useRef as
|
|
1
|
+
import { jsx as t, jsxs as m, Fragment as V } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as N, useRef as k, useImperativeHandle as M, useMemo as _, useCallback as S } from "react";
|
|
3
3
|
import { c as P } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as g } from "react-i18next";
|
|
5
|
-
import { I as
|
|
6
|
-
import { I as
|
|
7
|
-
import { S as
|
|
5
|
+
import { I as y } from "./icon-button-C4CGcYuz.js";
|
|
6
|
+
import { I as K } from "./icon-button-group-DeV3FpNY.js";
|
|
7
|
+
import { S as x } from "./switch-D916VW86.js";
|
|
8
8
|
import { D as o } from "./dropdown-menu-DZxwF23X.js";
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
* @license lucide-react v1.8.0 - ISC
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the ISC license.
|
|
16
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/
|
|
18
|
-
const D = [
|
|
19
|
-
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
|
|
20
|
-
["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
|
|
21
|
-
["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
|
|
22
|
-
], _ = C("monitor", D);
|
|
23
|
-
/**
|
|
24
|
-
* @license lucide-react v1.8.0 - ISC
|
|
25
|
-
*
|
|
26
|
-
* This source code is licensed under the ISC license.
|
|
27
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
28
|
-
*/
|
|
29
|
-
const H = [
|
|
30
|
-
[
|
|
31
|
-
"path",
|
|
32
|
-
{
|
|
33
|
-
d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
|
|
34
|
-
key: "kfwtm"
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
], f = C("moon", H);
|
|
38
|
-
/**
|
|
39
|
-
* @license lucide-react v1.8.0 - ISC
|
|
40
|
-
*
|
|
41
|
-
* This source code is licensed under the ISC license.
|
|
42
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/
|
|
44
|
-
const q = [
|
|
45
|
-
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
46
|
-
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
47
|
-
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
48
|
-
["path", { d: "m4.93 4.93 1.41 1.41", key: "149t6j" }],
|
|
49
|
-
["path", { d: "m17.66 17.66 1.41 1.41", key: "ptbguv" }],
|
|
50
|
-
["path", { d: "M2 12h2", key: "1t8f8n" }],
|
|
51
|
-
["path", { d: "M20 12h2", key: "1q8mjw" }],
|
|
52
|
-
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
53
|
-
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
54
|
-
], k = C("sun", q), B = {
|
|
9
|
+
import { u as z } from "./use-theme-B1cwAXJR.js";
|
|
10
|
+
import { u as D } from "./registry-C9nwlNyL.js";
|
|
11
|
+
import { M as v, S as C, a as w } from "./sun-Eweh5fvi.js";
|
|
12
|
+
const H = {
|
|
55
13
|
id: "theme-toggle",
|
|
56
14
|
capabilities: ["view_change"],
|
|
57
15
|
state: {
|
|
@@ -110,30 +68,30 @@ const q = [
|
|
|
110
68
|
},
|
|
111
69
|
defaultVariants: { variant: "menu" }
|
|
112
70
|
});
|
|
113
|
-
function
|
|
71
|
+
function L(e) {
|
|
114
72
|
const {
|
|
115
73
|
theme: n,
|
|
116
|
-
accessibility:
|
|
117
|
-
onThemeChange:
|
|
74
|
+
accessibility: s,
|
|
75
|
+
onThemeChange: c,
|
|
118
76
|
onAccessibilityChange: a
|
|
119
|
-
} = e, i =
|
|
77
|
+
} = e, i = z(), u = n ?? i.theme, p = s ?? i.accessibility, l = i.setTheme, T = i.setAccessibility, d = S(
|
|
120
78
|
(r) => {
|
|
121
|
-
if (
|
|
122
|
-
|
|
79
|
+
if (c) {
|
|
80
|
+
c(r);
|
|
123
81
|
return;
|
|
124
82
|
}
|
|
125
83
|
l(r);
|
|
126
84
|
},
|
|
127
|
-
[
|
|
85
|
+
[c, l]
|
|
128
86
|
), h = S(
|
|
129
87
|
(r) => {
|
|
130
88
|
if (a) {
|
|
131
89
|
a(r);
|
|
132
90
|
return;
|
|
133
91
|
}
|
|
134
|
-
|
|
92
|
+
T(r);
|
|
135
93
|
},
|
|
136
|
-
[a,
|
|
94
|
+
[a, T]
|
|
137
95
|
);
|
|
138
96
|
return {
|
|
139
97
|
theme: u,
|
|
@@ -146,40 +104,40 @@ function G(e) {
|
|
|
146
104
|
function I({
|
|
147
105
|
value: e,
|
|
148
106
|
onValueChange: n,
|
|
149
|
-
ariaLabel:
|
|
150
|
-
size:
|
|
107
|
+
ariaLabel: s,
|
|
108
|
+
size: c = "md"
|
|
151
109
|
}) {
|
|
152
110
|
const { t: a } = g();
|
|
153
111
|
return /* @__PURE__ */ m(
|
|
154
|
-
|
|
112
|
+
K,
|
|
155
113
|
{
|
|
156
|
-
"aria-label":
|
|
114
|
+
"aria-label": s,
|
|
157
115
|
role: "radiogroup",
|
|
158
116
|
mode: "toggle-single",
|
|
159
|
-
size:
|
|
117
|
+
size: c,
|
|
160
118
|
value: e,
|
|
161
119
|
onValueChange: (i) => n(i),
|
|
162
120
|
children: [
|
|
163
121
|
/* @__PURE__ */ t(
|
|
164
|
-
|
|
122
|
+
y,
|
|
165
123
|
{
|
|
166
|
-
icon: /* @__PURE__ */ t(
|
|
124
|
+
icon: /* @__PURE__ */ t(C, { "aria-hidden": !0 }),
|
|
167
125
|
"aria-label": a("navigation.themeToggle.appearance.light"),
|
|
168
126
|
value: "light"
|
|
169
127
|
}
|
|
170
128
|
),
|
|
171
129
|
/* @__PURE__ */ t(
|
|
172
|
-
|
|
130
|
+
y,
|
|
173
131
|
{
|
|
174
|
-
icon: /* @__PURE__ */ t(
|
|
132
|
+
icon: /* @__PURE__ */ t(v, { "aria-hidden": !0 }),
|
|
175
133
|
"aria-label": a("navigation.themeToggle.appearance.dark"),
|
|
176
134
|
value: "dark"
|
|
177
135
|
}
|
|
178
136
|
),
|
|
179
137
|
/* @__PURE__ */ t(
|
|
180
|
-
|
|
138
|
+
y,
|
|
181
139
|
{
|
|
182
|
-
icon: /* @__PURE__ */ t(
|
|
140
|
+
icon: /* @__PURE__ */ t(w, { "aria-hidden": !0 }),
|
|
183
141
|
"aria-label": a("navigation.themeToggle.appearance.system"),
|
|
184
142
|
value: "system"
|
|
185
143
|
}
|
|
@@ -188,42 +146,42 @@ function I({
|
|
|
188
146
|
}
|
|
189
147
|
);
|
|
190
148
|
}
|
|
191
|
-
function
|
|
149
|
+
function j({
|
|
192
150
|
value: e,
|
|
193
151
|
onValueChange: n,
|
|
194
|
-
size:
|
|
152
|
+
size: s = "md"
|
|
195
153
|
}) {
|
|
196
|
-
const { t:
|
|
154
|
+
const { t: c } = g(), a = e === "accessible";
|
|
197
155
|
return /* @__PURE__ */ t(
|
|
198
|
-
|
|
156
|
+
x,
|
|
199
157
|
{
|
|
200
|
-
label:
|
|
158
|
+
label: c("navigation.themeToggle.accessibility.label"),
|
|
201
159
|
labelSide: "start",
|
|
202
|
-
size:
|
|
160
|
+
size: s,
|
|
203
161
|
checked: a,
|
|
204
162
|
onCheckedChange: (i) => n(i ? "accessible" : "default")
|
|
205
163
|
}
|
|
206
164
|
);
|
|
207
165
|
}
|
|
208
|
-
function
|
|
166
|
+
function B({
|
|
209
167
|
state: e,
|
|
210
168
|
className: n,
|
|
211
|
-
rest:
|
|
212
|
-
forwardedRef:
|
|
169
|
+
rest: s,
|
|
170
|
+
forwardedRef: c,
|
|
213
171
|
showAccessibility: a
|
|
214
172
|
}) {
|
|
215
|
-
const { t: i } = g(), u = e.resolvedTheme === "dark" || e.resolvedTheme === "dark-accessible" ? /* @__PURE__ */ t(
|
|
173
|
+
const { t: i } = g(), u = e.resolvedTheme === "dark" || e.resolvedTheme === "dark-accessible" ? /* @__PURE__ */ t(v, { "aria-hidden": !0 }) : /* @__PURE__ */ t(C, { "aria-hidden": !0 }), p = e.accessibility === "accessible";
|
|
216
174
|
return /* @__PURE__ */ t(
|
|
217
175
|
"div",
|
|
218
176
|
{
|
|
219
|
-
ref:
|
|
177
|
+
ref: c,
|
|
220
178
|
"data-component": "theme-toggle",
|
|
221
|
-
"data-component-id":
|
|
179
|
+
"data-component-id": s.id,
|
|
222
180
|
className: A({ variant: "menu", className: n }),
|
|
223
|
-
...
|
|
181
|
+
...s,
|
|
224
182
|
children: /* @__PURE__ */ m(o.Root, { children: [
|
|
225
183
|
/* @__PURE__ */ t(o.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
226
|
-
|
|
184
|
+
y,
|
|
227
185
|
{
|
|
228
186
|
icon: u,
|
|
229
187
|
"aria-label": i("navigation.themeToggle.trigger")
|
|
@@ -238,21 +196,21 @@ function F({
|
|
|
238
196
|
onValueChange: (l) => e.setTheme(l),
|
|
239
197
|
children: [
|
|
240
198
|
/* @__PURE__ */ m(o.RadioItem, { value: "light", children: [
|
|
241
|
-
/* @__PURE__ */ t(
|
|
199
|
+
/* @__PURE__ */ t(C, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
242
200
|
i("navigation.themeToggle.appearance.light")
|
|
243
201
|
] }),
|
|
244
202
|
/* @__PURE__ */ m(o.RadioItem, { value: "dark", children: [
|
|
245
|
-
/* @__PURE__ */ t(
|
|
203
|
+
/* @__PURE__ */ t(v, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
246
204
|
i("navigation.themeToggle.appearance.dark")
|
|
247
205
|
] }),
|
|
248
206
|
/* @__PURE__ */ m(o.RadioItem, { value: "system", children: [
|
|
249
|
-
/* @__PURE__ */ t(
|
|
207
|
+
/* @__PURE__ */ t(w, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
250
208
|
i("navigation.themeToggle.appearance.system")
|
|
251
209
|
] })
|
|
252
210
|
]
|
|
253
211
|
}
|
|
254
212
|
),
|
|
255
|
-
a ? /* @__PURE__ */ m(
|
|
213
|
+
a ? /* @__PURE__ */ m(V, { children: [
|
|
256
214
|
/* @__PURE__ */ t(o.Separator, {}),
|
|
257
215
|
/* @__PURE__ */ t(
|
|
258
216
|
o.CheckboxItem,
|
|
@@ -269,21 +227,21 @@ function F({
|
|
|
269
227
|
}
|
|
270
228
|
);
|
|
271
229
|
}
|
|
272
|
-
function
|
|
230
|
+
function G({
|
|
273
231
|
state: e,
|
|
274
232
|
className: n,
|
|
275
|
-
rest:
|
|
276
|
-
forwardedRef:
|
|
233
|
+
rest: s,
|
|
234
|
+
forwardedRef: c
|
|
277
235
|
}) {
|
|
278
236
|
const { t: a } = g();
|
|
279
237
|
return /* @__PURE__ */ t(
|
|
280
238
|
"div",
|
|
281
239
|
{
|
|
282
|
-
ref:
|
|
240
|
+
ref: c,
|
|
283
241
|
"data-component": "theme-toggle",
|
|
284
|
-
"data-component-id":
|
|
242
|
+
"data-component-id": s.id,
|
|
285
243
|
className: A({ variant: "compact", className: n }),
|
|
286
|
-
...
|
|
244
|
+
...s,
|
|
287
245
|
children: /* @__PURE__ */ t(
|
|
288
246
|
I,
|
|
289
247
|
{
|
|
@@ -295,22 +253,22 @@ function O({
|
|
|
295
253
|
}
|
|
296
254
|
);
|
|
297
255
|
}
|
|
298
|
-
function
|
|
256
|
+
function F({
|
|
299
257
|
state: e,
|
|
300
258
|
className: n,
|
|
301
|
-
rest:
|
|
302
|
-
forwardedRef:
|
|
259
|
+
rest: s,
|
|
260
|
+
forwardedRef: c,
|
|
303
261
|
showAccessibility: a
|
|
304
262
|
}) {
|
|
305
263
|
const { t: i } = g();
|
|
306
264
|
return /* @__PURE__ */ m(
|
|
307
265
|
"div",
|
|
308
266
|
{
|
|
309
|
-
ref:
|
|
267
|
+
ref: c,
|
|
310
268
|
"data-component": "theme-toggle",
|
|
311
|
-
"data-component-id":
|
|
269
|
+
"data-component-id": s.id,
|
|
312
270
|
className: A({ variant: "split", className: n }),
|
|
313
|
-
...
|
|
271
|
+
...s,
|
|
314
272
|
children: [
|
|
315
273
|
/* @__PURE__ */ t(
|
|
316
274
|
I,
|
|
@@ -321,7 +279,7 @@ function E({
|
|
|
321
279
|
}
|
|
322
280
|
),
|
|
323
281
|
a ? /* @__PURE__ */ t(
|
|
324
|
-
|
|
282
|
+
j,
|
|
325
283
|
{
|
|
326
284
|
value: e.accessibility,
|
|
327
285
|
onValueChange: e.setAccessibility
|
|
@@ -331,11 +289,11 @@ function E({
|
|
|
331
289
|
}
|
|
332
290
|
);
|
|
333
291
|
}
|
|
334
|
-
const
|
|
292
|
+
const O = N(
|
|
335
293
|
(e, n) => {
|
|
336
294
|
const {
|
|
337
|
-
variant:
|
|
338
|
-
showAccessibility:
|
|
295
|
+
variant: s = "menu",
|
|
296
|
+
showAccessibility: c = !0,
|
|
339
297
|
className: a,
|
|
340
298
|
id: i,
|
|
341
299
|
// Strip controlled props from the spread — they are read by the
|
|
@@ -343,54 +301,54 @@ const J = N(
|
|
|
343
301
|
theme: u,
|
|
344
302
|
accessibility: p,
|
|
345
303
|
onThemeChange: l,
|
|
346
|
-
onAccessibilityChange:
|
|
304
|
+
onAccessibilityChange: T,
|
|
347
305
|
...d
|
|
348
|
-
} = e, h =
|
|
306
|
+
} = e, h = L(e), r = k(h);
|
|
349
307
|
r.current = h;
|
|
350
|
-
const
|
|
351
|
-
|
|
352
|
-
const
|
|
308
|
+
const b = k(null);
|
|
309
|
+
M(n, () => b.current, []);
|
|
310
|
+
const R = _(
|
|
353
311
|
() => ({
|
|
354
312
|
getCurrentTheme: () => r.current.theme,
|
|
355
313
|
getCurrentAccessibility: () => r.current.accessibility,
|
|
356
|
-
setTheme: (
|
|
357
|
-
setAccessibility: (
|
|
314
|
+
setTheme: (f) => r.current.setTheme(f),
|
|
315
|
+
setAccessibility: (f) => r.current.setAccessibility(f)
|
|
358
316
|
}),
|
|
359
317
|
[]
|
|
360
318
|
);
|
|
361
|
-
return
|
|
362
|
-
|
|
319
|
+
return D(H, R, i), s === "compact" ? /* @__PURE__ */ t(
|
|
320
|
+
G,
|
|
363
321
|
{
|
|
364
322
|
state: h,
|
|
365
323
|
className: a,
|
|
366
324
|
rest: d,
|
|
367
|
-
forwardedRef:
|
|
368
|
-
showAccessibility:
|
|
325
|
+
forwardedRef: b,
|
|
326
|
+
showAccessibility: c
|
|
369
327
|
}
|
|
370
|
-
) :
|
|
371
|
-
|
|
328
|
+
) : s === "split" ? /* @__PURE__ */ t(
|
|
329
|
+
F,
|
|
372
330
|
{
|
|
373
331
|
state: h,
|
|
374
332
|
className: a,
|
|
375
333
|
rest: d,
|
|
376
|
-
forwardedRef:
|
|
377
|
-
showAccessibility:
|
|
334
|
+
forwardedRef: b,
|
|
335
|
+
showAccessibility: c
|
|
378
336
|
}
|
|
379
337
|
) : /* @__PURE__ */ t(
|
|
380
|
-
|
|
338
|
+
B,
|
|
381
339
|
{
|
|
382
340
|
state: h,
|
|
383
341
|
className: a,
|
|
384
342
|
rest: d,
|
|
385
|
-
forwardedRef:
|
|
386
|
-
showAccessibility:
|
|
343
|
+
forwardedRef: b,
|
|
344
|
+
showAccessibility: c
|
|
387
345
|
}
|
|
388
346
|
);
|
|
389
347
|
}
|
|
390
348
|
);
|
|
391
|
-
|
|
349
|
+
O.displayName = "ThemeToggle";
|
|
392
350
|
export {
|
|
393
|
-
|
|
394
|
-
|
|
351
|
+
O as T,
|
|
352
|
+
H as t
|
|
395
353
|
};
|
|
396
|
-
//# sourceMappingURL=theme-toggle-
|
|
354
|
+
//# sourceMappingURL=theme-toggle-FrotC2VI.js.map
|