@dolanske/vui 0.1.0 → 0.1.2

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 (162) hide show
  1. package/README.md +7 -0
  2. package/dist/components/Accordion/Accordion.vue.d.ts +45 -0
  3. package/dist/components/Accordion/AccordionGroup.vue.d.ts +32 -0
  4. package/dist/components/Alert/Alert.vue.d.ts +29 -0
  5. package/dist/components/Avatar/Avatar.vue.d.ts +9 -0
  6. package/dist/components/Badge/Badge.vue.d.ts +21 -0
  7. package/dist/components/Breadcrumbs/BreadcrumbItem.vue.d.ts +21 -0
  8. package/dist/components/Breadcrumbs/Breadcrumbs.vue.d.ts +27 -0
  9. package/dist/components/Button/Button.vue.d.ts +41 -0
  10. package/dist/components/ButtonGroup/ButtonGroup.vue.d.ts +19 -0
  11. package/dist/components/Calendar/Calendar.vue.d.ts +27 -0
  12. package/dist/components/Card/Card.vue.d.ts +25 -0
  13. package/dist/components/Checkbox/Checkbox.vue.d.ts +31 -0
  14. package/dist/components/CopyClipboard/CopyClipboard.vue.d.ts +40 -0
  15. package/dist/components/Divider/Divider.vue.d.ts +24 -0
  16. package/dist/components/Drawer/Drawer.vue.d.ts +52 -0
  17. package/dist/components/Dropdown/DropdownItem.vue.d.ts +21 -0
  18. package/dist/components/Dropdown/DropdownTitle.vue.d.ts +17 -0
  19. package/dist/components/Flex/Flex.vue.d.ts +38 -0
  20. package/dist/components/Grid/Grid.vue.d.ts +27 -0
  21. package/dist/components/Input/Counter.vue.d.ts +19 -0
  22. package/dist/components/Input/Dropzone.vue.d.ts +107 -0
  23. package/dist/components/Input/File.vue.d.ts +7 -0
  24. package/dist/components/Input/Input.vue.d.ts +54 -0
  25. package/dist/components/Input/Password.vue.d.ts +6 -0
  26. package/dist/components/Input/Textarea.vue.d.ts +30 -0
  27. package/dist/components/Kbd/Kbd.vue.d.ts +23 -0
  28. package/dist/components/Kbd/KbdGroup.vue.d.ts +31 -0
  29. package/dist/components/Modal/Confirm.vue.d.ts +45 -0
  30. package/dist/components/Modal/Modal.vue.d.ts +55 -0
  31. package/dist/components/Pagination/Pagination.vue.d.ts +42 -0
  32. package/dist/components/Pagination/pagination.d.ts +12 -0
  33. package/dist/components/Popout/Popout.vue.d.ts +34 -0
  34. package/dist/components/Progress/Progress.vue.d.ts +31 -0
  35. package/dist/components/Radio/Radio.vue.d.ts +27 -0
  36. package/dist/components/Radio/RadioGroup.vue.d.ts +40 -0
  37. package/dist/components/Select/Select.vue.d.ts +37 -0
  38. package/dist/components/Sheet/Sheet.vue.d.ts +35 -0
  39. package/dist/components/Skeleton/Skeleton.vue.d.ts +8 -0
  40. package/dist/components/Spinner/Spinner.vue.d.ts +6 -0
  41. package/dist/components/Switch/Switch.vue.d.ts +26 -0
  42. package/dist/components/Table/Cell.vue.d.ts +19 -0
  43. package/dist/components/Table/Header.vue.d.ts +29 -0
  44. package/dist/components/Table/Row.vue.d.ts +16 -0
  45. package/dist/components/Table/SelectAll.vue.d.ts +2 -0
  46. package/dist/components/Table/SelectRow.vue.d.ts +6 -0
  47. package/dist/components/Table/Table.vue.d.ts +40 -0
  48. package/dist/components/Table/table.d.ts +68 -0
  49. package/dist/components/Tabs/Tab.vue.d.ts +8 -0
  50. package/dist/components/Tabs/Tabs.vue.d.ts +43 -0
  51. package/dist/components/Toast/Toasts.vue.d.ts +2 -0
  52. package/dist/components/Toast/toast.d.ts +42 -0
  53. package/dist/components/Tooltip/Tooltip.vue.d.ts +32 -0
  54. package/dist/index.d.ts +54 -1
  55. package/dist/internal/Backdrop/Backdrop.vue.d.ts +20 -0
  56. package/dist/shared/composables.d.ts +3 -0
  57. package/dist/shared/helpers.d.ts +16 -0
  58. package/dist/shared/types.d.ts +10 -0
  59. package/dist/style.css +1 -1
  60. package/dist/vui.js +199 -214
  61. package/package.json +11 -9
  62. package/src/App.vue +162 -0
  63. package/src/components/Accordion/Accordion.vue +75 -0
  64. package/src/components/Accordion/AccordionGroup.vue +43 -0
  65. package/src/components/Accordion/accordion.scss +44 -0
  66. package/src/components/Alert/Alert.vue +53 -0
  67. package/src/components/Alert/alert.scss +80 -0
  68. package/src/components/Avatar/Avatar.vue +36 -0
  69. package/src/components/Avatar/avatar.scss +46 -0
  70. package/src/components/Badge/Badge.vue +21 -0
  71. package/src/components/Badge/badge.scss +89 -0
  72. package/src/components/Breadcrumbs/BreadcrumbItem.vue +26 -0
  73. package/src/components/Breadcrumbs/Breadcrumbs.vue +33 -0
  74. package/src/components/Breadcrumbs/breadcrumbs.scss +30 -0
  75. package/src/components/Button/Button.vue +90 -0
  76. package/src/components/Button/button.scss +176 -0
  77. package/src/components/ButtonGroup/ButtonGroup.vue +25 -0
  78. package/src/components/ButtonGroup/button-group.scss +51 -0
  79. package/src/components/Calendar/Calendar.vue +58 -0
  80. package/src/components/Calendar/calendar.scss +56 -0
  81. package/src/components/Card/Card.vue +48 -0
  82. package/src/components/Card/card.scss +53 -0
  83. package/src/components/Checkbox/Checkbox.vue +49 -0
  84. package/src/components/Checkbox/checkbox.scss +60 -0
  85. package/src/components/CopyClipboard/CopyClipboard.vue +82 -0
  86. package/src/components/CopyClipboard/copy-clipboard.scss +17 -0
  87. package/src/components/Divider/Divider.vue +34 -0
  88. package/src/components/Divider/divider.scss +35 -0
  89. package/src/components/Drawer/Drawer.vue +93 -0
  90. package/src/components/Drawer/drawer.scss +49 -0
  91. package/src/components/Dropdown/Dropdown.vue +100 -0
  92. package/src/components/Dropdown/DropdownItem.vue +29 -0
  93. package/src/components/Dropdown/DropdownTitle.vue +8 -0
  94. package/src/components/Dropdown/dropdown.scss +112 -0
  95. package/src/components/Flex/Flex.vue +109 -0
  96. package/src/components/Grid/Grid.vue +59 -0
  97. package/src/components/Input/Counter.vue +70 -0
  98. package/src/components/Input/Dropzone.vue +63 -0
  99. package/src/components/Input/File.vue +15 -0
  100. package/src/components/Input/Input.vue +118 -0
  101. package/src/components/Input/Password.vue +47 -0
  102. package/src/components/Input/Textarea.vue +73 -0
  103. package/src/components/Input/input.scss +199 -0
  104. package/src/components/Kbd/Kbd.vue +48 -0
  105. package/src/components/Kbd/KbdGroup.vue +31 -0
  106. package/src/components/Kbd/kbd.scss +18 -0
  107. package/src/components/Modal/Confirm.vue +56 -0
  108. package/src/components/Modal/Modal.vue +91 -0
  109. package/src/components/Modal/modal.scss +49 -0
  110. package/src/components/Pagination/Pagination.vue +74 -0
  111. package/src/components/Pagination/pagination.ts +78 -0
  112. package/src/components/Popout/Popout.vue +39 -0
  113. package/src/components/Popout/popout.scss +7 -0
  114. package/src/components/Progress/Progress.vue +84 -0
  115. package/src/components/Progress/progress.scss +41 -0
  116. package/src/components/Radio/Radio.vue +36 -0
  117. package/src/components/Radio/RadioGroup.vue +35 -0
  118. package/src/components/Radio/radio.scss +59 -0
  119. package/src/components/Select/Select.vue +180 -0
  120. package/src/components/Select/select.scss +43 -0
  121. package/src/components/Sheet/Sheet.vue +91 -0
  122. package/src/components/Sheet/sheet.scss +56 -0
  123. package/src/components/Skeleton/Skeleton.vue +46 -0
  124. package/src/components/Skeleton/skeleton.scss +14 -0
  125. package/src/components/Spinner/Spinner.vue +44 -0
  126. package/src/components/Spinner/spinner.scss +46 -0
  127. package/src/components/Switch/Switch.vue +30 -0
  128. package/src/components/Switch/switch.scss +52 -0
  129. package/src/components/Table/Cell.vue +23 -0
  130. package/src/components/Table/Header.vue +59 -0
  131. package/src/components/Table/Row.vue +9 -0
  132. package/src/components/Table/SelectAll.vue +23 -0
  133. package/src/components/Table/SelectRow.vue +29 -0
  134. package/src/components/Table/Table.vue +66 -0
  135. package/src/components/Table/table.scss +134 -0
  136. package/src/components/Table/table.ts +243 -0
  137. package/src/components/Tabs/Tab.vue +21 -0
  138. package/src/components/Tabs/Tabs.vue +76 -0
  139. package/src/components/Tabs/tabs.scss +78 -0
  140. package/src/components/Toast/Toasts.vue +47 -0
  141. package/src/components/Toast/toast.scss +41 -0
  142. package/src/components/Toast/toast.ts +92 -0
  143. package/src/components/Tooltip/Tooltip.vue +80 -0
  144. package/src/components/Tooltip/tooltip.scss +4 -0
  145. package/src/index.scss +1 -0
  146. package/src/index.ts +111 -0
  147. package/src/internal/Backdrop/Backdrop.vue +22 -0
  148. package/src/internal/Backdrop/backdrop.scss +28 -0
  149. package/src/main.ts +5 -0
  150. package/src/shared/composables.ts +18 -0
  151. package/src/shared/helpers.ts +53 -0
  152. package/src/shared/types.ts +11 -0
  153. package/src/style/animation.scss +21 -0
  154. package/src/style/core.scss +128 -0
  155. package/src/style/fonts.scss +0 -0
  156. package/src/style/layout.scss +9 -0
  157. package/src/style/media-query.scss +29 -0
  158. package/src/style/reset.scss +135 -0
  159. package/src/style/tooltip.scss +128 -0
  160. package/src/style/typography.scss +339 -0
  161. package/src/style/utils.scss +22 -0
  162. package/src/vite-env.d.ts +1 -0
