@altinn/altinn-components 0.36.7 → 0.38.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 (66) hide show
  1. package/dist/assets/DialogListItem.css +1 -1
  2. package/dist/assets/DrawerBody.css +1 -1
  3. package/dist/assets/DrawerOrDropdown.css +1 -1
  4. package/dist/assets/Header.css +1 -1
  5. package/dist/assets/Heading.css +1 -1
  6. package/dist/assets/MenuItemBase.css +1 -1
  7. package/dist/assets/MenuItemsVirtual.css +1 -1
  8. package/dist/assets/ScopeListItem.css +1 -1
  9. package/dist/components/Button/IconButton.js +9 -7
  10. package/dist/components/ContextMenu/ContextMenu.js +58 -43
  11. package/dist/components/Dialog/DialogList.js +13 -13
  12. package/dist/components/Dialog/DialogListItem.js +126 -104
  13. package/dist/components/Dropdown/DrawerBody.js +3 -3
  14. package/dist/components/Dropdown/DrawerOrDropdown.js +4 -4
  15. package/dist/components/Header/Header.js +42 -57
  16. package/dist/components/Header/LocaleButton.js +3 -2
  17. package/dist/components/Header/LocaleSwitcher.js +38 -23
  18. package/dist/components/Layout/Layout.js +27 -16
  19. package/dist/components/Layout/LayoutContent.js +4 -4
  20. package/dist/components/List/ListItem.js +39 -38
  21. package/dist/components/List/ListItemLabel.js +0 -2
  22. package/dist/components/Menu/MenuBase.js +9 -9
  23. package/dist/components/Menu/MenuItemBase.js +31 -27
  24. package/dist/components/Menu/MenuItems.js +43 -37
  25. package/dist/components/Menu/MenuItemsVirtual.js +9 -9
  26. package/dist/components/Searchbar/Autocomplete.js +23 -30
  27. package/dist/components/Searchbar/AutocompleteItem.js +10 -12
  28. package/dist/components/Searchbar/ScopeListItem.js +3 -3
  29. package/dist/components/Searchbar/Searchbar.js +4 -4
  30. package/dist/components/SkipLink/SkipLink.js +18 -0
  31. package/dist/components/SkipLink/index.js +4 -0
  32. package/dist/components/Typography/Heading.js +36 -30
  33. package/dist/components/Typography/Typography.js +34 -29
  34. package/dist/components/Typography/useHighlightedText.js +53 -0
  35. package/dist/hooks/useEnterKey.js +8 -8
  36. package/dist/hooks/useMenu.js +43 -28
  37. package/dist/types/lib/components/Button/IconButton.d.ts +2 -1
  38. package/dist/types/lib/components/Dialog/DialogList.d.ts +2 -1
  39. package/dist/types/lib/components/Dialog/DialogList.stories.d.ts +2 -1
  40. package/dist/types/lib/components/Dialog/DialogListItem.d.ts +3 -1
  41. package/dist/types/lib/components/Dropdown/DrawerOrDropdown.d.ts +1 -1
  42. package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +1 -0
  43. package/dist/types/lib/components/Header/LocaleButton.d.ts +2 -1
  44. package/dist/types/lib/components/Header/LocaleSwitcher.d.ts +2 -5
  45. package/dist/types/lib/components/Layout/Layout.d.ts +3 -1
  46. package/dist/types/lib/components/Layout/Layout.stories.d.ts +7 -1
  47. package/dist/types/lib/components/Layout/LayoutContent.d.ts +9 -2
  48. package/dist/types/lib/components/Menu/MenuBase.d.ts +4 -2
  49. package/dist/types/lib/components/Menu/MenuItem.d.ts +2 -1
  50. package/dist/types/lib/components/Menu/MenuItemBase.d.ts +3 -2
  51. package/dist/types/lib/components/Menu/MenuItems.d.ts +3 -1
  52. package/dist/types/lib/components/SkipLink/SkipLink.d.ts +9 -0
  53. package/dist/types/lib/components/SkipLink/SkipLink.stories.d.ts +15 -0
  54. package/dist/types/lib/components/SkipLink/index.d.ts +1 -0
  55. package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +1 -1
  56. package/dist/types/lib/components/Typography/Heading.d.ts +2 -1
  57. package/dist/types/lib/components/Typography/Heading.stories.d.ts +2 -1
  58. package/dist/types/lib/components/Typography/Typography.d.ts +2 -1
  59. package/dist/types/lib/components/Typography/Typography.stories.d.ts +2 -1
  60. package/dist/types/lib/components/Typography/useHighlightedText.d.ts +2 -0
  61. package/dist/types/lib/hooks/useEnterKey.d.ts +1 -1
  62. package/dist/types/lib/hooks/useMenu.d.ts +6 -2
  63. package/dist/types/lib/stories/Beta.stories.d.ts +11 -0
  64. package/dist/types/lib/stories/Inbox.stories.d.ts +1 -0
  65. package/package.json +1 -1
  66. package/dist/types/lib/components/Header/LocaleSwitcher.stories.d.ts +0 -19
