@hortiview/shared-components 2.19.0 → 2.19.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [2.19.1](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v2.19.0...v2.19.1) (2026-03-24)
2
+
3
+ ### Code Refactoring
4
+
5
+ * add variant prop to SearchBar and update ListArea usage ([49dda20](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/49dda20ad8db46234d2f87f24519736f6b9ec746))
6
+ * remove centered layout from stories and add BasicLayout as decorator to preview ([7c03c49](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/7c03c497c96978eea35b98256627ded9378827c8))
7
+ * replace FullWidthDecorator with BasicLayout in Storybook preview ([b44d297](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/b44d29716a79f80ddae02774fcd8fedae397078b))
8
+
1
9
  ## [2.19.0](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v2.18.1...v2.19.0) (2026-03-18)
2
10
 
3
11
  ### Features
@@ -3,8 +3,8 @@ import { D } from "../../index.es-C27R5Xae.js";
3
3
  import { E as j } from "../../index.es-DhlgTSuU.js";
4
4
  import { L as A } from "../../index.es-Cg57snrN.js";
5
5
  import { c as p } from "../../index-Df2FYN-K.js";
6
- import { o as w } from "../../orderBy-Ce85KqD6.js";
7
- import { useState as E, useMemo as v } from "react";
6
+ import { o as v } from "../../orderBy-Ce85KqD6.js";
7
+ import { useState as E, useMemo as w } from "react";
8
8
  import { SearchBar as I } from "../SearchBar/SearchBar.js";
9
9
  import { g as M, a as N, s as e } from "../../ListAreaService-Y8wR14Xq.js";
10
10
  const G = ({
@@ -15,21 +15,21 @@ const G = ({
15
15
  searchPlaceholder: g = "",
16
16
  isIntegrated: x = !0,
17
17
  isSorted: l = !0,
18
- itemClassName: c = "",
18
+ itemClassName: d = "",
19
19
  maxHeight: T = "100%",
20
- noElementsView: y,
20
+ noElementsView: b,
21
21
  hasLastItemNoRoundedEdges: m = !1,
22
- "data-testid": C,
22
+ "data-testid": y,
23
23
  nonInteractive: n = !1,
24
- routerLinkElement: d
24
+ routerLinkElement: c
25
25
  }) => {
26
- const [r, b] = E(""), s = v(() => {
27
- if (!r) return l ? w(t, "title") : t;
26
+ const [r, C] = E(""), s = w(() => {
27
+ if (!r) return l ? v(t, "title") : t;
28
28
  const u = t.filter((f) => f.title.toLowerCase().includes(r.toLowerCase()) || f.subTitle?.toLowerCase().includes(r.toLowerCase()) || f.overlineTitle?.toLowerCase().includes(r.toLowerCase()));
29
- return l ? w(u, "title") : u;
30
- }, [r, t, l]), B = v(
31
- () => i ? M(s, o, c, d) : N(s, o, c, d),
32
- [s, o, c, i, d]
29
+ return l ? v(u, "title") : u;
30
+ }, [r, t, l]), B = w(
31
+ () => i ? M(s, o, d, c) : N(s, o, d, c),
32
+ [s, o, d, i, c]
33
33
  );
34
34
  return /* @__PURE__ */ a(
35
35
  j,
@@ -43,19 +43,20 @@ const G = ({
43
43
  I,
44
44
  {
45
45
  searchTerm: r,
46
- setSearchTerm: b,
46
+ setSearchTerm: C,
47
47
  className: e.searchbar,
48
- placeholder: g
48
+ placeholder: g,
49
+ variant: "embedded"
49
50
  }
50
51
  ),
51
52
  /* @__PURE__ */ a(D, {})
52
53
  ] }),
53
- s.length === 0 && y,
54
+ s.length === 0 && b,
54
55
  /* @__PURE__ */ a(
55
56
  A,
56
57
  {
57
58
  nonInteractive: n,
58
- "data-testid": C,
59
+ "data-testid": y,
59
60
  items: B,
60
61
  className: p(
61
62
  e.list,
@@ -9,6 +9,11 @@ type SearchBarProps = Pick<TextfieldProps, 'placeholder' | 'dense' | 'className'
9
9
  * the function to set the search term
10
10
  */
11
11
  setSearchTerm: (value: string) => void;
12
+ /**
13
+ * Applies the selected styling to the SearchBar.
14
+ * @default outlined
15
+ */
16
+ variant?: 'embedded' | 'outlined' | 'filled';
12
17
  };
13
- export declare const SearchBar: ({ className, dense, searchTerm, setSearchTerm, placeholder, fullWidth, label }: SearchBarProps) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const SearchBar: ({ className, dense, searchTerm, setSearchTerm, placeholder, fullWidth, label, variant, }: SearchBarProps) => import("react/jsx-runtime").JSX.Element;
14
19
  export {};
@@ -1,30 +1,31 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { I as l } from "../../index.es-CkB4776y.js";
3
- import { T as u } from "../../index.es-B9BUXRQn.js";
4
- import '../../assets/SearchBar.css';const b = "_searchbar_g83qp_1", d = {
5
- searchbar: b
6
- }, g = ({
2
+ import { I as u } from "../../index.es-CkB4776y.js";
3
+ import { T as b } from "../../index.es-B9BUXRQn.js";
4
+ import '../../assets/SearchBar.css';const d = "_searchbar_g83qp_1", p = {
5
+ searchbar: d
6
+ }, m = ({
7
7
  className: r = "",
8
8
  dense: e = !1,
9
9
  searchTerm: t,
10
10
  setSearchTerm: a,
11
- placeholder: n,
12
- fullWidth: s = !0,
13
- label: c
11
+ placeholder: s,
12
+ fullWidth: n = !0,
13
+ label: c,
14
+ variant: i = "outlined"
14
15
  }) => /* @__PURE__ */ o(
15
- u,
16
+ b,
16
17
  {
17
18
  "data-testid": "search-bar-input",
18
- className: `${r ?? ""} ${d.searchbar}`,
19
+ className: `${r ?? ""} ${p.searchbar}`,
19
20
  dense: e,
20
21
  label: c,
21
- variant: "outlined",
22
- placeholder: n,
22
+ variant: i,
23
+ placeholder: s,
23
24
  value: t,
24
- onChange: (i) => a(i.target.value),
25
- fullWidth: s,
25
+ onChange: (l) => a(l.target.value),
26
+ fullWidth: n,
26
27
  trailingIcon: /* @__PURE__ */ o(
27
- l,
28
+ u,
28
29
  {
29
30
  "data-testid": "search-bar-icon-button",
30
31
  icon: t ? "close" : "search",
@@ -35,5 +36,5 @@ import '../../assets/SearchBar.css';const b = "_searchbar_g83qp_1", d = {
35
36
  }
36
37
  );
37
38
  export {
38
- g as SearchBar
39
+ m as SearchBar
39
40
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hortiview/shared-components",
3
3
  "description": "This is a shared component library. It should used in the HortiView platform and its modules.",
4
- "version": "2.19.0",
4
+ "version": "2.19.1",
5
5
  "type": "module",
6
6
  "repository": "https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared",
7
7
  "author": "Falk Menge <falk.menge.ext@bayer.com>",