package/src/index.ts ADDED
@@ -0,0 +1,111 @@
1
+ import Accordion from './components/Accordion/Accordion.vue'
2
+ import AccordionGroup from './components/Accordion/AccordionGroup.vue'
3
+ import Alert from './components/Alert/Alert.vue'
4
+ import Avatar from './components/Avatar/Avatar.vue'
5
+ import Badge from './components/Badge/Badge.vue'
6
+ import BreadcrumbItem from './components/Breadcrumbs/BreadcrumbItem.vue'
7
+ import Breadcrumbs from './components/Breadcrumbs/Breadcrumbs.vue'
8
+ import Button from './components/Button/Button.vue'
9
+ import ButtonGroup from './components/ButtonGroup/ButtonGroup.vue'
10
+ import Calendar from './components/Calendar/Calendar.vue'
11
+ import Card from './components/Card/Card.vue'
12
+ import Checkbox from './components/Checkbox/Checkbox.vue'
13
+ import CopyClipboard from './components/CopyClipboard/CopyClipboard.vue'
14
+ import Divider from './components/Divider/Divider.vue'
15
+ import Drawer from './components/Drawer/Drawer.vue'
16
+ import Dropdown from './components/Dropdown/Dropdown.vue'
17
+ import DropdownItem from './components/Dropdown/DropdownItem.vue'
18
+ import DropdownTitle from './components/Dropdown/DropdownTitle.vue'
19
+ import Flex from './components/Flex/Flex.vue'
20
+ import Grid from './components/Grid/Grid.vue'
21
+ import Counter from './components/Input/Counter.vue'
22
+ import Dropzone from './components/Input/Dropzone.vue'
23
+ import File from './components/Input/File.vue'
24
+ import Input from './components/Input/Input.vue'
25
+ import Password from './components/Input/Password.vue'
26
+ import Textarea from './components/Input/Textarea.vue'
27
+ import Kbd from './components/Kbd/Kbd.vue'
28
+ import KbdGroup from './components/Kbd/KbdGroup.vue'
29
+ import Confirm from './components/Modal/Confirm.vue'
30
+ import Modal from './components/Modal/Modal.vue'
31
+ import Pagination from './components/Pagination/Pagination.vue'
32
+ import Popout from './components/Popout/Popout.vue'
33
+ import Progress from './components/Progress/Progress.vue'
34
+ import Radio from './components/Radio/Radio.vue'
35
+ import RadioGroup from './components/Radio/RadioGroup.vue'
36
+ import Select from './components/Select/Select.vue'
37
+ import Sheet from './components/Sheet/Sheet.vue'
38
+ import Skeleton from './components/Skeleton/Skeleton.vue'
39
+ import Spinner from './components/Spinner/Spinner.vue'
40
+ import Switch from './components/Switch/Switch.vue'
41
+ import Cell from './components/Table/Cell.vue'
42
+ import Header from './components/Table/Header.vue'
43
+ import Row from './components/Table/Row.vue'
44
+ import SelectAll from './components/Table/SelectAll.vue'
45
+ import SelectRow from './components/Table/SelectRow.vue'
46
+ import Table from './components/Table/Table.vue'
47
+ import Tab from './components/Tabs/Tab.vue'
48
+ import Tabs from './components/Tabs/Tabs.vue'
49
+ import { pushToast, removeToast } from './components/Toast/toast'
50
+ import Toasts from './components/Toast/Toasts.vue'
51
+ import Tooltip from './components/Tooltip/Tooltip.vue'
52
+ import Backdrop from './internal/Backdrop/Backdrop.vue'
53
+ import { searchString } from './shared/helpers'
54
+ import './index.scss'
55
+
56
+ export {
57
+ Accordion,
58
+ AccordionGroup,
59
+ Alert,
60
+ Avatar,
61
+ Backdrop,
62
+ Badge,
63
+ BreadcrumbItem,
64
+ Breadcrumbs,
65
+ Button,
66
+ ButtonGroup,
67
+ Calendar,
68
+ Card,
69
+ Cell,
70
+ Checkbox,
71
+ Confirm,
72
+ CopyClipboard,
73
+ Counter,
74
+ Divider,
75
+ Drawer,
76
+ Dropdown,
77
+ DropdownItem,
78
+ DropdownTitle,
79
+ Dropzone,
80
+ File,
81
+ Flex,
82
+ Grid,
83
+ Header,
84
+ Input,
85
+ Kbd,
86
+ KbdGroup,
87
+ Modal,
88
+ Pagination,
89
+ Password,
90
+ Popout,
91
+ Progress,
92
+ pushToast,
93
+ Radio,
94
+ RadioGroup,
95
+ removeToast,
96
+ Row,
97
+ searchString,
98
+ Select,
99
+ SelectAll,
100
+ SelectRow,
101
+ Sheet,
102
+ Skeleton,
103
+ Spinner,
104
+ Switch,
105
+ Tab,
106
+ Table,
107
+ Tabs,
108
+ Textarea,
109
+ Toasts,
110
+ Tooltip,
111
+ }
@@ -0,0 +1,22 @@
1
+ <script setup lang="ts">
2
+ import { onMounted } from 'vue'
3
+ import './backdrop.scss'
4
+
5
+ const emits = defineEmits<{
6
+ (e: 'close'): void
7
+ }>()
8
+
9
+ onMounted(() => {
10
+ window.addEventListener('keydown', (e) => {
11
+ if (e.key === 'Escape') {
12
+ emits('close')
13
+ }
14
+ })
15
+ })
16
+ </script>
17
+
18
+ <template>
19
+ <div class="vui-backdrop" @click.self="emits('close')">
20
+ <slot />
21
+ </div>
22
+ </template>
@@ -0,0 +1,28 @@
1
+ :root {
2
+ --backdrop-offset: 64px;
3
+ }
4
+
5
+ .vui-backdrop {
6
+ z-index: 1000;
7
+ position: fixed;
8
+ display: block;
9
+ width: 100dvw;
10
+ height: 100dvh;
11
+ top: 0;
12
+ left: 0;
13
+ padding: var(--backdrop-offset);
14
+ overflow-y: auto;
15
+
16
+ &:after {
17
+ content: '';
18
+ position: fixed;
19
+ z-index: -1;
20
+ inset: 0;
21
+ background-color: var(--color-bg-lowered);
22
+ opacity: 0.9;
23
+ }
24
+ }
25
+
26
+ html:has(.vui-backdrop) {
27
+ overflow: hidden;
28
+ }
package/src/main.ts ADDED
@@ -0,0 +1,5 @@
1
+ import { createApp } from 'vue'
2
+ import App from './App.vue'
3
+ import './style/core.scss'
4
+
5
+ createApp(App).mount('#app')
@@ -0,0 +1,18 @@
1
+ import type { ComputedRef } from 'vue'
2
+ import type { Sizes } from './types'
3
+ import { computed } from 'vue'
4
+ import { Size } from './types'
5
+
6
+ // Some files may share the same properties
7
+ export function useActualGap(gap?: Sizes | number): ComputedRef<string> {
8
+ return computed(() => {
9
+ if (typeof gap === 'number')
10
+ return `${gap}px`
11
+ switch (gap) {
12
+ case Size.s: return '4px'
13
+ case Size.l: return '16px'
14
+ case Size.m:
15
+ default: return '8px'
16
+ }
17
+ })
18
+ }
@@ -0,0 +1,53 @@
1
+ export function createArray(length: number, startOffset: number = 0): number[] {
2
+ return Array
3
+ .from({ length })
4
+ .map((_, index) => startOffset + index)
5
+ }
6
+
7
+ // Searches through the input and checkes wether it contains match
8
+ // It searches the input by splitting it by whitespace and matching each
9
+ // word against the string
10
+ export function searchString(match: string | string[], input: string): boolean {
11
+ if (!match)
12
+ return false
13
+
14
+ const joint: string = Array.isArray(match) ? match.join(' ') : match
15
+
16
+ const split = input.trim().split(/\s+/)
17
+ return split.every(s => joint.toLowerCase().includes(s.toLowerCase()))
18
+ }
19
+
20
+ export function getMaybeRefLength(value: string | number): number {
21
+ return typeof value === 'number' ? value : value.length
22
+ }
23
+
24
+ export function isNil(value: any): value is undefined {
25
+ return value === undefined || value === null
26
+ }
27
+
28
+ /**
29
+ * Checks wether a color is light or dark, depending on
30
+ */
31
+ export function calculateColorLightness(r: number, g: number, b: number): 'dark' | 'light' {
32
+ const yiq = (r * 299 + g * 587 + b * 114) / 1000
33
+ return yiq >= 128 ? 'light' : 'dark'
34
+ }
35
+
36
+ /**
37
+ * Convert a CSS rgb string to a tuple of actual r,g,b values
38
+ *
39
+ * 'rgb(12,16,24)' --> [12, 16, 24]
40
+ */
41
+ export function stringRgbToValues(rgbString: string): [number, number, number] {
42
+ return rgbString.match(/\d+/g)!.map(Number) as any as [number, number, number]
43
+ }
44
+
45
+ export function randomMinMax(min: number, max: number): number {
46
+ min = Math.ceil(min)
47
+ max = Math.floor(max)
48
+ return Math.floor(Math.random() * (max - min + 1)) + min
49
+ }
50
+
51
+ export function delay(amount: number): Promise<any> {
52
+ return new Promise(r => setTimeout(r, amount))
53
+ }
@@ -0,0 +1,11 @@
1
+ export enum Size {
2
+ s = 's',
3
+ m = 'm',
4
+ l = 'l',
5
+ }
6
+
7
+ export type Sizes = 's' | 'm' | 'l'
8
+
9
+ export type DeepRequired<T> = { [K in keyof T]: DeepRequired<T[K]> } & Required<T>
10
+
11
+ export type VueClass = string | Record<string, | boolean> | Array<string | Record<string, string | boolean>>
@@ -0,0 +1,21 @@
1
+ .fade-enter-active,
2
+ .fade-leave-active {
3
+ transition: var(--transition);
4
+ }
5
+
6
+ .fade-enter-from,
7
+ .fade-leave-to {
8
+ opacity: 0;
9
+ }
10
+
11
+ .fade-up-enter-active,
12
+ .fade-up-leave-active {
13
+ transition: var(--transition);
14
+ transition-property: transform, opacity;
15
+ }
16
+
17
+ .fade-up-enter-from,
18
+ .fade-up-leave-to {
19
+ opacity: 0;
20
+ transform: translateY(8px);
21
+ }
@@ -0,0 +1,128 @@
1
+ // Core of the UI library, it should only contain styles which are relevant to
2
+ // the library and each component should import it
3
+
4
+ // To overwrite any of these styles, simply create a style file and import it
5
+ // after this one
6
+ @use './reset.scss';
7
+ @use './fonts.scss';
8
+
9
+ :root {
10
+ --container-s: 498px;
11
+ --container-m: 856px;
12
+ --container-l: 1140px;
13
+ --container-xl: 1540px;
14
+
15
+ --border-radius-xs: 2px;
16
+ --border-radius-s: 4px;
17
+ --border-radius-m: 8px;
18
+ --border-radius-l: 12px;
19
+
20
+ --font-size-xs: 1.15rem;
21
+ --font-size-s: 1.3rem;
22
+ --font-size-ms: 1.45rem;
23
+ --font-size-m: 1.6rem;
24
+ --font-size-l: 1.65rem;
25
+
26
+ --space-xs: 8px;
27
+ --space-s: 12px;
28
+ --space-m: 18px;
29
+ --space-l: 26px;
30
+ --space-xl: 40px;
31
+ --space-xxl: 52px;
32
+
33
+ --transition-quick: 0.08s all ease-in-out;
34
+ --transition: 0.1s all ease-in-out;
35
+ --transition-slow: 0.3s all ease-in-out;
36
+
37
+ --color-bg: rgb(18, 18, 18);
38
+ --color-bg-raised: rgb(28, 28, 28);
39
+ --color-bg-lowered: rgb(14, 14, 14);
40
+
41
+ --color-text: rgb(231, 231, 231);
42
+ --color-text-light: rgb(158, 158, 158);
43
+ --color-text-lighter: rgb(100, 100, 100);
44
+ --color-text-invert: rgb(17, 17, 17);
45
+
46
+ --color-button-gray: rgb(28, 28, 28);
47
+ --color-button-gray-hover: rgb(38, 38, 38);
48
+
49
+ --color-text-red: rgb(243, 78, 70);
50
+ --color-bg-red-lowered: rgb(66, 22, 20);
51
+ --color-bg-red-raised: rgb(119, 31, 26);
52
+ --color-border-red: rgb(94, 23, 19);
53
+
54
+ --color-text-green: rgb(44, 214, 52);
55
+ --color-text-green-disabled: rgb(109, 193, 113);
56
+ --color-bg-green-lowered: rgb(19, 46, 9);
57
+ --color-bg-green-raised: rgb(48, 122, 22);
58
+ --color-border-green: rgb(27, 70, 12);
59
+
60
+ --color-text-yellow: rgb(243, 231, 70);
61
+ --color-bg-yellow-lowered: rgb(59, 46, 10);
62
+ --color-bg-yellow-raised: rgb(119, 82, 26);
63
+ --color-border-yellow: rgb(99, 97, 16);
64
+
65
+ --color-text-blue: rgb(85, 141, 245);
66
+ --color-bg-blue-lowered: rgb(10, 25, 59);
67
+ --color-bg-blue-raised: rgb(26, 59, 119);
68
+ --color-border-blue: rgb(20, 45, 112);
69
+
70
+ --color-border: rgb(38, 38, 38);
71
+ --color-border-strong: rgb(54, 54, 54);
72
+ --color-border-weak: rgb(36, 36, 36);
73
+
74
+ --color-accent: rgb(56, 214, 219);
75
+ --color-accent-disabled: hsl(from var(--color-accent) calc(h) calc(s * 0.5) calc(l));
76
+ --color-bg-accent-lowered: hsl(from var(--color-accent) calc(h) s calc(l * 0.2));
77
+ --color-bg-accent-raised: hsl(from var(--color-accent) calc(h) s calc(l * 0.6));
78
+ --color-border-accent: hsl(from var(--color-accent) calc(h) s calc(l * 0.5));
79
+
80
+ --box-shadow: 0 2px 12px rgba(8, 8, 8, 0.2);
81
+ --box-shadow-strong: 0 4px 15px rgba(8, 8, 8, 0.4);
82
+
83
+ --global-font: Geist, sans-serif;
84
+ --global-font-mono: 'Geist Mono', 'Courier New', Courier, monospace;
85
+ }
86
+
87
+ :root {
88
+ font-family: var(--global-font);
89
+ font-size: 63.5%;
90
+ // TODO remove
91
+ position: relative;
92
+ background-color: var(--color-bg);
93
+
94
+ overflow-x: hidden;
95
+ width: 100%;
96
+
97
+ font-feature-settings: normal;
98
+ font-variation-settings: normal;
99
+
100
+ font-synthesis: none;
101
+ text-rendering: optimizeLegibility;
102
+ -webkit-font-smoothing: antialiased;
103
+ -moz-osx-font-smoothing: grayscale;
104
+ // TODO end remove
105
+
106
+ * {
107
+ -webkit-box-sizing: border-box;
108
+ -moz-box-sizing: border-box;
109
+ box-sizing: border-box;
110
+ outline: none;
111
+
112
+ &:focus-visible {
113
+ outline: 2px solid var(--color-text);
114
+ }
115
+ }
116
+ }
117
+
118
+ body {
119
+ color: var(--color-text);
120
+ }
121
+
122
+ @import './typography.scss';
123
+ @import './layout.scss';
124
+ @import './animation.scss';
125
+ @import './tooltip.scss';
126
+ @import './utils.scss';
127
+
128
+ @import './media-query.scss';
File without changes
@@ -0,0 +1,9 @@
1
+ // Contains basic layout definitions and classes to compose basic layouts
2
+
3
+ .container {
4
+ display: block;
5
+ margin-inline: auto;
6
+ width: 100%;
7
+ padding-inline: var(--space-m);
8
+ max-width: var(--container-l);
9
+ }
@@ -0,0 +1,29 @@
1
+ // Mobile phones
2
+ @media screen and (max-width: 572px) {
3
+ :root {
4
+ --space-xs: 5px;
5
+ --space-s: 8px;
6
+ --space-m: 12px;
7
+ --space-l: 20px;
8
+ --space-xl: 32px;
9
+ --space-xxl: 44px;
10
+ }
11
+
12
+ // Typography changes
13
+ h1 {
14
+ font-size: 3.2rem;
15
+ }
16
+
17
+ h2 {
18
+ font-size: 2.8rem;
19
+ }
20
+
21
+ h3 {
22
+ font-size: 2.2rem;
23
+ }
24
+
25
+ .vui-tabs .vui-tab {
26
+ font-size: var(--font-size-s);
27
+ padding: 0 var(--space-xs);
28
+ }
29
+ }
@@ -0,0 +1,135 @@
1
+ html,
2
+ body,
3
+ div,
4
+ span,
5
+ applet,
6
+ object,
7
+ iframe,
8
+ h1,
9
+ h2,
10
+ h3,
11
+ h4,
12
+ h5,
13
+ h6,
14
+ p,
15
+ blockquote,
16
+ pre,
17
+ a,
18
+ abbr,
19
+ acronym,
20
+ address,
21
+ big,
22
+ cite,
23
+ code,
24
+ del,
25
+ dfn,
26
+ em,
27
+ img,
28
+ ins,
29
+ kbd,
30
+ q,
31
+ s,
32
+ samp,
33
+ small,
34
+ strike,
35
+ strong,
36
+ sub,
37
+ sup,
38
+ tt,
39
+ var,
40
+ b,
41
+ u,
42
+ i,
43
+ center,
44
+ dl,
45
+ dt,
46
+ dd,
47
+ ol,
48
+ ul,
49
+ li,
50
+ fieldset,
51
+ form,
52
+ label,
53
+ legend,
54
+ table,
55
+ caption,
56
+ tbody,
57
+ tfoot,
58
+ thead,
59
+ tr,
60
+ th,
61
+ td,
62
+ article,
63
+ aside,
64
+ canvas,
65
+ details,
66
+ embed,
67
+ figure,
68
+ figcaption,
69
+ footer,
70
+ header,
71
+ hgroup,
72
+ menu,
73
+ nav,
74
+ output,
75
+ ruby,
76
+ section,
77
+ summary,
78
+ time,
79
+ mark,
80
+ audio,
81
+ video {
82
+ margin: 0;
83
+ padding: 0;
84
+ border: 0;
85
+ font-size: 100%;
86
+ font: inherit;
87
+ vertical-align: baseline;
88
+ }
89
+ /* HTML5 display-role reset for older browsers */
90
+ article,
91
+ aside,
92
+ details,
93
+ figcaption,
94
+ figure,
95
+ footer,
96
+ header,
97
+ hgroup,
98
+ menu,
99
+ nav,
100
+ section {
101
+ display: block;
102
+ }
103
+ body {
104
+ line-height: 1;
105
+ }
106
+ ol,
107
+ ul {
108
+ list-style: none;
109
+ }
110
+ blockquote,
111
+ q {
112
+ quotes: none;
113
+ }
114
+ blockquote:before,
115
+ blockquote:after,
116
+ q:before,
117
+ q:after {
118
+ content: '';
119
+ content: none;
120
+ }
121
+ table {
122
+ border-collapse: collapse;
123
+ border-spacing: 0;
124
+ }
125
+ button {
126
+ border: none;
127
+ background-color: unset;
128
+ margin: 0;
129
+ font-family: var(--global-font);
130
+ }
131
+
132
+ hr {
133
+ border: none;
134
+ border-bottom: 1px solid var(--color-border);
135
+ }
@@ -0,0 +1,128 @@
1
+ /*
2
+ This is a trick in which you can add simply tooltips to an element without any additional html.
3
+ Simple add data-title-_position_="Hello world" and hover the element.
4
+
5
+ Available tooltip positions:
6
+ */
7
+
8
+ [data-title-left],
9
+ [data-title-right],
10
+ [data-title-bottom],
11
+ [data-title-bottom-left],
12
+ [data-title-bottom-right],
13
+ [data-title-top],
14
+ [data-title-top-left],
15
+ [data-title-top-right] {
16
+ position: relative;
17
+
18
+ &:before {
19
+ font-family: var(--global-font);
20
+ font-weight: 400;
21
+ background-color: var(--color-bg-raised);
22
+ color: var(--color-text);
23
+
24
+ font-size: var(--font-size-ms);
25
+ position: absolute;
26
+ padding: 4px 8px;
27
+ line-height: 1.3em;
28
+ border-radius: var(--border-radius-m);
29
+ transition: var(--transition);
30
+
31
+ max-width: 512px;
32
+ opacity: 0;
33
+ cursor: default;
34
+ z-index: -1;
35
+ visibility: hidden;
36
+ pointer-events: none;
37
+ }
38
+
39
+ &:hover {
40
+ &:before {
41
+ visibility: visible;
42
+ opacity: 1;
43
+ z-index: 99999;
44
+ }
45
+ }
46
+ }
47
+
48
+ [data-title-left]:before {
49
+ content: attr(data-title-left);
50
+ top: 50%;
51
+ transform: translateY(-50%);
52
+ z-index: 99999;
53
+ right: calc(100% + 4px);
54
+ }
55
+
56
+ [data-title-right]:before {
57
+ content: attr(data-title-right);
58
+ top: 50%;
59
+ transform: translateY(-50%);
60
+ z-index: 99999;
61
+ left: calc(100% + 4px);
62
+ }
63
+
64
+ [data-title-bottom]:before,
65
+ [data-title-bottom-left]:before,
66
+ [data-title-bottom-right]:before {
67
+ content: attr(data-title-bottom);
68
+ top: calc(100% + 4px);
69
+ transform: translateX(-50%);
70
+ left: 50%;
71
+ }
72
+
73
+ [data-title-bottom-left]:before {
74
+ content: attr(data-title-bottom-left);
75
+ transform: unset;
76
+ left: 0;
77
+ }
78
+
79
+ [data-title-bottom-right]:before {
80
+ content: attr(data-title-bottom-right);
81
+ transform: unset;
82
+ left: unset;
83
+ right: 0;
84
+ }
85
+
86
+ [data-title-top]:before,
87
+ [data-title-top-left]:before,
88
+ [data-title-top-right]:before {
89
+ content: attr(data-title-top);
90
+ bottom: calc(100% + 4px);
91
+ transform: translateX(-50%);
92
+ left: 50%;
93
+ }
94
+
95
+ [data-title-top-left]:before {
96
+ content: attr(data-title-top-left);
97
+ transform: unset;
98
+ left: 0;
99
+ }
100
+
101
+ [data-title-top-right]:before {
102
+ content: attr(data-title-top-right);
103
+ transform: unset;
104
+ left: unset;
105
+ right: 0;
106
+ }
107
+
108
+ // Hover
109
+
110
+ [data-title-left]:hover:before {
111
+ right: calc(100% + 10px);
112
+ }
113
+
114
+ [data-title-right]:hover:before {
115
+ left: calc(100% + 10px);
116
+ }
117
+
118
+ [data-title-top]:hover:before,
119
+ [data-title-top-left]:hover:before,
120
+ [data-title-top-right]:hover:before {
121
+ bottom: calc(100% + 10px);
122
+ }
123
+
124
+ [data-title-bottom]:hover:before,
125
+ [data-title-bottom-left]:hover:before,
126
+ [data-title-bottom-right]:hover:before {
127
+ top: calc(100% + 10px);
128
+ }