@@ -1,88 +1,73 @@
1
1
  "use client";
2
- import { jsxs as c, jsx as e } from "react/jsx-runtime";
3
- import { DropdownBase as h } from "../Dropdown/DropdownBase.js";
2
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
3
+ import { DropdownBase as C } from "../Dropdown/DropdownBase.js";
4
4
  import "../../index-L8X2o7IH.js";
5
- import { DrawerBase as f } from "../Dropdown/DrawerBase.js";
5
+ import { DrawerBase as b } from "../Dropdown/DrawerBase.js";
6
6
  import "react";
7
- import { useRootContext as b } from "../RootProvider/RootProvider.js";
8
- import { GlobalMenu as w } from "../GlobalMenu/GlobalMenu.js";
9
- import { GlobalMenuButton as j } from "../GlobalMenu/GlobalMenuButton.js";
10
- import { HeaderBase as B } from "./HeaderBase.js";
11
- import { HeaderLogo as H } from "./HeaderLogo.js";
12
- import { LocaleButton as L } from "./LocaleButton.js";
13
- import { LocaleSwitcher as g } from "./LocaleSwitcher.js";
14
- import { Searchbar as u } from "../Searchbar/Searchbar.js";
7
+ import { useRootContext as v } from "../RootProvider/RootProvider.js";
8
+ import { GlobalMenu as h } from "../GlobalMenu/GlobalMenu.js";
9
+ import { GlobalMenuButton as H } from "../GlobalMenu/GlobalMenuButton.js";
10
+ import { HeaderBase as S } from "./HeaderBase.js";
11
+ import { HeaderLogo as k } from "./HeaderLogo.js";
12
+ import { LocaleSwitcher as B } from "./LocaleSwitcher.js";
13
+ import { Searchbar as f } from "../Searchbar/Searchbar.js";
15
14
  import "../Snackbar/useSnackbar.js";
