@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
@@ -5,8 +5,14 @@
5
5
  height: 26px;
6
6
  padding-inline: var(--space-s);
7
7
  border-radius: 999px;
8
- font-weight: 300;
9
8
  font-size: var(--font-size-s);
9
+ color: var(--color-text);
10
+ border: 1px solid transparent;
11
+
12
+ svg,
13
+ path {
14
+ color: var(--color-text);
15
+ }
10
16
 
11
17
  &.filled {
12
18
  font-weight: 500;
@@ -24,66 +30,177 @@
24
30
  }
25
31
 
26
32
  color: var(--color-text);
27
- border: 1px solid var(--color-border);
33
+ // border: 1px solid var(--color-border);
28
34
  }
29
35
 
30
36
  &.vui-badge-variant-info {
37
+ color: var(--color-text-blue);
38
+
39
+ svg,
40
+ path {
41
+ color: var(--color-text-blue);
42
+ }
43
+
31
44
  &:not(.outline) {
32
- background-color: var(--color-bg-blue-lowered);
45
+ background-color: hsla(from var(--color-bg-blue-raised) h s l / 0.2);
33
46
 
34
47
  &.filled {
35
48
  background-color: var(--color-text-blue);
36
49
  color: var(--color-text-invert);
37
- border-color: transparent;
50
+
51
+ svg,
52
+ path {
53
+ color: var(--color-text-invert);
54
+ }
38
55
  }
39
56
  }
40
57
 
41
- color: var(--color-text);
42
- border: 1px solid var(--color-border-blue);
58
+ &.outline {
59
+ border-color: var(--color-text-blue);
60
+ }
43
61
  }
44
62
 
45
63
  &.vui-badge-variant-success {
64
+ color: var(--color-text-green);
65
+
66
+ svg,
67
+ path {
68
+ color: var(--color-text-green);
69
+ }
70
+
46
71
  &:not(.outline) {
47
- background-color: var(--color-bg-green-lowered);
72
+ background-color: hsla(from var(--color-bg-green-raised) h s l / 0.15);
48
73
 
49
74
  &.filled {
50
75
  background-color: var(--color-text-green);
51
76
  color: var(--color-text-invert);
52
- border-color: transparent;
77
+
78
+ svg,
79
+ path {
80
+ color: var(--color-text-invert);
81
+ }
53
82
  }
54
83
  }
55
84
 
56
- color: var(--color-text);
57
- border: 1px solid var(--color-border-green);
85
+ &.outline {
86
+ border-color: var(--color-text-green);
87
+ }
58
88
  }
59
89
 
60
90
  &.vui-badge-variant-warning {
91
+ color: var(--color-text-yellow);
92
+
93
+ svg,
94
+ path {
95
+ color: var(--color-text-yellow);
96
+ }
97
+
61
98
  &:not(.outline) {
62
- background-color: var(--color-bg-yellow-lowered);
99
+ background-color: hsla(from var(--color-bg-yellow-raised) h s l / 0.15);
63
100
 
64
101
  &.filled {
65
102
  background-color: var(--color-text-yellow);
66
103
  color: var(--color-text-invert);
67
- border-color: transparent;
104
+
105
+ svg,
106
+ path {
107
+ color: var(--color-text-invert);
108
+ }
68
109
  }
69
110
  }
70
111
 
71
- color: var(--color-text);
72
- border: 1px solid var(--color-border-yellow);
112
+ &.outline {
113
+ border-color: var(--color-text-yellow);
114
+ }
73
115
  }
74
116
 
