@altinn/altinn-components 0.7.1 → 0.7.2
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/DialogBorder.css +1 -1
- package/dist/assets/DialogHeadings.css +1 -1
- package/dist/assets/DialogListItem.css +1 -1
- package/dist/assets/DialogSummary.css +1 -0
- package/dist/assets/HeaderButton.css +1 -1
- package/dist/assets/ListItemBase.css +1 -1
- package/dist/assets/ListItemLabel.css +1 -1
- package/dist/assets/MenuItemBase.css +1 -1
- package/dist/assets/MenuSearch.css +1 -1
- package/dist/assets/Skeleton.css +1 -0
- package/dist/assets/ToolbarSearch.css +1 -1
- package/dist/components/Dialog/DialogActions.d.ts +1 -2
- package/dist/components/Dialog/DialogBorder.d.ts +2 -1
- package/dist/components/Dialog/DialogBorder.js +6 -6
- package/dist/components/Dialog/DialogHeadings.d.ts +2 -1
- package/dist/components/Dialog/DialogHeadings.js +37 -32
- package/dist/components/Dialog/DialogListItem.d.ts +3 -1
- package/dist/components/Dialog/DialogListItem.js +72 -68
- package/dist/components/Dialog/DialogListItem.stories.js +40 -34
- package/dist/components/Dialog/DialogMetadata.d.ts +3 -1
- package/dist/components/Dialog/DialogMetadata.js +26 -25
- package/dist/components/Dialog/DialogStatus.d.ts +2 -1
- package/dist/components/Dialog/DialogStatus.js +11 -9
- package/dist/components/Dialog/DialogSummary.d.ts +12 -0
- package/dist/components/Dialog/DialogSummary.js +8 -0
- package/dist/components/Dialog/DialogTitle.d.ts +2 -1
- package/dist/components/Dialog/DialogTitle.js +10 -9
- package/dist/components/Dialog/DialogTouchedBy.d.ts +2 -1
- package/dist/components/Dialog/DialogTouchedBy.js +4 -4
- package/dist/components/GlobalMenu/AccountButton.js +1 -1
- package/dist/components/GlobalMenu/AccountMenu.js +16 -15
- package/dist/components/Header/Header.d.ts +3 -1
- package/dist/components/Header/Header.js +30 -29
- package/dist/components/Header/HeaderButton.d.ts +3 -1
- package/dist/components/Header/HeaderButton.js +37 -29
- package/dist/components/Header/HeaderButton.stories.js +10 -6
- package/dist/components/List/ListItem.js +32 -36
- package/dist/components/List/ListItem.stories.js +41 -36
- package/dist/components/List/ListItemBase.d.ts +12 -12
- package/dist/components/List/ListItemBase.js +45 -43
- package/dist/components/List/ListItemHeader.d.ts +14 -2
- package/dist/components/List/ListItemHeader.js +29 -6
- package/dist/components/List/ListItemLabel.d.ts +2 -1
- package/dist/components/List/ListItemLabel.js +10 -9
- package/dist/components/List/ListItemMedia.d.ts +2 -1
- package/dist/components/List/ListItemMedia.js +23 -21
- package/dist/components/Menu/MenuItem.d.ts +7 -8
- package/dist/components/Menu/MenuItem.js +35 -21
- package/dist/components/Menu/MenuItem.stories.js +37 -35
- package/dist/components/Menu/MenuItemBase.d.ts +15 -13
- package/dist/components/Menu/MenuItemBase.js +59 -57
- package/dist/components/Menu/MenuSearch.d.ts +2 -1
- package/dist/components/Menu/MenuSearch.js +39 -19
- package/dist/components/Menu/MenuSearch.stories.js +10 -7
- package/dist/components/Meta/MetaItem.d.ts +2 -1
- package/dist/components/Meta/MetaItem.js +9 -8
- package/dist/components/Meta/MetaTimestamp.d.ts +2 -1
- package/dist/components/Meta/MetaTimestamp.js +14 -6
- package/dist/components/Searchbar/AutocompleteItem.js +10 -10
- package/dist/components/Skeleton/Skeleton.d.ts +11 -0
- package/dist/components/Skeleton/Skeleton.js +9 -0
- package/dist/components/Skeleton/index.d.ts +1 -0
- package/dist/components/Skeleton/index.js +4 -0
- package/dist/components/Toolbar/Toolbar.js +1 -1
- package/dist/components/Toolbar/ToolbarSearch.d.ts +2 -1
- package/dist/components/Toolbar/ToolbarSearch.js +38 -18
- package/dist/components/Toolbar/ToolbarSearch.stories.js +8 -5
- package/package.json +1 -1
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as n, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { fn as i } from "@storybook/test";
|
|
3
|
+
import { LayoutBase as l } from "../Layout/LayoutBase.js";
|
|
3
4
|
import "../../index-L8X2o7IH.js";
|
|
4
5
|
import "react";
|
|
5
6
|
import "../Icon/SvgIcon.js";
|
|
6
7
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { MetaItem as
|
|
8
|
+
import { MetaItem as p } from "../Meta/MetaItem.js";
|
|
8
9
|
import { MenuItem as o } from "./MenuItem.js";
|
|
9
|
-
import { MenuBase as
|
|
10
|
-
const
|
|
10
|
+
import { MenuBase as m } from "./MenuBase.js";
|
|
11
|
+
const v = {
|
|
11
12
|
title: "Menu/MenuItem",
|
|
12
13
|
component: o,
|
|
13
14
|
tags: ["autodocs"],
|
|
14
15
|
parameters: {},
|
|
15
16
|
args: {
|
|
16
|
-
id: "inbox"
|
|
17
|
+
id: "inbox",
|
|
18
|
+
onClick: i()
|
|
17
19
|
}
|
|
18
|
-
},
|
|
20
|
+
}, I = {
|
|
19
21
|
args: {
|
|
20
22
|
icon: "inbox",
|
|
21
23
|
title: "Innboks"
|
|
22
24
|
}
|
|
23
|
-
},
|
|
25
|
+
}, A = {
|
|
24
26
|
args: {
|
|
25
27
|
icon: "inbox",
|
|
26
28
|
title: "Innboks",
|
|
@@ -28,14 +30,14 @@ const h = {
|
|
|
28
30
|
label: "4"
|
|
29
31
|
}
|
|
30
32
|
}
|
|
31
|
-
},
|
|
33
|
+
}, C = {
|
|
32
34
|
args: {
|
|
33
35
|
size: "lg",
|
|
34
36
|
icon: "inbox",
|
|
35
37
|
title: "Innboks",
|
|
36
38
|
color: "strong"
|
|
37
39
|
}
|
|
38
|
-
},
|
|
40
|
+
}, G = {
|
|
39
41
|
args: {
|
|
40
42
|
size: "lg",
|
|
41
43
|
icon: "inbox",
|
|
@@ -46,7 +48,7 @@ const h = {
|
|
|
46
48
|
label: "4"
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
|
-
},
|
|
51
|
+
}, c = {
|
|
50
52
|
args: {
|
|
51
53
|
avatar: {
|
|
52
54
|
type: "person",
|
|
@@ -54,7 +56,7 @@ const h = {
|
|
|
54
56
|
},
|
|
55
57
|
title: "Eirik Horneland"
|
|
56
58
|
}
|
|
57
|
-
},
|
|
59
|
+
}, M = {
|
|
58
60
|
args: {
|
|
59
61
|
avatarGroup: {
|
|
60
62
|
items: [
|
|
@@ -74,7 +76,7 @@ const h = {
|
|
|
74
76
|
},
|
|
75
77
|
title: "3 personer"
|
|
76
78
|
}
|
|
77
|
-
},
|
|
79
|
+
}, g = {
|
|
78
80
|
args: {
|
|
79
81
|
avatar: {
|
|
80
82
|
type: "company",
|
|
@@ -82,7 +84,7 @@ const h = {
|
|
|
82
84
|
},
|
|
83
85
|
title: "Sportsklubben Brann"
|
|
84
86
|
}
|
|
85
|
-
},
|
|
87
|
+
}, z = {
|
|
86
88
|
args: {
|
|
87
89
|
avatarGroup: {
|
|
88
90
|
defaultType: "company",
|
|
@@ -100,36 +102,36 @@ const h = {
|
|
|
100
102
|
},
|
|
101
103
|
title: "3 virksomheter"
|
|
102
104
|
}
|
|
103
|
-
},
|
|
105
|
+
}, H = {
|
|
104
106
|
args: {
|
|
105
|
-
...
|
|
107
|
+
...c.args,
|
|
106
108
|
size: "lg",
|
|
107
109
|
description: "Født: XX.XX.XXXX"
|
|
108
110
|
}
|
|
109
|
-
},
|
|
111
|
+
}, S = {
|
|
110
112
|
args: {
|
|
111
|
-
...
|
|
113
|
+
...g.args,
|
|
112
114
|
size: "lg",
|
|
113
115
|
description: "Org nr.: XX.XX.XXXX"
|
|
114
116
|
}
|
|
115
|
-
},
|
|
117
|
+
}, E = () => {
|
|
116
118
|
const t = ["global", "neutral", "company", "person", "global-dark"], a = ["neutral", "subtle", "strong", "company", "person"];
|
|
117
|
-
return /* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
-
] }, r)) }) }) },
|
|
119
|
+
return /* @__PURE__ */ n("div", { style: { display: "flex", width: "100%" }, children: t.map((e) => /* @__PURE__ */ n("div", { style: { flexGrow: 1 }, children: /* @__PURE__ */ n(l, { theme: e, children: /* @__PURE__ */ n(m, { children: a.map((r) => /* @__PURE__ */ s("div", { children: [
|
|
120
|
+
/* @__PURE__ */ n(o, { icon: "inbox", title: "Title", color: r, id: "inbox" }),
|
|
121
|
+
/* @__PURE__ */ n(p, { children: e + "/" + r })
|
|
122
|
+
] }, r)) }) }) }, e)) });
|
|
121
123
|
};
|
|
122
124
|
export {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
125
|
+
G as AlertBadge,
|
|
126
|
+
g as Company,
|
|
127
|
+
S as CompanyAccount,
|
|
128
|
+
z as CompanyGroup,
|
|
129
|
+
I as Default,
|
|
130
|
+
A as DefaultBadge,
|
|
131
|
+
C as Large,
|
|
132
|
+
c as Person,
|
|
133
|
+
H as PersonAccount,
|
|
134
|
+
M as PersonGroup,
|
|
135
|
+
E as ThemesAndColors,
|
|
136
|
+
v as default
|
|
135
137
|
};
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import { ElementType,
|
|
1
|
+
import { ElementType, KeyboardEventHandler, ReactNode } from 'react';
|
|
2
2
|
import { BadgeProps } from '../Badge';
|
|
3
3
|
import { IconName } from '../Icon';
|
|
4
|
-
export type MenuItemColor = 'neutral' | 'subtle' | 'strong' | 'company' | 'person';
|
|
5
4
|
export type MenuItemSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
export type MenuItemColor = 'neutral' | 'subtle' | 'strong' | 'company' | 'person';
|
|
6
6
|
export interface MenuItemBaseProps {
|
|
7
7
|
as?: ElementType;
|
|
8
|
-
|
|
8
|
+
size?: MenuItemSize;
|
|
9
9
|
color?: MenuItemColor;
|
|
10
|
-
|
|
10
|
+
className?: string;
|
|
11
|
+
href?: string;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
onKeyPress?: KeyboardEventHandler;
|
|
11
14
|
tabIndex?: number;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
linkText?: string;
|
|
15
|
-
badge?: BadgeProps;
|
|
16
|
-
collapsible?: boolean;
|
|
15
|
+
hidden?: boolean;
|
|
16
|
+
disabled?: boolean;
|
|
17
17
|
active?: boolean;
|
|
18
|
-
expanded?: boolean;
|
|
19
18
|
selected?: boolean;
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
expanded?: boolean;
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
badge?: BadgeProps;
|
|
22
|
+
linkIcon?: IconName;
|
|
23
|
+
linkText?: string;
|
|
22
24
|
}
|
|
23
|
-
export declare const MenuItemBase: ({ as,
|
|
25
|
+
export declare const MenuItemBase: ({ as, size, color, className, href, onClick, onKeyPress, tabIndex, hidden, disabled, active, selected, expanded, linkIcon, linkText, badge, children, }: MenuItemBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,61 +1,63 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { Badge as
|
|
4
|
-
import { Icon as
|
|
1
|
+
import { jsxs as i, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { c as N } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import { Badge as u } from "../Badge/Badge.js";
|
|
4
|
+
import { Icon as v } from "../Icon/Icon.js";
|
|
5
5
|
import "../Icon/SvgIcon.js";
|
|
6
|
-
import '../../assets/MenuItemBase.css';const
|
|
7
|
-
item:
|
|
8
|
-
content:
|
|
9
|
-
action:
|
|
10
|
-
linkText:
|
|
6
|
+
import '../../assets/MenuItemBase.css';const T = "_item_y1gbn_1", j = "_content_y1gbn_37", B = "_action_y1gbn_45", k = "_linkText_y1gbn_52", z = "_linkIcon_y1gbn_57", E = "_media_y1gbn_77", t = {
|
|
7
|
+
item: T,
|
|
8
|
+
content: j,
|
|
9
|
+
action: B,
|
|
10
|
+
linkText: k,
|
|
11
11
|
linkIcon: z,
|
|
12
|
-
media:
|
|
13
|
-
},
|
|
14
|
-
as:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
tabIndex:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
selected:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
12
|
+
media: E
|
|
13
|
+
}, G = ({
|
|
14
|
+
as: d,
|
|
15
|
+
size: _,
|
|
16
|
+
color: l,
|
|
17
|
+
className: p,
|
|
18
|
+
href: x,
|
|
19
|
+
onClick: n,
|
|
20
|
+
onKeyPress: a,
|
|
21
|
+
tabIndex: f = 0,
|
|
22
|
+
hidden: b,
|
|
23
|
+
disabled: o = !1,
|
|
24
|
+
active: g = !1,
|
|
25
|
+
selected: h = !1,
|
|
26
|
+
expanded: y = !1,
|
|
27
|
+
linkIcon: e,
|
|
28
|
+
linkText: m,
|
|
29
|
+
badge: s,
|
|
30
|
+
children: I
|
|
31
|
+
}) => /* @__PURE__ */ i(
|
|
32
|
+
d || "a",
|
|
33
|
+
{
|
|
34
|
+
role: "menuitem",
|
|
35
|
+
tabIndex: o ? "-1" : f ?? 0,
|
|
36
|
+
className: N(t.item, p),
|
|
37
|
+
"data-size": _,
|
|
38
|
+
"data-color": l,
|
|
39
|
+
"data-active": g,
|
|
40
|
+
"aria-hidden": b,
|
|
41
|
+
"aria-expanded": y,
|
|
42
|
+
"aria-disabled": o,
|
|
43
|
+
"aria-selected": h,
|
|
44
|
+
href: x,
|
|
45
|
+
onKeyPress: (r) => {
|
|
46
|
+
r.key === "Enter" && (n == null || n()), a == null || a(r);
|
|
47
|
+
},
|
|
48
|
+
onClick: n,
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ i("div", { className: t.content, children: [
|
|
51
|
+
I,
|
|
52
|
+
s && /* @__PURE__ */ c(u, { ...s })
|
|
53
|
+
] }),
|
|
54
|
+
e && /* @__PURE__ */ i("div", { className: t.action, children: [
|
|
55
|
+
m && /* @__PURE__ */ c("span", { className: t.linkText, children: m }),
|
|
56
|
+
e && /* @__PURE__ */ c(v, { name: e, className: t.linkIcon })
|
|
57
|
+
] })
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
);
|
|
59
61
|
export {
|
|
60
|
-
|
|
62
|
+
G as MenuItemBase
|
|
61
63
|
};
|
|
@@ -4,5 +4,6 @@ export interface MenuSearchProps {
|
|
|
4
4
|
name: string;
|
|
5
5
|
value: string;
|
|
6
6
|
onChange: ChangeEventHandler;
|
|
7
|
+
onClear?: () => void;
|
|
7
8
|
}
|
|
8
|
-
export declare const MenuSearch: ({ value, name, placeholder, onChange }: MenuSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const MenuSearch: ({ value, name, placeholder, onChange, onClear }: MenuSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,21 +1,41 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { jsxs as m, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { Icon as r } from "../Icon/Icon.js";
|
|
3
|
+
import "../Icon/SvgIcon.js";
|
|
4
|
+
import "../../index-L8X2o7IH.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { IconButton as a } from "../Button/IconButton.js";
|
|
7
|
+
import "../RootProvider/RootProvider.js";
|
|
8
|
+
import '../../assets/MenuSearch.css';const l = "_field_mo7y9_1", p = "_icon_mo7y9_5", _ = "_input_mo7y9_14", f = "_clear_mo7y9_31", o = {
|
|
9
|
+
field: l,
|
|
10
|
+
icon: p,
|
|
11
|
+
input: _,
|
|
12
|
+
clear: f
|
|
13
|
+
}, k = ({ value: t, name: n, placeholder: s = "Søk", onChange: e, onClear: c }) => /* @__PURE__ */ m("div", { className: o.field, children: [
|
|
14
|
+
/* @__PURE__ */ i(
|
|
15
|
+
"input",
|
|
16
|
+
{
|
|
17
|
+
type: "search",
|
|
18
|
+
value: t,
|
|
19
|
+
name: n,
|
|
20
|
+
placeholder: s,
|
|
21
|
+
className: o.input,
|
|
22
|
+
onChange: e,
|
|
23
|
+
autoComplete: "off"
|
|
24
|
+
}
|
|
25
|
+
),
|
|
26
|
+
/* @__PURE__ */ i(r, { name: "magnifying-glass", className: o.icon }),
|
|
27
|
+
c && /* @__PURE__ */ i(
|
|
28
|
+
a,
|
|
29
|
+
{
|
|
30
|
+
icon: "x-mark",
|
|
31
|
+
color: "secondary",
|
|
32
|
+
variant: "solid",
|
|
33
|
+
size: "custom",
|
|
34
|
+
className: o.clear,
|
|
35
|
+
onClick: c
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
] });
|
|
19
39
|
export {
|
|
20
|
-
|
|
40
|
+
k as MenuSearch
|
|
21
41
|
};
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { fn as e } from "@storybook/test";
|
|
2
|
+
import { MenuSearch as t } from "./MenuSearch.js";
|
|
3
|
+
const r = {
|
|
3
4
|
title: "Menu/MenuSearch",
|
|
4
|
-
component:
|
|
5
|
+
component: t,
|
|
5
6
|
tags: ["autodocs"],
|
|
6
7
|
parameters: {},
|
|
7
8
|
args: {}
|
|
8
|
-
},
|
|
9
|
-
args: {
|
|
9
|
+
}, n = {
|
|
10
|
+
args: {
|
|
11
|
+
onClear: e()
|
|
12
|
+
}
|
|
10
13
|
};
|
|
11
14
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
n as Default,
|
|
16
|
+
r as default
|
|
14
17
|
};
|
|
@@ -2,6 +2,7 @@ import { ElementType, ReactNode } from 'react';
|
|
|
2
2
|
import { IconName } from '../Icon';
|
|
3
3
|
import { MetaItemSize, MetaItemVariant } from './MetaItemBase';
|
|
4
4
|
export interface MetaItemProps {
|
|
5
|
+
loading?: boolean;
|
|
5
6
|
/** Render as element */
|
|
6
7
|
as?: ElementType;
|
|
7
8
|
/** Meta size */
|
|
@@ -15,4 +16,4 @@ export interface MetaItemProps {
|
|
|
15
16
|
/** classname */
|
|
16
17
|
className?: string;
|
|
17
18
|
}
|
|
18
|
-
export declare const MetaItem: ({ size, variant, icon, children, ...rest }: MetaItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const MetaItem: ({ loading, size, variant, icon, children, ...rest }: MetaItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
|
|
1
|
+
import { jsx as e, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import { Skeleton as M } from "../Skeleton/Skeleton.js";
|
|
3
|
+
import { MetaItemBase as a } from "./MetaItemBase.js";
|
|
4
|
+
import { MetaItemLabel as s } from "./MetaItemLabel.js";
|
|
5
|
+
import { MetaItemMedia as I } from "./MetaItemMedia.js";
|
|
6
|
+
const j = ({ loading: m, size: t = "xs", variant: r = "text", icon: o, children: p, ...f }) => /* @__PURE__ */ e(a, { variant: r, size: t, ...f, children: /* @__PURE__ */ x(M, { loading: m, children: [
|
|
7
|
+
!m && o && /* @__PURE__ */ e(I, { size: t, icon: o }),
|
|
8
|
+
/* @__PURE__ */ e(s, { variant: r, size: t, children: p })
|
|
9
|
+
] }) });
|
|
9
10
|
export {
|
|
10
11
|
j as MetaItem
|
|
11
12
|
};
|
|
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { IconName } from '../Icon';
|
|
3
3
|
import { MetaItemSize, MetaItemVariant } from './MetaItemBase';
|
|
4
4
|
export interface MetaTimestampProps {
|
|
5
|
+
loading?: boolean;
|
|
5
6
|
/** Meta size */
|
|
6
7
|
size?: MetaItemSize;
|
|
7
8
|
/** Variant */
|
|
@@ -13,4 +14,4 @@ export interface MetaTimestampProps {
|
|
|
13
14
|
/** Label */
|
|
14
15
|
children?: ReactNode;
|
|
15
16
|
}
|
|
16
|
-
export declare const MetaTimestamp: ({ size, variant, datetime, icon, children }: MetaTimestampProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const MetaTimestamp: ({ loading, size, variant, datetime, icon, children, }: MetaTimestampProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { Skeleton as f } from "../Skeleton/Skeleton.js";
|
|
3
|
+
import { MetaItemBase as i } from "./MetaItemBase.js";
|
|
3
4
|
import { MetaItemLabel as x } from "./MetaItemLabel.js";
|
|
4
5
|
import { MetaItemMedia as M } from "./MetaItemMedia.js";
|
|
5
|
-
const j = ({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const j = ({
|
|
7
|
+
loading: m,
|
|
8
|
+
size: t = "xs",
|
|
9
|
+
variant: r = "text",
|
|
10
|
+
datetime: p,
|
|
11
|
+
icon: o,
|
|
12
|
+
children: a
|
|
13
|
+
}) => /* @__PURE__ */ e(i, { as: "time", variant: r, datetime: p, size: t, children: /* @__PURE__ */ s(f, { loading: m, children: [
|
|
14
|
+
!m && o && /* @__PURE__ */ e(M, { size: t, icon: o }),
|
|
15
|
+
/* @__PURE__ */ e(x, { variant: r, size: t, children: a })
|
|
16
|
+
] }) });
|
|
9
17
|
export {
|
|
10
18
|
j as MetaTimestamp
|
|
11
19
|
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
4
|
import "../Icon/SvgIcon.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
6
|
import { DialogListItem as r } from "../Dialog/DialogListItem.js";
|
|
7
|
-
import { ListItem as
|
|
8
|
-
import { BookmarksListItem as
|
|
7
|
+
import { ListItem as n } from "../List/ListItem.js";
|
|
8
|
+
import { BookmarksListItem as i } from "../Bookmarks/BookmarksListItem.js";
|
|
9
9
|
import { ScopeListItem as e } from "./ScopeListItem.js";
|
|
10
|
-
const
|
|
10
|
+
const h = ({ type: m, ...t }) => {
|
|
11
11
|
switch (m) {
|
|
12
12
|
case "scope":
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ o(e, { ...t, shadow: "none", tabIndex: -1 });
|
|
14
14
|
case "information":
|
|
15
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ o(e, { ...t, shadow: "none", tabIndex: -1 });
|
|
16
16
|
case "bookmark":
|
|
17
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ o(i, { ...t, shadow: "none", size: "sm", tabIndex: -1 });
|
|
18
18
|
case "dialog":
|
|
19
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ o(r, { ...t, shadow: "none", size: "sm", tabIndex: -1 });
|
|
20
20
|
default:
|
|
21
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ o(n, { ...t, shadow: "none", size: "sm", tabIndex: -1 });
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
export {
|
|
25
|
-
|
|
25
|
+
h as AutocompleteItem
|
|
26
26
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type SkeletonVariant = 'circle' | 'text';
|
|
3
|
+
interface SkeletonProps {
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
variant?: SkeletonVariant;
|
|
6
|
+
size?: string;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const Skeleton: ({ loading, size, variant, className, children }: SkeletonProps) => string | number | boolean | Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { c as r } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import '../../assets/Skeleton.css';const f = "_skelaton_10sb8_1", l = "_fade_10sb8_1", c = {
|
|
4
|
+
skelaton: f,
|
|
5
|
+
fade: l
|
|
6
|
+
}, k = ({ loading: t = !1, size: s, variant: e = "text", className: o, children: a }) => t ? /* @__PURE__ */ n("span", { className: r(c.skelaton, o), "data-size": s, "data-loading": t, "data-variant": e, children: a }) : a;
|
|
7
|
+
export {
|
|
8
|
+
k as Skeleton
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Skeleton';
|
|
@@ -48,6 +48,7 @@ const Y = ({
|
|
|
48
48
|
};
|
|
49
49
|
return /* @__PURE__ */ V(z, { open: i === "toolbar", onClose: M, children: [
|
|
50
50
|
F && /* @__PURE__ */ c(G, { onToggle: () => t("menu", ""), expanded: (e == null ? void 0 : e.type) === "menu", ...F }),
|
|
51
|
+
T && /* @__PURE__ */ c(H, { ...T }),
|
|
51
52
|
L.map((o) => /* @__PURE__ */ c(
|
|
52
53
|
D,
|
|
53
54
|
{
|
|
@@ -84,7 +85,6 @@ const Y = ({
|
|
|
84
85
|
}))
|
|
85
86
|
}
|
|
86
87
|
),
|
|
87
|
-
T && /* @__PURE__ */ c(H, { ...T }),
|
|
88
88
|
N
|
|
89
89
|
] });
|
|
90
90
|
};
|
|
@@ -4,5 +4,6 @@ export interface ToolbarSearchProps {
|
|
|
4
4
|
name: string;
|
|
5
5
|
value: string;
|
|
6
6
|
onChange: ChangeEventHandler;
|
|
7
|
+
onClear?: () => void;
|
|
7
8
|
}
|
|
8
|
-
export declare const ToolbarSearch: ({ value, name, placeholder, onChange }: ToolbarSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const ToolbarSearch: ({ value, name, placeholder, onChange, onClear }: ToolbarSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,20 +1,40 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { jsxs as r, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { Icon as a } from "../Icon/Icon.js";
|
|
3
|
+
import "../Icon/SvgIcon.js";
|
|
4
|
+
import "../../index-L8X2o7IH.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { IconButton as l } from "../Button/IconButton.js";
|
|
7
|
+
import "../RootProvider/RootProvider.js";
|
|
8
|
+
import '../../assets/ToolbarSearch.css';const m = "_field_dvezx_1", p = "_icon_dvezx_5", d = "_input_dvezx_14", _ = "_clear_dvezx_30", o = {
|
|
9
|
+
field: m,
|
|
10
|
+
icon: p,
|
|
11
|
+
input: d,
|
|
12
|
+
clear: _
|
|
13
|
+
}, N = ({ value: e, name: n, placeholder: s = "Search", onChange: t, onClear: i }) => /* @__PURE__ */ r("div", { className: o.field, children: [
|
|
14
|
+
/* @__PURE__ */ c(
|
|
15
|
+
"input",
|
|
16
|
+
{
|
|
17
|
+
type: "search",
|
|
18
|
+
value: e,
|
|
19
|
+
name: n,
|
|
20
|
+
placeholder: s,
|
|
21
|
+
className: o.input,
|
|
22
|
+
onChange: t
|
|
23
|
+
}
|
|
24
|
+
),
|
|
25
|
+
/* @__PURE__ */ c(a, { name: "magnifying-glass", className: o.icon }),
|
|
26
|
+
i && /* @__PURE__ */ c(
|
|
27
|
+
l,
|
|
28
|
+
{
|
|
29
|
+
icon: "x-mark",
|
|
30
|
+
color: "secondary",
|
|
31
|
+
variant: "solid",
|
|
32
|
+
size: "custom",
|
|
33
|
+
className: o.clear,
|
|
34
|
+
onClick: i
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
] });
|
|
18
38
|
export {
|
|
19
|
-
|
|
39
|
+
N as ToolbarSearch
|
|
20
40
|
};
|