discord-mana-ui 0.2.0 → 0.3.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 (197) hide show
  1. package/README.md +30 -0
  2. package/dist/blocks.js +2 -2
  3. package/dist/cdn/mana-elements.min.js +1 -1
  4. package/dist/cdn/mana-elements.min.js.map +1 -1
  5. package/dist/chunks/{index-CHySFM5G.js → index-Ddlxo4pD.js} +7 -4
  6. package/dist/chunks/{index-CHySFM5G.js.map → index-Ddlxo4pD.js.map} +1 -1
  7. package/dist/chunks/{index-DXemhxg8.js → index-NOEHpd5T.js} +2 -2
  8. package/dist/chunks/{index-DXemhxg8.js.map → index-NOEHpd5T.js.map} +1 -1
  9. package/dist/chunks/{overlays-DPkXgsLR.js → overlays-Bd04Wxig.js} +2 -2
  10. package/dist/chunks/{overlays-DPkXgsLR.js.map → overlays-Bd04Wxig.js.map} +1 -1
  11. package/dist/core.js +1 -1
  12. package/dist/elements-svelte.d.ts +7 -0
  13. package/dist/elements.js +2 -2
  14. package/dist/index.js +2 -2
  15. package/dist/react.js +2 -2
  16. package/dist/svelte/HeadingLevelProvider.svelte +20 -0
  17. package/dist/svelte/HeadingLevelProvider.svelte.d.ts +8 -0
  18. package/dist/svelte/HiddenVisually.svelte +27 -0
  19. package/dist/svelte/HiddenVisually.svelte.d.ts +10 -0
  20. package/dist/svelte/ManaProvider.svelte +77 -0
  21. package/dist/svelte/ManaProvider.svelte.d.ts +18 -0
  22. package/dist/svelte/ThemeProvider.svelte +47 -0
  23. package/dist/svelte/ThemeProvider.svelte.d.ts +13 -0
  24. package/dist/svelte/actions.d.ts +15 -0
  25. package/dist/svelte/actions.js +108 -0
  26. package/dist/svelte/blocks/AppShell.svelte +100 -0
  27. package/dist/svelte/blocks/AppShell.svelte.d.ts +22 -0
  28. package/dist/svelte/blocks/AppSidebar.svelte +117 -0
  29. package/dist/svelte/blocks/AppSidebar.svelte.d.ts +25 -0
  30. package/dist/svelte/blocks/AppStatusBar.svelte +23 -0
  31. package/dist/svelte/blocks/AppStatusBar.svelte.d.ts +10 -0
  32. package/dist/svelte/blocks/AppTag.svelte +23 -0
  33. package/dist/svelte/blocks/AppTag.svelte.d.ts +8 -0
  34. package/dist/svelte/blocks/AppTopBar.svelte +48 -0
  35. package/dist/svelte/blocks/AppTopBar.svelte.d.ts +13 -0
  36. package/dist/svelte/blocks/ChannelSidebar.svelte +97 -0
  37. package/dist/svelte/blocks/ChannelSidebar.svelte.d.ts +24 -0
  38. package/dist/svelte/blocks/Embed.svelte +111 -0
  39. package/dist/svelte/blocks/Embed.svelte.d.ts +24 -0
  40. package/dist/svelte/blocks/GuildRail.svelte +135 -0
  41. package/dist/svelte/blocks/GuildRail.svelte.d.ts +30 -0
  42. package/dist/svelte/blocks/HeaderBar.svelte +75 -0
  43. package/dist/svelte/blocks/HeaderBar.svelte.d.ts +23 -0
  44. package/dist/svelte/blocks/MemberList.svelte +88 -0
  45. package/dist/svelte/blocks/MemberList.svelte.d.ts +24 -0
  46. package/dist/svelte/blocks/MessageComposer.svelte +79 -0
  47. package/dist/svelte/blocks/MessageComposer.svelte.d.ts +14 -0
  48. package/dist/svelte/blocks/MessageDivider.svelte +41 -0
  49. package/dist/svelte/blocks/MessageDivider.svelte.d.ts +9 -0
  50. package/dist/svelte/blocks/MessageItem.svelte +198 -0
  51. package/dist/svelte/blocks/MessageItem.svelte.d.ts +34 -0
  52. package/dist/svelte/blocks/MessageList.svelte +22 -0
  53. package/dist/svelte/blocks/MessageList.svelte.d.ts +8 -0
  54. package/dist/svelte/blocks/ServerTag.svelte +46 -0
  55. package/dist/svelte/blocks/ServerTag.svelte.d.ts +9 -0
  56. package/dist/svelte/blocks/SettingsModal.svelte +180 -0
  57. package/dist/svelte/blocks/SettingsModal.svelte.d.ts +29 -0
  58. package/dist/svelte/blocks/UserDock.svelte +92 -0
  59. package/dist/svelte/blocks/UserDock.svelte.d.ts +16 -0
  60. package/dist/svelte/blocks/helpers.d.ts +3 -0
  61. package/dist/svelte/blocks/helpers.js +20 -0
  62. package/dist/svelte/blocks/index.d.ts +17 -0
  63. package/dist/svelte/blocks/index.js +17 -0
  64. package/dist/svelte/buttons/Button.svelte +116 -0
  65. package/dist/svelte/buttons/Button.svelte.d.ts +19 -0
  66. package/dist/svelte/buttons/ButtonGroup.svelte +48 -0
  67. package/dist/svelte/buttons/ButtonGroup.svelte.d.ts +15 -0
  68. package/dist/svelte/buttons/CloseButton.svelte +33 -0
  69. package/dist/svelte/buttons/CloseButton.svelte.d.ts +7 -0
  70. package/dist/svelte/buttons/IconButton.svelte +38 -0
  71. package/dist/svelte/buttons/IconButton.svelte.d.ts +12 -0
  72. package/dist/svelte/buttons/TextButton.svelte +34 -0
  73. package/dist/svelte/buttons/TextButton.svelte.d.ts +12 -0
  74. package/dist/svelte/buttons/ToggleButton.svelte +50 -0
  75. package/dist/svelte/buttons/ToggleButton.svelte.d.ts +12 -0
  76. package/dist/svelte/buttons/ToggleIconButton.svelte +50 -0
  77. package/dist/svelte/buttons/ToggleIconButton.svelte.d.ts +14 -0
  78. package/dist/svelte/buttons/Toolbar.svelte +36 -0
  79. package/dist/svelte/buttons/Toolbar.svelte.d.ts +8 -0
  80. package/dist/svelte/buttons/ToolbarGroup.svelte +15 -0
  81. package/dist/svelte/buttons/ToolbarGroup.svelte.d.ts +8 -0
  82. package/dist/svelte/buttons/ToolbarSeparator.svelte +14 -0
  83. package/dist/svelte/buttons/ToolbarSeparator.svelte.d.ts +4 -0
  84. package/dist/svelte/context.d.ts +27 -0
  85. package/dist/svelte/context.js +49 -0
  86. package/dist/svelte/extras/Anchor.svelte +39 -0
  87. package/dist/svelte/extras/Anchor.svelte.d.ts +10 -0
  88. package/dist/svelte/extras/Card.svelte +39 -0
  89. package/dist/svelte/extras/Card.svelte.d.ts +12 -0
  90. package/dist/svelte/extras/Divider.svelte +8 -0
  91. package/dist/svelte/extras/Divider.svelte.d.ts +4 -0
  92. package/dist/svelte/extras/Menu.svelte +123 -0
  93. package/dist/svelte/extras/Menu.svelte.d.ts +25 -0
  94. package/dist/svelte/extras/NumberBadge.svelte +41 -0
  95. package/dist/svelte/extras/NumberBadge.svelte.d.ts +10 -0
  96. package/dist/svelte/extras/ProgressCircle.svelte +67 -0
  97. package/dist/svelte/extras/ProgressCircle.svelte.d.ts +12 -0
  98. package/dist/svelte/extras/Scroller.svelte +31 -0
  99. package/dist/svelte/extras/Scroller.svelte.d.ts +11 -0
  100. package/dist/svelte/extras/Spinner.svelte +74 -0
  101. package/dist/svelte/extras/Spinner.svelte.d.ts +17 -0
  102. package/dist/svelte/extras/Table.svelte +100 -0
  103. package/dist/svelte/extras/Table.svelte.d.ts +38 -0
  104. package/dist/svelte/icons/ManaIcon.svelte +50 -0
  105. package/dist/svelte/icons/ManaIcon.svelte.d.ts +10 -0
  106. package/dist/svelte/icons/generated.d.ts +670 -0
  107. package/dist/svelte/icons/generated.js +669 -0
  108. package/dist/svelte/icons/index.d.ts +3 -0
  109. package/dist/svelte/icons/index.js +3 -0
  110. package/dist/svelte/icons/makeIcon.d.ts +10 -0
  111. package/dist/svelte/icons/makeIcon.js +36 -0
  112. package/dist/svelte/index.d.ts +68 -0
  113. package/dist/svelte/index.js +67 -0
  114. package/dist/svelte/inputs/Checkbox.svelte +76 -0
  115. package/dist/svelte/inputs/Checkbox.svelte.d.ts +12 -0
  116. package/dist/svelte/inputs/CheckboxGroup.svelte +48 -0
  117. package/dist/svelte/inputs/CheckboxGroup.svelte.d.ts +16 -0
  118. package/dist/svelte/inputs/NumberInput.svelte +73 -0
  119. package/dist/svelte/inputs/NumberInput.svelte.d.ts +12 -0
  120. package/dist/svelte/inputs/RadioGroup.svelte +74 -0
  121. package/dist/svelte/inputs/RadioGroup.svelte.d.ts +36 -0
  122. package/dist/svelte/inputs/SearchBar.svelte +66 -0
  123. package/dist/svelte/inputs/SearchBar.svelte.d.ts +10 -0
  124. package/dist/svelte/inputs/Slider.svelte +127 -0
  125. package/dist/svelte/inputs/Slider.svelte.d.ts +15 -0
  126. package/dist/svelte/inputs/Switch.svelte +73 -0
  127. package/dist/svelte/inputs/Switch.svelte.d.ts +11 -0
  128. package/dist/svelte/inputs/TextArea.svelte +50 -0
  129. package/dist/svelte/inputs/TextArea.svelte.d.ts +10 -0
  130. package/dist/svelte/inputs/TextInput.svelte +89 -0
  131. package/dist/svelte/inputs/TextInput.svelte.d.ts +16 -0
  132. package/dist/svelte/overlays/ConfirmModal.svelte +58 -0
  133. package/dist/svelte/overlays/ConfirmModal.svelte.d.ts +15 -0
  134. package/dist/svelte/overlays/Countdown.svelte +68 -0
  135. package/dist/svelte/overlays/Countdown.svelte.d.ts +10 -0
  136. package/dist/svelte/overlays/GlobalBanner.svelte +50 -0
  137. package/dist/svelte/overlays/GlobalBanner.svelte.d.ts +12 -0
  138. package/dist/svelte/overlays/InlineNotice.svelte +66 -0
  139. package/dist/svelte/overlays/InlineNotice.svelte.d.ts +13 -0
  140. package/dist/svelte/overlays/LayerModal.svelte +68 -0
  141. package/dist/svelte/overlays/LayerModal.svelte.d.ts +12 -0
  142. package/dist/svelte/overlays/Modal.svelte +118 -0
  143. package/dist/svelte/overlays/Modal.svelte.d.ts +17 -0
  144. package/dist/svelte/overlays/Popover.svelte +100 -0
  145. package/dist/svelte/overlays/Popover.svelte.d.ts +20 -0
  146. package/dist/svelte/overlays/ProgressBar.svelte +32 -0
  147. package/dist/svelte/overlays/ProgressBar.svelte.d.ts +9 -0
  148. package/dist/svelte/overlays/Toast.svelte +34 -0
  149. package/dist/svelte/overlays/Toast.svelte.d.ts +9 -0
  150. package/dist/svelte/overlays/ToastContainer.svelte +31 -0
  151. package/dist/svelte/overlays/ToastContainer.svelte.d.ts +8 -0
  152. package/dist/svelte/overlays/Tooltip.svelte +51 -0
  153. package/dist/svelte/overlays/Tooltip.svelte.d.ts +12 -0
  154. package/dist/svelte/primitives/Badge.svelte +39 -0
  155. package/dist/svelte/primitives/Badge.svelte.d.ts +11 -0
  156. package/dist/svelte/primitives/Chip.svelte +28 -0
  157. package/dist/svelte/primitives/Chip.svelte.d.ts +10 -0
  158. package/dist/svelte/primitives/Clickable.svelte +45 -0
  159. package/dist/svelte/primitives/Clickable.svelte.d.ts +10 -0
  160. package/dist/svelte/primitives/Field.svelte +70 -0
  161. package/dist/svelte/primitives/Field.svelte.d.ts +16 -0
  162. package/dist/svelte/primitives/FieldSet.svelte +41 -0
  163. package/dist/svelte/primitives/FieldSet.svelte.d.ts +11 -0
  164. package/dist/svelte/primitives/Gradient.svelte +37 -0
  165. package/dist/svelte/primitives/Gradient.svelte.d.ts +10 -0
  166. package/dist/svelte/primitives/Graphic.svelte +30 -0
  167. package/dist/svelte/primitives/Graphic.svelte.d.ts +10 -0
  168. package/dist/svelte/primitives/Heading.svelte +51 -0
  169. package/dist/svelte/primitives/Heading.svelte.d.ts +12 -0
  170. package/dist/svelte/primitives/IndicatorDot.svelte +33 -0
  171. package/dist/svelte/primitives/IndicatorDot.svelte.d.ts +9 -0
  172. package/dist/svelte/primitives/Stack.svelte +50 -0
  173. package/dist/svelte/primitives/Stack.svelte.d.ts +16 -0
  174. package/dist/svelte/primitives/Text.svelte +68 -0
  175. package/dist/svelte/primitives/Text.svelte.d.ts +16 -0
  176. package/dist/svelte/selection/Calendar.svelte +97 -0
  177. package/dist/svelte/selection/Calendar.svelte.d.ts +12 -0
  178. package/dist/svelte/selection/ComboBox.svelte +112 -0
  179. package/dist/svelte/selection/ComboBox.svelte.d.ts +13 -0
  180. package/dist/svelte/selection/DatePicker.svelte +98 -0
  181. package/dist/svelte/selection/DatePicker.svelte.d.ts +12 -0
  182. package/dist/svelte/selection/ListBox.svelte +92 -0
  183. package/dist/svelte/selection/ListBox.svelte.d.ts +18 -0
  184. package/dist/svelte/selection/RangeCalendar.svelte +113 -0
  185. package/dist/svelte/selection/RangeCalendar.svelte.d.ts +15 -0
  186. package/dist/svelte/selection/Select.svelte +131 -0
  187. package/dist/svelte/selection/Select.svelte.d.ts +15 -0
  188. package/dist/svelte/selection/Tabs.svelte +92 -0
  189. package/dist/svelte/selection/Tabs.svelte.d.ts +18 -0
  190. package/dist/svelte/selection/Tag.svelte +75 -0
  191. package/dist/svelte/selection/Tag.svelte.d.ts +14 -0
  192. package/dist/svelte/selection/TagGroup.svelte +54 -0
  193. package/dist/svelte/selection/TagGroup.svelte.d.ts +19 -0
  194. package/dist/svelte/toast.svelte.d.ts +6 -0
  195. package/dist/svelte/toast.svelte.js +20 -0
  196. package/dist/types/core/index.d.ts +2 -1
  197. package/package.json +26 -2
