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,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineProps, withDefaults } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
is?: string
|
|
6
|
+
}
|
|
7
|
+
withDefaults(defineProps<Props>(), {
|
|
8
|
+
is: 'div',
|
|
9
|
+
})
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<component :is="is" class="indicator">
|
|
14
|
+
<slot />
|
|
15
|
+
</component>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, defineProps, withDefaults } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
is?: string
|
|
6
|
+
|
|
7
|
+
align?: 'start' | 'center' | 'end'
|
|
8
|
+
start?: boolean
|
|
9
|
+
center?: boolean
|
|
10
|
+
end?: boolean
|
|
11
|
+
|
|
12
|
+
vAlign?: 'top' | 'middle' | 'bottom'
|
|
13
|
+
top?: boolean
|
|
14
|
+
middle?: boolean
|
|
15
|
+
bottom?: boolean
|
|
16
|
+
}
|
|
17
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
18
|
+
is: 'div',
|
|
19
|
+
})
|
|
20
|
+
const classes = computed(() => {
|
|
21
|
+
return {
|
|
22
|
+
'indicator-start': props.start || props.align === 'start',
|
|
23
|
+
'indicator-center': props.center || props.align === 'center',
|
|
24
|
+
'indicator-end': props.end || props.align === 'end',
|
|
25
|
+
|
|
26
|
+
'indicator-top': props.top || props.vAlign === 'top',
|
|
27
|
+
'indicator-middle': props.middle || props.vAlign === 'middle',
|
|
28
|
+
'indicator-bottom': props.bottom || props.vAlign === 'bottom',
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<component :is="is" class="indicator-item" :class="classes">
|
|
35
|
+
<slot />
|
|
36
|
+
</component>
|
|
37
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, defineProps, withDefaults } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
is?: string
|
|
6
|
+
vertical?: boolean
|
|
7
|
+
|
|
8
|
+
size?: string
|
|
9
|
+
lg?: boolean
|
|
10
|
+
md?: boolean
|
|
11
|
+
sm?: boolean
|
|
12
|
+
xs?: boolean
|
|
13
|
+
}
|
|
14
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
15
|
+
is: 'label',
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
const classes = computed(() => {
|
|
19
|
+
return {
|
|
20
|
+
'input-group-lg': props.size === 'lg' || props.lg,
|
|
21
|
+
'input-group-md': props.size === 'md' || props.md,
|
|
22
|
+
'input-group-sm': props.size === 'sm' || props.sm,
|
|
23
|
+
'input-group-xs': props.size === 'xs' || props.xs,
|
|
24
|
+
'input-group-vertical': props.vertical,
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<component :is="is" class="input-group" :class="classes">
|
|
31
|
+
<slot />
|
|
32
|
+
</component>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, defineProps } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
size?: 'lg' | 'md' | 'sm' | 'xs'
|
|
6
|
+
lg?: boolean
|
|
7
|
+
md?: boolean
|
|
8
|
+
sm?: boolean
|
|
9
|
+
xs?: boolean
|
|
10
|
+
}
|
|
11
|
+
const props = defineProps<Props>()
|
|
12
|
+
|
|
13
|
+
const classes = computed(() => {
|
|
14
|
+
const { size, lg, md, sm, xs } = props
|
|
15
|
+
return {
|
|
16
|
+
'kbd-lg': lg || size === 'lg',
|
|
17
|
+
'kbd-md': md || size === 'md',
|
|
18
|
+
'kbd-sm': sm || size === 'sm',
|
|
19
|
+
'kbd-xs': xs || size === 'xs',
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<kbd class="kbd" :class="classes"><slot /></kbd>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineProps, withDefaults } from 'vue'
|
|
3
|
+
import Text from './Text.vue'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
is?: string
|
|
7
|
+
}
|
|
8
|
+
withDefaults(defineProps<Props>(), {
|
|
9
|
+
is: 'label',
|
|
10
|
+
})
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<Text :is="is" class="label">
|
|
15
|
+
<slot />
|
|
16
|
+
</Text>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineProps, withDefaults } from 'vue'
|
|
3
|
+
import Text from './Text.vue'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
is?: string
|
|
7
|
+
}
|
|
8
|
+
withDefaults(defineProps<Props>(), {
|
|
9
|
+
is: 'span',
|
|
10
|
+
})
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<Text :is="is" class="label-text">
|
|
15
|
+
<slot />
|
|
16
|
+
</Text>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineProps, withDefaults } from 'vue'
|
|
3
|
+
import Text from './Text.vue'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
is?: string
|
|
7
|
+
}
|
|
8
|
+
withDefaults(defineProps<Props>(), {
|
|
9
|
+
is: 'span',
|
|
10
|
+
})
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<Text :is="is" class="label-text-alt">
|
|
15
|
+
<slot />
|
|
16
|
+
</Text>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, defineProps, withDefaults } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
is?: string
|
|
6
|
+
color?: 'primary' | 'secondary' | 'accent' | 'neutral'
|
|
7
|
+
primary?: boolean
|
|
8
|
+
secondary?: boolean
|
|
9
|
+
accent?: boolean
|
|
10
|
+
neutral?: boolean
|
|
11
|
+
hover?: boolean
|
|
12
|
+
}
|
|
13
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
14
|
+
is: 'a',
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
const classes = computed(() => {
|
|
18
|
+
return {
|
|
19
|
+
'link-primary': props.primary || props.color === 'primary',
|
|
20
|
+
'link-secondary': props.secondary || props.color === 'secondary',
|
|
21
|
+
'link-accent': props.accent || props.color === 'accent',
|
|
22
|
+
'link-neutral': props.neutral || props.color === 'neutral',
|
|
23
|
+
'link-hover': props.hover,
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<component :is="is" class="link" :class="classes">
|
|
30
|
+
<slot />
|
|
31
|
+
</component>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { computed } from 'vue'
|
|
2
|
+
|
|
3
|
+
export const maskProps = {
|
|
4
|
+
squircle: Boolean,
|
|
5
|
+
heart: Boolean,
|
|
6
|
+
hexagon: Boolean,
|
|
7
|
+
hexagon2: Boolean,
|
|
8
|
+
decagon: Boolean,
|
|
9
|
+
pentagon: Boolean,
|
|
10
|
+
diamond: Boolean,
|
|
11
|
+
square: Boolean,
|
|
12
|
+
circle: Boolean,
|
|
13
|
+
parallelogram: Boolean,
|
|
14
|
+
parallelogram2: Boolean,
|
|
15
|
+
parallelogram3: Boolean,
|
|
16
|
+
parallelogram4: Boolean,
|
|
17
|
+
star: Boolean,
|
|
18
|
+
star2: Boolean,
|
|
19
|
+
triangle: Boolean,
|
|
20
|
+
triangle2: Boolean,
|
|
21
|
+
triangle3: Boolean,
|
|
22
|
+
triangle4: Boolean,
|
|
23
|
+
shape: { type: String },
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function makeMaskClasses(props) {
|
|
27
|
+
const classes = computed(() => {
|
|
28
|
+
return {
|
|
29
|
+
'mask-squircle': props.squircle || props.shape === 'squircle',
|
|
30
|
+
'mask-heart': props.heart || props.shape === 'heart',
|
|
31
|
+
'mask-hexagon': props.hexagon || props.shape === 'hexagon',
|
|
32
|
+
'mask-hexagon-2': props.hexagon2 || props.shape === 'hexagon-2',
|
|
33
|
+
'mask-decagon': props.decagon || props.shape === 'decagon',
|
|
34
|
+
'mask-pentagon': props.pentagon || props.shape === 'pentagon',
|
|
35
|
+
'mask-diamond': props.diamond || props.shape === 'diamond',
|
|
36
|
+
'mask-square': props.square || props.shape === 'square',
|
|
37
|
+
'mask-circle': props.circle || props.shape === 'circle',
|
|
38
|
+
'mask-parallelogram':
|
|
39
|
+
props.parallelogram || props.shape === 'parallelogram',
|
|
40
|
+
'mask-parallelogram-2':
|
|
41
|
+
props.parallelogram2 || props.shape === 'parallelogram-2',
|
|
42
|
+
'mask-parallelogram-3':
|
|
43
|
+
props.parallelogram3 || props.shape === 'parallelogram-3',
|
|
44
|
+
'mask-parallelogram-4':
|
|
45
|
+
props.parallelogram4 || props.shape === 'parallelogram-4',
|
|
46
|
+
'mask-star': props.star || props.shape === 'star',
|
|
47
|
+
'mask-star-2': props.star2 || props.shape === 'star-2',
|
|
48
|
+
'mask-triangle': props.triangle || props.shape === 'triangle',
|
|
49
|
+
'mask-triangle-2': props.triangle2 || props.shape === 'triangle-2',
|
|
50
|
+
'mask-triangle-3': props.triangle3 || props.shape === 'triangle-3',
|
|
51
|
+
'mask-triangle-4': props.triangle4 || props.shape === 'triangle-4',
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
return classes
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export const shapes = [
|
|
58
|
+
'squircle',
|
|
59
|
+
'heart',
|
|
60
|
+
'hexagon',
|
|
61
|
+
'hexagon-2',
|
|
62
|
+
'decagon',
|
|
63
|
+
'pentagon',
|
|
64
|
+
'diamond',
|
|
65
|
+
'square',
|
|
66
|
+
'circle',
|
|
67
|
+
'parallelogram',
|
|
68
|
+
'parallelogram-2',
|
|
69
|
+
'parallelogram-3',
|
|
70
|
+
'parallelogram-4',
|
|
71
|
+
'star',
|
|
72
|
+
'star-2',
|
|
73
|
+
'triangle',
|
|
74
|
+
'triangle-2',
|
|
75
|
+
'triangle-3',
|
|
76
|
+
'triangle-4',
|
|
77
|
+
]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineProps } from 'vue'
|
|
3
|
+
import { makeMaskClasses, maskProps } from './Mask.config'
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
...maskProps,
|
|
7
|
+
})
|
|
8
|
+
const classes = makeMaskClasses(props)
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<div class="mask" :class="[classes]">
|
|
13
|
+
<slot />
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, defineProps } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
vertical?: boolean
|
|
6
|
+
horizontal?: boolean
|
|
7
|
+
normal?: boolean
|
|
8
|
+
compact?: boolean
|
|
9
|
+
}
|
|
10
|
+
const props = defineProps<Props>()
|
|
11
|
+
|
|
12
|
+
const classes = computed(() => {
|
|
13
|
+
return {
|
|
14
|
+
'menu-normal': props.normal,
|
|
15
|
+
'menu-vertical': props.vertical,
|
|
16
|
+
'menu-horizontal': props.horizontal,
|
|
17
|
+
'menu-compact': props.compact,
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<ul class="menu" :class="classes">
|
|
24
|
+
<slot />
|
|
25
|
+
</ul>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineProps } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
bordered?: boolean
|
|
6
|
+
hoverBordered?: boolean
|
|
7
|
+
active?: boolean
|
|
8
|
+
disabled?: boolean
|
|
9
|
+
}
|
|
10
|
+
defineProps<Props>()
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<li class="menu-item" :class="{ active, bordered, 'hover-bordered': hoverBordered, disabled }">
|
|
15
|
+
<slot />
|
|
16
|
+
</li>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import {
|
|
3
|
+
Dialog,
|
|
4
|
+
DialogOverlay,
|
|
5
|
+
TransitionChild,
|
|
6
|
+
TransitionRoot,
|
|
7
|
+
} from '@headlessui/vue'
|
|
8
|
+
import {
|
|
9
|
+
XIcon,
|
|
10
|
+
} from '@heroicons/vue/outline'
|
|
11
|
+
|
|
12
|
+
defineProps(['navigation', 'show'])
|
|
13
|
+
defineEmits(['update:show'])
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<TransitionRoot as="template" :show="show">
|
|
18
|
+
<Dialog as="div" class="fixed inset-0 z-40 flex md:hidden" @close="$emit('update:show', false)">
|
|
19
|
+
<TransitionChild
|
|
20
|
+
as="template"
|
|
21
|
+
enter="transition-opacity ease-linear duration-300"
|
|
22
|
+
enter-from="opacity-0"
|
|
23
|
+
enter-to="opacity-100"
|
|
24
|
+
leave="transition-opacity ease-linear duration-300"
|
|
25
|
+
leave-from="opacity-100"
|
|
26
|
+
leave-to="opacity-0"
|
|
27
|
+
>
|
|
28
|
+
<DialogOverlay class="fixed inset-0 bg-opacity-75 bg-base-200" />
|
|
29
|
+
</TransitionChild>
|
|
30
|
+
<TransitionChild
|
|
31
|
+
as="template"
|
|
32
|
+
enter="transition ease-in-out duration-300 transform"
|
|
33
|
+
enter-from="-translate-x-full"
|
|
34
|
+
enter-to="translate-x-0"
|
|
35
|
+
leave="transition ease-in-out duration-300 transform"
|
|
36
|
+
leave-from="translate-x-0"
|
|
37
|
+
leave-to="-translate-x-full"
|
|
38
|
+
>
|
|
39
|
+
<div class="relative flex flex-col flex-1 w-full max-w-xs pt-5 pb-4 bg-indigo-700">
|
|
40
|
+
<TransitionChild
|
|
41
|
+
as="template"
|
|
42
|
+
enter="ease-in-out duration-300"
|
|
43
|
+
enter-from="opacity-0"
|
|
44
|
+
enter-to="opacity-100"
|
|
45
|
+
leave="ease-in-out duration-300"
|
|
46
|
+
leave-from="opacity-100"
|
|
47
|
+
leave-to="opacity-0"
|
|
48
|
+
>
|
|
49
|
+
<div class="absolute top-0 right-0 pt-2 -mr-12">
|
|
50
|
+
<button
|
|
51
|
+
type="button"
|
|
52
|
+
class="flex items-center justify-center w-10 h-10 ml-1 rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white"
|
|
53
|
+
@click="$emit('update:show', false)"
|
|
54
|
+
>
|
|
55
|
+
<span class="sr-only">Close sidebar</span>
|
|
56
|
+
<XIcon class="w-6 h-6 text-base-content" aria-hidden="true" />
|
|
57
|
+
</button>
|
|
58
|
+
</div>
|
|
59
|
+
</TransitionChild>
|
|
60
|
+
|
|
61
|
+
<Logo class="text-base-content" />
|
|
62
|
+
|
|
63
|
+
<div class="flex-1 h-0 mt-5 overflow-y-auto">
|
|
64
|
+
<nav class="px-2 space-y-1">
|
|
65
|
+
<a
|
|
66
|
+
v-for="item in navigation"
|
|
67
|
+
:key="item.name"
|
|
68
|
+
:href="item.href"
|
|
69
|
+
:class="[
|
|
70
|
+
item.current
|
|
71
|
+
? 'bg-indigo-800 text-base-content'
|
|
72
|
+
: 'text-indigo-100 hover:bg-indigo-600',
|
|
73
|
+
'group flex items-center px-2 py-2 text-base font-medium rounded-md',
|
|
74
|
+
]"
|
|
75
|
+
>
|
|
76
|
+
<component
|
|
77
|
+
:is="item.icon"
|
|
78
|
+
class="flex-shrink-0 w-6 h-6 mr-4 text-indigo-300"
|
|
79
|
+
aria-hidden="true"
|
|
80
|
+
/>
|
|
81
|
+
{{ item.name }}
|
|
82
|
+
</a>
|
|
83
|
+
</nav>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</TransitionChild>
|
|
87
|
+
<div class="flex-shrink-0 w-14" aria-hidden="true">
|
|
88
|
+
<!-- Dummy element to force sidebar to shrink to fit close icon -->
|
|
89
|
+
</div>
|
|
90
|
+
</Dialog>
|
|
91
|
+
</TransitionRoot>
|
|
92
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, inject } from 'vue'
|
|
3
|
+
|
|
4
|
+
const clickOutsideToClose: any = inject('modalClickOutsideToClose')
|
|
5
|
+
const isOpen: any = inject('isOpen')
|
|
6
|
+
const handleClick = () => {
|
|
7
|
+
if (clickOutsideToClose.value)
|
|
8
|
+
isOpen.value = false
|
|
9
|
+
}
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div class="modal" @click.self="handleClick">
|
|
14
|
+
<slot />
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, defineProps, provide } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
name: string
|
|
6
|
+
modelValue?: boolean
|
|
7
|
+
clickToClose?: boolean
|
|
8
|
+
}
|
|
9
|
+
const props = defineProps<Props>()
|
|
10
|
+
const emit = defineEmits(['update:modelValue'])
|
|
11
|
+
|
|
12
|
+
const is = computed(() => {
|
|
13
|
+
return props.clickToClose ? 'label' : 'div'
|
|
14
|
+
})
|
|
15
|
+
const isOpen = computed({
|
|
16
|
+
get: () => props.modelValue,
|
|
17
|
+
set: val => emit('update:modelValue', val),
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
provide(
|
|
21
|
+
'modalClickOutsideToClose',
|
|
22
|
+
computed(() => props.clickToClose),
|
|
23
|
+
)
|
|
24
|
+
provide('isOpen', isOpen)
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<div :class="`modal---${name}`">
|
|
29
|
+
<input v-model="isOpen" type="checkbox" class="modal-toggle">
|
|
30
|
+
<slot />
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, defineProps } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
active?: boolean
|
|
6
|
+
disabled?: boolean
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const props = defineProps<Props>()
|
|
10
|
+
const classes = computed(() => {
|
|
11
|
+
return {
|
|
12
|
+
active: props.active,
|
|
13
|
+
disabled: props.disabled,
|
|
14
|
+
}
|
|
15
|
+
})
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<button class="nav-button" :class="classes">
|
|
20
|
+
<slot />
|
|
21
|
+
</button>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineProps, withDefaults } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
is?: string | Object | Function
|
|
6
|
+
glass?: boolean
|
|
7
|
+
}
|
|
8
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
9
|
+
is: 'div',
|
|
10
|
+
})
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<component :is="is" class="navbar" :class="{ glass }">
|
|
15
|
+
<slot />
|
|
16
|
+
</component>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineProps, withDefaults } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
is?: string | Object | Function
|
|
6
|
+
}
|
|
7
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
8
|
+
is: 'div',
|
|
9
|
+
})
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<component :is="is" class="navbar-center">
|
|
14
|
+
<slot />
|
|
15
|
+
</component>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineProps, withDefaults } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
is?: string | Object | Function
|
|
6
|
+
}
|
|
7
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
8
|
+
is: 'div',
|
|
9
|
+
})
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<component :is="is" class="navbar-end">
|
|
14
|
+
<slot />
|
|
15
|
+
</component>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineProps, withDefaults } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
is?: string | Object | Function
|
|
6
|
+
}
|
|
7
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
8
|
+
is: 'div',
|
|
9
|
+
})
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<component :is="is" class="navbar-start">
|
|
14
|
+
<slot />
|
|
15
|
+
</component>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, defineEmits, defineProps, withDefaults } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
value: any
|
|
6
|
+
max?: any
|
|
7
|
+
|
|
8
|
+
color?: string
|
|
9
|
+
primary?: boolean
|
|
10
|
+
secondary?: boolean
|
|
11
|
+
accent?: boolean
|
|
12
|
+
success?: boolean
|
|
13
|
+
info?: boolean
|
|
14
|
+
warning?: boolean
|
|
15
|
+
error?: boolean
|
|
16
|
+
}
|
|
17
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
18
|
+
value: 0,
|
|
19
|
+
max: 100,
|
|
20
|
+
})
|
|
21
|
+
const emit = defineEmits(['update:modelValue'])
|
|
22
|
+
|
|
23
|
+
const classes = computed(() => {
|
|
24
|
+
const { color, primary, secondary, accent, success, info, warning, error } = props
|
|
25
|
+
return {
|
|
26
|
+
'progress-primary': primary || color === 'primary',
|
|
27
|
+
'progress-secondary': secondary || color === 'secondary',
|
|
28
|
+
'progress-accent': accent || color === 'accent',
|
|
29
|
+
'progress-success': success || color === 'success',
|
|
30
|
+
'progress-info': info || color === 'info',
|
|
31
|
+
'progress-warning': warning || color === 'warning',
|
|
32
|
+
'progress-error': error || color === 'error',
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<template>
|
|
38
|
+
<progress
|
|
39
|
+
:value="value"
|
|
40
|
+
:max="max"
|
|
41
|
+
class="progress"
|
|
42
|
+
:class="classes"
|
|
43
|
+
/>
|
|
44
|
+
</template>
|