@bitrise/bitkit-v2 0.3.73 → 0.3.74

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.
@@ -1135,7 +1135,7 @@ const r = l.colors(
1135
1135
  "ai-tertiary": {
1136
1136
  bg: {
1137
1137
  value: {
1138
- _light: "{colors.sys.bg.transparent}"
1138
+ _light: "transparent"
1139
1139
  }
1140
1140
  },
1141
1141
  "bg-hover": {
@@ -1150,7 +1150,7 @@ const r = l.colors(
1150
1150
  },
1151
1151
  "bg-disabled": {
1152
1152
  value: {
1153
- _light: "{colors.sys.bg.transparent}"
1153
+ _light: "transparent"
1154
1154
  }
1155
1155
  },
1156
1156
  fg: {
@@ -1,4 +1,5 @@
1
1
  import { TextProps } from '@chakra-ui/react/text';
2
- export declare function withSlashes(dataObject: Record<string, any>, prefix?: string): Record<string, any>;
2
+ export declare const flattenColorTokens: (object: object, prefix?: string) => Record<string, any>;
3
+ export declare function withSlashes(object: Record<string, any>): Record<string, any>;
3
4
  export declare const rem: (input: number | string) => number | string;
4
5
  export declare const getTextStyle: (as: TextProps["as"]) => string | undefined;
@@ -1,15 +1,28 @@
1
- function c(e, r = "") {
2
- const s = {};
3
- return Object.keys(e).forEach((t) => {
4
- const n = e[t], o = r ? `${r}/${t}` : t;
5
- n.value ? s[o] = n : Object.assign(s, c(n, o));
6
- }), { ...s, ...e };
1
+ import { isPlainObject as i } from "es-toolkit";
2
+ const a = (e, t = "") => {
3
+ const n = {}, c = Object.keys(e);
4
+ for (let r = 0; r < c.length; r++) {
5
+ const o = c[r], s = e[o], l = t ? `${t}/${o}` : o;
6
+ if (i(s) && Object.keys(s).length > 0 && Object.keys(s)[0] !== "value") {
7
+ Object.assign(n, a(s, l));
8
+ continue;
9
+ }
10
+ n[l] = s;
11
+ }
12
+ return n;
13
+ };
14
+ function f(e) {
15
+ return {
16
+ ...e,
17
+ ...a(e)
18
+ };
7
19
  }
8
- const l = (e) => {
9
- const r = typeof e == "string" ? parseInt(e, 10) : e;
10
- return Number.isNaN(r) ? e : `${r / 16}rem`;
20
+ const y = (e) => {
21
+ const t = typeof e == "string" ? parseInt(e, 10) : e;
22
+ return Number.isNaN(t) ? e : `${t / 16}rem`;
11
23
  };
12
24
  export {
13
- l as rem,
14
- c as withSlashes
25
+ a as flattenColorTokens,
26
+ y as rem,
27
+ f as withSlashes
15
28
  };
@@ -38,7 +38,7 @@ const l = {
38
38
  value: "#fff"
39
39
  },
40
40
  base: {
41
- value: "{colors.sys.neutral.base}"
41
+ value: "{colors.sys.neutral}"
42
42
  },
43
43
  bold: {
44
44
  value: "{colors.sys.neutral.bold}"
@@ -94,7 +94,7 @@ const l = {
94
94
  value: "#f9f2fd"
95
95
  },
96
96
  base: {
97
- value: "{colors.sys.purple.base}"
97
+ value: "{colors.sys.purple}"
98
98
  },
99
99
  bold: {
100
100
  value: "{colors.sys.purple.bold}"
@@ -150,7 +150,7 @@ const l = {
150
150
  value: "#fff0f3"
151
151
  },
152
152
  base: {
153
- value: "{colors.sys.red.base}"
153
+ value: "{colors.sys.red}"
154
154
  },
155
155
  bold: {
156
156
  value: "{colors.sys.red.bold}"
@@ -206,7 +206,7 @@ const l = {
206
206
  value: "#fff4e5"
207
207
  },
208
208
  base: {
209
- value: "{colors.sys.orange.base}"
209
+ value: "{colors.sys.orange}"
210
210
  },
211
211
  bold: {
212
212
  value: "{colors.sys.orange.bold}"
@@ -262,7 +262,7 @@ const l = {
262
262
  value: "#fff6d1"
263
263
  },
264
264
  base: {
265
- value: "{colors.sys.yellow.base}"
265
+ value: "{colors.sys.yellow}"
266
266
  },
267
267
  bold: {
268
268
  value: "{colors.sys.yellow.bold}"
@@ -318,7 +318,7 @@ const l = {
318
318
  value: "#eef9f1"
319
319
  },
320
320
  base: {
321
- value: "{colors.sys.green.base}"
321
+ value: "{colors.sys.green}"
322
322
  },
323
323
  bold: {
324
324
  value: "{colors.sys.green.bold}"
@@ -374,7 +374,7 @@ const l = {
374
374
  value: "#e9fbf9"
375
375
  },
376
376
  base: {
377
- value: "{colors.sys.turquoise.base}"
377
+ value: "{colors.sys.turquoise}"
378
378
  },
379
379
  bold: {
380
380
  value: "{colors.sys.turquoise.bold}"
@@ -430,7 +430,7 @@ const l = {
430
430
  value: "#ecf8fd"
431
431
  },
432
432
  base: {
433
- value: "{colors.sys.blue.base}"
433
+ value: "{colors.sys.blue}"
434
434
  },
435
435
  bold: {
436
436
  value: "{colors.sys.blue.bold}"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit-v2",
3
3
  "private": false,
4
- "version": "0.3.73",
4
+ "version": "0.3.74",
5
5
  "description": "Bitrise Design System Components built with Chakra UI v3",
6
6
  "keywords": [
7
7
  "react",
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "devDependencies": {
57
57
  "@bitrise/eslint-plugin": "^4.0.4",
58
- "@chakra-ui/cli": "^3.29.0",
58
+ "@chakra-ui/cli": "^3.30.0",
59
59
  "@figma-export/cli": "^6.2.4",
60
60
  "@figma-export/output-components-as-svg": "^6.2.4",
61
61
  "@figma-export/transform-svg-with-svgo": "^6.2.4",
@@ -80,7 +80,7 @@
80
80
  "vite": "^7.2.4"
81
81
  },
82
82
  "dependencies": {
83
- "@chakra-ui/react": "^3.29.0",
83
+ "@chakra-ui/react": "^3.30.0",
84
84
  "@emotion/react": "^11.14.0",
85
85
  "@emotion/styled": "^11.14.1",
86
86
  "@fontsource-variable/figtree": "^5.2.10",