daisy-ui-kit 0.4.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/README.md +80 -0
- package/components/-utils.ts +41 -0
- package/components/.DS_Store +0 -0
- package/components/Alert.vue +27 -0
- package/components/Artboard.vue +33 -0
- package/components/Avatar.vue +85 -0
- package/components/AvatarGroup.vue +19 -0
- package/components/Badge.vue +45 -0
- package/components/BottomNav.vue +27 -0
- package/components/Breadcrumbs.vue +7 -0
- package/components/Button.config.ts +26 -0
- package/components/Button.vue +112 -0
- package/components/ButtonGroup.vue +5 -0
- package/components/Card.vue +31 -0
- package/components/CardActions.vue +16 -0
- package/components/CardBody.vue +16 -0
- package/components/CardTitle.vue +16 -0
- package/components/Carousel.vue +26 -0
- package/components/CarouselItem.vue +5 -0
- package/components/Checkbox.vue +47 -0
- package/components/Code.vue +91 -0
- package/components/CodePreview.vue +28 -0
- package/components/CodeWrapper.vue +10 -0
- package/components/Collapse.vue +33 -0
- package/components/CollapseContent.vue +5 -0
- package/components/CollapseTitle.vue +5 -0
- package/components/Countdown.vue +16 -0
- package/components/CountdownTimers.vue +66 -0
- package/components/Counter.vue +15 -0
- package/components/Crumb.vue +5 -0
- package/components/DarkToggle.vue +11 -0
- package/components/DemoElement.vue +32 -0
- package/components/DemoExample.vue +23 -0
- package/components/Divider.vue +25 -0
- package/components/Drawer.vue +19 -0
- package/components/DrawerLayout.vue +35 -0
- package/components/DrawerLayoutContent.vue +11 -0
- package/components/Dropdown.vue +30 -0
- package/components/DropdownContent.vue +3 -0
- package/components/Flex.vue +146 -0
- package/components/FlexItem.vue +146 -0
- package/components/Footer.vue +25 -0
- package/components/FooterTitle.vue +17 -0
- package/components/FormControl.vue +5 -0
- package/components/Hero.vue +17 -0
- package/components/HeroContent.vue +17 -0
- package/components/HeroOverlay.vue +5 -0
- package/components/Home/AlternatingFeatureSections.vue +217 -0
- package/components/Home/CTA.vue +27 -0
- package/components/Home/Footer.vue +210 -0
- package/components/Home/GradientFeatureSections.vue +98 -0
- package/components/Home/Header.vue +174 -0
- package/components/Home/Hero.vue +52 -0
- package/components/Home/LogoCloud.vue +49 -0
- package/components/Home/StatsSection.vue +51 -0
- package/components/Home/Testimonial.vue +23 -0
- package/components/Indicator.vue +16 -0
- package/components/IndicatorItem.vue +37 -0
- package/components/InputGroup.vue +33 -0
- package/components/Kbd.vue +26 -0
- package/components/Label.vue +17 -0
- package/components/LabelText.vue +17 -0
- package/components/LabelTextAlt.vue +17 -0
- package/components/Link.vue +32 -0
- package/components/Logo.vue +8 -0
- package/components/Mask.config.ts +77 -0
- package/components/Mask.vue +15 -0
- package/components/Menu.vue +26 -0
- package/components/MenuItem.vue +17 -0
- package/components/MenuTitle.vue +14 -0
- package/components/MobileSidebar.vue +92 -0
- package/components/MockupCode.vue +4 -0
- package/components/Modal.vue +16 -0
- package/components/ModalAction.vue +5 -0
- package/components/ModalBox.vue +5 -0
- package/components/ModalWrapper.vue +32 -0
- package/components/NavButton.vue +22 -0
- package/components/Navbar.vue +17 -0
- package/components/NavbarCenter.vue +16 -0
- package/components/NavbarEnd.vue +16 -0
- package/components/NavbarStart.vue +16 -0
- package/components/Phone.vue +8 -0
- package/components/Progress.vue +44 -0
- package/components/Prose.vue +36 -0
- package/components/RadialProgress.vue +42 -0
- package/components/Radio.vue +63 -0
- package/components/RadioGroup.vue +41 -0
- package/components/Range.vue +49 -0
- package/components/RangeMeasure.vue +71 -0
- package/components/RangeMeasureTick.vue +62 -0
- package/components/Rating.vue +152 -0
- package/components/Select.vue +104 -0
- package/components/Sidebar.vue +89 -0
- package/components/SidebarMenuSection.vue +35 -0
- package/components/SigninForm.vue +47 -0
- package/components/Stack.vue +16 -0
- package/components/Stat.vue +5 -0
- package/components/StatActions.vue +5 -0
- package/components/StatDesc.vue +5 -0
- package/components/StatFigure.vue +5 -0
- package/components/StatTitle.vue +5 -0
- package/components/StatValue.vue +5 -0
- package/components/Stats.vue +5 -0
- package/components/Step.vue +36 -0
- package/components/Steps.vue +22 -0
- package/components/Swap.vue +60 -0
- package/components/Tab.vue +49 -0
- package/components/TabContent.vue +28 -0
- package/components/Tabs.vue +71 -0
- package/components/TabsManager.vue +37 -0
- package/components/Text.vue +179 -0
- package/components/TextArea.vue +53 -0
- package/components/TextInput.vue +64 -0
- package/components/Toast.vue +33 -0
- package/components/Toggle.vue +48 -0
- package/components/Tooltip.vue +49 -0
- package/components/UserMenu.vue +62 -0
- package/components/Window.vue +5 -0
- package/components/fixtures.ts +62 -0
- package/components/theme/Builder.vue +284 -0
- package/components/theme/Output.vue +70 -0
- package/components/theme/Picker.vue +39 -0
- package/components/theme/Preview.vue +1684 -0
- package/components/theme/Provider.vue +43 -0
- package/components/theme/Snooper.vue +41 -0
- package/components/theme/Swatch.vue +47 -0
- package/components/theme/custom-themes.ts +34 -0
- package/components/theme/theme-utils.ts +164 -0
- package/components/types.ts +7 -0
- package/index.ts +96 -0
- package/package.json +55 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, defineProps } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
is?: string
|
|
6
|
+
|
|
7
|
+
block?: boolean
|
|
8
|
+
inline?: boolean
|
|
9
|
+
inlineBlock?: boolean
|
|
10
|
+
|
|
11
|
+
color?:
|
|
12
|
+
| 'primary'
|
|
13
|
+
| 'secondary'
|
|
14
|
+
| 'neutral'
|
|
15
|
+
| 'accent'
|
|
16
|
+
| 'info'
|
|
17
|
+
| 'success'
|
|
18
|
+
| 'warning'
|
|
19
|
+
| 'error'
|
|
20
|
+
| 'primary-content'
|
|
21
|
+
| 'secondary-content'
|
|
22
|
+
| 'neutral-content'
|
|
23
|
+
| 'accent-content'
|
|
24
|
+
| 'info-content'
|
|
25
|
+
| 'success-content'
|
|
26
|
+
| 'warning-content'
|
|
27
|
+
| 'error-content'
|
|
28
|
+
neutral?: boolean
|
|
29
|
+
primary?: boolean
|
|
30
|
+
secondary?: boolean
|
|
31
|
+
accent?: boolean
|
|
32
|
+
info?: boolean
|
|
33
|
+
success?: boolean
|
|
34
|
+
warning?: boolean
|
|
35
|
+
error?: boolean
|
|
36
|
+
neutralContent?: boolean
|
|
37
|
+
primaryContent?: boolean
|
|
38
|
+
secondaryContent?: boolean
|
|
39
|
+
accentContent?: boolean
|
|
40
|
+
infoContent?: boolean
|
|
41
|
+
successContent?: boolean
|
|
42
|
+
warningContent?: boolean
|
|
43
|
+
errorContent?: boolean
|
|
44
|
+
|
|
45
|
+
size?:
|
|
46
|
+
| '9xl'
|
|
47
|
+
| '8xl'
|
|
48
|
+
| '7xl'
|
|
49
|
+
| '6xl'
|
|
50
|
+
| '5xl'
|
|
51
|
+
| '4xl'
|
|
52
|
+
| '3xl'
|
|
53
|
+
| '2xl'
|
|
54
|
+
| 'xl'
|
|
55
|
+
| 'lg'
|
|
56
|
+
| 'md'
|
|
57
|
+
| 'sm'
|
|
58
|
+
| 'xs'
|
|
59
|
+
xl?: boolean
|
|
60
|
+
lg?: boolean
|
|
61
|
+
md?: boolean
|
|
62
|
+
sm?: boolean
|
|
63
|
+
xs?: boolean
|
|
64
|
+
|
|
65
|
+
align?: 'left' | 'center' | 'right' | 'justify'
|
|
66
|
+
left?: boolean
|
|
67
|
+
center?: boolean
|
|
68
|
+
right?: boolean
|
|
69
|
+
justify?: boolean
|
|
70
|
+
|
|
71
|
+
case?: 'upper' | 'lower' | 'capitalize' | 'normal'
|
|
72
|
+
uppercase?: boolean
|
|
73
|
+
lowercase?: boolean
|
|
74
|
+
capitalize?: boolean
|
|
75
|
+
normalCase?: boolean
|
|
76
|
+
|
|
77
|
+
font?: 'sans' | 'serif' | 'mono'
|
|
78
|
+
sans?: boolean
|
|
79
|
+
serif?: boolean
|
|
80
|
+
mono?: boolean
|
|
81
|
+
|
|
82
|
+
weight?:
|
|
83
|
+
| 'thin'
|
|
84
|
+
| 'extralight'
|
|
85
|
+
| 'light'
|
|
86
|
+
| 'normal'
|
|
87
|
+
| 'medium'
|
|
88
|
+
| 'semibold'
|
|
89
|
+
| 'bold'
|
|
90
|
+
| 'extrabold'
|
|
91
|
+
| 'black'
|
|
92
|
+
thin?: boolean
|
|
93
|
+
extralight?: boolean
|
|
94
|
+
light?: boolean
|
|
95
|
+
normal?: boolean
|
|
96
|
+
medium?: boolean
|
|
97
|
+
semibold?: boolean
|
|
98
|
+
bold?: boolean
|
|
99
|
+
extrabold?: boolean
|
|
100
|
+
black?: boolean
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const props = defineProps<Props>()
|
|
104
|
+
|
|
105
|
+
const classes = computed(() => {
|
|
106
|
+
return {
|
|
107
|
+
'block': props.block,
|
|
108
|
+
'inline': props.inline,
|
|
109
|
+
'inline-block': props.inlineBlock,
|
|
110
|
+
|
|
111
|
+
'text-primary': props.primary || props.color === 'primary',
|
|
112
|
+
'text-primary-content':
|
|
113
|
+
props.primaryContent || props.color === 'primary-content',
|
|
114
|
+
'text-secondary': props.secondary || props.color === 'secondary',
|
|
115
|
+
'text-secondary-content':
|
|
116
|
+
props.secondaryContent || props.color === 'secondary-content',
|
|
117
|
+
'text-neutral': props.neutral || props.color === 'neutral',
|
|
118
|
+
'text-neutral-content':
|
|
119
|
+
props.neutralContent || props.color === 'neutral-content',
|
|
120
|
+
'text-accent': props.accent || props.color === 'accent',
|
|
121
|
+
'text-accent-content':
|
|
122
|
+
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':
|
|
127
|
+
props.successContent || props.color === 'success-content',
|
|
128
|
+
'text-warning': props.warning || props.color === 'warning',
|
|
129
|
+
'text-warning-content':
|
|
130
|
+
props.warningContent || props.color === 'warning-content',
|
|
131
|
+
'text-error': props.error || props.color === 'error',
|
|
132
|
+
'text-error-content': props.errorContent || props.color === 'error-content',
|
|
133
|
+
|
|
134
|
+
'text-9xl': props.size === '9xl',
|
|
135
|
+
'text-8xl': props.size === '8xl',
|
|
136
|
+
'text-7xl': props.size === '7xl',
|
|
137
|
+
'text-6xl': props.size === '6xl',
|
|
138
|
+
'text-5xl': props.size === '5xl',
|
|
139
|
+
'text-4xl': props.size === '4xl',
|
|
140
|
+
'text-3xl': props.size === '3xl',
|
|
141
|
+
'text-2xl': props.size === '2xl',
|
|
142
|
+
'text-xl': props.xl || props.size === 'xl',
|
|
143
|
+
'text-lg': props.lg || props.size === 'lg',
|
|
144
|
+
'text-md': props.md || props.size === 'md',
|
|
145
|
+
'text-sm': props.sm || props.size === 'sm',
|
|
146
|
+
'text-xs': props.xs || props.size === 'xs',
|
|
147
|
+
|
|
148
|
+
'text-left': props.left || props.align === 'left',
|
|
149
|
+
'text-center': props.center || props.align === 'center',
|
|
150
|
+
'text-right': props.right || props.align === 'right',
|
|
151
|
+
'text-justify': props.justify || props.align === 'justify',
|
|
152
|
+
|
|
153
|
+
'uppercase': props.uppercase || props.case === 'upper',
|
|
154
|
+
'lowercase': props.lowercase || props.case === 'lower',
|
|
155
|
+
'capitalize': props.capitalize || props.case === 'capitalize',
|
|
156
|
+
'normal-case': props.normalCase || props.case === 'normal',
|
|
157
|
+
|
|
158
|
+
'font-sans': props.sans || props.font === 'sans',
|
|
159
|
+
'font-serif': props.serif || props.font === 'serif',
|
|
160
|
+
'font-mono': props.mono || props.font === 'mono',
|
|
161
|
+
|
|
162
|
+
'font-thin': props.thin || props.weight === 'thin',
|
|
163
|
+
'font-extralight': props.extralight || props.weight === 'extralight',
|
|
164
|
+
'font-light': props.light || props.weight === 'light',
|
|
165
|
+
'font-normal': props.normal || props.weight === 'normal',
|
|
166
|
+
'font-medium': props.medium || props.weight === 'medium',
|
|
167
|
+
'font-semibold': props.semibold || props.weight === 'semibold',
|
|
168
|
+
'font-bold': props.bold || props.weight === 'bold',
|
|
169
|
+
'font-extrabold': props.extrabold || props.weight === 'extrabold',
|
|
170
|
+
'font-black': props.black || props.weight === 'black',
|
|
171
|
+
}
|
|
172
|
+
})
|
|
173
|
+
</script>
|
|
174
|
+
|
|
175
|
+
<template>
|
|
176
|
+
<component :is="is || 'span'" :class="[classes]">
|
|
177
|
+
<slot />
|
|
178
|
+
</component>
|
|
179
|
+
</template>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, defineEmits, defineProps, withDefaults } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
modelValue?: string
|
|
6
|
+
placeholder?: string
|
|
7
|
+
type?: 'text' | 'phone' | 'email' | 'search'
|
|
8
|
+
|
|
9
|
+
color?: string
|
|
10
|
+
primary?: boolean
|
|
11
|
+
secondary?: boolean
|
|
12
|
+
accent?: boolean
|
|
13
|
+
info?: boolean
|
|
14
|
+
success?: boolean
|
|
15
|
+
warning?: boolean
|
|
16
|
+
error?: boolean
|
|
17
|
+
|
|
18
|
+
bordered?: boolean
|
|
19
|
+
ghost?: boolean
|
|
20
|
+
disabled?: boolean
|
|
21
|
+
}
|
|
22
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
23
|
+
type: 'text',
|
|
24
|
+
})
|
|
25
|
+
defineEmits(['update:modelValue'])
|
|
26
|
+
|
|
27
|
+
const classes = computed(() => {
|
|
28
|
+
return {
|
|
29
|
+
'textarea-primary': props.primary || props.color === 'primary',
|
|
30
|
+
'textarea-secondary': props.secondary || props.color === 'secondary',
|
|
31
|
+
'textarea-accent': props.accent || props.color === 'accent',
|
|
32
|
+
'textarea-info': props.info || props.color === 'info',
|
|
33
|
+
'textarea-success': props.success || props.color === 'success',
|
|
34
|
+
'textarea-warning': props.warning || props.color === 'warning',
|
|
35
|
+
'textarea-error': props.error || props.color === 'error',
|
|
36
|
+
|
|
37
|
+
'textarea-bordered': props.bordered,
|
|
38
|
+
'textarea-ghost': props.ghost,
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<template>
|
|
44
|
+
<textarea
|
|
45
|
+
:value="modelValue"
|
|
46
|
+
:type="type"
|
|
47
|
+
:placeholder="placeholder"
|
|
48
|
+
:disabled="disabled"
|
|
49
|
+
class="textarea"
|
|
50
|
+
:class="classes"
|
|
51
|
+
@input="$emit('update:modelValue', ($event.target as any).value)"
|
|
52
|
+
/>
|
|
53
|
+
</template>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, defineEmits, defineProps, withDefaults } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
modelValue?: string
|
|
6
|
+
placeholder?: string
|
|
7
|
+
type?: 'text' | 'phone' | 'email' | 'search'
|
|
8
|
+
|
|
9
|
+
color?: string
|
|
10
|
+
primary?: boolean
|
|
11
|
+
secondary?: boolean
|
|
12
|
+
accent?: boolean
|
|
13
|
+
info?: boolean
|
|
14
|
+
success?: boolean
|
|
15
|
+
warning?: boolean
|
|
16
|
+
error?: boolean
|
|
17
|
+
|
|
18
|
+
bordered?: boolean
|
|
19
|
+
ghost?: boolean
|
|
20
|
+
disabled?: boolean
|
|
21
|
+
|
|
22
|
+
size?: 'lg' | 'md' | 'sm' | 'xs'
|
|
23
|
+
lg?: boolean
|
|
24
|
+
md?: boolean
|
|
25
|
+
sm?: boolean
|
|
26
|
+
xs?: boolean
|
|
27
|
+
}
|
|
28
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
29
|
+
type: 'text',
|
|
30
|
+
})
|
|
31
|
+
defineEmits(['update:modelValue'])
|
|
32
|
+
|
|
33
|
+
const classes = computed(() => {
|
|
34
|
+
return {
|
|
35
|
+
'input-primary': props.primary || props.color === 'primary',
|
|
36
|
+
'input-secondary': props.secondary || props.color === 'secondary',
|
|
37
|
+
'input-accent': props.accent || props.color === 'accent',
|
|
38
|
+
'input-info': props.info || props.color === 'info',
|
|
39
|
+
'input-success': props.success || props.color === 'success',
|
|
40
|
+
'input-warning': props.warning || props.color === 'warning',
|
|
41
|
+
'input-error': props.error || props.color === 'error',
|
|
42
|
+
|
|
43
|
+
'input-lg': props.lg || props.size === 'lg',
|
|
44
|
+
'input-md': props.md || props.size === 'md',
|
|
45
|
+
'input-sm': props.sm || props.size === 'sm',
|
|
46
|
+
'input-xs': props.xs || props.size === 'xs',
|
|
47
|
+
|
|
48
|
+
'input-bordered': props.bordered,
|
|
49
|
+
'input-ghost': props.ghost,
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<template>
|
|
55
|
+
<input
|
|
56
|
+
:value="modelValue"
|
|
57
|
+
:type="type"
|
|
58
|
+
:placeholder="placeholder"
|
|
59
|
+
:disabled="disabled"
|
|
60
|
+
class="input"
|
|
61
|
+
:class="classes"
|
|
62
|
+
@input="$emit('update:modelValue', ($event.target as any).value)"
|
|
63
|
+
>
|
|
64
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, defineProps } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
hAlign?: 'start' | 'center' | 'end'
|
|
6
|
+
start?: boolean
|
|
7
|
+
center?: boolean
|
|
8
|
+
end?: boolean
|
|
9
|
+
|
|
10
|
+
vAlign?: 'top' | 'middle' | 'bottom'
|
|
11
|
+
top?: boolean
|
|
12
|
+
middle?: boolean
|
|
13
|
+
bottom?: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const props = defineProps<Props>()
|
|
17
|
+
const classes = computed(() => {
|
|
18
|
+
return {
|
|
19
|
+
'toast-start': props.start || props.hAlign === 'start',
|
|
20
|
+
'toast-center': props.center || props.hAlign === 'center',
|
|
21
|
+
'toast-end': props.end || props.hAlign === 'end',
|
|
22
|
+
'toast-top': props.top || props.vAlign === 'top',
|
|
23
|
+
'toast-middle': props.middle || props.vAlign === 'middle',
|
|
24
|
+
'toast-bottom': props.bottom || props.vAlign === 'bottom',
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<div class="toast" :class="classes">
|
|
31
|
+
<slot />
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, defineEmits, defineProps } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
modelValue?: any
|
|
6
|
+
|
|
7
|
+
color?: string
|
|
8
|
+
primary?: boolean
|
|
9
|
+
secondary?: boolean
|
|
10
|
+
accent?: boolean
|
|
11
|
+
|
|
12
|
+
size?: string
|
|
13
|
+
xs?: boolean
|
|
14
|
+
sm?: boolean
|
|
15
|
+
md?: boolean
|
|
16
|
+
lg?: boolean
|
|
17
|
+
}
|
|
18
|
+
const props = defineProps<Props>()
|
|
19
|
+
const emit = defineEmits(['update:modelValue'])
|
|
20
|
+
|
|
21
|
+
const classes = computed(() => {
|
|
22
|
+
const { color, primary, secondary, accent, size, xs, sm, md, lg } = props
|
|
23
|
+
return {
|
|
24
|
+
'toggle-primary': primary || color === 'primary',
|
|
25
|
+
'toggle-secondary': secondary || color === 'secondary',
|
|
26
|
+
'toggle-accent': accent || color === 'accent',
|
|
27
|
+
'toggle-xs': xs || size === 'xs',
|
|
28
|
+
'toggle-sm': sm || size === 'sm',
|
|
29
|
+
'toggle-md': md || size === 'md',
|
|
30
|
+
'toggle-lg': lg || size === 'lg',
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
const currentValue = computed({
|
|
35
|
+
get: () => props.modelValue,
|
|
36
|
+
set: (val: string) => emit('update:modelValue', val),
|
|
37
|
+
})
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<input
|
|
42
|
+
v-model="currentValue"
|
|
43
|
+
type="checkbox"
|
|
44
|
+
v-bind="$attrs"
|
|
45
|
+
class="toggle"
|
|
46
|
+
:class="classes"
|
|
47
|
+
>
|
|
48
|
+
</template>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, defineProps } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
tip?: string | number
|
|
6
|
+
open?: boolean
|
|
7
|
+
|
|
8
|
+
color?: string
|
|
9
|
+
neutral?: boolean
|
|
10
|
+
primary?: boolean
|
|
11
|
+
secondary?: boolean
|
|
12
|
+
accent?: boolean
|
|
13
|
+
info?: boolean
|
|
14
|
+
success?: boolean
|
|
15
|
+
warning?: boolean
|
|
16
|
+
error?: boolean
|
|
17
|
+
|
|
18
|
+
position?: 'top' | 'right' | 'bottom' | 'left'
|
|
19
|
+
top?: boolean
|
|
20
|
+
right?: boolean
|
|
21
|
+
bottom?: boolean
|
|
22
|
+
left?: boolean
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const props = defineProps<Props>()
|
|
26
|
+
const classes = computed(() => {
|
|
27
|
+
return {
|
|
28
|
+
'tooltip-open': props.open,
|
|
29
|
+
'tooltip-top': props.top || props.position === 'top',
|
|
30
|
+
'tooltip-bottom': props.bottom || props.position === 'bottom',
|
|
31
|
+
'tooltip-left': props.left || props.position === 'left',
|
|
32
|
+
'tooltip-right': props.right || props.position === 'right',
|
|
33
|
+
'tooltip-primary': props.primary || props.color === 'primary',
|
|
34
|
+
'tooltip-secondary': props.secondary || props.color === 'secondary',
|
|
35
|
+
'tooltip-neutral': props.neutral || props.color === 'neutral',
|
|
36
|
+
'tooltip-accent': props.accent || props.color === 'accent',
|
|
37
|
+
'tooltip-info': props.info || props.color === 'info',
|
|
38
|
+
'tooltip-success': props.success || props.color === 'success',
|
|
39
|
+
'tooltip-warning': props.warning || props.color === 'warning',
|
|
40
|
+
'tooltip-error': props.error || props.color === 'error',
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<div :data-tip="tip" class="tooltip" :class="classes">
|
|
47
|
+
<slot />
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
Menu,
|
|
4
|
+
MenuButton,
|
|
5
|
+
MenuItem,
|
|
6
|
+
MenuItems,
|
|
7
|
+
} from '@headlessui/vue'
|
|
8
|
+
|
|
9
|
+
const userNavigation = [
|
|
10
|
+
{ name: 'Your Profile', href: '/app/profile' },
|
|
11
|
+
{ name: 'Settings', href: '/app/settings' },
|
|
12
|
+
{ name: 'Home', href: '/' },
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
const user: any = useState('user')
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<Menu as="div" class="relative ml-3">
|
|
20
|
+
<MenuButton
|
|
21
|
+
class="flex items-center max-w-xs text-sm rounded-full bg-base-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
|
|
22
|
+
>
|
|
23
|
+
<span class="sr-only">Open user menu</span>
|
|
24
|
+
<img class="w-8 h-8 rounded-full" :src="user?.picture">
|
|
25
|
+
</MenuButton>
|
|
26
|
+
|
|
27
|
+
<transition
|
|
28
|
+
enter-active-class="transition duration-100 ease-out"
|
|
29
|
+
enter-from-class="transform scale-95 opacity-0"
|
|
30
|
+
enter-to-class="transform scale-100 opacity-100"
|
|
31
|
+
leave-active-class="transition duration-75 ease-in"
|
|
32
|
+
leave-from-class="transform scale-100 opacity-100"
|
|
33
|
+
leave-to-class="transform scale-95 opacity-0"
|
|
34
|
+
>
|
|
35
|
+
<MenuItems
|
|
36
|
+
class="absolute right-0 w-48 py-1 mt-2 origin-top-right rounded-md shadow-lg bg-base-100 ring-1 ring-black ring-opacity-5 focus:outline-none"
|
|
37
|
+
>
|
|
38
|
+
<MenuItem v-for="item in userNavigation" :key="item.name">
|
|
39
|
+
<NuxtLink
|
|
40
|
+
:to="item.href"
|
|
41
|
+
exact-active-class="bg-gray-100"
|
|
42
|
+
:class="[
|
|
43
|
+
'block px-4 py-2 text-sm text-gray-700',
|
|
44
|
+
]"
|
|
45
|
+
>
|
|
46
|
+
{{ item.name }}
|
|
47
|
+
</NuxtLink>
|
|
48
|
+
</MenuItem>
|
|
49
|
+
|
|
50
|
+
<MenuItem>
|
|
51
|
+
<a
|
|
52
|
+
href="/api/auth/logout"
|
|
53
|
+
exact-active-class="bg-gray-100"
|
|
54
|
+
:class="[
|
|
55
|
+
'block px-4 py-2 text-sm text-gray-700',
|
|
56
|
+
]"
|
|
57
|
+
>Sign out</a>
|
|
58
|
+
</MenuItem>
|
|
59
|
+
</MenuItems>
|
|
60
|
+
</transition>
|
|
61
|
+
</Menu>
|
|
62
|
+
</template>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export const people = [
|
|
2
|
+
{
|
|
3
|
+
id: 1,
|
|
4
|
+
name: 'Wade Cooper',
|
|
5
|
+
avatar:
|
|
6
|
+
'https://images.unsplash.com/photo-1491528323818-fdd1faba62cc?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
id: 2,
|
|
10
|
+
name: 'Arlene Mccoy',
|
|
11
|
+
avatar:
|
|
12
|
+
'https://images.unsplash.com/photo-1550525811-e5869dd03032?ixlib=rb-1.2.1&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
id: 3,
|
|
16
|
+
name: 'Devon Webb',
|
|
17
|
+
avatar:
|
|
18
|
+
'https://images.unsplash.com/photo-1500648767791-00dcc994a43e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2.25&w=256&h=256&q=80',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: 4,
|
|
22
|
+
name: 'Tom Cook',
|
|
23
|
+
avatar:
|
|
24
|
+
'https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 5,
|
|
28
|
+
name: 'Tanya Fox',
|
|
29
|
+
avatar:
|
|
30
|
+
'https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: 6,
|
|
34
|
+
name: 'Hellen Schmidt',
|
|
35
|
+
avatar:
|
|
36
|
+
'https://images.unsplash.com/photo-1487412720507-e7ab37603c6f?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 7,
|
|
40
|
+
name: 'Caroline Schultz',
|
|
41
|
+
avatar:
|
|
42
|
+
'https://images.unsplash.com/photo-1568409938619-12e139227838?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: 8,
|
|
46
|
+
name: 'Mason Heaney',
|
|
47
|
+
avatar:
|
|
48
|
+
'https://images.unsplash.com/photo-1531427186611-ecfd6d936c79?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 9,
|
|
52
|
+
name: 'Claudie Smitham',
|
|
53
|
+
avatar:
|
|
54
|
+
'https://images.unsplash.com/photo-1584486520270-19eca1efcce5?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: 10,
|
|
58
|
+
name: 'Emil Schaefer',
|
|
59
|
+
avatar:
|
|
60
|
+
'https://images.unsplash.com/photo-1561505457-3bcad021f8ee?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
|
|
61
|
+
},
|
|
62
|
+
]
|