@bitrise/bitkit-v2 0.3.61 → 0.3.63

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.
@@ -2,8 +2,8 @@ import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
2
  import { Field as t } from "@chakra-ui/react/field";
3
3
  import { Text as d } from "@chakra-ui/react/text";
4
4
  import { forwardRef as f } from "react";
5
- import u from "../BitkitTooltip/BitkitTooltip.js";
6
- import T from "../../icons/16x16/IconInfoCircle16.js";
5
+ import u from "../../icons/16x16/IconInfoCircle16.js";
6
+ import T from "../BitkitTooltip/BitkitTooltip.js";
7
7
  const y = f((x, m) => {
8
8
  const { counterText: o, children: h, errorText: r, helperText: l, label: n, optional: p, tooltip: a, warningText: i, ...s } = x;
9
9
  return /* @__PURE__ */ c(t.Root, { required: !p, ref: m, ...s, children: [
@@ -16,7 +16,7 @@ const y = f((x, m) => {
16
16
  fallback: /* @__PURE__ */ e(d, { as: "span", color: "input/text/helper", textStyle: "body/md/regular", children: "(optional)" })
17
17
  }
18
18
  ),
19
- !!a && /* @__PURE__ */ e(u, { text: a ?? "", children: /* @__PURE__ */ e(T, { color: "icon/tertiary" }) }),
19
+ !!a && /* @__PURE__ */ e(T, { text: a ?? "", children: /* @__PURE__ */ e(u, { color: "icon/tertiary" }) }),
20
20
  o && /* @__PURE__ */ e(d, { as: "span", color: "input/text/helper", marginInlineStart: "auto", textStyle: "comp/input/helperText", children: o })
21
21
  ] }) : null,
22
22
  h,
@@ -2,15 +2,15 @@ import { jsx as r, jsxs as c } from "react/jsx-runtime";
2
2
  import { Box as w } from "@chakra-ui/react/box";
3
3
  import { NumberInput as i } from "@chakra-ui/react/number-input";
4
4
  import { forwardRef as b } from "react";
5
- import { triggerSeparatorStyle as v } from "../../theme/slot-recipes/NumberInput.recipe.js";
6
- import { rem as y } from "../../theme/themeUtils.js";
7
- import T from "../BitkitField/BitkitField.js";
8
- import B from "../../icons/16x16/IconMinus16.js";
9
- import C from "../../icons/16x16/IconPlus16.js";
10
- import N from "../../icons/24x24/IconErrorCircleFilled24.js";
11
- import j from "../../icons/16x16/IconErrorCircleFilled16.js";
12
- import k from "../../icons/24x24/IconWarningYellow24.js";
13
- import F from "../../icons/16x16/IconWarningYellow16.js";
5
+ import v from "../../icons/16x16/IconErrorCircleFilled16.js";
6
+ import y from "../../icons/16x16/IconMinus16.js";
7
+ import T from "../../icons/16x16/IconPlus16.js";
8
+ import B from "../../icons/16x16/IconWarningYellow16.js";
9
+ import C from "../../icons/24x24/IconErrorCircleFilled24.js";
10
+ import N from "../../icons/24x24/IconWarningYellow24.js";
11
+ import { triggerSeparatorStyle as j } from "../../theme/slot-recipes/NumberInput.recipe.js";
12
+ import { rem as k } from "../../theme/themeUtils.js";
13
+ import F from "../BitkitField/BitkitField.js";
14
14
  const W = b((a, d) => {
15
15
  const {
16
16
  defaultValue: p,
@@ -26,8 +26,8 @@ const W = b((a, d) => {
26
26
  ...h
27
27
  } = a, x = e === "warning" || !!l, m = e === "error" || !!t;
28
28
  let o;
29
- return m ? o = n === "lg" ? /* @__PURE__ */ r(N, { color: "icon/negative" }) : /* @__PURE__ */ r(j, { color: "icon/negative" }) : x && (o = n === "lg" ? /* @__PURE__ */ r(k, { color: "icon/warning" }) : /* @__PURE__ */ r(F, { color: "icon/warning" })), /* @__PURE__ */ r(
30
- T,
29
+ return m ? o = n === "lg" ? /* @__PURE__ */ r(C, { color: "icon/negative" }) : /* @__PURE__ */ r(v, { color: "icon/negative" }) : x && (o = n === "lg" ? /* @__PURE__ */ r(N, { color: "icon/warning" }) : /* @__PURE__ */ r(B, { color: "icon/warning" })), /* @__PURE__ */ r(
30
+ F,
31
31
  {
32
32
  disabled: e === "disabled",
33
33
  errorText: t,
@@ -43,15 +43,15 @@ const W = b((a, d) => {
43
43
  children: /* @__PURE__ */ c(
44
44
  i.Root,
45
45
  {
46
- css: o ? { "--control-width": y(150) } : void 0,
46
+ css: o ? { "--control-width": k(150) } : void 0,
47
47
  defaultValue: p,
48
48
  size: n,
49
49
  ...f,
50
50
  children: [
51
51
  /* @__PURE__ */ c(i.Control, { children: [
52
52
  o && /* @__PURE__ */ r(w, { paddingInline: "12px", display: "flex", alignItems: "center", justifyContent: "center", children: o }),
53
- /* @__PURE__ */ r(i.DecrementTrigger, { _before: o ? v : void 0, children: /* @__PURE__ */ r(B, {}) }),
54
- /* @__PURE__ */ r(i.IncrementTrigger, { children: /* @__PURE__ */ r(C, {}) })
53
+ /* @__PURE__ */ r(i.DecrementTrigger, { _before: o ? j : void 0, children: /* @__PURE__ */ r(y, {}) }),
54
+ /* @__PURE__ */ r(i.IncrementTrigger, { children: /* @__PURE__ */ r(T, {}) })
55
55
  ] }),
56
56
  /* @__PURE__ */ r(i.Input, {})
57
57
  ]
@@ -2,12 +2,12 @@ import { jsx as r } from "react/jsx-runtime";
2
2
  import { Input as T } from "@chakra-ui/react/input";
3
3
  import { InputGroup as E } from "@chakra-ui/react/input-group";
4
4
  import { forwardRef as F } from "react";
5
- import { rem as m } from "../../theme/themeUtils.js";
6
- import b from "../BitkitField/BitkitField.js";
7
- import k from "../../icons/24x24/IconErrorCircleFilled24.js";
8
- import y from "../../icons/16x16/IconErrorCircleFilled16.js";
5
+ import b from "../../icons/16x16/IconErrorCircleFilled16.js";
6
+ import k from "../../icons/16x16/IconWarningYellow16.js";
7
+ import y from "../../icons/24x24/IconErrorCircleFilled24.js";
9
8
  import B from "../../icons/24x24/IconWarningYellow24.js";
10
- import W from "../../icons/16x16/IconWarningYellow16.js";
9
+ import { rem as m } from "../../theme/themeUtils.js";
10
+ import W from "../BitkitField/BitkitField.js";
11
11
  const C = F((c, p) => {
12
12
  const {
13
13
  counter: s,
@@ -25,10 +25,10 @@ const C = F((c, p) => {
25
25
  ...I
26
26
  } = c, h = i === "warning" || !!a, d = i === "error" || !!l;
27
27
  let t;
28
- d ? t = o === "lg" ? /* @__PURE__ */ r(k, { color: "icon/negative" }) : /* @__PURE__ */ r(y, { color: "icon/negative" }) : h && (t = o === "lg" ? /* @__PURE__ */ r(B, { color: "icon/warning" }) : /* @__PURE__ */ r(W, { color: "icon/warning" }));
28
+ d ? t = o === "lg" ? /* @__PURE__ */ r(y, { color: "icon/negative" }) : /* @__PURE__ */ r(b, { color: "icon/negative" }) : h && (t = o === "lg" ? /* @__PURE__ */ r(B, { color: "icon/warning" }) : /* @__PURE__ */ r(k, { color: "icon/warning" }));
29
29
  const w = s && n && e?.value !== void 0 ? `${e.value.toString().length}/${n}` : void 0;
30
30
  return /* @__PURE__ */ r(
31
- b,
31
+ W,
32
32
  {
33
33
  counterText: w,
34
34
  disabled: i === "disabled",
@@ -0,0 +1,11 @@
1
+ import { BadgeProps } from '@chakra-ui/react/badge';
2
+ import { ReactNode } from 'react';
3
+ export type BitkitBadgeProps = {
4
+ children?: string;
5
+ icon?: ReactNode;
6
+ } & Omit<BadgeProps, 'children'>;
7
+ declare const BitkitBadge: import('react').ForwardRefExoticComponent<{
8
+ children?: string;
9
+ icon?: ReactNode;
10
+ } & Omit<BadgeProps, "children"> & import('react').RefAttributes<HTMLSpanElement>>;
11
+ export default BitkitBadge;
@@ -0,0 +1,19 @@
1
+ declare const badgeRecipe: import('@chakra-ui/react').RecipeDefinition<{
2
+ variant: {
3
+ subtle: {};
4
+ bold: {
5
+ color: "text/on-color";
6
+ };
7
+ };
8
+ colorScheme: {
9
+ neutral: {};
10
+ info: {};
11
+ positive: {};
12
+ negative: {};
13
+ warning: {};
14
+ progress: {};
15
+ orange: {};
16
+ turquoise: {};
17
+ };
18
+ }>;
19
+ export default badgeRecipe;
@@ -0,0 +1,156 @@
1
+ import { defineRecipe as s } from "@chakra-ui/react/styled-system";
2
+ const r = s({
3
+ className: "badge",
4
+ base: {
5
+ display: "inline-flex",
6
+ alignItems: "center",
7
+ gap: "4",
8
+ padding: "4",
9
+ borderRadius: "4",
10
+ textStyle: "comp/badge/sm"
11
+ },
12
+ variants: {
13
+ variant: {
14
+ subtle: {},
15
+ bold: {
16
+ color: "text/on-color"
17
+ }
18
+ },
19
+ colorScheme: {
20
+ neutral: {},
21
+ info: {},
22
+ positive: {},
23
+ negative: {},
24
+ warning: {},
25
+ progress: {},
26
+ orange: {},
27
+ turquoise: {}
28
+ }
29
+ },
30
+ compoundVariants: [
31
+ {
32
+ colorScheme: "neutral",
33
+ variant: "subtle",
34
+ css: {
35
+ color: "sys/neutral/strong",
36
+ background: "sys/neutral/subtle"
37
+ }
38
+ },
39
+ {
40
+ colorScheme: "info",
41
+ variant: "subtle",
42
+ css: {
43
+ color: "sys/info/strong",
44
+ background: "sys/info/subtle"
45
+ }
46
+ },
47
+ {
48
+ colorScheme: "positive",
49
+ variant: "subtle",
50
+ css: {
51
+ color: "sys/success/strong",
52
+ background: "sys/success/subtle"
53
+ }
54
+ },
55
+ {
56
+ colorScheme: "negative",
57
+ variant: "subtle",
58
+ css: {
59
+ color: "sys/critical/strong",
60
+ background: "sys/critical/subtle"
61
+ }
62
+ },
63
+ {
64
+ colorScheme: "warning",
65
+ variant: "subtle",
66
+ css: {
67
+ color: "sys/warning/strong",
68
+ background: "sys/warning/subtle"
69
+ }
70
+ },
71
+ {
72
+ colorScheme: "progress",
73
+ variant: "subtle",
74
+ css: {
75
+ color: "sys/interactive/strong",
76
+ background: "sys/interactive/subtle"
77
+ }
78
+ },
79
+ {
80
+ colorScheme: "orange",
81
+ variant: "subtle",
82
+ css: {
83
+ color: "sys/orange/strong",
84
+ background: "sys/orange/subtle"
85
+ }
86
+ },
87
+ {
88
+ colorScheme: "turquoise",
89
+ variant: "subtle",
90
+ css: {
91
+ color: "sys/turquoise/strong",
92
+ background: "sys/turquoise/subtle"
93
+ }
94
+ },
95
+ {
96
+ colorScheme: "neutral",
97
+ variant: "bold",
98
+ css: {
99
+ background: "sys/neutral/bold"
100
+ }
101
+ },
102
+ {
103
+ colorScheme: "info",
104
+ variant: "bold",
105
+ css: {
106
+ background: "sys/info/bold"
107
+ }
108
+ },
109
+ {
110
+ colorScheme: "positive",
111
+ variant: "bold",
112
+ css: {
113
+ background: "sys/success/bold"
114
+ }
115
+ },
116
+ {
117
+ colorScheme: "negative",
118
+ variant: "bold",
119
+ css: {
120
+ background: "sys/critical/bold"
121
+ }
122
+ },
123
+ {
124
+ colorScheme: "warning",
125
+ variant: "bold",
126
+ css: {
127
+ background: "sys/warning/muted",
128
+ color: "text/primary"
129
+ }
130
+ },
131
+ {
132
+ colorScheme: "progress",
133
+ variant: "bold",
134
+ css: {
135
+ background: "sys/interactive/bold"
136
+ }
137
+ },
138
+ {
139
+ colorScheme: "orange",
140
+ variant: "bold",
141
+ css: {
142
+ background: "sys/orange/bold"
143
+ }
144
+ },
145
+ {
146
+ colorScheme: "turquoise",
147
+ variant: "bold",
148
+ css: {
149
+ background: "sys/turquoise/bold"
150
+ }
151
+ }
152
+ ]
153
+ });
154
+ export {
155
+ r as default
156
+ };
@@ -1,4 +1,22 @@
1
1
  declare const recipes: {
2
+ badge: import('@chakra-ui/react').RecipeDefinition<{
3
+ variant: {
4
+ subtle: {};
5
+ bold: {
6
+ color: "text/on-color";
7
+ };
8
+ };
9
+ colorScheme: {
10
+ neutral: {};
11
+ info: {};
12
+ positive: {};
13
+ negative: {};
14
+ warning: {};
15
+ progress: {};
16
+ orange: {};
17
+ turquoise: {};
18
+ };
19
+ }>;
2
20
  button: import('@chakra-ui/react').RecipeDefinition<{
3
21
  variant: Record<string, import('@chakra-ui/react').SystemStyleObject>;
4
22
  size: {
@@ -1,19 +1,21 @@
1
- import e from "./Button.recipe.js";
2
- import r from "./Input.recipe.js";
3
- import t from "./Link.recipe.js";
4
- import o from "./Separator.recipe.js";
5
- import p from "./Skeleton.recipe.js";
6
- import i from "./Spinner.recipe.js";
7
- import m from "./Textarea.recipe.js";
8
- const u = {
9
- button: e,
10
- input: r,
11
- link: t,
12
- separator: o,
13
- skeleton: p,
14
- spinner: i,
15
- textarea: m
1
+ import e from "./Badge.recipe.js";
2
+ import r from "./Button.recipe.js";
3
+ import t from "./Input.recipe.js";
4
+ import o from "./Link.recipe.js";
5
+ import p from "./Separator.recipe.js";
6
+ import i from "./Skeleton.recipe.js";
7
+ import m from "./Spinner.recipe.js";
8
+ import n from "./Textarea.recipe.js";
9
+ const k = {
10
+ badge: e,
11
+ button: r,
12
+ input: t,
13
+ link: o,
14
+ separator: p,
15
+ skeleton: i,
16
+ spinner: m,
17
+ textarea: n
16
18
  };
17
19
  export {
18
- u as default
20
+ k as default
19
21
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit-v2",
3
3
  "private": false,
4
- "version": "0.3.61",
4
+ "version": "0.3.63",
5
5
  "description": "Bitrise Design System Components built with Chakra UI v3",
6
6
  "keywords": [
7
7
  "react",
@@ -63,10 +63,10 @@
63
63
  "@storybook/addon-docs": "10.0.7",
64
64
  "@storybook/react-vite": "10.0.7",
65
65
  "@svgr/plugin-jsx": "^8.1.0",
66
- "@types/node": "^24.10.0",
67
- "@types/react-dom": "^19.2.2",
66
+ "@types/node": "^24.10.1",
67
+ "@types/react-dom": "^19.2.3",
68
68
  "@types/react": "^19.2.3",
69
- "@vitejs/plugin-react": "^5.1.0",
69
+ "@vitejs/plugin-react": "^5.1.1",
70
70
  "axios": "^1.13.2",
71
71
  "es-toolkit": "^1.41.0",
72
72
  "react-dom": "^19.2.0",
@@ -90,10 +90,8 @@
90
90
  "access": "public"
91
91
  },
92
92
  "imports": {
93
- "#*": [
94
- "./*",
95
- "./*.ts",
96
- "./*.tsx"
93
+ "#storybook/*": [
94
+ "./.storybook/*.tsx"
97
95
  ]
98
96
  }
99
97
  }