daisy-ui-kit 5.0.10 → 5.0.12

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.
@@ -1,176 +1,179 @@
1
- <script setup lang="ts">
2
- import { computed, resolveDynamicComponent } from 'vue'
1
+ <script lang="ts">
2
+ import { computed, defineComponent, h, mergeProps } from 'vue'
3
3
 
4
- defineOptions({
4
+ export default defineComponent({
5
5
  inheritAttrs: false,
6
- })
7
-
8
- const props = defineProps<{
9
- is?: string
10
- join?: boolean
11
-
12
- block?: boolean
13
- inline?: boolean
14
- inlineBlock?: boolean
15
- label?: boolean
16
-
17
- color?:
18
- | 'neutral'
19
- | 'primary'
20
- | 'secondary'
21
- | 'accent'
22
- | 'info'
23
- | 'success'
24
- | 'warning'
25
- | 'error'
26
- | 'primary-content'
27
- | 'secondary-content'
28
- | 'neutral-content'
29
- | 'accent-content'
30
- | 'info-content'
31
- | 'success-content'
32
- | 'warning-content'
33
- | 'error-content'
34
- neutral?: boolean
35
- primary?: boolean
36
- secondary?: boolean
37
- accent?: boolean
38
- info?: boolean
39
- success?: boolean
40
- warning?: boolean
41
- error?: boolean
42
- neutralContent?: boolean
43
- primaryContent?: boolean
44
- secondaryContent?: boolean
45
- accentContent?: boolean
46
- infoContent?: boolean
47
- successContent?: boolean
48
- warningContent?: boolean
49
- errorContent?: boolean
50
-
51
- size?: '9xl' | '8xl' | '7xl' | '6xl' | '5xl' | '4xl' | '3xl' | '2xl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs'
52
- xl?: boolean
53
- lg?: boolean
54
- md?: boolean
55
- sm?: boolean
56
- xs?: boolean
57
-
58
- align?: 'left' | 'center' | 'right' | 'justify'
59
- left?: boolean
60
- center?: boolean
61
- right?: boolean
62
- justify?: boolean
63
-
64
- case?: 'upper' | 'lower' | 'capitalize' | 'normal'
65
- uppercase?: boolean
66
- lowercase?: boolean
67
- capitalize?: boolean
68
- normalCase?: boolean
69
-
70
- font?: 'sans' | 'serif' | 'mono'
71
- sans?: boolean
72
- serif?: boolean
73
- mono?: boolean
74
-
75
- weight?: 'thin' | 'extralight' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'black'
76
- thin?: boolean
77
- extralight?: boolean
78
- light?: boolean
79
- normal?: boolean
80
- medium?: boolean
81
- semibold?: boolean
82
- bold?: boolean
83
- extrabold?: boolean
84
- black?: boolean
85
- }>()
86
- const resolvedComponent = computed(() => {
87
- const tag = props.is || 'span'
88
- // Common HTML elements - return string directly
89
- if (
90
- tag === 'span' ||
91
- tag === 'p' ||
92
- tag === 'div' ||
93
- tag === 'h1' ||
94
- tag === 'h2' ||
95
- tag === 'h3' ||
96
- tag === 'h4' ||
97
- tag === 'h5' ||
98
- tag === 'h6'
99
- ) {
100
- return tag
101
- }
102
- return resolveDynamicComponent(tag)
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
+ mergeProps(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>
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "5.0.10",
7
+ "version": "5.0.12",
8
8
  "packageManager": "pnpm@10.10.0",
9
9
  "author": "feathers.dev",
10
10
  "exports": {