Skip to content

Commit

Permalink
feat(style-panel): fix the color variables;
Browse files Browse the repository at this point in the history
  • Loading branch information
betterdancing committed Oct 31, 2024
1 parent f276bd8 commit 1760b8b
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default {
height: 10px;
border-radius: 50%;
border: 0;
background-color: var(--te-base-bg-5);
background-color: var(--te-common-bg-default);
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.21);
-webkit-transition: border-color 0.15s, background-color 0.15s;
transition: border-color 0.15s, background-color 0.15s;
Expand All @@ -158,7 +158,7 @@ export default {
}
input[type='range']::-webkit-slider-thumb:active {
border: 0;
background-color: var(--te-base-bg-5);
background-color: var(--te-common-bg-default);
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -58,30 +58,36 @@
</template>
</tiny-popover>
</span>
<tiny-dropdown-menu>
<tiny-dropdown-item v-for="item in foldsOptions" :key="item.label || item.icon" @click.stop="change(item)">
<span v-if="item?.label">{{ item.label }}</span>
<tiny-popover
v-if="item?.icon"
:effect="effect"
:placement="placement"
:visible-arrow="false"
:content="item.content"
trigger="hover"
<template #dropdown>
<tiny-dropdown-menu>
<tiny-dropdown-item
v-for="item in foldsOptions"
:key="item.label || item.icon"
@click.stop="change(item)"
>
<template #reference>
<svg-icon v-if="item.icon" :name="item.icon" class="bem-Svg"></svg-icon>
</template>
</tiny-popover>
</tiny-dropdown-item>
</tiny-dropdown-menu>
<span v-if="item?.label">{{ item.label }}</span>
<tiny-popover
v-if="item?.icon"
:effect="effect"
:placement="placement"
:visible-arrow="false"
:content="item.content"
trigger="hover"
>
<template #reference>
<svg-icon v-if="item.icon" :name="item.icon" class="bem-Svg"></svg-icon>
</template>
</tiny-popover>
</tiny-dropdown-item>
</tiny-dropdown-menu>
</template>
</tiny-dropdown>
</tiny-button-group>
</div>
</div>
</template>
<script setup>
import { ref, watch, defineProps, defineEmits } from 'vue'
import { ref, computed, watch, defineProps, defineEmits } from 'vue'
import {
Popover as TinyPopover,
ButtonGroup as TinyButtonGroup,
Expand Down Expand Up @@ -121,8 +127,8 @@ const props = defineProps({
const emit = defineEmits(['update:modelValue'])
const picked = ref(null)
const uncollapsedOptions = ref(props.options.filter((option) => !option.collapsed))
const collapsedOptions = ref(props.options.filter((option) => option.collapsed))
const uncollapsedOptions = computed(() => props.options.filter((option) => !option.collapsed))
const collapsedOptions = computed(() => props.options.filter((option) => option.collapsed))
const foldsOptions = ref([])
const selectedCollapsedOption = ref(null)
const isCollapsedSelected = ref(false)
Expand Down Expand Up @@ -162,11 +168,11 @@ watch(
updateOptionDisplay(value)
}
},
{ immediate: true }
{ immediate: true, deep: true }
)
const change = (item) => {
if (picked.value === item.value) {
if (props.valueKey ? picked.value[props.valueKey] === item.value[props.valueKey] : picked.value === item.value) {
return
}
isCollapsedSelected.value = Boolean(item.collapsed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,17 +429,17 @@ export default {
place-items: stretch;
gap: 1px;
border-radius: 2px;
border-top: 1px solid var(--te-base-invalidate-color);
background-color: var(--te-base-bg-5);
border-top: 1px solid var(--te-common-border-divider);
background-color: var(--te-common-bg-default);
margin: 12px 0;
.image-list-item {
display: grid;
grid-template-columns: 8px 16px minmax(auto, 1fr) auto;
gap: 8px 4px;
height: 24px;
align-items: center;
background-color: var(--te-base-bg-5);
border-bottom: 1px solid var(--te-base-invalidate-color);
background-color: var(--te-common-bg-default);
border-bottom: 1px solid var(--te-common-border-divider);
pointer-events: all;
font-size: 11px;
font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default {
border: 1px solid var(--ti-lowcode-tabs-border-color);
box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
border-radius: 8px;
background-color: var(--te-base-bg-5);
background-color: var(--te-common-bg-default);
overflow: auto;
max-height: 100%;
box-sizing: border-box;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export default {
.suffix-text {
font-size: 12px;
color: var(--ti-lowcode-common-text-color-5);
color: var(--te-common-text-weaken);
}
&:hover {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ export default {
max-width: 100%;
border: 0;
color: var(--te-common-text-primary);
border: 1px solid var(--te-common-text-primary);
border: 1px solid var(--te-common-border-active);
}
.reset-desc {
display: block;
padding: 8px 4px;
text-align: center;
color: var(--ti-lowcode-radio-button-active-bg);
color: var(--te-common-text-description);
}
</style>
4 changes: 2 additions & 2 deletions packages/settings/styles/src/components/size/SizeGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ span {
padding-left: 2px;
margin-right: 2px;
line-height: 28px;
color: var(--ti-lowcode-component-setting-panel-label-color);
color: var(--te-common-text-secondary);
}
}
}
Expand Down Expand Up @@ -524,7 +524,7 @@ span {
.size-label {
padding-right: 5px;
display: inline-block;
color: var(--ti-lowcode-toolbar-breadcrumb-color);
color: var(--te-common-text-secondary);
}
:deep(.tiny-input) {
Expand Down
1 change: 1 addition & 0 deletions packages/theme/base/src/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
--te-common-text-inverse: var(--te-base-gray-1); // 主按钮上的文本色 #fff
--te-common-text-dark-inverse: var(--te-base-gray-1); // 深色背景下按钮上的文本色 #fff
--te-common-text-emphasize: var(--te-base-blue-6); // 强调性文字 #1476ff
--te-common-text-description: var(--te-base-gray-47); // 描述性文字 #9d9d9d

--te-common-icon-primary: var(--te-base-dark-5); // 重要图标色 #191919
--te-common-icon-secondary: var(--te-base-gray-43); // 图标默认色 #808080
Expand Down

0 comments on commit 1760b8b

Please sign in to comment.