@indielayer/ui 1.0.2 → 1.0.4
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/LICENSE +21 -0
- package/lib/components/avatar/Avatar.vue.d.ts +1 -1
- package/lib/components/badge/Badge.vue.d.ts +1 -1
- package/lib/components/breadcrumbs/Breadcrumbs.vue.d.ts +1 -1
- package/lib/components/button/Button.vue.d.ts +1 -1
- package/lib/components/button/ButtonGroup.vue.d.ts +1 -1
- package/lib/components/card/Card.vue.d.ts +1 -1
- package/lib/components/container/Container.vue.d.ts +1 -1
- package/lib/components/divider/Divider.vue.d.ts +1 -1
- package/lib/components/helpers/InputError.d.ts +1 -1
- package/lib/components/icon/Icon.vue.d.ts +1 -1
- package/lib/components/image/Image.vue.d.ts +1 -1
- package/lib/components/link/Link.vue.d.ts +1 -1
- package/lib/components/notifications/Notifications.vue.d.ts +1 -1
- package/lib/components/popover/PopoverContainer.vue.d.ts +1 -1
- package/lib/components/progress/Progress.vue.d.ts +1 -1
- package/lib/components/scroll/Scroll.vue.d.ts +1 -1
- package/lib/components/skeleton/Skeleton.vue.d.ts +1 -1
- package/lib/components/spacer/Spacer.d.ts +1 -1
- package/lib/components/spinner/Spinner.vue.d.ts +1 -1
- package/lib/components/tab/Tab.vue.d.ts +1 -1
- package/lib/components/table/TableBody.d.ts +1 -1
- package/lib/components/table/TableCell.vue.d.ts +1 -1
- package/lib/components/table/TableHead.d.ts +1 -1
- package/lib/components/table/TableHeader.vue.d.ts +1 -1
- package/lib/components/table/TableRow.vue.d.ts +1 -1
- package/lib/components/tooltip/Tooltip.vue.d.ts +1 -1
- package/lib/index.cjs.js +1 -1
- package/lib/index.es.js +73 -74
- package/lib/version.d.ts +1 -1
- package/package.json +5 -3
- package/src/components/alert/Alert.vue +1 -1
- package/src/components/avatar/Avatar.vue +1 -1
- package/src/components/button/Button.theme.ts +1 -1
- package/src/components/drawer/Drawer.vue +4 -2
- package/src/components/image/Image.vue +12 -10
- package/src/components/modal/Modal.vue +1 -1
- package/src/components/notifications/Notifications.theme.ts +1 -1
- package/src/components/select/Select.vue +1 -1
- package/src/components/slider/Slider.vue +1 -1
- package/src/components/tag/Tag.vue +1 -1
- package/src/components/textarea/Textarea.vue +3 -10
- package/src/composables/colors-utils.ts +1 -1
- package/src/version.ts +1 -1
|
@@ -16,16 +16,18 @@ const props = defineProps({
|
|
|
16
16
|
|
|
17
17
|
const source = ref<string | undefined>(fallback)
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
if (typeof window !== 'undefined' && Image) {
|
|
20
|
+
watch(() => props.src, (src) => {
|
|
21
|
+
if (!src) return
|
|
22
|
+
const img = new Image()
|
|
23
|
+
|
|
24
|
+
img.onload = () => { source.value = props.src }
|
|
25
|
+
img.onerror = () => { }
|
|
26
|
+
img.src = src
|
|
27
|
+
}, {
|
|
28
|
+
immediate: true,
|
|
29
|
+
})
|
|
30
|
+
}
|
|
29
31
|
|
|
30
32
|
const { styles, classes, className } = useTheme('image', theme, props)
|
|
31
33
|
</script>
|
|
@@ -60,7 +60,7 @@ watch(() => props.modelValue, (val) => {
|
|
|
60
60
|
}
|
|
61
61
|
})
|
|
62
62
|
|
|
63
|
-
if (
|
|
63
|
+
if (typeof window !== 'undefined') useEventListener(document, 'keydown', onKeyDown)
|
|
64
64
|
|
|
65
65
|
function onKeyDown(event: KeyboardEvent) {
|
|
66
66
|
if (event.key === 'Escape' && value.value) close()
|
|
@@ -6,6 +6,6 @@ export default {
|
|
|
6
6
|
|
|
7
7
|
list: 'flex flex-col items-end w-full sm:w-[520px] px-4',
|
|
8
8
|
|
|
9
|
-
item: 'w-full flex items-center rounded-md px-4 py-3 bg-gray-800 dark:bg-gray-50 text-white dark:text-gray-900',
|
|
9
|
+
item: 'w-full flex items-center rounded-md px-4 py-3 bg-gray-800 dark:bg-gray-50 text-white dark:text-gray-900 border border-gray-700 dark:border-gray-100',
|
|
10
10
|
},
|
|
11
11
|
}
|
|
@@ -273,7 +273,7 @@ defineExpose({ focus, blur, reset, validate, setError })
|
|
|
273
273
|
size="sm"
|
|
274
274
|
class="mr-1"
|
|
275
275
|
removable
|
|
276
|
-
@remove="(e) => { handleRemove(e, value) }"
|
|
276
|
+
@remove="(e: Event) => { handleRemove(e, value) }"
|
|
277
277
|
>{{ getLabel(value) }}</x-tag>
|
|
278
278
|
</template>
|
|
279
279
|
<template v-else-if="!multiple && !isEmpty(selected)">
|
|
@@ -119,7 +119,7 @@ function endDrag(e: PointerEvent) {
|
|
|
119
119
|
e.stopPropagation()
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
if (window) {
|
|
122
|
+
if (typeof window !== 'undefined') {
|
|
123
123
|
useEventListener(progressRef, 'pointerdown', startProgressDrag, false)
|
|
124
124
|
useEventListener(dragRef, 'pointerdown', startDrag, false)
|
|
125
125
|
useEventListener(window, 'pointermove', moveDrag, true)
|
|
@@ -61,7 +61,7 @@ const { styles, classes, className } = useTheme('tag', theme, props)
|
|
|
61
61
|
:size="closeIconSize"
|
|
62
62
|
:icon="closeIcon"
|
|
63
63
|
class="ml-1 cursor-pointer hover:text-gray-700 transition-colors duration-150"
|
|
64
|
-
@click="(e) => $emit('remove', e)"
|
|
64
|
+
@click="(e: Event) => $emit('remove', e)"
|
|
65
65
|
/>
|
|
66
66
|
</span>
|
|
67
67
|
|
|
@@ -3,8 +3,8 @@ export default { name: 'XTextarea' }
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<script setup lang="ts">
|
|
6
|
-
import { ref, watch
|
|
7
|
-
import { useResizeObserver } from '@vueuse/core'
|
|
6
|
+
import { ref, watch } from 'vue'
|
|
7
|
+
import { useResizeObserver, useEventListener } from '@vueuse/core'
|
|
8
8
|
import { useCSS } from '../../composables/css'
|
|
9
9
|
import { useTheme } from '../../composables/theme'
|
|
10
10
|
import { useCommon } from '../../composables/common'
|
|
@@ -45,14 +45,7 @@ const emit = defineEmits(useInputtable.emits())
|
|
|
45
45
|
const elRef = ref<HTMLTextAreaElement | null>(null)
|
|
46
46
|
|
|
47
47
|
useResizeObserver(elRef, resize)
|
|
48
|
-
|
|
49
|
-
onMounted(() => {
|
|
50
|
-
window.addEventListener('resize', resize)
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
onBeforeUnmount(() => {
|
|
54
|
-
window.removeEventListener('resize', resize)
|
|
55
|
-
})
|
|
48
|
+
if (typeof window !== 'undefined') useEventListener(window, 'resize', resize)
|
|
56
49
|
|
|
57
50
|
watch([() => props.modelValue, () => props.size], () => {
|
|
58
51
|
setTimeout(resize)
|
|
@@ -3,7 +3,7 @@ import type { Tone, ColorLibrary, ColorPalette } from './colors'
|
|
|
3
3
|
const isHex = (hex: string) => /^#(?:[A-Fa-f0-9]{3}){1,2}$/.test(hex)
|
|
4
4
|
const isRGB = (rgb: string) => /^rgb[(](?:\s*0*(?:\d\d?(?:\.\d+)?(?:\s*%)?|\.\d+\s*%|100(?:\.0*)?\s*%|(?:1\d\d|2[0-4]\d|25[0-5])(?:\.\d+)?)\s*(?:,(?![)])|(?=[)]))){3}[)]$/.test(rgb)
|
|
5
5
|
const isRGBA = (rgba: string) => /^^rgba[(](?:\s*0*(?:\d\d?(?:\.\d+)?(?:\s*%)?|\.\d+\s*%|100(?:\.0*)?\s*%|(?:1\d\d|2[0-4]\d|25[0-5])(?:\.\d+)?)\s*,){3}\s*0*(?:\.\d+|1(?:\.0*)?)\s*[)]$/.test(rgba)
|
|
6
|
-
const parseRGB = (rgb: string) => rgb.match(
|
|
6
|
+
const parseRGB = (rgb: string) => rgb.match(/\((.*?)\)/)?.[1].split(',')
|
|
7
7
|
const hexToRGB = (hex: string) => hex.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (m, r, g, b) => '#' + r + r + g + g + b + b)
|
|
8
8
|
.substring(1).match(/.{2}/g)
|
|
9
9
|
?.map((x) => parseInt(x, 16))
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.0.
|
|
1
|
+
export default '1.0.4'
|