@alexandregme/zljs 3.0.0 → 3.2.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/CHANGELOG.md +15 -1
- package/dist/{chunk-NIKMOT72.js → chunk-ZIY5NUGA.js} +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/next/index.d.ts +9 -2
- package/dist/next/index.js +23 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,18 @@ A change that needs action in an app has a **Migration** note. When updating, re
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [3.2.0] - 2026-11-10
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- `PageWrapper`, in `@alexandregme/zljs/next`, the frame of a page with a single block in the middle, such as a sign-in card: it takes the height of the screen, centers its children and keeps them narrow
|
|
16
|
+
|
|
17
|
+
## [3.1.0] - 2026-11-10
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- `size="xs"` on `Modal` and `ConnectedModal`, the smallest width, for a short question and its buttons
|
|
22
|
+
|
|
11
23
|
## [3.0.0] - 2026-11-10
|
|
12
24
|
|
|
13
25
|
### Added
|
|
@@ -411,7 +423,9 @@ Replace the shade with the class of the `color` being tested, for example `/(^|\
|
|
|
411
423
|
|
|
412
424
|
The message of `Error` is `text-zl-danger`. `none` and `ghost` didn't change.
|
|
413
425
|
|
|
414
|
-
[Unreleased]: https://github.com/alexandregme/zljs/compare/v3.
|
|
426
|
+
[Unreleased]: https://github.com/alexandregme/zljs/compare/v3.2.0...HEAD
|
|
427
|
+
[3.2.0]: https://github.com/alexandregme/zljs/compare/v3.1.0...v3.2.0
|
|
428
|
+
[3.1.0]: https://github.com/alexandregme/zljs/compare/v3.0.0...v3.1.0
|
|
415
429
|
[3.0.0]: https://github.com/alexandregme/zljs/compare/v2.3.0...v3.0.0
|
|
416
430
|
[2.3.0]: https://github.com/alexandregme/zljs/compare/v2.2.0...v2.3.0
|
|
417
431
|
[2.2.0]: https://github.com/alexandregme/zljs/compare/v2.1.2...v2.2.0
|
|
@@ -255,6 +255,7 @@ var content = tv4({
|
|
|
255
255
|
base: "fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-white rounded-lg shadow-lg p-6 w-full focus:outline-none max-h-[90vh] overflow-y-auto",
|
|
256
256
|
variants: {
|
|
257
257
|
size: {
|
|
258
|
+
xs: "max-w-xs",
|
|
258
259
|
sm: "max-w-sm",
|
|
259
260
|
md: "max-w-md",
|
|
260
261
|
lg: "max-w-2xl",
|
package/dist/index.d.ts
CHANGED
|
@@ -199,13 +199,14 @@ interface StatsCardProps {
|
|
|
199
199
|
|
|
200
200
|
declare const StatsCard: ({ label, value, color }: StatsCardProps) => react.JSX.Element;
|
|
201
201
|
|
|
202
|
-
type ModalSize = "sm" | "md" | "lg" | "xl" | "full";
|
|
202
|
+
type ModalSize = "xs" | "sm" | "md" | "lg" | "xl" | "full";
|
|
203
203
|
interface ModalProps {
|
|
204
204
|
open: boolean;
|
|
205
205
|
onClose: () => void;
|
|
206
206
|
title: string;
|
|
207
207
|
description?: string;
|
|
208
208
|
children?: ReactNode;
|
|
209
|
+
/** The width. `xs` is the smallest, for a short question and its buttons. */
|
|
209
210
|
size?: ModalSize;
|
|
210
211
|
}
|
|
211
212
|
|
package/dist/index.js
CHANGED
package/dist/next/index.d.ts
CHANGED
|
@@ -18,6 +18,13 @@ interface NotFoundProps {
|
|
|
18
18
|
|
|
19
19
|
declare const NotFound: ({ title, message, backHref, backLabel, }: NotFoundProps) => react.JSX.Element;
|
|
20
20
|
|
|
21
|
+
interface PageWrapperProps {
|
|
22
|
+
/** The content of the page, such as a sign-in card. */
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare const PageWrapper: ({ children }: PageWrapperProps) => react.JSX.Element;
|
|
27
|
+
|
|
21
28
|
interface LinkProps {
|
|
22
29
|
children: ReactNode;
|
|
23
30
|
href: string;
|
|
@@ -40,5 +47,5 @@ interface PageConfigProps {
|
|
|
40
47
|
|
|
41
48
|
declare const PageConfig: ({ children, title, reducers, initPage, }: PageConfigProps) => react.JSX.Element;
|
|
42
49
|
|
|
43
|
-
export { AppProviders, Link, NotFound, PageConfig, RootLayout };
|
|
44
|
-
export type { AppProvidersProps, InitPageFunction, LinkProps, NotFoundProps, PageConfigProps, RootLayoutProps };
|
|
50
|
+
export { AppProviders, Link, NotFound, PageConfig, PageWrapper, RootLayout };
|
|
51
|
+
export type { AppProvidersProps, InitPageFunction, LinkProps, NotFoundProps, PageConfigProps, PageWrapperProps, RootLayoutProps };
|
package/dist/next/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
ZustandProviders,
|
|
7
7
|
usePageStore,
|
|
8
8
|
useRouterStore
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-ZIY5NUGA.js";
|
|
10
10
|
|
|
11
11
|
// core/next/root-layout/root-layout.styles.ts
|
|
12
12
|
import { tv } from "tailwind-variants";
|
|
@@ -79,10 +79,26 @@ var NotFound = ({
|
|
|
79
79
|
] });
|
|
80
80
|
};
|
|
81
81
|
|
|
82
|
+
// core/next/page-wrapper/page-wrapper.styles.ts
|
|
83
|
+
import { tv as tv4 } from "tailwind-variants";
|
|
84
|
+
var pageWrapper = tv4({
|
|
85
|
+
slots: {
|
|
86
|
+
base: "flex items-center justify-center min-h-dvh p-4",
|
|
87
|
+
content: "w-full max-w-sm"
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
// core/next/page-wrapper/page-wrapper.tsx
|
|
92
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
93
|
+
var PageWrapper = ({ children }) => {
|
|
94
|
+
const { base, content } = pageWrapper();
|
|
95
|
+
return /* @__PURE__ */ jsx4("div", { className: base(), children: /* @__PURE__ */ jsx4("div", { className: content(), children }) });
|
|
96
|
+
};
|
|
97
|
+
|
|
82
98
|
// core/next/app-providers/app-providers.tsx
|
|
83
99
|
import { useEffect } from "react";
|
|
84
100
|
import { usePathname } from "next/navigation.js";
|
|
85
|
-
import { jsx as
|
|
101
|
+
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
86
102
|
var RouteSync = () => {
|
|
87
103
|
const pathname = usePathname();
|
|
88
104
|
const setRoute = useRouterStore((s) => s.setRoute);
|
|
@@ -94,14 +110,14 @@ var RouteSync = () => {
|
|
|
94
110
|
return null;
|
|
95
111
|
};
|
|
96
112
|
var AppProviders = ({ children, ...store }) => /* @__PURE__ */ jsxs2(ReduxProvider, { ...store, children: [
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ jsx5(RouteSync, {}),
|
|
114
|
+
/* @__PURE__ */ jsx5(ZustandProviders, { children })
|
|
99
115
|
] });
|
|
100
116
|
|
|
101
117
|
// core/next/page-config/page-config.tsx
|
|
102
118
|
import { useEffect as useEffect2 } from "react";
|
|
103
119
|
import { useDispatch, useStore } from "react-redux";
|
|
104
|
-
import { Fragment, jsx as
|
|
120
|
+
import { Fragment, jsx as jsx6 } from "react/jsx-runtime";
|
|
105
121
|
var PageConfig = ({
|
|
106
122
|
children,
|
|
107
123
|
title,
|
|
@@ -124,12 +140,13 @@ var PageConfig = ({
|
|
|
124
140
|
initPage(dispatch);
|
|
125
141
|
}
|
|
126
142
|
}, []);
|
|
127
|
-
return /* @__PURE__ */
|
|
143
|
+
return /* @__PURE__ */ jsx6(Fragment, { children });
|
|
128
144
|
};
|
|
129
145
|
export {
|
|
130
146
|
AppProviders,
|
|
131
147
|
Link,
|
|
132
148
|
NotFound,
|
|
133
149
|
PageConfig,
|
|
150
|
+
PageWrapper,
|
|
134
151
|
RootLayout
|
|
135
152
|
};
|