@opendesign-plus/components 0.0.1-rc.2 → 0.0.1-rc.20

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 (203) hide show
  1. package/dist/chunk-OElCookieNotice.cjs.js +1 -0
  2. package/dist/chunk-OElCookieNotice.es.js +839 -0
  3. package/dist/components/OBanner.vue.d.ts +10 -1
  4. package/dist/components/OCookieNotice.vue.d.ts +6 -5
  5. package/dist/components/OFooter.vue.d.ts +46 -0
  6. package/dist/components/OHeaderSearch.vue.d.ts +4 -4
  7. package/dist/components/OHeaderUser.vue.d.ts +40 -0
  8. package/dist/components/OSourceCode.vue.d.ts +20 -0
  9. package/dist/components/activity/OActivityApproval.vue.d.ts +277 -0
  10. package/dist/components/activity/OActivityForm.vue.d.ts +140 -0
  11. package/dist/components/activity/OMyActivityCalendar.vue.d.ts +578 -0
  12. package/dist/components/activity/composables/useActivityConfig.d.ts +17 -0
  13. package/dist/components/activity/config.d.ts +1 -0
  14. package/dist/components/activity/index.d.ts +623 -0
  15. package/dist/components/activity/types.d.ts +81 -0
  16. package/dist/components/element-plus/OElCookieNotice.vue.d.ts +34 -0
  17. package/dist/components/element-plus/index.d.ts +2 -0
  18. package/dist/components/events/OEventsApply.vue.d.ts +16 -0
  19. package/dist/components/events/OEventsCalendar.vue.d.ts +5 -0
  20. package/dist/components/events/OEventsList.vue.d.ts +26 -0
  21. package/dist/components/events/config.d.ts +27 -0
  22. package/dist/components/events/index.d.ts +78 -0
  23. package/dist/components/events/types.d.ts +66 -0
  24. package/dist/components/events/utils.d.ts +7 -0
  25. package/dist/components/header/OHeader.vue.d.ts +30 -0
  26. package/dist/components/header/OHeaderMobile.vue.d.ts +171 -0
  27. package/dist/components/header/components/HeaderContent.vue.d.ts +13 -0
  28. package/dist/components/header/components/HeaderNav.vue.d.ts +19 -0
  29. package/dist/components/header/components/HeaderNavMobile.vue.d.ts +33 -0
  30. package/dist/components/header/index.d.ts +145 -0
  31. package/dist/components/header/types.d.ts +80 -0
  32. package/dist/components/meeting/OMeetingCalendar.vue.d.ts +299 -0
  33. package/dist/components/meeting/OMeetingForm.vue.d.ts +145 -0
  34. package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +586 -0
  35. package/dist/components/meeting/OSigMeetingCalendar.vue.d.ts +24 -0
  36. package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +28 -0
  37. package/dist/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +664 -0
  38. package/dist/components/meeting/components/OMeetingDetail.vue.d.ts +13 -0
  39. package/dist/components/meeting/components/OMeetingPlaybackSubtitles.vue.d.ts +5 -0
  40. package/dist/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +17 -0
  41. package/dist/components/meeting/components/OSigMeetingAside.vue.d.ts +16 -0
  42. package/dist/components/meeting/composables/useMeetingConfig.d.ts +14 -0
  43. package/dist/components/meeting/config.d.ts +12 -0
  44. package/dist/components/meeting/types.d.ts +168 -0
  45. package/dist/components/meeting/utils.d.ts +8 -0
  46. package/dist/components.cjs.js +224 -1
  47. package/dist/components.css +1 -1
  48. package/dist/components.element.cjs.js +1 -0
  49. package/dist/components.element.es.js +4 -0
  50. package/dist/components.es.js +44348 -785
  51. package/dist/index.d.ts +9 -2
  52. package/docs/design.md +27 -27
  53. package/docs/design_banner.md +41 -41
  54. package/docs/design_section.md +27 -27
  55. package/package.json +12 -3
  56. package/scripts/generate-components-index.js +103 -80
  57. package/src/assets/events/svg-icons/icon-checked.svg +3 -0
  58. package/src/assets/events/svg-icons/icon-competition.svg +7 -0
  59. package/src/assets/events/svg-icons/icon-events.svg +4 -0
  60. package/src/assets/events/svg-icons/icon-release.svg +4 -0
  61. package/src/assets/events/svg-icons/icon-summit.svg +4 -0
  62. package/src/assets/meeting/svg-icons/icon-all.svg +3 -0
  63. package/src/assets/meeting/svg-icons/icon-backward.svg +4 -0
  64. package/src/assets/meeting/svg-icons/icon-calendar.svg +3 -0
  65. package/src/assets/meeting/svg-icons/icon-cancel.svg +4 -0
  66. package/src/assets/meeting/svg-icons/icon-captions.svg +4 -0
  67. package/src/assets/meeting/svg-icons/icon-close-captions.svg +6 -0
  68. package/src/assets/meeting/svg-icons/icon-close-fullscreen.svg +6 -0
  69. package/src/assets/meeting/svg-icons/icon-copy.svg +3 -0
  70. package/src/assets/meeting/svg-icons/icon-create.svg +5 -0
  71. package/src/assets/meeting/svg-icons/icon-delete.svg +7 -0
  72. package/src/assets/meeting/svg-icons/icon-empty.svg +31 -0
  73. package/src/assets/meeting/svg-icons/icon-empty_dark.svg +49 -0
  74. package/src/assets/meeting/svg-icons/icon-event.svg +3 -0
  75. package/src/assets/meeting/svg-icons/icon-export.svg +3 -0
  76. package/src/assets/meeting/svg-icons/icon-forward.svg +4 -0
  77. package/src/assets/meeting/svg-icons/icon-fullscreen.svg +6 -0
  78. package/src/assets/meeting/svg-icons/icon-help.svg +3 -0
  79. package/src/assets/meeting/svg-icons/icon-important.svg +4 -0
  80. package/src/assets/meeting/svg-icons/icon-info.svg +3 -0
  81. package/src/assets/meeting/svg-icons/icon-meet.svg +3 -0
  82. package/src/assets/meeting/svg-icons/icon-meeting-message.svg +5 -0
  83. package/src/assets/meeting/svg-icons/icon-meeting.svg +4 -0
  84. package/src/assets/meeting/svg-icons/icon-play.svg +5 -0
  85. package/src/assets/meeting/svg-icons/icon-playing-tip.svg +7 -0
  86. package/src/assets/meeting/svg-icons/icon-playing.svg +5 -0
  87. package/src/assets/meeting/svg-icons/icon-question.svg +4 -0
  88. package/src/assets/meeting/svg-icons/icon-sound.svg +5 -0
  89. package/src/assets/meeting/svg-icons/icon-speaker.svg +3 -0
  90. package/src/assets/meeting/svg-icons/icon-summit.svg +3 -0
  91. package/src/assets/meeting/svg-icons/icon-telligent.svg +3 -0
  92. package/src/assets/meeting/svg-icons/icon-tip.svg +3 -0
  93. package/src/assets/meeting/svg-icons/icon-todo.svg +4 -0
  94. package/src/assets/meeting/transparent.png +0 -0
  95. package/src/assets/svg-icons/icon-arrow-left.svg +3 -0
  96. package/src/assets/svg-icons/icon-avatar-line.svg +3 -0
  97. package/src/assets/svg-icons/icon-caret-left.svg +3 -0
  98. package/src/assets/svg-icons/icon-caret-right.svg +3 -0
  99. package/src/assets/svg-icons/icon-chevron-down.svg +3 -0
  100. package/src/assets/svg-icons/icon-chevron-right.svg +3 -3
  101. package/src/assets/svg-icons/icon-chevron-up.svg +3 -0
  102. package/src/assets/svg-icons/icon-close.svg +3 -3
  103. package/src/assets/svg-icons/icon-delete.svg +3 -3
  104. package/src/assets/svg-icons/icon-filter.svg +3 -0
  105. package/src/assets/svg-icons/icon-header-back.svg +3 -3
  106. package/src/assets/svg-icons/icon-header-delete.svg +3 -3
  107. package/src/assets/svg-icons/icon-header-menu.svg +3 -0
  108. package/src/assets/svg-icons/icon-header-person.svg +3 -0
  109. package/src/assets/svg-icons/icon-header-search.svg +4 -4
  110. package/src/assets/svg-icons/icon-loading.svg +4 -0
  111. package/src/assets/svg-icons/icon-locale.svg +3 -0
  112. package/src/assets/svg-icons/icon-log-off.svg +3 -0
  113. package/src/assets/svg-icons/icon-message.svg +3 -0
  114. package/src/assets/svg-icons/icon-moon.svg +3 -3
  115. package/src/assets/svg-icons/icon-outlink.svg +3 -0
  116. package/src/assets/svg-icons/icon-overview.svg +3 -0
  117. package/src/assets/svg-icons/icon-search.svg +3 -0
  118. package/src/assets/svg-icons/icon-setting.svg +3 -0
  119. package/src/assets/svg-icons/icon-sun.svg +3 -3
  120. package/src/assets/svg-icons/icon-tips.svg +3 -0
  121. package/src/components/OBanner.vue +398 -390
  122. package/src/components/OCookieNotice.vue +575 -424
  123. package/src/components/OFooter.vue +576 -0
  124. package/src/components/OHeaderSearch.vue +601 -601
  125. package/src/components/OHeaderUser.vue +237 -0
  126. package/src/components/OPlusConfigProvider.vue +32 -32
  127. package/src/components/OSection.vue +178 -178
  128. package/src/components/OSourceCode.vue +153 -0
  129. package/src/components/OThemeSwitcher.vue +108 -108
  130. package/src/components/activity/OActivityApproval.vue +864 -0
  131. package/src/components/activity/OActivityForm.vue +542 -0
  132. package/src/components/activity/OMyActivityCalendar.vue +1486 -0
  133. package/src/components/activity/composables/useActivityConfig.ts +141 -0
  134. package/src/components/activity/config.ts +1 -0
  135. package/src/components/activity/index.ts +24 -0
  136. package/src/components/activity/types.ts +88 -0
  137. package/src/components/common/AppAvatar.vue +83 -0
  138. package/src/components/common/ClientOnlyWrapper.ts +21 -21
  139. package/src/components/common/ContentWrapper.vue +85 -85
  140. package/src/components/common/MoreText.vue +124 -0
  141. package/src/components/common/ThFilter.vue +330 -0
  142. package/src/components/element-plus/OElCookieNotice.vue +603 -0
  143. package/src/components/element-plus/index.ts +3 -0
  144. package/src/components/events/OEventsApply.vue +418 -0
  145. package/src/components/events/OEventsCalendar.vue +598 -0
  146. package/src/components/events/OEventsList.vue +362 -0
  147. package/src/components/events/config.ts +35 -0
  148. package/src/components/events/index.ts +24 -0
  149. package/src/components/events/types.ts +80 -0
  150. package/src/components/events/utils.ts +9 -0
  151. package/src/components/header/OHeader.vue +157 -0
  152. package/src/components/header/OHeaderMobile.vue +177 -0
  153. package/src/components/header/components/HeaderContent.vue +1121 -0
  154. package/src/components/header/components/HeaderNav.vue +278 -0
  155. package/src/components/header/components/HeaderNavMobile.vue +377 -0
  156. package/src/components/header/index.ts +16 -0
  157. package/src/components/header/types.ts +91 -0
  158. package/src/components/meeting/OMeetingCalendar.vue +878 -0
  159. package/src/components/meeting/OMeetingForm.vue +1053 -0
  160. package/src/components/meeting/OMeetingPlayback.vue +439 -0
  161. package/src/components/meeting/OMyMeetingCalendar.vue +1497 -0
  162. package/src/components/meeting/OSigMeetingCalendar.vue +410 -0
  163. package/src/components/meeting/components/OMeetingCalendarList.vue +510 -0
  164. package/src/components/meeting/components/OMeetingCalendarSelector.vue +206 -0
  165. package/src/components/meeting/components/OMeetingDetail.vue +229 -0
  166. package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +611 -0
  167. package/src/components/meeting/components/OMeetingPlaybackVideo.vue +741 -0
  168. package/src/components/meeting/components/OSigMeetingAside.vue +200 -0
  169. package/src/components/meeting/composables/useMeetingConfig.ts +108 -0
  170. package/src/components/meeting/config.ts +48 -0
  171. package/src/components/meeting/index.ts +45 -0
  172. package/src/components/meeting/types.ts +195 -0
  173. package/src/components/meeting/utils.ts +70 -0
  174. package/src/draft/Banner.vue +265 -265
  175. package/src/draft/ButtonCards.vue +105 -105
  176. package/src/draft/Feature.vue +133 -133
  177. package/src/draft/Footer.vue +512 -512
  178. package/src/draft/HorizontalAnchor.vue +165 -165
  179. package/src/draft/ItemSwiper.vue +133 -133
  180. package/src/draft/Logo.vue +141 -141
  181. package/src/draft/LogoCard.vue +74 -74
  182. package/src/draft/LogoV2.vue +19 -19
  183. package/src/draft/MainCard.vue +38 -38
  184. package/src/draft/MultiCard.vue +94 -94
  185. package/src/draft/MultiIconCard.vue +73 -73
  186. package/src/draft/OInfoCard.vue +176 -176
  187. package/src/draft/Process.vue +81 -81
  188. package/src/draft/Section.vue +167 -167
  189. package/src/draft/SingleTabCard.vue +84 -84
  190. package/src/draft/SliderCard.vue +110 -110
  191. package/src/env.d.ts +16 -1
  192. package/src/i18n/en.ts +264 -20
  193. package/src/i18n/index.ts +56 -42
  194. package/src/i18n/zh.ts +253 -9
  195. package/src/index.ts +14 -3
  196. package/src/shared/provide.ts +6 -6
  197. package/src/shims-vue-dompurify-html.d.ts +17 -0
  198. package/src/vue.d.ts +9 -9
  199. package/tsconfig.json +37 -33
  200. package/vite.config.ts +118 -94
  201. package/dist/components/OCookieNoticeEl.vue.d.ts +0 -29
  202. package/dist/components.umd.js +0 -1
  203. package/src/components/OCookieNoticeEl.vue +0 -404
