@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.
@@ -1 +1 @@
1
- ._label_yf5z4_1{--dsc-item-font-size: .875rem;--dsc-item-padding-x: .5em;--dsc-item-padding-y: .25em;overflow:hidden;text-overflow:ellipsis;max-width:100%}._label_yf5z4_1[data-size=xs]{--dsc-item-font-size: .75rem;--dsc-item-padding-x: .25em;--dsc-item-padding-y: 0}._label_yf5z4_1{font-size:var(--dsc-item-font-size);display:flex;flex-wrap:wrap;align-items:center;column-gap:.25rem;row-gap:.25rem}._group_yf5z4_25{display:inline-flex;align-items:center;column-gap:.25rem}._plus_yf5z4_31{color:var(--ds-color-text-subtle)}._item_yf5z4_35{display:block;overflow:hidden;text-overflow:ellipsis;max-width:100%}._item_yf5z4_35[data-type=search]{background-color:transparent;font-weight:500;border-bottom:1px solid;padding:var(--dsc-item-padding-y) 0}._item_yf5z4_35[data-type=search]:before{content:"«"}._item_yf5z4_35[data-type=search]:after{content:"»"}._item_yf5z4_35[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
+ ._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 c } from "react/jsx-runtime";
2
- import '../../assets/QueryLabel.css';const n = "_label_yf5z4_1", o = "_group_yf5z4_25", p = "_plus_yf5z4_31", m = "_item_yf5z4_35", l = {
3
- label: n,
4
- group: o,
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: m
7
- }, u = ({ type: s = "search", label: t }) => /* @__PURE__ */ e("span", { className: l.item, "data-type": s, children: t }), i = ({ params: s = [], size: t = "sm" }) => /* @__PURE__ */ e("div", { className: l.label, "data-size": t, children: s.map((r, a) => /* @__PURE__ */ c("div", { className: l.group, children: [
8
- /* @__PURE__ */ e(u, { ...r }),
9
- s[a + 1] && /* @__PURE__ */ e("span", { className: l.plus, children: "+" })
10
- ] }, a)) });
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
- u as QueryItem,
13
- i as QueryLabel
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 b } from "react";
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 z } from "../ContextMenu/ContextMenu.js";
6
+ import { ContextMenu as C } from "../ContextMenu/ContextMenu.js";
7
7
  import "react-dom";
8
8
  import "../RootProvider/RootProvider.js";
9
- import { QueryLabel as k } from "../Searchbar/QueryLabel.js";
10
- import { TextField as C } from "../Forms/TextField.js";
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 G } from "./SettingsItemBase.js";
13
- import { SettingsModal as j } from "./SettingsModal.js";
14
- import { S as M } from "../../MagnifyingGlass-bwVhw07z.js";
15
- const O = ({
16
- id: u,
17
- icon: m = M,
18
- loading: x,
19
- title: l,
20
- params: n,
21
- controls: L,
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: a,
24
- saveButton: t,
25
- removeButton: o,
26
- contextMenu: f,
27
- onChange: p,
28
- open: c = !1,
26
+ titleField: f,
27
+ saveButton: o,
28
+ removeButton: i,
29
+ contextMenu: p,
30
+ onChange: c,
31
+ open: k = !1,
29
32
  onClose: e,
30
- ...S
33
+ ...b
31
34
  }) => {
32
- const [y, I] = b("");
35
+ const [x, I] = y("");
33
36
  return /* @__PURE__ */ r(
34
- G,
37
+ z,
35
38
  {
36
- ...S,
37
- id: u,
38
- expanded: c,
39
+ ...b,
40
+ id: S,
41
+ expanded: k,
39
42
  icon: m,
40
- loading: x,
41
- title: l,
42
- value: /* @__PURE__ */ r(k, { params: n, size: "xs" }),
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(j, { icon: m, title: l, open: c, onClose: e, children: [
46
- /* @__PURE__ */ r(k, { params: n }),
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
- C,
50
+ j,
49
51
  {
50
- ...a,
51
- label: a?.label || "Gi søket et navn",
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 : y,
55
- onChange: (i) => {
56
- typeof p == "function" ? p(i) : I(i.target.value);
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
- (t || o) && /* @__PURE__ */ g(h, { size: "md", children: [
61
- t && /* @__PURE__ */ r(
62
+ (o || i) && /* @__PURE__ */ g(h, { size: "md", children: [
63
+ o && /* @__PURE__ */ r(
62
64
  d,
63
65
  {
64
- ...t,
65
- onClick: (i) => {
66
- t.onClick?.(i), e();
66
+ ...o,
67
+ onClick: (t) => {
68
+ o.onClick?.(t), e();
67
69
  }
68
70
  }
69
71
  ),
70
- o && /* @__PURE__ */ r(
72
+ i && /* @__PURE__ */ r(
71
73
  d,
72
74
  {
73
- ...o,
75
+ ...i,
74
76
  variant: "outline",
75
77
  color: "danger",
76
- onClick: (i) => {
77
- o.onClick?.(i), e();
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
- O as BookmarksSettingsItem
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
+ };
@@ -30,7 +30,8 @@ const q = ({
30
30
  {
31
31
  ...r,
32
32
  key: r.id,
33
- title: r?.title || l,
33
+ title: r?.title,
34
+ untitled: l,
34
35
  loading: e || r.loading,
35
36
  onToggle: () => d?.(r.id),
36
37
  expanded: p === r.id
@@ -1,12 +1,12 @@
1
- import { jsx as f } from "react/jsx-runtime";
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 h } from "../../SearchField-DhPNZyyE.js";
9
- const d = ({
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
- menu: s,
19
- minLength: c
20
- }) => /* @__PURE__ */ f(
21
- h,
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: c,
36
+ minLength: f,
35
37
  loading: e,
36
- menu: s
38
+ menu: c
37
39
  }
38
40
  );
39
41
  export {
40
- d as ToolbarSearch
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, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.56.13",
3
+ "version": "0.56.14",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",