@indielayer/ui 1.8.0 → 1.8.1
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/form/usage.vue +1 -0
- package/docs/pages/component/modal/composed.vue +10 -1
- package/lib/components/checkbox/Checkbox.vue.d.ts +4 -0
- package/lib/components/datepicker/Datepicker.vue.d.ts +4 -0
- package/lib/components/formGroup/FormGroup.vue.d.ts +4 -0
- package/lib/components/input/Input.vue.d.ts +4 -0
- package/lib/components/modal/Modal.vue.js +74 -70
- package/lib/components/radio/Radio.vue.d.ts +4 -0
- package/lib/components/select/Select.vue.d.ts +4 -0
- package/lib/components/select/Select.vue.js +1 -0
- package/lib/components/slider/Slider.vue.d.ts +4 -0
- package/lib/components/textarea/Textarea.vue.d.ts +4 -0
- package/lib/components/toggle/Toggle.vue.d.ts +4 -0
- package/lib/composables/useInputtable.d.ts +1 -0
- package/lib/composables/useInputtable.js +31 -30
- package/lib/index.umd.js +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/components/modal/Modal.vue +11 -2
- package/src/components/select/Select.vue +7 -1
- package/src/composables/useInputtable.ts +6 -3
- package/src/version.ts +1 -1
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.8.
|
|
1
|
+
declare const _default: "1.8.1";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -67,7 +67,7 @@ export default {
|
|
|
67
67
|
</script>
|
|
68
68
|
|
|
69
69
|
<script setup lang="ts">
|
|
70
|
-
import { ref, watch, type PropType, type ExtractPublicPropTypes, computed, nextTick
|
|
70
|
+
import { ref, watch, type PropType, type ExtractPublicPropTypes, computed, nextTick } from 'vue'
|
|
71
71
|
import { onClickOutside, useEventListener } from '@vueuse/core'
|
|
72
72
|
import { useTheme, type ThemeComponent } from '../../composables/useTheme'
|
|
73
73
|
import { useFocusTrap } from '../../composables/useFocusTrap'
|
|
@@ -132,8 +132,17 @@ async function checkVisibiliy() {
|
|
|
132
132
|
|
|
133
133
|
if (typeof window !== 'undefined') useEventListener(document, 'keydown', onKeyDown)
|
|
134
134
|
|
|
135
|
+
const shouldIgnoreEvent = (event: KeyboardEvent) => {
|
|
136
|
+
return ['.v-popper__popper', '.x-datepicker'].some((target) => {
|
|
137
|
+
if (typeof target === 'string') {
|
|
138
|
+
return Array.from(window.document.querySelectorAll(target))
|
|
139
|
+
.some((el) => el === event.target || event.composedPath().includes(el))
|
|
140
|
+
}
|
|
141
|
+
})
|
|
142
|
+
}
|
|
143
|
+
|
|
135
144
|
function onKeyDown(event: KeyboardEvent) {
|
|
136
|
-
if (event.key === 'Escape' && value.value && !props.persistent) close()
|
|
145
|
+
if (event.key === 'Escape' && !shouldIgnoreEvent(event) && value.value && !props.persistent) close()
|
|
137
146
|
}
|
|
138
147
|
|
|
139
148
|
function clickOutsideCallback() {
|
|
@@ -432,7 +432,13 @@ defineExpose({ focus, blur, reset, validate, setError })
|
|
|
432
432
|
<x-popover-container :class="classes.content">
|
|
433
433
|
<slot name="content-header">
|
|
434
434
|
<div v-if="filterable" :class="classes.search">
|
|
435
|
-
<x-input
|
|
435
|
+
<x-input
|
|
436
|
+
ref="filterRef"
|
|
437
|
+
v-model="filter"
|
|
438
|
+
:placeholder="filterPlaceholder"
|
|
439
|
+
skip-form-registry
|
|
440
|
+
size="sm"
|
|
441
|
+
/>
|
|
436
442
|
</div>
|
|
437
443
|
</slot>
|
|
438
444
|
<div v-if="internalOptions.length > 0" :class="classes.contentBody">
|
|
@@ -118,7 +118,8 @@ export const useInputtable = (props: any, { focus, emit, withListeners = true }:
|
|
|
118
118
|
if (formGroup.isInsideFormGroup) {
|
|
119
119
|
formGroup.registerInputGroup(nameInternal.value, focus)
|
|
120
120
|
} else {
|
|
121
|
-
|
|
121
|
+
if (!props.skipFormRegistry)
|
|
122
|
+
form.registerInput(nameInternal.value, focus, validate, setError)
|
|
122
123
|
}
|
|
123
124
|
})
|
|
124
125
|
|
|
@@ -126,7 +127,8 @@ export const useInputtable = (props: any, { focus, emit, withListeners = true }:
|
|
|
126
127
|
if (formGroup.isInsideFormGroup) {
|
|
127
128
|
formGroup.unregisterInputGroup(nameInternal.value)
|
|
128
129
|
} else {
|
|
129
|
-
|
|
130
|
+
if (!props.skipFormRegistry)
|
|
131
|
+
form.unregisterInput(nameInternal.value)
|
|
130
132
|
}
|
|
131
133
|
|
|
132
134
|
})
|
|
@@ -136,7 +138,7 @@ export const useInputtable = (props: any, { focus, emit, withListeners = true }:
|
|
|
136
138
|
errorInternal,
|
|
137
139
|
hideFooterInternal,
|
|
138
140
|
isFocused,
|
|
139
|
-
isInsideForm: form.isInsideForm,
|
|
141
|
+
isInsideForm: props.skipFormRegistry ? false : form.isInsideForm,
|
|
140
142
|
isInsideFormGroup: formGroup.isInsideFormGroup,
|
|
141
143
|
inputListeners,
|
|
142
144
|
formGroup,
|
|
@@ -174,4 +176,5 @@ useInputtable.props = () => ({
|
|
|
174
176
|
default: () => [],
|
|
175
177
|
},
|
|
176
178
|
tooltip: String,
|
|
179
|
+
skipFormRegistry: Boolean,
|
|
177
180
|
} as const)
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.8.
|
|
1
|
+
export default '1.8.1'
|