@altinn/altinn-components 0.56.13 → 0.56.15

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.
Files changed (35) hide show
  1. package/dist/{SearchField-DhPNZyyE.js → SearchField-QTfebYdU.js} +37 -37
  2. package/dist/assets/QueryLabel.css +1 -1
  3. package/dist/components/Account/AccountMenu.js +1 -1
  4. package/dist/components/ContextMenu/ContextMenu.js +1 -1
  5. package/dist/components/Dialog/DialogActions.js +1 -1
  6. package/dist/components/Forms/SearchField.js +1 -1
  7. package/dist/components/Forms/index.js +1 -1
  8. package/dist/components/GlobalHeader/AccountSelector.js +1 -1
  9. package/dist/components/GlobalMenu/GlobalMenu.js +1 -1
  10. package/dist/components/GlobalMenu/LocaleSwitcher.js +1 -1
  11. package/dist/components/GlobalMenu_old/GlobalMenu.js +1 -1
  12. package/dist/components/Header/LocaleSwitcher.js +1 -1
  13. package/dist/components/Layout/Layout.js +1 -1
  14. package/dist/components/Menu/Menu.js +1 -1
  15. package/dist/components/Menu/MenuItems.js +1 -1
  16. package/dist/components/Menu/MenuListSearch.js +1 -1
  17. package/dist/components/Menu/VirtualizedMenuItems.js +1 -1
  18. package/dist/components/Menu/index.js +1 -1
  19. package/dist/components/Searchbar/QueryLabel.js +11 -11
  20. package/dist/components/Settings/BookmarksSettingsItem.js +50 -48
  21. package/dist/components/Settings/BookmarksSettingsItemLabel.js +21 -0
  22. package/dist/components/Settings/BookmarksSettingsList.js +2 -1
  23. package/dist/components/Toolbar/SelectDateFilter.js +1 -1
  24. package/dist/components/Toolbar/ToolbarFilterAddMenu.js +1 -1
  25. package/dist/components/Toolbar/ToolbarFilterMenu.js +1 -1
  26. package/dist/components/Toolbar/ToolbarMenu.js +1 -1
  27. package/dist/components/Toolbar/ToolbarSearch.js +12 -10
  28. package/dist/components/index.js +1 -1
  29. package/dist/index.js +1 -1
  30. package/dist/types/lib/components/Searchbar/QueryLabel.d.ts +2 -1
  31. package/dist/types/lib/components/Settings/BookmarksSettingsItem.d.ts +3 -1
  32. package/dist/types/lib/components/Settings/BookmarksSettingsItemLabel.d.ts +12 -0
  33. package/dist/types/lib/components/Toolbar/ToolbarSearch.d.ts +1 -1
  34. package/dist/types/lib/components/Toolbar/ToolbarSearch.stories.d.ts +1 -1
  35. package/package.json +1 -1
@@ -34,7 +34,7 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", ke = "_searchInp
34
34
  onClear: y,
35
35
  onNavigate: k,
36
36
  combobox: f = !1,
37
- listId: c,
37
+ listId: a,
38
38
  "aria-activedescendant": w,
39
39
  onKeyDown: p,
40
40
  onInput: m,
@@ -44,7 +44,7 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", ke = "_searchInp
44
44
  // biome-ignore lint/a11y/useFocusableInteractive: <explanation>
45
45
  // biome-ignore lint/a11y/useAriaPropsForRole: <explanation>
46
46
  // biome-ignore lint/a11y/useSemanticElements: <explanation>
