@globalbrain/sefirot 2.0.0-draft.8 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/README.md +6 -6
  2. package/lib/components/SAvatar.vue +17 -17
  3. package/lib/components/SButton.vue +520 -276
  4. package/lib/components/SButtonGroup.vue +149 -0
  5. package/lib/components/SDropdown.vue +26 -150
  6. package/lib/components/SDropdownSection.vue +48 -0
  7. package/lib/components/SDropdownSectionFilter.vue +190 -0
  8. package/lib/components/SDropdownSectionFilterItem.vue +21 -0
  9. package/lib/components/SDropdownSectionFilterItemAvatar.vue +31 -0
  10. package/lib/components/SDropdownSectionFilterItemText.vue +20 -0
  11. package/lib/components/SDropdownSectionMenu.vue +39 -0
  12. package/lib/components/SIcon.vue +13 -0
  13. package/lib/components/SInputBase.vue +31 -31
  14. package/lib/components/SInputCheckbox.vue +4 -3
  15. package/lib/components/SInputCheckboxes.vue +74 -0
  16. package/lib/components/SInputDate.vue +182 -0
  17. package/lib/components/SInputDropdown.vue +159 -157
  18. package/lib/components/SInputDropdownItem.vue +46 -48
  19. package/lib/components/SInputDropdownItemAvatar.vue +99 -0
  20. package/lib/components/SInputDropdownItemText.vue +79 -16
  21. package/lib/components/SInputFile.vue +56 -60
  22. package/lib/components/SInputHMS.vue +120 -110
  23. package/lib/components/SInputNumber.vue +38 -9
  24. package/lib/components/SInputRadio.vue +39 -36
  25. package/lib/components/SInputRadios.vue +40 -53
  26. package/lib/components/SInputSelect.vue +7 -6
  27. package/lib/components/SInputSwitch.vue +193 -0
  28. package/lib/components/SInputSwitches.vue +88 -0
  29. package/lib/components/SInputText.vue +207 -62
  30. package/lib/components/SInputTextarea.vue +46 -32
  31. package/lib/components/SInputYMD.vue +123 -126
  32. package/lib/components/SMarkdown.vue +52 -0
  33. package/lib/components/SModal.vue +33 -57
  34. package/lib/components/SMount.vue +19 -0
  35. package/lib/components/SSheet.vue +50 -55
  36. package/lib/components/SSheetFooter.vue +1 -1
  37. package/lib/components/SSheetFooterAction.vue +24 -17
  38. package/lib/components/SSheetFooterActions.vue +1 -4
  39. package/lib/components/SSheetForm.vue +15 -0
  40. package/lib/components/SSheetMedium.vue +8 -10
  41. package/lib/components/SSheetTitle.vue +7 -14
  42. package/lib/components/SSnackbar.vue +58 -47
  43. package/lib/components/{SPortalSnackbars.vue → SSnackbars.vue} +17 -20
  44. package/lib/components/{icons/SIconPreloader.vue → SSpinner.vue} +5 -4
  45. package/lib/components/SStep.vue +107 -0
  46. package/lib/components/SSteps.vue +59 -0
  47. package/lib/components/STable.vue +242 -0
  48. package/lib/components/STableCell.vue +82 -0
  49. package/lib/components/STableCellAvatar.vue +69 -0
  50. package/lib/components/STableCellAvatars.vue +93 -0
  51. package/lib/components/STableCellDay.vue +40 -0
  52. package/lib/components/STableCellPill.vue +84 -0
  53. package/lib/components/STableCellText.vue +103 -0
  54. package/lib/components/STableColumn.vue +255 -0
  55. package/lib/components/STableFooter.vue +115 -0
  56. package/lib/components/STableHeader.vue +74 -0
  57. package/lib/components/STableItem.vue +38 -0
  58. package/lib/components/STooltip.vue +112 -0
  59. package/lib/composables/Dropdown.ts +40 -99
  60. package/lib/composables/Form.ts +21 -18
  61. package/lib/composables/Grid.ts +117 -0
  62. package/lib/composables/Markdown.ts +138 -0
  63. package/lib/composables/Step.ts +7 -0
  64. package/lib/composables/Table.ts +103 -0
  65. package/lib/composables/Tooltip.ts +91 -0
  66. package/lib/composables/Validation.ts +5 -9
  67. package/lib/composables/markdown/LinkPlugin.ts +45 -0
  68. package/lib/mixins/Sheet.ts +5 -3
  69. package/lib/stores/Snackbars.ts +48 -0
  70. package/lib/{assets/styles → styles}/base.css +0 -0
  71. package/lib/{assets/styles → styles}/bootstrap.css +1 -0
  72. package/lib/{assets/styles → styles}/variables.css +55 -48
  73. package/lib/support/Day.ts +8 -0
  74. package/lib/support/Num.ts +3 -0
  75. package/lib/support/Time.ts +5 -2
  76. package/lib/support/Utils.ts +4 -3
  77. package/lib/types/shims.d.ts +3 -0
  78. package/lib/validation/validators/requiredYmd.ts +1 -1
  79. package/lib/validation/validators/ymd.ts +4 -4
  80. package/package.json +59 -37
  81. package/CHANGELOG.md +0 -47
  82. package/lib/.DS_Store +0 -0
  83. package/lib/components/.DS_Store +0 -0
  84. package/lib/components/SDialog.vue +0 -140
  85. package/lib/components/SDropdownItem.vue +0 -78
  86. package/lib/components/SDropdownItemText.vue +0 -22
  87. package/lib/components/SDropdownItemUser.vue +0 -40
  88. package/lib/components/SInputDropdownItemTextTag.vue +0 -94
  89. package/lib/components/SInputDropdownItemUser.vue +0 -41
  90. package/lib/components/SInputDropdownItemUserTag.vue +0 -100
  91. package/lib/components/SPortalModals.vue +0 -74
  92. package/lib/components/icons/.DS_Store +0 -0
  93. package/lib/components/icons/SIconActivity.vue +0 -5
  94. package/lib/components/icons/SIconArrowDown.vue +0 -5
  95. package/lib/components/icons/SIconArrowLeft.vue +0 -5
  96. package/lib/components/icons/SIconArrowRight.vue +0 -5
  97. package/lib/components/icons/SIconArrowUp.vue +0 -5
  98. package/lib/components/icons/SIconBarChart.vue +0 -7
  99. package/lib/components/icons/SIconBriefcase.vue +0 -5
  100. package/lib/components/icons/SIconBuilding.vue +0 -5
  101. package/lib/components/icons/SIconCalendar.vue +0 -5
  102. package/lib/components/icons/SIconCheck.vue +0 -5
  103. package/lib/components/icons/SIconCheckCircle.vue +0 -6
  104. package/lib/components/icons/SIconCheckCircleThin.vue +0 -6
  105. package/lib/components/icons/SIconCheckSquare.vue +0 -6
  106. package/lib/components/icons/SIconChevronDown.vue +0 -5
  107. package/lib/components/icons/SIconChevronLeft.vue +0 -5
  108. package/lib/components/icons/SIconChevronRight.vue +0 -5
  109. package/lib/components/icons/SIconChevronUp.vue +0 -5
  110. package/lib/components/icons/SIconClock.vue +0 -6
  111. package/lib/components/icons/SIconCode.vue +0 -6
  112. package/lib/components/icons/SIconDatabase.vue +0 -5
  113. package/lib/components/icons/SIconDollarSign.vue +0 -5
  114. package/lib/components/icons/SIconDownload.vue +0 -6
  115. package/lib/components/icons/SIconDownloadCloud.vue +0 -6
  116. package/lib/components/icons/SIconEdit.vue +0 -6
  117. package/lib/components/icons/SIconEdit2.vue +0 -5
  118. package/lib/components/icons/SIconEdit3.vue +0 -6
  119. package/lib/components/icons/SIconEdit3Off.vue +0 -6
  120. package/lib/components/icons/SIconExternalLink.vue +0 -6
  121. package/lib/components/icons/SIconEye.vue +0 -6
  122. package/lib/components/icons/SIconFile.vue +0 -5
  123. package/lib/components/icons/SIconFilePlus.vue +0 -6
  124. package/lib/components/icons/SIconFileText.vue +0 -8
  125. package/lib/components/icons/SIconFlag.vue +0 -5
  126. package/lib/components/icons/SIconGitBranch.vue +0 -5
  127. package/lib/components/icons/SIconGitCommit.vue +0 -5
  128. package/lib/components/icons/SIconGitPullRequest.vue +0 -6
  129. package/lib/components/icons/SIconGlobe.vue +0 -5
  130. package/lib/components/icons/SIconGrab.vue +0 -10
  131. package/lib/components/icons/SIconGrid.vue +0 -8
  132. package/lib/components/icons/SIconHome.vue +0 -5
  133. package/lib/components/icons/SIconImage.vue +0 -6
  134. package/lib/components/icons/SIconInbox.vue +0 -5
  135. package/lib/components/icons/SIconInfo.vue +0 -7
  136. package/lib/components/icons/SIconLayout.vue +0 -5
  137. package/lib/components/icons/SIconList.vue +0 -10
  138. package/lib/components/icons/SIconLock.vue +0 -5
  139. package/lib/components/icons/SIconLogout.vue +0 -6
  140. package/lib/components/icons/SIconMail.vue +0 -6
  141. package/lib/components/icons/SIconMapPin.vue +0 -6
  142. package/lib/components/icons/SIconMoon.vue +0 -5
  143. package/lib/components/icons/SIconMoreHorizontal.vue +0 -7
  144. package/lib/components/icons/SIconMoreVertical.vue +0 -7
  145. package/lib/components/icons/SIconPauseFill.vue +0 -6
  146. package/lib/components/icons/SIconPlayCircle.vue +0 -6
  147. package/lib/components/icons/SIconPlayFill.vue +0 -5
  148. package/lib/components/icons/SIconPlus.vue +0 -5
  149. package/lib/components/icons/SIconPlusCircle.vue +0 -8
  150. package/lib/components/icons/SIconPlusOff.vue +0 -7
  151. package/lib/components/icons/SIconPreloaderDark.vue +0 -52
  152. package/lib/components/icons/SIconPreloaderLight.vue +0 -52
  153. package/lib/components/icons/SIconProgress.vue +0 -5
  154. package/lib/components/icons/SIconRadio.vue +0 -6
  155. package/lib/components/icons/SIconSave.vue +0 -5
  156. package/lib/components/icons/SIconSearch.vue +0 -5
  157. package/lib/components/icons/SIconSend.vue +0 -5
  158. package/lib/components/icons/SIconSettings.vue +0 -6
  159. package/lib/components/icons/SIconShare2.vue +0 -5
  160. package/lib/components/icons/SIconSkipBackFill.vue +0 -6
  161. package/lib/components/icons/SIconSliders.vue +0 -12
  162. package/lib/components/icons/SIconSun.vue +0 -13
  163. package/lib/components/icons/SIconTelescope.vue +0 -5
  164. package/lib/components/icons/SIconTrash.vue +0 -5
  165. package/lib/components/icons/SIconTrash2.vue +0 -7
  166. package/lib/components/icons/SIconTrash2Off.vue +0 -6
  167. package/lib/components/icons/SIconTrello.vue +0 -7
  168. package/lib/components/icons/SIconUser.vue +0 -6
  169. package/lib/components/icons/SIconUsers.vue +0 -8
  170. package/lib/components/icons/SIconWarning.vue +0 -7
  171. package/lib/components/icons/SIconX.vue +0 -5
  172. package/lib/components/icons/SIconXCircle.vue +0 -6
  173. package/lib/components/icons/SIconXCircleThin.vue +0 -6
  174. package/lib/components/icons/SIconXSquare.vue +0 -6
  175. package/lib/components/icons/SIconZap.vue +0 -5
  176. package/lib/composables/Dialog.ts +0 -38
  177. package/lib/composables/Modal.ts +0 -34
  178. package/lib/composables/Snackbar.ts +0 -18
  179. package/lib/store/Sefirot.ts +0 -17
  180. package/lib/store/dialog/index.ts +0 -42
  181. package/lib/store/modal/index.ts +0 -61
  182. package/lib/store/snackbars/index.ts +0 -70
