@memobit/libs 3.16.0 → 3.17.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.
- package/README.md +96 -96
- package/dist/components/Auth/MfaSetupModal/MfaSetupModal2.js +1 -1
- package/dist/components/Toolbar/Toolbar.css +1 -1
- package/dist/components/Toolbar/Toolbar2.js +54 -54
- package/dist/helpers/VersionInfo.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/styles/base.scss +36 -36
- package/dist/styles/effects.scss +72 -72
- package/dist/styles/highlight.scss +6 -6
- package/dist/styles/scrollbars.scss +30 -30
- package/dist/styles/utilities.scss +238 -238
- package/dist/styles/utility-classes.scss +93 -93
- package/dist/styles/variables.scss +73 -73
- package/dist/version.js +2 -2
- package/dist/version.json +4 -4
- package/package.json +1 -1
- /package/dist/{D_/Projects/Web Apps/LIBRARIES/memobit-react/node_modules → node_modules}/qrcode.react/lib/esm/index.js +0 -0
package/README.md
CHANGED
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
# @memobit/libs
|
|
2
|
-
|
|
3
|
-
A TypeScript-first React component library — 100+ components, 70+ themes, plus the hooks and helpers needed to glue them together. Built for, and battle-tested across, the [Memobit](https://memobit.ro) family of apps.
|
|
4
|
-
|
|
5
|
-
**📚 Live documentation & component playground → [react.memobit.ro](https://react.memobit.ro/)**
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npm install @memobit/libs
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Peer dependencies (you provide these in your own app):
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm install react@^19 react-dom@^19 @memobit/core
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Quick start
|
|
22
|
-
|
|
23
|
-
```tsx
|
|
24
|
-
import { Button, Card, ToastProvider, useToast } from '@memobit/libs';
|
|
25
|
-
import '@memobit/libs/dist/index.css';
|
|
26
|
-
import '@memobit/libs/dist/styles/themes.scss'; // optional — only if you want the bundled themes
|
|
27
|
-
|
|
28
|
-
function App() {
|
|
29
|
-
return (
|
|
30
|
-
<ToastProvider>
|
|
31
|
-
<Demo />
|
|
32
|
-
</ToastProvider>
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function Demo() {
|
|
37
|
-
const { showToast } = useToast();
|
|
38
|
-
return (
|
|
39
|
-
<Card>
|
|
40
|
-
<Button onClick={() => showToast({ type: 'success', message: 'Hello' })}>
|
|
41
|
-
Click me
|
|
42
|
-
</Button>
|
|
43
|
-
</Card>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## What's in the box
|
|
49
|
-
|
|
50
|
-
- **Components** — Buttons, forms (Input/Select/Checkbox/DatePicker/ColorPicker/EmojiPicker/FileDropzone…), navigation (Breadcrumb/AppHeader/ControlPanel/Tabs…), overlays (Drawer/Modal/ConfirmDialog/ContextMenu/Tooltip…), data (DataView/Table/Calendar/CalendarHeatmap/Chart…), feedback (Toast/Banner/Badge/Chip/EmptyState…), and many more.
|
|
51
|
-
- **Icons** — 470+ stroke icons, each tree-shakeable.
|
|
52
|
-
- **Themes** — 70+ ready-made SCSS themes (Arctic Blue, Midnight Atlas, Terracotta Kitchen, Neon Tokyo, …). Theme tokens are pure CSS custom properties, so you can author your own.
|
|
53
|
-
- **Hooks** — `useBreakpoint`, `useBodyScrollLock`, `useComponentEffect`, `useAppPersistence`, `useAuth`.
|
|
54
|
-
- **Helpers** — date formatting, number formatting, string utilities, search/highlight, pagination, URL helpers.
|
|
55
|
-
- **Error reporting** — lives in [`@memobit/core`](https://www.npmjs.com/package/@memobit/core) (React-free, works in Node too), a peer dependency: `ErrorBoundary` crashes are reported through it once the app calls `installErrorReporting`.
|
|
56
|
-
|
|
57
|
-
See the [component reference](https://react.memobit.ro/) for props, variants, and live examples.
|
|
58
|
-
|
|
59
|
-
## Theming
|
|
60
|
-
|
|
61
|
-
Themes ship as standalone SCSS files. Pick what you need:
|
|
62
|
-
|
|
63
|
-
```scss
|
|
64
|
-
// import everything
|
|
65
|
-
@use '@memobit/libs/dist/styles/themes.scss';
|
|
66
|
-
|
|
67
|
-
// or a single theme
|
|
68
|
-
@use '@memobit/libs/dist/styles/theming/arctic-blue.scss';
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
All tokens — spacing, typography, radii, transitions, colors — are exposed as CSS custom properties (`--spacing-8`, `--card-bg`, `--button-primary-bg`, etc.) so you can override per-component or per-route without forking the library.
|
|
72
|
-
|
|
73
|
-
Token reference:
|
|
74
|
-
|
|
75
|
-
- Sizing / spacing / radii / transitions → `@memobit/libs/dist/styles/variables.scss`
|
|
76
|
-
- Theme colors → `@memobit/libs/dist/styles/theming/*.scss`
|
|
77
|
-
|
|
78
|
-
## Requirements
|
|
79
|
-
|
|
80
|
-
- React **19.2+** and React DOM **19.2+** (peer deps)
|
|
81
|
-
- ESM-only (your bundler must support ESM — Vite, Next.js 13+, Webpack 5, esbuild, Rollup all do)
|
|
82
|
-
- For SCSS imports: a Sass-capable bundler
|
|
83
|
-
|
|
84
|
-
## TypeScript
|
|
85
|
-
|
|
86
|
-
Type definitions are bundled (`dist/index.d.ts`). No `@types/...` package required.
|
|
87
|
-
|
|
88
|
-
## License
|
|
89
|
-
|
|
90
|
-
[Apache 2.0](./LICENSE) © Iulian Cristea
|
|
91
|
-
|
|
92
|
-
## Links
|
|
93
|
-
|
|
94
|
-
- 📚 Docs & playground — https://react.memobit.ro/
|
|
95
|
-
- 🐙 Source — https://github.com/CristeaIulian/memobit-react-library
|
|
96
|
-
- 📦 npm — https://www.npmjs.com/package/@memobit/libs
|
|
1
|
+
# @memobit/libs
|
|
2
|
+
|
|
3
|
+
A TypeScript-first React component library — 100+ components, 70+ themes, plus the hooks and helpers needed to glue them together. Built for, and battle-tested across, the [Memobit](https://memobit.ro) family of apps.
|
|
4
|
+
|
|
5
|
+
**📚 Live documentation & component playground → [react.memobit.ro](https://react.memobit.ro/)**
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @memobit/libs
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Peer dependencies (you provide these in your own app):
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install react@^19 react-dom@^19 @memobit/core
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Quick start
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import { Button, Card, ToastProvider, useToast } from '@memobit/libs';
|
|
25
|
+
import '@memobit/libs/dist/index.css';
|
|
26
|
+
import '@memobit/libs/dist/styles/themes.scss'; // optional — only if you want the bundled themes
|
|
27
|
+
|
|
28
|
+
function App() {
|
|
29
|
+
return (
|
|
30
|
+
<ToastProvider>
|
|
31
|
+
<Demo />
|
|
32
|
+
</ToastProvider>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function Demo() {
|
|
37
|
+
const { showToast } = useToast();
|
|
38
|
+
return (
|
|
39
|
+
<Card>
|
|
40
|
+
<Button onClick={() => showToast({ type: 'success', message: 'Hello' })}>
|
|
41
|
+
Click me
|
|
42
|
+
</Button>
|
|
43
|
+
</Card>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## What's in the box
|
|
49
|
+
|
|
50
|
+
- **Components** — Buttons, forms (Input/Select/Checkbox/DatePicker/ColorPicker/EmojiPicker/FileDropzone…), navigation (Breadcrumb/AppHeader/ControlPanel/Tabs…), overlays (Drawer/Modal/ConfirmDialog/ContextMenu/Tooltip…), data (DataView/Table/Calendar/CalendarHeatmap/Chart…), feedback (Toast/Banner/Badge/Chip/EmptyState…), and many more.
|
|
51
|
+
- **Icons** — 470+ stroke icons, each tree-shakeable.
|
|
52
|
+
- **Themes** — 70+ ready-made SCSS themes (Arctic Blue, Midnight Atlas, Terracotta Kitchen, Neon Tokyo, …). Theme tokens are pure CSS custom properties, so you can author your own.
|
|
53
|
+
- **Hooks** — `useBreakpoint`, `useBodyScrollLock`, `useComponentEffect`, `useAppPersistence`, `useAuth`.
|
|
54
|
+
- **Helpers** — date formatting, number formatting, string utilities, search/highlight, pagination, URL helpers.
|
|
55
|
+
- **Error reporting** — lives in [`@memobit/core`](https://www.npmjs.com/package/@memobit/core) (React-free, works in Node too), a peer dependency: `ErrorBoundary` crashes are reported through it once the app calls `installErrorReporting`.
|
|
56
|
+
|
|
57
|
+
See the [component reference](https://react.memobit.ro/) for props, variants, and live examples.
|
|
58
|
+
|
|
59
|
+
## Theming
|
|
60
|
+
|
|
61
|
+
Themes ship as standalone SCSS files. Pick what you need:
|
|
62
|
+
|
|
63
|
+
```scss
|
|
64
|
+
// import everything
|
|
65
|
+
@use '@memobit/libs/dist/styles/themes.scss';
|
|
66
|
+
|
|
67
|
+
// or a single theme
|
|
68
|
+
@use '@memobit/libs/dist/styles/theming/arctic-blue.scss';
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
All tokens — spacing, typography, radii, transitions, colors — are exposed as CSS custom properties (`--spacing-8`, `--card-bg`, `--button-primary-bg`, etc.) so you can override per-component or per-route without forking the library.
|
|
72
|
+
|
|
73
|
+
Token reference:
|
|
74
|
+
|
|
75
|
+
- Sizing / spacing / radii / transitions → `@memobit/libs/dist/styles/variables.scss`
|
|
76
|
+
- Theme colors → `@memobit/libs/dist/styles/theming/*.scss`
|
|
77
|
+
|
|
78
|
+
## Requirements
|
|
79
|
+
|
|
80
|
+
- React **19.2+** and React DOM **19.2+** (peer deps)
|
|
81
|
+
- ESM-only (your bundler must support ESM — Vite, Next.js 13+, Webpack 5, esbuild, Rollup all do)
|
|
82
|
+
- For SCSS imports: a Sass-capable bundler
|
|
83
|
+
|
|
84
|
+
## TypeScript
|
|
85
|
+
|
|
86
|
+
Type definitions are bundled (`dist/index.d.ts`). No `@types/...` package required.
|
|
87
|
+
|
|
88
|
+
## License
|
|
89
|
+
|
|
90
|
+
[Apache 2.0](./LICENSE) © Iulian Cristea
|
|
91
|
+
|
|
92
|
+
## Links
|
|
93
|
+
|
|
94
|
+
- 📚 Docs & playground — https://react.memobit.ro/
|
|
95
|
+
- 🐙 Source — https://github.com/CristeaIulian/memobit-react-library
|
|
96
|
+
- 📦 npm — https://www.npmjs.com/package/@memobit/libs
|
|
@@ -6,7 +6,7 @@ import { InputPassword as B } from "../../InputPassword/InputPassword2.js";
|
|
|
6
6
|
import { Toast as X } from "../../Toast/Toast2.js";
|
|
7
7
|
import { HttpMethod as F, buildRequestHeaders as Y } from "../../../helpers/Http.js";
|
|
8
8
|
import { useAuth as Z } from "../../../hooks/useAuth/useAuth.js";
|
|
9
|
-
import { QRCodeSVG as ee } from "../../../
|
|
9
|
+
import { QRCodeSVG as ee } from "../../../node_modules/qrcode.react/lib/esm/index.js";
|
|
10
10
|
/* empty css */
|
|
11
11
|
import { useCallback as U, useEffect as ae, useState as r } from "react";
|
|
12
12
|
import { Fragment as A, jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
@@ -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);display:flex}.memobit-toolbar__control-panel-toggle,.memobit-toolbar__actions,.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{
|
|
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__actions,.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__custom>.NotificationPanel,.memobit-toolbar__custom>.NotificationPanel>.NotificationPanel__button{height:100%}.memobit-toolbar__end{align-items:flex-end;gap:var(--spacing-16);flex:1 0 auto;display:flex}.memobit-toolbar__actions{align-items:center;gap:var(--spacing-8);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{align-items:stretch;gap:var(--spacing-8);flex-direction:column}}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import './Toolbar.css';
|
|
2
|
-
import { Icon as
|
|
3
|
-
import { Button as
|
|
4
|
-
import { Tooltip as
|
|
5
|
-
import { Dropdown as
|
|
6
|
-
import { InputSearch as
|
|
7
|
-
import { useControlPanelContext as
|
|
8
|
-
import { MenuHamburger as
|
|
9
|
-
import { NotificationPanel as
|
|
2
|
+
import { Icon as I } from "../Icon/Icon2.js";
|
|
3
|
+
import { Button as S } from "../Button/Button2.js";
|
|
4
|
+
import { Tooltip as w } from "../Tooltip/Tooltip2.js";
|
|
5
|
+
import { Dropdown as x } from "../Dropdown/Dropdown2.js";
|
|
6
|
+
import { InputSearch as k } from "../InputSearch/InputSearch2.js";
|
|
7
|
+
import { useControlPanelContext as y } from "../ControlPanel/useControlPanel.js";
|
|
8
|
+
import { MenuHamburger as B } from "../MenuHamburger/MenuHamburger2.js";
|
|
9
|
+
import { NotificationPanel as $ } from "../NotificationPanel/NotificationPanel2.js";
|
|
10
10
|
/* empty css */
|
|
11
11
|
import "react";
|
|
12
12
|
import { jsx as a, jsxs as t } from "react/jsx-runtime";
|
|
13
|
-
var c = "::",
|
|
13
|
+
var c = "::", R = (e) => typeof e == "object" ? e.label : void 0, M = (e) => "fields" in e ? e.fields.flatMap((i) => [{
|
|
14
14
|
value: `${i.value}${c}asc`,
|
|
15
15
|
label: i.label,
|
|
16
16
|
suffixIcon: "arrow-up"
|
|
@@ -18,21 +18,21 @@ var c = "::", k = (e) => typeof e == "object" ? e.label : void 0, M = (e) => "fi
|
|
|
18
18
|
value: `${i.value}${c}desc`,
|
|
19
19
|
label: i.label,
|
|
20
20
|
suffixIcon: "arrow-down"
|
|
21
|
-
}]) : e.options, O = (e) => "fields" in e ? e.value ? `${e.value.field}${c}${e.value.direction}` : null : e.value, J = ({ children: e, className: i = "", controlPanelToggle:
|
|
22
|
-
const u =
|
|
21
|
+
}]) : e.options, O = (e) => "fields" in e ? e.value ? `${e.value.field}${c}${e.value.direction}` : null : e.value, J = ({ children: e, className: i = "", controlPanelToggle: r, heading: l, noCard: f = !1, menuItems: _, notifications: n, search: s, sort: o }) => {
|
|
22
|
+
const u = y(), v = !!(r && u?.isMobile), d = typeof r == "object" ? r.count ?? 0 : 0, h = [
|
|
23
23
|
"memobit-toolbar",
|
|
24
24
|
f ? "memobit-toolbar--no-card" : "",
|
|
25
25
|
i
|
|
26
|
-
].filter(Boolean).join(" "), N = !!(s ||
|
|
26
|
+
].filter(Boolean).join(" "), N = !!(s || e), C = (m) => {
|
|
27
27
|
if (o) {
|
|
28
28
|
if (!m || Array.isArray(m)) {
|
|
29
29
|
"fields" in o || o.onChange("", null);
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
if ("fields" in o) {
|
|
33
|
-
const b = String(m.value), p = b.lastIndexOf(c),
|
|
33
|
+
const b = String(m.value), p = b.lastIndexOf(c), g = b.substring(0, p), j = b.substring(p + 2);
|
|
34
34
|
o.onChange({
|
|
35
|
-
field:
|
|
35
|
+
field: g,
|
|
36
36
|
direction: j
|
|
37
37
|
});
|
|
38
38
|
return;
|
|
@@ -43,15 +43,15 @@ var c = "::", k = (e) => typeof e == "object" ? e.label : void 0, M = (e) => "fi
|
|
|
43
43
|
return /* @__PURE__ */ t("div", {
|
|
44
44
|
className: h,
|
|
45
45
|
children: [
|
|
46
|
-
v && /* @__PURE__ */ a(
|
|
46
|
+
v && /* @__PURE__ */ a(w, {
|
|
47
47
|
title: "Filters",
|
|
48
|
-
children: /* @__PURE__ */ t(
|
|
48
|
+
children: /* @__PURE__ */ t(S, {
|
|
49
49
|
className: "memobit-toolbar__control-panel-toggle",
|
|
50
50
|
icon: "tune",
|
|
51
51
|
onClick: u?.toggle,
|
|
52
52
|
size: "medium",
|
|
53
53
|
variant: "default",
|
|
54
|
-
children: [
|
|
54
|
+
children: [r && R(r), d > 0 && /* @__PURE__ */ a("span", {
|
|
55
55
|
className: "memobit-toolbar__control-panel-toggle-count",
|
|
56
56
|
children: d
|
|
57
57
|
})]
|
|
@@ -64,7 +64,7 @@ var c = "::", k = (e) => typeof e == "object" ? e.label : void 0, M = (e) => "fi
|
|
|
64
64
|
className: "memobit-toolbar__heading-icon",
|
|
65
65
|
children: [
|
|
66
66
|
l.svg,
|
|
67
|
-
l.icon && /* @__PURE__ */ a(
|
|
67
|
+
l.icon && /* @__PURE__ */ a(I, { name: l.icon }),
|
|
68
68
|
l.emoji
|
|
69
69
|
]
|
|
70
70
|
}), /* @__PURE__ */ t("div", {
|
|
@@ -80,45 +80,45 @@ var c = "::", k = (e) => typeof e == "object" ? e.label : void 0, M = (e) => "fi
|
|
|
80
80
|
}),
|
|
81
81
|
N && /* @__PURE__ */ t("div", {
|
|
82
82
|
className: "memobit-toolbar__content",
|
|
83
|
-
children: [
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
className: ["memobit-toolbar__search-input", s.className].filter(Boolean).join(" ")
|
|
89
|
-
})
|
|
90
|
-
}),
|
|
91
|
-
e && /* @__PURE__ */ a("div", {
|
|
92
|
-
className: "memobit-toolbar__custom",
|
|
93
|
-
children: e
|
|
94
|
-
}),
|
|
95
|
-
o && /* @__PURE__ */ a("div", {
|
|
96
|
-
className: ["memobit-toolbar__sort", o.className].filter(Boolean).join(" "),
|
|
97
|
-
children: /* @__PURE__ */ a(I, {
|
|
98
|
-
highlighted: o.highlighted,
|
|
99
|
-
label: o.label,
|
|
100
|
-
name: o.name ?? "toolbar-sort",
|
|
101
|
-
onChange: g,
|
|
102
|
-
options: M(o),
|
|
103
|
-
placeholder: o.placeholder,
|
|
104
|
-
searchable: o.searchable ?? !1,
|
|
105
|
-
usePortal: !1,
|
|
106
|
-
value: O(o)
|
|
107
|
-
})
|
|
83
|
+
children: [s && /* @__PURE__ */ a("div", {
|
|
84
|
+
className: "memobit-toolbar__search",
|
|
85
|
+
children: /* @__PURE__ */ a(k, {
|
|
86
|
+
...s,
|
|
87
|
+
className: ["memobit-toolbar__search-input", s.className].filter(Boolean).join(" ")
|
|
108
88
|
})
|
|
109
|
-
|
|
89
|
+
}), e && /* @__PURE__ */ a("div", {
|
|
90
|
+
className: "memobit-toolbar__custom",
|
|
91
|
+
children: e
|
|
92
|
+
})]
|
|
110
93
|
}),
|
|
111
94
|
/* @__PURE__ */ t("div", {
|
|
112
|
-
className: "memobit-
|
|
113
|
-
children: [
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
95
|
+
className: "memobit-toolbar__end",
|
|
96
|
+
children: [o && /* @__PURE__ */ a("div", {
|
|
97
|
+
className: ["memobit-toolbar__sort", o.className].filter(Boolean).join(" "),
|
|
98
|
+
children: /* @__PURE__ */ a(x, {
|
|
99
|
+
highlighted: o.highlighted,
|
|
100
|
+
label: o.label,
|
|
101
|
+
name: o.name ?? "toolbar-sort",
|
|
102
|
+
onChange: C,
|
|
103
|
+
options: M(o),
|
|
104
|
+
placeholder: o.placeholder,
|
|
105
|
+
searchable: o.searchable ?? !1,
|
|
106
|
+
usePortal: !1,
|
|
107
|
+
value: O(o)
|
|
108
|
+
})
|
|
109
|
+
}), /* @__PURE__ */ t("div", {
|
|
110
|
+
className: "memobit-toolbar__actions",
|
|
111
|
+
children: [n && /* @__PURE__ */ a($, {
|
|
112
|
+
items: n.items,
|
|
113
|
+
buttonLabel: n.buttonLabel,
|
|
114
|
+
panelTitle: n.panelTitle,
|
|
115
|
+
emptyMessage: n.emptyMessage,
|
|
116
|
+
onItemClick: n.onItemClick
|
|
117
|
+
}), /* @__PURE__ */ a(B, {
|
|
118
|
+
items: _,
|
|
119
|
+
disableResponsive: !0,
|
|
120
|
+
showLabel: !1
|
|
121
|
+
})]
|
|
122
122
|
})]
|
|
123
123
|
})
|
|
124
124
|
]
|
package/dist/index.d.ts
CHANGED
|
@@ -3572,6 +3572,7 @@ export declare interface ToolbarNotificationsConfig {
|
|
|
3572
3572
|
buttonLabel?: string;
|
|
3573
3573
|
panelTitle?: string;
|
|
3574
3574
|
emptyMessage?: string;
|
|
3575
|
+
onItemClick?: (item: NotificationPanelItem) => void;
|
|
3575
3576
|
}
|
|
3576
3577
|
|
|
3577
3578
|
export declare interface ToolbarProps {
|
package/dist/styles/base.scss
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
// Universal body painting + sizing. Consumed via themes.scss so every memobit
|
|
2
|
-
// app picks it up automatically.
|
|
3
|
-
//
|
|
4
|
-
// Why this lives here:
|
|
5
|
-
// Theme backgrounds are gradients (multi-stop linear/radial). If the body is
|
|
6
|
-
// shorter than the viewport during initial render — empty content, loading
|
|
7
|
-
// state — the gradient gets tiled vertically by default, producing visible
|
|
8
|
-
// horizontal banding. `min-height: 100vh` ensures the body is at least as tall
|
|
9
|
-
// as the viewport so the gradient renders at full size on first paint;
|
|
10
|
-
// `background-repeat: no-repeat` is a defensive guard for edge cases (zoom,
|
|
11
|
-
// tall viewport with short content after HMR).
|
|
12
|
-
//
|
|
13
|
-
// Do NOT use the `background` shorthand in consumer App.scss — it resets
|
|
14
|
-
// `background-repeat` to its initial `repeat` value and re-introduces the
|
|
15
|
-
// banding. Set `background-image` long-hand if a per-project override is
|
|
16
|
-
// needed; otherwise omit and let this rule own it.
|
|
17
|
-
|
|
18
|
-
html,
|
|
19
|
-
body {
|
|
20
|
-
background: var(--body-background);
|
|
21
|
-
background-repeat: no-repeat;
|
|
22
|
-
margin: 0;
|
|
23
|
-
padding: 0;
|
|
24
|
-
min-height: 100vh;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// Ambient glow overlay — themes opt in via `--body-background-glow`. Pinned to
|
|
28
|
-
// the viewport so it stays put on scroll; z-index: -1 keeps it behind app content.
|
|
29
|
-
body::before {
|
|
30
|
-
content: '';
|
|
31
|
-
position: fixed;
|
|
32
|
-
inset: 0;
|
|
33
|
-
z-index: -1;
|
|
34
|
-
background: var(--body-background-glow, none);
|
|
35
|
-
pointer-events: none;
|
|
36
|
-
}
|
|
1
|
+
// Universal body painting + sizing. Consumed via themes.scss so every memobit
|
|
2
|
+
// app picks it up automatically.
|
|
3
|
+
//
|
|
4
|
+
// Why this lives here:
|
|
5
|
+
// Theme backgrounds are gradients (multi-stop linear/radial). If the body is
|
|
6
|
+
// shorter than the viewport during initial render — empty content, loading
|
|
7
|
+
// state — the gradient gets tiled vertically by default, producing visible
|
|
8
|
+
// horizontal banding. `min-height: 100vh` ensures the body is at least as tall
|
|
9
|
+
// as the viewport so the gradient renders at full size on first paint;
|
|
10
|
+
// `background-repeat: no-repeat` is a defensive guard for edge cases (zoom,
|
|
11
|
+
// tall viewport with short content after HMR).
|
|
12
|
+
//
|
|
13
|
+
// Do NOT use the `background` shorthand in consumer App.scss — it resets
|
|
14
|
+
// `background-repeat` to its initial `repeat` value and re-introduces the
|
|
15
|
+
// banding. Set `background-image` long-hand if a per-project override is
|
|
16
|
+
// needed; otherwise omit and let this rule own it.
|
|
17
|
+
|
|
18
|
+
html,
|
|
19
|
+
body {
|
|
20
|
+
background: var(--body-background);
|
|
21
|
+
background-repeat: no-repeat;
|
|
22
|
+
margin: 0;
|
|
23
|
+
padding: 0;
|
|
24
|
+
min-height: 100vh;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Ambient glow overlay — themes opt in via `--body-background-glow`. Pinned to
|
|
28
|
+
// the viewport so it stays put on scroll; z-index: -1 keeps it behind app content.
|
|
29
|
+
body::before {
|
|
30
|
+
content: '';
|
|
31
|
+
position: fixed;
|
|
32
|
+
inset: 0;
|
|
33
|
+
z-index: -1;
|
|
34
|
+
background: var(--body-background-glow, none);
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
}
|
package/dist/styles/effects.scss
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
.note-container-effect {
|
|
2
|
-
font-size: var(--font-size-md);
|
|
3
|
-
line-height: 1.6;
|
|
4
|
-
padding: var(--spacing-16);
|
|
5
|
-
border-radius: var(--spacing-12);
|
|
6
|
-
border-left: var(--spacing-2) solid var(--note-container-effect-border-left-color);
|
|
7
|
-
background-color: var(--note-container-effect-background-color);
|
|
8
|
-
color: var(--note-container-effect-color);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.infuse-effect {
|
|
12
|
-
border-width: var(--spacing-1);
|
|
13
|
-
border-style: solid;
|
|
14
|
-
transition: all 0.3s;
|
|
15
|
-
position: relative;
|
|
16
|
-
|
|
17
|
-
&::before {
|
|
18
|
-
content: '';
|
|
19
|
-
position: absolute;
|
|
20
|
-
top: 0;
|
|
21
|
-
left: 0;
|
|
22
|
-
background: var(--infuse-effect-before-background);
|
|
23
|
-
width: var(--spacing-4);
|
|
24
|
-
height: 100%;
|
|
25
|
-
opacity: 0;
|
|
26
|
-
transition: opacity 0.3s;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&:hover {
|
|
30
|
-
transform: translateY(-5px);
|
|
31
|
-
border-color: var(--infuse-effect-hover-border-color);
|
|
32
|
-
box-shadow: 0 var(--spacing-12) var(--spacing-24) var(--infuse-effect-hover-box-shadow-color);
|
|
33
|
-
|
|
34
|
-
&::before {
|
|
35
|
-
opacity: 1;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.up-lift-effect {
|
|
41
|
-
border-width: var(--spacing-1);
|
|
42
|
-
border-style: solid;
|
|
43
|
-
box-shadow: 0 var(--spacing-4) var(--spacing-12) var(--up-lift-effect-box-shadow-color);
|
|
44
|
-
transition: all 0.3s ease;
|
|
45
|
-
position: relative;
|
|
46
|
-
|
|
47
|
-
&::before {
|
|
48
|
-
content: '';
|
|
49
|
-
position: absolute;
|
|
50
|
-
top: 0;
|
|
51
|
-
left: 0;
|
|
52
|
-
width: 5px;
|
|
53
|
-
height: 100%;
|
|
54
|
-
background: var(--up-lift-effect-before-background);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&:hover {
|
|
58
|
-
transform: translateY(-5px);
|
|
59
|
-
border-color: var(--up-lift-effect-hover-border-color);
|
|
60
|
-
box-shadow: 0 var(--spacing-12) var(--spacing-24) var(--up-lift-effect-hover-box-shadow-color);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.glow-effect {
|
|
65
|
-
transition: 0.3s;
|
|
66
|
-
|
|
67
|
-
&:hover {
|
|
68
|
-
box-shadow: var(--glow-box-shadow-color);
|
|
69
|
-
transform: translateY(-2px);
|
|
70
|
-
border-color: var(--glow-hover-border-color);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
1
|
+
.note-container-effect {
|
|
2
|
+
font-size: var(--font-size-md);
|
|
3
|
+
line-height: 1.6;
|
|
4
|
+
padding: var(--spacing-16);
|
|
5
|
+
border-radius: var(--spacing-12);
|
|
6
|
+
border-left: var(--spacing-2) solid var(--note-container-effect-border-left-color);
|
|
7
|
+
background-color: var(--note-container-effect-background-color);
|
|
8
|
+
color: var(--note-container-effect-color);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.infuse-effect {
|
|
12
|
+
border-width: var(--spacing-1);
|
|
13
|
+
border-style: solid;
|
|
14
|
+
transition: all 0.3s;
|
|
15
|
+
position: relative;
|
|
16
|
+
|
|
17
|
+
&::before {
|
|
18
|
+
content: '';
|
|
19
|
+
position: absolute;
|
|
20
|
+
top: 0;
|
|
21
|
+
left: 0;
|
|
22
|
+
background: var(--infuse-effect-before-background);
|
|
23
|
+
width: var(--spacing-4);
|
|
24
|
+
height: 100%;
|
|
25
|
+
opacity: 0;
|
|
26
|
+
transition: opacity 0.3s;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
transform: translateY(-5px);
|
|
31
|
+
border-color: var(--infuse-effect-hover-border-color);
|
|
32
|
+
box-shadow: 0 var(--spacing-12) var(--spacing-24) var(--infuse-effect-hover-box-shadow-color);
|
|
33
|
+
|
|
34
|
+
&::before {
|
|
35
|
+
opacity: 1;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.up-lift-effect {
|
|
41
|
+
border-width: var(--spacing-1);
|
|
42
|
+
border-style: solid;
|
|
43
|
+
box-shadow: 0 var(--spacing-4) var(--spacing-12) var(--up-lift-effect-box-shadow-color);
|
|
44
|
+
transition: all 0.3s ease;
|
|
45
|
+
position: relative;
|
|
46
|
+
|
|
47
|
+
&::before {
|
|
48
|
+
content: '';
|
|
49
|
+
position: absolute;
|
|
50
|
+
top: 0;
|
|
51
|
+
left: 0;
|
|
52
|
+
width: 5px;
|
|
53
|
+
height: 100%;
|
|
54
|
+
background: var(--up-lift-effect-before-background);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&:hover {
|
|
58
|
+
transform: translateY(-5px);
|
|
59
|
+
border-color: var(--up-lift-effect-hover-border-color);
|
|
60
|
+
box-shadow: 0 var(--spacing-12) var(--spacing-24) var(--up-lift-effect-hover-box-shadow-color);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.glow-effect {
|
|
65
|
+
transition: 0.3s;
|
|
66
|
+
|
|
67
|
+
&:hover {
|
|
68
|
+
box-shadow: var(--glow-box-shadow-color);
|
|
69
|
+
transform: translateY(-2px);
|
|
70
|
+
border-color: var(--glow-hover-border-color);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
mark {
|
|
2
|
-
background-color: var(--button-warning-background-color);
|
|
3
|
-
color: var(--button-warning-color);
|
|
4
|
-
padding: var(--spacing-1) var(--spacing-4);
|
|
5
|
-
border-radius: var(--radius-sm);
|
|
6
|
-
}
|
|
1
|
+
mark {
|
|
2
|
+
background-color: var(--button-warning-background-color);
|
|
3
|
+
color: var(--button-warning-color);
|
|
4
|
+
padding: var(--spacing-1) var(--spacing-4);
|
|
5
|
+
border-radius: var(--radius-sm);
|
|
6
|
+
}
|