diff --git a/components/collapse/Collapse.tsx b/components/collapse/Collapse.tsx
index f91142dd5..99b498e69 100644
--- a/components/collapse/Collapse.tsx
+++ b/components/collapse/Collapse.tsx
@@ -81,7 +81,7 @@ export default defineComponent({
return (
['header', 'icon'].includes(props.collapsible) && onClickItem(panelProps.panelKey)
}
diff --git a/components/tag/index.tsx b/components/tag/index.tsx
index 208386c4e..be61ee7fa 100644
--- a/components/tag/index.tsx
+++ b/components/tag/index.tsx
@@ -25,6 +25,9 @@ export const tagProps = () => ({
onClose: {
type: Function as PropType<(e: MouseEvent) => void>,
},
+ onClick: {
+ type: Function as PropType<(e: MouseEvent) => void>,
+ },
'onUpdate:visible': Function as PropType<(vis: boolean) => void>,
icon: PropTypes.any,
});
@@ -86,7 +89,7 @@ const Tag = defineComponent({
);
const tagClassName = computed(() =>
- classNames(prefixCls.value, hashId.value, {
+ classNames(prefixCls.value, hashId.value, attrs.class, {
[`${prefixCls.value}-${props.color}`]: isInternalColor.value,
[`${prefixCls.value}-has-color`]: props.color && !isInternalColor.value,
[`${prefixCls.value}-hidden`]: !visible.value,
diff --git a/package.json b/package.json
index 4595209a5..27836b080 100644
--- a/package.json
+++ b/package.json
@@ -246,6 +246,7 @@
"stylelint-order": "^5.0.0",
"terser-webpack-plugin": "^5.1.1",
"through2": "^3.0.0",
+ "tinycolor2": "^1.6.0",
"ts-jest": "^28.0.5",
"ts-loader": "^9.1.0",
"ts-node": "^10.8.2",
@@ -254,6 +255,7 @@
"umi-request": "^1.3.5",
"unified": "9.2.2",
"url-loader": "^3.0.0",
+ "vanilla-jsoneditor": "^0.15.1",
"vite": "^3.0.0",
"vue": "^3.2.0",
"vue-antd-md-loader": "^1.2.1-beta.1",
diff --git a/site/src/components/antdv-token-previewer/ColorPanel.tsx b/site/src/components/antdv-token-previewer/ColorPanel.tsx
new file mode 100644
index 000000000..bedf45a0f
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/ColorPanel.tsx
@@ -0,0 +1,344 @@
+import type { InputProps } from 'ant-design-vue';
+import { Input, InputNumber, Select, theme } from 'ant-design-vue';
+import classNames from 'ant-design-vue/es/_util/classNames';
+import type { PropType } from 'vue';
+import { defineComponent, watchEffect, watch, computed, toRefs, ref } from 'vue';
+import { HexColorPicker, RgbaColorPicker } from '../vue-colorful';
+import tinycolor from 'tinycolor2';
+import makeStyle from './utils/makeStyle';
+
+const { useToken } = theme;
+
+const useStyle = makeStyle('ColorPanel', token => ({
+ '.color-panel': {
+ padding: 12,
+ backgroundColor: '#fff',
+ borderRadius: 12,
+ border: '1px solid rgba(0, 0, 0, 0.06)',
+ boxShadow: token.boxShadow,
+ width: 224,
+ boxSizing: 'border-box',
+
+ '.color-panel-mode': {
+ display: 'flex',
+ alignItems: 'center',
+ marginBottom: 6,
+ },
+ '.color-panel-preview': {
+ width: 24,
+ height: 24,
+ borderRadius: 4,
+ boxShadow: '0 2px 3px -1px rgba(0,0,0,0.20), inset 0 0 0 1px rgba(0,0,0,0.09)',
+ flex: 'none',
+ overflow: 'hidden',
+ background:
+ 'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAFpJREFUWAntljEKADAIA23p6v//qQ+wfUEcCu1yriEgp0FHRJSJcnehmmWm1Dv/lO4HIg1AAAKjTqm03ea88zMCCEDgO4HV5bS757f+7wRoAAIQ4B9gByAAgQ3pfiDmXmAeEwAAAABJRU5ErkJggg==) 0% 0% / 32px',
+ },
+ '.color-panel-preset-colors': {
+ paddingTop: 12,
+ display: 'flex',
+ flexWrap: 'wrap',
+ width: 200,
+ },
+ '.color-panel-preset-color-btn': {
+ borderRadius: 4,
+ width: 20,
+ height: 20,
+ border: 'none',
+ outline: 'none',
+ margin: 4,
+ cursor: 'pointer',
+ boxShadow: '0 2px 3px -1px rgba(0,0,0,0.20), inset 0 0 0 1px rgba(0,0,0,0.09)',
+ },
+ '.color-panel-mode-title': {
+ color: token.colorTextPlaceholder,
+ marginTop: 2,
+ fontSize: 12,
+ textAlign: 'center',
+ },
+ '.color-panel-rgba-input': {
+ display: 'flex',
+ alignItems: 'center',
+ '&-part': {
+ flex: 1,
+ width: 0,
+ display: 'flex',
+ flexDirection: 'column',
+ alignItems: 'center',
+
+ '&-title': {
+ color: token.colorTextPlaceholder,
+ marginTop: 2,
+ fontSize: 12,
+ },
+
+ '&:not(:last-child)': {
+ marginRight: 4,
+ },
+
+ [`${token.rootCls}-input-number`]: {
+ width: '100%',
+ input: {
+ fontSize: 12,
+ padding: '0 4px',
+ },
+ },
+ },
+ },
+ },
+}));
+
+export type HexColorInputProps = {
+ value: string;
+ onChange?: (value: string) => void;
+ alpha?: boolean;
+};
+
+const getHexValue = (value: string, alpha: boolean = false) => {
+ return alpha ? tinycolor(value).toHex8() : tinycolor(value).toHex();
+};
+const HexColorInput = defineComponent({
+ name: 'HexColorInput',
+ props: {
+ value: { type: String },
+ alpha: { type: Boolean },
+ onChange: { type: Function as PropType<(value: string) => void> },
+ },
+ setup(props) {
+ const { value, alpha } = toRefs(props);
+
+ const hexValue = ref
(value.value);
+ const focusRef = ref(false);
+
+ const handleChange: InputProps['onChange'] = e => {
+ hexValue.value = e.target.value;
+ props.onChange(getHexValue(e.target.value, alpha.value));
+ };
+
+ const handleBlur: InputProps['onBlur'] = (e: any) => {
+ focusRef.value = false;
+ hexValue.value = getHexValue(e.target.value, alpha.value);
+ };
+
+ const handleFocus = () => {
+ focusRef.value = true;
+ };
+
+ watchEffect(() => {
+ if (!focusRef.value) {
+ hexValue.value = getHexValue(value.value, alpha.value);
+ }
+ });
+
+ return () => {
+ return (
+
+
'#',
+ }}
+ />
+
HEX{alpha.value ? '8' : ''}
+
+ );
+ };
+ },
+});
+
+type RgbaColor = tinycolor.ColorFormats.RGBA;
+
+export type RgbColorInputProps = {
+ value?: RgbaColor;
+ onChange?: (value: RgbaColor) => void;
+ alpha?: boolean;
+};
+
+const RgbColorInput = defineComponent({
+ name: 'RgbColorInput',
+ props: {
+ value: { type: Object as PropType, default: () => ({ r: 0, g: 0, b: 0, a: 1 }) },
+ onChange: { type: Function as PropType<(value: RgbaColor) => void> },
+ alpha: { type: Boolean },
+ },
+ setup(props) {
+ const { value, alpha } = toRefs(props);
+
+ watch(value, val => {
+ props.onChange(val);
+ });
+
+ return () => {
+ return (
+
+ );
+ };
+ },
+});
+
+export type ColorPanelProps = {
+ color: string;
+ onChange: (color: string) => void;
+ alpha?: boolean;
+};
+
+const colorModes = ['HEX', 'HEX8', 'RGB', 'RGBA'] as const;
+
+type ColorMode = (typeof colorModes)[number];
+
+const getColorStr = (color: any, mode: ColorMode) => {
+ switch (mode) {
+ case 'HEX':
+ return tinycolor(color).toHexString();
+ case 'HEX8':
+ return tinycolor(color).toHex8String();
+ case 'RGBA':
+ case 'RGB':
+ default:
+ return tinycolor(color).toRgbString();
+ }
+};
+const ColorPanel = defineComponent({
+ name: 'ColorPanel',
+ props: {
+ color: { type: String },
+ onChange: { type: Function as PropType<(color: string) => void> },
+ alpha: { type: Boolean },
+ },
+ inheritAttrs: false,
+ setup(props, { attrs }) {
+ const { color, alpha } = toRefs(props);
+
+ const { token } = useToken();
+ const [wrapSSR, hashId] = useStyle();
+ const colorMode = ref('HEX');
+
+ const presetColors = computed(() => {
+ return [
+ token.value.blue,
+ token.value.purple,
+ token.value.cyan,
+ token.value.green,
+ token.value.magenta,
+ token.value.pink,
+ token.value.red,
+ token.value.orange,
+ token.value.yellow,
+ token.value.volcano,
+ token.value.geekblue,
+ token.value.gold,
+ token.value.lime,
+ '#000',
+ ];
+ });
+
+ const handleColorModeChange = (value: ColorMode) => {
+ colorMode.value = value;
+ props.onChange(getColorStr(color.value, value));
+ };
+ return () => {
+ return wrapSSR(
+
+ {(colorMode.value === 'HEX' || colorMode.value === 'RGB') && (
+
{
+ props.onChange(getColorStr(value, colorMode.value));
+ }}
+ />
+ )}
+ {(colorMode.value === 'RGBA' || colorMode.value === 'HEX8') && (
+ {
+ props.onChange(getColorStr(value, colorMode.value));
+ }}
+ />
+ )}
+
+
+
+
+ {colorMode.value === 'HEX' && (
+
props.onChange(tinycolor(v).toHexString())}
+ />
+ )}
+ {colorMode.value === 'HEX8' && (
+ props.onChange(tinycolor(v).toHex8String())}
+ />
+ )}
+ {(colorMode.value === 'RGBA' || colorMode.value === 'RGB') && (
+ props.onChange(tinycolor(v).toRgbString())}
+ />
+ )}
+
+
+ {presetColors.value.map(presetColor => (
+
+ ,
+ );
+ };
+ },
+});
+
+export default ColorPanel;
diff --git a/site/src/components/antdv-token-previewer/ColorPreview.tsx b/site/src/components/antdv-token-previewer/ColorPreview.tsx
new file mode 100644
index 000000000..1899cb79a
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/ColorPreview.tsx
@@ -0,0 +1,80 @@
+import { defineComponent, toRefs } from 'vue';
+import type { CSSProperties } from 'vue';
+import classNames from 'ant-design-vue/es/_util/classNames';
+import makeStyle from './utils/makeStyle';
+import getColorBgImg from './utils/getColorBgImg';
+
+export type ColorPreviewProps = {
+ color: string;
+ dark?: boolean;
+};
+
+const useStyle = makeStyle('ColorPreview', () => ({
+ '.previewer-color-preview': {
+ width: '20px',
+ height: '20px',
+ position: 'relative',
+ borderRadius: '50%',
+ padding: 0,
+ display: 'inline-block',
+
+ '&::before': {
+ content: '""',
+ width: '100%',
+ height: '100%',
+ borderRadius: '50%',
+ top: 0,
+ insetInlineStart: 0,
+ position: 'absolute',
+ zIndex: 2,
+ backgroundColor: 'var(--antd-token-previewer-color-preview)',
+ boxShadow: '0 2px 3px -1px rgba(0,0,0,0.20), inset 0 0 0 1px rgba(0,0,0,0.09)',
+ },
+ },
+}));
+
+const ColorPreview = defineComponent({
+ name: 'ColorPreview',
+ inheritAttrs: false,
+ props: {
+ color: { type: String },
+ dark: { type: Boolean },
+ },
+ setup(props, { attrs }) {
+ const { color, dark } = toRefs(props);
+
+ const [warpSSR, hashId] = useStyle();
+
+ return () => {
+ return warpSSR(
+ ,
+ );
+ };
+ },
+});
+
+export default ColorPreview;
diff --git a/site/src/components/antdv-token-previewer/FilterPanel.tsx b/site/src/components/antdv-token-previewer/FilterPanel.tsx
new file mode 100644
index 000000000..a0063f96a
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/FilterPanel.tsx
@@ -0,0 +1,133 @@
+import type { CSSProperties, PropType } from 'vue';
+import { defineComponent, toRefs, ref } from 'vue';
+import makeStyle from './utils/makeStyle';
+import classNames from 'ant-design-vue/es/_util/classNames';
+import { Segmented, Tag } from 'ant-design-vue';
+
+const useStyle = makeStyle('FilterPanel', token => ({
+ '.previewer-filter-panel': {
+ // boxShadow:
+ // '0 2px 4px 0 rgba(0,0,0,0.05), 0 1px 2px 0 rgba(25,15,15,0.07), 0 0 1px 0 rgba(0,0,0,0.08)',
+ // backgroundColor: '#fff',
+ // borderRadius: 6,
+ // padding: '8px 12px',
+ overflow: 'hidden',
+ display: 'flex',
+ alignItems: 'start',
+
+ '.component-tree-head': {
+ display: 'flex',
+ alignItems: 'center',
+ flex: 'none',
+ marginInlineEnd: 20,
+
+ '.component-tree-filter-type': {
+ color: token.colorTextSecondary,
+ marginInlineEnd: token.marginXS,
+ fontSize: token.fontSizeSM,
+ },
+
+ '.component-tree-filter-segmented': {
+ fontSize: token.fontSizeSM,
+ },
+ },
+
+ '.preview-panel-subtitle': {
+ fontSize: token.fontSizeSM,
+ color: token.colorTextSecondary,
+ },
+
+ [`${token.rootCls}-tag.previewer-token-filter-tag`]: {
+ color: token.colorPrimary,
+ backgroundColor: 'rgba(22,119,255,0.10)',
+ border: 'none',
+ borderRadius: 4,
+
+ '> .anticon': {
+ color: token.colorPrimary,
+ },
+ },
+ },
+}));
+
+export type FilterMode = 'highlight' | 'filter';
+
+export type FilterPanelProps = {
+ filterMode?: FilterMode;
+ onFilterModeChange?: (mode: FilterMode) => void;
+ selectedTokens: string[];
+ onSelectedTokensChange?: (newTokens: string[]) => void;
+ onTokenClick?: (token: string) => void;
+ className?: string;
+ style?: CSSProperties;
+};
+
+const FilterPanel = defineComponent({
+ name: 'FilterPanel',
+ inheritAttrs: false,
+ props: {
+ filterMode: { type: String as PropType },
+ onFilterModeChange: { type: Function as PropType<(mode: FilterMode) => void> },
+ selectedTokens: { type: Array as PropType },
+ onSelectedTokensChange: { type: Function as PropType<(newTokens: string[]) => void> },
+ onTokenClick: { type: Function as PropType<(token: string) => void> },
+ },
+ setup(props, { attrs }) {
+ const { filterMode: customFilterMode, selectedTokens } = toRefs(props);
+
+ const [wrapSSR, hashId] = useStyle();
+
+ const filterMode = ref(customFilterMode.value || 'filter');
+
+ return () => {
+ if (selectedTokens.value.length === 0) {
+ return null;
+ }
+ return wrapSSR(
+
+ {selectedTokens.value && selectedTokens.value.length > 0 && (
+ <>
+
+
筛选方式:
+
{
+ props.onFilterModeChange?.(value as any);
+ filterMode.value = value as any;
+ }}
+ options={[
+ { label: '过滤', value: 'filter' },
+ { label: '高亮', value: 'highlight' },
+ ]}
+ />
+
+
+ 已选中:
+ {selectedTokens.value.map(token => (
+
+ props.onSelectedTokensChange?.(
+ selectedTokens.value?.filter(item => item !== token),
+ )
+ }
+ style={{ marginBlock: '2px', cursor: 'pointer' }}
+ class="previewer-token-filter-tag"
+ onClick={() => props.onTokenClick?.(token)}
+ >
+ {token}
+
+ ))}
+
+ >
+ )}
+
,
+ );
+ };
+ },
+});
+
+export default FilterPanel;
diff --git a/site/src/components/antdv-token-previewer/IconSwitch.tsx b/site/src/components/antdv-token-previewer/IconSwitch.tsx
new file mode 100644
index 000000000..120376f2e
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/IconSwitch.tsx
@@ -0,0 +1,101 @@
+import classNames from 'ant-design-vue/es/_util/classNames';
+import makeStyle from './utils/makeStyle';
+import { defineComponent, PropType, toRefs } from 'vue';
+
+const useStyle = makeStyle('IconSwitch', () => {
+ const activeBackground = '#314659';
+ return {
+ '.theme-editor-icon-switch': {
+ display: 'inline-block',
+
+ '.holder': {
+ position: 'relative',
+ display: 'inline-flex',
+ background: '#ebedf0',
+ borderRadius: '100vw',
+ cursor: 'pointer',
+ transition: 'all 0.3s',
+
+ '&::before': {
+ position: 'absolute',
+ top: 0,
+ left: 'calc(100% - 32px)',
+ width: 32,
+ height: 32,
+ background: activeBackground,
+ borderRadius: '100vw',
+ transition: 'all 0.3s',
+ content: '""',
+ },
+
+ '&.leftChecked::before': {
+ left: 0,
+ },
+
+ '&:hover': {
+ boxShadow: '0 0 3px fade(@active-background, 40%)',
+ },
+ },
+
+ '.icon': {
+ position: 'relative',
+ width: 32,
+ height: 32,
+ color: '#a3b1bf',
+ lineHeight: '32px',
+ textAlign: 'center',
+ transition: 'all 0.3s',
+ fontSize: 16,
+
+ '.anticon': {
+ fontSize: 14,
+ },
+
+ '&:first-child': {
+ marginInlineEnd: -4,
+ },
+
+ '&.active': {
+ color: '#fff',
+ },
+ },
+ },
+ };
+});
+
+export interface IconSwitchProps {
+ leftChecked?: boolean;
+ onChange?: (leftChecked: boolean) => void;
+}
+const IconSwitch = defineComponent({
+ name: 'IconSwitch',
+ props: {
+ leftChecked: { type: Boolean },
+ onChange: { type: Function as PropType<(leftChecked: boolean) => void> },
+ },
+ setup(props, { attrs, slots }) {
+ const { leftChecked } = toRefs(props);
+ const [wrapSSR, hashId] = useStyle();
+
+ return () => {
+ return wrapSSR(
+
+
{
+ props.onChange(!leftChecked.value);
+ }}
+ >
+
+ {slots.leftIcon && slots.leftIcon()}
+
+
+ {slots.rightIcon && slots.rightIcon()}
+
+
+
,
+ );
+ };
+ },
+});
+export default IconSwitch;
diff --git a/site/src/components/antdv-token-previewer/ThemeEditor.tsx b/site/src/components/antdv-token-previewer/ThemeEditor.tsx
new file mode 100644
index 000000000..896f1435c
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/ThemeEditor.tsx
@@ -0,0 +1,176 @@
+import type { PropType } from 'vue';
+import { defineComponent, toRefs, ref, computed } from 'vue';
+import type { DerivativeFunc } from 'ant-design-vue/es/_util/cssinjs';
+import classNames from 'ant-design-vue/es/_util/classNames';
+import type { SelectedToken, Theme } from './interface';
+import type { Locale } from './locale';
+import { useProvideLocaleContext, zhCN } from './locale';
+import { mapRelatedAlias, seedRelatedAlias, seedRelatedMap } from './meta/TokenRelation';
+import { getRelatedComponents } from './utils/statistic';
+import makeStyle from './utils/makeStyle';
+import useControlledTheme from './hooks/useControlledTheme';
+
+import type { TokenPanelProProps } from './token-panel-pro';
+import TokenPanelPro from './token-panel-pro';
+import ComponentDemoPro from './token-panel-pro/ComponentDemoPro';
+import { antdComponents } from './component-panel';
+
+const useStyle = makeStyle('ThemeEditor', token => ({
+ '.antd-theme-editor': {
+ backgroundColor: token.colorBgLayout,
+ display: 'flex',
+ },
+}));
+
+const defaultTheme: Theme = {
+ name: '默认主题',
+ key: 'default',
+ config: {},
+};
+
+export type ThemeEditorProps = {
+ /**
+ * @deprecated
+ * @default true
+ */
+ simple?: boolean;
+ theme?: Theme;
+ onThemeChange?: (theme: Theme) => void;
+ darkAlgorithm?: DerivativeFunc;
+ locale?: Locale;
+};
+
+const ThemeEditor = defineComponent({
+ name: 'ThemeEditor',
+ inheritAttrs: false,
+ props: {
+ simple: { type: Boolean },
+ theme: { type: Object as PropType },
+ onThemeChange: { type: Function as PropType<(theme: Theme) => void> },
+ darkAlgorithm: { type: Function as PropType> },
+ locale: { type: Object as PropType, default: zhCN },
+ },
+ setup(props, { attrs, expose }) {
+ const { theme: customTheme, darkAlgorithm, locale } = toRefs(props);
+
+ const [wrapSSR, hashId] = useStyle();
+
+ const selectedTokens = ref({
+ seed: ['colorPrimary'],
+ });
+
+ const aliasOpen = ref(false);
+
+ const { theme, infoFollowPrimary, onInfoFollowPrimaryChange, updateRef } = useControlledTheme({
+ theme: customTheme,
+ defaultTheme,
+ onChange: props.onThemeChange,
+ darkAlgorithm,
+ });
+
+ const handleTokenSelect: TokenPanelProProps['onTokenSelect'] = (token, type) => {
+ const tokens = typeof token === 'string' ? (token ? [token] : []) : token;
+ if (type === 'seed') {
+ return {
+ seed: tokens,
+ };
+ }
+
+ let newSelectedTokens = { ...selectedTokens.value };
+ tokens.forEach(newToken => {
+ newSelectedTokens = {
+ ...selectedTokens.value,
+ [type]: selectedTokens.value[type]?.includes(newToken)
+ ? selectedTokens.value[type]?.filter(t => t !== newToken)
+ : [...(selectedTokens.value[type] ?? []), newToken],
+ };
+ });
+ if (type === 'map') {
+ delete newSelectedTokens.alias;
+ }
+ selectedTokens.value = newSelectedTokens;
+ };
+
+ const computedSelectedTokens = computed(() => {
+ if (
+ selectedTokens.value.seed?.length &&
+ !selectedTokens.value.map?.length &&
+ !selectedTokens.value.alias?.length
+ ) {
+ return [
+ ...selectedTokens.value.seed,
+ ...((seedRelatedMap as any)[selectedTokens.value.seed[0]] ?? []),
+ ...((seedRelatedAlias as any)[selectedTokens.value.seed[0]] ?? []),
+ ];
+ }
+ if (selectedTokens.value.map?.length && !selectedTokens.value.alias?.length) {
+ return [
+ ...selectedTokens.value.map,
+ ...selectedTokens.value.map.reduce((result, item) => {
+ return result.concat((mapRelatedAlias as any)[item]);
+ }, []),
+ ];
+ }
+ if (selectedTokens.value.alias?.length) {
+ return [...selectedTokens.value.alias];
+ }
+ return [];
+ });
+
+ const relatedComponents = computed(() => {
+ return computedSelectedTokens.value ? getRelatedComponents(computedSelectedTokens.value) : [];
+ });
+
+ expose({
+ updateRef,
+ });
+
+ useProvideLocaleContext(locale);
+
+ return () => {
+ return wrapSSR(
+
+
+ (aliasOpen.value = open)}
+ theme={theme.value}
+ style={{ flex: 1 }}
+ selectedTokens={selectedTokens.value}
+ onTokenSelect={handleTokenSelect}
+ infoFollowPrimary={infoFollowPrimary.value}
+ onInfoFollowPrimaryChange={onInfoFollowPrimaryChange}
+ />
+
+ {/*
*/}
+
+
,
+ );
+ };
+ },
+});
+
+export default ThemeEditor;
diff --git a/site/src/components/antdv-token-previewer/TokenInput.tsx b/site/src/components/antdv-token-previewer/TokenInput.tsx
new file mode 100644
index 000000000..4b45f86ff
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/TokenInput.tsx
@@ -0,0 +1,244 @@
+import { Button, Dropdown, Input, InputNumber } from 'ant-design-vue';
+import classNames from 'ant-design-vue/es/_util/classNames';
+import type { PropType } from 'vue';
+import { defineComponent, toRefs, computed, ref, watch } from 'vue';
+import { debounce } from 'lodash';
+import ColorPanel from './ColorPanel';
+import ColorPreview from './ColorPreview';
+import type { MutableTheme } from './interface';
+import { useInjectLocaleContext } from './locale';
+import isColor from './utils/isColor';
+import makeStyle from './utils/makeStyle';
+
+const useStyle = makeStyle('TokenInput', token => ({
+ '.previewer-token-input': {
+ [`${token.rootCls}-input-group-addon, ${token.rootCls}-input-number-group-addon`]: {
+ border: '0 !important',
+ color: `rgba(0, 0, 0, 0.25) !important`,
+ fontSize: `${token.fontSizeSM}px !important`,
+ padding: '0 !important',
+ backgroundColor: 'transparent !important',
+
+ '&:first-child': {
+ paddingInlineStart: 0,
+ },
+
+ '&:last-child': {
+ paddingInlineEnd: 0,
+ },
+ },
+
+ [`${token.rootCls}-input-group-wrapper, ${token.rootCls}-input-number-group-wrapper`]: {
+ padding: 0,
+ height: 24,
+ width: '100%',
+
+ input: {
+ fontSize: token.fontSizeSM,
+ lineHeight: token.lineHeightSM,
+ padding: `2px ${token.paddingXS}px`,
+ height: 24,
+ },
+ },
+
+ [`${token.rootCls}-input-group-wrapper ${token.rootCls}-input, ${token.rootCls}-input-number-group-wrapper ${token.rootCls}-input-number`]:
+ {
+ background: 'white',
+ borderRadius: `${token.borderRadiusLG}px !important`,
+ whiteSpace: 'nowrap',
+ textOverflow: 'ellipsis',
+ },
+
+ '&&-light': {
+ [`${token.rootCls}-input-group-addon, ${token.rootCls}-input-number-group-addon`]: {
+ backgroundColor: token.colorBgContainer,
+ },
+
+ [`${token.rootCls}-input-group-wrapper ${token.rootCls}-input,
+ ${token.rootCls}-input-number-group-wrapper ${token.rootCls}-input-number-input`]: {
+ background: token.colorFillAlter,
+ },
+ },
+
+ '&&-readonly': {
+ input: {
+ cursor: 'text',
+ color: token.colorText,
+ },
+ },
+ },
+}));
+
+export type TokenInputProps = {
+ theme?: MutableTheme;
+ value?: string | number;
+ onChange?: (value: string | number) => void;
+ light?: boolean;
+ readonly?: boolean;
+ onReset?: () => void;
+ canReset?: boolean;
+ hideTheme?: boolean;
+};
+
+const TokenInput = defineComponent({
+ name: 'TokenInput',
+ inheritAttrs: false,
+ props: {
+ theme: { type: Object as PropType },
+ value: { type: [String, Number] },
+ onChange: { type: Function as PropType<(value: string | number) => void> },
+ light: { type: Boolean },
+ readonly: { type: Boolean },
+ onReset: { type: Function as PropType<() => void> },
+ canReset: { type: Boolean },
+ hideTheme: { type: Boolean },
+ },
+ setup(props, { attrs }) {
+ const { value, theme, light, readonly, canReset: customCanReset, hideTheme } = toRefs(props);
+
+ const valueRef = ref(value.value || '');
+
+ const tokenValue = ref(value.value || '');
+
+ const canReset = computed(() => customCanReset.value ?? valueRef.value !== tokenValue.value);
+
+ const locale = useInjectLocaleContext();
+
+ const [wrapSSR, hashId] = useStyle();
+
+ watch(
+ value,
+ val => {
+ if (val !== undefined) {
+ tokenValue.value = val;
+ }
+ },
+ { immediate: true },
+ );
+
+ const debouncedOnChange = debounce((newValue: number | string) => {
+ props.onChange?.(newValue);
+ }, 500);
+
+ const handleTokenChange = (newValue: number | string) => {
+ if (!readonly.value) {
+ tokenValue.value = newValue;
+ debouncedOnChange(newValue);
+ }
+ };
+
+ const handleReset = () => {
+ if (props.onReset) {
+ props.onReset();
+ } else {
+ handleTokenChange(valueRef.value);
+ }
+ };
+
+ return () => {
+ const addonAfter = !readonly.value && (
+
+ {canReset.value || hideTheme.value ? (
+
+ ) : (
+ {theme.value?.name}
+ )}
+
+ );
+
+ let inputNode;
+ if (typeof valueRef.value === 'string' && isColor(valueRef.value)) {
+ inputNode = (
+ {
+ handleTokenChange(v);
+ }}
+ />
+ }
+ >
+
+
+ }
+ onChange={e => {
+ handleTokenChange(e.target.value);
+ }}
+ />
+ );
+ } else if (typeof valueRef.value === 'number') {
+ inputNode = (
+ {
+ handleTokenChange(Number(newValue));
+ }}
+ />
+ );
+ } else {
+ inputNode = (
+ {
+ handleTokenChange(
+ typeof value.value === 'number' ? Number(e.target.value) : e.target.value,
+ );
+ }}
+ />
+ );
+ }
+ return wrapSSR(
+
+ {inputNode}
+
,
+ );
+ };
+ },
+});
+
+export default TokenInput;
diff --git a/site/src/components/antdv-token-previewer/component-demos/alert/alert.tsx b/site/src/components/antdv-token-previewer/component-demos/alert/alert.tsx
new file mode 100644
index 000000000..db1c32fb8
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/alert/alert.tsx
@@ -0,0 +1,24 @@
+import { defineComponent } from 'vue';
+import { Alert, Space } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+
+
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorIconHover', 'colorIcon', 'colorText'],
+ key: 'alert',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/alert/error.tsx b/site/src/components/antdv-token-previewer/component-demos/alert/error.tsx
new file mode 100644
index 000000000..110725c43
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/alert/error.tsx
@@ -0,0 +1,28 @@
+import { defineComponent } from 'vue';
+import { Alert, Space } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorErrorBg', 'colorErrorBorder', 'colorError'],
+ key: 'error',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/alert/index.ts b/site/src/components/antdv-token-previewer/component-demos/alert/index.ts
new file mode 100644
index 000000000..3398808cc
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/alert/index.ts
@@ -0,0 +1,11 @@
+import Default from './alert';
+import error from './error';
+import info from './info';
+import success from './success';
+import warning from './warning';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default, error, info, success, warning];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/alert/info.tsx b/site/src/components/antdv-token-previewer/component-demos/alert/info.tsx
new file mode 100644
index 000000000..6b173f7db
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/alert/info.tsx
@@ -0,0 +1,27 @@
+import { defineComponent } from 'vue';
+import { Alert, Space } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorInfo', 'colorInfoBorder', 'colorInfoBg'],
+ key: 'info',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/alert/success.tsx b/site/src/components/antdv-token-previewer/component-demos/alert/success.tsx
new file mode 100644
index 000000000..edf91e67a
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/alert/success.tsx
@@ -0,0 +1,27 @@
+import { defineComponent } from 'vue';
+import { Alert, Space } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorSuccess', 'colorSuccessBorder', 'colorSuccessBg'],
+ key: 'success',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/alert/warning.tsx b/site/src/components/antdv-token-previewer/component-demos/alert/warning.tsx
new file mode 100644
index 000000000..18d12d94a
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/alert/warning.tsx
@@ -0,0 +1,28 @@
+import { defineComponent } from 'vue';
+import { Alert, Space } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorWarning', 'colorWarningBorder', 'colorWarningBg'],
+ key: 'warning',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/anchor/anchor.tsx b/site/src/components/antdv-token-previewer/component-demos/anchor/anchor.tsx
new file mode 100644
index 000000000..8fbd36510
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/anchor/anchor.tsx
@@ -0,0 +1,26 @@
+import { Anchor } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const { Link } = Anchor;
+const Demo = () => {
+ return (
+
+ );
+};
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorPrimary', 'colorSplit', 'colorBgContainer'],
+ key: 'anchor',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/anchor/anchorInLayout.tsx b/site/src/components/antdv-token-previewer/component-demos/anchor/anchorInLayout.tsx
new file mode 100644
index 000000000..950a709cb
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/anchor/anchorInLayout.tsx
@@ -0,0 +1,33 @@
+import { defineComponent } from 'vue';
+import { Anchor, theme } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const { Link } = Anchor;
+const Demo = defineComponent({
+ setup() {
+ const { token } = theme.useToken();
+
+ return () => {
+ return (
+
+ );
+ };
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorSplit'],
+ key: 'anchorInLayout',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/anchor/index.ts b/site/src/components/antdv-token-previewer/component-demos/anchor/index.ts
new file mode 100644
index 000000000..19a68f804
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/anchor/index.ts
@@ -0,0 +1,8 @@
+import Demo from './anchor';
+import AnchorLayout from './anchorInLayout';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Demo, AnchorLayout];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/autoComplete/auto-complete.tsx b/site/src/components/antdv-token-previewer/component-demos/autoComplete/auto-complete.tsx
new file mode 100644
index 000000000..f0f05ef02
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/autoComplete/auto-complete.tsx
@@ -0,0 +1,59 @@
+import { defineComponent, ref } from 'vue';
+import { AutoComplete } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const mockVal = (str: string, repeat: number = 1) => ({
+ value: str.repeat(repeat),
+});
+
+const Demo = defineComponent({
+ setup() {
+ const value = ref('');
+ const options = ref<{ value: string }[]>([]);
+ const onSearch = (searchText: string) => {
+ options.value = !searchText
+ ? []
+ : [mockVal(searchText), mockVal(searchText, 2), mockVal(searchText, 3)];
+ };
+ const onSelect = (data: string) => {
+ // eslint-disable-next-line no-console
+ console.log('onSelect', data);
+ };
+ const onChange = (data: string) => {
+ value.value = data;
+ };
+
+ return () => {
+ return (
+ <>
+ {' '}
+ {' '}
+
{' '}
+ {' '}
+ >
+ );
+ };
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: [],
+ key: 'autoComplete',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/autoComplete/index.ts b/site/src/components/antdv-token-previewer/component-demos/autoComplete/index.ts
new file mode 100644
index 000000000..e0d56f8cc
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/autoComplete/index.ts
@@ -0,0 +1,7 @@
+import Default from './auto-complete';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/avatar/avatar.tsx b/site/src/components/antdv-token-previewer/component-demos/avatar/avatar.tsx
new file mode 100644
index 000000000..9ffecca5f
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/avatar/avatar.tsx
@@ -0,0 +1,19 @@
+import { Avatar, Space } from 'ant-design-vue';
+import { UserOutlined } from '@ant-design/icons-vue';
+
+export default () => (
+
+
+ } />
+ } />
+ } />
+ } />
+
+
+ } />
+ } />
+ } />
+ } />
+
+
+);
diff --git a/site/src/components/antdv-token-previewer/component-demos/avatar/index.tsx b/site/src/components/antdv-token-previewer/component-demos/avatar/index.tsx
new file mode 100644
index 000000000..b19c81191
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/avatar/index.tsx
@@ -0,0 +1,13 @@
+import Default from './avatar';
+// import Progress from './progress';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [
+ {
+ demo: ,
+ key: 'default',
+ },
+];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/badge/badge.tsx b/site/src/components/antdv-token-previewer/component-demos/badge/badge.tsx
new file mode 100644
index 000000000..0f59aa3c9
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/badge/badge.tsx
@@ -0,0 +1,32 @@
+import { defineComponent } from 'vue';
+import { Badge, Avatar, Space, theme } from 'ant-design-vue';
+import { ClockCircleFilled } from '@ant-design/icons-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ const { token } = theme.useToken();
+
+ return () => (
+
+
+
+
+
+
+
+ }>
+
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorError', 'colorBorderBg', 'colorBgContainer'],
+ key: 'badge',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/badge/index.ts b/site/src/components/antdv-token-previewer/component-demos/badge/index.ts
new file mode 100644
index 000000000..6bdca3bee
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/badge/index.ts
@@ -0,0 +1,10 @@
+import Default from './badge';
+import Progress from './progress';
+import warning from './warning';
+import success from './success';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default, Progress, warning, success];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/badge/progress.tsx b/site/src/components/antdv-token-previewer/component-demos/badge/progress.tsx
new file mode 100644
index 000000000..cc308dfd7
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/badge/progress.tsx
@@ -0,0 +1,22 @@
+import { defineComponent } from 'vue';
+import { Badge, Space } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+ Process
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorPrimary'],
+ key: 'progress',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/badge/success.tsx b/site/src/components/antdv-token-previewer/component-demos/badge/success.tsx
new file mode 100644
index 000000000..46f56ce0b
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/badge/success.tsx
@@ -0,0 +1,22 @@
+import { defineComponent } from 'vue';
+import { Badge, Space } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+ Success
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorSuccess'],
+ key: 'success',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/badge/warning.tsx b/site/src/components/antdv-token-previewer/component-demos/badge/warning.tsx
new file mode 100644
index 000000000..8576beb4b
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/badge/warning.tsx
@@ -0,0 +1,22 @@
+import { defineComponent } from 'vue';
+import { Badge, Space } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+ Warning
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorWarning'],
+ key: 'warning',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/breadcrumb/breadcrumb.tsx b/site/src/components/antdv-token-previewer/component-demos/breadcrumb/breadcrumb.tsx
new file mode 100644
index 000000000..54444c5d8
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/breadcrumb/breadcrumb.tsx
@@ -0,0 +1,28 @@
+import { defineComponent } from 'vue';
+import { Breadcrumb } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+ Home
+
+ Application Center
+
+
+ Application List
+
+ An Application
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorText', 'colorPrimary', 'colorPrimaryActive', 'colorPrimaryHover'],
+ key: 'breadcrumb',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/breadcrumb/index.ts b/site/src/components/antdv-token-previewer/component-demos/breadcrumb/index.ts
new file mode 100644
index 000000000..d0832e372
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/breadcrumb/index.ts
@@ -0,0 +1,7 @@
+import Default from './breadcrumb';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/button/button-icon.tsx b/site/src/components/antdv-token-previewer/component-demos/button/button-icon.tsx
new file mode 100644
index 000000000..c47c04b1c
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/button/button-icon.tsx
@@ -0,0 +1,32 @@
+import { defineComponent } from 'vue';
+import { Button, Space, Tooltip } from 'ant-design-vue';
+import { SearchOutlined } from '@ant-design/icons-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+
+ } />
+
+
+ }>
+ Search
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorPrimary'],
+ key: 'button-icon',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/button/button.tsx b/site/src/components/antdv-token-previewer/component-demos/button/button.tsx
new file mode 100644
index 000000000..9eef310cb
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/button/button.tsx
@@ -0,0 +1,33 @@
+import { defineComponent } from 'vue';
+import { Button, Space } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+
+
+
+
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: [
+ 'colorText',
+ 'colorPrimary',
+ 'colorPrimaryActive',
+ 'colorPrimaryHover',
+ 'controlOutline',
+ 'controlTmpOutline',
+ ],
+ key: 'button',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/button/dangerButton.tsx b/site/src/components/antdv-token-previewer/component-demos/button/dangerButton.tsx
new file mode 100644
index 000000000..6f1dc0e4b
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/button/dangerButton.tsx
@@ -0,0 +1,41 @@
+import { defineComponent } from 'vue';
+import { Button, Space } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+
+
+ {/**/}
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: [
+ 'colorError',
+ 'colorErrorActive',
+ 'colorErrorHover',
+ 'colorErrorBorder',
+ 'colorErrorOutline',
+ ],
+ key: 'danger',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/button/defaultButton.tsx b/site/src/components/antdv-token-previewer/component-demos/button/defaultButton.tsx
new file mode 100644
index 000000000..69d0b496e
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/button/defaultButton.tsx
@@ -0,0 +1,13 @@
+import { Button } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = () => ;
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorBgContainer'],
+ key: 'defaultButton',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/button/disabled.tsx b/site/src/components/antdv-token-previewer/component-demos/button/disabled.tsx
new file mode 100644
index 000000000..8cde5e9f8
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/button/disabled.tsx
@@ -0,0 +1,37 @@
+import { defineComponent } from 'vue';
+import { Button, Space } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+
+
+
+
+
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorTextDisabled', 'colorBgContainerDisabled'],
+ key: 'disabled',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/button/index.ts b/site/src/components/antdv-token-previewer/component-demos/button/index.ts
new file mode 100644
index 000000000..c1ff98c50
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/button/index.ts
@@ -0,0 +1,17 @@
+import Default from './button';
+import DefaultButton from './defaultButton';
+import ButtonIconDemo from './button-icon';
+import DangerButton from './dangerButton';
+import disabled from './disabled';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [
+ Default,
+ ButtonIconDemo,
+ DangerButton,
+ DefaultButton,
+ disabled,
+];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/calendar/calendar.tsx b/site/src/components/antdv-token-previewer/component-demos/calendar/calendar.tsx
new file mode 100644
index 000000000..6151a0ee9
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/calendar/calendar.tsx
@@ -0,0 +1,12 @@
+import { Calendar } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = () => ;
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorPrimary', 'colorPrimaryHover', 'colorBgContainer'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/calendar/disabled.tsx b/site/src/components/antdv-token-previewer/component-demos/calendar/disabled.tsx
new file mode 100644
index 000000000..6731cf8b6
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/calendar/disabled.tsx
@@ -0,0 +1,12 @@
+import { Calendar } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = () => true} />;
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorBgContainerDisabled', 'colorTextDisabled'],
+ key: 'disabled',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/calendar/index.ts b/site/src/components/antdv-token-previewer/component-demos/calendar/index.ts
new file mode 100644
index 000000000..29f387a7f
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/calendar/index.ts
@@ -0,0 +1,8 @@
+import Default from './calendar';
+import disabled from './disabled';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default, disabled];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/card/card.tsx b/site/src/components/antdv-token-previewer/component-demos/card/card.tsx
new file mode 100644
index 000000000..acb6908eb
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/card/card.tsx
@@ -0,0 +1,52 @@
+import { defineComponent } from 'vue';
+import { Card, Space } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+ More,
+ }}
+ >
+ Card content
+ Card content
+ Card content
+
+ More,
+ }}
+ >
+ Card content
+ Card content
+ Card content
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: [
+ 'colorText',
+ 'colorTextHeading',
+ 'colorTextSecondary',
+ 'colorBgContainer',
+ 'colorBorderSecondary',
+ 'colorPrimary',
+ 'colorBgContainer',
+ ],
+ key: 'card',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/card/cardGrid.tsx b/site/src/components/antdv-token-previewer/component-demos/card/cardGrid.tsx
new file mode 100644
index 000000000..34ba562c8
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/card/cardGrid.tsx
@@ -0,0 +1,36 @@
+import { defineComponent } from 'vue';
+import type { CSSProperties } from 'vue';
+
+import { Card } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const gridStyle: CSSProperties = {
+ width: '25%',
+ textAlign: 'center',
+};
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+ Content
+
+ Content
+
+ Content
+ Content
+ Content
+ Content
+ Content
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorBorderSecondary'],
+ key: 'cardGrid',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/card/index.ts b/site/src/components/antdv-token-previewer/component-demos/card/index.ts
new file mode 100644
index 000000000..774f5c1f5
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/card/index.ts
@@ -0,0 +1,9 @@
+import Default from './card';
+import inner from './inner';
+import cardGrid from './cardGrid';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default, inner, cardGrid];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/card/inner.tsx b/site/src/components/antdv-token-previewer/component-demos/card/inner.tsx
new file mode 100644
index 000000000..357f37cc0
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/card/inner.tsx
@@ -0,0 +1,23 @@
+import { defineComponent } from 'vue';
+import { Card, Space } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+ Inner Card content
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorFillAlter'],
+ key: 'inner',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/carousel/carousel.tsx b/site/src/components/antdv-token-previewer/component-demos/carousel/carousel.tsx
new file mode 100644
index 000000000..b0b678614
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/carousel/carousel.tsx
@@ -0,0 +1,42 @@
+import { defineComponent } from 'vue';
+import type { CSSProperties } from 'vue';
+
+import { Carousel } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const contentStyle = {
+ height: '160px',
+ color: '#fff',
+ lineHeight: '160px',
+ textAlign: 'center',
+ background: '#364d79',
+};
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+
1
+
+
+
2
+
+
+
3
+
+
+
4
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorText', 'colorBgContainer'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/carousel/index.ts b/site/src/components/antdv-token-previewer/component-demos/carousel/index.ts
new file mode 100644
index 000000000..98fbb6d52
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/carousel/index.ts
@@ -0,0 +1,7 @@
+import Default from './carousel';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/cascader/cascader.tsx b/site/src/components/antdv-token-previewer/component-demos/cascader/cascader.tsx
new file mode 100644
index 000000000..db90ad482
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/cascader/cascader.tsx
@@ -0,0 +1,14 @@
+import { Cascader } from 'ant-design-vue';
+
+import options from './data';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = (props: any) => ;
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorBgContainer', 'colorPrimary'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/cascader/data.ts b/site/src/components/antdv-token-previewer/component-demos/cascader/data.ts
new file mode 100644
index 000000000..8ed4640e5
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/cascader/data.ts
@@ -0,0 +1,26 @@
+const options = [
+ {
+ value: 'zhejiang',
+ label: 'Zhejiang',
+ children: [
+ {
+ value: 'hangzhou',
+ label: 'Hangzhou',
+ children: [{ value: 'xihu', label: 'West Lake' }],
+ },
+ ],
+ },
+ {
+ value: 'jiangsu',
+ label: 'Jiangsu',
+ children: [
+ {
+ value: 'nanjing',
+ label: 'Nanjing',
+ children: [{ value: 'zhonghuamen', label: 'Zhong Hua Men' }],
+ },
+ ],
+ },
+];
+
+export default options;
diff --git a/site/src/components/antdv-token-previewer/component-demos/cascader/disable.tsx b/site/src/components/antdv-token-previewer/component-demos/cascader/disable.tsx
new file mode 100644
index 000000000..02a5181a5
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/cascader/disable.tsx
@@ -0,0 +1,19 @@
+import { defineComponent } from 'vue';
+import { Cascader } from 'ant-design-vue';
+
+import options from './data';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => ;
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorBgContainerDisabled'],
+ key: 'disabled',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/cascader/highlight.tsx b/site/src/components/antdv-token-previewer/component-demos/cascader/highlight.tsx
new file mode 100644
index 000000000..a307cbeb5
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/cascader/highlight.tsx
@@ -0,0 +1,18 @@
+import { Cascader } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+import options from './data';
+
+const Demo = () => {
+ return (
+
+ );
+};
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorHighlight'],
+ key: 'highlight',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/cascader/index.ts b/site/src/components/antdv-token-previewer/component-demos/cascader/index.ts
new file mode 100644
index 000000000..4d1f0ddc9
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/cascader/index.ts
@@ -0,0 +1,9 @@
+import Default from './cascader';
+import HighLight from './highlight';
+import disable from './disable';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default, HighLight, disable];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/checkbox/checkbox.tsx b/site/src/components/antdv-token-previewer/component-demos/checkbox/checkbox.tsx
new file mode 100644
index 000000000..9ff3b0107
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/checkbox/checkbox.tsx
@@ -0,0 +1,19 @@
+import { Checkbox, Space } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = (props: any) => (
+
+ Checkbox
+
+ 选中态
+
+
+);
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorPrimary', 'colorText', 'colorBgContainer'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/checkbox/disabled.tsx b/site/src/components/antdv-token-previewer/component-demos/checkbox/disabled.tsx
new file mode 100644
index 000000000..05b463009
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/checkbox/disabled.tsx
@@ -0,0 +1,12 @@
+import { Checkbox } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = () => Checkbox;
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorTextDisabled', 'colorBgContainerDisabled'],
+ key: 'disabled',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/checkbox/index.ts b/site/src/components/antdv-token-previewer/component-demos/checkbox/index.ts
new file mode 100644
index 000000000..55573f854
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/checkbox/index.ts
@@ -0,0 +1,8 @@
+import Default from './checkbox';
+import disabled from './disabled';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default, disabled];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/collapse/collapse.tsx b/site/src/components/antdv-token-previewer/component-demos/collapse/collapse.tsx
new file mode 100644
index 000000000..941b2b6da
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/collapse/collapse.tsx
@@ -0,0 +1,32 @@
+import { defineComponent } from 'vue';
+import { Collapse } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const { Panel } = Collapse;
+const text = ` A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.`;
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+ {text}
+
+
+ {text}
+
+
+ {text}
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorTextSecondary', 'colorText', 'colorFillAlter', 'colorBgContainer'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/collapse/index.ts b/site/src/components/antdv-token-previewer/component-demos/collapse/index.ts
new file mode 100644
index 000000000..9fac5c9c9
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/collapse/index.ts
@@ -0,0 +1,7 @@
+import Default from './collapse';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/datePicker/danger.tsx b/site/src/components/antdv-token-previewer/component-demos/datePicker/danger.tsx
new file mode 100644
index 000000000..c4cfee021
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/datePicker/danger.tsx
@@ -0,0 +1,12 @@
+import { DatePicker } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = () => ;
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorError', 'colorErrorBorder', 'colorErrorHover', 'colorErrorOutline'],
+ key: 'danger',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/datePicker/date-picker.tsx b/site/src/components/antdv-token-previewer/component-demos/datePicker/date-picker.tsx
new file mode 100644
index 000000000..e30ed444e
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/datePicker/date-picker.tsx
@@ -0,0 +1,31 @@
+import { defineComponent } from 'vue';
+import { DatePicker, Space } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+
+
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: [
+ 'colorPrimary',
+ 'colorPrimaryBorder',
+ 'colorPrimaryHover',
+ 'controlOutline',
+ 'colorBgElevated',
+ 'colorBgContainer',
+ ],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/datePicker/disabled.tsx b/site/src/components/antdv-token-previewer/component-demos/datePicker/disabled.tsx
new file mode 100644
index 000000000..8d8b380b7
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/datePicker/disabled.tsx
@@ -0,0 +1,25 @@
+import { defineComponent } from 'vue';
+import { DatePicker, Space } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+
+
+
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorBgContainerDisabled', 'colorTextDisabled'],
+ key: 'disabled',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/datePicker/icon.tsx b/site/src/components/antdv-token-previewer/component-demos/datePicker/icon.tsx
new file mode 100644
index 000000000..2953335c5
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/datePicker/icon.tsx
@@ -0,0 +1,12 @@
+import { DatePicker } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = () => ;
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorIcon', 'colorIconHover'],
+ key: 'icon',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/datePicker/index.ts b/site/src/components/antdv-token-previewer/component-demos/datePicker/index.ts
new file mode 100644
index 000000000..ced0a2d62
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/datePicker/index.ts
@@ -0,0 +1,11 @@
+import Default from './date-picker';
+import danger from './danger';
+import warning from './warning';
+import icon from './icon';
+import disabled from './disabled';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default, danger, warning, icon, disabled];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/datePicker/warning.tsx b/site/src/components/antdv-token-previewer/component-demos/datePicker/warning.tsx
new file mode 100644
index 000000000..b002b8595
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/datePicker/warning.tsx
@@ -0,0 +1,12 @@
+import { DatePicker } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = () => ;
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorWarning', 'colorWarningBorder', 'colorWarningHover', 'colorWarningOutline'],
+ key: 'warning',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/descriptions/descriptions.tsx b/site/src/components/antdv-token-previewer/component-demos/descriptions/descriptions.tsx
new file mode 100644
index 000000000..82375c7c5
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/descriptions/descriptions.tsx
@@ -0,0 +1,24 @@
+import { defineComponent } from 'vue';
+import { Descriptions } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+ Cloud Database
+ Prepaid
+ YES
+ 2018-04-24 18:00:00
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorSplit', 'colorText', 'colorFillAlter'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/descriptions/index.ts b/site/src/components/antdv-token-previewer/component-demos/descriptions/index.ts
new file mode 100644
index 000000000..159669a09
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/descriptions/index.ts
@@ -0,0 +1,7 @@
+import Default from './descriptions';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/divider/divider.tsx b/site/src/components/antdv-token-previewer/component-demos/divider/divider.tsx
new file mode 100644
index 000000000..a24bd68bb
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/divider/divider.tsx
@@ -0,0 +1,44 @@
+import { defineComponent } from 'vue';
+import { Divider } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+ <>
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi
+ ista probare, quae sunt a te dicta? Refert tamen, quo modo.
+
+ Text
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi
+ ista probare, quae sunt a te dicta? Refert tamen, quo modo.
+
+
+ Left Text
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi
+ ista probare, quae sunt a te dicta? Refert tamen, quo modo.
+
+
+ Right Text
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi
+ ista probare, quae sunt a te dicta? Refert tamen, quo modo.
+
+ >
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorSplit', 'colorText'],
+ key: 'divider',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/divider/index.ts b/site/src/components/antdv-token-previewer/component-demos/divider/index.ts
new file mode 100644
index 000000000..78f04999e
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/divider/index.ts
@@ -0,0 +1,7 @@
+import Default from './divider';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/drawer/drawer.tsx b/site/src/components/antdv-token-previewer/component-demos/drawer/drawer.tsx
new file mode 100644
index 000000000..9fc9123ff
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/drawer/drawer.tsx
@@ -0,0 +1,39 @@
+import { Button, Drawer } from 'ant-design-vue';
+import { defineComponent, ref } from 'vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ () => {
+ const visible = ref(false);
+
+ const showDrawer = () => {
+ visible.value = true;
+ };
+
+ const onClose = () => {
+ visible.value = false;
+ };
+
+ return (
+ <>
+
+
+ Some contents...
+ Some contents...
+ Some contents...
+
+ >
+ );
+ };
+ },
+});
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorBgMask', 'colorBgElevated'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/drawer/index.ts b/site/src/components/antdv-token-previewer/component-demos/drawer/index.ts
new file mode 100644
index 000000000..1bd2be5b6
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/drawer/index.ts
@@ -0,0 +1,7 @@
+import Default from './drawer';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/dropdown/dropdown.tsx b/site/src/components/antdv-token-previewer/component-demos/dropdown/dropdown.tsx
new file mode 100644
index 000000000..19b0ecfca
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/dropdown/dropdown.tsx
@@ -0,0 +1,33 @@
+import { defineComponent } from 'vue';
+import { Dropdown } from 'ant-design-vue';
+import { DownOutlined } from '@ant-design/icons-vue';
+
+import menu from './menu';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorPrimary', 'colorError', 'colorErrorHover', 'colorBgElevated'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/dropdown/dropdownError.tsx b/site/src/components/antdv-token-previewer/component-demos/dropdown/dropdownError.tsx
new file mode 100644
index 000000000..f65567eca
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/dropdown/dropdownError.tsx
@@ -0,0 +1,48 @@
+import { defineComponent } from 'vue';
+import { DownOutlined } from '@ant-design/icons-vue';
+import { Dropdown, Typography } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+ {' '}
+
+ Hover me
+
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorError', 'colorErrorHover', 'colorBgElevated'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/dropdown/index.ts b/site/src/components/antdv-token-previewer/component-demos/dropdown/index.ts
new file mode 100644
index 000000000..e675109d0
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/dropdown/index.ts
@@ -0,0 +1,7 @@
+import Default from './dropdown';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/dropdown/menu.tsx b/site/src/components/antdv-token-previewer/component-demos/dropdown/menu.tsx
new file mode 100644
index 000000000..3fe2f31ca
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/dropdown/menu.tsx
@@ -0,0 +1,25 @@
+import { Menu } from 'ant-design-vue';
+import { DownOutlined } from '@ant-design/icons-vue';
+
+const menu = (
+
+);
+
+export default menu;
diff --git a/site/src/components/antdv-token-previewer/component-demos/empty/empty.tsx b/site/src/components/antdv-token-previewer/component-demos/empty/empty.tsx
new file mode 100644
index 000000000..e05c7450c
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/empty/empty.tsx
@@ -0,0 +1,12 @@
+import { Empty } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = () => ;
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorTextDisabled'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/empty/index.ts b/site/src/components/antdv-token-previewer/component-demos/empty/index.ts
new file mode 100644
index 000000000..eb21052ea
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/empty/index.ts
@@ -0,0 +1,7 @@
+import Default from './empty';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/form/danger.tsx b/site/src/components/antdv-token-previewer/component-demos/form/danger.tsx
new file mode 100644
index 000000000..8e2bc9213
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/form/danger.tsx
@@ -0,0 +1,43 @@
+import { defineComponent, ref, reactive } from 'vue';
+import { Form, FormItem, Input } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => {
+ const onFinish = () => {};
+ const onFinishFailed = () => {};
+ const formRef = ref();
+ const formData = reactive({
+ username: '',
+ });
+
+ return (
+
+ );
+ };
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorError', 'colorErrorBorder', 'colorErrorHover'],
+ key: 'danger',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/form/form.tsx b/site/src/components/antdv-token-previewer/component-demos/form/form.tsx
new file mode 100644
index 000000000..819148fe2
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/form/form.tsx
@@ -0,0 +1,76 @@
+import { defineComponent, ref, toRaw, reactive } from 'vue';
+import { Form, FormItem, Input, Button, Checkbox } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => {
+ const onFinish = () => {};
+ const onFinishFailed = () => {};
+ const formRef = ref();
+ const formData = reactive({
+ username: '',
+ password: '',
+ });
+
+ const onSubmit = () => {
+ formRef.value
+ .validate()
+ .then(() => {
+ console.log('values', formData, toRaw(formData));
+ })
+ .catch(error => {
+ console.log('error', error);
+ });
+ };
+ const resetForm = () => {
+ formRef.value.resetFields();
+ };
+
+ return (
+
+ );
+ };
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorError', 'controlOutline', 'colorErrorBorder', 'colorErrorHover'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/form/index.tsx b/site/src/components/antdv-token-previewer/component-demos/form/index.tsx
new file mode 100644
index 000000000..5ed998932
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/form/index.tsx
@@ -0,0 +1,10 @@
+import Default from './form';
+
+import warning from './warning';
+import danger from './danger';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default, warning, danger];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/form/warning.tsx b/site/src/components/antdv-token-previewer/component-demos/form/warning.tsx
new file mode 100644
index 000000000..59f786dc7
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/form/warning.tsx
@@ -0,0 +1,43 @@
+import { defineComponent, ref, reactive } from 'vue';
+import { Form, FormItem, Input } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => {
+ const onFinish = () => {};
+ const onFinishFailed = () => {};
+ const formRef = ref();
+ const formData = reactive({
+ username: '',
+ });
+
+ return (
+
+ );
+ };
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorWarning', 'controlOutline', 'colorWarningBorder', 'colorWarningHover'],
+ key: 'warning',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/grid/grid.tsx b/site/src/components/antdv-token-previewer/component-demos/grid/grid.tsx
new file mode 100644
index 000000000..a527b0b88
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/grid/grid.tsx
@@ -0,0 +1,56 @@
+import { Row, Col } from 'ant-design-vue';
+import makeStyle from '../../utils/makeStyle';
+import type { ComponentDemo } from '../../interface';
+import { defineComponent } from 'vue';
+
+const useStyle = makeStyle('GridDemo', token => ({
+ '.previewer-grid-demo': {
+ [`${token.rootCls}-row`]: {
+ marginBottom: 16,
+ },
+ [`${token.rootCls}-row > div:not(.gutter-row)`]: {
+ padding: '16px 0',
+ background: '#0092ff',
+ color: '#fff',
+ display: 'inline-flex',
+ alignItems: 'center',
+ justifyContent: 'center',
+
+ '&:nth-child(2n + 1)': {
+ background: 'rgba(0,146,255,.75)',
+ },
+ },
+ },
+}));
+
+const Demo = defineComponent({
+ setup() {
+ const [, hashId] = useStyle();
+
+ return () => (
+
+
+ col
+
+
+ col-12 col-12
+
+
+ col-8 col-8
+ col-8
+
+
+ col-6 col-6
+ col-6
+ col-6
+
+
+ );
+ },
+});
+const componentDemo: ComponentDemo = {
+ demo: ,
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/grid/index.ts b/site/src/components/antdv-token-previewer/component-demos/grid/index.ts
new file mode 100644
index 000000000..c1fa7d4dc
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/grid/index.ts
@@ -0,0 +1,7 @@
+import Default from './grid';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/icon/icon.tsx b/site/src/components/antdv-token-previewer/component-demos/icon/icon.tsx
new file mode 100644
index 000000000..1f52a7cef
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/icon/icon.tsx
@@ -0,0 +1,28 @@
+import { defineComponent } from 'vue';
+import { Space } from 'ant-design-vue';
+import {
+ HomeOutlined,
+ SettingFilled,
+ SmileOutlined,
+ SyncOutlined,
+ LoadingOutlined,
+} from '@ant-design/icons-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/icon/index.ts b/site/src/components/antdv-token-previewer/component-demos/icon/index.ts
new file mode 100644
index 000000000..1cdf4d935
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/icon/index.ts
@@ -0,0 +1,7 @@
+import Default from './icon';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/image/disabled.tsx b/site/src/components/antdv-token-previewer/component-demos/image/disabled.tsx
new file mode 100644
index 000000000..2ebfab64f
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/image/disabled.tsx
@@ -0,0 +1,15 @@
+import { Image } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = () => {
+ return ;
+};
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorBgContainerDisabled'],
+ key: 'disabled',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/image/image.tsx b/site/src/components/antdv-token-previewer/component-demos/image/image.tsx
new file mode 100644
index 000000000..13c636bc3
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/image/image.tsx
@@ -0,0 +1,20 @@
+import { Image } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = () => {
+ return (
+
+ );
+};
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorBgMask'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/image/index.ts b/site/src/components/antdv-token-previewer/component-demos/image/index.ts
new file mode 100644
index 000000000..450e6dfef
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/image/index.ts
@@ -0,0 +1,8 @@
+import Default from './image';
+import disabled from './disabled';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default, disabled];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/index.ts b/site/src/components/antdv-token-previewer/component-demos/index.ts
new file mode 100644
index 000000000..29c5fac85
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/index.ts
@@ -0,0 +1,125 @@
+import Alert from './alert';
+import Anchor from './anchor';
+import AutoComplete from './autoComplete';
+import Avatar from './avatar';
+import Badge from './badge';
+import Breadcrumb from './breadcrumb';
+import Button from './button';
+import Calendar from './calendar';
+import Card from './card';
+import Carousel from './carousel';
+import Cascader from './cascader';
+import Checkbox from './checkbox';
+import Collapse from './collapse';
+import DatePicker from './datePicker';
+import Descriptions from './descriptions';
+import Dropdown from './dropdown';
+import Empty from './empty';
+import Form from './form';
+import Grid from './grid';
+import Icon from './icon';
+import Image from './image';
+import InputNumber from './inputNumber';
+import Input from './input';
+import List from './list';
+import Mentions from './mentions';
+import Modal from './modal';
+import Notification from './notification';
+import Pagination from './pagination';
+import Popconfirm from './popconfirm';
+import Popover from './popover';
+import Radio from './radio';
+import Rate from './rate';
+import Select from './select';
+import Skeleton from './skeleton';
+import Slider from './slider';
+import Spin from './spin';
+import Statistic from './statistic';
+import Switch from './switch';
+import Table from './table';
+import Tabs from './tabs';
+import Tag from './tag';
+import TimePicker from './timePicker';
+import Timeline from './timeline';
+import Tooltip from './tooltip';
+import Transfer from './transfer';
+import TreeSelect from './treeSelect';
+import Tree from './tree';
+import Typography from './typography';
+import Upload from './upload';
+import Divider from './divider';
+import Space from './space';
+import Menu from './menu';
+import Steps from './steps';
+import Segmented from './segmented';
+import Drawer from './drawer';
+import Message from './message';
+import Progress from './progress';
+import Result from './result';
+
+import type { ComponentDemo } from '../interface';
+
+export type PreviewerDemos = Record;
+
+const ComponentDemos: PreviewerDemos = {
+ Alert,
+ Anchor,
+ AutoComplete,
+ Avatar,
+ Badge,
+ Breadcrumb,
+ Button,
+ Calendar,
+ Card,
+ Carousel,
+ Cascader,
+ Checkbox,
+ Collapse,
+ DatePicker,
+ Descriptions,
+ Dropdown,
+ Empty,
+ Form,
+ Grid,
+ Icon,
+ Image,
+ InputNumber,
+ Input,
+ List,
+ Mentions,
+ Modal,
+ Notification,
+ Pagination,
+ Popconfirm,
+ Popover,
+ Radio,
+ Rate,
+ Select,
+ Skeleton,
+ Slider,
+ Spin,
+ Statistic,
+ Switch,
+ Table,
+ Tabs,
+ Tag,
+ TimePicker,
+ Timeline,
+ Tooltip,
+ Transfer,
+ TreeSelect,
+ Tree,
+ Typography,
+ Upload,
+ Divider,
+ Space,
+ Menu,
+ Steps,
+ Segmented,
+ Drawer,
+ Message,
+ Result,
+ Progress,
+};
+
+export default ComponentDemos;
diff --git a/site/src/components/antdv-token-previewer/component-demos/input/clearIcon.tsx b/site/src/components/antdv-token-previewer/component-demos/input/clearIcon.tsx
new file mode 100644
index 000000000..87e333f66
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/input/clearIcon.tsx
@@ -0,0 +1,17 @@
+import { defineComponent } from 'vue';
+import { Input } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => ;
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorIcon', 'colorIconHover'],
+ key: 'clearIcon',
+};
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/input/danger.tsx b/site/src/components/antdv-token-previewer/component-demos/input/danger.tsx
new file mode 100644
index 000000000..f485a9a28
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/input/danger.tsx
@@ -0,0 +1,19 @@
+import { defineComponent } from 'vue';
+import { Input } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+function onChange() {}
+
+const Demo = defineComponent({
+ setup() {
+ return () => ;
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorError', 'colorErrorOutline', 'colorErrorBorder', 'colorErrorHover'],
+ key: 'danger',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/input/disabled.tsx b/site/src/components/antdv-token-previewer/component-demos/input/disabled.tsx
new file mode 100644
index 000000000..829ae2ccb
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/input/disabled.tsx
@@ -0,0 +1,12 @@
+import { Input } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = () => ;
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorBgContainerDisabled'],
+ key: 'disabled',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/input/index.ts b/site/src/components/antdv-token-previewer/component-demos/input/index.ts
new file mode 100644
index 000000000..128e40ac0
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/input/index.ts
@@ -0,0 +1,12 @@
+import Default from './input';
+import clearIcon from './clearIcon';
+import danger from './danger';
+import warning from './warning';
+import withAddon from './withAddon';
+import disabled from './disabled';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default, clearIcon, danger, warning, withAddon, disabled];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/input/input.tsx b/site/src/components/antdv-token-previewer/component-demos/input/input.tsx
new file mode 100644
index 000000000..ff6ac923b
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/input/input.tsx
@@ -0,0 +1,12 @@
+import { Input } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = () => ;
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorPrimary', 'colorPrimaryHover', 'controlOutline', 'colorBgContainer'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/input/success.tsx b/site/src/components/antdv-token-previewer/component-demos/input/success.tsx
new file mode 100644
index 000000000..32df97ef2
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/input/success.tsx
@@ -0,0 +1,30 @@
+import { defineComponent } from 'vue';
+import { Input, theme } from 'ant-design-vue';
+import { CheckCircleFilled } from '@ant-design/icons-vue';
+import type { ComponentDemo } from '../../interface';
+
+function onChange() {}
+
+const Demo = defineComponent({
+ setup() {
+ const { token } = theme.useToken();
+
+ return () => {
+ return (
+ }
+ onChange={onChange}
+ />
+ );
+ };
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorSuccess'],
+ key: 'warning',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/input/warning.tsx b/site/src/components/antdv-token-previewer/component-demos/input/warning.tsx
new file mode 100644
index 000000000..2e0b476d3
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/input/warning.tsx
@@ -0,0 +1,19 @@
+import { defineComponent } from 'vue';
+import { Input } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+function onChange() {}
+
+const Demo = defineComponent({
+ setup() {
+ return () => ;
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorWarning', 'colorWarningBorder', 'colorWarningHover', 'colorWarningOutline'],
+ key: 'warning',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/input/withAddon.tsx b/site/src/components/antdv-token-previewer/component-demos/input/withAddon.tsx
new file mode 100644
index 000000000..6e6fc553a
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/input/withAddon.tsx
@@ -0,0 +1,17 @@
+import { defineComponent } from 'vue';
+import { Input } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => ;
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorFillAlter'],
+ key: 'withAddon',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/inputNumber/danger.tsx b/site/src/components/antdv-token-previewer/component-demos/inputNumber/danger.tsx
new file mode 100644
index 000000000..15fa021b6
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/inputNumber/danger.tsx
@@ -0,0 +1,21 @@
+import { defineComponent } from 'vue';
+import { InputNumber } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+function onChange() {}
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorErrorBorder', 'colorErrorOutline', 'colorErrorHover', 'colorError'],
+ key: 'danger',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/inputNumber/disabled.tsx b/site/src/components/antdv-token-previewer/component-demos/inputNumber/disabled.tsx
new file mode 100644
index 000000000..4fa502cfc
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/inputNumber/disabled.tsx
@@ -0,0 +1,12 @@
+import { InputNumber } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = () => ;
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorBgContainerDisabled'],
+ key: 'disabled',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/inputNumber/index.ts b/site/src/components/antdv-token-previewer/component-demos/inputNumber/index.ts
new file mode 100644
index 000000000..d15fcf4a6
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/inputNumber/index.ts
@@ -0,0 +1,10 @@
+import Default from './inputNumber';
+import danger from './danger';
+import warning from './warning';
+import disabled from './disabled';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default, danger, warning, disabled];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/inputNumber/inputNumber.tsx b/site/src/components/antdv-token-previewer/component-demos/inputNumber/inputNumber.tsx
new file mode 100644
index 000000000..0553a6056
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/inputNumber/inputNumber.tsx
@@ -0,0 +1,24 @@
+import { defineComponent } from 'vue';
+import { InputNumber } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+function onChange() {}
+const Demo = defineComponent({
+ setup() {
+ return () => ;
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: [
+ 'colorPrimaryBorder',
+ 'controlOutline',
+ 'colorPrimaryHover',
+ 'colorPrimary',
+ 'colorBgContainer',
+ ],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/inputNumber/warning.tsx b/site/src/components/antdv-token-previewer/component-demos/inputNumber/warning.tsx
new file mode 100644
index 000000000..8bb552ba5
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/inputNumber/warning.tsx
@@ -0,0 +1,21 @@
+import { defineComponent } from 'vue';
+import { InputNumber } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+function onChange() {}
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorWarning', 'colorWarningBorder', 'colorWarningOutline', 'colorWarningHover'],
+ key: 'warning',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/list/index.ts b/site/src/components/antdv-token-previewer/component-demos/list/index.ts
new file mode 100644
index 000000000..091778a66
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/list/index.ts
@@ -0,0 +1,7 @@
+import Default from './list';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/list/list.tsx b/site/src/components/antdv-token-previewer/component-demos/list/list.tsx
new file mode 100644
index 000000000..7fcf6c7e5
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/list/list.tsx
@@ -0,0 +1,41 @@
+import { defineComponent } from 'vue';
+import { List, ListItem, ListItemMeta, Avatar } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const data = [
+ { title: 'Ant Design Vue Title 1' },
+ { title: 'Ant Design Vue Title 2' },
+ { title: 'Ant Design Vue Title 3' },
+ { title: 'Ant Design Vue Title 4' },
+];
+const Demo = defineComponent({
+ setup() {
+ return () => (
+ (
+
+ ,
+ title: () => {item.title},
+ }}
+ description="Ant Design, a design language for background applications, is refined by Ant UED Team"
+ />
+
+ ),
+ }}
+ />
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: [],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/mentions/danger.tsx b/site/src/components/antdv-token-previewer/component-demos/mentions/danger.tsx
new file mode 100644
index 000000000..eab90ae83
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/mentions/danger.tsx
@@ -0,0 +1,43 @@
+import { defineComponent } from 'vue';
+import { Mentions } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+function onChange() {}
+function onSelect() {}
+
+const Demo = defineComponent({
+ setup() {
+ const options = [
+ {
+ value: 'afc163',
+ label: 'afc163',
+ },
+ {
+ value: 'zombieJ',
+ label: 'zombieJ',
+ },
+ {
+ value: 'yesmeck',
+ label: 'yesmeck',
+ },
+ ];
+ return () => (
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorError', 'colorErrorOutline', 'colorErrorBorder', 'colorErrorHover'],
+ key: 'danger',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/mentions/disabled.tsx b/site/src/components/antdv-token-previewer/component-demos/mentions/disabled.tsx
new file mode 100644
index 000000000..1f6309f01
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/mentions/disabled.tsx
@@ -0,0 +1,39 @@
+import { defineComponent } from 'vue';
+import { Mentions } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ const options = [
+ {
+ value: 'afc163',
+ label: 'afc163',
+ },
+ {
+ value: 'zombieJ',
+ label: 'zombieJ',
+ },
+ {
+ value: 'yesmeck',
+ label: 'yesmeck',
+ },
+ ];
+ return () => (
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorBgContainerDisabled', 'colorTextDisabled'],
+ key: 'disabled',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/mentions/index.ts b/site/src/components/antdv-token-previewer/component-demos/mentions/index.ts
new file mode 100644
index 000000000..1448cfdf5
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/mentions/index.ts
@@ -0,0 +1,10 @@
+import Default from './mentions';
+import danger from './danger';
+import warning from './warning';
+import disabled from './disabled';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default, danger, warning, disabled];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/mentions/mentions.tsx b/site/src/components/antdv-token-previewer/component-demos/mentions/mentions.tsx
new file mode 100644
index 000000000..d5543b5fc
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/mentions/mentions.tsx
@@ -0,0 +1,47 @@
+import { defineComponent } from 'vue';
+import { Mentions } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+function onChange() {}
+function onSelect() {}
+const Demo = defineComponent({
+ setup() {
+ const options = [
+ {
+ value: 'afc163',
+ label: 'afc163',
+ },
+ {
+ value: 'zombieJ',
+ label: 'zombieJ',
+ },
+ {
+ value: 'yesmeck',
+ label: 'yesmeck',
+ },
+ ];
+ return () => (
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: [
+ 'colorBgContainer',
+ 'colorBorder',
+ 'colorPrimary',
+ 'colorPrimaryHover',
+ 'controlOutline',
+ ],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/mentions/warning.tsx b/site/src/components/antdv-token-previewer/component-demos/mentions/warning.tsx
new file mode 100644
index 000000000..3cac1e05b
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/mentions/warning.tsx
@@ -0,0 +1,43 @@
+import { defineComponent } from 'vue';
+import { Mentions } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+function onChange() {}
+function onSelect() {}
+
+const Demo = defineComponent({
+ setup() {
+ const options = [
+ {
+ value: 'afc163',
+ label: 'afc163',
+ },
+ {
+ value: 'zombieJ',
+ label: 'zombieJ',
+ },
+ {
+ value: 'yesmeck',
+ label: 'yesmeck',
+ },
+ ];
+ return () => (
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorWarning', 'colorWarningBorder', 'colorWarningHover', 'colorWarningOutline'],
+ key: 'warning',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/menu/data.tsx b/site/src/components/antdv-token-previewer/component-demos/menu/data.tsx
new file mode 100644
index 000000000..043a34161
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/menu/data.tsx
@@ -0,0 +1,42 @@
+import type { MenuProps } from 'ant-design-vue';
+
+import { AppstoreOutlined, MailOutlined, SettingOutlined } from '@ant-design/icons-vue';
+
+type MenuItem = Required['items'][number];
+
+const getItem = (
+ label: any,
+ key: string,
+ icon?: any,
+ children?: MenuItem[],
+ type?: 'group',
+): MenuItem =>
+ ({
+ key,
+ icon,
+ children,
+ label,
+ type,
+ } as MenuItem);
+
+const items: MenuProps['items'] = [
+ getItem('Navigation One', 'sub1', , [
+ getItem('Item 1', 'g1', null, [getItem('Option 1', '1'), getItem('Option 2', '2')], 'group'),
+ getItem('Item 2', 'g2', null, [getItem('Option 3', '3'), getItem('Option 4', '4')], 'group'),
+ ]),
+
+ getItem('Navigation Two', 'sub2', , [
+ getItem('Option 5', '5'),
+ getItem('Option 6', '6'),
+ getItem('Submenu', 'sub3', null, [getItem('Option 7', '7'), getItem('Option 8', '8')]),
+ ]),
+
+ getItem('Navigation Three', 'sub4', , [
+ getItem('Option 9', '9'),
+ getItem('Option 10', '10'),
+ getItem('Option 11', '11'),
+ getItem('Option 12', '12'),
+ ]),
+];
+
+export default items;
diff --git a/site/src/components/antdv-token-previewer/component-demos/menu/index.ts b/site/src/components/antdv-token-previewer/component-demos/menu/index.ts
new file mode 100644
index 000000000..3c6531279
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/menu/index.ts
@@ -0,0 +1,9 @@
+import Default from './menu';
+import danger from './menuDanger';
+import MenuInLayout from './menuInLayout';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default, danger, MenuInLayout];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/menu/menu.tsx b/site/src/components/antdv-token-previewer/component-demos/menu/menu.tsx
new file mode 100644
index 000000000..ebff1aea6
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/menu/menu.tsx
@@ -0,0 +1,45 @@
+import { defineComponent, ref } from 'vue';
+import type { MenuProps } from 'ant-design-vue';
+import { Menu } from 'ant-design-vue';
+
+import items from './data';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => {
+ const onClick: MenuProps['onClick'] = e => {
+ console.log('click ', e);
+ };
+
+ const selectedKeys = ref(['1']);
+ const openKeys = ref(['sub1', 'sub2']);
+
+ return (
+
+
+ );
+ };
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorPrimary', 'colorBgContainer', 'colorFillAlter', 'colorSplit', 'colorPrimaryHover'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/menu/menuDanger.tsx b/site/src/components/antdv-token-previewer/component-demos/menu/menuDanger.tsx
new file mode 100644
index 000000000..bf5c08a31
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/menu/menuDanger.tsx
@@ -0,0 +1,39 @@
+import type { MenuProps } from 'ant-design-vue';
+import { Menu } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const items: MenuProps['items'] = [
+ {
+ key: '0',
+ danger: true,
+ label: '危险',
+ },
+ {
+ key: '1',
+ danger: true,
+ label: '危险选中',
+ },
+ {
+ key: '2',
+ danger: true,
+ disabled: true,
+ label: '危险禁用',
+ },
+];
+
+const Demo = () => {
+ const onClick: MenuProps['onClick'] = e => {
+ console.log('click ', e);
+ };
+
+ return ;
+};
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorError', 'colorErrorHover', 'colorErrorOutline'],
+ key: 'danger',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/menu/menuInLayout.tsx b/site/src/components/antdv-token-previewer/component-demos/menu/menuInLayout.tsx
new file mode 100644
index 000000000..c99822cd5
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/menu/menuInLayout.tsx
@@ -0,0 +1,34 @@
+import { defineComponent } from 'vue';
+import { Menu, theme } from 'ant-design-vue';
+
+import items from './data';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ const { token } = theme.useToken();
+
+ return () => {
+ return (
+
+
+
+ );
+ };
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorSplit'],
+ key: 'menuInLayout',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/message/error.tsx b/site/src/components/antdv-token-previewer/component-demos/message/error.tsx
new file mode 100644
index 000000000..a45406b61
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/message/error.tsx
@@ -0,0 +1,24 @@
+import { defineComponent } from 'vue';
+import { message } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const { _InternalPanelDoNotUseOrYouWillBeFired } = message;
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+ <_InternalPanelDoNotUseOrYouWillBeFired
+ type={'error'}
+ content={'这是一条异常消息,会主动消失'}
+ />
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorError'],
+ key: 'error',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/message/index.ts b/site/src/components/antdv-token-previewer/component-demos/message/index.ts
new file mode 100644
index 000000000..0abb13d68
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/message/index.ts
@@ -0,0 +1,11 @@
+import Default from './message';
+import error from './error';
+import info from './info';
+import success from './success';
+import warning from './warning';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default, error, info, success, warning];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/message/info.tsx b/site/src/components/antdv-token-previewer/component-demos/message/info.tsx
new file mode 100644
index 000000000..0e7513b6a
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/message/info.tsx
@@ -0,0 +1,19 @@
+import { defineComponent } from 'vue';
+import { message } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const { _InternalPanelDoNotUseOrYouWillBeFired } = message;
+
+const Demo = defineComponent({
+ setup() {
+ return () => <_InternalPanelDoNotUseOrYouWillBeFired type={'info'} content={'Info'} />;
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorInfo'],
+ key: 'info',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/message/message.tsx b/site/src/components/antdv-token-previewer/component-demos/message/message.tsx
new file mode 100644
index 000000000..efdcd2f11
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/message/message.tsx
@@ -0,0 +1,22 @@
+import { defineComponent } from 'vue';
+import { message } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const { _InternalPanelDoNotUseOrYouWillBeFired } = message;
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+ <_InternalPanelDoNotUseOrYouWillBeFired type={'info'} content={`Hello, Ant Design!`} />
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorText', 'colorBgElevated'],
+ key: 'message',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/message/success.tsx b/site/src/components/antdv-token-previewer/component-demos/message/success.tsx
new file mode 100644
index 000000000..10eff0951
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/message/success.tsx
@@ -0,0 +1,24 @@
+import { defineComponent } from 'vue';
+import { message } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const { _InternalPanelDoNotUseOrYouWillBeFired } = message;
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+ <_InternalPanelDoNotUseOrYouWillBeFired
+ type={'success'}
+ content={'这是一条成功消息,会主动消失'}
+ />
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorSuccess'],
+ key: 'success',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/message/warning.tsx b/site/src/components/antdv-token-previewer/component-demos/message/warning.tsx
new file mode 100644
index 000000000..9f65fc842
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/message/warning.tsx
@@ -0,0 +1,24 @@
+import { defineComponent } from 'vue';
+import { message } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const { _InternalPanelDoNotUseOrYouWillBeFired } = message;
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+ <_InternalPanelDoNotUseOrYouWillBeFired
+ type={'warning'}
+ content={'这是一条警告消息,会主动消失'}
+ />
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorWarning'],
+ key: 'warning',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/modal/index.ts b/site/src/components/antdv-token-previewer/component-demos/modal/index.ts
new file mode 100644
index 000000000..758367d36
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/modal/index.ts
@@ -0,0 +1,11 @@
+import Default from './modal';
+import info from './info';
+import withButton from './modalWithButton';
+import warning from './warning';
+import success from './success';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default, info, withButton, warning, success];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/modal/info.tsx b/site/src/components/antdv-token-previewer/component-demos/modal/info.tsx
new file mode 100644
index 000000000..5889fba09
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/modal/info.tsx
@@ -0,0 +1,32 @@
+import { Modal, Button } from 'ant-design-vue';
+import { defineComponent } from 'vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ const info = () => {
+ Modal.info({
+ title: 'This is a info message',
+ content: () => (
+
+
some messages...some messages...
+
some messages...some messages...
+
+ ),
+ onOk() {
+ console.log('i am ok');
+ },
+ });
+ };
+
+ return () => ;
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorInfo'],
+ key: 'info',
+};
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/modal/modal.tsx b/site/src/components/antdv-token-previewer/component-demos/modal/modal.tsx
new file mode 100644
index 000000000..7731e0bc8
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/modal/modal.tsx
@@ -0,0 +1,43 @@
+import { Button, Modal } from 'ant-design-vue';
+import { defineComponent, ref } from 'vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ const isModalVisible = ref(false);
+ const showModal = () => {
+ isModalVisible.value = true;
+ };
+ const handleOk = () => {
+ isModalVisible.value = false;
+ };
+ const handleCancel = () => {
+ isModalVisible.value = false;
+ };
+
+ return () => {
+ return (
+ <>
+
+
+ Some contents...
Some contents...
Some contents...
+
+ >
+ );
+ };
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorBgMask', 'colorBgElevated'],
+ key: 'default',
+};
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/modal/modalWithButton.tsx b/site/src/components/antdv-token-previewer/component-demos/modal/modalWithButton.tsx
new file mode 100644
index 000000000..a6fe536dc
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/modal/modalWithButton.tsx
@@ -0,0 +1,43 @@
+import { Button, Modal } from 'ant-design-vue';
+import { defineComponent, ref } from 'vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ const isModalVisible = ref(false);
+ const showModal = () => {
+ isModalVisible.value = true;
+ };
+ const handleOk = () => {
+ isModalVisible.value = false;
+ };
+ const handleCancel = () => {
+ isModalVisible.value = false;
+ };
+
+ return () => {
+ return (
+ <>
+
+
+ Some contents...
Some contents...
Some contents...
+
+ >
+ );
+ };
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorBgMask'],
+ key: 'modalWithButton',
+};
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/modal/success.tsx b/site/src/components/antdv-token-previewer/component-demos/modal/success.tsx
new file mode 100644
index 000000000..fee9edeb0
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/modal/success.tsx
@@ -0,0 +1,29 @@
+import { Modal, Button } from 'ant-design-vue';
+import { defineComponent } from 'vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ const success = () => {
+ Modal.success({
+ title: 'This is a success message',
+ content: () => (
+
+
some messages...some messages...
+
some messages...some messages...
+
+ ),
+ });
+ };
+
+ return () => ;
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorSuccess'],
+ key: 'success',
+};
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/modal/warning.tsx b/site/src/components/antdv-token-previewer/component-demos/modal/warning.tsx
new file mode 100644
index 000000000..38d1c6b82
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/modal/warning.tsx
@@ -0,0 +1,29 @@
+import { Modal, Button } from 'ant-design-vue';
+import { defineComponent } from 'vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ const warning = () => {
+ Modal.warning({
+ title: 'This is a warning message',
+ content: () => (
+
+
some messages...some messages...
+
some messages...some messages...
+
+ ),
+ });
+ };
+
+ return () => ;
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorWarning'],
+ key: 'warning',
+};
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/notification/error.tsx b/site/src/components/antdv-token-previewer/component-demos/notification/error.tsx
new file mode 100644
index 000000000..5a3c92aee
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/notification/error.tsx
@@ -0,0 +1,27 @@
+import { defineComponent } from 'vue';
+import { notification } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const { _InternalPanelDoNotUseOrYouWillBeFired } = notification;
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+ <_InternalPanelDoNotUseOrYouWillBeFired
+ message={'Notification Title'}
+ type={'error'}
+ description={
+ 'This is the content of the notification. This is the content of the notification. This is the content of the notification.'
+ }
+ />
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorError'],
+ key: 'error',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/notification/index.ts b/site/src/components/antdv-token-previewer/component-demos/notification/index.ts
new file mode 100644
index 000000000..7dbf50daa
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/notification/index.ts
@@ -0,0 +1,11 @@
+import Demo from './notification';
+import info from './info';
+import error from './error';
+import success from './success';
+import warning from './warning';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Demo, info, error, success, warning];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/notification/info.tsx b/site/src/components/antdv-token-previewer/component-demos/notification/info.tsx
new file mode 100644
index 000000000..b0dbdb6d8
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/notification/info.tsx
@@ -0,0 +1,27 @@
+import { defineComponent } from 'vue';
+import { notification } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const { _InternalPanelDoNotUseOrYouWillBeFired } = notification;
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+ <_InternalPanelDoNotUseOrYouWillBeFired
+ message={'Notification Title'}
+ type={'info'}
+ description={
+ 'This is the content of the notification. This is the content of the notification. This is the content of the notification.'
+ }
+ />
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorInfo'],
+ key: 'info',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/notification/notification.tsx b/site/src/components/antdv-token-previewer/component-demos/notification/notification.tsx
new file mode 100644
index 000000000..146dfac69
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/notification/notification.tsx
@@ -0,0 +1,26 @@
+import { defineComponent } from 'vue';
+import { notification } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const { _InternalPanelDoNotUseOrYouWillBeFired } = notification;
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+ <_InternalPanelDoNotUseOrYouWillBeFired
+ message={'Notification Title'}
+ description={
+ 'This is the content of the notification. This is the content of the notification. This is the content of the notification.'
+ }
+ />
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorIcon', 'colorIconHover', 'colorBgElevated'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/notification/success.tsx b/site/src/components/antdv-token-previewer/component-demos/notification/success.tsx
new file mode 100644
index 000000000..1a6982d4a
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/notification/success.tsx
@@ -0,0 +1,27 @@
+import { defineComponent } from 'vue';
+import { notification } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const { _InternalPanelDoNotUseOrYouWillBeFired } = notification;
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+ <_InternalPanelDoNotUseOrYouWillBeFired
+ message={'Notification Title'}
+ type={'success'}
+ description={
+ 'This is the content of the notification. This is the content of the notification. This is the content of the notification.'
+ }
+ />
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorSuccess'],
+ key: 'success',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/notification/warning.tsx b/site/src/components/antdv-token-previewer/component-demos/notification/warning.tsx
new file mode 100644
index 000000000..8a17e45b4
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/notification/warning.tsx
@@ -0,0 +1,27 @@
+import { defineComponent } from 'vue';
+import { notification } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const { _InternalPanelDoNotUseOrYouWillBeFired } = notification;
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+ <_InternalPanelDoNotUseOrYouWillBeFired
+ message={'Notification Title'}
+ type={'warning'}
+ description={
+ 'This is the content of the notification. This is the content of the notification. This is the content of the notification.'
+ }
+ />
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorWarning'],
+ key: 'warning',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/pagination/disabled.tsx b/site/src/components/antdv-token-previewer/component-demos/pagination/disabled.tsx
new file mode 100644
index 000000000..5c07135b4
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/pagination/disabled.tsx
@@ -0,0 +1,17 @@
+import { defineComponent } from 'vue';
+import { Pagination } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => ;
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['controlItemBgActiveDisabled', 'colorBgContainerDisabled', 'colorFillAlter'],
+ key: 'disabled',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/pagination/index.tsx b/site/src/components/antdv-token-previewer/component-demos/pagination/index.tsx
new file mode 100644
index 000000000..224c3cac5
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/pagination/index.tsx
@@ -0,0 +1,9 @@
+import Demo from './pagination';
+import disabled from './disabled';
+import outline from './outline';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Demo, disabled, outline];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/pagination/outline.tsx b/site/src/components/antdv-token-previewer/component-demos/pagination/outline.tsx
new file mode 100644
index 000000000..4088fffce
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/pagination/outline.tsx
@@ -0,0 +1,22 @@
+import { defineComponent } from 'vue';
+import { Pagination, Space } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorPrimary', 'controlOutline', 'colorPrimaryHover', 'colorBgContainer'],
+ key: 'outline',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/pagination/pagination.tsx b/site/src/components/antdv-token-previewer/component-demos/pagination/pagination.tsx
new file mode 100644
index 000000000..7822f4f2d
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/pagination/pagination.tsx
@@ -0,0 +1,23 @@
+import { defineComponent } from 'vue';
+import { Pagination, Space } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorPrimary', 'colorPrimaryHover', 'colorBgContainer'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/popconfirm/index.ts b/site/src/components/antdv-token-previewer/component-demos/popconfirm/index.ts
new file mode 100644
index 000000000..9fac30374
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/popconfirm/index.ts
@@ -0,0 +1,7 @@
+import Demo from './popconfirm';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Demo];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/popconfirm/popconfirm.tsx b/site/src/components/antdv-token-previewer/component-demos/popconfirm/popconfirm.tsx
new file mode 100644
index 000000000..1def06fef
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/popconfirm/popconfirm.tsx
@@ -0,0 +1,50 @@
+import { defineComponent, ref } from 'vue';
+import { Popconfirm, message } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+function confirm() {
+ message.success('Click on Yes');
+}
+function cancel() {
+ message.error('Click on No');
+}
+const Demo = defineComponent({
+ setup() {
+ const open = ref(true);
+
+ return () => (
+
+
{
+ if (node) {
+ console.log(node.parentNode);
+ return node.parentNode as HTMLElement;
+ }
+ return document.body;
+ }}
+ >
+ Delete
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorBgElevated', 'colorWarning'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/popover/index.ts b/site/src/components/antdv-token-previewer/component-demos/popover/index.ts
new file mode 100644
index 000000000..147db6bb0
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/popover/index.ts
@@ -0,0 +1,7 @@
+import Demo from './popover';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Demo];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/popover/popover.tsx b/site/src/components/antdv-token-previewer/component-demos/popover/popover.tsx
new file mode 100644
index 000000000..22b073d02
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/popover/popover.tsx
@@ -0,0 +1,31 @@
+import { defineComponent } from 'vue';
+import { Popover, Button } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ const content = () => (
+
+ );
+
+ return () => {
+ return (
+
+ );
+ };
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorBgElevated'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/progress/danger.tsx b/site/src/components/antdv-token-previewer/component-demos/progress/danger.tsx
new file mode 100644
index 000000000..ba9742e73
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/progress/danger.tsx
@@ -0,0 +1,26 @@
+import { defineComponent } from 'vue';
+import { Progress, Space } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+
+
+
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorError'],
+ key: 'danger',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/progress/index.ts b/site/src/components/antdv-token-previewer/component-demos/progress/index.ts
new file mode 100644
index 000000000..50a629729
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/progress/index.ts
@@ -0,0 +1,11 @@
+import Demo from './progress';
+import info from './info';
+import danger from './danger';
+import success from './success';
+import progressInBg from './progressInBg';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Demo, info, danger, success, progressInBg];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/progress/info.tsx b/site/src/components/antdv-token-previewer/component-demos/progress/info.tsx
new file mode 100644
index 000000000..26bb51c87
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/progress/info.tsx
@@ -0,0 +1,26 @@
+import { defineComponent } from 'vue';
+import { Progress } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+ <>
+
+
+
+
+
+ >
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorInfo'],
+ key: 'info',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/progress/progress.tsx b/site/src/components/antdv-token-previewer/component-demos/progress/progress.tsx
new file mode 100644
index 000000000..2c5dcec3d
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/progress/progress.tsx
@@ -0,0 +1,27 @@
+import { defineComponent } from 'vue';
+import { Progress } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+ <>
+
+
+
+
+
+
+ >
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorFillSecondary', 'colorText', 'colorBgContainer'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/progress/progressInBg.tsx b/site/src/components/antdv-token-previewer/component-demos/progress/progressInBg.tsx
new file mode 100644
index 000000000..05230d1d7
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/progress/progressInBg.tsx
@@ -0,0 +1,30 @@
+import { defineComponent } from 'vue';
+import { Progress, theme } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ const { token } = theme.useToken();
+
+ return () => {
+ return (
+
+ );
+ };
+ },
+});
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorFillSecondary', 'colorText', 'colorBgContainer'],
+ key: 'layout',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/progress/success.tsx b/site/src/components/antdv-token-previewer/component-demos/progress/success.tsx
new file mode 100644
index 000000000..622e15dd3
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/progress/success.tsx
@@ -0,0 +1,22 @@
+import { defineComponent } from 'vue';
+import { Progress, Space } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = () => (
+
+
+
+
+
+
+
+);
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorSuccess'],
+ key: 'success',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/radio/button.tsx b/site/src/components/antdv-token-previewer/component-demos/radio/button.tsx
new file mode 100644
index 000000000..8ee3d0842
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/radio/button.tsx
@@ -0,0 +1,31 @@
+import { defineComponent } from 'vue';
+import { Radio, Space } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+
+ Hangzhou
+
+ Shanghai
+
+
+
+ Apple
+ Orange
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorPrimaryActive', 'colorPrimaryHover'],
+ key: 'button',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/radio/disabled.tsx b/site/src/components/antdv-token-previewer/component-demos/radio/disabled.tsx
new file mode 100644
index 000000000..8fc622a4a
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/radio/disabled.tsx
@@ -0,0 +1,12 @@
+import { Radio } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = () => Radio;
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorBgContainerDisabled'],
+ key: 'disabled',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/radio/index.ts b/site/src/components/antdv-token-previewer/component-demos/radio/index.ts
new file mode 100644
index 000000000..5ea59c0b8
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/radio/index.ts
@@ -0,0 +1,9 @@
+import Default from './radio';
+import Button from './button';
+import disabled from './disabled';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default, Button, disabled];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/radio/radio.tsx b/site/src/components/antdv-token-previewer/component-demos/radio/radio.tsx
new file mode 100644
index 000000000..7c214d6ce
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/radio/radio.tsx
@@ -0,0 +1,12 @@
+import { Radio } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const Demo = () => Radio;
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorPrimary', 'controlOutline', 'colorBgContainer'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/rate/index.ts b/site/src/components/antdv-token-previewer/component-demos/rate/index.ts
new file mode 100644
index 000000000..313c9da2d
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/rate/index.ts
@@ -0,0 +1,7 @@
+import Demo from './rate';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Demo];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/rate/rate.tsx b/site/src/components/antdv-token-previewer/component-demos/rate/rate.tsx
new file mode 100644
index 000000000..ba1699f2c
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/rate/rate.tsx
@@ -0,0 +1,13 @@
+import { Rate } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = () => ;
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorFillContent'],
+ key: 'default',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/result/danger.tsx b/site/src/components/antdv-token-previewer/component-demos/result/danger.tsx
new file mode 100644
index 000000000..c499977bc
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/result/danger.tsx
@@ -0,0 +1,18 @@
+import { defineComponent } from 'vue';
+import { Result } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => ;
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorError'],
+ key: 'danger',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/result/index.ts b/site/src/components/antdv-token-previewer/component-demos/result/index.ts
new file mode 100644
index 000000000..1434ce4fe
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/result/index.ts
@@ -0,0 +1,11 @@
+import Demo from './result';
+import info from './info';
+import warning from './warning';
+import danger from './danger';
+import ResultWithDesc from './resultWithDesc';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Demo, info, warning, danger, ResultWithDesc];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/result/info.tsx b/site/src/components/antdv-token-previewer/component-demos/result/info.tsx
new file mode 100644
index 000000000..5d97915e3
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/result/info.tsx
@@ -0,0 +1,18 @@
+import { defineComponent } from 'vue';
+import { Result } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => ;
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorInfo'],
+ key: 'info',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/result/result.tsx b/site/src/components/antdv-token-previewer/component-demos/result/result.tsx
new file mode 100644
index 000000000..6a57f87f4
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/result/result.tsx
@@ -0,0 +1,30 @@
+import { defineComponent } from 'vue';
+import { Button, Result } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+ Go Console
+ ,
+ ,
+ ]}
+ />
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorSuccess'],
+ key: 'result',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/result/resultWithDesc.tsx b/site/src/components/antdv-token-previewer/component-demos/result/resultWithDesc.tsx
new file mode 100644
index 000000000..369c68d22
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/result/resultWithDesc.tsx
@@ -0,0 +1,21 @@
+import { defineComponent } from 'vue';
+import { Result } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+ Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait.
+
+ );
+ },
+});
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorFillAlter'],
+ key: 'resultWithDesc',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/result/success.tsx b/site/src/components/antdv-token-previewer/component-demos/result/success.tsx
new file mode 100644
index 000000000..afb9bc596
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/result/success.tsx
@@ -0,0 +1,25 @@
+import { defineComponent } from 'vue';
+import { Result } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorSuccess'],
+ key: 'result',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/result/warning.tsx b/site/src/components/antdv-token-previewer/component-demos/result/warning.tsx
new file mode 100644
index 000000000..7cad6ba16
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/result/warning.tsx
@@ -0,0 +1,18 @@
+import { defineComponent } from 'vue';
+import { Result } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => ;
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorWarning'],
+ key: 'warning',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/segmented/index.ts b/site/src/components/antdv-token-previewer/component-demos/segmented/index.ts
new file mode 100644
index 000000000..e9fc8e437
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/segmented/index.ts
@@ -0,0 +1,7 @@
+import Demo from './segmented';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Demo];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/segmented/segmented.tsx b/site/src/components/antdv-token-previewer/component-demos/segmented/segmented.tsx
new file mode 100644
index 000000000..aece5017b
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/segmented/segmented.tsx
@@ -0,0 +1,20 @@
+import { defineComponent } from 'vue';
+import { Segmented } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ key: 'default',
+ tokens: [],
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/select/danger.tsx b/site/src/components/antdv-token-previewer/component-demos/select/danger.tsx
new file mode 100644
index 000000000..e5aa26736
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/select/danger.tsx
@@ -0,0 +1,37 @@
+import { defineComponent } from 'vue';
+import { Select } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+import options from './data';
+
+const handleChange = (value: any) => {
+ console.log(`selected ${value}`);
+};
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorError', 'colorErrorOutline', 'colorErrorBorder', 'colorErrorHover'],
+ key: 'danger',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/select/data.ts b/site/src/components/antdv-token-previewer/component-demos/select/data.ts
new file mode 100644
index 000000000..19754517c
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/select/data.ts
@@ -0,0 +1,9 @@
+import type { SelectProps } from 'ant-design-vue';
+
+const options: SelectProps['options'] = [];
+
+for (let i = 10; i < 36; i++) {
+ options.push({ value: i.toString(36) + i, label: i.toString(36) + i });
+}
+
+export default options;
diff --git a/site/src/components/antdv-token-previewer/component-demos/select/disabled.tsx b/site/src/components/antdv-token-previewer/component-demos/select/disabled.tsx
new file mode 100644
index 000000000..b8d5455bd
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/select/disabled.tsx
@@ -0,0 +1,32 @@
+import { defineComponent } from 'vue';
+import { Select } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+import options from './data';
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorBgContainerDisabled', 'colorTextDisabled'],
+ key: 'disabled',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/select/icon.tsx b/site/src/components/antdv-token-previewer/component-demos/select/icon.tsx
new file mode 100644
index 000000000..e26952089
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/select/icon.tsx
@@ -0,0 +1,35 @@
+import { defineComponent } from 'vue';
+import { Select } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+import options from './data';
+
+const handleChange = (value: any) => {
+ console.log(`selected ${value}`);
+};
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: ['colorIcon', 'colorIconHover'],
+ key: 'icon',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/select/index.ts b/site/src/components/antdv-token-previewer/component-demos/select/index.ts
new file mode 100644
index 000000000..c71091a6c
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/select/index.ts
@@ -0,0 +1,12 @@
+import Default from './select';
+import SelectTag from './selectTag';
+import danger from './danger';
+import warning from './warning';
+import icon from './icon';
+import disabled from './disabled';
+
+import type { ComponentDemo } from '../../interface';
+
+const previewerDemo: ComponentDemo[] = [Default, SelectTag, danger, warning, icon, disabled];
+
+export default previewerDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/select/select.tsx b/site/src/components/antdv-token-previewer/component-demos/select/select.tsx
new file mode 100644
index 000000000..95fe768cc
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/select/select.tsx
@@ -0,0 +1,46 @@
+import { defineComponent } from 'vue';
+import { Select, Space } from 'ant-design-vue';
+import type { ComponentDemo } from '../../interface';
+
+const { Option } = Select;
+
+function handleChange() {}
+const Demo = defineComponent({
+ setup() {
+ return () => (
+
+
+
+
+
+
+ );
+ },
+});
+
+const componentDemo: ComponentDemo = {
+ demo: ,
+ tokens: [
+ 'controlOutline',
+ 'colorPrimary',
+ 'colorPrimaryHover',
+ 'colorText',
+ 'colorBgElevated',
+ 'colorBgContainer',
+ ],
+ key: 'select',
+};
+
+export default componentDemo;
diff --git a/site/src/components/antdv-token-previewer/component-demos/select/selectTag.tsx b/site/src/components/antdv-token-previewer/component-demos/select/selectTag.tsx
new file mode 100644
index 000000000..dc05ebbd9
--- /dev/null
+++ b/site/src/components/antdv-token-previewer/component-demos/select/selectTag.tsx
@@ -0,0 +1,43 @@
+import { defineComponent } from 'vue';
+import { Select } from 'ant-design-vue';
+
+import type { ComponentDemo } from '../../interface';
+
+import options from './data';
+
+const handleChange = (value: any) => {
+ console.log(`selected ${value}`);
+};
+
+const Demo = defineComponent({
+ setup() {
+ return () => (
+