@@ -1,87 +1,123 @@
1
+ <script setup lang="ts">
2
+ import { computed } from 'vue'
3
+ import SIcon from './SIcon.vue'
4
+ import SSpinner from './SSpinner.vue'
5
+
6
+ export type Size = 'mini' | 'small' | 'medium' | 'large' | 'jumbo'
7
+
8
+ export type Type = 'fill' | 'outline' | 'text'
9
+
10
+ export type Mode =
11
+ | 'neutral'
12
+ | 'white'
13
+ | 'black'
14
+ | 'info'
15
+ | 'success'
16
+ | 'warning'
17
+ | 'danger'
18
+ | 'mute'
19
+
20
+ const props = defineProps<{
21
+ tag?: string
22
+ size?: Size
23
+ type?: Type
24
+ mode?: Mode
25
+ icon?: any
26
+ label?: string
27
+ href?: string
28
+ loading?: boolean
29
+ rounded?: boolean
30
+ block?: boolean
31
+ disabled?: boolean
32
+ }>()
33
+
34
+ const emit = defineEmits<{
35
+ (e: 'click'): void
36
+ }>()
37
+
38
+ const classes = computed(() => [
39
+ props.size ?? 'medium',
40
+ props.type ?? 'fill',
41
+ props.mode ?? 'neutral',
42
+ { 'has-label': props.label },
43
+ { 'has-icon': props.icon },
44
+ { loading: props.loading },
45
+ { rounded: props.rounded },
46
+ { block: props.block },
47
+ { disabled: props.disabled }
48
+ ])
49
+
50
+ function handleClick(): void {
51
+ !props.disabled && !props.loading && emit('click')
52
+ }
53
+ </script>
54
+
1
55
  <template>
