@altinn/altinn-components 0.16.0 → 0.17.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/README.md +23 -19
- package/dist/ListItemBase-BVx5MDhO.js +83 -0
- package/dist/assets/Flex.css +1 -1
- package/dist/assets/ListItemBase.css +1 -1
- package/dist/assets/ListItemIcon.css +1 -1
- package/dist/components/Bookmarks/BookmarksSection.js +19 -19
- package/dist/components/Dialog/DialogListItem.js +12 -13
- package/dist/components/Dialog/SeenByLog.js +0 -1
- package/dist/components/List/List.js +3 -3
- package/dist/components/List/ListBase.js +2 -2
- package/dist/components/List/ListItem.js +62 -62
- package/dist/components/List/ListItemBase.js +4 -78
- package/dist/components/List/ListItemHeader.js +43 -43
- package/dist/components/List/ListItemIcon.js +6 -6
- package/dist/components/List/index.js +1 -1
- package/dist/components/Page/Flex.js +7 -7
- package/dist/components/Search/Autocomplete.js +27 -24
- package/dist/components/Transmission/TransmissionItem.js +55 -58
- package/dist/components/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/lib/components/Dialog/DialogListItem.stories.d.ts +4 -3
- package/dist/types/lib/components/List/ListBase.stories.d.ts +3 -4
- package/dist/types/lib/components/List/ListItem.d.ts +2 -0
- package/dist/types/lib/components/List/ListItemBase.d.ts +24 -2
- package/dist/types/lib/components/List/ListItemHeader.d.ts +6 -5
- package/dist/types/lib/components/List/Patterns.stories.d.ts +0 -1
- package/dist/types/lib/components/List/Specimens.stories.d.ts +2 -2
- package/dist/types/lib/components/Page/Flex.d.ts +1 -1
- package/dist/types/lib/components/Transmission/TransmissionItem.stories.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
# altinn-components
|
|
2
2
|
|
|
3
3
|
The next frontend of altinn.no is developed by multiple product teams, all working toward the shared goal of delivering a seamless, unified experience for the end users — ensuring they perceive it as a single and robust product.
|
|
4
|
-
This package represents a collaborative effort between designers and developers across these teams, consolidating solutions to shared challenges.
|
|
5
|
-
It provides Altinn-specific React components tailored to address the common UI needs of these specific teams.
|
|
4
|
+
This package represents a collaborative effort between designers and developers across these teams, consolidating solutions to shared challenges.
|
|
5
|
+
It provides Altinn-specific React components tailored to address the common UI needs of these specific teams.
|
|
6
6
|
|
|
7
|
-
Today these teams are [Team Arbeidsflate](https://github.com/digdir/dialogporten-frontend), [Team
|
|
7
|
+
Today these teams are [Team Arbeidsflate](https://github.com/digdir/dialogporten-frontend), [Team Authorization](https://github.com/Altinn/altinn-access-management-frontend), and Team Portal.
|
|
8
8
|
|
|
9
|
-
Note that this package is specifically designed to meet the unique needs of the aforementioned teams and is not intended to serve as a general-purpose library.
|
|
9
|
+
Note that this package is specifically designed to meet the unique needs of the aforementioned teams and is not intended to serve as a general-purpose library.
|
|
10
10
|
We already have the amazing [Norwegian public sector's Design System](https://designsystemet.no/), and we aim to incorporate its elements wherever it makes sense, ensuring alignment and leveraging its strengths while adapting to the specific requirements of Altinn.
|
|
11
11
|
|
|
12
|
-
Currently, we do not use components from the design system _directly_ but rely on its token structure and continue to explore opportunities for deeper integration.
|
|
13
|
-
This approach helps us align with brand guidelines and the broader vision of a unified Altinn product.
|
|
12
|
+
Currently, we do not use components from the design system _directly_ but rely on its token structure and continue to explore opportunities for deeper integration.
|
|
13
|
+
This approach helps us align with brand guidelines and the broader vision of a unified Altinn product.
|
|
14
14
|
|
|
15
15
|
## Feedback and questions
|
|
16
|
-
|
|
16
|
+
|
|
17
|
+
Keep in mind that this package is a work in progress and will be updated continuously.
|
|
17
18
|
If you have any feedback or questions, please reach out to us on Github.
|
|
18
19
|
|
|
19
20
|
## Installation
|
|
21
|
+
|
|
20
22
|
To install the package, run the following command:
|
|
21
23
|
|
|
22
24
|
```bash
|
|
23
25
|
# for npm users
|
|
24
26
|
npm install @altinn/components
|
|
25
27
|
# for yarn users
|
|
26
|
-
yarn add @altinn/components
|
|
28
|
+
yarn add @altinn/components
|
|
27
29
|
# for pnpm users
|
|
28
30
|
pnpm add @altinn/components
|
|
29
31
|
```
|
|
32
|
+
|
|
30
33
|
Tested with Node.js 20.x <
|
|
31
34
|
|
|
32
35
|
## Requirements
|
|
@@ -34,17 +37,14 @@ Tested with Node.js 20.x <
|
|
|
34
37
|
`React` `>=18`in your project as a peer dependency. And `react-dom` if needed.
|
|
35
38
|
|
|
36
39
|
## Usage
|
|
40
|
+
|
|
37
41
|
Wrap your application in RootProvider to enable shared context across all components. Here’s a basic setup:
|
|
38
42
|
|
|
39
43
|
```tsx
|
|
40
|
-
import { RootProvider } from
|
|
44
|
+
import { RootProvider } from "@altinn/components";
|
|
41
45
|
|
|
42
46
|
function App() {
|
|
43
|
-
return
|
|
44
|
-
<RootProvider>
|
|
45
|
-
{ /* Your application here */ }
|
|
46
|
-
</RootProvider>
|
|
47
|
-
);
|
|
47
|
+
return <RootProvider>{/* Your application here */}</RootProvider>;
|
|
48
48
|
}
|
|
49
49
|
```
|
|
50
50
|
|
|
@@ -52,20 +52,24 @@ To use the components in your application, you need to import the components you
|
|
|
52
52
|
|
|
53
53
|
```tsx
|
|
54
54
|
// example: import the Avatar component and type
|
|
55
|
-
import { Avatar, type AvatarVariant } from
|
|
55
|
+
import { Avatar, type AvatarVariant } from "@altinn/components";
|
|
56
56
|
```
|
|
57
|
+
|
|
57
58
|
and import the css file in your application once, e.g. in your css:
|
|
59
|
+
|
|
58
60
|
```ts
|
|
59
|
-
import
|
|
61
|
+
import "@altinn/altinn-components/lib/css/global.css";
|
|
60
62
|
```
|
|
61
|
-
for correct `font-family` and minimal collection of resets.
|
|
62
63
|
|
|
64
|
+
for correct `font-family` and minimal collection of resets.
|
|
63
65
|
|
|
64
66
|
## Documentation
|
|
67
|
+
|
|
65
68
|
The documentation for the components can be found in the [Storybook](https://altinn.github.io/altinn-components)
|
|
66
|
-
Components are decorated with tags to show the current status of the component.
|
|
69
|
+
Components are decorated with tags to show the current status of the component.
|
|
67
70
|
|
|
68
71
|
The tags are:
|
|
72
|
+
|
|
69
73
|
- `@outdated` - The component is out of sync with latest design.
|
|
70
74
|
- `@beta` - The component is in beta and is more likely to have flaws or missing features.
|
|
71
75
|
- `@experimental` - The component is experimental and is work in progress. Recommended not to use.
|
|
@@ -109,4 +113,4 @@ pnpm test-storybook --watch 'MyComponent.stories.tsx'
|
|
|
109
113
|
|
|
110
114
|
-
|
|
111
115
|
To skip the test add 'skip-test' string into the tags array for the test you want to exclude. That option is defined in the test-runner.ts file.
|
|
112
|
-
Currently all the tests under stories/Demo and docs are excluded as the accessibility test is not needed there.
|
|
116
|
+
Currently all the tests under stories/Demo and docs are excluded as the accessibility test is not needed there.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { c as H } from "./index-L8X2o7IH.js";
|
|
3
|
+
import './assets/ListItemBase.css';const I = "_item_12vtu_1", N = "_interactive_12vtu_54", q = "_interactiveSelected_12vtu_96", A = "_interactiveHidden_12vtu_100", t = {
|
|
4
|
+
item: I,
|
|
5
|
+
interactive: N,
|
|
6
|
+
interactiveSelected: q,
|
|
7
|
+
interactiveHidden: A
|
|
8
|
+
}, G = ({
|
|
9
|
+
title: b,
|
|
10
|
+
interactive: w = !0,
|
|
11
|
+
as: x,
|
|
12
|
+
href: h,
|
|
13
|
+
onClick: a,
|
|
14
|
+
onKeyPress: e,
|
|
15
|
+
tabIndex: L,
|
|
16
|
+
size: d,
|
|
17
|
+
variant: n,
|
|
18
|
+
color: c,
|
|
19
|
+
theme: i,
|
|
20
|
+
shadow: j,
|
|
21
|
+
loading: r,
|
|
22
|
+
disabled: s,
|
|
23
|
+
hidden: v = !1,
|
|
24
|
+
active: o = !1,
|
|
25
|
+
selected: m,
|
|
26
|
+
className: _,
|
|
27
|
+
onMouseEnter: l,
|
|
28
|
+
children: p
|
|
29
|
+
}) => {
|
|
30
|
+
const u = i === "transparent" ? "none" : j;
|
|
31
|
+
if (w) {
|
|
32
|
+
const B = H(
|
|
33
|
+
t.item,
|
|
34
|
+
t.interactive,
|
|
35
|
+
_,
|
|
36
|
+
m && t.interactiveSelected,
|
|
37
|
+
v && t.interactiveHidden
|
|
38
|
+
);
|
|
39
|
+
return /* @__PURE__ */ f(
|
|
40
|
+
x || "button",
|
|
41
|
+
{
|
|
42
|
+
"aria-label": b,
|
|
43
|
+
className: B,
|
|
44
|
+
"data-variant": n,
|
|
45
|
+
"data-color": c,
|
|
46
|
+
"data-theme": i,
|
|
47
|
+
"data-size": d,
|
|
48
|
+
"data-shadow": u,
|
|
49
|
+
"data-active": o,
|
|
50
|
+
href: h,
|
|
51
|
+
onKeyPress: (S) => {
|
|
52
|
+
S.key === "Enter" && (a == null || a()), e == null || e(S);
|
|
53
|
+
},
|
|
54
|
+
onClick: a,
|
|
55
|
+
tabIndex: L,
|
|
56
|
+
"aria-disabled": s || r,
|
|
57
|
+
disabled: s || r,
|
|
58
|
+
onMouseEnter: l,
|
|
59
|
+
children: p
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
const z = H(t.item, _, m && t.interactiveSelected);
|
|
64
|
+
return /* @__PURE__ */ f(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
className: z,
|
|
68
|
+
"data-variant": n,
|
|
69
|
+
"data-color": c,
|
|
70
|
+
"data-theme": i,
|
|
71
|
+
"data-size": d,
|
|
72
|
+
"data-shadow": u,
|
|
73
|
+
"data-active": o,
|
|
74
|
+
"aria-hidden": v,
|
|
75
|
+
onMouseEnter: l,
|
|
76
|
+
children: p
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
export {
|
|
81
|
+
G as L,
|
|
82
|
+
t as s
|
|
83
|
+
};
|
package/dist/assets/Flex.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._flex_vvg9d_1{display:flex;list-style:none;padding:0}._flex_vvg9d_1[data-direction=col]{flex-direction:column}._flex_vvg9d_1[data-direction=row]{flex-direction:row}._flex_vvg9d_1[data-align=center]{align-items:center}._flex_vvg9d_1[data-align=start]{align-items:flex-start}._flex_vvg9d_1[data-align=end]{align-items:flex-end}._flex_vvg9d_1[data-justify=start]{justify-content:flex-start}._flex_vvg9d_1[data-justify=end]{justify-content:flex-end}._flex_vvg9d_1[data-justify=center]{justify-content:center}._flex_vvg9d_1[data-justify=between]{justify-content:space-between}@media (max-width: 1023px){._flex_vvg9d_1[data-bleed=true]{margin-left:-1rem;margin-right:-1rem}}._flex_vvg9d_1[data-padding=page]{padding:var(--ds-spacing-6)}@media (max-width: 1023px){._flex_vvg9d_1[data-padding=page]{padding-left:var(--ds-spacing-4);padding-right:var(--ds-spacing-4)}}._flex_vvg9d_1[data-spacing=xs]{gap:.125rem}._flex_vvg9d_1[data-spacing=page]{gap:1.5rem}._flex_vvg9d_1[data-margin=section]{margin:.625rem 0}._flex_vvg9d_1[data-margin=page]{margin:1.125rem 0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._item_12vtu_1{padding:0;border:0;background-color:transparent;color:inherit;font:inherit;text-align:inherit;text-decoration:none;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;user-select:none;list-style:none;position:relative;width:100%;display:flex;flex-direction:column}._item_12vtu_1[data-shadow=xs]{box-shadow:var(--ds-shadow-xs)}._item_12vtu_1[data-variant=outline],._item_12vtu_1[data-variant=dotted]{outline-color:var(--ds-color-base-default)}._item_12vtu_1[data-variant=outline]{outline-style:solid}._item_12vtu_1[data-variant=dotted]{outline-color:var(--ds-color-border-subtle);outline-style:dashed}._item_12vtu_1[data-theme=default]{background-color:var(--ds-color-background-default)}._item_12vtu_1[data-theme=subtle]{background-color:var(--ds-color-background-subtle)}._interactive_12vtu_54[data-theme=subtle]:hover,._item_12vtu_1[data-theme=surface]{background-color:var(--ds-color-surface-hover)}._interactive_12vtu_54[data-theme=surface]:hover{background-color:var(--ds-color-surface-active)}._item_12vtu_1[data-theme=base]{background-color:var(--ds-color-base-default);color:var(--ds-color-contrast-default)}._interactive_12vtu_54[data-theme=base]:hover{background-color:var(--ds-color-base-hover);color:var(--ds-color-contrast-default)}._item_12vtu_1[data-active=true]{background-color:var(--ds-color-surface-default)}._item_12vtu_1[aria-expanded=true],._item_12vtu_1[aria-selected=true]{outline:2px solid}._item_12vtu_1[aria-disabled=true]{pointer-events:none}._interactiveSelected_12vtu_96{outline:2px solid var(--ds-color-border-strong)}._interactiveHidden_12vtu_100{display:none}._interactive_12vtu_54:not([data-theme=transparent]):hover{outline:2px solid var(--ds-color-border-strong)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._listIcon_ghios_1{flex-shrink:0;position:relative;display:flex;justify-content:center;align-items:center}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createElement as
|
|
1
|
+
import { jsxs as c, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { createElement as f } from "react";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
|
-
import { BookmarksListItem as
|
|
4
|
+
import { BookmarksListItem as h } from "./BookmarksListItem.js";
|
|
5
5
|
import { EditableBookmark as k } from "./EditableBookmark.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { ListBase as
|
|
8
|
-
import { Typography as
|
|
9
|
-
import { Heading as
|
|
7
|
+
import { ListBase as p } from "../List/ListBase.js";
|
|
8
|
+
import { Typography as l } from "../Typography/Typography.js";
|
|
9
|
+
import { Heading as x } from "../Typography/Heading.js";
|
|
10
10
|
import "../Search/AutocompleteBase.js";
|
|
11
11
|
import "../Snackbar/useSnackbar.js";
|
|
12
12
|
import { Section as z } from "../Page/Section.js";
|
|
13
13
|
const g = ({
|
|
14
|
-
loading:
|
|
14
|
+
loading: o,
|
|
15
15
|
title: e,
|
|
16
|
-
description:
|
|
16
|
+
description: s,
|
|
17
17
|
items: t,
|
|
18
|
-
untitled:
|
|
19
|
-
titleField:
|
|
20
|
-
expandedId:
|
|
18
|
+
untitled: d = "Untitled bookmark",
|
|
19
|
+
titleField: a,
|
|
20
|
+
expandedId: n,
|
|
21
21
|
onToggle: m
|
|
22
|
-
}) => /* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
|
|
22
|
+
}) => /* @__PURE__ */ c(z, { padding: 6, theme: "surface-hover", spacing: 4, bleed: !0, children: [
|
|
23
|
+
/* @__PURE__ */ i(x, { size: "md", children: e }),
|
|
24
|
+
o ? /* @__PURE__ */ i(p, { children: /* @__PURE__ */ i(h, { title: e, loading: o, size: "sm" }) }) : t.length > 0 && /* @__PURE__ */ i(p, { spacing: "xs", children: t.map((r) => /* @__PURE__ */ f(
|
|
25
25
|
k,
|
|
26
26
|
{
|
|
27
27
|
...r,
|
|
28
28
|
key: r.id,
|
|
29
|
-
loading:
|
|
29
|
+
loading: o || r.loading,
|
|
30
30
|
onToggle: () => m == null ? void 0 : m(r.id),
|
|
31
|
-
expanded:
|
|
32
|
-
untitled:
|
|
33
|
-
titleField:
|
|
31
|
+
expanded: n === r.id,
|
|
32
|
+
untitled: d,
|
|
33
|
+
titleField: a,
|
|
34
34
|
size: "sm"
|
|
35
35
|
}
|
|
36
36
|
)) }),
|
|
37
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ i(l, { size: "xs", children: s })
|
|
38
38
|
] });
|
|
39
39
|
export {
|
|
40
40
|
g as BookmarksSection
|
|
@@ -31,12 +31,12 @@ import '../../assets/DialogListItem.css';const K = "_link_1yhch_1", O = "_border
|
|
|
31
31
|
sender: h,
|
|
32
32
|
recipient: g,
|
|
33
33
|
recipientLabel: k = "to",
|
|
34
|
-
grouped:
|
|
34
|
+
grouped: D = !1,
|
|
35
35
|
updatedAt: l,
|
|
36
36
|
updatedAtLabel: i,
|
|
37
|
-
archivedAt:
|
|
38
|
-
archivedAtLabel:
|
|
39
|
-
trashedAt:
|
|
37
|
+
archivedAt: d,
|
|
38
|
+
archivedAtLabel: I,
|
|
39
|
+
trashedAt: _,
|
|
40
40
|
trashedAtLabel: L,
|
|
41
41
|
label: S,
|
|
42
42
|
dueAt: j,
|
|
@@ -46,12 +46,12 @@ import '../../assets/DialogListItem.css';const K = "_link_1yhch_1", O = "_border
|
|
|
46
46
|
touchedBy: M,
|
|
47
47
|
attachmentsCount: T,
|
|
48
48
|
title: r,
|
|
49
|
-
description:
|
|
49
|
+
description: n,
|
|
50
50
|
summary: y,
|
|
51
51
|
theme: q = "default",
|
|
52
52
|
...p
|
|
53
53
|
}) => {
|
|
54
|
-
const w =
|
|
54
|
+
const w = _ ? "trashed" : d ? "archived" : x, f = c ? "subtle" : q;
|
|
55
55
|
return e === "xs" || e === "sm" || e === "md" ? /* @__PURE__ */ t(
|
|
56
56
|
N,
|
|
57
57
|
{
|
|
@@ -59,7 +59,7 @@ import '../../assets/DialogListItem.css';const K = "_link_1yhch_1", O = "_border
|
|
|
59
59
|
size: e,
|
|
60
60
|
selected: c,
|
|
61
61
|
theme: f,
|
|
62
|
-
label: /* @__PURE__ */ t("div", { className: a.border, "data-size": e, "data-seen": m, "data-loading": o, children: /* @__PURE__ */ t(G, { loading: o, size: e, title: r, description: y ||
|
|
62
|
+
label: /* @__PURE__ */ t("div", { className: a.border, "data-size": e, "data-seen": m, "data-loading": o, children: /* @__PURE__ */ t(G, { loading: o, size: e, title: r, description: y || n }) }),
|
|
63
63
|
badge: /* @__PURE__ */ t(u, { loading: o, sender: h, updatedAt: l, updatedAtLabel: i }),
|
|
64
64
|
title: r
|
|
65
65
|
}
|
|
@@ -70,7 +70,6 @@ import '../../assets/DialogListItem.css';const K = "_link_1yhch_1", O = "_border
|
|
|
70
70
|
size: e,
|
|
71
71
|
selected: c,
|
|
72
72
|
theme: f,
|
|
73
|
-
linkIcon: null,
|
|
74
73
|
controls: s && /* @__PURE__ */ t(J, { className: a.select, ...s, size: "xl" }),
|
|
75
74
|
title: r,
|
|
76
75
|
label: /* @__PURE__ */ b("div", { className: a.border, "data-size": e, "data-seen": m, "data-loading": o, children: [
|
|
@@ -84,10 +83,10 @@ import '../../assets/DialogListItem.css';const K = "_link_1yhch_1", O = "_border
|
|
|
84
83
|
sender: h,
|
|
85
84
|
recipient: g,
|
|
86
85
|
recipientLabel: k,
|
|
87
|
-
grouped:
|
|
86
|
+
grouped: D
|
|
88
87
|
}
|
|
89
88
|
),
|
|
90
|
-
/* @__PURE__ */ t(E, { loading: o, children: /* @__PURE__ */ t("p", { "data-size": e, className: a.summary, children: y ||
|
|
89
|
+
/* @__PURE__ */ t(E, { loading: o, children: /* @__PURE__ */ t("p", { "data-size": e, className: a.summary, children: y || n }) })
|
|
91
90
|
] }),
|
|
92
91
|
/* @__PURE__ */ t(
|
|
93
92
|
u,
|
|
@@ -97,9 +96,9 @@ import '../../assets/DialogListItem.css';const K = "_link_1yhch_1", O = "_border
|
|
|
97
96
|
status: B,
|
|
98
97
|
updatedAt: l,
|
|
99
98
|
updatedAtLabel: i,
|
|
100
|
-
archivedAt:
|
|
101
|
-
archivedAtLabel:
|
|
102
|
-
trashedAt:
|
|
99
|
+
archivedAt: d,
|
|
100
|
+
archivedAtLabel: I,
|
|
101
|
+
trashedAt: _,
|
|
103
102
|
trashedAtLabel: L,
|
|
104
103
|
dueAt: j,
|
|
105
104
|
dueAtLabel: v,
|
|
@@ -17,7 +17,6 @@ const v = ({ items: r, endUserLabel: o = "you" }) => /* @__PURE__ */ i(c, { spac
|
|
|
17
17
|
avatar: { type: "person", name: t == null ? void 0 : t.name },
|
|
18
18
|
title: t == null ? void 0 : t.name,
|
|
19
19
|
description: t != null && t.isEndUser ? o : "",
|
|
20
|
-
linkIcon: null,
|
|
21
20
|
badge: /* @__PURE__ */ i(n, { datetime: a, children: p })
|
|
22
21
|
},
|
|
23
22
|
m
|
|
@@ -3,17 +3,17 @@ import { createElement as l } from "react";
|
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
5
|
import { ListItem as a } from "./ListItem.js";
|
|
6
|
-
import { ListBase as
|
|
6
|
+
import { ListBase as h } from "./ListBase.js";
|
|
7
7
|
import "../Search/AutocompleteBase.js";
|
|
8
8
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
const k = ({ defaultItemSize: o, defaultItemTheme: p, defaultItemColor: s, items:
|
|
9
|
+
const k = ({ defaultItemSize: o, defaultItemTheme: p, defaultItemColor: s, items: c = [], ...n }) => /* @__PURE__ */ f(h, { ...n, children: c.map((r, t) => /* @__PURE__ */ l(
|
|
10
10
|
a,
|
|
11
11
|
{
|
|
12
12
|
...r,
|
|
13
13
|
size: (r == null ? void 0 : r.size) || o,
|
|
14
14
|
color: (r == null ? void 0 : r.color) || s,
|
|
15
15
|
theme: (r == null ? void 0 : r.theme) || p,
|
|
16
|
-
key:
|
|
16
|
+
key: `item-${r.id ?? t}`
|
|
17
17
|
}
|
|
18
18
|
)) });
|
|
19
19
|
export {
|
|
@@ -5,7 +5,7 @@ import "../RootProvider/RootProvider.js";
|
|
|
5
5
|
import "../Search/AutocompleteBase.js";
|
|
6
6
|
import "../Snackbar/useSnackbar.js";
|
|
7
7
|
import { Flex as m } from "../Page/Flex.js";
|
|
8
|
-
const
|
|
8
|
+
const a = ({ spacing: o = 2, children: r, ...t }) => /* @__PURE__ */ i(m, { direction: "col", spacing: o, as: "ul", ...t, children: r });
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
a as ListBase
|
|
11
11
|
};
|
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as r, jsxs as R } from "react/jsx-runtime";
|
|
2
|
+
import { s as x, L as c } from "../../ListItemBase-BVx5MDhO.js";
|
|
3
3
|
import { ListItemHeader as B } from "./ListItemHeader.js";
|
|
4
|
-
import { S as
|
|
5
|
-
import { S as
|
|
6
|
-
import { S as
|
|
7
|
-
const
|
|
4
|
+
import { S as U } from "../../ChevronRight-DUaHaWi-.js";
|
|
5
|
+
import { S as k } from "../../ChevronUp-H8Nuww4h.js";
|
|
6
|
+
import { S as l } from "../../ChevronDown-CRAwzuD3.js";
|
|
7
|
+
const K = ({
|
|
8
8
|
className: o,
|
|
9
9
|
variant: v = "solid",
|
|
10
|
-
color:
|
|
11
|
-
theme:
|
|
10
|
+
color: f,
|
|
11
|
+
theme: p = "default",
|
|
12
12
|
shadow: S = "xs",
|
|
13
|
-
loading:
|
|
13
|
+
loading: e,
|
|
14
14
|
collapsible: D,
|
|
15
15
|
expanded: m,
|
|
16
|
-
size:
|
|
17
|
-
icon:
|
|
16
|
+
size: t = "sm",
|
|
17
|
+
icon: u,
|
|
18
18
|
avatar: L,
|
|
19
|
-
avatarGroup:
|
|
19
|
+
avatarGroup: I,
|
|
20
20
|
title: i,
|
|
21
|
-
description:
|
|
22
|
-
badge:
|
|
23
|
-
linkIcon: H =
|
|
24
|
-
label:
|
|
25
|
-
select:
|
|
21
|
+
description: C,
|
|
22
|
+
badge: j,
|
|
23
|
+
linkIcon: H = !1,
|
|
24
|
+
label: h,
|
|
25
|
+
select: y,
|
|
26
26
|
controls: n,
|
|
27
|
-
children:
|
|
28
|
-
...
|
|
27
|
+
children: N,
|
|
28
|
+
...s
|
|
29
29
|
}) => {
|
|
30
|
-
const
|
|
31
|
-
return m ? /* @__PURE__ */
|
|
32
|
-
|
|
30
|
+
const a = D ? m ? k : l : void 0, d = typeof h == "function" ? h() : h;
|
|
31
|
+
return m ? /* @__PURE__ */ r("li", { className: x.item, children: /* @__PURE__ */ R(
|
|
32
|
+
c,
|
|
33
33
|
{
|
|
34
34
|
interactive: !1,
|
|
35
35
|
variant: v,
|
|
36
|
-
color:
|
|
37
|
-
theme:
|
|
36
|
+
color: f,
|
|
37
|
+
theme: p,
|
|
38
38
|
shadow: S,
|
|
39
39
|
expanded: m,
|
|
40
40
|
title: i,
|
|
41
|
-
loading:
|
|
41
|
+
loading: e,
|
|
42
42
|
children: [
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
|
|
43
|
+
/* @__PURE__ */ r(
|
|
44
|
+
c,
|
|
45
45
|
{
|
|
46
46
|
theme: "transparent",
|
|
47
47
|
interactive: !n,
|
|
48
|
-
size:
|
|
49
|
-
color:
|
|
50
|
-
loading:
|
|
48
|
+
size: t,
|
|
49
|
+
color: f,
|
|
50
|
+
loading: e,
|
|
51
51
|
title: i,
|
|
52
|
-
...
|
|
53
|
-
children: /* @__PURE__ */
|
|
52
|
+
...s,
|
|
53
|
+
children: /* @__PURE__ */ r(
|
|
54
54
|
B,
|
|
55
55
|
{
|
|
56
56
|
className: o,
|
|
57
|
-
loading:
|
|
58
|
-
select:
|
|
59
|
-
size:
|
|
57
|
+
loading: e,
|
|
58
|
+
select: y,
|
|
59
|
+
size: t,
|
|
60
60
|
title: i,
|
|
61
|
-
description:
|
|
62
|
-
icon:
|
|
61
|
+
description: C,
|
|
62
|
+
icon: u,
|
|
63
63
|
avatar: L,
|
|
64
|
-
avatarGroup:
|
|
65
|
-
badge:
|
|
66
|
-
|
|
64
|
+
avatarGroup: I,
|
|
65
|
+
badge: j,
|
|
66
|
+
chevron: a,
|
|
67
67
|
controls: n,
|
|
68
|
-
...
|
|
69
|
-
children:
|
|
68
|
+
...s,
|
|
69
|
+
children: d
|
|
70
70
|
}
|
|
71
71
|
)
|
|
72
72
|
}
|
|
73
73
|
),
|
|
74
|
-
|
|
74
|
+
N
|
|
75
75
|
]
|
|
76
76
|
}
|
|
77
|
-
) : /* @__PURE__ */
|
|
78
|
-
|
|
77
|
+
) }) : /* @__PURE__ */ r("li", { className: x.item, children: /* @__PURE__ */ r(
|
|
78
|
+
c,
|
|
79
79
|
{
|
|
80
80
|
interactive: !n,
|
|
81
81
|
variant: v,
|
|
82
|
-
color:
|
|
83
|
-
theme:
|
|
82
|
+
color: f,
|
|
83
|
+
theme: p,
|
|
84
84
|
shadow: S,
|
|
85
85
|
expanded: m,
|
|
86
|
-
loading:
|
|
86
|
+
loading: e,
|
|
87
87
|
title: i,
|
|
88
|
-
...
|
|
89
|
-
children: /* @__PURE__ */
|
|
88
|
+
...s,
|
|
89
|
+
children: /* @__PURE__ */ r(
|
|
90
90
|
B,
|
|
91
91
|
{
|
|
92
92
|
className: o,
|
|
93
|
-
loading:
|
|
94
|
-
select:
|
|
95
|
-
size:
|
|
93
|
+
loading: e,
|
|
94
|
+
select: y,
|
|
95
|
+
size: t,
|
|
96
96
|
title: i,
|
|
97
|
-
description:
|
|
98
|
-
icon:
|
|
97
|
+
description: C,
|
|
98
|
+
icon: u,
|
|
99
99
|
avatar: L,
|
|
100
|
-
avatarGroup:
|
|
101
|
-
badge:
|
|
102
|
-
|
|
100
|
+
avatarGroup: I,
|
|
101
|
+
badge: j,
|
|
102
|
+
chevron: a ?? (H ? U : void 0),
|
|
103
103
|
controls: n,
|
|
104
|
-
...
|
|
105
|
-
children:
|
|
104
|
+
...s,
|
|
105
|
+
children: d
|
|
106
106
|
}
|
|
107
107
|
)
|
|
108
108
|
}
|
|
109
|
-
);
|
|
109
|
+
) });
|
|
110
110
|
};
|
|
111
111
|
export {
|
|
112
|
-
|
|
112
|
+
K as ListItem
|
|
113
113
|
};
|
|
@@ -1,80 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
item: B,
|
|
5
|
-
interactive: E,
|
|
6
|
-
interactiveSelected: I,
|
|
7
|
-
interactiveHidden: L
|
|
8
|
-
}, F = ({
|
|
9
|
-
title: S,
|
|
10
|
-
interactive: f = !0,
|
|
11
|
-
as: q,
|
|
12
|
-
href: u,
|
|
13
|
-
onClick: a,
|
|
14
|
-
onKeyPress: e,
|
|
15
|
-
tabIndex: H,
|
|
16
|
-
size: c,
|
|
17
|
-
variant: d,
|
|
18
|
-
color: s,
|
|
19
|
-
theme: i,
|
|
20
|
-
shadow: h,
|
|
21
|
-
loading: n,
|
|
22
|
-
disabled: r,
|
|
23
|
-
hidden: o = !1,
|
|
24
|
-
active: v = !1,
|
|
25
|
-
selected: m,
|
|
26
|
-
className: p,
|
|
27
|
-
children: _
|
|
28
|
-
}) => {
|
|
29
|
-
const l = i === "transparent" ? "none" : h;
|
|
30
|
-
if (f) {
|
|
31
|
-
const z = x(
|
|
32
|
-
t.item,
|
|
33
|
-
t.interactive,
|
|
34
|
-
p,
|
|
35
|
-
m && t.interactiveSelected,
|
|
36
|
-
o && t.interactiveHidden
|
|
37
|
-
);
|
|
38
|
-
return /* @__PURE__ */ w(
|
|
39
|
-
q || "button",
|
|
40
|
-
{
|
|
41
|
-
"aria-label": S,
|
|
42
|
-
className: z,
|
|
43
|
-
"data-variant": d,
|
|
44
|
-
"data-color": s,
|
|
45
|
-
"data-theme": i,
|
|
46
|
-
"data-size": c,
|
|
47
|
-
"data-shadow": l,
|
|
48
|
-
"data-active": v,
|
|
49
|
-
href: u,
|
|
50
|
-
onKeyPress: (b) => {
|
|
51
|
-
b.key === "Enter" && (a == null || a()), e == null || e(b);
|
|
52
|
-
},
|
|
53
|
-
onClick: a,
|
|
54
|
-
tabIndex: H,
|
|
55
|
-
"aria-disabled": r || n,
|
|
56
|
-
disabled: r || n,
|
|
57
|
-
children: _
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
const j = x(t.item, p, m && t.interactiveSelected);
|
|
62
|
-
return /* @__PURE__ */ w(
|
|
63
|
-
"article",
|
|
64
|
-
{
|
|
65
|
-
className: j,
|
|
66
|
-
"data-variant": d,
|
|
67
|
-
"data-color": s,
|
|
68
|
-
"data-theme": i,
|
|
69
|
-
"data-size": c,
|
|
70
|
-
"data-shadow": l,
|
|
71
|
-
"data-active": v,
|
|
72
|
-
"aria-hidden": o,
|
|
73
|
-
"aria-disabled": r || n,
|
|
74
|
-
children: _
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
};
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "../../index-L8X2o7IH.js";
|
|
3
|
+
import { L as e } from "../../ListItemBase-BVx5MDhO.js";
|
|
78
4
|
export {
|
|
79
|
-
|
|
5
|
+
e as ListItemBase
|
|
80
6
|
};
|