@globalbrain/sefirot 0.72.0 → 2.0.0-draft.4
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/CHANGELOG.md +8 -808
- package/README.md +1 -1
- package/lib/assets/styles/bootstrap.css +1 -2
- package/lib/assets/styles/variables.css +14 -47
- package/lib/components/SAvatar.vue +9 -18
- package/lib/components/SButton.vue +35 -48
- package/lib/components/SDialog.vue +16 -34
- package/lib/components/SDropdown.vue +36 -55
- package/lib/components/SDropdownItem.vue +27 -39
- package/lib/components/SDropdownItemText.vue +4 -9
- package/lib/components/SDropdownItemUser.vue +4 -12
- package/lib/components/SInputBase.vue +33 -45
- package/lib/components/SInputCheckbox.vue +17 -37
- package/lib/components/SInputDropdown.vue +109 -171
- package/lib/components/SInputDropdownItem.vue +26 -32
- package/lib/components/SInputDropdownItemText.vue +6 -11
- package/lib/components/SInputDropdownItemTextTag.vue +10 -17
- package/lib/components/SInputDropdownItemUser.vue +5 -13
- package/lib/components/SInputDropdownItemUserTag.vue +9 -16
- package/lib/components/SInputFile.vue +38 -53
- package/lib/components/SInputHMS.vue +91 -114
- package/lib/components/SInputNumber.vue +27 -106
- package/lib/components/SInputRadio.vue +21 -34
- package/lib/components/SInputRadios.vue +36 -46
- package/lib/components/SInputText.vue +72 -628
- package/lib/components/SInputTextarea.vue +54 -113
- package/lib/components/SInputYMD.vue +94 -105
- package/lib/components/SLink.vue +16 -52
- package/lib/components/SModal.vue +39 -98
- package/lib/components/SPortalModals.vue +37 -54
- package/lib/components/SPortalSnackbars.vue +9 -24
- package/lib/components/SSheet.vue +73 -28
- package/lib/components/SSheetFooter.vue +5 -3
- package/lib/components/SSheetFooterAction.vue +10 -15
- package/lib/components/SSheetFooterActions.vue +2 -4
- package/lib/components/SSheetMedium.vue +14 -22
- package/lib/components/SSheetTitle.vue +20 -0
- package/lib/components/SSnackbar.vue +18 -28
- package/lib/composables/Dialog.ts +9 -17
- package/lib/composables/Dropdown.ts +2 -2
- package/lib/composables/{Menu.ts → Flyout.ts} +11 -4
- package/lib/composables/Form.ts +42 -44
- package/lib/composables/Modal.ts +11 -19
- package/lib/composables/Snackbar.ts +18 -0
- package/lib/composables/Validation.ts +28 -0
- package/lib/mixins/Sheet.ts +5 -7
- package/lib/store/Sefirot.ts +8 -13
- package/lib/store/dialog/index.ts +20 -10
- package/lib/store/modal/index.ts +11 -18
- package/lib/store/snackbars/index.ts +3 -4
- package/lib/support/{Util.ts → Utils.ts} +0 -2
- package/lib/types/Utils.ts +0 -7
- package/lib/types/vue-shims.d.ts +7 -0
- package/lib/validation/rules/checked.ts +6 -10
- package/lib/validation/rules/fileExtension.ts +9 -9
- package/lib/validation/rules/hms.ts +9 -9
- package/lib/validation/rules/index.ts +10 -74
- package/lib/validation/rules/maxLength.ts +10 -9
- package/lib/validation/rules/minLength.ts +12 -0
- package/lib/validation/rules/required.ts +2 -10
- package/lib/validation/rules/requiredHms.ts +11 -0
- package/lib/validation/rules/requiredIf.ts +3 -11
- package/lib/validation/rules/requiredYmd.ts +11 -0
- package/lib/validation/rules/ymd.ts +11 -0
- package/lib/validation/validators/checked.ts +1 -1
- package/lib/validation/validators/fileExtension.ts +1 -1
- package/lib/validation/validators/hms.ts +5 -5
- package/lib/validation/validators/requiredHms.ts +17 -0
- package/lib/validation/validators/requiredYmd.ts +7 -0
- package/lib/validation/validators/ymd.ts +41 -0
- package/package.json +45 -50
- package/lib/components/SAction.vue +0 -37
- package/lib/components/SActionAvatar.vue +0 -25
- package/lib/components/SActionButton.vue +0 -40
- package/lib/components/SActionPill.vue +0 -35
- package/lib/components/SActionSwitch.vue +0 -37
- package/lib/components/SAlert.vue +0 -145
- package/lib/components/SButtonGroup.vue +0 -160
- package/lib/components/SCard.vue +0 -111
- package/lib/components/SCardFooter.vue +0 -74
- package/lib/components/SCardHeader.vue +0 -213
- package/lib/components/SGrid.vue +0 -237
- package/lib/components/SGridActionLink.vue +0 -53
- package/lib/components/SGridActionMulti.vue +0 -139
- package/lib/components/SGridActionSingle.vue +0 -64
- package/lib/components/SHeader.vue +0 -180
- package/lib/components/SInputCheckboxes.vue +0 -87
- package/lib/components/SInputDate.vue +0 -192
- package/lib/components/SInputDay.vue +0 -87
- package/lib/components/SInputMonth.vue +0 -86
- package/lib/components/SInputSelect.vue +0 -298
- package/lib/components/SInputSwitch.vue +0 -212
- package/lib/components/SInputSwitches.vue +0 -108
- package/lib/components/SInputTime.vue +0 -255
- package/lib/components/SInputYear.vue +0 -60
- package/lib/components/SMarkdown.vue +0 -56
- package/lib/components/SPlaceholderBlank.vue +0 -113
- package/lib/components/SPlaceholderImage.vue +0 -83
- package/lib/components/SPortalScreens.vue +0 -62
- package/lib/components/SProgressBar.vue +0 -89
- package/lib/components/SResponsive.vue +0 -46
- package/lib/components/SScreen.vue +0 -81
- package/lib/components/SSheetHeader.vue +0 -75
- package/lib/components/SSheetHeaderTitle.vue +0 -17
- package/lib/components/SStep.vue +0 -107
- package/lib/components/SSteps.vue +0 -75
- package/lib/components/STag.vue +0 -67
- package/lib/components/STooltip.vue +0 -134
- package/lib/components/SWindow.vue +0 -158
- package/lib/components/icons/SIconCopy.vue +0 -6
- package/lib/composables/Action.ts +0 -141
- package/lib/composables/Alert.ts +0 -50
- package/lib/composables/Card.ts +0 -46
- package/lib/composables/FormValidation.ts +0 -150
- package/lib/composables/Header.ts +0 -72
- package/lib/composables/InputDropdown.ts +0 -6
- package/lib/composables/Markdown.ts +0 -138
- package/lib/composables/Router.ts +0 -20
- package/lib/composables/Step.ts +0 -7
- package/lib/composables/Store.ts +0 -9
- package/lib/composables/Tag.ts +0 -32
- package/lib/composables/Tooltip.ts +0 -91
- package/lib/composables/Utils.ts +0 -115
- package/lib/composables/markdown/LinkPlugin.ts +0 -45
- package/lib/compositions/useForm.ts +0 -17
- package/lib/compositions/useResizeObserver.ts +0 -25
- package/lib/compositions/useTime.ts +0 -26
- package/lib/store/alert/index.ts +0 -32
- package/lib/store/screen/index.ts +0 -46
- package/lib/types/v-calendar.d.ts +0 -5
- package/lib/validation/Validation.ts +0 -151
- package/lib/validation/rules/day.ts +0 -11
- package/lib/validation/rules/email.ts +0 -11
- package/lib/validation/rules/every.ts +0 -38
- package/lib/validation/rules/include.ts +0 -11
- package/lib/validation/rules/includeSome.ts +0 -11
- package/lib/validation/rules/integer.ts +0 -11
- package/lib/validation/rules/maxValue.ts +0 -11
- package/lib/validation/rules/minValue.ts +0 -11
- package/lib/validation/rules/month.ts +0 -11
- package/lib/validation/rules/not.ts +0 -10
- package/lib/validation/rules/regex.ts +0 -11
- package/lib/validation/rules/requiredHMS.ts +0 -11
- package/lib/validation/rules/requiredMonthDate.ts +0 -11
- package/lib/validation/rules/requiredYearMonth.ts +0 -11
- package/lib/validation/rules/requiredYearMonthDate.ts +0 -11
- package/lib/validation/rules/rule.ts +0 -5
- package/lib/validation/rules/sameAs.ts +0 -11
- package/lib/validation/rules/url.ts +0 -11
- package/lib/validation/rules/validateIf.ts +0 -27
- package/lib/validation/rules/year.ts +0 -11
- package/lib/validation/rules/yearMonth.ts +0 -11
- package/lib/validation/rules/yearMonthDate.ts +0 -11
- package/lib/validation/validators/day.ts +0 -29
- package/lib/validation/validators/email.ts +0 -5
- package/lib/validation/validators/include.ts +0 -5
- package/lib/validation/validators/includeSome.ts +0 -5
- package/lib/validation/validators/index.ts +0 -51
- package/lib/validation/validators/integer.ts +0 -6
- package/lib/validation/validators/maxLength.ts +0 -3
- package/lib/validation/validators/maxValue.ts +0 -3
- package/lib/validation/validators/minValue.ts +0 -3
- package/lib/validation/validators/month.ts +0 -3
- package/lib/validation/validators/monthDate.ts +0 -20
- package/lib/validation/validators/regex.ts +0 -3
- package/lib/validation/validators/required.ts +0 -27
- package/lib/validation/validators/requiredHMS.ts +0 -17
- package/lib/validation/validators/requiredMonthDate.ts +0 -8
- package/lib/validation/validators/requiredYearMonth.ts +0 -8
- package/lib/validation/validators/requiredYearMonthDate.ts +0 -9
- package/lib/validation/validators/sameAs.ts +0 -5
- package/lib/validation/validators/url.ts +0 -5
- package/lib/validation/validators/year.ts +0 -3
- package/lib/validation/validators/yearMonth.ts +0 -20
- package/lib/validation/validators/yearMonthDate.ts +0 -21
|
@@ -2,536 +2,109 @@
|
|
|
2
2
|
<SInputBase
|
|
3
3
|
class="SInputText"
|
|
4
4
|
:class="classes"
|
|
5
|
-
:name="name"
|
|
6
5
|
:label="label"
|
|
7
6
|
:note="note"
|
|
8
7
|
:help="help"
|
|
9
8
|
:error-message="errorMessage"
|
|
10
9
|
:validation="validation"
|
|
11
10
|
>
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<div v-if="action.type === 'select'" class="action-select">
|
|
23
|
-
<SIconChevronUp class="action-select-icon up" />
|
|
24
|
-
<SIconChevronDown class="action-select-icon down" />
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
|
|
28
|
-
<div class="box">
|
|
29
|
-
<input
|
|
30
|
-
:id="name"
|
|
31
|
-
ref="inputEl"
|
|
32
|
-
class="input-area"
|
|
33
|
-
:class="inputAreaClasses"
|
|
34
|
-
:style="inputStyles"
|
|
35
|
-
:type="type"
|
|
36
|
-
:step="step"
|
|
37
|
-
:disabled="disabled"
|
|
38
|
-
:value="value"
|
|
39
|
-
:placeholder="placeholder"
|
|
40
|
-
@input="emitInput"
|
|
41
|
-
@blur="emitBlur"
|
|
42
|
-
@keypress.enter="emitEnter"
|
|
43
|
-
@keyup.down="$emit('down')"
|
|
44
|
-
@keyup.escape="$emit('escape')"
|
|
45
|
-
>
|
|
46
|
-
|
|
47
|
-
<div
|
|
48
|
-
class="input"
|
|
49
|
-
:class="inputClasses"
|
|
50
|
-
:style="inputStyles"
|
|
51
|
-
>
|
|
52
|
-
<span v-if="displayValue !== null || value !== null" class="value">
|
|
53
|
-
{{ displayValue !== null ? displayValue : value }}
|
|
54
|
-
</span>
|
|
55
|
-
</div>
|
|
56
|
-
|
|
57
|
-
<div v-if="icon" class="icon" role="button" @click="focus">
|
|
58
|
-
<component :is="icon" class="icon-svg" />
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
<p v-if="text" ref="textEl" class="text" role="button" @click="focus">
|
|
62
|
-
{{ text }}
|
|
63
|
-
</p>
|
|
64
|
-
|
|
65
|
-
<p v-if="textAfter" ref="textAfterEl" class="text-after" role="button" @click="focus">
|
|
66
|
-
{{ textAfter }}
|
|
67
|
-
</p>
|
|
68
|
-
|
|
69
|
-
<button v-if="isClearable" class="clear" :class="{ show: showClearButton }" @click="emitClear">
|
|
70
|
-
<SIconX class="clear-svg" />
|
|
71
|
-
</button>
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
|
|
75
|
-
<template #before-help>
|
|
76
|
-
<slot name="before-help" />
|
|
77
|
-
</template>
|
|
11
|
+
<input
|
|
12
|
+
class="input"
|
|
13
|
+
:type="type"
|
|
14
|
+
:placeholder="placeholder"
|
|
15
|
+
:disabled="disabled"
|
|
16
|
+
:value="modelValue"
|
|
17
|
+
@input="emitInput"
|
|
18
|
+
@blur="emitBlur"
|
|
19
|
+
@keypress.enter="emitEnter"
|
|
20
|
+
>
|
|
78
21
|
</SInputBase>
|
|
79
22
|
</template>
|
|
80
23
|
|
|
81
|
-
<script lang="ts">
|
|
82
|
-
import {
|
|
83
|
-
|
|
84
|
-
defineComponent,
|
|
85
|
-
ref,
|
|
86
|
-
reactive,
|
|
87
|
-
computed,
|
|
88
|
-
watch,
|
|
89
|
-
onMounted
|
|
90
|
-
} from '@vue/composition-api'
|
|
91
|
-
import { Validation } from '../validation/Validation'
|
|
92
|
-
import { SyntheticInputEvent } from '../types/Utils'
|
|
93
|
-
import SIconChevronUp from './icons/SIconChevronUp.vue'
|
|
94
|
-
import SIconChevronDown from './icons/SIconChevronDown.vue'
|
|
95
|
-
import SIconX from './icons/SIconX.vue'
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
import { PropType, computed } from 'vue'
|
|
26
|
+
import { Validation, Validatable } from '../composables/Validation'
|
|
96
27
|
import SInputBase from './SInputBase.vue'
|
|
97
28
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
type
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
components: {
|
|
113
|
-
SIconChevronUp,
|
|
114
|
-
SIconChevronDown,
|
|
115
|
-
SIconX,
|
|
116
|
-
SInputBase
|
|
117
|
-
},
|
|
118
|
-
|
|
119
|
-
props: {
|
|
120
|
-
size: { type: String as PropType<Size>, default: 'small' },
|
|
121
|
-
mode: { type: String as PropType<Mode>, default: 'outlined' },
|
|
122
|
-
name: { type: String, default: null },
|
|
123
|
-
label: { type: String, default: null },
|
|
124
|
-
note: { type: String, default: null },
|
|
125
|
-
help: { type: String, default: null },
|
|
126
|
-
type: { type: String, default: 'text' },
|
|
127
|
-
placeholder: { type: String, default: null },
|
|
128
|
-
action: { type: Object as PropType<Action>, default: null },
|
|
129
|
-
icon: { type: Object, default: null },
|
|
130
|
-
align: { type: String as PropType<Align>, default: null },
|
|
131
|
-
text: { type: String, default: null },
|
|
132
|
-
textAfter: { type: String, default: null },
|
|
133
|
-
color: { type: Function as PropType<ColorCallback>, default: null },
|
|
134
|
-
step: { type: Number, default: 1 },
|
|
135
|
-
clearable: { type: Boolean, default: false },
|
|
136
|
-
disabled: { type: Boolean, default: false },
|
|
137
|
-
errorMessage: { type: Boolean, default: true },
|
|
138
|
-
displayValue: { type: String, default: null },
|
|
139
|
-
value: { type: [String, Number], default: null },
|
|
140
|
-
validation: { type: Object as PropType<Validation>, default: null }
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
setup(props, { emit }) {
|
|
144
|
-
const inputEl = ref<HTMLElement | null>(null)
|
|
145
|
-
const textEl = ref<HTMLElement | null>(null)
|
|
146
|
-
const textAfterEl = ref<HTMLElement | null>(null)
|
|
147
|
-
const color = computed(() => {
|
|
148
|
-
return (props.value !== null && props.color) && props.color(props.value)
|
|
149
|
-
})
|
|
150
|
-
|
|
151
|
-
const classes = computed(() => [
|
|
152
|
-
props.size,
|
|
153
|
-
props.mode,
|
|
154
|
-
{ disabled: props.disabled }
|
|
155
|
-
])
|
|
156
|
-
|
|
157
|
-
const inputStyles = reactive({
|
|
158
|
-
textAlign: props.align,
|
|
159
|
-
paddingRight: '',
|
|
160
|
-
paddingLeft: ''
|
|
161
|
-
})
|
|
162
|
-
|
|
163
|
-
const isClearable = computed(() => props.clearable && !props.disabled)
|
|
164
|
-
|
|
165
|
-
const inputClasses = computed(() => [
|
|
166
|
-
color.value,
|
|
167
|
-
{ 'has-icon': props.icon },
|
|
168
|
-
{ 'is-clearable': isClearable.value }
|
|
169
|
-
])
|
|
170
|
-
|
|
171
|
-
const inputAreaClasses = computed(() => ({
|
|
172
|
-
'has-icon': props.icon,
|
|
173
|
-
'is-clearable': isClearable.value
|
|
174
|
-
}))
|
|
175
|
-
|
|
176
|
-
const showClearButton = computed(() => {
|
|
177
|
-
return props.value !== null && props.value !== ''
|
|
178
|
-
})
|
|
179
|
-
|
|
180
|
-
onMounted(() => {
|
|
181
|
-
setTextPadding()
|
|
182
|
-
watch(() => props.text, () => setTextPadding())
|
|
183
|
-
watch(() => props.textAfter, () => setTextPadding())
|
|
184
|
-
})
|
|
185
|
-
|
|
186
|
-
function focus() {
|
|
187
|
-
inputEl.value && inputEl.value.focus()
|
|
188
|
-
}
|
|
29
|
+
type Size = 'mini' | 'small' | 'medium'
|
|
30
|
+
|
|
31
|
+
const props = defineProps({
|
|
32
|
+
size: { type: String as PropType<Size>, default: 'small' },
|
|
33
|
+
label: { type: String, default: null },
|
|
34
|
+
note: { type: String, default: null },
|
|
35
|
+
help: { type: String, default: null },
|
|
36
|
+
type: { type: String, default: 'text' },
|
|
37
|
+
placeholder: { type: String, default: null },
|
|
38
|
+
disabled: { type: Boolean, default: false },
|
|
39
|
+
errorMessage: { type: Boolean, default: true },
|
|
40
|
+
modelValue: { type: [String, Number] as PropType<string | number | null>, default: null },
|
|
41
|
+
validation: { type: Object as PropType<Validatable>, default: null }
|
|
42
|
+
})
|
|
189
43
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
44
|
+
const emit = defineEmits<{
|
|
45
|
+
(e: 'update:modelValue', value: string | null): void
|
|
46
|
+
(e: 'blur', value: string | null): void
|
|
47
|
+
(e: 'enter', value: string | null): void
|
|
48
|
+
}>()
|
|
193
49
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
50
|
+
const classes = computed(() => [
|
|
51
|
+
props.size,
|
|
52
|
+
{ disabled: props.disabled }
|
|
53
|
+
])
|
|
197
54
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
55
|
+
function emitInput(e: Event): void {
|
|
56
|
+
emit('update:modelValue', getValue(e))
|
|
57
|
+
}
|
|
202
58
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
emit('enter', getValue(e.target.value))
|
|
206
|
-
}
|
|
59
|
+
function emitBlur(e: FocusEvent): void {
|
|
60
|
+
const value = getValue(e)
|
|
207
61
|
|
|
208
|
-
|
|
209
|
-
if (props.type !== 'number') {
|
|
210
|
-
return value
|
|
211
|
-
}
|
|
62
|
+
props.validation?.$touch()
|
|
212
63
|
|
|
213
|
-
|
|
214
|
-
|
|
64
|
+
emit('update:modelValue', value)
|
|
65
|
+
emit('blur', value)
|
|
66
|
+
}
|
|
215
67
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
}
|
|
68
|
+
function emitEnter(e: KeyboardEvent): void {
|
|
69
|
+
const value = getValue(e)
|
|
219
70
|
|
|
220
|
-
|
|
221
|
-
textEl.value && setLeadingTextPadding()
|
|
222
|
-
textAfterEl.value && setTrailingTextPadding()
|
|
223
|
-
}
|
|
71
|
+
props.validation?.$touch()
|
|
224
72
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
73
|
+
emit('update:modelValue', value)
|
|
74
|
+
emit('enter', value)
|
|
75
|
+
}
|
|
228
76
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
77
|
+
function getValue(e: Event | FocusEvent | KeyboardEvent): string | null {
|
|
78
|
+
const value = (e.target as HTMLInputElement).value
|
|
232
79
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
textEl,
|
|
236
|
-
textAfterEl,
|
|
237
|
-
classes,
|
|
238
|
-
inputStyles,
|
|
239
|
-
inputClasses,
|
|
240
|
-
inputAreaClasses,
|
|
241
|
-
isClearable,
|
|
242
|
-
showClearButton,
|
|
243
|
-
focus,
|
|
244
|
-
blur,
|
|
245
|
-
emitInput,
|
|
246
|
-
emitBlur,
|
|
247
|
-
emitEnter,
|
|
248
|
-
emitClear
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
})
|
|
80
|
+
return value === '' ? null : value
|
|
81
|
+
}
|
|
252
82
|
</script>
|
|
253
83
|
|
|
254
84
|
<style lang="postcss" scoped>
|
|
255
|
-
@import "@/assets/styles/variables";
|
|
256
|
-
|
|
257
85
|
.SInputText.mini {
|
|
258
|
-
.
|
|
259
|
-
padding: 3px 10px;
|
|
260
|
-
line-height: 24px;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
.action-icon {
|
|
264
|
-
width: 14px;
|
|
265
|
-
height: 14px;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.action-icon + .action-text,
|
|
269
|
-
.action-icon + .action-select,
|
|
270
|
-
.action-text + .action-select {
|
|
271
|
-
margin-left: 6px;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
.action-text {
|
|
275
|
-
font-size: 14px;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
.input,
|
|
279
|
-
.input-area {
|
|
86
|
+
.input {
|
|
280
87
|
padding: 3px 12px;
|
|
281
|
-
width: 100%;
|
|
282
|
-
line-height: 24px;
|
|
283
|
-
min-height: 32px;
|
|
284
88
|
font-size: 14px;
|
|
285
|
-
|
|
286
|
-
&.has-icon {
|
|
287
|
-
padding-left: 30px;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
&.is-clearable {
|
|
291
|
-
padding-right: 40px;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
.icon {
|
|
296
|
-
top: 9px;
|
|
297
|
-
left: 10px;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
.icon-svg {
|
|
301
|
-
width: 14px;
|
|
302
|
-
height: 14px;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.text {
|
|
306
|
-
padding: 0 8px 0 12px;
|
|
307
|
-
line-height: 32px;
|
|
308
|
-
font-size: 14px;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
.text-after {
|
|
312
|
-
padding: 0 12px 0 8px;
|
|
313
|
-
line-height: 32px;
|
|
314
|
-
font-size: 14px;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
.clear {
|
|
318
|
-
top: 0;
|
|
319
|
-
right: 0;
|
|
320
|
-
width: 32px;
|
|
321
|
-
height: 32px;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
.clear-svg {
|
|
325
|
-
width: 16px;
|
|
326
|
-
height: 16px;
|
|
327
89
|
}
|
|
328
90
|
}
|
|
329
91
|
|
|
330
92
|
.SInputText.small {
|
|
331
|
-
.
|
|
332
|
-
padding: 3px 10px;
|
|
333
|
-
line-height: 24px;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
.action-icon {
|
|
337
|
-
width: 14px;
|
|
338
|
-
height: 14px;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
.action-icon + .action-text,
|
|
342
|
-
.action-icon + .action-select,
|
|
343
|
-
.action-text + .action-select {
|
|
344
|
-
margin-left: 6px;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
.action-text {
|
|
348
|
-
font-size: 14px;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
.input,
|
|
352
|
-
.input-area {
|
|
93
|
+
.input {
|
|
353
94
|
padding: 7px 12px;
|
|
354
|
-
width: 100%;
|
|
355
|
-
line-height: 24px;
|
|
356
|
-
min-height: 40px;
|
|
357
95
|
font-size: 16px;
|
|
358
|
-
|
|
359
|
-
&.has-icon {
|
|
360
|
-
padding-left: 36px;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
&.is-clearable {
|
|
364
|
-
padding-right: 40px;
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
.icon {
|
|
369
|
-
top: 12px;
|
|
370
|
-
left: 12px;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
.icon-svg {
|
|
374
|
-
width: 15px;
|
|
375
|
-
height: 15px;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
.text {
|
|
379
|
-
padding: 0 8px 0 12px;
|
|
380
|
-
line-height: 40px;
|
|
381
|
-
font-size: 16px;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
.text-after {
|
|
385
|
-
padding: 0 12px 0 8px;
|
|
386
|
-
line-height: 32px;
|
|
387
|
-
font-size: 14px;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
.clear {
|
|
391
|
-
top: 0;
|
|
392
|
-
right: 0;
|
|
393
|
-
width: 40px;
|
|
394
|
-
height: 40px;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
.clear-svg {
|
|
398
|
-
width: 16px;
|
|
399
|
-
height: 16px;
|
|
400
96
|
}
|
|
401
97
|
}
|
|
402
98
|
|
|
403
99
|
.SInputText.medium {
|
|
404
|
-
.
|
|
405
|
-
padding: 11px 12px;
|
|
406
|
-
line-height: 24px;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
.action-icon {
|
|
410
|
-
width: 16px;
|
|
411
|
-
height: 16px;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
.action-icon + .action-text,
|
|
415
|
-
.action-icon + .action-select,
|
|
416
|
-
.action-text + .action-select {
|
|
417
|
-
margin-left: 8px;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
.action-text {
|
|
421
|
-
font-size: 14px;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
.input,
|
|
425
|
-
.input-area {
|
|
100
|
+
.input {
|
|
426
101
|
padding: 11px 16px;
|
|
427
|
-
width: 100%;
|
|
428
|
-
min-height: 48px;
|
|
429
|
-
line-height: 24px;
|
|
430
102
|
font-size: 16px;
|
|
431
|
-
|
|
432
|
-
&.has-icon {
|
|
433
|
-
padding-left: 36px;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
&.is-clearable {
|
|
437
|
-
padding-right: 40px;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
.icon {
|
|
442
|
-
top: 16px;
|
|
443
|
-
left: 12px;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
.icon-svg {
|
|
447
|
-
width: 16px;
|
|
448
|
-
height: 16px;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
.text {
|
|
452
|
-
padding: 0 8px 0 16px;
|
|
453
|
-
line-height: 48px;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
.text-after {
|
|
457
|
-
padding: 0 16px 0 8px;
|
|
458
|
-
line-height: 48px;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
.clear {
|
|
462
|
-
top: 4px;
|
|
463
|
-
right: 4px;
|
|
464
|
-
width: 40px;
|
|
465
|
-
height: 40px;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
.clear-svg {
|
|
469
|
-
width: 16px;
|
|
470
|
-
height: 16px;
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
.SInputText.filled {
|
|
475
|
-
.action {
|
|
476
|
-
background-color: var(--input-action-filled-bg);
|
|
477
|
-
|
|
478
|
-
&.clickable:hover { background-color: var(--input-action-filled-bg-hover); }
|
|
479
|
-
&.clickable:active { background-color: var(--input-action-filled-bg-focus); }
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
.input {
|
|
483
|
-
background-color: var(--input-filled-bg);
|
|
484
|
-
|
|
485
|
-
&:focus {
|
|
486
|
-
border-color: var(--input-focus-border);
|
|
487
|
-
background-color: var(--input-filled-bg-focus);
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
.input-area:focus + .input {
|
|
492
|
-
border-color: var(--input-focus-border);
|
|
493
|
-
background-color: var(--input-filled-bg-focus);
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
&.disabled .input {
|
|
497
|
-
background-color: var(--input-filled-bg-disabled);
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
.SInputText.outlined {
|
|
502
|
-
.action {
|
|
503
|
-
border-color: var(--input-action-outlined-border);
|
|
504
|
-
background-color: var(--input-action-outlined-bg);
|
|
505
|
-
|
|
506
|
-
&.clickable:hover { background-color: var(--input-action-outlined-bg-hover); }
|
|
507
|
-
&.clickable:active { background-color: var(--input-action-outlined-bg-focus); }
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
.input {
|
|
511
|
-
border-color: var(--input-outlined-border);
|
|
512
|
-
|
|
513
|
-
&:focus {
|
|
514
|
-
border-color: var(--input-focus-border);
|
|
515
|
-
background-color: var(--input-focus-bg);
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
.input-area:focus + .input {
|
|
520
|
-
border-color: var(--input-focus-border);
|
|
521
|
-
background-color: var(--input-filled-bg-focus);
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
&.disabled .box:hover .input {
|
|
525
|
-
border-color: var(--input-outlined-border);
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
&.disabled .input {
|
|
529
|
-
background-color: var(--input-outlined-bg-disabled);
|
|
530
103
|
}
|
|
531
104
|
}
|
|
532
105
|
|
|
533
106
|
.SInputText.disabled {
|
|
534
|
-
.
|
|
107
|
+
.input {
|
|
535
108
|
cursor: not-allowed;
|
|
536
109
|
border-color: transparent;
|
|
537
110
|
}
|
|
@@ -548,157 +121,28 @@ export default defineComponent({
|
|
|
548
121
|
}
|
|
549
122
|
}
|
|
550
123
|
|
|
551
|
-
.container {
|
|
552
|
-
display: flex;
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
.action {
|
|
556
|
-
display: flex;
|
|
557
|
-
align-items: center;
|
|
558
|
-
flex-shrink: 0;
|
|
559
|
-
border: 1px solid transparent;
|
|
560
|
-
border-right: 0;
|
|
561
|
-
border-radius: 4px 0 0 4px;
|
|
562
|
-
color: var(--c-text-2);
|
|
563
|
-
transition: background-color .25s;
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
.action.clickable {
|
|
567
|
-
color: var(--c-text-1);
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
.action.clickable:active {
|
|
571
|
-
transition: background-color .1s;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
.action + .box .input {
|
|
575
|
-
border-radius: 0 4px 4px 0;
|
|
576
|
-
border-left-color: var(--c-divider);
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
.action-icon {
|
|
580
|
-
fill: currentColor;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
.action-text {
|
|
584
|
-
margin: 0;
|
|
585
|
-
font-weight: 500;
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
.action-select-icon {
|
|
589
|
-
width: 13px;
|
|
590
|
-
height: 13px;
|
|
591
|
-
fill: var(--input-placeholder);
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
.action-select-icon.up {
|
|
595
|
-
margin-bottom: -4px;
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
.box {
|
|
599
|
-
position: relative;
|
|
600
|
-
display: flex;
|
|
601
|
-
flex-grow: 1;
|
|
602
|
-
max-width: 100%;
|
|
603
|
-
|
|
604
|
-
&:hover .input {
|
|
605
|
-
border-color: var(--input-focus-border);
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
|
|
609
124
|
.input {
|
|
610
125
|
display: block;
|
|
611
|
-
|
|
126
|
+
flex-grow: 1;
|
|
127
|
+
border: 1px solid var(--input-border);
|
|
612
128
|
border-radius: 4px;
|
|
613
|
-
|
|
129
|
+
width: 100%;
|
|
130
|
+
font-weight: 400;
|
|
131
|
+
background-color: transparent;
|
|
614
132
|
transition: border-color .25s, background-color .25s;
|
|
615
|
-
opacity: 1;
|
|
616
133
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
white-space: nowrap;
|
|
621
|
-
overflow: hidden;
|
|
134
|
+
&::placeholder {
|
|
135
|
+
font-weight: 500;
|
|
136
|
+
color: var(--input-placeholder);
|
|
622
137
|
}
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
.input-area {
|
|
626
|
-
position: absolute;
|
|
627
|
-
top: 0;
|
|
628
|
-
left: 0;
|
|
629
|
-
letter-spacing: .4px;
|
|
630
|
-
background: transparent;
|
|
631
|
-
border: 1px solid transparent;
|
|
632
|
-
color: transparent;
|
|
633
138
|
|
|
634
|
-
&:
|
|
635
|
-
color: var(--
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
&:focus + .input .value {
|
|
639
|
-
opacity: 0;
|
|
139
|
+
&:hover {
|
|
140
|
+
border-color: var(--input-hover-border);
|
|
640
141
|
}
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
.input,
|
|
644
|
-
.input-area {
|
|
645
|
-
&.neutral { color: var(--c-black); }
|
|
646
|
-
&.info { color: var(--c-info); }
|
|
647
|
-
&.success { color: var(--c-success); }
|
|
648
|
-
&.warning { color: var(--c-warning); }
|
|
649
|
-
&.danger { color: var(--c-danger); }
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
.icon {
|
|
653
|
-
position: absolute;
|
|
654
|
-
cursor: text;
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
.icon-svg {
|
|
658
|
-
display: block;
|
|
659
|
-
fill: var(--input-placeholder);
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
.text,
|
|
663
|
-
.text-after {
|
|
664
|
-
position: absolute;
|
|
665
|
-
top: 0;
|
|
666
|
-
margin: 0;
|
|
667
|
-
color: var(--input-text);
|
|
668
|
-
cursor: text;
|
|
669
|
-
}
|
|
670
142
|
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
.text-after {
|
|
677
|
-
right: 0;
|
|
678
|
-
color: var(--input-placeholder);
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
.clear {
|
|
682
|
-
position: absolute;
|
|
683
|
-
display: flex;
|
|
684
|
-
justify-content: center;
|
|
685
|
-
align-items: center;
|
|
686
|
-
opacity: 0;
|
|
687
|
-
cursor: pointer;
|
|
688
|
-
transition: opacity .25s;
|
|
689
|
-
|
|
690
|
-
&:hover .clear-svg {
|
|
691
|
-
fill: var(--input-text);
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
&.show {
|
|
695
|
-
opacity: 1;
|
|
143
|
+
&:focus {
|
|
144
|
+
border-color: var(--input-focus-border);
|
|
145
|
+
background-color: transparent;
|
|
696
146
|
}
|
|
697
147
|
}
|
|
698
|
-
|
|
699
|
-
.clear-svg {
|
|
700
|
-
display: block;
|
|
701
|
-
fill: var(--input-placeholder);
|
|
702
|
-
transition: fill .25s;
|
|
703
|
-
}
|
|
704
148
|
</style>
|