package/dist/core.js CHANGED
@@ -1,4 +1,4 @@
1
- import { T, W, a, c, b, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z } from "./chunks/index-CHySFM5G.js";
1
+ import { T, W, a, c, b, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z } from "./chunks/index-Ddlxo4pD.js";
2
2
  import { A, D } from "./chunks/announcer-B894Rnt9.js";
3
3
  import { M, c as c2, a as a2, g as g2, o as o2, s as s2 } from "./chunks/modalManager-DVcUUK5h.js";
4
4
  import { autoUpdate } from "@floating-ui/dom";
@@ -0,0 +1,7 @@
1
+ import type { ManaIntrinsicElements } from "./elements-jsx.js";
2
+
3
+ declare module "svelte/elements" {
4
+ interface SvelteHTMLElements extends ManaIntrinsicElements {}
5
+ }
6
+
7
+ export {};
package/dist/elements.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { M, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao } from "./chunks/index-DXemhxg8.js";
2
+ import { M, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao } from "./chunks/index-NOEHpd5T.js";
3
3
  import { applyThemeAttributes, resolveColorCss, variantToSlug } from "./tokens.js";
4
- import { c as c2, e as e2, h as h2, v as v2, w as w2, x as x2 } from "./chunks/index-CHySFM5G.js";
4
+ import { c as c2, e as e2, h as h2, v as v2, w as w2, x as x2 } from "./chunks/index-Ddlxo4pD.js";
5
5
  export {
6
6
  M as MANA_ELEMENTS,
7
7
  a as ManaAnchorElement,
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { DENSITIES, MOTION, RADII, THEMES, TYPOGRAPHY_VARIANTS, applyThemeAttributes, getThemeClasses, resolveColorCss, variantToSlug } from "./tokens.js";
3
- import { T, W, a, c, b, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z } from "./chunks/index-CHySFM5G.js";
4
- import { M, a as a2, b as b2, c as c2, d as d2, e as e2, f as f2, g as g2, h as h2, i as i2, j as j2, k as k2, l as l2, m as m2, n as n2, o as o2, p as p2, q as q2, r as r2, s as s2, t as t2, u as u2, v as v2, w as w2, x as x2, y as y2, z as z2, A, B, C, D, E, F, G, H, I, J, K, L, N, O, P, Q, R, S, T as T2, U, V, W as W2, X, Y, Z, _, $, a0, a1, a2 as a22, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao } from "./chunks/index-DXemhxg8.js";
3
+ import { T, W, a, c, b, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z } from "./chunks/index-Ddlxo4pD.js";
4
+ import { M, a as a2, b as b2, c as c2, d as d2, e as e2, f as f2, g as g2, h as h2, i as i2, j as j2, k as k2, l as l2, m as m2, n as n2, o as o2, p as p2, q as q2, r as r2, s as s2, t as t2, u as u2, v as v2, w as w2, x as x2, y as y2, z as z2, A, B, C, D, E, F, G, H, I, J, K, L, N, O, P, Q, R, S, T as T2, U, V, W as W2, X, Y, Z, _, $, a0, a1, a2 as a22, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao } from "./chunks/index-NOEHpd5T.js";
5
5
  import { A as A2, D as D2 } from "./chunks/announcer-B894Rnt9.js";
6
6
  import { M as M2, c as c3, a as a10, g as g3, o as o3, s as s3 } from "./chunks/modalManager-DVcUUK5h.js";
7
7
  import { autoUpdate } from "@floating-ui/dom";
package/dist/react.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { A, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, a_, a$, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI, bJ, bK, bL, bM, bN, bO, bP, bQ, bR, bS, bT, bU, bV, bW, bX, bY, bZ, b_, b$, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, cd, ce, cf, cg, ch, ci, cj, ck, cl, cm, cn, co, cp, cq, cr, cs, ct, cu, cv, cw, cx, cy, cz, cA, cB, cC, cD, cE, cF, cG, cH, cI, cJ, cK, cL, cM, cN, cO, cP, cQ, cR, cS, cT, cU, cV, cW, cX, cY, cZ, c_, c$, d0, d1, d2, d3, d4, d5, d6, d7, d8, d9, da, db, dc, dd, de, df, dg, dh, di, dj, dk, dl, dm, dn, dp, dq, dr, ds, dt, du, dv, dw, dx, dy, dz, dA, dB, dC, dD, dE, dF, dG, dH, dI, dJ, dK, dL, dM, dN, dO, dP, dQ, dR, dS, dT, dU, dV, dW, dX, dY, dZ, d_, d$, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, ea, eb, ec, ed, ee, ef, eg, eh, ei, ej, ek, el, em, en, eo, ep, eq, er, es, et, eu, ev, ew, ex, ey, ez, eA, eB, eC, eD, eE, eF, eG, eH, eI, eJ, eK, eL, eM, eN, eO, eP, eQ, eR, eS, eT, eU, eV, eW, eX, eY, eZ, e_, e$, f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, fa, fb, fc, fd, fe, ff, fg, fh, fi, fj, fk, fl, fm, fn, fo, fp, fq, fr, fs, ft, fu, fv, fw, fx, fy, fz, fA, fB, fC, fD, fE, fF, fG, fH, fI, fJ, fK, fL, fM, fN, fO, fP, fQ, fR, fS, fT, fU, fV, fW, fX, fY, fZ, f_, f$, g0, g1, g2, g3, g4, g5, g6, g7, g8, g9, ga, gb, gc, gd, ge, gf, gg, gh, gi, gj, gk, gl, gm, gn, go, gp, gq, gr, gs, gt, gu, gv, gw, gx, gy, gz, gA, gB, gC, gD, gE, gF, gG, gH, gI, gJ, gK, gL, gM, gN, gO, gP, gQ, gR, gS, gT, gU, gV, gW, gX, gY, gZ, g_, g$, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9, ha, hb, hc, hd, he, hf, hg, hh, hi, hj, hk, hl, hm, hn, ho, hp, hq, hr, hs, ht, hu, hv, hw, hx, hy, hz, hA, hB, hC, hD, hE, hF, hG, hH, hI, hJ, hK, hL, hM, hN, hO, hP, hQ, hR, hS, hT, hU, hV, hW, hX, hY, hZ, h_, h$, i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, ia, ib, ic, id, ie, ig, ih, ii, ij, ik, il, im, io, ip, iq, ir, is, it, iu, iv, iw, ix, iy, iz, iA, iB, iC, iD, iE, iF, iG, iH, iI, iJ, iK, iL, iM, iN, iO, iP, iQ, iR, iS, iT, iU, iV, iW, iX, iY, iZ, i_, i$, j0, j1, j2, j3, j4, j5, j6, j7, j8, j9, ja, jb, jc, jd, je, jf, jg, jh, ji, jj, jk, jl, jm, jn, jo, jp, jq, jr, js, jt, ju, jv, jw, jx, jy, jz, jA, jB, jC, jD, jE, jF, jG, jH, jI, jJ, jK } from "./chunks/icons.all-B0AtE0um.js";
3
- import { A as A2, a as a10, B as B2, b as b10, c as c10, d as d10, e as e10, f as f10, g as g10, C as C2, h as h10, i as i10, j as j10, k as k2, l as l2, m as m2, n as n2, o as o2, p as p2, q as q2, r as r2, s as s2, D as D2, t as t2, u as u2, v as v2, w as w2, E as E2, x as x2, F as F2, y as y2, z as z2, G as G2, H as H2, I as I2, J as J2, K as K2, L as L2, M as M2, N as N2, O as O2, P as P2, Q as Q2, R as R2, S as S2, T as T2, U as U2, V as V2, W as W2, X as X2, Y as Y2, Z as Z2, _ as _2, $ as $2, a0 as a02, a1 as a12, a2 as a22, a3 as a32, a4 as a42, a5 as a52, a6 as a62, a7 as a72, a8 as a82, a9 as a92, aa as aa2, ab as ab2, ac as ac2, ad as ad2, ae as ae2, af as af2, ag as ag2, ah as ah2, ai as ai2, aj as aj2, ak as ak2, al as al2, am as am2, an as an2, ao as ao2, ap as ap2, aq as aq2, ar as ar2, as as as2, at as at2, au as au2, av as av2, aw as aw2, ax as ax2, ay as ay2, az as az2, aA as aA2, aB as aB2, aC as aC2, aD as aD2, aE as aE2, aF as aF2, aG as aG2, aH as aH2, aI as aI2, aJ as aJ2, aK as aK2, aL as aL2, aM as aM2, aN as aN2, aO as aO2, aP as aP2, aQ as aQ2, aR as aR2, aS as aS2, aT as aT2, aU as aU2, aV as aV2, aW as aW2, aX as aX2, aY as aY2, aZ as aZ2, a_ as a_2 } from "./chunks/overlays-DPkXgsLR.js";
4
- import { c as c11, e as e11, h as h11, v as v3, w as w3 } from "./chunks/index-CHySFM5G.js";
3
+ import { A as A2, a as a10, B as B2, b as b10, c as c10, d as d10, e as e10, f as f10, g as g10, C as C2, h as h10, i as i10, j as j10, k as k2, l as l2, m as m2, n as n2, o as o2, p as p2, q as q2, r as r2, s as s2, D as D2, t as t2, u as u2, v as v2, w as w2, E as E2, x as x2, F as F2, y as y2, z as z2, G as G2, H as H2, I as I2, J as J2, K as K2, L as L2, M as M2, N as N2, O as O2, P as P2, Q as Q2, R as R2, S as S2, T as T2, U as U2, V as V2, W as W2, X as X2, Y as Y2, Z as Z2, _ as _2, $ as $2, a0 as a02, a1 as a12, a2 as a22, a3 as a32, a4 as a42, a5 as a52, a6 as a62, a7 as a72, a8 as a82, a9 as a92, aa as aa2, ab as ab2, ac as ac2, ad as ad2, ae as ae2, af as af2, ag as ag2, ah as ah2, ai as ai2, aj as aj2, ak as ak2, al as al2, am as am2, an as an2, ao as ao2, ap as ap2, aq as aq2, ar as ar2, as as as2, at as at2, au as au2, av as av2, aw as aw2, ax as ax2, ay as ay2, az as az2, aA as aA2, aB as aB2, aC as aC2, aD as aD2, aE as aE2, aF as aF2, aG as aG2, aH as aH2, aI as aI2, aJ as aJ2, aK as aK2, aL as aL2, aM as aM2, aN as aN2, aO as aO2, aP as aP2, aQ as aQ2, aR as aR2, aS as aS2, aT as aT2, aU as aU2, aV as aV2, aW as aW2, aX as aX2, aY as aY2, aZ as aZ2, a_ as a_2 } from "./chunks/overlays-Bd04Wxig.js";
4
+ import { c as c11, e as e11, h as h11, v as v3, w as w3 } from "./chunks/index-Ddlxo4pD.js";
5
5
  import { c as c12, a as a11, o as o3 } from "./chunks/modalManager-DVcUUK5h.js";
6
6
  export {
7
7
  A as AIcon,
@@ -0,0 +1,20 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from "svelte";
3
+ import { getHeadingLevel, setHeadingLevelContext } from "./context.js";
4
+
5
+ interface Props {
6
+ forceLevel?: number;
7
+ children?: Snippet;
8
+ }
9
+
10
+ let { forceLevel, children }: Props = $props();
11
+
12
+ const parentLevel = getHeadingLevel();
13
+ let level = $derived(forceLevel ?? Math.min(6, parentLevel + 1));
14
+
15
+ setHeadingLevelContext({
16
+ getLevel: () => level,
17
+ });
18
+ </script>
19
+
20
+ {@render children?.()}
@@ -0,0 +1,8 @@
1
+ import type { Snippet } from "svelte";
2
+ interface Props {
3
+ forceLevel?: number;
4
+ children?: Snippet;
5
+ }
6
+ declare const HeadingLevelProvider: import("svelte").Component<Props, {}, "">;
7
+ type HeadingLevelProvider = ReturnType<typeof HeadingLevelProvider>;
8
+ export default HeadingLevelProvider;
@@ -0,0 +1,27 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from "svelte";
3
+ import type { HTMLAttributes } from "svelte/elements";
4
+ import { cx } from "../core.js";
5
+
6
+ interface Props extends HTMLAttributes<HTMLElement> {
7
+ tag?: string;
8
+ showOnFocus?: boolean;
9
+ children?: Snippet;
10
+ }
11
+
12
+ let {
13
+ tag = "span",
14
+ showOnFocus = false,
15
+ class: className = "",
16
+ children,
17
+ ...rest
18
+ }: Props = $props();
19
+ </script>
20
+
21
+ <svelte:element
22
+ this={tag}
23
+ class={cx(showOnFocus ? "mana-hidden-visually--show-on-focus" : "mana-hidden-visually", className)}
24
+ {...rest}
25
+ >
26
+ {@render children?.()}
27
+ </svelte:element>
@@ -0,0 +1,10 @@
1
+ import type { Snippet } from "svelte";
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ interface Props extends HTMLAttributes<HTMLElement> {
4
+ tag?: string;
5
+ showOnFocus?: boolean;
6
+ children?: Snippet;
7
+ }
8
+ declare const HiddenVisually: import("svelte").Component<Props, {}, "">;
9
+ type HiddenVisually = ReturnType<typeof HiddenVisually>;
10
+ export default HiddenVisually;
@@ -0,0 +1,77 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from "svelte";
3
+ import { cx, DEFAULT_MANA_I18N, type ManaI18nStrings } from "../core.js";
4
+ import { applyThemeAttributes, type ManaDensity, type ManaTheme } from "../tokens.js";
5
+ import { setManaContext } from "./context.js";
6
+
7
+ interface Props {
8
+ theme?: ManaTheme;
9
+ density?: ManaDensity;
10
+ highContrast?: boolean;
11
+ reducedMotion?: boolean;
12
+ locale?: string;
13
+ saturation?: number;
14
+ i18n?: Partial<ManaI18nStrings>;
15
+ applyToDocument?: boolean;
16
+ class?: string;
17
+ children?: Snippet;
18
+ }
19
+
20
+ let {
21
+ theme = "dark",
22
+ density = "default",
23
+ highContrast = false,
24
+ reducedMotion = false,
25
+ locale = "en-US",
26
+ saturation = 1,
27
+ i18n,
28
+ applyToDocument = false,
29
+ class: className = "",
30
+ children,
31
+ }: Props = $props();
32
+
33
+ let mergedI18n = $derived<ManaI18nStrings>({ ...DEFAULT_MANA_I18N, ...i18n });
34
+
35
+ setManaContext(() => ({
36
+ theme,
37
+ density,
38
+ highContrast,
39
+ reducedMotion,
40
+ locale,
41
+ saturation,
42
+ i18n: mergedI18n,
43
+ }));
44
+
45
+ $effect(() => {
46
+ if (applyToDocument && typeof document !== "undefined") {
47
+ applyThemeAttributes(document.documentElement, {
48
+ theme,
49
+ density,
50
+ highContrast,
51
+ saturation,
52
+ reducedMotion,
53
+ });
54
+ }
55
+ });
56
+
57
+ let classes = $derived(
58
+ cx(
59
+ (theme === "darker" || theme === "midnight") && "theme-dark",
60
+ `theme-${theme}`,
61
+ `density-${density}`,
62
+ highContrast && "high-contrast-mode",
63
+ reducedMotion ? "reduce-motion" : "full-motion",
64
+ className,
65
+ ),
66
+ );
67
+ </script>
68
+
69
+ <div
70
+ data-theme={theme}
71
+ data-density={density}
72
+ data-high-contrast={highContrast ? "true" : undefined}
73
+ class={classes}
74
+ style="--saturation-factor: {saturation};"
75
+ >
76
+ {@render children?.()}
77
+ </div>
@@ -0,0 +1,18 @@
1
+ import type { Snippet } from "svelte";
2
+ import { type ManaI18nStrings } from "../core.js";
3
+ import { type ManaDensity, type ManaTheme } from "../tokens.js";
4
+ interface Props {
5
+ theme?: ManaTheme;
6
+ density?: ManaDensity;
7
+ highContrast?: boolean;
8
+ reducedMotion?: boolean;
9
+ locale?: string;
10
+ saturation?: number;
11
+ i18n?: Partial<ManaI18nStrings>;
12
+ applyToDocument?: boolean;
13
+ class?: string;
14
+ children?: Snippet;
15
+ }
16
+ declare const ManaProvider: import("svelte").Component<Props, {}, "">;
17
+ type ManaProvider = ReturnType<typeof ManaProvider>;
18
+ export default ManaProvider;
@@ -0,0 +1,47 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from "svelte";
3
+ import { cx } from "../core.js";
4
+ import { getThemeClasses, type ManaDensity, type ManaTheme } from "../tokens.js";
5
+ import { getThemeContext, setThemeContext } from "./context.js";
6
+
7
+ interface Props {
8
+ theme?: ManaTheme;
9
+ density?: ManaDensity;
10
+ disableAdaptiveTheme?: boolean;
11
+ reduceAdaptiveTheme?: boolean;
12
+ class?: string;
13
+ children?: Snippet<[string]>;
14
+ }
15
+
16
+ let {
17
+ theme,
18
+ density,
19
+ disableAdaptiveTheme = false,
20
+ reduceAdaptiveTheme = false,
21
+ class: className = "",
22
+ children,
23
+ }: Props = $props();
24
+
25
+ const parent = getThemeContext();
26
+ let resolvedTheme = $derived(theme ?? parent.theme);
27
+ let resolvedDensity = $derived(density ?? parent.density);
28
+
29
+ setThemeContext(() => ({
30
+ theme: resolvedTheme,
31
+ density: resolvedDensity,
32
+ contrast: parent.contrast,
33
+ saturation: parent.saturation,
34
+ }));
35
+
36
+ let themeClassName = $derived(
37
+ cx(
38
+ getThemeClasses(resolvedTheme),
39
+ `density-${resolvedDensity}`,
40
+ className,
41
+ disableAdaptiveTheme && "disable-adaptive-theme",
42
+ reduceAdaptiveTheme && "reduce-adaptive-theme",
43
+ ),
44
+ );
45
+ </script>
46
+
47
+ {@render children?.(themeClassName)}
@@ -0,0 +1,13 @@
1
+ import type { Snippet } from "svelte";
2
+ import { type ManaDensity, type ManaTheme } from "../tokens.js";
3
+ interface Props {
4
+ theme?: ManaTheme;
5
+ density?: ManaDensity;
6
+ disableAdaptiveTheme?: boolean;
7
+ reduceAdaptiveTheme?: boolean;
8
+ class?: string;
9
+ children?: Snippet<[string]>;
10
+ }
11
+ declare const ThemeProvider: import("svelte").Component<Props, {}, "">;
12
+ type ThemeProvider = ReturnType<typeof ThemeProvider>;
13
+ export default ThemeProvider;
@@ -0,0 +1,15 @@
1
+ import type { Action } from "svelte/action";
2
+ import { type Placement } from "../core.js";
3
+ export interface FocusLockOptions {
4
+ enabled?: boolean;
5
+ restoreFocus?: boolean;
6
+ }
7
+ export declare const focusLock: Action<HTMLElement, FocusLockOptions | undefined>;
8
+ export interface FloatingOptions {
9
+ anchor: HTMLElement | null;
10
+ placement?: Placement;
11
+ spacing?: number;
12
+ matchWidth?: boolean;
13
+ }
14
+ export declare const floating: Action<HTMLElement, FloatingOptions>;
15
+ export declare const portal: Action<HTMLElement, boolean | HTMLElement | undefined>;
@@ -0,0 +1,108 @@
1
+ import { computeFloatingPosition, floatingAutoUpdate, focusFirstOrContainer, getTabbableElements, } from "../core.js";
2
+ export const focusLock = (node, initial) => {
3
+ let opts = { enabled: true, restoreFocus: true, ...initial };
4
+ let prevActive = null;
5
+ function onKeyDown(e) {
6
+ if (!opts.enabled || e.key !== "Tab")
7
+ return;
8
+ const tabbables = getTabbableElements(node);
9
+ if (tabbables.length === 0) {
10
+ e.preventDefault();
11
+ node.focus();
12
+ return;
13
+ }
14
+ const first = tabbables[0];
15
+ const last = tabbables[tabbables.length - 1];
16
+ if (e.shiftKey && document.activeElement === first) {
17
+ e.preventDefault();
18
+ last.focus();
19
+ }
20
+ else if (!e.shiftKey && document.activeElement === last) {
21
+ e.preventDefault();
22
+ first.focus();
23
+ }
24
+ }
25
+ function activate() {
26
+ if (typeof document === "undefined" || !opts.enabled)
27
+ return;
28
+ prevActive = document.activeElement;
29
+ if (!node.contains(prevActive)) {
30
+ focusFirstOrContainer(node);
31
+ }
32
+ node.addEventListener("keydown", onKeyDown);
33
+ }
34
+ function deactivate() {
35
+ node.removeEventListener("keydown", onKeyDown);
36
+ if (opts.restoreFocus && prevActive && typeof prevActive.focus === "function") {
37
+ prevActive.focus();
38
+ }
39
+ prevActive = null;
40
+ }
41
+ activate();
42
+ return {
43
+ update(next) {
44
+ const wasEnabled = opts.enabled;
45
+ opts = { enabled: true, restoreFocus: true, ...next };
46
+ if (!wasEnabled && opts.enabled)
47
+ activate();
48
+ else if (wasEnabled && !opts.enabled)
49
+ deactivate();
50
+ },
51
+ destroy() {
52
+ deactivate();
53
+ },
54
+ };
55
+ };
56
+ export const floating = (node, initial) => {
57
+ let opts = initial;
58
+ let cleanup = null;
59
+ function start() {
60
+ cleanup?.();
61
+ cleanup = null;
62
+ if (!opts.anchor || typeof window === "undefined")
63
+ return;
64
+ const anchor = opts.anchor;
65
+ const update = () => {
66
+ void computeFloatingPosition(anchor, node, {
67
+ placement: opts.placement ?? "bottom-start",
68
+ spacing: opts.spacing ?? 6,
69
+ }).then((pos) => {
70
+ node.style.position = "fixed";
71
+ node.style.left = `${pos.x}px`;
72
+ node.style.top = `${pos.y}px`;
73
+ if (opts.matchWidth) {
74
+ node.style.minWidth = `${anchor.getBoundingClientRect().width}px`;
75
+ }
76
+ });
77
+ };
78
+ cleanup = floatingAutoUpdate(anchor, node, update);
79
+ }
80
+ start();
81
+ return {
82
+ update(next) {
83
+ opts = next;
84
+ start();
85
+ },
86
+ destroy() {
87
+ cleanup?.();
88
+ },
89
+ };
90
+ };
91
+ export const portal = (node, target = true) => {
92
+ function move(t) {
93
+ if (typeof document === "undefined" || !t)
94
+ return;
95
+ const dest = t === true ? document.body : t;
96
+ if (node.parentNode !== dest)
97
+ dest.appendChild(node);
98
+ }
99
+ move(target);
100
+ return {
101
+ update(next) {
102
+ move(next);
103
+ },
104
+ destroy() {
105
+ node.remove();
106
+ },
107
+ };
108
+ };
@@ -0,0 +1,100 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from "svelte";
3
+ import type { HTMLAttributes } from "svelte/elements";
4
+ import { cx } from "../../core.js";
5
+
6
+ interface Props extends HTMLAttributes<HTMLDivElement> {
7
+ surfaceStyle?: "inset" | "flush";
8
+ sidebarStyle?: "outer" | "inner";
9
+ framed?: boolean;
10
+ height?: number | string;
11
+ sidebarWidth?: number;
12
+ asideWidth?: number;
13
+ asideOpen?: boolean;
14
+ topBar?: Snippet;
15
+ rail?: Snippet;
16
+ sidebar?: Snippet;
17
+ dock?: Snippet;
18
+ header?: Snippet;
19
+ aside?: Snippet;
20
+ statusBar?: Snippet;
21
+ children?: Snippet;
22
+ }
23
+
24
+ let {
25
+ surfaceStyle = "inset",
26
+ sidebarStyle = "outer",
27
+ framed = false,
28
+ height,
29
+ sidebarWidth = 220,
30
+ asideWidth = 320,
31
+ asideOpen = true,
32
+ class: className = "",
33
+ style = "",
34
+ topBar,
35
+ rail,
36
+ sidebar,
37
+ dock,
38
+ header,
39
+ aside,
40
+ statusBar,
41
+ children,
42
+ ...rest
43
+ }: Props = $props();
44
+
45
+ let hasNav = $derived(Boolean(rail || sidebar || dock));
46
+ let inlineStyle = $derived(
47
+ [
48
+ `--mana-sidebar-width: ${sidebarWidth}px`,
49
+ `--mana-aside-width: ${asideWidth}px`,
50
+ height != null ? `height: ${typeof height === "number" ? `${height}px` : height}` : "",
51
+ typeof style === "string" ? style : "",
52
+ ]
53
+ .filter(Boolean)
54
+ .join("; "),
55
+ );
56
+ </script>
57
+
58
+ <div
59
+ class={cx("mana-app-shell", className)}
60
+ data-framed={framed ? "true" : undefined}
61
+ data-surface-style={surfaceStyle}
62
+ data-has-statusbar={statusBar ? "true" : undefined}
63
+ style={inlineStyle}
64
+ {...rest}
65
+ >
66
+ {@render topBar?.()}
67
+ <div class="mana-shell-body">
68
+ {#if hasNav}
69
+ <div
70
+ class="mana-shell-nav"
71
+ data-has-rail={rail ? "true" : "false"}
72
+ data-sidebar-style={sidebarStyle}
73
+ >
74
+ {#if rail}
75
+ <div class="mana-shell-nav-rail">{@render rail()}</div>
76
+ {/if}
77
+ {#if sidebar}
78
+ <div class="mana-shell-nav-sidebar">{@render sidebar()}</div>
79
+ {/if}
80
+ {#if dock}
81
+ <div class="mana-shell-dock-slot">{@render dock()}</div>
82
+ {/if}
83
+ </div>
84
+ {/if}
85
+ <div class="mana-shell-surface-wrap">
86
+ <div class="mana-shell-surface">
87
+ <div class="mana-shell-primary">
88
+ {@render header?.()}
89
+ <main class="mana-shell-content">
90
+ {@render children?.()}
91
+ </main>
92
+ </div>
93
+ {#if aside && asideOpen}
94
+ <aside class="mana-shell-aside">{@render aside()}</aside>
95
+ {/if}
96
+ </div>
97
+ </div>
98
+ </div>
99
+ {@render statusBar?.()}
100
+ </div>
@@ -0,0 +1,22 @@
1
+ import type { Snippet } from "svelte";
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ interface Props extends HTMLAttributes<HTMLDivElement> {
4
+ surfaceStyle?: "inset" | "flush";
5
+ sidebarStyle?: "outer" | "inner";
6
+ framed?: boolean;
7
+ height?: number | string;
8
+ sidebarWidth?: number;
9
+ asideWidth?: number;
10
+ asideOpen?: boolean;
11
+ topBar?: Snippet;
12
+ rail?: Snippet;
13
+ sidebar?: Snippet;
14
+ dock?: Snippet;
15
+ header?: Snippet;
16
+ aside?: Snippet;
17
+ statusBar?: Snippet;
18
+ children?: Snippet;
19
+ }
20
+ declare const AppShell: import("svelte").Component<Props, {}, "">;
21
+ type AppShell = ReturnType<typeof AppShell>;
22
+ export default AppShell;
@@ -0,0 +1,117 @@
1
+ <script lang="ts">
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ import { cx } from "../../core.js";
4
+ import SearchBar from "../inputs/SearchBar.svelte";
5
+ import { ChevronSmallDownIcon } from "../icons/generated.js";
6
+
7
+ export interface SidebarNavItem {
8
+ id: string;
9
+ label: string;
10
+ badge?: string;
11
+ disabled?: boolean;
12
+ variant?: "default" | "destructive";
13
+ }
14
+
15
+ export interface SidebarNavGroup {
16
+ id: string;
17
+ label?: string;
18
+ collapsible?: boolean;
19
+ defaultCollapsed?: boolean;
20
+ items: readonly SidebarNavItem[];
21
+ }
22
+
23
+ interface Props extends Omit<HTMLAttributes<HTMLElement>, "onselect"> {
24
+ groups: readonly SidebarNavGroup[];
25
+ activeId?: string;
26
+ searchable?: boolean;
27
+ searchPlaceholder?: string;
28
+ onselect?: (id: string, item: SidebarNavItem) => void;
29
+ }
30
+
31
+ let {
32
+ groups,
33
+ activeId = $bindable(""),
34
+ searchable = false,
35
+ searchPlaceholder = "Filter…",
36
+ "aria-label": ariaLabel = "Navigation",
37
+ class: className = "",
38
+ onselect,
39
+ ...rest
40
+ }: Props = $props();
41
+
42
+ let query = $state("");
43
+ let collapsed = $state<Record<string, boolean>>({});
44
+
45
+ let filtered = $derived.by(() => {
46
+ const q = query.trim().toLowerCase();
47
+ if (!q) return groups;
48
+ return groups
49
+ .map((g) => ({ ...g, items: g.items.filter((i) => i.label.toLowerCase().includes(q)) }))
50
+ .filter((g) => g.items.length > 0);
51
+ });
52
+
53
+ function toggleGroup(id: string) {
54
+ collapsed = { ...collapsed, [id]: !collapsed[id] };
55
+ }
56
+ </script>
57
+
58
+ <nav class={cx("mana-app-sidebar", className)} aria-label={ariaLabel} {...rest}>
59
+ {#if searchable}
60
+ <div class="mana-app-sidebar-search">
61
+ <SearchBar size="sm" placeholder={searchPlaceholder} bind:value={query} />
62
+ </div>
63
+ {/if}
64
+ <div class="mana-scroller mana-app-sidebar-scroller" data-orientation="vertical" data-variant="thin" data-fade="">
65
+ {#each filtered as group (group.id)}
66
+ {@const isCollapsed = Boolean(group.collapsible && (collapsed[group.id] ?? group.defaultCollapsed) && !query.trim())}
67
+ <section class="mana-app-sidebar-group" data-collapsed={isCollapsed ? "true" : undefined}>
68
+ {#if group.label}
69
+ <div class="mana-app-sidebar-group-header">
70
+ {#if group.collapsible}
71
+ <button
72
+ type="button"
73
+ class="mana-app-sidebar-group-toggle"
74
+ aria-expanded={isCollapsed ? "false" : "true"}
75
+ onclick={() => toggleGroup(group.id)}
76
+ >
77
+ <span class="mana-app-sidebar-group-caret" aria-hidden="true">
78
+ <ChevronSmallDownIcon size="xxs" />
79
+ </span>
80
+ <span class="mana-text-body-xs-medium">{group.label}</span>
81
+ </button>
82
+ {:else}
83
+ <span class="mana-app-sidebar-group-label mana-text-body-xs-medium">{group.label}</span>
84
+ {/if}
85
+ </div>
86
+ {/if}
87
+ {#if !isCollapsed}
88
+ <ul class="mana-app-sidebar-list">
89
+ {#each group.items as item (item.id)}
90
+ {@const active = item.id === activeId}
91
+ <li>
92
+ <button
93
+ type="button"
94
+ class="mana-app-sidebar-item"
95
+ disabled={Boolean(item.disabled)}
96
+ data-active={active ? "true" : undefined}
97
+ data-variant={item.variant ?? "default"}
98
+ aria-current={active ? "page" : undefined}
99
+ onclick={() => {
100
+ if (item.disabled) return;
101
+ activeId = item.id;
102
+ onselect?.(item.id, item);
103
+ }}
104
+ >
105
+ <span class="mana-app-sidebar-item-label mana-text-body-sm-medium">{item.label}</span>
106
+ {#if item.badge}
107
+ <span class="mana-app-sidebar-item-badge">{item.badge}</span>
108
+ {/if}
109
+ </button>
110
+ </li>
111
+ {/each}
112
+ </ul>
113
+ {/if}
114
+ </section>
115
+ {/each}
116
+ </div>
117
+ </nav>