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

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 (205) 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 +10 -14
  7. package/dist/components/OHeaderUser.vue.d.ts +40 -0
  8. package/dist/components/OSourceCode.vue.d.ts +18 -0
  9. package/dist/components/activity/OActivityApproval.vue.d.ts +273 -0
  10. package/dist/components/activity/OActivityForm.vue.d.ts +138 -0
  11. package/dist/components/activity/OMyActivityCalendar.vue.d.ts +570 -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 +615 -0
  15. package/dist/components/activity/types.d.ts +88 -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 +14 -0
  22. package/dist/components/events/index.d.ts +78 -0
  23. package/dist/components/events/types.d.ts +69 -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 +178 -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 +36 -0
  30. package/dist/components/header/index.d.ts +152 -0
  31. package/dist/components/header/types.d.ts +84 -0
  32. package/dist/components/meeting/OMeetingCalendar.vue.d.ts +295 -0
  33. package/dist/components/meeting/OMeetingForm.vue.d.ts +143 -0
  34. package/dist/components/meeting/OMeetingPlayback.vue.d.ts +45 -0
  35. package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +578 -0
  36. package/dist/components/meeting/OSigMeetingCalendar.vue.d.ts +24 -0
  37. package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +28 -0
  38. package/dist/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +664 -0
  39. package/dist/components/meeting/components/OMeetingDetail.vue.d.ts +13 -0
  40. package/dist/components/meeting/components/OMeetingPlaybackSubtitles.vue.d.ts +5 -0
  41. package/dist/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +17 -0
  42. package/dist/components/meeting/components/OSigMeetingAside.vue.d.ts +16 -0
  43. package/dist/components/meeting/composables/useMeetingConfig.d.ts +14 -0
  44. package/dist/components/meeting/config.d.ts +12 -0
  45. package/dist/components/meeting/index.d.ts +786 -0
  46. package/dist/components/meeting/types.d.ts +233 -0
  47. package/dist/components/meeting/utils.d.ts +8 -0
  48. package/dist/components.cjs.js +224 -1
  49. package/dist/components.css +1 -1
  50. package/dist/components.element.cjs.js +1 -0
  51. package/dist/components.element.es.js +4 -0
  52. package/dist/components.es.js +44417 -784
  53. package/dist/index.d.ts +9 -2
  54. package/docs/design.md +27 -27
  55. package/docs/design_banner.md +41 -41
  56. package/docs/design_section.md +27 -27
  57. package/package.json +13 -4
  58. package/scripts/generate-components-index.js +103 -80
  59. package/src/assets/events/svg-icons/icon-checked.svg +3 -0
  60. package/src/assets/events/svg-icons/icon-competition.svg +7 -0
  61. package/src/assets/events/svg-icons/icon-events.svg +4 -0
  62. package/src/assets/events/svg-icons/icon-release.svg +4 -0
  63. package/src/assets/events/svg-icons/icon-summit.svg +4 -0
  64. package/src/assets/meeting/svg-icons/icon-all.svg +3 -0
  65. package/src/assets/meeting/svg-icons/icon-backward.svg +4 -0
  66. package/src/assets/meeting/svg-icons/icon-calendar.svg +3 -0
  67. package/src/assets/meeting/svg-icons/icon-cancel.svg +4 -0
  68. package/src/assets/meeting/svg-icons/icon-captions.svg +4 -0
  69. package/src/assets/meeting/svg-icons/icon-close-captions.svg +6 -0
  70. package/src/assets/meeting/svg-icons/icon-close-fullscreen.svg +6 -0
  71. package/src/assets/meeting/svg-icons/icon-copy.svg +3 -0
  72. package/src/assets/meeting/svg-icons/icon-create.svg +5 -0
  73. package/src/assets/meeting/svg-icons/icon-delete.svg +7 -0
  74. package/src/assets/meeting/svg-icons/icon-empty.svg +31 -0
  75. package/src/assets/meeting/svg-icons/icon-empty_dark.svg +49 -0
  76. package/src/assets/meeting/svg-icons/icon-event.svg +3 -0
  77. package/src/assets/meeting/svg-icons/icon-export.svg +3 -0
  78. package/src/assets/meeting/svg-icons/icon-forward.svg +4 -0
  79. package/src/assets/meeting/svg-icons/icon-fullscreen.svg +6 -0
  80. package/src/assets/meeting/svg-icons/icon-help.svg +3 -0
  81. package/src/assets/meeting/svg-icons/icon-important.svg +4 -0
  82. package/src/assets/meeting/svg-icons/icon-info.svg +3 -0
  83. package/src/assets/meeting/svg-icons/icon-meet.svg +3 -0
  84. package/src/assets/meeting/svg-icons/icon-meeting-message.svg +5 -0
  85. package/src/assets/meeting/svg-icons/icon-meeting.svg +4 -0
  86. package/src/assets/meeting/svg-icons/icon-play.svg +5 -0
  87. package/src/assets/meeting/svg-icons/icon-playing-tip.svg +7 -0
  88. package/src/assets/meeting/svg-icons/icon-playing.svg +5 -0
  89. package/src/assets/meeting/svg-icons/icon-question.svg +4 -0
  90. package/src/assets/meeting/svg-icons/icon-sound.svg +5 -0
  91. package/src/assets/meeting/svg-icons/icon-speaker.svg +3 -0
  92. package/src/assets/meeting/svg-icons/icon-summit.svg +3 -0
  93. package/src/assets/meeting/svg-icons/icon-telligent.svg +3 -0
  94. package/src/assets/meeting/svg-icons/icon-tip.svg +3 -0
  95. package/src/assets/meeting/svg-icons/icon-todo.svg +4 -0
  96. package/src/assets/meeting/transparent.png +0 -0
  97. package/src/assets/svg-icons/icon-arrow-left.svg +3 -0
  98. package/src/assets/svg-icons/icon-avatar-line.svg +3 -0
  99. package/src/assets/svg-icons/icon-caret-left.svg +3 -0
  100. package/src/assets/svg-icons/icon-caret-right.svg +3 -0
  101. package/src/assets/svg-icons/icon-chevron-down.svg +3 -0
  102. package/src/assets/svg-icons/icon-chevron-right.svg +3 -3
  103. package/src/assets/svg-icons/icon-chevron-up.svg +3 -0
  104. package/src/assets/svg-icons/icon-close.svg +3 -3
  105. package/src/assets/svg-icons/icon-delete.svg +3 -3
  106. package/src/assets/svg-icons/icon-filter.svg +3 -0
  107. package/src/assets/svg-icons/icon-header-back.svg +3 -3
  108. package/src/assets/svg-icons/icon-header-delete.svg +3 -3
  109. package/src/assets/svg-icons/icon-header-menu.svg +3 -0
  110. package/src/assets/svg-icons/icon-header-person.svg +3 -0
  111. package/src/assets/svg-icons/icon-header-search.svg +4 -4
  112. package/src/assets/svg-icons/icon-loading.svg +4 -0
  113. package/src/assets/svg-icons/icon-locale.svg +3 -0
  114. package/src/assets/svg-icons/icon-log-off.svg +3 -0
  115. package/src/assets/svg-icons/icon-message.svg +3 -0
  116. package/src/assets/svg-icons/icon-moon.svg +3 -3
  117. package/src/assets/svg-icons/icon-outlink.svg +3 -0
  118. package/src/assets/svg-icons/icon-overview.svg +3 -0
  119. package/src/assets/svg-icons/icon-search.svg +3 -0
  120. package/src/assets/svg-icons/icon-setting.svg +3 -0
  121. package/src/assets/svg-icons/icon-sun.svg +3 -3
  122. package/src/assets/svg-icons/icon-tips.svg +3 -0
  123. package/src/components/OBanner.vue +398 -390
  124. package/src/components/OCookieNotice.vue +575 -424
  125. package/src/components/OFooter.vue +576 -0
  126. package/src/components/OHeaderSearch.vue +601 -601
  127. package/src/components/OHeaderUser.vue +237 -0
  128. package/src/components/OPlusConfigProvider.vue +32 -32
  129. package/src/components/OSection.vue +178 -178
  130. package/src/components/OSourceCode.vue +151 -0
  131. package/src/components/OThemeSwitcher.vue +108 -108
  132. package/src/components/activity/OActivityApproval.vue +864 -0
  133. package/src/components/activity/OActivityForm.vue +542 -0
  134. package/src/components/activity/OMyActivityCalendar.vue +1502 -0
  135. package/src/components/activity/composables/useActivityConfig.ts +141 -0
  136. package/src/components/activity/config.ts +1 -0
  137. package/src/components/activity/index.ts +24 -0
  138. package/src/components/activity/types.ts +95 -0
  139. package/src/components/common/AppAvatar.vue +83 -0
  140. package/src/components/common/ClientOnlyWrapper.ts +21 -21
  141. package/src/components/common/ContentWrapper.vue +85 -85
  142. package/src/components/common/MoreText.vue +124 -0
  143. package/src/components/common/ThFilter.vue +330 -0
  144. package/src/components/element-plus/OElCookieNotice.vue +603 -0
  145. package/src/components/element-plus/index.ts +3 -0
  146. package/src/components/events/OEventsApply.vue +418 -0
  147. package/src/components/events/OEventsCalendar.vue +598 -0
  148. package/src/components/events/OEventsList.vue +389 -0
  149. package/src/components/events/config.ts +35 -0
  150. package/src/components/events/index.ts +24 -0
  151. package/src/components/events/types.ts +83 -0
  152. package/src/components/events/utils.ts +9 -0
  153. package/src/components/header/OHeader.vue +157 -0
  154. package/src/components/header/OHeaderMobile.vue +184 -0
  155. package/src/components/header/components/HeaderContent.vue +1125 -0
  156. package/src/components/header/components/HeaderNav.vue +278 -0
  157. package/src/components/header/components/HeaderNavMobile.vue +380 -0
  158. package/src/components/header/index.ts +16 -0
  159. package/src/components/header/types.ts +95 -0
  160. package/src/components/meeting/OMeetingCalendar.vue +890 -0
  161. package/src/components/meeting/OMeetingForm.vue +1072 -0
  162. package/src/components/meeting/OMeetingPlayback.vue +439 -0
  163. package/src/components/meeting/OMyMeetingCalendar.vue +1508 -0
  164. package/src/components/meeting/OSigMeetingCalendar.vue +413 -0
  165. package/src/components/meeting/components/OMeetingCalendarList.vue +515 -0
  166. package/src/components/meeting/components/OMeetingCalendarSelector.vue +210 -0
  167. package/src/components/meeting/components/OMeetingDetail.vue +244 -0
  168. package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +611 -0
  169. package/src/components/meeting/components/OMeetingPlaybackVideo.vue +741 -0
  170. package/src/components/meeting/components/OSigMeetingAside.vue +199 -0
  171. package/src/components/meeting/composables/useMeetingConfig.ts +108 -0
  172. package/src/components/meeting/config.ts +48 -0
  173. package/src/components/meeting/index.ts +45 -0
  174. package/src/components/meeting/types.ts +266 -0
  175. package/src/components/meeting/utils.ts +70 -0
  176. package/src/draft/Banner.vue +265 -265
  177. package/src/draft/ButtonCards.vue +105 -105
  178. package/src/draft/Feature.vue +133 -133
  179. package/src/draft/Footer.vue +512 -512
  180. package/src/draft/HorizontalAnchor.vue +165 -165
  181. package/src/draft/ItemSwiper.vue +133 -133
  182. package/src/draft/Logo.vue +141 -141
  183. package/src/draft/LogoCard.vue +74 -74
  184. package/src/draft/LogoV2.vue +19 -19
  185. package/src/draft/MainCard.vue +38 -38
  186. package/src/draft/MultiCard.vue +94 -94
  187. package/src/draft/MultiIconCard.vue +73 -73
  188. package/src/draft/OInfoCard.vue +176 -176
  189. package/src/draft/Process.vue +81 -81
  190. package/src/draft/Section.vue +167 -167
  191. package/src/draft/SingleTabCard.vue +84 -84
  192. package/src/draft/SliderCard.vue +110 -110
  193. package/src/env.d.ts +16 -1
  194. package/src/i18n/en.ts +264 -20
  195. package/src/i18n/index.ts +56 -42
  196. package/src/i18n/zh.ts +253 -9
  197. package/src/index.ts +14 -3
  198. package/src/shared/provide.ts +6 -6
  199. package/src/shims-vue-dompurify-html.d.ts +17 -0
  200. package/src/vue.d.ts +9 -9
  201. package/tsconfig.json +37 -33
  202. package/vite.config.ts +119 -94
  203. package/dist/components/OCookieNoticeEl.vue.d.ts +0 -29
  204. package/dist/components.umd.js +0 -1
  205. package/src/components/OCookieNoticeEl.vue +0 -404