@@ -0,0 +1,237 @@
1
+ <script setup lang="ts">
2
+ import { OIcon, OBadge, ODropdown, ODropdownItem } from '@opensig/opendesign';
3
+
4
+ import AppAvatar from './common/AppAvatar.vue';
5
+
6
+ import IconAvatar from '~icons/components/icon-avatar-line.svg';
7
+ import IconChevronDown from '~icons/components/icon-chevron-down.svg';
8
+
9
+ import { useScreen } from '@opendesign-plus/composables';
10
+
11
+ const { lePadV } = useScreen();
12
+
13
+ interface UserInfoT {
14
+ photo: string;
15
+ username: string;
16
+ }
17
+
18
+ interface OptionsItemT {
19
+ id: string; // id
20
+ label: string; // 标题
21
+ icon?: string; // icon
22
+ url: string; // 跳转链接
23
+ target: string; // 跳转方式
24
+ total: number; // 消息数量
25
+ logout: boolean; // 是否是退出登录 item
26
+ }
27
+
28
+ interface UserPropsT {
29
+ token?: string;
30
+ lang?: string;
31
+ noticeTotal?: number;
32
+ userInfo?: UserInfoT;
33
+ options?: OptionsItemT[];
34
+ customSize?: number;
35
+ }
36
+
37
+ withDefaults(defineProps<UserPropsT>(), {
38
+ token: undefined,
39
+ lang: undefined,
40
+ noticeTotal: undefined,
41
+ userInfo: undefined,
42
+ options: undefined,
43
+ customSize: undefined,
44
+ });
45
+
46
+ export interface OHeaderUserEmitsT {
47
+ (e: 'login'): void;
48
+ (e: 'logout'): void;
49
+ }
50
+
51
+ const emit = defineEmits<OHeaderUserEmitsT>();
52
+
53
+ const login = () => {
54
+ emit('login');
55
+ };
56
+
57
+ const jumpToPage = (val: any) => {
58
+ if (val?.logout) {
59
+ emit('logout');
60
+ } else {
61
+ window.open(val.url, val.target);
62
+ }
63
+ };
64
+ </script>
65
+
66
+ <template>
67
+ <div class="header-user">
68
+ <!-- 未登录或登录失败 -->
69
+ <template v-if="!token">
70
+ <OIcon @click="login" class="avatar-icon">
71
+ <IconAvatar />
72
+ </OIcon>
73
+ </template>
74
+ <!-- 已登录 -->
75
+ <Transition name="header-user-zoom-in">
76
+ <div class="user-info" v-if="token">
77
+ <ODropdown
78
+ :trigger="lePadV ? 'click' : 'hover'"
79
+ :optionPosition="lePadV ? 'br' : 'bottom'"
80
+ :option-wrap-class="`user-dropdown ${lang === 'en' ? 'is-en' : ''}`"
81
+ >
82
+ <div class="info-wrap hover-icon-rotate">
83
+ <OBadge :value="noticeTotal" :dot="true" color="danger" class="header-message user-avatar" :class="{ 'notice-not': !noticeTotal }">
84
+ <AppAvatar :avatar="userInfo.photo" :name="userInfo.username" :custom-size="customSize" />
85
+ </OBadge>
86
+ <p class="user-account">{{ userInfo.username }}</p>
87
+ <OIcon class="icon">
88
+ <IconChevronDown />
89
+ </OIcon>
90
+ </div>
91
+ <template #dropdown>
92
+ <!-- 账号信息 -->
93
+ <template v-for="item in options" :key="item.label">
94
+ <ODropdownItem :style="{ '--dropdown-item-justify': 'center' }" @click="jumpToPage(item)">
95
+ <OBadge v-if="item?.total" :value="item.total" color="danger" class="header-message message" :class="{ 'notice-not': !item.total }">
96
+ {{ item.label }}
97
+ </OBadge>
98
+ <span v-else>{{ item.label }}</span>
99
+ </ODropdownItem>
100
+ </template>
101
+ </template>
102
+ </ODropdown>
103
+ </div>
104
+ </Transition>
105
+ </div>
106
+ </template>
107
+
108
+ <style lang="scss" scoped>
109
+ .header-user {
110
+ display: flex;
111
+ align-items: center;
112
+ height: 100%;
113
+ visibility: visible;
114
+ opacity: 1;
115
+ transition: opacity 0.15s;
116
+ }
117
+
118
+ .user-info {
119
+ height: 100%;
120
+ min-width: 32px;
121
+ display: flex;
122
+ cursor: pointer;
123
+ }
124
+
125
+ .info-wrap {
126
+ height: calc(100% - 10px);
127
+ margin: 5px 0;
128
+ display: flex;
129
+ align-items: center;
130
+
131
+ .icon {
132
+ margin-left: 4px;
133
+ }
134
+ }
135
+
136
+ .user-avatar {
137
+ margin-right: 4px;
138
+
139
+ :deep(.o-badge-content) {
140
+ --badge-dot-size: 6px;
141
+ right: 7px;
142
+ top: 2px;
143
+ }
144
+ }
145
+
146
+ .o-dropdown-item {
147
+ white-space: nowrap;
148
+ --dropdown-item-color: var(--o-color-info1);
149
+ --dropdown-item-padding: 5px 12px;
150
+ @include tip1;
151
+
152
+ @include hover {
153
+ color: var(--o-color-primary1);
154
+ background: var(--o-color-control2-light);
155
+ }
156
+ }
157
+
158
+ .notice-not {
159
+ :deep(.o-badge-content) {
160
+ display: none;
161
+ }
162
+ }
163
+
164
+ .user-account {
165
+ color: var(--o-color-info1);
166
+ max-width: 96px;
167
+ font-weight: 500;
168
+ @include tip1;
169
+ @include text-truncate(1);
170
+ }
171
+
172
+ @include respond-to('<=pad_v') {
173
+ .header-user {
174
+ min-width: auto;
175
+
176
+ .user-info {
177
+ min-width: 24px;
178
+
179
+ .info-wrap {
180
+ .user-avatar {
181
+ margin-right: 0;
182
+ }
183
+
184
+ .user-account {
185
+ display: none;
186
+ }
187
+
188
+ .icon {
189
+ display: none;
190
+ }
191
+ }
192
+ }
193
+ }
194
+ }
195
+ </style>
196
+
197
+ <style lang="scss">
198
+ .user-dropdown {
199
+ --dropdown-list-radius: var(--o-radius-xs);
200
+ }
201
+ .avatar-icon {
202
+ font-size: 24px;
203
+ color: var(--o-color-info1);
204
+ cursor: pointer;
205
+
206
+ @include hover {
207
+ color: var(--o-color-primary1);
208
+ }
209
+ }
210
+ @include respond-to('<=pad_v') {
211
+ .user-dropdown {
212
+ .o-divider {
213
+ display: none;
214
+ }
215
+
216
+ .o-icon {
217
+ display: none;
218
+ }
219
+
220
+ .o-badge-content {
221
+ right: 0 !important;
222
+ transform: translate(0, 0) scale(0.5);
223
+ transform-origin: top right;
224
+ min-width: 18px;
225
+ width: fit-content;
226
+ height: 18px;
227
+ font-size: 12px;
228
+ line-height: 18px;
229
+ .o-badge-label {
230
+ transform: scale(1);
231
+ font-size: 12px;
232
+ line-height: 18px;
233
+ }
234
+ }
235
+ }
236
+ }
237
+ </style>
@@ -1,32 +1,32 @@
1
- <script lang="ts" setup>
2
- import { computed, provide, reactive } from 'vue';
3
-
4
- import { OConfigProvider } from '@opensig/opendesign';
5
- import zhCN from '@opensig/opendesign/es/locale/lang/zh-cn';
6
- import enUS from '@opensig/opendesign/es/locale/lang/en-us';
7
-
8
- import { configProviderInjectKey } from '@/shared/provide';
9
-
10
- export interface OPlusConfigProviderPropsT {
11
- locale: 'zh' | 'en';
12
- theme: 'light' | 'dark';
13
- }
14
-
15
- const props = withDefaults(defineProps<OPlusConfigProviderPropsT>(), {
16
- lang: 'zh',
17
- theme: 'light',
18
- });
19
-
20
- const globalConfig = reactive({
21
- locale: computed(() => props.locale),
22
- theme: computed(() => props.theme),
23
- });
24
-
25
- provide(configProviderInjectKey, globalConfig);
26
- </script>
27
-
28
- <template>
29
- <OConfigProvider :locale="locale === 'zh' ? zhCN : enUS">
30
- <slot />
31
- </OConfigProvider>
32
- </template>
1
+ <script lang="ts" setup>
2
+ import { computed, provide, reactive } from 'vue';
3
+
4
+ import { OConfigProvider } from '@opensig/opendesign';
5
+ import zhCN from '@opensig/opendesign/es/locale/lang/zh-cn';
6
+ import enUS from '@opensig/opendesign/es/locale/lang/en-us';
7
+
8
+ import { configProviderInjectKey } from '@/shared/provide';
9
+
10
+ export interface OPlusConfigProviderPropsT {
11
+ locale: 'zh' | 'en';
12
+ theme: 'light' | 'dark';
13
+ }
14
+
15
+ const props = withDefaults(defineProps<OPlusConfigProviderPropsT>(), {
16
+ lang: 'zh',
17
+ theme: 'light',
18
+ });
19
+
20
+ const globalConfig = reactive({
21
+ locale: computed(() => props.locale),
22
+ theme: computed(() => props.theme),
23
+ });
24
+
25
+ provide(configProviderInjectKey, globalConfig);
26
+ </script>
27
+
28
+ <template>
29
+ <OConfigProvider :locale="locale === 'zh' ? zhCN : enUS">
30
+ <slot />
31
+ </OConfigProvider>
32
+ </template>
@@ -1,178 +1,178 @@
1
- <script setup lang="ts">
2
- import { isArray, OLink, OIcon } from '@opensig/opendesign';
3
- import IconChevronRight from '~icons/components/icon-chevron-right.svg';
4
-
5
- interface SectionPropsT {
6
- title?: string | Array<string>;
7
- subtitle?: string;
8
- full?: boolean;
9
- headerJustifyCenter?: boolean;
10
- footer?: string;
11
- footerHref?: string;
12
- }
13
-
14
- const props = withDefaults(defineProps<SectionPropsT>(), {
15
- title: undefined,
16
- subtitle: undefined,
17
- full: false,
18
- headerJustifyCenter: true,
19
- footer: undefined,
20
- footerHref: undefined,
21
- });
22
- </script>
23
-
24
- <template>
25
- <div class="app-section" :class="{ 'is-full': props.full }">
26
- <div class="section-wrapper">
27
- <slot name="main">
28
- <!-- header -->
29
- <div v-if="$slots.header || props.title || props.subtitle" class="section-header" :class="{ 'is-left': !props.headerJustifyCenter }">
30
- <slot name="header">
31
- <template v-if="isArray(props.title)">
32
- <h2 v-for="item in props.title" :key="item" class="section-title">
33
- {{ item }}
34
- </h2>
35
- </template>
36
- <h2 v-else-if="$slots.title || props.title" class="section-title">
37
- <slot name="title">
38
- {{ props.title }}
39
- </slot>
40
- </h2>
41
- <p v-if="$slots.subtitle || props.subtitle" class="section-subtitle">
42
- <slot name="subtitle">
43
- {{ props.subtitle }}
44
- </slot>
45
- </p>
46
- </slot>
47
- </div>
48
-
49
- <!-- body -->
50
- <div v-if="$slots.default" class="section-body">
51
- <slot></slot>
52
- </div>
53
-
54
- <!-- footer -->
55
- <div v-if="$slots.footer || props.footer" class="section-footer">
56
- <slot name="footer">
57
- <OLink :href="props.footerHref" target="_blank">
58
- {{ props.footer }}
59
- <template #suffix>
60
- <OIcon class="footer-icon"><IconChevronRight /> </OIcon>
61
- </template>
62
- </OLink>
63
- </slot>
64
- </div>
65
- </slot>
66
- </div>
67
- </div>
68
- </template>
69
-
70
- <style lang="scss" scoped>
71
- .app-section {
72
- --o-gap-section: var(--o-gap-7);
73
- .section-wrapper {
74
- margin: var(--o-gap-section) auto 0;
75
- }
76
-
77
- &.is-full {
78
- .section-body {
79
- max-width: 100%;
80
- width: 100%;
81
- padding: 0;
82
- }
83
- }
84
-
85
- &:last-child {
86
- .section-wrapper {
87
- padding-bottom: var(--o-gap-section);
88
- }
89
- }
90
-
91
- .section-header {
92
- &.is-left {
93
- .section-title,
94
- .section-subtitle {
95
- justify-content: start;
96
- }
97
- }
98
- }
99
-
100
- .section-title {
101
- max-width: var(--layout-content-max-width);
102
- padding: 0 var(--layout-content-padding);
103
- margin: 0 auto;
104
-
105
- display: flex;
106
- justify-content: center;
107
- color: var(--o-color-info1);
108
- text-align: center;
109
- @include display3;
110
- font-weight: 500;
111
- }
112
-
113
- .section-subtitle {
114
- max-width: var(--layout-content-max-width);
115
- padding: 0 var(--layout-content-padding);
116
- margin: 0 auto;
117
-
118
- display: flex;
119
- justify-content: center;
120
- margin-top: 12px;
121
- color: var(--o-color-info2);
122
- @include text1;
123
-
124
- @include respond-to('pad-laptop') {
125
- margin-top: 8px;
126
- }
127
-
128
- @include respond-to('phone') {
129
- margin-top: 12px;
130
- text-align: center;
131
- }
132
- }
133
-
134
- .section-body {
135
- max-width: var(--layout-content-max-width);
136
- padding: 0 var(--layout-content-padding);
137
- margin: 0 auto;
138
-
139
- margin-top: var(--o-gap-7);
140
- }
141
-
142
- .section-footer {
143
- max-width: var(--layout-content-max-width);
144
- padding: 0 var(--layout-content-padding);
145
- margin: 0 auto;
146
- color: var(--o-color-info1);
147
-
148
- display: flex;
149
- justify-content: center;
150
- @include text1;
151
-
152
- margin-top: 32px;
153
-
154
- :deep(.o-btn) {
155
- border-radius: var(--btn-height);
156
- }
157
-
158
- @include respond-to('<=laptop') {
159
- margin-top: 16px;
160
- }
161
-
162
- @include respond-to('phone') {
163
- margin-top: 12px;
164
- }
165
-
166
- &:hover {
167
- .footer-icon {
168
- fill: var(--link-color-active);
169
- }
170
- }
171
- }
172
-
173
- .footer-icon {
174
- font-size: 16px;
175
- height: 24px;
176
- }
177
- }
178
- </style>
1
+ <script setup lang="ts">
2
+ import { isArray, OLink, OIcon } from '@opensig/opendesign';
3
+ import IconChevronRight from '~icons/components/icon-chevron-right.svg';
4
+
5
+ interface SectionPropsT {
6
+ title?: string | Array<string>;
7
+ subtitle?: string;
8
+ full?: boolean;
9
+ headerJustifyCenter?: boolean;
10
+ footer?: string;
11
+ footerHref?: string;
12
+ }
13
+
14
+ const props = withDefaults(defineProps<SectionPropsT>(), {
15
+ title: undefined,
16
+ subtitle: undefined,
17
+ full: false,
18
+ headerJustifyCenter: true,
19
+ footer: undefined,
20
+ footerHref: undefined,
21
+ });
22
+ </script>
23
+
24
+ <template>
25
+ <div class="app-section" :class="{ 'is-full': props.full }">
26
+ <div class="section-wrapper">
27
+ <slot name="main">
28
+ <!-- header -->
29
+ <div v-if="$slots.header || props.title || props.subtitle" class="section-header" :class="{ 'is-left': !props.headerJustifyCenter }">
30
+ <slot name="header">
31
+ <template v-if="isArray(props.title)">
32
+ <h2 v-for="item in props.title" :key="item" class="section-title">
33
+ {{ item }}
34
+ </h2>
35
+ </template>
36
+ <h2 v-else-if="$slots.title || props.title" class="section-title">
37
+ <slot name="title">
38
+ {{ props.title }}
39
+ </slot>
40
+ </h2>
41
+ <p v-if="$slots.subtitle || props.subtitle" class="section-subtitle">
42
+ <slot name="subtitle">
43
+ {{ props.subtitle }}
44
+ </slot>
45
+ </p>
46
+ </slot>
47
+ </div>
48
+
49
+ <!-- body -->
50
+ <div v-if="$slots.default" class="section-body">
51
+ <slot></slot>
52
+ </div>
53
+
54
+ <!-- footer -->
55
+ <div v-if="$slots.footer || props.footer" class="section-footer">
56
+ <slot name="footer">
57
+ <OLink :href="props.footerHref" target="_blank">
58
+ {{ props.footer }}
59
+ <template #suffix>
60
+ <OIcon class="footer-icon"><IconChevronRight /> </OIcon>
61
+ </template>
62
+ </OLink>
63
+ </slot>
64
+ </div>
65
+ </slot>
66
+ </div>
67
+ </div>
68
+ </template>
69
+
70
+ <style lang="scss" scoped>
71
+ .app-section {
72
+ --o-gap-section: var(--o-gap-7);
73
+ .section-wrapper {
74
+ margin: var(--o-gap-section) auto 0;
75
+ }
76
+
77
+ &.is-full {
78
+ .section-body {
79
+ max-width: 100%;
80
+ width: 100%;
81
+ padding: 0;
82
+ }
83
+ }
84
+
85
+ &:last-child {
86
+ .section-wrapper {
87
+ padding-bottom: var(--o-gap-section);
88
+ }
89
+ }
90
+
91
+ .section-header {
92
+ &.is-left {
93
+ .section-title,
94
+ .section-subtitle {
95
+ justify-content: start;
96
+ }
97
+ }
98
+ }
99
+
100
+ .section-title {
101
+ max-width: var(--layout-content-max-width);
102
+ padding: 0 var(--layout-content-padding);
103
+ margin: 0 auto;
104
+
105
+ display: flex;
106
+ justify-content: center;
107
+ color: var(--o-color-info1);
108
+ text-align: center;
109
+ @include display3;
110
+ font-weight: 500;
111
+ }
112
+
113
+ .section-subtitle {
114
+ max-width: var(--layout-content-max-width);
115
+ padding: 0 var(--layout-content-padding);
116
+ margin: 0 auto;
117
+
118
+ display: flex;
119
+ justify-content: center;
120
+ margin-top: 12px;
121
+ color: var(--o-color-info2);
122
+ @include text1;
123
+
124
+ @include respond-to('pad-laptop') {
125
+ margin-top: 8px;
126
+ }
127
+
128
+ @include respond-to('phone') {
129
+ margin-top: 12px;
130
+ text-align: center;
131
+ }
132
+ }
133
+
134
+ .section-body {
135
+ max-width: var(--layout-content-max-width);
136
+ padding: 0 var(--layout-content-padding);
137
+ margin: 0 auto;
138
+
139
+ margin-top: var(--o-gap-7);
140
+ }
141
+
142
+ .section-footer {
143
+ max-width: var(--layout-content-max-width);
144
+ padding: 0 var(--layout-content-padding);
145
+ margin: 0 auto;
146
+ color: var(--o-color-info1);
147
+
148
+ display: flex;
149
+ justify-content: center;
150
+ @include text1;
151
+
152
+ margin-top: 32px;
153
+
154
+ :deep(.o-btn) {
155
+ border-radius: var(--btn-height);
156
+ }
157
+
158
+ @include respond-to('<=laptop') {
159
+ margin-top: 16px;
160
+ }
161
+
162
+ @include respond-to('phone') {
163
+ margin-top: 12px;
164
+ }
165
+
166
+ &:hover {
167
+ .footer-icon {
168
+ fill: var(--link-color-active);
169
+ }
170
+ }
171
+ }
172
+
173
+ .footer-icon {
174
+ font-size: 16px;
175
+ height: 24px;
176
+ }
177
+ }
178
+ </style>