@bitrise/bitkit-v2 0.3.142 → 0.3.144
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/BitkitActionMenu/BitkitActionMenu.d.ts +28 -0
- package/dist/components/BitkitControlButton/BitkitControlButton.js +7 -7
- package/dist/theme/recipes/ControlButton.recipe.d.ts +8 -0
- package/dist/theme/recipes/ControlButton.recipe.js +13 -5
- package/dist/theme/recipes/index.d.ts +8 -0
- package/dist/theme/slot-recipes/Menu.recipe.d.ts +20 -0
- package/dist/theme/slot-recipes/Menu.recipe.js +115 -0
- package/dist/theme/slot-recipes/Tooltip.recipe.js +5 -2
- package/dist/theme/slot-recipes/index.d.ts +19 -0
- package/dist/theme/slot-recipes/index.js +23 -21
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { MenuItemGroupProps, MenuItemProps, MenuRootProps } from '@chakra-ui/react/menu';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { BitkitIconComponent } from '../../icons';
|
|
4
|
+
interface BitkitMenuRootProps extends Omit<MenuRootProps, 'children'> {
|
|
5
|
+
trigger: ReactNode;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
interface BitkitMenuItemProps extends MenuItemProps {
|
|
9
|
+
danger?: boolean;
|
|
10
|
+
secondaryText?: ReactNode;
|
|
11
|
+
icon?: BitkitIconComponent;
|
|
12
|
+
}
|
|
13
|
+
interface BitkitMenuGroupProps extends MenuItemGroupProps {
|
|
14
|
+
label: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare const BitkitActionMenu: {
|
|
17
|
+
Root: {
|
|
18
|
+
({ trigger, children, ...props }: BitkitMenuRootProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
Separator: {
|
|
22
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
Item: import('react').ForwardRefExoticComponent<BitkitMenuItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
26
|
+
Group: import('react').ForwardRefExoticComponent<BitkitMenuGroupProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
27
|
+
};
|
|
28
|
+
export default BitkitActionMenu;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { Skeleton as d } from "@chakra-ui/react/skeleton";
|
|
3
3
|
import { useRecipe as f, chakra as k } from "@chakra-ui/react/styled-system";
|
|
4
4
|
import { forwardRef as u } from "react";
|
|
5
5
|
import x from "../BitkitTooltip/BitkitTooltip.js";
|
|
6
|
-
const B = u((r,
|
|
7
|
-
const { icon:
|
|
8
|
-
return /* @__PURE__ */
|
|
6
|
+
const B = u((r, s) => {
|
|
7
|
+
const { icon: n, isDanger: l, label: i, size: t = "sm", state: e, tooltipProps: a, ...c } = r, m = f({ key: "controlButton" }), p = t === "xxs" || t === "xs" ? "16" : "24";
|
|
8
|
+
return /* @__PURE__ */ o(x, { showArrow: !1, size: "sm", text: i, ...a, children: /* @__PURE__ */ o(
|
|
9
9
|
k.button,
|
|
10
10
|
{
|
|
11
|
-
ref:
|
|
11
|
+
ref: s,
|
|
12
12
|
"aria-label": i,
|
|
13
13
|
disabled: e === "disabled" || e === "skeleton",
|
|
14
14
|
...c,
|
|
15
|
-
css: m({ isDanger: l, size:
|
|
16
|
-
children: /* @__PURE__ */
|
|
15
|
+
css: m({ isDanger: l, size: t }),
|
|
16
|
+
children: /* @__PURE__ */ o(d, { loading: e === "skeleton", children: /* @__PURE__ */ o(n, { size: p }) })
|
|
17
17
|
}
|
|
18
18
|
) });
|
|
19
19
|
});
|
|
@@ -5,6 +5,10 @@ declare const controlButtonRecipe: import('@chakra-ui/react').RecipeDefinition<{
|
|
|
5
5
|
_hover: {
|
|
6
6
|
background: "button/tertiary/bg-hover";
|
|
7
7
|
color: "button/secondary/fg-hover";
|
|
8
|
+
_active: {
|
|
9
|
+
background: "button/tertiary/bg-active";
|
|
10
|
+
color: "button/secondary/fg-active";
|
|
11
|
+
};
|
|
8
12
|
};
|
|
9
13
|
_active: {
|
|
10
14
|
background: "button/tertiary/bg-active";
|
|
@@ -19,6 +23,10 @@ declare const controlButtonRecipe: import('@chakra-ui/react').RecipeDefinition<{
|
|
|
19
23
|
_hover: {
|
|
20
24
|
background: "button/danger-secondary/bg-hover";
|
|
21
25
|
color: "button/danger-secondary/fg-hover";
|
|
26
|
+
_active: {
|
|
27
|
+
background: "button/danger-secondary/bg-active";
|
|
28
|
+
color: "button/danger-secondary/fg-active";
|
|
29
|
+
};
|
|
22
30
|
};
|
|
23
31
|
_active: {
|
|
24
32
|
background: "button/danger-secondary/bg-active";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineRecipe as
|
|
2
|
-
const
|
|
1
|
+
import { defineRecipe as o } from "@chakra-ui/react/styled-system";
|
|
2
|
+
const a = o({
|
|
3
3
|
className: "control-button",
|
|
4
4
|
base: {
|
|
5
5
|
display: "inline-flex",
|
|
@@ -24,7 +24,11 @@ const r = e({
|
|
|
24
24
|
color: "button/secondary/fg",
|
|
25
25
|
_hover: {
|
|
26
26
|
background: "button/tertiary/bg-hover",
|
|
27
|
-
color: "button/secondary/fg-hover"
|
|
27
|
+
color: "button/secondary/fg-hover",
|
|
28
|
+
_active: {
|
|
29
|
+
background: "button/tertiary/bg-active",
|
|
30
|
+
color: "button/secondary/fg-active"
|
|
31
|
+
}
|
|
28
32
|
},
|
|
29
33
|
_active: {
|
|
30
34
|
background: "button/tertiary/bg-active",
|
|
@@ -38,7 +42,11 @@ const r = e({
|
|
|
38
42
|
color: "button/danger-secondary/fg",
|
|
39
43
|
_hover: {
|
|
40
44
|
background: "button/danger-secondary/bg-hover",
|
|
41
|
-
color: "button/danger-secondary/fg-hover"
|
|
45
|
+
color: "button/danger-secondary/fg-hover",
|
|
46
|
+
_active: {
|
|
47
|
+
background: "button/danger-secondary/bg-active",
|
|
48
|
+
color: "button/danger-secondary/fg-active"
|
|
49
|
+
}
|
|
42
50
|
},
|
|
43
51
|
_active: {
|
|
44
52
|
background: "button/danger-secondary/bg-active",
|
|
@@ -63,5 +71,5 @@ const r = e({
|
|
|
63
71
|
}
|
|
64
72
|
});
|
|
65
73
|
export {
|
|
66
|
-
|
|
74
|
+
a as default
|
|
67
75
|
};
|
|
@@ -69,6 +69,10 @@ declare const recipes: {
|
|
|
69
69
|
_hover: {
|
|
70
70
|
background: "button/tertiary/bg-hover";
|
|
71
71
|
color: "button/secondary/fg-hover";
|
|
72
|
+
_active: {
|
|
73
|
+
background: "button/tertiary/bg-active";
|
|
74
|
+
color: "button/secondary/fg-active";
|
|
75
|
+
};
|
|
72
76
|
};
|
|
73
77
|
_active: {
|
|
74
78
|
background: "button/tertiary/bg-active";
|
|
@@ -83,6 +87,10 @@ declare const recipes: {
|
|
|
83
87
|
_hover: {
|
|
84
88
|
background: "button/danger-secondary/bg-hover";
|
|
85
89
|
color: "button/danger-secondary/fg-hover";
|
|
90
|
+
_active: {
|
|
91
|
+
background: "button/danger-secondary/bg-active";
|
|
92
|
+
color: "button/danger-secondary/fg-active";
|
|
93
|
+
};
|
|
86
94
|
};
|
|
87
95
|
_active: {
|
|
88
96
|
background: "button/danger-secondary/bg-active";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const menuSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "separator" | "item" | "itemIndicator" | "trigger" | "arrow" | "arrowTip" | "positioner" | "indicator" | "itemText" | "itemGroup" | "itemGroupLabel" | "contextTrigger" | "triggerItem" | "itemCommand" | "itemHelper", {
|
|
2
|
+
size: {
|
|
3
|
+
lg: {
|
|
4
|
+
item: {
|
|
5
|
+
paddingY: "12";
|
|
6
|
+
textStyle: "body/lg/regular";
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
md: {
|
|
10
|
+
item: {
|
|
11
|
+
_icon: {
|
|
12
|
+
marginTop: "2";
|
|
13
|
+
};
|
|
14
|
+
paddingY: "8";
|
|
15
|
+
textStyle: "body/md/regular";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}>;
|
|
20
|
+
export default menuSlotRecipe;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { menuAnatomy as t } from "@chakra-ui/react/anatomy";
|
|
2
|
+
import { defineSlotRecipe as a } from "@chakra-ui/react/styled-system";
|
|
3
|
+
const e = {
|
|
4
|
+
background: "button/secondary/bg-active",
|
|
5
|
+
_icon: {
|
|
6
|
+
color: "icon/primary"
|
|
7
|
+
}
|
|
8
|
+
}, o = {
|
|
9
|
+
background: "button/danger-secondary/bg-active",
|
|
10
|
+
color: "button/danger-secondary/fg-active",
|
|
11
|
+
_icon: {
|
|
12
|
+
color: "button/danger-secondary/fg-active"
|
|
13
|
+
}
|
|
14
|
+
}, i = a({
|
|
15
|
+
className: "menu",
|
|
16
|
+
slots: [...t.keys(), "itemHelper"],
|
|
17
|
+
variants: {
|
|
18
|
+
size: {
|
|
19
|
+
lg: {
|
|
20
|
+
item: {
|
|
21
|
+
paddingY: "12",
|
|
22
|
+
textStyle: "body/lg/regular"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
md: {
|
|
26
|
+
item: {
|
|
27
|
+
_icon: {
|
|
28
|
+
marginTop: "2"
|
|
29
|
+
},
|
|
30
|
+
paddingY: "8",
|
|
31
|
+
textStyle: "body/md/regular"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
base: {
|
|
37
|
+
content: {
|
|
38
|
+
paddingY: "8",
|
|
39
|
+
border: "1px solid",
|
|
40
|
+
borderColor: "border/minimal",
|
|
41
|
+
_focusVisible: { outline: "none" },
|
|
42
|
+
boxShadow: "large",
|
|
43
|
+
background: "background/primary",
|
|
44
|
+
maxHeight: "var(--available-height)",
|
|
45
|
+
_open: {
|
|
46
|
+
animationStyle: "slide-fade-in",
|
|
47
|
+
animationDuration: "fast"
|
|
48
|
+
},
|
|
49
|
+
_closed: {
|
|
50
|
+
animationStyle: "slide-fade-out",
|
|
51
|
+
animationDuration: "faster"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
itemHelper: {
|
|
55
|
+
textStyle: "body/sm/regular",
|
|
56
|
+
color: "text/secondary"
|
|
57
|
+
},
|
|
58
|
+
item: {
|
|
59
|
+
_icon: {
|
|
60
|
+
color: "icon/secondary",
|
|
61
|
+
_active: {
|
|
62
|
+
color: "icon/primary"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
display: "flex",
|
|
66
|
+
gap: "12",
|
|
67
|
+
userSelect: "none",
|
|
68
|
+
flexDirection: "row",
|
|
69
|
+
paddingLeft: "16",
|
|
70
|
+
paddingRight: "24",
|
|
71
|
+
"&[data-danger]": {
|
|
72
|
+
color: "button/danger-secondary/fg",
|
|
73
|
+
_icon: {
|
|
74
|
+
color: "button/danger-secondary/fg"
|
|
75
|
+
},
|
|
76
|
+
_active: o,
|
|
77
|
+
_highlighted: {
|
|
78
|
+
background: "button/danger-secondary/bg-hover",
|
|
79
|
+
color: "button/danger-secondary/fg-hover",
|
|
80
|
+
_active: o,
|
|
81
|
+
_icon: {
|
|
82
|
+
color: "button/danger-secondary/fg-hover"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
_active: e,
|
|
87
|
+
_highlighted: {
|
|
88
|
+
background: "button/secondary/bg-hover",
|
|
89
|
+
_active: e
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
itemGroupLabel: {
|
|
93
|
+
textStyle: "heading/h6",
|
|
94
|
+
color: "text/tertiary",
|
|
95
|
+
paddingTop: "12",
|
|
96
|
+
paddingLeft: "16",
|
|
97
|
+
paddingRight: "24",
|
|
98
|
+
paddingBottom: "6",
|
|
99
|
+
display: "flex",
|
|
100
|
+
gap: "12",
|
|
101
|
+
flexDirection: "row",
|
|
102
|
+
alignItems: "center"
|
|
103
|
+
},
|
|
104
|
+
separator: {
|
|
105
|
+
color: "border/minimal",
|
|
106
|
+
marginY: "8"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
defaultVariants: {
|
|
110
|
+
size: "lg"
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
export {
|
|
114
|
+
i as default
|
|
115
|
+
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { tooltipAnatomy as t } from "@chakra-ui/react/anatomy";
|
|
2
|
-
import { defineSlotRecipe as
|
|
2
|
+
import { defineSlotRecipe as r } from "@chakra-ui/react/styled-system";
|
|
3
3
|
import { rem as o } from "../themeUtils.js";
|
|
4
|
-
const e =
|
|
4
|
+
const e = r({
|
|
5
5
|
className: "tooltip",
|
|
6
6
|
slots: t.keys(),
|
|
7
7
|
base: {
|
|
8
|
+
positioner: {
|
|
9
|
+
pointerEvents: "none"
|
|
10
|
+
},
|
|
8
11
|
content: {
|
|
9
12
|
"--tooltip-bg": "colors.background.contrast",
|
|
10
13
|
backgroundColor: "var(--tooltip-bg)",
|
|
@@ -673,5 +673,24 @@ declare const slotRecipes: {
|
|
|
673
673
|
};
|
|
674
674
|
}>;
|
|
675
675
|
accordion: import('@chakra-ui/react').SlotRecipeDefinition<"icon" | "suffix" | "root" | "item" | "itemTrigger" | "itemContent" | "itemIndicator" | "itemBody" | "secdText", import('@chakra-ui/react').SlotRecipeVariantRecord<"icon" | "suffix" | "root" | "item" | "itemTrigger" | "itemContent" | "itemIndicator" | "itemBody" | "secdText">>;
|
|
676
|
+
menu: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "separator" | "item" | "itemIndicator" | "trigger" | "arrow" | "arrowTip" | "positioner" | "indicator" | "itemText" | "itemGroup" | "itemGroupLabel" | "contextTrigger" | "triggerItem" | "itemCommand" | "itemHelper", {
|
|
677
|
+
size: {
|
|
678
|
+
lg: {
|
|
679
|
+
item: {
|
|
680
|
+
paddingY: "12";
|
|
681
|
+
textStyle: "body/lg/regular";
|
|
682
|
+
};
|
|
683
|
+
};
|
|
684
|
+
md: {
|
|
685
|
+
item: {
|
|
686
|
+
_icon: {
|
|
687
|
+
marginTop: "2";
|
|
688
|
+
};
|
|
689
|
+
paddingY: "8";
|
|
690
|
+
textStyle: "body/md/regular";
|
|
691
|
+
};
|
|
692
|
+
};
|
|
693
|
+
};
|
|
694
|
+
}>;
|
|
676
695
|
};
|
|
677
696
|
export default slotRecipes;
|
|
@@ -12,16 +12,17 @@ import S from "./EmptyState.recipe.js";
|
|
|
12
12
|
import f from "./ExpandableCard.recipe.js";
|
|
13
13
|
import R from "./Field.recipe.js";
|
|
14
14
|
import d from "./Fieldset.recipe.js";
|
|
15
|
-
import b from "./
|
|
16
|
-
import n from "./
|
|
17
|
-
import s from "./
|
|
18
|
-
import
|
|
19
|
-
import x from "./
|
|
20
|
-
import k from "./
|
|
21
|
-
import h from "./
|
|
22
|
-
import v from "./
|
|
23
|
-
import P from "./
|
|
24
|
-
|
|
15
|
+
import b from "./Menu.recipe.js";
|
|
16
|
+
import n from "./NativeSelect.recipe.js";
|
|
17
|
+
import s from "./NumberInput.recipe.js";
|
|
18
|
+
import u from "./RadioGroup.recipe.js";
|
|
19
|
+
import { selectSlotRecipe as x } from "./Select.recipe.js";
|
|
20
|
+
import k from "./Switch.recipe.js";
|
|
21
|
+
import h from "./Table.recipe.js";
|
|
22
|
+
import v from "./Tabs.recipe.js";
|
|
23
|
+
import P from "./Tag.recipe.js";
|
|
24
|
+
import g from "./Tooltip.recipe.js";
|
|
25
|
+
const W = {
|
|
25
26
|
actionBar: o,
|
|
26
27
|
avatar: r,
|
|
27
28
|
breadcrumb: i,
|
|
@@ -34,18 +35,19 @@ const U = {
|
|
|
34
35
|
expandableCard: f,
|
|
35
36
|
field: R,
|
|
36
37
|
fieldset: d,
|
|
37
|
-
nativeSelect:
|
|
38
|
+
nativeSelect: n,
|
|
38
39
|
alert: t,
|
|
39
|
-
numberInput:
|
|
40
|
-
radioGroup:
|
|
41
|
-
select:
|
|
42
|
-
switch:
|
|
43
|
-
table:
|
|
44
|
-
tabs:
|
|
45
|
-
tag:
|
|
46
|
-
tooltip:
|
|
47
|
-
accordion: e
|
|
40
|
+
numberInput: s,
|
|
41
|
+
radioGroup: u,
|
|
42
|
+
select: x,
|
|
43
|
+
switch: k,
|
|
44
|
+
table: h,
|
|
45
|
+
tabs: v,
|
|
46
|
+
tag: P,
|
|
47
|
+
tooltip: g,
|
|
48
|
+
accordion: e,
|
|
49
|
+
menu: b
|
|
48
50
|
};
|
|
49
51
|
export {
|
|
50
|
-
|
|
52
|
+
W as default
|
|
51
53
|
};
|