47
- /* @__PURE__ */ o("div", { role: "combobox", "aria-expanded": !0, "aria-haspopup": "listbox", "aria-owns": c, children: /* @__PURE__ */ o(
47
+ /* @__PURE__ */ o("div", { role: "combobox", "aria-expanded": !0, "aria-haspopup": "listbox", "aria-owns": a, children: /* @__PURE__ */ o(
48
48
  ue,
49
49
  {
50
50
  size: "xs",
@@ -59,7 +59,7 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", ke = "_searchInp
59
59
  autoCorrect: "off",
60
60
  autoCapitalize: "off",
61
61
  "aria-autocomplete": "list",
62
- "aria-controls": c,
62
+ "aria-controls": a,
63
63
  "aria-activedescendant": w,
64
64
  autoFocus: !0,
65
65
  onKeyDown: (r) => {
@@ -103,7 +103,7 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", ke = "_searchInp
103
103
  autoFocusList: y = !0,
104
104
  announceNoResults: k = !1,
105
105
  search: f,
106
- items: c,
106
+ items: a,
107
107
  groups: w = {},
108
108
  size: p,
109
109
  id: m,
@@ -118,11 +118,11 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", ke = "_searchInp
118
118
  if (b && v >= b)
119
119
  return null;
120
120
  const d = M === "combobox", i = d && m ? `${m}-listbox` : m, F = j(u), P = j(u), [R, C] = Q(!1), Y = V(
121
- () => c.map((n, I) => ({
121
+ () => a.map((n, I) => ({
122
122
  ...n,
123
123
  id: n.id || `${m}-item-${I}`
124
124
  })),
125
- [c, m]
125
+ [a, m]
126
126
  ), O = j(null), { menu: s, setActiveIndex: S, activeItem: W } = de({
127
127
  items: Y,
128
128
  groups: w,
@@ -190,7 +190,7 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", ke = "_searchInp
190
190
  /* @__PURE__ */ o(me, { hidden: q, children: /* @__PURE__ */ E(Z, { role: "presentation", children: [
191
191
  z && /* @__PURE__ */ o(ye, { title: z, level: v }),
192
192
  n?.items.filter((H) => !H.props?.hidden).map((H, e) => {
193
- const { active: t, onMouseEnter: l } = H, { groupId: K, ...a } = H.props || {}, { expanded: L } = a, U = Array.isArray(a?.items) && a.items.length > 0, J = a.role === "checkbox" || a.role === "radio", ee = d && !J ? "option" : a.role;
193
+ const { active: t, onMouseEnter: l } = H, { groupId: K, ...c } = H.props || {}, { expanded: L } = c, U = Array.isArray(c?.items) && c.items.length > 0, J = c.role === "checkbox" || c.role === "radio", ee = d && !J ? "option" : c.role;
194
194
  return /* @__PURE__ */ E(
195
195
  pe,
196
196
  {
@@ -201,28 +201,28 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", ke = "_searchInp
201
201
  /* @__PURE__ */ o(
202
202
  fe,
203
203
  {
204
- ...a,
205
- size: a?.size || $?.size || p,
206
- color: a?.color || $?.color || _,
207
- variant: a?.variant || $?.variant || x,
204
+ ...c,
205
+ size: c?.size || $?.size || p,
206
+ color: c?.color || $?.color || _,
207
+ variant: c?.variant || $?.variant || x,
208
208
  active: t,
209
209
  role: ee,
210
- selected: a.selected,
211
- tabIndex: a?.disabled || g ? -1 : a.tabIndex ?? 0,
210
+ selected: c.selected,
211
+ tabIndex: c?.disabled || g ? -1 : c.tabIndex ?? 0,
212
212
  onMouseEnter: l,
213
213
  "aria-haspopup": U ? "menu" : void 0,
214
214
  "aria-expanded": U ? L : void 0,
215
- "aria-controls": U ? a.id + "-menu" : void 0
215
+ "aria-controls": U ? c.id + "-menu" : void 0
216
216
  }
217
217
  ),
218
- L && a?.items && /* @__PURE__ */ o(
218
+ L && c?.items && /* @__PURE__ */ o(
219
219
  ge,
220
220
  {
221
- id: a.id + "-menu",
221
+ id: c.id + "-menu",
222
222
  expanded: L,
223
223
  level: v + 1,
224
224
  maxLevels: b,
225
- items: a?.items,
225
+ items: c?.items,
226
226
  groups: w,
227
227
  size: p,
228
228
  color: _,
@@ -247,7 +247,7 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", ke = "_searchInp
247
247
  groups: y = {},
248
248
  size: k,
249
249
  color: f,
250
- variant: c,
250
+ variant: a,
251
251
  keyboardEvents: w,
252
252
  scrollRefStyles: p = {},
253
253
  id: m,
@@ -310,8 +310,8 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", ke = "_searchInp
310
310
  }
311
311
  const K = I.getOffsetForIndex(z - 1, "auto");
312
312
  if (!K) return;
313
- const [a, L] = K;
314
- L !== "auto" && I.scrollToOffset(a + M + 10, { align: "start" });
313
+ const [c, L] = K;
314
+ L !== "auto" && I.scrollToOffset(c + M + 10, { align: "start" });
315
315
  }, [z, M, I, q]);
316
316
  const X = V(() => {
317
317
  const e = /* @__PURE__ */ new Map();
@@ -349,7 +349,7 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", ke = "_searchInp
349
349
  {
350
350
  ref: b,
351
351
  style: H,
352
- variant: c,
352
+ variant: a,
353
353
  color: f,
354
354
  expanded: _,
355
355
  id: F,
@@ -415,19 +415,19 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", ke = "_searchInp
415
415
  case "header":
416
416
  return /* @__PURE__ */ o(ye, { ...K, title: t.title || "", level: 1 }, e.key);
417
417
  default: {
418
- const a = t.itemProps?.role === "checkbox" || t.itemProps?.role === "radio", L = i && !a ? "option" : t.itemProps?.role;
418
+ const c = t.itemProps?.role === "checkbox" || t.itemProps?.role === "radio", L = i && !c ? "option" : t.itemProps?.role;
419
419
  return /* @__PURE__ */ o(
420
420
  pe,
421
421
  {
422
422
  ...K,
423
- role: i || a ? "presentation" : "menuitem",
423
+ role: i || c ? "presentation" : "menuitem",
424
424
  children: /* @__PURE__ */ o(
425
425
  fe,
426
426
  {
427
427
  ...t.itemProps || {},
428
428
  size: t.itemProps?.size || k,
429
429
  color: t.itemProps?.color || f,
430
- variant: t.itemProps?.variant || c,
430
+ variant: t.itemProps?.variant || a,
431
431
  active: t.active,
432
432
  role: L,
433
433
  selected: t.itemProps?.selected,
@@ -458,7 +458,7 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", ke = "_searchInp
458
458
  maxLevels: y = 3,
459
459
  virtualized: k = !1,
460
460
  keyboardEvents: f = !1,
461
- scrollRefStyles: c = {},
461
+ scrollRefStyles: a = {},
462
462
  onActiveItemIdChange: w,
463
463
  a11yMode: p = "menu",
464
464
  open: m,
@@ -480,7 +480,7 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", ke = "_searchInp
480
480
  level: A,
481
481
  maxLevels: y,
482
482
  keyboardEvents: f,
483
- scrollRefStyles: c,
483
+ scrollRefStyles: a,
484
484
  onActiveItemIdChange: w,
485
485
  a11yMode: p,
486
486
  open: m,
@@ -501,7 +501,7 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", ke = "_searchInp
501
501
  level: A,
502
502
  maxLevels: y,
503
503
  keyboardEvents: f,
504
- scrollRefStyles: c,
504
+ scrollRefStyles: a,
505
505
  onActiveItemIdChange: w,
506
506
  a11yMode: p,
507
507
  open: m,
@@ -529,22 +529,22 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", ke = "_searchInp
529
529
  value: y,
530
530
  onClear: k,
531
531
  clearButtonAltText: f = "Clear search",
532
- menu: c,
532
+ menu: a,
533
533
  minLength: w,
534
534
  ...p
535
535
  }) => {
536
- const m = re(), [_, x] = Q(!1), r = p.id || `search-field-${m}`, g = `${r}-listbox`, [T, N] = Q(void 0), d = "searchfield-clear-button-" + re(), i = V(() => !y || typeof w == "number" && typeof y == "string" && y.length < w ? !1 : _, [_, w, y]), F = V(() => (c?.items ?? []).map((s) => ({
536
+ const m = re(), [_, x] = Q(!1), r = p.id || `search-field-${m}`, g = `${r}-listbox`, [T, N] = Q(void 0), d = "searchfield-clear-button-" + re(), i = V(() => !a || !y || typeof w == "number" && typeof y == "string" && y.length < w ? !1 : _, [a, _, w, y]), F = V(() => (a?.items ?? []).map((s) => ({
537
537
  ...s,
538
538
  onClick: () => {
539
539
  s.onClick?.(), x(!1);
540
540
  }
541
- })), [c]), P = (s) => {
541
+ })), [a]), P = (s) => {
542
542
  if (s.key === "Enter" && i) {
543
- c?.items?.[0]?.onClick?.(), x(!1);
543
+ a?.items?.[0]?.onClick?.(), x(!1);
544
544
  return;
545
545
  }
546
546
  if (s.key === "Escape" && i) {
547
- s.preventDefault(), s.stopPropagation(), x(!1), c?.onClose(), document.getElementById(r)?.focus();
547
+ s.preventDefault(), s.stopPropagation(), x(!1), a?.onClose(), document.getElementById(r)?.focus();
548
548
  return;
549
549
  }
550
550
  p.onKeyDown?.(s), x(!0);
@@ -559,7 +559,7 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", ke = "_searchInp
559
559
  }, O = (s) => {
560
560
  s.relatedTarget?.id === d && N(void 0), p.onBlur?.(s);
561
561
  };
562
- return c ? /* @__PURE__ */ E("div", { className: D.fieldContainer, children: [
562
+ return a ? /* @__PURE__ */ E("div", { className: D.fieldContainer, children: [
563
563
  /* @__PURE__ */ E(
564
564
  ae,
565
565
  {
@@ -583,7 +583,7 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", ke = "_searchInp
583
583
  minLength: w,
584
584
  onKeyDown: P,
585
585
  onBlur: O,
586
- ...c && {
586
+ ...a && {
587
587
  role: "combobox",
588
588
  "aria-autocomplete": "list",
589
589
  "aria-expanded": !!i,
@@ -616,13 +616,13 @@ import './assets/SearchField.css';const Ce = "_search_18jfe_1", ke = "_searchInp
616
616
  ]
617
617
  }
618
618
  ),
619
- c && i && /* @__PURE__ */ o("div", { className: D.autocomplete, "aria-hidden": !i, onMouseDown: Y, children: /* @__PURE__ */ o(
619
+ a && i && /* @__PURE__ */ o("div", { className: D.autocomplete, "aria-hidden": !i, onMouseDown: Y, children: /* @__PURE__ */ o(
620
620
  Me,
621
621
  {
622
- ...c,
622
+ ...a,
623
623
  id: g,
624
624
  items: F,
625
- groups: c?.groups,
625
+ groups: a?.groups,
626
626
  keyboardEvents: !0,
627
627
  a11yMode: "combobox",
628
628
  open: i,
@@ -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}
@@ -5,7 +5,7 @@ import "../../index-p1eeF8LQ.js";
5
5
  import "../Button/Button.js";
6
6
  import "react-dom";
7
7
  import "../RootProvider/RootProvider.js";
8
- import { M as S } from "../../SearchField-DhPNZyyE.js";
8
+ import { M as S } from "../../SearchField-QTfebYdU.js";
9
9
  import "../Snackbar/useSnackbar.js";
10
10
  const F = (n) => `${n} hits`, G = ({
11
11
  items: n = [],
@@ -5,7 +5,7 @@ import "../../index-p1eeF8LQ.js";
5
5
  import u, { forwardRef as s } from "react";
6
6
  import { Dropdown as m } from "../Dropdown/Dropdown.js";
7
7
  import { useRootContext as c } from "../RootProvider/RootProvider.js";
8
- import { M as f } from "../../SearchField-DhPNZyyE.js";
8
+ import { M as f } from "../../SearchField-QTfebYdU.js";
9
9
  import "../Snackbar/useSnackbar.js";
10
10
  import { useDropdownMenuController as g } from "../Menu/useDropdownMenuController.js";
11
11
  import { Tooltip as b } from "../Tooltip/Tooltip.js";
@@ -8,7 +8,7 @@ import { ButtonGroupDivider as B } from "../Button/ButtonGroupDivider.js";
8
8
  import { DropdownBase as x } from "../Dropdown/DropdownBase.js";
9
9
  import "react-dom";
10
10
  import { useRootContext as _ } from "../RootProvider/RootProvider.js";
11
- import { M as v } from "../../SearchField-DhPNZyyE.js";
11
+ import { M as v } from "../../SearchField-QTfebYdU.js";
12
12
  import "../Snackbar/useSnackbar.js";
13
13
  import { S as k, a as D } from "../../ChevronUp-_BBfEirx.js";
14
14
  import '../../assets/DialogActions.css';const I = "_action_1n930_1", M = "_comboButton_1n930_8", m = {
@@ -4,7 +4,7 @@ import "react";
4
4
  import "../Button/Button.js";
5
5
  import "react-dom";
6
6
  import "../RootProvider/RootProvider.js";
7
- import { S as s } from "../../SearchField-DhPNZyyE.js";
7
+ import { S as s } from "../../SearchField-QTfebYdU.js";
8
8
  import "./Input.js";
9
9
  import "./FieldBase.js";
10
10
  import "../Snackbar/useSnackbar.js";
@@ -12,7 +12,7 @@ import { FieldBase as B } from "./FieldBase.js";
12
12
  import { TextField as C } from "./TextField.js";
13
13
  import { TextareaField as R } from "./TextareaField.js";
14
14
  import { SelectField as u } from "./SelectField.js";
15
- import { S as I } from "../../SearchField-DhPNZyyE.js";
15
+ import { S as I } from "../../SearchField-QTfebYdU.js";
16
16
  import { TextFieldDropdown as q } from "./TextFieldDropdown.js";
17
17
  import { FieldsetBase as y } from "./FieldsetBase.js";
18
18
  import { OptionsBase as A } from "./OptionsBase.js";
@@ -8,7 +8,7 @@ import { Button as A } from "../Button/Button.js";
8
8
  import "react-dom";
9
9
  import { useRootContext as P } from "../RootProvider/RootProvider.js";
10
10
  import "../Snackbar/useSnackbar.js";
11
- import { S as H } from "../../SearchField-DhPNZyyE.js";
11
+ import { S as H } from "../../SearchField-QTfebYdU.js";
12
12
  import { S as T } from "../../button-BB5sYVKY.js";
13
13
  import { H as V, S as B } from "../../switch-Cemfhx0H.js";
14
14
  import { u as j } from "../../useId-BVFxCjkq.js";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsxs as f, jsx as e } from "react/jsx-runtime";
3
3
  import { useState as d, useCallback as G, useEffect as L, useMemo as C } from "react";
4
- import { M as S } from "../../SearchField-DhPNZyyE.js";
4
+ import { M as S } from "../../SearchField-QTfebYdU.js";
5
5
  import "../../index-p1eeF8LQ.js";
6
6
  import "../Button/Button.js";
7
7
  import "react-dom";
@@ -2,7 +2,7 @@
2
2
  import { jsx as a } from "react/jsx-runtime";
3
3
  import { useRef as g, useMemo as l } from "react";
4
4
  import { useEnterKey as v } from "../../hooks/useEnterKey.js";
5
- import { a as h } from "../../SearchField-DhPNZyyE.js";
5
+ import { a as h } from "../../SearchField-QTfebYdU.js";
6
6
  import "../../index-p1eeF8LQ.js";
7
7
  import "../Button/Button.js";
8
8
  import "react-dom";
@@ -6,7 +6,7 @@ import { AccountMenu as x } from "../Account/AccountMenu.js";
6
6
  import "../Button/Button.js";
7
7
  import "react-dom";
8
8
  import "../RootProvider/RootProvider.js";
9
- import { M as f } from "../../SearchField-DhPNZyyE.js";
9
+ import { M as f } from "../../SearchField-QTfebYdU.js";
10
10
  import { MenuListItem as h } from "../Menu/MenuListItem.js";
11
11
  import { CurrentAccount as y } from "./CurrentAccount.js";
12
12
  import { BackButton as j } from "./BackButton.js";
@@ -7,7 +7,7 @@ import { DropdownBase as x } from "../Dropdown/DropdownBase.js";
7
7
  import "../../index-p1eeF8LQ.js";
8
8
  import "react-dom";
9
9
  import "../Button/Button.js";
10
- import { a as p } from "../../SearchField-DhPNZyyE.js";
10
+ import { a as p } from "../../SearchField-QTfebYdU.js";
11
11
  import { useRootContext as I } from "../RootProvider/RootProvider.js";
12
12
  import { LocaleButton as S } from "./LocaleButton.js";
13
13
  import "../Snackbar/useSnackbar.js";
@@ -11,7 +11,7 @@ import { Footer as B } from "../Footer/Footer.js";
11
11
  import { GlobalHeader as j } from "../GlobalHeader/GlobalHeader.js";
12
12
  import "react";
13
13
  import "../Button/Button.js";
14
- import { M as k } from "../../SearchField-DhPNZyyE.js";
14
+ import { M as k } from "../../SearchField-QTfebYdU.js";
15
15
  import { useRootContext as C } from "../RootProvider/RootProvider.js";
16
16
  import { Header as F } from "../Header/Header.js";
17
17
  import "../Snackbar/useSnackbar.js";
@@ -1,5 +1,5 @@
1
1
  import "react/jsx-runtime";
2
- import { M as t } from "../../SearchField-DhPNZyyE.js";
2
+ import { M as t } from "../../SearchField-QTfebYdU.js";
3
3
  import "./useMenuSearch.js";
4
4
  export {
5
5
  t as Menu
@@ -5,7 +5,7 @@ import "../../hooks/useMenu.js";
5
5
  import "../Button/Button.js";
6
6
  import "react-dom";
7
7
  import "../RootProvider/RootProvider.js";
8
- import { a as c } from "../../SearchField-DhPNZyyE.js";
8
+ import { a as c } from "../../SearchField-QTfebYdU.js";
9
9
  import "./MenuItem.js";
10
10
  import "./MenuList.js";
11
11
  import "./MenuListItem.js";
@@ -4,7 +4,7 @@ import "react";
4
4
  import "../Button/Button.js";
5
5
  import "react-dom";
6
6
  import "../RootProvider/RootProvider.js";
7
- import { b } from "../../SearchField-DhPNZyyE.js";
7
+ import { b } from "../../SearchField-QTfebYdU.js";
8
8
  import "../Snackbar/useSnackbar.js";
9
9
  export {
10
10
  b as MenuListSearch
@@ -5,7 +5,7 @@ import "../../hooks/useMenu.js";
5
5
  import "../Button/Button.js";
6
6
  import "react-dom";
7
7
  import "../RootProvider/RootProvider.js";
8
- import { V as I } from "../../SearchField-DhPNZyyE.js";
8
+ import { V as I } from "../../SearchField-QTfebYdU.js";
9
9
  import "./MenuItem.js";
10
10
  import "./MenuList.js";
11
11
  import "./MenuListItem.js";
@@ -1,4 +1,4 @@
1
- import { M as t, a as o, b as n, V as u } from "../../SearchField-DhPNZyyE.js";
1
+ import { M as t, a as o, b as n, V as u } from "../../SearchField-QTfebYdU.js";
2
2
  import { MenuItem as M } from "./MenuItem.js";
3
3
  import { MenuList as s } from "./MenuList.js";
4
4
  import { MenuListItem as a } from "./MenuListItem.js";
@@ -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,6 +1,6 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
2
  import { useRef as L, useState as u, useCallback as O, useEffect as R } from "react";
3
- import { M as x } from "../../SearchField-DhPNZyyE.js";
3
+ import { M as x } from "../../SearchField-QTfebYdU.js";
4
4
  import "../../index-p1eeF8LQ.js";
5
5
  import "../Button/Button.js";
6
6
  import "react-dom";
@@ -5,7 +5,7 @@ import { Button as b } from "../Button/Button.js";
5
5
  import "../../index-p1eeF8LQ.js";
6
6
  import { Dropdown as O } from "../Dropdown/Dropdown.js";
7
7
  import "../RootProvider/RootProvider.js";
8
- import { M as I } from "../../SearchField-DhPNZyyE.js";
8
+ import { M as I } from "../../SearchField-QTfebYdU.js";
9
9
  import { useDropdownMenuController as x } from "../Menu/useDropdownMenuController.js";
10
10
  import "../Snackbar/useSnackbar.js";
11
11
  import { u as R } from "../../useId-BVFxCjkq.js";
@@ -2,7 +2,7 @@ import { jsx as n } from "react/jsx-runtime";
2
2
  import { useRef as q, useEffect as G } from "react";
3
3
  import "../../index-p1eeF8LQ.js";
4
4
  import "../Button/Button.js";
5
- import { M as H } from "../../SearchField-DhPNZyyE.js";
5
+ import { M as H } from "../../SearchField-QTfebYdU.js";
6
6
  import { useDropdownMenuController as J } from "../Menu/useDropdownMenuController.js";
7
7
  import "../RootProvider/RootProvider.js";
8
8
  import "../Snackbar/useSnackbar.js";
@@ -4,7 +4,7 @@ import "../../index-p1eeF8LQ.js";
4
4
  import "react";
5
5
  import { Dropdown as c } from "../Dropdown/Dropdown.js";
6
6
  import "../RootProvider/RootProvider.js";
7
- import { M as b } from "../../SearchField-DhPNZyyE.js";
7
+ import { M as b } from "../../SearchField-QTfebYdU.js";
8
8
  import { useDropdownMenuController as f } from "../Menu/useDropdownMenuController.js";
9
9
  import "../Snackbar/useSnackbar.js";
10
10
  import { S as h } from "../../ChevronUpDown-DqGsU4MC.js";
@@ -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-QTfebYdU.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
  };
@@ -99,7 +99,7 @@ import { ListItemControls as Ve } from "./List/ListItemControls.js";
99
99
  import { ListItemSelect as Qe } from "./List/ListItemSelect.js";
100
100
  import { ListItem as je } from "./List/ListItem.js";
101
101
  import { List as Je } from "./List/List.js";
102
- import { M as We, a as Xe, b as Ye, S as Ze, V as $e } from "../SearchField-DhPNZyyE.js";
102
+ import { M as We, a as Xe, b as Ye, S as Ze, V as $e } from "../SearchField-QTfebYdU.js";
103
103
  import { MenuItem as rt } from "./Menu/MenuItem.js";
104
104
  import { MenuList as tt } from "./Menu/MenuList.js";
105
105
  import { MenuListItem as pt } from "./Menu/MenuListItem.js";
package/dist/index.js CHANGED
@@ -99,7 +99,7 @@ import { ListItemControls as Ve } from "./components/List/ListItemControls.js";
99
99
  import { ListItemSelect as Qe } from "./components/List/ListItemSelect.js";
100
100
  import { ListItem as Ke } from "./components/List/ListItem.js";
101
101
  import { List as qe } from "./components/List/List.js";
102
- import { M as We, a as Xe, b as Ye, S as Ze, V as $e } from "./SearchField-DhPNZyyE.js";
102
+ import { M as We, a as Xe, b as Ye, S as Ze, V as $e } from "./SearchField-QTfebYdU.js";
103
103
  import { MenuItem as rt } from "./components/Menu/MenuItem.js";
104
104
  import { MenuList as tt } from "./components/Menu/MenuList.js";
105
105
  import { MenuListItem as pt } from "./components/Menu/MenuListItem.js";
@@ -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.15",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",