@indielayer/ui 1.7.2 → 1.7.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/docs/pages/component/modal/composed.vue +1 -0
- package/docs/pages/component/modal/usage.vue +9 -6
- package/lib/components/modal/Modal.vue.js +52 -49
- package/lib/components/modal/theme/Modal.base.theme.js +4 -4
- package/lib/components/modal/theme/Modal.carbon.theme.js +12 -12
- package/lib/components/select/Select.vue.js +129 -127
- 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/modal/Modal.vue +4 -1
- package/src/components/modal/theme/Modal.base.theme.ts +2 -1
- package/src/components/modal/theme/Modal.carbon.theme.ts +1 -0
- package/src/components/select/Select.vue +6 -3
- package/src/version.ts +1 -1
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.7.
|
|
1
|
+
declare const _default: "1.7.4";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ const modalPosition = ['top', 'center', 'bottom'] as const
|
|
|
4
4
|
const modalProps = {
|
|
5
5
|
size: {
|
|
6
6
|
type: String as PropType<ModalSize>,
|
|
7
|
-
default: '
|
|
7
|
+
default: 'lg',
|
|
8
8
|
},
|
|
9
9
|
position: {
|
|
10
10
|
type: String as PropType<ModalPosition>,
|
|
@@ -214,6 +214,9 @@ defineExpose({ open, close })
|
|
|
214
214
|
<x-scroll
|
|
215
215
|
v-if="$slots.default"
|
|
216
216
|
:scrollbar="false"
|
|
217
|
+
:class="{
|
|
218
|
+
'h-full': size === 'full',
|
|
219
|
+
}"
|
|
217
220
|
vertical
|
|
218
221
|
>
|
|
219
222
|
<div :class="classes.content">
|
|
@@ -14,7 +14,7 @@ const theme: ModalTheme = {
|
|
|
14
14
|
},
|
|
15
15
|
|
|
16
16
|
modalWrapper: ({ props }) => {
|
|
17
|
-
const classes = ['flex justify-center p-4 sm:p-8
|
|
17
|
+
const classes = ['flex justify-center p-4 sm:p-8 h-screen']
|
|
18
18
|
|
|
19
19
|
if (props.position === 'top') classes.push('items-start')
|
|
20
20
|
else if (props.position === 'bottom') classes.push('items-end')
|
|
@@ -34,6 +34,7 @@ const theme: ModalTheme = {
|
|
|
34
34
|
else if (props.size === 'md') classes.push('sm:max-w-lg')
|
|
35
35
|
else if (props.size === 'lg') classes.push('sm:max-w-3xl')
|
|
36
36
|
else if (props.size === 'xl') classes.push('sm:max-w-6xl')
|
|
37
|
+
else if (props.size === 'full') classes.push('h-full')
|
|
37
38
|
|
|
38
39
|
return classes
|
|
39
40
|
},
|
|
@@ -24,6 +24,7 @@ const theme: ModalTheme = {
|
|
|
24
24
|
else if (props.size === 'md') classes.push('sm:max-w-lg')
|
|
25
25
|
else if (props.size === 'lg') classes.push('sm:max-w-3xl')
|
|
26
26
|
else if (props.size === 'xl') classes.push('sm:max-w-6xl')
|
|
27
|
+
else if (props.size === 'full') classes.push('h-full')
|
|
27
28
|
|
|
28
29
|
return classes
|
|
29
30
|
},
|
|
@@ -32,7 +32,7 @@ export default {
|
|
|
32
32
|
</script>
|
|
33
33
|
|
|
34
34
|
<script setup lang="ts">
|
|
35
|
-
import { computed, ref, watch, type PropType, type ExtractPublicPropTypes, type Ref, nextTick, unref } from 'vue'
|
|
35
|
+
import { computed, ref, watch, type PropType, type ExtractPublicPropTypes, type Ref, nextTick, unref, onUnmounted } from 'vue'
|
|
36
36
|
import { useEventListener } from '@vueuse/core'
|
|
37
37
|
import { useColors } from '../../composables/useColors'
|
|
38
38
|
import { useCommon } from '../../composables/useCommon'
|
|
@@ -190,8 +190,7 @@ function handleOptionClick(value: string | number) {
|
|
|
190
190
|
|
|
191
191
|
if (!props.native) {
|
|
192
192
|
nextTick(() => {
|
|
193
|
-
|
|
194
|
-
elRef.value?.dispatchEvent(new Event('change'))
|
|
193
|
+
validate()
|
|
195
194
|
labelRef.value?.$el.focus()
|
|
196
195
|
})
|
|
197
196
|
}
|
|
@@ -263,6 +262,10 @@ watch([isFocused, isOpen], ([isFocusedValue, isOpenValue]) => {
|
|
|
263
262
|
immediate: true,
|
|
264
263
|
})
|
|
265
264
|
|
|
265
|
+
onUnmounted(() => {
|
|
266
|
+
if (keyNavigationListener) keyNavigationListener()
|
|
267
|
+
})
|
|
268
|
+
|
|
266
269
|
function handleKeyNavigation(e: KeyboardEvent) {
|
|
267
270
|
if (internalOptions.value.length === 0) return
|
|
268
271
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.7.
|
|
1
|
+
export default '1.7.4'
|