@likec4/styles 1.52.0 → 1.54.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.
@@ -6,7 +6,7 @@ import type { DistributiveOmit } from '../types/system-types.d.mts';
6
6
  import type { Tokens } from '../tokens/index.d.mts';
7
7
 
8
8
  export interface DividerProperties {
9
- orientation?: "horizontal" | "vertical"
9
+ orientation?: ConditionalValue<"horizontal" | "vertical">
10
10
  thickness?: ConditionalValue<Tokens["sizes"] | Properties["borderWidth"]>
11
11
  color?: ConditionalValue<Tokens["colors"] | Properties["borderColor"]>
12
12
  }
@@ -9,7 +9,7 @@ export interface FloatProperties {
9
9
  offsetX?: ConditionalValue<Tokens["spacing"] | Properties["left"]>
10
10
  offsetY?: ConditionalValue<Tokens["spacing"] | Properties["top"]>
11
11
  offset?: ConditionalValue<Tokens["spacing"] | Properties["top"]>
12
- placement?: "bottom-end" | "bottom-start" | "top-end" | "top-start" | "bottom-center" | "top-center" | "middle-center" | "middle-end" | "middle-start"
12
+ placement?: ConditionalValue<"bottom-end" | "bottom-start" | "top-end" | "top-start" | "bottom-center" | "top-center" | "middle-center" | "middle-end" | "middle-start">
13
13
  }
14
14
 
15
15
  interface FloatStyles extends FloatProperties, DistributiveOmit<SystemStyleObject, keyof FloatProperties > {}
@@ -2,12 +2,16 @@ import { getPatternStyles, patternFns } from '../helpers.mjs';
2
2
  import { css } from '../css/index.mjs';
3
3
 
4
4
  const spacerConfig = {
5
- transform(props, { map }) {
5
+ transform(props, { map, isCssUnit, isCssVar }) {
6
6
  const { size, ...rest } = props;
7
7
  return {
8
8
  alignSelf: "stretch",
9
9
  justifySelf: "stretch",
10
- flex: map(size, (v) => v == null ? "1" : `0 0 ${v}`),
10
+ flex: map(size, (v) => {
11
+ if (v == null) return "1";
12
+ const val = isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`;
13
+ return `0 0 ${val}`;
14
+ }),
11
15
  ...rest
12
16
  };
13
17
  }}
@@ -9,8 +9,8 @@ export interface TxtProperties {
9
9
  inline?: ConditionalValue<boolean>
10
10
  dimmed?: ConditionalValue<boolean>
11
11
  lh?: ConditionalValue<Tokens["lineHeights"]>
12
- size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl"
13
- likec4color?: "amber" | "blue" | "gray" | "slate" | "green" | "indigo" | "muted" | "primary" | "red" | "secondary" | "sky"
12
+ size?: ConditionalValue<"xxs" | "xs" | "sm" | "md" | "lg" | "xl">
13
+ likec4color?: ConditionalValue<"amber" | "blue" | "gray" | "slate" | "green" | "indigo" | "muted" | "primary" | "red" | "secondary" | "sky">
14
14
  }
15
15
 
16
16
  interface TxtStyles extends TxtProperties, DistributiveOmit<SystemStyleObject, keyof TxtProperties > {}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@likec4/styles",
3
3
  "description": "Shared PandaCSS preset and generated styles, used in LikeC4",
4
4
  "license": "MIT",
5
- "version": "1.52.0",
5
+ "version": "1.54.0",
6
6
  "bugs": "https://github.com/likec4/likec4/issues",
7
7
  "homepage": "https://likec4.dev",
8
8
  "author": "Denis Davydkov <denis@davydkov.com>",
@@ -77,10 +77,10 @@
77
77
  }
78
78
  },
79
79
  "dependencies": {
80
- "@pandacss/types": "^1.8.2"
80
+ "@pandacss/types": "^1.9.1"
81
81
  },
82
82
  "peerDependencies": {
83
- "@pandacss/dev": "^1.8.2",
83
+ "@pandacss/dev": "^1.9.1",
84
84
  "react": "^18.x || ^19.x"
85
85
  },
86
86
  "peerDependenciesMeta": {
@@ -92,21 +92,21 @@
92
92
  }
93
93
  },
94
94
  "devDependencies": {
95
- "@types/node": "~22.19.11",
95
+ "@types/node": "~22.19.15",
96
96
  "@pandabox/panda-plugins": "^0.0.8",
97
97
  "@pandabox/utils": "^0.0.5",
98
98
  "@pandabox/unplugin": "^0.2.2",
99
- "@pandacss/dev": "^1.8.2",
100
- "@types/picomatch": "^4.0.2",
99
+ "@pandacss/dev": "^1.9.1",
100
+ "@types/picomatch": "^4.0.3",
101
101
  "@types/react": "19.2.14",
102
- "postcss": "8.5.6",
102
+ "postcss": "8.5.8",
103
103
  "remeda": "^2.33.6",
104
104
  "nano-spawn": "^2.0.0",
105
- "obuild": "^0.4.31",
105
+ "obuild": "0.4.31",
106
106
  "typescript": "5.9.3",
107
- "@likec4/style-preset": "1.52.0",
107
+ "@likec4/style-preset": "1.54.0",
108
108
  "@likec4/devops": "1.42.0",
109
- "@likec4/tsconfig": "1.52.0"
109
+ "@likec4/tsconfig": "1.54.0"
110
110
  },
111
111
  "scripts": {
112
112
  "typecheck": "tsc --noEmit",