@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 +1 @@
1
- ._border_1cz0s_1{pointer-events:none;border-left:.25rem solid;border-color:var(--dsc-border-color);display:flex;flex-direction:column;margin-top:.25em;margin-bottom:.25em;--dsc-item-my: 0;--dsc-border-color: var(--ds-color-neutral-surface-tinted);--dsc-title-weight: 400;--dsc-title-font-size: 1rem;--dsc-title-line-height: 1.25;--dsc-summary-font-size: .875rem}._border_1cz0s_1[data-selected=true]{--dsc-border-color: var(--ds-color-surface-tinted)}._border_1cz0s_1[data-unread=true]{--dsc-border-color: var(--ds-color-surface-active);--dsc-title-weight: 600}._border_1cz0s_1[data-trashed=true] ._title_1cz0s_27{text-decoration:line-through}._border_1cz0s_1[data-size=xs],._border_1cz0s_1[data-size=sm]{width:100%;flex-direction:row;align-items:center;padding-left:.75rem}._border_1cz0s_1[data-size=md]{padding-left:.75rem;row-gap:.5rem}._border_1cz0s_1[data-size=lg]{--dsc-title-font-size: 1.25rem;--dsc-summary-font-size: 1rem;padding-left:.875rem;row-gap:.875rem}._border_1cz0s_1[data-size=xl]{--dsc-title-font-size: 1.25rem;--dsc-summary-font-size: 1rem;padding-left:1rem;row-gap:1rem}._controls_1cz0s_58{position:absolute;top:0;right:0;margin:.25em}._header_1cz0s_65{position:relative;display:flex;flex-direction:column;row-gap:.25rem}._header_1cz0s_65[data-size=xs],._header_1cz0s_65[data-size=sm]{display:flex;flex-direction:row}._summary_1cz0s_78{font-size:var(--dsc-summary-font-size);font-weight:400;line-height:1.375;color:var(--ds-color-neutral-text-subtle);display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;margin:0}._footer_1cz0s_92{width:100%;padding-right:2rem}._seenBy_1cz0s_97{position:absolute;right:0;bottom:0;margin:.25rem -1rem}._heading_1cz0s_104{padding-right:1.25rem;display:inline-flex;align-items:center;column-gap:.5em}._title_1cz0s_27{font-size:var(--dsc-title-font-size);font-weight:var(--dsc-title-font-weight);line-height:var(--dsc-title-line-height);margin:0}._title_1cz0s_27[data-size=md],._title_1cz0s_27[data-size=lg],._title_1cz0s_27[data-size=xl]{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}
1
+ ._border_jg0tu_1{pointer-events:none;border-left:.25rem solid;border-color:var(--dsc-border-color);display:flex;flex-direction:column;margin-top:.25em;margin-bottom:.25em;--dsc-item-my: 0;--dsc-border-color: var(--ds-color-neutral-surface-tinted);--dsc-title-weight: 400;--dsc-title-font-size: 1rem;--dsc-title-line-height: 1.25;--dsc-summary-font-size: .875rem}._border_jg0tu_1[data-selected=true]{--dsc-border-color: var(--ds-color-surface-tinted)}._border_jg0tu_1[data-unread=true]{--dsc-border-color: var(--ds-color-surface-active);--dsc-title-weight: 600}._border_jg0tu_1[data-trashed=true] ._title_jg0tu_27{text-decoration:line-through}._border_jg0tu_1[data-size=xs],._border_jg0tu_1[data-size=sm]{width:100%;flex-direction:row;align-items:center;padding-left:.75rem}._border_jg0tu_1[data-size=md]{padding-left:.75rem;row-gap:.5rem}._border_jg0tu_1[data-size=lg]{--dsc-title-font-size: 1.25rem;--dsc-summary-font-size: 1rem;padding-left:.875rem;row-gap:.875rem}._border_jg0tu_1[data-size=xl]{--dsc-title-font-size: 1.25rem;--dsc-summary-font-size: 1rem;padding-left:1rem;row-gap:1rem}._controls_jg0tu_58{position:absolute;top:0;right:0;margin:.25em}._header_jg0tu_65{position:relative;display:flex;flex-direction:column;row-gap:.25rem}._header_jg0tu_65[data-size=xs],._header_jg0tu_65[data-size=sm]{display:flex;flex-direction:row}._header_jg0tu_65 mark{background-color:var(--ds-color-surface-tinted)}._summary_jg0tu_82{font-size:var(--dsc-summary-font-size);font-weight:400;line-height:1.375;color:var(--ds-color-neutral-text-subtle);display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;margin:0}._footer_jg0tu_96{width:100%;padding-right:2rem}._seenBy_jg0tu_101{position:absolute;right:0;bottom:0;margin:.25rem -1rem}._heading_jg0tu_108{padding-right:1.25rem;display:inline-flex;align-items:center;column-gap:.5em}._title_jg0tu_27{font-size:var(--dsc-title-font-size);font-weight:var(--dsc-title-font-weight);line-height:var(--dsc-title-line-height);margin:0}._title_jg0tu_27[data-size=md],._title_jg0tu_27[data-size=lg],._title_jg0tu_27[data-size=xl]{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}
@@ -1 +1 @@
1
- ._body_1rwbe_1{width:100%;padding:0 .5em;overflow-y:scroll}
1
+ ._body_oqhlu_1{width:100%;padding:0 .5em;overflow-y:visible}
@@ -1 +1 @@
1
- ._drawerOrDropdown_ijmwc_1{background-color:var(--ds-color-background-default);display:none}._drawerOrDropdown_ijmwc_1[data-expanded=true]{position:fixed;top:5.5rem;right:0;bottom:0;left:0;display:block;z-index:2}@media (min-width: 1024px){._header_ijmwc_18,._footer_ijmwc_19{display:none}._drawerOrDropdown_ijmwc_1[data-expanded=true]{position:absolute;top:auto;right:auto;bottom:auto;left:0;min-width:16rem;max-width:24rem;margin-top:.5rem;border-radius:.375rem;overflow:hidden}}
1
+ ._drawerOrDropdown_2swxb_1{background-color:var(--ds-color-background-default);display:none}._drawerOrDropdown_2swxb_1[data-expanded=true]{position:fixed;top:5.5rem;right:0;bottom:0;left:0;display:block;z-index:2}@media (min-width: 1024px){._header_2swxb_17,._footer_2swxb_18{display:none}._drawerOrDropdown_2swxb_1[data-expanded=true]{position:absolute;top:auto;right:auto;bottom:auto;left:0;min-width:16rem;max-width:24rem;margin-top:.5rem;border-radius:.375rem;overflow:hidden}}
@@ -1 +1 @@
1
- ._drawer_1vzjh_1[data-expanded=true]{display:block}._dropdown_1vzjh_5[data-expanded=true]{display:none}@media (min-width: 1024px){._dropdown_1vzjh_5[data-expanded=true]{width:320px;display:block}._drawer_1vzjh_1[data-expanded=true]{display:none}}._relative_1vzjh_19{position:relative}
1
+ ._drawer_1tael_1[data-expanded=true]{display:block;width:100%}._dropdown_1tael_6[data-expanded=true]{display:none}@media (min-width: 1024px){._dropdown_1tael_6[data-expanded=true]{width:320px;display:block}._drawer_1tael_1[data-expanded=true]{display:none}}._relative_1tael_20{position:relative}
@@ -1 +1 @@
1
- ._heading_16r67_1{font-size:1em;line-height:1.25;margin:0}._heading_16r67_1[data-max-rows="2"]{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}._heading_16r67_1[data-variant=default]{background-color:transparent;color:var(--ds-color-text-default)}._heading_16r67_1[data-variant=subtle]{background-color:transparent;color:var(--ds-color-text-subtle)}._heading_16r67_1[data-weight=normal]{font-weight:400}._heading_16r67_1[data-weight=medium]{font-weight:500}._heading_16r67_1[data-weight=bold]{font-weight:600}._heading_16r67_1[data-size=inherit]{font-size:1em}._heading_16r67_1[data-size=xxs]{font-size:.75rem}._heading_16r67_1[data-size=xs]{font-size:.875rem}._heading_16r67_1[data-size=sm]{font-size:1rem}._heading_16r67_1[data-size=md]{font-size:1.125rem}._heading_16r67_1[data-size=lg]{font-size:1.25rem}._heading_16r67_1[data-size=xl]{font-size:1.5rem}._heading_16r67_1[data-leading=none]{line-height:1}._heading_16r67_1[data-leading=normal]{line-height:1.5}._heading_16r67_1[data-leading=tight]{line-height:1.25}
1
+ ._heading_1dyne_1{font-size:1em;line-height:1.25;margin:0}._heading_1dyne_1[data-max-rows="1"]{display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}._heading_1dyne_1[data-max-rows="2"]{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}._heading_1dyne_1[data-variant=default]{background-color:transparent;color:var(--ds-color-text-default)}._heading_1dyne_1[data-variant=subtle]{background-color:transparent;color:var(--ds-color-text-subtle)}._heading_1dyne_1[data-weight=normal]{font-weight:400}._heading_1dyne_1[data-weight=medium]{font-weight:500}._heading_1dyne_1[data-weight=bold]{font-weight:600}._heading_1dyne_1[data-size=inherit]{font-size:1em}._heading_1dyne_1[data-size=xxs]{font-size:.75rem}._heading_1dyne_1[data-size=xs]{font-size:.875rem}._heading_1dyne_1[data-size=sm]{font-size:1rem}._heading_1dyne_1[data-size=md]{font-size:1.125rem}._heading_1dyne_1[data-size=lg]{font-size:1.25rem}._heading_1dyne_1[data-size=xl]{font-size:1.5rem}._heading_1dyne_1[data-leading=none]{line-height:1}._heading_1dyne_1[data-leading=normal]{line-height:1.5}._heading_1dyne_1[data-leading=tight]{line-height:1.25}
@@ -1 +1 @@
1
- ._item_1itcj_1{font:inherit;color:inherit;padding:0;border:0;text-align:inherit;text-decoration:none;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;width:100%;display:flex;align-items:center;column-gap:.25rem;margin:.5rem 0;border-radius:2px}._item_1itcj_1[aria-disabled=true]{opacity:.5;pointer-events:none}._item_1itcj_1[data-size=md]{min-height:56px}._item_1itcj_1[data-size=md]{min-height:44px}._item_1itcj_1[data-size=sm]{min-height:40px}._content_1itcj_45{display:flex;width:100%;align-items:center;column-gap:6px;padding:6px}._item_1itcj_1,._item_1itcj_1[data-theme]{background-color:transparent}._item_1itcj_1{pointer-events:none}._item_1itcj_1[data-interactive=true]{pointer-events:all}[data-theme=subtle] ._item_1itcj_1:hover{background-color:var(--ds-color-surface-hover)}[data-theme=subtle] ._item_1itcj_1:active{background-color:var(--ds-color-surface-active)}[data-theme=subtle] ._item_1itcj_1[data-selected=true]{background-color:var(--ds-color-background-default)}[data-theme=default] ._item_1itcj_1:hover{background-color:var(--ds-color-surface-hover)}[data-theme=default] ._item_1itcj_1:active{background-color:var(--ds-color-surface-active)}[data-theme=default] ._item_1itcj_1[data-selected=true]{background-color:var(--ds-color-background-tinted)}._content_1itcj_45{display:flex;width:100%;align-items:center;column-gap:.5em}._item_1itcj_1:focus-visible{box-shadow:var(--_ds--focus, var(--dsc-focus-boxShadow));outline:var(--_ds--focus, var(--dsc-focus-outline))}._item_1itcj_1:focus-visible *{--_ds--focus: }
1
+ ._item_1qmxq_1{font:inherit;color:inherit;padding:0;border:0;text-align:inherit;text-decoration:none;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;width:100%;display:flex;align-items:center;column-gap:.25rem;margin:.5rem 0;border-radius:2px}._item_1qmxq_1[aria-disabled=true]{opacity:.5;pointer-events:none}._item_1qmxq_1[data-size=md]{min-height:56px}._item_1qmxq_1[data-size=md]{min-height:44px}._item_1qmxq_1[data-size=sm]{min-height:40px}._content_1qmxq_45{display:flex;width:100%;align-items:center;column-gap:6px;padding:6px}._item_1qmxq_1,._item_1qmxq_1[data-theme]{background-color:transparent}._item_1qmxq_1{pointer-events:none}._item_1qmxq_1[data-interactive=true]{pointer-events:all}[data-theme=subtle] ._item_1qmxq_1:hover{background-color:var(--ds-color-surface-hover)}[data-theme=subtle] ._item_1qmxq_1:active{background-color:var(--ds-color-surface-active)}[data-theme=subtle] ._item_1qmxq_1[data-selected=true]{background-color:var(--ds-color-background-default)}[data-theme=default] ._item_1qmxq_1:hover,[data-theme=default] [data-active=true]{background-color:var(--ds-color-surface-hover)}[data-theme=default] ._item_1qmxq_1:active{background-color:var(--ds-color-surface-active)}[data-theme=default] ._item_1qmxq_1[data-selected=true]{background-color:var(--ds-color-background-tinted)}._content_1qmxq_45{display:flex;width:100%;align-items:center;column-gap:.5em}._item_1qmxq_1:focus-visible{box-shadow:var(--_ds--focus, var(--dsc-focus-boxShadow));outline:var(--_ds--focus, var(--dsc-focus-outline))}._item_1qmxq_1:focus-visible *{--_ds--focus: }
@@ -1 +1 @@
1
- ._virtualScrollRef_15wg7_1{max-height:400px;overflow-y:auto}._virtualMenuListItem_15wg7_6{position:absolute;top:0;left:0;width:100%}._virtualMenuListItem_15wg7_6>*{margin:0}
1
+ ._virtualScrollRef_u54k3_1{max-height:400px;overflow-y:auto;padding:0 .5em;margin:0 -.5em}._virtualMenuListItem_u54k3_8{position:absolute;top:0;left:0;width:100%}._virtualMenuListItem_u54k3_8>*{margin:0}
@@ -1 +1 @@
1
- ._item_1a3bc_1{box-shadow:none}._item_1a3bc_1 mark{background-color:transparent;font-weight:500;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}._item_1a3bc_1 mark:before{content:"«"}._item_1a3bc_1 mark:after{content:"»"}
1
+ ._item_4v2ol_1 mark{background-color:transparent;font-weight:400;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}._item_4v2ol_1 mark:before{content:"«"}._item_4v2ol_1 mark:after{content:"»"}
@@ -1,11 +1,11 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "react";
4
- import { ButtonBase as f } from "./ButtonBase.js";
5
- import { ButtonIcon as u } from "./ButtonIcon.js";
4
+ import { ButtonBase as u } from "./ButtonBase.js";
5
+ import { ButtonIcon as B } from "./ButtonIcon.js";
6
6
  import "../RootProvider/RootProvider.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
