@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
@@ -0,0 +1,26 @@
1
+ <script setup lang='ts'>
2
+ import '../Button/button.scss'
3
+
4
+ export interface BreadcrumbItemProps {
5
+ label?: string
6
+ path?: string
7
+ }
8
+
9
+ const props = defineProps<BreadcrumbItemProps>()
10
+ </script>
11
+
12
+ <template>
13
+ <li>
14
+ <a v-if="props.path" :href="props.path" class="vui-breadcrumb-link">
15
+ <slot>
16
+ {{ props.label }}
17
+ </slot>
18
+ </a>
19
+
20
+ <slot v-else>
21
+ <span class="vui-breadcrumb-text-simple">
22
+ {{ props.label }}
23
+ </span>
24
+ </slot>
25
+ </li>
26
+ </template>
@@ -0,0 +1,33 @@
1
+ <script setup lang='ts'>
2
+ import type { VNode } from 'vue'
3
+ import type { BreadcrumbItemProps } from './BreadcrumbItem.vue'
4
+ import { Icon } from '@iconify/vue'
5
+ import './breadcrumbs.scss'
6
+
7
+ interface Props {
8
+ separator?: string
9
+ }
10
+
11
+ const {
12
+ separator = 'ph:caret-right',
13
+ } = defineProps<Props>()
14
+
15
+ const slots = defineSlots<{
16
+ default: () => Array<VNode & { props: BreadcrumbItemProps }>
17
+ }>()
18
+ </script>
19
+
20
+ <template>
21
+ <ul class="vui-breadcrumbs">
22
+ <template v-for="(vnode, index) of slots.default()" :key="vnode.props.label">
23
+ <component
24
+ :is="vnode"
25
+ v-bind="vnode.props"
26
+ />
27
+ <template v-if="index !== slots.default().length - 1">
28
+ <Icon v-if="separator.length > 1 && separator.includes(':')" class="vui-breadcrumb-custom-separator" :icon="separator" />
29
+ <span v-else class="vui-breadcrumb-custom-separator">{{ separator }}</span>
30
+ </template>
31
+ </template>
32
+ </ul>
33
+ </template>
@@ -0,0 +1,30 @@
1
+ .vui-breadcrumbs {
2
+ display: flex;
3
+ gap: var(--space-m);
4
+ align-items: center;
5
+
6
+ .vui-breadcrumb-custom-separator {
7
+ color: var(--color-text-lighter);
8
+ }
9
+
10
+ li {
11
+ font-size: var(--font-size-s);
12
+ color: var(--color-text-lighter);
13
+
14
+ .vui-breadcrumb-text-simple {
15
+ color: var(--color-text-lighter);
16
+ }
17
+
18
+ .vui-breadcrumb-link {
19
+ color: var(--color-text);
20
+ background: transparent;
21
+ text-underline-offset: 4px;
22
+ text-decoration: none;
23
+
24
+ &:hover {
25
+ text-decoration: underline;
26
+ }
27
+ // cursor: pointer;
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,90 @@
1
+ <script setup lang="ts">
2
+ import type { Sizes } from '../../shared/types'
3
+ import { Icon } from '@iconify/vue'
4
+ import { computed } from 'vue'
5
+ import { Size } from '../../shared/types'
6
+ import Spinner from '../Spinner/Spinner.vue'
7
+ import './button.scss'
8
+
9
+ export type Variants = 'default' | 'danger' | 'success' | 'link' | 'blue' | 'accent'
10
+
11
+ interface Props {
12
+ // Provide URL to turn button into anchor
13
+ // href?: string
14
+ // target?: string
15
+ loading?: boolean
16
+ expand?: boolean
17
+ square?: boolean
18
+ dashed?: boolean
19
+ disabled?: boolean
20
+ size?: Sizes
21
+ /**
22
+ * Sets the hover styling property
23
+ */
24
+ active?: boolean
25
+ /**
26
+ * No styling applied to the button unless hovered
27
+ */
28
+ plain?: boolean
29
+ variant?: Variants
30
+ /**
31
+ * The children will be set to an icon and the icon will become a square
32
+ */
33
+ icon?: string
34
+ }
35
+
36
+ const {
37
+ loading,
38
+ disabled,
39
+ expand,
40
+ size = 'm',
41
+ variant = 'default',
42
+ icon,
43
+ dashed,
44
+ } = defineProps<Props>()
45
+
46
+ const actualHeight = computed(() => {
47
+ switch (size) {
48
+ case Size.s: return '24px'
49
+ case Size.l: return '40px'
50
+ case Size.m:
51
+ default: return '32px'
52
+ }
53
+ })
54
+
55
+ const actualPadding = computed(() => {
56
+ switch (size) {
57
+ case Size.s: return '5px'
58
+ case Size.l: return '16px'
59
+ case Size.m:
60
+ default: return '8px'
61
+ }
62
+ })
63
+ </script>
64
+
65
+ <template>
66
+ <button
67
+ class="vui-button"
68
+ :class="[{ loading, expand, disabled, plain, active, icon, square, dashed }, `vui-button-variant-${variant}`]"
69
+ :disabled
70
+ >
71
+ <Spinner size="s" />
72
+ <div class="vui-button-slot">
73
+ <div class="vui-button-slot-start">
74
+ <slot name="start" />
75
+ </div>
76
+ <Icon v-if="icon" :icon="icon" />
77
+ <slot v-else />
78
+ <div class="vui-button-slot-end">
79
+ <slot name="end" />
80
+ </div>
81
+ </div>
82
+ </button>
83
+ </template>
84
+
85
+ <style scoped>
86
+ .vui-button {
87
+ --button-height: v-bind(actualHeight);
88
+ --button-padding: v-bind(actualPadding);
89
+ }
90
+ </style>
@@ -0,0 +1,176 @@
1
+ .vui-button {
2
+ --button-height: 32px;
3
+ --button-padding: 8px;
4
+
5
+ &.disabled {
6
+ pointer-events: none;
7
+ color: var(--color-text-lighter) !important;
8
+ cursor: not-allowed !important;
9
+ filter: saturate(50%) opacity(0.65);
10
+
11
+ svg path {
12
+ color: var(--color-text-lighter) !important;
13
+ }
14
+ }
15
+
16
+ &.expand {
17
+ width: 100%;
18
+ }
19
+
20
+ &.loading {
21
+ .vui-spinner {
22
+ opacity: 1;
23
+ }
24
+
25
+ .vui-button-slot {
26
+ opacity: 0;
27
+ }
28
+ }
29
+
30
+ &.icon {
31
+ width: var(--button-height);
32
+ padding: 0;
33
+
34
+ .vui-button-slot {
35
+ svg {
36
+ width: 18px;
37
+ height: 18px;
38
+ }
39
+ }
40
+ }
41
+
42
+ &.square {
43
+ width: var(--button-height);
44
+ padding: 0;
45
+ }
46
+
47
+ &.dashed {
48
+ border-style: dashed;
49
+ }
50
+
51
+ height: var(--button-height);
52
+ display: flex;
53
+ align-items: center;
54
+ justify-content: center;
55
+ border-radius: var(--border-radius-s);
56
+ background: transparent;
57
+ padding-inline: var(--button-padding);
58
+ font-size: var(--font-size-s);
59
+ position: relative;
60
+ transition: var(--transition);
61
+ border: 1px solid transparent;
62
+ background-color: transparent;
63
+ color: var(--color-text);
64
+
65
+ // Default gray
66
+
67
+ .vui-button-slot {
68
+ display: flex;
69
+ place-items: center;
70
+ transition: var(--transition);
71
+ opacity: 1;
72
+ }
73
+
74
+ .vui-button-slot-start,
75
+ .vui-button-slot-end {
76
+ display: flex;
77
+ place-items: center;
78
+ }
79
+
80
+ .vui-button-slot-start {
81
+ margin-right: 6px;
82
+ }
83
+
84
+ .vui-button-slot-end {
85
+ margin-left: 6px;
86
+ }
87
+
88
+ .vui-spinner {
89
+ transition: var(--transition);
90
+ opacity: 0;
91
+ position: absolute;
92
+ pointer-events: none;
93
+ }
94
+
95
+ // Variants
96
+ &.vui-button-variant-default {
97
+ &:not(.plain) {
98
+ color: var(--color-text);
99
+ background-color: var(--color-button-gray);
100
+ border: 1px solid var(--color-border);
101
+ }
102
+
103
+ &.active,
104
+ &:hover {
105
+ background-color: var(--color-button-gray-hover);
106
+ }
107
+ }
108
+
109
+ &.vui-button-variant-danger {
110
+ &:not(.plain) {
111
+ color: var(--color-text);
112
+ background-color: var(--color-bg-red-lowered);
113
+ border: 1px solid var(--color-border-red);
114
+ }
115
+
116
+ &.active,
117
+ &:hover {
118
+ border: 1px solid var(--color-bg-red-raised);
119
+ background-color: var(--color-bg-red-raised);
120
+ }
121
+ }
122
+
123
+ &.vui-button-variant-success {
124
+ &:not(.plain) {
125
+ color: var(--color-text);
126
+ background-color: var(--color-bg-green-lowered);
127
+ border: 1px solid var(--color-border-green);
128
+ }
129
+
130
+ &.active,
131
+ &:hover {
132
+ border: 1px solid var(--color-bg-green-raised);
133
+ background-color: var(--color-bg-green-raised);
134
+ }
135
+ }
136
+
137
+ &.vui-button-variant-blue {
138
+ &:not(.plain) {
139
+ color: var(--color-text);
140
+ background-color: var(--color-bg-blue-lowered);
141
+ border: 1px solid var(--color-border-blue);
142
+ }
143
+
144
+ &.active,
145
+ &:hover {
146
+ border: 1px solid var(--color-bg-blue-raised);
147
+ background-color: var(--color-bg-blue-raised);
148
+ }
149
+ }
150
+
151
+ &.vui-button-variant-accent {
152
+ &:not(.plain) {
153
+ color: var(--color-text);
154
+ background-color: var(--color-bg-accent-lowered);
155
+ border: 1px solid var(--color-border-accent);
156
+ }
157
+
158
+ &.active,
159
+ &:hover {
160
+ border: 1px solid var(--color-bg-accent-raised);
161
+ background-color: var(--color-bg-accent-raised);
162
+ }
163
+ }
164
+
165
+ &.vui-button-variant-link {
166
+ color: var(--color-text);
167
+ background: transparent;
168
+ text-underline-offset: 4px;
169
+ cursor: pointer;
170
+
171
+ &.active,
172
+ &:hover {
173
+ text-decoration: underline;
174
+ }
175
+ }
176
+ }
@@ -0,0 +1,25 @@
1
+ <script setup lang='ts'>
2
+ import Flex from '../Flex/Flex.vue'
3
+ import './button-group.scss'
4
+
5
+ interface Props {
6
+ vertical?: boolean
7
+ }
8
+
9
+ const {
10
+ vertical,
11
+ } = defineProps<Props>()
12
+ </script>
13
+
14
+ <template>
15
+ <Flex
16
+ :row="!vertical"
17
+ :column="vertical"
18
+ class="vui-button-group"
19
+ :class="{ vertical }"
20
+ :gap="0"
21
+ inline
22
+ >
23
+ <slot />
24
+ </Flex>
25
+ </template>
@@ -0,0 +1,51 @@
1
+ .vui-button-group {
2
+ .vui-button {
3
+ z-index: 1;
4
+
5
+ &:hover {
6
+ z-index: 2;
7
+ }
8
+
9
+ &:not(:first-child, :last-child) {
10
+ border-radius: 0;
11
+ }
12
+
13
+ &:first-child {
14
+ border-top-right-radius: 0;
15
+ border-bottom-right-radius: 0;
16
+ }
17
+
18
+ &:last-child {
19
+ border-top-left-radius: 0;
20
+ border-bottom-left-radius: 0;
21
+ }
22
+
23
+ &:not(:last-child) {
24
+ margin-right: -1px;
25
+ }
26
+ }
27
+
28
+ &.vertical {
29
+ .vui-button {
30
+ width: 100%;
31
+
32
+ &:not(:first-child, :last-child) {
33
+ border-radius: 0;
34
+ }
35
+
36
+ &:first-child {
37
+ border-bottom-left-radius: 0;
38
+ border-bottom-right-radius: 0;
39
+ }
40
+
41
+ &:last-child {
42
+ border-top-left-radius: 0;
43
+ border-top-right-radius: 0;
44
+ }
45
+
46
+ &:not(:last-child) {
47
+ margin-bottom: -1px;
48
+ }
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,58 @@
1
+ <script setup lang='ts'>
2
+ import type { VueDatePickerProps } from '@vuepic/vue-datepicker'
3
+ import { Icon } from '@iconify/vue'
4
+ import VueDatePicker from '@vuepic/vue-datepicker'
5
+ import '@vuepic/vue-datepicker/dist/main.css'
6
+ import './calendar.scss'
7
+
8
+ const props = withDefaults(defineProps<VueDatePickerProps & {
9
+ expand?: boolean
10
+ }>(), {
11
+ autoApply: true,
12
+ autoPosition: true,
13
+ dark: true,
14
+ format: 'dd/MM/yyyy HH:mm',
15
+ expand: false,
16
+ })
17
+ </script>
18
+
19
+ <template>
20
+ <VueDatePicker
21
+ v-bind="props"
22
+ :style="props.expand || !$slots.trigger
23
+ ? undefined
24
+ : { display: 'inline-block', width: 'auto' }
25
+ "
26
+ >
27
+ <!-- Icon slots -->
28
+ <template #input-icon>
29
+ <Icon :width="18" :height="18" icon="ph:calendar-blank" />
30
+ </template>
31
+ <template #calendar-icon>
32
+ <Icon :width="18" :height="18" icon="ph:calendar-blank" />
33
+ </template>
34
+ <template #clear-icon>
35
+ <Icon :width="18" :height="18" icon="ph:x" />
36
+ </template>
37
+ <template #clock-icon>
38
+ <Icon :width="18" :height="18" icon="ph:clock" />
39
+ </template>
40
+ <template #arrow-left>
41
+ <Icon :width="18" :height="18" icon="ph:caret-left" />
42
+ </template>
43
+ <template #arrow-right>
44
+ <Icon :width="18" :height="18" icon="ph:caret-right" />
45
+ </template>
46
+ <template #arrow-up>
47
+ <Icon :width="18" :height="18" icon="ph:caret-up" />
48
+ </template>
49
+ <template #arrow-down>
50
+ <Icon :width="18" :height="18" icon="ph:caret-down" />
51
+ </template>
52
+
53
+ <!-- Content slots -->
54
+ <template v-if="$slots.trigger" #trigger>
55
+ <slot name="trigger" />
56
+ </template>
57
+ </VueDatePicker>
58
+ </template>
@@ -0,0 +1,56 @@
1
+ .dp__theme_dark {
2
+ --dp-background-color: var(--color-bg);
3
+ --dp-text-color: var(--color-text);
4
+ --dp-hover-color: var(--color-button-gray-hover);
5
+ --dp-hover-text-color: var(--color-text);
6
+ --dp-hover-icon-color: var(--color-text-lighter);
7
+ --dp-primary-color: var(--color-accent);
8
+ --dp-primary-disabled-color: var(--color-accent-disabled);
9
+ --dp-primary-text-color: var(--color-text-invert);
10
+ --dp-secondary-color: var(--color-border);
11
+ --dp-border-color: var(--color-border);
12
+ --dp-menu-border-color: var(--color-border);
13
+ --dp-border-color-hover: var(--color-border-strong);
14
+ --dp-border-color-focus: var(--color-border-strong);
15
+ --dp-disabled-color: var(--color-bg-raised);
16
+ --dp-disabled-color-text: var(--color-text-light);
17
+ --dp-scroll-bar-background: var(--color-bg-lowered);
18
+ --dp-scroll-bar-color: var(--color-border);
19
+ --dp-success-color: var(--color-green);
20
+ --dp-success-color-disabled: var(--color-green-disabled);
21
+ --dp-icon-color: var(--color-text-light);
22
+ --dp-danger-color: var(--color-red);
23
+ --dp-marker-color: var(--color-red);
24
+ --dp-tooltip-color: var(--color-bg-raised);
25
+ --dp-highlight-color: var(--color-bg-raised);
26
+ --dp-range-between-dates-background-color: var(--dp-hover-color, #484848);
27
+ --dp-range-between-dates-text-color: var(--dp-hover-text-color, #fff);
28
+ --dp-range-between-border-color: var(--dp-hover-color, #fff);
29
+ }
30
+
31
+ :root {
32
+ --dp-font-family: var(--global-font);
33
+ --dp-border-radius: var(--border-radius-s);
34
+ --dp-cell-border-radius: var(--border-radius-s);
35
+ --dp-common-transition: var(--transition);
36
+
37
+ --dp-font-size: var(--font-size-ms);
38
+ --dp-preview-font-size: var(--font-size-s);
39
+ --dp-time-font-size: var(--font-size-s);
40
+ }
41
+
42
+ .dp__main {
43
+ font-size: var(--n-font-size-m);
44
+ }
45
+
46
+ .dp__outer_menu_wrap {
47
+ box-shadow: var(--box-shadow-strong);
48
+ }
49
+
50
+ .dp__input_icon {
51
+ inset-inline-start: 8px;
52
+ }
53
+
54
+ .dp--clear-btn {
55
+ inset-inline-end: 8px;
56
+ }
@@ -0,0 +1,48 @@
1
+ <script setup lang="ts">
2
+ import Divider from '../Divider/Divider.vue'
3
+ import './card.scss'
4
+
5
+ export interface Props {
6
+ separators?: boolean
7
+ headerSeparator?: boolean
8
+ footerSeparator?: boolean
9
+ padding?: boolean
10
+ }
11
+
12
+ const {
13
+ padding = true,
14
+ separators,
15
+ headerSeparator,
16
+ footerSeparator,
17
+ } = defineProps<Props>()
18
+ </script>
19
+
20
+ <template>
21
+ <div
22
+ class="vui-card" :class="{
23
+ separators,
24
+ 'header-separator': headerSeparator,
25
+ 'footer-separator': footerSeparator,
26
+ 'no-padding': !padding,
27
+ }"
28
+ >
29
+ <div v-if="$slots.header || $slots['header-end']" class="vui-card-header">
30
+ <div>
31
+ <slot name="header" />
32
+ </div>
33
+ <slot name="header-end" />
34
+ </div>
35
+
36
+ <Divider v-if="(separators || headerSeparator) && ($slots.header || $slots['header-end'])" :size="1" />
37
+
38
+ <div v-if="$slots.default" class="vui-card-content">
39
+ <slot />
40
+ </div>
41
+
42
+ <Divider v-if="(separators || footerSeparator) && $slots.footer" :size="1" />
43
+
44
+ <div v-if="$slots.footer" class="vui-card-footer">
45
+ <slot name="footer" />
46
+ </div>
47
+ </div>
48
+ </template>
@@ -0,0 +1,53 @@
1
+ .vui-card {
2
+ background-color: var(--color-bg);
3
+ border-radius: var(--border-radius-m);
4
+ border: 1px solid var(--color-border);
5
+
6
+ &.no-padding {
7
+ .vui-card-header,
8
+ .vui-card-content,
9
+ .vui-card-footer {
10
+ padding: 0;
11
+ }
12
+ }
13
+
14
+ &:not(.separators) {
15
+ .vui-card-content:not(:first-child) {
16
+ padding-block: var(--space-xs);
17
+ }
18
+
19
+ &.header-separator {
20
+ .vui-card-content:not(:first-child) {
21
+ padding-top: var(--space-m);
22
+ // padding-block: var(--space-m);
23
+ }
24
+ }
25
+
26
+ &.footer-separator {
27
+ .vui-card-content {
28
+ padding-bottom: var(--space-m);
29
+ }
30
+ }
31
+ }
32
+
33
+ .vui-card-header {
34
+ display: flex;
35
+ align-items: flex-start;
36
+ justify-content: space-between;
37
+ padding: var(--space-s) var(--space-m);
38
+ background-color: var(--color-bg);
39
+ border-top-left-radius: var(--border-radius-m);
40
+ border-top-right-radius: var(--border-radius-m);
41
+ }
42
+
43
+ .vui-card-content {
44
+ padding: var(--space-m);
45
+ }
46
+
47
+ .vui-card-footer {
48
+ padding: var(--space-s) var(--space-m);
49
+ background-color: var(--color-bg);
50
+ border-bottom-left-radius: var(--border-radius-m);
51
+ border-bottom-right-radius: var(--border-radius-m);
52
+ }
53
+ }
@@ -0,0 +1,49 @@
1
+ <script setup lang="ts">
2
+ import { Icon } from '@iconify/vue'
3
+ import { useId } from 'vue'
4
+ import './checkbox.scss'
5
+
6
+ interface Props {
7
+ label?: string
8
+ iconOn?: string
9
+ iconOff?: string
10
+ disabled?: boolean
11
+ checked?: boolean
12
+ }
13
+
14
+ const {
15
+ label,
16
+ iconOn = 'ph:check-square-fill',
17
+ iconOff = 'ph:square',
18
+ disabled,
19
+ checked: checkedProp,
20
+ } = defineProps<Props>()
21
+ const emit = defineEmits<{
22
+ change: [checked: boolean]
23
+ }>()
24
+ const slots = defineSlots()
25
+ const checked = defineModel<boolean>()
26
+ const id = useId()
27
+ </script>
28
+
29
+ <template>
30
+ <div class="vui-checkbox" :class="{ disabled: !!disabled, checked }">
31
+ <input
32
+ :id
33
+ v-model="checked"
34
+ type="checkbox"
35
+ :disabled
36
+ :checked="checkedProp"
37
+ @change="emit('change', ($event.target as HTMLInputElement).checked)"
38
+ >
39
+ <label :for="id">
40
+ <span class="vui-checkbox-icon">
41
+ <Icon :icon="checked ? iconOn : iconOff" />
42
+ </span>
43
+ <p v-if="label" class="vui-checkbox-content">{{ label }}</p>
44
+ <div v-else-if="slots.default" class="vui-checkbox-content">
45
+ <slot />
46
+ </div>
47
+ </label>
48
+ </div>
49
+ </template>