@bitrise/bitkit-v2 0.3.106 → 0.3.107
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/BitkitExpandableCard/BitkitExpandableCard.d.ts +2 -1
- package/dist/components/BitkitExpandableCard/BitkitExpandableCard.js +16 -13
- package/dist/theme/slot-recipes/ExpandableCard.recipe.d.ts +7 -1
- package/dist/theme/slot-recipes/ExpandableCard.recipe.js +11 -3
- package/dist/theme/slot-recipes/index.d.ts +7 -1
- package/package.json +1 -1
|
@@ -13,8 +13,9 @@ type ControlledProps = {
|
|
|
13
13
|
export type BitkitExpandableCardProps = Omit<CollapsibleRootProps, 'defaultOpen' | 'onOpenChange' | 'open'> & {
|
|
14
14
|
children: ReactNode;
|
|
15
15
|
icon?: ReactElement;
|
|
16
|
+
secdText?: ReactNode;
|
|
16
17
|
size: 'md' | 'lg';
|
|
17
|
-
suffix?:
|
|
18
|
+
suffix?: ReactNode;
|
|
18
19
|
title: ReactNode;
|
|
19
20
|
} & (UncontrolledProps | ControlledProps);
|
|
20
21
|
declare const BitkitExpandableCard: {
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
import { jsx as n, jsxs as o } from "react/jsx-runtime";
|
|
2
2
|
import { Box as r } from "@chakra-ui/react/box";
|
|
3
|
-
import { Card as
|
|
3
|
+
import { Card as y } from "@chakra-ui/react/card";
|
|
4
4
|
import { Collapsible as i } from "@chakra-ui/react/collapsible";
|
|
5
|
-
import { useSlotRecipe as
|
|
6
|
-
import { Text as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
9
|
-
const { children:
|
|
10
|
-
return /* @__PURE__ */ n(
|
|
5
|
+
import { useSlotRecipe as b } from "@chakra-ui/react/styled-system";
|
|
6
|
+
import { Text as d } from "@chakra-ui/react/text";
|
|
7
|
+
import I from "../../icons/24x24/IconChevronDown24.js";
|
|
8
|
+
const T = (a) => {
|
|
9
|
+
const { children: p, defaultExpanded: f, expanded: m, icon: s, onChange: t, secdText: l, size: x = "lg", suffix: c, title: h, ...g } = a, e = b({ key: "expandableCard" })({ size: x }), C = t ? (u) => t(u.open) : void 0;
|
|
10
|
+
return /* @__PURE__ */ n(y.Root, { css: e.root, children: /* @__PURE__ */ o(i.Root, { defaultOpen: f, open: m, onOpenChange: C, ...g, children: [
|
|
11
11
|
/* @__PURE__ */ o(i.Trigger, { css: e.header, children: [
|
|
12
12
|
/* @__PURE__ */ o(r, { display: "flex", alignItems: "center", gap: "8", children: [
|
|
13
13
|
s && /* @__PURE__ */ n(r, { css: e.icon, children: s }),
|
|
14
|
-
|
|
14
|
+
/* @__PURE__ */ o(r, { display: "flex", alignItems: "flex-start", flexDirection: "column", children: [
|
|
15
|
+
h,
|
|
16
|
+
!!l && /* @__PURE__ */ n(d, { css: e.secdText, children: l })
|
|
17
|
+
] })
|
|
15
18
|
] }),
|
|
16
19
|
/* @__PURE__ */ o(r, { display: "flex", alignItems: "center", children: [
|
|
17
|
-
!!
|
|
18
|
-
/* @__PURE__ */ n(
|
|
20
|
+
!!c && /* @__PURE__ */ n(d, { css: e.suffix, children: c }),
|
|
21
|
+
/* @__PURE__ */ n(I, { css: e.chevron })
|
|
19
22
|
] })
|
|
20
23
|
] }),
|
|
21
|
-
/* @__PURE__ */ n(i.Content, { css: e.collapsible, children: /* @__PURE__ */ n(r, { css: e.body, children:
|
|
24
|
+
/* @__PURE__ */ n(i.Content, { css: e.collapsible, children: /* @__PURE__ */ n(r, { css: e.body, children: p }) })
|
|
22
25
|
] }) });
|
|
23
26
|
};
|
|
24
|
-
|
|
27
|
+
T.displayName = "BitkitExpandableCard";
|
|
25
28
|
export {
|
|
26
|
-
|
|
29
|
+
T as default
|
|
27
30
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const expandableCardSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"body" | "footer" | "header" | "title" | "icon" | "root" | "description" | "collapsible" | "suffix" | "chevron", {
|
|
1
|
+
declare const expandableCardSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"body" | "footer" | "header" | "title" | "icon" | "root" | "description" | "collapsible" | "secdText" | "suffix" | "chevron", {
|
|
2
2
|
size: {
|
|
3
3
|
md: {
|
|
4
4
|
header: {
|
|
@@ -6,12 +6,18 @@ declare const expandableCardSlotRecipe: import('@chakra-ui/react').SlotRecipeDef
|
|
|
6
6
|
paddingX: "16";
|
|
7
7
|
paddingY: "12";
|
|
8
8
|
};
|
|
9
|
+
secdText: {
|
|
10
|
+
textStyle: "body/sm/regular";
|
|
11
|
+
};
|
|
9
12
|
};
|
|
10
13
|
lg: {
|
|
11
14
|
header: {
|
|
12
15
|
textStyle: "body/lg/regular";
|
|
13
16
|
padding: "16";
|
|
14
17
|
};
|
|
18
|
+
secdText: {
|
|
19
|
+
textStyle: "body/md/regular";
|
|
20
|
+
};
|
|
15
21
|
};
|
|
16
22
|
};
|
|
17
23
|
}>;
|
|
@@ -2,7 +2,7 @@ import { cardAnatomy as e } from "@chakra-ui/react/anatomy";
|
|
|
2
2
|
import { defineSlotRecipe as o } from "@chakra-ui/react/styled-system";
|
|
3
3
|
const t = o({
|
|
4
4
|
className: "expandable-card",
|
|
5
|
-
slots: [...e.keys(), "chevron", "collapsible", "icon", "suffix"],
|
|
5
|
+
slots: [...e.keys(), "chevron", "collapsible", "icon", "secdText", "suffix"],
|
|
6
6
|
base: {
|
|
7
7
|
root: {
|
|
8
8
|
backgroundColor: "background/primary",
|
|
@@ -19,6 +19,9 @@ const t = o({
|
|
|
19
19
|
},
|
|
20
20
|
"&:hover:not(:active)": {
|
|
21
21
|
backgroundColor: "background/hover"
|
|
22
|
+
},
|
|
23
|
+
_open: {
|
|
24
|
+
backgroundColor: "background/secondary"
|
|
22
25
|
}
|
|
23
26
|
},
|
|
24
27
|
collapsible: {
|
|
@@ -46,6 +49,9 @@ const t = o({
|
|
|
46
49
|
icon: {
|
|
47
50
|
color: "icon/secondary"
|
|
48
51
|
},
|
|
52
|
+
secdText: {
|
|
53
|
+
color: "text/secondary"
|
|
54
|
+
},
|
|
49
55
|
suffix: {
|
|
50
56
|
color: "text/secondary",
|
|
51
57
|
mx: "16",
|
|
@@ -55,10 +61,12 @@ const t = o({
|
|
|
55
61
|
variants: {
|
|
56
62
|
size: {
|
|
57
63
|
md: {
|
|
58
|
-
header: { textStyle: "body/md/regular", paddingX: "16", paddingY: "12" }
|
|
64
|
+
header: { textStyle: "body/md/regular", paddingX: "16", paddingY: "12" },
|
|
65
|
+
secdText: { textStyle: "body/sm/regular" }
|
|
59
66
|
},
|
|
60
67
|
lg: {
|
|
61
|
-
header: { textStyle: "body/lg/regular", padding: "16" }
|
|
68
|
+
header: { textStyle: "body/lg/regular", padding: "16" },
|
|
69
|
+
secdText: { textStyle: "body/md/regular" }
|
|
62
70
|
}
|
|
63
71
|
}
|
|
64
72
|
},
|
|
@@ -72,7 +72,7 @@ declare const slotRecipes: {
|
|
|
72
72
|
};
|
|
73
73
|
};
|
|
74
74
|
}>;
|
|
75
|
-
expandableCard: import('@chakra-ui/react').SlotRecipeDefinition<"body" | "footer" | "header" | "title" | "icon" | "root" | "description" | "collapsible" | "suffix" | "chevron", {
|
|
75
|
+
expandableCard: import('@chakra-ui/react').SlotRecipeDefinition<"body" | "footer" | "header" | "title" | "icon" | "root" | "description" | "collapsible" | "secdText" | "suffix" | "chevron", {
|
|
76
76
|
size: {
|
|
77
77
|
md: {
|
|
78
78
|
header: {
|
|
@@ -80,12 +80,18 @@ declare const slotRecipes: {
|
|
|
80
80
|
paddingX: "16";
|
|
81
81
|
paddingY: "12";
|
|
82
82
|
};
|
|
83
|
+
secdText: {
|
|
84
|
+
textStyle: "body/sm/regular";
|
|
85
|
+
};
|
|
83
86
|
};
|
|
84
87
|
lg: {
|
|
85
88
|
header: {
|
|
86
89
|
textStyle: "body/lg/regular";
|
|
87
90
|
padding: "16";
|
|
88
91
|
};
|
|
92
|
+
secdText: {
|
|
93
|
+
textStyle: "body/md/regular";
|
|
94
|
+
};
|
|
89
95
|
};
|
|
90
96
|
};
|
|
91
97
|
}>;
|