@altinn/altinn-components 0.6.8 → 0.6.10

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 (33) hide show
  1. package/dist/assets/AvatarGroup.css +1 -1
  2. package/dist/assets/ButtonBase.css +1 -1
  3. package/dist/assets/DialogListItemBase.css +1 -1
  4. package/dist/assets/FooterBase.css +1 -1
  5. package/dist/assets/GlobalMenuBase.css +1 -1
  6. package/dist/assets/MenuItemBase.css +1 -1
  7. package/dist/assets/MenuOption.css +1 -1
  8. package/dist/components/Avatar/AvatarGroup.js +21 -21
  9. package/dist/components/Button/ButtonBase.js +7 -7
  10. package/dist/components/ContextMenu/ContextMenu.d.ts +3 -1
  11. package/dist/components/ContextMenu/ContextMenu.js +13 -7
  12. package/dist/components/ContextMenu/ContextMenuBase.d.ts +3 -1
  13. package/dist/components/ContextMenu/ContextMenuBase.js +19 -18
  14. package/dist/components/Dialog/Dialog.d.ts +1 -1
  15. package/dist/components/Dialog/Dialog.js +41 -50
  16. package/dist/components/Dialog/Dialog.stories.js +150 -192
  17. package/dist/components/Dialog/DialogFooter.d.ts +2 -1
  18. package/dist/components/Dialog/DialogListItem.stories.js +110 -131
  19. package/dist/components/Dialog/DialogListItemBase.js +5 -5
  20. package/dist/components/Dialog/DialogNav.js +20 -20
  21. package/dist/components/Footer/FooterBase.js +5 -5
  22. package/dist/components/Footer/FooterMenu.js +9 -13
  23. package/dist/components/GlobalMenu/AccountMenu.js +13 -5
  24. package/dist/components/GlobalMenu/GlobalMenu.js +46 -40
  25. package/dist/components/GlobalMenu/GlobalMenu.stories.js +16 -5
  26. package/dist/components/GlobalMenu/GlobalMenuBase.d.ts +8 -2
  27. package/dist/components/GlobalMenu/GlobalMenuBase.js +9 -10
  28. package/dist/components/Menu/MenuItem.stories.js +2 -2
  29. package/dist/components/Menu/MenuItemBase.js +22 -22
  30. package/dist/components/Menu/MenuItemMedia.js +1 -3
  31. package/dist/components/Menu/MenuOption.js +20 -20
  32. package/dist/components/Toolbar/Toolbar.stories.js +14 -7
  33. package/package.json +1 -1
