@omnific/atelier 0.2.0 → 0.4.0

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.
Files changed (79) hide show
  1. package/README.md +9 -5
  2. package/dist/box/Box.d.ts +1 -1
  3. package/dist/box/Box.js +8 -13
  4. package/dist/box/index.js +1 -2
  5. package/dist/box/types.d.ts +6 -30
  6. package/dist/button/Button.js +3 -2
  7. package/dist/button/index.d.ts +2 -2
  8. package/dist/button/index.js +1 -2
  9. package/dist/button/types.d.ts +15 -5
  10. package/dist/props/display.props.d.ts +10 -0
  11. package/dist/props/display.props.js +15 -0
  12. package/dist/props/flex.props.d.ts +58 -0
  13. package/dist/props/flex.props.js +72 -0
  14. package/dist/props/gap.props.d.ts +10 -0
  15. package/dist/props/gap.props.js +18 -0
  16. package/dist/props/height.props.d.ts +10 -0
  17. package/dist/props/height.props.js +27 -0
  18. package/dist/props/index.d.ts +95 -0
  19. package/dist/props/index.js +158 -0
  20. package/dist/props/justify.props.d.ts +34 -0
  21. package/dist/props/justify.props.js +43 -0
  22. package/dist/props/margin.props.d.ts +10 -0
  23. package/dist/props/margin.props.js +27 -0
  24. package/dist/props/overflow.props.d.ts +10 -0
  25. package/dist/props/overflow.props.js +13 -0
  26. package/dist/props/padding.props.d.ts +10 -0
  27. package/dist/props/padding.props.js +18 -0
  28. package/dist/props/position.props.d.ts +18 -0
  29. package/dist/props/position.props.js +38 -0
  30. package/dist/props/radius.props.d.ts +10 -0
  31. package/dist/props/radius.props.js +19 -0
  32. package/dist/props/scaling.props.d.ts +10 -0
  33. package/dist/props/shadow.props.d.ts +10 -0
  34. package/dist/props/shadow.props.js +16 -0
  35. package/dist/props/width.props.d.ts +10 -0
  36. package/dist/props/width.props.js +26 -0
  37. package/dist/styles.css +2479 -69
  38. package/dist/system/create-system.d.ts +9 -4
  39. package/dist/system/create-system.js +9 -8
  40. package/dist/system/css-vars.d.ts +5 -40
  41. package/dist/system/css-vars.js +5 -61
  42. package/dist/system/default-system.d.ts +7 -3
  43. package/dist/system/default-system.js +3 -3
  44. package/dist/system/defaults/color-keys.gen.d.ts +3 -0
  45. package/dist/system/defaults/colors.d.ts +92 -169
  46. package/dist/system/defaults/colors.js +101 -63
  47. package/dist/system/define-colors.d.ts +7 -0
  48. package/dist/system/define-colors.js +7 -0
  49. package/dist/system/flatten-colors.d.ts +11 -0
  50. package/dist/system/flatten-colors.js +26 -0
  51. package/dist/system/index.d.ts +8 -14
  52. package/dist/system/index.js +6 -13
  53. package/dist/system/merge-colors.d.ts +12 -0
  54. package/dist/system/merge-colors.js +30 -0
  55. package/dist/system/types.d.ts +15 -53
  56. package/dist/system/use-theme.d.ts +3 -23
  57. package/dist/system/use-theme.js +2 -21
  58. package/dist/utils/extractProps.js +34 -0
  59. package/package.json +16 -20
  60. package/dist/system/defaults/control-heights.d.ts +0 -16
  61. package/dist/system/defaults/control-heights.js +0 -11
  62. package/dist/system/defaults/focus-rings.d.ts +0 -10
  63. package/dist/system/defaults/focus-rings.js +0 -7
  64. package/dist/system/defaults/font-sizes.d.ts +0 -13
  65. package/dist/system/defaults/font-sizes.js +0 -10
  66. package/dist/system/defaults/fonts.d.ts +0 -10
  67. package/dist/system/defaults/fonts.js +0 -7
  68. package/dist/system/defaults/index.d.ts +0 -422
  69. package/dist/system/defaults/index.js +0 -28
  70. package/dist/system/defaults/radii.d.ts +0 -40
  71. package/dist/system/defaults/radii.js +0 -19
  72. package/dist/system/defaults/shadows.d.ts +0 -31
  73. package/dist/system/defaults/shadows.js +0 -16
  74. package/dist/system/defaults/spacing.d.ts +0 -112
  75. package/dist/system/defaults/spacing.js +0 -43
  76. package/dist/system/define-tokens.d.ts +0 -7
  77. package/dist/system/define-tokens.js +0 -7
  78. package/dist/system/merge-tokens.d.ts +0 -20
  79. package/dist/system/merge-tokens.js +0 -27
