@opendesign-plus-test/components 0.0.1-rc.82 → 0.0.1-rc.83

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 (218) hide show
  1. package/dist/chunk-OElCookieNotice.cjs.js +1 -1
  2. package/dist/chunk-OElCookieNotice.es.js +89 -77
  3. package/dist/components/activity/index.d.ts +9 -9
  4. package/dist/components/banner/index.d.ts +6 -6
  5. package/dist/components/events/index.d.ts +20 -20
  6. package/dist/components/header/OHeaderMobile.vue.d.ts +22 -22
  7. package/dist/components/header/components/HeaderNavMobile.vue.d.ts +3 -3
  8. package/dist/components/header/index.d.ts +27 -27
  9. package/dist/components/header-search/index.d.ts +13 -13
  10. package/dist/components/meeting/OMeetingForm.vue.d.ts +2 -0
  11. package/dist/components/meeting/OMeetingPlayback.vue.d.ts +6 -6
  12. package/dist/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +1 -1
  13. package/dist/components/meeting/index.d.ts +37 -31
  14. package/dist/components/meeting/types.d.ts +3 -0
  15. package/dist/components/search/index.d.ts +11 -11
  16. package/dist/components.cjs.js +35 -35
  17. package/dist/components.css +1 -1
  18. package/dist/components.es.js +6822 -6755
  19. package/dist/treeshaking/components/activity/index.d.ts +9 -9
  20. package/dist/treeshaking/components/banner/index.d.ts +6 -6
  21. package/dist/treeshaking/components/events/index.d.ts +20 -20
  22. package/dist/treeshaking/components/header/OHeaderMobile.vue.d.ts +22 -22
  23. package/dist/treeshaking/components/header/components/HeaderNavMobile.vue.d.ts +3 -3
  24. package/dist/treeshaking/components/header/index.d.ts +27 -27
  25. package/dist/treeshaking/components/header-search/index.d.ts +13 -13
  26. package/dist/treeshaking/components/meeting/OMeetingForm.vue.d.ts +2 -0
  27. package/dist/treeshaking/components/meeting/OMeetingForm.vue.mjs +104 -47
  28. package/dist/treeshaking/components/meeting/OMeetingMyCalendar.css +4 -0
  29. package/dist/treeshaking/components/meeting/OMeetingMyCalendar.vue.mjs +28 -12
  30. package/dist/treeshaking/components/meeting/OMeetingPlayback.vue.d.ts +6 -6
  31. package/dist/treeshaking/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +1 -1
  32. package/dist/treeshaking/components/meeting/index.d.ts +37 -31
  33. package/dist/treeshaking/components/meeting/types.d.ts +3 -0
  34. package/dist/treeshaking/components/search/index.d.ts +11 -11
  35. package/dist/treeshaking/i18n/en.mjs +6 -0
  36. package/dist/treeshaking/i18n/zh.mjs +8 -2
  37. package/package.json +4 -1
  38. package/dist/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +0 -664
  39. package/dist/treeshaking/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +0 -664
  40. package/docs/design.md +0 -27
  41. package/docs/design_banner.md +0 -41
  42. package/docs/design_section.md +0 -27
  43. package/plugins/css-inject-plugin.ts +0 -37
  44. package/scripts/build.js +0 -17
  45. package/scripts/generate-components-index.js +0 -62
  46. package/src/assets/events/svg-icons/icon-checked.svg +0 -3
  47. package/src/assets/events/svg-icons/icon-competition.svg +0 -7
  48. package/src/assets/events/svg-icons/icon-events.svg +0 -4
  49. package/src/assets/events/svg-icons/icon-release.svg +0 -4
  50. package/src/assets/events/svg-icons/icon-summit.svg +0 -4
  51. package/src/assets/meeting/empty.png +0 -0
  52. package/src/assets/meeting/svg-icons/icon-all.svg +0 -4
  53. package/src/assets/meeting/svg-icons/icon-backward.svg +0 -4
  54. package/src/assets/meeting/svg-icons/icon-calendar.svg +0 -3
  55. package/src/assets/meeting/svg-icons/icon-cancel.svg +0 -4
  56. package/src/assets/meeting/svg-icons/icon-captions.svg +0 -4
  57. package/src/assets/meeting/svg-icons/icon-close-captions.svg +0 -6
  58. package/src/assets/meeting/svg-icons/icon-close-fullscreen.svg +0 -6
  59. package/src/assets/meeting/svg-icons/icon-copy.svg +0 -4
  60. package/src/assets/meeting/svg-icons/icon-create.svg +0 -5
  61. package/src/assets/meeting/svg-icons/icon-delete.svg +0 -7
  62. package/src/assets/meeting/svg-icons/icon-empty.svg +0 -65
  63. package/src/assets/meeting/svg-icons/icon-event.svg +0 -4
  64. package/src/assets/meeting/svg-icons/icon-export.svg +0 -3
  65. package/src/assets/meeting/svg-icons/icon-forward.svg +0 -4
  66. package/src/assets/meeting/svg-icons/icon-fullscreen.svg +0 -6
  67. package/src/assets/meeting/svg-icons/icon-help.svg +0 -3
  68. package/src/assets/meeting/svg-icons/icon-important.svg +0 -4
  69. package/src/assets/meeting/svg-icons/icon-info.svg +0 -3
  70. package/src/assets/meeting/svg-icons/icon-meet.svg +0 -4
  71. package/src/assets/meeting/svg-icons/icon-meeting-message.svg +0 -5
  72. package/src/assets/meeting/svg-icons/icon-meeting.svg +0 -4
  73. package/src/assets/meeting/svg-icons/icon-play.svg +0 -5
  74. package/src/assets/meeting/svg-icons/icon-playing-tip.svg +0 -7
  75. package/src/assets/meeting/svg-icons/icon-playing.svg +0 -5
  76. package/src/assets/meeting/svg-icons/icon-question.svg +0 -4
  77. package/src/assets/meeting/svg-icons/icon-sound.svg +0 -5
  78. package/src/assets/meeting/svg-icons/icon-speaker.svg +0 -3
  79. package/src/assets/meeting/svg-icons/icon-summit.svg +0 -4
  80. package/src/assets/meeting/svg-icons/icon-telligent.svg +0 -3
  81. package/src/assets/meeting/svg-icons/icon-tip.svg +0 -3
  82. package/src/assets/meeting/svg-icons/icon-todo.svg +0 -4
  83. package/src/assets/meeting/transparent.png +0 -0
  84. package/src/assets/styles/element-plus.scss +0 -283
  85. package/src/assets/svg-icons/icon-arrow-left.svg +0 -3
  86. package/src/assets/svg-icons/icon-avatar-line.svg +0 -3
  87. package/src/assets/svg-icons/icon-caret-left.svg +0 -3
  88. package/src/assets/svg-icons/icon-caret-right.svg +0 -3
  89. package/src/assets/svg-icons/icon-chevron-down.svg +0 -3
  90. package/src/assets/svg-icons/icon-chevron-right.svg +0 -3
  91. package/src/assets/svg-icons/icon-chevron-up.svg +0 -3
  92. package/src/assets/svg-icons/icon-close.svg +0 -3
  93. package/src/assets/svg-icons/icon-delete-hover.svg +0 -4
  94. package/src/assets/svg-icons/icon-delete.svg +0 -7
  95. package/src/assets/svg-icons/icon-filter.svg +0 -3
  96. package/src/assets/svg-icons/icon-header-back.svg +0 -3
  97. package/src/assets/svg-icons/icon-header-delete.svg +0 -3
  98. package/src/assets/svg-icons/icon-header-menu.svg +0 -3
  99. package/src/assets/svg-icons/icon-header-person.svg +0 -3
  100. package/src/assets/svg-icons/icon-header-search.svg +0 -4
  101. package/src/assets/svg-icons/icon-image-close.svg +0 -4
  102. package/src/assets/svg-icons/icon-image-upload.svg +0 -3
  103. package/src/assets/svg-icons/icon-image-zoomin.svg +0 -3
  104. package/src/assets/svg-icons/icon-loading.svg +0 -4
  105. package/src/assets/svg-icons/icon-locale.svg +0 -3
  106. package/src/assets/svg-icons/icon-log-off.svg +0 -3
  107. package/src/assets/svg-icons/icon-message.svg +0 -3
  108. package/src/assets/svg-icons/icon-moon.svg +0 -3
  109. package/src/assets/svg-icons/icon-outlink.svg +0 -3
  110. package/src/assets/svg-icons/icon-overview.svg +0 -3
  111. package/src/assets/svg-icons/icon-refresh.svg +0 -3
  112. package/src/assets/svg-icons/icon-search.svg +0 -3
  113. package/src/assets/svg-icons/icon-setting.svg +0 -3
  114. package/src/assets/svg-icons/icon-sun.svg +0 -3
  115. package/src/assets/svg-icons/icon-tips.svg +0 -3
  116. package/src/components/activity/OActivityApproval.vue +0 -868
  117. package/src/components/activity/OActivityForm.vue +0 -548
  118. package/src/components/activity/OActivityMyCalendar.vue +0 -1540
  119. package/src/components/activity/composables/useActivityConfig.ts +0 -141
  120. package/src/components/activity/config.ts +0 -1
  121. package/src/components/activity/index.ts +0 -24
  122. package/src/components/activity/types.ts +0 -95
  123. package/src/components/banner/OBanner.vue +0 -288
  124. package/src/components/banner/OBannerContent.vue +0 -175
  125. package/src/components/banner/index.ts +0 -18
  126. package/src/components/banner/types.ts +0 -39
  127. package/src/components/common/AppAvatar.vue +0 -83
  128. package/src/components/common/ClientOnly.vue +0 -13
  129. package/src/components/common/ContentWrapper.vue +0 -82
  130. package/src/components/common/MoreText.vue +0 -124
  131. package/src/components/common/ThFilter.vue +0 -330
  132. package/src/components/config-provider/OPlusConfigProvider.vue +0 -32
  133. package/src/components/config-provider/index.ts +0 -10
  134. package/src/components/cookie-notice/OCookieNotice.vue +0 -575
  135. package/src/components/cookie-notice/index.ts +0 -10
  136. package/src/components/element-plus/OElCookieNotice.vue +0 -603
  137. package/src/components/element-plus/index.ts +0 -3
  138. package/src/components/events/OEventsApply.vue +0 -509
  139. package/src/components/events/OEventsCalendar.vue +0 -600
  140. package/src/components/events/OEventsList.vue +0 -461
  141. package/src/components/events/config.ts +0 -35
  142. package/src/components/events/index.ts +0 -24
  143. package/src/components/events/types.ts +0 -84
  144. package/src/components/events/utils.ts +0 -9
  145. package/src/components/footer/OFooter.vue +0 -577
  146. package/src/components/footer/index.ts +0 -10
  147. package/src/components/header/OHeader.vue +0 -157
  148. package/src/components/header/OHeaderMobile.vue +0 -184
  149. package/src/components/header/components/HeaderContent.vue +0 -1125
  150. package/src/components/header/components/HeaderNav.vue +0 -278
  151. package/src/components/header/components/HeaderNavMobile.vue +0 -380
  152. package/src/components/header/index.ts +0 -18
  153. package/src/components/header/types.ts +0 -96
  154. package/src/components/header-language-switcher/OHeaderLanguageSwitcher.vue +0 -249
  155. package/src/components/header-language-switcher/index.ts +0 -10
  156. package/src/components/header-search/OHeaderSearch.vue +0 -628
  157. package/src/components/header-search/index.ts +0 -10
  158. package/src/components/header-source-code/OHeaderSourceCode.vue +0 -151
  159. package/src/components/header-source-code/index.ts +0 -10
  160. package/src/components/header-theme/OHeaderTheme.vue +0 -132
  161. package/src/components/header-theme/index.ts +0 -10
  162. package/src/components/header-user/OHeaderUser.vue +0 -249
  163. package/src/components/header-user/index.ts +0 -10
  164. package/src/components/meeting/OMeetingCalendar.vue +0 -943
  165. package/src/components/meeting/OMeetingForm.vue +0 -1131
  166. package/src/components/meeting/OMeetingMyCalendar.vue +0 -1628
  167. package/src/components/meeting/OMeetingPlayback.vue +0 -469
  168. package/src/components/meeting/OMeetingSigCalendar.vue +0 -500
  169. package/src/components/meeting/components/OMeetingCalendarList.vue +0 -626
  170. package/src/components/meeting/components/OMeetingCalendarSelector.vue +0 -213
  171. package/src/components/meeting/components/OMeetingDetail.vue +0 -285
  172. package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +0 -615
  173. package/src/components/meeting/components/OMeetingPlaybackVideo.vue +0 -741
  174. package/src/components/meeting/components/OMeetingSigAside.vue +0 -205
  175. package/src/components/meeting/composables/useMeetingConfig.ts +0 -108
  176. package/src/components/meeting/config.ts +0 -48
  177. package/src/components/meeting/index.ts +0 -45
  178. package/src/components/meeting/types.ts +0 -270
  179. package/src/components/meeting/utils.ts +0 -70
  180. package/src/components/search/OSearchInput.vue +0 -526
  181. package/src/components/search/composables/useImageSearch.ts +0 -157
  182. package/src/components/search/composables/useKeywordHighlight.ts +0 -30
  183. package/src/components/search/composables/useSearchHistory.ts +0 -75
  184. package/src/components/search/index.ts +0 -23
  185. package/src/components/search/internal/HighlightText.vue +0 -37
  186. package/src/components/search/internal/SearchImageInput.vue +0 -498
  187. package/src/components/search/internal/SearchPanel.vue +0 -431
  188. package/src/components/search/types.ts +0 -25
  189. package/src/components/section/OSection.vue +0 -178
  190. package/src/components/section/index.ts +0 -10
  191. package/src/draft/Banner.vue +0 -265
  192. package/src/draft/ButtonCards.vue +0 -106
  193. package/src/draft/Feature.vue +0 -134
  194. package/src/draft/Footer.vue +0 -519
  195. package/src/draft/HorizontalAnchor.vue +0 -165
  196. package/src/draft/ItemSwiper.vue +0 -133
  197. package/src/draft/Logo.vue +0 -141
  198. package/src/draft/LogoCard.vue +0 -75
  199. package/src/draft/LogoV2.vue +0 -19
  200. package/src/draft/MainCard.vue +0 -38
  201. package/src/draft/MultiCard.vue +0 -95
  202. package/src/draft/MultiIconCard.vue +0 -74
  203. package/src/draft/OInfoCard.vue +0 -176
  204. package/src/draft/Process.vue +0 -81
  205. package/src/draft/Section.vue +0 -167
  206. package/src/draft/SingleTabCard.vue +0 -85
  207. package/src/draft/SliderCard.vue +0 -111
  208. package/src/env.d.ts +0 -16
  209. package/src/i18n/en.ts +0 -278
  210. package/src/i18n/index.ts +0 -56
  211. package/src/i18n/zh.ts +0 -268
  212. package/src/index.ts +0 -18
  213. package/src/shared/provide.ts +0 -6
  214. package/src/shims-vue-dompurify-html.d.ts +0 -17
  215. package/src/vue.d.ts +0 -10
  216. package/tsconfig.json +0 -37
  217. package/vite.config.ts +0 -123
  218. package/vite.treeshaking.config.ts +0 -127
