Skip to content

Commit

Permalink
Merge branch 'release/v0.19.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
holtwick committed May 19, 2024
2 parents 3a3fe7c + 7bc3974 commit 0b588b0
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 13 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, user-scalable=no, maximum-scale=1, minimum-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, user-scalable=no, maximum-scale=1, minimum-scale=1, height=device-height">
<title>Oui</title>
<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" href="/logo.svg" type="image/svg+xml">
Expand Down
1 change: 1 addition & 0 deletions lib/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
@require "./modal/index.styl";
@require "./notification/index.styl";
@require "./object/index.styl";
@require "./mobile/index.styl";
1 change: 1 addition & 0 deletions lib/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export * from './float'
export * from './modal'
export * from './notification'
export * from './object'
export * from './mobile'
1 change: 1 addition & 0 deletions lib/mobile/index.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@require "./oui-mobile.styl";
1 change: 1 addition & 0 deletions lib/mobile/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as OuiMobileActivator } from './oui-mobile.vue'
9 changes: 9 additions & 0 deletions lib/mobile/oui-mobile.demo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script lang="ts" setup>
</script>

<template>
<div>
Enables fixes for use on mobiles, especially for virtual keyboards and scrolling issues on iOS.
</div>
</template>
7 changes: 7 additions & 0 deletions lib/mobile/oui-mobile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# oui-mobile

Place it somewhere to let the magic happen:

```vue
<OuiMobileActivator />
```
7 changes: 3 additions & 4 deletions src/oui-mobile.styl → lib/mobile/oui-mobile.styl
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
@require "../stylus/index.styl";

html.oui-mobile {
height: 100%;

&, body {
/* This seems to fix overscrolling */
/* https://www.bram.us/2016/05/02/prevent-overscroll-bounce-in-ios-mobilesafari-pure-css/ */
overflow: hidden;
height: 100%;
}

& {
/* https://forums.developer.apple.com/forums/thread/48088 */
transition: height 400ms cubic-bezier(0.38, 0.7, 0.125, 1);
}

body {
/* Should avoids overflow */
& {
/* Avoids bouncy scrolling */
-webkit-overflow-scrolling: none;
overscroll-behavior: none;
}
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "oui-kit",
"type": "module",
"version": "0.19.0",
"version": "0.19.1",
"author": {
"email": "[email protected]",
"name": "Dirk Holtwick",
Expand Down Expand Up @@ -81,7 +81,7 @@
"devDependencies": {
"@antfu/eslint-config": "^2.18.1",
"@antfu/ni": "^0.21.12",
"@shikijs/markdown-it": "^1.5.2",
"@shikijs/markdown-it": "^1.6.0",
"@tsconfig/node18": "^18.2.4",
"@types/jest": "^29.5.12",
"@types/node": "^20.12.12",
Expand Down
5 changes: 3 additions & 2 deletions src/app-mobile-using-oui.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<script lang="ts" setup>
import OuiMobile from './oui-mobile.vue'
import { OuiMobileActivator } from '@/lib'
import './app-mobile-using-oui.styl'
</script>

<template>
<OuiMobile />
<OuiMobileActivator />
<div class="app-mobile">
<header>
Header
Expand Down
2 changes: 1 addition & 1 deletion src/app-mobile.styl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ footer {
}
}

body {
html {
/* Avoids overflow */
-webkit-overflow-scrolling: none;
overscroll-behavior: none;
Expand Down
5 changes: 2 additions & 3 deletions src/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { useLocalStorage } from '@vueuse/core'
import { computed, onMounted, ref } from 'vue'
import { last, sortedOrderby } from 'zeed'
import pkg from '../package.json'
import OuiMobile from './oui-mobile.vue'
import { OuiButton, OuiCheckbox, OuiNotice, OuiResizeable, OuiText, OuiTooltipActivator } from '@/lib'
import { OuiButton, OuiCheckbox, OuiMobileActivator, OuiNotice, OuiResizeable, OuiText, OuiTooltipActivator } from '@/lib'
import './app.styl'
Expand Down Expand Up @@ -141,5 +140,5 @@ function toggleDark() {
</div>
</div>
<OuiTooltipActivator />
<OuiMobile />
<OuiMobileActivator />
</template>

0 comments on commit 0b588b0

Please sign in to comment.