16
- import { HeaderGroup as S } from "./HeaderGroup.js";
17
- import { HeaderSearch as v } from "./HeaderSearch.js";
18
- import { useIsDesktop as D } from "../../hooks/useIsDesktop.js";
19
- import '../../assets/Header.css';const I = "_drawer_1vzjh_1", y = "_dropdown_1vzjh_5", z = "_relative_1vzjh_19", a = {
20
- drawer: I,
21
- dropdown: y,
22
- relative: z
23
- }, Z = ({ menu: r, locale: n, search: s, currentAccount: l, logo: x = {}, badge: C }) => {
24
- const { currentId: o, toggleId: t, openId: _, closeAll: d } = b(), p = () => {
15
+ import { HeaderGroup as D } from "./HeaderGroup.js";
16
+ import { HeaderSearch as w } from "./HeaderSearch.js";
17
+ import { useIsDesktop as I } from "../../hooks/useIsDesktop.js";
18
+ import '../../assets/Header.css';const N = "_drawer_1tael_1", F = "_dropdown_1tael_6", G = "_relative_1tael_20", s = {
19
+ drawer: N,
20
+ dropdown: F,
21
+ relative: G
22
+ }, W = ({ menu: r, locale: d, search: a, currentAccount: t, logo: u = {}, badge: x }) => {
23
+ const { currentId: o, toggleId: p, openId: _, closeAll: n } = v(), i = () => {
25
24
  _("search");
26
- }, i = () => {
27
- t("search");
28
- }, N = () => {
29
- t("menu");
30
- }, k = () => {
31
- t("locale");
32
- }, m = D();
33
- return /* @__PURE__ */ c(
34
- B,
25
+ }, c = () => {
26
+ p("search");
27
+ }, g = () => {
28
+ p("menu");
29
+ }, m = I();
30
+ return /* @__PURE__ */ l(
31
+ S,
35
32
  {
36
33
  currentId: o,
37
34
  open: o === "search" || o === "menu" || o === "locale",
38
- onClose: d,
35
+ onClose: n,
39
36
  children: [
40
- /* @__PURE__ */ e(H, { ...x, className: a.logo }),
41
- s && m && /* @__PURE__ */ e(v, { expanded: o === "search", children: /* @__PURE__ */ e(u, { ...s, expanded: o === "search", onClose: i, onFocus: p }) }),
42
- /* @__PURE__ */ c(S, { children: [
43
- n && /* @__PURE__ */ e("div", { className: a.relative, children: /* @__PURE__ */ e(L, { onClick: k, expanded: o === "locale" }) }),
44
- /* @__PURE__ */ c("div", { className: a.relative, children: [
37
+ /* @__PURE__ */ e(k, { ...u, className: s.logo }),
38
+ a && m && /* @__PURE__ */ e(w, { expanded: o === "search", children: /* @__PURE__ */ e(f, { ...a, expanded: o === "search", onClose: c, onFocus: i }) }),
39
+ /* @__PURE__ */ l(D, { children: [
40
+ d && /* @__PURE__ */ e(B, { ...d }),
41
+ /* @__PURE__ */ l("div", { className: s.relative, children: [
45
42
  /* @__PURE__ */ e(
46
- j,
43
+ H,
47
44
  {
48
- badge: C,
49
- currentAccount: l,
50
- onClick: N,
45
+ badge: x,
46
+ currentAccount: t,
47
+ onClick: g,
51
48
  expanded: o === "menu",
52
49
  label: r == null ? void 0 : r.menuLabel
53
50
  }
54
51
  ),
55
- n && /* @__PURE__ */ e(
56
- h,
57
- {
58
- layout: "desktop",
59
- padding: !0,
60
- placement: "right",
61
- open: o === "locale",
62
- className: a.dropdown,
63
- children: /* @__PURE__ */ e(g, { ...n })
64
- }
65
- ),
66
52
  r && /* @__PURE__ */ e(
67
- h,
53
+ C,
68
54
  {
69
55
  layout: "desktop",
70
56
  padding: !0,
71
57
  placement: "right",
72
58
  open: o === "menu",
73
- className: a.dropdown,
74
- children: /* @__PURE__ */ e(w, { ...r, currentAccount: l, onClose: d })
59
+ className: s.dropdown,
60
+ children: /* @__PURE__ */ e(h, { ...r, currentAccount: t, onClose: n })
75
61
  }
76
62
  )
77
63
  ] })
78
64
  ] }),
79
- s && !m && /* @__PURE__ */ e(v, { expanded: o === "search", children: /* @__PURE__ */ e(u, { ...s, expanded: o === "search", onClose: i, onFocus: p }) }),
80
- n && /* @__PURE__ */ e(f, { open: o === "locale", className: a.drawer, children: /* @__PURE__ */ e(g, { ...n }) }),
81
- r && /* @__PURE__ */ e(f, { open: o === "menu", className: a.drawer, children: /* @__PURE__ */ e(w, { ...r, currentAccount: l, onClose: d }) })
65
+ a && !m && /* @__PURE__ */ e(w, { expanded: o === "search", children: /* @__PURE__ */ e(f, { ...a, expanded: o === "search", onClose: c, onFocus: i }) }),
66
+ r && /* @__PURE__ */ e(b, { open: o === "menu", className: s.drawer, children: /* @__PURE__ */ e(h, { ...r, currentAccount: t, onClose: n }) })
82
67
  ]
83
68
  }
84
69
  );
85
70
  };
86
71
  export {
87
- Z as Header
72
+ W as Header
88
73
  };
@@ -26,7 +26,7 @@ const d = c((e, n) => {
26
26
  );
27
27
  }), s = "_button_utwi0_1", p = {
28
28
  button: s
29
- }, x = ({ id: e = "language-switcher", expanded: n, onClick: o }) => /* @__PURE__ */ i(
29
+ }, x = ({ id: e = "language-switcher", expanded: n, onClick: o, onBlurCapture: t }) => /* @__PURE__ */ i(
30
30
  m,
31
31
  {
32
32
  className: p.button,
@@ -37,7 +37,8 @@ const d = c((e, n) => {
37
37
  selected: n,
38
38
  color: "company",
39
39
  onClick: o,
40
- iconAltText: `Open ${e}`
40
+ iconAltText: `Open ${e}`,
41
+ onBlurCapture: t
41
42
  }
42
43
  );
43
44
  export {
@@ -1,30 +1,45 @@
1
1
  "use client";
2
- import { jsx as t, jsxs as m } from "react/jsx-runtime";
2
+ import { jsx as r, jsxs as k } from "react/jsx-runtime";
3
+ import { useRef as h, useMemo as v } from "react";
4
+ import { useEnterKey as b } from "../../hooks/useEnterKey.js";
5
+ import { useIsDesktop as x } from "../../hooks/useIsDesktop.js";
6
+ import { DropdownBase as I } from "../Dropdown/DropdownBase.js";
3
7
  import "../../index-L8X2o7IH.js";
4
- import "react";
5
- import { useRootContext as n } from "../RootProvider/RootProvider.js";
8
+ import { DrawerBase as w } from "../Dropdown/DrawerBase.js";
9
+ import { useRootContext as C } from "../RootProvider/RootProvider.js";
10
+ import { MenuItems as m } from "../Menu/MenuItems.js";
11
+ import { LocaleButton as y } from "./LocaleButton.js";
6
12
  import "../Snackbar/useSnackbar.js";
7
- import { MenuOption as u } from "../Menu/MenuOption.js";
8
- import { MenuHeader as p } from "../Menu/MenuHeader.js";
9
- import { MenuBase as d, MenuList as s, MenuListItem as o } from "../Menu/MenuBase.js";
10
- const j = ({ title: l = "Select language", options: c, onChange: r }) => {
11
- const { toggleId: i } = n(), a = (e) => {
12
- i("locale"), r == null || r(e);
13
+ import { S as B } from "../../Checkmark-D17Nyv_u.js";
14
+ const z = ({ title: d = "Select language", options: i, onSelect: o }) => {
15
+ const c = h(null), u = x(), { currentId: g, toggleId: f, closeAll: s } = C(), n = g === "locale", l = v(() => i.map((e) => ({
16
+ ...e,
17
+ id: String(e.value),
18
+ tabIndex: -1,
19
+ groupId: "locales",
20
+ icon: e.checked ? B : /* @__PURE__ */ r("span", { "aria-hidden": "true" }),
21
+ onClick: () => {
22
+ o == null || o(String(e.value)), s();
23
+ }
24
+ })), [i, o]), p = {
25
+ locales: { title: d || "Språk/language" }
13
26
  };
14
- return /* @__PURE__ */ t(d, { theme: "default", children: /* @__PURE__ */ m(s, { children: [
15
- /* @__PURE__ */ t(o, { children: /* @__PURE__ */ t(p, { title: l }) }),
16
- c.map((e) => /* @__PURE__ */ t(o, { children: /* @__PURE__ */ t(
17
- u,
18
- {
19
- onChange: a,
20
- label: e.label,
21
- type: "radio",
22
- value: e.value,
23
- checked: e.checked
24
- }
25
- ) }, e.value))
26
- ] }) });
27
+ return b((e) => {
28
+ var a;
29
+ if (n) {
30
+ e.preventDefault();
31
+ const t = (a = c.current) == null ? void 0 : a.querySelector('[data-active="true"]');
32
+ t && (t.tagName === "A" && t.hasAttribute("href") ? t.click() : t.dispatchEvent(new MouseEvent("click", { bubbles: !0 }))), s();
33
+ }
34
+ }), /* @__PURE__ */ k("div", { ref: c, "data-testid": "locale-switcher", children: [
35
+ /* @__PURE__ */ r(y, { onClick: () => f("locale"), expanded: n, onBlurCapture: (e) => {
36
+ var t;
37
+ ((t = e == null ? void 0 : e.relatedTarget) == null ? void 0 : t.closest('[data-testid="locale-switcher"]')) || s();
38
+ } }),
39
+ n && u && /* @__PURE__ */ r(I, { layout: "desktop", padding: !0, placement: "right", open: !0, children: /* @__PURE__ */ r(m, { groups: p, items: l, keyboardEvents: !0 }) }),
40
+ n && !u && /* @__PURE__ */ r(w, { open: !0, placement: "bottom", children: /* @__PURE__ */ r(m, { groups: p, items: l, keyboardEvents: !0 }) })
41
+ ] });
27
42
  };
28
43
  export {
29
- j as LocaleSwitcher
44
+ z as LocaleSwitcher
30
45
  };
@@ -1,30 +1,41 @@
1
1
  "use client";
2
2
  import { jsxs as p, jsx as m } from "react/jsx-runtime";
3
- import { LayoutBase as y } from "./LayoutBase.js";
4
- import { LayoutBody as h } from "./LayoutBody.js";
5
- import { LayoutContent as L } from "./LayoutContent.js";
6
- import { LayoutSidebar as x } from "./LayoutSidebar.js";
7
- import { Footer as j } from "../Footer/Footer.js";
8
- import { Header as B } from "../Header/Header.js";
3
+ import { LayoutBase as h } from "./LayoutBase.js";
4
+ import { LayoutBody as L } from "./LayoutBody.js";
5
+ import { LayoutContent as x } from "./LayoutContent.js";
6
+ import { LayoutSidebar as j } from "./LayoutSidebar.js";
7
+ import { Footer as B } from "../Footer/Footer.js";
8
+ import { Header as C } from "../Header/Header.js";
9
9
  import "../../index-L8X2o7IH.js";
10
10
  import "react";
11
- import { useRootContext as C } from "../RootProvider/RootProvider.js";
11
+ import { useRootContext as S } from "../RootProvider/RootProvider.js";
12
12
  import { Menu as F } from "../Menu/Menu.js";
13
13
  import "../Snackbar/useSnackbar.js";
14
- const D = ({ color: r, theme: c = "subtle", header: u, footer: l, sidebar: o, content: t = {}, children: f }) => {
15
- const { currentId: n } = C();
16
- return /* @__PURE__ */ p(y, { color: r, theme: c, currentId: n, children: [
17
- u && /* @__PURE__ */ m(B, { ...u }),
18
- /* @__PURE__ */ p(h, { currentId: n, children: [
19
- o && /* @__PURE__ */ p(x, { hidden: o == null ? void 0 : o.hidden, color: o == null ? void 0 : o.color, ...o, children: [
14
+ import { SkipLink as H } from "../SkipLink/SkipLink.js";
15
+ const J = ({
16
+ color: c,
17
+ theme: f = "subtle",
18
+ header: u,
19
+ footer: n,
20
+ sidebar: o,
21
+ content: t = {},
22
+ children: y,
23
+ skipLink: r
24
+ }) => {
25
+ const { currentId: l } = S();
26
+ return /* @__PURE__ */ p(h, { color: c, theme: f, currentId: l, children: [
27
+ r && /* @__PURE__ */ m(H, { ...r }),
28
+ u && /* @__PURE__ */ m(C, { ...u }),
29
+ /* @__PURE__ */ p(L, { currentId: l, children: [
30
+ o && /* @__PURE__ */ p(j, { hidden: o == null ? void 0 : o.hidden, color: o == null ? void 0 : o.color, ...o, children: [
20
31
  (o == null ? void 0 : o.menu) && /* @__PURE__ */ m(F, { ...o == null ? void 0 : o.menu }),
21
32
  o == null ? void 0 : o.children
22
33
  ] }),
23
- /* @__PURE__ */ m(L, { color: t == null ? void 0 : t.color, children: f })
34
+ /* @__PURE__ */ m(x, { color: t == null ? void 0 : t.color, id: "main-content", children: y })
24
35
  ] }),
25
- l && /* @__PURE__ */ m(j, { ...l })
36
+ n && /* @__PURE__ */ m(B, { ...n })
26
37
  ] });
27
38
  };
28
39
  export {
29
- D as Layout
40
+ J as Layout
30
41
  };
@@ -1,7 +1,7 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import '../../assets/LayoutContent.css';const c = "_content_1wkbr_1", e = {
3
- content: c
4
- }, r = ({ color: t, children: n }) => /* @__PURE__ */ o("main", { className: e.content, "data-color": t, children: n });
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import '../../assets/LayoutContent.css';const e = "_content_1wkbr_1", s = {
3
+ content: e
4
+ }, r = ({ color: t, children: n, id: o = "main-content" }) => /* @__PURE__ */ c("main", { className: s.content, "data-color": t, id: o, children: n });
5
5
  export {
6
6
  r as LayoutContent
7
7
  };
@@ -1,66 +1,67 @@
1
- import { jsxs as w, jsx as B } from "react/jsx-runtime";
2
- import { ListItemBase as H } from "./ListItemBase.js";
3
- import { ListItemHeader as b } from "./ListItemHeader.js";
4
- import '../../assets/ListItem.css';const k = "_item_1nwey_3", q = {
5
- item: k
6
- }, F = ({
7
- className: A,
8
- color: e,
9
- variant: r = "default",
1
+ import { jsxs as H, jsx as N } from "react/jsx-runtime";
2
+ import { c as b } from "../../index-L8X2o7IH.js";
3
+ import { ListItemBase as k } from "./ListItemBase.js";
4
+ import { ListItemHeader as q } from "./ListItemHeader.js";
5
+ import '../../assets/ListItem.css';const A = "_item_1nwey_3", C = {
6
+ item: A
7
+ }, J = ({
8
+ className: i,
9
+ color: m,
10
+ variant: c = "default",
10
11
  shadow: n = "xs",
11
- border: c = "none",
12
- loading: m,
13
- collapsible: f,
12
+ border: f = "none",
13
+ loading: e,
14
+ collapsible: p,
14
15
  expanded: t,
15
16
  size: o,
16
17
  icon: l,
17
18
  label: s,
18
19
  title: a,
19
- description: p,
20
- badge: u,
21
- linkIcon: L = !1,
20
+ description: u,
21
+ badge: L,
22
+ linkIcon: x = !1,
22
23
  select: y,
23
24
  selected: I,
24
25
  controls: _,
25
26
  children: h,
26
- interactive: i,
27
+ interactive: r,
27
28
  id: j,
28
- ...x
29
+ ...w
29
30
  }) => {
30
- const N = typeof s == "function" ? s() : s;
31
- return /* @__PURE__ */ w(
32
- H,
31
+ const B = typeof s == "function" ? s() : s;
32
+ return /* @__PURE__ */ H(
33
+ k,
33
34
  {
34
- className: q.item,
35
+ className: b(C.item, i),
35
36
  size: o,
36
- color: e,
37
- variant: r,
37
+ color: m,
38
+ variant: c,
38
39
  shadow: n,
39
- border: c,
40
+ border: f,
40
41
  selected: I,
41
42
  expanded: t,
42
- loading: m,
43
- interactive: i,
43
+ loading: e,
44
+ interactive: r,
44
45
  id: j,
45
46
  children: [
46
- /* @__PURE__ */ B(
47
- b,
47
+ /* @__PURE__ */ N(
48
+ q,
48
49
  {
49
- color: e,
50
- loading: m,
51
- linkIcon: L,
52
- collapsible: f,
50
+ color: m,
51
+ loading: e,
52
+ linkIcon: x,
53
+ collapsible: p,
53
54
  expanded: t,
54
55
  select: y,
55
56
  title: a,
56
57
  size: o,
57
- description: p,
58
+ description: u,
58
59
  icon: l,
59
- badge: u,
60
+ badge: L,
60
61
  controls: _,
61
- interactive: i,
62
- ...x,
63
- children: N
62
+ interactive: r,
63
+ ...w,
64
+ children: B
64
65
  }
65
66
  ),
66
67
  t ? h : null
@@ -69,5 +70,5 @@ import '../../assets/ListItem.css';const k = "_item_1nwey_3", q = {
69
70
  );
70
71
  };
71
72
  export {
72
- F as ListItem
73
+ J as ListItem
73
74
  };
@@ -14,7 +14,6 @@ const d = (r) => {
14
14
  const s = {
15
15
  as: "h3",
16
16
  size: "sm"
17
- // leading: "tight",
18
17
  };
19
18
  return j(r) ? { ...s, ...r } : z(r) ? {
20
19
  ...s,
@@ -26,7 +25,6 @@ const d = (r) => {
26
25
  size: "xs",
27
26
  weight: "normal",
28
27
  variant: "subtle"
29
- // leading: "tight",
30
28
  };
31
29
  return j(r) ? { ...s, ...r } : z(r) ? {
32
30
  ...s,
@@ -1,17 +1,17 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import { c as a } from "../../index-L8X2o7IH.js";
3
- import '../../assets/MenuBase.css';const u = "_menu_sxyub_1", r = "_list_sxyub_16", l = "_item_sxyub_22", c = {
4
- menu: u,
5
- list: r,
6
- item: l
7
- }, C = ({ as: t = "nav", color: n, theme: e, className: o, children: s }) => /* @__PURE__ */ m(t, { className: a(c.menu, o), "data-color": n, "data-theme": e, children: s }), d = ({ as: t = "ul", role: n = "group", className: e, children: o }) => /* @__PURE__ */ m(t, { className: a(c.list, e), role: n, children: o }), y = ({
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { c } from "../../index-L8X2o7IH.js";
3
+ import '../../assets/MenuBase.css';const r = "_menu_sxyub_1", l = "_list_sxyub_16", p = "_item_sxyub_22", i = {
4
+ menu: r,
5
+ list: l,
6
+ item: p
7
+ }, C = ({ as: t = "nav", color: n, theme: e, className: o, children: s }) => /* @__PURE__ */ a(t, { className: c(i.menu, o), "data-color": n, "data-theme": e, children: s }), d = ({ as: t = "ul", role: n = "group", className: e, children: o, ref: s, onMouseEnter: m }) => /* @__PURE__ */ a(t, { className: c(i.list, e), role: n, ref: s, onMouseEnter: m, children: o }), y = ({
8
8
  as: t = "li",
9
9
  role: n = "presentation",
10
10
  className: e,
11
11
  children: o,
12
12
  style: s,
13
- dataIndex: i
14
- }) => /* @__PURE__ */ m(t, { className: a(c.item, e), role: n, style: s, "data-index": i, children: o });
13
+ dataIndex: m
14
+ }) => /* @__PURE__ */ a(t, { className: c(i.item, e), role: n, style: s, "data-index": m, children: o });
15
15
  export {
16
16
  C as MenuBase,
17
17
  d as MenuList,
@@ -1,43 +1,47 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import { c as u } from "../../index-L8X2o7IH.js";
3
- import '../../assets/MenuItemBase.css';const l = "_item_1itcj_1", I = "_content_1itcj_45", m = {
4
- item: l,
5
- content: I
6
- }, z = ({
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { c as v } from "../../index-L8X2o7IH.js";
3
+ import '../../assets/MenuItemBase.css';const I = "_item_1qmxq_1", N = "_content_1qmxq_45", c = {
4
+ item: I,
5
+ content: N
6
+ }, B = ({
7
7
  interactive: o = !0,
8
8
  as: s,
9
- color: r,
10
- theme: d,
9
+ color: d,
10
+ theme: r,
11
11
  size: i,
12
12
  className: p,
13
- href: _,
13
+ href: x,
14
14
  onClick: t,
15
- onKeyPress: e,
16
- tabIndex: x = 0,
17
- hidden: f,
18
- selected: h,
19
- disabled: a = !1,
20
- children: j
21
- }) => /* @__PURE__ */ c(
15
+ onKeyPress: a,
16
+ tabIndex: _ = 0,
17
+ hidden: q,
18
+ selected: f,
19
+ disabled: e = !1,
20
+ children: h,
21
+ active: u,
22
+ onMouseEnter: l
23
+ }) => /* @__PURE__ */ m(
22
24
  s || "a",
23
25
  {
24
- tabIndex: a ? "-1" : x ?? 0,
25
- className: u(m.item, p),
26
+ tabIndex: e ? "-1" : _ ?? 0,
27
+ className: v(c.item, p),
26
28
  "data-interactive": o,
29
+ "data-active": u,
27
30
  "data-size": i,
28
- "data-color": r,
29
- "data-theme": d,
30
- "aria-hidden": f,
31
- "aria-disabled": a,
32
- "data-selected": h,
33
- href: _,
31
+ "data-color": d,
32
+ "data-theme": r,
33
+ "aria-hidden": q,
34
+ "aria-disabled": e,
35
+ "data-selected": f,
36
+ href: x,
34
37
  onKeyPress: (n) => {
35
- n.key === "Enter" && (t == null || t()), e == null || e(n);
38
+ n.key === "Enter" && (t == null || t()), a == null || a(n);
36
39
  },
37
40
  onClick: t,
38
- children: /* @__PURE__ */ c("span", { className: m.content, children: j })
41
+ onMouseEnter: l,
42
+ children: /* @__PURE__ */ m("span", { className: c.content, children: h })
39
43
  }
40
44
  );
41
45
  export {
42
- z as MenuItemBase
46
+ B as MenuItemBase
43
47
  };