@@ -1,431 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue';
3
- import { OIcon } from '@opensig/opendesign';
4
- import IconDelete from '~icons/components/icon-delete-hover.svg';
5
- import IconDeleteAll from '~icons/components/icon-delete.svg';
6
- import IconRefresh from '~icons/components/icon-refresh.svg';
7
- import HighlightText from './HighlightText.vue';
8
- import { useI18n } from '@/i18n';
9
- import type { OSearchRecommendItem } from '../types';
10
-
11
- export interface SearchPanelPropsT {
12
- keyword?: string;
13
- onestepItems?: OSearchRecommendItem[];
14
- onestepTitle?: string;
15
- suggestItems?: OSearchRecommendItem[];
16
- suggestTitle?: string;
17
- recommendItems?: string[];
18
- historyItems?: string[];
19
- historyTitle?: string;
20
- hotItems?: string[];
21
- hotTitle?: string;
22
- noDataText?: string;
23
- highlightKeyword?: boolean;
24
- /** When true, show history+hot sections only if keyword is empty */
25
- hideOnKeyword?: boolean;
26
- /** When true, show suggest empty state ("no data") even when list is empty */
27
- showSuggestEmpty?: boolean;
28
- isDark?: boolean;
29
- /** 'chips' = tag-cloud (header dropdown), 'list' = full-width rows (page search) */
30
- historyLayout?: 'chips' | 'list';
31
- }
32
-
33
- const props = withDefaults(defineProps<SearchPanelPropsT>(), {
34
- keyword: '',
35
- onestepItems: () => [],
36
- suggestItems: () => [],
37
- recommendItems: () => [],
38
- historyItems: () => [],
39
- hotItems: () => [],
40
- highlightKeyword: true,
41
- hideOnKeyword: false,
42
- showSuggestEmpty: false,
43
- isDark: false,
44
- historyLayout: 'chips',
45
- });
46
-
47
- const emit = defineEmits<{
48
- (e: 'onestep-click', item: OSearchRecommendItem): void;
49
- (e: 'suggest-click', item: OSearchRecommendItem): void;
50
- (e: 'recommend-click', val: string): void;
51
- (e: 'history-click', val: string): void;
52
- (e: 'hot-click', val: string): void;
53
- (e: 'history-remove', val: string): void;
54
- (e: 'history-clear'): void;
55
- (e: 'hot-refresh'): void;
56
- }>();
57
-
58
- const { t } = useI18n();
59
-
60
- const hasKeyword = computed(() => !!props.keyword?.trim());
61
-
62
- const showOnestep = computed(() => hasKeyword.value && props.onestepItems.length > 0);
63
- const showSuggest = computed(() => hasKeyword.value && (props.suggestItems.length > 0 || props.showSuggestEmpty));
64
- const showRecommend = computed(
65
- () => !hasKeyword.value && props.recommendItems.length > 0
66
- );
67
- const showHistory = computed(
68
- () => (!props.hideOnKeyword || !hasKeyword.value) && props.historyItems.length > 0
69
- );
70
- const showHot = computed(
71
- () => (!props.hideOnKeyword || !hasKeyword.value) && props.hotItems.length > 0
72
- );
73
-
74
- const showSuggestDivider = computed(() => showOnestep.value && showSuggest.value);
75
- const showHistoryHotDivider = computed(() => showHistory.value && showHot.value);
76
- </script>
77
-
78
- <template>
79
- <div class="o-search-panel">
80
- <!-- ONESTEP / 搜索直达 -->
81
- <div v-if="showOnestep" class="o-search-panel-section o-search-panel-onestep">
82
- <slot name="onestep-header" :items="onestepItems">
83
- <div class="o-search-panel-section-title onestep">{{ onestepTitle ?? t('search.onestep') }}</div>
84
- </slot>
85
- <slot name="onestep-content" :items="onestepItems" :keyword="keyword">
86
- <div
87
- v-for="item in onestepItems"
88
- :key="item.key + (item.path ?? '')"
89
- class="o-search-panel-item o-search-panel-onestep-item"
90
- @click="emit('onestep-click', item)"
91
- >
92
- <HighlightText :text="item.key" :keyword="keyword" :enabled="highlightKeyword" />
93
- <span v-if="item.type" class="o-search-panel-onestep-tag">{{ item.type }}</span>
94
- </div>
95
- </slot>
96
- </div>
97
-
98
- <div v-if="showSuggestDivider" class="o-search-panel-divider"></div>
99
-
100
- <!-- SUGGEST / 搜索建议 (rich items) -->
101
- <div v-if="showSuggest" class="o-search-panel-section o-search-panel-suggest">
102
- <slot name="suggest-header" :items="suggestItems">
103
- <div class="o-search-panel-section-title suggest">{{ suggestTitle ?? t('search.suggest') }}</div>
104
- </slot>
105
- <slot name="suggest-content" :items="suggestItems" :keyword="keyword">
106
- <template v-if="suggestItems.length">
107
- <div
108
- v-for="item in suggestItems"
109
- :key="item.key"
110
- class="o-search-panel-item"
111
- @click="emit('suggest-click', item)"
112
- >
113
- <HighlightText :text="item.key" :keyword="keyword" :enabled="highlightKeyword" />
114
- </div>
115
- </template>
116
- <div v-else class="o-search-panel-no-data">{{ noDataText ?? t('search.noData') }}</div>
117
- </slot>
118
- </div>
119
-
120
- <!-- RECOMMEND (legacy plain string list, shown when no keyword) -->
121
- <div v-if="showRecommend" class="o-search-panel-section o-search-panel-recommend">
122
- <slot name="recommend-header" :items="recommendItems" />
123
- <slot name="recommend-content" :items="recommendItems">
124
- <div
125
- v-for="item in recommendItems"
126
- :key="item"
127
- class="o-search-panel-recommend-item"
128
- @click="emit('recommend-click', item)"
129
- >
130
- {{ item }}
131
- </div>
132
- </slot>
133
- </div>
134
-
135
- <!-- HISTORY / 历史记录 -->
136
- <div v-if="showHistory" class="o-search-panel-section o-search-panel-history">
137
- <slot name="history-header" :items="historyItems">
138
- <div class="o-search-panel-common-header">
139
- <span class="o-search-panel-section-title">{{ historyTitle ?? t('search.history') }}</span>
140
- <OIcon v-if="historyLayout !== 'list'" class="o-search-panel-icon" @click.stop="emit('history-clear')">
141
- <IconDeleteAll />
142
- </OIcon>
143
- </div>
144
- </slot>
145
- <slot name="history-content" :items="historyItems">
146
- <!-- list layout: full-width rows, no delete icon -->
147
- <template v-if="historyLayout === 'list'">
148
- <div
149
- v-for="item in historyItems"
150
- :key="item"
151
- class="o-search-panel-history-row"
152
- @click="emit('history-click', item)"
153
- >
154
- <span class="o-search-panel-history-row-text">{{ item }}</span>
155
- </div>
156
- </template>
157
- <!-- chips layout (default): tag-cloud -->
158
- <template v-else>
159
- <div class="o-search-panel-history-list">
160
- <div
161
- v-for="item in historyItems"
162
- :key="item"
163
- class="o-search-panel-history-item"
164
- :class="{ 'is-dark': isDark }"
165
- @click="emit('history-click', item)"
166
- >
167
- <span class="o-search-panel-history-text">{{ item }}</span>
168
- <OIcon class="o-search-panel-history-remove" @click.stop="emit('history-remove', item)">
169
- <IconDelete />
170
- </OIcon>
171
- </div>
172
- </div>
173
- </template>
174
- </slot>
175
- </div>
176
-
177
- <div v-if="showHistoryHotDivider" class="o-search-panel-divider"></div>
178
-
179
- <!-- HOT / 热门搜索 -->
180
- <div v-if="showHot" class="o-search-panel-section o-search-panel-hot">
181
- <slot name="hot-header" :items="hotItems">
182
- <div class="o-search-panel-common-header">
183
- <div class="o-search-panel-section-title">{{ hotTitle ?? t('search.hot') }}</div>
184
- <OIcon class="o-search-panel-icon" @click.stop="emit('hot-refresh')">
185
- <IconRefresh />
186
- </OIcon>
187
- </div>
188
- </slot>
189
- <slot name="hot-content" :items="hotItems">
190
- <div class="o-search-panel-hot-list">
191
- <div
192
- v-for="item in hotItems"
193
- :key="item"
194
- class="o-search-panel-hot-item"
195
- @click="emit('hot-click', item)"
196
- >
197
- {{ item }}
198
- </div>
199
- </div>
200
- </slot>
201
- </div>
202
- </div>
203
- </template>
204
-
205
- <style lang="scss" scoped>
206
- .o-search-panel {
207
- display: flex;
208
- flex-direction: column;
209
- gap: var(--o-gap-4);
210
- }
211
-
212
- .o-search-panel-section + .o-search-panel-section {
213
- // sections rely on explicit dividers / gap from parent
214
- }
215
-
216
- .o-search-panel-section-title {
217
-
218
- &.suggest,
219
- &.onestep {
220
- margin-bottom: var(--o-gap-3);
221
- }
222
-
223
- @include tip1;
224
- color: var(--o-color-info3);
225
- font-weight: 400;
226
-
227
- @include respond-to('<=pad_v') {
228
- color: var(--o-color-info1);
229
- @include text2;
230
- }
231
- }
232
-
233
- .o-search-panel-item {
234
- @include tip1;
235
- padding: 5px var(--o-gap-3);
236
- cursor: pointer;
237
- color: var(--o-color-info1);
238
- border-radius: var(--o-radius-xs);
239
- margin: 0 calc(-1 * var(--o-gap-3));
240
-
241
- &:hover {
242
- background-color: var(--o-color-control2-light);
243
- }
244
-
245
- &:active {
246
- background-color: var(--o-color-control3-light);
247
- }
248
-
249
- @include respond-to('<=pad_v') {
250
- @include text1;
251
- }
252
- }
253
-
254
- .o-search-panel-onestep-item {
255
- display: flex;
256
- align-items: center;
257
- white-space: pre-wrap;
258
- }
259
-
260
- .o-search-panel-onestep-tag {
261
- @include tip2;
262
- height: 20px;
263
- display: inline-flex;
264
- align-items: center;
265
- padding: 1px 8px;
266
- border-radius: 4px;
267
- font-weight: 400;
268
- margin-left: 8px;
269
- border: 1px solid var(--o-color-control4);
270
- color: var(--o-color-info3);
271
- }
272
-
273
- .o-search-panel-no-data {
274
- @include tip2;
275
- color: var(--o-color-info3);
276
- padding: 0 8px;
277
-
278
- @include respond-to('<=pad_v') {
279
- @include text1;
280
- }
281
- }
282
-
283
- .o-search-panel-recommend-item {
284
- @include tip1;
285
- padding: 5px 8px;
286
- cursor: pointer;
287
- color: var(--o-color-info1);
288
- border-radius: var(--o-radius-xs);
289
-
290
- &:hover {
291
- background-color: var(--o-color-control2-light);
292
- }
293
- }
294
-
295
- .o-search-panel-divider {
296
- background: var(--o-color-control4);
297
- width: 100%;
298
- height: 1px;
299
-
300
- @include respond-to('<=pad_v') {
301
- display: none;
302
- }
303
- }
304
-
305
- .o-search-panel-common-header {
306
- display: flex;
307
- align-items: center;
308
- justify-content: space-between;
309
- }
310
-
311
- .o-search-panel-icon {
312
- cursor: pointer;
313
- color: var(--o-color-info1);
314
- font-size: 16px;
315
-
316
- &:hover {
317
- color: var(--o-color-primary1);
318
- }
319
- }
320
-
321
- .o-search-panel-history-list {
322
- display: flex;
323
- gap: 8px;
324
- flex-wrap: wrap;
325
- margin-top: var(--o-gap-3);
326
- }
327
-
328
- // ---- chips layout ----
329
- .o-search-panel-history-item {
330
- position: relative;
331
- display: flex;
332
- align-items: center;
333
- max-width: 224px;
334
- height: 24px;
335
- padding: 3px var(--o-gap-3);
336
- background-color: var(--o-color-control2-light);
337
- border-radius: var(--o-radius-xs);
338
- color: var(--o-color-info1);
339
- cursor: pointer;
340
-
341
- @include hover {
342
- background-color: var(--o-color-control3-light);
343
- color: var(--o-color-primary1);
344
-
345
- .o-search-panel-history-remove {
346
- display: inline-flex;
347
- }
348
- }
349
-
350
- &.is-dark {
351
- @include hover {
352
- background-color: rgb(var(--o-mixedgray-7));
353
- }
354
- }
355
-
356
- @include respond-to('<=pad_v') {
357
- height: 28px;
358
- }
359
- }
360
-
361
- .o-search-panel-history-text {
362
- max-width: 200px;
363
- overflow: hidden;
364
- text-overflow: ellipsis;
365
- white-space: nowrap;
366
- @include tip2;
367
-
368
- @include respond-to('<=pad_v') {
369
- @include text1;
370
- }
371
- }
372
-
373
- .o-search-panel-history-remove {
374
- position: absolute;
375
- right: -8px;
376
- top: -8px;
377
- display: none;
378
- align-items: center;
379
- justify-content: center;
380
- width: 16px;
381
- height: 16px;
382
-
383
- :deep(svg) {
384
- width: 16px;
385
- height: 16px;
386
- }
387
- }
388
-
389
- // ---- list layout ----
390
- .o-search-panel-history-row {
391
- padding: 4px 8px;
392
- border-radius: var(--o-radius-xs);
393
- cursor: pointer;
394
- color: var(--o-color-info1);
395
- overflow: hidden;
396
- text-overflow: ellipsis;
397
- white-space: nowrap;
398
- @include tip1;
399
-
400
- @include hover {
401
- background-color: var(--o-color-control2-light);
402
- color: var(--o-color-primary1);
403
- }
404
- }
405
-
406
- .o-search-panel-hot-list {
407
- display: flex;
408
- flex-wrap: wrap;
409
- gap: var(--o-gap-3) var(--o-gap-4);
410
- margin-top: var(--o-gap-3);
411
- @include tip1;
412
-
413
- @include respond-to('<=pad_v') {
414
- display: block;
415
- @include text1;
416
- }
417
- }
418
-
419
- .o-search-panel-hot-item {
420
- color: var(--o-color-info1);
421
- cursor: pointer;
422
-
423
- @include respond-to('<=pad_v') {
424
- margin-top: var(--o-gap-3);
425
- }
426
-
427
- @include hover {
428
- color: var(--o-color-primary1);
429
- }
430
- }
431
- </style>
@@ -1,25 +0,0 @@
1
- export interface OSearchRecommendItem {
2
- key: string;
3
- path?: string;
4
- type?: string;
5
- count?: number;
6
- }
7
-
8
- export interface OSearchPayload {
9
- keyword: string;
10
- imageUrl?: string;
11
- }
12
-
13
- export interface OSearchImageUploadErrorPayload {
14
- file: File;
15
- error: unknown;
16
- }
17
-
18
- export type OSearchUploadImageFn = (file: File) => Promise<string>;
19
-
20
- export type OSearchItemClickType = 'history' | 'hot' | 'suggest' | 'onestep';
21
-
22
- export interface OSearchHighlightPart {
23
- text: string;
24
- match: boolean;
25
- }
@@ -1,178 +0,0 @@
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
- export 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('pad-laptop') {
125
- margin-top: 8px;
126
- }
127
-
128
- @include respond('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('<=laptop') {
159
- margin-top: 16px;
160
- }
161
-
162
- @include respond('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,10 +0,0 @@
1
- import _OSection from './OSection.vue';
2
- import type { App } from 'vue';
3
-
4
- const OSection = Object.assign(_OSection, {
5
- install(app: App) {
6
- app.component('OSection', _OSection);
7
- },
8
- });
9
-
10
- export { OSection };