@altinn/altinn-components 0.16.0 → 0.18.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 +39 -31
- 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/AccessAreaList/AccessAreaListItem.js +26 -21
- package/dist/components/AccessPackageList/AccessPackageListItem.js +8 -16
- 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 +48 -48
- 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/AccessAreaList/AccessAreaListItem.d.ts +11 -2
- package/dist/types/lib/components/AccessAreaList/AccessAreaListItem.stories.d.ts +11 -2
- package/dist/types/lib/components/AccessPackageList/AccessPackageList.stories.d.ts +11 -9
- package/dist/types/lib/components/AccessPackageList/AccessPackageListItem.d.ts +2 -3
- 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/ResourceList/ResourceList.stories.d.ts +0 -7
- package/dist/types/lib/components/ResourceList/ResourceListItem.d.ts +9 -1
- package/dist/types/lib/components/ResourceList/ResourceListItem.stories.d.ts +1 -0
- 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
|
-
npm install @altinn/components
|
|
26
|
+
npm install @altinn/altinn-components
|
|
25
27
|
# for yarn users
|
|
26
|
-
yarn add @altinn/components
|
|
28
|
+
yarn add @altinn/altinn-components
|
|
27
29
|
# for pnpm users
|
|
28
|
-
pnpm add @altinn/components
|
|
30
|
+
pnpm add @altinn/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,61 +52,69 @@ 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.
|
|
72
76
|
- `@deprecated` - The component is deprecated and should not be used.
|
|
73
77
|
|
|
74
|
-
The main motivation behind having tags is relieving the pressure of having to make everything stable before releasing it for use.
|
|
78
|
+
The main motivation behind having tags is relieving the pressure of having to make everything stable before releasing it for use.
|
|
75
79
|
It also allows us to get feedback on the components in an early stage.
|
|
76
80
|
|
|
77
81
|
## Storybook test runner (accessibility)
|
|
82
|
+
|
|
78
83
|
Config for the storybook test runner is placed under .storybook/test-runner.ts
|
|
79
84
|
|
|
85
|
+
First you will need to run the storybook:
|
|
80
86
|
|
|
81
|
-
First you will need to run the storybook:
|
|
82
87
|
```
|
|
83
88
|
pnpm storybook
|
|
84
89
|
```
|
|
90
|
+
|
|
85
91
|
-
|
|
86
92
|
|
|
87
93
|
When that is done, in another terminal run following command to test all the stories for accessibility
|
|
94
|
+
|
|
88
95
|
```
|
|
89
96
|
pnpm test-storybook
|
|
90
97
|
```
|
|
91
|
-
-
|
|
92
98
|
|
|
93
|
-
|
|
99
|
+
-
|
|
100
|
+
|
|
101
|
+
To test a specific file, run...
|
|
102
|
+
|
|
94
103
|
```
|
|
95
104
|
pnpm test-storybook --watch
|
|
96
105
|
```
|
|
97
|
-
...and press 'p' to choose filtering by file name. Then start typing the name of the storybook file f.ex. 'badge'. The helper will list all the files matching your input.
|
|
98
106
|
|
|
99
|
-
|
|
107
|
+
...and press 'p' to choose filtering by file name. Then start typing the name of the storybook file f.ex. 'badge'. The helper will list all the files matching your input.
|
|
108
|
+
|
|
109
|
+
Hit enter to test the file.
|
|
100
110
|
|
|
101
111
|
If there is more files matching your input, they will also be tested.
|
|
102
112
|
|
|
103
|
-
-
|
|
104
|
-
If the storybook cli runs all the tests even with --watch flag, alternatively you can simply run:
|
|
113
|
+
- If the storybook cli runs all the tests even with --watch flag, alternatively you can simply run:
|
|
105
114
|
|
|
106
115
|
```
|
|
107
116
|
pnpm test-storybook --watch 'MyComponent.stories.tsx'
|
|
108
117
|
```
|
|
109
118
|
|
|
110
|
-
-
|
|
111
|
-
|
|
112
|
-
Currently all the tests under stories/Demo and docs are excluded as the accessibility test is not needed there.
|
|
119
|
+
- 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.
|
|
120
|
+
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,34 +1,39 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
5
|
import "../Search/AutocompleteBase.js";
|
|
6
6
|
import "../Snackbar/useSnackbar.js";
|
|
7
|
-
import { ListItem as
|
|
8
|
-
import '../../assets/AccessAreaListItem.css';const
|
|
9
|
-
content:
|
|
10
|
-
},
|
|
11
|
-
name:
|
|
12
|
-
icon:
|
|
13
|
-
size:
|
|
14
|
-
children:
|
|
7
|
+
import { ListItem as a } from "../List/ListItem.js";
|
|
8
|
+
import '../../assets/AccessAreaListItem.css';const b = "_content_7hk0i_1", d = {
|
|
9
|
+
content: b
|
|
10
|
+
}, j = ({
|
|
11
|
+
name: c,
|
|
12
|
+
icon: m,
|
|
13
|
+
size: i = "md",
|
|
14
|
+
children: r,
|
|
15
15
|
expanded: t = !1,
|
|
16
|
-
onClick:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
onClick: l,
|
|
17
|
+
badgeText: o,
|
|
18
|
+
colorTheme: e,
|
|
19
|
+
loading: n,
|
|
20
|
+
...p
|
|
21
|
+
}) => /* @__PURE__ */ s(
|
|
22
|
+
a,
|
|
20
23
|
{
|
|
21
24
|
as: "button",
|
|
22
|
-
icon:
|
|
23
|
-
title:
|
|
24
|
-
size:
|
|
25
|
-
collapsible: !
|
|
25
|
+
icon: { svgElement: m, theme: "subtle", color: e },
|
|
26
|
+
title: c,
|
|
27
|
+
size: i,
|
|
28
|
+
collapsible: !n,
|
|
26
29
|
expanded: t,
|
|
27
|
-
onClick:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
onClick: l,
|
|
31
|
+
badge: o ? { label: o, color: e } : void 0,
|
|
32
|
+
loading: n,
|
|
33
|
+
...p,
|
|
34
|
+
children: t && /* @__PURE__ */ s("div", { className: d.content, children: r })
|
|
30
35
|
}
|
|
31
36
|
);
|
|
32
37
|
export {
|
|
33
|
-
|
|
38
|
+
j as AccessAreaListItem
|
|
34
39
|
};
|
|
@@ -5,21 +5,13 @@ import "../RootProvider/RootProvider.js";
|
|
|
5
5
|
import "../Search/AutocompleteBase.js";
|
|
6
6
|
import "../Snackbar/useSnackbar.js";
|
|
7
7
|
import { ListItem as i } from "../List/ListItem.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} : void 0,
|
|
16
|
-
as: r,
|
|
17
|
-
size: "sm",
|
|
18
|
-
color: "accent",
|
|
19
|
-
title: m,
|
|
20
|
-
...o
|
|
21
|
-
}
|
|
22
|
-
);
|
|
8
|
+
import { S as s } from "../../Package-ASRzCHA7.js";
|
|
9
|
+
const k = ({
|
|
10
|
+
as: t = "button",
|
|
11
|
+
title: m,
|
|
12
|
+
color: o = "neutral",
|
|
13
|
+
...r
|
|
14
|
+
}) => /* @__PURE__ */ e(i, { icon: s, as: t, size: "sm", title: m, color: o, theme: "subtle", ...r });
|
|
23
15
|
export {
|
|
24
|
-
|
|
16
|
+
k as AccessPackageListItem
|
|
25
17
|
};
|
|
@@ -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
|
};
|