@dolanske/vui 1.0.1 → 1.0.3
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/LICENSE +673 -673
- package/README.md +42 -42
- package/dist/components/Accordion/Accordion.vue.d.ts +2 -3
- package/dist/components/Accordion/AccordionGroup.vue.d.ts +2 -5
- package/dist/components/Alert/Alert.vue.d.ts +2 -3
- package/dist/components/Avatar/Avatar.vue.d.ts +2 -3
- package/dist/components/Badge/Badge.vue.d.ts +2 -3
- package/dist/components/Breadcrumbs/BreadcrumbItem.vue.d.ts +2 -3
- package/dist/components/Breadcrumbs/Breadcrumbs.vue.d.ts +2 -3
- package/dist/components/Button/Button.vue.d.ts +2 -3
- package/dist/components/ButtonGroup/ButtonGroup.vue.d.ts +2 -3
- package/dist/components/Calendar/Calendar.vue.d.ts +6 -6
- package/dist/components/Card/Card.vue.d.ts +3 -4
- package/dist/components/Checkbox/Checkbox.vue.d.ts +6 -7
- package/dist/components/CopyClipboard/CopyClipboard.vue.d.ts +1 -2
- package/dist/components/Divider/Divider.vue.d.ts +2 -3
- package/dist/components/Drawer/Drawer.vue.d.ts +5 -6
- package/dist/components/Dropdown/Dropdown.vue.d.ts +3 -66
- package/dist/components/Dropdown/DropdownItem.vue.d.ts +2 -3
- package/dist/components/Dropdown/DropdownTitle.vue.d.ts +6 -6
- package/dist/components/Flex/Flex.vue.d.ts +2 -3
- package/dist/components/Grid/Grid.vue.d.ts +2 -3
- package/dist/components/Input/Color.vue.d.ts +5 -5
- package/dist/components/Input/Counter.vue.d.ts +5 -5
- package/dist/components/Input/Dropzone.vue.d.ts +10 -95
- package/dist/components/Input/File.vue.d.ts +3 -4
- package/dist/components/Input/Input.vue.d.ts +6 -7
- package/dist/components/Input/Password.vue.d.ts +1 -1
- package/dist/components/Input/Textarea.vue.d.ts +6 -7
- package/dist/components/Kbd/Kbd.vue.d.ts +1 -1
- package/dist/components/Kbd/KbdGroup.vue.d.ts +1 -2
- package/dist/components/Modal/Confirm.vue.d.ts +5 -6
- package/dist/components/Modal/Modal.vue.d.ts +5 -6
- package/dist/components/OTP/OTP.vue.d.ts +6 -7
- package/dist/components/OTP/OTPItem.vue.d.ts +1 -1
- package/dist/components/Pagination/Pagination.vue.d.ts +2 -3
- package/dist/components/Popout/Popout.vue.d.ts +2 -3
- package/dist/components/Progress/Progress.vue.d.ts +5 -5
- package/dist/components/Radio/Radio.vue.d.ts +6 -7
- package/dist/components/Radio/RadioGroup.vue.d.ts +6 -7
- package/dist/components/Select/Select.vue.d.ts +8 -4
- package/dist/components/Sheet/Sheet.vue.d.ts +5 -6
- package/dist/components/Sidebar/Sidebar.vue.d.ts +6 -7
- package/dist/components/Skeleton/Skeleton.vue.d.ts +1 -1
- package/dist/components/Spinner/Spinner.vue.d.ts +1 -1
- package/dist/components/Switch/Switch.vue.d.ts +6 -7
- package/dist/components/Table/Cell.vue.d.ts +2 -5
- package/dist/components/Table/Head.vue.d.ts +2 -3
- package/dist/components/Table/Root.vue.d.ts +2 -3
- package/dist/components/Table/table.d.ts +2 -2
- package/dist/components/Tabs/Tab.vue.d.ts +2 -3
- package/dist/components/Tabs/Tabs.vue.d.ts +6 -7
- package/dist/components/Toast/toast.d.ts +6 -6
- package/dist/components/Tooltip/Tooltip.vue.d.ts +1 -2
- package/dist/internal/Backdrop/Backdrop.vue.d.ts +2 -3
- package/dist/{vui.css → style.css} +1 -1
- package/dist/vui.js +5318 -5449
- package/package.json +72 -72
- package/src/App.vue +95 -95
- package/src/components/Accordion/Accordion.vue +91 -91
- package/src/components/Accordion/AccordionGroup.vue +43 -43
- package/src/components/Accordion/accordion.scss +82 -82
- package/src/components/Alert/Alert.vue +59 -59
- package/src/components/Alert/alert.scss +161 -161
- package/src/components/Avatar/Avatar.vue +53 -53
- package/src/components/Avatar/avatar.scss +52 -52
- package/src/components/Badge/Badge.vue +21 -21
- package/src/components/Badge/badge.scss +206 -206
- package/src/components/Breadcrumbs/BreadcrumbItem.vue +26 -26
- package/src/components/Breadcrumbs/Breadcrumbs.vue +30 -32
- package/src/components/Breadcrumbs/breadcrumbs.scss +31 -31
- package/src/components/Button/Button.vue +85 -85
- package/src/components/Button/button.scss +279 -279
- package/src/components/ButtonGroup/ButtonGroup.vue +28 -28
- package/src/components/ButtonGroup/button-group.scss +51 -51
- package/src/components/Calendar/Calendar.vue +66 -66
- package/src/components/Calendar/calendar.scss +83 -83
- package/src/components/Card/Card.vue +48 -48
- package/src/components/Card/card.scss +53 -53
- package/src/components/Checkbox/Checkbox.vue +54 -54
- package/src/components/Checkbox/checkbox.scss +80 -80
- package/src/components/CopyClipboard/CopyClipboard.vue +91 -91
- package/src/components/CopyClipboard/copy-clipboard.scss +25 -25
- package/src/components/Divider/Divider.vue +44 -44
- package/src/components/Divider/divider.scss +35 -35
- package/src/components/Drawer/Drawer.vue +97 -97
- package/src/components/Drawer/drawer.scss +37 -37
- package/src/components/Dropdown/Dropdown.vue +135 -135
- package/src/components/Dropdown/DropdownItem.vue +33 -33
- package/src/components/Dropdown/DropdownTitle.vue +14 -14
- package/src/components/Dropdown/dropdown-item.scss +84 -84
- package/src/components/Dropdown/dropdown.scss +53 -53
- package/src/components/Flex/Flex.vue +113 -113
- package/src/components/Grid/Grid.vue +80 -80
- package/src/components/Input/Color.vue +26 -26
- package/src/components/Input/Counter.vue +66 -66
- package/src/components/Input/Dropzone.vue +65 -65
- package/src/components/Input/File.vue +15 -15
- package/src/components/Input/Input.vue +123 -123
- package/src/components/Input/Password.vue +35 -35
- package/src/components/Input/Textarea.vue +78 -78
- package/src/components/Input/input.scss +302 -302
- package/src/components/Kbd/Kbd.vue +48 -48
- package/src/components/Kbd/KbdGroup.vue +27 -27
- package/src/components/Kbd/kbd.scss +19 -19
- package/src/components/Modal/Confirm.vue +56 -56
- package/src/components/Modal/Modal.vue +99 -99
- package/src/components/Modal/modal.scss +54 -54
- package/src/components/OTP/OTP.vue +133 -133
- package/src/components/OTP/OTPItem.vue +37 -37
- package/src/components/OTP/otp.scss +84 -84
- package/src/components/Pagination/Pagination.vue +77 -77
- package/src/components/Pagination/pagination.ts +78 -78
- package/src/components/Popout/Popout.vue +52 -52
- package/src/components/Popout/popout.scss +15 -15
- package/src/components/Progress/Progress.vue +103 -103
- package/src/components/Progress/progress.scss +47 -47
- package/src/components/Radio/Radio.vue +38 -38
- package/src/components/Radio/RadioGroup.vue +40 -40
- package/src/components/Radio/radio.scss +78 -78
- package/src/components/Select/Select.vue +211 -211
- package/src/components/Select/select.scss +77 -77
- package/src/components/Sheet/Sheet.vue +98 -98
- package/src/components/Sheet/sheet.scss +69 -69
- package/src/components/Sidebar/Sidebar.vue +115 -115
- package/src/components/Sidebar/sidebar.scss +124 -124
- package/src/components/Skeleton/Skeleton.vue +43 -43
- package/src/components/Skeleton/skeleton.scss +14 -14
- package/src/components/Spinner/Spinner.vue +42 -42
- package/src/components/Spinner/spinner.scss +47 -47
- package/src/components/Switch/Switch.vue +31 -31
- package/src/components/Switch/switch.scss +93 -93
- package/src/components/Table/Cell.vue +23 -23
- package/src/components/Table/Head.vue +59 -59
- package/src/components/Table/Root.vue +66 -66
- package/src/components/Table/SelectAll.vue +23 -23
- package/src/components/Table/SelectRow.vue +30 -30
- package/src/components/Table/index.ts +7 -7
- package/src/components/Table/table.scss +154 -154
- package/src/components/Table/table.ts +248 -248
- package/src/components/Tabs/Tab.vue +25 -25
- package/src/components/Tabs/Tabs.vue +89 -89
- package/src/components/Tabs/tabs.scss +87 -87
- package/src/components/Toast/Toasts.vue +52 -52
- package/src/components/Toast/toast.scss +45 -45
- package/src/components/Toast/toast.ts +75 -75
- package/src/components/Tooltip/Tooltip.vue +86 -86
- package/src/components/Tooltip/tooltip.scss +8 -8
- package/src/examples/ExampleAccordions.vue +58 -58
- package/src/examples/ExampleAlerts.vue +78 -78
- package/src/examples/ExampleAvatars.vue +44 -44
- package/src/examples/ExampleBadges.vue +48 -48
- package/src/examples/ExampleBreadcrumbs.vue +46 -46
- package/src/examples/ExampleButtons.vue +140 -140
- package/src/examples/ExampleCalendars.vue +40 -40
- package/src/examples/ExampleCards.vue +94 -94
- package/src/examples/ExampleCheckboxes.vue +123 -123
- package/src/examples/ExampleCopyClipboard.vue +47 -47
- package/src/examples/ExampleDividers.vue +39 -39
- package/src/examples/ExampleDrawers.vue +67 -67
- package/src/examples/ExampleDropdowns.vue +114 -114
- package/src/examples/ExampleFlexGrid.vue +122 -122
- package/src/examples/ExampleInputs.vue +234 -234
- package/src/examples/ExampleKBD.vue +65 -65
- package/src/examples/ExampleModals.vue +143 -143
- package/src/examples/ExamplePalette.vue +159 -159
- package/src/examples/ExamplePopouts.vue +41 -41
- package/src/examples/ExampleSheets.vue +77 -77
- package/src/examples/ExampleSidebars.vue +270 -270
- package/src/examples/ExampleSkeletons.vue +26 -26
- package/src/examples/ExampleSpinners.vue +78 -78
- package/src/examples/ExampleTables.vue +195 -195
- package/src/examples/ExampleTabs.vue +119 -119
- package/src/examples/ExampleToasts.vue +96 -96
- package/src/examples/ExampleTooltips.vue +70 -70
- package/src/examples/shared/ExampleColor.vue +28 -28
- package/src/index.scss +1 -1
- package/src/index.ts +116 -116
- package/src/internal/Backdrop/Backdrop.vue +22 -22
- package/src/internal/Backdrop/backdrop.scss +34 -34
- package/src/main.ts +5 -5
- package/src/shared/helpers.ts +117 -117
- package/src/shared/theme.ts +22 -22
- package/src/shared/types.ts +29 -29
- package/src/style/animation.scss +22 -22
- package/src/style/core.scss +125 -125
- package/src/style/layout.scss +233 -233
- package/src/style/media-query.scss +29 -29
- package/src/style/reset.scss +135 -135
- package/src/style/text.scss +124 -92
- package/src/style/theme.scss +195 -195
- package/src/style/tooltip.scss +146 -146
- package/src/style/typography.scss +415 -415
- package/src/style/utils.scss +36 -36
package/package.json
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@dolanske/vui",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
5
|
-
"private": false,
|
|
6
|
-
"description": "Brother in Christ there's a new UI library",
|
|
7
|
-
"author": "dolanske",
|
|
8
|
-
"license": "GPL-3.0",
|
|
9
|
-
"sass": "src/index.scss",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "https://github.com/dolanske/vui.git"
|
|
13
|
-
},
|
|
14
|
-
"keywords": [
|
|
15
|
-
"vue",
|
|
16
|
-
"vue3",
|
|
17
|
-
"component"
|
|
18
|
-
],
|
|
19
|
-
"exports": {
|
|
20
|
-
".": {
|
|
21
|
-
"types": "./dist/index.d.ts",
|
|
22
|
-
"import": "./dist/vui.js"
|
|
23
|
-
},
|
|
24
|
-
"./style": {
|
|
25
|
-
"import": "./dist/
|
|
26
|
-
"require": "./dist/
|
|
27
|
-
"default": "./dist/
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"main": "./dist/
|
|
31
|
-
"module": "./dist/vui.js",
|
|
32
|
-
"browser": "./dist/vui.js",
|
|
33
|
-
"unpkg": "./dist/vui.js",
|
|
34
|
-
"types": "./dist/index.d.ts",
|
|
35
|
-
"files": [
|
|
36
|
-
"./dist/*",
|
|
37
|
-
"./src/*",
|
|
38
|
-
"LICENSE",
|
|
39
|
-
"README.md"
|
|
40
|
-
],
|
|
41
|
-
"scripts": {
|
|
42
|
-
"dev": "vite",
|
|
43
|
-
"build": "vue-tsc -b && vite build",
|
|
44
|
-
"preview": "vite preview",
|
|
45
|
-
"lint": "eslint .",
|
|
46
|
-
"lint:fix": "eslint . --fix",
|
|
47
|
-
"test": "vitest"
|
|
48
|
-
},
|
|
49
|
-
"dependencies": {
|
|
50
|
-
"@floating-ui/vue": "^1.1.6",
|
|
51
|
-
"@types/node": "^22.13.2",
|
|
52
|
-
"@vuepic/vue-datepicker": "^11.0.1",
|
|
53
|
-
"@vueuse/core": "^12.5.0",
|
|
54
|
-
"sass": "^1.84.0",
|
|
55
|
-
"vaul-vue": "^0.2.1",
|
|
56
|
-
"vite-plugin-dts": "^4.5.0",
|
|
57
|
-
"vue": "^3.5.13"
|
|
58
|
-
},
|
|
59
|
-
"devDependencies": {
|
|
60
|
-
"@antfu/eslint-config": "^4.2.0",
|
|
61
|
-
"@iconify/vue": "^4.3.0",
|
|
62
|
-
"@vitejs/plugin-vue": "^5.2.1",
|
|
63
|
-
"@vue/test-utils": "^2.4.6",
|
|
64
|
-
"eslint": "^9.20.1",
|
|
65
|
-
"eslint-plugin-format": "^1.0.1",
|
|
66
|
-
"jsdom": "^26.0.0",
|
|
67
|
-
"typescript": "^5.7.3",
|
|
68
|
-
"vite": "^6.1.0",
|
|
69
|
-
"vitest": "^3.0.5",
|
|
70
|
-
"vue-tsc": "^2.2.0"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@dolanske/vui",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.0.3",
|
|
5
|
+
"private": false,
|
|
6
|
+
"description": "Brother in Christ there's a new UI library",
|
|
7
|
+
"author": "dolanske",
|
|
8
|
+
"license": "GPL-3.0",
|
|
9
|
+
"sass": "src/index.scss",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/dolanske/vui.git"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"vue",
|
|
16
|
+
"vue3",
|
|
17
|
+
"component"
|
|
18
|
+
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"import": "./dist/vui.js"
|
|
23
|
+
},
|
|
24
|
+
"./style": {
|
|
25
|
+
"import": "./dist/vui.css",
|
|
26
|
+
"require": "./dist/vui.css",
|
|
27
|
+
"default": "./dist/vui.css"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"main": "./dist/vui.js",
|
|
31
|
+
"module": "./dist/vui.js",
|
|
32
|
+
"browser": "./dist/vui.js",
|
|
33
|
+
"unpkg": "./dist/vui.js",
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"files": [
|
|
36
|
+
"./dist/*",
|
|
37
|
+
"./src/*",
|
|
38
|
+
"LICENSE",
|
|
39
|
+
"README.md"
|
|
40
|
+
],
|
|
41
|
+
"scripts": {
|
|
42
|
+
"dev": "vite",
|
|
43
|
+
"build": "vue-tsc -b && vite build",
|
|
44
|
+
"preview": "vite preview",
|
|
45
|
+
"lint": "eslint .",
|
|
46
|
+
"lint:fix": "eslint . --fix",
|
|
47
|
+
"test": "vitest"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@floating-ui/vue": "^1.1.6",
|
|
51
|
+
"@types/node": "^22.13.2",
|
|
52
|
+
"@vuepic/vue-datepicker": "^11.0.1",
|
|
53
|
+
"@vueuse/core": "^12.5.0",
|
|
54
|
+
"sass": "^1.84.0",
|
|
55
|
+
"vaul-vue": "^0.2.1",
|
|
56
|
+
"vite-plugin-dts": "^4.5.0",
|
|
57
|
+
"vue": "^3.5.13"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@antfu/eslint-config": "^4.2.0",
|
|
61
|
+
"@iconify/vue": "^4.3.0",
|
|
62
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
63
|
+
"@vue/test-utils": "^2.4.6",
|
|
64
|
+
"eslint": "^9.20.1",
|
|
65
|
+
"eslint-plugin-format": "^1.0.1",
|
|
66
|
+
"jsdom": "^26.0.0",
|
|
67
|
+
"typescript": "^5.7.3",
|
|
68
|
+
"vite": "^6.1.0",
|
|
69
|
+
"vitest": "^3.0.5",
|
|
70
|
+
"vue-tsc": "^2.2.0"
|
|
71
|
+
}
|
|
72
|
+
}
|
package/src/App.vue
CHANGED
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import Divider from './components/Divider/Divider.vue'
|
|
3
|
-
import ExampleAccordions from './examples/ExampleAccordions.vue'
|
|
4
|
-
import ExampleAlerts from './examples/ExampleAlerts.vue'
|
|
5
|
-
import ExampleAvatars from './examples/ExampleAvatars.vue'
|
|
6
|
-
import ExampleBadges from './examples/ExampleBadges.vue'
|
|
7
|
-
import ExampleBreadcrumbs from './examples/ExampleBreadcrumbs.vue'
|
|
8
|
-
import ExampleButtons from './examples/ExampleButtons.vue'
|
|
9
|
-
import ExampleCalendars from './examples/ExampleCalendars.vue'
|
|
10
|
-
import ExampleCards from './examples/ExampleCards.vue'
|
|
11
|
-
import ExampleCheckboxes from './examples/ExampleCheckboxes.vue'
|
|
12
|
-
import ExampleCopyClipboard from './examples/ExampleCopyClipboard.vue'
|
|
13
|
-
import ExampleDividers from './examples/ExampleDividers.vue'
|
|
14
|
-
import ExampleDrawers from './examples/ExampleDrawers.vue'
|
|
15
|
-
import ExampleDropdowns from './examples/ExampleDropdowns.vue'
|
|
16
|
-
import ExampleFlexGrid from './examples/ExampleFlexGrid.vue'
|
|
17
|
-
import ExampleInputs from './examples/ExampleInputs.vue'
|
|
18
|
-
import ExampleKBD from './examples/ExampleKBD.vue'
|
|
19
|
-
import ExampleModals from './examples/ExampleModals.vue'
|
|
20
|
-
import ExamplePalette from './examples/ExamplePalette.vue'
|
|
21
|
-
import ExamplePopouts from './examples/ExamplePopouts.vue'
|
|
22
|
-
import ExampleSheets from './examples/ExampleSheets.vue'
|
|
23
|
-
import ExampleSidebars from './examples/ExampleSidebars.vue'
|
|
24
|
-
import ExampleSkeletons from './examples/ExampleSkeletons.vue'
|
|
25
|
-
import ExampleSpinners from './examples/ExampleSpinners.vue'
|
|
26
|
-
import ExampleTables from './examples/ExampleTables.vue'
|
|
27
|
-
import ExampleTabs from './examples/ExampleTabs.vue'
|
|
28
|
-
import ExampleToasts from './examples/ExampleToasts.vue'
|
|
29
|
-
import ExampleTooltips from './examples/ExampleTooltips.vue'
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<template>
|
|
33
|
-
<main vaul-drawer-wrapper>
|
|
34
|
-
<div class="container container-l p-xl">
|
|
35
|
-
<h1 class="mb-l">
|
|
36
|
-
VUI
|
|
37
|
-
</h1>
|
|
38
|
-
<p>The purpose of this page is to showcase and test every single component case</p>
|
|
39
|
-
<Divider :size="64" />
|
|
40
|
-
<ExamplePalette />
|
|
41
|
-
<Divider :size="64" />
|
|
42
|
-
<ExampleButtons />
|
|
43
|
-
<Divider :size="64" />
|
|
44
|
-
<ExampleCalendars />
|
|
45
|
-
<Divider :size="64" />
|
|
46
|
-
<ExampleBadges />
|
|
47
|
-
<Divider :size="64" />
|
|
48
|
-
<ExampleSpinners />
|
|
49
|
-
<Divider :size="64" />
|
|
50
|
-
<ExampleAvatars />
|
|
51
|
-
<Divider :size="64" />
|
|
52
|
-
<ExampleAlerts />
|
|
53
|
-
<Divider :size="64" />
|
|
54
|
-
<ExampleSkeletons />
|
|
55
|
-
<Divider :size="64" />
|
|
56
|
-
<ExampleAccordions />
|
|
57
|
-
<Divider :size="64" />
|
|
58
|
-
<ExampleBreadcrumbs />
|
|
59
|
-
<Divider :size="64" />
|
|
60
|
-
<ExampleCards />
|
|
61
|
-
<Divider :size="64" />
|
|
62
|
-
<ExampleCheckboxes />
|
|
63
|
-
<Divider :size="64" />
|
|
64
|
-
<ExampleCopyClipboard />
|
|
65
|
-
<Divider :size="64" />
|
|
66
|
-
<ExampleTabs />
|
|
67
|
-
<Divider :size="64" />
|
|
68
|
-
<ExampleInputs />
|
|
69
|
-
<Divider :size="64" />
|
|
70
|
-
<ExampleToasts />
|
|
71
|
-
<Divider :size="64" />
|
|
72
|
-
<ExampleTooltips />
|
|
73
|
-
<Divider :size="64" />
|
|
74
|
-
<ExampleSheets />
|
|
75
|
-
<Divider :size="64" />
|
|
76
|
-
<ExampleModals />
|
|
77
|
-
<Divider :size="64" />
|
|
78
|
-
<ExampleDrawers />
|
|
79
|
-
<Divider :size="64" />
|
|
80
|
-
<ExampleKBD />
|
|
81
|
-
<Divider :size="64" />
|
|
82
|
-
<ExamplePopouts />
|
|
83
|
-
<Divider :size="64" />
|
|
84
|
-
<ExampleDividers />
|
|
85
|
-
<Divider :size="64" />
|
|
86
|
-
<ExampleDropdowns />
|
|
87
|
-
<Divider :size="64" />
|
|
88
|
-
<ExampleFlexGrid />
|
|
89
|
-
<Divider :size="64" />
|
|
90
|
-
<ExampleTables />
|
|
91
|
-
<Divider :size="64" />
|
|
92
|
-
<ExampleSidebars />
|
|
93
|
-
</div>
|
|
94
|
-
</main>
|
|
95
|
-
</template>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import Divider from './components/Divider/Divider.vue'
|
|
3
|
+
import ExampleAccordions from './examples/ExampleAccordions.vue'
|
|
4
|
+
import ExampleAlerts from './examples/ExampleAlerts.vue'
|
|
5
|
+
import ExampleAvatars from './examples/ExampleAvatars.vue'
|
|
6
|
+
import ExampleBadges from './examples/ExampleBadges.vue'
|
|
7
|
+
import ExampleBreadcrumbs from './examples/ExampleBreadcrumbs.vue'
|
|
8
|
+
import ExampleButtons from './examples/ExampleButtons.vue'
|
|
9
|
+
import ExampleCalendars from './examples/ExampleCalendars.vue'
|
|
10
|
+
import ExampleCards from './examples/ExampleCards.vue'
|
|
11
|
+
import ExampleCheckboxes from './examples/ExampleCheckboxes.vue'
|
|
12
|
+
import ExampleCopyClipboard from './examples/ExampleCopyClipboard.vue'
|
|
13
|
+
import ExampleDividers from './examples/ExampleDividers.vue'
|
|
14
|
+
import ExampleDrawers from './examples/ExampleDrawers.vue'
|
|
15
|
+
import ExampleDropdowns from './examples/ExampleDropdowns.vue'
|
|
16
|
+
import ExampleFlexGrid from './examples/ExampleFlexGrid.vue'
|
|
17
|
+
import ExampleInputs from './examples/ExampleInputs.vue'
|
|
18
|
+
import ExampleKBD from './examples/ExampleKBD.vue'
|
|
19
|
+
import ExampleModals from './examples/ExampleModals.vue'
|
|
20
|
+
import ExamplePalette from './examples/ExamplePalette.vue'
|
|
21
|
+
import ExamplePopouts from './examples/ExamplePopouts.vue'
|
|
22
|
+
import ExampleSheets from './examples/ExampleSheets.vue'
|
|
23
|
+
import ExampleSidebars from './examples/ExampleSidebars.vue'
|
|
24
|
+
import ExampleSkeletons from './examples/ExampleSkeletons.vue'
|
|
25
|
+
import ExampleSpinners from './examples/ExampleSpinners.vue'
|
|
26
|
+
import ExampleTables from './examples/ExampleTables.vue'
|
|
27
|
+
import ExampleTabs from './examples/ExampleTabs.vue'
|
|
28
|
+
import ExampleToasts from './examples/ExampleToasts.vue'
|
|
29
|
+
import ExampleTooltips from './examples/ExampleTooltips.vue'
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<main vaul-drawer-wrapper>
|
|
34
|
+
<div class="container container-l p-xl">
|
|
35
|
+
<h1 class="mb-l">
|
|
36
|
+
VUI
|
|
37
|
+
</h1>
|
|
38
|
+
<p>The purpose of this page is to showcase and test every single component case</p>
|
|
39
|
+
<Divider :size="64" />
|
|
40
|
+
<ExamplePalette />
|
|
41
|
+
<Divider :size="64" />
|
|
42
|
+
<ExampleButtons />
|
|
43
|
+
<Divider :size="64" />
|
|
44
|
+
<ExampleCalendars />
|
|
45
|
+
<Divider :size="64" />
|
|
46
|
+
<ExampleBadges />
|
|
47
|
+
<Divider :size="64" />
|
|
48
|
+
<ExampleSpinners />
|
|
49
|
+
<Divider :size="64" />
|
|
50
|
+
<ExampleAvatars />
|
|
51
|
+
<Divider :size="64" />
|
|
52
|
+
<ExampleAlerts />
|
|
53
|
+
<Divider :size="64" />
|
|
54
|
+
<ExampleSkeletons />
|
|
55
|
+
<Divider :size="64" />
|
|
56
|
+
<ExampleAccordions />
|
|
57
|
+
<Divider :size="64" />
|
|
58
|
+
<ExampleBreadcrumbs />
|
|
59
|
+
<Divider :size="64" />
|
|
60
|
+
<ExampleCards />
|
|
61
|
+
<Divider :size="64" />
|
|
62
|
+
<ExampleCheckboxes />
|
|
63
|
+
<Divider :size="64" />
|
|
64
|
+
<ExampleCopyClipboard />
|
|
65
|
+
<Divider :size="64" />
|
|
66
|
+
<ExampleTabs />
|
|
67
|
+
<Divider :size="64" />
|
|
68
|
+
<ExampleInputs />
|
|
69
|
+
<Divider :size="64" />
|
|
70
|
+
<ExampleToasts />
|
|
71
|
+
<Divider :size="64" />
|
|
72
|
+
<ExampleTooltips />
|
|
73
|
+
<Divider :size="64" />
|
|
74
|
+
<ExampleSheets />
|
|
75
|
+
<Divider :size="64" />
|
|
76
|
+
<ExampleModals />
|
|
77
|
+
<Divider :size="64" />
|
|
78
|
+
<ExampleDrawers />
|
|
79
|
+
<Divider :size="64" />
|
|
80
|
+
<ExampleKBD />
|
|
81
|
+
<Divider :size="64" />
|
|
82
|
+
<ExamplePopouts />
|
|
83
|
+
<Divider :size="64" />
|
|
84
|
+
<ExampleDividers />
|
|
85
|
+
<Divider :size="64" />
|
|
86
|
+
<ExampleDropdowns />
|
|
87
|
+
<Divider :size="64" />
|
|
88
|
+
<ExampleFlexGrid />
|
|
89
|
+
<Divider :size="64" />
|
|
90
|
+
<ExampleTables />
|
|
91
|
+
<Divider :size="64" />
|
|
92
|
+
<ExampleSidebars />
|
|
93
|
+
</div>
|
|
94
|
+
</main>
|
|
95
|
+
</template>
|
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { Icon } from '@iconify/vue'
|
|
3
|
-
import { useResizeObserver } from '@vueuse/core'
|
|
4
|
-
import { onMounted, ref, useTemplateRef, watch, watchEffect } from 'vue'
|
|
5
|
-
import './accordion.scss'
|
|
6
|
-
|
|
7
|
-
export interface AccordionProps {
|
|
8
|
-
open?: boolean
|
|
9
|
-
label?: string
|
|
10
|
-
card?: boolean
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const props = defineProps<AccordionProps>()
|
|
14
|
-
const emits = defineEmits<{
|
|
15
|
-
open: []
|
|
16
|
-
close: []
|
|
17
|
-
}>()
|
|
18
|
-
|
|
19
|
-
const isOpen = ref(false)
|
|
20
|
-
const contentRef = useTemplateRef('content')
|
|
21
|
-
const contentMaxHeight = ref(0)
|
|
22
|
-
|
|
23
|
-
watchEffect(() => {
|
|
24
|
-
isOpen.value = props.open
|
|
25
|
-
}, {
|
|
26
|
-
flush: 'post',
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
watch(isOpen, (value) => {
|
|
30
|
-
if (value) {
|
|
31
|
-
emits('open')
|
|
32
|
-
contentMaxHeight.value = contentRef.value?.scrollHeight || 0
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
emits('close')
|
|
36
|
-
}
|
|
37
|
-
}, {
|
|
38
|
-
flush: 'post',
|
|
39
|
-
immediate: true,
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
function open() {
|
|
43
|
-
isOpen.value = true
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function close() {
|
|
47
|
-
isOpen.value = false
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function toggle() {
|
|
51
|
-
isOpen.value = !isOpen.value
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
defineExpose({
|
|
55
|
-
open,
|
|
56
|
-
close,
|
|
57
|
-
toggle,
|
|
58
|
-
isOpen,
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
onMounted(() => {
|
|
62
|
-
useResizeObserver(contentRef, ([entry]) => {
|
|
63
|
-
if (isOpen.value && contentMaxHeight.value !== entry.contentRect.height) {
|
|
64
|
-
contentMaxHeight.value = entry.contentRect.height || 0
|
|
65
|
-
}
|
|
66
|
-
})
|
|
67
|
-
})
|
|
68
|
-
</script>
|
|
69
|
-
|
|
70
|
-
<template>
|
|
71
|
-
<div class="vui-accordion" :class="{ 'open': isOpen, 'is-card': !!props.card }">
|
|
72
|
-
<!-- Completely custom header which needs to be styled and implemented by the developer -->
|
|
73
|
-
<slot v-if="$slots.trigger" name="trigger" :open :close :toggle :is-open />
|
|
74
|
-
<button v-else class="vui-accordion-header" @click="isOpen = !isOpen">
|
|
75
|
-
<slot name="header">
|
|
76
|
-
{{ props.label }}
|
|
77
|
-
</slot>
|
|
78
|
-
<Icon icon="ph:caret-down" />
|
|
79
|
-
</button>
|
|
80
|
-
|
|
81
|
-
<div
|
|
82
|
-
class="vui-accordion-content"
|
|
83
|
-
:aria-hidden="!isOpen"
|
|
84
|
-
:style="{ 'max-height': isOpen ? `${contentMaxHeight}px` : '0px' }"
|
|
85
|
-
>
|
|
86
|
-
<div ref="content" class="vui-accordtion-content-inner">
|
|
87
|
-
<slot />
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
</template>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Icon } from '@iconify/vue'
|
|
3
|
+
import { useResizeObserver } from '@vueuse/core'
|
|
4
|
+
import { onMounted, ref, useTemplateRef, watch, watchEffect } from 'vue'
|
|
5
|
+
import './accordion.scss'
|
|
6
|
+
|
|
7
|
+
export interface AccordionProps {
|
|
8
|
+
open?: boolean
|
|
9
|
+
label?: string
|
|
10
|
+
card?: boolean
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const props = defineProps<AccordionProps>()
|
|
14
|
+
const emits = defineEmits<{
|
|
15
|
+
open: []
|
|
16
|
+
close: []
|
|
17
|
+
}>()
|
|
18
|
+
|
|
19
|
+
const isOpen = ref(false)
|
|
20
|
+
const contentRef = useTemplateRef('content')
|
|
21
|
+
const contentMaxHeight = ref(0)
|
|
22
|
+
|
|
23
|
+
watchEffect(() => {
|
|
24
|
+
isOpen.value = props.open
|
|
25
|
+
}, {
|
|
26
|
+
flush: 'post',
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
watch(isOpen, (value) => {
|
|
30
|
+
if (value) {
|
|
31
|
+
emits('open')
|
|
32
|
+
contentMaxHeight.value = contentRef.value?.scrollHeight || 0
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
emits('close')
|
|
36
|
+
}
|
|
37
|
+
}, {
|
|
38
|
+
flush: 'post',
|
|
39
|
+
immediate: true,
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
function open() {
|
|
43
|
+
isOpen.value = true
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function close() {
|
|
47
|
+
isOpen.value = false
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function toggle() {
|
|
51
|
+
isOpen.value = !isOpen.value
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
defineExpose({
|
|
55
|
+
open,
|
|
56
|
+
close,
|
|
57
|
+
toggle,
|
|
58
|
+
isOpen,
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
onMounted(() => {
|
|
62
|
+
useResizeObserver(contentRef, ([entry]) => {
|
|
63
|
+
if (isOpen.value && contentMaxHeight.value !== entry.contentRect.height) {
|
|
64
|
+
contentMaxHeight.value = entry.contentRect.height || 0
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
})
|
|
68
|
+
</script>
|
|
69
|
+
|
|
70
|
+
<template>
|
|
71
|
+
<div class="vui-accordion" :class="{ 'open': isOpen, 'is-card': !!props.card }">
|
|
72
|
+
<!-- Completely custom header which needs to be styled and implemented by the developer -->
|
|
73
|
+
<slot v-if="$slots.trigger" name="trigger" :open :close :toggle :is-open />
|
|
74
|
+
<button v-else class="vui-accordion-header" @click="isOpen = !isOpen">
|
|
75
|
+
<slot name="header">
|
|
76
|
+
{{ props.label }}
|
|
77
|
+
</slot>
|
|
78
|
+
<Icon icon="ph:caret-down" />
|
|
79
|
+
</button>
|
|
80
|
+
|
|
81
|
+
<div
|
|
82
|
+
class="vui-accordion-content"
|
|
83
|
+
:aria-hidden="!isOpen"
|
|
84
|
+
:style="{ 'max-height': isOpen ? `${contentMaxHeight}px` : '0px' }"
|
|
85
|
+
>
|
|
86
|
+
<div ref="content" class="vui-accordtion-content-inner">
|
|
87
|
+
<slot />
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</template>
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { VNode } from 'vue'
|
|
3
|
-
import type { AccordionProps } from './Accordion.vue'
|
|
4
|
-
import type Accordion from './Accordion.vue'
|
|
5
|
-
import { useTemplateRef } from 'vue'
|
|
6
|
-
// Renderless component which is used to house multiple accordions which can be triggered together in some way
|
|
7
|
-
|
|
8
|
-
interface Props {
|
|
9
|
-
/**
|
|
10
|
-
* If set to true, if an accordion opens, all other close
|
|
11
|
-
*/
|
|
12
|
-
single?: boolean
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const props = defineProps<Props>()
|
|
16
|
-
|
|
17
|
-
const slots = defineSlots<{
|
|
18
|
-
default: () => Array<VNode & { props: AccordionProps }>
|
|
19
|
-
}>()
|
|
20
|
-
|
|
21
|
-
const accordionRefs = useTemplateRef<InstanceType<typeof Accordion>[]>('accordion')
|
|
22
|
-
|
|
23
|
-
function handleAccordionOpen(newIndex: number) {
|
|
24
|
-
if (!accordionRefs.value || !props.single)
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
accordionRefs.value.forEach((item, index) => {
|
|
28
|
-
if (index !== newIndex) {
|
|
29
|
-
item.close()
|
|
30
|
-
}
|
|
31
|
-
})
|
|
32
|
-
}
|
|
33
|
-
</script>
|
|
34
|
-
|
|
35
|
-
<template>
|
|
36
|
-
<component
|
|
37
|
-
:is="item"
|
|
38
|
-
v-for="(item, index) of slots.default()"
|
|
39
|
-
ref="accordion"
|
|
40
|
-
:key="item"
|
|
41
|
-
@open="handleAccordionOpen(index)"
|
|
42
|
-
/>
|
|
43
|
-
</template>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { VNode } from 'vue'
|
|
3
|
+
import type { AccordionProps } from './Accordion.vue'
|
|
4
|
+
import type Accordion from './Accordion.vue'
|
|
5
|
+
import { useTemplateRef } from 'vue'
|
|
6
|
+
// Renderless component which is used to house multiple accordions which can be triggered together in some way
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
/**
|
|
10
|
+
* If set to true, if an accordion opens, all other close
|
|
11
|
+
*/
|
|
12
|
+
single?: boolean
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const props = defineProps<Props>()
|
|
16
|
+
|
|
17
|
+
const slots = defineSlots<{
|
|
18
|
+
default: () => Array<VNode & { props: AccordionProps }>
|
|
19
|
+
}>()
|
|
20
|
+
|
|
21
|
+
const accordionRefs = useTemplateRef<InstanceType<typeof Accordion>[]>('accordion')
|
|
22
|
+
|
|
23
|
+
function handleAccordionOpen(newIndex: number) {
|
|
24
|
+
if (!accordionRefs.value || !props.single)
|
|
25
|
+
return
|
|
26
|
+
|
|
27
|
+
accordionRefs.value.forEach((item, index) => {
|
|
28
|
+
if (index !== newIndex) {
|
|
29
|
+
item.close()
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<template>
|
|
36
|
+
<component
|
|
37
|
+
:is="item"
|
|
38
|
+
v-for="(item, index) of slots.default()"
|
|
39
|
+
ref="accordion"
|
|
40
|
+
:key="item"
|
|
41
|
+
@open="handleAccordionOpen(index)"
|
|
42
|
+
/>
|
|
43
|
+
</template>
|