@globalbrain/sefirot 0.70.1 → 2.0.0-draft.2
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 +4 -802
- 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 +19 -35
- 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 +23 -33
- package/lib/components/SInputRadios.vue +37 -47
- package/lib/components/SInputText.vue +59 -633
- 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 +53 -90
- package/lib/components/SPortalModals.vue +37 -53
- package/lib/components/SPortalSnackbars.vue +9 -24
- package/lib/components/SSheet.vue +10 -23
- package/lib/components/SSheetFooter.vue +0 -2
- package/lib/components/SSheetFooterAction.vue +9 -14
- package/lib/components/SSheetFooterActions.vue +1 -3
- package/lib/components/SSheetHeader.vue +9 -24
- package/lib/components/SSheetHeaderTitle.vue +1 -3
- package/lib/components/SSheetMedium.vue +13 -25
- package/lib/components/SSnackbar.vue +18 -28
- package/lib/components/icons/SIconSend.vue +5 -0
- package/lib/composables/Dialog.ts +9 -17
- package/lib/composables/Dropdown.ts +1 -1
- package/lib/composables/{Menu.ts → Flyout.ts} +11 -4
- package/lib/composables/Form.ts +42 -44
- package/lib/composables/Modal.ts +9 -9
- package/lib/composables/Snackbar.ts +18 -0
- package/lib/composables/Validation.ts +28 -0
- package/lib/mixins/Sheet.ts +3 -3
- package/lib/store/Sefirot.ts +8 -13
- package/lib/store/dialog/index.ts +20 -10
- package/lib/store/modal/index.ts +11 -13
- 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 -83
- 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 -282
- 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/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/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
|
@@ -1,99 +1,62 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<div
|
|
4
|
-
<
|
|
5
|
-
<div
|
|
6
|
-
v-show="show"
|
|
7
|
-
class="SModal-content"
|
|
8
|
-
:style="contentStyles"
|
|
9
|
-
@click="closeIfClosable"
|
|
10
|
-
>
|
|
11
|
-
<component
|
|
12
|
-
:is="resolvedComponent"
|
|
13
|
-
:if="resolvedComponent"
|
|
14
|
-
v-bind="data"
|
|
15
|
-
@close="close"
|
|
16
|
-
/>
|
|
17
|
-
</div>
|
|
18
|
-
</transition>
|
|
2
|
+
<div v-show="show" class="SModal" ref="el" @click="closeIfClosable">
|
|
3
|
+
<div class="content" @click="closeIfClosable">
|
|
4
|
+
<component :is="component" v-bind="data" @close="close" />
|
|
19
5
|
</div>
|
|
20
|
-
</
|
|
6
|
+
</div>
|
|
21
7
|
</template>
|
|
22
8
|
|
|
23
|
-
<script lang="ts">
|
|
9
|
+
<script setup lang="ts">
|
|
10
|
+
import { ref, onMounted, onBeforeUnmount } from 'vue'
|
|
24
11
|
import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock'
|
|
25
|
-
import { defineComponent, ref, computed, onMounted, onUnmounted } from '@vue/composition-api'
|
|
26
|
-
import { SyntheticMouseEvent } from '../types/Utils'
|
|
27
|
-
|
|
28
|
-
export default defineComponent({
|
|
29
|
-
props: {
|
|
30
|
-
component: { type: [Object, Function], default: () => ({}) },
|
|
31
|
-
data: { type: Object, default: () => ({}) },
|
|
32
|
-
uid: { type: Number, default: null },
|
|
33
|
-
show: { type: Boolean, required: true },
|
|
34
|
-
width: { type: String, default: 'auto' },
|
|
35
|
-
closable: { type: Boolean, default: true }
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
setup(props, { emit }) {
|
|
39
|
-
const el = ref<Element | null>(null)
|
|
40
|
-
const resolvedComponent = ref<any>(null)
|
|
41
|
-
|
|
42
|
-
props.component instanceof Function
|
|
43
|
-
? props.component().then((module: any) => { resolvedComponent.value = module.default })
|
|
44
|
-
: (resolvedComponent.value = props.component)
|
|
45
|
-
|
|
46
|
-
const contentStyles = computed(() => ({
|
|
47
|
-
maxWidth: props.width
|
|
48
|
-
}))
|
|
49
|
-
|
|
50
|
-
onMounted(lock)
|
|
51
|
-
onUnmounted(release)
|
|
52
|
-
|
|
53
|
-
function close() {
|
|
54
|
-
emit('close', props.uid)
|
|
55
|
-
}
|
|
56
12
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
id: { type: Number, default: null },
|
|
15
|
+
component: { type: Object, default: () => ({}) },
|
|
16
|
+
data: { type: Object, default: () => ({}) },
|
|
17
|
+
show: { type: Boolean, required: true },
|
|
18
|
+
closable: { type: Boolean, default: true }
|
|
19
|
+
})
|
|
64
20
|
|
|
65
|
-
|
|
66
|
-
if (el.classList && el.classList.contains('SModal-content')) {
|
|
67
|
-
return false
|
|
68
|
-
}
|
|
21
|
+
const emit = defineEmits(['close'])
|
|
69
22
|
|
|
70
|
-
|
|
23
|
+
const el = ref<any>(null)
|
|
71
24
|
|
|
72
|
-
|
|
73
|
-
|
|
25
|
+
onMounted(lock)
|
|
26
|
+
onBeforeUnmount(release)
|
|
74
27
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
28
|
+
function close() {
|
|
29
|
+
emit('close', props.id)
|
|
30
|
+
}
|
|
78
31
|
|
|
79
|
-
|
|
80
|
-
|
|
32
|
+
function closeIfClosable(e: any): void {
|
|
33
|
+
if (props.closable) {
|
|
34
|
+
if (!isDescendant(e.target)) {
|
|
35
|
+
close()
|
|
81
36
|
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
82
39
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
resolvedComponent,
|
|
87
|
-
close,
|
|
88
|
-
closeIfClosable
|
|
89
|
-
}
|
|
40
|
+
function isDescendant(el: any): boolean {
|
|
41
|
+
if (el.classList && el.classList.contains('content')) {
|
|
42
|
+
return false
|
|
90
43
|
}
|
|
91
|
-
|
|
44
|
+
|
|
45
|
+
const parent = document.getElementsByClassName('content')[0]
|
|
46
|
+
|
|
47
|
+
return parent && parent.contains(el)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function lock(): void {
|
|
51
|
+
disableBodyScroll(el.value!, { reserveScrollBarGap: true })
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function release(): void {
|
|
55
|
+
enableBodyScroll(el.value!)
|
|
56
|
+
}
|
|
92
57
|
</script>
|
|
93
58
|
|
|
94
59
|
<style lang="postcss" scoped>
|
|
95
|
-
@import "@/assets/styles/variables";
|
|
96
|
-
|
|
97
60
|
.SModal {
|
|
98
61
|
position: absolute;
|
|
99
62
|
top: 0;
|
|
@@ -110,31 +73,31 @@ export default defineComponent({
|
|
|
110
73
|
}
|
|
111
74
|
}
|
|
112
75
|
|
|
113
|
-
.SModal.fade-enter-active .
|
|
114
|
-
.SModal.fade-leave-active .
|
|
115
|
-
.
|
|
116
|
-
.
|
|
76
|
+
.SModal.fade-enter-active .content,
|
|
77
|
+
.SModal.fade-leave-active .content,
|
|
78
|
+
.content.fade-enter-active,
|
|
79
|
+
.content.fade-leave-active {
|
|
117
80
|
transition: opacity .25s, transform .25s;
|
|
118
81
|
}
|
|
119
82
|
|
|
120
|
-
.SModal.fade-enter-active .
|
|
121
|
-
.
|
|
83
|
+
.SModal.fade-enter-active .content,
|
|
84
|
+
.content.fade-enter-active {
|
|
122
85
|
transition-delay: .15s;
|
|
123
86
|
}
|
|
124
87
|
|
|
125
|
-
.SModal.fade-enter .
|
|
126
|
-
.
|
|
88
|
+
.SModal.fade-enter-from .content,
|
|
89
|
+
.content.fade-enter-from {
|
|
127
90
|
opacity: 0;
|
|
128
91
|
transform: translateY(8px);
|
|
129
92
|
}
|
|
130
93
|
|
|
131
|
-
.SModal.fade-leave-to .
|
|
132
|
-
.
|
|
94
|
+
.SModal.fade-leave-to .content,
|
|
95
|
+
.content.fade-leave-to {
|
|
133
96
|
opacity: 0;
|
|
134
97
|
transform: translateY(-8px);
|
|
135
98
|
}
|
|
136
99
|
|
|
137
|
-
.
|
|
100
|
+
.content {
|
|
138
101
|
margin: 0 auto;
|
|
139
102
|
transition: opacity .25s, transform .25s;
|
|
140
103
|
}
|
|
@@ -1,74 +1,58 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<transition name="fade">
|
|
3
3
|
<div v-if="isActive" class="SPortalModals">
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
<transition-group name="fade" :duration="250" appear>
|
|
5
|
+
<SModal
|
|
6
|
+
v-for="(item, index) in items"
|
|
7
|
+
:key="item.id"
|
|
8
|
+
:id="item.id"
|
|
9
|
+
:show="index === items.length - 1"
|
|
10
|
+
:component="item.component"
|
|
11
|
+
:data="item.data"
|
|
12
|
+
:closable="item.options && item.options.closable"
|
|
13
|
+
@close="id => close(id)"
|
|
14
|
+
/>
|
|
15
|
+
</transition-group>
|
|
15
16
|
</div>
|
|
16
17
|
</transition>
|
|
17
18
|
</template>
|
|
18
19
|
|
|
19
|
-
<script lang="ts">
|
|
20
|
-
import {
|
|
21
|
-
import { useRoute } from '
|
|
22
|
-
import { useStore } from '
|
|
20
|
+
<script setup lang="ts">
|
|
21
|
+
import { ref, computed, watch } from 'vue'
|
|
22
|
+
import { useRoute } from 'vue-router'
|
|
23
|
+
import { useStore } from 'vuex'
|
|
23
24
|
import SModal from './SModal.vue'
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
SModal
|
|
28
|
-
},
|
|
26
|
+
const route = useRoute()
|
|
27
|
+
const store = useStore()
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const store = useStore()
|
|
29
|
+
const items = computed(() => store.state.modal.items)
|
|
30
|
+
const hasItem = computed(() => items.value.length > 0)
|
|
33
31
|
|
|
34
|
-
|
|
35
|
-
const hasItem = computed(() => items.value.length > 0)
|
|
32
|
+
const isActive = ref(false)
|
|
36
33
|
|
|
37
|
-
|
|
34
|
+
let timer: any
|
|
38
35
|
|
|
39
|
-
|
|
36
|
+
watch(hasItem, (value) => {
|
|
37
|
+
clearTimeout(timer)
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
? (isActive.value = true)
|
|
46
|
-
: (timer = setTimeout(() => { isActive.value = false }, 250))
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
watch(route, closeAll)
|
|
39
|
+
value
|
|
40
|
+
? (isActive.value = true)
|
|
41
|
+
: (timer = setTimeout(() => { isActive.value = false }, 250))
|
|
42
|
+
})
|
|
50
43
|
|
|
51
|
-
|
|
52
|
-
store.dispatch('modal/close', uid)
|
|
53
|
-
}
|
|
44
|
+
watch(route, closeAll)
|
|
54
45
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
46
|
+
function close(id: number) {
|
|
47
|
+
store.dispatch('modal/close', id)
|
|
48
|
+
}
|
|
58
49
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
isActive,
|
|
63
|
-
close
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
})
|
|
50
|
+
function closeAll() {
|
|
51
|
+
store.dispatch('modal/closeAll')
|
|
52
|
+
}
|
|
67
53
|
</script>
|
|
68
54
|
|
|
69
55
|
<style lang="postcss" scoped>
|
|
70
|
-
@import "@/assets/styles/variables";
|
|
71
|
-
|
|
72
56
|
.SPortalModals {
|
|
73
57
|
position: fixed;
|
|
74
58
|
top: 0;
|
|
@@ -84,8 +68,8 @@ export default defineComponent({
|
|
|
84
68
|
transition: opacity .25s;
|
|
85
69
|
}
|
|
86
70
|
|
|
87
|
-
.SPortalModals.fade-enter,
|
|
88
|
-
.SPortalModals.fade-leave-
|
|
71
|
+
.SPortalModals.fade-enter-from,
|
|
72
|
+
.SPortalModals.fade-leave-to {
|
|
89
73
|
opacity: 0;
|
|
90
74
|
}
|
|
91
75
|
</style>
|
|
@@ -14,33 +14,18 @@
|
|
|
14
14
|
</transition>
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
|
-
<script lang="ts">
|
|
18
|
-
import {
|
|
19
|
-
import { useStore } from '
|
|
17
|
+
<script setup lang="ts">
|
|
18
|
+
import { computed } from 'vue'
|
|
19
|
+
import { useStore } from 'vuex'
|
|
20
20
|
import SSnackbar from './SSnackbar.vue'
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
components: {
|
|
24
|
-
SSnackbar
|
|
25
|
-
},
|
|
22
|
+
const store = useStore()
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const items = computed(() => store.state.snackbars.items)
|
|
31
|
-
const hasItem = computed(() => items.value.length > 0)
|
|
32
|
-
|
|
33
|
-
return {
|
|
34
|
-
items,
|
|
35
|
-
hasItem
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
})
|
|
24
|
+
const items = computed(() => store.state.snackbars.items)
|
|
25
|
+
const hasItem = computed(() => items.value.length > 0)
|
|
39
26
|
</script>
|
|
40
27
|
|
|
41
28
|
<style lang="postcss" scoped>
|
|
42
|
-
@import "@/assets/styles/variables";
|
|
43
|
-
|
|
44
29
|
.SPortalSnackbars {
|
|
45
30
|
position: fixed;
|
|
46
31
|
bottom: 0;
|
|
@@ -56,7 +41,7 @@ export default defineComponent({
|
|
|
56
41
|
}
|
|
57
42
|
}
|
|
58
43
|
|
|
59
|
-
.SPortalSnackbars.fade-enter {
|
|
44
|
+
.SPortalSnackbars.fade-enter-from {
|
|
60
45
|
opacity: 0;
|
|
61
46
|
transform: translateY(48px);
|
|
62
47
|
}
|
|
@@ -79,12 +64,12 @@ export default defineComponent({
|
|
|
79
64
|
position: absolute;
|
|
80
65
|
}
|
|
81
66
|
|
|
82
|
-
.item.fade-up-enter,
|
|
67
|
+
.item.fade-up-enter-from,
|
|
83
68
|
.item.fade-up-leave-to {
|
|
84
69
|
opacity: 0;
|
|
85
70
|
}
|
|
86
71
|
|
|
87
|
-
.item.fade-up-enter {
|
|
72
|
+
.item.fade-up-enter-from {
|
|
88
73
|
transform: translateY(48px);
|
|
89
74
|
}
|
|
90
75
|
</style>
|
|
@@ -1,37 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<article class="SSheet" :class="[size]">
|
|
2
|
+
<article class="SSheet" :class="[size ?? 'medium']">
|
|
3
3
|
<slot :close="close" />
|
|
4
4
|
</article>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
|
-
<script lang="ts">
|
|
8
|
-
import {
|
|
9
|
-
import { useStore } from '../composables/Store'
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
import { useStore } from 'vuex'
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
defineProps<{
|
|
11
|
+
size?: 'small' | 'medium' | 'large'
|
|
12
|
+
}>()
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
props: {
|
|
15
|
-
size: { type: String as PropType<Size>, default: 'medium' }
|
|
16
|
-
},
|
|
14
|
+
const store = useStore()
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
function close() {
|
|
22
|
-
store.dispatch('modal/close')
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return {
|
|
26
|
-
close
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
})
|
|
16
|
+
function close() {
|
|
17
|
+
store.dispatch('modal/close')
|
|
18
|
+
}
|
|
30
19
|
</script>
|
|
31
20
|
|
|
32
21
|
<style lang="postcss" scoped>
|
|
33
|
-
@import "@/assets/styles/variables";
|
|
34
|
-
|
|
35
22
|
.SSheet {
|
|
36
23
|
margin: 0 auto;
|
|
37
24
|
border: 1px solid var(--c-divider-light);
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<div class="SSheetFooterAction">
|
|
3
3
|
<SButton
|
|
4
4
|
size="medium"
|
|
5
|
-
:type="type"
|
|
6
|
-
:mode="mode"
|
|
5
|
+
:type="type ?? 'primary'"
|
|
6
|
+
:mode="mode ?? 'neutral'"
|
|
7
7
|
:label="label"
|
|
8
8
|
block
|
|
9
9
|
@click="$emit('click')"
|
|
@@ -11,22 +11,17 @@
|
|
|
11
11
|
</div>
|
|
12
12
|
</template>
|
|
13
13
|
|
|
14
|
-
<script lang="ts">
|
|
15
|
-
import { PropType, defineComponent } from '@nuxtjs/composition-api'
|
|
14
|
+
<script setup lang="ts">
|
|
16
15
|
import SButton from './SButton.vue'
|
|
17
16
|
|
|
18
17
|
type Type = 'primary' | 'secondary' | 'tertiary' | 'text' | 'mute'
|
|
19
18
|
type Mode = 'neutral' | 'info' | 'success' | 'warning' | 'danger'
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
defineProps<{
|
|
21
|
+
type?: Type
|
|
22
|
+
mode?: Mode
|
|
23
|
+
label?: string
|
|
24
|
+
}>()
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
type: { type: String as PropType<Type>, default: 'primary' },
|
|
28
|
-
mode: { type: String as PropType<Mode>, default: 'neutral' },
|
|
29
|
-
label: { type: String, default: null }
|
|
30
|
-
}
|
|
31
|
-
})
|
|
26
|
+
defineEmits(['click'])
|
|
32
27
|
</script>
|
|
@@ -5,15 +5,13 @@
|
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<style lang="postcss" scoped>
|
|
8
|
-
@import "@/assets/styles/variables";
|
|
9
|
-
|
|
10
8
|
.SSheetFooterActions {
|
|
11
9
|
display: flex;
|
|
12
10
|
justify-content: flex-end;
|
|
13
11
|
padding: 12px 0 11px;
|
|
14
12
|
}
|
|
15
13
|
|
|
16
|
-
.SSheetFooterActions
|
|
14
|
+
.SSheetFooterActions :deep(.SSheetFooterAction + .SSheetFooterAction) {
|
|
17
15
|
padding-left: 8px;
|
|
18
16
|
}
|
|
19
17
|
</style>
|
|
@@ -10,37 +10,22 @@
|
|
|
10
10
|
</header>
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
|
-
<script lang="ts">
|
|
14
|
-
import {
|
|
15
|
-
import { useStore } from '../composables/Store'
|
|
13
|
+
<script setup lang="ts">
|
|
14
|
+
import { useStore } from 'vuex'
|
|
16
15
|
import SIconX from './icons/SIconX.vue'
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
props: {
|
|
24
|
-
closable: { type: Boolean, default: true }
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
setup() {
|
|
28
|
-
const store = useStore()
|
|
17
|
+
defineProps({
|
|
18
|
+
closable: { type: Boolean, default: true }
|
|
19
|
+
})
|
|
29
20
|
|
|
30
|
-
|
|
31
|
-
store.dispatch('modal/close')
|
|
32
|
-
}
|
|
21
|
+
const store = useStore()
|
|
33
22
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
})
|
|
23
|
+
function close() {
|
|
24
|
+
store.dispatch('modal/close')
|
|
25
|
+
}
|
|
39
26
|
</script>
|
|
40
27
|
|
|
41
28
|
<style lang="postcss" scoped>
|
|
42
|
-
@import "@/assets/styles/variables";
|
|
43
|
-
|
|
44
29
|
.SSheetHeader {
|
|
45
30
|
display: flex;
|
|
46
31
|
justify-content: space-between;
|
|
@@ -5,13 +5,11 @@
|
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<style lang="postcss" scoped>
|
|
8
|
-
@import "@/assets/styles/variables";
|
|
9
|
-
|
|
10
8
|
.SSheetHeaderTitle {
|
|
11
9
|
margin: 0;
|
|
12
10
|
padding: 14px 16px 10px;
|
|
13
11
|
line-height: 20px;
|
|
14
|
-
font-size:
|
|
12
|
+
font-size: 14px;
|
|
15
13
|
font-weight: 500;
|
|
16
14
|
}
|
|
17
15
|
</style>
|
|
@@ -5,48 +5,36 @@
|
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<style lang="postcss" scoped>
|
|
8
|
-
@import "@/assets/styles/variables";
|
|
9
|
-
|
|
10
8
|
.SSheetMedium {
|
|
11
|
-
padding:
|
|
12
|
-
|
|
13
|
-
@media (min-width: 768px) {
|
|
14
|
-
padding: 24px;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.SSheet.small .SSheetMedium {
|
|
19
|
-
@media (min-width: 768px) {
|
|
20
|
-
padding: 24px 16px;
|
|
21
|
-
}
|
|
9
|
+
padding: 16px;
|
|
22
10
|
}
|
|
23
11
|
|
|
24
|
-
.SSheetMedium
|
|
12
|
+
.SSheetMedium :deep(h1) {
|
|
25
13
|
line-height: 32px;
|
|
26
14
|
font-size: 20px;
|
|
27
15
|
font-weight: 500;
|
|
28
16
|
}
|
|
29
17
|
|
|
30
|
-
.SSheetMedium
|
|
18
|
+
.SSheetMedium :deep(h1 + p) {
|
|
31
19
|
margin-top: 8px;
|
|
32
20
|
}
|
|
33
21
|
|
|
34
|
-
.SSheetMedium
|
|
22
|
+
.SSheetMedium :deep(p) {
|
|
35
23
|
margin: 16px 0;
|
|
36
24
|
line-height: 24px;
|
|
37
25
|
font-size: 14px;
|
|
38
26
|
font-weight: 400;
|
|
39
27
|
}
|
|
40
28
|
|
|
41
|
-
.SSheetMedium
|
|
29
|
+
.SSheetMedium :deep(p:first-child) {
|
|
42
30
|
margin-top: 0;
|
|
43
31
|
}
|
|
44
32
|
|
|
45
|
-
.SSheetMedium
|
|
33
|
+
.SSheetMedium :deep(p:last-child) {
|
|
46
34
|
margin-bottom: 0;
|
|
47
35
|
}
|
|
48
36
|
|
|
49
|
-
.SSheetMedium
|
|
37
|
+
.SSheetMedium :deep(a) {
|
|
50
38
|
font-weight: 500;
|
|
51
39
|
color: var(--c-info);
|
|
52
40
|
transition: color .25s;
|
|
@@ -56,22 +44,22 @@
|
|
|
56
44
|
}
|
|
57
45
|
}
|
|
58
46
|
|
|
59
|
-
.SSheetMedium
|
|
47
|
+
.SSheetMedium :deep(ul) {
|
|
60
48
|
margin: 16px 0;
|
|
61
49
|
}
|
|
62
50
|
|
|
63
|
-
.SSheetMedium
|
|
51
|
+
.SSheetMedium :deep(ul:last-child) {
|
|
64
52
|
margin-bottom: 0;
|
|
65
53
|
}
|
|
66
54
|
|
|
67
|
-
.SSheetMedium
|
|
55
|
+
.SSheetMedium :deep(li) {
|
|
68
56
|
position: relative;
|
|
69
57
|
padding-left: 20px;
|
|
70
58
|
font-size: 14px;
|
|
71
59
|
font-weight: 400;
|
|
72
60
|
}
|
|
73
61
|
|
|
74
|
-
.SSheetMedium
|
|
62
|
+
.SSheetMedium :deep(li::before) {
|
|
75
63
|
position: absolute;
|
|
76
64
|
top: 9px;
|
|
77
65
|
left: 4px;
|
|
@@ -82,11 +70,11 @@
|
|
|
82
70
|
content: "";
|
|
83
71
|
}
|
|
84
72
|
|
|
85
|
-
.SSheetMedium
|
|
73
|
+
.SSheetMedium :deep(li + li) {
|
|
86
74
|
margin-top: 4px;
|
|
87
75
|
}
|
|
88
76
|
|
|
89
|
-
.SSheetMedium
|
|
77
|
+
.SSheetMedium :deep(li > ul) {
|
|
90
78
|
margin: 4px 0 0;
|
|
91
79
|
}
|
|
92
80
|
</style>
|