@memobit/libs 3.28.2 → 3.30.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.
Files changed (39) hide show
  1. package/dist/components/Auth/ChangePasswordModal/ChangePasswordModal2.js +7 -7
  2. package/dist/components/Auth/Login/Login2.js +4 -4
  3. package/dist/components/Auth/MfaSetupModal/MfaSetupModal2.js +6 -6
  4. package/dist/components/DataView/DataView.CardView.js +84 -84
  5. package/dist/components/MenuHamburger/MenuHamburger2.js +14 -14
  6. package/dist/components/PageShell/AppFrame.js +32 -0
  7. package/dist/components/PageShell/AppNav.js +55 -0
  8. package/dist/components/PageShell/BottomSheet.js +45 -0
  9. package/dist/components/PageShell/FilterField.css +1 -0
  10. package/dist/components/PageShell/FilterField2.js +294 -0
  11. package/dist/components/PageShell/FilterSections.js +86 -0
  12. package/dist/components/PageShell/PageParts.js +316 -0
  13. package/dist/components/PageShell/PageShell.css +1 -0
  14. package/dist/components/PageShell/PageShell2.js +11 -0
  15. package/dist/components/PageShell/WorkbenchPhone.js +142 -0
  16. package/dist/components/PageShell/WorkbenchShell.js +160 -0
  17. package/dist/components/PageShell/filterRules.js +123 -0
  18. package/dist/components/PageShell/filterValues.js +30 -0
  19. package/dist/components/PageShell/menuItems.js +17 -0
  20. package/dist/components/PageShell/shellText.js +39 -0
  21. package/dist/components/PageShell/useAppFrame.js +6 -0
  22. package/dist/components/PageShell/usePaging.js +23 -0
  23. package/dist/components/PageShell/usePruneStaleFilters.js +17 -0
  24. package/dist/components/PageShell/useSummaryMessages.js +17 -0
  25. package/dist/components/Pagination/Pagination.css +1 -1
  26. package/dist/components/Pagination/Pagination2.js +14 -13
  27. package/dist/components/RouterAppFrame/RouterAppFrame.js +37 -0
  28. package/dist/components/ScrollToTop/ScrollToTop.css +1 -1
  29. package/dist/components/ScrollToTop/ScrollToTop2.js +20 -19
  30. package/dist/contexts/LanguageContext/libMessages.js +57 -7
  31. package/dist/helpers/VersionInfo.js +1 -1
  32. package/dist/hooks/useAccountMenu.js +6 -6
  33. package/dist/index.d.ts +335 -0
  34. package/dist/index.js +235 -213
  35. package/dist/router.d.ts +68 -0
  36. package/dist/router.js +4 -2
  37. package/dist/version.js +1 -1
  38. package/dist/version.json +4 -4
  39. package/package.json +147 -147
package/dist/router.d.ts CHANGED
@@ -1,6 +1,60 @@
1
+ import { ComponentType } from 'react';
2
+ import { FC } from 'react';
3
+ import { IconName } from '@memobit/icons';
1
4
  import { ReactElement } from 'react';
2
5
  import { ReactNode } from 'react';
3
6
 
