tailwind-preset-antd 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en-US.md CHANGED
@@ -1,11 +1,15 @@
1
1
  Use antd design token like using tailwindcss.
2
2
 
3
- Provides common antd design token easier to use. Recommended to use antd v6 and tailwindcss v4, but also supports antd v5 and tailwindcss v3.
3
+ Recommended to use antd v6 and tailwindcss v4, but also supports antd>=v5.12 (depends on antd cssVar variables) and tailwindcss v3.
4
4
 
5
5
  [简体中文](./README.md) | English
6
6
 
7
7
  # Project Introduction
8
8
 
9
+ ```bash
10
+ npm i tailwind-preset-antd
11
+ ```
12
+
9
13
  Before:
10
14
 
11
15
  ```tsx
package/README.md CHANGED
@@ -1,11 +1,15 @@
1
1
  像使用 tailwindcss 一样使用 antd design token。
2
2
 
3
- 提供常用 antd design token 更易于使用。推荐使用 antd v6 和 tailwindcss v4,但同样支持 antd v5 和 tailwindcss v3。
3
+ 推荐使用 antd v6 和 tailwindcss v4,但同样支持 antd>=v5.12(依赖 antd cssVar 变量) 和 tailwindcss v3。
4
4
 
5
5
  [English](./README.en-US.md) | 简体中文
6
6
 
7
7
  # 项目介绍
8
8
 
9
+ ```bash
10
+ npm i tailwind-preset-antd
11
+ ```
12
+
9
13
  以前:
10
14
 
11
15
  ```tsx
@@ -1,5 +1,5 @@
1
1
  import { toPropertyKey } from "./toPropertyKey.js";
