@revikornmann/muka-ui 0.55.0 → 0.56.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/dist/cjs/components/Page/Page.css +22 -2
- package/dist/cjs/components/Page/Page.js +5 -2
- package/dist/cjs/components/Page/Page.js.map +1 -1
- package/dist/esm/components/Page/Page.css +22 -2
- package/dist/esm/components/Page/Page.js +5 -2
- package/dist/esm/components/Page/Page.js.map +1 -1
- package/dist/styles/components/Page.css +22 -2
- package/dist/styles/index.css +822 -802
- package/dist/styles/muka-dark.css +822 -802
- package/dist/styles/muka-light.css +822 -802
- package/dist/styles/wireframe-dark.css +822 -802
- package/dist/styles/wireframe-light.css +822 -802
- package/dist/types/components/Page/Page.d.ts +11 -0
- package/dist/types/components/Page/Page.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -51,7 +51,27 @@
|
|
|
51
51
|
background-color: var(--color-surface-level3);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
/*
|
|
55
|
-
|
|
54
|
+
/*
|
|
55
|
+
* Actions stick to the bottom edge while the document scrolls, and come to
|
|
56
|
+
* rest after the content (above a footer). A BottomBar inside clears the home
|
|
57
|
+
* indicator; this wrapper clears a landscape notch.
|
|
58
|
+
*/
|
|
59
|
+
.muka-page__actions {
|
|
60
|
+
position: sticky;
|
|
61
|
+
bottom: 0;
|
|
62
|
+
z-index: 10;
|
|
63
|
+
flex-shrink: 0;
|
|
64
|
+
padding-left: env(safe-area-inset-left, 0px);
|
|
65
|
+
padding-right: env(safe-area-inset-right, 0px);
|
|
66
|
+
background-color: var(--muka-page-background);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* With a footer, the footer clears the home indicator, not the bar above it. */
|
|
70
|
+
.muka-page:has(> .muka-page__footer) > .muka-page__actions .muka-bottombar {
|
|
71
|
+
padding-bottom: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Without a footer or actions, the content is last and clears the home indicator. */
|
|
75
|
+
.muka-page:not(:has(> .muka-page__footer)):not(:has(> .muka-page__actions)) > .muka-page__main {
|
|
56
76
|
padding-bottom: env(safe-area-inset-bottom, 0px);
|
|
57
77
|
}
|
|
@@ -13,15 +13,18 @@ require("./Page.css");
|
|
|
13
13
|
* Android app shell without extra CSS. Pair it with a `SiteHeader`, which
|
|
14
14
|
* handles the status bar.
|
|
15
15
|
*
|
|
16
|
+
* A page with one task to finish (read an offer, then sign it) takes its
|
|
17
|
+
* actions in `actions`: they stay in reach while the reader scrolls.
|
|
18
|
+
*
|
|
16
19
|
* App screens use `View` (inside `AppShell`) instead; it scrolls its own body.
|
|
17
20
|
*/
|
|
18
|
-
const Page = ({ header, children, footer, surface = 'level3', footerSurface, className, ...props }) => {
|
|
21
|
+
const Page = ({ header, children, footer, actions, surface = 'level3', footerSurface, className, ...props }) => {
|
|
19
22
|
const classes = [
|
|
20
23
|
'muka-page',
|
|
21
24
|
surface === 'level2' && 'muka-page--surface-2',
|
|
22
25
|
className,
|
|
23
26
|
].filter(Boolean).join(' ');
|
|
24
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: classes, ...props, children: [header, (0, jsx_runtime_1.jsx)("main", { className: "muka-page__main", children: children }), footer && ((0, jsx_runtime_1.jsx)("div", { className: [
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: classes, ...props, children: [header, (0, jsx_runtime_1.jsx)("main", { className: "muka-page__main", children: children }), actions && (0, jsx_runtime_1.jsx)("div", { className: "muka-page__actions", children: actions }), footer && ((0, jsx_runtime_1.jsx)("div", { className: [
|
|
25
28
|
'muka-page__footer',
|
|
26
29
|
footerSurface && `muka-page__footer--surface-${footerSurface === 'level2' ? 2 : 3}`,
|
|
27
30
|
].filter(Boolean).join(' '), children: footer }))] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.js","sourceRoot":"","sources":["../../../../components/Page/Page.tsx"],"names":[],"mappings":";;;;AACA,sBAAoB;
|
|
1
|
+
{"version":3,"file":"Page.js","sourceRoot":"","sources":["../../../../components/Page/Page.tsx"],"names":[],"mappings":";;;;AACA,sBAAoB;AAqCpB;;;;;;;;;;;;;;GAcG;AACI,MAAM,IAAI,GAAwB,CAAC,EACxC,MAAM,EACN,QAAQ,EACR,MAAM,EACN,OAAO,EACP,OAAO,GAAG,QAAQ,EAClB,aAAa,EACb,SAAS,EACT,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,OAAO,GAAG;QACd,WAAW;QACX,OAAO,KAAK,QAAQ,IAAI,sBAAsB;QAC9C,SAAS;KACV,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE5B,OAAO,CACL,iCAAK,SAAS,EAAE,OAAO,KAAM,KAAK,aAC/B,MAAM,EACP,iCAAM,SAAS,EAAC,iBAAiB,YAAE,QAAQ,GAAQ,EAClD,OAAO,IAAI,gCAAK,SAAS,EAAC,oBAAoB,YAAE,OAAO,GAAO,EAC9D,MAAM,IAAI,CACT,gCACE,SAAS,EAAE;oBACT,mBAAmB;oBACnB,aAAa,IAAI,8BAA8B,aAAa,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;iBACpF,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,YAE1B,MAAM,GACH,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAjCW,QAAA,IAAI,QAiCf;AAEF,kBAAe,YAAI,CAAC"}
|
|
@@ -51,7 +51,27 @@
|
|
|
51
51
|
background-color: var(--color-surface-level3);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
/*
|
|
55
|
-
|
|
54
|
+
/*
|
|
55
|
+
* Actions stick to the bottom edge while the document scrolls, and come to
|
|
56
|
+
* rest after the content (above a footer). A BottomBar inside clears the home
|
|
57
|
+
* indicator; this wrapper clears a landscape notch.
|
|
58
|
+
*/
|
|
59
|
+
.muka-page__actions {
|
|
60
|
+
position: sticky;
|
|
61
|
+
bottom: 0;
|
|
62
|
+
z-index: 10;
|
|
63
|
+
flex-shrink: 0;
|
|
64
|
+
padding-left: env(safe-area-inset-left, 0px);
|
|
65
|
+
padding-right: env(safe-area-inset-right, 0px);
|
|
66
|
+
background-color: var(--muka-page-background);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* With a footer, the footer clears the home indicator, not the bar above it. */
|
|
70
|
+
.muka-page:has(> .muka-page__footer) > .muka-page__actions .muka-bottombar {
|
|
71
|
+
padding-bottom: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Without a footer or actions, the content is last and clears the home indicator. */
|
|
75
|
+
.muka-page:not(:has(> .muka-page__footer)):not(:has(> .muka-page__actions)) > .muka-page__main {
|
|
56
76
|
padding-bottom: env(safe-area-inset-bottom, 0px);
|
|
57
77
|
}
|
|
@@ -10,15 +10,18 @@ import './Page.css';
|
|
|
10
10
|
* Android app shell without extra CSS. Pair it with a `SiteHeader`, which
|
|
11
11
|
* handles the status bar.
|
|
12
12
|
*
|
|
13
|
+
* A page with one task to finish (read an offer, then sign it) takes its
|
|
14
|
+
* actions in `actions`: they stay in reach while the reader scrolls.
|
|
15
|
+
*
|
|
13
16
|
* App screens use `View` (inside `AppShell`) instead; it scrolls its own body.
|
|
14
17
|
*/
|
|
15
|
-
export const Page = ({ header, children, footer, surface = 'level3', footerSurface, className, ...props }) => {
|
|
18
|
+
export const Page = ({ header, children, footer, actions, surface = 'level3', footerSurface, className, ...props }) => {
|
|
16
19
|
const classes = [
|
|
17
20
|
'muka-page',
|
|
18
21
|
surface === 'level2' && 'muka-page--surface-2',
|
|
19
22
|
className,
|
|
20
23
|
].filter(Boolean).join(' ');
|
|
21
|
-
return (_jsxs("div", { className: classes, ...props, children: [header, _jsx("main", { className: "muka-page__main", children: children }), footer && (_jsx("div", { className: [
|
|
24
|
+
return (_jsxs("div", { className: classes, ...props, children: [header, _jsx("main", { className: "muka-page__main", children: children }), actions && _jsx("div", { className: "muka-page__actions", children: actions }), footer && (_jsx("div", { className: [
|
|
22
25
|
'muka-page__footer',
|
|
23
26
|
footerSurface && `muka-page__footer--surface-${footerSurface === 'level2' ? 2 : 3}`,
|
|
24
27
|
].filter(Boolean).join(' '), children: footer }))] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.js","sourceRoot":"","sources":["../../../../components/Page/Page.tsx"],"names":[],"mappings":";AACA,OAAO,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Page.js","sourceRoot":"","sources":["../../../../components/Page/Page.tsx"],"names":[],"mappings":";AACA,OAAO,YAAY,CAAC;AAqCpB;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,IAAI,GAAwB,CAAC,EACxC,MAAM,EACN,QAAQ,EACR,MAAM,EACN,OAAO,EACP,OAAO,GAAG,QAAQ,EAClB,aAAa,EACb,SAAS,EACT,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,OAAO,GAAG;QACd,WAAW;QACX,OAAO,KAAK,QAAQ,IAAI,sBAAsB;QAC9C,SAAS;KACV,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE5B,OAAO,CACL,eAAK,SAAS,EAAE,OAAO,KAAM,KAAK,aAC/B,MAAM,EACP,eAAM,SAAS,EAAC,iBAAiB,YAAE,QAAQ,GAAQ,EAClD,OAAO,IAAI,cAAK,SAAS,EAAC,oBAAoB,YAAE,OAAO,GAAO,EAC9D,MAAM,IAAI,CACT,cACE,SAAS,EAAE;oBACT,mBAAmB;oBACnB,aAAa,IAAI,8BAA8B,aAAa,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;iBACpF,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,YAE1B,MAAM,GACH,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -51,7 +51,27 @@
|
|
|
51
51
|
background-color: var(--color-surface-level3);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
/*
|
|
55
|
-
|
|
54
|
+
/*
|
|
55
|
+
* Actions stick to the bottom edge while the document scrolls, and come to
|
|
56
|
+
* rest after the content (above a footer). A BottomBar inside clears the home
|
|
57
|
+
* indicator; this wrapper clears a landscape notch.
|
|
58
|
+
*/
|
|
59
|
+
.muka-page__actions {
|
|
60
|
+
position: sticky;
|
|
61
|
+
bottom: 0;
|
|
62
|
+
z-index: 10;
|
|
63
|
+
flex-shrink: 0;
|
|
64
|
+
padding-left: env(safe-area-inset-left, 0px);
|
|
65
|
+
padding-right: env(safe-area-inset-right, 0px);
|
|
66
|
+
background-color: var(--muka-page-background);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* With a footer, the footer clears the home indicator, not the bar above it. */
|
|
70
|
+
.muka-page:has(> .muka-page__footer) > .muka-page__actions .muka-bottombar {
|
|
71
|
+
padding-bottom: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Without a footer or actions, the content is last and clears the home indicator. */
|
|
75
|
+
.muka-page:not(:has(> .muka-page__footer)):not(:has(> .muka-page__actions)) > .muka-page__main {
|
|
56
76
|
padding-bottom: env(safe-area-inset-bottom, 0px);
|
|
57
77
|
}
|