css-in-props 3.4.4 → 3.4.6

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.
@@ -0,0 +1,101 @@
1
+ import { isObject, isString } from "@domql/utils";
2
+ import { emotion } from "@symbo.ls/emotion";
3
+ import { getTimingByKey, getTimingFunction } from "@symbo.ls/scratch";
4
+ const TIMING_FUNCTIONS = ["ease", "linear", "ease-in", "ease-out", "ease-in-out", "step-start", "step-end"];
5
+ const FILL_MODES = ["none", "forwards", "backwards", "both"];
6
+ const DIRECTIONS = ["normal", "reverse", "alternate", "alternate-reverse"];
7
+ const PLAY_STATES = ["running", "paused"];
8
+ const isDuration = (v) => /^[\d.]+m?s$/.test(v);
9
+ const applyAnimationProps = (animation, element) => {
10
+ const { emotion: ctxEmotion } = element.context;
11
+ const { keyframes } = ctxEmotion || emotion;
12
+ if (isObject(animation)) return { animationName: keyframes(animation) };
13
+ const { ANIMATION } = element.context && element.context.designSystem;
14
+ const record = ANIMATION[animation];
15
+ return keyframes(record);
16
+ };
17
+ const parseAnimationShorthand = (val, el) => {
18
+ const { ANIMATION } = el.context && el.context.designSystem || {};
19
+ const tokens = val.split(/\s+/);
20
+ let name = null;
21
+ const durations = [];
22
+ let timingFunction = null;
23
+ let iterationCount = null;
24
+ let direction = null;
25
+ let fillMode = null;
26
+ let playState = null;
27
+ for (const token of tokens) {
28
+ if (ANIMATION && ANIMATION[token]) {
29
+ name = token;
30
+ } else if (isDuration(token)) {
31
+ durations.push(token);
32
+ } else if (TIMING_FUNCTIONS.includes(token) || token.startsWith("cubic-bezier") || token.startsWith("steps(")) {
33
+ timingFunction = token;
34
+ } else if (token === "infinite" || /^\d+$/.test(token)) {
35
+ iterationCount = token === "infinite" ? token : Number(token);
36
+ } else if (DIRECTIONS.includes(token)) {
37
+ direction = token;
38
+ } else if (FILL_MODES.includes(token)) {
39
+ fillMode = token;
40
+ } else if (PLAY_STATES.includes(token)) {
41
+ playState = token;
42
+ } else if (!name) {
43
+ name = token;
44
+ }
45
+ }
46
+ return { name, durations, timingFunction, iterationCount, direction, fillMode, playState };
47
+ };
48
+ const ANIMATION_PROPS = {
49
+ animation: (val, el) => {
50
+ if (isString(val) && val.includes(" ")) {
51
+ const parsed = parseAnimationShorthand(val, el);
52
+ return {
53
+ animationName: applyAnimationProps(parsed.name || val, el),
54
+ animationDuration: parsed.durations[0] || getTimingByKey(el.props.animationDuration || "A").timing,
55
+ animationDelay: parsed.durations[1] || getTimingByKey(el.props.animationDelay || "0s").timing,
56
+ animationTimingFunction: parsed.timingFunction || getTimingFunction(el.props.animationTimingFunction || "ease"),
57
+ animationFillMode: parsed.fillMode || el.props.animationFillMode || "both",
58
+ animationIterationCount: parsed.iterationCount != null ? parsed.iterationCount : el.props.animationIterationCount || 1,
59
+ animationPlayState: parsed.playState || el.props.animationPlayState,
60
+ animationDirection: parsed.direction || el.props.animationDirection
61
+ };
62
+ }
63
+ return {
64
+ animationName: applyAnimationProps(val, el),
65
+ animationDuration: getTimingByKey(el.props.animationDuration || "A").timing,
66
+ animationDelay: getTimingByKey(el.props.animationDelay || "0s").timing,
67
+ animationTimingFunction: getTimingFunction(el.props.animationTimingFunction || "ease"),
68
+ animationFillMode: el.props.animationFillMode || "both",
69
+ animationIterationCount: el.props.animationIterationCount || 1,
70
+ animationPlayState: el.props.animationPlayState,
71
+ animationDirection: el.props.animationDirection
72
+ };
73
+ },
74
+ animationName: (val, el) => ({
75
+ animationName: applyAnimationProps(val, el)
76
+ }),
77
+ animationDuration: (val) => ({
78
+ animationDuration: getTimingByKey(val).timing
79
+ }),
80
+ animationDelay: (val) => ({
81
+ animationDelay: getTimingByKey(val).timing
82
+ }),
83
+ animationTimingFunction: (val) => ({
84
+ animationTimingFunction: getTimingFunction(val)
85
+ }),
86
+ animationIterationCount: (val) => ({
87
+ animationIterationCount: val
88
+ }),
89
+ animationFillMode: (val) => ({
90
+ animationFillMode: val
91
+ }),
92
+ animationPlayState: (val) => ({
93
+ animationPlayState: val
94
+ }),
95
+ animationDirection: (val) => ({
96
+ animationDirection: val
97
+ })
98
+ };
99
+ export {
100
+ ANIMATION_PROPS
101
+ };
@@ -0,0 +1,165 @@
1
+ import { isUndefined, isString } from "@domql/utils";
2
+ import {
3
+ getSpacingBasedOnRatio,
4
+ transformSize,
5
+ transformBorderRadius,
6
+ transformSizeRatio,
7
+ transfromGap
8
+ } from "@symbo.ls/scratch";
9
+ const BLOCK_PROPS = {
10
+ show: (val, el, s, ctx) => !!(ctx.utils.exec(val, el, s) === false) && {
11
+ display: "none !important"
12
+ },
13
+ hide: (val, el, s, ctx) => !!ctx.utils.exec(val, el, s) && {
14
+ display: "none !important"
15
+ },
16
+ height: (val, { props }) => transformSizeRatio("height", val, props),
17
+ width: (val, { props }) => transformSizeRatio("width", val, props),
18
+ boxSizing: (val) => !isUndefined(val) ? { boxSizing: val } : { boxSizing: "border-box" },
19
+ boxSize: (val) => {
20
+ if (!isString(val)) return;
21
+ const [height, width] = val.split(" ");
22
+ return {
23
+ ...transformSize("height", height),
24
+ ...transformSize("width", width || height)
25
+ };
26
+ },
27
+ inlineSize: (val, { props }) => transformSizeRatio("inlineSize", val, props),
28
+ blockSize: (val, { props }) => transformSizeRatio("blockSize", val, props),
29
+ minWidth: (val, { props }) => transformSizeRatio("minWidth", val, props),
30
+ maxWidth: (val, { props }) => transformSizeRatio("maxWidth", val, props),
31
+ widthRange: (val) => {
32
+ if (!isString(val)) return;
33
+ const [minWidth, maxWidth] = val.split(" ");
34
+ return {
35
+ ...transformSize("minWidth", minWidth),
36
+ ...transformSize("maxWidth", maxWidth || minWidth)
37
+ };
38
+ },
39
+ minHeight: (val, { props }) => transformSizeRatio("minHeight", val, props),
40
+ maxHeight: (val, { props }) => transformSizeRatio("maxHeight", val, props),
41
+ heightRange: (val) => {
42
+ if (!isString(val)) return;
43
+ const [minHeight, maxHeight] = val.split(" ");
44
+ return {
45
+ ...transformSize("minHeight", minHeight),
46
+ ...transformSize("maxHeight", maxHeight || minHeight)
47
+ };
48
+ },
49
+ size: (val) => {
50
+ if (!isString(val)) return;
51
+ const [inlineSize, blockSize] = val.split(" ");
52
+ return {
53
+ ...transformSizeRatio("inlineSize", inlineSize),
54
+ ...transformSizeRatio("blockSize", blockSize || inlineSize)
55
+ };
56
+ },
57
+ minBlockSize: (val, { props }) => transformSizeRatio("minBlockSize", val, props),
58
+ minInlineSize: (val, { props }) => transformSizeRatio("minInlineSize", val, props),
59
+ maxBlockSize: (val, { props }) => transformSizeRatio("maxBlockSize", val, props),
60
+ maxInlineSize: (val, { props }) => transformSizeRatio("maxInlineSize", val, props),
61
+ minSize: (val) => {
62
+ if (!isString(val)) return;
63
+ const [minInlineSize, minBlockSize] = val.split(" ");
64
+ return {
65
+ ...transformSize("minInlineSize", minInlineSize),
66
+ ...transformSize("minBlockSize", minBlockSize || minInlineSize)
67
+ };
68
+ },
69
+ maxSize: (val) => {
70
+ if (!isString(val)) return;
71
+ const [maxInlineSize, maxBlockSize] = val.split(" ");
72
+ return {
73
+ ...transformSize("maxInlineSize", maxInlineSize),
74
+ ...transformSize("maxBlockSize", maxBlockSize || maxInlineSize)
75
+ };
76
+ },
77
+ borderWidth: (val, { props }) => transformSizeRatio("borderWidth", val, props),
78
+ padding: (val, { props }) => transformSizeRatio("padding", val, props),
79
+ scrollPadding: (val, { props }) => transformSizeRatio("scrollPadding", val, props),
80
+ paddingInline: (val) => {
81
+ if (!isString(val)) return;
82
+ const [paddingInlineStart, paddingInlineEnd] = val.split(" ");
83
+ return {
84
+ ...transformSize("paddingInlineStart", paddingInlineStart),
85
+ ...transformSize("paddingInlineEnd", paddingInlineEnd || paddingInlineStart)
86
+ };
87
+ },
88
+ paddingBlock: (val) => {
89
+ if (!isString(val)) return;
90
+ const [paddingBlockStart, paddingBlockEnd] = val.split(" ");
91
+ return {
92
+ ...transformSize("paddingBlockStart", paddingBlockStart),
93
+ ...transformSize("paddingBlockEnd", paddingBlockEnd || paddingBlockStart)
94
+ };
95
+ },
96
+ // Traditional directional padding
97
+ paddingTop: (val, { props }) => transformSizeRatio("paddingBlockStart", val, props),
98
+ paddingBottom: (val, { props }) => transformSizeRatio("paddingBlockEnd", val, props),
99
+ paddingLeft: (val, { props }) => transformSizeRatio("paddingInlineStart", val, props),
100
+ paddingRight: (val, { props }) => transformSizeRatio("paddingInlineEnd", val, props),
101
+ // Logical properties (for reference)
102
+ paddingBlockStart: (val, { props }) => transformSizeRatio("paddingBlockStart", val, props),
103
+ // maps to top
104
+ paddingBlockEnd: (val, { props }) => transformSizeRatio("paddingBlockEnd", val, props),
105
+ // maps to bottom
106
+ paddingInlineStart: (val, { props }) => transformSizeRatio("paddingInlineStart", val, props),
107
+ // maps to left
108
+ paddingInlineEnd: (val, { props }) => transformSizeRatio("paddingInlineEnd", val, props),
109
+ // maps to right
110
+ margin: (val, { props }) => transformSizeRatio("margin", val, props),
111
+ marginInline: (val) => {
112
+ if (!isString(val)) return;
113
+ const [marginInlineStart, marginInlineEnd] = val.split(" ");
114
+ return {
115
+ ...transformSize("marginInlineStart", marginInlineStart),
116
+ ...transformSize("marginInlineEnd", marginInlineEnd || marginInlineStart)
117
+ };
118
+ },
119
+ marginBlock: (val, { props }) => {
120
+ if (!isString(props.marginBlock)) return;
121
+ const [marginBlockStart, marginBlockEnd] = props.marginBlock.split(" ");
122
+ return {
123
+ ...transformSize("marginBlockStart", marginBlockStart),
124
+ ...transformSize("marginBlockEnd", marginBlockEnd || marginBlockStart)
125
+ };
126
+ },
127
+ marginInlineStart: (val, { props }) => transformSizeRatio("marginInlineStart", val, props),
128
+ marginInlineEnd: (val, { props }) => transformSizeRatio("marginInlineEnd", val, props),
129
+ marginBlockStart: (val, { props }) => transformSizeRatio("marginBlockStart", val, props),
130
+ marginBlockEnd: (val, { props }) => transformSizeRatio("marginBlockEnd", val, props),
131
+ gap: (val) => ({
132
+ gap: transfromGap(val)
133
+ }),
134
+ columnGap: (val, { props }) => getSpacingBasedOnRatio(props, "columnGap", val),
135
+ rowGap: (val, { props }) => getSpacingBasedOnRatio(props, "rowGap", val),
136
+ flexWrap: (val, { props }) => ({
137
+ display: "flex",
138
+ flexFlow: (val || "row").split(" ")[0] + " " + props.flexWrap
139
+ }),
140
+ flexFlow: (val, { props }) => {
141
+ const { reverse } = props;
142
+ if (!isString(val)) return;
143
+ let [direction, wrap] = (val || "row").split(" ");
144
+ if (val.startsWith("x") || val === "row") direction = "row";
145
+ if (val.startsWith("y") || val === "column") direction = "column";
146
+ return {
147
+ display: "flex",
148
+ flexFlow: (direction || "") + (!direction.includes("-reverse") && reverse ? "-reverse" : "") + " " + (wrap || "")
149
+ };
150
+ },
151
+ flexAlign: (val) => {
152
+ if (!isString(val)) return;
153
+ const [alignItems, justifyContent] = val.split(" ");
154
+ return {
155
+ display: "flex",
156
+ alignItems,
157
+ justifyContent
158
+ };
159
+ },
160
+ round: (val, { props }) => transformBorderRadius(val || props.borderRadius, props, "round"),
161
+ borderRadius: (val, { props }) => transformBorderRadius(val || props.round, props, "borderRadius")
162
+ };
163
+ export {
164
+ BLOCK_PROPS
165
+ };
@@ -0,0 +1,321 @@
1
+ const DEFAULT_CSS_PROPERTIES_LIST = /* @__PURE__ */ new Set([
2
+ "accentColor",
3
+ "alignContent",
4
+ "alignItems",
5
+ "alignSelf",
6
+ "alignmentBaseline",
7
+ "all",
8
+ "animation",
9
+ "animationDelay",
10
+ "animationDirection",
11
+ "animationDuration",
12
+ "animationFillMode",
13
+ "animationIterationCount",
14
+ "animationName",
15
+ "animationPlayState",
16
+ "animationTimingFunction",
17
+ "appearance",
18
+ "aspectRatio",
19
+ "backdropFilter",
20
+ "backfaceVisibility",
21
+ "background",
22
+ "backgroundAttachment",
23
+ "backgroundBlendMode",
24
+ "backgroundClip",
25
+ "backgroundColor",
26
+ "backgroundImage",
27
+ "backgroundOrigin",
28
+ "backgroundPosition",
29
+ "backgroundPositionX",
30
+ "backgroundPositionY",
31
+ "backgroundRepeat",
32
+ "backgroundRepeatX",
33
+ "backgroundRepeatY",
34
+ "backgroundSize",
35
+ "baselineShift",
36
+ "blockSize",
37
+ "border",
38
+ "borderBlock",
39
+ "borderBlockColor",
40
+ "borderBlockEnd",
41
+ "borderBlockEndColor",
42
+ "borderBlockEndStyle",
43
+ "borderBlockEndWidth",
44
+ "borderBlockStart",
45
+ "borderBlockStartColor",
46
+ "borderBlockStartStyle",
47
+ "borderBlockStartWidth",
48
+ "borderBlockStyle",
49
+ "borderBlockWidth",
50
+ "borderBottom",
51
+ "borderBottomColor",
52
+ "borderBottomLeftRadius",
53
+ "borderBottomRightRadius",
54
+ "borderBottomStyle",
55
+ "borderBottomWidth",
56
+ "borderCollapse",
57
+ "borderColor",
58
+ "borderImage",
59
+ "borderImageOutset",
60
+ "borderImageRepeat",
61
+ "borderImageSlice",
62
+ "borderImageSource",
63
+ "borderImageWidth",
64
+ "borderLeft",
65
+ "borderLeftColor",
66
+ "borderLeftStyle",
67
+ "borderLeftWidth",
68
+ "borderRadius",
69
+ "borderRight",
70
+ "borderRightColor",
71
+ "borderRightStyle",
72
+ "borderRightWidth",
73
+ "borderSpacing",
74
+ "borderStyle",
75
+ "borderTop",
76
+ "borderTopColor",
77
+ "borderTopLeftRadius",
78
+ "borderTopRightRadius",
79
+ "borderTopStyle",
80
+ "borderTopWidth",
81
+ "borderWidth",
82
+ "bottom",
83
+ "boxDecorationBreak",
84
+ "boxShadow",
85
+ "boxSizing",
86
+ "breakAfter",
87
+ "breakBefore",
88
+ "breakInside",
89
+ "captionSide",
90
+ "caretColor",
91
+ "clear",
92
+ "clip",
93
+ "clipPath",
94
+ "color",
95
+ "colorAdjust",
96
+ "colorInterpolation",
97
+ "colorInterpolationFilters",
98
+ "colorRendering",
99
+ "columnCount",
100
+ "columnFill",
101
+ "columnGap",
102
+ "columnRule",
103
+ "columnRuleColor",
104
+ "columnRuleStyle",
105
+ "columnRuleWidth",
106
+ "columnSpan",
107
+ "columnWidth",
108
+ "columns",
109
+ "contain",
110
+ "content",
111
+ "counterIncrement",
112
+ "counterReset",
113
+ "cursor",
114
+ "direction",
115
+ "display",
116
+ "emptyCells",
117
+ "filter",
118
+ "flex",
119
+ "flexBasis",
120
+ "flexDirection",
121
+ "flexFlow",
122
+ "flexGrow",
123
+ "flexShrink",
124
+ "flexWrap",
125
+ "float",
126
+ "font",
127
+ "fontFamily",
128
+ "fontFeatureSettings",
129
+ "fontKerning",
130
+ "fontLanguageOverride",
131
+ "fontSize",
132
+ "fontSizeAdjust",
133
+ "fontStretch",
134
+ "fontStyle",
135
+ "fontVariant",
136
+ "fontVariantAlternates",
137
+ "fontVariantCaps",
138
+ "fontVariantEastAsian",
139
+ "fontVariantNumeric",
140
+ "fontVariantPosition",
141
+ "fontWeight",
142
+ "fontVariationSettings",
143
+ "fontSynthesis",
144
+ "forcedColorAdjust",
145
+ "gap",
146
+ "grid",
147
+ "gridArea",
148
+ "gridAutoColumns",
149
+ "gridAutoFlow",
150
+ "gridAutoRows",
151
+ "gridColumn",
152
+ "gridColumnEnd",
153
+ "gridColumnGap",
154
+ "gridColumnStart",
155
+ "gridGap",
156
+ "gridRow",
157
+ "gridRowEnd",
158
+ "gridRowGap",
159
+ "gridRowStart",
160
+ "gridTemplate",
161
+ "gridTemplateAreas",
162
+ "gridTemplateColumns",
163
+ "gridTemplateRows",
164
+ "height",
165
+ "hyphens",
166
+ "imageOrientation",
167
+ "imageRendering",
168
+ "imeMode",
169
+ "inset",
170
+ "insetBlock",
171
+ "insetBlockEnd",
172
+ "insetBlockStart",
173
+ "insetInline",
174
+ "insetInlineEnd",
175
+ "insetInlineStart",
176
+ "initialLetter",
177
+ "isolation",
178
+ "justifyContent",
179
+ "justifyItems",
180
+ "justifySelf",
181
+ "left",
182
+ "letterSpacing",
183
+ "lineBreak",
184
+ "lineClamp",
185
+ "lineHeight",
186
+ "listStyle",
187
+ "listStyleImage",
188
+ "listStylePosition",
189
+ "listStyleType",
190
+ "margin",
191
+ "marginBottom",
192
+ "marginLeft",
193
+ "marginRight",
194
+ "marginTop",
195
+ "marginBlock",
196
+ "marginBlockEnd",
197
+ "marginBlockStart",
198
+ "marginInline",
199
+ "marginInlineEnd",
200
+ "marginInlineStart",
201
+ "mask",
202
+ "maskBorder",
203
+ "maskBorderImage",
204
+ "maskBorderOutset",
205
+ "maskBorderRepeat",
206
+ "maskBorderSlice",
207
+ "maskBorderSource",
208
+ "maskBorderWidth",
209
+ "maskClip",
210
+ "maskComposite",
211
+ "maskImage",
212
+ "maskOrigin",
213
+ "maskPosition",
214
+ "maskRepeat",
215
+ "maskSize",
216
+ "maskType",
217
+ "maxBlockSize",
218
+ "maxHeight",
219
+ "maxInlineSize",
220
+ "maxWidth",
221
+ "minBlockSize",
222
+ "minHeight",
223
+ "minInlineSize",
224
+ "minWidth",
225
+ "mixBlendMode",
226
+ "objectFit",
227
+ "objectPosition",
228
+ "objectViewBox",
229
+ "offset",
230
+ "offsetDistance",
231
+ "offsetPath",
232
+ "offsetRotate",
233
+ "opacity",
234
+ "order",
235
+ "orientation",
236
+ "outline",
237
+ "outlineColor",
238
+ "outlineOffset",
239
+ "outlineStyle",
240
+ "outlineWidth",
241
+ "overflow",
242
+ "overflowAnchor",
243
+ "overflowClip",
244
+ "overflowScrolling",
245
+ "overflowWrap",
246
+ "overflowX",
247
+ "overflowY",
248
+ "padding",
249
+ "paddingBottom",
250
+ "paddingLeft",
251
+ "paddingRight",
252
+ "paddingTop",
253
+ "pageBreakAfter",
254
+ "pageBreakBefore",
255
+ "pageBreakInside",
256
+ "paintOrder",
257
+ "perspective",
258
+ "perspectiveOrigin",
259
+ "placeContent",
260
+ "placeItems",
261
+ "placeSelf",
262
+ "pointerEvents",
263
+ "position",
264
+ "resize",
265
+ "right",
266
+ "rotate",
267
+ "rowGap",
268
+ "scrollBehavior",
269
+ "scrollPadding",
270
+ "scrollSnapAlign",
271
+ "scrollSnapType",
272
+ "scrollbarColor",
273
+ "scrollbarWidth",
274
+ "shapeImageThreshold",
275
+ "shapeMargin",
276
+ "shapeOutside",
277
+ "tabSize",
278
+ "tableLayout",
279
+ "textAlign",
280
+ "textAlignLast",
281
+ "textDecoration",
282
+ "textDecorationColor",
283
+ "textDecorationLine",
284
+ "textDecorationSkipInk",
285
+ "textDecorationStyle",
286
+ "textDecorationThickness",
287
+ "textIndent",
288
+ "textOverflow",
289
+ "textShadow",
290
+ "textTransform",
291
+ "textUnderlineOffset",
292
+ "top",
293
+ "transform",
294
+ "transformOrigin",
295
+ "transformStyle",
296
+ "transition",
297
+ "transitionDelay",
298
+ "transitionDuration",
299
+ "transitionProperty",
300
+ "transitionTimingFunction",
301
+ "translate",
302
+ "translateX",
303
+ "translateY",
304
+ "translateZ",
305
+ "unicodeBidi",
306
+ "userSelect",
307
+ "verticalAlign",
308
+ "visibility",
309
+ "whiteSpace",
310
+ "widows",
311
+ "width",
312
+ "willChange",
313
+ "wordBreak",
314
+ "wordSpacing",
315
+ "wordWrap",
316
+ "writingMode",
317
+ "zIndex"
318
+ ]);
319
+ export {
320
+ DEFAULT_CSS_PROPERTIES_LIST
321
+ };
@@ -0,0 +1,25 @@
1
+ import { isString } from "@domql/utils";
2
+ const FLEX_PROPS = {
3
+ flow: (value, el) => {
4
+ const { props } = el;
5
+ const { reverse } = props;
6
+ if (!isString(value)) return;
7
+ let [direction, wrap] = (value || "row").split(" ");
8
+ if (value.startsWith("x") || value === "row") direction = "row";
9
+ if (value.startsWith("y") || value === "column") direction = "column";
10
+ return {
11
+ display: "flex",
12
+ flexFlow: (direction || "") + (!direction.includes("-reverse") && reverse ? "-reverse" : "") + " " + (wrap || "")
13
+ };
14
+ },
15
+ wrap: (value, { props }) => {
16
+ return { display: "flex", flexWrap: value };
17
+ },
18
+ align: (value, { props }) => {
19
+ const [alignItems, justifyContent] = value.split(" ");
20
+ return { display: "flex", alignItems, justifyContent };
21
+ }
22
+ };
23
+ export {
24
+ FLEX_PROPS
25
+ };
@@ -0,0 +1,16 @@
1
+ import { getFontSizeByKey, getFontFamily } from "@symbo.ls/scratch";
2
+ const FONT_PROPS = {
3
+ fontSize: (value) => {
4
+ return getFontSizeByKey(value) || value;
5
+ },
6
+ fontFamily: (value) => ({
7
+ fontFamily: getFontFamily(value) || value
8
+ }),
9
+ fontWeight: (value) => ({
10
+ fontWeight: value,
11
+ fontVariationSettings: '"wght" ' + value
12
+ })
13
+ };
14
+ export {
15
+ FONT_PROPS
16
+ };
@@ -0,0 +1,19 @@
1
+ const GRID_PROPS = {
2
+ area: (value) => ({ gridArea: value }),
3
+ template: (value) => ({ gridTemplate: value }),
4
+ templateAreas: (value) => ({ gridTemplateAreas: value }),
5
+ column: (value) => ({ gridColumn: value }),
6
+ columns: (value) => ({ gridTemplateColumns: value }),
7
+ templateColumns: (value) => ({ gridTemplateColumns: value }),
8
+ autoColumns: (value) => ({ gridAutoColumns: value }),
9
+ columnStart: (value) => ({ gridColumnStart: value }),
10
+ row: (value) => ({ gridRow: value }),
11
+ rows: (value) => ({ gridTemplateRows: value }),
12
+ templateRows: (value) => ({ gridTemplateRows: value }),
13
+ autoRows: (value) => ({ gridAutoRows: value }),
14
+ rowStart: (value) => ({ gridRowStart: value }),
15
+ autoFlow: (value) => ({ gridAutoFlow: value })
16
+ };
17
+ export {
18
+ GRID_PROPS
19
+ };
@@ -0,0 +1,35 @@
1
+ import { ANIMATION_PROPS } from "./animation";
2
+ import { BLOCK_PROPS } from "./block";
3
+ import { FONT_PROPS } from "./font";
4
+ import { MISC_PROPS } from "./misc";
5
+ import { POSITION_PROPS } from "./position";
6
+ import { THEME_PROPS } from "./theme";
7
+ import { TIMING_PROPS } from "./timing";
8
+ import { FLEX_PROPS } from "./flex";
9
+ import { GRID_PROPS } from "./grid";
10
+ export * from "./animation";
11
+ export * from "./block";
12
+ export * from "./font";
13
+ export * from "./misc";
14
+ export * from "./position";
15
+ export * from "./theme";
16
+ export * from "./timing";
17
+ export * from "./flex";
18
+ export * from "./grid";
19
+ const CSS_PROPS_REGISTRY = {
20
+ ...ANIMATION_PROPS,
21
+ ...BLOCK_PROPS,
22
+ ...FONT_PROPS,
23
+ ...MISC_PROPS,
24
+ ...MISC_PROPS,
25
+ ...POSITION_PROPS,
26
+ ...THEME_PROPS,
27
+ ...TIMING_PROPS,
28
+ ...FLEX_PROPS,
29
+ ...GRID_PROPS
30
+ };
31
+ var props_default = CSS_PROPS_REGISTRY;
32
+ export {
33
+ CSS_PROPS_REGISTRY,
34
+ props_default as default
35
+ };