((props, ref) => {
return (
{React.Children.map(children, (child) => {
- const childElement = child as React.FunctionComponentElement;
- if (childElement.type.displayName === 'Col') {
+ if (!React.isValidElement(child)) {
+ return child;
+ }
+
+ const childElement = child;
+
+ if (childElement.type === Col) {
const gutterStyle = gutter
? {
paddingLeft: normalisedGutter[0] / 2,
@@ -50,7 +56,7 @@ const Row = React.forwardRef((props, ref) => {
: {};
const childProps: Partial = {
style: {
- ...child.props.style,
+ ...childElement.props.style,
...gutterStyle,
},
};
diff --git a/packages/react/src/grid/style/index.scss b/packages/react/src/grid/style/index.scss
new file mode 100644
index 00000000..b748b86e
--- /dev/null
+++ b/packages/react/src/grid/style/index.scss
@@ -0,0 +1,9 @@
+@use '@tiny-design/tokens/scss/variables' as *;
+
+.#{$prefix}-grid {
+ display: grid;
+}
+
+.#{$prefix}-grid-item {
+ min-width: 0;
+}
diff --git a/packages/react/src/grid/types.ts b/packages/react/src/grid/types.ts
index 5c27003d..20edcc94 100644
--- a/packages/react/src/grid/types.ts
+++ b/packages/react/src/grid/types.ts
@@ -1,26 +1,70 @@
-import { BaseProps } from '../_utils/props';
import React from 'react';
+import { BaseProps, SizeType } from '../_utils/props';
+import { Breakpoint, ResponsiveValue } from './responsive';
-export type RowAlign = 'top' | 'center' | 'bottom';
-export type RowJustify = 'start' | 'end' | 'center' | 'space-around' | 'space-between';
+export type RowAlign = 'top' | 'center' | 'bottom' | 'baseline';
+export type RowJustify =
+ | 'start'
+ | 'end'
+ | 'center'
+ | 'space-around'
+ | 'space-between'
+ | 'space-evenly';
-export interface RowProps extends BaseProps, React.PropsWithoutRef {
+export interface RowProps extends BaseProps, React.PropsWithRef {
gutter?: number | [number, number];
- // { xs: number; sm: number; md: number; lg: number; xl: number; xxl: number };
- /** gutter padding includes first and end child */
gutterSide?: boolean;
align?: RowAlign;
justify?: RowJustify;
- children: React.ReactElement[] | React.ReactElement;
}
-export type ColSize = {
+export interface ColSize {
span?: number;
offset?: number;
order?: number;
-};
+}
+
+export type GridBreakpoint = Breakpoint;
+export type GridTrackValue = number | React.CSSProperties['gridTemplateColumns'];
+export type GridItemSize = number | 'auto' | 'grow' | 'full';
+export type GridItemOffset = number | 'auto';
+
+export interface GridProps extends BaseProps, React.PropsWithRef {
+ columns?: ResponsiveValue;
+ rows?: ResponsiveValue;
+ spacing?: ResponsiveValue;
+ gap?: ResponsiveValue;
+ columnSpacing?: ResponsiveValue;
+ columnGap?: ResponsiveValue;
+ rowSpacing?: ResponsiveValue;
+ rowGap?: ResponsiveValue;
+ minColumnWidth?: ResponsiveValue;
+ autoFlow?: ResponsiveValue;
+ autoFit?: boolean;
+ justify?: ResponsiveValue;
+ align?: ResponsiveValue;
+ justifyContent?: ResponsiveValue;
+ alignContent?: ResponsiveValue;
+ placeItems?: ResponsiveValue;
+ placeContent?: ResponsiveValue;
+ areas?: ResponsiveValue;
+ component?: React.ElementType;
+}
+
+export interface GridItemProps extends BaseProps, React.PropsWithRef {
+ size?: ResponsiveValue;
+ offset?: ResponsiveValue;
+ column?: ResponsiveValue;
+ row?: ResponsiveValue;
+ colSpan?: ResponsiveValue;
+ rowSpan?: ResponsiveValue;
+ area?: ResponsiveValue;
+ justifySelf?: ResponsiveValue;
+ alignSelf?: ResponsiveValue;
+ component?: React.ElementType;
+}
-export interface ColProps extends BaseProps, React.PropsWithoutRef {
+export interface ColProps extends BaseProps, React.PropsWithRef {
span?: number;
offset?: number;
order?: number;
@@ -30,5 +74,4 @@ export interface ColProps extends BaseProps, React.PropsWithoutRef(() => getActiveBreakpoint(getWindowWidth()));
+
+ useEffect(() => {
+ if (typeof window === 'undefined') {
+ return undefined;
+ }
+
+ const handleResize = () => {
+ setBreakpoint(getActiveBreakpoint(window.innerWidth));
+ };
+
+ handleResize();
+ window.addEventListener('resize', handleResize);
+ return () => window.removeEventListener('resize', handleResize);
+ }, []);
+
+ return breakpoint;
+}
diff --git a/packages/react/src/image/style/_index.scss b/packages/react/src/image/style/index.scss
similarity index 100%
rename from packages/react/src/image/style/_index.scss
rename to packages/react/src/image/style/index.scss
diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts
index 63badd91..ea82e140 100755
--- a/packages/react/src/index.ts
+++ b/packages/react/src/index.ts
@@ -27,6 +27,7 @@ export { default as Empty } from './empty';
export { default as Flex } from './flex';
export { default as Flip } from './flip';
export { default as Form } from './form';
+export { default as Grid } from './grid';
export { default as Image } from './image';
export { default as Input } from './input';
export { default as InputNumber } from './input-number';
@@ -117,6 +118,7 @@ export type * from './empty';
export type * from './flex';
export type * from './flip';
export type * from './form';
+export type * from './grid';
export type * from './image';
export type * from './input';
export type * from './input-number';
diff --git a/packages/react/src/input-number/style/_index.scss b/packages/react/src/input-number/style/index.scss
similarity index 67%
rename from packages/react/src/input-number/style/_index.scss
rename to packages/react/src/input-number/style/index.scss
index b10cf528..7ac30eb9 100755
--- a/packages/react/src/input-number/style/_index.scss
+++ b/packages/react/src/input-number/style/index.scss
@@ -15,8 +15,8 @@
&__input {
@include input-default;
- padding-left: 7px;
- padding-right: 25px;
+ padding-left: var(--ty-input-number-input-padding-inline-start);
+ padding-right: var(--ty-input-number-input-padding-inline-end);
&::-webkit-inner-spin-button,
&::-webkit-outer-spin-button {
@@ -34,9 +34,9 @@
flex-direction: column;
align-items: center;
justify-content: center;
- padding: 1px;
+ padding: var(--ty-input-number-controls-padding);
opacity: 0;
- transition: all 300ms;
+ transition: all var(--ty-input-number-control-transition-duration);
}
&__up,
@@ -47,15 +47,15 @@
display: inline-flex;
justify-content: center;
align-items: center;
- padding: 0 7px;
+ padding: var(--ty-input-number-control-padding-inline);
border-left: 1px solid var(--ty-input-number-control-border);
- transition: all 300ms;
+ transition: all var(--ty-input-number-control-transition-duration);
&:hover {
flex: 2;
.ty-icon {
- color: var(--ty-color-primary) !important;
+ color: var(--ty-input-number-icon-color-hover) !important;
}
}
@@ -84,9 +84,9 @@
&_sm {
.#{$prefix}-input-number {
&__input {
- font-size: var(--ty-font-size-sm);
- height: var(--ty-height-sm);
- line-height: var(--ty-height-sm);
+ font-size: var(--ty-input-number-font-size-sm);
+ height: var(--ty-input-number-height-sm);
+ line-height: var(--ty-input-number-height-sm);
}
}
}
@@ -94,9 +94,9 @@
&_md {
.#{$prefix}-input-number {
&__input {
- font-size: var(--ty-font-size-base);
- height: var(--ty-height-md);
- line-height: var(--ty-height-md);
+ font-size: var(--ty-input-number-font-size-md);
+ height: var(--ty-input-number-height-md);
+ line-height: var(--ty-input-number-height-md);
}
}
}
@@ -104,9 +104,9 @@
&_lg {
.#{$prefix}-input-number {
&__input {
- font-size: var(--ty-font-size-lg);
- height: var(--ty-height-lg);
- line-height: var(--ty-height-lg);
+ font-size: var(--ty-input-number-font-size-lg);
+ height: var(--ty-input-number-height-lg);
+ line-height: var(--ty-input-number-height-lg);
}
}
}
diff --git a/packages/react/src/input-otp/style/_index.scss b/packages/react/src/input-otp/style/index.scss
similarity index 100%
rename from packages/react/src/input-otp/style/_index.scss
rename to packages/react/src/input-otp/style/index.scss
diff --git a/packages/react/src/input-password/style/_index.scss b/packages/react/src/input-password/style/index.scss
similarity index 100%
rename from packages/react/src/input-password/style/_index.scss
rename to packages/react/src/input-password/style/index.scss
diff --git a/packages/react/src/input/style/_mixin.scss b/packages/react/src/input/style/_mixin.scss
index 1cba1049..81f521f8 100755
--- a/packages/react/src/input/style/_mixin.scss
+++ b/packages/react/src/input/style/_mixin.scss
@@ -9,28 +9,28 @@
border: 1px solid var(--ty-input-border);
transition: all 0.3s;
outline: 0;
- border-radius: var(--ty-input-border-radius, var(--ty-border-radius));
- font-size: var(--ty-input-font-size, var(--ty-font-size-base));
- background-color: var(--ty-input-bg);
+ border-radius: var(--ty-input-radius, var(--ty-border-radius));
+ font-size: var(--ty-input-font-size-md, var(--ty-font-size-base));
+ background-color: var(--ty-input-bg, var(--ty-color-bg-container));
&:hover {
- border-color: var(--ty-color-primary);
+ border-color: var(--ty-input-border-hover, var(--ty-color-primary));
}
&:focus {
- border-color: var(--ty-input-focus-border);
- box-shadow: var(--ty-input-focus-shadow);
+ border-color: var(--ty-input-border-focus, var(--ty-color-primary));
+ box-shadow: var(--ty-input-shadow-focus, var(--ty-shadow-focus));
}
&::placeholder {
- color: var(--ty-color-text-placeholder);
+ color: var(--ty-input-placeholder, var(--ty-color-text-placeholder));
}
}
@mixin input-default-disabled {
cursor: not-allowed;
- background-color: var(--ty-input-disabled-bg);
- color: var(--ty-input-disabled-color);
+ background-color: var(--ty-input-bg-disabled, var(--ty-color-bg-disabled));
+ color: var(--ty-input-text-disabled, var(--ty-color-text-quaternary));
&:hover {
border-color: var(--ty-input-border);
diff --git a/packages/react/src/input/style/_index.scss b/packages/react/src/input/style/index.scss
similarity index 85%
rename from packages/react/src/input/style/_index.scss
rename to packages/react/src/input/style/index.scss
index 0cba7dae..c56c993a 100755
--- a/packages/react/src/input/style/_index.scss
+++ b/packages/react/src/input/style/index.scss
@@ -30,9 +30,9 @@
&__clear-btn {
display: inline-block;
- color: var(--ty-color-text-quaternary);
- width: var(--ty-input-clear-size);
- height: var(--ty-input-clear-size);
+ color: var(--ty-input-clear-color, var(--ty-color-text-quaternary));
+ width: var(--ty-input-clear-size, 1em);
+ height: var(--ty-input-clear-size, 1em);
position: relative;
top: 2px;
cursor: pointer;
@@ -55,7 +55,7 @@
&_md {
.#{$prefix}-input {
&__input {
- font-size: var(--ty-input-font-size, var(--ty-font-size-base));
+ font-size: var(--ty-input-font-size-md, var(--ty-font-size-base));
height: var(--ty-input-height-md, var(--ty-height-md));
line-height: var(--ty-input-height-md, var(--ty-height-md));
}
@@ -134,21 +134,21 @@
}
.#{$prefix}-input-group-addon {
- background-color: var(--ty-input-addon-bg);
+ background-color: var(--ty-input-addon-bg, var(--ty-color-fill));
border: 1px solid var(--ty-input-border);
box-sizing: border-box;
text-align: center;
line-height: 1;
- border-radius: var(--ty-input-border-radius, var(--ty-border-radius));
+ border-radius: var(--ty-input-radius, var(--ty-border-radius));
color: var(--ty-input-color, var(--ty-color-text));
- padding: var(--ty-input-addon-padding);
+ padding: var(--ty-input-addon-padding, var(--ty-spacing-3));
&_sm {
font-size: var(--ty-input-font-size-sm, var(--ty-font-size-sm));
}
&_md {
- font-size: var(--ty-input-font-size, var(--ty-font-size-base));
+ font-size: var(--ty-input-font-size-md, var(--ty-font-size-base));
}
&_lg {
@@ -171,7 +171,7 @@
border-radius: 0;
border-left: 0;
border-right: 0;
- padding: var(--ty-input-addon-padding);
+ padding: var(--ty-input-addon-padding, var(--ty-spacing-3));
}
&_no-border {
diff --git a/packages/react/src/keyboard/style/_index.scss b/packages/react/src/keyboard/style/_index.scss
deleted file mode 100644
index 47502f29..00000000
--- a/packages/react/src/keyboard/style/_index.scss
+++ /dev/null
@@ -1,23 +0,0 @@
-@use '@tiny-design/tokens/scss/variables' as *;
-
-.#{$prefix}-kbd {
- font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
- display: inline-block;
- padding: 4px 8px;
- border: 1px solid var(--ty-kbd-border);
- border-bottom-color: var(--ty-kbd-border-bottom);
- border-radius: 4px;
- font-size: 11px;
- line-height: 1;
- vertical-align: middle;
- background-color: var(--ty-kbd-bg);
- box-shadow: var(--ty-kbd-shadow);
- color: var(--ty-kbd-color);
- cursor: pointer;
- user-select: none;
-
- &:active {
- transform: translate3d(0, 1px, 0);
- box-shadow: none;
- }
-}
diff --git a/packages/react/src/keyboard/style/index.scss b/packages/react/src/keyboard/style/index.scss
new file mode 100644
index 00000000..6feed56e
--- /dev/null
+++ b/packages/react/src/keyboard/style/index.scss
@@ -0,0 +1,23 @@
+@use '@tiny-design/tokens/scss/variables' as *;
+
+.#{$prefix}-kbd {
+ font-family: var(--ty-keyboard-font-family);
+ display: inline-block;
+ padding: var(--ty-keyboard-padding);
+ border: 1px solid var(--ty-keyboard-border);
+ border-bottom-color: var(--ty-keyboard-border-bottom);
+ border-radius: var(--ty-keyboard-radius);
+ font-size: var(--ty-keyboard-font-size);
+ line-height: 1;
+ vertical-align: middle;
+ background-color: var(--ty-keyboard-bg);
+ box-shadow: var(--ty-keyboard-shadow);
+ color: var(--ty-keyboard-color);
+ cursor: pointer;
+ user-select: none;
+
+ &:active {
+ transform: translate3d(0, 1px, 0);
+ box-shadow: none;
+ }
+}
diff --git a/packages/react/src/layout/style/_index.scss b/packages/react/src/layout/style/index.scss
similarity index 77%
rename from packages/react/src/layout/style/_index.scss
rename to packages/react/src/layout/style/index.scss
index 74390b16..b2786b3a 100755
--- a/packages/react/src/layout/style/_index.scss
+++ b/packages/react/src/layout/style/index.scss
@@ -13,20 +13,20 @@
.#{$prefix}-layout-header {
box-sizing: border-box;
- height: 60px;
- background-color: var(--ty-color-bg-layout);
+ height: var(--ty-layout-header-height);
+ background-color: var(--ty-layout-header-bg);
}
.#{$prefix}-layout-footer {
box-sizing: border-box;
- padding: 24px 50px;
- background-color: var(--ty-color-bg-layout);
+ padding: var(--ty-layout-footer-padding);
+ background-color: var(--ty-layout-footer-bg);
}
.#{$prefix}-layout-content {
flex: 1;
box-sizing: border-box;
- background-color: var(--ty-color-bg-layout);
+ background-color: var(--ty-layout-content-bg);
}
.#{$prefix}-layout-sidebar {
@@ -34,9 +34,9 @@
display: flex;
flex-direction: column;
position: relative;
- transition: all 200ms;
+ transition: all var(--ty-layout-sidebar-transition-duration);
background: var(--ty-layout-sidebar-bg);
- color: #fff;
+ color: var(--ty-layout-sidebar-color);
&:last-child {
.#{$prefix}-layout-sidebar__trigger-icon {
@@ -54,7 +54,7 @@
width: 100%;
z-index: 1;
cursor: pointer;
- height: 40px;
+ height: var(--ty-layout-sidebar-trigger-height);
background-color: var(--ty-layout-sidebar-trigger-bg);
display: flex;
justify-content: center;
diff --git a/packages/react/src/link/style/_index.scss b/packages/react/src/link/style/index.scss
similarity index 100%
rename from packages/react/src/link/style/_index.scss
rename to packages/react/src/link/style/index.scss
diff --git a/packages/react/src/list/style/_index.scss b/packages/react/src/list/style/index.scss
similarity index 61%
rename from packages/react/src/list/style/_index.scss
rename to packages/react/src/list/style/index.scss
index 22e9b52c..7c8239b6 100644
--- a/packages/react/src/list/style/_index.scss
+++ b/packages/react/src/list/style/index.scss
@@ -1,35 +1,35 @@
@use '@tiny-design/tokens/scss/variables' as *;
.#{$prefix}-list {
- color: var(--ty-color-text);
- font-size: var(--ty-font-size-base);
+ color: var(--ty-list-color);
+ font-size: var(--ty-list-font-size);
&_bordered {
border: 1px solid var(--ty-list-border);
- border-radius: var(--ty-border-radius);
+ border-radius: var(--ty-list-radius);
}
&_sm {
.#{$prefix}-list-item {
- padding: 8px 16px;
+ padding: var(--ty-list-item-padding-sm);
}
}
&_md {
.#{$prefix}-list-item {
- padding: 12px 16px;
+ padding: var(--ty-list-item-padding-md);
}
}
&_lg {
.#{$prefix}-list-item {
- padding: 16px 24px;
+ padding: var(--ty-list-item-padding-lg);
}
}
&__header,
&__footer {
- padding: 12px 16px;
+ padding: var(--ty-list-header-padding);
}
&_bordered &__header {
@@ -57,15 +57,15 @@
}
&__empty {
- padding: 24px;
+ padding: var(--ty-list-empty-padding);
text-align: center;
- color: var(--ty-color-text-secondary);
+ color: var(--ty-list-empty-color);
}
&__loading {
- padding: 24px;
+ padding: var(--ty-list-empty-padding);
text-align: center;
- color: var(--ty-color-text-secondary);
+ color: var(--ty-list-empty-color);
}
}
@@ -97,25 +97,25 @@
&__actions {
display: flex;
align-items: center;
- gap: 16px;
+ gap: var(--ty-list-action-gap);
list-style: none;
margin: 0;
padding: 0;
- margin-left: 24px;
+ margin-left: var(--ty-list-action-offset);
flex-shrink: 0;
}
&__action {
- color: var(--ty-color-text-secondary);
+ color: var(--ty-list-action-color);
cursor: pointer;
&:hover {
- color: var(--ty-color-primary);
+ color: var(--ty-list-action-color-hover);
}
}
&__extra {
- margin-left: 24px;
+ margin-left: var(--ty-list-action-offset);
flex-shrink: 0;
}
}
@@ -126,7 +126,7 @@
flex: 1;
&__avatar {
- margin-right: 12px;
+ margin-right: var(--ty-list-meta-avatar-gap);
flex-shrink: 0;
}
@@ -136,13 +136,13 @@
}
&__title {
- font-weight: 500;
- color: var(--ty-color-text);
- margin-bottom: 4px;
+ font-weight: var(--ty-list-meta-title-font-weight);
+ color: var(--ty-list-meta-title-color);
+ margin-bottom: var(--ty-list-meta-title-margin-bottom);
}
&__description {
- color: var(--ty-color-text-secondary);
- font-size: var(--ty-font-size-sm);
+ color: var(--ty-list-meta-description-color);
+ font-size: var(--ty-list-meta-description-font-size);
}
}
diff --git a/packages/react/src/loader/style/_index.scss b/packages/react/src/loader/style/index.scss
similarity index 100%
rename from packages/react/src/loader/style/_index.scss
rename to packages/react/src/loader/style/index.scss
diff --git a/packages/react/src/loading-bar/style/_index.scss b/packages/react/src/loading-bar/style/index.scss
similarity index 100%
rename from packages/react/src/loading-bar/style/_index.scss
rename to packages/react/src/loading-bar/style/index.scss
diff --git a/packages/react/src/marquee/style/_index.scss b/packages/react/src/marquee/style/index.scss
similarity index 100%
rename from packages/react/src/marquee/style/_index.scss
rename to packages/react/src/marquee/style/index.scss
diff --git a/packages/react/src/marquee/style/index.tsx b/packages/react/src/marquee/style/index.tsx
index dca5d2a0..67aac616 100644
--- a/packages/react/src/marquee/style/index.tsx
+++ b/packages/react/src/marquee/style/index.tsx
@@ -1 +1 @@
-import './_index.scss';
+import './index.scss';
diff --git a/packages/react/src/menu/style/_mixin.scss b/packages/react/src/menu/style/_mixin.scss
index 184ea37f..4048d185 100644
--- a/packages/react/src/menu/style/_mixin.scss
+++ b/packages/react/src/menu/style/_mixin.scss
@@ -3,14 +3,15 @@
margin-top: 4px;
margin-bottom: 4px;
overflow: hidden;
- font-size: 14px;
+ font-size: var(--ty-menu-group-title-font-size);
text-overflow: ellipsis;
}
@mixin menu-item-active($color, $display-right-border: false){
- background-color: var(--ty-color-primary-bg);
+ background-color: var(--ty-menu-active-bg);
color: $color;
+
@if $display-right-border {
- border-right: 3px solid $color;
+ border-right: var(--ty-menu-active-border-width-inline) solid $color;
}
}
diff --git a/packages/react/src/menu/style/_index.scss b/packages/react/src/menu/style/index.scss
similarity index 68%
rename from packages/react/src/menu/style/_index.scss
rename to packages/react/src/menu/style/index.scss
index 857171fb..4192b0d1 100644
--- a/packages/react/src/menu/style/_index.scss
+++ b/packages/react/src/menu/style/index.scss
@@ -23,16 +23,16 @@
}
.#{$prefix}-menu-item {
- height: 48px;
- padding: 0 15px;
- line-height: 48px;
- margin: 0 5px;
- border-bottom: 2px solid transparent;
+ height: var(--ty-menu-horizontal-item-height);
+ padding: var(--ty-menu-horizontal-item-padding);
+ line-height: var(--ty-menu-horizontal-item-height);
+ margin: var(--ty-menu-horizontal-item-margin);
+ border-bottom: var(--ty-menu-horizontal-active-border-width) solid transparent;
position: relative;
&_active {
- color: var(--ty-color-primary);
- border-bottom-color: var(--ty-color-primary);
+ color: var(--ty-menu-item-color-active);
+ border-bottom-color: var(--ty-menu-item-color-active);
}
}
}
@@ -51,17 +51,17 @@
.#{$prefix}-menu-item {
padding: $menu-item-padding-vertical;
- margin: 5px 0;
+ margin: var(--ty-menu-inline-item-margin);
position: relative;
}
}
&_inline li.#{$prefix}-menu-item_active {
- @include menu-item-active(var(--ty-color-primary), true);
+ @include menu-item-active(var(--ty-menu-item-color-active), true);
}
&_vertical li.#{$prefix}-menu-item_active {
- @include menu-item-active(var(--ty-color-primary));
+ @include menu-item-active(var(--ty-menu-item-color-active));
}
&_light {
@@ -90,11 +90,11 @@
transition: background-color 300ms, color 250ms;
&:hover {
- color: var(--ty-color-primary);
+ color: var(--ty-menu-item-color-hover);
}
&_disabled {
- color: var(--ty-color-text-secondary) !important;
+ color: var(--ty-menu-item-color-disabled) !important;
opacity: .5;
cursor: not-allowed;
}
@@ -118,10 +118,10 @@
}
&_popup {
- min-width: 160px;
+ min-width: var(--ty-menu-sub-list-popup-min-width);
li.#{$prefix}-menu-item_active {
- @include menu-item-active(var(--ty-color-primary));
+ @include menu-item-active(var(--ty-menu-item-color-active));
}
}
}
@@ -132,14 +132,14 @@
align-items: center;
&.#{$prefix}-menu-item_active {
- color: var(--ty-color-primary);
+ color: var(--ty-menu-item-color-active);
}
}
&__arrow {
display: inline-block;
transition: transform 300ms;
- margin-left: 20px;
+ margin-left: var(--ty-menu-sub-arrow-margin-start);
&_reverse {
transform: rotate(180deg);
@@ -155,13 +155,13 @@
box-sizing: border-box;
&__title {
- padding: 10px 16px;
+ padding: var(--ty-menu-group-title-padding);
color: var(--ty-menu-group-title-color);
- font-size: 14px;
+ font-size: var(--ty-menu-group-title-font-size);
cursor: default;
&:first-child {
- margin-top: 4px;
+ margin-top: var(--ty-menu-group-title-first-margin-top);
}
}
@@ -171,7 +171,7 @@
white-space: nowrap;
> .#{$prefix}-menu-item {
- padding: 12px 35px 12px 25px;
+ padding: var(--ty-menu-group-list-item-padding);
}
}
}
@@ -179,5 +179,5 @@
.#{$prefix}-menu-divider {
height: 1px;
background-color: var(--ty-menu-divider-color);
- margin: 5px 0;
+ margin: var(--ty-menu-divider-margin);
}
diff --git a/packages/react/src/message/style/_index.scss b/packages/react/src/message/style/index.scss
similarity index 54%
rename from packages/react/src/message/style/_index.scss
rename to packages/react/src/message/style/index.scss
index b87d9d90..8e9211c2 100755
--- a/packages/react/src/message/style/_index.scss
+++ b/packages/react/src/message/style/index.scss
@@ -3,16 +3,16 @@
.#{$prefix}-message {
position: relative;
- padding: 10px 16px;
+ padding: var(--ty-message-padding);
background: var(--ty-message-bg);
- border-radius: 4px;
- box-shadow: var(--ty-shadow-modal);
- transition: all 300ms;
+ border-radius: var(--ty-message-radius);
+ box-shadow: var(--ty-message-shadow);
+ transition: all var(--ty-message-transition-duration);
opacity: 0;
- transform: translateY(-5px);
+ transform: translateY(var(--ty-message-offset-y-enter));
box-sizing: border-box;
display: flex;
- font-size: 14px;
+ font-size: var(--ty-message-font-size);
align-items: center;
pointer-events: all;
@@ -23,20 +23,20 @@
width: 100%;
pointer-events: none;
transition: top 200ms;
- z-index: 999;
+ z-index: var(--ty-message-z-index);
box-sizing: border-box;
}
&__content {
- font-size: 14px;
- line-height: 14px;
- color: var(--ty-color-text-secondary);
+ font-size: inherit;
+ line-height: var(--ty-message-content-line-height);
+ color: var(--ty-message-content-color);
}
&_fade-slide {
&-enter {
opacity: 0;
- transform: translateY(-5px);
+ transform: translateY(var(--ty-message-offset-y-enter));
}
&-enter-done {
@@ -46,7 +46,7 @@
}
&__icon {
- margin-right: 5px;
+ margin-right: var(--ty-message-icon-gap);
&_loading{
animation: ty-rotate 1s linear infinite;
@@ -54,6 +54,6 @@
}
&__extra {
- margin-left: 15px;
+ margin-left: var(--ty-message-extra-gap);
}
}
diff --git a/packages/react/src/modal/style/_index.scss b/packages/react/src/modal/style/_index.scss
deleted file mode 100755
index 7bed0f4b..00000000
--- a/packages/react/src/modal/style/_index.scss
+++ /dev/null
@@ -1,116 +0,0 @@
-@use '@tiny-design/tokens/scss/variables' as *;
-
-.#{$prefix}-modal {
- position: relative;
- box-sizing: border-box;
- height: 100vh;
- display: flex;
- justify-content: center;
- top: 100px;
-
- &__content {
- box-sizing: border-box;
- background-color: var(--ty-modal-bg);
- position: relative;
- background-clip: padding-box;
- border: 0;
- border-radius: 4px;
- box-shadow: var(--ty-shadow-modal);
- transition: all 300ms;
-
- &_slide {
- &-enter {
- transform: translateY(-20px);
- transition: none;
- }
-
- &-enter-done {
- transform: translateY(0);
- }
-
- &-exit {
- transform: translateY(0);
- }
-
- &-exit-done {
- transform: translateY(-20px);
- }
- }
-
- &_scale {
- &-enter {
- transform: scale(0);
- transition: none;
- }
-
- &-enter-done {
- transform: scale(1);
- }
-
- &-exit {
- transform: scale(1);
- }
-
- &-exit-done {
- transform: scale(0);
- }
- }
- }
-
- &__header {
- box-sizing: border-box;
- padding: 16px 24px;
- color: var(--ty-color-text-secondary);
- background: var(--ty-modal-header-bg);
- border-bottom: 1px solid var(--ty-modal-header-border);
- border-radius: 4px 4px 0 0;
- }
-
- &__title {
- margin: 0;
- color: var(--ty-color-text);
- font-weight: 500;
- font-size: 16px;
- line-height: 22px;
- }
-
- &__close-btn {
- cursor: pointer;
- color: var(--ty-color-text-tertiary);
- width: 56px;
- height: 56px;
- line-height: 56px;
- position: absolute;
- top: 0;
- right: 0;
- text-align: center;
- background: none;
- border: none;
- padding: 0;
- font-size: inherit;
- }
-
- &__body {
- box-sizing: border-box;
- padding: 24px;
- font-size: 14px;
- line-height: 1.5;
- word-wrap: break-word;
- }
-
- &__footer {
- box-sizing: border-box;
- padding: 12px 16px;
- border-top: 1px solid var(--ty-modal-footer-border);
- border-radius: 0 0 4px 4px;
- }
-
- &__footer-btn {
- margin-bottom: 0;
- }
-
- &_centered {
- align-items: center;
- top: 0;
- }
-}
diff --git a/packages/react/src/modal/style/index.scss b/packages/react/src/modal/style/index.scss
new file mode 100644
index 00000000..2671a67e
--- /dev/null
+++ b/packages/react/src/modal/style/index.scss
@@ -0,0 +1,116 @@
+@use '@tiny-design/tokens/scss/variables' as *;
+
+.#{$prefix}-modal {
+ position: relative;
+ box-sizing: border-box;
+ height: 100vh;
+ display: flex;
+ justify-content: center;
+ top: var(--ty-modal-offset-top, 100px);
+
+ &__content {
+ box-sizing: border-box;
+ background-color: var(--ty-modal-bg, var(--ty-color-bg-container));
+ position: relative;
+ background-clip: padding-box;
+ border: 0;
+ border-radius: var(--ty-modal-radius, 4px);
+ box-shadow: var(--ty-modal-shadow, var(--ty-shadow-modal));
+ transition: all var(--ty-modal-transition-duration, 300ms);
+
+ &_slide {
+ &-enter {
+ transform: translateY(var(--ty-modal-enter-offset-y, -20px));
+ transition: none;
+ }
+
+ &-enter-done {
+ transform: translateY(0);
+ }
+
+ &-exit {
+ transform: translateY(0);
+ }
+
+ &-exit-done {
+ transform: translateY(var(--ty-modal-enter-offset-y, -20px));
+ }
+ }
+
+ &_scale {
+ &-enter {
+ transform: scale(var(--ty-modal-scale-enter, 0));
+ transition: none;
+ }
+
+ &-enter-done {
+ transform: scale(1);
+ }
+
+ &-exit {
+ transform: scale(1);
+ }
+
+ &-exit-done {
+ transform: scale(var(--ty-modal-scale-enter, 0));
+ }
+ }
+ }
+
+ &__header {
+ box-sizing: border-box;
+ padding: var(--ty-modal-header-padding-block, 16px) var(--ty-modal-header-padding-inline, 24px);
+ color: var(--ty-modal-header-color, var(--ty-color-text-secondary));
+ background: var(--ty-modal-header-bg, var(--ty-color-bg-container));
+ border-bottom: 1px solid var(--ty-modal-header-border, var(--ty-color-border-secondary));
+ border-radius: var(--ty-modal-radius, 4px) var(--ty-modal-radius, 4px) 0 0;
+ }
+
+ &__title {
+ margin: 0;
+ color: var(--ty-modal-title-color, var(--ty-color-text));
+ font-weight: var(--ty-modal-title-font-weight, 500);
+ font-size: var(--ty-modal-title-font-size, 16px);
+ line-height: var(--ty-modal-title-line-height, 22px);
+ }
+
+ &__close-btn {
+ cursor: pointer;
+ color: var(--ty-modal-close-color, var(--ty-color-text-tertiary));
+ width: var(--ty-modal-close-size, 56px);
+ height: var(--ty-modal-close-size, 56px);
+ line-height: var(--ty-modal-close-size, 56px);
+ position: absolute;
+ top: 0;
+ right: 0;
+ text-align: center;
+ background: none;
+ border: none;
+ padding: 0;
+ font-size: inherit;
+ }
+
+ &__body {
+ box-sizing: border-box;
+ padding: var(--ty-modal-body-padding, 24px);
+ font-size: var(--ty-modal-body-font-size, 14px);
+ line-height: var(--ty-modal-body-line-height, 1.5);
+ word-wrap: break-word;
+ }
+
+ &__footer {
+ box-sizing: border-box;
+ padding: var(--ty-modal-footer-padding-block, 12px) var(--ty-modal-footer-padding-inline, 16px);
+ border-top: 1px solid var(--ty-modal-footer-border, var(--ty-color-border-secondary));
+ border-radius: 0 0 var(--ty-modal-radius, 4px) var(--ty-modal-radius, 4px);
+ }
+
+ &__footer-btn {
+ margin-bottom: 0;
+ }
+
+ &_centered {
+ align-items: center;
+ top: 0;
+ }
+}
diff --git a/packages/react/src/native-select/style/_index.scss b/packages/react/src/native-select/style/index.scss
similarity index 72%
rename from packages/react/src/native-select/style/_index.scss
rename to packages/react/src/native-select/style/index.scss
index 7960bb3a..a47b5c5a 100755
--- a/packages/react/src/native-select/style/_index.scss
+++ b/packages/react/src/native-select/style/index.scss
@@ -7,14 +7,14 @@ $select-arrow: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcm
display: inline-flex;
appearance: none;
cursor: pointer;
- color: var(--ty-color-text);
+ color: var(--ty-native-select-color);
min-width: 200px;
margin: 0;
line-height: 18px;
vertical-align: middle;
box-sizing: border-box;
- border: 1px solid var(--ty-input-border);
- border-radius: var(--ty-border-radius);
+ border: 1px solid var(--ty-native-select-border);
+ border-radius: var(--ty-native-select-radius);
background-color: var(--ty-native-select-bg);
background-image: url($select-arrow);
background-repeat: no-repeat, repeat;
@@ -24,19 +24,19 @@ $select-arrow: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcm
outline: none;
&:hover {
- border-color: var(--ty-color-primary);
+ border-color: var(--ty-native-select-border-hover);
}
&:focus {
- border-color: var(--ty-input-focus-border);
- box-shadow: var(--ty-input-focus-shadow);
+ border-color: var(--ty-native-select-border-focus);
+ box-shadow: var(--ty-native-select-shadow-focus);
}
&_disabled {
background-image: url($select-arrow);
background-size: 0.52em auto, 100%;
background-color: var(--ty-native-select-disabled-bg);
- opacity: 0.75;
+ opacity: var(--ty-native-select-opacity-disabled);
color: var(--ty-native-select-disabled-color);
cursor: not-allowed;
resize: none;
@@ -52,14 +52,14 @@ $select-arrow: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcm
}
&_sm {
- @include native-size($native-select-sm-padding, var(--ty-font-size-sm));
+ @include native-size(var(--ty-native-select-sm-padding), var(--ty-native-select-font-size-sm));
}
&_md {
- @include native-size($native-select-md-padding, var(--ty-font-size-base));
+ @include native-size(var(--ty-native-select-md-padding), var(--ty-native-select-font-size-md));
}
&_lg {
- @include native-size($native-select-lg-padding, var(--ty-font-size-lg));
+ @include native-size(var(--ty-native-select-lg-padding), var(--ty-native-select-font-size-lg));
}
}
diff --git a/packages/react/src/notification/style/_index.scss b/packages/react/src/notification/style/index.scss
similarity index 64%
rename from packages/react/src/notification/style/_index.scss
rename to packages/react/src/notification/style/index.scss
index 294188a5..dbf8f469 100755
--- a/packages/react/src/notification/style/_index.scss
+++ b/packages/react/src/notification/style/index.scss
@@ -4,18 +4,18 @@
position: relative;
padding: var(--ty-notification-padding);
border-radius: var(--ty-notification-border-radius);
- color: var(--ty-color-text-secondary);
- font-size: var(--ty-font-size-base);
- box-shadow: var(--ty-shadow-modal);
+ color: var(--ty-notification-color);
+ font-size: var(--ty-notification-font-size);
+ box-shadow: var(--ty-notification-shadow);
box-sizing: border-box;
display: flex;
align-items: flex-start;
&-container {
- width: $notification-width;
+ width: var(--ty-notification-width);
position: fixed;
background-color: var(--ty-notification-bg);
- z-index: 999;
+ z-index: var(--ty-notification-z-index);
box-sizing: border-box;
transition: all 200ms;
@@ -34,8 +34,8 @@
&__close {
position: absolute;
- right: 24px;
- top: 16px;
+ right: var(--ty-notification-close-offset-inline-end);
+ top: var(--ty-notification-close-offset-top);
cursor: pointer;
color: var(--ty-notification-close-color);
user-select: none;
@@ -52,15 +52,15 @@
}
&__title {
- padding-right: 24px;
- margin-bottom: 5px;
- color: var(--ty-color-text);
+ padding-right: var(--ty-notification-title-padding-inline-end);
+ margin-bottom: var(--ty-notification-title-margin-bottom);
+ color: var(--ty-notification-title-color);
font-size: var(--ty-notification-title-font-size);
- line-height: 24px;
+ line-height: var(--ty-notification-title-line-height);
}
&__icon {
- margin-right: 15px;
- height: 30px;
+ margin-right: var(--ty-notification-icon-gap);
+ height: var(--ty-notification-icon-height);
}
}
diff --git a/packages/react/src/overlay/style/_index.scss b/packages/react/src/overlay/style/index.scss
similarity index 100%
rename from packages/react/src/overlay/style/_index.scss
rename to packages/react/src/overlay/style/index.scss
diff --git a/packages/react/src/pagination/style/_index.scss b/packages/react/src/pagination/style/_index.scss
deleted file mode 100644
index d37c463a..00000000
--- a/packages/react/src/pagination/style/_index.scss
+++ /dev/null
@@ -1,143 +0,0 @@
-@use '@tiny-design/tokens/scss/variables' as *;
-
-.#{$prefix}-pagination {
- box-sizing: border-box;
- margin: 0;
- padding: 0;
- color: var(--ty-color-text-secondary);
- font-size: 14px;
- list-style: none;
-
- &_left {
- text-align: left;
- }
-
- &_center {
- text-align: center;
- }
-
- &_right {
- text-align: right;
- }
-
- &_disabled {
- .#{$prefix}-pagination__item_active {
- background: var(--ty-pagination-disabled-active-bg) !important;
- border-color: transparent !important;
- color: #fff !important;
- }
- }
-
- &__item {
- display: inline-flex;
- justify-content: center;
- align-items: center;
- box-sizing: border-box;
- text-align: center;
- vertical-align: middle;
- list-style: none;
- background-color: var(--ty-pagination-bg);
- border-radius: 2px;
- outline: 0;
- cursor: pointer;
- user-select: none;
- transition: all 400ms;
-
- > button {
- background: none;
- border: none;
- padding: 0;
- color: inherit;
- font: inherit;
- cursor: inherit;
- width: 100%;
- height: 100%;
- display: inline-flex;
- justify-content: center;
- align-items: center;
- }
-
- &_disabled {
- cursor: not-allowed;
- }
-
- &_ellipsis {
- color: var(--ty-color-text-quaternary);
-
- &:hover {
- color: var(--ty-color-primary);
- }
- }
- }
-
- &__left-arrow {
- transform: rotate(90deg);
- }
-
- &__right-arrow {
- transform: rotate(-90deg);
- }
-
- &_md {
- .#{$prefix}-pagination__item {
- min-width: 32px;
- height: 32px;
- margin-left: 4px;
- margin-right: 4px;
- line-height: 30px;
- border: 1px solid var(--ty-color-border);
-
- &_active {
- color: var(--ty-color-primary);
- border-color: var(--ty-color-primary);
- }
-
- &:hover {
- border-color: var(--ty-color-primary);
- }
-
- &_disabled {
- color: var(--ty-color-text-tertiary);
- background: var(--ty-pagination-disabled-bg);
- border-color: var(--ty-color-border);
-
- &:hover {
- border-color: var(--ty-color-border);
- }
- }
-
- &_ellipsis {
- border: 0;
- }
- }
- }
-
- &_sm {
- .#{$prefix}-pagination__item {
- min-width: 24px;
- height: 24px;
- margin-left: 0.5px;
- margin-right: 0.5px;
- line-height: 22px;
- border-color: transparent;
-
- &_active {
- color: var(--ty-color-primary);
- border: 1px solid var(--ty-color-primary);
- }
-
- &:hover {
- color: var(--ty-color-primary);
- }
-
- &_disabled {
- color: var(--ty-pagination-disabled-color);
- border-color: var(--ty-pagination-disabled-color);
-
- &:hover {
- color: var(--ty-pagination-disabled-color);
- }
- }
- }
- }
-}
diff --git a/packages/react/src/pagination/style/index.scss b/packages/react/src/pagination/style/index.scss
new file mode 100644
index 00000000..3c8ff0a7
--- /dev/null
+++ b/packages/react/src/pagination/style/index.scss
@@ -0,0 +1,143 @@
+@use '@tiny-design/tokens/scss/variables' as *;
+
+.#{$prefix}-pagination {
+ box-sizing: border-box;
+ margin: 0;
+ padding: 0;
+ color: var(--ty-pagination-color, var(--ty-color-text-secondary));
+ font-size: var(--ty-pagination-font-size, 14px);
+ list-style: none;
+
+ &_left {
+ text-align: left;
+ }
+
+ &_center {
+ text-align: center;
+ }
+
+ &_right {
+ text-align: right;
+ }
+
+ &_disabled {
+ .#{$prefix}-pagination__item_active {
+ background: var(--ty-pagination-disabled-active-bg, #dbdbdb) !important;
+ border-color: transparent !important;
+ color: var(--ty-pagination-disabled-active-color, #fff) !important;
+ }
+ }
+
+ &__item {
+ display: inline-flex;
+ justify-content: center;
+ align-items: center;
+ box-sizing: border-box;
+ text-align: center;
+ vertical-align: middle;
+ list-style: none;
+ background-color: var(--ty-pagination-item-bg, var(--ty-color-bg-container));
+ border-radius: var(--ty-pagination-item-radius, 2px);
+ outline: 0;
+ cursor: pointer;
+ user-select: none;
+ transition: all var(--ty-pagination-item-transition-duration, 400ms);
+
+ > button {
+ background: none;
+ border: none;
+ padding: 0;
+ color: inherit;
+ font: inherit;
+ cursor: inherit;
+ width: 100%;
+ height: 100%;
+ display: inline-flex;
+ justify-content: center;
+ align-items: center;
+ }
+
+ &_disabled {
+ cursor: not-allowed;
+ }
+
+ &_ellipsis {
+ color: var(--ty-pagination-item-color-ellipsis, var(--ty-color-text-quaternary));
+
+ &:hover {
+ color: var(--ty-pagination-item-color-ellipsis-hover, var(--ty-color-primary));
+ }
+ }
+ }
+
+ &__left-arrow {
+ transform: rotate(90deg);
+ }
+
+ &__right-arrow {
+ transform: rotate(-90deg);
+ }
+
+ &_md {
+ .#{$prefix}-pagination__item {
+ min-width: var(--ty-pagination-item-size-md, 32px);
+ height: var(--ty-pagination-item-size-md, 32px);
+ margin-left: var(--ty-pagination-item-gap-md, 4px);
+ margin-right: var(--ty-pagination-item-gap-md, 4px);
+ line-height: var(--ty-pagination-item-line-height-md, 30px);
+ border: 1px solid var(--ty-pagination-item-border-md, var(--ty-color-border));
+
+ &_active {
+ color: var(--ty-pagination-item-color-active, var(--ty-color-primary));
+ border-color: var(--ty-pagination-item-border-active, var(--ty-color-primary));
+ }
+
+ &:hover {
+ border-color: var(--ty-pagination-item-border-hover, var(--ty-color-primary));
+ }
+
+ &_disabled {
+ color: var(--ty-pagination-disabled-color-md, var(--ty-color-text-tertiary));
+ background: var(--ty-pagination-disabled-bg, var(--ty-color-fill-secondary));
+ border-color: var(--ty-pagination-item-border-md, var(--ty-color-border));
+
+ &:hover {
+ border-color: var(--ty-pagination-item-border-md, var(--ty-color-border));
+ }
+ }
+
+ &_ellipsis {
+ border: 0;
+ }
+ }
+ }
+
+ &_sm {
+ .#{$prefix}-pagination__item {
+ min-width: var(--ty-pagination-item-size-sm, 24px);
+ height: var(--ty-pagination-item-size-sm, 24px);
+ margin-left: var(--ty-pagination-item-gap-sm, 0.5px);
+ margin-right: var(--ty-pagination-item-gap-sm, 0.5px);
+ line-height: var(--ty-pagination-item-line-height-sm, 22px);
+ border-color: transparent;
+
+ &_active {
+ color: var(--ty-pagination-item-color-active, var(--ty-color-primary));
+ border: 1px solid var(--ty-pagination-item-border-active, var(--ty-color-primary));
+ }
+
+ &:hover {
+ color: var(--ty-pagination-item-color-hover-sm, var(--ty-color-primary));
+ }
+
+ &_disabled {
+ color: var(--ty-pagination-disabled-color-sm, #d9d9d9);
+ border-color: var(--ty-pagination-disabled-color-sm, #d9d9d9);
+
+ &:hover {
+ color: var(--ty-pagination-disabled-color-sm, #d9d9d9);
+ }
+ }
+ }
+ }
+}
diff --git a/packages/react/src/pop-confirm/style/_index.scss b/packages/react/src/pop-confirm/style/index.scss
similarity index 100%
rename from packages/react/src/pop-confirm/style/_index.scss
rename to packages/react/src/pop-confirm/style/index.scss
diff --git a/packages/react/src/popover/style/_index.scss b/packages/react/src/popover/style/_index.scss
deleted file mode 100755
index 3615ac58..00000000
--- a/packages/react/src/popover/style/_index.scss
+++ /dev/null
@@ -1,41 +0,0 @@
-@use '@tiny-design/tokens/scss/variables' as *;
-
-.#{$prefix}-popover {
- &__title {
- margin: 0;
- padding: 9px 16px 7px;
- font-weight: 500;
- min-width: 177px;
- min-height: 32px;
- }
-
- &__content {
- padding: 12px 15px;
- }
-
- &_light {
- .#{$prefix}-popover {
- &__title {
- color: var(--ty-color-text);
- border-bottom: 1px solid var(--ty-color-border-secondary);
- }
-
- &__content {
- color: var(--ty-color-text-secondary);
- }
- }
- }
-
- &_dark {
- .#{$prefix}-popover {
- &__title {
- color: #fff;
- border-bottom: 1px solid var(--ty-popover-dark-border);
- }
-
- &__content {
- color: #fff;
- }
- }
- }
-}
diff --git a/packages/react/src/popover/style/index.scss b/packages/react/src/popover/style/index.scss
new file mode 100755
index 00000000..0455c883
--- /dev/null
+++ b/packages/react/src/popover/style/index.scss
@@ -0,0 +1,41 @@
+@use '@tiny-design/tokens/scss/variables' as *;
+
+.#{$prefix}-popover {
+ &__title {
+ margin: 0;
+ padding: var(--ty-popover-title-padding);
+ font-weight: var(--ty-popover-title-font-weight);
+ min-width: var(--ty-popover-title-min-width);
+ min-height: var(--ty-popover-title-min-height);
+ }
+
+ &__content {
+ padding: var(--ty-popover-content-padding);
+ }
+
+ &_light {
+ .#{$prefix}-popover {
+ &__title {
+ color: var(--ty-popover-title-color);
+ border-bottom: 1px solid var(--ty-popover-title-border);
+ }
+
+ &__content {
+ color: var(--ty-popover-content-color);
+ }
+ }
+ }
+
+ &_dark {
+ .#{$prefix}-popover {
+ &__title {
+ color: var(--ty-popover-title-color-dark);
+ border-bottom: 1px solid var(--ty-popover-dark-border);
+ }
+
+ &__content {
+ color: var(--ty-popover-content-color-dark);
+ }
+ }
+ }
+}
diff --git a/packages/react/src/popup/style/_index.scss b/packages/react/src/popup/style/index.scss
similarity index 83%
rename from packages/react/src/popup/style/_index.scss
rename to packages/react/src/popup/style/index.scss
index 040bbad4..6687dd83 100755
--- a/packages/react/src/popup/style/_index.scss
+++ b/packages/react/src/popup/style/index.scss
@@ -2,16 +2,16 @@
.#{$prefix}-popup {
box-sizing: border-box;
- border-radius: var(--ty-border-radius);
+ border-radius: var(--ty-popup-radius);
white-space: nowrap;
- font-size: var(--ty-font-size-base);
+ font-size: var(--ty-popup-font-size);
text-align: left;
- box-shadow: var(--ty-shadow-popup);
- z-index: 999;
+ box-shadow: var(--ty-popup-shadow);
+ z-index: var(--ty-popup-z-index);
&__arrow, &__arrow::before {
- width: $popover-arrow-size;
- height: $popover-arrow-size;
+ width: var(--ty-popover-arrow-size);
+ height: var(--ty-popover-arrow-size);
box-sizing: border-box;
position: absolute;
}
@@ -23,7 +23,7 @@
&_light {
background-color: var(--ty-popup-light-bg);
- color: var(--ty-color-text-secondary);
+ color: var(--ty-popup-color-light);
.#{$prefix}-popup {
&__arrow::before {
background: var(--ty-popup-light-bg);
@@ -33,7 +33,7 @@
&_dark {
background-color: var(--ty-popup-dark-bg);
- color: #fff;
+ color: var(--ty-popup-color-dark);
.#{$prefix}-popup {
&__arrow::before {
background: var(--ty-popup-dark-bg);
diff --git a/packages/react/src/progress/style/_index.scss b/packages/react/src/progress/style/index.scss
similarity index 70%
rename from packages/react/src/progress/style/_index.scss
rename to packages/react/src/progress/style/index.scss
index 42cf77fa..66e029ee 100755
--- a/packages/react/src/progress/style/_index.scss
+++ b/packages/react/src/progress/style/index.scss
@@ -3,7 +3,7 @@
.#{$prefix}-progress-bar {
display: flex;
align-items: center;
- font-size: 13px;
+ font-size: var(--ty-progress-font-size);
&__inner {
flex: 1;
@@ -20,37 +20,37 @@
transition: all 0.6s;
&_primary {
- background-color: var(--ty-color-primary);
+ background-color: var(--ty-progress-stroke-color-primary);
}
&_yellow {
- background-color: var(--ty-color-warning);
+ background-color: var(--ty-progress-stroke-color-warning);
}
&_blue {
- background-color: var(--ty-color-info);
+ background-color: var(--ty-progress-stroke-color-info);
}
&_red {
- background-color: var(--ty-color-danger);
+ background-color: var(--ty-progress-stroke-color-danger);
}
&_green {
- background-color: var(--ty-color-success);
+ background-color: var(--ty-progress-stroke-color-success);
}
}
&__text {
color: var(--ty-progress-text-color);
- margin-left: 10px;
- min-width: 40px;
+ margin-left: var(--ty-progress-text-offset);
+ min-width: var(--ty-progress-text-min-width);
text-align: right;
}
&__inner-text {
- color: #fff;
- font-size: 10px;
- margin: 0 5px;
+ color: var(--ty-progress-inner-text-color);
+ font-size: var(--ty-progress-inner-text-font-size);
+ margin: var(--ty-progress-inner-text-margin);
}
&__effect {
@@ -116,23 +116,23 @@
transition: stroke-dashoffset 0.6s ease 0s, stroke 0.6s ease;
&_primary {
- stroke: var(--ty-color-primary);
+ stroke: var(--ty-progress-stroke-color-primary);
}
&_yellow {
- stroke: var(--ty-color-warning);
+ stroke: var(--ty-progress-stroke-color-warning);
}
&_blue {
- stroke: var(--ty-color-info);
+ stroke: var(--ty-progress-stroke-color-info);
}
&_red {
- stroke: var(--ty-color-danger);
+ stroke: var(--ty-progress-stroke-color-danger);
}
&_green {
- stroke: var(--ty-color-success);
+ stroke: var(--ty-progress-stroke-color-success);
}
}
@@ -143,7 +143,7 @@
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
- font-size: 20px;
+ font-size: var(--ty-progress-circle-text-font-size);
}
}
diff --git a/packages/react/src/radio/style/_index.scss b/packages/react/src/radio/style/_index.scss
deleted file mode 100755
index 16667f5c..00000000
--- a/packages/react/src/radio/style/_index.scss
+++ /dev/null
@@ -1,83 +0,0 @@
-@use '@tiny-design/tokens/scss/variables' as *;
-
-.#{$prefix}-radio {
- position: relative;
- display: inline-flex;
- align-items: center;
- font-size: var(--ty-font-size-base);
- margin-right: 8px;
- color: var(--ty-color-text);
-
- &__native {
- position: absolute;
- inset: 0;
- width: 100%;
- height: 100%;
- z-index: 1;
- cursor: pointer;
- opacity: 0;
- margin: 0;
- padding: 0;
- }
-
- &__inner {
- box-sizing: border-box;
- display: flex;
- width: 16px;
- height: 16px;
- border-radius: 100%;
- background-color: var(--ty-radio-bg);
- border: 1px solid var(--ty-color-primary);
- align-items: center;
- justify-content: center;
-
- &::after {
- box-sizing: border-box;
- display: inline-block;
- content: '';
- width: 10px;
- height: 10px;
- border-radius: 100%;
- background-color: var(--ty-color-primary);
- transition: all 200ms;
- transform: scale(0);
- }
-
- & + span {
- padding: 0 5px;
- line-height: 16px;
- }
- }
-
- &_checked {
- .#{$prefix}-radio {
- &__inner::after {
- transform: scale(1);
- }
- }
- }
-
- &_disabled {
- .#{$prefix}-radio {
- &__native {
- cursor: not-allowed;
- }
-
- &__inner {
- border-color: var(--ty-radio-disabled-border);
-
- &::after {
- background-color: var(--ty-radio-disabled-dot);
- }
-
- & + span {
- color: var(--ty-color-text-quaternary);
- }
- }
- }
- }
-
- &-group {
- display: inline-block;
- }
-}
diff --git a/packages/react/src/radio/style/index.scss b/packages/react/src/radio/style/index.scss
new file mode 100644
index 00000000..59eaee5e
--- /dev/null
+++ b/packages/react/src/radio/style/index.scss
@@ -0,0 +1,83 @@
+@use '@tiny-design/tokens/scss/variables' as *;
+
+.#{$prefix}-radio {
+ position: relative;
+ display: inline-flex;
+ align-items: center;
+ font-size: var(--ty-font-size-base);
+ margin-right: 8px;
+ color: var(--ty-radio-label-color, var(--ty-color-text));
+
+ &__native {
+ position: absolute;
+ inset: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 1;
+ cursor: pointer;
+ opacity: 0;
+ margin: 0;
+ padding: 0;
+ }
+
+ &__inner {
+ box-sizing: border-box;
+ display: flex;
+ width: var(--ty-radio-size, 16px);
+ height: var(--ty-radio-size, 16px);
+ border-radius: 100%;
+ background-color: var(--ty-radio-bg, var(--ty-color-bg-container));
+ border: 1px solid var(--ty-radio-border, var(--ty-color-primary));
+ align-items: center;
+ justify-content: center;
+
+ &::after {
+ box-sizing: border-box;
+ display: inline-block;
+ content: '';
+ width: var(--ty-radio-dot-size, 10px);
+ height: var(--ty-radio-dot-size, 10px);
+ border-radius: 100%;
+ background-color: var(--ty-radio-dot-bg, var(--ty-color-primary));
+ transition: all 200ms;
+ transform: scale(0);
+ }
+
+ & + span {
+ padding: 0 var(--ty-radio-label-gap, 5px);
+ line-height: var(--ty-radio-size, 16px);
+ }
+ }
+
+ &_checked {
+ .#{$prefix}-radio__inner {
+ border-color: var(--ty-radio-border-checked, var(--ty-color-primary));
+
+ &::after {
+ transform: scale(1);
+ }
+ }
+ }
+
+ &_disabled {
+ .#{$prefix}-radio__native {
+ cursor: not-allowed;
+ }
+
+ .#{$prefix}-radio__inner {
+ border-color: var(--ty-radio-border-disabled, var(--ty-color-border));
+
+ &::after {
+ background-color: var(--ty-radio-dot-bg-disabled, rgb(0 0 0 / 20%));
+ }
+
+ & + span {
+ color: var(--ty-radio-label-color-disabled, var(--ty-color-text-quaternary));
+ }
+ }
+ }
+
+ &-group {
+ display: inline-block;
+ }
+}
diff --git a/packages/react/src/rate/style/_index.scss b/packages/react/src/rate/style/index.scss
similarity index 100%
rename from packages/react/src/rate/style/_index.scss
rename to packages/react/src/rate/style/index.scss
diff --git a/packages/react/src/result/style/_index.scss b/packages/react/src/result/style/_index.scss
deleted file mode 100644
index c9f780df..00000000
--- a/packages/react/src/result/style/_index.scss
+++ /dev/null
@@ -1,48 +0,0 @@
-@use '@tiny-design/tokens/scss/variables' as *;
-@use '@tiny-design/tokens/scss/animation' as *;
-
-.#{$prefix}-result {
- padding: 48px 32px;
- box-sizing: border-box;
-
- &__icon-container {
- margin-bottom: 24px;
- text-align: center;
- box-sizing: border-box;
- }
-
- &__icon {
- animation: ty-rotate 1s linear infinite;
- }
-
- &__title {
- color: var(--ty-color-text);
- font-size: 24px;
- line-height: 1.8;
- text-align: center;
- box-sizing: border-box;
- }
-
- &__subtitle {
- color: var(--ty-color-text-tertiary);
- font-size: 14px;
- line-height: 1.6;
- text-align: center;
- box-sizing: border-box;
- }
-
- &__extra {
- margin-top: 32px;
- text-align: center;
- box-sizing: border-box;
- }
-
- &__content {
- margin-top: 24px;
- margin-left: 30px;
- margin-right: 30px;
- padding: 24px 40px;
- background-color: var(--ty-result-content-bg);
- box-sizing: border-box;
- }
-}
diff --git a/packages/react/src/result/style/index.scss b/packages/react/src/result/style/index.scss
new file mode 100644
index 00000000..64e04420
--- /dev/null
+++ b/packages/react/src/result/style/index.scss
@@ -0,0 +1,48 @@
+@use '@tiny-design/tokens/scss/variables' as *;
+@use '@tiny-design/tokens/scss/animation' as *;
+
+.#{$prefix}-result {
+ padding: var(--ty-result-padding);
+ box-sizing: border-box;
+
+ &__icon-container {
+ margin-bottom: var(--ty-result-icon-margin-bottom);
+ text-align: center;
+ box-sizing: border-box;
+ }
+
+ &__icon {
+ animation: ty-rotate 1s linear infinite;
+ }
+
+ &__title {
+ color: var(--ty-result-title-color);
+ font-size: var(--ty-result-title-font-size);
+ line-height: var(--ty-result-title-line-height);
+ text-align: center;
+ box-sizing: border-box;
+ }
+
+ &__subtitle {
+ color: var(--ty-result-subtitle-color);
+ font-size: var(--ty-result-subtitle-font-size);
+ line-height: var(--ty-result-subtitle-line-height);
+ text-align: center;
+ box-sizing: border-box;
+ }
+
+ &__extra {
+ margin-top: var(--ty-result-extra-margin-top);
+ text-align: center;
+ box-sizing: border-box;
+ }
+
+ &__content {
+ margin-top: var(--ty-result-content-margin-top);
+ margin-left: var(--ty-result-content-margin-inline);
+ margin-right: var(--ty-result-content-margin-inline);
+ padding: var(--ty-result-content-padding);
+ background-color: var(--ty-result-content-bg);
+ box-sizing: border-box;
+ }
+}
diff --git a/packages/react/src/row/index.md b/packages/react/src/row/index.md
new file mode 100644
index 00000000..3e99b0a5
--- /dev/null
+++ b/packages/react/src/row/index.md
@@ -0,0 +1,108 @@
+import BasicDemo from '../grid/demo/Basic';
+import BasicSource from '../grid/demo/Basic.tsx?raw';
+import GutterDemo from '../grid/demo/Gutter';
+import GutterSource from '../grid/demo/Gutter.tsx?raw';
+import OffsetDemo from '../grid/demo/Offset';
+import OffsetSource from '../grid/demo/Offset.tsx?raw';
+import OrderDemo from '../grid/demo/Order';
+import OrderSource from '../grid/demo/Order.tsx?raw';
+import AlignmentDemo from '../grid/demo/Alignment';
+import AlignmentSource from '../grid/demo/Alignment.tsx?raw';
+import ResponsiveDemo from '../grid/demo/Responsive';
+import ResponsiveSource from '../grid/demo/Responsive.tsx?raw';
+
+# Grid System
+
+Use `Row` and `Col` to build classic 24-column page grids with responsive breakpoints.
+
+## Usage
+
+```jsx
+import { Row, Col } from 'tiny-design';
+```
+
+## Examples
+
+
+
+### Basic Grid
+
+Create a basic 24-column layout using `Row` and `Col`.
+
+
+
+
+
+
+### Gutter
+
+Use `Row.gutter` to control horizontal and vertical spacing between columns.
+
+
+
+
+
+
+### Column Offset
+
+Use `offset` to push a column to the right.
+
+
+
+
+
+
+### Order
+
+Use `order` to change the visual order of columns.
+
+
+
+
+
+
+### Alignment
+
+Use `align` and `justify` on `Row` to control cross-axis and main-axis placement.
+
+
+
+
+
+
+### Responsive
+
+Use `xs`, `sm`, `md`, `lg`, `xl`, `xxl` to define responsive spans and offsets.
+
+
+
+
+
+## Props
+
+### Row
+
+| Property | Description | Type | Default |
+| ---------- | ------------------------------------------ | --------------------------------------------------------------------------------------- | ------- |
+| gutter | spacing between columns | number \| [number, number] | 0 |
+| gutterSide | include gutter padding on outer edges | boolean | false |
+| align | vertical alignment | `top` \| `center` \| `bottom` \| `baseline` | - |
+| justify | horizontal arrangement | `start` \| `end` \| `center` \| `space-around` \| `space-between` \| `space-evenly` | - |
+| style | style object of container | CSSProperties | - |
+| className | className of container | string | - |
+
+### Col
+
+| Property | Description | Type | Default |
+| --------- | ------------------------------------------- | ------------------------------------ | ------- |
+| span | number of cells to occupy, out of 24 | number | - |
+| offset | number of cells to offset from the left | number | 0 |
+| order | visual order | number | 0 |
+| xs | screen < 480px config | number \| `{ span, offset, order }` | - |
+| sm | screen >= 600px config | number \| `{ span, offset, order }` | - |
+| md | screen >= 840px config | number \| `{ span, offset, order }` | - |
+| lg | screen >= 960px config | number \| `{ span, offset, order }` | - |
+| xl | screen >= 1280px config | number \| `{ span, offset, order }` | - |
+| xxl | screen >= 1440px config | number \| `{ span, offset, order }` | - |
+| style | style object of container | CSSProperties | - |
+| className | className of container | string | - |
diff --git a/packages/react/src/row/index.zh_CN.md b/packages/react/src/row/index.zh_CN.md
new file mode 100644
index 00000000..1f7a1d97
--- /dev/null
+++ b/packages/react/src/row/index.zh_CN.md
@@ -0,0 +1,108 @@
+import BasicDemo from '../grid/demo/Basic';
+import BasicSource from '../grid/demo/Basic.tsx?raw';
+import GutterDemo from '../grid/demo/Gutter';
+import GutterSource from '../grid/demo/Gutter.tsx?raw';
+import OffsetDemo from '../grid/demo/Offset';
+import OffsetSource from '../grid/demo/Offset.tsx?raw';
+import OrderDemo from '../grid/demo/Order';
+import OrderSource from '../grid/demo/Order.tsx?raw';
+import AlignmentDemo from '../grid/demo/Alignment';
+import AlignmentSource from '../grid/demo/Alignment.tsx?raw';
+import ResponsiveDemo from '../grid/demo/Responsive';
+import ResponsiveSource from '../grid/demo/Responsive.tsx?raw';
+
+# Grid System 栅格系统
+
+使用 `Row` 和 `Col` 构建经典的 24 列页面栅格布局,并支持响应式断点。
+
+## 使用方式
+
+```jsx
+import { Row, Col } from 'tiny-design';
+```
+
+## 代码示例
+
+
+
+### 基本栅格
+
+使用 `Row` 和 `Col` 创建基础 24 列布局。
+
+
+
+
+
+
+### 间距
+
+使用 `Row.gutter` 控制列之间的横向和纵向间距。
+
+
+
+
+
+
+### 偏移
+
+使用 `offset` 将列向右偏移。
+
+
+
+
+
+
+### 排序
+
+使用 `order` 调整列的视觉顺序。
+
+
+
+
+
+
+### 对齐
+
+使用 `Row` 的 `align` 和 `justify` 控制交叉轴与主轴对齐。
+
+
+
+
+
+
+### 响应式
+
+使用 `xs`、`sm`、`md`、`lg`、`xl`、`xxl` 定义响应式 span 和 offset。
+
+
+
+
+
+## Props
+
+### Row
+
+| 属性 | 说明 | 类型 | 默认值 |
+| ---------- | ------------------------ | ------------------------------------------------------------------------------------- | ------ |
+| gutter | 列之间的间距 | number \| [number, number] | 0 |
+| gutterSide | 是否包含首尾两侧间距 | boolean | false |
+| align | 垂直对齐方式 | `top` \| `center` \| `bottom` \| `baseline` | - |
+| justify | 水平排列方式 | `start` \| `end` \| `center` \| `space-around` \| `space-between` \| `space-evenly` | - |
+| style | 容器样式 | CSSProperties | - |
+| className | 容器 className | string | - |
+
+### Col
+
+| 属性 | 说明 | 类型 | 默认值 |
+| --------- | ---------------------------- | --------------------------------- | ------ |
+| span | 占据的栅格数,总计 24 格 | number | - |
+| offset | 左侧偏移的栅格数 | number | 0 |
+| order | 视觉顺序 | number | 0 |
+| xs | 小于 480px 的配置 | number \| `{ span, offset, order }` | - |
+| sm | 大于等于 600px 的配置 | number \| `{ span, offset, order }` | - |
+| md | 大于等于 840px 的配置 | number \| `{ span, offset, order }` | - |
+| lg | 大于等于 960px 的配置 | number \| `{ span, offset, order }` | - |
+| xl | 大于等于 1280px 的配置 | number \| `{ span, offset, order }` | - |
+| xxl | 大于等于 1440px 的配置 | number \| `{ span, offset, order }` | - |
+| style | 容器样式 | CSSProperties | - |
+| className | 容器 className | string | - |
diff --git a/packages/react/src/grid/style/_index.scss b/packages/react/src/row/style/index.scss
old mode 100755
new mode 100644
similarity index 100%
rename from packages/react/src/grid/style/_index.scss
rename to packages/react/src/row/style/index.scss
diff --git a/packages/react/src/row/style/index.tsx b/packages/react/src/row/style/index.tsx
new file mode 100644
index 00000000..67aac616
--- /dev/null
+++ b/packages/react/src/row/style/index.tsx
@@ -0,0 +1 @@
+import './index.scss';
diff --git a/packages/react/src/scroll-indicator/style/_index.scss b/packages/react/src/scroll-indicator/style/index.scss
similarity index 100%
rename from packages/react/src/scroll-indicator/style/_index.scss
rename to packages/react/src/scroll-indicator/style/index.scss
diff --git a/packages/react/src/scroll-number/style/_index.scss b/packages/react/src/scroll-number/style/index.scss
similarity index 100%
rename from packages/react/src/scroll-number/style/_index.scss
rename to packages/react/src/scroll-number/style/index.scss
diff --git a/packages/react/src/segmented/style/_index.scss b/packages/react/src/segmented/style/index.scss
similarity index 59%
rename from packages/react/src/segmented/style/_index.scss
rename to packages/react/src/segmented/style/index.scss
index 73dd20bf..d6b8fa97 100644
--- a/packages/react/src/segmented/style/_index.scss
+++ b/packages/react/src/segmented/style/index.scss
@@ -3,9 +3,9 @@
.#{$prefix}-segmented {
display: inline-flex;
align-items: center;
- padding: 2px;
+ padding: var(--ty-segmented-padding);
background: var(--ty-segmented-bg);
- border-radius: var(--ty-border-radius);
+ border-radius: var(--ty-segmented-radius);
box-sizing: border-box;
&_block {
@@ -29,43 +29,43 @@
}
&_sm .#{$prefix}-segmented__item {
- padding: 0 8px;
- height: calc(var(--ty-height-sm) - 4px);
- font-size: var(--ty-font-size-sm);
+ padding: var(--ty-segmented-item-padding-sm);
+ height: var(--ty-segmented-item-height-sm);
+ font-size: var(--ty-segmented-font-size-sm);
}
&_md .#{$prefix}-segmented__item {
- padding: 0 12px;
- height: calc(var(--ty-height-md) - 4px);
- font-size: var(--ty-font-size-base);
+ padding: var(--ty-segmented-item-padding-md);
+ height: var(--ty-segmented-item-height-md);
+ font-size: var(--ty-segmented-font-size-md);
}
&_lg .#{$prefix}-segmented__item {
- padding: 0 16px;
- height: calc(var(--ty-height-lg) - 4px);
- font-size: var(--ty-font-size-lg);
+ padding: var(--ty-segmented-item-padding-lg);
+ height: var(--ty-segmented-item-height-lg);
+ font-size: var(--ty-segmented-font-size-lg);
}
&__item {
position: relative;
display: inline-flex;
align-items: center;
- gap: 4px;
+ gap: var(--ty-segmented-item-gap);
cursor: pointer;
- border-radius: var(--ty-border-radius);
+ border-radius: var(--ty-segmented-radius);
transition: all 0.2s;
user-select: none;
white-space: nowrap;
&:hover:not(&_active, &_disabled) {
- color: var(--ty-color-text);
+ color: var(--ty-segmented-item-color-hover);
}
&_active {
background: var(--ty-segmented-active-bg);
- color: var(--ty-color-text);
- box-shadow: 0 1px 2px 0 rgb(0 0 0 / 6%), 0 1px 3px 0 rgb(0 0 0 / 10%);
- font-weight: 500;
+ color: var(--ty-segmented-item-color-active);
+ box-shadow: var(--ty-segmented-item-shadow-active);
+ font-weight: var(--ty-segmented-item-font-weight-active);
}
&_disabled {
diff --git a/packages/react/src/select/style/_index.scss b/packages/react/src/select/style/_index.scss
deleted file mode 100644
index 8bdbaa4f..00000000
--- a/packages/react/src/select/style/_index.scss
+++ /dev/null
@@ -1,312 +0,0 @@
-@use "@tiny-design/tokens/scss/variables" as *;
-
-.#{$prefix}-select {
- position: relative;
- display: inline-block;
- width: 100%;
- font-size: var(--ty-select-font-size, var(--ty-font-size-base));
- cursor: pointer;
- outline: none;
-
- &_disabled {
- cursor: not-allowed;
- opacity: 0.6;
-
- .#{$prefix}-select__selector {
- background-color: var(--ty-color-bg-disabled);
- cursor: not-allowed;
- }
- }
-
- // Sizes
- &_sm .#{$prefix}-select__selector {
- min-height: var(--ty-select-height-sm, var(--ty-height-sm));
- font-size: var(--ty-font-size-sm);
- padding: 0 24px 0 8px;
- }
-
- &_md .#{$prefix}-select__selector {
- min-height: var(--ty-select-height-md, var(--ty-height-md));
- font-size: var(--ty-select-font-size, var(--ty-font-size-base));
- padding: 0 28px 0 10px;
- }
-
- &_lg .#{$prefix}-select__selector {
- min-height: var(--ty-select-height-lg, var(--ty-height-lg));
- font-size: var(--ty-font-size-lg);
- padding: 0 32px 0 12px;
- }
-
- // Multiple mode
- &_multiple {
- .#{$prefix}-select__selector {
- padding-right: 28px;
- }
-
- .#{$prefix}-select__selection {
- flex-wrap: wrap;
- gap: 4px;
- padding: 2px 0;
- }
- }
-
- // Open state
- &_open .#{$prefix}-select__selector {
- border-color: var(--ty-input-focus-border);
- box-shadow: var(--ty-input-focus-shadow);
- }
-
- // Selector
- &__selector {
- display: flex;
- align-items: center;
- width: 100%;
- border: 1px solid var(--ty-input-border);
- border-radius: var(--ty-select-border-radius, var(--ty-border-radius));
- background-color: var(--ty-input-bg);
- box-sizing: border-box;
- transition: all 0.3s;
-
- &:hover {
- border-color: var(--ty-input-focus-border);
- }
- }
-
- // Selection area
- &__selection {
- flex: 1;
- display: flex;
- align-items: center;
- overflow: hidden;
- min-width: 0;
- }
-
- &__selection-text {
- display: inline-block;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- color: var(--ty-color-text);
- }
-
- &__placeholder {
- color: var(--ty-color-text-placeholder);
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- pointer-events: none;
- }
-
- // Search input
- &__search {
- flex: 1;
- min-width: 4px;
- max-width: 100%;
- margin: 0;
- padding: 0;
- border: none;
- outline: none;
- background: transparent;
- font-size: inherit;
- font-family: inherit;
- color: var(--ty-color-text);
- appearance: none;
-
- &::placeholder {
- color: var(--ty-color-text-placeholder);
- }
- }
-
- // Suffix (arrow + clear)
- &__suffix {
- position: absolute;
- right: 8px;
- top: 50%;
- transform: translateY(-50%);
- display: inline-flex;
- align-items: center;
- justify-content: center;
- width: var(--ty-select-suffix-size);
- height: var(--ty-select-suffix-size);
- color: var(--ty-color-text-quaternary);
- }
-
- // Arrow
- &__arrow {
- display: inline-flex;
- align-items: center;
- transition: transform 300ms;
-
- &_reverse {
- transform: rotate(180deg);
- }
- }
-
- // Clear button — overlays arrow on hover (same pattern as TimePicker/DatePicker)
- &__clear {
- display: none;
- position: absolute;
- inset: 0;
- align-items: center;
- justify-content: center;
- font-size: 14px;
- color: var(--ty-color-text-quaternary);
- background: var(--ty-input-bg);
- cursor: pointer;
- transition: color 0.2s;
- border: none;
- padding: 0;
-
- &:hover {
- color: var(--ty-color-text-tertiary);
- }
- }
-
- &_has-value:hover &__clear {
- display: inline-flex;
- }
-
- // Tag pill (multi-select)
- &__tag {
- display: inline-flex;
- align-items: center;
- max-width: 100%;
- height: var(--ty-select-tag-height);
- padding: 0 4px 0 8px;
- border-radius: var(--ty-select-border-radius, var(--ty-border-radius));
- background-color: var(--ty-color-fill-secondary);
- font-size: var(--ty-font-size-sm);
- line-height: 20px;
- color: var(--ty-color-text);
- box-sizing: border-box;
-
- &_max {
- padding: 0 8px;
- }
- }
-
- &__tag-content {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
-
- &__tag-close {
- display: inline-flex;
- align-items: center;
- margin-left: 4px;
- cursor: pointer;
- color: var(--ty-color-text-quaternary);
- transition: color 0.2s;
-
- &:hover {
- color: var(--ty-color-text);
- }
- }
-
- // Dropdown
- &__dropdown {
- width: 100%;
- margin: 0;
- padding: 4px 0;
- list-style-type: none;
- background-color: var(--ty-select-dropdown-bg);
- box-sizing: border-box;
- overflow: hidden auto;
- z-index: 10;
- box-shadow: $select-dropdown-shadow;
- border-radius: var(--ty-select-border-radius, var(--ty-border-radius));
- font-size: var(--ty-select-font-size, var(--ty-font-size-base));
- max-height: $select-dropdown-max-height;
- }
-
- // Loading state
- &__loading {
- display: flex;
- justify-content: center;
- align-items: center;
- padding: 16px;
-
- svg {
- animation: ty-select-spin 1s linear infinite;
- }
- }
-
- // Empty state
- &__empty {
- padding: 16px;
- text-align: center;
- color: var(--ty-color-text-quaternary);
- font-size: var(--ty-font-size-sm);
- }
-}
-
-// Option (used both by Option component and options-prop rendering)
-.#{$prefix}-select-option {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: var(--ty-select-option-padding);
- font-size: var(--ty-select-option-font-size);
- line-height: 22px;
- cursor: pointer;
- color: var(--ty-color-text);
- transition: background-color 0.2s;
-
- &__content {
- flex: 1;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
-
- &__check {
- flex-shrink: 0;
- margin-left: 8px;
- color: var(--ty-color-primary);
- }
-
- &_active {
- background-color: var(--ty-select-option-active-bg);
- }
-
- &_selected {
- background-color: var(--ty-select-option-selected-bg);
- font-weight: $select-selected-font-weight;
- }
-
- &_disabled {
- cursor: not-allowed;
- background-color: var(--ty-select-option-disabled-bg);
- opacity: 0.5;
- }
-}
-
-.#{$prefix}-select-group {
- &__title {
- font-size: var(--ty-font-size-sm);
- cursor: default;
- color: var(--ty-color-text-secondary);
- padding: var(--ty-select-option-padding);
- }
-
- &__list {
- list-style-type: none;
- margin: 0;
- padding: 0;
-
- > .#{$prefix}-select-option {
- padding-left: 24px;
- }
- }
-}
-
-@keyframes ty-select-spin {
- from {
- transform: rotate(0deg);
- }
-
- to {
- transform: rotate(360deg);
- }
-}
diff --git a/packages/react/src/select/style/index.scss b/packages/react/src/select/style/index.scss
new file mode 100644
index 00000000..7525fb26
--- /dev/null
+++ b/packages/react/src/select/style/index.scss
@@ -0,0 +1,299 @@
+@use "@tiny-design/tokens/scss/variables" as *;
+
+.#{$prefix}-select {
+ position: relative;
+ display: inline-block;
+ width: 100%;
+ font-size: var(--ty-select-font-size-md, var(--ty-font-size-base));
+ cursor: pointer;
+ outline: none;
+
+ &_disabled {
+ cursor: not-allowed;
+ opacity: 0.6;
+
+ .#{$prefix}-select__selector {
+ background-color: var(--ty-select-bg-disabled, var(--ty-color-bg-disabled));
+ cursor: not-allowed;
+ }
+ }
+
+ &_sm .#{$prefix}-select__selector {
+ min-height: var(--ty-select-height-sm, var(--ty-height-sm));
+ font-size: var(--ty-select-font-size-sm, var(--ty-font-size-sm));
+ padding: 0 var(--ty-select-padding-inline-end-sm, 24px) 0 var(--ty-select-padding-inline-start-sm, 8px);
+ }
+
+ &_md .#{$prefix}-select__selector {
+ min-height: var(--ty-select-height-md, var(--ty-height-md));
+ font-size: var(--ty-select-font-size-md, var(--ty-font-size-base));
+ padding: 0 var(--ty-select-padding-inline-end-md, 28px) 0 var(--ty-select-padding-inline-start-md, 10px);
+ }
+
+ &_lg .#{$prefix}-select__selector {
+ min-height: var(--ty-select-height-lg, var(--ty-height-lg));
+ font-size: var(--ty-select-font-size-lg, var(--ty-font-size-lg));
+ padding: 0 var(--ty-select-padding-inline-end-lg, 32px) 0 var(--ty-select-padding-inline-start-lg, 12px);
+ }
+
+ &_multiple {
+ .#{$prefix}-select__selector {
+ padding-right: var(--ty-select-multiple-padding-inline-end, 28px);
+ }
+
+ .#{$prefix}-select__selection {
+ flex-wrap: wrap;
+ gap: var(--ty-select-multiple-gap, 4px);
+ padding: var(--ty-select-multiple-padding-block, 2px) 0;
+ }
+ }
+
+ &_open .#{$prefix}-select__selector {
+ border-color: var(--ty-select-border-focus, var(--ty-input-border-focus, var(--ty-color-primary)));
+ box-shadow: var(--ty-select-shadow-focus, var(--ty-input-shadow-focus, var(--ty-shadow-focus)));
+ }
+
+ &__selector {
+ display: flex;
+ align-items: center;
+ width: 100%;
+ border: 1px solid var(--ty-select-border, var(--ty-input-border, var(--ty-color-border)));
+ border-radius: var(--ty-select-radius, var(--ty-border-radius));
+ background-color: var(--ty-select-bg, var(--ty-input-bg, var(--ty-color-bg-container)));
+ box-sizing: border-box;
+ transition: all 0.3s;
+
+ &:hover {
+ border-color: var(--ty-select-border-hover, var(--ty-input-border-hover, var(--ty-color-primary)));
+ }
+ }
+
+ &__selection {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ overflow: hidden;
+ min-width: 0;
+ }
+
+ &__selection-text {
+ display: inline-block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ color: var(--ty-select-color, var(--ty-color-text));
+ }
+
+ &__placeholder {
+ color: var(--ty-select-placeholder, var(--ty-color-text-placeholder));
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ pointer-events: none;
+ }
+
+ &__search {
+ flex: 1;
+ min-width: 4px;
+ max-width: 100%;
+ margin: 0;
+ padding: 0;
+ border: none;
+ outline: none;
+ background: transparent;
+ font-size: inherit;
+ font-family: inherit;
+ color: var(--ty-select-color, var(--ty-color-text));
+ appearance: none;
+
+ &::placeholder {
+ color: var(--ty-select-placeholder, var(--ty-color-text-placeholder));
+ }
+ }
+
+ &__suffix {
+ position: absolute;
+ right: 8px;
+ top: 50%;
+ transform: translateY(-50%);
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ width: var(--ty-select-suffix-size, 14px);
+ height: var(--ty-select-suffix-size, 14px);
+ color: var(--ty-select-suffix-color, var(--ty-color-text-quaternary));
+ }
+
+ &__arrow {
+ display: inline-flex;
+ align-items: center;
+ transition: transform 300ms;
+
+ &_reverse {
+ transform: rotate(180deg);
+ }
+ }
+
+ &__clear {
+ display: none;
+ position: absolute;
+ inset: 0;
+ align-items: center;
+ justify-content: center;
+ font-size: var(--ty-select-suffix-size, 14px);
+ color: var(--ty-select-clear-color, var(--ty-color-text-quaternary));
+ background: var(--ty-select-clear-bg, var(--ty-select-bg, var(--ty-input-bg, var(--ty-color-bg-container))));
+ cursor: pointer;
+ transition: color 0.2s;
+ border: none;
+ padding: 0;
+
+ &:hover {
+ color: var(--ty-select-clear-color-hover, var(--ty-color-text-tertiary));
+ }
+ }
+
+ &_has-value:hover &__clear {
+ display: inline-flex;
+ }
+
+ &__tag {
+ display: inline-flex;
+ align-items: center;
+ max-width: 100%;
+ height: var(--ty-select-tag-height, 22px);
+ padding: var(--ty-select-tag-padding, 0 4px 0 8px);
+ border-radius: var(--ty-select-tag-radius, var(--ty-select-radius, var(--ty-border-radius)));
+ background-color: var(--ty-select-tag-bg, var(--ty-color-fill-secondary));
+ font-size: var(--ty-select-tag-font-size, var(--ty-font-size-sm));
+ line-height: var(--ty-select-tag-line-height, 20px);
+ color: var(--ty-select-tag-color, var(--ty-color-text));
+ box-sizing: border-box;
+
+ &_max {
+ padding: var(--ty-select-tag-padding-max, 0 8px);
+ }
+ }
+
+ &__tag-content {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+
+ &__tag-close {
+ display: inline-flex;
+ align-items: center;
+ margin-left: 4px;
+ cursor: pointer;
+ color: var(--ty-select-tag-close-color, var(--ty-color-text-quaternary));
+ transition: color 0.2s;
+
+ &:hover {
+ color: var(--ty-select-tag-close-color-hover, var(--ty-color-text));
+ }
+ }
+
+ &__dropdown {
+ width: 100%;
+ margin: 0;
+ padding: 4px 0;
+ list-style-type: none;
+ background-color: var(--ty-select-dropdown-bg, var(--ty-color-bg-container));
+ box-sizing: border-box;
+ overflow: hidden auto;
+ z-index: 10;
+ box-shadow: var(--ty-select-dropdown-shadow, $select-dropdown-shadow);
+ border-radius: var(--ty-select-radius, var(--ty-border-radius));
+ font-size: var(--ty-select-font-size-md, var(--ty-font-size-base));
+ max-height: var(--ty-select-dropdown-max-height, $select-dropdown-max-height);
+ }
+
+ &__loading {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ padding: 16px;
+
+ svg {
+ animation: ty-select-spin 1s linear infinite;
+ }
+ }
+
+ &__empty {
+ padding: 16px;
+ text-align: center;
+ color: var(--ty-select-empty-color, var(--ty-color-text-quaternary));
+ font-size: var(--ty-select-font-size-sm, var(--ty-font-size-sm));
+ }
+}
+
+.#{$prefix}-select-option {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: var(--ty-select-option-padding, 7px 12px);
+ font-size: var(--ty-select-option-font-size, var(--ty-font-size-base));
+ line-height: 22px;
+ cursor: pointer;
+ color: var(--ty-select-option-color, var(--ty-color-text));
+ transition: background-color 0.2s;
+
+ &__content {
+ flex: 1;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+
+ &__check {
+ flex-shrink: 0;
+ margin-left: 8px;
+ color: var(--ty-select-border-focus, var(--ty-input-border-focus, var(--ty-color-primary)));
+ }
+
+ &_active {
+ background-color: var(--ty-select-option-active-bg, var(--ty-color-fill-secondary));
+ }
+
+ &_selected {
+ background-color: var(--ty-select-option-selected-bg, var(--ty-color-primary-bg));
+ font-weight: var(--ty-select-selected-font-weight, $select-selected-font-weight);
+ }
+
+ &_disabled {
+ cursor: not-allowed;
+ background-color: var(--ty-select-option-disabled-bg, var(--ty-color-bg-container));
+ color: var(--ty-select-option-disabled-color, var(--ty-color-text-quaternary));
+ opacity: 0.5;
+ }
+}
+
+.#{$prefix}-select-group {
+ &__title {
+ font-size: var(--ty-select-font-size-sm, var(--ty-font-size-sm));
+ cursor: default;
+ color: var(--ty-color-text-secondary);
+ padding: var(--ty-select-option-padding, 7px 12px);
+ }
+
+ &__list {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+
+ > .#{$prefix}-select-option {
+ padding-left: 24px;
+ }
+ }
+}
+
+@keyframes ty-select-spin {
+ from {
+ transform: rotate(0deg);
+ }
+
+ to {
+ transform: rotate(360deg);
+ }
+}
diff --git a/packages/react/src/skeleton/style/_index.scss b/packages/react/src/skeleton/style/index.scss
similarity index 77%
rename from packages/react/src/skeleton/style/_index.scss
rename to packages/react/src/skeleton/style/index.scss
index 6c6fa775..20b10cf0 100644
--- a/packages/react/src/skeleton/style/_index.scss
+++ b/packages/react/src/skeleton/style/index.scss
@@ -3,13 +3,13 @@
.#{$prefix}-skeleton {
display: inline-block;
width: 100%;
- height: 1em;
+ height: var(--ty-skeleton-height);
position: relative;
overflow: hidden;
background-color: var(--ty-skeleton-bg);
& + & {
- margin-top: 10px;
+ margin-top: var(--ty-skeleton-stack-gap);
}
&::after {
@@ -18,7 +18,7 @@
transform: translateX(-100%);
background-image: var(--ty-skeleton-shimmer);
background-size: 200% 100%;
- animation: ty-shimmer 1.5s ease infinite;
+ animation: ty-shimmer var(--ty-skeleton-animation-duration) ease infinite;
}
&_rounded {
diff --git a/packages/react/src/slider/style/_index.scss b/packages/react/src/slider/style/index.scss
similarity index 66%
rename from packages/react/src/slider/style/_index.scss
rename to packages/react/src/slider/style/index.scss
index c75da46a..fbd01951 100644
--- a/packages/react/src/slider/style/_index.scss
+++ b/packages/react/src/slider/style/index.scss
@@ -7,19 +7,19 @@
&_horizontal {
width: 100%;
- min-height: $slider-size;
- margin: 13px 7px;
- padding: 4px 0;
+ min-height: var(--ty-slider-size);
+ margin: var(--ty-slider-horizontal-margin);
+ padding: var(--ty-slider-horizontal-padding);
.#{$prefix}-slider {
&__rail {
width: 100%;
- height: $slider-track-size;
+ height: var(--ty-slider-track-size);
left: 0;
}
&__track {
- height: $slider-track-size;
+ height: var(--ty-slider-track-size);
}
&__thumb-container, &__dot {
@@ -34,20 +34,20 @@
}
&_vertical {
- width: 12px;
+ width: var(--ty-slider-vertical-width);
height: 100%;
- margin: 6px 10px;
- padding: 0 4px;
+ margin: var(--ty-slider-vertical-margin);
+ padding: var(--ty-slider-vertical-padding);
.#{$prefix}-slider {
&__rail {
- width: $slider-track-size;
+ width: var(--ty-slider-track-size);
height: 100%;
top: 0;
}
&__track {
- width: $slider-track-size;
+ width: var(--ty-slider-track-size);
}
&__thumb-container, &__dot {
@@ -63,15 +63,15 @@
&__rail {
position: absolute;
- border-radius: 3px;
+ border-radius: var(--ty-slider-rail-radius);
box-sizing: border-box;
background-color: var(--ty-slider-rail-bg);
}
&__track {
box-sizing: border-box;
- border-radius: 3px;
- background-color: var(--ty-color-primary);
+ border-radius: var(--ty-slider-rail-radius);
+ background-color: var(--ty-slider-primary-color);
position: absolute;
&_invisible{
@@ -82,8 +82,8 @@
&__thumb-container {
position: absolute;
z-index: 1;
- width: 36px;
- height: 36px;
+ width: var(--ty-slider-thumb-hit-size);
+ height: var(--ty-slider-thumb-hit-size);
outline: none;
display: flex;
justify-content: center;
@@ -93,7 +93,7 @@
cursor: grab;
.#{$prefix}-slider__thumb {
- transform: scale(1.2);
+ transform: scale(var(--ty-slider-thumb-scale-hover));
}
}
@@ -104,9 +104,9 @@
&__thumb {
box-sizing: border-box;
- width: 14px;
- height: 14px;
- border: 1px solid var(--ty-color-primary);
+ width: var(--ty-slider-thumb-size);
+ height: var(--ty-slider-thumb-size);
+ border: 1px solid var(--ty-slider-primary-color);
background-color: var(--ty-slider-thumb-bg);
border-radius: 50%;
transition: transform 250ms;
@@ -116,15 +116,15 @@
&__dot {
box-sizing: border-box;
position: absolute;
- width: 8px;
- height: 8px;
+ width: var(--ty-slider-dot-size);
+ height: var(--ty-slider-dot-size);
border-radius: 50%;
background-color: var(--ty-slider-dot-bg);
border: 2px solid var(--ty-slider-dot-border);
transform: translate(-50%, -50%);
&_active {
- border-color: var(--ty-color-primary);
+ border-color: var(--ty-slider-primary-color);
}
}
@@ -147,11 +147,11 @@
.#{$prefix}-slider {
&__track {
- background-color: var(--ty-color-text-quaternary);
+ background-color: var(--ty-slider-disabled-color);
}
&__thumb {
- border-color: var(--ty-color-text-quaternary);
+ border-color: var(--ty-slider-disabled-color);
transform: scale(1);
}
diff --git a/packages/react/src/space/style/_index.scss b/packages/react/src/space/style/index.scss
similarity index 100%
rename from packages/react/src/space/style/_index.scss
rename to packages/react/src/space/style/index.scss
diff --git a/packages/react/src/speed-dial/style/_index.scss b/packages/react/src/speed-dial/style/index.scss
similarity index 95%
rename from packages/react/src/speed-dial/style/_index.scss
rename to packages/react/src/speed-dial/style/index.scss
index 11df0667..fdde6221 100644
--- a/packages/react/src/speed-dial/style/_index.scss
+++ b/packages/react/src/speed-dial/style/index.scss
@@ -30,7 +30,7 @@ $speed-dial-actions-gap: 16px;
}
&:focus-visible {
- box-shadow: 0 0 0 3px var(--ty-input-focus-shadow), var(--ty-shadow);
+ box-shadow: 0 0 0 3px var(--ty-input-shadow-focus, var(--ty-shadow-focus)), var(--ty-shadow);
}
&_open {
@@ -182,7 +182,7 @@ $speed-dial-actions-gap: 16px;
}
&:focus-visible {
- box-shadow: 0 0 0 3px var(--ty-input-focus-shadow), var(--ty-shadow-sm);
+ box-shadow: 0 0 0 3px var(--ty-input-shadow-focus, var(--ty-shadow-focus)), var(--ty-shadow-sm);
}
&_disabled {
diff --git a/packages/react/src/speed-dial/style/index.tsx b/packages/react/src/speed-dial/style/index.tsx
index dca5d2a0..67aac616 100644
--- a/packages/react/src/speed-dial/style/index.tsx
+++ b/packages/react/src/speed-dial/style/index.tsx
@@ -1 +1 @@
-import './_index.scss';
+import './index.scss';
diff --git a/packages/react/src/split-button/style/_index.scss b/packages/react/src/split-button/style/index.scss
similarity index 100%
rename from packages/react/src/split-button/style/_index.scss
rename to packages/react/src/split-button/style/index.scss
diff --git a/packages/react/src/split/style/_index.scss b/packages/react/src/split/style/index.scss
similarity index 82%
rename from packages/react/src/split/style/_index.scss
rename to packages/react/src/split/style/index.scss
index e2877903..80efe5d4 100755
--- a/packages/react/src/split/style/_index.scss
+++ b/packages/react/src/split/style/index.scss
@@ -54,18 +54,18 @@
&::before,
&::after {
- height: 4px;
+ height: var(--ty-split-bar-handle-size);
width: 100%;
border-left: 0;
border-right: 0;
}
&::before {
- margin-bottom: 1px;
+ margin-bottom: var(--ty-split-bar-handle-gap);
}
&::after {
- margin-top: 1px;
+ margin-top: var(--ty-split-bar-handle-gap);
}
}
@@ -82,17 +82,17 @@
&::before,
&::after {
height: 100%;
- width: 4px;
+ width: var(--ty-split-bar-handle-size);
border-top: 0;
border-bottom: 0;
}
&::before {
- margin-right: 1px;
+ margin-right: var(--ty-split-bar-handle-gap);
}
&::after {
- margin-left: 1px;
+ margin-left: var(--ty-split-bar-handle-gap);
}
}
}
diff --git a/packages/react/src/statistic/style/_index.scss b/packages/react/src/statistic/style/index.scss
similarity index 100%
rename from packages/react/src/statistic/style/_index.scss
rename to packages/react/src/statistic/style/index.scss
diff --git a/packages/react/src/steps/style/_index.scss b/packages/react/src/steps/style/index.scss
similarity index 69%
rename from packages/react/src/steps/style/_index.scss
rename to packages/react/src/steps/style/index.scss
index afd2c6c9..62c9c755 100644
--- a/packages/react/src/steps/style/_index.scss
+++ b/packages/react/src/steps/style/index.scss
@@ -4,7 +4,7 @@
box-sizing: border-box;
margin: 0;
padding: 0;
- color: var(--ty-color-text);
+ color: var(--ty-steps-color);
display: flex;
width: 100%;
@@ -84,9 +84,9 @@
}
&__icon {
- width: 32px;
- height: 32px;
- border: 1px solid var(--ty-color-primary);
+ width: var(--ty-steps-icon-size);
+ height: var(--ty-steps-icon-size);
+ border: 1px solid var(--ty-steps-icon-border);
border-radius: 50%;
background-color: var(--ty-steps-icon-bg);
display: flex;
@@ -112,13 +112,13 @@
}
&__title {
- line-height: 32px;
- font-size: $steps-title-font-size;
- color: var(--ty-color-text-secondary);
+ line-height: var(--ty-steps-icon-size);
+ font-size: var(--ty-steps-title-font-size);
+ color: var(--ty-steps-title-color);
}
&__desc {
- color: var(--ty-color-text-tertiary);
+ color: var(--ty-steps-desc-color);
}
&:last-child {
@@ -138,22 +138,22 @@
&_process {
.#{$prefix}-steps-item {
&__icon {
- background-color: var(--ty-color-primary);
- color: #fff;
+ background-color: var(--ty-steps-process-color);
+ color: var(--ty-steps-process-color-contrast);
&_has-icon {
background-color: transparent;
- color: var(--ty-color-primary);
+ color: var(--ty-steps-process-color);
}
}
&__title {
- font-weight: 600;
- color: var(--ty-color-primary);
+ font-weight: var(--ty-steps-title-font-weight-process);
+ color: var(--ty-steps-process-color);
}
&__desc {
- color: var(--ty-color-primary);
+ color: var(--ty-steps-process-color);
}
}
}
@@ -161,11 +161,11 @@
&_finish {
.#{$prefix}-steps-item {
&__icon {
- color: var(--ty-color-primary);
+ color: var(--ty-steps-process-color);
}
&__tail, &__title::after {
- background-color: var(--ty-color-primary);
+ background-color: var(--ty-steps-process-color);
}
}
}
@@ -173,16 +173,16 @@
&_wait {
.#{$prefix}-steps-item {
&__icon {
- border-color: var(--ty-color-text-quaternary);
- color: var(--ty-color-text-quaternary);
+ border-color: var(--ty-steps-wait-color);
+ color: var(--ty-steps-wait-color);
}
&__title {
- color: var(--ty-color-text-quaternary);
+ color: var(--ty-steps-wait-color);
}
&__desc {
- color: var(--ty-color-text-quaternary);
+ color: var(--ty-steps-wait-color);
}
}
}
@@ -190,16 +190,16 @@
&_error {
.#{$prefix}-steps-item {
&__icon {
- border-color: var(--ty-color-danger);
- color: var(--ty-color-danger);
+ border-color: var(--ty-steps-error-color);
+ color: var(--ty-steps-error-color);
}
&__title {
- color: var(--ty-color-danger);
+ color: var(--ty-steps-error-color);
}
&__desc {
- color: var(--ty-color-danger);
+ color: var(--ty-steps-error-color);
}
}
}
diff --git a/packages/react/src/sticky/style/_index.scss b/packages/react/src/sticky/style/index.scss
similarity index 100%
rename from packages/react/src/sticky/style/_index.scss
rename to packages/react/src/sticky/style/index.scss
diff --git a/packages/react/src/strength-indicator/style/_index.scss b/packages/react/src/strength-indicator/style/_index.scss
deleted file mode 100644
index 330ead7b..00000000
--- a/packages/react/src/strength-indicator/style/_index.scss
+++ /dev/null
@@ -1,46 +0,0 @@
-@use '@tiny-design/tokens/scss/variables' as *;
-
-.#{$prefix}-strength-indicator {
- box-sizing: border-box;
- display: flex;
- flex-wrap: nowrap;
- justify-content: space-between;
- align-items: center;
-
- &__item {
- box-sizing: border-box;
- flex: 1;
- margin: 0 2px;
-
- &:first-child {
- margin-left: 0;
-
- .#{$prefix}-strength-indicator__inner {
- border-top-left-radius: $strength-indicator-border-radius;
- border-bottom-left-radius: $strength-indicator-border-radius;
- }
- }
-
- &:last-child {
- margin-right: 0;
-
- .#{$prefix}-strength-indicator__inner {
- border-top-right-radius: $strength-indicator-border-radius;
- border-bottom-right-radius: $strength-indicator-border-radius;
- }
- }
- }
-
- &__inner {
- background-color: var(--ty-color-bg-disabled);
- min-height: 8px;
- transition: background-color 300ms;
- }
-
- &__label {
- text-align: center;
- margin-top: 4px;
- color: var(--ty-color-text-secondary);
- font-size: 12px;
- }
-}
diff --git a/packages/react/src/strength-indicator/style/index.scss b/packages/react/src/strength-indicator/style/index.scss
new file mode 100644
index 00000000..67009720
--- /dev/null
+++ b/packages/react/src/strength-indicator/style/index.scss
@@ -0,0 +1,46 @@
+@use '@tiny-design/tokens/scss/variables' as *;
+
+.#{$prefix}-strength-indicator {
+ box-sizing: border-box;
+ display: flex;
+ flex-wrap: nowrap;
+ justify-content: space-between;
+ align-items: center;
+
+ &__item {
+ box-sizing: border-box;
+ flex: 1;
+ margin: 0 var(--ty-strength-indicator-gap);
+
+ &:first-child {
+ margin-left: 0;
+
+ .#{$prefix}-strength-indicator__inner {
+ border-top-left-radius: var(--ty-strength-indicator-border-radius);
+ border-bottom-left-radius: var(--ty-strength-indicator-border-radius);
+ }
+ }
+
+ &:last-child {
+ margin-right: 0;
+
+ .#{$prefix}-strength-indicator__inner {
+ border-top-right-radius: var(--ty-strength-indicator-border-radius);
+ border-bottom-right-radius: var(--ty-strength-indicator-border-radius);
+ }
+ }
+ }
+
+ &__inner {
+ background-color: var(--ty-strength-indicator-bg);
+ min-height: var(--ty-strength-indicator-min-height);
+ transition: background-color 300ms;
+ }
+
+ &__label {
+ text-align: center;
+ margin-top: var(--ty-strength-indicator-label-margin-top);
+ color: var(--ty-strength-indicator-label-color);
+ font-size: var(--ty-strength-indicator-label-font-size);
+ }
+}
diff --git a/packages/react/src/style/_component.scss b/packages/react/src/style/_component.scss
index af028a46..c95b686b 100644
--- a/packages/react/src/style/_component.scss
+++ b/packages/react/src/style/_component.scss
@@ -51,6 +51,7 @@
@use "../rate/style/index" as *;
@use "../result/style/index" as *;
@use "../native-select/style/index" as *;
+@use "../row/style/index" as *;
@use "../scroll-indicator/style/index" as *;
@use "../scroll-number/style/index" as *;
@use "../segmented/style/index" as *;
@@ -80,4 +81,4 @@
@use "../tree/style/index" as *;
@use "../typography/style/index" as *;
@use "../upload/style/index" as *;
-@use "../with-spin/style/index" as *;
\ No newline at end of file
+@use "../with-spin/style/index" as *;
diff --git a/packages/react/src/switch/style/_index.scss b/packages/react/src/switch/style/_index.scss
deleted file mode 100755
index 14b6ad41..00000000
--- a/packages/react/src/switch/style/_index.scss
+++ /dev/null
@@ -1,141 +0,0 @@
-@use '@tiny-design/tokens/scss/variables' as *;
-@use './mixin' as *;
-
-.#{$prefix}-switch {
- display: inline-block;
- box-sizing: border-box;
- position: relative;
- cursor: pointer;
-
- &__bg {
- position: absolute;
- inset: 0;
- background-color: var(--ty-switch-bg);
- transition: background-color 300ms;
- user-select: none;
- }
-
- &__thumb {
- position: relative;
- display: inline-flex;
- justify-content: center;
- align-items: center;
- left: 0;
- top: 50%;
- transform: translateX(-50%) translateY(-50%);
- background-color: var(--ty-switch-thumb-bg);
- border: 1px solid var(--ty-switch-thumb-border);
- box-shadow: var(--ty-switch-thumb-shadow);
- transition: all 300ms;
- color: var(--ty-switch-bg);
- }
-
- &__label {
- box-sizing: border-box;
- display: block;
- color: #fff;
- text-align: center;
- position: absolute;
- left: 0;
- right: 0;
- top: 50%;
- transform: translateY(-50%);
- padding-left: 11px;
- padding-right: 5px;
- transition: all 300ms;
- }
-
- &_checked {
- .#{$prefix}-switch {
- &__bg {
- background-color: var(--ty-color-primary);
- }
-
- &__thumb {
- left: 100%;
- border-color: var(--ty-color-primary);
- color: var(--ty-color-primary);
- }
-
- &__label {
- padding-left: 5px;
- padding-right: 11px;
- }
- }
- }
-
- &_disabled {
- cursor: not-allowed;
- opacity: 0.4;
- }
-
- // TODO: optimise
- &_loading {
- .#{$prefix}-switch__thumb:before {
- display: inline-block !important;
- }
- }
-
- &_sm {
- margin: 0 10px;
- font-size: $switch-sm-font-size;
- width: 29px;
- height: 14px;
-
- .#{$prefix}-switch {
- &__bg {
- border-radius: 18px;
- }
-
- &__thumb {
- @include switch-bg(18px);
- }
-
- &__label {
- line-height: 14px;
- }
- }
- }
-
- &_md {
- margin: 0 12px;
- font-size: $switch-md-font-size;
- width: 36px;
- height: 16px;
-
- .#{$prefix}-switch {
- &__bg {
- border-radius: 22px;
- }
-
- &__thumb {
- @include switch-bg(22px);
- }
-
- &__label {
- line-height: 17px;
- }
- }
- }
-
- &_lg {
- margin: 0 14px;
- font-size: $switch-lg-font-size;
- width: 42px;
- height: 20px;
-
- .#{$prefix}-switch {
- &__bg {
- border-radius: 26px;
- }
-
- &__thumb {
- @include switch-bg(26px);
- }
-
- &__label {
- line-height: 20px;
- }
- }
- }
-}
diff --git a/packages/react/src/switch/style/index.scss b/packages/react/src/switch/style/index.scss
new file mode 100644
index 00000000..38a6e357
--- /dev/null
+++ b/packages/react/src/switch/style/index.scss
@@ -0,0 +1,140 @@
+@use '@tiny-design/tokens/scss/variables' as *;
+@use './mixin' as *;
+
+.#{$prefix}-switch {
+ display: inline-block;
+ box-sizing: border-box;
+ position: relative;
+ cursor: pointer;
+
+ &__bg {
+ position: absolute;
+ inset: 0;
+ background-color: var(--ty-switch-bg, var(--ty-color-text-quaternary));
+ transition: background-color var(--ty-switch-transition-duration, 300ms);
+ user-select: none;
+ }
+
+ &__thumb {
+ position: relative;
+ display: inline-flex;
+ justify-content: center;
+ align-items: center;
+ left: 0;
+ top: 50%;
+ transform: translateX(-50%) translateY(-50%);
+ background-color: var(--ty-switch-thumb-bg, #fff);
+ border: 1px solid var(--ty-switch-thumb-border, var(--ty-color-text-quaternary));
+ box-shadow: var(--ty-switch-thumb-shadow);
+ transition: all var(--ty-switch-transition-duration, 300ms);
+ color: var(--ty-switch-bg, var(--ty-color-text-quaternary));
+ }
+
+ &__label {
+ box-sizing: border-box;
+ display: block;
+ color: var(--ty-switch-label-color, #fff);
+ text-align: center;
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 50%;
+ transform: translateY(-50%);
+ padding-left: var(--ty-switch-label-padding-inline-start-default, 11px);
+ padding-right: var(--ty-switch-label-padding-inline-end-default, 5px);
+ transition: all var(--ty-switch-transition-duration, 300ms);
+ }
+
+ &_checked {
+ .#{$prefix}-switch {
+ &__bg {
+ background-color: var(--ty-switch-bg-checked, var(--ty-color-primary));
+ }
+
+ &__thumb {
+ left: 100%;
+ border-color: var(--ty-switch-thumb-border-checked, var(--ty-color-primary));
+ color: var(--ty-switch-bg-checked, var(--ty-color-primary));
+ }
+
+ &__label {
+ padding-left: var(--ty-switch-label-padding-inline-start-checked, 5px);
+ padding-right: var(--ty-switch-label-padding-inline-end-checked, 11px);
+ }
+ }
+ }
+
+ &_disabled {
+ cursor: not-allowed;
+ opacity: var(--ty-switch-disabled-opacity, 0.4);
+ }
+
+ &_loading {
+ .#{$prefix}-switch__thumb:before {
+ display: inline-block !important;
+ }
+ }
+
+ &_sm {
+ margin: 0 var(--ty-switch-margin-inline-sm, 10px);
+ font-size: var(--ty-switch-font-size-sm, 9px);
+ width: var(--ty-switch-width-sm, 29px);
+ height: var(--ty-switch-height-sm, 14px);
+
+ .#{$prefix}-switch {
+ &__bg {
+ border-radius: var(--ty-switch-radius-sm, 18px);
+ }
+
+ &__thumb {
+ @include switch-bg(18px);
+ }
+
+ &__label {
+ line-height: var(--ty-switch-height-sm, 14px);
+ }
+ }
+ }
+
+ &_md {
+ margin: 0 var(--ty-switch-margin-inline-md, 12px);
+ font-size: var(--ty-switch-font-size-md, 12px);
+ width: var(--ty-switch-width-md, 36px);
+ height: var(--ty-switch-height-md, 16px);
+
+ .#{$prefix}-switch {
+ &__bg {
+ border-radius: var(--ty-switch-radius-md, 22px);
+ }
+
+ &__thumb {
+ @include switch-bg(22px);
+ }
+
+ &__label {
+ line-height: 17px;
+ }
+ }
+ }
+
+ &_lg {
+ margin: 0 var(--ty-switch-margin-inline-lg, 14px);
+ font-size: var(--ty-switch-font-size-lg, 14px);
+ width: var(--ty-switch-width-lg, 42px);
+ height: var(--ty-switch-height-lg, 20px);
+
+ .#{$prefix}-switch {
+ &__bg {
+ border-radius: var(--ty-switch-radius-lg, 26px);
+ }
+
+ &__thumb {
+ @include switch-bg(26px);
+ }
+
+ &__label {
+ line-height: var(--ty-switch-height-lg, 20px);
+ }
+ }
+ }
+}
diff --git a/packages/react/src/table/style/_index.scss b/packages/react/src/table/style/index.scss
similarity index 57%
rename from packages/react/src/table/style/_index.scss
rename to packages/react/src/table/style/index.scss
index 0be3ad7b..e3e2b88d 100644
--- a/packages/react/src/table/style/_index.scss
+++ b/packages/react/src/table/style/index.scss
@@ -1,8 +1,8 @@
@use '@tiny-design/tokens/scss/variables' as *;
.#{$prefix}-table {
- color: var(--ty-color-text);
- font-size: var(--ty-font-size-base);
+ color: var(--ty-table-color, var(--ty-color-text));
+ font-size: var(--ty-table-font-size-md, var(--ty-font-size-base));
&__wrapper {
overflow-x: auto;
@@ -22,44 +22,39 @@
border: 1px solid var(--ty-table-border);
}
- // Sizes
&_sm &__cell {
- padding: 8px;
- font-size: var(--ty-font-size-sm);
+ padding: var(--ty-table-cell-padding-sm, 8px);
+ font-size: var(--ty-table-font-size-sm, var(--ty-font-size-sm));
}
&_md &__cell {
- padding: 12px 16px;
+ padding: var(--ty-table-cell-padding-md, 12px 16px);
}
&_lg &__cell {
- padding: 16px;
- font-size: var(--ty-font-size-lg);
+ padding: var(--ty-table-cell-padding-lg, 16px);
+ font-size: var(--ty-table-font-size-lg, var(--ty-font-size-lg));
}
- // Sticky header for virtual scroll
&__thead_sticky {
position: sticky;
top: 0;
z-index: 2;
}
- // Spacer rows for virtual scroll
&__row_spacer td {
padding: 0 !important;
border: 0 !important;
}
- // Header
&__thead {
.#{$prefix}-table__cell {
background: var(--ty-table-header-bg);
- font-weight: 500;
+ font-weight: var(--ty-table-header-font-weight, 500);
border-bottom: 1px solid var(--ty-table-border);
}
}
- // Cells
&__cell {
text-align: left;
vertical-align: middle;
@@ -69,7 +64,7 @@
user-select: none;
&:hover {
- background: var(--ty-table-hover);
+ background: var(--ty-table-cell-sortable-hover-bg, var(--ty-table-row-hover-bg));
}
}
@@ -89,27 +84,24 @@
}
}
- // Rows
&__tbody &__row {
border-bottom: 1px solid var(--ty-table-border);
transition: background 0.2s;
&:hover {
- background: var(--ty-table-hover);
+ background: var(--ty-table-row-hover-bg);
}
&_selected {
- background: var(--ty-table-selected-bg);
+ background: var(--ty-table-row-selected-bg);
}
}
- // Selection column
&__selection-col {
- width: 40px;
+ width: var(--ty-table-selection-column-width, 40px);
text-align: center;
}
- // Sorter
&__col-title {
display: inline;
}
@@ -117,27 +109,25 @@
&__sorter {
display: inline-flex;
flex-direction: column;
- margin-left: 4px;
+ margin-left: var(--ty-table-sorter-gap, 4px);
vertical-align: middle;
line-height: 1;
}
&__sorter-icon {
- font-size: 8px;
- line-height: 8px;
- color: var(--ty-color-text-quaternary);
+ font-size: var(--ty-table-sorter-icon-size, 8px);
+ line-height: var(--ty-table-sorter-icon-size, 8px);
+ color: var(--ty-table-sorter-icon-color, var(--ty-color-text-quaternary));
&_active {
- color: var(--ty-color-primary);
+ color: var(--ty-table-sorter-icon-color-active, var(--ty-color-primary));
}
}
- // Empty & loading
&__empty-cell,
&__loading-cell {
text-align: center;
- padding: 32px !important;
- color: var(--ty-color-text-secondary);
+ padding: var(--ty-table-empty-padding, 32px) !important;
+ color: var(--ty-table-empty-color, var(--ty-color-text-secondary));
}
-
}
diff --git a/packages/react/src/tabs/style/index.scss b/packages/react/src/tabs/style/index.scss
index a8161dab..81587687 100644
--- a/packages/react/src/tabs/style/index.scss
+++ b/packages/react/src/tabs/style/index.scss
@@ -4,15 +4,14 @@ $tab-prefix: #{$prefix}-tabs;
.#{$tab-prefix} {
position: relative;
- font-size: 14px;
- color: var(--ty-color-text);
+ font-size: var(--ty-tabs-font-size, var(--ty-font-size-base));
+ color: var(--ty-tabs-color, var(--ty-color-text));
- // ---- Nav ----
&__nav {
display: flex;
align-items: center;
position: relative;
- margin-bottom: 16px;
+ margin-bottom: var(--ty-tabs-nav-margin, 16px);
&::before {
content: '';
@@ -20,7 +19,7 @@ $tab-prefix: #{$prefix}-tabs;
bottom: 0;
left: 0;
right: 0;
- border-bottom: 1px solid var(--ty-tabs-border);
+ border-bottom: 1px solid var(--ty-tabs-border, var(--ty-color-fill-tertiary));
}
}
@@ -36,65 +35,63 @@ $tab-prefix: #{$prefix}-tabs;
transition: transform 0.3s;
}
- // ---- Tab ----
&__tab {
display: flex;
align-items: center;
- padding: 12px 0;
- margin: 0 32px 0 0;
+ padding: var(--ty-tabs-tab-padding-block-md, 12px) 0;
+ margin: 0 var(--ty-tabs-tab-gap, 32px) 0 0;
cursor: pointer;
position: relative;
white-space: nowrap;
user-select: none;
+ color: var(--ty-tabs-tab-color, var(--ty-color-text));
transition: color 0.3s;
&:hover {
- color: var(--ty-color-primary-text-hover);
+ color: var(--ty-tabs-tab-hover-color, var(--ty-color-primary-text-hover));
}
&_active {
- color: var(--ty-color-primary);
- font-weight: 500;
+ color: var(--ty-tabs-tab-active-color, var(--ty-color-primary));
+ font-weight: var(--ty-tabs-tab-active-font-weight, 500);
}
&_disabled {
- color: var(--ty-color-text-quaternary);
+ color: var(--ty-tabs-tab-disabled-color, var(--ty-color-text-quaternary));
cursor: not-allowed;
&:hover {
- color: var(--ty-color-text-quaternary);
+ color: var(--ty-tabs-tab-disabled-color, var(--ty-color-text-quaternary));
}
}
&-icon {
- margin-right: 8px;
+ margin-right: var(--ty-tabs-icon-gap, 8px);
}
&-remove {
- margin-left: 8px;
- font-size: 12px;
- color: var(--ty-color-text-tertiary);
+ margin-left: var(--ty-tabs-remove-gap, 8px);
+ font-size: var(--ty-tabs-remove-font-size, 12px);
+ color: var(--ty-tabs-remove-color, var(--ty-color-text-tertiary));
cursor: pointer;
transition: color 0.3s;
&:hover {
- color: var(--ty-color-text);
+ color: var(--ty-tabs-remove-color-hover, var(--ty-color-text));
}
}
}
- // ---- Ink bar ----
&__ink-bar {
position: absolute;
bottom: 0;
- height: 2px;
- background: var(--ty-color-primary);
+ height: var(--ty-tabs-ink-bar-height, 2px);
+ background: var(--ty-tabs-ink-bar-color, var(--ty-color-primary));
transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
pointer-events: none;
}
- // ---- Content ----
&__content {
position: relative;
overflow: hidden;
@@ -128,29 +125,28 @@ $tab-prefix: #{$prefix}-tabs;
}
}
- // ---- Scroll nav ----
&__nav-prev,
&__nav-next {
display: flex;
align-items: center;
justify-content: center;
- width: 32px;
+ width: var(--ty-tabs-nav-button-size, 32px);
height: 100%;
background: transparent;
border: none;
cursor: pointer;
- font-size: 16px;
- color: var(--ty-color-text-tertiary);
+ font-size: var(--ty-tabs-nav-button-font-size, 16px);
+ color: var(--ty-tabs-nav-button-color, var(--ty-color-text-tertiary));
transition: color 0.3s;
flex-shrink: 0;
&:hover {
- color: var(--ty-color-text);
+ color: var(--ty-tabs-nav-button-color-hover, var(--ty-color-text));
}
}
&__nav-btn_disabled {
- color: var(--ty-color-text-quaternary);
+ color: var(--ty-tabs-nav-button-color-disabled, var(--ty-color-text-quaternary));
cursor: not-allowed;
}
@@ -158,25 +154,24 @@ $tab-prefix: #{$prefix}-tabs;
display: flex;
align-items: center;
justify-content: center;
- width: 32px;
- height: 32px;
+ width: var(--ty-tabs-add-size, 32px);
+ height: var(--ty-tabs-add-size, 32px);
background: transparent;
- border: 1px dashed var(--ty-color-border);
- border-radius: 4px;
+ border: 1px dashed var(--ty-tabs-add-border-color, var(--ty-color-border));
+ border-radius: var(--ty-tabs-add-radius, 4px);
cursor: pointer;
- font-size: 14px;
- color: var(--ty-color-text-tertiary);
- margin-left: 4px;
+ font-size: var(--ty-tabs-add-font-size, 14px);
+ color: var(--ty-tabs-add-color, var(--ty-color-text-tertiary));
+ margin-left: var(--ty-tabs-add-margin, 4px);
flex-shrink: 0;
transition: all 0.3s;
&:hover {
- color: var(--ty-color-primary);
- border-color: var(--ty-color-primary);
+ color: var(--ty-tabs-add-color-hover, var(--ty-color-primary));
+ border-color: var(--ty-tabs-add-border-color-hover, var(--ty-color-primary));
}
}
- // ---- Extra content ----
&__nav-extra_left,
&__nav-extra_right {
display: flex;
@@ -185,43 +180,41 @@ $tab-prefix: #{$prefix}-tabs;
}
&__nav-extra_left {
- margin-right: 16px;
+ margin-right: var(--ty-tabs-extra-gap, 16px);
}
&__nav-extra_right {
- margin-left: 16px;
+ margin-left: var(--ty-tabs-extra-gap, 16px);
}
- // ---- Sizes ----
&_sm &__tab {
- padding: 8px 0;
- font-size: 13px;
+ padding: var(--ty-tabs-tab-padding-block-sm, 8px) 0;
+ font-size: var(--ty-tabs-size-sm, 13px);
}
&_lg &__tab {
- padding: 16px 0;
- font-size: 15px;
+ padding: var(--ty-tabs-tab-padding-block-lg, 16px) 0;
+ font-size: var(--ty-tabs-size-lg, 15px);
}
- // ---- Card type ----
&_card,
&_editable-card {
.#{$tab-prefix}__tab {
- padding: 8px 16px;
+ padding: var(--ty-tabs-card-padding-block, 8px) var(--ty-tabs-card-padding-inline, 16px);
margin: 0;
- background: var(--ty-tabs-card-bg);
- border: 1px solid var(--ty-tabs-border);
+ background: var(--ty-tabs-card-bg, var(--ty-color-fill));
+ border: 1px solid var(--ty-tabs-border, var(--ty-color-fill-tertiary));
border-bottom: none;
- border-radius: 4px 4px 0 0;
+ border-radius: var(--ty-tabs-card-radius, 4px) var(--ty-tabs-card-radius, 4px) 0 0;
transition: all 0.3s;
& + .#{$tab-prefix}__tab {
- margin-left: 2px;
+ margin-left: var(--ty-tabs-card-gap, 2px);
}
&_active {
- background: var(--ty-tabs-card-active-bg);
- border-bottom-color: var(--ty-tabs-card-active-bg);
+ background: var(--ty-tabs-card-active-bg, var(--ty-color-bg-container));
+ border-bottom-color: var(--ty-tabs-card-active-bg, var(--ty-color-bg-container));
}
}
@@ -231,19 +224,17 @@ $tab-prefix: #{$prefix}-tabs;
}
&_editable-card .#{$tab-prefix}__tab {
- padding-right: 8px;
+ padding-right: var(--ty-tabs-card-padding-inline-editable-end, 8px);
}
- // ---- Centered ----
&_centered .#{$tab-prefix}__nav-list {
justify-content: center;
}
- // ---- Positions ----
&_bottom {
.#{$tab-prefix}__nav {
margin-bottom: 0;
- margin-top: 16px;
+ margin-top: var(--ty-tabs-nav-margin, 16px);
&::before {
top: 0;
@@ -264,15 +255,16 @@ $tab-prefix: #{$prefix}-tabs;
.#{$tab-prefix}__nav {
flex-direction: column;
margin-bottom: 0;
- min-width: 60px;
&::before {
- display: none;
+ inset: 0 0 0 auto;
+ border-bottom: none;
+ border-right: 1px solid var(--ty-tabs-border, var(--ty-color-fill-tertiary));
}
}
.#{$tab-prefix}__nav-wrap {
- overflow: visible;
+ flex: none;
}
.#{$tab-prefix}__nav-list {
@@ -280,45 +272,43 @@ $tab-prefix: #{$prefix}-tabs;
}
.#{$tab-prefix}__tab {
- margin: 0 0 4px;
- padding: 8px 24px;
+ margin: 0;
+ padding-right: var(--ty-tabs-tab-gap, 32px);
}
.#{$tab-prefix}__ink-bar {
- width: 2px;
+ width: var(--ty-tabs-ink-bar-height, 2px);
height: auto;
top: 0;
+ right: 0;
bottom: auto;
}
-
- .#{$tab-prefix}__content {
- flex: 1;
- }
-
- .#{$tab-prefix}__content-inner {
- display: block;
- }
}
&_left {
- .#{$tab-prefix}__nav {
- margin-right: 24px;
- border-right: 1px solid var(--ty-tabs-border);
- }
-
- .#{$tab-prefix}__ink-bar {
- right: 0;
+ .#{$tab-prefix}__content {
+ padding-left: var(--ty-tabs-nav-margin, 16px);
}
}
&_right {
+ flex-direction: row-reverse;
+
.#{$tab-prefix}__nav {
- order: 1;
- margin-left: 24px;
- border-left: 1px solid var(--ty-tabs-border);
+ &::before {
+ right: auto;
+ left: 0;
+ border-right: none;
+ border-left: 1px solid var(--ty-tabs-border, var(--ty-color-fill-tertiary));
+ }
+ }
+
+ .#{$tab-prefix}__content {
+ padding-right: var(--ty-tabs-nav-margin, 16px);
}
.#{$tab-prefix}__ink-bar {
+ right: auto;
left: 0;
}
}
diff --git a/packages/react/src/tag/style/_index.scss b/packages/react/src/tag/style/index.scss
old mode 100755
new mode 100644
similarity index 75%
rename from packages/react/src/tag/style/_index.scss
rename to packages/react/src/tag/style/index.scss
index 7a2beb2b..75f4a913
--- a/packages/react/src/tag/style/_index.scss
+++ b/packages/react/src/tag/style/index.scss
@@ -2,22 +2,21 @@
$tag-preset-colors: 'magenta', 'red', 'volcano', 'orange', 'gold', 'lime', 'green', 'cyan', 'blue',
'geekblue', 'purple';
-$tag-status-colors: success, info, warning, danger;
.#{$prefix}-tag {
user-select: none;
display: none;
- margin-right: 8px;
- padding: 3px 7px;
- font-size: 12px;
- border: 1px solid var(--ty-tag-border);
- border-radius: var(--ty-border-radius);
- color: var(--ty-color-text);
- background: var(--ty-tag-bg);
+ margin-right: var(--ty-tag-margin-inline-end, 8px);
+ padding: var(--ty-tag-padding, 3px 7px);
+ font-size: var(--ty-tag-font-size, 12px);
+ border: 1px solid var(--ty-tag-border, var(--ty-color-border));
+ border-radius: var(--ty-tag-radius, var(--ty-border-radius));
+ color: var(--ty-tag-color, var(--ty-color-text));
+ background: var(--ty-tag-bg, var(--ty-color-fill));
a,
a:hover {
- color: var(--ty-color-text-secondary);
+ color: var(--ty-tag-link-color, var(--ty-color-text-secondary));
}
&_visible {
@@ -26,10 +25,10 @@ $tag-status-colors: success, info, warning, danger;
&__close-btn {
cursor: pointer;
- font-size: 10px;
- margin-left: 5px;
+ font-size: var(--ty-tag-close-font-size, 10px);
+ margin-left: var(--ty-tag-close-gap, 5px);
line-height: 1;
- transition: all 300ms;
+ transition: all var(--ty-tag-transition-duration, 300ms);
background: none;
border: none;
padding: 0;
@@ -37,11 +36,10 @@ $tag-status-colors: success, info, warning, danger;
font-family: inherit;
&:hover {
- opacity: 0.8;
+ opacity: var(--ty-tag-close-opacity-hover, 0.8);
}
}
- // ============= Preset colors: filled (default) =============
@each $color in $tag-preset-colors {
&_#{$color} {
color: var(--ty-tag-#{$color}-color);
@@ -50,7 +48,6 @@ $tag-status-colors: success, info, warning, danger;
}
}
- // ============= Status colors: filled (default) =============
&_success {
color: var(--ty-color-success);
background: var(--ty-color-success-bg);
@@ -75,7 +72,6 @@ $tag-status-colors: success, info, warning, danger;
border-color: var(--ty-color-danger-border);
}
- // ============= Preset colors: soft =============
@each $color in $tag-preset-colors {
&_#{$color}-soft {
color: var(--ty-tag-#{$color}-color);
@@ -84,7 +80,6 @@ $tag-status-colors: success, info, warning, danger;
}
}
- // ============= Status colors: soft =============
&_success-soft {
color: var(--ty-color-success);
background: var(--ty-color-success-bg);
@@ -109,7 +104,6 @@ $tag-status-colors: success, info, warning, danger;
border-color: transparent;
}
- // ============= Preset colors: solid =============
@each $color in $tag-preset-colors {
&_#{$color}-solid {
color: #fff;
@@ -118,7 +112,6 @@ $tag-status-colors: success, info, warning, danger;
}
}
- // ============= Status colors: solid =============
&_success-solid {
color: #fff;
background: var(--ty-color-success);
@@ -143,7 +136,6 @@ $tag-status-colors: success, info, warning, danger;
border-color: var(--ty-color-danger);
}
- // ============= Preset colors: outlined =============
@each $color in $tag-preset-colors {
&_#{$color}-outlined {
color: var(--ty-tag-#{$color}-color);
@@ -152,7 +144,6 @@ $tag-status-colors: success, info, warning, danger;
}
}
- // ============= Status colors: outlined =============
&_success-outlined {
color: var(--ty-color-success);
background: transparent;
@@ -179,15 +170,15 @@ $tag-status-colors: success, info, warning, danger;
}
.#{$prefix}-checkable-tag {
- background-color: var(--ty-tag-checkable-bg);
- color: var(--ty-color-primary);
- border-color: var(--ty-tag-checkable-bg);
- transition: all 300ms;
+ background-color: var(--ty-tag-checkable-bg, var(--ty-color-bg-container));
+ color: var(--ty-tag-checkable-color, var(--ty-color-primary));
+ border-color: var(--ty-tag-checkable-border, var(--ty-color-bg-container));
+ transition: all var(--ty-tag-transition-duration, 300ms);
cursor: pointer;
&_checked {
- background-color: var(--ty-color-primary);
- color: #fff;
- border-color: var(--ty-color-primary);
+ background-color: var(--ty-tag-checkable-bg-checked, var(--ty-color-primary));
+ color: var(--ty-tag-checkable-color-checked, #fff);
+ border-color: var(--ty-tag-checkable-border-checked, var(--ty-color-primary));
}
}
diff --git a/packages/react/src/text-loop/style/_index.scss b/packages/react/src/text-loop/style/index.scss
similarity index 100%
rename from packages/react/src/text-loop/style/_index.scss
rename to packages/react/src/text-loop/style/index.scss
diff --git a/packages/react/src/text-loop/style/index.tsx b/packages/react/src/text-loop/style/index.tsx
index dca5d2a0..67aac616 100644
--- a/packages/react/src/text-loop/style/index.tsx
+++ b/packages/react/src/text-loop/style/index.tsx
@@ -1 +1 @@
-import './_index.scss';
+import './index.scss';
diff --git a/packages/react/src/textarea/style/_index.scss b/packages/react/src/textarea/style/index.scss
similarity index 58%
rename from packages/react/src/textarea/style/_index.scss
rename to packages/react/src/textarea/style/index.scss
index 76dc778f..d80ccba4 100755
--- a/packages/react/src/textarea/style/_index.scss
+++ b/packages/react/src/textarea/style/index.scss
@@ -4,7 +4,7 @@
.#{$prefix}-textarea {
@include input-default;
- padding: $textarea-padding;
+ padding: var(--ty-textarea-padding);
overflow: hidden;
&_disabled {
@@ -15,13 +15,13 @@
position: relative;
.#{$prefix}-textarea {
- padding-bottom: 20px;
+ padding-bottom: var(--ty-textarea-padding-bottom-with-counter);
&__counter {
position: absolute;
- bottom: 6px;
- right: 6px;
- font-size: 14px;
+ bottom: var(--ty-textarea-counter-offset-bottom);
+ right: var(--ty-textarea-counter-offset-inline-end);
+ font-size: var(--ty-textarea-counter-font-size);
color: var(--ty-textarea-counter-color);
}
}
diff --git a/packages/react/src/time-picker/style/_index.scss b/packages/react/src/time-picker/style/index.scss
similarity index 50%
rename from packages/react/src/time-picker/style/_index.scss
rename to packages/react/src/time-picker/style/index.scss
index 07053d7e..89e04996 100755
--- a/packages/react/src/time-picker/style/_index.scss
+++ b/packages/react/src/time-picker/style/index.scss
@@ -5,32 +5,32 @@ $tp: #{$prefix}-time-picker;
.#{$tp} {
display: inline-flex;
position: relative;
- font-size: var(--ty-font-size-base);
+ font-size: var(--ty-picker-input-font-size);
// ---- Input ----
&__input {
display: inline-flex;
align-items: center;
width: 100%;
- padding: 4px 11px;
- border: 1px solid var(--ty-input-border);
- border-radius: 6px;
+ padding: var(--ty-picker-input-padding-md);
+ border: 1px solid var(--ty-picker-input-border);
+ border-radius: var(--ty-picker-input-radius);
background: var(--ty-picker-input-bg);
cursor: pointer;
transition: border-color 0.3s, box-shadow 0.3s;
&:hover {
- border-color: var(--ty-color-primary);
+ border-color: var(--ty-picker-input-border-hover);
}
}
&_open &__input {
- border-color: var(--ty-color-primary);
- box-shadow: var(--ty-input-focus-shadow);
+ border-color: var(--ty-picker-input-border-focus);
+ box-shadow: var(--ty-picker-input-shadow-focus);
}
&_pending &__input-field {
- color: var(--ty-color-text-tertiary);
+ color: var(--ty-picker-input-color-muted);
}
&__input-field {
@@ -40,12 +40,12 @@ $tp: #{$prefix}-time-picker;
background: transparent;
font-size: inherit;
font-family: inherit;
- color: var(--ty-color-text);
+ color: var(--ty-picker-input-color);
cursor: pointer;
- min-width: 90px;
+ min-width: var(--ty-picker-input-min-width-time-md);
&::placeholder {
- color: var(--ty-color-text-quaternary);
+ color: var(--ty-picker-input-color-placeholder);
}
&:disabled {
@@ -58,10 +58,10 @@ $tp: #{$prefix}-time-picker;
display: inline-flex;
align-items: center;
justify-content: center;
- width: 14px;
- height: 14px;
- margin-left: 4px;
- color: var(--ty-color-text-quaternary);
+ width: var(--ty-picker-suffix-size);
+ height: var(--ty-picker-suffix-size);
+ margin-left: var(--ty-picker-suffix-gap);
+ color: var(--ty-picker-suffix-color);
}
&__icon {
@@ -75,8 +75,8 @@ $tp: #{$prefix}-time-picker;
inset: 0;
align-items: center;
justify-content: center;
- font-size: 14px;
- color: var(--ty-color-text-quaternary);
+ font-size: var(--ty-picker-suffix-size);
+ color: var(--ty-picker-clear-color);
background: var(--ty-picker-clear-bg);
cursor: pointer;
transition: color 0.2s;
@@ -84,7 +84,7 @@ $tp: #{$prefix}-time-picker;
padding: 0;
&:hover {
- color: var(--ty-color-text-tertiary);
+ color: var(--ty-picker-clear-color-hover);
}
}
@@ -94,21 +94,21 @@ $tp: #{$prefix}-time-picker;
// ---- Sizes ----
&_sm &__input {
- padding: 0 7px;
+ padding: var(--ty-picker-input-padding-sm);
font-size: 12px;
}
&_sm &__input-field {
- min-width: 70px;
+ min-width: var(--ty-picker-input-min-width-time-sm);
}
&_lg &__input {
- padding: 6px 11px;
+ padding: var(--ty-picker-input-padding-lg);
font-size: 16px;
}
&_lg &__input-field {
- min-width: 110px;
+ min-width: var(--ty-picker-input-min-width-time-lg);
}
// ---- Disabled ----
@@ -116,25 +116,25 @@ $tp: #{$prefix}-time-picker;
opacity: 0.65;
.#{$tp}__input {
- background: var(--ty-color-bg-disabled);
+ background: var(--ty-picker-input-bg-disabled);
cursor: not-allowed;
- border-color: var(--ty-input-border);
+ border-color: var(--ty-picker-input-border);
&:hover {
- border-color: var(--ty-input-border);
+ border-color: var(--ty-picker-input-border);
}
}
.#{$tp}__input-field {
- color: var(--ty-color-text-quaternary);
+ color: var(--ty-picker-cell-color-muted);
}
}
// ---- Dropdown ----
&__dropdown {
background: var(--ty-picker-dropdown-bg);
- border-radius: 8px;
- box-shadow: var(--ty-shadow-popup);
+ border-radius: var(--ty-picker-dropdown-radius);
+ box-shadow: var(--ty-picker-dropdown-shadow);
overflow: hidden;
}
@@ -145,9 +145,9 @@ $tp: #{$prefix}-time-picker;
&__column {
flex: 1;
- max-height: 224px;
+ max-height: var(--ty-picker-time-column-max-height);
overflow-y: auto;
- border-left: 1px solid var(--ty-color-border-light);
+ border-left: 1px solid var(--ty-picker-time-column-border);
scrollbar-width: thin;
&:first-child {
@@ -159,14 +159,14 @@ $tp: #{$prefix}-time-picker;
}
&::-webkit-scrollbar-thumb {
- background: var(--ty-color-text-quaternary);
+ background: var(--ty-picker-time-scrollbar-thumb);
border-radius: 2px;
}
}
&__column-list {
list-style: none;
- padding: 4px 0;
+ padding: var(--ty-picker-time-cell-padding);
margin: 0;
}
@@ -174,11 +174,11 @@ $tp: #{$prefix}-time-picker;
&__cell {
padding: 4px 0;
text-align: center;
- min-width: 52px;
+ min-width: var(--ty-picker-time-cell-min-width);
cursor: pointer;
- border-radius: 4px;
- margin: 0 4px;
- line-height: 20px;
+ border-radius: var(--ty-picker-time-cell-radius);
+ margin: 0 var(--ty-picker-time-cell-margin-inline);
+ line-height: var(--ty-picker-time-cell-line-height);
transition: background 0.2s;
user-select: none;
@@ -187,25 +187,25 @@ $tp: #{$prefix}-time-picker;
}
&_selected {
- background: var(--ty-color-primary-bg);
+ background: var(--ty-picker-time-cell-bg-selected);
font-weight: 500;
&:hover {
- background: var(--ty-color-primary-bg-hover);
+ background: var(--ty-picker-time-cell-bg-selected-hover);
}
}
&_pending {
- background: var(--ty-color-primary-bg);
- color: var(--ty-color-text-tertiary);
+ background: var(--ty-picker-time-cell-bg-selected);
+ color: var(--ty-picker-input-color-muted);
&:hover {
- background: var(--ty-color-primary-bg-hover);
+ background: var(--ty-picker-time-cell-bg-selected-hover);
}
}
&_disabled {
- color: var(--ty-color-text-quaternary);
+ color: var(--ty-picker-cell-color-muted);
cursor: not-allowed;
&:hover {
@@ -216,9 +216,9 @@ $tp: #{$prefix}-time-picker;
// ---- Footer ----
&__footer {
- padding: 8px 12px;
- border-top: 1px solid var(--ty-color-border-light);
- font-size: 12px;
+ padding: var(--ty-picker-footer-padding);
+ border-top: 1px solid var(--ty-picker-header-border);
+ font-size: var(--ty-picker-footer-font-size);
}
&__extra-footer {
@@ -233,21 +233,21 @@ $tp: #{$prefix}-time-picker;
}
&__now-btn {
- color: var(--ty-color-primary);
+ color: var(--ty-picker-today-color);
cursor: pointer;
- &:hover { color: var(--ty-color-primary-hover); }
+ &:hover { color: var(--ty-picker-today-color-hover); }
}
&__ok-btn {
- padding: 0 8px;
- height: 24px;
- font-size: 12px;
+ padding: var(--ty-picker-ok-button-padding);
+ height: var(--ty-picker-ok-button-height);
+ font-size: var(--ty-picker-ok-button-font-size);
border: none;
- border-radius: 4px;
- background: var(--ty-color-primary);
- color: #fff;
+ border-radius: var(--ty-picker-ok-button-radius);
+ background: var(--ty-picker-ok-button-bg);
+ color: var(--ty-picker-ok-button-color);
cursor: pointer;
margin-left: auto;
- &:hover { background: var(--ty-color-primary-hover); }
+ &:hover { background: var(--ty-picker-ok-button-bg-hover); }
}
}
diff --git a/packages/react/src/timeline/style/_index.scss b/packages/react/src/timeline/style/index.scss
similarity index 75%
rename from packages/react/src/timeline/style/_index.scss
rename to packages/react/src/timeline/style/index.scss
index ce1205a6..9f0c83ff 100755
--- a/packages/react/src/timeline/style/_index.scss
+++ b/packages/react/src/timeline/style/index.scss
@@ -2,8 +2,8 @@
.#{$prefix}-timeline {
box-sizing: border-box;
- color: var(--ty-color-text-secondary);
- font-size: var(--ty-font-size-base);
+ color: var(--ty-timeline-color);
+ font-size: var(--ty-timeline-font-size);
line-height: 1.5;
margin: 0;
padding: 0;
@@ -14,8 +14,8 @@
position: relative;
box-sizing: border-box;
margin: 0;
- padding: 0 0 20px;
- font-size: 14px;
+ padding: 0 0 var(--ty-timeline-item-padding-bottom);
+ font-size: var(--ty-timeline-item-font-size);
list-style: none;
&:last-child {
@@ -30,7 +30,7 @@
width: 16px;
background-color: transparent;
position: absolute;
- color: var(--ty-color-primary);
+ color: var(--ty-timeline-head-color);
height: 100%;
&::before {
@@ -53,9 +53,9 @@
&__dot {
display: inline-block;
- width: 10px;
- height: 10px;
- border: 2px solid var(--ty-color-primary);
+ width: var(--ty-timeline-dot-size);
+ height: var(--ty-timeline-dot-size);
+ border: var(--ty-timeline-dot-border-width) solid var(--ty-timeline-dot-border-color);
border-radius: 100px;
background-color: var(--ty-color-bg);
}
@@ -63,7 +63,7 @@
&__content {
position: relative;
top: 0;
- padding-left: 25px;
+ padding-left: var(--ty-timeline-content-offset);
}
&_left,
diff --git a/packages/react/src/tooltip/style/_index.scss b/packages/react/src/tooltip/style/index.scss
similarity index 86%
rename from packages/react/src/tooltip/style/_index.scss
rename to packages/react/src/tooltip/style/index.scss
index b88a2140..e9f6e5cf 100755
--- a/packages/react/src/tooltip/style/_index.scss
+++ b/packages/react/src/tooltip/style/index.scss
@@ -1,10 +1,11 @@
@use '@tiny-design/tokens/scss/variables' as *;
.#{$prefix}-tooltip {
- font-size: var(--ty-font-size-sm);
+ font-size: var(--ty-tooltip-font-size);
+ color: var(--ty-tooltip-color);
&__inner {
- padding: $tooltip-content-padding;
+ padding: var(--ty-tooltip-content-padding);
}
.#{$prefix}-popup {
diff --git a/packages/react/src/tour/style/_index.scss b/packages/react/src/tour/style/index.scss
similarity index 100%
rename from packages/react/src/tour/style/_index.scss
rename to packages/react/src/tour/style/index.scss
diff --git a/packages/react/src/transfer/style/_index.scss b/packages/react/src/transfer/style/index.scss
similarity index 60%
rename from packages/react/src/transfer/style/_index.scss
rename to packages/react/src/transfer/style/index.scss
index c17092e9..3be9f765 100644
--- a/packages/react/src/transfer/style/_index.scss
+++ b/packages/react/src/transfer/style/index.scss
@@ -2,8 +2,8 @@
.#{$prefix}-transfer {
box-sizing: border-box;
- font-size: var(--ty-font-size-base);
- color: var(--ty-color-text);
+ font-size: var(--ty-transfer-font-size);
+ color: var(--ty-transfer-color);
&__left-arrow {
transform: rotate(-90deg);
@@ -16,14 +16,14 @@
&__buttons {
display: inline-block;
box-sizing: border-box;
- margin: 0 8px;
+ margin: var(--ty-transfer-buttons-margin);
vertical-align: middle;
.#{$prefix}-btn {
display: block;
- margin: 3px 0;
- padding: 3px;
- min-width: 30px;
+ margin: var(--ty-transfer-button-margin);
+ padding: var(--ty-transfer-button-padding);
+ min-width: var(--ty-transfer-button-min-width);
}
}
}
@@ -32,29 +32,29 @@
box-sizing: border-box;
display: inline-block;
vertical-align: middle;
- width: 180px;
+ width: var(--ty-transfer-panel-width);
border: 1px solid var(--ty-transfer-border);
- border-radius: var(--ty-border-radius);
+ border-radius: var(--ty-transfer-panel-radius);
&__header {
- padding: 8px 12px 9px;
- color: var(--ty-color-text);
+ padding: var(--ty-transfer-header-padding);
+ color: var(--ty-transfer-color);
background: var(--ty-transfer-header-bg);
border-bottom: 1px solid var(--ty-transfer-footer-border);
- border-radius: var(--ty-border-radius) var(--ty-border-radius) 0 0;
+ border-radius: var(--ty-transfer-panel-radius) var(--ty-transfer-panel-radius) 0 0;
}
&__body {
position: relative;
- padding: 6px 0;
+ padding: var(--ty-transfer-body-padding);
}
&__input-container{
- padding: 6px 12px 12px;
+ padding: var(--ty-transfer-input-container-padding);
}
&__list-container{
- height: 192px;
+ height: var(--ty-transfer-list-height);
}
&__list {
@@ -68,11 +68,11 @@
&__list-item {
box-sizing: border-box;
- padding: 0 12px;
+ padding: 0 var(--ty-transfer-item-padding-inline);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
- min-height: 32px;
+ min-height: var(--ty-transfer-item-min-height);
display: flex;
margin-right: 0;
transition: background-color 250ms;
@@ -90,9 +90,9 @@
}
&__footer {
- padding: 8px 12px 9px;
+ padding: var(--ty-transfer-footer-padding);
border-top: 1px solid var(--ty-transfer-footer-border);
background-color: var(--ty-transfer-footer-bg);
- border-radius: 0 0 var(--ty-border-radius) var(--ty-border-radius);
+ border-radius: 0 0 var(--ty-transfer-panel-radius) var(--ty-transfer-panel-radius);
}
}
diff --git a/packages/react/src/transition/style/_index.scss b/packages/react/src/transition/style/index.scss
similarity index 99%
rename from packages/react/src/transition/style/_index.scss
rename to packages/react/src/transition/style/index.scss
index 3584760b..52a4c8b8 100644
--- a/packages/react/src/transition/style/_index.scss
+++ b/packages/react/src/transition/style/index.scss
@@ -15,6 +15,5 @@
@include zoom-animation('bottom-end', scale(0, 0), scale(1, 1), right top);
@include zoom-animation('left', scale(0, 0), scale(1, 1), right center);
@include zoom-animation('right', scale(0, 0), scale(1, 1), left center);
-
@include slide-animation('down', translateY(-10px), translateY(0));
@include slide-animation('up', translateY(10px), translateY(0));
diff --git a/packages/react/src/tree/style/_index.scss b/packages/react/src/tree/style/index.scss
similarity index 75%
rename from packages/react/src/tree/style/_index.scss
rename to packages/react/src/tree/style/index.scss
index cf7bf973..8607d840 100644
--- a/packages/react/src/tree/style/_index.scss
+++ b/packages/react/src/tree/style/index.scss
@@ -4,15 +4,15 @@
margin: 0;
padding: 0;
list-style: none;
- font-size: var(--ty-font-size-base);
+ font-size: var(--ty-tree-font-size);
}
.#{$prefix}-tree-node {
- margin: 2px 0;
+ margin: var(--ty-tree-node-margin);
&__switcher {
- width: 20px;
- height: 20px;
+ width: var(--ty-tree-switcher-size);
+ height: var(--ty-tree-switcher-size);
display: flex;
justify-content: center;
align-items: center;
@@ -29,14 +29,14 @@
}
&__label {
- padding: 1px 2px;
- margin-left: -4px;
+ padding: var(--ty-tree-label-padding);
+ margin-left: var(--ty-tree-label-offset);
}
&__title {
cursor: pointer;
align-items: center;
- min-height: 24px;
+ min-height: var(--ty-tree-title-min-height);
display: inline-flex;
transition: background-color 250ms;
}
diff --git a/packages/react/src/typography/style/_index.scss b/packages/react/src/typography/style/index.scss
similarity index 83%
rename from packages/react/src/typography/style/_index.scss
rename to packages/react/src/typography/style/index.scss
index 22ac937e..f789d42e 100755
--- a/packages/react/src/typography/style/_index.scss
+++ b/packages/react/src/typography/style/index.scss
@@ -36,7 +36,7 @@ $tp-prefix: #{$prefix}-typography;
font-size: 85%;
background: var(--ty-typography-code-bg);
border: 1px solid var(--ty-typography-code-border);
- border-radius: var(--ty-border-radius);
+ border-radius: var(--ty-typography-code-radius);
}
mark {
@@ -60,9 +60,9 @@ h4.#{$tp-prefix},
h5.#{$tp-prefix},
h6.#{$tp-prefix} {
margin-top: 0;
- margin-bottom: 0.5em;
+ margin-bottom: var(--ty-typography-heading-margin-bottom);
color: var(--ty-typography-heading-color);
- font-weight: 600;
+ font-weight: var(--ty-typography-heading-font-weight);
}
h1.#{$tp-prefix} {
@@ -97,10 +97,10 @@ h6.#{$tp-prefix} {
p.#{$tp-prefix}, div.#{$tp-prefix} {
margin-top: 0;
- margin-bottom: 1em;
+ margin-bottom: var(--ty-typography-block-margin-bottom);
color: var(--ty-typography-body-color);
- font-size: var(--ty-font-size-base);
- line-height: 1.5;
+ font-size: var(--ty-typography-body-font-size);
+ line-height: var(--ty-typography-body-line-height);
}
span.#{$tp-prefix} {
diff --git a/packages/react/src/upload/style/_index.scss b/packages/react/src/upload/style/_index.scss
deleted file mode 100644
index b4fcbacd..00000000
--- a/packages/react/src/upload/style/_index.scss
+++ /dev/null
@@ -1,99 +0,0 @@
-@use '@tiny-design/tokens/scss/variables' as *;
-@use '@tiny-design/tokens/scss/animation' as *;
-
-.#{$prefix}-upload {
- display: inline-block;
- box-sizing: border-box;
- margin: 0;
- padding: 0;
- color: var(--ty-color-text);
- font-size: var(--ty-font-size-base);
- outline: 0;
-
- &__upload-list {
- list-style-type: none;
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- color: var(--ty-color-text);
- font-size: var(--ty-font-size-base);
- }
-
- &__upload-list-item {
- margin-top: 5px;
- font-size: var(--ty-font-size-base);
- transition: background-color 300ms;
-
- &:hover {
- background-color: var(--ty-upload-item-hover-bg);
-
- .#{$prefix}-upload {
- &__upload-list-item-status {
- display: none;
- }
-
- &__upload-list-item-delete {
- display: inline-block;
- }
- }
- }
- }
-
- &__upload-list-item-container {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 4px 4px 4px 2px;
- }
-
- &__upload-list-item-name {
- flex: 1;
- display: inline-block;
- margin-left: 5px;
- color: var(--ty-color-text);
- width: 100%;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
-
- &__upload-list-item-delete {
- display: none;
- padding-right: 3px;
- cursor: pointer;
- }
-
- &__upload-list-item-status,
- &__upload-list-item-delete {
- height: 16px;
- }
-
- &__tip {
- font-size: 12px;
- color: var(--ty-color-text-tertiary);
- margin-top: 7px;
- }
-
- &__dragger-cover {
- position: relative;
- padding: 15px;
- width: 100%;
- height: 100%;
- text-align: center;
- background: var(--ty-upload-dragger-bg);
- border: 1px dashed var(--ty-upload-dragger-border);
- border-radius: var(--ty-border-radius);
- cursor: pointer;
- transition: border-color 300ms, background-color 300ms;
-
- &:hover:not(&_disabled),
- &_dragover {
- background-color: var(--ty-upload-dragger-hover-bg);
- border-color: var(--ty-color-primary);
- }
-
- &_disabled {
- cursor: not-allowed;
- }
- }
-}
diff --git a/packages/react/src/upload/style/index.scss b/packages/react/src/upload/style/index.scss
new file mode 100644
index 00000000..fe6c27b2
--- /dev/null
+++ b/packages/react/src/upload/style/index.scss
@@ -0,0 +1,101 @@
+@use '@tiny-design/tokens/scss/variables' as *;
+@use '@tiny-design/tokens/scss/animation' as *;
+
+.#{$prefix}-upload {
+ display: inline-block;
+ box-sizing: border-box;
+ margin: 0;
+ padding: 0;
+ color: var(--ty-upload-color, var(--ty-color-text));
+ font-size: var(--ty-upload-font-size, var(--ty-font-size-base));
+ outline: 0;
+
+ &__upload-list {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ color: var(--ty-upload-color, var(--ty-color-text));
+ font-size: var(--ty-upload-font-size, var(--ty-font-size-base));
+ }
+
+ &__upload-list-item {
+ margin-top: var(--ty-upload-list-item-margin-top, 5px);
+ font-size: var(--ty-upload-font-size, var(--ty-font-size-base));
+ transition: background-color var(--ty-upload-transition-duration, 300ms);
+
+ &:hover {
+ background-color: var(--ty-upload-list-item-hover-bg, var(--ty-color-fill-secondary));
+
+ .#{$prefix}-upload {
+ &__upload-list-item-status {
+ display: none;
+ }
+
+ &__upload-list-item-delete {
+ display: inline-block;
+ }
+ }
+ }
+ }
+
+ &__upload-list-item-container {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: var(--ty-upload-list-item-padding, 4px 4px 4px 2px);
+ }
+
+ &__upload-list-item-name {
+ flex: 1;
+ display: inline-block;
+ margin-left: var(--ty-upload-list-item-name-gap, 5px);
+ color: var(--ty-upload-color, var(--ty-color-text));
+ width: 100%;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+
+ &__upload-list-item-delete {
+ display: none;
+ padding-right: var(--ty-upload-list-item-delete-padding-end, 3px);
+ cursor: pointer;
+ }
+
+ &__upload-list-item-status,
+ &__upload-list-item-delete {
+ height: var(--ty-upload-status-size, 16px);
+ }
+
+ &__tip {
+ font-size: var(--ty-upload-tip-font-size, 12px);
+ color: var(--ty-upload-tip-color, var(--ty-color-text-tertiary));
+ margin-top: var(--ty-upload-tip-margin-top, 7px);
+ }
+
+ &__dragger-cover {
+ position: relative;
+ padding: var(--ty-upload-dragger-padding, 15px);
+ width: 100%;
+ height: 100%;
+ text-align: center;
+ background: var(--ty-upload-dragger-bg, var(--ty-color-fill));
+ border: 1px dashed var(--ty-upload-dragger-border, var(--ty-color-border));
+ border-radius: var(--ty-upload-dragger-radius, var(--ty-border-radius));
+ cursor: pointer;
+ transition:
+ border-color var(--ty-upload-transition-duration, 300ms),
+ background-color var(--ty-upload-transition-duration, 300ms);
+
+ &:hover:not(&_disabled),
+ &_dragover {
+ background-color: var(--ty-upload-dragger-hover-bg, #efefef);
+ border-color: var(--ty-upload-dragger-border-hover, var(--ty-color-primary));
+ }
+
+ &_disabled {
+ cursor: not-allowed;
+ }
+ }
+}
diff --git a/packages/react/src/waterfall/style/_index.scss b/packages/react/src/waterfall/style/index.scss
similarity index 100%
rename from packages/react/src/waterfall/style/_index.scss
rename to packages/react/src/waterfall/style/index.scss
diff --git a/packages/react/src/waterfall/style/index.tsx b/packages/react/src/waterfall/style/index.tsx
index dca5d2a0..67aac616 100644
--- a/packages/react/src/waterfall/style/index.tsx
+++ b/packages/react/src/waterfall/style/index.tsx
@@ -1 +1 @@
-import './_index.scss';
+import './index.scss';
diff --git a/packages/react/src/with-spin/style/_index.scss b/packages/react/src/with-spin/style/index.scss
similarity index 100%
rename from packages/react/src/with-spin/style/_index.scss
rename to packages/react/src/with-spin/style/index.scss
diff --git a/packages/tokens/.gitignore b/packages/tokens/.gitignore
index 9798131c..d232d154 100644
--- a/packages/tokens/.gitignore
+++ b/packages/tokens/.gitignore
@@ -1 +1,2 @@
css/
+dist/
diff --git a/packages/tokens/CHANGELOG.md b/packages/tokens/CHANGELOG.md
index 7e1cb36d..39e19163 100644
--- a/packages/tokens/CHANGELOG.md
+++ b/packages/tokens/CHANGELOG.md
@@ -7,9 +7,9 @@
- Migrate component styles from SCSS variables to CSS custom properties (`--ty-*`) for better runtime theming support. - [#90](https://github.com/wangdicoder/tiny-design/pull/90) [`49b4bfc`](https://github.com/wangdicoder/tiny-design/commit/49b4bfcba6c9536a966ba5b5a64e53b56a25da76)
- Migrate ~80 structural SCSS constants (padding, sizing, transitions) to runtime-customizable CSS custom properties
- Tokenize hardcoded values in Button, Input, Card, Select, and Notification components
- - Add component-scoped CSS variable fallback chains (e.g., `--ty-btn-border-radius` falls back to `--ty-border-radius`)
- - Add `ThemeConfig` API to `ConfigProvider` for programmatic token and component-level overrides
- - Three-level customization: global tokens, component tokens, and scoped instance overrides via CSS
+ - Introduce component-scoped v2 CSS variables such as `--ty-button-radius` and `--ty-card-header-padding`
+ - Add `ThemeConfig` support in `ConfigProvider` for semantic and component token overrides
+ - Support global token overrides, component token overrides, and scoped instance overrides via CSS variables
## 1.8.0
diff --git a/packages/tokens/REGISTRY_SPEC.md b/packages/tokens/REGISTRY_SPEC.md
new file mode 100644
index 00000000..23989f91
--- /dev/null
+++ b/packages/tokens/REGISTRY_SPEC.md
@@ -0,0 +1,140 @@
+# Token Registry Spec
+
+## Purpose
+The token registry is the canonical machine-readable index of all supported v2 tokens. It is generated from JSON token sources and consumed by:
+
+- Theme Studio
+- theme validation
+- docs generation
+- migration tooling
+
+The registry is metadata, not a theme document. It describes what tokens exist, how they map to CSS variables, and what fallback behavior they expect.
+
+## Output Location
+The build step should generate:
+
+- `packages/tokens/dist/registry.json`
+- `packages/tokens/dist/registry.d.ts`
+
+## Top-level Shape
+
+```json
+{
+ "version": 1,
+ "generatedAt": "2026-04-06T10:00:00.000Z",
+ "tokens": []
+}
+```
+
+## Token Entry Shape
+
+```json
+{
+ "key": "button.bg.primary",
+ "cssVar": "--ty-button-bg-primary",
+ "category": "component",
+ "component": "button",
+ "type": "color",
+ "group": "Button",
+ "description": "Primary button background color.",
+ "source": "source/components/button.json",
+ "defaultValue": "{color-primary}",
+ "fallback": "--ty-color-primary",
+ "status": "active"
+}
+```
+
+## Required Fields
+- `key`
+- `cssVar`
+- `category`
+- `type`
+- `source`
+- `status`
+
+## Field Definitions
+- `key`
+ Stable token id in dot notation with kebab-case segments.
+ Examples: `color-primary`, `button.bg.primary`, `card.header-padding`
+- `cssVar`
+ Public runtime CSS variable name.
+- `category`
+ One of: `primitive`, `semantic`, `component`
+- `component`
+ Required when `category` is `component`; omitted otherwise.
+- `type`
+ One of: `color`, `dimension`, `number`, `font-family`, `font-weight`, `line-height`, `shadow`, `duration`, `easing`, `transition`, `string`
+- `group`
+ Human-facing display group for docs and Theme Studio.
+- `description`
+ Short explanation of what the token controls.
+- `source`
+ Relative path to the token source file.
+- `defaultValue`
+ Unresolved default value from the source token document.
+- `fallback`
+ Recommended authored-SCSS fallback target. This field is guidance metadata for component authors and docs tooling; it does not mean the build step will emit an automatic fallback chain in generated CSS.
+- `status`
+ One of: `active`, `deprecated`, `internal`
+## Naming Rules
+- `key` must match the theme schema token key pattern.
+- `cssVar` must always use kebab-case.
+- `component` names must use full nouns such as `button`, `input`, `card`.
+- New entries must use the primary v2 names directly. Short prefixes like `btn`, `picker`, or `kbd` are not allowed.
+
+## Fallback Rules
+- Primitive tokens should not appear in authored component SCSS.
+- Semantic tokens usually have no registry fallback.
+- Component tokens should include the semantic fallback they are expected to use in authored SCSS.
+
+Examples:
+- `button.bg.primary` -> fallback `--ty-color-primary`
+- `button.radius` -> fallback `--ty-border-radius`
+- `card.bg` -> fallback `--ty-color-bg-container`
+
+## Status Rules
+- `active`
+ Visible in Theme Studio and allowed in theme documents.
+- `deprecated`
+ Still resolved, but hidden by default in editing UIs and marked for migration.
+- `internal`
+ Not allowed in user-authored themes.
+
+## Example Entries
+
+```json
+[
+ {
+ "key": "color-primary",
+ "cssVar": "--ty-color-primary",
+ "category": "semantic",
+ "type": "color",
+ "group": "Colors",
+ "description": "Primary brand color.",
+ "source": "source/semantic/colors.json",
+ "defaultValue": "{color.brand.500}",
+ "status": "active"
+ },
+ {
+ "key": "button.radius",
+ "cssVar": "--ty-button-radius",
+ "category": "component",
+ "component": "button",
+ "type": "dimension",
+ "group": "Button",
+ "description": "Button border radius.",
+ "source": "source/components/button.json",
+ "defaultValue": "{border-radius}",
+ "fallback": "--ty-border-radius",
+ "status": "active"
+ }
+]
+```
+
+## Validation Rules
+Build should fail when:
+
+1. Two entries share the same `key`
+2. Two entries share the same `cssVar`
+3. A `component` token is missing its `component`
+4. A `fallback` points to a CSS var not present in the registry or approved semantic baseline
diff --git a/packages/tokens/build/build-v2.js b/packages/tokens/build/build-v2.js
new file mode 100644
index 00000000..176fa06b
--- /dev/null
+++ b/packages/tokens/build/build-v2.js
@@ -0,0 +1,288 @@
+const fs = require('fs');
+const path = require('path');
+
+const ROOT = path.resolve(__dirname, '..');
+const SOURCE_DIR = path.join(ROOT, 'source');
+const DIST_DIR = path.join(ROOT, 'dist');
+const DIST_CSS_DIR = path.join(DIST_DIR, 'css');
+const REGISTRY_DTS_PATH = path.join(DIST_DIR, 'registry.d.ts');
+
+const SEMANTIC_DIR = path.join(SOURCE_DIR, 'semantic');
+const COMPONENT_DIR = path.join(SOURCE_DIR, 'components');
+const THEMES_DIR = path.join(SOURCE_DIR, 'themes');
+
+function mkdirp(dir) {
+ fs.mkdirSync(dir, { recursive: true });
+}
+
+function readJson(filePath) {
+ return JSON.parse(fs.readFileSync(filePath, 'utf8'));
+}
+
+function writeJson(filePath, value) {
+ fs.writeFileSync(filePath, JSON.stringify(value, null, 2) + '\n');
+}
+
+function removeIfExists(filePath) {
+ if (fs.existsSync(filePath)) {
+ fs.rmSync(filePath);
+ }
+}
+
+function listJsonFiles(dir) {
+ if (!fs.existsSync(dir)) return [];
+ return fs
+ .readdirSync(dir)
+ .filter((name) => name.endsWith('.json'))
+ .sort()
+ .map((name) => path.join(dir, name));
+}
+
+function tokenKeyToCssVar(key) {
+ return `--ty-${key.replace(/\./g, '-')}`;
+}
+
+function getComponentName(key) {
+ return key.includes('.') ? key.split('.')[0] : null;
+}
+
+function assert(condition, message) {
+ if (!condition) {
+ throw new Error(message);
+ }
+}
+
+function resolveTokenValue(rawValue, tokenMap, stack = []) {
+ if (typeof rawValue !== 'string') {
+ return String(rawValue);
+ }
+
+ const match = rawValue.match(/^\{([^}]+)\}$/);
+ if (!match) {
+ return rawValue;
+ }
+
+ const refKey = match[1];
+ if (stack.includes(refKey)) {
+ throw new Error(`Circular token reference detected: ${[...stack, refKey].join(' -> ')}`);
+ }
+
+ const refToken = tokenMap.get(refKey);
+ if (!refToken) {
+ throw new Error(`Unresolved token reference: ${refKey}`);
+ }
+
+ return resolveTokenValue(refToken.$value, tokenMap, [...stack, refKey]);
+}
+
+function loadTokenFiles(dir, category) {
+ return listJsonFiles(dir).flatMap((filePath) => {
+ const fileData = readJson(filePath);
+ return Object.entries(fileData).map(([key, value]) => ({
+ key,
+ ...value,
+ category,
+ source: path.relative(ROOT, filePath),
+ component: category === 'component' ? getComponentName(key) : undefined,
+ }));
+ });
+}
+
+function validateTokens(tokens) {
+ const keys = new Set();
+ const cssVars = new Set();
+
+ for (const token of tokens) {
+ assert(!keys.has(token.key), `Duplicate token key: ${token.key}`);
+ keys.add(token.key);
+
+ const cssVar = tokenKeyToCssVar(token.key);
+ assert(!cssVars.has(cssVar), `Duplicate css var: ${cssVar}`);
+ cssVars.add(cssVar);
+
+ if (token.category === 'component') {
+ assert(token.component, `Missing component name for token: ${token.key}`);
+ }
+ }
+}
+
+function loadThemes() {
+ return listJsonFiles(THEMES_DIR).map((filePath) => {
+ const fileData = readJson(filePath);
+ return {
+ source: path.relative(ROOT, filePath),
+ ...fileData,
+ };
+ });
+}
+
+function buildRegistry(tokens) {
+ return {
+ version: 1,
+ generatedAt: new Date().toISOString(),
+ tokens: tokens.map((token) => ({
+ key: token.key,
+ cssVar: tokenKeyToCssVar(token.key),
+ category: token.category,
+ ...(token.component ? { component: token.component } : {}),
+ type: token.$type,
+ group: token.component
+ ? token.component.charAt(0).toUpperCase() + token.component.slice(1)
+ : 'Semantic',
+ description: token.description || '',
+ source: token.source,
+ defaultValue: token.$value,
+ ...(token.fallback ? { fallback: token.fallback } : {}),
+ status: token.status || 'active',
+ })),
+ };
+}
+
+function buildCss(tokens, resolvedValues) {
+ const rootLines = [':root {'];
+
+ for (const token of tokens) {
+ rootLines.push(` ${tokenKeyToCssVar(token.key)}: ${resolvedValues.get(token.key)};`);
+ }
+
+ rootLines.push('}');
+ rootLines.push('');
+
+ return rootLines.join('\n');
+}
+
+function buildThemeCss(tokens, resolvedValues, overrides, selector) {
+ const lines = [`${selector} {`];
+
+ for (const token of tokens) {
+ const overrideValue = overrides[token.key];
+ const value = overrideValue !== undefined ? String(overrideValue) : resolvedValues.get(token.key);
+ lines.push(` ${tokenKeyToCssVar(token.key)}: ${value};`);
+ }
+
+ lines.push('}');
+ lines.push('');
+
+ return lines.join('\n');
+}
+
+function buildBaseThemeCss(tokens, resolvedValues, lightTheme, darkTheme) {
+ const lightOverrides = {
+ ...((lightTheme && lightTheme.tokens && lightTheme.tokens.semantic) || {}),
+ ...((lightTheme && lightTheme.tokens && lightTheme.tokens.components) || {}),
+ };
+ const darkOverrides = {
+ ...((darkTheme && darkTheme.tokens && darkTheme.tokens.semantic) || {}),
+ ...((darkTheme && darkTheme.tokens && darkTheme.tokens.components) || {}),
+ };
+
+ const parts = [];
+ parts.push(buildThemeCss(tokens, resolvedValues, lightOverrides, ':root'));
+ parts.push(buildThemeCss(tokens, resolvedValues, darkOverrides, "[data-tiny-theme='dark']"));
+ parts.push('@media (prefers-color-scheme: dark) {');
+ parts.push(buildThemeCss(tokens, resolvedValues, darkOverrides, " [data-tiny-theme='system']").trimEnd());
+ parts.push('}');
+ parts.push('');
+
+ return parts.join('\n');
+}
+
+function buildRegistryDts() {
+ return `export type TokenCategory = 'primitive' | 'semantic' | 'component';
+export type TokenType =
+ | 'color'
+ | 'dimension'
+ | 'number'
+ | 'font-family'
+ | 'font-weight'
+ | 'line-height'
+ | 'shadow'
+ | 'duration'
+ | 'easing'
+ | 'transition'
+ | 'string';
+
+export interface TokenRegistryEntry {
+ key: string;
+ cssVar: string;
+ category: TokenCategory;
+ component?: string;
+ type: TokenType;
+ group: string;
+ description: string;
+ source: string;
+ defaultValue: string | number;
+ fallback?: string;
+ status: 'active' | 'deprecated' | 'internal';
+}
+
+export interface TokenRegistryDocument {
+ version: number;
+ generatedAt: string;
+ tokens: TokenRegistryEntry[];
+}
+`;
+}
+
+function buildRuntimeTokens() {
+ console.log('Building runtime tokens...\n');
+
+ const semanticTokens = loadTokenFiles(SEMANTIC_DIR, 'semantic');
+ const componentTokens = loadTokenFiles(COMPONENT_DIR, 'component');
+ const allTokens = [...semanticTokens, ...componentTokens];
+ const themes = loadThemes();
+
+ validateTokens(allTokens);
+
+ const tokenMap = new Map(allTokens.map((token) => [token.key, token]));
+ const resolvedValues = new Map(
+ allTokens.map((token) => [token.key, resolveTokenValue(token.$value, tokenMap)])
+ );
+
+ const registry = buildRegistry(allTokens);
+ const lightTheme = themes.find((theme) => theme.meta && theme.meta.mode === 'light');
+ const darkTheme = themes.find((theme) => theme.meta && theme.meta.mode === 'dark');
+ const lightThemeOverrides = {
+ ...((lightTheme && lightTheme.tokens && lightTheme.tokens.semantic) || {}),
+ ...((lightTheme && lightTheme.tokens && lightTheme.tokens.components) || {}),
+ };
+ const darkThemeOverrides = {
+ ...((darkTheme && darkTheme.tokens && darkTheme.tokens.semantic) || {}),
+ ...((darkTheme && darkTheme.tokens && darkTheme.tokens.components) || {}),
+ };
+ const lightCss = buildThemeCss(
+ allTokens,
+ resolvedValues,
+ lightThemeOverrides,
+ ':root'
+ );
+ const darkCss = buildThemeCss(
+ allTokens,
+ resolvedValues,
+ darkThemeOverrides,
+ "[data-tiny-theme='dark']"
+ );
+ const baseCss = buildBaseThemeCss(allTokens, resolvedValues, lightTheme, darkTheme);
+
+ mkdirp(DIST_CSS_DIR);
+ removeIfExists(path.join(DIST_DIR, 'alias-map.json'));
+ removeIfExists(path.join(DIST_DIR, 'alias-map.d.ts'));
+ writeJson(path.join(DIST_DIR, 'registry.json'), registry);
+ fs.writeFileSync(path.join(DIST_CSS_DIR, 'v2-light.css'), lightCss);
+ fs.writeFileSync(path.join(DIST_CSS_DIR, 'v2-dark.css'), darkCss);
+ fs.writeFileSync(path.join(DIST_CSS_DIR, 'base.css'), baseCss);
+ fs.writeFileSync(REGISTRY_DTS_PATH, buildRegistryDts());
+
+ console.log(' dist/registry.json');
+ console.log(' dist/registry.d.ts');
+ console.log(' dist/css/v2-light.css');
+ console.log(' dist/css/v2-dark.css');
+ console.log(' dist/css/base.css');
+ console.log('\nRuntime tokens done.');
+}
+
+module.exports = { buildRuntimeTokens };
+
+if (require.main === module) {
+ buildRuntimeTokens();
+}
diff --git a/packages/tokens/package.json b/packages/tokens/package.json
index d7bb60b9..282e9ce8 100644
--- a/packages/tokens/package.json
+++ b/packages/tokens/package.json
@@ -15,18 +15,23 @@
"exports": {
".": "./css/base.css",
"./css/*": "./css/*",
- "./scss/*": "./scss/*"
+ "./scss/*": "./scss/*",
+ "./registry": "./dist/registry.json",
+ "./dist/*": "./dist/*"
},
"sideEffects": [
"**/*.css"
],
"files": [
"css",
+ "dist",
"scss"
],
"scripts": {
"build": "node scripts/build.js",
- "clean": "rimraf css"
+ "build:base-css": "node -e \"require('./scripts/build').buildBaseCss()\"",
+ "build:runtime": "node build/build-v2.js",
+ "clean": "rimraf css dist"
},
"devDependencies": {
"autoprefixer": "^10.4.4",
diff --git a/packages/tokens/scripts/build.js b/packages/tokens/scripts/build.js
index 0207c468..ad3acc0c 100644
--- a/packages/tokens/scripts/build.js
+++ b/packages/tokens/scripts/build.js
@@ -3,13 +3,14 @@ const path = require('path');
const sass = require('sass');
const postcss = require('postcss');
const autoprefixer = require('autoprefixer');
+const { buildRuntimeTokens } = require('../build/build-v2');
const ROOT = path.resolve(__dirname, '..');
const SCSS_DIR = path.join(ROOT, 'scss');
const CSS_DIR = path.join(ROOT, 'css');
-async function build() {
- console.log('Building tokens...\n');
+async function buildBaseCss() {
+ console.log('Building base CSS...\n');
// Compile scss/base.scss → css/base.css
const result = sass.compile(path.join(SCSS_DIR, 'base.scss'), {
@@ -22,10 +23,21 @@ async function build() {
fs.writeFileSync(path.join(CSS_DIR, 'base.css'), processed.css);
console.log(' css/base.css');
- console.log('\nTokens done.');
+ console.log('\nBase CSS done.');
+}
+
+async function build() {
+ console.log('Building tokens package...\n');
+ await buildBaseCss();
+ buildRuntimeTokens();
+ console.log('\nTokens package done.');
}
-build().catch((err) => {
- console.error(err);
- process.exit(1);
-});
+module.exports = { buildBaseCss, build };
+
+if (require.main === module) {
+ build().catch((err) => {
+ console.error(err);
+ process.exit(1);
+ });
+}
diff --git a/packages/tokens/scripts/sync-theme-source-from-scss.js b/packages/tokens/scripts/sync-theme-source-from-scss.js
new file mode 100644
index 00000000..966435dd
--- /dev/null
+++ b/packages/tokens/scripts/sync-theme-source-from-scss.js
@@ -0,0 +1,556 @@
+const fs = require('fs');
+const path = require('path');
+
+const ROOT = path.resolve(__dirname, '..');
+const SOURCE_DIR = path.join(ROOT, 'source');
+const SEMANTIC_DIR = path.join(SOURCE_DIR, 'semantic');
+const COMPONENT_DIR = path.join(SOURCE_DIR, 'components');
+const THEMES_DIR = path.join(SOURCE_DIR, 'themes');
+const LIGHT_THEME_PATH = path.join(ROOT, 'scss', 'themes', '_light.scss');
+const DARK_THEME_PATH = path.join(ROOT, 'scss', 'themes', '_dark.scss');
+
+const COMPONENT_PREFIX_MAP = {
+ alert: 'alert',
+ anchor: 'anchor',
+ avatar: 'avatar',
+ 'back-top': 'back-top',
+ badge: 'badge',
+ btn: 'button',
+ calendar: 'calendar',
+ card: 'card',
+ carousel: 'carousel',
+ cascader: 'cascader',
+ checkbox: 'checkbox',
+ collapse: 'collapse',
+ descriptions: 'descriptions',
+ description: 'descriptions',
+ divider: 'divider',
+ drawer: 'drawer',
+ empty: 'empty',
+ form: 'form',
+ input: 'input',
+ 'input-number': 'input-number',
+ kbd: 'keyboard',
+ keyboard: 'keyboard',
+ layout: 'layout',
+ list: 'list',
+ marquee: 'marquee',
+ menu: 'menu',
+ message: 'message',
+ modal: 'modal',
+ 'native-select': 'native-select',
+ notification: 'notification',
+ pagination: 'pagination',
+ picker: 'picker',
+ popover: 'popover',
+ popup: 'popup',
+ progress: 'progress',
+ radio: 'radio',
+ result: 'result',
+ segmented: 'segmented',
+ select: 'select',
+ skeleton: 'skeleton',
+ slider: 'slider',
+ 'speed-dial': 'speed-dial',
+ split: 'split',
+ steps: 'steps',
+ 'strength-indicator': 'strength-indicator',
+ switch: 'switch',
+ table: 'table',
+ tabs: 'tabs',
+ tag: 'tag',
+ textarea: 'textarea',
+ timeline: 'timeline',
+ tooltip: 'tooltip',
+ transfer: 'transfer',
+ tree: 'tree',
+ typography: 'typography',
+ upload: 'upload',
+};
+
+const SEMANTIC_EXACT_KEYS = new Set([
+ 'border-radius',
+ 'font-family',
+ 'font-family-monospace',
+ 'font-size-base',
+ 'font-size-lg',
+ 'font-size-sm',
+ 'font-weight',
+ 'headings-font-weight',
+ 'height-lg',
+ 'height-md',
+ 'height-sm',
+ 'line-height-base',
+ 'spacer',
+]);
+const SKIP_COMPONENT_PREFIXES = new Set(['btn', 'input', 'card']);
+
+// When multiple semantic keys share the same light+dark value pair,
+// prefer more general tokens over specific ones for component fallback matching.
+const SEMANTIC_PREFERENCE_ORDER = [
+ 'color-bg-container',
+ 'color-bg-elevated',
+ 'color-bg',
+ 'color-bg-layout',
+ 'color-bg-disabled',
+ 'color-bg-spotlight',
+ 'color-text',
+ 'color-text-secondary',
+ 'color-text-heading',
+ 'color-text-label',
+ 'color-fill',
+ 'color-fill-secondary',
+ 'color-fill-tertiary',
+ 'color-border',
+ 'color-border-secondary',
+ 'color-border-light',
+ 'color-primary',
+ 'color-primary-hover',
+ 'color-info',
+ 'color-success',
+ 'color-warning',
+ 'color-danger',
+];
+
+function getSemanticFileName(key) {
+ if (/^chart-\d+$/.test(key)) return 'charts.json';
+ if (key.startsWith('color-')) return 'colors.json';
+ if (key.startsWith('shadow-')) return 'effects.json';
+ if (
+ key.startsWith('font-') ||
+ key.startsWith('line-') ||
+ /^h[1-6]-font-size$/.test(key) ||
+ key === 'headings-font-weight'
+ ) {
+ return 'typography.json';
+ }
+ if (key === 'spacer' || key.startsWith('spacing-')) return 'spacing.json';
+ if (key === 'border-radius' || key.startsWith('height-')) return 'size.json';
+ return 'misc.json';
+}
+
+function preferredSemanticKey(existingKey, newKey) {
+ const existingRank = SEMANTIC_PREFERENCE_ORDER.indexOf(existingKey);
+ const newRank = SEMANTIC_PREFERENCE_ORDER.indexOf(newKey);
+ // Lower index = higher preference. -1 means not in the list (lowest priority).
+ if (existingRank === -1 && newRank === -1) return existingKey;
+ if (existingRank === -1) return newKey;
+ if (newRank === -1) return existingKey;
+ return newRank < existingRank ? newKey : existingKey;
+}
+
+function mkdirp(dir) {
+ fs.mkdirSync(dir, { recursive: true });
+}
+
+function readJson(filePath) {
+ return JSON.parse(fs.readFileSync(filePath, 'utf8'));
+}
+
+function writeJson(filePath, value) {
+ fs.writeFileSync(filePath, `${JSON.stringify(value, null, 2)}\n`);
+}
+
+function listJsonFiles(dir) {
+ if (!fs.existsSync(dir)) return [];
+ return fs
+ .readdirSync(dir)
+ .filter((name) => name.endsWith('.json'))
+ .sort()
+ .map((name) => path.join(dir, name));
+}
+
+function stripCommentLines(source) {
+ return source
+ .split('\n')
+ .filter((line) => !line.trim().startsWith('//'))
+ .join('\n');
+}
+
+function splitTopLevel(source, separator) {
+ const parts = [];
+ let current = '';
+ let parenDepth = 0;
+ let braceDepth = 0;
+ let bracketDepth = 0;
+ let quote = null;
+ let escape = false;
+
+ for (let i = 0; i < source.length; i += 1) {
+ const char = source[i];
+
+ if (quote) {
+ current += char;
+ if (escape) {
+ escape = false;
+ continue;
+ }
+ if (char === '\\') {
+ escape = true;
+ continue;
+ }
+ if (char === quote) {
+ quote = null;
+ }
+ continue;
+ }
+
+ if (char === '"' || char === '\'') {
+ quote = char;
+ current += char;
+ continue;
+ }
+
+ if (char === '(') parenDepth += 1;
+ if (char === ')') parenDepth -= 1;
+ if (char === '{') braceDepth += 1;
+ if (char === '}') braceDepth -= 1;
+ if (char === '[') bracketDepth += 1;
+ if (char === ']') bracketDepth -= 1;
+
+ if (
+ char === separator &&
+ parenDepth === 0 &&
+ braceDepth === 0 &&
+ bracketDepth === 0
+ ) {
+ const trimmed = current.trim();
+ if (trimmed) parts.push(trimmed);
+ current = '';
+ continue;
+ }
+
+ current += char;
+ }
+
+ const trimmed = current.trim();
+ if (trimmed) parts.push(trimmed);
+ return parts;
+}
+
+function splitEntry(entry) {
+ let parenDepth = 0;
+ let braceDepth = 0;
+ let bracketDepth = 0;
+ let quote = null;
+ let escape = false;
+
+ for (let i = 0; i < entry.length; i += 1) {
+ const char = entry[i];
+
+ if (quote) {
+ if (escape) {
+ escape = false;
+ continue;
+ }
+ if (char === '\\') {
+ escape = true;
+ continue;
+ }
+ if (char === quote) {
+ quote = null;
+ }
+ continue;
+ }
+
+ if (char === '"' || char === '\'') {
+ quote = char;
+ continue;
+ }
+
+ if (char === '(') parenDepth += 1;
+ if (char === ')') parenDepth -= 1;
+ if (char === '{') braceDepth += 1;
+ if (char === '}') braceDepth -= 1;
+ if (char === '[') bracketDepth += 1;
+ if (char === ']') bracketDepth -= 1;
+
+ if (char === ':' && parenDepth === 0 && braceDepth === 0 && bracketDepth === 0) {
+ return [entry.slice(0, i).trim(), entry.slice(i + 1).trim()];
+ }
+ }
+
+ throw new Error(`Failed to parse theme entry: ${entry}`);
+}
+
+function normalizeScssValue(rawValue) {
+ return rawValue
+ .replace(/#\{\s*([^}]+)\s*\}/g, '$1')
+ .replace(/'\s*,\s*'/g, ',')
+ .replace(/\s+/g, ' ')
+ .replace(/\s+,/g, ',')
+ .trim();
+}
+
+function parseThemeMap(filePath) {
+ const source = stripCommentLines(fs.readFileSync(filePath, 'utf8'));
+ const start = source.indexOf('(');
+ const end = source.lastIndexOf(');');
+ if (start === -1 || end === -1 || end <= start) {
+ throw new Error(`Failed to locate theme map in ${filePath}`);
+ }
+
+ const body = source.slice(start + 1, end);
+ const entries = splitTopLevel(body, ',');
+ const tokens = {};
+
+ for (const entry of entries) {
+ const [key, value] = splitEntry(entry);
+ tokens[key] = normalizeScssValue(value);
+ }
+
+ return tokens;
+}
+
+function titleCase(input) {
+ return input
+ .split('-')
+ .filter(Boolean)
+ .map((part) => part.charAt(0).toUpperCase() + part.slice(1))
+ .join(' ');
+}
+
+function cssVarForTokenKey(key) {
+ return `--ty-${key.replace(/\./g, '-')}`;
+}
+
+function isSemanticKey(key) {
+ if (key.startsWith('color-picker-')) return false;
+ if (SEMANTIC_EXACT_KEYS.has(key)) return true;
+ if (/^h[1-6]-font-size$/.test(key)) return true;
+ if (/^chart-\d+$/.test(key)) return true;
+ return (
+ key.startsWith('color-') ||
+ key.startsWith('shadow-') ||
+ key.startsWith('font-') ||
+ key.startsWith('line-') ||
+ key.startsWith('height-')
+ );
+}
+
+function inferTokenType(key, value) {
+ const lowerValue = String(value).toLowerCase();
+
+ if (key.includes('font-family')) return 'font-family';
+ if (key.includes('font-weight') || key === 'font-weight') return 'font-weight';
+ if (key.includes('line-height')) return 'line-height';
+ if (key.includes('duration')) return 'duration';
+ if (key.includes('transition')) return 'transition';
+ if (key.includes('shadow')) return 'shadow';
+
+ if (
+ lowerValue.startsWith('#') ||
+ lowerValue.startsWith('rgb') ||
+ lowerValue.startsWith('hsl') ||
+ lowerValue === 'transparent' ||
+ lowerValue === 'currentcolor'
+ ) {
+ return 'color';
+ }
+
+ if (/^-?\d+(\.\d+)?$/.test(lowerValue)) {
+ return key.includes('opacity') ? 'number' : 'string';
+ }
+
+ if (
+ /-?\d/.test(lowerValue) &&
+ /(px|rem|em|%|vh|vw|ch)$/.test(lowerValue)
+ ) {
+ return 'dimension';
+ }
+
+ if (lowerValue.startsWith('linear-gradient')) return 'string';
+
+ return 'string';
+}
+
+function inferDescription(key, category, componentName) {
+ const suffix = category === 'component' ? key.split('.').slice(1).join(' ') : key;
+ const label = suffix.replace(/-/g, ' ');
+ if (category === 'component') {
+ return `${titleCase(componentName)} ${label}.`;
+ }
+ return `${label.replace(/\b\w/g, (char) => char.toUpperCase())}.`;
+}
+
+function findComponentPrefix(key) {
+ const prefixes = Object.keys(COMPONENT_PREFIX_MAP).sort((a, b) => b.length - a.length);
+ return prefixes.find((prefix) => key === prefix || key.startsWith(`${prefix}-`));
+}
+
+function loadExistingTokenKeys(dir) {
+ const keys = new Set();
+ for (const filePath of listJsonFiles(dir)) {
+ for (const key of Object.keys(readJson(filePath))) {
+ keys.add(key);
+ }
+ }
+ return keys;
+}
+
+function syncThemeSourceFromScss() {
+ const lightTheme = parseThemeMap(LIGHT_THEME_PATH);
+ const darkTheme = parseThemeMap(DARK_THEME_PATH);
+ const semanticKeys = loadExistingTokenKeys(SEMANTIC_DIR);
+ const componentKeys = loadExistingTokenKeys(COMPONENT_DIR);
+
+ const generatedSemantic = {};
+ const generatedComponents = {};
+ const darkSemanticOverrides = {};
+ const darkComponentOverrides = {};
+ const semanticValueIndex = new Map();
+
+ for (const [key, lightValue] of Object.entries(lightTheme)) {
+ if (!isSemanticKey(key)) continue;
+
+ const darkValue = darkTheme[key];
+ const indexKey = `${lightValue}:::${darkValue}`;
+ const existingKey = semanticValueIndex.get(indexKey);
+ if (existingKey) {
+ semanticValueIndex.set(indexKey, preferredSemanticKey(existingKey, key));
+ } else {
+ semanticValueIndex.set(indexKey, key);
+ }
+
+ if (!semanticKeys.has(key)) {
+ generatedSemantic[key] = {
+ $value: lightValue,
+ $type: inferTokenType(key, lightValue),
+ description: inferDescription(key, 'semantic'),
+ };
+ }
+
+ if (darkValue !== undefined && darkValue !== lightValue) {
+ darkSemanticOverrides[key] = darkValue;
+ }
+ }
+
+ for (const [legacyKey, lightValue] of Object.entries(lightTheme)) {
+ if (isSemanticKey(legacyKey)) continue;
+
+ const prefix = findComponentPrefix(legacyKey);
+ if (!prefix) continue;
+ if (SKIP_COMPONENT_PREFIXES.has(prefix)) continue;
+
+ const componentName = COMPONENT_PREFIX_MAP[prefix];
+ const suffix = legacyKey === prefix ? '' : legacyKey.slice(prefix.length + 1);
+ const tokenKey = suffix ? `${componentName}.${suffix}` : componentName;
+ const darkValue = darkTheme[legacyKey];
+ if (!componentKeys.has(tokenKey)) {
+ const semanticMatch = semanticValueIndex.get(`${lightValue}:::${darkValue}`);
+ const primaryCssVar = cssVarForTokenKey(tokenKey);
+ const legacyCssVar = `--ty-${legacyKey}`;
+ const definition = {
+ $value: semanticMatch ? `{${semanticMatch}}` : lightValue,
+ $type: inferTokenType(tokenKey, lightValue),
+ description: inferDescription(tokenKey, 'component', componentName),
+ };
+
+ if (semanticMatch) {
+ definition.fallback = `--ty-${semanticMatch}`;
+ }
+
+ if (legacyCssVar !== primaryCssVar) {
+ definition.aliases = [legacyCssVar];
+ }
+
+ if (!generatedComponents[componentName]) {
+ generatedComponents[componentName] = {};
+ }
+ generatedComponents[componentName][tokenKey] = definition;
+ }
+
+ if (darkValue !== undefined && darkValue !== lightValue) {
+ darkComponentOverrides[tokenKey] = darkValue;
+ }
+ }
+
+ mkdirp(SEMANTIC_DIR);
+ mkdirp(COMPONENT_DIR);
+ mkdirp(THEMES_DIR);
+
+ if (Object.keys(generatedSemantic).length > 0) {
+ const semanticGroups = new Map();
+
+ for (const key of Object.keys(generatedSemantic).sort()) {
+ const fileName = getSemanticFileName(key);
+ if (!semanticGroups.has(fileName)) {
+ semanticGroups.set(fileName, {});
+ }
+ semanticGroups.get(fileName)[key] = generatedSemantic[key];
+ }
+
+ for (const [fileName, tokenMap] of semanticGroups.entries()) {
+ writeJson(path.join(SEMANTIC_DIR, fileName), tokenMap);
+ }
+ }
+
+ for (const [componentName, tokenMap] of Object.entries(generatedComponents)) {
+ const componentOut = {};
+ for (const key of Object.keys(tokenMap).sort()) {
+ componentOut[key] = tokenMap[key];
+ }
+ writeJson(path.join(COMPONENT_DIR, `${componentName}.json`), componentOut);
+ }
+
+ writeJson(path.join(THEMES_DIR, 'light.json'), {
+ meta: {
+ id: 'tiny-light',
+ name: 'Tiny Light',
+ mode: 'light',
+ },
+ tokens: {
+ semantic: {},
+ components: {},
+ },
+ });
+
+ const persistedComponentKeys = loadExistingTokenKeys(COMPONENT_DIR);
+ const resolvedDarkComponentOverrides = {};
+
+ for (const [legacyKey, lightValue] of Object.entries(lightTheme)) {
+ if (isSemanticKey(legacyKey)) continue;
+
+ const prefix = findComponentPrefix(legacyKey);
+ if (!prefix) continue;
+ if (SKIP_COMPONENT_PREFIXES.has(prefix)) continue;
+
+ const componentName = COMPONENT_PREFIX_MAP[prefix];
+ const suffix = legacyKey === prefix ? '' : legacyKey.slice(prefix.length + 1);
+ const tokenKey = suffix ? `${componentName}.${suffix}` : componentName;
+ if (!persistedComponentKeys.has(tokenKey)) continue;
+
+ const darkValue = darkTheme[legacyKey];
+ if (darkValue !== undefined && darkValue !== lightValue) {
+ resolvedDarkComponentOverrides[tokenKey] = darkValue;
+ }
+ }
+
+ const darkThemeOut = {
+ meta: {
+ id: 'tiny-dark',
+ name: 'Tiny Dark',
+ mode: 'dark',
+ },
+ tokens: {
+ semantic: {},
+ components: {},
+ },
+ };
+
+ for (const key of Object.keys(darkSemanticOverrides).sort()) {
+ darkThemeOut.tokens.semantic[key] = darkSemanticOverrides[key];
+ }
+
+ for (const key of Object.keys(resolvedDarkComponentOverrides).sort()) {
+ darkThemeOut.tokens.components[key] = resolvedDarkComponentOverrides[key];
+ }
+
+ writeJson(path.join(THEMES_DIR, 'dark.json'), darkThemeOut);
+}
+
+module.exports = { parseThemeMap, syncThemeSourceFromScss };
+
+if (require.main === module) {
+ syncThemeSourceFromScss();
+}
diff --git a/packages/tokens/scss/_constants.scss b/packages/tokens/scss/_constants.scss
index 6f793b09..73ff2c9e 100644
--- a/packages/tokens/scss/_constants.scss
+++ b/packages/tokens/scss/_constants.scss
@@ -1,7 +1,5 @@
-// Static structural constants — bridged to CSS custom properties.
+// Static structural constants bridged to primary v2 CSS custom properties.
// These values do not change between themes.
-// The var() references allow runtime customization while
-// maintaining backward compatibility with existing SCSS usage.
// Alert
$alert-border-radius: var(--ty-alert-border-radius) !default;
@@ -15,11 +13,11 @@ $badge-size: var(--ty-badge-size) !default;
$badge-dot-size: var(--ty-badge-dot-size) !default;
// Button
-$btn-padding-sm: var(--ty-btn-padding-sm) !default;
-$btn-padding-md: var(--ty-btn-padding-md) !default;
-$btn-padding-lg: var(--ty-btn-padding-lg) !default;
-$btn-loading-opacity: var(--ty-btn-loading-opacity) !default;
-$btn-transition: var(--ty-btn-transition) !default;
+$btn-padding-sm: var(--ty-button-padding-inline-sm) !default;
+$btn-padding-md: var(--ty-button-padding-inline-md) !default;
+$btn-padding-lg: var(--ty-button-padding-inline-lg) !default;
+$btn-loading-opacity: var(--ty-button-loading-opacity) !default;
+$btn-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !default;
// Card
$card-header-padding: var(--ty-card-header-padding) !default;
@@ -27,17 +25,17 @@ $card-body-padding: var(--ty-card-body-padding) !default;
$card-footer-padding: var(--ty-card-footer-padding) !default;
// Description
-$description-sm-padding-vt: var(--ty-description-sm-padding-vt) !default;
-$description-md-padding-vt: var(--ty-description-md-padding-vt) !default;
-$description-lg-padding-vt: var(--ty-description-lg-padding-vt) !default;
-$description-sm-padding-hr: var(--ty-description-sm-padding-hr) !default;
-$description-md-padding-hr: var(--ty-description-md-padding-hr) !default;
-$description-lg-padding-hr: var(--ty-description-lg-padding-hr) !default;
+$description-sm-padding-vt: var(--ty-descriptions-sm-padding-vt) !default;
+$description-md-padding-vt: var(--ty-descriptions-md-padding-vt) !default;
+$description-lg-padding-vt: var(--ty-descriptions-lg-padding-vt) !default;
+$description-sm-padding-hr: var(--ty-descriptions-sm-padding-hr) !default;
+$description-md-padding-hr: var(--ty-descriptions-md-padding-hr) !default;
+$description-lg-padding-hr: var(--ty-descriptions-lg-padding-hr) !default;
// Input
-$input-sm-padding: var(--ty-input-sm-padding) !default;
-$input-md-padding: var(--ty-input-md-padding) !default;
-$input-lg-padding: var(--ty-input-lg-padding) !default;
+$input-sm-padding: var(--ty-input-padding-inline-sm) !default;
+$input-md-padding: var(--ty-input-padding-inline-md) !default;
+$input-lg-padding: var(--ty-input-padding-inline-lg) !default;
// Menu
$menu-item-padding-vertical: var(--ty-menu-item-padding-vertical) !default;
diff --git a/packages/tokens/source/components/alert.json b/packages/tokens/source/components/alert.json
new file mode 100644
index 00000000..d1b23043
--- /dev/null
+++ b/packages/tokens/source/components/alert.json
@@ -0,0 +1,74 @@
+{
+ "alert.border-radius": {
+ "$value": "3px",
+ "$type": "dimension",
+ "description": "Alert panel border radius."
+ },
+ "alert.padding": {
+ "$value": "10px 30px 10px 13px",
+ "$type": "string",
+ "description": "Alert panel padding."
+ },
+ "alert.font-weight": {
+ "$value": "{font-weight}",
+ "$type": "font-weight",
+ "description": "Alert panel font weight.",
+ "fallback": "--ty-font-weight"
+ },
+ "alert.font-size": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Alert panel font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "alert.transition-duration": {
+ "$value": "300ms",
+ "$type": "duration",
+ "description": "Alert panel transition duration."
+ },
+ "alert.stack-gap": {
+ "$value": "14px",
+ "$type": "dimension",
+ "description": "Gap between stacked alerts."
+ },
+ "alert.title-font-size": {
+ "$value": "17px",
+ "$type": "dimension",
+ "description": "Alert title font size."
+ },
+ "alert.title-font-weight": {
+ "$value": "500",
+ "$type": "font-weight",
+ "description": "Alert title font weight."
+ },
+ "alert.title-margin-bottom": {
+ "$value": "5px",
+ "$type": "dimension",
+ "description": "Alert title bottom margin when description exists."
+ },
+ "alert.desc-line-height": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Alert description line height."
+ },
+ "alert.icon-gap": {
+ "$value": "7px",
+ "$type": "dimension",
+ "description": "Gap between alert icon and content."
+ },
+ "alert.icon-offset-top": {
+ "$value": "1px",
+ "$type": "dimension",
+ "description": "Alert icon visual top offset."
+ },
+ "alert.close-offset-top": {
+ "$value": "10px",
+ "$type": "dimension",
+ "description": "Alert close button top offset."
+ },
+ "alert.close-offset-inline-end": {
+ "$value": "13px",
+ "$type": "dimension",
+ "description": "Alert close button inline end offset."
+ }
+}
diff --git a/packages/tokens/source/components/anchor.json b/packages/tokens/source/components/anchor.json
new file mode 100644
index 00000000..dc6c05e9
--- /dev/null
+++ b/packages/tokens/source/components/anchor.json
@@ -0,0 +1,48 @@
+{
+ "anchor.ball-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Anchor ball bg.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "anchor.bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Anchor panel background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "anchor.ball-border": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Anchor active ball border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "anchor.link-color": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "Anchor link text color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "anchor.link-color-active": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Anchor active link text color.",
+ "fallback": "--ty-color-primary"
+ },
+ "anchor.link-padding": {
+ "$value": "7px 0 7px 16px",
+ "$type": "string",
+ "description": "Anchor link padding."
+ },
+ "anchor.link-title-margin-bottom": {
+ "$value": "5px",
+ "$type": "dimension",
+ "description": "Anchor link title bottom margin when nested."
+ },
+ "anchor.ink-bg": {
+ "$value": "{color-fill-tertiary}",
+ "$type": "color",
+ "description": "Anchor rail color.",
+ "fallback": "--ty-color-fill-tertiary"
+ }
+}
diff --git a/packages/tokens/source/components/avatar.json b/packages/tokens/source/components/avatar.json
new file mode 100644
index 00000000..763e20f5
--- /dev/null
+++ b/packages/tokens/source/components/avatar.json
@@ -0,0 +1,62 @@
+{
+ "avatar.bg": {
+ "$value": "#ccc",
+ "$type": "color",
+ "description": "Avatar background color."
+ },
+ "avatar.border": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Avatar border.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "avatar.border-radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "Avatar square border radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "avatar.color": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Avatar color."
+ },
+ "avatar.offline-color": {
+ "$value": "#ced4da",
+ "$type": "color",
+ "description": "Avatar offline color."
+ },
+ "avatar.presence-shadow": {
+ "$value": "0 0 0 0.1rem #fff",
+ "$type": "shadow",
+ "description": "Avatar presence indicator ring shadow."
+ },
+ "avatar.border-width": {
+ "$value": "2px",
+ "$type": "dimension",
+ "description": "Avatar border width."
+ },
+ "avatar.presence-size": {
+ "$value": "0.4em",
+ "$type": "dimension",
+ "description": "Avatar presence indicator size."
+ },
+ "avatar.presence-color.online": {
+ "$value": "{color-success}",
+ "$type": "color",
+ "description": "Avatar online presence color.",
+ "fallback": "--ty-color-success"
+ },
+ "avatar.presence-color.busy": {
+ "$value": "{color-danger}",
+ "$type": "color",
+ "description": "Avatar busy presence color.",
+ "fallback": "--ty-color-danger"
+ },
+ "avatar.presence-color.away": {
+ "$value": "{color-warning}",
+ "$type": "color",
+ "description": "Avatar away presence color.",
+ "fallback": "--ty-color-warning"
+ }
+}
diff --git a/packages/tokens/source/components/back-top.json b/packages/tokens/source/components/back-top.json
new file mode 100644
index 00000000..ea08b4db
--- /dev/null
+++ b/packages/tokens/source/components/back-top.json
@@ -0,0 +1,27 @@
+{
+ "back-top.bg": {
+ "$value": "rgba(0, 0, 0, 0.3)",
+ "$type": "color",
+ "description": "Back Top button background color."
+ },
+ "back-top.offset-inline-end": {
+ "$value": "40px",
+ "$type": "dimension",
+ "description": "Back Top horizontal offset."
+ },
+ "back-top.offset-bottom": {
+ "$value": "30px",
+ "$type": "dimension",
+ "description": "Back Top vertical offset."
+ },
+ "back-top.size": {
+ "$value": "45px",
+ "$type": "dimension",
+ "description": "Back Top button size."
+ },
+ "back-top.radius": {
+ "$value": "50%",
+ "$type": "string",
+ "description": "Back Top button radius."
+ }
+}
diff --git a/packages/tokens/source/components/badge.json b/packages/tokens/source/components/badge.json
new file mode 100644
index 00000000..dba686e3
--- /dev/null
+++ b/packages/tokens/source/components/badge.json
@@ -0,0 +1,42 @@
+{
+ "badge.dot-size": {
+ "$value": "6px",
+ "$type": "dimension",
+ "description": "Badge dot size."
+ },
+ "badge.font-size": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "Badge count font size."
+ },
+ "badge.shadow": {
+ "$value": "0 0 0 1.5px #fff",
+ "$type": "shadow",
+ "description": "Badge outline shadow."
+ },
+ "badge.size": {
+ "$value": "18px",
+ "$type": "dimension",
+ "description": "Badge count size."
+ },
+ "badge.count-padding": {
+ "$value": "0 5px",
+ "$type": "string",
+ "description": "Badge count padding."
+ },
+ "badge.count-color": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Badge count text color."
+ },
+ "badge.font-weight": {
+ "$value": "400",
+ "$type": "font-weight",
+ "description": "Badge count font weight."
+ },
+ "badge.z-index": {
+ "$value": "10",
+ "$type": "number",
+ "description": "Badge stacking order."
+ }
+}
diff --git a/packages/tokens/source/components/button.json b/packages/tokens/source/components/button.json
new file mode 100644
index 00000000..2310b7ae
--- /dev/null
+++ b/packages/tokens/source/components/button.json
@@ -0,0 +1,199 @@
+{
+ "button.radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "Button border radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "button.line-height": {
+ "$value": "{line-height-base}",
+ "$type": "line-height",
+ "description": "Button content line height.",
+ "fallback": "--ty-line-height-base"
+ },
+ "button.min-width": {
+ "$value": "auto",
+ "$type": "string",
+ "description": "Minimum button width."
+ },
+ "button.group-gap": {
+ "$value": "0",
+ "$type": "dimension",
+ "description": "Gap between adjacent button groups."
+ },
+ "button.group-divider-color": {
+ "$value": "{color-border-secondary}",
+ "$type": "color",
+ "description": "Divider color between adjacent grouped solid buttons.",
+ "fallback": "--ty-color-border-secondary"
+ },
+ "button.round-radius": {
+ "$value": "{height-lg}",
+ "$type": "dimension",
+ "description": "Pill-shaped button border radius.",
+ "fallback": "--ty-height-lg"
+ },
+ "button.loading-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Overlay background during button loading state.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "button.loading-opacity": {
+ "$value": "0.35",
+ "$type": "number",
+ "description": "Overlay opacity during button loading state."
+ },
+ "button.font-size-sm": {
+ "$value": "{font-size-sm}",
+ "$type": "dimension",
+ "description": "Small button font size.",
+ "fallback": "--ty-font-size-sm"
+ },
+ "button.font-size-md": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Medium button font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "button.font-size-lg": {
+ "$value": "{font-size-lg}",
+ "$type": "dimension",
+ "description": "Large button font size.",
+ "fallback": "--ty-font-size-lg"
+ },
+ "button.height.sm": {
+ "$value": "{height-sm}",
+ "$type": "dimension",
+ "description": "Small button height.",
+ "fallback": "--ty-height-sm"
+ },
+ "button.height.md": {
+ "$value": "{height-md}",
+ "$type": "dimension",
+ "description": "Medium button height.",
+ "fallback": "--ty-height-md"
+ },
+ "button.height.lg": {
+ "$value": "{height-lg}",
+ "$type": "dimension",
+ "description": "Large button height.",
+ "fallback": "--ty-height-lg"
+ },
+ "button.padding-inline-sm": {
+ "$value": "{spacing-3}",
+ "$type": "dimension",
+ "description": "Small button inline padding."
+ },
+ "button.padding-inline-md": {
+ "$value": "{spacing-4}",
+ "$type": "dimension",
+ "description": "Medium button inline padding."
+ },
+ "button.padding-inline-lg": {
+ "$value": "{spacing-5}",
+ "$type": "dimension",
+ "description": "Large button inline padding."
+ },
+ "button.bg.default": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Default button background.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "button.bg.default-hover": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Default button hover background.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "button.bg.default-active": {
+ "$value": "{color-fill}",
+ "$type": "color",
+ "description": "Default button active background.",
+ "fallback": "--ty-color-fill"
+ },
+ "button.border.default": {
+ "$value": "{color-border-btn-default}",
+ "$type": "color",
+ "description": "Default button border color.",
+ "fallback": "--ty-color-border-btn-default"
+ },
+ "button.border.default-hover": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Default button hover border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "button.border.default-active": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Default button active border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "button.text.default": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Default button text color.",
+ "fallback": "--ty-color-text"
+ },
+ "button.text.default-hover": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Default button hover text color.",
+ "fallback": "--ty-color-primary"
+ },
+ "button.text.default-active": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Default button active text color.",
+ "fallback": "--ty-color-primary"
+ },
+ "button.bg.primary": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Primary button background.",
+ "fallback": "--ty-color-primary"
+ },
+ "button.bg.primary-hover": {
+ "$value": "{color-primary-hover}",
+ "$type": "color",
+ "description": "Primary button hover background.",
+ "fallback": "--ty-color-primary-hover"
+ },
+ "button.bg.primary-active": {
+ "$value": "{color-primary-active}",
+ "$type": "color",
+ "description": "Primary button active background.",
+ "fallback": "--ty-color-primary-active"
+ },
+ "button.text.primary": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Primary button text color."
+ },
+ "button.text.link-disabled": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Disabled link button text color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "button.bg.disabled": {
+ "$value": "{color-bg-disabled}",
+ "$type": "color",
+ "description": "Disabled button background.",
+ "fallback": "--ty-color-bg-disabled"
+ },
+ "button.border.disabled": {
+ "$value": "{color-border}",
+ "$type": "color",
+ "description": "Disabled button border color.",
+ "fallback": "--ty-color-border"
+ },
+ "button.text.disabled": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Disabled button text color.",
+ "fallback": "--ty-color-text-quaternary"
+ }
+}
diff --git a/packages/tokens/source/components/calendar.json b/packages/tokens/source/components/calendar.json
new file mode 100644
index 00000000..d66111e7
--- /dev/null
+++ b/packages/tokens/source/components/calendar.json
@@ -0,0 +1,220 @@
+{
+ "calendar.bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Calendar panel background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "calendar.border": {
+ "$value": "#e9ecef",
+ "$type": "color",
+ "description": "Calendar panel border color."
+ },
+ "calendar.radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "Calendar panel border radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "calendar.hover": {
+ "$value": "#f6f9fc",
+ "$type": "color",
+ "description": "Calendar cell hover background color."
+ },
+ "calendar.header-padding": {
+ "$value": "8px 12px",
+ "$type": "string",
+ "description": "Calendar header padding."
+ },
+ "calendar.nav-button-size": {
+ "$value": "28px",
+ "$type": "dimension",
+ "description": "Calendar nav button size."
+ },
+ "calendar.nav-button-radius": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Calendar nav button radius."
+ },
+ "calendar.nav-button-color": {
+ "$value": "{color-text-tertiary}",
+ "$type": "color",
+ "description": "Calendar nav button color.",
+ "fallback": "--ty-color-text-tertiary"
+ },
+ "calendar.nav-button-color-hover": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Calendar nav button hover color.",
+ "fallback": "--ty-color-primary"
+ },
+ "calendar.title-font-size": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Calendar title font size."
+ },
+ "calendar.title-font-weight": {
+ "$value": "500",
+ "$type": "font-weight",
+ "description": "Calendar title font weight."
+ },
+ "calendar.title-color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Calendar title color.",
+ "fallback": "--ty-color-text"
+ },
+ "calendar.title-color-hover": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Calendar title action hover color.",
+ "fallback": "--ty-color-primary"
+ },
+ "calendar.body-padding": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Calendar body padding."
+ },
+ "calendar.cell-header-font-size": {
+ "$value": "{font-size-sm}",
+ "$type": "dimension",
+ "description": "Calendar weekday header font size.",
+ "fallback": "--ty-font-size-sm"
+ },
+ "calendar.cell-header-color": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "Calendar weekday header color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "calendar.week-number-color": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Calendar week number color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "calendar.cell-color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Calendar in-view cell text color.",
+ "fallback": "--ty-color-text"
+ },
+ "calendar.cell-color-muted": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Calendar out-of-view and disabled cell text color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "calendar.cell-disabled-bg": {
+ "$value": "{color-bg-disabled}",
+ "$type": "color",
+ "description": "Calendar disabled cell inner background color.",
+ "fallback": "--ty-color-bg-disabled"
+ },
+ "calendar.cell-today-border": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Calendar today cell border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "calendar.cell-selected-bg": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Calendar selected cell background color.",
+ "fallback": "--ty-color-primary"
+ },
+ "calendar.cell-selected-color": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Calendar selected cell text color."
+ },
+ "calendar.range-bg": {
+ "$value": "{color-primary-bg}",
+ "$type": "color",
+ "description": "Calendar range background color.",
+ "fallback": "--ty-color-primary-bg"
+ },
+ "calendar.cell-focus-outline": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Calendar focused cell outline color.",
+ "fallback": "--ty-color-primary"
+ },
+ "calendar.cell-date-font-size": {
+ "$value": "{font-size-sm}",
+ "$type": "dimension",
+ "description": "Calendar date cell font size.",
+ "fallback": "--ty-font-size-sm"
+ },
+ "calendar.cell-dot-size": {
+ "$value": "6px",
+ "$type": "dimension",
+ "description": "Calendar cell event dot size."
+ },
+ "calendar.cell-dot-color": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Calendar cell event dot color.",
+ "fallback": "--ty-color-primary"
+ },
+ "calendar.panel-grid-gap": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Calendar month and decade grid gap."
+ },
+ "calendar.panel-padding": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Calendar month and decade panel padding."
+ },
+ "calendar.panel-cell-padding": {
+ "$value": "16px 8px",
+ "$type": "string",
+ "description": "Calendar month and decade cell padding."
+ },
+ "calendar.panel-cell-radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "Calendar month and decade cell radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "calendar.panel-cell-color-selected": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Calendar selected month and decade cell text color."
+ },
+ "calendar.panel-cell-bg-selected": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Calendar selected month and decade cell background color.",
+ "fallback": "--ty-color-primary"
+ },
+ "calendar.decade-font-size": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Calendar decade cell font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "calendar.decade-color-out": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Calendar out-of-range decade cell color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "calendar.footer-padding": {
+ "$value": "8px 12px",
+ "$type": "string",
+ "description": "Calendar footer padding."
+ },
+ "calendar.today-link-color": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Calendar today link color.",
+ "fallback": "--ty-color-primary"
+ },
+ "calendar.today-link-font-size": {
+ "$value": "13px",
+ "$type": "dimension",
+ "description": "Calendar today link font size."
+ }
+}
diff --git a/packages/tokens/source/components/card.json b/packages/tokens/source/components/card.json
new file mode 100644
index 00000000..3d84c18b
--- /dev/null
+++ b/packages/tokens/source/components/card.json
@@ -0,0 +1,70 @@
+{
+ "card.radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "Card border radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "card.bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Card background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "card.bg.filled": {
+ "$value": "{color-fill}",
+ "$type": "color",
+ "description": "Filled card background color.",
+ "fallback": "--ty-color-fill"
+ },
+ "card.border": {
+ "$value": "{color-border-secondary}",
+ "$type": "color",
+ "description": "Card border color.",
+ "fallback": "--ty-color-border-secondary"
+ },
+ "card.shadow": {
+ "$value": "{shadow-card}",
+ "$type": "shadow",
+ "description": "Elevated card shadow.",
+ "fallback": "--ty-shadow-card"
+ },
+ "card.shadow.hover": {
+ "$value": "{shadow-card}",
+ "$type": "shadow",
+ "description": "Hoverable card shadow.",
+ "fallback": "--ty-shadow-card"
+ },
+ "card.header-padding": {
+ "$value": "{spacing-5}",
+ "$type": "dimension",
+ "description": "Card header padding."
+ },
+ "card.body-padding": {
+ "$value": "{spacing-5}",
+ "$type": "dimension",
+ "description": "Card body padding."
+ },
+ "card.footer-padding": {
+ "$value": "{spacing-5}",
+ "$type": "dimension",
+ "description": "Card footer padding."
+ },
+ "card.header-color": {
+ "$value": "{color-text-heading}",
+ "$type": "color",
+ "description": "Card header text color.",
+ "fallback": "--ty-color-text-heading"
+ },
+ "card.header-font-size": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Card header font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "card.header-font-weight": {
+ "$value": "{font-weight-medium}",
+ "$type": "font-weight",
+ "description": "Card header font weight."
+ }
+}
diff --git a/packages/tokens/source/components/carousel.json b/packages/tokens/source/components/carousel.json
new file mode 100644
index 00000000..59a875b2
--- /dev/null
+++ b/packages/tokens/source/components/carousel.json
@@ -0,0 +1,72 @@
+{
+ "carousel.arrow-bg": {
+ "$value": "rgba(0, 0, 0, 0.25)",
+ "$type": "color",
+ "description": "Carousel arrow background color."
+ },
+ "carousel.arrow-hover-bg": {
+ "$value": "rgba(0, 0, 0, 0.45)",
+ "$type": "color",
+ "description": "Carousel arrow hover background color."
+ },
+ "carousel.arrow-size": {
+ "$value": "36px",
+ "$type": "dimension",
+ "description": "Carousel arrow control size."
+ },
+ "carousel.arrow-color": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Carousel arrow icon color."
+ },
+ "carousel.arrow-offset": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "Carousel arrow and dots inset offset."
+ },
+ "carousel.dot-active-bg": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Carousel dot active bg."
+ },
+ "carousel.dot-bg": {
+ "$value": "rgba(255, 255, 255, 0.3)",
+ "$type": "color",
+ "description": "Carousel dot bg."
+ },
+ "carousel.dot-hover-bg": {
+ "$value": "rgba(255, 255, 255, 0.6)",
+ "$type": "color",
+ "description": "Carousel dot hover background color."
+ },
+ "carousel.dot-width": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Carousel dot width."
+ },
+ "carousel.dot-height": {
+ "$value": "3px",
+ "$type": "dimension",
+ "description": "Carousel dot height."
+ },
+ "carousel.dot-gap": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Carousel dot gap."
+ },
+ "carousel.dot-radius": {
+ "$value": "1px",
+ "$type": "dimension",
+ "description": "Carousel dot radius."
+ },
+ "carousel.dot-width-active": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "Carousel active horizontal dot width."
+ },
+ "carousel.dot-height-active": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "Carousel active vertical dot height."
+ }
+}
diff --git a/packages/tokens/source/components/cascader.json b/packages/tokens/source/components/cascader.json
new file mode 100644
index 00000000..c251b29a
--- /dev/null
+++ b/packages/tokens/source/components/cascader.json
@@ -0,0 +1,170 @@
+{
+ "cascader.bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Cascader selector background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "cascader.border": {
+ "$value": "{color-border}",
+ "$type": "color",
+ "description": "Cascader selector border color.",
+ "fallback": "--ty-color-border"
+ },
+ "cascader.radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "Cascader selector radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "cascader.border-hover": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Cascader selector hover border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "cascader.border-focus": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Cascader selector focus border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "cascader.shadow-focus": {
+ "$value": "{shadow-focus}",
+ "$type": "shadow",
+ "description": "Cascader selector focus shadow.",
+ "fallback": "--ty-shadow-focus"
+ },
+ "cascader.font-size.sm": {
+ "$value": "{font-size-sm}",
+ "$type": "dimension",
+ "description": "Small cascader font size.",
+ "fallback": "--ty-font-size-sm"
+ },
+ "cascader.font-size.md": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Medium cascader font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "cascader.font-size.lg": {
+ "$value": "{font-size-lg}",
+ "$type": "dimension",
+ "description": "Large cascader font size.",
+ "fallback": "--ty-font-size-lg"
+ },
+ "cascader.height.sm": {
+ "$value": "{height-sm}",
+ "$type": "dimension",
+ "description": "Small cascader height.",
+ "fallback": "--ty-height-sm"
+ },
+ "cascader.height.md": {
+ "$value": "{height-md}",
+ "$type": "dimension",
+ "description": "Medium cascader height.",
+ "fallback": "--ty-height-md"
+ },
+ "cascader.height.lg": {
+ "$value": "{height-lg}",
+ "$type": "dimension",
+ "description": "Large cascader height.",
+ "fallback": "--ty-height-lg"
+ },
+ "cascader.padding.sm": {
+ "$value": "0 28px 0 8px",
+ "$type": "string",
+ "description": "Small cascader selector padding."
+ },
+ "cascader.padding.md": {
+ "$value": "0 32px 0 10px",
+ "$type": "string",
+ "description": "Medium cascader selector padding."
+ },
+ "cascader.padding.lg": {
+ "$value": "0 36px 0 12px",
+ "$type": "string",
+ "description": "Large cascader selector padding."
+ },
+ "cascader.color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Cascader selector text color.",
+ "fallback": "--ty-color-text"
+ },
+ "cascader.placeholder": {
+ "$value": "{color-text-placeholder}",
+ "$type": "color",
+ "description": "Cascader placeholder color.",
+ "fallback": "--ty-color-text-placeholder"
+ },
+ "cascader.clear-color": {
+ "$value": "{color-text-tertiary}",
+ "$type": "color",
+ "description": "Cascader clear icon color.",
+ "fallback": "--ty-color-text-tertiary"
+ },
+ "cascader.clear-color-hover": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "Cascader clear icon hover color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "cascader.arrow-color": {
+ "$value": "{color-text-tertiary}",
+ "$type": "color",
+ "description": "Cascader arrow color.",
+ "fallback": "--ty-color-text-tertiary"
+ },
+ "cascader.dropdown-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Cascader dropdown background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "cascader.dropdown-shadow": {
+ "$value": "{shadow-popup}",
+ "$type": "shadow",
+ "description": "Cascader dropdown shadow.",
+ "fallback": "--ty-shadow-popup"
+ },
+ "cascader.dropdown-max-height": {
+ "$value": "300px",
+ "$type": "dimension",
+ "description": "Cascader dropdown max height."
+ },
+ "cascader.hover": {
+ "$value": "{color-fill-secondary}",
+ "$type": "color",
+ "description": "Cascader option hover background color.",
+ "fallback": "--ty-color-fill-secondary"
+ },
+ "cascader.menu-empty-color": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "Cascader empty menu text color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "cascader.option-color-active": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Cascader active option text color.",
+ "fallback": "--ty-color-primary"
+ },
+ "cascader.option-font-weight-active": {
+ "$value": "500",
+ "$type": "font-weight",
+ "description": "Cascader active option font weight."
+ },
+ "cascader.menu-item-arrow-color": {
+ "$value": "{color-text-tertiary}",
+ "$type": "color",
+ "description": "Cascader submenu arrow color.",
+ "fallback": "--ty-color-text-tertiary"
+ },
+ "cascader.selected-bg": {
+ "$value": "rgba(110, 65, 191, 0.06)",
+ "$type": "color",
+ "description": "Cascader active option background color."
+ }
+}
diff --git a/packages/tokens/source/components/checkbox.json b/packages/tokens/source/components/checkbox.json
new file mode 100644
index 00000000..213d26e0
--- /dev/null
+++ b/packages/tokens/source/components/checkbox.json
@@ -0,0 +1,87 @@
+{
+ "checkbox.size": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Checkbox control size."
+ },
+ "checkbox.radius": {
+ "$value": "2px",
+ "$type": "dimension",
+ "description": "Checkbox control border radius."
+ },
+ "checkbox.label-gap": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Gap between checkbox control and label."
+ },
+ "checkbox.label-padding-inline-end": {
+ "$value": "5px",
+ "$type": "dimension",
+ "description": "Checkbox label trailing padding."
+ },
+ "checkbox.label-color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Checkbox label color.",
+ "fallback": "--ty-color-text"
+ },
+ "checkbox.bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Checkbox background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "checkbox.border": {
+ "$value": "{color-border}",
+ "$type": "color",
+ "description": "Checkbox border color.",
+ "fallback": "--ty-color-border"
+ },
+ "checkbox.border.hover": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Checkbox hover border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "checkbox.bg.checked": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Checked checkbox background color.",
+ "fallback": "--ty-color-primary"
+ },
+ "checkbox.border.checked": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Checked checkbox border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "checkbox.indicator-color": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Checkbox check and indeterminate indicator color."
+ },
+ "checkbox.bg.disabled": {
+ "$value": "{color-fill-secondary}",
+ "$type": "color",
+ "description": "Disabled checkbox background color.",
+ "fallback": "--ty-color-fill-secondary"
+ },
+ "checkbox.border.disabled": {
+ "$value": "{color-border}",
+ "$type": "color",
+ "description": "Disabled checkbox border color.",
+ "fallback": "--ty-color-border"
+ },
+ "checkbox.indicator-color.disabled": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Disabled checkbox indicator color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "checkbox.label-color.disabled": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Disabled checkbox label color.",
+ "fallback": "--ty-color-text-quaternary"
+ }
+}
diff --git a/packages/tokens/source/components/collapse.json b/packages/tokens/source/components/collapse.json
new file mode 100644
index 00000000..87b94b8e
--- /dev/null
+++ b/packages/tokens/source/components/collapse.json
@@ -0,0 +1,106 @@
+{
+ "collapse.radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "Collapse container border radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "collapse.color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Collapse text color.",
+ "fallback": "--ty-color-text"
+ },
+ "collapse.font-size": {
+ "$value": "14px",
+ "$type": "dimension",
+ "description": "Collapse font size."
+ },
+ "collapse.bg": {
+ "$value": "{color-fill}",
+ "$type": "color",
+ "description": "Collapse background color.",
+ "fallback": "--ty-color-fill"
+ },
+ "collapse.border": {
+ "$value": "{color-border}",
+ "$type": "color",
+ "description": "Collapse border color.",
+ "fallback": "--ty-color-border"
+ },
+ "collapse.header-color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Collapse header text color.",
+ "fallback": "--ty-color-text"
+ },
+ "collapse.header-line-height": {
+ "$value": "22px",
+ "$type": "dimension",
+ "description": "Collapse header line height."
+ },
+ "collapse.header-hover-bg": {
+ "$value": "#efefef",
+ "$type": "color",
+ "description": "Collapse header hover background color."
+ },
+ "collapse.header-disabled-color": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Disabled collapse header color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "collapse.toggle-padding": {
+ "$value": "12px 16px",
+ "$type": "string",
+ "description": "Collapse toggle padding."
+ },
+ "collapse.arrow-gap": {
+ "$value": "10px",
+ "$type": "dimension",
+ "description": "Gap between collapse arrow and title."
+ },
+ "collapse.extra-font-size": {
+ "$value": "11px",
+ "$type": "dimension",
+ "description": "Collapse extra content font size."
+ },
+ "collapse.extra-padding-inline-end": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Collapse extra content trailing padding."
+ },
+ "collapse.content-color": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "Collapse content text color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "collapse.content-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Collapse content background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "collapse.content-padding": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Collapse content padding."
+ },
+ "collapse.content-transition-duration": {
+ "$value": "300ms",
+ "$type": "duration",
+ "description": "Collapse content height transition duration."
+ },
+ "collapse.borderless-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Borderless collapse background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "collapse.borderless-content-padding-top": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Borderless collapse content top padding."
+ }
+}
diff --git a/packages/tokens/source/components/descriptions.json b/packages/tokens/source/components/descriptions.json
new file mode 100644
index 00000000..d8f88649
--- /dev/null
+++ b/packages/tokens/source/components/descriptions.json
@@ -0,0 +1,118 @@
+{
+ "descriptions.border": {
+ "$value": "#dfe2e5",
+ "$type": "color",
+ "description": "Descriptions bordered container border color."
+ },
+ "descriptions.label-bg": {
+ "$value": "{color-fill}",
+ "$type": "color",
+ "description": "Descriptions label cell background color.",
+ "fallback": "--ty-color-fill"
+ },
+ "descriptions.title-color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Descriptions title color.",
+ "fallback": "--ty-color-text"
+ },
+ "descriptions.title-font-size": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Descriptions title font size."
+ },
+ "descriptions.title-font-weight": {
+ "$value": "600",
+ "$type": "font-weight",
+ "description": "Descriptions title font weight."
+ },
+ "descriptions.title-margin-bottom": {
+ "$value": "20px",
+ "$type": "dimension",
+ "description": "Descriptions title bottom margin."
+ },
+ "descriptions.item-colon-margin-start": {
+ "$value": "2px",
+ "$type": "dimension",
+ "description": "Descriptions colon margin on the start side."
+ },
+ "descriptions.item-colon-margin-end": {
+ "$value": "5px",
+ "$type": "dimension",
+ "description": "Descriptions colon margin on the end side."
+ },
+ "descriptions.label-color": {
+ "$value": "{color-text-label}",
+ "$type": "color",
+ "description": "Descriptions label text color.",
+ "fallback": "--ty-color-text-label"
+ },
+ "descriptions.label-font-size": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Descriptions label font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "descriptions.label-line-height": {
+ "$value": "{line-height-base}",
+ "$type": "line-height",
+ "description": "Descriptions label line height.",
+ "fallback": "--ty-line-height-base"
+ },
+ "descriptions.content-color": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "Descriptions content text color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "descriptions.content-font-size": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Descriptions content font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "descriptions.content-line-height": {
+ "$value": "{line-height-base}",
+ "$type": "line-height",
+ "description": "Descriptions content line height.",
+ "fallback": "--ty-line-height-base"
+ },
+ "descriptions.radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "Descriptions bordered container radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "descriptions.lg-padding-hr": {
+ "$value": "{height-sm}",
+ "$type": "dimension",
+ "description": "Descriptions lg padding hr.",
+ "fallback": "--ty-height-sm"
+ },
+ "descriptions.lg-padding-vt": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Descriptions lg padding vt."
+ },
+ "descriptions.md-padding-hr": {
+ "$value": "{height-sm}",
+ "$type": "dimension",
+ "description": "Descriptions md padding hr.",
+ "fallback": "--ty-height-sm"
+ },
+ "descriptions.md-padding-vt": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "Descriptions md padding vt."
+ },
+ "descriptions.sm-padding-hr": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Descriptions sm padding hr."
+ },
+ "descriptions.sm-padding-vt": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Descriptions sm padding vt."
+ }
+}
diff --git a/packages/tokens/source/components/divider.json b/packages/tokens/source/components/divider.json
new file mode 100644
index 00000000..bfcbb33b
--- /dev/null
+++ b/packages/tokens/source/components/divider.json
@@ -0,0 +1,47 @@
+{
+ "divider.color": {
+ "$value": "#e4e4e4",
+ "$type": "color",
+ "description": "Divider color."
+ },
+ "divider.font-size": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Divider text font size."
+ },
+ "divider.line-height": {
+ "$value": "1.5",
+ "$type": "line-height",
+ "description": "Divider text line height."
+ },
+ "divider.vertical-margin": {
+ "$value": "0 8px",
+ "$type": "string",
+ "description": "Vertical divider margin."
+ },
+ "divider.vertical-height": {
+ "$value": "0.9em",
+ "$type": "dimension",
+ "description": "Vertical divider height."
+ },
+ "divider.vertical-offset": {
+ "$value": "-0.1em",
+ "$type": "dimension",
+ "description": "Vertical divider visual offset."
+ },
+ "divider.horizontal-margin": {
+ "$value": "16px 0",
+ "$type": "string",
+ "description": "Horizontal divider margin."
+ },
+ "divider.text-color": {
+ "$value": "#333",
+ "$type": "color",
+ "description": "Divider text color."
+ },
+ "divider.inner-text-padding": {
+ "$value": "0 10px",
+ "$type": "string",
+ "description": "Divider inner text padding."
+ }
+}
diff --git a/packages/tokens/source/components/drawer.json b/packages/tokens/source/components/drawer.json
new file mode 100644
index 00000000..ad19c8ab
--- /dev/null
+++ b/packages/tokens/source/components/drawer.json
@@ -0,0 +1,66 @@
+{
+ "drawer.bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Drawer panel background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "drawer.shadow": {
+ "$value": "{shadow-modal}",
+ "$type": "shadow",
+ "description": "Drawer panel shadow.",
+ "fallback": "--ty-shadow-modal"
+ },
+ "drawer.transition-duration": {
+ "$value": "300ms",
+ "$type": "duration",
+ "description": "Drawer panel transition duration."
+ },
+ "drawer.header-padding-block": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Drawer header vertical padding."
+ },
+ "drawer.header-padding-inline": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "Drawer header horizontal padding."
+ },
+ "drawer.body-padding-block": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Drawer body vertical padding."
+ },
+ "drawer.body-padding-inline": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "Drawer body horizontal padding."
+ },
+ "drawer.footer-padding-block": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Drawer footer vertical padding."
+ },
+ "drawer.footer-padding-inline": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "Drawer footer horizontal padding."
+ },
+ "drawer.border": {
+ "$value": "{color-border-secondary}",
+ "$type": "color",
+ "description": "Drawer divider border color.",
+ "fallback": "--ty-color-border-secondary"
+ },
+ "drawer.close-color": {
+ "$value": "{color-text-tertiary}",
+ "$type": "color",
+ "description": "Drawer close button color.",
+ "fallback": "--ty-color-text-tertiary"
+ },
+ "drawer.close-size": {
+ "$value": "56px",
+ "$type": "dimension",
+ "description": "Drawer close button square size."
+ }
+}
diff --git a/packages/tokens/source/components/empty.json b/packages/tokens/source/components/empty.json
new file mode 100644
index 00000000..27696d5c
--- /dev/null
+++ b/packages/tokens/source/components/empty.json
@@ -0,0 +1,28 @@
+{
+ "empty.desc-color": {
+ "$value": "rgba(0, 0, 0, 0.35)",
+ "$type": "color",
+ "description": "Empty description color."
+ },
+ "empty.desc-font-size": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Empty description font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "empty.image-max-width": {
+ "$value": "120px",
+ "$type": "dimension",
+ "description": "Empty image max width."
+ },
+ "empty.image-margin-bottom": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Empty image container bottom margin."
+ },
+ "empty.footer-margin-top": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Empty footer top margin."
+ }
+}
diff --git a/packages/tokens/source/components/form.json b/packages/tokens/source/components/form.json
new file mode 100644
index 00000000..2bc071c2
--- /dev/null
+++ b/packages/tokens/source/components/form.json
@@ -0,0 +1,101 @@
+{
+ "form.error-color": {
+ "$value": "#ff4d4f",
+ "$type": "color",
+ "description": "Form error color."
+ },
+ "form.error-hover": {
+ "$value": "#ff7875",
+ "$type": "color",
+ "description": "Form error hover."
+ },
+ "form.item-margin-bottom": {
+ "$value": "22px",
+ "$type": "dimension",
+ "description": "Form item bottom margin."
+ },
+ "form.label-line-height": {
+ "$value": "30px",
+ "$type": "dimension",
+ "description": "Form label line height."
+ },
+ "form.label-color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Form label color.",
+ "fallback": "--ty-color-text"
+ },
+ "form.label-font-size": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Form label font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "form.label-required-margin-end": {
+ "$value": "3px",
+ "$type": "dimension",
+ "description": "Required asterisk inline end margin."
+ },
+ "form.label-colon-margin": {
+ "$value": "0 8px 0 2px",
+ "$type": "string",
+ "description": "Label colon margin."
+ },
+ "form.input-min-height": {
+ "$value": "32px",
+ "$type": "dimension",
+ "description": "Form input container min height."
+ },
+ "form.notice-font-size": {
+ "$value": "13px",
+ "$type": "dimension",
+ "description": "Form notice font size."
+ },
+ "form.notice-radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "Form notice radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "form.notice-padding": {
+ "$value": "5px",
+ "$type": "dimension",
+ "description": "Form notice padding."
+ },
+ "form.notice-margin-top": {
+ "$value": "5px",
+ "$type": "dimension",
+ "description": "Form notice top margin."
+ },
+ "form.helper-color": {
+ "$value": "{color-text-tertiary}",
+ "$type": "color",
+ "description": "Form helper text color.",
+ "fallback": "--ty-color-text-tertiary"
+ },
+ "form.feedback-font-size": {
+ "$value": "13px",
+ "$type": "dimension",
+ "description": "Form error and helper text font size."
+ },
+ "form.feedback-line-height": {
+ "$value": "22px",
+ "$type": "dimension",
+ "description": "Form error and helper text line height."
+ },
+ "form.error-shadow": {
+ "$value": "0 0 0 3px rgb(255 77 79 / 20%)",
+ "$type": "shadow",
+ "description": "Form error focus shadow."
+ },
+ "form.notice-bg": {
+ "$value": "#fff7cc",
+ "$type": "color",
+ "description": "Form notice bg."
+ },
+ "form.notice-color": {
+ "$value": "#555",
+ "$type": "color",
+ "description": "Form notice color."
+ }
+}
diff --git a/packages/tokens/source/components/input-number.json b/packages/tokens/source/components/input-number.json
new file mode 100644
index 00000000..2dd1322a
--- /dev/null
+++ b/packages/tokens/source/components/input-number.json
@@ -0,0 +1,85 @@
+{
+ "input-number.control-active-bg": {
+ "$value": "#f4f4f4",
+ "$type": "color",
+ "description": "Input Number control active bg."
+ },
+ "input-number.control-border": {
+ "$value": "{color-border}",
+ "$type": "color",
+ "description": "Input Number control border.",
+ "fallback": "--ty-color-border"
+ },
+ "input-number.icon-color": {
+ "$value": "#999",
+ "$type": "color",
+ "description": "Input Number icon color."
+ },
+ "input-number.icon-color-hover": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Input Number icon hover color.",
+ "fallback": "--ty-color-primary"
+ },
+ "input-number.input-padding-inline-start": {
+ "$value": "7px",
+ "$type": "dimension",
+ "description": "Input Number input leading padding."
+ },
+ "input-number.input-padding-inline-end": {
+ "$value": "25px",
+ "$type": "dimension",
+ "description": "Input Number input trailing padding."
+ },
+ "input-number.controls-padding": {
+ "$value": "1px",
+ "$type": "dimension",
+ "description": "Input Number controls inset padding."
+ },
+ "input-number.control-padding-inline": {
+ "$value": "0 7px",
+ "$type": "string",
+ "description": "Input Number control button inline padding."
+ },
+ "input-number.control-transition-duration": {
+ "$value": "300ms",
+ "$type": "duration",
+ "description": "Input Number control transition duration."
+ },
+ "input-number.font-size.sm": {
+ "$value": "{font-size-sm}",
+ "$type": "dimension",
+ "description": "Small Input Number font size.",
+ "fallback": "--ty-font-size-sm"
+ },
+ "input-number.font-size.md": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Medium Input Number font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "input-number.font-size.lg": {
+ "$value": "{font-size-lg}",
+ "$type": "dimension",
+ "description": "Large Input Number font size.",
+ "fallback": "--ty-font-size-lg"
+ },
+ "input-number.height.sm": {
+ "$value": "{height-sm}",
+ "$type": "dimension",
+ "description": "Small Input Number height.",
+ "fallback": "--ty-height-sm"
+ },
+ "input-number.height.md": {
+ "$value": "{height-md}",
+ "$type": "dimension",
+ "description": "Medium Input Number height.",
+ "fallback": "--ty-height-md"
+ },
+ "input-number.height.lg": {
+ "$value": "{height-lg}",
+ "$type": "dimension",
+ "description": "Large Input Number height.",
+ "fallback": "--ty-height-lg"
+ }
+}
diff --git a/packages/tokens/source/components/input.json b/packages/tokens/source/components/input.json
new file mode 100644
index 00000000..a9f7debd
--- /dev/null
+++ b/packages/tokens/source/components/input.json
@@ -0,0 +1,140 @@
+{
+ "input.radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "Input border radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "input.color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Input text color.",
+ "fallback": "--ty-color-text"
+ },
+ "input.bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Input background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "input.bg.disabled": {
+ "$value": "{color-bg-disabled}",
+ "$type": "color",
+ "description": "Disabled input background color.",
+ "fallback": "--ty-color-bg-disabled"
+ },
+ "input.border": {
+ "$value": "{color-border}",
+ "$type": "color",
+ "description": "Input border color.",
+ "fallback": "--ty-color-border"
+ },
+ "input.border.hover": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Input hover border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "input.border.focus": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Input focus border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "input.shadow.focus": {
+ "$value": "{shadow-focus}",
+ "$type": "shadow",
+ "description": "Input focus ring shadow.",
+ "fallback": "--ty-shadow-focus"
+ },
+ "input.placeholder": {
+ "$value": "{color-text-placeholder}",
+ "$type": "color",
+ "description": "Input placeholder color.",
+ "fallback": "--ty-color-text-placeholder"
+ },
+ "input.addon-bg": {
+ "$value": "{color-fill}",
+ "$type": "color",
+ "description": "Addon background color.",
+ "fallback": "--ty-color-fill"
+ },
+ "input.addon-padding": {
+ "$value": "{spacing-3}",
+ "$type": "dimension",
+ "description": "Addon padding."
+ },
+ "input.affix-margin": {
+ "$value": "0 8px",
+ "$type": "string",
+ "description": "Prefix and suffix inset margin."
+ },
+ "input.clear-size": {
+ "$value": "1em",
+ "$type": "dimension",
+ "description": "Clear button square size."
+ },
+ "input.clear-color": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Clear button icon color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "input.font-size-sm": {
+ "$value": "{font-size-sm}",
+ "$type": "dimension",
+ "description": "Small input font size.",
+ "fallback": "--ty-font-size-sm"
+ },
+ "input.font-size-md": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Medium input font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "input.font-size-lg": {
+ "$value": "{font-size-lg}",
+ "$type": "dimension",
+ "description": "Large input font size.",
+ "fallback": "--ty-font-size-lg"
+ },
+ "input.height.sm": {
+ "$value": "{height-sm}",
+ "$type": "dimension",
+ "description": "Small input height.",
+ "fallback": "--ty-height-sm"
+ },
+ "input.height.md": {
+ "$value": "{height-md}",
+ "$type": "dimension",
+ "description": "Medium input height.",
+ "fallback": "--ty-height-md"
+ },
+ "input.height.lg": {
+ "$value": "{height-lg}",
+ "$type": "dimension",
+ "description": "Large input height.",
+ "fallback": "--ty-height-lg"
+ },
+ "input.padding-inline-sm": {
+ "$value": "{spacing-3}",
+ "$type": "dimension",
+ "description": "Small input inline padding."
+ },
+ "input.padding-inline-md": {
+ "$value": "{spacing-4}",
+ "$type": "dimension",
+ "description": "Medium input inline padding."
+ },
+ "input.padding-inline-lg": {
+ "$value": "{spacing-5}",
+ "$type": "dimension",
+ "description": "Large input inline padding."
+ },
+ "input.text.disabled": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Disabled input text color.",
+ "fallback": "--ty-color-text-quaternary"
+ }
+}
diff --git a/packages/tokens/source/components/keyboard.json b/packages/tokens/source/components/keyboard.json
new file mode 100644
index 00000000..de96d780
--- /dev/null
+++ b/packages/tokens/source/components/keyboard.json
@@ -0,0 +1,48 @@
+{
+ "keyboard.bg": {
+ "$value": "#f6f6f6",
+ "$type": "color",
+ "description": "Keyboard bg."
+ },
+ "keyboard.border": {
+ "$value": "#d8d8d8",
+ "$type": "color",
+ "description": "Keyboard border."
+ },
+ "keyboard.border-bottom": {
+ "$value": "#ccc",
+ "$type": "color",
+ "description": "Keyboard border bottom."
+ },
+ "keyboard.color": {
+ "$value": "#333",
+ "$type": "color",
+ "description": "Keyboard color."
+ },
+ "keyboard.shadow": {
+ "$value": "inset 0 -1px 0 #ccc",
+ "$type": "shadow",
+ "description": "Keyboard shadow."
+ },
+ "keyboard.font-family": {
+ "$value": "{font-family-monospace}",
+ "$type": "font-family",
+ "description": "Keyboard font family.",
+ "fallback": "--ty-font-family-monospace"
+ },
+ "keyboard.padding": {
+ "$value": "4px 8px",
+ "$type": "string",
+ "description": "Keyboard padding."
+ },
+ "keyboard.radius": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Keyboard border radius."
+ },
+ "keyboard.font-size": {
+ "$value": "11px",
+ "$type": "dimension",
+ "description": "Keyboard font size."
+ }
+}
diff --git a/packages/tokens/source/components/layout.json b/packages/tokens/source/components/layout.json
new file mode 100644
index 00000000..41123987
--- /dev/null
+++ b/packages/tokens/source/components/layout.json
@@ -0,0 +1,76 @@
+{
+ "layout.header-height": {
+ "$value": "60px",
+ "$type": "dimension",
+ "description": "Layout header height."
+ },
+ "layout.header-bg": {
+ "$value": "{color-bg-layout}",
+ "$type": "color",
+ "description": "Layout header background color.",
+ "fallback": "--ty-color-bg-layout"
+ },
+ "layout.footer-padding": {
+ "$value": "24px 50px",
+ "$type": "string",
+ "description": "Layout footer padding."
+ },
+ "layout.footer-bg": {
+ "$value": "{color-bg-layout}",
+ "$type": "color",
+ "description": "Layout footer background color.",
+ "fallback": "--ty-color-bg-layout"
+ },
+ "layout.content-bg": {
+ "$value": "{color-bg-layout}",
+ "$type": "color",
+ "description": "Layout content background color.",
+ "fallback": "--ty-color-bg-layout"
+ },
+ "layout.sidebar-bg": {
+ "$value": "#12131a",
+ "$type": "color",
+ "description": "Layout sidebar bg."
+ },
+ "layout.sidebar-light-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Layout sidebar light bg.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "layout.sidebar-light-color": {
+ "$value": "#333",
+ "$type": "color",
+ "description": "Layout sidebar light color."
+ },
+ "layout.sidebar-light-trigger-bg": {
+ "$value": "#efefef",
+ "$type": "color",
+ "description": "Layout sidebar light trigger bg."
+ },
+ "layout.sidebar-light-trigger-icon": {
+ "$value": "#bbb",
+ "$type": "color",
+ "description": "Layout sidebar light trigger icon."
+ },
+ "layout.sidebar-trigger-bg": {
+ "$value": "rgb(0, 33, 64)",
+ "$type": "color",
+ "description": "Layout sidebar trigger bg."
+ },
+ "layout.sidebar-color": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Layout sidebar text color."
+ },
+ "layout.sidebar-transition-duration": {
+ "$value": "200ms",
+ "$type": "duration",
+ "description": "Layout sidebar transition duration."
+ },
+ "layout.sidebar-trigger-height": {
+ "$value": "40px",
+ "$type": "dimension",
+ "description": "Layout sidebar trigger height."
+ }
+}
diff --git a/packages/tokens/source/components/list.json b/packages/tokens/source/components/list.json
new file mode 100644
index 00000000..00ad8504
--- /dev/null
+++ b/packages/tokens/source/components/list.json
@@ -0,0 +1,116 @@
+{
+ "list.border": {
+ "$value": "#dee2e6",
+ "$type": "color",
+ "description": "List border color."
+ },
+ "list.color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "List text color.",
+ "fallback": "--ty-color-text"
+ },
+ "list.font-size": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "List font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "list.radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "List bordered radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "list.item-padding.sm": {
+ "$value": "8px 16px",
+ "$type": "string",
+ "description": "Small list item padding."
+ },
+ "list.item-padding.md": {
+ "$value": "12px 16px",
+ "$type": "string",
+ "description": "Medium list item padding."
+ },
+ "list.item-padding.lg": {
+ "$value": "16px 24px",
+ "$type": "string",
+ "description": "Large list item padding."
+ },
+ "list.header-padding": {
+ "$value": "12px 16px",
+ "$type": "string",
+ "description": "List header padding."
+ },
+ "list.footer-padding": {
+ "$value": "12px 16px",
+ "$type": "string",
+ "description": "List footer padding."
+ },
+ "list.empty-padding": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "List empty and loading padding."
+ },
+ "list.empty-color": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "List empty and loading color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "list.action-gap": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "List action item gap."
+ },
+ "list.action-offset": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "List action and extra inline offset."
+ },
+ "list.action-color": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "List action color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "list.action-color-hover": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "List action hover color.",
+ "fallback": "--ty-color-primary"
+ },
+ "list.meta-avatar-gap": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "List meta avatar gap."
+ },
+ "list.meta-title-color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "List meta title color.",
+ "fallback": "--ty-color-text"
+ },
+ "list.meta-title-font-weight": {
+ "$value": "500",
+ "$type": "font-weight",
+ "description": "List meta title font weight."
+ },
+ "list.meta-title-margin-bottom": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "List meta title bottom margin."
+ },
+ "list.meta-description-color": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "List meta description color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "list.meta-description-font-size": {
+ "$value": "{font-size-sm}",
+ "$type": "dimension",
+ "description": "List meta description font size.",
+ "fallback": "--ty-font-size-sm"
+ }
+}
diff --git a/packages/tokens/source/components/menu.json b/packages/tokens/source/components/menu.json
new file mode 100644
index 00000000..cb95be8c
--- /dev/null
+++ b/packages/tokens/source/components/menu.json
@@ -0,0 +1,139 @@
+{
+ "menu.dark-bg": {
+ "$value": "#001529",
+ "$type": "color",
+ "description": "Menu dark bg."
+ },
+ "menu.dark-border": {
+ "$value": "#001529",
+ "$type": "color",
+ "description": "Menu dark border."
+ },
+ "menu.dark-color": {
+ "$value": "rgba(255, 255, 255, 0.65)",
+ "$type": "color",
+ "description": "Menu dark color."
+ },
+ "menu.divider-color": {
+ "$value": "rgba(0, 0, 0, 0.1)",
+ "$type": "color",
+ "description": "Menu divider color."
+ },
+ "menu.item-color-active": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Menu active item color.",
+ "fallback": "--ty-color-primary"
+ },
+ "menu.item-color-hover": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Menu item hover color.",
+ "fallback": "--ty-color-primary"
+ },
+ "menu.item-color-disabled": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "Menu disabled item color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "menu.group-title-color": {
+ "$value": "{color-text-tertiary}",
+ "$type": "color",
+ "description": "Menu group title color.",
+ "fallback": "--ty-color-text-tertiary"
+ },
+ "menu.item-padding-vertical": {
+ "$value": "15px 20px",
+ "$type": "string",
+ "description": "Menu item padding vertical."
+ },
+ "menu.horizontal-item-height": {
+ "$value": "48px",
+ "$type": "dimension",
+ "description": "Horizontal menu item height."
+ },
+ "menu.horizontal-item-padding": {
+ "$value": "0 15px",
+ "$type": "string",
+ "description": "Horizontal menu item padding."
+ },
+ "menu.horizontal-item-margin": {
+ "$value": "0 5px",
+ "$type": "string",
+ "description": "Horizontal menu item margin."
+ },
+ "menu.horizontal-active-border-width": {
+ "$value": "2px",
+ "$type": "dimension",
+ "description": "Horizontal menu active indicator width."
+ },
+ "menu.inline-item-margin": {
+ "$value": "5px 0",
+ "$type": "string",
+ "description": "Inline and vertical menu item margin."
+ },
+ "menu.sub-list-popup-min-width": {
+ "$value": "160px",
+ "$type": "dimension",
+ "description": "Menu popup sub list min width."
+ },
+ "menu.sub-arrow-margin-start": {
+ "$value": "20px",
+ "$type": "dimension",
+ "description": "Menu sub arrow inline start margin."
+ },
+ "menu.group-title-padding": {
+ "$value": "10px 16px",
+ "$type": "string",
+ "description": "Menu group title padding."
+ },
+ "menu.group-title-font-size": {
+ "$value": "14px",
+ "$type": "dimension",
+ "description": "Menu group title font size."
+ },
+ "menu.group-title-first-margin-top": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Menu first group title top margin."
+ },
+ "menu.group-list-item-padding": {
+ "$value": "12px 35px 12px 25px",
+ "$type": "string",
+ "description": "Menu group child item padding."
+ },
+ "menu.divider-margin": {
+ "$value": "5px 0",
+ "$type": "string",
+ "description": "Menu divider margin."
+ },
+ "menu.active-bg": {
+ "$value": "{color-primary-bg}",
+ "$type": "color",
+ "description": "Menu active item background color.",
+ "fallback": "--ty-color-primary-bg"
+ },
+ "menu.active-border-width.inline": {
+ "$value": "3px",
+ "$type": "dimension",
+ "description": "Inline menu active border width."
+ },
+ "menu.light-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Menu light bg.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "menu.light-border": {
+ "$value": "{color-fill-tertiary}",
+ "$type": "color",
+ "description": "Menu light border.",
+ "fallback": "--ty-color-fill-tertiary"
+ },
+ "menu.light-color": {
+ "$value": "#32325d",
+ "$type": "color",
+ "description": "Menu light color."
+ }
+}
diff --git a/packages/tokens/source/components/message.json b/packages/tokens/source/components/message.json
new file mode 100644
index 00000000..9fb272eb
--- /dev/null
+++ b/packages/tokens/source/components/message.json
@@ -0,0 +1,66 @@
+{
+ "message.bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Message panel background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "message.radius": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Message panel border radius."
+ },
+ "message.padding": {
+ "$value": "10px 16px",
+ "$type": "string",
+ "description": "Message panel padding."
+ },
+ "message.shadow": {
+ "$value": "{shadow-modal}",
+ "$type": "shadow",
+ "description": "Message panel shadow.",
+ "fallback": "--ty-shadow-modal"
+ },
+ "message.font-size": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Message panel font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "message.content-color": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "Message content color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "message.content-line-height": {
+ "$value": "14px",
+ "$type": "dimension",
+ "description": "Message content line height."
+ },
+ "message.icon-gap": {
+ "$value": "5px",
+ "$type": "dimension",
+ "description": "Gap between message icon and content."
+ },
+ "message.extra-gap": {
+ "$value": "15px",
+ "$type": "dimension",
+ "description": "Gap between message content and extra action."
+ },
+ "message.transition-duration": {
+ "$value": "300ms",
+ "$type": "duration",
+ "description": "Message panel transition duration."
+ },
+ "message.offset-y.enter": {
+ "$value": "-5px",
+ "$type": "dimension",
+ "description": "Message enter transform offset."
+ },
+ "message.z-index": {
+ "$value": "999",
+ "$type": "number",
+ "description": "Message container stacking order."
+ }
+}
diff --git a/packages/tokens/source/components/modal.json b/packages/tokens/source/components/modal.json
new file mode 100644
index 00000000..55ca6a05
--- /dev/null
+++ b/packages/tokens/source/components/modal.json
@@ -0,0 +1,130 @@
+{
+ "modal.radius": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Modal panel border radius."
+ },
+ "modal.shadow": {
+ "$value": "{shadow-modal}",
+ "$type": "shadow",
+ "description": "Modal panel shadow.",
+ "fallback": "--ty-shadow-modal"
+ },
+ "modal.bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Modal panel background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "modal.offset-top": {
+ "$value": "100px",
+ "$type": "dimension",
+ "description": "Default modal vertical offset."
+ },
+ "modal.enter-offset-y": {
+ "$value": "-20px",
+ "$type": "dimension",
+ "description": "Modal slide enter and exit offset."
+ },
+ "modal.scale-enter": {
+ "$value": "0",
+ "$type": "number",
+ "description": "Modal scale enter and exit start value."
+ },
+ "modal.transition-duration": {
+ "$value": "300ms",
+ "$type": "duration",
+ "description": "Modal content transition duration."
+ },
+ "modal.header-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Modal header background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "modal.header-color": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "Modal header text color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "modal.header-padding-block": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Modal header vertical padding."
+ },
+ "modal.header-padding-inline": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "Modal header horizontal padding."
+ },
+ "modal.header-border": {
+ "$value": "{color-border-secondary}",
+ "$type": "color",
+ "description": "Modal header border color.",
+ "fallback": "--ty-color-border-secondary"
+ },
+ "modal.title-color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Modal title text color.",
+ "fallback": "--ty-color-text"
+ },
+ "modal.title-font-weight": {
+ "$value": "500",
+ "$type": "font-weight",
+ "description": "Modal title font weight."
+ },
+ "modal.title-font-size": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Modal title font size."
+ },
+ "modal.title-line-height": {
+ "$value": "22px",
+ "$type": "dimension",
+ "description": "Modal title line height."
+ },
+ "modal.close-color": {
+ "$value": "{color-text-tertiary}",
+ "$type": "color",
+ "description": "Modal close button color.",
+ "fallback": "--ty-color-text-tertiary"
+ },
+ "modal.close-size": {
+ "$value": "56px",
+ "$type": "dimension",
+ "description": "Modal close button square size."
+ },
+ "modal.body-padding": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "Modal body padding."
+ },
+ "modal.body-font-size": {
+ "$value": "14px",
+ "$type": "dimension",
+ "description": "Modal body font size."
+ },
+ "modal.body-line-height": {
+ "$value": "1.5",
+ "$type": "line-height",
+ "description": "Modal body line height."
+ },
+ "modal.footer-padding-block": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "Modal footer vertical padding."
+ },
+ "modal.footer-padding-inline": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Modal footer horizontal padding."
+ },
+ "modal.footer-border": {
+ "$value": "{color-border-secondary}",
+ "$type": "color",
+ "description": "Modal footer border color.",
+ "fallback": "--ty-color-border-secondary"
+ }
+}
diff --git a/packages/tokens/source/components/native-select.json b/packages/tokens/source/components/native-select.json
new file mode 100644
index 00000000..56612888
--- /dev/null
+++ b/packages/tokens/source/components/native-select.json
@@ -0,0 +1,92 @@
+{
+ "native-select.bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Native Select bg.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "native-select.color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Native Select text color.",
+ "fallback": "--ty-color-text"
+ },
+ "native-select.border": {
+ "$value": "{color-border}",
+ "$type": "color",
+ "description": "Native Select border color.",
+ "fallback": "--ty-color-border"
+ },
+ "native-select.radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "Native Select radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "native-select.border-hover": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Native Select hover border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "native-select.border-focus": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Native Select focus border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "native-select.shadow-focus": {
+ "$value": "{shadow-focus}",
+ "$type": "shadow",
+ "description": "Native Select focus shadow.",
+ "fallback": "--ty-shadow-focus"
+ },
+ "native-select.disabled-bg": {
+ "$value": "#ddd",
+ "$type": "color",
+ "description": "Native Select disabled bg."
+ },
+ "native-select.disabled-color": {
+ "$value": "#a5a5a5",
+ "$type": "color",
+ "description": "Native Select disabled color."
+ },
+ "native-select.opacity-disabled": {
+ "$value": "0.75",
+ "$type": "number",
+ "description": "Native Select disabled opacity."
+ },
+ "native-select.lg-padding": {
+ "$value": "9px 25px 9px 7px",
+ "$type": "string",
+ "description": "Native Select lg padding."
+ },
+ "native-select.md-padding": {
+ "$value": "6px 25px 6px 7px",
+ "$type": "string",
+ "description": "Native Select md padding."
+ },
+ "native-select.sm-padding": {
+ "$value": "3px 25px 3px 7px",
+ "$type": "string",
+ "description": "Native Select sm padding."
+ },
+ "native-select.font-size.sm": {
+ "$value": "{font-size-sm}",
+ "$type": "dimension",
+ "description": "Small Native Select font size.",
+ "fallback": "--ty-font-size-sm"
+ },
+ "native-select.font-size.md": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Medium Native Select font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "native-select.font-size.lg": {
+ "$value": "{font-size-lg}",
+ "$type": "dimension",
+ "description": "Large Native Select font size.",
+ "fallback": "--ty-font-size-lg"
+ }
+}
diff --git a/packages/tokens/source/components/notification.json b/packages/tokens/source/components/notification.json
new file mode 100644
index 00000000..17426df6
--- /dev/null
+++ b/packages/tokens/source/components/notification.json
@@ -0,0 +1,107 @@
+{
+ "notification.bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Notification panel background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "notification.border-radius": {
+ "$value": "3px",
+ "$type": "dimension",
+ "description": "Notification panel border radius."
+ },
+ "notification.color": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "Notification body text color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "notification.close-color": {
+ "$value": "rgba(0, 0, 0, 0.2)",
+ "$type": "color",
+ "description": "Notification close button color."
+ },
+ "notification.close-hover": {
+ "$value": "rgba(0, 0, 0, 0.7)",
+ "$type": "color",
+ "description": "Notification close button hover color."
+ },
+ "notification.close-offset-inline-end": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "Notification close button inline end offset."
+ },
+ "notification.close-offset-top": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Notification close button top offset."
+ },
+ "notification.font-size": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Notification body font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "notification.icon-gap": {
+ "$value": "15px",
+ "$type": "dimension",
+ "description": "Gap between notification icon and body."
+ },
+ "notification.icon-height": {
+ "$value": "30px",
+ "$type": "dimension",
+ "description": "Notification icon visual height."
+ },
+ "notification.margin": {
+ "$value": "20px",
+ "$type": "dimension",
+ "description": "Notification container edge margin."
+ },
+ "notification.padding": {
+ "$value": "16px 24px",
+ "$type": "dimension",
+ "description": "Notification panel padding."
+ },
+ "notification.shadow": {
+ "$value": "{shadow-modal}",
+ "$type": "shadow",
+ "description": "Notification panel shadow.",
+ "fallback": "--ty-shadow-modal"
+ },
+ "notification.title-font-size": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Notification title font size."
+ },
+ "notification.title-color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Notification title color.",
+ "fallback": "--ty-color-text"
+ },
+ "notification.title-line-height": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "Notification title line height."
+ },
+ "notification.title-margin-bottom": {
+ "$value": "5px",
+ "$type": "dimension",
+ "description": "Notification title bottom margin."
+ },
+ "notification.title-padding-inline-end": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "Notification title inline end padding."
+ },
+ "notification.width": {
+ "$value": "380px",
+ "$type": "dimension",
+ "description": "Notification container width."
+ },
+ "notification.z-index": {
+ "$value": "999",
+ "$type": "number",
+ "description": "Notification container stacking order."
+ }
+}
diff --git a/packages/tokens/source/components/pagination.json b/packages/tokens/source/components/pagination.json
new file mode 100644
index 00000000..c7d45340
--- /dev/null
+++ b/packages/tokens/source/components/pagination.json
@@ -0,0 +1,128 @@
+{
+ "pagination.color": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "Pagination text color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "pagination.font-size": {
+ "$value": "14px",
+ "$type": "dimension",
+ "description": "Pagination font size."
+ },
+ "pagination.item-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Pagination item background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "pagination.item-radius": {
+ "$value": "2px",
+ "$type": "dimension",
+ "description": "Pagination item border radius."
+ },
+ "pagination.item-transition-duration": {
+ "$value": "400ms",
+ "$type": "duration",
+ "description": "Pagination item transition duration."
+ },
+ "pagination.item-color.ellipsis": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Pagination ellipsis color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "pagination.item-color.ellipsis-hover": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Pagination ellipsis hover color.",
+ "fallback": "--ty-color-primary"
+ },
+ "pagination.item-size.md": {
+ "$value": "32px",
+ "$type": "dimension",
+ "description": "Medium pagination item size."
+ },
+ "pagination.item-size.sm": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "Small pagination item size."
+ },
+ "pagination.item-gap.md": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Medium pagination item gap."
+ },
+ "pagination.item-gap.sm": {
+ "$value": "0.5px",
+ "$type": "dimension",
+ "description": "Small pagination item gap."
+ },
+ "pagination.item-line-height.md": {
+ "$value": "30px",
+ "$type": "dimension",
+ "description": "Medium pagination item line height."
+ },
+ "pagination.item-line-height.sm": {
+ "$value": "22px",
+ "$type": "dimension",
+ "description": "Small pagination item line height."
+ },
+ "pagination.item-border.md": {
+ "$value": "{color-border}",
+ "$type": "color",
+ "description": "Medium pagination item border color.",
+ "fallback": "--ty-color-border"
+ },
+ "pagination.item-color.active": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Active pagination item text color.",
+ "fallback": "--ty-color-primary"
+ },
+ "pagination.item-border.active": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Active pagination item border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "pagination.item-border.hover": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Medium pagination item hover border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "pagination.item-color.hover.sm": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Small pagination item hover text color.",
+ "fallback": "--ty-color-primary"
+ },
+ "pagination.disabled-active-bg": {
+ "$value": "#dbdbdb",
+ "$type": "color",
+ "description": "Disabled active pagination item background color."
+ },
+ "pagination.disabled-active-color": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Disabled active pagination item text color."
+ },
+ "pagination.disabled-bg": {
+ "$value": "{color-fill-secondary}",
+ "$type": "color",
+ "description": "Disabled pagination item background color.",
+ "fallback": "--ty-color-fill-secondary"
+ },
+ "pagination.disabled-color.md": {
+ "$value": "{color-text-tertiary}",
+ "$type": "color",
+ "description": "Medium disabled pagination item text color.",
+ "fallback": "--ty-color-text-tertiary"
+ },
+ "pagination.disabled-color.sm": {
+ "$value": "#d9d9d9",
+ "$type": "color",
+ "description": "Small disabled pagination item text and border color."
+ }
+}
diff --git a/packages/tokens/source/components/picker.json b/packages/tokens/source/components/picker.json
new file mode 100644
index 00000000..2c398d6d
--- /dev/null
+++ b/packages/tokens/source/components/picker.json
@@ -0,0 +1,407 @@
+{
+ "picker.cell-disabled-bg": {
+ "$value": "{color-fill-secondary}",
+ "$type": "color",
+ "description": "Picker cell disabled bg.",
+ "fallback": "--ty-color-fill-secondary"
+ },
+ "picker.input-font-size": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Picker input font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "picker.input-padding.md": {
+ "$value": "4px 11px",
+ "$type": "string",
+ "description": "Picker medium input padding."
+ },
+ "picker.input-padding.sm": {
+ "$value": "0 7px",
+ "$type": "string",
+ "description": "Picker small input padding."
+ },
+ "picker.input-padding.lg": {
+ "$value": "6px 11px",
+ "$type": "string",
+ "description": "Picker large input padding."
+ },
+ "picker.input-border": {
+ "$value": "{color-border}",
+ "$type": "color",
+ "description": "Picker input border color.",
+ "fallback": "--ty-color-border"
+ },
+ "picker.input-radius": {
+ "$value": "6px",
+ "$type": "dimension",
+ "description": "Picker input radius."
+ },
+ "picker.input-border-hover": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Picker input hover border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "picker.input-border-focus": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Picker input focus border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "picker.input-shadow-focus": {
+ "$value": "{shadow-focus}",
+ "$type": "shadow",
+ "description": "Picker input focus shadow.",
+ "fallback": "--ty-shadow-focus"
+ },
+ "picker.input-bg-disabled": {
+ "$value": "{color-bg-disabled}",
+ "$type": "color",
+ "description": "Picker disabled input background color.",
+ "fallback": "--ty-color-bg-disabled"
+ },
+ "picker.input-color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Picker input text color.",
+ "fallback": "--ty-color-text"
+ },
+ "picker.input-color-placeholder": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Picker input placeholder color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "picker.input-color-muted": {
+ "$value": "{color-text-tertiary}",
+ "$type": "color",
+ "description": "Picker muted input text color.",
+ "fallback": "--ty-color-text-tertiary"
+ },
+ "picker.input-min-width.date.sm": {
+ "$value": "90px",
+ "$type": "dimension",
+ "description": "Small date picker input min width."
+ },
+ "picker.input-min-width.date.md": {
+ "$value": "120px",
+ "$type": "dimension",
+ "description": "Medium date picker input min width."
+ },
+ "picker.input-min-width.date.lg": {
+ "$value": "140px",
+ "$type": "dimension",
+ "description": "Large date picker input min width."
+ },
+ "picker.input-min-width.time.sm": {
+ "$value": "70px",
+ "$type": "dimension",
+ "description": "Small time picker input min width."
+ },
+ "picker.input-min-width.time.md": {
+ "$value": "90px",
+ "$type": "dimension",
+ "description": "Medium time picker input min width."
+ },
+ "picker.input-min-width.time.lg": {
+ "$value": "110px",
+ "$type": "dimension",
+ "description": "Large time picker input min width."
+ },
+ "picker.suffix-size": {
+ "$value": "14px",
+ "$type": "dimension",
+ "description": "Picker suffix box size."
+ },
+ "picker.suffix-gap": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Picker suffix gap."
+ },
+ "picker.suffix-color": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Picker suffix color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "picker.cell-hover-bg": {
+ "$value": "{color-fill-secondary}",
+ "$type": "color",
+ "description": "Picker cell hover bg.",
+ "fallback": "--ty-color-fill-secondary"
+ },
+ "picker.cell-selected-hover-bg": {
+ "$value": "{color-primary-active}",
+ "$type": "color",
+ "description": "Picker cell selected hover bg.",
+ "fallback": "--ty-color-primary-active"
+ },
+ "picker.clear-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Picker clear bg.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "picker.clear-color": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Picker clear icon color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "picker.clear-color-hover": {
+ "$value": "{color-text-tertiary}",
+ "$type": "color",
+ "description": "Picker clear icon hover color.",
+ "fallback": "--ty-color-text-tertiary"
+ },
+ "picker.dropdown-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Picker dropdown bg.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "picker.dropdown-radius": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Picker dropdown radius."
+ },
+ "picker.dropdown-shadow": {
+ "$value": "{shadow-popup}",
+ "$type": "shadow",
+ "description": "Picker dropdown shadow.",
+ "fallback": "--ty-shadow-popup"
+ },
+ "picker.header-padding": {
+ "$value": "8px 12px",
+ "$type": "string",
+ "description": "Picker header padding."
+ },
+ "picker.header-border": {
+ "$value": "{color-border-light}",
+ "$type": "color",
+ "description": "Picker header and footer border color.",
+ "fallback": "--ty-color-border-light"
+ },
+ "picker.header-button-size": {
+ "$value": "28px",
+ "$type": "dimension",
+ "description": "Picker header button size."
+ },
+ "picker.header-button-radius": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Picker header button radius."
+ },
+ "picker.header-button-color": {
+ "$value": "{color-text-tertiary}",
+ "$type": "color",
+ "description": "Picker header button color.",
+ "fallback": "--ty-color-text-tertiary"
+ },
+ "picker.header-button-color-hover": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Picker header button hover color.",
+ "fallback": "--ty-color-primary"
+ },
+ "picker.header-label-font-size": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Picker header label font size."
+ },
+ "picker.header-label-font-weight": {
+ "$value": "500",
+ "$type": "font-weight",
+ "description": "Picker header label font weight."
+ },
+ "picker.header-caption-gap": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Picker header caption gap."
+ },
+ "picker.body-padding": {
+ "$value": "8px 12px",
+ "$type": "string",
+ "description": "Date picker body padding."
+ },
+ "picker.footer-padding": {
+ "$value": "8px 12px",
+ "$type": "string",
+ "description": "Picker footer padding."
+ },
+ "picker.footer-font-size": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "Time picker footer font size."
+ },
+ "picker.today-font-size": {
+ "$value": "13px",
+ "$type": "dimension",
+ "description": "Picker today button font size."
+ },
+ "picker.today-color": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Picker today and now action color.",
+ "fallback": "--ty-color-primary"
+ },
+ "picker.today-color-hover": {
+ "$value": "{color-primary-hover}",
+ "$type": "color",
+ "description": "Picker today and now action hover color.",
+ "fallback": "--ty-color-primary-hover"
+ },
+ "picker.input-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Picker input bg.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "picker.cell-font-size": {
+ "$value": "13px",
+ "$type": "dimension",
+ "description": "Picker date cell font size."
+ },
+ "picker.cell-size": {
+ "$value": "28px",
+ "$type": "dimension",
+ "description": "Picker date cell inner size."
+ },
+ "picker.cell-radius": {
+ "$value": "6px",
+ "$type": "dimension",
+ "description": "Picker date cell radius."
+ },
+ "picker.cell-color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Picker active cell text color.",
+ "fallback": "--ty-color-text"
+ },
+ "picker.cell-color-muted": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Picker muted cell text color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "picker.cell-today-border": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Picker today cell border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "picker.cell-selected-bg": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Picker selected cell background color.",
+ "fallback": "--ty-color-primary"
+ },
+ "picker.cell-selected-color": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Picker selected cell text color."
+ },
+ "picker.range-bg": {
+ "$value": "{color-primary-bg}",
+ "$type": "color",
+ "description": "Picker range background color.",
+ "fallback": "--ty-color-primary-bg"
+ },
+ "picker.time-column-max-height": {
+ "$value": "224px",
+ "$type": "dimension",
+ "description": "Time picker column max height."
+ },
+ "picker.time-column-border": {
+ "$value": "{color-border-light}",
+ "$type": "color",
+ "description": "Time picker column separator color.",
+ "fallback": "--ty-color-border-light"
+ },
+ "picker.time-scrollbar-thumb": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Time picker scrollbar thumb color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "picker.time-cell-padding": {
+ "$value": "4px 0",
+ "$type": "string",
+ "description": "Time picker cell padding."
+ },
+ "picker.time-cell-min-width": {
+ "$value": "52px",
+ "$type": "dimension",
+ "description": "Time picker cell min width."
+ },
+ "picker.time-cell-radius": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Time picker cell radius."
+ },
+ "picker.time-cell-margin-inline": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Time picker cell horizontal margin."
+ },
+ "picker.time-cell-line-height": {
+ "$value": "20px",
+ "$type": "dimension",
+ "description": "Time picker cell line height."
+ },
+ "picker.time-cell-bg-selected": {
+ "$value": "{color-primary-bg}",
+ "$type": "color",
+ "description": "Time picker selected cell background color.",
+ "fallback": "--ty-color-primary-bg"
+ },
+ "picker.time-cell-bg-selected-hover": {
+ "$value": "{color-primary-bg-hover}",
+ "$type": "color",
+ "description": "Time picker selected cell hover background color.",
+ "fallback": "--ty-color-primary-bg-hover"
+ },
+ "picker.time-cell-font-weight-selected": {
+ "$value": "500",
+ "$type": "font-weight",
+ "description": "Time picker selected cell font weight."
+ },
+ "picker.ok-button-padding": {
+ "$value": "0 8px",
+ "$type": "string",
+ "description": "Time picker ok button padding."
+ },
+ "picker.ok-button-height": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "Time picker ok button height."
+ },
+ "picker.ok-button-font-size": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "Time picker ok button font size."
+ },
+ "picker.ok-button-radius": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Time picker ok button radius."
+ },
+ "picker.ok-button-bg": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Time picker ok button background color.",
+ "fallback": "--ty-color-primary"
+ },
+ "picker.ok-button-bg-hover": {
+ "$value": "{color-primary-hover}",
+ "$type": "color",
+ "description": "Time picker ok button hover background color.",
+ "fallback": "--ty-color-primary-hover"
+ },
+ "picker.ok-button-color": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Time picker ok button text color."
+ }
+}
diff --git a/packages/tokens/source/components/popover.json b/packages/tokens/source/components/popover.json
new file mode 100644
index 00000000..48384450
--- /dev/null
+++ b/packages/tokens/source/components/popover.json
@@ -0,0 +1,65 @@
+{
+ "popover.arrow-size": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Popover arrow size."
+ },
+ "popover.title-padding": {
+ "$value": "9px 16px 7px",
+ "$type": "string",
+ "description": "Popover title padding."
+ },
+ "popover.title-font-weight": {
+ "$value": "500",
+ "$type": "font-weight",
+ "description": "Popover title font weight."
+ },
+ "popover.title-min-width": {
+ "$value": "177px",
+ "$type": "dimension",
+ "description": "Popover title min width."
+ },
+ "popover.title-min-height": {
+ "$value": "32px",
+ "$type": "dimension",
+ "description": "Popover title min height."
+ },
+ "popover.title-color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Light popover title color.",
+ "fallback": "--ty-color-text"
+ },
+ "popover.title-color.dark": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Dark popover title color."
+ },
+ "popover.title-border": {
+ "$value": "{color-border-secondary}",
+ "$type": "color",
+ "description": "Light popover title border color.",
+ "fallback": "--ty-color-border-secondary"
+ },
+ "popover.dark-border": {
+ "$value": "#4a4a4a",
+ "$type": "color",
+ "description": "Dark popover title border color."
+ },
+ "popover.content-padding": {
+ "$value": "12px 15px",
+ "$type": "string",
+ "description": "Popover content padding."
+ },
+ "popover.content-color": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "Light popover content color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "popover.content-color.dark": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Dark popover content color."
+ }
+}
diff --git a/packages/tokens/source/components/popup.json b/packages/tokens/source/components/popup.json
new file mode 100644
index 00000000..03a337cc
--- /dev/null
+++ b/packages/tokens/source/components/popup.json
@@ -0,0 +1,52 @@
+{
+ "popup.radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "Popup panel border radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "popup.font-size": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Popup panel font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "popup.shadow": {
+ "$value": "{shadow-popup}",
+ "$type": "shadow",
+ "description": "Popup panel shadow.",
+ "fallback": "--ty-shadow-popup"
+ },
+ "popup.color.light": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "Light popup text color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "popup.color.dark": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Dark popup text color."
+ },
+ "popup.arrow-shadow": {
+ "$value": "rgba(0, 0, 0, 0.07)",
+ "$type": "shadow",
+ "description": "Popup arrow shadow."
+ },
+ "popup.dark-bg": {
+ "$value": "#262626",
+ "$type": "color",
+ "description": "Popup dark bg."
+ },
+ "popup.light-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Popup light bg.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "popup.z-index": {
+ "$value": "999",
+ "$type": "number",
+ "description": "Popup stacking order."
+ }
+}
diff --git a/packages/tokens/source/components/progress.json b/packages/tokens/source/components/progress.json
new file mode 100644
index 00000000..bf746e6d
--- /dev/null
+++ b/packages/tokens/source/components/progress.json
@@ -0,0 +1,82 @@
+{
+ "progress.circle-trail": {
+ "$value": "#e5e9f2",
+ "$type": "color",
+ "description": "Progress circle trail."
+ },
+ "progress.font-size": {
+ "$value": "13px",
+ "$type": "dimension",
+ "description": "Progress bar text font size."
+ },
+ "progress.text-color": {
+ "$value": "#48576a",
+ "$type": "color",
+ "description": "Progress text color."
+ },
+ "progress.text-offset": {
+ "$value": "10px",
+ "$type": "dimension",
+ "description": "Progress text inline offset."
+ },
+ "progress.text-min-width": {
+ "$value": "40px",
+ "$type": "dimension",
+ "description": "Progress text min width."
+ },
+ "progress.inner-text-color": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Progress inner text color."
+ },
+ "progress.inner-text-font-size": {
+ "$value": "10px",
+ "$type": "dimension",
+ "description": "Progress inner text font size."
+ },
+ "progress.inner-text-margin": {
+ "$value": "0 5px",
+ "$type": "string",
+ "description": "Progress inner text margin."
+ },
+ "progress.trail-bg": {
+ "$value": "#e4e8f1",
+ "$type": "color",
+ "description": "Progress trail bg."
+ },
+ "progress.stroke-color.primary": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Primary progress stroke color.",
+ "fallback": "--ty-color-primary"
+ },
+ "progress.stroke-color.warning": {
+ "$value": "{color-warning}",
+ "$type": "color",
+ "description": "Warning progress stroke color.",
+ "fallback": "--ty-color-warning"
+ },
+ "progress.stroke-color.info": {
+ "$value": "{color-info}",
+ "$type": "color",
+ "description": "Info progress stroke color.",
+ "fallback": "--ty-color-info"
+ },
+ "progress.stroke-color.danger": {
+ "$value": "{color-danger}",
+ "$type": "color",
+ "description": "Danger progress stroke color.",
+ "fallback": "--ty-color-danger"
+ },
+ "progress.stroke-color.success": {
+ "$value": "{color-success}",
+ "$type": "color",
+ "description": "Success progress stroke color.",
+ "fallback": "--ty-color-success"
+ },
+ "progress.circle-text-font-size": {
+ "$value": "20px",
+ "$type": "dimension",
+ "description": "Progress circle text font size."
+ }
+}
diff --git a/packages/tokens/source/components/radio.json b/packages/tokens/source/components/radio.json
new file mode 100644
index 00000000..8be06562
--- /dev/null
+++ b/packages/tokens/source/components/radio.json
@@ -0,0 +1,64 @@
+{
+ "radio.size": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Radio control size."
+ },
+ "radio.dot-size": {
+ "$value": "10px",
+ "$type": "dimension",
+ "description": "Radio inner dot size."
+ },
+ "radio.label-gap": {
+ "$value": "5px",
+ "$type": "dimension",
+ "description": "Gap between radio control and label."
+ },
+ "radio.label-color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Radio label color.",
+ "fallback": "--ty-color-text"
+ },
+ "radio.bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Radio background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "radio.border": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Radio border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "radio.border.checked": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Checked radio border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "radio.dot-bg": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Radio dot color.",
+ "fallback": "--ty-color-primary"
+ },
+ "radio.border.disabled": {
+ "$value": "{color-border}",
+ "$type": "color",
+ "description": "Disabled radio border color.",
+ "fallback": "--ty-color-border"
+ },
+ "radio.dot-bg.disabled": {
+ "$value": "rgba(0, 0, 0, 0.2)",
+ "$type": "color",
+ "description": "Disabled radio dot color."
+ },
+ "radio.label-color.disabled": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Disabled radio label color.",
+ "fallback": "--ty-color-text-quaternary"
+ }
+}
diff --git a/packages/tokens/source/components/result.json b/packages/tokens/source/components/result.json
new file mode 100644
index 00000000..d81c055f
--- /dev/null
+++ b/packages/tokens/source/components/result.json
@@ -0,0 +1,70 @@
+{
+ "result.content-bg": {
+ "$value": "{color-fill}",
+ "$type": "color",
+ "description": "Result content bg.",
+ "fallback": "--ty-color-fill"
+ },
+ "result.padding": {
+ "$value": "48px 32px",
+ "$type": "string",
+ "description": "Result container padding."
+ },
+ "result.icon-margin-bottom": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "Result icon bottom margin."
+ },
+ "result.title-color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Result title color.",
+ "fallback": "--ty-color-text"
+ },
+ "result.title-font-size": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "Result title font size."
+ },
+ "result.title-line-height": {
+ "$value": "1.8",
+ "$type": "line-height",
+ "description": "Result title line height."
+ },
+ "result.subtitle-color": {
+ "$value": "{color-text-tertiary}",
+ "$type": "color",
+ "description": "Result subtitle color.",
+ "fallback": "--ty-color-text-tertiary"
+ },
+ "result.subtitle-font-size": {
+ "$value": "14px",
+ "$type": "dimension",
+ "description": "Result subtitle font size."
+ },
+ "result.subtitle-line-height": {
+ "$value": "1.6",
+ "$type": "line-height",
+ "description": "Result subtitle line height."
+ },
+ "result.extra-margin-top": {
+ "$value": "32px",
+ "$type": "dimension",
+ "description": "Result extra actions top margin."
+ },
+ "result.content-margin-top": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "Result content top margin."
+ },
+ "result.content-margin-inline": {
+ "$value": "30px",
+ "$type": "dimension",
+ "description": "Result content horizontal margin."
+ },
+ "result.content-padding": {
+ "$value": "24px 40px",
+ "$type": "string",
+ "description": "Result content padding."
+ }
+}
diff --git a/packages/tokens/source/components/segmented.json b/packages/tokens/source/components/segmented.json
new file mode 100644
index 00000000..9cb7828b
--- /dev/null
+++ b/packages/tokens/source/components/segmented.json
@@ -0,0 +1,99 @@
+{
+ "segmented.active-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Segmented active bg.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "segmented.bg": {
+ "$value": "#e9ecef",
+ "$type": "color",
+ "description": "Segmented bg."
+ },
+ "segmented.radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "Segmented radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "segmented.padding": {
+ "$value": "2px",
+ "$type": "dimension",
+ "description": "Segmented container padding."
+ },
+ "segmented.item-gap": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Segmented item content gap."
+ },
+ "segmented.item-color-hover": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Segmented hover item color.",
+ "fallback": "--ty-color-text"
+ },
+ "segmented.item-color-active": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Segmented active item color.",
+ "fallback": "--ty-color-text"
+ },
+ "segmented.item-shadow-active": {
+ "$value": "0 1px 2px 0 rgb(0 0 0 / 6%), 0 1px 3px 0 rgb(0 0 0 / 10%)",
+ "$type": "shadow",
+ "description": "Segmented active item shadow."
+ },
+ "segmented.item-font-weight-active": {
+ "$value": "500",
+ "$type": "font-weight",
+ "description": "Segmented active item font weight."
+ },
+ "segmented.item-padding.sm": {
+ "$value": "0 8px",
+ "$type": "string",
+ "description": "Small segmented item padding."
+ },
+ "segmented.item-padding.md": {
+ "$value": "0 12px",
+ "$type": "string",
+ "description": "Medium segmented item padding."
+ },
+ "segmented.item-padding.lg": {
+ "$value": "0 16px",
+ "$type": "string",
+ "description": "Large segmented item padding."
+ },
+ "segmented.item-height.sm": {
+ "$value": "calc({height-sm} - 4px)",
+ "$type": "string",
+ "description": "Small segmented item height."
+ },
+ "segmented.item-height.md": {
+ "$value": "calc({height-md} - 4px)",
+ "$type": "string",
+ "description": "Medium segmented item height."
+ },
+ "segmented.item-height.lg": {
+ "$value": "calc({height-lg} - 4px)",
+ "$type": "string",
+ "description": "Large segmented item height."
+ },
+ "segmented.font-size.sm": {
+ "$value": "{font-size-sm}",
+ "$type": "dimension",
+ "description": "Small segmented font size.",
+ "fallback": "--ty-font-size-sm"
+ },
+ "segmented.font-size.md": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Medium segmented font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "segmented.font-size.lg": {
+ "$value": "{font-size-lg}",
+ "$type": "dimension",
+ "description": "Large segmented font size.",
+ "fallback": "--ty-font-size-lg"
+ }
+}
diff --git a/packages/tokens/source/components/select.json b/packages/tokens/source/components/select.json
new file mode 100644
index 00000000..b2056da7
--- /dev/null
+++ b/packages/tokens/source/components/select.json
@@ -0,0 +1,286 @@
+{
+ "select.radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "Select trigger border radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "select.color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Select trigger text color.",
+ "fallback": "--ty-color-text"
+ },
+ "select.bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Select trigger background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "select.bg.disabled": {
+ "$value": "{color-bg-disabled}",
+ "$type": "color",
+ "description": "Disabled select trigger background color.",
+ "fallback": "--ty-color-bg-disabled"
+ },
+ "select.border": {
+ "$value": "{color-border}",
+ "$type": "color",
+ "description": "Select trigger border color.",
+ "fallback": "--ty-color-border"
+ },
+ "select.border.hover": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Select trigger hover border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "select.border.focus": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Select trigger focus border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "select.shadow.focus": {
+ "$value": "{shadow-focus}",
+ "$type": "shadow",
+ "description": "Select trigger focus ring shadow.",
+ "fallback": "--ty-shadow-focus"
+ },
+ "select.placeholder": {
+ "$value": "{color-text-placeholder}",
+ "$type": "color",
+ "description": "Select placeholder text color.",
+ "fallback": "--ty-color-text-placeholder"
+ },
+ "select.suffix-color": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Select suffix icon color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "select.suffix-size": {
+ "$value": "14px",
+ "$type": "dimension",
+ "description": "Select suffix icon box size."
+ },
+ "select.clear-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Select clear button background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "select.clear-color": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Select clear button icon color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "select.clear-color-hover": {
+ "$value": "{color-text-tertiary}",
+ "$type": "color",
+ "description": "Select clear button icon hover color.",
+ "fallback": "--ty-color-text-tertiary"
+ },
+ "select.font-size.sm": {
+ "$value": "{font-size-sm}",
+ "$type": "dimension",
+ "description": "Small select trigger font size.",
+ "fallback": "--ty-font-size-sm"
+ },
+ "select.font-size.md": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Medium select trigger font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "select.font-size.lg": {
+ "$value": "{font-size-lg}",
+ "$type": "dimension",
+ "description": "Large select trigger font size.",
+ "fallback": "--ty-font-size-lg"
+ },
+ "select.height.sm": {
+ "$value": "{height-sm}",
+ "$type": "dimension",
+ "description": "Small select trigger height.",
+ "fallback": "--ty-height-sm"
+ },
+ "select.height.md": {
+ "$value": "{height-md}",
+ "$type": "dimension",
+ "description": "Medium select trigger height.",
+ "fallback": "--ty-height-md"
+ },
+ "select.height.lg": {
+ "$value": "{height-lg}",
+ "$type": "dimension",
+ "description": "Large select trigger height.",
+ "fallback": "--ty-height-lg"
+ },
+ "select.padding-inline-start.sm": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Small select trigger leading padding."
+ },
+ "select.padding-inline-start.md": {
+ "$value": "10px",
+ "$type": "dimension",
+ "description": "Medium select trigger leading padding."
+ },
+ "select.padding-inline-start.lg": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "Large select trigger leading padding."
+ },
+ "select.padding-inline-end.sm": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "Small select trigger trailing padding."
+ },
+ "select.padding-inline-end.md": {
+ "$value": "28px",
+ "$type": "dimension",
+ "description": "Medium select trigger trailing padding."
+ },
+ "select.padding-inline-end.lg": {
+ "$value": "32px",
+ "$type": "dimension",
+ "description": "Large select trigger trailing padding."
+ },
+ "select.multiple.padding-inline-end": {
+ "$value": "28px",
+ "$type": "dimension",
+ "description": "Multiple select trigger trailing padding."
+ },
+ "select.multiple.gap": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Gap between multiple select tags."
+ },
+ "select.multiple.padding-block": {
+ "$value": "2px",
+ "$type": "dimension",
+ "description": "Vertical padding for multiple select tag rows."
+ },
+ "select.tag.height": {
+ "$value": "22px",
+ "$type": "dimension",
+ "description": "Multiple select tag height."
+ },
+ "select.tag.padding": {
+ "$value": "0 4px 0 8px",
+ "$type": "string",
+ "description": "Multiple select tag padding."
+ },
+ "select.tag.padding.max": {
+ "$value": "0 8px",
+ "$type": "string",
+ "description": "Collapsed multiple select tag padding."
+ },
+ "select.tag.radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "Multiple select tag border radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "select.tag.bg": {
+ "$value": "{color-fill-secondary}",
+ "$type": "color",
+ "description": "Multiple select tag background color.",
+ "fallback": "--ty-color-fill-secondary"
+ },
+ "select.tag.color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Multiple select tag text color.",
+ "fallback": "--ty-color-text"
+ },
+ "select.tag.font-size": {
+ "$value": "{font-size-sm}",
+ "$type": "dimension",
+ "description": "Multiple select tag font size.",
+ "fallback": "--ty-font-size-sm"
+ },
+ "select.tag.line-height": {
+ "$value": "20px",
+ "$type": "dimension",
+ "description": "Multiple select tag line height."
+ },
+ "select.tag-close-color": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Multiple select tag close icon color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "select.tag-close-color-hover": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Multiple select tag close icon hover color.",
+ "fallback": "--ty-color-text"
+ },
+ "select.empty-color": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Select empty state text color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "select.dropdown-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Select dropdown background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "select.dropdown-shadow": {
+ "$value": "{shadow-popup}",
+ "$type": "shadow",
+ "description": "Select dropdown shadow.",
+ "fallback": "--ty-shadow-popup"
+ },
+ "select.dropdown-max-height": {
+ "$value": "300px",
+ "$type": "dimension",
+ "description": "Select dropdown max height."
+ },
+ "select.option.padding": {
+ "$value": "7px 12px",
+ "$type": "string",
+ "description": "Select option padding."
+ },
+ "select.option.font-size": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Select option font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "select.option.color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Select option text color.",
+ "fallback": "--ty-color-text"
+ },
+ "select.option.active-bg": {
+ "$value": "{color-fill-secondary}",
+ "$type": "color",
+ "description": "Select option hover and active background color.",
+ "fallback": "--ty-color-fill-secondary"
+ },
+ "select.option.selected-bg": {
+ "$value": "{color-primary-bg}",
+ "$type": "color",
+ "description": "Select option selected background color.",
+ "fallback": "--ty-color-primary-bg"
+ },
+ "select.option.disabled-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Select option disabled background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "select.option.disabled-color": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Select option disabled text color.",
+ "fallback": "--ty-color-text-quaternary"
+ }
+}
diff --git a/packages/tokens/source/components/skeleton.json b/packages/tokens/source/components/skeleton.json
new file mode 100644
index 00000000..81430966
--- /dev/null
+++ b/packages/tokens/source/components/skeleton.json
@@ -0,0 +1,27 @@
+{
+ "skeleton.bg": {
+ "$value": "#f2f2f2",
+ "$type": "color",
+ "description": "Skeleton bg."
+ },
+ "skeleton.height": {
+ "$value": "1em",
+ "$type": "dimension",
+ "description": "Skeleton default height."
+ },
+ "skeleton.stack-gap": {
+ "$value": "10px",
+ "$type": "dimension",
+ "description": "Skeleton vertical stack gap."
+ },
+ "skeleton.shimmer": {
+ "$value": "linear-gradient(to right, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%)",
+ "$type": "string",
+ "description": "Skeleton shimmer."
+ },
+ "skeleton.animation-duration": {
+ "$value": "1.5s",
+ "$type": "duration",
+ "description": "Skeleton shimmer animation duration."
+ }
+}
diff --git a/packages/tokens/source/components/slider.json b/packages/tokens/source/components/slider.json
new file mode 100644
index 00000000..14ccf5fa
--- /dev/null
+++ b/packages/tokens/source/components/slider.json
@@ -0,0 +1,115 @@
+{
+ "slider.dot-active-border": {
+ "$value": "#9570d4",
+ "$type": "color",
+ "description": "Slider dot active border."
+ },
+ "slider.dot-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Slider dot bg.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "slider.dot-border": {
+ "$value": "#f0f0f0",
+ "$type": "color",
+ "description": "Slider dot border."
+ },
+ "slider.mark-active-color": {
+ "$value": "rgba(0, 0, 0, 0.7)",
+ "$type": "color",
+ "description": "Slider mark active color."
+ },
+ "slider.mark-color": {
+ "$value": "rgba(0, 0, 0, 0.4)",
+ "$type": "color",
+ "description": "Slider mark color."
+ },
+ "slider.primary-color": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Slider primary accent color.",
+ "fallback": "--ty-color-primary"
+ },
+ "slider.disabled-color": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Slider disabled color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "slider.rail-bg": {
+ "$value": "#e4e8f1",
+ "$type": "color",
+ "description": "Slider rail bg."
+ },
+ "slider.size": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "Slider size."
+ },
+ "slider.thumb-bg": {
+ "$value": "rgb(245, 248, 250)",
+ "$type": "color",
+ "description": "Slider thumb bg."
+ },
+ "slider.thumb-border": {
+ "$value": "#9570d4",
+ "$type": "color",
+ "description": "Slider thumb border."
+ },
+ "slider.track-size": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Slider track size."
+ },
+ "slider.thumb-size": {
+ "$value": "14px",
+ "$type": "dimension",
+ "description": "Slider thumb size."
+ },
+ "slider.thumb-hit-size": {
+ "$value": "36px",
+ "$type": "dimension",
+ "description": "Slider thumb hit target size."
+ },
+ "slider.dot-size": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Slider dot size."
+ },
+ "slider.thumb-scale-hover": {
+ "$value": "1.2",
+ "$type": "number",
+ "description": "Slider thumb hover scale."
+ },
+ "slider.rail-radius": {
+ "$value": "3px",
+ "$type": "dimension",
+ "description": "Slider rail and track radius."
+ },
+ "slider.horizontal-margin": {
+ "$value": "13px 7px",
+ "$type": "string",
+ "description": "Horizontal slider margin."
+ },
+ "slider.horizontal-padding": {
+ "$value": "4px 0",
+ "$type": "string",
+ "description": "Horizontal slider padding."
+ },
+ "slider.vertical-width": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "Vertical slider width."
+ },
+ "slider.vertical-margin": {
+ "$value": "6px 10px",
+ "$type": "string",
+ "description": "Vertical slider margin."
+ },
+ "slider.vertical-padding": {
+ "$value": "0 4px",
+ "$type": "string",
+ "description": "Vertical slider padding."
+ }
+}
diff --git a/packages/tokens/source/components/speed-dial.json b/packages/tokens/source/components/speed-dial.json
new file mode 100644
index 00000000..aa8506e8
--- /dev/null
+++ b/packages/tokens/source/components/speed-dial.json
@@ -0,0 +1,45 @@
+{
+ "speed-dial.action-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Speed Dial action bg.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "speed-dial.action-bg-hover": {
+ "$value": "#f6f9fc",
+ "$type": "color",
+ "description": "Speed Dial action bg hover."
+ },
+ "speed-dial.action-color": {
+ "$value": "#32325d",
+ "$type": "color",
+ "description": "Speed Dial action color."
+ },
+ "speed-dial.bg": {
+ "$value": "{chart-1}",
+ "$type": "color",
+ "description": "Speed Dial bg.",
+ "fallback": "--ty-chart-1"
+ },
+ "speed-dial.bg-hover": {
+ "$value": "{color-primary-active}",
+ "$type": "color",
+ "description": "Speed Dial bg hover.",
+ "fallback": "--ty-color-primary-active"
+ },
+ "speed-dial.color": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Speed Dial color."
+ },
+ "speed-dial.tooltip-bg": {
+ "$value": "#32325d",
+ "$type": "color",
+ "description": "Speed Dial tooltip bg."
+ },
+ "speed-dial.tooltip-color": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Speed Dial tooltip color."
+ }
+}
diff --git a/packages/tokens/source/components/split.json b/packages/tokens/source/components/split.json
new file mode 100644
index 00000000..3183cc22
--- /dev/null
+++ b/packages/tokens/source/components/split.json
@@ -0,0 +1,27 @@
+{
+ "split.bar-bg": {
+ "$value": "#f8f8f9",
+ "$type": "color",
+ "description": "Split bar bg."
+ },
+ "split.bar-border": {
+ "$value": "#dcdee2",
+ "$type": "color",
+ "description": "Split bar border."
+ },
+ "split.bar-line": {
+ "$value": "#d5d5d5",
+ "$type": "color",
+ "description": "Split bar line."
+ },
+ "split.bar-handle-size": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Split bar handle line size."
+ },
+ "split.bar-handle-gap": {
+ "$value": "1px",
+ "$type": "dimension",
+ "description": "Split bar handle gap."
+ }
+}
diff --git a/packages/tokens/source/components/steps.json b/packages/tokens/source/components/steps.json
new file mode 100644
index 00000000..d35febf7
--- /dev/null
+++ b/packages/tokens/source/components/steps.json
@@ -0,0 +1,75 @@
+{
+ "steps.icon-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Steps icon bg.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "steps.color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Steps root color.",
+ "fallback": "--ty-color-text"
+ },
+ "steps.tail-color": {
+ "$value": "#dcdcdc",
+ "$type": "color",
+ "description": "Steps tail color."
+ },
+ "steps.title-font-size": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Steps title font size."
+ },
+ "steps.title-font-weight-process": {
+ "$value": "600",
+ "$type": "font-weight",
+ "description": "Steps process title font weight."
+ },
+ "steps.title-color": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "Steps title color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "steps.desc-color": {
+ "$value": "{color-text-tertiary}",
+ "$type": "color",
+ "description": "Steps description color.",
+ "fallback": "--ty-color-text-tertiary"
+ },
+ "steps.icon-size": {
+ "$value": "32px",
+ "$type": "dimension",
+ "description": "Steps icon size."
+ },
+ "steps.icon-border": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Steps icon border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "steps.process-color": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Steps process color.",
+ "fallback": "--ty-color-primary"
+ },
+ "steps.process-color-contrast": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Steps process contrast color."
+ },
+ "steps.wait-color": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Steps wait color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "steps.error-color": {
+ "$value": "{color-danger}",
+ "$type": "color",
+ "description": "Steps error color.",
+ "fallback": "--ty-color-danger"
+ }
+}
diff --git a/packages/tokens/source/components/strength-indicator.json b/packages/tokens/source/components/strength-indicator.json
new file mode 100644
index 00000000..4ca1ebea
--- /dev/null
+++ b/packages/tokens/source/components/strength-indicator.json
@@ -0,0 +1,39 @@
+{
+ "strength-indicator.border-radius": {
+ "$value": "99px",
+ "$type": "dimension",
+ "description": "Strength Indicator border radius."
+ },
+ "strength-indicator.gap": {
+ "$value": "2px",
+ "$type": "dimension",
+ "description": "Strength Indicator item gap."
+ },
+ "strength-indicator.min-height": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Strength Indicator bar min height."
+ },
+ "strength-indicator.bg": {
+ "$value": "{color-bg-disabled}",
+ "$type": "color",
+ "description": "Strength Indicator inactive background color.",
+ "fallback": "--ty-color-bg-disabled"
+ },
+ "strength-indicator.label-color": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "Strength Indicator label color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "strength-indicator.label-font-size": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "Strength Indicator label font size."
+ },
+ "strength-indicator.label-margin-top": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Strength Indicator label top margin."
+ }
+}
diff --git a/packages/tokens/source/components/switch.json b/packages/tokens/source/components/switch.json
new file mode 100644
index 00000000..8946bfc5
--- /dev/null
+++ b/packages/tokens/source/components/switch.json
@@ -0,0 +1,146 @@
+{
+ "switch.bg": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Unchecked switch track background color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "switch.bg.checked": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Checked switch track background color.",
+ "fallback": "--ty-color-primary"
+ },
+ "switch.thumb-bg": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Switch thumb background color."
+ },
+ "switch.thumb-border": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Unchecked switch thumb border color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "switch.thumb-border.checked": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Checked switch thumb border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "switch.thumb-shadow": {
+ "$value": "0 1px 3px 1px rgba(0, 0, 0, 0.2)",
+ "$type": "shadow",
+ "description": "Switch thumb shadow."
+ },
+ "switch.label-color": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Switch label color."
+ },
+ "switch.font-size.sm": {
+ "$value": "9px",
+ "$type": "dimension",
+ "description": "Small switch label font size."
+ },
+ "switch.font-size.md": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "Medium switch label font size."
+ },
+ "switch.font-size.lg": {
+ "$value": "14px",
+ "$type": "dimension",
+ "description": "Large switch label font size."
+ },
+ "switch.margin-inline.sm": {
+ "$value": "10px",
+ "$type": "dimension",
+ "description": "Small switch horizontal margin."
+ },
+ "switch.margin-inline.md": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "Medium switch horizontal margin."
+ },
+ "switch.margin-inline.lg": {
+ "$value": "14px",
+ "$type": "dimension",
+ "description": "Large switch horizontal margin."
+ },
+ "switch.width.sm": {
+ "$value": "29px",
+ "$type": "dimension",
+ "description": "Small switch width."
+ },
+ "switch.width.md": {
+ "$value": "36px",
+ "$type": "dimension",
+ "description": "Medium switch width."
+ },
+ "switch.width.lg": {
+ "$value": "42px",
+ "$type": "dimension",
+ "description": "Large switch width."
+ },
+ "switch.height.sm": {
+ "$value": "14px",
+ "$type": "dimension",
+ "description": "Small switch height."
+ },
+ "switch.height.md": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Medium switch height."
+ },
+ "switch.height.lg": {
+ "$value": "20px",
+ "$type": "dimension",
+ "description": "Large switch height."
+ },
+ "switch.radius.sm": {
+ "$value": "18px",
+ "$type": "dimension",
+ "description": "Small switch track radius."
+ },
+ "switch.radius.md": {
+ "$value": "22px",
+ "$type": "dimension",
+ "description": "Medium switch track radius."
+ },
+ "switch.radius.lg": {
+ "$value": "26px",
+ "$type": "dimension",
+ "description": "Large switch track radius."
+ },
+ "switch.label-padding-inline-start.default": {
+ "$value": "11px",
+ "$type": "dimension",
+ "description": "Unchecked switch label leading padding."
+ },
+ "switch.label-padding-inline-end.default": {
+ "$value": "5px",
+ "$type": "dimension",
+ "description": "Unchecked switch label trailing padding."
+ },
+ "switch.label-padding-inline-start.checked": {
+ "$value": "5px",
+ "$type": "dimension",
+ "description": "Checked switch label leading padding."
+ },
+ "switch.label-padding-inline-end.checked": {
+ "$value": "11px",
+ "$type": "dimension",
+ "description": "Checked switch label trailing padding."
+ },
+ "switch.transition-duration": {
+ "$value": "300ms",
+ "$type": "duration",
+ "description": "Switch transition duration."
+ },
+ "switch.disabled-opacity": {
+ "$value": "0.4",
+ "$type": "number",
+ "description": "Disabled switch opacity."
+ }
+}
diff --git a/packages/tokens/source/components/table.json b/packages/tokens/source/components/table.json
new file mode 100644
index 00000000..bc26da74
--- /dev/null
+++ b/packages/tokens/source/components/table.json
@@ -0,0 +1,109 @@
+{
+ "table.color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Table root text color.",
+ "fallback": "--ty-color-text"
+ },
+ "table.font-size.md": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Medium table font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "table.font-size.sm": {
+ "$value": "{font-size-sm}",
+ "$type": "dimension",
+ "description": "Small table font size.",
+ "fallback": "--ty-font-size-sm"
+ },
+ "table.font-size.lg": {
+ "$value": "{font-size-lg}",
+ "$type": "dimension",
+ "description": "Large table font size.",
+ "fallback": "--ty-font-size-lg"
+ },
+ "table.border": {
+ "$value": "#e9ecef",
+ "$type": "color",
+ "description": "Table border color."
+ },
+ "table.cell-padding.sm": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Small table cell padding."
+ },
+ "table.cell-padding.md": {
+ "$value": "12px 16px",
+ "$type": "string",
+ "description": "Medium table cell padding."
+ },
+ "table.cell-padding.lg": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Large table cell padding."
+ },
+ "table.header-bg": {
+ "$value": "#f6f9fc",
+ "$type": "color",
+ "description": "Table header background color."
+ },
+ "table.header-font-weight": {
+ "$value": "500",
+ "$type": "font-weight",
+ "description": "Table header font weight."
+ },
+ "table.row-hover-bg": {
+ "$value": "#f6f9fc",
+ "$type": "color",
+ "description": "Table row hover background color."
+ },
+ "table.cell-sortable-hover-bg": {
+ "$value": "#f6f9fc",
+ "$type": "color",
+ "description": "Sortable table cell hover background color."
+ },
+ "table.row-selected-bg": {
+ "$value": "rgba(110, 65, 191, 0.06)",
+ "$type": "color",
+ "description": "Selected table row background color."
+ },
+ "table.selection-column-width": {
+ "$value": "40px",
+ "$type": "dimension",
+ "description": "Table selection column width."
+ },
+ "table.sorter-gap": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Gap between table title and sorter."
+ },
+ "table.sorter-icon-size": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Table sorter icon size."
+ },
+ "table.sorter-icon-color": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Table sorter icon color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "table.sorter-icon-color.active": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Active table sorter icon color.",
+ "fallback": "--ty-color-primary"
+ },
+ "table.empty-padding": {
+ "$value": "32px",
+ "$type": "dimension",
+ "description": "Table empty and loading cell padding."
+ },
+ "table.empty-color": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "Table empty and loading text color.",
+ "fallback": "--ty-color-text-secondary"
+ }
+}
diff --git a/packages/tokens/source/components/tabs.json b/packages/tokens/source/components/tabs.json
new file mode 100644
index 00000000..a4147fe5
--- /dev/null
+++ b/packages/tokens/source/components/tabs.json
@@ -0,0 +1,236 @@
+{
+ "tabs.font-size": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Tabs root font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "tabs.color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Tabs root text color.",
+ "fallback": "--ty-color-text"
+ },
+ "tabs.nav-margin": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Tabs navigation spacing from content."
+ },
+ "tabs.border": {
+ "$value": "{color-fill-tertiary}",
+ "$type": "color",
+ "description": "Tabs navigation divider color.",
+ "fallback": "--ty-color-fill-tertiary"
+ },
+ "tabs.tab-padding-block.sm": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Small tab vertical padding."
+ },
+ "tabs.tab-padding-block.md": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "Medium tab vertical padding."
+ },
+ "tabs.tab-padding-block.lg": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Large tab vertical padding."
+ },
+ "tabs.tab-gap": {
+ "$value": "32px",
+ "$type": "dimension",
+ "description": "Gap between adjacent tabs."
+ },
+ "tabs.tab-color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Inactive tab text color.",
+ "fallback": "--ty-color-text"
+ },
+ "tabs.tab-hover-color": {
+ "$value": "{color-primary-text-hover}",
+ "$type": "color",
+ "description": "Tab hover text color.",
+ "fallback": "--ty-color-primary-text-hover"
+ },
+ "tabs.tab-active-color": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Active tab text color.",
+ "fallback": "--ty-color-primary"
+ },
+ "tabs.tab-active-font-weight": {
+ "$value": "500",
+ "$type": "font-weight",
+ "description": "Active tab font weight."
+ },
+ "tabs.tab-disabled-color": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Disabled tab text color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "tabs.icon-gap": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Gap between tab icon and label."
+ },
+ "tabs.remove-gap": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Gap between tab label and close icon."
+ },
+ "tabs.remove-font-size": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "Editable tab close icon font size."
+ },
+ "tabs.remove-color": {
+ "$value": "{color-text-tertiary}",
+ "$type": "color",
+ "description": "Editable tab close icon color.",
+ "fallback": "--ty-color-text-tertiary"
+ },
+ "tabs.remove-color-hover": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Editable tab close icon hover color.",
+ "fallback": "--ty-color-text"
+ },
+ "tabs.ink-bar-color": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Tabs ink bar color.",
+ "fallback": "--ty-color-primary"
+ },
+ "tabs.ink-bar-height": {
+ "$value": "2px",
+ "$type": "dimension",
+ "description": "Tabs ink bar height."
+ },
+ "tabs.nav-button-size": {
+ "$value": "32px",
+ "$type": "dimension",
+ "description": "Scrollable tabs nav button size."
+ },
+ "tabs.nav-button-font-size": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Scrollable tabs nav button font size."
+ },
+ "tabs.nav-button-color": {
+ "$value": "{color-text-tertiary}",
+ "$type": "color",
+ "description": "Scrollable tabs nav button color.",
+ "fallback": "--ty-color-text-tertiary"
+ },
+ "tabs.nav-button-color-hover": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Scrollable tabs nav button hover color.",
+ "fallback": "--ty-color-text"
+ },
+ "tabs.nav-button-color-disabled": {
+ "$value": "{color-text-quaternary}",
+ "$type": "color",
+ "description": "Scrollable tabs nav button disabled color.",
+ "fallback": "--ty-color-text-quaternary"
+ },
+ "tabs.add-size": {
+ "$value": "32px",
+ "$type": "dimension",
+ "description": "Editable tabs add button size."
+ },
+ "tabs.add-font-size": {
+ "$value": "14px",
+ "$type": "dimension",
+ "description": "Editable tabs add button font size."
+ },
+ "tabs.add-margin": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Editable tabs add button margin."
+ },
+ "tabs.add-radius": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Editable tabs add button border radius."
+ },
+ "tabs.add-border-color": {
+ "$value": "{color-border}",
+ "$type": "color",
+ "description": "Editable tabs add button border color.",
+ "fallback": "--ty-color-border"
+ },
+ "tabs.add-color": {
+ "$value": "{color-text-tertiary}",
+ "$type": "color",
+ "description": "Editable tabs add button color.",
+ "fallback": "--ty-color-text-tertiary"
+ },
+ "tabs.add-color-hover": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Editable tabs add button hover color.",
+ "fallback": "--ty-color-primary"
+ },
+ "tabs.add-border-color-hover": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Editable tabs add button hover border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "tabs.extra-gap": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Gap between tab nav and extra content."
+ },
+ "tabs.size.sm": {
+ "$value": "13px",
+ "$type": "dimension",
+ "description": "Small tabs font size."
+ },
+ "tabs.size.lg": {
+ "$value": "15px",
+ "$type": "dimension",
+ "description": "Large tabs font size."
+ },
+ "tabs.card-padding-block": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Card tabs vertical padding."
+ },
+ "tabs.card-padding-inline": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Card tabs horizontal padding."
+ },
+ "tabs.card-padding-inline-editable-end": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Editable card tabs trailing padding."
+ },
+ "tabs.card-gap": {
+ "$value": "2px",
+ "$type": "dimension",
+ "description": "Gap between adjacent card tabs."
+ },
+ "tabs.card-radius": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Card tabs border radius."
+ },
+ "tabs.card-bg": {
+ "$value": "{color-fill}",
+ "$type": "color",
+ "description": "Card tabs background color.",
+ "fallback": "--ty-color-fill"
+ },
+ "tabs.card-active-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Active card tabs background color.",
+ "fallback": "--ty-color-bg-container"
+ }
+}
diff --git a/packages/tokens/source/components/tag.json b/packages/tokens/source/components/tag.json
new file mode 100644
index 00000000..c759f34f
--- /dev/null
+++ b/packages/tokens/source/components/tag.json
@@ -0,0 +1,275 @@
+{
+ "tag.font-size": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "Tag font size."
+ },
+ "tag.margin-inline-end": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Tag trailing margin."
+ },
+ "tag.padding": {
+ "$value": "3px 7px",
+ "$type": "string",
+ "description": "Tag padding."
+ },
+ "tag.radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "Tag border radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "tag.color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Default tag text color.",
+ "fallback": "--ty-color-text"
+ },
+ "tag.bg": {
+ "$value": "{color-fill}",
+ "$type": "color",
+ "description": "Default tag background color.",
+ "fallback": "--ty-color-fill"
+ },
+ "tag.border": {
+ "$value": "{color-border}",
+ "$type": "color",
+ "description": "Default tag border color.",
+ "fallback": "--ty-color-border"
+ },
+ "tag.link-color": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "Tag link color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "tag.close-font-size": {
+ "$value": "10px",
+ "$type": "dimension",
+ "description": "Tag close button font size."
+ },
+ "tag.close-gap": {
+ "$value": "5px",
+ "$type": "dimension",
+ "description": "Gap between tag content and close button."
+ },
+ "tag.close-opacity-hover": {
+ "$value": "0.8",
+ "$type": "number",
+ "description": "Tag close button hover opacity."
+ },
+ "tag.transition-duration": {
+ "$value": "300ms",
+ "$type": "duration",
+ "description": "Tag transition duration."
+ },
+ "tag.checkable-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Checkable tag background color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "tag.checkable-color": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Checkable tag text color.",
+ "fallback": "--ty-color-primary"
+ },
+ "tag.checkable-border": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Checkable tag border color.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "tag.checkable-bg.checked": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Checked checkable tag background color.",
+ "fallback": "--ty-color-primary"
+ },
+ "tag.checkable-color.checked": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Checked checkable tag text color."
+ },
+ "tag.checkable-border.checked": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Checked checkable tag border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "tag.magenta-color": {
+ "$value": "#eb2f96",
+ "$type": "color",
+ "description": "Magenta preset tag text color."
+ },
+ "tag.magenta-bg": {
+ "$value": "#fff0f6",
+ "$type": "color",
+ "description": "Magenta preset tag background color."
+ },
+ "tag.magenta-border": {
+ "$value": "#ffadd2",
+ "$type": "color",
+ "description": "Magenta preset tag border color."
+ },
+ "tag.red-color": {
+ "$value": "#f5222d",
+ "$type": "color",
+ "description": "Red preset tag text color."
+ },
+ "tag.red-bg": {
+ "$value": "{color-danger-bg}",
+ "$type": "color",
+ "description": "Red preset tag background color.",
+ "fallback": "--ty-color-danger-bg"
+ },
+ "tag.red-border": {
+ "$value": "{color-danger-border}",
+ "$type": "color",
+ "description": "Red preset tag border color.",
+ "fallback": "--ty-color-danger-border"
+ },
+ "tag.volcano-color": {
+ "$value": "#fa541c",
+ "$type": "color",
+ "description": "Volcano preset tag text color."
+ },
+ "tag.volcano-bg": {
+ "$value": "#fff2e8",
+ "$type": "color",
+ "description": "Volcano preset tag background color."
+ },
+ "tag.volcano-border": {
+ "$value": "#ffbb96",
+ "$type": "color",
+ "description": "Volcano preset tag border color."
+ },
+ "tag.orange-color": {
+ "$value": "#fa8c16",
+ "$type": "color",
+ "description": "Orange preset tag text color."
+ },
+ "tag.orange-bg": {
+ "$value": "#fff7e6",
+ "$type": "color",
+ "description": "Orange preset tag background color."
+ },
+ "tag.orange-border": {
+ "$value": "#ffd591",
+ "$type": "color",
+ "description": "Orange preset tag border color."
+ },
+ "tag.gold-color": {
+ "$value": "#faad14",
+ "$type": "color",
+ "description": "Gold preset tag text color."
+ },
+ "tag.gold-bg": {
+ "$value": "{color-warning-bg}",
+ "$type": "color",
+ "description": "Gold preset tag background color.",
+ "fallback": "--ty-color-warning-bg"
+ },
+ "tag.gold-border": {
+ "$value": "{color-warning-border}",
+ "$type": "color",
+ "description": "Gold preset tag border color.",
+ "fallback": "--ty-color-warning-border"
+ },
+ "tag.lime-color": {
+ "$value": "#a0d911",
+ "$type": "color",
+ "description": "Lime preset tag text color."
+ },
+ "tag.lime-bg": {
+ "$value": "#fcffe6",
+ "$type": "color",
+ "description": "Lime preset tag background color."
+ },
+ "tag.lime-border": {
+ "$value": "#eaff8f",
+ "$type": "color",
+ "description": "Lime preset tag border color."
+ },
+ "tag.green-color": {
+ "$value": "#52c41a",
+ "$type": "color",
+ "description": "Green preset tag text color."
+ },
+ "tag.green-bg": {
+ "$value": "{color-success-bg}",
+ "$type": "color",
+ "description": "Green preset tag background color.",
+ "fallback": "--ty-color-success-bg"
+ },
+ "tag.green-border": {
+ "$value": "{color-success-border}",
+ "$type": "color",
+ "description": "Green preset tag border color.",
+ "fallback": "--ty-color-success-border"
+ },
+ "tag.cyan-color": {
+ "$value": "#13c2c2",
+ "$type": "color",
+ "description": "Cyan preset tag text color."
+ },
+ "tag.cyan-bg": {
+ "$value": "#e6fffb",
+ "$type": "color",
+ "description": "Cyan preset tag background color."
+ },
+ "tag.cyan-border": {
+ "$value": "#87e8de",
+ "$type": "color",
+ "description": "Cyan preset tag border color."
+ },
+ "tag.blue-color": {
+ "$value": "#1890ff",
+ "$type": "color",
+ "description": "Blue preset tag text color."
+ },
+ "tag.blue-bg": {
+ "$value": "{color-info-bg}",
+ "$type": "color",
+ "description": "Blue preset tag background color.",
+ "fallback": "--ty-color-info-bg"
+ },
+ "tag.blue-border": {
+ "$value": "{color-info-border}",
+ "$type": "color",
+ "description": "Blue preset tag border color.",
+ "fallback": "--ty-color-info-border"
+ },
+ "tag.geekblue-color": {
+ "$value": "#2f54eb",
+ "$type": "color",
+ "description": "Geekblue preset tag text color."
+ },
+ "tag.geekblue-bg": {
+ "$value": "#f0f5ff",
+ "$type": "color",
+ "description": "Geekblue preset tag background color."
+ },
+ "tag.geekblue-border": {
+ "$value": "#adc6ff",
+ "$type": "color",
+ "description": "Geekblue preset tag border color."
+ },
+ "tag.purple-color": {
+ "$value": "#722ed1",
+ "$type": "color",
+ "description": "Purple preset tag text color."
+ },
+ "tag.purple-bg": {
+ "$value": "#f9f0ff",
+ "$type": "color",
+ "description": "Purple preset tag background color."
+ },
+ "tag.purple-border": {
+ "$value": "#d3adf7",
+ "$type": "color",
+ "description": "Purple preset tag border color."
+ }
+}
diff --git a/packages/tokens/source/components/textarea.json b/packages/tokens/source/components/textarea.json
new file mode 100644
index 00000000..0ccfbc3e
--- /dev/null
+++ b/packages/tokens/source/components/textarea.json
@@ -0,0 +1,32 @@
+{
+ "textarea.counter-color": {
+ "$value": "#666",
+ "$type": "color",
+ "description": "Textarea counter color."
+ },
+ "textarea.padding": {
+ "$value": "5px",
+ "$type": "dimension",
+ "description": "Textarea padding."
+ },
+ "textarea.padding-bottom-with-counter": {
+ "$value": "20px",
+ "$type": "dimension",
+ "description": "Textarea bottom padding when counter is visible."
+ },
+ "textarea.counter-offset-bottom": {
+ "$value": "6px",
+ "$type": "dimension",
+ "description": "Textarea counter bottom offset."
+ },
+ "textarea.counter-offset-inline-end": {
+ "$value": "6px",
+ "$type": "dimension",
+ "description": "Textarea counter inline end offset."
+ },
+ "textarea.counter-font-size": {
+ "$value": "14px",
+ "$type": "dimension",
+ "description": "Textarea counter font size."
+ }
+}
diff --git a/packages/tokens/source/components/timeline.json b/packages/tokens/source/components/timeline.json
new file mode 100644
index 00000000..391a1be4
--- /dev/null
+++ b/packages/tokens/source/components/timeline.json
@@ -0,0 +1,69 @@
+{
+ "timeline.dot-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Timeline dot bg.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "timeline.color": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "Timeline text color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "timeline.font-size": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Timeline root font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "timeline.item-font-size": {
+ "$value": "14px",
+ "$type": "dimension",
+ "description": "Timeline item font size."
+ },
+ "timeline.item-padding-bottom": {
+ "$value": "20px",
+ "$type": "dimension",
+ "description": "Timeline item bottom padding."
+ },
+ "timeline.head-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Timeline head bg.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "timeline.line-color": {
+ "$value": "{color-border-secondary}",
+ "$type": "color",
+ "description": "Timeline line color.",
+ "fallback": "--ty-color-border-secondary"
+ },
+ "timeline.head-color": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Timeline head accent color.",
+ "fallback": "--ty-color-primary"
+ },
+ "timeline.dot-size": {
+ "$value": "10px",
+ "$type": "dimension",
+ "description": "Timeline dot size."
+ },
+ "timeline.dot-border-width": {
+ "$value": "2px",
+ "$type": "dimension",
+ "description": "Timeline dot border width."
+ },
+ "timeline.dot-border-color": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Timeline dot border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "timeline.content-offset": {
+ "$value": "25px",
+ "$type": "dimension",
+ "description": "Timeline content leading padding."
+ }
+}
diff --git a/packages/tokens/source/components/tooltip.json b/packages/tokens/source/components/tooltip.json
new file mode 100644
index 00000000..7e0f99bf
--- /dev/null
+++ b/packages/tokens/source/components/tooltip.json
@@ -0,0 +1,23 @@
+{
+ "tooltip.arrow-size": {
+ "$value": "4px",
+ "$type": "dimension",
+ "description": "Tooltip arrow size."
+ },
+ "tooltip.content-padding": {
+ "$value": "5px 8px",
+ "$type": "dimension",
+ "description": "Tooltip content padding."
+ },
+ "tooltip.color": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Tooltip text color."
+ },
+ "tooltip.font-size": {
+ "$value": "{font-size-sm}",
+ "$type": "dimension",
+ "description": "Tooltip font size.",
+ "fallback": "--ty-font-size-sm"
+ }
+}
diff --git a/packages/tokens/source/components/transfer.json b/packages/tokens/source/components/transfer.json
new file mode 100644
index 00000000..317911b9
--- /dev/null
+++ b/packages/tokens/source/components/transfer.json
@@ -0,0 +1,110 @@
+{
+ "transfer.border": {
+ "$value": "{color-border}",
+ "$type": "color",
+ "description": "Transfer border.",
+ "fallback": "--ty-color-border"
+ },
+ "transfer.color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Transfer text color.",
+ "fallback": "--ty-color-text"
+ },
+ "transfer.font-size": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Transfer font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "transfer.panel-width": {
+ "$value": "180px",
+ "$type": "dimension",
+ "description": "Transfer panel width."
+ },
+ "transfer.panel-radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "Transfer panel radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "transfer.buttons-margin": {
+ "$value": "0 8px",
+ "$type": "string",
+ "description": "Transfer buttons margin."
+ },
+ "transfer.button-margin": {
+ "$value": "3px 0",
+ "$type": "string",
+ "description": "Transfer inner button margin."
+ },
+ "transfer.button-padding": {
+ "$value": "3px",
+ "$type": "dimension",
+ "description": "Transfer inner button padding."
+ },
+ "transfer.button-min-width": {
+ "$value": "30px",
+ "$type": "dimension",
+ "description": "Transfer inner button min width."
+ },
+ "transfer.footer-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Transfer footer bg.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "transfer.footer-border": {
+ "$value": "{color-fill-tertiary}",
+ "$type": "color",
+ "description": "Transfer footer border.",
+ "fallback": "--ty-color-fill-tertiary"
+ },
+ "transfer.header-bg": {
+ "$value": "{color-bg-container}",
+ "$type": "color",
+ "description": "Transfer header bg.",
+ "fallback": "--ty-color-bg-container"
+ },
+ "transfer.item-hover-bg": {
+ "$value": "{color-fill-secondary}",
+ "$type": "color",
+ "description": "Transfer item hover bg.",
+ "fallback": "--ty-color-fill-secondary"
+ },
+ "transfer.header-padding": {
+ "$value": "8px 12px 9px",
+ "$type": "string",
+ "description": "Transfer header padding."
+ },
+ "transfer.body-padding": {
+ "$value": "6px 0",
+ "$type": "string",
+ "description": "Transfer body padding."
+ },
+ "transfer.input-container-padding": {
+ "$value": "6px 12px 12px",
+ "$type": "string",
+ "description": "Transfer input container padding."
+ },
+ "transfer.list-height": {
+ "$value": "192px",
+ "$type": "dimension",
+ "description": "Transfer list height."
+ },
+ "transfer.item-padding-inline": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "Transfer item horizontal padding."
+ },
+ "transfer.item-min-height": {
+ "$value": "32px",
+ "$type": "dimension",
+ "description": "Transfer item min height."
+ },
+ "transfer.footer-padding": {
+ "$value": "8px 12px 9px",
+ "$type": "string",
+ "description": "Transfer footer padding."
+ }
+}
diff --git a/packages/tokens/source/components/tree.json b/packages/tokens/source/components/tree.json
new file mode 100644
index 00000000..3b6d98c6
--- /dev/null
+++ b/packages/tokens/source/components/tree.json
@@ -0,0 +1,44 @@
+{
+ "tree.arrow-color": {
+ "$value": "#999",
+ "$type": "color",
+ "description": "Tree arrow color."
+ },
+ "tree.hover-bg": {
+ "$value": "{color-fill-secondary}",
+ "$type": "color",
+ "description": "Tree hover background color.",
+ "fallback": "--ty-color-fill-secondary"
+ },
+ "tree.font-size": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Tree font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "tree.node-margin": {
+ "$value": "2px 0",
+ "$type": "string",
+ "description": "Tree node vertical margin."
+ },
+ "tree.switcher-size": {
+ "$value": "20px",
+ "$type": "dimension",
+ "description": "Tree switcher square size."
+ },
+ "tree.label-padding": {
+ "$value": "1px 2px",
+ "$type": "string",
+ "description": "Tree label padding."
+ },
+ "tree.label-offset": {
+ "$value": "-4px",
+ "$type": "dimension",
+ "description": "Tree label inline start offset."
+ },
+ "tree.title-min-height": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "Tree title min height."
+ }
+}
diff --git a/packages/tokens/source/components/typography.json b/packages/tokens/source/components/typography.json
new file mode 100644
index 00000000..91e70e95
--- /dev/null
+++ b/packages/tokens/source/components/typography.json
@@ -0,0 +1,62 @@
+{
+ "typography.body-color": {
+ "$value": "{color-text-secondary}",
+ "$type": "color",
+ "description": "Typography body color.",
+ "fallback": "--ty-color-text-secondary"
+ },
+ "typography.body-font-size": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Typography body font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "typography.body-line-height": {
+ "$value": "1.5",
+ "$type": "line-height",
+ "description": "Typography body line height."
+ },
+ "typography.block-margin-bottom": {
+ "$value": "1em",
+ "$type": "dimension",
+ "description": "Typography block bottom margin."
+ },
+ "typography.heading-font-weight": {
+ "$value": "600",
+ "$type": "font-weight",
+ "description": "Typography heading font weight."
+ },
+ "typography.heading-margin-bottom": {
+ "$value": "0.5em",
+ "$type": "dimension",
+ "description": "Typography heading bottom margin."
+ },
+ "typography.code-bg": {
+ "$value": "rgba(0, 0, 0, 0.06)",
+ "$type": "color",
+ "description": "Typography code bg."
+ },
+ "typography.code-border": {
+ "$value": "rgba(0, 0, 0, 0.06)",
+ "$type": "color",
+ "description": "Typography code border."
+ },
+ "typography.code-radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "Typography inline code radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "typography.heading-color": {
+ "$value": "{color-text-label}",
+ "$type": "color",
+ "description": "Typography heading color.",
+ "fallback": "--ty-color-text-label"
+ },
+ "typography.mark-bg": {
+ "$value": "{color-warning-border}",
+ "$type": "color",
+ "description": "Typography mark bg.",
+ "fallback": "--ty-color-warning-border"
+ }
+}
diff --git a/packages/tokens/source/components/upload.json b/packages/tokens/source/components/upload.json
new file mode 100644
index 00000000..b0d5d021
--- /dev/null
+++ b/packages/tokens/source/components/upload.json
@@ -0,0 +1,100 @@
+{
+ "upload.color": {
+ "$value": "{color-text}",
+ "$type": "color",
+ "description": "Upload root text color.",
+ "fallback": "--ty-color-text"
+ },
+ "upload.font-size": {
+ "$value": "{font-size-base}",
+ "$type": "dimension",
+ "description": "Upload root font size.",
+ "fallback": "--ty-font-size-base"
+ },
+ "upload.list-item-margin-top": {
+ "$value": "5px",
+ "$type": "dimension",
+ "description": "Upload list item margin top."
+ },
+ "upload.list-item-hover-bg": {
+ "$value": "{color-fill-secondary}",
+ "$type": "color",
+ "description": "Upload list item hover background color.",
+ "fallback": "--ty-color-fill-secondary"
+ },
+ "upload.list-item-padding": {
+ "$value": "4px 4px 4px 2px",
+ "$type": "string",
+ "description": "Upload list item container padding."
+ },
+ "upload.list-item-name-gap": {
+ "$value": "5px",
+ "$type": "dimension",
+ "description": "Gap between upload item icon and name."
+ },
+ "upload.list-item-delete-padding-end": {
+ "$value": "3px",
+ "$type": "dimension",
+ "description": "Upload list item delete button trailing padding."
+ },
+ "upload.status-size": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Upload status icon and delete action size."
+ },
+ "upload.tip-font-size": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "Upload tip font size."
+ },
+ "upload.tip-color": {
+ "$value": "{color-text-tertiary}",
+ "$type": "color",
+ "description": "Upload tip text color.",
+ "fallback": "--ty-color-text-tertiary"
+ },
+ "upload.tip-margin-top": {
+ "$value": "7px",
+ "$type": "dimension",
+ "description": "Upload tip margin top."
+ },
+ "upload.dragger-padding": {
+ "$value": "15px",
+ "$type": "dimension",
+ "description": "Upload dragger padding."
+ },
+ "upload.dragger-bg": {
+ "$value": "{color-fill}",
+ "$type": "color",
+ "description": "Upload dragger background color.",
+ "fallback": "--ty-color-fill"
+ },
+ "upload.dragger-border": {
+ "$value": "{color-border}",
+ "$type": "color",
+ "description": "Upload dragger border color.",
+ "fallback": "--ty-color-border"
+ },
+ "upload.dragger-border-hover": {
+ "$value": "{color-primary}",
+ "$type": "color",
+ "description": "Upload dragger hover border color.",
+ "fallback": "--ty-color-primary"
+ },
+ "upload.dragger-hover-bg": {
+ "$value": "#efefef",
+ "$type": "color",
+ "description": "Upload dragger hover background color."
+ },
+ "upload.dragger-radius": {
+ "$value": "{border-radius}",
+ "$type": "dimension",
+ "description": "Upload dragger border radius.",
+ "fallback": "--ty-border-radius"
+ },
+ "upload.transition-duration": {
+ "$value": "300ms",
+ "$type": "duration",
+ "description": "Upload hover transition duration."
+ }
+}
diff --git a/packages/tokens/source/schema/theme.v1.schema.json b/packages/tokens/source/schema/theme.v1.schema.json
new file mode 100644
index 00000000..b3c8c158
--- /dev/null
+++ b/packages/tokens/source/schema/theme.v1.schema.json
@@ -0,0 +1,136 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://tiny.design/schema/theme.v1.schema.json",
+ "title": "Tiny Design Theme Document v1",
+ "description": "Versioned theme document for Tiny Design token overrides.",
+ "type": "object",
+ "additionalProperties": false,
+ "required": ["meta", "mode", "tokens"],
+ "properties": {
+ "$schema": {
+ "type": "string",
+ "format": "uri-reference"
+ },
+ "meta": {
+ "$ref": "#/$defs/meta"
+ },
+ "mode": {
+ "type": "string",
+ "enum": ["light", "dark", "system"]
+ },
+ "extends": {
+ "type": "string",
+ "pattern": "^[a-z0-9]+(?:[a-z0-9-]*[a-z0-9])?$"
+ },
+ "tokens": {
+ "$ref": "#/$defs/tokenSections"
+ }
+ },
+ "$defs": {
+ "meta": {
+ "type": "object",
+ "additionalProperties": false,
+ "required": ["id", "name", "schemaVersion"],
+ "properties": {
+ "id": {
+ "type": "string",
+ "pattern": "^[a-z0-9]+(?:[a-z0-9-]*[a-z0-9])?$"
+ },
+ "name": {
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 120
+ },
+ "author": {
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 120
+ },
+ "description": {
+ "type": "string",
+ "maxLength": 500
+ },
+ "version": {
+ "type": "string",
+ "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[0-9A-Za-z-.]+)?(?:\\+[0-9A-Za-z-.]+)?$"
+ },
+ "schemaVersion": {
+ "type": "integer",
+ "const": 1
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "pattern": "^[a-z0-9]+(?:[a-z0-9-]*[a-z0-9])?$"
+ },
+ "uniqueItems": true,
+ "maxItems": 20
+ }
+ }
+ },
+ "tokenSections": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "semantic": {
+ "$ref": "#/$defs/tokenMap"
+ },
+ "components": {
+ "$ref": "#/$defs/tokenMap"
+ }
+ }
+ },
+ "tokenMap": {
+ "type": "object",
+ "propertyNames": {
+ "$ref": "#/$defs/tokenKey"
+ },
+ "additionalProperties": {
+ "$ref": "#/$defs/tokenValue"
+ }
+ },
+ "tokenKey": {
+ "type": "string",
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*(?:\\.[a-z0-9]+(?:-[a-z0-9]+)*){0,2}$"
+ },
+ "tokenValue": {
+ "oneOf": [
+ {
+ "type": "string",
+ "minLength": 1
+ },
+ {
+ "type": "number"
+ }
+ ]
+ }
+ },
+ "examples": [
+ {
+ "$schema": "https://tiny.design/schema/theme.v1.schema.json",
+ "meta": {
+ "id": "ocean-glass",
+ "name": "Ocean Glass",
+ "author": "community-user",
+ "schemaVersion": 1,
+ "tags": ["cool", "soft"]
+ },
+ "mode": "light",
+ "extends": "tiny-light",
+ "tokens": {
+ "semantic": {
+ "color-primary": "#3b82f6",
+ "font-family": "Inter, sans-serif",
+ "border-radius": "12px"
+ },
+ "components": {
+ "button.bg.primary": "#3b82f6",
+ "button.bg.primary-hover": "#2563eb",
+ "button.radius": "999px",
+ "card.header-padding": "16px 20px"
+ }
+ }
+ }
+ ]
+}
diff --git a/packages/tokens/source/semantic/charts.json b/packages/tokens/source/semantic/charts.json
new file mode 100644
index 00000000..146008a4
--- /dev/null
+++ b/packages/tokens/source/semantic/charts.json
@@ -0,0 +1,27 @@
+{
+ "chart-1": {
+ "$value": "#6e41bf",
+ "$type": "color",
+ "description": "Chart palette color 1."
+ },
+ "chart-2": {
+ "$value": "#1890ff",
+ "$type": "color",
+ "description": "Chart palette color 2."
+ },
+ "chart-3": {
+ "$value": "#52c41a",
+ "$type": "color",
+ "description": "Chart palette color 3."
+ },
+ "chart-4": {
+ "$value": "#ff9800",
+ "$type": "color",
+ "description": "Chart palette color 4."
+ },
+ "chart-5": {
+ "$value": "#f44336",
+ "$type": "color",
+ "description": "Chart palette color 5."
+ }
+}
diff --git a/packages/tokens/source/semantic/colors.json b/packages/tokens/source/semantic/colors.json
new file mode 100644
index 00000000..fa5e36b9
--- /dev/null
+++ b/packages/tokens/source/semantic/colors.json
@@ -0,0 +1,267 @@
+{
+ "color-bg-container": {
+ "$value": "#ffffff",
+ "$type": "color",
+ "description": "Default container background color."
+ },
+ "color-bg": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Page background color."
+ },
+ "color-bg-elevated": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Elevated surface background color."
+ },
+ "color-bg-layout": {
+ "$value": "#fff",
+ "$type": "color",
+ "description": "Layout background color."
+ },
+ "color-bg-spotlight": {
+ "$value": "#f5f5f5",
+ "$type": "color",
+ "description": "Spotlight surface background color."
+ },
+ "color-bg-disabled": {
+ "$value": "#f5f5f5",
+ "$type": "color",
+ "description": "Disabled surface background color."
+ },
+ "color-fill": {
+ "$value": "#fafafa",
+ "$type": "color",
+ "description": "Secondary filled surface color."
+ },
+ "color-text": {
+ "$value": "rgba(0, 0, 0, 0.85)",
+ "$type": "color",
+ "description": "Default text color."
+ },
+ "color-text-label": {
+ "$value": "rgba(0, 0, 0, 0.85)",
+ "$type": "color",
+ "description": "Label text color."
+ },
+ "color-text-secondary": {
+ "$value": "rgba(0, 0, 0, 0.65)",
+ "$type": "color",
+ "description": "Secondary text color."
+ },
+ "color-text-tertiary": {
+ "$value": "rgba(0, 0, 0, 0.45)",
+ "$type": "color",
+ "description": "Tertiary text color."
+ },
+ "color-text-heading": {
+ "$value": "rgba(0, 0, 0, 0.85)",
+ "$type": "color",
+ "description": "Heading text color."
+ },
+ "color-text-placeholder": {
+ "$value": "#bfbfbf",
+ "$type": "color",
+ "description": "Placeholder text color."
+ },
+ "color-text-quaternary": {
+ "$value": "rgba(0, 0, 0, 0.25)",
+ "$type": "color",
+ "description": "Low-emphasis text color."
+ },
+ "color-border": {
+ "$value": "#d9d9d9",
+ "$type": "color",
+ "description": "Default border color."
+ },
+ "color-border-light": {
+ "$value": "#f0f0f0",
+ "$type": "color",
+ "description": "Light border color."
+ },
+ "color-border-secondary": {
+ "$value": "#e8e8e8",
+ "$type": "color",
+ "description": "Secondary border color."
+ },
+ "color-border-btn-default": {
+ "$value": "#d0d0d5",
+ "$type": "color",
+ "description": "Default button border color."
+ },
+ "color-primary": {
+ "$value": "#6e41bf",
+ "$type": "color",
+ "description": "Primary brand color."
+ },
+ "color-primary-hover": {
+ "$value": "#8b62d0",
+ "$type": "color",
+ "description": "Primary hover color."
+ },
+ "color-primary-active": {
+ "$value": "#5a30a8",
+ "$type": "color",
+ "description": "Primary active color."
+ },
+ "color-primary-bg": {
+ "$value": "#f3eefa",
+ "$type": "color",
+ "description": "Primary tinted background color."
+ },
+ "color-primary-border": {
+ "$value": "#c4a7e6",
+ "$type": "color",
+ "description": "Primary border color."
+ },
+ "color-primary-bg-hover": {
+ "$value": "#ece3f7",
+ "$type": "color",
+ "description": "Primary tinted background hover color."
+ },
+ "color-primary-text-hover": {
+ "$value": "#8b62d0",
+ "$type": "color",
+ "description": "Primary text hover color."
+ },
+ "color-info": {
+ "$value": "#1890ff",
+ "$type": "color",
+ "description": "Info semantic color."
+ },
+ "color-info-bg": {
+ "$value": "#e6f7ff",
+ "$type": "color",
+ "description": "Info background color."
+ },
+ "color-info-border": {
+ "$value": "#91d5ff",
+ "$type": "color",
+ "description": "Info border color."
+ },
+ "color-info-text": {
+ "$value": "#096dd9",
+ "$type": "color",
+ "description": "Info text color."
+ },
+ "color-info-hover": {
+ "$value": "#40a9ff",
+ "$type": "color",
+ "description": "Info hover color."
+ },
+ "color-info-active": {
+ "$value": "#096dd9",
+ "$type": "color",
+ "description": "Info active color."
+ },
+ "color-success": {
+ "$value": "#52c41a",
+ "$type": "color",
+ "description": "Success semantic color."
+ },
+ "color-success-bg": {
+ "$value": "#f6ffed",
+ "$type": "color",
+ "description": "Success background color."
+ },
+ "color-success-border": {
+ "$value": "#b7eb8f",
+ "$type": "color",
+ "description": "Success border color."
+ },
+ "color-success-text": {
+ "$value": "#49b10e",
+ "$type": "color",
+ "description": "Success text color."
+ },
+ "color-success-hover": {
+ "$value": "#73d13d",
+ "$type": "color",
+ "description": "Success hover color."
+ },
+ "color-success-active": {
+ "$value": "#389e0d",
+ "$type": "color",
+ "description": "Success active color."
+ },
+ "color-warning": {
+ "$value": "#ff9800",
+ "$type": "color",
+ "description": "Warning semantic color."
+ },
+ "color-warning-bg": {
+ "$value": "#fffbe6",
+ "$type": "color",
+ "description": "Warning background color."
+ },
+ "color-warning-border": {
+ "$value": "#ffe58f",
+ "$type": "color",
+ "description": "Warning border color."
+ },
+ "color-warning-text": {
+ "$value": "#d48806",
+ "$type": "color",
+ "description": "Warning text color."
+ },
+ "color-warning-hover": {
+ "$value": "#ffad33",
+ "$type": "color",
+ "description": "Warning hover color."
+ },
+ "color-warning-active": {
+ "$value": "#e68a00",
+ "$type": "color",
+ "description": "Warning active color."
+ },
+ "color-danger": {
+ "$value": "#f44336",
+ "$type": "color",
+ "description": "Danger semantic color."
+ },
+ "color-danger-bg": {
+ "$value": "#fff1f0",
+ "$type": "color",
+ "description": "Danger background color."
+ },
+ "color-danger-border": {
+ "$value": "#ffa39e",
+ "$type": "color",
+ "description": "Danger border color."
+ },
+ "color-danger-text": {
+ "$value": "#cf1322",
+ "$type": "color",
+ "description": "Danger text color."
+ },
+ "color-danger-hover": {
+ "$value": "#ff7875",
+ "$type": "color",
+ "description": "Danger hover color."
+ },
+ "color-danger-active": {
+ "$value": "#cf1322",
+ "$type": "color",
+ "description": "Danger active color."
+ },
+ "color-fill-secondary": {
+ "$value": "#f5f5f5",
+ "$type": "color",
+ "description": "Secondary fill color."
+ },
+ "color-fill-tertiary": {
+ "$value": "#f0f0f0",
+ "$type": "color",
+ "description": "Tertiary fill color."
+ },
+ "color-overlay-bg": {
+ "$value": "rgba(0, 0, 0, 0.55)",
+ "$type": "color",
+ "description": "Overlay background color."
+ },
+ "color-overlay-inverted": {
+ "$value": "rgba(255, 255, 255, 0.75)",
+ "$type": "color",
+ "description": "Inverted overlay color."
+ }
+}
diff --git a/packages/tokens/source/semantic/effects.json b/packages/tokens/source/semantic/effects.json
new file mode 100644
index 00000000..38c96676
--- /dev/null
+++ b/packages/tokens/source/semantic/effects.json
@@ -0,0 +1,37 @@
+{
+ "shadow-btn": {
+ "$value": "inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075)",
+ "$type": "shadow",
+ "description": "Button elevation shadow."
+ },
+ "shadow-card": {
+ "$value": "0 1px 6px rgba(0, 0, 0, 0.12)",
+ "$type": "shadow",
+ "description": "Card elevation shadow."
+ },
+ "shadow-focus": {
+ "$value": "0 0 0 3px rgba(110, 65, 191, 0.2)",
+ "$type": "shadow",
+ "description": "Default focus ring shadow."
+ },
+ "shadow-lg": {
+ "$value": "0 1rem 3rem rgba(0, 0, 0, 0.175)",
+ "$type": "shadow",
+ "description": "Large elevation shadow."
+ },
+ "shadow-modal": {
+ "$value": "0 4px 12px rgba(0, 0, 0, 0.15)",
+ "$type": "shadow",
+ "description": "Modal elevation shadow."
+ },
+ "shadow-popup": {
+ "$value": "0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",
+ "$type": "shadow",
+ "description": "Popup elevation shadow."
+ },
+ "shadow-sm": {
+ "$value": "0 0.125rem 0.25rem rgba(0, 0, 0, 0.075)",
+ "$type": "shadow",
+ "description": "Small elevation shadow."
+ }
+}
diff --git a/packages/tokens/source/semantic/size.json b/packages/tokens/source/semantic/size.json
new file mode 100644
index 00000000..b3bef0cc
--- /dev/null
+++ b/packages/tokens/source/semantic/size.json
@@ -0,0 +1,22 @@
+{
+ "height-sm": {
+ "$value": "24px",
+ "$type": "dimension",
+ "description": "Small control height."
+ },
+ "height-md": {
+ "$value": "32px",
+ "$type": "dimension",
+ "description": "Medium control height."
+ },
+ "height-lg": {
+ "$value": "40px",
+ "$type": "dimension",
+ "description": "Large control height."
+ },
+ "border-radius": {
+ "$value": "6px",
+ "$type": "dimension",
+ "description": "Default border radius."
+ }
+}
diff --git a/packages/tokens/source/semantic/spacing.json b/packages/tokens/source/semantic/spacing.json
new file mode 100644
index 00000000..a8c82934
--- /dev/null
+++ b/packages/tokens/source/semantic/spacing.json
@@ -0,0 +1,22 @@
+{
+ "spacer": {
+ "$value": "1rem",
+ "$type": "dimension",
+ "description": "Base spacing unit."
+ },
+ "spacing-3": {
+ "$value": "8px",
+ "$type": "dimension",
+ "description": "Spacing scale step 3."
+ },
+ "spacing-4": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "Spacing scale step 4."
+ },
+ "spacing-5": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Spacing scale step 5."
+ }
+}
diff --git a/packages/tokens/source/semantic/typography.json b/packages/tokens/source/semantic/typography.json
new file mode 100644
index 00000000..44db207c
--- /dev/null
+++ b/packages/tokens/source/semantic/typography.json
@@ -0,0 +1,77 @@
+{
+ "font-family": {
+ "$value": "-apple-system, blinkmacsystemfont, \"Segoe UI\", roboto, \"Helvetica Neue\", arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"",
+ "$type": "font-family",
+ "description": "Default font family."
+ },
+ "font-family-monospace": {
+ "$value": "lucida console, consolas, monaco, andale mono, ubuntu mono, monospace",
+ "$type": "font-family",
+ "description": "Monospace font family."
+ },
+ "font-size-sm": {
+ "$value": "12px",
+ "$type": "dimension",
+ "description": "Small font size."
+ },
+ "font-size-base": {
+ "$value": "14px",
+ "$type": "dimension",
+ "description": "Base font size."
+ },
+ "font-size-lg": {
+ "$value": "16px",
+ "$type": "dimension",
+ "description": "Large font size."
+ },
+ "font-weight": {
+ "$value": "400",
+ "$type": "font-weight",
+ "description": "Default font weight."
+ },
+ "font-weight-medium": {
+ "$value": "500",
+ "$type": "font-weight",
+ "description": "Medium font weight."
+ },
+ "headings-font-weight": {
+ "$value": "500",
+ "$type": "font-weight",
+ "description": "Heading font weight."
+ },
+ "line-height-base": {
+ "$value": "1.5715",
+ "$type": "line-height",
+ "description": "Base line height."
+ },
+ "h1-font-size": {
+ "$value": "2.5rem",
+ "$type": "dimension",
+ "description": "H1 font size."
+ },
+ "h2-font-size": {
+ "$value": "2rem",
+ "$type": "dimension",
+ "description": "H2 font size."
+ },
+ "h3-font-size": {
+ "$value": "1.75rem",
+ "$type": "dimension",
+ "description": "H3 font size."
+ },
+ "h4-font-size": {
+ "$value": "1.5rem",
+ "$type": "dimension",
+ "description": "H4 font size."
+ },
+ "h5-font-size": {
+ "$value": "1.25rem",
+ "$type": "dimension",
+ "description": "H5 font size."
+ },
+ "h6-font-size": {
+ "$value": "1rem",
+ "$type": "dimension",
+ "description": "H6 font size."
+ }
+}
diff --git a/packages/tokens/source/themes/dark.json b/packages/tokens/source/themes/dark.json
new file mode 100644
index 00000000..5b640f19
--- /dev/null
+++ b/packages/tokens/source/themes/dark.json
@@ -0,0 +1,261 @@
+{
+ "meta": {
+ "id": "tiny-dark",
+ "name": "Tiny Dark",
+ "mode": "dark"
+ },
+ "tokens": {
+ "semantic": {
+ "chart-1": "#9065d0",
+ "chart-2": "#177ddc",
+ "chart-3": "#49aa19",
+ "chart-4": "#d89614",
+ "chart-5": "#d32029",
+ "color-bg": "#141414",
+ "color-bg-container": "#1f1f1f",
+ "color-bg-disabled": "#2a2a2a",
+ "color-bg-elevated": "#1f1f1f",
+ "color-bg-layout": "#141414",
+ "color-bg-spotlight": "#2a2a2a",
+ "color-border": "#424242",
+ "color-border-btn-default": "#424242",
+ "color-border-light": "#303030",
+ "color-border-secondary": "#363636",
+ "color-danger": "#d32029",
+ "color-danger-active": "#ab1a20",
+ "color-danger-bg": "#2a1215",
+ "color-danger-border": "#58181c",
+ "color-danger-hover": "#e84749",
+ "color-danger-text": "#e84749",
+ "color-fill": "#262626",
+ "color-fill-secondary": "#2a2a2a",
+ "color-fill-tertiary": "#303030",
+ "color-info": "#177ddc",
+ "color-info-active": "#1268b3",
+ "color-info-bg": "#111d2c",
+ "color-info-border": "#15395b",
+ "color-info-hover": "#3c9ae8",
+ "color-info-text": "#3c9ae8",
+ "color-overlay-bg": "rgba(0, 0, 0, 0.65)",
+ "color-overlay-inverted": "rgba(50, 50, 50, 0.75)",
+ "color-primary": "#9065d0",
+ "color-primary-active": "#7a50bf",
+ "color-primary-bg": "#1a1325",
+ "color-primary-bg-hover": "#231a33",
+ "color-primary-border": "#5b3d8f",
+ "color-primary-hover": "#a882dc",
+ "color-primary-text-hover": "#a882dc",
+ "color-success": "#49aa19",
+ "color-success-active": "#3c8c14",
+ "color-success-bg": "#162312",
+ "color-success-border": "#274916",
+ "color-success-hover": "#6abe39",
+ "color-success-text": "#6abe39",
+ "color-text": "rgba(255, 255, 255, 0.85)",
+ "color-text-heading": "rgba(255, 255, 255, 0.85)",
+ "color-text-label": "rgba(255, 255, 255, 0.85)",
+ "color-text-placeholder": "#5c5c5c",
+ "color-text-quaternary": "rgba(255, 255, 255, 0.25)",
+ "color-text-secondary": "rgba(255, 255, 255, 0.65)",
+ "color-text-tertiary": "rgba(255, 255, 255, 0.45)",
+ "color-warning": "#d89614",
+ "color-warning-active": "#b37a10",
+ "color-warning-bg": "#2b2111",
+ "color-warning-border": "#594214",
+ "color-warning-hover": "#e8b339",
+ "color-warning-text": "#e8b339",
+ "shadow-btn": "inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 1px rgba(0, 0, 0, 0.2)",
+ "shadow-card": "0 1px 6px rgba(0, 0, 0, 0.35)",
+ "shadow-lg": "0 1rem 3rem rgba(0, 0, 0, 0.5)",
+ "shadow-modal": "0 4px 12px rgba(0, 0, 0, 0.45)",
+ "shadow-popup": "0 3px 6px -4px rgba(0, 0, 0, 0.48), 0 6px 16px 0 rgba(0, 0, 0, 0.32), 0 9px 28px 8px rgba(0, 0, 0, 0.2)",
+ "shadow-sm": "0 0.125rem 0.25rem rgba(0, 0, 0, 0.3)"
+ },
+ "components": {
+ "anchor.ball-bg": "#1f1f1f",
+ "anchor.bg": "#1f1f1f",
+ "anchor.ink-bg": "#303030",
+ "avatar.bg": "#555",
+ "avatar.border": "#1f1f1f",
+ "avatar.color": "#e8e8e8",
+ "avatar.offline-color": "#525252",
+ "avatar.presence-shadow": "0 0 0 0.1rem #1f1f1f",
+ "back-top.bg": "rgba(255, 255, 255, 0.2)",
+ "badge.shadow": "0 0 0 1.5px #1f1f1f",
+ "calendar.bg": "#1f1f1f",
+ "calendar.border": "#363636",
+ "calendar.hover": "#2a2a2a",
+ "carousel.arrow-bg": "rgba(255, 255, 255, 0.15)",
+ "carousel.arrow-hover-bg": "rgba(255, 255, 255, 0.25)",
+ "cascader.bg": "#1f1f1f",
+ "cascader.border": "#424242",
+ "cascader.dropdown-bg": "#1f1f1f",
+ "cascader.hover": "#2a2a2a",
+ "cascader.selected-bg": "rgba(144, 101, 208, 0.1)",
+ "checkbox.bg": "#1f1f1f",
+ "checkbox.border": "#424242",
+ "checkbox.disabled-bg": "#2a2a2a",
+ "collapse.bg": "#262626",
+ "collapse.border": "#424242",
+ "collapse.borderless-bg": "#1f1f1f",
+ "collapse.content-bg": "#1f1f1f",
+ "collapse.header-hover-bg": "#303030",
+ "descriptions.border": "#363636",
+ "descriptions.label-bg": "#262626",
+ "divider.color": "#363636",
+ "divider.text-color": "rgba(255, 255, 255, 0.85)",
+ "drawer.bg": "#1f1f1f",
+ "drawer.border": "#363636",
+ "empty.desc-color": "rgba(255, 255, 255, 0.35)",
+ "form.error-color": "#e84749",
+ "form.error-hover": "#d32029",
+ "form.notice-bg": "#2b2111",
+ "form.notice-color": "rgba(255, 255, 255, 0.65)",
+ "input-number.control-active-bg": "#2a2a2a",
+ "input-number.control-border": "#424242",
+ "input-number.icon-color": "#666",
+ "keyboard.bg": "#2a2a2a",
+ "keyboard.border": "#424242",
+ "keyboard.border-bottom": "#363636",
+ "keyboard.color": "rgba(255, 255, 255, 0.85)",
+ "keyboard.shadow": "inset 0 -1px 0 #363636",
+ "layout.sidebar-light-bg": "#1f1f1f",
+ "layout.sidebar-light-color": "rgba(255, 255, 255, 0.85)",
+ "layout.sidebar-light-trigger-bg": "#2a2a2a",
+ "layout.sidebar-light-trigger-icon": "#666",
+ "list.border": "#363636",
+ "menu.divider-color": "rgba(255, 255, 255, 0.1)",
+ "menu.group-title-color": "rgba(255, 255, 255, 0.45)",
+ "menu.light-bg": "#1f1f1f",
+ "menu.light-border": "#303030",
+ "menu.light-color": "rgba(255, 255, 255, 0.85)",
+ "message.bg": "#1f1f1f",
+ "modal.bg": "#1f1f1f",
+ "modal.footer-border": "#363636",
+ "modal.header-bg": "#1f1f1f",
+ "modal.header-border": "#363636",
+ "native-select.bg": "#1f1f1f",
+ "native-select.disabled-bg": "#2a2a2a",
+ "native-select.disabled-color": "rgba(255, 255, 255, 0.25)",
+ "notification.bg": "#1f1f1f",
+ "notification.close-color": "rgba(255, 255, 255, 0.2)",
+ "notification.close-hover": "rgba(255, 255, 255, 0.7)",
+ "pagination.bg": "#1f1f1f",
+ "pagination.disabled-active-bg": "#424242",
+ "pagination.disabled-bg": "#2a2a2a",
+ "pagination.disabled-color": "#525252",
+ "picker.cell-disabled-bg": "#2a2a2a",
+ "picker.cell-hover-bg": "#2a2a2a",
+ "picker.cell-selected-hover-bg": "#7a50bf",
+ "picker.clear-bg": "#1f1f1f",
+ "picker.dropdown-bg": "#1f1f1f",
+ "picker.input-bg": "#1f1f1f",
+ "popover.dark-border": "#525252",
+ "popup.arrow-shadow": "rgba(0, 0, 0, 0.2)",
+ "popup.dark-bg": "#363636",
+ "popup.light-bg": "#1f1f1f",
+ "progress.circle-trail": "#363636",
+ "progress.text-color": "rgba(255, 255, 255, 0.65)",
+ "progress.trail-bg": "#363636",
+ "radio.bg": "#1f1f1f",
+ "radio.disabled-border": "#424242",
+ "radio.disabled-dot": "rgba(255, 255, 255, 0.2)",
+ "result.content-bg": "#262626",
+ "segmented.active-bg": "#1f1f1f",
+ "segmented.bg": "#2a2a2a",
+ "select.dropdown-bg": "#1f1f1f",
+ "select.option-active-bg": "#2a2a2a",
+ "select.option-disabled-bg": "#1f1f1f",
+ "select.option-selected-bg": "#1a1325",
+ "skeleton.bg": "#303030",
+ "skeleton.shimmer": "linear-gradient(to right, #303030 25%, #3a3a3a 37%, #303030 63%)",
+ "slider.dot-active-border": "#9065d0",
+ "slider.dot-bg": "#1f1f1f",
+ "slider.dot-border": "#424242",
+ "slider.mark-active-color": "rgba(255, 255, 255, 0.7)",
+ "slider.mark-color": "rgba(255, 255, 255, 0.4)",
+ "slider.rail-bg": "#363636",
+ "slider.thumb-bg": "#1f1f1f",
+ "slider.thumb-border": "#9065d0",
+ "speed-dial.action-bg": "#1f1f1f",
+ "speed-dial.action-bg-hover": "#2a2a2a",
+ "speed-dial.action-color": "rgba(255, 255, 255, 0.85)",
+ "speed-dial.bg": "#9065d0",
+ "speed-dial.bg-hover": "#7a50bf",
+ "speed-dial.tooltip-bg": "#363636",
+ "speed-dial.tooltip-color": "rgba(255, 255, 255, 0.85)",
+ "split.bar-bg": "#262626",
+ "split.bar-border": "#424242",
+ "split.bar-line": "#525252",
+ "steps.icon-bg": "#1f1f1f",
+ "steps.tail-color": "#424242",
+ "switch.bg": "rgba(255, 255, 255, 0.25)",
+ "switch.thumb-bg": "#e8e8e8",
+ "switch.thumb-border": "rgba(255, 255, 255, 0.25)",
+ "switch.thumb-shadow": "0 1px 3px 1px rgba(0, 0, 0, 0.4)",
+ "table.border": "#363636",
+ "table.header-bg": "#262626",
+ "table.hover": "#2a2a2a",
+ "table.selected-bg": "rgba(144, 101, 208, 0.1)",
+ "tabs.border": "#303030",
+ "tabs.card-active-bg": "#1f1f1f",
+ "tabs.card-bg": "#262626",
+ "tag.bg": "#262626",
+ "tag.blue-bg": "#111d2c",
+ "tag.blue-border": "#15395b",
+ "tag.blue-color": "#3c9ae8",
+ "tag.border": "#424242",
+ "tag.checkable-bg": "#1f1f1f",
+ "tag.cyan-bg": "#112123",
+ "tag.cyan-border": "#144848",
+ "tag.cyan-color": "#33bcb7",
+ "tag.geekblue-bg": "#131a2e",
+ "tag.geekblue-border": "#1c2d57",
+ "tag.geekblue-color": "#5273e0",
+ "tag.gold-bg": "#2b2111",
+ "tag.gold-border": "#594214",
+ "tag.gold-color": "#e8b339",
+ "tag.green-bg": "#162312",
+ "tag.green-border": "#274916",
+ "tag.green-color": "#6abe39",
+ "tag.lime-bg": "#1a2611",
+ "tag.lime-border": "#3e4f13",
+ "tag.lime-color": "#8bbb11",
+ "tag.magenta-bg": "#291321",
+ "tag.magenta-border": "#55162b",
+ "tag.magenta-color": "#e0529c",
+ "tag.orange-bg": "#2b1d11",
+ "tag.orange-border": "#593815",
+ "tag.orange-color": "#e89a3c",
+ "tag.purple-bg": "#1a1325",
+ "tag.purple-border": "#301c4d",
+ "tag.purple-color": "#854eca",
+ "tag.red-bg": "#2a1215",
+ "tag.red-border": "#58181c",
+ "tag.red-color": "#e84749",
+ "tag.volcano-bg": "#2b1611",
+ "tag.volcano-border": "#592716",
+ "tag.volcano-color": "#e87040",
+ "textarea.counter-color": "rgba(255, 255, 255, 0.45)",
+ "timeline.dot-bg": "#1f1f1f",
+ "timeline.head-bg": "#1f1f1f",
+ "timeline.line-color": "#363636",
+ "transfer.border": "#424242",
+ "transfer.footer-bg": "#1f1f1f",
+ "transfer.footer-border": "#303030",
+ "transfer.header-bg": "#1f1f1f",
+ "transfer.item-hover-bg": "#2a2a2a",
+ "tree.arrow-color": "#666",
+ "tree.hover-bg": "#2a2a2a",
+ "typography.body-color": "rgba(255, 255, 255, 0.65)",
+ "typography.code-bg": "rgba(255, 255, 255, 0.06)",
+ "typography.code-border": "rgba(255, 255, 255, 0.06)",
+ "typography.heading-color": "rgba(255, 255, 255, 0.85)",
+ "typography.mark-bg": "#594214",
+ "upload.dragger-bg": "#262626",
+ "upload.dragger-border": "#424242",
+ "upload.dragger-hover-bg": "#303030",
+ "upload.item-hover-bg": "#2a2a2a"
+ }
+ }
+}
diff --git a/packages/tokens/source/themes/light.json b/packages/tokens/source/themes/light.json
new file mode 100644
index 00000000..b12c5cc3
--- /dev/null
+++ b/packages/tokens/source/themes/light.json
@@ -0,0 +1,11 @@
+{
+ "meta": {
+ "id": "tiny-light",
+ "name": "Tiny Light",
+ "mode": "light"
+ },
+ "tokens": {
+ "semantic": {},
+ "components": {}
+ }
+}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e5d11c3a..75949be5 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -185,12 +185,27 @@ importers:
specifier: ^2.3.1
version: 2.8.1
devDependencies:
+ '@testing-library/jest-dom':
+ specifier: ^6.0.0
+ version: 6.9.1
+ '@testing-library/react':
+ specifier: ^14.0.0
+ version: 14.3.1(@types/react@18.3.28)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ '@types/jest':
+ specifier: ^29.0.0
+ version: 29.5.14
'@types/react':
specifier: ^18.2.0
version: 18.3.28
'@types/react-dom':
specifier: ^18.2.0
version: 18.3.7(@types/react@18.3.28)
+ jest:
+ specifier: ^29.0.0
+ version: 29.7.0(@types/node@25.4.0)
+ jest-environment-jsdom:
+ specifier: ^29.0.0
+ version: 29.7.0
react:
specifier: ^18.2.0
version: 18.3.1
@@ -203,6 +218,9 @@ importers:
rimraf:
specifier: ^3.0.2
version: 3.0.2
+ ts-jest:
+ specifier: ^29.0.0
+ version: 29.4.6(@babel/core@7.29.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.29.0))(jest-util@29.7.0)(jest@29.7.0(@types/node@25.4.0))(typescript@5.9.3)
tsdown:
specifier: ^0.21.1
version: 0.21.2(typescript@5.9.3)