7
+ declare interface AccountMenuModalProps {
8
+ isOpen: boolean;
9
+ onClose: () => void;
10
+ }
11
+
12
+ declare interface AppFrameProps {
13
+ app: AppIdentity;
14
+ /** The app's sections. With react-router, RouterAppFrame from '@memobit/libs/router' builds these from paths. */
15
+ nav?: AppNavItem[];
16
+ /** Adds the account menu (theme, password, two-factor, logout) and mounts the dialogs it opens. Needs an AuthProvider above. */
17
+ account?: UseAccountMenuOptions;
18
+ /** App-specific menu entries, listed before the account ones. Page actions join them on small screens. */
19
+ menuItems?: MenuHamburgerItem[];
20
+ children: ReactNode;
21
+ }
22
+
23
+ declare interface AppIdentity {
24
+ name: string;
25
+ icon?: IconName;
26
+ /** The app's own logo, used instead of `icon`: an image URL (e.g. '/icon.svg') or any element. */
27
+ logo?: ReactNode;
28
+ onHomeClick?: () => void;
29
+ }
30
+
31
+ /** One of the app's sections. Shown as a side list on desktop, an icon rail on tablet and a bottom tab bar on phone. */
32
+ declare interface AppNavItem {
33
+ id: string;
34
+ label: string;
35
+ icon: IconName;
36
+ count?: number;
37
+ isActive: boolean;
38
+ onSelect: () => void;
39
+ }
40
+
41
+ export declare interface AppRouteNavItem {
42
+ path: string;
43
+ label: string;
44
+ icon: IconName;
45
+ count?: number;
46
+ /** Whether only the exact path counts as this section. Defaults to true for '/' and false otherwise, so '/archive/12' still lights up Archive. */
47
+ end?: boolean;
48
+ }
49
+
50
+ declare interface MenuHamburgerItem {
51
+ label: string;
52
+ icon?: IconName;
53
+ onClick: () => void;
54
+ isActive: boolean;
55
+ separator?: boolean;
56
+ }
57
+
4
58
  export declare function ProtectedRoute({ children, loginPath }: ProtectedRouteProps): ReactElement;
5
59
 
