@dolanske/vui 0.5.0 → 1.0.1

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.
Files changed (178) hide show
  1. package/README.md +5 -4
  2. package/dist/components/Accordion/Accordion.vue.d.ts +3 -2
  3. package/dist/components/Accordion/AccordionGroup.vue.d.ts +5 -2
  4. package/dist/components/Alert/Alert.vue.d.ts +10 -3
  5. package/dist/components/Avatar/Avatar.vue.d.ts +16 -1
  6. package/dist/components/Badge/Badge.vue.d.ts +4 -3
  7. package/dist/components/Breadcrumbs/BreadcrumbItem.vue.d.ts +4 -3
  8. package/dist/components/Breadcrumbs/Breadcrumbs.vue.d.ts +3 -2
  9. package/dist/components/Button/Button.vue.d.ts +8 -17
  10. package/dist/components/ButtonGroup/ButtonGroup.vue.d.ts +5 -2
  11. package/dist/components/Calendar/Calendar.vue.d.ts +7 -7
  12. package/dist/components/Card/Card.vue.d.ts +4 -3
  13. package/dist/components/Checkbox/Checkbox.vue.d.ts +8 -6
  14. package/dist/components/CopyClipboard/CopyClipboard.vue.d.ts +2 -1
  15. package/dist/components/Divider/Divider.vue.d.ts +3 -2
  16. package/dist/components/Drawer/Drawer.vue.d.ts +6 -5
  17. package/dist/components/Dropdown/Dropdown.vue.d.ts +84 -6
  18. package/dist/components/Dropdown/DropdownItem.vue.d.ts +3 -2
  19. package/dist/components/Dropdown/DropdownTitle.vue.d.ts +6 -2
  20. package/dist/components/Flex/Flex.vue.d.ts +3 -2
  21. package/dist/components/Grid/Grid.vue.d.ts +7 -3
  22. package/dist/components/Input/Color.vue.d.ts +11 -0
  23. package/dist/components/Input/Counter.vue.d.ts +5 -5
  24. package/dist/components/Input/Dropzone.vue.d.ts +96 -11
  25. package/dist/components/Input/File.vue.d.ts +4 -3
  26. package/dist/components/Input/Input.vue.d.ts +9 -8
  27. package/dist/components/Input/Password.vue.d.ts +1 -1
  28. package/dist/components/Input/Textarea.vue.d.ts +7 -6
  29. package/dist/components/Kbd/Kbd.vue.d.ts +1 -1
  30. package/dist/components/Kbd/KbdGroup.vue.d.ts +5 -12
  31. package/dist/components/Modal/Confirm.vue.d.ts +7 -6
  32. package/dist/components/Modal/Modal.vue.d.ts +7 -6
  33. package/dist/components/OTP/OTP.vue.d.ts +7 -6
  34. package/dist/components/OTP/OTPItem.vue.d.ts +1 -1
  35. package/dist/components/Pagination/Pagination.vue.d.ts +6 -2
  36. package/dist/components/Popout/Popout.vue.d.ts +11 -3
  37. package/dist/components/Progress/Progress.vue.d.ts +7 -5
  38. package/dist/components/Radio/Radio.vue.d.ts +8 -6
  39. package/dist/components/Radio/RadioGroup.vue.d.ts +7 -6
  40. package/dist/components/Select/Select.vue.d.ts +6 -8
  41. package/dist/components/Sheet/Sheet.vue.d.ts +9 -5
  42. package/dist/components/Sidebar/Sidebar.vue.d.ts +70 -0
  43. package/dist/components/Skeleton/Skeleton.vue.d.ts +1 -1
  44. package/dist/components/Spinner/Spinner.vue.d.ts +1 -1
  45. package/dist/components/Switch/Switch.vue.d.ts +8 -6
  46. package/dist/components/Table/Cell.vue.d.ts +5 -2
  47. package/dist/components/Table/{Header.vue.d.ts → Head.vue.d.ts} +3 -2
  48. package/dist/components/Table/{Table.vue.d.ts → Root.vue.d.ts} +3 -2
  49. package/dist/components/Table/index.d.ts +6 -0
  50. package/dist/components/Table/table.d.ts +3 -3
  51. package/dist/components/Tabs/Tab.vue.d.ts +17 -3
  52. package/dist/components/Tabs/Tabs.vue.d.ts +8 -7
  53. package/dist/components/Toast/toast.d.ts +245 -0
  54. package/dist/components/Tooltip/Tooltip.vue.d.ts +2 -1
  55. package/dist/index.d.ts +5 -7
  56. package/dist/internal/Backdrop/Backdrop.vue.d.ts +3 -2
  57. package/dist/shared/helpers.d.ts +9 -0
  58. package/dist/shared/theme.d.ts +3 -0
  59. package/dist/vui.css +1 -0
  60. package/dist/vui.js +7160 -6355
  61. package/package.json +22 -18
  62. package/src/App.vue +90 -171
  63. package/src/components/Accordion/accordion.scss +1 -0
  64. package/src/components/Alert/Alert.vue +11 -5
  65. package/src/components/Alert/alert.scss +104 -23
  66. package/src/components/Avatar/Avatar.vue +4 -1
  67. package/src/components/Avatar/avatar.scss +1 -1
  68. package/src/components/Badge/Badge.vue +1 -1
  69. package/src/components/Badge/badge.scss +134 -17
  70. package/src/components/Breadcrumbs/BreadcrumbItem.vue +2 -2
  71. package/src/components/Breadcrumbs/Breadcrumbs.vue +1 -2
  72. package/src/components/Breadcrumbs/breadcrumbs.scss +2 -1
  73. package/src/components/Button/Button.vue +15 -20
  74. package/src/components/Button/button.scss +156 -55
  75. package/src/components/ButtonGroup/ButtonGroup.vue +4 -1
  76. package/src/components/ButtonGroup/button-group.scss +2 -2
  77. package/src/components/Calendar/Calendar.vue +4 -1
  78. package/src/components/Calendar/calendar.scss +25 -2
  79. package/src/components/Card/Card.vue +2 -2
  80. package/src/components/Card/card.scss +4 -4
  81. package/src/components/Checkbox/Checkbox.vue +4 -1
  82. package/src/components/Checkbox/checkbox.scss +17 -12
  83. package/src/components/CopyClipboard/CopyClipboard.vue +15 -6
  84. package/src/components/CopyClipboard/copy-clipboard.scss +10 -2
  85. package/src/components/Drawer/Drawer.vue +4 -4
  86. package/src/components/Drawer/drawer.scss +1 -0
  87. package/src/components/Dropdown/Dropdown.vue +44 -20
  88. package/src/components/Dropdown/DropdownItem.vue +4 -4
  89. package/src/components/Dropdown/DropdownTitle.vue +7 -1
  90. package/src/components/Dropdown/dropdown-item.scss +9 -2
  91. package/src/components/Dropdown/dropdown.scss +21 -7
  92. package/src/components/Grid/Grid.vue +21 -1
  93. package/src/components/Input/Color.vue +26 -0
  94. package/src/components/Input/Counter.vue +12 -16
  95. package/src/components/Input/Dropzone.vue +1 -1
  96. package/src/components/Input/File.vue +1 -1
  97. package/src/components/Input/Input.vue +8 -6
  98. package/src/components/Input/Password.vue +1 -13
  99. package/src/components/Input/Textarea.vue +4 -2
  100. package/src/components/Input/input.scss +110 -16
  101. package/src/components/Kbd/KbdGroup.vue +2 -6
  102. package/src/components/Kbd/kbd.scss +6 -5
  103. package/src/components/Modal/Confirm.vue +1 -1
  104. package/src/components/Modal/Modal.vue +23 -15
  105. package/src/components/Modal/modal.scss +11 -6
  106. package/src/components/OTP/otp.scss +8 -7
  107. package/src/components/Pagination/Pagination.vue +6 -3
  108. package/src/components/Popout/Popout.vue +15 -5
  109. package/src/components/Popout/popout.scss +8 -1
  110. package/src/components/Progress/Progress.vue +18 -5
  111. package/src/components/Progress/progress.scss +7 -1
  112. package/src/components/Radio/Radio.vue +4 -2
  113. package/src/components/Radio/radio.scss +18 -8
  114. package/src/components/Select/Select.vue +49 -18
  115. package/src/components/Select/select.scss +35 -2
  116. package/src/components/Sheet/Sheet.vue +8 -2
  117. package/src/components/Sheet/sheet.scss +9 -0
  118. package/src/components/Sidebar/Sidebar.vue +24 -11
  119. package/src/components/Sidebar/sidebar.scss +6 -5
  120. package/src/components/Spinner/spinner.scss +2 -1
  121. package/src/components/Switch/Switch.vue +4 -3
  122. package/src/components/Switch/switch.scss +39 -6
  123. package/src/components/Table/{Header.vue → Head.vue} +5 -5
  124. package/src/components/Table/{Table.vue → Root.vue} +2 -2
  125. package/src/components/Table/SelectRow.vue +2 -1
  126. package/src/components/Table/index.ts +7 -0
  127. package/src/components/Table/table.scss +25 -5
  128. package/src/components/Table/table.ts +7 -3
  129. package/src/components/Tabs/Tab.vue +7 -9
  130. package/src/components/Tabs/Tabs.vue +5 -4
  131. package/src/components/Tabs/tabs.scss +10 -3
  132. package/src/components/Toast/Toasts.vue +5 -0
  133. package/src/components/Toast/toast.scss +6 -2
  134. package/src/components/Toast/toast.ts +7 -0
  135. package/src/components/Tooltip/Tooltip.vue +9 -9
  136. package/src/components/Tooltip/tooltip.scss +4 -0
  137. package/src/examples/ExampleAccordions.vue +58 -0
  138. package/src/examples/ExampleAlerts.vue +78 -0
  139. package/src/examples/ExampleAvatars.vue +44 -0
  140. package/src/examples/ExampleBadges.vue +48 -0
  141. package/src/examples/ExampleBreadcrumbs.vue +46 -0
  142. package/src/examples/ExampleButtons.vue +140 -0
  143. package/src/examples/ExampleCalendars.vue +40 -0
  144. package/src/examples/ExampleCards.vue +94 -0
  145. package/src/examples/ExampleCheckboxes.vue +123 -0
  146. package/src/examples/ExampleCopyClipboard.vue +47 -0
  147. package/src/examples/ExampleDividers.vue +39 -0
  148. package/src/examples/ExampleDrawers.vue +67 -0
  149. package/src/examples/ExampleDropdowns.vue +114 -0
  150. package/src/examples/ExampleFlexGrid.vue +122 -0
  151. package/src/examples/ExampleInputs.vue +234 -0
  152. package/src/examples/ExampleKBD.vue +65 -0
  153. package/src/examples/ExampleModals.vue +143 -0
  154. package/src/examples/ExamplePalette.vue +159 -0
  155. package/src/examples/ExamplePopouts.vue +41 -0
  156. package/src/examples/ExampleSheets.vue +77 -0
  157. package/src/examples/ExampleSidebars.vue +270 -0
  158. package/src/examples/ExampleSkeletons.vue +26 -0
  159. package/src/examples/ExampleSpinners.vue +78 -0
  160. package/src/examples/ExampleTables.vue +195 -0
  161. package/src/examples/ExampleTabs.vue +119 -0
  162. package/src/examples/ExampleToasts.vue +96 -0
  163. package/src/examples/ExampleTooltips.vue +70 -0
  164. package/src/examples/shared/ExampleColor.vue +28 -0
  165. package/src/index.ts +8 -11
  166. package/src/internal/Backdrop/backdrop.scss +7 -1
  167. package/src/shared/helpers.ts +43 -0
  168. package/src/shared/theme.ts +22 -0
  169. package/src/style/animation.scss +1 -0
  170. package/src/style/core.scss +30 -55
  171. package/src/style/layout.scss +74 -9
  172. package/src/style/text.scss +18 -0
  173. package/src/style/theme.scss +195 -0
  174. package/src/style/tooltip.scss +22 -4
  175. package/src/style/typography.scss +95 -18
  176. package/dist/components/Table/Row.vue.d.ts +0 -16
  177. package/dist/style.css +0 -1
  178. package/src/components/Table/Row.vue +0 -9
