@opendesign-plus/components 0.0.1-rc.23 → 0.0.1-rc.24
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/components/OThemeSwitcher.vue.d.ts +5 -2
- package/dist/components/meeting/index.d.ts +3 -3
- package/dist/components.cjs.js +33 -33
- package/dist/components.css +1 -1
- package/dist/components.es.js +1740 -1736
- package/package.json +1 -1
- package/src/components/OThemeSwitcher.vue +27 -51
- package/src/components/meeting/index.ts +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { computed } from 'vue';
|
|
3
|
-
import { OIcon, OSwitch
|
|
2
|
+
import { Component, computed } from 'vue';
|
|
3
|
+
import { OIcon, OSwitch } from '@opensig/opendesign';
|
|
4
4
|
import { useScreen } from '@opendesign-plus/composables';
|
|
5
5
|
|
|
6
6
|
import IconSun from '~icons/components/icon-sun.svg';
|
|
@@ -11,7 +11,8 @@ export interface OThemeSwitcherPropsT {
|
|
|
11
11
|
type?: 'auto' | 'common' | 'mobile';
|
|
12
12
|
lightValue?: string;
|
|
13
13
|
darkValue?: string;
|
|
14
|
-
|
|
14
|
+
lightIcon?: Component;
|
|
15
|
+
darkIcon?: Component;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export interface OThemeSwitcherEmitsT {
|
|
@@ -24,7 +25,8 @@ const props = withDefaults(defineProps<OThemeSwitcherPropsT>(), {
|
|
|
24
25
|
type: 'auto',
|
|
25
26
|
lightValue: 'light',
|
|
26
27
|
darkValue: 'dark',
|
|
27
|
-
|
|
28
|
+
lightIcon: IconSun,
|
|
29
|
+
darkIcon: IconMoon,
|
|
28
30
|
});
|
|
29
31
|
|
|
30
32
|
const emit = defineEmits<OThemeSwitcherEmitsT>();
|
|
@@ -35,7 +37,7 @@ const switchVal = computed({
|
|
|
35
37
|
get() {
|
|
36
38
|
return props.theme;
|
|
37
39
|
},
|
|
38
|
-
set(val
|
|
40
|
+
set(val) {
|
|
39
41
|
emit('update:theme', val);
|
|
40
42
|
emit('change', val);
|
|
41
43
|
},
|
|
@@ -46,17 +48,13 @@ const isCommon = computed(() => {
|
|
|
46
48
|
});
|
|
47
49
|
|
|
48
50
|
const toggleTheme = () => {
|
|
49
|
-
if (props.disabled) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
51
|
switchVal.value = switchVal.value === props.lightValue ? props.darkValue : props.lightValue;
|
|
54
52
|
};
|
|
55
53
|
</script>
|
|
56
54
|
|
|
57
55
|
<template>
|
|
58
56
|
<div class="o-theme-switcher">
|
|
59
|
-
<div v-if="isCommon" class="o-theme-switcher-common"
|
|
57
|
+
<div v-if="isCommon" class="o-theme-switcher-common" @click="toggleTheme">
|
|
60
58
|
<OIcon class="o-theme-icon">
|
|
61
59
|
<IconMoon v-if="switchVal === lightValue" />
|
|
62
60
|
<IconSun v-else />
|
|
@@ -64,18 +62,16 @@ const toggleTheme = () => {
|
|
|
64
62
|
</div>
|
|
65
63
|
|
|
66
64
|
<div v-else class="o-theme-switcher-mobile">
|
|
67
|
-
<OSwitch v-model="switchVal" class="o-theme-switch" :checked-value="
|
|
68
|
-
<template #
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
<OIconSun />
|
|
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>
|
|
73
70
|
</template>
|
|
74
71
|
<template #off>
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
<OIconMoon />
|
|
72
|
+
<OIcon class="o-theme-icon">
|
|
73
|
+
<IconMoon />
|
|
74
|
+
</OIcon>
|
|
79
75
|
</template>
|
|
80
76
|
</OSwitch>
|
|
81
77
|
</div>
|
|
@@ -84,49 +80,29 @@ const toggleTheme = () => {
|
|
|
84
80
|
|
|
85
81
|
<style lang="scss" scoped>
|
|
86
82
|
.o-theme-switcher-common {
|
|
83
|
+
cursor: pointer;
|
|
84
|
+
width: 20px;
|
|
85
|
+
height: 20px;
|
|
87
86
|
display: flex;
|
|
88
87
|
align-items: center;
|
|
89
|
-
width: var(--o-icon_size-m);
|
|
90
|
-
height: var(--o-icon_size-m);
|
|
91
|
-
font-size: var(--o-icon_size-m);
|
|
92
|
-
|
|
93
|
-
@include respond-to('pad_h') {
|
|
94
|
-
width: var(--o-icon_size-s);
|
|
95
|
-
height: var(--o-icon_size-s);
|
|
96
|
-
font-size: var(--o-icon_size-s);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.o-theme-switcher-common:not(.disabled) {
|
|
101
|
-
cursor: pointer;
|
|
102
88
|
|
|
103
89
|
.o-theme-icon {
|
|
104
|
-
|
|
90
|
+
font-size: 24px;
|
|
91
|
+
color: var(--o-color-info1);
|
|
105
92
|
|
|
106
93
|
@include hover {
|
|
107
|
-
color: var(--o-color-
|
|
108
|
-
background-color: var(--o-color-control2-light);
|
|
109
|
-
border-radius: var(--o-radius-xs);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&:active {
|
|
113
|
-
color: var(--o-color-primary3);
|
|
94
|
+
color: var(--o-color-primary1);
|
|
114
95
|
}
|
|
115
96
|
}
|
|
116
97
|
}
|
|
117
98
|
|
|
118
|
-
.o-theme-switcher-common.disabled {
|
|
119
|
-
cursor: not-allowed;
|
|
120
|
-
|
|
121
|
-
.o-theme-icon {
|
|
122
|
-
color: var(--o-color-info4);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
99
|
.o-theme-switcher-mobile {
|
|
127
100
|
.o-theme-switch {
|
|
128
|
-
|
|
129
|
-
|
|
101
|
+
background-color: var(--o-color-control1-light);
|
|
102
|
+
|
|
103
|
+
.o-theme-icon {
|
|
104
|
+
color: var(--o-color-white);
|
|
105
|
+
}
|
|
130
106
|
}
|
|
131
107
|
}
|
|
132
108
|
</style>
|
|
@@ -22,15 +22,15 @@ const OMeetingPlayback = Object.assign(_OMeetingPlayback, {
|
|
|
22
22
|
},
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
const
|
|
25
|
+
const OMeetingSigCalendar = Object.assign(_OMeetingSigCalendar, {
|
|
26
26
|
install(app: App) {
|
|
27
|
-
app.component('
|
|
27
|
+
app.component('OMeetingSigCalendar', _OMeetingMyCalendar);
|
|
28
28
|
},
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
const
|
|
31
|
+
const OMeetingMyCalendar = Object.assign(_OMeetingSigCalendar, {
|
|
32
32
|
install(app: App) {
|
|
33
|
-
app.component('
|
|
33
|
+
app.component('OMeetingMyCalendar', _OMeetingMyCalendar);
|
|
34
34
|
},
|
|
35
35
|
});
|
|
36
36
|
|
|
@@ -38,8 +38,8 @@ export {
|
|
|
38
38
|
OMeetingCalendar,
|
|
39
39
|
OMeetingForm,
|
|
40
40
|
OMeetingPlayback,
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
OMeetingSigCalendar,
|
|
42
|
+
OMeetingMyCalendar,
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
export * from './types';
|