@bitrise/bitkit-v2 0.3.151 → 0.3.152
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/components/BitkitButton/BitkitButton.d.ts +3 -3
- package/dist/components/BitkitButton/BitkitButton.js +12 -12
- package/dist/components/BitkitCalendar/components/CalendarNextTrigger.js +1 -1
- package/dist/components/BitkitCalendar/components/CalendarPrevTrigger.js +3 -3
- package/dist/theme/recipes/Button.recipe.js +24 -9
- package/dist/theme/recipes/ControlButton.recipe.d.ts +1 -1
- package/dist/theme/recipes/ControlButton.recipe.js +4 -4
- package/dist/theme/recipes/index.d.ts +1 -1
- package/dist/theme/semantic-tokens/semanticColors.js +14 -2
- package/dist/theme/slot-recipes/NumberInput.recipe.js +1 -1
- package/package.json +4 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ButtonProps } from '@chakra-ui/react/button';
|
|
2
2
|
import { BitkitIconComponent } from '../../icons';
|
|
3
|
-
export interface BitkitButtonProps extends Omit<ButtonProps, 'colorPalette' | 'disabled' | 'loading' | 'loadingText' | 'spinner' | 'spinnerPlacement'> {
|
|
3
|
+
export interface BitkitButtonProps extends Omit<ButtonProps, 'children' | 'colorPalette' | 'disabled' | 'loading' | 'loadingText' | 'spinner' | 'spinnerPlacement'> {
|
|
4
4
|
children: string;
|
|
5
|
-
|
|
6
|
-
rightIcon?: BitkitIconComponent;
|
|
5
|
+
icon?: BitkitIconComponent;
|
|
7
6
|
state?: 'disabled' | 'loading' | 'skeleton';
|
|
7
|
+
suffixIcon?: BitkitIconComponent;
|
|
8
8
|
}
|
|
9
9
|
declare const BitkitButton: import('react').ForwardRefExoticComponent<BitkitButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
10
10
|
export default BitkitButton;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Button as
|
|
3
|
-
import { Skeleton as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
const
|
|
6
|
-
const { children: a,
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
|
|
1
|
+
import { jsx as i, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { Button as f } from "@chakra-ui/react/button";
|
|
3
|
+
import { Skeleton as m } from "@chakra-ui/react/skeleton";
|
|
4
|
+
import { forwardRef as u } from "react";
|
|
5
|
+
const p = u((r, d) => {
|
|
6
|
+
const { children: a, icon: t, size: e, state: o, suffixIcon: n, ...l } = r, s = e === "sm" ? "16" : "24";
|
|
7
|
+
return /* @__PURE__ */ i(m, { asChild: !0, loading: o === "skeleton", children: /* @__PURE__ */ c(f, { disabled: o === "disabled", loading: o === "loading", ref: d, size: e, ...l, children: [
|
|
8
|
+
t && /* @__PURE__ */ i(t, { size: s }),
|
|
9
|
+
/* @__PURE__ */ i("span", { children: a }),
|
|
10
|
+
n && /* @__PURE__ */ i(n, { size: s })
|
|
11
11
|
] }) });
|
|
12
12
|
});
|
|
13
|
-
|
|
13
|
+
p.displayName = "BitkitButton";
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
p as default
|
|
16
16
|
};
|
|
@@ -4,7 +4,7 @@ import o from "../../../icons/IconChevronRight.js";
|
|
|
4
4
|
import { useDatePickerContext as i } from "@ark-ui/react/date-picker";
|
|
5
5
|
const m = () => {
|
|
6
6
|
const t = i();
|
|
7
|
-
return /* @__PURE__ */ r(e, { ...t.getNextTriggerProps(), color: "button/secondary/fg", size: "sm", variant: "tertiary", children: /* @__PURE__ */ r(o, { size: "16" }) });
|
|
7
|
+
return /* @__PURE__ */ r(e, { ...t.getNextTriggerProps(), color: "button/secondary/fg/text", size: "sm", variant: "tertiary", children: /* @__PURE__ */ r(o, { size: "16" }) });
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
10
|
m as default
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { IconButton as
|
|
2
|
+
import { IconButton as e } from "@chakra-ui/react";
|
|
3
3
|
import o from "../../../icons/IconChevronLeft.js";
|
|
4
4
|
import { useDatePickerContext as i } from "@ark-ui/react/date-picker";
|
|
5
5
|
const m = () => {
|
|
6
|
-
const
|
|
7
|
-
return /* @__PURE__ */ r(
|
|
6
|
+
const t = i();
|
|
7
|
+
return /* @__PURE__ */ r(e, { ...t.getPrevTriggerProps(), color: "button/secondary/fg/text", size: "sm", variant: "tertiary", children: /* @__PURE__ */ r(o, { size: "16" }) });
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
10
|
m as default
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineRecipe as
|
|
1
|
+
import { defineRecipe as n } from "@chakra-ui/react/styled-system";
|
|
2
2
|
import { rem as r } from "../themeUtils.js";
|
|
3
|
-
const
|
|
3
|
+
const l = [
|
|
4
4
|
"primary",
|
|
5
5
|
"secondary",
|
|
6
6
|
"tertiary",
|
|
@@ -10,25 +10,37 @@ const s = [
|
|
|
10
10
|
"ai-primary",
|
|
11
11
|
"ai-secondary",
|
|
12
12
|
"ai-tertiary"
|
|
13
|
-
],
|
|
13
|
+
], c = l.reduce(
|
|
14
14
|
(e, o) => {
|
|
15
15
|
let t = o?.includes("secondary") ? `{colors.button.${o}.border}` : `{colors.button.${o}.bg}`, d = o?.includes("secondary") ? `{colors.button.${o}.border-disabled}` : `{colors.button.${o}.bg-disabled}`;
|
|
16
16
|
return o?.includes("tertiary") && (t = "transparent", d = "transparent"), e[o] = {
|
|
17
17
|
"&:hover": {
|
|
18
18
|
backgroundColor: `{colors.button.${o}.bg-hover}`,
|
|
19
19
|
borderColor: o?.includes("secondary") ? `{colors.button.${o}.border-hover}` : `{colors.button.${o}.bg-hover}`,
|
|
20
|
-
color: `{colors.button.${o}.fg-hover}
|
|
20
|
+
color: `{colors.button.${o}.fg-hover}`,
|
|
21
|
+
_icon: {
|
|
22
|
+
color: o === "secondary" ? "currentColor" : void 0
|
|
23
|
+
}
|
|
21
24
|
},
|
|
22
25
|
"&:active": {
|
|
23
26
|
backgroundColor: `{colors.button.${o}.bg-active}`,
|
|
24
27
|
borderColor: o?.includes("secondary") ? `{colors.button.${o}.border-active}` : `{colors.button.${o}.bg-active}`,
|
|
25
|
-
color: `{colors.button.${o}.fg-active}
|
|
28
|
+
color: `{colors.button.${o}.fg-active}`,
|
|
29
|
+
_icon: {
|
|
30
|
+
color: o === "secondary" ? "currentColor" : void 0
|
|
31
|
+
}
|
|
26
32
|
},
|
|
27
33
|
_disabled: {
|
|
28
34
|
backgroundColor: `{colors.button.${o}.bg-disabled}!`,
|
|
29
35
|
borderColor: `${d}!`,
|
|
30
36
|
color: `{colors.button.${o}.fg-disabled}!`,
|
|
31
|
-
cursor: "not-allowed"
|
|
37
|
+
cursor: "not-allowed",
|
|
38
|
+
_icon: {
|
|
39
|
+
color: o === "secondary" ? "currentColor" : void 0
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
_icon: {
|
|
43
|
+
color: o === "secondary" ? "button/secondary/fg/icon" : void 0
|
|
32
44
|
},
|
|
33
45
|
backgroundColor: `{colors.button.${o}.bg}`,
|
|
34
46
|
borderColor: t,
|
|
@@ -38,7 +50,7 @@ const s = [
|
|
|
38
50
|
}, e;
|
|
39
51
|
},
|
|
40
52
|
{}
|
|
41
|
-
), b =
|
|
53
|
+
), b = n({
|
|
42
54
|
className: "button",
|
|
43
55
|
base: {
|
|
44
56
|
borderRadius: "4",
|
|
@@ -48,16 +60,19 @@ const s = [
|
|
|
48
60
|
display: "inline-flex",
|
|
49
61
|
alignItems: "center",
|
|
50
62
|
justifyContent: "center",
|
|
51
|
-
gap: "
|
|
63
|
+
gap: "4",
|
|
52
64
|
position: "relative",
|
|
53
65
|
"--spinner-color": "currentColor",
|
|
54
66
|
"--spinner-size": "sizes.16",
|
|
55
67
|
_disabled: {
|
|
56
68
|
cursor: "not-allowed"
|
|
69
|
+
},
|
|
70
|
+
"& span": {
|
|
71
|
+
paddingInline: "4"
|
|
57
72
|
}
|
|
58
73
|
},
|
|
59
74
|
variants: {
|
|
60
|
-
variant:
|
|
75
|
+
variant: c,
|
|
61
76
|
size: {
|
|
62
77
|
sm: {
|
|
63
78
|
minWidth: "32",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const controlButtonRecipe: import('@chakra-ui/react').RecipeDefinition<{
|
|
2
2
|
isDanger: {
|
|
3
3
|
false: {
|
|
4
|
-
color: "button/secondary/fg";
|
|
4
|
+
color: "button/secondary/fg/text";
|
|
5
5
|
_hover: {
|
|
6
6
|
background: "button/tertiary/bg-hover";
|
|
7
7
|
color: "button/secondary/fg-hover";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineRecipe as
|
|
2
|
-
const
|
|
1
|
+
import { defineRecipe as e } from "@chakra-ui/react/styled-system";
|
|
2
|
+
const t = e({
|
|
3
3
|
className: "control-button",
|
|
4
4
|
base: {
|
|
5
5
|
display: "inline-flex",
|
|
@@ -21,7 +21,7 @@ const a = o({
|
|
|
21
21
|
variants: {
|
|
22
22
|
isDanger: {
|
|
23
23
|
false: {
|
|
24
|
-
color: "button/secondary/fg",
|
|
24
|
+
color: "button/secondary/fg/text",
|
|
25
25
|
_hover: {
|
|
26
26
|
background: "button/tertiary/bg-hover",
|
|
27
27
|
color: "button/secondary/fg-hover",
|
|
@@ -71,5 +71,5 @@ const a = o({
|
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
73
|
export {
|
|
74
|
-
|
|
74
|
+
t as default
|
|
75
75
|
};
|
|
@@ -65,7 +65,7 @@ declare const recipes: {
|
|
|
65
65
|
controlButton: import('@chakra-ui/react').RecipeDefinition<{
|
|
66
66
|
isDanger: {
|
|
67
67
|
false: {
|
|
68
|
-
color: "button/secondary/fg";
|
|
68
|
+
color: "button/secondary/fg/text";
|
|
69
69
|
_hover: {
|
|
70
70
|
background: "button/tertiary/bg-hover";
|
|
71
71
|
color: "button/secondary/fg-hover";
|
|
@@ -948,8 +948,20 @@ const a = e.colors(
|
|
|
948
948
|
}
|
|
949
949
|
},
|
|
950
950
|
fg: {
|
|
951
|
-
|
|
952
|
-
|
|
951
|
+
base: {
|
|
952
|
+
value: {
|
|
953
|
+
base: "{colors.sys.fg.primary}"
|
|
954
|
+
}
|
|
955
|
+
},
|
|
956
|
+
text: {
|
|
957
|
+
value: {
|
|
958
|
+
base: "{colors.sys.fg.primary}"
|
|
959
|
+
}
|
|
960
|
+
},
|
|
961
|
+
icon: {
|
|
962
|
+
value: {
|
|
963
|
+
base: "{colors.sys.fg.secondary}"
|
|
964
|
+
}
|
|
953
965
|
}
|
|
954
966
|
},
|
|
955
967
|
"fg-hover": {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitrise/bitkit-v2",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.152",
|
|
5
5
|
"description": "Bitrise Design System Components built with Chakra UI V3",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"react",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"@figma-export/output-components-as-svg": "^6.4.0",
|
|
61
61
|
"@figma-export/transform-svg-with-svgo": "^6.4.0",
|
|
62
62
|
"@google-cloud/storage": "^7.19.0",
|
|
63
|
-
"@storybook/addon-docs": "10.3.
|
|
64
|
-
"@storybook/react-vite": "10.3.
|
|
63
|
+
"@storybook/addon-docs": "10.3.3",
|
|
64
|
+
"@storybook/react-vite": "10.3.3",
|
|
65
65
|
"@svgr/plugin-jsx": "^8.1.0",
|
|
66
66
|
"@types/node": "^24.12.0",
|
|
67
67
|
"@types/react": "^19.2.14",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"react": "^19.2.4",
|
|
73
73
|
"react-dom": "^19.2.4",
|
|
74
74
|
"release-it": "^19.2.4",
|
|
75
|
-
"storybook": "10.3.
|
|
75
|
+
"storybook": "10.3.3",
|
|
76
76
|
"tsx": "^4.21.0",
|
|
77
77
|
"typescript": "^5.9.3",
|
|
78
78
|
"vite": "^7.3.1",
|