@likec4/styles 1.56.0 → 1.57.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/dist/jsx/txt.mjs CHANGED
@@ -5,7 +5,7 @@ import { getTxtStyle } from '../patterns/txt.mjs';
5
5
  import { styled } from './factory.mjs';
6
6
 
7
7
  export const Txt = /* @__PURE__ */ forwardRef(function Txt(props, ref) {
8
- const [patternProps, restProps] = splitProps(props, ["inline","dimmed","lh","size","likec4color"])
8
+ const [patternProps, restProps] = splitProps(props, ["inline","dimmed","noUserSelect","lh","size","likec4color"])
9
9
 
10
10
  const styleProps = getTxtStyle(patternProps)
11
11
  const mergedProps = { ref, ...styleProps, ...restProps }
@@ -8,6 +8,7 @@ import type { Tokens } from '../tokens/index.d.mts';
8
8
  export interface TxtProperties {
9
9
  inline?: ConditionalValue<boolean>
10
10
  dimmed?: ConditionalValue<boolean>
11
+ noUserSelect?: ConditionalValue<boolean>
11
12
  lh?: ConditionalValue<Tokens["lineHeights"]>
12
13
  size?: ConditionalValue<"xxs" | "xs" | "sm" | "md" | "lg" | "xl">
13
14
  likec4color?: ConditionalValue<"amber" | "blue" | "gray" | "slate" | "green" | "indigo" | "muted" | "primary" | "red" | "secondary" | "sky">
@@ -3,7 +3,7 @@ import { css } from '../css/index.mjs';
3
3
 
4
4
  const txtConfig = {
5
5
  transform(props, _helpers) {
6
- const { inline, size, dimmed, lh, likec4color, ...rest } = props;
6
+ const { inline, size, dimmed, lh, likec4color, noUserSelect, ...rest } = props;
7
7
  if (dimmed && likec4color) {
8
8
  throw new Error("dimmed and likec4color are mutually exclusive");
9
9
  }
@@ -14,10 +14,11 @@ transform(props, _helpers) {
14
14
  ...inline && { display: "inline-block" },
15
15
  ...lh && { lineHeight: lh },
16
16
  ...likec4color && { "data-likec4-color": likec4color },
17
+ ...noUserSelect && { userSelect: "none" },
17
18
  ...rest
18
19
  };
19
20
  },
20
- defaultValues:{inline:false,dimmed:false,size:'md'}}
21
+ defaultValues:{inline:false,dimmed:false,size:'md',noUserSelect:false}}
21
22
 
22
23
  export const getTxtStyle = (styles = {}) => {
23
24
  const _styles = getPatternStyles(txtConfig, styles)
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.56.0",
5
+ "version": "1.57.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.9.1"
80
+ "@pandacss/types": "^1.11.1"
81
81
  },
82
82
  "peerDependencies": {
83
- "@pandacss/dev": "^1.9.1",
83
+ "@pandacss/dev": "^1.11.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.17",
95
+ "@types/node": "~22.19.19",
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.9.1",
99
+ "@pandacss/dev": "^1.11.1",
100
100
  "@types/picomatch": "^4.0.3",
101
- "@types/react": "19.2.14",
102
- "postcss": "8.5.10",
101
+ "@types/react": "19.2.15",
102
+ "postcss": "8.5.15",
103
103
  "remeda": "^2.33.7",
104
104
  "nano-spawn": "^2.0.0",
105
105
  "obuild": "0.4.31",
106
106
  "typescript": "5.9.3",
107
- "@likec4/style-preset": "1.56.0",
108
- "@likec4/tsconfig": "1.56.0",
109
- "@likec4/devops": "1.42.0"
107
+ "@likec4/style-preset": "1.57.0",
108
+ "@likec4/devops": "1.57.0",
109
+ "@likec4/tsconfig": "1.57.0"
110
110
  },
111
111
  "scripts": {
112
112
  "typecheck": "tsc --noEmit",
@@ -1,6 +1,6 @@
1
1
  import { r as colors_exports } from "./@radix-ui/colors.mjs";
2
2
  import { definePreset } from "@pandacss/dev";
3
- //#region ../../node_modules/.pnpm/pandacss-preset-radix-colors@0.2.1_@pandacss+dev@1.9.1_typescript@5.9.3__@radix-ui+colors@3.0.0/node_modules/pandacss-preset-radix-colors/index.mjs
3
+ //#region ../../node_modules/.pnpm/pandacss-preset-radix-colors@0.2.1_@pandacss+dev@1.11.1_typescript@5.9.3__@radix-ui+colors@3.0.0/node_modules/pandacss-preset-radix-colors/index.mjs
4
4
  var SCALE_TAGS_REGEX = new RegExp(`(${["P3"].join("|")})|(?=[A-Z0-9])`, "g");
5
5
  function getScaleTags(fullName) {
6
6
  return fullName.split(SCALE_TAGS_REGEX).filter(Boolean).map((x) => x.toLowerCase());
package/preset/preset.mjs CHANGED
@@ -79,7 +79,6 @@ function __v(key, defaultTo) {
79
79
  //#endregion
80
80
  //#region ../preset/src/const.ts
81
81
  const root = ".likec4-root";
82
- `${root}`;
83
82
  //#endregion
84
83
  //#region ../preset/src/defaults/element-colors.ts
85
84
  const blue$1 = {
@@ -1595,6 +1594,8 @@ const layerStyles = /* @__PURE__ */ defineLayerStyles({ likec4: {
1595
1594
  }
1596
1595
  }
1597
1596
  } });
1597
+ //#endregion
1598
+ //#region ../preset/src/pattens/index.ts
1598
1599
  const patterns = { extend: {
1599
1600
  vstack: { defaultValues: {
1600
1601
  alignItems: "stretch",
@@ -1604,8 +1605,18 @@ const patterns = { extend: {
1604
1605
  box: { jsx: ["Box", "MarkdownBlock"] },
1605
1606
  txt: definePattern({
1606
1607
  properties: {
1607
- inline: { type: "boolean" },
1608
- dimmed: { type: "boolean" },
1608
+ inline: {
1609
+ description: "Whether the text should be inline (default: false)",
1610
+ type: "boolean"
1611
+ },
1612
+ dimmed: {
1613
+ description: "Whether the text should be dimmed (default: false)",
1614
+ type: "boolean"
1615
+ },
1616
+ noUserSelect: {
1617
+ description: "Whether the text should not be selectable (default: false)",
1618
+ type: "boolean"
1619
+ },
1609
1620
  lh: {
1610
1621
  type: "token",
1611
1622
  value: "lineHeights"
@@ -1629,10 +1640,11 @@ const patterns = { extend: {
1629
1640
  defaultValues: {
1630
1641
  inline: false,
1631
1642
  dimmed: false,
1632
- size: "md"
1643
+ size: "md",
1644
+ noUserSelect: false
1633
1645
  },
1634
1646
  transform(props, _helpers) {
1635
- const { inline, size, dimmed, lh, likec4color, ...rest } = props;
1647
+ const { inline, size, dimmed, lh, likec4color, noUserSelect, ...rest } = props;
1636
1648
  if (dimmed && likec4color) throw new Error("dimmed and likec4color are mutually exclusive");
1637
1649
  return {
1638
1650
  userSelect: "all",
@@ -1641,6 +1653,7 @@ const patterns = { extend: {
1641
1653
  ...inline && { display: "inline-block" },
1642
1654
  ...lh && { lineHeight: lh },
1643
1655
  ...likec4color && { "data-likec4-color": likec4color },
1656
+ ...noUserSelect && { userSelect: "none" },
1644
1657
  ...rest
1645
1658
  };
1646
1659
  },