@opendesign-plus/components 0.0.1-rc.6 → 0.0.1-rc.7

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 (162) hide show
  1. package/dist/chunk-OElCookieNotice.cjs.js +1 -0
  2. package/dist/chunk-OElCookieNotice.es.js +281 -0
  3. package/dist/components/OFooter.vue.d.ts +25 -0
  4. package/dist/components/OHeader.vue.d.ts +23 -0
  5. package/dist/components/OHeaderMoblie.vue.d.ts +33 -0
  6. package/dist/components/OHeaderUser.vue.d.ts +40 -0
  7. package/dist/components/OSourceCode.vue.d.ts +20 -0
  8. package/dist/components/events/OEventsApply.vue.d.ts +16 -0
  9. package/dist/components/events/OEventsCalendar.vue.d.ts +5 -0
  10. package/dist/components/events/OEventsList.vue.d.ts +26 -0
  11. package/dist/components/events/config.d.ts +26 -0
  12. package/dist/components/events/index.d.ts +78 -0
  13. package/dist/components/events/types.d.ts +66 -0
  14. package/dist/components/events/utils.d.ts +7 -0
  15. package/dist/components.cjs.js +3 -1
  16. package/dist/components.css +1 -1
  17. package/dist/components.element.cjs.js +1 -1
  18. package/dist/components.element.es.js +2 -214
  19. package/dist/components.es.js +3000 -444
  20. package/dist/index.d.ts +8 -1
  21. package/docs/design.md +27 -27
  22. package/docs/design_banner.md +41 -41
  23. package/docs/design_section.md +27 -27
  24. package/npmcachae/_cacache/content-v2/sha512/bd/56/25079ffb18446953f88fc063c3d6eaf7191772851b8477c118f113b920a7f357b67b9006181af58c9f68b0059b899ad0f2c86fe0a6490958d138cb063afd +1 -0
  25. package/npmcachae/_cacache/index-v5/d8/49/af4c6bb8f580edbd7b6e18db381844403e5f689a9849c5ffcdd2dd95d735 +3 -0
  26. package/npmcachae/_logs/2026-03-17T09_38_12_009Z-debug-0.log +157 -0
  27. package/npmcachae/_logs/2026-03-17T09_38_14_370Z-debug-0.log +157 -0
  28. package/npmcachae/_logs/2026-03-17T09_38_16_516Z-debug-0.log +157 -0
  29. package/npmcachae/_logs/2026-03-17T09_38_18_616Z-debug-0.log +157 -0
  30. package/npmcachae/_logs/2026-03-17T09_38_20_859Z-debug-0.log +157 -0
  31. package/npmcachae/_logs/2026-03-17T09_38_23_182Z-debug-0.log +157 -0
  32. package/npmcachae/_logs/2026-03-17T09_38_25_452Z-debug-0.log +157 -0
  33. package/npmcachae/_logs/2026-03-17T09_38_27_865Z-debug-0.log +157 -0
  34. package/npmcachae/_logs/2026-03-17T09_38_30_082Z-debug-0.log +157 -0
  35. package/npmcachae/_logs/2026-03-17T09_38_32_219Z-debug-0.log +157 -0
  36. package/npmcachae/_logs/2026-03-17T09_38_34_308Z-debug-0.log +157 -0
  37. package/npmcachae/_update-notifier-last-checked +0 -0
  38. package/package.json +2 -1
  39. package/scripts/generate-components-index.js +99 -80
  40. package/src/assets/events/city/default-cover.png +0 -0
  41. package/src/assets/events/city//344/270/212/346/265/267.png +0 -0
  42. package/src/assets/events/city//345/214/227/344/272/254.png +0 -0
  43. package/src/assets/events/city//345/215/227/344/272/254.png +0 -0
  44. package/src/assets/events/city//345/244/251/346/264/245.png +0 -0
  45. package/src/assets/events/city//345/271/277/345/267/236.png +0 -0
  46. package/src/assets/events/city//346/210/220/351/203/275.png +0 -0
  47. package/src/assets/events/city//346/227/240/351/224/241.png +0 -0
  48. package/src/assets/events/city//346/235/255/345/267/236.png +0 -0
  49. package/src/assets/events/city//346/255/246/346/261/211.png +0 -0
  50. package/src/assets/events/city//346/267/261/345/234/2631.png +0 -0
  51. package/src/assets/events/city//346/267/261/345/234/2632.png +0 -0
  52. package/src/assets/events/city//350/213/217/345/267/236.png +0 -0
  53. package/src/assets/events/city//350/245/277/345/256/211.png +0 -0
  54. package/src/assets/events/city//351/203/221/345/267/236.png +0 -0
  55. package/src/assets/events/svg-icons/icon-checked.svg +3 -0
  56. package/src/assets/events/svg-icons/icon-competition.svg +7 -0
  57. package/src/assets/events/svg-icons/icon-events.svg +4 -0
  58. package/src/assets/events/svg-icons/icon-release.svg +4 -0
  59. package/src/assets/events/svg-icons/icon-summit.svg +4 -0
  60. package/src/assets/svg-icons/icon-arrow-left.svg +3 -0
  61. package/src/assets/svg-icons/icon-avatar-line.svg +3 -0
  62. package/src/assets/svg-icons/icon-caret-left.svg +3 -0
  63. package/src/assets/svg-icons/icon-caret-right.svg +3 -0
  64. package/src/assets/svg-icons/icon-chevron-down.svg +3 -0
  65. package/src/assets/svg-icons/icon-chevron-right.svg +3 -3
  66. package/src/assets/svg-icons/icon-close.svg +3 -3
  67. package/src/assets/svg-icons/icon-delete.svg +3 -3
  68. package/src/assets/svg-icons/icon-header-back.svg +3 -3
  69. package/src/assets/svg-icons/icon-header-delete.svg +3 -3
  70. package/src/assets/svg-icons/icon-header-menu.svg +3 -0
  71. package/src/assets/svg-icons/icon-header-person.svg +3 -0
  72. package/src/assets/svg-icons/icon-header-search.svg +4 -4
  73. package/src/assets/svg-icons/icon-locale.svg +3 -0
  74. package/src/assets/svg-icons/icon-log-off.svg +3 -0
  75. package/src/assets/svg-icons/icon-message.svg +3 -0
  76. package/src/assets/svg-icons/icon-moon.svg +3 -3
  77. package/src/assets/svg-icons/icon-outlink.svg +3 -0
  78. package/src/assets/svg-icons/icon-overview.svg +3 -0
  79. package/src/assets/svg-icons/icon-setting.svg +3 -0
  80. package/src/assets/svg-icons/icon-sun.svg +3 -3
  81. package/src/components/OBanner.vue +390 -390
  82. package/src/components/OCookieNotice.vue +423 -423
  83. package/src/components/OFooter.vue +566 -0
  84. package/src/components/OHeader.vue +97 -0
  85. package/src/components/OHeaderMoblie.vue +149 -0
  86. package/src/components/OHeaderSearch.vue +601 -601
  87. package/src/components/OHeaderUser.vue +304 -0
  88. package/src/components/OPlusConfigProvider.vue +32 -32
  89. package/src/components/OSection.vue +178 -178
  90. package/src/components/OSourceCode.vue +153 -0
  91. package/src/components/OThemeSwitcher.vue +108 -108
  92. package/src/components/common/AppAvatar.vue +83 -0
  93. package/src/components/common/ClientOnlyWrapper.ts +21 -21
  94. package/src/components/common/ContentWrapper.vue +85 -85
  95. package/src/components/common/HeaderEulerNav.vue +1118 -0
  96. package/src/components/common/HeaderNavMoblie.vue +344 -0
  97. package/src/components/common/HeaderUbmcNav.vue +597 -0
  98. package/src/components/element-plus/OElCookieNotice.vue +412 -412
  99. package/src/components/element-plus/index.ts +3 -3
  100. package/src/components/events/OEventsApply.vue +487 -0
  101. package/src/components/events/OEventsCalendar.vue +613 -0
  102. package/src/components/events/OEventsList.vue +402 -0
  103. package/src/components/events/config.ts +47 -0
  104. package/src/components/events/index.ts +23 -0
  105. package/src/components/events/npmcachae/_cacache/content-v2/sha512/2c/4f/a4140bfbf374a43f7dfe71880c051f79149cd259fb1a154fb692802c7489ef2317b737e7e690a627714ba19317971f29051b3798c246297b425a626a5b7a +1 -0
  106. package/src/components/events/npmcachae/_cacache/index-v5/8e/86/70dc69f1b1592fe14da10d2516ddfaa609af0cd9054a6ebde664acc6ab12 +2 -0
  107. package/src/components/events/npmcachae/_logs/2026-03-25T09_58_33_134Z-debug-0.log +105 -0
  108. package/src/components/events/npmcachae/_update-notifier-last-checked +0 -0
  109. package/src/components/events/types.ts +80 -0
  110. package/src/components/events/utils.ts +9 -0
  111. package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/3e/17/1865217b9acb9f4921c53a09b5c76587cd2ab748beb2699ff6cfb1341d73b1aa56ed91ffc5ab2c9c9b3fbe626103b35d9a79ff29ff6b8cbb8d89755fe1a2 +1 -0
  112. package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/a6/15/47bb7552ec9248079e839a5feecc1742d4de19524fdf041cf581701cf4760a5025106036145e279ba193b07c8fa5b07ae3d75f1b6032f0cb2219115b6167 +1 -0
  113. package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/d1/4c/133b32e09c97101a27a07cc4432f94e470cff02d120d21babcea77c3f5cd436793516dc1a8e282ee1a568f923c148b1a48f4a43233462a530d35e8b41c67 +1 -0
  114. package/src/components/meeting/npmcachae/_cacache/index-v5/54/0d/a4909047714a0a7198bb9bd37020992464e47c79a791889919b84d90aab0 +3 -0
  115. package/src/components/meeting/npmcachae/_cacache/index-v5/8e/2b/21a79778e2ac08cf5663baf83cb35f951995a496007eb2e2f7fba54021a4 +3 -0
  116. package/src/components/meeting/npmcachae/_cacache/index-v5/eb/a0/b70c8132e5b57a0f1e129b8cc941796420a9c147c0baa680710083740898 +2 -0
  117. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_03_54_955Z-debug-0.log +277 -0
  118. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_03_57_842Z-debug-0.log +277 -0
  119. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_00_016Z-debug-0.log +277 -0
  120. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_02_191Z-debug-0.log +277 -0
  121. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_04_425Z-debug-0.log +277 -0
  122. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_06_642Z-debug-0.log +277 -0
  123. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_08_826Z-debug-0.log +277 -0
  124. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_36_140Z-debug-0.log +433 -0
  125. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_39_573Z-debug-0.log +433 -0
  126. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_42_134Z-debug-0.log +212 -0
  127. package/src/components/meeting/npmcachae/_update-notifier-last-checked +0 -0
  128. package/src/draft/Banner.vue +265 -265
  129. package/src/draft/ButtonCards.vue +105 -105
  130. package/src/draft/Feature.vue +133 -133
  131. package/src/draft/Footer.vue +512 -512
  132. package/src/draft/HorizontalAnchor.vue +165 -165
  133. package/src/draft/ItemSwiper.vue +133 -133
  134. package/src/draft/Logo.vue +141 -141
  135. package/src/draft/LogoCard.vue +74 -74
  136. package/src/draft/LogoV2.vue +19 -19
  137. package/src/draft/MainCard.vue +38 -38
  138. package/src/draft/MultiCard.vue +94 -94
  139. package/src/draft/MultiIconCard.vue +73 -73
  140. package/src/draft/OInfoCard.vue +176 -176
  141. package/src/draft/Process.vue +81 -81
  142. package/src/draft/Section.vue +167 -167
  143. package/src/draft/SingleTabCard.vue +84 -84
  144. package/src/draft/SliderCard.vue +110 -110
  145. package/src/env.d.ts +1 -1
  146. package/src/i18n/en.ts +20 -20
  147. package/src/i18n/index.ts +42 -42
  148. package/src/i18n/zh.ts +14 -9
  149. package/src/index.ts +15 -1
  150. package/src/npmcachae/_cacache/content-v2/sha512/bd/56/25079ffb18446953f88fc063c3d6eaf7191772851b8477c118f113b920a7f357b67b9006181af58c9f68b0059b899ad0f2c86fe0a6490958d138cb063afd +1 -0
  151. package/src/npmcachae/_cacache/index-v5/d8/49/af4c6bb8f580edbd7b6e18db381844403e5f689a9849c5ffcdd2dd95d735 +3 -0
  152. package/src/npmcachae/_logs/2026-03-17T10_53_33_398Z-debug-0.log +156 -0
  153. package/src/npmcachae/_logs/2026-03-17T10_53_35_464Z-debug-0.log +156 -0
  154. package/src/npmcachae/_logs/2026-03-17T10_53_37_852Z-debug-0.log +156 -0
  155. package/src/npmcachae/_update-notifier-last-checked +0 -0
  156. package/src/shared/provide.ts +6 -6
  157. package/src/shims-vue-dompurify-html.d.ts +17 -0
  158. package/src/vue.d.ts +9 -9
  159. package/tsconfig.json +33 -33
  160. package/vite.config.ts +102 -101
  161. package/dist/chunk-index.cjs.js +0 -1
  162. package/dist/chunk-index.es.js +0 -64
@@ -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>