Skip to content

Commit

Permalink
Merge branch 'release/v0.25.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
holtwick committed Jan 2, 2025
2 parents ce910d4 + 0ac19ee commit 6d49c31
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 8 deletions.
3 changes: 2 additions & 1 deletion lib/basic/oui-button.demo.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<script lang="ts" setup>
import { OuiButton, OuiCheckbox, OuiClose, OuiDemo } from '@/lib'
import { reactive } from 'vue'
import image from '../../public/apple-touch-icon-180x180.png?url'
const image = '/apple-touch-icon-180x180.png'
const state = reactive({
disabled: false,
Expand Down
1 change: 1 addition & 0 deletions lib/basic/oui-form-item.demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const state = reactive({
<OuiInput v-model="state.value2" title="Value with label" description="Some description" required />
<OuiInputNumber v-model="state.number" title="Number" />
<OuiTextarea v-model="state.text" title="Text" />
<OuiTextarea v-model="state.text" title="Text (autosize)" autosize />
<OuiPassword v-model="state.password" title="Password" />
<OuiSelect v-model="state.select" title="Select" :options="['One', 'Two', 'Three']" />
<OuiDate v-model="state.date" title="Date" />
Expand Down
1 change: 0 additions & 1 deletion lib/basic/oui-form-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ defineProps<{
</div>
<template v-if="$slots.description || description">
<div class="oui-form-item-description">

<slot name="description">
{{ description }}
</slot>
Expand Down
11 changes: 11 additions & 0 deletions lib/basic/oui-form.styl
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,15 @@
size: 1em;
}
}

/* https://vueuse.org/core/useTextareaAutosize/ */
&-textarea._autosize {
resize: none;
-ms-overflow-style: none;
scrollbar-width: none;

&::-webkit-scrollbar {
display: none;
}
}
}
11 changes: 9 additions & 2 deletions lib/basic/oui-textarea.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts" setup>
import { useFileDialog, useTextareaAutosize, watchThrottled } from '@vueuse/core'
import OuiFormItem from './oui-form-item.vue'
import './oui-form.styl'
Expand All @@ -7,15 +8,19 @@ defineOptions({
inheritAttrs: false,
})
withDefaults(defineProps<{
const props = withDefaults(defineProps<{
title?: string
description?: string
required?: boolean
id?: string
autosize?: boolean
}>(), {
autosize: false,
})
const model = defineModel<string>({ required: true })
const { textarea } = props.autosize === true ? useTextareaAutosize({ input: model }) : {}
</script>

<template>
Expand All @@ -27,9 +32,11 @@ const model = defineModel<string>({ required: true })
>
<textarea
:id="id"
v-bind="$attrs"
ref="textarea"
v-model="model"
class="oui-textarea"
v-bind="$attrs"
:class="{ _autosize: props.autosize }"
rows="6"
/>
</OuiFormItem>
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "oui-kit",
"type": "module",
"version": "0.25.5",
"version": "0.25.6",
"author": {
"email": "dirk.holtwick@gmail.com",
"name": "Dirk Holtwick",
Expand Down Expand Up @@ -74,14 +74,14 @@
},
"dependencies": {
"@floating-ui/vue": "^1.1.5",
"@vueuse/core": "^12.2.0",
"@vueuse/core": "^12.3.0",
"vue": "^3.5.13",
"zeed": "^0.26.4"
"zeed": "^0.27.0"
},
"devDependencies": {
"@antfu/eslint-config": "^3.12.1",
"@antfu/ni": "^0.23.2",
"@shikijs/markdown-it": "^1.24.4",
"@shikijs/markdown-it": "^1.25.1",
"@vitejs/plugin-vue": "^5.2.1",
"@vitest/browser": "^2.1.8",
"eslint": "^9.17.0",
Expand Down

0 comments on commit 6d49c31

Please sign in to comment.