@opentiny/vue-theme
Advanced tools
Comparing version 3.6.7 to 3.8.0
{ | ||
"name": "@opentiny/vue-theme", | ||
"version": "3.6.7", | ||
"version": "3.8.0", | ||
"description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.", | ||
@@ -23,9 +23,10 @@ "main": "index.css", | ||
"build:theme": "gulp build --gulpfile build/gulp-dist.js", | ||
"build": "npm run clean && npm run build:theme && node build/replace-img.js", | ||
"build": "npm run clean && npm run build:component-cssvar && npm run build:theme && node build/replace-img.js", | ||
"build:fast": "npm run build && npm run release", | ||
"release": "node build/release.js && node build/postbuild.js && cp README.md dist", | ||
"build:copy-remote": "npm run build:theme && cp-cli dist ../aurora-vue/node_modules/@aurora/theme", | ||
"build:copy-remote": "npm run build:theme && cp-cli dist ../tiny-vue/node_modules/@opentiny/vue-theme", | ||
"publishTgz": "node .cloudbuild/publish-tgzs.js", | ||
"postversion": "pnpm build", | ||
"build:themejson": "node scripts/build-theme-json" | ||
"build:themejson": "node scripts/build-theme-json", | ||
"build:component-cssvar": "node scripts/build-component-cssvar" | ||
}, | ||
@@ -32,0 +33,0 @@ "devDependencies": { |
/** | ||
* Copyright (c) 2022 - present TinyVue Authors. | ||
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. | ||
* | ||
* Use of this source code is governed by an MIT-style license. | ||
* | ||
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, | ||
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR | ||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. | ||
* | ||
*/ | ||
* Copyright (c) 2022 - present TinyVue Authors. | ||
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. | ||
* | ||
* Use of this source code is governed by an MIT-style license. | ||
* | ||
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, | ||
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR | ||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. | ||
* | ||
*/ | ||
import components from './theme.config' | ||
import definedComponents from './theme.config' | ||
@@ -76,5 +76,7 @@ /** | ||
this.contentElement.textContent = this.formatCSSVariables(currentTheme.data) | ||
this.contentElement.setAttribute('tiny-theme', this.currentTheme.id) | ||
} | ||
// 通过 `组件css变量`,来推导出组件名: 从 ti-checkbox-button-bg-color, 推导出 checkbox-button | ||
findClassName(name) { | ||
@@ -85,13 +87,18 @@ const compNameList = name.split('-') | ||
} | ||
const compLength = components.length | ||
const compLength = definedComponents.length | ||
let compName = '' | ||
for (let i = 0; i < compLength; i++) { | ||
if (components[i] === `${compNameList[1]}-${compNameList[2]}`) { | ||
compName = `tiny-${components[i]}` | ||
// 先试试是不是双段式的组件名: 比如dialog-box 这种 | ||
if (definedComponents[i] === `${compNameList[1]}-${compNameList[2]}`) { | ||
compName = `tiny-${definedComponents[i]}` | ||
break | ||
} | ||
} | ||
// 不是双段的组件,则取第一位为组件名 | ||
if (!compName) { | ||
compName = `tiny-${compNameList[1]}` | ||
} | ||
// 提高权重,促使主题变换成功 | ||
compName = `${compName}[class*=tiny]` | ||
return compName | ||
@@ -98,0 +105,0 @@ } |
/** | ||
* Copyright (c) 2022 - present TinyVue Authors. | ||
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. | ||
* | ||
* Use of this source code is governed by an MIT-style license. | ||
* | ||
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, | ||
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR | ||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. | ||
* | ||
*/ | ||
* Copyright (c) 2022 - present TinyVue Authors. | ||
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. | ||
* | ||
* Use of this source code is governed by an MIT-style license. | ||
* | ||
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, | ||
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR | ||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. | ||
* | ||
*/ | ||
export default [ | ||
'action-menu', | ||
'bulletin-board', | ||
@@ -24,7 +25,16 @@ 'button-group', | ||
'cascader-node', | ||
'checkbox-button', | ||
'checkbox-group', | ||
'context-menu', | ||
'collapse-item', | ||
'detail-page', | ||
'dialog-box', | ||
'dropdown-item', | ||
'dropdown-menu', | ||
'drop-roles', | ||
'drop-times', | ||
'date-panel', | ||
'date-picker', | ||
'data-range', | ||
'date-table', | ||
'fall-menu', | ||
@@ -36,9 +46,17 @@ 'form-item', | ||
'link-menu', | ||
'month-range', | ||
'month-table', | ||
'nav-menu', | ||
'option-group', | ||
'option', | ||
'pop-editor', | ||
'picker-panel', | ||
'date-picker', | ||
'popup-horiz-menu', | ||
'popup-menu', | ||
'picker-panel', | ||
'quick-link-menu', | ||
'time-picker', | ||
'time-spinner', | ||
'time-panel', | ||
'time-range', | ||
'time-select', | ||
'scroll-text', | ||
@@ -50,2 +68,3 @@ 'slide-bar', | ||
'tab-item', | ||
'tabs-dropdown', | ||
'textarea', | ||
@@ -56,2 +75,3 @@ 'text-parse', | ||
'tree-menu', | ||
'upload-list', | ||
'user-account', | ||
@@ -61,3 +81,4 @@ 'user-card', | ||
'user-head', | ||
'user-link' | ||
'user-link', | ||
'year-table' | ||
] |
@@ -13,2 +13,3 @@ /** | ||
import { flattenObject } from './utils' | ||
import { impressionTheme } from './impression-theme' | ||
@@ -18,2 +19,4 @@ import { infinityTheme } from './infinity-theme' | ||
import { galaxyTheme } from './galaxy-theme' | ||
import * as auroraTheme from './aurora-theme' | ||
import * as smbTheme from './smb-theme' | ||
@@ -47,1 +50,15 @@ export const tinyImpressionTheme = { | ||
} | ||
export const tinyAuroraTheme = { | ||
id: 'tiny-aurora-theme', | ||
name: 'Aurora', | ||
cnName: 'Aurora', | ||
data: flattenObject(auroraTheme) | ||
} | ||
export const tinySmbTheme = { | ||
id: 'tiny-smb-theme', | ||
name: 'SMB', | ||
cnName: 'SMB', | ||
data: flattenObject(smbTheme) | ||
} |
@@ -32,3 +32,3 @@ /** | ||
'ti-common-size-height-normal': '32px', | ||
'ti-common-box-shadow': '0 4px 8px 0 rgba(37,43,58,.2)', | ||
'ti-common-shadow-2-down': '0 4px 8px 0 rgba(37,43,58,.2)', | ||
'ti-common-color-hover-background': '#f2f2f3', | ||
@@ -59,3 +59,3 @@ 'ti-common-color-selected-background': '#f2f5fc', | ||
'ti-checkbox-icon-width': '3px', | ||
'ti-checkbox-icon-top': '2px', | ||
'ti-checkbox-icon-margin-top': '2px', | ||
'ti-picker-panel-border-color': '#fff', | ||
@@ -93,3 +93,3 @@ 'ti-radio-inner-size': '10px', | ||
'ti-time-panel-border-color': 'transparent', | ||
'ti-time-panel-box-shadow': 'var(--ti-common-box-shadow)', | ||
'ti-time-panel-box-shadow': 'var(--ti-common-shadow-2-down)', | ||
'ti-time-spinner-item-font-weight': 'normal', | ||
@@ -156,15 +156,15 @@ 'ti-time-panel-content-split-line-display': 'none', | ||
'ti-dropdown-menu-padding-horizontal': '12px', | ||
'ti-dropdown-menu-box-shadow': 'var(--ti-common-box-shadow)', | ||
'ti-dropdown-menu-box-shadow': 'var(--ti-common-shadow-2-down)', | ||
'ti-dropdown-menu-margin-vertical': '8px', | ||
'ti-dropdown-menu-item-height': '36px', | ||
'ti-dropdown-menu-item-padding-vertical': '0', | ||
'ti-dropdown-menu-item-padding-horizontal': '12px', | ||
'ti-dropdown-menu-item-hover-bg-color': '#f2f2f3', | ||
'ti-dropdown-menu-item-active-bg-color': 'var(--ti-dropdown-menu-item-hover-bg-color)', | ||
'ti-dropdown-menu-item-text-color': '#252b3a', | ||
'ti-dropdown-menu-item-hover-text-color': 'var(--ti-dropdown-menu-item-text-color)', | ||
'ti-dropdown-menu-item-active-text-color': 'var(--ti-dropdown-menu-item-text-color)', | ||
'ti-dropdown-menu-item-border-radius': 'var(--ti-common-border-radius-normal)', | ||
'ti-dropdown-menu-item-disabled-text-color': '#cfd0d3', | ||
'ti-dropdown-menu-item-max-width': '100%', | ||
'ti-dropdown-item-height': '36px', | ||
'ti-dropdown-item-padding-vertical': '0', | ||
'ti-dropdown-item-padding-horizontal': '12px', | ||
'ti-dropdown-item-hover-bg-color': '#f2f2f3', | ||
'ti-dropdown-item-active-bg-color': 'var(--ti-dropdown-item-hover-bg-color)', | ||
'ti-dropdown-item-text-color': '#252b3a', | ||
'ti-dropdown-item-hover-text-color': 'var(--ti-dropdown-item-text-color)', | ||
'ti-dropdown-item-active-text-color': 'var(--ti-dropdown-item-text-color)', | ||
'ti-dropdown-item-border-radius': 'var(--ti-common-border-radius-normal)', | ||
'ti-dropdown-item-disabled-text-color': '#cfd0d3', | ||
'ti-dropdown-item-max-width': '100%', | ||
'ti-split-trigger-bg-color': '#f2f2f3', | ||
@@ -179,3 +179,3 @@ 'ti-split-trigger-bar-bg-color': 'var(--ti-split-trigger-bg-color)', | ||
'ti-split-trigger-con-row-cursor': 'row-resize', | ||
'ti-picker-panel-box-shadow': 'var(--ti-common-box-shadow)', | ||
'ti-picker-panel-box-shadow': 'var(--ti-common-shadow-2-down)', | ||
'ti-date-picker-width': '249px', | ||
@@ -388,4 +388,4 @@ 'ti-date-picker-font-size': '12px', | ||
// select | ||
'ti-select-input-caret-text-color': 'var(--ti-base-color-common-5)', | ||
'ti-select-input-caret-hover-text-color': 'var(--ti-base-color-common-7)', | ||
'ti-select-input-caret-icon-color': 'var(--ti-base-color-common-5)', | ||
'ti-select-input-caret-hover-icon-color': 'var(--ti-base-color-common-7)', | ||
// option | ||
@@ -396,8 +396,8 @@ 'ti-select-dropdown-list-padding-top': 'var(--ti-common-space-3x)', | ||
'ti-select-dropdown-border-color': 'var(--ti-base-color-white)', | ||
'ti-select-dropdown-item-padding-vertical': '0', | ||
'ti-select-dropdown-item-padding-horizontal': 'var(--ti-common-space-3x)', | ||
'ti-select-dropdown-item-margin-top': 'var(--ti-common-space-base)', | ||
'ti-select-dropdown-item-height': '36px', | ||
'ti-select-dropdown-item-selected-text-color': 'var(--ti-common-color-info-normal)', | ||
'ti-select-dropdown-item-selected-bg-color': 'var(--ti-base-color-brand-1)', | ||
'ti-option-padding-vertical': '0', | ||
'ti-option-padding-horizontal': 'var(--ti-common-space-3x)', | ||
'ti-option-margin-top': 'var(--ti-common-space-base)', | ||
'ti-option-height': '36px', | ||
'ti-option-selected-text-color': 'var(--ti-common-color-info-normal)', | ||
'ti-option-selected-bg-color': 'var(--ti-base-color-brand-1)', | ||
// form-item | ||
@@ -404,0 +404,0 @@ 'ti-form-item-error-text-color': 'var(--ti-base-color-error-3)', |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3602014
737
5705