-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
509 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "oui-kit", | ||
"type": "module", | ||
"version": "0.18.5", | ||
"version": "0.19.0", | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "Dirk Holtwick", | ||
|
@@ -62,7 +62,7 @@ | |
"build": "vite build", | ||
"build:demo": "BUILD_DEMO=1 vite build", | ||
"check": "vue-tsc --noEmit", | ||
"dev": "vite", | ||
"dev": "vite --host", | ||
"generate-pwa-assets": "pwa-assets-generator", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint . --fix", | ||
|
@@ -79,7 +79,7 @@ | |
"zeed": "^0.20.7" | ||
}, | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^2.18.0", | ||
"@antfu/eslint-config": "^2.18.1", | ||
"@antfu/ni": "^0.21.12", | ||
"@shikijs/markdown-it": "^1.5.2", | ||
"@tsconfig/node18": "^18.2.4", | ||
|
@@ -89,15 +89,16 @@ | |
"@vitejs/plugin-vue": "^5.0.4", | ||
"@vue/test-utils": "^2.4.6", | ||
"@vue/tsconfig": "^0.5.1", | ||
"eslint": "^9.2.0", | ||
"eslint": "^9.3.0", | ||
"only-allow": "^1.2.1", | ||
"stylus": "^0.63.0", | ||
"tsup": "^8.0.2", | ||
"typescript": "^5.4.5", | ||
"unplugin-vue-markdown": "^0.26.2", | ||
"vite": "^5.2.11", | ||
"vite-plugin-dts": "^3.9.1", | ||
"vite-plugin-qrcode": "^0.2.3", | ||
"vitest": "^1.6.0", | ||
"vue-tsc": "^2.0.17" | ||
"vue-tsc": "^2.0.19" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@require "../stylus/index.styl"; | ||
@require "../stylus/theme.styl"; | ||
|
||
:root { | ||
--footer-bg: var(--t3-bg); | ||
} | ||
|
||
body, html { | ||
padding: 0; | ||
margin: 0; | ||
height: 100%; | ||
background: var(--footer-bg); | ||
} | ||
|
||
#app { | ||
use: stack-y; | ||
height: 100%; | ||
} | ||
|
||
.app-mobile { | ||
use: stack-y; | ||
height: 100%; | ||
background: yellow; | ||
// use: safe-margin; | ||
} | ||
|
||
main { | ||
use: grow; | ||
use: scroll; | ||
} | ||
|
||
header, footer { | ||
min-height: 44; | ||
background: var(--footer-bg); | ||
padding-left: -safe-left; | ||
padding-right: -safe-right; | ||
} | ||
|
||
header { | ||
padding-top: -safe-top; | ||
} | ||
|
||
footer { | ||
padding-bottom: -safe-bottom; | ||
|
||
.virtual-keyboard & { | ||
background: lime; | ||
padding-bottom: 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<script lang="ts" setup> | ||
import OuiMobile from './oui-mobile.vue' | ||
import './app-mobile-using-oui.styl' | ||
</script> | ||
|
||
<template> | ||
<OuiMobile /> | ||
<div class="app-mobile"> | ||
<header> | ||
Header | ||
</header> | ||
<main data-scroll="true"> | ||
<ol> | ||
<template v-for="i in 100" :key="i"> | ||
<li> | ||
<input type="text" value="Hallo"> | ||
<!-- <OuiInput v-model="text" title="fasdfd" /> --> | ||
{{ i }} Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus at voluptatem, optio nihil | ||
facere dolorum, porro excepturi ducimus cupiditate, odio officiis laboriosam exercitationem tempore voluptas | ||
repellat corporis ex accusamus iste! | ||
<select> | ||
<option value="1"> | ||
1 | ||
</option> | ||
<option value="2"> | ||
2 | ||
</option> | ||
<option value="3"> | ||
3 | ||
</option> | ||
</select> | ||
</li> | ||
</template> | ||
</ol> | ||
</main> | ||
<footer> | ||
Footer | ||
</footer> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
@require "../stylus/index.styl"; | ||
@require "../stylus/theme.styl"; | ||
|
||
:root { | ||
--footer-bg: var(--t3-bg); | ||
} | ||
|
||
html, body { | ||
/* This seems to fix overscrolling */ | ||
/* https://www.bram.us/2016/05/02/prevent-overscroll-bounce-in-ios-mobilesafari-pure-css/ */ | ||
position: fixed; | ||
overflow: hidden; | ||
} | ||
|
||
@keyframes keyboard_animation { | ||
/* https://gist.github.com/kiding/72721a0553fa93198ae2bb6eefaa3299 */ | ||
0% { | ||
opacity: 0; | ||
} | ||
|
||
100% { | ||
opacity: 1; | ||
} | ||
} | ||
|
||
body, html { | ||
padding: 0; | ||
margin: 0; | ||
height: 100%; | ||
background: var(--footer-bg); | ||
} | ||
|
||
body { | ||
/* https://forums.developer.apple.com/forums/thread/48088 */ | ||
transition: height 400ms cubic-bezier(0.38, 0.7, 0.125, 1); | ||
} | ||
|
||
#app { | ||
use: stack-y; | ||
height: 100%; | ||
} | ||
|
||
.app-mobile { | ||
use: stack-y; | ||
height: 100%; | ||
background: yellow; | ||
// use: safe-margin; | ||
} | ||
|
||
main { | ||
use: grow; | ||
use: scroll; | ||
} | ||
|
||
header, footer { | ||
min-height: 44; | ||
background: var(--footer-bg); | ||
padding-left: -safe-left; | ||
padding-right: -safe-right; | ||
} | ||
|
||
header { | ||
padding-top: -safe-top; | ||
} | ||
|
||
footer { | ||
padding-bottom: -safe-bottom; | ||
|
||
.virtual-keyboard & { | ||
background: lime; | ||
padding-bottom: 0; | ||
} | ||
} | ||
|
||
body { | ||
/* Avoids overflow */ | ||
-webkit-overflow-scrolling: none; | ||
overscroll-behavior: none; | ||
} | ||
|
||
@keyframes blink_input_opacity_to_prevent_scrolling_when_focus { | ||
/* https://gist.github.com/kiding/72721a0553fa93198ae2bb6eefaa3299 */ | ||
0% { | ||
opacity: 0; | ||
} | ||
|
||
100% { | ||
opacity: 1; | ||
} | ||
} | ||
|
||
input:focus, textarea:focus, [contenteditable]:focus { | ||
/* Avoids scroll issues on keyboard showup */ | ||
animation: blink_input_opacity_to_prevent_scrolling_when_focus 0.01s; | ||
} |
Oops, something went wrong.