From 55b2b227af0f80ac49a60f8f32259002a3ecb6b8 Mon Sep 17 00:00:00 2001 From: Justineo Date: Thu, 23 Nov 2023 16:27:29 +0800 Subject: [PATCH] feat: adjust tokens for default tags --- packages/less-plugin-dls/CHANGELOG.md | 5 +++++ packages/less-plugin-dls/package.json | 2 +- packages/less-plugin-dls/test/specs/tag/tag.css | 3 +++ packages/less-plugin-dls/test/specs/tag/tag.less | 3 +++ packages/less-plugin-dls/tokens/components/tag.less | 9 +++++++-- 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/less-plugin-dls/CHANGELOG.md b/packages/less-plugin-dls/CHANGELOG.md index 1614505..46a9144 100644 --- a/packages/less-plugin-dls/CHANGELOG.md +++ b/packages/less-plugin-dls/CHANGELOG.md @@ -1,5 +1,10 @@ > ⚠️ - Breaking Changes +## 11.8.4 + +- Adjust tokens for default tag. +- Deprecate `@dls-tag-color` and `@dls-tag-color-selected`. + ## 11.8.3 - Adjust border opacity for tags. diff --git a/packages/less-plugin-dls/package.json b/packages/less-plugin-dls/package.json index 9d63298..df59fc7 100644 --- a/packages/less-plugin-dls/package.json +++ b/packages/less-plugin-dls/package.json @@ -1,6 +1,6 @@ { "name": "less-plugin-dls", - "version": "11.8.3", + "version": "11.8.4", "description": "Less plugin for Baidu Light DLS.", "main": "dist/index.js", "scripts": { diff --git a/packages/less-plugin-dls/test/specs/tag/tag.css b/packages/less-plugin-dls/test/specs/tag/tag.css index 1c263dd..ec2070c 100644 --- a/packages/less-plugin-dls/test/specs/tag/tag.css +++ b/packages/less-plugin-dls/test/specs/tag/tag.css @@ -11,10 +11,13 @@ div { -dls-tag-icon-size-aux: calc(1em - 2px); -dls-tag-color: rgba(45, 52, 64, 0.8); -dls-tag-color-selected: #0054e6; + -dls-tag-color-default: #848b99; + -dls-tag-color-default-selected: #0054e6; -dls-tag-color-info: #0054e6; -dls-tag-color-success: #009940; -dls-tag-color-warning: #ff9448; -dls-tag-color-error: #d9150b; + -dls-tag-font-color-default: rgba(19, 22, 26, 0.9); -dls-tag-font-color-selected: #fff; -dls-tag-font-color-reverse: #fff; -dls-tag-color-turquoise: #4db2b2; diff --git a/packages/less-plugin-dls/test/specs/tag/tag.less b/packages/less-plugin-dls/test/specs/tag/tag.less index 0f27727..fa5606e 100644 --- a/packages/less-plugin-dls/test/specs/tag/tag.less +++ b/packages/less-plugin-dls/test/specs/tag/tag.less @@ -11,10 +11,13 @@ div { -dls-tag-icon-size-aux: @dls-tag-icon-size-aux; -dls-tag-color: @dls-tag-color; -dls-tag-color-selected: @dls-tag-color-selected; + -dls-tag-color-default: @dls-tag-color-default; + -dls-tag-color-default-selected: @dls-tag-color-default-selected; -dls-tag-color-info: @dls-tag-color-info; -dls-tag-color-success: @dls-tag-color-success; -dls-tag-color-warning: @dls-tag-color-warning; -dls-tag-color-error: @dls-tag-color-error; + -dls-tag-font-color-default: @dls-tag-font-color-default; -dls-tag-font-color-selected: @dls-tag-font-color-selected; -dls-tag-font-color-reverse: @dls-tag-font-color-reverse; -dls-tag-color-turquoise: @dls-tag-color-turquoise; diff --git a/packages/less-plugin-dls/tokens/components/tag.less b/packages/less-plugin-dls/tokens/components/tag.less index d099871..d085357 100644 --- a/packages/less-plugin-dls/tokens/components/tag.less +++ b/packages/less-plugin-dls/tokens/components/tag.less @@ -19,13 +19,18 @@ @dls-tag-icon-size-aux: calc(1em - 2px); /* Colors */ -@dls-tag-color: @dls-foreground-color-neutral-light; -@dls-tag-color-selected: @dls-foreground-color-primary; +@dls-tag-color: @dls-foreground-color-neutral-light; // @deprecated +@dls-tag-color-selected: @dls-foreground-color-primary; // @deprecated + +@dls-tag-color-default: @dls-color-gray-7; +@dls-tag-color-default-selected: @dls-color-brand-7; + @dls-tag-color-info: @dls-foreground-color-info-primary; @dls-tag-color-success: @dls-foreground-color-success-primary; @dls-tag-color-warning: @dls-foreground-color-warning-primary; @dls-tag-color-error: @dls-foreground-color-error-primary; +@dls-tag-font-color-default: @dls-foreground-color-neutral; @dls-tag-font-color-selected: @dls-foreground-color-primary-reverse; @dls-tag-font-color-reverse: @dls-foreground-color-reverse;