@globalbrain/sefirot 2.10.0 → 2.12.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.
- package/lib/components/SAvatar.vue +15 -8
- package/lib/components/SButton.vue +363 -576
- package/lib/components/SInputBase.vue +4 -4
- package/lib/components/SInputCheckboxes.vue +0 -1
- package/lib/components/SInputDate.vue +1 -1
- package/lib/components/SInputDropdown.vue +2 -2
- package/lib/components/SInputNumber.vue +18 -7
- package/lib/components/SInputSelect.vue +92 -106
- package/lib/components/SInputText.vue +26 -1
- package/lib/components/SPill.vue +199 -0
- package/lib/components/SSnackbar.vue +0 -1
- package/lib/components/STable.vue +5 -2
- package/lib/components/STableCellDay.vue +2 -2
- package/lib/components/STableCellPill.vue +13 -45
- package/lib/components/STableCellText.vue +2 -2
- package/lib/composables/Table.ts +1 -1
- package/lib/composables/Utils.ts +9 -0
- package/lib/styles/variables.css +481 -160
- package/lib/support/Day/index.ts +1 -1
- package/lib/support/Time.ts +3 -1
- package/package.json +8 -8
|
@@ -74,7 +74,7 @@ const showError = computed(() => {
|
|
|
74
74
|
|
|
75
75
|
.SInputBase.has-error {
|
|
76
76
|
.label {
|
|
77
|
-
color: var(--
|
|
77
|
+
color: var(--input-error-text-color);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -83,7 +83,7 @@ const showError = computed(() => {
|
|
|
83
83
|
width: 100%;
|
|
84
84
|
line-height: 16px;
|
|
85
85
|
font-weight: 500;
|
|
86
|
-
color: var(--
|
|
86
|
+
color: var(--input-label-color);
|
|
87
87
|
cursor: pointer;
|
|
88
88
|
transition: color 0.25s;
|
|
89
89
|
}
|
|
@@ -107,8 +107,8 @@ const showError = computed(() => {
|
|
|
107
107
|
line-height: 18px;
|
|
108
108
|
font-size: 12px;
|
|
109
109
|
font-weight: 500;
|
|
110
|
-
color: var(--
|
|
111
|
-
transition: opacity .25s, transform .25s;
|
|
110
|
+
color: var(--input-error-text-color);
|
|
111
|
+
transition: opacity 0.25s, transform 0.25s;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
.help-text {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import IconCaretDown from '@iconify-icons/ph/caret-down'
|
|
3
|
-
import IconCaretUp from '@iconify-icons/ph/caret-up'
|
|
2
|
+
import IconCaretDown from '@iconify-icons/ph/caret-down-bold'
|
|
3
|
+
import IconCaretUp from '@iconify-icons/ph/caret-up-bold'
|
|
4
4
|
import xor from 'lodash-es/xor'
|
|
5
5
|
import { computed } from 'vue'
|
|
6
6
|
import { DropdownSectionFilter } from '../composables/Dropdown'
|
|
@@ -17,24 +17,32 @@ const props = defineProps<{
|
|
|
17
17
|
align?: Align
|
|
18
18
|
separator?: boolean
|
|
19
19
|
disabled?: boolean
|
|
20
|
-
|
|
20
|
+
value?: number | null
|
|
21
|
+
modelValue?: number | null
|
|
21
22
|
displayValue?: string | null
|
|
22
23
|
hideError?: boolean
|
|
23
24
|
validation?: Validatable
|
|
24
25
|
}>()
|
|
25
26
|
|
|
26
27
|
const emit = defineEmits<{
|
|
27
|
-
(e: 'update:
|
|
28
|
+
(e: 'update:model-value', value: number | null): void
|
|
29
|
+
(e: 'input', value: number | null): void
|
|
28
30
|
}>()
|
|
29
31
|
|
|
32
|
+
const _value = computed(() => {
|
|
33
|
+
return props.modelValue !== undefined
|
|
34
|
+
? props.modelValue
|
|
35
|
+
: props.value !== undefined ? props.value : null
|
|
36
|
+
})
|
|
37
|
+
|
|
30
38
|
const valueWithSeparator = computed(() => {
|
|
31
|
-
if (isNullish(
|
|
39
|
+
if (isNullish(_value.value)) {
|
|
32
40
|
return null
|
|
33
41
|
}
|
|
34
42
|
|
|
35
|
-
return
|
|
43
|
+
return _value.value >= 100000000000000000000
|
|
36
44
|
? 'The number is too big'
|
|
37
|
-
:
|
|
45
|
+
: _value.value.toLocaleString('en-US', { maximumSignificantDigits: 20 })
|
|
38
46
|
})
|
|
39
47
|
|
|
40
48
|
const displayValue = computed(() => {
|
|
@@ -48,7 +56,9 @@ const displayValue = computed(() => {
|
|
|
48
56
|
})
|
|
49
57
|
|
|
50
58
|
function emitUpdate(value: string | null) {
|
|
51
|
-
|
|
59
|
+
const v = isNullish(value) ? null : Number(value)
|
|
60
|
+
emit('update:model-value', v)
|
|
61
|
+
emit('input', v)
|
|
52
62
|
}
|
|
53
63
|
</script>
|
|
54
64
|
|
|
@@ -66,8 +76,9 @@ function emitUpdate(value: string | null) {
|
|
|
66
76
|
:disabled="disabled"
|
|
67
77
|
:hide-error="hideError"
|
|
68
78
|
:display-value="displayValue"
|
|
69
|
-
:model-value="String(
|
|
79
|
+
:model-value="_value === null ? null : String(_value)"
|
|
70
80
|
:validation="validation"
|
|
71
81
|
@update:model-value="emitUpdate"
|
|
82
|
+
@input="emitUpdate"
|
|
72
83
|
/>
|
|
73
84
|
</template>
|
|
@@ -1,48 +1,59 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import IconCaretDown from '@iconify-icons/ph/caret-down'
|
|
3
|
-
import IconCaretUp from '@iconify-icons/ph/caret-up'
|
|
4
|
-
import {
|
|
2
|
+
import IconCaretDown from '@iconify-icons/ph/caret-down-bold'
|
|
3
|
+
import IconCaretUp from '@iconify-icons/ph/caret-up-bold'
|
|
4
|
+
import { computed, ref } from 'vue'
|
|
5
5
|
import { Validatable } from '../composables/Validation'
|
|
6
6
|
import SIcon from './SIcon.vue'
|
|
7
7
|
import SInputBase from './SInputBase.vue'
|
|
8
8
|
|
|
9
|
-
type Size = 'mini' | 'small' | 'medium'
|
|
9
|
+
export type Size = 'mini' | 'small' | 'medium'
|
|
10
|
+
export type Value = string | number | boolean | null
|
|
10
11
|
|
|
11
|
-
interface Option {
|
|
12
|
+
export interface Option {
|
|
12
13
|
label: string
|
|
13
|
-
value:
|
|
14
|
+
value: string | number | boolean
|
|
14
15
|
disabled?: boolean
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
const props = defineProps
|
|
18
|
-
size
|
|
19
|
-
label
|
|
20
|
-
note
|
|
21
|
-
help
|
|
22
|
-
placeholder
|
|
23
|
-
options:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
modelValue
|
|
28
|
-
validation
|
|
18
|
+
const props = defineProps<{
|
|
19
|
+
size?: Size
|
|
20
|
+
label?: string
|
|
21
|
+
note?: string
|
|
22
|
+
help?: string
|
|
23
|
+
placeholder?: string
|
|
24
|
+
options: Option[]
|
|
25
|
+
nullable?: boolean
|
|
26
|
+
disabled?: boolean
|
|
27
|
+
value?: Value
|
|
28
|
+
modelValue?: Value
|
|
29
|
+
validation?: Validatable
|
|
30
|
+
hideError?: boolean
|
|
31
|
+
}>()
|
|
32
|
+
|
|
33
|
+
const emit = defineEmits<{
|
|
34
|
+
(e: 'update:model-value', value: Value): void
|
|
35
|
+
(e: 'change', value: Value): void
|
|
36
|
+
}>()
|
|
37
|
+
|
|
38
|
+
const _value = computed(() => {
|
|
39
|
+
return props.modelValue !== undefined
|
|
40
|
+
? props.modelValue
|
|
41
|
+
: props.value !== undefined ? props.value : null
|
|
29
42
|
})
|
|
30
43
|
|
|
31
|
-
const emit = defineEmits(['update:modelValue'])
|
|
32
|
-
|
|
33
44
|
const isFocused = ref(false)
|
|
34
45
|
|
|
35
46
|
const classes = computed(() => [
|
|
36
47
|
props.size ?? 'small',
|
|
37
|
-
{ disabled: props.disabled
|
|
48
|
+
{ disabled: props.disabled }
|
|
38
49
|
])
|
|
39
50
|
|
|
40
51
|
const isNotSelected = computed(() => {
|
|
41
|
-
return
|
|
52
|
+
return _value.value === undefined || _value.value === null || _value.value === ''
|
|
42
53
|
})
|
|
43
54
|
|
|
44
55
|
function isSelectedOption(option: Option): boolean {
|
|
45
|
-
return option.value ===
|
|
56
|
+
return option.value === _value.value
|
|
46
57
|
}
|
|
47
58
|
|
|
48
59
|
function focus() {
|
|
@@ -54,11 +65,15 @@ function blur() {
|
|
|
54
65
|
}
|
|
55
66
|
|
|
56
67
|
function emitChange(e: any): void {
|
|
57
|
-
props.
|
|
68
|
+
if (!props.disabled) {
|
|
69
|
+
props.validation?.$touch()
|
|
58
70
|
|
|
59
|
-
|
|
71
|
+
const input = e.target.value
|
|
72
|
+
const value = input === '__null__' ? null : JSON.parse(input).value
|
|
60
73
|
|
|
61
|
-
|
|
74
|
+
emit('update:model-value', value)
|
|
75
|
+
emit('change', value)
|
|
76
|
+
}
|
|
62
77
|
}
|
|
63
78
|
</script>
|
|
64
79
|
|
|
@@ -69,7 +84,7 @@ function emitChange(e: any): void {
|
|
|
69
84
|
:label="label"
|
|
70
85
|
:note="note"
|
|
71
86
|
:help="help"
|
|
72
|
-
:error
|
|
87
|
+
:hide-error="hideError"
|
|
73
88
|
:validation="validation"
|
|
74
89
|
>
|
|
75
90
|
<div class="box" :class="{ focus: isFocused }">
|
|
@@ -81,24 +96,26 @@ function emitChange(e: any): void {
|
|
|
81
96
|
@blur="blur"
|
|
82
97
|
@change="emitChange"
|
|
83
98
|
>
|
|
84
|
-
<
|
|
99
|
+
<option
|
|
85
100
|
v-if="placeholder || nullable"
|
|
86
|
-
|
|
101
|
+
class="option"
|
|
102
|
+
value="__null__"
|
|
87
103
|
:selected="isNotSelected"
|
|
88
104
|
:disabled="!nullable"
|
|
89
105
|
>
|
|
90
106
|
{{ placeholder || 'Please select' }}
|
|
91
|
-
</
|
|
107
|
+
</option>
|
|
92
108
|
|
|
93
|
-
<
|
|
94
|
-
v-for="
|
|
95
|
-
:key="
|
|
109
|
+
<option
|
|
110
|
+
v-for="option in options"
|
|
111
|
+
:key="JSON.stringify(option)"
|
|
96
112
|
:style="{ display: option.disabled ? 'none' : undefined }"
|
|
113
|
+
class="option"
|
|
97
114
|
:value="JSON.stringify(option)"
|
|
98
115
|
:selected="isSelectedOption(option)"
|
|
99
116
|
>
|
|
100
117
|
{{ option.label }}
|
|
101
|
-
</
|
|
118
|
+
</option>
|
|
102
119
|
</select>
|
|
103
120
|
|
|
104
121
|
<div class="icon" role="button">
|
|
@@ -111,125 +128,94 @@ function emitChange(e: any): void {
|
|
|
111
128
|
|
|
112
129
|
<style scoped lang="postcss">
|
|
113
130
|
.SInputSelect.mini {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
131
|
+
line-height: 30px;
|
|
132
|
+
font-size: var(--input-font-size, var(--input-mini-font-size));
|
|
117
133
|
|
|
118
|
-
.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.icon {
|
|
125
|
-
top: 3px;
|
|
126
|
-
right: 8px;
|
|
127
|
-
}
|
|
134
|
+
.box { height: 32px; }
|
|
135
|
+
.select { padding: 0 30px 0 10px; }
|
|
136
|
+
.icon { top: 5px; right: 8px; }
|
|
137
|
+
.icon-svg { width: 12px; height: 12px; }
|
|
128
138
|
}
|
|
129
139
|
|
|
130
140
|
.SInputSelect.small {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.select {
|
|
136
|
-
padding: 7px 30px 5px 12px;
|
|
137
|
-
line-height: 24px;
|
|
138
|
-
font-size: 16px;
|
|
139
|
-
}
|
|
141
|
+
line-height: 38px;
|
|
142
|
+
font-size: var(--input-font-size, var(--input-small-font-size));
|
|
140
143
|
|
|
141
|
-
.
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
144
|
+
.box { height: 40px; }
|
|
145
|
+
.select { padding: 0 30px 0 12px; }
|
|
146
|
+
.icon { top: 7px; right: 10px; }
|
|
147
|
+
.icon-svg { width: 14px; height: 14px; }
|
|
145
148
|
}
|
|
146
149
|
|
|
147
150
|
.SInputSelect.medium {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.select {
|
|
153
|
-
padding: 11px 44px 11px 16px;
|
|
154
|
-
line-height: 24px;
|
|
155
|
-
font-size: 16px;
|
|
156
|
-
}
|
|
151
|
+
line-height: 46px;
|
|
152
|
+
font-size: var(--input-font-size, var(--input-medium-font-size));
|
|
157
153
|
|
|
158
|
-
.
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
154
|
+
.box { height: 48px; }
|
|
155
|
+
.select { padding: 0 44px 0 16px; }
|
|
156
|
+
.icon { top: 11px; right: 12px; }
|
|
157
|
+
.icon-svg { width: 14px; height: 14px; }
|
|
162
158
|
}
|
|
163
159
|
|
|
164
160
|
.SInputSelect.disabled {
|
|
165
161
|
.box {
|
|
166
|
-
|
|
162
|
+
color: var(--input-disabled-value-color);
|
|
163
|
+
background-color: var(--input-disabled-bg-color);
|
|
167
164
|
}
|
|
168
165
|
|
|
169
|
-
.box:hover
|
|
170
|
-
|
|
171
|
-
|
|
166
|
+
.box:hover { border-color: var(--input-border-color); }
|
|
167
|
+
.box.focus { border-color: var(--input-border-color); }
|
|
168
|
+
|
|
169
|
+
.box:hover .select { cursor: not-allowed; }
|
|
172
170
|
}
|
|
173
171
|
|
|
174
172
|
.SInputSelect.has-error {
|
|
175
|
-
.box {
|
|
176
|
-
border-color: var(--c-danger);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.select {
|
|
180
|
-
border-color: var(--c-danger);
|
|
181
|
-
}
|
|
173
|
+
.box { border-color: var(--input-error-border-color); }
|
|
182
174
|
}
|
|
183
175
|
|
|
184
176
|
.box {
|
|
185
177
|
position: relative;
|
|
186
|
-
border: 1px solid var(--input-border);
|
|
187
|
-
border-radius:
|
|
178
|
+
border: 1px solid var(--input-border-color);
|
|
179
|
+
border-radius: 6px;
|
|
188
180
|
width: 100%;
|
|
189
|
-
color: var(--input-
|
|
181
|
+
color: var(--input-value-color);
|
|
182
|
+
background-color: var(--input-bg-color);
|
|
190
183
|
cursor: pointer;
|
|
191
|
-
transition: border-color .25s, background-color .25s;
|
|
184
|
+
transition: border-color 0.25s, background-color 0.25s;
|
|
192
185
|
|
|
193
|
-
&:hover
|
|
194
|
-
&.focus {
|
|
195
|
-
border-color: var(--input-border);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
&:focus:not(:focus-visible) {
|
|
199
|
-
border-color: var(--input-border);
|
|
200
|
-
outline: 0;
|
|
201
|
-
}
|
|
186
|
+
&:hover { border-color: var(--input-hover-border-color); }
|
|
187
|
+
&.focus { border-color: var(--input-focus-border-color); }
|
|
202
188
|
}
|
|
203
189
|
|
|
204
190
|
.select {
|
|
205
191
|
position: relative;
|
|
206
192
|
z-index: 20;
|
|
207
193
|
display: block;
|
|
194
|
+
margin: 0;
|
|
208
195
|
border: 0;
|
|
209
196
|
border-radius: 4px;
|
|
210
197
|
width: 100%;
|
|
198
|
+
line-height: inherit;
|
|
199
|
+
font-size: inherit;
|
|
211
200
|
background-color: transparent;
|
|
212
201
|
cursor: pointer;
|
|
213
202
|
|
|
214
203
|
&.select.is-not-selected {
|
|
215
|
-
color: var(--input-placeholder);
|
|
216
|
-
font-weight: 500;
|
|
204
|
+
color: var(--input-placeholder-color);
|
|
217
205
|
}
|
|
218
206
|
}
|
|
219
207
|
|
|
208
|
+
.option {
|
|
209
|
+
color: initial;
|
|
210
|
+
}
|
|
211
|
+
|
|
220
212
|
.icon {
|
|
221
213
|
position: absolute;
|
|
222
214
|
z-index: 10;
|
|
215
|
+
color: var(--c-text-2);
|
|
223
216
|
cursor: pointer;
|
|
224
217
|
}
|
|
225
218
|
|
|
226
|
-
.icon-svg {
|
|
227
|
-
display: block;
|
|
228
|
-
width: 14px;
|
|
229
|
-
height: 14px;
|
|
230
|
-
color: var(--input-placeholder);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
219
|
.icon-svg.up {
|
|
234
220
|
margin-bottom: -4px;
|
|
235
221
|
}
|
|
@@ -26,6 +26,7 @@ const props = defineProps<{
|
|
|
26
26
|
|
|
27
27
|
const emit = defineEmits<{
|
|
28
28
|
(e: 'update:modelValue', value: string | null): void
|
|
29
|
+
(e: 'input', value: string | null): void
|
|
29
30
|
(e: 'blur', value: string | null): void
|
|
30
31
|
(e: 'enter', value: string | null): void
|
|
31
32
|
}>()
|
|
@@ -35,6 +36,7 @@ const isFocused = ref(false)
|
|
|
35
36
|
|
|
36
37
|
const classes = computed(() => [
|
|
37
38
|
props.size ?? 'small',
|
|
39
|
+
props.align ?? 'left',
|
|
38
40
|
{ disabled: props.disabled }
|
|
39
41
|
])
|
|
40
42
|
|
|
@@ -62,7 +64,9 @@ function emitBlur(e: FocusEvent): void {
|
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
function emitInput(e: Event): void {
|
|
65
|
-
|
|
67
|
+
const v = getValue(e)
|
|
68
|
+
emit('update:modelValue', v)
|
|
69
|
+
emit('input', v)
|
|
66
70
|
}
|
|
67
71
|
|
|
68
72
|
function emitEnter(e: KeyboardEvent): void {
|
|
@@ -237,6 +241,27 @@ function getValue(e: Event | FocusEvent | KeyboardEvent): string | null {
|
|
|
237
241
|
}
|
|
238
242
|
}
|
|
239
243
|
|
|
244
|
+
.SInputText.left {
|
|
245
|
+
.input,
|
|
246
|
+
.display {
|
|
247
|
+
text-align: left;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.SInputText.center {
|
|
252
|
+
.input,
|
|
253
|
+
.display {
|
|
254
|
+
text-align: center;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.SInputText.right {
|
|
259
|
+
.input,
|
|
260
|
+
.display {
|
|
261
|
+
text-align: right;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
240
265
|
.SInputText.has-error {
|
|
241
266
|
.box {
|
|
242
267
|
border-color: var(--c-danger);
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
|
|
4
|
+
export type Size = 'mini' | 'small' | 'medium' | 'large'
|
|
5
|
+
export type Type = 'dimm' | 'fill'
|
|
6
|
+
export type Mode = 'neutral' | 'mute' | 'info' | 'success' | 'warning' | 'danger'
|
|
7
|
+
|
|
8
|
+
const props = defineProps<{
|
|
9
|
+
tag?: string
|
|
10
|
+
size?: Size
|
|
11
|
+
type?: Type
|
|
12
|
+
mode?: Mode
|
|
13
|
+
label?: string
|
|
14
|
+
clickable?: boolean
|
|
15
|
+
}>()
|
|
16
|
+
|
|
17
|
+
const emit = defineEmits<{
|
|
18
|
+
(e: 'click'): void
|
|
19
|
+
}>()
|
|
20
|
+
|
|
21
|
+
const classes = computed(() => [
|
|
22
|
+
props.size ?? 'small',
|
|
23
|
+
props.type ?? 'dimm',
|
|
24
|
+
props.mode ?? 'neutral',
|
|
25
|
+
{ clickable: props.clickable }
|
|
26
|
+
])
|
|
27
|
+
|
|
28
|
+
const computedTag = computed(() => {
|
|
29
|
+
return props.tag
|
|
30
|
+
? props.tag
|
|
31
|
+
: props.clickable ? 'button' : 'span'
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
function onClick() {
|
|
35
|
+
props.clickable && emit('click')
|
|
36
|
+
}
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<component
|
|
41
|
+
:is="computedTag"
|
|
42
|
+
class="SPill"
|
|
43
|
+
:class="classes"
|
|
44
|
+
:role="props.clickable ? 'button' : undefined"
|
|
45
|
+
@click="onClick"
|
|
46
|
+
>
|
|
47
|
+
<span class="label">{{ label }}</span>
|
|
48
|
+
</component>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<style scoped lang="postcss">
|
|
52
|
+
.SPill {
|
|
53
|
+
display: inline-block;
|
|
54
|
+
border: 1px solid transparent;
|
|
55
|
+
letter-spacing: 0.4px;
|
|
56
|
+
font-weight: 600;
|
|
57
|
+
transition: border-color 0.25s, color 0.25s, background-color 0.25s;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.SPill.mini {
|
|
61
|
+
border-radius: 10px;
|
|
62
|
+
padding: 0 8px;
|
|
63
|
+
line-height: 18px;
|
|
64
|
+
font-size: 12px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.SPill.small {
|
|
68
|
+
border-radius: 12px;
|
|
69
|
+
padding: 0 10px;
|
|
70
|
+
line-height: 22px;
|
|
71
|
+
font-size: 12px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.SPill.medium {
|
|
75
|
+
border-radius: 14px;
|
|
76
|
+
padding: 0 12px;
|
|
77
|
+
line-height: 26px;
|
|
78
|
+
font-size: 12px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.SPill.large {
|
|
82
|
+
border-radius: 16px;
|
|
83
|
+
padding: 0 12px;
|
|
84
|
+
line-height: 30px;
|
|
85
|
+
font-size: 13px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.SPill.dimm {
|
|
89
|
+
&.neutral {
|
|
90
|
+
border-color: var(--pill-dimm-neutral-border-color);
|
|
91
|
+
color: var(--pill-dimm-neutral-text-color);
|
|
92
|
+
background-color: var(--pill-dimm-neutral-bg-color);
|
|
93
|
+
|
|
94
|
+
&.clickable:hover { background-color: var(--pill-dimm-neutral-hover-bg-color); }
|
|
95
|
+
&.clickable:active { background-color: var(--pill-dimm-neutral-active-bg-color); }
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&.mute {
|
|
99
|
+
border-color: var(--pill-dimm-mute-border-color);
|
|
100
|
+
color: var(--pill-dimm-mute-text-color);
|
|
101
|
+
background-color: var(--pill-dimm-mute-bg-color);
|
|
102
|
+
|
|
103
|
+
&.clickable:hover { background-color: var(--pill-dimm-mute-hover-bg-color); }
|
|
104
|
+
&.clickable:active { background-color: var(--pill-dimm-mute-active-bg-color); }
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&.info {
|
|
108
|
+
border-color: var(--pill-dimm-info-border-color);
|
|
109
|
+
color: var(--pill-dimm-info-text-color);
|
|
110
|
+
background-color: var(--pill-dimm-info-bg-color);
|
|
111
|
+
|
|
112
|
+
&.clickable:hover { background-color: var(--pill-dimm-info-hover-bg-color); }
|
|
113
|
+
&.clickable:active { background-color: var(--pill-dimm-info-active-bg-color); }
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&.success {
|
|
117
|
+
border-color: var(--pill-dimm-success-border-color);
|
|
118
|
+
color: var(--pill-dimm-success-text-color);
|
|
119
|
+
background-color: var(--pill-dimm-success-bg-color);
|
|
120
|
+
|
|
121
|
+
&.clickable:hover { background-color: var(--pill-dimm-success-hover-bg-color); }
|
|
122
|
+
&.clickable:active { background-color: var(--pill-dimm-success-active-bg-color); }
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&.warning {
|
|
126
|
+
border-color: var(--pill-dimm-warning-border-color);
|
|
127
|
+
color: var(--pill-dimm-warning-text-color);
|
|
128
|
+
background-color: var(--pill-dimm-warning-bg-color);
|
|
129
|
+
|
|
130
|
+
&.clickable:hover { background-color: var(--pill-dimm-warning-hover-bg-color); }
|
|
131
|
+
&.clickable:active { background-color: var(--pill-dimm-warning-active-bg-color); }
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&.danger {
|
|
135
|
+
border-color: var(--pill-dimm-danger-border-color);
|
|
136
|
+
color: var(--pill-dimm-danger-text-color);
|
|
137
|
+
background-color: var(--pill-dimm-danger-bg-color);
|
|
138
|
+
|
|
139
|
+
&.clickable:hover { background-color: var(--pill-dimm-danger-hover-bg-color); }
|
|
140
|
+
&.clickable:active { background-color: var(--pill-dimm-danger-active-bg-color); }
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.SPill.fill {
|
|
145
|
+
&.neutral {
|
|
146
|
+
border-color: var(--pill-fill-neutral-border-color);
|
|
147
|
+
color: var(--pill-fill-neutral-text-color);
|
|
148
|
+
background-color: var(--pill-fill-neutral-bg-color);
|
|
149
|
+
|
|
150
|
+
&.clickable:hover { background-color: var(--pill-fill-neutral-hover-bg-color); }
|
|
151
|
+
&.clickable:active { background-color: var(--pill-fill-neutral-active-bg-color); }
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&.mute {
|
|
155
|
+
border-color: var(--pill-fill-mute-border-color);
|
|
156
|
+
color: var(--pill-fill-mute-text-color);
|
|
157
|
+
background-color: var(--pill-fill-mute-bg-color);
|
|
158
|
+
|
|
159
|
+
&.clickable:hover { background-color: var(--pill-fill-mute-hover-bg-color); }
|
|
160
|
+
&.clickable:active { background-color: var(--pill-fill-mute-active-bg-color); }
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&.info {
|
|
164
|
+
border-color: var(--pill-fill-info-border-color);
|
|
165
|
+
color: var(--pill-fill-info-text-color);
|
|
166
|
+
background-color: var(--pill-fill-info-bg-color);
|
|
167
|
+
|
|
168
|
+
&.clickable:hover { background-color: var(--pill-fill-info-hover-bg-color); }
|
|
169
|
+
&.clickable:active { background-color: var(--pill-fill-info-active-bg-color); }
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&.success {
|
|
173
|
+
border-color: var(--pill-fill-success-border-color);
|
|
174
|
+
color: var(--pill-fill-success-text-color);
|
|
175
|
+
background-color: var(--pill-fill-success-bg-color);
|
|
176
|
+
|
|
177
|
+
&.clickable:hover { background-color: var(--pill-fill-success-hover-bg-color); }
|
|
178
|
+
&.clickable:active { background-color: var(--pill-fill-success-active-bg-color); }
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&.warning {
|
|
182
|
+
border-color: var(--pill-fill-warning-border-color);
|
|
183
|
+
color: var(--pill-fill-warning-text-color);
|
|
184
|
+
background-color: var(--pill-fill-warning-bg-color);
|
|
185
|
+
|
|
186
|
+
&.clickable:hover { background-color: var(--pill-fill-warning-hover-bg-color); }
|
|
187
|
+
&.clickable:active { background-color: var(--pill-fill-warning-active-bg-color); }
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&.danger {
|
|
191
|
+
border-color: var(--pill-fill-danger-border-color);
|
|
192
|
+
color: var(--pill-fill-danger-text-color);
|
|
193
|
+
background-color: var(--pill-fill-danger-bg-color);
|
|
194
|
+
|
|
195
|
+
&.clickable:hover { background-color: var(--pill-fill-danger-hover-bg-color); }
|
|
196
|
+
&.clickable:active { background-color: var(--pill-fill-danger-active-bg-color); }
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
</style>
|