@@ -1,167 +1,167 @@
1
- <script setup lang="ts">
2
- import { isArray, OLink } from '@opensig/opendesign';
3
-
4
- interface SectionPropsT {
5
- title?: string | Array<string>;
6
- subtitle?: string;
7
- full?: boolean;
8
- headerJustifyCenter?: boolean;
9
- footer?: string;
10
- footerHref?: string;
11
- }
12
-
13
- const props = withDefaults(defineProps<SectionPropsT>(), {
14
- title: undefined,
15
- subtitle: undefined,
16
- full: false,
17
- headerJustifyCenter: true,
18
- footer: undefined,
19
- footerHref: undefined,
20
- });
21
- </script>
22
-
23
- <template>
24
- <div class="app-section" :class="{ 'is-full': props.full }">
25
- <div class="section-wrapper">
26
- <slot name="main">
27
- <!-- header -->
28
- <div v-if="$slots.header || props.title || props.subtitle" class="section-header"
29
- :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
- .section-wrapper {
73
- max-width: 1416px;
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
-
94
- .section-title,
95
- .section-subtitle {
96
- justify-content: start;
97
- }
98
- }
99
- }
100
-
101
- .section-title {
102
- max-width: var(--layout-content-max-width);
103
- padding: 0 var(--layout-content-padding);
104
- margin: 0 auto;
105
-
106
- display: flex;
107
- justify-content: center;
108
- color: var(--o-color-info1);
109
- text-align: center;
110
- @include display3;
111
- font-weight: 500;
112
- }
113
-
114
- .section-subtitle {
115
- max-width: var(--layout-content-max-width);
116
- padding: 0 var(--layout-content-padding);
117
- margin: 0 auto;
118
-
119
- display: flex;
120
- justify-content: center;
121
- margin-top: 12px;
122
- color: var(--o-color-info2);
123
- @include text1;
124
-
125
- @include respond-to('pad-laptop') {
126
- margin-top: 8px;
127
- }
128
-
129
- @include respond-to('phone') {
130
- margin-top: 12px;
131
- text-align: center;
132
- }
133
- }
134
-
135
- .section-body {
136
- max-width: var(--layout-content-max-width);
137
- padding: 0 var(--layout-content-padding);
138
- margin: 0 auto;
139
-
140
- margin-top: var(--o-gap-t2c);
141
- }
142
-
143
- .section-footer {
144
- max-width: var(--layout-content-max-width);
145
- padding: 0 var(--layout-content-padding);
146
- margin: 0 auto;
147
-
148
- display: flex;
149
- justify-content: center;
150
- @include text1;
151
-
152
- margin-top: 32px;
153
-
154
- @include respond-to('<=laptop') {
155
- margin-top: 16px;
156
- }
157
-
158
- @include respond-to('phone') {
159
- margin-top: 12px;
160
- }
161
- }
162
-
163
- .footer-icon {
164
- font-size: 16px;
165
- }
166
- }
167
- </style>
1
+ <script setup lang="ts">
2
+ import { isArray, OLink } from '@opensig/opendesign';
3
+
4
+ interface SectionPropsT {
5
+ title?: string | Array<string>;
6
+ subtitle?: string;
7
+ full?: boolean;
8
+ headerJustifyCenter?: boolean;
9
+ footer?: string;
10
+ footerHref?: string;
11
+ }
12
+
13
+ const props = withDefaults(defineProps<SectionPropsT>(), {
14
+ title: undefined,
15
+ subtitle: undefined,
16
+ full: false,
17
+ headerJustifyCenter: true,
18
+ footer: undefined,
19
+ footerHref: undefined,
20
+ });
21
+ </script>
22
+
23
+ <template>
24
+ <div class="app-section" :class="{ 'is-full': props.full }">
25
+ <div class="section-wrapper">
26
+ <slot name="main">
27
+ <!-- header -->
28
+ <div v-if="$slots.header || props.title || props.subtitle" class="section-header"
29
+ :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
+ .section-wrapper {
73
+ max-width: 1416px;
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
+
94
+ .section-title,
95
+ .section-subtitle {
96
+ justify-content: start;
97
+ }
98
+ }
99
+ }
100
+
101
+ .section-title {
102
+ max-width: var(--layout-content-max-width);
103
+ padding: 0 var(--layout-content-padding);
104
+ margin: 0 auto;
105
+
106
+ display: flex;
107
+ justify-content: center;
108
+ color: var(--o-color-info1);
109
+ text-align: center;
110
+ @include display3;
111
+ font-weight: 500;
112
+ }
113
+
114
+ .section-subtitle {
115
+ max-width: var(--layout-content-max-width);
116
+ padding: 0 var(--layout-content-padding);
117
+ margin: 0 auto;
118
+
119
+ display: flex;
120
+ justify-content: center;
121
+ margin-top: 12px;
122
+ color: var(--o-color-info2);
123
+ @include text1;
124
+
125
+ @include respond-to('pad-laptop') {
126
+ margin-top: 8px;
127
+ }
128
+
129
+ @include respond-to('phone') {
130
+ margin-top: 12px;
131
+ text-align: center;
132
+ }
133
+ }
134
+
135
+ .section-body {
136
+ max-width: var(--layout-content-max-width);
137
+ padding: 0 var(--layout-content-padding);
138
+ margin: 0 auto;
139
+
140
+ margin-top: var(--o-gap-t2c);
141
+ }
142
+
143
+ .section-footer {
144
+ max-width: var(--layout-content-max-width);
145
+ padding: 0 var(--layout-content-padding);
146
+ margin: 0 auto;
147
+
148
+ display: flex;
149
+ justify-content: center;
150
+ @include text1;
151
+
152
+ margin-top: 32px;
153
+
154
+ @include respond-to('<=laptop') {
155
+ margin-top: 16px;
156
+ }
157
+
158
+ @include respond-to('phone') {
159
+ margin-top: 12px;
160
+ }
161
+ }
162
+
163
+ .footer-icon {
164
+ font-size: 16px;
165
+ }
166
+ }
167
+ </style>
@@ -1,85 +1,85 @@
1
- <script lang="ts" setup>
2
- import { type PropType } from 'vue';
3
- import { OButton, OCard, OTab, OTabPane } from '@opensig/opendesign';
4
- import { useScreen } from '@/composables/useScreen';
5
-
6
- const { lePadV } = useScreen();
7
-
8
- interface ButtonT {
9
- text: string;
10
- href?: string;
11
- }
12
-
13
- interface CardT {
14
- title: string;
15
- content: string;
16
- cover?: string;
17
- buttons?: ButtonT[];
18
- }
19
-
20
- interface TabListT {
21
- title: string;
22
- card: CardT;
23
- }
24
-
25
- defineProps({
26
- tabs: {
27
- type: Array as PropType<TabListT[]>,
28
- default: () => [],
29
- },
30
- });
31
- </script>
32
- <template>
33
- <div class="wrapper">
34
- <template v-if="tabs.length === 1">
35
- <OCard :title="tabs[0].card.title" :detail="tabs[0].card.content" :cover="tabs[0].card.cover"
36
- :layout="lePadV ? 'v' : 'hr'" :cover-ratio="lePadV ? undefined : 16 / 9" class="single-card">
37
- <template #footer>
38
- <div class="buttons">
39
- <OButton v-for="(button, index) in tabs[0].card.buttons" :key="index" :href="button.href"
40
- color="primary" round="pill" variant="outline" class="button">{{ button.text }}
41
- </OButton>
42
- </div>
43
- </template>
44
- </OCard>
45
- </template>
46
- <template v-else>
47
- <OTab :line="false" class="section-tab">
48
- <OTabPane v-for="(tab, index) in tabs" :key="index" :label="tab.title" :value="tab.title"
49
- class="tab-pane">
50
- <OCard :title="tab.card.title" :detail="tab.card.content" :cover="tab.card.cover"
51
- :layout="lePadV ? 'v' : 'hr'" :cover-ratio="lePadV ? undefined : 16 / 9" class="single-card">
52
- <template #footer>
53
- <div class="buttons">
54
- <OButton v-for="(button, index) in tab.card.buttons" :key="index" :href="button.href"
55
- color="primary" round="pill" variant="outline" class="button">{{ button.text }}
56
- </OButton>
57
- </div>
58
- </template>
59
- </OCard>
60
- </OTabPane>
61
- </OTab>
62
- </template>
63
-
64
- </div>
65
- </template>
66
- <style lang="scss" scoped>
67
- .section-tab {
68
- :deep(.o-tab-pane) {
69
- padding-top: var(--o3-gap-5);
70
- }
71
- }
72
-
73
- .buttons {
74
- display: flex;
75
- gap: var(--o3-gap-4);
76
- }
77
-
78
- .single-card {
79
- @include respond-to('<=pad_v') {
80
- :deep(.o-figure-img) {
81
- height: 184px;
82
- }
83
- }
84
- }
1
+ <script lang="ts" setup>
2
+ import { type PropType } from 'vue';
3
+ import { OButton, OCard, OTab, OTabPane } from '@opensig/opendesign';
4
+ import { useScreen } from '@/composables/useScreen';
5
+
6
+ const { lePadV } = useScreen();
7
+
8
+ interface ButtonT {
9
+ text: string;
10
+ href?: string;
11
+ }
12
+
13
+ interface CardT {
14
+ title: string;
15
+ content: string;
16
+ cover?: string;
17
+ buttons?: ButtonT[];
18
+ }
19
+
20
+ interface TabListT {
21
+ title: string;
22
+ card: CardT;
23
+ }
24
+
25
+ defineProps({
26
+ tabs: {
27
+ type: Array as PropType<TabListT[]>,
28
+ default: () => [],
29
+ },
30
+ });
31
+ </script>
32
+ <template>
33
+ <div class="wrapper">
34
+ <template v-if="tabs.length === 1">
35
+ <OCard :title="tabs[0].card.title" :detail="tabs[0].card.content" :cover="tabs[0].card.cover"
36
+ :layout="lePadV ? 'v' : 'hr'" :cover-ratio="lePadV ? undefined : 16 / 9" class="single-card">
37
+ <template #footer>
38
+ <div class="buttons">
39
+ <OButton v-for="(button, index) in tabs[0].card.buttons" :key="index" :href="button.href"
40
+ color="primary" round="pill" variant="outline" class="button">{{ button.text }}
41
+ </OButton>
42
+ </div>
43
+ </template>
44
+ </OCard>
45
+ </template>
46
+ <template v-else>
47
+ <OTab :line="false" class="section-tab">
48
+ <OTabPane v-for="(tab, index) in tabs" :key="index" :label="tab.title" :value="tab.title"
49
+ class="tab-pane">
50
+ <OCard :title="tab.card.title" :detail="tab.card.content" :cover="tab.card.cover"
51
+ :layout="lePadV ? 'v' : 'hr'" :cover-ratio="lePadV ? undefined : 16 / 9" class="single-card">
52
+ <template #footer>
53
+ <div class="buttons">
54
+ <OButton v-for="(button, index) in tab.card.buttons" :key="index" :href="button.href"
55
+ color="primary" round="pill" variant="outline" class="button">{{ button.text }}
56
+ </OButton>
57
+ </div>
58
+ </template>
59
+ </OCard>
60
+ </OTabPane>
61
+ </OTab>
62
+ </template>
63
+
64
+ </div>
65
+ </template>
66
+ <style lang="scss" scoped>
67
+ .section-tab {
68
+ :deep(.o-tab-pane) {
69
+ padding-top: var(--o3-gap-5);
70
+ }
71
+ }
72
+
73
+ .buttons {
74
+ display: flex;
75
+ gap: var(--o3-gap-4);
76
+ }
77
+
78
+ .single-card {
79
+ @include respond-to('<=pad_v') {
80
+ :deep(.o-figure-img) {
81
+ height: 184px;
82
+ }
83
+ }
84
+ }
85
85
  </style>