2
56
  <component
3
- :is="tag"
57
+ :is="tag ?? 'button'"
4
58
  class="SButton"
5
59
  :class="classes"
6
- :to="to"
60
+ :href="href"
7
61
  role="button"
8
62
  @click="handleClick"
9
63
  >
10
64
  <span class="content">
11
- <span v-if="icon" class="icon"><component :is="icon" class="icon-svg" /></span>
65
+ <span v-if="icon" class="icon"><SIcon :icon="icon" class="icon-svg" /></span>
12
66
  <span v-if="label" class="label">{{ label }}</span>
13
67
  </span>
14
68
 
15
69
  <transition name="fade">
16
70
  <span v-if="loading" key="loading" class="loader">
17
- <SIconPreloader class="loader-icon" />
71
+ <SSpinner class="loader-icon" />
18
72
  </span>
19
73
  </transition>
20
74
  </component>
21
75
  </template>
22
76
 
23
- <script setup lang="ts">
24
- import { PropType, computed } from 'vue'
25
- import SIconPreloader from './icons/SIconPreloader.vue'
26
-
27
- type Size = 'mini' | 'small' | 'medium' | 'large' | 'jumbo'
28
-
29
- const props = defineProps({
30
- label: { type: String, default: null },
31
- tag: { type: String, default: 'button' },
32
- to: { type: String, default: '/' },
33
- type: { type: String, default: 'primary' },
34
- mode: { type: String, default: 'neutral' },
35
- size: { type: String as PropType<Size>, default: 'medium' },
36
- rounded: { type: Boolean, default: false },
37
- icon: { type: Object, default: null },
38
- block: { type: Boolean, default: false },
39
- inverse: { type: Boolean, default: false },
40
- loading: { type: Boolean, default: false },
41
- disabled: { type: Boolean, default: false }
42
- })
43
-
44
- const emit = defineEmits(['click'])
45
-
46
- const classes = computed(() => [
47
- props.type,
48
- props.mode,
49
- props.size,
50
- { rounded: props.rounded },
51
- { block: props.block },
52
- { inverse: props.inverse },
53
- { 'has-label': props.label },
54
- { 'has-icon': props.icon },
55
- { loading: props.loading },
56
- { disabled: props.disabled }
57
- ])
58
-
59
- function handleClick(): void {
60
- !props.disabled && emit('click')
61
- }
62
- </script>
63
-
64
77
  <style lang="postcss" scoped>
