@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.
- package/dist/assets/DialogListItem.css +1 -1
- package/dist/assets/DrawerBody.css +1 -1
- package/dist/assets/DrawerOrDropdown.css +1 -1
- package/dist/assets/Header.css +1 -1
- package/dist/assets/Heading.css +1 -1
- package/dist/assets/MenuItemBase.css +1 -1
- package/dist/assets/MenuItemsVirtual.css +1 -1
- package/dist/assets/ScopeListItem.css +1 -1
- package/dist/components/Button/IconButton.js +9 -7
- package/dist/components/ContextMenu/ContextMenu.js +58 -43
- package/dist/components/Dialog/DialogList.js +13 -13
- package/dist/components/Dialog/DialogListItem.js +126 -104
- package/dist/components/Dropdown/DrawerBody.js +3 -3
- package/dist/components/Dropdown/DrawerOrDropdown.js +4 -4
- package/dist/components/Header/Header.js +42 -57
- package/dist/components/Header/LocaleButton.js +3 -2
- package/dist/components/Header/LocaleSwitcher.js +38 -23
- package/dist/components/Layout/Layout.js +27 -16
- package/dist/components/Layout/LayoutContent.js +4 -4
- package/dist/components/List/ListItem.js +39 -38
- package/dist/components/List/ListItemLabel.js +0 -2
- package/dist/components/Menu/MenuBase.js +9 -9
- package/dist/components/Menu/MenuItemBase.js +31 -27
- package/dist/components/Menu/MenuItems.js +43 -37
- package/dist/components/Menu/MenuItemsVirtual.js +9 -9
- package/dist/components/Searchbar/Autocomplete.js +23 -30
- package/dist/components/Searchbar/AutocompleteItem.js +10 -12
- package/dist/components/Searchbar/ScopeListItem.js +3 -3
- package/dist/components/Searchbar/Searchbar.js +4 -4
- package/dist/components/SkipLink/SkipLink.js +18 -0
- package/dist/components/SkipLink/index.js +4 -0
- package/dist/components/Typography/Heading.js +36 -30
- package/dist/components/Typography/Typography.js +34 -29
- package/dist/components/Typography/useHighlightedText.js +53 -0
- package/dist/hooks/useEnterKey.js +8 -8
- package/dist/hooks/useMenu.js +43 -28
- package/dist/types/lib/components/Button/IconButton.d.ts +2 -1
- package/dist/types/lib/components/Dialog/DialogList.d.ts +2 -1
- package/dist/types/lib/components/Dialog/DialogList.stories.d.ts +2 -1
- package/dist/types/lib/components/Dialog/DialogListItem.d.ts +3 -1
- package/dist/types/lib/components/Dropdown/DrawerOrDropdown.d.ts +1 -1
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +1 -0
- package/dist/types/lib/components/Header/LocaleButton.d.ts +2 -1
- package/dist/types/lib/components/Header/LocaleSwitcher.d.ts +2 -5
- package/dist/types/lib/components/Layout/Layout.d.ts +3 -1
- package/dist/types/lib/components/Layout/Layout.stories.d.ts +7 -1
- package/dist/types/lib/components/Layout/LayoutContent.d.ts +9 -2
- package/dist/types/lib/components/Menu/MenuBase.d.ts +4 -2
- package/dist/types/lib/components/Menu/MenuItem.d.ts +2 -1
- package/dist/types/lib/components/Menu/MenuItemBase.d.ts +3 -2
- package/dist/types/lib/components/Menu/MenuItems.d.ts +3 -1
- package/dist/types/lib/components/SkipLink/SkipLink.d.ts +9 -0
- package/dist/types/lib/components/SkipLink/SkipLink.stories.d.ts +15 -0
- package/dist/types/lib/components/SkipLink/index.d.ts +1 -0
- package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +1 -1
- package/dist/types/lib/components/Typography/Heading.d.ts +2 -1
- package/dist/types/lib/components/Typography/Heading.stories.d.ts +2 -1
- package/dist/types/lib/components/Typography/Typography.d.ts +2 -1
- package/dist/types/lib/components/Typography/Typography.stories.d.ts +2 -1
- package/dist/types/lib/components/Typography/useHighlightedText.d.ts +2 -0
- package/dist/types/lib/hooks/useEnterKey.d.ts +1 -1
- package/dist/types/lib/hooks/useMenu.d.ts +6 -2
- package/dist/types/lib/stories/Beta.stories.d.ts +11 -0
- package/dist/types/lib/stories/Inbox.stories.d.ts +1 -0
- package/package.json +1 -1
- package/dist/types/lib/components/Header/LocaleSwitcher.stories.d.ts +0 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
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
|
-
.
|
|
1
|
+
._body_oqhlu_1{width:100%;padding:0 .5em;overflow-y:visible}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
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}}
|
package/dist/assets/Header.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
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}
|
package/dist/assets/Heading.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
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
|
-
.
|
|
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
|
-
.
|
|
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
|
-
.
|
|
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
|
|
5
|
-
import { ButtonIcon as
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
33
|
+
onBlurCapture: f,
|
|
34
|
+
children: t && /* @__PURE__ */ o(B, { icon: t, size: e })
|
|
33
35
|
}
|
|
34
36
|
);
|
|
35
37
|
export {
|
|
36
|
-
|
|
38
|
+
g as IconButton
|
|
37
39
|
};
|
|
@@ -1,68 +1,83 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { c as
|
|
4
|
-
import * as
|
|
5
|
-
import { forwardRef as
|
|
6
|
-
import { IconButton as
|
|
7
|
-
import { useClickOutside as
|
|
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
|
|
10
|
-
import { useRootContext as
|
|
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
|
|
13
|
-
import '../../assets/ContextMenu.css';var
|
|
14
|
-
var
|
|
15
|
-
for (var t in e) Object.prototype.hasOwnProperty.call(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
|
-
|
|
19
|
-
return
|
|
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
|
|
22
|
-
var { title:
|
|
23
|
-
let
|
|
24
|
-
return
|
|
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:
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
}),
|
|
31
|
-
toggle:
|
|
32
|
-
},
|
|
31
|
+
}), B = "_toggle_nol5i_1", S = {
|
|
32
|
+
toggle: B
|
|
33
|
+
}, Q = ({
|
|
33
34
|
id: e = "context-menu",
|
|
34
|
-
ariaLabel:
|
|
35
|
-
placement:
|
|
35
|
+
ariaLabel: s,
|
|
36
|
+
placement: n = "right",
|
|
36
37
|
groups: t = {},
|
|
37
38
|
className: o,
|
|
38
|
-
items:
|
|
39
|
+
items: i
|
|
39
40
|
}) => {
|
|
40
|
-
const { currentId:
|
|
41
|
-
|
|
42
|
-
|
|
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
|
|
45
|
-
...
|
|
45
|
+
const b = k(() => i.map((r) => ({
|
|
46
|
+
...r,
|
|
47
|
+
tabIndex: -1,
|
|
46
48
|
onClick: () => {
|
|
47
|
-
var
|
|
48
|
-
(
|
|
49
|
+
var c;
|
|
50
|
+
(c = r.onClick) == null || c.call(r), a();
|
|
49
51
|
}
|
|
50
|
-
})), [
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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:
|
|
71
|
+
icon: A,
|
|
58
72
|
variant: "text",
|
|
59
|
-
onClick:
|
|
60
|
-
iconAltText:
|
|
73
|
+
onClick: x,
|
|
74
|
+
iconAltText: s || `Open ${e}`,
|
|
75
|
+
onBlurCapture: h
|
|
61
76
|
}
|
|
62
77
|
),
|
|
63
|
-
|
|
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
|
-
|
|
82
|
+
Q as ContextMenu
|
|
68
83
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
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
|
|
4
|
+
import { useMenu as d } from "../../hooks/useMenu.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { DialogListGroup as
|
|
7
|
-
import { DialogListItem as
|
|
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
|
|
10
|
-
const
|
|
11
|
-
const { menu: o } =
|
|
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__ */
|
|
19
|
-
const
|
|
20
|
-
return /* @__PURE__ */ r(
|
|
21
|
-
const
|
|
22
|
-
return /* @__PURE__ */ r(
|
|
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
|
-
|
|
27
|
+
v as DialogList
|
|
28
28
|
};
|
|
@@ -1,151 +1,173 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
1
|
+
import { jsx as a, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import {
|
|
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
|
|
8
|
-
import { DialogMetadata as
|
|
9
|
-
import { DialogByline as
|
|
10
|
-
import { MetaItem as
|
|
11
|
-
import { ListItemLabel as
|
|
12
|
-
import { ListItem as
|
|
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 = "
|
|
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:
|
|
18
|
-
header:
|
|
19
|
-
summary:
|
|
20
|
-
footer:
|
|
21
|
-
seenBy:
|
|
22
|
-
heading:
|
|
23
|
-
},
|
|
24
|
-
size:
|
|
25
|
-
state:
|
|
26
|
-
loading:
|
|
27
|
-
controls:
|
|
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:
|
|
31
|
-
sender:
|
|
32
|
-
recipient:
|
|
33
|
-
recipientLabel:
|
|
34
|
-
grouped:
|
|
35
|
-
updatedAt:
|
|
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:
|
|
39
|
-
archivedAtLabel:
|
|
37
|
+
archivedAt: L,
|
|
38
|
+
archivedAtLabel: M,
|
|
40
39
|
trashed: f,
|
|
41
|
-
trashedAt:
|
|
42
|
-
trashedAtLabel:
|
|
40
|
+
trashedAt: R,
|
|
41
|
+
trashedAtLabel: H,
|
|
43
42
|
badge: p,
|
|
44
|
-
dueAt:
|
|
45
|
-
dueAtLabel:
|
|
46
|
-
unread:
|
|
47
|
-
seenByLog:
|
|
48
|
-
draftsLabel:
|
|
49
|
-
sentCount:
|
|
50
|
-
receivedCount:
|
|
51
|
-
attachmentsCount:
|
|
52
|
-
attachmentsLabel:
|
|
53
|
-
title:
|
|
54
|
-
description:
|
|
55
|
-
summary:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
|
61
|
-
return
|
|
62
|
-
|
|
60
|
+
const x = m ? "tinted" : K;
|
|
61
|
+
return e === "xs" || e === "sm" ? /* @__PURE__ */ a(
|
|
62
|
+
u,
|
|
63
63
|
{
|
|
64
|
-
...
|
|
65
|
-
id:
|
|
66
|
-
size:
|
|
64
|
+
...v,
|
|
65
|
+
id: j,
|
|
66
|
+
size: e,
|
|
67
67
|
selected: m,
|
|
68
|
-
variant:
|
|
69
|
-
ariaLabel:
|
|
68
|
+
variant: x,
|
|
69
|
+
ariaLabel: i,
|
|
70
70
|
label: /* @__PURE__ */ a(
|
|
71
71
|
"div",
|
|
72
72
|
{
|
|
73
|
-
className:
|
|
74
|
-
"data-status":
|
|
73
|
+
className: r.border,
|
|
74
|
+
"data-status": o == null ? void 0 : o.value,
|
|
75
75
|
"data-selected": m,
|
|
76
|
-
"data-size":
|
|
77
|
-
"data-unread":
|
|
76
|
+
"data-size": e,
|
|
77
|
+
"data-unread": n,
|
|
78
78
|
"data-archived": h,
|
|
79
79
|
"data-trashed": f,
|
|
80
|
-
"data-loading":
|
|
81
|
-
children: /* @__PURE__ */ a(
|
|
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(
|
|
85
|
-
title:
|
|
84
|
+
badge: /* @__PURE__ */ a(y, { loading: t, sender: d, updatedAt: l, updatedAtLabel: _ }),
|
|
85
|
+
title: i
|
|
86
86
|
}
|
|
87
87
|
) : /* @__PURE__ */ a(
|
|
88
|
-
|
|
88
|
+
u,
|
|
89
89
|
{
|
|
90
|
-
...
|
|
91
|
-
id:
|
|
92
|
-
size:
|
|
90
|
+
...v,
|
|
91
|
+
id: j,
|
|
92
|
+
size: e,
|
|
93
93
|
selected: m,
|
|
94
|
-
variant:
|
|
95
|
-
controls: /* @__PURE__ */ a("div", { className:
|
|
96
|
-
title:
|
|
97
|
-
label: /* @__PURE__ */
|
|
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:
|
|
100
|
+
className: r.border,
|
|
101
101
|
"data-selected": m,
|
|
102
|
-
"data-status":
|
|
103
|
-
"data-size":
|
|
104
|
-
"data-unread":
|
|
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":
|
|
107
|
+
"data-loading": t,
|
|
108
108
|
children: [
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
/* @__PURE__ */ a(
|
|
112
|
-
|
|
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
|
-
|
|
126
|
+
P,
|
|
116
127
|
{
|
|
117
128
|
size: "xs",
|
|
118
|
-
loading:
|
|
119
|
-
sender:
|
|
120
|
-
recipient:
|
|
121
|
-
recipientLabel:
|
|
122
|
-
grouped:
|
|
129
|
+
loading: t,
|
|
130
|
+
sender: d,
|
|
131
|
+
recipient: w,
|
|
132
|
+
recipientLabel: I,
|
|
133
|
+
grouped: D
|
|
123
134
|
}
|
|
124
135
|
),
|
|
125
|
-
|
|
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
|
-
|
|
150
|
+
y,
|
|
129
151
|
{
|
|
130
|
-
className:
|
|
131
|
-
loading:
|
|
132
|
-
status:
|
|
133
|
-
draftsLabel:
|
|
134
|
-
sentCount:
|
|
135
|
-
receivedCount:
|
|
136
|
-
updatedAt:
|
|
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:
|
|
139
|
-
archivedAtLabel:
|
|
140
|
-
trashedAt:
|
|
141
|
-
trashedAtLabel:
|
|
142
|
-
dueAt:
|
|
143
|
-
dueAtLabel:
|
|
144
|
-
attachmentsCount:
|
|
145
|
-
attachmentsLabel:
|
|
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
|
-
|
|
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
|
-
|
|
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 = "
|
|
3
|
+
import '../../assets/DrawerBody.css';const c = "_body_oqhlu_1", d = {
|
|
4
4
|
body: c
|
|
5
|
-
},
|
|
5
|
+
}, m = ({ className: o, children: r }) => /* @__PURE__ */ s("div", { className: t(d.body, o), children: r });
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
m as DrawerBody
|
|
8
8
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
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 = "
|
|
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
|
|
21
|
+
}) => /* @__PURE__ */ s(c, { children: [
|
|
22
22
|
m && /* @__PURE__ */ o(d, { onClick: i }),
|
|
23
|
-
/* @__PURE__ */
|
|
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 }) })
|