@@ -1 +1 @@
1
- ._group_1k49o_1{display:flex}._reset_1k49o_5{margin:0;padding:0;text-indent:0;list-style-type:none}._item_1k49o_12{position:relative}._xs_1k49o_16{width:32px}._xs_1k49o_16[data-count="2"] *+*{margin-left:-8px}._xs_1k49o_16[data-count="3"] *+*{margin-left:-14px}._xs_1k49o_16[data-count="4"] *+*{margin-left:-16px}._sm_1k49o_32{width:42px}._sm_1k49o_32[data-count="2"] *+*{margin-left:-6px}._sm_1k49o_32[data-count="3"] *+*{margin-left:-15px}._sm_1k49o_32[data-count="4"] *+*{margin-left:-18px}._md_1k49o_48{width:54px}._md_1k49o_48[data-count="2"] *+*{margin-left:-6px}._md_1k49o_48[data-count="3"] *+*{margin-left:-18px}._md_1k49o_48[data-count="4"] *+*{margin-left:-22px}._lg_1k49o_64{width:66px}._lg_1k49o_64[data-count="2"] *+*{margin-left:-6px}._lg_1k49o_64[data-count="3"] *+*{margin-left:-21px}._lg_1k49o_64[data-count="4"] *+*{margin-left:-26px}
1
+ ._group_1xzlf_1{display:flex}._reset_1xzlf_5{margin:0;padding:0;text-indent:0;list-style-type:none}._item_1xzlf_12{position:relative}._xs_1xzlf_16{width:32px}._xs_1xzlf_16[data-count="1"]{width:20px}._xs_1xzlf_16[data-count="2"] *+*{margin-left:-8px}._xs_1xzlf_16[data-count="3"] *+*{margin-left:-14px}._xs_1xzlf_16[data-count="4"] *+*{margin-left:-16px}._sm_1xzlf_36{width:42px}._sm_1xzlf_36[data-count="1"]{width:24px}._sm_1xzlf_36[data-count="2"] *+*{margin-left:-6px}._sm_1xzlf_36[data-count="3"] *+*{margin-left:-15px}._sm_1xzlf_36[data-count="4"] *+*{margin-left:-18px}._md_1xzlf_56{width:54px}._md_1xzlf_56[data-count="1"]{width:30px}._md_1xzlf_56[data-count="2"] *+*{margin-left:-6px}._md_1xzlf_56[data-count="3"] *+*{margin-left:-18px}._md_1xzlf_56[data-count="4"] *+*{margin-left:-22px}._lg_1xzlf_76{width:66px}._lg_1xzlf_76[data-count="1"]{width:36px}._lg_1xzlf_76[data-count="2"] *+*{margin-left:-6px}._lg_1xzlf_76[data-count="3"] *+*{margin-left:-21px}._lg_1xzlf_76[data-count="4"] *+*{margin-left:-26px}
@@ -1 +1 @@
1
- ._button_1pg7d_1{border:1px solid;border-color:transparent;margin:0;padding:0;width:auto;overflow:visible;background:transparent;color:inherit;font:inherit;text-align:inherit;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}._button_1pg7d_1:disabled{opacity:.5;pointer-events:none}._button_1pg7d_1:focus{border-color:var(--theme-base-active)}._button_1pg7d_1:hover{border-color:var(--theme-base-hover)}._button_1pg7d_1:active{border-color:var(--theme-base-active)}._button_1pg7d_1[data-size=sm]{height:2.25rem}._button_1pg7d_1[data-size=md]{height:2.75rem}._button_1pg7d_1[data-size=lg]{height:3.5rem}._button_1pg7d_1[data-variant=solid]{border-color:var(--theme-base-default);background-color:var(--theme-base-default);color:#fff}._button_1pg7d_1[data-variant=solid]:hover{border-color:var(--theme-base-hover);background-color:var(--theme-base-hover)}._button_1pg7d_1[data-variant=solid]:active{border-color:var(--theme-base-active);background-color:var(--theme-base-active)}._button_1pg7d_1[data-variant=outline],._button_1pg7d_1[data-variant=dotted]{border-color:var(--theme-base-default)}._button_1pg7d_1[data-variant=outline]{border-style:solid}._button_1pg7d_1[data-variant=dotted]{border-style:dotted}._button_1pg7d_1[data-variant=text]{border-color:transparent}._button_1pg7d_1[data-variant=outline]:hover,._button_1pg7d_1[data-variant=dotted]:hover,._button_1pg7d_1[data-variant=text]:hover{background-color:var(--theme-surface-default)}._button_1pg7d_1[data-variant=outline]:active,._button_1pg7d_1[data-variant=dotted]:active,._button_1pg7d_1[data-variant=text]:active{background-color:var(--theme-surface-active)}._button_1pg7d_1[aria-selected=true]{background-color:var(--theme-background-subtle);color:var(--theme-text-default)}._button_1pg7d_1[data-color=secondary]{color:var(--theme-text-subtle)}._button_1pg7d_1[data-color=secondary]:hover{border-color:var(--theme-surface-hover)}._button_1pg7d_1[data-color=secondary][data-variant=solid]{border-color:var(--theme-surface-default);background-color:var(--theme-surface-default)}._button_1pg7d_1[data-color=secondary][data-variant=solid]:hover{border-color:var(--theme-surface-hover);background-color:var(--theme-surface-hover)}._button_1pg7d_1[data-color=secondary][data-variant=solid]:active,._button_1pg7d_1[data-color=secondary][data-variant=outline]:active,._button_1pg7d_1[data-color=secondary][data-variant=dotted]:active,._button_1pg7d_1[data-color=secondary][data-variant=text]:active{border-color:var(--theme-surface-active);background-color:var(--theme-surface-active)}
1
+ ._button_1p2ap_1{border:1px solid;border-color:transparent;margin:0;padding:0;width:auto;overflow:visible;background:transparent;text-decoration:none;color:inherit;font:inherit;text-align:inherit;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}._button_1p2ap_1:disabled{opacity:.5;pointer-events:none}._button_1p2ap_1:focus{border-color:var(--theme-base-active)}._button_1p2ap_1:hover{border-color:var(--theme-base-hover)}._button_1p2ap_1:active{border-color:var(--theme-base-active)}._button_1p2ap_1[data-size=sm]{height:2.25rem}._button_1p2ap_1[data-size=md]{height:2.75rem}._button_1p2ap_1[data-size=lg]{height:3.5rem}._button_1p2ap_1[data-variant=solid]{border-color:var(--theme-base-default);background-color:var(--theme-base-default);color:#fff}._button_1p2ap_1[data-variant=solid]:hover{border-color:var(--theme-base-hover);background-color:var(--theme-base-hover)}._button_1p2ap_1[data-variant=solid]:active{border-color:var(--theme-base-active);background-color:var(--theme-base-active)}._button_1p2ap_1[data-variant=outline],._button_1p2ap_1[data-variant=dotted]{border-color:var(--theme-base-default)}._button_1p2ap_1[data-variant=outline]{border-style:solid}._button_1p2ap_1[data-variant=dotted]{border-style:dotted}._button_1p2ap_1[data-variant=text]{border-color:transparent}._button_1p2ap_1[data-variant=outline]:hover,._button_1p2ap_1[data-variant=dotted]:hover,._button_1p2ap_1[data-variant=text]:hover{background-color:var(--theme-surface-default)}._button_1p2ap_1[data-variant=outline]:active,._button_1p2ap_1[data-variant=dotted]:active,._button_1p2ap_1[data-variant=text]:active{background-color:var(--theme-surface-active)}._button_1p2ap_1[aria-selected=true]{background-color:var(--theme-background-subtle);color:var(--theme-text-default)}._button_1p2ap_1[data-color=secondary]{color:var(--theme-text-subtle)}._button_1p2ap_1[data-color=secondary]:hover{border-color:var(--theme-surface-hover)}._button_1p2ap_1[data-color=secondary][data-variant=solid]{border-color:var(--theme-surface-default);background-color:var(--theme-surface-default)}._button_1p2ap_1[data-color=secondary][data-variant=solid]:hover{border-color:var(--theme-surface-hover);background-color:var(--theme-surface-hover)}._button_1p2ap_1[data-color=secondary][data-variant=solid]:active,._button_1p2ap_1[data-color=secondary][data-variant=outline]:active,._button_1p2ap_1[data-color=secondary][data-variant=dotted]:active,._button_1p2ap_1[data-color=secondary][data-variant=text]:active{border-color:var(--theme-surface-active);background-color:var(--theme-surface-active)}
@@ -1 +1 @@
1
- ._item_1ate4_1{background-color:var(--theme-background-default);position:relative;box-shadow:var(--ds-shadow-xs)}._item_1ate4_1[aria-selected=true]{background-color:var(--theme-background-subtle);outline:2px solid}._link_1ate4_13{display:flex;padding:1rem}._item_1ate4_1[aria-selected=false] ._link_1ate4_13:hover{outline:2px solid;outline-color:var(--global-base-default)}._select_1ate4_23{position:absolute;top:0;right:0;margin:.375rem}
1
+ ._item_1uvy5_1{background-color:var(--theme-background-default);position:relative;box-shadow:var(--ds-shadow-xs)}._item_1uvy5_1[aria-selected=true]{background-color:var(--theme-background-subtle);outline:2px solid}._link_1uvy5_13{margin:0;padding:0;width:auto;overflow:visible;background:transparent;text-decoration:none;color:inherit;font:inherit;text-align:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;display:flex;padding:1rem}._item_1uvy5_1[aria-selected=false] ._link_1uvy5_13:hover{outline:2px solid;outline-color:var(--global-base-default)}._select_1uvy5_46{position:absolute;top:0;right:0;margin:.375rem}
@@ -1 +1 @@
1
- ._footer_z2xgm_1{border-top:1px solid;border-color:var(--theme-border-subtle);display:flex;flex-direction:column;row-gap:1rem;padding:1rem 0;margin:2rem 1rem}._grid_z2xgm_13{width:100%;max-width:80rem;margin:0 auto;display:flex;flex-direction:column;justify-content:space-between;row-gap:1rem}@media (min-width: 1024px){._grid_z2xgm_13{padding:0 1rem;flex-direction:row}}
1
+ ._footer_1d8fg_1{width:100%;border-top:1px solid;border-color:var(--theme-border-subtle);display:flex;flex-direction:column;row-gap:1rem;padding:1rem 0;margin:2rem 1rem}._grid_1d8fg_14{width:100%;max-width:80rem;margin:0 auto;display:flex;flex-direction:column;justify-content:space-between;row-gap:1rem}@media (min-width: 1024px){._grid_1d8fg_14{padding:0 1rem;flex-direction:row}}
@@ -1 +1 @@
1
- ._nav_gzloq_1{background-color:#fff;display:flex;flex-direction:column;padding:0 .5rem}._header_gzloq_8{border-bottom:1px solid var(--theme-border-subtle)}._footer_gzloq_12{border-top:1px solid var(--theme-border-subtle);padding:1rem .5rem;display:flex;flex-direction:column;align-items:stretch}._drawer_gzloq_20[aria-expanded=true]{display:block;padding:.5rem;z-index:2}._dropdown_gzloq_26[aria-expanded=true]{display:none}@media (min-width: 1024px){._drawer_gzloq_20[aria-expanded=true]{display:none}._dropdown_gzloq_26[aria-expanded=true]{display:block;z-index:2}}
1
+ ._nav_1mnmu_1{background-color:#fff;display:flex;flex-direction:column;padding:0 .5rem}._footer_1mnmu_8{padding:1rem .5rem;display:flex;width:100%;flex-direction:column;align-items:stretch}._drawer_1mnmu_16[aria-expanded=true]{display:block;padding:.5rem;z-index:2}._dropdown_1mnmu_22[aria-expanded=true]{display:none}@media (min-width: 1024px){._drawer_1mnmu_16[aria-expanded=true]{display:none}._dropdown_1mnmu_22[aria-expanded=true]{display:block;z-index:2}}
@@ -1 +1 @@
1
- ._item_1m3xe_1{border:0;color:inherit;font:inherit;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}._item_1m3xe_1[aria-disabled=true]{opacity:.5;pointer-events:none}._item_1m3xe_1[data-size=sm]{min-height:44px}._content_1m3xe_35{display:flex;width:100%;align-items:center;column-gap:6px;padding:6px}._action_1m3xe_43{display:flex;justify-content:center;align-items:center;padding:10px}._linkText_1m3xe_50{font-size:.875rem;white-space:nowrap}._linkIcon_1m3xe_55{font-size:1.5rem}._item_1m3xe_1{background-color:transparent;color:var(--theme-text-default)}._item_1m3xe_1[aria-selected=true]{background-color:var(--theme-background-default)}._item_1m3xe_1:hover,._item_1m3xe_1:active{background-color:var(--theme-surface-hover)}._media_1m3xe_75[data-color=subtle]{background-color:var(--theme-background-default);color:var(--theme-text-default)}._media_1m3xe_75[data-color=strong]{background-color:var(--theme-base-default);color:var(--theme-background-default)}
1
+ ._item_16huj_1{padding:0;border:0;color:inherit;font:inherit;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}._item_16huj_1[aria-disabled=true]{opacity:.5;pointer-events:none}._item_16huj_1[data-size=sm]{min-height:44px}._content_16huj_36{display:flex;width:100%;align-items:center;column-gap:6px;padding:6px}._action_16huj_44{display:flex;justify-content:center;align-items:center;padding:10px}._linkText_16huj_51{font-size:.875rem;white-space:nowrap}._linkIcon_16huj_56{font-size:1.5rem}._item_16huj_1{background-color:transparent;color:var(--theme-text-default)}._item_16huj_1[aria-selected=true]{background-color:var(--theme-background-default)}._item_16huj_1:hover,._item_16huj_1:active{background-color:var(--theme-surface-hover)}._media_16huj_76[data-color=subtle]{background-color:var(--theme-background-default);color:var(--theme-text-default)}._media_16huj_76[data-color=strong]{background-color:var(--theme-base-default);color:var(--theme-background-default)}
@@ -1 +1 @@
1
- ._label_1am63_1{padding-left:6px}._input_1am63_5{position:absolute;opacity:0}._icon_1am63_10{font-size:1rem;display:flex;align-items:center;justify-content:center}._icon_1am63_10{color:var(--theme-base-default)}._icon_1am63_10 [data-hover=true]{opacity:0}._label_1am63_1:hover [data-hover=true]{opacity:1}
1
+ ._label_dg58p_1{padding-left:6px}._input_dg58p_5{position:absolute;opacity:0}._icon_dg58p_10{flex-shrink:0;font-size:1rem;display:flex;align-items:center;justify-content:center}._icon_dg58p_10{color:var(--theme-base-default)}._icon_dg58p_10 [data-hover=true]{opacity:0}._label_dg58p_1:hover [data-hover=true]{opacity:1}
@@ -1,38 +1,38 @@
1
1
  "use client";
2
- import { jsx as s } from "react/jsx-runtime";
2
+ import { jsx as r } from "react/jsx-runtime";
3
3
  import { c as n } from "../../index-L8X2o7IH.js";
4
4
  import { useMemo as p } from "react";
5
- import { Avatar as d } from "./Avatar.js";
6
- import '../../assets/AvatarGroup.css';const k = "_group_1k49o_1", h = "_reset_1k49o_5", f = "_item_1k49o_12", A = "_xs_1k49o_16", U = "_sm_1k49o_32", x = "_md_1k49o_48", y = "_lg_1k49o_64", t = {
7
- group: k,
8
- reset: h,
9
- item: f,
10
- xs: A,
11
- sm: U,
12
- md: x,
5
+ import { Avatar as f } from "./Avatar.js";
6
+ import '../../assets/AvatarGroup.css';const x = "_group_1xzlf_1", d = "_reset_1xzlf_5", h = "_item_1xzlf_12", z = "_xs_1xzlf_16", A = "_sm_1xzlf_36", U = "_md_1xzlf_56", y = "_lg_1xzlf_76", o = {
7
+ group: x,
8
+ reset: d,
9
+ item: h,
10
+ xs: z,
11
+ sm: A,
12
+ md: U,
13
13
  lg: y
14
14
  }, a = ({
15
- items: e = [],
16
- maxItemsCount: l = 4,
15
+ items: l = [],
16
+ maxItemsCount: s = 4,
17
17
  defaultType: _,
18
18
  size: c = "sm",
19
19
  className: m
20
20
  }) => {
21
- const r = p(() => e.slice(0, l), [e, l]);
22
- return (e == null ? void 0 : e.length) === 0 ? /* @__PURE__ */ s("div", { className: t.avatarGroup }) : /* @__PURE__ */ s("ul", { className: n(t.reset, t.group, t[c], m), "data-count": r == null ? void 0 : r.length, children: r.map((o, g) => {
23
- const u = g === l - 1, i = o.customLabel || u ? e.length.toString() : void 0;
24
- return /* @__PURE__ */ s("li", { className: n(t.reset, t.item), children: /* @__PURE__ */ s(
25
- d,
21
+ const t = p(() => l.slice(0, s), [l, s]);
22
+ return (l == null ? void 0 : l.length) === 0 ? /* @__PURE__ */ r("div", { className: o.avatarGroup }) : /* @__PURE__ */ r("ul", { className: n(o.reset, o.group, o[c], m), "data-count": t == null ? void 0 : t.length, children: t.map((e, g) => {
23
+ const u = g === s - 1, i = e.customLabel || u ? l.length.toString() : void 0;
24
+ return /* @__PURE__ */ r("li", { className: n(o.reset, o.item), children: /* @__PURE__ */ r(
25
+ f,
26
26
  {
27
- name: o.name,
27
+ name: e.name,
28
28
  customLabel: i,
29
- imageUrl: o.imageUrl,
30
- imageUrlAlt: o.imageUrlAlt,
31
- type: (o == null ? void 0 : o.type) || _,
29
+ imageUrl: e.imageUrl,
30
+ imageUrlAlt: e.imageUrlAlt,
31
+ type: (e == null ? void 0 : e.type) || _,
32
32
  size: c,
33
33
  outline: !0
34
34
  }
35
- ) }, o.name);
35
+ ) }, e.name);
36
36
  }) });
37
37
  };
38
38
  export {
@@ -1,6 +1,6 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { c as p } from "../../index-L8X2o7IH.js";
3
- import '../../assets/ButtonBase.css';const b = "_button_1pg7d_1", d = {
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { c as i } from "../../index-L8X2o7IH.js";
3
+ import '../../assets/ButtonBase.css';const b = "_button_1p2ap_1", l = {
4
4
  button: b
5
5
  }, _ = ({
6
6
  as: o,
@@ -12,8 +12,8 @@ import '../../assets/ButtonBase.css';const b = "_button_1pg7d_1", d = {
12
12
  selected: r,
13
13
  variant: c,
14
14
  tabIndex: m = 0,
15
- ...u
16
- }) => /* @__PURE__ */ i(
15
+ ...p
16
+ }) => /* @__PURE__ */ u(
17
17
  o || "button",
18
18
  {
19
19
  tabIndex: m,
@@ -23,8 +23,8 @@ import '../../assets/ButtonBase.css';const b = "_button_1pg7d_1", d = {
23
23
  "aria-selected": r,
24
24
  "aria-disabled": t,
25
25
  disabled: t,
26
- className: p(d.button, n),
27
- ...u,
26
+ className: i(l.button, n),
27
+ ...p,
28
28
  children: s
29
29
  }
30
30
  );
@@ -1,8 +1,10 @@
1
1
  import { DropdownPlacement, MenuItemProps, MenuItemGroups } from '../';
2
+ import { ContextMenuSize } from './ContextMenuBase';
2
3
  export interface ContextMenuProps {
3
4
  id: string;
4
5
  items: MenuItemProps[];
5
6
  placement?: DropdownPlacement;
7
+ size?: ContextMenuSize;
6
8
  groups?: MenuItemGroups;
7
9
  }
8
- export declare const ContextMenu: ({ id, placement, groups, items }: ContextMenuProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const ContextMenu: ({ id, placement, size, groups, items, }: ContextMenuProps) => import("react/jsx-runtime").JSX.Element;
@@ -3,13 +3,19 @@ import { jsx as o } from "react/jsx-runtime";
3
3
  import "../../index-L8X2o7IH.js";
4
4
  import "../Icon/SvgIcon.js";
5
5
  import "react";
6
- import { MenuItems as p } from "../Menu/MenuItems.js";
7
- import { useRootContext as u } from "../RootProvider/RootProvider.js";
8
- import { ContextMenuBase as s } from "./ContextMenuBase.js";
9
- const I = ({ id: t = "context-menu", placement: e = "right", groups: r = {}, items: n }) => {
10
- const { currentId: m, toggleId: i } = u();
11
- return /* @__PURE__ */ o(s, { placement: e, expanded: m === t, onToggle: () => i(t), children: /* @__PURE__ */ o(p, { groups: r, items: n }) });
6
+ import { MenuItems as u } from "../Menu/MenuItems.js";
7
+ import { useRootContext as s } from "../RootProvider/RootProvider.js";
8
+ import { ContextMenuBase as x } from "./ContextMenuBase.js";
9
+ const M = ({
10
+ id: t = "context-menu",
11
+ placement: e = "right",
12
+ size: r,
13
+ groups: n = {},
14
+ items: m
15
+ }) => {
16
+ const { currentId: i, toggleId: p } = s();
17
+ return /* @__PURE__ */ o(x, { size: r, placement: e, expanded: i === t, onToggle: () => p(t), children: /* @__PURE__ */ o(u, { groups: n, items: m }) });
12
18
  };
13
19
  export {
14
- I as ContextMenu
20
+ M as ContextMenu
15
21
  };
@@ -1,9 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { DropdownPlacement } from '../';
3
+ export type ContextMenuSize = 'sm' | 'md';
3
4
  export interface ContextMenuBaseProps {
4
5
  placement: DropdownPlacement;
5
6
  expanded: boolean;
7
+ size?: ContextMenuSize;
6
8
  onToggle?: () => void;
7
9
  children?: ReactNode;
8
10
  }
9
- export declare const ContextMenuBase: ({ placement, expanded, onToggle, children, }: ContextMenuBaseProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const ContextMenuBase: ({ size, placement, expanded, onToggle, children, }: ContextMenuBaseProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,35 +1,36 @@
1
- import { jsxs as i, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "../Icon/SvgIcon.js";
4
4
  import "react";
5
- import { IconButton as a } from "../Button/IconButton.js";
5
+ import { IconButton as c } from "../Button/IconButton.js";
6
6
  import "../RootProvider/RootProvider.js";
7
- import { DropdownBase as c } from "../Dropdown/DropdownBase.js";
8
- import '../../assets/ContextMenuBase.css';const m = "_toggle_ya7jy_1", l = "_button_ya7jy_5", d = "_icon_ya7jy_14", p = "_dropdown_ya7jy_18", o = {
9
- toggle: m,
10
- button: l,
11
- icon: d,
12
- dropdown: p
13
- }, b = ({
14
- placement: n = "right",
7
+ import { DropdownBase as m } from "../Dropdown/DropdownBase.js";
8
+ import '../../assets/ContextMenuBase.css';const l = "_toggle_ya7jy_1", d = "_button_ya7jy_5", p = "_icon_ya7jy_14", _ = "_dropdown_ya7jy_18", o = {
9
+ toggle: l,
10
+ button: d,
11
+ icon: p,
12
+ dropdown: _
13
+ }, f = ({
14
+ size: n = "sm",
15
+ placement: r = "right",
15
16
  expanded: e = !1,
16
- onToggle: r,
17
- children: s
18
- }) => /* @__PURE__ */ i("div", { className: o.toggle, "data-theme": "neutral", children: [
17
+ onToggle: s,
18
+ children: i
19
+ }) => /* @__PURE__ */ a("div", { className: o.toggle, "data-theme": "neutral", children: [
19
20
  /* @__PURE__ */ t(
20
- a,
21
+ c,
21
22
  {
22
23
  className: o.button,
23
- size: "sm",
24
+ size: n,
24
25
  icon: "menu-elipsis-horizontal",
25
26
  iconSize: "md",
26
27
  variant: "text",
27
28
  color: "secondary",
28
- onClick: r
29
+ onClick: s
29
30
  }
30
31
  ),
31
- /* @__PURE__ */ t(c, { className: o.dropdown, placement: n, expanded: e, children: s })
32
+ /* @__PURE__ */ t(m, { className: o.dropdown, placement: r, expanded: e, children: i })
32
33
  ] });
33
34
  export {
34
- b as ContextMenuBase
35
+ f as ContextMenuBase
35
36
  };
@@ -44,7 +44,7 @@ export interface DialogProps {
44
44
  /** Activity Log */
45
45
  activityLog?: DialogActivityLogProps;
46
46
  /** More information about the dialog, process, etc. */
47
- additionalInfo?: string;
47
+ additionalInfo?: ReactNode;
48
48
  /** History */
49
49
  history?: DialogHistoryProps;
50
50
  }
@@ -1,64 +1,55 @@
1
- import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
- import { MetaBase as j } from "../Meta/MetaBase.js";
1
+ import { jsxs as m, jsx as o } from "react/jsx-runtime";
2
+ import { MetaBase as c } from "../Meta/MetaBase.js";
3
3
  import "../../index-L8X2o7IH.js";
4
4
  import "../Icon/SvgIcon.js";
5
- import { DialogActivityLog as v } from "./DialogActivityLog.js";
6
- import { DialogArticleBase as H } from "./DialogArticleBase.js";
7
- import { DialogAttachments as S } from "./DialogAttachments.js";
8
- import { DialogBase as B } from "./DialogBase.js";
9
- import { DialogBodyBase as C } from "./DialogBodyBase.js";
10
- import { DialogContent as E } from "./DialogContent.js";
5
+ import { DialogActivityLog as j } from "./DialogActivityLog.js";
6
+ import { DialogArticleBase as v } from "./DialogArticleBase.js";
7
+ import { DialogAttachments as y } from "./DialogAttachments.js";
8
+ import { DialogBase as H } from "./DialogBase.js";
9
+ import { DialogBodyBase as S } from "./DialogBodyBase.js";
10
+ import { DialogContent as C } from "./DialogContent.js";
11
11
  import { DialogFooter as F } from "./DialogFooter.js";
12
12
  import { DialogHeader as M } from "./DialogHeader.js";
13
13
  import { DialogSeenBy as N } from "./DialogSeenBy.js";
14
- import { DialogActions as U } from "./DialogActions.js";
15
- import { DialogHistory as b } from "./DialogHistory.js";
16
- import { DialogNav as k } from "./DialogNav.js";
17
- const Z = ({
18
- backButton: e,
14
+ import { DialogActions as b } from "./DialogActions.js";
15
+ import { DialogHistory as k } from "./DialogHistory.js";
16
+ import { DialogNav as q } from "./DialogNav.js";
17
+ const Y = ({
18
+ backButton: a,
19
19
  menu: f,
20
20
  updatedAt: g,
21
21
  updatedAtLabel: D,
22
- dueAt: d,
23
- dueAtLabel: h,
24
- status: A,
25
- title: n,
26
- sender: s,
27
- recipient: u,
28
- summary: x = "Summary.",
29
- body: c,
30
- actions: m = [],
31
- attachments: t,
32
- history: l,
33
- seenBy: o,
34
- activityLog: p,
35
- additionalInfo: a
36
- }) => /* @__PURE__ */ i(B, { children: [
37
- /* @__PURE__ */ r(k, { status: A, dueAt: d, dueAtLabel: h, backButton: e, menu: f }),
38
- /* @__PURE__ */ i(H, { children: [
39
- /* @__PURE__ */ r(
40
- M,
41
- {
42
- title: n,
43
- sender: s,
44
- recipient: u,
45
- seen: (o == null ? void 0 : o.seenByEndUser) ?? !1,
46
- variant: "neutral"
47
- }
48
- ),
49
- /* @__PURE__ */ i(C, { children: [
50
- /* @__PURE__ */ r(E, { updatedAt: g, updatedAtLabel: D, summary: x, body: c }),
51
- t && /* @__PURE__ */ r(S, { ...t }),
52
- (m == null ? void 0 : m.length) > 0 && /* @__PURE__ */ r(U, { items: m }),
53
- /* @__PURE__ */ i(j, { children: [
54
- o && /* @__PURE__ */ r(N, { ...o }),
55
- p && /* @__PURE__ */ r(v, { ...p })
22
+ dueAt: n,
23
+ dueAtLabel: s,
24
+ status: B,
25
+ title: d,
26
+ sender: h,
27
+ recipient: A,
28
+ summary: u = "Summary.",
29
+ body: x,
30
+ actions: r = [],
31
+ attachments: i,
32
+ history: t,
33
+ seenBy: e,
34
+ activityLog: l,
35
+ additionalInfo: p
36
+ }) => /* @__PURE__ */ m(H, { children: [
37
+ /* @__PURE__ */ o(q, { status: B, dueAt: n, dueAtLabel: s, backButton: a, menu: f }),
38
+ /* @__PURE__ */ m(v, { children: [
39
+ /* @__PURE__ */ o(M, { title: d, sender: h, recipient: A, seen: !1, variant: "neutral" }),
40
+ /* @__PURE__ */ m(S, { children: [
41
+ /* @__PURE__ */ o(C, { updatedAt: g, updatedAtLabel: D, summary: u, body: x }),
42
+ i && /* @__PURE__ */ o(y, { ...i }),
43
+ (r == null ? void 0 : r.length) > 0 && /* @__PURE__ */ o(b, { items: r }),
44
+ /* @__PURE__ */ m(c, { children: [
45
+ e && /* @__PURE__ */ o(N, { ...e }),
46
+ l && /* @__PURE__ */ o(j, { ...l })
56
47
  ] })
57
48
  ] }),
58
- a && /* @__PURE__ */ r(F, { additionalInfo: a }),
59
- l && /* @__PURE__ */ r(b, { ...l })
49
+ p && /* @__PURE__ */ o(F, { additionalInfo: p }),
50
+ t && /* @__PURE__ */ o(k, { ...t })
60
51
  ] })
61
52
  ] });
62
53
  export {
63
- Z as Dialog
54
+ Y as Dialog
64
55
  };