- const z = ({
8
+ const g = ({
9
9
  variant: r = "solid",
10
10
  rounded: i = !1,
11
11
  size: m,
@@ -16,9 +16,10 @@ const z = ({
16
16
  className: n,
17
17
  selected: s,
18
18
  onClick: l,
19
- dataTestId: d
19
+ dataTestId: d,
20
+ onBlurCapture: f
20
21
  }) => /* @__PURE__ */ o(
21
- f,
22
+ u,
22
23
  {
23
24
  variant: r,
24
25
  rounded: i,
@@ -29,9 +30,10 @@ const z = ({
29
30
  selected: s,
30
31
  "data-testid": d,
31
32
  "aria-label": p,
32
- children: t && /* @__PURE__ */ o(u, { icon: t, size: e })
33
+ onBlurCapture: f,
34
+ children: t && /* @__PURE__ */ o(B, { icon: t, size: e })
33
35
  }
34
36
  );
35
37
  export {
36
- z as IconButton
38
+ g as IconButton
37
39
  };
@@ -1,68 +1,83 @@
1
1
  "use client";
2
- import { jsxs as v, jsx as s } from "react/jsx-runtime";
3
- import { c as O } from "../../index-L8X2o7IH.js";
4
- import * as a from "react";
5
- import { forwardRef as b, useRef as h, useMemo as w } from "react";
6
- import { IconButton as y } from "../Button/IconButton.js";
7
- import { useClickOutside as I } from "../../hooks/useClickOutside.js";
2
+ import { jsxs as y, jsx as f } from "react/jsx-runtime";
3
+ import { c as I } from "../../index-L8X2o7IH.js";
4
+ import * as m from "react";
5
+ import { forwardRef as w, useRef as O, useMemo as k } from "react";
6
+ import { IconButton as E } from "../Button/IconButton.js";
7
+ import { useClickOutside as C } from "../../hooks/useClickOutside.js";
8
+ import { useEnterKey as M } from "../../hooks/useEnterKey.js";
8
9
  import { DropdownBase as j } from "../Dropdown/DropdownBase.js";
9
- import { MenuItems as C } from "../Menu/MenuItems.js";
10
- import { useRootContext as _ } from "../RootProvider/RootProvider.js";
10
+ import { MenuItems as _ } from "../Menu/MenuItems.js";
11
+ import { useRootContext as R } from "../RootProvider/RootProvider.js";
11
12
  import "../Snackbar/useSnackbar.js";
12
- import { u as R } from "../../useId-BVFxCjkq.js";
13
- import '../../assets/ContextMenu.css';var E = function(e, l) {
14
- var r = {};
15
- for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && l.indexOf(t) < 0 && (r[t] = e[t]);
13
+ import { u as P } from "../../useId-BVFxCjkq.js";
14
+ import '../../assets/ContextMenu.css';var T = function(e, s) {
15
+ var n = {};
16
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && s.indexOf(t) < 0 && (n[t] = e[t]);
16
17
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
17
18
  for (var o = 0, t = Object.getOwnPropertySymbols(e); o < t.length; o++)
18
- l.indexOf(t[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[o]) && (r[t[o]] = e[t[o]]);
19
- return r;
19
+ s.indexOf(t[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[o]) && (n[t[o]] = e[t[o]]);
20
+ return n;
20
21
  };
21
- const M = b((e, l) => {
22
- var { title: r, titleId: t } = e, o = E(e, ["title", "titleId"]);
23
- let n = R();
24
- return n = r ? t || "title-" + n : void 0, a.createElement(
22
+ const A = w((e, s) => {
23
+ var { title: n, titleId: t } = e, o = T(e, ["title", "titleId"]);
24
+ let i = P();
25
+ return i = n ? t || "title-" + i : void 0, m.createElement(
25
26
  "svg",
26
- Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: l, "aria-labelledby": n }, o),
27
- r ? a.createElement("title", { id: n }, r) : null,
28
- a.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M6 10.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3m4.5 1.5a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0m6 0a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0", clipRule: "evenodd" })
27
+ Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: s, "aria-labelledby": i }, o),
28
+ n ? m.createElement("title", { id: i }, n) : null,
29
+ m.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M6 10.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3m4.5 1.5a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0m6 0a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0", clipRule: "evenodd" })
29
30
  );
30
- }), k = "_toggle_nol5i_1", B = {
31
- toggle: k
32
- }, q = ({
31
+ }), B = "_toggle_nol5i_1", S = {
32
+ toggle: B
33
+ }, Q = ({
33
34
  id: e = "context-menu",
34
- ariaLabel: l,
35
- placement: r = "right",
35
+ ariaLabel: s,
36
+ placement: n = "right",
36
37
  groups: t = {},
37
38
  className: o,
38
- items: n
39
+ items: i
39
40
  }) => {
40
- const { currentId: p, toggleId: u, closeAll: f } = _(), m = h(null), g = () => u(e), c = p === e;
41
- I(m, () => {
42
- c && u(e);
41
+ const { currentId: v, toggleId: p, closeAll: a } = R(), d = O(null), g = "context-menu-" + e, x = () => p(e), u = v === e;
42
+ C(d, () => {
43
+ u && p(e);
43
44
  });
44
- const x = w(() => n.map((i) => ({
45
- ...i,
45
+ const b = k(() => i.map((r) => ({
46
+ ...r,
47
+ tabIndex: -1,
46
48
  onClick: () => {
47
- var d;
48
- (d = i.onClick) == null || d.call(i), f();
49
+ var c;
50
+ (c = r.onClick) == null || c.call(r), a();
49
51
  }
50
- })), [n, f]);
51
- return /* @__PURE__ */ v("div", { className: O(B.toggle, o), "data-color": "neutral", ref: m, children: [
52
- /* @__PURE__ */ s(
53
- y,
52
+ })), [i, a]);
53
+ M((r) => {
54
+ var c;
55
+ if (u) {
56
+ r.preventDefault();
57
+ const l = (c = d.current) == null ? void 0 : c.querySelector('[data-active="true"]');
58
+ l && (l.tagName === "A" && l.hasAttribute("href") ? l.click() : l.dispatchEvent(new MouseEvent("click", { bubbles: !0 }))), a();
59
+ }
60
+ });
61
+ const h = (r) => {
62
+ var l;
63
+ ((l = r == null ? void 0 : r.relatedTarget) == null ? void 0 : l.closest(`[data-testid="${g}"]`)) || a();
64
+ };
65
+ return /* @__PURE__ */ y("div", { className: I(S.toggle, o), "data-color": "neutral", ref: d, "data-testid": g, children: [
66
+ /* @__PURE__ */ f(
67
+ E,
54
68
  {
55
69
  size: "xs",
56
70
  rounded: !0,
57
- icon: M,
71
+ icon: A,
58
72
  variant: "text",
59
- onClick: g,
60
- iconAltText: l || `Open ${e}`
73
+ onClick: x,
74
+ iconAltText: s || `Open ${e}`,
75
+ onBlurCapture: h
61
76
  }
62
77
  ),
63
- c && /* @__PURE__ */ s(j, { placement: r, open: c, children: /* @__PURE__ */ s(C, { groups: t, items: x }) })
78
+ u && /* @__PURE__ */ f(j, { placement: n, open: u, children: /* @__PURE__ */ f(_, { groups: t, items: b, keyboardEvents: !0 }) })
64
79
  ] });
65
80
  };
66
81
  export {
67
- q as ContextMenu
82
+ Q as ContextMenu
68
83
  };
@@ -1,28 +1,28 @@
1
- import { jsx as f } from "react/jsx-runtime";
1
+ import { jsx as y } from "react/jsx-runtime";
2
2
  import { createElement as r } from "react";
3
3
  import "../../index-L8X2o7IH.js";
4
- import { useMenu as y } from "../../hooks/useMenu.js";
4
+ import { useMenu as d } from "../../hooks/useMenu.js";
5
5
  import "../RootProvider/RootProvider.js";
6
- import { DialogListGroup as d } from "./DialogListGroup.js";
7
- import { DialogListItem as g } from "./DialogListItem.js";
6
+ import { DialogListGroup as g } from "./DialogListGroup.js";
7
+ import { DialogListItem as u } from "./DialogListItem.js";
8
8
  import "../Snackbar/useSnackbar.js";
9
- import { Section as u } from "../Page/Section.js";
10
- const j = ({ items: i, groups: e = {}, sortGroupBy: m, isLoading: s }) => {
11
- const { menu: o } = y({
9
+ import { Section as k } from "../Page/Section.js";
10
+ const v = ({ items: i, groups: e = {}, sortGroupBy: m, highlightWords: s, isLoading: p }) => {
11
+ const { menu: o } = d({
12
12
  items: i,
13
13
  groups: e,
14
14
  groupByKey: "groupId",
15
15
  keyboardEvents: !1,
16
16
  sortGroupBy: m
17
17
  });
18
- return /* @__PURE__ */ f(u, { spacing: 3, margin: "section", "aria-busy": s, children: o == null ? void 0 : o.map((t, p) => {
19
- const a = t.props || {};
20
- return /* @__PURE__ */ r(d, { ...a, key: "dialog-list-item" + p }, t == null ? void 0 : t.items.map((n, l) => {
21
- const c = n.props || {};
22
- return /* @__PURE__ */ r(g, { ...c, key: "dialog-list-item" + l });
18
+ return /* @__PURE__ */ y(k, { spacing: 3, margin: "section", "aria-busy": p, children: o == null ? void 0 : o.map((t, a) => {
19
+ const n = t.props || {};
20
+ return /* @__PURE__ */ r(g, { ...n, key: "dialog-list-item" + a }, t == null ? void 0 : t.items.map((l, c) => {
21
+ const f = l.props || {};
22
+ return /* @__PURE__ */ r(u, { ...f, highlightWords: s, key: "dialog-list-item" + c });
23
23
  }));
24
24
  }) });
25
25
  };
26
26
  export {
27
- j as DialogList
27
+ v as DialogList
28
28
  };
@@ -1,151 +1,173 @@
1
- import { jsx as a, jsxs as n } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as c } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "react";
4
- import { Skeleton as G } from "../Skeleton/Skeleton.js";
5
- import { Badge as J } from "../Badge/Badge.js";
4
+ import { Badge as O } from "../Badge/Badge.js";
6
5
  import "../RootProvider/RootProvider.js";
7
- import { Heading as K } from "../Typography/Heading.js";
8
- import { DialogMetadata as z } from "./DialogMetadata.js";
9
- import { DialogByline as O } from "./DialogByline.js";
10
- import { MetaItem as P } from "../Metadata/MetaItem.js";
11
- import { ListItemLabel as Q } from "../List/ListItemLabel.js";
12
- import { ListItem as B } from "../List/ListItem.js";
6
+ import { Heading as N } from "../Typography/Heading.js";
7
+ import { DialogMetadata as y } from "./DialogMetadata.js";
8
+ import { DialogByline as P } from "./DialogByline.js";
9
+ import { MetaItem as Q } from "../Metadata/MetaItem.js";
10
+ import { ListItemLabel as S } from "../List/ListItemLabel.js";
11
+ import { ListItem as u } from "../List/ListItem.js";
13
12
  import "../Snackbar/useSnackbar.js";
14
- import '../../assets/DialogListItem.css';const T = "_border_1cz0s_1", U = "_title_1cz0s_27", W = "_controls_1cz0s_58", X = "_header_1cz0s_65", Y = "_summary_1cz0s_78", Z = "_footer_1cz0s_92", $ = "_seenBy_1cz0s_97", A = "_heading_1cz0s_104", e = {
13
+ import '../../assets/DialogListItem.css';const T = "_border_jg0tu_1", U = "_title_jg0tu_27", X = "_controls_jg0tu_58", Y = "_header_jg0tu_65", Z = "_summary_jg0tu_82", $ = "_footer_jg0tu_96", W = "_seenBy_jg0tu_101", z = "_heading_jg0tu_108", r = {
15
14
  border: T,
16
15
  title: U,
17
- controls: W,
18
- header: X,
19
- summary: Y,
20
- footer: Z,
21
- seenBy: $,
22
- heading: A
23
- }, fa = ({
24
- size: r = "xl",
25
- state: u = "normal",
26
- loading: o,
27
- controls: g,
16
+ controls: X,
17
+ header: Y,
18
+ summary: Z,
19
+ footer: $,
20
+ seenBy: W,
21
+ heading: z
22
+ }, ha = ({
23
+ size: e = "xl",
24
+ state: A = "normal",
25
+ loading: t,
26
+ controls: B,
28
27
  select: aa,
29
28
  selected: m,
30
- status: t,
31
- sender: l,
32
- recipient: I,
33
- recipientLabel: D = "to",
34
- grouped: L = !1,
35
- updatedAt: d,
29
+ status: o,
30
+ sender: d,
31
+ recipient: w,
32
+ recipientLabel: I = "to",
33
+ grouped: D = !1,
34
+ updatedAt: l,
36
35
  updatedAtLabel: _,
37
36
  archived: h,
38
- archivedAt: j,
39
- archivedAtLabel: w,
37
+ archivedAt: L,
38
+ archivedAtLabel: M,
40
39
  trashed: f,
41
- trashedAt: M,
42
- trashedAtLabel: k,
40
+ trashedAt: R,
41
+ trashedAtLabel: H,
43
42
  badge: p,
44
- dueAt: H,
45
- dueAtLabel: R,
46
- unread: c,
47
- seenByLog: b,
48
- draftsLabel: S,
49
- sentCount: V,
50
- receivedCount: q,
51
- attachmentsCount: C,
52
- attachmentsLabel: E,
53
- title: s,
54
- description: v,
55
- summary: i,
56
- variant: F = "default",
57
- id: x,
58
- ...N
43
+ dueAt: V,
44
+ dueAtLabel: k,
45
+ unread: n,
46
+ seenByLog: g,
47
+ draftsLabel: q,
48
+ sentCount: C,
49
+ receivedCount: E,
50
+ attachmentsCount: F,
51
+ attachmentsLabel: G,
52
+ title: i,
53
+ description: J,
54
+ summary: s,
55
+ highlightWords: b,
56
+ variant: K = "default",
57
+ id: j,
58
+ ...v
59
59
  }) => {
60
- const y = m ? "tinted" : F;
61
- return r === "xs" || r === "sm" ? /* @__PURE__ */ a(
62
- B,
60
+ const x = m ? "tinted" : K;
61
+ return e === "xs" || e === "sm" ? /* @__PURE__ */ a(
62
+ u,
63
63
  {
64
- ...N,
65
- id: x,
66
- size: r,
64
+ ...v,
65
+ id: j,
66
+ size: e,
67
67
  selected: m,
68
- variant: y,
69
- ariaLabel: s,
68
+ variant: x,
69
+ ariaLabel: i,
70
70
  label: /* @__PURE__ */ a(
71
71
  "div",
72
72
  {
73
- className: e.border,
74
- "data-status": t == null ? void 0 : t.value,
73
+ className: r.border,
74
+ "data-status": o == null ? void 0 : o.value,
75
75
  "data-selected": m,
76
- "data-size": r,
77
- "data-unread": c,
76
+ "data-size": e,
77
+ "data-unread": n,
78
78
  "data-archived": h,
79
79
  "data-trashed": f,
80
- "data-loading": o,
81
- children: /* @__PURE__ */ a(Q, { loading: o, size: r, title: s, description: i || v })
80
+ "data-loading": t,
81
+ children: /* @__PURE__ */ a(S, { loading: t, size: e, title: i, description: s || J })
82
82
  }
83
83
  ),
84
- badge: /* @__PURE__ */ a(z, { loading: o, sender: l, updatedAt: d, updatedAtLabel: _ }),
85
- title: s
84
+ badge: /* @__PURE__ */ a(y, { loading: t, sender: d, updatedAt: l, updatedAtLabel: _ }),
85
+ title: i
86
86
  }
87
87
  ) : /* @__PURE__ */ a(
88
- B,
88
+ u,
89
89
  {
90
- ...N,
91
- id: x,
92
- size: r,
90
+ ...v,
91
+ id: j,
92
+ size: e,
93
93
  selected: m,
94
- variant: y,
95
- controls: /* @__PURE__ */ a("div", { className: e.controls, children: g }),
96
- title: s,
97
- label: /* @__PURE__ */ n(
94
+ variant: x,
95
+ controls: /* @__PURE__ */ a("div", { className: r.controls, children: B }),
96
+ title: i,
97
+ label: /* @__PURE__ */ c(
98
98
  "div",
99
99
  {
100
- className: e.border,
100
+ className: r.border,
101
101
  "data-selected": m,
102
- "data-status": t == null ? void 0 : t.value,
103
- "data-size": r,
104
- "data-unread": c,
102
+ "data-status": o == null ? void 0 : o.value,
103
+ "data-size": e,
104
+ "data-unread": n,
105
105
  "data-archived": h,
106
106
  "data-trashed": f,
107
- "data-loading": o,
107
+ "data-loading": t,
108
108
  children: [
109
- /* @__PURE__ */ n("header", { className: e.header, "data-size": r, children: [
110
- /* @__PURE__ */ n("span", { className: e.heading, children: [
111
- /* @__PURE__ */ a(K, { weight: c ? "bold" : "normal", loading: o, maxRows: 2, className: e.title, children: s }),
112
- p && /* @__PURE__ */ a(J, { variant: "tinted", size: "xs", ...p })
109
+ /* @__PURE__ */ c("header", { className: r.header, "data-size": e, children: [
110
+ /* @__PURE__ */ c("span", { className: r.heading, children: [
111
+ /* @__PURE__ */ a(
112
+ N,
113
+ {
114
+ as: "h2",
115
+ highlightWords: b,
116
+ weight: n ? "bold" : "normal",
117
+ loading: t,
118
+ maxRows: 2,
119
+ className: r.title,
120
+ children: i
121
+ }
122
+ ),
123
+ p && /* @__PURE__ */ a(O, { variant: "tinted", size: "xs", ...p })
113
124
  ] }),
114
125
  /* @__PURE__ */ a(
115
- O,
126
+ P,
116
127
  {
117
128
  size: "xs",
118
- loading: o,
119
- sender: l,
120
- recipient: I,
121
- recipientLabel: D,
122
- grouped: L
129
+ loading: t,
130
+ sender: d,
131
+ recipient: w,
132
+ recipientLabel: I,
133
+ grouped: D
123
134
  }
124
135
  ),
125
- r === "xl" && i && /* @__PURE__ */ a(G, { loading: o, children: /* @__PURE__ */ a("p", { "data-size": r, className: e.summary, children: i || v }) })
136
+ s && /* @__PURE__ */ a(
137
+ N,
138
+ {
139
+ as: "h3",
140
+ highlightWords: b,
141
+ weight: "normal",
142
+ className: r.summary,
143
+ loading: t,
144
+ maxRows: 2,
145
+ children: s
146
+ }
147
+ )
126
148
  ] }),
127
149
  /* @__PURE__ */ a(
128
- z,
150
+ y,
129
151
  {
130
- className: e.footer,
131
- loading: o,
132
- status: t,
133
- draftsLabel: S,
134
- sentCount: V,
135
- receivedCount: q,
136
- updatedAt: d,
152
+ className: r.footer,
153
+ loading: t,
154
+ status: o,
155
+ draftsLabel: q,
156
+ sentCount: C,
157
+ receivedCount: E,
158
+ updatedAt: l,
137
159
  updatedAtLabel: _,
138
- archivedAt: j,
139
- archivedAtLabel: w,
140
- trashedAt: M,
141
- trashedAtLabel: k,
142
- dueAt: H,
143
- dueAtLabel: R,
144
- attachmentsCount: C,
145
- attachmentsLabel: E
160
+ archivedAt: L,
161
+ archivedAtLabel: M,
162
+ trashedAt: R,
163
+ trashedAtLabel: H,
164
+ dueAt: V,
165
+ dueAtLabel: k,
166
+ attachmentsCount: F,
167
+ attachmentsLabel: G
146
168
  }
147
169
  ),
148
- b && /* @__PURE__ */ a(P, { className: e.seenBy, icon: { items: b.items } })
170
+ g && /* @__PURE__ */ a(Q, { className: r.seenBy, icon: { items: g.items } })
149
171
  ]
150
172
  }
151
173
  )
@@ -153,5 +175,5 @@ import '../../assets/DialogListItem.css';const T = "_border_1cz0s_1", U = "_titl
153
175
  );
154
176
  };
155
177
  export {
156
- fa as DialogListItem
178
+ ha as DialogListItem
157
179
  };
@@ -1,8 +1,8 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import { c as t } from "../../index-L8X2o7IH.js";
3
- import '../../assets/DrawerBody.css';const c = "_body_1rwbe_1", d = {
3
+ import '../../assets/DrawerBody.css';const c = "_body_oqhlu_1", d = {
4
4
  body: c
5
- }, b = ({ className: o, children: r }) => /* @__PURE__ */ s("div", { className: t(d.body, o), children: r });
5
+ }, m = ({ className: o, children: r }) => /* @__PURE__ */ s("div", { className: t(d.body, o), children: r });
6
6
  export {
7
- b as DrawerBody
7
+ m as DrawerBody
8
8
  };
@@ -1,4 +1,4 @@
1
- import { jsxs as c, Fragment as s, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as s, Fragment as c, jsx as o } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "react";
4
4
  import "../RootProvider/RootProvider.js";
@@ -8,7 +8,7 @@ import { DrawerFooter as f } from "./DrawerFooter.js";
8
8
  import { DrawerButton as D } from "./DrawerButton.js";
9
9
  import { DrawerBody as n } from "./DrawerBody.js";
10
10
  import "../Snackbar/useSnackbar.js";
11
- import '../../assets/DrawerOrDropdown.css';const t = "_drawerOrDropdown_ijmwc_1", _ = "_header_ijmwc_18", h = "_footer_ijmwc_19", e = {
11
+ import '../../assets/DrawerOrDropdown.css';const t = "_drawerOrDropdown_2swxb_1", _ = "_header_2swxb_17", h = "_footer_2swxb_18", e = {
12
12
  drawerOrDropdown: t,
13
13
  header: _,
14
14
  footer: h
@@ -18,9 +18,9 @@ import '../../assets/DrawerOrDropdown.css';const t = "_drawerOrDropdown_ijmwc_1"
18
18
  drawerButton: r,
19
19
  children: a,
20
20
  drawerTitle: p
21
- }) => /* @__PURE__ */ c(s, { children: [
21
+ }) => /* @__PURE__ */ s(c, { children: [
22
22
  m && /* @__PURE__ */ o(d, { onClick: i }),
23
- /* @__PURE__ */ c("div", { className: e.drawerOrDropdown, "data-expanded": m, children: [
23
+ /* @__PURE__ */ s("div", { className: e.drawerOrDropdown, "data-expanded": m, children: [
24
24
  /* @__PURE__ */ o(l, { className: e.header, title: p, onClose: i }),
25
25
  /* @__PURE__ */ o(n, { children: a }),
26
26
  /* @__PURE__ */ o(f, { className: e.footer, children: r && /* @__PURE__ */ o(D, { onClick: r == null ? void 0 : r.onClick, children: r == null ? void 0 : r.label }) })