@@ -0,0 +1,159 @@
1
+ <script setup lang='ts'>
2
+ import { Icon } from '@iconify/vue'
3
+ import Button from '../components/Button/Button.vue'
4
+ import Flex from '../components/Flex/Flex.vue'
5
+ import Grid from '../components/Grid/Grid.vue'
6
+ import { setColorTheme, theme } from '../shared/theme'
7
+ import ExampleColor from './shared/ExampleColor.vue'
8
+
9
+ // function getPalette(type: 'light' | 'dark') {
10
+ // return Array.from(document.styleSheets)
11
+ // .flatMap((styleSheet: CSSStyleSheet) => Array.from(styleSheet.cssRules))
12
+ // .filter(
13
+ // (cssRule: CSSRule): cssRule is CSSStyleRule =>
14
+ // cssRule instanceof CSSStyleRule && cssRule.selectorText === `:root`,
15
+ // )
16
+ // .flatMap((cssRule: CSSStyleRule) => Array.from(cssRule.style))
17
+ // .filter((style: string) => style.startsWith(`--${type}`))
18
+ // }
19
+
20
+ // const light = getPalette('light')
21
+ // const dark = getPalette('dark')
22
+ </script>
23
+
24
+ <template>
25
+ <div>
26
+ <h3 class="mb-l">
27
+ Themes
28
+ </h3>
29
+
30
+ <Grid :columns="2">
31
+ <Flex class="theme-wrap light" column gap="xxs">
32
+ <Flex space-between class="mb-l" align-center expand>
33
+ <h5>Light</h5>
34
+ <Button :disabled="theme === 'light'" variant="gray" data-title-top="Switch theme" @click="setColorTheme('light')">
35
+ <template #start>
36
+ <Icon icon="ph:sun" />
37
+ </template>
38
+ Use
39
+ </Button>
40
+ </Flex>
41
+ <ExampleColor name="Bg" color="--light-color-bg" />
42
+ <ExampleColor name="Bg Medium" color="--light-color-bg-medium" />
43
+ <ExampleColor name="Bg Raised" color="--light-color-bg-raised" />
44
+ <ExampleColor name="Bg Lowered" color="--light-color-bg-lowered" />
45
+ <div class="padder" />
46
+ <ExampleColor name="Text" color="--light-color-text" />
47
+ <ExampleColor name="Text Light" color="--light-color-text-light" />
48
+ <ExampleColor name="Text Lighter" color="--light-color-text-lighter" />
49
+ <ExampleColor name="Text Lightest" color="--light-color-text-lightest" />
50
+ <ExampleColor name="Text Invert" color="--light-color-text-invert" />
51
+ <div class="padder" />
52
+ <ExampleColor name="Button Gray" color="--light-color-button-gray" />
53
+ <ExampleColor name="Button Gray Hover" color="--light-color-button-gray-hover" />
54
+ <div class="padder" />
55
+ <ExampleColor name="Text Red" color="--light-color-text-red" />
56
+ <ExampleColor name="Bg Red Lowered" color="--light-color-bg-red-lowered" />
57
+ <ExampleColor name="Bg Red Raised" color="--light-color-bg-red-raised" />
58
+ <div class="padder" />
59
+ <ExampleColor name="Text Green" color="--light-color-text-green" />
60
+ <ExampleColor name="Bg Green Lowered" color="--light-color-bg-green-lowered" />
61
+ <ExampleColor name="Bg Green Raised" color="--light-color-bg-green-raised" />
62
+ <div class="padder" />
63
+ <ExampleColor name="Text Yellow" color="--light-color-text-yellow" />
64
+ <ExampleColor name="Bg Yellow Lowered" color="--light-color-bg-yellow-lowered" />
65
+ <ExampleColor name="Bg Yellow Raised" color="--light-color-bg-yellow-raised" />
66
+ <div class="padder" />
67
+ <ExampleColor name="Text Blue" color="--light-color-text-blue" />
68
+ <ExampleColor name="Bg Blue Lowered" color="--light-color-bg-blue-lowered" />
69
+ <ExampleColor name="Bg Blue Raised" color="--light-color-bg-blue-raised" />
70
+ <div class="padder" />
71
+ <ExampleColor name="Border" color="--light-color-border" />
72
+ <ExampleColor name="Border Strong" color="--light-color-border-strong" />
73
+ <ExampleColor name="Border Weak" color="--light-color-border-weak" />
74
+ <div class="padder" />
75
+ <ExampleColor name="Accent" color="--light-color-accent" />
76
+ <ExampleColor name="Bg Accent Lowered" color="--light-color-bg-accent-lowered" />
77
+ <ExampleColor name="Bg Accent Raised" color="--light-color-bg-accent-raised" />
78
+ </Flex>
79
+
80
+ <Flex class="theme-wrap dark" gap="xxs" column>
81
+ <Flex space-between class="mb-l" align-center expand>
82
+ <h5>Dark</h5>
83
+ <Button :disabled="theme === 'dark'" variant="gray" data-title-top="Switch theme" @click="setColorTheme('dark')">
84
+ <template #start>
85
+ <Icon icon="ph:moon" />
86
+ </template>
87
+ Use
88
+ </Button>
89
+ </Flex>
90
+ <ExampleColor name="Bg" color="--dark-color-bg" />
91
+ <ExampleColor name="Bg Medium" color="--dark-color-bg-medium" />
92
+ <ExampleColor name="Bg Raised" color="--dark-color-bg-raised" />
93
+ <ExampleColor name="Bg Lowered" color="--dark-color-bg-lowered" />
94
+ <div class="padder" />
95
+ <ExampleColor name="Text" color="--dark-color-text" />
96
+ <ExampleColor name="Text Light" color="--dark-color-text-light" />
97
+ <ExampleColor name="Text Lighter" color="--dark-color-text-lighter" />
98
+ <ExampleColor name="Text Lightest" color="--dark-color-text-lightest" />
99
+ <ExampleColor name="Text Invert" color="--dark-color-text-invert" />
100
+ <div class="padder" />
101
+ <ExampleColor name="Button Gray" color="--dark-color-button-gray" />
102
+ <ExampleColor name="Button Gray Hover" color="--dark-color-button-gray-hover" />
103
+ <div class="padder" />
104
+ <ExampleColor name="Text Red" color="--dark-color-text-red" />
105
+ <ExampleColor name="Bg Red Lowered" color="--dark-color-bg-red-lowered" />
106
+ <ExampleColor name="Bg Red Raised" color="--dark-color-bg-red-raised" />
107
+ <div class="padder" />
108
+ <ExampleColor name="Text Green" color="--dark-color-text-green" />
109
+ <ExampleColor name="Bg Green Lowered" color="--dark-color-bg-green-lowered" />
110
+ <ExampleColor name="Bg Green Raised" color="--dark-color-bg-green-raised" />
111
+ <div class="padder" />
112
+ <ExampleColor name="Text Yellow" color="--dark-color-text-yellow" />
113
+ <ExampleColor name="Bg Yellow Lowered" color="--dark-color-bg-yellow-lowered" />
114
+ <ExampleColor name="Bg Yellow Raised" color="--dark-color-bg-yellow-raised" />
115
+ <div class="padder" />
116
+ <ExampleColor name="Text Blue" color="--dark-color-text-blue" />
117
+ <ExampleColor name="Bg Blue Lowered" color="--dark-color-bg-blue-lowered" />
118
+ <ExampleColor name="Bg Blue Raised" color="--dark-color-bg-blue-raised" />
119
+ <div class="padder" />
120
+ <ExampleColor name="Border" color="--dark-color-border" />
121
+ <ExampleColor name="Border Strong" color="--dark-color-border-strong" />
122
+ <ExampleColor name="Border Weak" color="--dark-color-border-weak" />
123
+ <div class="padder" />
124
+ <ExampleColor name="Accent" color="--dark-color-accent" />
125
+ <ExampleColor name="Bg Accent Lowered" color="--dark-color-bg-accent-lowered" />
126
+ <ExampleColor name="Bg Accent Raised" color="--dark-color-bg-accent-raised" />
127
+ </Flex>
128
+ </Grid>
129
+ </div>
130
+ </template>
131
+
132
+ <style>
133
+ .padder {
134
+ height: 16px;
135
+ }
136
+
137
+ .theme-wrap {
138
+ padding: var(--space-m);
139
+ border-radius: var(--border-radius-m);
140
+
141
+ &.light {
142
+ background-color: white;
143
+
144
+ h5,
145
+ span {
146
+ color: var(--light-color-text) !important;
147
+ }
148
+ }
149
+
150
+ &.dark {
151
+ background-color: black;
152
+
153
+ h5,
154
+ span {
155
+ color: var(--dark-color-text) !important;
156
+ }
157
+ }
158
+ }
159
+ </style>
@@ -0,0 +1,41 @@
1
+ <script setup lang="ts">
2
+ import { ref, useTemplateRef } from 'vue'
3
+ import Button from '../components/Button/Button.vue'
4
+ import Flex from '../components/Flex/Flex.vue'
5
+ import Popout from '../components/Popout/Popout.vue'
6
+
7
+ const anch = useTemplateRef('anch')
8
+ const open = ref(false)
9
+ </script>
10
+
11
+ <template>
12
+ <div class="mb-xxl">
13
+ <h3 class="mb-l">
14
+ Popout
15
+ </h3>
16
+
17
+ <p class="mb-l">
18
+ Popout is a simpler version of dropdown. By default, it only provides functionality to float an element to the anchor. It is up to the developer to style it and set its placement / offset. Both dropdown & tooltip use the popout base.
19
+ </p>
20
+
21
+ <Flex>
22
+ <Button ref="anch" class="mb-xxs" @click="open = !open">
23
+ Open popout
24
+ </Button>
25
+ <p class="text-s text-color-light w-50">
26
+ This popout has offset of <code>32</code> and its placement is <code>bottom-start</code>. It also has an attached event to <code>clickOutside</code> which is fired when user clicks outside of the popout. In that case, we manually close it.
27
+ </p>
28
+ </Flex>
29
+ <Popout v-if="open" :anchor="anch" class="test-popout" :offset="32" placement="bottom-start" @click-outside="open = false">
30
+ <h3>Popout content</h3>
31
+ <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Dolorem facere eligendi ex, alias itaque molestiae, vero animi, vitae vel fuga corporis aut consectetur temporibus ipsum placeat dolores perferendis. Deleniti, et!</p>
32
+ </Popout>
33
+ </div>
34
+ </template>
35
+
36
+ <style scoped>
37
+ .test-popout {
38
+ max-width: 256px;
39
+ padding: var(--space-xl);
40
+ }
41
+ </style>
@@ -0,0 +1,77 @@
1
+ <script setup lang='ts'>
2
+ import type { SelectOption } from '../components/Select/Select.vue'
3
+ import { ref } from 'vue'
4
+ import Button from '../components/Button/Button.vue'
5
+ import Flex from '../components/Flex/Flex.vue'
6
+ import Input from '../components/Input/Input.vue'
7
+ import Select from '../components/Select/Select.vue'
8
+ import Sheet from '../components/Sheet/Sheet.vue'
9
+
10
+ const open1 = ref()
11
+ const open2 = ref()
12
+ const width = ref(328)
13
+ const options: SelectOption[] = [{ value: 'left', label: 'Left' }, { value: 'right', label: ' Right' }, { value: 'top', label: 'Top' }, { value: 'bottom', label: 'Bottom' }]
14
+ const option = ref([options[0]])
15
+ </script>
16
+
17
+ <template>
18
+ <div class="mb-xxl">
19
+ <h3 class="mb-l">
20
+ Sheets
21
+ </h3>
22
+
23
+ <Select v-model="option" expand label="Position" :options class="mb-l" required />
24
+
25
+ <table>
26
+ <tbody>
27
+ <tr>
28
+ <th>Base + divider + footer</th>
29
+ <td>
30
+ <Flex gap="m" justify-start>
31
+ <Button @click="open1 = !open1">
32
+ Open
33
+ </Button>
34
+ <Sheet v-model="open1" :position="option[0].value" separator>
35
+ <template #header>
36
+ <h2>Hello </h2>
37
+ </template>
38
+ <h2 class="text-color-lighter">
39
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Accusamus alias consectetur obcaecati recusandae debitis voluptatum exercitationem. Nam facilis laudantium labore sint cum, veritatis autem asperiores consectetur possimus cumque beatae eveniet. Lorem ipsum dolor sit amet consectetur adipisicing elit. Impedit rem quod quisquam laborum sed excepturi, eum nisi nostrum, totam nihil magni voluptatum rerum culpa voluptatibus velit, sapiente fuga similique eius?
40
+ </h2>
41
+ <template #footer="{ close }">
42
+ <p class="mb-s">
43
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Perferendis placeat nisi, in velit temporibus at esse error et iusto vero odit illo veritatis rem cum delectus autem minus quod reiciendis.
44
+ </p>
45
+ <Button @click="close">
46
+ Close
47
+ </Button>
48
+ </template>
49
+ </Sheet>
50
+ </Flex>
51
+ </td>
52
+ </tr>
53
+ <tr>
54
+ <th>Width</th>
55
+ <td>
56
+ <Flex gap="m" justify-start align-center>
57
+ <Input v-model="width">
58
+ <template #start>
59
+ Width
60
+ </template>
61
+ </Input>
62
+ <Button @click="open2 = !open2">
63
+ Open
64
+ </Button>
65
+ <Sheet v-model="open2" :position="option[0].value" :size="width">
66
+ <template #header>
67
+ <h2>Hello </h2>
68
+ </template>
69
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Accusamus alias consectetur obcaecati recusandae debitis voluptatum exercitationem. Nam facilis laudantium labore sint cum, veritatis autem asperiores consectetur possimus cumque beatae eveniet.</p>
70
+ </Sheet>
71
+ </Flex>
72
+ </td>
73
+ </tr>
74
+ </tbody>
75
+ </table>
76
+ </div>
77
+ </template>
@@ -0,0 +1,270 @@
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
+ import DropdownItem from '../components/Dropdown/DropdownItem.vue'
6
+ import Flex from '../components/Flex/Flex.vue'
7
+ import Grid from '../components/Grid/Grid.vue'
8
+ import Sidebar from '../components/Sidebar/Sidebar.vue'
9
+
10
+ const s1 = ref(true)
11
+ const s2 = ref(true)
12
+ const s3 = ref(true)
13
+ </script>
14
+
15
+ <template>
16
+ <div class="mb-xxl">
17
+ <h3 class="mb-l">
18
+ Sidebars
19
+ </h3>
20
+
21
+ <Grid :columns="2" gap="xl">
22
+ <div>
23
+ <span class="mb-m block">Base + slots</span>
24
+ <div class="vui-sidebar-layout" :style="{ height: '512px' }">
25
+ <Sidebar>
26
+ <template #header>
27
+ <Flex align-center>
28
+ <img src="https://dolansky.dev/backgrounds/star.png" class="sidebar-logo" width="40" alt="">
29
+ <h3>ABC</h3>
30
+ </Flex>
31
+ </template>
32
+ <DropdownItem icon="ph:house">
33
+ Home
34
+ </DropdownItem>
35
+ <DropdownItem icon="ph:user">
36
+ About
37
+ </DropdownItem>
38
+ <DropdownItem icon="ph:phone">
39
+ Contact
40
+ </DropdownItem>
41
+
42
+ <template #footer>
43
+ <Flex align-center>
44
+ <Avatar size="m" />
45
+ <span class="flex-1">dolanske</span>
46
+ <Button plain size="s" icon="ph:sign-out" />
47
+ </Flex>
48
+ </template>
49
+ </Sidebar>
50
+ <main class="p-l typeset">
51
+ <h4>My page</h4>
52
+ <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Atque deleniti asperiores quibusdam et commodi deserunt libero officia doloremque. Possimus ipsum sunt odit culpa consequatur hic reiciendis doloremque consequuntur tempore excepturi?</p>
53
+ <hr>
54
+ <p>Yes that's correct</p>
55
+ <ul>
56
+ <li>Secure</li>
57
+ <li>Reliant</li>
58
+ <li>Ublumf</li>
59
+ </ul>
60
+ </main>
61
+ </div>
62
+ </div>
63
+
64
+ <div>
65
+ <span class="mb-m block">Toggleable + floaty</span>
66
+ <div class="vui-sidebar-layout" :style="{ height: '512px' }">
67
+ <Sidebar v-model="s1" floaty>
68
+ <template #header="{ close }">
69
+ <Flex align-center>
70
+ <img src="https://dolansky.dev/backgrounds/star.png" class="sidebar-logo" width="40" alt="">
71
+ <h3 class="flex-1">
72
+ ABC
73
+ </h3>
74
+ <Button plain size="s" icon="ph:x" @click="close" />
75
+ </Flex>
76
+ </template>
77
+ <DropdownItem icon="ph:house">
78
+ Outside
79
+ </DropdownItem>
80
+ <DropdownItem icon="ph:user">
81
+ About You
82
+ </DropdownItem>
83
+ <DropdownItem icon="ph:phone">
84
+ No contact
85
+ </DropdownItem>
86
+ </Sidebar>
87
+ <main class="p-l">
88
+ <Flex align-center class="mb-m">
89
+ <Button plain size="s" icon="ph:sidebar-simple" @click="s1 = !s1" />
90
+ <h4>
91
+ My page
92
+ </h4>
93
+ </Flex>
94
+
95
+ <div class="typeset">
96
+ <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Atque deleniti asperiores quibusdam et commodi deserunt libero officia doloremque. Possimus ipsum sunt odit culpa consequatur hic reiciendis doloremque consequuntur tempore excepturi?</p>
97
+ <hr>
98
+ <p>Yes that's correct</p>
99
+ <ul>
100
+ <li>Secure</li>
101
+ <li>Reliant</li>
102
+ <li>Ublumf</li>
103
+ </ul>
104
+ </div>
105
+ </main>
106
+ </div>
107
+ </div>
108
+
109
+ <div>
110
+ <span class="mb-m block">Mini </span>
111
+ <div class="vui-sidebar-layout" :style="{ height: '512px' }">
112
+ <Sidebar v-model="s2" mini>
113
+ <template #header>
114
+ <Flex align-center>
115
+ <img src="https://dolansky.dev/backgrounds/star.png" class="sidebar-logo" width="40" alt="">
116
+ </Flex>
117
+ </template>
118
+ <DropdownItem icon="ph:house">
119
+ Home
120
+ </DropdownItem>
121
+ <DropdownItem icon="ph:user">
122
+ About
123
+ </DropdownItem>
124
+ <DropdownItem icon="ph:phone">
125
+ Contact
126
+ </DropdownItem>
127
+
128
+ <template #footer="{ close }">
129
+ <Flex justify-center>
130
+ <Button plain icon="ph:x" @click="close" />
131
+ </Flex>
132
+ </template>
133
+ </Sidebar>
134
+ <main class="p-l">
135
+ <Flex align-center class="mb-m">
136
+ <Button plain size="s" icon="ph:sidebar-simple" @click="s2 = !s2" />
137
+ <h4>
138
+ My page
139
+ </h4>
140
+ </Flex>
141
+
142
+ <div class="typeset">
143
+ <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Atque deleniti asperiores quibusdam et commodi deserunt libero officia doloremque. Possimus ipsum sunt odit culpa consequatur hic reiciendis doloremque consequuntur tempore excepturi?</p>
144
+ <hr>
145
+ <p>Yes that's correct</p>
146
+ <ul>
147
+ <li>Secure</li>
148
+ <li>Reliant</li>
149
+ <li>Ublumf</li>
150
+ </ul>
151
+ </div>
152
+ </main>
153
+ </div>
154
+ </div>
155
+
156
+ <div>
157
+ <span class="mb-m block">Mini & floaty </span>
158
+ <div class="vui-sidebar-layout" :style="{ height: '512px' }">
159
+ <Sidebar v-model="s3" mini floaty>
160
+ <template #header>
161
+ <Flex align-center>
162
+ <img src="https://dolansky.dev/backgrounds/star.png" class="sidebar-logo" width="40" alt="">
163
+ </Flex>
164
+ </template>
165
+ <DropdownItem icon="ph:house">
166
+ Home
167
+ </DropdownItem>
168
+ <DropdownItem icon="ph:user">
169
+ About
170
+ </DropdownItem>
171
+ <DropdownItem icon="ph:phone">
172
+ Contact
173
+ </DropdownItem>
174
+
175
+ <template #footer="{ close }">
176
+ <Flex justify-center>
177
+ <Button plain icon="ph:x" @click="close" />
178
+ </Flex>
179
+ </template>
180
+ </Sidebar>
181
+ <main class="p-l">
182
+ <Flex align-center class="mb-m">
183
+ <Button plain size="s" icon="ph:sidebar-simple" @click="s3 = !s3" />
184
+ <h4>
185
+ My page
186
+ </h4>
187
+ </Flex>
188
+
189
+ <div class="typeset">
190
+ <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Atque deleniti asperiores quibusdam et commodi deserunt libero officia doloremque. Possimus ipsum sunt odit culpa consequatur hic reiciendis doloremque consequuntur tempore excepturi?</p>
191
+ <hr>
192
+ <p>Yes that's correct</p>
193
+ <ul>
194
+ <li>Secure</li>
195
+ <li>Reliant</li>
196
+ <li>Ublumf</li>
197
+ </ul>
198
+ </div>
199
+ </main>
200
+ </div>
201
+ </div>
202
+
203
+ <div>
204
+ <span class="mb-m block">Appear + custom width</span>
205
+ <div class="vui-sidebar-layout" :style="{ height: '512px' }">
206
+ <Sidebar appear :width="300">
207
+ <template #header>
208
+ <img src="https://dolansky.dev/backgrounds/star.png" class="sidebar-logo" width="40" alt="">
209
+ </template>
210
+ <DropdownItem icon="ph:house">
211
+ Home
212
+ </DropdownItem>
213
+ <DropdownItem icon="ph:user">
214
+ About
215
+ </DropdownItem>
216
+ <DropdownItem icon="ph:phone">
217
+ Contact
218
+ </DropdownItem>
219
+ </Sidebar>
220
+ <main class="p-l typeset">
221
+ <h4>
222
+ Appear sidebar
223
+ </h4>
224
+ <p>This sidebar will appear automatically whenever the curosor is close to the edge of the sidebar wrapper.</p>
225
+ </main>
226
+ </div>
227
+ </div>
228
+
229
+ <div>
230
+ <span class="mb-m block">Appear + mini + floaty</span>
231
+ <div class="vui-sidebar-layout" :style="{ height: '512px' }">
232
+ <Sidebar appear mini floaty>
233
+ <template #header>
234
+ <img src="https://dolansky.dev/backgrounds/star.png" class="sidebar-logo" width="40" alt="">
235
+ </template>
236
+ <DropdownItem icon="ph:house">
237
+ Home
238
+ </DropdownItem>
239
+ <DropdownItem icon="ph:user">
240
+ About
241
+ </DropdownItem>
242
+ <DropdownItem icon="ph:phone">
243
+ Contact
244
+ </DropdownItem>
245
+ </Sidebar>
246
+ <main class="p-l typeset">
247
+ <h4>
248
+ Appear sidebar
249
+ </h4>
250
+ <p>This sidebar will appear automatically whenever the curosor is close to the edge of the sidebar wrapper.</p>
251
+ </main>
252
+ </div>
253
+ </div>
254
+ </Grid>
255
+ </div>
256
+ </template>
257
+
258
+ <style scoped>
259
+ .vui-sidebar-layout {
260
+ border: 1px solid var(--color-border);
261
+ border-radius: var(--border-radius-m);
262
+ overflow: hidden;
263
+ }
264
+
265
+ html.dark {
266
+ .sidebar-logo {
267
+ filter: invert() !important;
268
+ }
269
+ }
270
+ </style>
@@ -0,0 +1,26 @@
1
+ <script setup lang='ts'>
2
+ import Flex from '../components/Flex/Flex.vue'
3
+ import Skeleton from '../components/Skeleton/Skeleton.vue'
4
+ </script>
5
+
6
+ <template>
7
+ <div class="mb-xxl">
8
+ <h3 class="mb-l">
9
+ Skeletons
10
+ </h3>
11
+ <table>
12
+ <tbody>
13
+ <tr>
14
+ <th>No defaults <br> Width, height, roundness must be specified</th>
15
+ <td>
16
+ <Flex gap="s">
17
+ <Skeleton :width="80" :height="48" :radius="8" />
18
+ <Skeleton :width="48" :height="48" :radius="8" />
19
+ <Skeleton :width="48" circle />
20
+ </Flex>
21
+ </td>
22
+ </tr>
23
+ </tbody>
24
+ </table>
25
+ </div>
26
+ </template>
@@ -0,0 +1,78 @@
1
+ <script setup lang='ts'>
2
+ import { ref, watch } from 'vue'
3
+ import Button from '../components/Button/Button.vue'
4
+ import Checkbox from '../components/Checkbox/Checkbox.vue'
5
+ import Flex from '../components/Flex/Flex.vue'
6
+ import Progress from '../components/Progress/Progress.vue'
7
+ import Spinner from '../components/Spinner/Spinner.vue'
8
+
9
+ const paused = ref(true)
10
+ const progress = ref(25)
11
+
12
+ const fakeProgress = ref(15)
13
+ const showFixed = ref(false)
14
+ const variants = ['s', 'm', 'l'] as const
15
+
16
+ watch(paused, () => fakeProgress.value = 0)
17
+ </script>
18
+
19
+ <template>
20
+ <div class="mb-xxl">
21
+ <h3 class="mb-l flex g-m y-center">
22
+ Loading
23
+ <Button square :icon="paused ? 'ph:play' : 'ph:pause'" size="s" plain @click="paused = !paused" />
24
+ </h3>
25
+ <table>
26
+ <tbody>
27
+ <tr>
28
+ <th>Spinners</th>
29
+ <td>
30
+ <Flex
31
+ gap="l" :style="{
32
+ 'animation-play-state': 'paused',
33
+ }"
34
+ >
35
+ <Spinner
36
+ v-for="size in variants" :key="size" :size :style="{
37
+ 'animation-play-state': paused ? 'paused' : 'running',
38
+ }"
39
+ />
40
+ </Flex>
41
+ </td>
42
+ </tr>
43
+ <tr>
44
+ <th>Progress bar</th>
45
+ <td class="w-80">
46
+ <Flex gap="s" align-center>
47
+ <Button square icon="ph:minus" size="s" @click="progress -= 5" />
48
+ <Progress v-model="progress" class="w-full" />
49
+ <Button square icon="ph:plus" size="s" @click="progress += 5" />
50
+ </Flex>
51
+ </td>
52
+ </tr>
53
+ <tr>
54
+ <th>Progress bar tall</th>
55
+ <td class="w-80">
56
+ <Flex gap="s" align-center>
57
+ <Progress v-model="progress" :height="8" class="w-full" />
58
+ </Flex>
59
+ </td>
60
+ </tr>
61
+ <tr>
62
+ <th>Fake</th>
63
+ <td>
64
+ <Progress v-model="fakeProgress" :fake="!paused" />
65
+ </td>
66
+ </tr>
67
+ <tr>
68
+ <th>Fixed</th>
69
+ <td>
70
+ <Checkbox v-model="showFixed" label="Show fixed progress bar (look up)" />
71
+
72
+ <Progress v-if="showFixed" v-model="fakeProgress" :fake="!paused" fixed />
73
+ </td>
74
+ </tr>
75
+ </tbody>
76
+ </table>
77
+ </div>
78
+ </template>