6
60
  export declare interface ProtectedRouteProps {
@@ -8,6 +62,20 @@ export declare interface ProtectedRouteProps {
8
62
  loginPath?: string;
9
63
  }
10
64
 
65
+ /** AppFrame for react-router apps: sections are given by path, the current one follows the URL, and the app logo leads home. */
66
+ export declare const RouterAppFrame: FC<RouterAppFrameProps>;
67
+
68
+ export declare interface RouterAppFrameProps extends Omit<AppFrameProps, 'nav'> {
69
+ nav: AppRouteNavItem[];
70
+ }
71
+
72
+ declare interface UseAccountMenuOptions {
73
+ appName: string;
74
+ mfaModal?: ComponentType<AccountMenuModalProps>;
75
+ themeLabel?: string;
76
+ loginPath?: string;
77
+ }
78
+
11
79
  export { }
12
80
 
13
81
 
package/dist/router.js CHANGED
@@ -1,4 +1,6 @@
1
- import { ProtectedRoute as t } from "./components/ProtectedRoute/ProtectedRoute2.js";
1
+ import { ProtectedRoute as r } from "./components/ProtectedRoute/ProtectedRoute2.js";
2
+ import { RouterAppFrame as e } from "./components/RouterAppFrame/RouterAppFrame.js";
2
3
  export {
3
- t as ProtectedRoute
4
+ r as ProtectedRoute,
5
+ e as RouterAppFrame
4
6
  };
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
- var I = "3.28.2", B = 635, L = "699cf06", _ = "2026-11-04T21:37:23.925Z", r = "635";
1
+ var I = "3.30.0", B = 653, L = "f78d4b1", _ = "2026-11-07T19:17:45.486Z", r = "653";
2
2
  export {
3
3
  _ as LIB_BUILD_DATE,
4
4
  r as LIB_BUILD_ID,
package/dist/version.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "3.28.2",
3
- "buildNumber": 635,
4
- "commit": "699cf06",
5
- "buildDate": "2026-11-04T21:37:23.925Z"
2
+ "version": "3.30.0",
3
+ "buildNumber": 653,
4
+ "commit": "f78d4b1",
5
+ "buildDate": "2026-11-07T19:17:45.486Z"
6
6
  }
package/package.json CHANGED
@@ -1,147 +1,147 @@
1
- {
2
- "name": "@memobit/libs",
3
- "version": "3.28.2",
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
- "keywords": [
6
- "react",
7
- "react-components",
8
- "component-library",
9
- "ui",
10
- "ui-kit",
11
- "design-system",
12
- "typescript",
13
- "hooks",
14
- "memobit"
15
- ],
16
- "author": "Iulian Cristea <iulianx@gmail.com>",
17
- "license": "Apache-2.0",
18
- "homepage": "https://react.memobit.ro/",
19
- "repository": {
20
- "type": "git",
21
- "url": "git+https://github.com/CristeaIulian/memobit-react-library.git"
22
- },
23
- "bugs": {
24
- "url": "https://github.com/CristeaIulian/memobit-react-library/issues"
25
- },
26
- "publishConfig": {
27
- "access": "public"
28
- },
29
- "sideEffects": [
30
- "**/*.css",
31
- "**/*.scss"
32
- ],
33
- "type": "module",
34
- "main": "dist/index.js",
35
- "module": "dist/index.js",
36
- "types": "dist/index.d.ts",
37
- "exports": {
38
- ".": {
39
- "types": "./dist/index.d.ts",
40
- "import": "./dist/index.js"
41
- },
42
- "./dist/index.css": "./dist/index.css",
43
- "./mfa": {
44
- "types": "./dist/mfa.d.ts",
45
- "import": "./dist/mfa.js"
46
- },
47
- "./http": {
48
- "types": "./dist/http.d.ts",
49
- "import": "./dist/http.js"
50
- },
51
- "./router": {
52
- "types": "./dist/router.d.ts",
53
- "import": "./dist/router.js"
54
- },
55
- "./dist/styles/variables.scss": "./dist/styles/variables.scss",
56
- "./dist/styles/base.scss": "./dist/styles/base.scss",
57
- "./dist/styles/effects.scss": "./dist/styles/effects.scss",
58
- "./dist/styles/highlight.scss": "./dist/styles/highlight.scss",
59
- "./dist/styles/scrollbars.scss": "./dist/styles/scrollbars.scss",
60
- "./dist/styles/utilities.scss": "./dist/styles/utilities.scss",
61
- "./dist/styles/utility-classes.scss": "./dist/styles/utility-classes.scss",
62
- "./dist/components/*": "./dist/components/*"
63
- },
64
- "files": [
65
- "dist"
66
- ],
67
- "scripts": {
68
- "build": "vite build && npm pack",
69
- "release": "npm run build && npm publish",
70
- "check:npm-auth": "node scripts/check-npm-auth.mjs",
71
- "ship": "npm run check:npm-auth && npm version patch && npm run release && git push --follow-tags",
72
- "ship:minor": "npm run check:npm-auth && npm version minor && npm run release && git push --follow-tags",
73
- "ship:major": "npm run check:npm-auth && npm version major && npm run release && git push --follow-tags",
74
- "prepublishOnly": "vite build",
75
- "dev": "vite build --watch",
76
- "playground": "vite serve playground --config playground/vite.config.ts",
77
- "lint": "eslint .",
78
- "lint:fix": "eslint . --fix",
79
- "format": "prettier --write \"**/*.{ts,tsx,js,jsx,mjs,cjs,css,scss}\"",
80
- "format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,mjs,cjs,css,scss}\""
81
- },
82
- "peerDependencies": {
83
- "@memobit/core": "1.0.0",
84
- "@memobit/icons": "^1.7.0",
85
- "@memobit/themes": "^1.0.0",
86
- "react": "19.3.0",
87
- "react-dom": "19.3.0",
88
- "react-router": "8.4.0"
89
- },
90
- "peerDependenciesMeta": {
91
- "react-router": {
92
- "optional": true
93
- }
94
- },
95
- "devDependencies": {
96
- "@eslint/js": "9.39.4",
97
- "@memobit/core": "file:../memobit-core",
98
- "@memobit/icons": "file:../memobit-react-icons",
99
- "@memobit/themes": "file:../memobit-react-themes",
100
- "@microsoft/api-extractor": "7.59.2",
101
- "@types/node": "25.9.8",
102
- "@types/react": "19.3.0",
103
- "@types/react-dom": "19.3.0",
104
- "@vitejs/plugin-react": "6.1.1",
105
- "esbuild": "0.28.2",
106
- "eslint": "9.39.4",
107
- "eslint-config-prettier": "10.1.8",
108
- "eslint-plugin-import": "2.32.0",
109
- "eslint-plugin-prettier": "5.5.6",
110
- "eslint-plugin-react": "7.37.5",
111
- "eslint-plugin-react-hooks": "7.1.1",
112
- "eslint-plugin-react-refresh": "0.5.7",
113
- "eslint-plugin-simple-import-sort": "14.0.0",
114
- "globals": "17.12.0",
115
- "prettier": "3.9.9",
116
- "qrcode.react": "4.2.0",
117
- "react": "19.3.0",
118
- "react-dom": "19.3.0",
119
- "react-router": "8.4.0",
120
- "sass": "1.105.0",
121
- "terser": "5.51.2",
122
- "typescript": "6.0.3",
123
- "typescript-eslint": "8.70.1",
124
- "vite": "8.3.3",
125
- "vite-plugin-dts": "5.1.1",
126
- "vite-plugin-static-copy": "4.1.1"
127
- },
128
- "overrides": {
129
- "@rushstack/ts-command-line": {
130
- "argparse": "2.0.1"
131
- },
132
- "brace-expansion@1": "1.1.21",
133
- "brace-expansion@5": "5.0.12",
134
- "esbuild": "0.28.2",
135
- "fast-uri@3": "3.1.9",
136
- "immutable": "5.1.9",
137
- "js-yaml": "4.3.2",
138
- "minimatch@10": "10.2.6",
139
- "nanoid@3": "3.3.18",
140
- "picomatch@2": "2.3.2",
141
- "postcss": "8.5.28",
142
- "source-map-js": "1.2.2",
143
- "vite-plugin-static-copy": {
144
- "chokidar": "5.0.0"
145
- }
146
- }
147
- }
1
+ {
2
+ "name": "@memobit/libs",
3
+ "version": "3.30.0",
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
+ "keywords": [
6
+ "react",
7
+ "react-components",
8
+ "component-library",
9
+ "ui",
10
+ "ui-kit",
11
+ "design-system",
12
+ "typescript",
13
+ "hooks",
14
+ "memobit"
15
+ ],
16
+ "author": "Iulian Cristea <iulianx@gmail.com>",
17
+ "license": "Apache-2.0",
18
+ "homepage": "https://react.memobit.ro/",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/CristeaIulian/memobit-react-library.git"
22
+ },
23
+ "bugs": {
24
+ "url": "https://github.com/CristeaIulian/memobit-react-library/issues"
25
+ },
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "sideEffects": [
30
+ "**/*.css",
31
+ "**/*.scss"
32
+ ],
33
+ "type": "module",
34
+ "main": "dist/index.js",
35
+ "module": "dist/index.js",
36
+ "types": "dist/index.d.ts",
37
+ "exports": {
38
+ ".": {
39
+ "types": "./dist/index.d.ts",
40
+ "import": "./dist/index.js"
41
+ },
42
+ "./dist/index.css": "./dist/index.css",
43
+ "./mfa": {
44
+ "types": "./dist/mfa.d.ts",
45
+ "import": "./dist/mfa.js"
46
+ },
47
+ "./http": {
48
+ "types": "./dist/http.d.ts",
49
+ "import": "./dist/http.js"
50
+ },
51
+ "./router": {
52
+ "types": "./dist/router.d.ts",
53
+ "import": "./dist/router.js"
54
+ },
55
+ "./dist/styles/variables.scss": "./dist/styles/variables.scss",
56
+ "./dist/styles/base.scss": "./dist/styles/base.scss",
57
+ "./dist/styles/effects.scss": "./dist/styles/effects.scss",
58
+ "./dist/styles/highlight.scss": "./dist/styles/highlight.scss",
59
+ "./dist/styles/scrollbars.scss": "./dist/styles/scrollbars.scss",
60
+ "./dist/styles/utilities.scss": "./dist/styles/utilities.scss",
61
+ "./dist/styles/utility-classes.scss": "./dist/styles/utility-classes.scss",
62
+ "./dist/components/*": "./dist/components/*"
63
+ },
64
+ "files": [
65
+ "dist"
66
+ ],
67
+ "scripts": {
68
+ "build": "vite build && npm pack",
69
+ "release": "npm run build && npm publish",
70
+ "check:npm-auth": "node scripts/check-npm-auth.mjs",
71
+ "ship": "npm run check:npm-auth && npm version patch && npm run release && git push --follow-tags",
72
+ "ship:minor": "npm run check:npm-auth && npm version minor && npm run release && git push --follow-tags",
73
+ "ship:major": "npm run check:npm-auth && npm version major && npm run release && git push --follow-tags",
74
+ "prepublishOnly": "vite build",
75
+ "dev": "vite build --watch",
76
+ "playground": "vite serve playground --config playground/vite.config.ts",
77
+ "lint": "eslint .",
78
+ "lint:fix": "eslint . --fix",
79
+ "format": "prettier --write \"**/*.{ts,tsx,js,jsx,mjs,cjs,css,scss}\"",
80
+ "format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,mjs,cjs,css,scss}\""
81
+ },
82
+ "peerDependencies": {
83
+ "@memobit/core": "1.0.0",
84
+ "@memobit/icons": "^1.7.0",
85
+ "@memobit/themes": "^1.0.0",
86
+ "react": "19.3.0",
87
+ "react-dom": "19.3.0",
88
+ "react-router": "8.4.0"
89
+ },
90
+ "peerDependenciesMeta": {
91
+ "react-router": {
92
+ "optional": true
93
+ }
94
+ },
95
+ "devDependencies": {
96
+ "@eslint/js": "9.39.4",
97
+ "@memobit/core": "file:../memobit-core",
98
+ "@memobit/icons": "file:../memobit-react-icons",
99
+ "@memobit/themes": "file:../memobit-react-themes",
100
+ "@microsoft/api-extractor": "7.59.2",
101
+ "@types/node": "25.9.8",
102
+ "@types/react": "19.3.0",
103
+ "@types/react-dom": "19.3.0",
104
+ "@vitejs/plugin-react": "6.1.1",
105
+ "esbuild": "0.28.2",
106
+ "eslint": "9.39.4",
107
+ "eslint-config-prettier": "10.1.8",
108
+ "eslint-plugin-import": "2.32.0",
109
+ "eslint-plugin-prettier": "5.5.6",
110
+ "eslint-plugin-react": "7.37.5",
111
+ "eslint-plugin-react-hooks": "7.1.1",
112
+ "eslint-plugin-react-refresh": "0.5.7",
113
+ "eslint-plugin-simple-import-sort": "14.0.0",
114
+ "globals": "17.12.0",
115
+ "prettier": "3.9.9",
116
+ "qrcode.react": "4.2.0",
117
+ "react": "19.3.0",
118
+ "react-dom": "19.3.0",
119
+ "react-router": "8.4.0",
120
+ "sass": "1.105.0",
121
+ "terser": "5.51.2",
122
+ "typescript": "6.0.3",
123
+ "typescript-eslint": "8.70.1",
124
+ "vite": "8.3.3",
125
+ "vite-plugin-dts": "5.1.1",
126
+ "vite-plugin-static-copy": "4.1.1"
127
+ },
128
+ "overrides": {
129
+ "@rushstack/ts-command-line": {
130
+ "argparse": "2.0.1"
131
+ },
132
+ "brace-expansion@1": "1.1.21",
133
+ "brace-expansion@5": "5.0.12",
134
+ "esbuild": "0.28.2",
135
+ "fast-uri@3": "3.1.9",
136
+ "immutable": "5.1.9",
137
+ "js-yaml": "4.3.2",
138
+ "minimatch@10": "10.2.6",
139
+ "nanoid@3": "3.3.18",
140
+ "picomatch@2": "2.3.2",
141
+ "postcss": "8.5.28",
142
+ "source-map-js": "1.2.2",
143
+ "vite-plugin-static-copy": {
144
+ "chokidar": "5.0.0"
145
+ }
146
+ }
147
+ }