@alfadocs/ui-kit 0.50.0 → 0.51.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.
Files changed (159) hide show
  1. package/dist/_chunks/{agenda-card-BaSfVfrL.js → agenda-card-Bl-SBiCh.js} +55 -45
  2. package/dist/_chunks/agenda-tray-DA6qj8BL.js +203 -0
  3. package/dist/_chunks/{ai-consent-banner-F2md5JD3.js → ai-consent-banner-DBKV27je.js} +2 -2
  4. package/dist/_chunks/ai-tools-rail-7tC3GT4h.js +340 -0
  5. package/dist/_chunks/{alert-CUTxnym2.js → alert-_mUKLmwA.js} +54 -44
  6. package/dist/_chunks/{audio-recorder-DVJXV7_k.js → audio-recorder-D6OVfNiZ.js} +2 -2
  7. package/dist/_chunks/{bishop-score-2MzAz8NE.js → bishop-score-CMQxsdy4.js} +2 -2
  8. package/dist/_chunks/{bmi-calculator-DdylQzT6.js → bmi-calculator-DuUneHuZ.js} +2 -2
  9. package/dist/_chunks/{booking-DljH0JkS.js → booking-BUV9fspj.js} +2 -2
  10. package/dist/_chunks/{cycle-calculator-oOkj5wlB.js → cycle-calculator-vTtZZAmn.js} +2 -2
  11. package/dist/_chunks/{document-scanner-Cxqvq7GR.js → document-scanner-biBS_f6c.js} +2 -2
  12. package/dist/_chunks/dropdown-menu-DwwPovMZ.js +354 -0
  13. package/dist/_chunks/{due-date-calculator-DykajWzh.js → due-date-calculator-CUm5KJbf.js} +2 -2
  14. package/dist/_chunks/{editable-currency-cell-renderer-Bh48OHRv.js → editable-currency-cell-renderer-D5C5tCfu.js} +3 -3
  15. package/dist/_chunks/{fetal-weight-Da-B4P4k.js → fetal-weight-Xf8-ZoDy.js} +2 -2
  16. package/dist/_chunks/{freemium-paywall-BWaLWje-.js → freemium-paywall-gHGA44dW.js} +2 -2
  17. package/dist/_chunks/{gestational-age-calculator-Bc55hq6t.js → gestational-age-calculator-830KJql3.js} +2 -2
  18. package/dist/_chunks/{hcg-doubling-DAnpbale.js → hcg-doubling-kVOpDfny.js} +2 -2
  19. package/dist/_chunks/{header-settings-Bx0Biimh.js → header-settings-D5Z2B_Yz.js} +3 -3
  20. package/dist/_chunks/insert-result-njqBthzT.js +742 -0
  21. package/dist/_chunks/{marketplace-app-shell-UKSLx9K_.js → marketplace-app-shell-Dmo1S9av.js} +6 -6
  22. package/dist/_chunks/{patient-search-BJOmTmDA.js → patient-search-CArmRKeg.js} +3 -3
  23. package/dist/_chunks/{patient-shell-DUmhXnFq.js → patient-shell-c2YixkQw.js} +4 -4
  24. package/dist/_chunks/{payment-form-xmeCkxas.js → payment-form-DJ9vnzrT.js} +2 -2
  25. package/dist/_chunks/{pdf-viewer-q1D3Uion.js → pdf-viewer-4odMFuFW.js} +2 -2
  26. package/dist/_chunks/{practice-results-Cq1y8JFD.js → practice-results-CtfciF2v.js} +3 -3
  27. package/dist/_chunks/{pregnancy-dating-48Gfvod1.js → pregnancy-dating-BA37LSkF.js} +16 -16
  28. package/dist/_chunks/{pregnancy-weight-gain-CCGrvarh.js → pregnancy-weight-gain-BMRBeA8V.js} +2 -2
  29. package/dist/_chunks/{recaptcha-widget-CFYyLSEX.js → recaptcha-widget-BCNHsgqt.js} +2 -2
  30. package/dist/_chunks/{sidebar-h78cTNLh.js → sidebar-DPEHzxLZ.js} +397 -346
  31. package/dist/_chunks/{sign-document-CZkAf28g.js → sign-document-Bzld9jVM.js} +2 -2
  32. package/dist/_chunks/{task-card-CPyQ5AXC.js → task-card-BwY9jaV1.js} +48 -42
  33. package/dist/_chunks/task-tray-Cb_hK4yb.js +234 -0
  34. package/dist/_chunks/{theme-toggle-ClATnY4Q.js → theme-toggle-DAW7uC0B.js} +3 -3
  35. package/dist/_chunks/{unit-converter-jWp3Z85y.js → unit-converter-BQ6lEYvd.js} +2 -2
  36. package/dist/_chunks/use-edge-resize-ZnGG7gyO.js +139 -0
  37. package/dist/_chunks/use-theme-CAuo6EYT.js +159 -0
  38. package/dist/_chunks/{warning-stack-CXfoAT-_.js → warning-stack-Cv4fr5zo.js} +2 -2
  39. package/dist/_chunks/{workflow-map-DzX_LI4y.js → workflow-map-BJDUNYlX.js} +3 -3
  40. package/dist/agent-catalog.json +1 -1
  41. package/dist/components/agenda-card/agenda-card.d.ts +19 -2
  42. package/dist/components/agenda-card/index.js +1 -1
  43. package/dist/components/agenda-tray/agenda-tray.d.ts +24 -1
  44. package/dist/components/agenda-tray/index.js +1 -1
  45. package/dist/components/ai-consent-banner/index.js +1 -1
  46. package/dist/components/ai-tools-rail/ai-tools-rail.d.ts +8 -0
  47. package/dist/components/ai-tools-rail/index.js +1 -1
  48. package/dist/components/alert/index.js +1 -1
  49. package/dist/components/audio-recorder/index.js +1 -1
  50. package/dist/components/bishop-score/index.js +1 -1
  51. package/dist/components/bmi-calculator/index.js +1 -1
  52. package/dist/components/booking/index.js +1 -1
  53. package/dist/components/button-group/button-group.d.ts +1 -1
  54. package/dist/components/checkbox-group/checkbox-group.d.ts +1 -1
  55. package/dist/components/cycle-calculator/index.js +1 -1
  56. package/dist/components/data-table/index.js +1 -1
  57. package/dist/components/document-scanner/index.js +1 -1
  58. package/dist/components/dropdown-menu/dropdown-menu.d.ts +2 -0
  59. package/dist/components/dropdown-menu/index.js +1 -1
  60. package/dist/components/due-date-calculator/index.js +1 -1
  61. package/dist/components/fetal-weight/index.js +1 -1
  62. package/dist/components/form-field/form-field.d.ts +1 -1
  63. package/dist/components/freemium-paywall/index.js +1 -1
  64. package/dist/components/gestational-age-calculator/index.js +1 -1
  65. package/dist/components/hcg-doubling/index.js +1 -1
  66. package/dist/components/header-settings/index.js +1 -1
  67. package/dist/components/icon-button-group/icon-button-group.d.ts +15 -15
  68. package/dist/components/key-value-pair/key-value-pair.d.ts +1 -1
  69. package/dist/components/patient-search/index.js +1 -1
  70. package/dist/components/payment-form/index.js +1 -1
  71. package/dist/components/pdf-viewer/index.js +1 -1
  72. package/dist/components/practice-results/index.js +1 -1
  73. package/dist/components/pregnancy-dating/index.js +1 -1
  74. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  75. package/dist/components/radio-group/radio-group.d.ts +1 -1
  76. package/dist/components/recaptcha-widget/index.js +1 -1
  77. package/dist/components/separator/separator.d.ts +1 -1
  78. package/dist/components/sidebar/index.js +1 -1
  79. package/dist/components/sidebar/sidebar.d.ts +8 -0
  80. package/dist/components/sign-document/index.js +1 -1
  81. package/dist/components/tabs/tabs.d.ts +2 -2
  82. package/dist/components/task-card/index.js +1 -1
  83. package/dist/components/task-card/task-card.d.ts +15 -1
  84. package/dist/components/task-tray/index.js +1 -1
  85. package/dist/components/task-tray/task-tray.d.ts +24 -1
  86. package/dist/components/theme-toggle/index.js +1 -1
  87. package/dist/components/unit-converter/index.js +1 -1
  88. package/dist/components/warning-stack/index.js +1 -1
  89. package/dist/components/workflow/index.js +1 -1
  90. package/dist/components/workflow/workflow-map.d.ts +1 -1
  91. package/dist/hooks/index.d.ts +1 -0
  92. package/dist/hooks/index.js +12 -10
  93. package/dist/hooks/use-edge-resize.d.ts +78 -0
  94. package/dist/i18n/locales/ar.d.ts +4 -0
  95. package/dist/i18n/locales/ar.js +7 -3
  96. package/dist/i18n/locales/de.d.ts +4 -0
  97. package/dist/i18n/locales/de.js +7 -3
  98. package/dist/i18n/locales/el.d.ts +4 -0
  99. package/dist/i18n/locales/el.js +7 -3
  100. package/dist/i18n/locales/en.d.ts +4 -0
  101. package/dist/i18n/locales/en.js +7 -3
  102. package/dist/i18n/locales/es.d.ts +4 -0
  103. package/dist/i18n/locales/es.js +7 -3
  104. package/dist/i18n/locales/fr.d.ts +4 -0
  105. package/dist/i18n/locales/fr.js +7 -3
  106. package/dist/i18n/locales/hi.d.ts +4 -0
  107. package/dist/i18n/locales/hi.js +7 -3
  108. package/dist/i18n/locales/it.d.ts +4 -0
  109. package/dist/i18n/locales/it.js +7 -3
  110. package/dist/i18n/locales/ja.d.ts +4 -0
  111. package/dist/i18n/locales/ja.js +7 -3
  112. package/dist/i18n/locales/nl.d.ts +4 -0
  113. package/dist/i18n/locales/nl.js +7 -3
  114. package/dist/i18n/locales/pl.d.ts +4 -0
  115. package/dist/i18n/locales/pl.js +7 -3
  116. package/dist/i18n/locales/pt.d.ts +4 -0
  117. package/dist/i18n/locales/pt.js +7 -3
  118. package/dist/i18n/locales/ro.d.ts +4 -0
  119. package/dist/i18n/locales/ro.js +7 -3
  120. package/dist/i18n/locales/ru.d.ts +4 -0
  121. package/dist/i18n/locales/ru.js +7 -3
  122. package/dist/i18n/locales/sq.d.ts +4 -0
  123. package/dist/i18n/locales/sq.js +7 -3
  124. package/dist/i18n/locales/sv.d.ts +4 -0
  125. package/dist/i18n/locales/sv.js +7 -3
  126. package/dist/i18n/locales/tr.d.ts +4 -0
  127. package/dist/i18n/locales/tr.js +7 -3
  128. package/dist/i18n/locales/zh.d.ts +4 -0
  129. package/dist/i18n/locales/zh.js +7 -3
  130. package/dist/index.js +37 -37
  131. package/dist/locales/ar.json +7 -3
  132. package/dist/locales/de.json +7 -3
  133. package/dist/locales/el.json +7 -3
  134. package/dist/locales/en.json +7 -3
  135. package/dist/locales/es.json +7 -3
  136. package/dist/locales/fr.json +7 -3
  137. package/dist/locales/hi.json +7 -3
  138. package/dist/locales/it.json +7 -3
  139. package/dist/locales/ja.json +7 -3
  140. package/dist/locales/nl.json +7 -3
  141. package/dist/locales/pl.json +7 -3
  142. package/dist/locales/pt.json +7 -3
  143. package/dist/locales/ro.json +7 -3
  144. package/dist/locales/ru.json +7 -3
  145. package/dist/locales/sq.json +7 -3
  146. package/dist/locales/sv.json +7 -3
  147. package/dist/locales/tr.json +7 -3
  148. package/dist/locales/zh.json +7 -3
  149. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  150. package/dist/patterns/patient-shell/index.js +1 -1
  151. package/dist/tokens.css +1 -1
  152. package/package.json +1 -1
  153. package/dist/_chunks/agenda-tray-DQayYmQ0.js +0 -165
  154. package/dist/_chunks/ai-tools-rail-CYLWrRmm.js +0 -280
  155. package/dist/_chunks/circle-arrow-up-CC_85SuH.js +0 -16
  156. package/dist/_chunks/dropdown-menu-CUEXqKis.js +0 -299
  157. package/dist/_chunks/insert-result-DNdi_JYW.js +0 -683
  158. package/dist/_chunks/task-tray-B8jFv5FV.js +0 -196
  159. package/dist/_chunks/use-theme-C2dHKUAN.js +0 -145
