@globalbrain/sefirot 4.30.1 → 4.32.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/client.d.ts +5 -0
- package/config/nuxt.d.ts +1 -0
- package/config/nuxt.js +8 -5
- package/config/vite.js +4 -13
- package/lib/components/SActionList.vue +2 -2
- package/lib/components/SActionMenu.vue +43 -7
- package/lib/components/SAvatar.vue +1 -1
- package/lib/components/SAvatarStack.vue +12 -12
- package/lib/components/SButton.vue +5 -7
- package/lib/components/SCard.vue +2 -2
- package/lib/components/SChartBar.vue +37 -12
- package/lib/components/SChartPie.vue +13 -7
- package/lib/components/SControlActionBarCollapse.vue +2 -4
- package/lib/components/SControlInputSearch.vue +7 -2
- package/lib/components/SDataListItem.vue +1 -3
- package/lib/components/SDescAvatar.vue +1 -1
- package/lib/components/SDescDay.vue +2 -2
- package/lib/components/SDescFile.vue +2 -4
- package/lib/components/SDescItem.vue +2 -1
- package/lib/components/SDescLabel.vue +1 -1
- package/lib/components/SDescLink.vue +2 -7
- package/lib/components/SDescPill.vue +2 -4
- package/lib/components/SDescText.vue +3 -3
- package/lib/components/SDropdown.vue +1 -1
- package/lib/components/SDropdownSectionFilter.vue +11 -11
- package/lib/components/SFragment.vue +1 -1
- package/lib/components/SInputAddon.vue +13 -11
- package/lib/components/SInputBase.vue +11 -11
- package/lib/components/SInputCheckbox.vue +6 -3
- package/lib/components/SInputCheckboxes.vue +7 -3
- package/lib/components/SInputDate.vue +3 -5
- package/lib/components/SInputDropdown.vue +26 -28
- package/lib/components/SInputDropdownItem.vue +21 -11
- package/lib/components/SInputFile.vue +9 -6
- package/lib/components/SInputFileUpload.vue +9 -11
- package/lib/components/SInputFileUploadItem.vue +8 -4
- package/lib/components/SInputHMS.vue +3 -1
- package/lib/components/SInputImage.vue +4 -2
- package/lib/components/SInputNumber.vue +9 -10
- package/lib/components/SInputRadio.vue +3 -2
- package/lib/components/SInputRadios.vue +6 -5
- package/lib/components/SInputSegments.vue +5 -7
- package/lib/components/SInputSegmentsOption.vue +1 -2
- package/lib/components/SInputSelect.vue +6 -4
- package/lib/components/SInputSwitch.vue +4 -1
- package/lib/components/SInputSwitches.vue +5 -3
- package/lib/components/SInputText.vue +16 -16
- package/lib/components/SInputTextarea.vue +7 -3
- package/lib/components/SInputYMD.vue +3 -1
- package/lib/components/SLink.vue +2 -2
- package/lib/components/SLocalNav.vue +1 -1
- package/lib/components/SLocalNavActions.vue +1 -1
- package/lib/components/SLocalNavMenu.vue +2 -2
- package/lib/components/SLoginPagePasswordDialog.vue +2 -2
- package/lib/components/SM.vue +1 -1
- package/lib/components/SMFade.vue +1 -1
- package/lib/components/SMarkdown.vue +3 -2
- package/lib/components/SModal.vue +2 -2
- package/lib/components/SSnackbar.vue +2 -2
- package/lib/components/SSteps.vue +6 -6
- package/lib/components/STable.vue +70 -27
- package/lib/components/STableCell.vue +14 -17
- package/lib/components/STableCellAvatars.vue +1 -1
- package/lib/components/STableCellDay.vue +12 -5
- package/lib/components/STableCellNumber.vue +2 -3
- package/lib/components/STableCellPath.vue +2 -2
- package/lib/components/STableCellText.vue +2 -3
- package/lib/components/STableColumn.vue +38 -16
- package/lib/components/STableFooter.vue +10 -2
- package/lib/components/STableHeader.vue +0 -1
- package/lib/components/STableHeaderMenu.vue +4 -4
- package/lib/components/STableHeaderMenuItem.vue +1 -1
- package/lib/components/STooltip.vue +3 -3
- package/lib/composables/Api.ts +1 -1
- package/lib/composables/App.ts +13 -11
- package/lib/composables/Dropdown.ts +10 -1
- package/lib/composables/Error.ts +37 -37
- package/lib/composables/Grid.ts +1 -4
- package/lib/composables/Image.ts +2 -3
- package/lib/composables/Lang.ts +8 -16
- package/lib/composables/Markdown.ts +1 -1
- package/lib/composables/Table.ts +0 -2
- package/lib/composables/Theme.ts +1 -13
- package/lib/composables/Utils.ts +11 -4
- package/lib/composables/Validation.ts +1 -4
- package/lib/http/Http.ts +23 -17
- package/lib/styles/variables-deprecated.css +0 -1
- package/lib/styles/variables.css +16 -16
- package/lib/support/Chart.ts +0 -1
- package/lib/support/DateRange.ts +1 -1
- package/lib/support/Day.ts +12 -65
- package/lib/support/File.ts +7 -16
- package/lib/support/Utils.ts +7 -40
- package/lib/validation/Rule.ts +6 -21
- package/lib/validation/rules/decimal.ts +3 -3
- package/lib/validation/rules/email.ts +1 -1
- package/lib/validation/rules/index.ts +1 -1
- package/lib/validation/rules/negativeInteger.ts +1 -1
- package/lib/validation/rules/positiveInteger.ts +1 -1
- package/lib/validation/rules/requiredHms.ts +2 -2
- package/lib/validation/rules/requiredIf.ts +1 -4
- package/lib/validation/rules/requiredYmd.ts +2 -2
- package/lib/validation/rules/slackChannelName.ts +4 -1
- package/lib/validation/rules/zeroOrNegativeInteger.ts +1 -1
- package/lib/validation/rules/zeroOrPositiveInteger.ts +1 -1
- package/lib/validation/validators/after.ts +1 -5
- package/lib/validation/validators/afterOrEqual.ts +1 -5
- package/lib/validation/validators/before.ts +1 -4
- package/lib/validation/validators/beforeOrEqual.ts +1 -5
- package/lib/validation/validators/decimal.ts +7 -9
- package/lib/validation/validators/email.ts +4 -8
- package/lib/validation/validators/fileExtension.ts +7 -15
- package/lib/validation/validators/hms.ts +26 -15
- package/lib/validation/validators/index.ts +0 -2
- package/lib/validation/validators/maxFileSize.ts +3 -13
- package/lib/validation/validators/maxLength.ts +1 -7
- package/lib/validation/validators/maxTotalFileSize.ts +3 -26
- package/lib/validation/validators/maxValue.ts +2 -6
- package/lib/validation/validators/minLength.ts +1 -7
- package/lib/validation/validators/minValue.ts +2 -6
- package/lib/validation/validators/month.ts +1 -7
- package/lib/validation/validators/negativeInteger.ts +1 -7
- package/lib/validation/validators/positiveInteger.ts +1 -7
- package/lib/validation/validators/required.ts +5 -28
- package/lib/validation/validators/requiredHmsIf.ts +11 -13
- package/lib/validation/validators/requiredIf.ts +5 -11
- package/lib/validation/validators/requiredYmdIf.ts +11 -13
- package/lib/validation/validators/slackChannelName.ts +11 -11
- package/lib/validation/validators/url.ts +7 -5
- package/lib/validation/validators/ymd.ts +36 -30
- package/package.json +44 -42
- package/lib/composables/Http.ts +0 -18
- package/lib/validation/validators/requiredHms.ts +0 -9
- package/lib/validation/validators/requiredYmd.ts +0 -9
|
@@ -13,9 +13,7 @@ import SInputRadio from './SInputRadio.vue'
|
|
|
13
13
|
|
|
14
14
|
export type { Color, Size }
|
|
15
15
|
|
|
16
|
-
export interface Option<
|
|
17
|
-
ValueType extends string | number | boolean = string | number | boolean
|
|
18
|
-
> {
|
|
16
|
+
export interface Option<ValueType extends string | number | boolean = string | number | boolean> {
|
|
19
17
|
label: string
|
|
20
18
|
value: ValueType
|
|
21
19
|
disabled?: boolean
|
|
@@ -53,7 +51,9 @@ const emit = defineEmits<{
|
|
|
53
51
|
const _value = computed(() => {
|
|
54
52
|
return props.modelValue !== undefined
|
|
55
53
|
? props.modelValue
|
|
56
|
-
: props.value !== undefined
|
|
54
|
+
: props.value !== undefined
|
|
55
|
+
? props.value
|
|
56
|
+
: null
|
|
57
57
|
})
|
|
58
58
|
|
|
59
59
|
function isChecked(value: ValueType) {
|
|
@@ -88,6 +88,7 @@ function onChange(value: ValueType) {
|
|
|
88
88
|
class="SInputRadios"
|
|
89
89
|
:class="[size ?? 'small']"
|
|
90
90
|
:size
|
|
91
|
+
:name
|
|
91
92
|
:label
|
|
92
93
|
:note
|
|
93
94
|
:info
|
|
@@ -100,7 +101,7 @@ function onChange(value: ValueType) {
|
|
|
100
101
|
>
|
|
101
102
|
<div class="container">
|
|
102
103
|
<div class="row">
|
|
103
|
-
<div v-for="(option,
|
|
104
|
+
<div v-for="(option, i) in options" :key="i" class="col">
|
|
104
105
|
<SInputRadio
|
|
105
106
|
size="sm"
|
|
106
107
|
:text="option.label"
|
|
@@ -38,9 +38,7 @@ const emit = defineEmits<{
|
|
|
38
38
|
}>()
|
|
39
39
|
|
|
40
40
|
const _value = computed(() => {
|
|
41
|
-
const v = props.modelValue !== undefined
|
|
42
|
-
? props.modelValue
|
|
43
|
-
: props.value
|
|
41
|
+
const v = props.modelValue !== undefined ? props.modelValue : props.value
|
|
44
42
|
|
|
45
43
|
if (v === undefined) {
|
|
46
44
|
throw new Error('[sefirot] SInputSegments: `value` or `modelValue` is required.')
|
|
@@ -60,6 +58,7 @@ function onSelect(value: T) {
|
|
|
60
58
|
class="SInputSegments"
|
|
61
59
|
:class="[size ?? 'small', { block }]"
|
|
62
60
|
:size
|
|
61
|
+
:name
|
|
63
62
|
:label
|
|
64
63
|
:note
|
|
65
64
|
:info
|
|
@@ -72,14 +71,13 @@ function onSelect(value: T) {
|
|
|
72
71
|
>
|
|
73
72
|
<div class="box">
|
|
74
73
|
<SInputSegmentsOption
|
|
75
|
-
v-for="option,
|
|
76
|
-
:key="
|
|
74
|
+
v-for="(option, i) in options"
|
|
75
|
+
:key="i"
|
|
77
76
|
:size="size ?? 'small'"
|
|
78
77
|
:label="option.label"
|
|
79
|
-
:value="option.value"
|
|
80
78
|
:mode="option.mode ?? 'default'"
|
|
81
79
|
:active="_value === option.value"
|
|
82
|
-
:disabled="disabled ? true : option.disabled ?? false"
|
|
80
|
+
:disabled="disabled ? true : (option.disabled ?? false)"
|
|
83
81
|
@click="onSelect(option.value)"
|
|
84
82
|
/>
|
|
85
83
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script setup lang="ts"
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
import { type Size } from './SInputBase.vue'
|
|
3
3
|
|
|
4
4
|
export type { Size }
|
|
@@ -7,7 +7,6 @@ export type Mode = 'default' | 'mute' | 'neutral' | 'info' | 'success' | 'warnin
|
|
|
7
7
|
const props = defineProps<{
|
|
8
8
|
size: Size
|
|
9
9
|
label: string
|
|
10
|
-
value: T
|
|
11
10
|
mode: Mode
|
|
12
11
|
active: boolean
|
|
13
12
|
disabled: boolean
|
|
@@ -36,7 +36,9 @@ const emit = defineEmits<{
|
|
|
36
36
|
const _value = computed(() => {
|
|
37
37
|
return props.modelValue !== undefined
|
|
38
38
|
? props.modelValue
|
|
39
|
-
: props.value !== undefined
|
|
39
|
+
: props.value !== undefined
|
|
40
|
+
? props.value
|
|
41
|
+
: null
|
|
40
42
|
})
|
|
41
43
|
|
|
42
44
|
const isFocused = ref(false)
|
|
@@ -103,11 +105,11 @@ function emitChange(e: any): void {
|
|
|
103
105
|
</option>
|
|
104
106
|
|
|
105
107
|
<option
|
|
106
|
-
v-for="option,
|
|
108
|
+
v-for="(option, i) in options"
|
|
107
109
|
:key="JSON.stringify(option)"
|
|
108
110
|
:style="{ display: option.disabled ? 'none' : undefined }"
|
|
109
111
|
class="option"
|
|
110
|
-
:value="
|
|
112
|
+
:value="i"
|
|
111
113
|
:selected="isSelectedOption(option)"
|
|
112
114
|
>
|
|
113
115
|
{{ option.label }}
|
|
@@ -214,7 +216,7 @@ function emitChange(e: any): void {
|
|
|
214
216
|
}
|
|
215
217
|
|
|
216
218
|
.option {
|
|
217
|
-
color:
|
|
219
|
+
background-color: var(--input-bg-color);
|
|
218
220
|
}
|
|
219
221
|
|
|
220
222
|
.icon {
|
|
@@ -36,7 +36,9 @@ const emit = defineEmits<{
|
|
|
36
36
|
const _value = computed(() => {
|
|
37
37
|
return props.modelValue !== undefined
|
|
38
38
|
? props.modelValue
|
|
39
|
-
: props.value !== undefined
|
|
39
|
+
: props.value !== undefined
|
|
40
|
+
? props.value
|
|
41
|
+
: false
|
|
40
42
|
})
|
|
41
43
|
|
|
42
44
|
const classes = computed(() => [
|
|
@@ -67,6 +69,7 @@ function emitChange(): void {
|
|
|
67
69
|
:check-color
|
|
68
70
|
:help
|
|
69
71
|
:hide-error
|
|
72
|
+
:validation
|
|
70
73
|
>
|
|
71
74
|
<div class="container">
|
|
72
75
|
<div class="input" :class="{ on: _value }" role="button" @click="emitChange">
|
|
@@ -40,7 +40,7 @@ function isChecked(value: any): boolean {
|
|
|
40
40
|
return props.modelValue.includes(value)
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
function
|
|
43
|
+
function onChange(value: any): void {
|
|
44
44
|
const difference = props.modelValue
|
|
45
45
|
.filter((v) => v !== value)
|
|
46
46
|
.concat(props.modelValue.includes(value) ? [] : [value])
|
|
@@ -63,15 +63,17 @@ function handleChange(value: any): void {
|
|
|
63
63
|
:check-text
|
|
64
64
|
:check-color
|
|
65
65
|
:hide-error
|
|
66
|
+
:validation
|
|
66
67
|
>
|
|
67
68
|
<div class="container">
|
|
68
69
|
<div class="row">
|
|
69
|
-
<div v-for="(option,
|
|
70
|
+
<div v-for="(option, i) in options" :key="i" class="col">
|
|
70
71
|
<SInputSwitch
|
|
71
72
|
size="sm"
|
|
72
73
|
:text="option.label"
|
|
74
|
+
:disabled
|
|
73
75
|
:model-value="isChecked(option.value)"
|
|
74
|
-
@update:model-value="
|
|
76
|
+
@update:model-value="onChange(option.value)"
|
|
75
77
|
/>
|
|
76
78
|
</div>
|
|
77
79
|
</div>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { type Component, computed, ref } from 'vue'
|
|
3
|
-
import { isString } from '../support/Utils'
|
|
4
3
|
import SInputBase, { type Props as BaseProps } from './SInputBase.vue'
|
|
5
4
|
|
|
6
5
|
export type { Color, Size } from './SInputBase.vue'
|
|
@@ -37,17 +36,12 @@ const classes = computed(() => [
|
|
|
37
36
|
{ disabled: props.disabled }
|
|
38
37
|
])
|
|
39
38
|
|
|
40
|
-
const inputClasses = computed(() => [
|
|
41
|
-
textColor.value,
|
|
42
|
-
{ hide: showDisplay.value }
|
|
43
|
-
])
|
|
44
|
-
|
|
45
39
|
const textColor = computed(() => {
|
|
46
40
|
if (!props.textColor) {
|
|
47
41
|
return 'neutral'
|
|
48
42
|
}
|
|
49
43
|
|
|
50
|
-
if (
|
|
44
|
+
if (typeof props.textColor === 'string') {
|
|
51
45
|
return props.textColor
|
|
52
46
|
}
|
|
53
47
|
|
|
@@ -58,6 +52,11 @@ const showDisplay = computed(() => {
|
|
|
58
52
|
return !isFocused.value && props.displayValue
|
|
59
53
|
})
|
|
60
54
|
|
|
55
|
+
const inputClasses = computed(() => [
|
|
56
|
+
textColor.value,
|
|
57
|
+
{ hide: showDisplay.value }
|
|
58
|
+
])
|
|
59
|
+
|
|
61
60
|
function focus(): void {
|
|
62
61
|
input.value?.focus()
|
|
63
62
|
}
|
|
@@ -78,9 +77,10 @@ function emitBlur(e: FocusEvent): void {
|
|
|
78
77
|
}
|
|
79
78
|
|
|
80
79
|
function emitInput(e: Event): void {
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
emit('
|
|
80
|
+
const value = getValue(e)
|
|
81
|
+
|
|
82
|
+
emit('update:model-value', value)
|
|
83
|
+
emit('input', value)
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
function emitEnter(e: KeyboardEvent): void {
|
|
@@ -124,21 +124,21 @@ function getValue(e: Event | FocusEvent | KeyboardEvent): string | null {
|
|
|
124
124
|
|
|
125
125
|
<div class="value">
|
|
126
126
|
<div v-if="unitBefore" class="unit before">
|
|
127
|
-
<span v-if="
|
|
128
|
-
<component
|
|
127
|
+
<span v-if="typeof unitBefore === 'string'" class="unit-text">{{ unitBefore }}</span>
|
|
128
|
+
<component :is="unitBefore" v-else class="unit-icon" />
|
|
129
129
|
</div>
|
|
130
130
|
|
|
131
131
|
<div class="area">
|
|
132
132
|
<input
|
|
133
|
+
:id="name"
|
|
134
|
+
ref="input"
|
|
133
135
|
class="input entity"
|
|
134
136
|
:class="inputClasses"
|
|
135
|
-
:id="name"
|
|
136
137
|
:type="type ?? 'text'"
|
|
137
138
|
:placeholder
|
|
138
139
|
:disabled
|
|
139
140
|
:tabindex
|
|
140
141
|
:value="modelValue"
|
|
141
|
-
ref="input"
|
|
142
142
|
@focus="onFocus"
|
|
143
143
|
@blur="emitBlur"
|
|
144
144
|
@input="emitInput"
|
|
@@ -150,8 +150,8 @@ function getValue(e: Event | FocusEvent | KeyboardEvent): string | null {
|
|
|
150
150
|
</div>
|
|
151
151
|
|
|
152
152
|
<div v-if="unitAfter" class="unit after">
|
|
153
|
-
<span v-if="
|
|
154
|
-
<component
|
|
153
|
+
<span v-if="typeof unitAfter === 'string'" class="unit-text">{{ unitAfter }}</span>
|
|
154
|
+
<component :is="unitAfter" v-else class="unit-icon" />
|
|
155
155
|
</div>
|
|
156
156
|
</div>
|
|
157
157
|
|
|
@@ -39,7 +39,9 @@ const sizePaddingYDict = {
|
|
|
39
39
|
const _value = computed(() => {
|
|
40
40
|
return props.modelValue !== undefined
|
|
41
41
|
? props.modelValue
|
|
42
|
-
: props.value !== undefined
|
|
42
|
+
: props.value !== undefined
|
|
43
|
+
? props.value
|
|
44
|
+
: null
|
|
43
45
|
})
|
|
44
46
|
|
|
45
47
|
const classes = computed(() => [
|
|
@@ -58,7 +60,9 @@ const style = computed(() => {
|
|
|
58
60
|
const fontSize = 24
|
|
59
61
|
|
|
60
62
|
const minHeight = `min-height: ${rows * fontSize + padding}px;`
|
|
61
|
-
const maxHeight = props.autoResize === true
|
|
63
|
+
const maxHeight = props.autoResize === true
|
|
64
|
+
? ''
|
|
65
|
+
: `max-height: calc(${props.autoResize}lh + ${padding}px);`
|
|
62
66
|
|
|
63
67
|
return `field-sizing:content;${minHeight}${maxHeight}`
|
|
64
68
|
})
|
|
@@ -101,11 +105,11 @@ const isPreview = ref(false)
|
|
|
101
105
|
<div class="box">
|
|
102
106
|
<div v-if="preview !== undefined" class="control">
|
|
103
107
|
<SInputSegments
|
|
108
|
+
v-model="isPreview"
|
|
104
109
|
:options="[
|
|
105
110
|
{ label: writeLabel ?? 'Write', value: false },
|
|
106
111
|
{ label: previewLabel ?? 'Preview', value: true }
|
|
107
112
|
]"
|
|
108
|
-
v-model="isPreview"
|
|
109
113
|
size="mini"
|
|
110
114
|
/>
|
|
111
115
|
</div>
|
|
@@ -38,7 +38,9 @@ const emit = defineEmits<{
|
|
|
38
38
|
const _value = computed(() => {
|
|
39
39
|
return props.modelValue !== undefined
|
|
40
40
|
? props.modelValue
|
|
41
|
-
: props.value !== undefined
|
|
41
|
+
: props.value !== undefined
|
|
42
|
+
? props.value
|
|
43
|
+
: null
|
|
42
44
|
})
|
|
43
45
|
|
|
44
46
|
const padValue = computed(() => {
|
package/lib/components/SLink.vue
CHANGED
|
@@ -30,8 +30,8 @@ const component = computed(() => {
|
|
|
30
30
|
return isExternal.value ? 'a' : 'router-link'
|
|
31
31
|
})
|
|
32
32
|
|
|
33
|
-
const target = computed(() => isExternal.value ? '_blank' : null)
|
|
34
|
-
const rel = computed(() => isExternal.value ? 'noopener noreferrer' : null)
|
|
33
|
+
const target = computed(() => (isExternal.value ? '_blank' : null))
|
|
34
|
+
const rel = computed(() => (isExternal.value ? 'noopener noreferrer' : null))
|
|
35
35
|
</script>
|
|
36
36
|
|
|
37
37
|
<template>
|
|
@@ -6,7 +6,7 @@ import SLocalNavDescription from './SLocalNavDescription.vue'
|
|
|
6
6
|
import SLocalNavMenu, { type MenuItem } from './SLocalNavMenu.vue'
|
|
7
7
|
import SLocalNavTitle, { type Title } from './SLocalNavTitle.vue'
|
|
8
8
|
|
|
9
|
-
export type {
|
|
9
|
+
export type { Action, MenuItem, Title }
|
|
10
10
|
|
|
11
11
|
export interface Avatar {
|
|
12
12
|
image?: string | null
|
|
@@ -16,10 +16,10 @@ defineProps<{
|
|
|
16
16
|
|
|
17
17
|
<template>
|
|
18
18
|
<div class="SLocalNavMenu">
|
|
19
|
-
<div v-for="nav,
|
|
19
|
+
<div v-for="(nav, i) in menu" :key="i" class="group">
|
|
20
20
|
<div v-for="item in nav" :key="item.text" class="item">
|
|
21
21
|
<SLink class="link" :class="{ active: item.active }" :href="item.link">
|
|
22
|
-
<component
|
|
22
|
+
<component :is="item.icon" v-if="item.icon" class="icon-svg" />
|
|
23
23
|
<span class="text">{{ item.text }}</span>
|
|
24
24
|
</SLink>
|
|
25
25
|
</div>
|
|
@@ -57,19 +57,19 @@ async function onSubmit() {
|
|
|
57
57
|
<p>Invalid email or password.</p>
|
|
58
58
|
</SAlert>
|
|
59
59
|
<SInputText
|
|
60
|
+
v-model="data.email"
|
|
60
61
|
name="email"
|
|
61
62
|
type="email"
|
|
62
63
|
label="Email"
|
|
63
64
|
placeholder="john.doe@example.com"
|
|
64
|
-
v-model="data.email"
|
|
65
65
|
:validation="validation.email"
|
|
66
66
|
/>
|
|
67
67
|
<SInputText
|
|
68
|
+
v-model="data.password"
|
|
68
69
|
name="password"
|
|
69
70
|
type="password"
|
|
70
71
|
label="Password"
|
|
71
72
|
placeholder="Password"
|
|
72
|
-
v-model="data.password"
|
|
73
73
|
:validation="validation.password"
|
|
74
74
|
/>
|
|
75
75
|
</SDoc>
|
package/lib/components/SM.vue
CHANGED
|
@@ -34,7 +34,7 @@ const { stop } = useIntersectionObserver(target, ([{ isIntersecting }]) => {
|
|
|
34
34
|
</script>
|
|
35
35
|
|
|
36
36
|
<template>
|
|
37
|
-
<component :is="as" class="SM" :class="{ on }"
|
|
37
|
+
<component :is="as" ref="target" class="SM" :class="{ on }">
|
|
38
38
|
<slot :on />
|
|
39
39
|
</component>
|
|
40
40
|
</template>
|
|
@@ -17,8 +17,9 @@ const rendered = computed(() => markdown(props.content))
|
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<template>
|
|
20
|
-
<component v-if="$slots.default"
|
|
20
|
+
<component :is="tag" v-if="$slots.default" class="SMarkdown-container">
|
|
21
21
|
<slot v-bind="{ rendered }" />
|
|
22
22
|
</component>
|
|
23
|
-
|
|
23
|
+
<!-- eslint-disable-next-line vue/no-v-text-v-html-on-component -->
|
|
24
|
+
<component :is="tag" v-else class="SMarkdown-container" v-html="rendered" />
|
|
24
25
|
</template>
|
|
@@ -30,7 +30,7 @@ function onClick(e: MouseEvent) {
|
|
|
30
30
|
<template>
|
|
31
31
|
<Teleport to="#sefirot-modals">
|
|
32
32
|
<Transition name="fade">
|
|
33
|
-
<div v-if="open"
|
|
33
|
+
<div v-if="open" ref="el" class="SModal" @mousedown="onClick">
|
|
34
34
|
<slot />
|
|
35
35
|
</div>
|
|
36
36
|
</Transition>
|
|
@@ -45,7 +45,7 @@ function onClick(e: MouseEvent) {
|
|
|
45
45
|
bottom: 0;
|
|
46
46
|
left: 0;
|
|
47
47
|
z-index: var(--z-index-backdrop);
|
|
48
|
-
background-color: rgba(0, 0, 0, .8);
|
|
48
|
+
background-color: rgba(0, 0, 0, 0.8);
|
|
49
49
|
transition: opacity 0.25s;
|
|
50
50
|
overflow: hidden;
|
|
51
51
|
overflow-y: auto;
|
|
@@ -28,7 +28,7 @@ function close() {
|
|
|
28
28
|
</p>
|
|
29
29
|
|
|
30
30
|
<div v-if="actions" class="actions">
|
|
31
|
-
<div v-for="(action,
|
|
31
|
+
<div v-for="(action, i) in actions" :key="i" class="action">
|
|
32
32
|
<SButton
|
|
33
33
|
size="medium"
|
|
34
34
|
type="text"
|
|
@@ -87,7 +87,7 @@ function close() {
|
|
|
87
87
|
width: 16px;
|
|
88
88
|
height: 16px;
|
|
89
89
|
color: var(--c-text-3);
|
|
90
|
-
transition: color .25s;
|
|
90
|
+
transition: color 0.25s;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
.content {
|
|
@@ -19,7 +19,7 @@ function getBarLeftMode(index: number): BarMode | null {
|
|
|
19
19
|
const current = props.steps[index]
|
|
20
20
|
const prev = props.steps[index - 1]
|
|
21
21
|
|
|
22
|
-
return
|
|
22
|
+
return isActive(prev) && isActive(current) ? 'active' : 'mute'
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
function getBarRightMode(index: number): BarMode | null {
|
|
@@ -30,7 +30,7 @@ function getBarRightMode(index: number): BarMode | null {
|
|
|
30
30
|
const current = props.steps[index]
|
|
31
31
|
const next = props.steps[index + 1]
|
|
32
32
|
|
|
33
|
-
return
|
|
33
|
+
return isActive(current) && isActive(next) ? 'active' : 'mute'
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
function isActive(step: Step): boolean {
|
|
@@ -41,12 +41,12 @@ function isActive(step: Step): boolean {
|
|
|
41
41
|
<template>
|
|
42
42
|
<div class="SSteps">
|
|
43
43
|
<SStep
|
|
44
|
-
v-for="(step,
|
|
45
|
-
:key="
|
|
44
|
+
v-for="(step, i) in steps"
|
|
45
|
+
:key="i"
|
|
46
46
|
class="item"
|
|
47
47
|
:style="{ width }"
|
|
48
|
-
:bar-left="getBarLeftMode(
|
|
49
|
-
:bar-right="getBarRightMode(
|
|
48
|
+
:bar-left="getBarLeftMode(i)"
|
|
49
|
+
:bar-right="getBarRightMode(i)"
|
|
50
50
|
v-bind="step"
|
|
51
51
|
/>
|
|
52
52
|
</div>
|