package/README.md CHANGED
@@ -4,19 +4,23 @@ A refined React component library for Omnific.
4
4
 
5
5
  ```tsx
6
6
  import { Button } from '@omnific/atelier';
7
- import { createSystem, defaultConfig, useTheme } from '@omnific/atelier/system';
7
+ import { createSystem, defaultColors, useTheme } from '@omnific/atelier/system';
8
8
  import '@omnific/atelier/styles.css';
9
9
 
10
- const system = createSystem('app', defaultConfig);
10
+ const system = createSystem('app', defaultColors);
11
11
 
12
12
  function App() {
13
13
  useTheme(system); // injects CSS variables onto :root
14
- return <Button variant='primary'>Continue</Button>;
14
+ return (
15
+ <Button color='primary' variant='solid'>
16
+ Continue
17
+ </Button>
18
+ );
15
19
  }
16
20
  ```
17
21
 
18
- Token values come from `createSystem` and are injected at runtime by `useTheme`.
19
- Component layout/theme CSS still ships via `@omnific/atelier/styles.css`.
22
+ Color values come from `createSystem` and are injected at runtime by `useTheme`.
23
+ Spacing, radii, fonts, control heights, shadows, body defaults, border-box sizing and component styles ship via `@omnific/atelier/styles.css`.
20
24
 
21
25
  ## Storybook
22
26
 
package/dist/box/Box.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { BoxProps } from "./types.js";
2
2
  //#region box/Box.d.ts
3
3
  /**
4
- * 通用样式容器,通过 token 直接写入 CSS 属性应用 padding / 背景 / 圆角 / 边框色 / 阴影。
4
+ * 通用样式容器,通过共享静态 class 应用间距、布局与外观。
5
5
  */
6
6
  export declare const Box: (props: BoxProps) => import("react").JSX.Element;
7
7
  //#endregion
package/dist/box/Box.js CHANGED
@@ -1,26 +1,21 @@
1
+ import { getPrefixCls } from "../utils/getPrefixCls.js";
1
2
  import { boxPrefixCls } from "./constants.js";
2
- import { styleFromTokens } from "../system/css-vars.js";
3
+ import { extractProps } from "../utils/extractProps.js";
3
4
  import { clsx } from "clsx";
4
5
  import { jsx } from "react/jsx-runtime";
5
6
  //#region box/Box.tsx
7
+ const borderClassName = getPrefixCls("border");
6
8
  /**
7
- * 通用样式容器,通过 token 直接写入 CSS 属性应用 padding / 背景 / 圆角 / 边框色 / 阴影。
9
+ * 通用样式容器,通过共享静态 class 应用间距、布局与外观。
8
10
  */
9
11
  const Box = (props) => {
10
- const { bg, border = false, borderColor, children, className, p, px, py, ref, rounded, shadow, style, ...rest } = props;
12
+ const { border = false, children, className, ref, scaling, style, ...rest } = extractProps(props);
11
13
  return /* @__PURE__ */ jsx("div", {
12
14
  ...rest,
13
- className: clsx(boxPrefixCls, border && `${boxPrefixCls}-border`, className),
15
+ className: clsx(boxPrefixCls, border && borderClassName, className),
16
+ "data-scaling": scaling,
14
17
  ref,
15
- style: styleFromTokens([
16
- ["padding", p],
17
- ["paddingInline", px],
18
- ["paddingBlock", py],
19
- ["background", bg],
20
- ["borderColor", borderColor],
21
- ["borderRadius", rounded],
22
- ["boxShadow", shadow]
23
- ], style),
18
+ style,
24
19
  children
25
20
  });
26
21
  };
package/dist/box/index.js CHANGED
@@ -1,2 +1 @@
1
- import { Box } from "./Box.js";
2
- export { Box };
1
+ export { Box } from "./Box.js";
@@ -1,43 +1,19 @@
1
- import { ColorToken, RadiiToken, ShadowToken, SpacingToken } from "../system/defaults/index.js";
2
- import "../system/index.js";
1
+ import { AtelierProps } from "../props/index.js";
2
+ import { ScalingValue } from "../props/scaling.props.js";
3
3
  import { ComponentPropsWithRef } from "react";
