(chore)修复一些类型定义和颜色样式

This commit is contained in:
wangchangqi 2023-01-14 16:55:29 +08:00
parent ae66a39b83
commit d97f84f879
6 changed files with 21 additions and 15 deletions

View File

@ -292,7 +292,6 @@ const baseStyle = css`
--font-main-black: #262626;
/* 文字/正文次白 */
--font-secondary-white: #e0e0e0;
--font-normal-color: var(--font-main-black);
/* 文字/底色黑 */
--font-base-black: var(--pure-black);
/* 文字/底色白 */
@ -328,6 +327,8 @@ const baseStyle = css`
/* 文字/渐变银 */
--font-gradient-silver: var(--gradient-silver);
/***************************文字通用颜色************************************/
--font-normal-color: var(--font-main-black);
--font-normal-auxiliary-color: var(--font-sec-auxiliary-black);
/* TBD: 颜色和实际还有冲突, 抽象...em */
/****************************文字尺寸*************************************/
/* 字体/超小尺寸/ */
@ -390,6 +391,7 @@ const baseDarkStyle = css`
:root {
/****************************文字颜色*************************************/
--font-normal-color: var(--font-secondary-white);
--font-normal-auxiliary-color: var(--font-sec-auxiliary-white);
/*****************************基础色**************************************/
--base-normal-bgc: var(--base-slider-black);
}
@ -830,6 +832,7 @@ const darkStyle = css`
--dialog-content: var(--font-secondary-white);
--dialog-checkbox: var(--font-sec-auxiliary-white);
/* Li */
--li-label: var(--font-secondary-white);
--li-square: var(--font-auxiliary-white);
--li-bg-pressed: var(--opacity-white-12);
@ -838,6 +841,7 @@ const darkStyle = css`
--li-value-default: var(--font-auxiliary-white);
--li-description: var(--font-sec-auxiliary-white);
--li-icon: var(--linear-icon-white);
--li-input: var(--font-sec-auxiliary-white);
/* Card */
--card-label: var(--font-secondary-white);

View File

@ -7,7 +7,7 @@ import {
customElement,
query,
} from '@star-web-components/base/star-base-element.js'
import StarBaseDialog from './base-dialog.js'
import StarBaseDialog, {EventCallback} from './base-dialog.js'
import alertDialogStyles from './alert-dialog.css.js'
import '@star-web-components/button/button.js'
import '@star-web-components/button-group/button-group.js'
@ -17,7 +17,7 @@ interface AlertDialogOptions {
text?: string /* alert的正文 */
checkBoxText?: string
confirm?: string
onconfirm?: () => void
onconfirm?: EventCallback
}
@customElement('star-alert-dialog')

View File

@ -10,6 +10,8 @@ import baseDialogStyles from './base-dialog.css.js'
const USE_DIALOG = 0
export type EventCallback = (e: Event) => void
export default class StarBaseDialog extends StarBaseElement {
title!: string
@ -25,9 +27,9 @@ export default class StarBaseDialog extends StarBaseElement {
confirm!: string
onconfirm!: (e: Event) => void
onconfirm!: EventCallback
oncancel!: (e: Event) => void
oncancel!: EventCallback
@query('dialog') dialog!: HTMLDialogElement

View File

@ -5,7 +5,7 @@ import {
TemplateResult,
nothing,
} from '@star-web-components/base/star-base-element.js'
import StarBaseDialog from './base-dialog.js'
import StarBaseDialog, {EventCallback} from './base-dialog.js'
import confirmDialogStyles from './confirm-dialog.css.js'
import '@star-web-components/button/button.js'
import '@star-web-components/button-group/button-group.js'
@ -17,8 +17,8 @@ interface ConfirmDialogOptions {
checkBoxText?: string
cancel?: string
confirm?: string
oncancel?: () => void
onconfirm?: () => void
oncancel?: EventCallback
onconfirm?: EventCallback
}
@customElement('star-confirm-dialog')

View File

@ -8,7 +8,7 @@ import {
CSSResultArray,
TemplateResult,
} from '@star-web-components/base/star-base-element.js'
import StarBaseDialog from './base-dialog.js'
import StarBaseDialog, {EventCallback} from './base-dialog.js'
import promptDialogStyles from './prompt-dialog.css.js'
import '@star-web-components/button/button.js'
import '@star-web-components/button-group/button-group.js'
@ -19,8 +19,8 @@ interface PromptDialogOptions {
value?: string
cancel?: string
confirm?: string
oncancel?: () => void
onconfirm?: () => void
oncancel?: EventCallback
onconfirm?: EventCallback
}
@customElement('star-prompt-dialog')

View File

@ -7,7 +7,7 @@ import {
CSSResultArray,
TemplateResult,
} from '@star-web-components/base/star-base-element.js'
import StarBaseDialog from './base-dialog.js'
import StarBaseDialog, {EventCallback} from './base-dialog.js'
import selectDialogStyles from './select-dialog.css.js'
import '@star-web-components/button/button.js'
import '@star-web-components/button-group/button-group.js'
@ -23,9 +23,9 @@ interface SelectDialogOptions {
image?: string
cancel?: string
confirm?: string
oncancel?: () => void
onconfirm?: (e: Event) => void
onselect?: (e: Event) => void
oncancel?: EventCallback
onconfirm?: EventCallback
onselect?: EventCallback
multiple?: boolean
optionsSlot: StarLi[] | TemplateResult
}