@dolanske/vui 0.4.0 → 1.0.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/README.md +6 -13
- package/dist/components/Alert/Alert.vue.d.ts +7 -1
- package/dist/components/Avatar/Avatar.vue.d.ts +15 -1
- package/dist/components/Badge/Badge.vue.d.ts +1 -1
- package/dist/components/Breadcrumbs/BreadcrumbItem.vue.d.ts +1 -1
- package/dist/components/Button/Button.vue.d.ts +5 -15
- package/dist/components/ButtonGroup/ButtonGroup.vue.d.ts +2 -0
- package/dist/components/Calendar/Calendar.vue.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.vue.d.ts +1 -0
- package/dist/components/Dropdown/Dropdown.vue.d.ts +19 -4
- package/dist/components/Dropdown/DropdownTitle.vue.d.ts +5 -1
- package/dist/components/Flex/Flex.vue.d.ts +3 -1
- package/dist/components/Grid/Grid.vue.d.ts +7 -2
- package/dist/components/Input/Dropzone.vue.d.ts +1 -1
- package/dist/components/Input/Input.vue.d.ts +2 -2
- package/dist/components/Kbd/KbdGroup.vue.d.ts +3 -11
- package/dist/components/Modal/Confirm.vue.d.ts +1 -1
- package/dist/components/Modal/Modal.vue.d.ts +1 -1
- package/dist/components/Pagination/Pagination.vue.d.ts +3 -0
- package/dist/components/Popout/Popout.vue.d.ts +8 -1
- package/dist/components/Progress/Progress.vue.d.ts +2 -0
- package/dist/components/Radio/Radio.vue.d.ts +1 -0
- package/dist/components/Select/Select.vue.d.ts +2 -0
- package/dist/components/Sheet/Sheet.vue.d.ts +3 -0
- package/dist/components/Switch/Switch.vue.d.ts +1 -0
- package/dist/components/Table/index.d.ts +6 -0
- package/dist/components/Table/table.d.ts +1 -1
- package/dist/components/Tabs/Tab.vue.d.ts +16 -3
- package/dist/components/Tabs/Tabs.vue.d.ts +4 -0
- package/dist/components/Toast/toast.d.ts +245 -0
- package/dist/index.d.ts +2 -7
- package/dist/shared/helpers.d.ts +9 -0
- package/dist/shared/theme.d.ts +3 -0
- package/dist/style.css +1 -1
- package/dist/vui.js +6423 -6046
- package/package.json +8 -4
- package/src/App.vue +89 -192
- package/src/components/Accordion/accordion.scss +2 -0
- package/src/components/Alert/Alert.vue +11 -5
- package/src/components/Alert/alert.scss +104 -23
- package/src/components/Avatar/Avatar.vue +4 -1
- package/src/components/Avatar/avatar.scss +1 -1
- package/src/components/Badge/Badge.vue +1 -1
- package/src/components/Badge/badge.scss +134 -17
- package/src/components/Breadcrumbs/BreadcrumbItem.vue +2 -2
- package/src/components/Breadcrumbs/Breadcrumbs.vue +1 -2
- package/src/components/Breadcrumbs/breadcrumbs.scss +2 -1
- package/src/components/Button/Button.vue +16 -21
- package/src/components/Button/button.scss +159 -56
- package/src/components/ButtonGroup/ButtonGroup.vue +4 -1
- package/src/components/ButtonGroup/button-group.scss +2 -2
- package/src/components/Calendar/Calendar.vue +9 -3
- package/src/components/Calendar/calendar.scss +29 -2
- package/src/components/Card/Card.vue +2 -2
- package/src/components/Card/card.scss +4 -4
- package/src/components/Checkbox/Checkbox.vue +7 -5
- package/src/components/Checkbox/checkbox.scss +27 -13
- package/src/components/CopyClipboard/CopyClipboard.vue +15 -6
- package/src/components/CopyClipboard/copy-clipboard.scss +10 -2
- package/src/components/Drawer/Drawer.vue +4 -4
- package/src/components/Drawer/drawer.scss +1 -0
- package/src/components/Dropdown/Dropdown.vue +44 -20
- package/src/components/Dropdown/DropdownItem.vue +5 -4
- package/src/components/Dropdown/DropdownTitle.vue +7 -1
- package/src/components/Dropdown/dropdown-item.scss +84 -0
- package/src/components/Dropdown/dropdown.scss +21 -86
- package/src/components/Flex/Flex.vue +4 -1
- package/src/components/Grid/Grid.vue +25 -2
- package/src/components/Input/Color.vue +26 -0
- package/src/components/Input/Counter.vue +12 -16
- package/src/components/Input/Dropzone.vue +1 -1
- package/src/components/Input/File.vue +1 -1
- package/src/components/Input/Input.vue +8 -6
- package/src/components/Input/Password.vue +1 -13
- package/src/components/Input/Textarea.vue +4 -2
- package/src/components/Input/input.scss +113 -19
- package/src/components/Kbd/KbdGroup.vue +2 -6
- package/src/components/Kbd/kbd.scss +7 -6
- package/src/components/Modal/Confirm.vue +1 -1
- package/src/components/Modal/Modal.vue +23 -15
- package/src/components/Modal/modal.scss +11 -6
- package/src/components/OTP/otp.scss +8 -7
- package/src/components/Pagination/Pagination.vue +6 -3
- package/src/components/Popout/Popout.vue +15 -5
- package/src/components/Popout/popout.scss +8 -1
- package/src/components/Progress/Progress.vue +18 -5
- package/src/components/Progress/progress.scss +7 -1
- package/src/components/Radio/Radio.vue +4 -2
- package/src/components/Radio/radio.scss +28 -9
- package/src/components/Select/Select.vue +49 -18
- package/src/components/Select/select.scss +35 -2
- package/src/components/Sheet/Sheet.vue +8 -2
- package/src/components/Sheet/sheet.scss +9 -0
- package/src/components/Sidebar/Sidebar.vue +46 -16
- package/src/components/Sidebar/sidebar.scss +6 -5
- package/src/components/Spinner/spinner.scss +2 -1
- package/src/components/Switch/Switch.vue +4 -3
- package/src/components/Switch/switch.scss +48 -7
- package/src/components/Table/{Header.vue → Head.vue} +5 -5
- package/src/components/Table/{Table.vue → Root.vue} +2 -2
- package/src/components/Table/SelectRow.vue +2 -1
- package/src/components/Table/index.ts +7 -0
- package/src/components/Table/table.scss +25 -5
- package/src/components/Table/table.ts +7 -3
- package/src/components/Tabs/Tab.vue +7 -9
- package/src/components/Tabs/Tabs.vue +9 -2
- package/src/components/Tabs/tabs.scss +11 -3
- package/src/components/Toast/Toasts.vue +5 -0
- package/src/components/Toast/toast.scss +6 -2
- package/src/components/Toast/toast.ts +7 -0
- package/src/components/Tooltip/Tooltip.vue +9 -9
- package/src/components/Tooltip/tooltip.scss +4 -0
- package/src/examples/ExampleAccordions.vue +58 -0
- package/src/examples/ExampleAlerts.vue +78 -0
- package/src/examples/ExampleAvatars.vue +44 -0
- package/src/examples/ExampleBadges.vue +48 -0
- package/src/examples/ExampleBreadcrumbs.vue +46 -0
- package/src/examples/ExampleButtons.vue +140 -0
- package/src/examples/ExampleCalendars.vue +40 -0
- package/src/examples/ExampleCards.vue +94 -0
- package/src/examples/ExampleCheckboxes.vue +123 -0
- package/src/examples/ExampleCopyClipboard.vue +47 -0
- package/src/examples/ExampleDividers.vue +39 -0
- package/src/examples/ExampleDrawers.vue +67 -0
- package/src/examples/ExampleDropdowns.vue +114 -0
- package/src/examples/ExampleFlexGrid.vue +122 -0
- package/src/examples/ExampleInputs.vue +234 -0
- package/src/examples/ExampleKBD.vue +65 -0
- package/src/examples/ExampleModals.vue +143 -0
- package/src/examples/ExamplePalette.vue +159 -0
- package/src/examples/ExamplePopouts.vue +41 -0
- package/src/examples/ExampleSheets.vue +77 -0
- package/src/examples/ExampleSidebars.vue +270 -0
- package/src/examples/ExampleSkeletons.vue +26 -0
- package/src/examples/ExampleSpinners.vue +78 -0
- package/src/examples/ExampleTables.vue +195 -0
- package/src/examples/ExampleTabs.vue +119 -0
- package/src/examples/ExampleToasts.vue +96 -0
- package/src/examples/ExampleTooltips.vue +70 -0
- package/src/examples/shared/ExampleColor.vue +28 -0
- package/src/index.ts +4 -11
- package/src/internal/Backdrop/backdrop.scss +7 -1
- package/src/shared/helpers.ts +43 -0
- package/src/shared/theme.ts +22 -0
- package/src/style/animation.scss +1 -0
- package/src/style/core.scss +34 -57
- package/src/style/layout.scss +102 -5
- package/src/style/{fonts.scss → text.scss} +39 -0
- package/src/style/theme.scss +195 -0
- package/src/style/tooltip.scss +22 -4
- package/src/style/typography.scss +95 -18
- package/dist/components/Table/Row.vue.d.ts +0 -16
- package/src/components/Table/Row.vue +0 -9
- /package/dist/components/Table/{Header.vue.d.ts → Head.vue.d.ts} +0 -0
- /package/dist/components/Table/{Table.vue.d.ts → Root.vue.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dolanske/vui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"private": false,
|
|
6
|
-
"description": "Brother in Christ there's a new UI library
|
|
6
|
+
"description": "Brother in Christ there's a new UI library",
|
|
7
7
|
"author": "dolanske",
|
|
8
8
|
"license": "GPL-3.0",
|
|
9
9
|
"sass": "src/index.scss",
|
|
@@ -43,12 +43,13 @@
|
|
|
43
43
|
"build": "vue-tsc -b && vite build",
|
|
44
44
|
"preview": "vite preview",
|
|
45
45
|
"lint": "eslint .",
|
|
46
|
-
"lint:fix": "eslint . --fix"
|
|
46
|
+
"lint:fix": "eslint . --fix",
|
|
47
|
+
"test": "vitest"
|
|
47
48
|
},
|
|
48
49
|
"dependencies": {
|
|
49
50
|
"@floating-ui/vue": "^1.1.5",
|
|
50
51
|
"@types/node": "^22.9.0",
|
|
51
|
-
"@vuepic/vue-datepicker": "^
|
|
52
|
+
"@vuepic/vue-datepicker": "^11.0.1",
|
|
52
53
|
"@vueuse/core": "^11.2.0",
|
|
53
54
|
"sass": "^1.80.6",
|
|
54
55
|
"vaul-vue": "^0.2.0",
|
|
@@ -59,10 +60,13 @@
|
|
|
59
60
|
"@antfu/eslint-config": "^3.8.0",
|
|
60
61
|
"@iconify/vue": "^4.1.2",
|
|
61
62
|
"@vitejs/plugin-vue": "^5.1.5",
|
|
63
|
+
"@vue/test-utils": "^2.4.6",
|
|
62
64
|
"eslint": "^9.14.0",
|
|
63
65
|
"eslint-plugin-format": "^0.1.2",
|
|
66
|
+
"jsdom": "^26.0.0",
|
|
64
67
|
"typescript": "^5.6.3",
|
|
65
68
|
"vite": "^5.4.11",
|
|
69
|
+
"vitest": "^2.1.8",
|
|
66
70
|
"vue-tsc": "^2.1.10"
|
|
67
71
|
}
|
|
68
72
|
}
|
package/src/App.vue
CHANGED
|
@@ -1,198 +1,95 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { ref } from 'vue'
|
|
3
|
-
import Avatar from './components/Avatar/Avatar.vue'
|
|
4
|
-
import Button from './components/Button/Button.vue'
|
|
5
|
-
|
|
6
2
|
import Divider from './components/Divider/Divider.vue'
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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'
|
|
18
30
|
</script>
|
|
19
31
|
|
|
20
32
|
<template>
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
</
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<
|
|
47
|
-
<
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
<div v-else-if="tab === 'typography'" class="typeset" :style="{ maxWidth: '688px', margin: 'auto' }">
|
|
84
|
-
<h1>The Joke Tax Chronicles</h1>
|
|
85
|
-
<p>Once upon a time, in a far-off land, there <code>was a very lazy</code> king who spent all day lounging on his throne. One day, his advisors came to him with a problem: the kingdom was running out of money</p>
|
|
86
|
-
<h2>The King's Plan</h2>
|
|
87
|
-
<p>The king thought long and hard, and finally came up with <a href="#">a brilliant plan</a>: he would tax the jokes in the kingdom.</p>
|
|
88
|
-
<blockquote>"After all," he said, "everyone enjoys a good joke, so it's only fair that they should pay for the privilege."</blockquote>
|
|
89
|
-
<h3>The Joke Tax</h3>
|
|
90
|
-
<p>The king's subjects were not amused. They grumbled and complained, but the king was firm:</p>
|
|
91
|
-
<ul class="ul">
|
|
92
|
-
<li>
|
|
93
|
-
I am an item
|
|
94
|
-
<ul>
|
|
95
|
-
<li>1st level of puns: 5 gold coins</li>
|
|
96
|
-
<li>2nd level of jokes: 10 gold coins</li>
|
|
97
|
-
<li>
|
|
98
|
-
3rd level of one-liners : 20 gold coins
|
|
99
|
-
<ul>
|
|
100
|
-
<li>1st level of puns: 5 gold coins</li>
|
|
101
|
-
<li>2nd level of jokes: 10 gold coins</li>
|
|
102
|
-
<li>3rd level of one-liners : 20 gold coins</li>
|
|
103
|
-
</ul>
|
|
104
|
-
</li>
|
|
105
|
-
</ul>
|
|
106
|
-
</li>
|
|
107
|
-
<li>2nd level of jokes: 10 gold coins</li>
|
|
108
|
-
<li>3rd level of one-liners : 20 gold coins</li>
|
|
109
|
-
</ul>
|
|
110
|
-
<p>As a result, people stopped telling jokes, and the kingdom fell into a gloom. But there was one person who refused to let the king's foolishness get him down: a court jester named Jokester.</p>
|
|
111
|
-
|
|
112
|
-
<figure>
|
|
113
|
-
<img src="https://i.imgur.com/6WQYrfN.jpeg" alt="">
|
|
114
|
-
<figcaption>Woah look at these mountains</figcaption>
|
|
115
|
-
</figure>
|
|
116
|
-
|
|
117
|
-
<h3>Jokester's Revolt</h3>
|
|
118
|
-
<p>Jokester began sneaking into the castle in the middle of the night and leaving jokes all over the place: under the king's pillow, in his soup, even in the royal toilet. The king was furious, but he couldn't seem to stop Jokester.</p>
|
|
119
|
-
<hr>
|
|
120
|
-
<p>And then, one day, the people of the kingdom discovered that the jokes left by Jokester were so funny that they couldn't help but laugh. And once they started laughing, they couldn't stop.</p>
|
|
121
|
-
<ol>
|
|
122
|
-
<li>But the kind was stupid</li>
|
|
123
|
-
<li>He was ratioed 5 times</li>
|
|
124
|
-
</ol>
|
|
125
|
-
<h3>The People's Rebellion</h3>
|
|
126
|
-
<p>The people of the kingdom, feeling uplifted by the laughter, started to tell jokes and puns again, and soon the entire kingdom was in on the joke.</p>
|
|
127
|
-
|
|
128
|
-
<table>
|
|
129
|
-
<thead>
|
|
130
|
-
<tr>
|
|
131
|
-
<th>King's Treasury</th>
|
|
132
|
-
<th>People's happiness</th>
|
|
133
|
-
</tr>
|
|
134
|
-
</thead>
|
|
135
|
-
<tbody>
|
|
136
|
-
<tr>
|
|
137
|
-
<td>Empty</td>
|
|
138
|
-
<td>And then, one day, the people of the kingdom discovered that the jokes left by Jokester were so funny that they couldn't help but laugh. And once they started laughing, they couldn't stop.</td>
|
|
139
|
-
</tr>
|
|
140
|
-
<tr>
|
|
141
|
-
<td>Modest</td>
|
|
142
|
-
<td>Satisfied</td>
|
|
143
|
-
</tr>
|
|
144
|
-
<tr>
|
|
145
|
-
<td>Full</td>
|
|
146
|
-
<td>Ecstatic</td>
|
|
147
|
-
</tr>
|
|
148
|
-
</tbody>
|
|
149
|
-
</table>
|
|
150
|
-
<p>The king, seeing how much happier his subjects were, realized the error of his ways and repealed the joke tax. Jokester was declared a hero, and the kingdom lived happily ever after.</p>
|
|
151
|
-
<p>The moral of the story is: never <code>underestimate</code> the power of a good laugh and always be careful of bad ideas.</p>
|
|
152
|
-
|
|
153
|
-
<pre data-lang="JSON">
|
|
154
|
-
{
|
|
155
|
-
"type": "Feature",
|
|
156
|
-
"properties": {
|
|
157
|
-
"mag": 1.5,
|
|
158
|
-
"place": "77kmNWofSkwentna,Alaska",
|
|
159
|
-
"time": 1668256022741,
|
|
160
|
-
"updated": 1668256203692,
|
|
161
|
-
"tz": null,
|
|
162
|
-
"url": "https://earthquake.usgs.gov/earthquakes/eventpage/ak022eit4nup",
|
|
163
|
-
"detail": "https://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/ak022eit4nup.geojson",
|
|
164
|
-
"felt": null,
|
|
165
|
-
"cdi": null,
|
|
166
|
-
"mmi": null,
|
|
167
|
-
"alert": null,
|
|
168
|
-
"status": "automatic",
|
|
169
|
-
"tsunami": 0,
|
|
170
|
-
"sig": 35,
|
|
171
|
-
"net": "ak",
|
|
172
|
-
"code": "022eit4nup",
|
|
173
|
-
"ids": ",ak022eit4nup,",
|
|
174
|
-
"sources": ",ak,",
|
|
175
|
-
"types": ",origin,phase-data,",
|
|
176
|
-
"nst": null,
|
|
177
|
-
"dmin": null,
|
|
178
|
-
"rms": 0.55,
|
|
179
|
-
"gap": null,
|
|
180
|
-
"magType": "ml",
|
|
181
|
-
"type": "earthquake",
|
|
182
|
-
"title": "M1.5-77kmNWofSkwentna,Alaska"
|
|
183
|
-
},
|
|
184
|
-
"geometry": {
|
|
185
|
-
"type": "Point",
|
|
186
|
-
"coordinates": [
|
|
187
|
-
-152.2722,
|
|
188
|
-
62.5489,
|
|
189
|
-
4.5
|
|
190
|
-
]
|
|
191
|
-
},
|
|
192
|
-
"id": "ak022eit4nup"
|
|
193
|
-
},
|
|
194
|
-
</pre>
|
|
195
|
-
</div>
|
|
196
|
-
</main>
|
|
197
|
-
</div>
|
|
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>
|
|
198
95
|
</template>
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
font-size: var(--font-size-m);
|
|
59
59
|
font-weight: 500;
|
|
60
60
|
color: var(--color-text);
|
|
61
|
+
border-radius: var(--border-radius-m);
|
|
61
62
|
|
|
62
63
|
&:hover {
|
|
63
64
|
text-decoration: underline;
|
|
@@ -76,5 +77,6 @@
|
|
|
76
77
|
max-height: 0;
|
|
77
78
|
overflow: hidden;
|
|
78
79
|
visibility: hidden;
|
|
80
|
+
font-size: var(--font-size-m);
|
|
79
81
|
}
|
|
80
82
|
}
|
|
@@ -9,19 +9,24 @@ interface Props {
|
|
|
9
9
|
* Override the variant's default icon
|
|
10
10
|
*/
|
|
11
11
|
icon?: string
|
|
12
|
-
|
|
13
12
|
/**
|
|
14
|
-
* Setting a title and description will use slightly different styling other
|
|
13
|
+
* Setting a title and description will use slightly different styling other
|
|
14
|
+
* than slots.
|
|
15
15
|
*/
|
|
16
16
|
title?: string
|
|
17
|
+
/**
|
|
18
|
+
* Use strong color
|
|
19
|
+
*/
|
|
20
|
+
filled?: boolean
|
|
17
21
|
description?: string
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
const {
|
|
21
|
-
icon = 'ph:
|
|
25
|
+
icon = 'ph:chat-teardrop',
|
|
22
26
|
variant = 'neutral',
|
|
23
27
|
title,
|
|
24
28
|
description,
|
|
29
|
+
filled,
|
|
25
30
|
} = defineProps<Props>()
|
|
26
31
|
|
|
27
32
|
const actualIcon = computed(() => {
|
|
@@ -36,9 +41,9 @@ const actualIcon = computed(() => {
|
|
|
36
41
|
</script>
|
|
37
42
|
|
|
38
43
|
<template>
|
|
39
|
-
<div class="vui-alert" :class="[`vui-alert-variant-${variant}`]">
|
|
44
|
+
<div class="vui-alert" :class="[{ filled }, `vui-alert-variant-${variant}`]">
|
|
40
45
|
<Icon v-if="actualIcon" class="vui-alert-icon" :icon="actualIcon" />
|
|
41
|
-
<div v-if="$slots.default" class="vui-alert-content">
|
|
46
|
+
<div v-if="$slots.default && !title" class="vui-alert-content">
|
|
42
47
|
<slot />
|
|
43
48
|
</div>
|
|
44
49
|
<div v-else class="vui-alert-default-content">
|
|
@@ -46,6 +51,7 @@ const actualIcon = computed(() => {
|
|
|
46
51
|
<p v-if="description">
|
|
47
52
|
{{ description }}
|
|
48
53
|
</p>
|
|
54
|
+
<slot v-else-if="$slots.default" />
|
|
49
55
|
</div>
|
|
50
56
|
|
|
51
57
|
<slot name="end" />
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
padding: var(--space-s);
|
|
6
6
|
font-size: var(--font-size-m);
|
|
7
7
|
flex-wrap: nowrap;
|
|
8
|
-
align-items:
|
|
8
|
+
align-items: center;
|
|
9
|
+
border: 1px solid var(--color-border);
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
.vui-alert-icon {
|
|
11
12
|
width: 22px;
|
|
12
13
|
height: 22px;
|
|
13
14
|
}
|
|
@@ -18,63 +19,143 @@
|
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
.vui-alert-default-content {
|
|
21
|
-
padding-top: 3px;
|
|
22
|
-
|
|
23
22
|
strong {
|
|
24
23
|
display: block;
|
|
25
24
|
font-size: var(--font-size-m);
|
|
26
|
-
|
|
27
|
-
margin-bottom: 6px;
|
|
25
|
+
margin-bottom: 2px;
|
|
28
26
|
}
|
|
29
27
|
|
|
30
28
|
p {
|
|
31
|
-
font-size: var(--font-size-
|
|
29
|
+
font-size: var(--font-size-s);
|
|
32
30
|
color: var(--color-text-light);
|
|
33
|
-
font-weight: 350;
|
|
34
31
|
}
|
|
35
32
|
}
|
|
36
33
|
|
|
37
34
|
.vui-alert-content {
|
|
38
35
|
font-size: var(--font-size-m);
|
|
36
|
+
font-weight: 400;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.filled {
|
|
40
|
+
border: none !important;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
&.vui-alert-variant-neutral {
|
|
42
|
-
|
|
44
|
+
.vui-alert-icon path {
|
|
45
|
+
color: var(--color-text-light);
|
|
46
|
+
}
|
|
43
47
|
|
|
44
|
-
|
|
45
|
-
color: var(--color-
|
|
48
|
+
&.filled {
|
|
49
|
+
background-color: var(--color-bg-raised);
|
|
46
50
|
}
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
&.vui-alert-variant-info {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
svg path {
|
|
54
|
+
.vui-alert-icon path {
|
|
53
55
|
color: var(--color-text-blue);
|
|
54
56
|
}
|
|
57
|
+
|
|
58
|
+
&.filled {
|
|
59
|
+
background-color: hsla(from var(--color-bg-blue-lowered) h s l / 0.5);
|
|
60
|
+
}
|
|
55
61
|
}
|
|
56
62
|
|
|
57
63
|
&.vui-alert-variant-success {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
svg path {
|
|
64
|
+
.vui-alert-icon path {
|
|
61
65
|
color: var(--color-text-green);
|
|
62
66
|
}
|
|
67
|
+
|
|
68
|
+
&.filled {
|
|
69
|
+
background-color: hsla(from var(--color-bg-green-lowered) h s l / 0.4);
|
|
70
|
+
}
|
|
63
71
|
}
|
|
64
72
|
|
|
65
73
|
&.vui-alert-variant-warning {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
svg path {
|
|
74
|
+
.vui-alert-icon path {
|
|
69
75
|
color: var(--color-text-yellow);
|
|
70
76
|
}
|
|
77
|
+
|
|
78
|
+
&.filled {
|
|
79
|
+
background-color: hsla(from var(--color-bg-yellow-lowered) h s l / 0.6);
|
|
80
|
+
}
|
|
71
81
|
}
|
|
72
82
|
|
|
73
83
|
&.vui-alert-variant-danger {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
svg path {
|
|
84
|
+
.vui-alert-icon path {
|
|
77
85
|
color: var(--color-text-red);
|
|
78
86
|
}
|
|
87
|
+
|
|
88
|
+
&.filled {
|
|
89
|
+
background-color: hsla(from var(--color-bg-red-lowered) h s l / 0.5);
|
|
90
|
+
}
|
|
79
91
|
}
|
|
80
92
|
}
|
|
93
|
+
|
|
94
|
+
:root.light {
|
|
95
|
+
.vui-alert.filled {
|
|
96
|
+
border: none;
|
|
97
|
+
|
|
98
|
+
&.vui-alert-variant-neutral {
|
|
99
|
+
background-color: var(--color-bg-medium);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&.vui-alert-variant-danger {
|
|
103
|
+
background-color: hsla(from var(--color-bg-red-raised) h s l / 0.15);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&.vui-alert-variant-warning {
|
|
107
|
+
background-color: hsla(from var(--color-bg-yellow-raised) h s l / 0.2);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&.vui-alert-variant-success {
|
|
111
|
+
background-color: hsla(from var(--color-bg-green-raised) h s l / 0.15);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&.vui-alert-variant-info {
|
|
115
|
+
background-color: hsla(from var(--color-bg-blue-raised) h s l / 0.15);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// .vui-alert.vui-alert-variant-success:not(.filled, .outline) {
|
|
120
|
+
// background-color: hsla(from var(--color-text-green) h s l / 0.15);
|
|
121
|
+
// }
|
|
122
|
+
|
|
123
|
+
// .vui-alert.vui-alert-variant-danger .vui-alert-icon path {
|
|
124
|
+
// color: var(--color-border-red);
|
|
125
|
+
// }
|
|
126
|
+
|
|
127
|
+
// .vui-alert.vui-alert-variant-warning .vui-alert-icon path {
|
|
128
|
+
// color: var(--color-border-yellow);
|
|
129
|
+
// }
|
|
130
|
+
|
|
131
|
+
// .vui-alert.vui-alert-variant-success .vui-alert-icon path {
|
|
132
|
+
// color: var(--color-border-green);
|
|
133
|
+
// }
|
|
134
|
+
|
|
135
|
+
// .vui-alert.vui-alert-variant-info .vui-alert-icon path {
|
|
136
|
+
// color: var(--color-border-blue);
|
|
137
|
+
// }
|
|
138
|
+
|
|
139
|
+
// .vui-alert {
|
|
140
|
+
// &.filled {
|
|
141
|
+
// &.vui-alert-variant-danger .vui-alert-icon path,
|
|
142
|
+
// &.vui-alert-variant-warning .vui-alert-icon path,
|
|
143
|
+
// &.vui-alert-variant-success .vui-alert-icon path,
|
|
144
|
+
// &.vui-alert-variant-info .vui-alert-icon path {
|
|
145
|
+
// color: var(--color-text-light);
|
|
146
|
+
// }
|
|
147
|
+
|
|
148
|
+
// strong,
|
|
149
|
+
// p {
|
|
150
|
+
// color: var(--color-text);
|
|
151
|
+
// }
|
|
152
|
+
// }
|
|
153
|
+
// }
|
|
154
|
+
|
|
155
|
+
// .vui-alert.filled.vui-alert-variant-danger .vui-alert-icon path,
|
|
156
|
+
// .vui-alert.filled.vui-alert-variant-warning .vui-alert-icon path,
|
|
157
|
+
// .vui-alert.filled.vui-alert-variant-success .vui-alert-icon path,
|
|
158
|
+
// .vui-alert.filled.vui-alert-variant-info .vui-alert-icon path {
|
|
159
|
+
// color: var(--color-text-light);
|
|
160
|
+
// }
|
|
161
|
+
}
|