2
- //#region \0@oxc-project+runtime@0.129.0/helpers/defineProperty.js
2
+ //#region \0@oxc-project+runtime@0.135.0/helpers/esm/defineProperty.js
3
3
  function _defineProperty(e, r, t) {
4
4
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
5
5
  value: t,
@@ -1,5 +1,5 @@
1
1
  import { _defineProperty } from "./defineProperty.js";
2
- //#region \0@oxc-project+runtime@0.129.0/helpers/objectSpread2.js
2
+ //#region \0@oxc-project+runtime@0.135.0/helpers/esm/objectSpread2.js
3
3
  function ownKeys(e, r) {
4
4
  var t = Object.keys(e);
5
5
  if (Object.getOwnPropertySymbols) {
@@ -1,5 +1,5 @@
1
1
  import { _typeof } from "./typeof.js";
2
- //#region \0@oxc-project+runtime@0.129.0/helpers/toPrimitive.js
2
+ //#region \0@oxc-project+runtime@0.135.0/helpers/esm/toPrimitive.js
3
3
  function toPrimitive(t, r) {
4
4
  if ("object" != _typeof(t) || !t) return t;
5
5
  var e = t[Symbol.toPrimitive];
@@ -1,6 +1,6 @@
1
1
  import { _typeof } from "./typeof.js";
2
2
  import { toPrimitive } from "./toPrimitive.js";
3
- //#region \0@oxc-project+runtime@0.129.0/helpers/toPropertyKey.js
3
+ //#region \0@oxc-project+runtime@0.135.0/helpers/esm/toPropertyKey.js
4
4
  function toPropertyKey(t) {
5
5
  var i = toPrimitive(t, "string");
6
6
  return "symbol" == _typeof(i) ? i : i + "";
@@ -1,4 +1,4 @@
1
- //#region \0@oxc-project+runtime@0.129.0/helpers/typeof.js
1
+ //#region \0@oxc-project+runtime@0.135.0/helpers/esm/typeof.js
2
2
  function _typeof(o) {
3
3
  "@babel/helpers - typeof";
4
4
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -5,6 +5,7 @@ import { semanticColors } from "../preset/tokens/semanticColors.js";
5
5
  import { margins } from "../preset/tokens/margins.js";
6
6
  import { fontSizes } from "../preset/tokens/fontSizes.js";
7
7
  import { borderRadius } from "../preset/tokens/borderRadius.js";
8
+ import { boxShadow } from "../preset/tokens/boxShadow.js";
8
9
  //#region src/core/genCssVarByTokens.ts
9
10
  function genCSSVarByTokens(tokens, cssVarPrefix = "a") {
10
11
  let colorsVariables = "";
@@ -14,13 +15,14 @@ function genCSSVarByTokens(tokens, cssVarPrefix = "a") {
14
15
  ...semanticColors,
15
16
  ...margins,
16
17
  ...borderRadius,
17
- ...fontSizes
18
+ ...fontSizes,
19
+ ...boxShadow
18
20
  ];
19
21
  for (let i = 0; i < presetTokens.length; i++) {
20
22
  const key = presetTokens[i];
21
23
  const value = tokens[key];
22
24
  if (value === void 0) {
23
- if (process.env.NODE_ENV === "development") console.warn(`[tailwind-preset-antd]: ${key} is not defined in antd design token`);
25
+ if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test") console.error(`[tailwind-preset-antd]: '${key}' is not defined in antd design token`);
24
26
  continue;
25
27
  }
26
28
  if (colorPalettes.includes(key)) {
@@ -41,6 +43,7 @@ function genCSSVarByTokens(tokens, cssVarPrefix = "a") {
41
43
  colorsVariables += `--${cssVarPrefix}-${key}:${value}px;`;
42
44
  continue;
43
45
  }
46
+ if (boxShadow.includes(key)) colorsVariables += `--${cssVarPrefix}-${key}:${value};`;
44
47
  }
45
48
  return colorsVariables;
46
49
  }
@@ -4,6 +4,7 @@ import { semanticColors } from "../preset/tokens/semanticColors.js";
4
4
  import { margins } from "../preset/tokens/margins.js";
5
5
  import { fontSizes } from "../preset/tokens/fontSizes.js";
6
6
  import { borderRadius } from "../preset/tokens/borderRadius.js";
7
+ import { boxShadow } from "../preset/tokens/boxShadow.js";
7
8
  //#region src/core/genTailwindTheme.ts
8
9
  function genTwPrefixKey(key, prefix) {
9
10
  return prefix ? `${prefix}-${key}` : key;
@@ -42,5 +43,12 @@ function createBorderRadius(cssVarPrefix = "a", twPrefix) {
42
43
  });
43
44
  return radiusVar;
44
45
  }
46
+ function createBoxShadow(cssVarPrefix = "a", twPrefix) {
47
+ const boxShadowVar = {};
48
+ boxShadow.forEach((key) => {
49
+ boxShadowVar[genTwPrefixKey(key, twPrefix)] = `var(--${cssVarPrefix}-${key})`;
50
+ });
51
+ return boxShadowVar;
52
+ }
45
53
  //#endregion
46
- export { createBorderRadius, createColorPalettes, createFontSize, createSpacing };
54
+ export { createBorderRadius, createBoxShadow, createColorPalettes, createFontSize, createSpacing };
@@ -1,4 +1,4 @@
1
- import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.129.0/helpers/objectSpread2.js";
1
+ import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.135.0/helpers/esm/objectSpread2.js";
2
2
  import * as React from "react";
3
3
  //#region src/hooks/useCompatibleInsertionEffect.ts
4
4
  const { useInsertionEffect } = _objectSpread2({}, React);
package/dist/plugin.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _objectSpread2 } from "./_virtual/_@oxc-project_runtime@0.129.0/helpers/objectSpread2.js";
2
- import { createBorderRadius, createColorPalettes, createFontSize, createSpacing } from "./core/genTailwindTheme.js";
1
+ import { _objectSpread2 } from "./_virtual/_@oxc-project_runtime@0.135.0/helpers/esm/objectSpread2.js";
2
+ import { createBorderRadius, createBoxShadow, createColorPalettes, createFontSize, createSpacing } from "./core/genTailwindTheme.js";
3
3
  import plugin from "tailwindcss/plugin";
4
4
  //#region src/plugin.ts
5
5
  /**
@@ -21,7 +21,9 @@ const twAntdPresetPlugin = plugin.withOptions(() => () => {}, (options = {}) =>
21
21
  fontSize: _objectSpread2({}, createFontSize(cssVarPrefix, twPrefix)),
22
22
  radius: _objectSpread2({}, createBorderRadius(cssVarPrefix, twPrefix)),
23
23
  borderRadius: _objectSpread2({}, createBorderRadius(cssVarPrefix, twPrefix)),
24
- spacing: _objectSpread2({}, createSpacing(cssVarPrefix, twPrefix))
24
+ spacing: _objectSpread2({}, createSpacing(cssVarPrefix, twPrefix)),
25
+ shadow: _objectSpread2({}, createBoxShadow(cssVarPrefix, twPrefix)),
26
+ boxShadow: _objectSpread2({}, createBoxShadow(cssVarPrefix, twPrefix))
25
27
  } } };
26
28
  });
27
29
  //#endregion
@@ -0,0 +1,6 @@
1
+ import { AliasTokenKey } from "../../utils/type.js";
2
+
3
+ //#region src/preset/tokens/boxShadow.d.ts
4
+ declare const boxShadow: AliasTokenKey[];
5
+ //#endregion
6
+ export { boxShadow };
@@ -0,0 +1,8 @@
1
+ //#region src/preset/tokens/boxShadow.ts
2
+ const boxShadow = [
3
+ "boxShadow",
4
+ "boxShadowSecondary",
5
+ "boxShadowTertiary"
6
+ ];
7
+ //#endregion
8
+ export { boxShadow };
package/dist/preset.d.ts CHANGED
@@ -4,8 +4,9 @@ import { semanticColors } from "./preset/tokens/semanticColors.js";
4
4
  import { margins } from "./preset/tokens/margins.js";
5
5
  import { fontSizes } from "./preset/tokens/fontSizes.js";
6
6
  import { borderRadius } from "./preset/tokens/borderRadius.js";
7
+ import { boxShadow } from "./preset/tokens/boxShadow.js";
7
8
 
8
9
  //#region src/preset/index.d.ts
9
- declare const colorPresets: ("blue" | "purple" | "cyan" | "green" | "magenta" | "pink" | "red" | "orange" | "yellow" | "volcano" | "geekblue" | "lime" | "gold" | "blue1" | "blue2" | "blue3" | "blue4" | "blue5" | "blue6" | "blue7" | "blue8" | "blue9" | "blue10" | "purple1" | "purple2" | "purple3" | "purple4" | "purple5" | "purple6" | "purple7" | "purple8" | "purple9" | "purple10" | "cyan1" | "cyan2" | "cyan3" | "cyan4" | "cyan5" | "cyan6" | "cyan7" | "cyan8" | "cyan9" | "cyan10" | "green1" | "green2" | "green3" | "green4" | "green5" | "green6" | "green7" | "green8" | "green9" | "green10" | "magenta1" | "magenta2" | "magenta3" | "magenta4" | "magenta5" | "magenta6" | "magenta7" | "magenta8" | "magenta9" | "magenta10" | "pink1" | "pink2" | "pink3" | "pink4" | "pink5" | "pink6" | "pink7" | "pink8" | "pink9" | "pink10" | "red1" | "red2" | "red3" | "red4" | "red5" | "red6" | "red7" | "red8" | "red9" | "red10" | "orange1" | "orange2" | "orange3" | "orange4" | "orange5" | "orange6" | "orange7" | "orange8" | "orange9" | "orange10" | "yellow1" | "yellow2" | "yellow3" | "yellow4" | "yellow5" | "yellow6" | "yellow7" | "yellow8" | "yellow9" | "yellow10" | "volcano1" | "volcano2" | "volcano3" | "volcano4" | "volcano5" | "volcano6" | "volcano7" | "volcano8" | "volcano9" | "volcano10" | "geekblue1" | "geekblue2" | "geekblue3" | "geekblue4" | "geekblue5" | "geekblue6" | "geekblue7" | "geekblue8" | "geekblue9" | "geekblue10" | "lime1" | "lime2" | "lime3" | "lime4" | "lime5" | "lime6" | "lime7" | "lime8" | "lime9" | "lime10" | "gold1" | "gold2" | "gold3" | "gold4" | "gold5" | "gold6" | "gold7" | "gold8" | "gold9" | "gold10" | "blue-1" | "blue-2" | "blue-3" | "blue-4" | "blue-5" | "blue-6" | "blue-7" | "blue-8" | "blue-9" | "blue-10" | "purple-1" | "purple-2" | "purple-3" | "purple-4" | "purple-5" | "purple-6" | "purple-7" | "purple-8" | "purple-9" | "purple-10" | "cyan-1" | "cyan-2" | "cyan-3" | "cyan-4" | "cyan-5" | "cyan-6" | "cyan-7" | "cyan-8" | "cyan-9" | "cyan-10" | "green-1" | "green-2" | "green-3" | "green-4" | "green-5" | "green-6" | "green-7" | "green-8" | "green-9" | "green-10" | "magenta-1" | "magenta-2" | "magenta-3" | "magenta-4" | "magenta-5" | "magenta-6" | "magenta-7" | "magenta-8" | "magenta-9" | "magenta-10" | "pink-1" | "pink-2" | "pink-3" | "pink-4" | "pink-5" | "pink-6" | "pink-7" | "pink-8" | "pink-9" | "pink-10" | "red-1" | "red-2" | "red-3" | "red-4" | "red-5" | "red-6" | "red-7" | "red-8" | "red-9" | "red-10" | "orange-1" | "orange-2" | "orange-3" | "orange-4" | "orange-5" | "orange-6" | "orange-7" | "orange-8" | "orange-9" | "orange-10" | "yellow-1" | "yellow-2" | "yellow-3" | "yellow-4" | "yellow-5" | "yellow-6" | "yellow-7" | "yellow-8" | "yellow-9" | "yellow-10" | "volcano-1" | "volcano-2" | "volcano-3" | "volcano-4" | "volcano-5" | "volcano-6" | "volcano-7" | "volcano-8" | "volcano-9" | "volcano-10" | "geekblue-1" | "geekblue-2" | "geekblue-3" | "geekblue-4" | "geekblue-5" | "geekblue-6" | "geekblue-7" | "geekblue-8" | "geekblue-9" | "geekblue-10" | "lime-1" | "lime-2" | "lime-3" | "lime-4" | "lime-5" | "lime-6" | "lime-7" | "lime-8" | "lime-9" | "lime-10" | "gold-1" | "gold-2" | "gold-3" | "gold-4" | "gold-5" | "gold-6" | "gold-7" | "gold-8" | "gold-9" | "gold-10" | "colorFillContentHover" | "colorFillAlter" | "colorFillContent" | "colorBgContainerDisabled" | "colorBgTextHover" | "colorBgTextActive" | "colorBorderBg" | "colorSplit" | "colorTextPlaceholder" | "colorTextDisabled" | "colorTextHeading" | "colorTextLabel" | "colorTextDescription" | "colorTextLightSolid" | "colorIcon" | "colorIconHover" | "colorHighlight" | "controlOutline" | "colorWarningOutline" | "colorErrorOutline" | "fontSizeIcon" | "fontWeightStrong" | "controlOutlineWidth" | "controlItemBgHover" | "controlItemBgActive" | "controlItemBgActiveHover" | "controlInteractiveSize" | "controlItemBgActiveDisabled" | "lineWidthFocus" | "paddingXXS" | "paddingXS" | "paddingSM" | "padding" | "paddingMD" | "paddingLG" | "paddingXL" | "paddingContentHorizontalLG" | "paddingContentHorizontal" | "paddingContentHorizontalSM" | "paddingContentVerticalLG" | "paddingContentVertical" | "paddingContentVerticalSM" | "marginXXS" | "marginXS" | "marginSM" | "margin" | "marginMD" | "marginLG" | "marginXL" | "marginXXL" | "opacityLoading" | "boxShadow" | "boxShadowSecondary" | "boxShadowTertiary" | "linkDecoration" | "linkHoverDecoration" | "linkFocusDecoration" | "controlPaddingHorizontal" | "controlPaddingHorizontalSM" | "screenXS" | "screenXSMin" | "screenXSMax" | "screenSM" | "screenSMMin" | "screenSMMax" | "screenMD" | "screenMDMin" | "screenMDMax" | "screenLG" | "screenLGMin" | "screenLGMax" | "screenXL" | "screenXLMin" | "screenXLMax" | "screenXXL" | "screenXXLMin" | "screenXXLMax" | "screenXXXL" | "screenXXXLMin" | "controlTmpOutline" | "colorPrimary" | "colorSuccess" | "colorWarning" | "colorError" | "colorInfo" | "colorTextBase" | "colorBgBase" | "colorLink" | "fontFamily" | "fontFamilyCode" | "fontSize" | "lineWidth" | "lineType" | "borderRadius" | "sizeUnit" | "sizeStep" | "sizePopupArrow" | "controlHeight" | "zIndexBase" | "zIndexPopupBase" | "opacityImage" | "motionUnit" | "motionBase" | "motionEaseOutCirc" | "motionEaseInOutCirc" | "motionEaseInOut" | "motionEaseOutBack" | "motionEaseInBack" | "motionEaseInQuint" | "motionEaseOutQuint" | "motionEaseOut" | "wireframe" | "motion" | "colorWhite" | "colorBgMask" | "colorText" | "colorTextSecondary" | "colorTextTertiary" | "colorTextQuaternary" | "colorBorder" | "colorBorderSecondary" | "colorBorderDisabled" | "colorFill" | "colorFillSecondary" | "colorFillTertiary" | "colorFillQuaternary" | "colorBgLayout" | "colorBgContainer" | "colorBgElevated" | "colorBgSpotlight" | "colorBgBlur" | "colorBgSolid" | "colorBgSolidActive" | "colorBgSolidHover" | "colorPrimaryBg" | "colorPrimaryBgHover" | "colorPrimaryBorder" | "colorPrimaryBorderHover" | "colorPrimaryHover" | "colorPrimaryActive" | "colorPrimaryTextHover" | "colorPrimaryText" | "colorPrimaryTextActive" | "colorSuccessBg" | "colorSuccessBgHover" | "colorSuccessBorder" | "colorSuccessBorderHover" | "colorSuccessHover" | "colorSuccessActive" | "colorSuccessTextHover" | "colorSuccessText" | "colorSuccessTextActive" | "colorWarningBg" | "colorWarningBgHover" | "colorWarningBorder" | "colorWarningBorderHover" | "colorWarningHover" | "colorWarningActive" | "colorWarningTextHover" | "colorWarningText" | "colorWarningTextActive" | "colorErrorBg" | "colorErrorBgHover" | "colorErrorBgFilledHover" | "colorErrorBgActive" | "colorErrorBorder" | "colorErrorBorderHover" | "colorErrorHover" | "colorErrorActive" | "colorErrorTextHover" | "colorErrorText" | "colorErrorTextActive" | "colorInfoBg" | "colorInfoBgHover" | "colorInfoBorder" | "colorInfoBorderHover" | "colorInfoHover" | "colorInfoActive" | "colorInfoTextHover" | "colorInfoText" | "colorInfoTextActive" | "colorLinkHover" | "colorLinkActive" | "sizeXXL" | "sizeXL" | "sizeLG" | "sizeMD" | "sizeMS" | "size" | "sizeSM" | "sizeXS" | "sizeXXS" | "controlHeightXS" | "controlHeightSM" | "controlHeightLG" | "lineWidthBold" | "borderRadiusXS" | "borderRadiusSM" | "borderRadiusLG" | "borderRadiusOuter" | "fontSizeSM" | "fontSizeLG" | "fontSizeXL" | "fontSizeHeading1" | "fontSizeHeading2" | "fontSizeHeading3" | "fontSizeHeading4" | "fontSizeHeading5" | "lineHeight" | "lineHeightLG" | "lineHeightSM" | "lineHeightHeading1" | "lineHeightHeading2" | "lineHeightHeading3" | "lineHeightHeading4" | "lineHeightHeading5" | "motionDurationFast" | "motionDurationMid" | "motionDurationSlow")[];
10
+ declare const colorPresets: ("blue" | "purple" | "cyan" | "green" | "magenta" | "pink" | "red" | "orange" | "yellow" | "volcano" | "geekblue" | "lime" | "gold" | "blue1" | "blue2" | "blue3" | "blue4" | "blue5" | "blue6" | "blue7" | "blue8" | "blue9" | "blue10" | "purple1" | "purple2" | "purple3" | "purple4" | "purple5" | "purple6" | "purple7" | "purple8" | "purple9" | "purple10" | "cyan1" | "cyan2" | "cyan3" | "cyan4" | "cyan5" | "cyan6" | "cyan7" | "cyan8" | "cyan9" | "cyan10" | "green1" | "green2" | "green3" | "green4" | "green5" | "green6" | "green7" | "green8" | "green9" | "green10" | "magenta1" | "magenta2" | "magenta3" | "magenta4" | "magenta5" | "magenta6" | "magenta7" | "magenta8" | "magenta9" | "magenta10" | "pink1" | "pink2" | "pink3" | "pink4" | "pink5" | "pink6" | "pink7" | "pink8" | "pink9" | "pink10" | "red1" | "red2" | "red3" | "red4" | "red5" | "red6" | "red7" | "red8" | "red9" | "red10" | "orange1" | "orange2" | "orange3" | "orange4" | "orange5" | "orange6" | "orange7" | "orange8" | "orange9" | "orange10" | "yellow1" | "yellow2" | "yellow3" | "yellow4" | "yellow5" | "yellow6" | "yellow7" | "yellow8" | "yellow9" | "yellow10" | "volcano1" | "volcano2" | "volcano3" | "volcano4" | "volcano5" | "volcano6" | "volcano7" | "volcano8" | "volcano9" | "volcano10" | "geekblue1" | "geekblue2" | "geekblue3" | "geekblue4" | "geekblue5" | "geekblue6" | "geekblue7" | "geekblue8" | "geekblue9" | "geekblue10" | "lime1" | "lime2" | "lime3" | "lime4" | "lime5" | "lime6" | "lime7" | "lime8" | "lime9" | "lime10" | "gold1" | "gold2" | "gold3" | "gold4" | "gold5" | "gold6" | "gold7" | "gold8" | "gold9" | "gold10" | "blue-1" | "blue-2" | "blue-3" | "blue-4" | "blue-5" | "blue-6" | "blue-7" | "blue-8" | "blue-9" | "blue-10" | "purple-1" | "purple-2" | "purple-3" | "purple-4" | "purple-5" | "purple-6" | "purple-7" | "purple-8" | "purple-9" | "purple-10" | "cyan-1" | "cyan-2" | "cyan-3" | "cyan-4" | "cyan-5" | "cyan-6" | "cyan-7" | "cyan-8" | "cyan-9" | "cyan-10" | "green-1" | "green-2" | "green-3" | "green-4" | "green-5" | "green-6" | "green-7" | "green-8" | "green-9" | "green-10" | "magenta-1" | "magenta-2" | "magenta-3" | "magenta-4" | "magenta-5" | "magenta-6" | "magenta-7" | "magenta-8" | "magenta-9" | "magenta-10" | "pink-1" | "pink-2" | "pink-3" | "pink-4" | "pink-5" | "pink-6" | "pink-7" | "pink-8" | "pink-9" | "pink-10" | "red-1" | "red-2" | "red-3" | "red-4" | "red-5" | "red-6" | "red-7" | "red-8" | "red-9" | "red-10" | "orange-1" | "orange-2" | "orange-3" | "orange-4" | "orange-5" | "orange-6" | "orange-7" | "orange-8" | "orange-9" | "orange-10" | "yellow-1" | "yellow-2" | "yellow-3" | "yellow-4" | "yellow-5" | "yellow-6" | "yellow-7" | "yellow-8" | "yellow-9" | "yellow-10" | "volcano-1" | "volcano-2" | "volcano-3" | "volcano-4" | "volcano-5" | "volcano-6" | "volcano-7" | "volcano-8" | "volcano-9" | "volcano-10" | "geekblue-1" | "geekblue-2" | "geekblue-3" | "geekblue-4" | "geekblue-5" | "geekblue-6" | "geekblue-7" | "geekblue-8" | "geekblue-9" | "geekblue-10" | "lime-1" | "lime-2" | "lime-3" | "lime-4" | "lime-5" | "lime-6" | "lime-7" | "lime-8" | "lime-9" | "lime-10" | "gold-1" | "gold-2" | "gold-3" | "gold-4" | "gold-5" | "gold-6" | "gold-7" | "gold-8" | "gold-9" | "gold-10" | "colorFillContentHover" | "colorFillAlter" | "colorFillContent" | "colorBgContainerDisabled" | "colorBgTextHover" | "colorBgTextActive" | "colorBorderBg" | "colorSplit" | "colorTextPlaceholder" | "colorTextDisabled" | "colorTextHeading" | "colorTextLabel" | "colorTextDescription" | "colorTextLightSolid" | "colorIcon" | "colorIconHover" | "colorHighlight" | "controlOutline" | "colorWarningOutline" | "colorErrorOutline" | "colorErrorAffix" | "colorWarningAffix" | "fontSizeIcon" | "fontWeightStrong" | "controlOutlineWidth" | "controlItemBgHover" | "controlItemBgActive" | "controlItemBgActiveHover" | "controlInteractiveSize" | "controlItemBgActiveDisabled" | "lineWidthFocus" | "paddingXXS" | "paddingXS" | "paddingSM" | "padding" | "paddingMD" | "paddingLG" | "paddingXL" | "paddingContentHorizontalLG" | "paddingContentHorizontal" | "paddingContentHorizontalSM" | "paddingContentVerticalLG" | "paddingContentVertical" | "paddingContentVerticalSM" | "marginXXS" | "marginXS" | "marginSM" | "margin" | "marginMD" | "marginLG" | "marginXL" | "marginXXL" | "opacityLoading" | "boxShadow" | "boxShadowSecondary" | "boxShadowTertiary" | "linkDecoration" | "linkHoverDecoration" | "linkFocusDecoration" | "controlPaddingHorizontal" | "controlPaddingHorizontalSM" | "screenXS" | "screenXSMin" | "screenXSMax" | "screenSM" | "screenSMMin" | "screenSMMax" | "screenMD" | "screenMDMin" | "screenMDMax" | "screenLG" | "screenLGMin" | "screenLGMax" | "screenXL" | "screenXLMin" | "screenXLMax" | "screenXXL" | "screenXXLMin" | "screenXXLMax" | "screenXXXL" | "screenXXXLMin" | "controlTmpOutline" | "colorPrimary" | "colorSuccess" | "colorWarning" | "colorError" | "colorInfo" | "colorTextBase" | "colorBgBase" | "colorLink" | "fontFamily" | "fontFamilyCode" | "fontSize" | "lineWidth" | "lineType" | "borderRadius" | "sizeUnit" | "sizeStep" | "sizePopupArrow" | "controlHeight" | "zIndexBase" | "zIndexPopupBase" | "opacityImage" | "motionUnit" | "motionBase" | "motionEaseOutCirc" | "motionEaseInOutCirc" | "motionEaseInOut" | "motionEaseOutBack" | "motionEaseInBack" | "motionEaseInQuint" | "motionEaseOutQuint" | "motionEaseOut" | "wireframe" | "motion" | "colorWhite" | "colorBgMask" | "colorText" | "colorTextSecondary" | "colorTextTertiary" | "colorTextQuaternary" | "colorBorder" | "colorBorderSecondary" | "colorBorderDisabled" | "colorFill" | "colorFillSecondary" | "colorFillTertiary" | "colorFillQuaternary" | "colorBgLayout" | "colorBgContainer" | "colorBgElevated" | "colorBgSpotlight" | "colorBgBlur" | "colorBgSolid" | "colorBgSolidActive" | "colorBgSolidHover" | "colorPrimaryBg" | "colorPrimaryBgHover" | "colorPrimaryBorder" | "colorPrimaryBorderHover" | "colorPrimaryHover" | "colorPrimaryActive" | "colorPrimaryTextHover" | "colorPrimaryText" | "colorPrimaryTextActive" | "colorSuccessBg" | "colorSuccessBgHover" | "colorSuccessBorder" | "colorSuccessBorderHover" | "colorSuccessHover" | "colorSuccessActive" | "colorSuccessTextHover" | "colorSuccessText" | "colorSuccessTextActive" | "colorWarningBg" | "colorWarningBgHover" | "colorWarningBorder" | "colorWarningBorderHover" | "colorWarningHover" | "colorWarningActive" | "colorWarningTextHover" | "colorWarningText" | "colorWarningTextActive" | "colorErrorBg" | "colorErrorBgHover" | "colorErrorBgFilledHover" | "colorErrorBgActive" | "colorErrorBorder" | "colorErrorBorderHover" | "colorErrorHover" | "colorErrorActive" | "colorErrorTextHover" | "colorErrorText" | "colorErrorTextActive" | "colorInfoBg" | "colorInfoBgHover" | "colorInfoBorder" | "colorInfoBorderHover" | "colorInfoHover" | "colorInfoActive" | "colorInfoTextHover" | "colorInfoText" | "colorInfoTextActive" | "colorLinkHover" | "colorLinkActive" | "sizeXXL" | "sizeXL" | "sizeLG" | "sizeMD" | "sizeMS" | "size" | "sizeSM" | "sizeXS" | "sizeXXS" | "controlHeightXS" | "controlHeightSM" | "controlHeightLG" | "lineWidthBold" | "borderRadiusXS" | "borderRadiusSM" | "borderRadiusLG" | "borderRadiusOuter" | "fontSizeSM" | "fontSizeLG" | "fontSizeXL" | "fontSizeHeading1" | "fontSizeHeading2" | "fontSizeHeading3" | "fontSizeHeading4" | "fontSizeHeading5" | "lineHeight" | "lineHeightLG" | "lineHeightSM" | "lineHeightHeading1" | "lineHeightHeading2" | "lineHeightHeading3" | "lineHeightHeading4" | "lineHeightHeading5" | "motionDurationFast" | "motionDurationMid" | "motionDurationSlow")[];
10
11
  //#endregion
11
- export { borderRadius, colorPalettes, colorPresets, fontSizes, functionalColors, margins, semanticColors };
12
+ export { borderRadius, boxShadow, colorPalettes, colorPresets, fontSizes, functionalColors, margins, semanticColors };
package/dist/preset.js CHANGED
@@ -4,6 +4,7 @@ import { semanticColors } from "./preset/tokens/semanticColors.js";
4
4
  import { margins } from "./preset/tokens/margins.js";
5
5
  import { fontSizes } from "./preset/tokens/fontSizes.js";
6
6
  import { borderRadius } from "./preset/tokens/borderRadius.js";
7
+ import { boxShadow } from "./preset/tokens/boxShadow.js";
7
8
  //#region src/preset/index.ts
8
9
  const colorPresets = [
9
10
  ...colorPalettes,
@@ -11,4 +12,4 @@ const colorPresets = [
11
12
  ...semanticColors
12
13
  ];
13
14
  //#endregion
14
- export { borderRadius, colorPalettes, colorPresets, fontSizes, functionalColors, margins, semanticColors };
15
+ export { borderRadius, boxShadow, colorPalettes, colorPresets, fontSizes, functionalColors, margins, semanticColors };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwind-preset-antd",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Use antd design token like using tailwindcss",
5
5
  "keywords": [
6
6
  "antd",
@@ -28,29 +28,29 @@
28
28
  "hex-rgb": "^5.0.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@tailwindcss/vite": "^4.2.4",
31
+ "@tailwindcss/vite": "^4.3.1",
32
32
  "@testing-library/jest-dom": "^6.9.1",
33
33
  "@testing-library/react": "^16.3.2",
34
- "@types/node": "^25.6.2",
35
- "@types/react": "^19.2.14",
34
+ "@types/node": "^25.9.3",
35
+ "@types/react": "^19.2.17",
36
36
  "@types/react-dom": "^19.2.3",
37
- "@vitejs/plugin-react": "^6.0.1",
37
+ "@vitejs/plugin-react": "^6.0.2",
38
38
  "@vitest/coverage-v8": "4.1.5",
39
39
  "bumpp": "^11.1.0",
40
40
  "jsdom": "^29.1.1",
41
- "oxfmt": "^0.48.0",
42
- "oxlint": "^1.63.0",
43
- "postcss": "^8.5.14",
44
- "publint": "^0.3.19",
45
- "react-dom": "^19.2.6",
46
- "tailwindcss": "^4.2.4",
47
- "tsdown": "^0.22.0",
41
+ "oxfmt": "^0.54.0",
42
+ "oxlint": "^1.69.0",
43
+ "postcss": "^8.5.15",
44
+ "publint": "^0.3.21",
45
+ "react-dom": "^19.2.7",
46
+ "tailwindcss": "^4.3.1",
47
+ "tsdown": "^0.22.2",
48
48
  "typescript": "^6.0.3",
49
- "vite": "^8.0.11",
50
- "vitest": "^4.1.5"
49
+ "vite": "^8.0.16",
50
+ "vitest": "^4.1.8"
51
51
  },
52
52
  "peerDependencies": {
53
- "antd": ">=5",
53
+ "antd": ">=5.12.0",
54
54
  "react": ">=16.9.0",
55
55
  "tailwindcss": "^3 || ^4"
56
56
  },