daisy-ui-kit 3.0.12 → 5.0.0-pre.10
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 +62 -14
- package/{components → app/components}/Accordion.vue +7 -10
- package/app/components/Alert.vue +35 -0
- package/app/components/Avatar.vue +128 -0
- package/app/components/AvatarGroup.vue +18 -0
- package/app/components/Badge.vue +54 -0
- package/app/components/Button.vue +120 -0
- package/app/components/Calendar.vue +66 -0
- package/app/components/CalendarInput.vue +174 -0
- package/app/components/CalendarSkeleton.vue +46 -0
- package/app/components/Card.vue +33 -0
- package/{components → app/components}/CardActions.vue +3 -6
- package/{components → app/components}/CardBody.vue +3 -6
- package/{components → app/components}/CardTitle.vue +2 -7
- package/app/components/Carousel.vue +23 -0
- package/app/components/Chat.vue +21 -0
- package/app/components/ChatBubble.vue +31 -0
- package/app/components/Checkbox.vue +51 -0
- package/app/components/Collapse.vue +43 -0
- package/app/components/Countdown.vue +15 -0
- package/app/components/CountdownTimers.vue +72 -0
- package/app/components/Counter.vue +10 -0
- package/app/components/DaisyLink.vue +38 -0
- package/app/components/Diff.vue +11 -0
- package/app/components/Divider.vue +43 -0
- package/app/components/Dock.vue +60 -0
- package/app/components/DockItem.vue +26 -0
- package/app/components/DockLabel.vue +5 -0
- package/{components → app/components}/Drawer.vue +6 -4
- package/{components → app/components}/DrawerContent.vue +1 -1
- package/{components → app/components}/DrawerSide.vue +1 -1
- package/{components → app/components}/Dropdown.vue +2 -2
- package/{components → app/components}/DropdownContent.vue +3 -3
- package/app/components/Fieldset.vue +19 -0
- package/app/components/FileInput.vue +53 -0
- package/app/components/Filter.vue +122 -0
- package/app/components/Flex.vue +82 -0
- package/{components → app/components}/FlexItem.vue +1 -1
- package/app/components/Footer.vue +27 -0
- package/app/components/FormControl.vue +5 -0
- package/{components → app/components}/Hero.vue +1 -1
- package/{components → app/components}/HeroContent.vue +1 -1
- package/app/components/Input.vue +119 -0
- package/app/components/Kbd.vue +24 -0
- package/app/components/Label.vue +97 -0
- package/app/components/List.vue +5 -0
- package/{components/FormControl.vue → app/components/ListColGrow.vue} +1 -1
- package/app/components/ListColWrap.vue +5 -0
- package/{components/Stat.vue → app/components/ListRow.vue} +1 -1
- package/app/components/LoadingBall.vue +42 -0
- package/app/components/LoadingBars.vue +42 -0
- package/app/components/LoadingDots.vue +42 -0
- package/app/components/LoadingInfinity.vue +42 -0
- package/app/components/LoadingRing.vue +42 -0
- package/app/components/LoadingSpinner.vue +42 -0
- package/app/components/Mask.vue +49 -0
- package/app/components/Menu.vue +30 -0
- package/app/components/MenuExpand.vue +100 -0
- package/{components → app/components}/MenuExpandToggle.vue +5 -4
- package/{components → app/components}/MenuItem.vue +3 -4
- package/app/components/MockupPhone.vue +14 -0
- package/{components → app/components}/Modal.vue +14 -5
- package/app/components/NavButton.vue +12 -0
- package/{components → app/components}/Navbar.vue +3 -5
- package/{components → app/components}/NavbarCenter.vue +3 -5
- package/{components → app/components}/NavbarEnd.vue +3 -5
- package/{components → app/components}/NavbarStart.vue +3 -5
- package/app/components/Progress.vue +34 -0
- package/{components → app/components}/Prose.vue +1 -1
- package/app/components/RadialProgress.vue +36 -0
- package/app/components/Radio.vue +69 -0
- package/{components → app/components}/RadioGroup.vue +2 -1
- package/app/components/Range.vue +61 -0
- package/{components → app/components}/RangeMeasure.vue +22 -21
- package/{components → app/components}/RangeMeasureTick.vue +9 -14
- package/app/components/Rating.vue +180 -0
- package/{components → app/components}/Select.vue +33 -29
- package/app/components/Skeleton.vue +5 -0
- package/app/components/Stack.vue +25 -0
- package/app/components/Stat.vue +19 -0
- package/app/components/Status.vue +43 -0
- package/app/components/Step.vue +34 -0
- package/app/components/StepIcon.vue +5 -0
- package/app/components/Steps.vue +18 -0
- package/app/components/Swap.vue +62 -0
- package/app/components/Tab.vue +38 -0
- package/{components → app/components}/TabContent.vue +10 -10
- package/app/components/Table.vue +32 -0
- package/app/components/Tabs.vue +53 -0
- package/app/components/Text.vue +142 -0
- package/app/components/TextArea.vue +61 -0
- package/app/components/ThemeController.vue +46 -0
- package/app/components/ThemeProvider.vue +287 -0
- package/app/components/ThemeTile.vue +50 -0
- package/app/components/Timeline.vue +22 -0
- package/app/components/TimelineEnd.vue +14 -0
- package/app/components/TimelineItem.vue +5 -0
- package/app/components/TimelineLine.vue +29 -0
- package/app/components/TimelineMiddle.vue +5 -0
- package/app/components/TimelineStart.vue +13 -0
- package/app/components/Toast.vue +72 -0
- package/app/components/Toggle.vue +60 -0
- package/app/components/Tooltip.vue +47 -0
- package/app/components/TooltipContent.vue +5 -0
- package/app/components/ValidatorHint.vue +5 -0
- package/nuxt.js +7 -1
- package/package.json +58 -61
- package/components/Alert.vue +0 -25
- package/components/Artboard.vue +0 -33
- package/components/Avatar.vue +0 -70
- package/components/AvatarGroup.vue +0 -19
- package/components/Badge.vue +0 -50
- package/components/BottomNav.vue +0 -25
- package/components/Button.vue +0 -111
- package/components/Card.vue +0 -30
- package/components/Carousel.vue +0 -25
- package/components/Chat.vue +0 -27
- package/components/ChatBubble.vue +0 -34
- package/components/Checkbox.vue +0 -55
- package/components/Code.vue +0 -92
- package/components/Collapse.vue +0 -54
- package/components/Countdown.vue +0 -15
- package/components/CountdownTimers.vue +0 -70
- package/components/Counter.vue +0 -14
- package/components/Divider.vue +0 -24
- package/components/FileInput.vue +0 -59
- package/components/Flex.vue +0 -59
- package/components/Footer.vue +0 -24
- package/components/Kbd.vue +0 -25
- package/components/Label.vue +0 -15
- package/components/LabelText.vue +0 -15
- package/components/LabelTextAlt.vue +0 -15
- package/components/Link.vue +0 -40
- package/components/LoadingBall.vue +0 -43
- package/components/LoadingBars.vue +0 -43
- package/components/LoadingDots.vue +0 -43
- package/components/LoadingInfinity.vue +0 -43
- package/components/LoadingRing.vue +0 -43
- package/components/LoadingSpinner.vue +0 -43
- package/components/Mask.config.ts +0 -77
- package/components/Mask.vue +0 -14
- package/components/Menu.vue +0 -35
- package/components/MenuExpand.vue +0 -79
- package/components/MockupPhone.vue +0 -8
- package/components/NavButton.vue +0 -20
- package/components/Progress.vue +0 -42
- package/components/RadialProgress.vue +0 -41
- package/components/Radio.vue +0 -76
- package/components/Range.vue +0 -60
- package/components/Rating.vue +0 -167
- package/components/Stack.vue +0 -13
- package/components/Step.vue +0 -36
- package/components/Steps.vue +0 -21
- package/components/Swap.vue +0 -58
- package/components/Tab.vue +0 -48
- package/components/Tabs.vue +0 -77
- package/components/TabsManager.vue +0 -38
- package/components/Text.vue +0 -142
- package/components/TextArea.vue +0 -64
- package/components/TextInput.vue +0 -66
- package/components/Toast.vue +0 -31
- package/components/Toggle.vue +0 -59
- package/components/Tooltip.vue +0 -47
- package/index.ts +0 -108
- package/utils/-utils.ts +0 -41
- package/utils/Button.config.ts +0 -26
- package/utils/fixtures.ts +0 -62
- package/utils/types.ts +0 -7
- /package/{components → app/components}/Breadcrumbs.vue +0 -0
- /package/{components → app/components}/CarouselItem.vue +0 -0
- /package/{components → app/components}/ChatFooter.vue +0 -0
- /package/{components → app/components}/ChatHeader.vue +0 -0
- /package/{components → app/components}/ChatImage.vue +0 -0
- /package/{components → app/components}/CollapseContent.vue +0 -0
- /package/{components → app/components}/CollapseTitle.vue +0 -0
- /package/{components → app/components}/Crumb.vue +0 -0
- /package/{components → app/components}/DropdownButton.vue +0 -0
- /package/{components → app/components}/DropdownTarget.vue +0 -0
- /package/{components → app/components}/FooterTitle.vue +0 -0
- /package/{components → app/components}/HeroOverlay.vue +0 -0
- /package/{components → app/components}/Indicator.vue +0 -0
- /package/{components → app/components}/IndicatorItem.vue +0 -0
- /package/{components → app/components}/Join.vue +0 -0
- /package/{components → app/components}/MenuTitle.vue +0 -0
- /package/{components → app/components}/MockupBrowser.vue +0 -0
- /package/{components → app/components}/MockupBrowserToolbar.vue +0 -0
- /package/{components → app/components}/MockupCode.vue +0 -0
- /package/{components → app/components}/MockupWindow.vue +0 -0
- /package/{components → app/components}/ModalAction.vue +0 -0
- /package/{components → app/components}/ModalBox.vue +0 -0
- /package/{components → app/components}/StatActions.vue +0 -0
- /package/{components → app/components}/StatDesc.vue +0 -0
- /package/{components → app/components}/StatFigure.vue +0 -0
- /package/{components → app/components}/StatTitle.vue +0 -0
- /package/{components → app/components}/StatValue.vue +0 -0
- /package/{components → app/components}/Stats.vue +0 -0
- /package/{utils → app/utils}/drawer-utils.ts +0 -0
- /package/{utils → app/utils}/random-string.ts +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = defineProps<{
|
|
3
|
+
tip?: string | number
|
|
4
|
+
open?: boolean
|
|
5
|
+
|
|
6
|
+
color?: string
|
|
7
|
+
neutral?: boolean
|
|
8
|
+
primary?: boolean
|
|
9
|
+
secondary?: boolean
|
|
10
|
+
accent?: boolean
|
|
11
|
+
info?: boolean
|
|
12
|
+
success?: boolean
|
|
13
|
+
warning?: boolean
|
|
14
|
+
error?: boolean
|
|
15
|
+
|
|
16
|
+
position?: 'top' | 'right' | 'bottom' | 'left'
|
|
17
|
+
top?: boolean
|
|
18
|
+
right?: boolean
|
|
19
|
+
bottom?: boolean
|
|
20
|
+
left?: boolean
|
|
21
|
+
}>()
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<div
|
|
26
|
+
:data-tip="tip"
|
|
27
|
+
class="tooltip" :class="{
|
|
28
|
+
'tooltip-open': props.open,
|
|
29
|
+
|
|
30
|
+
'tooltip-top': props.top || props.position === 'top',
|
|
31
|
+
'tooltip-bottom': props.bottom || props.position === 'bottom',
|
|
32
|
+
'tooltip-left': props.left || props.position === 'left',
|
|
33
|
+
'tooltip-right': props.right || props.position === 'right',
|
|
34
|
+
|
|
35
|
+
'tooltip-neutral': props.neutral || props.color === 'neutral',
|
|
36
|
+
'tooltip-primary': props.primary || props.color === 'primary',
|
|
37
|
+
'tooltip-secondary': props.secondary || props.color === 'secondary',
|
|
38
|
+
'tooltip-accent': props.accent || props.color === 'accent',
|
|
39
|
+
'tooltip-info': props.info || props.color === 'info',
|
|
40
|
+
'tooltip-success': props.success || props.color === 'success',
|
|
41
|
+
'tooltip-warning': props.warning || props.color === 'warning',
|
|
42
|
+
'tooltip-error': props.error || props.color === 'error',
|
|
43
|
+
}"
|
|
44
|
+
>
|
|
45
|
+
<slot />
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
package/nuxt.js
CHANGED
|
@@ -14,9 +14,15 @@ export default defineNuxtModule({
|
|
|
14
14
|
|
|
15
15
|
nuxt.hook('components:dirs', (dirs) => {
|
|
16
16
|
dirs.push({
|
|
17
|
-
path: fileURLToPath(new URL('./components', import.meta.url)),
|
|
17
|
+
path: fileURLToPath(new URL('./app/components', import.meta.url)),
|
|
18
18
|
prefix,
|
|
19
19
|
})
|
|
20
20
|
})
|
|
21
|
+
|
|
22
|
+
nuxt.hook('composables:dirs', (dirs) => {
|
|
23
|
+
dirs.push({
|
|
24
|
+
path: fileURLToPath(new URL('./app/composables-docs', import.meta.url)),
|
|
25
|
+
})
|
|
26
|
+
})
|
|
21
27
|
},
|
|
22
28
|
})
|
package/package.json
CHANGED
|
@@ -1,80 +1,77 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "daisy-ui-kit",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "5.0.0-pre.10",
|
|
5
|
+
"packageManager": "pnpm@10.10.0",
|
|
6
|
+
"main": "./nuxt.js",
|
|
7
|
+
"module": "./nuxt.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./nuxt.js",
|
|
11
|
+
"require": "./nuxt.js"
|
|
12
|
+
},
|
|
13
|
+
"./nuxt": {
|
|
14
|
+
"import": "./nuxt.js",
|
|
15
|
+
"require": "./nuxt.js"
|
|
16
|
+
},
|
|
17
|
+
"./components/*": "./app/components/*",
|
|
18
|
+
"./utils/*": "./app/utils/*"
|
|
11
19
|
},
|
|
12
|
-
"main": "index.ts",
|
|
13
20
|
"files": [
|
|
14
|
-
"components/*.vue",
|
|
15
|
-
"
|
|
16
|
-
"utils/*",
|
|
21
|
+
"app/components/*.vue",
|
|
22
|
+
"app/utils/*",
|
|
17
23
|
"nuxt.js"
|
|
18
24
|
],
|
|
19
25
|
"scripts": {
|
|
20
|
-
"
|
|
21
|
-
"build": "
|
|
22
|
-
"dev": "
|
|
23
|
-
"
|
|
24
|
-
"lint": "eslint
|
|
26
|
+
"import-d1-dumps": "./import-d1-dumps.sh",
|
|
27
|
+
"build": "nuxt build",
|
|
28
|
+
"dev": "nuxt dev",
|
|
29
|
+
"lint": "eslint",
|
|
30
|
+
"lint:fix": "eslint --fix",
|
|
31
|
+
"generate": "nuxt generate",
|
|
32
|
+
"preview": "nuxt preview",
|
|
33
|
+
"postinstall": "nuxt prepare",
|
|
25
34
|
"publish": "git push origin --tags && git push origin",
|
|
26
35
|
"release:pre": "npm version prerelease && npm publish --tag pre",
|
|
27
36
|
"release:patch": "npm version patch && npm publish",
|
|
28
37
|
"release:minor": "npm version minor && npm publish",
|
|
29
|
-
"release:major": "npm version major && npm publish"
|
|
38
|
+
"release:major": "npm version major && npm publish",
|
|
39
|
+
"deploy": "pnpm run build && npx wrangler pages deploy dist"
|
|
30
40
|
},
|
|
31
41
|
"peerDependencies": {
|
|
32
|
-
"@vueuse/core": "^
|
|
33
|
-
"daisyui": "^
|
|
34
|
-
"prismjs": "^1.29.0"
|
|
42
|
+
"@vueuse/core": "^13.1.0",
|
|
43
|
+
"daisyui": "^5"
|
|
35
44
|
},
|
|
36
45
|
"dependencies": {
|
|
37
|
-
"@floating-ui/vue": "^1.
|
|
38
|
-
"@
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
46
|
+
"@floating-ui/vue": "^1.1.6",
|
|
47
|
+
"@nuxt/content": "3.5.1",
|
|
48
|
+
"@nuxt/eslint": "1.3.0",
|
|
49
|
+
"@nuxt/fonts": "0.11.2",
|
|
50
|
+
"@nuxt/icon": "1.12.0",
|
|
51
|
+
"@nuxt/image": "1.10.0",
|
|
52
|
+
"@nuxt/kit": "^3.17.2",
|
|
53
|
+
"@nuxt/scripts": "0.11.6",
|
|
54
|
+
"@nuxt/test-utils": "3.18.0",
|
|
55
|
+
"@unhead/vue": "^2.0.8",
|
|
56
|
+
"@vueuse/core": "^13.1.0",
|
|
57
|
+
"@vueuse/integrations": "^13.1.0",
|
|
58
|
+
"focus-trap": "^7.6.4",
|
|
59
|
+
"nuxt": "^3.17.2",
|
|
60
|
+
"pikaday": "^1.8.2",
|
|
61
|
+
"shiki": "^3.3.0",
|
|
62
|
+
"typescript": "^5.8.3",
|
|
63
|
+
"vue": "^3.5.13",
|
|
64
|
+
"vue-router": "^4.5.1",
|
|
65
|
+
"zod": "^3.24.4"
|
|
43
66
|
},
|
|
44
67
|
"devDependencies": {
|
|
45
|
-
"@antfu/eslint-config": "^
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
48
|
-
"@
|
|
49
|
-
"@
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"@nuxtjs/tailwindcss": "^6.8.0",
|
|
54
|
-
"@pinia/nuxt": "^0.4.11",
|
|
55
|
-
"@popperjs/core": "^2.11.8",
|
|
56
|
-
"@rovit/popper": "^3.9.0",
|
|
57
|
-
"@tailwindcss/aspect-ratio": "^0.4.2",
|
|
58
|
-
"@tailwindcss/forms": "^0.5.5",
|
|
59
|
-
"@tailwindcss/line-clamp": "^0.4.4",
|
|
60
|
-
"@tailwindcss/typography": "^0.5.9",
|
|
61
|
-
"@vueuse/core": "^10.3.0",
|
|
62
|
-
"@vueuse/nuxt": "^10.3.0",
|
|
63
|
-
"autoprefixer": "^10.4.15",
|
|
64
|
-
"cookie": "^0.5.0",
|
|
65
|
-
"daisyui": "^3.6.3",
|
|
66
|
-
"eslint": "^8.48.0",
|
|
67
|
-
"feathers-pinia": "^4.0.0",
|
|
68
|
-
"fuse.js": "^6.6.2",
|
|
69
|
-
"mobile-detect": "^1.4.5",
|
|
70
|
-
"nuxt": "^3.6.5",
|
|
71
|
-
"nuxt-icon": "^0.5.0",
|
|
72
|
-
"ohmyfetch": "^0.4.21",
|
|
73
|
-
"pinia": "^2.1.6",
|
|
74
|
-
"postcss": "^8.4.28",
|
|
75
|
-
"tailwindcss": "^3.3.3",
|
|
76
|
-
"typescript": "^5.2.2",
|
|
77
|
-
"unplugin-icons": "^0.16.5",
|
|
78
|
-
"vue": "^3.3.4"
|
|
68
|
+
"@antfu/eslint-config": "^4.12.0",
|
|
69
|
+
"@stylistic/eslint-plugin": "^4.2.0",
|
|
70
|
+
"@tailwindcss/typography": "^0.5.16",
|
|
71
|
+
"@tailwindcss/vite": "^4.1.5",
|
|
72
|
+
"@types/pikaday": "^1.7.9",
|
|
73
|
+
"daisyui": "^5.0.35",
|
|
74
|
+
"eslint": "^9.26.0",
|
|
75
|
+
"tailwindcss": "^4.1.5"
|
|
79
76
|
}
|
|
80
77
|
}
|
package/components/Alert.vue
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props: any = defineProps<{
|
|
5
|
-
type?: string
|
|
6
|
-
info?: boolean
|
|
7
|
-
success?: boolean
|
|
8
|
-
warning?: boolean
|
|
9
|
-
error?: boolean
|
|
10
|
-
}>()
|
|
11
|
-
const classes = computed(() => {
|
|
12
|
-
return {
|
|
13
|
-
'alert-info': props.info || props.type === 'info',
|
|
14
|
-
'alert-success': props.success || props.type === 'success',
|
|
15
|
-
'alert-warning': props.warning || props.type === 'warning',
|
|
16
|
-
'alert-error': props.error || props.type === 'error',
|
|
17
|
-
}
|
|
18
|
-
})
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<template>
|
|
22
|
-
<div class="alert" :class="classes">
|
|
23
|
-
<slot />
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
package/components/Artboard.vue
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
demo?: boolean
|
|
6
|
-
horizontal?: boolean
|
|
7
|
-
size?: string
|
|
8
|
-
phone1?: boolean
|
|
9
|
-
phone2?: boolean
|
|
10
|
-
phone3?: boolean
|
|
11
|
-
phone4?: boolean
|
|
12
|
-
phone5?: boolean
|
|
13
|
-
phone6?: boolean
|
|
14
|
-
}>()
|
|
15
|
-
const classes = computed(() => {
|
|
16
|
-
return {
|
|
17
|
-
'artboard-demo': props.demo,
|
|
18
|
-
'horizontal': props.horizontal,
|
|
19
|
-
'phone-1': props.phone1 || props.size === 'phone-1',
|
|
20
|
-
'phone-2': props.phone2 || props.size === 'phone-2',
|
|
21
|
-
'phone-3': props.phone3 || props.size === 'phone-3',
|
|
22
|
-
'phone-4': props.phone4 || props.size === 'phone-4',
|
|
23
|
-
'phone-5': props.phone5 || props.size === 'phone-5',
|
|
24
|
-
'phone-6': props.phone6 || props.size === 'phone-6',
|
|
25
|
-
}
|
|
26
|
-
})
|
|
27
|
-
</script>
|
|
28
|
-
|
|
29
|
-
<template>
|
|
30
|
-
<div class="artboard" :class="classes">
|
|
31
|
-
<slot />
|
|
32
|
-
</div>
|
|
33
|
-
</template>
|
package/components/Avatar.vue
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
import { makeMaskClasses, maskProps } from './Mask.config'
|
|
4
|
-
import Mask from './Mask.vue'
|
|
5
|
-
|
|
6
|
-
const props = defineProps({
|
|
7
|
-
backgroundColor: { type: String, default: '#BBB' },
|
|
8
|
-
maskClasses: String,
|
|
9
|
-
showStatus: Boolean,
|
|
10
|
-
online: Boolean,
|
|
11
|
-
...maskProps,
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
const classes = computed(() => {
|
|
15
|
-
return {
|
|
16
|
-
online: props.showStatus && props.online,
|
|
17
|
-
}
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
const internalMaskClasses = makeMaskClasses(props)
|
|
21
|
-
const allMaskClasses = computed(() => {
|
|
22
|
-
const classes = internalMaskClasses.value
|
|
23
|
-
const hasMaskClass = Object.values(classes).find(v => v)
|
|
24
|
-
// Enable rounded-btn class only if no mask classes are applied
|
|
25
|
-
Object.assign(classes, { 'rounded-btn': !hasMaskClass })
|
|
26
|
-
return classes
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
const color = computed(() => {
|
|
30
|
-
return `#${contrastingColor(props.backgroundColor.replace('#', ''))}`
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
function contrastingColor(color: any) {
|
|
34
|
-
return (luma(color) >= 155) ? '000' : 'fff'
|
|
35
|
-
}
|
|
36
|
-
// color can be a hx string or an array of RGB values 0-255
|
|
37
|
-
function luma(color: any) {
|
|
38
|
-
const rgb = (typeof color === 'string') ? hexToRGBArray(color) : color
|
|
39
|
-
return (0.2126 * rgb[0]) + (0.7152 * rgb[1]) + (0.0722 * rgb[2]) // SMPTE C, Rec. 709 weightings
|
|
40
|
-
}
|
|
41
|
-
function hexToRGBArray(color: any) {
|
|
42
|
-
if (color.length === 3)
|
|
43
|
-
color = color.charAt(0) + color.charAt(0) + color.charAt(1) + color.charAt(1) + color.charAt(2) + color.charAt(2)
|
|
44
|
-
else if (color.length !== 6)
|
|
45
|
-
throw new Error(`Invalid hex color: ${color}`)
|
|
46
|
-
const rgb = []
|
|
47
|
-
for (let i = 0; i <= 2; i++)
|
|
48
|
-
rgb[i] = Number.parseInt(color.substr(i * 2, 2), 16)
|
|
49
|
-
return rgb
|
|
50
|
-
}
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
<template>
|
|
54
|
-
<div class="avatar" :class="classes">
|
|
55
|
-
<Mask :style="{ backgroundColor, color }" class="w-full h-full avatar-mask aspect-square" :class="[allMaskClasses, maskClasses]">
|
|
56
|
-
<slot />
|
|
57
|
-
</Mask>
|
|
58
|
-
</div>
|
|
59
|
-
</template>
|
|
60
|
-
|
|
61
|
-
<style lang="postcss">
|
|
62
|
-
.avatar-mask > * {
|
|
63
|
-
aspect-ratio: 1/1;
|
|
64
|
-
width: 100%;
|
|
65
|
-
height: 100%;
|
|
66
|
-
display: flex;
|
|
67
|
-
align-items: center;
|
|
68
|
-
justify-content: center;
|
|
69
|
-
}
|
|
70
|
-
</style>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps({
|
|
5
|
-
vertical: Boolean,
|
|
6
|
-
})
|
|
7
|
-
const classes = computed(() => {
|
|
8
|
-
return {
|
|
9
|
-
'flex-col': props.vertical,
|
|
10
|
-
'flex-row': !props.vertical,
|
|
11
|
-
}
|
|
12
|
-
})
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<template>
|
|
16
|
-
<div class="avatar-group" :class="classes">
|
|
17
|
-
<slot />
|
|
18
|
-
</div>
|
|
19
|
-
</template>
|
package/components/Badge.vue
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
outline?: boolean
|
|
6
|
-
|
|
7
|
-
size?: string
|
|
8
|
-
lg?: boolean
|
|
9
|
-
md?: boolean
|
|
10
|
-
sm?: boolean
|
|
11
|
-
xs?: boolean
|
|
12
|
-
|
|
13
|
-
color?: string
|
|
14
|
-
neutral?: boolean
|
|
15
|
-
primary?: boolean
|
|
16
|
-
secondary?: boolean
|
|
17
|
-
accent?: boolean
|
|
18
|
-
info?: boolean
|
|
19
|
-
success?: boolean
|
|
20
|
-
warning?: boolean
|
|
21
|
-
error?: boolean
|
|
22
|
-
|
|
23
|
-
ghost?: boolean
|
|
24
|
-
}>()
|
|
25
|
-
|
|
26
|
-
const classes = computed(() => {
|
|
27
|
-
return {
|
|
28
|
-
'badge-outline': props.outline,
|
|
29
|
-
'badge-ghost': props.ghost,
|
|
30
|
-
'badge-lg': props.lg || props.size === 'lg',
|
|
31
|
-
'badge-md': props.md || props.size === 'md',
|
|
32
|
-
'badge-sm': props.sm || props.size === 'sm',
|
|
33
|
-
'badge-xs': props.xs || props.size === 'xs',
|
|
34
|
-
'badge-neutral': props.neutral || props.color === 'neutral',
|
|
35
|
-
'badge-primary': props.primary || props.color === 'primary',
|
|
36
|
-
'badge-secondary': props.secondary || props.color === 'secondary',
|
|
37
|
-
'badge-accent': props.accent || props.color === 'accent',
|
|
38
|
-
'badge-info': props.info || props.color === 'info',
|
|
39
|
-
'badge-success': props.success || props.color === 'success',
|
|
40
|
-
'badge-warning': props.warning || props.color === 'warning',
|
|
41
|
-
'badge-error': props.error || props.color === 'error',
|
|
42
|
-
}
|
|
43
|
-
})
|
|
44
|
-
</script>
|
|
45
|
-
|
|
46
|
-
<template>
|
|
47
|
-
<div class="badge" :class="classes">
|
|
48
|
-
<slot />
|
|
49
|
-
</div>
|
|
50
|
-
</template>
|
package/components/BottomNav.vue
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
size?: string
|
|
6
|
-
lg?: boolean
|
|
7
|
-
md?: boolean
|
|
8
|
-
sm?: boolean
|
|
9
|
-
xs?: boolean
|
|
10
|
-
}>()
|
|
11
|
-
const classes = computed(() => {
|
|
12
|
-
return {
|
|
13
|
-
'btm-nav-lg': props.lg || props.size === 'lg',
|
|
14
|
-
'btm-nav-md': props.md || props.size === 'md',
|
|
15
|
-
'btm-nav-sm': props.sm || props.size === 'sm',
|
|
16
|
-
'btm-nav-xs': props.xs || props.size === 'xs',
|
|
17
|
-
}
|
|
18
|
-
})
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<template>
|
|
22
|
-
<div class="btm-nav" :class="classes">
|
|
23
|
-
<slot />
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
package/components/Button.vue
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
is?: string
|
|
6
|
-
join?: 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
|
-
ghost?: boolean
|
|
19
|
-
link?: boolean
|
|
20
|
-
glass?: boolean
|
|
21
|
-
outline?: boolean
|
|
22
|
-
disabled?: boolean
|
|
23
|
-
|
|
24
|
-
shape?: 'circle' | 'square' | 'wide' | 'block'
|
|
25
|
-
circle?: boolean
|
|
26
|
-
square?: boolean
|
|
27
|
-
wide?: boolean
|
|
28
|
-
block?: boolean
|
|
29
|
-
|
|
30
|
-
noAnimation?: boolean
|
|
31
|
-
active?: boolean
|
|
32
|
-
|
|
33
|
-
size?: 'lg' | 'md' | 'sm' | 'xs'
|
|
34
|
-
lg?: boolean
|
|
35
|
-
md?: boolean
|
|
36
|
-
sm?: boolean
|
|
37
|
-
xs?: boolean
|
|
38
|
-
|
|
39
|
-
type?: 'button' | 'submit' | 'reset'
|
|
40
|
-
}>()
|
|
41
|
-
|
|
42
|
-
const classes = computed(() => {
|
|
43
|
-
return {
|
|
44
|
-
'join-item': props.join,
|
|
45
|
-
|
|
46
|
-
'btn-primary': !props.disabled && (props.primary || props.color === 'primary'),
|
|
47
|
-
'btn-secondary': !props.disabled && (props.secondary || props.color === 'secondary'),
|
|
48
|
-
'btn-neutral': !props.disabled && (props.neutral || props.color === 'neutral'),
|
|
49
|
-
'btn-accent': !props.disabled && (props.accent || props.color === 'accent'),
|
|
50
|
-
'btn-info': !props.disabled && (props.info || props.color === 'info'),
|
|
51
|
-
'btn-success': !props.disabled && (props.success || props.color === 'success'),
|
|
52
|
-
'btn-warning': !props.disabled && (props.warning || props.color === 'warning'),
|
|
53
|
-
'btn-error': !props.disabled && (props.error || props.color === 'error'),
|
|
54
|
-
|
|
55
|
-
'text-primary': !props.disabled && (props.primary || props.color === 'primary') && props.link,
|
|
56
|
-
'text-secondary': !props.disabled && (props.secondary || props.color === 'secondary') && props.link,
|
|
57
|
-
'text-neutral': !props.disabled && (props.neutral || props.color === 'neutral') && props.link,
|
|
58
|
-
'text-accent': !props.disabled && (props.accent || props.color === 'accent') && props.link,
|
|
59
|
-
'text-info': !props.disabled && (props.info || props.color === 'info') && props.link,
|
|
60
|
-
'text-success': !props.disabled && (props.success || props.color === 'success') && props.link,
|
|
61
|
-
'text-warning': !props.disabled && (props.warning || props.color === 'warning') && props.link,
|
|
62
|
-
'text-error': !props.disabled && (props.error || props.color === 'error') && props.link,
|
|
63
|
-
|
|
64
|
-
'glass': !props.disabled && props.glass,
|
|
65
|
-
|
|
66
|
-
'btn-circle': props.circle || props.shape === 'circle',
|
|
67
|
-
'btn-square': props.square || props.shape === 'square',
|
|
68
|
-
'btn-wide': props.wide || props.shape === 'wide',
|
|
69
|
-
'btn-block': props.block || props.shape === 'block',
|
|
70
|
-
|
|
71
|
-
'btn-lg': props.lg || props.size === 'lg',
|
|
72
|
-
'btn-md': props.md || props.size === 'md',
|
|
73
|
-
'btn-sm': props.sm || props.size === 'sm',
|
|
74
|
-
'btn-xs': props.xs || props.size === 'xs',
|
|
75
|
-
|
|
76
|
-
'btn-outline': !props.disabled && props.outline,
|
|
77
|
-
'btn-ghost': !props.disabled && props.ghost,
|
|
78
|
-
'btn-link': !props.disabled && props.link,
|
|
79
|
-
'btn-disabled': props.disabled,
|
|
80
|
-
|
|
81
|
-
'no-animation': props.noAnimation,
|
|
82
|
-
'btn-active': !props.disabled && props.active,
|
|
83
|
-
}
|
|
84
|
-
})
|
|
85
|
-
|
|
86
|
-
// Accessibility-friendly attributes for disabling the button
|
|
87
|
-
const disabledAttrs = computed(() => {
|
|
88
|
-
if (props.disabled) {
|
|
89
|
-
return {
|
|
90
|
-
'tabindex': -1,
|
|
91
|
-
'role': 'button',
|
|
92
|
-
'aria-disabled': true,
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
return {}
|
|
97
|
-
}
|
|
98
|
-
})
|
|
99
|
-
</script>
|
|
100
|
-
|
|
101
|
-
<template>
|
|
102
|
-
<component
|
|
103
|
-
:is="is || 'button'"
|
|
104
|
-
:type="type"
|
|
105
|
-
class="btn"
|
|
106
|
-
:class="[classes]"
|
|
107
|
-
v-bind="{ ...disabledAttrs, ...$attrs }"
|
|
108
|
-
>
|
|
109
|
-
<slot />
|
|
110
|
-
</component>
|
|
111
|
-
</template>
|
package/components/Card.vue
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = withDefaults(defineProps<{
|
|
5
|
-
is?: string | Object | Function
|
|
6
|
-
bordered?: boolean
|
|
7
|
-
compact?: boolean
|
|
8
|
-
side?: boolean
|
|
9
|
-
imageFull?: boolean
|
|
10
|
-
glass?: boolean
|
|
11
|
-
}>(), {
|
|
12
|
-
is: 'div',
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
const classes = computed(() => {
|
|
16
|
-
return {
|
|
17
|
-
'card-bordered': props.bordered,
|
|
18
|
-
'card-compact': props.compact,
|
|
19
|
-
'card-side': props.side,
|
|
20
|
-
'image-full': props.imageFull,
|
|
21
|
-
'glass': props.glass,
|
|
22
|
-
}
|
|
23
|
-
})
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<template>
|
|
27
|
-
<component :is="is" class="card" :class="classes">
|
|
28
|
-
<slot />
|
|
29
|
-
</component>
|
|
30
|
-
</template>
|
package/components/Carousel.vue
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
snapTo?: 'center' | 'end'
|
|
6
|
-
center?: boolean
|
|
7
|
-
end?: boolean
|
|
8
|
-
vertical?: boolean
|
|
9
|
-
}>()
|
|
10
|
-
|
|
11
|
-
const classes = computed(() => {
|
|
12
|
-
const { snapTo, center, end, vertical } = props
|
|
13
|
-
return {
|
|
14
|
-
'carousel-center': center || snapTo === 'center',
|
|
15
|
-
'carousel-end': end || snapTo === 'end',
|
|
16
|
-
'carousel-vertical': vertical,
|
|
17
|
-
}
|
|
18
|
-
})
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<template>
|
|
22
|
-
<div class="carousel" :class="classes">
|
|
23
|
-
<slot />
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
package/components/Chat.vue
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = withDefaults(defineProps<{
|
|
5
|
-
pre?: boolean
|
|
6
|
-
align?: string
|
|
7
|
-
start?: boolean
|
|
8
|
-
end?: boolean
|
|
9
|
-
}>(), {
|
|
10
|
-
align: 'start',
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
const classes = computed(() => {
|
|
14
|
-
const { align, start, end } = props
|
|
15
|
-
return {
|
|
16
|
-
'chat-start': start || (!end && align === 'start'),
|
|
17
|
-
'chat-end': end || align === 'end',
|
|
18
|
-
'whitespace-pre': props.pre,
|
|
19
|
-
}
|
|
20
|
-
})
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<template>
|
|
24
|
-
<div class="chat" :class="classes">
|
|
25
|
-
<slot />
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
color?: string
|
|
6
|
-
neutral?: boolean
|
|
7
|
-
primary?: boolean
|
|
8
|
-
secondary?: boolean
|
|
9
|
-
accent?: boolean
|
|
10
|
-
info?: boolean
|
|
11
|
-
success?: boolean
|
|
12
|
-
warning?: boolean
|
|
13
|
-
error?: boolean
|
|
14
|
-
}>()
|
|
15
|
-
|
|
16
|
-
const classes = computed(() => {
|
|
17
|
-
return {
|
|
18
|
-
'badge-neutral': props.neutral || props.color === 'neutral',
|
|
19
|
-
'badge-primary': props.primary || props.color === 'primary',
|
|
20
|
-
'badge-secondary': props.secondary || props.color === 'secondary',
|
|
21
|
-
'badge-accent': props.accent || props.color === 'accent',
|
|
22
|
-
'badge-info': props.info || props.color === 'info',
|
|
23
|
-
'badge-success': props.success || props.color === 'success',
|
|
24
|
-
'badge-warning': props.warning || props.color === 'warning',
|
|
25
|
-
'badge-error': props.error || props.color === 'error',
|
|
26
|
-
}
|
|
27
|
-
})
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<template>
|
|
31
|
-
<div class="chat-bubble" :class="classes">
|
|
32
|
-
<slot />
|
|
33
|
-
</div>
|
|
34
|
-
</template>
|