@a-type/ui 0.6.27 → 0.6.28
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/dist/cjs/components/layouts/PageContent.d.ts +2 -1
- package/dist/cjs/components/layouts/PageContent.js +2 -1
- package/dist/cjs/components/layouts/PageContent.js.map +1 -1
- package/dist/esm/components/layouts/PageContent.d.ts +2 -1
- package/dist/esm/components/layouts/PageContent.js +2 -1
- package/dist/esm/components/layouts/PageContent.js.map +1 -1
- package/package.json +1 -1
- package/src/components/layouts/PageContent.tsx +3 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
export declare function PageContent({ children, fullHeight, noPadding, innerProps, className, ...rest }: HTMLAttributes<HTMLDivElement> & {
|
|
2
|
+
export declare function PageContent({ children, fullHeight, noPadding, innerProps, className, scrollable, ...rest }: HTMLAttributes<HTMLDivElement> & {
|
|
3
3
|
fullHeight?: boolean;
|
|
4
4
|
noPadding?: boolean;
|
|
5
5
|
innerProps?: HTMLAttributes<HTMLDivElement>;
|
|
6
|
+
scrollable?: boolean;
|
|
6
7
|
}): JSX.Element;
|
|
@@ -21,7 +21,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
21
21
|
const clsx_1 = __importDefault(require("clsx"));
|
|
22
22
|
const useSize_js_1 = require("../../hooks/useSize.js");
|
|
23
23
|
function PageContent(_a) {
|
|
24
|
-
var { children, fullHeight, noPadding, innerProps, className } = _a, rest = __rest(_a, ["children", "fullHeight", "noPadding", "innerProps", "className"]);
|
|
24
|
+
var { children, fullHeight, noPadding, innerProps, className, scrollable = true } = _a, rest = __rest(_a, ["children", "fullHeight", "noPadding", "innerProps", "className", "scrollable"]);
|
|
25
25
|
const innerRef = (0, useSize_js_1.useBoundsCssVars)(200, undefined, {
|
|
26
26
|
left: '--content-left',
|
|
27
27
|
top: '--content-top',
|
|
@@ -32,6 +32,7 @@ function PageContent(_a) {
|
|
|
32
32
|
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, clsx_1.default)('[grid-area:content] max-w-full min-w-0 w-full flex flex-col items-start relative flex-1 gap-3', className) }, rest, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({}, innerProps, { className: (0, clsx_1.default)('w-full min-w-0 flex flex-col mb-120px px-4 py-4 min-h-0 flex-1', 'sm:max-w-700px sm:w-full sm:min-h-auto', {
|
|
33
33
|
'flex-1': fullHeight,
|
|
34
34
|
'important:p-0 important:sm:p-4': noPadding,
|
|
35
|
+
'overflow-y-auto': scrollable,
|
|
35
36
|
}, innerProps === null || innerProps === void 0 ? void 0 : innerProps.className), ref: innerRef }, { children: children })) })));
|
|
36
37
|
}
|
|
37
38
|
exports.PageContent = PageContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageContent.js","sourceRoot":"","sources":["../../../../src/components/layouts/PageContent.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AACb,gDAA8B;AAE9B,uDAA0D;AAE1D,SAAgB,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"PageContent.js","sourceRoot":"","sources":["../../../../src/components/layouts/PageContent.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AACb,gDAA8B;AAE9B,uDAA0D;AAE1D,SAAgB,WAAW,CAAC,EAa3B;QAb2B,EAC3B,QAAQ,EACR,UAAU,EACV,SAAS,EACT,UAAU,EACV,SAAS,EACT,UAAU,GAAG,IAAI,OAOjB,EANG,IAAI,cAPoB,gFAQ3B,CADO;IAOP,MAAM,QAAQ,GAAG,IAAA,6BAAgB,EAAiB,GAAG,EAAE,SAAS,EAAE;QACjE,IAAI,EAAE,gBAAgB;QACtB,GAAG,EAAE,eAAe;QACpB,KAAK,EAAE,iBAAiB;QACxB,MAAM,EAAE,kBAAkB;QAC1B,KAAK,EAAE,iBAAiB;KACxB,CAAC,CAAC;IAEH,OAAO,CACN,8CACC,SAAS,EAAE,IAAA,cAAU,EACpB,+FAA+F,EAC/F,SAAS,CACT,IACG,IAAI,cAER,gDACK,UAAU,IACd,SAAS,EAAE,IAAA,cAAU,EACpB,gEAAgE,EAChE,oCAAoC,EACpC;gBACC,QAAQ,EAAE,UAAU;gBACpB,wBAAwB,EAAE,SAAS;gBACnC,iBAAiB,EAAE,UAAU;aAC7B,EACD,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,SAAS,CACrB,EACD,GAAG,EAAE,QAAQ,gBAEZ,QAAQ,IACJ,IACD,CACN,CAAC;AACH,CAAC;AAhDD,kCAgDC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
export declare function PageContent({ children, fullHeight, noPadding, innerProps, className, ...rest }: HTMLAttributes<HTMLDivElement> & {
|
|
2
|
+
export declare function PageContent({ children, fullHeight, noPadding, innerProps, className, scrollable, ...rest }: HTMLAttributes<HTMLDivElement> & {
|
|
3
3
|
fullHeight?: boolean;
|
|
4
4
|
noPadding?: boolean;
|
|
5
5
|
innerProps?: HTMLAttributes<HTMLDivElement>;
|
|
6
|
+
scrollable?: boolean;
|
|
6
7
|
}): JSX.Element;
|
|
@@ -15,7 +15,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
15
15
|
import classNames from 'clsx';
|
|
16
16
|
import { useBoundsCssVars } from '../../hooks/useSize.js';
|
|
17
17
|
export function PageContent(_a) {
|
|
18
|
-
var { children, fullHeight, noPadding, innerProps, className } = _a, rest = __rest(_a, ["children", "fullHeight", "noPadding", "innerProps", "className"]);
|
|
18
|
+
var { children, fullHeight, noPadding, innerProps, className, scrollable = true } = _a, rest = __rest(_a, ["children", "fullHeight", "noPadding", "innerProps", "className", "scrollable"]);
|
|
19
19
|
const innerRef = useBoundsCssVars(200, undefined, {
|
|
20
20
|
left: '--content-left',
|
|
21
21
|
top: '--content-top',
|
|
@@ -26,6 +26,7 @@ export function PageContent(_a) {
|
|
|
26
26
|
return (_jsx("div", Object.assign({ className: classNames('[grid-area:content] max-w-full min-w-0 w-full flex flex-col items-start relative flex-1 gap-3', className) }, rest, { children: _jsx("div", Object.assign({}, innerProps, { className: classNames('w-full min-w-0 flex flex-col mb-120px px-4 py-4 min-h-0 flex-1', 'sm:max-w-700px sm:w-full sm:min-h-auto', {
|
|
27
27
|
'flex-1': fullHeight,
|
|
28
28
|
'important:p-0 important:sm:p-4': noPadding,
|
|
29
|
+
'overflow-y-auto': scrollable,
|
|
29
30
|
}, innerProps === null || innerProps === void 0 ? void 0 : innerProps.className), ref: innerRef }, { children: children })) })));
|
|
30
31
|
}
|
|
31
32
|
//# sourceMappingURL=PageContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageContent.js","sourceRoot":"","sources":["../../../../src/components/layouts/PageContent.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;AACb,OAAO,UAAU,MAAM,MAAM,CAAC;AAE9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,UAAU,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"PageContent.js","sourceRoot":"","sources":["../../../../src/components/layouts/PageContent.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;AACb,OAAO,UAAU,MAAM,MAAM,CAAC;AAE9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,UAAU,WAAW,CAAC,EAa3B;QAb2B,EAC3B,QAAQ,EACR,UAAU,EACV,SAAS,EACT,UAAU,EACV,SAAS,EACT,UAAU,GAAG,IAAI,OAOjB,EANG,IAAI,cAPoB,gFAQ3B,CADO;IAOP,MAAM,QAAQ,GAAG,gBAAgB,CAAiB,GAAG,EAAE,SAAS,EAAE;QACjE,IAAI,EAAE,gBAAgB;QACtB,GAAG,EAAE,eAAe;QACpB,KAAK,EAAE,iBAAiB;QACxB,MAAM,EAAE,kBAAkB;QAC1B,KAAK,EAAE,iBAAiB;KACxB,CAAC,CAAC;IAEH,OAAO,CACN,4BACC,SAAS,EAAE,UAAU,CACpB,+FAA+F,EAC/F,SAAS,CACT,IACG,IAAI,cAER,8BACK,UAAU,IACd,SAAS,EAAE,UAAU,CACpB,gEAAgE,EAChE,oCAAoC,EACpC;gBACC,QAAQ,EAAE,UAAU;gBACpB,wBAAwB,EAAE,SAAS;gBACnC,iBAAiB,EAAE,UAAU;aAC7B,EACD,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,SAAS,CACrB,EACD,GAAG,EAAE,QAAQ,gBAEZ,QAAQ,IACJ,IACD,CACN,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -9,11 +9,13 @@ export function PageContent({
|
|
|
9
9
|
noPadding,
|
|
10
10
|
innerProps,
|
|
11
11
|
className,
|
|
12
|
+
scrollable = true,
|
|
12
13
|
...rest
|
|
13
14
|
}: HTMLAttributes<HTMLDivElement> & {
|
|
14
15
|
fullHeight?: boolean;
|
|
15
16
|
noPadding?: boolean;
|
|
16
17
|
innerProps?: HTMLAttributes<HTMLDivElement>;
|
|
18
|
+
scrollable?: boolean;
|
|
17
19
|
}) {
|
|
18
20
|
const innerRef = useBoundsCssVars<HTMLDivElement>(200, undefined, {
|
|
19
21
|
left: '--content-left',
|
|
@@ -39,6 +41,7 @@ export function PageContent({
|
|
|
39
41
|
{
|
|
40
42
|
'flex-1': fullHeight,
|
|
41
43
|
'important:(p-0 sm:p-4)': noPadding,
|
|
44
|
+
'overflow-y-auto': scrollable,
|
|
42
45
|
},
|
|
43
46
|
innerProps?.className,
|
|
44
47
|
)}
|