daisy-ui-kit 5.0.10 → 5.0.11
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 +55 -64
- package/app/components/Button.vue +121 -133
- package/app/components/Card.vue +32 -41
- package/app/components/Countdown.vue +10 -13
- package/app/components/DaisyLink.vue +32 -45
- package/app/components/Fieldset.vue +15 -17
- package/app/components/Flex.vue +73 -75
- package/app/components/FlexItem.vue +45 -51
- package/app/components/Indicator.vue +10 -17
- package/app/components/IndicatorItem.vue +28 -35
- package/app/components/Navbar.vue +12 -11
- package/app/components/NavbarCenter.vue +11 -10
- package/app/components/NavbarEnd.vue +11 -10
- package/app/components/NavbarStart.vue +11 -10
- package/app/components/SkeletonText.vue +11 -10
- package/app/components/Stack.vue +25 -27
- package/app/components/Tab.vue +47 -46
- package/app/components/Text.vue +175 -172
- package/package.json +1 -1
package/app/components/Text.vue
CHANGED
|
@@ -1,176 +1,179 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import { computed,
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { computed, defineComponent, h } from 'vue'
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
export default defineComponent({
|
|
5
5
|
inheritAttrs: false,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
6
|
+
props: {
|
|
7
|
+
is: { type: [String, Object], default: 'span' },
|
|
8
|
+
join: Boolean,
|
|
9
|
+
|
|
10
|
+
block: Boolean,
|
|
11
|
+
inline: Boolean,
|
|
12
|
+
inlineBlock: Boolean,
|
|
13
|
+
label: Boolean,
|
|
14
|
+
|
|
15
|
+
color: String as () =>
|
|
16
|
+
| 'neutral'
|
|
17
|
+
| 'primary'
|
|
18
|
+
| 'secondary'
|
|
19
|
+
| 'accent'
|
|
20
|
+
| 'info'
|
|
21
|
+
| 'success'
|
|
22
|
+
| 'warning'
|
|
23
|
+
| 'error'
|
|
24
|
+
| 'primary-content'
|
|
25
|
+
| 'secondary-content'
|
|
26
|
+
| 'neutral-content'
|
|
27
|
+
| 'accent-content'
|
|
28
|
+
| 'info-content'
|
|
29
|
+
| 'success-content'
|
|
30
|
+
| 'warning-content'
|
|
31
|
+
| 'error-content',
|
|
32
|
+
neutral: Boolean,
|
|
33
|
+
primary: Boolean,
|
|
34
|
+
secondary: Boolean,
|
|
35
|
+
accent: Boolean,
|
|
36
|
+
info: Boolean,
|
|
37
|
+
success: Boolean,
|
|
38
|
+
warning: Boolean,
|
|
39
|
+
error: Boolean,
|
|
40
|
+
neutralContent: Boolean,
|
|
41
|
+
primaryContent: Boolean,
|
|
42
|
+
secondaryContent: Boolean,
|
|
43
|
+
accentContent: Boolean,
|
|
44
|
+
infoContent: Boolean,
|
|
45
|
+
successContent: Boolean,
|
|
46
|
+
warningContent: Boolean,
|
|
47
|
+
errorContent: Boolean,
|
|
48
|
+
|
|
49
|
+
size: String as () =>
|
|
50
|
+
| '9xl'
|
|
51
|
+
| '8xl'
|
|
52
|
+
| '7xl'
|
|
53
|
+
| '6xl'
|
|
54
|
+
| '5xl'
|
|
55
|
+
| '4xl'
|
|
56
|
+
| '3xl'
|
|
57
|
+
| '2xl'
|
|
58
|
+
| 'xl'
|
|
59
|
+
| 'lg'
|
|
60
|
+
| 'md'
|
|
61
|
+
| 'sm'
|
|
62
|
+
| 'xs',
|
|
63
|
+
xl: Boolean,
|
|
64
|
+
lg: Boolean,
|
|
65
|
+
md: Boolean,
|
|
66
|
+
sm: Boolean,
|
|
67
|
+
xs: Boolean,
|
|
68
|
+
|
|
69
|
+
align: String as () => 'left' | 'center' | 'right' | 'justify',
|
|
70
|
+
left: Boolean,
|
|
71
|
+
center: Boolean,
|
|
72
|
+
right: Boolean,
|
|
73
|
+
justify: Boolean,
|
|
74
|
+
|
|
75
|
+
case: String as () => 'upper' | 'lower' | 'capitalize' | 'normal',
|
|
76
|
+
uppercase: Boolean,
|
|
77
|
+
lowercase: Boolean,
|
|
78
|
+
capitalize: Boolean,
|
|
79
|
+
normalCase: Boolean,
|
|
80
|
+
|
|
81
|
+
font: String as () => 'sans' | 'serif' | 'mono',
|
|
82
|
+
sans: Boolean,
|
|
83
|
+
serif: Boolean,
|
|
84
|
+
mono: Boolean,
|
|
85
|
+
|
|
86
|
+
weight: String as () =>
|
|
87
|
+
| 'thin'
|
|
88
|
+
| 'extralight'
|
|
89
|
+
| 'light'
|
|
90
|
+
| 'normal'
|
|
91
|
+
| 'medium'
|
|
92
|
+
| 'semibold'
|
|
93
|
+
| 'bold'
|
|
94
|
+
| 'extrabold'
|
|
95
|
+
| 'black',
|
|
96
|
+
thin: Boolean,
|
|
97
|
+
extralight: Boolean,
|
|
98
|
+
light: Boolean,
|
|
99
|
+
normal: Boolean,
|
|
100
|
+
medium: Boolean,
|
|
101
|
+
semibold: Boolean,
|
|
102
|
+
bold: Boolean,
|
|
103
|
+
extrabold: Boolean,
|
|
104
|
+
black: Boolean,
|
|
105
|
+
},
|
|
106
|
+
setup(props, { slots, attrs }) {
|
|
107
|
+
const classes = computed(() => ({
|
|
108
|
+
'join-item': props.join,
|
|
109
|
+
|
|
110
|
+
block: props.block,
|
|
111
|
+
inline: props.inline,
|
|
112
|
+
'inline-block': props.inlineBlock,
|
|
113
|
+
label: props.label,
|
|
114
|
+
|
|
115
|
+
'text-primary': props.primary || props.color === 'primary',
|
|
116
|
+
'text-primary-content': props.primaryContent || props.color === 'primary-content',
|
|
117
|
+
'text-secondary': props.secondary || props.color === 'secondary',
|
|
118
|
+
'text-secondary-content': props.secondaryContent || props.color === 'secondary-content',
|
|
119
|
+
'text-neutral': props.neutral || props.color === 'neutral',
|
|
120
|
+
'text-neutral-content': props.neutralContent || props.color === 'neutral-content',
|
|
121
|
+
'text-accent': props.accent || props.color === 'accent',
|
|
122
|
+
'text-accent-content': props.accentContent || props.color === 'accent-content',
|
|
123
|
+
'text-info': props.info || props.color === 'info',
|
|
124
|
+
'text-info-content': props.infoContent || props.color === 'info-content',
|
|
125
|
+
'text-success': props.success || props.color === 'success',
|
|
126
|
+
'text-success-content': props.successContent || props.color === 'success-content',
|
|
127
|
+
'text-warning': props.warning || props.color === 'warning',
|
|
128
|
+
'text-warning-content': props.warningContent || props.color === 'warning-content',
|
|
129
|
+
'text-error': props.error || props.color === 'error',
|
|
130
|
+
'text-error-content': props.errorContent || props.color === 'error-content',
|
|
131
|
+
|
|
132
|
+
'text-9xl': props.size === '9xl',
|
|
133
|
+
'text-8xl': props.size === '8xl',
|
|
134
|
+
'text-7xl': props.size === '7xl',
|
|
135
|
+
'text-6xl': props.size === '6xl',
|
|
136
|
+
'text-5xl': props.size === '5xl',
|
|
137
|
+
'text-4xl': props.size === '4xl',
|
|
138
|
+
'text-3xl': props.size === '3xl',
|
|
139
|
+
'text-2xl': props.size === '2xl',
|
|
140
|
+
'text-xl': props.xl || props.size === 'xl',
|
|
141
|
+
'text-lg': props.lg || props.size === 'lg',
|
|
142
|
+
'text-md': props.md || props.size === 'md',
|
|
143
|
+
'text-sm': props.sm || props.size === 'sm',
|
|
144
|
+
'text-xs': props.xs || props.size === 'xs',
|
|
145
|
+
|
|
146
|
+
'text-left': props.left || props.align === 'left',
|
|
147
|
+
'text-center': props.center || props.align === 'center',
|
|
148
|
+
'text-right': props.right || props.align === 'right',
|
|
149
|
+
'text-justify': props.justify || props.align === 'justify',
|
|
150
|
+
|
|
151
|
+
uppercase: props.uppercase || props.case === 'upper',
|
|
152
|
+
lowercase: props.lowercase || props.case === 'lower',
|
|
153
|
+
capitalize: props.capitalize || props.case === 'capitalize',
|
|
154
|
+
'normal-case': props.normalCase || props.case === 'normal',
|
|
155
|
+
|
|
156
|
+
'font-sans': props.sans || props.font === 'sans',
|
|
157
|
+
'font-serif': props.serif || props.font === 'serif',
|
|
158
|
+
'font-mono': props.mono || props.font === 'mono',
|
|
159
|
+
|
|
160
|
+
'font-thin': props.thin || props.weight === 'thin',
|
|
161
|
+
'font-extralight': props.extralight || props.weight === 'extralight',
|
|
162
|
+
'font-light': props.light || props.weight === 'light',
|
|
163
|
+
'font-normal': props.normal || props.weight === 'normal',
|
|
164
|
+
'font-medium': props.medium || props.weight === 'medium',
|
|
165
|
+
'font-semibold': props.semibold || props.weight === 'semibold',
|
|
166
|
+
'font-bold': props.bold || props.weight === 'bold',
|
|
167
|
+
'font-extrabold': props.extrabold || props.weight === 'extrabold',
|
|
168
|
+
'font-black': props.black || props.weight === 'black',
|
|
169
|
+
}))
|
|
170
|
+
|
|
171
|
+
return () =>
|
|
172
|
+
h(
|
|
173
|
+
props.is as any,
|
|
174
|
+
{ ...attrs, ...(props.label ? { 'data-role': 'label' } : {}), class: classes.value },
|
|
175
|
+
slots.default?.(),
|
|
176
|
+
)
|
|
177
|
+
},
|
|
103
178
|
})
|
|
104
179
|
</script>
|
|
105
|
-
|
|
106
|
-
<template>
|
|
107
|
-
<component
|
|
108
|
-
:is="resolvedComponent"
|
|
109
|
-
v-bind="{ ...$attrs, ...(label ? { 'data-role': 'label' } : {}) }"
|
|
110
|
-
:class="{
|
|
111
|
-
'join-item': join,
|
|
112
|
-
|
|
113
|
-
block,
|
|
114
|
-
inline,
|
|
115
|
-
'inline-block': inlineBlock,
|
|
116
|
-
label,
|
|
117
|
-
|
|
118
|
-
'text-primary': primary || color === 'primary',
|
|
119
|
-
'text-primary-content': primaryContent || color === 'primary-content',
|
|
120
|
-
'text-secondary': secondary || color === 'secondary',
|
|
121
|
-
'text-secondary-content': secondaryContent || color === 'secondary-content',
|
|
122
|
-
'text-neutral': neutral || color === 'neutral',
|
|
123
|
-
'text-neutral-content': neutralContent || color === 'neutral-content',
|
|
124
|
-
'text-accent': accent || color === 'accent',
|
|
125
|
-
'text-accent-content': accentContent || color === 'accent-content',
|
|
126
|
-
'text-info': info || color === 'info',
|
|
127
|
-
'text-info-content': infoContent || color === 'info-content',
|
|
128
|
-
'text-success': success || color === 'success',
|
|
129
|
-
'text-success-content': successContent || color === 'success-content',
|
|
130
|
-
'text-warning': warning || color === 'warning',
|
|
131
|
-
'text-warning-content': warningContent || color === 'warning-content',
|
|
132
|
-
'text-error': error || color === 'error',
|
|
133
|
-
'text-error-content': errorContent || color === 'error-content',
|
|
134
|
-
|
|
135
|
-
'text-9xl': size === '9xl',
|
|
136
|
-
'text-8xl': size === '8xl',
|
|
137
|
-
'text-7xl': size === '7xl',
|
|
138
|
-
'text-6xl': size === '6xl',
|
|
139
|
-
'text-5xl': size === '5xl',
|
|
140
|
-
'text-4xl': size === '4xl',
|
|
141
|
-
'text-3xl': size === '3xl',
|
|
142
|
-
'text-2xl': size === '2xl',
|
|
143
|
-
'text-xl': xl || size === 'xl',
|
|
144
|
-
'text-lg': lg || size === 'lg',
|
|
145
|
-
'text-md': md || size === 'md',
|
|
146
|
-
'text-sm': sm || size === 'sm',
|
|
147
|
-
'text-xs': xs || size === 'xs',
|
|
148
|
-
|
|
149
|
-
'text-left': left || align === 'left',
|
|
150
|
-
'text-center': center || align === 'center',
|
|
151
|
-
'text-right': right || align === 'right',
|
|
152
|
-
'text-justify': justify || align === 'justify',
|
|
153
|
-
|
|
154
|
-
uppercase: uppercase || props.case === 'upper',
|
|
155
|
-
lowercase: lowercase || props.case === 'lower',
|
|
156
|
-
capitalize: capitalize || props.case === 'capitalize',
|
|
157
|
-
'normal-case': normalCase || props.case === 'normal',
|
|
158
|
-
|
|
159
|
-
'font-sans': sans || font === 'sans',
|
|
160
|
-
'font-serif': serif || font === 'serif',
|
|
161
|
-
'font-mono': mono || font === 'mono',
|
|
162
|
-
|
|
163
|
-
'font-thin': thin || weight === 'thin',
|
|
164
|
-
'font-extralight': extralight || weight === 'extralight',
|
|
165
|
-
'font-light': light || weight === 'light',
|
|
166
|
-
'font-normal': normal || weight === 'normal',
|
|
167
|
-
'font-medium': medium || weight === 'medium',
|
|
168
|
-
'font-semibold': semibold || weight === 'semibold',
|
|
169
|
-
'font-bold': bold || weight === 'bold',
|
|
170
|
-
'font-extrabold': extrabold || weight === 'extrabold',
|
|
171
|
-
'font-black': black || weight === 'black',
|
|
172
|
-
}"
|
|
173
|
-
>
|
|
174
|
-
<slot />
|
|
175
|
-
</component>
|
|
176
|
-
</template>
|