@memobit/libs 3.23.0 → 3.24.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.
@@ -1 +1 @@
1
- .memobit-toolbar{background-color:var(--header-background-color);border-bottom:var(--spacing-1) solid var(--header-border-bottom-color);border-radius:var(--spacing-16);align-items:flex-end;gap:var(--spacing-16);padding:var(--spacing-16);flex-wrap:wrap;display:flex}.memobit-toolbar__control-panel-toggle,.memobit-toolbar__sort{flex:none}.memobit-toolbar__control-panel-toggle-count{min-width:var(--spacing-20);height:var(--spacing-20);padding:0 var(--spacing-6);background:var(--body-accent-color);color:var(--button-info-color);font-size:var(--font-size-xs);font-weight:var(--font-weight-semibold);border-radius:999px;justify-content:center;align-items:center;display:inline-flex}.memobit-toolbar__heading{align-items:center;gap:var(--spacing-8);flex:0 auto;align-self:center;min-width:0;display:flex}.memobit-toolbar__heading--clickable{cursor:pointer}.memobit-toolbar__heading-icon{flex:none;align-items:center;display:inline-flex}.memobit-toolbar__heading-copy{gap:var(--spacing-2);flex-direction:column;min-width:0;display:flex}.memobit-toolbar__heading-title{color:var(--body-title-color);font-family:var(--font-family-display);font-size:var(--font-size-lg);font-weight:var(--font-weight-bold);line-height:1.2}.memobit-toolbar__heading-description{color:var(--body-color-muted);font-size:var(--font-size-sm);text-transform:uppercase;letter-spacing:.05em;line-height:1.3}.memobit-toolbar__content{display:contents}.memobit-toolbar__search{flex:1000 280px;min-width:180px}.memobit-toolbar__search-input,.memobit-toolbar__search-input .input-text{width:100%}.memobit-toolbar__sort{min-width:220px}.memobit-toolbar__custom{align-self:stretch;align-items:flex-end;gap:var(--spacing-16);flex:auto;min-width:0;display:flex}.memobit-toolbar__end{align-items:flex-end;gap:var(--spacing-16);flex:auto;min-width:0;display:flex}.memobit-toolbar__actions{align-items:center;gap:var(--spacing-8);flex:0 auto;min-width:0;margin-left:auto;display:flex}.memobit-toolbar__actions>.NotificationPanel{align-self:stretch}.memobit-toolbar__actions>.NotificationPanel>.NotificationPanel__button{height:100%}.memobit-toolbar--no-card{background-color:#0000;border-bottom:0;border-radius:0;padding:0}@media (width<=768px){.memobit-toolbar{align-items:center;gap:var(--spacing-8);padding:var(--spacing-8)}.memobit-toolbar__control-panel-toggle{order:1}.memobit-toolbar__heading{flex:auto;order:1}.memobit-toolbar__actions{order:2;margin-left:auto}.memobit-toolbar__end{display:contents}.memobit-toolbar__content{align-items:stretch;gap:var(--spacing-8);flex-direction:column;flex:100%;order:3;width:100%;display:flex}.memobit-toolbar__search,.memobit-toolbar__custom{flex:auto;width:100%;min-width:0}.memobit-toolbar__sort{flex:100%;order:4;min-width:0}.memobit-toolbar__custom{gap:var(--spacing-8);flex-wrap:wrap}.memobit-toolbar__custom>*{flex:auto;min-width:0;max-width:100%}}
1
+ .memobit-toolbar{background-color:var(--header-background-color);border-bottom:var(--spacing-1) solid var(--header-border-bottom-color);border-radius:var(--spacing-16);align-items:flex-end;gap:var(--spacing-16);padding:var(--spacing-16);flex-wrap:wrap;display:flex}.memobit-toolbar__control-panel-toggle,.memobit-toolbar__sort{flex:none}.memobit-toolbar__control-panel-toggle-count{min-width:var(--spacing-20);height:var(--spacing-20);padding:0 var(--spacing-6);background:var(--body-accent-color);color:var(--button-info-color);font-size:var(--font-size-xs);font-weight:var(--font-weight-semibold);border-radius:999px;justify-content:center;align-items:center;display:inline-flex}.memobit-toolbar__heading{align-items:center;gap:var(--spacing-8);flex:0 auto;align-self:center;min-width:0;display:flex}.memobit-toolbar__heading--clickable{cursor:pointer}.memobit-toolbar__heading-icon{flex:none;align-items:center;display:inline-flex}.memobit-toolbar__heading-copy{gap:var(--spacing-2);flex-direction:column;min-width:0;display:flex}.memobit-toolbar__heading-title{color:var(--body-title-color);font-family:var(--font-family-display);font-size:var(--font-size-lg);font-weight:var(--font-weight-bold);line-height:1.2}.memobit-toolbar__heading-description{color:var(--body-color-muted);font-size:var(--font-size-sm);text-transform:uppercase;letter-spacing:.05em;line-height:1.3}.memobit-toolbar__content{display:contents}.memobit-toolbar__search{flex:1000 280px;min-width:180px}.memobit-toolbar__search-input,.memobit-toolbar__search-input .input-text{width:100%}.memobit-toolbar__sort{min-width:220px}.memobit-toolbar__custom{align-self:stretch;align-items:flex-end;gap:var(--spacing-16);flex:auto;min-width:0;display:flex}.memobit-toolbar__end{align-items:flex-end;gap:var(--spacing-16);flex:auto;min-width:0;display:flex}.memobit-toolbar__actions{align-items:center;gap:var(--spacing-8);flex:0 auto;min-width:0;margin-left:auto;display:flex}.memobit-toolbar__actions>.NotificationPanel{align-self:stretch}.memobit-toolbar__actions>.NotificationPanel>.NotificationPanel__button{height:100%}.memobit-toolbar--no-card{background-color:#0000;border-bottom:0;border-radius:0;padding:0}@media (width<=768px){.memobit-toolbar{align-items:center;gap:var(--spacing-8);padding:var(--spacing-8)}.memobit-toolbar__control-panel-toggle{order:1}.memobit-toolbar__heading{flex:auto;order:1}.memobit-toolbar__actions{order:2;margin-left:auto}.memobit-toolbar__end{display:contents}.memobit-toolbar__content{align-items:stretch;gap:var(--spacing-8);flex-direction:column;flex:100%;order:3;width:100%;display:flex}.memobit-toolbar__search,.memobit-toolbar__custom{flex:auto;width:100%;min-width:0}.memobit-toolbar__sort{flex:100%;order:4;min-width:0}.memobit-toolbar__custom{gap:var(--spacing-8);flex-wrap:wrap}.memobit-toolbar__custom>*{flex:auto;min-width:0;max-width:100%}}.memobit-toolbar-floating{top:var(--spacing-16);right:var(--spacing-16);z-index:900;align-items:stretch;gap:var(--spacing-8);padding:var(--spacing-8);background-color:var(--header-background-color);border:var(--spacing-1) solid var(--header-border-bottom-color);border-radius:var(--radius);box-shadow:var(--spacing-2) var(--spacing-2) var(--spacing-8) var(--box-shadow);display:flex;position:fixed}.memobit-toolbar-floating>.NotificationPanel>.NotificationPanel__button{height:100%}.memobit-toolbar-floating__search{width:280px}
@@ -1,126 +1,188 @@
1
1
  import './Toolbar.css';
2
- import { Icon as w } from "../Icon/Icon2.js";
3
- import { Button as S } from "../Button/Button2.js";
4
- import { Tooltip as x } from "../Tooltip/Tooltip2.js";
5
- import { Dropdown as k } from "../Dropdown/Dropdown2.js";
6
- import { InputSearch as y } from "../InputSearch/InputSearch2.js";
7
- import { useControlPanelContext as B } from "../ControlPanel/useControlPanel.js";
8
- import { MenuHamburger as $ } from "../MenuHamburger/MenuHamburger2.js";
9
- import { NotificationPanel as R } from "../NotificationPanel/NotificationPanel2.js";
2
+ import { Icon as z } from "../Icon/Icon2.js";
3
+ import { Button as u } from "../Button/Button2.js";
4
+ import { Tooltip as b } from "../Tooltip/Tooltip2.js";
5
+ import { Dropdown as F } from "../Dropdown/Dropdown2.js";
6
+ import { InputSearch as B } from "../InputSearch/InputSearch2.js";
7
+ import { useControlPanelContext as H } from "../ControlPanel/useControlPanel.js";
8
+ import { useBreakpoint as V } from "../../hooks/useBreakpoint.js";
9
+ import { MenuHamburger as G } from "../MenuHamburger/MenuHamburger2.js";
10
+ import { NotificationPanel as K } from "../NotificationPanel/NotificationPanel2.js";
10
11
  /* empty css */
11
- import "react";
12
- import { jsx as a, jsxs as i } from "react/jsx-runtime";
13
- var c = "::", D = (o) => typeof o == "object" ? o.label : void 0, O = (o) => "fields" in o ? o.fields.flatMap((t) => [{
14
- value: `${t.value}${c}asc`,
15
- label: t.label,
12
+ import { useState as w } from "react";
13
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
14
+ var d = "::", j = "memobit-toolbar-collapsed", Y = () => {
15
+ try {
16
+ return localStorage.getItem(j) === "true";
17
+ } catch {
18
+ return !1;
19
+ }
20
+ }, q = (o) => typeof o == "object" ? o.label : void 0, J = (o) => "fields" in o ? o.fields.flatMap((r) => [{
21
+ value: `${r.value}${d}asc`,
22
+ label: r.label,
16
23
  suffixIcon: "arrow-up"
17
24
  }, {
18
- value: `${t.value}${c}desc`,
19
- label: t.label,
25
+ value: `${r.value}${d}desc`,
26
+ label: r.label,
20
27
  suffixIcon: "arrow-down"
21
- }]) : o.options, A = (o) => "fields" in o ? o.value ? `${o.value.field}${c}${o.value.direction}` : null : o.value, K = ({ actions: o, children: t, className: f = "", controlPanelToggle: r, heading: l, noCard: _ = !1, menuItems: v, notifications: n, search: s, sort: e }) => {
22
- const u = B(), h = !!(r && u?.isDrawer), d = typeof r == "object" ? r.count ?? 0 : 0, N = [
28
+ }]) : o.options, Q = (o) => "fields" in o ? o.value ? `${o.value.field}${d}${o.value.direction}` : null : o.value, me = ({ actions: o, children: r, className: k = "", collapsible: y = !1, controlPanelToggle: c, heading: a, noCard: O = !1, menuItems: x, notifications: s, search: i, sort: l }) => {
29
+ const f = H(), R = !!(c && f?.isDrawer), h = typeof c == "object" ? c.count ?? 0 : 0, T = [
23
30
  "memobit-toolbar",
24
- _ ? "memobit-toolbar--no-card" : "",
25
- f
26
- ].filter(Boolean).join(" "), C = !!(s || t), g = (m) => {
27
- if (e) {
28
- if (!m || Array.isArray(m)) {
29
- "fields" in e || e.onChange("", null);
31
+ O ? "memobit-toolbar--no-card" : "",
32
+ k
33
+ ].filter(Boolean).join(" "), $ = !!(i || r), { isMobile: A } = V(), [D, L] = w(Y), [v, p] = w(!1), _ = y && !A, C = (t) => {
34
+ L(t), p(!1);
35
+ try {
36
+ localStorage.setItem(j, String(t));
37
+ } catch {
38
+ }
39
+ }, E = (t) => {
40
+ if (l) {
41
+ if (!t || Array.isArray(t)) {
42
+ "fields" in l || l.onChange("", null);
30
43
  return;
31
44
  }
32
- if ("fields" in e) {
33
- const b = String(m.value), p = b.lastIndexOf(c), j = b.substring(0, p), I = b.substring(p + 2);
34
- e.onChange({
35
- field: j,
36
- direction: I
45
+ if ("fields" in l) {
46
+ const m = String(t.value), I = m.lastIndexOf(d), M = m.substring(0, I), P = m.substring(I + 2);
47
+ l.onChange({
48
+ field: M,
49
+ direction: P
37
50
  });
38
51
  return;
39
52
  }
40
- e.onChange(String(m.value), m);
53
+ l.onChange(String(t.value), t);
41
54
  }
42
- };
43
- return /* @__PURE__ */ i("div", {
44
- className: N,
45
- children: [
46
- h && /* @__PURE__ */ a(x, {
47
- title: "Filters",
48
- children: /* @__PURE__ */ i(S, {
49
- className: "memobit-toolbar__control-panel-toggle",
50
- icon: "tune",
51
- onClick: u?.toggle,
52
- size: "medium",
53
- variant: "default",
54
- children: [r && D(r), d > 0 && /* @__PURE__ */ a("span", {
55
- className: "memobit-toolbar__control-panel-toggle-count",
56
- children: d
57
- })]
55
+ }, g = R && /* @__PURE__ */ e(b, {
56
+ title: "Filters",
57
+ children: /* @__PURE__ */ n(u, {
58
+ className: "memobit-toolbar__control-panel-toggle",
59
+ icon: "tune",
60
+ onClick: f?.toggle,
61
+ size: "medium",
62
+ variant: "default",
63
+ children: [c && q(c), h > 0 && /* @__PURE__ */ e("span", {
64
+ className: "memobit-toolbar__control-panel-toggle-count",
65
+ children: h
66
+ })]
67
+ })
68
+ }), N = s && /* @__PURE__ */ e(K, {
69
+ items: s.items,
70
+ buttonLabel: s.buttonLabel,
71
+ panelTitle: s.panelTitle,
72
+ emptyMessage: s.emptyMessage,
73
+ onItemClick: s.onItemClick
74
+ }), S = /* @__PURE__ */ e(G, {
75
+ items: x,
76
+ disableResponsive: !0,
77
+ showLabel: !1
78
+ });
79
+ if (_ && D) {
80
+ const t = v || !!i?.value;
81
+ return /* @__PURE__ */ n("div", {
82
+ className: "memobit-toolbar-floating",
83
+ children: [
84
+ g,
85
+ i && (t ? /* @__PURE__ */ e("div", {
86
+ className: "memobit-toolbar-floating__search",
87
+ children: /* @__PURE__ */ e(B, {
88
+ ...i,
89
+ autoFocus: v,
90
+ className: ["memobit-toolbar__search-input", i.className].filter(Boolean).join(" "),
91
+ onBlur: (m) => {
92
+ i.onBlur?.(m), m.currentTarget.value || p(!1);
93
+ }
94
+ })
95
+ }) : /* @__PURE__ */ e(b, {
96
+ title: "Search",
97
+ children: /* @__PURE__ */ e(u, {
98
+ icon: "search",
99
+ onClick: () => p(!0),
100
+ size: "medium",
101
+ variant: "default"
102
+ })
103
+ })),
104
+ o,
105
+ N,
106
+ S,
107
+ /* @__PURE__ */ e(b, {
108
+ title: "Show the toolbar",
109
+ children: /* @__PURE__ */ e(u, {
110
+ icon: "caret-down",
111
+ onClick: () => C(!1),
112
+ size: "medium",
113
+ variant: "default"
114
+ })
58
115
  })
59
- }),
60
- l && /* @__PURE__ */ i("div", {
61
- className: ["memobit-toolbar__heading", l.onClick ? "memobit-toolbar__heading--clickable" : ""].filter(Boolean).join(" "),
62
- onClick: l.onClick,
63
- children: [(l.svg || l.icon || l.emoji) && /* @__PURE__ */ i("span", {
116
+ ]
117
+ });
118
+ }
119
+ return /* @__PURE__ */ n("div", {
120
+ className: T,
121
+ children: [
122
+ g,
123
+ a && /* @__PURE__ */ n("div", {
124
+ className: ["memobit-toolbar__heading", a.onClick ? "memobit-toolbar__heading--clickable" : ""].filter(Boolean).join(" "),
125
+ onClick: a.onClick,
126
+ children: [(a.svg || a.icon || a.emoji) && /* @__PURE__ */ n("span", {
64
127
  className: "memobit-toolbar__heading-icon",
65
128
  children: [
66
- l.svg,
67
- l.icon && /* @__PURE__ */ a(w, { name: l.icon }),
68
- l.emoji
129
+ a.svg,
130
+ a.icon && /* @__PURE__ */ e(z, { name: a.icon }),
131
+ a.emoji
69
132
  ]
70
- }), /* @__PURE__ */ i("div", {
133
+ }), /* @__PURE__ */ n("div", {
71
134
  className: "memobit-toolbar__heading-copy",
72
- children: [/* @__PURE__ */ a("span", {
135
+ children: [/* @__PURE__ */ e("span", {
73
136
  className: "memobit-toolbar__heading-title",
74
- children: l.title
75
- }), l.description && /* @__PURE__ */ a("span", {
137
+ children: a.title
138
+ }), a.description && /* @__PURE__ */ e("span", {
76
139
  className: "memobit-toolbar__heading-description",
77
- children: l.description
140
+ children: a.description
78
141
  })]
79
142
  })]
80
143
  }),
81
- C && /* @__PURE__ */ i("div", {
144
+ $ && /* @__PURE__ */ n("div", {
82
145
  className: "memobit-toolbar__content",
83
- children: [s && /* @__PURE__ */ a("div", {
146
+ children: [i && /* @__PURE__ */ e("div", {
84
147
  className: "memobit-toolbar__search",
85
- children: /* @__PURE__ */ a(y, {
86
- ...s,
87
- className: ["memobit-toolbar__search-input", s.className].filter(Boolean).join(" ")
148
+ children: /* @__PURE__ */ e(B, {
149
+ ...i,
150
+ className: ["memobit-toolbar__search-input", i.className].filter(Boolean).join(" ")
88
151
  })
89
- }), t && /* @__PURE__ */ a("div", {
152
+ }), r && /* @__PURE__ */ e("div", {
90
153
  className: "memobit-toolbar__custom",
91
- children: t
154
+ children: r
92
155
  })]
93
156
  }),
94
- /* @__PURE__ */ i("div", {
157
+ /* @__PURE__ */ n("div", {
95
158
  className: "memobit-toolbar__end",
96
- children: [e && /* @__PURE__ */ a("div", {
97
- className: ["memobit-toolbar__sort", e.className].filter(Boolean).join(" "),
98
- children: /* @__PURE__ */ a(k, {
99
- highlighted: e.highlighted,
100
- label: e.label,
101
- name: e.name ?? "toolbar-sort",
102
- onChange: g,
103
- options: O(e),
104
- placeholder: e.placeholder,
105
- searchable: e.searchable ?? !1,
159
+ children: [l && /* @__PURE__ */ e("div", {
160
+ className: ["memobit-toolbar__sort", l.className].filter(Boolean).join(" "),
161
+ children: /* @__PURE__ */ e(F, {
162
+ highlighted: l.highlighted,
163
+ label: l.label,
164
+ name: l.name ?? "toolbar-sort",
165
+ onChange: E,
166
+ options: J(l),
167
+ placeholder: l.placeholder,
168
+ searchable: l.searchable ?? !1,
106
169
  usePortal: !1,
107
- value: A(e)
170
+ value: Q(l)
108
171
  })
109
- }), /* @__PURE__ */ i("div", {
172
+ }), /* @__PURE__ */ n("div", {
110
173
  className: "memobit-toolbar__actions",
111
174
  children: [
112
175
  o,
113
- n && /* @__PURE__ */ a(R, {
114
- items: n.items,
115
- buttonLabel: n.buttonLabel,
116
- panelTitle: n.panelTitle,
117
- emptyMessage: n.emptyMessage,
118
- onItemClick: n.onItemClick
119
- }),
120
- /* @__PURE__ */ a($, {
121
- items: v,
122
- disableResponsive: !0,
123
- showLabel: !1
176
+ N,
177
+ S,
178
+ _ && /* @__PURE__ */ e(b, {
179
+ title: "Hide the toolbar",
180
+ children: /* @__PURE__ */ e(u, {
181
+ icon: "caret-up",
182
+ onClick: () => C(!0),
183
+ size: "medium",
184
+ variant: "default"
185
+ })
124
186
  })
125
187
  ]
126
188
  })]
@@ -129,5 +191,5 @@ var c = "::", D = (o) => typeof o == "object" ? o.label : void 0, O = (o) => "fi
129
191
  });
130
192
  };
131
193
  export {
132
- K as Toolbar
194
+ me as Toolbar
133
195
  };
@@ -23,7 +23,7 @@ var r = (i) => {
23
23
  const o = {
24
24
  ...i,
25
25
  lib: d,
26
- libBuildNumber: 591,
26
+ libBuildNumber: 593,
27
27
  libCommit: n,
28
28
  libBuildDate: t
29
29
  };
package/dist/index.d.ts CHANGED
@@ -3636,6 +3636,12 @@ export declare interface ToolbarProps {
3636
3636
  children?: ReactNode;
3637
3637
  className?: string;
3638
3638
  controlPanelToggle?: boolean | ToolbarControlPanelToggleConfig;
3639
+ /**
3640
+ * Desktop: a button hides the toolbar, leaving a small group floating in the page's top-right corner
3641
+ * (the panel toggle, search, the actions, notifications and the menu), and the page the whole height.
3642
+ * The choice is remembered (per app, as each app has its own origin).
3643
+ */
3644
+ collapsible?: boolean;
3639
3645
  /** Descriptive headline shown at the far left of the toolbar. */
3640
3646
  heading?: ToolbarHeadingConfig;
3641
3647
  /** When true, drops the toolbar's card chrome (background, border, radius, padding). */
package/dist/version.js CHANGED
@@ -1,7 +1,7 @@
1
- var I = "3.23.0", B = 591, L = "c9ec9a1", _ = "2026-10-29T11:17:25.730Z", a = "591";
1
+ var I = "3.24.0", B = 593, L = "bc5cfbc", _ = "2026-10-29T11:24:18.727Z", r = "593";
2
2
  export {
3
3
  _ as LIB_BUILD_DATE,
4
- a as LIB_BUILD_ID,
4
+ r as LIB_BUILD_ID,
5
5
  B as LIB_BUILD_NUMBER,
6
6
  L as LIB_COMMIT,
7
7
  I as LIB_VERSION
package/dist/version.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "3.23.0",
3
- "buildNumber": 591,
4
- "commit": "c9ec9a1",
5
- "buildDate": "2026-10-29T11:17:25.730Z"
2
+ "version": "3.24.0",
3
+ "buildNumber": 593,
4
+ "commit": "bc5cfbc",
5
+ "buildDate": "2026-10-29T11:24:18.727Z"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memobit/libs",
3
- "version": "3.23.0",
3
+ "version": "3.24.0",
4
4
  "description": "React component library powering the Memobit apps — 100+ components, helpers and hooks. Icons ship as @memobit/icons and themes as @memobit/themes. TypeScript-first, ESM-only, React 19.",
5
5
  "keywords": [
6
6
  "react",