daisy-ui-kit 1.0.8 → 2.1.0
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/components/Accordion.vue +16 -0
- package/components/Alert.vue +6 -8
- package/components/Artboard.vue +1 -1
- package/components/Avatar.vue +8 -23
- package/components/Badge.vue +5 -0
- package/components/BottomNav.vue +2 -4
- package/components/Button.vue +12 -4
- package/components/Card.vue +1 -1
- package/components/Chat.vue +27 -0
- package/components/ChatBubble.vue +34 -0
- package/components/ChatFooter.vue +5 -0
- package/components/ChatHeader.vue +5 -0
- package/components/ChatImage.vue +5 -0
- package/components/Checkbox.vue +12 -4
- package/components/Code.vue +2 -1
- package/components/CodeWrapper.vue +2 -2
- package/components/Collapse.vue +30 -8
- package/components/CountdownTimers.vue +8 -3
- package/components/Divider.vue +1 -1
- package/components/Drawer.vue +35 -11
- package/components/DrawerContent.vue +15 -0
- package/components/DrawerSide.vue +16 -0
- package/components/Dropdown.vue +56 -7
- package/components/DropdownContent.vue +3 -1
- package/components/DropdownTarget.vue +5 -0
- package/components/FileInput.vue +60 -0
- package/components/Flex.vue +3 -89
- package/components/FlexItem.vue +4 -90
- package/components/Footer.vue +1 -1
- package/components/FooterTitle.vue +1 -2
- package/components/Home/AlternatingFeatureSections.vue +10 -12
- package/components/Home/BitoviConsulting.vue +1 -1
- package/components/Home/BitoviOpenSource.vue +5 -5
- package/components/Home/Footer.vue +7 -6
- package/components/Home/GradientFeatureSections.vue +9 -9
- package/components/Home/Header.vue +10 -16
- package/components/Home/Hero.vue +4 -4
- package/components/Home/Testimonial.vue +1 -1
- package/components/{ButtonGroup.vue → Join.vue} +1 -1
- package/components/Link.vue +13 -6
- package/components/LoadingBall.vue +41 -0
- package/components/LoadingBars.vue +41 -0
- package/components/LoadingDots.vue +41 -0
- package/components/LoadingInfinity.vue +41 -0
- package/components/LoadingRing.vue +41 -0
- package/components/LoadingSpinner.vue +41 -0
- package/components/Mask.config.ts +2 -2
- package/components/Menu.vue +14 -6
- package/components/MenuItem.vue +11 -3
- package/components/MenuTitle.vue +1 -10
- package/components/Modal.vue +28 -7
- package/components/Progress.vue +1 -2
- package/components/Prose.vue +6 -8
- package/components/Radio.vue +14 -2
- package/components/RadioGroup.vue +5 -0
- package/components/Range.vue +14 -2
- package/components/RangeMeasure.vue +23 -11
- package/components/RangeMeasureTick.vue +19 -7
- package/components/Rating.vue +52 -36
- package/components/Select.vue +14 -14
- package/components/Step.vue +2 -2
- package/components/Tab.vue +3 -4
- package/components/TabContent.vue +1 -1
- package/components/Tabs.vue +2 -2
- package/components/Text.vue +4 -1
- package/components/TextArea.vue +13 -1
- package/components/TextInput.vue +5 -2
- package/components/Toggle.vue +13 -1
- package/components/content/Badge.ts +3 -0
- package/components/content/ColorBadge.vue +24 -0
- package/components/{DemoExample.vue → content/DemoExample.vue} +1 -1
- package/components/content/DemoExampleResponsive.vue +59 -0
- package/components/content/IframeRenderer.ts +53 -0
- package/components/content/Indent.vue +3 -0
- package/components/content/LocalLinks.vue +31 -0
- package/components/content/NotFound.vue +42 -0
- package/components/content/PageNext.vue +24 -0
- package/components/content/PagePrevious.vue +24 -0
- package/components/content/PrevNext.vue +40 -0
- package/components/content/ProseA.vue +19 -0
- package/components/content/ProseAlert.vue +11 -0
- package/components/content/ProseBlockquote.vue +5 -0
- package/components/content/ProseCode.vue +62 -0
- package/components/content/ProseCodeInline.vue +3 -0
- package/components/content/ProseEm.vue +5 -0
- package/components/content/ProseH1.vue +16 -0
- package/components/content/ProseH2.vue +16 -0
- package/components/content/ProseH3.vue +16 -0
- package/components/content/ProseH4.vue +16 -0
- package/components/content/ProseH5.vue +16 -0
- package/components/content/ProseH6.vue +16 -0
- package/components/content/ProseHr.vue +3 -0
- package/components/content/ProseImg.vue +34 -0
- package/components/content/ProseLi.vue +3 -0
- package/components/content/ProseOl.vue +5 -0
- package/components/content/ProseP.vue +3 -0
- package/components/content/ProseStrong.vue +5 -0
- package/components/content/ProseTable.vue +7 -0
- package/components/content/ProseTbody.vue +5 -0
- package/components/content/ProseTd.vue +5 -0
- package/components/content/ProseTh.vue +5 -0
- package/components/content/ProseThead.vue +5 -0
- package/components/content/ProseTr.vue +5 -0
- package/components/content/ProseUl.vue +5 -0
- package/components/content/Search.vue +160 -0
- package/components/content/Sidebar.vue +65 -0
- package/components/{SidebarMenuSection.vue → content/SidebarMenuSection.vue} +11 -6
- package/components/content/TableOfContents.vue +80 -0
- package/components/content/TypeBadge.vue +17 -0
- package/components/theme/Picker.vue +2 -2
- package/components/theme/Preview.vue +1 -1
- package/components/theme/theme-utils.ts +15 -4
- package/index.ts +105 -96
- package/package.json +33 -28
- package/components/-utils.ts +0 -41
- package/components/Button.config.ts +0 -26
- package/components/DemoElement.vue +0 -32
- package/components/DrawerLayout.vue +0 -37
- package/components/DrawerLayoutContent.vue +0 -19
- package/components/InputGroup.vue +0 -33
- package/components/MobileSidebar.vue +0 -88
- package/components/ModalWrapper.vue +0 -32
- package/components/Sidebar.vue +0 -89
- package/components/drawer-utils.ts +0 -10
- package/components/fixtures.ts +0 -62
- package/components/types.ts +0 -7
- package/nuxt.js +0 -14
- /package/components/{CodePreview.vue → content/CodePreview.vue} +0 -0
- /package/components/{SigninForm.vue → content/SigninForm.vue} +0 -0
- /package/components/{UserMenu.vue → content/UserMenu.vue} +0 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { onKeyStroke, useFocus, useMagicKeys } from '@vueuse/core'
|
|
3
|
+
import { useFuse } from '@vueuse/integrations/useFuse'
|
|
4
|
+
|
|
5
|
+
const search = ref('')
|
|
6
|
+
const { allLinks } = useNav()
|
|
7
|
+
const tags = allLinks.flatMap(item => item.tags)
|
|
8
|
+
const matchingTag = computed(() => {
|
|
9
|
+
if (search.value.length < 2)
|
|
10
|
+
return null
|
|
11
|
+
return tags.find(tag => tag.toLowerCase().startsWith(search.value.toLowerCase()))
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
// search results and popular results
|
|
15
|
+
const { results } = useFuse(search, allLinks, {
|
|
16
|
+
fuseOptions: { keys: ['label', 'tags'], includeScore: true, distance: 3 },
|
|
17
|
+
resultLimit: 12,
|
|
18
|
+
})
|
|
19
|
+
const defaultResults = [
|
|
20
|
+
'Button',
|
|
21
|
+
'Menu',
|
|
22
|
+
'Drawer',
|
|
23
|
+
'Tabs',
|
|
24
|
+
'Dropdown',
|
|
25
|
+
].map(label => allLinks.find(item => item.label === label)!).map(item => ({ item }))
|
|
26
|
+
const eitherResults = computed(() => {
|
|
27
|
+
if (results.value.length === 0)
|
|
28
|
+
return defaultResults
|
|
29
|
+
return results.value
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
// Open menu when searchbox is focused
|
|
33
|
+
const isMenuOpen = ref(false)
|
|
34
|
+
const searchbox = ref()
|
|
35
|
+
const { focused } = useFocus(searchbox)
|
|
36
|
+
watch(focused, (val) => {
|
|
37
|
+
if (val) {
|
|
38
|
+
isMenuOpen.value = val
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
setTimeout(() => {
|
|
42
|
+
isMenuOpen.value = val
|
|
43
|
+
}, 100)
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
// track the highlighted index in the list
|
|
48
|
+
const highlightedIndex = ref(0)
|
|
49
|
+
const highlightedItem = computed(() => {
|
|
50
|
+
return eitherResults.value[highlightedIndex.value].item
|
|
51
|
+
})
|
|
52
|
+
// when results change, reset the highlighted index
|
|
53
|
+
watch(eitherResults, () => {
|
|
54
|
+
highlightedIndex.value = 0
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
// meta|ctrl+k --> focus the searchbox
|
|
58
|
+
const { meta, control } = useMagicKeys()
|
|
59
|
+
onKeyStroke('k', () => {
|
|
60
|
+
if (meta.value || control.value)
|
|
61
|
+
focused.value = !focused.value
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
// escape --> close the list
|
|
65
|
+
onKeyStroke('Escape', () => {
|
|
66
|
+
if (focused.value) {
|
|
67
|
+
if (search.value === '') {
|
|
68
|
+
focused.value = false
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
search.value = ''
|
|
72
|
+
highlightedIndex.value = 0
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
// menu click --> close the list
|
|
78
|
+
function handleMenuClick() {
|
|
79
|
+
focused.value = false
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// enter --> navigate to highlighted item
|
|
83
|
+
function handleEnter() {
|
|
84
|
+
navigateTo(highlightedItem.value.to)
|
|
85
|
+
focused.value = false
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// arrow up --> highlighted previous item
|
|
89
|
+
function handleArrowUp() {
|
|
90
|
+
highlightedIndex.value = Math.max(highlightedIndex.value - 1, 0)
|
|
91
|
+
}
|
|
92
|
+
// arrow down --> highlight next item
|
|
93
|
+
function handleArrowDown() {
|
|
94
|
+
highlightedIndex.value = Math.min(highlightedIndex.value + 1, eitherResults.value.length - 1)
|
|
95
|
+
}
|
|
96
|
+
</script>
|
|
97
|
+
|
|
98
|
+
<template>
|
|
99
|
+
<Dropdown v-model:open="isMenuOpen" close-on-click-outside end>
|
|
100
|
+
<DropdownTarget class="block relative">
|
|
101
|
+
<Flex class="absolute z-10 top-0 bottom-0 pointer-events-none items-center pl-2">
|
|
102
|
+
<Icon name="heroicons-solid:search" class="w-5 h-5 opacity-60" aria-hidden="true" />
|
|
103
|
+
</Flex>
|
|
104
|
+
<TextInput
|
|
105
|
+
id="searchbox"
|
|
106
|
+
ref="searchbox"
|
|
107
|
+
v-model="search"
|
|
108
|
+
placeholder="Search"
|
|
109
|
+
name="search"
|
|
110
|
+
bordered
|
|
111
|
+
class="join-item max-w-[150px] md:max-w-none rounded-xl pl-8"
|
|
112
|
+
onfocus="this.select()"
|
|
113
|
+
@keypress.enter="handleEnter"
|
|
114
|
+
@keydown.arrow-up="handleArrowUp"
|
|
115
|
+
@keydown.arrow-down="handleArrowDown"
|
|
116
|
+
/>
|
|
117
|
+
<Flex
|
|
118
|
+
v-if="!focused" row
|
|
119
|
+
class="hidden lg:flex items-center flex-nowrap absolute top-0 bottom-0 right-0 pr-2 pointer-events-none opacity-60"
|
|
120
|
+
>
|
|
121
|
+
<Kbd xs>cmd</Kbd>
|
|
122
|
+
<Text xs class="relative bottom-px">
|
|
123
|
+
+
|
|
124
|
+
</Text>
|
|
125
|
+
<Kbd xs>k</Kbd>
|
|
126
|
+
</Flex>
|
|
127
|
+
</DropdownTarget>
|
|
128
|
+
<DropdownContent class="bg-base-100 shadow-xl rounded-xl border border-base-300 mt-2 w-full overflow-y-auto max-h-[75vh]" @click="handleMenuClick">
|
|
129
|
+
<Menu>
|
|
130
|
+
<MenuTitle v-if="!search.length">
|
|
131
|
+
Popular Components
|
|
132
|
+
</MenuTitle>
|
|
133
|
+
<MenuTitle v-if="search.length && results.length">
|
|
134
|
+
Search Results
|
|
135
|
+
</MenuTitle>
|
|
136
|
+
|
|
137
|
+
<MenuItem v-if="search.length && !results.length">
|
|
138
|
+
<span>No Results Found</span>
|
|
139
|
+
</MenuItem>
|
|
140
|
+
<template v-else-if="search.length">
|
|
141
|
+
<MenuItem v-for="(result, index) in results" :key="result.item.label" :active="index === highlightedIndex">
|
|
142
|
+
<NuxtLink :to="result.item.to">
|
|
143
|
+
{{ result.item.label }}
|
|
144
|
+
<Badge v-if="matchingTag && result.item.tags.includes(matchingTag)" warning sm>
|
|
145
|
+
{{ matchingTag }}
|
|
146
|
+
</Badge>
|
|
147
|
+
</NuxtLink>
|
|
148
|
+
</MenuItem>
|
|
149
|
+
</template>
|
|
150
|
+
<template v-else>
|
|
151
|
+
<MenuItem v-for="(result, index) in defaultResults" :key="result.item.label" :active="index === highlightedIndex">
|
|
152
|
+
<NuxtLink :to="result.item.to">
|
|
153
|
+
{{ result.item.label }}
|
|
154
|
+
</NuxtLink>
|
|
155
|
+
</MenuItem>
|
|
156
|
+
</template>
|
|
157
|
+
</Menu>
|
|
158
|
+
</DropdownContent>
|
|
159
|
+
</Dropdown>
|
|
160
|
+
</template>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const route = useRoute()
|
|
3
|
+
const { docsLinks, actions, dataDisplay, dataInput, layout, navigation, mockup } = useNav()
|
|
4
|
+
|
|
5
|
+
const drawerState = createDrawerState('docs')
|
|
6
|
+
|
|
7
|
+
watch(() => route.path, () => {
|
|
8
|
+
drawerState.isDrawerOpen = false
|
|
9
|
+
})
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<DrawerSide name="docs" class="border-r border-r-base-300/30 z-50">
|
|
14
|
+
<!-- Sidebar component, swap this element with another sidebar if you like -->
|
|
15
|
+
<div class="relative pt-4 menu w-80 bg-base-100 text-base-content">
|
|
16
|
+
<NuxtLink to="/" class="fixed">
|
|
17
|
+
<Logo class="ml-8 text-4xl text-base-content" />
|
|
18
|
+
</NuxtLink>
|
|
19
|
+
|
|
20
|
+
<div class="pb-12 pl-2 mt-12 overflow-y-auto">
|
|
21
|
+
<SidebarMenuSection
|
|
22
|
+
:links="docsLinks"
|
|
23
|
+
no-divider
|
|
24
|
+
class="pt-4"
|
|
25
|
+
/>
|
|
26
|
+
<SidebarMenuSection
|
|
27
|
+
title="Actions"
|
|
28
|
+
title-icon="mdi:cursor-default-click"
|
|
29
|
+
title-icon-classes="text-fuchsia-600 w-5 h-5"
|
|
30
|
+
:links="actions"
|
|
31
|
+
/>
|
|
32
|
+
<SidebarMenuSection
|
|
33
|
+
title="Data Display"
|
|
34
|
+
title-icon="ph:app-window-bold"
|
|
35
|
+
title-icon-classes="text-teal-600 w-5 h-5"
|
|
36
|
+
:links="dataDisplay"
|
|
37
|
+
/>
|
|
38
|
+
<SidebarMenuSection
|
|
39
|
+
title="Data Input"
|
|
40
|
+
title-icon="material-symbols:edit-square-outline"
|
|
41
|
+
title-icon-classes="text-red-600 w-5 h-5"
|
|
42
|
+
:links="dataInput"
|
|
43
|
+
/>
|
|
44
|
+
<SidebarMenuSection
|
|
45
|
+
title="Layout"
|
|
46
|
+
title-icon="ic:round-grid-view"
|
|
47
|
+
title-icon-classes="text-blue-600 w-5 h-5"
|
|
48
|
+
:links="layout"
|
|
49
|
+
/>
|
|
50
|
+
<SidebarMenuSection
|
|
51
|
+
title="Navigation"
|
|
52
|
+
title-icon="mdi:link-variant"
|
|
53
|
+
title-icon-classes="text-cyan-600 w-5 h-5"
|
|
54
|
+
:links="navigation"
|
|
55
|
+
/>
|
|
56
|
+
<SidebarMenuSection
|
|
57
|
+
title="Mockup"
|
|
58
|
+
title-icon="icon-park-outline:iphone"
|
|
59
|
+
title-icon-classes="text-lime-600 w-5 h-5"
|
|
60
|
+
:links="mockup"
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</DrawerSide>
|
|
65
|
+
</template>
|
|
@@ -4,16 +4,22 @@ interface Link {
|
|
|
4
4
|
to: string
|
|
5
5
|
pending: boolean
|
|
6
6
|
pendingDocs: boolean
|
|
7
|
+
icon?: string
|
|
7
8
|
}
|
|
8
9
|
defineProps<{
|
|
9
|
-
title
|
|
10
|
+
title?: string
|
|
11
|
+
titleIcon?: string
|
|
12
|
+
titleIconClasses?: string
|
|
10
13
|
links: Link[]
|
|
14
|
+
noDivider?: boolean
|
|
11
15
|
}>()
|
|
12
16
|
</script>
|
|
13
17
|
|
|
14
18
|
<template>
|
|
15
|
-
<Menu
|
|
16
|
-
<
|
|
19
|
+
<Menu>
|
|
20
|
+
<li v-if="!noDivider" />
|
|
21
|
+
<MenuTitle v-if="titleIcon || title" class="flex flex-row items-center gap-3">
|
|
22
|
+
<Icon v-if="titleIcon" :name="titleIcon as string" :class="titleIconClasses as string" />
|
|
17
23
|
{{ title }}
|
|
18
24
|
</MenuTitle>
|
|
19
25
|
|
|
@@ -23,11 +29,10 @@ defineProps<{
|
|
|
23
29
|
:class="{ 'opacity-30': link.pending }"
|
|
24
30
|
>
|
|
25
31
|
<NuxtLink :to="link.to" exact-active-class="active">
|
|
32
|
+
<Icon v-if="link.icon" :name="link.icon" class="w-5 h-5 mr-1" />
|
|
26
33
|
{{ link.label }}
|
|
27
|
-
<Icon v-if="link.pendingDocs" name="feather
|
|
34
|
+
<Icon v-if="link.pendingDocs" name="feather:file-text" class="ml-2" />
|
|
28
35
|
</NuxtLink>
|
|
29
36
|
</MenuItem>
|
|
30
37
|
</Menu>
|
|
31
|
-
|
|
32
|
-
<hr class="opacity-10">
|
|
33
38
|
</template>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const { toc, page } = useContent()
|
|
3
|
+
const pageRoute = useRoute()
|
|
4
|
+
|
|
5
|
+
function checkActive(hash: string) {
|
|
6
|
+
return pageRoute.hash === hash ? 'active' : null
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function toTop() {
|
|
10
|
+
window.scrollTo({
|
|
11
|
+
top: 0,
|
|
12
|
+
behavior: 'smooth',
|
|
13
|
+
})
|
|
14
|
+
setTimeout(() => {
|
|
15
|
+
window.location.hash = ''
|
|
16
|
+
}, 600)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toBottom() {
|
|
20
|
+
window.scrollTo({
|
|
21
|
+
top: document.body.scrollHeight,
|
|
22
|
+
behavior: 'smooth',
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<Flex col>
|
|
29
|
+
<Menu v-if="toc?.links?.length" class="menu-sm md:menu-xs xl:menu-sm">
|
|
30
|
+
<MenuTitle>Table of Contents</MenuTitle>
|
|
31
|
+
<MenuItem>
|
|
32
|
+
<NuxtLink href="#" custom>
|
|
33
|
+
<template #default="{ route }">
|
|
34
|
+
<a
|
|
35
|
+
class="flex flex-row items-center justify-between font-semibold bg-neutral/30"
|
|
36
|
+
:class="checkActive(route.hash)"
|
|
37
|
+
@click="toTop"
|
|
38
|
+
>
|
|
39
|
+
{{ page.title }}
|
|
40
|
+
<Icon name="feather:arrow-up" class="text-base" />
|
|
41
|
+
</a>
|
|
42
|
+
</template>
|
|
43
|
+
</NuxtLink>
|
|
44
|
+
</MenuItem>
|
|
45
|
+
<Menu>
|
|
46
|
+
<MenuItem v-for="item in toc.links" :key="item.id">
|
|
47
|
+
<NuxtLink :href="`#${item.id}`" custom>
|
|
48
|
+
<template #default="{ route, navigate }">
|
|
49
|
+
<a :class="checkActive(route.hash)" @click="navigate">
|
|
50
|
+
{{ item.text }}
|
|
51
|
+
</a>
|
|
52
|
+
</template>
|
|
53
|
+
</NuxtLink>
|
|
54
|
+
<Menu v-if="item.children?.length">
|
|
55
|
+
<MenuItem v-for="child in item.children" :key="child.id">
|
|
56
|
+
<NuxtLink :href="`#${child.id}`" custom>
|
|
57
|
+
<template #default="{ route, navigate }">
|
|
58
|
+
<a :class="checkActive(route.hash)" @click="navigate">
|
|
59
|
+
{{ child.text }}
|
|
60
|
+
</a>
|
|
61
|
+
</template>
|
|
62
|
+
</NuxtLink>
|
|
63
|
+
</MenuItem>
|
|
64
|
+
</Menu>
|
|
65
|
+
</MenuItem>
|
|
66
|
+
<MenuItem>
|
|
67
|
+
<a
|
|
68
|
+
class="flex flex-row items-center justify-between hover:bg-accent/25 mt-6"
|
|
69
|
+
@click="toBottom"
|
|
70
|
+
>
|
|
71
|
+
scroll to bottom
|
|
72
|
+
<Icon name="feather:arrow-down" class="text-base" />
|
|
73
|
+
|
|
74
|
+
</a>
|
|
75
|
+
</MenuItem>
|
|
76
|
+
</Menu>
|
|
77
|
+
</Menu>
|
|
78
|
+
<!-- <pre class="text-xs">{{ page }}</pre> -->
|
|
79
|
+
</Flex>
|
|
80
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = defineProps<{
|
|
3
|
+
text: string
|
|
4
|
+
}>()
|
|
5
|
+
|
|
6
|
+
const color = computed(() => {
|
|
7
|
+
if (props.text === 'boolean')
|
|
8
|
+
return 'info'
|
|
9
|
+
return 'warning'
|
|
10
|
+
})
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<Badge :color="color">
|
|
15
|
+
{{ text }}
|
|
16
|
+
</Badge>
|
|
17
|
+
</template>
|
|
@@ -18,8 +18,8 @@ onClickOutside(container, () => popper.hide())
|
|
|
18
18
|
|
|
19
19
|
<template>
|
|
20
20
|
<div ref="container">
|
|
21
|
-
<Button ref="theButton"
|
|
22
|
-
<Icon name="feather
|
|
21
|
+
<Button ref="theButton" square class="md:btn-ghost" @click="popper.toggle">
|
|
22
|
+
<Icon name="feather:sun" class="text-base w-5 h-5" />
|
|
23
23
|
</Button>
|
|
24
24
|
|
|
25
25
|
<div ref="thePopup">
|
|
@@ -26,14 +26,18 @@ export function hexToHSL(H: string) {
|
|
|
26
26
|
let s = 0
|
|
27
27
|
let l = 0
|
|
28
28
|
|
|
29
|
-
if (delta == 0)
|
|
30
|
-
|
|
31
|
-
else if (cmax ==
|
|
29
|
+
if (delta == 0)
|
|
30
|
+
h = 0
|
|
31
|
+
else if (cmax == r)
|
|
32
|
+
h = ((g - b) / delta) % 6
|
|
33
|
+
else if (cmax == g)
|
|
34
|
+
h = (b - r) / delta + 2
|
|
32
35
|
else h = (r - g) / delta + 4
|
|
33
36
|
|
|
34
37
|
h = Math.round(h * 60)
|
|
35
38
|
|
|
36
|
-
if (h < 0)
|
|
39
|
+
if (h < 0)
|
|
40
|
+
h += 360
|
|
37
41
|
|
|
38
42
|
l = (cmax + cmin) / 2
|
|
39
43
|
s = delta == 0 ? 0 : delta / (1 - Math.abs(2 * l - 1))
|
|
@@ -106,6 +110,13 @@ export const defaultThemes: Theme[] = [
|
|
|
106
110
|
{ name: 'luxury', isDefault: true, config: {} },
|
|
107
111
|
{ name: 'dracula', isDefault: true, config: {} },
|
|
108
112
|
{ name: 'cmyk', isDefault: true, config: {} },
|
|
113
|
+
{ name: 'autumn', isDefault: true, config: {} },
|
|
114
|
+
{ name: 'business', isDefault: true, config: {} },
|
|
115
|
+
{ name: 'acid', isDefault: true, config: {} },
|
|
116
|
+
{ name: 'lemonade', isDefault: true, config: {} },
|
|
117
|
+
{ name: 'night', isDefault: true, config: {} },
|
|
118
|
+
{ name: 'coffee', isDefault: true, config: {} },
|
|
119
|
+
{ name: 'winter', isDefault: true, config: {} },
|
|
109
120
|
]
|
|
110
121
|
|
|
111
122
|
export function hslToHex([h, s, l]: number[]) {
|
package/index.ts
CHANGED
|
@@ -1,96 +1,105 @@
|
|
|
1
|
-
export { default as
|
|
2
|
-
export { default as
|
|
3
|
-
export { default as
|
|
4
|
-
export { default as
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as
|
|
7
|
-
export { default as
|
|
8
|
-
export { default as
|
|
9
|
-
export { default as
|
|
10
|
-
export { default as
|
|
11
|
-
export { default as
|
|
12
|
-
export { default as
|
|
13
|
-
export { default as
|
|
14
|
-
export { default as
|
|
15
|
-
export { default as
|
|
16
|
-
export { default as
|
|
17
|
-
|
|
18
|
-
export { default as
|
|
19
|
-
export { default as
|
|
20
|
-
export { default as
|
|
21
|
-
export { default as
|
|
22
|
-
export { default as
|
|
23
|
-
export { default as
|
|
24
|
-
export { default as
|
|
25
|
-
export { default as
|
|
26
|
-
export { default as
|
|
27
|
-
export { default as
|
|
28
|
-
export { default as
|
|
29
|
-
export { default as
|
|
30
|
-
export { default as
|
|
31
|
-
export { default as
|
|
32
|
-
export { default as
|
|
33
|
-
export { default as
|
|
34
|
-
export { default as
|
|
35
|
-
export { default as
|
|
36
|
-
export { default as
|
|
37
|
-
export { default as
|
|
38
|
-
export { default as
|
|
39
|
-
export { default as
|
|
40
|
-
export { default as
|
|
41
|
-
export { default as
|
|
42
|
-
export { default as
|
|
43
|
-
export { default as
|
|
44
|
-
export { default as
|
|
45
|
-
export { default as
|
|
46
|
-
export { default as
|
|
47
|
-
export { default as
|
|
48
|
-
export { default as
|
|
49
|
-
export { default as
|
|
50
|
-
export { default as
|
|
51
|
-
export { default as
|
|
52
|
-
export { default as
|
|
53
|
-
export { default as
|
|
54
|
-
export { default as
|
|
55
|
-
export { default as
|
|
56
|
-
export { default as
|
|
57
|
-
export { default as
|
|
58
|
-
export { default as
|
|
59
|
-
export { default as
|
|
60
|
-
export { default as
|
|
61
|
-
export { default as
|
|
62
|
-
export { default as
|
|
63
|
-
export { default as
|
|
64
|
-
export { default as
|
|
65
|
-
export { default as
|
|
66
|
-
export { default as
|
|
67
|
-
export { default as
|
|
68
|
-
export { default as
|
|
69
|
-
export { default as
|
|
70
|
-
export { default as
|
|
71
|
-
export { default as
|
|
72
|
-
export { default as
|
|
73
|
-
export { default as
|
|
74
|
-
export { default as
|
|
75
|
-
export { default as
|
|
76
|
-
export { default as
|
|
77
|
-
export { default as
|
|
78
|
-
export { default as
|
|
79
|
-
export { default as
|
|
80
|
-
export { default as
|
|
81
|
-
export { default as
|
|
82
|
-
export { default as
|
|
83
|
-
export { default as
|
|
84
|
-
export { default as
|
|
85
|
-
export { default as
|
|
86
|
-
export { default as
|
|
87
|
-
export { default as
|
|
88
|
-
export { default as
|
|
89
|
-
export { default as
|
|
90
|
-
export { default as
|
|
91
|
-
export { default as
|
|
92
|
-
export { default as
|
|
93
|
-
export { default as
|
|
94
|
-
export { default as
|
|
95
|
-
export { default as
|
|
96
|
-
export { default as
|
|
1
|
+
export { default as Accordion } from './components/Accordion.vue'
|
|
2
|
+
export { default as Alert } from './components/Alert.vue'
|
|
3
|
+
export { default as Artboard } from './components/Artboard.vue'
|
|
4
|
+
export { default as Avatar } from './components/Avatar.vue'
|
|
5
|
+
export { default as AvatarGroup } from './components/AvatarGroup.vue'
|
|
6
|
+
export { default as Badge } from './components/Badge.vue'
|
|
7
|
+
export { default as BottomNav } from './components/BottomNav.vue'
|
|
8
|
+
export { default as Breadcrumbs } from './components/Breadcrumbs.vue'
|
|
9
|
+
export { default as Button } from './components/Button.vue'
|
|
10
|
+
export { default as Card } from './components/Card.vue'
|
|
11
|
+
export { default as CardActions } from './components/CardActions.vue'
|
|
12
|
+
export { default as CardBody } from './components/CardBody.vue'
|
|
13
|
+
export { default as CardTitle } from './components/CardTitle.vue'
|
|
14
|
+
export { default as Carousel } from './components/Carousel.vue'
|
|
15
|
+
export { default as CarouselItem } from './components/CarouselItem.vue'
|
|
16
|
+
export { default as Chat } from './components/Chat.vue'
|
|
17
|
+
export { default as ChatBubble } from './components/ChatBubble.vue'
|
|
18
|
+
export { default as ChatFooter } from './components/ChatFooter.vue'
|
|
19
|
+
export { default as ChatHeader } from './components/ChatHeader.vue'
|
|
20
|
+
export { default as ChatImage } from './components/ChatImage.vue'
|
|
21
|
+
export { default as Checkbox } from './components/Checkbox.vue'
|
|
22
|
+
export { default as Code } from './components/Code.vue'
|
|
23
|
+
export { default as CodeWrapper } from './components/CodeWrapper.vue'
|
|
24
|
+
export { default as Collapse } from './components/Collapse.vue'
|
|
25
|
+
export { default as CollapseContent } from './components/CollapseContent.vue'
|
|
26
|
+
export { default as CollapseTitle } from './components/CollapseTitle.vue'
|
|
27
|
+
export { default as Countdown } from './components/Countdown.vue'
|
|
28
|
+
export { default as CountdownTimers } from './components/CountdownTimers.vue'
|
|
29
|
+
export { default as Counter } from './components/Counter.vue'
|
|
30
|
+
export { default as Crumb } from './components/Crumb.vue'
|
|
31
|
+
export { default as Divider } from './components/Divider.vue'
|
|
32
|
+
export { default as Drawer } from './components/Drawer.vue'
|
|
33
|
+
export { default as DrawerContent } from './components/DrawerContent.vue'
|
|
34
|
+
export { default as DrawerSide } from './components/DrawerSide.vue'
|
|
35
|
+
export { default as Dropdown } from './components/Dropdown.vue'
|
|
36
|
+
export { default as DropdownContent } from './components/DropdownContent.vue'
|
|
37
|
+
export { default as DropdownTarget } from './components/DropdownTarget.vue'
|
|
38
|
+
export { default as FileInput } from './components/FileInput.vue'
|
|
39
|
+
export { default as Flex } from './components/Flex.vue'
|
|
40
|
+
export { default as FlexItem } from './components/FlexItem.vue'
|
|
41
|
+
export { default as Footer } from './components/Footer.vue'
|
|
42
|
+
export { default as FooterTitle } from './components/FooterTitle.vue'
|
|
43
|
+
export { default as FormControl } from './components/FormControl.vue'
|
|
44
|
+
export { default as Hero } from './components/Hero.vue'
|
|
45
|
+
export { default as HeroContent } from './components/HeroContent.vue'
|
|
46
|
+
export { default as HeroOverlay } from './components/HeroOverlay.vue'
|
|
47
|
+
export { default as Indicator } from './components/Indicator.vue'
|
|
48
|
+
export { default as IndicatorItem } from './components/IndicatorItem.vue'
|
|
49
|
+
export { default as Join } from './components/Join.vue'
|
|
50
|
+
export { default as Kbd } from './components/Kbd.vue'
|
|
51
|
+
export { default as Label } from './components/Label.vue'
|
|
52
|
+
export { default as LabelText } from './components/LabelText.vue'
|
|
53
|
+
export { default as LabelTextAlt } from './components/LabelTextAlt.vue'
|
|
54
|
+
export { default as Link } from './components/Link.vue'
|
|
55
|
+
export { default as LoadingBall } from './components/LoadingBall.vue'
|
|
56
|
+
export { default as LoadingBars } from './components/LoadingBars.vue'
|
|
57
|
+
export { default as LoadingDots } from './components/LoadingDots.vue'
|
|
58
|
+
export { default as LoadingInfinity } from './components/LoadingInfinity.vue'
|
|
59
|
+
export { default as LoadingRing } from './components/LoadingRing.vue'
|
|
60
|
+
export { default as LoadingSpinner } from './components/LoadingSpinner.vue'
|
|
61
|
+
export { default as Mask } from './components/Mask.vue'
|
|
62
|
+
export { default as Menu } from './components/Menu.vue'
|
|
63
|
+
export { default as MenuItem } from './components/MenuItem.vue'
|
|
64
|
+
export { default as MenuTitle } from './components/MenuTitle.vue'
|
|
65
|
+
export { default as MockupCode } from './components/MockupCode.vue'
|
|
66
|
+
export { default as Modal } from './components/Modal.vue'
|
|
67
|
+
export { default as ModalAction } from './components/ModalAction.vue'
|
|
68
|
+
export { default as ModalBox } from './components/ModalBox.vue'
|
|
69
|
+
export { default as Navbar } from './components/Navbar.vue'
|
|
70
|
+
export { default as NavbarCenter } from './components/NavbarCenter.vue'
|
|
71
|
+
export { default as NavbarEnd } from './components/NavbarEnd.vue'
|
|
72
|
+
export { default as NavbarStart } from './components/NavbarStart.vue'
|
|
73
|
+
export { default as NavButton } from './components/NavButton.vue'
|
|
74
|
+
export { default as Phone } from './components/Phone.vue'
|
|
75
|
+
export { default as Progress } from './components/Progress.vue'
|
|
76
|
+
export { default as Prose } from './components/Prose.vue'
|
|
77
|
+
export { default as RadialProgress } from './components/RadialProgress.vue'
|
|
78
|
+
export { default as Radio } from './components/Radio.vue'
|
|
79
|
+
export { default as RadioGroup } from './components/RadioGroup.vue'
|
|
80
|
+
export { default as Range } from './components/Range.vue'
|
|
81
|
+
export { default as RangeMeasure } from './components/RangeMeasure.vue'
|
|
82
|
+
export { default as Rating } from './components/Rating.vue'
|
|
83
|
+
export { default as Select } from './components/Select.vue'
|
|
84
|
+
export { default as Stack } from './components/Stack.vue'
|
|
85
|
+
export { default as Stat } from './components/Stat.vue'
|
|
86
|
+
export { default as StatActions } from './components/StatActions.vue'
|
|
87
|
+
export { default as StatDesc } from './components/StatDesc.vue'
|
|
88
|
+
export { default as StatFigure } from './components/StatFigure.vue'
|
|
89
|
+
export { default as Stats } from './components/Stats.vue'
|
|
90
|
+
export { default as StatTitle } from './components/StatTitle.vue'
|
|
91
|
+
export { default as StatValue } from './components/StatValue.vue'
|
|
92
|
+
export { default as Step } from './components/Step.vue'
|
|
93
|
+
export { default as Steps } from './components/Steps.vue'
|
|
94
|
+
export { default as Swap } from './components/Swap.vue'
|
|
95
|
+
export { default as Tab } from './components/Tab.vue'
|
|
96
|
+
export { default as TabContent } from './components/TabContent.vue'
|
|
97
|
+
export { default as Tabs } from './components/Tabs.vue'
|
|
98
|
+
export { default as TabsManager } from './components/TabsManager.vue'
|
|
99
|
+
export { default as Text } from './components/Text.vue'
|
|
100
|
+
export { default as TextArea } from './components/TextArea.vue'
|
|
101
|
+
export { default as TextInput } from './components/TextInput.vue'
|
|
102
|
+
export { default as Toast } from './components/Toast.vue'
|
|
103
|
+
export { default as Toggle } from './components/Toggle.vue'
|
|
104
|
+
export { default as Tooltip } from './components/Tooltip.vue'
|
|
105
|
+
export { default as Window } from './components/Window.vue'
|