@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.
Files changed (174) hide show
  1. package/CHANGELOG.md +4 -802
  2. package/README.md +1 -1
  3. package/lib/assets/styles/bootstrap.css +1 -2
  4. package/lib/assets/styles/variables.css +14 -47
  5. package/lib/components/SAvatar.vue +9 -18
  6. package/lib/components/SButton.vue +35 -48
  7. package/lib/components/SDialog.vue +16 -34
  8. package/lib/components/SDropdown.vue +36 -55
  9. package/lib/components/SDropdownItem.vue +27 -39
  10. package/lib/components/SDropdownItemText.vue +4 -9
  11. package/lib/components/SDropdownItemUser.vue +4 -12
  12. package/lib/components/SInputBase.vue +33 -45
  13. package/lib/components/SInputCheckbox.vue +19 -35
  14. package/lib/components/SInputDropdown.vue +109 -171
  15. package/lib/components/SInputDropdownItem.vue +26 -32
  16. package/lib/components/SInputDropdownItemText.vue +6 -11
  17. package/lib/components/SInputDropdownItemTextTag.vue +10 -17
  18. package/lib/components/SInputDropdownItemUser.vue +5 -13
  19. package/lib/components/SInputDropdownItemUserTag.vue +9 -16
  20. package/lib/components/SInputFile.vue +38 -53
  21. package/lib/components/SInputHMS.vue +91 -114
  22. package/lib/components/SInputNumber.vue +27 -106
  23. package/lib/components/SInputRadio.vue +23 -33
  24. package/lib/components/SInputRadios.vue +37 -47
  25. package/lib/components/SInputText.vue +59 -633
  26. package/lib/components/SInputTextarea.vue +54 -113
  27. package/lib/components/SInputYMD.vue +94 -105
  28. package/lib/components/SLink.vue +16 -52
  29. package/lib/components/SModal.vue +53 -90
  30. package/lib/components/SPortalModals.vue +37 -53
  31. package/lib/components/SPortalSnackbars.vue +9 -24
  32. package/lib/components/SSheet.vue +10 -23
  33. package/lib/components/SSheetFooter.vue +0 -2
  34. package/lib/components/SSheetFooterAction.vue +9 -14
  35. package/lib/components/SSheetFooterActions.vue +1 -3
  36. package/lib/components/SSheetHeader.vue +9 -24
  37. package/lib/components/SSheetHeaderTitle.vue +1 -3
  38. package/lib/components/SSheetMedium.vue +13 -25
  39. package/lib/components/SSnackbar.vue +18 -28
  40. package/lib/components/icons/SIconSend.vue +5 -0
  41. package/lib/composables/Dialog.ts +9 -17
  42. package/lib/composables/Dropdown.ts +1 -1
  43. package/lib/composables/{Menu.ts → Flyout.ts} +11 -4
  44. package/lib/composables/Form.ts +42 -44
  45. package/lib/composables/Modal.ts +9 -9
  46. package/lib/composables/Snackbar.ts +18 -0
  47. package/lib/composables/Validation.ts +28 -0
  48. package/lib/mixins/Sheet.ts +3 -3
  49. package/lib/store/Sefirot.ts +8 -13
  50. package/lib/store/dialog/index.ts +20 -10
  51. package/lib/store/modal/index.ts +11 -13
  52. package/lib/store/snackbars/index.ts +3 -4
  53. package/lib/support/{Util.ts → Utils.ts} +0 -2
  54. package/lib/types/Utils.ts +0 -7
  55. package/lib/types/vue-shims.d.ts +7 -0
  56. package/lib/validation/rules/checked.ts +6 -10
  57. package/lib/validation/rules/fileExtension.ts +9 -9
  58. package/lib/validation/rules/hms.ts +9 -9
  59. package/lib/validation/rules/index.ts +10 -74
  60. package/lib/validation/rules/maxLength.ts +10 -9
  61. package/lib/validation/rules/minLength.ts +12 -0
  62. package/lib/validation/rules/required.ts +2 -10
  63. package/lib/validation/rules/requiredHms.ts +11 -0
  64. package/lib/validation/rules/requiredIf.ts +3 -11
  65. package/lib/validation/rules/requiredYmd.ts +11 -0
  66. package/lib/validation/rules/ymd.ts +11 -0
  67. package/lib/validation/validators/checked.ts +1 -1
  68. package/lib/validation/validators/fileExtension.ts +1 -1
  69. package/lib/validation/validators/hms.ts +5 -5
  70. package/lib/validation/validators/requiredHms.ts +17 -0
  71. package/lib/validation/validators/requiredYmd.ts +7 -0
  72. package/lib/validation/validators/ymd.ts +41 -0
  73. package/package.json +45 -50
  74. package/lib/components/SAction.vue +0 -37
  75. package/lib/components/SActionAvatar.vue +0 -25
  76. package/lib/components/SActionButton.vue +0 -40
  77. package/lib/components/SActionPill.vue +0 -35
  78. package/lib/components/SActionSwitch.vue +0 -37
  79. package/lib/components/SAlert.vue +0 -145
  80. package/lib/components/SButtonGroup.vue +0 -160
  81. package/lib/components/SCard.vue +0 -111
  82. package/lib/components/SCardFooter.vue +0 -74
  83. package/lib/components/SCardHeader.vue +0 -213
  84. package/lib/components/SGrid.vue +0 -237
  85. package/lib/components/SGridActionLink.vue +0 -53
  86. package/lib/components/SGridActionMulti.vue +0 -139
  87. package/lib/components/SGridActionSingle.vue +0 -64
  88. package/lib/components/SHeader.vue +0 -180
  89. package/lib/components/SInputCheckboxes.vue +0 -83
  90. package/lib/components/SInputDate.vue +0 -192
  91. package/lib/components/SInputDay.vue +0 -87
  92. package/lib/components/SInputMonth.vue +0 -86
  93. package/lib/components/SInputSelect.vue +0 -282
  94. package/lib/components/SInputSwitch.vue +0 -212
  95. package/lib/components/SInputSwitches.vue +0 -108
  96. package/lib/components/SInputTime.vue +0 -255
  97. package/lib/components/SInputYear.vue +0 -60
  98. package/lib/components/SMarkdown.vue +0 -56
  99. package/lib/components/SPlaceholderBlank.vue +0 -113
  100. package/lib/components/SPlaceholderImage.vue +0 -83
  101. package/lib/components/SPortalScreens.vue +0 -62
  102. package/lib/components/SProgressBar.vue +0 -89
  103. package/lib/components/SResponsive.vue +0 -46
  104. package/lib/components/SScreen.vue +0 -81
  105. package/lib/components/SStep.vue +0 -107
  106. package/lib/components/SSteps.vue +0 -75
  107. package/lib/components/STag.vue +0 -67
  108. package/lib/components/STooltip.vue +0 -134
  109. package/lib/components/SWindow.vue +0 -158
  110. package/lib/composables/Action.ts +0 -141
  111. package/lib/composables/Alert.ts +0 -50
  112. package/lib/composables/Card.ts +0 -46
  113. package/lib/composables/FormValidation.ts +0 -150
  114. package/lib/composables/Header.ts +0 -72
  115. package/lib/composables/InputDropdown.ts +0 -6
  116. package/lib/composables/Markdown.ts +0 -138
  117. package/lib/composables/Router.ts +0 -20
  118. package/lib/composables/Step.ts +0 -7
  119. package/lib/composables/Store.ts +0 -9
  120. package/lib/composables/Tag.ts +0 -32
  121. package/lib/composables/Tooltip.ts +0 -91
  122. package/lib/composables/Utils.ts +0 -115
  123. package/lib/composables/markdown/LinkPlugin.ts +0 -45
  124. package/lib/compositions/useForm.ts +0 -17
  125. package/lib/compositions/useResizeObserver.ts +0 -25
  126. package/lib/compositions/useTime.ts +0 -26
  127. package/lib/store/alert/index.ts +0 -32
  128. package/lib/store/screen/index.ts +0 -46
  129. package/lib/types/v-calendar.d.ts +0 -5
  130. package/lib/validation/Validation.ts +0 -151
  131. package/lib/validation/rules/day.ts +0 -11
  132. package/lib/validation/rules/email.ts +0 -11
  133. package/lib/validation/rules/every.ts +0 -38
  134. package/lib/validation/rules/include.ts +0 -11
  135. package/lib/validation/rules/includeSome.ts +0 -11
  136. package/lib/validation/rules/integer.ts +0 -11
  137. package/lib/validation/rules/maxValue.ts +0 -11
  138. package/lib/validation/rules/minValue.ts +0 -11
  139. package/lib/validation/rules/month.ts +0 -11
  140. package/lib/validation/rules/not.ts +0 -10
  141. package/lib/validation/rules/regex.ts +0 -11
  142. package/lib/validation/rules/requiredHMS.ts +0 -11
  143. package/lib/validation/rules/requiredMonthDate.ts +0 -11
  144. package/lib/validation/rules/requiredYearMonth.ts +0 -11
  145. package/lib/validation/rules/requiredYearMonthDate.ts +0 -11
  146. package/lib/validation/rules/rule.ts +0 -5
  147. package/lib/validation/rules/sameAs.ts +0 -11
  148. package/lib/validation/rules/url.ts +0 -11
  149. package/lib/validation/rules/validateIf.ts +0 -27
  150. package/lib/validation/rules/year.ts +0 -11
  151. package/lib/validation/rules/yearMonth.ts +0 -11
  152. package/lib/validation/rules/yearMonthDate.ts +0 -11
  153. package/lib/validation/validators/day.ts +0 -29
  154. package/lib/validation/validators/email.ts +0 -5
  155. package/lib/validation/validators/include.ts +0 -5
  156. package/lib/validation/validators/includeSome.ts +0 -5
  157. package/lib/validation/validators/index.ts +0 -51
  158. package/lib/validation/validators/integer.ts +0 -6
  159. package/lib/validation/validators/maxLength.ts +0 -3
  160. package/lib/validation/validators/maxValue.ts +0 -3
  161. package/lib/validation/validators/minValue.ts +0 -3
  162. package/lib/validation/validators/month.ts +0 -3
  163. package/lib/validation/validators/monthDate.ts +0 -20
  164. package/lib/validation/validators/regex.ts +0 -3
  165. package/lib/validation/validators/required.ts +0 -27
  166. package/lib/validation/validators/requiredHMS.ts +0 -17
  167. package/lib/validation/validators/requiredMonthDate.ts +0 -8
  168. package/lib/validation/validators/requiredYearMonth.ts +0 -8
  169. package/lib/validation/validators/requiredYearMonthDate.ts +0 -9
  170. package/lib/validation/validators/sameAs.ts +0 -5
  171. package/lib/validation/validators/url.ts +0 -5
  172. package/lib/validation/validators/year.ts +0 -3
  173. package/lib/validation/validators/yearMonth.ts +0 -20
  174. package/lib/validation/validators/yearMonthDate.ts +0 -21
