daisy-ui-kit 5.0.0-pre.18 → 5.0.0-pre.19
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/app/components/Badge.vue +5 -0
- package/app/components/Button.vue +5 -0
- package/app/components/Card.vue +5 -0
- package/app/components/DaisyLink.vue +5 -0
- package/app/components/Fieldset.vue +5 -1
- package/app/components/Filter.vue +11 -7
- package/app/components/Flex.vue +5 -0
- package/app/components/Indicator.vue +5 -1
- package/app/components/IndicatorItem.vue +5 -1
- package/app/components/Stack.vue +5 -0
- package/app/components/Tab.vue +5 -0
- package/app/components/Text.vue +5 -1
- package/package.json +1 -1
package/app/components/Badge.vue
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, resolveComponent } from 'vue'
|
|
3
3
|
|
|
4
|
+
defineOptions({
|
|
5
|
+
inheritAttrs: false,
|
|
6
|
+
})
|
|
7
|
+
|
|
4
8
|
const { is = 'div', ...props } = defineProps<{
|
|
5
9
|
is?: string
|
|
6
10
|
outline?: boolean
|
|
@@ -39,6 +43,7 @@ const resolvedComponent = computed(() => {
|
|
|
39
43
|
<template>
|
|
40
44
|
<component
|
|
41
45
|
:is="resolvedComponent"
|
|
46
|
+
v-bind="$attrs"
|
|
42
47
|
class="badge"
|
|
43
48
|
:class="{
|
|
44
49
|
'badge-outline': props.outline,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, resolveComponent } from 'vue'
|
|
3
3
|
|
|
4
|
+
defineOptions({
|
|
5
|
+
inheritAttrs: false,
|
|
6
|
+
})
|
|
7
|
+
|
|
4
8
|
const props = withDefaults(
|
|
5
9
|
defineProps<{
|
|
6
10
|
is?: string
|
|
@@ -78,6 +82,7 @@ function onKeydown(e: KeyboardEvent) {
|
|
|
78
82
|
<template>
|
|
79
83
|
<component
|
|
80
84
|
:is="resolvedComponent"
|
|
85
|
+
v-bind="$attrs"
|
|
81
86
|
:type="isButton ? type : undefined"
|
|
82
87
|
:disabled="isButton && disabled ? true : undefined"
|
|
83
88
|
:aria-disabled="!isButton && disabled ? true : undefined"
|
package/app/components/Card.vue
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, resolveComponent } from 'vue'
|
|
3
3
|
|
|
4
|
+
defineOptions({
|
|
5
|
+
inheritAttrs: false,
|
|
6
|
+
})
|
|
7
|
+
|
|
4
8
|
const { is = 'div', ...props } = defineProps<{
|
|
5
9
|
is?: string
|
|
6
10
|
border?: boolean
|
|
@@ -28,6 +32,7 @@ const resolvedComponent = computed(() => {
|
|
|
28
32
|
<template>
|
|
29
33
|
<component
|
|
30
34
|
:is="resolvedComponent"
|
|
35
|
+
v-bind="$attrs"
|
|
31
36
|
class="card"
|
|
32
37
|
:class="{
|
|
33
38
|
'card-border': props.border,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, resolveComponent } from 'vue'
|
|
3
3
|
|
|
4
|
+
defineOptions({
|
|
5
|
+
inheritAttrs: false,
|
|
6
|
+
})
|
|
7
|
+
|
|
4
8
|
const props = withDefaults(
|
|
5
9
|
defineProps<{
|
|
6
10
|
is?: string
|
|
@@ -33,6 +37,7 @@ const resolvedComponent = computed(() => {
|
|
|
33
37
|
<template>
|
|
34
38
|
<component
|
|
35
39
|
:is="resolvedComponent"
|
|
40
|
+
v-bind="$attrs"
|
|
36
41
|
class="link"
|
|
37
42
|
:class="{
|
|
38
43
|
'link-neutral': neutral || color === 'neutral',
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
defineOptions({
|
|
3
|
+
inheritAttrs: false,
|
|
4
|
+
})
|
|
5
|
+
|
|
2
6
|
const { is = 'fieldset', legend } = defineProps<{
|
|
3
7
|
is?: string
|
|
4
8
|
legend?: string
|
|
@@ -6,7 +10,7 @@ const { is = 'fieldset', legend } = defineProps<{
|
|
|
6
10
|
</script>
|
|
7
11
|
|
|
8
12
|
<template>
|
|
9
|
-
<component :is="is" class="fieldset bg-base-200 border-base-300 rounded-box border p-4">
|
|
13
|
+
<component :is="is" v-bind="$attrs" class="fieldset bg-base-200 border-base-300 rounded-box border p-4">
|
|
10
14
|
<legend v-if="legend" class="fieldset-legend">
|
|
11
15
|
{{ legend }}
|
|
12
16
|
</legend>
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed } from 'vue'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
type FilterItemInput = string | FilterItem
|
|
4
|
+
defineOptions({
|
|
5
|
+
inheritAttrs: false,
|
|
6
|
+
})
|
|
10
7
|
|
|
11
8
|
const props = withDefaults(
|
|
12
9
|
defineProps<{
|
|
@@ -44,6 +41,13 @@ const props = withDefaults(
|
|
|
44
41
|
|
|
45
42
|
const emit = defineEmits(['update:modelValue'])
|
|
46
43
|
|
|
44
|
+
interface FilterItem {
|
|
45
|
+
label: string
|
|
46
|
+
value: any
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type FilterItemInput = string | FilterItem
|
|
50
|
+
|
|
47
51
|
const currentValue = computed({
|
|
48
52
|
get: () => props.modelValue,
|
|
49
53
|
set(val) {
|
|
@@ -62,7 +66,7 @@ const normalizedItems = computed(() => {
|
|
|
62
66
|
</script>
|
|
63
67
|
|
|
64
68
|
<template>
|
|
65
|
-
<component :is="props.is" class="filter">
|
|
69
|
+
<component :is="props.is" v-bind="$attrs" class="filter">
|
|
66
70
|
<!-- Reset button at start -->
|
|
67
71
|
<input
|
|
68
72
|
v-if="resetLabel && (start || position === 'start')"
|
package/app/components/Flex.vue
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
defineOptions({
|
|
3
|
+
inheritAttrs: false,
|
|
4
|
+
})
|
|
5
|
+
|
|
2
6
|
const { is = 'div', ...props } = defineProps<{
|
|
3
7
|
is?: string | object
|
|
4
8
|
join?: boolean
|
|
@@ -45,6 +49,7 @@ const { is = 'div', ...props } = defineProps<{
|
|
|
45
49
|
<template>
|
|
46
50
|
<component
|
|
47
51
|
:is="is"
|
|
52
|
+
v-bind="$attrs"
|
|
48
53
|
class="flex"
|
|
49
54
|
:class="{
|
|
50
55
|
'join-item': props.join,
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
defineOptions({
|
|
3
|
+
inheritAttrs: false,
|
|
4
|
+
})
|
|
5
|
+
|
|
2
6
|
withDefaults(
|
|
3
7
|
defineProps<{
|
|
4
8
|
is?: string
|
|
@@ -10,7 +14,7 @@ withDefaults(
|
|
|
10
14
|
</script>
|
|
11
15
|
|
|
12
16
|
<template>
|
|
13
|
-
<component :is="is" class="indicator">
|
|
17
|
+
<component :is="is" v-bind="$attrs" class="indicator">
|
|
14
18
|
<slot />
|
|
15
19
|
</component>
|
|
16
20
|
</template>
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed } from 'vue'
|
|
3
3
|
|
|
4
|
+
defineOptions({
|
|
5
|
+
inheritAttrs: false,
|
|
6
|
+
})
|
|
7
|
+
|
|
4
8
|
const props = withDefaults(
|
|
5
9
|
defineProps<{
|
|
6
10
|
is?: string
|
|
@@ -33,7 +37,7 @@ const classes = computed(() => {
|
|
|
33
37
|
</script>
|
|
34
38
|
|
|
35
39
|
<template>
|
|
36
|
-
<component :is="is" class="indicator-item" :class="classes">
|
|
40
|
+
<component :is="is" v-bind="$attrs" class="indicator-item" :class="classes">
|
|
37
41
|
<slot />
|
|
38
42
|
</component>
|
|
39
43
|
</template>
|
package/app/components/Stack.vue
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
defineOptions({
|
|
3
|
+
inheritAttrs: false,
|
|
4
|
+
})
|
|
5
|
+
|
|
2
6
|
const { is = 'div' } = defineProps<{
|
|
3
7
|
is?: string
|
|
4
8
|
direction?: 'top' | 'end' | 'bottom' | 'start'
|
|
@@ -12,6 +16,7 @@ const { is = 'div' } = defineProps<{
|
|
|
12
16
|
<template>
|
|
13
17
|
<component
|
|
14
18
|
:is="is"
|
|
19
|
+
v-bind="$attrs"
|
|
15
20
|
class="stack"
|
|
16
21
|
:class="{
|
|
17
22
|
'stack-top': top || direction === 'top',
|
package/app/components/Tab.vue
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, inject, resolveComponent } from 'vue'
|
|
3
3
|
|
|
4
|
+
defineOptions({
|
|
5
|
+
inheritAttrs: false,
|
|
6
|
+
})
|
|
7
|
+
|
|
4
8
|
const {
|
|
5
9
|
is = 'label',
|
|
6
10
|
name,
|
|
@@ -30,6 +34,7 @@ if (!tabManager.currentTab.value) {
|
|
|
30
34
|
<template>
|
|
31
35
|
<component
|
|
32
36
|
:is="resolvedComponent"
|
|
37
|
+
v-bind="$attrs"
|
|
33
38
|
class="tab"
|
|
34
39
|
:class="{
|
|
35
40
|
'tab-active': props.active || tabManager.currentTab.value === name,
|
package/app/components/Text.vue
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, resolveComponent } from 'vue'
|
|
3
3
|
|
|
4
|
+
defineOptions({
|
|
5
|
+
inheritAttrs: false,
|
|
6
|
+
})
|
|
7
|
+
|
|
4
8
|
const props = defineProps<{
|
|
5
9
|
is?: string
|
|
6
10
|
join?: boolean
|
|
@@ -92,7 +96,7 @@ const resolvedComponent = computed(() => {
|
|
|
92
96
|
<template>
|
|
93
97
|
<component
|
|
94
98
|
:is="resolvedComponent"
|
|
95
|
-
v-bind="label ? { 'data-role': 'label' } : {}"
|
|
99
|
+
v-bind="{ ...$attrs, ...(label ? { 'data-role': 'label' } : {}) }"
|
|
96
100
|
:class="{
|
|
97
101
|
'join-item': join,
|
|
98
102
|
|