@memobit/libs 3.23.0 → 3.25.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.
@@ -2,8 +2,8 @@ import './ErrorBoundary.css';
2
2
  import { EmptyState as s } from "../EmptyState/EmptyState2.js";
3
3
  /* empty css */
4
4
  import { Component as a } from "react";
5
- import { logger as c } from "@memobit/core";
6
5
  import { jsx as o } from "react/jsx-runtime";
6
+ import { logger as c } from "@memobit/core";
7
7
  var h = class extends a {
8
8
  constructor(...r) {
9
9
  super(...r), this.state = { error: null }, this.reset = () => {
@@ -0,0 +1,20 @@
1
+ import './Icon.css';
2
+ /* empty css */
3
+ import "react";
4
+ import { animatedIconMap as m } from "@memobit/icons/animated";
5
+ import { jsx as t } from "react/jsx-runtime";
6
+ var f = ({ className: r = "", name: c, size: n, variant: o }) => {
7
+ const e = [
8
+ "icon",
9
+ n ? `icon--${n}` : "",
10
+ o && o !== "default" ? `icon--${o}` : "",
11
+ r
12
+ ].filter(Boolean).join(" ");
13
+ return /* @__PURE__ */ t("span", {
14
+ className: e,
15
+ children: m[c]
16
+ });
17
+ };
18
+ export {
19
+ f as AnimatedIcon
20
+ };
@@ -1,11 +1,11 @@
1
1
  import './Icon.css';
2
2
  /* empty css */
3
3
  import { useEffect as g, useState as I } from "react";
4
- import { logger as y } from "@memobit/core";
5
- import { canLoadMoreIcons as n, getIcon as N, loadIcon as w } from "@memobit/icons/map";
6
- import { jsx as x } from "react/jsx-runtime";
4
+ import { jsx as y } from "react/jsx-runtime";
5
+ import { logger as N } from "@memobit/core";
6
+ import { canLoadMoreIcons as n, getIcon as w, loadIcon as x } from "@memobit/icons/map";
7
7
  var c = /* @__PURE__ */ new Set(), a = (e) => {
8
- c.has(e) || (c.add(e), y.warn(n ? "[@memobit/libs] No icon named <name>." : "[@memobit/libs] No icon named <name>. If this app trims icons with @memobit/icons/vite, add it to the plugin's `include` option or use `lazy` — a name that only exists at runtime cannot be found by the source scan.", { name: e }));
8
+ c.has(e) || (c.add(e), N.warn(n ? "[@memobit/libs] No icon named <name>." : "[@memobit/libs] No icon named <name>. If this app trims icons with @memobit/icons/vite, add it to the plugin's `include` option or use `lazy` — a name that only exists at runtime cannot be found by the source scan.", { name: e }));
9
9
  }, C = ({ className: e = "", fade: l, fadeOnHover: d, name: o, pulse: u, pulseOnHover: f, size: r, spin: p, spinOnHover: m, variant: t }) => {
10
10
  const h = [
11
11
  "icon",
@@ -18,11 +18,11 @@ var c = /* @__PURE__ */ new Set(), a = (e) => {
18
18
  d ? "icon--fade-hover" : "",
19
19
  f ? "icon--pulse-hover" : "",
20
20
  e
21
- ].filter(Boolean).join(" "), [, v] = I(null), i = N(o);
21
+ ].filter(Boolean).join(" "), [, v] = I(null), i = w(o);
22
22
  return g(() => {
23
23
  if (i !== void 0 || !n) return;
24
24
  let s = !0;
25
- return w(o).then((b) => {
25
+ return x(o).then((b) => {
26
26
  if (s) {
27
27
  if (b === void 0) {
28
28
  a(o);
@@ -34,7 +34,7 @@ var c = /* @__PURE__ */ new Set(), a = (e) => {
34
34
  }), () => {
35
35
  s = !1;
36
36
  };
37
- }, [i, o]), i === void 0 && !n && a(o), /* @__PURE__ */ x("span", {
37
+ }, [i, o]), i === void 0 && !n && a(o), /* @__PURE__ */ y("span", {
38
38
  className: h,
39
39
  children: i
40
40
  });
@@ -4,15 +4,15 @@ import { Tooltip as v } from "../Tooltip/Tooltip2.js";
4
4
  import { InputSearch as y } from "../InputSearch/InputSearch2.js";
5
5
  /* empty css */
6
6
  import { useEffect as C, useMemo as h, useState as d } from "react";
7
- import { canLoadMoreIcons as S, iconMap as b, loadAllIcons as j } from "@memobit/icons/map";
8
- import { jsx as c, jsxs as A } from "react/jsx-runtime";
7
+ import { jsx as c, jsxs as S } from "react/jsx-runtime";
8
+ import { canLoadMoreIcons as b, iconMap as j, loadAllIcons as A } from "@memobit/icons/map";
9
9
  import { iconAliases as L } from "@memobit/icons";
10
- var T = S ? null : Object.keys(b), q = ({ color: a, emptyLabel: u = "No icons match", icons: o, onChange: f, placeholder: _ = "Search icons...", value: g }) => {
10
+ var T = b ? null : Object.keys(j), q = ({ color: a, emptyLabel: u = "No icons match", icons: o, onChange: f, placeholder: _ = "Search icons...", value: g }) => {
11
11
  const [s, k] = d(""), [r, I] = d(T);
12
12
  C(() => {
13
13
  if (r || o) return;
14
14
  let e = !0;
15
- return j().then((l) => {
15
+ return A().then((l) => {
16
16
  e && I(Object.keys(l));
17
17
  }, () => {
18
18
  }), () => {
@@ -25,7 +25,7 @@ var T = S ? null : Object.keys(b), q = ({ color: a, emptyLabel: u = "No icons ma
25
25
  const l = e.replace(/[\s-]+/g, ""), m = (i) => i.includes(e) || i.replace(/-/g, "").includes(l);
26
26
  return t.filter((i) => m(i) || (L[i] ?? []).some(m));
27
27
  }, [t, s]);
28
- return /* @__PURE__ */ A("div", {
28
+ return /* @__PURE__ */ S("div", {
29
29
  className: "icon-picker",
30
30
  children: [
31
31
  /* @__PURE__ */ c("div", {
@@ -7,8 +7,8 @@ import { fitRegionToAspect as q, initialRegion as E } from "./cropGeometry.js";
7
7
  import { useCropDrag as J } from "./useCropDrag.js";
8
8
  /* empty css */
9
9
  import { useEffect as Z, useMemo as ee, useRef as re, useState as n } from "react";
10
- import { logger as A } from "@memobit/core";
11
10
  import { jsx as a, jsxs as d } from "react/jsx-runtime";
11
+ import { logger as A } from "@memobit/core";
12
12
  var oe = 1200, ae = 0.9, te = [
13
13
  "nw",
14
14
  "ne",
@@ -3,8 +3,8 @@ import { Modal as x } from "../Modal/Modal2.js";
3
3
  import { Radio as C } from "../Radio/Radio2.js";
4
4
  /* empty css */
5
5
  import { useEffect as S, useState as n } from "react";
6
- import { logger as b } from "@memobit/core";
7
- import { jsx as a, jsxs as q } from "react/jsx-runtime";
6
+ import { jsx as a, jsxs as b } from "react/jsx-runtime";
7
+ import { logger as q } from "@memobit/core";
8
8
  var U = ({ isOpen: m = !1, list: c, title: f, onClose: t, onSave: u, icon: v, value: i }) => {
9
9
  const [r, l] = n(i), [s, d] = n(!1), [p, o] = n("");
10
10
  S(() => {
@@ -24,11 +24,11 @@ var U = ({ isOpen: m = !1, list: c, title: f, onClose: t, onSave: u, icon: v, va
24
24
  d(!1);
25
25
  }
26
26
  }, h = (e) => {
27
- typeof e == "string" || typeof e == "number" ? l(e) : b.error("QuickOptionUpdate received an unsupported value type", void 0, { type: typeof e });
27
+ typeof e == "string" || typeof e == "number" ? l(e) : q.error("QuickOptionUpdate received an unsupported value type", void 0, { type: typeof e });
28
28
  };
29
29
  return /* @__PURE__ */ a("div", {
30
30
  className: "quick-set",
31
- children: /* @__PURE__ */ q(x, {
31
+ children: /* @__PURE__ */ b(x, {
32
32
  isOpen: m,
33
33
  titleIcon: v,
34
34
  title: f,
@@ -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
  };
@@ -1,8 +1,8 @@
1
1
  import { HttpMethod as o, buildRequestHeaders as A } from "../../helpers/Http.js";
2
2
  import { AuthContext as U } from "./AuthContext.context.js";
3
3
  import { useCallback as i, useEffect as j, useState as c } from "react";
4
- import { logger as h } from "@memobit/core";
5
4
  import { jsx as B } from "react/jsx-runtime";
5
+ import { logger as h } from "@memobit/core";
6
6
  function C({ children: f, config: a }) {
7
7
  const [d, u] = c(null), [p, s] = c(!0);
8
8
  j(() => {
@@ -23,7 +23,7 @@ var r = (i) => {
23
23
  const o = {
24
24
  ...i,
25
25
  lib: d,
26
- libBuildNumber: 591,
26
+ libBuildNumber: 596,
27
27
  libCommit: n,
28
28
  libBuildDate: t
29
29
  };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { AnimatedIconName } from '@memobit/icons/animated';
1
2
  import { Component } from 'react';
2
3
  import { ComponentType } from 'react';
3
4
  import { Context } from 'react';
@@ -113,6 +114,19 @@ export declare interface AngleSliderProps {
113
114
 
114
115
  export declare type AngleSliderVariant = 'accent' | 'info' | 'success' | 'warning' | 'danger';
115
116
 
117
+ /**
118
+ * An icon that moves on its own, for something happening right now (motion in a room, a job
119
+ * running). Sized and coloured like `Icon`; the animation lives in the SVG itself.
120
+ */
121
+ export declare const AnimatedIcon: default_2.FC<AnimatedIconProps>;
122
+
123
+ declare interface AnimatedIconProps {
124
+ className?: string;
125
+ name: AnimatedIconName;
126
+ size?: IconSize;
127
+ variant?: IconVariant;
128
+ }
129
+
116
130
  export declare interface ApiClient {
117
131
  get: <T>(path: string) => Promise<T>;
118
132
  post: <T, P = unknown>(path: string, payload?: P) => Promise<T>;
@@ -3636,6 +3650,12 @@ export declare interface ToolbarProps {
3636
3650
  children?: ReactNode;
3637
3651
  className?: string;
3638
3652
  controlPanelToggle?: boolean | ToolbarControlPanelToggleConfig;
3653
+ /**
3654
+ * Desktop: a button hides the toolbar, leaving a small group floating in the page's top-right corner
3655
+ * (the panel toggle, search, the actions, notifications and the menu), and the page the whole height.
3656
+ * The choice is remembered (per app, as each app has its own origin).
3657
+ */
3658
+ collapsible?: boolean;
3639
3659
  /** Descriptive headline shown at the far left of the toolbar. */
3640
3660
  heading?: ToolbarHeadingConfig;
3641
3661
  /** When true, drops the toolbar's card chrome (background, border, radius, padding). */