4
4
  //#region box/types.d.ts
5
5
  /**
6
- * Box 自有样式属性。
6
+ * Box 组件自有样式属性。
7
7
  */
8
- export type BoxOwnProps = {
9
- /**
10
- * 内边距,对应 `padding`。
11
- */
12
- p?: SpacingToken;
13
- /**
14
- * 水平内边距,对应 `padding-inline`。
15
- */
16
- px?: SpacingToken;
17
- /**
18
- * 垂直内边距,对应 `padding-block`。
19
- */
20
- py?: SpacingToken;
21
- /**
22
- * 背景色语义 token。
23
- */
24
- bg?: ColorToken;
25
- /**
26
- * 圆角预设。
27
- */
28
- rounded?: RadiiToken;
8
+ export type BoxOwnProps = AtelierProps & {
29
9
  /**
30
10
  * 是否显示默认 1px solid 边框。
31
11
  */
32
12
  border?: boolean;
33
13
  /**
34
- * 边框颜色语义 token。
35
- */
36
- borderColor?: ColorToken;
37
- /**
38
- * 阴影预设。
14
+ * 调整结构 token 的缩放比例。
39
15
  */
40
- shadow?: ShadowToken;
16
+ scaling?: ScalingValue;
41
17
  };
42
18
  /**
43
19
  * 通用样式容器属性。
@@ -8,10 +8,10 @@ import { jsx, jsxs } from "react/jsx-runtime";
8
8
  * 通用按钮。
9
9
  */
10
10
  const Button = (props) => {
11
- const { block = false, children, className, disabled, icon, loading = false, onClick, ref, shape = "default", size = "default", type = "button", variant = "secondary", ...rest } = props;
11
+ const { block = false, children, className, color = "default", disabled, icon, loading = false, onClick, ref, shape = "default", size = "default", type = "button", variant = "outlined", ...rest } = props;
12
12
  const hasChildren = hasValue(children);
13
13
  const isIconOnly = isNil(children) && (hasValue(icon) || loading);
14
- const classes = clsx(buttonPrefixCls, `${buttonPrefixCls}-${variant}`, `${buttonPrefixCls}-size-${size}`, {
14
+ const classes = clsx(buttonPrefixCls, `${buttonPrefixCls}-variant-${variant}`, `${buttonPrefixCls}-size-${size}`, {
15
15
  [`${buttonPrefixCls}-shape-${shape}`]: shape !== "default",
16
16
  [`${buttonPrefixCls}-icon-only`]: isIconOnly,
17
17
  [`${buttonPrefixCls}-block`]: block,
@@ -32,6 +32,7 @@ const Button = (props) => {
32
32
  ...rest,
33
33
  "aria-busy": loading || void 0,
34
34
  className: classes,
35
+ "data-color": color,
35
36
  disabled,
36
37
  onClick: handleClick,
37
38
  ref,
@@ -1,3 +1,3 @@
1
- import { ButtonProps, ButtonShape, ButtonVariant } from "./types.js";
1
+ import { ButtonColor, ButtonProps, ButtonShape, ButtonVariant } from "./types.js";
2
2
  import { Button } from "./Button.js";
3
- export { Button, type ButtonProps, type ButtonShape, type ButtonVariant };
3
+ export { Button, type ButtonColor, type ButtonProps, type ButtonShape, type ButtonVariant };
@@ -1,2 +1 @@
1
- import { Button } from "./Button.js";
2
- export { Button };
1
+ export { Button } from "./Button.js";
@@ -2,19 +2,29 @@ import { ComponentSize } from "../types.js";
2
2
  import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
3
3
  //#region button/types.d.ts
4
4
  /**
5
- * 按钮形状。
5
+ * 按钮颜色角色。
6
6
  */
7
- export type ButtonShape = 'default' | 'circle' | 'round';
7
+ export type ButtonColor = 'default' | 'primary' | 'danger';
8
+ /**
9
+ * 按钮形态。
10
+ */
11
+ export type ButtonVariant = 'solid' | 'outlined' | 'dashed';
8
12
  /**
9
- * 按钮视觉变体。危险操作用 `danger`,不再与其他变体叠加。
13
+ * 按钮形状。
10
14
  */
11
- export type ButtonVariant = 'primary' | 'secondary' | 'dashed' | 'outline' | 'danger';
15
+ export type ButtonShape = 'default' | 'circle' | 'round';
12
16
  /**
13
17
  * 按钮属性。
14
18
  *
15
19
  * 使用 `interface` 扩展原生 button props,便于 Storybook Docgen 推断 Controls。
16
20
  */
17
21
  export interface ButtonProps extends ComponentPropsWithRef<'button'> {
22
+ /**
23
+ * 设置按钮颜色角色。
24
+ *
25
+ * 省略时使用 `default`。
26
+ */
27
+ color?: ButtonColor;
18
28
  /**
19
29
  * 将按钮宽度调整为父容器宽度。
20
30
  */
@@ -36,7 +46,7 @@ export interface ButtonProps extends ComponentPropsWithRef<'button'> {
36
46
  */
37
47
  size?: ComponentSize;
38
48
  /**
39
- * 设置按钮视觉变体。
49
+ * 设置按钮形态。
40
50
  */
41
51
  variant?: ButtonVariant;
42
52
  }
@@ -0,0 +1,10 @@
1
+ //#region props/display.props.d.ts
2
+ /**
3
+ * Atelier display 的静态值。
4
+ */
5
+ export declare const displayValues: readonly ["none", "inline", "inline-block", "block", "flex", "inline-flex", "contents"];
6
+ /**
7
+ * Atelier display 值。
8
+ */
9
+ export type DisplayValue = (typeof displayValues)[number];
10
+ //#endregion
@@ -0,0 +1,15 @@
1
+ //#region props/display.props.ts
2
+ /**
3
+ * Atelier display 的静态值。
4
+ */
5
+ const displayValues = [
6
+ "none",
7
+ "inline",
8
+ "inline-block",
9
+ "block",
10
+ "flex",
11
+ "inline-flex",
12
+ "contents"
13
+ ];
14
+ //#endregion
15
+ export { displayValues };
@@ -0,0 +1,58 @@
1
+ //#region props/flex.props.d.ts
2
+ /**
3
+ * Atelier flex-basis 的静态值。
4
+ */
5
+ export declare const flexBasisValues: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "50%", "100%", "auto", "content", "fit-content", "min-content", "max-content"];
6
+ /**
7
+ * Atelier flex-basis 值。
8
+ */
9
+ export type FlexBasisValue = (typeof flexBasisValues)[number];
10
+ /**
11
+ * Atelier flex-grow 的静态值。
12
+ */
13
+ export declare const flexGrowValues: readonly ["0", "1"];
14
+ /**
15
+ * Atelier flex-grow 值。
16
+ */
17
+ export type FlexGrowValue = (typeof flexGrowValues)[number];
18
+ /**
19
+ * Atelier flex-shrink 的静态值。
20
+ */
21
+ export declare const flexShrinkValues: readonly ["0", "1"];
22
+ /**
23
+ * Atelier flex-shrink 值。
24
+ */
25
+ export type FlexShrinkValue = (typeof flexShrinkValues)[number];
26
+ /**
27
+ * Atelier flex-direction 的静态值。
28
+ */
29
+ export declare const flexDirectionValues: readonly ["row", "row-reverse", "column", "column-reverse"];
30
+ /**
31
+ * Atelier flex-direction 值。
32
+ */
33
+ export type FlexDirectionValue = (typeof flexDirectionValues)[number];
34
+ /**
35
+ * Atelier flex-wrap 的静态值。
36
+ */
37
+ export declare const flexWrapValues: readonly ["nowrap", "wrap", "wrap-reverse"];
38
+ /**
39
+ * Atelier flex-wrap 值。
40
+ */
41
+ export type FlexWrapValue = (typeof flexWrapValues)[number];
42
+ /**
43
+ * Atelier align-items 与 align-self 的静态值。
44
+ */
45
+ export declare const alignValues: readonly ["start", "center", "end", "baseline", "stretch"];
46
+ /**
47
+ * Atelier align-items 与 align-self 值。
48
+ */
49
+ export type AlignValue = (typeof alignValues)[number];
50
+ /**
51
+ * Atelier align-content 的静态值。
52
+ */
53
+ export declare const alignContentValues: readonly ["start", "center", "end", "space-between", "space-around", "space-evenly", "stretch"];
54
+ /**
55
+ * Atelier align-content 值。
56
+ */
57
+ export type AlignContentValue = (typeof alignContentValues)[number];
58
+ //#endregion
@@ -0,0 +1,72 @@
1
+ //#region props/flex.props.ts
2
+ /**
3
+ * Atelier flex-basis 的静态值。
4
+ */
5
+ const flexBasisValues = [
6
+ "0",
7
+ "1",
8
+ "2",
9
+ "3",
10
+ "4",
11
+ "5",
12
+ "6",
13
+ "7",
14
+ "8",
15
+ "9",
16
+ "50%",
17
+ "100%",
18
+ "auto",
19
+ "content",
20
+ "fit-content",
21
+ "min-content",
22
+ "max-content"
23
+ ];
24
+ /**
25
+ * Atelier flex-grow 的静态值。
26
+ */
27
+ const flexGrowValues = ["0", "1"];
28
+ /**
29
+ * Atelier flex-shrink 的静态值。
30
+ */
31
+ const flexShrinkValues = ["0", "1"];
32
+ /**
33
+ * Atelier flex-direction 的静态值。
34
+ */
35
+ const flexDirectionValues = [
36
+ "row",
37
+ "row-reverse",
38
+ "column",
39
+ "column-reverse"
40
+ ];
41
+ /**
42
+ * Atelier flex-wrap 的静态值。
43
+ */
44
+ const flexWrapValues = [
45
+ "nowrap",
46
+ "wrap",
47
+ "wrap-reverse"
48
+ ];
49
+ /**
50
+ * Atelier align-items 与 align-self 的静态值。
51
+ */
52
+ const alignValues = [
53
+ "start",
54
+ "center",
55
+ "end",
56
+ "baseline",
57
+ "stretch"
58
+ ];
59
+ /**
60
+ * Atelier align-content 的静态值。
61
+ */
62
+ const alignContentValues = [
63
+ "start",
64
+ "center",
65
+ "end",
66
+ "space-between",
67
+ "space-around",
68
+ "space-evenly",
69
+ "stretch"
70
+ ];
71
+ //#endregion
72
+ export { alignContentValues, alignValues, flexBasisValues, flexDirectionValues, flexGrowValues, flexShrinkValues, flexWrapValues };
@@ -0,0 +1,10 @@
1
+ //#region props/gap.props.d.ts
2
+ /**
3
+ * Atelier gap 的静态刻度。
4
+ */
5
+ export declare const gapValues: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
6
+ /**
7
+ * Atelier gap、column-gap 与 row-gap 值。
8
+ */
9
+ export type GapValue = (typeof gapValues)[number];
10
+ //#endregion
@@ -0,0 +1,18 @@
1
+ //#region props/gap.props.ts
2
+ /**
3
+ * Atelier gap 的静态刻度。
4
+ */
5
+ const gapValues = [
6
+ "0",
7
+ "1",
8
+ "2",
9
+ "3",
10
+ "4",
11
+ "5",
12
+ "6",
13
+ "7",
14
+ "8",
15
+ "9"
16
+ ];
17
+ //#endregion
18
+ export { gapValues };
@@ -0,0 +1,10 @@
1
+ //#region props/height.props.d.ts
2
+ /**
3
+ * Atelier height 的静态刻度、百分比、视口单位与关键字值。
4
+ */
5
+ export declare const heightValues: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "50%", "75%", "100%", "100vh", "100dvh", "auto", "min-content", "max-content", "fit-content"];
6
+ /**
7
+ * Atelier height 值。
8
+ */
9
+ export type HeightValue = (typeof heightValues)[number];
10
+ //#endregion
@@ -0,0 +1,27 @@
1
+ //#region props/height.props.ts
2
+ /**
3
+ * Atelier height 的静态刻度、百分比、视口单位与关键字值。
4
+ */
5
+ const heightValues = [
6
+ "0",
7
+ "1",
8
+ "2",
9
+ "3",
10
+ "4",
11
+ "5",
12
+ "6",
13
+ "7",
14
+ "8",
15
+ "9",
16
+ "50%",
17
+ "75%",
18
+ "100%",
19
+ "100vh",
20
+ "100dvh",
21
+ "auto",
22
+ "min-content",
23
+ "max-content",
24
+ "fit-content"
25
+ ];
26
+ //#endregion
27
+ export { heightValues };
@@ -0,0 +1,95 @@
1
+ import { DisplayValue } from "./display.props.js";
2
+ import { AlignContentValue, AlignValue, FlexBasisValue, FlexDirectionValue, FlexGrowValue, FlexShrinkValue, FlexWrapValue } from "./flex.props.js";
3
+ import { GapValue } from "./gap.props.js";
4
+ import { HeightValue } from "./height.props.js";
5
+ import { ContentDistributionValue, JustifyItemsValue, JustifySelfValue, PlaceItemsValue } from "./justify.props.js";
6
+ import { MarginValue } from "./margin.props.js";
7
+ import { OverflowValue } from "./overflow.props.js";
8
+ import { PaddingValue } from "./padding.props.js";
9
+ import { PositionEdgeValue, PositionValue } from "./position.props.js";
10
+ import { RadiusValue } from "./radius.props.js";
11
+ import { ShadowValue } from "./shadow.props.js";
12
+ import { WidthValue } from "./width.props.js";
13
+ import { DefaultColorKey } from "../system/defaults/color-keys.gen.js";
14
+ import { CSSProperties } from "react";
15
+ //#region props/index.d.ts
16
+ /**
17
+ * Atelier class 类型 props。
18
+ */
19
+ export type AtelierClassProps = {
20
+ p?: PaddingValue;
21
+ px?: PaddingValue;
22
+ py?: PaddingValue;
23
+ pt?: PaddingValue;
24
+ pr?: PaddingValue;
25
+ pb?: PaddingValue;
26
+ pl?: PaddingValue;
27
+ m?: MarginValue;
28
+ mx?: MarginValue;
29
+ my?: MarginValue;
30
+ mt?: MarginValue;
31
+ mr?: MarginValue;
32
+ mb?: MarginValue;
33
+ ml?: MarginValue;
34
+ display?: DisplayValue;
35
+ position?: PositionValue;
36
+ inset?: PositionEdgeValue;
37
+ top?: PositionEdgeValue;
38
+ right?: PositionEdgeValue;
39
+ bottom?: PositionEdgeValue;
40
+ left?: PositionEdgeValue;
41
+ overflow?: OverflowValue;
42
+ overflowX?: OverflowValue;
43
+ overflowY?: OverflowValue;
44
+ width?: WidthValue;
45
+ minWidth?: WidthValue;
46
+ maxWidth?: WidthValue;
47
+ height?: HeightValue;
48
+ minHeight?: HeightValue;
49
+ maxHeight?: HeightValue;
50
+ flexBasis?: FlexBasisValue;
51
+ flexGrow?: FlexGrowValue;
52
+ flexShrink?: FlexShrinkValue;
53
+ flexDirection?: FlexDirectionValue;
54
+ flexWrap?: FlexWrapValue;
55
+ alignItems?: AlignValue;
56
+ alignContent?: AlignContentValue;
57
+ alignSelf?: AlignValue;
58
+ justifyItems?: JustifyItemsValue;
59
+ justifyContent?: ContentDistributionValue;
60
+ justifySelf?: JustifySelfValue;
61
+ placeItems?: PlaceItemsValue;
62
+ placeContent?: ContentDistributionValue;
63
+ gap?: GapValue;
64
+ columnGap?: GapValue;
65
+ rowGap?: GapValue;
66
+ radius?: RadiusValue;
67
+ shadow?: ShadowValue;
68
+ };
69
+ /**
70
+ * Atelier style 类型 props。
71
+ */
72
+ export type AtelierStyleProps = {
73
+ bg?: DefaultColorKey;
74
+ borderColor?: DefaultColorKey;
75
+ };
76
+ /**
77
+ * Atelier 全量公共 props 类型。
78
+ */
79
+ export type AtelierProps = AtelierClassProps & AtelierStyleProps;
80
+ /**
81
+ * 按需生成单个 prop 与值对应的 Atelier 类名,并只缓存实际用到的那一条。
82
+ *
83
+ * 非 class prop 或非法值返回 `undefined`,由调用方继续透传。
84
+ */
85
+ export declare const getAtelierClassName: (propName: keyof AtelierClassProps, value: string) => string | undefined;
86
+ /**
87
+ * Atelier 全量 style 映射。
88
+ */
89
+ export declare const atelierStyleMaps: {
90
+ bg: (value: string) => {
91
+ background: string;
92
+ };
93
+ borderColor: (value: string) => CSSProperties;
94
+ };
95
+ //#endregion