@altinn/altinn-components 0.56.13 → 0.56.14
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/QueryLabel.css +1 -1
- package/dist/components/Searchbar/QueryLabel.js +11 -11
- package/dist/components/Settings/BookmarksSettingsItem.js +50 -48
- package/dist/components/Settings/BookmarksSettingsItemLabel.js +21 -0
- package/dist/components/Settings/BookmarksSettingsList.js +2 -1
- package/dist/components/Toolbar/ToolbarSearch.js +12 -10
- package/dist/types/lib/components/Searchbar/QueryLabel.d.ts +2 -1
- package/dist/types/lib/components/Settings/BookmarksSettingsItem.d.ts +3 -1
- package/dist/types/lib/components/Settings/BookmarksSettingsItemLabel.d.ts +12 -0
- package/dist/types/lib/components/Toolbar/ToolbarSearch.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarSearch.stories.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._label_1qrdy_1{--dsc-item-font-size: .875rem;--dsc-item-padding-x: .5em;--dsc-item-padding-y: .25em;--dsc-item-color: var(--ds-color-text-default);overflow:hidden;text-overflow:ellipsis;max-width:100%}._label_1qrdy_1[data-variant=subtle]{--dsc-item-color: var(--ds-color-text-subtle)}._label_1qrdy_1[data-size=xs]{--dsc-item-font-size: .75rem;--dsc-item-padding-x: .25em;--dsc-item-padding-y: 0}._label_1qrdy_1{font-size:var(--dsc-item-font-size);color:var(--dsc-item-color);display:flex;flex-wrap:wrap;align-items:center;column-gap:.25rem;row-gap:.25rem}._group_1qrdy_31{display:inline-flex;align-items:center;column-gap:.25rem}._plus_1qrdy_37{color:var(--ds-color-text-subtle)}._item_1qrdy_41{display:block;overflow:hidden;text-overflow:ellipsis;max-width:100%}._item_1qrdy_41[data-type=search]{background-color:transparent;font-weight:500;border-bottom:1px solid;padding:var(--dsc-item-padding-y) 0}._item_1qrdy_41[data-type=search]:before{content:"«"}._item_1qrdy_41[data-type=search]:after{content:"»"}._item_1qrdy_41[data-type=filter]{background-color:transparent;border:1px solid;font-weight:500;padding:var(--dsc-item-padding-y) var(--dsc-item-padding-x);border-radius:2px}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import '../../assets/QueryLabel.css';const
|
|
3
|
-
label:
|
|
4
|
-
group:
|
|
1
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import '../../assets/QueryLabel.css';const o = "_label_1qrdy_1", d = "_group_1qrdy_31", p = "_plus_1qrdy_37", u = "_item_1qrdy_41", a = {
|
|
3
|
+
label: o,
|
|
4
|
+
group: d,
|
|
5
5
|
plus: p,
|
|
6
|
-
item:
|
|
7
|
-
},
|
|
8
|
-
/* @__PURE__ */ e(
|
|
9
|
-
s[
|
|
10
|
-
] },
|
|
6
|
+
item: u
|
|
7
|
+
}, i = ({ type: s = "search", label: l }) => /* @__PURE__ */ e("span", { className: a.item, "data-type": s, children: l }), _ = ({ params: s = [], size: l = "sm", variant: r = "default" }) => /* @__PURE__ */ e("div", { className: a.label, "data-size": l, "data-variant": r, children: s.map((c, t) => /* @__PURE__ */ n("div", { className: a.group, children: [
|
|
8
|
+
/* @__PURE__ */ e(i, { ...c }),
|
|
9
|
+
s[t + 1] && /* @__PURE__ */ e("span", { className: a.plus, children: "+" })
|
|
10
|
+
] }, t)) });
|
|
11
11
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
i as QueryItem,
|
|
13
|
+
_ as QueryLabel
|
|
14
14
|
};
|
|
@@ -1,80 +1,82 @@
|
|
|
1
1
|
import { jsx as r, jsxs as g } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-p1eeF8LQ.js";
|
|
3
|
-
import { useState as
|
|
3
|
+
import { useState as y } from "react";
|
|
4
4
|
import { Button as d } from "../Button/Button.js";
|
|
5
5
|
import { ButtonGroup as h } from "../Button/ButtonGroup.js";
|
|
6
|
-
import { ContextMenu as
|
|
6
|
+
import { ContextMenu as C } from "../ContextMenu/ContextMenu.js";
|
|
7
7
|
import "react-dom";
|
|
8
8
|
import "../RootProvider/RootProvider.js";
|
|
9
|
-
import { QueryLabel as
|
|
10
|
-
import { TextField as
|
|
9
|
+
import { QueryLabel as G } from "../Searchbar/QueryLabel.js";
|
|
10
|
+
import { TextField as j } from "../Forms/TextField.js";
|
|
11
11
|
import "../Snackbar/useSnackbar.js";
|
|
12
|
-
import { SettingsItemBase as
|
|
13
|
-
import { SettingsModal as
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
import { SettingsItemBase as z } from "./SettingsItemBase.js";
|
|
13
|
+
import { SettingsModal as L } from "./SettingsModal.js";
|
|
14
|
+
import { BookmarksSettingsItemLabel as M } from "./BookmarksSettingsItemLabel.js";
|
|
15
|
+
import { S as Q } from "../../MagnifyingGlass-bwVhw07z.js";
|
|
16
|
+
const X = ({
|
|
17
|
+
id: S,
|
|
18
|
+
icon: m = Q,
|
|
19
|
+
loading: l,
|
|
20
|
+
title: n,
|
|
21
|
+
untitled: T,
|
|
22
|
+
highlightWords: u,
|
|
23
|
+
params: a,
|
|
24
|
+
controls: V,
|
|
22
25
|
inputValue: s,
|
|
23
|
-
titleField:
|
|
24
|
-
saveButton:
|
|
25
|
-
removeButton:
|
|
26
|
-
contextMenu:
|
|
27
|
-
onChange:
|
|
28
|
-
open:
|
|
26
|
+
titleField: f,
|
|
27
|
+
saveButton: o,
|
|
28
|
+
removeButton: i,
|
|
29
|
+
contextMenu: p,
|
|
30
|
+
onChange: c,
|
|
31
|
+
open: k = !1,
|
|
29
32
|
onClose: e,
|
|
30
|
-
...
|
|
33
|
+
...b
|
|
31
34
|
}) => {
|
|
32
|
-
const [
|
|
35
|
+
const [x, I] = y("");
|
|
33
36
|
return /* @__PURE__ */ r(
|
|
34
|
-
|
|
37
|
+
z,
|
|
35
38
|
{
|
|
36
|
-
...
|
|
37
|
-
id:
|
|
38
|
-
expanded:
|
|
39
|
+
...b,
|
|
40
|
+
id: S,
|
|
41
|
+
expanded: k,
|
|
39
42
|
icon: m,
|
|
40
|
-
loading:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
controls: f && /* @__PURE__ */ r(z, { ...f }),
|
|
43
|
+
loading: l,
|
|
44
|
+
label: /* @__PURE__ */ r(M, { highlightWords: u, loading: l, params: a, title: n }),
|
|
45
|
+
controls: p && /* @__PURE__ */ r(C, { ...p }),
|
|
44
46
|
linkIcon: !0,
|
|
45
|
-
children: /* @__PURE__ */ g(
|
|
46
|
-
/* @__PURE__ */ r(
|
|
47
|
+
children: /* @__PURE__ */ g(L, { icon: m, title: n, open: k, onClose: e, children: [
|
|
48
|
+
/* @__PURE__ */ r(G, { params: a }),
|
|
47
49
|
/* @__PURE__ */ r(
|
|
48
|
-
|
|
50
|
+
j,
|
|
49
51
|
{
|
|
50
|
-
...
|
|
51
|
-
label:
|
|
52
|
+
...f,
|
|
53
|
+
label: f?.label || "Gi søket et navn",
|
|
52
54
|
size: "sm",
|
|
53
55
|
name: "title",
|
|
54
|
-
value: typeof s == "string" ? s :
|
|
55
|
-
onChange: (
|
|
56
|
-
typeof
|
|
56
|
+
value: typeof s == "string" ? s : x,
|
|
57
|
+
onChange: (t) => {
|
|
58
|
+
typeof c == "function" ? c(t) : I(t.target.value);
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
61
|
),
|
|
60
|
-
(
|
|
61
|
-
|
|
62
|
+
(o || i) && /* @__PURE__ */ g(h, { size: "md", children: [
|
|
63
|
+
o && /* @__PURE__ */ r(
|
|
62
64
|
d,
|
|
63
65
|
{
|
|
64
|
-
...
|
|
65
|
-
onClick: (
|
|
66
|
-
|
|
66
|
+
...o,
|
|
67
|
+
onClick: (t) => {
|
|
68
|
+
o.onClick?.(t), e();
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
),
|
|
70
|
-
|
|
72
|
+
i && /* @__PURE__ */ r(
|
|
71
73
|
d,
|
|
72
74
|
{
|
|
73
|
-
...
|
|
75
|
+
...i,
|
|
74
76
|
variant: "outline",
|
|
75
77
|
color: "danger",
|
|
76
|
-
onClick: (
|
|
77
|
-
|
|
78
|
+
onClick: (t) => {
|
|
79
|
+
i.onClick?.(t), e();
|
|
78
80
|
}
|
|
79
81
|
}
|
|
80
82
|
)
|
|
@@ -84,5 +86,5 @@ const O = ({
|
|
|
84
86
|
);
|
|
85
87
|
};
|
|
86
88
|
export {
|
|
87
|
-
|
|
89
|
+
X as BookmarksSettingsItem
|
|
88
90
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsxs as e, Fragment as s, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import "../../index-p1eeF8LQ.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { Heading as p } from "../Typography/Heading.js";
|
|
5
|
+
import "../Button/Button.js";
|
|
6
|
+
import "react-dom";
|
|
7
|
+
import "../RootProvider/RootProvider.js";
|
|
8
|
+
import { QueryLabel as a } from "../Searchbar/QueryLabel.js";
|
|
9
|
+
import "../Snackbar/useSnackbar.js";
|
|
10
|
+
const h = ({
|
|
11
|
+
loading: o,
|
|
12
|
+
title: r,
|
|
13
|
+
params: i,
|
|
14
|
+
highlightWords: t
|
|
15
|
+
}) => /* @__PURE__ */ e(s, { children: [
|
|
16
|
+
r && /* @__PURE__ */ m(p, { size: "sm", loading: o, highlightWords: t, children: r }),
|
|
17
|
+
/* @__PURE__ */ m(a, { params: i, size: r ? "xs" : "sm", variant: r ? "subtle" : "default" })
|
|
18
|
+
] });
|
|
19
|
+
export {
|
|
20
|
+
h as BookmarksSettingsItemLabel
|
|
21
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-p1eeF8LQ.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../Button/Button.js";
|
|
5
5
|
import "react-dom";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
7
|
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import { S as
|
|
9
|
-
const
|
|
8
|
+
import { S as l } from "../../SearchField-DhPNZyyE.js";
|
|
9
|
+
const j = ({
|
|
10
10
|
value: r,
|
|
11
11
|
name: o,
|
|
12
12
|
placeholder: t = "Search",
|
|
@@ -15,10 +15,11 @@ const d = ({
|
|
|
15
15
|
clearButtonAltText: i = "Clear search",
|
|
16
16
|
onChange: p,
|
|
17
17
|
onClear: m,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
onKeyDown: s,
|
|
19
|
+
menu: c,
|
|
20
|
+
minLength: f
|
|
21
|
+
}) => /* @__PURE__ */ h(
|
|
22
|
+
l,
|
|
22
23
|
{
|
|
23
24
|
size: "xs",
|
|
24
25
|
value: r,
|
|
@@ -27,15 +28,16 @@ const d = ({
|
|
|
27
28
|
clearButtonAltText: i,
|
|
28
29
|
onChange: p,
|
|
29
30
|
onClear: m,
|
|
31
|
+
onKeyDown: s,
|
|
30
32
|
collapsible: a,
|
|
31
33
|
autoComplete: "off",
|
|
32
34
|
autoCapitalize: "off",
|
|
33
35
|
type: "search",
|
|
34
|
-
minLength:
|
|
36
|
+
minLength: f,
|
|
35
37
|
loading: e,
|
|
36
|
-
menu:
|
|
38
|
+
menu: c
|
|
37
39
|
}
|
|
38
40
|
);
|
|
39
41
|
export {
|
|
40
|
-
|
|
42
|
+
j as ToolbarSearch
|
|
41
43
|
};
|
|
@@ -9,5 +9,6 @@ export declare const QueryItem: ({ type, label }: QueryItemProps) => import("rea
|
|
|
9
9
|
export interface QueryLabelProps {
|
|
10
10
|
params?: QueryItemProps[];
|
|
11
11
|
size?: QueryItemSize;
|
|
12
|
+
variant?: 'default' | 'subtle';
|
|
12
13
|
}
|
|
13
|
-
export declare const QueryLabel: ({ params, size }: QueryLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const QueryLabel: ({ params, size, variant }: QueryLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,6 +8,8 @@ export interface BookmarksSettingsItemProps extends SettingsItemProps {
|
|
|
8
8
|
loading?: boolean;
|
|
9
9
|
/** Optional title */
|
|
10
10
|
title?: string;
|
|
11
|
+
/** Optional title */
|
|
12
|
+
untitled?: string;
|
|
11
13
|
/** Query params */
|
|
12
14
|
params?: QueryItemProps[];
|
|
13
15
|
/** Input value */
|
|
@@ -27,4 +29,4 @@ export interface BookmarksSettingsItemProps extends SettingsItemProps {
|
|
|
27
29
|
/** Open */
|
|
28
30
|
open?: boolean;
|
|
29
31
|
}
|
|
30
|
-
export declare const BookmarksSettingsItem: ({ id, icon, loading, title, params, controls, inputValue, titleField, saveButton, removeButton, contextMenu, onChange, open, onClose, ...rest }: BookmarksSettingsItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare const BookmarksSettingsItem: ({ id, icon, loading, title, untitled, highlightWords, params, controls, inputValue, titleField, saveButton, removeButton, contextMenu, onChange, open, onClose, ...rest }: BookmarksSettingsItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { QueryItemProps } from '..';
|
|
2
|
+
export interface BookmarksSettingsItemLabelProps {
|
|
3
|
+
/** Optional title */
|
|
4
|
+
title?: string;
|
|
5
|
+
/** Query params */
|
|
6
|
+
params?: QueryItemProps[];
|
|
7
|
+
/** Loading */
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
/** Highlight words */
|
|
10
|
+
highlightWords?: string[];
|
|
11
|
+
}
|
|
12
|
+
export declare const BookmarksSettingsItemLabel: ({ loading, title, params, highlightWords, }: BookmarksSettingsItemLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,4 +2,4 @@ import { SearchFieldProps } from '../Forms';
|
|
|
2
2
|
export interface ToolbarSearchProps extends SearchFieldProps {
|
|
3
3
|
collapsible?: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare const ToolbarSearch: ({ value, name, placeholder, loading, collapsible, clearButtonAltText, onChange, onClear, menu, minLength, }: ToolbarSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const ToolbarSearch: ({ value, name, placeholder, loading, collapsible, clearButtonAltText, onChange, onClear, onKeyDown, menu, minLength, }: ToolbarSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ value, name, placeholder, loading, collapsible, clearButtonAltText, onChange, onClear, menu, minLength, }: import('./ToolbarSearch').ToolbarSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ value, name, placeholder, loading, collapsible, clearButtonAltText, onChange, onClear, onKeyDown, menu, minLength, }: import('./ToolbarSearch').ToolbarSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
decorators: ((Story: import('storybook/internal/csf').PartialStoryFn<import('@storybook/react-vite').ReactRenderer, {
|