@hidemikimura/chit-ui 0.3.0 → 0.3.1
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 +26 -0
- package/README.md +40 -1
- package/dist/chit-ui.iife.min.js +44 -20
- package/dist/chit-ui.iife.min.js.map +1 -1
- package/dist/chit-ui.min.js +44 -20
- package/dist/chit-ui.min.js.map +1 -1
- package/dist/types/controllers/scroll-lock-controller.d.ts +37 -0
- package/dist/types/controllers/viewport-controller.d.ts +38 -0
- package/dist/types/index.d.ts +162 -0
- package/package.json +1 -1
- package/src/chit-ui.js +6 -0
- package/src/controllers/scroll-controller.js +21 -1
- package/src/controllers/scroll-lock-controller.js +185 -0
- package/src/controllers/viewport-controller.js +102 -0
- package/src/index.js +34 -0
- package/src/styles/composer.css.js +18 -0
- package/src/styles/panel.css.js +7 -1
package/src/styles/panel.css.js
CHANGED
|
@@ -56,12 +56,18 @@ export const panelStyles = css`
|
|
|
56
56
|
* A phone gets the whole screen. dvh rather than vh so the browser chrome
|
|
57
57
|
* collapsing does not leave a gap, and the safe-area insets keep the header
|
|
58
58
|
* clear of the notch.
|
|
59
|
+
*
|
|
60
|
+
* While a keyboard is up, the two --_chit-vv-* properties carry what is
|
|
61
|
+
* actually on screen (ViewportController fills them in from
|
|
62
|
+
* visualViewport); dvh knows nothing about a keyboard and would leave the
|
|
63
|
+
* composer behind it.
|
|
59
64
|
*/
|
|
60
65
|
:host([data-device='mobile']) [part~='panel'],
|
|
61
66
|
:host([data-device='mobile'][data-panel-position]) [part~='panel'] {
|
|
62
67
|
inset: 0;
|
|
68
|
+
top: var(--_chit-vv-top, 0px);
|
|
63
69
|
width: 100vw;
|
|
64
|
-
height: 100dvh;
|
|
70
|
+
height: var(--_chit-vv-height, 100dvh);
|
|
65
71
|
max-width: none;
|
|
66
72
|
max-height: none;
|
|
67
73
|
border-radius: 0;
|