75
117
  &.vui-badge-variant-danger {
118
+ color: var(--color-text-red);
119
+
120
+ svg,
121
+ path {
122
+ color: var(--color-text-red);
123
+ }
124
+
76
125
  &:not(.outline) {
77
- background-color: var(--color-bg-red-lowered);
126
+ background-color: hsla(from var(--color-bg-red-raised) h s l / 0.15);
78
127
 
79
128
  &.filled {
80
129
  background-color: var(--color-text-red);
81
130
  color: var(--color-text-invert);
82
- border-color: transparent;
131
+
132
+ svg,
133
+ path {
134
+ color: var(--color-text-yellow);
135
+ }
136
+ }
137
+ }
138
+
139
+ &.outline {
140
+ border-color: var(--color-text-red);
141
+ }
142
+
143
+ color: var(--color-text-red);
144
+ }
145
+
146
+ &.vui-badge-variant-accent {
147
+ color: var(--color-accent);
148
+
149
+ svg,
150
+ path {
151
+ color: var(--color-accent);
152
+ }
153
+
154
+ &:not(.outline) {
155
+ background-color: hsla(from var(--color-bg-accent-raised) h s l / 0.15);
156
+
157
+ &.filled {
158
+ background-color: var(--color-accent);
159
+ color: var(--color-text-invert);
160
+
161
+ svg,
162
+ path {
163
+ color: var(--color-text-invert);
164
+ }
83
165
  }
84
166
  }
85
167
 
168
+ &.outline {
169
+ border-color: var(--color-accent);
170
+ }
171
+ }
172
+ }
173
+
174
+ :root.light {
175
+ .vui-badge.vui-badge-variant-accent:not(.outline).filled,
176
+ .vui-badge.vui-badge-variant-warning:not(.outline).filled {
86
177
  color: var(--color-text);
87
- border: 1px solid var(--color-border-red);
178
+
179
+ svg,
180
+ path {
181
+ color: var(--color-text);
182
+ }
183
+ }
184
+
185
+ .vui-badge.vui-badge-variant-success:not(.filled, .outline) {
186
+ background-color: hsla(from var(--color-text-green) h s l / 0.15);
187
+ }
188
+
189
+ .vui-badge.vui-badge-variant-warning:not(.outline).filled {
190
+ background-color: var(--color-bg-yellow-raised);
191
+ }
192
+
193
+ .vui-badge.vui-badge-variant-success:not(.outline).filled {
194
+ color: var(--color-text-invert);
195
+ background-color: var(--color-text-green);
196
+
197
+ svg,
198
+ path {
199
+ color: var(--color-text-invert);
200
+ }
201
+ }
202
+
203
+ .vui-badge:not(.filled) {
204
+ text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
88
205
  }
89
206
  }
@@ -3,7 +3,7 @@ import '../Button/button.scss'
3
3
 
4
4
  export interface BreadcrumbItemProps {
5
5
  label?: string
6
- path?: string
6
+ href?: string
7
7
  }
8
8
 
9
9
  const props = defineProps<BreadcrumbItemProps>()
@@ -11,7 +11,7 @@ const props = defineProps<BreadcrumbItemProps>()
11
11
 
12
12
  <template>
13
13
  <li>
14
- <a v-if="props.path" :href="props.path" class="vui-breadcrumb-link">
14
+ <a v-if="props.href" :href="props.href" class="vui-breadcrumb-link">
15
15
  <slot>
16
16
  {{ props.label }}
17
17
  </slot>
