@indielayer/ui 1.14.3 → 1.14.5
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/docs/pages/component/modal/usage.vue +1 -1
- package/lib/components/checkbox/Checkbox.vue2.js +47 -46
- package/lib/components/datepicker/Datepicker.vue.js +4 -4
- package/lib/components/menu/MenuItem.vue.js +2 -2
- package/lib/components/menu/MenuItem.vue2.js +1 -0
- package/lib/components/modal/Modal.vue.js +38 -34
- package/lib/components/select/Select.vue.js +22 -22
- package/lib/components/tab/theme/Tab.base.theme.js +1 -1
- package/lib/composables/useFocusTrap.js +19 -15
- package/lib/index.js +1 -1
- package/lib/index.umd.js +3 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/components/checkbox/Checkbox.vue +1 -1
- package/src/components/datepicker/Datepicker.vue +2 -2
- package/src/components/menu/MenuItem.vue +1 -0
- package/src/components/modal/Modal.vue +8 -5
- package/src/components/select/Select.vue +1 -1
- package/src/components/tab/theme/Tab.base.theme.ts +1 -1
- package/src/composables/useFocusTrap.ts +7 -1
- package/src/version.ts +1 -1
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.14.
|
|
1
|
+
declare const _default: "1.14.5";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -165,7 +165,7 @@ defineExpose({ focus, blur, toggle, reset, validate, setError })
|
|
|
165
165
|
</svg>
|
|
166
166
|
</slot>
|
|
167
167
|
</div>
|
|
168
|
-
<div :class="classes.label">
|
|
168
|
+
<div v-if="label || $slots.default" :class="classes.label">
|
|
169
169
|
<span v-if="label" v-text="label"></span>
|
|
170
170
|
<slot v-else></slot>
|
|
171
171
|
</div>
|
|
@@ -190,7 +190,7 @@ const { styles, classes, className } = useTheme('Datepicker', {}, props)
|
|
|
190
190
|
|
|
191
191
|
<template>
|
|
192
192
|
<div
|
|
193
|
-
:style="styles"
|
|
193
|
+
:style="[styles, { '--dp-clear-btn-top': !!label ? '2.70rem' : '1.2rem' }]"
|
|
194
194
|
:class="[
|
|
195
195
|
className,
|
|
196
196
|
classes.wrapper,
|
|
@@ -336,7 +336,7 @@ const { styles, classes, className } = useTheme('Datepicker', {}, props)
|
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
.dp--clear-btn {
|
|
339
|
-
top: 2.75rem !important;
|
|
339
|
+
top: var(--dp-clear-btn-top, 2.75rem) !important;
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
.dp__theme_dark {
|
|
@@ -156,6 +156,7 @@ const { styles, classes, className } = useTheme('MenuItem', {}, computedProps, {
|
|
|
156
156
|
v-if="checkbox"
|
|
157
157
|
:model-value="computedProps.active"
|
|
158
158
|
hide-footer
|
|
159
|
+
class="mr-1.5"
|
|
159
160
|
skip-form-registry
|
|
160
161
|
@click.stop.prevent="onItemClick($event, 'checkbox-click')"
|
|
161
162
|
/>
|
|
@@ -106,9 +106,11 @@ watch(value, (val) => {
|
|
|
106
106
|
}
|
|
107
107
|
})
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
let initTrapTimeout: ReturnType<typeof setTimeout>
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
watch(() => props.modelValue, checkVisibility, { immediate: true })
|
|
112
|
+
|
|
113
|
+
async function checkVisibility() {
|
|
112
114
|
const val = props.modelValue
|
|
113
115
|
|
|
114
116
|
if (val) {
|
|
@@ -120,15 +122,16 @@ async function checkVisibiliy() {
|
|
|
120
122
|
|
|
121
123
|
visible.value = val
|
|
122
124
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
125
|
+
initTrapTimeout = setTimeout(() => {
|
|
126
|
+
initFocusTrap(modalRef)
|
|
127
|
+
}, 100)
|
|
126
128
|
|
|
127
129
|
document.body.style.paddingRight = `${scrollbarWidth}px`
|
|
128
130
|
document.body.style.overflow = 'hidden'
|
|
129
131
|
} else {
|
|
130
132
|
visible.value = val
|
|
131
133
|
value.value = val
|
|
134
|
+
clearTimeout(initTrapTimeout)
|
|
132
135
|
clearFocusTrap()
|
|
133
136
|
document.body.style.paddingRight = ''
|
|
134
137
|
document.body.style.overflow = 'auto'
|
|
@@ -547,7 +547,7 @@ defineExpose({ focus, blur, reset, validate, setError, filterRef })
|
|
|
547
547
|
>+{{ hiddenTags }}</div>
|
|
548
548
|
</div>
|
|
549
549
|
</template>
|
|
550
|
-
<template v-else-if="!internalMultiple && !isEmpty(selected)">
|
|
550
|
+
<template v-else-if="!internalMultiple && !isEmpty(selected) && getLabel(selected) !== ''">
|
|
551
551
|
{{ getLabel(selected) }}
|
|
552
552
|
</template>
|
|
553
553
|
|
|
@@ -6,7 +6,7 @@ const theme: TabTheme = {
|
|
|
6
6
|
const c = ['transition-colors duration-150 ease-in-out whitespace-nowrap text-center']
|
|
7
7
|
|
|
8
8
|
if (data.variant === 'line') c.push('py-2')
|
|
9
|
-
if (data.variant === 'block') c.push('py-1
|
|
9
|
+
if (data.variant === 'block') c.push('py-1 px-8')
|
|
10
10
|
|
|
11
11
|
if (props.size === 'xs') c.push('text-xs')
|
|
12
12
|
else if (props.size === 'sm') c.push('text-sm')
|
|
@@ -31,7 +31,13 @@ export function useFocusTrap() {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
const handleKeydown = (event: KeyboardEvent) => {
|
|
34
|
-
if (event.key
|
|
34
|
+
if (event.key === 'Tab' && focusable.value.length === 0) {
|
|
35
|
+
event.preventDefault()
|
|
36
|
+
|
|
37
|
+
return
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (event.key !== 'Tab') return
|
|
35
41
|
|
|
36
42
|
const isShiftPressed = event.shiftKey
|
|
37
43
|
const currentEl = document.activeElement as HTMLElement | null
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.14.
|
|
1
|
+
export default '1.14.5'
|