@altinn/altinn-components 0.28.1 → 0.28.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/Button.css +1 -1
- package/dist/assets/ButtonBase.css +1 -1
- package/dist/assets/ButtonIcon.css +1 -1
- package/dist/assets/ComboButton.css +1 -1
- package/dist/assets/ListItemHeader.css +1 -1
- package/dist/components/Button/Button.js +49 -44
- package/dist/components/Button/ButtonBase.js +1 -1
- package/dist/components/Button/ButtonIcon.js +12 -8
- package/dist/components/Button/ComboButton.js +49 -33
- package/dist/components/Button/IconButton.js +28 -26
- package/dist/components/Header/HeaderButton.js +1 -1
- package/dist/components/Icon/Icon.js +21 -22
- package/dist/components/Icon/IconOrAvatar.js +12 -12
- package/dist/components/List/ListItemHeader.js +69 -62
- package/dist/components/List/ListItemLink.js +32 -32
- package/dist/components/Profile/AccountListItem.js +23 -21
- package/dist/types/lib/components/Button/Button.d.ts +5 -5
- package/dist/types/lib/components/Button/Button.stories.d.ts +2 -1
- package/dist/types/lib/components/Button/ButtonIcon.d.ts +5 -5
- package/dist/types/lib/components/Button/ButtonLabel.d.ts +2 -2
- package/dist/types/lib/components/Button/ComboButton.d.ts +6 -4
- package/dist/types/lib/components/Button/IconButton.d.ts +3 -4
- package/dist/types/lib/components/Icon/Icon.d.ts +1 -3
- package/dist/types/lib/components/List/ListItem.d.ts +24 -1
- package/dist/types/lib/components/List/ListItem.stories.d.ts +1 -1
- package/dist/types/lib/components/List/ListItemLink.d.ts +3 -5
- package/dist/types/lib/components/List/Specimens.stories.d.ts +1 -1
- package/dist/types/lib/components/Menu/MenuItem.d.ts +3 -3
- package/dist/types/lib/components/Profile/AccountListItem.d.ts +1 -1
- package/dist/types/lib/components/Profile/AccountListItem.stories.d.ts +1 -2
- package/dist/types/lib/components/Settings/SettingsItem.stories.d.ts +0 -1
- package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +1 -2
- package/package.json +1 -1
- package/dist/assets/IconButton.css +0 -1
package/dist/assets/Button.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._button_1qqtu_1{display:inline-flex;align-items:center;column-gap:.25em;padding:.625em}._button_1qqtu_1[data-reverse=true]{flex-direction:row-reverse}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._button_1pk1w_1{--dsc-button-background--active: transparent;--dsc-button-background--hover: transparent;--dsc-button-background: transparent;--dsc-button-color: inherit;--dsc-button-color--hover: inherit;--dsc-button-border-width: var(--ds-border-width-default);--dsc-button-border-style: solid;--dsc-button-border-color: transparent;--dsc-button-border-radius: 2px;--dsc-button-gap: var(--ds-size-2);--dsc-button-padding: var(--ds-size-2) var(--ds-size-4);--dsc-button-size: var(--ds-size-12);border-style:var(--dsc-button-border-style);border-width:var(--dsc-button-border-width);border-color:var(--dsc-button-border-color);border-radius:var(--dsc-button-border-radius);background:var(--dsc-button-background);color:var(--dsc-button-color);margin:0;padding:0;min-width:var(--dsc-button-size);min-height:var(--dsc-button-size);height:fit-content;justify-content:center;overflow:visible;text-decoration:none;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;display:inline-flex;align-items:center}._button_1pk1w_1:not([data-size]){font-size:inherit}._button_1pk1w_1:is(:disabled,[aria-disabled=true]){cursor:not-allowed;opacity:var(--ds-opacity-disabled)}._button_1pk1w_1:is(:disabled,[aria-disabled=true])[aria-busy=true]{opacity:1;cursor:progress}@media (hover: hover) and (pointer: fine){._button_1pk1w_1:where(:not(:disabled,[aria-disabled=true],[aria-busy=true])):hover{background:var(--dsc-button-background--hover);color:var(--dsc-button-color--hover)}}._button_1pk1w_1:where(:not(:disabled,[aria-disabled=true],[aria-busy=true])):active{background:var(--dsc-button-background--active)}._button_1pk1w_1[data-variant=solid]{--dsc-button-background--active: var(--ds-color-base-active);--dsc-button-background--hover: var(--ds-color-base-hover);--dsc-button-background: var(--ds-color-base-default);--dsc-button-color: var(--ds-color-base-contrast-default);--dsc-button-color--hover: var(--ds-color-base-contrast-default);--dsc-button-border-color: var(--ds-color-base-default)}._button_1pk1w_1[data-variant=outline],._button_1pk1w_1[data-variant=dotted],._button_1pk1w_1[data-variant=text]{--dsc-button-background: transparent;--dsc-button-background--active: var(--ds-color-surface-active);--dsc-button-background--hover: var(--ds-color-surface-hover);--dsc-button-color: var(--ds-color-text-subtle);--dsc-button-color--hover: var(--ds-color-text-default)}._button_1pk1w_1[data-variant=outline],._button_1pk1w_1[data-variant=dotted]{--dsc-button-border-color: var(--ds-color-border-strong)}._button_1pk1w_1[data-variant=dotted]{--dsc-button-border-style: dotted}._button_1pk1w_1[data-variant=tinted]{background-color:var(--ds-color-surface-tinted);border-color:var(--ds-color-surface-tinted);border-color:var(--ds-color-base-default);color:var(--ds-color-base-surface-tinted)}._button_1pk1w_1[data-variant=tinted]:hover{background-color:var(--ds-color-surface-hover)}._button_1pk1w_1[data-variant=tinted]:active{background-color:var(--ds-color-surface-active)}._button_1pk1w_1:focus-visible{box-shadow:var(--_ds--focus, var(--dsc-focus-boxShadow));outline:var(--_ds--focus, var(--dsc-focus-outline));outline-offset:var(--_ds--focus, var(--ds-border-width-focus))}._button_1pk1w_1:focus-visible *{--_ds--focus: }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._icon_1wozs_1{display:flex;align-items:center;justify-content:center;font-size:1em}._icon_1wozs_1[data-size=xs]{font-size:.875rem}._icon_1wozs_1[data-size=sm]{font-size:1rem}._icon_1wozs_1[data-size=md]{font-size:1.125rem}._icon_1wozs_1[data-size=lg]{font-size:1.25rem}._icon_1wozs_1 svg,._icon_1wozs_1 img{display:block;width:1em;height:1em;font-size:1.5em}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._button_kd2d3_1{display:inline-flex;flex-direction:row;align-items:center}._divider_kd2d3_7{align-self:stretch;border-left:1px solid currentColor;width:1px;margin:.375rem 0}._primary_kd2d3_14,._secondary_kd2d3_15{display:inline-flex;align-items:center;border-width:0;margin:-1px;padding:0 .5em}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._header_1rjb2_1{--dsc-item-spacing: .5em;position:relative;width:100%;min-height:var(--dsc-item-height);display:flex;align-items:center;justify-content:space-between;background:var(--dsc-item-background);column-gap:var(--dsc-item-spacing);padding-right:var(--dsc-item-px);padding-left:var(--dsc-item-px)}._header_1rjb2_1[data-interactive=true]{cursor:pointer}._header_1rjb2_1[data-interactive=true]:hover{background:var(--dsc-item-background--hover)}._header_1rjb2_1[data-interactive=true]:hover ._label_1rjb2_27 h2{text-decoration:underline}._header_1rjb2_1[data-has-active-child=true]{background-color:var(--ds-color-background-tinted)}._linkIcon_1rjb2_35{flex-shrink:0;min-width:1.5em;min-height:2em;display:flex;align-items:center;justify-content:center;pointer-events:none}
|
|
@@ -1,55 +1,60 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { ButtonLabel as
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
e,
|
|
1
|
+
import { jsx as t, jsxs as j } from "react/jsx-runtime";
|
|
2
|
+
import { c as b } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { ButtonBase as d } from "./ButtonBase.js";
|
|
5
|
+
import { ButtonLabel as B } from "./ButtonLabel.js";
|
|
6
|
+
import { ButtonIcon as q } from "./ButtonIcon.js";
|
|
7
|
+
import "../RootProvider/RootProvider.js";
|
|
8
|
+
import "../Searchbar/AutocompleteBase.js";
|
|
9
|
+
import "../Snackbar/useSnackbar.js";
|
|
10
|
+
import '../../assets/Button.css';const y = "_button_1qqtu_1", a = {
|
|
11
|
+
button: y
|
|
12
|
+
}, C = ({
|
|
13
|
+
variant: r = "solid",
|
|
14
|
+
color: n,
|
|
15
|
+
size: s,
|
|
16
|
+
selected: m = !1,
|
|
17
|
+
icon: u,
|
|
18
|
+
iconSize: x,
|
|
19
|
+
href: i,
|
|
20
|
+
label: p,
|
|
21
|
+
labelSize: o,
|
|
22
|
+
children: c,
|
|
23
|
+
className: e,
|
|
24
|
+
loading: _,
|
|
25
|
+
ariaLabel: h,
|
|
26
|
+
...f
|
|
27
|
+
}) => _ ? /* @__PURE__ */ t(
|
|
28
|
+
d,
|
|
24
29
|
{
|
|
25
|
-
variant:
|
|
30
|
+
variant: r,
|
|
26
31
|
"aria-busy": !0,
|
|
27
|
-
color:
|
|
28
|
-
size:
|
|
29
|
-
selected:
|
|
30
|
-
href:
|
|
31
|
-
className:
|
|
32
|
-
...
|
|
32
|
+
color: n,
|
|
33
|
+
size: s,
|
|
34
|
+
selected: m,
|
|
35
|
+
href: i,
|
|
36
|
+
className: b(a.button, e),
|
|
37
|
+
...f,
|
|
33
38
|
disabled: !0,
|
|
34
|
-
children: /* @__PURE__ */
|
|
39
|
+
children: /* @__PURE__ */ t(B, { size: o, children: c || p })
|
|
35
40
|
}
|
|
36
|
-
) : /* @__PURE__ */
|
|
37
|
-
|
|
41
|
+
) : /* @__PURE__ */ j(
|
|
42
|
+
d,
|
|
38
43
|
{
|
|
39
|
-
variant:
|
|
40
|
-
color:
|
|
41
|
-
size:
|
|
42
|
-
ariaLabel:
|
|
43
|
-
selected:
|
|
44
|
-
href:
|
|
45
|
-
className:
|
|
46
|
-
...
|
|
44
|
+
variant: r,
|
|
45
|
+
color: n,
|
|
46
|
+
size: s,
|
|
47
|
+
ariaLabel: h,
|
|
48
|
+
selected: m,
|
|
49
|
+
href: i,
|
|
50
|
+
className: b(a.button, e),
|
|
51
|
+
...f,
|
|
47
52
|
children: [
|
|
48
|
-
|
|
49
|
-
/* @__PURE__ */
|
|
53
|
+
u && /* @__PURE__ */ t(q, { icon: u, size: x || o }),
|
|
54
|
+
/* @__PURE__ */ t(B, { size: o, children: c || p })
|
|
50
55
|
]
|
|
51
56
|
}
|
|
52
57
|
);
|
|
53
58
|
export {
|
|
54
|
-
|
|
59
|
+
C as Button
|
|
55
60
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { c as i } from "../../index-L8X2o7IH.js";
|
|
3
|
-
import '../../assets/ButtonBase.css';const p = "
|
|
3
|
+
import '../../assets/ButtonBase.css';const p = "_button_1pk1w_1", f = {
|
|
4
4
|
button: p
|
|
5
5
|
}, B = ({
|
|
6
6
|
as: a,
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { c as m } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import { isValidElement as c } from "react";
|
|
4
|
+
import { isIconProps as p, Icon as s } from "../Icon/Icon.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
6
|
import "../Searchbar/AutocompleteBase.js";
|
|
7
7
|
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import '../../assets/ButtonIcon.css';const
|
|
9
|
-
icon:
|
|
10
|
-
}
|
|
8
|
+
import '../../assets/ButtonIcon.css';const a = "_icon_1wozs_1", r = {
|
|
9
|
+
icon: a
|
|
10
|
+
};
|
|
11
|
+
function l(o) {
|
|
12
|
+
return typeof o == "string" || typeof o == "number" || typeof o == "boolean" || o === null || c(o);
|
|
13
|
+
}
|
|
14
|
+
const _ = ({ icon: o, size: n, iconAltText: e, className: i }) => /* @__PURE__ */ t("span", { className: m(r.wrapper, i), "data-size": n, "aria-label": e, children: p(o) && /* @__PURE__ */ t(s, { ...o, className: r.icon }) || l(o) && o || /* @__PURE__ */ t(s, { svgElement: o, className: r.icon }) });
|
|
11
15
|
export {
|
|
12
|
-
|
|
16
|
+
_ as ButtonIcon
|
|
13
17
|
};
|
|
@@ -1,42 +1,58 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { ButtonLabel as
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
iconAltText:
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { jsxs as f, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c as k } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { ButtonBase as s } from "./ButtonBase.js";
|
|
5
|
+
import { ButtonLabel as v } from "./ButtonLabel.js";
|
|
6
|
+
import { ButtonIcon as x } from "./ButtonIcon.js";
|
|
7
|
+
import "../RootProvider/RootProvider.js";
|
|
8
|
+
import "../Searchbar/AutocompleteBase.js";
|
|
9
|
+
import "../Snackbar/useSnackbar.js";
|
|
10
|
+
import '../../assets/ComboButton.css';const B = "_button_kd2d3_1", h = "_divider_kd2d3_7", N = "_primary_kd2d3_14", C = "_secondary_kd2d3_15", r = {
|
|
11
|
+
button: B,
|
|
12
|
+
divider: h,
|
|
13
|
+
primary: N,
|
|
14
|
+
secondary: C
|
|
15
|
+
}, E = ({
|
|
16
|
+
variant: a = "solid",
|
|
17
|
+
color: n,
|
|
18
|
+
size: t,
|
|
19
|
+
selected: e = !1,
|
|
20
|
+
icon: i,
|
|
21
|
+
iconSize: m,
|
|
22
|
+
iconAltText: c,
|
|
23
|
+
label: p,
|
|
24
|
+
labelSize: d,
|
|
25
|
+
children: l,
|
|
26
|
+
className: _,
|
|
27
|
+
ariaLabel: u,
|
|
28
|
+
onLabelClick: y,
|
|
29
|
+
onIconClick: b
|
|
30
|
+
}) => /* @__PURE__ */ f(
|
|
31
|
+
s,
|
|
25
32
|
{
|
|
26
33
|
as: "div",
|
|
27
|
-
size:
|
|
28
|
-
variant:
|
|
29
|
-
color:
|
|
30
|
-
selected:
|
|
31
|
-
className:
|
|
34
|
+
size: t,
|
|
35
|
+
variant: a,
|
|
36
|
+
color: n,
|
|
37
|
+
selected: e,
|
|
38
|
+
className: k(r.button, _),
|
|
32
39
|
tabIndex: -1,
|
|
33
40
|
children: [
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ o(s, { ariaLabel: u, size: t, onClick: y, className: r.primary, children: /* @__PURE__ */ o(v, { size: d, children: l || p }) }),
|
|
42
|
+
/* @__PURE__ */ o("span", { "data-size": t, className: r.divider }),
|
|
43
|
+
/* @__PURE__ */ o(
|
|
44
|
+
s,
|
|
45
|
+
{
|
|
46
|
+
onClick: b,
|
|
47
|
+
className: r.secondary,
|
|
48
|
+
ariaLabel: c,
|
|
49
|
+
size: m || d,
|
|
50
|
+
children: i && /* @__PURE__ */ o(x, { icon: i })
|
|
51
|
+
}
|
|
52
|
+
)
|
|
37
53
|
]
|
|
38
54
|
}
|
|
39
55
|
);
|
|
40
56
|
export {
|
|
41
|
-
|
|
57
|
+
E as ComboButton
|
|
42
58
|
};
|
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import "../../index-L8X2o7IH.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { ButtonBase as l } from "./ButtonBase.js";
|
|
5
|
+
import { ButtonIcon as u } from "./ButtonIcon.js";
|
|
6
|
+
import "../RootProvider/RootProvider.js";
|
|
7
|
+
import "../Searchbar/AutocompleteBase.js";
|
|
8
|
+
import "../Snackbar/useSnackbar.js";
|
|
9
|
+
const z = ({
|
|
10
|
+
variant: r = "solid",
|
|
11
|
+
size: i,
|
|
12
|
+
icon: t,
|
|
12
13
|
iconSize: m,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
iconAltText: p,
|
|
15
|
+
color: e,
|
|
16
|
+
className: n,
|
|
17
|
+
selected: a,
|
|
18
|
+
onClick: s,
|
|
19
|
+
dataTestId: d
|
|
18
20
|
}) => /* @__PURE__ */ o(
|
|
19
|
-
|
|
21
|
+
l,
|
|
20
22
|
{
|
|
21
|
-
variant:
|
|
22
|
-
color:
|
|
23
|
-
size:
|
|
24
|
-
className:
|
|
25
|
-
onClick:
|
|
26
|
-
selected:
|
|
27
|
-
"data-testid":
|
|
28
|
-
"aria-label":
|
|
29
|
-
children: /* @__PURE__ */ o(
|
|
23
|
+
variant: r,
|
|
24
|
+
color: e,
|
|
25
|
+
size: i,
|
|
26
|
+
className: n,
|
|
27
|
+
onClick: s,
|
|
28
|
+
selected: a,
|
|
29
|
+
"data-testid": d,
|
|
30
|
+
"aria-label": p,
|
|
31
|
+
children: t && /* @__PURE__ */ o(u, { icon: t, size: m })
|
|
30
32
|
}
|
|
31
33
|
);
|
|
32
34
|
export {
|
|
33
|
-
|
|
35
|
+
z as IconButton
|
|
34
36
|
};
|
|
@@ -5,9 +5,9 @@ import { Avatar as I } from "../Avatar/Avatar.js";
|
|
|
5
5
|
import { AvatarGroup as y } from "../Avatar/AvatarGroup.js";
|
|
6
6
|
import { Badge as f } from "../Badge/Badge.js";
|
|
7
7
|
import { ButtonBase as u } from "../Button/ButtonBase.js";
|
|
8
|
-
import { Icon as b } from "../Icon/Icon.js";
|
|
9
8
|
import * as _ from "react";
|
|
10
9
|
import { forwardRef as v } from "react";
|
|
10
|
+
import { Icon as b } from "../Icon/Icon.js";
|
|
11
11
|
import "../RootProvider/RootProvider.js";
|
|
12
12
|
import "../Searchbar/AutocompleteBase.js";
|
|
13
13
|
import "../Snackbar/useSnackbar.js";
|
|
@@ -1,34 +1,33 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { c
|
|
1
|
+
import { jsx as e, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { Skeleton as _ } from "../Skeleton/Skeleton.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
6
|
import "../Searchbar/AutocompleteBase.js";
|
|
7
7
|
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import '../../assets/Icon.css';const
|
|
9
|
-
icon:
|
|
10
|
-
shape:
|
|
11
|
-
svg:
|
|
12
|
-
image:
|
|
13
|
-
},
|
|
8
|
+
import '../../assets/Icon.css';const d = "_icon_2h14f_1", f = "_shape_2h14f_9", g = "_svg_2h14f_15", v = "_image_2h14f_16", a = {
|
|
9
|
+
icon: d,
|
|
10
|
+
shape: f,
|
|
11
|
+
svg: g,
|
|
12
|
+
image: v
|
|
13
|
+
}, y = (s) => typeof s == "object" && s !== null && ("svgElement" in s || "iconUrl" in s), z = ({
|
|
14
14
|
loading: s,
|
|
15
|
-
altText:
|
|
16
|
-
svgElement:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
theme: l,
|
|
15
|
+
altText: n,
|
|
16
|
+
svgElement: r,
|
|
17
|
+
size: i,
|
|
18
|
+
color: o,
|
|
19
|
+
theme: m,
|
|
21
20
|
iconUrl: p,
|
|
22
21
|
className: t,
|
|
23
|
-
style:
|
|
24
|
-
}) =>
|
|
22
|
+
style: l
|
|
23
|
+
}) => r ? /* @__PURE__ */ e("span", { "data-size": i, "data-color": o, "data-theme": m, className: c(a.icon, t), style: l, children: /* @__PURE__ */ h(_, { loading: s, variant: "circle", className: a.shape, children: [
|
|
25
24
|
/* @__PURE__ */ e("span", { className: a.shape }),
|
|
26
|
-
/* @__PURE__ */ e(
|
|
27
|
-
] }) }) : p ? /* @__PURE__ */ e("span", { "data-size":
|
|
25
|
+
/* @__PURE__ */ e(r, { "aria-hidden": "true", "alt-label": n, className: a.svg })
|
|
26
|
+
] }) }) : p ? /* @__PURE__ */ e("span", { "data-size": i, "data-color": o, "data-theme": m, className: c(a.icon, t), style: l, children: /* @__PURE__ */ h(_, { loading: s, variant: "circle", className: a.shape, children: [
|
|
28
27
|
/* @__PURE__ */ e("span", { className: a.shape }),
|
|
29
|
-
/* @__PURE__ */ e("img", { src: p, alt:
|
|
30
|
-
] }) }) : /* @__PURE__ */ e("span", { className:
|
|
28
|
+
/* @__PURE__ */ e("img", { src: p, alt: n, className: a.image })
|
|
29
|
+
] }) }) : /* @__PURE__ */ e("span", { className: c(a.icon, t) });
|
|
31
30
|
export {
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
z as Icon,
|
|
32
|
+
y as isIconProps
|
|
34
33
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { isValidElement as p } from "react";
|
|
3
|
-
import { Icon as
|
|
3
|
+
import { Icon as n } from "./Icon.js";
|
|
4
4
|
import "../../index-L8X2o7IH.js";
|
|
5
5
|
import { Avatar as f } from "../Avatar/Avatar.js";
|
|
6
6
|
import { AvatarGroup as c } from "../Avatar/AvatarGroup.js";
|
|
@@ -8,25 +8,25 @@ import "../RootProvider/RootProvider.js";
|
|
|
8
8
|
import "../Searchbar/AutocompleteBase.js";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
10
|
import { S as l } from "../../XMark-DIqxCTTQ.js";
|
|
11
|
-
import '../../assets/IconOrAvatar.css';const u = "_icon_1ez59_1",
|
|
11
|
+
import '../../assets/IconOrAvatar.css';const u = "_icon_1ez59_1", _ = "_avatar_1ez59_2", v = "_avatarGroup_1ez59_6", e = {
|
|
12
12
|
icon: u,
|
|
13
|
-
avatar:
|
|
14
|
-
avatarGroup:
|
|
13
|
+
avatar: _,
|
|
14
|
+
avatarGroup: v
|
|
15
15
|
};
|
|
16
16
|
function g(r) {
|
|
17
17
|
return typeof r == "string" || typeof r == "number" || typeof r == "boolean" || r === null || p(r);
|
|
18
18
|
}
|
|
19
|
-
const N = (r) => r.svgElement !== void 0 || r.iconUrl !== void 0, S = ({ loading: r, size:
|
|
20
|
-
if (!t && !
|
|
19
|
+
const N = (r) => r.svgElement !== void 0 || r.iconUrl !== void 0, S = ({ loading: r, size: i, icon: t, iconTheme: a, avatar: s, avatarGroup: m }) => {
|
|
20
|
+
if (!t && !s && !m)
|
|
21
21
|
return null;
|
|
22
22
|
if (r)
|
|
23
|
-
return /* @__PURE__ */ o(
|
|
23
|
+
return /* @__PURE__ */ o(n, { className: e.icon, svgElement: l, loading: !0 });
|
|
24
24
|
if (t)
|
|
25
|
-
return N(t) ? /* @__PURE__ */ o(
|
|
26
|
-
if (
|
|
27
|
-
return /* @__PURE__ */ o(f, { ...
|
|
28
|
-
if (
|
|
29
|
-
return /* @__PURE__ */ o(c, { ...
|
|
25
|
+
return N(t) ? /* @__PURE__ */ o(n, { className: e.icon, theme: t.theme || a, ...t }) : g(t) ? t : /* @__PURE__ */ o(n, { className: e.icon, svgElement: t, theme: a });
|
|
26
|
+
if (s)
|
|
27
|
+
return /* @__PURE__ */ o(f, { ...s, size: s.size || i, className: e.avatar });
|
|
28
|
+
if (m)
|
|
29
|
+
return /* @__PURE__ */ o(c, { ...m, className: e.avatarGroup });
|
|
30
30
|
};
|
|
31
31
|
export {
|
|
32
32
|
S as IconOrAvatar
|
|
@@ -1,94 +1,101 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { useId as
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { Badge as
|
|
1
|
+
import { jsxs as l, jsx as e, Fragment as E } from "react/jsx-runtime";
|
|
2
|
+
import { c as w } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import { useId as z, isValidElement as D } from "react";
|
|
4
|
+
import { Icon as F } from "../Icon/Icon.js";
|
|
5
|
+
import { Badge as H } from "../Badge/Badge.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { ListItemLink as
|
|
8
|
-
import { ListItemLabel as
|
|
9
|
-
import { ListItemIcon as
|
|
10
|
-
import { ListItemControls as
|
|
7
|
+
import { ListItemLink as R } from "./ListItemLink.js";
|
|
8
|
+
import { ListItemLabel as U } from "./ListItemLabel.js";
|
|
9
|
+
import { ListItemIcon as V } from "./ListItemIcon.js";
|
|
10
|
+
import { ListItemControls as q } from "./ListItemControls.js";
|
|
11
11
|
import { ListItemSelect as A } from "./ListItemSelect.js";
|
|
12
12
|
import "../Searchbar/AutocompleteBase.js";
|
|
13
13
|
import "../Snackbar/useSnackbar.js";
|
|
14
14
|
import { S as G, a as J } from "../../ChevronUp-DR4Lz2Jb.js";
|
|
15
15
|
import { S as K } from "../../ChevronRight-BbelnTke.js";
|
|
16
|
-
import '../../assets/ListItemHeader.css';const M = "
|
|
16
|
+
import '../../assets/ListItemHeader.css';const M = "_header_1rjb2_1", O = "_label_1rjb2_27", P = "_linkIcon_1rjb2_35", o = {
|
|
17
17
|
header: M,
|
|
18
|
-
label: O
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
label: O,
|
|
19
|
+
linkIcon: P
|
|
20
|
+
}, ne = ({
|
|
21
|
+
as: c,
|
|
22
|
+
interactive: p = !0,
|
|
23
|
+
color: d,
|
|
24
|
+
loading: t,
|
|
24
25
|
disabled: f,
|
|
25
|
-
collapsible:
|
|
26
|
-
linkIcon:
|
|
27
|
-
expanded:
|
|
28
|
-
select:
|
|
29
|
-
href:
|
|
30
|
-
onClick:
|
|
31
|
-
onKeyPress:
|
|
32
|
-
tabIndex:
|
|
26
|
+
collapsible: h,
|
|
27
|
+
linkIcon: I,
|
|
28
|
+
expanded: v,
|
|
29
|
+
select: s,
|
|
30
|
+
href: L,
|
|
31
|
+
onClick: _,
|
|
32
|
+
onKeyPress: b,
|
|
33
|
+
tabIndex: u,
|
|
33
34
|
size: i,
|
|
34
|
-
title:
|
|
35
|
-
description:
|
|
36
|
-
icon:
|
|
37
|
-
active:
|
|
38
|
-
badge:
|
|
39
|
-
controls:
|
|
35
|
+
title: S,
|
|
36
|
+
description: j,
|
|
37
|
+
icon: k,
|
|
38
|
+
active: m,
|
|
39
|
+
badge: r,
|
|
40
|
+
controls: n,
|
|
40
41
|
className: N,
|
|
41
|
-
children:
|
|
42
|
-
ariaLabel:
|
|
42
|
+
children: x,
|
|
43
|
+
ariaLabel: y
|
|
43
44
|
}) => {
|
|
44
|
-
const
|
|
45
|
-
return /* @__PURE__ */
|
|
45
|
+
const a = h ? v ? G : J : I ? K : void 0, C = () => r && !t && typeof r == "object" && "label" in r ? /* @__PURE__ */ e(H, { ...r }) : D(r) ? r : null, B = z();
|
|
46
|
+
return /* @__PURE__ */ l(
|
|
46
47
|
"header",
|
|
47
48
|
{
|
|
48
|
-
className:
|
|
49
|
-
"data-color":
|
|
50
|
-
"data-interactive":
|
|
49
|
+
className: w(o.header, N),
|
|
50
|
+
"data-color": d,
|
|
51
|
+
"data-interactive": p,
|
|
51
52
|
"data-size": i,
|
|
52
|
-
"data-has-active-child":
|
|
53
|
+
"data-has-active-child": m,
|
|
53
54
|
children: [
|
|
54
55
|
/* @__PURE__ */ e(
|
|
55
|
-
|
|
56
|
+
R,
|
|
56
57
|
{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
describedby: c,
|
|
67
|
-
children: /* @__PURE__ */ e("span", { children: q })
|
|
58
|
+
as: c,
|
|
59
|
+
href: L,
|
|
60
|
+
onClick: _,
|
|
61
|
+
onKeyPress: b,
|
|
62
|
+
tabIndex: u,
|
|
63
|
+
loading: t,
|
|
64
|
+
disabled: f || t,
|
|
65
|
+
active: m,
|
|
66
|
+
ariaLabel: y
|
|
68
67
|
}
|
|
69
68
|
),
|
|
70
|
-
|
|
71
|
-
/* @__PURE__ */ e(
|
|
69
|
+
s && /* @__PURE__ */ e(A, { ...s, className: o.select }),
|
|
70
|
+
/* @__PURE__ */ e(V, { loading: t, icon: k }),
|
|
72
71
|
/* @__PURE__ */ e(
|
|
73
|
-
|
|
72
|
+
U,
|
|
74
73
|
{
|
|
75
74
|
size: i,
|
|
76
|
-
loading:
|
|
77
|
-
title:
|
|
78
|
-
description:
|
|
79
|
-
id:
|
|
75
|
+
loading: t,
|
|
76
|
+
title: S,
|
|
77
|
+
description: j,
|
|
78
|
+
id: B,
|
|
80
79
|
className: o.label,
|
|
81
|
-
children:
|
|
80
|
+
children: x
|
|
82
81
|
}
|
|
83
82
|
),
|
|
84
|
-
/* @__PURE__ */ e(
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
/* @__PURE__ */ e(q, { className: o.controls, children: n && !t ? /* @__PURE__ */ e("span", { style: { position: "relative" }, children: n }) : /* @__PURE__ */ l(E, { children: [
|
|
84
|
+
C(),
|
|
85
|
+
a && /* @__PURE__ */ e("span", { className: o.linkIcon, children: /* @__PURE__ */ e(
|
|
86
|
+
F,
|
|
87
|
+
{
|
|
88
|
+
svgElement: a,
|
|
89
|
+
style: {
|
|
90
|
+
fontSize: "1.5rem"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
) })
|
|
87
94
|
] }) })
|
|
88
95
|
]
|
|
89
96
|
}
|
|
90
97
|
);
|
|
91
98
|
};
|
|
92
99
|
export {
|
|
93
|
-
|
|
100
|
+
ne as ListItemHeader
|
|
94
101
|
};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c } from "../../index-L8X2o7IH.js";
|
|
3
|
-
import '../../assets/ListItemLink.css';const
|
|
4
|
-
link:
|
|
5
|
-
},
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
href: v,
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { c as m } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import '../../assets/ListItemLink.css';const u = "_link_18ajm_1", s = {
|
|
4
|
+
link: u
|
|
5
|
+
}, h = ({
|
|
6
|
+
as: c,
|
|
7
|
+
loading: l,
|
|
8
|
+
disabled: p,
|
|
9
|
+
selected: v,
|
|
10
|
+
href: f,
|
|
12
11
|
onClick: t,
|
|
13
12
|
onKeyPress: a,
|
|
14
13
|
className: r,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
)
|
|
14
|
+
active: o,
|
|
15
|
+
ariaLabel: e
|
|
16
|
+
}) => {
|
|
17
|
+
const n = c || "div";
|
|
18
|
+
return n === "div" ? /* @__PURE__ */ i("div", { className: m(s.link, r), children: /* @__PURE__ */ i("span", { children: e }) }) : /* @__PURE__ */ i(
|
|
19
|
+
n,
|
|
20
|
+
{
|
|
21
|
+
className: m(s.link, r),
|
|
22
|
+
href: f,
|
|
23
|
+
onKeyPress: (d) => {
|
|
24
|
+
d.key === "Enter" && (t == null || t()), a == null || a(d);
|
|
25
|
+
},
|
|
26
|
+
onClick: t,
|
|
27
|
+
"data-interactive": "true",
|
|
28
|
+
"aria-disabled": l || p,
|
|
29
|
+
"aria-selected": v,
|
|
30
|
+
"aria-label": e,
|
|
31
|
+
"data-active": o
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
35
|
export {
|
|
36
|
-
|
|
36
|
+
h as ListItemLink
|
|
37
37
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as y, jsx as n } from "react/jsx-runtime";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
4
|
import * as c from "react";
|
|
5
5
|
import { forwardRef as m } from "react";
|
|
6
|
-
import { Badge as
|
|
7
|
-
import { ContextMenu as
|
|
8
|
-
import { ListItemControls as
|
|
9
|
-
import { ListItem as
|
|
6
|
+
import { Badge as O } from "../Badge/Badge.js";
|
|
7
|
+
import { ContextMenu as w } from "../ContextMenu/ContextMenu.js";
|
|
8
|
+
import { ListItemControls as h } from "../List/ListItemControls.js";
|
|
9
|
+
import { ListItem as I } from "../List/ListItem.js";
|
|
10
10
|
import "../RootProvider/RootProvider.js";
|
|
11
11
|
import "../Searchbar/AutocompleteBase.js";
|
|
12
12
|
import "../Snackbar/useSnackbar.js";
|
|
13
|
-
import { Flex as
|
|
13
|
+
import { Flex as j } from "../Page/Flex.js";
|
|
14
14
|
import { u as d } from "../../useId-BVFxCjkq.js";
|
|
15
|
-
var
|
|
15
|
+
var x = function(t, o) {
|
|
16
16
|
var l = {};
|
|
17
17
|
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && o.indexOf(e) < 0 && (l[e] = t[e]);
|
|
18
18
|
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -20,8 +20,8 @@ var j = function(t, o) {
|
|
|
20
20
|
o.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[r]) && (l[e[r]] = t[e[r]]);
|
|
21
21
|
return l;
|
|
22
22
|
};
|
|
23
|
-
const
|
|
24
|
-
var { title: l, titleId: e } = t, r =
|
|
23
|
+
const E = m((t, o) => {
|
|
24
|
+
var { title: l, titleId: e } = t, r = x(t, ["title", "titleId"]);
|
|
25
25
|
let i = d();
|
|
26
26
|
return i = l ? e || "title-" + i : void 0, c.createElement(
|
|
27
27
|
"svg",
|
|
@@ -30,7 +30,7 @@ const x = m((t, o) => {
|
|
|
30
30
|
c.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M12 4.969c1.399-1.242 2.776-1.844 4.125-1.844 1.519 0 2.823.763 3.905 1.845 2.373 2.372 2.207 6.354-1 9.56l-6.5 6.5-.53-.53-.53.53-6.5-6.5c-3.207-3.206-3.373-7.188-1-9.56C5.05 3.888 6.356 3.125 7.875 3.125c1.349 0 2.726.602 4.125 1.844M12 20.5l-.53.53a.75.75 0 0 0 1.06 0zm0-1.06 5.97-5.97c2.793-2.794 2.627-5.812 1-7.44-.919-.918-1.864-1.405-2.845-1.405s-2.177.487-3.595 1.905a.75.75 0 0 1-1.06 0C10.05 5.112 8.856 4.625 7.874 4.625S5.948 5.112 5.03 6.03c-1.627 1.628-1.793 4.646 1 7.44z", clipRule: "evenodd" })
|
|
31
31
|
);
|
|
32
32
|
});
|
|
33
|
-
var
|
|
33
|
+
var S = function(t, o) {
|
|
34
34
|
var l = {};
|
|
35
35
|
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && o.indexOf(e) < 0 && (l[e] = t[e]);
|
|
36
36
|
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -38,8 +38,8 @@ var E = function(t, o) {
|
|
|
38
38
|
o.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[r]) && (l[e[r]] = t[e[r]]);
|
|
39
39
|
return l;
|
|
40
40
|
};
|
|
41
|
-
const
|
|
42
|
-
var { title: l, titleId: e } = t, r =
|
|
41
|
+
const _ = m((t, o) => {
|
|
42
|
+
var { title: l, titleId: e } = t, r = S(t, ["title", "titleId"]);
|
|
43
43
|
let i = d();
|
|
44
44
|
return i = l ? e || "title-" + i : void 0, c.createElement(
|
|
45
45
|
"svg",
|
|
@@ -47,7 +47,7 @@ const S = m((t, o) => {
|
|
|
47
47
|
l ? c.createElement("title", { id: i }, l) : null,
|
|
48
48
|
c.createElement("path", { fill: "currentColor", d: "M12 4.969c1.399-1.242 2.776-1.844 4.125-1.844 1.519 0 2.823.763 3.905 1.845 2.373 2.372 2.206 6.354-1 9.56l-6.5 6.5a.75.75 0 0 1-1.06 0l-6.5-6.5c-3.207-3.206-3.373-7.188-1-9.56C5.05 3.888 6.355 3.125 7.874 3.125c1.349 0 2.726.602 4.125 1.844" })
|
|
49
49
|
);
|
|
50
|
-
}),
|
|
50
|
+
}), q = ({
|
|
51
51
|
size: t,
|
|
52
52
|
expanded: o,
|
|
53
53
|
type: l,
|
|
@@ -59,28 +59,30 @@ const S = m((t, o) => {
|
|
|
59
59
|
contextMenu: f,
|
|
60
60
|
favouriteLabel: p,
|
|
61
61
|
children: u,
|
|
62
|
-
|
|
62
|
+
interactive: g,
|
|
63
|
+
...b
|
|
63
64
|
}) => {
|
|
64
|
-
const
|
|
65
|
-
/* @__PURE__ */ n(
|
|
66
|
-
f && /* @__PURE__ */ n(
|
|
65
|
+
const v = /* @__PURE__ */ y(h, { children: [
|
|
66
|
+
/* @__PURE__ */ n(j, { align: "center", spacing: 2, style: { position: "relative", fontSize: "1.25rem" }, children: a ? /* @__PURE__ */ n(O, { color: l === "group" ? "neutral" : l, children: a }) : s ? /* @__PURE__ */ n(_, { "aria-label": p }) : /* @__PURE__ */ n(E, { "aria-hidden": !0 }) }),
|
|
67
|
+
f && /* @__PURE__ */ n(w, { ...f, size: "sm" })
|
|
67
68
|
] });
|
|
68
69
|
return /* @__PURE__ */ n(
|
|
69
|
-
|
|
70
|
+
I,
|
|
70
71
|
{
|
|
71
|
-
...
|
|
72
|
+
...b,
|
|
72
73
|
size: t,
|
|
73
74
|
icon: e,
|
|
74
75
|
title: r,
|
|
75
76
|
description: o ? void 0 : i,
|
|
76
77
|
expanded: o,
|
|
77
78
|
selected: o,
|
|
78
|
-
badge: !o &&
|
|
79
|
+
badge: !o && v,
|
|
79
80
|
linkIcon: !0,
|
|
81
|
+
interactive: g,
|
|
80
82
|
children: u
|
|
81
83
|
}
|
|
82
84
|
);
|
|
83
85
|
};
|
|
84
86
|
export {
|
|
85
|
-
|
|
87
|
+
q as AccountListItem
|
|
86
88
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ButtonBaseProps } from './ButtonBase';
|
|
1
|
+
import { ButtonBaseProps, ButtonIconProps, ButtonSize } from '..';
|
|
3
2
|
export interface ButtonProps extends Partial<ButtonBaseProps> {
|
|
4
|
-
icon?:
|
|
3
|
+
icon?: ButtonIconProps['icon'];
|
|
4
|
+
iconSize?: ButtonSize;
|
|
5
5
|
ariaLabel?: string;
|
|
6
6
|
loading?: boolean;
|
|
7
|
-
loadingText?: string;
|
|
8
7
|
label?: string;
|
|
8
|
+
labelSize?: ButtonSize;
|
|
9
9
|
}
|
|
10
|
-
export declare const Button: ({ variant, color, size, selected, icon, href, label, children, className, loading,
|
|
10
|
+
export declare const Button: ({ variant, color, size, selected, icon, iconSize, href, label, labelSize, children, className, loading, ariaLabel, ...rest }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ variant, color, size, selected, icon, href, label, children, className, loading,
|
|
4
|
+
component: ({ variant, color, size, selected, icon, iconSize, href, label, labelSize, children, className, loading, ariaLabel, ...rest }: import('./Button').ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
@@ -17,6 +17,7 @@ export declare const Text: Story;
|
|
|
17
17
|
export declare const Loading: Story;
|
|
18
18
|
export declare const Disabled: Story;
|
|
19
19
|
export declare const Sizes: (args: Story) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const LabelSize: (args: Story) => import("react/jsx-runtime").JSX.Element;
|
|
20
21
|
export declare const Variants: (args: Story) => import("react/jsx-runtime").JSX.Element;
|
|
21
22
|
export declare const ToolbarButtons: (args: Story) => import("react/jsx-runtime").JSX.Element;
|
|
22
23
|
export declare const Specimens: (args: Story) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SvgElement } from '
|
|
2
|
-
import { ButtonSize } from './ButtonBase';
|
|
1
|
+
import { ButtonSize, IconProps, SvgElement } from '..';
|
|
3
2
|
export interface ButtonIconProps {
|
|
4
|
-
icon: SvgElement;
|
|
5
|
-
size: ButtonSize;
|
|
3
|
+
icon: IconProps | SvgElement;
|
|
6
4
|
iconAltText?: string;
|
|
5
|
+
size?: ButtonSize;
|
|
6
|
+
altText?: string;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare const ButtonIcon: ({
|
|
9
|
+
export declare const ButtonIcon: ({ icon, size, iconAltText, className }: ButtonIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ButtonSize } from './ButtonBase';
|
|
3
3
|
export interface ButtonLabelProps {
|
|
4
|
-
size
|
|
4
|
+
size?: ButtonSize;
|
|
5
5
|
className?: string;
|
|
6
|
-
children
|
|
6
|
+
children?: ReactNode;
|
|
7
7
|
}
|
|
8
8
|
export declare const ButtonLabel: ({ className, size, children }: ButtonLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { MouseEventHandler } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { ButtonBaseProps } from './ButtonBase';
|
|
2
|
+
import { ButtonBaseProps, ButtonIconProps, ButtonSize } from '..';
|
|
4
3
|
export interface ComboButtonProps extends Omit<ButtonBaseProps, 'onClick'> {
|
|
5
|
-
icon:
|
|
4
|
+
icon: ButtonIconProps['icon'];
|
|
5
|
+
iconSize?: ButtonSize;
|
|
6
6
|
iconAltText?: string;
|
|
7
7
|
ariaLabel?: string;
|
|
8
8
|
onIconClick?: MouseEventHandler<HTMLButtonElement>;
|
|
9
9
|
onLabelClick?: MouseEventHandler<HTMLButtonElement>;
|
|
10
10
|
disabled?: boolean;
|
|
11
|
+
label?: string;
|
|
12
|
+
labelSize?: ButtonSize;
|
|
11
13
|
}
|
|
12
|
-
export declare const ComboButton: ({ variant, color, size, selected, icon, children, className, ariaLabel, onLabelClick, onIconClick,
|
|
14
|
+
export declare const ComboButton: ({ variant, color, size, selected, icon, iconSize, iconAltText, label, labelSize, children, className, ariaLabel, onLabelClick, onIconClick, }: ComboButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { MouseEventHandler } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { ButtonColor, ButtonSize, ButtonVariant } from './ButtonBase';
|
|
2
|
+
import { ButtonColor, ButtonIconProps, ButtonSize, ButtonVariant } from '..';
|
|
4
3
|
export interface IconButtonProps {
|
|
5
|
-
icon:
|
|
4
|
+
icon: ButtonIconProps['icon'];
|
|
6
5
|
iconAltText: string;
|
|
7
6
|
color?: ButtonColor;
|
|
8
7
|
size?: ButtonSize;
|
|
@@ -13,4 +12,4 @@ export interface IconButtonProps {
|
|
|
13
12
|
onClick?: MouseEventHandler;
|
|
14
13
|
dataTestId?: string;
|
|
15
14
|
}
|
|
16
|
-
export declare const IconButton: ({ variant, size, icon,
|
|
15
|
+
export declare const IconButton: ({ variant, size, icon, iconSize, iconAltText, color, className, selected, onClick, dataTestId, }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { Color, Size, Theme } from '..';
|
|
3
3
|
export type SvgElement = React.ComponentType<React.SVGProps<SVGSVGElement>>;
|
|
4
|
-
export type IconVariant = 'fill' | 'contain' | 'custom';
|
|
5
4
|
export type IconSize = Size | undefined;
|
|
6
5
|
export type IconColor = Color;
|
|
7
6
|
export type IconTheme = Theme;
|
|
@@ -10,7 +9,6 @@ export interface IconProps {
|
|
|
10
9
|
iconUrl?: string;
|
|
11
10
|
altText?: string;
|
|
12
11
|
loading?: boolean;
|
|
13
|
-
variant?: IconVariant;
|
|
14
12
|
size?: IconSize;
|
|
15
13
|
color?: IconColor;
|
|
16
14
|
theme?: IconTheme;
|
|
@@ -18,4 +16,4 @@ export interface IconProps {
|
|
|
18
16
|
style?: CSSProperties;
|
|
19
17
|
}
|
|
20
18
|
export declare const isIconProps: (icon: unknown) => icon is IconProps;
|
|
21
|
-
export declare const Icon: ({ loading, altText, svgElement: SvgElement,
|
|
19
|
+
export declare const Icon: ({ loading, altText, svgElement: SvgElement, size, color, theme, iconUrl, className, style, }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -31,4 +31,27 @@ export interface ListItemInputProps extends ListItemProps {
|
|
|
31
31
|
/** Child items */
|
|
32
32
|
items?: ListItemProps[];
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
/**
|
|
35
|
+
* `ListItem` is a compound component that combines `ListItemBase` and `ListItemHeader`
|
|
36
|
+
* to render a stylized, optionally interactive list item with support for various visual states
|
|
37
|
+
* such as loading, selection, and expansion. It supports customization of appearance through variants,
|
|
38
|
+
* shadows, borders, and iconography.
|
|
39
|
+
*
|
|
40
|
+
* @param {Object} props - Component props
|
|
41
|
+
* @param {string} [props.id] - Unique identifier for the list item.
|
|
42
|
+
* @param {'default' | 'subtle' | 'tinted'} [props.variant='default'] - Visual style variant of the item.
|
|
43
|
+
* @param {string} [props.className] - Custom class name for additional styling.
|
|
44
|
+
* @param {boolean} [props.loading] - Whether to show a loading placeholder.
|
|
45
|
+
* @param {ReactNode | () => ReactElement} [props.label] - Custom label, can be a node or a function returning a ReactElement.
|
|
46
|
+
* @param {ReactNode} [props.title] - Title content of the item.
|
|
47
|
+
* @param {ReactNode} [props.description] - Optional description beneath the title.
|
|
48
|
+
* @param {string} [props.ariaLabel] - ARIA label used for accessibility, defaults to `title` if not provided.
|
|
49
|
+
* @param {ReactNode} [props.icon] - Icon element displayed alongside the content.
|
|
50
|
+
* @param {ReactNode} [props.badge] - Optional badge displayed near the title.
|
|
51
|
+
* @param {boolean} [props.linkIcon=false] - Whether to display a link icon.
|
|
52
|
+
* @param {...ListItemBaseProps} props - Additional props inherited from `ListItemBase` for layout and interaction.
|
|
53
|
+
* @param {...ListItemHeaderProps} props - Additional props inherited from `ListItemHeader` for header controls and behavior.
|
|
54
|
+
*
|
|
55
|
+
* @returns {ReactElement} Rendered ListItem component.
|
|
56
|
+
*/
|
|
57
|
+
export declare const ListItem: ({ className, color, variant, shadow, border, loading, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => ReactElement;
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
import { ListItemProps } from '../';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ className, color, variant, shadow, border, loading, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) =>
|
|
5
|
+
component: ({ className, color, variant, shadow, border, loading, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => React.ReactElement;
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
8
8
|
id: string;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { ElementType, KeyboardEventHandler
|
|
1
|
+
import { ElementType, KeyboardEventHandler } from 'react';
|
|
2
2
|
export interface ListItemLinkProps {
|
|
3
|
-
interactive?: boolean;
|
|
4
3
|
as?: ElementType;
|
|
5
4
|
href?: string;
|
|
6
5
|
onClick?: () => void;
|
|
7
6
|
onKeyPress?: KeyboardEventHandler;
|
|
7
|
+
ariaLabel?: string;
|
|
8
8
|
tabIndex?: number;
|
|
9
9
|
loading?: boolean;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
selected?: boolean;
|
|
12
12
|
className?: string;
|
|
13
|
-
children?: ReactNode;
|
|
14
13
|
active?: boolean;
|
|
15
|
-
describedby?: string;
|
|
16
14
|
}
|
|
17
|
-
export declare const ListItemLink: ({
|
|
15
|
+
export declare const ListItemLink: ({ as, loading, disabled, selected, href, onClick, onKeyPress, className, active, ariaLabel, }: ListItemLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ListItemProps } from '../';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ className, color, variant, shadow, border, loading, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) =>
|
|
4
|
+
component: ({ className, color, variant, shadow, border, loading, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => React.ReactElement;
|
|
5
5
|
parameters: {};
|
|
6
6
|
args: {
|
|
7
7
|
id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElementType, ReactNode } from 'react';
|
|
2
2
|
import { AvatarGroupProps, AvatarProps, BadgeProps, SvgElement } from '..';
|
|
3
|
-
import { MenuItemColor, MenuItemIconProps, MenuItemSize, MenuItemTheme } from './';
|
|
3
|
+
import { MenuItemColor, MenuItemIconProps, MenuItemLabelProps, MenuItemSize, MenuItemTheme } from './';
|
|
4
4
|
export interface MenuItemProps {
|
|
5
5
|
id: string;
|
|
6
6
|
type?: string;
|
|
@@ -18,8 +18,8 @@ export interface MenuItemProps {
|
|
|
18
18
|
selected?: boolean;
|
|
19
19
|
disabled?: boolean;
|
|
20
20
|
groupId?: string | number;
|
|
21
|
-
title?:
|
|
22
|
-
description?:
|
|
21
|
+
title?: MenuItemLabelProps['title'];
|
|
22
|
+
description?: MenuItemLabelProps['description'];
|
|
23
23
|
icon?: MenuItemIconProps['icon'];
|
|
24
24
|
iconTheme?: MenuItemIconProps['theme'];
|
|
25
25
|
iconBadge?: MenuItemIconProps['badge'];
|
|
@@ -9,4 +9,4 @@ export interface AccountListItemProps extends ListItemProps {
|
|
|
9
9
|
label?: string;
|
|
10
10
|
favouriteLabel?: string;
|
|
11
11
|
}
|
|
12
|
-
export declare const AccountListItem: ({ size, expanded, type, icon, title, description, label, favourite, contextMenu, favouriteLabel, children, ...item }: AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const AccountListItem: ({ size, expanded, type, icon, title, description, label, favourite, contextMenu, favouriteLabel, children, interactive, ...item }: AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ size, expanded, type, icon, title, description, label, favourite, contextMenu, favouriteLabel, children, ...item }: import('./AccountListItem').AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ size, expanded, type, icon, title, description, label, favourite, contextMenu, favouriteLabel, children, interactive, ...item }: import('./AccountListItem').AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
@@ -48,7 +48,6 @@ declare const meta: {
|
|
|
48
48
|
href?: string | undefined;
|
|
49
49
|
onClick?: (() => void) | undefined;
|
|
50
50
|
onKeyPress?: React.KeyboardEventHandler | undefined;
|
|
51
|
-
describedby?: string | undefined;
|
|
52
51
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
53
52
|
};
|
|
54
53
|
export default meta;
|
|
@@ -38,7 +38,6 @@ declare const meta: {
|
|
|
38
38
|
href?: string | undefined;
|
|
39
39
|
onClick?: (() => void) | undefined;
|
|
40
40
|
onKeyPress?: React.KeyboardEventHandler | undefined;
|
|
41
|
-
describedby?: string | undefined;
|
|
42
41
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
43
42
|
};
|
|
44
43
|
export default meta;
|
|
@@ -19,7 +19,6 @@ declare const meta: {
|
|
|
19
19
|
children?: React.ReactNode | (() => React.ReactElement);
|
|
20
20
|
border?: import('..').ListItemBorder | undefined;
|
|
21
21
|
loading?: boolean | undefined;
|
|
22
|
-
variant?: import('..').ListItemVariant | undefined;
|
|
23
22
|
size?: import('..').ListItemSize | undefined;
|
|
24
23
|
color?: import('..').ListItemColor | undefined;
|
|
25
24
|
className?: string | undefined;
|
|
@@ -27,6 +26,7 @@ declare const meta: {
|
|
|
27
26
|
as?: React.ElementType | undefined;
|
|
28
27
|
label?: React.ReactNode | (() => React.ReactElement);
|
|
29
28
|
select?: import('..').ListItemSelectProps | undefined;
|
|
29
|
+
variant?: import('..').ListItemVariant | undefined;
|
|
30
30
|
hidden?: boolean | undefined;
|
|
31
31
|
expanded?: boolean | undefined;
|
|
32
32
|
active?: boolean | undefined;
|
|
@@ -44,7 +44,6 @@ declare const meta: {
|
|
|
44
44
|
collapsible?: boolean | undefined;
|
|
45
45
|
onClick?: (() => void) | undefined;
|
|
46
46
|
onKeyPress?: React.KeyboardEventHandler | undefined;
|
|
47
|
-
describedby?: string | undefined;
|
|
48
47
|
};
|
|
49
48
|
};
|
|
50
49
|
export default meta;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._button_hmev5_1{display:flex;align-items:center;justify-content:center;border-radius:2px}._button_hmev5_1[data-size=xs]{width:2.25rem;height:2.25rem}._button_hmev5_1[data-size=sm]{width:2.625rem;height:2.625rem}._button_hmev5_1[data-size=md]{width:3rem;height:3rem}._button_hmev5_1[data-size=lg]{width:3.5rem;height:3.5rem}
|