@indielayer/ui 1.14.2 → 1.14.3
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/lib/components/badge/Badge.vue.js +8 -8
- package/lib/components/checkbox/Checkbox.vue2.js +36 -36
- package/lib/components/checkbox/theme/Checkbox.base.theme.js +8 -8
- package/lib/components/notifications/Notifications.vue.d.ts +13 -0
- package/lib/components/notifications/Notifications.vue.js +71 -64
- package/lib/index.js +1 -1
- package/lib/index.umd.js +4 -4
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/components/badge/Badge.vue +1 -1
- package/src/components/checkbox/Checkbox.vue +8 -2
- package/src/components/checkbox/theme/Checkbox.base.theme.ts +4 -1
- package/src/components/notifications/Notifications.vue +10 -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.3";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -96,7 +96,7 @@ const { styles, classes, className } = useTheme('Badge', {}, props)
|
|
|
96
96
|
<slot></slot>
|
|
97
97
|
<div
|
|
98
98
|
v-if="show"
|
|
99
|
-
class="absolute rounded-full z-10 bg-[color:var(--x-badge-bg)]"
|
|
99
|
+
class="absolute rounded-full z-10 bg-[color:var(--x-badge-bg)] pointer-events-none"
|
|
100
100
|
:style="offsetStyle"
|
|
101
101
|
:class="[
|
|
102
102
|
positionClasses,
|
|
@@ -42,6 +42,7 @@ const elRef = ref<HTMLElement | null>(null)
|
|
|
42
42
|
const checked = ref(false)
|
|
43
43
|
|
|
44
44
|
function toggle() {
|
|
45
|
+
if (props.disabled || props.loading || props.readonly) return
|
|
45
46
|
checked.value = !checked.value
|
|
46
47
|
}
|
|
47
48
|
|
|
@@ -138,7 +139,7 @@ defineExpose({ focus, blur, toggle, reset, validate, setError })
|
|
|
138
139
|
:aria-disabled="disabled ? 'true' : undefined"
|
|
139
140
|
type="checkbox"
|
|
140
141
|
class="invisible absolute"
|
|
141
|
-
:disabled="disabled || loading"
|
|
142
|
+
:disabled="disabled || loading || readonly"
|
|
142
143
|
:required="required"
|
|
143
144
|
v-on="listeners"
|
|
144
145
|
/>
|
|
@@ -149,7 +150,12 @@ defineExpose({ focus, blur, toggle, reset, validate, setError })
|
|
|
149
150
|
]"
|
|
150
151
|
>
|
|
151
152
|
<x-spinner v-if="loading" :size="size" class="absolute" />
|
|
152
|
-
<span
|
|
153
|
+
<span
|
|
154
|
+
v-else-if="indeterminate"
|
|
155
|
+
name="check-icon"
|
|
156
|
+
class="w-2/3 h-[1.5px]"
|
|
157
|
+
:class="[disabled ? 'bg-secondary-400 dark:bg-secondary-500' : 'bg-white']"
|
|
158
|
+
></span>
|
|
153
159
|
<slot v-else name="icon">
|
|
154
160
|
<svg
|
|
155
161
|
viewBox="0 0 20 20"
|
|
@@ -29,7 +29,10 @@ const theme: CheckboxTheme = {
|
|
|
29
29
|
},
|
|
30
30
|
|
|
31
31
|
icon: ({ props }) => {
|
|
32
|
-
const classes = ['fill-current
|
|
32
|
+
const classes = ['fill-current']
|
|
33
|
+
|
|
34
|
+
if (props.disabled) classes.push('text-secondary-400 dark:text-secondary-500')
|
|
35
|
+
else classes.push('text-white')
|
|
33
36
|
|
|
34
37
|
if (props.size === 'lg') classes.push('h-3 w-3')
|
|
35
38
|
else if (props.size === 'xl') classes.push('h-4 w-4')
|
|
@@ -27,6 +27,10 @@ const notificationsProps = {
|
|
|
27
27
|
type: [Symbol, String],
|
|
28
28
|
default: injectNotificationKey,
|
|
29
29
|
},
|
|
30
|
+
offset: {
|
|
31
|
+
type: [String, Number],
|
|
32
|
+
default: 0,
|
|
33
|
+
},
|
|
30
34
|
}
|
|
31
35
|
|
|
32
36
|
const validators = {
|
|
@@ -78,7 +82,7 @@ export default {
|
|
|
78
82
|
</script>
|
|
79
83
|
|
|
80
84
|
<script setup lang="ts">
|
|
81
|
-
import { ref, provide, watch, type PropType, type ExtractPublicPropTypes } from 'vue'
|
|
85
|
+
import { ref, provide, watch, type PropType, type ExtractPublicPropTypes, computed } from 'vue'
|
|
82
86
|
import { injectNotificationKey } from '../../composables/keys'
|
|
83
87
|
import { useColors } from '../../composables/useColors'
|
|
84
88
|
import { useCSS } from '../../composables/useCSS'
|
|
@@ -254,6 +258,8 @@ function resume(notification: NotificationEvent) {
|
|
|
254
258
|
}
|
|
255
259
|
}
|
|
256
260
|
|
|
261
|
+
const offsetStyle = computed(() => `${props.offset}px`)
|
|
262
|
+
|
|
257
263
|
const { styles, classes, className } = useTheme('Notifications', {}, props)
|
|
258
264
|
|
|
259
265
|
defineExpose({ log, info, success, warn, warning: warn, error })
|
|
@@ -279,6 +285,9 @@ defineExpose({ log, info, success, warn, warning: warn, error })
|
|
|
279
285
|
>
|
|
280
286
|
<transition-group
|
|
281
287
|
tag="ul"
|
|
288
|
+
:style="[
|
|
289
|
+
internalPosition === 'bottom' ? `padding-bottom: ${offsetStyle};` : `padding-top: ${offsetStyle};`
|
|
290
|
+
]"
|
|
282
291
|
:class="[
|
|
283
292
|
classes.list,
|
|
284
293
|
{ 'flex-col-reverse': internalPosition }
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.14.
|
|
1
|
+
export default '1.14.3'
|