@@ -1,196 +0,0 @@
1
- import { jsx as a, jsxs as p } from "react/jsx-runtime";
2
- import { forwardRef as j, useRef as v, useMemo as q, useImperativeHandle as z } from "react";
3
- import { c as M } from "./index-D2ZczOXr.js";
4
- import { useTranslation as S } from "react-i18next";
5
- import { I as C } from "./icon-button-CKEOrN37.js";
6
- import { S as K } from "./skeleton-CZbwyJAA.js";
7
- import { E } from "./empty-state-BLy7tigq.js";
8
- import { T as L } from "./task-card-CPyQ5AXC.js";
9
- import { u as P } from "./registry-nPAVE19X.js";
10
- import { c as H } from "./createLucideIcon-CrFbzy84.js";
11
- import { P as V } from "./plus-CYKNmfuA.js";
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 B = [
19
- ["path", { d: "M13 5h8", key: "a7qcls" }],
20
- ["path", { d: "M13 12h8", key: "h98zly" }],
21
- ["path", { d: "M13 19h8", key: "c3s6r1" }],
22
- ["path", { d: "m3 17 2 2 4-4", key: "1jhpwq" }],
23
- ["rect", { x: "3", y: "4", width: "6", height: "6", rx: "1", key: "cif1o7" }]
24
- ], F = H("list-todo", B), G = {
25
- id: "task-tray",
26
- capabilities: ["select_single", "dismiss"],
27
- state: {
28
- items: {
29
- type: "Array<{ id: string; status: string }>",
30
- descriptionKey: "ui.agent.taskTray.state.items",
31
- description: "Currently-displayed tasks. Ids + status only — never task title / patient.",
32
- read: (e) => e.getItems()
33
- }
34
- },
35
- actions: {
36
- select_item: {
37
- safety: "read",
38
- argsType: "{ id: string }",
39
- descriptionKey: "ui.agent.taskTray.actions.selectItem",
40
- description: "Activate the task with the given id.",
41
- invoke: (e, s) => {
42
- e.selectItem(s.id);
43
- }
44
- },
45
- toggle_done: {
46
- safety: "write",
47
- argsType: "{ id: string }",
48
- descriptionKey: "ui.agent.taskTray.actions.toggleDone",
49
- description: "Request the host to toggle the done state of a task.",
50
- invoke: (e, s) => {
51
- e.toggleDone(s.id);
52
- }
53
- },
54
- dismiss: {
55
- safety: "destructive",
56
- argsType: "{ id: string }",
57
- descriptionKey: "ui.agent.taskTray.actions.dismiss",
58
- description: "Request the host to dismiss / remove the task with the given id.",
59
- invoke: (e, s) => {
60
- e.dismiss(s.id);
61
- }
62
- }
63
- },
64
- domHooks: {
65
- root: {
66
- attr: "data-component",
67
- value: "task-tray",
68
- description: "Marks the TaskTray wrapper."
69
- },
70
- instanceId: {
71
- attr: "data-component-id",
72
- sourceProp: "id",
73
- description: "Sourced from the id prop. Required to address a specific tray from the agent."
74
- },
75
- item: {
76
- attr: "data-task-id",
77
- description: "Stable task id emitted on each rendered TaskCard inside the tray."
78
- }
79
- }
80
- }, J = M(
81
- [
82
- "ds:flex ds:flex-col",
83
- "ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)]",
84
- "ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2",
85
- "ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]",
86
- "ds:overflow-hidden"
87
- ].join(" "),
88
- {
89
- variants: {
90
- size: {
91
- sm: "",
92
- md: ""
93
- }
94
- },
95
- defaultVariants: {
96
- size: "sm"
97
- }
98
- }
99
- ), Q = j(
100
- ({
101
- id: e,
102
- items: s,
103
- title: k,
104
- size: f = "sm",
105
- onOpenTask: i,
106
- onToggleDone: n,
107
- onDismissTask: c,
108
- onAddTask: y,
109
- addLabel: x,
110
- loading: h = !1,
111
- emptyTitle: b,
112
- emptyDescription: w,
113
- className: I,
114
- ...N
115
- }, T) => {
116
- const { t: l } = S(), u = k ?? l("taskTray.title", "Tasks"), R = x ?? l("taskTray.add", "Add task"), A = !h && s.length === 0;
117
- let m;
118
- h ? m = /* @__PURE__ */ a("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]", children: [0, 1, 2].map((t) => /* @__PURE__ */ a(K, { variant: "rectangular", height: "2.5rem" }, t)) }) : A ? m = /* @__PURE__ */ a("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ a(
119
- E,
120
- {
121
- variant: "first-use",
122
- size: "sm",
123
- title: b ?? l("taskTray.empty.title", "No tasks yet"),
124
- description: w ?? l("taskTray.empty.description", "New tasks will appear here.")
125
- }
126
- ) }) : m = /* @__PURE__ */ a("ul", { className: "ds:flex ds:list-none ds:flex-col", children: s.map((t) => /* @__PURE__ */ a(
127
- L,
128
- {
129
- item: t,
130
- size: f,
131
- onActivate: i,
132
- "data-task-id": t.id
133
- },
134
- t.id
135
- )) });
136
- const d = v(s);
137
- d.current = s;
138
- const _ = q(
139
- () => ({
140
- getItems: () => d.current.map((t) => ({
141
- id: t.id,
142
- status: t.status ?? "open"
143
- })),
144
- selectItem: (t) => {
145
- const r = d.current.find((o) => o.id === t);
146
- r && (i == null || i(r));
147
- },
148
- toggleDone: (t) => {
149
- const r = d.current.find((o) => o.id === t);
150
- r && (n == null || n(r));
151
- },
152
- dismiss: (t) => {
153
- const r = d.current.find((o) => o.id === t);
154
- r && (c == null || c(r));
155
- }
156
- }),
157
- [i, n, c]
158
- ), g = v(null);
159
- return z(T, () => g.current, []), P(G, _, e), /* @__PURE__ */ p(
160
- "section",
161
- {
162
- ref: g,
163
- "aria-label": u,
164
- "data-component": "task-tray",
165
- "data-component-id": e,
166
- className: J({ size: f, className: I }),
167
- ...N,
168
- children: [
169
- /* @__PURE__ */ p("header", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]", children: [
170
- /* @__PURE__ */ p("h3", { className: "ds:m-0 ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-title-card", children: [
171
- /* @__PURE__ */ a(F, { "aria-hidden": "true", className: "ds:size-4" }),
172
- u
173
- ] }),
174
- y ? /* @__PURE__ */ a(
175
- C,
176
- {
177
- icon: /* @__PURE__ */ a(V, {}),
178
- intent: "outline",
179
- size: "sm",
180
- "aria-label": R,
181
- onClick: y
182
- }
183
- ) : null
184
- ] }),
185
- m
186
- ]
187
- }
188
- );
189
- }
190
- );
191
- Q.displayName = "TaskTray";
192
- export {
193
- Q as T,
194
- G as t
195
- };
196
- //# sourceMappingURL=task-tray-B8jFv5FV.js.map
@@ -1,145 +0,0 @@
1
- import { useSyncExternalStore as D, useEffect as b, useCallback as p } from "react";
2
- const y = "alfadocs-ui.theme", w = "alfadocs-ui.accessibility", r = {
3
- light: "theme-light",
4
- dark: "theme-dark",
5
- accessible: "theme-accessible"
6
- }, M = "(prefers-color-scheme: dark)", C = "(prefers-contrast: more)";
7
- function g(e) {
8
- if (typeof window > "u") return null;
9
- try {
10
- return window.localStorage.getItem(e);
11
- } catch {
12
- return null;
13
- }
14
- }
15
- function S(e, t) {
16
- if (!(typeof window > "u"))
17
- try {
18
- t === null ? window.localStorage.removeItem(e) : window.localStorage.setItem(e, t);
19
- } catch {
20
- }
21
- }
22
- function L(e) {
23
- return e === "light" || e === "dark" || e === "system";
24
- }
25
- function T(e) {
26
- return e === "default" || e === "accessible" || e === "system";
27
- }
28
- function O() {
29
- const e = g(y), t = g(w), i = typeof window < "u" && typeof window.matchMedia == "function", s = typeof document < "u" ? document.documentElement.classList : null, A = s ? s.contains(r.dark) ? "dark" : s.contains(r.light) ? "light" : null : null, _ = s != null && s.contains(r.accessible) ? "accessible" : null;
30
- return {
31
- theme: L(e) ? e : A ?? "system",
32
- accessibility: T(t) ? t : _ ?? "system",
33
- prefersDark: i ? window.matchMedia(M).matches : !1,
34
- prefersMoreContrast: i ? window.matchMedia(C).matches : !1
35
- };
36
- }
37
- let n = O();
38
- const h = /* @__PURE__ */ new Set();
39
- function c(e) {
40
- e.theme === n.theme && e.accessibility === n.accessibility && e.prefersDark === n.prefersDark && e.prefersMoreContrast === n.prefersMoreContrast || (n = e, h.forEach((t) => t()));
41
- }
42
- function I(e) {
43
- return h.add(e), () => {
44
- h.delete(e);
45
- };
46
- }
47
- function R() {
48
- return n;
49
- }
50
- function V() {
51
- return {
52
- theme: "system",
53
- accessibility: "system",
54
- prefersDark: !1,
55
- prefersMoreContrast: !1
56
- };
57
- }
58
- let d = 0, u = null, f = null, l = null;
59
- function v(e) {
60
- c({ ...n, prefersDark: e.matches });
61
- }
62
- function H(e) {
63
- c({ ...n, prefersMoreContrast: e.matches });
64
- }
65
- function Y(e) {
66
- if (e.key === y) {
67
- const t = L(e.newValue) ? e.newValue : "system";
68
- c({ ...n, theme: t });
69
- } else if (e.key === w) {
70
- const t = T(e.newValue) ? e.newValue : "system";
71
- c({ ...n, accessibility: t });
72
- }
73
- }
74
- function E(e, t) {
75
- return typeof e.addEventListener == "function" ? (e.addEventListener("change", t), () => e.removeEventListener("change", t)) : (e.addListener(t), () => e.removeListener(t));
76
- }
77
- function G() {
78
- return d += 1, d > 1 || typeof window > "u" || (typeof window.matchMedia == "function" && (u = window.matchMedia(M), f = window.matchMedia(C), c({
79
- ...n,
80
- prefersDark: u.matches,
81
- prefersMoreContrast: f.matches
82
- }), o = E(u, v), a = E(f, H)), l = Y, window.addEventListener("storage", l)), m;
83
- }
84
- let o = null, a = null;
85
- function m() {
86
- d -= 1, !(d > 0) && (o == null || o(), a == null || a(), o = null, a = null, u = null, f = null, l && typeof window < "u" && window.removeEventListener("storage", l), l = null);
87
- }
88
- function k(e) {
89
- const t = e.theme === "system" ? e.prefersDark ? "dark" : "light" : e.theme, i = e.accessibility === "system" ? e.prefersMoreContrast : e.accessibility === "accessible";
90
- return t === "dark" && i ? "dark-accessible" : t === "dark" ? "dark" : i ? "light-accessible" : "light";
91
- }
92
- function K(e) {
93
- switch (e) {
94
- case "light":
95
- return [r.light];
96
- case "dark":
97
- return [r.dark];
98
- case "light-accessible":
99
- return [r.light, r.accessible];
100
- case "dark-accessible":
101
- return [r.dark, r.accessible];
102
- }
103
- }
104
- const Q = [
105
- r.light,
106
- r.dark,
107
- r.accessible
108
- ];
109
- function U(e) {
110
- if (typeof document > "u") return;
111
- const t = document.documentElement, i = new Set(K(e));
112
- Q.forEach((s) => {
113
- i.has(s) ? t.classList.add(s) : t.classList.remove(s);
114
- });
115
- }
116
- function N() {
117
- const e = D(I, R, V);
118
- b(() => G(), []), b(() => {
119
- U(k(e));
120
- }, [e]);
121
- const t = p((s) => {
122
- S(y, s === "system" ? null : s), c({ ...n, theme: s });
123
- }, []), i = p((s) => {
124
- S(
125
- w,
126
- s === "system" ? null : s
127
- ), c({ ...n, accessibility: s });
128
- }, []);
129
- return {
130
- theme: e.theme,
131
- accessibility: e.accessibility,
132
- resolvedTheme: k(e),
133
- setTheme: t,
134
- setAccessibility: i
135
- };
136
- }
137
- export {
138
- w as A,
139
- r as T,
140
- y as a,
141
- k as r,
142
- K as t,
143
- N as u
144
- };
145
- //# sourceMappingURL=use-theme-C2dHKUAN.js.map