65
78
  .SButton {
66
79
  position: relative;
67
80
  display: inline-block;
68
81
  text-align: center;
69
82
  border: 1px solid transparent;
70
- border-radius: 4px;
71
- letter-spacing: 1px;
72
- font-size: 13px;
83
+ border-radius: 6px;
84
+ font-size: 14px;
73
85
  font-weight: 500;
74
86
  overflow: hidden;
75
87
  white-space: nowrap;
76
- transition: color .25s, border-color .25s, background-color .25s;
88
+ transition: color 0.25s, border-color 0.25s, background-color 0.25s;
77
89
  }
78
90
 
79
- .SButton.primary {
80
- color: var(--button-primary-text);
81
- background-color: var(--button-primary-bg);
91
+ .SButton.fill {
92
+ &.neutral {
93
+ color: var(--button-fill-text);
94
+ background-color: var(--button-fill-bg);
82
95
 
83
- &:hover { background-color: var(--button-primary-bg-hover); }
84
- &:active { background-color: var(--button-primary-bg-focus); }
96
+ &:hover { background-color: var(--button-fill-bg-hover); }
97
+ &:active { background-color: var(--button-fill-bg-focus); }
98
+
99
+ & .loader-icon { color: var(--c-text-inverse-1); }
100
+ }
101
+
102
+ &.white {
103
+ color: var(--c-text-light-1);
104
+ background-color: var(--c-white);
105
+
106
+ &:hover { background-color: var(--c-gray-light-3); }
107
+ &:active { background-color: var(--c-gray-light-1); }
108
+
109
+ & .loader-icon { color: var(--c-white); }
110
+ }
111
+
112
+ &.black {
113
+ color: var(--c-text-dark-1);
114
+ background-color: var(--c-black);
115
+
116
+ &:hover { background-color: var(--c-gray-dark-4); }
117
+ &:active { background-color: var(--c-gray-dark-3); }
118
+
119
+ & .loader-icon { color: var(--c-white); }
120
+ }
85
121
 
86
122
  &.info {
87
123
  color: var(--c-text-dark-1);
@@ -89,6 +125,8 @@ function handleClick(): void {
89
125
 
90
126
  &:hover { background-color: var(--c-info-dark); }
91
127
  &:active { background-color: var(--c-info-darker); }
128
+
129
+ & .loader-icon { color: var(--c-white); }
92
130
  }
93
131
 
94
132
  &.success {
@@ -97,6 +135,8 @@ function handleClick(): void {
97
135
 
98
136
  &:hover { background-color: var(--c-success-dark); }
99
137
  &:active { background-color: var(--c-success-darker); }
138
+
139
+ & .loader-icon { color: var(--c-white); }
100
140
  }
101
141
 
102
142
  &.warning {
@@ -105,6 +145,8 @@ function handleClick(): void {
105
145
 
106
146
  &:hover { background-color: var(--c-warning-dark); }
107
147
  &:active { background-color: var(--c-warning-darker); }
148
+
149
+ & .loader-icon { color: var(--c-white); }
108
150
  }
109
151
 
110
152
  &.danger {
@@ -113,14 +155,52 @@ function handleClick(): void {
113
155
 
114
156
  &:hover { background-color: var(--c-danger-dark); }
115
157
  &:active { background-color: var(--c-danger-darker); }
158
+
159
+ & .loader-icon { color: var(--c-white); }
160
+ }
161
+
162
+ &.mute {
163
+ border-color: var(--c-divider-light);
164
+ color: var(--c-text-1);
165
+ background-color: var(--c-bg-mute);
166
+
167
+ &:hover { border-color: var(--c-divider); background-color: var(--c-gray-light-4); }
168
+ &:active { background-color: var(--c-bg-soft); }
169
+
170
+ & .loader-icon { color: var(--c-black); }
171
+
172
+ .dark & {
173
+ border-color: var(--c-divider-light);
174
+ background-color: var(--c-gray-dark-4);
175
+
176
+ &:hover { border-color: var(--c-divider); background-color: var(--c-gray-dark-5); }
177
+ &:active { background-color: var(--c-bg-soft); }
178
+
179
+ & .loader-icon { color: var(--c-white); }
180
+ }
116
181
  }
117
182
 
118
183
  &.disabled {
119
- opacity: .75;
184
+ opacity: 0.75;
120
185
  cursor: not-allowed;
121
186
 
122
- &:hover { background-color: var(--button-primary-bg); }
123
- &:active { background-color: var(--button-primary-bg); }
187
+ &.neutral {
188
+ &:hover { background-color: var(--button-fill-bg); }
189
+ &:active { background-color: var(--button-fill-bg); }
190
+ }
191
+
192
+ &.white {
193
+ &:hover { background-color: var(--c-gray-dark-4); }
194
+ &:active { background-color: var(--c-gray-dark-3); }
195
+ }
196
+
197
+ &.black {
198
+ color: var(--c-text-dark-1);
199
+ background-color: var(--c-white);
200
+
201
+ &:hover { background-color: var(--c-gray-light-3); }
202
+ &:active { background-color: var(--c-gray-light-1); }
203
+ }
124
204
 
125
205
  &.info {
126
206
  &:hover { background-color: var(--c-info); }
@@ -142,58 +222,32 @@ function handleClick(): void {
142
222
  &:active { background-color: var(--c-danger); }
143
223
  }
144
224
  }
225
+ }
145
226
 
146
- &.inverse {
147
- color: var(--button-primary-inverse-text);
148
- background-color: var(--button-primary-inverse-bg);
149
-
150
- &:hover { background-color: var(--button-primary-inverse-bg-hover); }
151
- &:active { background-color: var(--button-primary-inverse-bg-focus); }
152
-
153
- &.info {
154
- color: var(--c-text-light-1);
155
- background-color: var(--c-info-light);
156
-
157
- &:hover { background-color: var(--c-info); }
158
- &:active { background-color: var(--c-info-dark); }
159
- }
160
-
161
- &.success {
162
- color: var(--c-text-light-1);
163
- background-color: var(--c-success);
164
-
165
- &:hover { background-color: var(--c-success-dark); }
166
- &:active { background-color: var(--c-success-darker); }
167
- }
168
-
169
- &.warning {
170
- color: var(--c-text-light-1);
171
- background-color: var(--c-warning);
227
+ .SButton.outline {
228
+ &.neutral {
229
+ border-color: var(--button-outline-border);
230
+ color: var(--button-outline-text);
172
231
 
173
- &:hover { background-color: var(--c-warning-dark); }
174
- &:active { background-color: var(--c-warning-darker); }
175
- }
232
+ &:hover { background-color: var(--button-outline-bg-hover); }
233
+ &:active { background-color: var(--button-outline-bg-focus); }
234
+ }
176
235
 
177
- &.danger {
178
- color: var(--c-text-light-1);
179
- background-color: var(--c-danger);
236
+ &.white {
237
+ border-color: var(--c-white);
238
+ color: var(--c-text-dark-1);
180
239
 
181
- &:hover { background-color: var(--c-danger-dark); }
182
- &:active { background-color: var(--c-danger-darker); }
183
- }
240
+ &:hover { background-color: var(--c-white-mute); }
241
+ &:active { background-color: var(--c-gray-light-4); }
184
242
  }
185
243
 
186
- & .loader-icon :deep(.bar) {
187
- fill: var(--c-text-inverse-1);
188
- }
189
- }
244
+ &.black {
245
+ border-color: var(--c-black);
246
+ color: var(--c-text-light-1);
190
247
 
191
- .SButton.secondary {
192
- border-color: var(--button-secondary-border);
193
- color: var(--button-secondary-text);
194
-
195
- &:hover { background-color: var(--button-secondary-bg-hover); }
196
- &:active { background-color: var(--button-secondary-bg-focus); }
248
+ &:hover { background-color: var(--c-black-mute); }
249
+ &:active { background-color: var(--c-gray-dark-3); }
250
+ }
197
251
 
198
252
  &.info {
199
253
  border-color: var(--c-info);
@@ -264,37 +318,13 @@ function handleClick(): void {
264
318
  }
265
319
  }
266
320
 
267
- .SButton.tertiary {
268
- border-color: transparent;
269
- color: var(--button-tertiary-text);
270
- background-color: var(--button-tertiary-bg);
271
-
272
- &:hover { background-color: var(--button-tertiary-bg-hover); }
273
- &:active { background-color: var(--button-tertiary-bg-focus); }
274
-
275
- &.disabled {
276
- opacity: .75;
277
- cursor: not-allowed;
278
-
279
- &:hover { background-color: var(--button-tertiary-bg); }
280
- &:active { background-color: var(--button-tertiary-bg); }
281
- }
282
-
283
- &.inverse {
284
- border-color: transparent;
285
- color: var(--button-tertiary-inverse-text);
286
- background-color: var(--button-tertiary-inverse-bg);
287
-
288
- &:hover { background-color: var(--button-tertiary-inverse-bg-hover); }
289
- &:active { background-color: var(--button-tertiary-inverse-bg-focus); }
290
- }
291
- }
292
-
293
321
  .SButton.text {
294
- color: var(--button-text-text);
322
+ &.neutral {
323
+ color: var(--button-text-text);
295
324
 
296
- &:hover { background-color: var(--button-text-bg-hover); }
297
- &:active { background-color: var(--button-text-bg-focus); }
325
+ &:hover { background-color: var(--button-text-bg-hover); }
326
+ &:active { background-color: var(--button-text-bg-focus); }
327
+ }
298
328
 
299
329
  &.info { color: var(--c-info); }
300
330
  &.success { color: var(--c-success); }
@@ -305,56 +335,9 @@ function handleClick(): void {
305
335
  opacity: .75;
306
336
  cursor: not-allowed;
307
337
 
308
- &:hover { background-color: var(--button-text-bg); }
309
- &:active { background-color: var(--button-text-bg); }
310
- }
311
-
312
- &.inverse {
313
- color: var(--button-text-inverse-text);
314
-
315
- &:hover { background-color: var(--button-text-inverse-bg-hover); }
316
- &:active { background-color: var(--button-text-inverse-bg-focus); }
317
- }
318
- }
319
-
320
- .SButton.mute {
321
- color: var(--button-mute-text);
322
-
323
- &:hover {
324
- color: var(--button-mute-text-hover);
325
- background-color: var(--button-mute-bg-hover);
326
- }
327
-
328
- &:active {
329
- color: var(--button-mute-text-hover);
330
- background-color: var(--button-mute-bg-focus);
331
- }
332
-
333
- &.disabled {
334
- cursor: not-allowed;
335
-
336
- &:hover {
337
- color: var(--button-mute-text);
338
- background-color: transparent;
339
- }
340
-
341
- &:active {
342
- color: var(--button-mute-text);
343
- background-color: transparent;
344
- }
345
- }
346
-
347
- &.inverse {
348
- color: var(--button-mute-inverse-text);
349
-
350
- &:hover {
351
- color: var(--button-mute-inverse-text-hover);
352
- background-color: var(--button-mute-inverse-bg-hover);
353
- }
354
-
355
- &:active {
356
- color: var(--button-mute-inverse-text);
357
- background-color: var(--button-mute-inverse-bg-focus);
338
+ &.neutral {
339
+ &:hover { background-color: var(--button-text-bg); }
340
+ &:active { background-color: var(--button-text-bg); }
358
341
  }
359
342
  }
360
343
  }
@@ -365,28 +348,28 @@ function handleClick(): void {
365
348
  font-size: 12px;
366
349
 
367
350
  .icon-svg {
368
- width: 14px;
369
- height: 14px;
351
+ width: 16px;
352
+ height: 16px;
370
353
  }
371
- }
372
354
 
373
- .SButton.mini.rounded {
374
- border-radius: 14px;
375
- }
355
+ &.mini.rounded {
356
+ border-radius: 14px;
357
+ }
376
358
 
377
- .SButton.mini.has-label {
378
- padding: 0 8px;
379
- width: auto;
380
- }
359
+ &.mini.has-label {
360
+ padding: 0 8px;
361
+ width: auto;
362
+ }
381
363
 
382
- .SButton.mini.has-label.block {
383
- width: 100%;
384
- }
364
+ &.mini.has-label.block {
365
+ width: 100%;
366
+ }
385
367
 
386
- .SButton.mini.has-icon {
387
- .label {
388
- padding-right: 1px;
389
- padding-left: 6px;
368
+ &.mini.has-icon {
369
+ .label {
370
+ padding-right: 1px;
371
+ padding-left: 6px;
372
+ }
390
373
  }
391
374
  }
392
375
 
@@ -396,63 +379,59 @@ function handleClick(): void {
396
379
  font-size: 12px;
397
380
 
398
381
  .icon-svg {
399
- width: 14px;
400
- height: 14px;
382
+ width: 18px;
383
+ height: 18px;
401
384
  }
402
- }
403
385
 
404
- .SButton.small.rounded {
405
- border-radius: 16px;
406
- }
386
+ &.small.rounded {
387
+ border-radius: 16px;
388
+ }
407
389
 
408
- .SButton.small.has-label {
409
- padding: 0 10px;
410
- width: auto;
411
- }
390
+ &.small.has-label {
391
+ padding: 0 10px;
392
+ width: auto;
393
+ }
412
394
 
413
- .SButton.small.has-label.block {
414
- width: 100%;
415
- }
395
+ &.small.has-label.block {
396
+ width: 100%;
397
+ }
416
398
 
417
- .SButton.small.has-icon {
418
- .label {
419
- padding-right: 1px;
420
- padding-left: 8px;
399
+ &.small.has-icon {
400
+ .label {
401
+ padding-right: 1px;
402
+ padding-left: 8px;
403
+ }
421
404
  }
422
405
  }
423
406
 
424
407
  .SButton.medium {
425
408
  width: 40px;
426
409
  height: 40px;
427
- font-size: 13px;
428
-
429
- .label {
430
- transform: translateY(1px);
431
- }
410
+ font-size: 14px;
432
411
 
433
412
  .icon-svg {
434
- width: 16px;
435
- height: 16px;
413
+ width: 20px;
414
+ height: 20px;
436
415
  }
437
- }
438
416
 
439
- .SButton.medium.rounded {
440
- border-radius: 20px;
441
- }
417
+ &.medium.rounded {
418
+ border-radius: 20px;
419
+ }
442
420
 
443
- .SButton.medium.has-label {
444
- padding: 0 12px;
445
- width: auto;
446
- }
421
+ &.medium.has-label {
422
+ padding: 0 12px;
423
+ width: auto;
424
+ }
447
425
 
448
- .SButton.medium.has-label.block {
449
- width: 100%;
450
- }
426
+ &.medium.has-label.block {
427
+ width: 100%;
428
+ }
451
429
 
452
- .SButton.medium.has-icon {
453
- .label {
454
- padding-right: 1px;
455
- padding-left: 8px;
430
+ &.medium.has-icon {
431
+ .label {
432
+ padding-right: 1px;
433
+ padding-left: 8px;
434
+ }
456
435
  }
457
436
  }
458
437
 
@@ -461,33 +440,29 @@ function handleClick(): void {
461
440
  height: 48px;
462
441
  font-size: 14px;
463
442
 
464
- .label {
465
- transform: translateY(1px);
466
- }
467
-
468
443
  .icon-svg {
469
- width: 18px;
470
- height: 18px;
444
+ width: 20px;
445
+ height: 20px;
471
446
  }
472
- }
473
447
 
474
- .SButton.large.rounded {
475
- border-radius: 24px;
476
- }
448
+ &.large.rounded {
449
+ border-radius: 24px;
450
+ }
477
451
 
478
- .SButton.large.has-label {
479
- padding: 0 14px;
480
- width: auto;
481
- }
452
+ &.large.has-label {
453
+ padding: 0 14px;
454
+ width: auto;
455
+ }
482
456
 
483
- .SButton.large.has-label.block {
484
- width: 100%;
485
- }
457
+ &.large.has-label.block {
458
+ width: 100%;
459
+ }
486
460
 
487
- .SButton.large.has-icon {
488
- .label {
489
- padding-right: 2px;
490
- padding-left: 10px;
461
+ &.large.has-icon {
462
+ .label {
463
+ padding-right: 2px;
464
+ padding-left: 10px;
465
+ }
491
466
  }
492
467
  }
493
468
 
@@ -500,25 +475,25 @@ function handleClick(): void {
500
475
  width: 18px;
501
476
  height: 18px;
502
477
  }
503
- }
504
478
 
505
- .SButton.jumbo.rounded {
506
- border-radius: 32px;
507
- }
479
+ &.jumbo.rounded {
480
+ border-radius: 32px;
481
+ }
508
482
 
509
- .SButton.jumbo.has-label {
510
- padding: 0 24px;
511
- width: auto;
512
- }
483
+ &.jumbo.has-label {
484
+ padding: 0 24px;
485
+ width: auto;
486
+ }
513
487
 
514
- .SButton.jumbo.has-label.block {
515
- width: 100%;
516
- }
488
+ &.jumbo.has-label.block {
489
+ width: 100%;
490
+ }
517
491
 
518
- .SButton.jumbo.has-icon {
519
- .label {
520
- padding-right: 2px;
521
- padding-left: 10px;
492
+ &.jumbo.has-icon {
493
+ .label {
494
+ padding-right: 2px;
495
+ padding-left: 10px;
496
+ }
522
497
  }
523
498
  }
524
499
 
@@ -528,6 +503,58 @@ function handleClick(): void {
528
503
  }
529
504
 
530
505
  .SButton.loading {
506
+ &.fill {
507
+ &.neutral {
508
+ color: var(--c-text-1);
509
+
510
+ &:hover { background-color: var(--button-fill-bg); }
511
+ &:active { background-color: var(--button-fill-bg); }
512
+ }
513
+
514
+ &.white {
515
+ &:hover { background-color: var(--c-white); }
516
+ &:active { background-color: var(--c-white); }
517
+ }
518
+
519
+ &.black {
520
+ &:hover { background-color: var(--c-black); }
521
+ &:active { background-color: var(--c-black); }
522
+ }
523
+
524
+ &.info {
525
+ &:hover { background-color: var(--c-info); }
526
+ &:active { background-color: var(--c-info); }
527
+ }
528
+
529
+ &.success {
530
+ &:hover { background-color: var(--c-success); }
531
+ &:active { background-color: var(--c-success); }
532
+ }
533
+
534
+ &.warning {
535
+ &:hover { background-color: var(--c-warning); }
536
+ &:active { background-color: var(--c-warning); }
537
+ }
538
+
539
+ &.danger {
540
+ color: var(--c-text-1);
541
+
542
+ &:hover { background-color: var(--c-danger); }
543
+ &:active { background-color: var(--c-danger); }
544
+ }
545
+
546
+ &.mute {
547
+ &:hover { border-color: var(--c-divider-light); background-color: var(--c-bg-mute); }
548
+ &:active { background-color: var(--c-bg-mute); }
549
+
550
+ .dark & {
551
+ &:hover { border-color: var(--c-divider-light); background-color: var(--c-gray-dark-4); }
552
+ &:active { background-color: var(--c-gray-dark-4); }
553
+ }
554
+ }
555
+ }
556
+
557
+ /* Deprecated */
531
558
  &.primary {
532
559
  &:hover { background-color: var(--button-primary-bg); }
533
560
  &:active { background-color: var(--button-primary-bg); }
@@ -576,12 +603,13 @@ function handleClick(): void {
576
603
  justify-content: center;
577
604
  align-items: center;
578
605
  height: 100%;
579
- transition: opacity .25s, transform .25s;
606
+ transition: opacity 0.25s, transform 0.25s;
580
607
  }
581
608
 
582
609
  .icon-svg {
583
610
  fill: currentColor;
584
- transition: fill .25s;
611
+ transition-property: color, fill;
612
+ transition-duration: 0.25s;
585
613
  }
586
614
 
587
615
  .loader {
@@ -592,7 +620,7 @@ function handleClick(): void {
592
620
  height: 32px;
593
621
  color: var(--c-text-1);
594
622
  transform: translate(-50%, -50%);
595
- transition: opacity .25s, transform .25s;
623
+ transition: opacity 0.25s, transform 0.25s;
596
624
  }
597
625
 
598
626
  .loader.fade-enter,
@@ -605,4 +633,220 @@ function handleClick(): void {
605
633
  width: 32px;
606
634
  height: 32px;
607
635
  }
636
+
637
+ /* Deprecated */
638
+ .SButton.primary {
639
+ color: var(--button-primary-text);
640
+ background-color: var(--button-primary-bg);
641
+
642
+ &:hover { background-color: var(--button-primary-bg-hover); }
643
+ &:active { background-color: var(--button-primary-bg-focus); }
644
+
645
+ &.info {
646
+ color: var(--c-text-dark-1);
647
+ background-color: var(--c-info);
648
+
649
+ &:hover { background-color: var(--c-info-dark); }
650
+ &:active { background-color: var(--c-info-darker); }
651
+ }
652
+
653
+ &.success {
654
+ color: var(--c-text-dark-1);
655
+ background-color: var(--c-success);
656
+
657
+ &:hover { background-color: var(--c-success-dark); }
658
+ &:active { background-color: var(--c-success-darker); }
659
+ }
660
+
661
+ &.warning {
662
+ color: var(--c-text-dark-1);
663
+ background-color: var(--c-warning);
664
+
665
+ &:hover { background-color: var(--c-warning-dark); }
666
+ &:active { background-color: var(--c-warning-darker); }
667
+ }
668
+
669
+ &.danger {
670
+ color: var(--c-text-dark-1);
671
+ background-color: var(--c-danger);
672
+
673
+ &:hover { background-color: var(--c-danger-dark); }
674
+ &:active { background-color: var(--c-danger-darker); }
675
+ }
676
+
677
+ &.disabled {
678
+ opacity: .75;
679
+ cursor: not-allowed;
680
+
681
+ &:hover { background-color: var(--button-primary-bg); }
682
+ &:active { background-color: var(--button-primary-bg); }
683
+
684
+ &.info {
685
+ &:hover { background-color: var(--c-info); }
686
+ &:active { background-color: var(--c-info); }
687
+ }
688
+
689
+ &.success {
690
+ &:hover { background-color: var(--c-success); }
691
+ &:active { background-color: var(--c-success); }
692
+ }
693
+
694
+ &.warning {
695
+ &:hover { background-color: var(--c-warning); }
696
+ &:active { background-color: var(--c-warning); }
697
+ }
698
+
699
+ &.danger {
700
+ &:hover { background-color: var(--c-danger); }
701
+ &:active { background-color: var(--c-danger); }
702
+ }
703
+ }
704
+
705
+ & .loader-icon { color: var(--c-text-inverse-1); }
706
+ }
707
+
708
+ .SButton.secondary {
709
+ border-color: var(--button-secondary-border);
710
+ color: var(--button-secondary-text);
711
+
712
+ &:hover { background-color: var(--button-secondary-bg-hover); }
713
+ &:active { background-color: var(--button-secondary-bg-focus); }
714
+
715
+ &.info {
716
+ border-color: var(--c-info);
717
+ color: var(--c-info);
718
+
719
+ &:hover { border-color: var(--c-info-dark); }
720
+ &:active { border-color: var(--c-info-darker); }
721
+ }
722
+
723
+ &.success {
724
+ border-color: var(--c-success);
725
+ color: var(--c-success);
726
+
727
+ &:hover { border-color: var(--c-success-dark); }
728
+ &:active { border-color: var(--c-success-darker); }
729
+ }
730
+
731
+ &.warning {
732
+ border-color: var(--c-warning);
733
+ color: var(--c-warning);
734
+
735
+ &:hover { border-color: var(--c-warning-dark); }
736
+ &:active { border-color: var(--c-warning-darker); }
737
+ }
738
+
739
+ &.danger {
740
+ border-color: var(--c-danger);
741
+ color: var(--c-danger);
742
+
743
+ &:hover { border-color: var(--c-danger-dark); }
744
+ &:active { border-color: var(--c-danger-darker); }
745
+ }
746
+
747
+ &.disabled {
748
+ opacity: .75;
749
+ cursor: not-allowed;
750
+
751
+ &:hover { background-color: var(--button-secondary-bg); }
752
+ &:active { background-color: var(--button-secondary-bg); }
753
+
754
+ &.info {
755
+ &:hover { border-color: var(--c-info); }
756
+ &:active { border-color: var(--c-info); }
757
+ }
758
+
759
+ &.success {
760
+ &:hover { border-color: var(--c-success); }
761
+ &:active { border-color: var(--c-success); }
762
+ }
763
+
764
+ &.warning {
765
+ &:hover { border-color: var(--c-warning); }
766
+ &:active { border-color: var(--c-warning); }
767
+ }
768
+
769
+ &.danger {
770
+ &:hover { border-color: var(--c-danger); }
771
+ &:active { border-color: var(--c-danger); }
772
+ }
773
+ }
774
+
775
+ &.inverse {
776
+ border-color: var(--button-secondary-inverse-border);
777
+ color: var(--button-secondary-inverse-text);
778
+
779
+ &:hover { background-color: var(--button-secondary-inverse-bg-hover); }
780
+ &:active { background-color: var(--button-secondary-inverse-bg-focus); }
781
+ }
782
+ }
783
+
784
+ .SButton.tertiary {
785
+ border-color: transparent;
786
+ color: var(--button-tertiary-text);
787
+ background-color: var(--button-tertiary-bg);
788
+
789
+ &:hover { background-color: var(--button-tertiary-bg-hover); }
790
+ &:active { background-color: var(--button-tertiary-bg-focus); }
791
+
792
+ &.disabled {
793
+ opacity: .75;
794
+ cursor: not-allowed;
795
+
796
+ &:hover { background-color: var(--button-tertiary-bg); }
797
+ &:active { background-color: var(--button-tertiary-bg); }
798
+ }
799
+
800
+ &.inverse {
801
+ border-color: transparent;
802
+ color: var(--button-tertiary-inverse-text);
803
+ background-color: var(--button-tertiary-inverse-bg);
804
+
805
+ &:hover { background-color: var(--button-tertiary-inverse-bg-hover); }
806
+ &:active { background-color: var(--button-tertiary-inverse-bg-focus); }
807
+ }
808
+ }
809
+
810
+
811
+ .SButton.mute {
812
+ color: var(--button-mute-text);
813
+
814
+ &:hover {
815
+ color: var(--button-mute-text-hover);
816
+ background-color: var(--button-mute-bg-hover);
817
+ }
818
+
819
+ &:active {
820
+ color: var(--button-mute-text-hover);
821
+ background-color: var(--button-mute-bg-focus);
822
+ }
823
+
824
+ &.disabled {
825
+ cursor: not-allowed;
826
+
827
+ &:hover {
828
+ color: var(--button-mute-text);
829
+ background-color: transparent;
830
+ }
831
+
832
+ &:active {
833
+ color: var(--button-mute-text);
834
+ background-color: transparent;
835
+ }
836
+ }
837
+
838
+ &.inverse {
839
+ color: var(--button-mute-inverse-text);
840
+
841
+ &:hover {
842
+ color: var(--button-mute-inverse-text-hover);
843
+ background-color: var(--button-mute-inverse-bg-hover);
844
+ }
845
+
846
+ &:active {
847
+ color: var(--button-mute-inverse-text);
848
+ background-color: var(--button-mute-inverse-bg-focus);
849
+ }
850
+ }
851
+ }
608
852
  </style>