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
package/components/Home/Hero.vue
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<div class="absolute inset-0">
|
|
8
8
|
<img
|
|
9
9
|
class="object-cover w-full h-full"
|
|
10
|
-
src="/img/unsplash-devs-sm.
|
|
10
|
+
src="/img/unsplash-devs-sm.jpg"
|
|
11
11
|
alt="People working on laptops"
|
|
12
12
|
>
|
|
13
13
|
<div
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
</Text>
|
|
33
33
|
|
|
34
34
|
<div class="max-w-sm mx-auto mt-10 sm:max-w-none sm:flex sm:justify-center">
|
|
35
|
-
<Flex
|
|
36
|
-
<NuxtLink to="/
|
|
35
|
+
<Flex class="gap-2 sm:space-y-0 sm:mx-auto sm:inline-grid sm:grid-cols-2 items-center justify-center">
|
|
36
|
+
<NuxtLink to="/docs/button" class="block">
|
|
37
37
|
<Button class="w-full border-0 bg-base-100 text-base-content hover:bg-base-200">
|
|
38
38
|
Learn more
|
|
39
39
|
</Button>
|
|
40
40
|
</NuxtLink>
|
|
41
41
|
|
|
42
|
-
<NuxtLink to="/install" class="block">
|
|
42
|
+
<NuxtLink to="/docs/install" class="block">
|
|
43
43
|
<Button primary class="w-full">
|
|
44
44
|
Start Building
|
|
45
45
|
</Button>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
</Text>
|
|
9
9
|
</div>
|
|
10
10
|
<footer class="mt-3">
|
|
11
|
-
<Flex
|
|
11
|
+
<Flex class="space-x-3 items-center">
|
|
12
12
|
<Avatar circle class="flex-shrink-0 w-8 h-8">
|
|
13
13
|
<img
|
|
14
14
|
src="https://images.unsplash.com/photo-1509783236416-c9ad59bae472?ixlib=rb-=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=8&w=1024&h=1024&q=80"
|
package/components/Link.vue
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed, withDefaults } from 'vue'
|
|
3
|
-
|
|
4
2
|
interface Props {
|
|
5
3
|
is?: string
|
|
6
|
-
|
|
4
|
+
hover?: boolean
|
|
5
|
+
|
|
6
|
+
color?: 'neutral' | 'primary' | 'secondary' | 'accent' | 'success' | 'info' | 'warning' | 'error'
|
|
7
|
+
neutral?: boolean
|
|
7
8
|
primary?: boolean
|
|
8
9
|
secondary?: boolean
|
|
9
10
|
accent?: boolean
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
success?: boolean
|
|
12
|
+
info?: boolean
|
|
13
|
+
warning?: boolean
|
|
14
|
+
error?: boolean
|
|
12
15
|
}
|
|
13
16
|
const props = withDefaults(defineProps<Props>(), {
|
|
14
17
|
is: 'a',
|
|
@@ -16,10 +19,14 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
16
19
|
|
|
17
20
|
const classes = computed(() => {
|
|
18
21
|
return {
|
|
22
|
+
'link-neutral': props.neutral || props.color === 'neutral',
|
|
19
23
|
'link-primary': props.primary || props.color === 'primary',
|
|
20
24
|
'link-secondary': props.secondary || props.color === 'secondary',
|
|
21
25
|
'link-accent': props.accent || props.color === 'accent',
|
|
22
|
-
'link-
|
|
26
|
+
'link-success': props.success || props.color === 'success',
|
|
27
|
+
'link-info': props.info || props.color === 'info',
|
|
28
|
+
'link-warning': props.warning || props.color === 'warning',
|
|
29
|
+
'link-error': props.error || props.color === 'error',
|
|
23
30
|
'link-hover': props.hover,
|
|
24
31
|
}
|
|
25
32
|
})
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = defineProps<{
|
|
3
|
+
color?: string
|
|
4
|
+
neutral?: boolean
|
|
5
|
+
primary?: boolean
|
|
6
|
+
secondary?: boolean
|
|
7
|
+
accent?: boolean
|
|
8
|
+
info?: boolean
|
|
9
|
+
success?: boolean
|
|
10
|
+
warning?: boolean
|
|
11
|
+
error?: boolean
|
|
12
|
+
|
|
13
|
+
size?: 'lg' | 'md' | 'sm' | 'xs'
|
|
14
|
+
lg?: boolean
|
|
15
|
+
md?: boolean
|
|
16
|
+
sm?: boolean
|
|
17
|
+
xs?: boolean
|
|
18
|
+
}>()
|
|
19
|
+
|
|
20
|
+
const classes = computed(() => {
|
|
21
|
+
return {
|
|
22
|
+
'text-primary': props.primary || props.color === 'primary',
|
|
23
|
+
'text-secondary': props.secondary || props.color === 'secondary',
|
|
24
|
+
'text-neutral': props.neutral || props.color === 'neutral',
|
|
25
|
+
'text-accent': props.accent || props.color === 'accent',
|
|
26
|
+
'text-info': props.info || props.color === 'info',
|
|
27
|
+
'text-success': props.success || props.color === 'success',
|
|
28
|
+
'text-warning': props.warning || props.color === 'warning',
|
|
29
|
+
'text-error': props.error || props.color === 'error',
|
|
30
|
+
|
|
31
|
+
'loading-lg': props.lg || props.size === 'lg',
|
|
32
|
+
'loading-md': props.md || props.size === 'md',
|
|
33
|
+
'loading-sm': props.sm || props.size === 'sm',
|
|
34
|
+
'loading-xs': props.xs || props.size === 'xs',
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<span class="loading loading-ball" :class="classes" />
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = defineProps<{
|
|
3
|
+
color?: string
|
|
4
|
+
neutral?: boolean
|
|
5
|
+
primary?: boolean
|
|
6
|
+
secondary?: boolean
|
|
7
|
+
accent?: boolean
|
|
8
|
+
info?: boolean
|
|
9
|
+
success?: boolean
|
|
10
|
+
warning?: boolean
|
|
11
|
+
error?: boolean
|
|
12
|
+
|
|
13
|
+
size?: 'lg' | 'md' | 'sm' | 'xs'
|
|
14
|
+
lg?: boolean
|
|
15
|
+
md?: boolean
|
|
16
|
+
sm?: boolean
|
|
17
|
+
xs?: boolean
|
|
18
|
+
}>()
|
|
19
|
+
|
|
20
|
+
const classes = computed(() => {
|
|
21
|
+
return {
|
|
22
|
+
'text-primary': props.primary || props.color === 'primary',
|
|
23
|
+
'text-secondary': props.secondary || props.color === 'secondary',
|
|
24
|
+
'text-neutral': props.neutral || props.color === 'neutral',
|
|
25
|
+
'text-accent': props.accent || props.color === 'accent',
|
|
26
|
+
'text-info': props.info || props.color === 'info',
|
|
27
|
+
'text-success': props.success || props.color === 'success',
|
|
28
|
+
'text-warning': props.warning || props.color === 'warning',
|
|
29
|
+
'text-error': props.error || props.color === 'error',
|
|
30
|
+
|
|
31
|
+
'loading-lg': props.lg || props.size === 'lg',
|
|
32
|
+
'loading-md': props.md || props.size === 'md',
|
|
33
|
+
'loading-sm': props.sm || props.size === 'sm',
|
|
34
|
+
'loading-xs': props.xs || props.size === 'xs',
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<span class="loading loading-bars" :class="classes" />
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = defineProps<{
|
|
3
|
+
color?: string
|
|
4
|
+
neutral?: boolean
|
|
5
|
+
primary?: boolean
|
|
6
|
+
secondary?: boolean
|
|
7
|
+
accent?: boolean
|
|
8
|
+
info?: boolean
|
|
9
|
+
success?: boolean
|
|
10
|
+
warning?: boolean
|
|
11
|
+
error?: boolean
|
|
12
|
+
|
|
13
|
+
size?: 'lg' | 'md' | 'sm' | 'xs'
|
|
14
|
+
lg?: boolean
|
|
15
|
+
md?: boolean
|
|
16
|
+
sm?: boolean
|
|
17
|
+
xs?: boolean
|
|
18
|
+
}>()
|
|
19
|
+
|
|
20
|
+
const classes = computed(() => {
|
|
21
|
+
return {
|
|
22
|
+
'text-primary': props.primary || props.color === 'primary',
|
|
23
|
+
'text-secondary': props.secondary || props.color === 'secondary',
|
|
24
|
+
'text-neutral': props.neutral || props.color === 'neutral',
|
|
25
|
+
'text-accent': props.accent || props.color === 'accent',
|
|
26
|
+
'text-info': props.info || props.color === 'info',
|
|
27
|
+
'text-success': props.success || props.color === 'success',
|
|
28
|
+
'text-warning': props.warning || props.color === 'warning',
|
|
29
|
+
'text-error': props.error || props.color === 'error',
|
|
30
|
+
|
|
31
|
+
'loading-lg': props.lg || props.size === 'lg',
|
|
32
|
+
'loading-md': props.md || props.size === 'md',
|
|
33
|
+
'loading-sm': props.sm || props.size === 'sm',
|
|
34
|
+
'loading-xs': props.xs || props.size === 'xs',
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<span class="loading loading-dots" :class="classes" />
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = defineProps<{
|
|
3
|
+
color?: string
|
|
4
|
+
neutral?: boolean
|
|
5
|
+
primary?: boolean
|
|
6
|
+
secondary?: boolean
|
|
7
|
+
accent?: boolean
|
|
8
|
+
info?: boolean
|
|
9
|
+
success?: boolean
|
|
10
|
+
warning?: boolean
|
|
11
|
+
error?: boolean
|
|
12
|
+
|
|
13
|
+
size?: 'lg' | 'md' | 'sm' | 'xs'
|
|
14
|
+
lg?: boolean
|
|
15
|
+
md?: boolean
|
|
16
|
+
sm?: boolean
|
|
17
|
+
xs?: boolean
|
|
18
|
+
}>()
|
|
19
|
+
|
|
20
|
+
const classes = computed(() => {
|
|
21
|
+
return {
|
|
22
|
+
'text-primary': props.primary || props.color === 'primary',
|
|
23
|
+
'text-secondary': props.secondary || props.color === 'secondary',
|
|
24
|
+
'text-neutral': props.neutral || props.color === 'neutral',
|
|
25
|
+
'text-accent': props.accent || props.color === 'accent',
|
|
26
|
+
'text-info': props.info || props.color === 'info',
|
|
27
|
+
'text-success': props.success || props.color === 'success',
|
|
28
|
+
'text-warning': props.warning || props.color === 'warning',
|
|
29
|
+
'text-error': props.error || props.color === 'error',
|
|
30
|
+
|
|
31
|
+
'loading-lg': props.lg || props.size === 'lg',
|
|
32
|
+
'loading-md': props.md || props.size === 'md',
|
|
33
|
+
'loading-sm': props.sm || props.size === 'sm',
|
|
34
|
+
'loading-xs': props.xs || props.size === 'xs',
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<span class="loading loading-infinity" :class="classes" />
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = defineProps<{
|
|
3
|
+
color?: string
|
|
4
|
+
neutral?: boolean
|
|
5
|
+
primary?: boolean
|
|
6
|
+
secondary?: boolean
|
|
7
|
+
accent?: boolean
|
|
8
|
+
info?: boolean
|
|
9
|
+
success?: boolean
|
|
10
|
+
warning?: boolean
|
|
11
|
+
error?: boolean
|
|
12
|
+
|
|
13
|
+
size?: 'lg' | 'md' | 'sm' | 'xs'
|
|
14
|
+
lg?: boolean
|
|
15
|
+
md?: boolean
|
|
16
|
+
sm?: boolean
|
|
17
|
+
xs?: boolean
|
|
18
|
+
}>()
|
|
19
|
+
|
|
20
|
+
const classes = computed(() => {
|
|
21
|
+
return {
|
|
22
|
+
'text-primary': props.primary || props.color === 'primary',
|
|
23
|
+
'text-secondary': props.secondary || props.color === 'secondary',
|
|
24
|
+
'text-neutral': props.neutral || props.color === 'neutral',
|
|
25
|
+
'text-accent': props.accent || props.color === 'accent',
|
|
26
|
+
'text-info': props.info || props.color === 'info',
|
|
27
|
+
'text-success': props.success || props.color === 'success',
|
|
28
|
+
'text-warning': props.warning || props.color === 'warning',
|
|
29
|
+
'text-error': props.error || props.color === 'error',
|
|
30
|
+
|
|
31
|
+
'loading-lg': props.lg || props.size === 'lg',
|
|
32
|
+
'loading-md': props.md || props.size === 'md',
|
|
33
|
+
'loading-sm': props.sm || props.size === 'sm',
|
|
34
|
+
'loading-xs': props.xs || props.size === 'xs',
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<span class="loading loading-ring" :class="classes" />
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = defineProps<{
|
|
3
|
+
color?: string
|
|
4
|
+
neutral?: boolean
|
|
5
|
+
primary?: boolean
|
|
6
|
+
secondary?: boolean
|
|
7
|
+
accent?: boolean
|
|
8
|
+
info?: boolean
|
|
9
|
+
success?: boolean
|
|
10
|
+
warning?: boolean
|
|
11
|
+
error?: boolean
|
|
12
|
+
|
|
13
|
+
size?: 'lg' | 'md' | 'sm' | 'xs'
|
|
14
|
+
lg?: boolean
|
|
15
|
+
md?: boolean
|
|
16
|
+
sm?: boolean
|
|
17
|
+
xs?: boolean
|
|
18
|
+
}>()
|
|
19
|
+
|
|
20
|
+
const classes = computed(() => {
|
|
21
|
+
return {
|
|
22
|
+
'text-primary': props.primary || props.color === 'primary',
|
|
23
|
+
'text-secondary': props.secondary || props.color === 'secondary',
|
|
24
|
+
'text-neutral': props.neutral || props.color === 'neutral',
|
|
25
|
+
'text-accent': props.accent || props.color === 'accent',
|
|
26
|
+
'text-info': props.info || props.color === 'info',
|
|
27
|
+
'text-success': props.success || props.color === 'success',
|
|
28
|
+
'text-warning': props.warning || props.color === 'warning',
|
|
29
|
+
'text-error': props.error || props.color === 'error',
|
|
30
|
+
|
|
31
|
+
'loading-lg': props.lg || props.size === 'lg',
|
|
32
|
+
'loading-md': props.md || props.size === 'md',
|
|
33
|
+
'loading-sm': props.sm || props.size === 'sm',
|
|
34
|
+
'loading-xs': props.xs || props.size === 'xs',
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<span class="loading loading-spinner" :class="classes" />
|
|
41
|
+
</template>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { computed } from 'vue'
|
|
2
2
|
|
|
3
3
|
export const maskProps = {
|
|
4
|
+
shape: { type: String },
|
|
4
5
|
squircle: Boolean,
|
|
5
6
|
heart: Boolean,
|
|
6
7
|
hexagon: Boolean,
|
|
@@ -20,10 +21,9 @@ export const maskProps = {
|
|
|
20
21
|
triangle2: Boolean,
|
|
21
22
|
triangle3: Boolean,
|
|
22
23
|
triangle4: Boolean,
|
|
23
|
-
shape: { type: String },
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
export function makeMaskClasses(props) {
|
|
26
|
+
export function makeMaskClasses(props: any) {
|
|
27
27
|
const classes = computed(() => {
|
|
28
28
|
return {
|
|
29
29
|
'mask-squircle': props.squircle || props.shape === 'squircle',
|
package/components/Menu.vue
CHANGED
|
@@ -2,19 +2,27 @@
|
|
|
2
2
|
import { computed } from 'vue'
|
|
3
3
|
|
|
4
4
|
interface Props {
|
|
5
|
+
align?: 'vertical' | 'horizontal'
|
|
5
6
|
vertical?: boolean
|
|
6
7
|
horizontal?: boolean
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
size?: | 'lg' | 'md' | 'sm' | 'xs'
|
|
10
|
+
lg?: boolean
|
|
11
|
+
md?: boolean
|
|
12
|
+
sm?: boolean
|
|
13
|
+
xs?: boolean
|
|
9
14
|
}
|
|
10
15
|
const props = defineProps<Props>()
|
|
11
16
|
|
|
17
|
+
// `normal` and `compact` provide backwards compatibility with DaisyUI 2.x
|
|
12
18
|
const classes = computed(() => {
|
|
13
19
|
return {
|
|
14
|
-
'menu-
|
|
15
|
-
'menu-
|
|
16
|
-
'menu-
|
|
17
|
-
'menu-
|
|
20
|
+
'menu-vertical': props.vertical || props.align === 'vertical',
|
|
21
|
+
'menu-horizontal': props.horizontal || props.align === 'horizontal',
|
|
22
|
+
'menu-lg': props.lg || props.size === 'lg',
|
|
23
|
+
'menu-md': props.md || props.size === 'md',
|
|
24
|
+
'menu-sm': props.sm || props.size === 'sm',
|
|
25
|
+
'menu-xs': props.xs || props.size === 'xs',
|
|
18
26
|
}
|
|
19
27
|
})
|
|
20
28
|
</script>
|
package/components/MenuItem.vue
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
interface Props {
|
|
3
|
-
bordered?: boolean
|
|
4
|
-
hoverBordered?: boolean
|
|
5
3
|
active?: boolean
|
|
6
4
|
disabled?: boolean
|
|
7
5
|
}
|
|
@@ -9,7 +7,17 @@ defineProps<Props>()
|
|
|
9
7
|
</script>
|
|
10
8
|
|
|
11
9
|
<template>
|
|
12
|
-
<li class="menu-item" :class="{ active,
|
|
10
|
+
<li class="menu-item" :class="{ active, disabled }">
|
|
13
11
|
<slot />
|
|
14
12
|
</li>
|
|
15
13
|
</template>
|
|
14
|
+
|
|
15
|
+
<style lang="postcss">
|
|
16
|
+
.menu-item.active > a, .menu-item.active > span {
|
|
17
|
+
background-color: hsl(var(--n) / var(--tw-bg-opacity));
|
|
18
|
+
color: hsl(var(--nc) / var(--tw-text-opacity));
|
|
19
|
+
}
|
|
20
|
+
.menu-item.disabled > a, .menu-item.disabled > span {
|
|
21
|
+
background-color: var(--n)
|
|
22
|
+
}
|
|
23
|
+
</style>
|
package/components/MenuTitle.vue
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<li class="menu-title">
|
|
3
|
-
<
|
|
4
|
-
<slot />
|
|
5
|
-
</div>
|
|
3
|
+
<slot />
|
|
6
4
|
</li>
|
|
7
5
|
</template>
|
|
8
|
-
|
|
9
|
-
<style>
|
|
10
|
-
/* Allow overriding font size from the component */
|
|
11
|
-
.title-inner {
|
|
12
|
-
font-size: inherit !important;
|
|
13
|
-
}
|
|
14
|
-
</style>
|
package/components/Modal.vue
CHANGED
|
@@ -1,16 +1,37 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
|
|
2
|
+
interface Props {
|
|
3
|
+
modelValue?: boolean
|
|
4
|
+
closeOnClickOutside?: boolean
|
|
5
|
+
top?: boolean
|
|
6
|
+
bottom?: boolean
|
|
7
|
+
}
|
|
8
|
+
const props = defineProps<Props>()
|
|
9
|
+
|
|
10
|
+
const is = 'div'
|
|
3
11
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
12
|
+
const isOpen = defineModel({
|
|
13
|
+
default: false,
|
|
14
|
+
local: true,
|
|
15
|
+
type: Boolean,
|
|
16
|
+
})
|
|
17
|
+
function handleClick() {
|
|
18
|
+
if (props.closeOnClickOutside)
|
|
8
19
|
isOpen.value = false
|
|
9
20
|
}
|
|
10
21
|
</script>
|
|
11
22
|
|
|
12
23
|
<template>
|
|
13
|
-
<
|
|
24
|
+
<input v-model="isOpen" type="checkbox" class="modal-toggle">
|
|
25
|
+
<Component
|
|
26
|
+
:is="is"
|
|
27
|
+
v-bind="{ ...$attrs, ...$props }"
|
|
28
|
+
class="modal"
|
|
29
|
+
:class="{
|
|
30
|
+
'modal-top': props.top,
|
|
31
|
+
'modal-bottom': props.bottom,
|
|
32
|
+
}"
|
|
33
|
+
@click.self="handleClick"
|
|
34
|
+
>
|
|
14
35
|
<slot />
|
|
15
|
-
</
|
|
36
|
+
</Component>
|
|
16
37
|
</template>
|
package/components/Progress.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed
|
|
2
|
+
import { computed } from 'vue'
|
|
3
3
|
|
|
4
4
|
interface Props {
|
|
5
5
|
value: any
|
|
@@ -18,7 +18,6 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
18
18
|
value: 0,
|
|
19
19
|
max: 100,
|
|
20
20
|
})
|
|
21
|
-
const emit = defineEmits(['update:modelValue'])
|
|
22
21
|
|
|
23
22
|
const classes = computed(() => {
|
|
24
23
|
const { color, primary, secondary, accent, success, info, warning, error } = props
|
package/components/Prose.vue
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
interface Props {
|
|
3
|
-
fullWidth?: boolean
|
|
4
|
-
}
|
|
5
|
-
defineProps<Props>()
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
1
|
<template>
|
|
9
|
-
<article class="prose daisy-prose
|
|
2
|
+
<article class="prose daisy-prose max-w-none">
|
|
10
3
|
<slot />
|
|
11
4
|
</article>
|
|
12
5
|
</template>
|
|
@@ -31,4 +24,9 @@ defineProps<Props>()
|
|
|
31
24
|
.prose .link-accent {
|
|
32
25
|
@apply text-accent;
|
|
33
26
|
}
|
|
27
|
+
|
|
28
|
+
.prose h1 a, .prose h2 a, .prose h3 a, .prose h4 a, .prose h5 a, .prose h6 a {
|
|
29
|
+
text-decoration: none;
|
|
30
|
+
@apply font-bold
|
|
31
|
+
}
|
|
34
32
|
</style>
|
package/components/Radio.vue
CHANGED
|
@@ -4,11 +4,17 @@ import { computed, inject } from 'vue'
|
|
|
4
4
|
const props = defineProps<{
|
|
5
5
|
modelValue?: any
|
|
6
6
|
value: any
|
|
7
|
+
disabled?: boolean
|
|
7
8
|
|
|
8
9
|
color?: string
|
|
10
|
+
neutral?: boolean
|
|
9
11
|
primary?: boolean
|
|
10
12
|
secondary?: boolean
|
|
11
13
|
accent?: boolean
|
|
14
|
+
success?: boolean
|
|
15
|
+
warning?: boolean
|
|
16
|
+
info?: boolean
|
|
17
|
+
error?: boolean
|
|
12
18
|
|
|
13
19
|
size?: string
|
|
14
20
|
xs?: boolean
|
|
@@ -18,7 +24,7 @@ const props = defineProps<{
|
|
|
18
24
|
}>()
|
|
19
25
|
const emit = defineEmits(['update:modelValue'])
|
|
20
26
|
|
|
21
|
-
const radioGroup = inject('radio-group', null)
|
|
27
|
+
const radioGroup: any = inject('radio-group', null)
|
|
22
28
|
|
|
23
29
|
const _props = computed(() => {
|
|
24
30
|
if (radioGroup)
|
|
@@ -27,11 +33,16 @@ const _props = computed(() => {
|
|
|
27
33
|
})
|
|
28
34
|
|
|
29
35
|
const classes = computed(() => {
|
|
30
|
-
const { color, primary, secondary, accent, size, xs, sm, md, lg } = _props.value
|
|
36
|
+
const { color, neutral, primary, secondary, accent, success, warning, info, error, size, xs, sm, md, lg } = _props.value
|
|
31
37
|
return {
|
|
38
|
+
'radio-neutral': neutral || color === 'neutral',
|
|
32
39
|
'radio-primary': primary || color === 'primary',
|
|
33
40
|
'radio-secondary': secondary || color === 'secondary',
|
|
34
41
|
'radio-accent': accent || color === 'accent',
|
|
42
|
+
'radio-success': success || color === 'success',
|
|
43
|
+
'radio-warning': warning || color === 'warning',
|
|
44
|
+
'radio-info': info || color === 'info',
|
|
45
|
+
'radio-error': error || color === 'error',
|
|
35
46
|
'radio-xs': xs || size === 'xs',
|
|
36
47
|
'radio-sm': sm || size === 'sm',
|
|
37
48
|
'radio-md': md || size === 'md',
|
|
@@ -59,6 +70,7 @@ const currentValue = computed({
|
|
|
59
70
|
v-bind="{ ..._props, ...$attrs }"
|
|
60
71
|
class="radio"
|
|
61
72
|
:class="classes"
|
|
73
|
+
:disabled="disabled"
|
|
62
74
|
:value="props.value"
|
|
63
75
|
>
|
|
64
76
|
</template>
|
|
@@ -6,9 +6,14 @@ const props = defineProps<{
|
|
|
6
6
|
name: string
|
|
7
7
|
|
|
8
8
|
color?: string
|
|
9
|
+
neutral?: boolean
|
|
9
10
|
primary?: boolean
|
|
10
11
|
secondary?: boolean
|
|
11
12
|
accent?: boolean
|
|
13
|
+
success?: boolean
|
|
14
|
+
warning?: boolean
|
|
15
|
+
info?: boolean
|
|
16
|
+
error?: boolean
|
|
12
17
|
|
|
13
18
|
size?: string
|
|
14
19
|
xs?: boolean
|
package/components/Range.vue
CHANGED
|
@@ -2,15 +2,21 @@
|
|
|
2
2
|
import { computed } from 'vue'
|
|
3
3
|
|
|
4
4
|
interface Props {
|
|
5
|
+
modelValue?: number | string
|
|
5
6
|
min?: number | string
|
|
6
7
|
max?: number | string
|
|
7
8
|
step?: number | string
|
|
8
|
-
|
|
9
|
+
disabled?: boolean
|
|
9
10
|
|
|
10
11
|
color?: string
|
|
12
|
+
neutral?: boolean
|
|
11
13
|
primary?: boolean
|
|
12
14
|
secondary?: boolean
|
|
13
15
|
accent?: boolean
|
|
16
|
+
success?: boolean
|
|
17
|
+
warning?: boolean
|
|
18
|
+
info?: boolean
|
|
19
|
+
error?: boolean
|
|
14
20
|
|
|
15
21
|
size?: 'lg' | 'md' | 'sm' | 'xs'
|
|
16
22
|
lg?: boolean
|
|
@@ -22,11 +28,16 @@ const props = defineProps<Props>()
|
|
|
22
28
|
defineEmits(['update:modelValue'])
|
|
23
29
|
|
|
24
30
|
const classes = computed(() => {
|
|
25
|
-
const { color, primary, secondary, accent, size, lg, md, sm, xs } = props
|
|
31
|
+
const { color, neutral, primary, secondary, accent, success, info, warning, error, size, lg, md, sm, xs } = props
|
|
26
32
|
return {
|
|
33
|
+
'range-neutral': neutral || color === 'neutral',
|
|
27
34
|
'range-primary': primary || color === 'primary',
|
|
28
35
|
'range-secondary': secondary || color === 'secondary',
|
|
29
36
|
'range-accent': accent || color === 'accent',
|
|
37
|
+
'range-success': success || color === 'success',
|
|
38
|
+
'range-info': info || color === 'info',
|
|
39
|
+
'range-warning': warning || color === 'warning',
|
|
40
|
+
'range-error': error || color === 'error',
|
|
30
41
|
'range-lg': lg || size === 'lg',
|
|
31
42
|
'range-md': md || size === 'md',
|
|
32
43
|
'range-sm': sm || size === 'sm',
|
|
@@ -43,6 +54,7 @@ const classes = computed(() => {
|
|
|
43
54
|
:min="min"
|
|
44
55
|
:max="max"
|
|
45
56
|
:step="step"
|
|
57
|
+
:disabled="disabled"
|
|
46
58
|
:value="modelValue"
|
|
47
59
|
@input="$emit('update:modelValue', ($event.target as any).value)"
|
|
48
60
|
>
|