@globalbrain/sefirot 2.2.1 → 2.3.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/SButton.vue +0 -1
- package/lib/components/SButtonGroup.vue +17 -17
- package/lib/components/SDropdownSectionFilter.vue +5 -5
- package/lib/components/SIcon.vue +2 -2
- package/lib/components/SInputBase.vue +4 -5
- package/lib/components/SInputCheckbox.vue +23 -23
- package/lib/components/SInputCheckboxes.vue +23 -23
- package/lib/components/SInputDate.vue +55 -132
- package/lib/components/SInputDropdown.vue +3 -3
- package/lib/components/SInputFile.vue +1 -1
- package/lib/components/SInputSelect.vue +48 -48
- package/lib/components/SInputSwitch.vue +68 -142
- package/lib/components/SInputSwitches.vue +51 -58
- package/lib/components/SInputText.vue +1 -1
- package/lib/components/SInputTextarea.vue +24 -24
- package/lib/components/SLink.vue +14 -14
- package/lib/components/SMarkdown.vue +3 -3
- package/lib/components/SMount.vue +1 -1
- package/lib/components/SSheetFooterAction.vue +1 -1
- package/lib/components/SSpinner.vue +28 -12
- package/lib/components/SStep.vue +15 -15
- package/lib/components/SSteps.vue +16 -16
- package/lib/components/STable.vue +2 -2
- package/lib/components/STableCellAvatar.vue +1 -1
- package/lib/components/STableCellAvatars.vue +1 -1
- package/lib/components/STableCellDay.vue +1 -1
- package/lib/components/STableColumn.vue +4 -4
- package/lib/components/STooltip.vue +17 -17
- package/lib/composables/Form.ts +7 -5
- package/lib/composables/Grid.ts +3 -3
- package/lib/composables/Markdown.ts +2 -2
- package/lib/composables/Tooltip.ts +2 -1
- package/lib/composables/Validation.ts +2 -2
- package/lib/support/Day.ts +1 -1
- package/lib/validation/rules/email.ts +1 -1
- package/lib/validation/rules/hms.ts +1 -1
- package/lib/validation/rules/maxLength.ts +1 -1
- package/lib/validation/rules/maxValue.ts +1 -1
- package/lib/validation/rules/minLength.ts +1 -1
- package/lib/validation/rules/minValue.ts +1 -1
- package/lib/validation/rules/required.ts +1 -1
- package/lib/validation/rules/requiredHms.ts +1 -1
- package/lib/validation/rules/requiredIf.ts +1 -1
- package/lib/validation/rules/requiredYmd.ts +1 -1
- package/lib/validation/rules/url.ts +1 -1
- package/lib/validation/rules/ymd.ts +1 -1
- package/lib/validation/validators/requiredYmd.ts +1 -1
- package/package.json +12 -15
|
@@ -1,3 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { Validatable } from '../composables/Validation'
|
|
4
|
+
import SInputBase from './SInputBase.vue'
|
|
5
|
+
|
|
6
|
+
export type Size = 'mini' | 'small' | 'medium'
|
|
7
|
+
|
|
8
|
+
const props = defineProps<{
|
|
9
|
+
size?: Size
|
|
10
|
+
name?: string
|
|
11
|
+
label?: string
|
|
12
|
+
note?: string
|
|
13
|
+
text?: string
|
|
14
|
+
help?: string
|
|
15
|
+
disabled?: boolean
|
|
16
|
+
modelValue: boolean
|
|
17
|
+
hideError?: boolean
|
|
18
|
+
validation?: Validatable
|
|
19
|
+
}>()
|
|
20
|
+
|
|
21
|
+
const emit = defineEmits<{
|
|
22
|
+
(e: 'update:modelValue', value: boolean): void
|
|
23
|
+
}>()
|
|
24
|
+
|
|
25
|
+
const classes = computed(() => [
|
|
26
|
+
[props.size ?? 'small'],
|
|
27
|
+
{ disabled: props.disabled }
|
|
28
|
+
])
|
|
29
|
+
|
|
30
|
+
function emitChange(): void {
|
|
31
|
+
!props.disabled && emit('update:modelValue', !props.modelValue)
|
|
32
|
+
}
|
|
33
|
+
</script>
|
|
34
|
+
|
|
1
35
|
<template>
|
|
2
36
|
<SInputBase
|
|
3
37
|
class="SInputSwitch"
|
|
@@ -6,188 +40,80 @@
|
|
|
6
40
|
:label="label"
|
|
7
41
|
:note="note"
|
|
8
42
|
:help="help"
|
|
43
|
+
:hide-error="hideError"
|
|
9
44
|
>
|
|
10
|
-
<div class="
|
|
11
|
-
<div class="
|
|
12
|
-
<p v-if="text" class="
|
|
45
|
+
<div class="container">
|
|
46
|
+
<div class="input" :class="{ on: modelValue }" role="button" @click="emitChange">
|
|
47
|
+
<p v-if="text" class="text">{{ text }}</p>
|
|
13
48
|
|
|
14
|
-
<div class="
|
|
15
|
-
<div class="
|
|
49
|
+
<div class="box">
|
|
50
|
+
<div class="check" />
|
|
16
51
|
</div>
|
|
17
|
-
|
|
18
|
-
<p v-if="textAfter" class="SInputSwitch-text after" :class="[textMode]">{{ textAfter }}</p>
|
|
19
52
|
</div>
|
|
20
53
|
</div>
|
|
21
54
|
</SInputBase>
|
|
22
55
|
</template>
|
|
23
56
|
|
|
24
|
-
<script setup lang="ts">
|
|
25
|
-
import { computed, PropType } from 'vue'
|
|
26
|
-
import SInputBase from './SInputBase.vue'
|
|
27
|
-
|
|
28
|
-
type Size = 'mini' | 'small'
|
|
29
|
-
type Mode = 'neutral' | 'info' | 'success' | 'warning' | 'danger'
|
|
30
|
-
type TextMode = 'neutral' | 'mute' | 'info' | 'success' | 'warning' | 'danger'
|
|
31
|
-
|
|
32
|
-
const props = defineProps({
|
|
33
|
-
size: { type: String as PropType<Size>, default: 'small' },
|
|
34
|
-
mode: { type: String as PropType<Mode>, default: 'neutral' },
|
|
35
|
-
name: { type: String, default: null },
|
|
36
|
-
label: { type: String, default: null },
|
|
37
|
-
note: { type: String, default: null },
|
|
38
|
-
text: { type: String, default: null },
|
|
39
|
-
textAfter: { type: String, default: null },
|
|
40
|
-
textMode: { type: String as PropType<TextMode>, default: 'neutral' },
|
|
41
|
-
disabled: { type: Boolean, default: false },
|
|
42
|
-
help: { type: String, default: null },
|
|
43
|
-
modelValue: { type: Boolean, required: true }
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
const emit = defineEmits(['update:modelValue'])
|
|
47
|
-
|
|
48
|
-
const classes = computed(() => ({
|
|
49
|
-
mini: props.size === 'mini',
|
|
50
|
-
small: props.size === 'small',
|
|
51
|
-
neutral: props.mode === 'neutral',
|
|
52
|
-
info: props.mode === 'info',
|
|
53
|
-
success: props.mode === 'success',
|
|
54
|
-
warning: props.mode === 'warning',
|
|
55
|
-
danger: props.mode === 'danger',
|
|
56
|
-
disabled: props.disabled
|
|
57
|
-
}))
|
|
58
|
-
|
|
59
|
-
function emitChange(): void {
|
|
60
|
-
!props.disabled && emit('update:modelValue', !props.modelValue)
|
|
61
|
-
}
|
|
62
|
-
</script>
|
|
63
|
-
|
|
64
57
|
<style lang="postcss" scoped>
|
|
65
|
-
.
|
|
66
|
-
.SInputSwitch-box {
|
|
67
|
-
margin: 1px 0 0;
|
|
68
|
-
border-radius: 9px;
|
|
69
|
-
width: 36px;
|
|
70
|
-
height: 18px;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.SInputSwitch-check {
|
|
74
|
-
top: 2px;
|
|
75
|
-
left: 2px;
|
|
76
|
-
width: 12px;
|
|
77
|
-
height: 12px;
|
|
78
|
-
transition: background-color .25s, transform .25s;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.SInputSwitch.small {
|
|
83
|
-
.SInputSwitch-box {
|
|
84
|
-
margin: -1px 0 -1px;
|
|
85
|
-
border-radius: 11px;
|
|
86
|
-
width: 40px;
|
|
87
|
-
height: 22px;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.SInputSwitch-check {
|
|
91
|
-
top: 2px;
|
|
92
|
-
left: 2px;
|
|
93
|
-
width: 16px;
|
|
94
|
-
height: 16px;
|
|
95
|
-
transition: background-color .25s, transform .25s;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.SInputSwitch.neutral .SInputSwitch-input.on .SInputSwitch-box {
|
|
100
|
-
border-color: var(--c-black);
|
|
101
|
-
background-color: var(--c-black);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.SInputSwitch.info .SInputSwitch-input.on .SInputSwitch-box {
|
|
105
|
-
border-color: var(--c-info);
|
|
106
|
-
background-color: var(--c-info);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.SInputSwitch.success .SInputSwitch-input.on .SInputSwitch-box {
|
|
110
|
-
border-color: var(--c-success);
|
|
111
|
-
background-color: var(--c-success);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.SInputSwitch.warning .SInputSwitch-input.on .SInputSwitch-box {
|
|
115
|
-
border-color: var(--c-warning);
|
|
116
|
-
background-color: var(--c-warning);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.SInputSwitch.danger .SInputSwitch-input.on .SInputSwitch-box {
|
|
120
|
-
border-color: var(--c-danger);
|
|
121
|
-
background-color: var(--c-danger);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.SInputSwitch.disabled .SInputSwitch-input {
|
|
125
|
-
.SInputSwitch-box {
|
|
126
|
-
cursor: not-allowed;
|
|
127
|
-
opacity: .6;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
&:hover .SInputSwitch-box { border-color: var(--c-gray); }
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.SInputSwitch.disabled .SInputSwitch-input.on {
|
|
134
|
-
&:hover .SInputSwitch-box { border-color: transparent; }
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.SInputSwitch-container {
|
|
58
|
+
.container {
|
|
138
59
|
display: flex;
|
|
139
60
|
}
|
|
140
61
|
|
|
141
|
-
.
|
|
62
|
+
.input {
|
|
142
63
|
position: relative;
|
|
143
64
|
display: flex;
|
|
144
65
|
justify-content: space-between;
|
|
66
|
+
align-items: center;
|
|
145
67
|
width: 100%;
|
|
68
|
+
height: 32px;
|
|
146
69
|
|
|
147
70
|
&:hover {
|
|
148
|
-
.
|
|
149
|
-
.SInputSwitch-check { background-color: var(--c-black); }
|
|
71
|
+
.box { border-color: var(--c-info); }
|
|
150
72
|
}
|
|
151
73
|
}
|
|
152
74
|
|
|
153
|
-
.
|
|
75
|
+
.input.on .box {
|
|
76
|
+
border-color: var(--c-info-lighter);
|
|
77
|
+
background-color: var(--c-info);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.input.on .check {
|
|
154
81
|
background-color: var(--c-white);
|
|
155
82
|
transform: translateX(18px);
|
|
156
83
|
}
|
|
157
84
|
|
|
158
|
-
.
|
|
85
|
+
.text {
|
|
159
86
|
flex-grow: 1;
|
|
160
87
|
margin: 0;
|
|
161
88
|
padding-right: 16px;
|
|
162
89
|
line-height: 20px;
|
|
163
90
|
font-size: 14px;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.SInputSwitch-text.mute {
|
|
167
|
-
color: var(--c-text-light-2);
|
|
168
91
|
font-weight: 500;
|
|
169
92
|
}
|
|
170
93
|
|
|
171
|
-
.
|
|
172
|
-
.SInputSwitch-text.success { color: var(--c-success); }
|
|
173
|
-
.SInputSwitch-text.warning { color: var(--c-warning); }
|
|
174
|
-
.SInputSwitch-text.danger { color: var(--c-danger); }
|
|
175
|
-
.SInputSwitch-text.after {
|
|
176
|
-
padding-left: 12px;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.SInputSwitch-box {
|
|
94
|
+
.box {
|
|
180
95
|
position: relative;
|
|
181
96
|
flex-shrink: 0;
|
|
182
|
-
border: 1px solid var(--c-
|
|
183
|
-
|
|
184
|
-
|
|
97
|
+
border: 1px solid var(--c-divider);
|
|
98
|
+
border-radius: 11px;
|
|
99
|
+
width: 40px;
|
|
100
|
+
height: 22px;
|
|
101
|
+
background-color: var(--c-bg-elv-down);
|
|
102
|
+
transition: border-color 0.25s, background-color 0.25s, box-shadow 0.25s;
|
|
185
103
|
}
|
|
186
104
|
|
|
187
|
-
.
|
|
105
|
+
.check {
|
|
188
106
|
position: absolute;
|
|
189
107
|
border-radius: 50%;
|
|
190
108
|
background-color: var(--c-black);
|
|
109
|
+
top: 2px;
|
|
110
|
+
left: 2px;
|
|
111
|
+
width: 16px;
|
|
112
|
+
height: 16px;
|
|
191
113
|
transition: background-color .25s, transform .25s;
|
|
114
|
+
|
|
115
|
+
.dark & {
|
|
116
|
+
background-color: var(--c-white);
|
|
117
|
+
}
|
|
192
118
|
}
|
|
193
119
|
</style>
|
|
@@ -1,88 +1,81 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<SInputBase
|
|
3
|
-
class="SInputSwitches"
|
|
4
|
-
:class="classes"
|
|
5
|
-
:name="name"
|
|
6
|
-
:label="label"
|
|
7
|
-
:note="note"
|
|
8
|
-
:help="help"
|
|
9
|
-
>
|
|
10
|
-
<div class="SInputSwitches-container">
|
|
11
|
-
<div class="SInputSwitches-row">
|
|
12
|
-
<div v-for="option in options" :key="option.value" class="SInputSwitches-col">
|
|
13
|
-
<SInputSwitch
|
|
14
|
-
:size="size"
|
|
15
|
-
:mode="mode"
|
|
16
|
-
:text="option.label"
|
|
17
|
-
:model-value="isChecked(option.value)"
|
|
18
|
-
@update:model-value="handleChange(option.value)"
|
|
19
|
-
/>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</SInputBase>
|
|
24
|
-
</template>
|
|
25
|
-
|
|
26
1
|
<script setup lang="ts">
|
|
27
|
-
import { computed
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { Validatable } from '../composables/Validation'
|
|
28
4
|
import SInputBase from './SInputBase.vue'
|
|
29
5
|
import SInputSwitch from './SInputSwitch.vue'
|
|
30
6
|
|
|
31
|
-
type Size = 'mini' | 'small'
|
|
32
|
-
type Mode = 'neutral' | 'info' | 'success' | 'warning' | 'danger'
|
|
7
|
+
export type Size = 'mini' | 'small' | 'medium'
|
|
33
8
|
|
|
34
|
-
|
|
35
|
-
interface Option {
|
|
9
|
+
export interface Option {
|
|
36
10
|
label: string
|
|
37
|
-
value:
|
|
11
|
+
value: string | number | boolean
|
|
38
12
|
}
|
|
39
13
|
|
|
40
|
-
const props = defineProps
|
|
41
|
-
size
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
modelValue:
|
|
49
|
-
|
|
14
|
+
const props = defineProps<{
|
|
15
|
+
size?: Size
|
|
16
|
+
name?: string
|
|
17
|
+
label?: string
|
|
18
|
+
note?: string
|
|
19
|
+
help?: string
|
|
20
|
+
options: Option[]
|
|
21
|
+
disabled?: boolean
|
|
22
|
+
modelValue: (string | number | boolean)[]
|
|
23
|
+
hideError?: boolean
|
|
24
|
+
validation?: Validatable
|
|
25
|
+
}>()
|
|
50
26
|
|
|
51
|
-
const emit = defineEmits
|
|
27
|
+
const emit = defineEmits<{
|
|
28
|
+
(e: 'update:modelValue', value: (string | number | boolean)[]): void
|
|
29
|
+
}>()
|
|
52
30
|
|
|
53
31
|
const classes = computed(() => [
|
|
54
|
-
props.size
|
|
55
|
-
props.mode
|
|
32
|
+
props.size ?? 'small'
|
|
56
33
|
])
|
|
57
34
|
|
|
58
|
-
function isChecked(value:
|
|
35
|
+
function isChecked(value: string | number | boolean): boolean {
|
|
59
36
|
return props.modelValue.includes(value)
|
|
60
37
|
}
|
|
61
38
|
|
|
62
|
-
function handleChange(value:
|
|
39
|
+
function handleChange(value: string | number | boolean): void {
|
|
63
40
|
const difference = props.modelValue
|
|
64
41
|
.filter(v => v !== value)
|
|
65
42
|
.concat(props.modelValue.includes(value) ? [] : [value])
|
|
43
|
+
|
|
66
44
|
emit('update:modelValue', difference)
|
|
67
45
|
}
|
|
68
46
|
</script>
|
|
69
47
|
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
48
|
+
<template>
|
|
49
|
+
<SInputBase
|
|
50
|
+
class="SInputSwitches"
|
|
51
|
+
:class="classes"
|
|
52
|
+
:name="name"
|
|
53
|
+
:label="label"
|
|
54
|
+
:note="note"
|
|
55
|
+
:help="help"
|
|
56
|
+
:hide-error="hideError"
|
|
57
|
+
>
|
|
58
|
+
<div class="container">
|
|
59
|
+
<div class="row">
|
|
60
|
+
<div v-for="(option, index) in options" :key="index" class="col">
|
|
61
|
+
<SInputSwitch
|
|
62
|
+
:size="size"
|
|
63
|
+
:text="option.label"
|
|
64
|
+
:model-value="isChecked(option.value)"
|
|
65
|
+
@update:model-value="handleChange(option.value)"
|
|
66
|
+
/>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</SInputBase>
|
|
71
|
+
</template>
|
|
80
72
|
|
|
81
|
-
|
|
73
|
+
<style lang="postcss" scoped>
|
|
74
|
+
.container {
|
|
82
75
|
display: flex;
|
|
83
76
|
}
|
|
84
77
|
|
|
85
|
-
.
|
|
78
|
+
.row {
|
|
86
79
|
width: 100%;
|
|
87
80
|
}
|
|
88
81
|
</style>
|
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<SInputBase
|
|
3
|
-
class="SInputTextarea"
|
|
4
|
-
:class="classes"
|
|
5
|
-
:name="name"
|
|
6
|
-
:label="label"
|
|
7
|
-
:note="note"
|
|
8
|
-
:help="help"
|
|
9
|
-
:hide-error="hideError"
|
|
10
|
-
:validation="validation"
|
|
11
|
-
>
|
|
12
|
-
<textarea
|
|
13
|
-
:id="name"
|
|
14
|
-
class="input"
|
|
15
|
-
:placeholder="placeholder"
|
|
16
|
-
:rows="rows ?? 3"
|
|
17
|
-
:disabled="disabled"
|
|
18
|
-
:value="modelValue ?? ''"
|
|
19
|
-
@input="emitInput"
|
|
20
|
-
@blur="emitBlur"
|
|
21
|
-
/>
|
|
22
|
-
</SInputBase>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
1
|
<script setup lang="ts">
|
|
26
2
|
import { computed } from 'vue'
|
|
27
3
|
import { Validatable } from '../composables/Validation'
|
|
@@ -62,6 +38,30 @@ function emitBlur(e: FocusEvent): void {
|
|
|
62
38
|
}
|
|
63
39
|
</script>
|
|
64
40
|
|
|
41
|
+
<template>
|
|
42
|
+
<SInputBase
|
|
43
|
+
class="SInputTextarea"
|
|
44
|
+
:class="classes"
|
|
45
|
+
:name="name"
|
|
46
|
+
:label="label"
|
|
47
|
+
:note="note"
|
|
48
|
+
:help="help"
|
|
49
|
+
:hide-error="hideError"
|
|
50
|
+
:validation="validation"
|
|
51
|
+
>
|
|
52
|
+
<textarea
|
|
53
|
+
:id="name"
|
|
54
|
+
class="input"
|
|
55
|
+
:placeholder="placeholder"
|
|
56
|
+
:rows="rows ?? 3"
|
|
57
|
+
:disabled="disabled"
|
|
58
|
+
:value="modelValue ?? ''"
|
|
59
|
+
@input="emitInput"
|
|
60
|
+
@blur="emitBlur"
|
|
61
|
+
/>
|
|
62
|
+
</SInputBase>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
65
|
<style lang="postcss" scoped>
|
|
66
66
|
.SInputTextarea.mini {
|
|
67
67
|
.input {
|
package/lib/components/SLink.vue
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component
|
|
3
|
-
:is="component"
|
|
4
|
-
class="SLink"
|
|
5
|
-
:class="{ link: href }"
|
|
6
|
-
:href="href"
|
|
7
|
-
:to="href"
|
|
8
|
-
:target="target"
|
|
9
|
-
:rel="rel"
|
|
10
|
-
>
|
|
11
|
-
<slot />
|
|
12
|
-
</component>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
1
|
<script setup lang="ts">
|
|
16
2
|
import { computed } from 'vue'
|
|
17
3
|
|
|
@@ -34,3 +20,17 @@ const component = computed(() => {
|
|
|
34
20
|
const target = computed(() => isExternal.value ? '_blank' : null)
|
|
35
21
|
const rel = computed(() => isExternal.value ? 'noopener noreferrer' : null)
|
|
36
22
|
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<component
|
|
26
|
+
:is="component"
|
|
27
|
+
class="SLink"
|
|
28
|
+
:class="{ link: href }"
|
|
29
|
+
:href="href"
|
|
30
|
+
:to="href"
|
|
31
|
+
:target="target"
|
|
32
|
+
:rel="rel"
|
|
33
|
+
>
|
|
34
|
+
<slot />
|
|
35
|
+
</component>
|
|
36
|
+
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import { LinkCallback, LinkSubscriberPayload,
|
|
2
|
+
import { computed, nextTick, ref, watch } from 'vue'
|
|
3
|
+
import { LinkCallback, LinkSubscriberPayload, useLink, useMarkdown } from '../composables/Markdown'
|
|
4
4
|
|
|
5
5
|
const props = defineProps<{
|
|
6
6
|
tag?: string
|
|
@@ -29,7 +29,7 @@ watch(
|
|
|
29
29
|
{ immediate: true }
|
|
30
30
|
)
|
|
31
31
|
|
|
32
|
-
subscribe(
|
|
32
|
+
subscribe(payload => emit('clicked', payload))
|
|
33
33
|
</script>
|
|
34
34
|
|
|
35
35
|
<template>
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<svg
|
|
2
|
+
<svg
|
|
3
|
+
class="SSpinner"
|
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
viewBox="0 0 100 100"
|
|
6
|
+
preserveAspectRatio="xMidYMid"
|
|
7
|
+
>
|
|
3
8
|
<g transform="rotate(0 50 50)">
|
|
4
9
|
<rect
|
|
5
10
|
class="bar"
|
|
@@ -19,7 +24,8 @@
|
|
|
19
24
|
repeatCount="indefinite"
|
|
20
25
|
/>
|
|
21
26
|
</rect>
|
|
22
|
-
</g
|
|
27
|
+
</g>
|
|
28
|
+
<g transform="rotate(30 50 50)">
|
|
23
29
|
<rect
|
|
24
30
|
class="bar"
|
|
25
31
|
x="48"
|
|
@@ -38,7 +44,8 @@
|
|
|
38
44
|
repeatCount="indefinite"
|
|
39
45
|
/>
|
|
40
46
|
</rect>
|
|
41
|
-
</g
|
|
47
|
+
</g>
|
|
48
|
+
<g transform="rotate(60 50 50)">
|
|
42
49
|
<rect
|
|
43
50
|
class="bar"
|
|
44
51
|
x="48"
|
|
@@ -57,7 +64,8 @@
|
|
|
57
64
|
repeatCount="indefinite"
|
|
58
65
|
/>
|
|
59
66
|
</rect>
|
|
60
|
-
</g
|
|
67
|
+
</g>
|
|
68
|
+
<g transform="rotate(90 50 50)">
|
|
61
69
|
<rect
|
|
62
70
|
class="bar"
|
|
63
71
|
x="48"
|
|
@@ -76,7 +84,8 @@
|
|
|
76
84
|
repeatCount="indefinite"
|
|
77
85
|
/>
|
|
78
86
|
</rect>
|
|
79
|
-
</g
|
|
87
|
+
</g>
|
|
88
|
+
<g transform="rotate(120 50 50)">
|
|
80
89
|
<rect
|
|
81
90
|
class="bar"
|
|
82
91
|
x="48"
|
|
@@ -95,7 +104,8 @@
|
|
|
95
104
|
repeatCount="indefinite"
|
|
96
105
|
/>
|
|
97
106
|
</rect>
|
|
98
|
-
</g
|
|
107
|
+
</g>
|
|
108
|
+
<g transform="rotate(150 50 50)">
|
|
99
109
|
<rect
|
|
100
110
|
class="bar"
|
|
101
111
|
x="48"
|
|
@@ -114,7 +124,8 @@
|
|
|
114
124
|
repeatCount="indefinite"
|
|
115
125
|
/>
|
|
116
126
|
</rect>
|
|
117
|
-
</g
|
|
127
|
+
</g>
|
|
128
|
+
<g transform="rotate(180 50 50)">
|
|
118
129
|
<rect
|
|
119
130
|
class="bar"
|
|
120
131
|
x="48"
|
|
@@ -133,7 +144,8 @@
|
|
|
133
144
|
repeatCount="indefinite"
|
|
134
145
|
/>
|
|
135
146
|
</rect>
|
|
136
|
-
</g
|
|
147
|
+
</g>
|
|
148
|
+
<g transform="rotate(210 50 50)">
|
|
137
149
|
<rect
|
|
138
150
|
class="bar"
|
|
139
151
|
x="48"
|
|
@@ -152,7 +164,8 @@
|
|
|
152
164
|
repeatCount="indefinite"
|
|
153
165
|
/>
|
|
154
166
|
</rect>
|
|
155
|
-
</g
|
|
167
|
+
</g>
|
|
168
|
+
<g transform="rotate(240 50 50)">
|
|
156
169
|
<rect
|
|
157
170
|
class="bar"
|
|
158
171
|
x="48"
|
|
@@ -171,7 +184,8 @@
|
|
|
171
184
|
repeatCount="indefinite"
|
|
172
185
|
/>
|
|
173
186
|
</rect>
|
|
174
|
-
</g
|
|
187
|
+
</g>
|
|
188
|
+
<g transform="rotate(270 50 50)">
|
|
175
189
|
<rect
|
|
176
190
|
class="bar"
|
|
177
191
|
x="48"
|
|
@@ -190,7 +204,8 @@
|
|
|
190
204
|
repeatCount="indefinite"
|
|
191
205
|
/>
|
|
192
206
|
</rect>
|
|
193
|
-
</g
|
|
207
|
+
</g>
|
|
208
|
+
<g transform="rotate(300 50 50)">
|
|
194
209
|
<rect
|
|
195
210
|
class="bar"
|
|
196
211
|
x="48"
|
|
@@ -209,7 +224,8 @@
|
|
|
209
224
|
repeatCount="indefinite"
|
|
210
225
|
/>
|
|
211
226
|
</rect>
|
|
212
|
-
</g
|
|
227
|
+
</g>
|
|
228
|
+
<g transform="rotate(330 50 50)">
|
|
213
229
|
<rect
|
|
214
230
|
class="bar"
|
|
215
231
|
x="48"
|
package/lib/components/SStep.vue
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import IconCheck from '@iconify-icons/ph/check'
|
|
3
|
+
import IconX from '@iconify-icons/ph/x'
|
|
4
|
+
import { PropType } from 'vue'
|
|
5
|
+
import { BarMode, StepStatus } from '../composables/Step'
|
|
6
|
+
import SIcon from './SIcon.vue'
|
|
7
|
+
|
|
8
|
+
defineProps({
|
|
9
|
+
status: { type: String as PropType<StepStatus>, required: true },
|
|
10
|
+
barLeft: { type: String as PropType<BarMode | null>, default: null },
|
|
11
|
+
barRight: { type: String as PropType<BarMode | null>, default: null },
|
|
12
|
+
text: { type: String, default: null }
|
|
13
|
+
})
|
|
14
|
+
</script>
|
|
15
|
+
|
|
1
16
|
<template>
|
|
2
17
|
<div class="SStep" :class="[status]">
|
|
3
18
|
<div class="indicator">
|
|
@@ -14,21 +29,6 @@
|
|
|
14
29
|
</div>
|
|
15
30
|
</template>
|
|
16
31
|
|
|
17
|
-
<script setup lang="ts">
|
|
18
|
-
import IconCheck from '@iconify-icons/ph/check'
|
|
19
|
-
import IconX from '@iconify-icons/ph/x'
|
|
20
|
-
import { PropType } from 'vue'
|
|
21
|
-
import { StepStatus, BarMode } from '../composables/Step'
|
|
22
|
-
import SIcon from './SIcon.vue'
|
|
23
|
-
|
|
24
|
-
defineProps({
|
|
25
|
-
status: { type: String as PropType<StepStatus>, required: true },
|
|
26
|
-
barLeft: { type: String as PropType<BarMode | null>, default: null },
|
|
27
|
-
barRight: { type: String as PropType<BarMode | null>, default: null },
|
|
28
|
-
text: { type: String, default: null }
|
|
29
|
-
})
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
32
|
<style lang="postcss" scoped>
|
|
33
33
|
.SStep.upcoming {
|
|
34
34
|
.point { border-color: var(--c-divider); }
|