@@ -19,10 +19,9 @@ const slots = defineSlots<{
19
19
 
20
20
  <template>
21
21
  <ul class="vui-breadcrumbs">
22
- <template v-for="(vnode, index) of slots.default()" :key="vnode.props.label">
22
+ <template v-for="(vnode, index) of slots.default()" :key="vnode.props?.label || index">
23
23
  <component
24
24
  :is="vnode"
25
- v-bind="vnode.props"
26
25
  />
27
26
  <template v-if="index !== slots.default().length - 1">
28
27
  <Icon v-if="separator.length > 1 && separator.includes(':')" class="vui-breadcrumb-custom-separator" :icon="separator" />
@@ -5,10 +5,11 @@
5
5
 
6
6
  .vui-breadcrumb-custom-separator {
7
7
  color: var(--color-text-lighter);
8
+ font-size: var(--font-size-m);
8
9
  }
9
10
 
10
11
  li {
11
- font-size: var(--font-size-s);
12
+ font-size: var(--font-size-m);
12
13
  color: var(--color-text-lighter);
13
14
 
14
15
  .vui-breadcrumb-text-simple {
@@ -6,7 +6,7 @@ import { Size } from '../../shared/types'
6
6
  import Spinner from '../Spinner/Spinner.vue'
7
7
  import './button.scss'
8
8
 
9
- export type Variants = 'default' | 'danger' | 'success' | 'link' | 'blue' | 'accent'
9
+ export type Variants = 'fill' | 'danger' | 'success' | 'link' | 'accent' | 'gray'
10
10
 
11
11
  interface Props {
12
12
  // Provide URL to turn button into anchor
@@ -15,24 +15,18 @@ interface Props {
15
15
 
16
16
  // State props
17
17
  loading?: boolean
18
+
19
+ size?: Sizes
18
20
  expand?: boolean
19
21
  square?: boolean
20
- dashed?: boolean
22
+ icon?: string
23
+
24
+ variant?: Variants
25
+ outline?: boolean
26
+ // dashed?: boolean
27
+ // outlineDashed?: boolean
21
28
  disabled?: boolean
22
- size?: Sizes
23
- /**
24
- * Sets the hover styling property
25
- */
26
- active?: boolean
27
- /**
28
- * No styling applied to the button unless hovered
29
- */
30
29
  plain?: boolean
31
- variant?: Variants
32
- /**
33
- * The children will be set to an icon and the icon will become a square
34
- */
35
- icon?: string
36
30
  }
37
31
 
38
32
  const {
@@ -40,14 +34,14 @@ const {
40
34
  disabled,
41
35
  expand,
42
36
  size = 'm',
43
- variant = 'default',
37
+ variant = 'gray',
44
38
  icon,
45
- dashed,
39
+ // dashed,
46
40
  } = defineProps<Props>()
47
41
 
48
42
  const height = computed(() => {
49
43
  switch (size) {
50
- case Size.s: return '24px'
44
+ case Size.s: return '28px'
51
45
  case Size.l: return '40px'
52
46
  case Size.m:
53
47
  default: return 'var(--interactive-el-height)'
@@ -56,7 +50,7 @@ const height = computed(() => {
56
50
 
57
51
  const padding = computed(() => {
58
52
  switch (size) {
59
- case Size.s: return '5px'
53
+ case Size.s: return '4px'
60
54
  case Size.l: return '16px'
61
55
  case Size.m:
62
56
  default: return '8px'
@@ -67,13 +61,14 @@ const padding = computed(() => {
67
61
  <template>
68
62
  <button
69
63
  class="vui-button"
70
- :class="[{ loading, expand, disabled, plain, active, icon, square, dashed }, `vui-button-variant-${variant}`]"
64
+ :class="[{ loading, expand, disabled, plain, icon, square, outline }, `vui-button-variant-${variant}`]"
71
65
  :disabled
72
66
  role="button"
73
67
  :style="{
74
68
  '--button-height': height,
75
69
  '--button-padding': padding,
76
70
  }"
71
+ :name="icon && !$slots.default ? icon.split(':')[1] : undefined"
77
72
  >
78
73
  <Spinner size="s" />
79
74
  <div class="vui-button-slot">
@@ -3,13 +3,12 @@
3
3
  --button-padding: 8px;
4
4
 
5
5
  &.disabled {
6
- pointer-events: none;
7
- color: var(--color-text-lighter) !important;
6
+ // color: var(--color-text-lighter) !important;
8
7
  cursor: not-allowed !important;
9
- filter: saturate(50%) opacity(0.65);
8
+ filter: saturate(75%) opacity(50%);
10
9
 
11
10
  svg path {
12
- color: var(--color-text-lighter) !important;
11
+ color: var(--color-text-light) !important;
13
12
  }
14
13
  }
15
14
 
@@ -30,13 +29,13 @@
30
29
  &.icon {
31
30
  width: var(--button-height);
32
31
  padding: 0;
32
+ }
33
33
 
34
- .vui-button-slot {
35
- svg {
36
- width: 18px;
37
- height: 18px;
38
- }
39
- }
34
+ .vui-button-slot svg {
35
+ display: block;
36
+ color: var(--color-text);
37
+ width: 17px;
38
+ height: 17px;
40
39
  }
41
40
 
42
41
  &.square {
@@ -47,7 +46,11 @@
47
46
  }
48
47
 
49
48
  &.dashed {
50
- border-style: dashed;
49
+ border-style: dashed !important;
50
+ }
51
+
52
+ svg path {
53
+ transition: var(--transition-fast);
51
54
  }
52
55
 
53
56
  height: var(--button-height);
@@ -59,7 +62,7 @@
59
62
  padding-inline: var(--button-padding);
60
63
  font-size: var(--font-size-s);
61
64
  position: relative;
62
- transition: var(--transition);
65
+ transition: var(--transition-fast);
63
66
  border: 1px solid transparent;
64
67
  background-color: transparent;
65
68
  color: var(--color-text);
@@ -69,7 +72,7 @@
69
72
  .vui-button-slot {
70
73
  display: flex;
71
74
  place-items: center;
72
- transition: var(--transition);
75
+ transition: var(--transition-fast);
73
76
  opacity: 1;
74
77
  }
75
78
 
@@ -88,79 +91,133 @@
88
91
  }
89
92
 
90
93
  .vui-spinner {
91
- transition: var(--transition);
94
+ transition: var(--transition-fast);
92
95
  opacity: 0;
93
96
  position: absolute;
94
97
  pointer-events: none;
95
98
  }
96
99
 
97
100
  // Variants
98
- &.vui-button-variant-default {
99
- &:not(.plain) {
101
+ &.vui-button-variant-danger {
102
+ &:not(.plain):not(.outline) {
100
103
  color: var(--color-text);
101
- background-color: var(--color-button-gray);
102
- border: 1px solid var(--color-border);
104
+ background-color: var(--color-bg-red-raised);
105
+
106
+ svg,
107
+ path {
108
+ color: var(--color-text);
109
+ }
103
110
  }
104
111
 
105
- &.active,
106
- &:hover {
107
- background-color: var(--color-button-gray-hover);
112
+ &.outline {
113
+ border-color: var(--color-bg-red-lowered);
114
+ }
115
+
116
+ &:not(.plain):not(.disabled):not(.plain):hover,
117
+ &:hover:not(.disabled) {
118
+ background-color: var(--color-bg-red-lowered);
108
119
  }
109
120
  }
110
121
 
111
- &.vui-button-variant-danger {
112
- &:not(.plain) {
122
+ &.vui-button-variant-success {
123
+ &:not(.plain):not(.outline) {
113
124
  color: var(--color-text);
114
- background-color: var(--color-bg-red-lowered);
115
- border: 1px solid var(--color-border-red);
125
+ background-color: var(--color-bg-green-raised);
126
+
127
+ svg,
128
+ path {
129
+ color: var(--color-text);
130
+ }
116
131
  }
117
132
 
118
- &.active,
119
- &:hover {
120
- border: 1px solid var(--color-bg-red-raised);
121
- background-color: var(--color-bg-red-raised);
133
+ &.outline {
134
+ border-color: var(--color-bg-green-lowered);
135
+ }
136
+
137
+ &:not(.plain):not(.disabled):not(.plain):hover,
138
+ &:hover:not(.disabled) {
139
+ background-color: var(--color-bg-green-lowered);
122
140
  }
123
141
  }
124
142
 
125
- &.vui-button-variant-success {
126
- &:not(.plain) {
143
+ &.vui-button-variant-gray {
144
+ &:not(.plain):not(.outline) {
127
145
  color: var(--color-text);
128
- background-color: var(--color-bg-green-lowered);
129
- border: 1px solid var(--color-border-green);
146
+ background-color: var(--color-button-gray);
147
+
148
+ svg,
149
+ path {
150
+ color: var(--color-text);
151
+ }
130
152
  }
131
153
 
132
- &.active,
133
- &:hover {
134
- border: 1px solid var(--color-bg-green-raised);
135
- background-color: var(--color-bg-green-raised);
154
+ &.outline {
155
+ border-color: var(--color-button-gray-hover);
156
+ }
157
+
158
+ &:not(.plain):not(.disabled):not(.plain):hover,
159
+ &:hover:not(.disabled) {
160
+ background-color: var(--color-button-gray-hover);
136
161
  }
137
162
  }
138
163
 
139
- &.vui-button-variant-blue {
140
- &:not(.plain) {
141
- color: var(--color-text);
142
- background-color: var(--color-bg-blue-lowered);
143
- border: 1px solid var(--color-border-blue);
164
+ &.vui-button-variant-fill {
165
+ &:not(.plain):not(.outline) {
166
+ color: var(--color-text-invert);
167
+ background-color: var(--color-button-fill);
168
+
169
+ svg,
170
+ path {
171
+ color: var(--color-text-invert);
172
+ }
144
173
  }
145
174
 
146
- &.active,
147
- &:hover {
148
- border: 1px solid var(--color-bg-blue-raised);
149
- background-color: var(--color-bg-blue-raised);
175
+ &.outline {
176
+ border-color: var(--color-button-fill-hover);
177
+
178
+ &:hover {
179
+ color: var(--color-text-invert);
180
+
181
+ svg,
182
+ path {
183
+ color: var(--color-text-invert);
184
+ }
185
+ }
186
+ }
187
+
188
+ &:not(.plain):not(.disabled):not(.plain):hover,
189
+ &:hover:not(.disabled) {
190
+ background-color: var(--color-button-fill-hover);
191
+
192
+ &.plain {
193
+ color: var(--color-text-invert);
194
+
195
+ svg,
196
+ path {
197
+ color: var(--color-text-invert);
198
+ }
199
+ }
150
200
  }
151
201
  }
152
202
 
153
203
  &.vui-button-variant-accent {
154
- &:not(.plain) {
204
+ &:not(.plain):not(.outline) {
155
205
  color: var(--color-text);
156
- background-color: var(--color-bg-accent-lowered);
157
- border: 1px solid var(--color-border-accent);
206
+ background-color: var(--color-bg-accent-raised);
207
+
208
+ svg,
209
+ path {
210
+ color: var(--color-text);
211
+ }
158
212
  }
159
213
 
160
- &.active,
161
- &:hover {
162
- border: 1px solid var(--color-bg-accent-raised);
163
- background-color: var(--color-bg-accent-raised);
214
+ &.outline {
215
+ border-color: var(--color-bg-accent-lowered);
216
+ }
217
+
218
+ &:not(.plain):not(.disabled):not(.plain):hover,
219
+ &:hover:not(.disabled) {
220
+ background-color: var(--color-bg-accent-lowered);
164
221
  }
165
222
  }
166
223
 
@@ -170,9 +227,53 @@
170
227
  text-underline-offset: 4px;
171
228
  cursor: pointer;
172
229
 
173
- &.active,
174
- &:hover {
230
+ &:not(:disabled).active,
231
+ &:not(:disabled):hover {
175
232
  text-decoration: underline;
176
233
  }
177
234
  }
178
235
  }
236
+
237
+ :root.light {
238
+ .vui-button {
239
+ &.vui-button-variant-danger {
240
+ &:not(.plain):not(.outline) {
241
+ color: var(--color-text-invert);
242
+
243
+ svg,
244
+ path {
245
+ color: var(--color-text-invert);
246
+ }
247
+ }
248
+
249
+ &.outline:hover {
250
+ color: var(--color-text-invert);
251
+
252
+ svg,
253
+ path {
254
+ color: var(--color-text-invert);
255
+ }
256
+ }
257
+ }
258
+
259
+ &.vui-button-variant-success {
260
+ &:not(.plain):not(.outline) {
261
+ color: var(--color-text-invert);
262
+
263
+ svg,
264
+ path {
265
+ color: var(--color-text-invert);
266
+ }
267
+ }
268
+
269
+ &.outline:hover {
270
+ color: var(--color-text-invert);
271
+
272
+ svg,
273
+ path {
274
+ color: var(--color-text-invert);
275
+ }
276
+ }
277
+ }
278
+ }
279
+ }
@@ -1,13 +1,16 @@
1
1
  <script setup lang='ts'>
2
+ import type { Space } from '../../shared/types'
2
3
  import Flex from '../Flex/Flex.vue'
3
4
  import './button-group.scss'
4
5
 
5
6
  interface Props {
6
7
  vertical?: boolean
8
+ gap?: Space | number
7
9
  }
8
10
 
9
11
  const {
10
12
  vertical,
13
+ gap = 0,
11
14
  } = defineProps<Props>()
12
15
  </script>
13
16
 
@@ -17,7 +20,7 @@ const {
17
20
  :column="vertical"
18
21
  class="vui-button-group"
19
22
  :class="{ vertical }"
20
- :gap="0"
23
+ :gap
21
24
  inline
22
25
  >
23
26
  <slot />
@@ -21,7 +21,7 @@
21
21
  }
22
22
 
23
23
  &:not(:last-child) {
24
- margin-right: -1px;
24
+ margin-right: 0px;
25
25
  }
26
26
  }
27
27
 
@@ -44,7 +44,7 @@
44
44
  }
45
45
 
46
46
  &:not(:last-child) {
47
- margin-bottom: -1px;
47
+ margin-bottom: 0px;
48
48
  }
49
49
  }
50
50
  }