@@ -1,99 +1,62 @@
1
1
  <template>
2
- <transition name="fade" :duration="250" appear>
3
- <div ref="el" class="SModal" @click="closeIfClosable">
4
- <transition name="fade">
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
- </transition>
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
- function closeIfClosable(e: SyntheticMouseEvent): void {
58
- if (props.closable) {
59
- if (!isDescendant(e.target)) {
60
- close()
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
- function isDescendant(el: Element): boolean {
66
- if (el.classList && el.classList.contains('SModal-content')) {
67
- return false
68
- }
21
+ const emit = defineEmits(['close'])
69
22
 
70
- const parent = document.getElementsByClassName('SModal-content')[0]
23
+ const el = ref<any>(null)
71
24
 
72
- return parent && parent.contains(el)
73
- }
25
+ onMounted(lock)
26
+ onBeforeUnmount(release)
74
27
 
75
- function lock(): void {
76
- disableBodyScroll(el.value!, { reserveScrollBarGap: true })
77
- }
28
+ function close() {
29
+ emit('close', props.id)
30
+ }
78
31
 
79
- function release(): void {
80
- enableBodyScroll(el.value!)
32
+ function closeIfClosable(e: any): void {
33
+ if (props.closable) {
34
+ if (!isDescendant(e.target)) {
35
+ close()
81
36
  }
37
+ }
38
+ }
82
39
 
83
- return {
84
- el,
85
- contentStyles,
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 .SModal-content,
114
- .SModal.fade-leave-active .SModal-content,
115
- .SModal-content.fade-enter-active,
116
- .SModal-content.fade-leave-active {
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 .SModal-content,
121
- .SModal-content.fade-enter-active {
83
+ .SModal.fade-enter-active .content,
84
+ .content.fade-enter-active {
122
85
  transition-delay: .15s;
123
86
  }
124
87
 
125
- .SModal.fade-enter .SModal-content,
126
- .SModal-content.fade-enter {
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 .SModal-content,
132
- .SModal-content.fade-leave-to {
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
- .SModal-content {
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
- <SModal
5
- v-for="(item, index) in items"
6
- :key="index"
7
- :uid="item.uid"
8
- :show="index === items.length - 1"
9
- :component="item.component"
10
- :data="item.data"
11
- :width="item.options && item.options.width"
12
- :closable="item.options && item.options.closable"
13
- @close="uid => close(uid)"
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 { defineComponent, ref, computed, watch } from '@vue/composition-api'
21
- import { useRoute } from '../composables/Router'
22
- import { useStore } from '../composables/Store'
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
- export default defineComponent({
26
- components: {
27
- SModal
28
- },
26
+ const route = useRoute()
27
+ const store = useStore()
29
28
 
30
- setup() {
31
- const route = useRoute()
32
- const store = useStore()
29
+ const items = computed(() => store.state.modal.items)
30
+ const hasItem = computed(() => items.value.length > 0)
33
31
 
34
- const items = computed(() => store.state.modal.items)
35
- const hasItem = computed(() => items.value.length > 0)
32
+ const isActive = ref(false)
36
33
 
37
- const isActive = ref(false)
34
+ let timer: any
38
35
 
39
- let timer: any
36
+ watch(hasItem, (value) => {
37
+ clearTimeout(timer)
40
38
 
41
- watch(hasItem, (value) => {
42
- clearTimeout(timer)
43
-
44
- value
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
- function close(uid: number) {
52
- store.dispatch('modal/close', uid)
53
- }
44
+ watch(route, closeAll)
54
45
 
55
- function closeAll() {
56
- store.dispatch('modal/closeAll')
57
- }
46
+ function close(id: number) {
47
+ store.dispatch('modal/close', id)
48
+ }
58
49
 
59
- return {
60
- items,
61
- hasItem,
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-active {
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 { defineComponent, computed } from '@vue/composition-api'
19
- import { useStore } from '../composables/Store'
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
- export default defineComponent({
23
- components: {
24
- SSnackbar
25
- },
22
+ const store = useStore()
26
23
 
27
- setup() {
28
- const store = useStore()
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 { PropType, defineComponent } from '@vue/composition-api'
9
- import { useStore } from '../composables/Store'
7
+ <script setup lang="ts">
8
+ import { useStore } from 'vuex'
10
9
 
11
- type Size = 'small' | 'medium' | 'large'
10
+ defineProps<{
11
+ size?: 'small' | 'medium' | 'large'
12
+ }>()
12
13
 
13
- export default defineComponent({
14
- props: {
15
- size: { type: String as PropType<Size>, default: 'medium' }
16
- },
14
+ const store = useStore()
17
15
 
18
- setup() {
19
- const store = useStore()
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);
@@ -5,8 +5,6 @@
5
5
  </template>
6
6
 
7
7
  <style lang="postcss" scoped>
8
- @import "@/assets/styles/variables";
9
-
10
8
  .SSheetFooter {
11
9
  border-top: 1px solid var(--c-divider-light);
12
10
  padding: 0 16px;
@@ -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
- export default defineComponent({
22
- components: {
23
- SButton
24
- },
20
+ defineProps<{
21
+ type?: Type
22
+ mode?: Mode
23
+ label?: string
24
+ }>()
25
25
 
26
- props: {
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 >>> .SSheetFooterAction + .SSheetFooterAction {
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 { defineComponent } from '@vue/composition-api'
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
- export default defineComponent({
19
- components: {
20
- SIconX
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
- function close() {
31
- store.dispatch('modal/close')
32
- }
21
+ const store = useStore()
33
22
 
34
- return {
35
- close
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: 16px;
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: 24px 16px;
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 >>> h1 {
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 >>> h1 + p {
18
+ .SSheetMedium :deep(h1 + p) {
31
19
  margin-top: 8px;
32
20
  }
33
21
 
34
- .SSheetMedium >>> p {
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 >>> p:first-child {
29
+ .SSheetMedium :deep(p:first-child) {
42
30
  margin-top: 0;
43
31
  }
44
32
 
45
- .SSheetMedium >>> p:last-child {
33
+ .SSheetMedium :deep(p:last-child) {
46
34
  margin-bottom: 0;
47
35
  }
48
36
 
49
- .SSheetMedium >>> a {
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 >>> ul {
47
+ .SSheetMedium :deep(ul) {
60
48
  margin: 16px 0;
61
49
  }
62
50
 
63
- .SSheetMedium >>> ul:last-child {
51
+ .SSheetMedium :deep(ul:last-child) {
64
52
  margin-bottom: 0;
65
53
  }
66
54
 
67
- .SSheetMedium >>> li {
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 >>> li::before {
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 >>> li + li {
73
+ .SSheetMedium :deep(li + li) {
86
74
  margin-top: 4px;
87
75
  }
88
76
 
89
- .SSheetMedium >>> li > ul {
77
+ .SSheetMedium :deep(li > ul) {
90
78
  margin: 4px 0 0;
91
79
  }
92
80
  </style>