@opendesign-plus/components 0.0.1-rc.16
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.
- package/dist/chunk-OElCookieNotice.cjs.js +1 -0
- package/dist/chunk-OElCookieNotice.es.js +281 -0
- package/dist/components/OBanner.vue.d.ts +2 -0
- package/dist/components/OCookieNotice.vue.d.ts +16 -0
- package/dist/components/OFooter.vue.d.ts +25 -0
- package/dist/components/OHeader.vue.d.ts +23 -0
- package/dist/components/OHeaderMoblie.vue.d.ts +33 -0
- package/dist/components/OHeaderSearch.vue.d.ts +692 -0
- package/dist/components/OHeaderUser.vue.d.ts +40 -0
- package/dist/components/OPlusConfigProvider.vue.d.ts +23 -0
- package/dist/components/OSection.vue.d.ts +37 -0
- package/dist/components/OSourceCode.vue.d.ts +20 -0
- package/dist/components/OThemeSwitcher.vue.d.ts +28 -0
- package/dist/components/element-plus/OElCookieNotice.vue.d.ts +31 -0
- package/dist/components/element-plus/index.d.ts +2 -0
- package/dist/components/events/OEventsApply.vue.d.ts +16 -0
- package/dist/components/events/OEventsCalendar.vue.d.ts +5 -0
- package/dist/components/events/OEventsList.vue.d.ts +26 -0
- package/dist/components/events/config.d.ts +26 -0
- package/dist/components/events/index.d.ts +78 -0
- package/dist/components/events/types.d.ts +66 -0
- package/dist/components/events/utils.d.ts +7 -0
- package/dist/components.cjs.js +3 -0
- package/dist/components.css +1 -0
- package/dist/components.element.cjs.js +1 -0
- package/dist/components.element.es.js +4 -0
- package/dist/components.es.js +3509 -0
- package/dist/index.d.ts +18 -0
- package/docs/design.md +27 -0
- package/docs/design_banner.md +41 -0
- package/docs/design_section.md +27 -0
- package/npmcachae/_cacache/content-v2/sha512/bd/56/25079ffb18446953f88fc063c3d6eaf7191772851b8477c118f113b920a7f357b67b9006181af58c9f68b0059b899ad0f2c86fe0a6490958d138cb063afd +1 -0
- package/npmcachae/_cacache/index-v5/d8/49/af4c6bb8f580edbd7b6e18db381844403e5f689a9849c5ffcdd2dd95d735 +3 -0
- package/npmcachae/_logs/2026-03-17T09_38_12_009Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_14_370Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_16_516Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_18_616Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_20_859Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_23_182Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_25_452Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_27_865Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_30_082Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_32_219Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_34_308Z-debug-0.log +157 -0
- package/npmcachae/_update-notifier-last-checked +0 -0
- package/package.json +53 -0
- package/scripts/generate-components-index.js +100 -0
- package/src/assets/events/city/default-cover.png +0 -0
- package/src/assets/events/city//344/270/212/346/265/267.png +0 -0
- package/src/assets/events/city//345/214/227/344/272/254.png +0 -0
- package/src/assets/events/city//345/215/227/344/272/254.png +0 -0
- package/src/assets/events/city//345/244/251/346/264/245.png +0 -0
- package/src/assets/events/city//345/271/277/345/267/236.png +0 -0
- package/src/assets/events/city//346/210/220/351/203/275.png +0 -0
- package/src/assets/events/city//346/227/240/351/224/241.png +0 -0
- package/src/assets/events/city//346/235/255/345/267/236.png +0 -0
- package/src/assets/events/city//346/255/246/346/261/211.png +0 -0
- package/src/assets/events/city//346/267/261/345/234/2631.png +0 -0
- package/src/assets/events/city//346/267/261/345/234/2632.png +0 -0
- package/src/assets/events/city//350/213/217/345/267/236.png +0 -0
- package/src/assets/events/city//350/245/277/345/256/211.png +0 -0
- package/src/assets/events/city//351/203/221/345/267/236.png +0 -0
- package/src/assets/events/svg-icons/icon-checked.svg +3 -0
- package/src/assets/events/svg-icons/icon-competition.svg +7 -0
- package/src/assets/events/svg-icons/icon-events.svg +4 -0
- package/src/assets/events/svg-icons/icon-release.svg +4 -0
- package/src/assets/events/svg-icons/icon-summit.svg +4 -0
- package/src/assets/svg-icons/icon-arrow-left.svg +3 -0
- package/src/assets/svg-icons/icon-avatar-line.svg +3 -0
- package/src/assets/svg-icons/icon-caret-left.svg +3 -0
- package/src/assets/svg-icons/icon-caret-right.svg +3 -0
- package/src/assets/svg-icons/icon-chevron-down.svg +3 -0
- package/src/assets/svg-icons/icon-chevron-right.svg +3 -0
- package/src/assets/svg-icons/icon-close.svg +3 -0
- package/src/assets/svg-icons/icon-delete.svg +3 -0
- package/src/assets/svg-icons/icon-header-back.svg +3 -0
- package/src/assets/svg-icons/icon-header-delete.svg +3 -0
- package/src/assets/svg-icons/icon-header-menu.svg +3 -0
- package/src/assets/svg-icons/icon-header-person.svg +3 -0
- package/src/assets/svg-icons/icon-header-search.svg +4 -0
- package/src/assets/svg-icons/icon-locale.svg +3 -0
- package/src/assets/svg-icons/icon-log-off.svg +3 -0
- package/src/assets/svg-icons/icon-message.svg +3 -0
- package/src/assets/svg-icons/icon-moon.svg +3 -0
- package/src/assets/svg-icons/icon-outlink.svg +3 -0
- package/src/assets/svg-icons/icon-overview.svg +3 -0
- package/src/assets/svg-icons/icon-setting.svg +3 -0
- package/src/assets/svg-icons/icon-sun.svg +3 -0
- package/src/components/OBanner.vue +390 -0
- package/src/components/OCookieNotice.vue +423 -0
- package/src/components/OFooter.vue +566 -0
- package/src/components/OHeader.vue +97 -0
- package/src/components/OHeaderMoblie.vue +149 -0
- package/src/components/OHeaderSearch.vue +601 -0
- package/src/components/OHeaderUser.vue +304 -0
- package/src/components/OPlusConfigProvider.vue +32 -0
- package/src/components/OSection.vue +178 -0
- package/src/components/OSourceCode.vue +153 -0
- package/src/components/OThemeSwitcher.vue +108 -0
- package/src/components/common/AppAvatar.vue +83 -0
- package/src/components/common/ClientOnlyWrapper.ts +21 -0
- package/src/components/common/ContentWrapper.vue +85 -0
- package/src/components/common/HeaderEulerNav.vue +1118 -0
- package/src/components/common/HeaderNavMoblie.vue +344 -0
- package/src/components/common/HeaderUbmcNav.vue +597 -0
- package/src/components/element-plus/OElCookieNotice.vue +412 -0
- package/src/components/element-plus/index.ts +3 -0
- package/src/components/events/OEventsApply.vue +487 -0
- package/src/components/events/OEventsCalendar.vue +611 -0
- package/src/components/events/OEventsList.vue +402 -0
- package/src/components/events/config.ts +47 -0
- package/src/components/events/index.ts +23 -0
- package/src/components/events/npmcachae/_cacache/content-v2/sha512/2c/4f/a4140bfbf374a43f7dfe71880c051f79149cd259fb1a154fb692802c7489ef2317b737e7e690a627714ba19317971f29051b3798c246297b425a626a5b7a +1 -0
- package/src/components/events/npmcachae/_cacache/index-v5/8e/86/70dc69f1b1592fe14da10d2516ddfaa609af0cd9054a6ebde664acc6ab12 +2 -0
- package/src/components/events/npmcachae/_logs/2026-03-25T09_58_33_134Z-debug-0.log +105 -0
- package/src/components/events/npmcachae/_update-notifier-last-checked +0 -0
- package/src/components/events/types.ts +80 -0
- package/src/components/events/utils.ts +9 -0
- package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/3e/17/1865217b9acb9f4921c53a09b5c76587cd2ab748beb2699ff6cfb1341d73b1aa56ed91ffc5ab2c9c9b3fbe626103b35d9a79ff29ff6b8cbb8d89755fe1a2 +1 -0
- package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/a6/15/47bb7552ec9248079e839a5feecc1742d4de19524fdf041cf581701cf4760a5025106036145e279ba193b07c8fa5b07ae3d75f1b6032f0cb2219115b6167 +1 -0
- package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/d1/4c/133b32e09c97101a27a07cc4432f94e470cff02d120d21babcea77c3f5cd436793516dc1a8e282ee1a568f923c148b1a48f4a43233462a530d35e8b41c67 +1 -0
- package/src/components/meeting/npmcachae/_cacache/index-v5/54/0d/a4909047714a0a7198bb9bd37020992464e47c79a791889919b84d90aab0 +3 -0
- package/src/components/meeting/npmcachae/_cacache/index-v5/8e/2b/21a79778e2ac08cf5663baf83cb35f951995a496007eb2e2f7fba54021a4 +3 -0
- package/src/components/meeting/npmcachae/_cacache/index-v5/eb/a0/b70c8132e5b57a0f1e129b8cc941796420a9c147c0baa680710083740898 +2 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_03_54_955Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_03_57_842Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_00_016Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_02_191Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_04_425Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_06_642Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_08_826Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_36_140Z-debug-0.log +433 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_39_573Z-debug-0.log +433 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_42_134Z-debug-0.log +212 -0
- package/src/components/meeting/npmcachae/_update-notifier-last-checked +0 -0
- package/src/draft/Banner.vue +265 -0
- package/src/draft/ButtonCards.vue +106 -0
- package/src/draft/Feature.vue +134 -0
- package/src/draft/Footer.vue +512 -0
- package/src/draft/HorizontalAnchor.vue +165 -0
- package/src/draft/ItemSwiper.vue +133 -0
- package/src/draft/Logo.vue +141 -0
- package/src/draft/LogoCard.vue +75 -0
- package/src/draft/LogoV2.vue +19 -0
- package/src/draft/MainCard.vue +38 -0
- package/src/draft/MultiCard.vue +95 -0
- package/src/draft/MultiIconCard.vue +74 -0
- package/src/draft/OInfoCard.vue +176 -0
- package/src/draft/Process.vue +81 -0
- package/src/draft/Section.vue +167 -0
- package/src/draft/SingleTabCard.vue +85 -0
- package/src/draft/SliderCard.vue +110 -0
- package/src/env.d.ts +1 -0
- package/src/i18n/en.ts +20 -0
- package/src/i18n/index.ts +42 -0
- package/src/i18n/zh.ts +14 -0
- package/src/index.ts +46 -0
- package/src/npmcachae/_cacache/content-v2/sha512/bd/56/25079ffb18446953f88fc063c3d6eaf7191772851b8477c118f113b920a7f357b67b9006181af58c9f68b0059b899ad0f2c86fe0a6490958d138cb063afd +1 -0
- package/src/npmcachae/_cacache/index-v5/d8/49/af4c6bb8f580edbd7b6e18db381844403e5f689a9849c5ffcdd2dd95d735 +3 -0
- package/src/npmcachae/_logs/2026-03-17T10_53_33_398Z-debug-0.log +156 -0
- package/src/npmcachae/_logs/2026-03-17T10_53_35_464Z-debug-0.log +156 -0
- package/src/npmcachae/_logs/2026-03-17T10_53_37_852Z-debug-0.log +156 -0
- package/src/npmcachae/_update-notifier-last-checked +0 -0
- package/src/shared/provide.ts +6 -0
- package/src/shims-vue-dompurify-html.d.ts +17 -0
- package/src/vue.d.ts +10 -0
- package/tsconfig.json +33 -0
- package/vite.config.ts +102 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { Component, computed } from 'vue';
|
|
3
|
+
import { OIcon, OSwitch } from '@opensig/opendesign';
|
|
4
|
+
import { useScreen } from '@opendesign-plus/composables';
|
|
5
|
+
|
|
6
|
+
import IconSun from '~icons/components/icon-sun.svg';
|
|
7
|
+
import IconMoon from '~icons/components/icon-moon.svg';
|
|
8
|
+
|
|
9
|
+
export interface OThemeSwitcherPropsT {
|
|
10
|
+
theme?: string;
|
|
11
|
+
type?: 'auto' | 'common' | 'mobile';
|
|
12
|
+
lightValue?: string;
|
|
13
|
+
darkValue?: string;
|
|
14
|
+
lightIcon?: Component;
|
|
15
|
+
darkIcon?: Component;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface OThemeSwitcherEmitsT {
|
|
19
|
+
(e: 'update:theme', value: string): void;
|
|
20
|
+
(e: 'change', val: string): void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const props = withDefaults(defineProps<OThemeSwitcherPropsT>(), {
|
|
24
|
+
theme: 'light',
|
|
25
|
+
type: 'auto',
|
|
26
|
+
lightValue: 'light',
|
|
27
|
+
darkValue: 'dark',
|
|
28
|
+
lightIcon: IconSun,
|
|
29
|
+
darkIcon: IconMoon,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const emit = defineEmits<OThemeSwitcherEmitsT>();
|
|
33
|
+
|
|
34
|
+
const { gtPhone } = useScreen();
|
|
35
|
+
|
|
36
|
+
const switchVal = computed({
|
|
37
|
+
get() {
|
|
38
|
+
return props.theme;
|
|
39
|
+
},
|
|
40
|
+
set(val) {
|
|
41
|
+
emit('update:theme', val);
|
|
42
|
+
emit('change', val);
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const isCommon = computed(() => {
|
|
47
|
+
return props.type === 'common' || (props.type === 'auto' && gtPhone.value);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const toggleTheme = () => {
|
|
51
|
+
switchVal.value = switchVal.value === props.lightValue ? props.darkValue : props.lightValue;
|
|
52
|
+
};
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<template>
|
|
56
|
+
<div class="o-theme-switcher">
|
|
57
|
+
<div v-if="isCommon" class="o-theme-switcher-common" @click="toggleTheme">
|
|
58
|
+
<OIcon class="o-theme-icon">
|
|
59
|
+
<IconMoon v-if="switchVal === lightValue" />
|
|
60
|
+
<IconSun v-else />
|
|
61
|
+
</OIcon>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div v-else class="o-theme-switcher-mobile">
|
|
65
|
+
<OSwitch v-model="switchVal" class="o-theme-switch" :checked-value="darkValue" :unchecked-value="lightValue">
|
|
66
|
+
<template #on>
|
|
67
|
+
<OIcon class="o-theme-icon">
|
|
68
|
+
<IconSun />
|
|
69
|
+
</OIcon>
|
|
70
|
+
</template>
|
|
71
|
+
<template #off>
|
|
72
|
+
<OIcon class="o-theme-icon">
|
|
73
|
+
<IconMoon />
|
|
74
|
+
</OIcon>
|
|
75
|
+
</template>
|
|
76
|
+
</OSwitch>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</template>
|
|
80
|
+
|
|
81
|
+
<style lang="scss" scoped>
|
|
82
|
+
.o-theme-switcher-common {
|
|
83
|
+
cursor: pointer;
|
|
84
|
+
width: 20px;
|
|
85
|
+
height: 20px;
|
|
86
|
+
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
|
|
89
|
+
.o-theme-icon {
|
|
90
|
+
font-size: 24px;
|
|
91
|
+
color: var(--o-color-info1);
|
|
92
|
+
|
|
93
|
+
@include hover {
|
|
94
|
+
color: var(--o-color-primary1);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.o-theme-switcher-mobile {
|
|
100
|
+
.o-theme-switch {
|
|
101
|
+
background-color: var(--o-color-control1-light);
|
|
102
|
+
|
|
103
|
+
.o-theme-icon {
|
|
104
|
+
color: var(--o-color-white);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
</style>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, type PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
// 头像
|
|
6
|
+
avatar: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: '',
|
|
9
|
+
},
|
|
10
|
+
// 用户名
|
|
11
|
+
name: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: '',
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
16
|
+
// mini: 16 small: 24, medium: 40, large: 64
|
|
17
|
+
size: {
|
|
18
|
+
type: String as PropType<'mini' | 'small' | 'medium' | 'large'>,
|
|
19
|
+
default: 'medium',
|
|
20
|
+
},
|
|
21
|
+
// 大小尺寸自定义,单位px
|
|
22
|
+
customSize: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: 0,
|
|
25
|
+
},
|
|
26
|
+
// round--圆形 square--方形
|
|
27
|
+
variant: {
|
|
28
|
+
type: String as PropType<'round' | 'square'>,
|
|
29
|
+
default: 'round',
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const bgColorArr = ['#058EF0', '#FA7305', '#03B5A5'];
|
|
34
|
+
|
|
35
|
+
const avatarText = computed(() => props.name?.charAt(0).toUpperCase());
|
|
36
|
+
const getAvatarStyle = computed(() => {
|
|
37
|
+
const avatarStyle = {
|
|
38
|
+
'background-color': '',
|
|
39
|
+
width: '32px',
|
|
40
|
+
height: '32px',
|
|
41
|
+
'font-size': '20px',
|
|
42
|
+
};
|
|
43
|
+
avatarStyle['background-color'] = props.name ? bgColorArr[props.name?.length % bgColorArr.length] : 'transparent';
|
|
44
|
+
let sizeNum = 0;
|
|
45
|
+
if (props.customSize) {
|
|
46
|
+
sizeNum = Number(props.customSize);
|
|
47
|
+
} else {
|
|
48
|
+
const sizeToNum = {
|
|
49
|
+
mini: 16,
|
|
50
|
+
small: 24,
|
|
51
|
+
medium: 40,
|
|
52
|
+
large: 64,
|
|
53
|
+
};
|
|
54
|
+
sizeNum = sizeToNum[props.size];
|
|
55
|
+
}
|
|
56
|
+
avatarStyle.height = `${sizeNum}px`;
|
|
57
|
+
avatarStyle.width = `${sizeNum}px`;
|
|
58
|
+
avatarStyle['font-size'] = `${sizeNum / 2}px`;
|
|
59
|
+
return avatarStyle;
|
|
60
|
+
});
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<template>
|
|
64
|
+
<img v-if="avatar && !avatar.includes('gitcode')" :src="avatar" class="img-avatar" :class="variant" :style="getAvatarStyle" alt="" />
|
|
65
|
+
<div v-else class="word-avatar" :class="variant" :style="getAvatarStyle">
|
|
66
|
+
{{ avatarText }}
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
69
|
+
|
|
70
|
+
<style lang="scss" scoped>
|
|
71
|
+
.img-avatar {
|
|
72
|
+
background-color: transparent !important;
|
|
73
|
+
}
|
|
74
|
+
.word-avatar {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
color: var(--o-color-info1-inverse);
|
|
79
|
+
}
|
|
80
|
+
.round {
|
|
81
|
+
border-radius: 50%;
|
|
82
|
+
}
|
|
83
|
+
</style>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent, onMounted, ref, h, resolveComponent } from 'vue';
|
|
2
|
+
|
|
3
|
+
const fallback = (slots: any) => {
|
|
4
|
+
const show = ref(false);
|
|
5
|
+
|
|
6
|
+
onMounted(() => {
|
|
7
|
+
show.value = true;
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
return () => (show.value && slots.default ? slots.default() : null);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default defineComponent({
|
|
14
|
+
setup(_, { slots }) {
|
|
15
|
+
const BuiltIn = resolveComponent('ClientOnly');
|
|
16
|
+
if (BuiltIn && typeof BuiltIn !== 'string') {
|
|
17
|
+
return () => h(BuiltIn, null, { default: () => slots.default ? slots.default() : null });
|
|
18
|
+
}
|
|
19
|
+
return fallback(slots);
|
|
20
|
+
},
|
|
21
|
+
});
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { isBoolean, isString, isUndefined } from '@opensig/opendesign';
|
|
3
|
+
import { computed } from 'vue';
|
|
4
|
+
|
|
5
|
+
const DEFAULT = Symbol('default');
|
|
6
|
+
|
|
7
|
+
interface ContentWrapperPropsT {
|
|
8
|
+
verticalPadding?: boolean | string | Array<string>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const props = withDefaults(defineProps<ContentWrapperPropsT>(), {
|
|
12
|
+
verticalPadding: undefined,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const paddingTop = computed(() => {
|
|
16
|
+
if (!props.verticalPadding) {
|
|
17
|
+
return 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (isBoolean(props.verticalPadding)) {
|
|
21
|
+
return DEFAULT;
|
|
22
|
+
} else if (isString(props.verticalPadding)) {
|
|
23
|
+
return props.verticalPadding;
|
|
24
|
+
} else {
|
|
25
|
+
return props.verticalPadding[0];
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const paddingBottom = computed(() => {
|
|
30
|
+
if (!props.verticalPadding) {
|
|
31
|
+
return 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (isBoolean(props.verticalPadding)) {
|
|
35
|
+
return DEFAULT;
|
|
36
|
+
} else if (isString(props.verticalPadding)) {
|
|
37
|
+
return props.verticalPadding;
|
|
38
|
+
} else {
|
|
39
|
+
return !isUndefined(props.verticalPadding[1]) ? props.verticalPadding[1] : props.verticalPadding[0];
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<template>
|
|
45
|
+
<div
|
|
46
|
+
class="content-wrapper"
|
|
47
|
+
:style="{
|
|
48
|
+
'--content-wrapper-vertical-paddingTop': paddingTop === DEFAULT ? undefined : paddingTop,
|
|
49
|
+
'--content-wrapper-vertical-paddingBottom': paddingBottom === DEFAULT ? undefined : paddingBottom,
|
|
50
|
+
}"
|
|
51
|
+
>
|
|
52
|
+
<slot></slot>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<style lang="scss" scoped>
|
|
57
|
+
.content-wrapper {
|
|
58
|
+
--layout-content-max-width: 1544px;
|
|
59
|
+
--layout-content-padding: 64px;
|
|
60
|
+
--layout-header-height: 80px;
|
|
61
|
+
|
|
62
|
+
@include respond-to('<=laptop') {
|
|
63
|
+
--layout-content-max-width: 100%;
|
|
64
|
+
--layout-content-padding: 40px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@include respond-to('<=pad') {
|
|
68
|
+
--layout-content-padding: 32px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@include respond-to('phone') {
|
|
72
|
+
--layout-content-padding: 24px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
max-width: var(--layout-content-max-width);
|
|
76
|
+
padding-left: var(--layout-content-padding);
|
|
77
|
+
padding-right: var(--layout-content-padding);
|
|
78
|
+
margin: 0 auto;
|
|
79
|
+
|
|
80
|
+
--content-wrapper-vertical-paddingTop: 72px;
|
|
81
|
+
--content-wrapper-vertical-paddingBottom: 72px;
|
|
82
|
+
padding-top: var(--content-wrapper-vertical-paddingTop);
|
|
83
|
+
padding-bottom: var(--content-wrapper-vertical-paddingBottom);
|
|
84
|
+
}
|
|
85
|
+
</style>
|