@likec4/styles 1.41.0 → 1.42.1
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/css/package.json +4 -0
- package/dist/jsx/create-style-context.d.ts +15 -8
- package/dist/jsx/create-style-context.mjs +6 -2
- package/dist/patterns/grid.mjs +1 -1
- package/dist/patterns/stack.mjs +1 -1
- package/dist/patterns/wrap.mjs +1 -1
- package/dist/preset.d.mts +28 -14
- package/dist/preset.mjs +347 -267
- package/dist/recipes/element-node-data.d.ts +5 -10
- package/dist/recipes/element-node-data.mjs +13 -71
- package/dist/recipes/index.d.ts +2 -2
- package/dist/recipes/index.mjs +2 -2
- package/dist/recipes/overlay.d.ts +40 -0
- package/dist/recipes/overlay.mjs +36 -0
- package/dist/tokens/index.mjs +32 -20
- package/dist/tokens/tokens.d.ts +2 -2
- package/dist/types/conditions.d.ts +1 -1
- package/dist/types/index.mjs +1 -0
- package/dist/types/jsx.d.ts +5 -5
- package/dist/types/prop-type.d.ts +1 -1
- package/jsx/package.json +4 -0
- package/package.json +37 -14
- package/panda.config.ts +1 -0
- package/patterns/package.json +4 -0
- package/postcss.d.mts +1 -1
- package/preset/package.json +4 -0
- package/recipes/package.json +4 -0
- package/tokens/package.json +4 -0
- package/types/package.json +4 -0
- package/dist/recipes/element-node-icon.d.ts +0 -33
- package/dist/recipes/element-node-icon.mjs +0 -24
package/css/package.json
ADDED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import type { SlotRecipeRuntimeFn, RecipeVariantProps } from '../types/recipe';
|
|
3
3
|
import type { JsxHTMLProps, JsxStyleProps, Assign } from '../types/system-types';
|
|
4
|
-
import type { JsxFactoryOptions } from '../types/jsx';
|
|
5
|
-
import type { ComponentType, ElementType
|
|
4
|
+
import type { JsxFactoryOptions, ComponentProps } from '../types/jsx';
|
|
5
|
+
import type { ComponentType, ElementType } from 'react'
|
|
6
6
|
|
|
7
7
|
interface UnstyledProps {
|
|
8
|
-
unstyled?: boolean
|
|
8
|
+
unstyled?: boolean | undefined
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
type SvaFn<S extends string = any> = SlotRecipeRuntimeFn<S, any>
|
|
@@ -18,29 +18,36 @@ type SlotRecipe = SvaFn | SlotRecipeFn
|
|
|
18
18
|
|
|
19
19
|
type InferSlot<R extends SlotRecipe> = R extends SlotRecipeFn ? R['__slot'] : R extends SvaFn<infer S> ? S : never
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
interface WithProviderOptions<P = {}> {
|
|
22
|
+
defaultProps?: Partial<P> | undefined
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
type StyleContextProvider<T extends ElementType, R extends SlotRecipe> = ComponentType<
|
|
26
26
|
JsxHTMLProps<ComponentProps<T> & UnstyledProps, Assign<RecipeVariantProps<R>, JsxStyleProps>>
|
|
27
27
|
>
|
|
28
28
|
|
|
29
|
+
type StyleContextRootProvider<T extends ElementType, R extends SlotRecipe> = ComponentType<
|
|
30
|
+
ComponentProps<T> & UnstyledProps & RecipeVariantProps<R>
|
|
31
|
+
>
|
|
32
|
+
|
|
29
33
|
type StyleContextConsumer<T extends ElementType> = ComponentType<
|
|
30
34
|
JsxHTMLProps<ComponentProps<T> & UnstyledProps, JsxStyleProps>
|
|
31
35
|
>
|
|
32
36
|
|
|
33
37
|
export interface StyleContext<R extends SlotRecipe> {
|
|
34
|
-
withRootProvider: <T extends ElementType>(
|
|
38
|
+
withRootProvider: <T extends ElementType>(
|
|
39
|
+
Component: T,
|
|
40
|
+
options?: WithProviderOptions<ComponentProps<T>> | undefined
|
|
41
|
+
) => StyleContextRootProvider<T, R>
|
|
35
42
|
withProvider: <T extends ElementType>(
|
|
36
43
|
Component: T,
|
|
37
44
|
slot: InferSlot<R>,
|
|
38
|
-
options?: JsxFactoryOptions<ComponentProps<T>>
|
|
45
|
+
options?: JsxFactoryOptions<ComponentProps<T>> | undefined
|
|
39
46
|
) => StyleContextProvider<T, R>
|
|
40
47
|
withContext: <T extends ElementType>(
|
|
41
48
|
Component: T,
|
|
42
49
|
slot: InferSlot<R>,
|
|
43
|
-
options?: JsxFactoryOptions<ComponentProps<T>>
|
|
50
|
+
options?: JsxFactoryOptions<ComponentProps<T>> | undefined
|
|
44
51
|
) => StyleContextConsumer<T>
|
|
45
52
|
}
|
|
46
53
|
|
|
@@ -19,16 +19,20 @@ export function createStyleContext(recipe) {
|
|
|
19
19
|
return { ...slotStyles, ...restProps }
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
const withRootProvider = (Component) => {
|
|
22
|
+
const withRootProvider = (Component, options) => {
|
|
23
23
|
const WithRootProvider = (props) => {
|
|
24
24
|
const [variantProps, otherProps] = svaFn.splitVariantProps(props)
|
|
25
25
|
|
|
26
26
|
const slotStyles = isConfigRecipe ? svaFn(variantProps) : svaFn.raw(variantProps)
|
|
27
27
|
slotStyles._classNameMap = svaFn.classNameMap
|
|
28
28
|
|
|
29
|
+
const mergedProps = options?.defaultProps
|
|
30
|
+
? { ...options.defaultProps, ...otherProps }
|
|
31
|
+
: otherProps
|
|
32
|
+
|
|
29
33
|
return createElement(StyleContext.Provider, {
|
|
30
34
|
value: slotStyles,
|
|
31
|
-
children: createElement(Component,
|
|
35
|
+
children: createElement(Component, mergedProps)
|
|
32
36
|
})
|
|
33
37
|
}
|
|
34
38
|
|
package/dist/patterns/grid.mjs
CHANGED
|
@@ -15,7 +15,7 @@ transform(props, { map, isCssUnit }) {
|
|
|
15
15
|
};
|
|
16
16
|
},
|
|
17
17
|
defaultValues(props) {
|
|
18
|
-
return { gap: props.columnGap || props.rowGap ? void 0 : "
|
|
18
|
+
return { gap: props.columnGap || props.rowGap ? void 0 : "8px" };
|
|
19
19
|
}}
|
|
20
20
|
|
|
21
21
|
export const getGridStyle = (styles = {}) => {
|
package/dist/patterns/stack.mjs
CHANGED
package/dist/patterns/wrap.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { css } from '../css/index.mjs';
|
|
|
3
3
|
|
|
4
4
|
const wrapConfig = {
|
|
5
5
|
transform(props) {
|
|
6
|
-
const { columnGap, rowGap, gap = columnGap || rowGap ? void 0 : "
|
|
6
|
+
const { columnGap, rowGap, gap = columnGap || rowGap ? void 0 : "8px", align, justify, ...rest } = props;
|
|
7
7
|
return {
|
|
8
8
|
display: "flex",
|
|
9
9
|
flexWrap: "wrap",
|
package/dist/preset.d.mts
CHANGED
|
@@ -7,7 +7,7 @@ declare const compoundNode: _pandacss_types.RecipeConfig<_pandacss_types.RecipeV
|
|
|
7
7
|
|
|
8
8
|
declare const edgeActionBtn: _pandacss_types.RecipeConfig<_pandacss_types.RecipeVariantRecord>;
|
|
9
9
|
|
|
10
|
-
declare const
|
|
10
|
+
declare const elementNodeData: _pandacss_types.RecipeConfig<_pandacss_types.RecipeVariantRecord>;
|
|
11
11
|
|
|
12
12
|
declare const elementShapeRecipe: _pandacss_types.RecipeConfig<_pandacss_types.RecipeVariantRecord>;
|
|
13
13
|
|
|
@@ -17,29 +17,29 @@ declare const markdownBlock: _pandacss_types.RecipeConfig<_pandacss_types.Recipe
|
|
|
17
17
|
|
|
18
18
|
declare const navigationPanelActionIcon: _pandacss_types.RecipeConfig<_pandacss_types.RecipeVariantRecord>;
|
|
19
19
|
|
|
20
|
+
declare const overlay: _pandacss_types.RecipeConfig<_pandacss_types.RecipeVariantRecord>;
|
|
21
|
+
|
|
20
22
|
declare const recipes_actionBtn: typeof actionBtn;
|
|
21
23
|
declare const recipes_compoundNode: typeof compoundNode;
|
|
22
24
|
declare const recipes_edgeActionBtn: typeof edgeActionBtn;
|
|
23
|
-
declare const
|
|
25
|
+
declare const recipes_elementNodeData: typeof elementNodeData;
|
|
24
26
|
declare const recipes_elementShapeRecipe: typeof elementShapeRecipe;
|
|
25
27
|
declare const recipes_likec4tag: typeof likec4tag;
|
|
26
28
|
declare const recipes_markdownBlock: typeof markdownBlock;
|
|
27
29
|
declare const recipes_navigationPanelActionIcon: typeof navigationPanelActionIcon;
|
|
30
|
+
declare const recipes_overlay: typeof overlay;
|
|
28
31
|
declare namespace recipes {
|
|
29
|
-
export { recipes_actionBtn as actionBtn, recipes_compoundNode as compoundNode, recipes_edgeActionBtn as edgeActionBtn,
|
|
32
|
+
export { recipes_actionBtn as actionBtn, recipes_compoundNode as compoundNode, recipes_edgeActionBtn as edgeActionBtn, recipes_elementNodeData as elementNodeData, recipes_elementShapeRecipe as elementShapeRecipe, recipes_likec4tag as likec4tag, recipes_markdownBlock as markdownBlock, recipes_navigationPanelActionIcon as navigationPanelActionIcon, recipes_overlay as overlay };
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
declare const edgeLabel: _pandacss_types.SlotRecipeConfig;
|
|
33
36
|
|
|
34
|
-
declare const elementNodeData: _pandacss_types.SlotRecipeConfig;
|
|
35
|
-
|
|
36
37
|
declare const navigationLink: _pandacss_types.SlotRecipeConfig;
|
|
37
38
|
|
|
38
39
|
declare const slotRecipes_edgeLabel: typeof edgeLabel;
|
|
39
|
-
declare const slotRecipes_elementNodeData: typeof elementNodeData;
|
|
40
40
|
declare const slotRecipes_navigationLink: typeof navigationLink;
|
|
41
41
|
declare namespace slotRecipes {
|
|
42
|
-
export { slotRecipes_edgeLabel as edgeLabel,
|
|
42
|
+
export { slotRecipes_edgeLabel as edgeLabel, slotRecipes_navigationLink as navigationLink };
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
declare const theme: {
|
|
@@ -1020,13 +1020,6 @@ declare const theme: {
|
|
|
1020
1020
|
_dark: string;
|
|
1021
1021
|
};
|
|
1022
1022
|
};
|
|
1023
|
-
whenPanning: {
|
|
1024
|
-
description: string;
|
|
1025
|
-
value: {
|
|
1026
|
-
base: string;
|
|
1027
|
-
_dark: string;
|
|
1028
|
-
};
|
|
1029
|
-
};
|
|
1030
1023
|
};
|
|
1031
1024
|
border: {
|
|
1032
1025
|
description: string;
|
|
@@ -1083,6 +1076,27 @@ declare const theme: {
|
|
|
1083
1076
|
value: string;
|
|
1084
1077
|
};
|
|
1085
1078
|
};
|
|
1079
|
+
overlay: {
|
|
1080
|
+
backdrop: {
|
|
1081
|
+
DEFAULT: {
|
|
1082
|
+
description: string;
|
|
1083
|
+
value: {
|
|
1084
|
+
base: string;
|
|
1085
|
+
_light: string;
|
|
1086
|
+
};
|
|
1087
|
+
};
|
|
1088
|
+
};
|
|
1089
|
+
body: {
|
|
1090
|
+
DEFAULT: {
|
|
1091
|
+
description: string;
|
|
1092
|
+
value: string;
|
|
1093
|
+
};
|
|
1094
|
+
};
|
|
1095
|
+
border: {
|
|
1096
|
+
description: string;
|
|
1097
|
+
value: string;
|
|
1098
|
+
};
|
|
1099
|
+
};
|
|
1086
1100
|
};
|
|
1087
1101
|
};
|
|
1088
1102
|
};
|