@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.
- package/README.md +9 -5
- package/dist/box/Box.d.ts +1 -1
- package/dist/box/Box.js +8 -13
- package/dist/box/index.js +1 -2
- package/dist/box/types.d.ts +6 -30
- package/dist/button/Button.js +3 -2
- package/dist/button/index.d.ts +2 -2
- package/dist/button/index.js +1 -2
- package/dist/button/types.d.ts +15 -5
- package/dist/props/display.props.d.ts +10 -0
- package/dist/props/display.props.js +15 -0
- package/dist/props/flex.props.d.ts +58 -0
- package/dist/props/flex.props.js +72 -0
- package/dist/props/gap.props.d.ts +10 -0
- package/dist/props/gap.props.js +18 -0
- package/dist/props/height.props.d.ts +10 -0
- package/dist/props/height.props.js +27 -0
- package/dist/props/index.d.ts +95 -0
- package/dist/props/index.js +158 -0
- package/dist/props/justify.props.d.ts +34 -0
- package/dist/props/justify.props.js +43 -0
- package/dist/props/margin.props.d.ts +10 -0
- package/dist/props/margin.props.js +27 -0
- package/dist/props/overflow.props.d.ts +10 -0
- package/dist/props/overflow.props.js +13 -0
- package/dist/props/padding.props.d.ts +10 -0
- package/dist/props/padding.props.js +18 -0
- package/dist/props/position.props.d.ts +18 -0
- package/dist/props/position.props.js +38 -0
- package/dist/props/radius.props.d.ts +10 -0
- package/dist/props/radius.props.js +19 -0
- package/dist/props/scaling.props.d.ts +10 -0
- package/dist/props/shadow.props.d.ts +10 -0
- package/dist/props/shadow.props.js +16 -0
- package/dist/props/width.props.d.ts +10 -0
- package/dist/props/width.props.js +26 -0
- package/dist/styles.css +2479 -69
- package/dist/system/create-system.d.ts +9 -4
- package/dist/system/create-system.js +9 -8
- package/dist/system/css-vars.d.ts +5 -40
- package/dist/system/css-vars.js +5 -61
- package/dist/system/default-system.d.ts +7 -3
- package/dist/system/default-system.js +3 -3
- package/dist/system/defaults/color-keys.gen.d.ts +3 -0
- package/dist/system/defaults/colors.d.ts +92 -169
- package/dist/system/defaults/colors.js +101 -63
- package/dist/system/define-colors.d.ts +7 -0
- package/dist/system/define-colors.js +7 -0
- package/dist/system/flatten-colors.d.ts +11 -0
- package/dist/system/flatten-colors.js +26 -0
- package/dist/system/index.d.ts +8 -14
- package/dist/system/index.js +6 -13
- package/dist/system/merge-colors.d.ts +12 -0
- package/dist/system/merge-colors.js +30 -0
- package/dist/system/types.d.ts +15 -53
- package/dist/system/use-theme.d.ts +3 -23
- package/dist/system/use-theme.js +2 -21
- package/dist/utils/extractProps.js +34 -0
- package/package.json +16 -20
- package/dist/system/defaults/control-heights.d.ts +0 -16
- package/dist/system/defaults/control-heights.js +0 -11
- package/dist/system/defaults/focus-rings.d.ts +0 -10
- package/dist/system/defaults/focus-rings.js +0 -7
- package/dist/system/defaults/font-sizes.d.ts +0 -13
- package/dist/system/defaults/font-sizes.js +0 -10
- package/dist/system/defaults/fonts.d.ts +0 -10
- package/dist/system/defaults/fonts.js +0 -7
- package/dist/system/defaults/index.d.ts +0 -422
- package/dist/system/defaults/index.js +0 -28
- package/dist/system/defaults/radii.d.ts +0 -40
- package/dist/system/defaults/radii.js +0 -19
- package/dist/system/defaults/shadows.d.ts +0 -31
- package/dist/system/defaults/shadows.js +0 -16
- package/dist/system/defaults/spacing.d.ts +0 -112
- package/dist/system/defaults/spacing.js +0 -43
- package/dist/system/define-tokens.d.ts +0 -7
- package/dist/system/define-tokens.js +0 -7
- package/dist/system/merge-tokens.d.ts +0 -20
- package/dist/system/merge-tokens.js +0 -27
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { getPrefixCls } from "../utils/getPrefixCls.js";
|
|
2
|
+
import { displayValues } from "./display.props.js";
|
|
3
|
+
import { alignContentValues, alignValues, flexBasisValues, flexDirectionValues, flexGrowValues, flexShrinkValues, flexWrapValues } from "./flex.props.js";
|
|
4
|
+
import { gapValues } from "./gap.props.js";
|
|
5
|
+
import { heightValues } from "./height.props.js";
|
|
6
|
+
import { contentDistributionValues, justifyItemsValues, justifySelfValues, placeItemsValues } from "./justify.props.js";
|
|
7
|
+
import { marginValues } from "./margin.props.js";
|
|
8
|
+
import { overflowValues } from "./overflow.props.js";
|
|
9
|
+
import { paddingValues } from "./padding.props.js";
|
|
10
|
+
import { positionEdgeValues, positionValues } from "./position.props.js";
|
|
11
|
+
import { radiusValues } from "./radius.props.js";
|
|
12
|
+
import { shadowValues } from "./shadow.props.js";
|
|
13
|
+
import { widthValues } from "./width.props.js";
|
|
14
|
+
import { toColorVarName } from "../system/css-vars.js";
|
|
15
|
+
import { hasValue, isNil, kebabCase } from "@omnific/utils";
|
|
16
|
+
//#region props/index.ts
|
|
17
|
+
const parseSizingValue = (value) => value.endsWith("%") ? value.slice(0, -1) : value;
|
|
18
|
+
/**
|
|
19
|
+
* Atelier class props 的静态配置:只声明值域与命名规则,不预先展开成 class 名。
|
|
20
|
+
*/
|
|
21
|
+
const classPropConfigs = {
|
|
22
|
+
p: { values: paddingValues },
|
|
23
|
+
px: { values: paddingValues },
|
|
24
|
+
py: { values: paddingValues },
|
|
25
|
+
pt: { values: paddingValues },
|
|
26
|
+
pr: { values: paddingValues },
|
|
27
|
+
pb: { values: paddingValues },
|
|
28
|
+
pl: { values: paddingValues },
|
|
29
|
+
m: {
|
|
30
|
+
values: marginValues,
|
|
31
|
+
allowNegative: true
|
|
32
|
+
},
|
|
33
|
+
mx: {
|
|
34
|
+
values: marginValues,
|
|
35
|
+
allowNegative: true
|
|
36
|
+
},
|
|
37
|
+
my: {
|
|
38
|
+
values: marginValues,
|
|
39
|
+
allowNegative: true
|
|
40
|
+
},
|
|
41
|
+
mt: {
|
|
42
|
+
values: marginValues,
|
|
43
|
+
allowNegative: true
|
|
44
|
+
},
|
|
45
|
+
mr: {
|
|
46
|
+
values: marginValues,
|
|
47
|
+
allowNegative: true
|
|
48
|
+
},
|
|
49
|
+
mb: {
|
|
50
|
+
values: marginValues,
|
|
51
|
+
allowNegative: true
|
|
52
|
+
},
|
|
53
|
+
ml: {
|
|
54
|
+
values: marginValues,
|
|
55
|
+
allowNegative: true
|
|
56
|
+
},
|
|
57
|
+
display: { values: displayValues },
|
|
58
|
+
position: { values: positionValues },
|
|
59
|
+
inset: {
|
|
60
|
+
values: positionEdgeValues,
|
|
61
|
+
allowNegative: true
|
|
62
|
+
},
|
|
63
|
+
top: {
|
|
64
|
+
values: positionEdgeValues,
|
|
65
|
+
allowNegative: true
|
|
66
|
+
},
|
|
67
|
+
right: {
|
|
68
|
+
values: positionEdgeValues,
|
|
69
|
+
allowNegative: true
|
|
70
|
+
},
|
|
71
|
+
bottom: {
|
|
72
|
+
values: positionEdgeValues,
|
|
73
|
+
allowNegative: true
|
|
74
|
+
},
|
|
75
|
+
left: {
|
|
76
|
+
values: positionEdgeValues,
|
|
77
|
+
allowNegative: true
|
|
78
|
+
},
|
|
79
|
+
overflow: { values: overflowValues },
|
|
80
|
+
overflowX: { values: overflowValues },
|
|
81
|
+
overflowY: { values: overflowValues },
|
|
82
|
+
width: {
|
|
83
|
+
values: widthValues,
|
|
84
|
+
parseValue: parseSizingValue
|
|
85
|
+
},
|
|
86
|
+
minWidth: {
|
|
87
|
+
values: widthValues,
|
|
88
|
+
parseValue: parseSizingValue
|
|
89
|
+
},
|
|
90
|
+
maxWidth: {
|
|
91
|
+
values: widthValues,
|
|
92
|
+
parseValue: parseSizingValue
|
|
93
|
+
},
|
|
94
|
+
height: {
|
|
95
|
+
values: heightValues,
|
|
96
|
+
parseValue: parseSizingValue
|
|
97
|
+
},
|
|
98
|
+
minHeight: {
|
|
99
|
+
values: heightValues,
|
|
100
|
+
parseValue: parseSizingValue
|
|
101
|
+
},
|
|
102
|
+
maxHeight: {
|
|
103
|
+
values: heightValues,
|
|
104
|
+
parseValue: parseSizingValue
|
|
105
|
+
},
|
|
106
|
+
flexBasis: {
|
|
107
|
+
values: flexBasisValues,
|
|
108
|
+
parseValue: parseSizingValue
|
|
109
|
+
},
|
|
110
|
+
flexGrow: { values: flexGrowValues },
|
|
111
|
+
flexShrink: { values: flexShrinkValues },
|
|
112
|
+
flexDirection: { values: flexDirectionValues },
|
|
113
|
+
flexWrap: { values: flexWrapValues },
|
|
114
|
+
alignItems: { values: alignValues },
|
|
115
|
+
alignContent: { values: alignContentValues },
|
|
116
|
+
alignSelf: { values: alignValues },
|
|
117
|
+
justifyItems: { values: justifyItemsValues },
|
|
118
|
+
justifyContent: { values: contentDistributionValues },
|
|
119
|
+
justifySelf: { values: justifySelfValues },
|
|
120
|
+
placeItems: { values: placeItemsValues },
|
|
121
|
+
placeContent: { values: contentDistributionValues },
|
|
122
|
+
gap: { values: gapValues },
|
|
123
|
+
columnGap: { values: gapValues },
|
|
124
|
+
rowGap: { values: gapValues },
|
|
125
|
+
radius: { values: radiusValues },
|
|
126
|
+
shadow: { values: shadowValues }
|
|
127
|
+
};
|
|
128
|
+
const classCache = /* @__PURE__ */ new Map();
|
|
129
|
+
/**
|
|
130
|
+
* 按需生成单个 prop 与值对应的 Atelier 类名,并只缓存实际用到的那一条。
|
|
131
|
+
*
|
|
132
|
+
* 非 class prop 或非法值返回 `undefined`,由调用方继续透传。
|
|
133
|
+
*/
|
|
134
|
+
const getAtelierClassName = (propName, value) => {
|
|
135
|
+
const config = Object.hasOwn(classPropConfigs, propName) ? classPropConfigs[propName] : void 0;
|
|
136
|
+
if (isNil(config)) return void 0;
|
|
137
|
+
const cachedClassNames = classCache.get(propName);
|
|
138
|
+
const cachedClassName = cachedClassNames?.get(value);
|
|
139
|
+
if (hasValue(cachedClassName)) return cachedClassName;
|
|
140
|
+
const { allowNegative = false, parseValue, values } = config;
|
|
141
|
+
if (!values.includes(value)) return void 0;
|
|
142
|
+
const isNegative = allowNegative && value.startsWith("-");
|
|
143
|
+
const valueWithoutSign = isNegative ? value.slice(1) : value;
|
|
144
|
+
const parsedValue = parseValue ? parseValue(valueWithoutSign) : valueWithoutSign;
|
|
145
|
+
const className = `${isNegative ? "-" : ""}${getPrefixCls(kebabCase(propName))}-${parsedValue}`;
|
|
146
|
+
if (hasValue(cachedClassNames)) cachedClassNames.set(value, className);
|
|
147
|
+
else classCache.set(propName, /* @__PURE__ */ new Map([[value, className]]));
|
|
148
|
+
return className;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Atelier 全量 style 映射。
|
|
152
|
+
*/
|
|
153
|
+
const atelierStyleMaps = {
|
|
154
|
+
bg: (value) => ({ background: `var(${toColorVarName(value)})` }),
|
|
155
|
+
borderColor: (value) => ({ "--color-border": `var(${toColorVarName(value)})` })
|
|
156
|
+
};
|
|
157
|
+
//#endregion
|
|
158
|
+
export { atelierStyleMaps, getAtelierClassName };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region props/justify.props.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Atelier justify-items 的静态值。
|
|
4
|
+
*/
|
|
5
|
+
export declare const justifyItemsValues: readonly ["start", "center", "end", "stretch"];
|
|
6
|
+
/**
|
|
7
|
+
* Atelier justify-items 值。
|
|
8
|
+
*/
|
|
9
|
+
export type JustifyItemsValue = (typeof justifyItemsValues)[number];
|
|
10
|
+
/**
|
|
11
|
+
* Atelier justify-content 与 place-content 的静态值。
|
|
12
|
+
*/
|
|
13
|
+
export declare const contentDistributionValues: readonly ["start", "center", "end", "space-between", "space-around", "space-evenly", "stretch"];
|
|
14
|
+
/**
|
|
15
|
+
* Atelier justify-content 与 place-content 值。
|
|
16
|
+
*/
|
|
17
|
+
export type ContentDistributionValue = (typeof contentDistributionValues)[number];
|
|
18
|
+
/**
|
|
19
|
+
* Atelier justify-self 的静态值。
|
|
20
|
+
*/
|
|
21
|
+
export declare const justifySelfValues: readonly ["start", "center", "end", "baseline", "stretch"];
|
|
22
|
+
/**
|
|
23
|
+
* Atelier justify-self 值。
|
|
24
|
+
*/
|
|
25
|
+
export type JustifySelfValue = (typeof justifySelfValues)[number];
|
|
26
|
+
/**
|
|
27
|
+
* Atelier place-items 的静态值。
|
|
28
|
+
*/
|
|
29
|
+
export declare const placeItemsValues: readonly ["start", "center", "end", "stretch"];
|
|
30
|
+
/**
|
|
31
|
+
* Atelier place-items 值。
|
|
32
|
+
*/
|
|
33
|
+
export type PlaceItemsValue = (typeof placeItemsValues)[number];
|
|
34
|
+
//#endregion
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
//#region props/justify.props.ts
|
|
2
|
+
/**
|
|
3
|
+
* Atelier justify-items 的静态值。
|
|
4
|
+
*/
|
|
5
|
+
const justifyItemsValues = [
|
|
6
|
+
"start",
|
|
7
|
+
"center",
|
|
8
|
+
"end",
|
|
9
|
+
"stretch"
|
|
10
|
+
];
|
|
11
|
+
/**
|
|
12
|
+
* Atelier justify-content 与 place-content 的静态值。
|
|
13
|
+
*/
|
|
14
|
+
const contentDistributionValues = [
|
|
15
|
+
"start",
|
|
16
|
+
"center",
|
|
17
|
+
"end",
|
|
18
|
+
"space-between",
|
|
19
|
+
"space-around",
|
|
20
|
+
"space-evenly",
|
|
21
|
+
"stretch"
|
|
22
|
+
];
|
|
23
|
+
/**
|
|
24
|
+
* Atelier justify-self 的静态值。
|
|
25
|
+
*/
|
|
26
|
+
const justifySelfValues = [
|
|
27
|
+
"start",
|
|
28
|
+
"center",
|
|
29
|
+
"end",
|
|
30
|
+
"baseline",
|
|
31
|
+
"stretch"
|
|
32
|
+
];
|
|
33
|
+
/**
|
|
34
|
+
* Atelier place-items 的静态值。
|
|
35
|
+
*/
|
|
36
|
+
const placeItemsValues = [
|
|
37
|
+
"start",
|
|
38
|
+
"center",
|
|
39
|
+
"end",
|
|
40
|
+
"stretch"
|
|
41
|
+
];
|
|
42
|
+
//#endregion
|
|
43
|
+
export { contentDistributionValues, justifyItemsValues, justifySelfValues, placeItemsValues };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region props/margin.props.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Atelier margin 的静态刻度,包含负值。
|
|
4
|
+
*/
|
|
5
|
+
export declare const marginValues: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9"];
|
|
6
|
+
/**
|
|
7
|
+
* Atelier margin 值。
|
|
8
|
+
*/
|
|
9
|
+
export type MarginValue = (typeof marginValues)[number];
|
|
10
|
+
//#endregion
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region props/margin.props.ts
|
|
2
|
+
/**
|
|
3
|
+
* Atelier margin 的静态刻度,包含负值。
|
|
4
|
+
*/
|
|
5
|
+
const marginValues = [
|
|
6
|
+
"0",
|
|
7
|
+
"1",
|
|
8
|
+
"2",
|
|
9
|
+
"3",
|
|
10
|
+
"4",
|
|
11
|
+
"5",
|
|
12
|
+
"6",
|
|
13
|
+
"7",
|
|
14
|
+
"8",
|
|
15
|
+
"9",
|
|
16
|
+
"-1",
|
|
17
|
+
"-2",
|
|
18
|
+
"-3",
|
|
19
|
+
"-4",
|
|
20
|
+
"-5",
|
|
21
|
+
"-6",
|
|
22
|
+
"-7",
|
|
23
|
+
"-8",
|
|
24
|
+
"-9"
|
|
25
|
+
];
|
|
26
|
+
//#endregion
|
|
27
|
+
export { marginValues };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region props/overflow.props.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Atelier overflow 的静态值。
|
|
4
|
+
*/
|
|
5
|
+
export declare const overflowValues: readonly ["visible", "hidden", "clip", "scroll", "auto"];
|
|
6
|
+
/**
|
|
7
|
+
* Atelier overflow 值。
|
|
8
|
+
*/
|
|
9
|
+
export type OverflowValue = (typeof overflowValues)[number];
|
|
10
|
+
//#endregion
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region props/padding.props.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Atelier padding 的静态刻度。
|
|
4
|
+
*/
|
|
5
|
+
export declare const paddingValues: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
6
|
+
/**
|
|
7
|
+
* Atelier padding 值。
|
|
8
|
+
*/
|
|
9
|
+
export type PaddingValue = (typeof paddingValues)[number];
|
|
10
|
+
//#endregion
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region props/position.props.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Atelier position 的静态值。
|
|
4
|
+
*/
|
|
5
|
+
export declare const positionValues: readonly ["static", "relative", "absolute", "fixed", "sticky"];
|
|
6
|
+
/**
|
|
7
|
+
* Atelier position 值。
|
|
8
|
+
*/
|
|
9
|
+
export type PositionValue = (typeof positionValues)[number];
|
|
10
|
+
/**
|
|
11
|
+
* Atelier inset / top / right / bottom / left 的静态刻度。
|
|
12
|
+
*/
|
|
13
|
+
export declare const positionEdgeValues: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "auto", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9"];
|
|
14
|
+
/**
|
|
15
|
+
* Atelier inset / top / right / bottom / left 值。
|
|
16
|
+
*/
|
|
17
|
+
export type PositionEdgeValue = (typeof positionEdgeValues)[number];
|
|
18
|
+
//#endregion
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//#region props/position.props.ts
|
|
2
|
+
/**
|
|
3
|
+
* Atelier position 的静态值。
|
|
4
|
+
*/
|
|
5
|
+
const positionValues = [
|
|
6
|
+
"static",
|
|
7
|
+
"relative",
|
|
8
|
+
"absolute",
|
|
9
|
+
"fixed",
|
|
10
|
+
"sticky"
|
|
11
|
+
];
|
|
12
|
+
/**
|
|
13
|
+
* Atelier inset / top / right / bottom / left 的静态刻度。
|
|
14
|
+
*/
|
|
15
|
+
const positionEdgeValues = [
|
|
16
|
+
"0",
|
|
17
|
+
"1",
|
|
18
|
+
"2",
|
|
19
|
+
"3",
|
|
20
|
+
"4",
|
|
21
|
+
"5",
|
|
22
|
+
"6",
|
|
23
|
+
"7",
|
|
24
|
+
"8",
|
|
25
|
+
"9",
|
|
26
|
+
"auto",
|
|
27
|
+
"-1",
|
|
28
|
+
"-2",
|
|
29
|
+
"-3",
|
|
30
|
+
"-4",
|
|
31
|
+
"-5",
|
|
32
|
+
"-6",
|
|
33
|
+
"-7",
|
|
34
|
+
"-8",
|
|
35
|
+
"-9"
|
|
36
|
+
];
|
|
37
|
+
//#endregion
|
|
38
|
+
export { positionEdgeValues, positionValues };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region props/radius.props.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Atelier radius 的静态值。
|
|
4
|
+
*/
|
|
5
|
+
export declare const radiusValues: readonly ["none", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "4xl", "full"];
|
|
6
|
+
/**
|
|
7
|
+
* Atelier radius 值。
|
|
8
|
+
*/
|
|
9
|
+
export type RadiusValue = (typeof radiusValues)[number];
|
|
10
|
+
//#endregion
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region props/radius.props.ts
|
|
2
|
+
/**
|
|
3
|
+
* Atelier radius 的静态值。
|
|
4
|
+
*/
|
|
5
|
+
const radiusValues = [
|
|
6
|
+
"none",
|
|
7
|
+
"2xs",
|
|
8
|
+
"xs",
|
|
9
|
+
"sm",
|
|
10
|
+
"md",
|
|
11
|
+
"lg",
|
|
12
|
+
"xl",
|
|
13
|
+
"2xl",
|
|
14
|
+
"3xl",
|
|
15
|
+
"4xl",
|
|
16
|
+
"full"
|
|
17
|
+
];
|
|
18
|
+
//#endregion
|
|
19
|
+
export { radiusValues };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region props/scaling.props.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Atelier 结构缩放的静态值。
|
|
4
|
+
*/
|
|
5
|
+
export declare const scalingValues: readonly ["90%", "95%", "100%", "105%", "110%"];
|
|
6
|
+
/**
|
|
7
|
+
* Atelier 结构缩放值。
|
|
8
|
+
*/
|
|
9
|
+
export type ScalingValue = (typeof scalingValues)[number];
|
|
10
|
+
//#endregion
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region props/shadow.props.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Atelier shadow 的静态值。
|
|
4
|
+
*/
|
|
5
|
+
export declare const shadowValues: readonly ["xs", "sm", "md", "lg", "xl", "2xl", "inner", "inset"];
|
|
6
|
+
/**
|
|
7
|
+
* Atelier shadow 值。
|
|
8
|
+
*/
|
|
9
|
+
export type ShadowValue = (typeof shadowValues)[number];
|
|
10
|
+
//#endregion
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region props/width.props.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Atelier width 的静态刻度、百分比与关键字值。
|
|
4
|
+
*/
|
|
5
|
+
export declare const widthValues: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "50%", "75%", "100%", "100vw", "auto", "min-content", "max-content", "fit-content"];
|
|
6
|
+
/**
|
|
7
|
+
* Atelier width 值。
|
|
8
|
+
*/
|
|
9
|
+
export type WidthValue = (typeof widthValues)[number];
|
|
10
|
+
//#endregion
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region props/width.props.ts
|
|
2
|
+
/**
|
|
3
|
+
* Atelier width 的静态刻度、百分比与关键字值。
|
|
4
|
+
*/
|
|
5
|
+
const widthValues = [
|
|
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
|
+
"100vw",
|
|
20
|
+
"auto",
|
|
21
|
+
"min-content",
|
|
22
|
+
"max-content",
|
|
23
|
+
"fit-content"
|
|
24
|
+
];
|
|
25
|
+
//#endregion
|
|
26
|
+
export { widthValues };
|