@bitrise/bitkit-v2 0.3.143 → 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.
@@ -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;
@@ -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
+ };
@@ -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 "./NativeSelect.recipe.js";
16
- import n from "./NumberInput.recipe.js";
17
- import s from "./RadioGroup.recipe.js";
18
- import { selectSlotRecipe as u } from "./Select.recipe.js";
19
- import x from "./Switch.recipe.js";
20
- import k from "./Table.recipe.js";
21
- import h from "./Tabs.recipe.js";
22
- import v from "./Tag.recipe.js";
23
- import P from "./Tooltip.recipe.js";
24
- const U = {
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: b,
38
+ nativeSelect: n,
38
39
  alert: t,
39
- numberInput: n,
40
- radioGroup: s,
41
- select: u,
42
- switch: x,
43
- table: k,
44
- tabs: h,
45
- tag: v,
46
- tooltip: P,
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
- U as default
52
+ W as default
51
53
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit-v2",
3
3
  "private": false,
4
- "version": "0.3.143",
4
+ "version": "0.3.144",
5
5
  "description": "Bitrise Design System Components built with Chakra UI V3",
6
6
  "keywords": [
7
7
  "react",